From d65d86fe89697dfa5d423d10c556d557c5b4c6a2 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Sun, 10 Apr 2011 15:40:38 +0200 Subject: [PATCH 0001/1172] [2022] Naxxramas: Simplify Code and remove magic numbers --- .../naxxramas/instance_naxxramas.cpp | 154 ++++++------------ scripts/northrend/naxxramas/naxxramas.h | 32 ++-- sd2_revision_nr.h | 2 +- 3 files changed, 70 insertions(+), 118 deletions(-) diff --git a/scripts/northrend/naxxramas/instance_naxxramas.cpp b/scripts/northrend/naxxramas/instance_naxxramas.cpp index adf4349c1..7901ad8ff 100644 --- a/scripts/northrend/naxxramas/instance_naxxramas.cpp +++ b/scripts/northrend/naxxramas/instance_naxxramas.cpp @@ -127,7 +127,7 @@ void instance_naxxramas::OnObjectCreate(GameObject* pGo) break; case GO_ARAC_ANUB_GATE: m_uiAnubGateGUID = pGo->GetGUID(); - if (m_auiEncounter[0] == DONE) + if (m_auiEncounter[TYPE_ANUB_REKHAN] == DONE) pGo->SetGoState(GO_STATE_ACTIVE); break; case GO_ARAC_FAER_WEB: @@ -135,7 +135,7 @@ void instance_naxxramas::OnObjectCreate(GameObject* pGo) break; case GO_ARAC_FAER_DOOR: m_uiFaerDoorGUID = pGo->GetGUID(); - if (m_auiEncounter[1] == DONE) + if (m_auiEncounter[TYPE_FAERLINA] == DONE) pGo->SetGoState(GO_STATE_ACTIVE); break; case GO_ARAC_MAEX_INNER_DOOR: @@ -143,7 +143,7 @@ void instance_naxxramas::OnObjectCreate(GameObject* pGo) break; case GO_ARAC_MAEX_OUTER_DOOR: m_uiMaexOuterGUID = pGo->GetGUID(); - if (m_auiEncounter[1] == DONE) + if (m_auiEncounter[TYPE_FAERLINA] == DONE) pGo->SetGoState(GO_STATE_ACTIVE); break; @@ -152,17 +152,17 @@ void instance_naxxramas::OnObjectCreate(GameObject* pGo) break; case GO_PLAG_NOTH_EXIT_DOOR: m_uiNothExitDoorGUID = pGo->GetGUID(); - if (m_auiEncounter[3] == DONE) + if (m_auiEncounter[TYPE_NOTH] == DONE) pGo->SetGoState(GO_STATE_ACTIVE); break; case GO_PLAG_HEIG_ENTRY_DOOR: m_uiHeigEntryDoorGUID = pGo->GetGUID(); - if (m_auiEncounter[3] == DONE) + if (m_auiEncounter[TYPE_NOTH] == DONE) pGo->SetGoState(GO_STATE_ACTIVE); break; case GO_PLAG_HEIG_EXIT_DOOR: m_uiHeigExitDoorGUID = pGo->GetGUID(); - if (m_auiEncounter[4] == DONE) + if (m_auiEncounter[TYPE_HEIGAN] == DONE) pGo->SetGoState(GO_STATE_ACTIVE); break; case GO_PLAG_LOAT_DOOR: @@ -174,7 +174,7 @@ void instance_naxxramas::OnObjectCreate(GameObject* pGo) break; case GO_MILI_GOTH_EXIT_GATE: m_uiGothikExitDoorGUID = pGo->GetGUID(); - if (m_auiEncounter[7] == DONE) + if (m_auiEncounter[TYPE_GOTHIK] == DONE) pGo->SetGoState(GO_STATE_ACTIVE); break; case GO_MILI_GOTH_COMBAT_GATE: @@ -182,7 +182,7 @@ void instance_naxxramas::OnObjectCreate(GameObject* pGo) break; case GO_MILI_HORSEMEN_DOOR: m_uiHorsemenDoorGUID = pGo->GetGUID(); - if (m_auiEncounter[7] == DONE) + if (m_auiEncounter[TYPE_GOTHIK] == DONE) pGo->SetGoState(GO_STATE_ACTIVE); break; @@ -193,33 +193,33 @@ void instance_naxxramas::OnObjectCreate(GameObject* pGo) case GO_CONS_PATH_EXIT_DOOR: m_uiPathExitDoorGUID = pGo->GetGUID(); - if (m_auiEncounter[9] == DONE) + if (m_auiEncounter[TYPE_PATCHWERK] == DONE) pGo->SetGoState(GO_STATE_ACTIVE); break; case GO_CONS_GLUT_EXIT_DOOR: m_uiGlutExitDoorGUID = pGo->GetGUID(); - if (m_auiEncounter[11] == DONE) + if (m_auiEncounter[TYPE_GLUTH] == DONE) pGo->SetGoState(GO_STATE_ACTIVE); break; case GO_CONS_THAD_DOOR: m_uiThadDoorGUID = pGo->GetGUID(); - if (m_auiEncounter[11] == DONE) + if (m_auiEncounter[TYPE_GLUTH] == DONE) pGo->SetGoState(GO_STATE_ACTIVE); break; case GO_CONS_NOX_TESLA_FEUGEN: m_uiThadNoxTeslaFeugenGUID = pGo->GetGUID(); - if (m_auiEncounter[12] == DONE) + if (m_auiEncounter[TYPE_THADDIUS] == DONE) pGo->SetGoState(GO_STATE_READY); break; case GO_CONS_NOX_TESLA_STALAGG: m_uiThadNoxTeslaStalaggGUID = pGo->GetGUID(); - if (m_auiEncounter[12] == DONE) + if (m_auiEncounter[TYPE_THADDIUS] == DONE) pGo->SetGoState(GO_STATE_READY); break; case GO_KELTHUZAD_WATERFALL_DOOR: m_uiKelthuzadDoorGUID = pGo->GetGUID(); - if (m_auiEncounter[13] == DONE) + if (m_auiEncounter[TYPE_SAPPHIRON] == DONE) pGo->SetGoState(GO_STATE_ACTIVE); break; @@ -229,22 +229,22 @@ void instance_naxxramas::OnObjectCreate(GameObject* pGo) case GO_ARAC_EYE_RAMP: m_uiAracEyeRampGUID = pGo->GetGUID(); - if (m_auiEncounter[2] == DONE) + if (m_auiEncounter[TYPE_MAEXXNA] == DONE) pGo->SetGoState(GO_STATE_ACTIVE); break; case GO_PLAG_EYE_RAMP: m_uiPlagEyeRampGUID = pGo->GetGUID(); - if (m_auiEncounter[5] == DONE) + if (m_auiEncounter[TYPE_LOATHEB] == DONE) pGo->SetGoState(GO_STATE_ACTIVE); break; case GO_MILI_EYE_RAMP: m_uiMiliEyeRampGUID = pGo->GetGUID(); - if (m_auiEncounter[8] == DONE) + if (m_auiEncounter[TYPE_FOUR_HORSEMEN] == DONE) pGo->SetGoState(GO_STATE_ACTIVE); break; case GO_CONS_EYE_RAMP: m_uiConsEyeRampGUID = pGo->GetGUID(); - if (m_auiEncounter[12] == DONE) + if (m_auiEncounter[TYPE_THADDIUS] == DONE) pGo->SetGoState(GO_STATE_ACTIVE); break; @@ -286,7 +286,7 @@ void instance_naxxramas::SetData(uint32 uiType, uint32 uiData) switch(uiType) { case TYPE_ANUB_REKHAN: - m_auiEncounter[0] = uiData; + m_auiEncounter[uiType] = uiData; DoUseDoorOrButton(m_uiAnubDoorGUID); if (uiData == DONE) DoUseDoorOrButton(m_uiAnubGateGUID); @@ -309,10 +309,10 @@ void instance_naxxramas::SetData(uint32 uiType, uint32 uiData) pAdd->Respawn(); } } - m_auiEncounter[1] = uiData; + m_auiEncounter[uiType] = uiData; break; case TYPE_MAEXXNA: - m_auiEncounter[2] = uiData; + m_auiEncounter[uiType] = uiData; DoUseDoorOrButton(m_uiMaexInnerGUID, uiData); if (uiData == DONE) { @@ -322,7 +322,7 @@ void instance_naxxramas::SetData(uint32 uiType, uint32 uiData) } break; case TYPE_NOTH: - m_auiEncounter[3] = uiData; + m_auiEncounter[uiType] = uiData; DoUseDoorOrButton(m_uiNothEntryDoorGUID); if (uiData == DONE) { @@ -331,7 +331,7 @@ void instance_naxxramas::SetData(uint32 uiType, uint32 uiData) } break; case TYPE_HEIGAN: - m_auiEncounter[4] = uiData; + m_auiEncounter[uiType] = uiData; DoUseDoorOrButton(m_uiHeigEntryDoorGUID); // uncomment when eruption is implemented //if (uiData == IN_PROGRESS) @@ -340,7 +340,7 @@ void instance_naxxramas::SetData(uint32 uiType, uint32 uiData) DoUseDoorOrButton(m_uiHeigExitDoorGUID); break; case TYPE_LOATHEB: - m_auiEncounter[5] = uiData; + m_auiEncounter[uiType] = uiData; DoUseDoorOrButton(m_uiLoathebDoorGUID); if (uiData == IN_PROGRESS) SetSpecialAchievementCriteria(TYPE_ACHIEV_SPORE_LOSER, true); @@ -352,7 +352,7 @@ void instance_naxxramas::SetData(uint32 uiType, uint32 uiData) } break; case TYPE_RAZUVIOUS: - m_auiEncounter[6] = uiData; + m_auiEncounter[uiType] = uiData; break; case TYPE_GOTHIK: switch(uiData) @@ -365,7 +365,7 @@ void instance_naxxramas::SetData(uint32 uiType, uint32 uiData) DoUseDoorOrButton(m_uiGothCombatGateGUID); break; case FAIL: - if (m_auiEncounter[7] == IN_PROGRESS) + if (m_auiEncounter[uiType] == IN_PROGRESS) DoUseDoorOrButton(m_uiGothCombatGateGUID); DoUseDoorOrButton(m_uiGothikEntryDoorGUID); @@ -376,10 +376,10 @@ void instance_naxxramas::SetData(uint32 uiType, uint32 uiData) DoUseDoorOrButton(m_uiHorsemenDoorGUID); break; } - m_auiEncounter[7] = uiData; + m_auiEncounter[uiType] = uiData; break; case TYPE_FOUR_HORSEMEN: - m_auiEncounter[8] = uiData; + m_auiEncounter[uiType] = uiData; DoUseDoorOrButton(m_uiHorsemenDoorGUID); if (uiData == DONE) { @@ -390,15 +390,15 @@ void instance_naxxramas::SetData(uint32 uiType, uint32 uiData) } break; case TYPE_PATCHWERK: - m_auiEncounter[9] = uiData; + m_auiEncounter[uiType] = uiData; if (uiData == DONE) DoUseDoorOrButton(m_uiPathExitDoorGUID); break; case TYPE_GROBBULUS: - m_auiEncounter[10] = uiData; + m_auiEncounter[uiType] = uiData; break; case TYPE_GLUTH: - m_auiEncounter[11] = uiData; + m_auiEncounter[uiType] = uiData; if (uiData == DONE) { DoUseDoorOrButton(m_uiGlutExitDoorGUID); @@ -407,10 +407,10 @@ void instance_naxxramas::SetData(uint32 uiType, uint32 uiData) break; case TYPE_THADDIUS: // Only process real changes here - if (m_auiEncounter[12] == uiData) + if (m_auiEncounter[uiType] == uiData) return; - m_auiEncounter[12] = uiData; + m_auiEncounter[uiType] = uiData; if (uiData != SPECIAL) DoUseDoorOrButton(m_uiThadDoorGUID, uiData); // Uncomment when this achievement is implemented @@ -424,7 +424,7 @@ void instance_naxxramas::SetData(uint32 uiType, uint32 uiData) } break; case TYPE_SAPPHIRON: - m_auiEncounter[13] = uiData; + m_auiEncounter[uiType] = uiData; // Uncomment when achiev check implemented //if (uiData == IN_PROGRESS) // SetSpecialAchievementCriteria(TYPE_ACHIEV_HUNDRED_CLUB, true); @@ -432,13 +432,13 @@ void instance_naxxramas::SetData(uint32 uiType, uint32 uiData) DoUseDoorOrButton(m_uiKelthuzadDoorGUID); break; case TYPE_KELTHUZAD: - m_auiEncounter[14] = uiData; + m_auiEncounter[uiType] = uiData; DoUseDoorOrButton(m_uiKelthuzadExitDoorGUID); if (uiData == IN_PROGRESS) SetSpecialAchievementCriteria(TYPE_ACHIEV_GET_ENOUGH, false); break; case TYPE_UNDYING_FAILED: - m_auiEncounter[15] = uiData; + m_auiEncounter[uiType] = uiData; break; } @@ -487,78 +487,30 @@ void instance_naxxramas::Load(const char* chrIn) uint32 instance_naxxramas::GetData(uint32 uiType) { - switch(uiType) - { - case TYPE_ANUB_REKHAN: - return m_auiEncounter[0]; - case TYPE_FAERLINA: - return m_auiEncounter[1]; - case TYPE_MAEXXNA: - return m_auiEncounter[2]; - case TYPE_NOTH: - return m_auiEncounter[3]; - case TYPE_HEIGAN: - return m_auiEncounter[4]; - case TYPE_LOATHEB: - return m_auiEncounter[5]; - case TYPE_RAZUVIOUS: - return m_auiEncounter[6]; - case TYPE_GOTHIK: - return m_auiEncounter[7]; - case TYPE_FOUR_HORSEMEN: - return m_auiEncounter[8]; - case TYPE_PATCHWERK: - return m_auiEncounter[9]; - case TYPE_GROBBULUS: - return m_auiEncounter[10]; - case TYPE_GLUTH: - return m_auiEncounter[11]; - case TYPE_THADDIUS: - return m_auiEncounter[12]; - case TYPE_SAPPHIRON: - return m_auiEncounter[13]; - case TYPE_KELTHUZAD: - return m_auiEncounter[14]; - case TYPE_UNDYING_FAILED: - return m_auiEncounter[15]; - default: - return 0; + if (uiType < MAX_ENCOUNTER) + return m_auiEncounter[uiType]; - } + return 0; } uint64 instance_naxxramas::GetData64(uint32 uiData) { switch(uiData) { - case NPC_ANUB_REKHAN: - return m_uiAnubRekhanGUID; - case NPC_FAERLINA: - return m_uiFaerlinanGUID; - case GO_MILI_GOTH_COMBAT_GATE: - return m_uiGothCombatGateGUID; - case NPC_ZELIEK: - return m_uiZeliekGUID; - case NPC_THANE: - return m_uiThaneGUID; - case NPC_BLAUMEUX: - return m_uiBlaumeuxGUID; - case NPC_RIVENDARE: - return m_uiRivendareGUID; - case NPC_THADDIUS: - return m_uiThaddiusGUID; - case NPC_STALAGG: - return m_uiStalaggGUID; - case NPC_FEUGEN: - return m_uiFeugenGUID; - case GO_CONS_NOX_TESLA_FEUGEN: - return m_uiThadNoxTeslaFeugenGUID; - case GO_CONS_NOX_TESLA_STALAGG: - return m_uiThadNoxTeslaStalaggGUID; - case NPC_GOTHIK: - return m_uiGothikGUID; - case NPC_KELTHUZAD: - return m_uiKelthuzadGUID; + case NPC_ANUB_REKHAN: return m_uiAnubRekhanGUID; + case NPC_FAERLINA: return m_uiFaerlinanGUID; + case GO_MILI_GOTH_COMBAT_GATE: return m_uiGothCombatGateGUID; + case NPC_ZELIEK: return m_uiZeliekGUID; + case NPC_THANE: return m_uiThaneGUID; + case NPC_BLAUMEUX: return m_uiBlaumeuxGUID; + case NPC_RIVENDARE: return m_uiRivendareGUID; + case NPC_THADDIUS: return m_uiThaddiusGUID; + case NPC_STALAGG: return m_uiStalaggGUID; + case NPC_FEUGEN: return m_uiFeugenGUID; + case GO_CONS_NOX_TESLA_FEUGEN: return m_uiThadNoxTeslaFeugenGUID; + case GO_CONS_NOX_TESLA_STALAGG: return m_uiThadNoxTeslaStalaggGUID; + case NPC_GOTHIK: return m_uiGothikGUID; + case NPC_KELTHUZAD: return m_uiKelthuzadGUID; default: return 0; } diff --git a/scripts/northrend/naxxramas/naxxramas.h b/scripts/northrend/naxxramas/naxxramas.h index 31658541c..b352ac878 100644 --- a/scripts/northrend/naxxramas/naxxramas.h +++ b/scripts/northrend/naxxramas/naxxramas.h @@ -17,27 +17,27 @@ enum SAY_KELTHUZAD_TAUNT3 = -1533092, SAY_KELTHUZAD_TAUNT4 = -1533093, - TYPE_ANUB_REKHAN = 1, - TYPE_FAERLINA = 2, - TYPE_MAEXXNA = 3, + TYPE_ANUB_REKHAN = 0, + TYPE_FAERLINA = 1, + TYPE_MAEXXNA = 2, - TYPE_NOTH = 4, - TYPE_HEIGAN = 5, - TYPE_LOATHEB = 6, + TYPE_NOTH = 3, + TYPE_HEIGAN = 4, + TYPE_LOATHEB = 5, - TYPE_RAZUVIOUS = 7, - TYPE_GOTHIK = 8, - TYPE_FOUR_HORSEMEN = 9, + TYPE_RAZUVIOUS = 6, + TYPE_GOTHIK = 7, + TYPE_FOUR_HORSEMEN = 8, - TYPE_PATCHWERK = 10, - TYPE_GROBBULUS = 11, - TYPE_GLUTH = 12, - TYPE_THADDIUS = 13, + TYPE_PATCHWERK = 9, + TYPE_GROBBULUS = 10, + TYPE_GLUTH = 11, + TYPE_THADDIUS = 12, - TYPE_SAPPHIRON = 14, - TYPE_KELTHUZAD = 15, + TYPE_SAPPHIRON = 13, + TYPE_KELTHUZAD = 14, - TYPE_UNDYING_FAILED = 16, // Achievements Undying and Immortal, needs to be saved to database + TYPE_UNDYING_FAILED = 15, // Achievements Undying and Immortal, needs to be saved to database MAX_SPECIAL_ACHIEV_CRITS = 6, diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 74a195471..56e964f2c 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2021" + #define SD2_REVISION_NR "2022" #endif // __SD2_REVISION_NR_H__ From 935856f1bae6628ecacbbb71a1c2e804698c044e Mon Sep 17 00:00:00 2001 From: NoFantasy Date: Mon, 11 Apr 2011 17:28:20 +0200 Subject: [PATCH 0002/1172] [2023] Fix Summon hack for Zul'Gurub, Jin'Do Heal-Totem Signed-off-by: Schmoozerd --- .../eastern_kingdoms/zulgurub/boss_jindo.cpp | 50 ++++++++----------- sd2_revision_nr.h | 2 +- 2 files changed, 22 insertions(+), 30 deletions(-) diff --git a/scripts/eastern_kingdoms/zulgurub/boss_jindo.cpp b/scripts/eastern_kingdoms/zulgurub/boss_jindo.cpp index a76ca2161..4f2a2e24e 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_jindo.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_jindo.cpp @@ -17,7 +17,7 @@ /* ScriptData SDName: Boss_Jin'do the Hexxer SD%Complete: 85 -SDComment: Mind Control not working because of core bug. Shades invisible is removed as of Attacking (core bug) - MANY HACKZ!!! +SDComment: Mind Control not working because of core bug. Shades invisible is removed as of Attacking (core bug) - MANY HACKZ!! SDCategory: Zul'Gurub EndScriptData */ @@ -29,7 +29,7 @@ enum SAY_AGGRO = -1309014, SPELL_BRAINWASH_TOTEM = 24262, - SPELL_POWERFULL_HEALING_WARD = 24309, // the healing ward will be summoned manually, not like a totem (missing passive spell in DBC) + SPELL_POWERFULL_HEALING_WARD = 24309, SPELL_HEX = 24053, SPELL_DELUSIONS_OF_JINDO = 24306, SPELL_SHADE_OF_JINDO = 24308, // Spell was removed from DBC around TBC; will summon npcs manually! @@ -83,6 +83,12 @@ struct MANGOS_DLL_DECL boss_jindoAI : public ScriptedAI DoScriptText(SAY_AGGRO, m_creature); } + void SummonedCreatureJustDied(Creature* pSummoned) + { + if (pSummoned->GetEntry() == NPC_POWERFULL_HEALING_WARD) + m_uiHealingWardTimer = 15000; // how long delay? + } + void UpdateAI(const uint32 uiDiff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) @@ -98,20 +104,16 @@ struct MANGOS_DLL_DECL boss_jindoAI : public ScriptedAI m_uiBrainWashTotemTimer -= uiDiff; // Healing Ward Timer - if (m_uiHealingWardTimer < uiDiff) + if (m_uiHealingWardTimer) { - // HACK ALERT - this npc should be summoned by spell and then as totem! - // but there is no totem-passive spell to trigger the healing, hence this direct HACK - // DoCastSpellIfCan(m_creature, SPELL_POWERFULL_HEALING_WARD); - - float fX, fY, fZ; - m_creature->GetClosePoint(fX, fY, fZ, m_creature->GetObjectBoundingRadius(), 2.0f, M_PI_F); - m_creature->SummonCreature(NPC_POWERFULL_HEALING_WARD, fX, fY, fZ, m_creature->GetOrientation(), TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 30000); - - m_uiHealingWardTimer = urand(14000, 20000); + if (m_uiHealingWardTimer <= uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_POWERFULL_HEALING_WARD) == CAST_OK) + m_uiHealingWardTimer = 0; + } + else + m_uiHealingWardTimer -= uiDiff; } - else - m_uiHealingWardTimer -= uiDiff; // Hex Timer if (m_uiHexTimer < uiDiff) @@ -169,22 +171,16 @@ struct MANGOS_DLL_DECL boss_jindoAI : public ScriptedAI } }; -// HACK script! +// HACK script! Should not need to have totems in sd2 struct MANGOS_DLL_DECL mob_healing_wardAI : public ScriptedAI { - mob_healing_wardAI(Creature* pCreature) : ScriptedAI(pCreature) - { - m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - Reset(); - } - - ScriptedInstance* m_pInstance; + mob_healing_wardAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } uint32 m_uiHealTimer; void Reset() { - m_uiHealTimer = 2000; + m_uiHealTimer = 3000; // Timer unknown, sources go over 1s, per tick to 3s, keep 3s as in original script } void AttackStart(Unit* pWho) {} @@ -192,15 +188,11 @@ struct MANGOS_DLL_DECL mob_healing_wardAI : public ScriptedAI void UpdateAI (const uint32 uiDiff) { - if (!m_pInstance) - return; - // Heal Timer if (m_uiHealTimer < uiDiff) { - Creature* pJindo = m_pInstance->instance->GetCreature(m_pInstance->GetData64(NPC_JINDO)); - if (pJindo && DoCastSpellIfCan(pJindo, SPELL_HEALING_WARD_HEAL) == CAST_OK) - m_uiHealTimer = 3000; + DoCastSpellIfCan(m_creature, SPELL_HEALING_WARD_HEAL); + m_uiHealTimer = 3000; } else m_uiHealTimer -= uiDiff; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 56e964f2c..6c5df6d49 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2022" + #define SD2_REVISION_NR "2023" #endif // __SD2_REVISION_NR_H__ From 4ad8e10468fcddb184728716fde16d8e460dd2de Mon Sep 17 00:00:00 2001 From: NeatElves Date: Tue, 12 Apr 2011 11:38:52 +0200 Subject: [PATCH 0003/1172] [2024] Remove unneeded scripts for go_*_crystal_pylon These scripts are expected to be handled within Database Signed-off-by: Schmoozerd --- scripts/world/go_scripts.cpp | 73 +--------------------------------- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 3 -- sql/updates/r2024_mangos.sql | 3 ++ 4 files changed, 5 insertions(+), 76 deletions(-) create mode 100644 sql/updates/r2024_mangos.sql diff --git a/scripts/world/go_scripts.cpp b/scripts/world/go_scripts.cpp index b71c95236..9fd81e944 100644 --- a/scripts/world/go_scripts.cpp +++ b/scripts/world/go_scripts.cpp @@ -17,15 +17,12 @@ /* ScriptData SDName: GO_Scripts SD%Complete: 100 -SDComment: Quest support: 4285,4287,4288(crystal pylons), 4296, 5088, 5097, 5098, 5381, 6481, 10990, 10991, 10992, 12557, 14092/14076. Field_Repair_Bot->Teaches spell 22704. Barov_journal->Teaches spell 26089 +SDComment: Quest support: 4296, 5088, 5097, 5098, 5381, 6481, 10990, 10991, 10992, 12557, 14092/14076. Field_Repair_Bot->Teaches spell 22704. Barov_journal->Teaches spell 26089 SDCategory: Game Objects EndScriptData */ /* ContentData go_cat_figurine (the "trap" version of GO, two different exist) -go_northern_crystal_pylon -go_eastern_crystal_pylon -go_western_crystal_pylon go_barov_journal go_ethereum_prison go_ethereum_stasis @@ -61,59 +58,6 @@ bool GOUse_go_cat_figurine(Player* pPlayer, GameObject* pGo) return false; } -/*###### -## go_crystal_pylons (3x) -######*/ - -enum -{ - QUEST_THE_NORTHERN_PYLON = 4285, - QUEST_THE_EASTERN_PYLON = 4287, - QUEST_THE_WESTERN_PYLON = 4288 -}; - -bool GOUse_go_northern_crystal_pylon(Player* pPlayer, GameObject* pGo) -{ - if (pGo->GetGoType() == GAMEOBJECT_TYPE_QUESTGIVER) - { - pPlayer->PrepareQuestMenu(pGo->GetGUID()); - pPlayer->SendPreparedQuest(pGo->GetGUID()); - } - - if (pPlayer->GetQuestStatus(QUEST_THE_NORTHERN_PYLON) == QUEST_STATUS_INCOMPLETE) - pPlayer->AreaExploredOrEventHappens(QUEST_THE_NORTHERN_PYLON); - - return true; -} - -bool GOUse_go_eastern_crystal_pylon(Player* pPlayer, GameObject* pGo) -{ - if (pGo->GetGoType() == GAMEOBJECT_TYPE_QUESTGIVER) - { - pPlayer->PrepareQuestMenu(pGo->GetGUID()); - pPlayer->SendPreparedQuest(pGo->GetGUID()); - } - - if (pPlayer->GetQuestStatus(QUEST_THE_EASTERN_PYLON) == QUEST_STATUS_INCOMPLETE) - pPlayer->AreaExploredOrEventHappens(QUEST_THE_EASTERN_PYLON); - - return true; -} - -bool GOUse_go_western_crystal_pylon(Player* pPlayer, GameObject* pGo) -{ - if (pGo->GetGoType() == GAMEOBJECT_TYPE_QUESTGIVER) - { - pPlayer->PrepareQuestMenu(pGo->GetGUID()); - pPlayer->SendPreparedQuest(pGo->GetGUID()); - } - - if (pPlayer->GetQuestStatus(QUEST_THE_WESTERN_PYLON) == QUEST_STATUS_INCOMPLETE) - pPlayer->AreaExploredOrEventHappens(QUEST_THE_WESTERN_PYLON); - - return true; -} - /*###### ## go_barov_journal ######*/ @@ -610,21 +554,6 @@ void AddSC_go_scripts() pNewScript->pGOUse = &GOUse_go_cat_figurine; pNewScript->RegisterSelf(); - pNewScript = new Script; - pNewScript->Name = "go_northern_crystal_pylon"; - pNewScript->pGOUse = &GOUse_go_northern_crystal_pylon; - pNewScript->RegisterSelf(); - - pNewScript = new Script; - pNewScript->Name = "go_eastern_crystal_pylon"; - pNewScript->pGOUse = &GOUse_go_eastern_crystal_pylon; - pNewScript->RegisterSelf(); - - pNewScript = new Script; - pNewScript->Name = "go_western_crystal_pylon"; - pNewScript->pGOUse = &GOUse_go_western_crystal_pylon; - pNewScript->RegisterSelf(); - pNewScript = new Script; pNewScript->Name = "go_barov_journal"; pNewScript->pGOUse = &GOUse_go_barov_journal; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 6c5df6d49..3034afc39 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2023" + #define SD2_REVISION_NR "2024" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 54d4efefe..471d621b7 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -62,9 +62,6 @@ UPDATE creature_template SET ScriptName='mob_dementeddruids' WHERE entry=15260; /* GO */ UPDATE gameobject_template SET ScriptName='go_cat_figurine' WHERE entry=13873; -UPDATE gameobject_template SET ScriptName='go_northern_crystal_pylon' WHERE entry=164955; -UPDATE gameobject_template SET ScriptName='go_western_crystal_pylon' WHERE entry=164956; -UPDATE gameobject_template SET ScriptName='go_eastern_crystal_pylon' WHERE entry=164957; UPDATE gameobject_template SET ScriptName='go_barov_journal' WHERE entry=180794; UPDATE gameobject_template SET ScriptName='go_ethereum_prison' WHERE entry BETWEEN 184418 AND 184431; UPDATE gameobject_template SET ScriptName='go_ethereum_stasis' WHERE entry BETWEEN 185465 AND 185467; diff --git a/sql/updates/r2024_mangos.sql b/sql/updates/r2024_mangos.sql new file mode 100644 index 000000000..76919314a --- /dev/null +++ b/sql/updates/r2024_mangos.sql @@ -0,0 +1,3 @@ +UPDATE gameobject_template SET ScriptName='' WHERE entry=164955; +UPDATE gameobject_template SET ScriptName='' WHERE entry=164956; +UPDATE gameobject_template SET ScriptName='' WHERE entry=164957; From 4472e56fab914d97a08bbd9c559965fd66a37d5a Mon Sep 17 00:00:00 2001 From: NoFantasy Date: Wed, 13 Apr 2011 00:37:04 +0200 Subject: [PATCH 0004/1172] [2025] Remove no longer needed script for mob_sunspring_villager Signed-off-by: NoFantasy --- scripts/outland/nagrand.cpp | 36 +--------------------------------- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 - sql/updates/r2025_mangos.sql | 1 + 4 files changed, 3 insertions(+), 37 deletions(-) create mode 100644 sql/updates/r2025_mangos.sql diff --git a/scripts/outland/nagrand.cpp b/scripts/outland/nagrand.cpp index ad2221735..04f59fa32 100644 --- a/scripts/outland/nagrand.cpp +++ b/scripts/outland/nagrand.cpp @@ -17,13 +17,12 @@ /* ScriptData SDName: Nagrand SD%Complete: 90 -SDComment: Quest support: 9868, 9874, 9918, 9991, 10044, 10085, 10107, 10108, 10172, 10646. TextId's unknown for altruis_the_sufferer and greatmother_geyah (npc_text) +SDComment: Quest support: 9868, 9918, 9991, 10044, 10085, 10107, 10108, 10172, 10646. TextId's unknown for altruis_the_sufferer and greatmother_geyah (npc_text) SDCategory: Nagrand EndScriptData */ /* ContentData mob_lump -mob_sunspring_villager npc_altruis_the_sufferer npc_greatmother_geyah npc_lantresor_of_the_blade @@ -196,34 +195,6 @@ bool GossipSelect_mob_lump(Player* pPlayer, Creature* pCreature, uint32 uiSender return true; } -/*#### -# mob_sunspring_villager - should be done with ACID -####*/ - -struct MANGOS_DLL_DECL mob_sunspring_villagerAI : public ScriptedAI -{ - mob_sunspring_villagerAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} - - void Reset() - { - m_creature->SetUInt32Value(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_DEAD); - m_creature->SetStandState(UNIT_STAND_STATE_DEAD); - } - - void SpellHit(Unit *caster, const SpellEntry *spell) - { - if (spell->Id == 32146) - { - m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); - m_creature->RemoveCorpse(); - } - } -}; -CreatureAI* GetAI_mob_sunspring_villager(Creature* pCreature) -{ - return new mob_sunspring_villagerAI(pCreature); -} - /*###### ## npc_altruis_the_sufferer ######*/ @@ -674,11 +645,6 @@ void AddSC_nagrand() pNewScript->pGossipSelect = &GossipSelect_mob_lump; pNewScript->RegisterSelf(); - pNewScript = new Script; - pNewScript->Name = "mob_sunspring_villager"; - pNewScript->GetAI = &GetAI_mob_sunspring_villager; - pNewScript->RegisterSelf(); - pNewScript = new Script; pNewScript->Name = "npc_altruis_the_sufferer"; pNewScript->pGossipHello = &GossipHello_npc_altruis_the_sufferer; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 3034afc39..f17c62fc2 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2024" + #define SD2_REVISION_NR "2025" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 471d621b7..994147bea 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -792,7 +792,6 @@ UPDATE creature_template SET ScriptName='npc_skorn_whitecloud' WHERE entry=3052; /* NAGRAND */ UPDATE creature_template SET ScriptName='mob_lump' WHERE entry=18351; -UPDATE creature_template SET ScriptName='mob_sunspring_villager' WHERE entry=18240; UPDATE creature_template SET ScriptName='npc_altruis_the_sufferer' WHERE entry=18417; UPDATE creature_template SET ScriptName='npc_greatmother_geyah' WHERE entry=18141; UPDATE creature_template SET ScriptName='npc_lantresor_of_the_blade' WHERE entry=18261; diff --git a/sql/updates/r2025_mangos.sql b/sql/updates/r2025_mangos.sql new file mode 100644 index 000000000..b444b113d --- /dev/null +++ b/sql/updates/r2025_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='' WHERE entry=18240; From 1b25029801169b6396862e974b9aa43788779e88 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Wed, 13 Apr 2011 21:17:23 +0200 Subject: [PATCH 0005/1172] [2026] Cleanup Zul'Gurub Boss Thekal Squashed commit of the following: More Thekal cleanup Thekal - basic cleanup Signed-off-by: Schmoozerd --- .../eastern_kingdoms/zulgurub/boss_thekal.cpp | 387 ++++++++++-------- sd2_revision_nr.h | 2 +- 2 files changed, 218 insertions(+), 171 deletions(-) diff --git a/scripts/eastern_kingdoms/zulgurub/boss_thekal.cpp b/scripts/eastern_kingdoms/zulgurub/boss_thekal.cpp index faf30dcbb..fa6911fff 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_thekal.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_thekal.cpp @@ -24,31 +24,34 @@ EndScriptData */ #include "precompiled.h" #include "zulgurub.h" -#define SAY_AGGRO -1309009 -#define SAY_DEATH -1309010 - -#define SPELL_MORTALCLEAVE 22859 -#define SPELL_SILENCE 23207 -#define SPELL_FRENZY 23342 -#define SPELL_FORCEPUNCH 24189 -#define SPELL_CHARGE 24408 -#define SPELL_ENRAGE 23537 -#define SPELL_SUMMONTIGERS 24183 -#define SPELL_TIGER_FORM 24169 -#define SPELL_RESURRECT 24173 //We will not use this spell. - -//Zealot Lor'Khan Spells -#define SPELL_SHIELD 25020 -#define SPELL_BLOODLUST 24185 -#define SPELL_GREATERHEAL 24208 -#define SPELL_DISARM 22691 - -//Zealot Lor'Khan Spells -#define SPELL_SWEEPINGSTRIKES 18765 -#define SPELL_SINISTERSTRIKE 15667 -#define SPELL_GOUGE 24698 -#define SPELL_KICK 15614 -#define SPELL_BLIND 21060 +enum +{ + SAY_AGGRO = -1309009, + SAY_DEATH = -1309010, + + SPELL_MORTALCLEAVE = 22859, + SPELL_SILENCE = 23207, + SPELL_FRENZY = 23342, + SPELL_FORCEPUNCH = 24189, + SPELL_CHARGE = 24408, + SPELL_ENRAGE = 23537, + SPELL_SUMMONTIGERS = 24183, + SPELL_TIGER_FORM = 24169, + SPELL_RESURRECT = 24173, //We will not use this spell. + + // Zealot Lor'Khan Spells + SPELL_SHIELD = 25020, + SPELL_BLOODLUST = 24185, + SPELL_GREATERHEAL = 24208, + SPELL_DISARM = 22691, + + //Zealot Lor'Khan Spells + SPELL_SWEEPINGSTRIKES = 18765, + SPELL_SINISTERSTRIKE = 15667, + SPELL_GOUGE = 24698, + SPELL_KICK = 15614, + SPELL_BLIND = 21060 +}; struct MANGOS_DLL_DECL boss_thekalAI : public ScriptedAI { @@ -60,43 +63,43 @@ struct MANGOS_DLL_DECL boss_thekalAI : public ScriptedAI ScriptedInstance* m_pInstance; - uint32 MortalCleave_Timer; - uint32 Silence_Timer; - uint32 Frenzy_Timer; - uint32 ForcePunch_Timer; - uint32 Charge_Timer; - uint32 Enrage_Timer; - uint32 SummonTigers_Timer; - uint32 Check_Timer; - uint32 Resurrect_Timer; + uint32 m_uiMortalCleaveTimer; + uint32 m_uiSilenceTimer; + uint32 m_uiFrenzyTimer; + uint32 m_uiForcePunchTimer; + uint32 m_uiChargeTimer; + uint32 m_uiEnrageTimer; + uint32 m_uiSummonTigersTimer; + uint32 m_uiCheckTimer; + uint32 m_uiResurrectTimer; - bool Enraged; - bool PhaseTwo; - bool WasDead; + bool m_bEnraged; + bool m_bPhaseTwo; + bool m_bWasDead; void Reset() { - MortalCleave_Timer = 4000; - Silence_Timer = 9000; - Frenzy_Timer = 30000; - ForcePunch_Timer = 4000; - Charge_Timer = 12000; - Enrage_Timer = 32000; - SummonTigers_Timer = 25000; - Check_Timer = 10000; - Resurrect_Timer = 10000; - - Enraged = false; - PhaseTwo = false; - WasDead = false; + m_uiMortalCleaveTimer = 4000; + m_uiSilenceTimer = 9000; + m_uiFrenzyTimer = 30000; + m_uiForcePunchTimer = 4000; + m_uiChargeTimer = 12000; + m_uiEnrageTimer = 32000; + m_uiSummonTigersTimer = 25000; + m_uiCheckTimer = 10000; + m_uiResurrectTimer = 10000; + + m_bEnraged = false; + m_bPhaseTwo = false; + m_bWasDead = false; } - void Aggro(Unit *who) + void Aggro(Unit* pWho) { DoScriptText(SAY_AGGRO, m_creature); } - void JustDied(Unit* Killer) + void JustDied(Unit* pKiller) { DoScriptText(SAY_DEATH, m_creature); @@ -110,13 +113,13 @@ struct MANGOS_DLL_DECL boss_thekalAI : public ScriptedAI m_pInstance->SetData(TYPE_THEKAL, NOT_STARTED); } - void UpdateAI(const uint32 diff) + void UpdateAI(const uint32 uiDiff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; //Check_Timer for the death of LorKhan and Zath. - if (!WasDead && Check_Timer < diff) + if (!m_bWasDead && m_uiCheckTimer < uiDiff) { if (m_pInstance) { @@ -148,22 +151,28 @@ struct MANGOS_DLL_DECL boss_thekalAI : public ScriptedAI } } } - Check_Timer = 5000; - }else Check_Timer -= diff; + m_uiCheckTimer = 5000; + } + else + m_uiCheckTimer -= uiDiff; - if (!PhaseTwo && MortalCleave_Timer < diff) + if (!m_bPhaseTwo && m_uiMortalCleaveTimer < uiDiff) { DoCastSpellIfCan(m_creature->getVictim(),SPELL_MORTALCLEAVE); - MortalCleave_Timer = urand(15000, 20000); - }else MortalCleave_Timer -= diff; + m_uiMortalCleaveTimer = urand(15000, 20000); + } + else + m_uiMortalCleaveTimer -= uiDiff; - if (!PhaseTwo && Silence_Timer < diff) + if (!m_bPhaseTwo && m_uiSilenceTimer < uiDiff) { DoCastSpellIfCan(m_creature->getVictim(),SPELL_SILENCE); - Silence_Timer = urand(20000, 25000); - }else Silence_Timer -= diff; + m_uiSilenceTimer = urand(20000, 25000); + } + else + m_uiSilenceTimer -= uiDiff; - if (!PhaseTwo && !WasDead && m_creature->GetHealthPercent() < 5.0f) + if (!m_bPhaseTwo && !m_bWasDead && m_creature->GetHealthPercent() < 5.0f) { m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); m_creature->SetStandState(UNIT_STAND_STATE_SLEEP); @@ -172,13 +181,13 @@ struct MANGOS_DLL_DECL boss_thekalAI : public ScriptedAI if (m_pInstance) m_pInstance->SetData(TYPE_THEKAL, SPECIAL); - WasDead = true; + m_bWasDead = true; } //Thekal will transform to Tiger if he died and was not resurrected after 10 seconds. - if (!PhaseTwo && WasDead) + if (!m_bPhaseTwo && m_bWasDead) { - if (Resurrect_Timer < diff) + if (m_uiResurrectTimer < uiDiff) { DoCastSpellIfCan(m_creature,SPELL_TIGER_FORM); m_creature->SetFloatValue(OBJECT_FIELD_SCALE_X, 2.00f); @@ -190,18 +199,20 @@ struct MANGOS_DLL_DECL boss_thekalAI : public ScriptedAI m_creature->SetBaseWeaponDamage(BASE_ATTACK, MAXDAMAGE, (cinfo->maxdmg +((cinfo->maxdmg/100) * 40))); m_creature->UpdateDamagePhysical(BASE_ATTACK); DoResetThreat(); - PhaseTwo = true; - }else Resurrect_Timer -= diff; + m_bPhaseTwo = true; + } + else + m_uiResurrectTimer -= uiDiff; } - if (m_creature->GetHealthPercent() == 100.0f && WasDead) + if (m_creature->GetHealthPercent() == 100.0f && m_bWasDead) { - WasDead = false; + m_bWasDead = false; } - if (PhaseTwo) + if (m_bPhaseTwo) { - if (Charge_Timer < diff) + if (m_uiChargeTimer < uiDiff) { if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) { @@ -209,31 +220,39 @@ struct MANGOS_DLL_DECL boss_thekalAI : public ScriptedAI DoResetThreat(); AttackStart(target); } - Charge_Timer = urand(15000, 22000); - }else Charge_Timer -= diff; + m_uiChargeTimer = urand(15000, 22000); + } + else + m_uiChargeTimer -= uiDiff; - if (Frenzy_Timer < diff) + if (m_uiFrenzyTimer < uiDiff) { DoCastSpellIfCan(m_creature,SPELL_FRENZY); - Frenzy_Timer = 30000; - }else Frenzy_Timer -= diff; + m_uiFrenzyTimer = 30000; + } + else + m_uiFrenzyTimer -= uiDiff; - if (ForcePunch_Timer < diff) + if (m_uiForcePunchTimer < uiDiff) { DoCastSpellIfCan(m_creature->getVictim(),SPELL_SILENCE); - ForcePunch_Timer = urand(16000, 21000); - }else ForcePunch_Timer -= diff; + m_uiForcePunchTimer = urand(16000, 21000); + } + else + m_uiForcePunchTimer -= uiDiff; - if (SummonTigers_Timer < diff) + if (m_uiSummonTigersTimer < uiDiff) { DoCastSpellIfCan(m_creature->getVictim(),SPELL_SUMMONTIGERS); - SummonTigers_Timer = urand(10000, 14000); - }else SummonTigers_Timer -= diff; + m_uiSummonTigersTimer = urand(10000, 14000); + } + else + m_uiSummonTigersTimer -= uiDiff; - if (m_creature->GetHealthPercent() < 11.0f && !Enraged) + if (m_creature->GetHealthPercent() < 11.0f && !m_bEnraged) { DoCastSpellIfCan(m_creature, SPELL_ENRAGE); - Enraged = true; + m_bEnraged = true; } } @@ -242,7 +261,10 @@ struct MANGOS_DLL_DECL boss_thekalAI : public ScriptedAI } }; -//Zealot Lor'Khan +/*###### +## mob_zealot_lorkhan +######*/ + struct MANGOS_DLL_DECL mob_zealot_lorkhanAI : public ScriptedAI { mob_zealot_lorkhanAI(Creature* pCreature) : ScriptedAI(pCreature) @@ -251,25 +273,25 @@ struct MANGOS_DLL_DECL mob_zealot_lorkhanAI : public ScriptedAI Reset(); } - uint32 Shield_Timer; - uint32 BloodLust_Timer; - uint32 GreaterHeal_Timer; - uint32 Disarm_Timer; - uint32 Check_Timer; + ScriptedInstance* m_pInstance; - bool FakeDeath; + uint32 m_uiShieldTimer; + uint32 m_uiBloodLustTimer; + uint32 m_uiGreaterHealTimer; + uint32 m_uiDisarmTimer; + uint32 m_uiCheckTimer; - ScriptedInstance* m_pInstance; + bool m_bFakeDeath; void Reset() { - Shield_Timer = 1000; - BloodLust_Timer = 16000; - GreaterHeal_Timer = 32000; - Disarm_Timer = 6000; - Check_Timer = 10000; + m_uiShieldTimer = 1000; + m_uiBloodLustTimer = 16000; + m_uiGreaterHealTimer = 32000; + m_uiDisarmTimer = 6000; + m_uiCheckTimer = 10000; - FakeDeath = false; + m_bFakeDeath = false; if (m_pInstance) m_pInstance->SetData(TYPE_LORKHAN, NOT_STARTED); @@ -278,28 +300,32 @@ struct MANGOS_DLL_DECL mob_zealot_lorkhanAI : public ScriptedAI m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); } - void UpdateAI (const uint32 diff) + void UpdateAI (const uint32 uiDiff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; //Shield_Timer - if (Shield_Timer < diff) + if (m_uiShieldTimer < uiDiff) { DoCastSpellIfCan(m_creature,SPELL_SHIELD); - Shield_Timer = 61000; - }else Shield_Timer -= diff; + m_uiShieldTimer = 61000; + } + else + m_uiShieldTimer -= uiDiff; //BloodLust_Timer - if (BloodLust_Timer < diff) + if (m_uiBloodLustTimer < uiDiff) { DoCastSpellIfCan(m_creature,SPELL_BLOODLUST); - BloodLust_Timer = urand(20000, 28000); - }else BloodLust_Timer -= diff; + m_uiBloodLustTimer = urand(20000, 28000); + } + else + m_uiBloodLustTimer -= uiDiff; //Casting Greaterheal to Thekal or Zath if they are in meele range. // TODO - why this range check? - if (GreaterHeal_Timer < diff) + if (m_uiGreaterHealTimer < uiDiff) { if (m_pInstance) { @@ -319,18 +345,22 @@ struct MANGOS_DLL_DECL mob_zealot_lorkhanAI : public ScriptedAI } } - GreaterHeal_Timer = urand(15000, 20000); - }else GreaterHeal_Timer -= diff; + m_uiGreaterHealTimer = urand(15000, 20000); + } + else + m_uiGreaterHealTimer -= uiDiff; //Disarm_Timer - if (Disarm_Timer < diff) + if (m_uiDisarmTimer < uiDiff) { DoCastSpellIfCan(m_creature->getVictim(),SPELL_DISARM); - Disarm_Timer = urand(15000, 25000); - }else Disarm_Timer -= diff; + m_uiDisarmTimer = urand(15000, 25000); + } + else + m_uiDisarmTimer -= uiDiff; //Check_Timer for the death of LorKhan and Zath. - if (!FakeDeath && Check_Timer < diff) + if (!m_bFakeDeath && m_uiCheckTimer < uiDiff) { if (m_pInstance) { @@ -359,8 +389,10 @@ struct MANGOS_DLL_DECL mob_zealot_lorkhanAI : public ScriptedAI } } - Check_Timer = 5000; - }else Check_Timer -= diff; + m_uiCheckTimer = 5000; + } + else + m_uiCheckTimer -= uiDiff; if (m_creature->GetHealthPercent() < 5.0f) { @@ -372,15 +404,18 @@ struct MANGOS_DLL_DECL mob_zealot_lorkhanAI : public ScriptedAI if (m_pInstance) m_pInstance->SetData(TYPE_LORKHAN, SPECIAL); - FakeDeath = true; + m_bFakeDeath = true; } - if (!FakeDeath) + if (!m_bFakeDeath) DoMeleeAttackIfReady(); } }; -//Zealot Zath +/*###### +## npc_zealot_zath +######*/ + struct MANGOS_DLL_DECL mob_zealot_zathAI : public ScriptedAI { mob_zealot_zathAI(Creature* pCreature) : ScriptedAI(pCreature) @@ -389,27 +424,27 @@ struct MANGOS_DLL_DECL mob_zealot_zathAI : public ScriptedAI Reset(); } - uint32 SweepingStrikes_Timer; - uint32 SinisterStrike_Timer; - uint32 Gouge_Timer; - uint32 Kick_Timer; - uint32 Blind_Timer; - uint32 Check_Timer; + ScriptedInstance* m_pInstance; - bool FakeDeath; + uint32 m_uiSweepingStrikesTimer; + uint32 m_uiSinisterStrikeTimer; + uint32 m_uiGougeTimer; + uint32 m_uiKickTimer; + uint32 m_uiBlindTimer; + uint32 m_uiCheckTimer; - ScriptedInstance* m_pInstance; + bool m_bFakeDeath; void Reset() { - SweepingStrikes_Timer = 13000; - SinisterStrike_Timer = 8000; - Gouge_Timer = 25000; - Kick_Timer = 18000; - Blind_Timer = 5000; - Check_Timer = 10000; + m_uiSweepingStrikesTimer = 13000; + m_uiSinisterStrikeTimer = 8000; + m_uiGougeTimer = 25000; + m_uiKickTimer = 18000; + m_uiBlindTimer = 5000; + m_uiCheckTimer = 10000; - FakeDeath = false; + m_bFakeDeath = false; if (m_pInstance) m_pInstance->SetData(TYPE_ZATH, NOT_STARTED); @@ -418,52 +453,62 @@ struct MANGOS_DLL_DECL mob_zealot_zathAI : public ScriptedAI m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); } - void UpdateAI (const uint32 diff) + void UpdateAI (const uint32 uiDiff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; //SweepingStrikes_Timer - if (SweepingStrikes_Timer < diff) + if (m_uiSweepingStrikesTimer < uiDiff) { DoCastSpellIfCan(m_creature->getVictim(),SPELL_SWEEPINGSTRIKES); - SweepingStrikes_Timer = urand(22000, 26000); - }else SweepingStrikes_Timer -= diff; + m_uiSweepingStrikesTimer = urand(22000, 26000); + } + else + m_uiSweepingStrikesTimer -= uiDiff; //SinisterStrike_Timer - if (SinisterStrike_Timer < diff) + if (m_uiSinisterStrikeTimer < uiDiff) { DoCastSpellIfCan(m_creature->getVictim(),SPELL_SINISTERSTRIKE); - SinisterStrike_Timer = urand(8000, 16000); - }else SinisterStrike_Timer -= diff; + m_uiSinisterStrikeTimer = urand(8000, 16000); + } + else + m_uiSinisterStrikeTimer -= uiDiff; //Gouge_Timer - if (Gouge_Timer < diff) + if (m_uiGougeTimer < uiDiff) { DoCastSpellIfCan(m_creature->getVictim(),SPELL_GOUGE); if (m_creature->getThreatManager().getThreat(m_creature->getVictim())) m_creature->getThreatManager().modifyThreatPercent(m_creature->getVictim(),-100); - Gouge_Timer = urand(17000, 27000); - }else Gouge_Timer -= diff; + m_uiGougeTimer = urand(17000, 27000); + } + else + m_uiGougeTimer -= uiDiff; //Kick_Timer - if (Kick_Timer < diff) + if (m_uiKickTimer < uiDiff) { DoCastSpellIfCan(m_creature->getVictim(),SPELL_KICK); - Kick_Timer = urand(15000, 25000); - }else Kick_Timer -= diff; + m_uiKickTimer = urand(15000, 25000); + } + else + m_uiKickTimer -= uiDiff; //Blind_Timer - if (Blind_Timer < diff) + if (m_uiBlindTimer < uiDiff) { DoCastSpellIfCan(m_creature->getVictim(),SPELL_BLIND); - Blind_Timer = urand(10000, 20000); - }else Blind_Timer -= diff; + m_uiBlindTimer = urand(10000, 20000); + } + else + m_uiBlindTimer -= uiDiff; //Check_Timer for the death of LorKhan and Zath. - if (!FakeDeath && Check_Timer < diff) + if (!m_bFakeDeath && m_uiCheckTimer < uiDiff) { if (m_pInstance) { @@ -492,8 +537,10 @@ struct MANGOS_DLL_DECL mob_zealot_zathAI : public ScriptedAI } } - Check_Timer = 5000; - }else Check_Timer -= diff; + m_uiCheckTimer = 5000; + } + else + m_uiCheckTimer -= uiDiff; if (m_creature->GetHealthPercent() <= 5.0f) { @@ -505,10 +552,10 @@ struct MANGOS_DLL_DECL mob_zealot_zathAI : public ScriptedAI if (m_pInstance) m_pInstance->SetData(TYPE_ZATH, SPECIAL); - FakeDeath = true; + m_bFakeDeath = true; } - if (!FakeDeath) + if (!m_bFakeDeath) DoMeleeAttackIfReady(); } }; @@ -530,20 +577,20 @@ CreatureAI* GetAI_mob_zealot_zath(Creature* pCreature) void AddSC_boss_thekal() { - Script *newscript; - - newscript = new Script; - newscript->Name = "boss_thekal"; - newscript->GetAI = &GetAI_boss_thekal; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "mob_zealot_lorkhan"; - newscript->GetAI = &GetAI_mob_zealot_lorkhan; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "mob_zealot_zath"; - newscript->GetAI = &GetAI_mob_zealot_zath; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_thekal"; + pNewScript->GetAI = &GetAI_boss_thekal; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "mob_zealot_lorkhan"; + pNewScript->GetAI = &GetAI_mob_zealot_lorkhan; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "mob_zealot_zath"; + pNewScript->GetAI = &GetAI_mob_zealot_zath; + pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index f17c62fc2..a2c72b8b5 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2025" + #define SD2_REVISION_NR "2026" #endif // __SD2_REVISION_NR_H__ From 17ae0f66374400cad5fa8febf485d4ee14e24770 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Wed, 13 Apr 2011 21:19:32 +0200 Subject: [PATCH 0006/1172] [2027] Implement proper Boss Thekal phases Squashed commit of the following: Thekal - Move Death Faking to superclass Thekal - add proper transition between the troll and tiger phases Thekal - add proper resurrection for main boss Thekal - move all spells in the proper phase Thekal - implement basic of encounter phases Thekal - implement resurrect effect - will remove fake death from caster Thekal - add proper resurrect for the two adds * Resurrect spell is cast only on self so each npc will resurrect itself on a timer Thekal - fix spell targets Thekal - set proper fake death state Signed-off-by: Schmoozerd --- .../eastern_kingdoms/zulgurub/boss_thekal.cpp | 740 ++++++++++-------- sd2_revision_nr.h | 2 +- 2 files changed, 414 insertions(+), 328 deletions(-) diff --git a/scripts/eastern_kingdoms/zulgurub/boss_thekal.cpp b/scripts/eastern_kingdoms/zulgurub/boss_thekal.cpp index fa6911fff..bb1ab7e57 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_thekal.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_thekal.cpp @@ -29,33 +29,117 @@ enum SAY_AGGRO = -1309009, SAY_DEATH = -1309010, - SPELL_MORTALCLEAVE = 22859, + SPELL_MORTAL_CLEAVE = 22859, SPELL_SILENCE = 23207, SPELL_FRENZY = 23342, - SPELL_FORCEPUNCH = 24189, + SPELL_FORCE_PUNCH = 24189, SPELL_CHARGE = 24408, SPELL_ENRAGE = 23537, - SPELL_SUMMONTIGERS = 24183, + SPELL_SUMMON_TIGERS = 24183, SPELL_TIGER_FORM = 24169, - SPELL_RESURRECT = 24173, //We will not use this spell. + SPELL_RESURRECT = 24173, // Zealot Lor'Khan Spells SPELL_SHIELD = 25020, SPELL_BLOODLUST = 24185, - SPELL_GREATERHEAL = 24208, + SPELL_GREATER_HEAL = 24208, SPELL_DISARM = 22691, //Zealot Lor'Khan Spells - SPELL_SWEEPINGSTRIKES = 18765, - SPELL_SINISTERSTRIKE = 15667, + SPELL_SWEEPING_STRIKES = 18765, + SPELL_SINISTER_STRIKE = 15667, SPELL_GOUGE = 24698, SPELL_KICK = 15614, - SPELL_BLIND = 21060 + SPELL_BLIND = 21060, + + PHASE_NORMAL = 1, + PHASE_FAKE_DEATH = 2, + PHASE_WAITING = 3, + PHASE_TIGER = 4, +}; + +// abstract base class for faking death +struct MANGOS_DLL_DECL boss_thekalBaseAI : public ScriptedAI +{ + boss_thekalBaseAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_uiPhase = PHASE_NORMAL; + } + + uint8 m_uiPhase; + + virtual void OnFakeingDeath() {} + virtual void OnRevive() {} + + void DamageTaken(Unit* pKiller, uint32& uiDamage) + { + if (uiDamage < m_creature->GetHealth()) + return; + + // Prevent glitch if in fake death + if (m_uiPhase == PHASE_FAKE_DEATH || m_uiPhase == PHASE_WAITING) + { + uiDamage = 0; + return; + } + + // Only init fake in normal phase + if (m_uiPhase != PHASE_NORMAL) + return; + + uiDamage = 0; + + m_creature->InterruptNonMeleeSpells(true); + m_creature->SetHealth(0); + m_creature->StopMoving(); + m_creature->ClearComboPointHolders(); + m_creature->RemoveAllAurasOnDeath(); + m_creature->ModifyAuraState(AURA_STATE_HEALTHLESS_20_PERCENT, false); + m_creature->ModifyAuraState(AURA_STATE_HEALTHLESS_35_PERCENT, false); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + m_creature->ClearAllReactives(); + m_creature->GetMotionMaster()->Clear(); + m_creature->GetMotionMaster()->MoveIdle(); + m_creature->SetStandState(UNIT_STAND_STATE_DEAD); + + m_uiPhase = PHASE_FAKE_DEATH; + + OnFakeingDeath(); + } + + void Revive(bool bOnlyFlags = false) + { + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + m_creature->SetStandState(UNIT_STAND_STATE_STAND); + + if (bOnlyFlags) + return; + + m_creature->SetHealth(m_creature->GetMaxHealth()); + m_uiPhase = PHASE_NORMAL; + + DoResetThreat(); + Reset(); + + // Assume Attack + if (m_creature->getVictim()) + m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); + + OnRevive(); + } + + void PreventRevive() + { + if (m_creature->IsNonMeleeSpellCasted(true)) + m_creature->InterruptNonMeleeSpells(true); + + m_uiPhase = PHASE_WAITING; + } }; -struct MANGOS_DLL_DECL boss_thekalAI : public ScriptedAI +struct MANGOS_DLL_DECL boss_thekalAI : public boss_thekalBaseAI { - boss_thekalAI(Creature* pCreature) : ScriptedAI(pCreature) + boss_thekalAI(Creature* pCreature) : boss_thekalBaseAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); Reset(); @@ -70,12 +154,9 @@ struct MANGOS_DLL_DECL boss_thekalAI : public ScriptedAI uint32 m_uiChargeTimer; uint32 m_uiEnrageTimer; uint32 m_uiSummonTigersTimer; - uint32 m_uiCheckTimer; uint32 m_uiResurrectTimer; bool m_bEnraged; - bool m_bPhaseTwo; - bool m_bWasDead; void Reset() { @@ -86,12 +167,13 @@ struct MANGOS_DLL_DECL boss_thekalAI : public ScriptedAI m_uiChargeTimer = 12000; m_uiEnrageTimer = 32000; m_uiSummonTigersTimer = 25000; - m_uiCheckTimer = 10000; m_uiResurrectTimer = 10000; + m_uiPhase = PHASE_NORMAL; m_bEnraged = false; - m_bPhaseTwo = false; - m_bWasDead = false; + + // remove fake death + Revive(true); } void Aggro(Unit* pWho) @@ -103,14 +185,71 @@ struct MANGOS_DLL_DECL boss_thekalAI : public ScriptedAI { DoScriptText(SAY_DEATH, m_creature); - if (m_pInstance) - m_pInstance->SetData(TYPE_THEKAL, DONE); + if (!m_pInstance) + return; + + m_pInstance->SetData(TYPE_THEKAL, DONE); + + // remove the two adds + if (Creature* pZath = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(NPC_ZATH))) + pZath->ForcedDespawn(); + if (Creature* pLorkhan = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(NPC_LORKHAN))) + pLorkhan->ForcedDespawn(); } void JustReachedHome() { if (m_pInstance) - m_pInstance->SetData(TYPE_THEKAL, NOT_STARTED); + m_pInstance->SetData(TYPE_THEKAL, FAIL); + } + + // Only call in context where m_pInstance is valid + bool CanPreventAddsResurrect() + { + // If any add is alive, return false + if (m_pInstance->GetData(TYPE_ZATH) != SPECIAL || m_pInstance->GetData(TYPE_LORKHAN) != SPECIAL) + return false; + + // Else Prevent them Resurrecting + if (Creature* pLorkhan = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(NPC_LORKHAN))) + { + if (boss_thekalBaseAI* pFakerAI = dynamic_cast(pLorkhan->AI())) + pFakerAI->PreventRevive(); + } + Creature* pZath = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(NPC_ZATH)); + { + if (boss_thekalBaseAI* pFakerAI = dynamic_cast(pZath->AI())) + pFakerAI->PreventRevive(); + } + + return true; + } + + void OnFakeingDeath() + { + m_uiResurrectTimer = 10000; + + if (m_pInstance) + { + m_pInstance->SetData(TYPE_THEKAL, SPECIAL); + + // If both Adds are already dead, don't wait 10 seconds + if (CanPreventAddsResurrect()) + m_uiResurrectTimer = 1000; + } + } + + void OnRevive() + { + if (!m_pInstance) + return; + + // Both Adds are 'dead' enter tiger phase + if (CanPreventAddsResurrect()) + { + DoCastSpellIfCan(m_creature, SPELL_TIGER_FORM, CAST_TRIGGERED); + m_uiPhase = PHASE_TIGER; + } } void UpdateAI(const uint32 uiDiff) @@ -118,146 +257,99 @@ struct MANGOS_DLL_DECL boss_thekalAI : public ScriptedAI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - //Check_Timer for the death of LorKhan and Zath. - if (!m_bWasDead && m_uiCheckTimer < uiDiff) + switch (m_uiPhase) { - if (m_pInstance) - { - if (m_pInstance->GetData(TYPE_LORKHAN) == SPECIAL) + case PHASE_FAKE_DEATH: + if (m_uiResurrectTimer < uiDiff) { - //Resurrect LorKhan - if (Creature *pLorKhan = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(NPC_LORKHAN))) - { - pLorKhan->SetStandState(UNIT_STAND_STATE_STAND); - pLorKhan->setFaction(14); - pLorKhan->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - pLorKhan->SetHealth(int(pLorKhan->GetMaxHealth()*1.0)); + // resurrect him in any case + DoCastSpellIfCan(m_creature, SPELL_RESURRECT); - m_pInstance->SetData(TYPE_LORKHAN, DONE); + m_uiPhase = PHASE_WAITING; + if (m_pInstance) + { + CanPreventAddsResurrect(); + m_pInstance->SetData(TYPE_THEKAL, IN_PROGRESS); } } + else + m_uiResurrectTimer -= uiDiff; - if (m_pInstance->GetData(TYPE_ZATH) == SPECIAL) + // No break needed here + case PHASE_WAITING: + return; + + case PHASE_NORMAL: + if (m_uiMortalCleaveTimer < uiDiff) { - //Resurrect Zath - if (Creature *pZath = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(NPC_ZATH))) - { - pZath->SetStandState(UNIT_STAND_STATE_STAND); - pZath->setFaction(14); - pZath->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - pZath->SetHealth(int(pZath->GetMaxHealth()*1.0)); + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_MORTAL_CLEAVE) == CAST_OK) + m_uiMortalCleaveTimer = urand(15000, 20000); + } + else + m_uiMortalCleaveTimer -= uiDiff; - m_pInstance->SetData(TYPE_ZATH, DONE); + if (m_uiSilenceTimer < uiDiff) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, SPELL_SILENCE) == CAST_OK) + m_uiSilenceTimer = urand(20000, 25000); } } - } - m_uiCheckTimer = 5000; - } - else - m_uiCheckTimer -= uiDiff; - - if (!m_bPhaseTwo && m_uiMortalCleaveTimer < uiDiff) - { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_MORTALCLEAVE); - m_uiMortalCleaveTimer = urand(15000, 20000); - } - else - m_uiMortalCleaveTimer -= uiDiff; + else + m_uiSilenceTimer -= uiDiff; - if (!m_bPhaseTwo && m_uiSilenceTimer < uiDiff) - { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_SILENCE); - m_uiSilenceTimer = urand(20000, 25000); - } - else - m_uiSilenceTimer -= uiDiff; - - if (!m_bPhaseTwo && !m_bWasDead && m_creature->GetHealthPercent() < 5.0f) - { - m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - m_creature->SetStandState(UNIT_STAND_STATE_SLEEP); - m_creature->AttackStop(); - - if (m_pInstance) - m_pInstance->SetData(TYPE_THEKAL, SPECIAL); + break; + case PHASE_TIGER: + if (m_uiChargeTimer < uiDiff) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, SPELL_CHARGE) == CAST_OK) + { + DoResetThreat(); + AttackStart(pTarget); + m_uiChargeTimer = urand(15000, 22000); + } + } + } + else + m_uiChargeTimer -= uiDiff; - m_bWasDead = true; - } + if (m_uiFrenzyTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_FRENZY) == CAST_OK) + m_uiFrenzyTimer = 30000; + } + else + m_uiFrenzyTimer -= uiDiff; - //Thekal will transform to Tiger if he died and was not resurrected after 10 seconds. - if (!m_bPhaseTwo && m_bWasDead) - { - if (m_uiResurrectTimer < uiDiff) - { - DoCastSpellIfCan(m_creature,SPELL_TIGER_FORM); - m_creature->SetFloatValue(OBJECT_FIELD_SCALE_X, 2.00f); - m_creature->SetStandState(UNIT_STAND_STATE_STAND); - m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - m_creature->SetHealth(int(m_creature->GetMaxHealth()*1.0)); - const CreatureInfo *cinfo = m_creature->GetCreatureInfo(); - m_creature->SetBaseWeaponDamage(BASE_ATTACK, MINDAMAGE, (cinfo->mindmg +((cinfo->mindmg/100) * 40))); - m_creature->SetBaseWeaponDamage(BASE_ATTACK, MAXDAMAGE, (cinfo->maxdmg +((cinfo->maxdmg/100) * 40))); - m_creature->UpdateDamagePhysical(BASE_ATTACK); - DoResetThreat(); - m_bPhaseTwo = true; - } - else - m_uiResurrectTimer -= uiDiff; - } + if (m_uiForcePunchTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_FORCE_PUNCH) == CAST_OK) + m_uiForcePunchTimer = urand(16000, 21000); + } + else + m_uiForcePunchTimer -= uiDiff; - if (m_creature->GetHealthPercent() == 100.0f && m_bWasDead) - { - m_bWasDead = false; - } + if (m_uiSummonTigersTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_SUMMON_TIGERS) == CAST_OK) + m_uiSummonTigersTimer = urand(10000, 14000); + } + else + m_uiSummonTigersTimer -= uiDiff; - if (m_bPhaseTwo) - { - if (m_uiChargeTimer < uiDiff) - { - if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) + if (!m_bEnraged && m_creature->GetHealthPercent() < 11.0f) { - DoCastSpellIfCan(target,SPELL_CHARGE); - DoResetThreat(); - AttackStart(target); + if (DoCastSpellIfCan(m_creature, SPELL_ENRAGE) == CAST_OK) + m_bEnraged = true; } - m_uiChargeTimer = urand(15000, 22000); - } - else - m_uiChargeTimer -= uiDiff; - - if (m_uiFrenzyTimer < uiDiff) - { - DoCastSpellIfCan(m_creature,SPELL_FRENZY); - m_uiFrenzyTimer = 30000; - } - else - m_uiFrenzyTimer -= uiDiff; - - if (m_uiForcePunchTimer < uiDiff) - { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_SILENCE); - m_uiForcePunchTimer = urand(16000, 21000); - } - else - m_uiForcePunchTimer -= uiDiff; - - if (m_uiSummonTigersTimer < uiDiff) - { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_SUMMONTIGERS); - m_uiSummonTigersTimer = urand(10000, 14000); - } - else - m_uiSummonTigersTimer -= uiDiff; - - if (m_creature->GetHealthPercent() < 11.0f && !m_bEnraged) - { - DoCastSpellIfCan(m_creature, SPELL_ENRAGE); - m_bEnraged = true; - } + + break; } - if (m_creature->getVictim()) // TODO - use correct check here, this only prevents crash - DoMeleeAttackIfReady(); + DoMeleeAttackIfReady(); } }; @@ -265,9 +357,9 @@ struct MANGOS_DLL_DECL boss_thekalAI : public ScriptedAI ## mob_zealot_lorkhan ######*/ -struct MANGOS_DLL_DECL mob_zealot_lorkhanAI : public ScriptedAI +struct MANGOS_DLL_DECL mob_zealot_lorkhanAI : public boss_thekalBaseAI { - mob_zealot_lorkhanAI(Creature* pCreature) : ScriptedAI(pCreature) + mob_zealot_lorkhanAI(Creature* pCreature) : boss_thekalBaseAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); Reset(); @@ -279,9 +371,7 @@ struct MANGOS_DLL_DECL mob_zealot_lorkhanAI : public ScriptedAI uint32 m_uiBloodLustTimer; uint32 m_uiGreaterHealTimer; uint32 m_uiDisarmTimer; - uint32 m_uiCheckTimer; - - bool m_bFakeDeath; + uint32 m_uiResurrectTimer; void Reset() { @@ -289,15 +379,26 @@ struct MANGOS_DLL_DECL mob_zealot_lorkhanAI : public ScriptedAI m_uiBloodLustTimer = 16000; m_uiGreaterHealTimer = 32000; m_uiDisarmTimer = 6000; - m_uiCheckTimer = 10000; - - m_bFakeDeath = false; + m_uiPhase = PHASE_NORMAL; if (m_pInstance) m_pInstance->SetData(TYPE_LORKHAN, NOT_STARTED); - m_creature->SetStandState(UNIT_STAND_STATE_STAND); - m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + Revive(true); + } + + void Aggro(Unit* pWho) + { + if (m_pInstance) + m_pInstance->SetData(TYPE_LORKHAN, IN_PROGRESS); + } + + void OnFakeingDeath() + { + m_uiResurrectTimer = 10000; + + if (m_pInstance) + m_pInstance->SetData(TYPE_LORKHAN, SPECIAL); } void UpdateAI (const uint32 uiDiff) @@ -305,110 +406,89 @@ struct MANGOS_DLL_DECL mob_zealot_lorkhanAI : public ScriptedAI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - //Shield_Timer - if (m_uiShieldTimer < uiDiff) - { - DoCastSpellIfCan(m_creature,SPELL_SHIELD); - m_uiShieldTimer = 61000; - } - else - m_uiShieldTimer -= uiDiff; - - //BloodLust_Timer - if (m_uiBloodLustTimer < uiDiff) + switch (m_uiPhase) { - DoCastSpellIfCan(m_creature,SPELL_BLOODLUST); - m_uiBloodLustTimer = urand(20000, 28000); - } - else - m_uiBloodLustTimer -= uiDiff; + case PHASE_FAKE_DEATH: + if (m_uiResurrectTimer < uiDiff) + { + if (!m_pInstance) + return; - //Casting Greaterheal to Thekal or Zath if they are in meele range. - // TODO - why this range check? - if (m_uiGreaterHealTimer < uiDiff) - { - if (m_pInstance) - { - Creature* pThekal = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(NPC_THEKAL)); - Creature* pZath = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(NPC_ZATH)); + if (m_pInstance->GetData(TYPE_THEKAL) != SPECIAL || m_pInstance->GetData(TYPE_ZATH) != SPECIAL) + { + DoCastSpellIfCan(m_creature, SPELL_RESURRECT); + m_pInstance->SetData(TYPE_LORKHAN, IN_PROGRESS); + } - switch(urand(0, 1)) - { - case 0: - if (pThekal && m_creature->IsWithinDistInMap(pThekal, ATTACK_DISTANCE)) - DoCastSpellIfCan(pThekal, SPELL_GREATERHEAL); - break; - case 1: - if (pZath && m_creature->IsWithinDistInMap(pZath, ATTACK_DISTANCE)) - DoCastSpellIfCan(pZath, SPELL_GREATERHEAL); - break; + m_uiPhase = PHASE_WAITING; } - } + else + m_uiResurrectTimer -= uiDiff; - m_uiGreaterHealTimer = urand(15000, 20000); - } - else - m_uiGreaterHealTimer -= uiDiff; + // no break needed here + case PHASE_WAITING: + return; - //Disarm_Timer - if (m_uiDisarmTimer < uiDiff) - { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_DISARM); - m_uiDisarmTimer = urand(15000, 25000); - } - else - m_uiDisarmTimer -= uiDiff; + case PHASE_NORMAL: + // Shield_Timer + if (m_uiShieldTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_SHIELD) == CAST_OK) + m_uiShieldTimer = 61000; + } + else + m_uiShieldTimer -= uiDiff; - //Check_Timer for the death of LorKhan and Zath. - if (!m_bFakeDeath && m_uiCheckTimer < uiDiff) - { - if (m_pInstance) - { - if (m_pInstance->GetData(TYPE_THEKAL) == SPECIAL) + // BloodLust_Timer + if (m_uiBloodLustTimer < uiDiff) { - //Resurrect Thekal - if (Creature* pThekal = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(NPC_THEKAL))) - { - pThekal->SetStandState(UNIT_STAND_STATE_STAND); - pThekal->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - pThekal->setFaction(14); - pThekal->SetHealth(int(pThekal->GetMaxHealth()*1.0)); - } + // ToDo: research if this should be cast on Thekal or Zath + if (DoCastSpellIfCan(m_creature, SPELL_BLOODLUST) == CAST_OK) + m_uiBloodLustTimer = urand(20000, 28000); } + else + m_uiBloodLustTimer -= uiDiff; - if (m_pInstance->GetData(TYPE_ZATH) == SPECIAL) + // Casting Greaterheal to Thekal or Zath if they are in meele range. + // TODO - why this range check? + if (m_uiGreaterHealTimer < uiDiff) { - //Resurrect Zath - if (Creature* pZath = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(NPC_ZATH))) + if (m_pInstance) { - pZath->SetStandState(UNIT_STAND_STATE_STAND); - pZath->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - pZath->setFaction(14); - pZath->SetHealth(int(pZath->GetMaxHealth()*1.0)); + Creature* pThekal = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(NPC_THEKAL)); + Creature* pZath = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(NPC_ZATH)); + + switch(urand(0, 1)) + { + case 0: + if (pThekal && m_creature->IsWithinDistInMap(pThekal, 3*ATTACK_DISTANCE)) + DoCastSpellIfCan(pThekal, SPELL_GREATER_HEAL); + break; + case 1: + if (pZath && m_creature->IsWithinDistInMap(pZath, 3*ATTACK_DISTANCE)) + DoCastSpellIfCan(pZath, SPELL_GREATER_HEAL); + break; + } } - } - } - - m_uiCheckTimer = 5000; - } - else - m_uiCheckTimer -= uiDiff; - if (m_creature->GetHealthPercent() < 5.0f) - { - m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - m_creature->SetStandState(UNIT_STAND_STATE_SLEEP); - m_creature->setFaction(35); - m_creature->AttackStop(); + m_uiGreaterHealTimer = urand(15000, 20000); + } + else + m_uiGreaterHealTimer -= uiDiff; - if (m_pInstance) - m_pInstance->SetData(TYPE_LORKHAN, SPECIAL); + // Disarm_Timer + if (m_uiDisarmTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_DISARM) == CAST_OK) + m_uiDisarmTimer = urand(15000, 25000); + } + else + m_uiDisarmTimer -= uiDiff; - m_bFakeDeath = true; + break; } - if (!m_bFakeDeath) - DoMeleeAttackIfReady(); + DoMeleeAttackIfReady(); } }; @@ -416,9 +496,9 @@ struct MANGOS_DLL_DECL mob_zealot_lorkhanAI : public ScriptedAI ## npc_zealot_zath ######*/ -struct MANGOS_DLL_DECL mob_zealot_zathAI : public ScriptedAI +struct MANGOS_DLL_DECL mob_zealot_zathAI : public boss_thekalBaseAI { - mob_zealot_zathAI(Creature* pCreature) : ScriptedAI(pCreature) + mob_zealot_zathAI(Creature* pCreature) : boss_thekalBaseAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); Reset(); @@ -431,9 +511,7 @@ struct MANGOS_DLL_DECL mob_zealot_zathAI : public ScriptedAI uint32 m_uiGougeTimer; uint32 m_uiKickTimer; uint32 m_uiBlindTimer; - uint32 m_uiCheckTimer; - - bool m_bFakeDeath; + uint32 m_uiResurrectTimer; void Reset() { @@ -442,15 +520,26 @@ struct MANGOS_DLL_DECL mob_zealot_zathAI : public ScriptedAI m_uiGougeTimer = 25000; m_uiKickTimer = 18000; m_uiBlindTimer = 5000; - m_uiCheckTimer = 10000; - - m_bFakeDeath = false; + m_uiPhase = PHASE_NORMAL; if (m_pInstance) m_pInstance->SetData(TYPE_ZATH, NOT_STARTED); - m_creature->SetStandState(UNIT_STAND_STATE_STAND); - m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + Revive(true); + } + + void Aggro(Unit* pWho) + { + if (m_pInstance) + m_pInstance->SetData(TYPE_ZATH, IN_PROGRESS); + } + + void OnFakeingDeath() + { + m_uiResurrectTimer = 10000; + + if (m_pInstance) + m_pInstance->SetData(TYPE_ZATH, SPECIAL); } void UpdateAI (const uint32 uiDiff) @@ -458,108 +547,102 @@ struct MANGOS_DLL_DECL mob_zealot_zathAI : public ScriptedAI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - //SweepingStrikes_Timer - if (m_uiSweepingStrikesTimer < uiDiff) + switch (m_uiPhase) { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_SWEEPINGSTRIKES); - m_uiSweepingStrikesTimer = urand(22000, 26000); - } - else - m_uiSweepingStrikesTimer -= uiDiff; - - //SinisterStrike_Timer - if (m_uiSinisterStrikeTimer < uiDiff) - { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_SINISTERSTRIKE); - m_uiSinisterStrikeTimer = urand(8000, 16000); - } - else - m_uiSinisterStrikeTimer -= uiDiff; + case PHASE_FAKE_DEATH: + if (m_uiResurrectTimer < uiDiff) + { + if (!m_pInstance) + return; - //Gouge_Timer - if (m_uiGougeTimer < uiDiff) - { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_GOUGE); + if (m_pInstance->GetData(TYPE_THEKAL) != SPECIAL || m_pInstance->GetData(TYPE_LORKHAN) != SPECIAL) + { + DoCastSpellIfCan(m_creature, SPELL_RESURRECT); + m_pInstance->SetData(TYPE_ZATH, IN_PROGRESS); + } - if (m_creature->getThreatManager().getThreat(m_creature->getVictim())) - m_creature->getThreatManager().modifyThreatPercent(m_creature->getVictim(),-100); + m_uiPhase = PHASE_WAITING; + } + else + m_uiResurrectTimer -= uiDiff; - m_uiGougeTimer = urand(17000, 27000); - } - else - m_uiGougeTimer -= uiDiff; + // no break needed here + case PHASE_WAITING: + return; - //Kick_Timer - if (m_uiKickTimer < uiDiff) - { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_KICK); - m_uiKickTimer = urand(15000, 25000); - } - else - m_uiKickTimer -= uiDiff; - - //Blind_Timer - if (m_uiBlindTimer < uiDiff) - { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_BLIND); - m_uiBlindTimer = urand(10000, 20000); - } - else - m_uiBlindTimer -= uiDiff; + case PHASE_NORMAL: + // SweepingStrikes_Timer + if (m_uiSweepingStrikesTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_SWEEPING_STRIKES) == CAST_OK) + m_uiSweepingStrikesTimer = urand(22000, 26000); + } + else + m_uiSweepingStrikesTimer -= uiDiff; - //Check_Timer for the death of LorKhan and Zath. - if (!m_bFakeDeath && m_uiCheckTimer < uiDiff) - { - if (m_pInstance) - { - if (m_pInstance->GetData(TYPE_LORKHAN) == SPECIAL) + // SinisterStrike_Timer + if (m_uiSinisterStrikeTimer < uiDiff) { - //Resurrect LorKhan - if (Creature* pLorKhan = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(NPC_LORKHAN))) - { - pLorKhan->SetStandState(UNIT_STAND_STATE_STAND); - pLorKhan->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - pLorKhan->setFaction(14); - pLorKhan->SetHealth(int(pLorKhan->GetMaxHealth()*1.0)); - } + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_SINISTER_STRIKE) == CAST_OK) + m_uiSinisterStrikeTimer = urand(8000, 16000); } + else + m_uiSinisterStrikeTimer -= uiDiff; - if (m_pInstance->GetData(TYPE_THEKAL) == SPECIAL) + // Gouge_Timer + if (m_uiGougeTimer < uiDiff) { - //Resurrect Thekal - if (Creature* pThekal = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(NPC_THEKAL))) + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_GOUGE) == CAST_OK) { - pThekal->SetStandState(UNIT_STAND_STATE_STAND); - pThekal->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - pThekal->setFaction(14); - pThekal->SetHealth(int(pThekal->GetMaxHealth()*1.0)); + if (m_creature->getThreatManager().getThreat(m_creature->getVictim())) + m_creature->getThreatManager().modifyThreatPercent(m_creature->getVictim(),-100); + + m_uiGougeTimer = urand(17000, 27000); } } - } + else + m_uiGougeTimer -= uiDiff; - m_uiCheckTimer = 5000; - } - else - m_uiCheckTimer -= uiDiff; - - if (m_creature->GetHealthPercent() <= 5.0f) - { - m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - m_creature->SetStandState(UNIT_STAND_STATE_SLEEP); - m_creature->setFaction(35); - m_creature->AttackStop(); + // Kick_Timer + if (m_uiKickTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_KICK) == CAST_OK) + m_uiKickTimer = urand(15000, 25000); + } + else + m_uiKickTimer -= uiDiff; - if (m_pInstance) - m_pInstance->SetData(TYPE_ZATH, SPECIAL); + // Blind_Timer + if (m_uiBlindTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_BLIND) == CAST_OK) + m_uiBlindTimer = urand(10000, 20000); + } + else + m_uiBlindTimer -= uiDiff; - m_bFakeDeath = true; + break; } - if (!m_bFakeDeath) - DoMeleeAttackIfReady(); + DoMeleeAttackIfReady(); } }; +bool EffectDummyCreature_thekal_resurrection(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) +{ + //always check spellid and effectindex + if (uiSpellId == SPELL_RESURRECT && uiEffIndex == EFFECT_INDEX_0) + { + if (boss_thekalBaseAI* pFakerAI = dynamic_cast(pCreatureTarget->AI())) + pFakerAI->Revive(); + + //always return true when we are handling this spell and effect + return true; + } + + return false; +} + CreatureAI* GetAI_boss_thekal(Creature* pCreature) { return new boss_thekalAI(pCreature); @@ -582,15 +665,18 @@ void AddSC_boss_thekal() pNewScript = new Script; pNewScript->Name = "boss_thekal"; pNewScript->GetAI = &GetAI_boss_thekal; + pNewScript->pEffectDummyNPC = &EffectDummyCreature_thekal_resurrection; pNewScript->RegisterSelf(); pNewScript = new Script; pNewScript->Name = "mob_zealot_lorkhan"; pNewScript->GetAI = &GetAI_mob_zealot_lorkhan; + pNewScript->pEffectDummyNPC = &EffectDummyCreature_thekal_resurrection; pNewScript->RegisterSelf(); pNewScript = new Script; pNewScript->Name = "mob_zealot_zath"; pNewScript->GetAI = &GetAI_mob_zealot_zath; + pNewScript->pEffectDummyNPC = &EffectDummyCreature_thekal_resurrection; pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index a2c72b8b5..541ef1bf3 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2026" + #define SD2_REVISION_NR "2027" #endif // __SD2_REVISION_NR_H__ From 15d20070e626c9eab611f1e236823be11b36041d Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Fri, 15 Apr 2011 13:13:02 +0200 Subject: [PATCH 0007/1172] [2028] Improve Boss Sapphiron * Fix Emote types * Fix many spell targeting issues * Improve Encounter handling * Implement proper phase-switching * Implement melee-ability spells (thanks to ckegg for original work) * Add heroic spell entries where needed * Fix Berserker Timer - Thanks to luxus for pointing * Generic Cleanup * Add some TODO points for spells that need core support Signed-off-by: Schmoozerd --- .../northrend/naxxramas/boss_sapphiron.cpp | 328 ++++++++++++------ sd2_revision_nr.h | 2 +- sql/scriptdev2_script_full.sql | 4 +- sql/updates/r2028_scriptdev2.sql | 1 + 4 files changed, 223 insertions(+), 112 deletions(-) create mode 100644 sql/updates/r2028_scriptdev2.sql diff --git a/scripts/northrend/naxxramas/boss_sapphiron.cpp b/scripts/northrend/naxxramas/boss_sapphiron.cpp index 28d3e1ee3..c068f2f41 100644 --- a/scripts/northrend/naxxramas/boss_sapphiron.cpp +++ b/scripts/northrend/naxxramas/boss_sapphiron.cpp @@ -16,11 +16,26 @@ /* ScriptData SDName: Boss_Sapphiron -SD%Complete: 0 -SDComment: Place Holder +SD%Complete: 80 +SDComment: Havy-Snow-Storms need proper handling, Some spells need core implementation, Hover is currently hacked SDCategory: Naxxramas EndScriptData */ +/* Additional comments: + * Bugged spells: 28560 (needs maxTarget = 1, Summon of 16474 implementation, TODO, how long?) + * 28526 (needs ScriptEffect to cast 28522 onto random target) + * + * Blizzard might need handling for their movement + * SetHover hackz must be replaced by proper opcodes 04D3(Liftoff) 04D4(Landing) + * Achievement-criteria check needs implementation + * + * Frost-Breath ability: the dummy spell 30101 is self cast, so it won't take the needed delay of ~7s until it reaches its target + * As Sapphiron is displayed visually in hight (hovering), and the spell is cast with target=self-location + * which is still on the ground, the client shows a nice slow falling of the visual animation + * Insisting on using the Dummy-Effect to cast the breath-dmg spells, would require, to relocate Sapphi internally, + * and to hack the targeting to be "on the ground" - Hence the prefered way as it is now! + */ + #include "precompiled.h" #include "naxxramas.h" @@ -28,15 +43,38 @@ enum { EMOTE_BREATH = -1533082, EMOTE_GENERIC_ENRAGED = -1000003, - EMOTE_FLY = -1533022, // NYI - EMOTE_GROUND = -1533083, // NYI + EMOTE_FLY = -1533022, + EMOTE_GROUND = -1533083, - SPELL_ICEBOLT = 28522, - SPELL_FROST_BREATH = 29318, + SPELL_CLEAVE = 19983, + SPELL_TAIL_SWEEP = 55697, + SPELL_TAIL_SWEEP_H = 55696, + SPELL_ICEBOLT = 28526, + SPELL_FROST_BREATH_DUMMY = 30101, + SPELL_FROST_BREATH_A = 28524, + SPELL_FROST_BREATH_B = 29318, SPELL_FROST_AURA = 28531, + SPELL_FROST_AURA_H = 55799, SPELL_LIFE_DRAIN = 28542, - SPELL_BLIZZARD = 28547, - SPELL_BESERK = 26662 + SPELL_LIFE_DRAIN_H = 55665, + SPELL_CHILL = 28547, + SPELL_CHILL_H = 55699, + SPELL_SUMMON_BLIZZARD = 28560, + SPELL_BESERK = 26662, + SPELL_ACHIEVEMENT_CHECK = 60539, // unused + + NPC_YOU_KNOW_WHO = 16474, +}; + +static const float aLiftOffPosition[3] = {3522.386f, -5236.784f, 137.709f}; + +enum Phases +{ + PHASE_GROUND = 1, + PHASE_LIFT_OFF = 2, + PHASE_AIR_BOLTS = 3, + PHASE_AIR_BREATH = 4, + PHASE_LANDING = 5, }; struct MANGOS_DLL_DECL boss_sapphironAI : public ScriptedAI @@ -51,37 +89,41 @@ struct MANGOS_DLL_DECL boss_sapphironAI : public ScriptedAI instance_naxxramas* m_pInstance; bool m_bIsRegularMode; - uint32 Icebolt_Count; - uint32 Icebolt_Timer; - uint32 FrostBreath_Timer; - uint32 FrostAura_Timer; - uint32 LifeDrain_Timer; - uint32 Blizzard_Timer; - uint32 Fly_Timer; - uint32 Beserk_Timer; - uint32 phase; - bool landoff; - uint32 land_Timer; + uint32 m_uiCleaveTimer; + uint32 m_uiTailSweepTimer; + uint32 m_uiIceboltTimer; + uint32 m_uiFrostBreathTimer; + uint32 m_uiLifeDrainTimer; + uint32 m_uiBlizzardTimer; + uint32 m_uiFlyTimer; + uint32 m_uiBerserkTimer; + uint32 m_uiLandTimer; + + uint32 m_uiIceboltCount; + Phases m_Phase; void Reset() { - FrostAura_Timer = 2000; - FrostBreath_Timer = 2500; - LifeDrain_Timer = 24000; - Blizzard_Timer = 20000; - Fly_Timer = 45000; - Icebolt_Timer = 4000; - land_Timer = 2000; - Beserk_Timer = 0; - phase = 1; - Icebolt_Count = 0; - landoff = false; + m_uiCleaveTimer = 5000; + m_uiTailSweepTimer = 12000; + m_uiFrostBreathTimer = 7000; + m_uiLifeDrainTimer = 11000; + m_uiBlizzardTimer = 15000; // "Once the encounter starts,based on your version of Naxx, this will be used x2 for normal and x6 on HC" + m_uiFlyTimer = 46000; + m_uiIceboltTimer = 5000; + m_uiLandTimer = 0; + m_uiBerserkTimer = 15 * MINUTE * IN_MILLISECONDS; + m_Phase = PHASE_GROUND; + m_uiIceboltCount = 0; + SetCombatMovement(true); //m_creature->ApplySpellMod(SPELL_FROST_AURA, SPELLMOD_DURATION, -1); } void Aggro(Unit* pWho) { + DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_FROST_AURA : SPELL_FROST_AURA_H); + if (m_pInstance) m_pInstance->SetData(TYPE_SAPPHIRON, IN_PROGRESS); } @@ -98,105 +140,172 @@ struct MANGOS_DLL_DECL boss_sapphironAI : public ScriptedAI m_pInstance->SetData(TYPE_SAPPHIRON, FAIL); } + void MovementInform(uint32 uiType, uint32 uiPointId) + { + if (uiType == POINT_MOTION_TYPE && m_Phase == PHASE_LIFT_OFF) + { + DoScriptText(EMOTE_FLY, m_creature); + m_creature->HandleEmote(EMOTE_ONESHOT_LIFTOFF); + m_creature->SetHover(true); + m_Phase = PHASE_AIR_BOLTS; + + m_uiFrostBreathTimer = 5000; + m_uiIceboltTimer = 5000; + m_uiIceboltCount = 0; + } + } + void UpdateAI(const uint32 uiDiff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - if (phase == 1) + switch (m_Phase) { - if (FrostAura_Timer < uiDiff) - { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_FROST_AURA); - FrostAura_Timer = 5000; - }else FrostAura_Timer -= uiDiff; + case PHASE_GROUND: + if (m_uiCleaveTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_CLEAVE) == CAST_OK) + m_uiCleaveTimer = urand(5000, 10000); + } + else + m_uiCleaveTimer -= uiDiff; - if (LifeDrain_Timer < uiDiff) - { - if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) - DoCastSpellIfCan(target,SPELL_LIFE_DRAIN); + if (m_uiTailSweepTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_TAIL_SWEEP : SPELL_TAIL_SWEEP) == CAST_OK) + m_uiTailSweepTimer = urand(7000, 10000); + } + else + m_uiTailSweepTimer -= uiDiff; - LifeDrain_Timer = 24000; - }else LifeDrain_Timer -= uiDiff; + if (m_uiLifeDrainTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_LIFE_DRAIN : SPELL_LIFE_DRAIN_H) == CAST_OK) + m_uiLifeDrainTimer = 23000; + } + else + m_uiLifeDrainTimer -= uiDiff; - if (Blizzard_Timer < uiDiff) - { - if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) - DoCastSpellIfCan(target,SPELL_BLIZZARD); + if (m_uiBlizzardTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_SUMMON_BLIZZARD) == CAST_OK) + m_uiBlizzardTimer = 20000; + } + else + m_uiBlizzardTimer -= uiDiff; + + if (m_creature->GetHealthPercent() > 10.0f) + { + if (m_uiFlyTimer < uiDiff) + { + m_Phase = PHASE_LIFT_OFF; + m_creature->InterruptNonMeleeSpells(false); + SetCombatMovement(false); + m_creature->GetMotionMaster()->Clear(false); + m_creature->GetMotionMaster()->MovePoint(1, aLiftOffPosition[0], aLiftOffPosition[1], aLiftOffPosition[2]); + // TODO This should clear the target, too - Blizzard_Timer = 20000; - }else Blizzard_Timer -= uiDiff; + return; + } + else + m_uiFlyTimer -= uiDiff; + } - if (m_creature->GetHealthPercent() > 10.0f) - { - if (Fly_Timer < uiDiff) + // Only Phase in which we have melee attack! + DoMeleeAttackIfReady(); + break; + case PHASE_LIFT_OFF: + break; + case PHASE_AIR_BOLTS: + // WOTLK Changed, originally was 5 + if (m_uiIceboltCount == (m_bIsRegularMode ? 2 : 3)) { - phase = 2; - m_creature->InterruptNonMeleeSpells(false); - m_creature->HandleEmote(EMOTE_ONESHOT_LIFTOFF); - m_creature->GetMotionMaster()->Clear(false); - m_creature->GetMotionMaster()->MoveIdle(); - DoCastSpellIfCan(m_creature,11010); - m_creature->SetHover(true); - DoCastSpellIfCan(m_creature,18430); - Icebolt_Timer = 4000; - Icebolt_Count = 0; - landoff = false; - }else Fly_Timer -= uiDiff; - } - } + if (m_uiFrostBreathTimer < uiDiff) + { + m_Phase = PHASE_AIR_BREATH; + DoScriptText(EMOTE_BREATH, m_creature); + DoCastSpellIfCan(m_creature, SPELL_FROST_BREATH_DUMMY); + m_uiFrostBreathTimer = 7000; + } + else + m_uiFrostBreathTimer -= uiDiff; + } + else + { + if (m_uiIceboltTimer < uiDiff) + { + DoCastSpellIfCan(m_creature, SPELL_ICEBOLT); - if (phase == 2) - { - if (Icebolt_Timer < uiDiff && Icebolt_Count < 5) - { - if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) - DoCastSpellIfCan(target,SPELL_ICEBOLT); + ++m_uiIceboltCount; + m_uiIceboltTimer = 4000; + } + else + m_uiIceboltTimer -= uiDiff; + } - ++Icebolt_Count; - Icebolt_Timer = 4000; - }else Icebolt_Timer -= uiDiff; + break; + case PHASE_AIR_BREATH: + if (m_uiFrostBreathTimer) + { + if (m_uiFrostBreathTimer <= uiDiff) + { + DoCastSpellIfCan(m_creature, SPELL_FROST_BREATH_A, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_FROST_BREATH_B, CAST_TRIGGERED); + m_uiFrostBreathTimer = 0; - if (Icebolt_Count == 5 && !landoff) - { - if (FrostBreath_Timer < uiDiff) + m_uiLandTimer = 4000; + } + else + m_uiFrostBreathTimer -= uiDiff; + } + + if (m_uiLandTimer) { - DoScriptText(EMOTE_BREATH, m_creature); - DoCastSpellIfCan(m_creature->getVictim(),SPELL_FROST_BREATH); - land_Timer = 2000; - landoff = true; - FrostBreath_Timer = 6000; - }else FrostBreath_Timer -= uiDiff; - } + if (m_uiLandTimer <= uiDiff) + { + // Begin Landing + DoScriptText(EMOTE_GROUND, m_creature); + m_creature->HandleEmote(EMOTE_ONESHOT_LAND); + m_creature->SetHover(false); - if (landoff) - { - if (land_Timer < uiDiff) + m_Phase = PHASE_LANDING; + m_uiLandTimer = 2000; + } + else + m_uiLandTimer -= uiDiff; + } + + break; + case PHASE_LANDING: + if (m_uiLandTimer < uiDiff) { - phase = 1; - m_creature->HandleEmote(EMOTE_ONESHOT_LAND); - m_creature->SetHover(false); + m_Phase = PHASE_GROUND; + + SetCombatMovement(false); m_creature->GetMotionMaster()->Clear(false); m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); - Fly_Timer = 67000; - }else land_Timer -= uiDiff; - } + + m_uiFlyTimer = 67000; + m_uiLandTimer = 0; + } + else + m_uiLandTimer -= uiDiff; + + break; } - if (m_creature->GetHealthPercent() <= 10.0f) + // Enrage can happen in any phase + if (m_uiBerserkTimer < uiDiff) { - if (Beserk_Timer < uiDiff) + if (DoCastSpellIfCan(m_creature, SPELL_BESERK) == CAST_OK) { - if (DoCastSpellIfCan(m_creature, SPELL_BESERK) == CAST_OK) - { - DoScriptText(EMOTE_GENERIC_ENRAGED, m_creature); - Beserk_Timer = 300000; - } - }else Beserk_Timer -= uiDiff; + DoScriptText(EMOTE_GENERIC_ENRAGED, m_creature); + m_uiBerserkTimer = 300000; + } } - - if (phase!=2) - DoMeleeAttackIfReady(); + else + m_uiBerserkTimer -= uiDiff; } }; @@ -207,9 +316,10 @@ CreatureAI* GetAI_boss_sapphiron(Creature* pCreature) void AddSC_boss_sapphiron() { - Script* NewScript; - NewScript = new Script; - NewScript->Name = "boss_sapphiron"; - NewScript->GetAI = &GetAI_boss_sapphiron; - NewScript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_sapphiron"; + pNewScript->GetAI = &GetAI_boss_sapphiron; + pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 541ef1bf3..1e8f9956c 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2027" + #define SD2_REVISION_NR "2028" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index a91a16019..b1ed4091e 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -1346,8 +1346,8 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1533080,'Breathe no more!',8850,1,0,0,'noth SAY_SLAY2'), (-1533081,'I will serve the master... in... death!',8848,1,0,0,'noth SAY_DEATH'), -(-1533082,'%s takes in a deep breath...',0,2,0,0,'sapphiron EMOTE_BREATH'), -(-1533083,'%s resumes his attacks!',0,2,0,0,'sapphiron EMOTE_GROUND'), +(-1533082,'%s takes in a deep breath...',0,3,0,0,'sapphiron EMOTE_BREATH'), +(-1533083,'%s resumes his attacks!',0,3,0,0,'sapphiron EMOTE_GROUND'), (-1533084,'Our preparations continue as planned, master.',14467,1,0,0,'kelthuzad SAY_SAPP_DIALOG1'), (-1533085,'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.',8881,1,0,0,'kelthuzad SAY_SAPP_DIALOG2_LICH'), diff --git a/sql/updates/r2028_scriptdev2.sql b/sql/updates/r2028_scriptdev2.sql new file mode 100644 index 000000000..3287576ed --- /dev/null +++ b/sql/updates/r2028_scriptdev2.sql @@ -0,0 +1 @@ +UPDATE script_texts SET type=3 WHERE entry IN (-1533082,-1533083); From 099b0d124becd7726afaaab188e840a02d175b8c Mon Sep 17 00:00:00 2001 From: Xfurry Date: Fri, 15 Apr 2011 19:16:02 +0200 Subject: [PATCH 0008/1172] [2029] Cleanup and improve Zul'Gurub Hakkar Note that some spells need proper core support Signed-off-by: Schmoozerd --- .../eastern_kingdoms/zulgurub/boss_hakkar.cpp | 309 +++++++++--------- sd2_revision_nr.h | 2 +- 2 files changed, 154 insertions(+), 157 deletions(-) diff --git a/scripts/eastern_kingdoms/zulgurub/boss_hakkar.cpp b/scripts/eastern_kingdoms/zulgurub/boss_hakkar.cpp index b5644b0c2..c7c473140 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_hakkar.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_hakkar.cpp @@ -24,21 +24,24 @@ EndScriptData */ #include "precompiled.h" #include "zulgurub.h" -#define SAY_AGGRO -1309020 -#define SAY_FLEEING -1309021 - -#define SPELL_BLOODSIPHON 24322 -#define SPELL_CORRUPTEDBLOOD 24328 -#define SPELL_CAUSEINSANITY 24327 //Not working disabled. -#define SPELL_WILLOFHAKKAR 24178 -#define SPELL_ENRAGE 24318 - -// The Aspects of all High Priests -#define SPELL_ASPECT_OF_JEKLIK 24687 -#define SPELL_ASPECT_OF_VENOXIS 24688 -#define SPELL_ASPECT_OF_MARLI 24686 -#define SPELL_ASPECT_OF_THEKAL 24689 -#define SPELL_ASPECT_OF_ARLOKK 24690 +enum +{ + SAY_AGGRO = -1309020, + SAY_FLEEING = -1309021, + + SPELL_BLOOD_SIPHON = 24324, // Related Spells 24322, 24323, 24324, likely starting spell is 24324 (disabled until proper fixed) + SPELL_CORRUPTED_BLOOD = 24328, + SPELL_CAUSE_INSANITY = 24327, + SPELL_WILL_OF_HAKKAR = 24178, + SPELL_ENRAGE = 24318, + + // The Aspects of all High Priests + SPELL_ASPECT_OF_JEKLIK = 24687, + SPELL_ASPECT_OF_VENOXIS = 24688, + SPELL_ASPECT_OF_MARLI = 24686, + SPELL_ASPECT_OF_THEKAL = 24689, + SPELL_ASPECT_OF_ARLOKK = 24690 +}; struct MANGOS_DLL_DECL boss_hakkarAI : public ScriptedAI { @@ -50,185 +53,178 @@ struct MANGOS_DLL_DECL boss_hakkarAI : public ScriptedAI ScriptedInstance* m_pInstance; - uint32 BloodSiphon_Timer; - uint32 CorruptedBlood_Timer; - uint32 CauseInsanity_Timer; - uint32 WillOfHakkar_Timer; - uint32 Enrage_Timer; - - uint32 CheckJeklik_Timer; - uint32 CheckVenoxis_Timer; - uint32 CheckMarli_Timer; - uint32 CheckThekal_Timer; - uint32 CheckArlokk_Timer; - - uint32 AspectOfJeklik_Timer; - uint32 AspectOfVenoxis_Timer; - uint32 AspectOfMarli_Timer; - uint32 AspectOfThekal_Timer; - uint32 AspectOfArlokk_Timer; + uint32 m_uiBloodSiphonTimer; + uint32 m_uiCorruptedBloodTimer; + uint32 m_uiCauseInsanityTimer; + uint32 m_uiWillOfHakkarTimer; + uint32 m_uiEnrageTimer; - bool Enraged; + uint32 m_uiAspectOfJeklikTimer; + uint32 m_uiAspectOfVenoxisTimer; + uint32 m_uiAspectOfMarliTimer; + uint32 m_uiAspectOfThekalTimer; + uint32 m_uiAspectOfArlokkTimer; void Reset() { - BloodSiphon_Timer = 90000; - CorruptedBlood_Timer = 25000; - CauseInsanity_Timer = 17000; - WillOfHakkar_Timer = 17000; - Enrage_Timer = 600000; - - CheckJeklik_Timer = 1000; - CheckVenoxis_Timer = 2000; - CheckMarli_Timer = 3000; - CheckThekal_Timer = 4000; - CheckArlokk_Timer = 5000; - - AspectOfJeklik_Timer = 4000; - AspectOfVenoxis_Timer = 7000; - AspectOfMarli_Timer = 12000; - AspectOfThekal_Timer = 8000; - AspectOfArlokk_Timer = 18000; - - Enraged = false; + m_uiBloodSiphonTimer = 90000; + m_uiCorruptedBloodTimer = 25000; + m_uiCauseInsanityTimer = 17000; + m_uiWillOfHakkarTimer = 17000; + m_uiEnrageTimer = 10*MINUTE*IN_MILLISECONDS; + + m_uiAspectOfJeklikTimer = 4000; + m_uiAspectOfVenoxisTimer = 7000; + m_uiAspectOfMarliTimer = 12000; + m_uiAspectOfThekalTimer = 8000; + m_uiAspectOfArlokkTimer = 18000; } void Aggro(Unit *who) { DoScriptText(SAY_AGGRO, m_creature); + + // check if the priest encounters are done + if (m_pInstance) + { + if (m_pInstance->GetData(TYPE_JEKLIK) == DONE) + m_uiAspectOfJeklikTimer = 0; + if (m_pInstance->GetData(TYPE_VENOXIS) == DONE) + m_uiAspectOfVenoxisTimer = 0; + if (m_pInstance->GetData(TYPE_MARLI) == DONE) + m_uiAspectOfMarliTimer = 0; + if (m_pInstance->GetData(TYPE_THEKAL) == DONE) + m_uiAspectOfThekalTimer = 0; + if (m_pInstance->GetData(TYPE_ARLOKK) == DONE) + m_uiAspectOfArlokkTimer = 0; + } } - void UpdateAI(const uint32 diff) + void UpdateAI(const uint32 uiDiff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - //BloodSiphon_Timer - if (BloodSiphon_Timer < diff) + /* Disabled as needs core fix// Blood Siphon Timer + * This also will requre spells 24320 24321 to be implemented (and used by the "Son of Hakkar" npcs) + if (m_uiBloodSiphonTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_BLOODSIPHON); - BloodSiphon_Timer = 90000; - }else BloodSiphon_Timer -= diff; - - //CorruptedBlood_Timer - if (CorruptedBlood_Timer < diff) + if (DoCastSpellIfCan(m_creature, SPELL_BLOOD_SIPHON) == CAST_OK) + m_uiBloodSiphonTimer = 90000; + } + else + m_uiBloodSiphonTimer -= uiDiff; */ + + // Corrupted Blood Timer + if (m_uiCorruptedBloodTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_CORRUPTEDBLOOD); - CorruptedBlood_Timer = urand(30000, 45000); - }else CorruptedBlood_Timer -= diff; + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, SPELL_CORRUPTED_BLOOD) == CAST_OK) + m_uiCorruptedBloodTimer = urand(30000, 45000); + } + } + else + m_uiCorruptedBloodTimer -= uiDiff; - //CauseInsanity_Timer - /*if (CauseInsanity_Timer < diff) + // Cause Insanity Timer + if (m_uiCauseInsanityTimer < uiDiff) { - if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) - DoCastSpellIfCan(target,SPELL_CAUSEINSANITY); - - CauseInsanity_Timer = urand(35000, 43000); - }else CauseInsanity_Timer -= diff;*/ - - //WillOfHakkar_Timer - if (WillOfHakkar_Timer < diff) + if (m_creature->getThreatManager().getThreatList().size() > 1) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_CAUSE_INSANITY) == CAST_OK) + m_uiCauseInsanityTimer = urand(10000, 15000); + } + else // Solo case, check again later + m_uiCauseInsanityTimer = urand(35000, 43000); + } + else + m_uiCauseInsanityTimer -= uiDiff; + + // Will Of Hakkar Timer + if (m_uiWillOfHakkarTimer < uiDiff) { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1)) + { + if (DoCastSpellIfCan(pTarget, SPELL_WILL_OF_HAKKAR) == CAST_OK) + m_uiWillOfHakkarTimer = urand(25000, 35000); + } + else // solo attempt, try again later + m_uiWillOfHakkarTimer = 25000; + } + else + m_uiWillOfHakkarTimer -= uiDiff; - if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) - DoCastSpellIfCan(target,SPELL_WILLOFHAKKAR); - - WillOfHakkar_Timer = urand(25000, 35000); - }else WillOfHakkar_Timer -= diff; - - if (!Enraged && Enrage_Timer < diff) + if (m_uiEnrageTimer < uiDiff) { - DoCastSpellIfCan(m_creature, SPELL_ENRAGE); - Enraged = true; - }else Enrage_Timer -= diff; - - //Checking if Jeklik is dead. If not we cast her Aspect - if (CheckJeklik_Timer < diff) + if (DoCastSpellIfCan(m_creature, SPELL_ENRAGE) == CAST_OK) + m_uiEnrageTimer = 10*MINUTE*IN_MILLISECONDS; + } + else + m_uiEnrageTimer -= uiDiff; + + // Checking if Jeklik is dead. If not we cast her Aspect + if (m_uiAspectOfJeklikTimer) { - if (m_pInstance) + if (m_uiAspectOfJeklikTimer <= uiDiff) { - if (m_pInstance->GetData(TYPE_JEKLIK) != DONE) - { - if (AspectOfJeklik_Timer < diff) - { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_ASPECT_OF_JEKLIK); - AspectOfJeklik_Timer = urand(10000, 14000); - }else AspectOfJeklik_Timer -= diff; - } + if (DoCastSpellIfCan(m_creature, SPELL_ASPECT_OF_JEKLIK) == CAST_OK) + m_uiAspectOfJeklikTimer = urand(10000, 14000); } - CheckJeklik_Timer = 1000; - }else CheckJeklik_Timer -= diff; + else + m_uiAspectOfJeklikTimer -= uiDiff; + } - //Checking if Venoxis is dead. If not we cast his Aspect - if (CheckVenoxis_Timer < diff) + // Checking if Venoxis is dead. If not we cast his Aspect + if (m_uiAspectOfVenoxisTimer) { - if (m_pInstance) + if (m_uiAspectOfVenoxisTimer <= uiDiff) { - if (m_pInstance->GetData(TYPE_VENOXIS) != DONE) - { - if (AspectOfVenoxis_Timer < diff) - { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_ASPECT_OF_VENOXIS); - AspectOfVenoxis_Timer = 8000; - }else AspectOfVenoxis_Timer -= diff; - } + if (DoCastSpellIfCan(m_creature, SPELL_ASPECT_OF_VENOXIS) == CAST_OK) + m_uiAspectOfVenoxisTimer = 8000; } - CheckVenoxis_Timer = 1000; - }else CheckVenoxis_Timer -= diff; + else + m_uiAspectOfVenoxisTimer -= uiDiff; + } - //Checking if Marli is dead. If not we cast her Aspect - if (CheckMarli_Timer < diff) + // Checking if Marli is dead. If not we cast her Aspect + if (m_uiAspectOfMarliTimer) { - if (m_pInstance) + if (m_uiAspectOfMarliTimer <= uiDiff) { - if (m_pInstance->GetData(TYPE_MARLI) != DONE) - { - if (AspectOfMarli_Timer < diff) - { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_ASPECT_OF_MARLI); - AspectOfMarli_Timer = 10000; - }else AspectOfMarli_Timer -= diff; - - } + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_ASPECT_OF_MARLI) == CAST_OK) + m_uiAspectOfMarliTimer = 10000; } - CheckMarli_Timer = 1000; - }else CheckMarli_Timer -= diff; + else + m_uiAspectOfMarliTimer -= uiDiff; + } - //Checking if Thekal is dead. If not we cast his Aspect - if (CheckThekal_Timer < diff) + // Checking if Thekal is dead. If not we cast his Aspect + if (m_uiAspectOfThekalTimer) { - if (m_pInstance) + if (m_uiAspectOfThekalTimer <= uiDiff) { - if (m_pInstance->GetData(TYPE_THEKAL) != DONE) - { - if (AspectOfThekal_Timer < diff) - { - DoCastSpellIfCan(m_creature,SPELL_ASPECT_OF_THEKAL); - AspectOfThekal_Timer = 15000; - }else AspectOfThekal_Timer -= diff; - } + if (DoCastSpellIfCan(m_creature, SPELL_ASPECT_OF_THEKAL) == CAST_OK) + m_uiAspectOfThekalTimer = 15000; } - CheckThekal_Timer = 1000; - }else CheckThekal_Timer -= diff; + else + m_uiAspectOfThekalTimer -= uiDiff; + } - //Checking if Arlokk is dead. If yes we cast her Aspect - if (CheckArlokk_Timer < diff) + // Checking if Arlokk is dead. If yes we cast her Aspect + if (m_uiAspectOfArlokkTimer) { - if (m_pInstance) + if (m_uiAspectOfArlokkTimer <= uiDiff) { - if (m_pInstance->GetData(TYPE_ARLOKK) != DONE) + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_ASPECT_OF_ARLOKK) == CAST_OK) { - if (AspectOfArlokk_Timer < diff) - { - DoCastSpellIfCan(m_creature,SPELL_ASPECT_OF_ARLOKK); - DoResetThreat(); - - AspectOfArlokk_Timer = urand(10000, 15000); - }else AspectOfArlokk_Timer -= diff; + DoResetThreat(); + m_uiAspectOfArlokkTimer = urand(10000, 15000); } } - CheckArlokk_Timer = 1000; - }else CheckArlokk_Timer -= diff; + else + m_uiAspectOfArlokkTimer -= uiDiff; + } DoMeleeAttackIfReady(); } @@ -241,9 +237,10 @@ CreatureAI* GetAI_boss_hakkar(Creature* pCreature) void AddSC_boss_hakkar() { - Script *newscript; - newscript = new Script; - newscript->Name = "boss_hakkar"; - newscript->GetAI = &GetAI_boss_hakkar; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_hakkar"; + pNewScript->GetAI = &GetAI_boss_hakkar; + pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 1e8f9956c..f8bf37b84 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2028" + #define SD2_REVISION_NR "2029" #endif // __SD2_REVISION_NR_H__ From 24d272468aa5314bd653139caffaf00117b2aaca Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Fri, 15 Apr 2011 20:45:34 +0200 Subject: [PATCH 0009/1172] [2030] Improve a little bit Nazan&Vazruden encounter --- .../boss_nazan_and_vazruden.cpp | 126 +++++++++++++----- sd2_revision_nr.h | 2 +- 2 files changed, 97 insertions(+), 31 deletions(-) diff --git a/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_nazan_and_vazruden.cpp b/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_nazan_and_vazruden.cpp index 794452023..79bef1908 100644 --- a/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_nazan_and_vazruden.cpp +++ b/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_nazan_and_vazruden.cpp @@ -40,8 +40,8 @@ enum SPELL_REVENGE = 40392, //nazan - SPELL_FIREBALL = 30691, - SPELL_H_FIREBALL = 36920, + SPELL_FIREBALL = 30691, // TODO: IDs not verified + SPELL_FIREBALL_H = 36920, SPELL_CONE_OF_FIRE = 30926, SPELL_H_CONE_OF_FIRE = 36921, @@ -50,7 +50,7 @@ enum //misc POINT_ID_CENTER = 100, - POINT_ID_WAITING = 101, + POINT_ID_FLYING = 101, POINT_ID_COMBAT = 102, NPC_VAZRUDEN_HERALD = 17307, @@ -58,7 +58,7 @@ enum NPC_VAZRUDEN = 17537 }; -const float afCenterPos[3] = {-1399.401f, 1736.365f, 86.008f}; //moves here to drop off nazan +const float afCenterPos[3] = {-1399.401f, 1736.365f, 87.008f}; //moves here to drop off nazan const float afCombatPos[3] = {-1413.848f, 1754.019f, 83.146f}; //moves here when decending struct MANGOS_DLL_DECL boss_vazrudenAI : public ScriptedAI @@ -154,7 +154,12 @@ struct MANGOS_DLL_DECL boss_vazruden_heraldAI : public ScriptedAI ScriptedInstance* m_pInstance; bool m_bIsRegularMode; + bool m_bIsEventInProgress; uint32 m_uiMovementTimer; + uint32 m_uiFireballTimer; + + uint64 m_uiLastSeenPlayerGUID; + uint64 m_uiVazrudenGUID; void Reset() { @@ -164,10 +169,25 @@ struct MANGOS_DLL_DECL boss_vazruden_heraldAI : public ScriptedAI m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); m_uiMovementTimer = 0; + m_bIsEventInProgress = false; + m_uiLastSeenPlayerGUID = 0; + m_uiVazrudenGUID = 0; + m_uiFireballTimer = 0; + + // see boss_onyxia + // sort of a hack, it is unclear how this really work but the values appear to be valid + m_creature->SetByteValue(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_UNK_2); + m_creature->AddSplineFlag(SPLINEFLAG_FLYING); } void MoveInLineOfSight(Unit* pWho) { + if (m_bIsEventInProgress && !m_uiLastSeenPlayerGUID && pWho->GetTypeId() == TYPEID_PLAYER && pWho->isAlive() && !((Player*)pWho)->isGameMaster()) + { + if (m_creature->IsWithinDistInMap(pWho, 40.0f)) + m_uiLastSeenPlayerGUID = pWho->GetGUID(); + } + if (m_pInstance && m_pInstance->GetData(TYPE_NAZAN) != IN_PROGRESS) return; @@ -181,24 +201,43 @@ struct MANGOS_DLL_DECL boss_vazruden_heraldAI : public ScriptedAI if (uiType == WAYPOINT_MOTION_TYPE) { - if (m_uiMovementTimer) + if (m_uiMovementTimer || m_bIsEventInProgress) return; if (m_pInstance->GetData(TYPE_NAZAN) == SPECIAL) { m_creature->SetCombatStartPosition(m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ()); m_uiMovementTimer = 1000; + m_bIsEventInProgress = true; } } if (uiType == POINT_MOTION_TYPE) { - if (uiPointId == POINT_ID_CENTER) - DoSplit(); - else if (uiPointId == POINT_ID_COMBAT) + switch (uiPointId) { - m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - m_pInstance->SetData(TYPE_NAZAN, IN_PROGRESS); + case POINT_ID_CENTER: + DoSplit(); + break; + case POINT_ID_COMBAT: + { + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + m_pInstance->SetData(TYPE_NAZAN, IN_PROGRESS); + + // Landing + // undo flying + m_creature->SetByteValue(UNIT_FIELD_BYTES_1, 3, 0); + m_creature->RemoveSplineFlag(SPLINEFLAG_FLYING); + + Player* pPlayer = m_creature->GetMap()->GetPlayer(m_uiLastSeenPlayerGUID); + if (pPlayer && pPlayer->isAlive()) + AttackStart(pPlayer); + + break; + } + case POINT_ID_FLYING: + m_uiFireballTimer = 3000; + break; } } } @@ -206,22 +245,19 @@ struct MANGOS_DLL_DECL boss_vazruden_heraldAI : public ScriptedAI void DoMoveToCenter() { DoScriptText(SAY_INTRO, m_creature); - - if (m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() == WAYPOINT_MOTION_TYPE) - { - m_creature->GetMotionMaster()->MovementExpired(); - m_creature->GetMotionMaster()->MoveIdle(); - } - m_creature->GetMotionMaster()->MovePoint(POINT_ID_CENTER, afCenterPos[0], afCenterPos[1], afCenterPos[2]); } - void DoMoveToHold() + void DoMoveToAir() { float fX, fY, fZ; m_creature->GetCombatStartPosition(fX, fY, fZ); - m_creature->GetMotionMaster()->MovePoint(POINT_ID_WAITING, fX, fY, fZ); + // Remove Idle MMGen + if (m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() == IDLE_MOTION_TYPE) + m_creature->GetMotionMaster()->MovementExpired(false); + + m_creature->GetMotionMaster()->MovePoint(POINT_ID_FLYING, fX, fY, fZ); } void DoSplit() @@ -231,10 +267,21 @@ struct MANGOS_DLL_DECL boss_vazruden_heraldAI : public ScriptedAI m_creature->SummonCreature(NPC_VAZRUDEN, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_DEAD_DESPAWN, 0); m_uiMovementTimer = 3000; + + // Let him idle for now + m_creature->GetMotionMaster()->MoveIdle(); } void JustSummoned(Creature* pSummoned) { + if (pSummoned->GetEntry() != NPC_VAZRUDEN) + return; + + if (Player* pPlayer = m_creature->GetMap()->GetPlayer(m_uiLastSeenPlayerGUID)) + pSummoned->AI()->AttackStart(pPlayer); + + m_uiVazrudenGUID = pSummoned->GetGUID(); + if (m_pInstance) m_pInstance->SetData(TYPE_VAZRUDEN, IN_PROGRESS); } @@ -247,23 +294,42 @@ struct MANGOS_DLL_DECL boss_vazruden_heraldAI : public ScriptedAI void UpdateAI(const uint32 uiDiff) { - if (!m_creature->getVictim() && m_uiMovementTimer) + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) { - if (m_uiMovementTimer <= uiDiff) + if (m_uiMovementTimer) { - if (m_pInstance) + if (m_uiMovementTimer <= uiDiff) { - if (m_pInstance->GetData(TYPE_VAZRUDEN) == IN_PROGRESS) - DoMoveToHold(); - else - DoMoveToCenter(); + if (m_pInstance) + { + if (m_pInstance->GetData(TYPE_VAZRUDEN) == IN_PROGRESS) + DoMoveToAir(); + else + DoMoveToCenter(); + } + m_uiMovementTimer = 0; } - m_uiMovementTimer = 0; - } else m_uiMovementTimer -= uiDiff; - } + else + m_uiMovementTimer -= uiDiff; + } + + if (m_uiVazrudenGUID && m_uiFireballTimer) + { + if (m_uiFireballTimer <= uiDiff) + { + if (Creature* pVazruden = m_creature->GetMap()->GetCreature(m_uiVazrudenGUID)) + { + if (Unit* pEnemy = pVazruden->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + DoCastSpellIfCan(pEnemy, m_bIsRegularMode ? SPELL_FIREBALL : SPELL_FIREBALL_H, 0, pVazruden->GetGUID()); + } + m_uiFireballTimer = urand(4000, 8000); + } + else + m_uiFireballTimer -= uiDiff; + } - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; + } DoMeleeAttackIfReady(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index f8bf37b84..d14720d78 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2029" + #define SD2_REVISION_NR "2030" #endif // __SD2_REVISION_NR_H__ From c815e17d544390d40a8fc7db54e98182e7188d91 Mon Sep 17 00:00:00 2001 From: virusav Date: Tue, 12 Apr 2011 17:02:22 +0200 Subject: [PATCH 0010/1172] [2031] Implement spell scripts for quest 12589 The used text might be randomized! Signed-off-by: Schmoozerd --- scripts/world/spell_scripts.cpp | 80 +++++++++++++++++++++++++++----- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 2 +- sql/scriptdev2_script_full.sql | 11 ++++- sql/updates/r2031_mangos.sql | 1 + sql/updates/r2031_scriptdev2.sql | 10 ++++ 6 files changed, 91 insertions(+), 15 deletions(-) create mode 100644 sql/updates/r2031_mangos.sql create mode 100644 sql/updates/r2031_scriptdev2.sql diff --git a/scripts/world/spell_scripts.cpp b/scripts/world/spell_scripts.cpp index ee984ef31..e362c4a12 100644 --- a/scripts/world/spell_scripts.cpp +++ b/scripts/world/spell_scripts.cpp @@ -36,6 +36,9 @@ spell 45109 spell 45111 spell 39246 spell 52090 +spell 51331 +spell 51332 +spell 51366 EndContentData */ #include "precompiled.h" @@ -285,6 +288,23 @@ enum // quest 9849, item 24501 SPELL_THROW_GORDAWG_BOULDER = 32001, NPC_MINION_OF_GUROK = 18181, + + // quest 12589 + SPELL_HIT_APPLE = 51331, + SPELL_MISS_APPLE = 51332, + SPELL_MISS_APPLE_HIT_BIRD = 51366, + SPELL_APPLE_FALLS_TO_GROUND = 51371, + NPC_APPLE = 28053, + NPC_LUCKY_WILHELM = 28054, + NPC_DROSTAN = 28328, + SAY_LUCKY_HIT_1 = -1000644, + SAY_LUCKY_HIT_2 = -1000645, + SAY_LUCKY_HIT_3 = -1000646, + SAY_LUCKY_HIT_APPLE = -1000647, + SAY_DROSTAN_GOT_LUCKY_1 = -1000648, + SAY_DROSTAN_GOT_LUCKY_2 = -1000649, + SAY_DROSTAN_HIT_BIRD_1 = -1000650, + SAY_DROSTAN_HIT_BIRD_2 = -1000651, }; bool EffectAuraDummy_spell_aura_dummy_npc(const Aura* pAura, bool bApply) @@ -839,6 +859,42 @@ bool EffectDummyCreature_spell_dummy_npc(Unit* pCaster, uint32 uiSpellId, SpellE } return true; } + case SPELL_HIT_APPLE: + { + if (uiEffIndex == EFFECT_INDEX_0) + { + pCreatureTarget->CastSpell(pCreatureTarget, SPELL_APPLE_FALLS_TO_GROUND, false); + if (Creature* pLuckyWilhelm = GetClosestCreatureWithEntry(pCreatureTarget, NPC_LUCKY_WILHELM, 2*INTERACTION_DISTANCE)) + DoScriptText(SAY_LUCKY_HIT_APPLE, pLuckyWilhelm); + pCreatureTarget->ForcedDespawn(100); + } + return true; + } + case SPELL_MISS_APPLE: + { + if (uiEffIndex == EFFECT_INDEX_0) + { + switch (urand(1, 3)) + { + case 1: DoScriptText(SAY_LUCKY_HIT_1, pCreatureTarget); break; + case 2: DoScriptText(SAY_LUCKY_HIT_2, pCreatureTarget); break; + case 3: DoScriptText(SAY_LUCKY_HIT_3, pCreatureTarget); break; + } + if (Creature* pDrostan = GetClosestCreatureWithEntry(pCreatureTarget, NPC_DROSTAN, 4*INTERACTION_DISTANCE)) + DoScriptText(urand(0, 1) ? SAY_DROSTAN_GOT_LUCKY_1 : SAY_DROSTAN_GOT_LUCKY_2, pDrostan); + } + return true; + } + case SPELL_MISS_APPLE_HIT_BIRD: + { + if (uiEffIndex == EFFECT_INDEX_0) + { + if (Creature* pDrostan = GetClosestCreatureWithEntry(pCreatureTarget, NPC_DROSTAN, 4*INTERACTION_DISTANCE)) + DoScriptText(urand(0, 1) ? SAY_DROSTAN_HIT_BIRD_1 : SAY_DROSTAN_HIT_BIRD_2, pDrostan); + pCreatureTarget->DealDamage(pCreatureTarget, pCreatureTarget->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + } + return true; + } } return false; @@ -846,16 +902,16 @@ bool EffectDummyCreature_spell_dummy_npc(Unit* pCaster, uint32 uiSpellId, SpellE void AddSC_spell_scripts() { - Script* newscript; - - newscript = new Script; - newscript->Name = "spell_dummy_go"; - newscript->pEffectDummyGO = &EffectDummyGameObj_spell_dummy_go; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "spell_dummy_npc"; - newscript->pEffectDummyNPC = &EffectDummyCreature_spell_dummy_npc; - newscript->pEffectAuraDummy = &EffectAuraDummy_spell_aura_dummy_npc; - newscript->RegisterSelf(); + Script* pNewscript; + + pNewscript = new Script; + pNewscript->Name = "spell_dummy_go"; + pNewscript->pEffectDummyGO = &EffectDummyGameObj_spell_dummy_go; + pNewscript->RegisterSelf(); + + pNewscript = new Script; + pNewscript->Name = "spell_dummy_npc"; + pNewscript->pEffectDummyNPC = &EffectDummyCreature_spell_dummy_npc; + pNewscript->pEffectAuraDummy = &EffectAuraDummy_spell_aura_dummy_npc; + pNewscript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index d14720d78..70e0bb754 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2030" + #define SD2_REVISION_NR "2031" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 994147bea..a30185af1 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -141,7 +141,7 @@ UPDATE creature_template SET ScriptName='npc_locksmith' WHERE entry IN (29665,29 -- UPDATE creature_template SET ScriptName='npc_innkeeper' WHERE npcflag=npcflag|65536; /* SPELL */ -UPDATE creature_template SET ScriptName='spell_dummy_npc' WHERE entry IN (16880,1200,26616,26643,16518,25793,25758,25752,25792,25753,26421,26841,27808,27122,28068,12298,12296,24918,17157,17326,17654,16847,18879,26270,26268,30146,25084,25085,32149,22105,29330,29338,29329,28465,28600,29327,29319); +UPDATE creature_template SET ScriptName='spell_dummy_npc' WHERE entry IN (16880,1200,26616,26643,16518,25793,25758,25752,25792,25753,26421,26841,27808,27122,28068,12298,12296,24918,17157,17326,17654,16847,18879,26270,26268,30146,25084,25085,32149,22105,29330,29338,29329,28465,28600,29327,29319,28053,28054,28093); UPDATE gameobject_template SET ScriptName='spell_dummy_go' WHERE entry IN (181616,186949); /* */ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index b1ed4091e..38a8ea029 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -688,7 +688,16 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1000641,'I... I will hide it. I will hide it until I find it a home, far away from here...',0,0,0,0,'ancient vrykul SAY_VRYKUL_HIDE'), (-1000642,'It\'s a female.',0,5,0,0,'leopard icepaw SAY_ITS_FEMALE'), -(-1000643,'It\'s an angry male!',0,5,0,0,'leopard icepaw SAY_ITS_MALE'); +(-1000643,'It\'s an angry male!',0,5,0,0,'leopard icepaw SAY_ITS_MALE'), + +(-1000644,'Ouch! That\'s it, I quit the target business!',0,0,0,0,'SAY_LUCKY_HIT_1'), +(-1000645,'My ear! You grazed my ear!',0,0,0,0,'SAY_LUCKY_HIT_2'), +(-1000646,'Not the \'stache! Now I\'m asymmetrical!',0,0,0,0,'SAY_LUCKY_HIT_3'), +(-1000647,'Good shot!',0,0,0,0,'SAY_LUCKY_HIT_APPLE'), +(-1000648,'Stop whining. You\'ve still got your luck.',0,0,0,0,'SAY_DROSTAN_GOT_LUCKY_1'), +(-1000649,'Bah, it\'s an improvement.',0,0,0,0,'SAY_DROSTAN_GOT_LUCKY_2'), +(-1000650,'Calm down lad, it\'s just a birdshot!',0,0,0,0,'SAY_DROSTAN_HIT_BIRD_1'), +(-1000651,'The only thing hurt is your pride, lad! Buck up!',0,0,0,0,'SAY_DROSTAN_HIT_BIRD_2'); -- -1 033 000 SHADOWFANG KEEP INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES diff --git a/sql/updates/r2031_mangos.sql b/sql/updates/r2031_mangos.sql new file mode 100644 index 000000000..95df14ff9 --- /dev/null +++ b/sql/updates/r2031_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='spell_dummy_npc' WHERE entry IN (28053, 28054, 28093); diff --git a/sql/updates/r2031_scriptdev2.sql b/sql/updates/r2031_scriptdev2.sql new file mode 100644 index 000000000..baef2250d --- /dev/null +++ b/sql/updates/r2031_scriptdev2.sql @@ -0,0 +1,10 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1000651 AND -1000644; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1000644,'Ouch! That\'s it, I quit the target business!',0,0,0,0,'SAY_LUCKY_HIT_1'), +(-1000645,'My ear! You grazed my ear!',0,0,0,0,'SAY_LUCKY_HIT_2'), +(-1000646,'Not the \'stache! Now I\'m asymmetrical!',0,0,0,0,'SAY_LUCKY_HIT_3'), +(-1000647,'Good shot!',0,0,0,0,'SAY_LUCKY_HIT_APPLE'), +(-1000648,'Stop whining. You\'ve still got your luck.',0,0,0,0,'SAY_DROSTAN_GOT_LUCKY_1'), +(-1000649,'Bah, it\'s an improvement.',0,0,0,0,'SAY_DROSTAN_GOT_LUCKY_2'), +(-1000650,'Calm down lad, it\'s just a birdshot!',0,0,0,0,'SAY_DROSTAN_HIT_BIRD_1'), +(-1000651,'The only thing hurt is your pride, lad! Buck up!',0,0,0,0,'SAY_DROSTAN_HIT_BIRD_2'); From f90e1c617000cb41a249ca43e1c0ccdf75da4728 Mon Sep 17 00:00:00 2001 From: Reve Date: Sat, 16 Apr 2011 10:46:01 +0200 Subject: [PATCH 0011/1172] [2032] Cleanup and improve Supremus Note for proper testing of this script, you might want to hackfix bounding_radius of Supremus to some better fitting value. This script expects MaNGOS Ver 11366+. Signed-off-by: Schmoozerd --- .../outland/black_temple/boss_supremus.cpp | 435 ++++++++---------- sd2_revision_nr.h | 2 +- 2 files changed, 192 insertions(+), 245 deletions(-) diff --git a/scripts/outland/black_temple/boss_supremus.cpp b/scripts/outland/black_temple/boss_supremus.cpp index 87a44dab4..4e0bff084 100644 --- a/scripts/outland/black_temple/boss_supremus.cpp +++ b/scripts/outland/black_temple/boss_supremus.cpp @@ -16,136 +16,69 @@ /* ScriptData SDName: Boss_Supremus -SD%Complete: 95 -SDComment: Need to implement molten punch +SD%Complete: 90 +SDComment: Fixating the target is hacky, unknown if other speed-changes happen, remove AI for trigger mobs in next step SDCategory: Black Temple EndScriptData */ #include "precompiled.h" #include "black_temple.h" -#define EMOTE_NEW_TARGET -1564010 -#define EMOTE_PUNCH_GROUND -1564011 //DoScriptText(EMOTE_PUNCH_GROUND, m_creature); -#define EMOTE_GROUND_CRACK -1564012 - -//Spells -#define SPELL_HURTFUL_STRIKE 41926 -#define SPELL_DEMON_FIRE 40029 -#define SPELL_MOLTEN_FLAME 40253 -#define SPELL_VOLCANIC_ERUPTION 40276 -#define SPELL_VOLCANIC_FIREBALL 40118 -#define SPELL_VOLCANIC_GEYSER 42055 -#define SPELL_MOLTEN_PUNCH 40126 -#define SPELL_BERSERK 45078 - -#define CREATURE_VOLCANO 23085 -#define CREATURE_STALKER 23095 - -struct MANGOS_DLL_DECL molten_flameAI : public ScriptedAI +enum { - molten_flameAI(Creature* pCreature) : ScriptedAI(pCreature) - { - Reset(); - } - - uint64 SupremusGUID; - bool TargetLocked; - uint32 CheckTimer; - - void Reset() - { - SupremusGUID = 0; - TargetLocked = false; - - CheckTimer = 1000; - } - - void AttackStart(Unit* who) {} - void MoveInLineOfSight(Unit *who) - { - if (TargetLocked) - return; - - // stop it from aggroing players who move in LOS if we have a target. - if (who && (who != m_creature) && (m_creature->IsWithinDistInMap(who, 10))) - StalkTarget(who); - } + EMOTE_NEW_TARGET = -1564010, + EMOTE_PUNCH_GROUND = -1564011, + EMOTE_GROUND_CRACK = -1564012, + + // Spells + SPELL_HATEFUL_STRIKE = 41926, + SPELL_CHARGE = 41581, + SPELL_MOLTEN_FLAME = 40980, + SPELL_VOLCANIC_ERUPTION_BOSS = 40276, + SPELL_VOLCANIC_ERUPTION_VOLCANO = 40117, + SPELL_MOLTEN_PUNCH = 40126, + SPELL_BERSERK = 45078, + SPELL_SLOW_SELF = 41922, + + NPC_VOLCANO = 23085, + NPC_STALKER = 23095, +}; - void SetSupremusGUID(uint64 GUID) { SupremusGUID = GUID; } +/* Non existed spells that were used in 3.2 + * Stalker: 40257 41930 + * Supremus: 33420 41582 41925 41951 + */ - void StalkTarget(Unit* target) - { - if (!target) - return; +const float RANGE_MOLTEN_PUNCH = 40.0; - m_creature->AddThreat(target, 50000000.0f); - m_creature->GetMotionMaster()->MoveChase(target); - DoCastSpellIfCan(m_creature, SPELL_DEMON_FIRE, CAST_TRIGGERED); - // DoCastSpellIfCan(m_creature, SPELL_MOLTEN_FLAME, CAST_TRIGGERED); // This spell damages self, so disabled for now - TargetLocked = true; - } +/* These floats are related to the speed-hack near end of script; + * Statet at wowwiki: "If the gaze target is further away than 40 yards, he dashes at about five times the normal run speed until the range is about 20 yards." + * TODO But this is currently not confirmed otherwise to be actually happening + * const float RANGE_MIN_DASHING = 20.0; + * const float SPEED_DASHING = 5.0; + * const float SPEED_CHASE = 0.9f; + */ - void UpdateAI(const uint32 diff) - { - if (!m_creature->SelectHostileTarget()) - return; +// TODO Remove this 'script' when combat movement can be proper prevented from core-side +struct MANGOS_DLL_DECL molten_flameAI : public Scripted_NoMovementAI +{ + molten_flameAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { Reset(); } - if (m_creature->getVictim() && m_creature->isAlive()) - { - if (CheckTimer < diff) - { - if (SupremusGUID) - { - Unit* Supremus = m_creature->GetMap()->GetCreature(SupremusGUID); - if (Supremus && (!Supremus->isAlive())) - m_creature->DealDamage(m_creature, m_creature->GetHealth(), 0, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); - } - CheckTimer = 2000; - }else CheckTimer -= diff; - } - } + void Reset() {} + void AttackStart(Unit* pWho) {} + void MoveInLineOfSight(Unit* pWho) {} + void UpdateAI(const uint32 uiDiff) {} }; -struct MANGOS_DLL_DECL npc_volcanoAI : public ScriptedAI +// TODO Remove this 'script' when combat movement can be proper prevented from core-side +struct MANGOS_DLL_DECL npc_volcanoAI : public Scripted_NoMovementAI { - npc_volcanoAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} - - uint32 CheckTimer; - uint64 SupremusGUID; - uint32 FireballTimer; - uint32 GeyserTimer; - - void Reset() - { - CheckTimer = 1000; - SupremusGUID = 0; - FireballTimer = 500; - GeyserTimer = 0; - } + npc_volcanoAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { Reset(); } - void AttackStart(Unit* who) {} - void MoveInLineOfSight(Unit* who) {} - void SetSupremusGUID(uint64 guid) { SupremusGUID = guid; } - - void UpdateAI(const uint32 diff) - { - if (CheckTimer < diff) - { - if (SupremusGUID) - { - Unit* Supremus = m_creature->GetMap()->GetCreature(SupremusGUID); - if (Supremus && (!Supremus->isAlive())) - m_creature->DealDamage(m_creature, m_creature->GetHealth(), 0, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); - } - CheckTimer = 2000; - }else CheckTimer -= diff; - - if (GeyserTimer < diff) - { - DoCastSpellIfCan(m_creature, SPELL_VOLCANIC_GEYSER); - GeyserTimer = 18000; - }else GeyserTimer -= diff; - } + void Reset() {} + void AttackStart(Unit* pWho) {} + void MoveInLineOfSight(Unit* pWho) {} + void UpdateAI(const uint32 uiDiff) {} }; struct MANGOS_DLL_DECL boss_supremusAI : public ScriptedAI @@ -158,25 +91,31 @@ struct MANGOS_DLL_DECL boss_supremusAI : public ScriptedAI ScriptedInstance* m_pInstance; - uint32 SummonFlameTimer; - uint32 SwitchTargetTimer; - uint32 PhaseSwitchTimer; - uint32 SummonVolcanoTimer; - uint32 HurtfulStrikeTimer; - uint32 BerserkTimer; + uint32 m_uiSummonFlameTimer; + uint32 m_uiSwitchTargetTimer; + uint32 m_uiPhaseSwitchTimer; + uint32 m_uiSummonVolcanoTimer; + uint32 m_uiHatefulStrikeTimer; + uint32 m_uiBerserkTimer; + uint32 m_uiMoltenPunchTimer; - bool Phase1; + uint64 m_uiLastGazeTargetGUID; + + bool m_bTankPhase; + + std::list m_lSummonedGUIDs; void Reset() { - HurtfulStrikeTimer = 5000; - SummonFlameTimer = 20000; - SwitchTargetTimer = 90000; - PhaseSwitchTimer = 60000; - SummonVolcanoTimer = 5000; - BerserkTimer = 900000; // 15 minute enrage - - Phase1 = true; + m_uiHatefulStrikeTimer = 5000; + m_uiSummonFlameTimer = 20000; + m_uiPhaseSwitchTimer = 60000; + m_uiMoltenPunchTimer = 8000; + m_uiBerserkTimer = 15*MINUTE*IN_MILLISECONDS; + + m_uiLastGazeTargetGUID = 0; + + m_bTankPhase = true; } void JustReachedHome() @@ -191,169 +130,176 @@ struct MANGOS_DLL_DECL boss_supremusAI : public ScriptedAI m_pInstance->SetData(TYPE_SUPREMUS, IN_PROGRESS); } - void JustDied(Unit *killer) + void JustDied(Unit* pKiller) { if (m_pInstance) m_pInstance->SetData(TYPE_SUPREMUS, DONE); - } - float CalculateRandomCoord(float initial) - { - float coord = 0; - - switch(urand(0, 1)) + for (std::list::const_iterator itr = m_lSummonedGUIDs.begin(); itr != m_lSummonedGUIDs.end(); ++itr) { - case 0: coord = initial + 20 + rand()%20; break; - case 1: coord = initial - 20 - rand()%20; break; + if (Creature* pSummoned = m_creature->GetMap()->GetCreature(*itr)) + pSummoned->ForcedDespawn(); } - - return coord; } - Creature* SummonCreature(uint32 entry, Unit* target) + void JustSummoned(Creature* pSummoned) { - if (target && entry) + if (pSummoned->GetEntry() == NPC_STALKER) { - Creature* Summon = m_creature->SummonCreature(entry, CalculateRandomCoord(target->GetPositionX()), CalculateRandomCoord(target->GetPositionY()), target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN, 20000); - if (Summon) + Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1); + if (!pTarget) + pTarget = m_creature->getVictim(); + + if (pTarget) { - Summon->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - Summon->setFaction(m_creature->getFaction()); - return Summon; + pSummoned->GetMotionMaster()->Clear(); + pSummoned->GetMotionMaster()->MoveFollow(pTarget, 0.0f, 0.0f); + pSummoned->CastSpell(pSummoned, SPELL_MOLTEN_FLAME, false, NULL, NULL, m_creature->GetObjectGuid()); } } - return NULL; + + else if (pSummoned->GetEntry() == NPC_VOLCANO) + pSummoned->CastSpell(pSummoned, SPELL_VOLCANIC_ERUPTION_VOLCANO, false, NULL, NULL, m_creature->GetObjectGuid()); } - Unit* CalculateHurtfulStrikeTarget() + Unit* GetHatefulStrikeTarget() { - uint32 health = 0; - Unit* target = NULL; + uint32 uiHealth = 0; + Unit* pTarget = NULL; ThreatList const& tList = m_creature->getThreatManager().getThreatList(); - for (ThreatList::const_iterator i = tList.begin();i != tList.end(); ++i) + for (ThreatList::const_iterator iter = tList.begin(); iter != tList.end(); ++iter) { - Unit* pUnit = m_creature->GetMap()->GetUnit((*i)->getUnitGuid()); + Unit* pUnit = m_creature->GetMap()->GetUnit((*iter)->getUnitGuid()); if (pUnit && m_creature->CanReachWithMeleeAttack(pUnit)) { - if (pUnit->GetHealth() > health) + if (pUnit->GetHealth() > uiHealth) { - health = pUnit->GetHealth(); - target = pUnit; + uiHealth = pUnit->GetHealth(); + pTarget = pUnit; } } } - return target; + return pTarget; + } + + void KilledUnit(Unit* pKilled) + { + if (!m_bTankPhase && pKilled->GetGUID() == m_uiLastGazeTargetGUID) + m_uiSwitchTargetTimer = 0; } - void UpdateAI(const uint32 diff) + void UpdateAI(const uint32 uiDiff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - if (!m_creature->HasAura(SPELL_BERSERK, EFFECT_INDEX_0)) + if (m_uiBerserkTimer) { - if (BerserkTimer < diff) - DoCastSpellIfCan(m_creature, SPELL_BERSERK); - else BerserkTimer -= diff; + if (m_uiBerserkTimer <= uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_BERSERK) == CAST_OK) + m_uiBerserkTimer = 0; + } + else + m_uiBerserkTimer -= uiDiff; } - if (SummonFlameTimer < diff) + if (m_uiSummonFlameTimer < uiDiff) { - Unit* target = NULL; - target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1); - - if (!target) // someone is trying to solo, set target as current victim. - target = m_creature->getVictim(); + // This currently is entirely screwed, because the npc is summoned somewhere far away as of big bounding box of supremus + if (DoCastSpellIfCan(m_creature, SPELL_MOLTEN_PUNCH) == CAST_OK) + m_uiSummonFlameTimer = 20000; + } + else + m_uiSummonFlameTimer -= uiDiff; - if (target) + if (m_uiPhaseSwitchTimer < uiDiff) + { + if (!m_bTankPhase) { - if (Creature* pMoltenFlame = SummonCreature(CREATURE_STALKER, target)) - { - // Invisible model - pMoltenFlame->SetDisplayId(11686); - - if (molten_flameAI* pMoltenAI = dynamic_cast(pMoltenFlame->AI())) - { - pMoltenAI->SetSupremusGUID(m_creature->GetGUID()); - pMoltenAI->StalkTarget(target); - } + m_bTankPhase = true; + m_creature->RemoveAurasDueToSpell(SPELL_SLOW_SELF); + } + else + { + m_bTankPhase = false; + m_uiSwitchTargetTimer = 0; + m_uiSummonVolcanoTimer = 2000; - SummonFlameTimer = 20000; - } + DoCastSpellIfCan(m_creature, SPELL_SLOW_SELF, CAST_INTERRUPT_PREVIOUS); } - }else SummonFlameTimer -= diff; - if (Phase1) + m_uiPhaseSwitchTimer = MINUTE*IN_MILLISECONDS; + DoResetThreat(); + } + else + m_uiPhaseSwitchTimer -= uiDiff; + + if (m_bTankPhase) { - if (HurtfulStrikeTimer < diff) + if (m_uiHatefulStrikeTimer < uiDiff) { - Unit* target = CalculateHurtfulStrikeTarget(); - if (target) + if (Unit* pTarget = GetHatefulStrikeTarget()) { - DoCastSpellIfCan(target, SPELL_HURTFUL_STRIKE); - HurtfulStrikeTimer = 5000; + if (DoCastSpellIfCan(pTarget, SPELL_HATEFUL_STRIKE) == CAST_OK) + m_uiHatefulStrikeTimer = 5000; } - }else HurtfulStrikeTimer -= diff; + } + else + m_uiHatefulStrikeTimer -= uiDiff; } - - if (!Phase1) + else // !m_bTankPhase { - if (SwitchTargetTimer < diff) + if (m_uiSwitchTargetTimer < uiDiff) { - if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) { DoResetThreat(); - m_creature->AddThreat(target, 5000000.0f); + // This way to simulate some fixating is to be considered a hack + m_creature->AddThreat(pTarget, 5000000.0f); DoScriptText(EMOTE_NEW_TARGET, m_creature); - SwitchTargetTimer = 10000; + m_uiSwitchTargetTimer = 10000; + m_uiLastGazeTargetGUID = pTarget->GetGUID(); } - }else SwitchTargetTimer -= diff; + } + else + m_uiSwitchTargetTimer -= uiDiff; - if (SummonVolcanoTimer < diff) + if (m_uiSummonVolcanoTimer < uiDiff) { - Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1); - - if (!target) - target = m_creature->getVictim(); + Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1); - if (target) + if (DoCastSpellIfCan(pTarget ? pTarget : m_creature->getVictim(), SPELL_VOLCANIC_ERUPTION_BOSS) == CAST_OK) { - if (Creature* pVolcano = SummonCreature(CREATURE_VOLCANO, target)) - { - DoCastSpellIfCan(target, SPELL_VOLCANIC_ERUPTION); - - if (npc_volcanoAI* pVolcanoAI = dynamic_cast(pVolcano->AI())) - pVolcanoAI->SetSupremusGUID(m_creature->GetGUID()); - } - DoScriptText(EMOTE_GROUND_CRACK, m_creature); - SummonVolcanoTimer = 10000; + m_uiSummonVolcanoTimer = 10000; } - }else SummonVolcanoTimer -= diff; - } - - if (PhaseSwitchTimer < diff) - { - if (!Phase1) - { - Phase1 = true; - DoResetThreat(); - PhaseSwitchTimer = 60000; - m_creature->SetSpeedRate(MOVE_RUN, 1.0f); } else + m_uiSummonVolcanoTimer -= uiDiff; + + if (m_uiMoltenPunchTimer < uiDiff) { - Phase1 = false; - DoResetThreat(); - SwitchTargetTimer = 10000; - SummonVolcanoTimer = 2000; - PhaseSwitchTimer = 60000; - m_creature->SetSpeedRate(MOVE_RUN, 0.9f); + if (m_creature->GetCombatDistance(m_creature->getVictim()) < RANGE_MOLTEN_PUNCH) + { + DoCastSpellIfCan(m_creature->getVictim(), SPELL_CHARGE); + DoScriptText(EMOTE_PUNCH_GROUND, m_creature); + } + m_uiMoltenPunchTimer = 8000; // might be better with small timer and some sort of cast-chance } - }else PhaseSwitchTimer -= diff; + else + m_uiMoltenPunchTimer -= uiDiff; + + /* Not understood how this really must work + * if (m_creature->GetSpeedRate(MOVE_RUN) > SPEED_CHASE && m_creature->GetCombatDistance(m_creature->getVictim()) < RANGE_MIN_DASHING) + * m_creature->SetSpeedRate(MOVE_RUN, SPEED_CHASE); + * else if (m_creature->GetCombatDistance(m_creature->getVictim()) > RANGE_MOLTEN_PUNCH) + * m_creature->SetSpeedRate(MOVE_RUN, SPEED_DASHING); + */ + } DoMeleeAttackIfReady(); } @@ -376,19 +322,20 @@ CreatureAI* GetAI_npc_volcano(Creature* pCreature) void AddSC_boss_supremus() { - Script *newscript; - newscript = new Script; - newscript->Name = "boss_supremus"; - newscript->GetAI = &GetAI_boss_supremus; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "molten_flame"; - newscript->GetAI = &GetAI_molten_flame; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_volcano"; - newscript->GetAI = &GetAI_npc_volcano; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_supremus"; + pNewScript->GetAI = &GetAI_boss_supremus; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "molten_flame"; + pNewScript->GetAI = &GetAI_molten_flame; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_volcano"; + pNewScript->GetAI = &GetAI_npc_volcano; + pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 70e0bb754..18a98db6e 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2031" + #define SD2_REVISION_NR "2032" #endif // __SD2_REVISION_NR_H__ From 31ad5c8d042cbc4aaed0a99e13c5215edf6e894f Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sun, 17 Apr 2011 10:42:59 +0200 Subject: [PATCH 0012/1172] [2033] Cleanup for BWL - Nefarian and Nefarius * Also added small changes to way event is started * Some spell targeting fixes, some spell-id fixes Signed-off-by: Schmoozerd --- .../blackwing_lair/boss_nefarian.cpp | 257 ++++++------ .../blackwing_lair/boss_vaelastrasz.cpp | 1 + .../blackwing_lair/boss_victor_nefarius.cpp | 367 +++++++----------- sd2_revision_nr.h | 2 +- sql/scriptdev2_script_full.sql | 10 +- sql/updates/r2033_scriptdev2.sql | 11 + 6 files changed, 313 insertions(+), 335 deletions(-) create mode 100644 sql/updates/r2033_scriptdev2.sql diff --git a/scripts/eastern_kingdoms/blackwing_lair/boss_nefarian.cpp b/scripts/eastern_kingdoms/blackwing_lair/boss_nefarian.cpp index fad6c1a26..aeb173cf0 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/boss_nefarian.cpp +++ b/scripts/eastern_kingdoms/blackwing_lair/boss_nefarian.cpp @@ -22,134 +22,163 @@ SDCategory: Blackwing Lair EndScriptData */ #include "precompiled.h" +#include "blackwing_lair.h" -#define SAY_AGGRO -1469007 -#define SAY_XHEALTH -1469008 -#define SAY_SHADOWFLAME -1469009 -#define SAY_RAISE_SKELETONS -1469010 -#define SAY_SLAY -1469011 -#define SAY_DEATH -1469012 - -#define SAY_MAGE -1469013 -#define SAY_WARRIOR -1469014 -#define SAY_DRUID -1469015 -#define SAY_PRIEST -1469016 -#define SAY_PALADIN -1469017 -#define SAY_SHAMAN -1469018 -#define SAY_WARLOCK -1469019 -#define SAY_HUNTER -1469020 -#define SAY_ROGUE -1469021 - -#define SPELL_SHADOWFLAME_INITIAL 22972 -#define SPELL_SHADOWFLAME 22539 -#define SPELL_BELLOWINGROAR 22686 -#define SPELL_VEILOFSHADOW 7068 -#define SPELL_CLEAVE 20691 -#define SPELL_TAILLASH 23364 -#define SPELL_BONECONTRUST 23363 //23362, 23361 - -#define SPELL_MAGE 23410 //wild magic -#define SPELL_WARRIOR 23397 //beserk -#define SPELL_DRUID 23398 // cat form -#define SPELL_PRIEST 23401 // corrupted healing -#define SPELL_PALADIN 23418 //syphon blessing -#define SPELL_SHAMAN 23425 //totems -#define SPELL_WARLOCK 23427 //infernals -#define SPELL_HUNTER 23436 //bow broke -#define SPELL_ROGUE 23414 //Paralise +enum +{ + SAY_AGGRO = -1469007, + SAY_XHEALTH = -1469008, // at 5% hp + SAY_SHADOWFLAME = -1469009, + SAY_RAISE_SKELETONS = -1469010, + SAY_SLAY = -1469011, + SAY_DEATH = -1469012, + + SAY_MAGE = -1469013, + SAY_WARRIOR = -1469014, + SAY_DRUID = -1469015, + SAY_PRIEST = -1469016, + SAY_PALADIN = -1469017, + SAY_SHAMAN = -1469018, + SAY_WARLOCK = -1469019, + SAY_HUNTER = -1469020, + SAY_ROGUE = -1469021, + SAY_DEATH_KNIGHT = -1469031, // spell unk for the moment + + SPELL_SHADOWFLAME_INITIAL = 22992, // old spell id 22972 -> wrong + SPELL_SHADOWFLAME = 22539, + SPELL_BELLOWING_ROAR = 22686, + SPELL_VEIL_OF_SHADOW = 22687, // old spell id 7068 -> wrong + SPELL_CLEAVE = 20691, + SPELL_TAIL_LASH = 23364, + SPELL_BONE_CONTRUST = 23363, //23362, 23361 Missing from DBC! + + SPELL_MAGE = 23410, // wild magic + SPELL_WARRIOR = 23397, // beserk + SPELL_DRUID = 23398, // cat form + SPELL_PRIEST = 23401, // corrupted healing + SPELL_PALADIN = 23418, // syphon blessing + SPELL_SHAMAN = 23425, // totems + SPELL_WARLOCK = 23427, // infernals -> should trigger 23426 + SPELL_HUNTER = 23436, // bow broke + SPELL_ROGUE = 23414, // Paralise +}; struct MANGOS_DLL_DECL boss_nefarianAI : public ScriptedAI { - boss_nefarianAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + boss_nefarianAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } - uint32 ShadowFlame_Timer; - uint32 BellowingRoar_Timer; - uint32 VeilOfShadow_Timer; - uint32 Cleave_Timer; - uint32 TailLash_Timer; - uint32 ClassCall_Timer; - bool Phase3; + ScriptedInstance* m_pInstance; + + uint32 m_uiShadowFlameTimer; + uint32 m_uiBellowingRoarTimer; + uint32 m_uiVeilOfShadowTimer; + uint32 m_uiCleaveTimer; + uint32 m_uiTailLashTimer; + uint32 m_uiClassCallTimer; + bool m_bPhase3; + bool m_bHasEndYell; void Reset() { - ShadowFlame_Timer = 12000; //These times are probably wrong - BellowingRoar_Timer = 30000; - VeilOfShadow_Timer = 15000; - Cleave_Timer = 7000; - TailLash_Timer = 10000; - ClassCall_Timer = 35000; //35-40 seconds - Phase3 = false; + m_uiShadowFlameTimer = 12000; // These times are probably wrong + m_uiBellowingRoarTimer = 30000; + m_uiVeilOfShadowTimer = 15000; + m_uiCleaveTimer = 7000; + m_uiTailLashTimer = 10000; + m_uiClassCallTimer = 35000; // 35-40 seconds + m_bPhase3 = false; + m_bHasEndYell = false; } - void KilledUnit(Unit* Victim) + void KilledUnit(Unit* pVictim) { if (urand(0, 4)) return; - DoScriptText(SAY_SLAY, m_creature, Victim); + DoScriptText(SAY_SLAY, m_creature, pVictim); } - void JustDied(Unit* Killer) + void JustDied(Unit* pKiller) { DoScriptText(SAY_DEATH, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_NEFARIAN, DONE); + } + + void JustReachedHome() + { + if (m_pInstance) + m_pInstance->SetData(TYPE_NEFARIAN, FAIL); } void Aggro(Unit* pWho) { - switch(urand(0, 3)) - { - case 0: DoScriptText(SAY_XHEALTH, m_creature); break; - case 1: DoScriptText(SAY_AGGRO, m_creature); break; - case 2: DoScriptText(SAY_SHADOWFLAME, m_creature); break; - } + DoScriptText(SAY_AGGRO, m_creature); - DoCastSpellIfCan(pWho,SPELL_SHADOWFLAME_INITIAL); + DoCastSpellIfCan(m_creature, SPELL_SHADOWFLAME_INITIAL); } - void UpdateAI(const uint32 diff) + void UpdateAI(const uint32 uiDiff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - //ShadowFlame_Timer - if (ShadowFlame_Timer < diff) + // ShadowFlame_Timer + if (m_uiShadowFlameTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_SHADOWFLAME); - ShadowFlame_Timer = 12000; - }else ShadowFlame_Timer -= diff; + if (DoCastSpellIfCan(m_creature, SPELL_SHADOWFLAME) == CAST_OK) + { + // ToDo: check if he yells at every cast + DoScriptText(SAY_SHADOWFLAME, m_creature); + m_uiShadowFlameTimer = 12000; + } + } + else + m_uiShadowFlameTimer -= uiDiff; - //BellowingRoar_Timer - if (BellowingRoar_Timer < diff) + // BellowingRoar_Timer + if (m_uiBellowingRoarTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_BELLOWINGROAR); - BellowingRoar_Timer = 30000; - }else BellowingRoar_Timer -= diff; + if (DoCastSpellIfCan(m_creature, SPELL_BELLOWING_ROAR) == CAST_OK) + m_uiBellowingRoarTimer = 30000; + } + else + m_uiBellowingRoarTimer -= uiDiff; - //VeilOfShadow_Timer - if (VeilOfShadow_Timer < diff) + // VeilOfShadow_Timer + if (m_uiVeilOfShadowTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_VEILOFSHADOW); - VeilOfShadow_Timer = 15000; - }else VeilOfShadow_Timer -= diff; + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_VEIL_OF_SHADOW) == CAST_OK) + m_uiVeilOfShadowTimer = 15000; + } + else + m_uiVeilOfShadowTimer -= uiDiff; - //Cleave_Timer - if (Cleave_Timer < diff) + // Cleave_Timer + if (m_uiCleaveTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_CLEAVE); - Cleave_Timer = 7000; - }else Cleave_Timer -= diff; + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_CLEAVE) == CAST_OK) + m_uiCleaveTimer = 7000; + } + else + m_uiCleaveTimer -= uiDiff; - //TailLash_Timer - if (TailLash_Timer < diff) + // TailLash_Timer + if (m_uiTailLashTimer < uiDiff) { - //Cast NYI since we need a better check for behind target - //DoCastSpellIfCan(m_creature->getVictim(),SPELL_TAILLASH); - - TailLash_Timer = 10000; - }else TailLash_Timer -= diff; + if (DoCastSpellIfCan(m_creature, SPELL_TAIL_LASH) == CAST_OK) + m_uiTailLashTimer = 10000; + } + else + m_uiTailLashTimer -= uiDiff; - //ClassCall_Timer - if (ClassCall_Timer < diff) + // ClassCall_Timer + if (m_uiClassCallTimer < uiDiff) { //Cast a random class call //On official it is based on what classes are currently on the hostil list @@ -159,55 +188,66 @@ struct MANGOS_DLL_DECL boss_nefarianAI : public ScriptedAI { case 0: DoScriptText(SAY_MAGE, m_creature); - DoCastSpellIfCan(m_creature,SPELL_MAGE); + DoCastSpellIfCan(m_creature, SPELL_MAGE); break; case 1: DoScriptText(SAY_WARRIOR, m_creature); - DoCastSpellIfCan(m_creature,SPELL_WARRIOR); + DoCastSpellIfCan(m_creature, SPELL_WARRIOR); break; case 2: DoScriptText(SAY_DRUID, m_creature); - DoCastSpellIfCan(m_creature,SPELL_DRUID); + DoCastSpellIfCan(m_creature, SPELL_DRUID); break; case 3: DoScriptText(SAY_PRIEST, m_creature); - DoCastSpellIfCan(m_creature,SPELL_PRIEST); + DoCastSpellIfCan(m_creature, SPELL_PRIEST); break; case 4: DoScriptText(SAY_PALADIN, m_creature); - DoCastSpellIfCan(m_creature,SPELL_PALADIN); + DoCastSpellIfCan(m_creature, SPELL_PALADIN); break; case 5: DoScriptText(SAY_SHAMAN, m_creature); - DoCastSpellIfCan(m_creature,SPELL_SHAMAN); + DoCastSpellIfCan(m_creature, SPELL_SHAMAN); break; case 6: DoScriptText(SAY_WARLOCK, m_creature); - DoCastSpellIfCan(m_creature,SPELL_WARLOCK); + DoCastSpellIfCan(m_creature, SPELL_WARLOCK); break; case 7: DoScriptText(SAY_HUNTER, m_creature); - DoCastSpellIfCan(m_creature,SPELL_HUNTER); + DoCastSpellIfCan(m_creature, SPELL_HUNTER); break; case 8: DoScriptText(SAY_ROGUE, m_creature); - DoCastSpellIfCan(m_creature,SPELL_ROGUE); + DoCastSpellIfCan(m_creature, SPELL_ROGUE); break; } - ClassCall_Timer = urand(35000, 40000); - }else ClassCall_Timer -= diff; + m_uiClassCallTimer = urand(35000, 40000); + } + else + m_uiClassCallTimer -= uiDiff; - //Phase3 begins when we are below X health - if (!Phase3 && m_creature->GetHealthPercent() < 20.0f) + // Phase3 begins when we are below X health + if (!m_bPhase3 && m_creature->GetHealthPercent() < 20.0f) { - Phase3 = true; + // todo revive all dead dragos as 14605 + m_bPhase3 = true; DoScriptText(SAY_RAISE_SKELETONS, m_creature); } + // 5% hp yell + if (!m_bHasEndYell && m_creature->GetHealthPercent() < 5.0f) + { + m_bHasEndYell = true; + DoScriptText(SAY_XHEALTH, m_creature); + } + DoMeleeAttackIfReady(); } }; + CreatureAI* GetAI_boss_nefarian(Creature* pCreature) { return new boss_nefarianAI(pCreature); @@ -215,9 +255,10 @@ CreatureAI* GetAI_boss_nefarian(Creature* pCreature) void AddSC_boss_nefarian() { - Script *newscript; - newscript = new Script; - newscript->Name = "boss_nefarian"; - newscript->GetAI = &GetAI_boss_nefarian; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_nefarian"; + pNewScript->GetAI = &GetAI_boss_nefarian; + pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/blackwing_lair/boss_vaelastrasz.cpp b/scripts/eastern_kingdoms/blackwing_lair/boss_vaelastrasz.cpp index ece3c8da3..a08da6e62 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/boss_vaelastrasz.cpp +++ b/scripts/eastern_kingdoms/blackwing_lair/boss_vaelastrasz.cpp @@ -31,6 +31,7 @@ enum SAY_LINE_3 = -1469028, SAY_HALFLIFE = -1469029, SAY_KILLTARGET = -1469030, + SAY_NEFARIUS_CORRUPT = -1469006, //when he corrupts Vaelastrasz; possible to start the event by arrea trigger id = 3626 SPELL_ESSENCE_OF_THE_RED = 23513, SPELL_FLAME_BREATH = 23461, diff --git a/scripts/eastern_kingdoms/blackwing_lair/boss_victor_nefarius.cpp b/scripts/eastern_kingdoms/blackwing_lair/boss_victor_nefarius.cpp index 35b4ced36..2e57fb4a8 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/boss_victor_nefarius.cpp +++ b/scripts/eastern_kingdoms/blackwing_lair/boss_victor_nefarius.cpp @@ -22,41 +22,53 @@ SDCategory: Blackwing Lair EndScriptData */ #include "precompiled.h" +#include "blackwing_lair.h" -#define SAY_GAMESBEGIN_1 -1469004 -#define SAY_GAMESBEGIN_2 -1469005 -#define SAY_VAEL_INTRO -1469006 //when he corrupts Vaelastrasz - -#define GOSSIP_ITEM_1 "I've made no mistakes." -#define GOSSIP_ITEM_2 "You have lost your mind, Nefarius. You speak in riddles." -#define GOSSIP_ITEM_3 "Please do." - -#define CREATURE_BRONZE_DRAKANOID 14263 -#define CREATURE_BLUE_DRAKANOID 14261 -#define CREATURE_RED_DRAKANOID 14264 -#define CREATURE_GREEN_DRAKANOID 14262 -#define CREATURE_BLACK_DRAKANOID 14265 - -#define CREATURE_CHROMATIC_DRAKANOID 14302 -#define CREATURE_NEFARIAN 11583 - -#define ADD_X1 -7591.151855f -#define ADD_X2 -7514.598633f -#define ADD_Y1 -1204.051880f -#define ADD_Y2 -1150.448853f -#define ADD_Z1 476.800476f -#define ADD_Z2 476.796570f +enum +{ + SAY_GAMESBEGIN_1 = -1469004, + SAY_GAMESBEGIN_2 = -1469005, + + GOSSIP_ITEM_NEFARIUS_1 = -3469000, + GOSSIP_ITEM_NEFARIUS_2 = -3469001, + GOSSIP_ITEM_NEFARIUS_3 = -3469002, + GOSSIP_TEXT_NEFARIUS_1 = 7134, + GOSSIP_TEXT_NEFARIUS_2 = 7198, + GOSSIP_TEXT_NEFARIUS_3 = 7199, + + MAX_DRAKES = 5, + NPC_BRONZE_DRAKANOID = 14263, + NPC_BLUE_DRAKANOID = 14261, + NPC_RED_DRAKANOID = 14264, + NPC_GREEN_DRAKANOID = 14262, + NPC_BLACK_DRAKANOID = 14265, + NPC_CHROMATIC_DRAKANOID = 14302, + + SPELL_NEFARIUS_BARRIER = 22663, // immunity in phase 1 + SPELL_SHADOWBOLT = 21077, + SPELL_FEAR = 26070, // shouldn't this be 22678? + // shadowbolt vollye = 22665 + // silence = 22666 -> silence a player + // shadow command = 22667 -> charm a player + // shadowblink = 22664, 22681 -> teleport around the room, possibly random + + FACTION_BLACK_DRAGON = 103, +}; -#define NEF_X -7445.0f -#define NEF_Y -1332.0f -#define NEF_Z 536.0f +struct SpawnLocation +{ + float m_fX, m_fY, m_fZ; +}; -#define HIDE_X -7592.0f -#define HIDE_Y -1264.0f -#define HIDE_Z 481.0f +static const SpawnLocation aNefarianLocs[4] = +{ + {-7591.151f, -1204.051f, 476.800f}, // adds 1 & 2 + {-7514.598f, -1150.448f, 476.796f}, + {-7445.0f, -1332.0f, 536.0f}, // nefarian + {-7592.0f, -1264.0f, 481.0f}, // hide pos +}; -#define SPELL_SHADOWBOLT 21077 -#define SPELL_FEAR 26070 +static const uint32 aPossibleDrake[MAX_DRAKES] = {NPC_BRONZE_DRAKANOID, NPC_BLUE_DRAKANOID, NPC_RED_DRAKANOID, NPC_GREEN_DRAKANOID, NPC_BLACK_DRAKANOID}; //This script is complicated //Instead of morphing Victor Nefarius we will have him control phase 1 @@ -71,182 +83,81 @@ struct MANGOS_DLL_DECL boss_victor_nefariusAI : public ScriptedAI { boss_victor_nefariusAI(Creature* pCreature) : ScriptedAI(pCreature) { - NefarianGUID = 0; - Reset(); - srand(time(NULL)); - switch(urand(0, 19)) - { - case 0: - DrakType1 = CREATURE_BRONZE_DRAKANOID; - DrakType2 = CREATURE_BLUE_DRAKANOID; - break; - case 1: - DrakType1 = CREATURE_BRONZE_DRAKANOID; - DrakType2 = CREATURE_RED_DRAKANOID; - break; - case 2: - DrakType1 = CREATURE_BRONZE_DRAKANOID; - DrakType2 = CREATURE_GREEN_DRAKANOID; - break; - case 3: - DrakType1 = CREATURE_BRONZE_DRAKANOID; - DrakType2 = CREATURE_BLACK_DRAKANOID; - break; - case 4: - DrakType1 = CREATURE_BLUE_DRAKANOID; - DrakType2 = CREATURE_BRONZE_DRAKANOID; - break; - case 5: - DrakType1 = CREATURE_BLUE_DRAKANOID; - DrakType2 = CREATURE_RED_DRAKANOID; - break; - case 6: - DrakType1 = CREATURE_BLUE_DRAKANOID; - DrakType2 = CREATURE_GREEN_DRAKANOID; - break; - case 7: - DrakType1 = CREATURE_BLUE_DRAKANOID; - DrakType2 = CREATURE_BLACK_DRAKANOID; - break; - case 8: - DrakType1 = CREATURE_RED_DRAKANOID; - DrakType2 = CREATURE_BRONZE_DRAKANOID; - break; - case 9: - DrakType1 = CREATURE_RED_DRAKANOID; - DrakType2 = CREATURE_BLUE_DRAKANOID; - break; - case 10: - DrakType1 = CREATURE_RED_DRAKANOID; - DrakType2 = CREATURE_GREEN_DRAKANOID; - break; - case 11: - DrakType1 = CREATURE_RED_DRAKANOID; - DrakType2 = CREATURE_BLACK_DRAKANOID; - break; - case 12: - DrakType1 = CREATURE_GREEN_DRAKANOID; - DrakType2 = CREATURE_BRONZE_DRAKANOID; - break; - case 13: - DrakType1 = CREATURE_GREEN_DRAKANOID; - DrakType2 = CREATURE_BLUE_DRAKANOID; - break; - case 14: - DrakType1 = CREATURE_GREEN_DRAKANOID; - DrakType2 = CREATURE_RED_DRAKANOID; - break; - case 15: - DrakType1 = CREATURE_GREEN_DRAKANOID; - DrakType2 = CREATURE_BLACK_DRAKANOID; - break; - case 16: - DrakType1 = CREATURE_BLACK_DRAKANOID; - DrakType2 = CREATURE_BRONZE_DRAKANOID; - break; - case 17: - DrakType1 = CREATURE_BLACK_DRAKANOID; - DrakType2 = CREATURE_BLUE_DRAKANOID; - break; - case 18: - DrakType1 = CREATURE_BLACK_DRAKANOID; - DrakType2 = CREATURE_GREEN_DRAKANOID; - break; - case 19: - DrakType1 = CREATURE_BLACK_DRAKANOID; - DrakType2 = CREATURE_RED_DRAKANOID; - break; - } - } + // Select the 2 different drakes that we are going to use until despawned + // 5 possiblities for the first drake, 4 for the second, 20 total possiblites - uint32 SpawnedAdds; - uint32 AddSpawnTimer; - uint32 ShadowBoltTimer; - uint32 FearTimer; - uint32 MindControlTimer; - uint32 ResetTimer; - uint32 DrakType1; - uint32 DrakType2; - uint64 NefarianGUID; - uint32 NefCheckTime; + // select two different numbers between 0..MAX_DRAKES-1 + uint8 uiPos1 = urand(0, MAX_DRAKES - 1); + uint8 uiPos2 = (uiPos1 + urand(1, MAX_DRAKES - 1)) % MAX_DRAKES; - void Reset() - { - SpawnedAdds = 0; - AddSpawnTimer = 10000; - ShadowBoltTimer = 5000; - FearTimer = 8000; - ResetTimer = 900000; //On official it takes him 15 minutes(900 seconds) to reset. We are only doing 1 minute to make testing easier - NefarianGUID = 0; - NefCheckTime = 2000; - - m_creature->SetUInt32Value(UNIT_NPC_FLAGS,1); - m_creature->setFaction(35); - m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + m_uiDrakeTypeOne = aPossibleDrake[uiPos1]; + m_uiDrakeTypeTwo = aPossibleDrake[uiPos2]; + + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); } - void BeginEvent(Player* target) - { - DoScriptText(SAY_GAMESBEGIN_2, m_creature); + ScriptedInstance* m_pInstance; - //MaNGOS::Singleton::Instance().GetMap(m_creature->GetMapId(), m_creature)->GetPlayers().begin(); - /* - list ::iterator i = MapManager::Instance().GetMap(m_creature->GetMapId(), m_creature)->GetPlayers().begin(); + uint32 m_uiSpawnedAdds; + uint32 m_uiAddSpawnTimer; + uint32 m_uiShadowBoltTimer; + uint32 m_uiFearTimer; + uint32 m_uiMindControlTimer; + uint32 m_uiResetTimer; + uint32 m_uiDrakeTypeOne; + uint32 m_uiDrakeTypeTwo; + uint64 m_uiNefarianGUID; + uint32 m_uiNefCheckTime; - for (i = MapManager::Instance().GetMap(m_creature->GetMapId(), m_creature)->GetPlayers().begin(); i != MapManager::Instance().GetMap(m_creature->GetMapId(), m_creature)->GetPlayers().end(); ++i) - { - AttackStart((*i)); - } - */ - m_creature->SetUInt32Value(UNIT_NPC_FLAGS,0); - m_creature->setFaction(103); - m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - AttackStart(target); - } - - void MoveInLineOfSight(Unit *who) + void Reset() { - //We simply use this function to find players until we can use Map->GetPlayers() - - if (who && who->GetTypeId() == TYPEID_PLAYER && m_creature->IsHostileTo(who)) - { - //Add them to our threat list - m_creature->AddThreat(who); - } + m_uiSpawnedAdds = 0; + m_uiAddSpawnTimer = 10000; + m_uiShadowBoltTimer = 5000; + m_uiFearTimer = 8000; + m_uiResetTimer = 900000; //On official it takes him 15 minutes(900 seconds) to reset. We are only doing 1 minute to make testing easier + m_uiNefarianGUID = 0; + m_uiNefCheckTime = 2000; + m_uiNefarianGUID = 0; + + m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); } - void UpdateAI(const uint32 diff) + void UpdateAI(const uint32 uiDiff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; //Only do this if we haven't spawned nef yet - if (SpawnedAdds < 42) + if (m_uiSpawnedAdds < 42) { - //ShadowBoltTimer - if (ShadowBoltTimer < diff) + // ShadowBoltTimer + if (m_uiShadowBoltTimer < uiDiff) { - Unit* target = NULL; - target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0); - if (target) - DoCastSpellIfCan(target,SPELL_SHADOWBOLT); - - ShadowBoltTimer = urand(3000, 10000); - }else ShadowBoltTimer -= diff; + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, SPELL_SHADOWBOLT) == CAST_OK) + m_uiShadowBoltTimer = urand(3000, 10000); + } + } + else + m_uiShadowBoltTimer -= uiDiff; - //FearTimer - if (FearTimer < diff) + // FearTimer + if (m_uiFearTimer < uiDiff) { - Unit* target = NULL; - target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0); - if (target) - DoCastSpellIfCan(target,SPELL_FEAR); - - FearTimer = urand(10000, 20000); - }else FearTimer -= diff; + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, SPELL_FEAR) == CAST_OK) + m_uiFearTimer = urand(10000, 20000); + } + } + else + m_uiFearTimer -= uiDiff; //Add spawning mechanism - if (AddSpawnTimer < diff) + if (m_uiAddSpawnTimer < uiDiff) { //Spawn 2 random types of creatures at the 2 locations uint32 CreatureID; @@ -255,13 +166,13 @@ struct MANGOS_DLL_DECL boss_victor_nefariusAI : public ScriptedAI //1 in 3 chance it will be a chromatic if (!urand(0, 2)) - CreatureID = CREATURE_CHROMATIC_DRAKANOID; - else CreatureID = DrakType1; + CreatureID = NPC_CHROMATIC_DRAKANOID; + else CreatureID = m_uiDrakeTypeOne; - ++SpawnedAdds; + ++m_uiSpawnedAdds; //Spawn creature and force it to start attacking a random target - Spawned = m_creature->SummonCreature(CreatureID,ADD_X1,ADD_Y1,ADD_Z1,5.000f,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,5000); + Spawned = m_creature->SummonCreature(CreatureID, aNefarianLocs[0].m_fX, aNefarianLocs[0].m_fY, aNefarianLocs[0].m_fZ, 5.000f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0); if (target && Spawned) { @@ -271,14 +182,14 @@ struct MANGOS_DLL_DECL boss_victor_nefariusAI : public ScriptedAI //1 in 3 chance it will be a chromatic if (!urand(0, 2)) - CreatureID = CREATURE_CHROMATIC_DRAKANOID; - else CreatureID = DrakType2; + CreatureID = NPC_CHROMATIC_DRAKANOID; + else CreatureID = m_uiDrakeTypeTwo; - ++SpawnedAdds; + ++m_uiSpawnedAdds; target = NULL; Spawned = NULL; - Spawned = m_creature->SummonCreature(CreatureID,ADD_X2,ADD_Y2,ADD_Z2,5.000,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,5000); + Spawned = m_creature->SummonCreature(CreatureID, aNefarianLocs[1].m_fX, aNefarianLocs[1].m_fY, aNefarianLocs[1].m_fZ, 5.000, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0); if (target && Spawned) { @@ -287,7 +198,7 @@ struct MANGOS_DLL_DECL boss_victor_nefariusAI : public ScriptedAI } //Begin phase 2 by spawning Nefarian and what not - if (SpawnedAdds >= 42) + if (m_uiSpawnedAdds >= 42) { //Teleport Victor Nefarius way out of the map //MapManager::Instance().GetMap(m_creature->GetMapId(), m_creature)->CreatureRelocation(m_creature,0,0,-5000,0); @@ -302,40 +213,44 @@ struct MANGOS_DLL_DECL boss_victor_nefariusAI : public ScriptedAI DoCastSpellIfCan(m_creature,8149); //Teleport self to a hiding spot - m_creature->NearTeleportTo(HIDE_X, HIDE_Y, HIDE_Z, 0.0f); + m_creature->NearTeleportTo(aNefarianLocs[3].m_fX, aNefarianLocs[3].m_fY, aNefarianLocs[3].m_fZ, 0.0f); //Spawn nef and have him attack a random target - Creature* Nefarian = m_creature->SummonCreature(CREATURE_NEFARIAN,NEF_X,NEF_Y,NEF_Z,0,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,120000); + Creature* Nefarian = m_creature->SummonCreature(NPC_NEFARIAN, aNefarianLocs[2].m_fX, aNefarianLocs[2].m_fY, aNefarianLocs[2].m_fZ, 0, TEMPSUMMON_DEAD_DESPAWN, 0); target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0); if (target && Nefarian) { Nefarian->AI()->AttackStart(target); Nefarian->setFaction(103); - NefarianGUID = Nefarian->GetGUID(); + m_uiNefarianGUID = Nefarian->GetGUID(); } else error_log("SD2: Blackwing Lair: Unable to spawn nefarian properly."); } - AddSpawnTimer = 4000; - }else AddSpawnTimer -= diff; + m_uiAddSpawnTimer = 4000; + } + else + m_uiAddSpawnTimer -= uiDiff; } - else if (NefarianGUID) + else if (m_uiNefarianGUID) { - if (NefCheckTime < diff) + if (m_uiNefCheckTime < uiDiff) { - Creature* pNefarian = m_creature->GetMap()->GetCreature(NefarianGUID); + Creature* pNefarian = m_creature->GetMap()->GetCreature(m_uiNefarianGUID); //If nef is dead then we die to so the players get out of combat //and cannot repeat the event if (!pNefarian || !pNefarian->isAlive()) { - NefarianGUID = 0; + m_uiNefarianGUID = 0; m_creature->ForcedDespawn(); } - NefCheckTime = 2000; - }else NefCheckTime -= diff; + m_uiNefCheckTime = 2000; + } + else + m_uiNefCheckTime -= uiDiff; } } }; @@ -347,8 +262,8 @@ CreatureAI* GetAI_boss_victor_nefarius(Creature* pCreature) bool GossipHello_boss_victor_nefarius(Player* pPlayer, Creature* pCreature) { - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_1 , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - pPlayer->SEND_GOSSIP_MENU(7134, pCreature->GetGUID()); + pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_NEFARIUS_1 , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXT_NEFARIUS_1, pCreature->GetGUID()); return true; } @@ -357,18 +272,22 @@ bool GossipSelect_boss_victor_nefarius(Player* pPlayer, Creature* pCreature, uin switch(uiAction) { case GOSSIP_ACTION_INFO_DEF+1: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); - pPlayer->SEND_GOSSIP_MENU(7198, pCreature->GetGUID()); + pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_NEFARIUS_2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXT_NEFARIUS_2, pCreature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF+2: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3); - pPlayer->SEND_GOSSIP_MENU(7199, pCreature->GetGUID()); + pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_NEFARIUS_3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXT_NEFARIUS_3, pCreature->GetGUID()); + DoScriptText(SAY_GAMESBEGIN_1, pCreature); break; case GOSSIP_ACTION_INFO_DEF+3: pPlayer->CLOSE_GOSSIP_MENU(); - DoScriptText(SAY_GAMESBEGIN_1, pCreature); - if (boss_victor_nefariusAI* pNefAI = dynamic_cast(pCreature->AI())) - pNefAI->BeginEvent(pPlayer); + DoScriptText(SAY_GAMESBEGIN_2, pCreature); + // remove gossip, set hostile and attack + pCreature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); + pCreature->setFaction(FACTION_BLACK_DRAGON); + pCreature->CastSpell(pCreature, SPELL_NEFARIUS_BARRIER, false); + pCreature->AI()->AttackStart(pPlayer); break; } return true; @@ -376,12 +295,12 @@ bool GossipSelect_boss_victor_nefarius(Player* pPlayer, Creature* pCreature, uin void AddSC_boss_victor_nefarius() { - Script *newscript; - - newscript = new Script; - newscript->Name = "boss_victor_nefarius"; - newscript->GetAI = &GetAI_boss_victor_nefarius; - newscript->pGossipHello = &GossipHello_boss_victor_nefarius; - newscript->pGossipSelect = &GossipSelect_boss_victor_nefarius; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_victor_nefarius"; + pNewScript->GetAI = &GetAI_boss_victor_nefarius; + pNewScript->pGossipHello = &GossipHello_boss_victor_nefarius; + pNewScript->pGossipSelect = &GossipSelect_boss_victor_nefarius; + pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 18a98db6e..f2798ceb7 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2032" + #define SD2_REVISION_NR "2033" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 38a8ea029..d14d58c84 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -1040,7 +1040,7 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1469004,'In this world where time is your enemy, it is my greatest ally. This grand game of life that you think you play in fact plays you. To that I say...',0,0,0,0,'victor_nefarius SAY_GAMESBEGIN_1'), (-1469005,'Let the games begin!',8280,1,0,0,'victor_nefarius SAY_GAMESBEGIN_2'), -(-1469006,'Ah, the heroes. You are persistent, aren\'t you. Your allied attempted to match his power against mine, and had to pay the price. Now he shall serve me, by slaughtering you. Get up little red wyrm and destroy them!',8279,1,0,0,'victor_nefarius SAY_VAEL_INTRO'), +(-1469006,'Ah, the heroes. You are persistent, aren\'t you. Your allied attempted to match his power against mine, and had to pay the price. Now he shall serve me, by slaughtering you. Get up little red wyrm and destroy them!',8279,1,0,0,'victor_nefarius SAY_NEFARIUS_CORRUPT'), (-1469007,'Well done, my minions. The mortals\' courage begins to wane! Now, let\'s see how they contend with the true Lord of Blackrock Spire!',8288,1,0,0,'nefarian SAY_AGGRO'), (-1469008,'Enough! Now you vermin shall feel the force of my birthright, the fury of the earth itself.',8289,1,0,0,'nefarian SAY_XHEALTH'), @@ -1069,7 +1069,7 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1469029,'Nefarius\' hate has made me stronger than ever before. You should have fled, while you could, mortals! The fury of Blackrock courses through my veins!',8285,1,0,0,'vaelastrasz SAY_HALFLIFE'), (-1469030,'Forgive me $N, your death only adds to my failure.',8284,1,0,0,'vaelastrasz SAY_KILLTARGET'), -(-1469031,'REUSE ME',0,0,0,0,'REUSE ME'); +(-1469031,'Death Knights, get over here!',0,1,0,0,'nefarian SAY_DEATH_KNIGHT'); -- -1 509 000 RUINS OF AHN'QIRAJ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES @@ -3468,6 +3468,12 @@ INSERT INTO gossip_texts (entry,content_default,comment) VALUES (-3409001,'What else do you have to say?','majordomo_executus GOSSIP_ITEM_SUMMON_2'), (-3409002,'You challenged us and we have come. Where is this master you speak of?','majordomo_executus GOSSIP_ITEM_SUMMON_3'); +-- -3 469 000 BLACKWING LAIR +INSERT INTO gossip_texts (entry,content_default,comment) VALUES +(-3469000,'I\'ve made no mistakes.','victor_nefarius GOSSIP_ITEM_NEFARIUS_1'), +(-3469001,'You have lost your mind, Nefarius. You speak in riddles.','victor_nefarius GOSSIP_ITEM_NEFARIUS_2'), +(-3469002,'Please do.','victor_nefarius GOSSIP_ITEM_NEFARIUS_3'); + -- -3 560 000 ESCAPE FROM DURNHOLDE (OLD HILLSBRAD) INSERT INTO gossip_texts (entry,content_default,comment) VALUES (-3560000,'I am ready to go to Durnholde Keep.','brazen GOSSIP_ITEM_READY'), diff --git a/sql/updates/r2033_scriptdev2.sql b/sql/updates/r2033_scriptdev2.sql new file mode 100644 index 000000000..736a7c4f5 --- /dev/null +++ b/sql/updates/r2033_scriptdev2.sql @@ -0,0 +1,11 @@ +DELETE FROM script_texts WHERE entry=-1469031; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1469031,'Death Knights, get over here!',0,1,0,0,'nefarian SAY_DEATH_KNIGHT'); + +DELETE FROM gossip_texts WHERE entry IN (-3469000, -3469001, -3469002); +INSERT INTO gossip_texts (entry,content_default,comment) VALUES +(-3469000,'I\'ve made no mistakes.','victor_nefarius GOSSIP_ITEM_NEFARIUS_1'), +(-3469001,'You have lost your mind, Nefarius. You speak in riddles.','victor_nefarius GOSSIP_ITEM_NEFARIUS_2'), +(-3469002,'Please do.','victor_nefarius GOSSIP_ITEM_NEFARIUS_3'); + +UPDATE script_texts SET comment='victor_nefarius SAY_NEFARIUS_CORRUPT' WHERE entry=-1469006; From b5f3176a2d383940f0abaf6f1546a7e11f989cf1 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sun, 17 Apr 2011 12:35:29 +0200 Subject: [PATCH 0013/1172] [2034] Improve BWL-Nefarius script * Improves code * Fixes some smaller issues Signed-off-by: Schmoozerd --- .../blackwing_lair/boss_victor_nefarius.cpp | 119 +++++++++--------- sd2_revision_nr.h | 2 +- 2 files changed, 60 insertions(+), 61 deletions(-) diff --git a/scripts/eastern_kingdoms/blackwing_lair/boss_victor_nefarius.cpp b/scripts/eastern_kingdoms/blackwing_lair/boss_victor_nefarius.cpp index 2e57fb4a8..3c6be8136 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/boss_victor_nefarius.cpp +++ b/scripts/eastern_kingdoms/blackwing_lair/boss_victor_nefarius.cpp @@ -37,6 +37,7 @@ enum GOSSIP_TEXT_NEFARIUS_3 = 7199, MAX_DRAKES = 5, + MAX_DRAKE_SUMMONS = 42, NPC_BRONZE_DRAKANOID = 14263, NPC_BLUE_DRAKANOID = 14261, NPC_RED_DRAKANOID = 14264, @@ -53,6 +54,7 @@ enum // shadowblink = 22664, 22681 -> teleport around the room, possibly random FACTION_BLACK_DRAGON = 103, + FACTION_FRIENDLY = 35 }; struct SpawnLocation @@ -62,10 +64,10 @@ struct SpawnLocation static const SpawnLocation aNefarianLocs[4] = { - {-7591.151f, -1204.051f, 476.800f}, // adds 1 & 2 + {-7591.151f, -1204.051f, 476.800f}, // adds 1 & 2 {-7514.598f, -1150.448f, 476.796f}, - {-7445.0f, -1332.0f, 536.0f}, // nefarian - {-7592.0f, -1264.0f, 481.0f}, // hide pos + {-7445.0f, -1332.0f, 536.0f}, // nefarian + {-7592.0f, -1264.0f, 481.0f}, // hide pos }; static const uint32 aPossibleDrake[MAX_DRAKES] = {NPC_BRONZE_DRAKANOID, NPC_BLUE_DRAKANOID, NPC_RED_DRAKANOID, NPC_GREEN_DRAKANOID, NPC_BLACK_DRAKANOID}; @@ -112,27 +114,59 @@ struct MANGOS_DLL_DECL boss_victor_nefariusAI : public ScriptedAI void Reset() { - m_uiSpawnedAdds = 0; - m_uiAddSpawnTimer = 10000; + m_uiSpawnedAdds = 0; + m_uiAddSpawnTimer = 10000; m_uiShadowBoltTimer = 5000; - m_uiFearTimer = 8000; - m_uiResetTimer = 900000; //On official it takes him 15 minutes(900 seconds) to reset. We are only doing 1 minute to make testing easier - m_uiNefarianGUID = 0; - m_uiNefCheckTime = 2000; - m_uiNefarianGUID = 0; + m_uiFearTimer = 8000; + m_uiResetTimer = 15 * MINUTE * IN_MILLISECONDS; + m_uiNefarianGUID = 0; + m_uiNefCheckTime = 2000; + // set gossip flag to begin the event m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); } + void Aggro(Unit* pWho) + { + if (m_pInstance) + m_pInstance->SetData(TYPE_NEFARIAN, IN_PROGRESS); + } + + void JustReachedHome() + { + m_creature->setFaction(FACTION_FRIENDLY); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + + if (m_pInstance) + m_pInstance->SetData(TYPE_NEFARIAN, FAIL); + } + + void JustSummoned(Creature* pSummoned) + { + if (pSummoned->GetEntry() == NPC_NEFARIAN) + { + m_uiNefarianGUID = pSummoned->GetEntry(); + pSummoned->RemoveSplineFlag(SPLINEFLAG_WALKMODE); + pSummoned->SetSplineFlags(SPLINEFLAG_FLYING); + } + else + ++m_uiSpawnedAdds; + + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + pSummoned->AI()->AttackStart(pTarget); + + pSummoned->SetRespawnDelay(7*DAY); + } + void UpdateAI(const uint32 uiDiff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - //Only do this if we haven't spawned nef yet - if (m_uiSpawnedAdds < 42) + // Only do this if we haven't spawned nef yet + if (m_uiSpawnedAdds < MAX_DRAKE_SUMMONS) { - // ShadowBoltTimer + // Shadowbolt Timer if (m_uiShadowBoltTimer < uiDiff) { if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) @@ -144,7 +178,7 @@ struct MANGOS_DLL_DECL boss_victor_nefariusAI : public ScriptedAI else m_uiShadowBoltTimer -= uiDiff; - // FearTimer + // Fear Timer if (m_uiFearTimer < uiDiff) { if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) @@ -156,49 +190,22 @@ struct MANGOS_DLL_DECL boss_victor_nefariusAI : public ScriptedAI else m_uiFearTimer -= uiDiff; - //Add spawning mechanism + // Add spawning mechanism if (m_uiAddSpawnTimer < uiDiff) { //Spawn 2 random types of creatures at the 2 locations - uint32 CreatureID; - Creature* Spawned = NULL; - Unit* target = NULL; + uint32 uiCreatureId = 0; - //1 in 3 chance it will be a chromatic - if (!urand(0, 2)) - CreatureID = NPC_CHROMATIC_DRAKANOID; - else CreatureID = m_uiDrakeTypeOne; + // 1 in 3 chance it will be a chromatic + uiCreatureId = urand(0, 2) ? m_uiDrakeTypeOne : NPC_CHROMATIC_DRAKANOID; + m_creature->SummonCreature(uiCreatureId, aNefarianLocs[0].m_fX, aNefarianLocs[0].m_fY, aNefarianLocs[0].m_fZ, 5.000f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 30*MINUTE*IN_MILLISECONDS); - ++m_uiSpawnedAdds; - - //Spawn creature and force it to start attacking a random target - Spawned = m_creature->SummonCreature(CreatureID, aNefarianLocs[0].m_fX, aNefarianLocs[0].m_fY, aNefarianLocs[0].m_fZ, 5.000f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); - target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0); - if (target && Spawned) - { - Spawned->AI()->AttackStart(target); - Spawned->setFaction(103); - } - - //1 in 3 chance it will be a chromatic - if (!urand(0, 2)) - CreatureID = NPC_CHROMATIC_DRAKANOID; - else CreatureID = m_uiDrakeTypeTwo; - - ++m_uiSpawnedAdds; - - target = NULL; - Spawned = NULL; - Spawned = m_creature->SummonCreature(CreatureID, aNefarianLocs[1].m_fX, aNefarianLocs[1].m_fY, aNefarianLocs[1].m_fZ, 5.000, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); - target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0); - if (target && Spawned) - { - Spawned->AI()->AttackStart(target); - Spawned->setFaction(103); - } + // 1 in 3 chance it will be a chromatic + uiCreatureId = urand(0, 2) ? m_uiDrakeTypeTwo : NPC_CHROMATIC_DRAKANOID; + m_creature->SummonCreature(uiCreatureId, aNefarianLocs[1].m_fX, aNefarianLocs[1].m_fY, aNefarianLocs[1].m_fZ, 5.000, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 30*MINUTE*IN_MILLISECONDS); //Begin phase 2 by spawning Nefarian and what not - if (m_uiSpawnedAdds >= 42) + if (m_uiSpawnedAdds >= MAX_DRAKE_SUMMONS) { //Teleport Victor Nefarius way out of the map //MapManager::Instance().GetMap(m_creature->GetMapId(), m_creature)->CreatureRelocation(m_creature,0,0,-5000,0); @@ -216,16 +223,7 @@ struct MANGOS_DLL_DECL boss_victor_nefariusAI : public ScriptedAI m_creature->NearTeleportTo(aNefarianLocs[3].m_fX, aNefarianLocs[3].m_fY, aNefarianLocs[3].m_fZ, 0.0f); //Spawn nef and have him attack a random target - Creature* Nefarian = m_creature->SummonCreature(NPC_NEFARIAN, aNefarianLocs[2].m_fX, aNefarianLocs[2].m_fY, aNefarianLocs[2].m_fZ, 0, TEMPSUMMON_DEAD_DESPAWN, 0); - target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0); - - if (target && Nefarian) - { - Nefarian->AI()->AttackStart(target); - Nefarian->setFaction(103); - m_uiNefarianGUID = Nefarian->GetGUID(); - } - else error_log("SD2: Blackwing Lair: Unable to spawn nefarian properly."); + m_creature->SummonCreature(NPC_NEFARIAN, aNefarianLocs[2].m_fX, aNefarianLocs[2].m_fY, aNefarianLocs[2].m_fZ, 0, TEMPSUMMON_DEAD_DESPAWN, 0); } m_uiAddSpawnTimer = 4000; @@ -285,6 +283,7 @@ bool GossipSelect_boss_victor_nefarius(Player* pPlayer, Creature* pCreature, uin DoScriptText(SAY_GAMESBEGIN_2, pCreature); // remove gossip, set hostile and attack pCreature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); + pCreature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); pCreature->setFaction(FACTION_BLACK_DRAGON); pCreature->CastSpell(pCreature, SPELL_NEFARIUS_BARRIER, false); pCreature->AI()->AttackStart(pPlayer); diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index f2798ceb7..0b4816f7e 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2033" + #define SD2_REVISION_NR "2034" #endif // __SD2_REVISION_NR_H__ From c35abb252a2bf6aad41db63b69bf2ae580d64fa8 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Sun, 17 Apr 2011 12:34:20 +0200 Subject: [PATCH 0014/1172] [2035] Make BWL-Nefarian encounter playable * Use MovePoint to get Nefarian to combat area * Replace invisible hack by spell with direct invisible hack (prevents unwanted evading) * Make interaction between Nefarius and Nefarian more clear * TODO: As of changed handling, some thing can be improved more easily now - patches welcome :) Signed-off-by: Schmoozerd --- .../blackwing_lair/boss_nefarian.cpp | 21 +++++ .../blackwing_lair/boss_victor_nefarius.cpp | 83 ++++++++++--------- sd2_revision_nr.h | 2 +- 3 files changed, 68 insertions(+), 38 deletions(-) diff --git a/scripts/eastern_kingdoms/blackwing_lair/boss_nefarian.cpp b/scripts/eastern_kingdoms/blackwing_lair/boss_nefarian.cpp index aeb173cf0..332b7ac29 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/boss_nefarian.cpp +++ b/scripts/eastern_kingdoms/blackwing_lair/boss_nefarian.cpp @@ -23,6 +23,7 @@ EndScriptData */ #include "precompiled.h" #include "blackwing_lair.h" +#include "TemporarySummon.h" enum { @@ -113,13 +114,33 @@ struct MANGOS_DLL_DECL boss_nefarianAI : public ScriptedAI void JustReachedHome() { if (m_pInstance) + { m_pInstance->SetData(TYPE_NEFARIAN, FAIL); + + // Cleanup encounter + if (m_creature->IsTemporarySummon()) + { + TemporarySummon* pTemporary = (TemporarySummon*)m_creature; + + if (Creature* pNefarius = m_creature->GetMap()->GetCreature(pTemporary->GetSummonerGuid())) + pNefarius->AI()->EnterEvadeMode(); + } + + m_creature->ForcedDespawn(); + } } void Aggro(Unit* pWho) { DoScriptText(SAY_AGGRO, m_creature); + // Remove flying in case Nefarian aggroes before his combat point was reached + if (m_creature->HasSplineFlag(SPLINEFLAG_FLYING)) + { + m_creature->SetByteValue(UNIT_FIELD_BYTES_1, 3, 0); + m_creature->RemoveSplineFlag(SPLINEFLAG_FLYING); + } + DoCastSpellIfCan(m_creature, SPELL_SHADOWFLAME_INITIAL); } diff --git a/scripts/eastern_kingdoms/blackwing_lair/boss_victor_nefarius.cpp b/scripts/eastern_kingdoms/blackwing_lair/boss_victor_nefarius.cpp index 3c6be8136..d5f8f93f1 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/boss_victor_nefarius.cpp +++ b/scripts/eastern_kingdoms/blackwing_lair/boss_victor_nefarius.cpp @@ -62,12 +62,13 @@ struct SpawnLocation float m_fX, m_fY, m_fZ; }; -static const SpawnLocation aNefarianLocs[4] = +static const SpawnLocation aNefarianLocs[5] = { {-7591.151f, -1204.051f, 476.800f}, // adds 1 & 2 {-7514.598f, -1150.448f, 476.796f}, {-7445.0f, -1332.0f, 536.0f}, // nefarian {-7592.0f, -1264.0f, 481.0f}, // hide pos + {-7493.377f, -1258.85f, 478.30f}, // nefarian fly pos }; static const uint32 aPossibleDrake[MAX_DRAKES] = {NPC_BRONZE_DRAKANOID, NPC_BLUE_DRAKANOID, NPC_RED_DRAKANOID, NPC_GREEN_DRAKANOID, NPC_BLACK_DRAKANOID}; @@ -75,10 +76,10 @@ static const uint32 aPossibleDrake[MAX_DRAKES] = {NPC_BRONZE_DRAKANOID, NPC_BLUE //This script is complicated //Instead of morphing Victor Nefarius we will have him control phase 1 //And then have him spawn "Nefarian" for phase 2 -//When phase 2 starts Victor Nefarius will go into hiding and stop attacking -//If Nefarian despawns because he killed the players then this guy will EnterEvadeMode +//When phase 2 starts Victor Nefarius will go invisible and stop attacking +//If Nefarian reched home because nef killed the players then nef will trigger this guy to EnterEvadeMode //and allow players to start the event over -//If nefarian dies then he will kill himself then he will kill himself in his hiding place +//If nefarian dies then he will kill himself then he will be despawned in Nefarian script //To prevent players from doing the event twice struct MANGOS_DLL_DECL boss_victor_nefariusAI : public ScriptedAI @@ -109,8 +110,6 @@ struct MANGOS_DLL_DECL boss_victor_nefariusAI : public ScriptedAI uint32 m_uiResetTimer; uint32 m_uiDrakeTypeOne; uint32 m_uiDrakeTypeTwo; - uint64 m_uiNefarianGUID; - uint32 m_uiNefCheckTime; void Reset() { @@ -119,11 +118,13 @@ struct MANGOS_DLL_DECL boss_victor_nefariusAI : public ScriptedAI m_uiShadowBoltTimer = 5000; m_uiFearTimer = 8000; m_uiResetTimer = 15 * MINUTE * IN_MILLISECONDS; - m_uiNefarianGUID = 0; - m_uiNefCheckTime = 2000; // set gossip flag to begin the event m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); + + // Make visible if needed + if (m_creature->GetVisibility() != VISIBILITY_ON) + m_creature->SetVisibility(VISIBILITY_ON); } void Aggro(Unit* pWho) @@ -145,19 +146,43 @@ struct MANGOS_DLL_DECL boss_victor_nefariusAI : public ScriptedAI { if (pSummoned->GetEntry() == NPC_NEFARIAN) { - m_uiNefarianGUID = pSummoned->GetEntry(); pSummoned->RemoveSplineFlag(SPLINEFLAG_WALKMODE); - pSummoned->SetSplineFlags(SPLINEFLAG_FLYING); + + // see boss_onyxia (also note the removal of this in boss_nefarian) + pSummoned->SetByteValue(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_UNK_2); + pSummoned->AddSplineFlag(SPLINEFLAG_FLYING); + + // Let Nefarian fly towards combat area + pSummoned->GetMotionMaster()->MovePoint(1, aNefarianLocs[4].m_fX, aNefarianLocs[4].m_fY, aNefarianLocs[4].m_fZ); } else + { ++m_uiSpawnedAdds; - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) - pSummoned->AI()->AttackStart(pTarget); + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + pSummoned->AI()->AttackStart(pTarget); + } pSummoned->SetRespawnDelay(7*DAY); } + void SummonedMovementInform(Creature* pSummoned, uint32 uiMotionType, uint32 uiPointId) + { + // If Nefarian has reached combat area, let him attack + if (pSummoned->GetEntry() == NPC_NEFARIAN && uiMotionType == POINT_MOTION_TYPE && uiPointId == 1) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + pSummoned->AI()->AttackStart(pTarget); + } + } + + void SummonedCreatureJustDied(Creature* pSummoned) + { + // Despawn self when Nefarian is killed + if (pSummoned->GetEntry() == NPC_NEFARIAN) + m_creature->ForcedDespawn(); + } + void UpdateAI(const uint32 uiDiff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) @@ -204,7 +229,7 @@ struct MANGOS_DLL_DECL boss_victor_nefariusAI : public ScriptedAI uiCreatureId = urand(0, 2) ? m_uiDrakeTypeTwo : NPC_CHROMATIC_DRAKANOID; m_creature->SummonCreature(uiCreatureId, aNefarianLocs[1].m_fX, aNefarianLocs[1].m_fY, aNefarianLocs[1].m_fZ, 5.000, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 30*MINUTE*IN_MILLISECONDS); - //Begin phase 2 by spawning Nefarian and what not + //Begin phase 2 by spawning Nefarian if (m_uiSpawnedAdds >= MAX_DRAKE_SUMMONS) { //Teleport Victor Nefarius way out of the map @@ -214,16 +239,19 @@ struct MANGOS_DLL_DECL boss_victor_nefariusAI : public ScriptedAI m_creature->InterruptNonMeleeSpells(false); //Root self - DoCastSpellIfCan(m_creature,33356); + DoCastSpellIfCan(m_creature, 33356, CAST_TRIGGERED); //Make super invis - DoCastSpellIfCan(m_creature,8149); + if (m_creature->GetVisibility() != VISIBILITY_OFF) + m_creature->SetVisibility(VISIBILITY_OFF); + // Do not teleport him away, this is not needed (invisible and rooted) //Teleport self to a hiding spot - m_creature->NearTeleportTo(aNefarianLocs[3].m_fX, aNefarianLocs[3].m_fY, aNefarianLocs[3].m_fZ, 0.0f); + //m_creature->NearTeleportTo(aNefarianLocs[3].m_fX, aNefarianLocs[3].m_fY, aNefarianLocs[3].m_fZ, 0.0f); - //Spawn nef and have him attack a random target - m_creature->SummonCreature(NPC_NEFARIAN, aNefarianLocs[2].m_fX, aNefarianLocs[2].m_fY, aNefarianLocs[2].m_fZ, 0, TEMPSUMMON_DEAD_DESPAWN, 0); + // Spawn Nefarian + // Summon as active, to be able to work proper! + m_creature->SummonCreature(NPC_NEFARIAN, aNefarianLocs[2].m_fX, aNefarianLocs[2].m_fY, aNefarianLocs[2].m_fZ, 0, TEMPSUMMON_DEAD_DESPAWN, 0, true); } m_uiAddSpawnTimer = 4000; @@ -231,25 +259,6 @@ struct MANGOS_DLL_DECL boss_victor_nefariusAI : public ScriptedAI else m_uiAddSpawnTimer -= uiDiff; } - else if (m_uiNefarianGUID) - { - if (m_uiNefCheckTime < uiDiff) - { - Creature* pNefarian = m_creature->GetMap()->GetCreature(m_uiNefarianGUID); - - //If nef is dead then we die to so the players get out of combat - //and cannot repeat the event - if (!pNefarian || !pNefarian->isAlive()) - { - m_uiNefarianGUID = 0; - m_creature->ForcedDespawn(); - } - - m_uiNefCheckTime = 2000; - } - else - m_uiNefCheckTime -= uiDiff; - } } }; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 0b4816f7e..d4ec9f1ba 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2034" + #define SD2_REVISION_NR "2035" #endif // __SD2_REVISION_NR_H__ From 98d02aefebd5c5afdf22a91b320e92e9f8cbd479 Mon Sep 17 00:00:00 2001 From: NoFantasy Date: Sun, 17 Apr 2011 17:26:56 +0200 Subject: [PATCH 0015/1172] [2036] Add a few emotes for text related to quest 12589 Also remove not expected despawn + add KillCredit in related spell dummy effects Signed-off-by: NoFantasy --- scripts/world/spell_scripts.cpp | 9 +++++++-- sd2_revision_nr.h | 2 +- sql/scriptdev2_script_full.sql | 6 +++--- sql/updates/r2036_scriptdev2.sql | 3 +++ 4 files changed, 14 insertions(+), 6 deletions(-) create mode 100644 sql/updates/r2036_scriptdev2.sql diff --git a/scripts/world/spell_scripts.cpp b/scripts/world/spell_scripts.cpp index e362c4a12..5114eb76c 100644 --- a/scripts/world/spell_scripts.cpp +++ b/scripts/world/spell_scripts.cpp @@ -863,10 +863,13 @@ bool EffectDummyCreature_spell_dummy_npc(Unit* pCaster, uint32 uiSpellId, SpellE { if (uiEffIndex == EFFECT_INDEX_0) { + if (pCaster->GetTypeId() == TYPEID_PLAYER) + ((Player*)pCaster)->KilledMonsterCredit(pCreatureTarget->GetEntry(), pCreatureTarget->GetObjectGuid()); + pCreatureTarget->CastSpell(pCreatureTarget, SPELL_APPLE_FALLS_TO_GROUND, false); + if (Creature* pLuckyWilhelm = GetClosestCreatureWithEntry(pCreatureTarget, NPC_LUCKY_WILHELM, 2*INTERACTION_DISTANCE)) DoScriptText(SAY_LUCKY_HIT_APPLE, pLuckyWilhelm); - pCreatureTarget->ForcedDespawn(100); } return true; } @@ -880,6 +883,7 @@ bool EffectDummyCreature_spell_dummy_npc(Unit* pCaster, uint32 uiSpellId, SpellE case 2: DoScriptText(SAY_LUCKY_HIT_2, pCreatureTarget); break; case 3: DoScriptText(SAY_LUCKY_HIT_3, pCreatureTarget); break; } + if (Creature* pDrostan = GetClosestCreatureWithEntry(pCreatureTarget, NPC_DROSTAN, 4*INTERACTION_DISTANCE)) DoScriptText(urand(0, 1) ? SAY_DROSTAN_GOT_LUCKY_1 : SAY_DROSTAN_GOT_LUCKY_2, pDrostan); } @@ -889,8 +893,9 @@ bool EffectDummyCreature_spell_dummy_npc(Unit* pCaster, uint32 uiSpellId, SpellE { if (uiEffIndex == EFFECT_INDEX_0) { - if (Creature* pDrostan = GetClosestCreatureWithEntry(pCreatureTarget, NPC_DROSTAN, 4*INTERACTION_DISTANCE)) + if (Creature* pDrostan = GetClosestCreatureWithEntry(pCreatureTarget, NPC_DROSTAN, 5*INTERACTION_DISTANCE)) DoScriptText(urand(0, 1) ? SAY_DROSTAN_HIT_BIRD_1 : SAY_DROSTAN_HIT_BIRD_2, pDrostan); + pCreatureTarget->DealDamage(pCreatureTarget, pCreatureTarget->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); } return true; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index d4ec9f1ba..6bcd05662 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2035" + #define SD2_REVISION_NR "2036" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index d14d58c84..3a3b152c3 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -692,10 +692,10 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1000644,'Ouch! That\'s it, I quit the target business!',0,0,0,0,'SAY_LUCKY_HIT_1'), (-1000645,'My ear! You grazed my ear!',0,0,0,0,'SAY_LUCKY_HIT_2'), -(-1000646,'Not the \'stache! Now I\'m asymmetrical!',0,0,0,0,'SAY_LUCKY_HIT_3'), -(-1000647,'Good shot!',0,0,0,0,'SAY_LUCKY_HIT_APPLE'), +(-1000646,'Not the \'stache! Now I\'m asymmetrical!',0,0,0,5,'SAY_LUCKY_HIT_3'), +(-1000647,'Good shot!',0,0,0,4,'SAY_LUCKY_HIT_APPLE'), (-1000648,'Stop whining. You\'ve still got your luck.',0,0,0,0,'SAY_DROSTAN_GOT_LUCKY_1'), -(-1000649,'Bah, it\'s an improvement.',0,0,0,0,'SAY_DROSTAN_GOT_LUCKY_2'), +(-1000649,'Bah, it\'s an improvement.',0,0,0,11,'SAY_DROSTAN_GOT_LUCKY_2'), (-1000650,'Calm down lad, it\'s just a birdshot!',0,0,0,0,'SAY_DROSTAN_HIT_BIRD_1'), (-1000651,'The only thing hurt is your pride, lad! Buck up!',0,0,0,0,'SAY_DROSTAN_HIT_BIRD_2'); diff --git a/sql/updates/r2036_scriptdev2.sql b/sql/updates/r2036_scriptdev2.sql new file mode 100644 index 000000000..890db6725 --- /dev/null +++ b/sql/updates/r2036_scriptdev2.sql @@ -0,0 +1,3 @@ +UPDATE script_texts SET emote=5 WHERE entry=-1000646; +UPDATE script_texts SET emote=4 WHERE entry=-1000647; +UPDATE script_texts SET emote=11 WHERE entry=-1000649; From 66247b1697403791a3c23f7970d9aceef79a7a8d Mon Sep 17 00:00:00 2001 From: NeatElves Date: Sun, 17 Apr 2011 20:23:40 +0200 Subject: [PATCH 0016/1172] [2037] Remove script npc_arete It is expected to now be handled by database gossip Signed-off-by: Schmoozerd --- scripts/northrend/icecrown.cpp | 87 +--------------------------------- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 - sql/updates/r2037_mangos.sql | 1 + 4 files changed, 3 insertions(+), 88 deletions(-) create mode 100644 sql/updates/r2037_mangos.sql diff --git a/scripts/northrend/icecrown.cpp b/scripts/northrend/icecrown.cpp index a296fa571..f406333f9 100644 --- a/scripts/northrend/icecrown.cpp +++ b/scripts/northrend/icecrown.cpp @@ -17,95 +17,16 @@ /* ScriptData SDName: Icecrown SD%Complete: 100 -SDComment: Quest support: 12807, Vendor support: 34885 +SDComment: Vendor support: 34885 SDCategory: Icecrown EndScriptData */ /* ContentData -npc_arete npc_dame_evniki_kapsalis EndContentData */ #include "precompiled.h" -/*###### -## npc_arete -######*/ - -#define GOSSIP_ARETE_ITEM1 "Lord-Commander, I would hear your tale." -#define GOSSIP_ARETE_ITEM2 "" -#define GOSSIP_ARETE_ITEM3 "I thought that they now called themselves the Scarlet Onslaught?" -#define GOSSIP_ARETE_ITEM4 "Where did the grand admiral go?" -#define GOSSIP_ARETE_ITEM5 "That's fine. When do I start?" -#define GOSSIP_ARETE_ITEM6 "Let's finish this!" -#define GOSSIP_ARETE_ITEM7 "That's quite a tale, Lord-Commander." - -enum -{ - GOSSIP_TEXTID_ARETE1 = 13525, - GOSSIP_TEXTID_ARETE2 = 13526, - GOSSIP_TEXTID_ARETE3 = 13527, - GOSSIP_TEXTID_ARETE4 = 13528, - GOSSIP_TEXTID_ARETE5 = 13529, - GOSSIP_TEXTID_ARETE6 = 13530, - GOSSIP_TEXTID_ARETE7 = 13531, - - QUEST_THE_STORY_THUS_FAR = 12807 -}; - -bool GossipHello_npc_arete(Player* pPlayer, Creature* pCreature) -{ - if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetGUID()); - - if (pPlayer->GetQuestStatus(QUEST_THE_STORY_THUS_FAR) == QUEST_STATUS_INCOMPLETE) - { - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ARETE_ITEM1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_ARETE1, pCreature->GetGUID()); - return true; - } - - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); - return true; -} - -bool GossipSelect_npc_arete(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) -{ - switch(uiAction) - { - case GOSSIP_ACTION_INFO_DEF+1: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ARETE_ITEM2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); - pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_ARETE2, pCreature->GetGUID()); - break; - case GOSSIP_ACTION_INFO_DEF+2: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ARETE_ITEM3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); - pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_ARETE3, pCreature->GetGUID()); - break; - case GOSSIP_ACTION_INFO_DEF+3: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ARETE_ITEM4, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4); - pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_ARETE4, pCreature->GetGUID()); - break; - case GOSSIP_ACTION_INFO_DEF+4: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ARETE_ITEM5, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 5); - pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_ARETE5, pCreature->GetGUID()); - break; - case GOSSIP_ACTION_INFO_DEF+5: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ARETE_ITEM6, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 6); - pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_ARETE6, pCreature->GetGUID()); - break; - case GOSSIP_ACTION_INFO_DEF+6: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ARETE_ITEM7, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 7); - pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_ARETE7, pCreature->GetGUID()); - break; - case GOSSIP_ACTION_INFO_DEF+7: - pPlayer->CLOSE_GOSSIP_MENU(); - pPlayer->AreaExploredOrEventHappens(QUEST_THE_STORY_THUS_FAR); - break; - } - - return true; -} - /*###### ## npc_dame_evniki_kapsalis ######*/ @@ -135,12 +56,6 @@ void AddSC_icecrown() { Script* newscript; - newscript = new Script; - newscript->Name = "npc_arete"; - newscript->pGossipHello = &GossipHello_npc_arete; - newscript->pGossipSelect = &GossipSelect_npc_arete; - newscript->RegisterSelf(); - newscript = new Script; newscript->Name = "npc_dame_evniki_kapsalis"; newscript->pGossipHello = &GossipHello_npc_dame_evniki_kapsalis; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 6bcd05662..8aa2cbcc6 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2036" + #define SD2_REVISION_NR "2037" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index a30185af1..9d1a6ff2f 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -687,7 +687,6 @@ UPDATE instance_template SET ScriptName='instance_pit_of_saron' WHERE map=658; UPDATE creature_template SET ScriptName='boss_forgemaster_garfrost' WHERE entry=36494; /* ICECROWN */ -UPDATE creature_template SET ScriptName='npc_arete' WHERE entry=29344; UPDATE creature_template SET ScriptName='npc_dame_evniki_kapsalis' WHERE entry=34885; /* IRONFORGE */ diff --git a/sql/updates/r2037_mangos.sql b/sql/updates/r2037_mangos.sql new file mode 100644 index 000000000..4f67f0281 --- /dev/null +++ b/sql/updates/r2037_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='' WHERE entry=29344; From 7624a3fee0f2d0953fff880c9f5605ba7b9c0a57 Mon Sep 17 00:00:00 2001 From: NeatElves Date: Fri, 22 Apr 2011 14:00:33 +0200 Subject: [PATCH 0017/1172] [2038] Remove no longer needed script for npc_engineering_tele_trinket Signed-off-by: NoFantasy --- scripts/world/npc_professions.cpp | 138 ------------------------------ sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 - sql/updates/r2038_mangos.sql | 1 + 4 files changed, 2 insertions(+), 140 deletions(-) create mode 100644 sql/updates/r2038_mangos.sql diff --git a/scripts/world/npc_professions.cpp b/scripts/world/npc_professions.cpp index a2d194d09..c7f9325d4 100644 --- a/scripts/world/npc_professions.cpp +++ b/scripts/world/npc_professions.cpp @@ -811,138 +811,6 @@ bool GossipSelect_npc_prof_blacksmith(Player* pPlayer, Creature* pCreature, uint return true; }*/ -/*### -# engineering trinkets -###*/ - -enum -{ - NPC_ZAP = 14742, - NPC_JHORDY = 14743, - NPC_KABLAM = 21493, - NPC_SMILES = 21494, - - SPELL_LEARN_TO_EVERLOOK = 23490, - SPELL_LEARN_TO_GADGET = 23491, - SPELL_LEARN_TO_AREA52 = 36956, - SPELL_LEARN_TO_TOSHLEY = 36957, - - SPELL_TO_EVERLOOK = 23486, - SPELL_TO_GADGET = 23489, - SPELL_TO_AREA52 = 36954, - SPELL_TO_TOSHLEY = 36955, - - ITEM_GNOMISH_CARD = 10790, - ITEM_GOBLIN_CARD = 10791 -}; - -#define GOSSIP_ITEM_ZAP "[PH] Unknown" -#define GOSSIP_ITEM_JHORDY "I must build a beacon for this marvelous device!" -#define GOSSIP_ITEM_KABLAM "[PH] Unknown" -#define GOSSIP_ITEM_SMILES "[PH] Unknown" - -bool GossipHello_npc_engineering_tele_trinket(Player* pPlayer, Creature* pCreature) -{ - uint32 uiNpcTextId = 0; - std::string strGossipItem; - bool bCanLearn = false; - - if (pPlayer->HasSkill(SKILL_ENGINEERING)) - { - switch(pCreature->GetEntry()) - { - case NPC_ZAP: - uiNpcTextId = 7249; - if (pPlayer->GetBaseSkillValue(SKILL_ENGINEERING) >= 260 && pPlayer->HasSpell(S_GOBLIN)) - { - if (!pPlayer->HasSpell(SPELL_TO_EVERLOOK)) - { - bCanLearn = true; - strGossipItem = GOSSIP_ITEM_ZAP; - } - else if (pPlayer->HasSpell(SPELL_TO_EVERLOOK)) - uiNpcTextId = 0; - } - break; - case NPC_JHORDY: - uiNpcTextId = 7251; - if (pPlayer->GetBaseSkillValue(SKILL_ENGINEERING) >= 260 && pPlayer->HasSpell(S_GNOMISH)) - { - if (!pPlayer->HasSpell(SPELL_TO_GADGET)) - { - bCanLearn = true; - strGossipItem = GOSSIP_ITEM_JHORDY; - } - else if (pPlayer->HasSpell(SPELL_TO_GADGET)) - uiNpcTextId = 7252; - } - break; - case NPC_KABLAM: - uiNpcTextId = 10365; - if (pPlayer->GetBaseSkillValue(SKILL_ENGINEERING) >= 350 && pPlayer->HasSpell(S_GOBLIN)) - { - if (!pPlayer->HasSpell(SPELL_TO_AREA52)) - { - bCanLearn = true; - strGossipItem = GOSSIP_ITEM_KABLAM; - } - else if (pPlayer->HasSpell(SPELL_TO_AREA52)) - uiNpcTextId = 0; - } - break; - case NPC_SMILES: - uiNpcTextId = 10363; - if (pPlayer->GetBaseSkillValue(SKILL_ENGINEERING) >= 350 && pPlayer->HasSpell(S_GNOMISH)) - { - if (!pPlayer->HasSpell(SPELL_TO_TOSHLEY)) - { - bCanLearn = true; - strGossipItem = GOSSIP_ITEM_SMILES; - } - else if (pPlayer->HasSpell(SPELL_TO_TOSHLEY)) - uiNpcTextId = 0; - } - break; - } - } - - if (bCanLearn) - { - if (pPlayer->HasItemCount(ITEM_GOBLIN_CARD,1) || pPlayer->HasItemCount(ITEM_GNOMISH_CARD,1)) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, strGossipItem, pCreature->GetEntry(), GOSSIP_ACTION_INFO_DEF+1); - } - - pPlayer->SEND_GOSSIP_MENU(uiNpcTextId ? uiNpcTextId : pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); - return true; -} - -bool GossipSelect_npc_engineering_tele_trinket(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) -{ - if (uiAction == GOSSIP_ACTION_INFO_DEF+1) - pPlayer->CLOSE_GOSSIP_MENU(); - - if (uiSender != pCreature->GetEntry()) - return true; - - switch(uiSender) - { - case NPC_ZAP: - pPlayer->CastSpell(pPlayer,SPELL_LEARN_TO_EVERLOOK,false); - break; - case NPC_JHORDY: - pPlayer->CastSpell(pPlayer,SPELL_LEARN_TO_GADGET,false); - break; - case NPC_KABLAM: - pPlayer->CastSpell(pPlayer,SPELL_LEARN_TO_AREA52,false); - break; - case NPC_SMILES: - pPlayer->CastSpell(pPlayer,SPELL_LEARN_TO_TOSHLEY,false); - break; - } - - return true; -} - /*### # start menues leatherworking ###*/ @@ -1315,12 +1183,6 @@ void AddSC_npc_professions() newscript->pGossipSelect = &GossipSelect_npc_prof_blacksmith; newscript->RegisterSelf(); - newscript = new Script; - newscript->Name = "npc_engineering_tele_trinket"; - newscript->pGossipHello = &GossipHello_npc_engineering_tele_trinket; - newscript->pGossipSelect = &GossipSelect_npc_engineering_tele_trinket; - newscript->RegisterSelf(); - newscript = new Script; newscript->Name = "npc_prof_leather"; newscript->pGossipHello = &GossipHello_npc_prof_leather; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 8aa2cbcc6..5c0755535 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2037" + #define SD2_REVISION_NR "2038" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 9d1a6ff2f..1356e58c7 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -129,7 +129,6 @@ UPDATE creature_template SET ScriptName='npc_doctor' WHERE entry IN (12939,12920 UPDATE creature_template SET ScriptName='npc_injured_patient' WHERE entry IN (12936,12937,12938,12923,12924,12925); UPDATE creature_template SET ScriptName='npc_prof_alchemy' WHERE entry IN (17909,19052,22427); UPDATE creature_template SET ScriptName='npc_prof_blacksmith' WHERE entry IN (5164,11145,11146,11176,11177,11178,11191,11192,11193); -UPDATE creature_template SET ScriptName='npc_engineering_tele_trinket' WHERE entry IN (14742,14743,21493,21494); UPDATE creature_template SET ScriptName='npc_prof_leather' WHERE entry IN (7866,7867,7868,7869,7870,7871); UPDATE creature_template SET ScriptName='npc_prof_tailor' WHERE entry IN (22208,22212,22213); UPDATE creature_template SET ScriptName='npc_rogue_trainer' WHERE entry IN (918,4163,3328,4583,5165,5167,13283,16684); diff --git a/sql/updates/r2038_mangos.sql b/sql/updates/r2038_mangos.sql new file mode 100644 index 000000000..c95ac91cb --- /dev/null +++ b/sql/updates/r2038_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='' WHERE entry IN (14742,14743,21493,21494); From 153c0e258f896427d5db20d2a562a76e309579a1 Mon Sep 17 00:00:00 2001 From: klark20 Date: Sat, 23 Apr 2011 07:39:28 +0200 Subject: [PATCH 0018/1172] [2039] npc_mcgoyver has created a smarter way to help players in the game Disclaimer: this no longer needed script was removed only by using items being available in a 20 cm radius around the keyboard. --- scripts/northrend/howling_fjord.cpp | 73 +---------------------------- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 - sql/updates/r2039_mangos.sql | 1 + 4 files changed, 3 insertions(+), 74 deletions(-) create mode 100644 sql/updates/r2039_mangos.sql diff --git a/scripts/northrend/howling_fjord.cpp b/scripts/northrend/howling_fjord.cpp index b6cb7a042..24c31616c 100644 --- a/scripts/northrend/howling_fjord.cpp +++ b/scripts/northrend/howling_fjord.cpp @@ -17,7 +17,7 @@ /* ScriptData SDName: Howling_Fjord SD%Complete: ? -SDComment: Quest support: 11221, 11483, 11300, 11464, 11343 +SDComment: Quest support: 11221, 11300, 11464, 11343 SDCategory: Howling Fjord EndScriptData */ @@ -27,7 +27,6 @@ at_ancient_male_vrykul npc_daegarn npc_deathstalker_razael - TODO, can be moved to database npc_dark_ranger_lyana - TODO, can be moved to database -npc_mcgoyver - TODO, can be moved to database npc_silvermoon_harry EndContentData */ @@ -398,70 +397,6 @@ bool GossipSelect_npc_greer_orehammer(Player* pPlayer, Creature* pCreature, uint return true; } -/*###### -## npc_mcgoyver - TODO, can be moved to database -######*/ - -#define GOSSIP_ITEM_MCGOYVER1 "Walt sent me to pick up some dark iron ingots." -#define GOSSIP_ITEM_MCGOYVER2 "Yarp." - -enum -{ - QUEST_WE_CAN_REBUILD_IT = 11483, - GOSSIP_TEXTID_MCGOYVER = 12193, - ITEM_DARK_IRON_INGOTS = 34135, - SPELL_MCGOYVER_TAXI_EXPLORERSLEAGUE = 44280, - SPELL_MCGOYVER_CREATE_DARK_IRON_INGOTS = 44512 -}; - -bool GossipHello_npc_mcgoyver(Player* pPlayer, Creature* pCreature) -{ - switch(pPlayer->GetQuestStatus(QUEST_WE_CAN_REBUILD_IT)) - { - case QUEST_STATUS_INCOMPLETE: - if (!pPlayer->HasItemCount(ITEM_DARK_IRON_INGOTS, 1, true)) - { - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_MCGOYVER1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); - } - else - { - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_MCGOYVER2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); - pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_MCGOYVER, pCreature->GetGUID()); - } - break; - case QUEST_STATUS_COMPLETE: - if (!pPlayer->GetQuestRewardStatus(QUEST_WE_CAN_REBUILD_IT)) - { - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_MCGOYVER2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); - pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_MCGOYVER, pCreature->GetGUID()); - break; - } - default: - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); - } - - return true; -} - -bool GossipSelect_npc_mcgoyver(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) -{ - switch(uiAction) - { - case GOSSIP_ACTION_INFO_DEF+1: - pCreature->CastSpell(pPlayer, SPELL_MCGOYVER_CREATE_DARK_IRON_INGOTS, true); - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_MCGOYVER2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); - pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_MCGOYVER, pCreature->GetGUID()); - break; - case GOSSIP_ACTION_INFO_DEF+2: - pPlayer->CLOSE_GOSSIP_MENU(); - pCreature->CastSpell(pPlayer, SPELL_MCGOYVER_TAXI_EXPLORERSLEAGUE, true); - break; - } - - return true; -} - /*###### ## npc_silvermoon_harry ######*/ @@ -674,12 +609,6 @@ void AddSC_howling_fjord() pNewScript->pGossipSelect = &GossipSelect_npc_greer_orehammer; pNewScript->RegisterSelf(); - pNewScript = new Script; - pNewScript->Name = "npc_mcgoyver"; - pNewScript->pGossipHello = &GossipHello_npc_mcgoyver; - pNewScript->pGossipSelect = &GossipSelect_npc_mcgoyver; - pNewScript->RegisterSelf(); - pNewScript = new Script; pNewScript->Name = "npc_silvermoon_harry"; pNewScript->GetAI = &GetAI_npc_silvermoon_harry; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 5c0755535..0427941c2 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2038" + #define SD2_REVISION_NR "2039" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 1356e58c7..a71b90492 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -667,7 +667,6 @@ UPDATE creature_template SET ScriptName='npc_daegarn' WHERE entry=24151; UPDATE creature_template SET ScriptName='npc_deathstalker_razael' WHERE entry=23998; UPDATE creature_template SET ScriptName='npc_dark_ranger_lyana' WHERE entry=23778; UPDATE creature_template SET ScriptName='npc_greer_orehammer' WHERE entry=23859; -UPDATE creature_template SET ScriptName='npc_mcgoyver' WHERE entry=24040; UPDATE creature_template SET ScriptName='npc_silvermoon_harry' WHERE entry=24539; /* */ diff --git a/sql/updates/r2039_mangos.sql b/sql/updates/r2039_mangos.sql new file mode 100644 index 000000000..fa65242d0 --- /dev/null +++ b/sql/updates/r2039_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='' WHERE entry=24040; From 0cae2948d111433e482d2ae7adb6a11a1a4040ce Mon Sep 17 00:00:00 2001 From: NoFantasy Date: Mon, 25 Apr 2011 13:02:42 +0200 Subject: [PATCH 0019/1172] [2040] Fix first door opening in instance_deadmines Signed-off-by: NoFantasy --- .../eastern_kingdoms/deadmines/deadmines.h | 7 ++- .../deadmines/instance_deadmines.cpp | 58 +++++++++++++++---- sd2_revision_nr.h | 2 +- 3 files changed, 53 insertions(+), 14 deletions(-) diff --git a/scripts/eastern_kingdoms/deadmines/deadmines.h b/scripts/eastern_kingdoms/deadmines/deadmines.h index 5e803e291..125edbbf9 100644 --- a/scripts/eastern_kingdoms/deadmines/deadmines.h +++ b/scripts/eastern_kingdoms/deadmines/deadmines.h @@ -7,17 +7,22 @@ enum { - MAX_ENCOUNTER = 1, + MAX_ENCOUNTER = 2, TYPE_DEFIAS_ENDDOOR = 1, + TYPE_RHAHKZOR = 2, + DATA_DEFIAS_DOOR = 2, INST_SAY_ALARM1 = -1036000, INST_SAY_ALARM2 = -1036001, + GO_FACTORY_DOOR = 13965, GO_DOOR_LEVER = 101833, GO_IRON_CLAD = 16397, GO_DEFIAS_CANNON = 16398, + + NPC_RHAHKZOR = 644, NPC_MR_SMITE = 646, NPC_PIRATE = 657 }; diff --git a/scripts/eastern_kingdoms/deadmines/instance_deadmines.cpp b/scripts/eastern_kingdoms/deadmines/instance_deadmines.cpp index e958b933c..5634f7666 100644 --- a/scripts/eastern_kingdoms/deadmines/instance_deadmines.cpp +++ b/scripts/eastern_kingdoms/deadmines/instance_deadmines.cpp @@ -30,6 +30,7 @@ struct MANGOS_DLL_DECL instance_deadmines : public ScriptedInstance uint32 m_auiEncounter[MAX_ENCOUNTER]; + uint64 m_uiFactoryDoorGUID; uint64 m_uiIronCladGUID; uint64 m_uiCannonGUID; uint64 m_uiSmiteGUID; @@ -41,6 +42,7 @@ struct MANGOS_DLL_DECL instance_deadmines : public ScriptedInstance { memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); + m_uiFactoryDoorGUID = 0; m_uiIronCladGUID = 0; m_uiCannonGUID = 0; m_uiSmiteGUID = 0; @@ -57,33 +59,65 @@ struct MANGOS_DLL_DECL instance_deadmines : public ScriptedInstance void OnObjectCreate(GameObject* pGo) { - if (pGo->GetEntry() == GO_IRON_CLAD) - m_uiIronCladGUID = pGo->GetGUID(); + switch(pGo->GetEntry()) + { + case GO_FACTORY_DOOR: + m_uiFactoryDoorGUID = pGo->GetGUID(); + if (GetData(TYPE_RHAHKZOR) == DONE) + pGo->SetGoState(GO_STATE_ACTIVE); + break; + case GO_IRON_CLAD: + m_uiIronCladGUID = pGo->GetGUID(); + break; + case GO_DEFIAS_CANNON: + m_uiCannonGUID = pGo->GetGUID(); + break; + } + } - if (pGo->GetEntry() == GO_DEFIAS_CANNON) - m_uiCannonGUID = pGo->GetGUID(); + void OnCreatureDeath(Creature* pCreature) + { + if (pCreature->GetEntry() == NPC_RHAHKZOR) + SetData(TYPE_RHAHKZOR, DONE); } void SetData(uint32 uiType, uint32 uiData) { - if (uiType == TYPE_DEFIAS_ENDDOOR) + switch(uiType) { - if (uiData == IN_PROGRESS) + case TYPE_RHAHKZOR: { - if (GameObject* pGo = instance->GetGameObject(m_uiIronCladGUID)) + if (uiData == DONE) + DoUseDoorOrButton(m_uiFactoryDoorGUID); + + m_auiEncounter[1] = uiData; + break; + } + case TYPE_DEFIAS_ENDDOOR: + { + if (uiData == IN_PROGRESS) { - pGo->SetGoState(GO_STATE_ACTIVE_ALTERNATIVE); - m_uiIronDoor_Timer = 3000; + if (GameObject* pGo = instance->GetGameObject(m_uiIronCladGUID)) + { + pGo->SetGoState(GO_STATE_ACTIVE_ALTERNATIVE); + m_uiIronDoor_Timer = 3000; + } } + m_auiEncounter[0] = uiData; + break; } - m_auiEncounter[0] = uiData; } } uint32 GetData(uint32 uiType) { - if (uiType == TYPE_DEFIAS_ENDDOOR) - return m_auiEncounter[0]; + switch(uiType) + { + case TYPE_DEFIAS_ENDDOOR: + return m_auiEncounter[0]; + case TYPE_RHAHKZOR: + return m_auiEncounter[1]; + } return 0; } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 0427941c2..f1783a37b 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2039" + #define SD2_REVISION_NR "2040" #endif // __SD2_REVISION_NR_H__ From 27cf51d15ac2959cc06ccb89dae4753dafa86bb3 Mon Sep 17 00:00:00 2001 From: NoFantasy Date: Mon, 25 Apr 2011 13:43:25 +0200 Subject: [PATCH 0020/1172] [2041] Cache guid of mr.smite's chest Can be used to obtain xyz coordinates and/or orientation for mr.smite equipment change. Signed-off-by: NoFantasy --- scripts/eastern_kingdoms/deadmines/deadmines.h | 1 + scripts/eastern_kingdoms/deadmines/instance_deadmines.cpp | 5 +++++ sd2_revision_nr.h | 2 +- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/scripts/eastern_kingdoms/deadmines/deadmines.h b/scripts/eastern_kingdoms/deadmines/deadmines.h index 125edbbf9..2dee53c32 100644 --- a/scripts/eastern_kingdoms/deadmines/deadmines.h +++ b/scripts/eastern_kingdoms/deadmines/deadmines.h @@ -21,6 +21,7 @@ enum GO_DOOR_LEVER = 101833, GO_IRON_CLAD = 16397, GO_DEFIAS_CANNON = 16398, + GO_SMITE_CHEST = 144111, // use to get correct location of mr.smites equipment changes NPC_RHAHKZOR = 644, NPC_MR_SMITE = 646, diff --git a/scripts/eastern_kingdoms/deadmines/instance_deadmines.cpp b/scripts/eastern_kingdoms/deadmines/instance_deadmines.cpp index 5634f7666..9fd1beec3 100644 --- a/scripts/eastern_kingdoms/deadmines/instance_deadmines.cpp +++ b/scripts/eastern_kingdoms/deadmines/instance_deadmines.cpp @@ -33,6 +33,7 @@ struct MANGOS_DLL_DECL instance_deadmines : public ScriptedInstance uint64 m_uiFactoryDoorGUID; uint64 m_uiIronCladGUID; uint64 m_uiCannonGUID; + uint64 m_uiSmiteChestGUID; uint64 m_uiSmiteGUID; uint32 m_uiIronDoor_Timer; @@ -45,6 +46,7 @@ struct MANGOS_DLL_DECL instance_deadmines : public ScriptedInstance m_uiFactoryDoorGUID = 0; m_uiIronCladGUID = 0; m_uiCannonGUID = 0; + m_uiSmiteChestGUID = 0; m_uiSmiteGUID = 0; m_uiIronDoor_Timer = 0; @@ -72,6 +74,9 @@ struct MANGOS_DLL_DECL instance_deadmines : public ScriptedInstance case GO_DEFIAS_CANNON: m_uiCannonGUID = pGo->GetGUID(); break; + case GO_SMITE_CHEST: + m_uiSmiteChestGUID = pGo->GetGUID(); + break; } } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index f1783a37b..59147f02b 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2040" + #define SD2_REVISION_NR "2041" #endif // __SD2_REVISION_NR_H__ From 4f073c69416f69c6efb28d7ef8423d9fc7f7b534 Mon Sep 17 00:00:00 2001 From: NoFantasy Date: Mon, 25 Apr 2011 14:41:18 +0200 Subject: [PATCH 0021/1172] [2042] Replace one hard coded value with enum constant Signed-off-by: NoFantasy --- scripts/eastern_kingdoms/deadmines/deadmines.cpp | 2 +- sd2_revision_nr.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/eastern_kingdoms/deadmines/deadmines.cpp b/scripts/eastern_kingdoms/deadmines/deadmines.cpp index 923ecb810..9513b6c99 100644 --- a/scripts/eastern_kingdoms/deadmines/deadmines.cpp +++ b/scripts/eastern_kingdoms/deadmines/deadmines.cpp @@ -33,7 +33,7 @@ bool GOUse_go_door_lever_dm(Player* pPlayer, GameObject* pGo) GameObject* pGoDoor = pInstance->instance->GetGameObject(pInstance->GetData64(DATA_DEFIAS_DOOR)); - if (pGoDoor && pGoDoor->GetGoState() == 1) + if (pGoDoor && pGoDoor->GetGoState() == GO_STATE_READY) return false; return true; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 59147f02b..1d67bffb4 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2041" + #define SD2_REVISION_NR "2042" #endif // __SD2_REVISION_NR_H__ From 8743e4f7f650cd74be9a576e5d91c20120271b71 Mon Sep 17 00:00:00 2001 From: NoFantasy Date: Mon, 25 Apr 2011 15:04:19 +0200 Subject: [PATCH 0022/1172] [2043] Correct small detail in one text. Signed-off-by: NoFantasy --- sd2_revision_nr.h | 2 +- sql/scriptdev2_script_full.sql | 2 +- sql/updates/r2043_scriptdev2.sql | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 sql/updates/r2043_scriptdev2.sql diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 1d67bffb4..eb8e6234f 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2042" + #define SD2_REVISION_NR "2043" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 3a3b152c3..8ab524218 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -730,7 +730,7 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen -- -1 036 000 DEADMINES INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES -(-1036000,'You there, check out that noise!',5775,1,7,0,'smite INST_SAY_ALARM1'), +(-1036000,'You there, check out that noise.',5775,1,7,0,'smite INST_SAY_ALARM1'), (-1036001,'We\'re under attack! A vast, ye swabs! Repel the invaders!',5777,1,7,0,'smite INST_SAY_ALARM2'); -- -1 043 000 WAILING CAVERNS diff --git a/sql/updates/r2043_scriptdev2.sql b/sql/updates/r2043_scriptdev2.sql new file mode 100644 index 000000000..c5bb54f3e --- /dev/null +++ b/sql/updates/r2043_scriptdev2.sql @@ -0,0 +1 @@ +UPDATE script_texts SET content_default='You there, check out that noise.' WHERE entry=-1036000; From 9dbf992526fdab97922c93d349704f320a20e209 Mon Sep 17 00:00:00 2001 From: NoFantasy Date: Tue, 26 Apr 2011 12:02:00 +0200 Subject: [PATCH 0023/1172] [2044] Add script for boss_mr_smite Roughly ~80% done, a few parts TODO, such as the initial combat start. Thanks to stfx for research and nerdrage for the original script idea. Signed-off-by: NoFantasy --- .../eastern_kingdoms/deadmines/deadmines.cpp | 263 +++++++++++++++++- .../deadmines/instance_deadmines.cpp | 9 +- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 + sql/scriptdev2_script_full.sql | 4 +- sql/updates/r2044_mangos.sql | 1 + sql/updates/r2044_scriptdev2.sql | 4 + 7 files changed, 278 insertions(+), 6 deletions(-) create mode 100644 sql/updates/r2044_mangos.sql create mode 100644 sql/updates/r2044_scriptdev2.sql diff --git a/scripts/eastern_kingdoms/deadmines/deadmines.cpp b/scripts/eastern_kingdoms/deadmines/deadmines.cpp index 9513b6c99..f2f53e300 100644 --- a/scripts/eastern_kingdoms/deadmines/deadmines.cpp +++ b/scripts/eastern_kingdoms/deadmines/deadmines.cpp @@ -16,14 +16,268 @@ /* ScriptData SDName: Deadmines -SD%Complete: 90 -SDComment: Contains GO for event at end door +SD%Complete: 75 +SDComment: Contains boss_mr_smite and GO for event at end door SDCategory: Deadmines EndScriptData */ #include "precompiled.h" #include "deadmines.h" +/*###### +## boss_mr_smite +######*/ + +enum +{ + SAY_PHASE_2 = -1036002, + SAY_PHASE_3 = -1036003, + + // EQUIP_ID_SWORD = 2179, // default equipment, not used in code + EQUIP_ID_AXE = 2183, + EQUIP_ID_HAMMER = 10756, + + SPELL_NIBLE_REFLEXES = 6433, // removed after phase 1 + SPELL_SMITE_SLAM = 6435, + SPELL_SMITE_STOMP = 6432, + SPELL_SMITE_HAMMER = 6436, + SPELL_THRASH = 12787, // unclear, possible 3417 (only 10% proc chance) + + PHASE_1 = 1, + PHASE_2 = 2, + PHASE_3 = 3, + PHASE_EQUIP_NULL = 4, + PHASE_EQUIP_START = 5, + PHASE_EQUIP_PROCESS = 6, + PHASE_EQUIP_END = 7, +}; + +struct MANGOS_DLL_DECL boss_mr_smiteAI : public ScriptedAI +{ + boss_mr_smiteAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } + + uint32 m_uiPhase; + uint32 m_uiEquipTimer; + uint32 m_uiSlamTimer; + + void Reset() + { + m_uiPhase = PHASE_1; + m_uiEquipTimer = 0; + m_uiSlamTimer = 9000; + + DoCastSpellIfCan(m_creature, SPELL_NIBLE_REFLEXES, CAST_TRIGGERED); + + // must assume database has the default equipment set + SetEquipmentSlots(true); + } + + void AttackedBy(Unit* pAttacker) + { + if (m_creature->getVictim()) + return; + + if (m_uiPhase > PHASE_3) + return; + + AttackStart(pAttacker); + } + + void AttackStart(Unit* pWho) + { + if (m_uiPhase > PHASE_3) + return; + + if (m_creature->Attack(pWho, true)) + { + m_creature->AddThreat(pWho); + m_creature->SetInCombatWith(pWho); + pWho->SetInCombatWith(m_creature); + + m_creature->GetMotionMaster()->MoveChase(pWho); + } + } + + void MovementInform(uint32 uiMotionType, uint32 uiPointId) + { + if (uiMotionType != POINT_MOTION_TYPE) + return; + + m_creature->SetSheath(SHEATH_STATE_UNARMED); + m_creature->SetStandState(UNIT_STAND_STATE_KNEEL); + + m_uiEquipTimer = 3000; + m_uiPhase = PHASE_EQUIP_PROCESS; + } + + void PhaseEquipStart() + { + ScriptedInstance* pInstance = (ScriptedInstance*)m_creature->GetInstanceData(); + + if (!pInstance) + return; + + GameObject* pChest = pInstance->instance->GetGameObject(pInstance->GetData64(GO_SMITE_CHEST)); + + if (!pChest) + return; + + m_uiPhase = PHASE_EQUIP_NULL; + + float fX, fY, fZ; + pChest->GetContactPoint(m_creature, fX, fY, fZ, CONTACT_DISTANCE); + + m_creature->GetMotionMaster()->Clear(); + m_creature->SetFacingToObject(pChest); + m_creature->GetMotionMaster()->MovePoint(0, fX, fY, fZ); + } + + void PhaseEquipProcess() + { + if (m_creature->GetHealthPercent() < 33.0f) + { + // It's Hammer, go Hammer! + SetEquipmentSlots(false, EQUIP_ID_HAMMER, EQUIP_UNEQUIP); + DoCastSpellIfCan(m_creature, SPELL_SMITE_HAMMER); + } + else + SetEquipmentSlots(false, EQUIP_ID_AXE, EQUIP_ID_AXE); + + m_creature->SetStandState(UNIT_STAND_STATE_STAND); + m_uiPhase = PHASE_EQUIP_END; + m_uiEquipTimer = 5000; + + Unit* pVictim = m_creature->SelectAttackingTarget(ATTACKING_TARGET_TOPAGGRO, 0); + + if (!pVictim) + { + EnterEvadeMode(); + return; + } + + // Takes longer to run further distance. Not accurate, but will probably be sufficient for most cases + if (m_creature->IsWithinDistInMap(pVictim, ATTACK_DISTANCE)) + m_uiEquipTimer -= 1000; + else if (m_creature->IsWithinDistInMap(pVictim, 2*ATTACK_DISTANCE)) + m_uiEquipTimer -= 2000; + else + m_uiEquipTimer -= 3000; + } + + void PhaseEquipEnd() + { + // We don't have getVictim, so select from threat list + Unit* pVictim = m_creature->SelectAttackingTarget(ATTACKING_TARGET_TOPAGGRO, 0); + + if (!pVictim) + { + EnterEvadeMode(); + return; + } + + m_creature->SetSheath(SHEATH_STATE_MELEE); + + m_uiPhase = m_creature->GetHealthPercent() < 33.0f ? PHASE_3 : PHASE_2; + + if (m_uiPhase == PHASE_2) + DoCastSpellIfCan(m_creature, SPELL_THRASH, CAST_TRIGGERED); + + AttackStart(pVictim); + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + { + if (m_uiEquipTimer) + { + // decrease the cooldown in between equipment change phases + if (m_uiEquipTimer > uiDiff) + { + m_uiEquipTimer -= uiDiff; + return; + } + else + m_uiEquipTimer = 0; + } + + switch(m_uiPhase) + { + case PHASE_EQUIP_START: + PhaseEquipStart(); + break; + case PHASE_EQUIP_PROCESS: + PhaseEquipProcess(); + break; + case PHASE_EQUIP_END: + PhaseEquipEnd(); + break; + } + + return; + } + + // the normal combat phases + switch(m_uiPhase) + { + case PHASE_1: + { + if (m_creature->GetHealthPercent() < 66.0f) + { + if (DoCastSpellIfCan(m_creature, SPELL_SMITE_STOMP) == CAST_OK) + { + DoScriptText(SAY_PHASE_2, m_creature); + m_uiPhase = PHASE_EQUIP_START; + m_uiEquipTimer = 2500; + + // will clear getVictim (m_attacking) + m_creature->AttackStop(true); + m_creature->RemoveAurasDueToSpell(SPELL_NIBLE_REFLEXES); + } + return; + } + break; + } + case PHASE_2: + { + if (m_creature->GetHealthPercent() < 33.0f) + { + if (DoCastSpellIfCan(m_creature, SPELL_SMITE_STOMP) == CAST_OK) + { + DoScriptText(SAY_PHASE_3, m_creature); + m_uiPhase = PHASE_EQUIP_START; + m_uiEquipTimer = 2500; + + m_creature->AttackStop(true); + m_creature->RemoveAurasDueToSpell(SPELL_THRASH); + } + return; + } + break; + } + case PHASE_3: + { + if (m_uiSlamTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_SMITE_SLAM) == CAST_OK) + m_uiSlamTimer = 11000; + } + else + m_uiSlamTimer -= uiDiff; + + break; + } + } + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_mr_smite(Creature* pCreature) +{ + return new boss_mr_smiteAI(pCreature); +} + bool GOUse_go_door_lever_dm(Player* pPlayer, GameObject* pGo) { ScriptedInstance* pInstance = (ScriptedInstance*)pGo->GetInstanceData(); @@ -57,6 +311,11 @@ void AddSC_deadmines() { Script *newscript; + newscript = new Script; + newscript->Name = "boss_mr_smite"; + newscript->GetAI = &GetAI_boss_mr_smite; + newscript->RegisterSelf(); + newscript = new Script; newscript->Name = "go_door_lever_dm"; newscript->pGOUse = &GOUse_go_door_lever_dm; diff --git a/scripts/eastern_kingdoms/deadmines/instance_deadmines.cpp b/scripts/eastern_kingdoms/deadmines/instance_deadmines.cpp index 9fd1beec3..fc0c2a04a 100644 --- a/scripts/eastern_kingdoms/deadmines/instance_deadmines.cpp +++ b/scripts/eastern_kingdoms/deadmines/instance_deadmines.cpp @@ -129,8 +129,13 @@ struct MANGOS_DLL_DECL instance_deadmines : public ScriptedInstance uint64 GetData64(uint32 uiData) { - if (uiData == DATA_DEFIAS_DOOR) - return m_uiIronCladGUID; + switch(uiData) + { + case DATA_DEFIAS_DOOR: + return m_uiIronCladGUID; + case GO_SMITE_CHEST: + return m_uiSmiteChestGUID; + } return 0; } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index eb8e6234f..aeffc0e82 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2043" + #define SD2_REVISION_NR "2044" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index a71b90492..467e6c977 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -477,6 +477,7 @@ UPDATE creature_template SET ScriptName='npc_threshwackonator' WHERE entry=6669; /* DEADMINES */ +UPDATE creature_template SET ScriptName='boss_mr_smite' WHERE entry=646; UPDATE instance_template SET ScriptName='instance_deadmines' WHERE map=36; UPDATE gameobject_template SET ScriptName='go_defias_cannon' WHERE entry=16398; UPDATE gameobject_template SET ScriptName='go_door_lever_dm' WHERE entry=101833; diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 8ab524218..e1d2ec5a2 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -731,7 +731,9 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen -- -1 036 000 DEADMINES INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES (-1036000,'You there, check out that noise.',5775,1,7,0,'smite INST_SAY_ALARM1'), -(-1036001,'We\'re under attack! A vast, ye swabs! Repel the invaders!',5777,1,7,0,'smite INST_SAY_ALARM2'); +(-1036001,'We\'re under attack! A vast, ye swabs! Repel the invaders!',5777,1,7,0,'smite INST_SAY_ALARM2'), +(-1036002,'You land lubbers are tougher than I thought! I\'ll have to improvise!',5778,0,0,21,'smite SAY_PHASE_2'), +(-1036003,'D\'ah! Now you\'re making me angry!',5779,0,0,15,'smite SAY_PHASE_3'); -- -1 043 000 WAILING CAVERNS INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES diff --git a/sql/updates/r2044_mangos.sql b/sql/updates/r2044_mangos.sql new file mode 100644 index 000000000..0771cad77 --- /dev/null +++ b/sql/updates/r2044_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='boss_mr_smite' WHERE entry=646; diff --git a/sql/updates/r2044_scriptdev2.sql b/sql/updates/r2044_scriptdev2.sql new file mode 100644 index 000000000..4c80d4f8a --- /dev/null +++ b/sql/updates/r2044_scriptdev2.sql @@ -0,0 +1,4 @@ +DELETE FROM script_texts WHERE entry IN (-1036002, -1036003); +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1036002,'You land lubbers are tougher than I thought! I\'ll have to improvise!',5778,0,0,21,'smite SAY_PHASE_2'), +(-1036003,'D\'ah! Now you\'re making me angry!',5779,0,0,15,'smite SAY_PHASE_3'); From c56d0aa5875df488144fd7cdddd08d0cdd5a5c73 Mon Sep 17 00:00:00 2001 From: DasBlub Date: Sun, 24 Apr 2011 22:34:31 +0200 Subject: [PATCH 0024/1172] [2045] SSC-Karathress: Fix Spell Tidal Surge Use spell 38358 instead of 38353 for tidal surge. This needs MaNGOS commit [11392] (f373dd6) in order to work correctly. Signed-off-by: Schmoozerd --- .../serpent_shrine/boss_fathomlord_karathress.cpp | 5 ++--- sd2_revision_nr.h | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_fathomlord_karathress.cpp b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_fathomlord_karathress.cpp index 765e946ef..4a63530e8 100644 --- a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_fathomlord_karathress.cpp +++ b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_fathomlord_karathress.cpp @@ -62,7 +62,7 @@ enum //Caribdis Spells SPELL_WATER_BOLT_VOLLEY = 38335, - SPELL_TIDAL_SURGE = 38353, // triggers 38357 + SPELL_TIDAL_SURGE = 38358, // triggers 38353 which then triggers 38357 SPELL_HEAL = 38330, SPELL_SUMMON_CYCLONE = 38337, // summons creature 22104 which uses spell 29538 @@ -533,8 +533,7 @@ struct MANGOS_DLL_DECL boss_fathomguard_caribdisAI : public Advisor_Base_AI //m_uiTidalSurge_Timer if (m_uiTidalSurge_Timer < uiDiff) { - // the victim has to cast it on himself because in the spell.dbc the EffectImplicitTargetA1 is 1 (TARGET_SELF) - m_creature->getVictim()->CastSpell(m_creature->getVictim(), SPELL_TIDAL_SURGE, true); + m_creature->CastSpell(m_creature->getVictim(), SPELL_TIDAL_SURGE, true); m_uiTidalSurge_Timer = urand(15000, 20000); }else m_uiTidalSurge_Timer -= uiDiff; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index aeffc0e82..204a3ddba 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2044" + #define SD2_REVISION_NR "2045" #endif // __SD2_REVISION_NR_H__ From d0a94f6b57e42ab37169c1cbed7805d9291d3f94 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Tue, 26 Apr 2011 13:38:13 +0200 Subject: [PATCH 0025/1172] [2046] SSC-Karathress: Generic Cleanup --- .../boss_fathomlord_karathress.cpp | 212 ++++++++++-------- sd2_revision_nr.h | 2 +- 2 files changed, 118 insertions(+), 96 deletions(-) diff --git a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_fathomlord_karathress.cpp b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_fathomlord_karathress.cpp index 4a63530e8..44bdb9fc0 100644 --- a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_fathomlord_karathress.cpp +++ b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_fathomlord_karathress.cpp @@ -87,8 +87,8 @@ struct MANGOS_DLL_DECL boss_fathomlord_karathressAI : public ScriptedAI ScriptedInstance* m_pInstance; // timers - uint32 m_uiCataclysmicBolt_Timer; - uint32 m_uiEnrage_Timer; + uint32 m_uiCataclysmicBoltTimer; + uint32 m_uiEnrageTimer; bool m_bBlessingOfTides_MobsChecked; @@ -96,8 +96,8 @@ struct MANGOS_DLL_DECL boss_fathomlord_karathressAI : public ScriptedAI void Reset() { - m_uiCataclysmicBolt_Timer = 10000; - m_uiEnrage_Timer = 600000; + m_uiCataclysmicBoltTimer = 10000; + m_uiEnrageTimer = 600000; m_bBlessingOfTides_MobsChecked = false; for(uint8 i = 0; i < MAX_ADVISORS; ++i) @@ -115,6 +115,7 @@ struct MANGOS_DLL_DECL boss_fathomlord_karathressAI : public ScriptedAI m_pInstance->SetData(TYPE_KARATHRESS_EVENT, NOT_STARTED); } + // TODO - unneeded workaround - the spell should be cast by adviser onto karathress; text can also be handled in their AI // select the spell and the text based on the advisor which died void EventAdvisorDeath(uint8 uiAdvisor) { @@ -140,7 +141,7 @@ struct MANGOS_DLL_DECL boss_fathomlord_karathressAI : public ScriptedAI break; default: error_log("SD2: invalid advisor (id %u) for karathress!", uiAdvisor); - break; + return; } DoScriptText(iSayGainAbility, m_creature); @@ -218,8 +219,8 @@ struct MANGOS_DLL_DECL boss_fathomlord_karathressAI : public ScriptedAI return; } - //m_uiCataclysmicBolt_Timer - if (m_uiCataclysmicBolt_Timer < uiDiff) + //m_uiCataclysmicBoltTimer + if (m_uiCataclysmicBoltTimer < uiDiff) { //select a random unit other than the main tank Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1); @@ -228,10 +229,11 @@ struct MANGOS_DLL_DECL boss_fathomlord_karathressAI : public ScriptedAI if (!pTarget) pTarget = m_creature->getVictim(); - m_creature->CastSpell(pTarget, SPELL_CATACLYSMIC_BOLT, false); - - m_uiCataclysmicBolt_Timer = 10000; - }else m_uiCataclysmicBolt_Timer -= uiDiff; + if (DoCastSpellIfCan(pTarget, SPELL_CATACLYSMIC_BOLT) == CAST_OK) + m_uiCataclysmicBoltTimer = 10000; + } + else + m_uiCataclysmicBoltTimer -= uiDiff; //hp under 75% if (!m_bBlessingOfTides_MobsChecked && m_creature->GetHealthPercent() < 75.0f) @@ -256,12 +258,14 @@ struct MANGOS_DLL_DECL boss_fathomlord_karathressAI : public ScriptedAI m_bBlessingOfTides_MobsChecked = true; } - //m_uiEnrage_Timer - if (m_uiEnrage_Timer < uiDiff) + //m_uiEnrageTimer + if (m_uiEnrageTimer < uiDiff) { - DoCastSpellIfCan(m_creature, SPELL_ENRAGE); - m_uiEnrage_Timer = 90000; - }else m_uiEnrage_Timer -= uiDiff; + if (DoCastSpellIfCan(m_creature, SPELL_ENRAGE) == CAST_OK) + m_uiEnrageTimer = 90000; + } + else + m_uiEnrageTimer -= uiDiff; DoMeleeAttackIfReady(); } @@ -274,11 +278,12 @@ struct MANGOS_DLL_DECL Advisor_Base_AI : public ScriptedAI { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); } + protected: - uint8 m_uiAdvisor; + uint8 m_uiAdvisor; public: - ScriptedInstance* m_pInstance; + ScriptedInstance* m_pInstance; void JustReachedHome() { @@ -321,21 +326,21 @@ struct MANGOS_DLL_DECL boss_fathomguard_sharkkisAI : public Advisor_Base_AI } // timers - uint32 m_uiHurlTrident_Timer; - uint32 m_uiLeechingThrow_Timer; - uint32 m_uiTheBeastWithin_Timer; - uint32 m_uiPet_Timer; + uint32 m_uiHurlTridentTimer; + uint32 m_uiLeechingThrowTimer; + uint32 m_uiTheBeastWithinTimer; + uint32 m_uiPetTimer; bool m_bIsPetCheckNeeded; void Reset() { - m_uiHurlTrident_Timer = 2500; - m_uiLeechingThrow_Timer = 20000; - m_uiTheBeastWithin_Timer = 30000; - m_uiPet_Timer = 10000; + m_uiHurlTridentTimer = 2500; + m_uiLeechingThrowTimer = 20000; + m_uiTheBeastWithinTimer = 30000; + m_uiPetTimer = 10000; - m_bIsPetCheckNeeded = true; + m_bIsPetCheckNeeded = true; } void AttackStart(Unit* pWho) @@ -358,7 +363,7 @@ struct MANGOS_DLL_DECL boss_fathomguard_sharkkisAI : public Advisor_Base_AI { if (pSummoned->IsPet()) { - m_uiPet_Timer = 10000; + m_uiPetTimer = 10000; m_bIsPetCheckNeeded = false; } } @@ -393,40 +398,46 @@ struct MANGOS_DLL_DECL boss_fathomguard_sharkkisAI : public Advisor_Base_AI //after 10 seconds: spawn pet if not exist if (m_bIsPetCheckNeeded) { - if (m_uiPet_Timer < uiDiff) + if (m_uiPetTimer < uiDiff) { if (!m_creature->GetPet()) DoCastSpellIfCan(m_creature, urand(0,1) ? SPELL_SUMMON_FATHOM_LURKER : SPELL_SUMMON_FATHOM_SPOREBAT); } else - m_uiPet_Timer -= uiDiff; + m_uiPetTimer -= uiDiff; } - //m_uiHurlTrident_Timer - if (m_uiHurlTrident_Timer < uiDiff) + //m_uiHurlTridentTimer + if (m_uiHurlTridentTimer < uiDiff) { - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) { if (!m_creature->CanReachWithMeleeAttack(pTarget)) DoCastSpellIfCan(pTarget, SPELL_HURL_TRIDENT); } - m_uiHurlTrident_Timer = 5000; - }else m_uiHurlTrident_Timer -= uiDiff; + m_uiHurlTridentTimer = 5000; + } + else + m_uiHurlTridentTimer -= uiDiff; - //m_uiLeechingThrow_Timer - if (m_uiLeechingThrow_Timer < uiDiff) + //m_uiLeechingThrowTimer + if (m_uiLeechingThrowTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_LEECHING_THROW); - m_uiLeechingThrow_Timer = 20000; - }else m_uiLeechingThrow_Timer -= uiDiff; + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_LEECHING_THROW) == CAST_OK) + m_uiLeechingThrowTimer = 20000; + } + else + m_uiLeechingThrowTimer -= uiDiff; - //m_uiTheBeastWithin_Timer - if (m_uiTheBeastWithin_Timer < uiDiff) + //m_uiTheBeastWithinTimer + if (m_uiTheBeastWithinTimer < uiDiff) { - DoCastSpellIfCan(m_creature, SPELL_THE_BEAST_WITHIN); - m_uiTheBeastWithin_Timer = 30000; - }else m_uiTheBeastWithin_Timer -= uiDiff; + if (DoCastSpellIfCan(m_creature, SPELL_THE_BEAST_WITHIN) == CAST_OK) + m_uiTheBeastWithinTimer = 30000; + } + else + m_uiTheBeastWithinTimer -= uiDiff; DoMeleeAttackIfReady(); } @@ -442,11 +453,11 @@ struct MANGOS_DLL_DECL boss_fathomguard_tidalvessAI : public Advisor_Base_AI } // timers - uint32 m_uiFrostShock_Timer; + uint32 m_uiFrostShockTimer; void Reset() { - m_uiFrostShock_Timer = 25000; + m_uiFrostShockTimer = 25000; } void UpdateAI(const uint32 uiDiff) @@ -470,12 +481,14 @@ struct MANGOS_DLL_DECL boss_fathomguard_tidalvessAI : public Advisor_Base_AI return; } - //m_uiFrostShock_Timer - if (m_uiFrostShock_Timer < uiDiff) + //m_uiFrostShockTimer + if (m_uiFrostShockTimer < uiDiff) { DoCastSpellIfCan(m_creature->getVictim(), SPELL_FROST_SHOCK); - m_uiFrostShock_Timer = urand(25000, 30000); - }else m_uiFrostShock_Timer -= uiDiff; + m_uiFrostShockTimer = urand(25000, 30000); + } + else + m_uiFrostShockTimer -= uiDiff; DoMeleeAttackIfReady(); } @@ -491,15 +504,15 @@ struct MANGOS_DLL_DECL boss_fathomguard_caribdisAI : public Advisor_Base_AI } // timers - uint32 m_uiWaterBoltVolley_Timer; - uint32 m_uiTidalSurge_Timer; - uint32 m_uiHeal_Timer; + uint32 m_uiWaterBoltVolleyTimer; + uint32 m_uiTidalSurgeTimer; + uint32 m_uiHealTimer; void Reset() { - m_uiWaterBoltVolley_Timer = 35000; - m_uiTidalSurge_Timer = urand(15000, 20000); - m_uiHeal_Timer = 55000; + m_uiWaterBoltVolleyTimer = 35000; + m_uiTidalSurgeTimer = urand(15000, 20000); + m_uiHealTimer = 55000; } void UpdateAI(const uint32 uiDiff) @@ -523,22 +536,26 @@ struct MANGOS_DLL_DECL boss_fathomguard_caribdisAI : public Advisor_Base_AI return; } - //m_uiWaterBoltVolley_Timer - if (m_uiWaterBoltVolley_Timer < uiDiff) + //m_uiWaterBoltVolleyTimer + if (m_uiWaterBoltVolleyTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_WATER_BOLT_VOLLEY); - m_uiWaterBoltVolley_Timer = 30000; - }else m_uiWaterBoltVolley_Timer -= uiDiff; + if (DoCastSpellIfCan(m_creature, SPELL_WATER_BOLT_VOLLEY) == CAST_OK) + m_uiWaterBoltVolleyTimer = 30000; + } + else + m_uiWaterBoltVolleyTimer -= uiDiff; - //m_uiTidalSurge_Timer - if (m_uiTidalSurge_Timer < uiDiff) + //m_uiTidalSurgeTimer + if (m_uiTidalSurgeTimer < uiDiff) { - m_creature->CastSpell(m_creature->getVictim(), SPELL_TIDAL_SURGE, true); - m_uiTidalSurge_Timer = urand(15000, 20000); - }else m_uiTidalSurge_Timer -= uiDiff; + if (DoCastSpellIfCan(m_creature, SPELL_TIDAL_SURGE) == CAST_OK) + m_uiTidalSurgeTimer = urand(15000, 20000); + } + else + m_uiTidalSurgeTimer -= uiDiff; - //m_uiHeal_Timer - if (m_uiHeal_Timer < uiDiff) + //m_uiHealTimer + if (m_uiHealTimer < uiDiff) { // It can be cast on any of the mobs Unit* pUnit = NULL; @@ -553,14 +570,18 @@ struct MANGOS_DLL_DECL boss_fathomguard_caribdisAI : public Advisor_Base_AI case 3: pUnit = m_creature; break; } } - else - pUnit = m_creature; - if (pUnit && pUnit->isAlive()) - DoCastSpellIfCan(pUnit, SPELL_HEAL); + if (!pUnit) + pUnit = m_creature; - m_uiHeal_Timer = 60000; - }else m_uiHeal_Timer -= uiDiff; + if (pUnit->isAlive()) + { + if (DoCastSpellIfCan(pUnit, SPELL_HEAL) == CAST_OK) + m_uiHealTimer = 60000; + } + } + else + m_uiHealTimer -= uiDiff; DoMeleeAttackIfReady(); } @@ -588,24 +609,25 @@ CreatureAI* GetAI_boss_fathomguard_caribdis(Creature* pCreature) void AddSC_boss_fathomlord_karathress() { - Script *newscript; - newscript = new Script; - newscript->Name = "boss_fathomlord_karathress"; - newscript->GetAI = &GetAI_boss_fathomlord_karathress; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "boss_fathomguard_sharkkis"; - newscript->GetAI = &GetAI_boss_fathomguard_sharkkis; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "boss_fathomguard_tidalvess"; - newscript->GetAI = &GetAI_boss_fathomguard_tidalvess; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "boss_fathomguard_caribdis"; - newscript->GetAI = &GetAI_boss_fathomguard_caribdis; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_fathomlord_karathress"; + pNewScript->GetAI = &GetAI_boss_fathomlord_karathress; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "boss_fathomguard_sharkkis"; + pNewScript->GetAI = &GetAI_boss_fathomguard_sharkkis; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "boss_fathomguard_tidalvess"; + pNewScript->GetAI = &GetAI_boss_fathomguard_tidalvess; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "boss_fathomguard_caribdis"; + pNewScript->GetAI = &GetAI_boss_fathomguard_caribdis; + pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 204a3ddba..84f7fb602 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2045" + #define SD2_REVISION_NR "2046" #endif // __SD2_REVISION_NR_H__ From 7172bfaa0d0bd62c0b1fdc368a8947c5eb0517f7 Mon Sep 17 00:00:00 2001 From: NoFantasy Date: Wed, 27 Apr 2011 00:43:40 +0200 Subject: [PATCH 0026/1172] [2047] Add opening of second and third door in deadmines (after second/third boss) Signed-off-by: NoFantasy --- .../eastern_kingdoms/deadmines/deadmines.h | 12 ++++- .../deadmines/instance_deadmines.cpp | 54 ++++++++++++++++++- sd2_revision_nr.h | 2 +- 3 files changed, 63 insertions(+), 5 deletions(-) diff --git a/scripts/eastern_kingdoms/deadmines/deadmines.h b/scripts/eastern_kingdoms/deadmines/deadmines.h index 2dee53c32..ddeb7163b 100644 --- a/scripts/eastern_kingdoms/deadmines/deadmines.h +++ b/scripts/eastern_kingdoms/deadmines/deadmines.h @@ -7,23 +7,31 @@ enum { - MAX_ENCOUNTER = 2, + MAX_ENCOUNTER = 4, TYPE_DEFIAS_ENDDOOR = 1, TYPE_RHAHKZOR = 2, + TYPE_SNEED = 3, + TYPE_GILNID = 4, DATA_DEFIAS_DOOR = 2, INST_SAY_ALARM1 = -1036000, INST_SAY_ALARM2 = -1036001, - GO_FACTORY_DOOR = 13965, + GO_FACTORY_DOOR = 13965, // rhahk'zor + GO_FOUNDRY_DOOR = 16399, // gilnid + GO_MAST_ROOM_DOOR = 16400, // sneed + GO_HEAVY_DOOR_1 = 17153, // to sneed + GO_HEAVY_DOOR_2 = 17154, // to gilnid GO_DOOR_LEVER = 101833, GO_IRON_CLAD = 16397, GO_DEFIAS_CANNON = 16398, GO_SMITE_CHEST = 144111, // use to get correct location of mr.smites equipment changes NPC_RHAHKZOR = 644, + NPC_SNEED = 643, + NPC_GILNID = 1763, NPC_MR_SMITE = 646, NPC_PIRATE = 657 }; diff --git a/scripts/eastern_kingdoms/deadmines/instance_deadmines.cpp b/scripts/eastern_kingdoms/deadmines/instance_deadmines.cpp index fc0c2a04a..51b7300bb 100644 --- a/scripts/eastern_kingdoms/deadmines/instance_deadmines.cpp +++ b/scripts/eastern_kingdoms/deadmines/instance_deadmines.cpp @@ -31,6 +31,8 @@ struct MANGOS_DLL_DECL instance_deadmines : public ScriptedInstance uint32 m_auiEncounter[MAX_ENCOUNTER]; uint64 m_uiFactoryDoorGUID; + uint64 m_uiMastRoomDoorGUID; + uint64 m_uiFoundryDoorGUID; uint64 m_uiIronCladGUID; uint64 m_uiCannonGUID; uint64 m_uiSmiteChestGUID; @@ -44,6 +46,8 @@ struct MANGOS_DLL_DECL instance_deadmines : public ScriptedInstance memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); m_uiFactoryDoorGUID = 0; + m_uiMastRoomDoorGUID = 0; + m_uiFoundryDoorGUID = 0; m_uiIronCladGUID = 0; m_uiCannonGUID = 0; m_uiSmiteChestGUID = 0; @@ -65,8 +69,24 @@ struct MANGOS_DLL_DECL instance_deadmines : public ScriptedInstance { case GO_FACTORY_DOOR: m_uiFactoryDoorGUID = pGo->GetGUID(); + if (GetData(TYPE_RHAHKZOR) == DONE) pGo->SetGoState(GO_STATE_ACTIVE); + + break; + case GO_MAST_ROOM_DOOR: + m_uiMastRoomDoorGUID = pGo->GetGUID(); + + if (GetData(TYPE_SNEED) == DONE) + pGo->SetGoState(GO_STATE_ACTIVE); + + break; + case GO_FOUNDRY_DOOR: + m_uiFoundryDoorGUID = pGo->GetGUID(); + + if (GetData(TYPE_GILNID) == DONE) + pGo->SetGoState(GO_STATE_ACTIVE); + break; case GO_IRON_CLAD: m_uiIronCladGUID = pGo->GetGUID(); @@ -82,8 +102,18 @@ struct MANGOS_DLL_DECL instance_deadmines : public ScriptedInstance void OnCreatureDeath(Creature* pCreature) { - if (pCreature->GetEntry() == NPC_RHAHKZOR) - SetData(TYPE_RHAHKZOR, DONE); + switch(pCreature->GetEntry()) + { + case NPC_RHAHKZOR: + SetData(TYPE_RHAHKZOR, DONE); + break; + case NPC_SNEED: + SetData(TYPE_SNEED, DONE); + break; + case NPC_GILNID: + SetData(TYPE_GILNID, DONE); + break; + } } void SetData(uint32 uiType, uint32 uiData) @@ -98,6 +128,22 @@ struct MANGOS_DLL_DECL instance_deadmines : public ScriptedInstance m_auiEncounter[1] = uiData; break; } + case TYPE_SNEED: + { + if (uiData == DONE) + DoUseDoorOrButton(m_uiMastRoomDoorGUID); + + m_auiEncounter[2] = uiData; + break; + } + case TYPE_GILNID: + { + if (uiData == DONE) + DoUseDoorOrButton(m_uiFoundryDoorGUID); + + m_auiEncounter[3] = uiData; + break; + } case TYPE_DEFIAS_ENDDOOR: { if (uiData == IN_PROGRESS) @@ -122,6 +168,10 @@ struct MANGOS_DLL_DECL instance_deadmines : public ScriptedInstance return m_auiEncounter[0]; case TYPE_RHAHKZOR: return m_auiEncounter[1]; + case TYPE_SNEED: + return m_auiEncounter[2]; + case TYPE_GILNID: + return m_auiEncounter[3]; } return 0; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 84f7fb602..807c304b9 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2046" + #define SD2_REVISION_NR "2047" #endif // __SD2_REVISION_NR_H__ From 10494f1f4b48419eeb9fc22d9a7b1f13716b4292 Mon Sep 17 00:00:00 2001 From: NoFantasy Date: Wed, 27 Apr 2011 10:36:26 +0200 Subject: [PATCH 0027/1172] [2048] Remove summons for end door event in deadmines; use static spawns as expected --- .../eastern_kingdoms/deadmines/deadmines.cpp | 2 +- .../eastern_kingdoms/deadmines/deadmines.h | 7 +++-- .../deadmines/instance_deadmines.cpp | 26 ++++++++++++++----- sd2_revision_nr.h | 2 +- 4 files changed, 25 insertions(+), 12 deletions(-) diff --git a/scripts/eastern_kingdoms/deadmines/deadmines.cpp b/scripts/eastern_kingdoms/deadmines/deadmines.cpp index f2f53e300..d3110f03e 100644 --- a/scripts/eastern_kingdoms/deadmines/deadmines.cpp +++ b/scripts/eastern_kingdoms/deadmines/deadmines.cpp @@ -285,7 +285,7 @@ bool GOUse_go_door_lever_dm(Player* pPlayer, GameObject* pGo) if (!pInstance) return false; - GameObject* pGoDoor = pInstance->instance->GetGameObject(pInstance->GetData64(DATA_DEFIAS_DOOR)); + GameObject* pGoDoor = pInstance->instance->GetGameObject(pInstance->GetData64(GO_IRON_CLAD_DOOR)); if (pGoDoor && pGoDoor->GetGoState() == GO_STATE_READY) return false; diff --git a/scripts/eastern_kingdoms/deadmines/deadmines.h b/scripts/eastern_kingdoms/deadmines/deadmines.h index ddeb7163b..b75325bc8 100644 --- a/scripts/eastern_kingdoms/deadmines/deadmines.h +++ b/scripts/eastern_kingdoms/deadmines/deadmines.h @@ -14,8 +14,6 @@ enum TYPE_SNEED = 3, TYPE_GILNID = 4, - DATA_DEFIAS_DOOR = 2, - INST_SAY_ALARM1 = -1036000, INST_SAY_ALARM2 = -1036001, @@ -25,7 +23,7 @@ enum GO_HEAVY_DOOR_1 = 17153, // to sneed GO_HEAVY_DOOR_2 = 17154, // to gilnid GO_DOOR_LEVER = 101833, - GO_IRON_CLAD = 16397, + GO_IRON_CLAD_DOOR = 16397, GO_DEFIAS_CANNON = 16398, GO_SMITE_CHEST = 144111, // use to get correct location of mr.smites equipment changes @@ -33,7 +31,8 @@ enum NPC_SNEED = 643, NPC_GILNID = 1763, NPC_MR_SMITE = 646, - NPC_PIRATE = 657 + NPC_PIRATE = 657, + NPC_SQUALLSHAPER = 1732, }; #endif diff --git a/scripts/eastern_kingdoms/deadmines/instance_deadmines.cpp b/scripts/eastern_kingdoms/deadmines/instance_deadmines.cpp index 51b7300bb..c95c0aece 100644 --- a/scripts/eastern_kingdoms/deadmines/instance_deadmines.cpp +++ b/scripts/eastern_kingdoms/deadmines/instance_deadmines.cpp @@ -88,7 +88,7 @@ struct MANGOS_DLL_DECL instance_deadmines : public ScriptedInstance pGo->SetGoState(GO_STATE_ACTIVE); break; - case GO_IRON_CLAD: + case GO_IRON_CLAD_DOOR: m_uiIronCladGUID = pGo->GetGUID(); break; case GO_DEFIAS_CANNON: @@ -181,7 +181,7 @@ struct MANGOS_DLL_DECL instance_deadmines : public ScriptedInstance { switch(uiData) { - case DATA_DEFIAS_DOOR: + case GO_IRON_CLAD_DOOR: return m_uiIronCladGUID; case GO_SMITE_CHEST: return m_uiSmiteChestGUID; @@ -206,13 +206,27 @@ struct MANGOS_DLL_DECL instance_deadmines : public ScriptedInstance ++m_uiDoor_Step; break; case 1: - if (Creature* pi1 = pMrSmite->SummonCreature(NPC_PIRATE, 93.68f, -678.63f, 7.71f, 2.09f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 1800000)) - pi1->GetMotionMaster()->MovePoint(0, 100.11f, -670.65f, 7.42f); - if (Creature* pi2 = pMrSmite->SummonCreature(NPC_PIRATE, 102.63f, -685.07f, 7.42f, 1.28f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 1800000)) - pi2->GetMotionMaster()->MovePoint(0, 100.11f, -670.65f, 7.42f); + { + if (GameObject* pDoor = instance->GetGameObject(m_uiIronCladGUID)) + { + // should be static spawns, fetch the closest ones at the pier + if (Creature* pi1 = GetClosestCreatureWithEntry(pDoor, NPC_PIRATE, 40.0f)) + { + pi1->RemoveSplineFlag(SPLINEFLAG_WALKMODE); + pi1->GetMotionMaster()->MovePoint(0, pDoor->GetPositionX(), pDoor->GetPositionY(), pDoor->GetPositionZ()); + } + + if (Creature* pi2 = GetClosestCreatureWithEntry(pDoor, NPC_SQUALLSHAPER, 40.0f)) + { + pi2->RemoveSplineFlag(SPLINEFLAG_WALKMODE); + pi2->GetMotionMaster()->MovePoint(0, pDoor->GetPositionX(), pDoor->GetPositionY(), pDoor->GetPositionZ()); + } + } + ++m_uiDoor_Step; m_uiIronDoor_Timer = 10000; break; + } case 2: DoScriptText(INST_SAY_ALARM2,pMrSmite); m_uiDoor_Step = 0; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 807c304b9..e432de336 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2047" + #define SD2_REVISION_NR "2048" #endif // __SD2_REVISION_NR_H__ From fa6b14af62f3f5e39b3032833604773871372754 Mon Sep 17 00:00:00 2001 From: antifreak Date: Wed, 27 Apr 2011 10:48:24 +0200 Subject: [PATCH 0028/1172] [2049] Add missing call to constructor for mob_dragonmaw_peon Signed-off-by: NoFantasy --- scripts/outland/shadowmoon_valley.cpp | 10 ++++++++++ sd2_revision_nr.h | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/scripts/outland/shadowmoon_valley.cpp b/scripts/outland/shadowmoon_valley.cpp index 1b8188209..d7e2fce10 100644 --- a/scripts/outland/shadowmoon_valley.cpp +++ b/scripts/outland/shadowmoon_valley.cpp @@ -355,6 +355,11 @@ struct MANGOS_DLL_DECL mob_dragonmaw_peonAI : public ScriptedAI } }; +CreatureAI* GetAI_mob_dragonmaw_peon(Creature* pCreature) +{ + return new mob_dragonmaw_peonAI(pCreature); +} + /*###### ## npc_drake_dealer_hurlunk ######*/ @@ -1454,6 +1459,11 @@ void AddSC_shadowmoon_valley() newscript->GetAI = &GetAI_mob_enslaved_netherwing_drake; newscript->RegisterSelf(); + newscript = new Script; + newscript->Name = "mob_dragonmaw_peon"; + newscript->GetAI = &GetAI_mob_dragonmaw_peon; + newscript->RegisterSelf(); + newscript = new Script; newscript->Name = "npc_drake_dealer_hurlunk"; newscript->pGossipHello = &GossipHello_npc_drake_dealer_hurlunk; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index e432de336..decfd5699 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2048" + #define SD2_REVISION_NR "2049" #endif // __SD2_REVISION_NR_H__ From a9007a50a913c236dbc1ace4aff88c9e6a465e0c Mon Sep 17 00:00:00 2001 From: NoFantasy Date: Wed, 27 Apr 2011 13:41:12 +0200 Subject: [PATCH 0029/1172] [2050] Add dummy effect of spell 40468 and remove old SpellHit in AI Fix missing ScriptName for related npc Signed-off-by: NoFantasy --- scripts/outland/shadowmoon_valley.cpp | 88 +++++++++++++++++++-------- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 + sql/updates/r2050_mangos.sql | 1 + 4 files changed, 66 insertions(+), 26 deletions(-) create mode 100644 sql/updates/r2050_mangos.sql diff --git a/scripts/outland/shadowmoon_valley.cpp b/scripts/outland/shadowmoon_valley.cpp index d7e2fce10..2fc093386 100644 --- a/scripts/outland/shadowmoon_valley.cpp +++ b/scripts/outland/shadowmoon_valley.cpp @@ -24,6 +24,7 @@ EndScriptData */ /* ContentData mob_mature_netherwing_drake mob_enslaved_netherwing_drake +npc_dragonmaw_peon npc_drake_dealer_hurlunk npcs_flanis_swiftwing_and_kagrosh npc_murkblood_overseer @@ -277,7 +278,7 @@ CreatureAI* GetAI_mob_enslaved_netherwing_drake(Creature* pCreature) } /*##### -# mob_dragonmaw_peon +# npc_dragonmaw_peon #####*/ enum @@ -288,38 +289,29 @@ enum POINT_DEST = 1 }; -struct MANGOS_DLL_DECL mob_dragonmaw_peonAI : public ScriptedAI +struct MANGOS_DLL_DECL npc_dragonmaw_peonAI : public ScriptedAI { - mob_dragonmaw_peonAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } + npc_dragonmaw_peonAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } uint64 m_uiPlayerGUID; - bool m_bIsTapped; uint32 m_uiPoisonTimer; + uint32 m_uiMoveTimer; void Reset() { m_uiPlayerGUID = 0; - m_bIsTapped = false; m_uiPoisonTimer = 0; + m_uiMoveTimer = 0; } - void SpellHit(Unit* pCaster, const SpellEntry* pSpell) + bool SetPlayerTarget(uint64 uiPlayerGUID) { - if (!pCaster) - return; - - if (pCaster->GetTypeId() == TYPEID_PLAYER && pSpell->Id == SPELL_SERVING_MUTTON && !m_bIsTapped) - { - m_uiPlayerGUID = pCaster->GetGUID(); - - m_bIsTapped = true; + if (m_uiPlayerGUID) + return false; - float fX, fY, fZ; - pCaster->GetClosePoint(fX, fY, fZ, m_creature->GetObjectBoundingRadius()); - - m_creature->RemoveSplineFlag(SPLINEFLAG_WALKMODE); - m_creature->GetMotionMaster()->MovePoint(POINT_DEST, fX, fY, fZ); - } + m_uiPlayerGUID = uiPlayerGUID; + m_uiMoveTimer = 500; + return true; } void MovementInform(uint32 uiType, uint32 uiPointId) @@ -336,7 +328,33 @@ struct MANGOS_DLL_DECL mob_dragonmaw_peonAI : public ScriptedAI void UpdateAI(const uint32 uiDiff) { - if (m_uiPoisonTimer) + if (m_uiMoveTimer) + { + if (m_uiMoveTimer <= uiDiff) + { + if (Player* pPlayer = m_creature->GetMap()->GetPlayer(m_uiPlayerGUID)) + { + const SpellEntry* pSpell = GetSpellStore()->LookupEntry(SPELL_SERVING_MUTTON); + + uint32 uiGameobjectEntry = pSpell->EffectMiscValue[EFFECT_INDEX_0]; + + // this can fail, but very low chance + if (GameObject* pMutton = GetClosestGameObjectWithEntry(pPlayer, uiGameobjectEntry, 2*INTERACTION_DISTANCE)) + { + float fX, fY, fZ; + pMutton->GetContactPoint(m_creature, fX, fY, fZ, CONTACT_DISTANCE); + + m_creature->RemoveSplineFlag(SPLINEFLAG_WALKMODE); + m_creature->GetMotionMaster()->MovePoint(POINT_DEST, fX, fY, fZ); + } + } + + m_uiMoveTimer = 0; + } + else + m_uiMoveTimer -= uiDiff; + } + else if (m_uiPoisonTimer) { if (m_uiPoisonTimer <= uiDiff) { @@ -355,9 +373,28 @@ struct MANGOS_DLL_DECL mob_dragonmaw_peonAI : public ScriptedAI } }; -CreatureAI* GetAI_mob_dragonmaw_peon(Creature* pCreature) +CreatureAI* GetAI_npc_dragonmaw_peon(Creature* pCreature) { - return new mob_dragonmaw_peonAI(pCreature); + return new npc_dragonmaw_peonAI(pCreature); +} + +bool EffectDummyCreature_npc_dragonmaw_peon(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) +{ + if (uiEffIndex != EFFECT_INDEX_1 || uiSpellId != SPELL_SERVING_MUTTON || pCaster->GetTypeId() != TYPEID_PLAYER) + return false; + + npc_dragonmaw_peonAI* pPeonAI = dynamic_cast(pCreatureTarget->AI()); + + if (!pPeonAI) + return false; + + if (pPeonAI->SetPlayerTarget(pCaster->GetGUID())) + { + pCreatureTarget->HandleEmote(EMOTE_ONESHOT_NONE); + return true; + } + + return false; } /*###### @@ -1460,8 +1497,9 @@ void AddSC_shadowmoon_valley() newscript->RegisterSelf(); newscript = new Script; - newscript->Name = "mob_dragonmaw_peon"; - newscript->GetAI = &GetAI_mob_dragonmaw_peon; + newscript->Name = "npc_dragonmaw_peon"; + newscript->GetAI = &GetAI_npc_dragonmaw_peon; + newscript->pEffectDummyNPC = &EffectDummyCreature_npc_dragonmaw_peon; newscript->RegisterSelf(); newscript = new Script; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index decfd5699..dc4cbc865 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2049" + #define SD2_REVISION_NR "2050" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 467e6c977..5f471e52a 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -932,6 +932,7 @@ UPDATE creature_template SET ScriptName='boss_arugal' WHERE entry=4275; /* SHADOWMOON VALLEY */ UPDATE creature_template SET ScriptName='boss_doomwalker' WHERE entry=17711; UPDATE creature_template SET ScriptName='npc_drake_dealer_hurlunk' WHERE entry=23489; +UPDATE creature_template SET ScriptName='npc_dragonmaw_peon' WHERE entry=22252; UPDATE creature_template SET ScriptName='npcs_flanis_swiftwing_and_kagrosh' WHERE entry IN (21725,21727); UPDATE creature_template SET ScriptName='npc_murkblood_overseer' WHERE entry=23309; UPDATE creature_template SET ScriptName='npc_neltharaku' WHERE entry=21657; diff --git a/sql/updates/r2050_mangos.sql b/sql/updates/r2050_mangos.sql new file mode 100644 index 000000000..16bad37cf --- /dev/null +++ b/sql/updates/r2050_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_dragonmaw_peon' WHERE entry=22252; From 5db25234c027b02e1d66e91a33d52ff356ac65cd Mon Sep 17 00:00:00 2001 From: NoFantasy Date: Thu, 28 Apr 2011 00:39:44 +0200 Subject: [PATCH 0030/1172] [2051] Add texts to npc_dragonmaw_peon along with some visual details Signed-off-by: NoFantasy --- scripts/outland/shadowmoon_valley.cpp | 49 ++++++++++++++++++++++----- sd2_revision_nr.h | 2 +- sql/scriptdev2_script_full.sql | 8 ++++- sql/updates/r2051_scriptdev2.sql | 7 ++++ 4 files changed, 56 insertions(+), 10 deletions(-) create mode 100644 sql/updates/r2051_scriptdev2.sql diff --git a/scripts/outland/shadowmoon_valley.cpp b/scripts/outland/shadowmoon_valley.cpp index 2fc093386..a06169dc6 100644 --- a/scripts/outland/shadowmoon_valley.cpp +++ b/scripts/outland/shadowmoon_valley.cpp @@ -283,9 +283,15 @@ CreatureAI* GetAI_mob_enslaved_netherwing_drake(Creature* pCreature) enum { + SAY_PEON_1 = -1000652, + SAY_PEON_2 = -1000653, + SAY_PEON_3 = -1000654, + SAY_PEON_4 = -1000655, + SAY_PEON_5 = -1000656, + SPELL_SERVING_MUTTON = 40468, NPC_DRAGONMAW_KILL_CREDIT = 23209, - QUEST_SLOW_DEATH = 11020, + EQUIP_ID_MUTTON = 2202, POINT_DEST = 1 }; @@ -296,12 +302,16 @@ struct MANGOS_DLL_DECL npc_dragonmaw_peonAI : public ScriptedAI uint64 m_uiPlayerGUID; uint32 m_uiPoisonTimer; uint32 m_uiMoveTimer; + uint32 m_uiEatTimer; void Reset() { m_uiPlayerGUID = 0; m_uiPoisonTimer = 0; m_uiMoveTimer = 0; + m_uiEatTimer = 0; + + SetEquipmentSlots(true); } bool SetPlayerTarget(uint64 uiPlayerGUID) @@ -321,13 +331,25 @@ struct MANGOS_DLL_DECL npc_dragonmaw_peonAI : public ScriptedAI if (uiPointId == POINT_DEST) { - m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_EAT); - m_uiPoisonTimer = 15000; + m_uiEatTimer = 2000; + m_uiPoisonTimer = 3000; + + switch(urand(0, 4)) + { + case 0: DoScriptText(SAY_PEON_1, m_creature); break; + case 1: DoScriptText(SAY_PEON_2, m_creature); break; + case 2: DoScriptText(SAY_PEON_3, m_creature); break; + case 3: DoScriptText(SAY_PEON_4, m_creature); break; + case 4: DoScriptText(SAY_PEON_5, m_creature); break; + } } } void UpdateAI(const uint32 uiDiff) { + if (!m_creature->isAlive()) + return; + if (m_uiMoveTimer) { if (m_uiMoveTimer <= uiDiff) @@ -354,18 +376,29 @@ struct MANGOS_DLL_DECL npc_dragonmaw_peonAI : public ScriptedAI else m_uiMoveTimer -= uiDiff; } + else if (m_uiEatTimer) + { + if (m_uiEatTimer <= uiDiff) + { + SetEquipmentSlots(false, EQUIP_ID_MUTTON, EQUIP_UNEQUIP); + m_creature->HandleEmote(EMOTE_ONESHOT_EAT_NOSHEATHE); + m_uiEatTimer = 0; + } + else + m_uiEatTimer -= uiDiff; + } else if (m_uiPoisonTimer) { if (m_uiPoisonTimer <= uiDiff) { if (Player* pPlayer = m_creature->GetMap()->GetPlayer(m_uiPlayerGUID)) - { - if (pPlayer->GetQuestStatus(QUEST_SLOW_DEATH) == QUEST_STATUS_INCOMPLETE) - pPlayer->KilledMonsterCredit(NPC_DRAGONMAW_KILL_CREDIT, m_creature->GetGUID()); - } + pPlayer->KilledMonsterCredit(NPC_DRAGONMAW_KILL_CREDIT, m_creature->GetObjectGuid()); m_uiPoisonTimer = 0; - m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + + // dies + m_creature->SetDeathState(JUST_DIED); + m_creature->SetHealth(0); } else m_uiPoisonTimer -= uiDiff; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index dc4cbc865..ffbca5e16 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2050" + #define SD2_REVISION_NR "2051" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index e1d2ec5a2..bc1c577b7 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -697,7 +697,13 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1000648,'Stop whining. You\'ve still got your luck.',0,0,0,0,'SAY_DROSTAN_GOT_LUCKY_1'), (-1000649,'Bah, it\'s an improvement.',0,0,0,11,'SAY_DROSTAN_GOT_LUCKY_2'), (-1000650,'Calm down lad, it\'s just a birdshot!',0,0,0,0,'SAY_DROSTAN_HIT_BIRD_1'), -(-1000651,'The only thing hurt is your pride, lad! Buck up!',0,0,0,0,'SAY_DROSTAN_HIT_BIRD_2'); +(-1000651,'The only thing hurt is your pride, lad! Buck up!',0,0,0,0,'SAY_DROSTAN_HIT_BIRD_2'), + +(-1000652,'Me so hungry! YUM!',0,0,0,71,'dragonmaw peon SAY_PEON_1'), +(-1000653,'Hey... me not feel so good.',0,0,0,0,'dragonmaw peon SAY_PEON_2'), +(-1000654,'You is bad orc... baaad... or... argh!',0,0,0,0,'dragonmaw peon SAY_PEON_3'), +(-1000655,'Time for eating!?',0,0,0,71,'dragonmaw peon SAY_PEON_4'), +(-1000656,'It put the mutton in the stomach!',0,0,0,71,'dragonmaw peon SAY_PEON_5'); -- -1 033 000 SHADOWFANG KEEP INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES diff --git a/sql/updates/r2051_scriptdev2.sql b/sql/updates/r2051_scriptdev2.sql new file mode 100644 index 000000000..8a6c6ab5b --- /dev/null +++ b/sql/updates/r2051_scriptdev2.sql @@ -0,0 +1,7 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1000656 AND -1000652; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1000652,'Me so hungry! YUM!',0,0,0,71,'dragonmaw peon SAY_PEON_1'), +(-1000653,'Hey... me not feel so good.',0,0,0,0,'dragonmaw peon SAY_PEON_2'), +(-1000654,'You is bad orc... baaad... or... argh!',0,0,0,0,'dragonmaw peon SAY_PEON_3'), +(-1000655,'Time for eating!?',0,0,0,71,'dragonmaw peon SAY_PEON_4'), +(-1000656,'It put the mutton in the stomach!',0,0,0,71,'dragonmaw peon SAY_PEON_5'); From 33fa81b4578acdab70d607ee469e055b4c5e4aa0 Mon Sep 17 00:00:00 2001 From: NoFantasy Date: Thu, 28 Apr 2011 01:04:45 +0200 Subject: [PATCH 0031/1172] [2052] Add workarounds where the broken function GetGameObject() is used. Also use the function in npc_dragonmaw_peon, but use the workaround code when the broken function fail to return anything. Signed-off-by: NoFantasy --- scripts/kalimdor/mulgore.cpp | 20 +++++++++++++-- scripts/outland/shadowmoon_valley.cpp | 35 ++++++++++++++++++++++----- sd2_revision_nr.h | 2 +- 3 files changed, 48 insertions(+), 9 deletions(-) diff --git a/scripts/kalimdor/mulgore.cpp b/scripts/kalimdor/mulgore.cpp index cf0eb49d1..a645a1286 100644 --- a/scripts/kalimdor/mulgore.cpp +++ b/scripts/kalimdor/mulgore.cpp @@ -112,10 +112,26 @@ struct MANGOS_DLL_DECL npc_kyle_the_frenziedAI : public ScriptedAI case 1: if (Player* pPlayer = m_creature->GetMap()->GetPlayer(m_uiPlayerGUID)) { - if (GameObject* pGo = pPlayer->GetGameObject(SPELL_LUNCH)) + GameObject* pGo = pPlayer->GetGameObject(SPELL_LUNCH); + + // Workaround for broken function GetGameObject + if (!pGo) + { + const SpellEntry* pSpell = GetSpellStore()->LookupEntry(SPELL_LUNCH); + + uint32 uiGameobjectEntry = pSpell->EffectMiscValue[EFFECT_INDEX_1]; + + pGo = GetClosestGameObjectWithEntry(pPlayer, uiGameobjectEntry, 2*INTERACTION_DISTANCE); + } + + if (pGo) { m_bIsMovingToLunch = true; - m_creature->GetMotionMaster()->MovePoint(POINT_ID, pGo->GetPositionX(), pGo->GetPositionY(), pGo->GetPositionZ()); + + float fX, fY, fZ; + pGo->GetContactPoint(m_creature, fX, fY, fZ, CONTACT_DISTANCE); + + m_creature->GetMotionMaster()->MovePoint(POINT_ID, fX, fY, fZ); } } break; diff --git a/scripts/outland/shadowmoon_valley.cpp b/scripts/outland/shadowmoon_valley.cpp index a06169dc6..6778aa575 100644 --- a/scripts/outland/shadowmoon_valley.cpp +++ b/scripts/outland/shadowmoon_valley.cpp @@ -118,7 +118,19 @@ struct MANGOS_DLL_DECL mob_mature_netherwing_drakeAI : public ScriptedAI { if (Player* pPlayer = m_creature->GetMap()->GetPlayer(uiPlayerGUID)) { - if (GameObject* pGo = pPlayer->GetGameObject(SPELL_PLACE_CARCASS)) + GameObject* pGo = pPlayer->GetGameObject(SPELL_PLACE_CARCASS); + + // Workaround for broken function GetGameObject + if (!pGo) + { + const SpellEntry* pSpell = GetSpellStore()->LookupEntry(SPELL_PLACE_CARCASS); + + uint32 uiGameobjectEntry = pSpell->EffectMiscValue[EFFECT_INDEX_0]; + + pGo = GetClosestGameObjectWithEntry(pPlayer, uiGameobjectEntry, 2*INTERACTION_DISTANCE); + } + + if (pGo) { if (m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() == WAYPOINT_MOTION_TYPE) m_creature->GetMotionMaster()->MovementExpired(); @@ -126,7 +138,10 @@ struct MANGOS_DLL_DECL mob_mature_netherwing_drakeAI : public ScriptedAI m_creature->GetMotionMaster()->MoveIdle(); m_creature->StopMoving(); - m_creature->GetMotionMaster()->MovePoint(POINT_ID, pGo->GetPositionX(), pGo->GetPositionY(), pGo->GetPositionZ()); + float fX, fY, fZ; + pGo->GetContactPoint(m_creature, fX, fY, fZ, CONTACT_DISTANCE); + + m_creature->GetMotionMaster()->MovePoint(POINT_ID, fX, fY, fZ); } } bCanEat = false; @@ -356,12 +371,20 @@ struct MANGOS_DLL_DECL npc_dragonmaw_peonAI : public ScriptedAI { if (Player* pPlayer = m_creature->GetMap()->GetPlayer(m_uiPlayerGUID)) { - const SpellEntry* pSpell = GetSpellStore()->LookupEntry(SPELL_SERVING_MUTTON); + GameObject* pMutton = pPlayer->GetGameObject(SPELL_SERVING_MUTTON); + + // Workaround for broken function GetGameObject + if (!pMutton) + { + const SpellEntry* pSpell = GetSpellStore()->LookupEntry(SPELL_SERVING_MUTTON); - uint32 uiGameobjectEntry = pSpell->EffectMiscValue[EFFECT_INDEX_0]; + uint32 uiGameobjectEntry = pSpell->EffectMiscValue[EFFECT_INDEX_0]; + + // this can fail, but very low chance + pMutton = GetClosestGameObjectWithEntry(pPlayer, uiGameobjectEntry, 2*INTERACTION_DISTANCE); + } - // this can fail, but very low chance - if (GameObject* pMutton = GetClosestGameObjectWithEntry(pPlayer, uiGameobjectEntry, 2*INTERACTION_DISTANCE)) + if (pMutton) { float fX, fY, fZ; pMutton->GetContactPoint(m_creature, fX, fY, fZ, CONTACT_DISTANCE); diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index ffbca5e16..0392b8da4 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2051" + #define SD2_REVISION_NR "2052" #endif // __SD2_REVISION_NR_H__ From 629a94b34f301cd44b5b91f3c909ab18ed4fc922 Mon Sep 17 00:00:00 2001 From: NoFantasy Date: Thu, 28 Apr 2011 23:40:23 +0200 Subject: [PATCH 0032/1172] [2053] Replace direct use of SetUInt32Value(UNIT_NPC_EMOTESTATE with HandleEmote Signed-off-by: NoFantasy --- .../eastern_kingdoms/stranglethorn_vale.cpp | 4 ++-- scripts/kalimdor/mulgore.cpp | 8 +++---- .../black_temple/boss_reliquary_of_souls.cpp | 24 +++++++++---------- .../black_temple/boss_shade_of_akama.cpp | 4 ++-- .../black_temple/boss_teron_gorefiend.cpp | 4 ++-- scripts/world/spell_scripts.cpp | 2 +- sd2_revision_nr.h | 2 +- 7 files changed, 24 insertions(+), 24 deletions(-) diff --git a/scripts/eastern_kingdoms/stranglethorn_vale.cpp b/scripts/eastern_kingdoms/stranglethorn_vale.cpp index 6a8c1d0dd..f3fd651e5 100644 --- a/scripts/eastern_kingdoms/stranglethorn_vale.cpp +++ b/scripts/eastern_kingdoms/stranglethorn_vale.cpp @@ -45,7 +45,7 @@ struct MANGOS_DLL_DECL mob_yennikuAI : public ScriptedAI void Reset() { Reset_Timer = 0; - m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_NONE); + m_creature->HandleEmote(EMOTE_STATE_NONE); } void SpellHit(Unit *caster, const SpellEntry *spell) @@ -55,7 +55,7 @@ struct MANGOS_DLL_DECL mob_yennikuAI : public ScriptedAI //Yenniku's Release if (!bReset && ((Player*)caster)->GetQuestStatus(592) == QUEST_STATUS_INCOMPLETE && spell->Id == 3607) { - m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_STUN); + m_creature->HandleEmote(EMOTE_STATE_STUN); m_creature->CombatStop(); //stop combat m_creature->DeleteThreatList(); //unsure of this m_creature->setFaction(83); //horde generic diff --git a/scripts/kalimdor/mulgore.cpp b/scripts/kalimdor/mulgore.cpp index a645a1286..98dcb7648 100644 --- a/scripts/kalimdor/mulgore.cpp +++ b/scripts/kalimdor/mulgore.cpp @@ -82,7 +82,7 @@ struct MANGOS_DLL_DECL npc_kyle_the_frenziedAI : public ScriptedAI m_bEvent = true; DoScriptText(EMOTE_SEE_LUNCH, m_creature); - m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_CREATURE_SPECIAL); + m_creature->HandleEmote(EMOTE_ONESHOT_CREATURE_SPECIAL); } } @@ -137,7 +137,7 @@ struct MANGOS_DLL_DECL npc_kyle_the_frenziedAI : public ScriptedAI break; case 2: DoScriptText(EMOTE_EAT_LUNCH, m_creature); - m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_USESTANDING); + m_creature->HandleEmote(EMOTE_STATE_USESTANDING); break; case 3: if (Player* pPlayer = m_creature->GetMap()->GetPlayer(m_uiPlayerGUID)) @@ -148,10 +148,10 @@ struct MANGOS_DLL_DECL npc_kyle_the_frenziedAI : public ScriptedAI case 4: m_uiEventTimer = 30000; DoScriptText(EMOTE_DANCE, m_creature); - m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_DANCESPECIAL); + m_creature->HandleEmote(EMOTE_STATE_DANCESPECIAL); break; case 5: - m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_NONE); + m_creature->HandleEmote(EMOTE_STATE_NONE); Reset(); m_creature->GetMotionMaster()->Clear(); break; diff --git a/scripts/outland/black_temple/boss_reliquary_of_souls.cpp b/scripts/outland/black_temple/boss_reliquary_of_souls.cpp index 05b2bdada..5145a5e8a 100644 --- a/scripts/outland/black_temple/boss_reliquary_of_souls.cpp +++ b/scripts/outland/black_temple/boss_reliquary_of_souls.cpp @@ -174,7 +174,7 @@ struct MANGOS_DLL_DECL boss_reliquary_of_soulsAI : public ScriptedAI m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE,0); + m_creature->HandleEmote(EMOTE_ONESHOT_NONE); m_creature->GetMotionMaster()->Clear(false); } @@ -218,7 +218,7 @@ struct MANGOS_DLL_DECL boss_reliquary_of_soulsAI : public ScriptedAI Phase = 1; // I R ANNNGRRRY! - m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE,375); + m_creature->HandleEmote(EMOTE_STATE_READY2H); SummonEssenceTimer = 8000; AnimationTimer = 5100; m_creature->AddThreat(who); @@ -288,14 +288,14 @@ struct MANGOS_DLL_DECL boss_reliquary_of_soulsAI : public ScriptedAI if (AnimationTimer < diff) { // Release the cube - m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE,374); + m_creature->HandleEmote(EMOTE_ONESHOT_SUBMERGE); AnimationTimer = 8300; }else AnimationTimer -= diff; if (SummonEssenceTimer < diff) { // Ribs: open - m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE,373); + m_creature->HandleEmote(EMOTE_STATE_SUBMERGED); Creature* EssenceSuffering = m_creature->SummonCreature(23418, m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), 1.57f, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 10000); @@ -350,7 +350,7 @@ struct MANGOS_DLL_DECL boss_reliquary_of_soulsAI : public ScriptedAI if (AnimationTimer < diff) { // Return - EssenceSuffering->SetUInt32Value(UNIT_NPC_EMOTESTATE,374); + EssenceSuffering->HandleEmote(EMOTE_ONESHOT_SUBMERGE); AnimationTimer = 10000; }else AnimationTimer -= diff; @@ -361,7 +361,7 @@ struct MANGOS_DLL_DECL boss_reliquary_of_soulsAI : public ScriptedAI EssenceSuffering->DeleteThreatList(); EssenceSuffering->SetDisplayId(11686); EssenceSuffering->setFaction(35); - m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE,0); + m_creature->HandleEmote(EMOTE_ONESHOT_NONE); SummonEssenceTimer = 20000; //60000; AnimationTimer = 18200; //58100; SoulDeathCount = 0; @@ -391,14 +391,14 @@ struct MANGOS_DLL_DECL boss_reliquary_of_soulsAI : public ScriptedAI if (AnimationTimer < diff) { // Release the cube - m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE,374); + m_creature->HandleEmote(EMOTE_ONESHOT_SUBMERGE); AnimationTimer = 10000; }else AnimationTimer -= diff; if (SummonEssenceTimer < diff) { // Ribs: open - m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE,373); + m_creature->HandleEmote(EMOTE_STATE_SUBMERGED); Creature* EssenceDesire = m_creature->SummonCreature(23419, m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), 1.57f, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 10000); @@ -455,7 +455,7 @@ struct MANGOS_DLL_DECL boss_reliquary_of_soulsAI : public ScriptedAI if (AnimationTimer < diff) { // Return - EssenceDesire->SetUInt32Value(UNIT_NPC_EMOTESTATE,374); + EssenceDesire->HandleEmote(EMOTE_ONESHOT_SUBMERGE); AnimationTimer = 10000; }else AnimationTimer -= diff; @@ -467,7 +467,7 @@ struct MANGOS_DLL_DECL boss_reliquary_of_soulsAI : public ScriptedAI DoScriptText(DESI_SAY_AFTER, EssenceDesire); EssenceDesire->SetDisplayId(11686); - m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE,0); + m_creature->HandleEmote(EMOTE_ONESHOT_NONE); SummonEssenceTimer = 20000; AnimationTimer = 18200; SoulDeathCount = 0; @@ -498,14 +498,14 @@ struct MANGOS_DLL_DECL boss_reliquary_of_soulsAI : public ScriptedAI if (AnimationTimer < diff) { // Release the cube - m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE,374); + m_creature->HandleEmote(EMOTE_ONESHOT_SUBMERGE); AnimationTimer = 10000; }else AnimationTimer -= diff; if (SummonEssenceTimer < diff) { // Ribs: open - m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE,373); + m_creature->HandleEmote(EMOTE_STATE_SUBMERGED); Creature* EssenceAnger = m_creature->SummonCreature(23420, m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), 1.57f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 45000); diff --git a/scripts/outland/black_temple/boss_shade_of_akama.cpp b/scripts/outland/black_temple/boss_shade_of_akama.cpp index e4f41798a..4e0d01652 100644 --- a/scripts/outland/black_temple/boss_shade_of_akama.cpp +++ b/scripts/outland/black_temple/boss_shade_of_akama.cpp @@ -157,7 +157,7 @@ struct MANGOS_DLL_DECL boss_shade_of_akamaAI : public ScriptedAI m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_STUN); + m_creature->HandleEmote(EMOTE_STATE_STUN); } void AttackStart(Unit* pWho) @@ -469,7 +469,7 @@ struct MANGOS_DLL_DECL npc_akamaAI : public ScriptedAI pShade->SetInCombatWith(m_creature); m_creature->SetInCombatWith(pShade); - pShade->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_NONE); + pShade->HandleEmote(EMOTE_STATE_NONE); pShade->SetUInt64Value(UNIT_FIELD_TARGET, m_creature->GetGUID()); pShade->SetInCombatWithZone(); diff --git a/scripts/outland/black_temple/boss_teron_gorefiend.cpp b/scripts/outland/black_temple/boss_teron_gorefiend.cpp index 53d46faaa..79e55f832 100644 --- a/scripts/outland/black_temple/boss_teron_gorefiend.cpp +++ b/scripts/outland/black_temple/boss_teron_gorefiend.cpp @@ -258,7 +258,7 @@ struct MANGOS_DLL_DECL boss_teron_gorefiendAI : public ScriptedAI DoScriptText(SAY_INTRO, m_creature); - m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_TALK); + m_creature->HandleEmote(EMOTE_STATE_TALK); m_uiAggroTargetGUID = pWho->GetGUID(); m_bIntro = true; } @@ -358,7 +358,7 @@ struct MANGOS_DLL_DECL boss_teron_gorefiendAI : public ScriptedAI DoScriptText(SAY_AGGRO, m_creature); - m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_NONE); + m_creature->HandleEmote(EMOTE_STATE_NONE); m_bIntro = false; if (m_uiAggroTargetGUID) { diff --git a/scripts/world/spell_scripts.cpp b/scripts/world/spell_scripts.cpp index 5114eb76c..a75f94a54 100644 --- a/scripts/world/spell_scripts.cpp +++ b/scripts/world/spell_scripts.cpp @@ -543,7 +543,7 @@ bool EffectDummyCreature_spell_dummy_npc(Unit* pCaster, uint32 uiSpellId, SpellE } pCreatureTarget->SetStandState(UNIT_STAND_STATE_STAND); - pCreatureTarget->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_WORK); + pCreatureTarget->HandleEmote(EMOTE_STATE_WORK); break; } } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 0392b8da4..df7d056c5 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2052" + #define SD2_REVISION_NR "2053" #endif // __SD2_REVISION_NR_H__ From 1f837f292b9781bf4409af0e4eaeaee6f3af7fc3 Mon Sep 17 00:00:00 2001 From: NoFantasy Date: Thu, 28 Apr 2011 23:43:18 +0200 Subject: [PATCH 0033/1172] [2054] Replace one HandleEmoteCommand with HandleEmote Signed-off-by: NoFantasy --- scripts/outland/terokkar_forest.cpp | 2 +- sd2_revision_nr.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/outland/terokkar_forest.cpp b/scripts/outland/terokkar_forest.cpp index 803f46494..6e33129a8 100644 --- a/scripts/outland/terokkar_forest.cpp +++ b/scripts/outland/terokkar_forest.cpp @@ -1068,7 +1068,7 @@ struct MANGOS_DLL_DECL npc_isla_starmaneAI : public npc_escortAI case 67: if (Player* pPlayer = GetPlayerForEscort()) m_creature->SetFacingToObject(pPlayer); - m_creature->HandleEmoteCommand(EMOTE_ONESHOT_WAVE); + m_creature->HandleEmote(EMOTE_ONESHOT_WAVE); break; } } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index df7d056c5..4884cda4f 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2053" + #define SD2_REVISION_NR "2054" #endif // __SD2_REVISION_NR_H__ From a292f4e54fcb6459681ba3748293f145b4f16b27 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Thu, 28 Apr 2011 19:52:28 +0200 Subject: [PATCH 0034/1172] [2055] MC-Ragnaros: Some spell related improvement * Add support for 'Hammer of Ragnaros' - might need proper DB-data for trigger npcs * Remove wrong use of Melt Armor (thanks to antifreak for pointing) * Fix text for Wrath of Ragnaros (patch by antifreak) Signed-off-by: Schmoozerd --- .../molten_core/boss_ragnaros.cpp | 63 ++++++++++++------- sd2_revision_nr.h | 2 +- 2 files changed, 43 insertions(+), 22 deletions(-) diff --git a/scripts/eastern_kingdoms/molten_core/boss_ragnaros.cpp b/scripts/eastern_kingdoms/molten_core/boss_ragnaros.cpp index 040a01e3c..c2354be0d 100644 --- a/scripts/eastern_kingdoms/molten_core/boss_ragnaros.cpp +++ b/scripts/eastern_kingdoms/molten_core/boss_ragnaros.cpp @@ -25,18 +25,9 @@ EndScriptData */ #include "molten_core.h" /* There have been quite some bugs about his spells, keep this as reference untill all finished - * From original version, spells - * SPELL_HAND_OF_RAGNAROS = 19780 // Is not linked to Ragnaros, and also not mentioned on wowwiki, timer was 25s - * SPELL_ERRUPTION = 17731 // Is a spell from Onyxia-Encounter - * SPELL_SONSOFFLAME_DUMMY = 21108 // Does not exist anymore, and was also unused - * have been removed - * * Missing features (based on wowwiki) - * Hammer of Ragnaros - Ranged Knockback and Damage * Lava Splash - Localized Damage - * - * A few interesting spells - * Might of Ragnaros: Summons a trigger npc (Flame of Ragnaros), visual fits to Hammer, possible knockback spell in spell range: 21155 + * Melt Weapon - Proc Aura missing in DBC, or hack missing */ enum @@ -44,7 +35,7 @@ enum SAY_ARRIVAL5_RAG = -1409012, SAY_REINFORCEMENTS_1 = -1409013, SAY_REINFORCEMENTS_2 = -1409014, - SAY_HAMMER = -1409015, // TODO Hammer of Ragnaros + SAY_HAMMER = -1409015, SAY_WRATH = -1409016, SAY_KILL = -1409017, SAY_MAGMABURST = -1409018, @@ -52,13 +43,16 @@ enum SPELL_WRATH_OF_RAGNAROS = 20566, SPELL_ELEMENTAL_FIRE = 20564, SPELL_MAGMA_BLAST = 20565, // Ranged attack if nobody is in melee range - SPELL_MELT_WEAPON = 21388, // Passive aura + SPELL_MELT_WEAPON = 21388, // Passive aura was spell 21387, TODO need some hack.. SPELL_RAGNA_SUBMERGE = 21107, // Stealth aura SPELL_RAGNA_EMERGE = 20568, // Emerge from lava SPELL_ELEMENTAL_FIRE_KILL = 19773, + SPELL_MIGHT_OF_RAGNAROS = 21154, + SPELL_INTENSE_HEAT = 21155, MAX_ADDS_IN_SUBMERGE = 8, - NPC_SON_OF_FLAME = 12143 + NPC_SON_OF_FLAME = 12143, + NPC_FLAME_OF_RAGNAROS = 13148, }; struct MANGOS_DLL_DECL boss_ragnarosAI : public Scripted_NoMovementAI @@ -75,6 +69,7 @@ struct MANGOS_DLL_DECL boss_ragnarosAI : public Scripted_NoMovementAI uint32 m_uiEnterCombatTimer; uint32 m_uiWrathOfRagnarosTimer; + uint32 m_uiHammerTimer; uint32 m_uiMagmaBlastTimer; uint32 m_uiElementalFireTimer; uint32 m_uiSubmergeTimer; @@ -88,7 +83,8 @@ struct MANGOS_DLL_DECL boss_ragnarosAI : public Scripted_NoMovementAI void Reset() { - m_uiWrathOfRagnarosTimer = 30000; + m_uiWrathOfRagnarosTimer = 30000; // TODO Research more, according to wowwiki 25s, but timers up to 34s confirmed + m_uiHammerTimer = 11000; // TODO wowwiki states 20-30s timer, but ~11s confirmed m_uiMagmaBlastTimer = 2000; m_uiElementalFireTimer = 3000; m_uiSubmergeTimer = 3*MINUTE*IN_MILLISECONDS; @@ -124,9 +120,6 @@ struct MANGOS_DLL_DECL boss_ragnarosAI : public Scripted_NoMovementAI if (m_pInstance) m_pInstance->SetData(TYPE_RAGNAROS, IN_PROGRESS); - - // Passive aura - DoCastSpellIfCan(m_creature, SPELL_MELT_WEAPON, CAST_TRIGGERED); } void EnterEvadeMode() @@ -163,6 +156,8 @@ struct MANGOS_DLL_DECL boss_ragnarosAI : public Scripted_NoMovementAI ++m_uiAddCount; } + else if (pSummoned->GetEntry() == NPC_FLAME_OF_RAGNAROS) + pSummoned->CastSpell(pSummoned, SPELL_INTENSE_HEAT, true, NULL, NULL, m_creature->GetObjectGuid()); } void SpellHitTarget(Unit* pTarget, const SpellEntry* pSpell) @@ -230,9 +225,7 @@ struct MANGOS_DLL_DECL boss_ragnarosAI : public Scripted_NoMovementAI { if (DoCastSpellIfCan(m_creature, SPELL_WRATH_OF_RAGNAROS) == CAST_OK) { - if (urand(0, 1)) - DoScriptText(SAY_WRATH, m_creature); - + DoScriptText(SAY_WRATH, m_creature); m_uiWrathOfRagnarosTimer = 30000; } } @@ -248,10 +241,38 @@ struct MANGOS_DLL_DECL boss_ragnarosAI : public Scripted_NoMovementAI else m_uiElementalFireTimer -= uiDiff; + // Hammer of Ragnaros + if (m_uiHammerTimer < uiDiff) + { + // Select a target with mana-bar + std::list lValidTargets; + ThreatList const& tList = m_creature->getThreatManager().getThreatList(); + for (ThreatList::const_iterator iter = tList.begin(); iter != tList.end(); ++iter) + { + Unit* pTempTarget = m_creature->GetMap()->GetUnit((*iter)->getUnitGuid()); + if (pTempTarget && pTempTarget->getPowerType() == POWER_MANA) + lValidTargets.push_back(pTempTarget); + } + + if (!lValidTargets.empty()) + { + std::list::const_iterator itr = lValidTargets.begin(); + advance(itr, urand(0, lValidTargets.size() - 1)); + if (DoCastSpellIfCan(*itr, SPELL_MIGHT_OF_RAGNAROS) == CAST_OK) + { + DoScriptText(SAY_HAMMER, m_creature); + m_uiHammerTimer = 11000; + } + } + else + m_uiHammerTimer = 11000; + } + else + m_uiHammerTimer -= uiDiff; + // Submerge Timer if (m_uiSubmergeTimer < uiDiff) { - // Submerge and attack again after 90 secs DoCastSpellIfCan(m_creature, SPELL_RAGNA_SUBMERGE, CAST_INTERRUPT_PREVIOUS); m_creature->HandleEmote(EMOTE_ONESHOT_SUBMERGE); diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 4884cda4f..560b1003e 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2054" + #define SD2_REVISION_NR "2055" #endif // __SD2_REVISION_NR_H__ From 2b8633e8c6aef8b0387c7c53417a0378cfacc6ec Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Sat, 19 Mar 2011 02:27:40 +0100 Subject: [PATCH 0035/1172] [2056] Black Temple Warlord Najentus * Cleanup * Fix Shield Handling * Remove a (incomplete) spell hack for Needle Spine * These still require proper core support - spells 39992, 39835 Signed-off-by: Schmoozerd --- .../black_temple/boss_warlord_najentus.cpp | 129 +++++++++--------- sd2_revision_nr.h | 2 +- 2 files changed, 69 insertions(+), 62 deletions(-) diff --git a/scripts/outland/black_temple/boss_warlord_najentus.cpp b/scripts/outland/black_temple/boss_warlord_najentus.cpp index 1da1b69e9..ab701130a 100644 --- a/scripts/outland/black_temple/boss_warlord_najentus.cpp +++ b/scripts/outland/black_temple/boss_warlord_najentus.cpp @@ -17,7 +17,7 @@ /* ScriptData SDName: Boss_Warlord_Najentus SD%Complete: 90 -SDComment: Does the GO need script? Uncomment code to test. +SDComment: Core spell support for Needle Spine (spells 39992, 39835) missing, no change from SD2 needed SDCategory: Black Temple EndScriptData */ @@ -38,10 +38,9 @@ enum SAY_DEATH = -1564009, SPELL_CRASHINGWAVE = 40100, - SPELL_NEEDLE_SPINE = 39835, - SPELL_NEEDLE_AOE = 39968, + SPELL_NEEDLE_SPINE = 39992, SPELL_TIDAL_BURST = 39878, - SPELL_TIDAL_SHIELD = 39872, // Not going to use this since Hurl Spine doesn't dispel it. + SPELL_TIDAL_SHIELD = 39872, SPELL_IMPALING_SPINE = 39837, SPELL_CREATE_NAJENTUS_SPINE = 39956, SPELL_HURL_SPINE = 39948, @@ -75,6 +74,8 @@ struct MANGOS_DLL_DECL boss_najentusAI : public ScriptedAI m_uiSpecialYellTimer = urand(45000, 120000); m_uiTidalShieldTimer = 60000; m_uiImpalingSpineTimer = 20000; + + SetCombatMovement(true); } void JustReachedHome() @@ -83,12 +84,12 @@ struct MANGOS_DLL_DECL boss_najentusAI : public ScriptedAI m_pInstance->SetData(TYPE_NAJENTUS, NOT_STARTED); } - void KilledUnit(Unit *victim) + void KilledUnit(Unit* pVictim) { DoScriptText(urand(0, 1) ? SAY_SLAY1 : SAY_SLAY2, m_creature); } - void JustDied(Unit *victim) + void JustDied(Unit* pKiller) { if (m_pInstance) m_pInstance->SetData(TYPE_NAJENTUS, DONE); @@ -96,18 +97,19 @@ struct MANGOS_DLL_DECL boss_najentusAI : public ScriptedAI DoScriptText(SAY_DEATH, m_creature); } - void SpellHit(Unit *caster, const SpellEntry *spell) + void SpellHit(Unit* pCaster, const SpellEntry* pSpell) { - if (m_bIsShielded) + if (m_bIsShielded && pSpell->Id == SPELL_HURL_SPINE) { - if (spell->Id == SPELL_HURL_SPINE) - { - if (m_creature->HasAura(SPELL_TIDAL_SHIELD, EFFECT_INDEX_0)) - m_creature->RemoveAurasDueToSpell(SPELL_TIDAL_SHIELD); + if (m_creature->HasAura(SPELL_TIDAL_SHIELD)) + m_creature->RemoveAurasDueToSpell(SPELL_TIDAL_SHIELD); - DoCastSpellIfCan(m_creature->getVictim(), SPELL_TIDAL_BURST); - m_bIsShielded = false; - } + DoCastSpellIfCan(m_creature, SPELL_TIDAL_BURST); + m_bIsShielded = false; + + SetCombatMovement(true); + if (m_creature->getVictim()) + m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); } } @@ -119,79 +121,83 @@ struct MANGOS_DLL_DECL boss_najentusAI : public ScriptedAI DoScriptText(SAY_AGGRO, m_creature); } - void UpdateAI(const uint32 diff) + void UpdateAI(const uint32 uiDiff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - if (m_uiEnrageTimer < diff) + // If shield expired after 45s, attack again + if (m_bIsShielded && m_uiTidalShieldTimer < 16000 && !m_creature->HasAura(SPELL_TIDAL_SHIELD)) { - if (m_creature->IsNonMeleeSpellCasted(false)) - m_creature->InterruptNonMeleeSpells(false); - - DoScriptText(SAY_ENRAGE2, m_creature); - DoCastSpellIfCan(m_creature, SPELL_BERSERK); - m_uiEnrageTimer = MINUTE*8*IN_MILLISECONDS; - }else m_uiEnrageTimer -= diff; - - if (m_bIsShielded) - { - m_creature->GetMotionMaster()->Clear(false); - m_creature->GetMotionMaster()->MoveIdle(); + m_bIsShielded = false; - return; // Don't cast or do anything while Shielded + SetCombatMovement(true); + m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); } - // Needle - if (m_uiNeedleSpineTimer < diff) + if (m_uiEnrageTimer < uiDiff) { - for(uint8 i = 0; i < 3; ++i) + if (DoCastSpellIfCan(m_creature, SPELL_BERSERK, CAST_INTERRUPT_PREVIOUS) == CAST_OK) { - Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1); - - if (!target) - target = m_creature->getVictim(); - - DoCastSpellIfCan(target, SPELL_NEEDLE_SPINE); - target->CastSpell(target, SPELL_NEEDLE_AOE, false); + m_uiEnrageTimer = MINUTE*8*IN_MILLISECONDS; + DoScriptText(SAY_ENRAGE2, m_creature); } + } + else + m_uiEnrageTimer -= uiDiff; - m_uiNeedleSpineTimer = 3000; - }else m_uiNeedleSpineTimer -= diff; - - if (m_uiSpecialYellTimer < diff) + if (m_uiSpecialYellTimer < uiDiff) { DoScriptText(urand(0, 1) ? SAY_SPECIAL1 : SAY_SPECIAL2, m_creature); m_uiSpecialYellTimer = urand(25000, 100000); - }else m_uiSpecialYellTimer -= diff; + } + else + m_uiSpecialYellTimer -= uiDiff; - if (m_uiImpalingSpineTimer < diff) + if (m_uiImpalingSpineTimer < uiDiff) { - Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1); + Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1); - if (!target) - target = m_creature->getVictim(); + if (!pTarget) + pTarget = m_creature->getVictim(); - if (target && (target->GetTypeId() == TYPEID_PLAYER)) + if (pTarget && (pTarget->GetTypeId() == TYPEID_PLAYER)) { - DoCastSpellIfCan(target, SPELL_IMPALING_SPINE); + DoCastSpellIfCan(pTarget, SPELL_IMPALING_SPINE); m_uiImpalingSpineTimer = 20000; DoScriptText(urand(0, 1) ? SAY_NEEDLE1 : SAY_NEEDLE2, m_creature); } - }else m_uiImpalingSpineTimer -= diff; + } + else + m_uiImpalingSpineTimer -= uiDiff; - if (m_uiTidalShieldTimer < diff) + if (m_uiTidalShieldTimer < uiDiff) { - m_creature->InterruptNonMeleeSpells(false); - DoCastSpellIfCan(m_creature, SPELL_TIDAL_SHIELD, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_TIDAL_SHIELD, CAST_INTERRUPT_PREVIOUS | CAST_TRIGGERED); m_creature->GetMotionMaster()->Clear(false); m_creature->GetMotionMaster()->MoveIdle(); + SetCombatMovement(false); m_bIsShielded = true; m_uiTidalShieldTimer = 60000; - }else m_uiTidalShieldTimer -= diff; + + // Skip needle splines for 10s + m_uiNeedleSpineTimer += 10000; + } + else + m_uiTidalShieldTimer -= uiDiff; + + // Needle + if (m_uiNeedleSpineTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_NEEDLE_SPINE) == CAST_OK) + m_uiNeedleSpineTimer = 3000; + } + else + m_uiNeedleSpineTimer -= uiDiff; + DoMeleeAttackIfReady(); } @@ -204,9 +210,10 @@ CreatureAI* GetAI_boss_najentus(Creature* pCreature) void AddSC_boss_najentus() { - Script *newscript; - newscript = new Script; - newscript->Name = "boss_najentus"; - newscript->GetAI = &GetAI_boss_najentus; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_najentus"; + pNewScript->GetAI = &GetAI_boss_najentus; + pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 560b1003e..b2f00fa06 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2055" + #define SD2_REVISION_NR "2056" #endif // __SD2_REVISION_NR_H__ From b1f1bec5aec41f9597fd64bad19160de69f7bfc7 Mon Sep 17 00:00:00 2001 From: NoFantasy Date: Sat, 30 Apr 2011 10:03:40 +0200 Subject: [PATCH 0036/1172] [2057] Add missing texts for boss_dathrohan --- .../stratholme/boss_dathrohan_balnazzar.cpp | 23 ++++++++++++++----- sd2_revision_nr.h | 2 +- sql/scriptdev2_script_full.sql | 6 ++++- sql/updates/r2057_scriptdev2.sql | 5 ++++ 4 files changed, 28 insertions(+), 8 deletions(-) create mode 100644 sql/updates/r2057_scriptdev2.sql diff --git a/scripts/eastern_kingdoms/stratholme/boss_dathrohan_balnazzar.cpp b/scripts/eastern_kingdoms/stratholme/boss_dathrohan_balnazzar.cpp index d1120bb41..a787acc6f 100644 --- a/scripts/eastern_kingdoms/stratholme/boss_dathrohan_balnazzar.cpp +++ b/scripts/eastern_kingdoms/stratholme/boss_dathrohan_balnazzar.cpp @@ -25,6 +25,10 @@ EndScriptData */ enum { + SAY_AGGRO = -1329016, + SAY_TRANSFORM = -1329017, + SAY_DEATH = -1329018, + //Dathrohan spells SPELL_CRUSADERSHAMMER = 17286, //AOE stun SPELL_CRUSADERSTRIKE = 17281, @@ -94,8 +98,15 @@ struct MANGOS_DLL_DECL boss_dathrohan_balnazzarAI : public ScriptedAI } + void Aggro(Unit* pWho) + { + DoScriptText(SAY_AGGRO, m_creature); + } + void JustDied(Unit* Victim) { + DoScriptText(SAY_DEATH, m_creature); + static uint32 uiCount = sizeof(m_aSummonPoint)/sizeof(SummonDef); for (uint8 i=0; iGetHealthPercent() < 40.0f) { - if (m_creature->IsNonMeleeSpellCasted(false)) - m_creature->InterruptNonMeleeSpells(false); - //restore hp, mana and stun - DoCastSpellIfCan(m_creature,SPELL_BALNAZZARTRANSFORM); - m_creature->UpdateEntry(NPC_BALNAZZAR); - m_bTransformed = true; + if (DoCastSpellIfCan(m_creature, SPELL_BALNAZZARTRANSFORM) == CAST_OK) + { + m_creature->UpdateEntry(NPC_BALNAZZAR); + DoScriptText(SAY_TRANSFORM, m_creature); + m_bTransformed = true; + } } } else diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index b2f00fa06..9d4a25290 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2056" + #define SD2_REVISION_NR "2057" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index bc1c577b7..cafe1a501 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -995,7 +995,11 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1329012,'May this prisoner\'s death serve as a warning. None shall defy the Scourge and live!',0,6,0,0,'baron rivendare SAY_ANNOUNCE_RUN_FAIL'), (-1329013,'So you see fit to toy with the Lich King\'s creations? Ramstein, be sure to give the intruders a proper greeting.',0,6,0,0,'baron rivendare SAY_ANNOUNCE_RAMSTEIN'), (-1329014,'Time to take matters into my own hands. Come. Enter my domain and challenge the might of the Scourge!',0,6,0,0,'baron rivendare SAY_UNDEAD_DEFEAT'), -(-1329015,'You did it... you\'ve slain Baron Rivendare! The Argent Dawn shall hear of your valiant deeds!',0,0,0,0,'ysida SAY_EPILOGUE'); +(-1329015,'You did it... you\'ve slain Baron Rivendare! The Argent Dawn shall hear of your valiant deeds!',0,0,0,0,'ysida SAY_EPILOGUE'), + +(-1329016,'Today you have unmade what took me years to create! For this you shall all die by my hand!',0,1,0,0,'dathrohan SAY_AGGRO'), +(-1329017,'You fools think you can defeat me so easily? Face the true might of the Nathrezim!',0,1,0,0,'dathrohan SAY_TRANSFORM'), +(-1329018,'Damn you mortals! All my plans of revenge, all my hate... all burned to ash...',0,0,0,0,'dathrohan SAY_DEATH'); -- -1 349 000 MARAUDON diff --git a/sql/updates/r2057_scriptdev2.sql b/sql/updates/r2057_scriptdev2.sql new file mode 100644 index 000000000..37712eefc --- /dev/null +++ b/sql/updates/r2057_scriptdev2.sql @@ -0,0 +1,5 @@ +DELETE FROM script_texts WHERE entry BETWEEN 1329018 AND 1329016; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1329016,'Today you have unmade what took me years to create! For this you shall all die by my hand!',0,1,0,0,'dathrohan SAY_AGGRO'), +(-1329017,'You fools think you can defeat me so easily? Face the true might of the Nathrezim!',0,1,0,0,'dathrohan SAY_TRANSFORM'), +(-1329018,'Damn you mortals! All my plans of revenge, all my hate... all burned to ash...',0,0,0,0,'dathrohan SAY_DEATH'); From 045fc227be8ad52f69833b8aa630a2e65a736e31 Mon Sep 17 00:00:00 2001 From: NoFantasy Date: Sat, 30 Apr 2011 11:03:08 +0200 Subject: [PATCH 0037/1172] [2058] Correct summons, after death of balnazzar Signed-off-by: NoFantasy --- .../stratholme/boss_dathrohan_balnazzar.cpp | 30 +++++++++++-------- sd2_revision_nr.h | 2 +- 2 files changed, 19 insertions(+), 13 deletions(-) diff --git a/scripts/eastern_kingdoms/stratholme/boss_dathrohan_balnazzar.cpp b/scripts/eastern_kingdoms/stratholme/boss_dathrohan_balnazzar.cpp index a787acc6f..af53b6197 100644 --- a/scripts/eastern_kingdoms/stratholme/boss_dathrohan_balnazzar.cpp +++ b/scripts/eastern_kingdoms/stratholme/boss_dathrohan_balnazzar.cpp @@ -46,25 +46,31 @@ enum NPC_DATHROHAN = 10812, NPC_BALNAZZAR = 10813, - NPC_ZOMBIE = 10698 //probably incorrect + NPC_SKELETAL_GUARDIAN = 10390, + NPC_SKELETAL_BERSERKER = 10391 }; struct SummonDef { + uint32 m_uiEntry; float m_fX, m_fY, m_fZ, m_fOrient; }; SummonDef m_aSummonPoint[]= { - {3444.156f, -3090.626f, 135.002f, 2.240f}, //G1 front, left - {3449.123f, -3087.009f, 135.002f, 2.240f}, //G1 front, right - {3446.246f, -3093.466f, 135.002f, 2.240f}, //G1 back left - {3451.160f, -3089.904f, 135.002f, 2.240f}, //G1 back, right - - {3457.995f, -3080.916f, 135.002f, 3.784f}, //G2 front, left - {3454.302f, -3076.330f, 135.002f, 3.784f}, //G2 front, right - {3460.975f, -3078.901f, 135.002f, 3.784f}, //G2 back left - {3457.338f, -3073.979f, 135.002f, 3.784f} //G2 back, right + {NPC_SKELETAL_BERSERKER, 3460.356f, -3070.572f, 135.086f, 0.332f}, + {NPC_SKELETAL_BERSERKER, 3465.289f, -3069.987f, 135.086f, 5.480f}, + {NPC_SKELETAL_BERSERKER, 3463.616f, -3074.912f, 135.086f, 5.009f}, + + {NPC_SKELETAL_GUARDIAN, 3460.012f, -3076.041f, 135.086f, 1.187f}, + {NPC_SKELETAL_GUARDIAN, 3467.909f, -3076.401f, 135.086f, 3.770f}, + + {NPC_SKELETAL_BERSERKER, 3509.269f, -3066.474f, 135.080f, 4.817f}, + {NPC_SKELETAL_BERSERKER, 3510.966f, -3069.011f, 135.080f, 3.491f}, + + {NPC_SKELETAL_GUARDIAN, 3516.042f, -3066.873f, 135.080f, 3.997f}, + {NPC_SKELETAL_GUARDIAN, 3513.561f, -3063.027f, 135.080f, 2.356f}, + {NPC_SKELETAL_GUARDIAN, 3518.825f, -3060.926f, 135.080f, 3.944f} }; struct MANGOS_DLL_DECL boss_dathrohan_balnazzarAI : public ScriptedAI @@ -109,8 +115,8 @@ struct MANGOS_DLL_DECL boss_dathrohan_balnazzarAI : public ScriptedAI static uint32 uiCount = sizeof(m_aSummonPoint)/sizeof(SummonDef); - for (uint8 i=0; iSummonCreature(NPC_ZOMBIE, + for (int i = 0; i < uiCount; ++i) + m_creature->SummonCreature(m_aSummonPoint[i].m_uiEntry, m_aSummonPoint[i].m_fX, m_aSummonPoint[i].m_fY, m_aSummonPoint[i].m_fZ, m_aSummonPoint[i].m_fOrient, TEMPSUMMON_TIMED_DESPAWN, HOUR*IN_MILLISECONDS); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 9d4a25290..95ec53601 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2057" + #define SD2_REVISION_NR "2058" #endif // __SD2_REVISION_NR_H__ From 2483d32d7e948b36eb90bb1852c44fc776bd6fac Mon Sep 17 00:00:00 2001 From: NoFantasy Date: Sun, 1 May 2011 13:04:35 +0200 Subject: [PATCH 0038/1172] [2059] Add escort for quest 12688 Signed-off-by: NoFantasy --- scripts/northrend/sholazar_basin.cpp | 174 ++++++++++++++++++++++++++- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 + sql/scriptdev2_script_full.sql | 35 +++++- sql/updates/r2059_mangos.sql | 1 + sql/updates/r2059_scriptdev2.sql | 34 ++++++ 6 files changed, 244 insertions(+), 3 deletions(-) create mode 100644 sql/updates/r2059_mangos.sql create mode 100644 sql/updates/r2059_scriptdev2.sql diff --git a/scripts/northrend/sholazar_basin.cpp b/scripts/northrend/sholazar_basin.cpp index bca9cc025..551d2e55b 100644 --- a/scripts/northrend/sholazar_basin.cpp +++ b/scripts/northrend/sholazar_basin.cpp @@ -17,11 +17,12 @@ /* ScriptData SDName: Sholazar_Basin SD%Complete: 100 -SDComment: Quest support: 12573, 12570, 12580 +SDComment: Quest support: 12573, 12570, 12580, 12688 SDCategory: Sholazar Basin EndScriptData */ /* ContentData +npc_helice npc_injured_rainspeaker npc_mosswalker_victim npc_vekjik - TODO, can be moved to database (already exist) @@ -30,6 +31,171 @@ EndContentData */ #include "precompiled.h" #include "escort_ai.h" +/*###### +## npc_helice +######*/ + +enum +{ + QUEST_ENGINEERING_DISASTER = 12688, + + SAY_HELICE_ACCEPT = -1000657, + SAY_HELICE_EXPLOSIVES_1 = -1000658, + SAY_HELICE_EXPLODE_1 = -1000659, + SAY_HELICE_MOVE_ON = -1000660, + SAY_HELICE_EXPLOSIVES_2 = -1000661, + SAY_HELICE_EXPLODE_2 = -1000662, + SAY_HELICE_COMPLETE = -1000663, + + SPELL_DETONATE_EXPLOSIVES_1 = 52369, // first "barrel" + SPELL_DETONATE_EXPLOSIVES_2 = 52371, // second "barrel" +}; + +struct MANGOS_DLL_DECL npc_heliceAI : public npc_escortAI +{ + npc_heliceAI(Creature* pCreature) : npc_escortAI(pCreature) + { + m_uiExplodeTimer = 5000; + m_uiExplodePhase = 0; + m_bFirstBarrel = true; + Reset(); + } + + uint32 m_uiExplodeTimer; + uint32 m_uiExplodePhase; + bool m_bFirstBarrel; + + void Reset() + { + } + + void WaypointReached(uint32 uiPointId) + { + switch(uiPointId) + { + case 2: + { + if (Player* pPlayer = GetPlayerForEscort()) + { + DoScriptText(SAY_HELICE_EXPLOSIVES_1, m_creature, pPlayer); + SetEscortPaused(true); + } + break; + } + case 13: + { + if (Player* pPlayer = GetPlayerForEscort()) + { + DoScriptText(SAY_HELICE_EXPLOSIVES_2, m_creature, pPlayer); + SetEscortPaused(true); + } + break; + } + case 22: + { + if (Player* pPlayer = GetPlayerForEscort()) + { + DoScriptText(SAY_HELICE_COMPLETE, m_creature, pPlayer); + pPlayer->GroupEventHappens(QUEST_ENGINEERING_DISASTER, m_creature); + } + break; + } + } + } + + void UpdateEscortAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + { + if (!HasEscortState(STATE_ESCORT_ESCORTING)) + return; + + if (HasEscortState(STATE_ESCORT_PAUSED)) + { + if (m_uiExplodeTimer < uiDiff) + { + if (m_bFirstBarrel) + { + switch(m_uiExplodePhase) + { + case 0: + DoCastSpellIfCan(m_creature, SPELL_DETONATE_EXPLOSIVES_1); + + if (Player* pPlayer = GetPlayerForEscort()) + DoScriptText(SAY_HELICE_EXPLODE_1, m_creature, pPlayer); + + m_uiExplodeTimer = 2500; + ++m_uiExplodePhase; + break; + case 1: + if (Player* pPlayer = GetPlayerForEscort()) + DoScriptText(SAY_HELICE_MOVE_ON, m_creature, pPlayer); + + m_uiExplodeTimer = 2500; + ++m_uiExplodePhase; + break; + case 2: + SetEscortPaused(false); + m_uiExplodePhase = 0; + m_uiExplodeTimer = 5000; + m_bFirstBarrel = false; + break; + } + } + else + { + switch(m_uiExplodePhase) + { + case 0: + DoCastSpellIfCan(m_creature, SPELL_DETONATE_EXPLOSIVES_2); + + if (Player* pPlayer = GetPlayerForEscort()) + DoScriptText(SAY_HELICE_EXPLODE_2, m_creature, pPlayer); + + m_uiExplodeTimer = 2500; + ++m_uiExplodePhase; + break; + case 1: + SetEscortPaused(false); + m_uiExplodePhase = 0; + m_uiExplodeTimer = 5000; + m_bFirstBarrel = true; + break; + } + } + } + else + m_uiExplodeTimer -= uiDiff; + } + + return; + } + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_npc_helice(Creature* pCreature) +{ + return new npc_heliceAI(pCreature); +} + +bool QuestAccept_npc_helice(Player* pPlayer, Creature* pCreature, const Quest* pQuest) +{ + if (pQuest->GetQuestId() == QUEST_ENGINEERING_DISASTER) + { + DoScriptText(SAY_HELICE_ACCEPT, pCreature, pPlayer); + + if (npc_heliceAI* pEscortAI = dynamic_cast(pCreature->AI())) + { + pEscortAI->Start(false, pPlayer->GetGUID(), pQuest); + pCreature->SetFactionTemporary(FACTION_ESCORT_N_NEUTRAL_PASSIVE, TEMPFACTION_RESTORE_RESPAWN); + } + } + + return false; +} + /*###### ## npc_injured_rainspeaker ######*/ @@ -301,6 +467,12 @@ void AddSC_sholazar_basin() { Script* pNewScript; + pNewScript = new Script; + pNewScript->Name = "npc_helice"; + pNewScript->GetAI = &GetAI_npc_helice; + pNewScript->pQuestAcceptNPC = &QuestAccept_npc_helice; + pNewScript->RegisterSelf(); + pNewScript = new Script; pNewScript->Name = "npc_injured_rainspeaker"; pNewScript->GetAI = &GetAI_npc_injured_rainspeaker; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 95ec53601..01c886ad7 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2058" + #define SD2_REVISION_NR "2059" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 5f471e52a..468161194 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -963,6 +963,7 @@ UPDATE creature_template SET ScriptName='npc_shattrathflaskvendors' WHERE entry UPDATE creature_template SET ScriptName='npc_zephyr' WHERE entry=25967; /* SHOLAZAR BASIN */ +UPDATE creature_template SET ScriptName='npc_helice' WHERE entry=28787; UPDATE creature_template SET ScriptName='npc_injured_rainspeaker' WHERE entry=28217; UPDATE creature_template SET ScriptName='npc_mosswalker_victim' WHERE entry=28113; UPDATE creature_template SET ScriptName='npc_vekjik' WHERE entry=28315; diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index cafe1a501..31b9f0216 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -703,7 +703,15 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1000653,'Hey... me not feel so good.',0,0,0,0,'dragonmaw peon SAY_PEON_2'), (-1000654,'You is bad orc... baaad... or... argh!',0,0,0,0,'dragonmaw peon SAY_PEON_3'), (-1000655,'Time for eating!?',0,0,0,71,'dragonmaw peon SAY_PEON_4'), -(-1000656,'It put the mutton in the stomach!',0,0,0,71,'dragonmaw peon SAY_PEON_5'); +(-1000656,'It put the mutton in the stomach!',0,0,0,71,'dragonmaw peon SAY_PEON_5'), + +(-1000657,'Let\'s get the hell out of here.',0,0,0,5,'helice SAY_HELICE_ACCEPT'), +(-1000658,'Listen up, Venture Company goons! Rule #1: Never keep the prisoner near the explosives.',0,0,0,25,'helice SAY_HELICE_EXPLOSIVES_1'), +(-1000659,'Or THIS is what you get.',0,0,0,0,'helice SAY_HELICE_EXPLODE_1'), +(-1000660,'It\'s getting a little hot over here. Shall we move on?',0,0,0,11,'helice SAY_HELICE_MOVE_ON'), +(-1000661,'Oh, look, it\'s another cartload of explosives! Let\'s help them dispose of it.',0,0,0,25,'helice SAY_HELICE_EXPLOSIVES_2'), +(-1000662,'You really shouldn\'t play with this stuff. Someone could get hurt.',0,0,0,5,'helice SAY_HELICE_EXPLODE_2'), +(-1000663,'We made it! Thank you for getting me out of that hell hole. Tell Hemet to expect me!',0,0,0,4,'helice SAY_HELICE_COMPLETE'); -- -1 033 000 SHADOWFANG KEEP INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES @@ -5221,6 +5229,31 @@ INSERT INTO script_waypoint VALUES (28217,23, 5638.541504, 4594.924805, -137.495117, 0, 'summon'), (28217,24, 5638.061523, 4579.945801, -138.029465, 0, ''); +DELETE FROM script_waypoint WHERE entry=28787; +INSERT INTO script_waypoint (entry, pointid, location_x, location_y, location_z, waittime, point_comment) VALUES +(28787, 1, 5913.516113, 5379.034668, -98.896118, 0, ''), +(28787, 2, 5917.750977, 5374.519043, -98.869781, 0, 'SAY_HELICE_EXPLOSIVES_1'), +(28787, 3, 5926.428711, 5372.145020, -98.884453, 0, ''), +(28787, 4, 5929.214844, 5377.803223, -99.020065, 0, ''), +(28787, 5, 5927.621582, 5378.564941, -99.047890, 0, ''), +(28787, 6, 5917.622070, 5383.494629, -106.310204, 0, ''), +(28787, 7, 5908.991211, 5387.655762, -106.310204, 0, ''), +(28787, 8, 5906.287109, 5390.496582, -106.041801, 0, ''), +(28787, 9, 5902.415039, 5399.741211, -99.306595, 0, ''), +(28787, 10, 5901.444336, 5404.593262, -96.759636, 0, ''), +(28787, 11, 5897.860352, 5406.656250, -96.029709, 0, ''), +(28787, 12, 5892.254395, 5401.291504, -95.848808, 0, ''), +(28787, 13, 5887.421875, 5386.701172, -95.400146, 0, 'SAY_HELICE_EXPLOSIVES_2'), +(28787, 14, 5883.308105, 5385.057617, -94.423698, 0, ''), +(28787, 15, 5879.180664, 5375.897461, -95.088066, 0, ''), +(28787, 16, 5872.613281, 5363.473633, -97.703575, 0, ''), +(28787, 17, 5857.971191, 5354.929688, -98.586090, 0, ''), +(28787, 18, 5848.729004, 5345.326660, -99.428978, 0, ''), +(28787, 19, 5842.330566, 5335.018555, -100.421455, 0, ''), +(28787, 20, 5832.164551, 5323.145020, -98.703285, 0, ''), +(28787, 21, 5824.738770, 5315.712891, -97.758018, 0, ''), +(28787, 22, 5819.650879, 5305.409668, -97.481796, 10000, 'SAY_HELICE_COMPLETE'); + DELETE FROM script_waypoint WHERE entry=28912; INSERT INTO script_waypoint VALUES (28912, 0, 1653.518, -6038.374, 127.585, 0, 'Jump off'), diff --git a/sql/updates/r2059_mangos.sql b/sql/updates/r2059_mangos.sql new file mode 100644 index 000000000..e723f5665 --- /dev/null +++ b/sql/updates/r2059_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_helice' WHERE entry=28787; diff --git a/sql/updates/r2059_scriptdev2.sql b/sql/updates/r2059_scriptdev2.sql new file mode 100644 index 000000000..43d91253b --- /dev/null +++ b/sql/updates/r2059_scriptdev2.sql @@ -0,0 +1,34 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1000663 AND -1000657; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1000657,'Let\'s get the hell out of here.',0,0,0,5,'helice SAY_HELICE_ACCEPT'), +(-1000658,'Listen up, Venture Company goons! Rule #1: Never keep the prisoner near the explosives.',0,0,0,25,'helice SAY_HELICE_EXPLOSIVES_1'), +(-1000659,'Or THIS is what you get.',0,0,0,0,'helice SAY_HELICE_EXPLODE_1'), +(-1000660,'It\'s getting a little hot over here. Shall we move on?',0,0,0,11,'helice SAY_HELICE_MOVE_ON'), +(-1000661,'Oh, look, it\'s another cartload of explosives! Let\'s help them dispose of it.',0,0,0,25,'helice SAY_HELICE_EXPLOSIVES_2'), +(-1000662,'You really shouldn\'t play with this stuff. Someone could get hurt.',0,0,0,5,'helice SAY_HELICE_EXPLODE_2'), +(-1000663,'We made it! Thank you for getting me out of that hell hole. Tell Hemet to expect me!',0,0,0,4,'helice SAY_HELICE_COMPLETE'); + +DELETE FROM script_waypoint WHERE entry=28787; +INSERT INTO script_waypoint (entry, pointid, location_x, location_y, location_z, waittime, point_comment) VALUES +(28787, 1, 5913.516113, 5379.034668, -98.896118, 0, ''), +(28787, 2, 5917.750977, 5374.519043, -98.869781, 0, 'SAY_HELICE_EXPLOSIVES_1'), +(28787, 3, 5926.428711, 5372.145020, -98.884453, 0, ''), +(28787, 4, 5929.214844, 5377.803223, -99.020065, 0, ''), +(28787, 5, 5927.621582, 5378.564941, -99.047890, 0, ''), +(28787, 6, 5917.622070, 5383.494629, -106.310204, 0, ''), +(28787, 7, 5908.991211, 5387.655762, -106.310204, 0, ''), +(28787, 8, 5906.287109, 5390.496582, -106.041801, 0, ''), +(28787, 9, 5902.415039, 5399.741211, -99.306595, 0, ''), +(28787, 10, 5901.444336, 5404.593262, -96.759636, 0, ''), +(28787, 11, 5897.860352, 5406.656250, -96.029709, 0, ''), +(28787, 12, 5892.254395, 5401.291504, -95.848808, 0, ''), +(28787, 13, 5887.421875, 5386.701172, -95.400146, 0, 'SAY_HELICE_EXPLOSIVES_2'), +(28787, 14, 5883.308105, 5385.057617, -94.423698, 0, ''), +(28787, 15, 5879.180664, 5375.897461, -95.088066, 0, ''), +(28787, 16, 5872.613281, 5363.473633, -97.703575, 0, ''), +(28787, 17, 5857.971191, 5354.929688, -98.586090, 0, ''), +(28787, 18, 5848.729004, 5345.326660, -99.428978, 0, ''), +(28787, 19, 5842.330566, 5335.018555, -100.421455, 0, ''), +(28787, 20, 5832.164551, 5323.145020, -98.703285, 0, ''), +(28787, 21, 5824.738770, 5315.712891, -97.758018, 0, ''), +(28787, 22, 5819.650879, 5305.409668, -97.481796, 10000, 'SAY_HELICE_COMPLETE'); From 00d113c8005d510a53cfedae6e7c89a4303e263a Mon Sep 17 00:00:00 2001 From: NoFantasy Date: Sun, 1 May 2011 13:06:56 +0200 Subject: [PATCH 0039/1172] [2060] Fix a compile warning Signed-off-by: NoFantasy --- .../eastern_kingdoms/stratholme/boss_dathrohan_balnazzar.cpp | 2 +- sd2_revision_nr.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/eastern_kingdoms/stratholme/boss_dathrohan_balnazzar.cpp b/scripts/eastern_kingdoms/stratholme/boss_dathrohan_balnazzar.cpp index af53b6197..8e12d5262 100644 --- a/scripts/eastern_kingdoms/stratholme/boss_dathrohan_balnazzar.cpp +++ b/scripts/eastern_kingdoms/stratholme/boss_dathrohan_balnazzar.cpp @@ -115,7 +115,7 @@ struct MANGOS_DLL_DECL boss_dathrohan_balnazzarAI : public ScriptedAI static uint32 uiCount = sizeof(m_aSummonPoint)/sizeof(SummonDef); - for (int i = 0; i < uiCount; ++i) + for (uint32 i = 0; i < uiCount; ++i) m_creature->SummonCreature(m_aSummonPoint[i].m_uiEntry, m_aSummonPoint[i].m_fX, m_aSummonPoint[i].m_fY, m_aSummonPoint[i].m_fZ, m_aSummonPoint[i].m_fOrient, TEMPSUMMON_TIMED_DESPAWN, HOUR*IN_MILLISECONDS); diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 01c886ad7..e44a3f0df 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2059" + #define SD2_REVISION_NR "2060" #endif // __SD2_REVISION_NR_H__ From a69a0285294ba7e6408e1edc1e37a2e3a5e726e7 Mon Sep 17 00:00:00 2001 From: NoFantasy Date: Sun, 1 May 2011 20:00:22 +0200 Subject: [PATCH 0040/1172] [2061] Add support for quest 11728 Includes related spell effects for 53326 and 46073. Signed-off-by: NoFantasy --- scripts/northrend/borean_tundra.cpp | 223 ++++++++++++++++++++++------ sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 + sql/updates/r2061_mangos.sql | 1 + 4 files changed, 179 insertions(+), 48 deletions(-) create mode 100644 sql/updates/r2061_mangos.sql diff --git a/scripts/northrend/borean_tundra.cpp b/scripts/northrend/borean_tundra.cpp index c58a7771d..02b0f33cb 100644 --- a/scripts/northrend/borean_tundra.cpp +++ b/scripts/northrend/borean_tundra.cpp @@ -286,6 +286,128 @@ CreatureAI* GetAI_npc_nesingwary_trapper(Creature* pCreature) return new npc_nesingwary_trapperAI(pCreature); } +/*##### +# npc_oil_stained_wolf +#####*/ + +enum +{ + SPELL_THROW_WOLF_BAIT = 53326, + SPELL_PLACE_WOLF_BAIT = 46072, // doesn't appear to be used for anything + SPELL_HAS_EATEN = 46073, + SPELL_SUMMON_DROPPINGS = 46075, + + FACTION_MONSTER = 634, + + POINT_DEST = 1 +}; + +struct MANGOS_DLL_DECL npc_oil_stained_wolfAI : public ScriptedAI +{ + npc_oil_stained_wolfAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } + + bool m_bCanCrapInPublic; + uint32 m_uiPooTimer; + + void Reset() + { + m_bCanCrapInPublic = false; + m_uiPooTimer = 0; + } + + void MovementInform(uint32 uiType, uint32 uiPointId) + { + if (uiType != POINT_MOTION_TYPE) + return; + + if (uiPointId == POINT_DEST) + { + DoCastSpellIfCan(m_creature, SPELL_HAS_EATEN); + m_uiPooTimer = 4000; + } + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + { + if (m_uiPooTimer) + { + if (m_uiPooTimer <= uiDiff) + { + if (m_bCanCrapInPublic) + { + DoCastSpellIfCan(m_creature, SPELL_SUMMON_DROPPINGS); + m_creature->GetMotionMaster()->Clear(); + Reset(); + } + else + { + m_creature->HandleEmote(EMOTE_ONESHOT_BATTLEROAR); + m_bCanCrapInPublic = true; + m_uiPooTimer = 3000; + } + } + else + m_uiPooTimer -= uiDiff; + } + + return; + } + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_npc_oil_stained_wolf(Creature* pCreature) +{ + return new npc_oil_stained_wolfAI(pCreature); +} + +bool EffectDummyCreature_npc_oil_stained_wolf(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) +{ + if (uiSpellId == SPELL_THROW_WOLF_BAIT) + { + if (uiEffIndex == EFFECT_INDEX_0 && pCreatureTarget->getFaction() != FACTION_MONSTER && !pCreatureTarget->HasAura(SPELL_HAS_EATEN)) + { + pCreatureTarget->SetFactionTemporary(FACTION_MONSTER); + pCreatureTarget->RemoveSplineFlag(SPLINEFLAG_WALKMODE); + + pCreatureTarget->GetMotionMaster()->MoveIdle(); + + float fX, fY, fZ; + pCaster->GetContactPoint(pCreatureTarget, fX, fY, fZ, CONTACT_DISTANCE); + pCreatureTarget->GetMotionMaster()->MovePoint(POINT_DEST, fX, fY, fZ); + return true; + } + } + + return false; +} + +bool EffectAuraDummy_npc_oil_stained_wolf(const Aura* pAura, bool bApply) +{ + if (pAura->GetId() == SPELL_HAS_EATEN) + { + if (pAura->GetEffIndex() != EFFECT_INDEX_0) + return false; + + if (bApply) + { + pAura->GetTarget()->HandleEmote(EMOTE_ONESHOT_CUSTOMSPELL01); + } + else + { + Creature* pCreature = (Creature*)pAura->GetTarget(); + pCreature->setFaction(pCreature->GetCreatureInfo()->faction_A); + } + + return true; + } + + return false; +} + /*###### ## go_caribou_trap ######*/ @@ -529,51 +651,58 @@ CreatureAI* GetAI_npc_lurgglbr(Creature* pCreature) void AddSC_borean_tundra() { - Script *newscript; - - newscript = new Script; - newscript->Name = "npc_fizzcrank_fullthrottle"; - newscript->pGossipHello = &GossipHello_npc_fizzcrank_fullthrottle; - newscript->pGossipSelect = &GossipSelect_npc_fizzcrank_fullthrottle; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_iruk"; - newscript->pGossipHello = &GossipHello_npc_iruk; - newscript->pGossipSelect = &GossipSelect_npc_iruk; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_kara_thricestar"; - newscript->pGossipHello = &GossipHello_npc_kara_thricestar; - newscript->pGossipSelect = &GossipSelect_npc_kara_thricestar; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_nesingwary_trapper"; - newscript->GetAI = &GetAI_npc_nesingwary_trapper; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "go_caribou_trap"; - newscript->pGOUse = &GOUse_go_caribou_trap; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_surristrasz"; - newscript->pGossipHello = &GossipHello_npc_surristrasz; - newscript->pGossipSelect = &GossipSelect_npc_surristrasz; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_tiare"; - newscript->pGossipHello = &GossipHello_npc_tiare; - newscript->pGossipSelect = &GossipSelect_npc_tiare; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_lurgglbr"; - newscript->GetAI = &GetAI_npc_lurgglbr; - newscript->pQuestAcceptNPC = &QuestAccept_npc_lurgglbr; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "npc_fizzcrank_fullthrottle"; + pNewScript->pGossipHello = &GossipHello_npc_fizzcrank_fullthrottle; + pNewScript->pGossipSelect = &GossipSelect_npc_fizzcrank_fullthrottle; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_iruk"; + pNewScript->pGossipHello = &GossipHello_npc_iruk; + pNewScript->pGossipSelect = &GossipSelect_npc_iruk; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_kara_thricestar"; + pNewScript->pGossipHello = &GossipHello_npc_kara_thricestar; + pNewScript->pGossipSelect = &GossipSelect_npc_kara_thricestar; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_nesingwary_trapper"; + pNewScript->GetAI = &GetAI_npc_nesingwary_trapper; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_oil_stained_wolf"; + pNewScript->GetAI = &GetAI_npc_oil_stained_wolf; + pNewScript->pEffectDummyNPC = &EffectDummyCreature_npc_oil_stained_wolf; + pNewScript->pEffectAuraDummy = &EffectAuraDummy_npc_oil_stained_wolf; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "go_caribou_trap"; + pNewScript->pGOUse = &GOUse_go_caribou_trap; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_surristrasz"; + pNewScript->pGossipHello = &GossipHello_npc_surristrasz; + pNewScript->pGossipSelect = &GossipSelect_npc_surristrasz; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_tiare"; + pNewScript->pGossipHello = &GossipHello_npc_tiare; + pNewScript->pGossipSelect = &GossipSelect_npc_tiare; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_lurgglbr"; + pNewScript->GetAI = &GetAI_npc_lurgglbr; + pNewScript->pQuestAcceptNPC = &QuestAccept_npc_lurgglbr; + pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index e44a3f0df..6915e144f 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2060" + #define SD2_REVISION_NR "2061" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 468161194..b0f2b6424 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -354,6 +354,7 @@ UPDATE creature_template SET ScriptName='npc_fizzcrank_fullthrottle' WHERE entry UPDATE creature_template SET ScriptName='npc_iruk' WHERE entry=26219; UPDATE creature_template SET ScriptName='npc_kara_thricestar' WHERE entry=26602; UPDATE creature_template SET ScriptName='npc_nesingwary_trapper' WHERE entry=25835; +UPDATE creature_template SET ScriptName='npc_oil_stained_wolf' WHERE entry=25791; UPDATE gameobject_template SET ScriptName='go_caribou_trap' WHERE entry IN (187982,187995,187996,187997,187998,187999,188000,188001,188002,188003,188004,188005,188006,188007,188008); UPDATE creature_template SET ScriptName='npc_surristrasz' WHERE entry=24795; UPDATE creature_template SET ScriptName='npc_tiare' WHERE entry=30051; diff --git a/sql/updates/r2061_mangos.sql b/sql/updates/r2061_mangos.sql new file mode 100644 index 000000000..2d518d85c --- /dev/null +++ b/sql/updates/r2061_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_oil_stained_wolf' WHERE entry=25791; From 4202277dd95f9f8835f349f8cea0da918a88017b Mon Sep 17 00:00:00 2001 From: Xfurry Date: Mon, 2 May 2011 15:01:05 +0200 Subject: [PATCH 0041/1172] [2062] Cleanup Sunwell instance scripts Squashed commit of the following: * Update copyrights * Fix doors * Basic cleanup Signed-off-by: Schmoozerd --- .../sunwell_plateau/boss_kalecgos.cpp | 14 +- .../instance_sunwell_plateau.cpp | 561 +++++++++--------- .../sunwell_plateau/sunwell_plateau.h | 112 +++- sd2_revision_nr.h | 2 +- 4 files changed, 364 insertions(+), 325 deletions(-) diff --git a/scripts/eastern_kingdoms/sunwell_plateau/boss_kalecgos.cpp b/scripts/eastern_kingdoms/sunwell_plateau/boss_kalecgos.cpp index 9636c715a..bd10e51d6 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/boss_kalecgos.cpp +++ b/scripts/eastern_kingdoms/sunwell_plateau/boss_kalecgos.cpp @@ -126,7 +126,7 @@ struct MANGOS_DLL_DECL boss_kalecgosAI : public ScriptedAI if (m_pInstance) { // Reset Sathrovarr too - if (Creature* pSath = m_pInstance->instance->GetCreature(m_pInstance->GetData64(DATA_SATHROVARR))) + if (Creature* pSath = m_pInstance->instance->GetCreature(m_pInstance->GetData64(NPC_SATHROVARR))) { if (pSath->isAlive() && pSath->getVictim()) pSath->AI()->EnterEvadeMode(); @@ -209,7 +209,7 @@ struct MANGOS_DLL_DECL boss_kalecgosAI : public ScriptedAI if (!m_pInstance) return; - if (Creature* pSathrovarr = m_pInstance->instance->GetCreature(m_pInstance->GetData64(DATA_SATHROVARR))) + if (Creature* pSathrovarr = m_pInstance->instance->GetCreature(m_pInstance->GetData64(NPC_SATHROVARR))) { if (pSathrovarr->isAlive()) { @@ -218,7 +218,7 @@ struct MANGOS_DLL_DECL boss_kalecgosAI : public ScriptedAI } } - if (Creature* pKalec = m_pInstance->instance->GetCreature(m_pInstance->GetData64(DATA_KALECGOS_HUMAN))) + if (Creature* pKalec = m_pInstance->instance->GetCreature(m_pInstance->GetData64(NPC_KALECGOS_HUMAN))) { pKalec->DeleteThreatList(); pKalec->SetVisibility(VISIBILITY_OFF); @@ -252,7 +252,7 @@ struct MANGOS_DLL_DECL boss_kalecgosAI : public ScriptedAI if (!m_bEnraged && m_creature->GetHealthPercent() < 10.0f) { - if (Creature* pSathrovarr = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(DATA_SATHROVARR))) + if (Creature* pSathrovarr = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(NPC_SATHROVARR))) { if (pSathrovarr->isAlive()) pSathrovarr->CastSpell(pSathrovarr, SPELL_CRAZED_RAGE, true); @@ -378,7 +378,7 @@ struct MANGOS_DLL_DECL boss_sathrovarrAI : public ScriptedAI if (!m_pInstance) return; - if (Creature* pKalec = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(DATA_KALECGOS_HUMAN))) + if (Creature* pKalec = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(NPC_KALECGOS_HUMAN))) { m_creature->AddThreat(pKalec, 10000000.0f); pKalec->AddThreat(m_creature, 10000000.0f); @@ -400,7 +400,7 @@ struct MANGOS_DLL_DECL boss_sathrovarrAI : public ScriptedAI m_pInstance->SetData(DATA_SET_SPECTRAL_CHECK, 5000); - if (Creature* pKalecgos = m_pInstance->instance->GetCreature(m_pInstance->GetData64(DATA_KALECGOS_DRAGON))) + if (Creature* pKalecgos = m_pInstance->instance->GetCreature(m_pInstance->GetData64(NPC_KALECGOS_DRAGON))) { if (boss_kalecgosAI* pKalecgosAI = dynamic_cast(pKalecgos->AI())) { @@ -423,7 +423,7 @@ struct MANGOS_DLL_DECL boss_sathrovarrAI : public ScriptedAI if (!m_bEnraged && m_creature->GetHealthPercent() < 10.0f) { - if (Creature* pKalecgos = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(DATA_KALECGOS_DRAGON))) + if (Creature* pKalecgos = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(NPC_KALECGOS_DRAGON))) { if (pKalecgos->isAlive()) pKalecgos->CastSpell(pKalecgos, SPELL_CRAZED_RAGE, true); diff --git a/scripts/eastern_kingdoms/sunwell_plateau/instance_sunwell_plateau.cpp b/scripts/eastern_kingdoms/sunwell_plateau/instance_sunwell_plateau.cpp index d63a77fca..04174a6c0 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/instance_sunwell_plateau.cpp +++ b/scripts/eastern_kingdoms/sunwell_plateau/instance_sunwell_plateau.cpp @@ -1,6 +1,18 @@ /* Copyright (C) 2006 - 2011 ScriptDev2 - * This program is free software licensed under GPL version 2 - * Please see the included DOCS/LICENSE.TXT for more information */ + * 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: Instance_Sunwell_Plateau @@ -21,346 +33,308 @@ EndScriptData */ 5 - Kil'Jaeden */ -struct MANGOS_DLL_DECL instance_sunwell_plateau : public ScriptedInstance -{ - instance_sunwell_plateau(Map* pMap) : ScriptedInstance(pMap) {Initialize();}; - - uint32 m_auiEncounter[MAX_ENCOUNTER]; - std::string strInstData; - +instance_sunwell_plateau::instance_sunwell_plateau(Map* pMap) : ScriptedInstance(pMap), // Creatures - uint64 m_uiKalecgos_DragonGUID; - uint64 m_uiKalecgos_HumanGUID; - uint64 m_uiSathrovarrGUID; - uint64 m_uiBrutallusGUID; - uint64 m_uiFelmystGUID; - uint64 m_uiAlythessGUID; - uint64 m_uiSacrolashGUID; - uint64 m_uiMuruGUID; - uint64 m_uiKilJaedenGUID; - uint64 m_uiKilJaedenControllerGUID; - uint64 m_uiAnveenaGUID; - uint64 m_uiKalecgosGUID; - + m_uiKalecgos_DragonGUID(0), + m_uiKalecgos_HumanGUID(0), + m_uiSathrovarrGUID(0), + m_uiBrutallusGUID(0), + m_uiFelmystGUID(0), + m_uiAlythessGUID(0), + m_uiSacrolashGUID(0), + m_uiMuruGUID(0), + m_uiKilJaedenGUID(0), + m_uiKilJaedenControllerGUID(0), + m_uiAnveenaGUID(0), + m_uiKalecgosGUID(0), // GameObjects - uint64 m_uiForceFieldGUID; // Kalecgos Encounter - uint64 m_uiBossCollision1GUID; - uint64 m_uiBossCollision2GUID; - uint64 m_uiIceBarrierGUID; // Brutallus Encounter - uint64 m_uiDoorFireBarrierGUID; - uint64 m_uiDoorTheFirstGateGUID; // Felmyst Encounter - uint64 m_uiDoorTheSecondGateGUID; // Alythess Encounter - uint64 m_uiDoorRaid_Gate_07GUID; // Sacrolash Encounter - uint64 m_uiDoorRaid_Gate_08GUID; // Muru Encounter - uint64 m_uiDoorTheThirdGateGUID; // Entropius Encounter - + m_uiForceFieldGUID(0), + m_uiBossCollision1GUID(0), + m_uiBossCollision2GUID(0), + m_uiIceBarrierGUID(0), + m_uiDoorFireBarrierGUID(0), + m_uiDoorTheFirstGateGUID(0), + m_uiDoorTheSecondGateGUID(0), + m_uiDoorMuruEnterGateGUID(0), + m_uiDoorMuruExitGateGUID(0), + m_uiDoorTheThirdGateGUID(0), // Misc - uint32 m_uiSpectralRealmTimer; - std::list SpectralRealmList; + m_uiSpectralRealmTimer(5000) +{ + Initialize(); +} - void Initialize() - { - memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); - - // Creatures - m_uiKalecgos_DragonGUID = 0; - m_uiKalecgos_HumanGUID = 0; - m_uiSathrovarrGUID = 0; - m_uiBrutallusGUID = 0; - m_uiFelmystGUID = 0; - m_uiAlythessGUID = 0; - m_uiSacrolashGUID = 0; - m_uiMuruGUID = 0; - m_uiKilJaedenGUID = 0; - m_uiKilJaedenControllerGUID = 0; - m_uiAnveenaGUID = 0; - m_uiKalecgosGUID = 0; - - // GameObjects - m_uiForceFieldGUID = 0; - m_uiBossCollision1GUID = 0; - m_uiBossCollision2GUID = 0; - m_uiIceBarrierGUID = 0; - m_uiDoorFireBarrierGUID = 0; - m_uiDoorTheFirstGateGUID = 0; - m_uiDoorTheSecondGateGUID = 0; - m_uiDoorRaid_Gate_07GUID = 0; - m_uiDoorRaid_Gate_08GUID = 0; - m_uiDoorTheThirdGateGUID = 0; - - // Misc - m_uiSpectralRealmTimer = 5000; - } +void instance_sunwell_plateau::Initialize() +{ + memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); +} - bool IsEncounterInProgress() const +bool instance_sunwell_plateau::IsEncounterInProgress() const +{ + for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) { - for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) - if (m_auiEncounter[i] == IN_PROGRESS) - return true; - - return false; + if (m_auiEncounter[i] == IN_PROGRESS) + return true; } - void OnCreatureCreate(Creature* pCreature) - { - switch(pCreature->GetEntry()) - { - case 24850: m_uiKalecgos_DragonGUID = pCreature->GetGUID(); break; - case 24891: m_uiKalecgos_HumanGUID = pCreature->GetGUID(); break; - case 24892: m_uiSathrovarrGUID = pCreature->GetGUID(); break; - case 24882: m_uiBrutallusGUID = pCreature->GetGUID(); break; - case 25038: m_uiFelmystGUID = pCreature->GetGUID(); break; - case 25166: m_uiAlythessGUID = pCreature->GetGUID(); break; - case 25165: m_uiSacrolashGUID = pCreature->GetGUID(); break; - case 25741: m_uiMuruGUID = pCreature->GetGUID(); break; - case 25315: m_uiKilJaedenGUID = pCreature->GetGUID(); break; - case 25608: m_uiKilJaedenControllerGUID = pCreature->GetGUID(); break; - case 26046: m_uiAnveenaGUID = pCreature->GetGUID(); break; - case 25319: m_uiKalecgosGUID = pCreature->GetGUID(); break; - } - } + return false; +} - void OnObjectCreate(GameObject* pGo) +void instance_sunwell_plateau::OnCreatureCreate(Creature* pCreature) +{ + switch(pCreature->GetEntry()) { - switch(pGo->GetEntry()) - { - case 188421: - m_uiForceFieldGUID = pGo->GetGUID(); - break; - case 188523: - m_uiBossCollision1GUID = pGo->GetGUID(); - break; - case 188524: - m_uiBossCollision2GUID = pGo->GetGUID(); - break; - case 188119: - m_uiIceBarrierGUID = pGo->GetGUID(); - break; - case 188075: - m_uiDoorFireBarrierGUID = pGo->GetGUID(); - if (m_auiEncounter[0] == DONE && m_auiEncounter[1] == DONE && m_auiEncounter[2] == DONE) - pGo->SetGoState(GO_STATE_ACTIVE); - break; - case 187766: - m_uiDoorTheFirstGateGUID = pGo->GetGUID(); - break; - case 187764: - m_uiDoorTheSecondGateGUID = pGo->GetGUID(); - if (m_auiEncounter[3] == DONE) - pGo->SetGoState(GO_STATE_ACTIVE); - break; - case 187990: - m_uiDoorRaid_Gate_07GUID = pGo->GetGUID(); - if (m_auiEncounter[3] == DONE) - pGo->SetGoState(GO_STATE_ACTIVE); - break; - case 188118: - m_uiDoorRaid_Gate_08GUID = pGo->GetGUID(); - if (m_auiEncounter[4] == DONE) - pGo->SetGoState(GO_STATE_ACTIVE); - break; - case 187765: - m_uiDoorTheThirdGateGUID = pGo->GetGUID(); - if (m_auiEncounter[4] == DONE) - pGo->SetGoState(GO_STATE_ACTIVE); - break; - } + case NPC_KALECGOS_DRAGON: m_uiKalecgos_DragonGUID = pCreature->GetGUID(); break; + case NPC_KALECGOS_HUMAN: m_uiKalecgos_HumanGUID = pCreature->GetGUID(); break; + case NPC_SATHROVARR: m_uiSathrovarrGUID = pCreature->GetGUID(); break; + case NPC_BRUTALLUS: m_uiBrutallusGUID = pCreature->GetGUID(); break; + case NPC_FELMYST: m_uiFelmystGUID = pCreature->GetGUID(); break; + case NPC_ALYTHESS: m_uiAlythessGUID = pCreature->GetGUID(); break; + case NPC_SACROLASH: m_uiSacrolashGUID = pCreature->GetGUID(); break; + case NPC_MURU: m_uiMuruGUID = pCreature->GetGUID(); break; + case NPC_KILJAEDEN: m_uiKilJaedenGUID = pCreature->GetGUID(); break; + case NPC_KILJAEDEN_CONTROLLER: m_uiKilJaedenControllerGUID = pCreature->GetGUID(); break; + case NPC_ANVEENA: m_uiAnveenaGUID = pCreature->GetGUID(); break; + case NPC_KALECGOS: m_uiKalecgosGUID = pCreature->GetGUID(); break; } +} - uint32 GetData(uint32 uiType) +void instance_sunwell_plateau::OnObjectCreate(GameObject* pGo) +{ + switch(pGo->GetEntry()) { - switch(uiType) - { - case TYPE_KALECGOS: return m_auiEncounter[0]; - case TYPE_BRUTALLUS: return m_auiEncounter[1]; - case TYPE_FELMYST: return m_auiEncounter[2]; - case TYPE_EREDAR_TWINS: return m_auiEncounter[3]; - case TYPE_MURU: return m_auiEncounter[4]; - case TYPE_KILJAEDEN: return m_auiEncounter[5]; - } - - return 0; + case GO_FORCEFIELD: + m_uiForceFieldGUID = pGo->GetGUID(); + break; + case GO_BOSS_COLLISION_1: + m_uiBossCollision1GUID = pGo->GetGUID(); + break; + case GO_BOSS_COLLISION_2: + m_uiBossCollision2GUID = pGo->GetGUID(); + break; + case GO_ICE_BARRIER: + m_uiIceBarrierGUID = pGo->GetGUID(); + break; + case GO_FIRE_BARRIER: + m_uiDoorFireBarrierGUID = pGo->GetGUID(); + if (m_auiEncounter[TYPE_KALECGOS] == DONE && m_auiEncounter[TYPE_BRUTALLUS] == DONE && m_auiEncounter[TYPE_FELMYST] == DONE) + pGo->SetGoState(GO_STATE_ACTIVE); + break; + case GO_FIRST_GATE: + m_uiDoorTheFirstGateGUID = pGo->GetGUID(); + break; + case GO_SECOND_GATE: + m_uiDoorTheSecondGateGUID = pGo->GetGUID(); + if (m_auiEncounter[TYPE_EREDAR_TWINS] == DONE) + pGo->SetGoState(GO_STATE_ACTIVE); + break; + case GO_MURU_ENTER_GATE: + m_uiDoorMuruEnterGateGUID = pGo->GetGUID(); + if (m_auiEncounter[TYPE_EREDAR_TWINS] == DONE) + pGo->SetGoState(GO_STATE_ACTIVE); + break; + case GO_MURU_EXIT_GATE: + m_uiDoorMuruExitGateGUID = pGo->GetGUID(); + if (m_auiEncounter[TYPE_MURU] == DONE) + pGo->SetGoState(GO_STATE_ACTIVE); + break; + case GO_THIRD_GATE: + m_uiDoorTheThirdGateGUID = pGo->GetGUID(); + if (m_auiEncounter[TYPE_MURU] == DONE) + pGo->SetGoState(GO_STATE_ACTIVE); + break; } +} - uint64 GetData64(uint32 id) +void instance_sunwell_plateau::SetData(uint32 uiType, uint32 uiData) +{ + switch(uiType) { - switch(id) - { - case DATA_KALECGOS_DRAGON: return m_uiKalecgos_DragonGUID; - case DATA_KALECGOS_HUMAN: return m_uiKalecgos_HumanGUID; - case DATA_SATHROVARR: return m_uiSathrovarrGUID; - case DATA_BRUTALLUS: return m_uiBrutallusGUID; - case DATA_FELMYST: return m_uiFelmystGUID; - case DATA_ALYTHESS: return m_uiAlythessGUID; - case DATA_SACROLASH: return m_uiSacrolashGUID; - case DATA_MURU: return m_uiMuruGUID; - case DATA_KILJAEDEN: return m_uiKilJaedenGUID; - case DATA_KILJAEDEN_CONTROLLER: return m_uiKilJaedenControllerGUID; - case DATA_ANVEENA: return m_uiAnveenaGUID; - case DATA_KALECGOS: return m_uiKalecgosGUID; - case DATA_GO_FORCEFIELD: return m_uiForceFieldGUID; - } - return 0; + case TYPE_KALECGOS: + m_auiEncounter[uiType] = uiData; + // combat doors + DoUseDoorOrButton(m_uiForceFieldGUID); + DoUseDoorOrButton(m_uiBossCollision1GUID); + DoUseDoorOrButton(m_uiBossCollision2GUID); + if (uiData == IN_PROGRESS) + SpectralRealmList.clear(); + break; + case TYPE_BRUTALLUS: + m_auiEncounter[uiType] = uiData; + if (uiData == SPECIAL) + DoUseDoorOrButton(m_uiIceBarrierGUID,MINUTE); + break; + case TYPE_FELMYST: + m_auiEncounter[uiType] = uiData; + if (uiData == DONE) + DoUseDoorOrButton(m_uiDoorFireBarrierGUID); + break; + case TYPE_EREDAR_TWINS: + m_auiEncounter[uiType] = uiData; + if (uiData == DONE) + { + DoUseDoorOrButton(m_uiDoorTheSecondGateGUID); + DoUseDoorOrButton(m_uiDoorMuruEnterGateGUID); + } + break; + case TYPE_MURU: + m_auiEncounter[uiType] = uiData; + // combat door + DoUseDoorOrButton(m_uiDoorMuruEnterGateGUID); + if (uiData == DONE) + { + DoUseDoorOrButton(m_uiDoorMuruExitGateGUID); + DoUseDoorOrButton(m_uiDoorTheThirdGateGUID); + } + break; + case TYPE_KILJAEDEN: + m_auiEncounter[uiType] = uiData; + break; + case DATA_SET_SPECTRAL_CHECK: + m_uiSpectralRealmTimer = uiData; + break; } - void SetData(uint32 uiType, uint32 uiData) + if (uiData == DONE) { - switch(uiType) - { - case TYPE_KALECGOS: - if (uiData == IN_PROGRESS) - SpectralRealmList.clear(); - - DoUseDoorOrButton(m_uiForceFieldGUID); - DoUseDoorOrButton(m_uiBossCollision1GUID); - DoUseDoorOrButton(m_uiBossCollision2GUID); - - m_auiEncounter[0] = uiData; - break; - case TYPE_BRUTALLUS: - if (uiData == SPECIAL) - DoUseDoorOrButton(m_uiIceBarrierGUID,MINUTE); - - m_auiEncounter[1] = uiData; - break; - case TYPE_FELMYST: - m_auiEncounter[2] = uiData; - if (uiData == DONE) - DoUseDoorOrButton(m_uiDoorFireBarrierGUID); - break; - case TYPE_EREDAR_TWINS: - m_auiEncounter[3] = uiData; - if (uiData == DONE) - { - DoUseDoorOrButton(m_uiDoorTheSecondGateGUID); - DoUseDoorOrButton(m_uiDoorRaid_Gate_07GUID); - } - break; - case TYPE_MURU: - m_auiEncounter[4] = uiData; - if (uiData == DONE) - DoUseDoorOrButton(m_uiDoorRaid_Gate_08GUID); - break; - case TYPE_KILJAEDEN: m_auiEncounter[5] = uiData; break; - case DATA_SET_SPECTRAL_CHECK: m_uiSpectralRealmTimer = uiData; break; - } - - if (uiData == DONE) - { - OUT_SAVE_INST_DATA; + OUT_SAVE_INST_DATA; - std::ostringstream saveStream; - saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2] << " " - << m_auiEncounter[3] << " " << m_auiEncounter[4] << " " << m_auiEncounter[5]; + std::ostringstream saveStream; + saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2] << " " + << m_auiEncounter[3] << " " << m_auiEncounter[4] << " " << m_auiEncounter[5]; - strInstData = saveStream.str(); + strInstData = saveStream.str(); - SaveToDB(); - OUT_SAVE_INST_DATA_COMPLETE; - } + SaveToDB(); + OUT_SAVE_INST_DATA_COMPLETE; } +} + +void instance_sunwell_plateau::SetData64(uint32 uiType, uint64 uiData) +{ + if (uiType == DATA_PLAYER_SPECTRAL_REALM) + SpectralRealmList.push_back(uiData); +} + +uint32 instance_sunwell_plateau::GetData(uint32 uiType) +{ + if (uiType < MAX_ENCOUNTER) + return m_auiEncounter[uiType]; - const char* Save() + return 0; +} + +uint64 instance_sunwell_plateau::GetData64(uint32 uiType) +{ + switch(uiType) { - return strInstData.c_str(); + case NPC_KALECGOS_DRAGON: return m_uiKalecgos_DragonGUID; + case NPC_KALECGOS_HUMAN: return m_uiKalecgos_HumanGUID; + case NPC_SATHROVARR: return m_uiSathrovarrGUID; + case NPC_BRUTALLUS: return m_uiBrutallusGUID; + case NPC_FELMYST: return m_uiFelmystGUID; + case NPC_ALYTHESS: return m_uiAlythessGUID; + case NPC_SACROLASH: return m_uiSacrolashGUID; + case NPC_MURU: return m_uiMuruGUID; + case NPC_KILJAEDEN: return m_uiKilJaedenGUID; + case NPC_KILJAEDEN_CONTROLLER: return m_uiKilJaedenControllerGUID; + case NPC_ANVEENA: return m_uiAnveenaGUID; + case NPC_KALECGOS: return m_uiKalecgosGUID; + case GO_FORCEFIELD: return m_uiForceFieldGUID; } - void SetData64(uint32 uiData, uint64 uiGuid) + return 0; +} + +void instance_sunwell_plateau::EjectPlayer(Player* pPlayer) +{ + debug_log("SD2: Ejecting Player %s from Spectral Realm", pPlayer->GetName()); + + // Put player back in Kalecgos(Dragon)'s threat list + /*if (Creature* pKalecgos = instance->GetCreature(m_uiKalecgos_DragonGUID)) { - if (uiData == DATA_PLAYER_SPECTRAL_REALM) - SpectralRealmList.push_back(uiGuid); + if (pKalecgos->isAlive()) + { + debug_log("SD2: Adding %s in Kalecgos' threatlist", pPlayer->GetName()); + pKalecgos->AddThreat(pPlayer); + } } - void EjectPlayer(Player* pPlayer) + // Remove player from Sathrovarr's threat list + if (Creature* pSath = instance->GetCreature(m_uiSathrovarrGUID)) { - debug_log("SD2: Ejecting Player %s from Spectral Realm", pPlayer->GetName()); - - // Put player back in Kalecgos(Dragon)'s threat list - /*if (Creature* pKalecgos = instance->GetCreature(m_uiKalecgos_DragonGUID)) + if (pSath->isAlive()) { - if (pKalecgos->isAlive()) + if (HostileReference* pRef = pSath->getThreatManager().getOnlineContainer().getReferenceByTarget(pPlayer)) { - debug_log("SD2: Adding %s in Kalecgos' threatlist", pPlayer->GetName()); - pKalecgos->AddThreat(pPlayer); + pRef->removeReference(); + debug_log("SD2: Deleting %s from Sathrovarr's threatlist", pPlayer->GetName()); } } + }*/ - // Remove player from Sathrovarr's threat list - if (Creature* pSath = instance->GetCreature(m_uiSathrovarrGUID)) - { - if (pSath->isAlive()) - { - if (HostileReference* pRef = pSath->getThreatManager().getOnlineContainer().getReferenceByTarget(pPlayer)) - { - pRef->removeReference(); - debug_log("SD2: Deleting %s from Sathrovarr's threatlist", pPlayer->GetName()); - } - } - }*/ + pPlayer->CastSpell(pPlayer, SPELL_SPECTRAL_EXHAUSTION, true); + pPlayer->CastSpell(pPlayer, SPELL_TELEPORT_NORMAL_REALM, true); +} - pPlayer->CastSpell(pPlayer, SPELL_TELEPORT_NORMAL_REALM, true); - pPlayer->CastSpell(pPlayer, SPELL_SPECTRAL_EXHAUSTION, true); - } +void instance_sunwell_plateau::EjectPlayers() +{ + if (SpectralRealmList.empty()) + return; - void EjectPlayers() - { - if (SpectralRealmList.empty()) - return; + Map::PlayerList const& players = instance->GetPlayers(); - Map::PlayerList const& players = instance->GetPlayers(); + for(Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr) + { + Player* plr = itr->getSource(); - for(Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr) + if (plr && !plr->HasAura(SPELL_SPECTRAL_REALM)) { - Player* plr = itr->getSource(); - - if (plr && !plr->HasAura(SPELL_SPECTRAL_REALM)) - { - SpectralRealmList.remove(plr->GetGUID()); - EjectPlayer(plr); - } + SpectralRealmList.remove(plr->GetGUID()); + EjectPlayer(plr); } - - //SpectralRealmList.clear(); } - void Update(uint32 uiDiff) + //SpectralRealmList.clear(); +} + +void instance_sunwell_plateau::Update(uint32 uiDiff) +{ + // Only check for Spectral Realm if Kalecgos Encounter is running + if (m_auiEncounter[TYPE_KALECGOS] == IN_PROGRESS) { - // Only check for Spectral Realm if Kalecgos Encounter is running - if (m_auiEncounter[0] == IN_PROGRESS) + if (m_uiSpectralRealmTimer <= uiDiff) { - if (m_uiSpectralRealmTimer <= uiDiff) - { - EjectPlayers(); - m_uiSpectralRealmTimer = 1000; - } - else - m_uiSpectralRealmTimer -= uiDiff; + EjectPlayers(); + m_uiSpectralRealmTimer = 1000; } + else + m_uiSpectralRealmTimer -= uiDiff; } +} - void Load(const char* in) +void instance_sunwell_plateau::Load(const char* in) +{ + if (!in) { - if (!in) - { - OUT_LOAD_INST_DATA_FAIL; - return; - } - - OUT_LOAD_INST_DATA(in); + OUT_LOAD_INST_DATA_FAIL; + return; + } - std::istringstream loadStream(in); - loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> - m_auiEncounter[3] >> m_auiEncounter[4] >> m_auiEncounter[5]; + OUT_LOAD_INST_DATA(in); - for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) - { - if (m_auiEncounter[i] == IN_PROGRESS) - m_auiEncounter[i] = NOT_STARTED; - } + std::istringstream loadStream(in); + loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> + m_auiEncounter[3] >> m_auiEncounter[4] >> m_auiEncounter[5]; - OUT_LOAD_INST_DATA_COMPLETE; + for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) + { + if (m_auiEncounter[i] == IN_PROGRESS) + m_auiEncounter[i] = NOT_STARTED; } -}; + + OUT_LOAD_INST_DATA_COMPLETE; +} InstanceData* GetInstanceData_instance_sunwell_plateau(Map* pMap) { @@ -369,9 +343,10 @@ InstanceData* GetInstanceData_instance_sunwell_plateau(Map* pMap) void AddSC_instance_sunwell_plateau() { - Script *newscript; - newscript = new Script; - newscript->Name = "instance_sunwell_plateau"; - newscript->GetInstanceData = &GetInstanceData_instance_sunwell_plateau; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "instance_sunwell_plateau"; + pNewScript->GetInstanceData = &GetInstanceData_instance_sunwell_plateau; + pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/sunwell_plateau/sunwell_plateau.h b/scripts/eastern_kingdoms/sunwell_plateau/sunwell_plateau.h index fa6aaeaa4..5b69afa96 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/sunwell_plateau.h +++ b/scripts/eastern_kingdoms/sunwell_plateau/sunwell_plateau.h @@ -5,7 +5,7 @@ #ifndef DEF_SUNWELLPLATEAU_H #define DEF_SUNWELLPLATEAU_H -enum InstanceSWP +enum { MAX_ENCOUNTER = 6, @@ -16,34 +16,98 @@ enum InstanceSWP TYPE_MURU = 4, TYPE_KILJAEDEN = 5, - DATA_KALECGOS_DRAGON = 6, - DATA_KALECGOS_HUMAN = 7, - DATA_SATHROVARR = 8, - DATA_BRUTALLUS = 9, - DATA_FELMYST = 10, - DATA_ALYTHESS = 11, - DATA_SACROLASH = 12, - DATA_MURU = 13, - DATA_KILJAEDEN = 14, - DATA_KILJAEDEN_CONTROLLER = 15, - DATA_ANVEENA = 16, - DATA_KALECGOS = 17, - - DATA_GO_FORCEFIELD = 18, - DATA_GO_FIRE_BARRIER = 19, - DATA_GO_FIRST_GATE = 20, - DATA_GO_SECOND_GATE = 21, - DATA_GO_RAID_GATE_07 = 22, - DATA_GO_RAID_GATE_08 = 23, - DATA_GO_THIRD_GATE = 24, - - DATA_PLAYER_SPECTRAL_REALM = 25, - DATA_SET_SPECTRAL_CHECK = 26, + DATA_PLAYER_SPECTRAL_REALM = 6, + DATA_SET_SPECTRAL_CHECK = 7, + NPC_KALECGOS_DRAGON = 24850, // kalecgos blue dragon hostile + NPC_KALECGOS_HUMAN = 24891, // kalecgos human form in spectral realm + NPC_SATHROVARR = 24892, + NPC_BRUTALLUS = 24882, + NPC_FELMYST = 25038, + NPC_ALYTHESS = 25166, + NPC_SACROLASH = 25165, + NPC_MURU = 25741, + NPC_KILJAEDEN = 25315, + NPC_KILJAEDEN_CONTROLLER = 25608, // kiljaeden event controller + NPC_ANVEENA = 26046, // related to kiljaeden event + NPC_KALECGOS = 25319, // related to kiljaeden event + + GO_FORCEFIELD = 188421, // kalecgos door + collisions + GO_BOSS_COLLISION_1 = 188523, + GO_BOSS_COLLISION_2 = 188524, + GO_ICE_BARRIER = 188119, // use unk; related to brutallus intro + GO_FIRE_BARRIER = 188075, // door after felmyst + GO_FIRST_GATE = 187766, // door between felmyst and eredar twins + GO_SECOND_GATE = 187764, // door after eredar twins + GO_MURU_ENTER_GATE = 187990, // muru gates + GO_MURU_EXIT_GATE = 188118, + GO_THIRD_GATE = 187765, // door after muru; why another? + + // spells related to kalecgos event SPELL_SPECTRAL_REALM = 46021, SPELL_TELEPORT_NORMAL_REALM = 46020, SPELL_TELEPORT_TO_SPECTRAL_REALM = 46019, SPELL_SPECTRAL_EXHAUSTION = 44867, SPELL_SPECTRAL_REALM_FORCE_FACTION = 44852 }; + +class MANGOS_DLL_DECL instance_sunwell_plateau : public ScriptedInstance +{ + public: + instance_sunwell_plateau(Map* pMap); + ~instance_sunwell_plateau() {} + + void Initialize(); + bool IsEncounterInProgress() const; + + void OnObjectCreate(GameObject* pGo); + void OnCreatureCreate(Creature* pCreature); + + void SetData(uint32 uiType, uint32 uiData); + void SetData64(uint32 uiType, uint64 uiData); + uint32 GetData(uint32 uiType); + uint64 GetData64(uint32 uiType); + + void Update(uint32 uiDiff); + + const char* Save() { return strInstData.c_str(); } + void Load(const char* chrIn); + + protected: + void EjectPlayer(Player* pPlayer); + void EjectPlayers(); + + uint32 m_auiEncounter[MAX_ENCOUNTER]; + std::string strInstData; + + // Creatures + uint64 m_uiKalecgos_DragonGUID; + uint64 m_uiKalecgos_HumanGUID; + uint64 m_uiSathrovarrGUID; + uint64 m_uiBrutallusGUID; + uint64 m_uiFelmystGUID; + uint64 m_uiAlythessGUID; + uint64 m_uiSacrolashGUID; + uint64 m_uiMuruGUID; + uint64 m_uiKilJaedenGUID; + uint64 m_uiKilJaedenControllerGUID; + uint64 m_uiAnveenaGUID; + uint64 m_uiKalecgosGUID; + + // GameObjects + uint64 m_uiForceFieldGUID; + uint64 m_uiBossCollision1GUID; + uint64 m_uiBossCollision2GUID; + uint64 m_uiIceBarrierGUID; + uint64 m_uiDoorFireBarrierGUID; + uint64 m_uiDoorTheFirstGateGUID; + uint64 m_uiDoorTheSecondGateGUID; + uint64 m_uiDoorMuruEnterGateGUID; + uint64 m_uiDoorMuruExitGateGUID; + uint64 m_uiDoorTheThirdGateGUID; + + // Misc + uint32 m_uiSpectralRealmTimer; + std::list SpectralRealmList; +}; #endif diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 6915e144f..847cdb961 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2061" + #define SD2_REVISION_NR "2062" #endif // __SD2_REVISION_NR_H__ From 816c953b99d4a6b4b893b62e58aebe639165cd32 Mon Sep 17 00:00:00 2001 From: NoFantasy Date: Mon, 2 May 2011 16:36:38 +0200 Subject: [PATCH 0042/1172] [2063] Convert a few to GetObjectGuid in KilledMonsterCredit functions. Signed-off-by: NoFantasy --- .../eastern_kingdoms/stratholme/boss_order_of_silver_hand.cpp | 2 +- scripts/kalimdor/bloodmyst_isle.cpp | 2 +- .../kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.cpp | 2 +- scripts/kalimdor/dustwallow_marsh.cpp | 2 +- scripts/kalimdor/silithus.cpp | 4 ++-- scripts/outland/blades_edge_mountains.cpp | 2 +- scripts/outland/nagrand.cpp | 2 +- scripts/outland/netherstorm.cpp | 2 +- scripts/outland/shadowmoon_valley.cpp | 2 +- scripts/outland/terokkar_forest.cpp | 4 ++-- scripts/world/spell_scripts.cpp | 2 +- sd2_revision_nr.h | 2 +- 12 files changed, 14 insertions(+), 14 deletions(-) diff --git a/scripts/eastern_kingdoms/stratholme/boss_order_of_silver_hand.cpp b/scripts/eastern_kingdoms/stratholme/boss_order_of_silver_hand.cpp index 07b0f1264..e7a59e355 100644 --- a/scripts/eastern_kingdoms/stratholme/boss_order_of_silver_hand.cpp +++ b/scripts/eastern_kingdoms/stratholme/boss_order_of_silver_hand.cpp @@ -105,7 +105,7 @@ struct MANGOS_DLL_DECL boss_silver_hand_bossesAI : public ScriptedAI break; } if (m_pInstance->GetData(TYPE_SH_QUEST) && Killer->GetTypeId() == TYPEID_PLAYER) - ((Player*)Killer)->KilledMonsterCredit(SH_QUEST_CREDIT,m_creature->GetGUID()); + ((Player*)Killer)->KilledMonsterCredit(SH_QUEST_CREDIT, m_creature->GetObjectGuid()); } } diff --git a/scripts/kalimdor/bloodmyst_isle.cpp b/scripts/kalimdor/bloodmyst_isle.cpp index 035869da2..891528a70 100644 --- a/scripts/kalimdor/bloodmyst_isle.cpp +++ b/scripts/kalimdor/bloodmyst_isle.cpp @@ -52,7 +52,7 @@ struct MANGOS_DLL_DECL mob_webbed_creatureAI : public ScriptedAI case 0: spawnCreatureID = 17681; if (Killer->GetTypeId() == TYPEID_PLAYER) - ((Player*)Killer)->KilledMonsterCredit(spawnCreatureID, m_creature->GetGUID()); + ((Player*)Killer)->KilledMonsterCredit(spawnCreatureID, m_creature->GetObjectGuid()); break; case 1: case 2: diff --git a/scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.cpp b/scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.cpp index 7879dfb3d..808d8f4ee 100644 --- a/scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.cpp +++ b/scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.cpp @@ -450,7 +450,7 @@ struct MANGOS_DLL_DECL npc_thrall_old_hillsbradAI : public npc_escortAI for(Map::PlayerList::const_iterator itr = lPlayerList.begin(); itr != lPlayerList.end(); ++itr) { if (Player* pPlayer = itr->getSource()) - pPlayer->KilledMonsterCredit(NPC_THRALL_QUEST_TRIGGER, m_creature->GetGUID()); + pPlayer->KilledMonsterCredit(NPC_THRALL_QUEST_TRIGGER, m_creature->GetObjectGuid()); } } diff --git a/scripts/kalimdor/dustwallow_marsh.cpp b/scripts/kalimdor/dustwallow_marsh.cpp index 43f9082a7..c44f6c609 100644 --- a/scripts/kalimdor/dustwallow_marsh.cpp +++ b/scripts/kalimdor/dustwallow_marsh.cpp @@ -71,7 +71,7 @@ struct MANGOS_DLL_DECL mobs_risen_husk_spiritAI : public ScriptedAI void JustSummoned(Creature* pSummoned) { if (m_pCreditPlayer) - m_pCreditPlayer->KilledMonsterCredit(pSummoned->GetEntry(), pSummoned->GetGUID()); + m_pCreditPlayer->KilledMonsterCredit(pSummoned->GetEntry(), pSummoned->GetObjectGuid()); } void DamageTaken(Unit* pDoneBy, uint32 &uiDamage) diff --git a/scripts/kalimdor/silithus.cpp b/scripts/kalimdor/silithus.cpp index 0ae0d4b97..906fab9e1 100644 --- a/scripts/kalimdor/silithus.cpp +++ b/scripts/kalimdor/silithus.cpp @@ -202,7 +202,7 @@ bool GossipSelect_npcs_rutgar_and_frankal(Player* pPlayer, Creature* pCreature, case GOSSIP_ACTION_INFO_DEF + 6: pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_RUTGAR7, pCreature->GetGUID()); //'kill' our trigger to update quest status - pPlayer->KilledMonsterCredit(TRIGGER_RUTGAR, pCreature->GetGUID()); + pPlayer->KilledMonsterCredit(TRIGGER_RUTGAR, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF + 9: @@ -228,7 +228,7 @@ bool GossipSelect_npcs_rutgar_and_frankal(Player* pPlayer, Creature* pCreature, case GOSSIP_ACTION_INFO_DEF + 14: pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_FRANKAL6, pCreature->GetGUID()); //'kill' our trigger to update quest status - pPlayer->KilledMonsterCredit(TRIGGER_FRANKAL, pCreature->GetGUID()); + pPlayer->KilledMonsterCredit(TRIGGER_FRANKAL, pCreature->GetObjectGuid()); break; } return true; diff --git a/scripts/outland/blades_edge_mountains.cpp b/scripts/outland/blades_edge_mountains.cpp index c647f0c2f..38bff665e 100644 --- a/scripts/outland/blades_edge_mountains.cpp +++ b/scripts/outland/blades_edge_mountains.cpp @@ -251,7 +251,7 @@ struct MANGOS_DLL_DECL npc_daranelleAI : public ScriptedAI DoScriptText(SAY_SPELL_INFLUENCE, m_creature, pWho); //TODO: Move the below to updateAI and run if this statement == true - ((Player*)pWho)->KilledMonsterCredit(NPC_KALIRI_AURA_DISPEL, m_creature->GetGUID()); + ((Player*)pWho)->KilledMonsterCredit(NPC_KALIRI_AURA_DISPEL, m_creature->GetObjectGuid()); pWho->RemoveAurasDueToSpell(SPELL_LASHHAN_CHANNEL); } } diff --git a/scripts/outland/nagrand.cpp b/scripts/outland/nagrand.cpp index 04f59fa32..853e8f19b 100644 --- a/scripts/outland/nagrand.cpp +++ b/scripts/outland/nagrand.cpp @@ -618,7 +618,7 @@ struct MANGOS_DLL_DECL npc_creditmarker_visit_with_ancestorsAI : public Scripted { // 18840: Sunspring, 18841: Laughing, 18842: Garadar, 18843: Bleeding if (!((Player*)pWho)->GetReqKillOrCastCurrentCount(QUEST_VISIT_WITH_ANCESTORS, creditMarkerId)) - ((Player*)pWho)->KilledMonsterCredit(creditMarkerId, m_creature->GetGUID()); + ((Player*)pWho)->KilledMonsterCredit(creditMarkerId, m_creature->GetObjectGuid()); } } } diff --git a/scripts/outland/netherstorm.cpp b/scripts/outland/netherstorm.cpp index 475ecb5e4..8b86470a0 100644 --- a/scripts/outland/netherstorm.cpp +++ b/scripts/outland/netherstorm.cpp @@ -277,7 +277,7 @@ struct MANGOS_DLL_DECL npc_manaforge_control_consoleAI : public ScriptedAI break; case 5: DoScriptText(EMOTE_COMPLETE, m_creature, pPlayer); - pPlayer->KilledMonsterCredit(m_creature->GetEntry(), m_creature->GetGUID()); + pPlayer->KilledMonsterCredit(m_creature->GetEntry(), m_creature->GetObjectGuid()); DoCastSpellIfCan(m_creature, SPELL_DISABLE_VISUAL); if (m_uiConsoleGUID) { diff --git a/scripts/outland/shadowmoon_valley.cpp b/scripts/outland/shadowmoon_valley.cpp index 6778aa575..7a8b92240 100644 --- a/scripts/outland/shadowmoon_valley.cpp +++ b/scripts/outland/shadowmoon_valley.cpp @@ -152,7 +152,7 @@ struct MANGOS_DLL_DECL mob_mature_netherwing_drakeAI : public ScriptedAI DoScriptText(SAY_JUST_EATEN, m_creature); if (Player* pPlayer = m_creature->GetMap()->GetPlayer(uiPlayerGUID)) - pPlayer->KilledMonsterCredit(NPC_EVENT_PINGER, m_creature->GetGUID()); + pPlayer->KilledMonsterCredit(NPC_EVENT_PINGER, m_creature->GetObjectGuid()); Reset(); m_creature->GetMotionMaster()->Clear(); diff --git a/scripts/outland/terokkar_forest.cpp b/scripts/outland/terokkar_forest.cpp index 6e33129a8..7e99beb25 100644 --- a/scripts/outland/terokkar_forest.cpp +++ b/scripts/outland/terokkar_forest.cpp @@ -250,7 +250,7 @@ struct MANGOS_DLL_DECL mob_netherweb_victimAI : public ScriptedAI if (!urand(0, 3)) { m_creature->SummonCreature(NPC_FREED_WARRIOR, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 60000); - pPlayer->KilledMonsterCredit(NPC_FREED_WARRIOR, m_creature->GetGUID()); + pPlayer->KilledMonsterCredit(NPC_FREED_WARRIOR, m_creature->GetObjectGuid()); } else m_creature->SummonCreature(netherwebVictims[urand(0, 5)], 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 60000); @@ -954,7 +954,7 @@ bool GOUse_go_veil_skith_cage(Player* pPlayer, GameObject* pGo) GetCreatureListWithEntryInGrid(lChildrenList, pGo, NPC_CAPTIVE_CHILD, INTERACTION_DISTANCE); for(std::list::const_iterator itr = lChildrenList.begin(); itr != lChildrenList.end(); ++itr) { - pPlayer->KilledMonsterCredit(NPC_CAPTIVE_CHILD, (*itr)->GetGUID()); + pPlayer->KilledMonsterCredit(NPC_CAPTIVE_CHILD, (*itr)->GetObjectGuid()); switch(urand(0,3)) { case 0: DoScriptText(SAY_THANKS_1, *itr); break; diff --git a/scripts/world/spell_scripts.cpp b/scripts/world/spell_scripts.cpp index a75f94a54..697bb6cc6 100644 --- a/scripts/world/spell_scripts.cpp +++ b/scripts/world/spell_scripts.cpp @@ -336,7 +336,7 @@ bool EffectAuraDummy_spell_aura_dummy_npc(const Aura* pAura, bool bApply) { if (Player* pPlayer = (Player*)pAura->GetCaster()) { - pPlayer->KilledMonsterCredit(NPC_FALLEN_HERO_SPIRIT_PROXY, pCreature->GetGUID()); + pPlayer->KilledMonsterCredit(NPC_FALLEN_HERO_SPIRIT_PROXY, pCreature->GetObjectGuid()); pCreature->ForcedDespawn(); } } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 847cdb961..49f0cbafe 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2062" + #define SD2_REVISION_NR "2063" #endif // __SD2_REVISION_NR_H__ From e659206ffd4a45b3bd28439d096b13544a5a6b0f Mon Sep 17 00:00:00 2001 From: NoFantasy Date: Mon, 2 May 2011 18:45:57 +0200 Subject: [PATCH 0043/1172] [2064] Add some visual fun, related to quest 11897 Mangos rev 11421 is needed. Signed-off-by: NoFantasy --- scripts/northrend/borean_tundra.cpp | 100 ++++++++++++++++++++++++++++ sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 + sql/scriptdev2_script_full.sql | 2 +- sql/updates/r2064_mangos.sql | 1 + sql/updates/r2064_scriptdev2.sql | 1 + 6 files changed, 105 insertions(+), 2 deletions(-) create mode 100644 sql/updates/r2064_mangos.sql create mode 100644 sql/updates/r2064_scriptdev2.sql diff --git a/scripts/northrend/borean_tundra.cpp b/scripts/northrend/borean_tundra.cpp index 02b0f33cb..a43140028 100644 --- a/scripts/northrend/borean_tundra.cpp +++ b/scripts/northrend/borean_tundra.cpp @@ -27,6 +27,7 @@ npc_iruk npc_kara_thricestar npc_nesingwary_trapper go_caribou_trap +npc_sinkhole_kill_credit npc_surristrasz npc_tiare npc_lurgglbr @@ -436,6 +437,100 @@ bool GOUse_go_caribou_trap(Player* pPlayer, GameObject* pGo) return true; } +/*##### +# npc_sinkhole_kill_credit +#####*/ + +enum +{ + SPELL_SUMMON_EXPLOSIVES_CART_FIRE = 46799, + SPELL_SUMMON_SCOURGE_BURROWER = 46800, + SPELL_COSMETIC_HUGE_EXPLOSION = 46225, + SPELL_CANNON_FIRE = 42445, +}; + +struct MANGOS_DLL_DECL npc_sinkhole_kill_creditAI : public ScriptedAI +{ + npc_sinkhole_kill_creditAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } + + ObjectGuid m_uiCartGUID; + ObjectGuid m_uiWormGUID; + uint32 m_uiCartTimer; + uint32 m_uiCartPhase; + + void Reset() + { + m_uiCartGUID.Clear(); + m_uiWormGUID.Clear(); + m_uiCartTimer = 2000; + m_uiCartPhase = 0; + } + + void JustSummoned(Creature* pSummoned) + { + m_uiWormGUID = pSummoned->GetObjectGuid(); + } + + void JustSummoned(GameObject* pGo) + { + // Go is not really needed, but ok to use as a check point so only one "event" can be processed at a time + if (!m_uiCartGUID.IsEmpty()) + return; + + // Expecting summoned from mangos dummy effect 46797 + m_uiCartGUID = pGo->GetObjectGuid(); + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_uiCartGUID.IsEmpty()) + { + if (m_uiCartTimer <= uiDiff) + { + switch(m_uiCartPhase) + { + case 0: + DoCastSpellIfCan(m_creature, SPELL_SUMMON_EXPLOSIVES_CART_FIRE); + m_uiCartTimer = 4000; + break; + case 1: + // Unclear if these should be in a dummy effect or not. + // The order of spells are correct though. + DoCastSpellIfCan(m_creature, SPELL_COSMETIC_HUGE_EXPLOSION, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_CANNON_FIRE, CAST_TRIGGERED); + break; + case 2: + DoCastSpellIfCan(m_creature, SPELL_SUMMON_SCOURGE_BURROWER); + m_uiCartTimer = 2000; + break; + case 3: + if (Creature* pWorm = m_creature->GetMap()->GetCreature(m_uiWormGUID)) + { + pWorm->SetDeathState(JUST_DIED); + pWorm->SetHealth(0); + } + m_uiCartTimer = 10000; + break; + case 4: + if (Creature* pWorm = m_creature->GetMap()->GetCreature(m_uiWormGUID)) + pWorm->RemoveCorpse(); + + Reset(); + return; + } + + ++m_uiCartPhase; + } + else + m_uiCartTimer -= uiDiff; + } + } +}; + +CreatureAI* GetAI_npc_sinkhole_kill_credit(Creature* pCreature) +{ + return new npc_sinkhole_kill_creditAI(pCreature); +} /*###### ## npc_surristrasz @@ -688,6 +783,11 @@ void AddSC_borean_tundra() pNewScript->pGOUse = &GOUse_go_caribou_trap; pNewScript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "npc_sinkhole_kill_credit"; + pNewScript->GetAI = &GetAI_npc_sinkhole_kill_credit; + pNewScript->RegisterSelf(); + pNewScript = new Script; pNewScript->Name = "npc_surristrasz"; pNewScript->pGossipHello = &GossipHello_npc_surristrasz; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 49f0cbafe..b410b2947 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2063" + #define SD2_REVISION_NR "2064" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index b0f2b6424..6558bc256 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -356,6 +356,7 @@ UPDATE creature_template SET ScriptName='npc_kara_thricestar' WHERE entry=26602; UPDATE creature_template SET ScriptName='npc_nesingwary_trapper' WHERE entry=25835; UPDATE creature_template SET ScriptName='npc_oil_stained_wolf' WHERE entry=25791; UPDATE gameobject_template SET ScriptName='go_caribou_trap' WHERE entry IN (187982,187995,187996,187997,187998,187999,188000,188001,188002,188003,188004,188005,188006,188007,188008); +UPDATE creature_template SET ScriptName='npc_sinkhole_kill_credit' WHERE entry IN (26248,26249); UPDATE creature_template SET ScriptName='npc_surristrasz' WHERE entry=24795; UPDATE creature_template SET ScriptName='npc_tiare' WHERE entry=30051; UPDATE creature_template SET ScriptName='npc_lurgglbr' WHERE entry=25208; diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 31b9f0216..890952299 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -3,7 +3,7 @@ -- DELETE FROM sd2_db_version; -INSERT INTO sd2_db_version (version) VALUES ('ScriptDev2 (for MaNGOS 11316+) '); +INSERT INTO sd2_db_version (version) VALUES ('ScriptDev2 (for MaNGOS 11421+) '); -- -- Below contains data for table `script_texts` mainly used in C++ parts. diff --git a/sql/updates/r2064_mangos.sql b/sql/updates/r2064_mangos.sql new file mode 100644 index 000000000..9d4c04b99 --- /dev/null +++ b/sql/updates/r2064_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_sinkhole_kill_credit' WHERE entry IN (26248,26249); diff --git a/sql/updates/r2064_scriptdev2.sql b/sql/updates/r2064_scriptdev2.sql new file mode 100644 index 000000000..4ba54cb48 --- /dev/null +++ b/sql/updates/r2064_scriptdev2.sql @@ -0,0 +1 @@ +UPDATE sd2_db_version SET version='ScriptDev2 (for MaNGOS 11421+) '; From 21fb1e4b0bfd49774f48c0d602ee5a0b7e2e43f8 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Mon, 2 May 2011 20:27:19 +0200 Subject: [PATCH 0044/1172] [2065] Fix some whitespace coding style --- .../blackwing_lair/instance_blackwing_lair.cpp | 6 +++--- .../molten_core/boss_sulfuron_harbinger.cpp | 2 +- scripts/eastern_kingdoms/stranglethorn_vale.cpp | 2 +- scripts/northrend/naxxramas/boss_kelthuzad.cpp | 2 +- scripts/northrend/ulduar/ulduar/instance_ulduar.cpp | 10 +++++----- scripts/outland/shadowmoon_valley.cpp | 2 +- sd2_revision_nr.h | 2 +- 7 files changed, 13 insertions(+), 13 deletions(-) diff --git a/scripts/eastern_kingdoms/blackwing_lair/instance_blackwing_lair.cpp b/scripts/eastern_kingdoms/blackwing_lair/instance_blackwing_lair.cpp index 3bf2b7d5c..a8b9a3f93 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/instance_blackwing_lair.cpp +++ b/scripts/eastern_kingdoms/blackwing_lair/instance_blackwing_lair.cpp @@ -99,19 +99,19 @@ void instance_blackwing_lair::SetData(uint32 uiType, uint32 uiData) case TYPE_RAZORGORE: m_auiEncounter[uiType] = uiData; DoUseDoorOrButton(m_uiRazorgoreEnterDoorGUID); - if(uiData == DONE) + if (uiData == DONE) DoUseDoorOrButton(m_uiRazorgoreExitDoorGUID); break; case TYPE_VAELASTRASZ: m_auiEncounter[uiType] = uiData; // Prevent the players from running back to the first room DoUseDoorOrButton(m_uiRazorgoreExitDoorGUID); - if(uiData == DONE) + if (uiData == DONE) DoUseDoorOrButton(m_uiVaelastraszDoorGUID); break; case TYPE_LASHLAYER: m_auiEncounter[uiType] = uiData; - if(uiData == DONE) + if (uiData == DONE) DoUseDoorOrButton(m_uiLashlayerDoorGUID); break; case TYPE_FIREMAW: diff --git a/scripts/eastern_kingdoms/molten_core/boss_sulfuron_harbinger.cpp b/scripts/eastern_kingdoms/molten_core/boss_sulfuron_harbinger.cpp index 001d7f498..ebea28060 100644 --- a/scripts/eastern_kingdoms/molten_core/boss_sulfuron_harbinger.cpp +++ b/scripts/eastern_kingdoms/molten_core/boss_sulfuron_harbinger.cpp @@ -65,7 +65,7 @@ struct MANGOS_DLL_DECL boss_sulfuronAI : public ScriptedAI void Aggro(Unit* pWho) { - if(m_pInstance) + if (m_pInstance) m_pInstance->SetData(TYPE_SULFURON, IN_PROGRESS); m_creature->CallForHelp(RANGE_CALL_FOR_HELP); diff --git a/scripts/eastern_kingdoms/stranglethorn_vale.cpp b/scripts/eastern_kingdoms/stranglethorn_vale.cpp index f3fd651e5..88734de68 100644 --- a/scripts/eastern_kingdoms/stranglethorn_vale.cpp +++ b/scripts/eastern_kingdoms/stranglethorn_vale.cpp @@ -81,7 +81,7 @@ struct MANGOS_DLL_DECL mob_yennikuAI : public ScriptedAI else Reset_Timer -= diff; //Return since we have no target - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim() ) + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; DoMeleeAttackIfReady(); diff --git a/scripts/northrend/naxxramas/boss_kelthuzad.cpp b/scripts/northrend/naxxramas/boss_kelthuzad.cpp index 32b3409d4..cb4bdb7ec 100644 --- a/scripts/northrend/naxxramas/boss_kelthuzad.cpp +++ b/scripts/northrend/naxxramas/boss_kelthuzad.cpp @@ -330,7 +330,7 @@ struct MANGOS_DLL_DECL boss_kelthuzadAI : public ScriptedAI { m_lAddsSet.insert(pSummoned->GetGUID()); - if(m_pInstance) + if (m_pInstance) { float fX, fY, fZ; m_pInstance->GetChamberCenterCoords(fX, fY, fZ); diff --git a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp index b2420ca1e..d1581d0b7 100644 --- a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp +++ b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp @@ -190,7 +190,7 @@ void instance_ulduar::OnCreatureCreate(Creature* pCreature) break; case NPC_MIMIRON: m_uiMimironGUID = pCreature->GetGUID(); - if(m_auiEncounter[7] == DONE) + if (m_auiEncounter[7] == DONE) SpawnFriendlyKeeper(NPC_MIMIRON_IMAGE); break; case NPC_LEVIATHAN_MK: @@ -198,12 +198,12 @@ void instance_ulduar::OnCreatureCreate(Creature* pCreature) break; case NPC_HODIR: m_uiHodirGUID = pCreature->GetGUID(); - if(m_auiEncounter[8] == DONE) + if (m_auiEncounter[8] == DONE) SpawnFriendlyKeeper(NPC_HODIR_IMAGE); break; case NPC_THORIM: m_uiThorimGUID = pCreature->GetGUID(); - if(m_auiEncounter[9] == DONE) + if (m_auiEncounter[9] == DONE) SpawnFriendlyKeeper(NPC_THORIM_IMAGE); break; case NPC_RUNIC_COLOSSUS: @@ -217,7 +217,7 @@ void instance_ulduar::OnCreatureCreate(Creature* pCreature) break; case NPC_FREYA: m_uiFreyaGUID = pCreature->GetGUID(); - if(m_auiEncounter[10] == DONE) + if (m_auiEncounter[10] == DONE) SpawnFriendlyKeeper(NPC_FREYA_IMAGE); break; case NPC_ELDER_BRIGHTLEAF: @@ -508,7 +508,7 @@ void instance_ulduar::SetData(uint32 uiType, uint32 uiData) if (uiData == DONE) { DoRespawnGameObject(m_uiKologarnLootGUID, 30*MINUTE); - if(GameObject* pBridge = instance->GetGameObject(m_uiKologarnBridgeGUID)) + if (GameObject* pBridge = instance->GetGameObject(m_uiKologarnBridgeGUID)) pBridge->SetGoState(GO_STATE_READY); } break; diff --git a/scripts/outland/shadowmoon_valley.cpp b/scripts/outland/shadowmoon_valley.cpp index 7a8b92240..4ab733944 100644 --- a/scripts/outland/shadowmoon_valley.cpp +++ b/scripts/outland/shadowmoon_valley.cpp @@ -1529,7 +1529,7 @@ CreatureAI* GetAI_npc_lord_illidan_stormrage(Creature* (pCreature)) ######*/ bool GOQuestAccept_GO_crystal_prison(Player* pPlayer, GameObject* pGo, Quest const* pQuest) { - if (pQuest->GetQuestId() == QUEST_BATTLE_OF_THE_CRIMSON_WATCH ) + if (pQuest->GetQuestId() == QUEST_BATTLE_OF_THE_CRIMSON_WATCH) if (Creature* pLordIllidan = GetClosestCreatureWithEntry(pPlayer, NPC_LORD_ILLIDAN, 50.0)) if (npc_lord_illidan_stormrageAI* pIllidanAI = dynamic_cast(pLordIllidan->AI())) if (!pIllidanAI->m_bEventStarted) diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index b410b2947..63fbcc314 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2064" + #define SD2_REVISION_NR "2065" #endif // __SD2_REVISION_NR_H__ From 192b4475032bd061275fb58e2773d5bc568b67b9 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Mon, 2 May 2011 22:57:27 +0200 Subject: [PATCH 0045/1172] [2066] Add new Wrapper to Open and Close doors or Use and Reset buttons These functions are not meant to replace DoUseDoorOrButton, but for cases in which the order of opening/ closing is not given Signed-off-by: Schmoozerd --- include/sc_instance.cpp | 36 ++++++++++++++++++++++++++++++++++++ include/sc_instance.h | 6 ++++++ sd2_revision_nr.h | 2 +- 3 files changed, 43 insertions(+), 1 deletion(-) diff --git a/include/sc_instance.cpp b/include/sc_instance.cpp index d192ecc14..8e3e77e62 100644 --- a/include/sc_instance.cpp +++ b/include/sc_instance.cpp @@ -70,3 +70,39 @@ Player* ScriptedInstance::GetPlayerInMap(bool bOnlyAlive /*=false*/, bool bCanBe return NULL; } + +// Open door or Use button - Optional uiWithRestoreTime. If not defined, autoCloseTime will be used (if not 0 by default in *_template) +void ScriptedInstance::DoOpenDoorOrButton(uint64 uiGuid, uint32 uiWithRestoreTime, bool bUseAlternativeState) +{ + if (!uiGuid) + return; + + if (GameObject* pGo = instance->GetGameObject(uiGuid)) + { + if (pGo->GetGoType() == GAMEOBJECT_TYPE_DOOR || pGo->GetGoType() == GAMEOBJECT_TYPE_BUTTON) + { + if (pGo->getLootState() == GO_READY) + pGo->UseDoorOrButton(uiWithRestoreTime, bUseAlternativeState); + } + else + error_log("SD2: Script call DoOpenDoorOrButton, but gameobject entry %u is type %u.",pGo->GetEntry(),pGo->GetGoType()); + } +} + +// Close door or Reset button +void ScriptedInstance::DoCloseDoorOrButton(uint64 uiGuid) +{ + if (!uiGuid) + return; + + if (GameObject* pGo = instance->GetGameObject(uiGuid)) + { + if (pGo->GetGoType() == GAMEOBJECT_TYPE_DOOR || pGo->GetGoType() == GAMEOBJECT_TYPE_BUTTON) + { + if (pGo->getLootState() == GO_ACTIVATED) + pGo->ResetDoorOrButton(); + } + else + error_log("SD2: Script call DoCloseDoorOrButton, but gameobject entry %u is type %u.",pGo->GetEntry(),pGo->GetGoType()); + } +} diff --git a/include/sc_instance.h b/include/sc_instance.h index 27a70a584..c53d384be 100644 --- a/include/sc_instance.h +++ b/include/sc_instance.h @@ -33,6 +33,12 @@ class MANGOS_DLL_DECL ScriptedInstance : public InstanceData // Change active state of doors or buttons void DoUseDoorOrButton(uint64 uiGuid, uint32 uiWithRestoreTime = 0, bool bUseAlternativeState = false); + // Open door or Use button + void DoOpenDoorOrButton(uint64 uiGuid, uint32 uiWithRestoreTime = 0, bool bUseAlternativeState = false); + + // Close door or Reset button + void DoCloseDoorOrButton(uint64 uiGuid); + // Respawns a GO having negative spawntimesecs in gameobject-table void DoRespawnGameObject(uint64 uiGuid, uint32 uiTimeToDespawn = MINUTE); diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 63fbcc314..2e9c576d6 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2065" + #define SD2_REVISION_NR "2066" #endif // __SD2_REVISION_NR_H__ From a29df03aa2b57b3b00eeb40d52819a0cdc3b9e38 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Mon, 2 May 2011 23:11:41 +0200 Subject: [PATCH 0046/1172] [2067] Make use of DoClose / DoOpen wrapper in some scripts --- .../stratholme/instance_stratholme.cpp | 33 ++----------------- .../eastern_kingdoms/stratholme/stratholme.h | 1 - scripts/northrend/naxxramas/boss_thaddius.cpp | 5 +-- .../violet_hold/instance_violet_hold.cpp | 8 ++--- sd2_revision_nr.h | 2 +- 5 files changed, 8 insertions(+), 41 deletions(-) diff --git a/scripts/eastern_kingdoms/stratholme/instance_stratholme.cpp b/scripts/eastern_kingdoms/stratholme/instance_stratholme.cpp index c6295231c..d52e1ee1e 100644 --- a/scripts/eastern_kingdoms/stratholme/instance_stratholme.cpp +++ b/scripts/eastern_kingdoms/stratholme/instance_stratholme.cpp @@ -42,8 +42,6 @@ instance_stratholme::instance_stratholme(Map* pMap) : ScriptedInstance(pMap), m_auiRivendareDoorGUID(0), m_uiYsidaCageGUID(0), - m_bIsSlaughterhouseGateOpened(false), - m_uiBaronGUID(0), m_uiYsidaTriggerGUID(0), @@ -72,7 +70,6 @@ bool instance_stratholme::StartSlaugtherSquare() DoScriptText(SAY_ANNOUNCE_RIVENDARE, pBaron); DoUseDoorOrButton(m_uiPortGauntletGUID); - m_bIsSlaughterhouseGateOpened = true; DoUseDoorOrButton(m_uiPortSlaugtherGUID); debug_log("SD2: Instance Stratholme: Open slaugther square."); @@ -138,10 +135,7 @@ void instance_stratholme::OnObjectCreate(GameObject* pGo) case GO_PORT_GAUNTLET: m_uiPortGauntletGUID = pGo->GetGUID(); if (m_auiEncounter[TYPE_BARONESS] == SPECIAL && m_auiEncounter[TYPE_NERUB] == SPECIAL && m_auiEncounter[TYPE_PALLID] == SPECIAL) - { - m_bIsSlaughterhouseGateOpened = true; pGo->SetGoState(GO_STATE_ACTIVE); - } break; case GO_PORT_SLAUGTHER: m_uiPortSlaugtherGUID = pGo->GetGUID(); @@ -208,7 +202,6 @@ void instance_stratholme::SetData(uint32 uiType, uint32 uiData) { m_uiSlaugtherSquareTimer = 20000; // TODO - unknown, also possible that this is not the very correct place.. DoUseDoorOrButton(m_uiPortGauntletGUID); - m_bIsSlaughterhouseGateOpened = false; } uint32 uiCount = m_sAbomnationGUID.size(); @@ -251,10 +244,7 @@ void instance_stratholme::SetData(uint32 uiType, uint32 uiData) } // After fail aggroing Ramstein means wipe on Ramstein, so close door again if (uiData == IN_PROGRESS && m_auiEncounter[uiType] == FAIL) - { DoUseDoorOrButton(m_uiPortGauntletGUID); - m_bIsSlaughterhouseGateOpened = false; - } if (uiData == DONE) { // Open side gate and start summoning skeletons @@ -282,7 +272,6 @@ void instance_stratholme::SetData(uint32 uiType, uint32 uiData) if (uiData == FAIL && m_auiEncounter[uiType] != FAIL) { DoUseDoorOrButton(m_uiPortGauntletGUID); - m_bIsSlaughterhouseGateOpened = true; m_uiSlaugtherSquareTimer = 0; // Let already moving Abomnations stop @@ -304,11 +293,7 @@ void instance_stratholme::SetData(uint32 uiType, uint32 uiData) SetData(TYPE_BARON_RUN, DONE); // Close Slaughterhouse door if needed - if (m_bIsSlaughterhouseGateOpened) - { - DoUseDoorOrButton(m_uiPortGauntletGUID); - m_bIsSlaughterhouseGateOpened = false; - } + DoCloseDoorOrButton(m_uiPortGauntletGUID); } if (uiData == DONE) { @@ -342,13 +327,9 @@ void instance_stratholme::SetData(uint32 uiType, uint32 uiData) // Open Slaughterhouse door again DoUseDoorOrButton(m_uiPortGauntletGUID); - m_bIsSlaughterhouseGateOpened = true; } if (uiData == FAIL) - { DoUseDoorOrButton(m_uiPortGauntletGUID); - m_bIsSlaughterhouseGateOpened = true; - } // combat door DoUseDoorOrButton(m_auiRivendareDoorGUID); @@ -577,11 +558,7 @@ void instance_stratholme::OnCreatureEnterCombat(Creature* pCreature) case NPC_MINDLESS_UNDEAD: case NPC_BLACK_GUARD: // Aggro in Slaughterhouse after Ramstein -- Need to close Slaughterhouse Door if not closed (wipe case) - if (m_bIsSlaughterhouseGateOpened) - { - DoUseDoorOrButton(m_uiPortGauntletGUID); - m_bIsSlaughterhouseGateOpened = false; - } + DoCloseDoorOrButton(m_uiPortGauntletGUID); break; } } @@ -604,11 +581,7 @@ void instance_stratholme::OnCreatureEvade(Creature* pCreature) case NPC_MINDLESS_UNDEAD: case NPC_BLACK_GUARD: // Fail in Slaughterhouse after Ramstein -- Need to open Slaughterhouse Door - if (!m_bIsSlaughterhouseGateOpened) - { - DoUseDoorOrButton(m_uiPortGauntletGUID); - m_bIsSlaughterhouseGateOpened = true; - } + DoOpenDoorOrButton(m_uiPortGauntletGUID); break; } } diff --git a/scripts/eastern_kingdoms/stratholme/stratholme.h b/scripts/eastern_kingdoms/stratholme/stratholme.h index 8070b1fd3..45d28e140 100644 --- a/scripts/eastern_kingdoms/stratholme/stratholme.h +++ b/scripts/eastern_kingdoms/stratholme/stratholme.h @@ -120,7 +120,6 @@ struct MANGOS_DLL_DECL instance_stratholme : public ScriptedInstance protected: uint32 m_auiEncounter[MAX_ENCOUNTER]; bool m_bIsSilverHandDead[MAX_SILVERHAND]; - bool m_bIsSlaughterhouseGateOpened; std::string strInstData; uint32 m_uiBaronRunTimer; diff --git a/scripts/northrend/naxxramas/boss_thaddius.cpp b/scripts/northrend/naxxramas/boss_thaddius.cpp index 3c82cfe4f..63ab01a45 100644 --- a/scripts/northrend/naxxramas/boss_thaddius.cpp +++ b/scripts/northrend/naxxramas/boss_thaddius.cpp @@ -358,10 +358,7 @@ struct MANGOS_DLL_DECL npc_tesla_coilAI : public Scripted_NoMovementAI { m_bReapply = false; m_creature->InterruptNonMeleeSpells(true); - GameObject* pGo = m_pInstance->instance->GetGameObject(m_pInstance->GetData64(m_bToFeugen ? GO_CONS_NOX_TESLA_FEUGEN : GO_CONS_NOX_TESLA_STALAGG)); - - if (pGo && pGo->GetGoType() == GAMEOBJECT_TYPE_BUTTON && pGo->getLootState() == GO_ACTIVATED) - pGo->ResetDoorOrButton(); + m_pInstance->DoCloseDoorOrButton(m_pInstance->GetData64(m_bToFeugen ? GO_CONS_NOX_TESLA_FEUGEN : GO_CONS_NOX_TESLA_STALAGG)); // TODO Uncomment when chain spells are proper implemented // DoCastSpellIfCan(m_creature, m_bToFeugen ? SPELL_FEUGEN_CHAIN : SPELL_STALAGG_CHAIN); diff --git a/scripts/northrend/violet_hold/instance_violet_hold.cpp b/scripts/northrend/violet_hold/instance_violet_hold.cpp index d1763ca81..ed232def6 100644 --- a/scripts/northrend/violet_hold/instance_violet_hold.cpp +++ b/scripts/northrend/violet_hold/instance_violet_hold.cpp @@ -190,14 +190,12 @@ void instance_violet_hold::UpdateCellForBoss(uint32 uiBossEntry, bool bForceClos return; for(BossToCellMap::const_iterator itr = itrCellLower; itr != itrCellUpper; ++itr) + { if (!bForceClosing) DoUseDoorOrButton(itr->second); else - { - GameObject* pGo = instance->GetGameObject(itr->second); - if (pGo && (pGo->GetGoType() == GAMEOBJECT_TYPE_DOOR || pGo->GetGoType() == GAMEOBJECT_TYPE_BUTTON) && pGo->getLootState() == GO_ACTIVATED) - pGo->ResetDoorOrButton(); - } + DoCloseDoorOrButton(itr->second); + } } void instance_violet_hold::UpdateWorldState(bool bEnable) diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 2e9c576d6..fe4ff178b 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2066" + #define SD2_REVISION_NR "2067" #endif // __SD2_REVISION_NR_H__ From 79315376f853f380f23efed5d0189dc2b0f27087 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Wed, 4 May 2011 22:56:14 +0200 Subject: [PATCH 0047/1172] [2068] Revert "[2066] Add new Wrapper to Open and Close doors or Use and Reset buttons" This reverts commit 192b4475032bd061275fb58e2773d5bc568b67b9. Signed-off-by: Schmoozerd --- include/sc_instance.cpp | 36 ------------------------------------ include/sc_instance.h | 6 ------ sd2_revision_nr.h | 2 +- 3 files changed, 1 insertion(+), 43 deletions(-) diff --git a/include/sc_instance.cpp b/include/sc_instance.cpp index 8e3e77e62..d192ecc14 100644 --- a/include/sc_instance.cpp +++ b/include/sc_instance.cpp @@ -70,39 +70,3 @@ Player* ScriptedInstance::GetPlayerInMap(bool bOnlyAlive /*=false*/, bool bCanBe return NULL; } - -// Open door or Use button - Optional uiWithRestoreTime. If not defined, autoCloseTime will be used (if not 0 by default in *_template) -void ScriptedInstance::DoOpenDoorOrButton(uint64 uiGuid, uint32 uiWithRestoreTime, bool bUseAlternativeState) -{ - if (!uiGuid) - return; - - if (GameObject* pGo = instance->GetGameObject(uiGuid)) - { - if (pGo->GetGoType() == GAMEOBJECT_TYPE_DOOR || pGo->GetGoType() == GAMEOBJECT_TYPE_BUTTON) - { - if (pGo->getLootState() == GO_READY) - pGo->UseDoorOrButton(uiWithRestoreTime, bUseAlternativeState); - } - else - error_log("SD2: Script call DoOpenDoorOrButton, but gameobject entry %u is type %u.",pGo->GetEntry(),pGo->GetGoType()); - } -} - -// Close door or Reset button -void ScriptedInstance::DoCloseDoorOrButton(uint64 uiGuid) -{ - if (!uiGuid) - return; - - if (GameObject* pGo = instance->GetGameObject(uiGuid)) - { - if (pGo->GetGoType() == GAMEOBJECT_TYPE_DOOR || pGo->GetGoType() == GAMEOBJECT_TYPE_BUTTON) - { - if (pGo->getLootState() == GO_ACTIVATED) - pGo->ResetDoorOrButton(); - } - else - error_log("SD2: Script call DoCloseDoorOrButton, but gameobject entry %u is type %u.",pGo->GetEntry(),pGo->GetGoType()); - } -} diff --git a/include/sc_instance.h b/include/sc_instance.h index c53d384be..27a70a584 100644 --- a/include/sc_instance.h +++ b/include/sc_instance.h @@ -33,12 +33,6 @@ class MANGOS_DLL_DECL ScriptedInstance : public InstanceData // Change active state of doors or buttons void DoUseDoorOrButton(uint64 uiGuid, uint32 uiWithRestoreTime = 0, bool bUseAlternativeState = false); - // Open door or Use button - void DoOpenDoorOrButton(uint64 uiGuid, uint32 uiWithRestoreTime = 0, bool bUseAlternativeState = false); - - // Close door or Reset button - void DoCloseDoorOrButton(uint64 uiGuid); - // Respawns a GO having negative spawntimesecs in gameobject-table void DoRespawnGameObject(uint64 uiGuid, uint32 uiTimeToDespawn = MINUTE); diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index fe4ff178b..ae07aa37b 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2067" + #define SD2_REVISION_NR "2068" #endif // __SD2_REVISION_NR_H__ From a38a728ba3940b50a7de01d9e1bbd8042a37e7b0 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Wed, 4 May 2011 23:02:52 +0200 Subject: [PATCH 0048/1172] [2069] Fix compile after [2068] * Revert partly [2067] Make use of DoClose / DoOpen wrapper in some scripts Revert chances to boss_thaddius.cpp and instance_violet_hold.cpp of commit a29df03aa2b57b3b00eeb40d52819a0cdc3b9e38 * Improve Door Handling in Stratholme, add additional type for adds after Ramstein Signed-off-by: Schmoozerd --- .../stratholme/instance_stratholme.cpp | 39 ++++++++++++++----- .../eastern_kingdoms/stratholme/stratholme.h | 3 +- scripts/northrend/naxxramas/boss_thaddius.cpp | 5 ++- .../violet_hold/instance_violet_hold.cpp | 6 ++- sd2_revision_nr.h | 2 +- 5 files changed, 41 insertions(+), 14 deletions(-) diff --git a/scripts/eastern_kingdoms/stratholme/instance_stratholme.cpp b/scripts/eastern_kingdoms/stratholme/instance_stratholme.cpp index d52e1ee1e..b0b70a69b 100644 --- a/scripts/eastern_kingdoms/stratholme/instance_stratholme.cpp +++ b/scripts/eastern_kingdoms/stratholme/instance_stratholme.cpp @@ -293,7 +293,8 @@ void instance_stratholme::SetData(uint32 uiType, uint32 uiData) SetData(TYPE_BARON_RUN, DONE); // Close Slaughterhouse door if needed - DoCloseDoorOrButton(m_uiPortGauntletGUID); + if (m_auiEncounter[5] == FAIL) // TODO + DoUseDoorOrButton(m_uiPortGauntletGUID); } if (uiData == DONE) { @@ -350,6 +351,27 @@ void instance_stratholme::SetData(uint32 uiType, uint32 uiData) } m_auiEncounter[6] = uiData; // TODO break; + case TYPE_BLACK_GUARDS: + // Prevent double action + if (m_auiEncounter[7] == uiData) // TODO + return; + + // Restart after failure, close Gauntlet + if (uiData == IN_PROGRESS && m_auiEncounter[7] == FAIL) + DoUseDoorOrButton(m_uiPortGauntletGUID); + // Wipe case - open gauntlet + if (uiData == FAIL) + DoUseDoorOrButton(m_uiPortGauntletGUID); + if (uiData == DONE) + { + if (Creature* pBaron = instance->GetCreature(m_uiBaronGUID)) + DoScriptText(SAY_UNDEAD_DEFEAT, pBaron); + DoUseDoorOrButton(m_auiRivendareDoorGUID); + } + m_auiEncounter[7] = uiData; // TODO + + // No need to save anything here, so return + return; case TYPE_SH_AELMAR: m_bIsSilverHandDead[0] = (uiData) ? true : false; @@ -557,8 +579,8 @@ void instance_stratholme::OnCreatureEnterCombat(Creature* pCreature) case NPC_MINDLESS_UNDEAD: case NPC_BLACK_GUARD: - // Aggro in Slaughterhouse after Ramstein -- Need to close Slaughterhouse Door if not closed (wipe case) - DoCloseDoorOrButton(m_uiPortGauntletGUID); + // Aggro in Slaughterhouse after Ramstein + SetData(TYPE_BLACK_GUARDS, IN_PROGRESS); break; } } @@ -580,8 +602,8 @@ void instance_stratholme::OnCreatureEvade(Creature* pCreature) break; case NPC_MINDLESS_UNDEAD: case NPC_BLACK_GUARD: - // Fail in Slaughterhouse after Ramstein -- Need to open Slaughterhouse Door - DoOpenDoorOrButton(m_uiPortGauntletGUID); + // Fail in Slaughterhouse after Ramstein + SetData(TYPE_BLACK_GUARDS, FAIL); break; } } @@ -650,11 +672,8 @@ void instance_stratholme::OnCreatureDeath(Creature* pCreature) case NPC_BLACK_GUARD: m_luiGuardGUIDs.remove(pCreature->GetGUID()); if (m_luiGuardGUIDs.empty()) - { - if (Creature* pBaron = instance->GetCreature(m_uiBaronGUID)) - DoScriptText(SAY_UNDEAD_DEFEAT, pBaron); - DoUseDoorOrButton(m_auiRivendareDoorGUID); - } + SetData(TYPE_BLACK_GUARDS, DONE); + break; } } diff --git a/scripts/eastern_kingdoms/stratholme/stratholme.h b/scripts/eastern_kingdoms/stratholme/stratholme.h index 45d28e140..168e546ef 100644 --- a/scripts/eastern_kingdoms/stratholme/stratholme.h +++ b/scripts/eastern_kingdoms/stratholme/stratholme.h @@ -7,7 +7,7 @@ enum { - MAX_ENCOUNTER = 7, + MAX_ENCOUNTER = 8, MAX_SILVERHAND = 5, MAX_ZIGGURATS = 3, @@ -19,6 +19,7 @@ enum TYPE_RAMSTEIN_OBSOLETE = 5, // Still set in Acid, remove when removed from Acid :) TYPE_BARON = 6, // Adapt then TYPE_BARTHILAS_RUN = 7, + TYPE_BLACK_GUARDS = 8, TYPE_SH_QUEST = 20, TYPE_SH_CATHELA = 21, diff --git a/scripts/northrend/naxxramas/boss_thaddius.cpp b/scripts/northrend/naxxramas/boss_thaddius.cpp index 63ab01a45..3c82cfe4f 100644 --- a/scripts/northrend/naxxramas/boss_thaddius.cpp +++ b/scripts/northrend/naxxramas/boss_thaddius.cpp @@ -358,7 +358,10 @@ struct MANGOS_DLL_DECL npc_tesla_coilAI : public Scripted_NoMovementAI { m_bReapply = false; m_creature->InterruptNonMeleeSpells(true); - m_pInstance->DoCloseDoorOrButton(m_pInstance->GetData64(m_bToFeugen ? GO_CONS_NOX_TESLA_FEUGEN : GO_CONS_NOX_TESLA_STALAGG)); + GameObject* pGo = m_pInstance->instance->GetGameObject(m_pInstance->GetData64(m_bToFeugen ? GO_CONS_NOX_TESLA_FEUGEN : GO_CONS_NOX_TESLA_STALAGG)); + + if (pGo && pGo->GetGoType() == GAMEOBJECT_TYPE_BUTTON && pGo->getLootState() == GO_ACTIVATED) + pGo->ResetDoorOrButton(); // TODO Uncomment when chain spells are proper implemented // DoCastSpellIfCan(m_creature, m_bToFeugen ? SPELL_FEUGEN_CHAIN : SPELL_STALAGG_CHAIN); diff --git a/scripts/northrend/violet_hold/instance_violet_hold.cpp b/scripts/northrend/violet_hold/instance_violet_hold.cpp index ed232def6..3d444656a 100644 --- a/scripts/northrend/violet_hold/instance_violet_hold.cpp +++ b/scripts/northrend/violet_hold/instance_violet_hold.cpp @@ -194,7 +194,11 @@ void instance_violet_hold::UpdateCellForBoss(uint32 uiBossEntry, bool bForceClos if (!bForceClosing) DoUseDoorOrButton(itr->second); else - DoCloseDoorOrButton(itr->second); + { + GameObject* pGo = instance->GetGameObject(itr->second); + if (pGo && pGo->GetGoType() == GAMEOBJECT_TYPE_DOOR && pGo->getLootState() == GO_ACTIVATED) + pGo->ResetDoorOrButton(); + } } } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index ae07aa37b..df52777a1 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2068" + #define SD2_REVISION_NR "2069" #endif // __SD2_REVISION_NR_H__ From ad1c38c6523e50368f858f405da8ecc3f24168d3 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Thu, 5 May 2011 12:19:59 +0200 Subject: [PATCH 0049/1172] [2070] Scholomance - Implement Gandling Room Events * Remove hacks from boss_darkmaster_gandling.cpp * Add Event handling in instance script * Spell-fix requires MaNGOS Rev [11407] * Spells and summoning-events require database support - Special thanks to Xfurry for providing them! Signed-off-by: Schmoozerd --- .../scholomance/boss_darkmaster_gandling.cpp | 102 ++-------- .../scholomance/instance_scholomance.cpp | 179 ++++++++++++++---- .../scholomance/scholomance.h | 38 +++- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 8 + sql/updates/r2070_mangos.sql | 8 + 6 files changed, 204 insertions(+), 133 deletions(-) create mode 100644 sql/updates/r2070_mangos.sql diff --git a/scripts/eastern_kingdoms/scholomance/boss_darkmaster_gandling.cpp b/scripts/eastern_kingdoms/scholomance/boss_darkmaster_gandling.cpp index 3c922152d..497922c83 100644 --- a/scripts/eastern_kingdoms/scholomance/boss_darkmaster_gandling.cpp +++ b/scripts/eastern_kingdoms/scholomance/boss_darkmaster_gandling.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: Boss_Darkmaster_Gandling -SD%Complete: 75 -SDComment: TODO: Implement teleport spells in MaNGOS and WorldDB +SD%Complete: 100 +SDComment: SDCategory: Scholomance EndScriptData */ @@ -29,7 +29,7 @@ enum SPELL_ARCANE_MISSILES = 15790, // SpellId not sure, original was 22272 SPELL_SHADOW_SHIELD = 12040, // SpellID not sure, original was 22417 stated as "wrong, but 12040 is wrong either." SPELL_CURSE = 18702, - SPELL_SHADOW_PORTAL = 17950 // TODO implement this spell(and other related port spells) in DB and MaNGOS + SPELL_SHADOW_PORTAL = 17950 }; struct MANGOS_DLL_DECL boss_darkmaster_gandlingAI : public ScriptedAI @@ -47,8 +47,6 @@ struct MANGOS_DLL_DECL boss_darkmaster_gandlingAI : public ScriptedAI uint32 m_uiCurseTimer; uint32 m_uiTeleportTimer; - Creature *Summoned; - void Reset() { m_uiArcaneMissilesTimer = 4500; @@ -95,96 +93,20 @@ struct MANGOS_DLL_DECL boss_darkmaster_gandlingAI : public ScriptedAI { if (m_uiTeleportTimer < uiDiff) { - Unit* target = NULL; - target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0); - if (target && target->GetTypeId() == TYPEID_PLAYER) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) { - if (m_creature->getThreatManager().getThreat(target)) - m_creature->getThreatManager().modifyThreatPercent(target, -100); + if (pTarget->GetTypeId() != TYPEID_PLAYER) + return; - switch(urand(0, 5)) + if (DoCastSpellIfCan(pTarget, SPELL_SHADOW_PORTAL) == CAST_OK) { - case 0: - DoTeleportPlayer(target, 250.0696f, 0.3921f, 84.8408f, 3.149f); - Summoned = m_creature->SummonCreature(16119, 254.2325f, 0.3417f, 84.8407f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,10000); - if (Summoned) - Summoned->AI()->AttackStart(target); - Summoned = m_creature->SummonCreature(16119, 257.7133f, 4.0226f, 84.8407f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,10000); - if (Summoned) - Summoned->AI()->AttackStart(target); - Summoned = m_creature->SummonCreature(16119, 258.6702f, -2.60656f, 84.8407f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,10000); - if (Summoned) - Summoned->AI()->AttackStart(target); - break; - case 1: - DoTeleportPlayer(target, 181.4220f, -91.9481f, 84.8410f, 1.608f); - Summoned = m_creature->SummonCreature(16119, 184.0519f, -73.5649f, 84.8407f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,10000); - if (Summoned) - Summoned->AI()->AttackStart(target); - Summoned = m_creature->SummonCreature(16119, 179.5951f, -73.7045f, 84.8407f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,10000); - if (Summoned) - Summoned->AI()->AttackStart(target); - Summoned = m_creature->SummonCreature(16119, 180.6452f, -78.2143f, 84.8407f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,10000); - if (Summoned) - Summoned->AI()->AttackStart(target); - Summoned = m_creature->SummonCreature(16119, 283.2274f, -78.1518f, 84.8407f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,10000); - if (Summoned) - Summoned->AI()->AttackStart(target); - break; - case 2: - DoTeleportPlayer(target, 95.1547f, -1.8173f, 85.2289f, 0.043f); - Summoned = m_creature->SummonCreature(16119, 100.9404f, -1.8016f, 85.2289f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,10000); - if (Summoned) - Summoned->AI()->AttackStart(target); - Summoned = m_creature->SummonCreature(16119, 101.3729f, 0.4882f, 85.2289f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,10000); - if (Summoned) - Summoned->AI()->AttackStart(target); - Summoned = m_creature->SummonCreature(16119, 101.4596f, -4.4740f, 85.2289f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,10000); - if (Summoned) - Summoned->AI()->AttackStart(target); - break; - case 3: - DoTeleportPlayer(target, 250.0696f, 0.3921f, 72.6722f, 3.149f); - Summoned = m_creature->SummonCreature(16119, 240.34481f, 0.7368f, 72.6722f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,10000); - if (Summoned) - Summoned->AI()->AttackStart(target); - Summoned = m_creature->SummonCreature(16119, 240.3633f, -2.9520f, 72.6722f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,10000); - if (Summoned) - Summoned->AI()->AttackStart(target); - Summoned = m_creature->SummonCreature(16119, 240.6702f, 3.34949f, 72.6722f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,10000); - if (Summoned) - Summoned->AI()->AttackStart(target); - break; - case 4: - DoTeleportPlayer(target, 181.4220f, -91.9481f, 70.7734f, 1.608f); - Summoned = m_creature->SummonCreature(16119, 184.0519f, -73.5649f, 70.7734f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,10000); - if (Summoned) - Summoned->AI()->AttackStart(target); - Summoned = m_creature->SummonCreature(16119, 179.5951f, -73.7045f, 70.7734f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,10000); - if (Summoned) - Summoned->AI()->AttackStart(target); - Summoned = m_creature->SummonCreature(16119, 180.6452f, -78.2143f, 70.7734f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,10000); - if (Summoned) - Summoned->AI()->AttackStart(target); - Summoned = m_creature->SummonCreature(16119, 283.2274f, -78.1518f, 70.7734f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,10000); - if (Summoned) - Summoned->AI()->AttackStart(target); - break; - case 5: - DoTeleportPlayer(target, 106.1541f, -1.8994f, 75.3663f, 0.043f); - Summoned = m_creature->SummonCreature(16119, 115.3945f, -1.5555f, 75.3663f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,10000); - if (Summoned) - Summoned->AI()->AttackStart(target); - Summoned = m_creature->SummonCreature(16119, 257.7133f, 1.8066f, 75.3663f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,10000); - if (Summoned) - Summoned->AI()->AttackStart(target); - Summoned = m_creature->SummonCreature(16119, 258.6702f, -5.1001f, 75.3663f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,10000); - if (Summoned) - Summoned->AI()->AttackStart(target); - break; + // remove threat + if (m_creature->getThreatManager().getThreat(pTarget)) + m_creature->getThreatManager().modifyThreatPercent(pTarget, -100); + + m_uiTeleportTimer = urand(20000, 35000); } } - m_uiTeleportTimer = urand(20000, 35000); } else m_uiTeleportTimer -= uiDiff; diff --git a/scripts/eastern_kingdoms/scholomance/instance_scholomance.cpp b/scripts/eastern_kingdoms/scholomance/instance_scholomance.cpp index 1c33cb2b7..03d3aa752 100644 --- a/scripts/eastern_kingdoms/scholomance/instance_scholomance.cpp +++ b/scripts/eastern_kingdoms/scholomance/instance_scholomance.cpp @@ -16,33 +16,20 @@ /* ScriptData SDName: Instance_Scholomance -SD%Complete: 80 -SDComment: Door handling for Gandling rooms after player-teleporting (close on Add Aggro, open when all Adds dead) missing +SD%Complete: 99 +SDComment: Possible some D2 or other exotic missing SDCategory: Scholomance EndScriptData */ #include "precompiled.h" #include "scholomance.h" -/* Darkmaster Gandling Encounter - Adds handling (MISSING) - * When a player is teleported to another room, there are 3 (perhaps sometimes 4) Adds spawned. - * When the first add Aggroes, the door to the room is closed - * When the last add dies, the door to the room is opened - * - * Also possible that this is better handled within the boss-script, depends on details of implementation of teleport spells - */ - instance_scholomance::instance_scholomance(Map* pMap) : ScriptedInstance(pMap), m_uiDarkmasterGandlingGUID(0), m_uiGateKirtonosGUID(0), m_uiGateRasGUID(0), - m_uiGateMiliciaGUID(0), - m_uiGateTheolenGUID(0), - m_uiGatePolkeltGUID(0), - m_uiGateRavenianGUID(0), - m_uiGateBarovGUID(0), - m_uiGateIlluciaGUID(0), - m_uiGateGandlingGUID(0) + m_uiGateGandlingGUID(0), + m_uiGandlingEvent(0) { Initialize(); } @@ -50,6 +37,9 @@ instance_scholomance::instance_scholomance(Map* pMap) : ScriptedInstance(pMap), void instance_scholomance::Initialize() { memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); + + for (uint8 i = 0; i < MAX_EVENTS; ++i) + m_mGandlingData[aGandlingEvents[i]] = GandlingEventData(); } void instance_scholomance::OnPlayerEnter(Player* pPlayer) @@ -62,7 +52,14 @@ void instance_scholomance::OnCreatureCreate(Creature* pCreature) { switch (pCreature->GetEntry()) { - case NPC_DARKMASTER_GANDLING: m_uiDarkmasterGandlingGUID = pCreature->GetGUID(); break; + case NPC_DARKMASTER_GANDLING: + m_uiDarkmasterGandlingGUID = pCreature->GetGUID(); + break; + case NPC_BONE_MINION: + GandlingEventMap::iterator find = m_mGandlingData.find(m_uiGandlingEvent); + if (find != m_mGandlingData.end()) + find->second.m_sAddGuids.insert(pCreature->GetGUIDLow()); + break; } } @@ -72,14 +69,15 @@ void instance_scholomance::OnObjectCreate(GameObject* pGo) { case GO_GATE_KIRTONOS: m_uiGateKirtonosGUID = pGo->GetGUID(); break; case GO_GATE_RAS: m_uiGateRasGUID = pGo->GetGUID(); break; - case GO_GATE_MALICIA: m_uiGateMiliciaGUID = pGo->GetGUID(); break; - case GO_GATE_THEOLEN: m_uiGateTheolenGUID = pGo->GetGUID(); break; - case GO_GATE_POLKELT: m_uiGatePolkeltGUID = pGo->GetGUID(); break; - case GO_GATE_RAVENIAN: m_uiGateRavenianGUID = pGo->GetGUID(); break; - case GO_GATE_BAROV: m_uiGateBarovGUID = pGo->GetGUID(); break; - case GO_GATE_ILLUCIA: m_uiGateIlluciaGUID = pGo->GetGUID(); break; case GO_GATE_GANDLING: m_uiGateGandlingGUID = pGo->GetGUID(); break; + case GO_GATE_MALICIA: m_mGandlingData[EVENT_ID_MALICIA].m_uiDoorGUID = pGo->GetGUID(); break; + case GO_GATE_THEOLEN: m_mGandlingData[EVENT_ID_THEOLEN].m_uiDoorGUID = pGo->GetGUID(); break; + case GO_GATE_POLKELT: m_mGandlingData[EVENT_ID_POLKELT].m_uiDoorGUID = pGo->GetGUID(); break; + case GO_GATE_RAVENIAN: m_mGandlingData[EVENT_ID_RAVENIAN].m_uiDoorGUID = pGo->GetGUID(); break; + case GO_GATE_BAROV: m_mGandlingData[EVENT_ID_BAROV].m_uiDoorGUID = pGo->GetGUID(); break; + case GO_GATE_ILLUCIA: m_mGandlingData[EVENT_ID_ILLUCIA].m_uiDoorGUID = pGo->GetGUID(); break; + case GO_VIEWING_ROOM_DOOR: // In normal flow of the instance, this door is opened by a dropped key if (m_auiEncounter[TYPE_RATTLEGORE] == DONE) @@ -106,34 +104,33 @@ void instance_scholomance::SetData(uint32 uiType, uint32 uiData) m_auiEncounter[uiType] = uiData; DoUseDoorOrButton(m_uiGateRasGUID); break; - case TYPE_MALICIA: + case TYPE_MALICIA: // TODO this code can be simplified, when it is known which event-ids correspond to which room m_auiEncounter[uiType] = uiData; - DoUseDoorOrButton(m_uiGateMiliciaGUID); + DoUseDoorOrButton(m_mGandlingData[EVENT_ID_MALICIA].m_uiDoorGUID); break; case TYPE_THEOLEN: m_auiEncounter[uiType] = uiData; - DoUseDoorOrButton(m_uiGateTheolenGUID); + DoUseDoorOrButton(m_mGandlingData[EVENT_ID_THEOLEN].m_uiDoorGUID); break; case TYPE_POLKELT: m_auiEncounter[uiType] = uiData; - DoUseDoorOrButton(m_uiGatePolkeltGUID); + DoUseDoorOrButton(m_mGandlingData[EVENT_ID_POLKELT].m_uiDoorGUID); break; case TYPE_RAVENIAN: m_auiEncounter[uiType] = uiData; - DoUseDoorOrButton(m_uiGateRavenianGUID); + DoUseDoorOrButton(m_mGandlingData[EVENT_ID_RAVENIAN].m_uiDoorGUID); break; case TYPE_ALEXEI_BAROV: m_auiEncounter[uiType] = uiData; - DoUseDoorOrButton(m_uiGateBarovGUID); + DoUseDoorOrButton(m_mGandlingData[EVENT_ID_BAROV].m_uiDoorGUID); break; case TYPE_ILLUCIA_BAROV: m_auiEncounter[uiType] = uiData; - DoUseDoorOrButton(m_uiGateIlluciaGUID); + DoUseDoorOrButton(m_mGandlingData[EVENT_ID_ILLUCIA].m_uiDoorGUID); break; case TYPE_GANDLING: m_auiEncounter[uiType] = uiData; // Close the door to main room, because the encounter will take place only in the main hall and random around all the 6 rooms - // The door to each of the room needs to be controlled by checking the summoned adds DoUseDoorOrButton(m_uiGateGandlingGUID); break; } @@ -149,7 +146,7 @@ void instance_scholomance::SetData(uint32 uiType, uint32 uiData) std::ostringstream saveStream; saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2] << " " << m_auiEncounter[3] << " " << m_auiEncounter[4] << " " << m_auiEncounter[5] << " " - << m_auiEncounter[6] << " " << m_auiEncounter[7] << " " << m_auiEncounter[8] << m_auiEncounter[9]; + << m_auiEncounter[6] << " " << m_auiEncounter[7] << " " << m_auiEncounter[8] << " " << m_auiEncounter[9]; m_strInstData = saveStream.str(); @@ -176,9 +173,42 @@ void instance_scholomance::DoSpawnGandlingIfCan(bool bByPlayerEnter) if (m_auiEncounter[TYPE_MALICIA] == DONE && m_auiEncounter[TYPE_THEOLEN] == DONE && m_auiEncounter[TYPE_POLKELT] == DONE && m_auiEncounter[TYPE_RAVENIAN] == DONE && m_auiEncounter[TYPE_ALEXEI_BAROV] == DONE && m_auiEncounter[TYPE_ILLUCIA_BAROV] == DONE) { - if (Creature* pGandling = pPlayer->SummonCreature(NPC_DARKMASTER_GANDLING, m_aGandlingSpawnLocs[0].m_fX, m_aGandlingSpawnLocs[0].m_fY, m_aGandlingSpawnLocs[0].m_fZ, m_aGandlingSpawnLocs[0].m_fO, TEMPSUMMON_DEAD_DESPAWN, 0)) + if (Creature* pGandling = pPlayer->SummonCreature(NPC_DARKMASTER_GANDLING, aGandlingSpawnLocs[0].m_fX, aGandlingSpawnLocs[0].m_fY, aGandlingSpawnLocs[0].m_fZ, aGandlingSpawnLocs[0].m_fO, TEMPSUMMON_DEAD_DESPAWN, 0)) + { if (!bByPlayerEnter) DoScriptText(SAY_GANDLING_SPAWN, pGandling); + } + } +} + +void instance_scholomance::HandlePortalEvent(uint32 uiEventId, uint32 uiData) +{ + GandlingEventMap::iterator find = m_mGandlingData.find(uiEventId); + if (find == m_mGandlingData.end()) + return; + + if (uiData == SPECIAL) + { + // Set current Event index + m_uiGandlingEvent = uiEventId; + + // Close door if needed + if (!find->second.m_bIsActive) + { + find->second.m_bIsActive = true; + DoUseDoorOrButton(find->second.m_uiDoorGUID); + } + } + // Toggle door and event state in case of state-switch + else + { + if (uiData == IN_PROGRESS && !find->second.m_bIsActive || + uiData == FAIL && find->second.m_bIsActive || + uiData == DONE && find->second.m_bIsActive) + { + find->second.m_bIsActive = !find->second.m_bIsActive; + DoUseDoorOrButton(find->second.m_uiDoorGUID); + } } } @@ -225,6 +255,22 @@ void instance_scholomance::OnCreatureEnterCombat(Creature* pCreature) case NPC_ALEXEI_BAROV: SetData(TYPE_ALEXEI_BAROV, IN_PROGRESS); break; case NPC_INSTRUCTOR_MALICIA: SetData(TYPE_MALICIA, IN_PROGRESS); break; case NPC_DARKMASTER_GANDLING: SetData(TYPE_GANDLING, IN_PROGRESS); break; + + case NPC_BONE_MINION: + for (GandlingEventMap::iterator itr = m_mGandlingData.begin(); itr != m_mGandlingData.end(); ++itr) + { + // if there are no minions for a room, skip it + if (!itr->second.m_sAddGuids.empty()) + { + // set data to fail in case of player death + if (itr->second.m_sAddGuids.find(pCreature->GetGUIDLow()) != itr->second.m_sAddGuids.end()) + { + HandlePortalEvent(itr->first, IN_PROGRESS); + break; + } + } + } + break; } } @@ -242,6 +288,22 @@ void instance_scholomance::OnCreatureEvade(Creature* pCreature) case NPC_ALEXEI_BAROV: SetData(TYPE_ALEXEI_BAROV, FAIL); break; case NPC_INSTRUCTOR_MALICIA: SetData(TYPE_MALICIA, FAIL); break; case NPC_DARKMASTER_GANDLING: SetData(TYPE_GANDLING, FAIL); break; + + case NPC_BONE_MINION: + for (GandlingEventMap::iterator itr = m_mGandlingData.begin(); itr != m_mGandlingData.end(); ++itr) + { + // if there are no minions for a room, skip it + if (!itr->second.m_sAddGuids.empty()) + { + // set data to fail in case of player death + if (itr->second.m_sAddGuids.find(pCreature->GetGUIDLow()) != itr->second.m_sAddGuids.end()) + { + HandlePortalEvent(itr->first, FAIL); + break; + } + } + } + break; } } @@ -259,6 +321,28 @@ void instance_scholomance::OnCreatureDeath(Creature* pCreature) case NPC_ALEXEI_BAROV: SetData(TYPE_ALEXEI_BAROV, DONE); break; case NPC_INSTRUCTOR_MALICIA: SetData(TYPE_MALICIA, DONE); break; case NPC_DARKMASTER_GANDLING: SetData(TYPE_GANDLING, DONE); break; + + case NPC_BONE_MINION: + for (GandlingEventMap::iterator itr = m_mGandlingData.begin(); itr != m_mGandlingData.end(); ++itr) + { + // if there are no minions for a room, skip it + if (!itr->second.m_sAddGuids.empty()) + { + // search for the dead minion and erase it + if (itr->second.m_sAddGuids.find(pCreature->GetGUIDLow()) != itr->second.m_sAddGuids.end()) + { + itr->second.m_sAddGuids.erase(pCreature->GetGUIDLow()); + + // if the current list is empty; set event id as done + if (itr->second.m_sAddGuids.empty()) + { + HandlePortalEvent(itr->first, DONE); + break; + } + } + } + } + break; } } @@ -267,6 +351,28 @@ InstanceData* GetInstanceData_instance_scholomance(Map* pMap) return new instance_scholomance(pMap); } +bool ProcessEventId_event_spell_gandling_shadow_portal(uint32 uiEventId, Object* pSource, Object* pTarget, bool bIsStart) +{ + if (pSource->GetTypeId() == TYPEID_UNIT) + { + if (instance_scholomance* pInstance = (instance_scholomance*)((Creature*)pSource)->GetInstanceData()) + { + // Check if we are handling an event associated with the room events of gandling + for (uint8 i = 0; i < MAX_EVENTS; i++) + { + if (uiEventId == aGandlingEvents[i]) + { + // Set data in progress for the current event and store current event + pInstance->HandlePortalEvent(uiEventId, SPECIAL); + // return false, to allow the DB-scripts to summon some NPCSs + return false; + } + } + } + } + return false; +} + void AddSC_instance_scholomance() { Script* pNewScript; @@ -275,4 +381,9 @@ void AddSC_instance_scholomance() pNewScript->Name = "instance_scholomance"; pNewScript->GetInstanceData = &GetInstanceData_instance_scholomance; pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "event_spell_gandling_shadow_portal"; + pNewScript->pProcessEventId = &ProcessEventId_event_spell_gandling_shadow_portal; + pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/scholomance/scholomance.h b/scripts/eastern_kingdoms/scholomance/scholomance.h index a906500e2..b42cec09c 100644 --- a/scripts/eastern_kingdoms/scholomance/scholomance.h +++ b/scripts/eastern_kingdoms/scholomance/scholomance.h @@ -8,6 +8,7 @@ enum { MAX_ENCOUNTER = 10, + MAX_EVENTS = 6, TYPE_KIRTONOS = 0, TYPE_RATTLEGORE = 1, @@ -30,6 +31,7 @@ enum NPC_ALEXEI_BAROV = 10504, NPC_INSTRUCTOR_MALICIA = 10505, NPC_DARKMASTER_GANDLING = 1853, + NPC_BONE_MINION = 16119, // summoned in random rooms by gandling GO_GATE_KIRTONOS = 175570, GO_VIEWING_ROOM_DOOR = 175167, // Must be opened in reload case @@ -42,19 +44,40 @@ enum GO_GATE_ILLUCIA = 177371, GO_GATE_GANDLING = 177374, + // Because the shadow portal teleport coordinates are guesswork (taken from old script) these IDs might be randomized + // TODO Syncronise with correct DB coordinates when they will be known + EVENT_ID_POLKELT = 5618, + EVENT_ID_THEOLEN = 5619, + EVENT_ID_MALICIA = 5620, + EVENT_ID_ILLUCIA = 5621, + EVENT_ID_BAROV = 5622, + EVENT_ID_RAVENIAN = 5623, + SAY_GANDLING_SPAWN = -1289000, }; -struct sSpawnLocation +struct SpawnLocation { float m_fX, m_fY, m_fZ, m_fO; }; -static const sSpawnLocation m_aGandlingSpawnLocs[1] = +static const SpawnLocation aGandlingSpawnLocs[1] = { {180.73f, -9.43856f, 75.507f, 1.61399f} }; +struct GandlingEventData +{ + GandlingEventData() : m_bIsActive(false), m_uiDoorGUID(0) {} + bool m_bIsActive; + uint64 m_uiDoorGUID; + std::set m_sAddGuids; +}; + +static const uint32 aGandlingEvents[MAX_EVENTS] = {EVENT_ID_POLKELT, EVENT_ID_THEOLEN, EVENT_ID_MALICIA, EVENT_ID_ILLUCIA, EVENT_ID_BAROV, EVENT_ID_RAVENIAN}; + +typedef std::map GandlingEventMap; + class MANGOS_DLL_DECL instance_scholomance : public ScriptedInstance { public: @@ -71,6 +94,8 @@ class MANGOS_DLL_DECL instance_scholomance : public ScriptedInstance void OnObjectCreate(GameObject* pGo); void OnPlayerEnter(Player* pPlayer); + void HandlePortalEvent(uint32 uiEventId, uint32 uiData); + void SetData(uint32 uiType, uint32 uiData); uint32 GetData(uint32 uiType); @@ -87,13 +112,10 @@ class MANGOS_DLL_DECL instance_scholomance : public ScriptedInstance uint64 m_uiGateKirtonosGUID; uint64 m_uiGateRasGUID; - uint64 m_uiGateMiliciaGUID; - uint64 m_uiGateTheolenGUID; - uint64 m_uiGatePolkeltGUID; - uint64 m_uiGateRavenianGUID; - uint64 m_uiGateBarovGUID; - uint64 m_uiGateIlluciaGUID; uint64 m_uiGateGandlingGUID; + + uint32 m_uiGandlingEvent; + GandlingEventMap m_mGandlingData; }; #endif diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index df52777a1..1ace88bcf 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2069" + #define SD2_REVISION_NR "2070" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 6558bc256..84cf01f90 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -917,6 +917,14 @@ UPDATE creature_template SET ScriptName='boss_vectus' WHERE entry=10432; UPDATE creature_template SET ScriptName='boss_jandice_barov' WHERE entry=10503; UPDATE creature_template SET ScriptName='boss_kormok' WHERE entry=16118; UPDATE creature_template SET ScriptName='mob_illusionofjandicebarov' WHERE entry=11439; +DELETE FROM scripted_event_id WHERE id IN (5618, 5619, 5620, 5621, 5622, 5623); +INSERT INTO scripted_event_id VALUES +(5618,'event_spell_gandling_shadow_portal'), +(5619,'event_spell_gandling_shadow_portal'), +(5620,'event_spell_gandling_shadow_portal'), +(5621,'event_spell_gandling_shadow_portal'), +(5622,'event_spell_gandling_shadow_portal'), +(5623,'event_spell_gandling_shadow_portal'); /* SEARING GORGE */ UPDATE creature_template SET ScriptName='npc_kalaran_windblade' WHERE entry=8479; diff --git a/sql/updates/r2070_mangos.sql b/sql/updates/r2070_mangos.sql new file mode 100644 index 000000000..523ce0229 --- /dev/null +++ b/sql/updates/r2070_mangos.sql @@ -0,0 +1,8 @@ +DELETE FROM scripted_event_id WHERE id IN (5618, 5619, 5620, 5621, 5622, 5623); +INSERT INTO scripted_event_id VALUES +(5618,'event_spell_gandling_shadow_portal'), +(5619,'event_spell_gandling_shadow_portal'), +(5620,'event_spell_gandling_shadow_portal'), +(5621,'event_spell_gandling_shadow_portal'), +(5622,'event_spell_gandling_shadow_portal'), +(5623,'event_spell_gandling_shadow_portal'); From 918201450ee8f3fd5cad48e976bfb378e28f1b88 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Thu, 5 May 2011 17:38:42 +0200 Subject: [PATCH 0050/1172] [2071] Fix Typos * Fix Typo in Scholo, introduced in Rev [2070] * Fix Typo in Dire Maul, thanks to Xfurry for pointing Signed-off-by: Schmoozerd --- scripts/eastern_kingdoms/scholomance/scholomance.h | 2 +- scripts/kalimdor/dire_maul/instance_dire_maul.cpp | 4 ++-- sd2_revision_nr.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/eastern_kingdoms/scholomance/scholomance.h b/scripts/eastern_kingdoms/scholomance/scholomance.h index b42cec09c..9b6868ca4 100644 --- a/scripts/eastern_kingdoms/scholomance/scholomance.h +++ b/scripts/eastern_kingdoms/scholomance/scholomance.h @@ -71,7 +71,7 @@ struct GandlingEventData GandlingEventData() : m_bIsActive(false), m_uiDoorGUID(0) {} bool m_bIsActive; uint64 m_uiDoorGUID; - std::set m_sAddGuids; + std::set m_sAddGuids; }; static const uint32 aGandlingEvents[MAX_EVENTS] = {EVENT_ID_POLKELT, EVENT_ID_THEOLEN, EVENT_ID_MALICIA, EVENT_ID_ILLUCIA, EVENT_ID_BAROV, EVENT_ID_RAVENIAN}; diff --git a/scripts/kalimdor/dire_maul/instance_dire_maul.cpp b/scripts/kalimdor/dire_maul/instance_dire_maul.cpp index 2428861e7..75b2509bc 100644 --- a/scripts/kalimdor/dire_maul/instance_dire_maul.cpp +++ b/scripts/kalimdor/dire_maul/instance_dire_maul.cpp @@ -98,7 +98,7 @@ void instance_dire_maul::OnObjectCreate(GameObject* pGo) // East case GO_CRUMBLE_WALL: m_uiCrumbleWallGUID = pGo->GetGUID(); - if (m_bWallDestroyed) + if (m_bWallDestroyed || m_auiEncounter[TYPE_ALZZIN] == DONE) pGo->SetGoState(GO_STATE_ACTIVE); break; case GO_CORRUPT_VINE: @@ -225,7 +225,7 @@ void instance_dire_maul::SetData(uint32 uiType, uint32 uiData) break; } - if (uiData >= DONE) + if (uiData == DONE) { OUT_SAVE_INST_DATA; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 1ace88bcf..6fb5343b7 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2070" + #define SD2_REVISION_NR "2071" #endif // __SD2_REVISION_NR_H__ From 00e1d2ef11cc77efe83ccffc19e1344987aa853a Mon Sep 17 00:00:00 2001 From: Xfurry Date: Thu, 5 May 2011 17:42:28 +0200 Subject: [PATCH 0051/1172] [2072] Cleanup and improve AQ20 instance script * Add instance script to ScriptLoader * Cleanup instance script * Move to header based * Remove wrong IsEncounterInProgress * Better summoning of General Andorov (coords are still wrong) * Add SetData hooks for all bosses (widely unused) Signed-off-by: Schmoozerd --- .../instance_ruins_of_ahnqiraj.cpp | 315 ++++++++++-------- .../ruins_of_ahnqiraj/ruins_of_ahnqiraj.h | 124 +++++-- sd2_revision_nr.h | 2 +- sql/scriptdev2_script_full.sql | 2 +- sql/updates/r2072_scriptdev2.sql | 1 + system/ScriptLoader.cpp | 2 + 6 files changed, 273 insertions(+), 173 deletions(-) create mode 100644 sql/updates/r2072_scriptdev2.sql diff --git a/scripts/kalimdor/ruins_of_ahnqiraj/instance_ruins_of_ahnqiraj.cpp b/scripts/kalimdor/ruins_of_ahnqiraj/instance_ruins_of_ahnqiraj.cpp index 7a42f4a9e..36a7a9e0b 100644 --- a/scripts/kalimdor/ruins_of_ahnqiraj/instance_ruins_of_ahnqiraj.cpp +++ b/scripts/kalimdor/ruins_of_ahnqiraj/instance_ruins_of_ahnqiraj.cpp @@ -24,172 +24,210 @@ EndScriptData */ #include "precompiled.h" #include "ruins_of_ahnqiraj.h" +instance_ruins_of_ahnqiraj::instance_ruins_of_ahnqiraj(Map* pMap) : ScriptedInstance(pMap), + m_uiOssirianGUID(0), + m_uiBuruGUID(0), + m_uiKurinnaxxGUID(0), + m_uiAndorovGUID(0), + m_uiQeezGUID(0), + m_uiTuubidGUID(0), + m_uiDrennGUID(0), + m_uiXurremGUID(0), + m_uiYeggethGUID(0), + m_uiPakkonGUID(0), + m_uiZerranGUID(0), + m_uiRajaxxGUID(0) +{ + Initialize(); +} + +void instance_ruins_of_ahnqiraj::Initialize() +{ + memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); +} -struct MANGOS_DLL_DECL instance_ruins_of_ahnqiraj : public ScriptedInstance +void instance_ruins_of_ahnqiraj::OnPlayerEnter(Player* pPlayer) { - instance_ruins_of_ahnqiraj(Map* pMap) : ScriptedInstance(pMap) {Initialize();} - - std::string strInstData; - uint32 m_auiEncounter[MAX_ENCOUNTER]; - - uint64 m_uiOssirianGUID; - uint64 m_uiBuruGUID; - uint64 m_uiKurinnaxxGUID; - uint64 m_uiAndorovGUID; - uint64 m_uiRajaxxGUID; - uint64 m_uiQeezGUID; - uint64 m_uiTuubidGUID; - uint64 m_uiDrennGUID; - uint64 m_uiXurremGUID; - uint64 m_uiYeggethGUID; - uint64 m_uiPakkonGUID; - uint64 m_uiZerranGUID; - - void Initialize() + // Spawn andorov if necessary + DoSapwnAndorovIfCan(); +} + +void instance_ruins_of_ahnqiraj::OnCreatureCreate(Creature* pCreature) +{ + switch(pCreature->GetEntry()) { - memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); - - m_uiOssirianGUID = 0; - m_uiBuruGUID = 0; - m_uiKurinnaxxGUID = 0; - m_uiAndorovGUID = 0; - m_uiQeezGUID = 0; - m_uiTuubidGUID = 0; - m_uiDrennGUID = 0; - m_uiXurremGUID = 0; - m_uiYeggethGUID = 0; - m_uiPakkonGUID = 0; - m_uiZerranGUID = 0; - m_uiRajaxxGUID = 0; + case NPC_OSSIRIAN: m_uiOssirianGUID = pCreature->GetGUID(); break; + case NPC_BURU: m_uiBuruGUID = pCreature->GetGUID(); break; + case NPC_KURINNAXX: m_uiKurinnaxxGUID = pCreature->GetGUID(); break; + case NPC_GENERAL_ANDOROV: m_uiAndorovGUID = pCreature->GetGUID(); break; + case NPC_CAPTAIN_QEEZ: m_uiQeezGUID = pCreature->GetGUID(); break; + case NPC_CAPTAIN_TUUBID: m_uiTuubidGUID = pCreature->GetGUID(); break; + case NPC_CAPTAIN_DRENN: m_uiDrennGUID = pCreature->GetGUID(); break; + case NPC_CAPTAIN_XURREM: m_uiXurremGUID = pCreature->GetGUID(); break; + case NPC_MAJOR_YEGGETH: m_uiYeggethGUID = pCreature->GetGUID(); break; + case NPC_MAJOR_PAKKON: m_uiPakkonGUID = pCreature->GetGUID(); break; + case NPC_COLONEL_ZERRAN: m_uiZerranGUID = pCreature->GetGUID(); break; + case NPC_RAJAXX: m_uiRajaxxGUID = pCreature->GetGUID(); break; } +} - void OnCreatureCreate(Creature* pCreature) +void instance_ruins_of_ahnqiraj::OnObjectCreate(GameObject* pGo) +{ + switch(pGo->GetEntry()) { - switch(pCreature->GetEntry()) - { - case NPC_OSSIRIAN: m_uiOssirianGUID = pCreature->GetGUID(); break; - case NPC_BURU: m_uiBuruGUID = pCreature->GetGUID(); break; - case NPC_KURINNAXX: m_uiKurinnaxxGUID = pCreature->GetGUID(); break; - case NPC_GENERAL_ANDOROV: m_uiAndorovGUID = pCreature->GetGUID(); break; - case NPC_CAPTAIN_QEEZ: m_uiQeezGUID = pCreature->GetGUID(); break; - case NPC_CAPTAIN_TUUBID: m_uiTuubidGUID = pCreature->GetGUID(); break; - case NPC_CAPTAIN_DRENN: m_uiDrennGUID = pCreature->GetGUID(); break; - case NPC_CAPTAIN_XURREM: m_uiXurremGUID = pCreature->GetGUID(); break; - case NPC_MAJOR_YEGGETH: m_uiYeggethGUID = pCreature->GetGUID(); break; - case NPC_MAJOR_PAKKON: m_uiPakkonGUID = pCreature->GetGUID(); break; - case NPC_COLONEL_ZERRAN: m_uiZerranGUID = pCreature->GetGUID(); break; - case NPC_RAJAXX: m_uiRajaxxGUID = pCreature->GetGUID(); break; - } + // Make them unusable temporarily + case GO_OSSIRIAN_CRYSTAL: pGo->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_INTERACT_COND); break; } +} - void OnObjectCreate(GameObject* pGo) +void instance_ruins_of_ahnqiraj::OnCreatureEnterCombat(Creature* pCreature) +{ + switch (pCreature->GetEntry()) { - switch(pGo->GetEntry()) - { - case GO_OSSIRIAN_CRYSTAL: pGo->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_INTERACT_COND); break; //to make them unusable temporarily - } + case NPC_KURINNAXX: SetData(TYPE_KURINNAXX, IN_PROGRESS); break; + case NPC_RAJAXX: SetData(TYPE_RAJAXX, IN_PROGRESS); break; + case NPC_MOAM: SetData(TYPE_MOAM, IN_PROGRESS); break; + case NPC_BURU: SetData(TYPE_BURU, IN_PROGRESS); break; + case NPC_AYAMISS: SetData(TYPE_AYAMISS, IN_PROGRESS); break; + case NPC_OSSIRIAN: SetData(TYPE_OSSIRIAN, IN_PROGRESS); break; } +} - bool IsEncounterInProgress() const +void instance_ruins_of_ahnqiraj::OnCreatureEvade(Creature* pCreature) +{ + switch (pCreature->GetEntry()) { - for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) - if (m_auiEncounter[i] == IN_PROGRESS) - return true; - - return false; + case NPC_KURINNAXX: SetData(TYPE_KURINNAXX, FAIL); break; + case NPC_RAJAXX: SetData(TYPE_RAJAXX, FAIL); break; + case NPC_MOAM: SetData(TYPE_MOAM, FAIL); break; + case NPC_BURU: SetData(TYPE_BURU, FAIL); break; + case NPC_AYAMISS: SetData(TYPE_AYAMISS, FAIL); break; + case NPC_OSSIRIAN: SetData(TYPE_OSSIRIAN, FAIL); break; } +} - const char* Save() +void instance_ruins_of_ahnqiraj::OnCreatureDeath(Creature* pCreature) +{ + switch (pCreature->GetEntry()) { - return strInstData.c_str(); + case NPC_KURINNAXX: SetData(TYPE_KURINNAXX, DONE); break; + case NPC_RAJAXX: SetData(TYPE_RAJAXX, DONE); break; + case NPC_MOAM: SetData(TYPE_MOAM, DONE); break; + case NPC_BURU: SetData(TYPE_BURU, DONE); break; + case NPC_AYAMISS: SetData(TYPE_AYAMISS, DONE); break; + case NPC_OSSIRIAN: SetData(TYPE_OSSIRIAN, DONE); break; } +} - uint64 GetData64(uint32 uiData) +void instance_ruins_of_ahnqiraj::SetData(uint32 uiType, uint32 uiData) +{ + switch(uiType) { - switch(uiData) - { - case DATA_OSSIRIAN: return m_uiOssirianGUID; - case DATA_BURU: return m_uiBuruGUID; - case DATA_ANDOROV: return m_uiAndorovGUID; - case DATA_KURINNAXX: return m_uiKurinnaxxGUID; - case DATA_QEEZ: return m_uiQeezGUID; - case DATA_TUUBID: return m_uiTuubidGUID; - case DATA_DRENN: return m_uiDrennGUID; - case DATA_XURREM: return m_uiXurremGUID; - case DATA_YEGGETH: return m_uiYeggethGUID; - case DATA_PAKKON: return m_uiPakkonGUID; - case DATA_ZERRAN: return m_uiZerranGUID; - case DATA_RAJAXX: return m_uiRajaxxGUID; - } - return 0; + case TYPE_KURINNAXX: + if (uiData == DONE) + { + DoSapwnAndorovIfCan(); + + // Yell after kurinnaxx + if (Creature* pOssirian = instance->GetCreature(m_uiOssirianGUID)) + DoScriptText(SAY_OSSIRIAN_INTRO, pOssirian); + } + m_auiEncounter[uiType] = uiData; + break; + case TYPE_RAJAXX: + case TYPE_MOAM: + case TYPE_BURU: + case TYPE_AYAMISS: + case TYPE_OSSIRIAN: + m_auiEncounter[uiType] = uiData; + break; } - void SetData(uint32 uiType, uint32 uiData) + if (uiData == DONE) { - switch(uiType) - { - case TYPE_RAJAXX: - m_auiEncounter[0] = uiData; - break; - case TYPE_KURINNAXX: - m_auiEncounter[1] = uiData; - break; - } - - if (uiData == DONE) - { - OUT_SAVE_INST_DATA; - - std::ostringstream saveStream; - saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " "; - - strInstData = saveStream.str(); - - SaveToDB(); - OUT_SAVE_INST_DATA_COMPLETE; - } + OUT_SAVE_INST_DATA; + + std::ostringstream saveStream; + saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2] + << " " << m_auiEncounter[3] << " " << m_auiEncounter[4] << " " << m_auiEncounter[5]; + + m_strInstData = saveStream.str(); + + SaveToDB(); + OUT_SAVE_INST_DATA_COMPLETE; } +} - void Load(const char* chrIn) - { - if (!chrIn) - { - OUT_LOAD_INST_DATA_FAIL; - return; - } +uint32 instance_ruins_of_ahnqiraj::GetData(uint32 uiType) +{ + if (uiType < MAX_ENCOUNTER) + return m_auiEncounter[uiType]; + + return 0; +} - OUT_LOAD_INST_DATA(chrIn); +void instance_ruins_of_ahnqiraj::DoSapwnAndorovIfCan() +{ + // The npc is also a vendor so always spawn after kurinnaxx + if (m_auiEncounter[TYPE_KURINNAXX] != DONE) + return; - std::istringstream loadStream(chrIn); + if (m_uiAndorovGUID) + return; - loadStream >> m_auiEncounter[0] >> m_auiEncounter[1]; + Player* pPlayer = GetPlayerInMap(); + if (!pPlayer) + return; - for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) - { - if (m_auiEncounter[i] == IN_PROGRESS) - m_auiEncounter[i] = NOT_STARTED; - } + for (uint8 i = 0; i < MAX_HELPERS; i++) + pPlayer->SummonCreature(aAndorovSpawnLocs[i].m_uiEntry, aAndorovSpawnLocs[i].m_fX, aAndorovSpawnLocs[i].m_fY, aAndorovSpawnLocs[i].m_fZ, aAndorovSpawnLocs[i].m_fO, TEMPSUMMON_DEAD_DESPAWN, 0); +} - OUT_LOAD_INST_DATA_COMPLETE; +uint64 instance_ruins_of_ahnqiraj::GetData64(uint32 uiData) +{ + switch(uiData) + { + case NPC_OSSIRIAN: return m_uiOssirianGUID; + case NPC_BURU: return m_uiBuruGUID; + case NPC_GENERAL_ANDOROV: return m_uiAndorovGUID; + case NPC_KURINNAXX: return m_uiKurinnaxxGUID; + case NPC_CAPTAIN_QEEZ: return m_uiQeezGUID; + case NPC_CAPTAIN_TUUBID: return m_uiTuubidGUID; + case NPC_CAPTAIN_DRENN: return m_uiDrennGUID; + case NPC_CAPTAIN_XURREM: return m_uiXurremGUID; + case NPC_MAJOR_YEGGETH: return m_uiYeggethGUID; + case NPC_MAJOR_PAKKON: return m_uiPakkonGUID; + case NPC_COLONEL_ZERRAN: return m_uiZerranGUID; + case NPC_RAJAXX: return m_uiRajaxxGUID; + + default: + return 0; + } +} - //spawn andorov on load - if (m_auiEncounter[0] == DONE) - if (Creature* pRajaxx = instance->GetCreature(m_uiRajaxxGUID)) - pRajaxx->SummonCreature(NPC_GENERAL_ANDOROV, -8873.42f, 1647.67f, 21.386f, 5.69141f, TEMPSUMMON_CORPSE_DESPAWN, 0); +void instance_ruins_of_ahnqiraj::Load(const char* chrIn) +{ + if (!chrIn) + { + OUT_LOAD_INST_DATA_FAIL; + return; } - uint32 GetData(uint32 uiType) + OUT_LOAD_INST_DATA(chrIn); + + std::istringstream loadStream(chrIn); + + loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] + >> m_auiEncounter[3] >> m_auiEncounter[4] >> m_auiEncounter[5]; + + for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) { - switch(uiType) - { - case TYPE_RAJAXX: - return m_auiEncounter[0]; - case TYPE_KURINNAXX: - return m_auiEncounter[1]; - } - return 0; + if (m_auiEncounter[i] == IN_PROGRESS) + m_auiEncounter[i] = NOT_STARTED; } -}; + + OUT_LOAD_INST_DATA_COMPLETE; +} InstanceData* GetInstanceData_instance_ruins_of_ahnqiraj(Map* pMap) { @@ -198,9 +236,10 @@ InstanceData* GetInstanceData_instance_ruins_of_ahnqiraj(Map* pMap) void AddSC_instance_ruins_of_ahnqiraj() { - Script* newscript; - newscript = new Script; - newscript->Name = "instance_ruins_of_ahnqiraj"; - newscript->GetInstanceData = &GetInstanceData_instance_ruins_of_ahnqiraj; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "instance_ruins_of_ahnqiraj"; + pNewScript->GetInstanceData = &GetInstanceData_instance_ruins_of_ahnqiraj; + pNewScript->RegisterSelf(); } diff --git a/scripts/kalimdor/ruins_of_ahnqiraj/ruins_of_ahnqiraj.h b/scripts/kalimdor/ruins_of_ahnqiraj/ruins_of_ahnqiraj.h index 999551b61..68f8dd760 100644 --- a/scripts/kalimdor/ruins_of_ahnqiraj/ruins_of_ahnqiraj.h +++ b/scripts/kalimdor/ruins_of_ahnqiraj/ruins_of_ahnqiraj.h @@ -7,38 +7,96 @@ enum { - MAX_ENCOUNTER = 2, - - DATA_OSSIRIAN = 1, - DATA_BURU = 2, - DATA_ANDOROV = 3, - DATA_KURINNAXX = 4, - DATA_QEEZ = 5, - DATA_TUUBID = 6, - DATA_DRENN = 7, - DATA_XURREM = 8, - DATA_YEGGETH = 9, - DATA_PAKKON = 10, - DATA_ZERRAN = 11, - DATA_RAJAXX = 12, - - TYPE_RAJAXX = 13, - TYPE_KURINNAXX = 14, - - NPC_OSSIRIAN = 15339, - NPC_BURU = 15370, - NPC_KALDOREI_ELITE = 15473, - NPC_GENERAL_ANDOROV = 15471, - NPC_RAJAXX = 15341, - NPC_KURINNAXX = 15348, - NPC_COLONEL_ZERRAN = 15385, - NPC_MAJOR_PAKKON = 15388, - NPC_MAJOR_YEGGETH = 15386, - NPC_CAPTAIN_XURREM = 15390, - NPC_CAPTAIN_DRENN = 15389, - NPC_CAPTAIN_TUUBID = 15392, - NPC_CAPTAIN_QEEZ = 15391, - - GO_OSSIRIAN_CRYSTAL = 180619 + MAX_ENCOUNTER = 6, + MAX_HELPERS = 5, + + TYPE_KURINNAXX = 0, + TYPE_RAJAXX = 1, + TYPE_MOAM = 2, + TYPE_BURU = 3, + TYPE_AYAMISS = 4, + TYPE_OSSIRIAN = 5, + + NPC_KURINNAXX = 15348, + NPC_MOAM = 15340, + NPC_BURU = 15370, + NPC_AYAMISS = 15369, + NPC_OSSIRIAN = 15339, + NPC_GENERAL_ANDOROV = 15471, // The general and the kaldorei are escorted for the rajaxx encounter + NPC_KALDOREI_ELITE = 15473, + NPC_RAJAXX = 15341, // All of the following are used in the rajaxx encounter + NPC_COLONEL_ZERRAN = 15385, + NPC_MAJOR_PAKKON = 15388, + NPC_MAJOR_YEGGETH = 15386, + NPC_CAPTAIN_XURREM = 15390, + NPC_CAPTAIN_DRENN = 15389, + NPC_CAPTAIN_TUUBID = 15392, + NPC_CAPTAIN_QEEZ = 15391, + + GO_OSSIRIAN_CRYSTAL = 180619, // Used in the ossirian encounter + + SAY_OSSIRIAN_INTRO = -1509022 // Yelled after Kurinnax dies +}; + +struct SpawnLocation +{ + uint32 m_uiEntry; + float m_fX, m_fY, m_fZ, m_fO; +}; + +// These positions are likely wrong, and the npcs need some movement to these coords +// TODO Research proper positions +static const SpawnLocation aAndorovSpawnLocs[MAX_HELPERS] = +{ + {NPC_GENERAL_ANDOROV, -8876.97f, 1651.96f, 21.57f, 5.52f}, + {NPC_KALDOREI_ELITE, -8875.47f, 1653.51f, 21.57f, 5.32f}, + {NPC_KALDOREI_ELITE, -8873.96f, 1655.06f, 21.57f, 5.13f}, + {NPC_KALDOREI_ELITE, -8878.26f, 1650.63f, 21.57f, 5.7f}, + {NPC_KALDOREI_ELITE, -8879.46f, 1649.39f, 21.57f, 5.85f} +}; + +class MANGOS_DLL_DECL instance_ruins_of_ahnqiraj : public ScriptedInstance +{ + public: + instance_ruins_of_ahnqiraj(Map* pMap); + ~instance_ruins_of_ahnqiraj() {} + + void Initialize(); + + // bool IsEncounterInProgress() const; // not active in AQ20 + + void OnCreatureCreate(Creature* pCreature); + void OnObjectCreate(GameObject* pGo); + void OnPlayerEnter(Player* pPlayer); + + void OnCreatureEnterCombat(Creature* pCreature); + void OnCreatureEvade(Creature* pCreature); + void OnCreatureDeath(Creature* pCreature); + + void SetData(uint32 uiType, uint32 uiData); + uint32 GetData(uint32 uiType); + uint64 GetData64(uint32 uiData); + + const char* Save() { return m_strInstData.c_str(); } + void Load(const char* chrIn); + + private: + void DoSapwnAndorovIfCan(); + + uint32 m_auiEncounter[MAX_ENCOUNTER]; + std::string m_strInstData; + + uint64 m_uiOssirianGUID; + uint64 m_uiBuruGUID; + uint64 m_uiKurinnaxxGUID; + uint64 m_uiAndorovGUID; + uint64 m_uiRajaxxGUID; + uint64 m_uiQeezGUID; + uint64 m_uiTuubidGUID; + uint64 m_uiDrennGUID; + uint64 m_uiXurremGUID; + uint64 m_uiYeggethGUID; + uint64 m_uiPakkonGUID; + uint64 m_uiZerranGUID; }; #endif diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 6fb5343b7..1324d88b5 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2071" + #define SD2_REVISION_NR "2072" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 890952299..879bd9661 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -1120,7 +1120,7 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1509019,'My powers are renewed!',8595,1,0,0,'ossirian SAY_SURPREME2'), (-1509020,'My powers return!',8596,1,0,0,'ossirian SAY_SURPREME3'), (-1509021,'Protect the city at all costs!',8597,1,0,0,'ossirian SAY_RAND_INTRO1'), -(-1509022,'The walls have been breached!',8599,1,0,0,'ossirian SAY_RAND_INTRO2'), +(-1509022,'The walls have been breached!',8599,6,0,0,'ossirian SAY_RAND_INTRO2'), (-1509023,'To your posts. Defend the city.',8600,1,0,0,'ossirian SAY_RAND_INTRO3'), (-1509024,'Tresspassers will be terminated.',8601,1,0,0,'ossirian SAY_RAND_INTRO4'), (-1509025,'Sands of the desert rise and block out the sun!',8598,1,0,0,'ossirian SAY_AGGRO'), diff --git a/sql/updates/r2072_scriptdev2.sql b/sql/updates/r2072_scriptdev2.sql new file mode 100644 index 000000000..f3c2a1c87 --- /dev/null +++ b/sql/updates/r2072_scriptdev2.sql @@ -0,0 +1 @@ +UPDATE script_texts SET type=6 WHERE entry=-1509022; diff --git a/system/ScriptLoader.cpp b/system/ScriptLoader.cpp index f30904e11..61524e92b 100644 --- a/system/ScriptLoader.cpp +++ b/system/ScriptLoader.cpp @@ -231,6 +231,7 @@ extern void AddSC_boss_ayamiss(); // ruins_of_ahnqiraj extern void AddSC_boss_kurinnaxx(); extern void AddSC_boss_moam(); extern void AddSC_ruins_of_ahnqiraj(); +extern void AddSC_instance_ruins_of_ahnqiraj(); extern void AddSC_boss_cthun(); // temple_of_ahnqiraj extern void AddSC_boss_fankriss(); extern void AddSC_boss_huhuran(); @@ -721,6 +722,7 @@ void AddScripts() AddSC_boss_kurinnaxx(); AddSC_boss_moam(); AddSC_ruins_of_ahnqiraj(); + AddSC_instance_ruins_of_ahnqiraj(); AddSC_boss_cthun(); // temple_of_ahnqiraj AddSC_boss_fankriss(); AddSC_boss_huhuran(); From 265fbda9d96c9549f0a8a7ee8684831830a29907 Mon Sep 17 00:00:00 2001 From: NoFantasy Date: Fri, 6 May 2011 09:10:17 +0200 Subject: [PATCH 0052/1172] [2073] Add script to support quest 12261 Note: see code comments, script may not be as correct as it should be. Signed-off-by: NoFantasy --- scripts/northrend/dragonblight.cpp | 196 +++++++++++++++++++++++++---- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 + sql/scriptdev2_script_full.sql | 5 +- sql/updates/r2073_mangos.sql | 1 + sql/updates/r2073_scriptdev2.sql | 4 + 6 files changed, 180 insertions(+), 29 deletions(-) create mode 100644 sql/updates/r2073_mangos.sql create mode 100644 sql/updates/r2073_scriptdev2.sql diff --git a/scripts/northrend/dragonblight.cpp b/scripts/northrend/dragonblight.cpp index a315b3164..61e613833 100644 --- a/scripts/northrend/dragonblight.cpp +++ b/scripts/northrend/dragonblight.cpp @@ -17,14 +17,14 @@ /* ScriptData SDName: Dragonblight SD%Complete: 100 -SDComment: Quest support: 12166, 12499/12500(end sequenze). Taxi paths Wyrmrest temple. +SDComment: Quest support: 12166, 12261, 12499/12500(end sequenze). Taxi paths Wyrmrest temple. SDCategory: Dragonblight EndScriptData */ /* ContentData npc_afrasastrasz npc_alexstrasza_wr_gate -npc_liquid_fire_of_elune +npc_destructive_ward npc_tariolstrasz npc_torastrasza EndContentData */ @@ -107,6 +107,143 @@ bool GossipSelect_npc_alexstrasza_wr_gate(Player* pPlayer, Creature* pCreature, return true; } +/*##### +# npc_destructive_ward +#####*/ + +enum +{ + SAY_WARD_POWERUP = -1000664, + SAY_WARD_CHARGED = -1000665, + + SPELL_DESTRUCTIVE_PULSE = 48733, + SPELL_DESTRUCTIVE_BARRAGE = 48734, + SPELL_DESTRUCTIVE_WARD_POWERUP = 48735, + + SPELL_SUMMON_SMOLDERING_SKELETON = 48715, + SPELL_SUMMON_SMOLDERING_CONSTRUCT = 48718, + SPELL_DESTRUCTIVE_WARD_KILL_CREDIT = 52409, + + MAX_STACK = 1, +}; + +// Script is based on real event from you-know-where. +// Some sources show the event in a bit different way, for unknown reason. +// Devs decided to add it in the below way, until more details can be obtained. + +// It will be only two power-up's, where other sources has a different count (2-4 stacks has been observed) +// Probably caused by either a change in a patch (bugfix?) or the powerup has a condition (some +// sources suggest this, but without any explanation about what this might be) + +struct MANGOS_DLL_DECL npc_destructive_wardAI : public Scripted_NoMovementAI +{ + npc_destructive_wardAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) + { + m_uiPowerTimer = 30000; + m_uiStack = 0; + m_uiSummonTimer = 2000; + m_bCanPulse = false; + m_bFirst = true; + Reset(); + } + + uint32 m_uiPowerTimer; + uint32 m_uiStack; + uint32 m_uiSummonTimer; + bool m_bFirst; + bool m_bCanPulse; + + void Reset() { } + + void JustSummoned(Creature* pSummoned) + { + pSummoned->AI()->AttackStart(m_creature); + } + + void UpdateAI(const uint32 uiDiff) + { + if (m_bCanPulse) + { + if (DoCastSpellIfCan(m_creature, m_uiStack > MAX_STACK ? SPELL_DESTRUCTIVE_BARRAGE : SPELL_DESTRUCTIVE_PULSE) == CAST_OK) + m_bCanPulse = false; + } + + if (m_uiSummonTimer) + { + if (m_uiSummonTimer <= uiDiff) + { + if (m_bFirst) + m_uiSummonTimer = 25000; + else + m_uiSummonTimer = 0; + + switch(m_uiStack) + { + case 0: + DoCastSpellIfCan(m_creature, SPELL_SUMMON_SMOLDERING_SKELETON, CAST_TRIGGERED); + break; + case 1: + DoCastSpellIfCan(m_creature, SPELL_SUMMON_SMOLDERING_CONSTRUCT, CAST_TRIGGERED); + + if (m_bFirst) + break; + + DoCastSpellIfCan(m_creature, SPELL_SUMMON_SMOLDERING_CONSTRUCT, CAST_TRIGGERED); + break; + case 2: + if (m_bFirst) + break; + + DoCastSpellIfCan(m_creature, SPELL_SUMMON_SMOLDERING_SKELETON, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_SUMMON_SMOLDERING_SKELETON, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_SUMMON_SMOLDERING_CONSTRUCT, CAST_TRIGGERED); + break; + } + + m_bFirst = !m_bFirst; + } + else + m_uiSummonTimer -= uiDiff; + } + + if (!m_uiPowerTimer) + return; + + if (m_uiPowerTimer <= uiDiff) + { + if (m_uiStack > MAX_STACK) + { + if (DoCastSpellIfCan(m_creature, SPELL_DESTRUCTIVE_WARD_KILL_CREDIT) == CAST_OK) + { + DoScriptText(SAY_WARD_CHARGED, m_creature, m_creature->GetOwner()); + m_uiPowerTimer = 0; + m_uiSummonTimer = 0; + m_bCanPulse = true; + } + } + else if (DoCastSpellIfCan(m_creature, SPELL_DESTRUCTIVE_WARD_POWERUP) == CAST_OK) + { + DoScriptText(SAY_WARD_POWERUP, m_creature, m_creature->GetOwner()); + + m_uiPowerTimer = 30000; + m_uiSummonTimer = 2000; + + m_bFirst = true; + m_bCanPulse = true; // pulse right after each charge + + ++m_uiStack; + } + } + else + m_uiPowerTimer -= uiDiff; + } +}; + +CreatureAI* GetAI_npc_destructive_ward(Creature* pCreature) +{ + return new npc_destructive_wardAI(pCreature); +} + /*###### ## npc_tariolstrasz ######*/ @@ -191,29 +328,34 @@ bool GossipSelect_npc_torastrasza(Player* pPlayer, Creature* pCreature, uint32 u void AddSC_dragonblight() { - Script *newscript; - - newscript = new Script; - newscript->Name = "npc_afrasastrasz"; - newscript->pGossipHello = &GossipHello_npc_afrasastrasz; - newscript->pGossipSelect = &GossipSelect_npc_afrasastrasz; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_alexstrasza_wr_gate"; - newscript->pGossipHello = &GossipHello_npc_alexstrasza_wr_gate; - newscript->pGossipSelect = &GossipSelect_npc_alexstrasza_wr_gate; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_tariolstrasz"; - newscript->pGossipHello = &GossipHello_npc_tariolstrasz; - newscript->pGossipSelect = &GossipSelect_npc_tariolstrasz; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_torastrasza"; - newscript->pGossipHello = &GossipHello_npc_torastrasza; - newscript->pGossipSelect = &GossipSelect_npc_torastrasza; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "npc_afrasastrasz"; + pNewScript->pGossipHello = &GossipHello_npc_afrasastrasz; + pNewScript->pGossipSelect = &GossipSelect_npc_afrasastrasz; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_alexstrasza_wr_gate"; + pNewScript->pGossipHello = &GossipHello_npc_alexstrasza_wr_gate; + pNewScript->pGossipSelect = &GossipSelect_npc_alexstrasza_wr_gate; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_destructive_ward"; + pNewScript->GetAI = &GetAI_npc_destructive_ward; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_tariolstrasz"; + pNewScript->pGossipHello = &GossipHello_npc_tariolstrasz; + pNewScript->pGossipSelect = &GossipSelect_npc_tariolstrasz; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_torastrasza"; + pNewScript->pGossipHello = &GossipHello_npc_torastrasza; + pNewScript->pGossipSelect = &GossipSelect_npc_torastrasza; + pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 1324d88b5..0e374cd2a 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2072" + #define SD2_REVISION_NR "2073" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 84cf01f90..a014678d7 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -497,6 +497,7 @@ UPDATE instance_template SET ScriptName='instance_dire_maul' WHERE map=429; /* DRAGONBLIGHT */ UPDATE creature_template SET ScriptName='npc_afrasastrasz' WHERE entry=27575; UPDATE creature_template SET ScriptName='npc_alexstrasza_wr_gate' WHERE entry=31333; +UPDATE creature_template SET ScriptName='npc_destructive_ward' WHERE entry=27430; UPDATE creature_template SET ScriptName='npc_tariolstrasz' WHERE entry=26443; UPDATE creature_template SET ScriptName='npc_torastrasza' WHERE entry=26949; diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 879bd9661..3bbacee81 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -711,7 +711,10 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1000660,'It\'s getting a little hot over here. Shall we move on?',0,0,0,11,'helice SAY_HELICE_MOVE_ON'), (-1000661,'Oh, look, it\'s another cartload of explosives! Let\'s help them dispose of it.',0,0,0,25,'helice SAY_HELICE_EXPLOSIVES_2'), (-1000662,'You really shouldn\'t play with this stuff. Someone could get hurt.',0,0,0,5,'helice SAY_HELICE_EXPLODE_2'), -(-1000663,'We made it! Thank you for getting me out of that hell hole. Tell Hemet to expect me!',0,0,0,4,'helice SAY_HELICE_COMPLETE'); +(-1000663,'We made it! Thank you for getting me out of that hell hole. Tell Hemet to expect me!',0,0,0,4,'helice SAY_HELICE_COMPLETE'), + +(-1000664,'The Destructive Ward gains in power.',0,5,0,0,'destructive ward SAY_WARD_POWERUP'), +(-1000665,'The Destructive Ward is fully charged!',0,5,0,0,'destructive ward SAY_WARD_CHARGED'); -- -1 033 000 SHADOWFANG KEEP INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES diff --git a/sql/updates/r2073_mangos.sql b/sql/updates/r2073_mangos.sql new file mode 100644 index 000000000..0035507a3 --- /dev/null +++ b/sql/updates/r2073_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_destructive_ward' WHERE entry=27430; diff --git a/sql/updates/r2073_scriptdev2.sql b/sql/updates/r2073_scriptdev2.sql new file mode 100644 index 000000000..30aa799bb --- /dev/null +++ b/sql/updates/r2073_scriptdev2.sql @@ -0,0 +1,4 @@ +DELETE FROM script_texts WHERE entry IN (-1000664, -1000665); +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1000664,'The Destructive Ward gains in power.',0,5,0,0,'destructive ward SAY_WARD_POWERUP'), +(-1000665,'The Destructive Ward is fully charged!',0,5,0,0,'destructive ward SAY_WARD_CHARGED'); From 45106c68bf0613c2c644a93ff04f58c7900acfab Mon Sep 17 00:00:00 2001 From: Xfurry Date: Fri, 6 May 2011 16:11:31 +0200 Subject: [PATCH 0053/1172] [2074] Sunken Temple - Fix some minor issues * Jammalan - add missing yell after the 6 minibosses are killed * Jammalan - fix typo Jammalain -> Jammalan * Malfurion - fix timers and summon position Signed-off-by: Schmoozerd --- .../sunken_temple/instance_sunken_temple.cpp | 33 +++++++------ .../sunken_temple/sunken_temple.cpp | 46 ++++++++++--------- .../sunken_temple/sunken_temple.h | 10 ++-- sd2_revision_nr.h | 2 +- sql/scriptdev2_script_full.sql | 4 +- sql/updates/r2074_scriptdev2.sql | 3 ++ 6 files changed, 58 insertions(+), 40 deletions(-) create mode 100644 sql/updates/r2074_scriptdev2.sql diff --git a/scripts/eastern_kingdoms/sunken_temple/instance_sunken_temple.cpp b/scripts/eastern_kingdoms/sunken_temple/instance_sunken_temple.cpp index dfe212606..833991848 100644 --- a/scripts/eastern_kingdoms/sunken_temple/instance_sunken_temple.cpp +++ b/scripts/eastern_kingdoms/sunken_temple/instance_sunken_temple.cpp @@ -25,7 +25,8 @@ EndScriptData */ #include "sunken_temple.h" instance_sunken_temple::instance_sunken_temple(Map* pMap) : ScriptedInstance(pMap), - m_uiJammalainBarrierGUID(0), + m_uiJammalanGUID(0), + m_uiJammalanBarrierGUID(0), m_uiProtectorsRemaining(0) { Initialize(); @@ -40,10 +41,10 @@ void instance_sunken_temple::OnObjectCreate(GameObject* pGo) { switch(pGo->GetEntry()) { - case GO_JAMMALAIN_BARRIER: - m_uiJammalainBarrierGUID = pGo->GetGUID(); + case GO_JAMMALAN_BARRIER: + m_uiJammalanBarrierGUID = pGo->GetGUID(); if (m_auiEncounter[1] == DONE) - DoUseDoorOrButton(m_uiJammalainBarrierGUID); + DoUseDoorOrButton(m_uiJammalanBarrierGUID); break; } @@ -61,6 +62,9 @@ void instance_sunken_temple::OnCreatureCreate(Creature* pCreature) case NPC_MIJAN: ++m_uiProtectorsRemaining; break; + case NPC_JAMMALAN: + m_uiJammalanGUID = pCreature->GetGUID(); + break; } } @@ -74,16 +78,18 @@ void instance_sunken_temple::SetData(uint32 uiType, uint32 uiData) case TYPE_PROTECTORS: if (uiData == DONE) { - //Jammalain should yell here about barrier being destroyed --m_uiProtectorsRemaining; if (!m_uiProtectorsRemaining) { m_auiEncounter[1] = uiData; - DoUseDoorOrButton(m_uiJammalainBarrierGUID); + DoUseDoorOrButton(m_uiJammalanBarrierGUID); + // Intro yell + if (Creature* pJammalan = instance->GetCreature(m_uiJammalanGUID)) + DoScriptText(SAY_JAMMALAN_INTRO, pJammalan); } } break; - case TYPE_JAMMALAIN: + case TYPE_JAMMALAN: m_auiEncounter[2] = uiData; break; case TYPE_MALFURION: @@ -135,7 +141,7 @@ uint32 instance_sunken_temple::GetData(uint32 uiType) return m_auiEncounter[0]; case TYPE_PROTECTORS: return m_auiEncounter[1]; - case TYPE_JAMMALAIN: + case TYPE_JAMMALAN: return m_auiEncounter[2]; case TYPE_MALFURION: return m_auiEncounter[3]; @@ -150,9 +156,10 @@ InstanceData* GetInstanceData_instance_sunken_temple(Map* pMap) void AddSC_instance_sunken_temple() { - Script* newscript; - newscript = new Script; - newscript->Name = "instance_sunken_temple"; - newscript->GetInstanceData = &GetInstanceData_instance_sunken_temple; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "instance_sunken_temple"; + pNewScript->GetInstanceData = &GetInstanceData_instance_sunken_temple; + pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/sunken_temple/sunken_temple.cpp b/scripts/eastern_kingdoms/sunken_temple/sunken_temple.cpp index 92914fd8e..b82cf438e 100644 --- a/scripts/eastern_kingdoms/sunken_temple/sunken_temple.cpp +++ b/scripts/eastern_kingdoms/sunken_temple/sunken_temple.cpp @@ -46,7 +46,7 @@ bool AreaTrigger_at_shade_of_eranikus(Player* pPlayer, AreaTriggerEntry const* p { if (pInstance->GetData(TYPE_MALFURION) != DONE) { - pPlayer->SummonCreature(NPC_MALFURION, -639.378723f, -4.238533f, -90.835098f, 2.724664f, TEMPSUMMON_DEAD_DESPAWN, 0); + pPlayer->SummonCreature(NPC_MALFURION, -660.5277f, -16.7117f, -90.8357f, 1.6055f, TEMPSUMMON_DEAD_DESPAWN, 0); pInstance->SetData(TYPE_MALFURION, DONE); } } @@ -72,8 +72,9 @@ struct MANGOS_DLL_DECL npc_malfurionAI : public ScriptedAI { npc_malfurionAI(Creature* pCreature) : ScriptedAI(pCreature) { + DoScriptText(EMOTE_MALFURION1, m_creature); m_uiSpeech = 0; - m_uiSayTimer = 0; + m_uiSayTimer = 3000; m_creature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER); } @@ -93,28 +94,29 @@ struct MANGOS_DLL_DECL npc_malfurionAI : public ScriptedAI switch (m_uiSpeech) { case 0: - DoScriptText(EMOTE_MALFURION1, m_creature); - m_uiSayTimer = 1500; - break; - case 1: m_creature->HandleEmote(EMOTE_ONESHOT_BOW); m_uiSayTimer = 2000; break; - case 2: + case 1: DoScriptText(SAY_MALFURION1, m_creature); - m_uiSayTimer = 1000; + m_creature->HandleEmote(EMOTE_STATE_TALK); + m_uiSayTimer = 12000; break; - case 3: + case 2: DoScriptText(SAY_MALFURION2, m_creature); - m_uiSayTimer = 1000; + m_uiSayTimer = 12000; break; - case 4: + case 3: DoScriptText(SAY_MALFURION3, m_creature); - m_uiSayTimer = 2000; + m_uiSayTimer = 11000; break; - case 5: + case 4: DoScriptText(SAY_MALFURION4, m_creature); + m_uiSayTimer = 4000; + break; + case 5: m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER); + m_creature->HandleEmote(EMOTE_STATE_NONE); break; } @@ -134,15 +136,15 @@ CreatureAI* GetAI_npc_malfurion(Creature* pCreature) void AddSC_sunken_temple() { - Script* newscript; + Script* pNewScript; - newscript = new Script; - newscript->Name = "at_shade_of_eranikus"; - newscript->pAreaTrigger = &AreaTrigger_at_shade_of_eranikus; - newscript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "at_shade_of_eranikus"; + pNewScript->pAreaTrigger = &AreaTrigger_at_shade_of_eranikus; + pNewScript->RegisterSelf(); - newscript = new Script; - newscript->Name = "npc_malfurion_stormrage"; - newscript->GetAI = &GetAI_npc_malfurion; - newscript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "npc_malfurion_stormrage"; + pNewScript->GetAI = &GetAI_npc_malfurion; + pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/sunken_temple/sunken_temple.h b/scripts/eastern_kingdoms/sunken_temple/sunken_temple.h index b6da8c23b..eda04838e 100644 --- a/scripts/eastern_kingdoms/sunken_temple/sunken_temple.h +++ b/scripts/eastern_kingdoms/sunken_temple/sunken_temple.h @@ -11,12 +11,13 @@ enum TYPE_ATALARION = 1, TYPE_PROTECTORS = 2, - TYPE_JAMMALAIN = 3, + TYPE_JAMMALAN = 3, TYPE_MALFURION = 4, NPC_ATALARION = 8580, NPC_DREAMSCYTH = 5721, NPC_WEAVER = 5720, + NPC_JAMMALAN = 5710, NPC_AVATAR_OF_HAKKAR = 8443, NPC_SHADE_OF_ERANIKUS = 5709, @@ -44,7 +45,9 @@ enum GO_ETERNAL_FLAME_3 = 148420, GO_ETERNAL_FLAME_4 = 148421, - GO_JAMMALAIN_BARRIER = 149431 + GO_JAMMALAN_BARRIER = 149431, + + SAY_JAMMALAN_INTRO = -1109005, }; class MANGOS_DLL_DECL instance_sunken_temple : public ScriptedInstance @@ -68,7 +71,8 @@ class MANGOS_DLL_DECL instance_sunken_temple : public ScriptedInstance uint32 m_auiEncounter[MAX_ENCOUNTER]; std::string strInstData; - uint64 m_uiJammalainBarrierGUID; + uint64 m_uiJammalanGUID; + uint64 m_uiJammalanBarrierGUID; uint8 m_uiProtectorsRemaining; }; #endif diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 0e374cd2a..c0b1fbb5d 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2073" + #define SD2_REVISION_NR "2074" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 3bbacee81..e465736bc 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -828,7 +828,9 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1109001,'Be steadfast, champion. I know why it is that you are here and I know what it is that you seek. Eranikus will not give up the shard freely. He has been twisted... twisted by the same force that you seek to destroy.',0,0,0,0,'malfurion stormrge SAY_MALFURION1'), (-1109002,'Are you really surprised? Is it hard to believe that the power of an Old God could reach even inside the Dream? It is true - Eranikus, Tyrant of the Dream, wages a battle against us all. The Nightmare follows in his wake of destruction.',0,0,0,0,'malfurion stormrge SAY_MALFURION2'), (-1109003,'Understand this, Eranikus wants nothing more than to be brought to Azeroth from the Dream. Once he is out, he will stop at nothing to destroy my physical manifestation. This, however, is the only way in which you could recover the scepter shard.',0,0,0,0,'malfurion stormrge SAY_MAFLURION3'), -(-1109004,'You will bring him back into this world, champion.',0,0,0,0,'malfurion Stormrge SAY_MALFURION4'); +(-1109004,'You will bring him back into this world, champion.',0,0,0,0,'malfurion Stormrge SAY_MALFURION4'), + +(-1109005,'The shield be down! Rise up Atal\'ai! Rise up!',5861,6,0,0,'jammalan SAY_JAMMALAN_INTRO'); -- -1 129 000 RAZORFEN DOWNS INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES diff --git a/sql/updates/r2074_scriptdev2.sql b/sql/updates/r2074_scriptdev2.sql new file mode 100644 index 000000000..cd1c78219 --- /dev/null +++ b/sql/updates/r2074_scriptdev2.sql @@ -0,0 +1,3 @@ +DELETE FROM script_texts WHERE entry=-1109005; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1109005,'The shield be down! Rise up Atal\'ai! Rise up!',5861,6,0,0,'jammalan SAY_JAMMALAN_INTRO'); From 22dfa175080e2e42279d338889234204b6df4fd2 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Fri, 6 May 2011 17:03:24 +0200 Subject: [PATCH 0054/1172] [2075] Sunken Temple - Implement Atalarion Summon Event * Add summoning of Atalarion after correct activating of statues * Make instance independend from Acid Note: Might require some DB-changes to work as it should Signed-off-by: Schmoozerd --- .../sunken_temple/instance_sunken_temple.cpp | 88 ++++++++++++++++++- .../sunken_temple/sunken_temple.cpp | 52 ++++++++++- .../sunken_temple/sunken_temple.h | 67 +++++++++++--- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 8 ++ sql/updates/r2075_mangos.sql | 8 ++ 6 files changed, 205 insertions(+), 20 deletions(-) create mode 100644 sql/updates/r2075_mangos.sql diff --git a/scripts/eastern_kingdoms/sunken_temple/instance_sunken_temple.cpp b/scripts/eastern_kingdoms/sunken_temple/instance_sunken_temple.cpp index 833991848..23218cf42 100644 --- a/scripts/eastern_kingdoms/sunken_temple/instance_sunken_temple.cpp +++ b/scripts/eastern_kingdoms/sunken_temple/instance_sunken_temple.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: instance_sunken_temple -SD%Complete: 30 -SDComment: +SD%Complete: 50 +SDComment: Hakkar Summon Event missing SDCategory: Sunken Temple EndScriptData */ @@ -25,8 +25,11 @@ EndScriptData */ #include "sunken_temple.h" instance_sunken_temple::instance_sunken_temple(Map* pMap) : ScriptedInstance(pMap), + m_uiAtalarionGUID(0), m_uiJammalanGUID(0), m_uiJammalanBarrierGUID(0), + m_uiIdolOfHakkarGUID(0), + m_uiStatueCounter(0), m_uiProtectorsRemaining(0) { Initialize(); @@ -46,8 +49,13 @@ void instance_sunken_temple::OnObjectCreate(GameObject* pGo) if (m_auiEncounter[1] == DONE) DoUseDoorOrButton(m_uiJammalanBarrierGUID); break; + case GO_IDOL_OF_HAKKAR: + m_uiIdolOfHakkarGUID = pGo->GetGUID(); + break; + case GO_ATALAI_LIGHT_BIG: + m_luiBigLightGUIDs.push_back(pGo->GetGUID()); + break; } - } void instance_sunken_temple::OnCreatureCreate(Creature* pCreature) @@ -65,14 +73,38 @@ void instance_sunken_temple::OnCreatureCreate(Creature* pCreature) case NPC_JAMMALAN: m_uiJammalanGUID = pCreature->GetGUID(); break; + case NPC_ATALARION: + m_uiAtalarionGUID = pCreature->GetGUID(); + break; + } +} + +void instance_sunken_temple::OnCreatureDeath(Creature* pCreature) +{ + switch (pCreature->GetEntry()) + { + case NPC_ATALARION: SetData(TYPE_ATALARION, DONE); break; + case NPC_JAMMALAN: SetData(TYPE_JAMMALAN, DONE); break; + // Jammalain mini-bosses + case NPC_ZOLO: + case NPC_GASHER: + case NPC_LORO: + case NPC_HUKKU: + case NPC_ZULLOR: + case NPC_MIJAN: + SetData(TYPE_PROTECTORS, DONE); + break; } } + void instance_sunken_temple::SetData(uint32 uiType, uint32 uiData) { switch(uiType) { case TYPE_ATALARION: + if (uiData == SPECIAL) + DoSpawnAtalarionIfCan(); m_auiEncounter[0] = uiData; break; case TYPE_PROTECTORS: @@ -111,6 +143,53 @@ void instance_sunken_temple::SetData(uint32 uiType, uint32 uiData) } } +void instance_sunken_temple::DoSpawnAtalarionIfCan() +{ + // return if already summoned + if (m_uiAtalarionGUID) + return; + + Player* pPlayer = GetPlayerInMap(); + if (!pPlayer) + return; + + pPlayer->SummonCreature(NPC_ATALARION, aSunkenTempleLocation[0].m_fX, aSunkenTempleLocation[0].m_fY, aSunkenTempleLocation[0].m_fZ, aSunkenTempleLocation[0].m_fO, TEMPSUMMON_DEAD_DESPAWN, 0); + + // Spawn the idol of Hakkar + DoRespawnGameObject(m_uiIdolOfHakkarGUID, 30 * MINUTE); + + // Spawn the big green lights + for (std::list::const_iterator itr = m_luiBigLightGUIDs.begin(); itr != m_luiBigLightGUIDs.end(); ++itr) + DoRespawnGameObject(*itr, 30*MINUTE*IN_MILLISECONDS); +} + +bool instance_sunken_temple::ProcessStatueEvent(uint32 uiEventId) +{ + bool bEventStatus = false; + + // Check if the statues are activated correctly + // Increase the counter when the correct statue is activated + for (uint8 i = 0; i < MAX_STATUES; ++i) + { + if (uiEventId == m_aAtalaiStatueEvents[i] && m_uiStatueCounter == i) + { + // Right Statue activated + ++m_uiStatueCounter; + bEventStatus = true; + break; + } + } + + if (!bEventStatus) + return false; + + // Check if all statues are active + if (m_uiStatueCounter == MAX_STATUES) + SetData(TYPE_ATALARION, SPECIAL); + + return true; +} + void instance_sunken_temple::Load(const char* chrIn) { if (!chrIn) @@ -126,7 +205,8 @@ void instance_sunken_temple::Load(const char* chrIn) for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) { - if (m_auiEncounter[i] == IN_PROGRESS) + // Here a bit custom, to have proper mechanics for the statue events + if (m_auiEncounter[i] != DONE) m_auiEncounter[i] = NOT_STARTED; } diff --git a/scripts/eastern_kingdoms/sunken_temple/sunken_temple.cpp b/scripts/eastern_kingdoms/sunken_temple/sunken_temple.cpp index b82cf438e..2be0e1e17 100644 --- a/scripts/eastern_kingdoms/sunken_temple/sunken_temple.cpp +++ b/scripts/eastern_kingdoms/sunken_temple/sunken_temple.cpp @@ -24,6 +24,7 @@ EndScriptData */ /* ContentData at_shade_of_eranikus npc_malfurion_stormrage +event_antalarion_statue_activation EndContentData */ #include "precompiled.h" @@ -39,14 +40,14 @@ bool AreaTrigger_at_shade_of_eranikus(Player* pPlayer, AreaTriggerEntry const* p { if (ScriptedInstance* pInstance = (ScriptedInstance*)pPlayer->GetInstanceData()) { - //Only do stuff, if the player has finished the PreQuest + // Only do stuff, if the player has finished the PreQuest if (pPlayer->GetQuestRewardStatus(QUEST_THE_CHARGE_OF_DRAGONFLIGHTS) && !pPlayer->GetQuestRewardStatus(QUEST_ERANIKUS_TYRANT_OF_DREAMS) && pPlayer->GetQuestStatus(QUEST_ERANIKUS_TYRANT_OF_DREAMS) != QUEST_STATUS_COMPLETE) { if (pInstance->GetData(TYPE_MALFURION) != DONE) { - pPlayer->SummonCreature(NPC_MALFURION, -660.5277f, -16.7117f, -90.8357f, 1.6055f, TEMPSUMMON_DEAD_DESPAWN, 0); + pPlayer->SummonCreature(NPC_MALFURION, aSunkenTempleLocation[2].m_fX, aSunkenTempleLocation[2].m_fY, aSunkenTempleLocation[2].m_fZ, aSunkenTempleLocation[2].m_fO, TEMPSUMMON_DEAD_DESPAWN, 0); pInstance->SetData(TYPE_MALFURION, DONE); } } @@ -57,6 +58,7 @@ bool AreaTrigger_at_shade_of_eranikus(Player* pPlayer, AreaTriggerEntry const* p /*###### ## npc_malfurion_stormrage ######*/ + enum { EMOTE_MALFURION1 = -1109000, @@ -84,7 +86,7 @@ struct MANGOS_DLL_DECL npc_malfurionAI : public ScriptedAI void Reset() {} void UpdateAI(const uint32 uiDiff) { - // we are in Sunken Temple + // We are in Sunken Temple if (m_creature->GetMap()->IsDungeon()) { if (m_uiSpeech < MAX_MALFURION_TEMPLE_SPEECHES) @@ -134,6 +136,45 @@ CreatureAI* GetAI_npc_malfurion(Creature* pCreature) return new npc_malfurionAI(pCreature); } +/*###### +## event_antalarion_statues +######*/ + +bool ProcessEventId_event_antalarion_statue_activation(uint32 uiEventId, Object* pSource, Object* pTarget, bool bIsStart) +{ + if (pSource->GetTypeId() == TYPEID_PLAYER && pTarget->GetTypeId() == TYPEID_GAMEOBJECT) + { + if (instance_sunken_temple* pInstance = (instance_sunken_temple*)((Player*)pSource)->GetInstanceData()) + { + // return if event completed + if (pInstance->GetData(TYPE_ATALARION) != NOT_STARTED) + return true; + + // Send the event id to process + if (pInstance->ProcessStatueEvent(uiEventId)) + { + // Activate the green light if the correct statue is activated + if (GameObject* pLight = GetClosestGameObjectWithEntry((GameObject*)pTarget, GO_ATALAI_LIGHT, INTERACTION_DISTANCE)) + pInstance->DoRespawnGameObject(pLight->GetGUID(), 30 * MINUTE); + } + else + { + // If the wrong statue was activated, then trigger trap + // We don't know actually which trap goes to which statue so we need to search for each + if (GameObject* pTrap = GetClosestGameObjectWithEntry((GameObject*)pTarget, GO_ATALAI_TRAP_1, INTERACTION_DISTANCE)) + pTrap->Use((Unit*)pSource); + else if (GameObject* pTrap = GetClosestGameObjectWithEntry((GameObject*)pTarget, GO_ATALAI_TRAP_2, INTERACTION_DISTANCE)) + pTrap->Use((Unit*)pSource); + else if (GameObject* pTrap = GetClosestGameObjectWithEntry((GameObject*)pTarget, GO_ATALAI_TRAP_3, INTERACTION_DISTANCE)) + pTrap->Use((Unit*)pSource); + } + + return true; + } + } + return false; +} + void AddSC_sunken_temple() { Script* pNewScript; @@ -147,4 +188,9 @@ void AddSC_sunken_temple() pNewScript->Name = "npc_malfurion_stormrage"; pNewScript->GetAI = &GetAI_npc_malfurion; pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "event_antalarion_statue_activation"; + pNewScript->pProcessEventId = &ProcessEventId_event_antalarion_statue_activation; + pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/sunken_temple/sunken_temple.h b/scripts/eastern_kingdoms/sunken_temple/sunken_temple.h index eda04838e..a046eac76 100644 --- a/scripts/eastern_kingdoms/sunken_temple/sunken_temple.h +++ b/scripts/eastern_kingdoms/sunken_temple/sunken_temple.h @@ -8,11 +8,17 @@ enum { MAX_ENCOUNTER = 4, + MAX_STATUES = 6, - TYPE_ATALARION = 1, - TYPE_PROTECTORS = 2, - TYPE_JAMMALAN = 3, - TYPE_MALFURION = 4, + // Don't change types 1,2 and 3 (handled in ACID) + TYPE_ATALARION_OBSOLET= 1, + TYPE_PROTECTORS_OBS = 2, + TYPE_JAMMALAN_OBS = 3, + + TYPE_ATALARION = 4, + TYPE_PROTECTORS = 5, + TYPE_JAMMALAN = 6, + TYPE_MALFURION = 7, NPC_ATALARION = 8580, NPC_DREAMSCYTH = 5721, @@ -21,7 +27,7 @@ enum NPC_AVATAR_OF_HAKKAR = 8443, NPC_SHADE_OF_ERANIKUS = 5709, - // Jammalain min-bosses + // Jammalain mini-bosses NPC_ZOLO = 5712, NPC_GASHER = 5713, NPC_LORO = 5714, @@ -31,14 +37,15 @@ enum NPC_MALFURION = 15362, - GO_ALTAR_OF_HAKKAR = 148836, + GO_ALTAR_OF_HAKKAR = 148836, // Used in order to show the player the order of the statue activation + GO_IDOL_OF_HAKKAR = 148838, // Appears when atalarion is summoned; this was removed in 4.0.1 + + GO_ATALAI_LIGHT = 148883, // Green light, activates when the correct statue is chosen + GO_ATALAI_LIGHT_BIG = 148937, // Big light, used at the altar event - GO_ATALAI_STATUE_1 = 148830, - GO_ATALAI_STATUE_2 = 148831, - GO_ATALAI_STATUE_3 = 148832, - GO_ATALAI_STATUE_4 = 148833, - GO_ATALAI_STATUE_5 = 148834, - GO_ATALAI_STATUE_6 = 148835, + GO_ATALAI_TRAP_1 = 177484, // Trapps triggered if the wrong statue is activated + GO_ATALAI_TRAP_2 = 177485, // The traps are spawned in DB randomly around the statues (we don't know exactly which statue has which trap) + GO_ATALAI_TRAP_3 = 148837, GO_ETERNAL_FLAME_1 = 148418, GO_ETERNAL_FLAME_2 = 148419, @@ -47,9 +54,32 @@ enum GO_JAMMALAN_BARRIER = 149431, + // Event ids related to the statue activation + EVENT_ID_STATUE_1 = 3094, + EVENT_ID_STATUE_2 = 3095, + EVENT_ID_STATUE_3 = 3097, + EVENT_ID_STATUE_4 = 3098, + EVENT_ID_STATUE_5 = 3099, + EVENT_ID_STATUE_6 = 3100, + SAY_JAMMALAN_INTRO = -1109005, }; +// This is also the needed order for activation: S, N, SW, SE, NW, NE +static const uint32 m_aAtalaiStatueEvents[MAX_STATUES] = {EVENT_ID_STATUE_1, EVENT_ID_STATUE_2, EVENT_ID_STATUE_3, EVENT_ID_STATUE_4, EVENT_ID_STATUE_5, EVENT_ID_STATUE_6}; + +struct SummonLocations +{ + float m_fX, m_fY, m_fZ, m_fO; +}; + +static const SummonLocations aSunkenTempleLocation[] = +{ + {-480.3991f, 96.5668f, -189.7297f, 6.1947f}, // Atalarion summon loc + {-466.7165f, 273.0253f, -90.4509f, 3.1338f}, // Avatar and shade of hakkar summon + {-660.5277f, -16.7117f, -90.8357f, 1.6055f} // Malfurion summon loc +}; + class MANGOS_DLL_DECL instance_sunken_temple : public ScriptedInstance { public: @@ -61,18 +91,31 @@ class MANGOS_DLL_DECL instance_sunken_temple : public ScriptedInstance void OnObjectCreate(GameObject* pGo); void OnCreatureCreate(Creature* pCreature); + // No need currently to use OnEnterCombat or OnEvade + void OnCreatureDeath(Creature* pCreature); + void SetData(uint32 uiType, uint32 uiData); uint32 GetData(uint32 uiType); + bool ProcessStatueEvent(uint32 uiEventId); + const char* Save() { return strInstData.c_str(); } void Load(const char* chrIn); protected: + void DoSpawnAtalarionIfCan(); + uint32 m_auiEncounter[MAX_ENCOUNTER]; std::string strInstData; + uint64 m_uiAtalarionGUID; uint64 m_uiJammalanGUID; uint64 m_uiJammalanBarrierGUID; + uint64 m_uiIdolOfHakkarGUID; + uint8 m_uiStatueCounter; uint8 m_uiProtectorsRemaining; + + std::list m_luiBigLightGUIDs; }; + #endif diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index c0b1fbb5d..a934f909a 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2074" + #define SD2_REVISION_NR "2075" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index a014678d7..d20c80670 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -1035,6 +1035,14 @@ UPDATE instance_template SET ScriptName='instance_sunken_temple' WHERE map=109; DELETE FROM scripted_areatrigger WHERE entry=4016; INSERT INTO scripted_areatrigger VALUES (4016,'at_shade_of_eranikus'); UPDATE creature_template SET ScriptName='npc_malfurion_stormrage' WHERE entry=15362; +DELETE FROM scripted_event_id WHERE id IN (3094,3095,3097,3098,3099,3100); +INSERT INTO scripted_event_id VALUES +(3094,'event_antalarion_statue_activation'), +(3095,'event_antalarion_statue_activation'), +(3097,'event_antalarion_statue_activation'), +(3098,'event_antalarion_statue_activation'), +(3099,'event_antalarion_statue_activation'), +(3100,'event_antalarion_statue_activation'); /* SUNWELL PLATEAU */ UPDATE instance_template SET ScriptName='instance_sunwell_plateau' WHERE map=580; diff --git a/sql/updates/r2075_mangos.sql b/sql/updates/r2075_mangos.sql new file mode 100644 index 000000000..aa142f8d5 --- /dev/null +++ b/sql/updates/r2075_mangos.sql @@ -0,0 +1,8 @@ +DELETE FROM scripted_event_id WHERE id IN (3094,3095,3097,3098,3099,3100); +INSERT INTO scripted_event_id VALUES +(3094,'event_antalarion_statue_activation'), +(3095,'event_antalarion_statue_activation'), +(3097,'event_antalarion_statue_activation'), +(3098,'event_antalarion_statue_activation'), +(3099,'event_antalarion_statue_activation'), +(3100,'event_antalarion_statue_activation'); From b25f1f96c1bb6e4ff230127bc0ae899a6a6562a2 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Fri, 6 May 2011 22:01:25 +0200 Subject: [PATCH 0055/1172] [2076] Dire Maul - Add basic support for Ironbark door event The event is still to be done, possible doable with DB-scripting! Signed-off-by: Schmoozerd --- scripts/kalimdor/dire_maul/dire_maul.h | 16 +++++--- .../kalimdor/dire_maul/instance_dire_maul.cpp | 40 ++++++++++++++++++- sd2_revision_nr.h | 2 +- sql/scriptdev2_script_full.sql | 4 +- sql/updates/r2076_scriptdev2.sql | 3 ++ 5 files changed, 55 insertions(+), 10 deletions(-) create mode 100644 sql/updates/r2076_scriptdev2.sql diff --git a/scripts/kalimdor/dire_maul/dire_maul.h b/scripts/kalimdor/dire_maul/dire_maul.h index 58ff9f62e..80a75b121 100644 --- a/scripts/kalimdor/dire_maul/dire_maul.h +++ b/scripts/kalimdor/dire_maul/dire_maul.h @@ -7,30 +7,33 @@ enum { - MAX_ENCOUNTER = 9, + MAX_ENCOUNTER = 11, MAX_GENERATORS = 5, // East TYPE_ALZZIN = 0, // Do not change - Handled with Acid + TYPE_ZEVRIM = 1, + TYPE_IRONBARK = 2, // West - TYPE_IMMOLTHAR = 1, - TYPE_PRINCE = 2, - TYPE_PYLON_1 = 3, + TYPE_IMMOLTHAR = 3, + TYPE_PRINCE = 4, + TYPE_PYLON_1 = 5, TYPE_PYLON_2 = TYPE_PYLON_1 + 1, TYPE_PYLON_3 = TYPE_PYLON_1 + 2, TYPE_PYLON_4 = TYPE_PYLON_1 + 3, TYPE_PYLON_5 = TYPE_PYLON_1 + 4, // North - TYPE_KING_GORDOK = 8, + TYPE_KING_GORDOK = 10, // East GO_CRUMBLE_WALL = 177220, GO_CORRUPT_VINE = 179502, GO_FELVINE_SHARD = 179559, - GO_CONSERVATORY_DOOR = 176907, + GO_CONSERVATORY_DOOR = 176907, // Opened by Ironbark the redeemed + NPC_ZEVRIM_THORNHOOF = 11490, NPC_OLD_IRONBARK = 11491, NPC_IRONBARK_REDEEMED = 14241, @@ -67,6 +70,7 @@ enum SAY_FREE_IMMOLTHAR = -1429000, SAY_KILL_IMMOLTHAR = -1429001, + SAY_IRONBARK_REDEEM = -1429002, FACTION_HOSTILE = 14, SPELL_KING_OF_GORDOK = 22799, diff --git a/scripts/kalimdor/dire_maul/instance_dire_maul.cpp b/scripts/kalimdor/dire_maul/instance_dire_maul.cpp index 75b2509bc..be1eec416 100644 --- a/scripts/kalimdor/dire_maul/instance_dire_maul.cpp +++ b/scripts/kalimdor/dire_maul/instance_dire_maul.cpp @@ -61,6 +61,11 @@ void instance_dire_maul::OnCreatureCreate(Creature* pCreature) { switch(pCreature->GetEntry()) { + // East + case NPC_OLD_IRONBARK: + m_uiOldIronbarkGUID = pCreature->GetGUID(); + break; + // West case NPC_PRINCE_TORTHELDRIN: m_uiPrinceTortheldrinGUID = pCreature->GetGUID(); @@ -96,6 +101,11 @@ void instance_dire_maul::OnObjectCreate(GameObject* pGo) switch(pGo->GetEntry()) { // East + case GO_CONSERVATORY_DOOR: + m_uiConservatoryDoorGUID = pGo->GetGUID(); + if (m_auiEncounter[TYPE_IRONBARK] == DONE) + pGo->SetGoState(GO_STATE_ACTIVE); + break; case GO_CRUMBLE_WALL: m_uiCrumbleWallGUID = pGo->GetGUID(); if (m_bWallDestroyed || m_auiEncounter[TYPE_ALZZIN] == DONE) @@ -152,6 +162,21 @@ void instance_dire_maul::SetData(uint32 uiType, uint32 uiData) switch(uiType) { // East + case TYPE_ZEVRIM: + if (uiData == DONE) + { + // Update Old Ironbark so he can open the conservatory door + if (Creature* pIronbark = instance->GetCreature(m_uiOldIronbarkGUID)) + { + DoScriptText(SAY_IRONBARK_REDEEM, pIronbark); + pIronbark->UpdateEntry(NPC_IRONBARK_REDEEMED); + } + } + m_auiEncounter[uiType] = uiData; + break; + case TYPE_IRONBARK: + m_auiEncounter[uiType] = uiData; + break; case TYPE_ALZZIN: // This Encounter is expected to be handled within Acid (reason handling at 50% hp) if (uiData == DONE) { @@ -232,7 +257,8 @@ void instance_dire_maul::SetData(uint32 uiType, uint32 uiData) std::ostringstream saveStream; saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2] << " " << m_auiEncounter[3] << " " << m_auiEncounter[4] << " " << m_auiEncounter[5] << " " - << m_auiEncounter[6] << " " << m_auiEncounter[7] << " " << m_auiEncounter[8]; + << m_auiEncounter[6] << " " << m_auiEncounter[7] << " " << m_auiEncounter[8] << " " + << m_auiEncounter[9] << " " << m_auiEncounter[10]; m_strInstData = saveStream.str(); @@ -309,6 +335,15 @@ void instance_dire_maul::OnCreatureDeath(Creature* pCreature) { switch (pCreature->GetEntry()) { + // East + // - Handling Zevrim and Old Ironbark for the door event + case NPC_ZEVRIM_THORNHOOF: + SetData(TYPE_ZEVRIM, DONE); + break; + case NPC_IRONBARK_REDEEMED: + SetData(TYPE_IRONBARK, DONE); + break; + // West // - Handling of guards of generators case NPC_ARCANE_ABERRATION: @@ -356,7 +391,8 @@ void instance_dire_maul::Load(const char* chrIn) std::istringstream loadStream(chrIn); loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3] >> m_auiEncounter[4] >> m_auiEncounter[5] >> - m_auiEncounter[6] >> m_auiEncounter[7] >> m_auiEncounter[8]; + m_auiEncounter[6] >> m_auiEncounter[7] >> m_auiEncounter[8] >> + m_auiEncounter[9] >> m_auiEncounter[10]; if (m_auiEncounter[TYPE_ALZZIN] >= DONE) m_bWallDestroyed = true; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index a934f909a..d6cbd49f8 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2075" + #define SD2_REVISION_NR "2076" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index e465736bc..536f7b9db 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -1053,7 +1053,9 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen -- -1 429 000 DIRE MAUL INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES (-1429000,'The demon is loose! Quickly we must restrain him!',0,6,0,0,'highborne summoner SAY_FREE_IMMOLTHAR'), -(-1429001,'Who dares disrupt the sanctity of Eldre\'Thalas? Face me, cowards!',0,6,0,0,'prince tortheldrin SAY_KILL_IMMOLTHAR'); +(-1429001,'Who dares disrupt the sanctity of Eldre\'Thalas? Face me, cowards!',0,6,0,0,'prince tortheldrin SAY_KILL_IMMOLTHAR'), + +(-1429002,'At last... Freed from his cursed grasp!',0,6,0,0,'old ironbark SAY_IRONBARK_REDEEM'); -- -1 469 000 BLACKWING LAIR INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES diff --git a/sql/updates/r2076_scriptdev2.sql b/sql/updates/r2076_scriptdev2.sql new file mode 100644 index 000000000..06786b9a6 --- /dev/null +++ b/sql/updates/r2076_scriptdev2.sql @@ -0,0 +1,3 @@ +DELETE FROM script_texts WHERE entry=-1429002; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1429002,'At last... Freed from his cursed grasp!',0,6,0,0,'old ironbark SAY_IRONBARK_REDEEM'); From d0959b7a711356cf8237202f68a6ee98d1182c4c Mon Sep 17 00:00:00 2001 From: Cher0 Date: Sat, 7 May 2011 00:02:37 +0200 Subject: [PATCH 0056/1172] [2077] Razorfen Kraul - Implement Escort quest 1144 * Add script npc_willix_the_importer * Waypoints based on trinity by guenex * Thanks to Xfurry for providing full patch * "Aggro" texts are not entirely understood and might not be accurate :( Signed-off-by: Schmoozerd --- VC100/100ScriptDev2.vcxproj | 1 + VC100/100ScriptDev2.vcxproj.filters | 3 + VC80/80ScriptDev2.vcproj | 4 + VC90/90ScriptDev2.vcproj | 4 + .../razorfen_kraul/razorfen_kraul.cpp | 158 ++++++++++++++++++ sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 + sql/scriptdev2_script_full.sql | 64 +++++++ sql/updates/r2077_mangos.sql | 1 + sql/updates/r2077_scriptdev2.sql | 65 +++++++ system/ScriptLoader.cpp | 2 + 11 files changed, 304 insertions(+), 1 deletion(-) create mode 100644 scripts/kalimdor/razorfen_kraul/razorfen_kraul.cpp create mode 100644 sql/updates/r2077_mangos.sql create mode 100644 sql/updates/r2077_scriptdev2.sql diff --git a/VC100/100ScriptDev2.vcxproj b/VC100/100ScriptDev2.vcxproj index 815a100c8..e609bb441 100644 --- a/VC100/100ScriptDev2.vcxproj +++ b/VC100/100ScriptDev2.vcxproj @@ -434,6 +434,7 @@ + diff --git a/VC100/100ScriptDev2.vcxproj.filters b/VC100/100ScriptDev2.vcxproj.filters index d823ccab9..348a69e64 100644 --- a/VC100/100ScriptDev2.vcxproj.filters +++ b/VC100/100ScriptDev2.vcxproj.filters @@ -972,6 +972,9 @@ scripts\kalimdor\razorfen_kraul + + scripts\kalimdor\razorfen_kraul + scripts\kalimdor\ruins_of_ahnqiraj diff --git a/VC80/80ScriptDev2.vcproj b/VC80/80ScriptDev2.vcproj index 08ae456f6..f7f0b0d84 100644 --- a/VC80/80ScriptDev2.vcproj +++ b/VC80/80ScriptDev2.vcproj @@ -1515,6 +1515,10 @@ RelativePath="..\scripts\kalimdor\razorfen_kraul\instance_razorfen_kraul.cpp" > + + diff --git a/VC90/90ScriptDev2.vcproj b/VC90/90ScriptDev2.vcproj index d756dd7a6..24b425a55 100644 --- a/VC90/90ScriptDev2.vcproj +++ b/VC90/90ScriptDev2.vcproj @@ -1514,6 +1514,10 @@ RelativePath="..\scripts\kalimdor\razorfen_kraul\instance_razorfen_kraul.cpp" > + + diff --git a/scripts/kalimdor/razorfen_kraul/razorfen_kraul.cpp b/scripts/kalimdor/razorfen_kraul/razorfen_kraul.cpp new file mode 100644 index 000000000..09ce7150d --- /dev/null +++ b/scripts/kalimdor/razorfen_kraul/razorfen_kraul.cpp @@ -0,0 +1,158 @@ +/* Copyright (C) 2006 - 2011 ScriptDev2 + * 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: Razorfen_Kraul +SD%Complete: 100 +SDComment: Willix the Importer Escort Event +SDCategory: Razorfen Kraul +EndScriptData */ + +/* ContentData +quest_willix_the_importer +EndContentData */ + +#include "precompiled.h" +#include "escort_ai.h" + +enum +{ + QUEST_WILLIX_THE_IMPORTER = 1144, + + SAY_WILLIX_READY = -1047000, + SAY_WILLIX_1 = -1047001, + SAY_WILLIX_2 = -1047002, + SAY_WILLIX_3 = -1047003, + SAY_WILLIX_4 = -1047004, + SAY_WILLIX_5 = -1047005, + SAY_WILLIX_6 = -1047006, + SAY_WILLIX_7 = -1047007, + SAY_WILLIX_END = -1047008, + + SAY_WILLIX_AGGRO_1 = -1047009, + SAY_WILLIX_AGGRO_2 = -1047010, + SAY_WILLIX_AGGRO_3 = -1047011, + SAY_WILLIX_AGGRO_4 = -1047012, + + NPC_RAGING_AGAMAR = 4514 +}; + +static const float aBoarSpawn[4][3] = +{ + {2151.420f, 1733.18f, 52.10f}, + {2144.463f, 1726.89f, 51.93f}, + {1956.433f, 1597.97f, 81.75f}, + {1958.971f, 1599.01f, 81.44f} +}; + +struct MANGOS_DLL_DECL npc_willix_the_importerAI : public npc_escortAI +{ + npc_willix_the_importerAI(Creature* m_creature) : npc_escortAI(m_creature) { Reset(); } + + void Reset() {} + + // Exact use of these texts remains unknown, it seems that he should only talk when he initiates the attack or he is the first who is attacked by a npc + void Aggro(Unit* pWho) + { + switch(urand(0, 6)) // Not always said + { + case 0: DoScriptText(SAY_WILLIX_AGGRO_1, m_creature, pWho); break; + case 1: DoScriptText(SAY_WILLIX_AGGRO_2, m_creature, pWho); break; + case 2: DoScriptText(SAY_WILLIX_AGGRO_3, m_creature, pWho); break; + case 3: DoScriptText(SAY_WILLIX_AGGRO_4, m_creature, pWho); break; + } + } + + void JustSummoned(Creature* pSummoned) + { + pSummoned->AI()->AttackStart(m_creature); + } + + void WaypointReached(uint32 uiPointId) + { + switch (uiPointId) + { + case 2: + DoScriptText(SAY_WILLIX_1, m_creature); + break; + case 6: + DoScriptText(SAY_WILLIX_2, m_creature); + break; + case 9: + DoScriptText(SAY_WILLIX_3, m_creature); + break; + case 14: + DoScriptText(SAY_WILLIX_4, m_creature); + // Summon 2 boars on the pathway + m_creature->SummonCreature(NPC_RAGING_AGAMAR, aBoarSpawn[0][0], aBoarSpawn[0][1], aBoarSpawn[0][2], 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000); + m_creature->SummonCreature(NPC_RAGING_AGAMAR, aBoarSpawn[1][0], aBoarSpawn[1][1], aBoarSpawn[1][2], 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000); + break; + case 25: + DoScriptText(SAY_WILLIX_5, m_creature); + break; + case 33: + DoScriptText(SAY_WILLIX_6, m_creature); + break; + case 44: + DoScriptText(SAY_WILLIX_7, m_creature); + // Summon 2 boars at the end + m_creature->SummonCreature(NPC_RAGING_AGAMAR, aBoarSpawn[2][0], aBoarSpawn[2][1], aBoarSpawn[2][2], 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000); + m_creature->SummonCreature(NPC_RAGING_AGAMAR, aBoarSpawn[3][0], aBoarSpawn[3][1], aBoarSpawn[3][2], 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000); + break; + case 45: + DoScriptText(SAY_WILLIX_END, m_creature); + m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER); + // Complete event + if (Player* pPlayer = GetPlayerForEscort()) + pPlayer->GroupEventHappens(QUEST_WILLIX_THE_IMPORTER, m_creature); + SetEscortPaused(true); + break; + } + + } +}; + +CreatureAI* GetAI_npc_willix_the_importer(Creature* pCreature) +{ + return new npc_willix_the_importerAI(pCreature); +} + +bool QuestAccept_npc_willix_the_importer(Player* pPlayer, Creature* pCreature, const Quest* pQuest) +{ + if (pQuest->GetQuestId() == QUEST_WILLIX_THE_IMPORTER) + { + if (npc_willix_the_importerAI* pEscortAI = dynamic_cast(pCreature->AI())) + { + // After 4.0.1 set run = true + pEscortAI->Start(false, pPlayer->GetGUID(), pQuest); + DoScriptText(SAY_WILLIX_READY, pCreature, pPlayer); + pCreature->setFaction(FACTION_ESCORT_N_NEUTRAL_PASSIVE); + } + } + + return true; +} + +void AddSC_razorfen_kraul() +{ + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "npc_willix_the_importer"; + pNewScript->GetAI = &GetAI_npc_willix_the_importer; + pNewScript->pQuestAcceptNPC = &QuestAccept_npc_willix_the_importer; + pNewScript->RegisterSelf(); +} diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index d6cbd49f8..756d2a956 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2076" + #define SD2_REVISION_NR "2077" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index d20c80670..0536b2a6c 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -884,6 +884,7 @@ UPDATE creature_template SET ScriptName='npc_henry_stern' WHERE entry=8696; /* RAZORFEN KRAUL */ UPDATE instance_template SET ScriptName='instance_razorfen_kraul' WHERE map=47; +UPDATE creature_template SET ScriptName='npc_willix_the_importer' WHERE entry=4508; /* REDRIDGE MOUNTAINS */ UPDATE creature_template SET ScriptName='npc_corporal_keeshan' WHERE entry=349; diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 536f7b9db..1dc9a18ff 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -776,6 +776,20 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1043019,'Deal with this $N! I need to prepare to awake Naralex!',0,0,0,0,'Disciple of Naralex - SAY_AGGRO_3'); -- -1 047 000 RAZORFEN KRAUL +INSERT INTO script_texts (entry,content_default,sound,type,LANGUAGE,emote,comment) VALUES +(-1047000,'Woo hoo! Finally getting out of here. It\'s going to be rough though. Keep your eyes peeled for trouble.',0,0,0,0,'willix SAY_READY'), +(-1047001,'Up there is where Charlga Razorflank resides. Blasted old crone.',0,0,0,25,'willix SAY_1'), +(-1047002,'There\'s blueleaf tuber in this trench! It\'s like gold waiting to be mined I tell you!',0,0,0,0,'willix SAY_2'), +(-1047003,'There could be danger around every corner here.',0,0,0,0,'willix SAY_3'), +(-1047004,'I don\'t see how these foul animals live in this place... sheesh it smells!',0,0,0,0,'willix SAY_4'), +(-1047005,'I think I see a way for us to get out of this big twisted mess of a bramble.',0,0,0,0,'willix SAY_5'), +(-1047006,'Glad to be out of that wretched trench. Not much nicer up here though!',0,0,0,0,'willix SAY_6'), +(-1047007,'Finally! I\'ll be glad to get out of this place.',0,0,0,0,'willix SAY_7'), +(-1047008,'I think I\'ll rest a moment and catch my breath before heading back to Ratchet. Thanks for all the help!',0,0,0,0,'willix SAY_END'), +(-1047009,'$N heading this way fast! To arms!',0,0,0,0,'willix SAY_AGGRO_1'), +(-1047010,'Eek! $N coming right at us!',0,0,0,0,'willix SAY_AGGRO_2'), +(-1047011,'Egads! $N on me!',0,0,0,0,'willix SAY_AGGRO_3'), +(-1047012,'Help! Get this $N off of me!',0,0,0,0,'willix SAY_AGGRO_4'); -- -1 048 000 BLACKFATHOM DEEPS @@ -5556,4 +5570,54 @@ INSERT INTO script_waypoint (entry, pointid, location_x, location_y, location_z, (5644, 18, -475.815, 1615.815, 97.07, 0, ''), (5644, 19, -474.329, 1590.01, 94.4982, 0, ''); +DELETE FROM script_waypoint WHERE entry=4508; +INSERT INTO script_waypoint VALUES +(4508, 0, 2194.38, 1791.65, 65.48, 5000, ''), +(4508, 1, 2188.56, 1805.87, 64.45, 0, ''), +(4508, 2, 2186.2, 1836.278, 59.859, 5000, 'SAY_WILLIX_1'), +(4508, 3, 2163.27, 1851.67, 56.73, 0, ''), +(4508, 4, 2140.22, 1845.02, 48.32, 0, ''), +(4508, 5, 2131.5, 1804.29, 46.85, 0, ''), +(4508, 6, 2096.18, 1789.03, 51.13, 3000, 'SAY_WILLIX_2'), +(4508, 7, 2074.46, 1780.09, 55.64, 0, ''), +(4508, 8, 2055.12, 1768.67, 58.46, 0, ''), +(4508, 9, 2037.83, 1748.62, 60.27, 5000, 'SAY_WILLIX_3'), +(4508, 10, 2037.51, 1728.94, 60.85, 0, ''), +(4508, 11, 2044.7, 1711.71, 59.71, 0, ''), +(4508, 12, 2067.66, 1701.84, 57.77, 0, ''), +(4508, 13, 2078.91, 1704.54, 56.77, 0, ''), +(4508, 14, 2097.65, 1715.24, 54.74, 3000, 'SAY_WILLIX_4'), +(4508, 15, 2106.44, 1720.98, 54.41, 0, ''), +(4508, 16, 2123.96, 1732.56, 52.27, 0, ''), +(4508, 17, 2153.82, 1728.73, 51.92, 0, ''), +(4508, 18, 2163.49, 1706.33, 54.42, 0, ''), +(4508, 19, 2158.75, 1695.98, 55.70, 0, ''), +(4508, 20, 2142.6, 1680.72, 58.24, 0, ''), +(4508, 21, 2118.31, 1671.54, 59.21, 0, ''), +(4508, 22, 2086.02, 1672.04, 61.24, 0, ''), +(4508, 23, 2068.81, 1658.93, 61.24, 0, ''), +(4508, 24, 2062.82, 1633.31, 64.35, 0, ''), +(4508, 25, 2060.92, 1600.11, 62.41, 3000, 'SAY_WILLIX_5'), +(4508, 26, 2063.05, 1589.16, 63.26, 0, ''), +(4508, 27, 2063.67, 1577.22, 65.89, 0, ''), +(4508, 28, 2057.94, 1560.68, 68.40, 0, ''), +(4508, 29, 2052.56, 1548.05, 73.35, 0, ''), +(4508, 30, 2045.22, 1543.4, 76.65, 0, ''), +(4508, 31, 2034.35, 1543.01, 79.70, 0, ''), +(4508, 32, 2029.95, 1542.94, 80.79, 0, ''), +(4508, 33, 2021.34, 1538.67, 80.8, 0, 'SAY_WILLIX_6'), +(4508, 34, 2012.45, 1549.48, 79.93, 0, ''), +(4508, 35, 2008.05, 1554.92, 80.44, 0, ''), +(4508, 36, 2006.54, 1562.72, 81.11, 0, ''), +(4508, 37, 2003.8, 1576.43, 81.57, 0, ''), +(4508, 38, 2000.57, 1590.06, 80.62, 0, ''), +(4508, 39, 1998.96, 1596.87, 80.22, 0, ''), +(4508, 40, 1991.19, 1600.82, 79.39, 0, ''), +(4508, 41, 1980.71, 1601.44, 79.77, 0, ''), +(4508, 42, 1967.22, 1600.18, 80.62, 0, ''), +(4508, 43, 1956.43, 1596.97, 81.75, 0, ''), +(4508, 44, 1954.87, 1592.02, 82.18, 3000, 'SAY_WILLIX_7'), +(4508, 45, 1948.35, 1571.35, 80.96, 30000, 'SAY_WILLIX_END'), +(4508, 46, 1947.02, 1566.42, 81.80, 30000, ''); + -- EOF diff --git a/sql/updates/r2077_mangos.sql b/sql/updates/r2077_mangos.sql new file mode 100644 index 000000000..dc0698d4c --- /dev/null +++ b/sql/updates/r2077_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_willix_the_importer' WHERE entry=4508; diff --git a/sql/updates/r2077_scriptdev2.sql b/sql/updates/r2077_scriptdev2.sql new file mode 100644 index 000000000..177aea1fa --- /dev/null +++ b/sql/updates/r2077_scriptdev2.sql @@ -0,0 +1,65 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1047012 AND -1047000; +INSERT INTO script_texts (entry,content_default,sound,type,LANGUAGE,emote,comment) VALUES +(-1047000,'Woo hoo! Finally getting out of here. It\'s going to be rough though. Keep your eyes peeled for trouble.',0,0,0,0,'willix SAY_READY'), +(-1047001,'Up there is where Charlga Razorflank resides. Blasted old crone.',0,0,0,25,'willix SAY_1'), +(-1047002,'There\'s blueleaf tuber in this trench! It\'s like gold waiting to be mined I tell you!',0,0,0,0,'willix SAY_2'), +(-1047003,'There could be danger around every corner here.',0,0,0,0,'willix SAY_3'), +(-1047004,'I don\'t see how these foul animals live in this place... sheesh it smells!',0,0,0,0,'willix SAY_4'), +(-1047005,'I think I see a way for us to get out of this big twisted mess of a bramble.',0,0,0,0,'willix SAY_5'), +(-1047006,'Glad to be out of that wretched trench. Not much nicer up here though!',0,0,0,0,'willix SAY_6'), +(-1047007,'Finally! I\'ll be glad to get out of this place.',0,0,0,0,'willix SAY_7'), +(-1047008,'I think I\'ll rest a moment and catch my breath before heading back to Ratchet. Thanks for all the help!',0,0,0,0,'willix SAY_END'), +(-1047009,'$N heading this way fast! To arms!',0,0,0,0,'willix SAY_AGGRO_1'), +(-1047010,'Eek! $N coming right at us!',0,0,0,0,'willix SAY_AGGRO_2'), +(-1047011,'Egads! $N on me!',0,0,0,0,'willix SAY_AGGRO_3'), +(-1047012,'Help! Get this $N off of me!',0,0,0,0,'willix SAY_AGGRO_4'); + +DELETE FROM script_waypoint WHERE entry=4508; +INSERT INTO script_waypoint VALUES +(4508, 0, 2194.38, 1791.65, 65.48, 5000, ''), +(4508, 1, 2188.56, 1805.87, 64.45, 0, ''), +(4508, 2, 2186.2, 1836.278, 59.859, 5000, 'SAY_WILLIX_1'), +(4508, 3, 2163.27, 1851.67, 56.73, 0, ''), +(4508, 4, 2140.22, 1845.02, 48.32, 0, ''), +(4508, 5, 2131.5, 1804.29, 46.85, 0, ''), +(4508, 6, 2096.18, 1789.03, 51.13, 3000, 'SAY_WILLIX_2'), +(4508, 7, 2074.46, 1780.09, 55.64, 0, ''), +(4508, 8, 2055.12, 1768.67, 58.46, 0, ''), +(4508, 9, 2037.83, 1748.62, 60.27, 5000, 'SAY_WILLIX_3'), +(4508, 10, 2037.51, 1728.94, 60.85, 0, ''), +(4508, 11, 2044.7, 1711.71, 59.71, 0, ''), +(4508, 12, 2067.66, 1701.84, 57.77, 0, ''), +(4508, 13, 2078.91, 1704.54, 56.77, 0, ''), +(4508, 14, 2097.65, 1715.24, 54.74, 3000, 'SAY_WILLIX_4'), +(4508, 15, 2106.44, 1720.98, 54.41, 0, ''), +(4508, 16, 2123.96, 1732.56, 52.27, 0, ''), +(4508, 17, 2153.82, 1728.73, 51.92, 0, ''), +(4508, 18, 2163.49, 1706.33, 54.42, 0, ''), +(4508, 19, 2158.75, 1695.98, 55.70, 0, ''), +(4508, 20, 2142.6, 1680.72, 58.24, 0, ''), +(4508, 21, 2118.31, 1671.54, 59.21, 0, ''), +(4508, 22, 2086.02, 1672.04, 61.24, 0, ''), +(4508, 23, 2068.81, 1658.93, 61.24, 0, ''), +(4508, 24, 2062.82, 1633.31, 64.35, 0, ''), +(4508, 25, 2060.92, 1600.11, 62.41, 3000, 'SAY_WILLIX_5'), +(4508, 26, 2063.05, 1589.16, 63.26, 0, ''), +(4508, 27, 2063.67, 1577.22, 65.89, 0, ''), +(4508, 28, 2057.94, 1560.68, 68.40, 0, ''), +(4508, 29, 2052.56, 1548.05, 73.35, 0, ''), +(4508, 30, 2045.22, 1543.4, 76.65, 0, ''), +(4508, 31, 2034.35, 1543.01, 79.70, 0, ''), +(4508, 32, 2029.95, 1542.94, 80.79, 0, ''), +(4508, 33, 2021.34, 1538.67, 80.8, 0, 'SAY_WILLIX_6'), +(4508, 34, 2012.45, 1549.48, 79.93, 0, ''), +(4508, 35, 2008.05, 1554.92, 80.44, 0, ''), +(4508, 36, 2006.54, 1562.72, 81.11, 0, ''), +(4508, 37, 2003.8, 1576.43, 81.57, 0, ''), +(4508, 38, 2000.57, 1590.06, 80.62, 0, ''), +(4508, 39, 1998.96, 1596.87, 80.22, 0, ''), +(4508, 40, 1991.19, 1600.82, 79.39, 0, ''), +(4508, 41, 1980.71, 1601.44, 79.77, 0, ''), +(4508, 42, 1967.22, 1600.18, 80.62, 0, ''), +(4508, 43, 1956.43, 1596.97, 81.75, 0, ''), +(4508, 44, 1954.87, 1592.02, 82.18, 3000, 'SAY_WILLIX_7'), +(4508, 45, 1948.35, 1571.35, 80.96, 30000, 'SAY_WILLIX_END'), +(4508, 46, 1947.02, 1566.42, 81.80, 30000, ''); diff --git a/system/ScriptLoader.cpp b/system/ScriptLoader.cpp index 61524e92b..ba0e7fd87 100644 --- a/system/ScriptLoader.cpp +++ b/system/ScriptLoader.cpp @@ -227,6 +227,7 @@ extern void AddSC_instance_onyxias_lair(); extern void AddSC_boss_amnennar_the_coldbringer(); // razorfen_downs extern void AddSC_razorfen_downs(); extern void AddSC_instance_razorfen_kraul(); // razorfen_kraul +extern void AddSC_razorfen_kraul(); extern void AddSC_boss_ayamiss(); // ruins_of_ahnqiraj extern void AddSC_boss_kurinnaxx(); extern void AddSC_boss_moam(); @@ -718,6 +719,7 @@ void AddScripts() AddSC_boss_amnennar_the_coldbringer(); // razorfen_downs AddSC_razorfen_downs(); AddSC_instance_razorfen_kraul(); // razorfen_kraul + AddSC_razorfen_kraul(); AddSC_boss_ayamiss(); // ruins_of_ahnqiraj AddSC_boss_kurinnaxx(); AddSC_boss_moam(); From ac93293e8ab04c7656c8f3768c0aaf8059a7bc0d Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Sat, 7 May 2011 00:15:12 +0200 Subject: [PATCH 0057/1172] [2078] Bring Gossip-Texts in order --- sd2_revision_nr.h | 2 +- sql/scriptdev2_script_full.sql | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 756d2a956..c672580c3 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2077" + #define SD2_REVISION_NR "2078" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 1dc9a18ff..c0d1f26b4 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -3495,14 +3495,14 @@ INSERT INTO gossip_texts (entry,content_default,comment) VALUES (-3000107,'[PH] Get Presicion Bombs','greer orehammer GOSSIP_ITEM_GET_BOMBS'), (-3000108,'[PH] Start bombing mission','greer orehammer GOSSIP_ITEM_FLIGHT'); --- -3 090 000 GNOMEREGAN -INSERT INTO gossip_texts (entry,content_default,comment) VALUES -(-3090000,'I am ready to begin.','emi shortfuse GOSSIP_ITEM_START'); - -- -3 043 000 WAILING CAVERNS INSERT INTO gossip_texts (entry,content_default,comment) VALUES (-3043000,'Let the event begin!','Disciple of Naralex - GOSSIP_ITEM_BEGIN'); +-- -3 090 000 GNOMEREGAN +INSERT INTO gossip_texts (entry,content_default,comment) VALUES +(-3090000,'I am ready to begin.','emi shortfuse GOSSIP_ITEM_START'); + -- -3 409 000 MOLTEN CORE INSERT INTO gossip_texts (entry,content_default,comment) VALUES (-3409000,'Tell me more.','majordomo_executus GOSSIP_ITEM_SUMMON_1'), From 966a95a2ee75c904718bfe2aa37a03502c731a03 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Sat, 7 May 2011 00:43:50 +0200 Subject: [PATCH 0058/1172] [2079] Change prefix to postfix operators for iterators where possible --- .../instance_blackrock_spire.cpp | 21 ++++++++++++------- .../gnomeregan/boss_thermaplugg.cpp | 6 +++--- .../gnomeregan/instance_gnomeregan.cpp | 14 ++++++------- .../molten_core/instance_molten_core.cpp | 2 +- .../scholomance/instance_scholomance.cpp | 2 +- .../shadowfang_keep/shadowfang_keep.cpp | 4 ++-- .../stratholme/instance_stratholme.cpp | 4 ++-- .../culling_of_stratholme.cpp | 2 +- .../instance_culling_of_stratholme.cpp | 6 +++--- .../kalimdor/dire_maul/instance_dire_maul.cpp | 4 ++-- scripts/kalimdor/felwood.cpp | 2 +- .../instance_ruins_of_ahnqiraj.cpp | 2 +- .../instance_draktharon_keep.cpp | 2 +- .../instance_forge_of_souls.cpp | 10 ++++----- scripts/northrend/naxxramas/boss_loatheb.cpp | 2 +- scripts/northrend/naxxramas/boss_thaddius.cpp | 4 ++-- .../violet_hold/instance_violet_hold.cpp | 2 +- sd2_revision_nr.h | 2 +- 18 files changed, 49 insertions(+), 42 deletions(-) diff --git a/scripts/eastern_kingdoms/blackrock_spire/instance_blackrock_spire.cpp b/scripts/eastern_kingdoms/blackrock_spire/instance_blackrock_spire.cpp index c6b957322..53f69f955 100644 --- a/scripts/eastern_kingdoms/blackrock_spire/instance_blackrock_spire.cpp +++ b/scripts/eastern_kingdoms/blackrock_spire/instance_blackrock_spire.cpp @@ -179,7 +179,7 @@ void instance_blackrock_spire::SetData64(uint32 uiType, uint64 uiData) if (uiType == TYPE_ROOM_EVENT && GetData(TYPE_ROOM_EVENT) == IN_PROGRESS) { uint8 uiNotEmptyRoomsCount = 0; - for (uint8 i = 0; i< MAX_ROOMS; i++) + for (uint8 i = 0; i< MAX_ROOMS; ++i) { if (m_auiRoomRuneGUID[i]) // This check is used, to ensure which runes still need processing { @@ -190,7 +190,7 @@ void instance_blackrock_spire::SetData64(uint32 uiType, uint64 uiData) m_auiRoomRuneGUID[i] = 0; } else - uiNotEmptyRoomsCount++; // found an not empty room + ++uiNotEmptyRoomsCount; // found an not empty room } } if (!uiNotEmptyRoomsCount) @@ -250,12 +250,19 @@ void instance_blackrock_spire::DoSortRoomEventMobs() { if (GetData(TYPE_ROOM_EVENT) != NOT_STARTED) return; - for (uint8 i = 0; i < MAX_ROOMS; i++) + + for (uint8 i = 0; i < MAX_ROOMS; ++i) + { if (GameObject* pRune = instance->GetGameObject(m_auiRoomRuneGUID[i])) - for (std::list::const_iterator itr = m_lRoomEventMobGUIDList.begin(); itr != m_lRoomEventMobGUIDList.end(); itr++) - if (Creature* pCreature = instance->GetCreature(*itr)) - if (pCreature->isAlive() && pCreature->GetDistance(pRune) < 10.0f) - m_alRoomEventMobGUIDSorted[i].push_back(*itr); + { + for (std::list::const_iterator itr = m_lRoomEventMobGUIDList.begin(); itr != m_lRoomEventMobGUIDList.end(); ++itr) + { + Creature* pCreature = instance->GetCreature(*itr); + if (pCreature && pCreature->isAlive() && pCreature->GetDistance(pRune) < 10.0f) + m_alRoomEventMobGUIDSorted[i].push_back(*itr); + } + } + } SetData(TYPE_ROOM_EVENT, IN_PROGRESS); } diff --git a/scripts/eastern_kingdoms/gnomeregan/boss_thermaplugg.cpp b/scripts/eastern_kingdoms/gnomeregan/boss_thermaplugg.cpp index f1b6ffde8..d57510704 100644 --- a/scripts/eastern_kingdoms/gnomeregan/boss_thermaplugg.cpp +++ b/scripts/eastern_kingdoms/gnomeregan/boss_thermaplugg.cpp @@ -107,7 +107,7 @@ struct MANGOS_DLL_DECL boss_thermapluggAI : public ScriptedAI m_pInstance->SetData(TYPE_THERMAPLUGG, FAIL); // Remove remaining bombs - for (std::list::const_iterator itr = m_lSummonedBombGUIDs.begin(); itr != m_lSummonedBombGUIDs.end(); itr++) + for (std::list::const_iterator itr = m_lSummonedBombGUIDs.begin(); itr != m_lSummonedBombGUIDs.end(); ++itr) { if (Creature* pBomb = m_creature->GetMap()->GetCreature(*itr)) pBomb->ForcedDespawn(); @@ -147,7 +147,7 @@ struct MANGOS_DLL_DECL boss_thermapluggAI : public ScriptedAI // Movement of Summoned mobs if (!m_lLandedBombGUIDs.empty()) { - for (std::list::const_iterator itr = m_lLandedBombGUIDs.begin(); itr != m_lLandedBombGUIDs.end(); itr++) + for (std::list::const_iterator itr = m_lLandedBombGUIDs.begin(); itr != m_lLandedBombGUIDs.end(); ++itr) { if (Creature* pBomb = m_creature->GetMap()->GetCreature(*itr)) pBomb->GetMotionMaster()->MoveFollow(m_creature, 0.0f, 0.0f); @@ -192,7 +192,7 @@ struct MANGOS_DLL_DECL boss_thermapluggAI : public ScriptedAI // Spawn bombs if (m_asBombFaces) { - for (uint8 i = 0; i < MAX_GNOME_FACES; i++) + for (uint8 i = 0; i < MAX_GNOME_FACES; ++i) { if (m_asBombFaces[i].m_bActivated) { diff --git a/scripts/eastern_kingdoms/gnomeregan/instance_gnomeregan.cpp b/scripts/eastern_kingdoms/gnomeregan/instance_gnomeregan.cpp index 07b4fea60..49cc1de9b 100644 --- a/scripts/eastern_kingdoms/gnomeregan/instance_gnomeregan.cpp +++ b/scripts/eastern_kingdoms/gnomeregan/instance_gnomeregan.cpp @@ -84,7 +84,7 @@ void instance_gnomeregan::SetData(uint32 uiType, uint32 uiData) if (!m_luiExplosiveChargeGUIDs.empty()) { std::list lExplosiveCharges; - for (std::list::const_iterator itr = m_luiExplosiveChargeGUIDs.begin(); itr != m_luiExplosiveChargeGUIDs.end(); itr++) + for (std::list::const_iterator itr = m_luiExplosiveChargeGUIDs.begin(); itr != m_luiExplosiveChargeGUIDs.end(); ++itr) { if (GameObject* pCharge = instance->GetGameObject(*itr)) lExplosiveCharges.push_back(pCharge); @@ -101,17 +101,17 @@ void instance_gnomeregan::SetData(uint32 uiType, uint32 uiData) GameObject* pCaveInNorth = instance->GetGameObject(m_uiCaveInNorthGUID); if (pCaveInSouth && pCaveInNorth) { - for (std::list::iterator itr = lExplosiveCharges.begin(); itr != lExplosiveCharges.end(); itr++) + for (std::list::iterator itr = lExplosiveCharges.begin(); itr != lExplosiveCharges.end(); ++itr) { if ((*itr)->GetDistanceOrder(pCaveInSouth, pCaveInNorth) && uiCounterSouth < MAX_EXPLOSIVES_PER_SIDE) { m_auiExplosiveSortedGUIDs[0][uiCounterSouth] = (*itr)->GetGUID(); - uiCounterSouth++; + ++uiCounterSouth; } else if (uiCounterNorth < MAX_EXPLOSIVES_PER_SIDE) { m_auiExplosiveSortedGUIDs[1][uiCounterNorth] = (*itr)->GetGUID(); - uiCounterNorth++; + ++uiCounterNorth; } } } @@ -124,7 +124,7 @@ void instance_gnomeregan::SetData(uint32 uiType, uint32 uiData) } if (uiData == DONE) { - for (std::list::const_iterator itr = m_lRedRocketGUIDs.begin(); itr != m_lRedRocketGUIDs.end(); itr++) + for (std::list::const_iterator itr = m_lRedRocketGUIDs.begin(); itr != m_lRedRocketGUIDs.end(); ++itr) DoRespawnGameObject(*itr, HOUR); } break; @@ -151,7 +151,7 @@ void instance_gnomeregan::SetData(uint32 uiType, uint32 uiData) Creature* pBlastmaster = instance->GetCreature(m_uiBlastmasterShortfuseGUID); if (!pBlastmaster) break; - for (std::list::const_iterator itr = m_luiSpawnedExplosiveChargeGUIDs.begin(); itr != m_luiSpawnedExplosiveChargeGUIDs.end(); itr++) + for (std::list::const_iterator itr = m_luiSpawnedExplosiveChargeGUIDs.begin(); itr != m_luiSpawnedExplosiveChargeGUIDs.end(); ++itr) { if (GameObject* pExplosive = instance->GetGameObject(*itr)) pExplosive->Use(pBlastmaster); @@ -188,7 +188,7 @@ void instance_gnomeregan::SetData(uint32 uiType, uint32 uiData) } // Deactivate all remaining BombFaces - for (uint8 i = 0; i < MAX_GNOME_FACES; i++) + for (uint8 i = 0; i < MAX_GNOME_FACES; ++i) DoDeactivateBombFace(i); } break; diff --git a/scripts/eastern_kingdoms/molten_core/instance_molten_core.cpp b/scripts/eastern_kingdoms/molten_core/instance_molten_core.cpp index ab06e175e..feb92e8e0 100644 --- a/scripts/eastern_kingdoms/molten_core/instance_molten_core.cpp +++ b/scripts/eastern_kingdoms/molten_core/instance_molten_core.cpp @@ -219,7 +219,7 @@ void instance_molten_core::DoSpawnMajordomoIfCan(bool bByPlayerEnter) return; // Check if all rune bosses are done - for(uint8 i = TYPE_MAGMADAR; i < TYPE_MAJORDOMO; i++) + for(uint8 i = TYPE_MAGMADAR; i < TYPE_MAJORDOMO; ++i) { if (m_auiEncounter[i] != DONE) return; diff --git a/scripts/eastern_kingdoms/scholomance/instance_scholomance.cpp b/scripts/eastern_kingdoms/scholomance/instance_scholomance.cpp index 03d3aa752..81fbe5973 100644 --- a/scripts/eastern_kingdoms/scholomance/instance_scholomance.cpp +++ b/scripts/eastern_kingdoms/scholomance/instance_scholomance.cpp @@ -358,7 +358,7 @@ bool ProcessEventId_event_spell_gandling_shadow_portal(uint32 uiEventId, Object* if (instance_scholomance* pInstance = (instance_scholomance*)((Creature*)pSource)->GetInstanceData()) { // Check if we are handling an event associated with the room events of gandling - for (uint8 i = 0; i < MAX_EVENTS; i++) + for (uint8 i = 0; i < MAX_EVENTS; ++i) { if (uiEventId == aGandlingEvents[i]) { diff --git a/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.cpp b/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.cpp index 2cb667652..9fc230dd9 100644 --- a/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.cpp +++ b/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.cpp @@ -515,7 +515,7 @@ struct MANGOS_DLL_DECL boss_arugalAI : public ScriptedAI Creature *pVoidwalker, *pLeader; pVoidwalker = pLeader = NULL; - for(uint8 i = 0; i < 4; i++) + for(uint8 i = 0; i < 4; ++i) { pVoidwalker = m_creature->SummonCreature(NPC_VOIDWALKER,VWSpawns[i].fX, VWSpawns[i].fY, VWSpawns[i].fZ, VWSpawns[i].fO, TEMPSUMMON_DEAD_DESPAWN, 1); @@ -527,7 +527,7 @@ struct MANGOS_DLL_DECL boss_arugalAI : public ScriptedAI pLeader = pVoidwalker; if (mob_arugal_voidwalkerAI* pVoidwalkerAI = dynamic_cast(pVoidwalker->AI())) - pVoidwalkerAI->SetPosition(i,pLeader); + pVoidwalkerAI->SetPosition(i, pLeader); pVoidwalker = NULL; } diff --git a/scripts/eastern_kingdoms/stratholme/instance_stratholme.cpp b/scripts/eastern_kingdoms/stratholme/instance_stratholme.cpp index b0b70a69b..eb720b15a 100644 --- a/scripts/eastern_kingdoms/stratholme/instance_stratholme.cpp +++ b/scripts/eastern_kingdoms/stratholme/instance_stratholme.cpp @@ -487,7 +487,7 @@ void instance_stratholme::DoSortZiggurats() return; std::list lAcolytes; // Valid pointers, only used locally - for (std::list::const_iterator itr = m_luiAcolyteGUIDs.begin(); itr != m_luiAcolyteGUIDs.end(); itr++) + for (std::list::const_iterator itr = m_luiAcolyteGUIDs.begin(); itr != m_luiAcolyteGUIDs.end(); ++itr) { if (Creature* pAcolyte = instance->GetCreature(*itr)) lAcolytes.push_back(pAcolyte); @@ -528,7 +528,7 @@ void instance_stratholme::DoSortZiggurats() } // In case some mobs have not been able to be sorted, store their GUIDs again - for (std::list::const_iterator itr = lAcolytes.begin(); itr != lAcolytes.end(); itr++) + for (std::list::const_iterator itr = lAcolytes.begin(); itr != lAcolytes.end(); ++itr) m_luiAcolyteGUIDs.push_back((*itr)->GetGUID()); // Sort Crystal diff --git a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.cpp b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.cpp index c2fbc0b19..cc8b88879 100644 --- a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.cpp +++ b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.cpp @@ -182,7 +182,7 @@ bool EffectAuraDummy_spell_aura_dummy_npc_crates_dummy(const Aura* pAura, bool b uint8 i = 0; for (std::list::const_iterator itr = lCrateBunnyList.begin(); itr != lCrateBunnyList.end(); ++itr) { - i++; + ++i; if (*itr == pTarget) break; } diff --git a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/instance_culling_of_stratholme.cpp b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/instance_culling_of_stratholme.cpp index 27c6000b0..dbdf799c0 100644 --- a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/instance_culling_of_stratholme.cpp +++ b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/instance_culling_of_stratholme.cpp @@ -422,7 +422,7 @@ static bool sortFromSouthToNorth(Creature* pFirst, Creature* pSecond) void instance_culling_of_stratholme::GetCratesBunnyOrderedList(std::list &lList) { std::list lCratesBunnyList; - for (std::list::const_iterator itr = m_luiCratesBunnyGUIDs.begin(); itr != m_luiCratesBunnyGUIDs.end(); itr++) + for (std::list::const_iterator itr = m_luiCratesBunnyGUIDs.begin(); itr != m_luiCratesBunnyGUIDs.end(); ++itr) { if (Creature* pBunny = instance->GetCreature(*itr)) lCratesBunnyList.push_back(pBunny); @@ -437,7 +437,7 @@ void instance_culling_of_stratholme::GetCratesBunnyOrderedList(std::list lFootmanList; - for (std::list::const_iterator itr = m_luiFootmanGUIDs.begin(); itr != m_luiFootmanGUIDs.end(); itr++) + for (std::list::const_iterator itr = m_luiFootmanGUIDs.begin(); itr != m_luiFootmanGUIDs.end(); ++itr) { if (Creature* pFootman = instance->GetCreature(*itr)) lFootmanList.push_back(pFootman); @@ -455,7 +455,7 @@ Creature* instance_culling_of_stratholme::GetStratIntroFootman() void instance_culling_of_stratholme::GetResidentOrderedList(std::list &lList) { std::list lResidentList; - for (std::list::const_iterator itr = m_luiResidentGUIDs.begin(); itr != m_luiResidentGUIDs.end(); itr++) + for (std::list::const_iterator itr = m_luiResidentGUIDs.begin(); itr != m_luiResidentGUIDs.end(); ++itr) { if (Creature* pResident = instance->GetCreature(*itr)) lResidentList.push_back(pResident); diff --git a/scripts/kalimdor/dire_maul/instance_dire_maul.cpp b/scripts/kalimdor/dire_maul/instance_dire_maul.cpp index be1eec416..44d85d5a1 100644 --- a/scripts/kalimdor/dire_maul/instance_dire_maul.cpp +++ b/scripts/kalimdor/dire_maul/instance_dire_maul.cpp @@ -296,7 +296,7 @@ void instance_dire_maul::OnCreatureEnterCombat(Creature* pCreature) case NPC_MANA_REMNANT: if (!m_lGeneratorGuardGUIDs.empty()) { - for (uint8 i = 0; i < MAX_GENERATORS; i++) + for (uint8 i = 0; i < MAX_GENERATORS; ++i) { GameObject* pGenerator = instance->GetGameObject(m_auiCrystalGeneratorGUID[i]); // Skip non-existing or finished generators @@ -348,7 +348,7 @@ void instance_dire_maul::OnCreatureDeath(Creature* pCreature) // - Handling of guards of generators case NPC_ARCANE_ABERRATION: case NPC_MANA_REMNANT: - for (uint8 i = 0; i < MAX_GENERATORS; i++) + for (uint8 i = 0; i < MAX_GENERATORS; ++i) { // Skip already activated generators if (GetData(TYPE_PYLON_1 + i) == DONE) diff --git a/scripts/kalimdor/felwood.cpp b/scripts/kalimdor/felwood.cpp index 15dc62687..6b920bb33 100644 --- a/scripts/kalimdor/felwood.cpp +++ b/scripts/kalimdor/felwood.cpp @@ -424,7 +424,7 @@ struct MANGOS_DLL_DECL npc_kroshiusAI : public ScriptedAI } break; } - m_uiPhase++; + ++m_uiPhase; } else m_uiPhaseTimer -= uiDiff; diff --git a/scripts/kalimdor/ruins_of_ahnqiraj/instance_ruins_of_ahnqiraj.cpp b/scripts/kalimdor/ruins_of_ahnqiraj/instance_ruins_of_ahnqiraj.cpp index 36a7a9e0b..f87403ca8 100644 --- a/scripts/kalimdor/ruins_of_ahnqiraj/instance_ruins_of_ahnqiraj.cpp +++ b/scripts/kalimdor/ruins_of_ahnqiraj/instance_ruins_of_ahnqiraj.cpp @@ -179,7 +179,7 @@ void instance_ruins_of_ahnqiraj::DoSapwnAndorovIfCan() if (!pPlayer) return; - for (uint8 i = 0; i < MAX_HELPERS; i++) + for (uint8 i = 0; i < MAX_HELPERS; ++i) pPlayer->SummonCreature(aAndorovSpawnLocs[i].m_uiEntry, aAndorovSpawnLocs[i].m_fX, aAndorovSpawnLocs[i].m_fY, aAndorovSpawnLocs[i].m_fZ, aAndorovSpawnLocs[i].m_fO, TEMPSUMMON_DEAD_DESPAWN, 0); } diff --git a/scripts/northrend/draktharon_keep/instance_draktharon_keep.cpp b/scripts/northrend/draktharon_keep/instance_draktharon_keep.cpp index 7d73ea93d..6012a362b 100644 --- a/scripts/northrend/draktharon_keep/instance_draktharon_keep.cpp +++ b/scripts/northrend/draktharon_keep/instance_draktharon_keep.cpp @@ -52,7 +52,7 @@ void instance_draktharon_keep::OnCreatureEvade(Creature* pCreature) void instance_draktharon_keep::OnCreatureDeath(Creature* pCreature) { if ((pCreature->GetEntry() == NPC_DRAKKARI_GUTRIPPER || pCreature->GetEntry() == NPC_DRAKKARI_SCYTHECLAW) && m_auiEncounter[TYPE_KING_DRED] == IN_PROGRESS) - m_uiDreadAddsKilled++; + ++m_uiDreadAddsKilled; if (pCreature->GetEntry() == NPC_KING_DRED) SetData(TYPE_KING_DRED, DONE); diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/instance_forge_of_souls.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/instance_forge_of_souls.cpp index f9766dfc6..fbb83e234 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/instance_forge_of_souls.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/instance_forge_of_souls.cpp @@ -65,7 +65,7 @@ void instance_forge_of_souls::ProcessEventNpcs(Player* pPlayer, bool bChanged) if (m_auiEncounter[0] != DONE || m_auiEncounter[1] != DONE) { // Spawn Begin Mobs - for (uint8 i = 0; i < sizeof(aEventBeginLocations)/sizeof(sIntoEventNpcSpawnLocations); i++) + for (uint8 i = 0; i < sizeof(aEventBeginLocations)/sizeof(sIntoEventNpcSpawnLocations); ++i) { if (Creature* pSummon = pPlayer->SummonCreature(m_uiTeam == HORDE ? aEventBeginLocations[i].uiEntryHorde : aEventBeginLocations[i].uiEntryAlliance, aEventBeginLocations[i].fSpawnX, aEventBeginLocations[i].fSpawnY, aEventBeginLocations[i].fSpawnZ, aEventBeginLocations[i].fSpawnO, TEMPSUMMON_DEAD_DESPAWN, 24*HOUR*IN_MILLISECONDS)) @@ -77,13 +77,13 @@ void instance_forge_of_souls::ProcessEventNpcs(Player* pPlayer, bool bChanged) // if bChanged, despawn Begin Mobs, spawn End Mobs at Spawn, else spawn EndMobs at End if (bChanged) { - for (std::list::const_iterator itr = m_lEventMobGUIDs.begin(); itr != m_lEventMobGUIDs.end(); itr++) + for (std::list::const_iterator itr = m_lEventMobGUIDs.begin(); itr != m_lEventMobGUIDs.end(); ++itr) { if (Creature* pSummoned = instance->GetCreature(*itr)) pSummoned->ForcedDespawn(); } - for (uint8 i = 0; i < sizeof(aEventEndLocations)/sizeof(sExtroEventNpcLocations); i++) + for (uint8 i = 0; i < sizeof(aEventEndLocations)/sizeof(sExtroEventNpcLocations); ++i) { pPlayer->SummonCreature(m_uiTeam == HORDE ? aEventEndLocations[i].uiEntryHorde : aEventEndLocations[i].uiEntryAlliance, aEventEndLocations[i].fSpawnX, aEventEndLocations[i].fSpawnY, aEventEndLocations[i].fSpawnZ, aEventEndLocations[i].fStartO, TEMPSUMMON_DEAD_DESPAWN, 24*HOUR*IN_MILLISECONDS); @@ -93,7 +93,7 @@ void instance_forge_of_souls::ProcessEventNpcs(Player* pPlayer, bool bChanged) } else { // Summon at end, without event - for (uint8 i = 0; i < sizeof(aEventEndLocations)/sizeof(sExtroEventNpcLocations); i++) + for (uint8 i = 0; i < sizeof(aEventEndLocations)/sizeof(sExtroEventNpcLocations); ++i) { pPlayer->SummonCreature(m_uiTeam == HORDE ? aEventEndLocations[i].uiEntryHorde : aEventEndLocations[i].uiEntryAlliance, aEventEndLocations[i].fEndX, aEventEndLocations[i].fEndY, aEventEndLocations[i].fEndZ, aEventEndLocations[i].fEndO, TEMPSUMMON_DEAD_DESPAWN, 24*HOUR*IN_MILLISECONDS); @@ -123,7 +123,7 @@ void instance_forge_of_souls::SetData(uint32 uiType, uint32 uiData) m_auiEncounter[0] = uiData; // Despawn remaining adds and clear list - for (std::list::const_iterator itr = m_luiSoulFragmentAliveGUIDs.begin(); itr != m_luiSoulFragmentAliveGUIDs.end(); itr++) + for (std::list::const_iterator itr = m_luiSoulFragmentAliveGUIDs.begin(); itr != m_luiSoulFragmentAliveGUIDs.end(); ++itr) { if (Creature* pFragment = instance->GetCreature(*itr)) pFragment->ForcedDespawn(); diff --git a/scripts/northrend/naxxramas/boss_loatheb.cpp b/scripts/northrend/naxxramas/boss_loatheb.cpp index 8c57cfa12..bfa6b2ea0 100644 --- a/scripts/northrend/naxxramas/boss_loatheb.cpp +++ b/scripts/northrend/naxxramas/boss_loatheb.cpp @@ -148,7 +148,7 @@ struct MANGOS_DLL_DECL boss_loathebAI : public ScriptedAI m_uiNecroticAuraTimer = 3000; break; } - m_uiNecroticAuraCount++; + ++m_uiNecroticAuraCount; } else m_uiNecroticAuraTimer -= uiDiff; diff --git a/scripts/northrend/naxxramas/boss_thaddius.cpp b/scripts/northrend/naxxramas/boss_thaddius.cpp index 3c82cfe4f..c371368fb 100644 --- a/scripts/northrend/naxxramas/boss_thaddius.cpp +++ b/scripts/northrend/naxxramas/boss_thaddius.cpp @@ -490,7 +490,7 @@ struct MANGOS_DLL_DECL boss_thaddiusAddsAI : public ScriptedAI if (lTeslaGUIDList.empty()) return; - for (std::list::const_iterator itr = lTeslaGUIDList.begin(); itr != lTeslaGUIDList.end(); itr++) + for (std::list::const_iterator itr = lTeslaGUIDList.begin(); itr != lTeslaGUIDList.end(); ++itr) { if (Creature* pTesla = m_pInstance->instance->GetCreature(*itr)) { @@ -566,7 +566,7 @@ struct MANGOS_DLL_DECL boss_thaddiusAddsAI : public ScriptedAI // Set both Teslas to overload std::list lTeslaGUIDList; m_pInstance->GetThadTeslaCreatures(lTeslaGUIDList); - for (std::list::const_iterator itr = lTeslaGUIDList.begin(); itr != lTeslaGUIDList.end(); itr++) + for (std::list::const_iterator itr = lTeslaGUIDList.begin(); itr != lTeslaGUIDList.end(); ++itr) { if (Creature* pTesla = m_pInstance->instance->GetCreature(*itr)) { diff --git a/scripts/northrend/violet_hold/instance_violet_hold.cpp b/scripts/northrend/violet_hold/instance_violet_hold.cpp index 3d444656a..41b0fd23d 100644 --- a/scripts/northrend/violet_hold/instance_violet_hold.cpp +++ b/scripts/northrend/violet_hold/instance_violet_hold.cpp @@ -75,7 +75,7 @@ void instance_violet_hold::ResetAll() CallGuards(true); SetIntroPortals(false); - for (std::vector::const_iterator itr = m_vRandomBosses.begin(); itr != m_vRandomBosses.end(); itr++) + for (std::vector::const_iterator itr = m_vRandomBosses.begin(); itr != m_vRandomBosses.end(); ++itr) { const sBossInformation* pData = GetBossInformation((*itr)->uiEntry); if (pData && GetData(pData->uiType) == DONE) diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index c672580c3..dfe433c3d 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2078" + #define SD2_REVISION_NR "2079" #endif // __SD2_REVISION_NR_H__ From 43a995d7e6f7e90977b29992ae4514070945e86a Mon Sep 17 00:00:00 2001 From: VladimirMangos Date: Sat, 7 May 2011 16:45:10 +0200 Subject: [PATCH 0059/1172] [2080] Implement additional check for ScriptNames. Requires MaNGOS Rev 11433 This checks for ScriptNames that are assigned to a database, but not used on scripting side. Remark: Some of these errors are related to not applied sql updates. Signed-off-by: Schmoozerd --- ScriptMgr.cpp | 31 ++++++++++++++++++++++--------- sd2_revision_nr.h | 2 +- sql/scriptdev2_script_full.sql | 2 +- sql/updates/r2080_scriptdev2.sql | 1 + 4 files changed, 25 insertions(+), 11 deletions(-) create mode 100644 sql/updates/r2080_scriptdev2.sql diff --git a/ScriptMgr.cpp b/ScriptMgr.cpp index ee56504cf..a6a99202c 100644 --- a/ScriptMgr.cpp +++ b/ScriptMgr.cpp @@ -30,7 +30,7 @@ void LoadDatabase() return; } - //Initialize connection to DB + // Initialize connection to DB if (SD2Database.Initialize(strSD2DBinfo.c_str())) { outstring_log("SD2: ScriptDev2 database at %s initialized.", strSD2DBinfo.c_str()); @@ -73,7 +73,7 @@ void FreeScriptLibrary() MANGOS_DLL_EXPORT void InitScriptLibrary() { - //ScriptDev2 startup + // ScriptDev2 startup outstring_log(""); outstring_log(" MMM MMM MM"); outstring_log("M MM M M M M"); @@ -84,19 +84,19 @@ void InitScriptLibrary() outstring_log(" MMM MMM http://www.scriptdev2.com"); outstring_log(""); - //Get configuration file + // Get configuration file if (!SD2Config.SetSource(_SCRIPTDEV2_CONFIG)) error_log("SD2: Unable to open configuration file. Database will be unaccessible. Configuration values will use default."); else outstring_log("SD2: Using configuration file %s",_SCRIPTDEV2_CONFIG); - //Check config file version + // Check config file version if (SD2Config.GetIntDefault("ConfVersion", 0) != SD2_CONF_VERSION) error_log("SD2: Configuration file version doesn't match expected version. Some config variables may be wrong or missing."); outstring_log(""); - //Load database (must be called after SD2Config.SetSource). + // Load database (must be called after SD2Config.SetSource). LoadDatabase(); outstring_log("SD2: Loading C++ scripts"); @@ -104,6 +104,10 @@ void InitScriptLibrary() bar.step(); outstring_log(""); + // Check ammount of assigned ScriptNames (from core) + if (GetScriptIdsCount() >= MAX_SCRIPTS) + error_log("SD2: Reserved script slots in script table (%u) too low for registered ScriptNames by core (%u).", MAX_SCRIPTS, GetScriptIdsCount()); + for(int i=0; i> Loaded %i C++ Scripts.", num_sc_scripts); } @@ -205,11 +214,15 @@ void DoScriptText(int32 iTextEntry, WorldObject* pSource, Unit* pTarget) void Script::RegisterSelf(bool bReportError) { - int id = GetScriptId(Name.c_str()); - if (id != 0) + if (int id = GetScriptId(Name.c_str())) { - m_scripts[id] = this; - ++num_sc_scripts; + if (id < MAX_SCRIPTS) + { + m_scripts[id] = this; + ++num_sc_scripts; + } + else + error_log("SD2: script %s have script id %u > MAX_SCRIPTS (%u), MAX_SCRIPTS need update for allow script loading.", Name.c_str(), id, MAX_SCRIPTS); } else { diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index dfe433c3d..540bf96bc 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2079" + #define SD2_REVISION_NR "2080" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index c0d1f26b4..a0c345f1c 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -3,7 +3,7 @@ -- DELETE FROM sd2_db_version; -INSERT INTO sd2_db_version (version) VALUES ('ScriptDev2 (for MaNGOS 11421+) '); +INSERT INTO sd2_db_version (version) VALUES ('ScriptDev2 (for MaNGOS 11432+) '); -- -- Below contains data for table `script_texts` mainly used in C++ parts. diff --git a/sql/updates/r2080_scriptdev2.sql b/sql/updates/r2080_scriptdev2.sql new file mode 100644 index 000000000..e4db2336b --- /dev/null +++ b/sql/updates/r2080_scriptdev2.sql @@ -0,0 +1 @@ +UPDATE sd2_db_version SET version='ScriptDev2 (for MaNGOS 11432+) '; From 343b5fe9b7981b4164b3c59e522aa3d9e00f28b6 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Sat, 7 May 2011 17:53:26 +0200 Subject: [PATCH 0060/1172] [2081] Use dynamic vector to store Scripts Replace array of fixed size (was 5000) to std::vector Thanks to vladimir for the idea Signed-off-by: Schmoozerd --- ScriptMgr.cpp | 36 ++++++++++++++++-------------------- ScriptMgr.h | 1 - sd2_revision_nr.h | 2 +- 3 files changed, 17 insertions(+), 22 deletions(-) diff --git a/ScriptMgr.cpp b/ScriptMgr.cpp index a6a99202c..ecd9b77da 100644 --- a/ScriptMgr.cpp +++ b/ScriptMgr.cpp @@ -13,8 +13,9 @@ #include "../system/system.h" #include "../../../game/ScriptMgr.h" +typedef std::vector SDScriptVec; int num_sc_scripts; -Script *m_scripts[MAX_SCRIPTS]; +SDScriptVec m_scripts; Config SD2Config; @@ -64,8 +65,10 @@ void FreeScriptLibrary() delete []SpellSummary; // Free resources before library unload - for(int i=0; i= MAX_SCRIPTS) - error_log("SD2: Reserved script slots in script table (%u) too low for registered ScriptNames by core (%u).", MAX_SCRIPTS, GetScriptIdsCount()); - - for(int i=0; i> Loaded %i C++ Scripts.", num_sc_scripts); } @@ -214,20 +215,15 @@ void DoScriptText(int32 iTextEntry, WorldObject* pSource, Unit* pTarget) void Script::RegisterSelf(bool bReportError) { - if (int id = GetScriptId(Name.c_str())) + if (uint32 id = GetScriptId(Name.c_str())) { - if (id < MAX_SCRIPTS) - { - m_scripts[id] = this; - ++num_sc_scripts; - } - else - error_log("SD2: script %s have script id %u > MAX_SCRIPTS (%u), MAX_SCRIPTS need update for allow script loading.", Name.c_str(), id, MAX_SCRIPTS); + m_scripts[id] = this; + ++num_sc_scripts; } else { if (bReportError) - error_log("SD2: Script registering but ScriptName %s is not assigned in database. Script will not be used.", (this)->Name.c_str()); + error_log("SD2: Script registering but ScriptName %s is not assigned in database. Script will not be used.", Name.c_str()); delete this; } diff --git a/ScriptMgr.h b/ScriptMgr.h index f4257cdd5..6eb525fc7 100644 --- a/ScriptMgr.h +++ b/ScriptMgr.h @@ -22,7 +22,6 @@ class WorldObject; class Aura; class Object; -#define MAX_SCRIPTS 5000 //72 bytes each (approx 351kb) #define VISIBLE_RANGE (166.0f) //MAX visible range (size of grid) #define DEFAULT_TEXT "" diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 540bf96bc..31be17703 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2080" + #define SD2_REVISION_NR "2081" #endif // __SD2_REVISION_NR_H__ From bcb331f39a26b7ab3ac4c397bbe6db790bb00045 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Mon, 9 May 2011 19:59:40 +0200 Subject: [PATCH 0061/1172] [2082] Move Emerald Dragon Worldbosses to one file This commit only copies stuff and adds a few new comments. Remark that it will not compile! Signed-off-by: Schmoozerd --- VC100/100ScriptDev2.vcxproj | 5 +- VC100/100ScriptDev2.vcxproj.filters | 11 +- VC80/80ScriptDev2.vcproj | 14 +- VC90/90ScriptDev2.vcproj | 14 +- scripts/world/boss_emeriss.cpp | 142 ------ scripts/world/boss_lethon.cpp | 28 -- scripts/world/boss_taerar.cpp | 262 ----------- scripts/world/boss_ysondre.cpp | 200 -------- scripts/world/bosses_emerald_dragons.cpp | 573 +++++++++++++++++++++++ sd2_revision_nr.h | 2 +- system/ScriptLoader.cpp | 10 +- 11 files changed, 580 insertions(+), 681 deletions(-) delete mode 100644 scripts/world/boss_emeriss.cpp delete mode 100644 scripts/world/boss_lethon.cpp delete mode 100644 scripts/world/boss_taerar.cpp delete mode 100644 scripts/world/boss_ysondre.cpp create mode 100644 scripts/world/bosses_emerald_dragons.cpp diff --git a/VC100/100ScriptDev2.vcxproj b/VC100/100ScriptDev2.vcxproj index e609bb441..1f65b6a0f 100644 --- a/VC100/100ScriptDev2.vcxproj +++ b/VC100/100ScriptDev2.vcxproj @@ -676,10 +676,7 @@ - - - - + diff --git a/VC100/100ScriptDev2.vcxproj.filters b/VC100/100ScriptDev2.vcxproj.filters index 348a69e64..2fd1fc867 100644 --- a/VC100/100ScriptDev2.vcxproj.filters +++ b/VC100/100ScriptDev2.vcxproj.filters @@ -1683,16 +1683,7 @@ scripts\world - - scripts\world - - - scripts\world - - - scripts\world - - + scripts\world diff --git a/VC80/80ScriptDev2.vcproj b/VC80/80ScriptDev2.vcproj index f7f0b0d84..3b2729954 100644 --- a/VC80/80ScriptDev2.vcproj +++ b/VC80/80ScriptDev2.vcproj @@ -2878,19 +2878,7 @@ > - - - - - - - - - - - - - * 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: Emeriss -SD%Complete: 90 -SDComment: Teleport function & Mark of Nature missing -SDCategory: Bosses -EndScriptData */ - -#include "precompiled.h" - -enum -{ - SAY_AGGRO = -1000401, - SAY_CASTCORRUPTION = -1000402, - - SPELL_SLEEP = 24777, - SPELL_NOXIOUSBREATH = 24818, - SPELL_TAILSWEEP = 15847, - //SPELL_MARKOFNATURE = 25040, // Not working - SPELL_VOLATILEINFECTION = 24928, - SPELL_CORRUPTIONOFEARTH = 24910 -}; - -struct MANGOS_DLL_DECL boss_emerissAI : public ScriptedAI -{ - boss_emerissAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} - - uint32 m_uiSleep_Timer; - uint32 m_uiNoxiousBreath_Timer; - uint32 m_uiTailSweep_Timer; - //uint32 m_uiMarkOfNature_Timer; - uint32 m_uiVolatileInfection_Timer; - uint32 m_uiCorruptionsCasted; - - void Reset() - { - m_uiSleep_Timer = urand(15000, 20000); - m_uiNoxiousBreath_Timer = 8000; - m_uiTailSweep_Timer = 4000; - //m_uiMarkOfNature_Timer = 45000; - m_uiVolatileInfection_Timer = 12000; - m_uiCorruptionsCasted = 0; - } - - void Aggro(Unit* pWho) - { - DoScriptText(SAY_AGGRO, m_creature); - } - - void UpdateAI(const uint32 uiDiff) - { - //Return since we have no target - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - //Sleep_Timer - if (m_uiSleep_Timer < uiDiff) - { - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) - DoCastSpellIfCan(pTarget, SPELL_SLEEP); - - m_uiSleep_Timer = urand(8000, 16000); - } - else - m_uiSleep_Timer -= uiDiff; - - //NoxiousBreath_Timer - if (m_uiNoxiousBreath_Timer < uiDiff) - { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_NOXIOUSBREATH); - m_uiNoxiousBreath_Timer = urand(14000, 20000); - } - else - m_uiNoxiousBreath_Timer -= uiDiff; - - //Tailsweep every 2 seconds - if (m_uiTailSweep_Timer < uiDiff) - { - DoCastSpellIfCan(m_creature, SPELL_TAILSWEEP); - m_uiTailSweep_Timer = 2000; - } - else - m_uiTailSweep_Timer -= uiDiff; - - //MarkOfNature_Timer - //if (m_uiMarkOfNature_Timer < uiDiff) - //{ - // DoCastSpellIfCan(m_creature->getVictim(), SPELL_MARKOFNATURE); - // m_uiMarkOfNature_Timer = 45000; - //} - //else - //m_uiMarkOfNature_Timer -= uiDiff; - - //VolatileInfection_Timer - if (m_uiVolatileInfection_Timer < uiDiff) - { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_VOLATILEINFECTION); - m_uiVolatileInfection_Timer = urand(7000, 12000); - } - else - m_uiVolatileInfection_Timer -= uiDiff; - - //CorruptionofEarth at 75%, 50% and 25% - if (m_creature->GetHealthPercent() < float(100 - 25*m_uiCorruptionsCasted)) - { - ++m_uiCorruptionsCasted; // prevent casting twice on same hp - DoScriptText(SAY_CASTCORRUPTION, m_creature); - DoCastSpellIfCan(m_creature->getVictim(), SPELL_CORRUPTIONOFEARTH); - } - - DoMeleeAttackIfReady(); - } -}; - -CreatureAI* GetAI_boss_emeriss(Creature* pCreature) -{ - return new boss_emerissAI(pCreature); -} - -void AddSC_boss_emeriss() -{ - Script *newscript; - newscript = new Script; - newscript->Name = "boss_emeriss"; - newscript->GetAI = &GetAI_boss_emeriss; - newscript->RegisterSelf(); -} diff --git a/scripts/world/boss_lethon.cpp b/scripts/world/boss_lethon.cpp deleted file mode 100644 index 4c82f642a..000000000 --- a/scripts/world/boss_lethon.cpp +++ /dev/null @@ -1,28 +0,0 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 - * 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: Lethon -SD%Complete: 0 -SDComment: Place Holder -SDCategory: Bosses -EndScriptData */ - -#include "precompiled.h" - -void AddSC_boss_lethon() -{ -} diff --git a/scripts/world/boss_taerar.cpp b/scripts/world/boss_taerar.cpp deleted file mode 100644 index 1ec9db307..000000000 --- a/scripts/world/boss_taerar.cpp +++ /dev/null @@ -1,262 +0,0 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 - * 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: Taerar -SD%Complete: 70 -SDComment: Mark of Nature & Teleport NYI. Fix the way to be banished. -SDCategory: Bosses -EndScriptData */ - -#include "precompiled.h" - -enum -{ - SAY_AGGRO = -1000399, - SAY_SUMMONSHADE = -1000400, - - //Spells of Taerar - SPELL_SLEEP = 24777, - SPELL_NOXIOUSBREATH = 24818, - SPELL_TAILSWEEP = 15847, - // SPELL_MARKOFNATURE = 25040, // Not working - SPELL_ARCANEBLAST = 24857, - SPELL_BELLOWINGROAR = 22686, - - SPELL_SUMMONSHADE_1 = 24841, - SPELL_SUMMONSHADE_2 = 24842, - SPELL_SUMMONSHADE_3 = 24843, - - //Spells of Shades of Taerar - SPELL_POSIONCLOUD = 24840, - SPELL_POSIONBREATH = 20667 -}; - -uint32 m_auiSpellSummonShade[]= -{ - SPELL_SUMMONSHADE_1, SPELL_SUMMONSHADE_2, SPELL_SUMMONSHADE_3 -}; - -struct MANGOS_DLL_DECL boss_taerarAI : public ScriptedAI -{ - boss_taerarAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} - - uint32 m_uiSleep_Timer; - uint32 m_uiNoxiousBreath_Timer; - uint32 m_uiTailSweep_Timer; - //uint32 m_uiMarkOfNature_Timer; - uint32 m_uiArcaneBlast_Timer; - uint32 m_uiBellowingRoar_Timer; - uint32 m_uiShades_Timer; - uint32 m_uiShadesSummoned; - - bool m_bShades; - - void Reset() - { - m_uiSleep_Timer = urand(15000, 20000); - m_uiNoxiousBreath_Timer = 8000; - m_uiTailSweep_Timer = 4000; - //m_uiMarkOfNature_Timer = 45000; - m_uiArcaneBlast_Timer = 12000; - m_uiBellowingRoar_Timer = 30000; - m_uiShades_Timer = 60000; //The time that Taerar is banished - m_uiShadesSummoned = 0; - - m_bShades = false; - } - - void Aggro(Unit* pWho) - { - DoScriptText(SAY_AGGRO, m_creature); - } - - void JustSummoned(Creature* pSummoned) - { - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) - pSummoned->AI()->AttackStart(pTarget); - } - - void UpdateAI(const uint32 uiDiff) - { - if (m_bShades && m_uiShades_Timer < uiDiff) - { - //Become unbanished again - m_creature->setFaction(14); - m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - m_bShades = false; - } - else if (m_bShades) - { - m_uiShades_Timer -= uiDiff; - //Do nothing while banished - return; - } - - //Return since we have no target - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - //Sleep_Timer - if (m_uiSleep_Timer < uiDiff) - { - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) - DoCastSpellIfCan(pTarget, SPELL_SLEEP); - - m_uiSleep_Timer = urand(8000, 15000); - } - else - m_uiSleep_Timer -= uiDiff; - - //NoxiousBreath_Timer - if (m_uiNoxiousBreath_Timer < uiDiff) - { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_NOXIOUSBREATH); - m_uiNoxiousBreath_Timer = urand(14000, 20000); - } - else - m_uiNoxiousBreath_Timer -= uiDiff; - - //Tailsweep every 2 seconds - if (m_uiTailSweep_Timer < uiDiff) - { - DoCastSpellIfCan(m_creature, SPELL_TAILSWEEP); - m_uiTailSweep_Timer = 2000; - } - else - m_uiTailSweep_Timer -= uiDiff; - - //MarkOfNature_Timer - //if (m_uiMarkOfNature_Timer < uiDiff) - //{ - // DoCastSpellIfCan(m_creature->getVictim(), SPELL_MARKOFNATURE); - // m_uiMarkOfNature_Timer = 45000; - //} - //else - //m_uiMarkOfNature_Timer -= uiDiff; - - //ArcaneBlast_Timer - if (m_uiArcaneBlast_Timer < uiDiff) - { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_ARCANEBLAST); - m_uiArcaneBlast_Timer = urand(7000, 12000); - } - else - m_uiArcaneBlast_Timer -= uiDiff; - - //BellowingRoar_Timer - if (m_uiBellowingRoar_Timer < uiDiff) - { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_BELLOWINGROAR); - m_uiBellowingRoar_Timer = urand(20000, 30000); - } - else - m_uiBellowingRoar_Timer -= uiDiff; - - //Summon 3 Shades at 75%, 50% and 25% (if bShades is true we already left in line 117, no need to check here again) - if (!m_bShades && m_creature->GetHealthPercent() < float(100 - 25*m_uiShadesSummoned)) - { - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) - { - //Inturrupt any spell casting - m_creature->InterruptNonMeleeSpells(false); - - //horrible workaround, need to fix - m_creature->setFaction(35); - m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - - DoScriptText(SAY_SUMMONSHADE, m_creature); - - int iSize = sizeof(m_auiSpellSummonShade) / sizeof(uint32); - - for(int i = 0; i < iSize; ++i) - m_creature->CastSpell(pTarget, m_auiSpellSummonShade[i], true); - - ++m_uiShadesSummoned; // prevent casting twice at same health - m_bShades = true; - } - m_uiShades_Timer = 60000; - } - - DoMeleeAttackIfReady(); - } -}; - -// Shades of Taerar Script -struct MANGOS_DLL_DECL boss_shadeoftaerarAI : public ScriptedAI -{ - boss_shadeoftaerarAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} - - uint32 m_uiPoisonCloud_Timer; - uint32 m_uiPosionBreath_Timer; - - void Reset() - { - m_uiPoisonCloud_Timer = 8000; - m_uiPosionBreath_Timer = 12000; - } - - void UpdateAI(const uint32 uiDiff) - { - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - //PoisonCloud_Timer - if (m_uiPoisonCloud_Timer < uiDiff) - { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_POSIONCLOUD); - m_uiPoisonCloud_Timer = 30000; - } - else - m_uiPoisonCloud_Timer -= uiDiff; - - //PosionBreath_Timer - if (m_uiPosionBreath_Timer < uiDiff) - { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_POSIONBREATH); - m_uiPosionBreath_Timer = 12000; - } - else - m_uiPosionBreath_Timer -= uiDiff; - - DoMeleeAttackIfReady(); - } -}; - -CreatureAI* GetAI_boss_taerar(Creature* pCreature) -{ - return new boss_taerarAI(pCreature); -} - -CreatureAI* GetAI_boss_shadeoftaerar(Creature* pCreature) -{ - return new boss_shadeoftaerarAI(pCreature); -} - -void AddSC_boss_taerar() -{ - Script *newscript; - - newscript = new Script; - newscript->Name = "boss_taerar"; - newscript->GetAI = &GetAI_boss_taerar; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "boss_shade_of_taerar"; - newscript->GetAI = &GetAI_boss_shadeoftaerar; - newscript->RegisterSelf(); -} diff --git a/scripts/world/boss_ysondre.cpp b/scripts/world/boss_ysondre.cpp deleted file mode 100644 index b225649ba..000000000 --- a/scripts/world/boss_ysondre.cpp +++ /dev/null @@ -1,200 +0,0 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 - * 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: Ysondre -SD%Complete: 90 -SDComment: Mark of Nature & Teleport missing -SDCategory: Bosses -EndScriptData */ - -#include "precompiled.h" - -enum -{ - SAY_AGGRO = -1000360, - SAY_SUMMONDRUIDS = -1000361, - - SPELL_SLEEP = 24777, - SPELL_NOXIOUSBREATH = 24818, - SPELL_TAILSWEEP = 15847, - //SPELL_MARKOFNATURE = 25040, // Not working - SPELL_LIGHTNINGWAVE = 24819, - SPELL_SUMMONDRUIDS = 24795, - - SPELL_SUMMON_PLAYER = 24776, - - //druid spells - SPELL_MOONFIRE = 21669 -}; - -// Ysondre script -struct MANGOS_DLL_DECL boss_ysondreAI : public ScriptedAI -{ - boss_ysondreAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} - - uint32 m_uiSleep_Timer; - uint32 m_uiNoxiousBreath_Timer; - uint32 m_uiTailSweep_Timer; - //uint32 m_uiMarkOfNature_Timer; - uint32 m_uiLightningWave_Timer; - uint32 m_uiSummonDruidModifier; - - void Reset() - { - m_uiSleep_Timer = urand(15000, 20000); - m_uiNoxiousBreath_Timer = 8000; - m_uiTailSweep_Timer = 4000; - //m_uiMarkOfNature_Timer = 45000; - m_uiLightningWave_Timer = 12000; - m_uiSummonDruidModifier = 0; - } - - void Aggro(Unit* pWho) - { - DoScriptText(SAY_AGGRO, m_creature); - } - - void JustSummoned(Creature* pSummoned) - { - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) - pSummoned->AI()->AttackStart(pTarget); - } - - void UpdateAI(const uint32 uiDiff) - { - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - //Sleep_Timer - if (m_uiSleep_Timer < uiDiff) - { - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) - DoCastSpellIfCan(pTarget, SPELL_SLEEP); - - m_uiSleep_Timer = urand(8000, 15000); - } - else - m_uiSleep_Timer -= uiDiff; - - //NoxiousBreath_Timer - if (m_uiNoxiousBreath_Timer < uiDiff) - { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_NOXIOUSBREATH); - m_uiNoxiousBreath_Timer = urand(14000, 20000); - } - else - m_uiNoxiousBreath_Timer -= uiDiff; - - //Tailsweep every 2 seconds - if (m_uiTailSweep_Timer < uiDiff) - { - DoCastSpellIfCan(m_creature, SPELL_TAILSWEEP); - m_uiTailSweep_Timer = 2000; - } - else - m_uiTailSweep_Timer -= uiDiff; - - //MarkOfNature_Timer - //if (m_uiMarkOfNature_Timer < uiDiff) - //{ - // DoCastSpellIfCan(m_creature->getVictim(), SPELL_MARKOFNATURE); - // m_uiMarkOfNature_Timer = 45000; - //} - //else - //m_uiMarkOfNature_Timer -= uiDiff; - - //LightningWave_Timer - if (m_uiLightningWave_Timer < uiDiff) - { - //Cast LIGHTNINGWAVE on a Random target - if (Unit *pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) - DoCastSpellIfCan(pTarget, SPELL_LIGHTNINGWAVE); - - m_uiLightningWave_Timer = urand(7000, 12000); - } - else - m_uiLightningWave_Timer -= uiDiff; - - //Summon Druids - if (m_creature->GetHealthPercent() <= float(100 - 25*m_uiSummonDruidModifier)) - { - DoScriptText(SAY_SUMMONDRUIDS, m_creature); - - for(int i = 0; i < 10; ++i) - DoCastSpellIfCan(m_creature, SPELL_SUMMONDRUIDS, CAST_TRIGGERED); - - ++m_uiSummonDruidModifier; - } - - DoMeleeAttackIfReady(); - } -}; - -// Summoned druid script -struct MANGOS_DLL_DECL mob_dementeddruidsAI : public ScriptedAI -{ - mob_dementeddruidsAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} - - uint32 m_uiMoonFire_Timer; - - void Reset() - { - m_uiMoonFire_Timer = 3000; - } - - void UpdateAI(const uint32 uiDiff) - { - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - //MoonFire_Timer - if (m_uiMoonFire_Timer < uiDiff) - { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_MOONFIRE); - m_uiMoonFire_Timer = 5000; - } - else - m_uiMoonFire_Timer -= uiDiff; - - DoMeleeAttackIfReady(); - } -}; - -CreatureAI* GetAI_boss_ysondre(Creature* pCreature) -{ - return new boss_ysondreAI(pCreature); -} - -CreatureAI* GetAI_mob_dementeddruids(Creature* pCreature) -{ - return new mob_dementeddruidsAI(pCreature); -} - -void AddSC_boss_ysondre() -{ - Script *newscript; - - newscript = new Script; - newscript->Name = "boss_ysondre"; - newscript->GetAI = &GetAI_boss_ysondre; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "mob_dementeddruids"; - newscript->GetAI = &GetAI_mob_dementeddruids; - newscript->RegisterSelf(); -} diff --git a/scripts/world/bosses_emerald_dragons.cpp b/scripts/world/bosses_emerald_dragons.cpp new file mode 100644 index 000000000..ac1991a6c --- /dev/null +++ b/scripts/world/bosses_emerald_dragons.cpp @@ -0,0 +1,573 @@ +/* Copyright (C) 2006 - 2011 ScriptDev2 + * 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: bosses_emerald_dragons +SD%Complete: 70 +SDComment: Emeriss 90, Lethon 0, Taerar 80, Ysondre 90 - Player-Teleport function missing, Mark of Nature needs core support +SDCategory: Emerald Dragon Bosses +EndScriptData */ + +/* ContentData +boss_emeriss +boss_taerar +boss_shade_of_taerar -- TODO move to Acid +boss_ysondre +mob_dementeddruids; -- TODO move to Acid +EndContentData */ + +#include "precompiled.h" + +/*###### +## boss_emeriss +######*/ + +enum +{ + SAY_EMERISS_AGGRO = -1000401, + SAY_CASTCORRUPTION = -1000402, + + SPELL_SLEEP = 24777, + SPELL_NOXIOUSBREATH = 24818, + SPELL_TAILSWEEP = 15847, + //SPELL_MARKOFNATURE = 25040, // Not working + SPELL_VOLATILEINFECTION = 24928, + SPELL_CORRUPTIONOFEARTH = 24910 +}; + +struct MANGOS_DLL_DECL boss_emerissAI : public ScriptedAI +{ + boss_emerissAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + uint32 m_uiSleep_Timer; + uint32 m_uiNoxiousBreath_Timer; + uint32 m_uiTailSweep_Timer; + //uint32 m_uiMarkOfNature_Timer; + uint32 m_uiVolatileInfection_Timer; + uint32 m_uiCorruptionsCasted; + + void Reset() + { + m_uiSleep_Timer = urand(15000, 20000); + m_uiNoxiousBreath_Timer = 8000; + m_uiTailSweep_Timer = 4000; + //m_uiMarkOfNature_Timer = 45000; + m_uiVolatileInfection_Timer = 12000; + m_uiCorruptionsCasted = 0; + } + + void Aggro(Unit* pWho) + { + DoScriptText(SAY_EMERISS_AGGRO, m_creature); + } + + void UpdateAI(const uint32 uiDiff) + { + //Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //Sleep_Timer + if (m_uiSleep_Timer < uiDiff) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + DoCastSpellIfCan(pTarget, SPELL_SLEEP); + + m_uiSleep_Timer = urand(8000, 16000); + } + else + m_uiSleep_Timer -= uiDiff; + + //NoxiousBreath_Timer + if (m_uiNoxiousBreath_Timer < uiDiff) + { + DoCastSpellIfCan(m_creature->getVictim(), SPELL_NOXIOUSBREATH); + m_uiNoxiousBreath_Timer = urand(14000, 20000); + } + else + m_uiNoxiousBreath_Timer -= uiDiff; + + //Tailsweep every 2 seconds + if (m_uiTailSweep_Timer < uiDiff) + { + DoCastSpellIfCan(m_creature, SPELL_TAILSWEEP); + m_uiTailSweep_Timer = 2000; + } + else + m_uiTailSweep_Timer -= uiDiff; + + //MarkOfNature_Timer + //if (m_uiMarkOfNature_Timer < uiDiff) + //{ + // DoCastSpellIfCan(m_creature->getVictim(), SPELL_MARKOFNATURE); + // m_uiMarkOfNature_Timer = 45000; + //} + //else + //m_uiMarkOfNature_Timer -= uiDiff; + + //VolatileInfection_Timer + if (m_uiVolatileInfection_Timer < uiDiff) + { + DoCastSpellIfCan(m_creature->getVictim(), SPELL_VOLATILEINFECTION); + m_uiVolatileInfection_Timer = urand(7000, 12000); + } + else + m_uiVolatileInfection_Timer -= uiDiff; + + //CorruptionofEarth at 75%, 50% and 25% + if (m_creature->GetHealthPercent() < float(100 - 25*m_uiCorruptionsCasted)) + { + ++m_uiCorruptionsCasted; // prevent casting twice on same hp + DoScriptText(SAY_CASTCORRUPTION, m_creature); + DoCastSpellIfCan(m_creature->getVictim(), SPELL_CORRUPTIONOFEARTH); + } + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_emeriss(Creature* pCreature) +{ + return new boss_emerissAI(pCreature); +} + +/*###### +## boss_lethon +######*/ + +// TODO + +/*###### +## boss_taerar +######*/ + +enum +{ + SAY_TAERAR_AGGRO = -1000399, + SAY_SUMMONSHADE = -1000400, + + //Spells of Taerar + SPELL_SLEEP = 24777, + SPELL_NOXIOUSBREATH = 24818, + SPELL_TAILSWEEP = 15847, + // SPELL_MARKOFNATURE = 25040, // Not working + SPELL_ARCANEBLAST = 24857, + SPELL_BELLOWINGROAR = 22686, + + SPELL_SUMMONSHADE_1 = 24841, + SPELL_SUMMONSHADE_2 = 24842, + SPELL_SUMMONSHADE_3 = 24843, + + //Spells of Shades of Taerar + SPELL_POSIONCLOUD = 24840, + SPELL_POSIONBREATH = 20667 +}; + +uint32 m_auiSpellSummonShade[]= +{ + SPELL_SUMMONSHADE_1, SPELL_SUMMONSHADE_2, SPELL_SUMMONSHADE_3 +}; + +struct MANGOS_DLL_DECL boss_taerarAI : public ScriptedAI +{ + boss_taerarAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + uint32 m_uiSleep_Timer; + uint32 m_uiNoxiousBreath_Timer; + uint32 m_uiTailSweep_Timer; + //uint32 m_uiMarkOfNature_Timer; + uint32 m_uiArcaneBlast_Timer; + uint32 m_uiBellowingRoar_Timer; + uint32 m_uiShades_Timer; + uint32 m_uiShadesSummoned; + + bool m_bShades; + + void Reset() + { + m_uiSleep_Timer = urand(15000, 20000); + m_uiNoxiousBreath_Timer = 8000; + m_uiTailSweep_Timer = 4000; + //m_uiMarkOfNature_Timer = 45000; + m_uiArcaneBlast_Timer = 12000; + m_uiBellowingRoar_Timer = 30000; + m_uiShades_Timer = 60000; //The time that Taerar is banished + m_uiShadesSummoned = 0; + + m_bShades = false; + } + + void Aggro(Unit* pWho) + { + DoScriptText(SAY_TAERAR_AGGRO, m_creature); + } + + void JustSummoned(Creature* pSummoned) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + pSummoned->AI()->AttackStart(pTarget); + } + + void UpdateAI(const uint32 uiDiff) + { + if (m_bShades && m_uiShades_Timer < uiDiff) + { + //Become unbanished again + m_creature->setFaction(14); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + m_bShades = false; + } + else if (m_bShades) + { + m_uiShades_Timer -= uiDiff; + //Do nothing while banished + return; + } + + //Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //Sleep_Timer + if (m_uiSleep_Timer < uiDiff) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + DoCastSpellIfCan(pTarget, SPELL_SLEEP); + + m_uiSleep_Timer = urand(8000, 15000); + } + else + m_uiSleep_Timer -= uiDiff; + + //NoxiousBreath_Timer + if (m_uiNoxiousBreath_Timer < uiDiff) + { + DoCastSpellIfCan(m_creature->getVictim(), SPELL_NOXIOUSBREATH); + m_uiNoxiousBreath_Timer = urand(14000, 20000); + } + else + m_uiNoxiousBreath_Timer -= uiDiff; + + //Tailsweep every 2 seconds + if (m_uiTailSweep_Timer < uiDiff) + { + DoCastSpellIfCan(m_creature, SPELL_TAILSWEEP); + m_uiTailSweep_Timer = 2000; + } + else + m_uiTailSweep_Timer -= uiDiff; + + //MarkOfNature_Timer + //if (m_uiMarkOfNature_Timer < uiDiff) + //{ + // DoCastSpellIfCan(m_creature->getVictim(), SPELL_MARKOFNATURE); + // m_uiMarkOfNature_Timer = 45000; + //} + //else + //m_uiMarkOfNature_Timer -= uiDiff; + + //ArcaneBlast_Timer + if (m_uiArcaneBlast_Timer < uiDiff) + { + DoCastSpellIfCan(m_creature->getVictim(), SPELL_ARCANEBLAST); + m_uiArcaneBlast_Timer = urand(7000, 12000); + } + else + m_uiArcaneBlast_Timer -= uiDiff; + + //BellowingRoar_Timer + if (m_uiBellowingRoar_Timer < uiDiff) + { + DoCastSpellIfCan(m_creature->getVictim(), SPELL_BELLOWINGROAR); + m_uiBellowingRoar_Timer = urand(20000, 30000); + } + else + m_uiBellowingRoar_Timer -= uiDiff; + + //Summon 3 Shades at 75%, 50% and 25% (if bShades is true we already left in line 117, no need to check here again) + if (!m_bShades && m_creature->GetHealthPercent() < float(100 - 25*m_uiShadesSummoned)) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + //Inturrupt any spell casting + m_creature->InterruptNonMeleeSpells(false); + + //horrible workaround, need to fix + m_creature->setFaction(35); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + + DoScriptText(SAY_SUMMONSHADE, m_creature); + + int iSize = sizeof(m_auiSpellSummonShade) / sizeof(uint32); + + for(int i = 0; i < iSize; ++i) + m_creature->CastSpell(pTarget, m_auiSpellSummonShade[i], true); + + ++m_uiShadesSummoned; // prevent casting twice at same health + m_bShades = true; + } + m_uiShades_Timer = 60000; + } + + DoMeleeAttackIfReady(); + } +}; + +// Shades of Taerar Script +struct MANGOS_DLL_DECL boss_shadeoftaerarAI : public ScriptedAI +{ + boss_shadeoftaerarAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + uint32 m_uiPoisonCloud_Timer; + uint32 m_uiPosionBreath_Timer; + + void Reset() + { + m_uiPoisonCloud_Timer = 8000; + m_uiPosionBreath_Timer = 12000; + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //PoisonCloud_Timer + if (m_uiPoisonCloud_Timer < uiDiff) + { + DoCastSpellIfCan(m_creature->getVictim(), SPELL_POSIONCLOUD); + m_uiPoisonCloud_Timer = 30000; + } + else + m_uiPoisonCloud_Timer -= uiDiff; + + //PosionBreath_Timer + if (m_uiPosionBreath_Timer < uiDiff) + { + DoCastSpellIfCan(m_creature->getVictim(), SPELL_POSIONBREATH); + m_uiPosionBreath_Timer = 12000; + } + else + m_uiPosionBreath_Timer -= uiDiff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_taerar(Creature* pCreature) +{ + return new boss_taerarAI(pCreature); +} + +CreatureAI* GetAI_boss_shadeoftaerar(Creature* pCreature) +{ + return new boss_shadeoftaerarAI(pCreature); +} + +/*###### +## boss_ysondre +######*/ + +enum +{ + SAY_YSONDRE_AGGRO = -1000360, + SAY_SUMMONDRUIDS = -1000361, + + SPELL_SLEEP = 24777, + SPELL_NOXIOUSBREATH = 24818, + SPELL_TAILSWEEP = 15847, + //SPELL_MARKOFNATURE = 25040, // Not working + SPELL_LIGHTNINGWAVE = 24819, + SPELL_SUMMONDRUIDS = 24795, + + SPELL_SUMMON_PLAYER = 24776, + + //druid spells + SPELL_MOONFIRE = 21669 +}; + +// Ysondre script +struct MANGOS_DLL_DECL boss_ysondreAI : public ScriptedAI +{ + boss_ysondreAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + uint32 m_uiSleep_Timer; + uint32 m_uiNoxiousBreath_Timer; + uint32 m_uiTailSweep_Timer; + //uint32 m_uiMarkOfNature_Timer; + uint32 m_uiLightningWave_Timer; + uint32 m_uiSummonDruidModifier; + + void Reset() + { + m_uiSleep_Timer = urand(15000, 20000); + m_uiNoxiousBreath_Timer = 8000; + m_uiTailSweep_Timer = 4000; + //m_uiMarkOfNature_Timer = 45000; + m_uiLightningWave_Timer = 12000; + m_uiSummonDruidModifier = 0; + } + + void Aggro(Unit* pWho) + { + DoScriptText(SAY_YSONDRE_AGGRO, m_creature); + } + + void JustSummoned(Creature* pSummoned) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + pSummoned->AI()->AttackStart(pTarget); + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //Sleep_Timer + if (m_uiSleep_Timer < uiDiff) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + DoCastSpellIfCan(pTarget, SPELL_SLEEP); + + m_uiSleep_Timer = urand(8000, 15000); + } + else + m_uiSleep_Timer -= uiDiff; + + //NoxiousBreath_Timer + if (m_uiNoxiousBreath_Timer < uiDiff) + { + DoCastSpellIfCan(m_creature->getVictim(), SPELL_NOXIOUSBREATH); + m_uiNoxiousBreath_Timer = urand(14000, 20000); + } + else + m_uiNoxiousBreath_Timer -= uiDiff; + + //Tailsweep every 2 seconds + if (m_uiTailSweep_Timer < uiDiff) + { + DoCastSpellIfCan(m_creature, SPELL_TAILSWEEP); + m_uiTailSweep_Timer = 2000; + } + else + m_uiTailSweep_Timer -= uiDiff; + + //MarkOfNature_Timer + //if (m_uiMarkOfNature_Timer < uiDiff) + //{ + // DoCastSpellIfCan(m_creature->getVictim(), SPELL_MARKOFNATURE); + // m_uiMarkOfNature_Timer = 45000; + //} + //else + //m_uiMarkOfNature_Timer -= uiDiff; + + //LightningWave_Timer + if (m_uiLightningWave_Timer < uiDiff) + { + //Cast LIGHTNINGWAVE on a Random target + if (Unit *pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + DoCastSpellIfCan(pTarget, SPELL_LIGHTNINGWAVE); + + m_uiLightningWave_Timer = urand(7000, 12000); + } + else + m_uiLightningWave_Timer -= uiDiff; + + //Summon Druids + if (m_creature->GetHealthPercent() <= float(100 - 25*m_uiSummonDruidModifier)) + { + DoScriptText(SAY_SUMMONDRUIDS, m_creature); + + for(int i = 0; i < 10; ++i) + DoCastSpellIfCan(m_creature, SPELL_SUMMONDRUIDS, CAST_TRIGGERED); + + ++m_uiSummonDruidModifier; + } + + DoMeleeAttackIfReady(); + } +}; + +// Summoned druid script +struct MANGOS_DLL_DECL mob_dementeddruidsAI : public ScriptedAI +{ + mob_dementeddruidsAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + uint32 m_uiMoonFire_Timer; + + void Reset() + { + m_uiMoonFire_Timer = 3000; + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //MoonFire_Timer + if (m_uiMoonFire_Timer < uiDiff) + { + DoCastSpellIfCan(m_creature->getVictim(), SPELL_MOONFIRE); + m_uiMoonFire_Timer = 5000; + } + else + m_uiMoonFire_Timer -= uiDiff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_ysondre(Creature* pCreature) +{ + return new boss_ysondreAI(pCreature); +} + +CreatureAI* GetAI_mob_dementeddruids(Creature* pCreature) +{ + return new mob_dementeddruidsAI(pCreature); +} + +void AddSC_bosses_emerald_dragons() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "boss_emeriss"; + newscript->GetAI = &GetAI_boss_emeriss; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "boss_taerar"; + newscript->GetAI = &GetAI_boss_taerar; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "boss_shade_of_taerar"; + newscript->GetAI = &GetAI_boss_shadeoftaerar; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "boss_ysondre"; + newscript->GetAI = &GetAI_boss_ysondre; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_dementeddruids"; + newscript->GetAI = &GetAI_mob_dementeddruids; + newscript->RegisterSelf(); +} diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 31be17703..7bb127801 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2081" + #define SD2_REVISION_NR "2082" #endif // __SD2_REVISION_NR_H__ diff --git a/system/ScriptLoader.cpp b/system/ScriptLoader.cpp index ba0e7fd87..d1c6db632 100644 --- a/system/ScriptLoader.cpp +++ b/system/ScriptLoader.cpp @@ -17,10 +17,7 @@ extern void AddSC_example_misc(); // world extern void AddSC_areatrigger_scripts(); -extern void AddSC_boss_emeriss(); -extern void AddSC_boss_lethon(); -extern void AddSC_boss_taerar(); -extern void AddSC_boss_ysondre(); +extern void AddSC_bosses_emerald_dragons(); extern void AddSC_generic_creature(); extern void AddSC_go_scripts(); extern void AddSC_guards(); @@ -509,10 +506,7 @@ void AddScripts() // world AddSC_areatrigger_scripts(); - AddSC_boss_emeriss(); - AddSC_boss_lethon(); - AddSC_boss_taerar(); - AddSC_boss_ysondre(); + AddSC_bosses_emerald_dragons(); AddSC_generic_creature(); AddSC_go_scripts(); AddSC_guards(); From d988e7e71a68aed29016b0556a7225545c8dc741 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Mon, 9 May 2011 16:57:26 +0200 Subject: [PATCH 0062/1172] [2083] Add superclass for Emerald Dragons --- scripts/world/bosses_emerald_dragons.cpp | 103 ++++++++++++++++++----- sd2_revision_nr.h | 2 +- 2 files changed, 82 insertions(+), 23 deletions(-) diff --git a/scripts/world/bosses_emerald_dragons.cpp b/scripts/world/bosses_emerald_dragons.cpp index ac1991a6c..8e0fd7b76 100644 --- a/scripts/world/bosses_emerald_dragons.cpp +++ b/scripts/world/bosses_emerald_dragons.cpp @@ -22,6 +22,7 @@ SDCategory: Emerald Dragon Bosses EndScriptData */ /* ContentData +boss_emerald_dragon -- Superclass for the four dragons boss_emeriss boss_taerar boss_shade_of_taerar -- TODO move to Acid @@ -31,6 +32,52 @@ EndContentData */ #include "precompiled.h" +/*###### +## boss_emerald_dragon -- Superclass for the four dragons +######*/ + +enum SpecialDragonEvent +{ + EVENT_75_HEALTH = 1, + EVENT_50_HEALTH = 2, + EVENT_25_HEALTH = 3, +}; + +struct MANGOS_DLL_DECL boss_emerald_dragonAI : public ScriptedAI +{ + boss_emerald_dragonAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } + + uint32 m_uiEventCounter; + + void Reset() + { + m_uiEventCounter = EVENT_75_HEALTH; + } + + // Return true, if succeeded + virtual bool DoSpecialDragonAbility(SpecialDragonEvent uiEvent) = 0; + + // Return true to handle shared timers and MeleeAttack + virtual bool UpdateDragonAI(const uint32 uiDiff) { return true; } + + void UpdateAI(const uint32 uiDiff) + { + // Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + // Trigger special ability function at 75, 50 and 25% health + if (m_creature->GetHealthPercent() < 100.0f - m_uiEventCounter * 25.0f && DoSpecialDragonAbility((SpecialDragonEvent) m_uiEventCounter)) + ++m_uiEventCounter; + + // Call dragon specific virtual function + if (!UpdateDragonAI(uiDiff)) + return; + + DoMeleeAttackIfReady(); + } +}; + /*###### ## boss_emeriss ######*/ @@ -48,9 +95,9 @@ enum SPELL_CORRUPTIONOFEARTH = 24910 }; -struct MANGOS_DLL_DECL boss_emerissAI : public ScriptedAI +struct MANGOS_DLL_DECL boss_emerissAI : public boss_emerald_dragonAI { - boss_emerissAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + boss_emerissAI(Creature* pCreature) : boss_emerald_dragonAI(pCreature) { Reset(); } uint32 m_uiSleep_Timer; uint32 m_uiNoxiousBreath_Timer; @@ -61,6 +108,8 @@ struct MANGOS_DLL_DECL boss_emerissAI : public ScriptedAI void Reset() { + boss_emerald_dragonAI::Reset(); + m_uiSleep_Timer = urand(15000, 20000); m_uiNoxiousBreath_Timer = 8000; m_uiTailSweep_Timer = 4000; @@ -74,12 +123,13 @@ struct MANGOS_DLL_DECL boss_emerissAI : public ScriptedAI DoScriptText(SAY_EMERISS_AGGRO, m_creature); } - void UpdateAI(const uint32 uiDiff) + bool DoSpecialDragonAbility(SpecialDragonEvent uiEvent) { - //Return since we have no target - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; + return true; + } + bool UpdateDragonAI(const uint32 uiDiff) + { //Sleep_Timer if (m_uiSleep_Timer < uiDiff) { @@ -135,7 +185,7 @@ struct MANGOS_DLL_DECL boss_emerissAI : public ScriptedAI DoCastSpellIfCan(m_creature->getVictim(), SPELL_CORRUPTIONOFEARTH); } - DoMeleeAttackIfReady(); + return true; } }; @@ -181,9 +231,9 @@ uint32 m_auiSpellSummonShade[]= SPELL_SUMMONSHADE_1, SPELL_SUMMONSHADE_2, SPELL_SUMMONSHADE_3 }; -struct MANGOS_DLL_DECL boss_taerarAI : public ScriptedAI +struct MANGOS_DLL_DECL boss_taerarAI : public boss_emerald_dragonAI { - boss_taerarAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + boss_taerarAI(Creature* pCreature) : boss_emerald_dragonAI(pCreature) { Reset(); } uint32 m_uiSleep_Timer; uint32 m_uiNoxiousBreath_Timer; @@ -198,6 +248,8 @@ struct MANGOS_DLL_DECL boss_taerarAI : public ScriptedAI void Reset() { + boss_emerald_dragonAI::Reset(); + m_uiSleep_Timer = urand(15000, 20000); m_uiNoxiousBreath_Timer = 8000; m_uiTailSweep_Timer = 4000; @@ -221,8 +273,14 @@ struct MANGOS_DLL_DECL boss_taerarAI : public ScriptedAI pSummoned->AI()->AttackStart(pTarget); } - void UpdateAI(const uint32 uiDiff) + bool DoSpecialDragonAbility(SpecialDragonEvent uiEvent) + { + return true; + } + + bool UpdateDragonAI(const uint32 uiDiff) { + // <<<<<<<<< TODO - FIXME - This code was called also OOC if (m_bShades && m_uiShades_Timer < uiDiff) { //Become unbanished again @@ -234,12 +292,9 @@ struct MANGOS_DLL_DECL boss_taerarAI : public ScriptedAI { m_uiShades_Timer -= uiDiff; //Do nothing while banished - return; + return false; } - - //Return since we have no target - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; + // >>>>>>>>> end of FIXME //Sleep_Timer if (m_uiSleep_Timer < uiDiff) @@ -322,7 +377,7 @@ struct MANGOS_DLL_DECL boss_taerarAI : public ScriptedAI m_uiShades_Timer = 60000; } - DoMeleeAttackIfReady(); + return true; } }; @@ -400,9 +455,9 @@ enum }; // Ysondre script -struct MANGOS_DLL_DECL boss_ysondreAI : public ScriptedAI +struct MANGOS_DLL_DECL boss_ysondreAI : public boss_emerald_dragonAI { - boss_ysondreAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + boss_ysondreAI(Creature* pCreature) : boss_emerald_dragonAI(pCreature) { Reset(); } uint32 m_uiSleep_Timer; uint32 m_uiNoxiousBreath_Timer; @@ -413,6 +468,8 @@ struct MANGOS_DLL_DECL boss_ysondreAI : public ScriptedAI void Reset() { + boss_emerald_dragonAI::Reset(); + m_uiSleep_Timer = urand(15000, 20000); m_uiNoxiousBreath_Timer = 8000; m_uiTailSweep_Timer = 4000; @@ -432,11 +489,13 @@ struct MANGOS_DLL_DECL boss_ysondreAI : public ScriptedAI pSummoned->AI()->AttackStart(pTarget); } - void UpdateAI(const uint32 uiDiff) + bool DoSpecialDragonAbility(SpecialDragonEvent uiEvent) { - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; + return true; + } + bool UpdateDragonAI(const uint32 uiDiff) + { //Sleep_Timer if (m_uiSleep_Timer < uiDiff) { @@ -498,7 +557,7 @@ struct MANGOS_DLL_DECL boss_ysondreAI : public ScriptedAI ++m_uiSummonDruidModifier; } - DoMeleeAttackIfReady(); + return true; } }; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 7bb127801..f02fcdb2b 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2082" + #define SD2_REVISION_NR "2083" #endif // __SD2_REVISION_NR_H__ From 5fbfd0bdadc8b11efbadc34d2cbc10e03cbb4f66 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Mon, 9 May 2011 17:36:13 +0200 Subject: [PATCH 0063/1172] [2084] Move abilities of Emerald Dragons to proper place * Move Tailsweep * Move Noxious Breath * Move Seeping Fog * Move Emeriss special ability to proper place * Move Taerar special ability to proper place * Move Ysondre special ability to proper place Signed-off-by: Schmoozerd --- scripts/world/bosses_emerald_dragons.cpp | 260 ++++++++--------------- sd2_revision_nr.h | 2 +- 2 files changed, 91 insertions(+), 171 deletions(-) diff --git a/scripts/world/bosses_emerald_dragons.cpp b/scripts/world/bosses_emerald_dragons.cpp index 8e0fd7b76..b21b768d9 100644 --- a/scripts/world/bosses_emerald_dragons.cpp +++ b/scripts/world/bosses_emerald_dragons.cpp @@ -36,6 +36,17 @@ EndContentData */ ## boss_emerald_dragon -- Superclass for the four dragons ######*/ +enum +{ + SPELL_SEEPING_FOG_R = 24813, // Summons 15224 'Dream Fog' + SPELL_SEEPING_FOG_L = 24814, + SPELL_DREAM_FOG = 24777, // Used by summoned Adds + SPELL_NOXIOUS_BREATH = 24818, + SPELL_TAILSWEEP = 15847, + + NPC_DREAM_FOG = 15224, +}; + enum SpecialDragonEvent { EVENT_75_HEALTH = 1, @@ -49,9 +60,17 @@ struct MANGOS_DLL_DECL boss_emerald_dragonAI : public ScriptedAI uint32 m_uiEventCounter; + uint32 m_uiSeepingFogTimer; + uint32 m_uiNoxiousBreathTimer; + uint32 m_uiTailsweepTimer; + void Reset() { m_uiEventCounter = EVENT_75_HEALTH; + + m_uiSeepingFogTimer = urand(15000, 20000); + m_uiNoxiousBreathTimer = 8000; + m_uiTailsweepTimer = 4000; } // Return true, if succeeded @@ -74,6 +93,31 @@ struct MANGOS_DLL_DECL boss_emerald_dragonAI : public ScriptedAI if (!UpdateDragonAI(uiDiff)) return; + if (m_uiSeepingFogTimer < uiDiff) + { + DoCastSpellIfCan(m_creature, SPELL_SEEPING_FOG_R, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_SEEPING_FOG_L, CAST_TRIGGERED); + m_uiSeepingFogTimer = urand(8000, 16000); + } + else + m_uiSeepingFogTimer -= uiDiff; + + if (m_uiNoxiousBreathTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_NOXIOUS_BREATH) == CAST_OK) + m_uiNoxiousBreathTimer = urand(14000, 20000); + } + else + m_uiNoxiousBreathTimer -= uiDiff; + + if (m_uiTailsweepTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_TAILSWEEP) == CAST_OK) + m_uiTailsweepTimer = 2000; + } + else + m_uiTailsweepTimer -= uiDiff; + DoMeleeAttackIfReady(); } }; @@ -84,38 +128,27 @@ struct MANGOS_DLL_DECL boss_emerald_dragonAI : public ScriptedAI enum { - SAY_EMERISS_AGGRO = -1000401, - SAY_CASTCORRUPTION = -1000402, + SAY_EMERISS_AGGRO = -1000401, + SAY_CASTCORRUPTION = -1000402, - SPELL_SLEEP = 24777, - SPELL_NOXIOUSBREATH = 24818, - SPELL_TAILSWEEP = 15847, - //SPELL_MARKOFNATURE = 25040, // Not working - SPELL_VOLATILEINFECTION = 24928, - SPELL_CORRUPTIONOFEARTH = 24910 + //SPELL_MARKOFNATURE = 25040, // Not working + SPELL_VOLATILEINFECTION = 24928, + SPELL_CORRUPTION_OF_EARTH = 24910 }; struct MANGOS_DLL_DECL boss_emerissAI : public boss_emerald_dragonAI { boss_emerissAI(Creature* pCreature) : boss_emerald_dragonAI(pCreature) { Reset(); } - uint32 m_uiSleep_Timer; - uint32 m_uiNoxiousBreath_Timer; - uint32 m_uiTailSweep_Timer; //uint32 m_uiMarkOfNature_Timer; uint32 m_uiVolatileInfection_Timer; - uint32 m_uiCorruptionsCasted; void Reset() { boss_emerald_dragonAI::Reset(); - m_uiSleep_Timer = urand(15000, 20000); - m_uiNoxiousBreath_Timer = 8000; - m_uiTailSweep_Timer = 4000; //m_uiMarkOfNature_Timer = 45000; m_uiVolatileInfection_Timer = 12000; - m_uiCorruptionsCasted = 0; } void Aggro(Unit* pWho) @@ -123,42 +156,22 @@ struct MANGOS_DLL_DECL boss_emerissAI : public boss_emerald_dragonAI DoScriptText(SAY_EMERISS_AGGRO, m_creature); } + // Corruption of Earth at 75%, 50% and 25% bool DoSpecialDragonAbility(SpecialDragonEvent uiEvent) { - return true; - } - - bool UpdateDragonAI(const uint32 uiDiff) - { - //Sleep_Timer - if (m_uiSleep_Timer < uiDiff) - { - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) - DoCastSpellIfCan(pTarget, SPELL_SLEEP); - - m_uiSleep_Timer = urand(8000, 16000); - } - else - m_uiSleep_Timer -= uiDiff; - - //NoxiousBreath_Timer - if (m_uiNoxiousBreath_Timer < uiDiff) + if (DoCastSpellIfCan(m_creature, SPELL_CORRUPTION_OF_EARTH) == CAST_OK) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_NOXIOUSBREATH); - m_uiNoxiousBreath_Timer = urand(14000, 20000); - } - else - m_uiNoxiousBreath_Timer -= uiDiff; + DoScriptText(SAY_CASTCORRUPTION, m_creature); - //Tailsweep every 2 seconds - if (m_uiTailSweep_Timer < uiDiff) - { - DoCastSpellIfCan(m_creature, SPELL_TAILSWEEP); - m_uiTailSweep_Timer = 2000; + // Successfull cast + return true; } else - m_uiTailSweep_Timer -= uiDiff; + return false; + } + bool UpdateDragonAI(const uint32 uiDiff) + { //MarkOfNature_Timer //if (m_uiMarkOfNature_Timer < uiDiff) //{ @@ -177,14 +190,6 @@ struct MANGOS_DLL_DECL boss_emerissAI : public boss_emerald_dragonAI else m_uiVolatileInfection_Timer -= uiDiff; - //CorruptionofEarth at 75%, 50% and 25% - if (m_creature->GetHealthPercent() < float(100 - 25*m_uiCorruptionsCasted)) - { - ++m_uiCorruptionsCasted; // prevent casting twice on same hp - DoScriptText(SAY_CASTCORRUPTION, m_creature); - DoCastSpellIfCan(m_creature->getVictim(), SPELL_CORRUPTIONOFEARTH); - } - return true; } }; @@ -210,9 +215,6 @@ enum SAY_SUMMONSHADE = -1000400, //Spells of Taerar - SPELL_SLEEP = 24777, - SPELL_NOXIOUSBREATH = 24818, - SPELL_TAILSWEEP = 15847, // SPELL_MARKOFNATURE = 25040, // Not working SPELL_ARCANEBLAST = 24857, SPELL_BELLOWINGROAR = 22686, @@ -235,14 +237,10 @@ struct MANGOS_DLL_DECL boss_taerarAI : public boss_emerald_dragonAI { boss_taerarAI(Creature* pCreature) : boss_emerald_dragonAI(pCreature) { Reset(); } - uint32 m_uiSleep_Timer; - uint32 m_uiNoxiousBreath_Timer; - uint32 m_uiTailSweep_Timer; //uint32 m_uiMarkOfNature_Timer; uint32 m_uiArcaneBlast_Timer; uint32 m_uiBellowingRoar_Timer; uint32 m_uiShades_Timer; - uint32 m_uiShadesSummoned; bool m_bShades; @@ -250,14 +248,10 @@ struct MANGOS_DLL_DECL boss_taerarAI : public boss_emerald_dragonAI { boss_emerald_dragonAI::Reset(); - m_uiSleep_Timer = urand(15000, 20000); - m_uiNoxiousBreath_Timer = 8000; - m_uiTailSweep_Timer = 4000; //m_uiMarkOfNature_Timer = 45000; m_uiArcaneBlast_Timer = 12000; m_uiBellowingRoar_Timer = 30000; m_uiShades_Timer = 60000; //The time that Taerar is banished - m_uiShadesSummoned = 0; m_bShades = false; } @@ -273,9 +267,34 @@ struct MANGOS_DLL_DECL boss_taerarAI : public boss_emerald_dragonAI pSummoned->AI()->AttackStart(pTarget); } + // Summon 3 Shades at 75%, 50% and 25% bool DoSpecialDragonAbility(SpecialDragonEvent uiEvent) { - return true; + if (!m_bShades) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + //Inturrupt any spell casting + m_creature->InterruptNonMeleeSpells(false); + + //horrible workaround, need to fix + m_creature->setFaction(35); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + + DoScriptText(SAY_SUMMONSHADE, m_creature); + + int iSize = sizeof(m_auiSpellSummonShade) / sizeof(uint32); + + for(int i = 0; i < iSize; ++i) + m_creature->CastSpell(pTarget, m_auiSpellSummonShade[i], true); + + m_bShades = true; + m_uiShades_Timer = 60000; + + return true; + } + } + return false; } bool UpdateDragonAI(const uint32 uiDiff) @@ -296,35 +315,6 @@ struct MANGOS_DLL_DECL boss_taerarAI : public boss_emerald_dragonAI } // >>>>>>>>> end of FIXME - //Sleep_Timer - if (m_uiSleep_Timer < uiDiff) - { - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) - DoCastSpellIfCan(pTarget, SPELL_SLEEP); - - m_uiSleep_Timer = urand(8000, 15000); - } - else - m_uiSleep_Timer -= uiDiff; - - //NoxiousBreath_Timer - if (m_uiNoxiousBreath_Timer < uiDiff) - { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_NOXIOUSBREATH); - m_uiNoxiousBreath_Timer = urand(14000, 20000); - } - else - m_uiNoxiousBreath_Timer -= uiDiff; - - //Tailsweep every 2 seconds - if (m_uiTailSweep_Timer < uiDiff) - { - DoCastSpellIfCan(m_creature, SPELL_TAILSWEEP); - m_uiTailSweep_Timer = 2000; - } - else - m_uiTailSweep_Timer -= uiDiff; - //MarkOfNature_Timer //if (m_uiMarkOfNature_Timer < uiDiff) //{ @@ -352,31 +342,6 @@ struct MANGOS_DLL_DECL boss_taerarAI : public boss_emerald_dragonAI else m_uiBellowingRoar_Timer -= uiDiff; - //Summon 3 Shades at 75%, 50% and 25% (if bShades is true we already left in line 117, no need to check here again) - if (!m_bShades && m_creature->GetHealthPercent() < float(100 - 25*m_uiShadesSummoned)) - { - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) - { - //Inturrupt any spell casting - m_creature->InterruptNonMeleeSpells(false); - - //horrible workaround, need to fix - m_creature->setFaction(35); - m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - - DoScriptText(SAY_SUMMONSHADE, m_creature); - - int iSize = sizeof(m_auiSpellSummonShade) / sizeof(uint32); - - for(int i = 0; i < iSize; ++i) - m_creature->CastSpell(pTarget, m_auiSpellSummonShade[i], true); - - ++m_uiShadesSummoned; // prevent casting twice at same health - m_bShades = true; - } - m_uiShades_Timer = 60000; - } - return true; } }; @@ -441,9 +406,6 @@ enum SAY_YSONDRE_AGGRO = -1000360, SAY_SUMMONDRUIDS = -1000361, - SPELL_SLEEP = 24777, - SPELL_NOXIOUSBREATH = 24818, - SPELL_TAILSWEEP = 15847, //SPELL_MARKOFNATURE = 25040, // Not working SPELL_LIGHTNINGWAVE = 24819, SPELL_SUMMONDRUIDS = 24795, @@ -459,23 +421,15 @@ struct MANGOS_DLL_DECL boss_ysondreAI : public boss_emerald_dragonAI { boss_ysondreAI(Creature* pCreature) : boss_emerald_dragonAI(pCreature) { Reset(); } - uint32 m_uiSleep_Timer; - uint32 m_uiNoxiousBreath_Timer; - uint32 m_uiTailSweep_Timer; //uint32 m_uiMarkOfNature_Timer; uint32 m_uiLightningWave_Timer; - uint32 m_uiSummonDruidModifier; void Reset() { boss_emerald_dragonAI::Reset(); - m_uiSleep_Timer = urand(15000, 20000); - m_uiNoxiousBreath_Timer = 8000; - m_uiTailSweep_Timer = 4000; //m_uiMarkOfNature_Timer = 45000; m_uiLightningWave_Timer = 12000; - m_uiSummonDruidModifier = 0; } void Aggro(Unit* pWho) @@ -489,42 +443,19 @@ struct MANGOS_DLL_DECL boss_ysondreAI : public boss_emerald_dragonAI pSummoned->AI()->AttackStart(pTarget); } + // Summon Druids - TODO FIXME (spell not understood) bool DoSpecialDragonAbility(SpecialDragonEvent uiEvent) { + DoScriptText(SAY_SUMMONDRUIDS, m_creature); + + for(int i = 0; i < 10; ++i) + DoCastSpellIfCan(m_creature, SPELL_SUMMONDRUIDS, CAST_TRIGGERED); + return true; } bool UpdateDragonAI(const uint32 uiDiff) { - //Sleep_Timer - if (m_uiSleep_Timer < uiDiff) - { - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) - DoCastSpellIfCan(pTarget, SPELL_SLEEP); - - m_uiSleep_Timer = urand(8000, 15000); - } - else - m_uiSleep_Timer -= uiDiff; - - //NoxiousBreath_Timer - if (m_uiNoxiousBreath_Timer < uiDiff) - { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_NOXIOUSBREATH); - m_uiNoxiousBreath_Timer = urand(14000, 20000); - } - else - m_uiNoxiousBreath_Timer -= uiDiff; - - //Tailsweep every 2 seconds - if (m_uiTailSweep_Timer < uiDiff) - { - DoCastSpellIfCan(m_creature, SPELL_TAILSWEEP); - m_uiTailSweep_Timer = 2000; - } - else - m_uiTailSweep_Timer -= uiDiff; - //MarkOfNature_Timer //if (m_uiMarkOfNature_Timer < uiDiff) //{ @@ -546,17 +477,6 @@ struct MANGOS_DLL_DECL boss_ysondreAI : public boss_emerald_dragonAI else m_uiLightningWave_Timer -= uiDiff; - //Summon Druids - if (m_creature->GetHealthPercent() <= float(100 - 25*m_uiSummonDruidModifier)) - { - DoScriptText(SAY_SUMMONDRUIDS, m_creature); - - for(int i = 0; i < 10; ++i) - DoCastSpellIfCan(m_creature, SPELL_SUMMONDRUIDS, CAST_TRIGGERED); - - ++m_uiSummonDruidModifier; - } - return true; } }; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index f02fcdb2b..b3c86a034 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2083" + #define SD2_REVISION_NR "2084" #endif // __SD2_REVISION_NR_H__ From e06f9f7c442aea92a9f11fe25c7013d4e9f3912f Mon Sep 17 00:00:00 2001 From: Xfurry Date: Mon, 9 May 2011 17:57:16 +0200 Subject: [PATCH 0064/1172] [2085] Some fixes related to Emerald Dragons * Fix Seeping Fog Ability * Implement proper Mark of Nature (requires core patch) * Various coding style and spell-targets fixes Note: The Emerald Dragons are to be considered experimental, and will need additional changes! Signed-off-by: Schmoozerd --- scripts/world/bosses_emerald_dragons.cpp | 255 ++++++++++------------- sd2_revision_nr.h | 2 +- 2 files changed, 116 insertions(+), 141 deletions(-) diff --git a/scripts/world/bosses_emerald_dragons.cpp b/scripts/world/bosses_emerald_dragons.cpp index b21b768d9..30e869d3c 100644 --- a/scripts/world/bosses_emerald_dragons.cpp +++ b/scripts/world/bosses_emerald_dragons.cpp @@ -38,20 +38,23 @@ EndContentData */ enum { - SPELL_SEEPING_FOG_R = 24813, // Summons 15224 'Dream Fog' - SPELL_SEEPING_FOG_L = 24814, - SPELL_DREAM_FOG = 24777, // Used by summoned Adds - SPELL_NOXIOUS_BREATH = 24818, - SPELL_TAILSWEEP = 15847, - - NPC_DREAM_FOG = 15224, + SPELL_MARK_OF_NATURE_PLAYER = 25040, + SPELL_MARK_OF_NATURE_AURA = 25041, + SPELL_SEEPING_FOG_R = 24813, // Summons 15224 'Dream Fog' + SPELL_SEEPING_FOG_L = 24814, + SPELL_DREAM_FOG = 24777, // Used by summoned Adds + SPELL_NOXIOUS_BREATH = 24818, + SPELL_TAILSWEEP = 15847, + SPELL_SUMMON_PLAYER = 24776, // NYI + + NPC_DREAM_FOG = 15224, }; enum SpecialDragonEvent { - EVENT_75_HEALTH = 1, - EVENT_50_HEALTH = 2, - EVENT_25_HEALTH = 3, + EVENT_75_HEALTH = 1, + EVENT_50_HEALTH = 2, + EVENT_25_HEALTH = 3, }; struct MANGOS_DLL_DECL boss_emerald_dragonAI : public ScriptedAI @@ -73,6 +76,29 @@ struct MANGOS_DLL_DECL boss_emerald_dragonAI : public ScriptedAI m_uiTailsweepTimer = 4000; } + void EnterCombat(Unit* pEnemy) + { + DoCastSpellIfCan(m_creature, SPELL_MARK_OF_NATURE_AURA); + + ScriptedAI::EnterCombat(pEnemy); + } + + void KilledUnit(Unit* pVictim) + { + // Mark killed players with Mark of Nature + if (pVictim->GetTypeId() == TYPEID_PLAYER) + pVictim->CastSpell(pVictim, SPELL_MARK_OF_NATURE_PLAYER, true); + } + + void JustSummoned(Creature* pSummoned) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + pSummoned->AI()->AttackStart(pTarget); + + if (pSummoned->GetEntry() == NPC_DREAM_FOG) + pSummoned->CastSpell(pSummoned, SPELL_DREAM_FOG, true, NULL, NULL, m_creature->GetObjectGuid()); + } + // Return true, if succeeded virtual bool DoSpecialDragonAbility(SpecialDragonEvent uiEvent) = 0; @@ -129,10 +155,9 @@ struct MANGOS_DLL_DECL boss_emerald_dragonAI : public ScriptedAI enum { SAY_EMERISS_AGGRO = -1000401, - SAY_CASTCORRUPTION = -1000402, + SAY_CAST_CORRUPTION = -1000402, - //SPELL_MARKOFNATURE = 25040, // Not working - SPELL_VOLATILEINFECTION = 24928, + SPELL_VOLATILE_INFECTION = 24928, SPELL_CORRUPTION_OF_EARTH = 24910 }; @@ -140,15 +165,13 @@ struct MANGOS_DLL_DECL boss_emerissAI : public boss_emerald_dragonAI { boss_emerissAI(Creature* pCreature) : boss_emerald_dragonAI(pCreature) { Reset(); } - //uint32 m_uiMarkOfNature_Timer; - uint32 m_uiVolatileInfection_Timer; + uint32 m_uiVolatileInfectionTimer; void Reset() { boss_emerald_dragonAI::Reset(); - //m_uiMarkOfNature_Timer = 45000; - m_uiVolatileInfection_Timer = 12000; + m_uiVolatileInfectionTimer = 12000; } void Aggro(Unit* pWho) @@ -161,7 +184,7 @@ struct MANGOS_DLL_DECL boss_emerissAI : public boss_emerald_dragonAI { if (DoCastSpellIfCan(m_creature, SPELL_CORRUPTION_OF_EARTH) == CAST_OK) { - DoScriptText(SAY_CASTCORRUPTION, m_creature); + DoScriptText(SAY_CAST_CORRUPTION, m_creature); // Successfull cast return true; @@ -172,23 +195,15 @@ struct MANGOS_DLL_DECL boss_emerissAI : public boss_emerald_dragonAI bool UpdateDragonAI(const uint32 uiDiff) { - //MarkOfNature_Timer - //if (m_uiMarkOfNature_Timer < uiDiff) - //{ - // DoCastSpellIfCan(m_creature->getVictim(), SPELL_MARKOFNATURE); - // m_uiMarkOfNature_Timer = 45000; - //} - //else - //m_uiMarkOfNature_Timer -= uiDiff; - - //VolatileInfection_Timer - if (m_uiVolatileInfection_Timer < uiDiff) + // Volatile Infection Timer + if (m_uiVolatileInfectionTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_VOLATILEINFECTION); - m_uiVolatileInfection_Timer = urand(7000, 12000); + Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0); + if (pTarget && DoCastSpellIfCan(pTarget, SPELL_VOLATILE_INFECTION) == CAST_OK) + m_uiVolatileInfectionTimer = urand(7000, 12000); } else - m_uiVolatileInfection_Timer -= uiDiff; + m_uiVolatileInfectionTimer -= uiDiff; return true; } @@ -214,33 +229,30 @@ enum SAY_TAERAR_AGGRO = -1000399, SAY_SUMMONSHADE = -1000400, - //Spells of Taerar - // SPELL_MARKOFNATURE = 25040, // Not working - SPELL_ARCANEBLAST = 24857, - SPELL_BELLOWINGROAR = 22686, + SPELL_ARCANE_BLAST = 24857, + SPELL_BELLOWING_ROAR = 22686, - SPELL_SUMMONSHADE_1 = 24841, - SPELL_SUMMONSHADE_2 = 24842, - SPELL_SUMMONSHADE_3 = 24843, + SPELL_SUMMON_SHADE_1 = 24841, + SPELL_SUMMON_SHADE_2 = 24842, + SPELL_SUMMON_SHADE_3 = 24843, //Spells of Shades of Taerar SPELL_POSIONCLOUD = 24840, SPELL_POSIONBREATH = 20667 }; -uint32 m_auiSpellSummonShade[]= +static const uint32 auiSpellSummonShade[]= { - SPELL_SUMMONSHADE_1, SPELL_SUMMONSHADE_2, SPELL_SUMMONSHADE_3 + SPELL_SUMMON_SHADE_1, SPELL_SUMMON_SHADE_2, SPELL_SUMMON_SHADE_3 }; struct MANGOS_DLL_DECL boss_taerarAI : public boss_emerald_dragonAI { boss_taerarAI(Creature* pCreature) : boss_emerald_dragonAI(pCreature) { Reset(); } - //uint32 m_uiMarkOfNature_Timer; - uint32 m_uiArcaneBlast_Timer; - uint32 m_uiBellowingRoar_Timer; - uint32 m_uiShades_Timer; + uint32 m_uiArcaneBlastTimer; + uint32 m_uiBellowingRoarTimer; + uint32 m_uiShadesTimer; bool m_bShades; @@ -248,10 +260,9 @@ struct MANGOS_DLL_DECL boss_taerarAI : public boss_emerald_dragonAI { boss_emerald_dragonAI::Reset(); - //m_uiMarkOfNature_Timer = 45000; - m_uiArcaneBlast_Timer = 12000; - m_uiBellowingRoar_Timer = 30000; - m_uiShades_Timer = 60000; //The time that Taerar is banished + m_uiArcaneBlastTimer = 12000; + m_uiBellowingRoarTimer = 30000; + m_uiShadesTimer = 60000; // The time that Taerar is banished m_bShades = false; } @@ -261,12 +272,6 @@ struct MANGOS_DLL_DECL boss_taerarAI : public boss_emerald_dragonAI DoScriptText(SAY_TAERAR_AGGRO, m_creature); } - void JustSummoned(Creature* pSummoned) - { - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) - pSummoned->AI()->AttackStart(pTarget); - } - // Summon 3 Shades at 75%, 50% and 25% bool DoSpecialDragonAbility(SpecialDragonEvent uiEvent) { @@ -283,13 +288,13 @@ struct MANGOS_DLL_DECL boss_taerarAI : public boss_emerald_dragonAI DoScriptText(SAY_SUMMONSHADE, m_creature); - int iSize = sizeof(m_auiSpellSummonShade) / sizeof(uint32); + int iSize = sizeof(auiSpellSummonShade) / sizeof(uint32); for(int i = 0; i < iSize; ++i) - m_creature->CastSpell(pTarget, m_auiSpellSummonShade[i], true); + m_creature->CastSpell(pTarget, auiSpellSummonShade[i], true); m_bShades = true; - m_uiShades_Timer = 60000; + m_uiShadesTimer = 60000; return true; } @@ -300,7 +305,7 @@ struct MANGOS_DLL_DECL boss_taerarAI : public boss_emerald_dragonAI bool UpdateDragonAI(const uint32 uiDiff) { // <<<<<<<<< TODO - FIXME - This code was called also OOC - if (m_bShades && m_uiShades_Timer < uiDiff) + if (m_bShades && m_uiShadesTimer < uiDiff) { //Become unbanished again m_creature->setFaction(14); @@ -309,38 +314,30 @@ struct MANGOS_DLL_DECL boss_taerarAI : public boss_emerald_dragonAI } else if (m_bShades) { - m_uiShades_Timer -= uiDiff; + m_uiShadesTimer -= uiDiff; //Do nothing while banished return false; } // >>>>>>>>> end of FIXME - //MarkOfNature_Timer - //if (m_uiMarkOfNature_Timer < uiDiff) - //{ - // DoCastSpellIfCan(m_creature->getVictim(), SPELL_MARKOFNATURE); - // m_uiMarkOfNature_Timer = 45000; - //} - //else - //m_uiMarkOfNature_Timer -= uiDiff; - - //ArcaneBlast_Timer - if (m_uiArcaneBlast_Timer < uiDiff) + // Arcane Blast Timer + if (m_uiArcaneBlastTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_ARCANEBLAST); - m_uiArcaneBlast_Timer = urand(7000, 12000); + Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0); + if (pTarget && DoCastSpellIfCan(pTarget, SPELL_ARCANE_BLAST) == CAST_OK) + m_uiArcaneBlastTimer = urand(7000, 12000); } else - m_uiArcaneBlast_Timer -= uiDiff; + m_uiArcaneBlastTimer -= uiDiff; - //BellowingRoar_Timer - if (m_uiBellowingRoar_Timer < uiDiff) + // Bellowing Roar Timer + if (m_uiBellowingRoarTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_BELLOWINGROAR); - m_uiBellowingRoar_Timer = urand(20000, 30000); + if (DoCastSpellIfCan(m_creature, SPELL_BELLOWING_ROAR) == CAST_OK) + m_uiBellowingRoarTimer = urand(20000, 30000); } else - m_uiBellowingRoar_Timer -= uiDiff; + m_uiBellowingRoarTimer -= uiDiff; return true; } @@ -404,13 +401,10 @@ CreatureAI* GetAI_boss_shadeoftaerar(Creature* pCreature) enum { SAY_YSONDRE_AGGRO = -1000360, - SAY_SUMMONDRUIDS = -1000361, - - //SPELL_MARKOFNATURE = 25040, // Not working - SPELL_LIGHTNINGWAVE = 24819, - SPELL_SUMMONDRUIDS = 24795, + SAY_SUMMON_DRUIDS = -1000361, - SPELL_SUMMON_PLAYER = 24776, + SPELL_LIGHTNING_WAVE = 24819, + SPELL_SUMMON_DRUIDS = 24795, //druid spells SPELL_MOONFIRE = 21669 @@ -421,15 +415,13 @@ struct MANGOS_DLL_DECL boss_ysondreAI : public boss_emerald_dragonAI { boss_ysondreAI(Creature* pCreature) : boss_emerald_dragonAI(pCreature) { Reset(); } - //uint32 m_uiMarkOfNature_Timer; - uint32 m_uiLightningWave_Timer; + uint32 m_uiLightningWaveTimer; void Reset() { boss_emerald_dragonAI::Reset(); - //m_uiMarkOfNature_Timer = 45000; - m_uiLightningWave_Timer = 12000; + m_uiLightningWaveTimer = 12000; } void Aggro(Unit* pWho) @@ -437,45 +429,28 @@ struct MANGOS_DLL_DECL boss_ysondreAI : public boss_emerald_dragonAI DoScriptText(SAY_YSONDRE_AGGRO, m_creature); } - void JustSummoned(Creature* pSummoned) - { - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) - pSummoned->AI()->AttackStart(pTarget); - } - // Summon Druids - TODO FIXME (spell not understood) bool DoSpecialDragonAbility(SpecialDragonEvent uiEvent) { - DoScriptText(SAY_SUMMONDRUIDS, m_creature); + DoScriptText(SAY_SUMMON_DRUIDS, m_creature); for(int i = 0; i < 10; ++i) - DoCastSpellIfCan(m_creature, SPELL_SUMMONDRUIDS, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_SUMMON_DRUIDS, CAST_TRIGGERED); return true; } bool UpdateDragonAI(const uint32 uiDiff) { - //MarkOfNature_Timer - //if (m_uiMarkOfNature_Timer < uiDiff) - //{ - // DoCastSpellIfCan(m_creature->getVictim(), SPELL_MARKOFNATURE); - // m_uiMarkOfNature_Timer = 45000; - //} - //else - //m_uiMarkOfNature_Timer -= uiDiff; - - //LightningWave_Timer - if (m_uiLightningWave_Timer < uiDiff) + // Lightning Wave Timer + if (m_uiLightningWaveTimer < uiDiff) { - //Cast LIGHTNINGWAVE on a Random target - if (Unit *pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) - DoCastSpellIfCan(pTarget, SPELL_LIGHTNINGWAVE); - - m_uiLightningWave_Timer = urand(7000, 12000); + Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0); + if (pTarget && DoCastSpellIfCan(pTarget, SPELL_LIGHTNING_WAVE) == CAST_OK) + m_uiLightningWaveTimer = urand(7000, 12000); } else - m_uiLightningWave_Timer -= uiDiff; + m_uiLightningWaveTimer -= uiDiff; return true; } @@ -523,30 +498,30 @@ CreatureAI* GetAI_mob_dementeddruids(Creature* pCreature) void AddSC_bosses_emerald_dragons() { - Script *newscript; - - newscript = new Script; - newscript->Name = "boss_emeriss"; - newscript->GetAI = &GetAI_boss_emeriss; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "boss_taerar"; - newscript->GetAI = &GetAI_boss_taerar; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "boss_shade_of_taerar"; - newscript->GetAI = &GetAI_boss_shadeoftaerar; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "boss_ysondre"; - newscript->GetAI = &GetAI_boss_ysondre; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "mob_dementeddruids"; - newscript->GetAI = &GetAI_mob_dementeddruids; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_emeriss"; + pNewScript->GetAI = &GetAI_boss_emeriss; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "boss_taerar"; + pNewScript->GetAI = &GetAI_boss_taerar; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "boss_shade_of_taerar"; + pNewScript->GetAI = &GetAI_boss_shadeoftaerar; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "boss_ysondre"; + pNewScript->GetAI = &GetAI_boss_ysondre; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "mob_dementeddruids"; + pNewScript->GetAI = &GetAI_mob_dementeddruids; + pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index b3c86a034..cec32c827 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2084" + #define SD2_REVISION_NR "2085" #endif // __SD2_REVISION_NR_H__ From 53bfef4b96ade9066cd75a052c3e7c8c434eb60d Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Mon, 9 May 2011 22:07:36 +0200 Subject: [PATCH 0065/1172] [2086] Add Placeholder for boss Al'ar. Thanks to Xfurry for pointing --- VC100/100ScriptDev2.vcxproj | 1 + VC100/100ScriptDev2.vcxproj.filters | 3 ++ VC80/80ScriptDev2.vcproj | 4 +++ VC90/90ScriptDev2.vcproj | 4 +++ .../tempest_keep/the_eye/boss_alar.cpp | 28 +++++++++++++++++++ sd2_revision_nr.h | 2 +- system/ScriptLoader.cpp | 10 ++++--- 7 files changed, 47 insertions(+), 5 deletions(-) create mode 100644 scripts/outland/tempest_keep/the_eye/boss_alar.cpp diff --git a/VC100/100ScriptDev2.vcxproj b/VC100/100ScriptDev2.vcxproj index 1f65b6a0f..753da68a3 100644 --- a/VC100/100ScriptDev2.vcxproj +++ b/VC100/100ScriptDev2.vcxproj @@ -666,6 +666,7 @@ + diff --git a/VC100/100ScriptDev2.vcxproj.filters b/VC100/100ScriptDev2.vcxproj.filters index 2fd1fc867..3be0f52d1 100644 --- a/VC100/100ScriptDev2.vcxproj.filters +++ b/VC100/100ScriptDev2.vcxproj.filters @@ -1653,6 +1653,9 @@ scripts\outland\tempest_keep\botanica + + scripts\outland\tempest_keep\the_eye + scripts\outland\tempest_keep\the_eye diff --git a/VC80/80ScriptDev2.vcproj b/VC80/80ScriptDev2.vcproj index 3b2729954..dffc0c4a8 100644 --- a/VC80/80ScriptDev2.vcproj +++ b/VC80/80ScriptDev2.vcproj @@ -2819,6 +2819,10 @@ + + diff --git a/VC90/90ScriptDev2.vcproj b/VC90/90ScriptDev2.vcproj index f7a7da0e5..fc9dd6307 100644 --- a/VC90/90ScriptDev2.vcproj +++ b/VC90/90ScriptDev2.vcproj @@ -2818,6 +2818,10 @@ + + diff --git a/scripts/outland/tempest_keep/the_eye/boss_alar.cpp b/scripts/outland/tempest_keep/the_eye/boss_alar.cpp new file mode 100644 index 000000000..10525ff6e --- /dev/null +++ b/scripts/outland/tempest_keep/the_eye/boss_alar.cpp @@ -0,0 +1,28 @@ +/* Copyright (C) 2006 - 2011 ScriptDev2 + * 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_alar +SD%Complete: 0 +SDComment: Placeholder +SDCategory: Tempest Keep, The Eye +EndScriptData */ + +#include "precompiled.h" + +void AddSC_boss_alar() +{ +} diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index cec32c827..4a56fac14 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2085" + #define SD2_REVISION_NR "2086" #endif // __SD2_REVISION_NR_H__ diff --git a/system/ScriptLoader.cpp b/system/ScriptLoader.cpp index d1c6db632..c7985124c 100644 --- a/system/ScriptLoader.cpp +++ b/system/ScriptLoader.cpp @@ -470,9 +470,10 @@ extern void AddSC_instance_arcatraz(); extern void AddSC_boss_high_botanist_freywinn(); // TK, botanica extern void AddSC_boss_laj(); extern void AddSC_boss_warp_splinter(); -extern void AddSC_boss_kaelthas(); // TK, the_eye -extern void AddSC_boss_void_reaver(); +extern void AddSC_boss_alar(); // TK, the_eye extern void AddSC_boss_high_astromancer_solarian(); +extern void AddSC_boss_kaelthas(); +extern void AddSC_boss_void_reaver(); extern void AddSC_instance_the_eye(); extern void AddSC_the_eye(); extern void AddSC_boss_gatewatcher_iron_hand(); // TK, the_mechanar @@ -959,9 +960,10 @@ void AddScripts() AddSC_boss_high_botanist_freywinn(); // TK, botanica AddSC_boss_laj(); AddSC_boss_warp_splinter(); - AddSC_boss_kaelthas(); // TK, the_eye - AddSC_boss_void_reaver(); + AddSC_boss_alar(); // TK, the_eye AddSC_boss_high_astromancer_solarian(); + AddSC_boss_kaelthas(); + AddSC_boss_void_reaver(); AddSC_instance_the_eye(); AddSC_the_eye(); AddSC_boss_gatewatcher_iron_hand(); // TK, the_mechanar From cd98a292d74a323efc697ccc9597a19dee0f9b80 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Sat, 7 May 2011 12:15:24 +0200 Subject: [PATCH 0066/1172] [2087] Store shared code in ScriptMgr * Move EscortAI factions to ScriptMgr.h * Move system.h include from escort_ai header to source file * Remove unneeded system.h include from follower_ai header Signed-off-by: Schmoozerd --- ScriptMgr.h | 43 +++++++++++++++++++++++++++++++++++++++++-- base/escort_ai.cpp | 1 + base/escort_ai.h | 4 +--- base/follower_ai.h | 4 +--- sd2_revision_nr.h | 2 +- system/system.h | 24 ------------------------ 6 files changed, 45 insertions(+), 33 deletions(-) diff --git a/ScriptMgr.h b/ScriptMgr.h index 6eb525fc7..b12304c25 100644 --- a/ScriptMgr.h +++ b/ScriptMgr.h @@ -22,9 +22,42 @@ class WorldObject; class Aura; class Object; -#define VISIBLE_RANGE (166.0f) //MAX visible range (size of grid) +// ********************************************************* +// ************** Some defines used globally *************** + +// Basic defines +#define VISIBLE_RANGE (166.0f) // MAX visible range (size of grid) #define DEFAULT_TEXT "" +/* Escort Factions + * TODO: find better namings and definitions. + * N=Neutral, A=Alliance, H=Horde. + * NEUTRAL or FRIEND = Hostility to player surroundings (not a good definition) + * ACTIVE or PASSIVE = Hostility to environment surroundings. + */ +enum EscortFaction +{ + FACTION_ESCORT_A_NEUTRAL_PASSIVE = 10, + FACTION_ESCORT_H_NEUTRAL_PASSIVE = 33, + FACTION_ESCORT_N_NEUTRAL_PASSIVE = 113, + + FACTION_ESCORT_A_NEUTRAL_ACTIVE = 231, + FACTION_ESCORT_H_NEUTRAL_ACTIVE = 232, + FACTION_ESCORT_N_NEUTRAL_ACTIVE = 250, + + FACTION_ESCORT_N_FRIEND_PASSIVE = 290, + FACTION_ESCORT_N_FRIEND_ACTIVE = 495, + + FACTION_ESCORT_A_PASSIVE = 774, + FACTION_ESCORT_H_PASSIVE = 775, + + FACTION_ESCORT_N_ACTIVE = 1986, + FACTION_ESCORT_H_ACTIVE = 2046 +}; + +// ********************************************************* +// ************* Some structures used globally ************* + struct Script { Script() : @@ -68,9 +101,15 @@ struct Script void RegisterSelf(bool bReportError = true); }; -//Generic scripting text function +// ********************************************************* +// ************* Some functions used globally ************** + +// Generic scripting text function void DoScriptText(int32 iTextEntry, WorldObject* pSource, Unit* pTarget = NULL); +// ********************************************************* +// **************** Internal hook mechanics **************** + #if COMPILER == COMPILER_GNU #define FUNC_PTR(name,callconvention,returntype,parameters) typedef returntype(*name)parameters __attribute__ ((callconvention)); #else diff --git a/base/escort_ai.cpp b/base/escort_ai.cpp index e97ee99d8..25075b034 100644 --- a/base/escort_ai.cpp +++ b/base/escort_ai.cpp @@ -11,6 +11,7 @@ EndScriptData */ #include "precompiled.h" #include "escort_ai.h" +#include "../system/system.h" const float MAX_PLAYER_DISTANCE = 66.0f; diff --git a/base/escort_ai.h b/base/escort_ai.h index 9210343b5..51be00d86 100644 --- a/base/escort_ai.h +++ b/base/escort_ai.h @@ -5,8 +5,6 @@ #ifndef SC_ESCORTAI_H #define SC_ESCORTAI_H -#include "../system/system.h" - struct Escort_Waypoint { Escort_Waypoint(uint32 uiId, float fX, float fY, float fZ, uint32 uiWaitTime) : @@ -24,7 +22,7 @@ struct Escort_Waypoint uint32 uiWaitTime; }; -enum eEscortState +enum EscortState { STATE_ESCORT_NONE = 0x000, //nothing in progress STATE_ESCORT_ESCORTING = 0x001, //escort are in progress diff --git a/base/follower_ai.h b/base/follower_ai.h index 5f23aff9c..cc11dead1 100644 --- a/base/follower_ai.h +++ b/base/follower_ai.h @@ -5,9 +5,7 @@ #ifndef SC_FOLLOWERAI_H #define SC_FOLLOWERAI_H -#include "../system/system.h" - -enum eFollowState +enum FollowState { STATE_FOLLOW_NONE = 0x000, STATE_FOLLOW_INPROGRESS = 0x001, //must always have this state for any follow diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 4a56fac14..c5f9e3995 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2086" + #define SD2_REVISION_NR "2087" #endif // __SD2_REVISION_NR_H__ diff --git a/system/system.h b/system/system.h index f2f29f76d..1480c742e 100644 --- a/system/system.h +++ b/system/system.h @@ -19,30 +19,6 @@ extern std::string strSD2Version; //version info: data #define TEXT_SOURCE_GOSSIP_START TEXT_SOURCE_RANGE*3 #define TEXT_SOURCE_GOSSIP_END TEXT_SOURCE_RANGE*4 + 1 -//TODO: find better namings and definitions. -//N=Neutral, A=Alliance, H=Horde. -//NEUTRAL or FRIEND = Hostility to player surroundings (not a good definition) -//ACTIVE or PASSIVE = Hostility to environment surroundings. -enum eEscortFaction -{ - FACTION_ESCORT_A_NEUTRAL_PASSIVE = 10, - FACTION_ESCORT_H_NEUTRAL_PASSIVE = 33, - FACTION_ESCORT_N_NEUTRAL_PASSIVE = 113, - - FACTION_ESCORT_A_NEUTRAL_ACTIVE = 231, - FACTION_ESCORT_H_NEUTRAL_ACTIVE = 232, - FACTION_ESCORT_N_NEUTRAL_ACTIVE = 250, - - FACTION_ESCORT_N_FRIEND_PASSIVE = 290, - FACTION_ESCORT_N_FRIEND_ACTIVE = 495, - - FACTION_ESCORT_A_PASSIVE = 774, - FACTION_ESCORT_H_PASSIVE = 775, - - FACTION_ESCORT_N_ACTIVE = 1986, - FACTION_ESCORT_H_ACTIVE = 2046 -}; - struct ScriptPointMove { uint32 uiCreatureEntry; From 61addf79c949b10bea4c25b1edf219661cd78976 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Sun, 8 May 2011 23:34:27 +0200 Subject: [PATCH 0067/1172] [2088] Add and use a few typedefs for GUID storage * Replace std::list with GUIDList in scripts * Replace std::set with GUIDSet in scripts * Replace std::vector with GUIDVector in scripts * Replace iterator with const_iterator where possible * Also Improve a few minor code things around these replacements Signed-off-by: Schmoozerd --- ScriptMgr.h | 5 +++ .../blackrock_depths/blackrock_depths.cpp | 6 ++-- .../blackrock_spire/blackrock_spire.h | 12 +++---- .../instance_blackrock_spire.cpp | 2 +- .../gnomeregan/boss_thermaplugg.cpp | 8 ++--- .../gnomeregan/gnomeregan.cpp | 4 +-- .../eastern_kingdoms/gnomeregan/gnomeregan.h | 6 ++-- .../gnomeregan/instance_gnomeregan.cpp | 6 ++-- .../karazhan/boss_prince_malchezaar.cpp | 6 ++-- .../boss_selin_fireheart.cpp | 8 ++--- .../instance_magisters_terrace.cpp | 4 +-- .../molten_core/boss_majordomo_executus.cpp | 2 +- .../molten_core/molten_core.h | 2 -- .../stratholme/instance_stratholme.cpp | 12 +++---- .../eastern_kingdoms/stratholme/stratholme.h | 12 +++---- .../sunken_temple/instance_sunken_temple.cpp | 2 +- .../sunken_temple/sunken_temple.h | 2 +- .../sunwell_plateau/sunwell_plateau.h | 2 +- .../uldaman/instance_uldaman.cpp | 6 ++-- scripts/eastern_kingdoms/uldaman/uldaman.h | 2 +- .../eastern_kingdoms/zulaman/boss_janalai.cpp | 4 +-- .../zulaman/instance_zulaman.cpp | 4 +-- .../culling_of_stratholme.h | 14 ++++---- .../instance_culling_of_stratholme.cpp | 6 ++-- .../caverns_of_time/hyjal/hyjalAI.cpp | 2 +- .../kalimdor/caverns_of_time/hyjal/hyjalAI.h | 2 +- .../caverns_of_time/hyjal/instance_hyjal.cpp | 4 +-- scripts/kalimdor/dire_maul/dire_maul.h | 6 ++-- .../kalimdor/dire_maul/instance_dire_maul.cpp | 8 ++--- .../mob_anubisath_sentinel.cpp | 8 ++--- scripts/northrend/gundrak/gundrak.h | 6 ++-- .../northrend/gundrak/instance_gundrak.cpp | 6 ++-- .../forge_of_souls/forge_of_souls.h | 4 +-- .../instance_forge_of_souls.cpp | 4 +-- .../northrend/naxxramas/boss_kelthuzad.cpp | 8 ++--- scripts/northrend/naxxramas/boss_thaddius.cpp | 8 ++--- .../naxxramas/instance_naxxramas.cpp | 4 +-- scripts/northrend/naxxramas/naxxramas.h | 8 ++--- .../ulduar/halls_of_lightning/boss_ionar.cpp | 6 ++-- .../halls_of_lightning/boss_volkhan.cpp | 6 ++-- .../violet_hold/instance_violet_hold.cpp | 8 ++--- scripts/northrend/violet_hold/violet_hold.cpp | 2 +- scripts/northrend/violet_hold/violet_hold.h | 4 +-- .../black_temple/boss_shade_of_akama.cpp | 32 ++++++++----------- .../outland/black_temple/boss_supremus.cpp | 4 +-- .../instance_magtheridons_lair.cpp | 26 +++++++-------- .../boss_warchief_kargath_bladefist.cpp | 8 ++--- .../botanica/boss_high_botanist_freywinn.cpp | 17 ++++------ scripts/world/npcs_special.cpp | 12 +++---- sd2_revision_nr.h | 2 +- 50 files changed, 166 insertions(+), 176 deletions(-) diff --git a/ScriptMgr.h b/ScriptMgr.h index b12304c25..16ca8bfa8 100644 --- a/ScriptMgr.h +++ b/ScriptMgr.h @@ -29,6 +29,11 @@ class Object; #define VISIBLE_RANGE (166.0f) // MAX visible range (size of grid) #define DEFAULT_TEXT "" +// Some typedefs for storing GUIDs +typedef std::list GUIDList; +typedef std::set GUIDSet; +typedef std::vector GUIDVector; + /* Escort Factions * TODO: find better namings and definitions. * N=Neutral, A=Alliance, H=Horde. diff --git a/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.cpp b/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.cpp index f275ffdb6..673871a25 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.cpp +++ b/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.cpp @@ -171,7 +171,7 @@ struct MANGOS_DLL_DECL npc_grimstoneAI : public npc_escortAI uint32 m_uiGladiatorId[MAX_THELDREN_ADDS]; - std::list m_lSummonedGUIDList; + GUIDList m_lSummonedGUIDList; void Reset() { @@ -306,9 +306,11 @@ struct MANGOS_DLL_DECL npc_grimstoneAI : public npc_escortAI } // Despawn Summoned Mobs - for (std::list::const_iterator itr = m_lSummonedGUIDList.begin(); itr != m_lSummonedGUIDList.end(); ++itr) + for (GUIDList::const_iterator itr = m_lSummonedGUIDList.begin(); itr != m_lSummonedGUIDList.end(); ++itr) + { if (Creature* pSummoned = m_creature->GetMap()->GetCreature(*itr)) pSummoned->ForcedDespawn(); + } m_lSummonedGUIDList.clear(); // Despawn NPC diff --git a/scripts/eastern_kingdoms/blackrock_spire/blackrock_spire.h b/scripts/eastern_kingdoms/blackrock_spire/blackrock_spire.h index 0f7c0498c..e01f40017 100644 --- a/scripts/eastern_kingdoms/blackrock_spire/blackrock_spire.h +++ b/scripts/eastern_kingdoms/blackrock_spire/blackrock_spire.h @@ -64,8 +64,8 @@ class MANGOS_DLL_DECL instance_blackrock_spire : public ScriptedInstance void Load(const char* chrIn); void DoSortRoomEventMobs(); - void GetIncanceratorGUIDList(std::list &lList) { lList = m_lIncanceratorGUIDList; } - void GetRookeryEggGUIDList(std::list &lList) { lList = m_lRookeryEggGUIDList; } + void GetIncanceratorGUIDList(GUIDList &lList) { lList = m_lIncanceratorGUIDList; } + void GetRookeryEggGUIDList(GUIDList &lList) { lList = m_lRookeryEggGUIDList; } protected: uint32 m_auiEncounter[MAX_ENCOUNTER]; @@ -84,10 +84,10 @@ class MANGOS_DLL_DECL instance_blackrock_spire : public ScriptedInstance uint64 m_uiGythExitDoorGUID; uint64 m_auiRoomRuneGUID[MAX_ROOMS]; - std::list m_alRoomEventMobGUIDSorted[MAX_ROOMS]; - std::list m_lRoomEventMobGUIDList; - std::list m_lIncanceratorGUIDList; - std::list m_lRookeryEggGUIDList; + GUIDList m_alRoomEventMobGUIDSorted[MAX_ROOMS]; + GUIDList m_lRoomEventMobGUIDList; + GUIDList m_lIncanceratorGUIDList; + GUIDList m_lRookeryEggGUIDList; }; #endif diff --git a/scripts/eastern_kingdoms/blackrock_spire/instance_blackrock_spire.cpp b/scripts/eastern_kingdoms/blackrock_spire/instance_blackrock_spire.cpp index 53f69f955..daaaf6fe8 100644 --- a/scripts/eastern_kingdoms/blackrock_spire/instance_blackrock_spire.cpp +++ b/scripts/eastern_kingdoms/blackrock_spire/instance_blackrock_spire.cpp @@ -255,7 +255,7 @@ void instance_blackrock_spire::DoSortRoomEventMobs() { if (GameObject* pRune = instance->GetGameObject(m_auiRoomRuneGUID[i])) { - for (std::list::const_iterator itr = m_lRoomEventMobGUIDList.begin(); itr != m_lRoomEventMobGUIDList.end(); ++itr) + for (GUIDList::const_iterator itr = m_lRoomEventMobGUIDList.begin(); itr != m_lRoomEventMobGUIDList.end(); ++itr) { Creature* pCreature = instance->GetCreature(*itr); if (pCreature && pCreature->isAlive() && pCreature->GetDistance(pRune) < 10.0f) diff --git a/scripts/eastern_kingdoms/gnomeregan/boss_thermaplugg.cpp b/scripts/eastern_kingdoms/gnomeregan/boss_thermaplugg.cpp index d57510704..cfc2557f9 100644 --- a/scripts/eastern_kingdoms/gnomeregan/boss_thermaplugg.cpp +++ b/scripts/eastern_kingdoms/gnomeregan/boss_thermaplugg.cpp @@ -59,8 +59,8 @@ struct MANGOS_DLL_DECL boss_thermapluggAI : public ScriptedAI sBombFace* m_asBombFaces; float m_afSpawnPos[3]; - std::list m_lSummonedBombGUIDs; - std::list m_lLandedBombGUIDs; + GUIDList m_lSummonedBombGUIDs; + GUIDList m_lLandedBombGUIDs; void Reset() { @@ -107,7 +107,7 @@ struct MANGOS_DLL_DECL boss_thermapluggAI : public ScriptedAI m_pInstance->SetData(TYPE_THERMAPLUGG, FAIL); // Remove remaining bombs - for (std::list::const_iterator itr = m_lSummonedBombGUIDs.begin(); itr != m_lSummonedBombGUIDs.end(); ++itr) + for (GUIDList::const_iterator itr = m_lSummonedBombGUIDs.begin(); itr != m_lSummonedBombGUIDs.end(); ++itr) { if (Creature* pBomb = m_creature->GetMap()->GetCreature(*itr)) pBomb->ForcedDespawn(); @@ -147,7 +147,7 @@ struct MANGOS_DLL_DECL boss_thermapluggAI : public ScriptedAI // Movement of Summoned mobs if (!m_lLandedBombGUIDs.empty()) { - for (std::list::const_iterator itr = m_lLandedBombGUIDs.begin(); itr != m_lLandedBombGUIDs.end(); ++itr) + for (GUIDList::const_iterator itr = m_lLandedBombGUIDs.begin(); itr != m_lLandedBombGUIDs.end(); ++itr) { if (Creature* pBomb = m_creature->GetMap()->GetCreature(*itr)) pBomb->GetMotionMaster()->MoveFollow(m_creature, 0.0f, 0.0f); diff --git a/scripts/eastern_kingdoms/gnomeregan/gnomeregan.cpp b/scripts/eastern_kingdoms/gnomeregan/gnomeregan.cpp index 55823c2de..a713fd1ff 100644 --- a/scripts/eastern_kingdoms/gnomeregan/gnomeregan.cpp +++ b/scripts/eastern_kingdoms/gnomeregan/gnomeregan.cpp @@ -143,7 +143,7 @@ struct MANGOS_DLL_DECL npc_blastmaster_emi_shortfuseAI : public npc_escortAI uint32 m_uiPhaseTimer; uint64 m_uiPlayerGUID; bool m_bDidAggroText, m_bSouthernCaveInOpened, m_bNorthernCaveInOpened; - std::list m_luiSummonedMobGUIDs; + GUIDList m_luiSummonedMobGUIDs; void Reset() { @@ -251,7 +251,7 @@ struct MANGOS_DLL_DECL npc_blastmaster_emi_shortfuseAI : public npc_escortAI if (m_bNorthernCaveInOpened) // close northern cave-in door m_pInstance->DoUseDoorOrButton(m_pInstance->GetData64(GO_CAVE_IN_NORTH)); - for (std::list::const_iterator itr = m_luiSummonedMobGUIDs.begin(); itr != m_luiSummonedMobGUIDs.end(); ++itr) + for (GUIDList::const_iterator itr = m_luiSummonedMobGUIDs.begin(); itr != m_luiSummonedMobGUIDs.end(); ++itr) { if (Creature* pSummoned = m_creature->GetMap()->GetCreature(*itr)) pSummoned->ForcedDespawn(); diff --git a/scripts/eastern_kingdoms/gnomeregan/gnomeregan.h b/scripts/eastern_kingdoms/gnomeregan/gnomeregan.h index db08f6c29..adb835bc1 100644 --- a/scripts/eastern_kingdoms/gnomeregan/gnomeregan.h +++ b/scripts/eastern_kingdoms/gnomeregan/gnomeregan.h @@ -85,9 +85,9 @@ class MANGOS_DLL_DECL instance_gnomeregan : public ScriptedInstance uint64 m_uiCaveInSouthGUID; uint64 m_uiDoorFinalChamberGUID; - std::list m_luiExplosiveChargeGUIDs; - std::list m_luiSpawnedExplosiveChargeGUIDs; - std::list m_lRedRocketGUIDs; + GUIDList m_luiExplosiveChargeGUIDs; + GUIDList m_luiSpawnedExplosiveChargeGUIDs; + GUIDList m_lRedRocketGUIDs; }; #endif diff --git a/scripts/eastern_kingdoms/gnomeregan/instance_gnomeregan.cpp b/scripts/eastern_kingdoms/gnomeregan/instance_gnomeregan.cpp index 49cc1de9b..0eabbd761 100644 --- a/scripts/eastern_kingdoms/gnomeregan/instance_gnomeregan.cpp +++ b/scripts/eastern_kingdoms/gnomeregan/instance_gnomeregan.cpp @@ -84,7 +84,7 @@ void instance_gnomeregan::SetData(uint32 uiType, uint32 uiData) if (!m_luiExplosiveChargeGUIDs.empty()) { std::list lExplosiveCharges; - for (std::list::const_iterator itr = m_luiExplosiveChargeGUIDs.begin(); itr != m_luiExplosiveChargeGUIDs.end(); ++itr) + for (GUIDList::const_iterator itr = m_luiExplosiveChargeGUIDs.begin(); itr != m_luiExplosiveChargeGUIDs.end(); ++itr) { if (GameObject* pCharge = instance->GetGameObject(*itr)) lExplosiveCharges.push_back(pCharge); @@ -124,7 +124,7 @@ void instance_gnomeregan::SetData(uint32 uiType, uint32 uiData) } if (uiData == DONE) { - for (std::list::const_iterator itr = m_lRedRocketGUIDs.begin(); itr != m_lRedRocketGUIDs.end(); ++itr) + for (GUIDList::const_iterator itr = m_lRedRocketGUIDs.begin(); itr != m_lRedRocketGUIDs.end(); ++itr) DoRespawnGameObject(*itr, HOUR); } break; @@ -151,7 +151,7 @@ void instance_gnomeregan::SetData(uint32 uiType, uint32 uiData) Creature* pBlastmaster = instance->GetCreature(m_uiBlastmasterShortfuseGUID); if (!pBlastmaster) break; - for (std::list::const_iterator itr = m_luiSpawnedExplosiveChargeGUIDs.begin(); itr != m_luiSpawnedExplosiveChargeGUIDs.end(); ++itr) + for (GUIDList::const_iterator itr = m_luiSpawnedExplosiveChargeGUIDs.begin(); itr != m_luiSpawnedExplosiveChargeGUIDs.end(); ++itr) { if (GameObject* pExplosive = instance->GetGameObject(*itr)) pExplosive->Use(pBlastmaster); diff --git a/scripts/eastern_kingdoms/karazhan/boss_prince_malchezaar.cpp b/scripts/eastern_kingdoms/karazhan/boss_prince_malchezaar.cpp index 415e6839b..f36b05dcb 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_prince_malchezaar.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_prince_malchezaar.cpp @@ -174,7 +174,7 @@ struct MANGOS_DLL_DECL boss_malchezaarAI : public ScriptedAI uint32 AxesTargetSwitchTimer; uint32 InfernalCleanupTimer; - std::vector infernals; + GUIDVector infernals; std::vector positions; uint64 axes[2]; @@ -243,7 +243,7 @@ struct MANGOS_DLL_DECL boss_malchezaarAI : public ScriptedAI void InfernalCleanup() { //Infernal Cleanup - for(std::vector::iterator itr = infernals.begin(); itr!= infernals.end(); ++itr) + for(GUIDVector::const_iterator itr = infernals.begin(); itr!= infernals.end(); ++itr) { Creature *pInfernal = m_creature->GetMap()->GetCreature(*itr); if (pInfernal && pInfernal->isAlive()) @@ -597,7 +597,7 @@ struct MANGOS_DLL_DECL boss_malchezaarAI : public ScriptedAI void Cleanup(Creature *infernal, InfernalPoint *point) { - for(std::vector::iterator itr = infernals.begin(); itr!= infernals.end(); ++itr) + for(GUIDVector::iterator itr = infernals.begin(); itr!= infernals.end(); ++itr) if (*itr == infernal->GetGUID()) { infernals.erase(itr); diff --git a/scripts/eastern_kingdoms/magisters_terrace/boss_selin_fireheart.cpp b/scripts/eastern_kingdoms/magisters_terrace/boss_selin_fireheart.cpp index 938ba97f3..7ed2feee8 100644 --- a/scripts/eastern_kingdoms/magisters_terrace/boss_selin_fireheart.cpp +++ b/scripts/eastern_kingdoms/magisters_terrace/boss_selin_fireheart.cpp @@ -74,7 +74,7 @@ struct MANGOS_DLL_DECL boss_selin_fireheartAI : public ScriptedAI ScriptedInstance* m_pInstance; bool m_bIsRegularMode; - std::list Crystals; + GUIDList Crystals; uint32 DrainLifeTimer; uint32 DrainManaTimer; @@ -92,7 +92,7 @@ struct MANGOS_DLL_DECL boss_selin_fireheartAI : public ScriptedAI if (m_pInstance) { //for(uint8 i = 0; i < CRYSTALS_NUMBER; ++i) - for(std::list::iterator itr = Crystals.begin(); itr != Crystals.end(); ++itr) + for(GUIDList::const_iterator itr = Crystals.begin(); itr != Crystals.end(); ++itr) { //Creature* pUnit = m_creature->GetMap()->GetCreature(FelCrystals[i]); if (Creature* pCrystal = m_creature->GetMap()->GetCreature(*itr)) @@ -134,7 +134,7 @@ struct MANGOS_DLL_DECL boss_selin_fireheartAI : public ScriptedAI Creature* pCrystal = NULL; Creature* CrystalChosen = NULL; //for(uint8 i = 0; i < CRYSTALS_NUMBER; ++i) - for(std::list::iterator itr = Crystals.begin(); itr != Crystals.end(); ++itr) + for(GUIDList::const_iterator itr = Crystals.begin(); itr != Crystals.end(); ++itr) { pCrystal = m_creature->GetMap()->GetCreature(*itr); @@ -170,7 +170,7 @@ struct MANGOS_DLL_DECL boss_selin_fireheartAI : public ScriptedAI return; //for(uint8 i = 0; i < CRYSTALS_NUMBER; ++i) - for(std::list::iterator itr = Crystals.begin(); itr != Crystals.end(); ++itr) + for(GUIDList::const_iterator itr = Crystals.begin(); itr != Crystals.end(); ++itr) { //Creature* pCrystal = m_creature->GetMap()->GetCreature(FelCrystals[i]); Creature* pCrystal = m_creature->GetMap()->GetCreature(*itr); diff --git a/scripts/eastern_kingdoms/magisters_terrace/instance_magisters_terrace.cpp b/scripts/eastern_kingdoms/magisters_terrace/instance_magisters_terrace.cpp index 5c932ce7e..7b9e70db7 100644 --- a/scripts/eastern_kingdoms/magisters_terrace/instance_magisters_terrace.cpp +++ b/scripts/eastern_kingdoms/magisters_terrace/instance_magisters_terrace.cpp @@ -41,8 +41,8 @@ struct MANGOS_DLL_DECL instance_magisters_terrace : public ScriptedInstance uint32 m_uiDelrissaDeathCount; - std::list FelCrystals; - std::list::iterator CrystalItr; + GUIDList FelCrystals; + GUIDList::iterator CrystalItr; uint64 m_uiSelinGUID; uint64 m_uiDelrissaGUID; diff --git a/scripts/eastern_kingdoms/molten_core/boss_majordomo_executus.cpp b/scripts/eastern_kingdoms/molten_core/boss_majordomo_executus.cpp index cbd6c0842..a0a849ec0 100644 --- a/scripts/eastern_kingdoms/molten_core/boss_majordomo_executus.cpp +++ b/scripts/eastern_kingdoms/molten_core/boss_majordomo_executus.cpp @@ -237,7 +237,7 @@ struct MANGOS_DLL_DECL boss_majordomoAI : public ScriptedAI // Unsummon Majordomo adds void UnsummonMajordomoAdds() { - for (std::list::const_iterator itr = m_luiMajordomoAddsGUIDs.begin(); itr != m_luiMajordomoAddsGUIDs.end(); ++itr) + for (GUIDList::const_iterator itr = m_luiMajordomoAddsGUIDs.begin(); itr != m_luiMajordomoAddsGUIDs.end(); ++itr) { if (Creature* pAdd = m_creature->GetMap()->GetCreature(*itr)) if (pAdd->IsTemporarySummon()) diff --git a/scripts/eastern_kingdoms/molten_core/molten_core.h b/scripts/eastern_kingdoms/molten_core/molten_core.h index cb4c11c8a..3a3be26ca 100644 --- a/scripts/eastern_kingdoms/molten_core/molten_core.h +++ b/scripts/eastern_kingdoms/molten_core/molten_core.h @@ -83,8 +83,6 @@ static sSpawnLocation m_aMajordomoLocations[2] = static const float RANGE_CALL_FOR_HELP = 20.0f; -typedef std::list GUIDList; - class MANGOS_DLL_DECL instance_molten_core : public ScriptedInstance { public: diff --git a/scripts/eastern_kingdoms/stratholme/instance_stratholme.cpp b/scripts/eastern_kingdoms/stratholme/instance_stratholme.cpp index eb720b15a..3a35c1bac 100644 --- a/scripts/eastern_kingdoms/stratholme/instance_stratholme.cpp +++ b/scripts/eastern_kingdoms/stratholme/instance_stratholme.cpp @@ -205,7 +205,7 @@ void instance_stratholme::SetData(uint32 uiType, uint32 uiData) } uint32 uiCount = m_sAbomnationGUID.size(); - for(std::set::iterator itr = m_sAbomnationGUID.begin(); itr != m_sAbomnationGUID.end();) + for(GUIDSet::iterator itr = m_sAbomnationGUID.begin(); itr != m_sAbomnationGUID.end();) { if (Creature* pAbom = instance->GetCreature(*itr)) { @@ -275,7 +275,7 @@ void instance_stratholme::SetData(uint32 uiType, uint32 uiData) m_uiSlaugtherSquareTimer = 0; // Let already moving Abomnations stop - for (std::set::iterator itr = m_sAbomnationGUID.begin(); itr != m_sAbomnationGUID.end(); ++itr) + for (GUIDSet::const_iterator itr = m_sAbomnationGUID.begin(); itr != m_sAbomnationGUID.end(); ++itr) { Creature* pAbom = instance->GetCreature(*itr); if (pAbom && pAbom->GetMotionMaster()->GetCurrentMovementGeneratorType() == POINT_MOTION_TYPE) @@ -487,7 +487,7 @@ void instance_stratholme::DoSortZiggurats() return; std::list lAcolytes; // Valid pointers, only used locally - for (std::list::const_iterator itr = m_luiAcolyteGUIDs.begin(); itr != m_luiAcolyteGUIDs.end(); ++itr) + for (GUIDList::const_iterator itr = m_luiAcolyteGUIDs.begin(); itr != m_luiAcolyteGUIDs.end(); ++itr) { if (Creature* pAcolyte = instance->GetCreature(*itr)) lAcolytes.push_back(pAcolyte); @@ -532,7 +532,7 @@ void instance_stratholme::DoSortZiggurats() m_luiAcolyteGUIDs.push_back((*itr)->GetGUID()); // Sort Crystal - for (std::list::iterator itr = m_luiCrystalGUIDs.begin(); itr != m_luiCrystalGUIDs.end(); ) + for (GUIDList::iterator itr = m_luiCrystalGUIDs.begin(); itr != m_luiCrystalGUIDs.end(); ) { Creature* pCrystal = instance->GetCreature(*itr); if (!pCrystal) @@ -657,7 +657,7 @@ void instance_stratholme::OnCreatureDeath(Creature* pCreature) if (m_luiUndeadGUIDs.empty()) { // Let the black Guards move out of the citadel - for (std::list::const_iterator itr = m_luiGuardGUIDs.begin(); itr != m_luiGuardGUIDs.end(); ++itr) + for (GUIDList::const_iterator itr = m_luiGuardGUIDs.begin(); itr != m_luiGuardGUIDs.end(); ++itr) { Creature* pGuard = instance->GetCreature(*itr); if (pGuard && pGuard->isAlive() && !pGuard->isInCombat()) @@ -756,7 +756,7 @@ void instance_stratholme::Update(uint32 uiDiff) if (m_uiSlaugtherSquareTimer <= uiDiff) { // Call next Abomnations - for (std::set::iterator itr = m_sAbomnationGUID.begin(); itr != m_sAbomnationGUID.end(); ++itr) + for (GUIDSet::const_iterator itr = m_sAbomnationGUID.begin(); itr != m_sAbomnationGUID.end(); ++itr) { Creature* pAbom = instance->GetCreature(*itr); // Skip killed and already walking Abomnations diff --git a/scripts/eastern_kingdoms/stratholme/stratholme.h b/scripts/eastern_kingdoms/stratholme/stratholme.h index 168e546ef..89deea9a7 100644 --- a/scripts/eastern_kingdoms/stratholme/stratholme.h +++ b/scripts/eastern_kingdoms/stratholme/stratholme.h @@ -148,12 +148,12 @@ struct MANGOS_DLL_DECL instance_stratholme : public ScriptedInstance uint64 m_uiAcolyteAnnouncerGUID; uint64 m_auiCrystalSortedGUID[MAX_ZIGGURATS]; - std::list m_luiCrystalGUIDs; - std::set m_sAbomnationGUID; - std::list m_luiAcolyteGUIDs; - std::list m_alZigguratAcolyteGUID[MAX_ZIGGURATS]; - std::list m_luiUndeadGUIDs; - std::list m_luiGuardGUIDs; + GUIDList m_luiCrystalGUIDs; + GUIDSet m_sAbomnationGUID; + GUIDList m_luiAcolyteGUIDs; + GUIDList m_alZigguratAcolyteGUID[MAX_ZIGGURATS]; + GUIDList m_luiUndeadGUIDs; + GUIDList m_luiGuardGUIDs; }; #endif diff --git a/scripts/eastern_kingdoms/sunken_temple/instance_sunken_temple.cpp b/scripts/eastern_kingdoms/sunken_temple/instance_sunken_temple.cpp index 23218cf42..36ee07cb3 100644 --- a/scripts/eastern_kingdoms/sunken_temple/instance_sunken_temple.cpp +++ b/scripts/eastern_kingdoms/sunken_temple/instance_sunken_temple.cpp @@ -159,7 +159,7 @@ void instance_sunken_temple::DoSpawnAtalarionIfCan() DoRespawnGameObject(m_uiIdolOfHakkarGUID, 30 * MINUTE); // Spawn the big green lights - for (std::list::const_iterator itr = m_luiBigLightGUIDs.begin(); itr != m_luiBigLightGUIDs.end(); ++itr) + for (GUIDList::const_iterator itr = m_luiBigLightGUIDs.begin(); itr != m_luiBigLightGUIDs.end(); ++itr) DoRespawnGameObject(*itr, 30*MINUTE*IN_MILLISECONDS); } diff --git a/scripts/eastern_kingdoms/sunken_temple/sunken_temple.h b/scripts/eastern_kingdoms/sunken_temple/sunken_temple.h index a046eac76..8604ad192 100644 --- a/scripts/eastern_kingdoms/sunken_temple/sunken_temple.h +++ b/scripts/eastern_kingdoms/sunken_temple/sunken_temple.h @@ -115,7 +115,7 @@ class MANGOS_DLL_DECL instance_sunken_temple : public ScriptedInstance uint8 m_uiStatueCounter; uint8 m_uiProtectorsRemaining; - std::list m_luiBigLightGUIDs; + GUIDList m_luiBigLightGUIDs; }; #endif diff --git a/scripts/eastern_kingdoms/sunwell_plateau/sunwell_plateau.h b/scripts/eastern_kingdoms/sunwell_plateau/sunwell_plateau.h index 5b69afa96..680eae902 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/sunwell_plateau.h +++ b/scripts/eastern_kingdoms/sunwell_plateau/sunwell_plateau.h @@ -108,6 +108,6 @@ class MANGOS_DLL_DECL instance_sunwell_plateau : public ScriptedInstance // Misc uint32 m_uiSpectralRealmTimer; - std::list SpectralRealmList; + GUIDList SpectralRealmList; }; #endif diff --git a/scripts/eastern_kingdoms/uldaman/instance_uldaman.cpp b/scripts/eastern_kingdoms/uldaman/instance_uldaman.cpp index 0e50a6f72..11d73dbc0 100644 --- a/scripts/eastern_kingdoms/uldaman/instance_uldaman.cpp +++ b/scripts/eastern_kingdoms/uldaman/instance_uldaman.cpp @@ -106,7 +106,7 @@ void instance_uldaman::SetData(uint32 uiType, uint32 uiData) case TYPE_ARCHAEDAS: if (uiData == FAIL) { - for (std::list::iterator itr = m_lWardens.begin(); itr != m_lWardens.end(); ++itr) + for (GUIDList::const_iterator itr = m_lWardens.begin(); itr != m_lWardens.end(); ++itr) { if (Creature* pWarden = instance->GetCreature(*itr)) { @@ -118,7 +118,7 @@ void instance_uldaman::SetData(uint32 uiType, uint32 uiData) } else if (uiData == DONE) { - for (std::list::iterator itr = m_lWardens.begin(); itr != m_lWardens.end(); ++itr) + for (GUIDList::const_iterator itr = m_lWardens.begin(); itr != m_lWardens.end(); ++itr) { Creature* pWarden = instance->GetCreature(*itr); if (pWarden && pWarden->isAlive()) @@ -231,7 +231,7 @@ Creature* instance_uldaman::GetClosestDwarfNotInCombat(Creature* pSearcher, uint { std::list lTemp; - for (std::list::iterator itr = m_lWardens.begin(); itr != m_lWardens.end(); ++itr) + for (GUIDList::const_iterator itr = m_lWardens.begin(); itr != m_lWardens.end(); ++itr) { Creature* pTemp = instance->GetCreature(*itr); diff --git a/scripts/eastern_kingdoms/uldaman/uldaman.h b/scripts/eastern_kingdoms/uldaman/uldaman.h index 1065bf13e..bc0546a44 100644 --- a/scripts/eastern_kingdoms/uldaman/uldaman.h +++ b/scripts/eastern_kingdoms/uldaman/uldaman.h @@ -72,7 +72,7 @@ class MANGOS_DLL_DECL instance_uldaman : public ScriptedInstance uint32 m_uiKeeperCooldown; uint32 m_uiStoneKeepersFallen; - std::list m_lWardens; + GUIDList m_lWardens; std::map m_mKeeperMap; }; diff --git a/scripts/eastern_kingdoms/zulaman/boss_janalai.cpp b/scripts/eastern_kingdoms/zulaman/boss_janalai.cpp index e9cbf56a9..d4e2a9584 100644 --- a/scripts/eastern_kingdoms/zulaman/boss_janalai.cpp +++ b/scripts/eastern_kingdoms/zulaman/boss_janalai.cpp @@ -149,7 +149,7 @@ struct MANGOS_DLL_DECL boss_janalaiAI : public ScriptedAI uint32 m_uiFireBreathTimer; - std::list m_lBombsGUIDList; + GUIDList m_lBombsGUIDList; std::list m_lEggsRemainingList; uint32 m_uiBombTimer; @@ -333,7 +333,7 @@ struct MANGOS_DLL_DECL boss_janalaiAI : public ScriptedAI if (m_lBombsGUIDList.empty()) return; - for(std::list::iterator itr = m_lBombsGUIDList.begin(); itr != m_lBombsGUIDList.end(); ++itr) + for(GUIDList::const_iterator itr = m_lBombsGUIDList.begin(); itr != m_lBombsGUIDList.end(); ++itr) { if (Creature* pBomb = m_creature->GetMap()->GetCreature(*itr)) { diff --git a/scripts/eastern_kingdoms/zulaman/instance_zulaman.cpp b/scripts/eastern_kingdoms/zulaman/instance_zulaman.cpp index f86d744be..30d4ec3c8 100644 --- a/scripts/eastern_kingdoms/zulaman/instance_zulaman.cpp +++ b/scripts/eastern_kingdoms/zulaman/instance_zulaman.cpp @@ -50,7 +50,7 @@ struct MANGOS_DLL_DECL instance_zulaman : public ScriptedInstance uint64 m_uiMassiveGateGUID; uint64 m_uiMalacrassEntranceGUID; - std::list m_lEggsGUIDList; + GUIDList m_lEggsGUIDList; uint32 m_uiEggsRemainingCount_Left; uint32 m_uiEggsRemainingCount_Right; @@ -170,7 +170,7 @@ struct MANGOS_DLL_DECL instance_zulaman : public ScriptedInstance if (!m_lEggsGUIDList.empty()) { - for(std::list::iterator itr = m_lEggsGUIDList.begin(); itr != m_lEggsGUIDList.end(); ++itr) + for(GUIDList::const_iterator itr = m_lEggsGUIDList.begin(); itr != m_lEggsGUIDList.end(); ++itr) { if (Creature* pEgg = instance->GetCreature(*itr)) { diff --git a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.h b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.h index db5680a98..7502c803e 100644 --- a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.h +++ b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.h @@ -129,8 +129,8 @@ class MANGOS_DLL_DECL instance_culling_of_stratholme : public ScriptedInstance void Update(uint32 uiDiff); - void GetStratAgiatedCitizenList(std::list &lList){ lList = m_lAgiatedCitizenGUIDList; }; - void GetStratAgiatedResidentList(std::list &lList){ lList = m_lAgiatedResidentGUIDList; }; + void GetStratAgiatedCitizenList(GUIDList &lList){ lList = m_lAgiatedCitizenGUIDList; }; + void GetStratAgiatedResidentList(GUIDList &lList){ lList = m_lAgiatedResidentGUIDList; }; void GetCratesBunnyOrderedList(std::list &lList); Creature* GetStratIntroFootman(); @@ -179,12 +179,12 @@ class MANGOS_DLL_DECL instance_culling_of_stratholme : public ScriptedInstance uint64 m_uiOReillyGUID; - std::list m_luiCratesBunnyGUIDs; - std::list m_luiFootmanGUIDs; - std::list m_luiResidentGUIDs; + GUIDList m_luiCratesBunnyGUIDs; + GUIDList m_luiFootmanGUIDs; + GUIDList m_luiResidentGUIDs; - std::list m_lAgiatedCitizenGUIDList; - std::list m_lAgiatedResidentGUIDList; + GUIDList m_lAgiatedCitizenGUIDList; + GUIDList m_lAgiatedResidentGUIDList; uint64 m_uiDoorBookcaseGUID; uint64 m_uiDarkRunedChestGUID; diff --git a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/instance_culling_of_stratholme.cpp b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/instance_culling_of_stratholme.cpp index dbdf799c0..d424b7676 100644 --- a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/instance_culling_of_stratholme.cpp +++ b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/instance_culling_of_stratholme.cpp @@ -422,7 +422,7 @@ static bool sortFromSouthToNorth(Creature* pFirst, Creature* pSecond) void instance_culling_of_stratholme::GetCratesBunnyOrderedList(std::list &lList) { std::list lCratesBunnyList; - for (std::list::const_iterator itr = m_luiCratesBunnyGUIDs.begin(); itr != m_luiCratesBunnyGUIDs.end(); ++itr) + for (GUIDList::const_iterator itr = m_luiCratesBunnyGUIDs.begin(); itr != m_luiCratesBunnyGUIDs.end(); ++itr) { if (Creature* pBunny = instance->GetCreature(*itr)) lCratesBunnyList.push_back(pBunny); @@ -437,7 +437,7 @@ void instance_culling_of_stratholme::GetCratesBunnyOrderedList(std::list lFootmanList; - for (std::list::const_iterator itr = m_luiFootmanGUIDs.begin(); itr != m_luiFootmanGUIDs.end(); ++itr) + for (GUIDList::const_iterator itr = m_luiFootmanGUIDs.begin(); itr != m_luiFootmanGUIDs.end(); ++itr) { if (Creature* pFootman = instance->GetCreature(*itr)) lFootmanList.push_back(pFootman); @@ -455,7 +455,7 @@ Creature* instance_culling_of_stratholme::GetStratIntroFootman() void instance_culling_of_stratholme::GetResidentOrderedList(std::list &lList) { std::list lResidentList; - for (std::list::const_iterator itr = m_luiResidentGUIDs.begin(); itr != m_luiResidentGUIDs.end(); ++itr) + for (GUIDList::const_iterator itr = m_luiResidentGUIDs.begin(); itr != m_luiResidentGUIDs.end(); ++itr) { if (Creature* pResident = instance->GetCreature(*itr)) lResidentList.push_back(pResident); diff --git a/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.cpp b/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.cpp index ff19d8d08..2a198495f 100644 --- a/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.cpp +++ b/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.cpp @@ -398,7 +398,7 @@ void hyjalAI::UpdateAI(const uint32 uiDiff) if (!lWaveMobGUIDList.empty()) { - for(std::list::iterator itr = lWaveMobGUIDList.begin(); itr != lWaveMobGUIDList.end(); ++itr) + for(GUIDList::const_iterator itr = lWaveMobGUIDList.begin(); itr != lWaveMobGUIDList.end(); ++itr) { if (Creature* pTemp = m_pInstance->instance->GetCreature(*itr)) { diff --git a/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.h b/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.h index 83963c1dc..47c5036b4 100644 --- a/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.h +++ b/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.h @@ -193,7 +193,7 @@ struct MANGOS_DLL_DECL hyjalAI : public ScriptedAI private: uint32 m_uiSpellTimer[MAX_SPELL]; - std::list lWaveMobGUIDList; + GUIDList lWaveMobGUIDList; }; #endif diff --git a/scripts/kalimdor/caverns_of_time/hyjal/instance_hyjal.cpp b/scripts/kalimdor/caverns_of_time/hyjal/instance_hyjal.cpp index 9d172a341..7fe52ee8f 100644 --- a/scripts/kalimdor/caverns_of_time/hyjal/instance_hyjal.cpp +++ b/scripts/kalimdor/caverns_of_time/hyjal/instance_hyjal.cpp @@ -39,7 +39,7 @@ struct MANGOS_DLL_DECL instance_mount_hyjal : public ScriptedInstance uint32 m_auiEncounter[MAX_ENCOUNTER]; std::string strSaveData; - std::list lAncientGemGUIDList; + GUIDList lAncientGemGUIDList; uint64 m_uiRageWinterchill; uint64 m_uiAnetheron; @@ -162,7 +162,7 @@ struct MANGOS_DLL_DECL instance_mount_hyjal : public ScriptedInstance { if (!lAncientGemGUIDList.empty()) { - for(std::list::iterator itr = lAncientGemGUIDList.begin(); itr != lAncientGemGUIDList.end(); ++itr) + for(GUIDList::const_iterator itr = lAncientGemGUIDList.begin(); itr != lAncientGemGUIDList.end(); ++itr) { //don't know how long it expected DoRespawnGameObject(*itr,DAY); diff --git a/scripts/kalimdor/dire_maul/dire_maul.h b/scripts/kalimdor/dire_maul/dire_maul.h index 80a75b121..8658fe703 100644 --- a/scripts/kalimdor/dire_maul/dire_maul.h +++ b/scripts/kalimdor/dire_maul/dire_maul.h @@ -112,7 +112,7 @@ class MANGOS_DLL_DECL instance_dire_maul : public ScriptedInstance uint64 m_uiConservatoryDoorGUID; uint64 m_uiOldIronbarkGUID; - std::list m_lFelvineShardGUIDs; + GUIDList m_lFelvineShardGUIDs; // West uint64 m_auiCrystalGeneratorGUID[MAX_GENERATORS]; @@ -123,8 +123,8 @@ class MANGOS_DLL_DECL instance_dire_maul : public ScriptedInstance uint64 m_uiPrincesChestAuraGUID; uint64 m_uiTendrisWarpwoodDoorGUID; - std::list m_luiHighborneSummonerGUIDs; - std::list m_lGeneratorGuardGUIDs; + GUIDList m_luiHighborneSummonerGUIDs; + GUIDList m_lGeneratorGuardGUIDs; std::set m_sSortedGeneratorGuards[MAX_GENERATORS]; // North diff --git a/scripts/kalimdor/dire_maul/instance_dire_maul.cpp b/scripts/kalimdor/dire_maul/instance_dire_maul.cpp index 44d85d5a1..bab6ededb 100644 --- a/scripts/kalimdor/dire_maul/instance_dire_maul.cpp +++ b/scripts/kalimdor/dire_maul/instance_dire_maul.cpp @@ -190,8 +190,8 @@ void instance_dire_maul::SetData(uint32 uiType, uint32 uiData) if (!m_lFelvineShardGUIDs.empty()) { - for(std::list::iterator i = m_lFelvineShardGUIDs.begin(); i != m_lFelvineShardGUIDs.end(); ++i) - DoRespawnGameObject(*i); + for(GUIDList::const_iterator itr = m_lFelvineShardGUIDs.begin(); itr != m_lFelvineShardGUIDs.end(); ++itr) + DoRespawnGameObject(*itr); } } else if (uiData == SPECIAL && !m_bWallDestroyed) @@ -304,7 +304,7 @@ void instance_dire_maul::OnCreatureEnterCombat(Creature* pCreature) continue; // Sort all remaining (alive) NPCs to unfinished generators - for (std::list::iterator itr = m_lGeneratorGuardGUIDs.begin(); itr != m_lGeneratorGuardGUIDs.end();) + for (GUIDList::iterator itr = m_lGeneratorGuardGUIDs.begin(); itr != m_lGeneratorGuardGUIDs.end();) { Creature* pGuard = instance->GetCreature(*itr); if (!pGuard || pGuard->isDead()) // Remove invalid guids and dead guards @@ -425,7 +425,7 @@ void instance_dire_maul::ProcessForceFieldOpening() return; bool bHasYelled = false; - for (std::list::const_iterator itr = m_luiHighborneSummonerGUIDs.begin(); itr != m_luiHighborneSummonerGUIDs.end(); ++itr) + for (GUIDList::const_iterator itr = m_luiHighborneSummonerGUIDs.begin(); itr != m_luiHighborneSummonerGUIDs.end(); ++itr) { Creature* pSummoner = instance->GetCreature(*itr); diff --git a/scripts/kalimdor/temple_of_ahnqiraj/mob_anubisath_sentinel.cpp b/scripts/kalimdor/temple_of_ahnqiraj/mob_anubisath_sentinel.cpp index 416bbe9d7..fe14c0294 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/mob_anubisath_sentinel.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/mob_anubisath_sentinel.cpp @@ -53,7 +53,7 @@ struct MANGOS_DLL_DECL npc_anubisath_sentinelAI : public ScriptedAI uint32 m_uiMyAbility; bool m_bEnraged; - std::list m_lAssistList; + GUIDList m_lAssistList; void Reset() { @@ -63,7 +63,7 @@ struct MANGOS_DLL_DECL npc_anubisath_sentinelAI : public ScriptedAI void JustReachedHome() { - for(std::list::iterator itr = m_lAssistList.begin(); itr != m_lAssistList.end(); ++itr) + for(GUIDList::const_iterator itr = m_lAssistList.begin(); itr != m_lAssistList.end(); ++itr) { if (*itr == m_creature->GetGUID()) continue; @@ -108,7 +108,7 @@ struct MANGOS_DLL_DECL npc_anubisath_sentinelAI : public ScriptedAI void DoTransferAbility() { - for(std::list::iterator itr = m_lAssistList.begin(); itr != m_lAssistList.end(); ++itr) + for(GUIDList::const_iterator itr = m_lAssistList.begin(); itr != m_lAssistList.end(); ++itr) { if (Creature* pBuddy = m_creature->GetMap()->GetCreature(*itr)) { @@ -128,7 +128,7 @@ struct MANGOS_DLL_DECL npc_anubisath_sentinelAI : public ScriptedAI { if (!m_lAssistList.empty()) { - for(std::list::iterator itr = m_lAssistList.begin(); itr != m_lAssistList.end(); ++itr) + for(GUIDList::const_iterator itr = m_lAssistList.begin(); itr != m_lAssistList.end(); ++itr) { if (*itr == m_creature->GetGUID()) continue; diff --git a/scripts/northrend/gundrak/gundrak.h b/scripts/northrend/gundrak/gundrak.h index 997f7bd25..1cccde129 100644 --- a/scripts/northrend/gundrak/gundrak.h +++ b/scripts/northrend/gundrak/gundrak.h @@ -108,9 +108,9 @@ class MANGOS_DLL_DECL instance_gundrak : public ScriptedInstance TypeTimerMap m_mBeamInProgress; TypeTimerMap m_mKeyInProgress; - std::list m_luiStalkerGUIDs; - std::list m_luiStalkerCasterGUIDs; - std::list m_luiStalkerTargetGUIDs; + GUIDList m_luiStalkerGUIDs; + GUIDList m_luiStalkerCasterGUIDs; + GUIDList m_luiStalkerTargetGUIDs; }; #endif diff --git a/scripts/northrend/gundrak/instance_gundrak.cpp b/scripts/northrend/gundrak/instance_gundrak.cpp index 64d0ebb68..79b672f59 100644 --- a/scripts/northrend/gundrak/instance_gundrak.cpp +++ b/scripts/northrend/gundrak/instance_gundrak.cpp @@ -299,7 +299,7 @@ void instance_gundrak::DoAltarVisualEffect(uint8 uiType) fHeight += pCollusAltar->GetPositionZ(); std::list lStalkerTargets, lStalkerCasters; - for (std::list::const_iterator itr = m_luiStalkerGUIDs.begin(); itr != m_luiStalkerGUIDs.end(); ++itr) + for (GUIDList::const_iterator itr = m_luiStalkerGUIDs.begin(); itr != m_luiStalkerGUIDs.end(); ++itr) { if (Creature* pStalker = instance->GetCreature(*itr)) { @@ -335,8 +335,8 @@ void instance_gundrak::DoAltarVisualEffect(uint8 uiType) return; } - std::list::iterator targetItr = m_luiStalkerTargetGUIDs.begin(); - std::list::iterator casterItr = m_luiStalkerCasterGUIDs.begin(); + GUIDList::iterator targetItr = m_luiStalkerTargetGUIDs.begin(); + GUIDList::iterator casterItr = m_luiStalkerCasterGUIDs.begin(); advance(targetItr, uiIndex); advance(casterItr, uiIndex); diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/forge_of_souls.h b/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/forge_of_souls.h index d22e81ceb..58d872a54 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/forge_of_souls.h +++ b/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/forge_of_souls.h @@ -121,8 +121,8 @@ class MANGOS_DLL_DECL instance_forge_of_souls : public ScriptedInstance uint64 m_uiBronjahmGUID; uint64 m_uiDevourerOrSoulsGUID; - std::list m_luiSoulFragmentAliveGUIDs; - std::list m_lEventMobGUIDs; + GUIDList m_luiSoulFragmentAliveGUIDs; + GUIDList m_lEventMobGUIDs; }; #endif diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/instance_forge_of_souls.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/instance_forge_of_souls.cpp index fbb83e234..2c9ed242e 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/instance_forge_of_souls.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/instance_forge_of_souls.cpp @@ -77,7 +77,7 @@ void instance_forge_of_souls::ProcessEventNpcs(Player* pPlayer, bool bChanged) // if bChanged, despawn Begin Mobs, spawn End Mobs at Spawn, else spawn EndMobs at End if (bChanged) { - for (std::list::const_iterator itr = m_lEventMobGUIDs.begin(); itr != m_lEventMobGUIDs.end(); ++itr) + for (GUIDList::const_iterator itr = m_lEventMobGUIDs.begin(); itr != m_lEventMobGUIDs.end(); ++itr) { if (Creature* pSummoned = instance->GetCreature(*itr)) pSummoned->ForcedDespawn(); @@ -123,7 +123,7 @@ void instance_forge_of_souls::SetData(uint32 uiType, uint32 uiData) m_auiEncounter[0] = uiData; // Despawn remaining adds and clear list - for (std::list::const_iterator itr = m_luiSoulFragmentAliveGUIDs.begin(); itr != m_luiSoulFragmentAliveGUIDs.end(); ++itr) + for (GUIDList::const_iterator itr = m_luiSoulFragmentAliveGUIDs.begin(); itr != m_luiSoulFragmentAliveGUIDs.end(); ++itr) { if (Creature* pFragment = instance->GetCreature(*itr)) pFragment->ForcedDespawn(); diff --git a/scripts/northrend/naxxramas/boss_kelthuzad.cpp b/scripts/northrend/naxxramas/boss_kelthuzad.cpp index cb4bdb7ec..93b15de0f 100644 --- a/scripts/northrend/naxxramas/boss_kelthuzad.cpp +++ b/scripts/northrend/naxxramas/boss_kelthuzad.cpp @@ -134,8 +134,8 @@ struct MANGOS_DLL_DECL boss_kelthuzadAI : public ScriptedAI uint32 m_uiIntroPackCount; uint32 m_uiKilledAbomination; - std::set m_lIntroMobsSet; - std::set m_lAddsSet; + GUIDSet m_lIntroMobsSet; + GUIDSet m_lAddsSet; void Reset() { @@ -204,7 +204,7 @@ struct MANGOS_DLL_DECL boss_kelthuzadAI : public ScriptedAI { if (m_pInstance) { - for(std::set::const_iterator itr = m_lIntroMobsSet.begin(); itr != m_lIntroMobsSet.end(); ++itr) + for(GUIDSet::const_iterator itr = m_lIntroMobsSet.begin(); itr != m_lIntroMobsSet.end(); ++itr) { if (Creature* pCreature = m_pInstance->instance->GetCreature(*itr)) pCreature->ForcedDespawn(); @@ -218,7 +218,7 @@ struct MANGOS_DLL_DECL boss_kelthuzadAI : public ScriptedAI { if (m_pInstance) { - for(std::set::const_iterator itr = m_lAddsSet.begin(); itr != m_lAddsSet.end(); ++itr) + for(GUIDSet::const_iterator itr = m_lAddsSet.begin(); itr != m_lAddsSet.end(); ++itr) { if (Creature* pCreature = m_pInstance->instance->GetCreature(*itr)) { diff --git a/scripts/northrend/naxxramas/boss_thaddius.cpp b/scripts/northrend/naxxramas/boss_thaddius.cpp index c371368fb..c63ebe3a6 100644 --- a/scripts/northrend/naxxramas/boss_thaddius.cpp +++ b/scripts/northrend/naxxramas/boss_thaddius.cpp @@ -482,7 +482,7 @@ struct MANGOS_DLL_DECL boss_thaddiusAddsAI : public ScriptedAI { Reset(); // Needed to reset the flags properly - std::list lTeslaGUIDList; + GUIDList lTeslaGUIDList; if (!m_pInstance) return; @@ -490,7 +490,7 @@ struct MANGOS_DLL_DECL boss_thaddiusAddsAI : public ScriptedAI if (lTeslaGUIDList.empty()) return; - for (std::list::const_iterator itr = lTeslaGUIDList.begin(); itr != lTeslaGUIDList.end(); ++itr) + for (GUIDList::const_iterator itr = lTeslaGUIDList.begin(); itr != lTeslaGUIDList.end(); ++itr) { if (Creature* pTesla = m_pInstance->instance->GetCreature(*itr)) { @@ -564,9 +564,9 @@ struct MANGOS_DLL_DECL boss_thaddiusAddsAI : public ScriptedAI m_bBothDead = true; // Now both adds are counting dead pOtherAI->m_bBothDead = true; // Set both Teslas to overload - std::list lTeslaGUIDList; + GUIDList lTeslaGUIDList; m_pInstance->GetThadTeslaCreatures(lTeslaGUIDList); - for (std::list::const_iterator itr = lTeslaGUIDList.begin(); itr != lTeslaGUIDList.end(); ++itr) + for (GUIDList::const_iterator itr = lTeslaGUIDList.begin(); itr != lTeslaGUIDList.end(); ++itr) { if (Creature* pTesla = m_pInstance->instance->GetCreature(*itr)) { diff --git a/scripts/northrend/naxxramas/instance_naxxramas.cpp b/scripts/northrend/naxxramas/instance_naxxramas.cpp index 7901ad8ff..543a5911d 100644 --- a/scripts/northrend/naxxramas/instance_naxxramas.cpp +++ b/scripts/northrend/naxxramas/instance_naxxramas.cpp @@ -302,7 +302,7 @@ void instance_naxxramas::SetData(uint32 uiType, uint32 uiData) } if (uiData == FAIL) { - for (std::list::const_iterator itr = m_lFaerlinaAddGUIDs.begin(); itr != m_lFaerlinaAddGUIDs.end(); ++itr) + for (GUIDList::const_iterator itr = m_lFaerlinaAddGUIDs.begin(); itr != m_lFaerlinaAddGUIDs.end(); ++itr) { Creature* pAdd = instance->GetCreature(*itr); if (pAdd && !pAdd->isAlive()) @@ -576,7 +576,7 @@ void instance_naxxramas::SetGothTriggers() if (!pGoth) return; - for(std::list::iterator itr = m_lGothTriggerList.begin(); itr != m_lGothTriggerList.end(); ++itr) + for(GUIDList::const_iterator itr = m_lGothTriggerList.begin(); itr != m_lGothTriggerList.end(); ++itr) { if (Creature* pTrigger = instance->GetCreature(*itr)) { diff --git a/scripts/northrend/naxxramas/naxxramas.h b/scripts/northrend/naxxramas/naxxramas.h index b352ac878..5fb987ae2 100644 --- a/scripts/northrend/naxxramas/naxxramas.h +++ b/scripts/northrend/naxxramas/naxxramas.h @@ -203,7 +203,7 @@ class MANGOS_DLL_DECL instance_naxxramas : public ScriptedInstance bool IsInRightSideGothArea(Unit* pUnit); // thaddius - void GetThadTeslaCreatures(std::list &lList){ lList = m_lThadTeslaCoilList; }; + void GetThadTeslaCreatures(GUIDList &lList){ lList = m_lThadTeslaCoilList; }; // kel void SetChamberCenterCoords(float fX, float fY, float fZ); @@ -243,7 +243,7 @@ class MANGOS_DLL_DECL instance_naxxramas : public ScriptedInstance uint64 m_uiGlutExitDoorGUID; uint64 m_uiThadDoorGUID; - std::list m_lThadTeslaCoilList; + GUIDList m_lThadTeslaCoilList; uint64 m_uiThadNoxTeslaFeugenGUID; uint64 m_uiThadNoxTeslaStalaggGUID; @@ -253,13 +253,13 @@ class MANGOS_DLL_DECL instance_naxxramas : public ScriptedInstance uint64 m_uiFaerWebGUID; uint64 m_uiMaexOuterGUID; uint64 m_uiMaexInnerGUID; - std::list m_lFaerlinaAddGUIDs; + GUIDList m_lFaerlinaAddGUIDs; uint64 m_uiGothikGUID; uint64 m_uiGothCombatGateGUID; uint64 m_uiGothikEntryDoorGUID; uint64 m_uiGothikExitDoorGUID; - std::list m_lGothTriggerList; + GUIDList m_lGothTriggerList; UNORDERED_MAP m_mGothTriggerMap; uint64 m_uiHorsemenDoorGUID; diff --git a/scripts/northrend/ulduar/halls_of_lightning/boss_ionar.cpp b/scripts/northrend/ulduar/halls_of_lightning/boss_ionar.cpp index dd2c4d624..e16f84f99 100644 --- a/scripts/northrend/ulduar/halls_of_lightning/boss_ionar.cpp +++ b/scripts/northrend/ulduar/halls_of_lightning/boss_ionar.cpp @@ -68,7 +68,7 @@ struct MANGOS_DLL_DECL boss_ionarAI : public ScriptedAI ScriptedInstance* m_pInstance; - std::list m_lSparkGUIDList; + GUIDList m_lSparkGUIDList; bool m_bIsRegularMode; @@ -160,7 +160,7 @@ struct MANGOS_DLL_DECL boss_ionarAI : public ScriptedAI if (m_lSparkGUIDList.empty()) return; - for(std::list::iterator itr = m_lSparkGUIDList.begin(); itr != m_lSparkGUIDList.end(); ++itr) + for(GUIDList::const_iterator itr = m_lSparkGUIDList.begin(); itr != m_lSparkGUIDList.end(); ++itr) { if (Creature* pTemp = m_creature->GetMap()->GetCreature(*itr)) { @@ -179,7 +179,7 @@ struct MANGOS_DLL_DECL boss_ionarAI : public ScriptedAI if (m_lSparkGUIDList.empty()) return; - for(std::list::iterator itr = m_lSparkGUIDList.begin(); itr != m_lSparkGUIDList.end(); ++itr) + for(GUIDList::const_iterator itr = m_lSparkGUIDList.begin(); itr != m_lSparkGUIDList.end(); ++itr) { if (Creature* pSpark = m_creature->GetMap()->GetCreature(*itr)) { diff --git a/scripts/northrend/ulduar/halls_of_lightning/boss_volkhan.cpp b/scripts/northrend/ulduar/halls_of_lightning/boss_volkhan.cpp index e91c503de..358d710f0 100644 --- a/scripts/northrend/ulduar/halls_of_lightning/boss_volkhan.cpp +++ b/scripts/northrend/ulduar/halls_of_lightning/boss_volkhan.cpp @@ -81,7 +81,7 @@ struct MANGOS_DLL_DECL boss_volkhanAI : public ScriptedAI ScriptedInstance* m_pInstance; - std::list m_lGolemGUIDList; + GUIDList m_lGolemGUIDList; bool m_bIsRegularMode; bool m_bHasTemper; @@ -158,7 +158,7 @@ struct MANGOS_DLL_DECL boss_volkhanAI : public ScriptedAI if (m_lGolemGUIDList.empty()) return; - for(std::list::iterator itr = m_lGolemGUIDList.begin(); itr != m_lGolemGUIDList.end(); ++itr) + for(GUIDList::const_iterator itr = m_lGolemGUIDList.begin(); itr != m_lGolemGUIDList.end(); ++itr) { if (Creature* pTemp = m_creature->GetMap()->GetCreature(*itr)) { @@ -175,7 +175,7 @@ struct MANGOS_DLL_DECL boss_volkhanAI : public ScriptedAI if (m_lGolemGUIDList.empty()) return; - for(std::list::iterator itr = m_lGolemGUIDList.begin(); itr != m_lGolemGUIDList.end(); ++itr) + for(GUIDList::const_iterator itr = m_lGolemGUIDList.begin(); itr != m_lGolemGUIDList.end(); ++itr) { if (Creature* pTemp = m_creature->GetMap()->GetCreature(*itr)) { diff --git a/scripts/northrend/violet_hold/instance_violet_hold.cpp b/scripts/northrend/violet_hold/instance_violet_hold.cpp index 41b0fd23d..209278189 100644 --- a/scripts/northrend/violet_hold/instance_violet_hold.cpp +++ b/scripts/northrend/violet_hold/instance_violet_hold.cpp @@ -382,9 +382,9 @@ void instance_violet_hold::Load(const char* chrIn) void instance_violet_hold::SetIntroPortals(bool bDeactivate) { - for(std::list::iterator i = m_lIntroPortalList.begin(); i != m_lIntroPortalList.end(); ++i) + for(GUIDList::const_iterator itr = m_lIntroPortalList.begin(); itr != m_lIntroPortalList.end(); ++itr) { - if (Creature* pPortal = instance->GetCreature(*i)) + if (Creature* pPortal = instance->GetCreature(*itr)) { if (bDeactivate) pPortal->ForcedDespawn(); @@ -499,9 +499,9 @@ void instance_violet_hold::SetRandomBosses() void instance_violet_hold::CallGuards(bool bRespawn) { - for(std::list::iterator i = m_lGuardsList.begin(); i != m_lGuardsList.end(); ++i) + for(GUIDList::const_iterator itr = m_lGuardsList.begin(); itr != m_lGuardsList.end(); ++itr) { - if (Creature* pGuard = instance->GetCreature(*i)) + if (Creature* pGuard = instance->GetCreature(*itr)) { if (bRespawn) { diff --git a/scripts/northrend/violet_hold/violet_hold.cpp b/scripts/northrend/violet_hold/violet_hold.cpp index 1e70b4ef8..452d8e428 100644 --- a/scripts/northrend/violet_hold/violet_hold.cpp +++ b/scripts/northrend/violet_hold/violet_hold.cpp @@ -188,7 +188,7 @@ struct MANGOS_DLL_DECL npc_teleportation_portalAI : public ScriptedAI instance_violet_hold* m_pInstance; - std::set m_lMobSet; + GUIDSet m_lMobSet; bool m_bNeedInvisible; bool m_bIntro; diff --git a/scripts/northrend/violet_hold/violet_hold.h b/scripts/northrend/violet_hold/violet_hold.h index d5964ffad..6bd26abd2 100644 --- a/scripts/northrend/violet_hold/violet_hold.h +++ b/scripts/northrend/violet_hold/violet_hold.h @@ -276,8 +276,8 @@ class MANGOS_DLL_DECL instance_violet_hold : public ScriptedInstance BossToCellMap m_mBossToCellMap; - std::list m_lIntroPortalList; - std::list m_lGuardsList; + GUIDList m_lIntroPortalList; + GUIDList m_lGuardsList; std::list m_lRandomBossList; std::vector m_vRandomBosses; diff --git a/scripts/outland/black_temple/boss_shade_of_akama.cpp b/scripts/outland/black_temple/boss_shade_of_akama.cpp index 4e0d01652..254eac85c 100644 --- a/scripts/outland/black_temple/boss_shade_of_akama.cpp +++ b/scripts/outland/black_temple/boss_shade_of_akama.cpp @@ -126,8 +126,8 @@ struct MANGOS_DLL_DECL boss_shade_of_akamaAI : public ScriptedAI ScriptedInstance* m_pInstance; - std::list m_lChannelersGUIDList; - std::list m_lSorcerersGUIDList; + GUIDList m_lChannelersGUIDList; + GUIDList m_lSorcerersGUIDList; uint64 m_uiAkamaGUID; @@ -240,7 +240,7 @@ struct MANGOS_DLL_DECL boss_shade_of_akamaAI : public ScriptedAI { if (!m_lSorcerersGUIDList.empty() && m_pInstance) { - for(std::list::iterator itr = m_lSorcerersGUIDList.begin(); itr != m_lSorcerersGUIDList.end(); ++itr) + for(GUIDList::const_iterator itr = m_lSorcerersGUIDList.begin(); itr != m_lSorcerersGUIDList.end(); ++itr) { if (Creature* pSorcerer = m_pInstance->instance->GetCreature(*itr)) { @@ -255,7 +255,7 @@ struct MANGOS_DLL_DECL boss_shade_of_akamaAI : public ScriptedAI { if (!m_lChannelersGUIDList.empty() && m_pInstance) { - for(std::list::iterator itr = m_lChannelersGUIDList.begin(); itr != m_lChannelersGUIDList.end(); ++itr) + for(GUIDList::const_iterator itr = m_lChannelersGUIDList.begin(); itr != m_lChannelersGUIDList.end(); ++itr) { if (Creature* pChanneler = m_pInstance->instance->GetCreature(*itr)) { @@ -421,7 +421,7 @@ struct MANGOS_DLL_DECL npc_akamaAI : public ScriptedAI uint32 m_uiWayPointId; uint32 m_uiBrokenSummonIndex; - std::list m_lBrokenGUIDList; + GUIDList m_lBrokenGUIDList; bool m_bIsEventBegun; bool m_bIsShadeDead; @@ -619,7 +619,7 @@ struct MANGOS_DLL_DECL npc_akamaAI : public ScriptedAI { bool bYelled = false; - for(std::list::iterator itr = m_lBrokenGUIDList.begin(); itr != m_lBrokenGUIDList.end(); ++itr) + for(GUIDList::const_iterator itr = m_lBrokenGUIDList.begin(); itr != m_lBrokenGUIDList.end(); ++itr) { if (Creature* pBroken = m_creature->GetMap()->GetCreature(*itr)) { @@ -637,26 +637,20 @@ struct MANGOS_DLL_DECL npc_akamaAI : public ScriptedAI m_uiSoulRetrieveTimer = 1500; break; case 3: - if (!m_lBrokenGUIDList.empty()) + for(GUIDList::const_iterator itr = m_lBrokenGUIDList.begin(); itr != m_lBrokenGUIDList.end(); ++itr) { - for(std::list::iterator itr = m_lBrokenGUIDList.begin(); itr != m_lBrokenGUIDList.end(); ++itr) - { - // This is the incorrect spell, but can't seem to find the right one. - if (Creature* pBroken = m_creature->GetMap()->GetCreature(*itr)) - pBroken->CastSpell(pBroken, 39656, true); - } + // This is the incorrect spell, but can't seem to find the right one. + if (Creature* pBroken = m_creature->GetMap()->GetCreature(*itr)) + pBroken->CastSpell(pBroken, 39656, true); } ++m_uiEndingTalkCount; m_uiSoulRetrieveTimer = 5000; break; case 4: - if (!m_lBrokenGUIDList.empty()) + for(GUIDList::const_iterator itr = m_lBrokenGUIDList.begin(); itr != m_lBrokenGUIDList.end(); ++itr) { - for(std::list::iterator itr = m_lBrokenGUIDList.begin(); itr != m_lBrokenGUIDList.end(); ++itr) - { - if (Creature* pBroken = m_creature->GetMap()->GetCreature(*itr)) - DoScriptText(SAY_BROKEN_FREE_02, pBroken); - } + if (Creature* pBroken = m_creature->GetMap()->GetCreature(*itr)) + DoScriptText(SAY_BROKEN_FREE_02, pBroken); } m_uiSoulRetrieveTimer = 0; break; diff --git a/scripts/outland/black_temple/boss_supremus.cpp b/scripts/outland/black_temple/boss_supremus.cpp index 4e0bff084..1cba91ace 100644 --- a/scripts/outland/black_temple/boss_supremus.cpp +++ b/scripts/outland/black_temple/boss_supremus.cpp @@ -103,7 +103,7 @@ struct MANGOS_DLL_DECL boss_supremusAI : public ScriptedAI bool m_bTankPhase; - std::list m_lSummonedGUIDs; + GUIDList m_lSummonedGUIDs; void Reset() { @@ -135,7 +135,7 @@ struct MANGOS_DLL_DECL boss_supremusAI : public ScriptedAI if (m_pInstance) m_pInstance->SetData(TYPE_SUPREMUS, DONE); - for (std::list::const_iterator itr = m_lSummonedGUIDs.begin(); itr != m_lSummonedGUIDs.end(); ++itr) + for (GUIDList::const_iterator itr = m_lSummonedGUIDs.begin(); itr != m_lSummonedGUIDs.end(); ++itr) { if (Creature* pSummoned = m_creature->GetMap()->GetCreature(*itr)) pSummoned->ForcedDespawn(); diff --git a/scripts/outland/hellfire_citadel/magtheridons_lair/instance_magtheridons_lair.cpp b/scripts/outland/hellfire_citadel/magtheridons_lair/instance_magtheridons_lair.cpp index d6b46c013..12390c55f 100644 --- a/scripts/outland/hellfire_citadel/magtheridons_lair/instance_magtheridons_lair.cpp +++ b/scripts/outland/hellfire_citadel/magtheridons_lair/instance_magtheridons_lair.cpp @@ -31,9 +31,9 @@ struct MANGOS_DLL_DECL instance_magtheridons_lair : public ScriptedInstance uint32 m_auiEncounter[MAX_ENCOUNTER]; uint64 m_uiMagtheridonGUID; - std::set ChannelerGUID; + GUIDSet ChannelerGUID; uint64 m_uiDoorGUID; - std::set ColumnGUID; + GUIDSet ColumnGUID; uint32 m_uiCageTimer; uint32 m_uiRespawnTimer; @@ -120,9 +120,9 @@ struct MANGOS_DLL_DECL instance_magtheridons_lair : public ScriptedInstance break; } - for(std::set::iterator i = ChannelerGUID.begin(); i != ChannelerGUID.end(); ++i) + for(GUIDSet::const_iterator itr = ChannelerGUID.begin(); itr != ChannelerGUID.end(); ++itr) { - if (Creature* pChanneler = instance->GetCreature(*i)) + if (Creature* pChanneler = instance->GetCreature(*itr)) { if (pChanneler->isAlive()) pChanneler->AI()->EnterEvadeMode(); @@ -143,9 +143,9 @@ struct MANGOS_DLL_DECL instance_magtheridons_lair : public ScriptedInstance m_auiEncounter[1] = IN_PROGRESS; // Let all five channelers aggro. - for(std::set::iterator i = ChannelerGUID.begin(); i != ChannelerGUID.end(); ++i) + for(GUIDSet::const_iterator itr = ChannelerGUID.begin(); itr != ChannelerGUID.end(); ++itr) { - Creature* pChanneler = instance->GetCreature(*i); + Creature* pChanneler = instance->GetCreature(*itr); if (pChanneler && pChanneler->isAlive()) AttackNearestTarget(pChanneler); @@ -162,9 +162,9 @@ struct MANGOS_DLL_DECL instance_magtheridons_lair : public ScriptedInstance } break; case DONE: // Add buff and check if all channelers are dead. - for(std::set::iterator i = ChannelerGUID.begin(); i != ChannelerGUID.end(); ++i) + for(GUIDSet::iterator itr = ChannelerGUID.begin(); itr != ChannelerGUID.end(); ++itr) { - Creature* pChanneler = instance->GetCreature(*i); + Creature* pChanneler = instance->GetCreature(*itr); if (pChanneler && pChanneler->isAlive()) { @@ -180,10 +180,8 @@ struct MANGOS_DLL_DECL instance_magtheridons_lair : public ScriptedInstance break; case TYPE_HALL_COLLAPSE: // IN_PROGRESS - collapse / NOT_STARTED - reset - for(std::set::iterator i = ColumnGUID.begin(); i != ColumnGUID.end(); ++i) - { - DoUseDoorOrButton(*i); - } + for(GUIDSet::const_iterator itr = ColumnGUID.begin(); itr != ColumnGUID.end(); ++itr) + DoUseDoorOrButton(*itr); break; } } @@ -254,9 +252,9 @@ struct MANGOS_DLL_DECL instance_magtheridons_lair : public ScriptedInstance { if (m_uiRespawnTimer <= uiDiff) { - for(std::set::iterator i = ChannelerGUID.begin(); i != ChannelerGUID.end(); ++i) + for(GUIDSet::const_iterator itr = ChannelerGUID.begin(); itr != ChannelerGUID.end(); ++itr) { - if (Creature* pChanneler = instance->GetCreature(*i)) + if (Creature* pChanneler = instance->GetCreature(*itr)) { if (pChanneler->isAlive()) pChanneler->AI()->EnterEvadeMode(); diff --git a/scripts/outland/hellfire_citadel/shattered_halls/boss_warchief_kargath_bladefist.cpp b/scripts/outland/hellfire_citadel/shattered_halls/boss_warchief_kargath_bladefist.cpp index 03e870173..d9debc1a7 100644 --- a/scripts/outland/hellfire_citadel/shattered_halls/boss_warchief_kargath_bladefist.cpp +++ b/scripts/outland/hellfire_citadel/shattered_halls/boss_warchief_kargath_bladefist.cpp @@ -60,8 +60,8 @@ struct MANGOS_DLL_DECL boss_warchief_kargath_bladefistAI : public ScriptedAI ScriptedInstance* m_pInstance; bool m_bIsRegularMode; - std::vector adds; - std::vector assassins; + GUIDVector adds; + GUIDVector assassins; uint32 Charge_timer; uint32 Blade_Dance_Timer; @@ -157,7 +157,7 @@ struct MANGOS_DLL_DECL boss_warchief_kargath_bladefistAI : public ScriptedAI if (!m_pInstance) return; - for(std::vector::iterator itr = adds.begin(); itr!= adds.end(); ++itr) + for(GUIDVector::const_iterator itr = adds.begin(); itr != adds.end(); ++itr) { if (Creature* pTemp = m_pInstance->instance->GetCreature(*itr)) pTemp->ForcedDespawn(); @@ -165,7 +165,7 @@ struct MANGOS_DLL_DECL boss_warchief_kargath_bladefistAI : public ScriptedAI adds.clear(); - for(std::vector::iterator itr = assassins.begin(); itr!= assassins.end(); ++itr) + for(GUIDVector::const_iterator itr = assassins.begin(); itr != assassins.end(); ++itr) { if (Creature* pTemp = m_pInstance->instance->GetCreature(*itr)) pTemp->ForcedDespawn(); diff --git a/scripts/outland/tempest_keep/botanica/boss_high_botanist_freywinn.cpp b/scripts/outland/tempest_keep/botanica/boss_high_botanist_freywinn.cpp index 3c72465dc..b68213780 100644 --- a/scripts/outland/tempest_keep/botanica/boss_high_botanist_freywinn.cpp +++ b/scripts/outland/tempest_keep/botanica/boss_high_botanist_freywinn.cpp @@ -45,7 +45,7 @@ struct MANGOS_DLL_DECL boss_high_botanist_freywinnAI : public ScriptedAI { boss_high_botanist_freywinnAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } - std::list Adds_List; + GUIDList Adds_List; uint32 SummonSeedling_Timer; uint32 TreeForm_Timer; @@ -124,18 +124,15 @@ struct MANGOS_DLL_DECL boss_high_botanist_freywinnAI : public ScriptedAI { if (MoveCheck_Timer < diff) { - if (!Adds_List.empty()) + for(GUIDList::iterator itr = Adds_List.begin(); itr != Adds_List.end(); ++itr) { - for(std::list::iterator itr = Adds_List.begin(); itr != Adds_List.end(); ++itr) + if (Creature* pTemp = m_creature->GetMap()->GetCreature(*itr)) { - if (Creature *temp = m_creature->GetMap()->GetCreature(*itr)) + if (!pTemp->isAlive()) { - if (!temp->isAlive()) - { - Adds_List.erase(itr); - ++DeadAddsCount; - break; - } + Adds_List.erase(itr); + ++DeadAddsCount; + break; } } } diff --git a/scripts/world/npcs_special.cpp b/scripts/world/npcs_special.cpp index 11e1db573..f802a3d0f 100644 --- a/scripts/world/npcs_special.cpp +++ b/scripts/world/npcs_special.cpp @@ -487,7 +487,7 @@ struct MANGOS_DLL_DECL npc_doctorAI : public ScriptedAI bool Event; - std::list Patients; + GUIDList Patients; std::vector Coordinates; void Reset() @@ -701,14 +701,10 @@ void npc_doctorAI::PatientSaved(Creature* soldier, Player* pPlayer, Location* Po if (PatientSavedCount == 15) { - if (!Patients.empty()) + for(GUIDList::const_iterator itr = Patients.begin(); itr != Patients.end(); ++itr) { - std::list::iterator itr; - for(itr = Patients.begin(); itr != Patients.end(); ++itr) - { - if (Creature* Patient = m_creature->GetMap()->GetCreature(*itr)) - Patient->SetDeathState(JUST_DIED); - } + if (Creature* Patient = m_creature->GetMap()->GetCreature(*itr)) + Patient->SetDeathState(JUST_DIED); } if (pPlayer->GetQuestStatus(QUEST_TRIAGE_A) == QUEST_STATUS_INCOMPLETE) diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index c5f9e3995..536a58979 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2087" + #define SD2_REVISION_NR "2088" #endif // __SD2_REVISION_NR_H__ From 9981fbaeb664b21fe656e2d9133e87b6a610c080 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Tue, 10 May 2011 20:06:54 +0200 Subject: [PATCH 0068/1172] [2089] Fix Compile after MaNGOS Rev 11465 --- .../temple_of_ahnqiraj/boss_cthun.cpp | 27 ++++++++++--------- sd2_revision_nr.h | 2 +- 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_cthun.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_cthun.cpp index 6611efff1..01c671630 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/boss_cthun.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_cthun.cpp @@ -463,8 +463,9 @@ struct MANGOS_DLL_DECL cthunAI : public ScriptedAI uint32 StomachEnterVisTimer; uint64 StomachEnterTarget; - //Stomach map, bool = true then in stomach - UNORDERED_MAP Stomach_Map; + // Stomach map, bool = true then in stomach + typedef UNORDERED_MAP StomachMap; + StomachMap m_mStomachMap; void Reset() { @@ -488,7 +489,7 @@ struct MANGOS_DLL_DECL cthunAI : public ScriptedAI StomachEnterTarget = 0; //Target to be teleported to stomach //Clear players in stomach and outside - Stomach_Map.clear(); + m_mStomachMap.clear(); //Reset flags m_creature->RemoveAurasDueToSpell(SPELL_TRANSFORM); @@ -515,16 +516,16 @@ struct MANGOS_DLL_DECL cthunAI : public ScriptedAI Unit* SelectRandomNotStomach() { - if (Stomach_Map.empty()) + if (m_mStomachMap.empty()) return NULL; - UNORDERED_MAP::iterator i = Stomach_Map.begin(); + StomachMap::iterator i = m_mStomachMap.begin(); std::list temp; std::list::iterator j; //Get all players in map - while (i != Stomach_Map.end()) + while (i != m_mStomachMap.end()) { //Check for valid player Unit* pUnit = m_creature->GetMap()->GetUnit(i->first); @@ -609,13 +610,13 @@ struct MANGOS_DLL_DECL cthunAI : public ScriptedAI m_creature->SetInCombatWithZone(); //Place all units in threat list on outside of stomach - Stomach_Map.clear(); + m_mStomachMap.clear(); ThreatList const& tList = m_creature->getThreatManager().getThreatList(); for (ThreatList::const_iterator i = tList.begin();i != tList.end(); ++i) { //Outside stomach - Stomach_Map[(*i)->getUnitGuid()] = false; + m_mStomachMap[(*i)->getUnitGuid()] = false; } //Spawn 2 flesh tentacles @@ -664,10 +665,10 @@ struct MANGOS_DLL_DECL cthunAI : public ScriptedAI DoCastSpellIfCan(m_creature, SPELL_RED_COLORATION, CAST_TRIGGERED); - UNORDERED_MAP::iterator i = Stomach_Map.begin(); + StomachMap::iterator i = m_mStomachMap.begin(); //Kick all players out of stomach - while (i != Stomach_Map.end()) + while (i != m_mStomachMap.end()) { //Check for valid player Unit* pUnit = m_creature->GetMap()->GetUnit(i->first); @@ -696,9 +697,9 @@ struct MANGOS_DLL_DECL cthunAI : public ScriptedAI if (StomachAcidTimer < diff) { //Apply aura to all players in stomach - UNORDERED_MAP::iterator i = Stomach_Map.begin(); + StomachMap::iterator i = m_mStomachMap.begin(); - while (i != Stomach_Map.end()) + while (i != m_mStomachMap.end()) { //Check for valid player Unit* pUnit = m_creature->GetMap()->GetUnit(i->first); @@ -739,7 +740,7 @@ struct MANGOS_DLL_DECL cthunAI : public ScriptedAI if (target) { //Set target in stomach - Stomach_Map[target->GetGUID()] = true; + m_mStomachMap[target->GetObjectGuid()] = true; target->InterruptNonMeleeSpells(false); target->CastSpell(target, SPELL_MOUTH_TENTACLE, true, NULL, NULL, m_creature->GetGUID()); StomachEnterTarget = target->GetGUID(); diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 536a58979..ffead41bb 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2088" + #define SD2_REVISION_NR "2089" #endif // __SD2_REVISION_NR_H__ From 3cfe2b5f75b57269901f237d88bf3b5fc1edba52 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Tue, 10 May 2011 21:11:07 +0200 Subject: [PATCH 0069/1172] [2090] Cleanup and improve magisters terrace script * Move to header version * Use common naming * Remove IsEncounterInProgress for this instance, this is not common for 5man dungeons * Use proper door handling for Selin Fireheart and Kael'thas * Add Save&Load support Please report freshly introduced bugs! --- .../boss_felblood_kaelthas.cpp | 34 +-- .../boss_priestess_delrissa.cpp | 24 +- .../boss_selin_fireheart.cpp | 39 +-- .../magisters_terrace/boss_vexallus.cpp | 6 +- .../instance_magisters_terrace.cpp | 286 ++++++++++-------- .../magisters_terrace/magisters_terrace.h | 79 +++-- .../sunken_temple/instance_sunken_temple.cpp | 1 - sd2_revision_nr.h | 2 +- 8 files changed, 256 insertions(+), 215 deletions(-) diff --git a/scripts/eastern_kingdoms/magisters_terrace/boss_felblood_kaelthas.cpp b/scripts/eastern_kingdoms/magisters_terrace/boss_felblood_kaelthas.cpp index 019eb48fd..9eda3c1d8 100644 --- a/scripts/eastern_kingdoms/magisters_terrace/boss_felblood_kaelthas.cpp +++ b/scripts/eastern_kingdoms/magisters_terrace/boss_felblood_kaelthas.cpp @@ -127,26 +127,14 @@ struct MANGOS_DLL_DECL boss_felblood_kaelthasAI : public ScriptedAI HasTaunted = false; Phase = 0; - - if (m_pInstance) - { - m_pInstance->SetData(DATA_KAELTHAS_EVENT, NOT_STARTED); - - if (GameObject* pDoor = m_pInstance->instance->GetGameObject(m_pInstance->GetData64(DATA_KAEL_DOOR))) - pDoor->SetGoState(GO_STATE_ACTIVE); // Open the big encounter door. Close it in Aggro and open it only in JustDied(and here) - // Small door opened after event are expected to be closed by default - } } void JustDied(Unit *killer) { DoScriptText(SAY_DEATH, m_creature); - if (!m_pInstance) - return; - - if (GameObject* pEncounterDoor = m_pInstance->instance->GetGameObject(m_pInstance->GetData64(DATA_KAEL_DOOR))) - pEncounterDoor->SetGoState(GO_STATE_ACTIVE); // Open the encounter door + if (m_pInstance) + m_pInstance->SetData(TYPE_KAELTHAS, DONE); } void DamageTaken(Unit* done_by, uint32 &damage) @@ -157,11 +145,15 @@ struct MANGOS_DLL_DECL boss_felblood_kaelthasAI : public ScriptedAI void Aggro(Unit *who) { - if (!m_pInstance) - return; + if (m_pInstance) + m_pInstance->SetData(TYPE_KAELTHAS, IN_PROGRESS); + } + + void JustReachedHome() + { + if (m_pInstance) + m_pInstance->SetData(TYPE_KAELTHAS, FAIL); - if (GameObject* pEncounterDoor = m_pInstance->instance->GetGameObject(m_pInstance->GetData64(DATA_KAEL_DOOR))) - pEncounterDoor->SetGoState(GO_STATE_READY); //Close the encounter door, open it in JustDied/Reset } void MoveInLineOfSight(Unit *who) @@ -352,10 +344,10 @@ struct MANGOS_DLL_DECL boss_felblood_kaelthasAI : public ScriptedAI if (m_pInstance) { - if (GameObject* pKaelLeft = m_pInstance->instance->GetGameObject(m_pInstance->GetData64(DATA_KAEL_STATUE_LEFT))) + if (GameObject* pKaelLeft = m_pInstance->instance->GetGameObject(m_pInstance->GetData64(GO_KAEL_STATUE_LEFT))) pKaelLeft->SetGoState(GO_STATE_ACTIVE); - if (GameObject* pKaelRight = m_pInstance->instance->GetGameObject(m_pInstance->GetData64(DATA_KAEL_STATUE_RIGHT))) + if (GameObject* pKaelRight = m_pInstance->instance->GetGameObject(m_pInstance->GetData64(GO_KAEL_STATUE_RIGHT))) pKaelRight->SetGoState(GO_STATE_ACTIVE); } } @@ -453,7 +445,7 @@ struct MANGOS_DLL_DECL mob_felkael_phoenixAI : public ScriptedAI } //Don't really die in all phases of Kael'Thas - if (m_pInstance && m_pInstance->GetData(DATA_KAELTHAS_EVENT) == 0) + if (m_pInstance && m_pInstance->GetData(TYPE_KAELTHAS) == NOT_STARTED) { //prevent death damage = 0; diff --git a/scripts/eastern_kingdoms/magisters_terrace/boss_priestess_delrissa.cpp b/scripts/eastern_kingdoms/magisters_terrace/boss_priestess_delrissa.cpp index bf023cb72..d67ba82d1 100644 --- a/scripts/eastern_kingdoms/magisters_terrace/boss_priestess_delrissa.cpp +++ b/scripts/eastern_kingdoms/magisters_terrace/boss_priestess_delrissa.cpp @@ -127,7 +127,7 @@ struct MANGOS_DLL_DECL boss_priestess_delrissaAI : public ScriptedAI void JustReachedHome() { if (m_pInstance) - m_pInstance->SetData(DATA_DELRISSA_EVENT, FAIL); + m_pInstance->SetData(TYPE_DELRISSA, FAIL); } void Aggro(Unit* pWho) @@ -147,7 +147,7 @@ struct MANGOS_DLL_DECL boss_priestess_delrissaAI : public ScriptedAI } if (m_pInstance) - m_pInstance->SetData(DATA_DELRISSA_EVENT, IN_PROGRESS); + m_pInstance->SetData(TYPE_DELRISSA, IN_PROGRESS); } void InitializeLackeys() @@ -216,8 +216,8 @@ struct MANGOS_DLL_DECL boss_priestess_delrissaAI : public ScriptedAI if (!m_pInstance) return; - if (m_pInstance->GetData(DATA_DELRISSA_DEATH_COUNT) == MAX_ACTIVE_LACKEY) - m_pInstance->SetData(DATA_DELRISSA_EVENT, DONE); + if (m_pInstance->GetData(TYPE_DELRISSA_DEATH_COUNT) == MAX_ACTIVE_LACKEY) + m_pInstance->SetData(TYPE_DELRISSA, DONE); else { if (m_creature->HasFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE)) @@ -361,7 +361,7 @@ struct MANGOS_DLL_DECL boss_priestess_lackey_commonAI : public ScriptedAI m_uiResetThreatTimer = urand(5000, 15000); // in case she is not alive and Reset was for some reason called, respawn her (most likely party wipe after killing her) - if (Creature* pDelrissa = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(DATA_DELRISSA))) + if (Creature* pDelrissa = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(NPC_DELRISSA))) { if (!pDelrissa->isAlive()) pDelrissa->Respawn(); @@ -387,7 +387,7 @@ struct MANGOS_DLL_DECL boss_priestess_lackey_commonAI : public ScriptedAI } } - if (Creature* pDelrissa = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(DATA_DELRISSA))) + if (Creature* pDelrissa = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(NPC_DELRISSA))) { if (pDelrissa->isAlive() && !pDelrissa->getVictim()) { @@ -405,8 +405,8 @@ struct MANGOS_DLL_DECL boss_priestess_lackey_commonAI : public ScriptedAI if (!m_pInstance) return; - Creature* pDelrissa = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(DATA_DELRISSA)); - uint32 uiLackeyDeathCount = m_pInstance->GetData(DATA_DELRISSA_DEATH_COUNT); + Creature* pDelrissa = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(NPC_DELRISSA)); + uint32 uiLackeyDeathCount = m_pInstance->GetData(TYPE_DELRISSA_DEATH_COUNT); if (!pDelrissa) return; @@ -414,7 +414,7 @@ struct MANGOS_DLL_DECL boss_priestess_lackey_commonAI : public ScriptedAI //should delrissa really yell if dead? DoScriptText(LackeyDeath[uiLackeyDeathCount].id, pDelrissa); - m_pInstance->SetData(DATA_DELRISSA_DEATH_COUNT, SPECIAL); + m_pInstance->SetData(TYPE_DELRISSA_DEATH_COUNT, SPECIAL); //increase local var, since we now may have four dead ++uiLackeyDeathCount; @@ -427,7 +427,7 @@ struct MANGOS_DLL_DECL boss_priestess_lackey_commonAI : public ScriptedAI if (!pDelrissa->HasFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE)) pDelrissa->SetFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE); - m_pInstance->SetData(DATA_DELRISSA_EVENT, DONE); + m_pInstance->SetData(TYPE_DELRISSA, DONE); } } } @@ -437,7 +437,7 @@ struct MANGOS_DLL_DECL boss_priestess_lackey_commonAI : public ScriptedAI if (!m_pInstance) return; - if (Creature* pDelrissa = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(DATA_DELRISSA))) + if (Creature* pDelrissa = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(NPC_DELRISSA))) pDelrissa->AI()->KilledUnit(pVictim); } @@ -446,7 +446,7 @@ struct MANGOS_DLL_DECL boss_priestess_lackey_commonAI : public ScriptedAI if (!m_pInstance) return; - if (Creature* pDelrissa = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(DATA_DELRISSA))) + if (Creature* pDelrissa = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(NPC_DELRISSA))) { boss_priestess_delrissaAI* pDelrissaAI = dynamic_cast(pDelrissa->AI()); diff --git a/scripts/eastern_kingdoms/magisters_terrace/boss_selin_fireheart.cpp b/scripts/eastern_kingdoms/magisters_terrace/boss_selin_fireheart.cpp index 7ed2feee8..aa5874dfb 100644 --- a/scripts/eastern_kingdoms/magisters_terrace/boss_selin_fireheart.cpp +++ b/scripts/eastern_kingdoms/magisters_terrace/boss_selin_fireheart.cpp @@ -60,10 +60,10 @@ struct MANGOS_DLL_DECL boss_selin_fireheartAI : public ScriptedAI //GUIDs per instance is static, so we only need to load them once. if (m_pInstance) { - uint32 size = m_pInstance->GetData(DATA_FEL_CRYSTAL_SIZE); + uint32 size = m_pInstance->GetData(TYPE_FEL_CRYSTAL_SIZE); for(uint8 i = 0; i < size; ++i) { - uint64 guid = m_pInstance->GetData64(DATA_FEL_CRYSTAL); + uint64 guid = m_pInstance->GetData64(NPC_FEL_CRYSTAL); debug_log("SD2: Selin: Adding Fel Crystal " UI64FMTD " to list", guid); Crystals.push_back(guid); } @@ -104,13 +104,7 @@ struct MANGOS_DLL_DECL boss_selin_fireheartAI : public ScriptedAI pCrystal->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); } } - - if (GameObject* pDoor = m_pInstance->instance->GetGameObject(m_pInstance->GetData64(DATA_SELIN_ENCOUNTER_DOOR))) - pDoor->SetGoState(GO_STATE_ACTIVE); // Open the big encounter door. Close it in Aggro and open it only in JustDied(and here) - // Small door opened after event are expected to be closed by default - // Set Inst data for encounter - m_pInstance->SetData(DATA_SELIN_EVENT, NOT_STARTED); - }else error_log(ERROR_INST_DATA); + } DrainLifeTimer = urand(3000, 7000); DrainManaTimer = DrainLifeTimer + 5000; @@ -185,11 +179,13 @@ struct MANGOS_DLL_DECL boss_selin_fireheartAI : public ScriptedAI DoScriptText(SAY_AGGRO, m_creature); if (m_pInstance) - { - //Close the encounter door, open it in JustDied/Reset - if (GameObject* pEncounterDoor = m_pInstance->instance->GetGameObject(m_pInstance->GetData64(DATA_SELIN_ENCOUNTER_DOOR))) - pEncounterDoor->SetGoState(GO_STATE_READY); - } + m_pInstance->SetData(TYPE_SELIN, IN_PROGRESS); + } + + void JustReachedHome() + { + if (m_pInstance) + m_pInstance->SetData(TYPE_SELIN, FAIL); } void KilledUnit(Unit* victim) @@ -224,18 +220,9 @@ struct MANGOS_DLL_DECL boss_selin_fireheartAI : public ScriptedAI DoScriptText(SAY_DEATH, m_creature); if (!m_pInstance) - { - error_log(ERROR_INST_DATA); return; - } - m_pInstance->SetData(DATA_SELIN_EVENT, DONE); // Encounter complete! - - if (GameObject* pEncounterDoor = m_pInstance->instance->GetGameObject(m_pInstance->GetData64(DATA_SELIN_ENCOUNTER_DOOR))) - pEncounterDoor->SetGoState(GO_STATE_ACTIVE); // Open the encounter door - - if (GameObject* pContinueDoor = m_pInstance->instance->GetGameObject(m_pInstance->GetData64(DATA_SELIN_DOOR))) - pContinueDoor->SetGoState(GO_STATE_ACTIVE); // Open the door leading further in + m_pInstance->SetData(TYPE_SELIN, DONE); // Encounter complete! ShatterRemainingCrystals(); } @@ -342,7 +329,7 @@ struct MANGOS_DLL_DECL mob_fel_crystalAI : public ScriptedAI { if (ScriptedInstance* pInstance = (ScriptedInstance*)m_creature->GetInstanceData()) { - Creature* pSelin = m_creature->GetMap()->GetCreature(pInstance->GetData64(DATA_SELIN)); + Creature* pSelin = m_creature->GetMap()->GetCreature(pInstance->GetData64(NPC_SELIN_FIREHEART)); if (pSelin && pSelin->isAlive()) { @@ -362,7 +349,7 @@ struct MANGOS_DLL_DECL mob_fel_crystalAI : public ScriptedAI } } } - }else error_log(ERROR_INST_DATA); + } } }; diff --git a/scripts/eastern_kingdoms/magisters_terrace/boss_vexallus.cpp b/scripts/eastern_kingdoms/magisters_terrace/boss_vexallus.cpp index b53293042..e0738e345 100644 --- a/scripts/eastern_kingdoms/magisters_terrace/boss_vexallus.cpp +++ b/scripts/eastern_kingdoms/magisters_terrace/boss_vexallus.cpp @@ -85,7 +85,7 @@ struct MANGOS_DLL_DECL boss_vexallusAI : public ScriptedAI Enraged = false; if (m_pInstance) - m_pInstance->SetData(DATA_VEXALLUS_EVENT, NOT_STARTED); + m_pInstance->SetData(TYPE_VEXALLUS, NOT_STARTED); } void KilledUnit(Unit *victim) @@ -96,7 +96,7 @@ struct MANGOS_DLL_DECL boss_vexallusAI : public ScriptedAI void JustDied(Unit *victim) { if (m_pInstance) - m_pInstance->SetData(DATA_VEXALLUS_EVENT, DONE); + m_pInstance->SetData(TYPE_VEXALLUS, DONE); } void Aggro(Unit *who) @@ -104,7 +104,7 @@ struct MANGOS_DLL_DECL boss_vexallusAI : public ScriptedAI DoScriptText(SAY_AGGRO, m_creature); if (m_pInstance) - m_pInstance->SetData(DATA_VEXALLUS_EVENT, IN_PROGRESS); + m_pInstance->SetData(TYPE_VEXALLUS, IN_PROGRESS); } void JustSummoned(Creature* pSummoned) diff --git a/scripts/eastern_kingdoms/magisters_terrace/instance_magisters_terrace.cpp b/scripts/eastern_kingdoms/magisters_terrace/instance_magisters_terrace.cpp index 7b9e70db7..65b79b5f2 100644 --- a/scripts/eastern_kingdoms/magisters_terrace/instance_magisters_terrace.cpp +++ b/scripts/eastern_kingdoms/magisters_terrace/instance_magisters_terrace.cpp @@ -24,8 +24,6 @@ EndScriptData */ #include "precompiled.h" #include "magisters_terrace.h" -#define MAX_ENCOUNTER 4 - /* 0 - Selin Fireheart 1 - Vexallus @@ -33,163 +31,183 @@ EndScriptData */ 3 - Kael'thas Sunstrider */ -struct MANGOS_DLL_DECL instance_magisters_terrace : public ScriptedInstance -{ - instance_magisters_terrace(Map* pMap) : ScriptedInstance(pMap) {Initialize();} +instance_magisters_terrace::instance_magisters_terrace(Map* pMap) : ScriptedInstance(pMap), + m_uiDelrissaDeathCount(0), - uint32 m_auiEncounter[MAX_ENCOUNTER]; + m_uiSelinGUID(0), + m_uiDelrissaGUID(0), + m_uiVexallusDoorGUID(0), + m_uiSelinDoorGUID(0), + m_uiSelinEncounterDoorGUID(0), + m_uiDelrissaDoorGUID(0), + m_uiKaelDoorGUID(0), - uint32 m_uiDelrissaDeathCount; + m_bInitializedItr(false) +{ + Initialize(); +} - GUIDList FelCrystals; - GUIDList::iterator CrystalItr; +void instance_magisters_terrace::Initialize() +{ + memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); + memset(&m_auiKaelStatue, 0, sizeof(m_auiKaelStatue)); +} - uint64 m_uiSelinGUID; - uint64 m_uiDelrissaGUID; - uint64 m_uiVexallusDoorGUID; - uint64 m_uiSelinDoorGUID; - uint64 m_uiSelinEncounterDoorGUID; - uint64 m_uiDelrissaDoorGUID; - uint64 m_uiKaelDoorGUID; - uint64 m_auiKaelStatue[2]; +void instance_magisters_terrace::OnCreatureCreate(Creature* pCreature) +{ + switch (pCreature->GetEntry()) + { + case NPC_SELIN_FIREHEART: m_uiSelinGUID = pCreature->GetGUID(); break; + case NPC_DELRISSA: m_uiDelrissaGUID = pCreature->GetGUID(); break; + case NPC_FEL_CRYSTAL: FelCrystals.push_back(pCreature->GetGUID()); break; + } +} - bool m_bInitializedItr; +void instance_magisters_terrace::OnObjectCreate(GameObject* pGo) +{ + switch (pGo->GetEntry()) + { + case GO_VEXALLUS_DOOR: + m_uiVexallusDoorGUID = pGo->GetGUID(); + if (m_auiEncounter[TYPE_VEXALLUS] == DONE) + pGo->SetGoState(GO_STATE_ACTIVE); + break; + case GO_SELIN_DOOR: + m_uiSelinDoorGUID = pGo->GetGUID(); + if (m_auiEncounter[TYPE_SELIN] == DONE) + pGo->SetGoState(GO_STATE_ACTIVE); + break; + case GO_DELRISSA_DOOR: + m_uiDelrissaDoorGUID = pGo->GetGUID(); + if (m_auiEncounter[TYPE_DELRISSA] == DONE) + pGo->SetGoState(GO_STATE_ACTIVE); + break; + + case GO_SELIN_ENCOUNTER_DOOR: m_uiSelinEncounterDoorGUID = pGo->GetGUID(); break; + case GO_KAEL_DOOR: m_uiKaelDoorGUID = pGo->GetGUID(); break; + case GO_KAEL_STATUE_LEFT: m_auiKaelStatue[0] = pGo->GetGUID(); break; + case GO_KAEL_STATUE_RIGHT: m_auiKaelStatue[1] = pGo->GetGUID(); break; + } +} - void Initialize() +void instance_magisters_terrace::SetData(uint32 uiType, uint32 uiData) +{ + switch (uiType) { - memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); - memset(&m_auiKaelStatue, 0, sizeof(m_auiKaelStatue)); + case TYPE_SELIN: + if (uiData == DONE) + DoUseDoorOrButton(m_uiSelinDoorGUID); + DoUseDoorOrButton(m_uiSelinEncounterDoorGUID); + m_auiEncounter[uiType] = uiData; + break; + case TYPE_VEXALLUS: + if (uiData == DONE) + DoUseDoorOrButton(m_uiVexallusDoorGUID); + m_auiEncounter[uiType] = uiData; + break; + case TYPE_DELRISSA: + if (uiData == DONE) + DoUseDoorOrButton(m_uiDelrissaDoorGUID); + if (uiData == IN_PROGRESS) + m_uiDelrissaDeathCount = 0; + m_auiEncounter[uiType] = uiData; + break; + case TYPE_KAELTHAS: + DoUseDoorOrButton(m_uiKaelDoorGUID); + m_auiEncounter[uiType] = uiData; + break; + case TYPE_DELRISSA_DEATH_COUNT: + if (uiData == SPECIAL) + ++m_uiDelrissaDeathCount; + else + m_uiDelrissaDeathCount = 0; + return; + } - FelCrystals.clear(); + if (uiData == DONE) + { + OUT_SAVE_INST_DATA; - m_uiDelrissaDeathCount = 0; + std::ostringstream saveStream; + saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2] << " " << m_auiEncounter[3]; - m_uiSelinGUID = 0; - m_uiDelrissaGUID = 0; - m_uiVexallusDoorGUID = 0; - m_uiSelinDoorGUID = 0; - m_uiSelinEncounterDoorGUID = 0; - m_uiDelrissaDoorGUID = 0; - m_uiKaelDoorGUID = 0; + m_strInstData = saveStream.str(); - m_bInitializedItr = false; + SaveToDB(); + OUT_SAVE_INST_DATA_COMPLETE; } +} - bool IsEncounterInProgress() const +void instance_magisters_terrace::Load(const char* chrIn) +{ + if (!chrIn) { - for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) - if (m_auiEncounter[i] == IN_PROGRESS) - return true; - return false; + OUT_LOAD_INST_DATA_FAIL; + return; } - uint32 GetData(uint32 identifier) - { - switch(identifier) - { - case DATA_SELIN_EVENT: return m_auiEncounter[0]; - case DATA_VEXALLUS_EVENT: return m_auiEncounter[1]; - case DATA_DELRISSA_EVENT: return m_auiEncounter[2]; - case DATA_KAELTHAS_EVENT: return m_auiEncounter[3]; - case DATA_DELRISSA_DEATH_COUNT: return m_uiDelrissaDeathCount; - case DATA_FEL_CRYSTAL_SIZE: return FelCrystals.size(); - } - return 0; - } + OUT_LOAD_INST_DATA(chrIn); - void SetData(uint32 identifier, uint32 data) - { - switch(identifier) - { - case DATA_SELIN_EVENT: - m_auiEncounter[0] = data; - break; - case DATA_VEXALLUS_EVENT: - if (data == DONE) - DoUseDoorOrButton(m_uiVexallusDoorGUID); - m_auiEncounter[1] = data; - break; - case DATA_DELRISSA_EVENT: - if (data == DONE) - DoUseDoorOrButton(m_uiDelrissaDoorGUID); - if (data == IN_PROGRESS) - m_uiDelrissaDeathCount = 0; - m_auiEncounter[2] = data; - break; - case DATA_KAELTHAS_EVENT: - m_auiEncounter[3] = data; - break; - case DATA_DELRISSA_DEATH_COUNT: - if (data == SPECIAL) - ++m_uiDelrissaDeathCount; - else - m_uiDelrissaDeathCount = 0; - break; - } - } + std::istringstream loadStream(chrIn); + loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3]; - void OnCreatureCreate(Creature* pCreature) + for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) { - switch(pCreature->GetEntry()) - { - case 24723: m_uiSelinGUID = pCreature->GetGUID(); break; - case 24560: m_uiDelrissaGUID = pCreature->GetGUID(); break; - case 24722: FelCrystals.push_back(pCreature->GetGUID()); break; - } + if (m_auiEncounter[i] == IN_PROGRESS) + m_auiEncounter[i] = NOT_STARTED; } - void OnObjectCreate(GameObject* go) + OUT_LOAD_INST_DATA_COMPLETE; +} + +uint32 instance_magisters_terrace::GetData(uint32 uiType) +{ + switch (uiType) { - switch(go->GetEntry()) - { - case 187896: m_uiVexallusDoorGUID = go->GetGUID(); break; - //SunwellRaid Gate 02 - case 187979: m_uiSelinDoorGUID = go->GetGUID(); break; - //Assembly Chamber Door - case 188065: m_uiSelinEncounterDoorGUID = go->GetGUID(); break; - case 187770: m_uiDelrissaDoorGUID = go->GetGUID(); break; - case 188064: m_uiKaelDoorGUID = go->GetGUID(); break; - case 188165: m_auiKaelStatue[0] = go->GetGUID(); break; - case 188166: m_auiKaelStatue[1] = go->GetGUID(); break; - } + case TYPE_SELIN: return m_auiEncounter[0]; + case TYPE_VEXALLUS: return m_auiEncounter[1]; + case TYPE_DELRISSA: return m_auiEncounter[2]; + case TYPE_KAELTHAS: return m_auiEncounter[3]; + case TYPE_DELRISSA_DEATH_COUNT: return m_uiDelrissaDeathCount; + case TYPE_FEL_CRYSTAL_SIZE: return FelCrystals.size(); + + default: + return 0; } +} - uint64 GetData64(uint32 identifier) +uint64 instance_magisters_terrace::GetData64(uint32 uiData) +{ + switch (uiData) { - switch(identifier) + case NPC_SELIN_FIREHEART: return m_uiSelinGUID; + case NPC_DELRISSA: return m_uiDelrissaGUID; + case GO_KAEL_STATUE_LEFT: return m_auiKaelStatue[0]; + case GO_KAEL_STATUE_RIGHT: return m_auiKaelStatue[1]; + + case NPC_FEL_CRYSTAL: { - case DATA_SELIN: return m_uiSelinGUID; - case DATA_DELRISSA: return m_uiDelrissaGUID; - case DATA_VEXALLUS_DOOR: return m_uiVexallusDoorGUID; - case DATA_SELIN_DOOR: return m_uiSelinDoorGUID; - case DATA_SELIN_ENCOUNTER_DOOR: return m_uiSelinEncounterDoorGUID; - case DATA_DELRISSA_DOOR: return m_uiDelrissaDoorGUID; - case DATA_KAEL_DOOR: return m_uiKaelDoorGUID; - case DATA_KAEL_STATUE_LEFT: return m_auiKaelStatue[0]; - case DATA_KAEL_STATUE_RIGHT: return m_auiKaelStatue[1]; - - case DATA_FEL_CRYSTAL: + if (FelCrystals.empty()) + { + error_log("SD2: Magisters Terrace: No Fel Crystals loaded in Inst Data"); + return 0; + } + + if (!m_bInitializedItr) { - if (FelCrystals.empty()) - { - error_log("SD2: Magisters Terrace: No Fel Crystals loaded in Inst Data"); - return 0; - } - - if (!m_bInitializedItr) - { - CrystalItr = FelCrystals.begin(); - m_bInitializedItr = true; - } - - uint64 guid = *CrystalItr; - ++CrystalItr; - return guid; + CrystalItr = FelCrystals.begin(); + m_bInitializedItr = true; } + + uint64 guid = *CrystalItr; + ++CrystalItr; + return guid; } - return 0; + + default: + return 0; } -}; +} InstanceData* GetInstanceData_instance_magisters_terrace(Map* pMap) { @@ -198,10 +216,10 @@ InstanceData* GetInstanceData_instance_magisters_terrace(Map* pMap) void AddSC_instance_magisters_terrace() { - Script *newscript; + Script* pNewScript; - newscript = new Script; - newscript->Name = "instance_magisters_terrace"; - newscript->GetInstanceData = &GetInstanceData_instance_magisters_terrace; - newscript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "instance_magisters_terrace"; + pNewScript->GetInstanceData = &GetInstanceData_instance_magisters_terrace; + pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.h b/scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.h index e8345ca83..0526a6a61 100644 --- a/scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.h +++ b/scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.h @@ -5,26 +5,71 @@ #ifndef DEF_MAGISTERS_TERRACE_H #define DEF_MAGISTERS_TERRACE_H -#define DATA_SELIN_EVENT 1 -#define DATA_VEXALLUS_EVENT 2 -#define DATA_DELRISSA_EVENT 3 -#define DATA_KAELTHAS_EVENT 4 +enum +{ + MAX_ENCOUNTER = 4, -#define DATA_SELIN 5 -#define DATA_FEL_CRYSTAL 6 -#define DATA_FEL_CRYSTAL_SIZE 7 + TYPE_SELIN = 0, + TYPE_VEXALLUS = 1, + TYPE_DELRISSA = 2, + TYPE_KAELTHAS = 3, -#define DATA_VEXALLUS_DOOR 8 -#define DATA_SELIN_DOOR 9 -#define DATA_DELRISSA 10 -#define DATA_DELRISSA_DOOR 11 -#define DATA_SELIN_ENCOUNTER_DOOR 12 + TYPE_FEL_CRYSTAL_SIZE = 4, + TYPE_DELRISSA_DEATH_COUNT = 5, -#define DATA_KAEL_DOOR 13 -#define DATA_KAEL_STATUE_LEFT 14 -#define DATA_KAEL_STATUE_RIGHT 15 + NPC_SELIN_FIREHEART = 24723, + NPC_DELRISSA = 24560, + NPC_FEL_CRYSTAL = 24722, -#define DATA_DELRISSA_DEATH_COUNT 16 + GO_VEXALLUS_DOOR = 187896, + GO_SELIN_DOOR = 187979, // SunwellRaid Gate 02 + GO_DELRISSA_DOOR = 187770, + GO_SELIN_ENCOUNTER_DOOR = 188065, // Assembly Chamber Door + + GO_KAEL_DOOR = 188064, + GO_KAEL_STATUE_LEFT = 188165, + GO_KAEL_STATUE_RIGHT = 188166, +}; + +class MANGOS_DLL_DECL instance_magisters_terrace : public ScriptedInstance +{ + public: + instance_magisters_terrace(Map* pMap); + + void Initialize(); + + // Was used, likely wrong for normal dungeon + //bool IsEncounterInProgress() const + + void OnCreatureCreate(Creature* pCreature); + void OnObjectCreate(GameObject* pGo); + + uint32 GetData(uint32 uiType); + void SetData(uint32 uiType, uint32 uiData); + uint64 GetData64(uint32 uiData); + + const char* Save() { return m_strInstData.c_str(); } + void Load(const char* chrIn); + + private: + uint32 m_auiEncounter[MAX_ENCOUNTER]; + std::string m_strInstData; + + uint32 m_uiDelrissaDeathCount; + + GUIDList FelCrystals; + GUIDList::iterator CrystalItr; + + uint64 m_uiSelinGUID; + uint64 m_uiDelrissaGUID; + uint64 m_uiVexallusDoorGUID; + uint64 m_uiSelinDoorGUID; + uint64 m_uiSelinEncounterDoorGUID; + uint64 m_uiDelrissaDoorGUID; + uint64 m_uiKaelDoorGUID; + uint64 m_auiKaelStatue[2]; + + bool m_bInitializedItr; +}; -#define ERROR_INST_DATA "SD2 Error: Instance Data not set properly for Magister's Terrace instance (map 585). Encounters will be buggy." #endif diff --git a/scripts/eastern_kingdoms/sunken_temple/instance_sunken_temple.cpp b/scripts/eastern_kingdoms/sunken_temple/instance_sunken_temple.cpp index 36ee07cb3..2e4e3a54c 100644 --- a/scripts/eastern_kingdoms/sunken_temple/instance_sunken_temple.cpp +++ b/scripts/eastern_kingdoms/sunken_temple/instance_sunken_temple.cpp @@ -97,7 +97,6 @@ void instance_sunken_temple::OnCreatureDeath(Creature* pCreature) } } - void instance_sunken_temple::SetData(uint32 uiType, uint32 uiData) { switch(uiType) diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index ffead41bb..acb62fa38 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2089" + #define SD2_REVISION_NR "2090" #endif // __SD2_REVISION_NR_H__ From 837841aca9f82d10ea51c45516d93ac102610f4c Mon Sep 17 00:00:00 2001 From: Xfurry Date: Fri, 6 May 2011 23:29:06 +0300 Subject: [PATCH 0070/1172] [2091] Improve boss Azuregos * Basic cleanup * Remove Teleporting hack * Remove dead code for Mark of Frost * Fix Cleave spell id Expects MaNGOS Rev 11472 for proper spell working Signed-off-by: Schmoozerd --- scripts/kalimdor/boss_azuregos.cpp | 186 ++++++++++++++++------------- sd2_revision_nr.h | 2 +- 2 files changed, 101 insertions(+), 87 deletions(-) diff --git a/scripts/kalimdor/boss_azuregos.cpp b/scripts/kalimdor/boss_azuregos.cpp index d27dcff43..f72d87352 100644 --- a/scripts/kalimdor/boss_azuregos.cpp +++ b/scripts/kalimdor/boss_azuregos.cpp @@ -17,126 +17,139 @@ /* ScriptData SDName: Boss_Azuregos SD%Complete: 90 -SDComment: Teleport not included, spell reflect not effecting dots (Core problem) +SDComment: Spell reflect not effecting dots (Core problem) SDCategory: Azshara EndScriptData */ #include "precompiled.h" -#define SAY_TELEPORT -1000100 - -#define SPELL_MARKOFFROST 23182 -#define SPELL_MANASTORM 21097 -#define SPELL_CHILL 21098 -#define SPELL_FROSTBREATH 21099 -#define SPELL_REFLECT 22067 -#define SPELL_CLEAVE 8255 //Perhaps not right ID -#define SPELL_ENRAGE 23537 +enum +{ + SAY_TELEPORT = -1000100, + + SPELL_ARCANE_VACUUM = 21147, + SPELL_MARK_OF_FROST_PLAYER = 23182, + SPELL_MARK_OF_FROST_AURA = 23184, // Triggers 23186 on players that have 23182; unfortunatelly 23183 is missing from dbc + SPELL_MANA_STORM = 21097, + SPELL_CHILL = 21098, + SPELL_FROST_BREATH = 21099, + SPELL_REFLECT = 22067, + SPELL_CLEAVE = 19983, // Was 8255; this one is from wowhead and seems to be the correct one + SPELL_ENRAGE = 23537, +}; struct MANGOS_DLL_DECL boss_azuregosAI : public ScriptedAI { boss_azuregosAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} - uint32 MarkOfFrost_Timer; - uint32 ManaStorm_Timer; - uint32 Chill_Timer; - uint32 Breath_Timer; - uint32 Teleport_Timer; - uint32 Reflect_Timer; - uint32 Cleave_Timer; - uint32 Enrage_Timer; - bool Enraged; + uint32 m_uiManaStormTimer; + uint32 m_uiChillTimer; + uint32 m_uiBreathTimer; + uint32 m_uiTeleportTimer; + uint32 m_uiReflectTimer; + uint32 m_uiCleaveTimer; + bool m_bEnraged; void Reset() { - MarkOfFrost_Timer = 35000; - ManaStorm_Timer = urand(5000, 17000); - Chill_Timer = urand(10000, 30000); - Breath_Timer = urand(2000, 8000); - Teleport_Timer = 30000; - Reflect_Timer = urand(15000, 30000); - Cleave_Timer = 7000; - Enrage_Timer = 0; - Enraged = false; + m_uiManaStormTimer = urand(5000, 17000); + m_uiChillTimer = urand(10000, 30000); + m_uiBreathTimer = urand(2000, 8000); + m_uiTeleportTimer = 30000; + m_uiReflectTimer = urand(15000, 30000); + m_uiCleaveTimer = 7000; + m_bEnraged = false; + } + + void KilledUnit(Unit* pVictim) + { + // Mark killed players with Mark of Frost + if (pVictim->GetTypeId() == TYPEID_PLAYER) + pVictim->CastSpell(pVictim, SPELL_MARK_OF_FROST_PLAYER, true, NULL, NULL, m_creature->GetObjectGuid()); } - void UpdateAI(const uint32 diff) + void Aggro(Unit* pWho) { - //Return since we have no target + // Boss aura which triggers the stun effect on dead players who resurrect + DoCastSpellIfCan(m_creature, SPELL_MARK_OF_FROST_AURA); + } + + void UpdateAI(const uint32 uiDiff) + { + // Return since we have no target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - if (Teleport_Timer < diff) + if (m_uiTeleportTimer < uiDiff) { - DoScriptText(SAY_TELEPORT, m_creature); - - std::vector vGuids; - m_creature->FillGuidsListFromThreatList(vGuids); - for (std::vector::const_iterator i = vGuids.begin();i != vGuids.end(); ++i) + if (DoCastSpellIfCan(m_creature, SPELL_ARCANE_VACUUM) == CAST_OK) { - Unit* pUnit = m_creature->GetMap()->GetUnit(*i); - - if (pUnit && pUnit->GetTypeId() == TYPEID_PLAYER) - DoTeleportPlayer(pUnit, m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ()+3, pUnit->GetOrientation()); + DoScriptText(SAY_TELEPORT, m_creature); + m_uiTeleportTimer = 30000; } + } + else + m_uiTeleportTimer -= uiDiff; - DoResetThreat(); - Teleport_Timer = 30000; - }else Teleport_Timer -= diff; - - // //MarkOfFrost_Timer - // if (MarkOfFrost_Timer < diff) - // { - // DoCastSpellIfCan(m_creature->getVictim(),SPELL_MARKOFFROST); - // MarkOfFrost_Timer = 25000; - // }else MarkOfFrost_Timer -= diff; - - //Chill_Timer - if (Chill_Timer < diff) + // Chill Timer + if (m_uiChillTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_CHILL); - Chill_Timer = urand(13000, 25000); - }else Chill_Timer -= diff; + if (DoCastSpellIfCan(m_creature, SPELL_CHILL) == CAST_OK) + m_uiChillTimer = urand(13000, 25000); + } + else + m_uiChillTimer -= uiDiff; - //Breath_Timer - if (Breath_Timer < diff) + // Breath Timer + if (m_uiBreathTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_FROSTBREATH); - Breath_Timer = urand(10000, 15000); - }else Breath_Timer -= diff; + if (DoCastSpellIfCan(m_creature, SPELL_FROST_BREATH) == CAST_OK) + m_uiBreathTimer = urand(10000, 15000); + } + else + m_uiBreathTimer -= uiDiff; - //ManaStorm_Timer - if (ManaStorm_Timer < diff) + // Mana Storm Timer + if (m_uiManaStormTimer < uiDiff) { - if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) - DoCastSpellIfCan(target,SPELL_MANASTORM); - ManaStorm_Timer = urand(7500, 12500); - }else ManaStorm_Timer -= diff; + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, SPELL_MANA_STORM) == CAST_OK) + m_uiManaStormTimer = urand(7500, 12500); + } + } + else + m_uiManaStormTimer -= uiDiff; - //Reflect_Timer - if (Reflect_Timer < diff) + // Reflect Timer + if (m_uiReflectTimer < uiDiff) { - DoCastSpellIfCan(m_creature,SPELL_REFLECT); - Reflect_Timer = urand(20000, 35000); - }else Reflect_Timer -= diff; + if (DoCastSpellIfCan(m_creature, SPELL_REFLECT) == CAST_OK) + m_uiReflectTimer = urand(20000, 35000); + } + else + m_uiReflectTimer -= uiDiff; - //Cleave_Timer - if (Cleave_Timer < diff) + // Cleave Timer + if (m_uiCleaveTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_CLEAVE); - Cleave_Timer = 7000; - }else Cleave_Timer -= diff; + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_CLEAVE) == CAST_OK) + m_uiCleaveTimer = 7000; + } + else + m_uiCleaveTimer -= uiDiff; - //Enrage_Timer - if (m_creature->GetHealthPercent() < 26.0f && !Enraged) + // EnrageTimer + if (!m_bEnraged && m_creature->GetHealthPercent() < 26.0f) { - DoCastSpellIfCan(m_creature, SPELL_ENRAGE); - Enraged = true; + if (DoCastSpellIfCan(m_creature, SPELL_ENRAGE) == CAST_OK) + m_bEnraged = true; } DoMeleeAttackIfReady(); } }; + CreatureAI* GetAI_boss_azuregos(Creature* pCreature) { return new boss_azuregosAI(pCreature); @@ -144,9 +157,10 @@ CreatureAI* GetAI_boss_azuregos(Creature* pCreature) void AddSC_boss_azuregos() { - Script *newscript; - newscript = new Script; - newscript->Name = "boss_azuregos"; - newscript->GetAI = &GetAI_boss_azuregos; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_azuregos"; + pNewScript->GetAI = &GetAI_boss_azuregos; + pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index acb62fa38..b221881de 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2090" + #define SD2_REVISION_NR "2091" #endif // __SD2_REVISION_NR_H__ From c2ad08e5a6a8cad10c8f1076a2f2be2d9b21303d Mon Sep 17 00:00:00 2001 From: Xfurry Date: Mon, 9 May 2011 23:03:48 +0300 Subject: [PATCH 0071/1172] [2092] Add script for boss Lethon Signed-off-by: Schmoozerd --- scripts/world/bosses_emerald_dragons.cpp | 48 +++++++++++++++++++++++- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 + sql/scriptdev2_script_full.sql | 5 ++- sql/updates/r2092_mangos.sql | 1 + sql/updates/r2092_scriptdev2.sql | 4 ++ 6 files changed, 58 insertions(+), 3 deletions(-) create mode 100644 sql/updates/r2092_mangos.sql create mode 100644 sql/updates/r2092_scriptdev2.sql diff --git a/scripts/world/bosses_emerald_dragons.cpp b/scripts/world/bosses_emerald_dragons.cpp index 30e869d3c..d359afca6 100644 --- a/scripts/world/bosses_emerald_dragons.cpp +++ b/scripts/world/bosses_emerald_dragons.cpp @@ -218,7 +218,48 @@ CreatureAI* GetAI_boss_emeriss(Creature* pCreature) ## boss_lethon ######*/ -// TODO +enum +{ + SAY_LETHON_AGGRO = -1000666, + SAY_DRAW_SPIRIT = -1000667, + + SPELL_SHADOW_BOLT_WIRL = 24834, // Periodic aura + SPELL_DRAW_SPIRIT = 24811, + SPELL_SUMMON_SPIRIT_SHADE = 24810, // Summon spell was removed, was SPELL_EFFECT_SUMMON_DEMON + + NPC_SPIRIT_SHADE = 15261, // Add summoned by Lethon + SPELL_DARK_OFFERING = 24804, + SPELL_SPIRIT_SHAPE_VISUAL = 24809, +}; + +struct MANGOS_DLL_DECL boss_lethonAI : public boss_emerald_dragonAI +{ + boss_lethonAI(Creature* pCreature) : boss_emerald_dragonAI(pCreature) {} + + void Aggro(Unit* pWho) + { + DoScriptText(SAY_LETHON_AGGRO, m_creature); + // Shadow bolt wirl is a periodic aura which triggers a set of shadowbolts every 2 secs; may need some core tunning + DoCastSpellIfCan(m_creature, SPELL_SHADOW_BOLT_WIRL, CAST_TRIGGERED); + } + + // Summon a spirit which moves toward the boss and heals him for each player hit by the spell; used at 75%, 50% and 25% + bool DoSpecialDragonAbility(SpecialDragonEvent uiEvent) + { + if (DoCastSpellIfCan(m_creature, SPELL_DRAW_SPIRIT) == CAST_OK) + { + DoScriptText(SAY_DRAW_SPIRIT, m_creature); + return true; + } + + return false; + } +}; + +CreatureAI* GetAI_boss_lethon(Creature* pCreature) +{ + return new boss_lethonAI(pCreature); +} /*###### ## boss_taerar @@ -505,6 +546,11 @@ void AddSC_bosses_emerald_dragons() pNewScript->GetAI = &GetAI_boss_emeriss; pNewScript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "boss_lethon"; + pNewScript->GetAI = &GetAI_boss_lethon; + pNewScript->RegisterSelf(); + pNewScript = new Script; pNewScript->Name = "boss_taerar"; pNewScript->GetAI = &GetAI_boss_taerar; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index b221881de..034193530 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2091" + #define SD2_REVISION_NR "2092" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 0536b2a6c..5250f9320 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -59,6 +59,7 @@ UPDATE creature_template SET ScriptName='boss_shade_of_taerar' WHERE entry=15302 UPDATE creature_template SET ScriptName='boss_kruul' WHERE entry=18338; UPDATE creature_template SET ScriptName='boss_azuregos' WHERE entry=6109; UPDATE creature_template SET ScriptName='mob_dementeddruids' WHERE entry=15260; +UPDATE creature_template SET ScriptName='boss_lethon' WHERE entry=14888; /* GO */ UPDATE gameobject_template SET ScriptName='go_cat_figurine' WHERE entry=13873; diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index a0c345f1c..e91c7f244 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -714,7 +714,10 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1000663,'We made it! Thank you for getting me out of that hell hole. Tell Hemet to expect me!',0,0,0,4,'helice SAY_HELICE_COMPLETE'), (-1000664,'The Destructive Ward gains in power.',0,5,0,0,'destructive ward SAY_WARD_POWERUP'), -(-1000665,'The Destructive Ward is fully charged!',0,5,0,0,'destructive ward SAY_WARD_CHARGED'); +(-1000665,'The Destructive Ward is fully charged!',0,5,0,0,'destructive ward SAY_WARD_CHARGED'), + +(-1000666,'I can sense the SHADOW on your hearts. There can be no rest for the wicked!',0,1,0,0,'lethon SAY_LETHON_AGGRO'), +(-1000667,'Your wicked souls shall feed my power!',0,1,0,0,'lethon SAY_LETHON_SHADE'); -- -1 033 000 SHADOWFANG KEEP INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES diff --git a/sql/updates/r2092_mangos.sql b/sql/updates/r2092_mangos.sql new file mode 100644 index 000000000..0751cd46d --- /dev/null +++ b/sql/updates/r2092_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='boss_lethon' WHERE entry=14888; diff --git a/sql/updates/r2092_scriptdev2.sql b/sql/updates/r2092_scriptdev2.sql new file mode 100644 index 000000000..61392aa7a --- /dev/null +++ b/sql/updates/r2092_scriptdev2.sql @@ -0,0 +1,4 @@ +DELETE FROM script_texts where entry IN (-1000666, -1000667); +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1000666,'I can sense the SHADOW on your hearts. There can be no rest for the wicked!',0,1,0,0,'lethon SAY_LETHON_AGGRO'), +(-1000667,'Your wicked souls shall feed my power!',0,1,0,0,'lethon SAY_LETHON_SHADE') From c4130c251e1b0279904b43d3c726b5a214b77756 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Mon, 9 May 2011 22:21:04 +0300 Subject: [PATCH 0072/1172] [2093] Improvements for the Emerald Dragons * Add putrid mushroom summon support * Remove banish hack for Taerar * Remove unneeded enum for which special event is triggered Note: The used trigger NPCs (like for seeping fog) need to be handled to not do anything Signed-off-by: Schmoozerd --- scripts/world/bosses_emerald_dragons.cpp | 134 ++++++++++++----------- sd2_revision_nr.h | 2 +- 2 files changed, 73 insertions(+), 63 deletions(-) diff --git a/scripts/world/bosses_emerald_dragons.cpp b/scripts/world/bosses_emerald_dragons.cpp index d359afca6..f1517a0b0 100644 --- a/scripts/world/bosses_emerald_dragons.cpp +++ b/scripts/world/bosses_emerald_dragons.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: bosses_emerald_dragons -SD%Complete: 70 -SDComment: Emeriss 90, Lethon 0, Taerar 80, Ysondre 90 - Player-Teleport function missing, Mark of Nature needs core support +SD%Complete: 95 +SDComment: Missing correct behaviour of used trigger NPCs, some spell issues, summon player NYI SDCategory: Emerald Dragon Bosses EndScriptData */ @@ -50,13 +50,6 @@ enum NPC_DREAM_FOG = 15224, }; -enum SpecialDragonEvent -{ - EVENT_75_HEALTH = 1, - EVENT_50_HEALTH = 2, - EVENT_25_HEALTH = 3, -}; - struct MANGOS_DLL_DECL boss_emerald_dragonAI : public ScriptedAI { boss_emerald_dragonAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } @@ -69,7 +62,7 @@ struct MANGOS_DLL_DECL boss_emerald_dragonAI : public ScriptedAI void Reset() { - m_uiEventCounter = EVENT_75_HEALTH; + m_uiEventCounter = 1; m_uiSeepingFogTimer = urand(15000, 20000); m_uiNoxiousBreathTimer = 8000; @@ -78,7 +71,7 @@ struct MANGOS_DLL_DECL boss_emerald_dragonAI : public ScriptedAI void EnterCombat(Unit* pEnemy) { - DoCastSpellIfCan(m_creature, SPELL_MARK_OF_NATURE_AURA); + DoCastSpellIfCan(m_creature, SPELL_MARK_OF_NATURE_AURA, CAST_TRIGGERED); ScriptedAI::EnterCombat(pEnemy); } @@ -87,7 +80,7 @@ struct MANGOS_DLL_DECL boss_emerald_dragonAI : public ScriptedAI { // Mark killed players with Mark of Nature if (pVictim->GetTypeId() == TYPEID_PLAYER) - pVictim->CastSpell(pVictim, SPELL_MARK_OF_NATURE_PLAYER, true); + pVictim->CastSpell(pVictim, SPELL_MARK_OF_NATURE_PLAYER, true, NULL, NULL, m_creature->GetObjectGuid()); } void JustSummoned(Creature* pSummoned) @@ -100,7 +93,7 @@ struct MANGOS_DLL_DECL boss_emerald_dragonAI : public ScriptedAI } // Return true, if succeeded - virtual bool DoSpecialDragonAbility(SpecialDragonEvent uiEvent) = 0; + virtual bool DoSpecialDragonAbility() = 0; // Return true to handle shared timers and MeleeAttack virtual bool UpdateDragonAI(const uint32 uiDiff) { return true; } @@ -112,7 +105,7 @@ struct MANGOS_DLL_DECL boss_emerald_dragonAI : public ScriptedAI return; // Trigger special ability function at 75, 50 and 25% health - if (m_creature->GetHealthPercent() < 100.0f - m_uiEventCounter * 25.0f && DoSpecialDragonAbility((SpecialDragonEvent) m_uiEventCounter)) + if (m_creature->GetHealthPercent() < 100.0f - m_uiEventCounter * 25.0f && DoSpecialDragonAbility()) ++m_uiEventCounter; // Call dragon specific virtual function @@ -158,7 +151,8 @@ enum SAY_CAST_CORRUPTION = -1000402, SPELL_VOLATILE_INFECTION = 24928, - SPELL_CORRUPTION_OF_EARTH = 24910 + SPELL_CORRUPTION_OF_EARTH = 24910, + SPELL_PUTRID_MUSHROOM = 24904, // Summons a mushroom on killing a player }; struct MANGOS_DLL_DECL boss_emerissAI : public boss_emerald_dragonAI @@ -179,8 +173,17 @@ struct MANGOS_DLL_DECL boss_emerissAI : public boss_emerald_dragonAI DoScriptText(SAY_EMERISS_AGGRO, m_creature); } + void KilledUnit(Unit* pVictim) + { + // summon a mushroom on the spot the player dies + if (pVictim->GetTypeId() == TYPEID_PLAYER) + pVictim->CastSpell(pVictim, SPELL_PUTRID_MUSHROOM, true, NULL, NULL, m_creature->GetObjectGuid()); + + boss_emerald_dragonAI::KilledUnit(pVictim); + } + // Corruption of Earth at 75%, 50% and 25% - bool DoSpecialDragonAbility(SpecialDragonEvent uiEvent) + bool DoSpecialDragonAbility() { if (DoCastSpellIfCan(m_creature, SPELL_CORRUPTION_OF_EARTH) == CAST_OK) { @@ -189,8 +192,8 @@ struct MANGOS_DLL_DECL boss_emerissAI : public boss_emerald_dragonAI // Successfull cast return true; } - else - return false; + + return false; } bool UpdateDragonAI(const uint32 uiDiff) @@ -244,7 +247,7 @@ struct MANGOS_DLL_DECL boss_lethonAI : public boss_emerald_dragonAI } // Summon a spirit which moves toward the boss and heals him for each player hit by the spell; used at 75%, 50% and 25% - bool DoSpecialDragonAbility(SpecialDragonEvent uiEvent) + bool DoSpecialDragonAbility() { if (DoCastSpellIfCan(m_creature, SPELL_DRAW_SPIRIT) == CAST_OK) { @@ -276,26 +279,21 @@ enum SPELL_SUMMON_SHADE_1 = 24841, SPELL_SUMMON_SHADE_2 = 24842, SPELL_SUMMON_SHADE_3 = 24843, + SPELL_SELF_STUN = 24883, // Stunns the main boss until the shades are dead or timer expires - //Spells of Shades of Taerar + NPC_SHADE_OF_TAERAR = 15302, SPELL_POSIONCLOUD = 24840, SPELL_POSIONBREATH = 20667 }; -static const uint32 auiSpellSummonShade[]= -{ - SPELL_SUMMON_SHADE_1, SPELL_SUMMON_SHADE_2, SPELL_SUMMON_SHADE_3 -}; - struct MANGOS_DLL_DECL boss_taerarAI : public boss_emerald_dragonAI { boss_taerarAI(Creature* pCreature) : boss_emerald_dragonAI(pCreature) { Reset(); } uint32 m_uiArcaneBlastTimer; uint32 m_uiBellowingRoarTimer; - uint32 m_uiShadesTimer; - - bool m_bShades; + uint32 m_uiShadesTimeoutTimer; + uint8 m_uiShadesDead; void Reset() { @@ -303,9 +301,12 @@ struct MANGOS_DLL_DECL boss_taerarAI : public boss_emerald_dragonAI m_uiArcaneBlastTimer = 12000; m_uiBellowingRoarTimer = 30000; - m_uiShadesTimer = 60000; // The time that Taerar is banished + m_uiShadesTimeoutTimer = 0; // The time that Taerar is banished + m_uiShadesDead = 0; - m_bShades = false; + // Remove Unselectable if needed + if (m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE)) + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); } void Aggro(Unit* pWho) @@ -313,53 +314,62 @@ struct MANGOS_DLL_DECL boss_taerarAI : public boss_emerald_dragonAI DoScriptText(SAY_TAERAR_AGGRO, m_creature); } - // Summon 3 Shades at 75%, 50% and 25% - bool DoSpecialDragonAbility(SpecialDragonEvent uiEvent) + // Summon 3 Shades at 75%, 50% and 25% and Banish Self + bool DoSpecialDragonAbility() { - if (!m_bShades) + if (DoCastSpellIfCan(m_creature, SPELL_SELF_STUN) == CAST_OK) { - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) - { - //Inturrupt any spell casting - m_creature->InterruptNonMeleeSpells(false); + // Summon the shades at boss position + DoCastSpellIfCan(m_creature, SPELL_SUMMON_SHADE_1, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_SUMMON_SHADE_2, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_SUMMON_SHADE_3, CAST_TRIGGERED); - //horrible workaround, need to fix - m_creature->setFaction(35); - m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + // Make boss not selectable when banished + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - DoScriptText(SAY_SUMMONSHADE, m_creature); + DoScriptText(SAY_SUMMONSHADE, m_creature); + m_uiShadesTimeoutTimer = 60000; - int iSize = sizeof(auiSpellSummonShade) / sizeof(uint32); + return true; + } - for(int i = 0; i < iSize; ++i) - m_creature->CastSpell(pTarget, auiSpellSummonShade[i], true); + return false; + } - m_bShades = true; - m_uiShadesTimer = 60000; + void SummonedCreatureJustDied(Creature* pSummoned) + { + if (pSummoned->GetEntry() == NPC_SHADE_OF_TAERAR) + { + ++m_uiShadesDead; - return true; - } + // If all shades are dead then unbanish the boss + if (m_uiShadesDead == 3) + DoUnbanishBoss(); } - return false; + } + + void DoUnbanishBoss() + { + m_creature->RemoveAurasDueToSpell(SPELL_SELF_STUN); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + + m_uiShadesTimeoutTimer = 0; + m_uiShadesDead = 0; } bool UpdateDragonAI(const uint32 uiDiff) { - // <<<<<<<<< TODO - FIXME - This code was called also OOC - if (m_bShades && m_uiShadesTimer < uiDiff) + // Timer to unbanish the boss + if (m_uiShadesTimeoutTimer) { - //Become unbanished again - m_creature->setFaction(14); - m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - m_bShades = false; - } - else if (m_bShades) - { - m_uiShadesTimer -= uiDiff; - //Do nothing while banished + if (m_uiShadesTimeoutTimer <= uiDiff) + DoUnbanishBoss(); + else + m_uiShadesTimeoutTimer -= uiDiff; + + // Prevent further spells or timer handling while banished return false; } - // >>>>>>>>> end of FIXME // Arcane Blast Timer if (m_uiArcaneBlastTimer < uiDiff) @@ -471,7 +481,7 @@ struct MANGOS_DLL_DECL boss_ysondreAI : public boss_emerald_dragonAI } // Summon Druids - TODO FIXME (spell not understood) - bool DoSpecialDragonAbility(SpecialDragonEvent uiEvent) + bool DoSpecialDragonAbility() { DoScriptText(SAY_SUMMON_DRUIDS, m_creature); diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 034193530..90ebe3ec1 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2092" + #define SD2_REVISION_NR "2093" #endif // __SD2_REVISION_NR_H__ From 2f8f52f808d457818da371bd2d63fa063e90bec1 Mon Sep 17 00:00:00 2001 From: VladimirMangos Date: Thu, 12 May 2011 09:08:38 +0200 Subject: [PATCH 0073/1172] [2094] Convert ~500 GetGUID() to GetObjectGuid() used in misc functions Signed-off-by: NoFantasy --- include/sc_creature.cpp | 2 +- .../blackrock_depths/blackrock_depths.cpp | 30 +++---- .../blackrock_depths/boss_tomb_of_seven.cpp | 8 +- .../blackrock_spire/boss_drakkisath.cpp | 2 +- .../blackwing_lair/boss_vaelastrasz.cpp | 4 +- .../blackwing_lair/boss_victor_nefarius.cpp | 6 +- scripts/eastern_kingdoms/blasted_lands.cpp | 24 +++--- scripts/eastern_kingdoms/burning_steppes.cpp | 26 +++--- .../eastern_kingdoms/eastern_plaguelands.cpp | 20 ++--- scripts/eastern_kingdoms/eversong_woods.cpp | 4 +- scripts/eastern_kingdoms/ghostlands.cpp | 14 ++-- .../gnomeregan/gnomeregan.cpp | 2 +- scripts/eastern_kingdoms/ironforge.cpp | 14 ++-- .../karazhan/boss_shade_of_aran.cpp | 2 +- .../karazhan/bosses_opera.cpp | 2 +- .../eastern_kingdoms/karazhan/karazhan.cpp | 16 ++-- scripts/eastern_kingdoms/loch_modan.cpp | 16 ++-- .../boss_felblood_kaelthas.cpp | 6 +- .../magisters_terrace/boss_vexallus.cpp | 2 +- .../magisters_terrace/magisters_terrace.cpp | 14 ++-- .../molten_core/boss_majordomo_executus.cpp | 6 +- .../scarlet_enclave/ebon_hold.cpp | 2 +- scripts/eastern_kingdoms/searing_gorge.cpp | 20 ++--- .../shadowfang_keep/shadowfang_keep.cpp | 2 +- scripts/eastern_kingdoms/stormwind_city.cpp | 14 ++-- .../sunwell_plateau/boss_brutallus.cpp | 2 +- scripts/eastern_kingdoms/uldaman/uldaman.cpp | 32 ++++---- scripts/eastern_kingdoms/undercity.cpp | 6 +- .../eastern_kingdoms/western_plaguelands.cpp | 22 ++--- .../eastern_kingdoms/zulaman/boss_janalai.cpp | 2 +- scripts/eastern_kingdoms/zulaman/zulaman.cpp | 4 +- scripts/examples/example_creature.cpp | 2 +- scripts/examples/example_escort.cpp | 2 +- scripts/examples/example_gossip_codebox.cpp | 2 +- scripts/kalimdor/azshara.cpp | 18 ++-- scripts/kalimdor/azuremyst_isle.cpp | 8 +- scripts/kalimdor/bloodmyst_isle.cpp | 16 ++-- .../culling_of_stratholme.cpp | 18 ++-- .../dark_portal/dark_portal.cpp | 8 +- .../caverns_of_time/hyjal/boss_archimonde.cpp | 2 +- .../kalimdor/caverns_of_time/hyjal/hyjal.cpp | 6 +- .../old_hillsbrad/old_hillsbrad.cpp | 28 +++---- scripts/kalimdor/darkshore.cpp | 2 +- scripts/kalimdor/desolace.cpp | 4 +- scripts/kalimdor/dustwallow_marsh.cpp | 20 ++--- scripts/kalimdor/felwood.cpp | 16 ++-- scripts/kalimdor/feralas.cpp | 12 +-- scripts/kalimdor/moonglade.cpp | 34 ++++---- scripts/kalimdor/mulgore.cpp | 8 +- scripts/kalimdor/orgrimmar.cpp | 22 ++--- .../razorfen_downs/razorfen_downs.cpp | 6 +- scripts/kalimdor/silithus.cpp | 48 +++++------ scripts/kalimdor/stonetalon_mountains.cpp | 6 +- scripts/kalimdor/tanaris.cpp | 26 +++--- .../temple_of_ahnqiraj/boss_cthun.cpp | 2 +- scripts/kalimdor/the_barrens.cpp | 12 +-- scripts/kalimdor/thousand_needles.cpp | 4 +- scripts/kalimdor/thunder_bluff.cpp | 6 +- .../wailing_caverns/wailing_caverns.cpp | 6 +- scripts/kalimdor/winterspring.cpp | 26 +++--- scripts/kalimdor/zulfarrak/zulfarrak.cpp | 12 +-- scripts/northrend/borean_tundra.cpp | 32 ++++---- .../trial_of_the_crusader.cpp | 2 +- scripts/northrend/dalaran.cpp | 4 +- scripts/northrend/dragonblight.cpp | 16 ++-- scripts/northrend/howling_fjord.cpp | 28 +++---- scripts/northrend/icecrown.cpp | 4 +- scripts/northrend/naxxramas/boss_gothik.cpp | 6 +- scripts/northrend/sholazar_basin.cpp | 12 +-- scripts/northrend/storm_peaks.cpp | 42 +++++----- .../ulduar/halls_of_lightning/boss_ionar.cpp | 2 +- .../halls_of_lightning/boss_volkhan.cpp | 2 +- .../ulduar/halls_of_stone/halls_of_stone.cpp | 6 +- scripts/northrend/violet_hold/violet_hold.cpp | 4 +- scripts/outland/black_temple/black_temple.cpp | 2 +- scripts/outland/black_temple/boss_illidan.cpp | 2 +- .../black_temple/boss_shade_of_akama.cpp | 2 +- .../outland/black_temple/illidari_council.cpp | 2 +- scripts/outland/blades_edge_mountains.cpp | 16 ++-- .../serpent_shrine/boss_lady_vashj.cpp | 2 +- scripts/outland/gruuls_lair/boss_gruul.cpp | 4 +- .../blood_furnace/boss_broggok.cpp | 2 +- .../shattered_halls/boss_nethekurse.cpp | 2 +- scripts/outland/hellfire_peninsula.cpp | 42 +++++----- scripts/outland/nagrand.cpp | 80 +++++++++--------- scripts/outland/netherstorm.cpp | 10 +-- scripts/outland/shadowmoon_valley.cpp | 50 +++++------ scripts/outland/shattrath_city.cpp | 48 +++++------ .../botanica/boss_warp_splinter.cpp | 2 +- .../tempest_keep/the_eye/boss_kaelthas.cpp | 6 +- scripts/outland/terokkar_forest.cpp | 14 ++-- scripts/outland/zangarmarsh.cpp | 26 +++--- scripts/world/npc_professions.cpp | 78 +++++++++--------- scripts/world/npcs_special.cpp | 82 +++++++++---------- sd2_revision_nr.h | 2 +- 95 files changed, 671 insertions(+), 671 deletions(-) diff --git a/include/sc_creature.cpp b/include/sc_creature.cpp index 52ec22704..d9a12159b 100644 --- a/include/sc_creature.cpp +++ b/include/sc_creature.cpp @@ -383,7 +383,7 @@ void ScriptedAI::DoTeleportPlayer(Unit* pUnit, float fX, float fY, float fZ, flo if (pUnit->GetTypeId() != TYPEID_PLAYER) { - error_log("SD2: Creature " UI64FMTD " (Entry: %u) Tried to teleport non-player unit (Type: %u GUID: " UI64FMTD ") to x: %f y:%f z: %f o: %f. Aborted.", m_creature->GetGUID(), m_creature->GetEntry(), pUnit->GetTypeId(), pUnit->GetGUID(), fX, fY, fZ, fO); + error_log("SD2: %s tried to teleport non-player (%s) to x: %f y:%f z: %f o: %f. Aborted.", m_creature->GetGuidStr().c_str(), pUnit->GetGuidStr().c_str(), fX, fY, fZ, fO); return; } diff --git a/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.cpp b/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.cpp index 673871a25..3376c399d 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.cpp +++ b/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.cpp @@ -524,7 +524,7 @@ enum bool GossipHello_npc_kharan_mighthammer(Player* pPlayer, Creature* pCreature) { if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); if (pPlayer->GetQuestStatus(QUEST_WHAT_IS_GOING_ON) == QUEST_STATUS_INCOMPLETE) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KHARAN_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); @@ -533,9 +533,9 @@ bool GossipHello_npc_kharan_mighthammer(Player* pPlayer, Creature* pCreature) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KHARAN_2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3); if (pPlayer->GetTeam() == HORDE) - pPlayer->SEND_GOSSIP_MENU(2473, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(2473, pCreature->GetObjectGuid()); else - pPlayer->SEND_GOSSIP_MENU(2474, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(2474, pCreature->GetObjectGuid()); return true; } @@ -546,36 +546,36 @@ bool GossipSelect_npc_kharan_mighthammer(Player* pPlayer, Creature* pCreature, u { case GOSSIP_ACTION_INFO_DEF+1: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KHARAN_3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); - pPlayer->SEND_GOSSIP_MENU(2475, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(2475, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+2: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KHARAN_4, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3); - pPlayer->SEND_GOSSIP_MENU(2476, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(2476, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+3: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KHARAN_5, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+4); - pPlayer->SEND_GOSSIP_MENU(2477, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(2477, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+4: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KHARAN_6, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+5); - pPlayer->SEND_GOSSIP_MENU(2478, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(2478, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+5: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KHARAN_7, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+6); - pPlayer->SEND_GOSSIP_MENU(2479, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(2479, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+6: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KHARAN_8, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+7); - pPlayer->SEND_GOSSIP_MENU(2480, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(2480, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+7: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KHARAN_9, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+8); - pPlayer->SEND_GOSSIP_MENU(2481, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(2481, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+8: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KHARAN_10, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+9); - pPlayer->SEND_GOSSIP_MENU(2482, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(2482, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+9: pPlayer->CLOSE_GOSSIP_MENU(); @@ -610,7 +610,7 @@ enum bool GossipHello_npc_lokhtos_darkbargainer(Player* pPlayer, Creature* pCreature) { if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); if (pCreature->isVendor() && pPlayer->GetReputationRank(FACTION_THORIUM_BROTHERHOOD) >= REP_FRIENDLY) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_VENDOR, GOSSIP_ITEM_SHOW_ACCESS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE); @@ -623,9 +623,9 @@ bool GossipHello_npc_lokhtos_darkbargainer(Player* pPlayer, Creature* pCreature) } if (pPlayer->GetReputationRank(FACTION_THORIUM_BROTHERHOOD) < REP_FRIENDLY) - pPlayer->SEND_GOSSIP_MENU(3673, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(3673, pCreature->GetObjectGuid()); else - pPlayer->SEND_GOSSIP_MENU(3677, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(3677, pCreature->GetObjectGuid()); return true; } @@ -639,7 +639,7 @@ bool GossipSelect_npc_lokhtos_darkbargainer(Player* pPlayer, Creature* pCreature } if (uiAction == GOSSIP_ACTION_TRADE) - pPlayer->SEND_VENDORLIST(pCreature->GetGUID()); + pPlayer->SEND_VENDORLIST(pCreature->GetObjectGuid()); return true; } diff --git a/scripts/eastern_kingdoms/blackrock_depths/boss_tomb_of_seven.cpp b/scripts/eastern_kingdoms/blackrock_depths/boss_tomb_of_seven.cpp index 3d239c50b..b8c5f9c54 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/boss_tomb_of_seven.cpp +++ b/scripts/eastern_kingdoms/blackrock_depths/boss_tomb_of_seven.cpp @@ -55,7 +55,7 @@ bool GossipHello_boss_gloomrel(Player* pPlayer, Creature* pCreature) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_TRIBUTE, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); } } - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); return true; } @@ -65,7 +65,7 @@ bool GossipSelect_boss_gloomrel(Player* pPlayer, Creature* pCreature, uint32 uiS { case GOSSIP_ACTION_INFO_DEF+1: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_TEACH_2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 11); - pPlayer->SEND_GOSSIP_MENU(2606, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(2606, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+11: pPlayer->CLOSE_GOSSIP_MENU(); @@ -73,7 +73,7 @@ bool GossipSelect_boss_gloomrel(Player* pPlayer, Creature* pCreature, uint32 uiS break; case GOSSIP_ACTION_INFO_DEF+2: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "[PH] Continue...", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 22); - pPlayer->SEND_GOSSIP_MENU(2604, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(2604, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+22: pPlayer->CLOSE_GOSSIP_MENU(); @@ -286,7 +286,7 @@ bool GossipHello_boss_doomrel(Player* pPlayer, Creature* pCreature) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_CHALLENGE, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); } - pPlayer->SEND_GOSSIP_MENU(2601, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(2601, pCreature->GetObjectGuid()); return true; } diff --git a/scripts/eastern_kingdoms/blackrock_spire/boss_drakkisath.cpp b/scripts/eastern_kingdoms/blackrock_spire/boss_drakkisath.cpp index 79e22a02c..ab186311a 100644 --- a/scripts/eastern_kingdoms/blackrock_spire/boss_drakkisath.cpp +++ b/scripts/eastern_kingdoms/blackrock_spire/boss_drakkisath.cpp @@ -75,7 +75,7 @@ struct MANGOS_DLL_DECL boss_drakkisathAI : public ScriptedAI // Confliguration if (m_uiConfligurationTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_CONFLIGURATION, 0, m_creature->getVictim()->GetGUID()); + DoCastSpellIfCan(m_creature->getVictim(), SPELL_CONFLIGURATION, 0, m_creature->getVictim()->GetObjectGuid()); m_uiConfligurationTimer = 18000; } else diff --git a/scripts/eastern_kingdoms/blackwing_lair/boss_vaelastrasz.cpp b/scripts/eastern_kingdoms/blackwing_lair/boss_vaelastrasz.cpp index a08da6e62..519eedfaa 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/boss_vaelastrasz.cpp +++ b/scripts/eastern_kingdoms/blackwing_lair/boss_vaelastrasz.cpp @@ -267,10 +267,10 @@ bool GossipSelect_boss_vaelastrasz(Player* pPlayer, Creature* pCreature, uint32 bool GossipHello_boss_vaelastrasz(Player* pPlayer, Creature* pCreature) { if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); - pPlayer->SEND_GOSSIP_MENU(907, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(907, pCreature->GetObjectGuid()); return true; } diff --git a/scripts/eastern_kingdoms/blackwing_lair/boss_victor_nefarius.cpp b/scripts/eastern_kingdoms/blackwing_lair/boss_victor_nefarius.cpp index d5f8f93f1..819713253 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/boss_victor_nefarius.cpp +++ b/scripts/eastern_kingdoms/blackwing_lair/boss_victor_nefarius.cpp @@ -270,7 +270,7 @@ CreatureAI* GetAI_boss_victor_nefarius(Creature* pCreature) bool GossipHello_boss_victor_nefarius(Player* pPlayer, Creature* pCreature) { pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_NEFARIUS_1 , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXT_NEFARIUS_1, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXT_NEFARIUS_1, pCreature->GetObjectGuid()); return true; } @@ -280,11 +280,11 @@ bool GossipSelect_boss_victor_nefarius(Player* pPlayer, Creature* pCreature, uin { case GOSSIP_ACTION_INFO_DEF+1: pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_NEFARIUS_2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); - pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXT_NEFARIUS_2, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXT_NEFARIUS_2, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+2: pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_NEFARIUS_3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3); - pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXT_NEFARIUS_3, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXT_NEFARIUS_3, pCreature->GetObjectGuid()); DoScriptText(SAY_GAMESBEGIN_1, pCreature); break; case GOSSIP_ACTION_INFO_DEF+3: diff --git a/scripts/eastern_kingdoms/blasted_lands.cpp b/scripts/eastern_kingdoms/blasted_lands.cpp index e7d115cb8..30bc4a2b9 100644 --- a/scripts/eastern_kingdoms/blasted_lands.cpp +++ b/scripts/eastern_kingdoms/blasted_lands.cpp @@ -43,7 +43,7 @@ bool GossipHello_npc_deathly_usher(Player* pPlayer, Creature* pCreature) if (pPlayer->GetQuestStatus(3628) == QUEST_STATUS_INCOMPLETE && pPlayer->HasItemCount(10757, 1)) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_USHER, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF); - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); return true; } @@ -74,7 +74,7 @@ bool GossipSelect_npc_deathly_usher(Player* pPlayer, Creature* pCreature, uint32 bool GossipHello_npc_fallen_hero_of_horde(Player* pPlayer, Creature* pCreature) { if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); if (pPlayer->GetQuestStatus(2784) == QUEST_STATUS_INCOMPLETE) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Why are you here?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); @@ -85,7 +85,7 @@ bool GossipHello_npc_fallen_hero_of_horde(Player* pPlayer, Creature* pCreature) if (pPlayer->GetQuestStatus(2801) == QUEST_STATUS_INCOMPLETE && pPlayer->GetTeam() == ALLIANCE) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Why are you here?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); return true; } @@ -96,42 +96,42 @@ bool GossipSelect_npc_fallen_hero_of_horde(Player* pPlayer, Creature* pCreature, { case GOSSIP_ACTION_INFO_DEF+1: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_FALLEN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 11); - pPlayer->SEND_GOSSIP_MENU(1392, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(1392, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+11: - pPlayer->SEND_GOSSIP_MENU(1411, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(1411, pCreature->GetObjectGuid()); if (pPlayer->GetQuestStatus(2784) == QUEST_STATUS_INCOMPLETE) pPlayer->AreaExploredOrEventHappens(2784); if (pPlayer->GetTeam() == ALLIANCE) { pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_FALLEN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); - pPlayer->SEND_GOSSIP_MENU(1411, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(1411, pCreature->GetObjectGuid()); } break; case GOSSIP_ACTION_INFO_DEF+2: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_FALLEN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 21); - pPlayer->SEND_GOSSIP_MENU(1451, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(1451, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+21: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_FALLEN1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 22); - pPlayer->SEND_GOSSIP_MENU(1452, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(1452, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+22: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_FALLEN2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 23); - pPlayer->SEND_GOSSIP_MENU(1453, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(1453, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+23: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_FALLEN3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 24); - pPlayer->SEND_GOSSIP_MENU(1454, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(1454, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+24: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_FALLEN4, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 25); - pPlayer->SEND_GOSSIP_MENU(1455, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(1455, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+25: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_FALLEN5, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 26); - pPlayer->SEND_GOSSIP_MENU(1456, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(1456, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+26: pPlayer->CLOSE_GOSSIP_MENU(); diff --git a/scripts/eastern_kingdoms/burning_steppes.cpp b/scripts/eastern_kingdoms/burning_steppes.cpp index fbd6263dc..45675191c 100644 --- a/scripts/eastern_kingdoms/burning_steppes.cpp +++ b/scripts/eastern_kingdoms/burning_steppes.cpp @@ -71,12 +71,12 @@ CreatureAI* GetAI_npc_ragged_john(Creature* pCreature) bool GossipHello_npc_ragged_john(Player* pPlayer, Creature* pCreature) { if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); if (pPlayer->GetQuestStatus(4224) == QUEST_STATUS_INCOMPLETE) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Official buisness, John. I need some information about Marsha Windsor. Tell me about the last time you saw him.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF); - pPlayer->SEND_GOSSIP_MENU(2713, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(2713, pCreature->GetObjectGuid()); return true; } @@ -86,47 +86,47 @@ bool GossipSelect_npc_ragged_john(Player* pPlayer, Creature* pCreature, uint32 u { case GOSSIP_ACTION_INFO_DEF: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "So what did you do?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); - pPlayer->SEND_GOSSIP_MENU(2714, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(2714, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+1: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Start making sense, dwarf. I don't want to have anything to do with your cracker, your pappy, or any sort of 'discreditin'.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); - pPlayer->SEND_GOSSIP_MENU(2715, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(2715, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+2: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Ironfoe?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); - pPlayer->SEND_GOSSIP_MENU(2716, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(2716, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+3: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Interesting... continue John.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4); - pPlayer->SEND_GOSSIP_MENU(2717, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(2717, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+4: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "So that's how Windsor died...", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 5); - pPlayer->SEND_GOSSIP_MENU(2718, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(2718, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+5: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "So how did he die?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 6); - pPlayer->SEND_GOSSIP_MENU(2719, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(2719, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+6: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Ok so where the hell is he? Wait a minute! Are you drunk?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 7); - pPlayer->SEND_GOSSIP_MENU(2720, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(2720, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+7: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "WHY is he in Blackrock Depths?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 8); - pPlayer->SEND_GOSSIP_MENU(2721, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(2721, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+8: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "300? So the Dark Irons killed him and dragged him into the Depths?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 9); - pPlayer->SEND_GOSSIP_MENU(2722, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(2722, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+9: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Ahh... Ironfoe", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 10); - pPlayer->SEND_GOSSIP_MENU(2723, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(2723, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+10: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Thanks, Ragged John. Your story was very uplifting and informative", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 11); - pPlayer->SEND_GOSSIP_MENU(2725, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(2725, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+11: pPlayer->CLOSE_GOSSIP_MENU(); diff --git a/scripts/eastern_kingdoms/eastern_plaguelands.cpp b/scripts/eastern_kingdoms/eastern_plaguelands.cpp index 842209bc3..74e803be9 100644 --- a/scripts/eastern_kingdoms/eastern_plaguelands.cpp +++ b/scripts/eastern_kingdoms/eastern_plaguelands.cpp @@ -60,19 +60,19 @@ CreatureAI* GetAI_mobs_ghoul_flayer(Creature* pCreature) bool GossipHello_npc_augustus_the_touched(Player* pPlayer, Creature* pCreature) { if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); if (pCreature->isVendor() && pPlayer->GetQuestRewardStatus(6164)) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_VENDOR, GOSSIP_TEXT_BROWSE_GOODS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE); - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); return true; } bool GossipSelect_npc_augustus_the_touched(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) { if (uiAction == GOSSIP_ACTION_TRADE) - pPlayer->SEND_VENDORLIST(pCreature->GetGUID()); + pPlayer->SEND_VENDORLIST(pCreature->GetObjectGuid()); return true; } @@ -100,8 +100,8 @@ CreatureAI* GetAI_npc_darrowshire_spirit(Creature* pCreature) bool GossipHello_npc_darrowshire_spirit(Player* pPlayer, Creature* pCreature) { - pPlayer->SEND_GOSSIP_MENU(3873, pCreature->GetGUID()); - pPlayer->TalkedToCreature(pCreature->GetEntry(), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(3873, pCreature->GetObjectGuid()); + pPlayer->TalkedToCreature(pCreature->GetEntry(), pCreature->GetObjectGuid()); pCreature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); return true; } @@ -113,12 +113,12 @@ bool GossipHello_npc_darrowshire_spirit(Player* pPlayer, Creature* pCreature) bool GossipHello_npc_tirion_fordring(Player* pPlayer, Creature* pCreature) { if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); if (pPlayer->GetQuestStatus(5742) == QUEST_STATUS_INCOMPLETE && pPlayer->getStandState() == UNIT_STAND_STATE_SIT) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "I am ready to hear your tale, Tirion.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); return true; } @@ -129,15 +129,15 @@ bool GossipSelect_npc_tirion_fordring(Player* pPlayer, Creature* pCreature, uint { case GOSSIP_ACTION_INFO_DEF+1: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Thank you, Tirion. What of your identity?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); - pPlayer->SEND_GOSSIP_MENU(4493, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(4493, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+2: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "That is terrible.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); - pPlayer->SEND_GOSSIP_MENU(4494, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(4494, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+3: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "I will, Tirion.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4); - pPlayer->SEND_GOSSIP_MENU(4495, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(4495, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+4: pPlayer->CLOSE_GOSSIP_MENU(); diff --git a/scripts/eastern_kingdoms/eversong_woods.cpp b/scripts/eastern_kingdoms/eversong_woods.cpp index 8588cc88d..6ed03e629 100644 --- a/scripts/eastern_kingdoms/eversong_woods.cpp +++ b/scripts/eastern_kingdoms/eversong_woods.cpp @@ -311,7 +311,7 @@ bool GossipHello_npc_prospector_anvilward(Player* pPlayer, Creature* pCreature) if (pPlayer->GetQuestStatus(QUEST_THE_DWARVEN_SPY) == QUEST_STATUS_INCOMPLETE) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_MOMENT, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - pPlayer->SEND_GOSSIP_MENU(8239, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(8239, pCreature->GetObjectGuid()); return true; } @@ -321,7 +321,7 @@ bool GossipSelect_npc_prospector_anvilward(Player* pPlayer, Creature* pCreature, { case GOSSIP_ACTION_INFO_DEF+1: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_SHOW, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); - pPlayer->SEND_GOSSIP_MENU(8240, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(8240, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+2: pPlayer->CLOSE_GOSSIP_MENU(); diff --git a/scripts/eastern_kingdoms/ghostlands.cpp b/scripts/eastern_kingdoms/ghostlands.cpp index bbe586029..b9c9ad90f 100644 --- a/scripts/eastern_kingdoms/ghostlands.cpp +++ b/scripts/eastern_kingdoms/ghostlands.cpp @@ -42,7 +42,7 @@ bool GossipHello_npc_blood_knight_dawnstar(Player* pPlayer, Creature* pCreature) if (pPlayer->GetQuestStatus(9692) == QUEST_STATUS_INCOMPLETE && !pPlayer->HasItemCount(24226,1,true)) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT,GOSSIP_ITEM_INSIGNIA,GOSSIP_SENDER_MAIN,GOSSIP_ACTION_INFO_DEF+1); - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); return true; } @@ -68,12 +68,12 @@ bool GossipSelect_npc_blood_knight_dawnstar(Player* pPlayer, Creature* pCreature bool GossipHello_npc_budd_nedreck(Player* pPlayer, Creature* pCreature) { if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); if (pPlayer->GetQuestStatus(11166) == QUEST_STATUS_INCOMPLETE) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT,GOSSIP_ITEM_DISGUISE,GOSSIP_SENDER_MAIN,GOSSIP_ACTION_INFO_DEF); - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); return true; } @@ -224,14 +224,14 @@ bool QuestAccept_npc_ranger_lilatha(Player* pPlayer, Creature* pCreature, const bool GossipHello_npc_rathis_tomber(Player* pPlayer, Creature* pCreature) { if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); if (pCreature->isVendor() && pPlayer->GetQuestRewardStatus(9152)) { pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_VENDOR, GOSSIP_TEXT_BROWSE_GOODS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE); - pPlayer->SEND_GOSSIP_MENU(8432, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(8432, pCreature->GetObjectGuid()); }else - pPlayer->SEND_GOSSIP_MENU(8431, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(8431, pCreature->GetObjectGuid()); return true; } @@ -239,7 +239,7 @@ bool GossipHello_npc_rathis_tomber(Player* pPlayer, Creature* pCreature) bool GossipSelect_npc_rathis_tomber(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) { if (uiAction == GOSSIP_ACTION_TRADE) - pPlayer->SEND_VENDORLIST(pCreature->GetGUID()); + pPlayer->SEND_VENDORLIST(pCreature->GetObjectGuid()); return true; } diff --git a/scripts/eastern_kingdoms/gnomeregan/gnomeregan.cpp b/scripts/eastern_kingdoms/gnomeregan/gnomeregan.cpp index a713fd1ff..2caa58686 100644 --- a/scripts/eastern_kingdoms/gnomeregan/gnomeregan.cpp +++ b/scripts/eastern_kingdoms/gnomeregan/gnomeregan.cpp @@ -601,7 +601,7 @@ bool GossipHello_npc_blastmaster_emi_shortfuse(Player* pPlayer, Creature* pCreat if (pInstance->GetData(TYPE_GRUBBIS) == NOT_STARTED || pInstance->GetData(TYPE_GRUBBIS) == FAIL) { pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_START, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); } } return true; diff --git a/scripts/eastern_kingdoms/ironforge.cpp b/scripts/eastern_kingdoms/ironforge.cpp index 4a77ea4e2..5b8b1e706 100644 --- a/scripts/eastern_kingdoms/ironforge.cpp +++ b/scripts/eastern_kingdoms/ironforge.cpp @@ -40,15 +40,15 @@ EndContentData */ bool GossipHello_npc_royal_historian_archesonus(Player* pPlayer, Creature* pCreature) { if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); if (pPlayer->GetQuestStatus(3702) == QUEST_STATUS_INCOMPLETE) { pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_ROYAL, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF); - pPlayer->SEND_GOSSIP_MENU(2235, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(2235, pCreature->GetObjectGuid()); } else - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); return true; } @@ -59,19 +59,19 @@ bool GossipSelect_npc_royal_historian_archesonus(Player* pPlayer, Creature* pCre { case GOSSIP_ACTION_INFO_DEF: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_ROYAL_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); - pPlayer->SEND_GOSSIP_MENU(2236, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(2236, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+1: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_ROYAL_2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); - pPlayer->SEND_GOSSIP_MENU(2237, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(2237, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+2: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_ROYAL_3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); - pPlayer->SEND_GOSSIP_MENU(2238, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(2238, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+3: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_ROYAL_4, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4); - pPlayer->SEND_GOSSIP_MENU(2239, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(2239, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+4: pPlayer->CLOSE_GOSSIP_MENU(); diff --git a/scripts/eastern_kingdoms/karazhan/boss_shade_of_aran.cpp b/scripts/eastern_kingdoms/karazhan/boss_shade_of_aran.cpp index 75e562173..99b0623de 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_shade_of_aran.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_shade_of_aran.cpp @@ -463,7 +463,7 @@ struct MANGOS_DLL_DECL boss_aranAI : public ScriptedAI if (pPlayer && !pPlayer->IsWithinDist2d(m_fFWTargPosX[i], m_fFWTargPosY[i], 3.0f)) { - pPlayer->CastSpell(pPlayer, SPELL_EXPLOSION, true, 0, 0, m_creature->GetGUID()); + pPlayer->CastSpell(pPlayer, SPELL_EXPLOSION, true, 0, 0, m_creature->GetObjectGuid()); pPlayer->CastSpell(pPlayer, SPELL_KNOCKBACK_500, true); m_uiFlameWreathTarget[i] = 0; } diff --git a/scripts/eastern_kingdoms/karazhan/bosses_opera.cpp b/scripts/eastern_kingdoms/karazhan/bosses_opera.cpp index 372984cd3..cb209f1b4 100644 --- a/scripts/eastern_kingdoms/karazhan/bosses_opera.cpp +++ b/scripts/eastern_kingdoms/karazhan/bosses_opera.cpp @@ -729,7 +729,7 @@ CreatureAI* GetAI_mob_cyclone(Creature* pCreature) bool GossipHello_npc_grandmother(Player* pPlayer, Creature* pCreature) { pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_GRANDMA, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF); - pPlayer->SEND_GOSSIP_MENU(8990, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(8990, pCreature->GetObjectGuid()); return true; } diff --git a/scripts/eastern_kingdoms/karazhan/karazhan.cpp b/scripts/eastern_kingdoms/karazhan/karazhan.cpp index 92ffb153b..28bf81d1f 100644 --- a/scripts/eastern_kingdoms/karazhan/karazhan.cpp +++ b/scripts/eastern_kingdoms/karazhan/karazhan.cpp @@ -330,16 +330,16 @@ bool GossipHello_npc_barnes(Player* pPlayer, Creature* pCreature) if (npc_barnesAI* pBarnesAI = dynamic_cast(pCreature->AI())) { if (!pBarnesAI->m_bRaidWiped) - pPlayer->SEND_GOSSIP_MENU(8970, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(8970, pCreature->GetObjectGuid()); else - pPlayer->SEND_GOSSIP_MENU(8975, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(8975, pCreature->GetObjectGuid()); return true; } } } - pPlayer->SEND_GOSSIP_MENU(8978, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(8978, pCreature->GetObjectGuid()); return true; } @@ -351,7 +351,7 @@ bool GossipSelect_npc_barnes(Player* pPlayer, Creature* pCreature, uint32 uiSend { case GOSSIP_ACTION_INFO_DEF+1: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, OZ_GOSSIP2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); - pPlayer->SEND_GOSSIP_MENU(8971, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(8971, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+2: pPlayer->CLOSE_GOSSIP_MENU(); @@ -362,19 +362,19 @@ bool GossipSelect_npc_barnes(Player* pPlayer, Creature* pCreature, uint32 uiSend pPlayer->CLOSE_GOSSIP_MENU(); if (pBarnesAI && pPlayer->isGameMaster()) pBarnesAI->m_uiEventId = EVENT_OZ; - outstring_log("SD2: pPlayer (GUID " UI64FMTD ") manually set Opera event to EVENT_OZ", pPlayer->GetGUID()); + outstring_log("SD2: %s manually set Opera event to EVENT_OZ", pPlayer->GetGuidStr().c_str()); break; case GOSSIP_ACTION_INFO_DEF+4: pPlayer->CLOSE_GOSSIP_MENU(); if (pBarnesAI && pPlayer->isGameMaster()) pBarnesAI->m_uiEventId = EVENT_HOOD; - outstring_log("SD2: pPlayer (GUID " UI64FMTD ") manually set Opera event to EVENT_HOOD", pPlayer->GetGUID()); + outstring_log("SD2: %s manually set Opera event to EVENT_HOOD", pPlayer->GetGuidStr().c_str()); break; case GOSSIP_ACTION_INFO_DEF+5: pPlayer->CLOSE_GOSSIP_MENU(); if (pBarnesAI && pPlayer->isGameMaster()) pBarnesAI->m_uiEventId = EVENT_RAJ; - outstring_log("SD2: pPlayer (GUID " UI64FMTD ") manually set Opera event to EVENT_RAJ", pPlayer->GetGUID()); + outstring_log("SD2: %s manually set Opera event to EVENT_RAJ", pPlayer->GetGuidStr().c_str()); break; } @@ -401,7 +401,7 @@ bool GossipHello_npc_berthold(Player* pPlayer, Creature* pCreature) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_TELEPORT, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); } - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); return true; } diff --git a/scripts/eastern_kingdoms/loch_modan.cpp b/scripts/eastern_kingdoms/loch_modan.cpp index 0cffb2169..4eef964d9 100644 --- a/scripts/eastern_kingdoms/loch_modan.cpp +++ b/scripts/eastern_kingdoms/loch_modan.cpp @@ -36,12 +36,12 @@ EndContentData */ bool GossipHello_npc_mountaineer_pebblebitty(Player* pPlayer, Creature* pCreature) { if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); if (!pPlayer->GetQuestRewardStatus(3181) == 1) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Open the gate please, i need to get to Searing Gorge", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); return true; } @@ -52,27 +52,27 @@ bool GossipSelect_npc_mountaineer_pebblebitty(Player* pPlayer, Creature* pCreatu { case GOSSIP_ACTION_INFO_DEF+1: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "But i need to get there, now open the gate!", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); - pPlayer->SEND_GOSSIP_MENU(1833, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(1833, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+2: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Ok, so what is this other way?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); - pPlayer->SEND_GOSSIP_MENU(1834, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(1834, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+3: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Doesn't matter, i'm invulnerable.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4); - pPlayer->SEND_GOSSIP_MENU(1835, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(1835, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+4: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Yes...", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 5); - pPlayer->SEND_GOSSIP_MENU(1836, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(1836, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+5: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Ok, i'll try to remember that.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 6); - pPlayer->SEND_GOSSIP_MENU(1837, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(1837, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+6: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "A key? Ok!", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 7); - pPlayer->SEND_GOSSIP_MENU(1838, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(1838, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+7: pPlayer->CLOSE_GOSSIP_MENU(); diff --git a/scripts/eastern_kingdoms/magisters_terrace/boss_felblood_kaelthas.cpp b/scripts/eastern_kingdoms/magisters_terrace/boss_felblood_kaelthas.cpp index 9eda3c1d8..c78c0d7f6 100644 --- a/scripts/eastern_kingdoms/magisters_terrace/boss_felblood_kaelthas.cpp +++ b/scripts/eastern_kingdoms/magisters_terrace/boss_felblood_kaelthas.cpp @@ -170,7 +170,7 @@ struct MANGOS_DLL_DECL boss_felblood_kaelthasAI : public ScriptedAI void JustSummoned(Creature* pSummoned) { if (pSummoned->GetEntry() == NPC_FLAME_STRIKE_TRIGGER) - pSummoned->CastSpell(pSummoned, SPELL_FLAME_STRIKE_DUMMY, false, NULL, NULL, m_creature->GetGUID()); + pSummoned->CastSpell(pSummoned, SPELL_FLAME_STRIKE_DUMMY, false, NULL, NULL, m_creature->GetObjectGuid()); } void SetThreatList(Creature* SummonedUnit) @@ -217,7 +217,7 @@ struct MANGOS_DLL_DECL boss_felblood_kaelthasAI : public ScriptedAI // Knockback into the air if (pUnit && pUnit->GetTypeId() == TYPEID_PLAYER) - pUnit->CastSpell(pUnit, SPELL_GRAVITY_LAPSE_DOT, true, 0, 0, m_creature->GetGUID()); + pUnit->CastSpell(pUnit, SPELL_GRAVITY_LAPSE_DOT, true, 0, 0, m_creature->GetObjectGuid()); } } @@ -232,7 +232,7 @@ struct MANGOS_DLL_DECL boss_felblood_kaelthasAI : public ScriptedAI // Also needs an exception in spell system. if (pUnit && pUnit->GetTypeId() == TYPEID_PLAYER) - pUnit->CastSpell(pUnit, SPELL_GRAVITY_LAPSE_FLY, true, 0, 0, m_creature->GetGUID()); + pUnit->CastSpell(pUnit, SPELL_GRAVITY_LAPSE_FLY, true, 0, 0, m_creature->GetObjectGuid()); } } diff --git a/scripts/eastern_kingdoms/magisters_terrace/boss_vexallus.cpp b/scripts/eastern_kingdoms/magisters_terrace/boss_vexallus.cpp index e0738e345..a1818c7da 100644 --- a/scripts/eastern_kingdoms/magisters_terrace/boss_vexallus.cpp +++ b/scripts/eastern_kingdoms/magisters_terrace/boss_vexallus.cpp @@ -112,7 +112,7 @@ struct MANGOS_DLL_DECL boss_vexallusAI : public ScriptedAI if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) pSummoned->GetMotionMaster()->MoveFollow(pTarget, 0.0f, 0.0f); - pSummoned->CastSpell(pSummoned, SPELL_ENERGY_BOLT, false, NULL, NULL, m_creature->GetGUID()); + pSummoned->CastSpell(pSummoned, SPELL_ENERGY_BOLT, false, NULL, NULL, m_creature->GetObjectGuid()); } void UpdateAI(const uint32 diff) diff --git a/scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.cpp b/scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.cpp index de03f9658..680ad286e 100644 --- a/scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.cpp +++ b/scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.cpp @@ -125,10 +125,10 @@ CreatureAI* GetAI_npc_kalecgos(Creature* pCreature) bool GossipHello_npc_kalecgos(Player* pPlayer, Creature* pCreature) { if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KAEL_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF); - pPlayer->SEND_GOSSIP_MENU(12498, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(12498, pCreature->GetObjectGuid()); return true; } @@ -139,22 +139,22 @@ bool GossipSelect_npc_kalecgos(Player* pPlayer, Creature* pCreature, uint32 uiSe { case GOSSIP_ACTION_INFO_DEF: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KAEL_2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); - pPlayer->SEND_GOSSIP_MENU(12500, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(12500, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+1: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KAEL_3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); - pPlayer->SEND_GOSSIP_MENU(12502, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(12502, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+2: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KAEL_4, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); - pPlayer->SEND_GOSSIP_MENU(12606, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(12606, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+3: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KAEL_5, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4); - pPlayer->SEND_GOSSIP_MENU(12607, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(12607, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+4: - pPlayer->SEND_GOSSIP_MENU(12608, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(12608, pCreature->GetObjectGuid()); break; } diff --git a/scripts/eastern_kingdoms/molten_core/boss_majordomo_executus.cpp b/scripts/eastern_kingdoms/molten_core/boss_majordomo_executus.cpp index a0a849ec0..0b26b066f 100644 --- a/scripts/eastern_kingdoms/molten_core/boss_majordomo_executus.cpp +++ b/scripts/eastern_kingdoms/molten_core/boss_majordomo_executus.cpp @@ -430,7 +430,7 @@ bool GossipHello_boss_majordomo(Player* pPlayer, Creature* pCreature) if (pInstance->GetData(TYPE_RAGNAROS) == NOT_STARTED || pInstance->GetData(TYPE_RAGNAROS) == FAIL) { pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_SUMMON_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - pPlayer->SEND_GOSSIP_MENU(TEXT_ID_SUMMON_1, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(TEXT_ID_SUMMON_1, pCreature->GetObjectGuid()); } } return true; @@ -442,11 +442,11 @@ bool GossipSelect_boss_majordomo(Player* pPlayer, Creature* pCreature, uint32 se { case GOSSIP_ACTION_INFO_DEF + 1: pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_SUMMON_2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); - pPlayer->SEND_GOSSIP_MENU(TEXT_ID_SUMMON_2, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(TEXT_ID_SUMMON_2, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF + 2: pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_SUMMON_3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); - pPlayer->SEND_GOSSIP_MENU(TEXT_ID_SUMMON_3, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(TEXT_ID_SUMMON_3, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF + 3: pPlayer->CLOSE_GOSSIP_MENU(); diff --git a/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp b/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp index efec56268..ebbfc7868 100644 --- a/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp +++ b/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp @@ -608,7 +608,7 @@ bool GossipHello_npc_death_knight_initiate(Player* pPlayer, Creature* pCreature) if (pPlayer->GetQuestStatus(QUEST_DEATH_CHALLENGE) == QUEST_STATUS_INCOMPLETE) { pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ACCEPT_DUEL, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); - pPlayer->SEND_GOSSIP_MENU(13433, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(13433, pCreature->GetObjectGuid()); return true; } return false; diff --git a/scripts/eastern_kingdoms/searing_gorge.cpp b/scripts/eastern_kingdoms/searing_gorge.cpp index b8c622fe8..466b5b70d 100644 --- a/scripts/eastern_kingdoms/searing_gorge.cpp +++ b/scripts/eastern_kingdoms/searing_gorge.cpp @@ -36,12 +36,12 @@ EndContentData */ bool GossipHello_npc_kalaran_windblade(Player* pPlayer, Creature* pCreature) { if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); if (pPlayer->GetQuestStatus(3441) == QUEST_STATUS_INCOMPLETE) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Tell me what drives this vengance?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF); - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); return true; } @@ -52,11 +52,11 @@ bool GossipSelect_npc_kalaran_windblade(Player* pPlayer, Creature* pCreature, ui { case GOSSIP_ACTION_INFO_DEF: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Continue please", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); - pPlayer->SEND_GOSSIP_MENU(1954, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(1954, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+1: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Let me confer with my colleagues", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); - pPlayer->SEND_GOSSIP_MENU(1955, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(1955, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+2: pPlayer->CLOSE_GOSSIP_MENU(); @@ -73,12 +73,12 @@ bool GossipSelect_npc_kalaran_windblade(Player* pPlayer, Creature* pCreature, ui bool GossipHello_npc_lothos_riftwaker(Player* pPlayer, Creature* pCreature) { if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); if (pPlayer->GetQuestRewardStatus(7487) || pPlayer->GetQuestRewardStatus(7848)) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Teleport me to the Molten Core", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); return true; } @@ -101,12 +101,12 @@ bool GossipSelect_npc_lothos_riftwaker(Player* pPlayer, Creature* pCreature, uin bool GossipHello_npc_zamael_lunthistle(Player* pPlayer, Creature* pCreature) { if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); if (pPlayer->GetQuestStatus(3377) == QUEST_STATUS_INCOMPLETE) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Tell me your story", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF); - pPlayer->SEND_GOSSIP_MENU(1920, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(1920, pCreature->GetObjectGuid()); return true; } @@ -117,11 +117,11 @@ bool GossipSelect_npc_zamael_lunthistle(Player* pPlayer, Creature* pCreature, ui { case GOSSIP_ACTION_INFO_DEF: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Please continue...", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); - pPlayer->SEND_GOSSIP_MENU(1921, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(1921, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+1: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Goodbye", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); - pPlayer->SEND_GOSSIP_MENU(1922, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(1922, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+2: pPlayer->CLOSE_GOSSIP_MENU(); diff --git a/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.cpp b/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.cpp index 9fc230dd9..52f90b69e 100644 --- a/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.cpp +++ b/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.cpp @@ -148,7 +148,7 @@ bool GossipHello_npc_shadowfang_prisoner(Player* pPlayer, Creature* pCreature) if (pInstance && pInstance->GetData(TYPE_FREE_NPC) != DONE && pInstance->GetData(TYPE_RETHILGORE) == DONE) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_DOOR, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); return true; } diff --git a/scripts/eastern_kingdoms/stormwind_city.cpp b/scripts/eastern_kingdoms/stormwind_city.cpp index 879a02dd6..e1885123d 100644 --- a/scripts/eastern_kingdoms/stormwind_city.cpp +++ b/scripts/eastern_kingdoms/stormwind_city.cpp @@ -39,12 +39,12 @@ EndContentData */ bool GossipHello_npc_archmage_malin(Player* pPlayer, Creature* pCreature) { if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); if (pPlayer->GetQuestStatus(11223) == QUEST_STATUS_COMPLETE && !pPlayer->GetQuestRewardStatus(11223)) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_MALIN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF); - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); return true; } @@ -204,12 +204,12 @@ CreatureAI* GetAI_npc_dashel_stonefist(Creature* pCreature) bool GossipHello_npc_lady_katrana_prestor(Player* pPlayer, Creature* pCreature) { if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); if (pPlayer->GetQuestStatus(4185) == QUEST_STATUS_INCOMPLETE) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KAT_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF); - pPlayer->SEND_GOSSIP_MENU(2693, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(2693, pCreature->GetObjectGuid()); return true; } @@ -220,15 +220,15 @@ bool GossipSelect_npc_lady_katrana_prestor(Player* pPlayer, Creature* pCreature, { case GOSSIP_ACTION_INFO_DEF: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KAT_2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); - pPlayer->SEND_GOSSIP_MENU(2694, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(2694, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+1: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KAT_3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); - pPlayer->SEND_GOSSIP_MENU(2695, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(2695, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+2: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KAT_4, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); - pPlayer->SEND_GOSSIP_MENU(2696, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(2696, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+3: pPlayer->CLOSE_GOSSIP_MENU(); diff --git a/scripts/eastern_kingdoms/sunwell_plateau/boss_brutallus.cpp b/scripts/eastern_kingdoms/sunwell_plateau/boss_brutallus.cpp index 8c548754f..dd20b48f5 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/boss_brutallus.cpp +++ b/scripts/eastern_kingdoms/sunwell_plateau/boss_brutallus.cpp @@ -113,7 +113,7 @@ struct MANGOS_DLL_DECL boss_brutallusAI : public ScriptedAI void SpellHitTarget(Unit* pCaster, const SpellEntry* pSpell) { if (pSpell->Id == SPELL_BURN) - pCaster->CastSpell(pCaster, SPELL_BURN_AURA_EFFECT, true, NULL, NULL, m_creature->GetGUID()); + pCaster->CastSpell(pCaster, SPELL_BURN_AURA_EFFECT, true, NULL, NULL, m_creature->GetObjectGuid()); } void UpdateAI(const uint32 uiDiff) diff --git a/scripts/eastern_kingdoms/uldaman/uldaman.cpp b/scripts/eastern_kingdoms/uldaman/uldaman.cpp index 666c092e1..55644b0cb 100644 --- a/scripts/eastern_kingdoms/uldaman/uldaman.cpp +++ b/scripts/eastern_kingdoms/uldaman/uldaman.cpp @@ -37,7 +37,7 @@ bool GossipHello_npc_lore_keeper_of_norgannon(Player* pPlayer, Creature* pCreatu if (pPlayer->GetQuestStatus(2278) == QUEST_STATUS_INCOMPLETE) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Who are the Earthen?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - pPlayer->SEND_GOSSIP_MENU(1079, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(1079, pCreature->GetObjectGuid()); return true; } @@ -48,63 +48,63 @@ bool GossipSelect_npc_lore_keeper_of_norgannon(Player* pPlayer, Creature* pCreat { case GOSSIP_ACTION_INFO_DEF+1: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "What is a \"subterranean being matrix\"?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); - pPlayer->SEND_GOSSIP_MENU(1080, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(1080, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+2: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "What are the anomalies you speak of?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3); - pPlayer->SEND_GOSSIP_MENU(1081, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(1081, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+3: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "What is a resilient foundation of construction?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+4); - pPlayer->SEND_GOSSIP_MENU(1082, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(1082, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+4: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "So... the Earthen were made out of stone?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+5); - pPlayer->SEND_GOSSIP_MENU(1083, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(1083, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+5: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Anything else I should know about the Earthen?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+6); - pPlayer->SEND_GOSSIP_MENU(1084, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(1084, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+6: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "I think I understand the Creators' design intent for the Earthen now. What are the Earthen's anomalies that you spoke of earlier?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+7); - pPlayer->SEND_GOSSIP_MENU(1085, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(1085, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+7: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "What high-stress environments would cause the Earthen to destabilize?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+8); - pPlayer->SEND_GOSSIP_MENU(1086, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(1086, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+8: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "What happens when the Earthen destabilize?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+9); - pPlayer->SEND_GOSSIP_MENU(1087, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(1087, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+9: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Troggs?! Are the troggs you mention the same as the ones in the world today?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+10); - pPlayer->SEND_GOSSIP_MENU(1088, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(1088, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+10: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "You mentioned two results when the Earthen destabilize. What is the second?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+11); - pPlayer->SEND_GOSSIP_MENU(1089, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(1089, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+11: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Dwarves!!! Now you're telling me that dwarves originally came from the Earthen?!", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+12); - pPlayer->SEND_GOSSIP_MENU(1090, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(1090, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+12: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "These dwarves are the same ones today, yes? Do the dwarves maintain any other links to the Earthen?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+13); - pPlayer->SEND_GOSSIP_MENU(1091, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(1091, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+13: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Who are the Creators?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+14); - pPlayer->SEND_GOSSIP_MENU(1092, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(1092, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+14: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "This is a lot to think about.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+15); - pPlayer->SEND_GOSSIP_MENU(1093, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(1093, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+15: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "I will access the discs now.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+16); - pPlayer->SEND_GOSSIP_MENU(1094, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(1094, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+16: pPlayer->CLOSE_GOSSIP_MENU(); diff --git a/scripts/eastern_kingdoms/undercity.cpp b/scripts/eastern_kingdoms/undercity.cpp index e09360d5c..79de1226c 100644 --- a/scripts/eastern_kingdoms/undercity.cpp +++ b/scripts/eastern_kingdoms/undercity.cpp @@ -201,17 +201,17 @@ CreatureAI* GetAI_npc_highborne_lamenter(Creature* pCreature) bool GossipHello_npc_parqual_fintallas(Player* pPlayer, Creature* pCreature) { if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); if (pPlayer->GetQuestStatus(6628) == QUEST_STATUS_INCOMPLETE && !pPlayer->HasAura(SPELL_MARK_OF_SHAME, EFFECT_INDEX_0)) { pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Gul'dan", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Kel'Thuzad", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Ner'zhul", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); - pPlayer->SEND_GOSSIP_MENU(5822, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(5822, pCreature->GetObjectGuid()); } else - pPlayer->SEND_GOSSIP_MENU(5821, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(5821, pCreature->GetObjectGuid()); return true; } diff --git a/scripts/eastern_kingdoms/western_plaguelands.cpp b/scripts/eastern_kingdoms/western_plaguelands.cpp index dcaf3df34..942a2cfac 100644 --- a/scripts/eastern_kingdoms/western_plaguelands.cpp +++ b/scripts/eastern_kingdoms/western_plaguelands.cpp @@ -36,7 +36,7 @@ EndContentData */ bool GossipHello_npcs_dithers_and_arbington(Player* pPlayer, Creature* pCreature) { if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); if (pCreature->isVendor()) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_VENDOR, GOSSIP_TEXT_BROWSE_GOODS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE); @@ -46,9 +46,9 @@ bool GossipHello_npcs_dithers_and_arbington(Player* pPlayer, Creature* pCreature pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "What does the Dalson's Tears Cauldron need?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "What does the Writhing Haunt Cauldron need?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3); pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "What does the Gahrron's Withering Cauldron need?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+4); - pPlayer->SEND_GOSSIP_MENU(3985, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(3985, pCreature->GetObjectGuid()); }else - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); return true; } @@ -58,23 +58,23 @@ bool GossipSelect_npcs_dithers_and_arbington(Player* pPlayer, Creature* pCreatur switch(uiAction) { case GOSSIP_ACTION_TRADE: - pPlayer->SEND_VENDORLIST(pCreature->GetGUID()); + pPlayer->SEND_VENDORLIST(pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+1: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Thanks, i need a Vitreous Focuser", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+5); - pPlayer->SEND_GOSSIP_MENU(3980, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(3980, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+2: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Thanks, i need a Vitreous Focuser", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+5); - pPlayer->SEND_GOSSIP_MENU(3981, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(3981, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+3: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Thanks, i need a Vitreous Focuser", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+5); - pPlayer->SEND_GOSSIP_MENU(3982, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(3982, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+4: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Thanks, i need a Vitreous Focuser", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+5); - pPlayer->SEND_GOSSIP_MENU(3983, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(3983, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+5: pPlayer->CLOSE_GOSSIP_MENU(); @@ -100,17 +100,17 @@ enum bool GossipHello_npc_myranda_the_hag(Player* pPlayer, Creature* pCreature) { if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); if (pPlayer->GetQuestStatus(QUEST_SUBTERFUGE) == QUEST_STATUS_COMPLETE && !pPlayer->GetQuestRewardStatus(QUEST_IN_DREAMS) && !pPlayer->HasAura(SPELL_SCARLET_ILLUSION)) { pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_ILLUSION, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - pPlayer->SEND_GOSSIP_MENU(4773, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(4773, pCreature->GetObjectGuid()); return true; } else - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); return true; } diff --git a/scripts/eastern_kingdoms/zulaman/boss_janalai.cpp b/scripts/eastern_kingdoms/zulaman/boss_janalai.cpp index d4e2a9584..9af9b9dab 100644 --- a/scripts/eastern_kingdoms/zulaman/boss_janalai.cpp +++ b/scripts/eastern_kingdoms/zulaman/boss_janalai.cpp @@ -338,7 +338,7 @@ struct MANGOS_DLL_DECL boss_janalaiAI : public ScriptedAI if (Creature* pBomb = m_creature->GetMap()->GetCreature(*itr)) { //do damage and then remove aura (making them "disappear") - pBomb->CastSpell(pBomb, SPELL_FIRE_BOMB_DAMAGE, false, NULL, NULL, m_creature->GetGUID()); + pBomb->CastSpell(pBomb, SPELL_FIRE_BOMB_DAMAGE, false, NULL, NULL, m_creature->GetObjectGuid()); pBomb->RemoveAurasDueToSpell(SPELL_FIRE_BOMB_DUMMY); } } diff --git a/scripts/eastern_kingdoms/zulaman/zulaman.cpp b/scripts/eastern_kingdoms/zulaman/zulaman.cpp index 7ead77140..d5c875fcd 100644 --- a/scripts/eastern_kingdoms/zulaman/zulaman.cpp +++ b/scripts/eastern_kingdoms/zulaman/zulaman.cpp @@ -183,12 +183,12 @@ bool GossipHello_npc_harrison_jones_za(Player* pPlayer, Creature* pCreature) ScriptedInstance* pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); if (pInstance && pInstance->GetData(TYPE_EVENT_RUN) == NOT_STARTED) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_BEGIN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); return true; } diff --git a/scripts/examples/example_creature.cpp b/scripts/examples/example_creature.cpp index 0ed28dc78..cb3a5ac51 100644 --- a/scripts/examples/example_creature.cpp +++ b/scripts/examples/example_creature.cpp @@ -256,7 +256,7 @@ CreatureAI* GetAI_example_creature(Creature* pCreature) bool GossipHello_example_creature(Player* pPlayer, Creature* pCreature) { pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); - pPlayer->SEND_GOSSIP_MENU(TEXT_ID_GREET, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(TEXT_ID_GREET, pCreature->GetObjectGuid()); return true; } diff --git a/scripts/examples/example_escort.cpp b/scripts/examples/example_escort.cpp index 066dd94d4..31f00e09d 100644 --- a/scripts/examples/example_escort.cpp +++ b/scripts/examples/example_escort.cpp @@ -179,7 +179,7 @@ CreatureAI* GetAI_example_escort(Creature* pCreature) bool GossipHello_example_escort(Player* pPlayer, Creature* pCreature) { - pPlayer->TalkedToCreature(pCreature->GetEntry(), pCreature->GetGUID()); + pPlayer->TalkedToCreature(pCreature->GetEntry(), pCreature->GetObjectGuid()); pPlayer->PrepareGossipMenu(pCreature, pPlayer->GetDefaultGossipMenuForSource(pCreature)); pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); diff --git a/scripts/examples/example_gossip_codebox.cpp b/scripts/examples/example_gossip_codebox.cpp index 517e7eee0..70bc83852 100644 --- a/scripts/examples/example_gossip_codebox.cpp +++ b/scripts/examples/example_gossip_codebox.cpp @@ -44,7 +44,7 @@ bool GossipHello_example_gossip_codebox(Player* pPlayer, Creature* pCreature) pPlayer->ADD_GOSSIP_ITEM_EXTENDED(0, GOSSIP_ITEM_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1, "", 0, true); pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); - pPlayer->PlayerTalkClass->SendGossipMenu(907, pCreature->GetGUID()); + pPlayer->PlayerTalkClass->SendGossipMenu(907, pCreature->GetObjectGuid()); return true; } diff --git a/scripts/kalimdor/azshara.cpp b/scripts/kalimdor/azshara.cpp index 942ee0239..e2b773f07 100644 --- a/scripts/kalimdor/azshara.cpp +++ b/scripts/kalimdor/azshara.cpp @@ -132,7 +132,7 @@ struct MANGOS_DLL_DECL npc_rizzle_sprysprocketAI : public npc_escortAI //this may be wrong void JustSummoned(Creature* pSummoned) { - //pSummoned->CastSpell(pSummoned,SPELL_PERIODIC_GRENADE,false,0,0,m_creature->GetGUID()); + //pSummoned->CastSpell(pSummoned,SPELL_PERIODIC_GRENADE,false,NULL,NULL,m_creature->GetObjectGuid()); } void UpdateEscortAI(const uint32 uiDiff) @@ -190,7 +190,7 @@ bool GossipHello_npc_rizzle_sprysprocket(Player* pPlayer, Creature* pCreature) if (pPlayer->GetQuestStatus(QUEST_MOONSTONE) == QUEST_STATUS_INCOMPLETE) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_MOONSTONE, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); return true; } @@ -308,7 +308,7 @@ CreatureAI* GetAI_mobs_spitelashes(Creature* pCreature) bool GossipHello_npc_loramus_thalipedes(Player* pPlayer, Creature* pCreature) { if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); if (pPlayer->GetQuestStatus(2744) == QUEST_STATUS_INCOMPLETE) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Can you help me?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); @@ -316,7 +316,7 @@ bool GossipHello_npc_loramus_thalipedes(Player* pPlayer, Creature* pCreature) if (pPlayer->GetQuestStatus(3141) == QUEST_STATUS_INCOMPLETE) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Tell me your story", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); return true; } @@ -332,23 +332,23 @@ bool GossipSelect_npc_loramus_thalipedes(Player* pPlayer, Creature* pCreature, u case GOSSIP_ACTION_INFO_DEF+2: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Please continue", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 21); - pPlayer->SEND_GOSSIP_MENU(1813, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(1813, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+21: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "I do not understand", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 22); - pPlayer->SEND_GOSSIP_MENU(1814, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(1814, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+22: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Indeed", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 23); - pPlayer->SEND_GOSSIP_MENU(1815, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(1815, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+23: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "I will do this with or your help, Loramus", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 24); - pPlayer->SEND_GOSSIP_MENU(1816, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(1816, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+24: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Yes", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 25); - pPlayer->SEND_GOSSIP_MENU(1817, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(1817, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+25: pPlayer->CLOSE_GOSSIP_MENU(); diff --git a/scripts/kalimdor/azuremyst_isle.cpp b/scripts/kalimdor/azuremyst_isle.cpp index 94879c4f5..bd12ef0aa 100644 --- a/scripts/kalimdor/azuremyst_isle.cpp +++ b/scripts/kalimdor/azuremyst_isle.cpp @@ -137,7 +137,7 @@ struct MANGOS_DLL_DECL npc_draenei_survivorAI : public ScriptedAI case 3: DoScriptText(SAY_HEAL4, m_creature, pPlayer); break; } - pPlayer->TalkedToCreature(m_creature->GetEntry(),m_creature->GetGUID()); + pPlayer->TalkedToCreature(m_creature->GetEntry(), m_creature->GetObjectGuid()); } m_creature->GetMotionMaster()->Clear(); @@ -270,7 +270,7 @@ bool GossipHello_npc_engineer_spark_overgrind(Player* pPlayer, Creature* pCreatu if (pPlayer->GetQuestStatus(QUEST_GNOMERCY) == QUEST_STATUS_INCOMPLETE) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_FIGHT, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF); - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); return true; } @@ -404,12 +404,12 @@ enum bool GossipHello_npc_susurrus(Player* pPlayer, Creature* pCreature) { if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); if (pPlayer->HasItemCount(ITEM_WHORL_OF_AIR,1,true)) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_READY, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF); - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); return true; } diff --git a/scripts/kalimdor/bloodmyst_isle.cpp b/scripts/kalimdor/bloodmyst_isle.cpp index 891528a70..539c866c6 100644 --- a/scripts/kalimdor/bloodmyst_isle.cpp +++ b/scripts/kalimdor/bloodmyst_isle.cpp @@ -80,10 +80,10 @@ bool GossipHello_npc_captured_sunhawk_agent(Player* pPlayer, Creature* pCreature if (pPlayer->HasAura(31609, EFFECT_INDEX_1) && pPlayer->GetQuestStatus(9756) == QUEST_STATUS_INCOMPLETE) { pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "[PH] ", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - pPlayer->SEND_GOSSIP_MENU(9136, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(9136, pCreature->GetObjectGuid()); } else - pPlayer->SEND_GOSSIP_MENU(9134, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(9134, pCreature->GetObjectGuid()); return true; } @@ -94,27 +94,27 @@ bool GossipSelect_npc_captured_sunhawk_agent(Player* pPlayer, Creature* pCreatur { case GOSSIP_ACTION_INFO_DEF+1: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "[PH] ", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); - pPlayer->SEND_GOSSIP_MENU(9137, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(9137, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+2: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "[PH] ", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3); - pPlayer->SEND_GOSSIP_MENU(9138, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(9138, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+3: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "[PH] ", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+4); - pPlayer->SEND_GOSSIP_MENU(9139, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(9139, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+4: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "[PH] ", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+5); - pPlayer->SEND_GOSSIP_MENU(9140, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(9140, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+5: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "[PH] ", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+6); - pPlayer->SEND_GOSSIP_MENU(9141, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(9141, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+6: pPlayer->CLOSE_GOSSIP_MENU(); - pPlayer->TalkedToCreature(C_SUNHAWK_TRIGGER, pCreature->GetGUID()); + pPlayer->TalkedToCreature(C_SUNHAWK_TRIGGER, pCreature->GetObjectGuid()); break; } return true; diff --git a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.cpp b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.cpp index cc8b88879..17d17bdab 100644 --- a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.cpp +++ b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.cpp @@ -57,7 +57,7 @@ enum bool GossipHello_npc_chromie(Player *pPlayer, Creature *pCreature) { if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); if (instance_culling_of_stratholme* m_pInstance = (instance_culling_of_stratholme*)pCreature->GetInstanceData()) { @@ -69,12 +69,12 @@ bool GossipHello_npc_chromie(Player *pPlayer, Creature *pCreature) if (pPlayer->GetQuestRewardStatus(QUEST_DISPELLING_ILLUSIONS) && !pPlayer->HasItemCount(ITEM_ARCANE_DISRUPTOR, 1)) pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_INN_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); } - pPlayer->SEND_GOSSIP_MENU(TEXT_ID_INN_1, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(TEXT_ID_INN_1, pCreature->GetObjectGuid()); break; case NPC_CHROMIE_ENTRANCE: if (m_pInstance->GetData(TYPE_GRAIN_EVENT) == DONE && m_pInstance->GetData(TYPE_ARTHAS_INTRO_EVENT) == NOT_STARTED && pPlayer->GetQuestRewardStatus(QUEST_A_ROYAL_ESCORT)) pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_ENTRANCE_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - pPlayer->SEND_GOSSIP_MENU(TEXT_ID_ENTRANCE_1, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(TEXT_ID_ENTRANCE_1, pCreature->GetObjectGuid()); break; } } @@ -90,14 +90,14 @@ bool GossipSelect_npc_chromie(Player* pPlayer, Creature* pCreature, uint32 sende { case GOSSIP_ACTION_INFO_DEF+1: pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_INN_2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); - pPlayer->SEND_GOSSIP_MENU(TEXT_ID_INN_2, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(TEXT_ID_INN_2, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+2: pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_INN_3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); - pPlayer->SEND_GOSSIP_MENU(TEXT_ID_INN_3, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(TEXT_ID_INN_3, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+3: - pPlayer->SEND_GOSSIP_MENU(TEXT_ID_INN_4, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(TEXT_ID_INN_4, pCreature->GetObjectGuid()); if (!pPlayer->HasItemCount(ITEM_ARCANE_DISRUPTOR, 1)) { if (Item* pItem = pPlayer->StoreNewItemInInventorySlot(ITEM_ARCANE_DISRUPTOR, 1)) @@ -118,14 +118,14 @@ bool GossipSelect_npc_chromie(Player* pPlayer, Creature* pCreature, uint32 sende { case GOSSIP_ACTION_INFO_DEF+1: pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_ENTRANCE_2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); - pPlayer->SEND_GOSSIP_MENU(TEXT_ID_ENTRANCE_2, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(TEXT_ID_ENTRANCE_2, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+2: pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_ENTRANCE_3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); - pPlayer->SEND_GOSSIP_MENU(TEXT_ID_ENTRANCE_3, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(TEXT_ID_ENTRANCE_3, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+3: - pPlayer->SEND_GOSSIP_MENU(TEXT_ID_ENTRANCE_4, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(TEXT_ID_ENTRANCE_4, pCreature->GetObjectGuid()); if (instance_culling_of_stratholme* pInstance = (instance_culling_of_stratholme*)pCreature->GetInstanceData()) { if (pInstance->GetData(TYPE_ARTHAS_INTRO_EVENT) == NOT_STARTED) diff --git a/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.cpp b/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.cpp index 06116bf7c..0116678a9 100644 --- a/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.cpp +++ b/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.cpp @@ -365,22 +365,22 @@ CreatureAI* GetAI_npc_time_rift(Creature* pCreature) bool GossipHello_npc_saat(Player* pPlayer, Creature* pCreature) { if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); if (pPlayer->GetQuestStatus(QUEST_OPENING_PORTAL) == QUEST_STATUS_INCOMPLETE && !pPlayer->HasItemCount(ITEM_CHRONO_BEACON,1)) { pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_OBTAIN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - pPlayer->SEND_GOSSIP_MENU(10000, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(10000, pCreature->GetObjectGuid()); return true; } else if (pPlayer->GetQuestRewardStatus(QUEST_OPENING_PORTAL) && !pPlayer->HasItemCount(ITEM_CHRONO_BEACON,1)) { pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_OBTAIN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - pPlayer->SEND_GOSSIP_MENU(10001, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(10001, pCreature->GetObjectGuid()); return true; } - pPlayer->SEND_GOSSIP_MENU(10002, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(10002, pCreature->GetObjectGuid()); return true; } diff --git a/scripts/kalimdor/caverns_of_time/hyjal/boss_archimonde.cpp b/scripts/kalimdor/caverns_of_time/hyjal/boss_archimonde.cpp index 795db533d..95e3442e6 100644 --- a/scripts/kalimdor/caverns_of_time/hyjal/boss_archimonde.cpp +++ b/scripts/kalimdor/caverns_of_time/hyjal/boss_archimonde.cpp @@ -338,7 +338,7 @@ struct MANGOS_DLL_DECL boss_archimondeAI : public ScriptedAI if (pSummoned->GetEntry() == CREATURE_DOOMFIRE) { pSummoned->CastSpell(pSummoned,SPELL_DOOMFIRE_SPAWN,false); - pSummoned->CastSpell(pSummoned,SPELL_DOOMFIRE,true,0,0,m_creature->GetGUID()); + pSummoned->CastSpell(pSummoned, SPELL_DOOMFIRE, true, NULL, NULL, m_creature->GetObjectGuid()); if (Creature* pDoomfireSpirit = m_creature->GetMap()->GetCreature(DoomfireSpiritGUID)) { diff --git a/scripts/kalimdor/caverns_of_time/hyjal/hyjal.cpp b/scripts/kalimdor/caverns_of_time/hyjal/hyjal.cpp index b1d36fcf0..a2e2498a4 100644 --- a/scripts/kalimdor/caverns_of_time/hyjal/hyjal.cpp +++ b/scripts/kalimdor/caverns_of_time/hyjal/hyjal.cpp @@ -83,7 +83,7 @@ bool GossipHello_npc_jaina_proudmoore(Player* pPlayer, Creature* pCreature) } } - pPlayer->SEND_GOSSIP_MENU(907, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(907, pCreature->GetObjectGuid()); return true; } @@ -155,7 +155,7 @@ bool GossipHello_npc_thrall(Player* pPlayer, Creature* pCreature) } } - pPlayer->SEND_GOSSIP_MENU(907, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(907, pCreature->GetObjectGuid()); return true; } @@ -196,7 +196,7 @@ bool GossipHello_npc_tyrande_whisperwind(Player* pPlayer, Creature* pCreature) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_TYRANDE, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF); } - pPlayer->SEND_GOSSIP_MENU(907, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(907, pCreature->GetObjectGuid()); return true; } diff --git a/scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.cpp b/scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.cpp index 808d8f4ee..7ed5e565d 100644 --- a/scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.cpp +++ b/scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.cpp @@ -65,7 +65,7 @@ enum bool GossipHello_npc_brazen(Player* pPlayer, Creature* pCreature) { pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_READY, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); return true; } @@ -74,7 +74,7 @@ bool GossipSelect_npc_brazen(Player* pPlayer, Creature* pCreature, uint32 uiSend if (uiAction == GOSSIP_ACTION_INFO_DEF+1) { if (!pPlayer->HasItemCount(ITEM_ENTRY_BOMBS, 1)) - pPlayer->SEND_GOSSIP_MENU(TEXT_ID_HAS_BOMBS, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(TEXT_ID_HAS_BOMBS, pCreature->GetObjectGuid()); else { pPlayer->CLOSE_GOSSIP_MENU(); @@ -98,7 +98,7 @@ enum bool GossipHello_npc_erozion(Player* pPlayer, Creature* pCreature) { if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); ScriptedInstance* pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); @@ -109,7 +109,7 @@ bool GossipHello_npc_erozion(Player* pPlayer, Creature* pCreature) /*if (!pPlayer->GetQuestRewardStatus(QUEST_ENTRY_RETURN) && pPlayer->GetQuestStatus(QUEST_ENTRY_RETURN) == QUEST_STATUS_COMPLETE) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "[PH] Teleport please, i'm tired.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2);*/ - pPlayer->SEND_GOSSIP_MENU(TEXT_ID_DEFAULT, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(TEXT_ID_DEFAULT, pCreature->GetObjectGuid()); return true; } @@ -121,7 +121,7 @@ bool GossipSelect_npc_erozion(Player* pPlayer, Creature* pCreature, uint32 uiSen if (Item* pItem = pPlayer->StoreNewItemInInventorySlot(ITEM_ENTRY_BOMBS, 1)) pPlayer->SendNewItem(pItem, 1, true, false); - pPlayer->SEND_GOSSIP_MENU(TEXT_ID_GOT_ITEM, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(TEXT_ID_GOT_ITEM, pCreature->GetObjectGuid()); } if (uiAction == GOSSIP_ACTION_INFO_DEF+2) @@ -624,8 +624,8 @@ bool GossipHello_npc_thrall_old_hillsbrad(Player* pPlayer, Creature* pCreature) { if (pCreature->isQuestGiver()) { - pPlayer->PrepareQuestMenu(pCreature->GetGUID()); - pPlayer->SendPreparedQuest(pCreature->GetGUID()); + pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); + pPlayer->SendPreparedQuest(pCreature->GetObjectGuid()); } if (instance_old_hillsbrad* pInstance = (instance_old_hillsbrad*)pCreature->GetInstanceData()) @@ -633,19 +633,19 @@ bool GossipHello_npc_thrall_old_hillsbrad(Player* pPlayer, Creature* pCreature) if (pInstance->GetData(TYPE_BARREL_DIVERSION) == DONE && !pInstance->GetData(TYPE_THRALL_EVENT)) { pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ID_UNKNOWN_TEXT, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - pPlayer->SEND_GOSSIP_MENU(TEXT_ID_START, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(TEXT_ID_START, pCreature->GetObjectGuid()); } if (pInstance->GetData(TYPE_THRALL_PART1) == DONE && !pInstance->GetData(TYPE_THRALL_PART2)) { pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_SKARLOC1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); - pPlayer->SEND_GOSSIP_MENU(TEXT_ID_SKARLOC1, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(TEXT_ID_SKARLOC1, pCreature->GetObjectGuid()); } if (pInstance->GetData(TYPE_THRALL_PART2) == DONE && !pInstance->GetData(TYPE_THRALL_PART3)) { pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_TARREN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3); - pPlayer->SEND_GOSSIP_MENU(TEXT_ID_TARREN, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(TEXT_ID_TARREN, pCreature->GetObjectGuid()); } } return true; @@ -674,12 +674,12 @@ bool GossipSelect_npc_thrall_old_hillsbrad(Player* pPlayer, Creature* pCreature, case GOSSIP_ACTION_INFO_DEF+2: { pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_SKARLOC2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+20); - pPlayer->SEND_GOSSIP_MENU(TEXT_ID_SKARLOC2, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(TEXT_ID_SKARLOC2, pCreature->GetObjectGuid()); break; } case GOSSIP_ACTION_INFO_DEF+20: { - pPlayer->SEND_GOSSIP_MENU(TEXT_ID_SKARLOC3, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(TEXT_ID_SKARLOC3, pCreature->GetObjectGuid()); pCreature->SummonCreature(NPC_SKARLOC_MOUNT, 2038.81f, 270.26f, 63.20f, 5.41f, TEMPSUMMON_TIMED_DESPAWN,12000); pInstance->SetData(TYPE_THRALL_PART2, IN_PROGRESS); @@ -830,7 +830,7 @@ bool GossipHello_npc_taretha(Player* pPlayer, Creature* pCreature) if (pInstance && pInstance->GetData(TYPE_THRALL_PART3) == DONE && pInstance->GetData(TYPE_THRALL_PART4) == NOT_STARTED) { pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_EPOCH1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - pPlayer->SEND_GOSSIP_MENU(TEXT_ID_EPOCH1, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(TEXT_ID_EPOCH1, pCreature->GetObjectGuid()); } return true; @@ -843,7 +843,7 @@ bool GossipSelect_npc_taretha(Player* pPlayer, Creature* pCreature, uint32 uiSen if (uiAction == GOSSIP_ACTION_INFO_DEF+1) { pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_EPOCH2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); - pPlayer->SEND_GOSSIP_MENU(TEXT_ID_EPOCH2, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(TEXT_ID_EPOCH2, pCreature->GetObjectGuid()); } if (uiAction == GOSSIP_ACTION_INFO_DEF+2) diff --git a/scripts/kalimdor/darkshore.cpp b/scripts/kalimdor/darkshore.cpp index e213fa8d7..eabd33712 100644 --- a/scripts/kalimdor/darkshore.cpp +++ b/scripts/kalimdor/darkshore.cpp @@ -360,7 +360,7 @@ bool GossipHello_npc_threshwackonator(Player* pPlayer, Creature* pCreature) if (pPlayer->GetQuestStatus(QUEST_GYROMAST_REV) == QUEST_STATUS_INCOMPLETE) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_INSERT_KEY, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); return true; } diff --git a/scripts/kalimdor/desolace.cpp b/scripts/kalimdor/desolace.cpp index e463a2d0d..f20611053 100644 --- a/scripts/kalimdor/desolace.cpp +++ b/scripts/kalimdor/desolace.cpp @@ -157,13 +157,13 @@ bool GossipHello_npc_aged_dying_ancient_kodo(Player* pPlayer, Creature* pCreatur if (pPlayer->HasAura(SPELL_KODO_KOMBO_PLAYER_BUFF) && pCreature->HasAura(SPELL_KODO_KOMBO_DESPAWN_BUFF)) { //the expected quest objective - pPlayer->TalkedToCreature(pCreature->GetEntry(), pCreature->GetGUID()); + pPlayer->TalkedToCreature(pCreature->GetEntry(), pCreature->GetObjectGuid()); pPlayer->RemoveAurasDueToSpell(SPELL_KODO_KOMBO_PLAYER_BUFF); pCreature->GetMotionMaster()->MoveIdle(); } - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); return true; } diff --git a/scripts/kalimdor/dustwallow_marsh.cpp b/scripts/kalimdor/dustwallow_marsh.cpp index c44f6c609..f0801bd0f 100644 --- a/scripts/kalimdor/dustwallow_marsh.cpp +++ b/scripts/kalimdor/dustwallow_marsh.cpp @@ -211,10 +211,10 @@ bool GossipHello_npc_deserter_agitator(Player* pPlayer, Creature* pCreature) if (pPlayer->GetQuestStatus(QUEST_TRAITORS_AMONG_US) == QUEST_STATUS_INCOMPLETE) { pCreature->setFaction(FACTION_THER_DESERTER); - pPlayer->TalkedToCreature(pCreature->GetEntry(), pCreature->GetGUID()); + pPlayer->TalkedToCreature(pCreature->GetEntry(), pCreature->GetObjectGuid()); } else - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); return true; } @@ -234,12 +234,12 @@ enum bool GossipHello_npc_lady_jaina_proudmoore(Player* pPlayer, Creature* pCreature) { if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); if (pPlayer->GetQuestStatus(QUEST_JAINAS_AUTOGRAPH) == QUEST_STATUS_INCOMPLETE) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_JAINA, GOSSIP_SENDER_MAIN, GOSSIP_SENDER_INFO); - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); return true; } @@ -248,7 +248,7 @@ bool GossipSelect_npc_lady_jaina_proudmoore(Player* pPlayer, Creature* pCreature { if (uiAction == GOSSIP_SENDER_INFO) { - pPlayer->SEND_GOSSIP_MENU(7012, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(7012, pCreature->GetObjectGuid()); pPlayer->CastSpell(pPlayer, SPELL_JAINAS_AUTOGRAPH, false); } return true; @@ -383,15 +383,15 @@ enum bool GossipHello_npc_nat_pagle(Player* pPlayer, Creature* pCreature) { if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); if (pCreature->isVendor() && pPlayer->GetQuestRewardStatus(QUEST_NATS_MEASURING_TAPE)) { pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_VENDOR, GOSSIP_TEXT_BROWSE_GOODS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE); - pPlayer->SEND_GOSSIP_MENU(7640, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(7640, pCreature->GetObjectGuid()); } else - pPlayer->SEND_GOSSIP_MENU(7638, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(7638, pCreature->GetObjectGuid()); return true; } @@ -399,7 +399,7 @@ bool GossipHello_npc_nat_pagle(Player* pPlayer, Creature* pCreature) bool GossipSelect_npc_nat_pagle(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) { if (uiAction == GOSSIP_ACTION_TRADE) - pPlayer->SEND_VENDORLIST(pCreature->GetGUID()); + pPlayer->SEND_VENDORLIST(pCreature->GetObjectGuid()); return true; } @@ -795,7 +795,7 @@ bool GossipHello_npc_cassa_crimsonwing(Player* pPlayer, Creature* pCreature) if (pPlayer->GetQuestStatus(QUEST_SURVEY_ALCAZ) == QUEST_STATUS_INCOMPLETE) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_RIDE, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); return true; } diff --git a/scripts/kalimdor/felwood.cpp b/scripts/kalimdor/felwood.cpp index 6b920bb33..842872768 100644 --- a/scripts/kalimdor/felwood.cpp +++ b/scripts/kalimdor/felwood.cpp @@ -141,7 +141,7 @@ bool GossipHello_npc_corrupt_saber(Player* pPlayer, Creature* pCreature) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_RELEASE, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); } - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); return true; } @@ -180,7 +180,7 @@ enum bool GossipHello_npcs_riverbreeze_and_silversky(Player* pPlayer, Creature* pCreature) { if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); switch (pCreature->GetEntry()) { @@ -188,21 +188,21 @@ bool GossipHello_npcs_riverbreeze_and_silversky(Player* pPlayer, Creature* pCrea if (pPlayer->GetQuestRewardStatus(QUEST_CLEANSING_FELWOOD_A)) { pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_BEACON, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - pPlayer->SEND_GOSSIP_MENU(2848, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(2848, pCreature->GetObjectGuid()); }else if (pPlayer->GetTeam() == HORDE) - pPlayer->SEND_GOSSIP_MENU(2845, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(2845, pCreature->GetObjectGuid()); else - pPlayer->SEND_GOSSIP_MENU(2844, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(2844, pCreature->GetObjectGuid()); break; case NPC_MAYBESS_RIVERBREEZE: if (pPlayer->GetQuestRewardStatus(QUEST_CLEANSING_FELWOOD_H)) { pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_BEACON, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - pPlayer->SEND_GOSSIP_MENU(2849, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(2849, pCreature->GetObjectGuid()); }else if (pPlayer->GetTeam() == ALLIANCE) - pPlayer->SEND_GOSSIP_MENU(2843, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(2843, pCreature->GetObjectGuid()); else - pPlayer->SEND_GOSSIP_MENU(2842, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(2842, pCreature->GetObjectGuid()); break; } diff --git a/scripts/kalimdor/feralas.cpp b/scripts/kalimdor/feralas.cpp index 57daaf415..0059f2b6a 100644 --- a/scripts/kalimdor/feralas.cpp +++ b/scripts/kalimdor/feralas.cpp @@ -31,12 +31,12 @@ EndScriptData */ bool GossipHello_npc_gregan_brewspewer(Player* pPlayer, Creature* pCreature) { if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); if (pCreature->isVendor() && pPlayer->GetQuestStatus(3909) == QUEST_STATUS_INCOMPLETE) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Buy somethin', will ya?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - pPlayer->SEND_GOSSIP_MENU(2433, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(2433, pCreature->GetObjectGuid()); return true; } @@ -45,10 +45,10 @@ bool GossipSelect_npc_gregan_brewspewer(Player* pPlayer, Creature* pCreature, ui if (uiAction == GOSSIP_ACTION_INFO_DEF+1) { pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_VENDOR, GOSSIP_TEXT_BROWSE_GOODS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE); - pPlayer->SEND_GOSSIP_MENU(2434, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(2434, pCreature->GetObjectGuid()); } if (uiAction == GOSSIP_ACTION_TRADE) - pPlayer->SEND_VENDORLIST(pCreature->GetGUID()); + pPlayer->SEND_VENDORLIST(pCreature->GetObjectGuid()); return true; } @@ -166,8 +166,8 @@ bool QuestAccept_npc_oox22fe(Player* pPlayer, Creature* pCreature, const Quest* bool GossipHello_npc_screecher_spirit(Player* pPlayer, Creature* pCreature) { - pPlayer->SEND_GOSSIP_MENU(2039, pCreature->GetGUID()); - pPlayer->TalkedToCreature(pCreature->GetEntry(), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(2039, pCreature->GetObjectGuid()); + pPlayer->TalkedToCreature(pCreature->GetEntry(), pCreature->GetObjectGuid()); pCreature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); return true; diff --git a/scripts/kalimdor/moonglade.cpp b/scripts/kalimdor/moonglade.cpp index 9bc114f48..9843af157 100644 --- a/scripts/kalimdor/moonglade.cpp +++ b/scripts/kalimdor/moonglade.cpp @@ -50,13 +50,13 @@ enum bool GossipHello_npc_bunthen_plainswind(Player* pPlayer, Creature* pCreature) { if (pPlayer->getClass() != CLASS_DRUID) - pPlayer->SEND_GOSSIP_MENU(4916, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(4916, pCreature->GetObjectGuid()); else if (pPlayer->GetTeam() != HORDE) { if (pPlayer->GetQuestStatus(QUEST_SEA_LION_ALLY) == QUEST_STATUS_INCOMPLETE) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_AQ_END, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); - pPlayer->SEND_GOSSIP_MENU(4917, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(4917, pCreature->GetObjectGuid()); } else if (pPlayer->getClass() == CLASS_DRUID && pPlayer->GetTeam() == HORDE) { @@ -65,7 +65,7 @@ bool GossipHello_npc_bunthen_plainswind(Player* pPlayer, Creature* pCreature) if (pPlayer->GetQuestStatus(QUEST_SEA_LION_HORDE) == QUEST_STATUS_INCOMPLETE) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_AQ_END, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); - pPlayer->SEND_GOSSIP_MENU(4918, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(4918, pCreature->GetObjectGuid()); } return true; } @@ -82,10 +82,10 @@ bool GossipSelect_npc_bunthen_plainswind(Player* pPlayer, Creature* pCreature, u break; case GOSSIP_ACTION_INFO_DEF + 2: - pPlayer->SEND_GOSSIP_MENU(5373, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(5373, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF + 3: - pPlayer->SEND_GOSSIP_MENU(5376, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(5376, pCreature->GetObjectGuid()); break; } return true; @@ -152,7 +152,7 @@ struct MANGOS_DLL_DECL npc_clintar_dw_spiritAI : public npc_escortAI break; case 49: DoScriptText(SAY_END, m_creature, pPlayer); - pPlayer->TalkedToCreature(m_creature->GetEntry(), m_creature->GetGUID()); + pPlayer->TalkedToCreature(m_creature->GetEntry(), m_creature->GetObjectGuid()); break; } } @@ -243,10 +243,10 @@ bool GossipHello_npc_great_bear_spirit(Player* pPlayer, Creature* pCreature) if (pPlayer->GetQuestStatus(5929) == QUEST_STATUS_INCOMPLETE || pPlayer->GetQuestStatus(5930) == QUEST_STATUS_INCOMPLETE) { pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_BEAR1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF); - pPlayer->SEND_GOSSIP_MENU(4719, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(4719, pCreature->GetObjectGuid()); } else - pPlayer->SEND_GOSSIP_MENU(4718, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(4718, pCreature->GetObjectGuid()); return true; } @@ -257,18 +257,18 @@ bool GossipSelect_npc_great_bear_spirit(Player* pPlayer, Creature* pCreature, ui { case GOSSIP_ACTION_INFO_DEF: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_BEAR2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); - pPlayer->SEND_GOSSIP_MENU(4721, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(4721, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF + 1: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_BEAR3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); - pPlayer->SEND_GOSSIP_MENU(4733, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(4733, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF + 2: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_BEAR4, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); - pPlayer->SEND_GOSSIP_MENU(4734, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(4734, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF + 3: - pPlayer->SEND_GOSSIP_MENU(4735, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(4735, pCreature->GetObjectGuid()); if (pPlayer->GetQuestStatus(5929)==QUEST_STATUS_INCOMPLETE) pPlayer->AreaExploredOrEventHappens(5929); if (pPlayer->GetQuestStatus(5930)==QUEST_STATUS_INCOMPLETE) @@ -288,13 +288,13 @@ bool GossipSelect_npc_great_bear_spirit(Player* pPlayer, Creature* pCreature, ui bool GossipHello_npc_silva_filnaveth(Player* pPlayer, Creature* pCreature) { if (pPlayer->getClass() != CLASS_DRUID) - pPlayer->SEND_GOSSIP_MENU(4913, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(4913, pCreature->GetObjectGuid()); else if (pPlayer->GetTeam() != ALLIANCE) { if (pPlayer->GetQuestStatus(QUEST_SEA_LION_HORDE) == QUEST_STATUS_INCOMPLETE) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_AQ_AGI, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); - pPlayer->SEND_GOSSIP_MENU(4915, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(4915, pCreature->GetObjectGuid()); } else if (pPlayer->getClass() == CLASS_DRUID && pPlayer->GetTeam() == ALLIANCE) { @@ -303,7 +303,7 @@ bool GossipHello_npc_silva_filnaveth(Player* pPlayer, Creature* pCreature) if (pPlayer->GetQuestStatus(QUEST_SEA_LION_ALLY) == QUEST_STATUS_INCOMPLETE) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_AQ_AGI, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); - pPlayer->SEND_GOSSIP_MENU(4914, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(4914, pCreature->GetObjectGuid()); } return true; } @@ -320,10 +320,10 @@ bool GossipSelect_npc_silva_filnaveth(Player* pPlayer, Creature* pCreature, uint break; case GOSSIP_ACTION_INFO_DEF + 2: - pPlayer->SEND_GOSSIP_MENU(5374, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(5374, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF + 3: - pPlayer->SEND_GOSSIP_MENU(5375, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(5375, pCreature->GetObjectGuid()); break; } return true; diff --git a/scripts/kalimdor/mulgore.cpp b/scripts/kalimdor/mulgore.cpp index 98dcb7648..4fb02b324 100644 --- a/scripts/kalimdor/mulgore.cpp +++ b/scripts/kalimdor/mulgore.cpp @@ -141,7 +141,7 @@ struct MANGOS_DLL_DECL npc_kyle_the_frenziedAI : public ScriptedAI break; case 3: if (Player* pPlayer = m_creature->GetMap()->GetPlayer(m_uiPlayerGUID)) - pPlayer->TalkedToCreature(m_creature->GetEntry(), m_creature->GetGUID()); + pPlayer->TalkedToCreature(m_creature->GetEntry(), m_creature->GetObjectGuid()); m_creature->UpdateEntry(NPC_KYLE_FRIENDLY); break; @@ -175,12 +175,12 @@ CreatureAI* GetAI_npc_kyle_the_frenzied(Creature* pCreature) bool GossipHello_npc_skorn_whitecloud(Player* pPlayer, Creature* pCreature) { if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); if (!pPlayer->GetQuestRewardStatus(770)) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Tell me a story, Skorn.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF); - pPlayer->SEND_GOSSIP_MENU(522, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(522, pCreature->GetObjectGuid()); return true; } @@ -188,7 +188,7 @@ bool GossipHello_npc_skorn_whitecloud(Player* pPlayer, Creature* pCreature) bool GossipSelect_npc_skorn_whitecloud(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) { if (uiAction == GOSSIP_ACTION_INFO_DEF) - pPlayer->SEND_GOSSIP_MENU(523, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(523, pCreature->GetObjectGuid()); return true; } diff --git a/scripts/kalimdor/orgrimmar.cpp b/scripts/kalimdor/orgrimmar.cpp index 434686a4a..b997476ca 100644 --- a/scripts/kalimdor/orgrimmar.cpp +++ b/scripts/kalimdor/orgrimmar.cpp @@ -38,12 +38,12 @@ EndContentData */ bool GossipHello_npc_neeru_fireblade(Player* pPlayer, Creature* pCreature) { if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); if (pPlayer->GetQuestStatus(QUEST_5727) == QUEST_STATUS_INCOMPLETE) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "You may speak frankly, Neeru...", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - pPlayer->SEND_GOSSIP_MENU(4513, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(4513, pCreature->GetObjectGuid()); return true; } @@ -53,7 +53,7 @@ bool GossipSelect_npc_neeru_fireblade(Player* pPlayer, Creature* pCreature, uint { case GOSSIP_ACTION_INFO_DEF+1: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "[PH] ...", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); - pPlayer->SEND_GOSSIP_MENU(4513, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(4513, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+2: pPlayer->CLOSE_GOSSIP_MENU(); @@ -204,12 +204,12 @@ CreatureAI* GetAI_npc_thrall_warchief(Creature* pCreature) bool GossipHello_npc_thrall_warchief(Player* pPlayer, Creature* pCreature) { if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); if (pPlayer->GetQuestStatus(QUEST_6566) == QUEST_STATUS_INCOMPLETE) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Please share your wisdom with me, Warchief.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); return true; } @@ -219,27 +219,27 @@ bool GossipSelect_npc_thrall_warchief(Player* pPlayer, Creature* pCreature, uint { case GOSSIP_ACTION_INFO_DEF+1: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "What discoveries?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); - pPlayer->SEND_GOSSIP_MENU(5733, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(5733, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+2: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Usurper?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3); - pPlayer->SEND_GOSSIP_MENU(5734, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(5734, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+3: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "With all due respect, Warchief - why not allow them to be destroyed? Does this not strengthen our position?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+4); - pPlayer->SEND_GOSSIP_MENU(5735, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(5735, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+4: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "I... I did not think of it that way, Warchief.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+5); - pPlayer->SEND_GOSSIP_MENU(5736, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(5736, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+5: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "I live only to serve, Warchief! My life is empty and meaningless without your guidance.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+6); - pPlayer->SEND_GOSSIP_MENU(5737, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(5737, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+6: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Of course, Warchief!", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+7); - pPlayer->SEND_GOSSIP_MENU(5738, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(5738, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+7: pPlayer->CLOSE_GOSSIP_MENU(); diff --git a/scripts/kalimdor/razorfen_downs/razorfen_downs.cpp b/scripts/kalimdor/razorfen_downs/razorfen_downs.cpp index 7248e5f85..4895f722d 100644 --- a/scripts/kalimdor/razorfen_downs/razorfen_downs.cpp +++ b/scripts/kalimdor/razorfen_downs/razorfen_downs.cpp @@ -52,7 +52,7 @@ bool GossipHello_npc_henry_stern (Player* pPlayer, Creature* pCreature) if (pPlayer->GetBaseSkillValue(SKILL_ALCHEMY) >= 180 && !pPlayer->HasSpell(SPELL_MIGHT_TROLLS_BLOOD_POTION)) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_POTION, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); return true; } @@ -61,12 +61,12 @@ bool GossipSelect_npc_henry_stern (Player* pPlayer, Creature* pCreature, uint32 if (uiAction == GOSSIP_ACTION_INFO_DEF + 1) { pCreature->CastSpell(pPlayer, SPELL_TEACHING_GOLDTHORN_TEA, true); - pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXT_TEA_ANSWER, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXT_TEA_ANSWER, pCreature->GetObjectGuid()); } if (uiAction == GOSSIP_ACTION_INFO_DEF + 2) { - pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXT_POTION_ANSWER, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXT_POTION_ANSWER, pCreature->GetObjectGuid()); pCreature->CastSpell(pPlayer, SPELL_TEACHING_MIGHTY_TROLLS_BLOOD_POTION, true); } diff --git a/scripts/kalimdor/silithus.cpp b/scripts/kalimdor/silithus.cpp index 906fab9e1..807d07dc7 100644 --- a/scripts/kalimdor/silithus.cpp +++ b/scripts/kalimdor/silithus.cpp @@ -58,13 +58,13 @@ enum bool GossipHello_npc_highlord_demitrian(Player* pPlayer, Creature* pCreature) { if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); if (pPlayer->GetQuestStatus(QUEST_EXAMINE_THE_VESSEL) == QUEST_STATUS_NONE && (pPlayer->HasItemCount(ITEM_BINDINGS_WINDSEEKER_LEFT,1,false) || pPlayer->HasItemCount(ITEM_BINDINGS_WINDSEEKER_RIGHT,1,false))) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_DEMITRIAN1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF); - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); return true; } @@ -75,30 +75,30 @@ bool GossipSelect_npc_highlord_demitrian(Player* pPlayer, Creature* pCreature, u { case GOSSIP_ACTION_INFO_DEF: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_DEMITRIAN2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_DEMITRIAN1, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_DEMITRIAN1, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+1: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_DEMITRIAN3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); - pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_DEMITRIAN2, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_DEMITRIAN2, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+2: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_DEMITRIAN4, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3); - pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_DEMITRIAN3, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_DEMITRIAN3, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+3: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_DEMITRIAN5, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+4); - pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_DEMITRIAN4, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_DEMITRIAN4, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+4: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_DEMITRIAN6, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+5); - pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_DEMITRIAN5, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_DEMITRIAN5, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+5: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_DEMITRIAN7, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+6); - pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_DEMITRIAN6, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_DEMITRIAN6, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+6: - pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_DEMITRIAN7, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_DEMITRIAN7, pCreature->GetObjectGuid()); if (Item* pItem = pPlayer->StoreNewItemInInventorySlot(ITEM_VESSEL_OF_REBIRTH, 1)) pPlayer->SendNewItem(pItem, 1, true, false); @@ -154,7 +154,7 @@ enum bool GossipHello_npcs_rutgar_and_frankal(Player* pPlayer, Creature* pCreature) { if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); if (pPlayer->GetQuestStatus(QUEST_DEAREST_NATALIA) == QUEST_STATUS_INCOMPLETE && pCreature->GetEntry() == NPC_RUTGAR && @@ -166,7 +166,7 @@ bool GossipHello_npcs_rutgar_and_frankal(Player* pPlayer, Creature* pCreature) pPlayer->GetReqKillOrCastCurrentCount(QUEST_DEAREST_NATALIA, TRIGGER_RUTGAR)) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_SEEK1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+9); - pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_RF, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_RF, pCreature->GetObjectGuid()); return true; } @@ -177,56 +177,56 @@ bool GossipSelect_npcs_rutgar_and_frankal(Player* pPlayer, Creature* pCreature, { case GOSSIP_ACTION_INFO_DEF: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_RUTGAR2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); - pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_RUTGAR1, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_RUTGAR1, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF + 1: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_RUTGAR3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); - pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_RUTGAR2, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_RUTGAR2, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF + 2: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_RUTGAR4, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); - pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_RUTGAR3, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_RUTGAR3, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF + 3: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_RUTGAR5, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4); - pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_RUTGAR4, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_RUTGAR4, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF + 4: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_RUTGAR6, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 5); - pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_RUTGAR5, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_RUTGAR5, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF + 5: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_RUTGAR7, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 6); - pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_RUTGAR6, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_RUTGAR6, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF + 6: - pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_RUTGAR7, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_RUTGAR7, pCreature->GetObjectGuid()); //'kill' our trigger to update quest status pPlayer->KilledMonsterCredit(TRIGGER_RUTGAR, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF + 9: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_FRANKAL11, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 11); - pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_FRANKAL1, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_FRANKAL1, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF + 10: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_FRANKAL12, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 11); - pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_FRANKAL2, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_FRANKAL2, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF + 11: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_FRANKAL13, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 12); - pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_FRANKAL3, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_FRANKAL3, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF + 12: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_FRANKAL14, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 13); - pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_FRANKAL4, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_FRANKAL4, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF + 13: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_FRANKAL15, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 14); - pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_FRANKAL5, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_FRANKAL5, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF + 14: - pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_FRANKAL6, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_FRANKAL6, pCreature->GetObjectGuid()); //'kill' our trigger to update quest status pPlayer->KilledMonsterCredit(TRIGGER_FRANKAL, pCreature->GetObjectGuid()); break; diff --git a/scripts/kalimdor/stonetalon_mountains.cpp b/scripts/kalimdor/stonetalon_mountains.cpp index 6bc25a769..e0e7530da 100644 --- a/scripts/kalimdor/stonetalon_mountains.cpp +++ b/scripts/kalimdor/stonetalon_mountains.cpp @@ -31,7 +31,7 @@ EndScriptData */ bool GossipHello_npc_braug_dimspirit(Player* pPlayer, Creature* pCreature) { if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); if (pPlayer->GetQuestStatus(6627) == QUEST_STATUS_INCOMPLETE) { @@ -41,10 +41,10 @@ bool GossipHello_npc_braug_dimspirit(Player* pPlayer, Creature* pCreature) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Alexstrasza", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Malygos", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - pPlayer->SEND_GOSSIP_MENU(5820, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(5820, pCreature->GetObjectGuid()); } else - pPlayer->SEND_GOSSIP_MENU(5819, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(5819, pCreature->GetObjectGuid()); return true; } diff --git a/scripts/kalimdor/tanaris.cpp b/scripts/kalimdor/tanaris.cpp index 2e976a70f..5328e53f9 100644 --- a/scripts/kalimdor/tanaris.cpp +++ b/scripts/kalimdor/tanaris.cpp @@ -217,12 +217,12 @@ CreatureAI* GetAI_npc_custodian_of_time(Creature* pCreature) bool GossipHello_npc_marin_noggenfogger(Player* pPlayer, Creature* pCreature) { if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); if (pCreature->isVendor() && pPlayer->GetQuestRewardStatus(2662)) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_VENDOR, GOSSIP_TEXT_BROWSE_GOODS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE); - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); return true; } @@ -230,7 +230,7 @@ bool GossipHello_npc_marin_noggenfogger(Player* pPlayer, Creature* pCreature) bool GossipSelect_npc_marin_noggenfogger(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) { if (uiAction == GOSSIP_ACTION_TRADE) - pPlayer->SEND_VENDORLIST(pCreature->GetGUID()); + pPlayer->SEND_VENDORLIST(pCreature->GetObjectGuid()); return true; } @@ -346,15 +346,15 @@ bool QuestAccept_npc_oox17tn(Player* pPlayer, Creature* pCreature, const Quest* bool GossipHello_npc_steward_of_time(Player* pPlayer, Creature* pCreature) { if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); if (pPlayer->GetQuestStatus(10279) == QUEST_STATUS_INCOMPLETE || pPlayer->GetQuestRewardStatus(10279)) { pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_FLIGHT, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); - pPlayer->SEND_GOSSIP_MENU(9978, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(9978, pCreature->GetObjectGuid()); } else - pPlayer->SEND_GOSSIP_MENU(9977, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(9977, pCreature->GetObjectGuid()); return true; } @@ -389,12 +389,12 @@ bool GossipSelect_npc_steward_of_time(Player* pPlayer, Creature* pCreature, uint bool GossipHello_npc_stone_watcher_of_norgannon(Player* pPlayer, Creature* pCreature) { if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); if (pPlayer->GetQuestStatus(2954) == QUEST_STATUS_INCOMPLETE) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_NORGANNON_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF); - pPlayer->SEND_GOSSIP_MENU(1674, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(1674, pCreature->GetObjectGuid()); return true; } @@ -405,23 +405,23 @@ bool GossipSelect_npc_stone_watcher_of_norgannon(Player* pPlayer, Creature* pCre { case GOSSIP_ACTION_INFO_DEF: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_NORGANNON_2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - pPlayer->SEND_GOSSIP_MENU(1675, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(1675, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+1: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_NORGANNON_3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); - pPlayer->SEND_GOSSIP_MENU(1676, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(1676, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+2: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_NORGANNON_4, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3); - pPlayer->SEND_GOSSIP_MENU(1677, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(1677, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+3: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_NORGANNON_5, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+4); - pPlayer->SEND_GOSSIP_MENU(1678, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(1678, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+4: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_NORGANNON_6, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+5); - pPlayer->SEND_GOSSIP_MENU(1679, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(1679, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+5: pPlayer->CLOSE_GOSSIP_MENU(); diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_cthun.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_cthun.cpp index 01c671630..934284f21 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/boss_cthun.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_cthun.cpp @@ -742,7 +742,7 @@ struct MANGOS_DLL_DECL cthunAI : public ScriptedAI //Set target in stomach m_mStomachMap[target->GetObjectGuid()] = true; target->InterruptNonMeleeSpells(false); - target->CastSpell(target, SPELL_MOUTH_TENTACLE, true, NULL, NULL, m_creature->GetGUID()); + target->CastSpell(target, SPELL_MOUTH_TENTACLE, true, NULL, NULL, m_creature->GetObjectGuid()); StomachEnterTarget = target->GetGUID(); StomachEnterVisTimer = 3800; } diff --git a/scripts/kalimdor/the_barrens.cpp b/scripts/kalimdor/the_barrens.cpp index fae317ab1..84e3d89fb 100644 --- a/scripts/kalimdor/the_barrens.cpp +++ b/scripts/kalimdor/the_barrens.cpp @@ -49,7 +49,7 @@ bool GossipHello_npc_beaten_corpse(Player* pPlayer, Creature* pCreature) pPlayer->GetQuestStatus(QUEST_LOST_IN_BATTLE) == QUEST_STATUS_COMPLETE) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT,"Examine corpse in detail...",GOSSIP_SENDER_MAIN,GOSSIP_ACTION_INFO_DEF+1); - pPlayer->SEND_GOSSIP_MENU(3557, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(3557, pCreature->GetObjectGuid()); return true; } @@ -57,8 +57,8 @@ bool GossipSelect_npc_beaten_corpse(Player* pPlayer, Creature* pCreature, uint32 { if (uiAction == GOSSIP_ACTION_INFO_DEF +1) { - pPlayer->SEND_GOSSIP_MENU(3558, pCreature->GetGUID()); - pPlayer->TalkedToCreature(pCreature->GetEntry(), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(3558, pCreature->GetObjectGuid()); + pPlayer->TalkedToCreature(pCreature->GetEntry(), pCreature->GetObjectGuid()); } return true; } @@ -170,12 +170,12 @@ bool QuestAccept_npc_gilthares(Player* pPlayer, Creature* pCreature, const Quest bool GossipHello_npc_sputtervalve(Player* pPlayer, Creature* pCreature) { if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); if (pPlayer->GetQuestStatus(6981) == QUEST_STATUS_INCOMPLETE) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT,"Can you tell me about this shard?",GOSSIP_SENDER_MAIN,GOSSIP_ACTION_INFO_DEF); - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); return true; } @@ -183,7 +183,7 @@ bool GossipSelect_npc_sputtervalve(Player* pPlayer, Creature* pCreature, uint32 { if (uiAction == GOSSIP_ACTION_INFO_DEF) { - pPlayer->SEND_GOSSIP_MENU(2013, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(2013, pCreature->GetObjectGuid()); pPlayer->AreaExploredOrEventHappens(6981); } return true; diff --git a/scripts/kalimdor/thousand_needles.cpp b/scripts/kalimdor/thousand_needles.cpp index 079a13e97..7b8105aef 100644 --- a/scripts/kalimdor/thousand_needles.cpp +++ b/scripts/kalimdor/thousand_needles.cpp @@ -352,7 +352,7 @@ bool GossipHello_npc_plucky_johnson(Player* pPlayer, Creature* pCreature) if (pPlayer->GetQuestStatus(QUEST_SCOOP) == QUEST_STATUS_INCOMPLETE) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_QUEST, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF); - pPlayer->SEND_GOSSIP_MENU(720, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(720, pCreature->GetObjectGuid()); return true; } @@ -360,7 +360,7 @@ bool GossipSelect_npc_plucky_johnson(Player* pPlayer, Creature* pCreature, uint3 { if (uiAction == GOSSIP_ACTION_INFO_DEF) { - pPlayer->SEND_GOSSIP_MENU(738, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(738, pCreature->GetObjectGuid()); pPlayer->AreaExploredOrEventHappens(QUEST_SCOOP); } diff --git a/scripts/kalimdor/thunder_bluff.cpp b/scripts/kalimdor/thunder_bluff.cpp index c4b515f3c..3a1ca986e 100644 --- a/scripts/kalimdor/thunder_bluff.cpp +++ b/scripts/kalimdor/thunder_bluff.cpp @@ -101,12 +101,12 @@ CreatureAI* GetAI_npc_cairne_bloodhoof(Creature* pCreature) bool GossipHello_npc_cairne_bloodhoof(Player* pPlayer, Creature* pCreature) { if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); if (pPlayer->GetQuestStatus(925) == QUEST_STATUS_INCOMPLETE) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "I know this is rather silly but a young ward who is a bit shy would like your hoofprint.", GOSSIP_SENDER_MAIN, GOSSIP_SENDER_INFO); - pPlayer->SEND_GOSSIP_MENU(7013, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(7013, pCreature->GetObjectGuid()); return true; } @@ -116,7 +116,7 @@ bool GossipSelect_npc_cairne_bloodhoof(Player* pPlayer, Creature* pCreature, uin if (uiAction == GOSSIP_SENDER_INFO) { pPlayer->CastSpell(pPlayer, 23123, false); - pPlayer->SEND_GOSSIP_MENU(7014, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(7014, pCreature->GetObjectGuid()); } return true; } diff --git a/scripts/kalimdor/wailing_caverns/wailing_caverns.cpp b/scripts/kalimdor/wailing_caverns/wailing_caverns.cpp index 6c68a5803..52f6f3820 100644 --- a/scripts/kalimdor/wailing_caverns/wailing_caverns.cpp +++ b/scripts/kalimdor/wailing_caverns/wailing_caverns.cpp @@ -445,7 +445,7 @@ bool GossipHello_npc_disciple_of_naralex(Player* pPlayer, Creature* pCreature) ScriptedInstance* m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); // Buff the players pCreature->CastSpell(pPlayer, SPELL_MARK, false); @@ -453,10 +453,10 @@ bool GossipHello_npc_disciple_of_naralex(Player* pPlayer, Creature* pCreature) if (m_pInstance && m_pInstance->GetData(TYPE_DISCIPLE) == SPECIAL) { pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_BEGIN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); - pPlayer->SEND_GOSSIP_MENU(TEXT_ID_DISCIPLE, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(TEXT_ID_DISCIPLE, pCreature->GetObjectGuid()); } else - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); return true; } diff --git a/scripts/kalimdor/winterspring.cpp b/scripts/kalimdor/winterspring.cpp index a83ef3220..cf07b0dc8 100644 --- a/scripts/kalimdor/winterspring.cpp +++ b/scripts/kalimdor/winterspring.cpp @@ -36,12 +36,12 @@ EndContentData */ bool GossipHello_npc_lorax(Player* pPlayer, Creature* pCreature) { if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); if (pPlayer->GetQuestStatus(5126) == QUEST_STATUS_INCOMPLETE) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Talk to me", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF); - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); return true; } @@ -52,23 +52,23 @@ bool GossipSelect_npc_lorax(Player* pPlayer, Creature* pCreature, uint32 uiSende { case GOSSIP_ACTION_INFO_DEF: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "What do you do here?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); - pPlayer->SEND_GOSSIP_MENU(3759, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(3759, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+1: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "I can help you", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); - pPlayer->SEND_GOSSIP_MENU(3760, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(3760, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+2: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "What deal?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); - pPlayer->SEND_GOSSIP_MENU(3761, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(3761, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+3: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Then what happened?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4); - pPlayer->SEND_GOSSIP_MENU(3762, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(3762, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+4: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "He is not safe, i'll make sure of that.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 5); - pPlayer->SEND_GOSSIP_MENU(3763, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(3763, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+5: pPlayer->CLOSE_GOSSIP_MENU(); @@ -85,12 +85,12 @@ bool GossipSelect_npc_lorax(Player* pPlayer, Creature* pCreature, uint32 uiSende bool GossipHello_npc_rivern_frostwind(Player* pPlayer, Creature* pCreature) { if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); if (pCreature->isVendor() && pPlayer->GetReputationRank(589) == REP_EXALTED) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_VENDOR, GOSSIP_TEXT_BROWSE_GOODS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE); - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); return true; } @@ -98,7 +98,7 @@ bool GossipHello_npc_rivern_frostwind(Player* pPlayer, Creature* pCreature) bool GossipSelect_npc_rivern_frostwind(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) { if (uiAction == GOSSIP_ACTION_TRADE) - pPlayer->SEND_VENDORLIST(pCreature->GetGUID()); + pPlayer->SEND_VENDORLIST(pCreature->GetObjectGuid()); return true; } @@ -110,14 +110,14 @@ bool GossipSelect_npc_rivern_frostwind(Player* pPlayer, Creature* pCreature, uin bool GossipHello_npc_witch_doctor_mauari(Player* pPlayer, Creature* pCreature) { if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); if (pPlayer->GetQuestRewardStatus(975)) { pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "I'd like you to make me a new Cache of Mau'ari please.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - pPlayer->SEND_GOSSIP_MENU(3377, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(3377, pCreature->GetObjectGuid()); }else - pPlayer->SEND_GOSSIP_MENU(3375, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(3375, pCreature->GetObjectGuid()); return true; } diff --git a/scripts/kalimdor/zulfarrak/zulfarrak.cpp b/scripts/kalimdor/zulfarrak/zulfarrak.cpp index f573d5c1c..08482a853 100644 --- a/scripts/kalimdor/zulfarrak/zulfarrak.cpp +++ b/scripts/kalimdor/zulfarrak/zulfarrak.cpp @@ -116,12 +116,12 @@ bool GossipHello_npc_sergeant_bly(Player* pPlayer, Creature* pCreature) /*if (m_pInstance->GetData(0) == DONE) {*/ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_BLY, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - pPlayer->SEND_GOSSIP_MENU(1517, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(1517, pCreature->GetObjectGuid()); /*} else if (m_pInstance->GetData(0) == IN_PROGRESS) - pPlayer->SEND_GOSSIP_MENU(1516, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(1516, pCreature->GetObjectGuid()); else - pPlayer->SEND_GOSSIP_MENU(1515, pCreature->GetGUID());*/ + pPlayer->SEND_GOSSIP_MENU(1515, pCreature->GetObjectGuid());*/ return true; } @@ -199,12 +199,12 @@ bool GossipHello_npc_weegli_blastfuse(Player* pPlayer, Creature* pCreature) /*if (m_pInstance->GetData(0) == DONE) { pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_WEEGLI, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - pPlayer->SEND_GOSSIP_MENU(1514, pCreature->GetGUID());//if event can proceed to end + pPlayer->SEND_GOSSIP_MENU(1514, pCreature->GetObjectGuid());//if event can proceed to end } else if (m_pInstance->GetData(0) == IN_PROGRESS) - pPlayer->SEND_GOSSIP_MENU(1513, pCreature->GetGUID());//if event are in progress + pPlayer->SEND_GOSSIP_MENU(1513, pCreature->GetObjectGuid());//if event are in progress else*/ - pPlayer->SEND_GOSSIP_MENU(1511, pCreature->GetGUID()); //if event not started + pPlayer->SEND_GOSSIP_MENU(1511, pCreature->GetObjectGuid()); //if event not started return true; } diff --git a/scripts/northrend/borean_tundra.cpp b/scripts/northrend/borean_tundra.cpp index a43140028..e6ea6d6b1 100644 --- a/scripts/northrend/borean_tundra.cpp +++ b/scripts/northrend/borean_tundra.cpp @@ -61,12 +61,12 @@ enum bool GossipHello_npc_fizzcrank_fullthrottle(Player* pPlayer, Creature* pCreature) { if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); if (pPlayer->GetQuestStatus(QUEST_THE_MECHAGNOMES) == QUEST_STATUS_INCOMPLETE) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_TELL_ME, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); return true; } @@ -76,38 +76,38 @@ bool GossipSelect_npc_fizzcrank_fullthrottle(Player* pPlayer, Creature* pCreatur { case GOSSIP_ACTION_INFO_DEF+1: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_GO_ON, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); - pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_FIZZCRANK1, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_FIZZCRANK1, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+2: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_GO_ON, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); - pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_FIZZCRANK2, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_FIZZCRANK2, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+3: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_GO_ON, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4); - pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_FIZZCRANK3, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_FIZZCRANK3, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+4: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_GO_ON, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 5); - pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_FIZZCRANK4, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_FIZZCRANK4, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+5: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_GO_ON, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 6); - pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_FIZZCRANK5, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_FIZZCRANK5, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+6: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_GO_ON, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 7); - pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_FIZZCRANK6, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_FIZZCRANK6, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+7: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_GO_ON, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 8); - pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_FIZZCRANK7, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_FIZZCRANK7, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+8: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_GO_ON, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 9); - pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_FIZZCRANK8, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_FIZZCRANK8, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+9: - pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_FIZZCRANK9, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_FIZZCRANK9, pCreature->GetObjectGuid()); pPlayer->AreaExploredOrEventHappens(QUEST_THE_MECHAGNOMES); break; } @@ -131,7 +131,7 @@ bool GossipHello_npc_iruk(Player* pPlayer, Creature* pCreature) if (pPlayer->GetQuestStatus(QUEST_SPIRITS_WATCH_OVER_US) == QUEST_STATUS_INCOMPLETE) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_IRUK, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); return true; } @@ -167,7 +167,7 @@ bool GossipHello_npc_kara_thricestar(Player* pPlayer, Creature* pCreature) if (pPlayer->GetQuestStatus(QUEST_CHECK_IN_WITH_BIXIE) == QUEST_STATUS_COMPLETE) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_THRICESTAR2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); return true; } @@ -547,7 +547,7 @@ enum bool GossipHello_npc_surristrasz(Player* pPlayer, Creature* pCreature) { if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); if (pCreature->isTaxi()) { @@ -555,7 +555,7 @@ bool GossipHello_npc_surristrasz(Player* pPlayer, Creature* pCreature) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_TAXI, GOSSIP_ITEM_FLIGHT, GOSSIP_SENDER_MAIN, GOSSIP_OPTION_TAXIVENDOR); } - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); return true; } @@ -589,7 +589,7 @@ enum bool GossipHello_npc_tiare(Player* pPlayer, Creature* pCreature) { pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_TELEPORT, GOSSIP_SENDER_MAIN, GOSSIP_OPTION_GOSSIP); - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); return true; } diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp index 0e68d3e9b..76236adaf 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp @@ -103,7 +103,7 @@ struct MANGOS_DLL_DECL npc_barrett_ramseyAI : public ScriptedAI bool GossipHello_npc_barrett_ramsey(Player* pPlayer, Creature* pCreature) { pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_START_EVENT1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); return true; } diff --git a/scripts/northrend/dalaran.cpp b/scripts/northrend/dalaran.cpp index a209effec..ef793f1f4 100644 --- a/scripts/northrend/dalaran.cpp +++ b/scripts/northrend/dalaran.cpp @@ -92,10 +92,10 @@ bool GossipHello_npc_zidormi(Player* pPlayer, Creature* pCreature) if (pPlayer->getLevel() >= 65) { pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_ZIDORMI1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); } else - pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_ZIDORMI1, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_ZIDORMI1, pCreature->GetObjectGuid()); return true; } diff --git a/scripts/northrend/dragonblight.cpp b/scripts/northrend/dragonblight.cpp index 61e613833..a69dbc673 100644 --- a/scripts/northrend/dragonblight.cpp +++ b/scripts/northrend/dragonblight.cpp @@ -47,12 +47,12 @@ enum bool GossipHello_npc_afrasastrasz(Player* pPlayer, Creature* pCreature) { if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_TAXI_MIDDLE_DOWN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_TAXI_MIDDLE_TOP, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); return true; } @@ -87,12 +87,12 @@ enum bool GossipHello_npc_alexstrasza_wr_gate(Player* pPlayer, Creature* pCreature) { if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); if (pPlayer->GetQuestRewardStatus(QUEST_RETURN_TO_AG_A) || pPlayer->GetQuestRewardStatus(QUEST_RETURN_TO_AG_H)) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_WHAT_HAPPENED, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); return true; } @@ -262,12 +262,12 @@ enum bool GossipHello_npc_tariolstrasz(Player* pPlayer, Creature* pCreature) { if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_TAXI_BOTTOM_TOP, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_TAXI_BOTTOM_MIDDLE, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); return true; } @@ -302,12 +302,12 @@ enum bool GossipHello_npc_torastrasza(Player* pPlayer, Creature* pCreature) { if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_TAXI_TOP_MIDDLE, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_TAXI_TOP_BOTTOM, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); return true; } diff --git a/scripts/northrend/howling_fjord.cpp b/scripts/northrend/howling_fjord.cpp index 24c31616c..864acec8f 100644 --- a/scripts/northrend/howling_fjord.cpp +++ b/scripts/northrend/howling_fjord.cpp @@ -271,15 +271,15 @@ enum bool GossipHello_npc_deathstalker_razael(Player* pPlayer, Creature* pCreature) { if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); if (pPlayer->GetQuestStatus(QUEST_REPORTS_FROM_THE_FIELD) == QUEST_STATUS_INCOMPLETE) { pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_DEATHSTALKER_RAZAEL, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_DEATHSTALKER_RAZAEL1, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_DEATHSTALKER_RAZAEL1, pCreature->GetObjectGuid()); } else - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); return true; } @@ -289,7 +289,7 @@ bool GossipSelect_npc_deathstalker_razael(Player* pPlayer, Creature* pCreature, switch(uiAction) { case GOSSIP_ACTION_INFO_DEF+1: - pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_DEATHSTALKER_RAZAEL2, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_DEATHSTALKER_RAZAEL2, pCreature->GetObjectGuid()); pCreature->CastSpell(pPlayer, SPELL_RAZAEL_KILL_CREDIT, true); break; } @@ -313,15 +313,15 @@ enum bool GossipHello_npc_dark_ranger_lyana(Player* pPlayer, Creature* pCreature) { if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); if (pPlayer->GetQuestStatus(QUEST_REPORTS_FROM_THE_FIELD) == QUEST_STATUS_INCOMPLETE) { pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_DARK_RANGER_LYANA, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_DARK_RANGER_LYANA1, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_DARK_RANGER_LYANA1, pCreature->GetObjectGuid()); } else - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); return true; } @@ -331,7 +331,7 @@ bool GossipSelect_npc_dark_ranger_lyana(Player* pPlayer, Creature* pCreature, ui switch(uiAction) { case GOSSIP_ACTION_INFO_DEF+1: - pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_DARK_RANGER_LYANA2, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_DARK_RANGER_LYANA2, pCreature->GetObjectGuid()); pCreature->CastSpell(pPlayer, SPELL_DARK_RANGER_LYANA_KILL_CREDIT, true); break; } @@ -357,7 +357,7 @@ enum bool GossipHello_npc_greer_orehammer(Player* pPlayer, Creature* pCreature) { if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); if (pPlayer->GetQuestStatus(QUEST_MISSION_PLAGUE_THIS) == QUEST_STATUS_INCOMPLETE) { @@ -370,7 +370,7 @@ bool GossipHello_npc_greer_orehammer(Player* pPlayer, Creature* pCreature) if (pCreature->isTaxi()) pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_TAXI, GOSSIP_ITEM_TAXI, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); return true; } @@ -383,7 +383,7 @@ bool GossipSelect_npc_greer_orehammer(Player* pPlayer, Creature* pCreature, uint if (Item* pItem = pPlayer->StoreNewItemInInventorySlot(ITEM_PRECISION_BOMBS, 10)) pPlayer->SendNewItem(pItem, 10, true, false); - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF + 2: pPlayer->CLOSE_GOSSIP_MENU(); @@ -520,7 +520,7 @@ CreatureAI* GetAI_npc_silvermoon_harry(Creature* pCreature) bool GossipHello_npc_silvermoon_harry(Player* pPlayer, Creature* pCreature) { if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); if (pCreature->isVendor()) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_VENDOR, GOSSIP_TEXT_BROWSE_GOODS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE); @@ -536,7 +536,7 @@ bool GossipHello_npc_silvermoon_harry(Player* pPlayer, Creature* pCreature) } } - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); return true; } @@ -546,7 +546,7 @@ bool GossipSelect_npc_silvermoon_harry(Player* pPlayer, Creature* pCreature, uin switch(uiAction) { case GOSSIP_ACTION_TRADE: - pPlayer->SEND_VENDORLIST(pCreature->GetGUID()); + pPlayer->SEND_VENDORLIST(pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+1: pPlayer->CLOSE_GOSSIP_MENU(); diff --git a/scripts/northrend/icecrown.cpp b/scripts/northrend/icecrown.cpp index f406333f9..28e48ca7e 100644 --- a/scripts/northrend/icecrown.cpp +++ b/scripts/northrend/icecrown.cpp @@ -41,14 +41,14 @@ bool GossipHello_npc_dame_evniki_kapsalis(Player* pPlayer, Creature* pCreature) if (pPlayer->HasTitle(TITLE_CRUSADER)) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_VENDOR, GOSSIP_TEXT_BROWSE_GOODS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE); - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); return true; } bool GossipSelect_npc_dame_evniki_kapsalis(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) { if (uiAction == GOSSIP_ACTION_TRADE) - pPlayer->SEND_VENDORLIST(pCreature->GetGUID()); + pPlayer->SEND_VENDORLIST(pCreature->GetObjectGuid()); return true; } diff --git a/scripts/northrend/naxxramas/boss_gothik.cpp b/scripts/northrend/naxxramas/boss_gothik.cpp index 0cf02502b..e71158232 100644 --- a/scripts/northrend/naxxramas/boss_gothik.cpp +++ b/scripts/northrend/naxxramas/boss_gothik.cpp @@ -201,9 +201,9 @@ struct MANGOS_DLL_DECL boss_gothikAI : public ScriptedAI // Wrong caster, it expected to be pSummoned. // Mangos deletes the spell event at caster death, so for delayed spell like this // it's just a workaround. Does not affect other than the visual though (+ spell takes longer to "travel") - case NPC_UNREL_TRAINEE: m_creature->CastSpell(pAnchor, SPELL_A_TO_ANCHOR_1, true, NULL, NULL, pSummoned->GetGUID()); break; - case NPC_UNREL_DEATH_KNIGHT: m_creature->CastSpell(pAnchor, SPELL_B_TO_ANCHOR_1, true, NULL, NULL, pSummoned->GetGUID()); break; - case NPC_UNREL_RIDER: m_creature->CastSpell(pAnchor, SPELL_C_TO_ANCHOR_1, true, NULL, NULL, pSummoned->GetGUID()); break; + case NPC_UNREL_TRAINEE: m_creature->CastSpell(pAnchor, SPELL_A_TO_ANCHOR_1, true, NULL, NULL, pSummoned->GetObjectGuid()); break; + case NPC_UNREL_DEATH_KNIGHT: m_creature->CastSpell(pAnchor, SPELL_B_TO_ANCHOR_1, true, NULL, NULL, pSummoned->GetObjectGuid()); break; + case NPC_UNREL_RIDER: m_creature->CastSpell(pAnchor, SPELL_C_TO_ANCHOR_1, true, NULL, NULL, pSummoned->GetObjectGuid()); break; } } } diff --git a/scripts/northrend/sholazar_basin.cpp b/scripts/northrend/sholazar_basin.cpp index 551d2e55b..f11d2ad32 100644 --- a/scripts/northrend/sholazar_basin.cpp +++ b/scripts/northrend/sholazar_basin.cpp @@ -302,7 +302,7 @@ bool GossipHello_npc_injured_rainspeaker(Player* pPlayer, Creature* pCreature) if (pPlayer->GetQuestStatus(QUEST_FORTUNATE_MISUNDERSTAND) == QUEST_STATUS_INCOMPLETE) { pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_READY, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF); - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); return true; } @@ -362,7 +362,7 @@ bool GossipHello_npc_mosswalker_victim(Player* pPlayer, Creature* pCreature) pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_PULSE, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF); } - pPlayer->SEND_GOSSIP_MENU(TEXT_ID_INJURED, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(TEXT_ID_INJURED, pCreature->GetObjectGuid()); return true; } @@ -431,16 +431,16 @@ enum bool GossipHello_npc_vekjik(Player* pPlayer, Creature* pCreature) { if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); if (pPlayer->GetQuestStatus(QUEST_MAKING_PEACE) == QUEST_STATUS_INCOMPLETE) { pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_VEKJIK_ITEM1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_VEKJIK1, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_VEKJIK1, pCreature->GetObjectGuid()); return true; } - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); return true; } @@ -450,7 +450,7 @@ bool GossipSelect_npc_vekjik(Player* pPlayer, Creature* pCreature, uint32 uiSend { case GOSSIP_ACTION_INFO_DEF+1: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_VEKJIK_ITEM2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); - pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_VEKJIK2, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_VEKJIK2, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+2: pPlayer->CLOSE_GOSSIP_MENU(); diff --git a/scripts/northrend/storm_peaks.cpp b/scripts/northrend/storm_peaks.cpp index e0109895c..03680e6f6 100644 --- a/scripts/northrend/storm_peaks.cpp +++ b/scripts/northrend/storm_peaks.cpp @@ -53,11 +53,11 @@ bool GossipHello_npc_frostborn_scout(Player* pPlayer, Creature* pCreature) if (pPlayer->GetQuestStatus(QUEST_MISSING_SCOUT) == QUEST_STATUS_INCOMPLETE) { pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_SCOUT_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_SCOUT_1, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_SCOUT_1, pCreature->GetObjectGuid()); return true; } - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); return true; } @@ -67,14 +67,14 @@ bool GossipSelect_npc_frostborn_scout(Player* pPlayer, Creature* pCreature, uint { case GOSSIP_ACTION_INFO_DEF+1: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_SCOUT_2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); - pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_SCOUT_2, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_SCOUT_2, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+2: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_SCOUT_3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); - pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_SCOUT_3, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_SCOUT_3, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+3: - pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_SCOUT_4, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_SCOUT_4, pCreature->GetObjectGuid()); pPlayer->AreaExploredOrEventHappens(QUEST_MISSING_SCOUT); break; } @@ -105,16 +105,16 @@ enum bool GossipHello_npc_loklira_the_crone(Player* pPlayer, Creature* pCreature) { if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); if (pPlayer->GetQuestStatus(QUEST_THE_HYLDSMEET) == QUEST_STATUS_INCOMPLETE) { pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_TELL_ME, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_LOKLIRA1, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_LOKLIRA1, pCreature->GetObjectGuid()); return true; } - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); return true; } @@ -124,18 +124,18 @@ bool GossipSelect_npc_loklira_the_crone(Player* pPlayer, Creature* pCreature, ui { case GOSSIP_ACTION_INFO_DEF+1: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_WHAT_HAPPENED, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); - pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_LOKLIRA2, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_LOKLIRA2, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+2: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_YOU_WANT_ME, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); - pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_LOKLIRA3, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_LOKLIRA3, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+3: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_VERY_WELL, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4); - pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_LOKLIRA4, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_LOKLIRA4, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+4: - pPlayer->TalkedToCreature(CREDIT_LOKLIRA, pCreature->GetGUID()); + pPlayer->TalkedToCreature(CREDIT_LOKLIRA, pCreature->GetObjectGuid()); pPlayer->CLOSE_GOSSIP_MENU(); break; } @@ -165,15 +165,15 @@ enum bool GossipHello_npc_thorim(Player* pPlayer, Creature* pCreature) { if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); if (pPlayer->GetQuestStatus(QUEST_SIBLING_RIVALRY) == QUEST_STATUS_INCOMPLETE) { pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_THORIM1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_THORIM1, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_THORIM1, pCreature->GetObjectGuid()); } else - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); return true; } @@ -184,14 +184,14 @@ bool GossipSelect_npc_thorim(Player* pPlayer, Creature* pCreature, uint32 uiSend { case GOSSIP_ACTION_INFO_DEF+1: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_THORIM2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); - pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_THORIM2, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_THORIM2, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+2: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_THORIM3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3); - pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_THORIM3, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_THORIM3, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+3: - pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_THORIM4, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_THORIM4, pCreature->GetObjectGuid()); pCreature->CastSpell(pPlayer, SPELL_THORIM_STORY_KILL_CREDIT, true); break; } @@ -226,7 +226,7 @@ bool GossipHello_npc_roxi_ramrocket(Player* pPlayer, Creature* pCreature) } } - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); return true; } @@ -235,10 +235,10 @@ bool GossipSelect_npc_roxi_ramrocket(Player* pPlayer, Creature* pCreature, uint3 switch(uiAction) { case GOSSIP_ACTION_TRAIN: - pPlayer->SEND_TRAINERLIST(pCreature->GetGUID()); + pPlayer->SEND_TRAINERLIST(pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_TRADE: - pPlayer->SEND_VENDORLIST(pCreature->GetGUID()); + pPlayer->SEND_VENDORLIST(pCreature->GetObjectGuid()); break; } diff --git a/scripts/northrend/ulduar/halls_of_lightning/boss_ionar.cpp b/scripts/northrend/ulduar/halls_of_lightning/boss_ionar.cpp index e16f84f99..bb3774976 100644 --- a/scripts/northrend/ulduar/halls_of_lightning/boss_ionar.cpp +++ b/scripts/northrend/ulduar/halls_of_lightning/boss_ionar.cpp @@ -276,7 +276,7 @@ struct MANGOS_DLL_DECL boss_ionarAI : public ScriptedAI if (m_uiBallLightning_Timer < uiDiff) { if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) - m_creature->CastSpell(pTarget->GetPositionX(), pTarget->GetPositionY(), pTarget->GetPositionZ(), m_bIsRegularMode ? SPELL_BALL_LIGHTNING_N : SPELL_BALL_LIGHTNING_H, false, NULL, NULL, m_creature->GetGUID()); + m_creature->CastSpell(pTarget->GetPositionX(), pTarget->GetPositionY(), pTarget->GetPositionZ(), m_bIsRegularMode ? SPELL_BALL_LIGHTNING_N : SPELL_BALL_LIGHTNING_H, false, NULL, NULL, m_creature->GetObjectGuid()); m_uiBallLightning_Timer = urand(10000, 11000); } else diff --git a/scripts/northrend/ulduar/halls_of_lightning/boss_volkhan.cpp b/scripts/northrend/ulduar/halls_of_lightning/boss_volkhan.cpp index 358d710f0..c1a0bb821 100644 --- a/scripts/northrend/ulduar/halls_of_lightning/boss_volkhan.cpp +++ b/scripts/northrend/ulduar/halls_of_lightning/boss_volkhan.cpp @@ -202,7 +202,7 @@ struct MANGOS_DLL_DECL boss_volkhanAI : public ScriptedAI pSummoned->AI()->AttackStart(pTarget); //why healing when just summoned? - pSummoned->CastSpell(pSummoned, m_bIsRegularMode ? SPELL_HEAT_N : SPELL_HEAT_H, false, NULL, NULL, m_creature->GetGUID()); + pSummoned->CastSpell(pSummoned, m_bIsRegularMode ? SPELL_HEAT_N : SPELL_HEAT_H, false, NULL, NULL, m_creature->GetObjectGuid()); } } diff --git a/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.cpp b/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.cpp index 9a0e5cb0f..1e0d8e4d3 100644 --- a/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.cpp +++ b/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.cpp @@ -148,13 +148,13 @@ struct MANGOS_DLL_DECL npc_brann_hosAI : public npc_escortAI bool GossipHello_npc_brann_hos(Player* pPlayer, Creature* pCreature) { if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); - pPlayer->SEND_GOSSIP_MENU(TEXT_ID_START, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(TEXT_ID_START, pCreature->GetObjectGuid()); pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_START, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); //pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_PROGRESS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); - //pPlayer->SEND_GOSSIP_MENU(TEXT_ID_PROGRESS, pCreature->GetGUID()); + //pPlayer->SEND_GOSSIP_MENU(TEXT_ID_PROGRESS, pCreature->GetObjectGuid()); return true; } diff --git a/scripts/northrend/violet_hold/violet_hold.cpp b/scripts/northrend/violet_hold/violet_hold.cpp index 452d8e428..432d317e1 100644 --- a/scripts/northrend/violet_hold/violet_hold.cpp +++ b/scripts/northrend/violet_hold/violet_hold.cpp @@ -132,7 +132,7 @@ CreatureAI* GetAI_npc_sinclari(Creature* pCreature) bool GossipHello_npc_sinclari(Player* pPlayer, Creature* pCreature) { pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_INTRO, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXT_ID_INTRO, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXT_ID_INTRO, pCreature->GetObjectGuid()); return true; } @@ -145,7 +145,7 @@ bool GossipSelect_npc_sinclari(Player* pPlayer, Creature* pCreature, uint32 uiSe if (pInstance->GetData(TYPE_MAIN) == NOT_STARTED) { pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_START, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); - pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXT_ID_START, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXT_ID_START, pCreature->GetObjectGuid()); } } else diff --git a/scripts/outland/black_temple/black_temple.cpp b/scripts/outland/black_temple/black_temple.cpp index 3fd733912..66739737d 100644 --- a/scripts/outland/black_temple/black_temple.cpp +++ b/scripts/outland/black_temple/black_temple.cpp @@ -42,7 +42,7 @@ bool GossipHello_npc_spirit_of_olum(Player* pPlayer, Creature* pCreature) if (pInstance && (pInstance->GetData(TYPE_SUPREMUS) >= DONE) && (pInstance->GetData(TYPE_NAJENTUS) >= DONE)) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_OLUM1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); return true; } diff --git a/scripts/outland/black_temple/boss_illidan.cpp b/scripts/outland/black_temple/boss_illidan.cpp index 87306209e..ee7c3a25e 100644 --- a/scripts/outland/black_temple/boss_illidan.cpp +++ b/scripts/outland/black_temple/boss_illidan.cpp @@ -1964,7 +1964,7 @@ bool GossipHello_npc_akama_at_illidan(Player* pPlayer, Creature* pCreature) { // TODO: Add gossip item only when Council is done? pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF); - pPlayer->SEND_GOSSIP_MENU(10465, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(10465, pCreature->GetObjectGuid()); return true; } diff --git a/scripts/outland/black_temple/boss_shade_of_akama.cpp b/scripts/outland/black_temple/boss_shade_of_akama.cpp index 254eac85c..f6e430321 100644 --- a/scripts/outland/black_temple/boss_shade_of_akama.cpp +++ b/scripts/outland/black_temple/boss_shade_of_akama.cpp @@ -702,7 +702,7 @@ bool GossipHello_npc_akama(Player* pPlayer, Creature* pCreature) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); } - pPlayer->SEND_GOSSIP_MENU(907, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(907, pCreature->GetObjectGuid()); return true; } diff --git a/scripts/outland/black_temple/illidari_council.cpp b/scripts/outland/black_temple/illidari_council.cpp index d4340357a..b711b4967 100644 --- a/scripts/outland/black_temple/illidari_council.cpp +++ b/scripts/outland/black_temple/illidari_council.cpp @@ -489,7 +489,7 @@ struct MANGOS_DLL_DECL boss_gathios_the_shattererAI : public boss_illidari_counc for(uint8 i = 0; i < 4; ++i) { if (Creature* pCouncil = m_creature->GetMap()->GetCreature(Council[i])) - pCouncil->CastSpell(pCouncil, spellid, true, NULL, NULL, m_creature->GetGUID()); + pCouncil->CastSpell(pCouncil, spellid, true, NULL, NULL, m_creature->GetObjectGuid()); } } diff --git a/scripts/outland/blades_edge_mountains.cpp b/scripts/outland/blades_edge_mountains.cpp index 38bff665e..fd3cd93ad 100644 --- a/scripts/outland/blades_edge_mountains.cpp +++ b/scripts/outland/blades_edge_mountains.cpp @@ -274,7 +274,7 @@ bool GossipHello_npc_overseer_nuaar(Player* pPlayer, Creature* pCreature) if (pPlayer->GetQuestStatus(10682) == QUEST_STATUS_INCOMPLETE) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Overseer, I am here to negotiate on behalf of the Cenarion Expedition.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - pPlayer->SEND_GOSSIP_MENU(10532, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(10532, pCreature->GetObjectGuid()); return true; } @@ -283,7 +283,7 @@ bool GossipSelect_npc_overseer_nuaar(Player* pPlayer, Creature* pCreature, uint3 { if (uiAction == GOSSIP_ACTION_INFO_DEF+1) { - pPlayer->SEND_GOSSIP_MENU(10533, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(10533, pCreature->GetObjectGuid()); pPlayer->AreaExploredOrEventHappens(10682); } return true; @@ -298,7 +298,7 @@ bool GossipHello_npc_saikkal_the_elder(Player* pPlayer, Creature* pCreature) if (pPlayer->GetQuestStatus(10980) == QUEST_STATUS_INCOMPLETE) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Yes... yes, it's me.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - pPlayer->SEND_GOSSIP_MENU(10794, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(10794, pCreature->GetObjectGuid()); return true; } @@ -309,11 +309,11 @@ bool GossipSelect_npc_saikkal_the_elder(Player* pPlayer, Creature* pCreature, ui { case GOSSIP_ACTION_INFO_DEF+1: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Yes elder. Tell me more of the book.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); - pPlayer->SEND_GOSSIP_MENU(10795, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(10795, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+2: - pPlayer->TalkedToCreature(pCreature->GetEntry(), pCreature->GetGUID()); - pPlayer->SEND_GOSSIP_MENU(10796, pCreature->GetGUID()); + pPlayer->TalkedToCreature(pCreature->GetEntry(), pCreature->GetObjectGuid()); + pPlayer->SEND_GOSSIP_MENU(10796, pCreature->GetObjectGuid()); break; } return true; @@ -328,12 +328,12 @@ bool GossipSelect_npc_saikkal_the_elder(Player* pPlayer, Creature* pCreature, ui bool GossipHello_npc_skyguard_handler_irena(Player* pPlayer, Creature* pCreature) { if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); if (pPlayer->GetReputationRank(1031) >= REP_HONORED) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SKYGUARD, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); return true; } diff --git a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_lady_vashj.cpp b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_lady_vashj.cpp index 5b82dd4be..563a3e9e9 100644 --- a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_lady_vashj.cpp +++ b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_lady_vashj.cpp @@ -513,7 +513,7 @@ struct MANGOS_DLL_DECL mob_enchanted_elementalAI : public ScriptedAI { //increase lady vashj damage if (pVashj->isAlive() && pVashj->isInCombat()) - m_creature->CastSpell(pVashj, SPELL_SURGE, false, 0, 0, pVashj->GetGUID()); + m_creature->CastSpell(pVashj, SPELL_SURGE, false, NULL, NULL, pVashj->GetObjectGuid()); else m_creature->SetDeathState(JUST_DIED); } diff --git a/scripts/outland/gruuls_lair/boss_gruul.cpp b/scripts/outland/gruuls_lair/boss_gruul.cpp index 3242fc264..7c5459c03 100644 --- a/scripts/outland/gruuls_lair/boss_gruul.cpp +++ b/scripts/outland/gruuls_lair/boss_gruul.cpp @@ -128,8 +128,8 @@ struct MANGOS_DLL_DECL boss_gruulAI : public ScriptedAI { switch(urand(0, 1)) { - case 0: pTarget->CastSpell(pTarget, SPELL_MAGNETIC_PULL, true, NULL, NULL, m_creature->GetGUID()); break; - case 1: pTarget->CastSpell(pTarget, SPELL_KNOCK_BACK, true, NULL, NULL, m_creature->GetGUID()); break; + case 0: pTarget->CastSpell(pTarget, SPELL_MAGNETIC_PULL, true, NULL, NULL, m_creature->GetObjectGuid()); break; + case 1: pTarget->CastSpell(pTarget, SPELL_KNOCK_BACK, true, NULL, NULL, m_creature->GetObjectGuid()); break; } } } diff --git a/scripts/outland/hellfire_citadel/blood_furnace/boss_broggok.cpp b/scripts/outland/hellfire_citadel/blood_furnace/boss_broggok.cpp index 4e5d4ec97..5cbb7b3e1 100644 --- a/scripts/outland/hellfire_citadel/blood_furnace/boss_broggok.cpp +++ b/scripts/outland/hellfire_citadel/blood_furnace/boss_broggok.cpp @@ -79,7 +79,7 @@ struct MANGOS_DLL_DECL boss_broggokAI : public ScriptedAI summoned->setFaction(16); summoned->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); summoned->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - summoned->CastSpell(summoned,SPELL_POISON,false,0,0,m_creature->GetGUID()); + summoned->CastSpell(summoned, SPELL_POISON, false, NULL, NULL, m_creature->GetObjectGuid()); } void JustDied(Unit *who) diff --git a/scripts/outland/hellfire_citadel/shattered_halls/boss_nethekurse.cpp b/scripts/outland/hellfire_citadel/shattered_halls/boss_nethekurse.cpp index d25edca25..0064af9d8 100644 --- a/scripts/outland/hellfire_citadel/shattered_halls/boss_nethekurse.cpp +++ b/scripts/outland/hellfire_citadel/shattered_halls/boss_nethekurse.cpp @@ -245,7 +245,7 @@ struct MANGOS_DLL_DECL boss_grand_warlock_nethekurseAI : public ScriptedAI // triggered spell of consumption does not properly show it's SpellVisual, wrong spellid? pSummoned->CastSpell(pSummoned, SPELL_TEMPORARY_VISUAL, true); - pSummoned->CastSpell(pSummoned, SPELL_CONSUMPTION, false, 0, 0, m_creature->GetGUID()); + pSummoned->CastSpell(pSummoned, SPELL_CONSUMPTION, false, NULL, NULL, m_creature->GetObjectGuid()); } void KilledUnit(Unit* pVictim) diff --git a/scripts/outland/hellfire_peninsula.cpp b/scripts/outland/hellfire_peninsula.cpp index e13cbdfff..adc49f47a 100644 --- a/scripts/outland/hellfire_peninsula.cpp +++ b/scripts/outland/hellfire_peninsula.cpp @@ -349,12 +349,12 @@ bool GossipHello_npc_demoniac_scryer(Player* pPlayer, Creature* pCreature) if (pPlayer->GetQuestStatus(QUEST_DEMONIAC) == QUEST_STATUS_INCOMPLETE) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_ATTUNE, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); - pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_ATTUNED, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_ATTUNED, pCreature->GetObjectGuid()); return true; } } - pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_PROTECT, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_PROTECT, pCreature->GetObjectGuid()); return true; } @@ -388,7 +388,7 @@ enum bool GossipHello_npc_gryphoneer_windbellow(Player* pPlayer, Creature* pCreature) { if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); //Mission: The Abyssal Shelf || Return to the Abyssal Shelf if (pPlayer->GetQuestStatus(QUEST_ABYSSAL_A) == QUEST_STATUS_INCOMPLETE || @@ -400,7 +400,7 @@ bool GossipHello_npc_gryphoneer_windbellow(Player* pPlayer, Creature* pCreature) pPlayer->GetQuestRewardStatus(QUEST_TO_THE_FRONT)) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM2_WIN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); return true; } @@ -435,17 +435,17 @@ enum bool GossipHello_npc_naladu(Player* pPlayer, Creature* pCreature) { if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_NALADU_ITEM1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); return true; } bool GossipSelect_npc_naladu(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) { if (uiAction == GOSSIP_ACTION_INFO_DEF+1) - pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_NALADU1, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_NALADU1, pCreature->GetObjectGuid()); return true; } @@ -467,7 +467,7 @@ enum bool GossipHello_npc_tracy_proudwell(Player* pPlayer, Creature* pCreature) { if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); if (pCreature->isVendor()) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_VENDOR, GOSSIP_TEXT_REDEEM_MARKS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE); @@ -475,7 +475,7 @@ bool GossipHello_npc_tracy_proudwell(Player* pPlayer, Creature* pCreature) if (pPlayer->GetQuestStatus(QUEST_DIGGING_FOR_PRAYER_BEADS) == QUEST_STATUS_INCOMPLETE) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TRACY_PROUDWELL_ITEM1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); return true; } @@ -485,13 +485,13 @@ bool GossipSelect_npc_tracy_proudwell(Player* pPlayer, Creature* pCreature, uint { case GOSSIP_ACTION_INFO_DEF+1: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TRACY_PROUDWELL_ITEM2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); - pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_TRACY_PROUDWELL1, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_TRACY_PROUDWELL1, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+2: - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_TRADE: - pPlayer->SEND_VENDORLIST(pCreature->GetGUID()); + pPlayer->SEND_VENDORLIST(pCreature->GetObjectGuid()); break; } @@ -516,11 +516,11 @@ enum bool GossipHello_npc_trollbane(Player* pPlayer, Creature* pCreature) { if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TROLLBANE_ITEM1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TROLLBANE_ITEM3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); return true; } @@ -530,13 +530,13 @@ bool GossipSelect_npc_trollbane(Player* pPlayer, Creature* pCreature, uint32 uiS { case GOSSIP_ACTION_INFO_DEF+1: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TROLLBANE_ITEM2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); - pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_TROLLBANE1, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_TROLLBANE1, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+2: - pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_TROLLBANE2, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_TROLLBANE2, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+3: - pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_TROLLBANE3, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_TROLLBANE3, pCreature->GetObjectGuid()); break; } @@ -561,7 +561,7 @@ enum bool GossipHello_npc_wing_commander_dabiree(Player* pPlayer, Creature* pCreature) { if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); //Mission: The Murketh and Shaadraz Gateways if (pPlayer->GetQuestStatus(QUEST_MISSION_GATEWAYS_A) == QUEST_STATUS_INCOMPLETE) @@ -572,7 +572,7 @@ bool GossipHello_npc_wing_commander_dabiree(Player* pPlayer, Creature* pCreature pPlayer->GetQuestRewardStatus(QUEST_SHATTER_POINT)) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM2_DAB, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); return true; } @@ -615,7 +615,7 @@ enum bool GossipHello_npc_wing_commander_brack(Player* pPlayer, Creature* pCreature) { if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); //Mission: The Murketh and Shaadraz Gateways if (pPlayer->GetQuestStatus(QUEST_MISSION_GATEWAYS_H) == QUEST_STATUS_INCOMPLETE) @@ -631,7 +631,7 @@ bool GossipHello_npc_wing_commander_brack(Player* pPlayer, Creature* pCreature) pPlayer->GetQuestRewardStatus(QUEST_SPINEBREAKER)) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM3_BRA, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3); - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); return true; } diff --git a/scripts/outland/nagrand.cpp b/scripts/outland/nagrand.cpp index 853e8f19b..488dcce6e 100644 --- a/scripts/outland/nagrand.cpp +++ b/scripts/outland/nagrand.cpp @@ -166,7 +166,7 @@ bool GossipHello_mob_lump(Player* pPlayer, Creature* pCreature) if (pPlayer->GetQuestStatus(QUEST_NOT_ON_MY_WATCH) == QUEST_STATUS_INCOMPLETE) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "I need answers, ogre!", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF); - pPlayer->SEND_GOSSIP_MENU(TEXT_ID_LUMP_1, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(TEXT_ID_LUMP_1, pCreature->GetObjectGuid()); return true; } @@ -177,19 +177,19 @@ bool GossipSelect_mob_lump(Player* pPlayer, Creature* pCreature, uint32 uiSender { case GOSSIP_ACTION_INFO_DEF: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Why are Boulderfist out this far? You know that this is Kurenai territory.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); - pPlayer->SEND_GOSSIP_MENU(TEXT_ID_LUMP_2, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(TEXT_ID_LUMP_2, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF + 1: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "And you think you can just eat anything you want? You're obviously trying to eat the Broken of Telaar.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); - pPlayer->SEND_GOSSIP_MENU(TEXT_ID_LUMP_3, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(TEXT_ID_LUMP_3, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF + 2: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "This means war, Lump! War I say!", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); - pPlayer->SEND_GOSSIP_MENU(TEXT_ID_LUMP_4, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(TEXT_ID_LUMP_4, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF + 3: - pPlayer->SEND_GOSSIP_MENU(TEXT_ID_LUMP_5, pCreature->GetGUID()); - pPlayer->TalkedToCreature(NPC_LUMPS_QUEST_CREDIT, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(TEXT_ID_LUMP_5, pCreature->GetObjectGuid()); + pPlayer->TalkedToCreature(NPC_LUMPS_QUEST_CREDIT, pCreature->GetObjectGuid()); break; } return true; @@ -210,7 +210,7 @@ enum bool GossipHello_npc_altruis_the_sufferer(Player* pPlayer, Creature* pCreature) { if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); //gossip before obtaining Survey the Land if (pPlayer->GetQuestStatus(QUEST_SURVEY) == QUEST_STATUS_NONE) @@ -224,7 +224,7 @@ bool GossipHello_npc_altruis_the_sufferer(Player* pPlayer, Creature* pCreature) if (pPlayer->GetQuestStatus(QUEST_PUPIL) == QUEST_STATUS_INCOMPLETE) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "[PH] Story about Illidan's Pupil", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+30); - pPlayer->SEND_GOSSIP_MENU(9419, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(9419, pCreature->GetObjectGuid()); return true; } @@ -234,27 +234,27 @@ bool GossipSelect_npc_altruis_the_sufferer(Player* pPlayer, Creature* pCreature, { case GOSSIP_ACTION_INFO_DEF+10: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Legion?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 11); - pPlayer->SEND_GOSSIP_MENU(9420, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(9420, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+11: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "And now?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 12); - pPlayer->SEND_GOSSIP_MENU(9421, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(9421, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+12: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "How do you see them now?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 13); - pPlayer->SEND_GOSSIP_MENU(9422, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(9422, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+13: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Forge camps?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 14); - pPlayer->SEND_GOSSIP_MENU(9423, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(9423, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+14: - pPlayer->SEND_GOSSIP_MENU(9424, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(9424, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+20: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Ok.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 21); - pPlayer->SEND_GOSSIP_MENU(9427, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(9427, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+21: pPlayer->CLOSE_GOSSIP_MENU(); @@ -263,7 +263,7 @@ bool GossipSelect_npc_altruis_the_sufferer(Player* pPlayer, Creature* pCreature, case GOSSIP_ACTION_INFO_DEF+30: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "[PH] Story done", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 31); - pPlayer->SEND_GOSSIP_MENU(384, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(384, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+31: pPlayer->CLOSE_GOSSIP_MENU(); @@ -291,21 +291,21 @@ bool QuestAccept_npc_altruis_the_sufferer(Player* pPlayer, Creature* pCreature, bool GossipHello_npc_greatmother_geyah(Player* pPlayer, Creature* pCreature) { if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); if (pPlayer->GetQuestStatus(10044) == QUEST_STATUS_INCOMPLETE) { pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Hello, Greatmother. Garrosh told me that you wanted to speak with me.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); } else if (pPlayer->GetQuestStatus(10172) == QUEST_STATUS_INCOMPLETE) { pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Garrosh is beyond redemption, Greatmother. I fear that in helping the Mag'har, I have convinced Garrosh that he is unfit to lead.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 10); - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); } else - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); return true; } @@ -316,27 +316,27 @@ bool GossipSelect_npc_greatmother_geyah(Player* pPlayer, Creature* pCreature, ui { case GOSSIP_ACTION_INFO_DEF + 1: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "You raised all of the orcs here, Greatmother?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF + 2: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Do you believe that?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF + 3: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "What can be done? I have tried many different things. I have done my best to help the people of Nagrand. Each time I have approached Garrosh, he has dismissed me.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4); - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF + 4: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Left? How can you choose to leave?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 5); - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF + 5: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "What is this duty?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 6); - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF + 6: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Is there anything I can do for you, Greatmother?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 7); - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF + 7: pPlayer->AreaExploredOrEventHappens(10044); @@ -345,23 +345,23 @@ bool GossipSelect_npc_greatmother_geyah(Player* pPlayer, Creature* pCreature, ui case GOSSIP_ACTION_INFO_DEF + 10: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "I have done all that I could, Greatmother. I thank you for your kind words.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 11); - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF + 11: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Greatmother, you are the mother of Durotan?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 12); - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF + 12: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Greatmother, I never had the honor. Durotan died long before my time, but his heroics are known to all on my world. The orcs of Azeroth reside in a place known as Durotar, named after your son. And ... (You take a moment to breathe and think through what you are about to tell the Greatmother.)", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 13); - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF + 13: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "It is my Warchief, Greatmother. The leader of my people. From my world. He ... He is the son of Durotan. He is your grandchild.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 14); - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF + 14: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "I will return to Azeroth at once, Greatmother.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 15); - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF + 15: pPlayer->AreaExploredOrEventHappens(10172); @@ -378,12 +378,12 @@ bool GossipSelect_npc_greatmother_geyah(Player* pPlayer, Creature* pCreature, ui bool GossipHello_npc_lantresor_of_the_blade(Player* pPlayer, Creature* pCreature) { if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); if (pPlayer->GetQuestStatus(10107) == QUEST_STATUS_INCOMPLETE || pPlayer->GetQuestStatus(10108) == QUEST_STATUS_INCOMPLETE) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "I have killed many of your ogres, Lantresor. I have no fear.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF); - pPlayer->SEND_GOSSIP_MENU(9361, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(9361, pCreature->GetObjectGuid()); return true; } @@ -394,34 +394,34 @@ bool GossipSelect_npc_lantresor_of_the_blade(Player* pPlayer, Creature* pCreatur { case GOSSIP_ACTION_INFO_DEF: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Should I know? You look like an orc to me.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); - pPlayer->SEND_GOSSIP_MENU(9362, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(9362, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+1: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "And the other half?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); - pPlayer->SEND_GOSSIP_MENU(9363, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(9363, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+2: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "I have heard of your kind, but I never thought to see the day when I would meet a half-breed.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); - pPlayer->SEND_GOSSIP_MENU(9364, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(9364, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+3: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "My apologies. I did not mean to offend. I am here on behalf of my people.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4); - pPlayer->SEND_GOSSIP_MENU(9365, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(9365, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+4: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "My people ask that you pull back your Boulderfist ogres and cease all attacks on our territories. In return, we will also pull back our forces.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 5); - pPlayer->SEND_GOSSIP_MENU(9366, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(9366, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+5: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "We will fight you until the end, then, Lantresor. We will not stand idly by as you pillage our towns and kill our people.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 6); - pPlayer->SEND_GOSSIP_MENU(9367, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(9367, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+6: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "What do I need to do?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 7); - pPlayer->SEND_GOSSIP_MENU(9368, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(9368, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+7: - pPlayer->SEND_GOSSIP_MENU(9369, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(9369, pCreature->GetObjectGuid()); if (pPlayer->GetQuestStatus(10107) == QUEST_STATUS_INCOMPLETE) pPlayer->AreaExploredOrEventHappens(10107); if (pPlayer->GetQuestStatus(10108) == QUEST_STATUS_INCOMPLETE) diff --git a/scripts/outland/netherstorm.cpp b/scripts/outland/netherstorm.cpp index 8b86470a0..7a757f82f 100644 --- a/scripts/outland/netherstorm.cpp +++ b/scripts/outland/netherstorm.cpp @@ -316,8 +316,8 @@ bool GOUse_go_manaforge_control_console(Player* pPlayer, GameObject* pGo) { if (pGo->GetGoType() == GAMEOBJECT_TYPE_QUESTGIVER) { - pPlayer->PrepareQuestMenu(pGo->GetGUID()); - pPlayer->SendPreparedQuest(pGo->GetGUID()); + pPlayer->PrepareQuestMenu(pGo->GetObjectGuid()); + pPlayer->SendPreparedQuest(pGo->GetObjectGuid()); } Creature* pManaforge = NULL; @@ -643,7 +643,7 @@ bool GossipHello_npc_protectorate_nether_drake(Player* pPlayer, Creature* pCreat if (pPlayer->GetQuestStatus(QUEST_NETHER_WINGS) == QUEST_STATUS_INCOMPLETE && pPlayer->HasItemCount(ITEM_PH_DISRUPTOR, 1)) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_FLY_ULTRIS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); return true; } @@ -672,13 +672,13 @@ enum bool GossipHello_npc_veronia(Player* pPlayer, Creature* pCreature) { if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); // Behind Enemy Lines if (pPlayer->GetQuestStatus(QUEST_BEHIND_ENEMY_LINES) && !pPlayer->GetQuestRewardStatus(QUEST_BEHIND_ENEMY_LINES)) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_FLY_CORUU, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF); - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); return true; } diff --git a/scripts/outland/shadowmoon_valley.cpp b/scripts/outland/shadowmoon_valley.cpp index 4ab733944..e224cbad0 100644 --- a/scripts/outland/shadowmoon_valley.cpp +++ b/scripts/outland/shadowmoon_valley.cpp @@ -462,7 +462,7 @@ bool GossipHello_npc_drake_dealer_hurlunk(Player* pPlayer, Creature* pCreature) if (pCreature->isVendor() && pPlayer->GetReputationRank(1015) == REP_EXALTED) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_VENDOR, GOSSIP_TEXT_BROWSE_GOODS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE); - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); return true; } @@ -470,7 +470,7 @@ bool GossipHello_npc_drake_dealer_hurlunk(Player* pPlayer, Creature* pCreature) bool GossipSelect_npc_drake_dealer_hurlunk(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) { if (uiAction == GOSSIP_ACTION_TRADE) - pPlayer->SEND_VENDORLIST(pCreature->GetGUID()); + pPlayer->SEND_VENDORLIST(pCreature->GetObjectGuid()); return true; } @@ -486,7 +486,7 @@ bool GossipHello_npcs_flanis_swiftwing_and_kagrosh(Player* pPlayer, Creature* pC if (pPlayer->GetQuestStatus(10601) == QUEST_STATUS_INCOMPLETE && !pPlayer->HasItemCount(30659,1,true)) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Take Kagrosh's Pack", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); return true; } @@ -521,7 +521,7 @@ bool GossipHello_npc_murkblood_overseer(Player* pPlayer, Creature* pCreature) if (pPlayer->GetQuestStatus(QUEST_11082) == QUEST_STATUS_INCOMPLETE) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "I am here for you, overseer.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - pPlayer->SEND_GOSSIP_MENU(10940, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(10940, pCreature->GetObjectGuid()); return true; } @@ -532,31 +532,31 @@ bool GossipSelect_npc_murkblood_overseer(Player* pPlayer, Creature* pCreature, u case GOSSIP_ACTION_INFO_DEF+1: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "How dare you question an overseer of the Dragonmaw!", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); //correct id not known - pPlayer->SEND_GOSSIP_MENU(10940, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(10940, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+2: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Who speaks of me? What are you talking about, broken?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3); //correct id not known - pPlayer->SEND_GOSSIP_MENU(10940, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(10940, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+3: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Continue please.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+4); //correct id not known - pPlayer->SEND_GOSSIP_MENU(10940, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(10940, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+4: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Who are these bidders?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+5); //correct id not known - pPlayer->SEND_GOSSIP_MENU(10940, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(10940, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+5: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Well... yes.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+6); //correct id not known - pPlayer->SEND_GOSSIP_MENU(10940, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(10940, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+6: //correct id not known - pPlayer->SEND_GOSSIP_MENU(10940, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(10940, pCreature->GetObjectGuid()); pCreature->CastSpell(pPlayer,41121,false); pPlayer->AreaExploredOrEventHappens(QUEST_11082); break; @@ -571,12 +571,12 @@ bool GossipSelect_npc_murkblood_overseer(Player* pPlayer, Creature* pCreature, u bool GossipHello_npc_neltharaku(Player* pPlayer, Creature* pCreature) { if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); if (pPlayer->GetQuestStatus(10814) == QUEST_STATUS_INCOMPLETE) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "I am listening, dragon", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - pPlayer->SEND_GOSSIP_MENU(10613, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(10613, pCreature->GetObjectGuid()); return true; } @@ -587,15 +587,15 @@ bool GossipSelect_npc_neltharaku(Player* pPlayer, Creature* pCreature, uint32 ui { case GOSSIP_ACTION_INFO_DEF+1: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "But you are dragons! How could orcs do this to you?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); - pPlayer->SEND_GOSSIP_MENU(10614, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(10614, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+2: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Your mate?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3); - pPlayer->SEND_GOSSIP_MENU(10615, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(10615, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+3: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "I have battled many beasts, dragon. I will help you.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+4); - pPlayer->SEND_GOSSIP_MENU(10616, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(10616, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+4: pPlayer->CLOSE_GOSSIP_MENU(); @@ -620,16 +620,16 @@ bool GossipSelect_npc_neltharaku(Player* pPlayer, Creature* pCreature, uint32 ui bool GossipHello_npc_oronok_tornheart(Player* pPlayer, Creature* pCreature) { if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); if (pCreature->isVendor()) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_VENDOR, GOSSIP_TEXT_BROWSE_GOODS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE); if (pPlayer->GetQuestStatus(10519) == QUEST_STATUS_INCOMPLETE) { pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ORONOK1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF); - pPlayer->SEND_GOSSIP_MENU(10312, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(10312, pCreature->GetObjectGuid()); }else - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); return true; } @@ -639,31 +639,31 @@ bool GossipSelect_npc_oronok_tornheart(Player* pPlayer, Creature* pCreature, uin switch(uiAction) { case GOSSIP_ACTION_TRADE: - pPlayer->SEND_VENDORLIST(pCreature->GetGUID()); + pPlayer->SEND_VENDORLIST(pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ORONOK2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - pPlayer->SEND_GOSSIP_MENU(10313, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(10313, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+1: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ORONOK3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); - pPlayer->SEND_GOSSIP_MENU(10314, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(10314, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+2: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ORONOK4, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3); - pPlayer->SEND_GOSSIP_MENU(10315, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(10315, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+3: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ORONOK5, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+4); - pPlayer->SEND_GOSSIP_MENU(10316, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(10316, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+4: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ORONOK6, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+5); - pPlayer->SEND_GOSSIP_MENU(10317, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(10317, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+5: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ORONOK7, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+6); - pPlayer->SEND_GOSSIP_MENU(10318, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(10318, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+6: pPlayer->CLOSE_GOSSIP_MENU(); diff --git a/scripts/outland/shattrath_city.cpp b/scripts/outland/shattrath_city.cpp index a9a7cb107..0465a89a7 100644 --- a/scripts/outland/shattrath_city.cpp +++ b/scripts/outland/shattrath_city.cpp @@ -230,12 +230,12 @@ struct MANGOS_DLL_DECL npc_dirty_larryAI : public ScriptedAI bool GossipHello_npc_dirty_larry(Player* pPlayer, Creature* pCreature) { if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); if (pPlayer->GetQuestStatus(QUEST_WHAT_BOOK) == QUEST_STATUS_INCOMPLETE) pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_BOOK, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); return true; } @@ -270,21 +270,21 @@ CreatureAI* GetAI_npc_dirty_larry(Creature* pCreature) bool GossipHello_npc_ishanah(Player* pPlayer, Creature* pCreature) { if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ISHANAH_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ISHANAH_2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); return true; } bool GossipSelect_npc_ishanah(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) { if (uiAction == GOSSIP_ACTION_INFO_DEF+1) - pPlayer->SEND_GOSSIP_MENU(9458, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(9458, pCreature->GetObjectGuid()); else if (uiAction == GOSSIP_ACTION_INFO_DEF+2) - pPlayer->SEND_GOSSIP_MENU(9459, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(9459, pCreature->GetObjectGuid()); return true; } @@ -308,12 +308,12 @@ enum bool GossipHello_npc_khadgar(Player* pPlayer, Creature* pCreature) { if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); if (pPlayer->GetQuestRewardStatus(QUEST_CITY_LIGHT)) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, KHADGAR_GOSSIP_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - pPlayer->SEND_GOSSIP_MENU(9243, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(9243, pCreature->GetObjectGuid()); return true; } @@ -323,31 +323,31 @@ bool GossipSelect_npc_khadgar(Player* pPlayer, Creature* pCreature, uint32 uiSen { case GOSSIP_ACTION_INFO_DEF+1: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, KHADGAR_GOSSIP_2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); - pPlayer->SEND_GOSSIP_MENU(9876, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(9876, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+2: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, KHADGAR_GOSSIP_3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3); - pPlayer->SEND_GOSSIP_MENU(9877, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(9877, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+3: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, KHADGAR_GOSSIP_4, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+4); - pPlayer->SEND_GOSSIP_MENU(9878, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(9878, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+4: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, KHADGAR_GOSSIP_5, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+5); - pPlayer->SEND_GOSSIP_MENU(9879, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(9879, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+5: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, KHADGAR_GOSSIP_3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+6); - pPlayer->SEND_GOSSIP_MENU(9880, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(9880, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+6: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, KHADGAR_GOSSIP_7, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+7); - pPlayer->SEND_GOSSIP_MENU(9881, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(9881, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+7: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, KHADGAR_GOSSIP_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - pPlayer->SEND_GOSSIP_MENU(9243, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(9243, pCreature->GetObjectGuid()); break; } return true; @@ -699,7 +699,7 @@ bool GossipHello_npc_raliq_the_drunk(Player* pPlayer, Creature* pCreature) if (pPlayer->GetQuestStatus(QUEST_CRACK_SKULLS) == QUEST_STATUS_INCOMPLETE) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_RALIQ, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - pPlayer->SEND_GOSSIP_MENU(9440, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(9440, pCreature->GetObjectGuid()); return true; } @@ -776,8 +776,8 @@ bool GossipHello_npc_salsalabim(Player* pPlayer, Creature* pCreature) else { if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetGUID()); - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); + pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); } return true; } @@ -801,11 +801,11 @@ bool GossipHello_npc_shattrathflaskvendors(Player* pPlayer, Creature* pCreature) if (pCreature->isVendor() && (pPlayer->GetReputationRank(932) == REP_EXALTED) && (pPlayer->GetReputationRank(935) == REP_EXALTED) && (pPlayer->GetReputationRank(942) == REP_EXALTED)) { pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_VENDOR, GOSSIP_TEXT_BROWSE_GOODS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE); - pPlayer->SEND_GOSSIP_MENU(11085, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(11085, pCreature->GetObjectGuid()); } else { - pPlayer->SEND_GOSSIP_MENU(11083, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(11083, pCreature->GetObjectGuid()); } } @@ -815,11 +815,11 @@ bool GossipHello_npc_shattrathflaskvendors(Player* pPlayer, Creature* pCreature) if (pCreature->isVendor() && (pPlayer->GetReputationRank(934) == REP_EXALTED) && (pPlayer->GetReputationRank(935) == REP_EXALTED) && (pPlayer->GetReputationRank(942) == REP_EXALTED)) { pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_VENDOR, GOSSIP_TEXT_BROWSE_GOODS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE); - pPlayer->SEND_GOSSIP_MENU(11085, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(11085, pCreature->GetObjectGuid()); } else { - pPlayer->SEND_GOSSIP_MENU(11084, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(11084, pCreature->GetObjectGuid()); } } @@ -829,7 +829,7 @@ bool GossipHello_npc_shattrathflaskvendors(Player* pPlayer, Creature* pCreature) bool GossipSelect_npc_shattrathflaskvendors(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) { if (uiAction == GOSSIP_ACTION_TRADE) - pPlayer->SEND_VENDORLIST(pCreature->GetGUID()); + pPlayer->SEND_VENDORLIST(pCreature->GetObjectGuid()); return true; } @@ -843,7 +843,7 @@ bool GossipHello_npc_zephyr(Player* pPlayer, Creature* pCreature) if (pPlayer->GetReputationRank(989) >= REP_REVERED) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Take me to the Caverns of Time.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); return true; } diff --git a/scripts/outland/tempest_keep/botanica/boss_warp_splinter.cpp b/scripts/outland/tempest_keep/botanica/boss_warp_splinter.cpp index 940517ae5..efe795dff 100644 --- a/scripts/outland/tempest_keep/botanica/boss_warp_splinter.cpp +++ b/scripts/outland/tempest_keep/botanica/boss_warp_splinter.cpp @@ -170,7 +170,7 @@ struct MANGOS_DLL_DECL boss_warp_splinterAI : public ScriptedAI { // 2) Heal Warp Splinter int32 CurrentHP_Treant = (int32)pTreant->GetHealth(); - m_creature->CastCustomSpell(m_creature,SPELL_HEAL_FATHER,&CurrentHP_Treant, 0, 0, true,0 ,0, m_creature->GetGUID()); + m_creature->CastCustomSpell(m_creature, SPELL_HEAL_FATHER, &CurrentHP_Treant, 0, 0, true, 0 ,0, m_creature->GetObjectGuid()); // 3) Kill Treant pTreant->DealDamage(pTreant, pTreant->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); diff --git a/scripts/outland/tempest_keep/the_eye/boss_kaelthas.cpp b/scripts/outland/tempest_keep/the_eye/boss_kaelthas.cpp index 25bb72ab9..c9c09c614 100644 --- a/scripts/outland/tempest_keep/the_eye/boss_kaelthas.cpp +++ b/scripts/outland/tempest_keep/the_eye/boss_kaelthas.cpp @@ -457,7 +457,7 @@ struct MANGOS_DLL_DECL boss_kaelthasAI : public ScriptedAI { if (pSummoned->GetEntry() == NPC_FLAME_STRIKE_TRIGGER) { - pSummoned->CastSpell(pSummoned, SPELL_FLAME_STRIKE_DUMMY, false, NULL, NULL, m_creature->GetGUID()); + pSummoned->CastSpell(pSummoned, SPELL_FLAME_STRIKE_DUMMY, false, NULL, NULL, m_creature->GetObjectGuid()); return; } @@ -960,8 +960,8 @@ struct MANGOS_DLL_DECL boss_kaelthasAI : public ScriptedAI m_creature->CastSpell(pUnit, SPELL_KNOCKBACK, true); //Gravity lapse - needs an exception in Spell system to work - pUnit->CastSpell(pUnit, SPELL_GRAVITY_LAPSE, true, 0, 0, m_creature->GetGUID()); - pUnit->CastSpell(pUnit, SPELL_GRAVITY_LAPSE_AURA, true, 0, 0, m_creature->GetGUID()); + pUnit->CastSpell(pUnit, SPELL_GRAVITY_LAPSE, true, NULL, NULL, m_creature->GetObjectGuid()); + pUnit->CastSpell(pUnit, SPELL_GRAVITY_LAPSE_AURA, true, NULL, NULL, m_creature->GetObjectGuid()); } } m_uiGravityLapse_Timer = 10000; diff --git a/scripts/outland/terokkar_forest.cpp b/scripts/outland/terokkar_forest.cpp index 7e99beb25..846c264d4 100644 --- a/scripts/outland/terokkar_forest.cpp +++ b/scripts/outland/terokkar_forest.cpp @@ -447,7 +447,7 @@ bool GossipHello_npc_floon(Player* pPlayer, Creature* pCreature) if (pPlayer->GetQuestStatus(QUEST_CRACK_SKULLS) == QUEST_STATUS_INCOMPLETE) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_FLOON1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF); - pPlayer->SEND_GOSSIP_MENU(9442, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(9442, pCreature->GetObjectGuid()); return true; } @@ -456,7 +456,7 @@ bool GossipSelect_npc_floon(Player* pPlayer, Creature* pCreature, uint32 uiSende if (uiAction == GOSSIP_ACTION_INFO_DEF) { pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_FLOON2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - pPlayer->SEND_GOSSIP_MENU(9443, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(9443, pCreature->GetObjectGuid()); } if (uiAction == GOSSIP_ACTION_INFO_DEF+1) { @@ -477,12 +477,12 @@ bool GossipSelect_npc_floon(Player* pPlayer, Creature* pCreature, uint32 uiSende bool GossipHello_npc_skyguard_handler_deesak(Player* pPlayer, Creature* pCreature) { if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); if (pPlayer->GetReputationRank(1031) >= REP_HONORED) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SKYGUARD, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); return true; } @@ -916,10 +916,10 @@ bool GossipHello_npc_slim(Player* pPlayer, Creature* pCreature) if (pCreature->isVendor() && pPlayer->GetReputationRank(FACTION_CONSORTIUM) >= REP_FRIENDLY) { pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_VENDOR, GOSSIP_TEXT_BROWSE_GOODS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE); - pPlayer->SEND_GOSSIP_MENU(9896, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(9896, pCreature->GetObjectGuid()); } else - pPlayer->SEND_GOSSIP_MENU(9895, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(9895, pCreature->GetObjectGuid()); return true; } @@ -927,7 +927,7 @@ bool GossipHello_npc_slim(Player* pPlayer, Creature* pCreature) bool GossipSelect_npc_slim(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) { if (uiAction == GOSSIP_ACTION_TRADE) - pPlayer->SEND_VENDORLIST(pCreature->GetGUID()); + pPlayer->SEND_VENDORLIST(pCreature->GetObjectGuid()); return true; } diff --git a/scripts/outland/zangarmarsh.cpp b/scripts/outland/zangarmarsh.cpp index c037ccc57..5866ac72c 100644 --- a/scripts/outland/zangarmarsh.cpp +++ b/scripts/outland/zangarmarsh.cpp @@ -54,7 +54,7 @@ bool GossipHello_npcs_ashyen_and_keleth(Player* pPlayer, Creature* pCreature) if (pCreature->GetEntry() == 17901) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_BLESS_KEL, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); } - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); return true; } @@ -107,7 +107,7 @@ bool GossipSelect_npcs_ashyen_and_keleth(Player* pPlayer, Creature* pCreature, u DoScriptText(SAY_REWARD_BLESS, pCreature, pPlayer); pPlayer->CLOSE_GOSSIP_MENU(); - pPlayer->TalkedToCreature(pCreature->GetEntry(), pCreature->GetGUID()); + pPlayer->TalkedToCreature(pCreature->GetEntry(), pCreature->GetObjectGuid()); } return true; } @@ -169,7 +169,7 @@ bool GossipHello_npc_cooshcoosh(Player* pPlayer, Creature* pCreature) if (pPlayer->GetQuestStatus(QUEST_CRACK_SKULLS) == QUEST_STATUS_INCOMPLETE) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_COOSH, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF); - pPlayer->SEND_GOSSIP_MENU(9441, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(9441, pCreature->GetObjectGuid()); return true; } @@ -197,7 +197,7 @@ bool GossipHello_npc_elder_kuruti(Player* pPlayer, Creature* pCreature) if (pPlayer->GetQuestStatus(9803) == QUEST_STATUS_INCOMPLETE) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KUR1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF); - pPlayer->SEND_GOSSIP_MENU(9226, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(9226, pCreature->GetObjectGuid()); return true; } @@ -208,11 +208,11 @@ bool GossipSelect_npc_elder_kuruti(Player* pPlayer, Creature* pCreature, uint32 { case GOSSIP_ACTION_INFO_DEF: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KUR2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); - pPlayer->SEND_GOSSIP_MENU(9227, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(9227, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF + 1: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KUR3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); - pPlayer->SEND_GOSSIP_MENU(9229, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(9229, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF + 2: { @@ -222,7 +222,7 @@ bool GossipSelect_npc_elder_kuruti(Player* pPlayer, Creature* pCreature, uint32 pPlayer->SendNewItem(pItem, 1, true, false); } - pPlayer->SEND_GOSSIP_MENU(9231, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(9231, pCreature->GetObjectGuid()); break; } } @@ -310,7 +310,7 @@ bool GossipHello_npc_mortog_steamhead(Player* pPlayer, Creature* pCreature) if (pCreature->isVendor() && pPlayer->GetReputationRank(942) == REP_EXALTED) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_VENDOR, GOSSIP_TEXT_BROWSE_GOODS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE); - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); return true; } @@ -319,7 +319,7 @@ bool GossipSelect_npc_mortog_steamhead(Player* pPlayer, Creature* pCreature, uin { if (uiAction == GOSSIP_ACTION_TRADE) { - pPlayer->SEND_VENDORLIST(pCreature->GetGUID()); + pPlayer->SEND_VENDORLIST(pCreature->GetObjectGuid()); } return true; } @@ -339,13 +339,13 @@ enum bool GossipHello_npc_timothy_daniels(Player* pPlayer, Creature* pCreature) { if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); if (pCreature->isVendor()) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_VENDOR, GOSSIP_TEXT_BROWSE_POISONS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE); pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TIMOTHY_DANIELS_ITEM1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); return true; } @@ -354,10 +354,10 @@ bool GossipSelect_npc_timothy_daniels(Player* pPlayer, Creature* pCreature, uint switch(uiAction) { case GOSSIP_ACTION_INFO_DEF+1: - pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_TIMOTHY_DANIELS1, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_TIMOTHY_DANIELS1, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_TRADE: - pPlayer->SEND_VENDORLIST(pCreature->GetGUID()); + pPlayer->SEND_VENDORLIST(pCreature->GetObjectGuid()); break; } diff --git a/scripts/world/npc_professions.cpp b/scripts/world/npc_professions.cpp index c7f9325d4..58998db1c 100644 --- a/scripts/world/npc_professions.cpp +++ b/scripts/world/npc_professions.cpp @@ -353,7 +353,7 @@ bool HasAlchemySpell(Player* pPlayer) bool GossipHello_npc_prof_alchemy(Player* pPlayer, Creature* pCreature) { if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); if (pCreature->isVendor()) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_VENDOR, GOSSIP_TEXT_BROWSE_GOODS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE); if (pCreature->isTrainer()) @@ -389,7 +389,7 @@ bool GossipHello_npc_prof_alchemy(Player* pPlayer, Creature* pCreature) } } - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); return true; } @@ -398,10 +398,10 @@ void SendActionMenu_npc_prof_alchemy(Player* pPlayer, Creature* pCreature, uint3 switch(uiAction) { case GOSSIP_ACTION_TRADE: - pPlayer->SEND_VENDORLIST(pCreature->GetGUID()); + pPlayer->SEND_VENDORLIST(pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_TRAIN: - pPlayer->SEND_TRAINERLIST(pCreature->GetGUID()); + pPlayer->SEND_TRAINERLIST(pCreature->GetObjectGuid()); break; //Learn Alchemy case GOSSIP_ACTION_INFO_DEF + 1: @@ -472,17 +472,17 @@ void SendConfirmLearn_npc_prof_alchemy(Player* pPlayer, Creature* pCreature, uin case 22427: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LEARN_TRANSMUTE, GOSSIP_SENDER_CHECK, uiAction); //unknown textID () - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); break; case 19052: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LEARN_ELIXIR, GOSSIP_SENDER_CHECK, uiAction); //unknown textID () - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); break; case 17909: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LEARN_POTION, GOSSIP_SENDER_CHECK, uiAction); //unknown textID () - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); break; } } @@ -498,17 +498,17 @@ void SendConfirmUnlearn_npc_prof_alchemy(Player* pPlayer, Creature* pCreature, u case 22427: //Zarevhi pPlayer->ADD_GOSSIP_ITEM_EXTENDED(0, GOSSIP_UNLEARN_TRANSMUTE, GOSSIP_SENDER_CHECK, uiAction, BOX_UNLEARN_ALCHEMY_SPEC, GetUnlearnCostHigh(pPlayer),false); //unknown textID () - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); break; case 19052: //Lorokeem pPlayer->ADD_GOSSIP_ITEM_EXTENDED(0, GOSSIP_UNLEARN_ELIXIR, GOSSIP_SENDER_CHECK, uiAction, BOX_UNLEARN_ALCHEMY_SPEC, GetUnlearnCostHigh(pPlayer),false); //unknown textID () - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); break; case 17909: //Lauranna Thar'well pPlayer->ADD_GOSSIP_ITEM_EXTENDED(0, GOSSIP_UNLEARN_POTION, GOSSIP_SENDER_CHECK, uiAction, BOX_UNLEARN_ALCHEMY_SPEC, GetUnlearnCostHigh(pPlayer),false); //unknown textID () - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); break; } } @@ -540,7 +540,7 @@ bool HasWeaponSub(Player* pPlayer) bool GossipHello_npc_prof_blacksmith(Player* pPlayer, Creature* pCreature) { if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); if (pCreature->isVendor()) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_VENDOR, GOSSIP_TEXT_BROWSE_GOODS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE); if (pCreature->isTrainer()) @@ -597,7 +597,7 @@ bool GossipHello_npc_prof_blacksmith(Player* pPlayer, Creature* pCreature) } } - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); return true; } @@ -606,10 +606,10 @@ void SendActionMenu_npc_prof_blacksmith(Player* pPlayer, Creature* pCreature, ui switch(uiAction) { case GOSSIP_ACTION_TRADE: - pPlayer->SEND_VENDORLIST(pCreature->GetGUID()); + pPlayer->SEND_VENDORLIST(pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_TRAIN: - pPlayer->SEND_TRAINERLIST(pCreature->GetGUID()); + pPlayer->SEND_TRAINERLIST(pCreature->GetObjectGuid()); break; //Learn Armor/Weapon case GOSSIP_ACTION_INFO_DEF + 1: @@ -633,7 +633,7 @@ void SendActionMenu_npc_prof_blacksmith(Player* pPlayer, Creature* pCreature, ui if (HasWeaponSub(pPlayer)) { //unknown textID (TALK_MUST_UNLEARN_WEAPON) - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); } else if (EquippedOk(pPlayer,S_UNLEARN_WEAPON)) { @@ -737,17 +737,17 @@ void SendConfirmLearn_npc_prof_blacksmith(Player* pPlayer, Creature* pCreature, case 11191: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LEARN_HAMMER, GOSSIP_SENDER_CHECK, uiAction); //unknown textID (TALK_HAMMER_LEARN) - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); break; case 11192: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LEARN_AXE, GOSSIP_SENDER_CHECK, uiAction); //unknown textID (TALK_AXE_LEARN) - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); break; case 11193: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LEARN_SWORD, GOSSIP_SENDER_CHECK, uiAction); //unknown textID (TALK_SWORD_LEARN) - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); break; } } @@ -766,23 +766,23 @@ void SendConfirmUnlearn_npc_prof_blacksmith(Player* pPlayer, Creature* pCreature case 11177: //Okothos Ironrager pPlayer->ADD_GOSSIP_ITEM_EXTENDED(0, GOSSIP_UNLEARN_SMITH_SPEC, GOSSIP_SENDER_CHECK, uiAction, BOX_UNLEARN_ARMORORWEAPON, GetUnlearnCostLow(pPlayer),false); //unknown textID (TALK_UNLEARN_AXEORWEAPON) - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); break; case 11191: pPlayer->ADD_GOSSIP_ITEM_EXTENDED(0, GOSSIP_UNLEARN_HAMMER, GOSSIP_SENDER_CHECK, uiAction, BOX_UNLEARN_WEAPON_SPEC, GetUnlearnCostMedium(pPlayer),false); //unknown textID (TALK_HAMMER_UNLEARN) - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); break; case 11192: pPlayer->ADD_GOSSIP_ITEM_EXTENDED(0, GOSSIP_UNLEARN_AXE, GOSSIP_SENDER_CHECK, uiAction, BOX_UNLEARN_WEAPON_SPEC, GetUnlearnCostMedium(pPlayer),false); //unknown textID (TALK_AXE_UNLEARN) - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); break; case 11193: pPlayer->ADD_GOSSIP_ITEM_EXTENDED(0, GOSSIP_UNLEARN_SWORD, GOSSIP_SENDER_CHECK, uiAction, BOX_UNLEARN_WEAPON_SPEC, GetUnlearnCostMedium(pPlayer),false); //unknown textID (TALK_SWORD_UNLEARN) - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); break; } } @@ -818,7 +818,7 @@ bool GossipSelect_npc_prof_blacksmith(Player* pPlayer, Creature* pCreature, uint bool GossipHello_npc_prof_leather(Player* pPlayer, Creature* pCreature) { if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); if (pCreature->isVendor()) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_VENDOR, GOSSIP_TEXT_BROWSE_GOODS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE); if (pCreature->isTrainer()) @@ -848,7 +848,7 @@ bool GossipHello_npc_prof_leather(Player* pPlayer, Creature* pCreature) } } - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); return true; } @@ -857,10 +857,10 @@ void SendActionMenu_npc_prof_leather(Player* pPlayer, Creature* pCreature, uint3 switch(uiAction) { case GOSSIP_ACTION_TRADE: - pPlayer->SEND_VENDORLIST(pCreature->GetGUID()); + pPlayer->SEND_VENDORLIST(pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_TRAIN: - pPlayer->SEND_TRAINERLIST(pCreature->GetGUID()); + pPlayer->SEND_TRAINERLIST(pCreature->GetObjectGuid()); break; //Unlearn Leather case GOSSIP_ACTION_INFO_DEF + 1: @@ -919,19 +919,19 @@ void SendConfirmUnlearn_npc_prof_leather(Player* pPlayer, Creature* pCreature, u case 7867: //Thorkaf Dragoneye pPlayer->ADD_GOSSIP_ITEM_EXTENDED(0, GOSSIP_UNLEARN_DRAGON, GOSSIP_SENDER_CHECK, uiAction, BOX_UNLEARN_LEATHER_SPEC, GetUnlearnCostMedium(pPlayer),false); //unknown textID () - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); break; case 7868: //Sarah Tanner case 7869: //Brumn Winterhoof pPlayer->ADD_GOSSIP_ITEM_EXTENDED(0, GOSSIP_UNLEARN_ELEMENTAL, GOSSIP_SENDER_CHECK, uiAction, BOX_UNLEARN_LEATHER_SPEC, GetUnlearnCostMedium(pPlayer),false); //unknown textID () - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); break; case 7870: //Caryssia Moonhunter case 7871: //Se'Jib pPlayer->ADD_GOSSIP_ITEM_EXTENDED(0, GOSSIP_UNLEARN_TRIBAL, GOSSIP_SENDER_CHECK, uiAction, BOX_UNLEARN_LEATHER_SPEC, GetUnlearnCostMedium(pPlayer),false); //unknown textID () - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); break; } } @@ -962,7 +962,7 @@ bool HasTailorSpell(Player* pPlayer) bool GossipHello_npc_prof_tailor(Player* pPlayer, Creature* pCreature) { if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); if (pCreature->isVendor()) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_VENDOR, GOSSIP_TEXT_BROWSE_GOODS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE); if (pCreature->isTrainer()) @@ -998,7 +998,7 @@ bool GossipHello_npc_prof_tailor(Player* pPlayer, Creature* pCreature) } } - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); return true; } @@ -1007,10 +1007,10 @@ void SendActionMenu_npc_prof_tailor(Player* pPlayer, Creature* pCreature, uint32 switch(uiAction) { case GOSSIP_ACTION_TRADE: - pPlayer->SEND_VENDORLIST(pCreature->GetGUID()); + pPlayer->SEND_VENDORLIST(pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_TRAIN: - pPlayer->SEND_TRAINERLIST(pCreature->GetGUID()); + pPlayer->SEND_TRAINERLIST(pCreature->GetObjectGuid()); break; //Learn Tailor case GOSSIP_ACTION_INFO_DEF + 1: @@ -1096,17 +1096,17 @@ void SendConfirmLearn_npc_prof_tailor(Player* pPlayer, Creature* pCreature, uint case 22213: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LEARN_SPELLFIRE, GOSSIP_SENDER_CHECK, uiAction); //unknown textID () - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); break; case 22208: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LEARN_MOONCLOTH, GOSSIP_SENDER_CHECK, uiAction); //unknown textID () - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); break; case 22212: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LEARN_SHADOWEAVE, GOSSIP_SENDER_CHECK, uiAction); //unknown textID () - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); break; } } @@ -1122,17 +1122,17 @@ void SendConfirmUnlearn_npc_prof_tailor(Player* pPlayer, Creature* pCreature, ui case 22213: //Gidge Spellweaver pPlayer->ADD_GOSSIP_ITEM_EXTENDED(0, GOSSIP_UNLEARN_SPELLFIRE, GOSSIP_SENDER_CHECK, uiAction, BOX_UNLEARN_TAILOR_SPEC, GetUnlearnCostHigh(pPlayer),false); //unknown textID () - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); break; case 22208: //Nasmara Moonsong pPlayer->ADD_GOSSIP_ITEM_EXTENDED(0, GOSSIP_UNLEARN_MOONCLOTH, GOSSIP_SENDER_CHECK, uiAction, BOX_UNLEARN_TAILOR_SPEC, GetUnlearnCostHigh(pPlayer),false); //unknown textID () - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); break; case 22212: //Andrion Darkspinner pPlayer->ADD_GOSSIP_ITEM_EXTENDED(0, GOSSIP_UNLEARN_SHADOWEAVE, GOSSIP_SENDER_CHECK, uiAction,BOX_UNLEARN_TAILOR_SPEC, GetUnlearnCostHigh(pPlayer),false); //unknown textID () - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); break; } } diff --git a/scripts/world/npcs_special.cpp b/scripts/world/npcs_special.cpp index f802a3d0f..79dd0f11b 100644 --- a/scripts/world/npcs_special.cpp +++ b/scripts/world/npcs_special.cpp @@ -962,7 +962,7 @@ struct MANGOS_DLL_DECL npc_garments_of_questsAI : public npc_escortAI //give quest credit, not expect any special quest objectives if (bCanRun) - ((Player*)pCaster)->TalkedToCreature(m_creature->GetEntry(),m_creature->GetGUID()); + ((Player*)pCaster)->TalkedToCreature(m_creature->GetEntry(), m_creature->GetObjectGuid()); } } } @@ -1075,7 +1075,7 @@ bool GossipHello_npc_innkeeper(Player* pPlayer, Creature* pCreature) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_WHAT_TO_DO, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); } - pPlayer->TalkedToCreature(pCreature->GetEntry(), pCreature->GetGUID()); + pPlayer->TalkedToCreature(pCreature->GetEntry(), pCreature->GetObjectGuid()); pPlayer->SendPreparedGossip(pCreature); return true; } @@ -1085,18 +1085,18 @@ bool GossipSelect_npc_innkeeper(Player* pPlayer, Creature* pCreature, uint32 uiS switch(uiAction) { case GOSSIP_ACTION_INFO_DEF+1: - pPlayer->SEND_GOSSIP_MENU(TEXT_ID_WHAT_TO_DO, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(TEXT_ID_WHAT_TO_DO, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+2: pPlayer->CLOSE_GOSSIP_MENU(); pCreature->CastSpell(pPlayer, SPELL_TRICK_OR_TREAT, true); break; case GOSSIP_OPTION_VENDOR: - pPlayer->SEND_VENDORLIST(pCreature->GetGUID()); + pPlayer->SEND_VENDORLIST(pCreature->GetObjectGuid()); break; case GOSSIP_OPTION_INNKEEPER: pPlayer->CLOSE_GOSSIP_MENU(); - pPlayer->SetBindPoint(pCreature->GetGUID()); + pPlayer->SetBindPoint(pCreature->GetObjectGuid()); break; } @@ -1121,13 +1121,13 @@ enum bool GossipHello_npc_kingdom_of_dalaran_quests(Player* pPlayer, Creature* pCreature) { if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); if (pPlayer->HasItemCount(ITEM_KT_SIGNET,1) && (!pPlayer->GetQuestRewardStatus(QUEST_MAGICAL_KINGDOM_A) || !pPlayer->GetQuestRewardStatus(QUEST_MAGICAL_KINGDOM_H) || !pPlayer->GetQuestRewardStatus(QUEST_MAGICAL_KINGDOM_N))) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_TELEPORT_TO, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); return true; } @@ -1161,7 +1161,7 @@ bool GossipHello_npc_lunaclaw_spirit(Player* pPlayer, Creature* pCreature) if (pPlayer->GetQuestStatus(QUEST_BODY_HEART_A) == QUEST_STATUS_INCOMPLETE || pPlayer->GetQuestStatus(QUEST_BODY_HEART_H) == QUEST_STATUS_INCOMPLETE) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_GRANT, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - pPlayer->SEND_GOSSIP_MENU(TEXT_ID_DEFAULT, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(TEXT_ID_DEFAULT, pCreature->GetObjectGuid()); return true; } @@ -1169,7 +1169,7 @@ bool GossipSelect_npc_lunaclaw_spirit(Player* pPlayer, Creature* pCreature, uint { if (uiAction == GOSSIP_ACTION_INFO_DEF+1) { - pPlayer->SEND_GOSSIP_MENU(TEXT_ID_PROGRESS, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(TEXT_ID_PROGRESS, pCreature->GetObjectGuid()); pPlayer->AreaExploredOrEventHappens((pPlayer->GetTeam() == ALLIANCE) ? QUEST_BODY_HEART_A : QUEST_BODY_HEART_H); } return true; @@ -1182,7 +1182,7 @@ bool GossipSelect_npc_lunaclaw_spirit(Player* pPlayer, Creature* pCreature, uint bool GossipHello_npc_mount_vendor(Player* pPlayer, Creature* pCreature) { if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); bool canBuy; canBuy = false; @@ -1196,52 +1196,52 @@ bool GossipHello_npc_mount_vendor(Player* pPlayer, Creature* pCreature) case 2357: //Merideth Carlson case 4885: //Gregor MacVince if (pPlayer->GetReputationRank(72) != REP_EXALTED && race != RACE_HUMAN) - pPlayer->SEND_GOSSIP_MENU(5855, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(5855, pCreature->GetObjectGuid()); else canBuy = true; break; case 1261: //Veron Amberstill if (pPlayer->GetReputationRank(47) != REP_EXALTED && race != RACE_DWARF) - pPlayer->SEND_GOSSIP_MENU(5856, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(5856, pCreature->GetObjectGuid()); else canBuy = true; break; case 3362: //Ogunaro Wolfrunner if (pPlayer->GetReputationRank(76) != REP_EXALTED && race != RACE_ORC) - pPlayer->SEND_GOSSIP_MENU(5841, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(5841, pCreature->GetObjectGuid()); else canBuy = true; break; case 3685: //Harb Clawhoof if (pPlayer->GetReputationRank(81) != REP_EXALTED && race != RACE_TAUREN) - pPlayer->SEND_GOSSIP_MENU(5843, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(5843, pCreature->GetObjectGuid()); else canBuy = true; break; case 4730: //Lelanai if (pPlayer->GetReputationRank(69) != REP_EXALTED && race != RACE_NIGHTELF) - pPlayer->SEND_GOSSIP_MENU(5844, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(5844, pCreature->GetObjectGuid()); else canBuy = true; break; case 4731: //Zachariah Post if (pPlayer->GetReputationRank(68) != REP_EXALTED && race != RACE_UNDEAD) - pPlayer->SEND_GOSSIP_MENU(5840, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(5840, pCreature->GetObjectGuid()); else canBuy = true; break; case 7952: //Zjolnir if (pPlayer->GetReputationRank(530) != REP_EXALTED && race != RACE_TROLL) - pPlayer->SEND_GOSSIP_MENU(5842, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(5842, pCreature->GetObjectGuid()); else canBuy = true; break; case 7955: //Milli Featherwhistle if (pPlayer->GetReputationRank(54) != REP_EXALTED && race != RACE_GNOME) - pPlayer->SEND_GOSSIP_MENU(5857, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(5857, pCreature->GetObjectGuid()); else canBuy = true; break; case 16264: //Winaestra if (pPlayer->GetReputationRank(911) != REP_EXALTED && race != RACE_BLOODELF) - pPlayer->SEND_GOSSIP_MENU(10305, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(10305, pCreature->GetObjectGuid()); else canBuy = true; break; case 17584: //Torallius the Pack Handler if (pPlayer->GetReputationRank(930) != REP_EXALTED && race != RACE_DRAENEI) - pPlayer->SEND_GOSSIP_MENU(10239, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(10239, pCreature->GetObjectGuid()); else canBuy = true; break; } @@ -1250,7 +1250,7 @@ bool GossipHello_npc_mount_vendor(Player* pPlayer, Creature* pCreature) { if (pCreature->isVendor()) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_VENDOR, GOSSIP_TEXT_BROWSE_GOODS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE); - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); } return true; } @@ -1258,7 +1258,7 @@ bool GossipHello_npc_mount_vendor(Player* pPlayer, Creature* pCreature) bool GossipSelect_npc_mount_vendor(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) { if (uiAction == GOSSIP_ACTION_TRADE) - pPlayer->SEND_VENDORLIST(pCreature->GetGUID()); + pPlayer->SEND_VENDORLIST(pCreature->GetObjectGuid()); return true; } @@ -1270,7 +1270,7 @@ bool GossipSelect_npc_mount_vendor(Player* pPlayer, Creature* pCreature, uint32 bool GossipHello_npc_rogue_trainer(Player* pPlayer, Creature* pCreature) { if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); if (pCreature->isTrainer()) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_TRAINER, GOSSIP_TEXT_TRAIN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRAIN); @@ -1281,9 +1281,9 @@ bool GossipHello_npc_rogue_trainer(Player* pPlayer, Creature* pCreature) if (pPlayer->getClass() == CLASS_ROGUE && pPlayer->getLevel() >= 24 && !pPlayer->HasItemCount(17126,1) && !pPlayer->GetQuestRewardStatus(6681)) { pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - pPlayer->SEND_GOSSIP_MENU(5996, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(5996, pCreature->GetObjectGuid()); } else - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); return true; } @@ -1297,11 +1297,11 @@ bool GossipSelect_npc_rogue_trainer(Player* pPlayer, Creature* pCreature, uint32 pPlayer->CastSpell(pPlayer,21100,false); break; case GOSSIP_ACTION_TRAIN: - pPlayer->SEND_TRAINERLIST(pCreature->GetGUID()); + pPlayer->SEND_TRAINERLIST(pCreature->GetObjectGuid()); break; case GOSSIP_OPTION_UNLEARNTALENTS: pPlayer->CLOSE_GOSSIP_MENU(); - pPlayer->SendTalentWipeConfirm(pCreature->GetGUID()); + pPlayer->SendTalentWipeConfirm(pCreature->GetObjectGuid()); break; } return true; @@ -1324,7 +1324,7 @@ bool GossipSelect_npc_rogue_trainer(Player* pPlayer, Creature* pCreature, uint32 bool GossipHello_npc_sayge(Player* pPlayer, Creature* pCreature) { if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); if (pPlayer->HasSpellCooldown(SPELL_INT) || pPlayer->HasSpellCooldown(SPELL_ARM) || @@ -1334,11 +1334,11 @@ bool GossipHello_npc_sayge(Player* pPlayer, Creature* pCreature) pPlayer->HasSpellCooldown(SPELL_AGI) || pPlayer->HasSpellCooldown(SPELL_STM) || pPlayer->HasSpellCooldown(SPELL_SPI)) - pPlayer->SEND_GOSSIP_MENU(7393, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(7393, pCreature->GetObjectGuid()); else { pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Yes", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - pPlayer->SEND_GOSSIP_MENU(7339, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(7339, pCreature->GetObjectGuid()); } return true; @@ -1353,39 +1353,39 @@ void SendAction_npc_sayge(Player* pPlayer, Creature* pCreature, uint32 uiAction) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Turn him over to liege", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3); pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Confiscate the corn", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+4); pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Let him go and have the corn", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+5); - pPlayer->SEND_GOSSIP_MENU(7340, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(7340, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+2: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Execute your friend painfully", GOSSIP_SENDER_MAIN+1, GOSSIP_ACTION_INFO_DEF); pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Execute your friend painlessly", GOSSIP_SENDER_MAIN+2, GOSSIP_ACTION_INFO_DEF); pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Let your friend go", GOSSIP_SENDER_MAIN+3, GOSSIP_ACTION_INFO_DEF); - pPlayer->SEND_GOSSIP_MENU(7341, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(7341, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+3: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Confront the diplomat", GOSSIP_SENDER_MAIN+4, GOSSIP_ACTION_INFO_DEF); pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Show not so quiet defiance", GOSSIP_SENDER_MAIN+5, GOSSIP_ACTION_INFO_DEF); pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Remain quiet", GOSSIP_SENDER_MAIN+2, GOSSIP_ACTION_INFO_DEF); - pPlayer->SEND_GOSSIP_MENU(7361, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(7361, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+4: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Speak against your brother openly", GOSSIP_SENDER_MAIN+6, GOSSIP_ACTION_INFO_DEF); pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Help your brother in", GOSSIP_SENDER_MAIN+7, GOSSIP_ACTION_INFO_DEF); pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Keep your brother out without letting him know", GOSSIP_SENDER_MAIN+8, GOSSIP_ACTION_INFO_DEF); - pPlayer->SEND_GOSSIP_MENU(7362, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(7362, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+5: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Take credit, keep gold", GOSSIP_SENDER_MAIN+5, GOSSIP_ACTION_INFO_DEF); pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Take credit, share the gold", GOSSIP_SENDER_MAIN+4, GOSSIP_ACTION_INFO_DEF); pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Let the knight take credit", GOSSIP_SENDER_MAIN+3, GOSSIP_ACTION_INFO_DEF); - pPlayer->SEND_GOSSIP_MENU(7363, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(7363, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Thanks", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+6); - pPlayer->SEND_GOSSIP_MENU(7364, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(7364, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+6: pCreature->CastSpell(pPlayer, SPELL_FORTUNE, false); - pPlayer->SEND_GOSSIP_MENU(7365, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(7365, pCreature->GetObjectGuid()); break; } } @@ -1553,10 +1553,10 @@ bool GossipHello_npc_tabard_vendor(Player* pPlayer, Creature* pCreature) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LOST_TABARD_OF_SUMMER_FLAMES, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+7); } - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); } else - pPlayer->SEND_VENDORLIST(pCreature->GetGUID()); + pPlayer->SEND_VENDORLIST(pCreature->GetObjectGuid()); return true; } @@ -1566,7 +1566,7 @@ bool GossipSelect_npc_tabard_vendor(Player* pPlayer, Creature* pCreature, uint32 switch(uiAction) { case GOSSIP_ACTION_TRADE: - pPlayer->SEND_VENDORLIST(pCreature->GetGUID()); + pPlayer->SEND_VENDORLIST(pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+1: pPlayer->CLOSE_GOSSIP_MENU(); @@ -1667,7 +1667,7 @@ bool GossipHello_npc_locksmith(Player* pPlayer, Creature* pCreature) if (pPlayer->GetQuestRewardStatus(QUEST_CONTAINMENT) && !pPlayer->HasItemCount(ITEM_VIOLET_HOLD_KEY, 1, true)) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LOST_VIOLET_HOLD_KEY, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF +6); - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); return true; } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 90ebe3ec1..5c2087dc2 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2093" + #define SD2_REVISION_NR "2094" #endif // __SD2_REVISION_NR_H__ From b34bcff9022abf36af1a6b5f3f7420f80d82148c Mon Sep 17 00:00:00 2001 From: NoFantasy Date: Thu, 12 May 2011 12:05:55 +0200 Subject: [PATCH 0074/1172] [2095] Remove all use of SetUInt64Value(UNIT_FIELD_TARGET, replace with SetTargetGuid Signed-off-by: NoFantasy --- .../karazhan/boss_midnight.cpp | 2 +- .../karazhan/boss_prince_malchezaar.cpp | 4 ++-- .../boss_felblood_kaelthas.cpp | 2 +- .../temple_of_ahnqiraj/boss_cthun.cpp | 14 +++++------ scripts/outland/black_temple/boss_illidan.cpp | 24 +++++++++---------- .../black_temple/boss_shade_of_akama.cpp | 4 ++-- .../tempest_keep/the_eye/boss_kaelthas.cpp | 2 +- sd2_revision_nr.h | 2 +- 8 files changed, 27 insertions(+), 27 deletions(-) diff --git a/scripts/eastern_kingdoms/karazhan/boss_midnight.cpp b/scripts/eastern_kingdoms/karazhan/boss_midnight.cpp index cca340e81..c5b197944 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_midnight.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_midnight.cpp @@ -156,7 +156,7 @@ struct MANGOS_DLL_DECL boss_midnightAI : public ScriptedAI if (pAttumen->getVictim()) { pAttumen->GetMotionMaster()->MoveChase(pAttumen->getVictim()); - pAttumen->SetUInt64Value(UNIT_FIELD_TARGET, pAttumen->getVictim()->GetGUID()); + pAttumen->SetTargetGuid(pAttumen->getVictim()->GetObjectGuid()); } pAttumen->SetFloatValue(OBJECT_FIELD_SCALE_X,1); } diff --git a/scripts/eastern_kingdoms/karazhan/boss_prince_malchezaar.cpp b/scripts/eastern_kingdoms/karazhan/boss_prince_malchezaar.cpp index f36b05dcb..4053375dc 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_prince_malchezaar.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_prince_malchezaar.cpp @@ -394,8 +394,8 @@ struct MANGOS_DLL_DECL boss_malchezaarAI : public ScriptedAI if (m_creature->hasUnitState(UNIT_STAT_STUNNED)) //While shifting to phase 2 malchezaar stuns himself return; - if (m_creature->GetUInt64Value(UNIT_FIELD_TARGET)!=m_creature->getVictim()->GetGUID()) - m_creature->SetUInt64Value(UNIT_FIELD_TARGET, m_creature->getVictim()->GetGUID()); + if (m_creature->GetTargetGuid() != m_creature->getVictim()->GetObjectGuid()) + m_creature->SetTargetGuid(m_creature->getVictim()->GetObjectGuid()); if (phase == 1) { diff --git a/scripts/eastern_kingdoms/magisters_terrace/boss_felblood_kaelthas.cpp b/scripts/eastern_kingdoms/magisters_terrace/boss_felblood_kaelthas.cpp index c78c0d7f6..38646b22e 100644 --- a/scripts/eastern_kingdoms/magisters_terrace/boss_felblood_kaelthas.cpp +++ b/scripts/eastern_kingdoms/magisters_terrace/boss_felblood_kaelthas.cpp @@ -460,7 +460,7 @@ struct MANGOS_DLL_DECL mob_felkael_phoenixAI : public ScriptedAI m_creature->ModifyAuraState(AURA_STATE_HEALTHLESS_35_PERCENT, false); m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); m_creature->ClearAllReactives(); - m_creature->SetUInt64Value(UNIT_FIELD_TARGET,0); + m_creature->SetTargetGuid(ObjectGuid()); m_creature->GetMotionMaster()->Clear(); m_creature->GetMotionMaster()->MoveIdle(); m_creature->SetStandState(UNIT_STAND_STATE_DEAD); diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_cthun.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_cthun.cpp index 934284f21..93c0d47ea 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/boss_cthun.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_cthun.cpp @@ -226,7 +226,7 @@ struct MANGOS_DLL_DECL eye_of_cthunAI : public ScriptedAI DoCastSpellIfCan(target,SPELL_GREEN_BEAM); //Correctly update our target - m_creature->SetUInt64Value(UNIT_FIELD_TARGET, target->GetGUID()); + m_creature->SetTargetGuid(target->GetObjectGuid()); } //Beam every 3 seconds @@ -287,7 +287,7 @@ struct MANGOS_DLL_DECL eye_of_cthunAI : public ScriptedAI if (target) { //Correctly update our target - m_creature->SetUInt64Value(UNIT_FIELD_TARGET, target->GetGUID()); + m_creature->SetTargetGuid(target->GetObjectGuid()); //Face our target DarkGlareAngle = m_creature->GetAngle(target); @@ -314,7 +314,7 @@ struct MANGOS_DLL_DECL eye_of_cthunAI : public ScriptedAI if (DarkGlareTickTimer < diff) { //Remove any target - m_creature->SetUInt64Value(UNIT_FIELD_TARGET, 0); + m_creature->SetTargetGuid(ObjectGuid()); //Set angle and cast if (ClockWise) @@ -360,7 +360,7 @@ struct MANGOS_DLL_DECL eye_of_cthunAI : public ScriptedAI case 2: { //Remove any target - m_creature->SetUInt64Value(UNIT_FIELD_TARGET, 0); + m_creature->SetTargetGuid(ObjectGuid()); m_creature->SetHealth(0); } @@ -397,7 +397,7 @@ struct MANGOS_DLL_DECL eye_of_cthunAI : public ScriptedAI m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_NON_ATTACKABLE); //Remove Target field - m_creature->SetUInt64Value(UNIT_FIELD_TARGET, 0); + m_creature->SetTargetGuid(ObjectGuid()); //Death animation/respawning; m_pInstance->SetData(TYPE_CTHUN_PHASE, 2); @@ -582,7 +582,7 @@ struct MANGOS_DLL_DECL cthunAI : public ScriptedAI return; } - m_creature->SetUInt64Value(UNIT_FIELD_TARGET, 0); + m_creature->SetTargetGuid(ObjectGuid()); //No instance if (!m_pInstance) @@ -653,7 +653,7 @@ struct MANGOS_DLL_DECL cthunAI : public ScriptedAI case 3: { //Remove Target field - m_creature->SetUInt64Value(UNIT_FIELD_TARGET, 0); + m_creature->SetTargetGuid(ObjectGuid()); //Weaken if (FleshTentaclesKilled > 1) diff --git a/scripts/outland/black_temple/boss_illidan.cpp b/scripts/outland/black_temple/boss_illidan.cpp index ee7c3a25e..88900089b 100644 --- a/scripts/outland/black_temple/boss_illidan.cpp +++ b/scripts/outland/black_temple/boss_illidan.cpp @@ -576,7 +576,7 @@ struct MANGOS_DLL_DECL npc_akama_illidanAI : public ScriptedAI float dx = Illidan->GetPositionX() + rand()%15; float dy = Illidan->GetPositionY() + rand()%15; m_creature->GetMotionMaster()->MovePoint(13, dx, dy, Illidan->GetPositionZ()); - m_creature->SetUInt64Value(UNIT_FIELD_TARGET, IllidanGUID); + m_creature->SetTargetGuid(Illidan->GetObjectGuid()); } } } @@ -1072,7 +1072,7 @@ struct MANGOS_DLL_DECL boss_illidan_stormrageAI : public ScriptedAI return; RefaceVictim = true; - m_creature->SetUInt64Value(UNIT_FIELD_TARGET, victim->GetGUID()); + m_creature->SetTargetGuid(victim->GetObjectGuid()); m_creature->CastSpell(victim, Spell, triggered); } @@ -1113,7 +1113,7 @@ struct MANGOS_DLL_DECL boss_illidan_stormrageAI : public ScriptedAI else { pTrigger->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - m_creature->SetUInt64Value(UNIT_FIELD_TARGET, pTrigger->GetGUID()); + m_creature->SetTargetGuid(pTrigger->GetObjectGuid()); DoCastSpellIfCan(pTrigger, SPELL_EYE_BLAST); } } @@ -1265,7 +1265,7 @@ struct MANGOS_DLL_DECL boss_illidan_stormrageAI : public ScriptedAI LandTimer = 0; Phase = PHASE_FLIGHT; m_creature->RemoveAllAuras(); - m_creature->SetUInt64Value(UNIT_FIELD_TARGET, 0); + m_creature->SetTargetGuid(ObjectGuid()); // So players don't shoot us down m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); @@ -1410,7 +1410,7 @@ struct MANGOS_DLL_DECL boss_illidan_stormrageAI : public ScriptedAI Maiev->NearTeleportTo(dx, dy, Maiev->GetPositionZ(), 0.0f); Maiev->CastSpell(Maiev, SPELL_TELEPORT_VISUAL, true); - Maiev->SetUInt64Value(UNIT_FIELD_TARGET, m_creature->GetGUID()); + Maiev->SetTargetGuid(m_creature->GetObjectGuid()); } } IsTalking = true; @@ -1468,9 +1468,9 @@ struct MANGOS_DLL_DECL boss_illidan_stormrageAI : public ScriptedAI // onoz she looks like she teleported! Maiev->CastSpell(Maiev, SPELL_TELEPORT_VISUAL, true); // Have her face us - Maiev->SetUInt64Value(UNIT_FIELD_TARGET, m_creature->GetGUID()); + Maiev->SetTargetGuid(m_creature->GetObjectGuid()); // Face her, so it's not rude =P - m_creature->SetUInt64Value(UNIT_FIELD_TARGET, Maiev->GetGUID()); + m_creature->SetTargetGuid(Maiev->GetObjectGuid()); } } break; @@ -1549,7 +1549,7 @@ struct MANGOS_DLL_DECL boss_illidan_stormrageAI : public ScriptedAI { if (FaceVictimTimer < diff) { - m_creature->SetUInt64Value(UNIT_FIELD_TARGET, m_creature->getVictim()->GetGUID()); + m_creature->SetTargetGuid(m_creature->getVictim()->GetObjectGuid()); FaceVictimTimer = 1000; RefaceVictim = false; }else FaceVictimTimer -= diff; @@ -1717,7 +1717,7 @@ struct MANGOS_DLL_DECL boss_illidan_stormrageAI : public ScriptedAI // We should let the raid fight us =) m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - m_creature->SetUInt64Value(UNIT_FIELD_TARGET, m_creature->getVictim()->GetGUID()); + m_creature->SetTargetGuid(m_creature->getVictim()->GetObjectGuid()); // Chase our victim! m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); @@ -1831,7 +1831,7 @@ struct MANGOS_DLL_DECL boss_illidan_stormrageAI : public ScriptedAI Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_TOPAGGRO, 0); if (target && target->isAlive()) { - m_creature->SetUInt64Value(UNIT_FIELD_TARGET, target->GetGUID()); + m_creature->SetTargetGuid(target->GetObjectGuid()); DoCastSpellIfCan(target, SPELL_SHADOW_BLAST); ShadowBlastTimer = 4000; GlobalTimer += 1500; @@ -1936,8 +1936,8 @@ void npc_akama_illidanAI::BeginEvent(uint64 PlayerGUID) pIllidanAI->IsTalking = true; pIllidanAI->AkamaGUID = m_creature->GetGUID(); - m_creature->SetUInt64Value(UNIT_FIELD_TARGET, pIllidan->GetGUID()); - pIllidan->SetUInt64Value(UNIT_FIELD_TARGET, m_creature->GetGUID()); + m_creature->SetTargetGuid(pIllidan->GetObjectGuid()); + pIllidan->SetTargetGuid(m_creature->GetObjectGuid()); IsTalking = true; // Prevent Akama from starting to attack him // Prevent players from talking again diff --git a/scripts/outland/black_temple/boss_shade_of_akama.cpp b/scripts/outland/black_temple/boss_shade_of_akama.cpp index f6e430321..c73e94a8e 100644 --- a/scripts/outland/black_temple/boss_shade_of_akama.cpp +++ b/scripts/outland/black_temple/boss_shade_of_akama.cpp @@ -211,7 +211,7 @@ struct MANGOS_DLL_DECL boss_shade_of_akamaAI : public ScriptedAI { pSorcerer->RemoveSplineFlag(SPLINEFLAG_WALKMODE); pSorcerer->GetMotionMaster()->MovePoint(0, m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ()); - pSorcerer->SetUInt64Value(UNIT_FIELD_TARGET, m_creature->GetGUID()); + pSorcerer->SetTargetGuid(m_creature->GetObjectGuid()); m_lSorcerersGUIDList.push_back(pSorcerer->GetGUID()); @@ -470,7 +470,7 @@ struct MANGOS_DLL_DECL npc_akamaAI : public ScriptedAI m_creature->SetInCombatWith(pShade); pShade->HandleEmote(EMOTE_STATE_NONE); - pShade->SetUInt64Value(UNIT_FIELD_TARGET, m_creature->GetGUID()); + pShade->SetTargetGuid(m_creature->GetObjectGuid()); pShade->SetInCombatWithZone(); diff --git a/scripts/outland/tempest_keep/the_eye/boss_kaelthas.cpp b/scripts/outland/tempest_keep/the_eye/boss_kaelthas.cpp index c9c09c614..100260761 100644 --- a/scripts/outland/tempest_keep/the_eye/boss_kaelthas.cpp +++ b/scripts/outland/tempest_keep/the_eye/boss_kaelthas.cpp @@ -257,7 +257,7 @@ struct MANGOS_DLL_DECL advisorbase_ai : public ScriptedAI m_creature->ModifyAuraState(AURA_STATE_HEALTHLESS_35_PERCENT, false); m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); m_creature->ClearAllReactives(); - m_creature->SetUInt64Value(UNIT_FIELD_TARGET,0); + m_creature->SetTargetGuid(ObjectGuid()); m_creature->GetMotionMaster()->Clear(); m_creature->GetMotionMaster()->MoveIdle(); m_creature->SetStandState(UNIT_STAND_STATE_DEAD); diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 5c2087dc2..c03cb6903 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2094" + #define SD2_REVISION_NR "2095" #endif // __SD2_REVISION_NR_H__ From 15c2e32f6946871d384af3726b79d25a7b7a7dda Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Thu, 12 May 2011 12:58:25 +0200 Subject: [PATCH 0075/1172] [2096] Make EscortAI use ObjectGuid instead of uint64 Replace uint64 uiPlayerGUID param in Start with const Player* Signed-off-by: Schmoozerd --- base/escort_ai.cpp | 12 ++++++------ base/escort_ai.h | 6 +++--- scripts/eastern_kingdoms/arathi_highlands.cpp | 2 +- .../blackrock_depths/blackrock_depths.cpp | 2 +- scripts/eastern_kingdoms/eversong_woods.cpp | 2 +- scripts/eastern_kingdoms/ghostlands.cpp | 2 +- scripts/eastern_kingdoms/gnomeregan/gnomeregan.cpp | 2 +- scripts/eastern_kingdoms/hinterlands.cpp | 4 ++-- scripts/eastern_kingdoms/karazhan/karazhan.cpp | 2 +- scripts/eastern_kingdoms/loch_modan.cpp | 2 +- scripts/eastern_kingdoms/redridge_mountains.cpp | 2 +- .../eastern_kingdoms/scarlet_enclave/ebon_hold.cpp | 2 +- scripts/eastern_kingdoms/silverpine_forest.cpp | 2 +- scripts/eastern_kingdoms/swamp_of_sorrows.cpp | 2 +- scripts/eastern_kingdoms/westfall.cpp | 4 ++-- scripts/eastern_kingdoms/wetlands.cpp | 2 +- scripts/examples/example_escort.cpp | 6 +++--- scripts/kalimdor/ashenvale.cpp | 6 +++--- scripts/kalimdor/azuremyst_isle.cpp | 2 +- .../caverns_of_time/old_hillsbrad/old_hillsbrad.cpp | 9 +++------ scripts/kalimdor/darkshore.cpp | 2 +- scripts/kalimdor/desolace.cpp | 2 +- scripts/kalimdor/dustwallow_marsh.cpp | 4 ++-- scripts/kalimdor/feralas.cpp | 2 +- scripts/kalimdor/moonglade.cpp | 6 +++--- scripts/kalimdor/razorfen_kraul/razorfen_kraul.cpp | 2 +- scripts/kalimdor/stonetalon_mountains.cpp | 2 +- scripts/kalimdor/tanaris.cpp | 12 ++++++------ scripts/kalimdor/the_barrens.cpp | 4 ++-- scripts/kalimdor/thousand_needles.cpp | 6 +++--- scripts/kalimdor/ungoro_crater.cpp | 2 +- scripts/kalimdor/wailing_caverns/wailing_caverns.cpp | 2 +- scripts/northrend/borean_tundra.cpp | 2 +- scripts/northrend/sholazar_basin.cpp | 4 ++-- .../shadow_labyrinth/boss_ambassador_hellmaw.cpp | 2 +- scripts/outland/hellfire_peninsula.cpp | 4 ++-- scripts/outland/nagrand.cpp | 2 +- scripts/outland/netherstorm.cpp | 4 ++-- scripts/outland/shadowmoon_valley.cpp | 2 +- scripts/outland/shattrath_city.cpp | 2 +- scripts/outland/terokkar_forest.cpp | 6 +++--- scripts/outland/zangarmarsh.cpp | 2 +- sd2_revision_nr.h | 2 +- 43 files changed, 74 insertions(+), 77 deletions(-) diff --git a/base/escort_ai.cpp b/base/escort_ai.cpp index 25075b034..b140e1c52 100644 --- a/base/escort_ai.cpp +++ b/base/escort_ai.cpp @@ -22,7 +22,7 @@ enum }; npc_escortAI::npc_escortAI(Creature* pCreature) : ScriptedAI(pCreature), - m_uiPlayerGUID(0), + m_playerGuid(), m_uiPlayerCheckTimer(1000), m_uiWPWaitTimer(2500), m_uiEscortState(STATE_ESCORT_NONE), @@ -149,7 +149,7 @@ void npc_escortAI::MoveInLineOfSight(Unit* pWho) void npc_escortAI::JustDied(Unit* pKiller) { - if (!HasEscortState(STATE_ESCORT_ESCORTING) || !m_uiPlayerGUID || !m_pQuestForEscort) + if (!HasEscortState(STATE_ESCORT_ESCORTING) || m_playerGuid.IsEmpty() || !m_pQuestForEscort) return; if (Player* pPlayer = GetPlayerForEscort()) @@ -295,7 +295,7 @@ void npc_escortAI::UpdateAI(const uint32 uiDiff) } //Check if player or any member of his group is within range - if (HasEscortState(STATE_ESCORT_ESCORTING) && m_uiPlayerGUID && !m_creature->getVictim() && !HasEscortState(STATE_ESCORT_RETURNING)) + if (HasEscortState(STATE_ESCORT_ESCORTING) && !m_playerGuid.IsEmpty() && !m_creature->getVictim() && !HasEscortState(STATE_ESCORT_RETURNING)) { if (m_uiPlayerCheckTimer < uiDiff) { @@ -448,7 +448,7 @@ void npc_escortAI::SetRun(bool bRun) } //TODO: get rid of this many variables passed in function. -void npc_escortAI::Start(bool bRun, uint64 uiPlayerGUID, const Quest* pQuest, bool bInstantRespawn, bool bCanLoopPath) +void npc_escortAI::Start(bool bRun, const Player* pPlayer, const Quest* pQuest, bool bInstantRespawn, bool bCanLoopPath) { if (m_creature->getVictim()) { @@ -476,7 +476,7 @@ void npc_escortAI::Start(bool bRun, uint64 uiPlayerGUID, const Quest* pQuest, bo //set variables m_bIsRunning = bRun; - m_uiPlayerGUID = uiPlayerGUID; + m_playerGuid = pPlayer ? pPlayer->GetObjectGuid() : ObjectGuid(); m_pQuestForEscort = pQuest; m_bCanInstantRespawn = bInstantRespawn; @@ -495,7 +495,7 @@ void npc_escortAI::Start(bool bRun, uint64 uiPlayerGUID, const Quest* pQuest, bo //disable npcflags m_creature->SetUInt32Value(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_NONE); - debug_log("SD2: EscortAI started with " SIZEFMTD " waypoints. Run = %d, PlayerGUID = " UI64FMTD, WaypointList.size(), m_bIsRunning, m_uiPlayerGUID); + debug_log("SD2: EscortAI started with " SIZEFMTD " waypoints. Run = %d, PlayerGuid = %s", WaypointList.size(), m_bIsRunning, m_playerGuid.GetString()); CurrentWP = WaypointList.begin(); diff --git a/base/escort_ai.h b/base/escort_ai.h index 51be00d86..bdc801e4b 100644 --- a/base/escort_ai.h +++ b/base/escort_ai.h @@ -66,7 +66,7 @@ struct MANGOS_DLL_DECL npc_escortAI : public ScriptedAI virtual void WaypointReached(uint32 uiPointId) = 0; virtual void WaypointStart(uint32 uiPointId) {} - void Start(bool bRun = false, uint64 uiPlayerGUID = 0, const Quest* pQuest = NULL, bool bInstantRespawn = false, bool bCanLoopPath = false); + void Start(bool bRun = false, const Player* pPlayer = NULL, const Quest* pQuest = NULL, bool bInstantRespawn = false, bool bCanLoopPath = false); void SetRun(bool bRun = true); void SetEscortPaused(bool uPaused); @@ -77,7 +77,7 @@ struct MANGOS_DLL_DECL npc_escortAI : public ScriptedAI void SetCurrentWaypoint(uint32 uiPointId); protected: - Player* GetPlayerForEscort() { return m_creature->GetMap()->GetPlayer(m_uiPlayerGUID); } + Player* GetPlayerForEscort() { return m_creature->GetMap()->GetPlayer(m_playerGuid); } virtual void JustStartedEscort() {} private: @@ -88,7 +88,7 @@ struct MANGOS_DLL_DECL npc_escortAI : public ScriptedAI void AddEscortState(uint32 uiEscortState) { m_uiEscortState |= uiEscortState; } void RemoveEscortState(uint32 uiEscortState) { m_uiEscortState &= ~uiEscortState; } - uint64 m_uiPlayerGUID; + ObjectGuid m_playerGuid; uint32 m_uiWPWaitTimer; uint32 m_uiPlayerCheckTimer; uint32 m_uiEscortState; diff --git a/scripts/eastern_kingdoms/arathi_highlands.cpp b/scripts/eastern_kingdoms/arathi_highlands.cpp index 38c807498..07f5c9e60 100644 --- a/scripts/eastern_kingdoms/arathi_highlands.cpp +++ b/scripts/eastern_kingdoms/arathi_highlands.cpp @@ -104,7 +104,7 @@ bool QuestAccept_npc_professor_phizzlethorpe(Player* pPlayer, Creature* pCreatur DoScriptText(SAY_PROGRESS_1, pCreature, pPlayer); if (npc_professor_phizzlethorpeAI* pEscortAI = dynamic_cast(pCreature->AI())) - pEscortAI->Start(false, pPlayer->GetGUID(), pQuest, true); + pEscortAI->Start(false, pPlayer, pQuest, true); } return true; } diff --git a/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.cpp b/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.cpp index 3376c399d..6d79447bb 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.cpp +++ b/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.cpp @@ -780,7 +780,7 @@ bool QuestRewarded_npc_rocknot(Player* pPlayer, Creature* pCreature, Quest const pCreature->CastSpell(pCreature, SPELL_DRUNKEN_RAGE, false); if (npc_rocknotAI* pEscortAI = dynamic_cast(pCreature->AI())) - pEscortAI->Start(false, 0, NULL, true); + pEscortAI->Start(false, NULL, NULL, true); } } diff --git a/scripts/eastern_kingdoms/eversong_woods.cpp b/scripts/eastern_kingdoms/eversong_woods.cpp index 6ed03e629..08eac18f5 100644 --- a/scripts/eastern_kingdoms/eversong_woods.cpp +++ b/scripts/eastern_kingdoms/eversong_woods.cpp @@ -327,7 +327,7 @@ bool GossipSelect_npc_prospector_anvilward(Player* pPlayer, Creature* pCreature, pPlayer->CLOSE_GOSSIP_MENU(); if (npc_prospector_anvilwardAI* pEscortAI = dynamic_cast(pCreature->AI())) - pEscortAI->Start(false, pPlayer->GetGUID()); + pEscortAI->Start(false, pPlayer); break; } diff --git a/scripts/eastern_kingdoms/ghostlands.cpp b/scripts/eastern_kingdoms/ghostlands.cpp index b9c9ad90f..9d512ed3d 100644 --- a/scripts/eastern_kingdoms/ghostlands.cpp +++ b/scripts/eastern_kingdoms/ghostlands.cpp @@ -212,7 +212,7 @@ bool QuestAccept_npc_ranger_lilatha(Player* pPlayer, Creature* pCreature, const pCreature->setFaction(FACTION_SMOON_E); if (npc_ranger_lilathaAI* pEscortAI = dynamic_cast(pCreature->AI())) - pEscortAI->Start(false, pPlayer->GetGUID(), pQuest); + pEscortAI->Start(false, pPlayer, pQuest); } return true; } diff --git a/scripts/eastern_kingdoms/gnomeregan/gnomeregan.cpp b/scripts/eastern_kingdoms/gnomeregan/gnomeregan.cpp index 2caa58686..ad53e4f0e 100644 --- a/scripts/eastern_kingdoms/gnomeregan/gnomeregan.cpp +++ b/scripts/eastern_kingdoms/gnomeregan/gnomeregan.cpp @@ -357,7 +357,7 @@ struct MANGOS_DLL_DECL npc_blastmaster_emi_shortfuseAI : public npc_escortAI m_uiPhaseTimer = 3500; // 6s delay, but 2500ms for escortstarting break; case 3: - Start(false, m_uiPlayerGUID, NULL, false, false); + Start(false, m_creature->GetMap()->GetPlayer(m_uiPlayerGUID), NULL, false, false); m_uiPhaseTimer = 0; break; diff --git a/scripts/eastern_kingdoms/hinterlands.cpp b/scripts/eastern_kingdoms/hinterlands.cpp index dfee4f3f3..98e7dfc48 100644 --- a/scripts/eastern_kingdoms/hinterlands.cpp +++ b/scripts/eastern_kingdoms/hinterlands.cpp @@ -120,7 +120,7 @@ bool QuestAccept_npc_00x09hl(Player* pPlayer, Creature* pCreature, const Quest* DoScriptText(SAY_OOX_START, pCreature, pPlayer); if (npc_00x09hlAI* pEscortAI = dynamic_cast(pCreature->AI())) - pEscortAI->Start(false, pPlayer->GetGUID(), pQuest); + pEscortAI->Start(false, pPlayer, pQuest); } return true; } @@ -313,7 +313,7 @@ bool QuestAccept_npc_rinji(Player* pPlayer, Creature* pCreature, const Quest* pQ pGo->UseDoorOrButton(); if (npc_rinjiAI* pEscortAI = dynamic_cast(pCreature->AI())) - pEscortAI->Start(false, pPlayer->GetGUID(), pQuest); + pEscortAI->Start(false, pPlayer, pQuest); } return true; } diff --git a/scripts/eastern_kingdoms/karazhan/karazhan.cpp b/scripts/eastern_kingdoms/karazhan/karazhan.cpp index 28bf81d1f..beed1d8d0 100644 --- a/scripts/eastern_kingdoms/karazhan/karazhan.cpp +++ b/scripts/eastern_kingdoms/karazhan/karazhan.cpp @@ -155,7 +155,7 @@ struct MANGOS_DLL_DECL npc_barnesAI : public npc_escortAI if (m_uiEventId == EVENT_OZ) m_pInstance->SetData(DATA_OPERA_OZ_DEATHCOUNT, IN_PROGRESS); - Start(false, 0, NULL, true); + Start(false, NULL, NULL, true); } void WaypointReached(uint32 uiPointId) diff --git a/scripts/eastern_kingdoms/loch_modan.cpp b/scripts/eastern_kingdoms/loch_modan.cpp index 4eef964d9..e7d4ba87b 100644 --- a/scripts/eastern_kingdoms/loch_modan.cpp +++ b/scripts/eastern_kingdoms/loch_modan.cpp @@ -167,7 +167,7 @@ bool QuestAccept_npc_miran(Player* pPlayer, Creature* pCreature, const Quest* pQ if (pQuest->GetQuestId() == QUEST_PROTECTING_THE_SHIPMENT) { if (npc_miranAI* pEscortAI = dynamic_cast(pCreature->AI())) - pEscortAI->Start(false, pPlayer->GetGUID(), pQuest); + pEscortAI->Start(false, pPlayer, pQuest); } return true; } diff --git a/scripts/eastern_kingdoms/redridge_mountains.cpp b/scripts/eastern_kingdoms/redridge_mountains.cpp index 4520aea48..eaf73c6d8 100644 --- a/scripts/eastern_kingdoms/redridge_mountains.cpp +++ b/scripts/eastern_kingdoms/redridge_mountains.cpp @@ -126,7 +126,7 @@ bool QuestAccept_npc_corporal_keeshan(Player* pPlayer, Creature* pCreature, cons if (npc_corporal_keeshan_escortAI* pEscortAI = dynamic_cast(pCreature->AI())) { DoScriptText(SAY_CORPORAL_KEESHAN_1, pCreature); - pEscortAI->Start(false, pPlayer->GetGUID(), pQuest); + pEscortAI->Start(false, pPlayer, pQuest); } } diff --git a/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp b/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp index ebbfc7868..6748c2189 100644 --- a/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp +++ b/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp @@ -817,7 +817,7 @@ bool QuestAccept_npc_koltira_deathweaver(Player* pPlayer, Creature* pCreature, c pCreature->SetStandState(UNIT_STAND_STATE_STAND); if (npc_koltira_deathweaverAI* pEscortAI = dynamic_cast(pCreature->AI())) - pEscortAI->Start(false, pPlayer->GetGUID(), pQuest); + pEscortAI->Start(false, pPlayer, pQuest); } return true; } diff --git a/scripts/eastern_kingdoms/silverpine_forest.cpp b/scripts/eastern_kingdoms/silverpine_forest.cpp index 636a8b247..27fa2162c 100644 --- a/scripts/eastern_kingdoms/silverpine_forest.cpp +++ b/scripts/eastern_kingdoms/silverpine_forest.cpp @@ -151,7 +151,7 @@ bool QuestAccept_npc_deathstalker_erland(Player* pPlayer, Creature* pCreature, c DoScriptText(SAY_START_1, pCreature); if (npc_deathstalker_erlandAI* pEscortAI = dynamic_cast(pCreature->AI())) - pEscortAI->Start(false, pPlayer->GetGUID(), pQuest); + pEscortAI->Start(false, pPlayer, pQuest); } return true; } diff --git a/scripts/eastern_kingdoms/swamp_of_sorrows.cpp b/scripts/eastern_kingdoms/swamp_of_sorrows.cpp index dc7649cf1..a94c7c45b 100644 --- a/scripts/eastern_kingdoms/swamp_of_sorrows.cpp +++ b/scripts/eastern_kingdoms/swamp_of_sorrows.cpp @@ -140,7 +140,7 @@ bool QuestAccept_npc_galen_goodward(Player* pPlayer, Creature* pCreature, const if (npc_galen_goodwardAI* pEscortAI = dynamic_cast(pCreature->AI())) { - pEscortAI->Start(false, pPlayer->GetGUID(), pQuest); + pEscortAI->Start(false, pPlayer, pQuest); pCreature->setFaction(FACTION_ESCORT_N_NEUTRAL_ACTIVE); DoScriptText(SAY_QUEST_ACCEPTED, pCreature); } diff --git a/scripts/eastern_kingdoms/westfall.cpp b/scripts/eastern_kingdoms/westfall.cpp index eeb91c96c..06a40177c 100644 --- a/scripts/eastern_kingdoms/westfall.cpp +++ b/scripts/eastern_kingdoms/westfall.cpp @@ -171,7 +171,7 @@ bool QuestAccept_npc_daphne_stilwell(Player* pPlayer, Creature* pCreature, const DoScriptText(SAY_DS_START, pCreature); if (npc_daphne_stilwellAI* pEscortAI = dynamic_cast(pCreature->AI())) - pEscortAI->Start(true, pPlayer->GetGUID(), pQuest); + pEscortAI->Start(true, pPlayer, pQuest); } return true; @@ -237,7 +237,7 @@ bool QuestAccept_npc_defias_traitor(Player* pPlayer, Creature* pCreature, const DoScriptText(SAY_START, pCreature, pPlayer); if (npc_defias_traitorAI* pEscortAI = dynamic_cast(pCreature->AI())) - pEscortAI->Start(true, pPlayer->GetGUID(), pQuest); + pEscortAI->Start(true, pPlayer, pQuest); } return true; diff --git a/scripts/eastern_kingdoms/wetlands.cpp b/scripts/eastern_kingdoms/wetlands.cpp index b42f13756..b1e9941e3 100644 --- a/scripts/eastern_kingdoms/wetlands.cpp +++ b/scripts/eastern_kingdoms/wetlands.cpp @@ -142,7 +142,7 @@ bool QuestAccept_npc_mikhail(Player* pPlayer, Creature* pCreature, const Quest* pSlim->CastSpell(pSlim, SPELL_STEALTH, true); if (npc_tapoke_slim_jahnAI* pEscortAI = dynamic_cast(pSlim->AI())) - pEscortAI->Start(false, pPlayer->GetGUID(), pQuest); + pEscortAI->Start(false, pPlayer, pQuest); } return false; } diff --git a/scripts/examples/example_escort.cpp b/scripts/examples/example_escort.cpp index 31f00e09d..5cbc7db29 100644 --- a/scripts/examples/example_escort.cpp +++ b/scripts/examples/example_escort.cpp @@ -201,19 +201,19 @@ bool GossipSelect_example_escort(Player* pPlayer, Creature* pCreature, uint32 ui pPlayer->CLOSE_GOSSIP_MENU(); if (pEscortAI) - pEscortAI->Start(true, pPlayer->GetGUID()); + pEscortAI->Start(true, pPlayer); break; case GOSSIP_ACTION_INFO_DEF+2: pPlayer->CLOSE_GOSSIP_MENU(); if (pEscortAI) - pEscortAI->Start(false, pPlayer->GetGUID()); + pEscortAI->Start(false, pPlayer); break; case GOSSIP_ACTION_INFO_DEF+3: pPlayer->CLOSE_GOSSIP_MENU(); if (pEscortAI) - pEscortAI->Start(true, pPlayer->GetGUID()); + pEscortAI->Start(true, pPlayer); break; default: return false; // nothing defined -> mangos core handling diff --git a/scripts/kalimdor/ashenvale.cpp b/scripts/kalimdor/ashenvale.cpp index 5b6897916..a44aa0372 100644 --- a/scripts/kalimdor/ashenvale.cpp +++ b/scripts/kalimdor/ashenvale.cpp @@ -211,7 +211,7 @@ bool QuestAccept_npc_muglash(Player* pPlayer, Creature* pCreature, const Quest* DoScriptText(SAY_MUG_START1, pCreature); pCreature->setFaction(FACTION_ESCORT_H_PASSIVE); - pEscortAI->Start(false, pPlayer->GetGUID(), pQuest); + pEscortAI->Start(false, pPlayer, pQuest); } } @@ -292,7 +292,7 @@ bool QuestAccept_npc_ruul_snowhoof(Player* pPlayer, Creature* pCreature, const Q pCreature->SetStandState(UNIT_STAND_STATE_STAND); if (npc_ruul_snowhoofAI* pEscortAI = dynamic_cast(pCreature->AI())) - pEscortAI->Start(false, pPlayer->GetGUID(), pQuest); + pEscortAI->Start(false, pPlayer, pQuest); } return true; } @@ -407,7 +407,7 @@ bool QuestAccept_npc_torek(Player* pPlayer, Creature* pCreature, const Quest* pQ DoScriptText(SAY_READY, pCreature, pPlayer); if (npc_torekAI* pEscortAI = dynamic_cast(pCreature->AI())) - pEscortAI->Start(true, pPlayer->GetGUID(), pQuest); + pEscortAI->Start(true, pPlayer, pQuest); } return true; diff --git a/scripts/kalimdor/azuremyst_isle.cpp b/scripts/kalimdor/azuremyst_isle.cpp index bd12ef0aa..4bef90fcf 100644 --- a/scripts/kalimdor/azuremyst_isle.cpp +++ b/scripts/kalimdor/azuremyst_isle.cpp @@ -378,7 +378,7 @@ bool QuestAccept_npc_magwin(Player* pPlayer, Creature* pCreature, const Quest* p pCreature->setFaction(10); if (npc_magwinAI* pEscortAI = dynamic_cast(pCreature->AI())) - pEscortAI->Start(false, pPlayer->GetGUID(), pQuest); + pEscortAI->Start(false, pPlayer, pQuest); } return true; } diff --git a/scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.cpp b/scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.cpp index 7ed5e565d..c52d76775 100644 --- a/scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.cpp +++ b/scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.cpp @@ -435,11 +435,8 @@ struct MANGOS_DLL_DECL npc_thrall_old_hillsbradAI : public npc_escortAI // trigger taretha to run down outside if (Creature* pTaretha = m_pInstance->GetTaretha()) { - if (Player* pPlayer = GetPlayerForEscort()) - { - if (npc_tarethaAI* pTarethaAI = dynamic_cast(pTaretha->AI())) - pTarethaAI->Start(true, pPlayer->GetGUID()); - } + if (npc_tarethaAI* pTarethaAI = dynamic_cast(pTaretha->AI())) + pTarethaAI->Start(true, GetPlayerForEscort()); } // kill credit creature for quest @@ -667,7 +664,7 @@ bool GossipSelect_npc_thrall_old_hillsbrad(Player* pPlayer, Creature* pCreature, DoScriptText(SAY_TH_START_EVENT_PART1, pCreature); if (npc_thrall_old_hillsbradAI* pThrallAI = dynamic_cast(pCreature->AI())) - pThrallAI->Start(true, pPlayer->GetGUID()); + pThrallAI->Start(true, pPlayer); break; } diff --git a/scripts/kalimdor/darkshore.cpp b/scripts/kalimdor/darkshore.cpp index eabd33712..7fe738853 100644 --- a/scripts/kalimdor/darkshore.cpp +++ b/scripts/kalimdor/darkshore.cpp @@ -298,7 +298,7 @@ bool QuestAccept_npc_prospector_remtravel(Player* pPlayer, Creature* pCreature, pCreature->setFaction(FACTION_ESCORT_A_NEUTRAL_PASSIVE); if (npc_prospector_remtravelAI* pEscortAI = dynamic_cast(pCreature->AI())) - pEscortAI->Start(false, pPlayer->GetGUID(), pQuest, true); + pEscortAI->Start(false, pPlayer, pQuest, true); } return true; diff --git a/scripts/kalimdor/desolace.cpp b/scripts/kalimdor/desolace.cpp index f20611053..e099e3a03 100644 --- a/scripts/kalimdor/desolace.cpp +++ b/scripts/kalimdor/desolace.cpp @@ -210,7 +210,7 @@ bool QuestAccept_npc_dalinda_malem(Player* pPlayer, Creature* pCreature, const Q { // TODO This faction change needs confirmation, also possible that we need to drop her PASSIVE flag pCreature->setFaction(FACTION_ESCORT_A_NEUTRAL_PASSIVE); - pEscortAI->Start(false, pPlayer->GetGUID(), pQuest); + pEscortAI->Start(false, pPlayer, pQuest); } } return true; diff --git a/scripts/kalimdor/dustwallow_marsh.cpp b/scripts/kalimdor/dustwallow_marsh.cpp index f0801bd0f..9d905ea90 100644 --- a/scripts/kalimdor/dustwallow_marsh.cpp +++ b/scripts/kalimdor/dustwallow_marsh.cpp @@ -364,7 +364,7 @@ bool QuestAccept_npc_morokk(Player* pPlayer, Creature* pCreature, const Quest* p if (pQuest->GetQuestId() == QUEST_CHALLENGE_MOROKK) { if (npc_morokkAI* pEscortAI = dynamic_cast(pCreature->AI())) - pEscortAI->Start(true, pPlayer->GetGUID(), pQuest); + pEscortAI->Start(true, pPlayer, pQuest); return true; } @@ -694,7 +694,7 @@ bool QuestAccept_npc_ogron(Player* pPlayer, Creature* pCreature, const Quest* pQ { if (npc_ogronAI* pEscortAI = dynamic_cast(pCreature->AI())) { - pEscortAI->Start(false, pPlayer->GetGUID(), pQuest, true); + pEscortAI->Start(false, pPlayer, pQuest, true); pCreature->setFaction(FACTION_ESCORT_N_FRIEND_PASSIVE); DoScriptText(SAY_OGR_START, pCreature, pPlayer); } diff --git a/scripts/kalimdor/feralas.cpp b/scripts/kalimdor/feralas.cpp index 0059f2b6a..dbc88c7a0 100644 --- a/scripts/kalimdor/feralas.cpp +++ b/scripts/kalimdor/feralas.cpp @@ -155,7 +155,7 @@ bool QuestAccept_npc_oox22fe(Player* pPlayer, Creature* pCreature, const Quest* pCreature->setFaction(FACTION_ESCORT_H_PASSIVE); if (npc_oox22feAI* pEscortAI = dynamic_cast(pCreature->AI())) - pEscortAI->Start(false, pPlayer->GetGUID(), pQuest); + pEscortAI->Start(false, pPlayer, pQuest); } return true; } diff --git a/scripts/kalimdor/moonglade.cpp b/scripts/kalimdor/moonglade.cpp index 9843af157..a71f583fe 100644 --- a/scripts/kalimdor/moonglade.cpp +++ b/scripts/kalimdor/moonglade.cpp @@ -179,7 +179,7 @@ struct MANGOS_DLL_DECL npc_clintar_dw_spiritAI : public npc_escortAI } //called only from EffectDummy - void DoStart(uint64 uiPlayerGuid) + void DoStart(Unit* pStarter) { //not the best way, maybe check in DummyEffect if this creature are "free" and not in escort. if (HasEscortState(STATE_ESCORT_ESCORTING)) @@ -187,7 +187,7 @@ struct MANGOS_DLL_DECL npc_clintar_dw_spiritAI : public npc_escortAI m_creature->SetVisibility(VISIBILITY_ON); m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - Start(false, uiPlayerGuid); + Start(false, pStarter && pStarter->GetTypeId() == TYPEID_PLAYER ? (Player*)pStarter : NULL); } void JustSummoned(Creature* summoned) @@ -220,7 +220,7 @@ bool EffectDummyCreature_npc_clintar_dw_spirit(Unit *pCaster, uint32 spellId, Sp //done here, escort can start if (npc_clintar_dw_spiritAI* pSpiritAI = dynamic_cast(pCreatureTarget->AI())) - pSpiritAI->DoStart(pCaster->GetGUID()); + pSpiritAI->DoStart(pCaster); //always return true when we are handling this spell and effect return true; diff --git a/scripts/kalimdor/razorfen_kraul/razorfen_kraul.cpp b/scripts/kalimdor/razorfen_kraul/razorfen_kraul.cpp index 09ce7150d..ad53ab1ed 100644 --- a/scripts/kalimdor/razorfen_kraul/razorfen_kraul.cpp +++ b/scripts/kalimdor/razorfen_kraul/razorfen_kraul.cpp @@ -137,7 +137,7 @@ bool QuestAccept_npc_willix_the_importer(Player* pPlayer, Creature* pCreature, c if (npc_willix_the_importerAI* pEscortAI = dynamic_cast(pCreature->AI())) { // After 4.0.1 set run = true - pEscortAI->Start(false, pPlayer->GetGUID(), pQuest); + pEscortAI->Start(false, pPlayer, pQuest); DoScriptText(SAY_WILLIX_READY, pCreature, pPlayer); pCreature->setFaction(FACTION_ESCORT_N_NEUTRAL_PASSIVE); } diff --git a/scripts/kalimdor/stonetalon_mountains.cpp b/scripts/kalimdor/stonetalon_mountains.cpp index e0e7530da..9ff02ac93 100644 --- a/scripts/kalimdor/stonetalon_mountains.cpp +++ b/scripts/kalimdor/stonetalon_mountains.cpp @@ -133,7 +133,7 @@ bool QuestAccept_npc_kaya(Player* pPlayer, Creature* pCreature, Quest const* pQu DoScriptText(SAY_START,pCreature); if (npc_kayaAI* pEscortAI = dynamic_cast(pCreature->AI())) - pEscortAI->Start(false, pPlayer->GetGUID(), pQuest); + pEscortAI->Start(false, pPlayer, pQuest); } return true; } diff --git a/scripts/kalimdor/tanaris.cpp b/scripts/kalimdor/tanaris.cpp index 5328e53f9..d045b95da 100644 --- a/scripts/kalimdor/tanaris.cpp +++ b/scripts/kalimdor/tanaris.cpp @@ -185,19 +185,19 @@ struct MANGOS_DLL_DECL npc_custodian_of_timeAI : public npc_escortAI } } - void MoveInLineOfSight(Unit *who) + void MoveInLineOfSight(Unit* pWho) { if (HasEscortState(STATE_ESCORT_ESCORTING)) return; - if (who->GetTypeId() == TYPEID_PLAYER) + if (pWho->GetTypeId() == TYPEID_PLAYER) { - if (((Player*)who)->HasAura(34877, EFFECT_INDEX_1) && ((Player*)who)->GetQuestStatus(10277) == QUEST_STATUS_INCOMPLETE) + if (pWho->HasAura(34877, EFFECT_INDEX_1) && ((Player*)pWho)->GetQuestStatus(10277) == QUEST_STATUS_INCOMPLETE) { float Radius = 10.0; - if (m_creature->IsWithinDistInMap(who, Radius)) - Start(false, who->GetGUID()); + if (m_creature->IsWithinDistInMap(pWho, Radius)) + Start(false, (Player*)pWho); } } } @@ -332,7 +332,7 @@ bool QuestAccept_npc_oox17tn(Player* pPlayer, Creature* pCreature, const Quest* pCreature->setFaction(FACTION_ESCORT_H_PASSIVE); if (npc_oox17tnAI* pEscortAI = dynamic_cast(pCreature->AI())) - pEscortAI->Start(false, pPlayer->GetGUID(), pQuest); + pEscortAI->Start(false, pPlayer, pQuest); } return true; } diff --git a/scripts/kalimdor/the_barrens.cpp b/scripts/kalimdor/the_barrens.cpp index 84e3d89fb..833b4e0c9 100644 --- a/scripts/kalimdor/the_barrens.cpp +++ b/scripts/kalimdor/the_barrens.cpp @@ -158,7 +158,7 @@ bool QuestAccept_npc_gilthares(Player* pPlayer, Creature* pCreature, const Quest DoScriptText(SAY_GIL_START, pCreature, pPlayer); if (npc_giltharesAI* pEscortAI = dynamic_cast(pCreature->AI())) - pEscortAI->Start(false, pPlayer->GetGUID(), pQuest); + pEscortAI->Start(false, pPlayer, pQuest); } return true; } @@ -632,7 +632,7 @@ bool QuestAccept_npc_wizzlecranks_shredder(Player* pPlayer, Creature* pCreature, pCreature->setFaction(FACTION_RATCHET); if (npc_wizzlecranks_shredderAI* pEscortAI = dynamic_cast(pCreature->AI())) - pEscortAI->Start(true, pPlayer->GetGUID(), pQuest); + pEscortAI->Start(true, pPlayer, pQuest); } return true; } diff --git a/scripts/kalimdor/thousand_needles.cpp b/scripts/kalimdor/thousand_needles.cpp index 7b8105aef..e6455ad2e 100644 --- a/scripts/kalimdor/thousand_needles.cpp +++ b/scripts/kalimdor/thousand_needles.cpp @@ -91,7 +91,7 @@ bool QuestAccept_npc_kanati(Player* pPlayer, Creature* pCreature, const Quest* p if (pQuest->GetQuestId() == QUEST_PROTECT_KANATI) { if (npc_kanatiAI* pEscortAI = dynamic_cast(pCreature->AI())) - pEscortAI->Start(false, pPlayer->GetGUID(), pQuest, true); + pEscortAI->Start(false, pPlayer, pQuest, true); } return true; } @@ -177,7 +177,7 @@ bool QuestAccept_npc_lakota_windsong(Player* pPlayer, Creature* pCreature, const pCreature->setFaction(FACTION_ESCORT_H_NEUTRAL_ACTIVE); if (npc_lakota_windsongAI* pEscortAI = dynamic_cast(pCreature->AI())) - pEscortAI->Start(false, pPlayer->GetGUID(), pQuest); + pEscortAI->Start(false, pPlayer, pQuest); } return true; } @@ -249,7 +249,7 @@ bool QuestAccept_npc_paoka_swiftmountain(Player* pPlayer, Creature* pCreature, c pCreature->setFaction(FACTION_ESCORT_H_NEUTRAL_ACTIVE); if (npc_paoka_swiftmountainAI* pEscortAI = dynamic_cast(pCreature->AI())) - pEscortAI->Start(false, pPlayer->GetGUID(), pQuest); + pEscortAI->Start(false, pPlayer, pQuest); } return true; } diff --git a/scripts/kalimdor/ungoro_crater.cpp b/scripts/kalimdor/ungoro_crater.cpp index 3963e53ac..c88f39fef 100644 --- a/scripts/kalimdor/ungoro_crater.cpp +++ b/scripts/kalimdor/ungoro_crater.cpp @@ -102,7 +102,7 @@ bool QuestAccept_npc_ame01(Player* pPlayer, Creature* pCreature, const Quest* pQ else if (pPlayer->GetTeam() == HORDE) pCreature->setFaction(FACTION_ESCORT_H_PASSIVE); - pAmeAI->Start(false, pPlayer->GetGUID(), pQuest); + pAmeAI->Start(false, pPlayer, pQuest); } } return true; diff --git a/scripts/kalimdor/wailing_caverns/wailing_caverns.cpp b/scripts/kalimdor/wailing_caverns/wailing_caverns.cpp index 52f6f3820..a9e1a0a3e 100644 --- a/scripts/kalimdor/wailing_caverns/wailing_caverns.cpp +++ b/scripts/kalimdor/wailing_caverns/wailing_caverns.cpp @@ -472,7 +472,7 @@ bool GossipSelect_npc_disciple_of_naralex(Player* pPlayer, Creature* pCreature, { if (npc_disciple_of_naralexAI* pEscortAI = dynamic_cast(pCreature->AI())) { - pEscortAI->Start(false, pPlayer->GetGUID()); // Note: after 4.0.3 set him run = true + pEscortAI->Start(false, pPlayer); // Note: after 4.0.3 set him run = true pCreature->setFaction(FACTION_ESCORT_N_ACTIVE); } pPlayer->CLOSE_GOSSIP_MENU(); diff --git a/scripts/northrend/borean_tundra.cpp b/scripts/northrend/borean_tundra.cpp index e6ea6d6b1..039c3b704 100644 --- a/scripts/northrend/borean_tundra.cpp +++ b/scripts/northrend/borean_tundra.cpp @@ -733,7 +733,7 @@ bool QuestAccept_npc_lurgglbr(Player* pPlayer, Creature* pCreature, const Quest* if (npc_lurgglbrAI* pEscortAI = dynamic_cast(pCreature->AI())) { pCreature->setFaction(FACTION_ESCORT_N_NEUTRAL_PASSIVE); - pEscortAI->Start(false, pPlayer->GetGUID(), pQuest); + pEscortAI->Start(false, pPlayer, pQuest); } } return true; diff --git a/scripts/northrend/sholazar_basin.cpp b/scripts/northrend/sholazar_basin.cpp index f11d2ad32..ae0b13e54 100644 --- a/scripts/northrend/sholazar_basin.cpp +++ b/scripts/northrend/sholazar_basin.cpp @@ -188,7 +188,7 @@ bool QuestAccept_npc_helice(Player* pPlayer, Creature* pCreature, const Quest* p if (npc_heliceAI* pEscortAI = dynamic_cast(pCreature->AI())) { - pEscortAI->Start(false, pPlayer->GetGUID(), pQuest); + pEscortAI->Start(false, pPlayer, pQuest); pCreature->SetFactionTemporary(FACTION_ESCORT_N_NEUTRAL_PASSIVE, TEMPFACTION_RESTORE_RESPAWN); } } @@ -288,7 +288,7 @@ bool QuestAccept_npc_injured_rainspeaker(Player* pPlayer, Creature* pCreature, c // Workaround, GossipHello/GossipSelect doesn't work well when object already has gossip from database if (npc_injured_rainspeakerAI* pEscortAI = dynamic_cast(pCreature->AI())) { - pEscortAI->Start(true, pPlayer->GetGUID(), pQuest); + pEscortAI->Start(true, pPlayer, pQuest); pCreature->SetFactionTemporary(FACTION_ESCORT_N_NEUTRAL_PASSIVE, TEMPFACTION_RESTORE_RESPAWN); } } diff --git a/scripts/outland/auchindoun/shadow_labyrinth/boss_ambassador_hellmaw.cpp b/scripts/outland/auchindoun/shadow_labyrinth/boss_ambassador_hellmaw.cpp index 55f34033f..36659b633 100644 --- a/scripts/outland/auchindoun/shadow_labyrinth/boss_ambassador_hellmaw.cpp +++ b/scripts/outland/auchindoun/shadow_labyrinth/boss_ambassador_hellmaw.cpp @@ -103,7 +103,7 @@ struct MANGOS_DLL_DECL boss_ambassador_hellmawAI : public npc_escortAI if (m_pInstance->GetData(TYPE_HELLMAW) != FAIL) { DoScriptText(SAY_INTRO, m_creature); - Start(false, 0, NULL, false, true); + Start(false, NULL, NULL, false, true); } m_pInstance->SetData(TYPE_HELLMAW, IN_PROGRESS); diff --git a/scripts/outland/hellfire_peninsula.cpp b/scripts/outland/hellfire_peninsula.cpp index adc49f47a..090565a08 100644 --- a/scripts/outland/hellfire_peninsula.cpp +++ b/scripts/outland/hellfire_peninsula.cpp @@ -149,7 +149,7 @@ struct MANGOS_DLL_DECL npc_ancestral_wolfAI : public npc_escortAI npc_ancestral_wolfAI(Creature* pCreature) : npc_escortAI(pCreature) { if (pCreature->GetOwner() && pCreature->GetOwner()->GetTypeId() == TYPEID_PLAYER) - Start(false, pCreature->GetOwner()->GetGUID()); + Start(false, (Player*)pCreature->GetOwner()); else error_log("SD2: npc_ancestral_wolf can not obtain owner or owner is not a player."); @@ -737,7 +737,7 @@ bool QuestAccept_npc_wounded_blood_elf(Player* pPlayer, Creature* pCreature, con pCreature->setFaction(FACTION_ESCORT_H_PASSIVE); if (npc_wounded_blood_elfAI* pEscortAI = dynamic_cast(pCreature->AI())) - pEscortAI->Start(false, pPlayer->GetGUID(), pQuest); + pEscortAI->Start(false, pPlayer, pQuest); } return true; diff --git a/scripts/outland/nagrand.cpp b/scripts/outland/nagrand.cpp index 488dcce6e..a567b1c00 100644 --- a/scripts/outland/nagrand.cpp +++ b/scripts/outland/nagrand.cpp @@ -575,7 +575,7 @@ bool QuestAccept_npc_maghar_captive(Player* pPlayer, Creature* pCreature, const pCreature->SetStandState(UNIT_STAND_STATE_STAND); pCreature->setFaction(FACTION_ESCORT_H_NEUTRAL_ACTIVE); - pEscortAI->Start(false, pPlayer->GetGUID(), pQuest); + pEscortAI->Start(false, pPlayer, pQuest); DoScriptText(SAY_MAG_START, pCreature); diff --git a/scripts/outland/netherstorm.cpp b/scripts/outland/netherstorm.cpp index 7a757f82f..e62f42868 100644 --- a/scripts/outland/netherstorm.cpp +++ b/scripts/outland/netherstorm.cpp @@ -746,7 +746,7 @@ bool QuestAccept_npc_bessy(Player* pPlayer, Creature* pCreature, const Quest* pQ pCreature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); if (npc_bessyAI* pBessyAI = dynamic_cast(pCreature->AI())) - pBessyAI->Start(true, pPlayer->GetGUID(), pQuest); + pBessyAI->Start(true, pPlayer, pQuest); } return true; } @@ -914,7 +914,7 @@ bool QuestAccept_npc_maxx_a_million(Player* pPlayer, Creature* pCreature, const // Remove unit_flags (see comment in JustReachedHome) pCreature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE + UNIT_FLAG_PASSIVE); - pEscortAI->Start(false, pPlayer->GetGUID(), pQuest, true); + pEscortAI->Start(false, pPlayer, pQuest, true); } } return true; diff --git a/scripts/outland/shadowmoon_valley.cpp b/scripts/outland/shadowmoon_valley.cpp index e224cbad0..5593d9950 100644 --- a/scripts/outland/shadowmoon_valley.cpp +++ b/scripts/outland/shadowmoon_valley.cpp @@ -867,7 +867,7 @@ bool QuestAccept_npc_wilda(Player* pPlayer, Creature* pCreature, const Quest* pQ pCreature->setFaction(FACTION_EARTHEN); if (npc_wildaAI* pEscortAI = dynamic_cast(pCreature->AI())) - pEscortAI->Start(false, pPlayer->GetGUID(), pQuest); + pEscortAI->Start(false, pPlayer, pQuest); } return true; } diff --git a/scripts/outland/shattrath_city.cpp b/scripts/outland/shattrath_city.cpp index 0465a89a7..a855dd7c0 100644 --- a/scripts/outland/shattrath_city.cpp +++ b/scripts/outland/shattrath_city.cpp @@ -410,7 +410,7 @@ struct MANGOS_DLL_DECL npc_khadgars_servantAI : public npc_escortAI npc_khadgars_servantAI(Creature* pCreature) : npc_escortAI(pCreature) { if (pCreature->GetOwner() && pCreature->GetOwner()->GetTypeId() == TYPEID_PLAYER) - Start(false, pCreature->GetOwner()->GetGUID()); + Start(false, (Player*)pCreature->GetOwner()); else error_log("SD2: npc_khadgars_servant can not obtain owner or owner is not a player."); diff --git a/scripts/outland/terokkar_forest.cpp b/scripts/outland/terokkar_forest.cpp index 846c264d4..e696784b8 100644 --- a/scripts/outland/terokkar_forest.cpp +++ b/scripts/outland/terokkar_forest.cpp @@ -357,7 +357,7 @@ bool QuestAccept_npc_akuno(Player* pPlayer, Creature* pCreature, const Quest* pQ pCreature->setFaction(FACTION_ESCORT_N_NEUTRAL_ACTIVE); DoScriptText(SAY_AKU_START, pCreature); - pEscortAI->Start(false, pPlayer->GetGUID(), pQuest); + pEscortAI->Start(false, pPlayer, pQuest); } } return true; @@ -776,7 +776,7 @@ bool QuestAccept_npc_letoll(Player* pPlayer, Creature* pCreature, const Quest* p DoScriptText(SAY_LE_START, pCreature); pCreature->setFaction(FACTION_ESCORT_N_NEUTRAL_PASSIVE); - pEscortAI->Start(false, pPlayer->GetGUID(), pQuest, true); + pEscortAI->Start(false, pPlayer, pQuest, true); } } @@ -1129,7 +1129,7 @@ bool QuestAccept_npc_isla_starmane(Player* pPlayer, Creature* pCreature, const Q if (npc_isla_starmaneAI* pEscortAI = dynamic_cast(pCreature->AI())) { pCreature->setFaction(pPlayer->GetTeam() == ALLIANCE ? FACTION_ESCORT_A_NEUTRAL_ACTIVE : FACTION_ESCORT_H_NEUTRAL_ACTIVE); - pEscortAI->Start(false, pPlayer->GetGUID(), pQuest); + pEscortAI->Start(false, pPlayer, pQuest); } } return true; diff --git a/scripts/outland/zangarmarsh.cpp b/scripts/outland/zangarmarsh.cpp index 5866ac72c..e8c2f225e 100644 --- a/scripts/outland/zangarmarsh.cpp +++ b/scripts/outland/zangarmarsh.cpp @@ -291,7 +291,7 @@ bool QuestAccept_npc_kayra_longmane(Player* pPlayer, Creature* pCreature, const DoScriptText(SAY_START, pCreature, pPlayer); if (npc_kayra_longmaneAI* pEscortAI = dynamic_cast(pCreature->AI())) - pEscortAI->Start(false, pPlayer->GetGUID(), pQuest); + pEscortAI->Start(false, pPlayer, pQuest); } return true; } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index c03cb6903..daac6c34b 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2095" + #define SD2_REVISION_NR "2096" #endif // __SD2_REVISION_NR_H__ From 6634b2ccb46bf16f8deb9b2c821000f1bab52058 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Thu, 12 May 2011 13:15:36 +0200 Subject: [PATCH 0076/1172] [2097] Make FollowerAI use ObjectGuid Signed-off-by: Schmoozerd --- base/follower_ai.cpp | 12 ++++++------ base/follower_ai.h | 2 +- sd2_revision_nr.h | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/base/follower_ai.cpp b/base/follower_ai.cpp index 018746274..2f5bfd126 100644 --- a/base/follower_ai.cpp +++ b/base/follower_ai.cpp @@ -20,7 +20,7 @@ enum }; FollowerAI::FollowerAI(Creature* pCreature) : ScriptedAI(pCreature), - m_uiLeaderGUID(0), + m_leaderGuid(), m_pQuestForFollow(NULL), m_uiUpdateFollowTimer(2500), m_uiFollowState(STATE_FOLLOW_NONE) @@ -121,7 +121,7 @@ void FollowerAI::MoveInLineOfSight(Unit* pWho) void FollowerAI::JustDied(Unit* pKiller) { - if (!HasFollowState(STATE_FOLLOW_INPROGRESS) || !m_uiLeaderGUID || !m_pQuestForFollow) + if (!HasFollowState(STATE_FOLLOW_INPROGRESS) || m_leaderGuid.IsEmpty() || !m_pQuestForFollow) return; //TODO: need a better check for quests with time limit. @@ -288,7 +288,7 @@ void FollowerAI::StartFollow(Player* pLeader, uint32 uiFactionForFollower, const } //set variables - m_uiLeaderGUID = pLeader->GetGUID(); + m_leaderGuid = pLeader->GetObjectGuid(); if (uiFactionForFollower) m_creature->setFaction(uiFactionForFollower); @@ -308,12 +308,12 @@ void FollowerAI::StartFollow(Player* pLeader, uint32 uiFactionForFollower, const m_creature->GetMotionMaster()->MoveFollow(pLeader, PET_FOLLOW_DIST, PET_FOLLOW_ANGLE); - debug_log("SD2: FollowerAI start follow %s (GUID " UI64FMTD ")", pLeader->GetName(), m_uiLeaderGUID); + debug_log("SD2: FollowerAI start follow %s (Guid %s)", pLeader->GetName(), m_leaderGuid.GetString()); } Player* FollowerAI::GetLeaderForFollower() { - if (Player* pLeader = m_creature->GetMap()->GetPlayer(m_uiLeaderGUID)) + if (Player* pLeader = m_creature->GetMap()->GetPlayer(m_leaderGuid)) { if (pLeader->isAlive()) return pLeader; @@ -328,7 +328,7 @@ Player* FollowerAI::GetLeaderForFollower() if (pMember && pMember->isAlive() && m_creature->IsWithinDistInMap(pMember, MAX_PLAYER_DISTANCE)) { debug_log("SD2: FollowerAI GetLeader changed and returned new leader."); - m_uiLeaderGUID = pMember->GetGUID(); + m_leaderGuid = pMember->GetObjectGuid(); return pMember; break; } diff --git a/base/follower_ai.h b/base/follower_ai.h index cc11dead1..0e782d243 100644 --- a/base/follower_ai.h +++ b/base/follower_ai.h @@ -55,7 +55,7 @@ class MANGOS_DLL_DECL FollowerAI : public ScriptedAI bool AssistPlayerInCombat(Unit* pWho); - uint64 m_uiLeaderGUID; + ObjectGuid m_leaderGuid; uint32 m_uiUpdateFollowTimer; uint32 m_uiFollowState; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index daac6c34b..dc0295c6e 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2096" + #define SD2_REVISION_NR "2097" #endif // __SD2_REVISION_NR_H__ From 492846a6593d26e1e526072cc462c425be7ff8ca Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Thu, 12 May 2011 17:00:32 +0200 Subject: [PATCH 0077/1172] [2098] Cleanup and use ObjectGuid for npc_garments_of_quests --- scripts/world/npcs_special.cpp | 134 ++++++++++++++++----------------- sd2_revision_nr.h | 2 +- 2 files changed, 67 insertions(+), 69 deletions(-) diff --git a/scripts/world/npcs_special.cpp b/scripts/world/npcs_special.cpp index 79dd0f11b..abda705ba 100644 --- a/scripts/world/npcs_special.cpp +++ b/scripts/world/npcs_special.cpp @@ -800,8 +800,6 @@ CreatureAI* GetAI_npc_doctor(Creature* pCreature) ## npc_garments_of_quests ######*/ -//TODO: get text for each NPC - enum { SPELL_LESSER_HEAL_R2 = 2052, @@ -834,39 +832,39 @@ enum struct MANGOS_DLL_DECL npc_garments_of_questsAI : public npc_escortAI { - npc_garments_of_questsAI(Creature* pCreature) : npc_escortAI(pCreature) {Reset();} + npc_garments_of_questsAI(Creature* pCreature) : npc_escortAI(pCreature) { Reset(); } - uint64 caster; + ObjectGuid m_playerGuid; - bool bIsHealed; - bool bCanRun; + bool m_bIsHealed; + bool m_bCanRun; - uint32 RunAwayTimer; + uint32 m_uiRunAwayTimer; void Reset() { - caster = 0; + m_playerGuid = ObjectGuid(); - bIsHealed = false; - bCanRun = false; + m_bIsHealed = false; + m_bCanRun = false; - RunAwayTimer = 5000; + m_uiRunAwayTimer = 5000; m_creature->SetStandState(UNIT_STAND_STATE_KNEEL); - //expect database to have RegenHealth=0 + // expect database to have RegenHealth=0 m_creature->SetHealth(int(m_creature->GetMaxHealth()*0.7)); } - void SpellHit(Unit* pCaster, const SpellEntry *Spell) + void SpellHit(Unit* pCaster, const SpellEntry* pSpell) { - if (Spell->Id == SPELL_LESSER_HEAL_R2 || Spell->Id == SPELL_FORTITUDE_R1) + if (pSpell->Id == SPELL_LESSER_HEAL_R2 || pSpell->Id == SPELL_FORTITUDE_R1) { - //not while in combat + // not while in combat if (m_creature->isInCombat()) return; - //nothing to be done now - if (bIsHealed && bCanRun) + // nothing to be done now + if (m_bIsHealed && m_bCanRun) return; if (pCaster->GetTypeId() == TYPEID_PLAYER) @@ -876,125 +874,125 @@ struct MANGOS_DLL_DECL npc_garments_of_questsAI : public npc_escortAI case ENTRY_SHAYA: if (((Player*)pCaster)->GetQuestStatus(QUEST_MOON) == QUEST_STATUS_INCOMPLETE) { - if (bIsHealed && !bCanRun && Spell->Id == SPELL_FORTITUDE_R1) + if (m_bIsHealed && !m_bCanRun && pSpell->Id == SPELL_FORTITUDE_R1) { - DoScriptText(SAY_SHAYA_THANKS,m_creature,pCaster); - bCanRun = true; + DoScriptText(SAY_SHAYA_THANKS, m_creature, pCaster); + m_bCanRun = true; } - else if (!bIsHealed && Spell->Id == SPELL_LESSER_HEAL_R2) + else if (!m_bIsHealed && pSpell->Id == SPELL_LESSER_HEAL_R2) { - caster = pCaster->GetGUID(); + m_playerGuid = pCaster->GetObjectGuid(); m_creature->SetStandState(UNIT_STAND_STATE_STAND); - DoScriptText(SAY_COMMON_HEALED,m_creature,pCaster); - bIsHealed = true; + DoScriptText(SAY_COMMON_HEALED, m_creature, pCaster); + m_bIsHealed = true; } } break; case ENTRY_ROBERTS: if (((Player*)pCaster)->GetQuestStatus(QUEST_LIGHT_1) == QUEST_STATUS_INCOMPLETE) { - if (bIsHealed && !bCanRun && Spell->Id == SPELL_FORTITUDE_R1) + if (m_bIsHealed && !m_bCanRun && pSpell->Id == SPELL_FORTITUDE_R1) { - DoScriptText(SAY_ROBERTS_THANKS,m_creature,pCaster); - bCanRun = true; + DoScriptText(SAY_ROBERTS_THANKS, m_creature, pCaster); + m_bCanRun = true; } - else if (!bIsHealed && Spell->Id == SPELL_LESSER_HEAL_R2) + else if (!m_bIsHealed && pSpell->Id == SPELL_LESSER_HEAL_R2) { - caster = pCaster->GetGUID(); + m_playerGuid = pCaster->GetObjectGuid(); m_creature->SetStandState(UNIT_STAND_STATE_STAND); - DoScriptText(SAY_COMMON_HEALED,m_creature,pCaster); - bIsHealed = true; + DoScriptText(SAY_COMMON_HEALED, m_creature, pCaster); + m_bIsHealed = true; } } break; case ENTRY_DOLF: if (((Player*)pCaster)->GetQuestStatus(QUEST_LIGHT_2) == QUEST_STATUS_INCOMPLETE) { - if (bIsHealed && !bCanRun && Spell->Id == SPELL_FORTITUDE_R1) + if (m_bIsHealed && !m_bCanRun && pSpell->Id == SPELL_FORTITUDE_R1) { - DoScriptText(SAY_DOLF_THANKS,m_creature,pCaster); - bCanRun = true; + DoScriptText(SAY_DOLF_THANKS, m_creature, pCaster); + m_bCanRun = true; } - else if (!bIsHealed && Spell->Id == SPELL_LESSER_HEAL_R2) + else if (!m_bIsHealed && pSpell->Id == SPELL_LESSER_HEAL_R2) { - caster = pCaster->GetGUID(); + m_playerGuid = pCaster->GetObjectGuid(); m_creature->SetStandState(UNIT_STAND_STATE_STAND); - DoScriptText(SAY_COMMON_HEALED,m_creature,pCaster); - bIsHealed = true; + DoScriptText(SAY_COMMON_HEALED, m_creature, pCaster); + m_bIsHealed = true; } } break; case ENTRY_KORJA: if (((Player*)pCaster)->GetQuestStatus(QUEST_SPIRIT) == QUEST_STATUS_INCOMPLETE) { - if (bIsHealed && !bCanRun && Spell->Id == SPELL_FORTITUDE_R1) + if (m_bIsHealed && !m_bCanRun && pSpell->Id == SPELL_FORTITUDE_R1) { - DoScriptText(SAY_KORJA_THANKS,m_creature,pCaster); - bCanRun = true; + DoScriptText(SAY_KORJA_THANKS, m_creature, pCaster); + m_bCanRun = true; } - else if (!bIsHealed && Spell->Id == SPELL_LESSER_HEAL_R2) + else if (!m_bIsHealed && pSpell->Id == SPELL_LESSER_HEAL_R2) { - caster = pCaster->GetGUID(); + m_playerGuid = pCaster->GetObjectGuid(); m_creature->SetStandState(UNIT_STAND_STATE_STAND); - DoScriptText(SAY_COMMON_HEALED,m_creature,pCaster); - bIsHealed = true; + DoScriptText(SAY_COMMON_HEALED, m_creature, pCaster); + m_bIsHealed = true; } } break; case ENTRY_DG_KEL: if (((Player*)pCaster)->GetQuestStatus(QUEST_DARKNESS) == QUEST_STATUS_INCOMPLETE) { - if (bIsHealed && !bCanRun && Spell->Id == SPELL_FORTITUDE_R1) + if (m_bIsHealed && !m_bCanRun && pSpell->Id == SPELL_FORTITUDE_R1) { - DoScriptText(SAY_DG_KEL_THANKS,m_creature,pCaster); - bCanRun = true; + DoScriptText(SAY_DG_KEL_THANKS, m_creature, pCaster); + m_bCanRun = true; } - else if (!bIsHealed && Spell->Id == SPELL_LESSER_HEAL_R2) + else if (!m_bIsHealed && pSpell->Id == SPELL_LESSER_HEAL_R2) { - caster = pCaster->GetGUID(); + m_playerGuid = pCaster->GetObjectGuid(); m_creature->SetStandState(UNIT_STAND_STATE_STAND); - DoScriptText(SAY_COMMON_HEALED,m_creature,pCaster); - bIsHealed = true; + DoScriptText(SAY_COMMON_HEALED, m_creature, pCaster); + m_bIsHealed = true; } } break; } - //give quest credit, not expect any special quest objectives - if (bCanRun) + // give quest credit, not expect any special quest objectives + if (m_bCanRun) ((Player*)pCaster)->TalkedToCreature(m_creature->GetEntry(), m_creature->GetObjectGuid()); } } } - void WaypointReached(uint32 uiPoint) - { - } + void WaypointReached(uint32 uiPointId) {} - void UpdateEscortAI(const uint32 diff) + void UpdateEscortAI(const uint32 uiDiff) { - if (bCanRun && !m_creature->isInCombat()) + if (m_bCanRun && !m_creature->isInCombat()) { - if (RunAwayTimer <= diff) + if (m_uiRunAwayTimer <= uiDiff) { - if (Player* pPlayer = m_creature->GetMap()->GetPlayer(caster)) + if (Player* pPlayer = m_creature->GetMap()->GetPlayer(m_playerGuid)) { switch(m_creature->GetEntry()) { - case ENTRY_SHAYA: DoScriptText(SAY_SHAYA_GOODBYE, m_creature, pPlayer); break; + case ENTRY_SHAYA: DoScriptText(SAY_SHAYA_GOODBYE, m_creature, pPlayer); break; case ENTRY_ROBERTS: DoScriptText(SAY_ROBERTS_GOODBYE, m_creature, pPlayer); break; - case ENTRY_DOLF: DoScriptText(SAY_DOLF_GOODBYE, m_creature, pPlayer); break; - case ENTRY_KORJA: DoScriptText(SAY_KORJA_GOODBYE, m_creature, pPlayer); break; - case ENTRY_DG_KEL: DoScriptText(SAY_DG_KEL_GOODBYE, m_creature, pPlayer); break; + case ENTRY_DOLF: DoScriptText(SAY_DOLF_GOODBYE, m_creature, pPlayer); break; + case ENTRY_KORJA: DoScriptText(SAY_KORJA_GOODBYE, m_creature, pPlayer); break; + case ENTRY_DG_KEL: DoScriptText(SAY_DG_KEL_GOODBYE, m_creature, pPlayer); break; } Start(true); } else - EnterEvadeMode(); //something went wrong + EnterEvadeMode(); // something went wrong - RunAwayTimer = 30000; - }else RunAwayTimer -= diff; + m_uiRunAwayTimer = 30000; + } + else + m_uiRunAwayTimer -= uiDiff; } if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index dc0295c6e..1699f792b 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2097" + #define SD2_REVISION_NR "2098" #endif // __SD2_REVISION_NR_H__ From f4e0c67faa3ce3a39360f8ed41e188995ada4c27 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Thu, 12 May 2011 17:03:52 +0200 Subject: [PATCH 0078/1172] [2099] Use ObjectGuid in GO-related helper functions in sc_instance * Replace uint64 in DoUseDoorOrButton * Replace uint64 in DoRespawnGameObject Signed-off-by: Schmoozerd --- include/sc_instance.cpp | 19 +++++++++++-------- include/sc_instance.h | 4 ++-- sd2_revision_nr.h | 2 +- 3 files changed, 14 insertions(+), 11 deletions(-) diff --git a/include/sc_instance.cpp b/include/sc_instance.cpp index d192ecc14..09a551b0e 100644 --- a/include/sc_instance.cpp +++ b/include/sc_instance.cpp @@ -5,12 +5,12 @@ #include "precompiled.h" //Optional uiWithRestoreTime. If not defined, autoCloseTime will be used (if not 0 by default in *_template) -void ScriptedInstance::DoUseDoorOrButton(uint64 uiGuid, uint32 uiWithRestoreTime, bool bUseAlternativeState) +void ScriptedInstance::DoUseDoorOrButton(ObjectGuid guid, uint32 uiWithRestoreTime, bool bUseAlternativeState) { - if (!uiGuid) + if (guid.IsEmpty()) return; - if (GameObject* pGo = instance->GetGameObject(uiGuid)) + if (GameObject* pGo = instance->GetGameObject(guid)) { if (pGo->GetGoType() == GAMEOBJECT_TYPE_DOOR || pGo->GetGoType() == GAMEOBJECT_TYPE_BUTTON) { @@ -20,17 +20,20 @@ void ScriptedInstance::DoUseDoorOrButton(uint64 uiGuid, uint32 uiWithRestoreTime pGo->ResetDoorOrButton(); } else - error_log("SD2: Script call DoUseDoorOrButton, but gameobject entry %u is type %u.",pGo->GetEntry(),pGo->GetGoType()); + error_log("SD2: Script call DoUseDoorOrButton, but gameobject entry %u is type %u.", pGo->GetEntry(), pGo->GetGoType()); } } -void ScriptedInstance::DoRespawnGameObject(uint64 uiGuid, uint32 uiTimeToDespawn) +void ScriptedInstance::DoRespawnGameObject(ObjectGuid guid, uint32 uiTimeToDespawn) { - if (GameObject* pGo = instance->GetGameObject(uiGuid)) + if (guid.IsEmpty()) + return; + + if (GameObject* pGo = instance->GetGameObject(guid)) { //not expect any of these should ever be handled - if (pGo->GetGoType()==GAMEOBJECT_TYPE_FISHINGNODE || pGo->GetGoType()==GAMEOBJECT_TYPE_DOOR || - pGo->GetGoType()==GAMEOBJECT_TYPE_BUTTON || pGo->GetGoType()==GAMEOBJECT_TYPE_TRAP) + if (pGo->GetGoType() == GAMEOBJECT_TYPE_FISHINGNODE || pGo->GetGoType() == GAMEOBJECT_TYPE_DOOR || + pGo->GetGoType() == GAMEOBJECT_TYPE_BUTTON || pGo->GetGoType() == GAMEOBJECT_TYPE_TRAP) return; if (pGo->isSpawned()) diff --git a/include/sc_instance.h b/include/sc_instance.h index 27a70a584..e6b6d90af 100644 --- a/include/sc_instance.h +++ b/include/sc_instance.h @@ -31,10 +31,10 @@ class MANGOS_DLL_DECL ScriptedInstance : public InstanceData ~ScriptedInstance() {} // Change active state of doors or buttons - void DoUseDoorOrButton(uint64 uiGuid, uint32 uiWithRestoreTime = 0, bool bUseAlternativeState = false); + void DoUseDoorOrButton(ObjectGuid guid, uint32 uiWithRestoreTime = 0, bool bUseAlternativeState = false); // Respawns a GO having negative spawntimesecs in gameobject-table - void DoRespawnGameObject(uint64 uiGuid, uint32 uiTimeToDespawn = MINUTE); + void DoRespawnGameObject(ObjectGuid guid, uint32 uiTimeToDespawn = MINUTE); // Sends world state update to all players in instance void DoUpdateWorldState(uint32 uiStateId, uint32 uiStateData); diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 1699f792b..4bb3524ec 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2098" + #define SD2_REVISION_NR "2099" #endif // __SD2_REVISION_NR_H__ From 1a3734a1b3c12824291bbadcca79bf9942577a9a Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Thu, 12 May 2011 23:32:54 +0200 Subject: [PATCH 0079/1172] [2100] Remove uint64 GUIDs in world/ scripts --- scripts/world/guards.cpp | 28 ++++++++++++-------------- scripts/world/npcs_special.cpp | 36 +++++++++++++++++----------------- sd2_revision_nr.h | 2 +- 3 files changed, 31 insertions(+), 35 deletions(-) diff --git a/scripts/world/guards.cpp b/scripts/world/guards.cpp index 472d6bd9b..ff3423171 100644 --- a/scripts/world/guards.cpp +++ b/scripts/world/guards.cpp @@ -122,14 +122,14 @@ struct MANGOS_DLL_DECL guard_shattrath_aldorAI : public guardAI uint32 m_uiExile_Timer; uint32 m_uiBanish_Timer; - uint64 m_uiPlayerGUID; + ObjectGuid m_playerGuid; bool m_bCanTeleport; void Reset() { m_uiBanish_Timer = 5000; m_uiExile_Timer = 8500; - m_uiPlayerGUID = 0; + m_playerGuid.Clear(); m_bCanTeleport = false; } @@ -142,13 +142,13 @@ struct MANGOS_DLL_DECL guard_shattrath_aldorAI : public guardAI { if (m_uiExile_Timer < uiDiff) { - if (Player* pTarget = m_creature->GetMap()->GetPlayer(m_uiPlayerGUID)) + if (Player* pTarget = m_creature->GetMap()->GetPlayer(m_playerGuid)) { pTarget->CastSpell(pTarget, SPELL_EXILE, true); pTarget->CastSpell(pTarget, SPELL_BANISH_TELEPORT, true); } - m_uiPlayerGUID = 0; + m_playerGuid.Clear(); m_uiExile_Timer = 8500; m_bCanTeleport = false; } @@ -163,10 +163,8 @@ struct MANGOS_DLL_DECL guard_shattrath_aldorAI : public guardAI { DoCastSpellIfCan(pVictim, SPELL_BANISHED_SHATTRATH_A); m_uiBanish_Timer = 9000; - m_uiPlayerGUID = pVictim->GetGUID(); - - if (m_uiPlayerGUID) - m_bCanTeleport = true; + m_playerGuid = pVictim->GetObjectGuid(); + m_bCanTeleport = true; } } else @@ -191,14 +189,14 @@ struct MANGOS_DLL_DECL guard_shattrath_scryerAI : public guardAI uint32 m_uiExile_Timer; uint32 m_uiBanish_Timer; - uint64 m_uiPlayerGUID; + ObjectGuid m_playerGuid; bool m_bCanTeleport; void Reset() { m_uiBanish_Timer = 5000; m_uiExile_Timer = 8500; - m_uiPlayerGUID = 0; + m_playerGuid.Clear(); m_bCanTeleport = false; } @@ -211,13 +209,13 @@ struct MANGOS_DLL_DECL guard_shattrath_scryerAI : public guardAI { if (m_uiExile_Timer < uiDiff) { - if (Player* pTarget = m_creature->GetMap()->GetPlayer(m_uiPlayerGUID)) + if (Player* pTarget = m_creature->GetMap()->GetPlayer(m_playerGuid)) { pTarget->CastSpell(pTarget, SPELL_EXILE, true); pTarget->CastSpell(pTarget, SPELL_BANISH_TELEPORT, true); } - m_uiPlayerGUID = 0; + m_playerGuid.Clear(); m_uiExile_Timer = 8500; m_bCanTeleport = false; } @@ -232,10 +230,8 @@ struct MANGOS_DLL_DECL guard_shattrath_scryerAI : public guardAI { DoCastSpellIfCan(pVictim, SPELL_BANISHED_SHATTRATH_S); m_uiBanish_Timer = 9000; - m_uiPlayerGUID = pVictim->GetGUID(); - - if (m_uiPlayerGUID) - m_bCanTeleport = true; + m_playerGuid = pVictim->GetObjectGuid(); + m_bCanTeleport = true; } } else diff --git a/scripts/world/npcs_special.cpp b/scripts/world/npcs_special.cpp index abda705ba..697eccf09 100644 --- a/scripts/world/npcs_special.cpp +++ b/scripts/world/npcs_special.cpp @@ -107,7 +107,7 @@ struct MANGOS_DLL_DECL npc_air_force_botsAI : public ScriptedAI npc_air_force_botsAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pSpawnAssoc = NULL; - m_uiSpawnedGUID = 0; + m_spawnedGuid = ObjectGuid(); // find the correct spawnhandling static uint32 uiEntryCount = sizeof(m_aSpawnAssociations)/sizeof(SpawnAssociation); @@ -137,7 +137,7 @@ struct MANGOS_DLL_DECL npc_air_force_botsAI : public ScriptedAI } SpawnAssociation* m_pSpawnAssoc; - uint64 m_uiSpawnedGUID; + ObjectGuid m_spawnedGuid; void Reset() { } @@ -146,7 +146,7 @@ struct MANGOS_DLL_DECL npc_air_force_botsAI : public ScriptedAI Creature* pSummoned = m_creature->SummonCreature(m_pSpawnAssoc->m_uiSpawnedCreatureEntry, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 300000); if (pSummoned) - m_uiSpawnedGUID = pSummoned->GetGUID(); + m_spawnedGuid = pSummoned->GetObjectGuid(); else { error_db_log("SD2: npc_air_force_bots: wasn't able to spawn creature %u", m_pSpawnAssoc->m_uiSpawnedCreatureEntry); @@ -158,7 +158,7 @@ struct MANGOS_DLL_DECL npc_air_force_botsAI : public ScriptedAI Creature* GetSummonedGuard() { - Creature* pCreature = m_creature->GetMap()->GetCreature(m_uiSpawnedGUID); + Creature* pCreature = m_creature->GetMap()->GetCreature(m_spawnedGuid); if (pCreature && pCreature->isAlive()) return pCreature; @@ -179,11 +179,11 @@ struct MANGOS_DLL_DECL npc_air_force_botsAI : public ScriptedAI if (!pPlayerTarget) return; - Creature* pLastSpawnedGuard = m_uiSpawnedGUID == 0 ? NULL : GetSummonedGuard(); + Creature* pLastSpawnedGuard = m_spawnedGuid.IsEmpty() ? NULL : GetSummonedGuard(); // prevent calling GetCreature at next MoveInLineOfSight call - speedup if (!pLastSpawnedGuard) - m_uiSpawnedGUID = 0; + m_spawnedGuid.Clear(); switch(m_pSpawnAssoc->m_SpawnType) { @@ -478,7 +478,7 @@ struct MANGOS_DLL_DECL npc_doctorAI : public ScriptedAI { npc_doctorAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} - uint64 Playerguid; + ObjectGuid m_playerGuid; uint32 SummonPatient_Timer; uint32 SummonPatientCount; @@ -492,7 +492,7 @@ struct MANGOS_DLL_DECL npc_doctorAI : public ScriptedAI void Reset() { - Playerguid = 0; + m_playerGuid.Clear(); SummonPatient_Timer = 10000; SummonPatientCount = 0; @@ -521,12 +521,12 @@ struct MANGOS_DLL_DECL npc_injured_patientAI : public ScriptedAI { npc_injured_patientAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} - uint64 Doctorguid; + ObjectGuid m_doctorGuid; Location* Coord; void Reset() { - Doctorguid = 0; + m_doctorGuid.Clear(); Coord = NULL; //no select @@ -561,9 +561,9 @@ struct MANGOS_DLL_DECL npc_injured_patientAI : public ScriptedAI { if ((((Player*)caster)->GetQuestStatus(6624) == QUEST_STATUS_INCOMPLETE) || (((Player*)caster)->GetQuestStatus(6622) == QUEST_STATUS_INCOMPLETE)) { - if (Doctorguid) + if (!m_doctorGuid.IsEmpty()) { - if (Creature* pDoctor = m_creature->GetMap()->GetCreature(Doctorguid)) + if (Creature* pDoctor = m_creature->GetMap()->GetCreature(m_doctorGuid)) { if (npc_doctorAI* pDocAI = dynamic_cast(pDoctor->AI())) pDocAI->PatientSaved(m_creature, (Player*)caster, Coord); @@ -619,9 +619,9 @@ struct MANGOS_DLL_DECL npc_injured_patientAI : public ScriptedAI m_creature->SetDeathState(JUST_DIED); m_creature->SetFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_DEAD); - if (Doctorguid) + if (!m_doctorGuid.IsEmpty()) { - if (Creature* pDoctor = m_creature->GetMap()->GetCreature(Doctorguid)) + if (Creature* pDoctor = m_creature->GetMap()->GetCreature(m_doctorGuid)) { if (npc_doctorAI* pDocAI = dynamic_cast(pDoctor->AI())) pDocAI->PatientDied(Coord); @@ -642,7 +642,7 @@ npc_doctor (continue) void npc_doctorAI::BeginEvent(Player* pPlayer) { - Playerguid = pPlayer->GetGUID(); + m_playerGuid = pPlayer->GetObjectGuid(); SummonPatient_Timer = 10000; SummonPatientCount = 0; @@ -667,7 +667,7 @@ void npc_doctorAI::BeginEvent(Player* pPlayer) void npc_doctorAI::PatientDied(Location* Point) { - Player* pPlayer = m_creature->GetMap()->GetPlayer(Playerguid); + Player* pPlayer = m_creature->GetMap()->GetPlayer(m_playerGuid); if (pPlayer && ((pPlayer->GetQuestStatus(6624) == QUEST_STATUS_INCOMPLETE) || (pPlayer->GetQuestStatus(6622) == QUEST_STATUS_INCOMPLETE))) { @@ -693,7 +693,7 @@ void npc_doctorAI::PatientDied(Location* Point) void npc_doctorAI::PatientSaved(Creature* soldier, Player* pPlayer, Location* Point) { - if (pPlayer && Playerguid == pPlayer->GetGUID()) + if (pPlayer && m_playerGuid == pPlayer->GetObjectGuid()) { if ((pPlayer->GetQuestStatus(QUEST_TRIAGE_A) == QUEST_STATUS_INCOMPLETE) || (pPlayer->GetQuestStatus(QUEST_TRIAGE_H) == QUEST_STATUS_INCOMPLETE)) { @@ -766,7 +766,7 @@ void npc_doctorAI::UpdateAI(const uint32 diff) if (pPatientAI) { - pPatientAI->Doctorguid = m_creature->GetGUID(); + pPatientAI->m_doctorGuid = m_creature->GetObjectGuid(); if (Point) pPatientAI->Coord = Point; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 4bb3524ec..7e1de702d 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2099" + #define SD2_REVISION_NR "2100" #endif // __SD2_REVISION_NR_H__ From 7a8bb032177ac4fd9dc32b10e60f9a6d7c3841f2 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Tue, 10 May 2011 18:28:29 +0200 Subject: [PATCH 0080/1172] [2101] Implement quest 8490 - Powering our Defenses Thanks to crackm and zogga99 for research Also add lost ';' at last sql update file (thanks to Jethrogibbs for pointing) Signed-off-by: Schmoozerd --- scripts/eastern_kingdoms/eversong_woods.cpp | 112 +++++++++++++++++++- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 + sql/scriptdev2_script_full.sql | 4 +- sql/updates/r2092_scriptdev2.sql | 2 +- sql/updates/r2101_mangos.sql | 1 + sql/updates/r2101_scriptdev2.sql | 3 + 7 files changed, 121 insertions(+), 4 deletions(-) create mode 100644 sql/updates/r2101_mangos.sql create mode 100644 sql/updates/r2101_scriptdev2.sql diff --git a/scripts/eastern_kingdoms/eversong_woods.cpp b/scripts/eastern_kingdoms/eversong_woods.cpp index 08eac18f5..5fcfbba66 100644 --- a/scripts/eastern_kingdoms/eversong_woods.cpp +++ b/scripts/eastern_kingdoms/eversong_woods.cpp @@ -17,7 +17,7 @@ /* ScriptData SDName: Eversong_Woods SD%Complete: 100 -SDComment: Quest support: 8483, 8488, 9686 +SDComment: Quest support: 8483, 8488, 8490, 9686 SDCategory: Eversong Woods EndScriptData */ @@ -26,10 +26,12 @@ npc_kelerun_bloodmourn go_harbinger_second_trial npc_prospector_anvilward npc_apprentice_mirveda +npc_infused_crystal EndContentData */ #include "precompiled.h" #include "escort_ai.h" +#include "TemporarySummon.h" /*###### ## npc_kelerun_bloodmourn @@ -434,6 +436,109 @@ CreatureAI* GetAI_npc_apprentice_mirvedaAI(Creature* pCreature) return new npc_apprentice_mirvedaAI (pCreature); } +/*###### +## npc_infused_crystal +######*/ + +enum +{ + QUEST_POWERING_OUR_DEFENSES = 8490, + SAY_DEFENSE_FINISH = -1000668, + NPC_ENRAGED_WRAITH = 17086, +}; + +static const float aSummonPos[6][4] = +{ + {8250.539f, -7239.028f, 139.7099f, 0.8975816f}, + {8263.437f, -7181.188f, 139.4102f, 5.237229f}, + {8317.124f, -7210.098f, 140.1064f, 3.022202f}, + {8293.848f, -7179.062f, 138.6693f, 4.153376f}, + {8239.229f, -7207.673f, 139.1196f, 0.06059111f}, + {8301.548f, -7247.548f, 139.974f, 1.828518f} +}; + +struct MANGOS_DLL_DECL npc_infused_crystalAI : public Scripted_NoMovementAI +{ + npc_infused_crystalAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) + { + m_bFirstWave = true; + m_uiWaveTimer = 1000; + m_uiKilledCount = 0; + m_uiFinishTimer = 60*IN_MILLISECONDS; + Reset(); + } + + bool m_bFirstWave; + uint32 m_uiWaveTimer; + uint8 m_uiKilledCount; + uint32 m_uiFinishTimer; + + void Reset() {} + + void JustSummoned(Creature* pSummoned) + { + pSummoned->AI()->AttackStart(m_creature); + } + + void SummonedCreatureJustDied(Creature* pSummoned) + { + ++m_uiKilledCount; + + if (m_uiKilledCount == 3) + m_uiWaveTimer = std::min(m_uiWaveTimer, (uint32)10000); + } + + void UpdateAI(const uint32 uiDiff) + { + if (m_uiWaveTimer) + { + if (m_uiWaveTimer <= uiDiff) + { + if (m_bFirstWave) + { + for (uint8 i = 0; i < 3; ++i) + m_creature->SummonCreature(NPC_ENRAGED_WRAITH, aSummonPos[i][0], aSummonPos[i][1], aSummonPos[i][2], aSummonPos[i][3], TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 5*MINUTE); + m_uiWaveTimer = 29000; + m_bFirstWave = false; + } + else + { + for (uint8 i = 3; i < 6; ++i) + m_creature->SummonCreature(NPC_ENRAGED_WRAITH, aSummonPos[i][0], aSummonPos[i][1], aSummonPos[i][2], aSummonPos[i][3], TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 5*MINUTE); + m_uiWaveTimer = 0; + } + } + else + m_uiWaveTimer -= uiDiff; + } + + if (m_uiFinishTimer) + { + if (m_uiFinishTimer <= uiDiff) + { + DoScriptText(SAY_DEFENSE_FINISH, m_creature); + if (m_creature->IsTemporarySummon()) + { + TemporarySummon* pTemporary = (TemporarySummon*)m_creature; + + if (Player* pPlayer = m_creature->GetMap()->GetPlayer(pTemporary->GetSummonerGuid())) + pPlayer->KilledMonsterCredit(m_creature->GetEntry(), m_creature->GetObjectGuid()); + } + m_uiFinishTimer = 0; + m_creature->ForcedDespawn(1000); + } + else + m_uiFinishTimer -= uiDiff; + } + } +}; + +CreatureAI* GetAI_npc_infused_crystalAI(Creature* pCreature) +{ + return new npc_infused_crystalAI (pCreature); +} + + void AddSC_eversong_woods() { Script* pNewScript; @@ -461,4 +566,9 @@ void AddSC_eversong_woods() pNewScript->GetAI = &GetAI_npc_apprentice_mirvedaAI; pNewScript->pQuestAcceptNPC = &QuestAccept_unexpected_results; pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_infused_crystal"; + pNewScript->GetAI = &GetAI_npc_infused_crystalAI; + pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 7e1de702d..59814e487 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2100" + #define SD2_REVISION_NR "2101" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 5250f9320..e03c644b9 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -554,6 +554,7 @@ UPDATE creature_template SET ScriptName='npc_kelerun_bloodmourn' WHERE entry=178 UPDATE gameobject_template SET ScriptName='go_harbinger_second_trial' WHERE entry=182052; UPDATE creature_template SET ScriptName='npc_prospector_anvilward' WHERE entry=15420; UPDATE creature_template SET ScriptName='npc_apprentice_mirveda' WHERE entry=15402; +UPDATE creature_template SET ScriptName='npc_infused_crystal' WHERE entry=16364; /* FELWOOD */ DELETE FROM scripted_event_id WHERE id=8328; diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index e91c7f244..d2cf11b8a 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -717,7 +717,9 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1000665,'The Destructive Ward is fully charged!',0,5,0,0,'destructive ward SAY_WARD_CHARGED'), (-1000666,'I can sense the SHADOW on your hearts. There can be no rest for the wicked!',0,1,0,0,'lethon SAY_LETHON_AGGRO'), -(-1000667,'Your wicked souls shall feed my power!',0,1,0,0,'lethon SAY_LETHON_SHADE'); +(-1000667,'Your wicked souls shall feed my power!',0,1,0,0,'lethon SAY_LETHON_SHADE'), + +(-1000668,'%s releases the last of its energies into the nearby runestone, successfully reactivating it.',0,2,0,0,'infused crystal SAY_DEFENSE_FINISH'); -- -1 033 000 SHADOWFANG KEEP INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES diff --git a/sql/updates/r2092_scriptdev2.sql b/sql/updates/r2092_scriptdev2.sql index 61392aa7a..68402546e 100644 --- a/sql/updates/r2092_scriptdev2.sql +++ b/sql/updates/r2092_scriptdev2.sql @@ -1,4 +1,4 @@ DELETE FROM script_texts where entry IN (-1000666, -1000667); INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES (-1000666,'I can sense the SHADOW on your hearts. There can be no rest for the wicked!',0,1,0,0,'lethon SAY_LETHON_AGGRO'), -(-1000667,'Your wicked souls shall feed my power!',0,1,0,0,'lethon SAY_LETHON_SHADE') +(-1000667,'Your wicked souls shall feed my power!',0,1,0,0,'lethon SAY_LETHON_SHADE'); diff --git a/sql/updates/r2101_mangos.sql b/sql/updates/r2101_mangos.sql new file mode 100644 index 000000000..45c9a7f72 --- /dev/null +++ b/sql/updates/r2101_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_infused_crystal' WHERE entry=16364; diff --git a/sql/updates/r2101_scriptdev2.sql b/sql/updates/r2101_scriptdev2.sql new file mode 100644 index 000000000..b76790194 --- /dev/null +++ b/sql/updates/r2101_scriptdev2.sql @@ -0,0 +1,3 @@ +DELETE FROM script_texts WHERE entry=-1000668; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1000668,'%s releases the last of its energies into the nearby runestone, successfully reactivating it.',0,2,0,0,'infused crystal SAY_DEFENSE_FINISH'); From 2e86a8afd6d03a48b18f55f9f689fbb8c6236ae3 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Fri, 13 May 2011 14:42:02 +0200 Subject: [PATCH 0081/1172] [2102] Fix Compile for gcc, thanks to pyromaniac for pointing --- base/escort_ai.cpp | 2 +- base/follower_ai.cpp | 2 +- sd2_revision_nr.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/base/escort_ai.cpp b/base/escort_ai.cpp index b140e1c52..1645ba93e 100644 --- a/base/escort_ai.cpp +++ b/base/escort_ai.cpp @@ -495,7 +495,7 @@ void npc_escortAI::Start(bool bRun, const Player* pPlayer, const Quest* pQuest, //disable npcflags m_creature->SetUInt32Value(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_NONE); - debug_log("SD2: EscortAI started with " SIZEFMTD " waypoints. Run = %d, PlayerGuid = %s", WaypointList.size(), m_bIsRunning, m_playerGuid.GetString()); + debug_log("SD2: EscortAI started with " SIZEFMTD " waypoints. Run = %d, PlayerGuid = %s", WaypointList.size(), m_bIsRunning, m_playerGuid.GetString().c_str()); CurrentWP = WaypointList.begin(); diff --git a/base/follower_ai.cpp b/base/follower_ai.cpp index 2f5bfd126..af9d3d07e 100644 --- a/base/follower_ai.cpp +++ b/base/follower_ai.cpp @@ -308,7 +308,7 @@ void FollowerAI::StartFollow(Player* pLeader, uint32 uiFactionForFollower, const m_creature->GetMotionMaster()->MoveFollow(pLeader, PET_FOLLOW_DIST, PET_FOLLOW_ANGLE); - debug_log("SD2: FollowerAI start follow %s (Guid %s)", pLeader->GetName(), m_leaderGuid.GetString()); + debug_log("SD2: FollowerAI start follow %s (Guid %s)", pLeader->GetName(), m_leaderGuid.GetString().c_str()); } Player* FollowerAI::GetLeaderForFollower() diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 59814e487..86c91a44f 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2101" + #define SD2_REVISION_NR "2102" #endif // __SD2_REVISION_NR_H__ From 32b312c5e5ba8330becc709a6fceafedf0879294 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Fri, 13 May 2011 16:01:47 +0200 Subject: [PATCH 0082/1172] [2103] Replace uint64 GUIDs with ObjectGuid in outland/ zone scripts Further changes: * npc_dragonmaw_peon - remove unneeded IsAlive check in UpdateAI (UpdateAI is only called for alive creatures by core) * reorder shadowmoon_valley.cpp - move npc_totem_of_spirits to proper place * npc_manaforge_control_console - add support for player leaving * npc_ancestral_wolfAI - remove unneeded stored pointer, replace with GridSearcher in last point --- scripts/outland/hellfire_peninsula.cpp | 12 +- scripts/outland/netherstorm.cpp | 137 ++++----- scripts/outland/shadowmoon_valley.cpp | 404 ++++++++++++------------- scripts/outland/shattrath_city.cpp | 64 ++-- sd2_revision_nr.h | 2 +- 5 files changed, 301 insertions(+), 318 deletions(-) diff --git a/scripts/outland/hellfire_peninsula.cpp b/scripts/outland/hellfire_peninsula.cpp index 090565a08..7b44a545c 100644 --- a/scripts/outland/hellfire_peninsula.cpp +++ b/scripts/outland/hellfire_peninsula.cpp @@ -156,22 +156,11 @@ struct MANGOS_DLL_DECL npc_ancestral_wolfAI : public npc_escortAI Reset(); } - Unit* pRyga; - void Reset() { - pRyga = NULL; m_creature->CastSpell(m_creature, SPELL_ANCESTRAL_WOLF_BUFF, true); } - void MoveInLineOfSight(Unit* pWho) - { - if (!pRyga && pWho->GetTypeId() == TYPEID_UNIT && pWho->GetEntry() == NPC_RYGA && m_creature->IsWithinDistInMap(pWho, 15.0f)) - pRyga = pWho; - - npc_escortAI::MoveInLineOfSight(pWho); - } - void WaypointReached(uint32 uiPointId) { switch(uiPointId) @@ -183,6 +172,7 @@ struct MANGOS_DLL_DECL npc_ancestral_wolfAI : public npc_escortAI DoScriptText(EMOTE_WOLF_HOWL, m_creature); break; case 50: + Creature* pRyga = GetClosestCreatureWithEntry(m_creature, NPC_RYGA, 30.0f); if (pRyga && pRyga->isAlive() && !pRyga->isInCombat()) DoScriptText(SAY_WOLF_WELCOME, pRyga); break; diff --git a/scripts/outland/netherstorm.cpp b/scripts/outland/netherstorm.cpp index e62f42868..53703142a 100644 --- a/scripts/outland/netherstorm.cpp +++ b/scripts/outland/netherstorm.cpp @@ -82,8 +82,8 @@ struct MANGOS_DLL_DECL npc_manaforge_control_consoleAI : public ScriptedAI { npc_manaforge_control_consoleAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} - uint64 m_uiPlayerGUID; - uint64 m_uiConsoleGUID; + ObjectGuid m_playerGuid; + ObjectGuid m_consoleGuid; uint32 m_uiEventTimer; uint32 m_uiWaveTimer; uint32 m_uiPhase; @@ -91,8 +91,8 @@ struct MANGOS_DLL_DECL npc_manaforge_control_consoleAI : public ScriptedAI void Reset() { - m_uiPlayerGUID = 0; - m_uiConsoleGUID = 0; + m_playerGuid.Clear(); + m_consoleGuid.Clear(); m_uiEventTimer = 3000; m_uiWaveTimer = 0; m_uiPhase = 1; @@ -111,39 +111,33 @@ struct MANGOS_DLL_DECL npc_manaforge_control_consoleAI : public ScriptedAI { DoScriptText(EMOTE_ABORT, m_creature); - if (m_uiPlayerGUID) - { - Player* pPlayer = m_creature->GetMap()->GetPlayer(m_uiPlayerGUID); + Player* pPlayer = m_creature->GetMap()->GetPlayer(m_playerGuid); - if (pPlayer) + if (pPlayer) + { + switch(m_creature->GetEntry()) { - switch(m_creature->GetEntry()) - { - case NPC_BNAAR_C_CONSOLE: - pPlayer->FailQuest(QUEST_SHUTDOWN_BNAAR_ALDOR); - pPlayer->FailQuest(QUEST_SHUTDOWN_BNAAR_SCRYERS); - break; - case NPC_CORUU_C_CONSOLE: - pPlayer->FailQuest(QUEST_SHUTDOWN_CORUU_ALDOR); - pPlayer->FailQuest(QUEST_SHUTDOWN_CORUU_SCRYERS); - break; - case NPC_DURO_C_CONSOLE: - pPlayer->FailQuest(QUEST_SHUTDOWN_DURO_ALDOR); - pPlayer->FailQuest(QUEST_SHUTDOWN_DURO_SCRYERS); - break; - case NPC_ARA_C_CONSOLE: - pPlayer->FailQuest(QUEST_SHUTDOWN_ARA_ALDOR); - pPlayer->FailQuest(QUEST_SHUTDOWN_ARA_SCRYERS); - break; - } + case NPC_BNAAR_C_CONSOLE: + pPlayer->FailQuest(QUEST_SHUTDOWN_BNAAR_ALDOR); + pPlayer->FailQuest(QUEST_SHUTDOWN_BNAAR_SCRYERS); + break; + case NPC_CORUU_C_CONSOLE: + pPlayer->FailQuest(QUEST_SHUTDOWN_CORUU_ALDOR); + pPlayer->FailQuest(QUEST_SHUTDOWN_CORUU_SCRYERS); + break; + case NPC_DURO_C_CONSOLE: + pPlayer->FailQuest(QUEST_SHUTDOWN_DURO_ALDOR); + pPlayer->FailQuest(QUEST_SHUTDOWN_DURO_SCRYERS); + break; + case NPC_ARA_C_CONSOLE: + pPlayer->FailQuest(QUEST_SHUTDOWN_ARA_ALDOR); + pPlayer->FailQuest(QUEST_SHUTDOWN_ARA_SCRYERS); + break; } } - if (m_uiConsoleGUID) - { - if (GameObject* pGo = m_creature->GetMap()->GetGameObject(m_uiConsoleGUID)) - pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_IN_USE); - } + if (GameObject* pGo = m_creature->GetMap()->GetGameObject(m_consoleGuid)) + pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_IN_USE); } void DoWaveSpawnForCreature(Creature* pCreature) @@ -242,13 +236,17 @@ struct MANGOS_DLL_DECL npc_manaforge_control_consoleAI : public ScriptedAI { if (m_uiEventTimer < uiDiff) { - if (!m_uiPlayerGUID) - return; - - Player* pPlayer = m_creature->GetMap()->GetPlayer(m_uiPlayerGUID); + Player* pPlayer = m_creature->GetMap()->GetPlayer(m_playerGuid); if (!pPlayer) + { + // Reset Event + if (GameObject* pGo = m_creature->GetMap()->GetGameObject(m_consoleGuid)) + pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_IN_USE); + + m_creature->ForcedDespawn(); return; + } switch(m_uiPhase) { @@ -279,11 +277,10 @@ struct MANGOS_DLL_DECL npc_manaforge_control_consoleAI : public ScriptedAI DoScriptText(EMOTE_COMPLETE, m_creature, pPlayer); pPlayer->KilledMonsterCredit(m_creature->GetEntry(), m_creature->GetObjectGuid()); DoCastSpellIfCan(m_creature, SPELL_DISABLE_VISUAL); - if (m_uiConsoleGUID) - { - if (GameObject* pGo = m_creature->GetMap()->GetGameObject(m_uiConsoleGUID)) - pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_IN_USE); - } + + if (GameObject* pGo = m_creature->GetMap()->GetGameObject(m_consoleGuid)) + pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_IN_USE); + ++m_uiPhase; break; } @@ -354,8 +351,8 @@ bool GOUse_go_manaforge_control_console(Player* pPlayer, GameObject* pGo) { if (npc_manaforge_control_consoleAI* pManaforgeAI = dynamic_cast(pManaforge->AI())) { - pManaforgeAI->m_uiPlayerGUID = pPlayer->GetGUID(); - pManaforgeAI->m_uiConsoleGUID = pGo->GetGUID(); + pManaforgeAI->m_playerGuid = pPlayer->GetObjectGuid(); + pManaforgeAI->m_consoleGuid = pGo->GetGUID(); } pGo->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_IN_USE); @@ -394,9 +391,9 @@ struct MANGOS_DLL_DECL npc_commander_dawnforgeAI : public ScriptedAI { npc_commander_dawnforgeAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset (); } - uint64 m_uiPlayerGUID; - uint64 m_uiArdonisGUID; - uint64 m_uiPathaleonGUID; + ObjectGuid m_playerGuid; + ObjectGuid m_ardonisGuid; + ObjectGuid m_pathaleonGuid; uint32 m_uiPhase; uint32 m_uiPhaseSubphase; @@ -405,9 +402,9 @@ struct MANGOS_DLL_DECL npc_commander_dawnforgeAI : public ScriptedAI void Reset() { - m_uiPlayerGUID = 0; - m_uiArdonisGUID = 0; - m_uiPathaleonGUID = 0; + m_playerGuid.Clear(); + m_ardonisGuid.Clear(); + m_pathaleonGuid.Clear(); m_uiPhase = 1; m_uiPhaseSubphase = 0; @@ -418,14 +415,14 @@ struct MANGOS_DLL_DECL npc_commander_dawnforgeAI : public ScriptedAI void JustSummoned(Creature* pSummoned) { if (pSummoned->GetEntry() == NPC_PATHALEON_THE_CALCULATOR_IMAGE) - m_uiPathaleonGUID = pSummoned->GetGUID(); + m_pathaleonGuid = pSummoned->GetObjectGuid(); } void TurnToPathaleonsImage() { - Creature* pArdonis = m_creature->GetMap()->GetCreature(m_uiArdonisGUID); - Creature* pPathaleon = m_creature->GetMap()->GetCreature(m_uiPathaleonGUID); - Player* pPlayer = m_creature->GetMap()->GetPlayer(m_uiPlayerGUID); + Creature* pArdonis = m_creature->GetMap()->GetCreature(m_ardonisGuid); + Creature* pPathaleon = m_creature->GetMap()->GetCreature(m_pathaleonGuid); + Player* pPlayer = m_creature->GetMap()->GetPlayer(m_playerGuid); if (!pArdonis || !pPathaleon || !pPlayer) return; @@ -440,9 +437,9 @@ struct MANGOS_DLL_DECL npc_commander_dawnforgeAI : public ScriptedAI void TurnToEachOther() { - if (Creature* pArdonis = m_creature->GetMap()->GetCreature(m_uiArdonisGUID)) + if (Creature* pArdonis = m_creature->GetMap()->GetCreature(m_ardonisGuid)) { - Player* pPlayer = m_creature->GetMap()->GetPlayer(m_uiPlayerGUID); + Player* pPlayer = m_creature->GetMap()->GetPlayer(m_playerGuid); if (!pPlayer) return; @@ -465,8 +462,8 @@ struct MANGOS_DLL_DECL npc_commander_dawnforgeAI : public ScriptedAI if (!pArdonis) return false; - m_uiArdonisGUID = pArdonis->GetGUID(); - m_uiPlayerGUID = pPlayer->GetGUID(); + m_ardonisGuid = pArdonis->GetObjectGuid(); + m_playerGuid = pPlayer->GetObjectGuid(); m_bIsEvent = true; @@ -491,9 +488,9 @@ struct MANGOS_DLL_DECL npc_commander_dawnforgeAI : public ScriptedAI return; } - Creature* pArdonis = m_creature->GetMap()->GetCreature(m_uiArdonisGUID); - Creature* pPathaleon = m_creature->GetMap()->GetCreature(m_uiPathaleonGUID); - Player* pPlayer = m_creature->GetMap()->GetPlayer(m_uiPlayerGUID); + Creature* pArdonis = m_creature->GetMap()->GetCreature(m_ardonisGuid); + Creature* pPathaleon = m_creature->GetMap()->GetCreature(m_pathaleonGuid); + Player* pPlayer = m_creature->GetMap()->GetPlayer(m_playerGuid); if (!pArdonis || !pPlayer) { @@ -778,8 +775,8 @@ struct MANGOS_DLL_DECL npc_maxx_a_million_escortAI : public npc_escortAI uint8 m_uiSubEvent; uint32 m_uiSubEventTimer; - uint64 m_uiAlleyGUID; - uint64 m_uiLastDraeneiMachineGUID; + ObjectGuid m_alleyGuid; + ObjectGuid m_lastDraeneiMachineGuid; void Reset() { @@ -787,8 +784,8 @@ struct MANGOS_DLL_DECL npc_maxx_a_million_escortAI : public npc_escortAI { m_uiSubEvent = 0; m_uiSubEventTimer = 0; - m_uiAlleyGUID = 0; - m_uiLastDraeneiMachineGUID = 0; + m_alleyGuid.Clear(); + m_lastDraeneiMachineGuid.Clear(); // Reset fields, that were changed on escort-start m_creature->HandleEmote(EMOTE_STATE_STUN); @@ -819,19 +816,19 @@ struct MANGOS_DLL_DECL npc_maxx_a_million_escortAI : public npc_escortAI if (GameObject* pMachine = GetClosestGameObjectWithEntry(m_creature, GO_DRAENEI_MACHINE, INTERACTION_DISTANCE)) { m_creature->SetFacingToObject(pMachine); - m_uiLastDraeneiMachineGUID = pMachine->GetGUID(); + m_lastDraeneiMachineGuid = pMachine->GetObjectGuid(); m_uiSubEvent = 2; m_uiSubEventTimer = 1000; } else - m_uiLastDraeneiMachineGUID = 0; + m_lastDraeneiMachineGuid.Clear(); break; case 36: if (Player* pPlayer = GetPlayerForEscort()) pPlayer->GroupEventHappens(QUEST_MARK_V_IS_ALIVE, m_creature); - if (Creature* pAlley = m_creature->GetMap()->GetCreature(m_uiAlleyGUID)) + if (Creature* pAlley = m_creature->GetMap()->GetCreature(m_alleyGuid)) DoScriptText(SAY_ALLEY_FINISH, pAlley); break; @@ -863,7 +860,7 @@ struct MANGOS_DLL_DECL npc_maxx_a_million_escortAI : public npc_escortAI case 1: // Wait time before Say if (Creature* pAlley = GetClosestCreatureWithEntry(m_creature, NPC_BOT_SPECIALIST_ALLEY, INTERACTION_DISTANCE*2)) { - m_uiAlleyGUID = pAlley->GetGUID(); + m_alleyGuid = pAlley->GetObjectGuid(); DoScriptText(SAY_ALLEY_FAREWELL, pAlley); } m_uiSubEventTimer = 0; @@ -875,10 +872,10 @@ struct MANGOS_DLL_DECL npc_maxx_a_million_escortAI : public npc_escortAI m_uiSubEvent = 3; break; case 3: // Despawn machine after 2s - if (GameObject* pMachine = m_creature->GetMap()->GetGameObject(m_uiLastDraeneiMachineGUID)) + if (GameObject* pMachine = m_creature->GetMap()->GetGameObject(m_lastDraeneiMachineGuid)) pMachine->Use(m_creature); - m_uiLastDraeneiMachineGUID = 0; + m_lastDraeneiMachineGuid.Clear(); m_uiSubEventTimer = 0; m_uiSubEvent = 0; break; diff --git a/scripts/outland/shadowmoon_valley.cpp b/scripts/outland/shadowmoon_valley.cpp index 5593d9950..a4c6595ae 100644 --- a/scripts/outland/shadowmoon_valley.cpp +++ b/scripts/outland/shadowmoon_valley.cpp @@ -33,9 +33,9 @@ npc_karynaku npc_oronok_tornheart npc_wilda mob_torloth +npc_lord_illidan_stormrage npc_totem_of_spirits event_spell_soul_captured_credit -npc_lord_illidan_stormrage go_crystal_prison EndContentData */ @@ -64,7 +64,7 @@ struct MANGOS_DLL_DECL mob_mature_netherwing_drakeAI : public ScriptedAI { mob_mature_netherwing_drakeAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } - uint64 uiPlayerGUID; + ObjectGuid m_playerGuid; bool bCanEat; bool bIsEating; @@ -74,7 +74,7 @@ struct MANGOS_DLL_DECL mob_mature_netherwing_drakeAI : public ScriptedAI void Reset() { - uiPlayerGUID = 0; + m_playerGuid.Clear(); bCanEat = false; bIsEating = false; @@ -90,7 +90,7 @@ struct MANGOS_DLL_DECL mob_mature_netherwing_drakeAI : public ScriptedAI if (pCaster->GetTypeId() == TYPEID_PLAYER && pSpell->Id == SPELL_PLACE_CARCASS && !m_creature->HasAura(SPELL_JUST_EATEN)) { - uiPlayerGUID = pCaster->GetGUID(); + m_playerGuid = pCaster->GetObjectGuid(); bCanEat = true; } } @@ -116,7 +116,7 @@ struct MANGOS_DLL_DECL mob_mature_netherwing_drakeAI : public ScriptedAI { if (bCanEat && !bIsEating) { - if (Player* pPlayer = m_creature->GetMap()->GetPlayer(uiPlayerGUID)) + if (Player* pPlayer = m_creature->GetMap()->GetPlayer(m_playerGuid)) { GameObject* pGo = pPlayer->GetGameObject(SPELL_PLACE_CARCASS); @@ -151,7 +151,7 @@ struct MANGOS_DLL_DECL mob_mature_netherwing_drakeAI : public ScriptedAI DoCastSpellIfCan(m_creature, SPELL_JUST_EATEN); DoScriptText(SAY_JUST_EATEN, m_creature); - if (Player* pPlayer = m_creature->GetMap()->GetPlayer(uiPlayerGUID)) + if (Player* pPlayer = m_creature->GetMap()->GetPlayer(m_playerGuid)) pPlayer->KilledMonsterCredit(NPC_EVENT_PINGER, m_creature->GetObjectGuid()); Reset(); @@ -203,12 +203,12 @@ struct MANGOS_DLL_DECL mob_enslaved_netherwing_drakeAI : public ScriptedAI { mob_enslaved_netherwing_drakeAI(Creature* pCreature) : ScriptedAI(pCreature) { - PlayerGUID = 0; + m_playerGuid = ObjectGuid(); Tapped = false; Reset(); } - uint64 PlayerGUID; + ObjectGuid m_playerGuid; uint32 FlyTimer; bool Tapped; @@ -227,7 +227,7 @@ struct MANGOS_DLL_DECL mob_enslaved_netherwing_drakeAI : public ScriptedAI if (Player* pPlayer = pCaster->GetCharmerOrOwnerPlayerOrPlayerItself()) { Tapped = true; - PlayerGUID = pPlayer->GetGUID(); + m_playerGuid = pPlayer->GetObjectGuid(); m_creature->setFaction(FACTION_FRIENDLY); @@ -256,12 +256,12 @@ struct MANGOS_DLL_DECL mob_enslaved_netherwing_drakeAI : public ScriptedAI { Tapped = false; - if (Player* pPlayer = m_creature->GetMap()->GetPlayer(PlayerGUID)) + if (Player* pPlayer = m_creature->GetMap()->GetPlayer(m_playerGuid)) { if (pPlayer->GetQuestStatus(QUEST_FORCE_OF_NELT) == QUEST_STATUS_INCOMPLETE) { DoCastSpellIfCan(pPlayer, SPELL_FORCE_OF_NELTHARAKU, CAST_TRIGGERED); - PlayerGUID = 0; + m_playerGuid.Clear(); float dx, dy, dz; @@ -314,14 +314,14 @@ struct MANGOS_DLL_DECL npc_dragonmaw_peonAI : public ScriptedAI { npc_dragonmaw_peonAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } - uint64 m_uiPlayerGUID; + ObjectGuid m_playerGuid; uint32 m_uiPoisonTimer; uint32 m_uiMoveTimer; uint32 m_uiEatTimer; void Reset() { - m_uiPlayerGUID = 0; + m_playerGuid.Clear(); m_uiPoisonTimer = 0; m_uiMoveTimer = 0; m_uiEatTimer = 0; @@ -329,12 +329,13 @@ struct MANGOS_DLL_DECL npc_dragonmaw_peonAI : public ScriptedAI SetEquipmentSlots(true); } - bool SetPlayerTarget(uint64 uiPlayerGUID) + bool SetPlayerTarget(ObjectGuid playerGuid) { - if (m_uiPlayerGUID) + // Check if event already started + if (!m_playerGuid.IsEmpty()) return false; - m_uiPlayerGUID = uiPlayerGUID; + m_playerGuid = playerGuid; m_uiMoveTimer = 500; return true; } @@ -362,14 +363,11 @@ struct MANGOS_DLL_DECL npc_dragonmaw_peonAI : public ScriptedAI void UpdateAI(const uint32 uiDiff) { - if (!m_creature->isAlive()) - return; - if (m_uiMoveTimer) { if (m_uiMoveTimer <= uiDiff) { - if (Player* pPlayer = m_creature->GetMap()->GetPlayer(m_uiPlayerGUID)) + if (Player* pPlayer = m_creature->GetMap()->GetPlayer(m_playerGuid)) { GameObject* pMutton = pPlayer->GetGameObject(SPELL_SERVING_MUTTON); @@ -414,7 +412,7 @@ struct MANGOS_DLL_DECL npc_dragonmaw_peonAI : public ScriptedAI { if (m_uiPoisonTimer <= uiDiff) { - if (Player* pPlayer = m_creature->GetMap()->GetPlayer(m_uiPlayerGUID)) + if (Player* pPlayer = m_creature->GetMap()->GetPlayer(m_playerGuid)) pPlayer->KilledMonsterCredit(NPC_DRAGONMAW_KILL_CREDIT, m_creature->GetObjectGuid()); m_uiPoisonTimer = 0; @@ -444,7 +442,7 @@ bool EffectDummyCreature_npc_dragonmaw_peon(Unit* pCaster, uint32 uiSpellId, Spe if (!pPeonAI) return false; - if (pPeonAI->SetPlayerTarget(pCaster->GetGUID())) + if (pPeonAI->SetPlayerTarget(pCaster->GetObjectGuid())) { pCreatureTarget->HandleEmote(EMOTE_ONESHOT_NONE); return true; @@ -993,8 +991,8 @@ struct MANGOS_DLL_DECL mob_torlothAI : public ScriptedAI { mob_torlothAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} - uint64 m_uiLordIllidanGUID; - uint64 m_uiPlayerGUID; + ObjectGuid m_lordIllidanGuid; + ObjectGuid m_playerGuid; uint32 m_uiCleaveTimer; uint32 m_uiShadowfuryTimer; @@ -1004,8 +1002,8 @@ struct MANGOS_DLL_DECL mob_torlothAI : public ScriptedAI void Reset() { - m_uiLordIllidanGUID = 0; - m_uiPlayerGUID = 0; + m_lordIllidanGuid.Clear(); + m_playerGuid.Clear(); m_uiAnimationCount = 0; m_uiAnimationTimer = 4000; @@ -1029,7 +1027,7 @@ struct MANGOS_DLL_DECL mob_torlothAI : public ScriptedAI if (TorlothAnim[m_uiAnimationCount].uiCreature == LORD_ILLIDAN) { - pCreature = m_creature->GetMap()->GetCreature(m_uiLordIllidanGUID); + pCreature = m_creature->GetMap()->GetCreature(m_lordIllidanGuid); if (!pCreature) { @@ -1052,7 +1050,7 @@ struct MANGOS_DLL_DECL mob_torlothAI : public ScriptedAI m_creature->SetStandState(UNIT_STAND_STATE_STAND); break; case 5: - if (Player* pTarget = m_creature->GetMap()->GetPlayer(m_uiPlayerGUID)) + if (Player* pTarget = m_creature->GetMap()->GetPlayer(m_playerGuid)) { m_creature->AddThreat(pTarget); m_creature->SetFacingToObject(pTarget); @@ -1061,7 +1059,7 @@ struct MANGOS_DLL_DECL mob_torlothAI : public ScriptedAI break; case 6: { - if (Player* pTarget = m_creature->GetMap()->GetPlayer(m_uiPlayerGUID)) + if (Player* pTarget = m_creature->GetMap()->GetPlayer(m_playerGuid)) { SetCombatMovement(true); m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); @@ -1082,7 +1080,7 @@ struct MANGOS_DLL_DECL mob_torlothAI : public ScriptedAI { pPlayer->GroupEventHappens(QUEST_BATTLE_OF_THE_CRIMSON_WATCH, m_creature); - if (Creature* pLordIllidan = m_creature->GetMap()->GetCreature(m_uiLordIllidanGUID)) + if (Creature* pLordIllidan = m_creature->GetMap()->GetCreature(m_lordIllidanGuid)) { DoScriptText(SAY_EVENT_COMPLETED, pLordIllidan, pPlayer); pLordIllidan->AI()->EnterEvadeMode(); @@ -1138,170 +1136,6 @@ CreatureAI* GetAI_mob_torloth(Creature* pCreature) return new mob_torlothAI(pCreature); } -/*###### -## npc_totem_of_spirits -######*/ - -enum -{ - QUEST_SPIRITS_FIRE_AND_EARTH = 10458, - QUEST_SPIRITS_WATER = 10480, - QUEST_SPIRITS_AIR = 10481, - - // quest 10458, 10480, 10481 - SPELL_ELEMENTAL_SIEVE = 36035, - NPC_TOTEM_OF_SPIRITS = 21071, - NPC_EARTH_SPIRIT = 21050, // to be killed - NPC_FIERY_SPIRIT = 21061, - NPC_WATER_SPIRIT = 21059, - NPC_AIR_SPIRIT = 21060, - SPELL_EARTH_CAPTURED = 36025, // dummies (having visual effects) - SPELL_FIERY_CAPTURED = 36115, - SPELL_WATER_CAPTURED = 36170, - SPELL_AIR_CAPTURED = 36181, - SPELL_EARTH_CAPTURED_CREDIT = 36108, // event 13513 - SPELL_FIERY_CAPTURED_CREDIT = 36117, // event 13514 - SPELL_WATER_CAPTURED_CREDIT = 36171, // event 13515 - SPELL_AIR_CAPTURED_CREDIT = 36182, // event 13516 - EVENT_EARTH = 13513, - EVENT_FIERY = 13514, - EVENT_WATER = 13515, - EVENT_AIR = 13516, - NPC_CREDIT_MARKER_EARTH = 21092, // quest objective npc's - NPC_CREDIT_MARKER_FIERY = 21094, - NPC_CREDIT_MARKER_WATER = 21095, - NPC_CREDIT_MARKER_AIR = 21096, -}; - -struct MANGOS_DLL_DECL npc_totem_of_spiritsAI : public ScriptedPetAI -{ - npc_totem_of_spiritsAI(Creature* pCreature) : ScriptedPetAI(pCreature) { Reset(); } - - void Reset() {} - - void MoveInLineOfSight(Unit* pWho) {} - void UpdateAI(const uint32 uiDiff) {} - void AttackedBy(Unit* pAttacker) {} - - void OwnerKilledUnit(Unit* pVictim) - { - if (pVictim->GetTypeId() != TYPEID_UNIT) - return; - - uint32 uiEntry = pVictim->GetEntry(); - - // make elementals cast the sieve is only way to make it work properly, due to the spell target modes 22/7 - if (uiEntry == NPC_EARTH_SPIRIT || uiEntry == NPC_FIERY_SPIRIT || uiEntry == NPC_WATER_SPIRIT || uiEntry == NPC_AIR_SPIRIT) - pVictim->CastSpell(pVictim, SPELL_ELEMENTAL_SIEVE, true); - } -}; - -CreatureAI* GetAI_npc_totem_of_spirits(Creature* pCreature) -{ - return new npc_totem_of_spiritsAI(pCreature); -} - -bool EffectDummyCreature_npc_totem_of_spirits(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) -{ - if (uiEffIndex != EFFECT_INDEX_0) - return false; - - switch(uiSpellId) - { - case SPELL_EARTH_CAPTURED: - { - pCaster->CastSpell(pCaster, SPELL_EARTH_CAPTURED_CREDIT, true); - return true; - } - case SPELL_FIERY_CAPTURED: - { - pCaster->CastSpell(pCaster, SPELL_FIERY_CAPTURED_CREDIT, true); - return true; - } - case SPELL_WATER_CAPTURED: - { - pCaster->CastSpell(pCaster, SPELL_WATER_CAPTURED_CREDIT, true); - return true; - } - case SPELL_AIR_CAPTURED: - { - pCaster->CastSpell(pCaster, SPELL_AIR_CAPTURED_CREDIT, true); - return true; - } - } - - return false; -} - -bool EffectAuraDummy_npc_totem_of_spirits(const Aura* pAura, bool bApply) -{ - if (pAura->GetId() != SPELL_ELEMENTAL_SIEVE) - return true; - - if (pAura->GetEffIndex() != EFFECT_INDEX_0) - return true; - - if (bApply) // possible it should be some visual effects, using "enraged soul" npc and "Cosmetic: ... soul" spell - return true; - - Creature* pCreature = (Creature*)pAura->GetTarget(); - Unit* pCaster = pAura->GetCaster(); - - // aura only affect the spirit totem, since this is the one that need to be in range. - // It is possible though, that player is the one who should actually have the aura - // and check for presense of spirit totem, but then we can't script the dummy. - if (!pCreature || !pCreature->IsPet() || !pCaster) - return true; - - // Need to expect the enraged elementals to be caster of aura - switch(pCaster->GetEntry()) - { - case NPC_EARTH_SPIRIT: - pCreature->CastSpell(pCreature, SPELL_EARTH_CAPTURED, true); - break; - case NPC_FIERY_SPIRIT: - pCreature->CastSpell(pCreature, SPELL_FIERY_CAPTURED, true); - break; - case NPC_WATER_SPIRIT: - pCreature->CastSpell(pCreature, SPELL_WATER_CAPTURED, true); - break; - case NPC_AIR_SPIRIT: - pCreature->CastSpell(pCreature, SPELL_AIR_CAPTURED, true); - break; - } - - return true; -} - -bool ProcessEventId_event_spell_soul_captured_credit(uint32 uiEventId, Object* pSource, Object* pTarget, bool bIsStart) -{ - if (bIsStart && pSource->GetTypeId() == TYPEID_UNIT) - { - Player* pOwner = (Player*)((Creature*)pSource)->GetOwner(); - - if (!pOwner) - return true; - - switch(uiEventId) - { - case EVENT_EARTH: - pOwner->KilledMonsterCredit(NPC_CREDIT_MARKER_EARTH); - return true; - case EVENT_FIERY: - pOwner->KilledMonsterCredit(NPC_CREDIT_MARKER_FIERY); - return true; - case EVENT_WATER: - pOwner->KilledMonsterCredit(NPC_CREDIT_MARKER_WATER); - return true; - case EVENT_AIR: - pOwner->KilledMonsterCredit(NPC_CREDIT_MARKER_AIR); - return true; - } - } - - return false; -} - /*##### # npc_lord_illidan_stormrage #####*/ @@ -1310,7 +1144,7 @@ struct MANGOS_DLL_DECL npc_lord_illidan_stormrageAI : public Scripted_NoMovement { npc_lord_illidan_stormrageAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) {Reset();} - uint64 m_uiPlayerGUID; + ObjectGuid m_playerGuid; uint32 m_uiWaveTimer; uint32 m_uiAnnounceTimer; uint32 m_uiCheckTimer; @@ -1323,7 +1157,7 @@ struct MANGOS_DLL_DECL npc_lord_illidan_stormrageAI : public Scripted_NoMovement void Reset() { - m_uiPlayerGUID = 0; + m_playerGuid.Clear(); m_uiWaveTimer = 10000; m_uiAnnounceTimer = 7000; @@ -1340,7 +1174,7 @@ struct MANGOS_DLL_DECL npc_lord_illidan_stormrageAI : public Scripted_NoMovement void StartEvent(Player* pPlayer) { m_bEventStarted = true; - m_uiPlayerGUID = pPlayer->GetGUID(); + m_playerGuid = pPlayer->GetObjectGuid(); } void SummonWave() @@ -1392,20 +1226,20 @@ struct MANGOS_DLL_DECL npc_lord_illidan_stormrageAI : public Scripted_NoMovement // increment mob count ++m_uiMobCount; - if (!m_uiPlayerGUID) + if (m_playerGuid.IsEmpty()) return; if (pSummoned->GetEntry() == NPC_TORLOTH_THE_MAGNIFICENT) { if (mob_torlothAI* pTorlothAI = dynamic_cast(pSummoned->AI())) { - pTorlothAI->m_uiLordIllidanGUID = m_creature->GetGUID(); - pTorlothAI->m_uiPlayerGUID = m_uiPlayerGUID; + pTorlothAI->m_lordIllidanGuid = m_creature->GetObjectGuid(); + pTorlothAI->m_playerGuid = m_playerGuid; } } else { - if (Player* pTarget = m_creature->GetMap()->GetPlayer(m_uiPlayerGUID)) + if (Player* pTarget = m_creature->GetMap()->GetPlayer(m_playerGuid)) { float fLocX, fLocY, fLocZ; pTarget->GetPosition(fLocX, fLocY, fLocZ); @@ -1425,7 +1259,7 @@ struct MANGOS_DLL_DECL npc_lord_illidan_stormrageAI : public Scripted_NoMovement void CheckEventFail() { - Player* pPlayer = m_creature->GetMap()->GetPlayer(m_uiPlayerGUID); + Player* pPlayer = m_creature->GetMap()->GetPlayer(m_playerGuid); if (!pPlayer) return; @@ -1487,7 +1321,7 @@ struct MANGOS_DLL_DECL npc_lord_illidan_stormrageAI : public Scripted_NoMovement void UpdateAI(const uint32 uiDiff) { - if (!m_uiPlayerGUID || !m_bEventStarted) + if (m_playerGuid.IsEmpty() || !m_bEventStarted) return; if (!m_uiMobCount && m_uiWaveCount < 4) @@ -1538,6 +1372,170 @@ bool GOQuestAccept_GO_crystal_prison(Player* pPlayer, GameObject* pGo, Quest con return true; } +/*###### +## npc_totem_of_spirits +######*/ + +enum +{ + QUEST_SPIRITS_FIRE_AND_EARTH = 10458, + QUEST_SPIRITS_WATER = 10480, + QUEST_SPIRITS_AIR = 10481, + + // quest 10458, 10480, 10481 + SPELL_ELEMENTAL_SIEVE = 36035, + NPC_TOTEM_OF_SPIRITS = 21071, + NPC_EARTH_SPIRIT = 21050, // to be killed + NPC_FIERY_SPIRIT = 21061, + NPC_WATER_SPIRIT = 21059, + NPC_AIR_SPIRIT = 21060, + SPELL_EARTH_CAPTURED = 36025, // dummies (having visual effects) + SPELL_FIERY_CAPTURED = 36115, + SPELL_WATER_CAPTURED = 36170, + SPELL_AIR_CAPTURED = 36181, + SPELL_EARTH_CAPTURED_CREDIT = 36108, // event 13513 + SPELL_FIERY_CAPTURED_CREDIT = 36117, // event 13514 + SPELL_WATER_CAPTURED_CREDIT = 36171, // event 13515 + SPELL_AIR_CAPTURED_CREDIT = 36182, // event 13516 + EVENT_EARTH = 13513, + EVENT_FIERY = 13514, + EVENT_WATER = 13515, + EVENT_AIR = 13516, + NPC_CREDIT_MARKER_EARTH = 21092, // quest objective npc's + NPC_CREDIT_MARKER_FIERY = 21094, + NPC_CREDIT_MARKER_WATER = 21095, + NPC_CREDIT_MARKER_AIR = 21096, +}; + +struct MANGOS_DLL_DECL npc_totem_of_spiritsAI : public ScriptedPetAI +{ + npc_totem_of_spiritsAI(Creature* pCreature) : ScriptedPetAI(pCreature) { Reset(); } + + void Reset() {} + + void MoveInLineOfSight(Unit* pWho) {} + void UpdateAI(const uint32 uiDiff) {} + void AttackedBy(Unit* pAttacker) {} + + void OwnerKilledUnit(Unit* pVictim) + { + if (pVictim->GetTypeId() != TYPEID_UNIT) + return; + + uint32 uiEntry = pVictim->GetEntry(); + + // make elementals cast the sieve is only way to make it work properly, due to the spell target modes 22/7 + if (uiEntry == NPC_EARTH_SPIRIT || uiEntry == NPC_FIERY_SPIRIT || uiEntry == NPC_WATER_SPIRIT || uiEntry == NPC_AIR_SPIRIT) + pVictim->CastSpell(pVictim, SPELL_ELEMENTAL_SIEVE, true); + } +}; + +CreatureAI* GetAI_npc_totem_of_spirits(Creature* pCreature) +{ + return new npc_totem_of_spiritsAI(pCreature); +} + +bool EffectDummyCreature_npc_totem_of_spirits(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) +{ + if (uiEffIndex != EFFECT_INDEX_0) + return false; + + switch(uiSpellId) + { + case SPELL_EARTH_CAPTURED: + { + pCaster->CastSpell(pCaster, SPELL_EARTH_CAPTURED_CREDIT, true); + return true; + } + case SPELL_FIERY_CAPTURED: + { + pCaster->CastSpell(pCaster, SPELL_FIERY_CAPTURED_CREDIT, true); + return true; + } + case SPELL_WATER_CAPTURED: + { + pCaster->CastSpell(pCaster, SPELL_WATER_CAPTURED_CREDIT, true); + return true; + } + case SPELL_AIR_CAPTURED: + { + pCaster->CastSpell(pCaster, SPELL_AIR_CAPTURED_CREDIT, true); + return true; + } + } + + return false; +} + +bool EffectAuraDummy_npc_totem_of_spirits(const Aura* pAura, bool bApply) +{ + if (pAura->GetId() != SPELL_ELEMENTAL_SIEVE) + return true; + + if (pAura->GetEffIndex() != EFFECT_INDEX_0) + return true; + + if (bApply) // possible it should be some visual effects, using "enraged soul" npc and "Cosmetic: ... soul" spell + return true; + + Creature* pCreature = (Creature*)pAura->GetTarget(); + Unit* pCaster = pAura->GetCaster(); + + // aura only affect the spirit totem, since this is the one that need to be in range. + // It is possible though, that player is the one who should actually have the aura + // and check for presense of spirit totem, but then we can't script the dummy. + if (!pCreature || !pCreature->IsPet() || !pCaster) + return true; + + // Need to expect the enraged elementals to be caster of aura + switch(pCaster->GetEntry()) + { + case NPC_EARTH_SPIRIT: + pCreature->CastSpell(pCreature, SPELL_EARTH_CAPTURED, true); + break; + case NPC_FIERY_SPIRIT: + pCreature->CastSpell(pCreature, SPELL_FIERY_CAPTURED, true); + break; + case NPC_WATER_SPIRIT: + pCreature->CastSpell(pCreature, SPELL_WATER_CAPTURED, true); + break; + case NPC_AIR_SPIRIT: + pCreature->CastSpell(pCreature, SPELL_AIR_CAPTURED, true); + break; + } + + return true; +} + +bool ProcessEventId_event_spell_soul_captured_credit(uint32 uiEventId, Object* pSource, Object* pTarget, bool bIsStart) +{ + if (bIsStart && pSource->GetTypeId() == TYPEID_UNIT) + { + Player* pOwner = (Player*)((Creature*)pSource)->GetOwner(); + + if (!pOwner) + return true; + + switch(uiEventId) + { + case EVENT_EARTH: + pOwner->KilledMonsterCredit(NPC_CREDIT_MARKER_EARTH); + return true; + case EVENT_FIERY: + pOwner->KilledMonsterCredit(NPC_CREDIT_MARKER_FIERY); + return true; + case EVENT_WATER: + pOwner->KilledMonsterCredit(NPC_CREDIT_MARKER_WATER); + return true; + case EVENT_AIR: + pOwner->KilledMonsterCredit(NPC_CREDIT_MARKER_AIR); + return true; + } + } + + return false; +} + void AddSC_shadowmoon_valley() { Script *newscript; diff --git a/scripts/outland/shattrath_city.cpp b/scripts/outland/shattrath_city.cpp index a855dd7c0..6f834e437 100644 --- a/scripts/outland/shattrath_city.cpp +++ b/scripts/outland/shattrath_city.cpp @@ -54,16 +54,14 @@ struct MANGOS_DLL_DECL npc_dirty_larryAI : public ScriptedAI npc_dirty_larryAI(Creature* pCreature) : ScriptedAI(pCreature) { m_uiNpcFlags = pCreature->GetUInt32Value(UNIT_NPC_FLAGS); - m_uiCreepjackGUID = 0; - m_uiMaloneGUID = 0; Reset(); } uint32 m_uiNpcFlags; - uint64 m_uiCreepjackGUID; - uint64 m_uiMaloneGUID; - uint64 m_uiPlayerGUID; + ObjectGuid m_creepjackGuid; + ObjectGuid m_maloneGuid; + ObjectGuid m_playerGuid; bool bEvent; bool bActiveAttack; @@ -75,9 +73,9 @@ struct MANGOS_DLL_DECL npc_dirty_larryAI : public ScriptedAI { m_creature->SetUInt32Value(UNIT_NPC_FLAGS, m_uiNpcFlags); - m_uiPlayerGUID = 0; - m_uiCreepjackGUID = 0; - m_uiMaloneGUID = 0; + m_playerGuid.Clear(); + m_creepjackGuid.Clear(); + m_maloneGuid.Clear(); bEvent = false; bActiveAttack = false; @@ -90,7 +88,7 @@ struct MANGOS_DLL_DECL npc_dirty_larryAI : public ScriptedAI m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PASSIVE); } - void SetRuffies(uint64 guid, bool bAttack, bool bReset) + void SetRuffies(ObjectGuid guid, bool bAttack, bool bReset) { Creature* pCreature = m_creature->GetMap()->GetCreature(guid); @@ -117,7 +115,7 @@ struct MANGOS_DLL_DECL npc_dirty_larryAI : public ScriptedAI if (bAttack) { - if (Player* pPlayer = m_creature->GetMap()->GetPlayer(m_uiPlayerGUID)) + if (Player* pPlayer = m_creature->GetMap()->GetPlayer(m_playerGuid)) { if (pPlayer->isAlive()) pCreature->AI()->AttackStart(pPlayer); @@ -126,30 +124,32 @@ struct MANGOS_DLL_DECL npc_dirty_larryAI : public ScriptedAI } } - void StartEvent() + void StartEvent(Player* pPlayer) { + m_playerGuid = pPlayer->GetObjectGuid(); + m_creature->SetUInt32Value(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_NONE); m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PASSIVE); if (Creature* pCreepjack = GetClosestCreatureWithEntry(m_creature, ENTRY_CREEPJACK, 20.0f)) - m_uiCreepjackGUID = pCreepjack->GetGUID(); + m_creepjackGuid = pCreepjack->GetObjectGuid(); if (Creature* pMalone = GetClosestCreatureWithEntry(m_creature, ENTRY_MALONE, 20.0f)) - m_uiMaloneGUID = pMalone->GetGUID(); + m_maloneGuid = pMalone->GetObjectGuid(); bEvent = true; } uint32 NextStep(uint32 uiStep) { - Player* pPlayer = m_creature->GetMap()->GetPlayer(m_uiPlayerGUID); + Player* pPlayer = m_creature->GetMap()->GetPlayer(m_playerGuid); if (!pPlayer) { - SetRuffies(m_uiCreepjackGUID,false,true); - SetRuffies(m_uiMaloneGUID,false,true); + SetRuffies(m_creepjackGuid, false, true); + SetRuffies(m_maloneGuid, false, true); EnterEvadeMode(); return 0; } @@ -158,22 +158,23 @@ struct MANGOS_DLL_DECL npc_dirty_larryAI : public ScriptedAI { case 1: DoScriptText(SAY_START, m_creature, pPlayer); - SetRuffies(m_uiCreepjackGUID,false,false); - SetRuffies(m_uiMaloneGUID,false,false); + SetRuffies(m_creepjackGuid, false, false); + SetRuffies(m_maloneGuid, false, false); return 3000; - case 2: DoScriptText(SAY_COUNT, m_creature, pPlayer); return 5000; + case 2: DoScriptText(SAY_COUNT, m_creature, pPlayer); return 5000; case 3: DoScriptText(SAY_COUNT_1, m_creature, pPlayer); return 3000; case 4: DoScriptText(SAY_COUNT_2, m_creature, pPlayer); return 3000; - case 5: DoScriptText(SAY_ATTACK, m_creature, pPlayer); return 3000; + case 5: DoScriptText(SAY_ATTACK, m_creature, pPlayer); return 3000; case 6: if (!m_creature->isInCombat() && pPlayer->isAlive()) AttackStart(pPlayer); - SetRuffies(m_uiCreepjackGUID,true,false); - SetRuffies(m_uiMaloneGUID,true,false); + SetRuffies(m_creepjackGuid, true, false); + SetRuffies(m_maloneGuid, true, false); bActiveAttack = true; return 2000; - default: return 0; + default: + return 0; } } @@ -188,24 +189,24 @@ struct MANGOS_DLL_DECL npc_dirty_larryAI : public ScriptedAI AttackStart(pAttacker); } - void DamageTaken(Unit* pDoneBy, uint32 &damage) + void DamageTaken(Unit* pDoneBy, uint32& uiDamage) { - if (damage < m_creature->GetHealth()) + if (uiDamage < m_creature->GetHealth()) return; //damage will kill, this is pretty much the same as 1%HP left if (bEvent) { - damage = 0; + uiDamage = 0; - if (Player* pPlayer = m_creature->GetMap()->GetPlayer(m_uiPlayerGUID)) + if (Player* pPlayer = m_creature->GetMap()->GetPlayer(m_playerGuid)) { DoScriptText(SAY_GIVEUP, m_creature, pPlayer); pPlayer->GroupEventHappens(QUEST_WHAT_BOOK, m_creature); } - SetRuffies(m_uiCreepjackGUID,false,true); - SetRuffies(m_uiMaloneGUID,false,true); + SetRuffies(m_creepjackGuid, false, true); + SetRuffies(m_maloneGuid, false, true); EnterEvadeMode(); } } @@ -244,10 +245,7 @@ bool GossipSelect_npc_dirty_larry(Player* pPlayer, Creature* pCreature, uint32 u if (uiAction == GOSSIP_ACTION_INFO_DEF+1) { if (npc_dirty_larryAI* pLarryAI = dynamic_cast(pCreature->AI())) - { - pLarryAI->m_uiPlayerGUID = pPlayer->GetGUID(); - pLarryAI->StartEvent(); - } + pLarryAI->StartEvent(pPlayer); pPlayer->CLOSE_GOSSIP_MENU(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 86c91a44f..46ca832bf 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2102" + #define SD2_REVISION_NR "2103" #endif // __SD2_REVISION_NR_H__ From 43113f93f1a38ced09f794a4b440f9bfeb19af61 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Sat, 14 May 2011 00:03:33 +0200 Subject: [PATCH 0083/1172] [2104] Replace uint64 GUIDs with ObjectGuid in northrend/ zone scripts --- scripts/northrend/howling_fjord.cpp | 10 +++++----- scripts/northrend/zuldrak.cpp | 15 +++++++++------ sd2_revision_nr.h | 2 +- 3 files changed, 15 insertions(+), 12 deletions(-) diff --git a/scripts/northrend/howling_fjord.cpp b/scripts/northrend/howling_fjord.cpp index 864acec8f..a94cfb0c3 100644 --- a/scripts/northrend/howling_fjord.cpp +++ b/scripts/northrend/howling_fjord.cpp @@ -168,12 +168,12 @@ struct MANGOS_DLL_DECL npc_daegarnAI : public ScriptedAI npc_daegarnAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } bool m_bEventInProgress; - uint64 m_uiPlayerGUID; + ObjectGuid m_playerGuid; void Reset() { m_bEventInProgress = false; - m_uiPlayerGUID = 0; + m_playerGuid.Clear(); } void StartEvent(Player* pPlayer) @@ -181,14 +181,14 @@ struct MANGOS_DLL_DECL npc_daegarnAI : public ScriptedAI if (m_bEventInProgress) return; - m_uiPlayerGUID = pPlayer->GetGUID(); + m_playerGuid = pPlayer->GetObjectGuid(); SummonGladiator(NPC_FIRJUS); } void JustSummoned(Creature* pSummon) { - if (Player* pPlayer = m_creature->GetMap()->GetPlayer(m_uiPlayerGUID)) + if (Player* pPlayer = m_creature->GetMap()->GetPlayer(m_playerGuid)) { if (pPlayer->isAlive()) { @@ -208,7 +208,7 @@ struct MANGOS_DLL_DECL npc_daegarnAI : public ScriptedAI void SummonedMovementInform(Creature* pSummoned, uint32 uiMotionType, uint32 uiPointId) { - Player* pPlayer = m_creature->GetMap()->GetPlayer(m_uiPlayerGUID); + Player* pPlayer = m_creature->GetMap()->GetPlayer(m_playerGuid); // could be group, so need additional here. if (!pPlayer || !pPlayer->isAlive()) diff --git a/scripts/northrend/zuldrak.cpp b/scripts/northrend/zuldrak.cpp index 3f4f20f09..db603fbf4 100644 --- a/scripts/northrend/zuldrak.cpp +++ b/scripts/northrend/zuldrak.cpp @@ -48,13 +48,16 @@ struct MANGOS_DLL_DECL npc_gurgthockAI : public ScriptedAI { npc_gurgthockAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } - uint64 m_uiPlayerGUID; + ObjectGuid m_playerGuid; - void SetPlayerGUID(uint64 uiPlayerGUID) { m_uiPlayerGUID = uiPlayerGUID; } + void SetPlayer(Player* pPlayer) + { + m_playerGuid = pPlayer->GetObjectGuid(); + } void Reset() { - m_uiPlayerGUID = 0; + m_playerGuid.Clear(); } void SummonedCreatureJustDied(Creature* pSummoned) @@ -64,10 +67,10 @@ struct MANGOS_DLL_DECL npc_gurgthockAI : public ScriptedAI { if (uiEntry == m_auiBosses[i]) { - if (Player* pPlayer = m_creature->GetMap()->GetPlayer(m_uiPlayerGUID)) + if (Player* pPlayer = m_creature->GetMap()->GetPlayer(m_playerGuid)) pPlayer->GroupEventHappens(QUEST_FROM_BEYOND, m_creature); - m_uiPlayerGUID = 0; + m_playerGuid.Clear(); return; } } @@ -81,7 +84,7 @@ bool QuestAccept_npc_gurgthock(Player* pPlayer, Creature* pCreature, const Quest pCreature->SummonCreature(m_auiBosses[urand(0, 3)], m_afSpawnLocation[0], m_afSpawnLocation[1], m_afSpawnLocation[2], 0.0f, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 600000); if (npc_gurgthockAI* pGurthockAI = dynamic_cast(pCreature->AI())) - pGurthockAI->SetPlayerGUID(pPlayer->GetGUID()); + pGurthockAI->SetPlayer(pPlayer); } return true; } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 46ca832bf..912a7aab1 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2103" + #define SD2_REVISION_NR "2104" #endif // __SD2_REVISION_NR_H__ From 769e73f17b4662b44298eb3c1a529f5bb4aec25f Mon Sep 17 00:00:00 2001 From: NoFantasy Date: Sat, 14 May 2011 00:40:54 +0200 Subject: [PATCH 0084/1172] [2105] Adjust spawn coordinates of gandling Remove comments about spells, spell id's are valid. Signed-off-by: NoFantasy --- .../eastern_kingdoms/scholomance/boss_darkmaster_gandling.cpp | 4 ++-- scripts/eastern_kingdoms/scholomance/scholomance.h | 2 +- sd2_revision_nr.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/eastern_kingdoms/scholomance/boss_darkmaster_gandling.cpp b/scripts/eastern_kingdoms/scholomance/boss_darkmaster_gandling.cpp index 497922c83..d45cf6cb2 100644 --- a/scripts/eastern_kingdoms/scholomance/boss_darkmaster_gandling.cpp +++ b/scripts/eastern_kingdoms/scholomance/boss_darkmaster_gandling.cpp @@ -26,8 +26,8 @@ EndScriptData */ enum { - SPELL_ARCANE_MISSILES = 15790, // SpellId not sure, original was 22272 - SPELL_SHADOW_SHIELD = 12040, // SpellID not sure, original was 22417 stated as "wrong, but 12040 is wrong either." + SPELL_ARCANE_MISSILES = 15790, + SPELL_SHADOW_SHIELD = 12040, SPELL_CURSE = 18702, SPELL_SHADOW_PORTAL = 17950 }; diff --git a/scripts/eastern_kingdoms/scholomance/scholomance.h b/scripts/eastern_kingdoms/scholomance/scholomance.h index 9b6868ca4..cf91e0ce6 100644 --- a/scripts/eastern_kingdoms/scholomance/scholomance.h +++ b/scripts/eastern_kingdoms/scholomance/scholomance.h @@ -63,7 +63,7 @@ struct SpawnLocation static const SpawnLocation aGandlingSpawnLocs[1] = { - {180.73f, -9.43856f, 75.507f, 1.61399f} + {180.771f, -5.4286f, 75.5702f, 1.29154f} }; struct GandlingEventData diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 912a7aab1..d6684d9f6 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2104" + #define SD2_REVISION_NR "2105" #endif // __SD2_REVISION_NR_H__ From 22dff22db4dc359acaa3324d7cd50096ea69ff6a Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Sat, 14 May 2011 01:15:04 +0200 Subject: [PATCH 0085/1172] [2106] Replace uint64 GUIDs with ObjectGuid in kalimdor/ zone scripts --- scripts/kalimdor/azuremyst_isle.cpp | 8 ++++---- scripts/kalimdor/felwood.cpp | 8 ++++---- scripts/kalimdor/mulgore.cpp | 10 +++++----- scripts/kalimdor/orgrimmar.cpp | 8 ++++---- scripts/kalimdor/the_barrens.cpp | 30 ++++++++++++++--------------- sd2_revision_nr.h | 2 +- 6 files changed, 33 insertions(+), 33 deletions(-) diff --git a/scripts/kalimdor/azuremyst_isle.cpp b/scripts/kalimdor/azuremyst_isle.cpp index 4bef90fcf..be243d354 100644 --- a/scripts/kalimdor/azuremyst_isle.cpp +++ b/scripts/kalimdor/azuremyst_isle.cpp @@ -56,7 +56,7 @@ struct MANGOS_DLL_DECL npc_draenei_survivorAI : public ScriptedAI { npc_draenei_survivorAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} - uint64 m_uiCaster; + ObjectGuid m_casterGuid; uint32 m_uiSayThanksTimer; uint32 m_uiRunAwayTimer; @@ -66,7 +66,7 @@ struct MANGOS_DLL_DECL npc_draenei_survivorAI : public ScriptedAI void Reset() { - m_uiCaster = 0; + m_casterGuid.Clear(); m_uiSayThanksTimer = 0; m_uiRunAwayTimer = 0; @@ -110,7 +110,7 @@ struct MANGOS_DLL_DECL npc_draenei_survivorAI : public ScriptedAI m_creature->CastSpell(m_creature, SPELL_STUNNED, true); - m_uiCaster = pCaster->GetGUID(); + m_casterGuid = pCaster->GetObjectGuid(); m_uiSayThanksTimer = 5000; } @@ -124,7 +124,7 @@ struct MANGOS_DLL_DECL npc_draenei_survivorAI : public ScriptedAI { m_creature->RemoveAurasDueToSpell(SPELL_IRRIDATION); - if (Player* pPlayer = m_creature->GetMap()->GetPlayer(m_uiCaster)) + if (Player* pPlayer = m_creature->GetMap()->GetPlayer(m_casterGuid)) { if (pPlayer->GetTypeId() != TYPEID_PLAYER) return; diff --git a/scripts/kalimdor/felwood.cpp b/scripts/kalimdor/felwood.cpp index 842872768..e6478217f 100644 --- a/scripts/kalimdor/felwood.cpp +++ b/scripts/kalimdor/felwood.cpp @@ -355,7 +355,7 @@ struct MANGOS_DLL_DECL npc_kroshiusAI : public ScriptedAI Reset(); } - uint64 m_uiPlayerGUID; + ObjectGuid m_playerGuid; uint32 m_uiKnockBackTimer; uint32 m_uiPhaseTimer; @@ -364,7 +364,7 @@ struct MANGOS_DLL_DECL npc_kroshiusAI : public ScriptedAI void Reset() { m_uiKnockBackTimer = urand(5000, 8000); - m_uiPlayerGUID = 0; + m_playerGuid.Clear(); if (!m_uiPhase) { @@ -383,7 +383,7 @@ struct MANGOS_DLL_DECL npc_kroshiusAI : public ScriptedAI m_uiPhase = 1; m_uiPhaseTimer = 2500; - m_uiPlayerGUID = pSource->GetGUID(); + m_playerGuid = pSource->GetObjectGuid(); // TODO: A visual Flame Circle around the mob still missing } @@ -417,7 +417,7 @@ struct MANGOS_DLL_DECL npc_kroshiusAI : public ScriptedAI // TODO workaround will better idea m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE); m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PASSIVE); - if (Player* pPlayer = m_creature->GetMap()->GetPlayer(m_uiPlayerGUID)) + if (Player* pPlayer = m_creature->GetMap()->GetPlayer(m_playerGuid)) { if (m_creature->IsWithinDistInMap(pPlayer, 30.0f)) AttackStart(pPlayer); diff --git a/scripts/kalimdor/mulgore.cpp b/scripts/kalimdor/mulgore.cpp index 4fb02b324..0c37aa142 100644 --- a/scripts/kalimdor/mulgore.cpp +++ b/scripts/kalimdor/mulgore.cpp @@ -50,7 +50,7 @@ struct MANGOS_DLL_DECL npc_kyle_the_frenziedAI : public ScriptedAI bool m_bEvent; bool m_bIsMovingToLunch; - uint64 m_uiPlayerGUID; + ObjectGuid m_playerGuid; uint32 m_uiEventTimer; uint8 m_uiEventPhase; @@ -58,7 +58,7 @@ struct MANGOS_DLL_DECL npc_kyle_the_frenziedAI : public ScriptedAI { m_bEvent = false; m_bIsMovingToLunch = false; - m_uiPlayerGUID = 0; + m_playerGuid.Clear(); m_uiEventTimer = 5000; m_uiEventPhase = 0; @@ -71,7 +71,7 @@ struct MANGOS_DLL_DECL npc_kyle_the_frenziedAI : public ScriptedAI if (!m_creature->getVictim() && !m_bEvent && pSpell->Id == SPELL_LUNCH) { if (pCaster->GetTypeId() == TYPEID_PLAYER) - m_uiPlayerGUID = pCaster->GetGUID(); + m_playerGuid = pCaster->GetObjectGuid(); if (m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() == WAYPOINT_MOTION_TYPE) { @@ -110,7 +110,7 @@ struct MANGOS_DLL_DECL npc_kyle_the_frenziedAI : public ScriptedAI switch(m_uiEventPhase) { case 1: - if (Player* pPlayer = m_creature->GetMap()->GetPlayer(m_uiPlayerGUID)) + if (Player* pPlayer = m_creature->GetMap()->GetPlayer(m_playerGuid)) { GameObject* pGo = pPlayer->GetGameObject(SPELL_LUNCH); @@ -140,7 +140,7 @@ struct MANGOS_DLL_DECL npc_kyle_the_frenziedAI : public ScriptedAI m_creature->HandleEmote(EMOTE_STATE_USESTANDING); break; case 3: - if (Player* pPlayer = m_creature->GetMap()->GetPlayer(m_uiPlayerGUID)) + if (Player* pPlayer = m_creature->GetMap()->GetPlayer(m_playerGuid)) pPlayer->TalkedToCreature(m_creature->GetEntry(), m_creature->GetObjectGuid()); m_creature->UpdateEntry(NPC_KYLE_FRIENDLY); diff --git a/scripts/kalimdor/orgrimmar.cpp b/scripts/kalimdor/orgrimmar.cpp index b997476ca..ed827de0d 100644 --- a/scripts/kalimdor/orgrimmar.cpp +++ b/scripts/kalimdor/orgrimmar.cpp @@ -80,7 +80,7 @@ struct MANGOS_DLL_DECL npc_shenthulAI : public ScriptedAI bool CanEmote; uint32 Salute_Timer; uint32 Reset_Timer; - uint64 playerGUID; + ObjectGuid m_playerGuid; void Reset() { @@ -88,7 +88,7 @@ struct MANGOS_DLL_DECL npc_shenthulAI : public ScriptedAI CanEmote = false; Salute_Timer = 6000; Reset_Timer = 0; - playerGUID = 0; + m_playerGuid.Clear(); } void ReceiveEmote(Player* pPlayer, uint32 emote) @@ -109,7 +109,7 @@ struct MANGOS_DLL_DECL npc_shenthulAI : public ScriptedAI { if (Reset_Timer < diff) { - if (Player* pPlayer = m_creature->GetMap()->GetPlayer(playerGUID)) + if (Player* pPlayer = m_creature->GetMap()->GetPlayer(m_playerGuid)) { if (pPlayer->GetTypeId() == TYPEID_PLAYER && pPlayer->GetQuestStatus(QUEST_SHATTERED_SALUTE) == QUEST_STATUS_INCOMPLETE) pPlayer->FailQuest(QUEST_SHATTERED_SALUTE); @@ -147,7 +147,7 @@ bool QuestAccept_npc_shenthul(Player* pPlayer, Creature* pCreature, const Quest* if (npc_shenthulAI* pShenAI = dynamic_cast(pCreature->AI())) { pShenAI->CanTalk = true; - pShenAI->playerGUID = pPlayer->GetGUID(); + pShenAI->m_playerGuid = pPlayer->GetObjectGuid(); } } return true; diff --git a/scripts/kalimdor/the_barrens.cpp b/scripts/kalimdor/the_barrens.cpp index 833b4e0c9..88d7cda80 100644 --- a/scripts/kalimdor/the_barrens.cpp +++ b/scripts/kalimdor/the_barrens.cpp @@ -317,9 +317,9 @@ struct MANGOS_DLL_DECL npc_twiggy_flatheadAI : public ScriptedAI uint32 Challenger_Count; uint32 ChallengerDeath_Timer; - uint64 PlayerGUID; - uint64 BigWillGUID; - uint64 AffrayChallenger[6]; + ObjectGuid m_playerGuid; + ObjectGuid m_bigWillGuid; + ObjectGuid m_aAffrayChallengerGuids[6]; void Reset() { @@ -330,11 +330,11 @@ struct MANGOS_DLL_DECL npc_twiggy_flatheadAI : public ScriptedAI Challenger_Count = 0; ChallengerDeath_Timer = 0; - PlayerGUID = 0; - BigWillGUID = 0; + m_playerGuid.Clear(); + m_bigWillGuid.Clear(); for(uint8 i = 0; i < 6; ++i) - AffrayChallenger[i] = 0; + m_aAffrayChallengerGuids[i].Clear(); } bool CanStartEvent(Player* pPlayer) @@ -342,7 +342,7 @@ struct MANGOS_DLL_DECL npc_twiggy_flatheadAI : public ScriptedAI if (!EventInProgress) { EventInProgress = true; - PlayerGUID = pPlayer->GetGUID(); + m_playerGuid = pPlayer->GetObjectGuid(); DoScriptText(SAY_TWIGGY_BEGIN, m_creature, pPlayer); return true; } @@ -365,7 +365,7 @@ struct MANGOS_DLL_DECL npc_twiggy_flatheadAI : public ScriptedAI pCreature->setFaction(35); pCreature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); pCreature->HandleEmote(EMOTE_ONESHOT_ROAR); - AffrayChallenger[i] = pCreature->GetGUID(); + m_aAffrayChallengerGuids[i] = pCreature->GetObjectGuid(); } } @@ -388,12 +388,12 @@ struct MANGOS_DLL_DECL npc_twiggy_flatheadAI : public ScriptedAI { for(uint8 i = 0; i < 6; ++i) { - Creature *challenger = m_creature->GetMap()->GetCreature(AffrayChallenger[i]); + Creature *challenger = m_creature->GetMap()->GetCreature(m_aAffrayChallengerGuids[i]); if (challenger && !challenger->isAlive() && challenger->isDead()) { DoScriptText(SAY_TWIGGY_DOWN, m_creature); challenger->RemoveCorpse(); - AffrayChallenger[i] = 0; + m_aAffrayChallengerGuids[i].Clear(); continue; } } @@ -403,7 +403,7 @@ struct MANGOS_DLL_DECL npc_twiggy_flatheadAI : public ScriptedAI if (Event_Timer < diff) { - Player* pPlayer = m_creature->GetMap()->GetPlayer(PlayerGUID); + Player* pPlayer = m_creature->GetMap()->GetPlayer(m_playerGuid); if (!pPlayer || pPlayer->isDead()) Reset(); @@ -418,7 +418,7 @@ struct MANGOS_DLL_DECL npc_twiggy_flatheadAI : public ScriptedAI break; case 1: DoScriptText(SAY_TWIGGY_FRAY, m_creature); - if (Creature *challenger = m_creature->GetMap()->GetCreature(AffrayChallenger[Challenger_Count])) + if (Creature *challenger = m_creature->GetMap()->GetCreature(m_aAffrayChallengerGuids[Challenger_Count])) SetChallengerReady(challenger); else Reset(); ++Challenger_Count; @@ -429,7 +429,7 @@ struct MANGOS_DLL_DECL npc_twiggy_flatheadAI : public ScriptedAI case 2: if (Unit *temp = m_creature->SummonCreature(NPC_BIG_WILL, -1713.79f, -4342.09f, 6.05f, 6.15f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,300000)) { - BigWillGUID = temp->GetGUID(); + m_bigWillGuid = temp->GetObjectGuid(); temp->setFaction(35); temp->GetMotionMaster()->MovePoint(0, -1682.31f, -4329.68f, 2.78f); } @@ -437,7 +437,7 @@ struct MANGOS_DLL_DECL npc_twiggy_flatheadAI : public ScriptedAI ++Step; break; case 3: - if (Creature *will = m_creature->GetMap()->GetCreature(BigWillGUID)) + if (Creature *will = m_creature->GetMap()->GetCreature(m_bigWillGuid)) { will->setFaction(32); DoScriptText(SAY_BIG_WILL_READY, will, pPlayer); @@ -446,7 +446,7 @@ struct MANGOS_DLL_DECL npc_twiggy_flatheadAI : public ScriptedAI ++Step; break; case 4: - Creature *will = m_creature->GetMap()->GetCreature(BigWillGUID); + Creature *will = m_creature->GetMap()->GetCreature(m_bigWillGuid); if (will && will->isDead()) { DoScriptText(SAY_TWIGGY_OVER, m_creature); diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index d6684d9f6..8aa378c2e 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2105" + #define SD2_REVISION_NR "2106" #endif // __SD2_REVISION_NR_H__ From 5e1dd495bb7ebd3c0590722c558f7fc4460df375 Mon Sep 17 00:00:00 2001 From: NoFantasy Date: Sat, 14 May 2011 15:23:31 +0200 Subject: [PATCH 0086/1172] [2107] Add some missing texts and spell id's for pyroguard Signed-off-by: NoFantasy --- .../blackrock_spire/boss_pyroguard_emberseer.cpp | 13 ++++++++++++- sd2_revision_nr.h | 2 +- sql/scriptdev2_script_full.sql | 5 +++++ sql/updates/r2107_scriptdev2.sql | 6 ++++++ 4 files changed, 24 insertions(+), 2 deletions(-) create mode 100644 sql/updates/r2107_scriptdev2.sql diff --git a/scripts/eastern_kingdoms/blackrock_spire/boss_pyroguard_emberseer.cpp b/scripts/eastern_kingdoms/blackrock_spire/boss_pyroguard_emberseer.cpp index 148d5ba82..a95290c61 100644 --- a/scripts/eastern_kingdoms/blackrock_spire/boss_pyroguard_emberseer.cpp +++ b/scripts/eastern_kingdoms/blackrock_spire/boss_pyroguard_emberseer.cpp @@ -16,7 +16,7 @@ /* ScriptData SDName: Boss_Pyroguard_Emberseer -SD%Complete: 100 +SD%Complete: 50 SDComment: Event to activate Emberseer NYI - 'aggro'-text missing SDCategory: Blackrock Spire EndScriptData */ @@ -26,6 +26,17 @@ EndScriptData */ enum { + // Intro emote/say + EMOTE_BEGIN = -1229000, + EMOTE_NEAR = -1229001, + EMOTE_FULL = -1229002, + SAY_FREE = -1229003, + + // Intro spells + SPELL_FREEZE_ANIM = 16245, + SPELL_EMBERSEER_GROWING = 16048, + SPELL_FULL_STRENGHT = 16047, + SPELL_FIRENOVA = 23462, SPELL_FLAMEBUFFET = 23341, SPELL_PYROBLAST = 20228 // guesswork, but best fitting in spells-area, was 17274 (has mana cost) diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 8aa378c2e..583a56dd7 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2106" + #define SD2_REVISION_NR "2107" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index d2cf11b8a..9176bbe69 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -909,6 +909,11 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen -- -1 209 000 ZUL'FARRAK -- -1 229 000 BLACKROCK SPIRE +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1229000,'%s begins to regain its strength!',0,2,0,0,'pyroguard EMOTE_BEGIN'), +(-1229001,'%s is nearly at full strength!',0,2,0,0,'pyroguard EMOTE_NEAR'), +(-1229002,'%s regains its power and breaks free of its bonds!',0,2,0,0,'pyroguard EMOTE_FULL'), +(-1229003,'Ha! Ha! Ha! Thank you for freeing me, fools. Now let me repay you by charring the flesh from your bones.',0,1,0,0,'pyroguard SAY_FREE'); -- -1 230 000 BLACKROCK DEPTHS INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES diff --git a/sql/updates/r2107_scriptdev2.sql b/sql/updates/r2107_scriptdev2.sql new file mode 100644 index 000000000..aeb442577 --- /dev/null +++ b/sql/updates/r2107_scriptdev2.sql @@ -0,0 +1,6 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1229003 AND -1229000; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1229000,'%s begins to regain its strength!',0,2,0,0,'pyroguard EMOTE_BEGIN'), +(-1229001,'%s is nearly at full strength!',0,2,0,0,'pyroguard EMOTE_NEAR'), +(-1229002,'%s regains its power and breaks free of its bonds!',0,2,0,0,'pyroguard EMOTE_FULL'), +(-1229003,'Ha! Ha! Ha! Thank you for freeing me, fools. Now let me repay you by charring the flesh from your bones.',0,1,0,0,'pyroguard SAY_FREE'); From 985c752be48be3ccde511c84cad2e8de7e6c6fb9 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Sat, 14 May 2011 16:30:24 +0200 Subject: [PATCH 0087/1172] [2108] Replace uint64 GUIDs with ObjectGuid in eastern_kingdoms/ zone scripts Further changes: npc_deathstalker_erland - remove unneeded stored GUIDs, replace with GridSearcher when needed npc_unworthy_initiate - actually use stored GUID --- scripts/eastern_kingdoms/eversong_woods.cpp | 30 ++++----- scripts/eastern_kingdoms/ghostlands.cpp | 22 +++---- .../scarlet_enclave/ebon_hold.cpp | 64 +++++++++---------- .../eastern_kingdoms/silverpine_forest.cpp | 62 ++++-------------- scripts/eastern_kingdoms/swamp_of_sorrows.cpp | 13 ++-- scripts/eastern_kingdoms/tirisfal_glades.cpp | 8 +-- scripts/eastern_kingdoms/undercity.cpp | 8 +-- sd2_revision_nr.h | 2 +- 8 files changed, 86 insertions(+), 123 deletions(-) diff --git a/scripts/eastern_kingdoms/eversong_woods.cpp b/scripts/eastern_kingdoms/eversong_woods.cpp index 5fcfbba66..2bdbc0725 100644 --- a/scripts/eastern_kingdoms/eversong_woods.cpp +++ b/scripts/eastern_kingdoms/eversong_woods.cpp @@ -77,8 +77,8 @@ struct MANGOS_DLL_DECL npc_kelerun_bloodmournAI : public ScriptedAI } uint32 m_uiNpcFlags; - uint64 m_uiPlayerGUID; - uint64 uiChallengerGUID[MAX_CHALLENGER]; + ObjectGuid m_playerGuid; + ObjectGuid m_aChallengerGuids[MAX_CHALLENGER]; uint8 m_uiChallengerCount; @@ -92,9 +92,10 @@ struct MANGOS_DLL_DECL npc_kelerun_bloodmournAI : public ScriptedAI { m_creature->SetUInt32Value(UNIT_NPC_FLAGS, m_uiNpcFlags); - m_uiPlayerGUID = 0; + m_playerGuid.Clear(); - memset(&uiChallengerGUID, 0, sizeof(uiChallengerGUID)); + for (uint8 i = 0; i < MAX_CHALLENGER; ++i) + m_aChallengerGuids[i].Clear(); m_uiChallengerCount = 0; @@ -111,11 +112,11 @@ struct MANGOS_DLL_DECL npc_kelerun_bloodmournAI : public ScriptedAI m_bIsEventInProgress = true; } - bool CanProgressEvent(uint64 uiPlayer) + bool CanProgressEvent(Player* pPlayer) { if (m_bIsEventInProgress) { - m_uiPlayerGUID = uiPlayer; + m_playerGuid = pPlayer->GetObjectGuid(); DoSpawnChallengers(); m_uiEngageTimer = 15000; @@ -134,7 +135,7 @@ struct MANGOS_DLL_DECL npc_kelerun_bloodmournAI : public ScriptedAI fChallengerLoc[i][2], fChallengerLoc[i][3], TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 600000)) { - uiChallengerGUID[i] = pCreature->GetGUID(); + m_aChallengerGuids[i] = pCreature->GetObjectGuid(); pCreature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); } } @@ -146,7 +147,7 @@ struct MANGOS_DLL_DECL npc_kelerun_bloodmournAI : public ScriptedAI { if (m_uiTimeOutTimer && m_uiTimeOutTimer < uiDiff) { - if (!m_uiPlayerGUID) + if (m_playerGuid.IsEmpty()) { //player are expected to use GO within a minute, if not, event will fail. Reset(); @@ -160,11 +161,11 @@ struct MANGOS_DLL_DECL npc_kelerun_bloodmournAI : public ScriptedAI if (m_uiCheckAliveStateTimer < uiDiff) { - if (Creature* pChallenger = m_creature->GetMap()->GetCreature(uiChallengerGUID[m_uiChallengerCount])) + if (Creature* pChallenger = m_creature->GetMap()->GetCreature(m_aChallengerGuids[m_uiChallengerCount])) { if (!pChallenger->isAlive()) { - Player* pPlayer = m_creature->GetMap()->GetPlayer(m_uiPlayerGUID); + Player* pPlayer = m_creature->GetMap()->GetPlayer(m_playerGuid); if (pPlayer && !pPlayer->isAlive()) { @@ -194,11 +195,11 @@ struct MANGOS_DLL_DECL npc_kelerun_bloodmournAI : public ScriptedAI if (m_uiEngageTimer && m_uiEngageTimer < uiDiff) { - Player* pPlayer = m_creature->GetMap()->GetPlayer(m_uiPlayerGUID); + Player* pPlayer = m_creature->GetMap()->GetPlayer(m_playerGuid); if (pPlayer && pPlayer->isAlive()) { - if (Creature* pCreature = m_creature->GetMap()->GetCreature(uiChallengerGUID[m_uiChallengerCount])) + if (Creature* pCreature = m_creature->GetMap()->GetCreature(m_aChallengerGuids[m_uiChallengerCount])) { DoScriptText(uiSayId[m_uiChallengerCount], m_creature, pPlayer); pCreature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); @@ -237,9 +238,8 @@ bool GOUse_go_harbinger_second_trial(Player* pPlayer, GameObject* pGO) { if (Creature* pCreature = GetClosestCreatureWithEntry(pGO, NPC_KELERUN, 30.0f)) { - npc_kelerun_bloodmournAI* pKelrunAI = dynamic_cast(pCreature->AI()); - if (pKelrunAI && pKelrunAI->CanProgressEvent(pPlayer->GetGUID())) - return false; + if (npc_kelerun_bloodmournAI* pKelrunAI = dynamic_cast(pCreature->AI())) + pKelrunAI->CanProgressEvent(pPlayer); } } diff --git a/scripts/eastern_kingdoms/ghostlands.cpp b/scripts/eastern_kingdoms/ghostlands.cpp index 9d512ed3d..8f74e8459 100644 --- a/scripts/eastern_kingdoms/ghostlands.cpp +++ b/scripts/eastern_kingdoms/ghostlands.cpp @@ -111,22 +111,22 @@ struct MANGOS_DLL_DECL npc_ranger_lilathaAI : public npc_escortAI { npc_ranger_lilathaAI(Creature* pCreature) : npc_escortAI(pCreature) { - m_uiGoCageGUID = 0; - m_uiHeliosGUID = 0; + m_goCageGuid = ObjectGuid(); + m_heliosGuid = ObjectGuid(); Reset(); } - uint64 m_uiGoCageGUID; - uint64 m_uiHeliosGUID; + ObjectGuid m_goCageGuid; + ObjectGuid m_heliosGuid; void MoveInLineOfSight(Unit* pUnit) { if (HasEscortState(STATE_ESCORT_ESCORTING)) { - if (!m_uiHeliosGUID && pUnit->GetEntry() == NPC_CAPTAIN_HELIOS) + if (m_heliosGuid.IsEmpty() && pUnit->GetEntry() == NPC_CAPTAIN_HELIOS) { if (m_creature->IsWithinDistInMap(pUnit, 30.0f)) - m_uiHeliosGUID = pUnit->GetGUID(); + m_heliosGuid = pUnit->GetObjectGuid(); } } @@ -145,7 +145,7 @@ struct MANGOS_DLL_DECL npc_ranger_lilathaAI : public npc_escortAI case 0: if (GameObject* pGoTemp = GetClosestGameObjectWithEntry(m_creature, GO_CAGE, 10.0f)) { - m_uiGoCageGUID = pGoTemp->GetGUID(); + m_goCageGuid = pGoTemp->GetObjectGuid(); pGoTemp->SetGoState(GO_STATE_ACTIVE); } @@ -154,7 +154,7 @@ struct MANGOS_DLL_DECL npc_ranger_lilathaAI : public npc_escortAI DoScriptText(SAY_START, m_creature, pPlayer); break; case 1: - if (GameObject* pGo = m_creature->GetMap()->GetGameObject(m_uiGoCageGUID)) + if (GameObject* pGo = m_creature->GetMap()->GetGameObject(m_goCageGuid)) pGo->SetGoState(GO_STATE_READY); break; case 5: @@ -184,7 +184,7 @@ struct MANGOS_DLL_DECL npc_ranger_lilathaAI : public npc_escortAI break; case 33: DoScriptText(SAY_END2, m_creature, pPlayer); - if (Creature* pHelios = m_creature->GetMap()->GetCreature(m_uiHeliosGUID)) + if (Creature* pHelios = m_creature->GetMap()->GetCreature(m_heliosGuid)) DoScriptText(CAPTAIN_ANSWER, pHelios, m_creature); break; } @@ -194,8 +194,8 @@ struct MANGOS_DLL_DECL npc_ranger_lilathaAI : public npc_escortAI { if (!HasEscortState(STATE_ESCORT_ESCORTING)) { - m_uiGoCageGUID = 0; - m_uiHeliosGUID = 0; + m_goCageGuid.Clear(); + m_heliosGuid.Clear(); } } }; diff --git a/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp b/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp index 6748c2189..48df490a0 100644 --- a/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp +++ b/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp @@ -102,13 +102,13 @@ struct MANGOS_DLL_DECL npc_a_special_surpriseAI : public ScriptedAI uint32 m_uiExecuteSpeech_Timer; uint32 m_uiExecuteSpeech_Counter; - uint64 m_uiPlayerGUID; + ObjectGuid m_playerGuid; void Reset() { m_uiExecuteSpeech_Timer = 0; m_uiExecuteSpeech_Counter = 0; - m_uiPlayerGUID = 0; + m_playerGuid.Clear(); } bool MeetQuestCondition(Player* pPlayer) @@ -162,20 +162,20 @@ struct MANGOS_DLL_DECL npc_a_special_surpriseAI : public ScriptedAI void MoveInLineOfSight(Unit* pWho) { - if (m_uiPlayerGUID || pWho->GetTypeId() != TYPEID_PLAYER || !pWho->IsWithinDist(m_creature, INTERACTION_DISTANCE)) + if (!m_playerGuid.IsEmpty() || pWho->GetTypeId() != TYPEID_PLAYER || !pWho->IsWithinDist(m_creature, INTERACTION_DISTANCE)) return; if (MeetQuestCondition((Player*)pWho)) - m_uiPlayerGUID = pWho->GetGUID(); + m_playerGuid = pWho->GetObjectGuid(); } void UpdateAI(const uint32 uiDiff) { - if (m_uiPlayerGUID && !m_creature->getVictim() && m_creature->isAlive()) + if (!m_playerGuid.IsEmpty() && !m_creature->getVictim() && m_creature->isAlive()) { if (m_uiExecuteSpeech_Timer < uiDiff) { - Player* pPlayer = m_creature->GetMap()->GetPlayer(m_uiPlayerGUID); + Player* pPlayer = m_creature->GetMap()->GetPlayer(m_playerGuid); if (!pPlayer) { @@ -523,7 +523,7 @@ struct MANGOS_DLL_DECL npc_death_knight_initiateAI : public ScriptedAI { npc_death_knight_initiateAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } - uint64 m_uiDuelerGUID; + ObjectGuid m_duelerGuid; uint32 m_uiDuelTimer; bool m_bIsDuelInProgress; @@ -534,7 +534,7 @@ struct MANGOS_DLL_DECL npc_death_knight_initiateAI : public ScriptedAI m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_UNK_15); - m_uiDuelerGUID = 0; + m_duelerGuid.Clear(); m_uiDuelTimer = 5000; m_bIsDuelInProgress = false; } @@ -554,7 +554,7 @@ struct MANGOS_DLL_DECL npc_death_knight_initiateAI : public ScriptedAI { if (!m_bIsDuelInProgress && pSpell->Id == SPELL_DUEL_TRIGGERED && pCaster->GetTypeId() == TYPEID_PLAYER) { - m_uiDuelerGUID = pCaster->GetGUID(); + m_duelerGuid = pCaster->GetObjectGuid(); m_bIsDuelInProgress = true; } } @@ -565,7 +565,7 @@ struct MANGOS_DLL_DECL npc_death_knight_initiateAI : public ScriptedAI { uiDamage = 0; - if (Player* pPlayer = m_creature->GetMap()->GetPlayer(m_uiDuelerGUID)) + if (Player* pPlayer = m_creature->GetMap()->GetPlayer(m_duelerGuid)) m_creature->CastSpell(pPlayer, SPELL_DUEL_VICTORY, true); //possibly not evade, but instead have end sequenze @@ -583,7 +583,7 @@ struct MANGOS_DLL_DECL npc_death_knight_initiateAI : public ScriptedAI { m_creature->setFaction(FACTION_HOSTILE); - if (Player* pPlayer = m_creature->GetMap()->GetPlayer(m_uiDuelerGUID)) + if (Player* pPlayer = m_creature->GetMap()->GetPlayer(m_duelerGuid)) AttackStart(pPlayer); } else @@ -674,7 +674,7 @@ struct MANGOS_DLL_DECL npc_koltira_deathweaverAI : public npc_escortAI uint32 m_uiWave; uint32 m_uiWave_Timer; - uint64 m_uiValrothGUID; + ObjectGuid m_valrothGuid; void Reset() { @@ -682,7 +682,7 @@ struct MANGOS_DLL_DECL npc_koltira_deathweaverAI : public npc_escortAI { m_uiWave = 0; m_uiWave_Timer = 3000; - m_uiValrothGUID = 0; + m_valrothGuid.Clear(); } } @@ -722,13 +722,10 @@ struct MANGOS_DLL_DECL npc_koltira_deathweaverAI : public npc_escortAI void JustSummoned(Creature* pSummoned) { if (Player* pPlayer = GetPlayerForEscort()) - { pSummoned->AI()->AttackStart(pPlayer); - pSummoned->AddThreat(m_creature); - } if (pSummoned->GetEntry() == NPC_HIGH_INQUISITOR_VALROTH) - m_uiValrothGUID = pSummoned->GetGUID(); + m_valrothGuid = pSummoned->GetObjectGuid(); } void SummonAcolyte(uint32 uiAmount) @@ -767,7 +764,7 @@ struct MANGOS_DLL_DECL npc_koltira_deathweaverAI : public npc_escortAI break; case 4: { - Creature* pTemp = m_creature->GetMap()->GetCreature(m_uiValrothGUID); + Creature* pTemp = m_creature->GetMap()->GetCreature(m_valrothGuid); if (!pTemp || !pTemp->isAlive()) { @@ -888,19 +885,19 @@ struct MANGOS_DLL_DECL npc_unworthy_initiate_anchorAI : public ScriptedAI { npc_unworthy_initiate_anchorAI(Creature* pCreature) : ScriptedAI(pCreature) { - m_uiMyInitiate = 0; + m_myInitiateGuid = ObjectGuid(); Reset(); } - uint64 m_uiMyInitiate; - uint64 m_uiMyPrisonGUID; + ObjectGuid m_myInitiateGuid; + ObjectGuid m_myPrisonGuid; void Reset() { } - void NotifyMe(Unit* pSource, uint64 uiPrisonGuid) + void NotifyMe(Unit* pSource, GameObject* pGo) { - m_uiMyPrisonGUID = uiPrisonGuid; - Creature* pInitiate = m_creature->GetMap()->GetCreature(m_uiMyInitiate); + m_myPrisonGuid = pGo->GetObjectGuid(); + Creature* pInitiate = m_creature->GetMap()->GetCreature(m_myInitiateGuid); if (pInitiate && pSource) { @@ -909,14 +906,14 @@ struct MANGOS_DLL_DECL npc_unworthy_initiate_anchorAI : public ScriptedAI } } - void RegisterCloseInitiate(uint64 uiGuid) + void RegisterCloseInitiate(Creature* pCreature) { - m_uiMyInitiate = uiGuid; + m_myInitiateGuid = pCreature->GetObjectGuid(); } void ResetPrison() { - if (GameObject* pPrison = m_creature->GetMap()->GetGameObject(m_uiMyPrisonGUID)) + if (GameObject* pPrison = m_creature->GetMap()->GetGameObject(m_myPrisonGuid)) pPrison->ResetDoorOrButton(); } }; @@ -954,7 +951,7 @@ struct MANGOS_DLL_DECL npc_unworthy_initiateAI : public ScriptedAI DisplayToSpell* m_pToTransform; - uint64 m_uiMyAnchorGUID; + ObjectGuid m_myAnchorGuid; uint32 m_uiNormFaction; uint32 m_uiAnchorCheckTimer; uint32 m_uiPhase; @@ -969,7 +966,7 @@ struct MANGOS_DLL_DECL npc_unworthy_initiateAI : public ScriptedAI if (m_creature->getFaction() != m_uiNormFaction) m_creature->setFaction(m_uiNormFaction); - m_uiMyAnchorGUID = 0; + m_myAnchorGuid.Clear(); m_uiAnchorCheckTimer = 5000; m_uiPhase = PHASE_INACTIVE_OR_COMBAT; m_uiPhaseTimer = 7500; @@ -1002,8 +999,8 @@ struct MANGOS_DLL_DECL npc_unworthy_initiateAI : public ScriptedAI Creature* GetAnchor() { - if (m_uiMyAnchorGUID) - return m_creature->GetMap()->GetCreature(m_uiMyAnchorGUID); + if (!m_myAnchorGuid.IsEmpty()) + return m_creature->GetMap()->GetCreature(m_myAnchorGuid); else return GetClosestCreatureWithEntry(m_creature, NPC_ANCHOR, INTERACTION_DISTANCE*2); } @@ -1013,9 +1010,10 @@ struct MANGOS_DLL_DECL npc_unworthy_initiateAI : public ScriptedAI if (Creature* pAnchor = GetAnchor()) { if (npc_unworthy_initiate_anchorAI* pAnchorAI = dynamic_cast(pAnchor->AI())) - pAnchorAI->RegisterCloseInitiate(m_creature->GetGUID()); + pAnchorAI->RegisterCloseInitiate(m_creature); pAnchor->CastSpell(m_creature, SPELL_CHAINED_PESANT_CHEST, false); + m_myAnchorGuid = pAnchor->GetObjectGuid(); m_uiAnchorCheckTimer = 0; return; @@ -1138,7 +1136,7 @@ bool GOUse_go_acherus_soul_prison(Player* pPlayer, GameObject* pGo) if (Creature* pAnchor = GetClosestCreatureWithEntry(pGo, NPC_ANCHOR, INTERACTION_DISTANCE)) { if (npc_unworthy_initiate_anchorAI* pAnchorAI = dynamic_cast(pAnchor->AI())) - pAnchorAI->NotifyMe(pPlayer, pGo->GetGUID()); + pAnchorAI->NotifyMe(pPlayer, pGo); } return false; diff --git a/scripts/eastern_kingdoms/silverpine_forest.cpp b/scripts/eastern_kingdoms/silverpine_forest.cpp index 27fa2162c..2c39d77af 100644 --- a/scripts/eastern_kingdoms/silverpine_forest.cpp +++ b/scripts/eastern_kingdoms/silverpine_forest.cpp @@ -56,34 +56,7 @@ enum struct MANGOS_DLL_DECL npc_deathstalker_erlandAI : public npc_escortAI { - npc_deathstalker_erlandAI(Creature* pCreature) : npc_escortAI(pCreature) - { - uiRaneGUID = 0; - uiQuinnGUID = 0; - Reset(); - } - - uint64 uiRaneGUID; - uint64 uiQuinnGUID; - - void MoveInLineOfSight(Unit* pUnit) - { - if (HasEscortState(STATE_ESCORT_ESCORTING)) - { - if (!uiRaneGUID && pUnit->GetEntry() == NPC_RANE) - { - if (m_creature->IsWithinDistInMap(pUnit, 30.0f)) - uiRaneGUID = pUnit->GetGUID(); - } - if (!uiQuinnGUID && pUnit->GetEntry() == NPC_QUINN) - { - if (m_creature->IsWithinDistInMap(pUnit, 30.0f)) - uiQuinnGUID = pUnit->GetGUID(); - } - } - - npc_escortAI::MoveInLineOfSight(pUnit); - } + npc_deathstalker_erlandAI(Creature* pCreature) : npc_escortAI(pCreature) { Reset(); } void WaypointReached(uint32 i) { @@ -102,7 +75,7 @@ struct MANGOS_DLL_DECL npc_deathstalker_erlandAI : public npc_escortAI pPlayer->GroupEventHappens(QUEST_ERLAND, m_creature); break; case 14: - if (Creature* pRane = m_creature->GetMap()->GetCreature(uiRaneGUID)) + if (Creature* pRane = GetClosestCreatureWithEntry(m_creature, NPC_RANE, 45.0f)) DoScriptText(SAY_RANE, pRane, m_creature); break; case 15: @@ -115,7 +88,7 @@ struct MANGOS_DLL_DECL npc_deathstalker_erlandAI : public npc_escortAI DoScriptText(SAY_QUINN, m_creature); break; case 25: - if (Creature* pQuinn = m_creature->GetMap()->GetCreature(uiQuinnGUID)) + if (Creature* pQuinn = GetClosestCreatureWithEntry(m_creature, NPC_QUINN, 45.0f)) DoScriptText(SAY_QUINN_REPLY, pQuinn, m_creature); break; case 26: @@ -124,14 +97,7 @@ struct MANGOS_DLL_DECL npc_deathstalker_erlandAI : public npc_escortAI } } - void Reset() - { - if (!HasEscortState(STATE_ESCORT_ESCORTING)) - { - uiRaneGUID = 0; - uiQuinnGUID = 0; - } - } + void Reset() {} void Aggro(Unit* who) { @@ -209,23 +175,21 @@ static float m_afMoveCoords[] = {-410.69f, 1498.04f, 19.77f}; struct MANGOS_DLL_DECL npc_deathstalker_faerleiaAI : public ScriptedAI { - npc_deathstalker_faerleiaAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + npc_deathstalker_faerleiaAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } - void Reset() - { - } + void Reset() {} - uint64 m_uiPlayerGUID; + ObjectGuid m_playerGuid; uint32 m_uiWaveTimer; uint32 m_uiSummonCount; uint8 m_uiWaveCount; bool m_bEventStarted; - void StartEvent(uint64 uiPlayerGUID) + void StartEvent(Player* pPlayer) { m_creature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER); - m_uiPlayerGUID = uiPlayerGUID; + m_playerGuid = pPlayer->GetObjectGuid(); m_bEventStarted = true; m_uiWaveTimer = 10000; m_uiSummonCount = 0; @@ -234,14 +198,14 @@ struct MANGOS_DLL_DECL npc_deathstalker_faerleiaAI : public ScriptedAI void FinishEvent() { - m_uiPlayerGUID = 0; + m_playerGuid.Clear(); m_bEventStarted = false; m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER); } void JustDied(Unit* pKiller) { - if (Player* pPlayer = m_creature->GetMap()->GetPlayer(m_uiPlayerGUID)) + if (Player* pPlayer = m_creature->GetMap()->GetPlayer(m_playerGuid)) pPlayer->SendQuestFailed(QUEST_PYREWOOD_AMBUSH); FinishEvent(); @@ -270,7 +234,7 @@ struct MANGOS_DLL_DECL npc_deathstalker_faerleiaAI : public ScriptedAI { DoScriptText(SAY_COMPLETED, m_creature); - if (Player* pPlayer = m_creature->GetMap()->GetPlayer(m_uiPlayerGUID)) + if (Player* pPlayer = m_creature->GetMap()->GetPlayer(m_playerGuid)) pPlayer->GroupEventHappens(QUEST_PYREWOOD_AMBUSH, m_creature); FinishEvent(); @@ -328,7 +292,7 @@ bool QuestAccept_npc_deathstalker_faerleia(Player* pPlayer, Creature* pCreature, DoScriptText(SAY_START, pCreature, pPlayer); if (npc_deathstalker_faerleiaAI* pFaerleiaAI = dynamic_cast(pCreature->AI())) - pFaerleiaAI->StartEvent(pPlayer->GetGUID()); + pFaerleiaAI->StartEvent(pPlayer); } return true; } diff --git a/scripts/eastern_kingdoms/swamp_of_sorrows.cpp b/scripts/eastern_kingdoms/swamp_of_sorrows.cpp index a94c7c45b..09f9c3286 100644 --- a/scripts/eastern_kingdoms/swamp_of_sorrows.cpp +++ b/scripts/eastern_kingdoms/swamp_of_sorrows.cpp @@ -51,11 +51,11 @@ struct MANGOS_DLL_DECL npc_galen_goodwardAI : public npc_escortAI { npc_galen_goodwardAI(Creature* pCreature) : npc_escortAI(pCreature) { - m_uiGalensCageGUID = 0; + m_galensCageGuid = ObjectGuid(); Reset(); } - uint64 m_uiGalensCageGUID; + ObjectGuid m_galensCageGuid; uint32 m_uiPeriodicSay; void Reset() @@ -76,14 +76,15 @@ struct MANGOS_DLL_DECL npc_galen_goodwardAI : public npc_escortAI case 0: { GameObject* pCage = NULL; - if (m_uiGalensCageGUID) - pCage = m_creature->GetMap()->GetGameObject(m_uiGalensCageGUID); + if (!m_galensCageGuid.IsEmpty()) + pCage = m_creature->GetMap()->GetGameObject(m_galensCageGuid); else pCage = GetClosestGameObjectWithEntry(m_creature, GO_GALENS_CAGE, INTERACTION_DISTANCE); + if (pCage) { pCage->UseDoorOrButton(); - m_uiGalensCageGUID = pCage->GetGUID(); + m_galensCageGuid = pCage->GetObjectGuid(); } break; } @@ -98,7 +99,7 @@ struct MANGOS_DLL_DECL npc_galen_goodwardAI : public npc_escortAI switch (uiPointId) { case 0: - if (GameObject* pCage = m_creature->GetMap()->GetGameObject(m_uiGalensCageGUID)) + if (GameObject* pCage = m_creature->GetMap()->GetGameObject(m_galensCageGuid)) pCage->ResetDoorOrButton(); break; case 20: diff --git a/scripts/eastern_kingdoms/tirisfal_glades.cpp b/scripts/eastern_kingdoms/tirisfal_glades.cpp index 0502a20eb..5be648f2b 100644 --- a/scripts/eastern_kingdoms/tirisfal_glades.cpp +++ b/scripts/eastern_kingdoms/tirisfal_glades.cpp @@ -95,13 +95,13 @@ struct MANGOS_DLL_DECL npc_calvin_montagueAI : public ScriptedAI uint32 m_uiNormFaction; uint32 m_uiPhase; uint32 m_uiPhaseTimer; - uint64 m_uiPlayerGUID; + ObjectGuid m_playerGuid; void Reset() { m_uiPhase = 0; m_uiPhaseTimer = 5000; - m_uiPlayerGUID = 0; + m_playerGuid.Clear(); if (m_creature->getFaction() != m_uiNormFaction) m_creature->setFaction(m_uiNormFaction); @@ -127,7 +127,7 @@ struct MANGOS_DLL_DECL npc_calvin_montagueAI : public ScriptedAI m_uiPhase = 1; if (pDoneBy->GetTypeId() == TYPEID_PLAYER) - m_uiPlayerGUID = pDoneBy->GetGUID(); + m_playerGuid = pDoneBy->GetObjectGuid(); } } @@ -150,7 +150,7 @@ struct MANGOS_DLL_DECL npc_calvin_montagueAI : public ScriptedAI ++m_uiPhase; break; case 2: - if (Player* pPlayer = m_creature->GetMap()->GetPlayer(m_uiPlayerGUID)) + if (Player* pPlayer = m_creature->GetMap()->GetPlayer(m_playerGuid)) pPlayer->AreaExploredOrEventHappens(QUEST_590); m_creature->CastSpell(m_creature,SPELL_DRINK,true); diff --git a/scripts/eastern_kingdoms/undercity.cpp b/scripts/eastern_kingdoms/undercity.cpp index 79de1226c..2053f89cd 100644 --- a/scripts/eastern_kingdoms/undercity.cpp +++ b/scripts/eastern_kingdoms/undercity.cpp @@ -60,7 +60,7 @@ struct MANGOS_DLL_DECL npc_lady_sylvanas_windrunnerAI : public ScriptedAI uint32 LamentEvent_Timer; bool LamentEvent; - uint64 targetGUID; + ObjectGuid m_targetGuid; float myX; float myY; @@ -74,20 +74,20 @@ struct MANGOS_DLL_DECL npc_lady_sylvanas_windrunnerAI : public ScriptedAI LamentEvent_Timer = 5000; LamentEvent = false; - targetGUID = 0; + m_targetGuid.Clear(); } void JustSummoned(Creature *summoned) { if (summoned->GetEntry() == ENTRY_HIGHBORNE_BUNNY) { - if (Creature* pBunny = m_creature->GetMap()->GetCreature(targetGUID)) + if (Creature* pBunny = m_creature->GetMap()->GetCreature(m_targetGuid)) { pBunny->NearTeleportTo(pBunny->GetPositionX(), pBunny->GetPositionY(), myZ+15.0f, 0.0f); summoned->CastSpell(pBunny,SPELL_RIBBON_OF_SOULS,false); } - targetGUID = summoned->GetGUID(); + m_targetGuid = summoned->GetObjectGuid(); } } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 583a56dd7..3bac69340 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2107" + #define SD2_REVISION_NR "2108" #endif // __SD2_REVISION_NR_H__ From d96610cf9aef2d65620b8677005f437dda87b945 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Sat, 14 May 2011 19:13:35 +0200 Subject: [PATCH 0088/1172] [2109] Various missing ObjectGuid cleanups in zone scripts --- scripts/northrend/borean_tundra.cpp | 22 +++++++++++----------- scripts/northrend/sholazar_basin.cpp | 2 +- scripts/outland/netherstorm.cpp | 2 +- scripts/world/npc_professions.cpp | 2 +- sd2_revision_nr.h | 2 +- 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/scripts/northrend/borean_tundra.cpp b/scripts/northrend/borean_tundra.cpp index 039c3b704..4c00421e0 100644 --- a/scripts/northrend/borean_tundra.cpp +++ b/scripts/northrend/borean_tundra.cpp @@ -208,23 +208,23 @@ struct MANGOS_DLL_DECL npc_nesingwary_trapperAI : public ScriptedAI uint8 m_uiPhase; uint32 m_uiPhaseTimer; - uint64 m_uiPlayerGUID; - uint64 m_uiGobjectTrapGUID; + ObjectGuid m_playerGuid; + ObjectGuid m_trapGuid; void Reset() { m_uiPhase = 0; m_uiPhaseTimer = 0; - m_uiPlayerGUID = 0; - m_uiGobjectTrapGUID = 0; + m_playerGuid.Clear(); + m_trapGuid.Clear(); } - void StartAction(uint64 uiPlayerGUID, uint64 uiGoTrapGUID) + void StartAction(Player* pPlayer, GameObject* pTrap) { m_uiPhase = 1; m_uiPhaseTimer = 3000; - m_uiPlayerGUID = uiPlayerGUID; - m_uiGobjectTrapGUID = uiGoTrapGUID; + m_playerGuid = pPlayer->GetObjectGuid(); + m_trapGuid = pTrap->GetObjectGuid(); switch (urand(0, 3)) { @@ -244,20 +244,20 @@ struct MANGOS_DLL_DECL npc_nesingwary_trapperAI : public ScriptedAI switch(m_uiPhase) { case 1: - if (GameObject* pTrap = m_creature->GetMap()->GetGameObject(m_uiGobjectTrapGUID)) + if (GameObject* pTrap = m_creature->GetMap()->GetGameObject(m_trapGuid)) { if (pTrap->isSpawned()) m_creature->GetMotionMaster()->MovePoint(0, pTrap->GetPositionX(), pTrap->GetPositionY(), pTrap->GetPositionZ()); } break; case 2: - if (GameObject* pTrap = m_creature->GetMap()->GetGameObject(m_uiGobjectTrapGUID)) + if (GameObject* pTrap = m_creature->GetMap()->GetGameObject(m_trapGuid)) { if (pTrap->isSpawned()) { pTrap->Use(m_creature); - if (Player* pPlayer = m_creature->GetMap()->GetPlayer(m_uiPlayerGUID)) + if (Player* pPlayer = m_creature->GetMap()->GetPlayer(m_playerGuid)) { if (pPlayer->isAlive()) pPlayer->KilledMonsterCredit(m_creature->GetEntry()); @@ -421,7 +421,7 @@ bool GOUse_go_caribou_trap(Player* pPlayer, GameObject* pGo) if (Creature* pCreature = pGo->SummonCreature(NPC_NESINGWARY_TRAPPER, fX, fY, fZ, pGo->GetOrientation(), TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 10000)) { if (npc_nesingwary_trapperAI* pTrapperAI = dynamic_cast(pCreature->AI())) - pTrapperAI->StartAction(pPlayer->GetGUID(), pGo->GetGUID()); + pTrapperAI->StartAction(pPlayer, pGo); pGo->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_IN_USE); diff --git a/scripts/northrend/sholazar_basin.cpp b/scripts/northrend/sholazar_basin.cpp index ae0b13e54..26943f7a5 100644 --- a/scripts/northrend/sholazar_basin.cpp +++ b/scripts/northrend/sholazar_basin.cpp @@ -316,7 +316,7 @@ bool GossipSelect_npc_injured_rainspeaker(Player* pPlayer, Creature* pCreature, pPlayer->CLOSE_GOSSIP_MENU(); if (npc_injured_rainspeakerAI* pEscortAI = dynamic_cast(pCreature->AI())) - pEscortAI->Start(true, pPlayer->GetGUID()); + pEscortAI->Start(true, pPlayer); } return false; diff --git a/scripts/outland/netherstorm.cpp b/scripts/outland/netherstorm.cpp index 53703142a..5cf5a9dd3 100644 --- a/scripts/outland/netherstorm.cpp +++ b/scripts/outland/netherstorm.cpp @@ -352,7 +352,7 @@ bool GOUse_go_manaforge_control_console(Player* pPlayer, GameObject* pGo) if (npc_manaforge_control_consoleAI* pManaforgeAI = dynamic_cast(pManaforge->AI())) { pManaforgeAI->m_playerGuid = pPlayer->GetObjectGuid(); - pManaforgeAI->m_consoleGuid = pGo->GetGUID(); + pManaforgeAI->m_consoleGuid = pGo->GetObjectGuid(); } pGo->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_IN_USE); diff --git a/scripts/world/npc_professions.cpp b/scripts/world/npc_professions.cpp index 58998db1c..3f0878a20 100644 --- a/scripts/world/npc_professions.cpp +++ b/scripts/world/npc_professions.cpp @@ -1158,7 +1158,7 @@ bool GossipSelect_npc_prof_tailor(Player* pPlayer, Creature* pCreature, uint32 u { pPlayer->PlayerTalkClass->GetGossipMenu()->AddMenuItem(0,GOSSIP_LEARN_DRAGON, GOSSIP_SENDER_INFO, GOSSIP_ACTION_INFO_DEF, "", 0); - pPlayer->SEND_GOSSIP_MENU(5584, pGo->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(5584, pGo->GetObjectGuid()); return true; }*/ diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 3bac69340..116d2bf47 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2108" + #define SD2_REVISION_NR "2109" #endif // __SD2_REVISION_NR_H__ From a21f5d5fe2e93cb345fb6953ba37a18937a06da0 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Sun, 15 May 2011 21:45:56 +0200 Subject: [PATCH 0089/1172] [2110] Fix compile after [11491] - thanks to vladimir for finding --- scripts/outland/black_temple/boss_illidan.cpp | 2 +- sd2_revision_nr.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/outland/black_temple/boss_illidan.cpp b/scripts/outland/black_temple/boss_illidan.cpp index 88900089b..5560907db 100644 --- a/scripts/outland/black_temple/boss_illidan.cpp +++ b/scripts/outland/black_temple/boss_illidan.cpp @@ -617,7 +617,7 @@ struct MANGOS_DLL_DECL npc_akama_illidanAI : public ScriptedAI for (ThreatList::const_iterator itr = tList.begin();itr != tList.end(); ++itr) { // Loop through threatlist till our GUID is found in it. - if ((*itr)->getUnitGuid() == m_creature->GetGUID()) + if ((*itr)->getUnitGuid() == m_creature->GetObjectGuid()) { (*itr)->removeReference(); // Delete ourself from his threatlist. return; // No need to continue anymore. diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 116d2bf47..4526713f6 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2109" + #define SD2_REVISION_NR "2110" #endif // __SD2_REVISION_NR_H__ From d359439ab29f8d197e47cb0735b73ec325d78b21 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Sun, 15 May 2011 21:51:20 +0200 Subject: [PATCH 0090/1172] [2111] Remove unneeded explicit initialisation of ObjectGuid variables Thanks to zergtmn for pointing --- scripts/eastern_kingdoms/ghostlands.cpp | 7 +------ scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp | 8 ++------ scripts/eastern_kingdoms/swamp_of_sorrows.cpp | 6 +----- scripts/outland/shadowmoon_valley.cpp | 1 - scripts/world/npcs_special.cpp | 3 +-- sd2_revision_nr.h | 2 +- 6 files changed, 6 insertions(+), 21 deletions(-) diff --git a/scripts/eastern_kingdoms/ghostlands.cpp b/scripts/eastern_kingdoms/ghostlands.cpp index 8f74e8459..1f0869459 100644 --- a/scripts/eastern_kingdoms/ghostlands.cpp +++ b/scripts/eastern_kingdoms/ghostlands.cpp @@ -109,12 +109,7 @@ enum struct MANGOS_DLL_DECL npc_ranger_lilathaAI : public npc_escortAI { - npc_ranger_lilathaAI(Creature* pCreature) : npc_escortAI(pCreature) - { - m_goCageGuid = ObjectGuid(); - m_heliosGuid = ObjectGuid(); - Reset(); - } + npc_ranger_lilathaAI(Creature* pCreature) : npc_escortAI(pCreature) { Reset(); } ObjectGuid m_goCageGuid; ObjectGuid m_heliosGuid; diff --git a/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp b/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp index 48df490a0..e5364c82b 100644 --- a/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp +++ b/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp @@ -883,16 +883,12 @@ DisplayToSpell m_aDisplayToSpell[] = struct MANGOS_DLL_DECL npc_unworthy_initiate_anchorAI : public ScriptedAI { - npc_unworthy_initiate_anchorAI(Creature* pCreature) : ScriptedAI(pCreature) - { - m_myInitiateGuid = ObjectGuid(); - Reset(); - } + npc_unworthy_initiate_anchorAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } ObjectGuid m_myInitiateGuid; ObjectGuid m_myPrisonGuid; - void Reset() { } + void Reset() {} void NotifyMe(Unit* pSource, GameObject* pGo) { diff --git a/scripts/eastern_kingdoms/swamp_of_sorrows.cpp b/scripts/eastern_kingdoms/swamp_of_sorrows.cpp index 09f9c3286..1c410b76c 100644 --- a/scripts/eastern_kingdoms/swamp_of_sorrows.cpp +++ b/scripts/eastern_kingdoms/swamp_of_sorrows.cpp @@ -49,11 +49,7 @@ enum Galen struct MANGOS_DLL_DECL npc_galen_goodwardAI : public npc_escortAI { - npc_galen_goodwardAI(Creature* pCreature) : npc_escortAI(pCreature) - { - m_galensCageGuid = ObjectGuid(); - Reset(); - } + npc_galen_goodwardAI(Creature* pCreature) : npc_escortAI(pCreature) { Reset(); } ObjectGuid m_galensCageGuid; uint32 m_uiPeriodicSay; diff --git a/scripts/outland/shadowmoon_valley.cpp b/scripts/outland/shadowmoon_valley.cpp index a4c6595ae..dfbf28312 100644 --- a/scripts/outland/shadowmoon_valley.cpp +++ b/scripts/outland/shadowmoon_valley.cpp @@ -203,7 +203,6 @@ struct MANGOS_DLL_DECL mob_enslaved_netherwing_drakeAI : public ScriptedAI { mob_enslaved_netherwing_drakeAI(Creature* pCreature) : ScriptedAI(pCreature) { - m_playerGuid = ObjectGuid(); Tapped = false; Reset(); } diff --git a/scripts/world/npcs_special.cpp b/scripts/world/npcs_special.cpp index 697eccf09..7e202e685 100644 --- a/scripts/world/npcs_special.cpp +++ b/scripts/world/npcs_special.cpp @@ -107,7 +107,6 @@ struct MANGOS_DLL_DECL npc_air_force_botsAI : public ScriptedAI npc_air_force_botsAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pSpawnAssoc = NULL; - m_spawnedGuid = ObjectGuid(); // find the correct spawnhandling static uint32 uiEntryCount = sizeof(m_aSpawnAssociations)/sizeof(SpawnAssociation); @@ -843,7 +842,7 @@ struct MANGOS_DLL_DECL npc_garments_of_questsAI : public npc_escortAI void Reset() { - m_playerGuid = ObjectGuid(); + m_playerGuid.Clear(); m_bIsHealed = false; m_bCanRun = false; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 4526713f6..1c10d716a 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2110" + #define SD2_REVISION_NR "2111" #endif // __SD2_REVISION_NR_H__ From 399ec686f59ff20c8a9748c27fd1eeec5753f587 Mon Sep 17 00:00:00 2001 From: Cher0 Date: Mon, 16 May 2011 19:28:42 +0200 Subject: [PATCH 0091/1172] [2112] Add support for quest 3525 With additional improvements from the dark lords of the Sith. Signed-off-by: NoFantasy --- .../razorfen_downs/razorfen_downs.cpp | 281 +++++++++++++++++- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 + sql/scriptdev2_script_full.sql | 39 ++- sql/updates/r2112_mangos.sql | 1 + sql/updates/r2112_scriptdev2.sql | 38 +++ 6 files changed, 353 insertions(+), 9 deletions(-) create mode 100644 sql/updates/r2112_mangos.sql create mode 100644 sql/updates/r2112_scriptdev2.sql diff --git a/scripts/kalimdor/razorfen_downs/razorfen_downs.cpp b/scripts/kalimdor/razorfen_downs/razorfen_downs.cpp index 4895f722d..7b7f17138 100644 --- a/scripts/kalimdor/razorfen_downs/razorfen_downs.cpp +++ b/scripts/kalimdor/razorfen_downs/razorfen_downs.cpp @@ -17,15 +17,17 @@ /* ScriptData SDName: Razorfen_Downs SD%Complete: 100 -SDComment: Support for Henry Stern(2 recipes) +SDComment: Support for Henry Stern(2 recipes), Quest 3525 SDCategory: Razorfen Downs EndScriptData */ /* ContentData npc_henry_stern +npc_belnistrasz EndContentData */ #include "precompiled.h" +#include "escort_ai.h" /*### # npc_henry_stern @@ -73,13 +75,278 @@ bool GossipSelect_npc_henry_stern (Player* pPlayer, Creature* pCreature, uint32 return true; } +/*### +# npc_belnistrasz +####*/ + +enum +{ + QUEST_EXTINGUISHING_THE_IDOL = 3525, + + SAY_BELNISTRASZ_READY = -1129005, + SAY_BELNISTRASZ_START_RIT = -1129006, + SAY_BELNISTRASZ_AGGRO_1 = -1129007, + SAY_BELNISTRASZ_AGGRO_2 = -1129008, + SAY_BELNISTRASZ_3_MIN = -1129009, + SAY_BELNISTRASZ_2_MIN = -1129010, + SAY_BELNISTRASZ_1_MIN = -1129011, + SAY_BELNISTRASZ_FINISH = -1129012, + + NPC_IDOL_ROOM_SPAWNER = 8611, + + NPC_WITHERED_BATTLE_BOAR = 7333, + NPC_WITHERED_QUILGUARD = 7329, + NPC_DEATHS_HEAD_GEOMANCER = 7335, + NPC_PLAGUEMAW_THE_ROTTING = 7356, + + GO_BELNISTRASZ_BRAZIER = 152097, + + SPELL_ARCANE_INTELLECT = 13326, // use this somewhere (he has it as default) + SPELL_FIREBALL = 9053, + SPELL_FROST_NOVA = 11831, + SPELL_IDOL_SHUTDOWN = 12774, + + // summon spells only exist in 1.x + //SPELL_SUMMON_1 = 12694, // NPC_WITHERED_BATTLE_BOAR + //SPELL_SUMMON_2 = 14802, // NPC_DEATHS_HEAD_GEOMANCER + //SPELL_SUMMON_3 = 14801, // NPC_WITHERED_QUILGUARD +}; + +static float m_fSpawnerCoord[3][4]= +{ + {2582.79f, 954.392f, 52.4821f, 3.78736f}, + {2569.42f, 956.380f, 52.2732f, 5.42797f}, + {2570.62f, 942.393f, 53.7433f, 0.71558f} +}; + +struct MANGOS_DLL_DECL npc_belnistraszAI : public npc_escortAI +{ + npc_belnistraszAI(Creature* pCreature) : npc_escortAI(pCreature) + { + m_uiRitualPhase = 0; + m_uiRitualTimer = 1000; + m_bAggro = false; + Reset(); + } + + uint8 m_uiRitualPhase; + uint32 m_uiRitualTimer; + bool m_bAggro; + + uint32 m_uiFireballTimer; + uint32 m_uiFrostNovaTimer; + + void Reset() + { + m_uiFireballTimer = 1000; + m_uiFrostNovaTimer = 6000; + } + + void AttackedBy(Unit* pAttacker) + { + if (HasEscortState(STATE_ESCORT_PAUSED)) + { + if (!m_bAggro) + { + DoScriptText(urand(0,1) ? SAY_BELNISTRASZ_AGGRO_1 : SAY_BELNISTRASZ_AGGRO_1, m_creature, pAttacker); + m_bAggro = true; + } + + return; + } + + ScriptedAI::AttackedBy(pAttacker); + } + + void SpawnerSummon(Creature* pSummoner) + { + if (m_uiRitualPhase > 7) + { + pSummoner->SummonCreature(NPC_PLAGUEMAW_THE_ROTTING, pSummoner->GetPositionX(), pSummoner->GetPositionY(), pSummoner->GetPositionZ(), pSummoner->GetOrientation(), TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 60000); + return; + } + + for(int i = 0; i < 4; ++i) + { + uint32 uiEntry = 0; + + // ref TARGET_RANDOM_CIRCUMFERENCE_POINT + float angle = 2.0f * M_PI_F * rand_norm_f(); + float fX, fZ, fY; + pSummoner->GetClosePoint(fX, fZ, fY, 0.0f, 2.0f, angle); + + switch(i) + { + case 0: + case 1: + uiEntry = NPC_WITHERED_BATTLE_BOAR; + break; + case 2: + uiEntry = NPC_WITHERED_QUILGUARD; + break; + case 3: + uiEntry = NPC_DEATHS_HEAD_GEOMANCER; + break; + } + + pSummoner->SummonCreature(uiEntry, fX, fZ, fY, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 60000); + } + } + + void JustSummoned(Creature* pSummoned) + { + SpawnerSummon(pSummoned); + } + + void DoSummonSpawner(int32 iType) + { + m_creature->SummonCreature(NPC_IDOL_ROOM_SPAWNER, m_fSpawnerCoord[iType][0], m_fSpawnerCoord[iType][1], m_fSpawnerCoord[iType][2], m_fSpawnerCoord[iType][3], TEMPSUMMON_TIMED_DESPAWN, 10000); + } + + void WaypointReached(uint32 uiPointId) + { + if (uiPointId == 24) + { + DoScriptText(SAY_BELNISTRASZ_START_RIT, m_creature); + SetEscortPaused(true); + } + } + + void UpdateEscortAI(const uint32 uiDiff) + { + if (HasEscortState(STATE_ESCORT_PAUSED)) + { + if (m_uiRitualTimer < uiDiff) + { + switch(m_uiRitualPhase) + { + case 0: + DoCastSpellIfCan(m_creature, SPELL_IDOL_SHUTDOWN); + m_uiRitualTimer = 1000; + break; + case 1: + DoSummonSpawner(irand(1, 3)); + m_uiRitualTimer = 39000; + break; + case 2: + DoSummonSpawner(irand(1, 3)); + m_uiRitualTimer = 20000; + break; + case 3: + DoScriptText(SAY_BELNISTRASZ_3_MIN, m_creature, m_creature); + m_uiRitualTimer = 20000; + break; + case 4: + DoSummonSpawner(irand(1, 3)); + m_uiRitualTimer = 40000; + break; + case 5: + DoSummonSpawner(irand(1, 3)); + DoScriptText(SAY_BELNISTRASZ_2_MIN, m_creature, m_creature); + m_uiRitualTimer = 40000; + break; + case 6: + DoSummonSpawner(irand(1, 3)); + m_uiRitualTimer = 20000; + break; + case 7: + DoScriptText(SAY_BELNISTRASZ_1_MIN, m_creature, m_creature); + m_uiRitualTimer = 40000; + break; + case 8: + DoSummonSpawner(irand(1, 3)); + m_uiRitualTimer = 20000; + break; + case 9: + DoScriptText(SAY_BELNISTRASZ_FINISH, m_creature, m_creature); + m_uiRitualTimer = 3000; + break; + case 10: + { + if (Player* pPlayer = GetPlayerForEscort()) + { + pPlayer->GroupEventHappens(QUEST_EXTINGUISHING_THE_IDOL, m_creature); + + if (GameObject* pGo = GetClosestGameObjectWithEntry(m_creature, GO_BELNISTRASZ_BRAZIER, 10.0f)) + { + if (!pGo->isSpawned()) + { + pGo->SetRespawnTime(HOUR*IN_MILLISECONDS); + pGo->Refresh(); + } + } + } + + m_creature->RemoveAurasDueToSpell(SPELL_IDOL_SHUTDOWN); + SetEscortPaused(false); + break; + } + } + + ++m_uiRitualPhase; + } + else + m_uiRitualTimer -= uiDiff; + + return; + } + + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_uiFireballTimer < uiDiff) + { + DoCastSpellIfCan(m_creature->getVictim(), SPELL_FIREBALL); + m_uiFireballTimer = urand(2000,3000); + } + else + m_uiFireballTimer -= uiDiff; + + if (m_uiFrostNovaTimer < uiDiff) + { + DoCastSpellIfCan(m_creature->getVictim(), SPELL_FROST_NOVA); + m_uiFrostNovaTimer = urand(10000,15000); + } + else + m_uiFrostNovaTimer -= uiDiff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_npc_belnistrasz(Creature* pCreature) +{ + return new npc_belnistraszAI(pCreature); +} + +bool QuestAccept_npc_belnistrasz(Player* pPlayer, Creature* pCreature, const Quest* pQuest) +{ + if (pQuest->GetQuestId() == QUEST_EXTINGUISHING_THE_IDOL) + { + if (npc_belnistraszAI* pEscortAI = dynamic_cast(pCreature->AI())) + { + pEscortAI->Start(true, pPlayer, pQuest); + DoScriptText(SAY_BELNISTRASZ_READY, pCreature, pPlayer); + pCreature->setFaction(FACTION_ESCORT_N_NEUTRAL_ACTIVE); + } + } + + return true; +} + void AddSC_razorfen_downs() { - Script* newscript; + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "npc_henry_stern"; + pNewScript->pGossipHello = &GossipHello_npc_henry_stern; + pNewScript->pGossipSelect = &GossipSelect_npc_henry_stern; + pNewScript->RegisterSelf(); - newscript = new Script; - newscript->Name = "npc_henry_stern"; - newscript->pGossipHello = &GossipHello_npc_henry_stern; - newscript->pGossipSelect = &GossipSelect_npc_henry_stern; - newscript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "npc_belnistrasz"; + pNewScript->GetAI = &GetAI_npc_belnistrasz; + pNewScript->pQuestAcceptNPC = &QuestAccept_npc_belnistrasz; + pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 1c10d716a..46d44cdb7 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2111" + #define SD2_REVISION_NR "2112" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index e03c644b9..c5160e995 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -883,6 +883,7 @@ UPDATE creature_template SET ScriptName='npc_thrall_warchief' WHERE entry=4949; /* RAZORFEN DOWNS */ UPDATE creature_template SET ScriptName='boss_amnennar_the_coldbringer' WHERE entry=7358; UPDATE creature_template SET ScriptName='npc_henry_stern' WHERE entry=8696; +UPDATE creature_template SET ScriptName='npc_belnistrasz' WHERE entry=8516; /* RAZORFEN KRAUL */ UPDATE instance_template SET ScriptName='instance_razorfen_kraul' WHERE map=47; diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 9176bbe69..238fa6850 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -857,7 +857,16 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1129001,'To me, my servants!',5828,1,0,0,'amnennar SAY_SUMMON60'), (-1129002,'Come, spirits, attend your master!',5829,1,0,0,'amnennar SAY_SUMMON30'), (-1129003,'I am the hand of the Lich King!',5827,1,0,0,'amnennar SAY_HP'), -(-1129004,'Too...easy!',5826,1,0,0,'amnennar SAY_KILL'); +(-1129004,'Too...easy!',5826,1,0,0,'amnennar SAY_KILL'), + +(-1129005,'All right, stay close. These fiends will jump right out of the shadows at you if you let your guard down.',0,0,0,0,'belnistrasz SAY_READY'), +(-1129006,'Okay, here we go. It\'s going to take about five minutes to shut this thing down through the ritual. Once I start, keep the vermin off of me or it will be the end of us all!',0,0,0,0,'belnistrasz SAY_START_RIT'), +(-1129007,'You\'ll rue the day you crossed me, $N',0,0,0,0,'belnistrasz SAY_AGGRO_1'), +(-1129008,'Incoming $N - look sharp, friends!',0,0,0,0,'belnistrasz SAY_AGGRO_2'), +(-1129009,'Three minutes left -- I can feel the energy starting to build! Keep up the solid defense!',0,1,0,0,'belnistrasz SAY_3_MIN'), +(-1129010,'Just two minutes to go! We\'re half way there, but don\'t let your guard down!',0,1,0,0,'belnistrasz SAY_2_MIN'), +(-1129011,'One more minute! Hold on now, the ritual is about to take hold!',0,1,0,0,'belnistrasz SAY_1_MIN'), +(-1129012,'That\'s it -- we made it! The ritual is set in motion, and idol fires are about to go out for good! You truly are the heroes I thought you would be!',0,1,0,4,'belnistrasz SAY_FINISH'); -- -1 189 000 SCARLET MONASTERY INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES @@ -5630,4 +5639,32 @@ INSERT INTO script_waypoint VALUES (4508, 45, 1948.35, 1571.35, 80.96, 30000, 'SAY_WILLIX_END'), (4508, 46, 1947.02, 1566.42, 81.80, 30000, ''); +DELETE FROM script_waypoint WHERE entry = 8516; +INSERT INTO script_waypoint VALUES +(8516, 1,2603.18, 725.259, 54.6927, 0, ''), +(8516, 2,2587.13, 734.392, 55.231, 0, ''), +(8516, 3,2570.69, 753.572, 54.5855, 0, ''), +(8516, 4,2558.51, 747.66, 54.4482, 0, ''), +(8516, 5,2544.23, 772.924, 47.9255, 0, ''), +(8516, 6,2530.08, 797.475, 45.97, 0, ''), +(8516, 7,2521.83, 799.127, 44.3061, 0, ''), +(8516, 8,2502.61, 789.222, 39.5074, 0, ''), +(8516, 9,2495.25, 789.406, 39.499, 0, ''), +(8516, 10,2488.07, 802.455, 42.9834, 0, ''), +(8516, 11,2486.64, 826.649, 43.6363, 0, ''), +(8516, 12,2492.64, 835.166, 45.1427, 0, ''), +(8516, 13,2505.02, 847.564, 47.6487, 0, ''), +(8516, 14,2538.96, 877.362, 47.6781, 0, ''), +(8516, 15,2546.07, 885.672, 47.6789, 0, ''), +(8516, 16,2548.02, 897.584, 47.7277, 0, ''), +(8516, 17,2544.29, 909.116, 46.2506, 0, ''), +(8516, 18,2523.60, 920.306, 45.8717, 0, ''), +(8516, 19,2522.69, 933.546, 47.5769, 0, ''), +(8516, 20,2531.63, 959.893, 49.4111, 0, ''), +(8516, 21,2540.23, 973.338, 50.1241, 0, ''), +(8516, 22,2547.21, 977.489, 49.9759, 0, ''), +(8516, 23,2558.75, 969.243, 50.7353, 0, ''), +(8516, 24,2575.60, 950.138, 52.8460, 0, ''), +(8516, 25,2575.60, 950.138, 52.8460, 0, ''); + -- EOF diff --git a/sql/updates/r2112_mangos.sql b/sql/updates/r2112_mangos.sql new file mode 100644 index 000000000..92532839a --- /dev/null +++ b/sql/updates/r2112_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_belnistrasz' WHERE entry=8516; diff --git a/sql/updates/r2112_scriptdev2.sql b/sql/updates/r2112_scriptdev2.sql new file mode 100644 index 000000000..b1b3f1b1c --- /dev/null +++ b/sql/updates/r2112_scriptdev2.sql @@ -0,0 +1,38 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1129012 AND -1129005; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1129005,'All right, stay close. These fiends will jump right out of the shadows at you if you let your guard down.',0,0,0,0,'belnistrasz SAY_READY'), +(-1129006,'Okay, here we go. It\'s going to take about five minutes to shut this thing down through the ritual. Once I start, keep the vermin off of me or it will be the end of us all!',0,0,0,0,'belnistrasz SAY_START_RIT'), +(-1129007,'You\'ll rue the day you crossed me, $N',0,0,0,0,'belnistrasz SAY_AGGRO_1'), +(-1129008,'Incoming $N - look sharp, friends!',0,0,0,0,'belnistrasz SAY_AGGRO_2'), +(-1129009,'Three minutes left -- I can feel the energy starting to build! Keep up the solid defense!',0,1,0,0,'belnistrasz SAY_3_MIN'), +(-1129010,'Just two minutes to go! We\'re half way there, but don\'t let your guard down!',0,1,0,0,'belnistrasz SAY_2_MIN'), +(-1129011,'One more minute! Hold on now, the ritual is about to take hold!',0,1,0,0,'belnistrasz SAY_1_MIN'), +(-1129012,'That\'s it -- we made it! The ritual is set in motion, and idol fires are about to go out for good! You truly are the heroes I thought you would be!',0,1,0,4,'belnistrasz SAY_FINISH'); + +DELETE FROM script_waypoint WHERE entry = 8516; +INSERT INTO script_waypoint VALUES +(8516, 1,2603.18, 725.259, 54.6927, 0, ''), +(8516, 2,2587.13, 734.392, 55.231, 0, ''), +(8516, 3,2570.69, 753.572, 54.5855, 0, ''), +(8516, 4,2558.51, 747.66, 54.4482, 0, ''), +(8516, 5,2544.23, 772.924, 47.9255, 0, ''), +(8516, 6,2530.08, 797.475, 45.97, 0, ''), +(8516, 7,2521.83, 799.127, 44.3061, 0, ''), +(8516, 8,2502.61, 789.222, 39.5074, 0, ''), +(8516, 9,2495.25, 789.406, 39.499, 0, ''), +(8516, 10,2488.07, 802.455, 42.9834, 0, ''), +(8516, 11,2486.64, 826.649, 43.6363, 0, ''), +(8516, 12,2492.64, 835.166, 45.1427, 0, ''), +(8516, 13,2505.02, 847.564, 47.6487, 0, ''), +(8516, 14,2538.96, 877.362, 47.6781, 0, ''), +(8516, 15,2546.07, 885.672, 47.6789, 0, ''), +(8516, 16,2548.02, 897.584, 47.7277, 0, ''), +(8516, 17,2544.29, 909.116, 46.2506, 0, ''), +(8516, 18,2523.60, 920.306, 45.8717, 0, ''), +(8516, 19,2522.69, 933.546, 47.5769, 0, ''), +(8516, 20,2531.63, 959.893, 49.4111, 0, ''), +(8516, 21,2540.23, 973.338, 50.1241, 0, ''), +(8516, 22,2547.21, 977.489, 49.9759, 0, ''), +(8516, 23,2558.75, 969.243, 50.7353, 0, ''), +(8516, 24,2575.60, 950.138, 52.8460, 0, ''), +(8516, 25,2575.60, 950.138, 52.8460, 0, ''); From 2ee14914994286e763b7bf1aa519409feee9ddc6 Mon Sep 17 00:00:00 2001 From: NoFantasy Date: Tue, 17 May 2011 10:15:35 +0200 Subject: [PATCH 0092/1172] [2113] Correcting texts related to BWL Signed-off-by: NoFantasy --- sd2_revision_nr.h | 2 +- sql/scriptdev2_script_full.sql | 20 +++++++++++--------- sql/updates/r2113_scriptdev2.sql | 12 ++++++++++++ 3 files changed, 24 insertions(+), 10 deletions(-) create mode 100644 sql/updates/r2113_scriptdev2.sql diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 46d44cdb7..dd7a48419 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2112" + #define SD2_REVISION_NR "2113" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 238fa6850..b819e5bbb 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -1100,14 +1100,14 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1469004,'In this world where time is your enemy, it is my greatest ally. This grand game of life that you think you play in fact plays you. To that I say...',0,0,0,0,'victor_nefarius SAY_GAMESBEGIN_1'), (-1469005,'Let the games begin!',8280,1,0,0,'victor_nefarius SAY_GAMESBEGIN_2'), -(-1469006,'Ah, the heroes. You are persistent, aren\'t you. Your allied attempted to match his power against mine, and had to pay the price. Now he shall serve me, by slaughtering you. Get up little red wyrm and destroy them!',8279,1,0,0,'victor_nefarius SAY_NEFARIUS_CORRUPT'), +(-1469006,'Ah...the heroes. You are persistent, aren\'t you? Your ally here attempted to match his power against mine - and paid the price. Now he shall serve me...by slaughtering you.',8279,1,0,0,'victor_nefarius SAY_NEFARIUS_CORRUPT'), (-1469007,'Well done, my minions. The mortals\' courage begins to wane! Now, let\'s see how they contend with the true Lord of Blackrock Spire!',8288,1,0,0,'nefarian SAY_AGGRO'), (-1469008,'Enough! Now you vermin shall feel the force of my birthright, the fury of the earth itself.',8289,1,0,0,'nefarian SAY_XHEALTH'), -(-1469009,'Burn, you wretches! Burn!',8290,1,0,0,'nefarian SAY_SHADOWFLAME'), +(-1469009,'BURN! You wretches! BURN!',8290,1,0,0,'nefarian SAY_SHADOWFLAME'), (-1469010,'Impossible! Rise my minions! Serve your master once more!',8291,1,0,0,'nefarian SAY_RAISE_SKELETONS'), (-1469011,'Worthless $N! Your friends will join you soon enough!',8293,1,0,0,'nefarian SAY_SLAY'), -(-1469012,'This cannot be! I am the Master here! You mortals are nothing to my kind! DO YOU HEAR? NOTHING!',8292,1,0,0,'nefarian SAY_DEATH'), +(-1469012,'This cannot be! I am the master here! You mortals are nothing to my kind! Do you hear me? Nothing!',8292,1,0,0,'nefarian SAY_DEATH'), (-1469013,'Mages too? You should be more careful when you play with magic...',0,1,0,0,'nefarian SAY_MAGE'), (-1469014,'Warriors, I know you can hit harder than that! Let\'s see it!',0,1,0,0,'nefarian SAY_WARRIOR'), (-1469015,'Druids and your silly shapeshifting. Let\'s see it in action!',0,1,0,0,'nefarian SAY_DRUID'), @@ -1123,13 +1123,15 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1469024,'No! Not another one! I\'ll have your heads for this atrocity.',8277,1,0,0,'razorgore SAY_EGGS_BROKEN3'), (-1469025,'If I fall into the abyss I\'ll take all of you mortals with me...',8278,1,0,0,'razorgore SAY_DEATH'), -(-1469026,'Too late...friends. Nefarius\' corruption has taken hold. I cannot...control myself.',8281,1,0,0,'vaelastrasz SAY_LINE1'), -(-1469027,'I beg you Mortals, flee! Flee before I lose all control. The Black Fire rages within my heart. I must release it!',8282,1,0,0,'vaelastrasz SAY_LINE2'), -(-1469028,'FLAME! DEATH! DESTRUCTION! COWER MORTALS BEFORE THE WRATH OF LORD....NO! I MUST FIGHT THIS!',8283,1,0,0,'vaelastrasz SAY_LINE3'), -(-1469029,'Nefarius\' hate has made me stronger than ever before. You should have fled, while you could, mortals! The fury of Blackrock courses through my veins!',8285,1,0,0,'vaelastrasz SAY_HALFLIFE'), -(-1469030,'Forgive me $N, your death only adds to my failure.',8284,1,0,0,'vaelastrasz SAY_KILLTARGET'), +(-1469026,'Too late, friends! Nefarius\' corruption has taken hold...I cannot...control myself.',8281,1,0,0,'vaelastrasz SAY_LINE1'), +(-1469027,'I beg you, mortals - FLEE! Flee before I lose all sense of control! The black fire rages within my heart! I MUST- release it!',8282,1,0,0,'vaelastrasz SAY_LINE2'), +(-1469028,'FLAME! DEATH! DESTRUCTION! Cower, mortals before the wrath of Lord...NO - I MUST fight this! Alexstrasza help me, I MUST fight it!',8283,1,0,0,'vaelastrasz SAY_LINE3'), +(-1469029,'Nefarius\' hate has made me stronger than ever before! You should have fled while you could, mortals! The fury of Blackrock courses through my veins!',8285,1,0,0,'vaelastrasz SAY_HALFLIFE'), +(-1469030,'Forgive me, $N! Your death only adds to my failure!',8284,1,0,0,'vaelastrasz SAY_KILLTARGET'), -(-1469031,'Death Knights, get over here!',0,1,0,0,'nefarian SAY_DEATH_KNIGHT'); +(-1469031,'Death Knights, get over here!',0,1,0,0,'nefarian SAY_DEATH_KNIGHT'), + +(-1469032,'Get up, little red wyrm...and destroy them!',0,1,0,0,'victor_nefarius SAY_NEFARIUS_CORRUPT_2'); -- -1 509 000 RUINS OF AHN'QIRAJ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES diff --git a/sql/updates/r2113_scriptdev2.sql b/sql/updates/r2113_scriptdev2.sql new file mode 100644 index 000000000..01112f73d --- /dev/null +++ b/sql/updates/r2113_scriptdev2.sql @@ -0,0 +1,12 @@ +UPDATE script_texts SET content_default='BURN! You wretches! BURN!' WHERE entry = -1469009; +UPDATE script_texts SET content_default='This cannot be! I am the master here! You mortals are nothing to my kind! Do you hear me? Nothing!' WHERE entry = -1469012; +UPDATE script_texts SET content_default='Ah...the heroes. You are persistent, aren\'t you? Your ally here attempted to match his power against mine - and paid the price. Now he shall serve me...by slaughtering you.' WHERE entry = -1469006; +UPDATE script_texts SET content_default='Too late, friends! Nefarius\' corruption has taken hold...I cannot...control myself.' WHERE entry = -1469026; +UPDATE script_texts SET content_default='I beg you, mortals - FLEE! Flee before I lose all sense of control! The black fire rages within my heart! I MUST- release it!' WHERE entry = -1469027; +UPDATE script_texts SET content_default='FLAME! DEATH! DESTRUCTION! Cower, mortals before the wrath of Lord...NO - I MUST fight this! Alexstrasza help me, I MUST fight it!' WHERE entry = -1469028; +UPDATE script_texts SET content_default='Nefarius\' hate has made me stronger than ever before! You should have fled while you could, mortals! The fury of Blackrock courses through my veins!' WHERE entry = -1469029; +UPDATE script_texts SET content_default='Forgive me, $N! Your death only adds to my failure!' WHERE entry = -1469030; + +DELETE FROM script_texts WHERE entry=-1469032; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1469032,'Get up, little red wyrm...and destroy them!',0,1,0,0,'victor_nefarius SAY_NEFARIUS_CORRUPT_2'); From 96a6a18d0dd08067bc4391b00635c97c5ccdf426 Mon Sep 17 00:00:00 2001 From: NoFantasy Date: Tue, 17 May 2011 14:35:59 +0200 Subject: [PATCH 0093/1172] [2114] Correcting some coordinates in nefarius and more text corrections Signed-off-by: NoFantasy --- .../blackwing_lair/boss_victor_nefarius.cpp | 12 +++++++----- sd2_revision_nr.h | 2 +- sql/scriptdev2_script_full.sql | 14 +++++++------- sql/updates/r2114_scriptdev2.sql | 7 +++++++ 4 files changed, 22 insertions(+), 13 deletions(-) create mode 100644 sql/updates/r2114_scriptdev2.sql diff --git a/scripts/eastern_kingdoms/blackwing_lair/boss_victor_nefarius.cpp b/scripts/eastern_kingdoms/blackwing_lair/boss_victor_nefarius.cpp index 819713253..689889cf3 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/boss_victor_nefarius.cpp +++ b/scripts/eastern_kingdoms/blackwing_lair/boss_victor_nefarius.cpp @@ -64,11 +64,11 @@ struct SpawnLocation static const SpawnLocation aNefarianLocs[5] = { - {-7591.151f, -1204.051f, 476.800f}, // adds 1 & 2 - {-7514.598f, -1150.448f, 476.796f}, - {-7445.0f, -1332.0f, 536.0f}, // nefarian - {-7592.0f, -1264.0f, 481.0f}, // hide pos - {-7493.377f, -1258.85f, 478.30f}, // nefarian fly pos + {-7599.32f, -1191.72f, 475.545f}, // opening where red/blue/black darknid spawner appear (ori 3.05433) + {-7526.27f, -1135.04f, 473.445f}, // same as above, closest to door (ori 5.75959) + {-7498.177f, -1273.277f, 481.649f}, // nefarian spawn location (ori 1.798) + {-7592.0f, -1264.0f, 481.0f}, // hide pos (useless; remove this) + {-7502.002f, -1256.503f, 476.758f}, // nefarian fly to this position }; static const uint32 aPossibleDrake[MAX_DRAKES] = {NPC_BRONZE_DRAKANOID, NPC_BLUE_DRAKANOID, NPC_RED_DRAKANOID, NPC_GREEN_DRAKANOID, NPC_BLACK_DRAKANOID}; @@ -82,6 +82,8 @@ static const uint32 aPossibleDrake[MAX_DRAKES] = {NPC_BRONZE_DRAKANOID, NPC_BLUE //If nefarian dies then he will kill himself then he will be despawned in Nefarian script //To prevent players from doing the event twice +// Dev note: Lord Victor Nefarius should despawn completely, then ~5 seconds later Nefarian should appear. + struct MANGOS_DLL_DECL boss_victor_nefariusAI : public ScriptedAI { boss_victor_nefariusAI(Creature* pCreature) : ScriptedAI(pCreature) diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index dd7a48419..fa54c3ca0 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2113" + #define SD2_REVISION_NR "2114" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index b819e5bbb..2e659ad68 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -1098,9 +1098,9 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1469002,'REUSE ME',0,0,0,0,'REUSE ME'), (-1469003,'%s flinches as its skin shimmers.',0,2,0,0,'chromaggus EMOTE_SHIMMER'), -(-1469004,'In this world where time is your enemy, it is my greatest ally. This grand game of life that you think you play in fact plays you. To that I say...',0,0,0,0,'victor_nefarius SAY_GAMESBEGIN_1'), -(-1469005,'Let the games begin!',8280,1,0,0,'victor_nefarius SAY_GAMESBEGIN_2'), -(-1469006,'Ah...the heroes. You are persistent, aren\'t you? Your ally here attempted to match his power against mine - and paid the price. Now he shall serve me...by slaughtering you.',8279,1,0,0,'victor_nefarius SAY_NEFARIUS_CORRUPT'), +(-1469004,'In this world where time is your enemy, it is my greatest ally. This grand game of life that you think you play in fact plays you. To that I say...',0,1,0,1,'victor_nefarius SAY_GAMESBEGIN_1'), +(-1469005,'Let the games begin!',8280,1,0,22,'victor_nefarius SAY_GAMESBEGIN_2'), +(-1469006,'Ah...the heroes. You are persistent, aren\'t you? Your ally here attempted to match his power against mine - and paid the price. Now he shall serve me...by slaughtering you.',8279,1,0,23,'victor_nefarius SAY_NEFARIUS_CORRUPT'), (-1469007,'Well done, my minions. The mortals\' courage begins to wane! Now, let\'s see how they contend with the true Lord of Blackrock Spire!',8288,1,0,0,'nefarian SAY_AGGRO'), (-1469008,'Enough! Now you vermin shall feel the force of my birthright, the fury of the earth itself.',8289,1,0,0,'nefarian SAY_XHEALTH'), @@ -1123,15 +1123,15 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1469024,'No! Not another one! I\'ll have your heads for this atrocity.',8277,1,0,0,'razorgore SAY_EGGS_BROKEN3'), (-1469025,'If I fall into the abyss I\'ll take all of you mortals with me...',8278,1,0,0,'razorgore SAY_DEATH'), -(-1469026,'Too late, friends! Nefarius\' corruption has taken hold...I cannot...control myself.',8281,1,0,0,'vaelastrasz SAY_LINE1'), -(-1469027,'I beg you, mortals - FLEE! Flee before I lose all sense of control! The black fire rages within my heart! I MUST- release it!',8282,1,0,0,'vaelastrasz SAY_LINE2'), -(-1469028,'FLAME! DEATH! DESTRUCTION! Cower, mortals before the wrath of Lord...NO - I MUST fight this! Alexstrasza help me, I MUST fight it!',8283,1,0,0,'vaelastrasz SAY_LINE3'), +(-1469026,'Too late, friends! Nefarius\' corruption has taken hold...I cannot...control myself.',8281,1,0,1,'vaelastrasz SAY_LINE1'), +(-1469027,'I beg you, mortals - FLEE! Flee before I lose all sense of control! The black fire rages within my heart! I MUST- release it!',8282,1,0,1,'vaelastrasz SAY_LINE2'), +(-1469028,'FLAME! DEATH! DESTRUCTION! Cower, mortals before the wrath of Lord...NO - I MUST fight this! Alexstrasza help me, I MUST fight it!',8283,1,0,1,'vaelastrasz SAY_LINE3'), (-1469029,'Nefarius\' hate has made me stronger than ever before! You should have fled while you could, mortals! The fury of Blackrock courses through my veins!',8285,1,0,0,'vaelastrasz SAY_HALFLIFE'), (-1469030,'Forgive me, $N! Your death only adds to my failure!',8284,1,0,0,'vaelastrasz SAY_KILLTARGET'), (-1469031,'Death Knights, get over here!',0,1,0,0,'nefarian SAY_DEATH_KNIGHT'), -(-1469032,'Get up, little red wyrm...and destroy them!',0,1,0,0,'victor_nefarius SAY_NEFARIUS_CORRUPT_2'); +(-1469032,'Get up, little red wyrm...and destroy them!',0,1,0,1,'victor_nefarius SAY_NEFARIUS_CORRUPT_2'); -- -1 509 000 RUINS OF AHN'QIRAJ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES diff --git a/sql/updates/r2114_scriptdev2.sql b/sql/updates/r2114_scriptdev2.sql new file mode 100644 index 000000000..5337d806a --- /dev/null +++ b/sql/updates/r2114_scriptdev2.sql @@ -0,0 +1,7 @@ +UPDATE script_texts SET type=1, emote=1 WHERE entry = -1469004; +UPDATE script_texts SET emote=22 WHERE entry = -1469005; +UPDATE script_texts SET emote=23 WHERE entry = -1469006; +UPDATE script_texts SET emote=1 WHERE entry = -1469026; +UPDATE script_texts SET emote=1 WHERE entry = -1469027; +UPDATE script_texts SET emote=1 WHERE entry = -1469028; +UPDATE script_texts SET emote=1 WHERE entry = -1469032; From 0663639345c6f25147c69eb0180f4276450a8c5a Mon Sep 17 00:00:00 2001 From: PSZ Date: Tue, 17 May 2011 16:34:15 +0200 Subject: [PATCH 0094/1172] [2115] Fix a bad query Signed-off-by: NoFantasy --- sd2_revision_nr.h | 2 +- sql/updates/r2057_scriptdev2.sql | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index fa54c3ca0..17785b788 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2114" + #define SD2_REVISION_NR "2115" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/updates/r2057_scriptdev2.sql b/sql/updates/r2057_scriptdev2.sql index 37712eefc..282c5885d 100644 --- a/sql/updates/r2057_scriptdev2.sql +++ b/sql/updates/r2057_scriptdev2.sql @@ -1,4 +1,4 @@ -DELETE FROM script_texts WHERE entry BETWEEN 1329018 AND 1329016; +DELETE FROM script_texts WHERE entry BETWEEN -1329018 AND -1329016; INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES (-1329016,'Today you have unmade what took me years to create! For this you shall all die by my hand!',0,1,0,0,'dathrohan SAY_AGGRO'), (-1329017,'You fools think you can defeat me so easily? Face the true might of the Nathrezim!',0,1,0,0,'dathrohan SAY_TRANSFORM'), From 57c2fed10ac2186c11a1822675c80e5d593a80b0 Mon Sep 17 00:00:00 2001 From: NoFantasy Date: Tue, 17 May 2011 17:18:15 +0200 Subject: [PATCH 0095/1172] [2116] Correct some text related to razorgore + add missing Add gossip text for vaelastrasz as requested. --- .../blackwing_lair/boss_razorgore.cpp | 2 ++ sd2_revision_nr.h | 2 +- sql/scriptdev2_script_full.sql | 15 ++++++++++----- sql/updates/r2116_scriptdev2.sql | 12 ++++++++++++ 4 files changed, 25 insertions(+), 6 deletions(-) create mode 100644 sql/updates/r2116_scriptdev2.sql diff --git a/scripts/eastern_kingdoms/blackwing_lair/boss_razorgore.cpp b/scripts/eastern_kingdoms/blackwing_lair/boss_razorgore.cpp index 82c249360..a7b0f74da 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/boss_razorgore.cpp +++ b/scripts/eastern_kingdoms/blackwing_lair/boss_razorgore.cpp @@ -32,6 +32,8 @@ enum SAY_EGGS_BROKEN_3 = -1469024, SAY_DEATH = -1469025, + EMOTE_TROOPS_FLEE = -1469033, // emote by Nefarian's Troops npc + SPELL_CLEAVE = 19632, SPELL_WARSTOMP = 24375, SPELL_FIREBALL_VOLLEY = 22425, diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 17785b788..1fb0b7fdf 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2115" + #define SD2_REVISION_NR "2116" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 2e659ad68..58fc6d7bf 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -1095,7 +1095,7 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1469000,'None of your kind should be here! You\'ve doomed only yourselves!',8286,1,0,0,'broodlord SAY_AGGRO'), (-1469001,'Clever Mortals but I am not so easily lured away from my sanctum!',8287,1,0,0,'broodlord SAY_LEASH'), -(-1469002,'REUSE ME',0,0,0,0,'REUSE ME'), +(-1469002,'Run! They are coming!',0,1,0,0,'vaelastrasz blackwing tech SAY_INTRO_TECH'), (-1469003,'%s flinches as its skin shimmers.',0,2,0,0,'chromaggus EMOTE_SHIMMER'), (-1469004,'In this world where time is your enemy, it is my greatest ally. This grand game of life that you think you play in fact plays you. To that I say...',0,1,0,1,'victor_nefarius SAY_GAMESBEGIN_1'), @@ -1119,8 +1119,8 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1469021,'Rogues? Stop hiding and face me!',0,1,0,0,'nefarian SAY_ROGUE'), (-1469022,'You\'ll pay for forcing me to do this.',8275,1,0,0,'razorgore SAY_EGGS_BROKEN1'), -(-1469023,'Fools! These eggs are more precious than you know.',8276,1,0,0,'razorgore SAY_EGGS_BROKEN2'), -(-1469024,'No! Not another one! I\'ll have your heads for this atrocity.',8277,1,0,0,'razorgore SAY_EGGS_BROKEN3'), +(-1469023,'Fools! These eggs are more precious than you know!',8276,1,0,0,'razorgore SAY_EGGS_BROKEN2'), +(-1469024,'No - not another one! I\'ll have your heads for this atrocity!',8277,1,0,0,'razorgore SAY_EGGS_BROKEN3'), (-1469025,'If I fall into the abyss I\'ll take all of you mortals with me...',8278,1,0,0,'razorgore SAY_DEATH'), (-1469026,'Too late, friends! Nefarius\' corruption has taken hold...I cannot...control myself.',8281,1,0,1,'vaelastrasz SAY_LINE1'), @@ -1131,7 +1131,9 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1469031,'Death Knights, get over here!',0,1,0,0,'nefarian SAY_DEATH_KNIGHT'), -(-1469032,'Get up, little red wyrm...and destroy them!',0,1,0,1,'victor_nefarius SAY_NEFARIUS_CORRUPT_2'); +(-1469032,'Get up, little red wyrm...and destroy them!',0,1,0,1,'victor_nefarius SAY_NEFARIUS_CORRUPT_2'), + +(-1469033,'%s flee as the controlling power of the orb is drained.',0,2,0,0,'razorgore EMOTE_TROOPS_FLEE'); -- -1 509 000 RUINS OF AHN'QIRAJ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES @@ -3534,7 +3536,10 @@ INSERT INTO gossip_texts (entry,content_default,comment) VALUES INSERT INTO gossip_texts (entry,content_default,comment) VALUES (-3469000,'I\'ve made no mistakes.','victor_nefarius GOSSIP_ITEM_NEFARIUS_1'), (-3469001,'You have lost your mind, Nefarius. You speak in riddles.','victor_nefarius GOSSIP_ITEM_NEFARIUS_2'), -(-3469002,'Please do.','victor_nefarius GOSSIP_ITEM_NEFARIUS_3'); +(-3469002,'Please do.','victor_nefarius GOSSIP_ITEM_NEFARIUS_3'), + +(-3469003,'I cannot, Vaelastrasz! Surely something can be done to heal you!','vaelastrasz GOSSIP_ITEM_VAEL_1'), +(-3469004,'Vaelastrasz, no!!!','vaelastrasz GOSSIP_ITEM_VAEL_2'); -- -3 560 000 ESCAPE FROM DURNHOLDE (OLD HILLSBRAD) INSERT INTO gossip_texts (entry,content_default,comment) VALUES diff --git a/sql/updates/r2116_scriptdev2.sql b/sql/updates/r2116_scriptdev2.sql new file mode 100644 index 000000000..e9313a7d3 --- /dev/null +++ b/sql/updates/r2116_scriptdev2.sql @@ -0,0 +1,12 @@ +UPDATE script_texts SET content_default='Run! They are coming!', type=1, comment='vaelastrasz blackwing tech SAY_INTRO_TECH' WHERE entry = -1469002; +UPDATE script_texts SET content_default='Fools! These eggs are more precious than you know!' WHERE entry = -1469023; +UPDATE script_texts SET content_default='No - not another one! I\'ll have your heads for this atrocity!' WHERE entry = -1469024; + +DELETE FROM script_texts WHERE entry=-1469033; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1469033,'%s flee as the controlling power of the orb is drained.',0,2,0,0,'razorgore EMOTE_TROOPS_FLEE'); + +DELETE FROM gossip_texts WHERE entry IN (-3469003,-3469004); +INSERT INTO gossip_texts (entry,content_default,comment) VALUES +(-3469003,'I cannot, Vaelastrasz! Surely something can be done to heal you!','vaelastrasz GOSSIP_ITEM_VAEL_1'), +(-3469004,'Vaelastrasz, no!!!','vaelastrasz GOSSIP_ITEM_VAEL_2'); From d08825dcd41931db140843f801dc7ee03d23ab1b Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Tue, 17 May 2011 20:53:49 +0200 Subject: [PATCH 0096/1172] [2117] Remove DATA_ enums for scarlet monastary --- .../boss_interrogator_vishas.cpp | 2 +- .../boss_mograine_and_whitemane.cpp | 12 ++++----- .../instance_scarlet_monastery.cpp | 25 ++++++++----------- .../scarlet_monastery/scarlet_monastery.h | 9 ++++--- sd2_revision_nr.h | 2 +- 5 files changed, 24 insertions(+), 26 deletions(-) diff --git a/scripts/eastern_kingdoms/scarlet_monastery/boss_interrogator_vishas.cpp b/scripts/eastern_kingdoms/scarlet_monastery/boss_interrogator_vishas.cpp index 1e2dad0a4..c24e0dcb4 100644 --- a/scripts/eastern_kingdoms/scarlet_monastery/boss_interrogator_vishas.cpp +++ b/scripts/eastern_kingdoms/scarlet_monastery/boss_interrogator_vishas.cpp @@ -72,7 +72,7 @@ struct MANGOS_DLL_DECL boss_interrogator_vishasAI : public ScriptedAI return; //Any other actions to do with vorrel? setStandState? - if (Creature *vorrel = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(DATA_VORREL))) + if (Creature *vorrel = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(NPC_VORREL))) DoScriptText(SAY_TRIGGER_VORREL, vorrel); } diff --git a/scripts/eastern_kingdoms/scarlet_monastery/boss_mograine_and_whitemane.cpp b/scripts/eastern_kingdoms/scarlet_monastery/boss_mograine_and_whitemane.cpp index 61db1c4bf..ed5f98922 100644 --- a/scripts/eastern_kingdoms/scarlet_monastery/boss_mograine_and_whitemane.cpp +++ b/scripts/eastern_kingdoms/scarlet_monastery/boss_mograine_and_whitemane.cpp @@ -85,7 +85,7 @@ struct MANGOS_DLL_DECL boss_scarlet_commander_mograineAI : public ScriptedAI if (!m_pInstance) return; - if (Creature* pWhitemane = m_pInstance->instance->GetCreature(m_pInstance->GetData64(DATA_WHITEMANE))) + if (Creature* pWhitemane = m_pInstance->instance->GetCreature(m_pInstance->GetData64(NPC_WHITEMANE))) { if (m_creature->isAlive() && !pWhitemane->isAlive()) pWhitemane->Respawn(); @@ -114,7 +114,7 @@ struct MANGOS_DLL_DECL boss_scarlet_commander_mograineAI : public ScriptedAI return; //On first death, fake death and open door, as well as initiate whitemane if exist - if (Creature* pWhitemane = m_pInstance->instance->GetCreature(m_pInstance->GetData64(DATA_WHITEMANE))) + if (Creature* pWhitemane = m_pInstance->instance->GetCreature(m_pInstance->GetData64(NPC_WHITEMANE))) { m_pInstance->SetData(TYPE_MOGRAINE_AND_WHITE_EVENT, IN_PROGRESS); @@ -163,7 +163,7 @@ struct MANGOS_DLL_DECL boss_scarlet_commander_mograineAI : public ScriptedAI if (m_bHasDied && !m_bHeal && m_pInstance && m_pInstance->GetData(TYPE_MOGRAINE_AND_WHITE_EVENT) == SPECIAL) { //On ressurection, stop fake death and heal whitemane and resume fight - if (Creature* pWhitemane = m_pInstance->instance->GetCreature(m_pInstance->GetData64(DATA_WHITEMANE))) + if (Creature* pWhitemane = m_pInstance->instance->GetCreature(m_pInstance->GetData64(NPC_WHITEMANE))) { m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); m_creature->SetStandState(UNIT_STAND_STATE_STAND); @@ -236,7 +236,7 @@ struct MANGOS_DLL_DECL boss_high_inquisitor_whitemaneAI : public ScriptedAI if (!m_pInstance) return; - if (Creature* pMograine = m_pInstance->instance->GetCreature(m_pInstance->GetData64(DATA_MOGRAINE))) + if (Creature* pMograine = m_pInstance->instance->GetCreature(m_pInstance->GetData64(NPC_MOGRAINE))) { if (m_creature->isAlive() && !pMograine->isAlive()) pMograine->Respawn(); @@ -298,7 +298,7 @@ struct MANGOS_DLL_DECL boss_high_inquisitor_whitemaneAI : public ScriptedAI //When casting resuruction make sure to delay so on rez when reinstate battle deepsleep runs out if (m_pInstance && m_uiWait_Timer < uiDiff) { - if (Creature* pMograine = m_pInstance->instance->GetCreature(m_pInstance->GetData64(DATA_MOGRAINE))) + if (Creature* pMograine = m_pInstance->instance->GetCreature(m_pInstance->GetData64(NPC_MOGRAINE))) { DoCastSpellIfCan(pMograine, SPELL_SCARLETRESURRECTION); DoScriptText(SAY_WH_RESSURECT, m_creature); @@ -335,7 +335,7 @@ struct MANGOS_DLL_DECL boss_high_inquisitor_whitemaneAI : public ScriptedAI if (m_pInstance) { - if (Creature* pMograine = m_pInstance->instance->GetCreature(m_pInstance->GetData64(DATA_MOGRAINE))) + if (Creature* pMograine = m_pInstance->instance->GetCreature(m_pInstance->GetData64(NPC_MOGRAINE))) { if (pMograine->isAlive() && pMograine->GetHealthPercent() <= 75.0f) pTarget = pMograine; diff --git a/scripts/eastern_kingdoms/scarlet_monastery/instance_scarlet_monastery.cpp b/scripts/eastern_kingdoms/scarlet_monastery/instance_scarlet_monastery.cpp index d8c7e502a..6b54e9acd 100644 --- a/scripts/eastern_kingdoms/scarlet_monastery/instance_scarlet_monastery.cpp +++ b/scripts/eastern_kingdoms/scarlet_monastery/instance_scarlet_monastery.cpp @@ -49,15 +49,15 @@ struct MANGOS_DLL_DECL instance_scarlet_monastery : public ScriptedInstance { switch(pCreature->GetEntry()) { - case 3976: m_uiMograineGUID = pCreature->GetGUID(); break; - case 3977: m_uiWhitemaneGUID = pCreature->GetGUID(); break; - case 3981: m_uiVorrelGUID = pCreature->GetGUID(); break; + case NPC_MOGRAINE: m_uiMograineGUID = pCreature->GetGUID(); break; + case NPC_WHITEMANE: m_uiWhitemaneGUID = pCreature->GetGUID(); break; + case NPC_VORREL: m_uiVorrelGUID = pCreature->GetGUID(); break; } } void OnObjectCreate(GameObject* pGo) { - if (pGo->GetEntry() == 104600) + if (pGo->GetEntry() == GO_WHITEMANE_DOOR) m_uiDoorHighInquisitorGUID = pGo->GetGUID(); } @@ -65,17 +65,14 @@ struct MANGOS_DLL_DECL instance_scarlet_monastery : public ScriptedInstance { switch(data) { - case DATA_MOGRAINE: - return m_uiMograineGUID; - case DATA_WHITEMANE: - return m_uiWhitemaneGUID; - case DATA_VORREL: - return m_uiVorrelGUID; - case DATA_DOOR_WHITEMANE: - return m_uiDoorHighInquisitorGUID; - } + case NPC_MOGRAINE: return m_uiMograineGUID; + case NPC_WHITEMANE: return m_uiWhitemaneGUID; + case NPC_VORREL: return m_uiVorrelGUID; + case GO_WHITEMANE_DOOR: return m_uiDoorHighInquisitorGUID; - return 0; + default: + return 0; + } } void SetData(uint32 uiType, uint32 uiData) diff --git a/scripts/eastern_kingdoms/scarlet_monastery/scarlet_monastery.h b/scripts/eastern_kingdoms/scarlet_monastery/scarlet_monastery.h index 19cea3e7b..540471eed 100644 --- a/scripts/eastern_kingdoms/scarlet_monastery/scarlet_monastery.h +++ b/scripts/eastern_kingdoms/scarlet_monastery/scarlet_monastery.h @@ -11,10 +11,11 @@ enum TYPE_MOGRAINE_AND_WHITE_EVENT = 1, - DATA_MOGRAINE = 2, - DATA_WHITEMANE = 3, - DATA_DOOR_WHITEMANE = 4, - DATA_VORREL = 5 + NPC_MOGRAINE = 3976, + NPC_WHITEMANE = 3977, + NPC_VORREL = 3981, + + GO_WHITEMANE_DOOR = 104600, }; #endif diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 1fb0b7fdf..11fd6986d 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2116" + #define SD2_REVISION_NR "2117" #endif // __SD2_REVISION_NR_H__ From 1c9f0e656b2281dc3932175187263ac67beb29d9 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Tue, 17 May 2011 21:05:41 +0200 Subject: [PATCH 0097/1172] [2118] Remove DATA_ enum for shadowfang keep --- .../instance_shadowfang_keep.cpp | 22 +------------- .../shadowfang_keep/shadowfang_keep.cpp | 6 +--- .../shadowfang_keep/shadowfang_keep.h | 30 ++++++++++++++----- sd2_revision_nr.h | 2 +- 4 files changed, 26 insertions(+), 34 deletions(-) diff --git a/scripts/eastern_kingdoms/shadowfang_keep/instance_shadowfang_keep.cpp b/scripts/eastern_kingdoms/shadowfang_keep/instance_shadowfang_keep.cpp index b9271eb33..d9ef5c9fe 100644 --- a/scripts/eastern_kingdoms/shadowfang_keep/instance_shadowfang_keep.cpp +++ b/scripts/eastern_kingdoms/shadowfang_keep/instance_shadowfang_keep.cpp @@ -24,26 +24,6 @@ EndScriptData */ #include "precompiled.h" #include "shadowfang_keep.h" -enum -{ - MAX_ENCOUNTER = 6, - - SAY_BOSS_DIE_AD = -1033007, - SAY_BOSS_DIE_AS = -1033008, - - NPC_ASH = 3850, - NPC_ADA = 3849, -// NPC_ARUGAL = 10000, //"Arugal" says intro text, not used - NPC_ARCHMAGE_ARUGAL = 4275, //"Archmage Arugal" does Fenrus event - NPC_FENRUS = 4274, //used to summon Arugal in Fenrus event - NPC_VINCENT = 4444, //Vincent should be "dead" is Arugal is done the intro already - - GO_COURTYARD_DOOR = 18895, //door to open when talking to NPC's - GO_SORCERER_DOOR = 18972, //door to open when Fenrus the Devourer - GO_ARUGAL_DOOR = 18971, //door to open when Wolf Master Nandos - GO_ARUGAL_FOCUS = 18973 //this generates the lightning visual in the Fenrus event -}; - struct MANGOS_DLL_DECL instance_shadowfang_keep : public ScriptedInstance { instance_shadowfang_keep(Map* pMap) : ScriptedInstance(pMap) {Initialize();}; @@ -210,7 +190,7 @@ struct MANGOS_DLL_DECL instance_shadowfang_keep : public ScriptedInstance { switch(uiType) { - case DATA_LIGHTNING: + case GO_ARUGAL_FOCUS: return m_uiArugalFocusGUID; } return 0; diff --git a/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.cpp b/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.cpp index 52f90b69e..716e795e9 100644 --- a/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.cpp +++ b/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.cpp @@ -51,8 +51,6 @@ enum SPELL_UNLOCK = 6421, SPELL_FIRE = 6422, - NPC_ASH = 3850, - NPC_ADA = 3849 }; #define GOSSIP_ITEM_DOOR "Please unlock the courtyard door." @@ -502,7 +500,7 @@ struct MANGOS_DLL_DECL boss_arugalAI : public ScriptedAI break; case 3: if (m_pInstance) - if (GameObject* pLightning = m_creature->GetMap()->GetGameObject(m_pInstance->GetData64(DATA_LIGHTNING))) + if (GameObject* pLightning = m_creature->GetMap()->GetGameObject(m_pInstance->GetData64(GO_ARUGAL_FOCUS))) pLightning->Use(m_creature); m_uiSpeechTimer = 5000; @@ -719,8 +717,6 @@ enum SAY_INTRO_4 = -1033012, SPELL_SPAWN = 7741, - - NPC_VINCENT = 4444 }; struct MANGOS_DLL_DECL npc_arugalAI : public ScriptedAI diff --git a/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.h b/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.h index 1a7a2b26d..a39a8a5c0 100644 --- a/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.h +++ b/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.h @@ -7,13 +7,29 @@ enum { - TYPE_FREE_NPC = 1, - TYPE_RETHILGORE = 2, - TYPE_FENRUS = 3, - TYPE_NANDOS = 4, - TYPE_INTRO = 5, - TYPE_VOIDWALKER = 6, - DATA_LIGHTNING = 7 + MAX_ENCOUNTER = 6, + + TYPE_FREE_NPC = 1, + TYPE_RETHILGORE = 2, + TYPE_FENRUS = 3, + TYPE_NANDOS = 4, + TYPE_INTRO = 5, + TYPE_VOIDWALKER = 6, + + SAY_BOSS_DIE_AD = -1033007, + SAY_BOSS_DIE_AS = -1033008, + + NPC_ASH = 3850, + NPC_ADA = 3849, + // NPC_ARUGAL = 10000, //"Arugal" says intro text, not used + NPC_ARCHMAGE_ARUGAL = 4275, //"Archmage Arugal" does Fenrus event + NPC_FENRUS = 4274, //used to summon Arugal in Fenrus event + NPC_VINCENT = 4444, //Vincent should be "dead" is Arugal is done the intro already + + GO_COURTYARD_DOOR = 18895, //door to open when talking to NPC's + GO_SORCERER_DOOR = 18972, //door to open when Fenrus the Devourer + GO_ARUGAL_DOOR = 18971, //door to open when Wolf Master Nandos + GO_ARUGAL_FOCUS = 18973, //this generates the lightning visual in the Fenrus event }; #endif diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 11fd6986d..a68d2fc3d 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2117" + #define SD2_REVISION_NR "2118" #endif // __SD2_REVISION_NR_H__ From 6db4da3371ce52aa1b1ee05d5a7704d49911cd9a Mon Sep 17 00:00:00 2001 From: NoFantasy Date: Wed, 18 May 2011 15:16:15 +0200 Subject: [PATCH 0098/1172] [2119] Adjust two summon locations in sunken temple Signed-off-by: NoFantasy --- scripts/eastern_kingdoms/sunken_temple/sunken_temple.h | 4 ++-- sd2_revision_nr.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/eastern_kingdoms/sunken_temple/sunken_temple.h b/scripts/eastern_kingdoms/sunken_temple/sunken_temple.h index 8604ad192..00130d8fa 100644 --- a/scripts/eastern_kingdoms/sunken_temple/sunken_temple.h +++ b/scripts/eastern_kingdoms/sunken_temple/sunken_temple.h @@ -75,8 +75,8 @@ struct SummonLocations static const SummonLocations aSunkenTempleLocation[] = { - {-480.3991f, 96.5668f, -189.7297f, 6.1947f}, // Atalarion summon loc - {-466.7165f, 273.0253f, -90.4509f, 3.1338f}, // Avatar and shade of hakkar summon + {-466.5130f, 95.19820f, -189.646f, 0.0349f}, // Atalarion summon loc + {-466.8673f,272.31204f, -90.7441f, 3.5255f}, // Shade of hakkar summon loc {-660.5277f, -16.7117f, -90.8357f, 1.6055f} // Malfurion summon loc }; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index a68d2fc3d..bb3589a34 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2118" + #define SD2_REVISION_NR "2119" #endif // __SD2_REVISION_NR_H__ From cc4cd18a1c576e266be27a77c6116a2d0b74aa75 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Wed, 18 May 2011 20:54:54 +0200 Subject: [PATCH 0099/1172] [2120] Cleanup instance_blood_furnace.cpp * Move to header based version * Drop unneeded DATA_ enums * Minor cleanup --- .../blood_furnace/blood_furnace.h | 76 +++- .../blood_furnace/instance_blood_furnace.cpp | 351 ++++++++---------- sd2_revision_nr.h | 2 +- 3 files changed, 220 insertions(+), 209 deletions(-) diff --git a/scripts/outland/hellfire_citadel/blood_furnace/blood_furnace.h b/scripts/outland/hellfire_citadel/blood_furnace/blood_furnace.h index 2a4122119..947f470f5 100644 --- a/scripts/outland/hellfire_citadel/blood_furnace/blood_furnace.h +++ b/scripts/outland/hellfire_citadel/blood_furnace/blood_furnace.h @@ -7,6 +7,16 @@ enum { + MAX_ENCOUNTER = 3, + + TYPE_THE_MAKER_EVENT = 0, + TYPE_BROGGOK_EVENT = 1, + TYPE_KELIDAN_EVENT = 2, + + NPC_THE_MAKER = 17381, + NPC_BROGGOK = 17380, + NPC_KELIDAN_THE_MAKER = 17377, + GO_DOOR_FINAL_EXIT = 181766, GO_DOOR_MAKER_FRONT = 181811, GO_DOOR_MAKER_REAR = 181812, @@ -14,22 +24,56 @@ enum GO_DOOR_BROGGOK_REAR = 181819, GO_DOOR_KELIDAN_EXIT = 181823, - DATA_THE_MAKER = 1, - DATA_BROGGOK = 2, - DATA_KELIDAN_THE_MAKER = 3, - - TYPE_THE_MAKER_EVENT = 4, - TYPE_BROGGOK_EVENT = 5, - TYPE_KELIDAN_EVENT = 6, - - DATA_PRISON_CELL_MAKER1 = 10, - DATA_PRISON_CELL_MAKER2 = 11, - DATA_PRISON_CELL_MAKER3 = 12, - DATA_PRISON_CELL_MAKER4 = 13, - DATA_PRISON_CELL_BROGGOK1 = 14, - DATA_PRISON_CELL_BROGGOK2 = 15, - DATA_PRISON_CELL_BROGGOK3 = 16, - DATA_PRISON_CELL_BROGGOK4 = 17 + GO_PRISON_CELL_MAKER1 = 181813, // The maker cell front right + GO_PRISON_CELL_MAKER2 = 181814, // The maker cell back right + GO_PRISON_CELL_MAKER3 = 181816, // The maker cell front left + GO_PRISON_CELL_MAKER4 = 181815, // The maker cell back left + GO_PRISON_CELL_BROGGOK1 = 181821, // Broggok cell front right + GO_PRISON_CELL_BROGGOK2 = 181818, // Broggok cell back right + GO_PRISON_CELL_BROGGOK3 = 181820, // Broggok cell front left + GO_PRISON_CELL_BROGGOK4 = 181817, // Broggok cell back left +}; + +class MANGOS_DLL_DECL instance_blood_furnace : public ScriptedInstance +{ + public: + instance_blood_furnace(Map* pMap); + + void Initialize(); + + void OnCreatureCreate(Creature* pCreature); + void OnObjectCreate(GameObject* pGo); + + uint64 GetData64(uint32 uiData); + void SetData(uint32 uiType, uint32 uiData); + uint32 GetData(uint32 uiType); + + void Load(const char* chrIn); + const char* Save() { return m_strInstData.c_str(); } + + private: + uint32 m_auiEncounter[MAX_ENCOUNTER]; + std::string m_strInstData; + + uint64 m_uiMakerGUID; + uint64 m_uiBroggokGUID; + uint64 m_uiKelidanGUID; + + uint64 m_uiDoorFinalExitGUID; + uint64 m_uiDoorMakerFrontGUID; + uint64 m_uiDoorMakerRearGUID; + uint64 m_uiDoorBroggokFrontGUID; + uint64 m_uiDoorBrokkokRearGUID; + uint64 m_uiDoorKelidanExitGUID; + + uint64 m_uiPrisonCell1GUID; + uint64 m_uiPrisonCell2GUID; + uint64 m_uiPrisonCell3GUID; + uint64 m_uiPrisonCell4GUID; + uint64 m_uiPrisonCell5GUID; + uint64 m_uiPrisonCell6GUID; + uint64 m_uiPrisonCell7GUID; + uint64 m_uiPrisonCell8GUID; }; #endif diff --git a/scripts/outland/hellfire_citadel/blood_furnace/instance_blood_furnace.cpp b/scripts/outland/hellfire_citadel/blood_furnace/instance_blood_furnace.cpp index 06d7f6fb2..96b44c955 100644 --- a/scripts/outland/hellfire_citadel/blood_furnace/instance_blood_furnace.cpp +++ b/scripts/outland/hellfire_citadel/blood_furnace/instance_blood_furnace.cpp @@ -24,222 +24,188 @@ EndScriptData */ #include "precompiled.h" #include "blood_furnace.h" -#define MAX_ENCOUNTER 3 - -struct MANGOS_DLL_DECL instance_blood_furnace : public ScriptedInstance +instance_blood_furnace::instance_blood_furnace(Map* pMap) : ScriptedInstance(pMap), + m_uiMakerGUID(0), + m_uiBroggokGUID(0), + m_uiKelidanGUID(0), + + m_uiDoorFinalExitGUID(0), + m_uiDoorMakerFrontGUID(0), + m_uiDoorMakerRearGUID(0), + m_uiDoorBroggokFrontGUID(0), + m_uiDoorBrokkokRearGUID(0), + m_uiDoorKelidanExitGUID(0), + + m_uiPrisonCell1GUID(0), + m_uiPrisonCell2GUID(0), + m_uiPrisonCell3GUID(0), + m_uiPrisonCell4GUID(0), + m_uiPrisonCell5GUID(0), + m_uiPrisonCell6GUID(0), + m_uiPrisonCell7GUID(0), + m_uiPrisonCell8GUID(0) { - instance_blood_furnace(Map* pMap) : ScriptedInstance(pMap) {Initialize();} - - uint32 m_auiEncounter[MAX_ENCOUNTER]; - std::string strInstData; - - uint64 m_uiMakerGUID; - uint64 m_uiBroggokGUID; - uint64 m_uiKelidanGUID; - - uint64 m_uiDoorFinalExitGUID; - uint64 m_uiDoorMakerFrontGUID; - uint64 m_uiDoorMakerRearGUID; - uint64 m_uiDoorBroggokFrontGUID; - uint64 m_uiDoorBrokkokRearGUID; - uint64 m_uiDoorKelidanExitGUID; + Initialize(); +} - uint64 m_uiPrisonCell1GUID; - uint64 m_uiPrisonCell2GUID; - uint64 m_uiPrisonCell3GUID; - uint64 m_uiPrisonCell4GUID; - uint64 m_uiPrisonCell5GUID; - uint64 m_uiPrisonCell6GUID; - uint64 m_uiPrisonCell7GUID; - uint64 m_uiPrisonCell8GUID; +void instance_blood_furnace::Initialize() +{ + memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); +} - void Initialize() +void instance_blood_furnace::OnCreatureCreate(Creature* pCreature) +{ + switch (pCreature->GetEntry()) { - memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); - - m_uiMakerGUID = 0; - m_uiBroggokGUID = 0; - m_uiKelidanGUID = 0; - - m_uiDoorFinalExitGUID = 0; - m_uiDoorMakerFrontGUID = 0; - m_uiDoorMakerRearGUID = 0; - m_uiDoorBroggokFrontGUID = 0; - m_uiDoorBrokkokRearGUID = 0; - m_uiDoorKelidanExitGUID = 0; - - m_uiPrisonCell1GUID = 0; - m_uiPrisonCell2GUID = 0; - m_uiPrisonCell3GUID = 0; - m_uiPrisonCell4GUID = 0; - m_uiPrisonCell5GUID = 0; - m_uiPrisonCell6GUID = 0; - m_uiPrisonCell7GUID = 0; - m_uiPrisonCell8GUID = 0; + case NPC_THE_MAKER: m_uiMakerGUID = pCreature->GetGUID(); break; + case NPC_BROGGOK: m_uiBroggokGUID = pCreature->GetGUID(); break; + case NPC_KELIDAN_THE_MAKER: m_uiKelidanGUID = pCreature->GetGUID(); break; } +} - void OnCreatureCreate(Creature* pCreature) +void instance_blood_furnace::OnObjectCreate(GameObject* pGo) +{ + switch (pGo->GetEntry()) { - switch(pCreature->GetEntry()) - { - case 17381: m_uiMakerGUID = pCreature->GetGUID(); break; - case 17380: m_uiBroggokGUID = pCreature->GetGUID(); break; - case 17377: m_uiKelidanGUID = pCreature->GetGUID(); break; - } + case GO_DOOR_MAKER_FRONT: // the maker front door + m_uiDoorMakerFrontGUID = pGo->GetGUID(); + break; + case GO_DOOR_MAKER_REAR: // the maker rear door + m_uiDoorMakerRearGUID = pGo->GetGUID(); + if (m_auiEncounter[TYPE_THE_MAKER_EVENT] == DONE && pGo->GetGoState() == GO_STATE_READY) + DoUseDoorOrButton(m_uiDoorMakerRearGUID); + break; + case GO_DOOR_BROGGOK_FRONT: // broggok front door + m_uiDoorBroggokFrontGUID = pGo->GetGUID(); + break; + case GO_DOOR_BROGGOK_REAR: // broggok rear door + m_uiDoorBrokkokRearGUID = pGo->GetGUID(); + if (m_auiEncounter[TYPE_BROGGOK_EVENT] == DONE && pGo->GetGoState() == GO_STATE_READY) + DoUseDoorOrButton(m_uiDoorBrokkokRearGUID); + break; + case GO_DOOR_KELIDAN_EXIT: // kelidan exit door + m_uiDoorKelidanExitGUID = pGo->GetGUID(); + if (m_auiEncounter[TYPE_KELIDAN_EVENT] == DONE && pGo->GetGoState() == GO_STATE_READY) + DoUseDoorOrButton(m_uiDoorKelidanExitGUID); + break; + case GO_DOOR_FINAL_EXIT: // final exit door + m_uiDoorFinalExitGUID = pGo->GetGUID(); + if (m_auiEncounter[TYPE_KELIDAN_EVENT] == DONE && pGo->GetGoState() == GO_STATE_READY) + DoUseDoorOrButton(m_uiDoorFinalExitGUID); + break; + case GO_PRISON_CELL_MAKER1: m_uiPrisonCell1GUID = pGo->GetGUID(); break; + case GO_PRISON_CELL_MAKER2: m_uiPrisonCell2GUID = pGo->GetGUID(); break; + case GO_PRISON_CELL_MAKER3: m_uiPrisonCell3GUID = pGo->GetGUID(); break; + case GO_PRISON_CELL_MAKER4: m_uiPrisonCell4GUID = pGo->GetGUID(); break; + case GO_PRISON_CELL_BROGGOK1: m_uiPrisonCell5GUID = pGo->GetGUID(); break; + case GO_PRISON_CELL_BROGGOK2: m_uiPrisonCell6GUID = pGo->GetGUID(); break; + case GO_PRISON_CELL_BROGGOK3: m_uiPrisonCell7GUID = pGo->GetGUID(); break; + case GO_PRISON_CELL_BROGGOK4: m_uiPrisonCell8GUID = pGo->GetGUID(); break; } +} - void OnObjectCreate(GameObject* pGo) +uint64 instance_blood_furnace::GetData64(uint32 uiData) +{ + switch (uiData) { - switch (pGo->GetEntry()) - { - case GO_DOOR_MAKER_FRONT: //the maker front door - m_uiDoorMakerFrontGUID = pGo->GetGUID(); - break; - case GO_DOOR_MAKER_REAR: //the maker rear door - m_uiDoorMakerRearGUID = pGo->GetGUID(); - if (m_auiEncounter[0] == DONE && pGo->GetGoState() == GO_STATE_READY) - DoUseDoorOrButton(m_uiDoorMakerRearGUID); - break; - case GO_DOOR_BROGGOK_FRONT: //broggok front door - m_uiDoorBroggokFrontGUID = pGo->GetGUID(); - break; - case GO_DOOR_BROGGOK_REAR: //broggok rear door - m_uiDoorBrokkokRearGUID = pGo->GetGUID(); - if (m_auiEncounter[1] == DONE && pGo->GetGoState() == GO_STATE_READY) - DoUseDoorOrButton(m_uiDoorBrokkokRearGUID); - break; - case GO_DOOR_KELIDAN_EXIT: //kelidan exit door - m_uiDoorKelidanExitGUID = pGo->GetGUID(); - if (m_auiEncounter[2] == DONE && pGo->GetGoState() == GO_STATE_READY) - DoUseDoorOrButton(m_uiDoorKelidanExitGUID); - break; - case GO_DOOR_FINAL_EXIT: //final exit door - m_uiDoorFinalExitGUID = pGo->GetGUID(); - if (m_auiEncounter[2] == DONE && pGo->GetGoState() == GO_STATE_READY) - DoUseDoorOrButton(m_uiDoorFinalExitGUID); - break; - case 181813: m_uiPrisonCell1GUID = pGo->GetGUID(); break;//the maker cell front right - case 181814: m_uiPrisonCell2GUID = pGo->GetGUID(); break;//the maker cell back right - case 181816: m_uiPrisonCell3GUID = pGo->GetGUID(); break;//the maker cell front left - case 181815: m_uiPrisonCell4GUID = pGo->GetGUID(); break;//the maker cell back left - case 181821: m_uiPrisonCell5GUID = pGo->GetGUID(); break;//broggok cell front right - case 181818: m_uiPrisonCell6GUID = pGo->GetGUID(); break;//broggok cell back right - case 181820: m_uiPrisonCell7GUID = pGo->GetGUID(); break;//broggok cell front left - case 181817: m_uiPrisonCell8GUID = pGo->GetGUID(); break;//broggok cell back left - } + case NPC_THE_MAKER: return m_uiMakerGUID; + case NPC_BROGGOK: return m_uiBroggokGUID; + case GO_PRISON_CELL_MAKER1: return m_uiPrisonCell1GUID; + case GO_PRISON_CELL_MAKER2: return m_uiPrisonCell2GUID; + case GO_PRISON_CELL_MAKER3: return m_uiPrisonCell3GUID; + case GO_PRISON_CELL_MAKER4: return m_uiPrisonCell4GUID; + case GO_PRISON_CELL_BROGGOK1: return m_uiPrisonCell5GUID; + case GO_PRISON_CELL_BROGGOK2: return m_uiPrisonCell6GUID; + case GO_PRISON_CELL_BROGGOK3: return m_uiPrisonCell7GUID; + case GO_PRISON_CELL_BROGGOK4: return m_uiPrisonCell8GUID; + + default: + return 0; } +} - uint64 GetData64(uint32 uiData) +void instance_blood_furnace::SetData(uint32 uiType, uint32 uiData) +{ + switch(uiType) { - switch(uiData) - { - case DATA_THE_MAKER: return m_uiMakerGUID; - case DATA_BROGGOK: return m_uiBroggokGUID; - case DATA_PRISON_CELL_MAKER1: return m_uiPrisonCell1GUID; - case DATA_PRISON_CELL_MAKER2: return m_uiPrisonCell2GUID; - case DATA_PRISON_CELL_MAKER3: return m_uiPrisonCell3GUID; - case DATA_PRISON_CELL_MAKER4: return m_uiPrisonCell4GUID; - case DATA_PRISON_CELL_BROGGOK1: return m_uiPrisonCell5GUID; - case DATA_PRISON_CELL_BROGGOK2: return m_uiPrisonCell6GUID; - case DATA_PRISON_CELL_BROGGOK3: return m_uiPrisonCell7GUID; - case DATA_PRISON_CELL_BROGGOK4: return m_uiPrisonCell8GUID; - } - - return 0; + case TYPE_THE_MAKER_EVENT: + if (uiData == IN_PROGRESS) + DoUseDoorOrButton(m_uiDoorMakerFrontGUID); + if (uiData == FAIL) + DoUseDoorOrButton(m_uiDoorMakerFrontGUID); + if (uiData == DONE) + { + DoUseDoorOrButton(m_uiDoorMakerFrontGUID); + DoUseDoorOrButton(m_uiDoorMakerRearGUID); + } + m_auiEncounter[uiType] = uiData; + break; + case TYPE_BROGGOK_EVENT: + if (uiData == IN_PROGRESS) + DoUseDoorOrButton(m_uiDoorBroggokFrontGUID); + if (uiData == FAIL) + DoUseDoorOrButton(m_uiDoorBroggokFrontGUID); + if (uiData == DONE) + { + DoUseDoorOrButton(m_uiDoorBroggokFrontGUID); + DoUseDoorOrButton(m_uiDoorBrokkokRearGUID); + } + m_auiEncounter[uiType] = uiData; + break; + case TYPE_KELIDAN_EVENT: + if (uiData == DONE) + { + DoUseDoorOrButton(m_uiDoorKelidanExitGUID); + DoUseDoorOrButton(m_uiDoorFinalExitGUID); + } + m_auiEncounter[uiType] = uiData; + break; + default: + error_log("SD2: Instance Blood Furnace SetData with Type %u Data %u, but this is not implemented.", uiType, uiData); + return; } - void SetData(uint32 uiType, uint32 uiData) + if (uiData == DONE) { - switch(uiType) - { - case TYPE_THE_MAKER_EVENT: - if (uiData == IN_PROGRESS) - DoUseDoorOrButton(m_uiDoorMakerFrontGUID); - if (uiData == FAIL) - DoUseDoorOrButton(m_uiDoorMakerFrontGUID); - if (uiData == DONE) - { - DoUseDoorOrButton(m_uiDoorMakerFrontGUID); - DoUseDoorOrButton(m_uiDoorMakerRearGUID); - } - m_auiEncounter[0] = uiData; - break; - case TYPE_BROGGOK_EVENT: - if (uiData == IN_PROGRESS) - DoUseDoorOrButton(m_uiDoorBroggokFrontGUID); - if (uiData == FAIL) - DoUseDoorOrButton(m_uiDoorBroggokFrontGUID); - if (uiData == DONE) - { - DoUseDoorOrButton(m_uiDoorBroggokFrontGUID); - DoUseDoorOrButton(m_uiDoorBrokkokRearGUID); - } - m_auiEncounter[1] = uiData; - break; - case TYPE_KELIDAN_EVENT: - if (uiData == DONE) - { - DoUseDoorOrButton(m_uiDoorKelidanExitGUID); - DoUseDoorOrButton(m_uiDoorFinalExitGUID); - } - m_auiEncounter[2] = uiData; - break; - default: - error_log("SD2: Instance Blood Furnace SetData with Type %u Data %u, but this is not implemented.",uiType,uiData); - break; - } - - if (uiData == DONE) - { - OUT_SAVE_INST_DATA; + OUT_SAVE_INST_DATA; - std::ostringstream saveStream; - saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2]; + std::ostringstream saveStream; + saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2]; - strInstData = saveStream.str(); + m_strInstData = saveStream.str(); - SaveToDB(); - OUT_SAVE_INST_DATA_COMPLETE; - } + SaveToDB(); + OUT_SAVE_INST_DATA_COMPLETE; } +} - uint32 GetData(uint32 uiData) - { - switch(uiData) - { - case TYPE_THE_MAKER_EVENT: return m_auiEncounter[0]; - case TYPE_BROGGOK_EVENT: return m_auiEncounter[1]; - case TYPE_KELIDAN_EVENT: return m_auiEncounter[2]; - } +uint32 instance_blood_furnace::GetData(uint32 uiType) +{ + if (uiType < MAX_ENCOUNTER) + return m_auiEncounter[uiType]; - return 0; - } + return 0; +} - const char* Save() +void instance_blood_furnace::Load(const char* chrIn) +{ + if (!chrIn) { - return strInstData.c_str(); + OUT_LOAD_INST_DATA_FAIL; + return; } - void Load(const char* in) - { - if (!in) - { - OUT_LOAD_INST_DATA_FAIL; - return; - } - - OUT_LOAD_INST_DATA(in); + OUT_LOAD_INST_DATA(chrIn); - std::istringstream loadStream(in); - loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2]; + std::istringstream loadStream(chrIn); + loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2]; - for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) - if (m_auiEncounter[i] == IN_PROGRESS || m_auiEncounter[i] == FAIL) - m_auiEncounter[i] = NOT_STARTED; + for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) + if (m_auiEncounter[i] == IN_PROGRESS || m_auiEncounter[i] == FAIL) + m_auiEncounter[i] = NOT_STARTED; - OUT_LOAD_INST_DATA_COMPLETE; - } -}; + OUT_LOAD_INST_DATA_COMPLETE; +} InstanceData* GetInstanceData_instance_blood_furnace(Map* pMap) { @@ -248,9 +214,10 @@ InstanceData* GetInstanceData_instance_blood_furnace(Map* pMap) void AddSC_instance_blood_furnace() { - Script *newscript; - newscript = new Script; - newscript->Name = "instance_blood_furnace"; - newscript->GetInstanceData = &GetInstanceData_instance_blood_furnace; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "instance_blood_furnace"; + pNewScript->GetInstanceData = &GetInstanceData_instance_blood_furnace; + pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index bb3589a34..7128f62ff 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2119" + #define SD2_REVISION_NR "2120" #endif // __SD2_REVISION_NR_H__ From 1bfd9cc3a307d5dd8352c8f782c6f3ea0b0e62f7 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Wed, 18 May 2011 21:17:21 +0200 Subject: [PATCH 0100/1172] [2121] Cleanup instance hellfire ramparts --- .../boss_nazan_and_vazruden.cpp | 2 +- .../hellfire_ramparts/hellfire_ramparts.h | 36 ++++- .../instance_hellfire_ramparts.cpp | 131 +++++++++--------- sd2_revision_nr.h | 2 +- 4 files changed, 97 insertions(+), 74 deletions(-) diff --git a/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_nazan_and_vazruden.cpp b/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_nazan_and_vazruden.cpp index 79bef1908..4086e1147 100644 --- a/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_nazan_and_vazruden.cpp +++ b/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_nazan_and_vazruden.cpp @@ -105,7 +105,7 @@ struct MANGOS_DLL_DECL boss_vazrudenAI : public ScriptedAI void PrepareAndDescendMount() { - if (Creature* pHerald = m_pInstance->instance->GetCreature(m_pInstance->GetData64(DATA_HERALD))) + if (Creature* pHerald = m_pInstance->instance->GetCreature(m_pInstance->GetData64(NPC_HERALD))) { if (pHerald->HasSplineFlag(SPLINEFLAG_WALKMODE)) pHerald->RemoveSplineFlag(SPLINEFLAG_WALKMODE); diff --git a/scripts/outland/hellfire_citadel/hellfire_ramparts/hellfire_ramparts.h b/scripts/outland/hellfire_citadel/hellfire_ramparts/hellfire_ramparts.h index af236f020..71a1a7f18 100644 --- a/scripts/outland/hellfire_citadel/hellfire_ramparts/hellfire_ramparts.h +++ b/scripts/outland/hellfire_citadel/hellfire_ramparts/hellfire_ramparts.h @@ -7,11 +7,39 @@ enum { - MAX_ENCOUNTER = 2, + MAX_ENCOUNTER = 2, - TYPE_VAZRUDEN = 1, - TYPE_NAZAN = 2, - DATA_HERALD = 3 + TYPE_VAZRUDEN = 1, + TYPE_NAZAN = 2, // Do not change, used in ACID (SetData(SPECIAL) on death of 17517 + + NPC_HERALD = 17307, + + GO_FEL_IRON_CHEST = 185168, + GO_FEL_IRON_CHEST_H = 185169, +}; + +class MANGOS_DLL_DECL instance_ramparts : public ScriptedInstance +{ + public: + instance_ramparts(Map* pMap); + + void Initialize(); + + void OnCreatureCreate(Creature* pCreature); + void OnObjectCreate(GameObject* pGo); + + void SetData(uint32 uiType, uint32 uiData); + uint32 GetData(uint32 uiType); + uint64 GetData64(uint32 uiData); + + // No need to save and load this instance (only one encounter needs special handling, no doors used) + + private: + uint32 m_auiEncounter[MAX_ENCOUNTER]; + + uint32 m_uiSentryCounter; + uint64 m_uiChestGUID; + uint64 m_uiHeraldGUID; }; #endif diff --git a/scripts/outland/hellfire_citadel/hellfire_ramparts/instance_hellfire_ramparts.cpp b/scripts/outland/hellfire_citadel/hellfire_ramparts/instance_hellfire_ramparts.cpp index 95962a883..7a01fae55 100644 --- a/scripts/outland/hellfire_citadel/hellfire_ramparts/instance_hellfire_ramparts.cpp +++ b/scripts/outland/hellfire_citadel/hellfire_ramparts/instance_hellfire_ramparts.cpp @@ -24,90 +24,84 @@ EndScriptData */ #include "precompiled.h" #include "hellfire_ramparts.h" -struct MANGOS_DLL_DECL instance_ramparts : public ScriptedInstance +instance_ramparts::instance_ramparts(Map* pMap) : ScriptedInstance(pMap), + m_uiSentryCounter(0), + m_uiChestGUID(0), + m_uiHeraldGUID(0) { - instance_ramparts(Map* pMap) : ScriptedInstance(pMap) {Initialize();} - - uint32 m_auiEncounter[MAX_ENCOUNTER]; - uint32 m_uiSentryCounter; - uint64 m_uiChestNGUID; - uint64 m_uiChestHGUID; - uint64 m_uiHeraldGUID; + Initialize(); +} - void Initialize() - { - memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); +void instance_ramparts::Initialize() +{ + memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); +} - m_uiSentryCounter = 0; - m_uiChestNGUID = 0; - m_uiChestHGUID = 0; - m_uiHeraldGUID = 0; - } +void instance_ramparts::OnCreatureCreate(Creature* pCreature) +{ + if (pCreature->GetEntry() == NPC_HERALD) + m_uiHeraldGUID = pCreature->GetGUID(); +} - void OnCreatureCreate(Creature* pCreature) +void instance_ramparts::OnObjectCreate(GameObject* pGo) +{ + switch(pGo->GetEntry()) { - if (pCreature->GetEntry() == 17307) - m_uiHeraldGUID = pCreature->GetGUID(); + case GO_FEL_IRON_CHEST: + case GO_FEL_IRON_CHEST_H: + m_uiChestGUID = pGo->GetGUID(); + break; } +} - void OnObjectCreate(GameObject* pGo) - { - switch(pGo->GetEntry()) - { - case 185168: m_uiChestNGUID = pGo->GetGUID(); break; - case 185169: m_uiChestHGUID = pGo->GetGUID(); break; - } - } +void instance_ramparts::SetData(uint32 uiType, uint32 uiData) +{ + debug_log("SD2: Instance Ramparts: SetData received for type %u with data %u",uiType,uiData); - void SetData(uint32 uiType, uint32 uiData) + switch(uiType) { - debug_log("SD2: Instance Ramparts: SetData received for type %u with data %u",uiType,uiData); - - switch(uiType) - { - case TYPE_VAZRUDEN: - if (uiData == DONE && m_auiEncounter[1] == DONE) - DoRespawnGameObject(instance->IsRegularDifficulty() ? m_uiChestNGUID : m_uiChestHGUID, HOUR*IN_MILLISECONDS); - m_auiEncounter[0] = uiData; - break; - case TYPE_NAZAN: - if (uiData == SPECIAL) - { - ++m_uiSentryCounter; - - if (m_uiSentryCounter == 2) - m_auiEncounter[1] = uiData; - } - if (uiData == DONE && m_auiEncounter[0] == DONE) - { - DoRespawnGameObject(instance->IsRegularDifficulty() ? m_uiChestNGUID : m_uiChestHGUID, HOUR*IN_MILLISECONDS); - m_auiEncounter[1] = uiData; - } - if (uiData == IN_PROGRESS) + case TYPE_VAZRUDEN: + if (uiData == DONE && m_auiEncounter[1] == DONE) + DoRespawnGameObject(m_uiChestGUID, HOUR*IN_MILLISECONDS); + m_auiEncounter[0] = uiData; + break; + case TYPE_NAZAN: + if (uiData == SPECIAL) + { + ++m_uiSentryCounter; + + if (m_uiSentryCounter == 2) m_auiEncounter[1] = uiData; - break; - } + } + if (uiData == DONE && m_auiEncounter[0] == DONE) + { + DoRespawnGameObject(m_uiChestGUID, HOUR*IN_MILLISECONDS); + m_auiEncounter[1] = uiData; + } + if (uiData == IN_PROGRESS) + m_auiEncounter[1] = uiData; + break; } +} - uint32 GetData(uint32 uiType) - { - if (uiType == TYPE_VAZRUDEN) - return m_auiEncounter[0]; +uint32 instance_ramparts::GetData(uint32 uiType) +{ + if (uiType == TYPE_VAZRUDEN) + return m_auiEncounter[0]; - if (uiType == TYPE_NAZAN) - return m_auiEncounter[1]; + if (uiType == TYPE_NAZAN) + return m_auiEncounter[1]; - return 0; - } + return 0; +} - uint64 GetData64(uint32 uiData) - { - if (uiData == DATA_HERALD) - return m_uiHeraldGUID; +uint64 instance_ramparts::GetData64(uint32 uiData) +{ + if (uiData == NPC_HERALD) + return m_uiHeraldGUID; - return 0; - } -}; + return 0; +} InstanceData* GetInstanceData_instance_ramparts(Map* pMap) { @@ -117,6 +111,7 @@ InstanceData* GetInstanceData_instance_ramparts(Map* pMap) void AddSC_instance_ramparts() { Script* pNewScript; + pNewScript = new Script; pNewScript->Name = "instance_ramparts"; pNewScript->GetInstanceData = &GetInstanceData_instance_ramparts; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 7128f62ff..12dff5c10 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2120" + #define SD2_REVISION_NR "2121" #endif // __SD2_REVISION_NR_H__ From 20e40ce0c924ba4a646ae71a69d99404e55a37f9 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Wed, 18 May 2011 22:14:24 +0200 Subject: [PATCH 0101/1172] [2122] Cleanup instance tempest keep the_eye * Move to header based version * Drop unneeded DATA_ enums, drop double type for Solarian * Fix IsEncounterInProgress to consider Kael'thas encounter --- .../tempest_keep/the_eye/boss_astromancer.cpp | 8 +- .../tempest_keep/the_eye/boss_kaelthas.cpp | 21 +- .../tempest_keep/the_eye/instance_the_eye.cpp | 186 ++++++++---------- .../outland/tempest_keep/the_eye/the_eye.h | 64 ++++-- sd2_revision_nr.h | 2 +- 5 files changed, 141 insertions(+), 140 deletions(-) diff --git a/scripts/outland/tempest_keep/the_eye/boss_astromancer.cpp b/scripts/outland/tempest_keep/the_eye/boss_astromancer.cpp index 31b315b8d..c06b18dc3 100644 --- a/scripts/outland/tempest_keep/the_eye/boss_astromancer.cpp +++ b/scripts/outland/tempest_keep/the_eye/boss_astromancer.cpp @@ -121,7 +121,7 @@ struct MANGOS_DLL_DECL boss_high_astromancer_solarianAI : public ScriptedAI m_Phase = PHASE_NORMAL; if (m_pInstance) - m_pInstance->SetData(TYPE_ASTROMANCER, NOT_STARTED); + m_pInstance->SetData(TYPE_SOLARIAN, NOT_STARTED); m_creature->SetArmor(m_uiDefaultArmor); m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); @@ -150,7 +150,7 @@ struct MANGOS_DLL_DECL boss_high_astromancer_solarianAI : public ScriptedAI DoScriptText(SAY_DEATH, m_creature); if (m_pInstance) - m_pInstance->SetData(TYPE_ASTROMANCER, DONE); + m_pInstance->SetData(TYPE_SOLARIAN, DONE); } void Aggro(Unit* pWho) @@ -158,7 +158,7 @@ struct MANGOS_DLL_DECL boss_high_astromancer_solarianAI : public ScriptedAI DoScriptText(SAY_AGGRO, m_creature); if (m_pInstance) - m_pInstance->SetData(TYPE_ASTROMANCER, IN_PROGRESS); + m_pInstance->SetData(TYPE_SOLARIAN, IN_PROGRESS); } void JustSummoned(Creature* pSummoned) @@ -461,7 +461,7 @@ struct MANGOS_DLL_DECL mob_solarium_priestAI : public ScriptedAI { case 0: if (m_pInstance) - pTarget = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(DATA_ASTROMANCER)); + pTarget = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(NPC_ASTROMANCER)); break; case 1: pTarget = m_creature; diff --git a/scripts/outland/tempest_keep/the_eye/boss_kaelthas.cpp b/scripts/outland/tempest_keep/the_eye/boss_kaelthas.cpp index 100260761..1f079bdc6 100644 --- a/scripts/outland/tempest_keep/the_eye/boss_kaelthas.cpp +++ b/scripts/outland/tempest_keep/the_eye/boss_kaelthas.cpp @@ -132,17 +132,6 @@ uint32 m_auiSpellSummonWeapon[]= SPELL_SUMMON_WEAPONE, SPELL_SUMMON_WEAPONF, SPELL_SUMMON_WEAPONG }; -enum Phases -{ - PHASE_0_NOT_BEGUN = 0, - PHASE_1_ADVISOR = 1, - PHASE_2_WEAPON = 2, - PHASE_3_ADVISOR_ALL = 3, - PHASE_4_SOLO = 4, - PHASE_5_GRAVITY = 5, - PHASE_6_COMPLETE = 6 -}; - const float CAPERNIAN_DISTANCE = 20.0f; //she casts away from the target const float KAEL_VISIBLE_RANGE = 50.0f; @@ -189,7 +178,7 @@ struct MANGOS_DLL_DECL advisorbase_ai : public ScriptedAI //reset encounter if (m_pInstance && (m_pInstance->GetData(TYPE_KAELTHAS_PHASE) == PHASE_1_ADVISOR || m_pInstance->GetData(TYPE_KAELTHAS_PHASE) == PHASE_3_ADVISOR_ALL)) { - if (Creature* pKaelthas = m_pInstance->instance->GetCreature(m_pInstance->GetData64(DATA_KAELTHAS))) + if (Creature* pKaelthas = m_pInstance->instance->GetCreature(m_pInstance->GetData64(NPC_KAELTHAS))) pKaelthas->AI()->EnterEvadeMode(); } } @@ -372,10 +361,10 @@ struct MANGOS_DLL_DECL boss_kaelthasAI : public ScriptedAI if (!m_pInstance) return; - m_auiAdvisorGuid[0] = m_pInstance->GetData64(DATA_THALADRED); - m_auiAdvisorGuid[1] = m_pInstance->GetData64(DATA_SANGUINAR); - m_auiAdvisorGuid[2] = m_pInstance->GetData64(DATA_CAPERNIAN); - m_auiAdvisorGuid[3] = m_pInstance->GetData64(DATA_TELONICUS); + m_auiAdvisorGuid[0] = m_pInstance->GetData64(NPC_THALADRED); + m_auiAdvisorGuid[1] = m_pInstance->GetData64(NPC_SANGUINAR); + m_auiAdvisorGuid[2] = m_pInstance->GetData64(NPC_CAPERNIAN); + m_auiAdvisorGuid[3] = m_pInstance->GetData64(NPC_TELONICUS); if (!m_auiAdvisorGuid[0] || !m_auiAdvisorGuid[1] || !m_auiAdvisorGuid[2] || !m_auiAdvisorGuid[3]) { diff --git a/scripts/outland/tempest_keep/the_eye/instance_the_eye.cpp b/scripts/outland/tempest_keep/the_eye/instance_the_eye.cpp index ab79be0e5..d96ff0450 100644 --- a/scripts/outland/tempest_keep/the_eye/instance_the_eye.cpp +++ b/scripts/outland/tempest_keep/the_eye/instance_the_eye.cpp @@ -24,127 +24,98 @@ EndScriptData */ #include "precompiled.h" #include "the_eye.h" -/* The Eye encounters: -0 - Kael'thas event -1 - Al' ar event -2 - Solarian Event -3 - Void Reaver event -*/ - -struct MANGOS_DLL_DECL instance_the_eye : public ScriptedInstance +instance_the_eye::instance_the_eye(Map* pMap) : ScriptedInstance(pMap), + m_uiThaladredGUID(0), + m_uiSanguinarGUID(0), + m_uiCapernianGUID(0), + m_uiTelonicusGUID(0), + m_uiKaelthasGUID(0), + m_uiAstromancerGUID(0), + + m_uiKaelthasEventPhase(0) { - instance_the_eye(Map* pMap) : ScriptedInstance(pMap) {Initialize();}; - - uint32 m_auiEncounter[MAX_ENCOUNTER]; - - uint64 m_uiThaladredGUID; - uint64 m_uiSanguinarGUID; - uint64 m_uiCapernianGUID; - uint64 m_uiTelonicusGUID; - uint64 m_uiKaelthasGUID; - uint64 m_uiAstromancerGUID; + Initialize(); +} - uint32 m_uiKaelthasEventPhase; +void instance_the_eye::Initialize() +{ + memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); +} - void Initialize() +bool instance_the_eye::IsEncounterInProgress() const +{ + for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) { - memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); - - m_uiThaladredGUID = 0; - m_uiSanguinarGUID = 0; - m_uiCapernianGUID = 0; - m_uiTelonicusGUID = 0; - m_uiKaelthasGUID = 0; - m_uiAstromancerGUID = 0; - - m_uiKaelthasEventPhase = 0; + if (m_auiEncounter[i] == IN_PROGRESS) + return true; } - bool IsEncounterInProgress() const - { - for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) - if (m_auiEncounter[i] == IN_PROGRESS) return true; + if (PHASE_1_ADVISOR <= m_uiKaelthasEventPhase && m_uiKaelthasEventPhase <= PHASE_5_GRAVITY) + return true; - return false; - } + return false; +} - void OnCreatureCreate(Creature* pCreature) +void instance_the_eye::OnCreatureCreate(Creature* pCreature) +{ + switch (pCreature->GetEntry()) { - switch(pCreature->GetEntry()) - { - case 20064: m_uiThaladredGUID = pCreature->GetGUID(); break; - case 20063: m_uiTelonicusGUID = pCreature->GetGUID(); break; - case 20062: m_uiCapernianGUID = pCreature->GetGUID(); break; - case 20060: m_uiSanguinarGUID = pCreature->GetGUID(); break; - case 19622: m_uiKaelthasGUID = pCreature->GetGUID(); break; - case 18805: m_uiAstromancerGUID = pCreature->GetGUID(); break; - } + case NPC_THALADRED: m_uiThaladredGUID = pCreature->GetGUID(); break; + case NPC_TELONICUS: m_uiTelonicusGUID = pCreature->GetGUID(); break; + case NPC_CAPERNIAN: m_uiCapernianGUID = pCreature->GetGUID(); break; + case NPC_SANGUINAR: m_uiSanguinarGUID = pCreature->GetGUID(); break; + case NPC_KAELTHAS: m_uiKaelthasGUID = pCreature->GetGUID(); break; + case NPC_ASTROMANCER: m_uiAstromancerGUID = pCreature->GetGUID(); break; } +} - void SetData(uint32 uiType, uint32 uiData) +void instance_the_eye::SetData(uint32 uiType, uint32 uiData) +{ + switch (uiType) { - switch(uiType) - { - case TYPE_ALAR: - m_auiEncounter[0] = uiData; - break; - case TYPE_SOLARIAN: - m_auiEncounter[1] = uiData; - break; - case TYPE_VOIDREAVER: - m_auiEncounter[2] = uiData; - break; - case TYPE_ASTROMANCER: - m_auiEncounter[3] = uiData; - break; - - case TYPE_KAELTHAS_PHASE: - m_uiKaelthasEventPhase = uiData; - break; - } + case TYPE_ALAR: + case TYPE_SOLARIAN: + case TYPE_VOIDREAVER: + m_auiEncounter[uiType] = uiData; + break; + + case TYPE_KAELTHAS_PHASE: + m_uiKaelthasEventPhase = uiData; + break; } +} - uint32 GetData(uint32 uiType) +uint32 instance_the_eye::GetData(uint32 uiType) +{ + switch(uiType) { - switch(uiType) - { - case TYPE_ALAR: - return m_auiEncounter[0]; - case TYPE_SOLARIAN: - return m_auiEncounter[1]; - case TYPE_VOIDREAVER: - return m_auiEncounter[2]; - case TYPE_ASTROMANCER: - return m_auiEncounter[3]; - - case TYPE_KAELTHAS_PHASE: - return m_uiKaelthasEventPhase; - } - - return 0; + case TYPE_ALAR: + case TYPE_SOLARIAN: + case TYPE_VOIDREAVER: + return m_auiEncounter[uiType]; + case TYPE_KAELTHAS_PHASE: + return m_uiKaelthasEventPhase; + + default: + return 0; } +} - uint64 GetData64(uint32 uiData) +uint64 instance_the_eye::GetData64(uint32 uiData) +{ + switch(uiData) { - switch(uiData) - { - case DATA_THALADRED: - return m_uiThaladredGUID; - case DATA_SANGUINAR: - return m_uiSanguinarGUID; - case DATA_CAPERNIAN: - return m_uiCapernianGUID; - case DATA_TELONICUS: - return m_uiTelonicusGUID; - case DATA_KAELTHAS: - return m_uiKaelthasGUID; - case DATA_ASTROMANCER: - return m_uiAstromancerGUID; - } - - return 0; + case NPC_THALADRED: return m_uiThaladredGUID; + case NPC_SANGUINAR: return m_uiSanguinarGUID; + case NPC_CAPERNIAN: return m_uiCapernianGUID; + case NPC_TELONICUS: return m_uiTelonicusGUID; + case NPC_KAELTHAS: return m_uiKaelthasGUID; + case NPC_ASTROMANCER: return m_uiAstromancerGUID; + + default: + return 0; } -}; +} InstanceData* GetInstanceData_instance_the_eye(Map* pMap) { @@ -153,9 +124,10 @@ InstanceData* GetInstanceData_instance_the_eye(Map* pMap) void AddSC_instance_the_eye() { - Script *newscript; - newscript = new Script; - newscript->Name = "instance_the_eye"; - newscript->GetInstanceData = &GetInstanceData_instance_the_eye; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "instance_the_eye"; + pNewScript->GetInstanceData = &GetInstanceData_instance_the_eye; + pNewScript->RegisterSelf(); } diff --git a/scripts/outland/tempest_keep/the_eye/the_eye.h b/scripts/outland/tempest_keep/the_eye/the_eye.h index 347adfef1..d848b0d0e 100644 --- a/scripts/outland/tempest_keep/the_eye/the_eye.h +++ b/scripts/outland/tempest_keep/the_eye/the_eye.h @@ -7,21 +7,61 @@ enum { - MAX_ENCOUNTER = 4, + MAX_ENCOUNTER = 3, - TYPE_ALAR = 1, - TYPE_ASTROMANCER = 2, - TYPE_SOLARIAN = 3, - TYPE_VOIDREAVER = 4, - TYPE_KAELTHAS_PHASE = 5, //not regular encounter, contains phase instead + TYPE_ALAR = 0, + TYPE_SOLARIAN = 1, + TYPE_VOIDREAVER = 2, - DATA_ASTROMANCER = 8, - DATA_KAELTHAS = 9, + TYPE_KAELTHAS_PHASE = 3, // not regular encounter, contains phase instead - DATA_CAPERNIAN = 10, - DATA_SANGUINAR = 11, - DATA_TELONICUS = 12, - DATA_THALADRED = 13 + NPC_ASTROMANCER = 18805, + NPC_KAELTHAS = 19622, + + NPC_CAPERNIAN = 20062, + NPC_SANGUINAR = 20060, + NPC_TELONICUS = 20063, + NPC_THALADRED = 20064, +}; + +enum KaelPhases +{ + PHASE_0_NOT_BEGUN = 0, + PHASE_1_ADVISOR = 1, + PHASE_2_WEAPON = 2, + PHASE_3_ADVISOR_ALL = 3, + PHASE_4_SOLO = 4, + PHASE_5_GRAVITY = 5, + PHASE_6_COMPLETE = 6, +}; + +class MANGOS_DLL_DECL instance_the_eye : public ScriptedInstance +{ + public: + instance_the_eye(Map* pMap); + + void Initialize(); + bool IsEncounterInProgress() const; + + void OnCreatureCreate(Creature* pCreature); + + void SetData(uint32 uiType, uint32 uiData); + uint32 GetData(uint32 uiType); + uint64 GetData64(uint32 uiData); + + // No Save or Load needed to current knowledge + + private: + uint32 m_auiEncounter[MAX_ENCOUNTER]; + + uint32 m_uiKaelthasEventPhase; + + uint64 m_uiThaladredGUID; + uint64 m_uiSanguinarGUID; + uint64 m_uiCapernianGUID; + uint64 m_uiTelonicusGUID; + uint64 m_uiKaelthasGUID; + uint64 m_uiAstromancerGUID; }; #endif diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 12dff5c10..7ba175274 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2121" + #define SD2_REVISION_NR "2122" #endif // __SD2_REVISION_NR_H__ From 490ff67a4d5941ff0a0c9ec124f87051ce8eac89 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Thu, 19 May 2011 00:17:06 +0200 Subject: [PATCH 0102/1172] [2123] Cleanup in tempest keep arcatraz scripts * Remove DATA_ enums * Cleanup various coding style related * Add comments for future fixes --- .../tempest_keep/arcatraz/arcatraz.cpp | 379 +++++++++--------- .../outland/tempest_keep/arcatraz/arcatraz.h | 35 +- .../arcatraz/boss_harbinger_skyriss.cpp | 263 ++++++------ .../arcatraz/instance_arcatraz.cpp | 4 +- sd2_revision_nr.h | 2 +- 5 files changed, 348 insertions(+), 335 deletions(-) diff --git a/scripts/outland/tempest_keep/arcatraz/arcatraz.cpp b/scripts/outland/tempest_keep/arcatraz/arcatraz.cpp index d4cbad890..e82b94ac7 100644 --- a/scripts/outland/tempest_keep/arcatraz/arcatraz.cpp +++ b/scripts/outland/tempest_keep/arcatraz/arcatraz.cpp @@ -34,30 +34,33 @@ EndContentData */ # npc_millhouse_manastorm #####*/ -#define SAY_INTRO_1 -1552010 -#define SAY_INTRO_2 -1552011 -#define SAY_WATER -1552012 -#define SAY_BUFFS -1552013 -#define SAY_DRINK -1552014 -#define SAY_READY -1552015 -#define SAY_KILL_1 -1552016 -#define SAY_KILL_2 -1552017 -#define SAY_PYRO -1552018 -#define SAY_ICEBLOCK -1552019 -#define SAY_LOWHP -1552020 -#define SAY_DEATH -1552021 -#define SAY_COMPLETE -1552022 - -#define SPELL_CONJURE_WATER 36879 -#define SPELL_ARCANE_INTELLECT 36880 -#define SPELL_ICE_ARMOR 36881 - -#define SPELL_ARCANE_MISSILES 33833 -#define SPELL_CONE_OF_COLD 12611 -#define SPELL_FIRE_BLAST 13341 -#define SPELL_FIREBALL 14034 -#define SPELL_FROSTBOLT 15497 -#define SPELL_PYROBLAST 33975 +enum +{ + SAY_INTRO_1 = -1552010, + SAY_INTRO_2 = -1552011, + SAY_WATER = -1552012, + SAY_BUFFS = -1552013, + SAY_DRINK = -1552014, + SAY_READY = -1552015, + SAY_KILL_1 = -1552016, + SAY_KILL_2 = -1552017, + SAY_PYRO = -1552018, + SAY_ICEBLOCK = -1552019, + SAY_LOWHP = -1552020, + SAY_DEATH = -1552021, + SAY_COMPLETE = -1552022, + + SPELL_CONJURE_WATER = 36879, + SPELL_ARCANE_INTELLECT = 36880, + SPELL_ICE_ARMOR = 36881, + + SPELL_ARCANE_MISSILES = 33833, + SPELL_CONE_OF_COLD = 12611, + SPELL_FIRE_BLAST = 13341, + SPELL_FIREBALL = 14034, + SPELL_FROSTBOLT = 15497, + SPELL_PYROBLAST = 33975, +}; struct MANGOS_DLL_DECL npc_millhouse_manastormAI : public ScriptedAI { @@ -69,28 +72,28 @@ struct MANGOS_DLL_DECL npc_millhouse_manastormAI : public ScriptedAI ScriptedInstance* m_pInstance; - uint32 EventProgress_Timer; - uint32 Phase; - bool Init; - bool LowHp; + uint32 m_uiEventProgressTimer; + uint32 m_uiPhase; + bool m_bInitFinished; + bool m_bHasLowHp; - uint32 Pyroblast_Timer; - uint32 Fireball_Timer; + uint32 m_uiPyroblastTimer; + uint32 m_uiFireballTimer; void Reset() { - EventProgress_Timer = 2000; - LowHp = false; - Init = false; - Phase = 1; + m_uiEventProgressTimer = 2000; + m_bHasLowHp = false; + m_bInitFinished = false; + m_uiPhase = 1; - Pyroblast_Timer = 1000; - Fireball_Timer = 2500; + m_uiPyroblastTimer = 1000; + m_uiFireballTimer = 2500; if (m_pInstance) { if (m_pInstance->GetData(TYPE_WARDEN_2) == DONE) - Init = true; + m_bInitFinished = true; if (m_pInstance->GetData(TYPE_HARBINGERSKYRISS) == DONE) DoScriptText(SAY_COMPLETE, m_creature); @@ -109,12 +112,12 @@ struct MANGOS_DLL_DECL npc_millhouse_manastormAI : public ScriptedAI } } - void KilledUnit(Unit *victim) + void KilledUnit(Unit* pVictim) { DoScriptText(urand(0, 1) ? SAY_KILL_1 : SAY_KILL_2, m_creature); } - void JustDied(Unit *victim) + void JustDied(Unit* pVictim) { DoScriptText(SAY_DEATH, m_creature); @@ -123,79 +126,83 @@ struct MANGOS_DLL_DECL npc_millhouse_manastormAI : public ScriptedAI ->FailQuest();*/ } - void UpdateAI(const uint32 diff) + void UpdateAI(const uint32 uiDiff) { - if (!Init) + if (!m_bInitFinished) { - if (EventProgress_Timer < diff) + if (m_uiEventProgressTimer < uiDiff) { - if (Phase < 8) + if (m_uiPhase < 8) { - switch(Phase) + switch(m_uiPhase) { case 1: DoScriptText(SAY_INTRO_1, m_creature); - EventProgress_Timer = 18000; + m_uiEventProgressTimer = 18000; break; case 2: DoScriptText(SAY_INTRO_2, m_creature); - EventProgress_Timer = 18000; + m_uiEventProgressTimer = 18000; break; case 3: DoScriptText(SAY_WATER, m_creature); - DoCastSpellIfCan(m_creature,SPELL_CONJURE_WATER); - EventProgress_Timer = 7000; + DoCastSpellIfCan(m_creature, SPELL_CONJURE_WATER); + m_uiEventProgressTimer = 7000; break; case 4: DoScriptText(SAY_BUFFS, m_creature); - DoCastSpellIfCan(m_creature,SPELL_ICE_ARMOR); - EventProgress_Timer = 7000; + DoCastSpellIfCan(m_creature, SPELL_ICE_ARMOR); + m_uiEventProgressTimer = 7000; break; case 5: DoScriptText(SAY_DRINK, m_creature); - DoCastSpellIfCan(m_creature,SPELL_ARCANE_INTELLECT); - EventProgress_Timer = 7000; + DoCastSpellIfCan(m_creature, SPELL_ARCANE_INTELLECT); + m_uiEventProgressTimer = 7000; break; case 6: DoScriptText(SAY_READY, m_creature); - EventProgress_Timer = 6000; + m_uiEventProgressTimer = 6000; break; case 7: if (m_pInstance) - m_pInstance->SetData(TYPE_WARDEN_2,DONE); - Init = true; + m_pInstance->SetData(TYPE_WARDEN_2, DONE); + m_bInitFinished = true; break; } - ++Phase; + ++m_uiPhase; } - } else EventProgress_Timer -= diff; + } + else + m_uiEventProgressTimer -= uiDiff; } if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - if (!LowHp && m_creature->GetHealthPercent() < 20.0f) + if (!m_bHasLowHp && m_creature->GetHealthPercent() < 20.0f) { DoScriptText(SAY_LOWHP, m_creature); - LowHp = true; + m_bHasLowHp = true; } - if (Pyroblast_Timer < diff) + if (m_uiPyroblastTimer < uiDiff) { - if (m_creature->IsNonMeleeSpellCasted(false)) - return; - - DoScriptText(SAY_PYRO, m_creature); - - DoCastSpellIfCan(m_creature->getVictim(),SPELL_PYROBLAST); - Pyroblast_Timer = 40000; - }else Pyroblast_Timer -=diff; + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_PYROBLAST) == CAST_OK) + { + m_uiPyroblastTimer = 40000; + DoScriptText(SAY_PYRO, m_creature); + } + } + else + m_uiPyroblastTimer -=uiDiff; - if (Fireball_Timer < diff) + if (m_uiFireballTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_FIREBALL); - Fireball_Timer = 4000; - }else Fireball_Timer -=diff; + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_FIREBALL) == CAST_OK) + m_uiFireballTimer = 4000; + } + else + m_uiFireballTimer -=uiDiff; DoMeleeAttackIfReady(); } @@ -210,36 +217,47 @@ CreatureAI* GetAI_npc_millhouse_manastorm(Creature* pCreature) # npc_warden_mellichar #####*/ -#define YELL_INTRO1 -1552023 -#define YELL_INTRO2 -1552024 -#define YELL_RELEASE1 -1552025 -#define YELL_RELEASE2A -1552026 -#define YELL_RELEASE2B -1552027 -#define YELL_RELEASE3 -1552028 -#define YELL_RELEASE4 -1552029 -#define YELL_WELCOME -1552030 - -//phase 2(acid mobs) -#define ENTRY_TRICKSTER 20905 -#define ENTRY_PH_HUNTER 20906 -//phase 3 -#define ENTRY_MILLHOUSE 20977 -//phase 4(acid mobs) -#define ENTRY_AKKIRIS 20908 -#define ENTRY_SULFURON 20909 -//phase 5(acid mobs) -#define ENTRY_TW_DRAK 20910 -#define ENTRY_BL_DRAK 20911 -//phase 6 -#define ENTRY_SKYRISS 20912 - -//TARGET_SCRIPT -#define SPELL_TARGET_ALPHA 36856 -#define SPELL_TARGET_BETA 36854 -#define SPELL_TARGET_DELTA 36857 -#define SPELL_TARGET_GAMMA 36858 -#define SPELL_TARGET_OMEGA 36852 -#define SPELL_BUBBLE_VISUAL 36849 +enum +{ + YELL_INTRO1 = -1552023, + YELL_INTRO2 = -1552024, + YELL_RELEASE1 = -1552025, + YELL_RELEASE2A = -1552026, + YELL_RELEASE2B = -1552027, + YELL_RELEASE3 = -1552028, + YELL_RELEASE4 = -1552029, + YELL_WELCOME = -1552030, + + // phase 2(acid mobs) + ENTRY_TRICKSTER = 20905, + ENTRY_PH_HUNTER = 20906, + // phase 3 + ENTRY_MILLHOUSE = 20977, + // phase 4(acid mobs) + ENTRY_AKKIRIS = 20908, + ENTRY_SULFURON = 20909, + // phase 5(acid mobs) + ENTRY_TW_DRAK = 20910, + ENTRY_BL_DRAK = 20911, + // phase 6 + ENTRY_SKYRISS = 20912, + + SPELL_TARGET_ALPHA = 36856, + SPELL_TARGET_BETA = 36854, + SPELL_TARGET_DELTA = 36857, + SPELL_TARGET_GAMMA = 36858, + SPELL_TARGET_OMEGA = 36852, + SPELL_BUBBLE_VISUAL = 36849, +}; + +static const float aSummonPosition[5][4] = +{ + {478.326f, -148.505f, 42.56f, 3.19f}, // Trickster or Phase Hunter + {413.292f, -148.378f, 42.56f, 6.27f}, // Millhouse + {420.179f, -174.396f, 42.58f, 0.02f}, // Akkiris or Sulfuron + {471.795f, -174.58f, 42.58f, 3.06f}, // Twilight or Blackwing Drakonaar + {445.763f, -191.639f, 44.64f, 1.60f} // Skyriss +}; struct MANGOS_DLL_DECL npc_warden_mellicharAI : public ScriptedAI { @@ -251,19 +269,19 @@ struct MANGOS_DLL_DECL npc_warden_mellicharAI : public ScriptedAI ScriptedInstance* m_pInstance; - bool IsRunning; - bool CanSpawn; + bool m_bIsEventRunning; + bool m_bCanSpawnNextWave; - uint32 EventProgress_Timer; - uint32 Phase; + uint32 m_uiEventProgressTimer; + uint32 m_uiPhase; void Reset() { - IsRunning = false; - CanSpawn = false; + m_bIsEventRunning = false; + m_bCanSpawnNextWave = false; - EventProgress_Timer = 22000; - Phase = 1; + m_uiEventProgressTimer = 22000; + m_uiPhase = 1; m_creature->SetFlag(UNIT_FIELD_FLAGS,UNIT_FLAG_NON_ATTACKABLE); DoCastSpellIfCan(m_creature,SPELL_TARGET_OMEGA); @@ -272,40 +290,40 @@ struct MANGOS_DLL_DECL npc_warden_mellicharAI : public ScriptedAI m_pInstance->SetData(TYPE_HARBINGERSKYRISS,NOT_STARTED); } - void AttackStart(Unit* who) { } + void AttackStart(Unit* pWho) {} - void MoveInLineOfSight(Unit *who) + void MoveInLineOfSight(Unit* pWho) { - if (IsRunning) + if (m_bIsEventRunning) return; - if (!m_creature->getVictim() && who->isTargetableForAttack() && (m_creature->IsHostileTo(who)) && who->isInAccessablePlaceFor(m_creature)) - { - if (!m_creature->CanFly() && m_creature->GetDistanceZ(who) > CREATURE_Z_ATTACK_RANGE) - return; + if (pWho->GetTypeId() != TYPEID_PLAYER) + return; - if (who->GetTypeId() != TYPEID_PLAYER) + if (!m_creature->getVictim() && pWho->isTargetableForAttack() && (m_creature->IsHostileTo(pWho)) && pWho->isInAccessablePlaceFor(m_creature)) + { + if (!m_creature->CanFly() && m_creature->GetDistanceZ(pWho) > CREATURE_Z_ATTACK_RANGE) return; - float attackRadius = m_creature->GetAttackDistance(who)/10; - if (m_creature->IsWithinDistInMap(who, attackRadius) && m_creature->IsWithinLOSInMap(who)) - Aggro(who); + float attackRadius = m_creature->GetAttackDistance(pWho)/10; + if (m_creature->IsWithinDistInMap(pWho, attackRadius) && m_creature->IsWithinLOSInMap(pWho)) + Aggro(pWho); } } - void Aggro(Unit *who) + void Aggro(Unit* pWho) { DoScriptText(YELL_INTRO1, m_creature); - DoCastSpellIfCan(m_creature,SPELL_BUBBLE_VISUAL); + DoCastSpellIfCan(m_creature, SPELL_BUBBLE_VISUAL); if (m_pInstance) { - m_pInstance->SetData(TYPE_HARBINGERSKYRISS,IN_PROGRESS); + m_pInstance->SetData(TYPE_HARBINGERSKYRISS, IN_PROGRESS); - if (GameObject* pSphere = m_pInstance->instance->GetGameObject(m_pInstance->GetData64(DATA_SPHERE_SHIELD))) + if (GameObject* pSphere = m_pInstance->instance->GetGameObject(m_pInstance->GetData64(GO_SEAL_SPHERE))) pSphere->SetGoState(GO_STATE_READY); - IsRunning = true; + m_bIsEventRunning = true; } } @@ -313,19 +331,19 @@ struct MANGOS_DLL_DECL npc_warden_mellicharAI : public ScriptedAI { if (m_pInstance) { - if (Phase == 7 && m_pInstance->GetData(TYPE_WARDEN_4) == DONE) + if (m_uiPhase == 7 && m_pInstance->GetData(TYPE_WARDEN_4) == DONE) return true; - if (Phase == 6 && m_pInstance->GetData(TYPE_WARDEN_3) == DONE) + if (m_uiPhase == 6 && m_pInstance->GetData(TYPE_WARDEN_3) == DONE) return true; - if (Phase == 5 && m_pInstance->GetData(TYPE_WARDEN_2) == DONE) + if (m_uiPhase == 5 && m_pInstance->GetData(TYPE_WARDEN_2) == DONE) return true; - if (Phase == 4) + if (m_uiPhase == 4) return true; - if (Phase == 3 && m_pInstance->GetData(TYPE_WARDEN_1) == DONE) + if (m_uiPhase == 3 && m_pInstance->GetData(TYPE_WARDEN_1) == DONE) return true; - if (Phase == 2 && m_pInstance->GetData(TYPE_HARBINGERSKYRISS) == IN_PROGRESS) + if (m_uiPhase == 2 && m_pInstance->GetData(TYPE_HARBINGERSKYRISS) == IN_PROGRESS) return true; - if (Phase == 1 && m_pInstance->GetData(TYPE_HARBINGERSKYRISS) == IN_PROGRESS) + if (m_uiPhase == 1 && m_pInstance->GetData(TYPE_HARBINGERSKYRISS) == IN_PROGRESS) return true; return false; @@ -340,38 +358,38 @@ struct MANGOS_DLL_DECL npc_warden_mellicharAI : public ScriptedAI m_creature->InterruptNonMeleeSpells(true); m_creature->RemoveSpellsCausingAura(SPELL_AURA_DUMMY); - switch(Phase) + switch(m_uiPhase) { case 2: - DoCastSpellIfCan(m_creature,SPELL_TARGET_ALPHA); - m_pInstance->SetData(TYPE_WARDEN_1,IN_PROGRESS); + DoCastSpellIfCan(m_creature, SPELL_TARGET_ALPHA); + m_pInstance->SetData(TYPE_WARDEN_1, IN_PROGRESS); break; case 3: - DoCastSpellIfCan(m_creature,SPELL_TARGET_BETA); - m_pInstance->SetData(TYPE_WARDEN_2,IN_PROGRESS); + DoCastSpellIfCan(m_creature, SPELL_TARGET_BETA); + m_pInstance->SetData(TYPE_WARDEN_2, IN_PROGRESS); break; case 5: - DoCastSpellIfCan(m_creature,SPELL_TARGET_DELTA); - m_pInstance->SetData(TYPE_WARDEN_3,IN_PROGRESS); + DoCastSpellIfCan(m_creature, SPELL_TARGET_DELTA); + m_pInstance->SetData(TYPE_WARDEN_3, IN_PROGRESS); break; case 6: - DoCastSpellIfCan(m_creature,SPELL_TARGET_GAMMA); - m_pInstance->SetData(TYPE_WARDEN_4,IN_PROGRESS); + DoCastSpellIfCan(m_creature, SPELL_TARGET_GAMMA); + m_pInstance->SetData(TYPE_WARDEN_4, IN_PROGRESS); break; case 7: - m_pInstance->SetData(TYPE_WARDEN_5,IN_PROGRESS); + m_pInstance->SetData(TYPE_WARDEN_5, IN_PROGRESS); break; } - CanSpawn = true; + m_bCanSpawnNextWave = true; } } - void UpdateAI(const uint32 diff) + void UpdateAI(const uint32 uiDiff) { - if (!IsRunning) + if (!m_bIsEventRunning) return; - if (EventProgress_Timer < diff) + if (m_uiEventProgressTimer < uiDiff) { if (m_pInstance) { @@ -379,89 +397,79 @@ struct MANGOS_DLL_DECL npc_warden_mellicharAI : public ScriptedAI Reset(); } - if (CanSpawn) + if (m_bCanSpawnNextWave) { //continue beam omega pod, unless we are about to summon skyriss - if (Phase != 7) - DoCastSpellIfCan(m_creature,SPELL_TARGET_OMEGA); + if (m_uiPhase != 7) + DoCastSpellIfCan(m_creature, SPELL_TARGET_OMEGA); - switch(Phase) + switch (m_uiPhase) { case 2: - switch(urand(0, 1)) - { - case 0: m_creature->SummonCreature(ENTRY_TRICKSTER, 478.326f, -148.505f, 42.56f, 3.19f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,600000); break; - case 1: m_creature->SummonCreature(ENTRY_PH_HUNTER, 478.326f, -148.505f, 42.56f, 3.19f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,600000); break; - } + m_creature->SummonCreature(urand(0, 1) ? ENTRY_TRICKSTER : ENTRY_PH_HUNTER, aSummonPosition[0][0], aSummonPosition[0][1], aSummonPosition[0][2], aSummonPosition[0][3], TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 600000); break; case 3: - m_creature->SummonCreature(ENTRY_MILLHOUSE, 413.292f, -148.378f, 42.56f, 6.27f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,600000); + m_creature->SummonCreature(ENTRY_MILLHOUSE, aSummonPosition[1][0], aSummonPosition[1][1], aSummonPosition[1][2], aSummonPosition[1][3], TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 600000); break; case 4: DoScriptText(YELL_RELEASE2B, m_creature); break; case 5: - switch(urand(0, 1)) - { - case 0: m_creature->SummonCreature(ENTRY_AKKIRIS, 420.179f, -174.396f, 42.58f, 0.02f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,600000); break; - case 1: m_creature->SummonCreature(ENTRY_SULFURON, 420.179f, -174.396f, 42.58f, 0.02f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,600000); break; - } + m_creature->SummonCreature(urand(0, 1) ? ENTRY_AKKIRIS : ENTRY_SULFURON, aSummonPosition[2][0], aSummonPosition[2][1], aSummonPosition[2][2], aSummonPosition[2][3], TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 600000); break; case 6: - switch(urand(0, 1)) - { - case 0: m_creature->SummonCreature(ENTRY_TW_DRAK, 471.795f, -174.58f, 42.58f, 3.06f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,600000); break; - case 1: m_creature->SummonCreature(ENTRY_BL_DRAK, 471.795f, -174.58f, 42.58f, 3.06f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,600000); break; - } + m_creature->SummonCreature(urand(0, 1) ? ENTRY_TW_DRAK : ENTRY_BL_DRAK, aSummonPosition[3][0], aSummonPosition[3][1], aSummonPosition[3][2], aSummonPosition[3][3], TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 600000); break; case 7: - m_creature->SummonCreature(ENTRY_SKYRISS, 445.763f, -191.639f, 44.64f, 1.60f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,600000); + m_creature->SummonCreature(ENTRY_SKYRISS, aSummonPosition[4][0], aSummonPosition[4][1], aSummonPosition[4][2], aSummonPosition[4][3], TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 600000); DoScriptText(YELL_WELCOME, m_creature); break; } - CanSpawn = false; - ++Phase; + m_bCanSpawnNextWave = false; + ++m_uiPhase; } if (CanProgress()) { - switch(Phase) + switch(m_uiPhase) { case 1: DoScriptText(YELL_INTRO2, m_creature); - EventProgress_Timer = 10000; - ++Phase; + m_uiEventProgressTimer = 10000; + ++m_uiPhase; break; case 2: DoScriptText(YELL_RELEASE1, m_creature); DoPrepareForPhase(); - EventProgress_Timer = 7000; + m_uiEventProgressTimer = 7000; break; case 3: DoScriptText(YELL_RELEASE2A, m_creature); DoPrepareForPhase(); - EventProgress_Timer = 10000; + m_uiEventProgressTimer = 10000; break; case 4: DoPrepareForPhase(); - EventProgress_Timer = 15000; + m_uiEventProgressTimer = 15000; break; case 5: DoScriptText(YELL_RELEASE3, m_creature); DoPrepareForPhase(); - EventProgress_Timer = 15000; + m_uiEventProgressTimer = 15000; break; case 6: DoScriptText(YELL_RELEASE4, m_creature); DoPrepareForPhase(); - EventProgress_Timer = 15000; + m_uiEventProgressTimer = 15000; break; case 7: DoPrepareForPhase(); - EventProgress_Timer = 15000; + m_uiEventProgressTimer = 15000; break; } } - } else EventProgress_Timer -= diff; + } + else + m_uiEventProgressTimer -= uiDiff; } }; @@ -474,19 +482,22 @@ CreatureAI* GetAI_npc_warden_mellichar(Creature* pCreature) # mob_zerekethvoidzone (this script probably not needed in future -> `creature_template_addon`.`auras`='36120 0') #####*/ -#define SPELL_VOID_ZONE_DAMAGE 36120 +enum +{ + SPELL_VOID_ZONE_DAMAGE = 36120, +}; struct MANGOS_DLL_DECL mob_zerekethvoidzoneAI : public ScriptedAI { - mob_zerekethvoidzoneAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + mob_zerekethvoidzoneAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } void Reset() { - m_creature->SetUInt32Value(UNIT_NPC_FLAGS,0); + m_creature->SetUInt32Value(UNIT_NPC_FLAGS, 0); m_creature->setFaction(16); m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - DoCastSpellIfCan(m_creature,SPELL_VOID_ZONE_DAMAGE); + DoCastSpellIfCan(m_creature, SPELL_VOID_ZONE_DAMAGE); } }; CreatureAI* GetAI_mob_zerekethvoidzoneAI(Creature* pCreature) diff --git a/scripts/outland/tempest_keep/arcatraz/arcatraz.h b/scripts/outland/tempest_keep/arcatraz/arcatraz.h index 775370441..c8f3863f9 100644 --- a/scripts/outland/tempest_keep/arcatraz/arcatraz.h +++ b/scripts/outland/tempest_keep/arcatraz/arcatraz.h @@ -9,29 +9,26 @@ enum { MAX_ENCOUNTER = 9, - GO_CORE_SECURITY_FIELD_ALPHA = 184318, //door opened when Wrath-Scryer Soccothrates dies - GO_CORE_SECURITY_FIELD_BETA = 184319, //door opened when Dalliah the Doomsayer dies - GO_SEAL_SPHERE = 184802, //shield 'protecting' mellichar - GO_POD_ALPHA = 183961, //pod first boss wave - GO_POD_BETA = 183963, //pod second boss wave - GO_POD_DELTA = 183964, //pod third boss wave - GO_POD_GAMMA = 183962, //pod fourth boss wave - GO_POD_OMEGA = 183965, //pod fifth boss wave - - NPC_MELLICHAR = 20904, //skyriss will kill this unit - TYPE_ZEREKETH = 1, - TYPE_DALLIAH = 2, - TYPE_SOCCOTHRATES = 3, - TYPE_HARBINGERSKYRISS = 4, - TYPE_WARDEN_1 = 5, + TYPE_DALLIAH = 2, // Handled in ACID (20885 - Dalliah the Doomsayer) + TYPE_SOCCOTHRATES = 3, // Handled in ACID (20886 - Wrath-Scryer Soccothrates) + TYPE_HARBINGERSKYRISS = 4, // Handled with ACID (FAIL of 20905, 20906, 20908, 20909, 20910, 20911) + TYPE_WARDEN_1 = 5, // Handled with ACID (20905 - Blazing Trickster, 20906 - Phase-Hunter) TYPE_WARDEN_2 = 6, - TYPE_WARDEN_3 = 7, - TYPE_WARDEN_4 = 8, + TYPE_WARDEN_3 = 7, // Handled with ACID (20908 - Akkiris Lightning-Waker, 20909 - Sulfuron Magma-Thrower) + TYPE_WARDEN_4 = 8, // Handled with ACID (20910 - Twilight Drakonaar, 20911 - Blackwing Drakonaar) TYPE_WARDEN_5 = 9, - DATA_MELLICHAR = 10, - DATA_SPHERE_SHIELD = 11 + NPC_MELLICHAR = 20904, // Skyriss will kill this unit + + GO_CORE_SECURITY_FIELD_ALPHA = 184318, // Door opened when Wrath-Scryer Soccothrates dies + GO_CORE_SECURITY_FIELD_BETA = 184319, // Door opened when Dalliah the Doomsayer dies + GO_SEAL_SPHERE = 184802, // Shield 'protecting' mellichar + GO_POD_ALPHA = 183961, // Pod first boss wave + GO_POD_BETA = 183963, // Pod second boss wave + GO_POD_DELTA = 183964, // Pod third boss wave + GO_POD_GAMMA = 183962, // Pod fourth boss wave + GO_POD_OMEGA = 183965, // Pod fifth boss wave }; #endif diff --git a/scripts/outland/tempest_keep/arcatraz/boss_harbinger_skyriss.cpp b/scripts/outland/tempest_keep/arcatraz/boss_harbinger_skyriss.cpp index c018151fc..bf5483d92 100644 --- a/scripts/outland/tempest_keep/arcatraz/boss_harbinger_skyriss.cpp +++ b/scripts/outland/tempest_keep/arcatraz/boss_harbinger_skyriss.cpp @@ -17,41 +17,40 @@ /* ScriptData SDName: Boss_Harbinger_Skyriss SD%Complete: 45 -SDComment: CombatAI not fully implemented. Timers will need adjustments. Need more docs on how event fully work. Reset all event and force start over if fail at one point? +SDComment: CombatAI not fully implemented. Timers will need adjustments. On wipe despawn all, and let warden_mellichar respawn after ~1min SDCategory: Tempest Keep, The Arcatraz EndScriptData */ /* ContentData boss_harbinger_skyriss -boss_harbinger_skyriss_illusion +boss_harbinger_skyriss_illusion -- TODO implement or move to ACID EndContentData */ #include "precompiled.h" #include "arcatraz.h" -#define SAY_INTRO -1552000 -#define SAY_AGGRO -1552001 -#define SAY_KILL_1 -1552002 -#define SAY_KILL_2 -1552003 -#define SAY_MIND_1 -1552004 -#define SAY_MIND_2 -1552005 -#define SAY_FEAR_1 -1552006 -#define SAY_FEAR_2 -1552007 -#define SAY_IMAGE -1552008 -#define SAY_DEATH -1552009 - -#define SPELL_FEAR 39415 - -#define SPELL_MIND_REND 36924 -#define H_SPELL_MIND_REND 39017 - -#define SPELL_DOMINATION 37162 -#define H_SPELL_DOMINATION 39019 - -#define H_SPELL_MANA_BURN 39020 - -#define SPELL_66_ILLUSION 36931 //entry 21466 -#define SPELL_33_ILLUSION 36932 //entry 21467 +enum +{ + SAY_INTRO = -1552000, + SAY_AGGRO = -1552001, + SAY_KILL_1 = -1552002, + SAY_KILL_2 = -1552003, + SAY_MIND_1 = -1552004, + SAY_MIND_2 = -1552005, + SAY_FEAR_1 = -1552006, + SAY_FEAR_2 = -1552007, + SAY_IMAGE = -1552008, + SAY_DEATH = -1552009, + + SPELL_FEAR = 39415, + SPELL_MIND_REND = 36924, + SPELL_MIND_REND_H = 39017, + SPELL_DOMINATION = 37162, + SPELL_DOMINATION_H = 39019, + SPELL_MANA_BURN_H = 39020, + SPELL_66_ILLUSION = 36931, // Summons 21466 + SPELL_33_ILLUSION = 36932, // Summons 21467 +}; struct MANGOS_DLL_DECL boss_harbinger_skyrissAI : public ScriptedAI { @@ -59,188 +58,191 @@ struct MANGOS_DLL_DECL boss_harbinger_skyrissAI : public ScriptedAI { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); - Intro = false; + m_bIntroFinished = false; Reset(); } ScriptedInstance* m_pInstance; bool m_bIsRegularMode; - bool Intro; - bool IsImage33; - bool IsImage66; + bool m_bIntroFinished; + bool m_bDidSplitImage33; + bool m_bDidSplitImage66; - uint32 Intro_Phase; - uint32 Intro_Timer; - uint32 MindRend_Timer; - uint32 Fear_Timer; - uint32 Domination_Timer; - uint32 ManaBurn_Timer; + uint32 m_uiIntroPhase; + uint32 m_uiIntroTimer; + uint32 m_uiMindRendTimer; + uint32 m_uiFearTimer; + uint32 m_uiDominationTimer; + uint32 m_uiManaBurnTimer; void Reset() { - IsImage33 = false; - IsImage66 = false; - - Intro_Phase = 1; - Intro_Timer = 5000; - MindRend_Timer = 3000; - Fear_Timer = 15000; - Domination_Timer = 30000; - ManaBurn_Timer = 25000; + m_bDidSplitImage33 = false; + m_bDidSplitImage66 = false; + + m_uiIntroPhase = 1; + m_uiIntroTimer = 5000; + m_uiMindRendTimer = 3000; + m_uiFearTimer = 15000; + m_uiDominationTimer = 30000; + m_uiManaBurnTimer = 25000; } - void MoveInLineOfSight(Unit *who) + void MoveInLineOfSight(Unit* pWho) { - if (!Intro) + if (!m_bIntroFinished) return; - ScriptedAI::MoveInLineOfSight(who); + ScriptedAI::MoveInLineOfSight(pWho); } - void AttackStart(Unit* who) + void AttackStart(Unit* pWho) { - if (!Intro) + if (!m_bIntroFinished) return; - ScriptedAI::AttackStart(who); + ScriptedAI::AttackStart(pWho); } - void JustDied(Unit* Killer) + void JustDied(Unit* pKiller) { DoScriptText(SAY_DEATH, m_creature); if (m_pInstance) - m_pInstance->SetData(TYPE_HARBINGERSKYRISS,DONE); + m_pInstance->SetData(TYPE_HARBINGERSKYRISS, DONE); } - void KilledUnit(Unit* victim) + void KilledUnit(Unit* pVictim) { //won't yell killing pet/other unit - if (victim->GetTypeId() != TYPEID_PLAYER) + if (pVictim->GetTypeId() != TYPEID_PLAYER) return; DoScriptText(urand(0, 1) ? SAY_KILL_1 : SAY_KILL_2, m_creature); } - void JustSummoned(Creature *summoned) + void JustSummoned(Creature* pSummoned) { - summoned->AI()->AttackStart(m_creature->getVictim()); + pSummoned->AI()->AttackStart(m_creature->getVictim()); } void DoSplit() { - if (m_creature->IsNonMeleeSpellCasted(false)) - m_creature->InterruptNonMeleeSpells(false); - DoScriptText(SAY_IMAGE, m_creature); - DoCastSpellIfCan(m_creature, IsImage33 ? SPELL_33_ILLUSION : SPELL_66_ILLUSION); + DoCastSpellIfCan(m_creature, m_bDidSplitImage33 ? SPELL_33_ILLUSION : SPELL_66_ILLUSION, CAST_INTERRUPT_PREVIOUS); } - void UpdateAI(const uint32 diff) + void UpdateAI(const uint32 uiDiff) { - if (!Intro && !m_creature->isInCombat()) + if (!m_bIntroFinished && !m_creature->isInCombat()) { if (!m_pInstance) return; - if (Intro_Timer < diff) + if (m_uiIntroTimer < uiDiff) { - switch(Intro_Phase) + switch(m_uiIntroPhase) { case 1: DoScriptText(SAY_INTRO, m_creature); - if (GameObject* pSphere = m_pInstance->instance->GetGameObject(m_pInstance->GetData64(DATA_SPHERE_SHIELD))) + if (GameObject* pSphere = m_pInstance->instance->GetGameObject(m_pInstance->GetData64(GO_SEAL_SPHERE))) pSphere->SetGoState(GO_STATE_ACTIVE); - ++Intro_Phase; - Intro_Timer = 25000; + ++m_uiIntroPhase; + m_uiIntroTimer = 25000; break; case 2: DoScriptText(SAY_AGGRO, m_creature); - if (Creature *mellic = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(DATA_MELLICHAR))) + if (Creature* pMellic = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(NPC_MELLICHAR))) { - //should have a better way to do this. possibly spell exist. - mellic->SetDeathState(JUST_DIED); - mellic->SetHealth(0); + // should have a better way to do this. possibly spell exist. + pMellic->SetDeathState(JUST_DIED); + pMellic->SetHealth(0); } - ++Intro_Phase; - Intro_Timer = 3000; + ++m_uiIntroPhase; + m_uiIntroTimer = 3000; break; case 3: - Intro = true; + m_bIntroFinished = true; + // TODO - Let Attack here, or change Unit_flag break; } - }else Intro_Timer -=diff; + } + else + m_uiIntroTimer -=uiDiff; } if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - if (!IsImage66 && m_creature->GetHealthPercent() <= 66.0f) + if (!m_bDidSplitImage66 && m_creature->GetHealthPercent() <= 66.0f) { - IsImage66 = true; + m_bDidSplitImage66 = true; DoSplit(); } - if (!IsImage33 && m_creature->GetHealthPercent() <= 33.0f) + if (!m_bDidSplitImage33 && m_creature->GetHealthPercent() <= 33.0f) { - IsImage33 = true; + m_bDidSplitImage33 = true; DoSplit(); } - if (MindRend_Timer < diff) + if (m_uiMindRendTimer < uiDiff) { - if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,1)) - DoCastSpellIfCan(target, m_bIsRegularMode ? SPELL_MIND_REND : H_SPELL_MIND_REND); - else - DoCastSpellIfCan(m_creature->getVictim(), m_bIsRegularMode ? SPELL_MIND_REND : H_SPELL_MIND_REND); + Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1); + if (!pTarget) + pTarget = m_creature->getVictim(); - MindRend_Timer = 8000; - }else MindRend_Timer -=diff; + if (DoCastSpellIfCan(pTarget, m_bIsRegularMode ? SPELL_MIND_REND : SPELL_MIND_REND_H) == CAST_OK) + m_uiMindRendTimer = 8000; + } + else + m_uiMindRendTimer -=uiDiff; - if (Fear_Timer < diff) + if (m_uiFearTimer < uiDiff) { - if (m_creature->IsNonMeleeSpellCasted(false)) - return; - - DoScriptText(urand(0, 1) ? SAY_FEAR_1 : SAY_FEAR_2, m_creature); + Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1); + if (!pTarget) + pTarget = m_creature->getVictim(); - if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,1)) - DoCastSpellIfCan(target,SPELL_FEAR); - else - DoCastSpellIfCan(m_creature->getVictim(),SPELL_FEAR); - - Fear_Timer = 25000; - }else Fear_Timer -=diff; + if (DoCastSpellIfCan(pTarget, SPELL_FEAR) == CAST_OK) + { + DoScriptText(urand(0, 1) ? SAY_FEAR_1 : SAY_FEAR_2, m_creature); + m_uiFearTimer = 25000; + } + } + else + m_uiFearTimer -=uiDiff; - if (Domination_Timer < diff) + if (m_uiDominationTimer < uiDiff) { - if (m_creature->IsNonMeleeSpellCasted(false)) - return; - - DoScriptText(urand(0, 1) ? SAY_MIND_1 : SAY_MIND_2, m_creature); - - if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,1)) - DoCastSpellIfCan(target, m_bIsRegularMode ? SPELL_DOMINATION : H_SPELL_DOMINATION); - else - DoCastSpellIfCan(m_creature->getVictim(), m_bIsRegularMode ? SPELL_DOMINATION : H_SPELL_DOMINATION); + Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1); + if (!pTarget) + pTarget = m_creature->getVictim(); - Domination_Timer = urand(16000, 32000); - }else Domination_Timer -=diff; + if (DoCastSpellIfCan(pTarget, m_bIsRegularMode ? SPELL_DOMINATION : SPELL_DOMINATION_H) == CAST_OK) + { + DoScriptText(urand(0, 1) ? SAY_MIND_1 : SAY_MIND_2, m_creature); + m_uiDominationTimer = urand(16000, 32000); + } + } + else + m_uiDominationTimer -=uiDiff; if (!m_bIsRegularMode) { - if (ManaBurn_Timer < diff) + if (m_uiManaBurnTimer < uiDiff) { - if (m_creature->IsNonMeleeSpellCasted(false)) - return; - - if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,1)) - DoCastSpellIfCan(target,H_SPELL_MANA_BURN); + Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1); + if (!pTarget) + pTarget = m_creature->getVictim(); - ManaBurn_Timer = urand(16000, 32000); - }else ManaBurn_Timer -=diff; + if (DoCastSpellIfCan(pTarget, SPELL_MANA_BURN_H) == CAST_OK) + m_uiManaBurnTimer = urand(16000, 32000); + } + else + m_uiManaBurnTimer -=uiDiff; } DoMeleeAttackIfReady(); @@ -252,8 +254,11 @@ CreatureAI* GetAI_boss_harbinger_skyriss(Creature* pCreature) return new boss_harbinger_skyrissAI(pCreature); } -#define SPELL_MIND_REND_IMAGE 36929 -#define H_SPELL_MIND_REND_IMAGE 39021 +enum +{ + SPELL_MIND_REND_IMAGE = 36929, + SPELL_MIND_REND_IMAGE_H = 39021, +}; struct MANGOS_DLL_DECL boss_harbinger_skyriss_illusionAI : public ScriptedAI { @@ -277,15 +282,15 @@ CreatureAI* GetAI_boss_harbinger_skyriss_illusion(Creature* pCreature) void AddSC_boss_harbinger_skyriss() { - Script *newscript; + Script* pNewScript; - newscript = new Script; - newscript->Name = "boss_harbinger_skyriss"; - newscript->GetAI = &GetAI_boss_harbinger_skyriss; - newscript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "boss_harbinger_skyriss"; + pNewScript->GetAI = &GetAI_boss_harbinger_skyriss; + pNewScript->RegisterSelf(); - newscript = new Script; - newscript->Name = "boss_harbinger_skyriss_illusion"; - newscript->GetAI = &GetAI_boss_harbinger_skyriss_illusion; - newscript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "boss_harbinger_skyriss_illusion"; + pNewScript->GetAI = &GetAI_boss_harbinger_skyriss_illusion; + pNewScript->RegisterSelf(); } diff --git a/scripts/outland/tempest_keep/arcatraz/instance_arcatraz.cpp b/scripts/outland/tempest_keep/arcatraz/instance_arcatraz.cpp index ca413c247..8206b1390 100644 --- a/scripts/outland/tempest_keep/arcatraz/instance_arcatraz.cpp +++ b/scripts/outland/tempest_keep/arcatraz/instance_arcatraz.cpp @@ -181,9 +181,9 @@ struct MANGOS_DLL_DECL instance_arcatraz : public ScriptedInstance { switch(uiData) { - case DATA_MELLICHAR: + case NPC_MELLICHAR: return m_uiMellicharGUID; - case DATA_SPHERE_SHIELD: + case GO_SEAL_SPHERE: return m_uiGoSphereGUID; } return 0; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 7ba175274..d975b0abf 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2122" + #define SD2_REVISION_NR "2123" #endif // __SD2_REVISION_NR_H__ From e73d78783b8b4a705cbdf13bd92a433cc82eda35 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Thu, 19 May 2011 09:56:00 +0200 Subject: [PATCH 0103/1172] [2124] Cleanup instance gruuls lair --- .../gruuls_lair/boss_high_king_maulgar.cpp | 10 +- scripts/outland/gruuls_lair/gruuls_lair.h | 41 +++- .../gruuls_lair/instance_gruuls_lair.cpp | 222 +++++++++--------- sd2_revision_nr.h | 2 +- 4 files changed, 147 insertions(+), 128 deletions(-) diff --git a/scripts/outland/gruuls_lair/boss_high_king_maulgar.cpp b/scripts/outland/gruuls_lair/boss_high_king_maulgar.cpp index 4c10bf661..5b052761d 100644 --- a/scripts/outland/gruuls_lair/boss_high_king_maulgar.cpp +++ b/scripts/outland/gruuls_lair/boss_high_king_maulgar.cpp @@ -165,10 +165,10 @@ struct MANGOS_DLL_DECL boss_high_king_maulgarAI : public ScriptedAI return; //get council member's guid to respawn them if needed - m_auiCouncil[0] = m_pInstance->GetData64(DATA_KIGGLER); - m_auiCouncil[1] = m_pInstance->GetData64(DATA_BLINDEYE); - m_auiCouncil[2] = m_pInstance->GetData64(DATA_OLM); - m_auiCouncil[3] = m_pInstance->GetData64(DATA_KROSH); + m_auiCouncil[0] = m_pInstance->GetData64(NPC_KIGGLER); + m_auiCouncil[1] = m_pInstance->GetData64(NPC_BLINDEYE); + m_auiCouncil[2] = m_pInstance->GetData64(NPC_OLM); + m_auiCouncil[3] = m_pInstance->GetData64(NPC_KROSH); } void EventCouncilDeath() @@ -286,7 +286,7 @@ struct MANGOS_DLL_DECL Council_Base_AI : public ScriptedAI if (!m_pInstance) return; - Creature* pMaulgar = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(DATA_MAULGAR)); + Creature* pMaulgar = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(NPC_MAULGAR)); if (pMaulgar->isAlive()) { diff --git a/scripts/outland/gruuls_lair/gruuls_lair.h b/scripts/outland/gruuls_lair/gruuls_lair.h index eeb02d5f7..e6dd70243 100644 --- a/scripts/outland/gruuls_lair/gruuls_lair.h +++ b/scripts/outland/gruuls_lair/gruuls_lair.h @@ -17,11 +17,42 @@ enum GO_PORT_GRONN_2 = 184662, // NPC GUIDs - DATA_MAULGAR = 3, - DATA_BLINDEYE = 4, - DATA_KIGGLER = 5, - DATA_KROSH = 6, - DATA_OLM = 7 + NPC_MAULGAR = 18831, + NPC_BLINDEYE = 18836, + NPC_KIGGLER = 18835, + NPC_KROSH = 18832, + NPC_OLM = 18834, +}; + +struct MANGOS_DLL_DECL instance_gruuls_lair : public ScriptedInstance +{ + public: + instance_gruuls_lair(Map *pMap); + + void Initialize(); + bool IsEncounterInProgress() const; + + void OnCreatureCreate(Creature* pCreature); + void OnObjectCreate(GameObject* pGo); + + void SetData(uint32 uiType, uint32 uiData); + uint32 GetData(uint32 uiType); + uint64 GetData64(uint32 uiData); + + const char* Save() { return m_strSaveData.c_str(); } + void Load(const char* chrIn); + + private: + uint32 m_auiEncounter[MAX_ENCOUNTER]; + std::string m_strSaveData; + + uint64 m_uiMaulgarGUID; + uint64 m_uiKigglerGUID; + uint64 m_uiBlindeyeGUID; + uint64 m_uiOlmGUID; + uint64 m_uiKroshGUID; + uint64 m_uiMaulgarDoorGUID; + uint64 m_uiGruulEncounterDoorGUID; }; #endif diff --git a/scripts/outland/gruuls_lair/instance_gruuls_lair.cpp b/scripts/outland/gruuls_lair/instance_gruuls_lair.cpp index ddc614e1c..50ab57e8d 100644 --- a/scripts/outland/gruuls_lair/instance_gruuls_lair.cpp +++ b/scripts/outland/gruuls_lair/instance_gruuls_lair.cpp @@ -29,149 +29,136 @@ EndScriptData */ 2 - Gruul event */ -struct MANGOS_DLL_DECL instance_gruuls_lair : public ScriptedInstance +instance_gruuls_lair::instance_gruuls_lair(Map *pMap) : ScriptedInstance(pMap), + m_uiMaulgarGUID(0), + m_uiKigglerGUID(0), + m_uiBlindeyeGUID(0), + m_uiOlmGUID(0), + m_uiKroshGUID(0), + + m_uiMaulgarDoorGUID(0), + m_uiGruulEncounterDoorGUID(0) { - instance_gruuls_lair(Map *pMap) : ScriptedInstance(pMap) {Initialize();} - - uint32 m_auiEncounter[MAX_ENCOUNTER]; - std::string strSaveData; - - uint64 m_uiMaulgarGUID; - uint64 m_uiKigglerGUID; - uint64 m_uiBlindeyeGUID; - uint64 m_uiOlmGUID; - uint64 m_uiKroshGUID; - uint64 m_uiMaulgarDoorGUID; - uint64 m_uiGruulEncounterDoorGUID; + Initialize(); +} - void Initialize() - { - memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); +void instance_gruuls_lair::Initialize() +{ + memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); +} - m_uiMaulgarGUID = 0; - m_uiKigglerGUID = 0; - m_uiBlindeyeGUID = 0; - m_uiOlmGUID = 0; - m_uiKroshGUID = 0; +bool instance_gruuls_lair::IsEncounterInProgress() const +{ + for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) + if (m_auiEncounter[i] == IN_PROGRESS) + return true; - m_uiMaulgarDoorGUID = 0; - m_uiGruulEncounterDoorGUID = 0; - } + return false; +} - bool IsEncounterInProgress() const +void instance_gruuls_lair::OnCreatureCreate(Creature* pCreature) +{ + switch (pCreature->GetEntry()) { - for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) - if (m_auiEncounter[i] == IN_PROGRESS) - return true; - - return false; + case NPC_MAULGAR: m_uiMaulgarGUID = pCreature->GetGUID(); break; + case NPC_KROSH: m_uiKroshGUID = pCreature->GetGUID(); break; + case NPC_OLM: m_uiOlmGUID = pCreature->GetGUID(); break; + case NPC_KIGGLER: m_uiKigglerGUID = pCreature->GetGUID(); break; + case NPC_BLINDEYE: m_uiBlindeyeGUID = pCreature->GetGUID(); break; } +} - void OnCreatureCreate(Creature* pCreature) +void instance_gruuls_lair::OnObjectCreate(GameObject* pGo) +{ + switch (pGo->GetEntry()) { - switch (pCreature->GetEntry()) - { - case 18831: m_uiMaulgarGUID = pCreature->GetGUID(); break; - case 18832: m_uiKroshGUID = pCreature->GetGUID(); break; - case 18834: m_uiOlmGUID = pCreature->GetGUID(); break; - case 18835: m_uiKigglerGUID = pCreature->GetGUID(); break; - case 18836: m_uiBlindeyeGUID = pCreature->GetGUID(); break; - } + case GO_PORT_GRONN_1: + m_uiMaulgarDoorGUID = pGo->GetGUID(); + if (m_auiEncounter[0] == DONE) + pGo->SetGoState(GO_STATE_ACTIVE); + break; + case GO_PORT_GRONN_2: + m_uiGruulEncounterDoorGUID = pGo->GetGUID(); + break; } +} - void OnObjectCreate(GameObject* pGo) +void instance_gruuls_lair::SetData(uint32 uiType, uint32 uiData) +{ + switch (uiType) { - switch (pGo->GetEntry()) - { - case GO_PORT_GRONN_1: - m_uiMaulgarDoorGUID = pGo->GetGUID(); - if (m_auiEncounter[0] == DONE) - pGo->SetGoState(GO_STATE_ACTIVE); - break; - case GO_PORT_GRONN_2: - m_uiGruulEncounterDoorGUID = pGo->GetGUID(); - break; - } + case TYPE_MAULGAR_EVENT: + if (uiData == DONE) + DoUseDoorOrButton(m_uiMaulgarDoorGUID); + m_auiEncounter[0] = uiData; + break; + case TYPE_GRUUL_EVENT: + DoUseDoorOrButton(m_uiGruulEncounterDoorGUID); + m_auiEncounter[1] = uiData; + break; } - void SetData(uint32 uiType, uint32 uiData) + if (uiData == DONE) { - switch (uiType) - { - case TYPE_MAULGAR_EVENT: - if (uiData == DONE) - DoUseDoorOrButton(m_uiMaulgarDoorGUID); - m_auiEncounter[0] = uiData; - break; - case TYPE_GRUUL_EVENT: - DoUseDoorOrButton(m_uiGruulEncounterDoorGUID); - m_auiEncounter[1] = uiData; - break; - } - - if (uiData == DONE) - { - OUT_SAVE_INST_DATA; - - std::ostringstream saveStream; - saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1]; - - strSaveData = saveStream.str(); - - SaveToDB(); - OUT_SAVE_INST_DATA_COMPLETE; - } - } + OUT_SAVE_INST_DATA; - const char* Save() - { - return strSaveData.c_str(); + std::ostringstream saveStream; + saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1]; + + m_strSaveData = saveStream.str(); + + SaveToDB(); + OUT_SAVE_INST_DATA_COMPLETE; } +} - uint32 GetData(uint32 uiType) +uint32 instance_gruuls_lair::GetData(uint32 uiType) +{ + switch (uiType) { - switch (uiType) - { - case TYPE_MAULGAR_EVENT: return m_auiEncounter[0]; - case TYPE_GRUUL_EVENT: return m_auiEncounter[1]; - } + case TYPE_MAULGAR_EVENT: return m_auiEncounter[0]; + case TYPE_GRUUL_EVENT: return m_auiEncounter[1]; + + default: return 0; } +} - uint64 GetData64(uint32 uiData) +uint64 instance_gruuls_lair::GetData64(uint32 uiData) +{ + switch (uiData) { - switch (uiData) - { - case DATA_MAULGAR: return m_uiMaulgarGUID; - case DATA_BLINDEYE: return m_uiBlindeyeGUID; - case DATA_KIGGLER: return m_uiKigglerGUID; - case DATA_KROSH: return m_uiKroshGUID; - case DATA_OLM: return m_uiOlmGUID; - } - return 0; + case NPC_MAULGAR: return m_uiMaulgarGUID; + case NPC_BLINDEYE: return m_uiBlindeyeGUID; + case NPC_KIGGLER: return m_uiKigglerGUID; + case NPC_KROSH: return m_uiKroshGUID; + case NPC_OLM: return m_uiOlmGUID; + + default: + return 0; } +} - void Load(const char* chrIn) +void instance_gruuls_lair::Load(const char* chrIn) +{ + if (!chrIn) { - if (!chrIn) - { - OUT_LOAD_INST_DATA_FAIL; - return; - } + OUT_LOAD_INST_DATA_FAIL; + return; + } - OUT_LOAD_INST_DATA(chrIn); + OUT_LOAD_INST_DATA(chrIn); - std::istringstream loadStream(chrIn); + std::istringstream loadStream(chrIn); - loadStream >> m_auiEncounter[0] >> m_auiEncounter[1]; + loadStream >> m_auiEncounter[0] >> m_auiEncounter[1]; - for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) - if (m_auiEncounter[i] == IN_PROGRESS) - m_auiEncounter[i] = NOT_STARTED; + for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) + if (m_auiEncounter[i] == IN_PROGRESS) + m_auiEncounter[i] = NOT_STARTED; - OUT_LOAD_INST_DATA_COMPLETE; - } -}; + OUT_LOAD_INST_DATA_COMPLETE; +} InstanceData* GetInstanceData_instance_gruuls_lair(Map* pMap) { @@ -180,9 +167,10 @@ InstanceData* GetInstanceData_instance_gruuls_lair(Map* pMap) void AddSC_instance_gruuls_lair() { - Script *newscript; - newscript = new Script; - newscript->Name = "instance_gruuls_lair"; - newscript->GetInstanceData = &GetInstanceData_instance_gruuls_lair; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "instance_gruuls_lair"; + pNewScript->GetInstanceData = &GetInstanceData_instance_gruuls_lair; + pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index d975b0abf..3af661f92 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2123" + #define SD2_REVISION_NR "2124" #endif // __SD2_REVISION_NR_H__ From 3c7a8ef3d4dd3de6c94fd96511cfe07c3be05e0a Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Thu, 19 May 2011 10:34:33 +0200 Subject: [PATCH 0104/1172] [2125] Cleanup in coilfang_reservoir steam_vault * Move to header based version * Cleanup various coding style related, use DoUseDoorOrButton where possible * Remove likely wrong IsEncounterInProgress use --- .../boss_mekgineer_steamrigger.cpp | 4 +- .../steam_vault/instance_steam_vault.cpp | 220 ++++++++---------- .../steam_vault/steam_vault.h | 52 ++++- sd2_revision_nr.h | 2 +- 4 files changed, 139 insertions(+), 139 deletions(-) diff --git a/scripts/outland/coilfang_reservoir/steam_vault/boss_mekgineer_steamrigger.cpp b/scripts/outland/coilfang_reservoir/steam_vault/boss_mekgineer_steamrigger.cpp index efc6e6789..49b20eff3 100644 --- a/scripts/outland/coilfang_reservoir/steam_vault/boss_mekgineer_steamrigger.cpp +++ b/scripts/outland/coilfang_reservoir/steam_vault/boss_mekgineer_steamrigger.cpp @@ -226,9 +226,9 @@ struct MANGOS_DLL_DECL mob_steamrigger_mechanicAI : public ScriptedAI { if (Repair_Timer < diff) { - if (m_pInstance && m_pInstance->GetData64(DATA_MEKGINEERSTEAMRIGGER) && m_pInstance->GetData(TYPE_MEKGINEER_STEAMRIGGER) == IN_PROGRESS) + if (m_pInstance && m_pInstance->GetData64(NPC_STEAMRIGGER) && m_pInstance->GetData(TYPE_MEKGINEER_STEAMRIGGER) == IN_PROGRESS) { - if (Creature* pMekgineer = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(DATA_MEKGINEERSTEAMRIGGER))) + if (Creature* pMekgineer = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(NPC_STEAMRIGGER))) { if (m_creature->IsWithinDistInMap(pMekgineer, MAX_REPAIR_RANGE)) { diff --git a/scripts/outland/coilfang_reservoir/steam_vault/instance_steam_vault.cpp b/scripts/outland/coilfang_reservoir/steam_vault/instance_steam_vault.cpp index b43b484b7..76b83d8a3 100644 --- a/scripts/outland/coilfang_reservoir/steam_vault/instance_steam_vault.cpp +++ b/scripts/outland/coilfang_reservoir/steam_vault/instance_steam_vault.cpp @@ -24,11 +24,6 @@ EndScriptData */ #include "precompiled.h" #include "steam_vault.h" -#define MAX_ENCOUNTER 4 - -#define MAIN_CHAMBERS_DOOR 183049 -#define ACCESS_PANEL_HYDRO 184125 -#define ACCESS_PANEL_MEK 184126 /* Steam Vaults encounters: 1 - Hydromancer Thespia Event @@ -43,145 +38,114 @@ bool GOUse_go_main_chambers_access_panel(Player* pPlayer, GameObject* pGo) if (!pInstance) return false; - if (pGo->GetEntry() == ACCESS_PANEL_HYDRO && pInstance->GetData(TYPE_HYDROMANCER_THESPIA) == DONE) - pInstance->SetData(TYPE_HYDROMANCER_THESPIA,SPECIAL); + if (pGo->GetEntry() == GO_ACCESS_PANEL_HYDRO && pInstance->GetData(TYPE_HYDROMANCER_THESPIA) == DONE) + pInstance->SetData(TYPE_HYDROMANCER_THESPIA, SPECIAL); - if (pGo->GetEntry() == ACCESS_PANEL_MEK && pInstance->GetData(TYPE_MEKGINEER_STEAMRIGGER) == DONE) - pInstance->SetData(TYPE_MEKGINEER_STEAMRIGGER,SPECIAL); + if (pGo->GetEntry() == GO_ACCESS_PANEL_MEK && pInstance->GetData(TYPE_MEKGINEER_STEAMRIGGER) == DONE) + pInstance->SetData(TYPE_MEKGINEER_STEAMRIGGER, SPECIAL); return true; } -struct MANGOS_DLL_DECL instance_steam_vault : public ScriptedInstance +instance_steam_vault::instance_steam_vault(Map* pMap) : ScriptedInstance(pMap), + m_uiThespiaGUID(0), + m_uiMekgineerGUID(0), + m_uiKalithreshGUID(0), + m_uiMainChambersDoor(0), + m_uiAccessPanelHydro(0), + m_uiAccessPanelMek(0) { - instance_steam_vault(Map* pMap) : ScriptedInstance(pMap) {Initialize();}; - - uint32 m_auiEncounter[MAX_ENCOUNTER]; - - uint64 m_uiThespiaGUID; - uint64 m_uiMekgineerGUID; - uint64 m_uiKalithreshGUID; + Initialize(); +} - uint64 m_uiMainChambersDoor; - uint64 m_uiAccessPanelHydro; - uint64 m_uiAccessPanelMek; +void instance_steam_vault::Initialize() +{ + memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); +} - void Initialize() +void instance_steam_vault::OnCreatureCreate(Creature* pCreature) +{ + switch(pCreature->GetEntry()) { - memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); - - m_uiThespiaGUID = 0; - m_uiMekgineerGUID = 0; - m_uiKalithreshGUID = 0; - m_uiMainChambersDoor = 0; - m_uiAccessPanelHydro = 0; - m_uiAccessPanelMek = 0; + case NPC_THESPIA: m_uiThespiaGUID = pCreature->GetGUID(); break; + case NPC_STEAMRIGGER: m_uiMekgineerGUID = pCreature->GetGUID(); break; + case NPC_KALITRESH: m_uiKalithreshGUID = pCreature->GetGUID(); break; } +} - bool IsEncounterInProgress() const +void instance_steam_vault::OnObjectCreate(GameObject* pGo) +{ + switch(pGo->GetEntry()) { - for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) - if (m_auiEncounter[i] == IN_PROGRESS) - return true; - - return false; + case GO_MAIN_CHAMBERS_DOOR: m_uiMainChambersDoor = pGo->GetGUID(); break; + case GO_ACCESS_PANEL_HYDRO: m_uiAccessPanelHydro = pGo->GetGUID(); break; + case GO_ACCESS_PANEL_MEK: m_uiAccessPanelMek = pGo->GetGUID(); break; } +} - void OnCreatureCreate(Creature* pCreature) +void instance_steam_vault::SetData(uint32 uiType, uint32 uiData) +{ + switch (uiType) { - switch(pCreature->GetEntry()) - { - case 17797: m_uiThespiaGUID = pCreature->GetGUID(); break; - case 17796: m_uiMekgineerGUID = pCreature->GetGUID(); break; - case 17798: m_uiKalithreshGUID = pCreature->GetGUID(); break; - } - } + case TYPE_HYDROMANCER_THESPIA: + if (uiData == SPECIAL) + { + DoUseDoorOrButton(m_uiAccessPanelHydro); + + if (GetData(TYPE_MEKGINEER_STEAMRIGGER) == SPECIAL) + DoUseDoorOrButton(m_uiMainChambersDoor); + + debug_log("SD2: Instance Steamvault: Access panel used."); + } + m_auiEncounter[0] = uiData; + break; + case TYPE_MEKGINEER_STEAMRIGGER: + if (uiData == SPECIAL) + { + DoUseDoorOrButton(m_uiAccessPanelMek); + + if (GetData(TYPE_HYDROMANCER_THESPIA) == SPECIAL) + DoUseDoorOrButton(m_uiMainChambersDoor); - void OnObjectCreate(GameObject* pGo) - { - switch(pGo->GetEntry()) - { - case MAIN_CHAMBERS_DOOR: m_uiMainChambersDoor = pGo->GetGUID(); break; - case ACCESS_PANEL_HYDRO: m_uiAccessPanelHydro = pGo->GetGUID(); break; - case ACCESS_PANEL_MEK: m_uiAccessPanelMek = pGo->GetGUID(); break; - } + debug_log("SD2: Instance Steamvault: Access panel used."); + } + m_auiEncounter[1] = uiData; + break; + case TYPE_WARLORD_KALITHRESH: + m_auiEncounter[2] = uiData; + break; + case TYPE_DISTILLER: + m_auiEncounter[3] = uiData; + break; } +} - void SetData(uint32 type, uint32 data) +uint32 instance_steam_vault::GetData(uint32 uiType) +{ + switch(uiType) { - switch(type) - { - case TYPE_HYDROMANCER_THESPIA: - if (data == SPECIAL) - { - if (GameObject* pGo = instance->GetGameObject(m_uiAccessPanelHydro)) - pGo->SetGoState(GO_STATE_ACTIVE); - - if (GetData(TYPE_MEKGINEER_STEAMRIGGER) == SPECIAL) - { - if (GameObject* pGo = instance->GetGameObject(m_uiMainChambersDoor)) - pGo->SetGoState(GO_STATE_ACTIVE); - } - - debug_log("SD2: Instance Steamvault: Access panel used."); - } - m_auiEncounter[0] = data; - break; - case TYPE_MEKGINEER_STEAMRIGGER: - if (data == SPECIAL) - { - if (GameObject* pGo = instance->GetGameObject(m_uiAccessPanelMek)) - pGo->SetGoState(GO_STATE_ACTIVE); - - if (GetData(TYPE_HYDROMANCER_THESPIA) == SPECIAL) - { - if (GameObject* pGo = instance->GetGameObject(m_uiMainChambersDoor)) - pGo->SetGoState(GO_STATE_ACTIVE); - } + case TYPE_HYDROMANCER_THESPIA: return m_auiEncounter[0]; + case TYPE_MEKGINEER_STEAMRIGGER: return m_auiEncounter[1]; + case TYPE_WARLORD_KALITHRESH: return m_auiEncounter[2]; + case TYPE_DISTILLER: return m_auiEncounter[3]; - debug_log("SD2: Instance Steamvault: Access panel used."); - } - m_auiEncounter[1] = data; - break; - case TYPE_WARLORD_KALITHRESH: - m_auiEncounter[2] = data; - break; - case TYPE_DISTILLER: - m_auiEncounter[3] = data; - break; - } + default: + return 0; } +} - uint32 GetData(uint32 type) +uint64 instance_steam_vault::GetData64(uint32 uiType) +{ + switch (uiType) { - switch(type) - { - case TYPE_HYDROMANCER_THESPIA: - return m_auiEncounter[0]; - case TYPE_MEKGINEER_STEAMRIGGER: - return m_auiEncounter[1]; - case TYPE_WARLORD_KALITHRESH: - return m_auiEncounter[2]; - case TYPE_DISTILLER: - return m_auiEncounter[3]; - } - return 0; - } + case NPC_THESPIA: return m_uiThespiaGUID; + case NPC_STEAMRIGGER: return m_uiMekgineerGUID; + case NPC_KALITRESH: return m_uiKalithreshGUID; - uint64 GetData64(uint32 data) - { - switch(data) - { - case DATA_THESPIA: - return m_uiThespiaGUID; - case DATA_MEKGINEERSTEAMRIGGER: - return m_uiMekgineerGUID; - case DATA_KALITRESH: - return m_uiKalithreshGUID; - } - return 0; + default: + return 0; } -}; +} InstanceData* GetInstanceData_instance_steam_vault(Map* pMap) { @@ -190,15 +154,15 @@ InstanceData* GetInstanceData_instance_steam_vault(Map* pMap) void AddSC_instance_steam_vault() { - Script *newscript; + Script* pNewScript; - newscript = new Script; - newscript->Name = "go_main_chambers_access_panel"; - newscript->pGOUse = &GOUse_go_main_chambers_access_panel; - newscript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "go_main_chambers_access_panel"; + pNewScript->pGOUse = &GOUse_go_main_chambers_access_panel; + pNewScript->RegisterSelf(); - newscript = new Script; - newscript->Name = "instance_steam_vault"; - newscript->GetInstanceData = &GetInstanceData_instance_steam_vault; - newscript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "instance_steam_vault"; + pNewScript->GetInstanceData = &GetInstanceData_instance_steam_vault; + pNewScript->RegisterSelf(); } diff --git a/scripts/outland/coilfang_reservoir/steam_vault/steam_vault.h b/scripts/outland/coilfang_reservoir/steam_vault/steam_vault.h index 12deaa010..b0c878057 100644 --- a/scripts/outland/coilfang_reservoir/steam_vault/steam_vault.h +++ b/scripts/outland/coilfang_reservoir/steam_vault/steam_vault.h @@ -5,12 +5,48 @@ #ifndef DEF_STEAM_VAULT_H #define DEF_STEAM_VAULT_H -#define TYPE_HYDROMANCER_THESPIA 1 -#define TYPE_MEKGINEER_STEAMRIGGER 2 -#define TYPE_WARLORD_KALITHRESH 3 -#define TYPE_DISTILLER 4 - -#define DATA_MEKGINEERSTEAMRIGGER 5 -#define DATA_KALITRESH 6 -#define DATA_THESPIA 7 +enum +{ + MAX_ENCOUNTER = 4, + + TYPE_HYDROMANCER_THESPIA = 1, + TYPE_MEKGINEER_STEAMRIGGER = 2, + TYPE_WARLORD_KALITHRESH = 3, + TYPE_DISTILLER = 4, + + NPC_STEAMRIGGER = 17796, + NPC_KALITRESH = 17798, + NPC_THESPIA = 17797, + + GO_MAIN_CHAMBERS_DOOR = 183049, + GO_ACCESS_PANEL_HYDRO = 184125, + GO_ACCESS_PANEL_MEK = 184126, +}; + +class MANGOS_DLL_DECL instance_steam_vault : public ScriptedInstance +{ + public: + instance_steam_vault(Map* pMap); + + void Initialize(); + + void OnCreatureCreate(Creature* pCreature); + void OnObjectCreate(GameObject* pGo); + + void SetData(uint32 uiType, uint32 uiData); + uint32 GetData(uint32 uiType); + uint64 GetData64(uint32 uiType); + + private: + uint32 m_auiEncounter[MAX_ENCOUNTER]; + + uint64 m_uiThespiaGUID; + uint64 m_uiMekgineerGUID; + uint64 m_uiKalithreshGUID; + + uint64 m_uiMainChambersDoor; + uint64 m_uiAccessPanelHydro; + uint64 m_uiAccessPanelMek; +}; + #endif diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 3af661f92..4d67391e0 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2124" + #define SD2_REVISION_NR "2125" #endif // __SD2_REVISION_NR_H__ From 276671235f8acf221799947ad81c1805d226d121 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Thu, 19 May 2011 12:31:06 +0200 Subject: [PATCH 0105/1172] [2126] Cleanup SSC instance scripts * Move to header based instance script * Some coding style related changes * Add Save and Load support * Change fathomlord karathress advisor handling, the advisors now identify themselves with their entry, instead an additional type --- .../boss_fathomlord_karathress.cpp | 48 +-- .../serpent_shrine/boss_lady_vashj.cpp | 6 +- .../instance_serpent_shrine.cpp | 277 +++++++++--------- .../serpent_shrine/serpent_shrine.h | 57 +++- sd2_revision_nr.h | 2 +- 5 files changed, 204 insertions(+), 186 deletions(-) diff --git a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_fathomlord_karathress.cpp b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_fathomlord_karathress.cpp index 44bdb9fc0..b9eca0eca 100644 --- a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_fathomlord_karathress.cpp +++ b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_fathomlord_karathress.cpp @@ -117,7 +117,7 @@ struct MANGOS_DLL_DECL boss_fathomlord_karathressAI : public ScriptedAI // TODO - unneeded workaround - the spell should be cast by adviser onto karathress; text can also be handled in their AI // select the spell and the text based on the advisor which died - void EventAdvisorDeath(uint8 uiAdvisor) + void EventAdvisorDeath(uint32 uiAdvisor) { if (!m_creature->isAlive()) return; @@ -127,15 +127,15 @@ struct MANGOS_DLL_DECL boss_fathomlord_karathressAI : public ScriptedAI switch(uiAdvisor) { - case DATA_SHARKKIS: + case NPC_SHARKKIS: iSayGainAbility = SAY_GAIN_ABILITY1; uiSpell = SPELL_POWER_OF_SHARKKIS; break; - case DATA_TIDALVESS: + case NPC_TIDALVESS: iSayGainAbility = SAY_GAIN_ABILITY2; uiSpell = SPELL_POWER_OF_TIDALVESS; break; - case DATA_CARIBDIS: + case NPC_CARIBDIS: iSayGainAbility = SAY_GAIN_ABILITY3; uiSpell = SPELL_POWER_OF_CARIBDIS; break; @@ -153,9 +153,9 @@ struct MANGOS_DLL_DECL boss_fathomlord_karathressAI : public ScriptedAI if (!m_pInstance) return; - m_auiAdvisorsGUID[0] = m_pInstance->GetData64(DATA_SHARKKIS); - m_auiAdvisorsGUID[1] = m_pInstance->GetData64(DATA_TIDALVESS); - m_auiAdvisorsGUID[2] = m_pInstance->GetData64(DATA_CARIBDIS); + m_auiAdvisorsGUID[0] = m_pInstance->GetData64(NPC_SHARKKIS); + m_auiAdvisorsGUID[1] = m_pInstance->GetData64(NPC_TIDALVESS); + m_auiAdvisorsGUID[2] = m_pInstance->GetData64(NPC_CARIBDIS); } void Aggro(Unit* pWho) @@ -279,11 +279,7 @@ struct MANGOS_DLL_DECL Advisor_Base_AI : public ScriptedAI m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); } - protected: - uint8 m_uiAdvisor; - - public: - ScriptedInstance* m_pInstance; + ScriptedInstance* m_pInstance; void JustReachedHome() { @@ -308,10 +304,10 @@ struct MANGOS_DLL_DECL Advisor_Base_AI : public ScriptedAI if (!m_pInstance) return; - if (Creature* pKarathress = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(DATA_KARATHRESS))) + if (Creature* pKarathress = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(NPC_KARATHRESS))) { if (boss_fathomlord_karathressAI* pKaraAI = dynamic_cast(pKarathress->AI())) - pKaraAI->EventAdvisorDeath(m_uiAdvisor); + pKaraAI->EventAdvisorDeath(m_creature->GetEntry()); } } }; @@ -319,11 +315,7 @@ struct MANGOS_DLL_DECL Advisor_Base_AI : public ScriptedAI //Fathom-Guard Sharkkis AI struct MANGOS_DLL_DECL boss_fathomguard_sharkkisAI : public Advisor_Base_AI { - boss_fathomguard_sharkkisAI(Creature* pCreature) : Advisor_Base_AI(pCreature) - { - Reset(); - m_uiAdvisor = DATA_SHARKKIS; - } + boss_fathomguard_sharkkisAI(Creature* pCreature) : Advisor_Base_AI(pCreature) { Reset(); } // timers uint32 m_uiHurlTridentTimer; @@ -446,11 +438,7 @@ struct MANGOS_DLL_DECL boss_fathomguard_sharkkisAI : public Advisor_Base_AI //Fathom-Guard Tidalvess AI struct MANGOS_DLL_DECL boss_fathomguard_tidalvessAI : public Advisor_Base_AI { - boss_fathomguard_tidalvessAI(Creature* pCreature) : Advisor_Base_AI(pCreature) - { - Reset(); - m_uiAdvisor = DATA_TIDALVESS; - } + boss_fathomguard_tidalvessAI(Creature* pCreature) : Advisor_Base_AI(pCreature) { Reset(); } // timers uint32 m_uiFrostShockTimer; @@ -497,11 +485,7 @@ struct MANGOS_DLL_DECL boss_fathomguard_tidalvessAI : public Advisor_Base_AI //Fathom-Guard Caribdis AI struct MANGOS_DLL_DECL boss_fathomguard_caribdisAI : public Advisor_Base_AI { - boss_fathomguard_caribdisAI(Creature* pCreature) : Advisor_Base_AI(pCreature) - { - Reset(); - m_uiAdvisor = DATA_CARIBDIS; - } + boss_fathomguard_caribdisAI(Creature* pCreature) : Advisor_Base_AI(pCreature) { Reset(); } // timers uint32 m_uiWaterBoltVolleyTimer; @@ -564,9 +548,9 @@ struct MANGOS_DLL_DECL boss_fathomguard_caribdisAI : public Advisor_Base_AI { switch(urand(0, 3)) { - case 0: pUnit = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(DATA_KARATHRESS)); break; - case 1: pUnit = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(DATA_SHARKKIS)); break; - case 2: pUnit = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(DATA_TIDALVESS)); break; + case 0: pUnit = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(NPC_KARATHRESS)); break; + case 1: pUnit = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(NPC_SHARKKIS)); break; + case 2: pUnit = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(NPC_TIDALVESS)); break; case 3: pUnit = m_creature; break; } } diff --git a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_lady_vashj.cpp b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_lady_vashj.cpp index 563a3e9e9..e7d3d4d45 100644 --- a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_lady_vashj.cpp +++ b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_lady_vashj.cpp @@ -507,7 +507,7 @@ struct MANGOS_DLL_DECL mob_enchanted_elementalAI : public ScriptedAI { if (m_pInstance) { - if (Creature* pVashj = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(DATA_LADYVASHJ))) + if (Creature* pVashj = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(NPC_LADYVASHJ))) { if (pVashj->IsWithinDistInMap(m_creature, INTERACTION_DISTANCE)) { @@ -607,7 +607,7 @@ struct MANGOS_DLL_DECL mob_toxic_sporebatAI : public ScriptedAI if (m_pInstance) { //check if vashj is death - Creature* pVashj = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(DATA_LADYVASHJ)); + Creature* pVashj = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(NPC_LADYVASHJ)); if (!pVashj || !pVashj->isAlive()) { //remove @@ -657,7 +657,7 @@ bool ItemUse_item_tainted_core(Player* pPlayer, Item* pItem, SpellCastTargets co return true; } - Creature* pVashj = pPlayer->GetMap()->GetCreature(pInstance->GetData64(DATA_LADYVASHJ)); + Creature* pVashj = pPlayer->GetMap()->GetCreature(pInstance->GetData64(NPC_LADYVASHJ)); if (!pVashj) return true; diff --git a/scripts/outland/coilfang_reservoir/serpent_shrine/instance_serpent_shrine.cpp b/scripts/outland/coilfang_reservoir/serpent_shrine/instance_serpent_shrine.cpp index 3e999f336..eb9b11b6d 100644 --- a/scripts/outland/coilfang_reservoir/serpent_shrine/instance_serpent_shrine.cpp +++ b/scripts/outland/coilfang_reservoir/serpent_shrine/instance_serpent_shrine.cpp @@ -33,168 +33,166 @@ EndScriptData */ 5 - Lady Vashj Event */ -const int MAX_ENCOUNTER = 6; -const int MAX_GENERATOR = 4; - -struct MANGOS_DLL_DECL instance_serpentshrine_cavern : public ScriptedInstance +instance_serpentshrine_cavern::instance_serpentshrine_cavern(Map* pMap) : ScriptedInstance(pMap), + m_uiSharkkis(0), + m_uiTidalvess(0), + m_uiCaribdis(0), + m_uiLadyVashj(0), + m_uiKarathress(0), + m_uiKarathressEvent_Starter(0) { - instance_serpentshrine_cavern(Map* pMap) : ScriptedInstance(pMap) { Initialize(); }; - - uint64 m_uiSharkkis; - uint64 m_uiTidalvess; - uint64 m_uiCaribdis; - uint64 m_uiLadyVashj; - uint64 m_uiKarathress; - uint64 m_uiKarathressEvent_Starter; + Initialize(); +} - uint32 m_auiShieldGenerator[MAX_GENERATOR]; - uint32 m_auiEncounter[MAX_ENCOUNTER]; +void instance_serpentshrine_cavern::Initialize() +{ + memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); + memset(&m_auiShieldGenerator, 0, sizeof(m_auiShieldGenerator)); +} - void Initialize() +bool instance_serpentshrine_cavern::IsEncounterInProgress() const +{ + for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) { - memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); - memset(&m_auiShieldGenerator, 0, sizeof(m_auiShieldGenerator)); - - m_uiSharkkis = 0; - m_uiTidalvess = 0; - m_uiCaribdis = 0; - m_uiLadyVashj = 0; - m_uiKarathress = 0; - m_uiKarathressEvent_Starter = 0; + if (m_auiEncounter[i] == IN_PROGRESS) + return true; } - bool IsEncounterInProgress() const - { - for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) - if (m_auiEncounter[i] == IN_PROGRESS) - return true; - - return false; - } + return false; +} - void OnCreatureCreate(Creature* pCreature) +void instance_serpentshrine_cavern::OnCreatureCreate(Creature* pCreature) +{ + switch (pCreature->GetEntry()) { - switch(pCreature->GetEntry()) - { - case 21212: m_uiLadyVashj = pCreature->GetGUID(); break; - case 21214: m_uiKarathress = pCreature->GetGUID(); break; - case 21966: m_uiSharkkis = pCreature->GetGUID(); break; - case 21965: m_uiTidalvess = pCreature->GetGUID(); break; - case 21964: m_uiCaribdis = pCreature->GetGUID(); break; - } + case NPC_LADYVASHJ: m_uiLadyVashj = pCreature->GetGUID(); break; + case NPC_KARATHRESS: m_uiKarathress = pCreature->GetGUID(); break; + case NPC_SHARKKIS: m_uiSharkkis = pCreature->GetGUID(); break; + case NPC_TIDALVESS: m_uiTidalvess = pCreature->GetGUID(); break; + case NPC_CARIBDIS: m_uiCaribdis = pCreature->GetGUID(); break; } +} - void SetData64(uint32 uiType, uint64 uiData) - { - if (uiType == DATA_KARATHRESS_STARTER) - m_uiKarathressEvent_Starter = uiData; - } +void instance_serpentshrine_cavern::SetData64(uint32 uiType, uint64 uiData) +{ + if (uiType == DATA_KARATHRESS_STARTER) + m_uiKarathressEvent_Starter = uiData; +} - uint64 GetData64(uint32 uiIdentifier) +uint64 instance_serpentshrine_cavern::GetData64(uint32 uiData) +{ + switch (uiData) { - switch(uiIdentifier) - { - case DATA_SHARKKIS: - return m_uiSharkkis; - case DATA_TIDALVESS: - return m_uiTidalvess; - case DATA_CARIBDIS: - return m_uiCaribdis; - case DATA_LADYVASHJ: - return m_uiLadyVashj; - case DATA_KARATHRESS: - return m_uiKarathress; - case DATA_KARATHRESS_STARTER: - return m_uiKarathressEvent_Starter; - } - return 0; + case NPC_SHARKKIS: return m_uiSharkkis; + case NPC_TIDALVESS: return m_uiTidalvess; + case NPC_CARIBDIS: return m_uiCaribdis; + case NPC_LADYVASHJ: return m_uiLadyVashj; + case NPC_KARATHRESS: return m_uiKarathress; + case DATA_KARATHRESS_STARTER: return m_uiKarathressEvent_Starter; + + default: + return 0; } +} - void SetData(uint32 uiType, uint32 uiData) +void instance_serpentshrine_cavern::SetData(uint32 uiType, uint32 uiData) +{ + switch (uiType) { - switch(uiType) - { - case TYPE_HYDROSS_EVENT: - m_auiEncounter[0] = uiData; - break; - case TYPE_LEOTHERAS_EVENT: - m_auiEncounter[1] = uiData; - break; - case TYPE_THELURKER_EVENT: - m_auiEncounter[2] = uiData; - break; - case TYPE_KARATHRESS_EVENT: - m_auiEncounter[3] = uiData; - break; - case TYPE_MOROGRIM_EVENT: - m_auiEncounter[4] = uiData; - break; - case TYPE_LADYVASHJ_EVENT: - if (uiData == NOT_STARTED) - memset(&m_auiShieldGenerator, 0, sizeof(m_auiShieldGenerator)); - m_auiEncounter[5] = uiData; - break; - case TYPE_SHIELDGENERATOR1: - m_auiShieldGenerator[0] = uiData; - break; - case TYPE_SHIELDGENERATOR2: - m_auiShieldGenerator[1] = uiData; - break; - case TYPE_SHIELDGENERATOR3: - m_auiShieldGenerator[2] = uiData; - break; - case TYPE_SHIELDGENERATOR4: - m_auiShieldGenerator[3] = uiData; - break; - } + case TYPE_HYDROSS_EVENT: + m_auiEncounter[0] = uiData; + break; + case TYPE_LEOTHERAS_EVENT: + m_auiEncounter[1] = uiData; + break; + case TYPE_THELURKER_EVENT: + m_auiEncounter[2] = uiData; + break; + case TYPE_KARATHRESS_EVENT: + m_auiEncounter[3] = uiData; + break; + case TYPE_MOROGRIM_EVENT: + m_auiEncounter[4] = uiData; + break; + case TYPE_LADYVASHJ_EVENT: + if (uiData == NOT_STARTED) + memset(&m_auiShieldGenerator, 0, sizeof(m_auiShieldGenerator)); + m_auiEncounter[5] = uiData; + break; + case TYPE_SHIELDGENERATOR1: + case TYPE_SHIELDGENERATOR2: + case TYPE_SHIELDGENERATOR3: + case TYPE_SHIELDGENERATOR4: + m_auiShieldGenerator[uiType - TYPE_SHIELDGENERATOR1] = uiData; + return; } - uint32 GetData(uint32 uiType) + if (uiData == DONE) { - switch(uiType) - { - case TYPE_HYDROSS_EVENT: - return m_auiEncounter[0]; - - case TYPE_LEOTHERAS_EVENT: - return m_auiEncounter[1]; - - case TYPE_THELURKER_EVENT: - return m_auiEncounter[2]; + OUT_SAVE_INST_DATA; - case TYPE_KARATHRESS_EVENT: - return m_auiEncounter[3]; + std::ostringstream saveStream; + saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2] << " " + << m_auiEncounter[3] << " " << m_auiEncounter[4] << " " << m_auiEncounter[5]; - case TYPE_MOROGRIM_EVENT: - return m_auiEncounter[4]; + m_strInstData = saveStream.str(); - case TYPE_LADYVASHJ_EVENT: - return m_auiEncounter[5]; + SaveToDB(); + OUT_SAVE_INST_DATA_COMPLETE; + } +} - case TYPE_SHIELDGENERATOR1: - return m_auiShieldGenerator[0]; +void instance_serpentshrine_cavern::Load(const char* chrIn) +{ + if (!chrIn) + { + OUT_LOAD_INST_DATA_FAIL; + return; + } - case TYPE_SHIELDGENERATOR2: - return m_auiShieldGenerator[1]; + OUT_LOAD_INST_DATA(chrIn); - case TYPE_SHIELDGENERATOR3: - return m_auiShieldGenerator[2]; + std::istringstream loadStream(chrIn); + loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3] + >> m_auiEncounter[4] >> m_auiEncounter[5]; - case TYPE_SHIELDGENERATOR4: - return m_auiShieldGenerator[3]; + for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) + { + if (m_auiEncounter[i] == IN_PROGRESS) + m_auiEncounter[i] = NOT_STARTED; + } - case TYPE_VASHJ_PHASE3_CHECK: - for(uint8 i = 0; i < MAX_GENERATOR; ++i) - { - if (m_auiShieldGenerator[i] != DONE) - return NOT_STARTED; - } - return DONE; - } + OUT_LOAD_INST_DATA_COMPLETE; +} - return 0; +uint32 instance_serpentshrine_cavern::GetData(uint32 uiType) +{ + switch (uiType) + { + case TYPE_HYDROSS_EVENT: return m_auiEncounter[0]; + case TYPE_LEOTHERAS_EVENT: return m_auiEncounter[1]; + case TYPE_THELURKER_EVENT: return m_auiEncounter[2]; + case TYPE_KARATHRESS_EVENT: return m_auiEncounter[3]; + case TYPE_MOROGRIM_EVENT: return m_auiEncounter[4]; + case TYPE_LADYVASHJ_EVENT: return m_auiEncounter[5]; + + case TYPE_SHIELDGENERATOR1: return m_auiShieldGenerator[0]; + case TYPE_SHIELDGENERATOR2: return m_auiShieldGenerator[1]; + case TYPE_SHIELDGENERATOR3: return m_auiShieldGenerator[2]; + case TYPE_SHIELDGENERATOR4: return m_auiShieldGenerator[3]; + + case TYPE_VASHJ_PHASE3_CHECK: + for(uint8 i = 0; i < MAX_GENERATOR; ++i) + { + if (m_auiShieldGenerator[i] != DONE) + return NOT_STARTED; + } + return DONE; + + default: + return 0; } -}; +} InstanceData* GetInstanceData_instance_serpentshrine_cavern(Map* pMap) { @@ -203,9 +201,10 @@ InstanceData* GetInstanceData_instance_serpentshrine_cavern(Map* pMap) void AddSC_instance_serpentshrine_cavern() { - Script *newscript; - newscript = new Script; - newscript->Name = "instance_serpent_shrine"; - newscript->GetInstanceData = &GetInstanceData_instance_serpentshrine_cavern; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "instance_serpent_shrine"; + pNewScript->GetInstanceData = &GetInstanceData_instance_serpentshrine_cavern; + pNewScript->RegisterSelf(); } diff --git a/scripts/outland/coilfang_reservoir/serpent_shrine/serpent_shrine.h b/scripts/outland/coilfang_reservoir/serpent_shrine/serpent_shrine.h index b7bde5fa3..503d0c410 100644 --- a/scripts/outland/coilfang_reservoir/serpent_shrine/serpent_shrine.h +++ b/scripts/outland/coilfang_reservoir/serpent_shrine/serpent_shrine.h @@ -7,25 +7,60 @@ enum { + MAX_ENCOUNTER = 6, + MAX_GENERATOR = 4, + TYPE_HYDROSS_EVENT = 1, TYPE_KARATHRESS_EVENT = 2, TYPE_LADYVASHJ_EVENT = 3, TYPE_LEOTHERAS_EVENT = 4, TYPE_MOROGRIM_EVENT = 5, TYPE_THELURKER_EVENT = 6, + TYPE_VASHJ_PHASE3_CHECK = 7, - DATA_KARATHRESS_STARTER = 10, - DATA_KARATHRESS = 11, - DATA_CARIBDIS = 12, - DATA_SHARKKIS = 13, - DATA_TIDALVESS = 14, + TYPE_SHIELDGENERATOR1 = 8, + TYPE_SHIELDGENERATOR2 = TYPE_SHIELDGENERATOR1 + 1, + TYPE_SHIELDGENERATOR3 = TYPE_SHIELDGENERATOR1 + 2, + TYPE_SHIELDGENERATOR4 = TYPE_SHIELDGENERATOR1 + 3, - DATA_LADYVASHJ = 15, - TYPE_VASHJ_PHASE3_CHECK = 16, + DATA_KARATHRESS_STARTER = 12, // Player who started the Karathress encounter - TYPE_SHIELDGENERATOR1 = 20, - TYPE_SHIELDGENERATOR2 = 21, - TYPE_SHIELDGENERATOR3 = 22, - TYPE_SHIELDGENERATOR4 = 23 + NPC_KARATHRESS = 21214, + NPC_CARIBDIS = 21964, + NPC_SHARKKIS = 21966, + NPC_TIDALVESS = 21965, + NPC_LADYVASHJ = 21212, }; + +class MANGOS_DLL_DECL instance_serpentshrine_cavern : public ScriptedInstance +{ + public: + instance_serpentshrine_cavern(Map* pMap); + + void Initialize(); + bool IsEncounterInProgress() const; + + void OnCreatureCreate(Creature* pCreature); + + void SetData(uint32 uiType, uint32 uiData); + uint32 GetData(uint32 uiType); + void SetData64(uint32 uiType, uint64 uiData); + uint64 GetData64(uint32 uiData); + + const char* Save() { return m_strInstData.c_str(); } + void Load(const char* chrIn); + + private: + uint32 m_auiEncounter[MAX_ENCOUNTER]; + uint32 m_auiShieldGenerator[MAX_GENERATOR]; + std::string m_strInstData; + + uint64 m_uiSharkkis; + uint64 m_uiTidalvess; + uint64 m_uiCaribdis; + uint64 m_uiLadyVashj; + uint64 m_uiKarathress; + uint64 m_uiKarathressEvent_Starter; +}; + #endif diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 4d67391e0..6a4bcb088 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2125" + #define SD2_REVISION_NR "2126" #endif // __SD2_REVISION_NR_H__ From d26a372f1e0f9ffe5af5aa95df4869e7b29e055b Mon Sep 17 00:00:00 2001 From: Janu Date: Fri, 20 May 2011 11:59:43 +0200 Subject: [PATCH 0106/1172] [2127] Corrected header define in Utgarde Pinnacle based on https://github.com/Iov/scriptdev2/commit/3938d1708e8a3282dcad940d9c0e6bddd9c90924 Signed-off-by: Janu Signed-off-by: Schmoozerd --- .../utgarde_keep/utgarde_pinnacle/utgarde_pinnacle.h | 4 ++-- sd2_revision_nr.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/northrend/utgarde_keep/utgarde_pinnacle/utgarde_pinnacle.h b/scripts/northrend/utgarde_keep/utgarde_pinnacle/utgarde_pinnacle.h index 0b544bfb1..43c1c6cd3 100644 --- a/scripts/northrend/utgarde_keep/utgarde_pinnacle/utgarde_pinnacle.h +++ b/scripts/northrend/utgarde_keep/utgarde_pinnacle/utgarde_pinnacle.h @@ -2,8 +2,8 @@ * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ -#ifndef DEF_NEXUS_H -#define DEF_NEXUS_H +#ifndef DEF_UTG_PINNACLE_H +#define DEF_UTG_PINNACLE_H enum { diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 6a4bcb088..c91b83636 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2126" + #define SD2_REVISION_NR "2127" #endif // __SD2_REVISION_NR_H__ From 8d2eb3a73c1523c98160345170587ee19ac3b72e Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Fri, 20 May 2011 18:04:03 +0200 Subject: [PATCH 0107/1172] [2128] Replace manual vazruden summon with spell --- .../hellfire_ramparts/boss_nazan_and_vazruden.cpp | 4 +++- sd2_revision_nr.h | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_nazan_and_vazruden.cpp b/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_nazan_and_vazruden.cpp index 4086e1147..a7dc0ec18 100644 --- a/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_nazan_and_vazruden.cpp +++ b/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_nazan_and_vazruden.cpp @@ -36,6 +36,8 @@ enum SAY_DEATH = -1543024, EMOTE_DESCEND = -1543025, + SPELL_SUMMON_VAZRUDEN = 30717, + //vazruden SPELL_REVENGE = 40392, @@ -264,7 +266,7 @@ struct MANGOS_DLL_DECL boss_vazruden_heraldAI : public ScriptedAI { m_creature->UpdateEntry(NPC_NAZAN); - m_creature->SummonCreature(NPC_VAZRUDEN, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_DEAD_DESPAWN, 0); + DoCastSpellIfCan(m_creature, SPELL_SUMMON_VAZRUDEN); m_uiMovementTimer = 3000; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index c91b83636..56bfdd238 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2127" + #define SD2_REVISION_NR "2128" #endif // __SD2_REVISION_NR_H__ From d0266dd8515c139fb170cfcc0ddb9f733af343a6 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Fri, 20 May 2011 18:29:12 +0200 Subject: [PATCH 0108/1172] [2129] Cleanup in caverns of time dark_portal instance script * Move to header base * Remove wrong IsEncounterInProgress function --- .../dark_portal/dark_portal.cpp | 2 +- .../caverns_of_time/dark_portal/dark_portal.h | 37 +- .../dark_portal/instance_dark_portal.cpp | 389 +++++++++--------- sd2_revision_nr.h | 2 +- 4 files changed, 222 insertions(+), 208 deletions(-) diff --git a/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.cpp b/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.cpp index 0116678a9..23809c01c 100644 --- a/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.cpp +++ b/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.cpp @@ -301,7 +301,7 @@ struct MANGOS_DLL_DECL npc_time_riftAI : public ScriptedAI if (Unit *Summon = m_creature->SummonCreature(creature_entry, x, y, z, m_creature->GetOrientation(), TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000)) { - if (Creature *temp = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(DATA_MEDIVH))) + if (Creature *temp = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(NPC_MEDIVH))) Summon->AddThreat(temp); } } diff --git a/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.h b/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.h index c8da2e2ef..8592871f9 100644 --- a/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.h +++ b/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.h @@ -12,7 +12,6 @@ enum TYPE_MEDIVH = 1, TYPE_RIFT = 2, - DATA_MEDIVH = 10, DATA_PORTAL_COUNT = 11, DATA_SHIELD = 12, @@ -42,4 +41,40 @@ enum RIFT_BOSS = 1 }; +class MANGOS_DLL_DECL instance_dark_portal : public ScriptedInstance +{ + public: + instance_dark_portal(Map* pMap); + + void Initialize(); + void OnPlayerEnter(Player* pPlayer); + void OnCreatureCreate(Creature* pCreature); + + void SetData(uint32 uiType, uint32 uiData); + uint32 GetData(uint32 uiType); + uint64 GetData64(uint32 uiData); + + void Update(uint32 uiDiff); + + private: + Creature* SummonedPortalBoss(Creature* pSource); + void DoSpawnPortal(); + bool CanProgressEvent(); + uint8 GetRiftWaveId(); + void Clear(); + void InitWorldState(bool bEnable = true); + + uint32 m_auiEncounter[MAX_ENCOUNTER]; + + uint32 m_uiRiftPortalCount; + uint32 m_uiShieldPercent; + uint8 m_uiRiftWaveCount; + uint8 m_uiRiftWaveId; + + uint32 m_uiNextPortalTimer; + + uint64 m_uiMedivhGUID; + uint8 m_uiCurrentRiftId; +}; + #endif diff --git a/scripts/kalimdor/caverns_of_time/dark_portal/instance_dark_portal.cpp b/scripts/kalimdor/caverns_of_time/dark_portal/instance_dark_portal.cpp index 0c56a2a0f..c38c849ff 100644 --- a/scripts/kalimdor/caverns_of_time/dark_portal/instance_dark_portal.cpp +++ b/scripts/kalimdor/caverns_of_time/dark_portal/instance_dark_portal.cpp @@ -50,274 +50,252 @@ static Wave RiftWaves[]= {NPC_AEONUS, 0} }; -struct MANGOS_DLL_DECL instance_dark_portal : public ScriptedInstance +instance_dark_portal::instance_dark_portal(Map* pMap) : ScriptedInstance(pMap), + m_uiMedivhGUID(0) { - instance_dark_portal(Map* pMap) : ScriptedInstance(pMap) {Initialize();}; + Initialize(); +} - uint32 m_auiEncounter[MAX_ENCOUNTER]; +void instance_dark_portal::Initialize() +{ + Clear(); +} - uint32 m_uiRiftPortalCount; - uint32 m_uiShieldPercent; - uint8 m_uiRiftWaveCount; - uint8 m_uiRiftWaveId; +void instance_dark_portal::Clear() +{ + memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); - uint32 m_uiNextPortal_Timer; + m_uiRiftPortalCount = 0; + m_uiShieldPercent = 100; + m_uiRiftWaveCount = 0; + m_uiRiftWaveId = 0; - uint64 m_uiMedivhGUID; - uint8 m_uiCurrentRiftId; + m_uiCurrentRiftId = 0; - void Initialize() - { - m_uiMedivhGUID = 0; - Clear(); - } - - void Clear() - { - memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); - - m_uiRiftPortalCount = 0; - m_uiShieldPercent = 100; - m_uiRiftWaveCount = 0; - m_uiRiftWaveId = 0; + m_uiNextPortalTimer = 0; +} - m_uiCurrentRiftId = 0; +void instance_dark_portal::InitWorldState(bool bEnable /*= true*/) +{ + DoUpdateWorldState(WORLD_STATE_BM, bEnable ? 1 : 0); + DoUpdateWorldState(WORLD_STATE_BM_SHIELD, 100); + DoUpdateWorldState(WORLD_STATE_BM_RIFT, 0); +} - m_uiNextPortal_Timer = 0; - } +void instance_dark_portal::OnPlayerEnter(Player* pPlayer) +{ + if (m_auiEncounter[0] == IN_PROGRESS) + return; - void InitWorldState(bool Enable = true) - { - DoUpdateWorldState(WORLD_STATE_BM,Enable ? 1 : 0); - DoUpdateWorldState(WORLD_STATE_BM_SHIELD, 100); - DoUpdateWorldState(WORLD_STATE_BM_RIFT, 0); - } + pPlayer->SendUpdateWorldState(WORLD_STATE_BM, 0); +} - bool IsEncounterInProgress() const - { - if (m_auiEncounter[0] == IN_PROGRESS) - return true; +void instance_dark_portal::OnCreatureCreate(Creature* pCreature) +{ + if (pCreature->GetEntry() == NPC_MEDIVH) + m_uiMedivhGUID = pCreature->GetGUID(); +} +// what other conditions to check? +bool instance_dark_portal::CanProgressEvent() +{ + if (instance->GetPlayers().isEmpty()) return false; - } - void OnPlayerEnter(Player* pPlayer) - { - if (m_auiEncounter[0] == IN_PROGRESS) - return; - - pPlayer->SendUpdateWorldState(WORLD_STATE_BM, 0); - } + return true; +} - void OnCreatureCreate(Creature* pCreature) +uint8 instance_dark_portal::GetRiftWaveId() +{ + switch(m_uiRiftPortalCount) { - if (pCreature->GetEntry() == NPC_MEDIVH) - m_uiMedivhGUID = pCreature->GetGUID(); + case 6: + m_uiRiftWaveId = 2; + return 1; + case 12: + m_uiRiftWaveId = 4; + return 3; + case 18: + return 5; + default: + return m_uiRiftWaveId; } +} - // what other conditions to check? - bool CanProgressEvent() +void instance_dark_portal::SetData(uint32 uiType, uint32 uiData) +{ + switch(uiType) { - if (instance->GetPlayers().isEmpty()) - return false; + case TYPE_MEDIVH: + if (uiData == SPECIAL && m_auiEncounter[0] == IN_PROGRESS) + { + --m_uiShieldPercent; - return true; - } + DoUpdateWorldState(WORLD_STATE_BM_SHIELD, m_uiShieldPercent); - uint8 GetRiftWaveId() - { - switch(m_uiRiftPortalCount) - { - case 6: - m_uiRiftWaveId = 2; - return 1; - case 12: - m_uiRiftWaveId = 4; - return 3; - case 18: - return 5; - default: - return m_uiRiftWaveId; - } - } - - void SetData(uint32 uiType, uint32 uiData) - { - switch(uiType) - { - case TYPE_MEDIVH: - if (uiData == SPECIAL && m_auiEncounter[0] == IN_PROGRESS) + if (!m_uiShieldPercent) { - --m_uiShieldPercent; - - DoUpdateWorldState(WORLD_STATE_BM_SHIELD, m_uiShieldPercent); - - if (!m_uiShieldPercent) + if (Creature* pMedivh = instance->GetCreature(m_uiMedivhGUID)) { - if (Creature* pMedivh = instance->GetCreature(m_uiMedivhGUID)) + if (pMedivh->isAlive()) { - if (pMedivh->isAlive()) - { - pMedivh->DealDamage(pMedivh, pMedivh->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); - m_auiEncounter[0] = FAIL; - m_auiEncounter[1] = NOT_STARTED; - } + pMedivh->DealDamage(pMedivh, pMedivh->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + m_auiEncounter[0] = FAIL; + m_auiEncounter[1] = NOT_STARTED; } } } - else + } + else + { + if (uiData == IN_PROGRESS) { - if (uiData == IN_PROGRESS) - { - debug_log("SD2: Instance Dark Portal: Starting event."); - InitWorldState(); - m_auiEncounter[1] = IN_PROGRESS; - m_uiNextPortal_Timer = 15000; - } + debug_log("SD2: Instance Dark Portal: Starting event."); + InitWorldState(); + m_auiEncounter[1] = IN_PROGRESS; + m_uiNextPortalTimer = 15000; + } - if (uiData == DONE) - { - // this may be completed further out in the post-event - debug_log("SD2: Instance Dark Portal: Event completed."); + if (uiData == DONE) + { + // this may be completed further out in the post-event + debug_log("SD2: Instance Dark Portal: Event completed."); - Map::PlayerList const& players = instance->GetPlayers(); + Map::PlayerList const& players = instance->GetPlayers(); - if (!players.isEmpty()) + if (!players.isEmpty()) + { + for(Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr) { - for(Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr) + if (Player* pPlayer = itr->getSource()) { - if (Player* pPlayer = itr->getSource()) - { - if (pPlayer->GetQuestStatus(QUEST_OPENING_PORTAL) == QUEST_STATUS_INCOMPLETE) - pPlayer->AreaExploredOrEventHappens(QUEST_OPENING_PORTAL); - - if (pPlayer->GetQuestStatus(QUEST_MASTER_TOUCH) == QUEST_STATUS_INCOMPLETE) - pPlayer->AreaExploredOrEventHappens(QUEST_MASTER_TOUCH); - } + if (pPlayer->GetQuestStatus(QUEST_OPENING_PORTAL) == QUEST_STATUS_INCOMPLETE) + pPlayer->AreaExploredOrEventHappens(QUEST_OPENING_PORTAL); + + if (pPlayer->GetQuestStatus(QUEST_MASTER_TOUCH) == QUEST_STATUS_INCOMPLETE) + pPlayer->AreaExploredOrEventHappens(QUEST_MASTER_TOUCH); } } } - - m_auiEncounter[0] = uiData; } - break; - case TYPE_RIFT: - if (uiData == SPECIAL) - { - if (m_uiRiftPortalCount < 7) - m_uiNextPortal_Timer = 5000; - } - else - m_auiEncounter[1] = uiData; - break; - } - } - uint32 GetData(uint32 uiType) - { - switch(uiType) - { - case TYPE_MEDIVH: - return m_auiEncounter[0]; - case TYPE_RIFT: - return m_auiEncounter[1]; - case DATA_PORTAL_COUNT: - return m_uiRiftPortalCount; - case DATA_SHIELD: - return m_uiShieldPercent; - } - return 0; + m_auiEncounter[0] = uiData; + } + break; + case TYPE_RIFT: + if (uiData == SPECIAL) + { + if (m_uiRiftPortalCount < 7) + m_uiNextPortalTimer = 5000; + } + else + m_auiEncounter[1] = uiData; + break; } +} - uint64 GetData64(uint32 uiData) +uint32 instance_dark_portal::GetData(uint32 uiType) +{ + switch(uiType) { - if (uiData == DATA_MEDIVH) - return m_uiMedivhGUID; + case TYPE_MEDIVH: return m_auiEncounter[0]; + case TYPE_RIFT: return m_auiEncounter[1]; + case DATA_PORTAL_COUNT: return m_uiRiftPortalCount; + case DATA_SHIELD: return m_uiShieldPercent; - return 0; + default: + return 0; } +} - Creature* SummonedPortalBoss(Creature* pSource) - { - uint32 uiEntry = RiftWaves[GetRiftWaveId()].PortalBoss; +uint64 instance_dark_portal::GetData64(uint32 uiData) +{ + if (uiData == NPC_MEDIVH) + return m_uiMedivhGUID; + + return 0; +} - if (uiEntry == RIFT_BOSS) - uiEntry = RandRiftBoss(); +Creature* instance_dark_portal::SummonedPortalBoss(Creature* pSource) +{ + uint32 uiEntry = RiftWaves[GetRiftWaveId()].PortalBoss; - float x, y, z; - pSource->GetRandomPoint(pSource->GetPositionX(), pSource->GetPositionY(), pSource->GetPositionZ(), 10.0f, x, y, z); - // uncomment the following if something doesn't work correctly, otherwise just delete - // pSource->UpdateAllowedPositionZ(x, y, z); + if (uiEntry == RIFT_BOSS) + uiEntry = RandRiftBoss(); - debug_log("SD2: Instance Dark Portal: Summoning rift boss uiEntry %u.", uiEntry); + float x, y, z; + pSource->GetRandomPoint(pSource->GetPositionX(), pSource->GetPositionY(), pSource->GetPositionZ(), 10.0f, x, y, z); + // uncomment the following if something doesn't work correctly, otherwise just delete + // pSource->UpdateAllowedPositionZ(x, y, z); - if (Creature* pSummoned = pSource->SummonCreature(uiEntry, x, y, z, pSource->GetOrientation(), TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 600000)) - return pSummoned; + debug_log("SD2: Instance Dark Portal: Summoning rift boss uiEntry %u.", uiEntry); - debug_log("SD2: Instance Dark Portal: what just happened there? No boss, no loot, no fun..."); - return NULL; - } + if (Creature* pSummoned = pSource->SummonCreature(uiEntry, x, y, z, pSource->GetOrientation(), TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 600000)) + return pSummoned; - void DoSpawnPortal() + debug_log("SD2: Instance Dark Portal: what just happened there? No boss, no loot, no fun..."); + return NULL; +} + +void instance_dark_portal::DoSpawnPortal() +{ + if (Creature* pMedivh = instance->GetCreature(m_uiMedivhGUID)) { - if (Creature* pMedivh = instance->GetCreature(m_uiMedivhGUID)) - { - uint8 uiTmp = urand(0, 2); + uint8 uiTmp = urand(0, 2); - if (uiTmp >= m_uiCurrentRiftId) - ++uiTmp; + if (uiTmp >= m_uiCurrentRiftId) + ++uiTmp; - debug_log("SD2: Instance Dark Portal: Creating Time Rift at locationId %i (old locationId was %u).", uiTmp, m_uiCurrentRiftId); + debug_log("SD2: Instance Dark Portal: Creating Time Rift at locationId %i (old locationId was %u).", uiTmp, m_uiCurrentRiftId); - m_uiCurrentRiftId = uiTmp; + m_uiCurrentRiftId = uiTmp; - if (Creature* pTemp = pMedivh->SummonCreature(NPC_TIME_RIFT, PortalLocation[uiTmp][0], PortalLocation[uiTmp][1], PortalLocation[uiTmp][2], PortalLocation[uiTmp][3], TEMPSUMMON_CORPSE_DESPAWN, 0)) - { - pTemp->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - pTemp->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + if (Creature* pTemp = pMedivh->SummonCreature(NPC_TIME_RIFT, PortalLocation[uiTmp][0], PortalLocation[uiTmp][1], PortalLocation[uiTmp][2], PortalLocation[uiTmp][3], TEMPSUMMON_CORPSE_DESPAWN, 0)) + { + pTemp->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + pTemp->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - if (Creature* pBoss = SummonedPortalBoss(pTemp)) + if (Creature* pBoss = SummonedPortalBoss(pTemp)) + { + if (pBoss->GetEntry() == NPC_AEONUS) + pBoss->AddThreat(pMedivh); + else { - if (pBoss->GetEntry() == NPC_AEONUS) - pBoss->AddThreat(pMedivh); - else - { - pBoss->AddThreat(pTemp); - pTemp->CastSpell(pBoss, SPELL_RIFT_CHANNEL, false); - } + pBoss->AddThreat(pTemp); + pTemp->CastSpell(pBoss, SPELL_RIFT_CHANNEL, false); } } } } +} - void Update(uint32 uiDiff) - { - if (m_auiEncounter[1] != IN_PROGRESS) - return; +void instance_dark_portal::Update(uint32 uiDiff) +{ + if (m_auiEncounter[1] != IN_PROGRESS) + return; - //add delay timer? - if (!CanProgressEvent()) - { - Clear(); - return; - } + //add delay timer? + if (!CanProgressEvent()) + { + Clear(); + return; + } - if (m_uiNextPortal_Timer) + if (m_uiNextPortalTimer) + { + if (m_uiNextPortalTimer <= uiDiff) { - if (m_uiNextPortal_Timer <= uiDiff) - { - ++m_uiRiftPortalCount; + ++m_uiRiftPortalCount; - DoUpdateWorldState(WORLD_STATE_BM_RIFT, m_uiRiftPortalCount); + DoUpdateWorldState(WORLD_STATE_BM_RIFT, m_uiRiftPortalCount); - DoSpawnPortal(); - m_uiNextPortal_Timer = RiftWaves[GetRiftWaveId()].NextPortalTime; - } - else - m_uiNextPortal_Timer -= uiDiff; + DoSpawnPortal(); + m_uiNextPortalTimer = RiftWaves[GetRiftWaveId()].NextPortalTime; } + else + m_uiNextPortalTimer -= uiDiff; } -}; +} InstanceData* GetInstanceData_instance_dark_portal(Map* pMap) { @@ -326,9 +304,10 @@ InstanceData* GetInstanceData_instance_dark_portal(Map* pMap) void AddSC_instance_dark_portal() { - Script* newscript; - newscript = new Script; - newscript->Name = "instance_dark_portal"; - newscript->GetInstanceData = &GetInstanceData_instance_dark_portal; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "instance_dark_portal"; + pNewScript->GetInstanceData = &GetInstanceData_instance_dark_portal; + pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 56bfdd238..ebbe40974 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2128" + #define SD2_REVISION_NR "2129" #endif // __SD2_REVISION_NR_H__ From 09deb3e5cd1ea8aee509381defb4c22874d6ba86 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Sat, 21 May 2011 23:21:53 +0200 Subject: [PATCH 0109/1172] [2130] AIInfo command support, requires MaNGOS Rev [11526] * Added for EscortAI and for ScriptedAI * Added Thermaplugg example Note for devs: This AIInformation can be used for more complicated scripts to add some usable debug output, which can be used on-the-fly when something went wrong within the script This is also suggested to be used within Bug-reports (if information provided). Also remark to request/ provide AIInformation output for scripts, which sometimes bug. --- base/escort_ai.cpp | 21 +++++++++++++++++++ base/escort_ai.h | 2 ++ base/guard_ai.h | 17 +++++++-------- include/sc_creature.cpp | 10 +++++++++ include/sc_creature.h | 5 +++++ .../gnomeregan/boss_thermaplugg.cpp | 11 ++++++++++ sd2_revision_nr.h | 2 +- sql/scriptdev2_script_full.sql | 2 +- sql/updates/r2130_scriptdev2.sql | 1 + 9 files changed, 60 insertions(+), 11 deletions(-) create mode 100644 sql/updates/r2130_scriptdev2.sql diff --git a/base/escort_ai.cpp b/base/escort_ai.cpp index 1645ba93e..89ecf0f37 100644 --- a/base/escort_ai.cpp +++ b/base/escort_ai.cpp @@ -32,6 +32,27 @@ npc_escortAI::npc_escortAI(Creature* pCreature) : ScriptedAI(pCreature), m_bCanReturnToStart(false) {} +void npc_escortAI::GetAIInformation(ChatHandler& reader) +{ + std::ostringstream oss; + + oss << "EscortAI "; + if (m_playerGuid) + oss << "started for " << m_playerGuid.GetString() << " "; + if (m_pQuestForEscort) + oss << "started with quest " << m_pQuestForEscort->GetQuestId(); + + if (HasEscortState(STATE_ESCORT_ESCORTING)) + { + oss << "\nEscortFlags: Escorting" << (HasEscortState(STATE_ESCORT_RETURNING) ? ", Returning" : "") << (HasEscortState(STATE_ESCORT_PAUSED) ? ", Paused" : ""); + + if (CurrentWP != WaypointList.end()) + oss << "\nNext Waypoint Id = " << CurrentWP->uiId << " Position: " << CurrentWP->fX << " " << CurrentWP->fY << " " << CurrentWP->fZ; + } + + reader.PSendSysMessage(oss.str().c_str()); +} + bool npc_escortAI::IsVisible(Unit* pWho) const { if (!pWho) diff --git a/base/escort_ai.h b/base/escort_ai.h index bdc801e4b..550116f6a 100644 --- a/base/escort_ai.h +++ b/base/escort_ai.h @@ -36,6 +36,8 @@ struct MANGOS_DLL_DECL npc_escortAI : public ScriptedAI explicit npc_escortAI(Creature* pCreature); ~npc_escortAI() {} + void GetAIInformation(ChatHandler& reader); + virtual void Aggro(Unit*); virtual void Reset() = 0; diff --git a/base/guard_ai.h b/base/guard_ai.h index 12697b6bf..e2587b5e1 100644 --- a/base/guard_ai.h +++ b/base/guard_ai.h @@ -30,20 +30,19 @@ struct MANGOS_DLL_DECL guardAI : public ScriptedAI explicit guardAI(Creature* pCreature); ~guardAI() {} - uint32 m_uiGlobalCooldown; //This variable acts like the global cooldown that players have (1.5 seconds) - uint32 m_uiBuffTimer; //This variable keeps track of buffs + uint32 m_uiGlobalCooldown; // This variable acts like the global cooldown that players have (1.5 seconds) + uint32 m_uiBuffTimer; // This variable keeps track of buffs - void Reset(); + void Reset(); - void Aggro(Unit *pWho); + void Aggro(Unit *pWho); - void JustDied(Unit *pKiller); + void JustDied(Unit *pKiller); - void UpdateAI(const uint32 uiDiff); - - //common used for guards in main cities - void DoReplyToTextEmote(uint32 uiTextEmote); + void UpdateAI(const uint32 uiDiff); + // Commonly used for guards in main cities + void DoReplyToTextEmote(uint32 uiTextEmote); }; struct MANGOS_DLL_DECL guardAI_orgrimmar : public guardAI diff --git a/include/sc_creature.cpp b/include/sc_creature.cpp index d9a12159b..fcaaec978 100644 --- a/include/sc_creature.cpp +++ b/include/sc_creature.cpp @@ -20,6 +20,11 @@ ScriptedAI::ScriptedAI(Creature* pCreature) : CreatureAI(pCreature), m_uiEvadeCheckCooldown(2500) {} +void ScriptedAI::GetAIInformation(ChatHandler& reader) +{ + reader.PSendSysMessage("ScriptedAI, combat movement is %s", reader.GetOnOffStr(m_bCombatMovement)); +} + bool ScriptedAI::IsVisible(Unit* pWho) const { if (!pWho) @@ -522,6 +527,11 @@ bool ScriptedAI::EnterEvadeIfOutOfCombatArea(const uint32 uiDiff) return true; } +void Scripted_NoMovementAI::GetAIInformation(ChatHandler& reader) +{ + reader.PSendSysMessage("ScriptedAI (no movement)"); +} + void Scripted_NoMovementAI::AttackStart(Unit* pWho) { if (pWho && m_creature->Attack(pWho, true)) diff --git a/include/sc_creature.h b/include/sc_creature.h index 123ccb5d9..42a2a0953 100644 --- a/include/sc_creature.h +++ b/include/sc_creature.h @@ -7,6 +7,7 @@ #include "CreatureAI.h" #include "Creature.h" +#include "Chat.h" //Spell targets used by SelectSpell enum SelectTarget @@ -48,6 +49,8 @@ struct MANGOS_DLL_DECL ScriptedAI : public CreatureAI //CreatureAI Functions //************* + void GetAIInformation(ChatHandler& reader); + //Called if IsVisible(Unit *who) is true at each *who move void MoveInLineOfSight(Unit*); @@ -176,6 +179,8 @@ struct MANGOS_DLL_DECL Scripted_NoMovementAI : public ScriptedAI { Scripted_NoMovementAI(Creature* pCreature) : ScriptedAI(pCreature) {} + void GetAIInformation(ChatHandler& reader); + //Called at each attack of m_creature by any victim void AttackStart(Unit*); }; diff --git a/scripts/eastern_kingdoms/gnomeregan/boss_thermaplugg.cpp b/scripts/eastern_kingdoms/gnomeregan/boss_thermaplugg.cpp index cfc2557f9..fa6dfa187 100644 --- a/scripts/eastern_kingdoms/gnomeregan/boss_thermaplugg.cpp +++ b/scripts/eastern_kingdoms/gnomeregan/boss_thermaplugg.cpp @@ -73,6 +73,17 @@ struct MANGOS_DLL_DECL boss_thermapluggAI : public ScriptedAI m_lLandedBombGUIDs.clear(); } + void GetAIInformation(ChatHandler& reader) + { + reader.PSendSysMessage("Thermaplugg, currently phase %s", m_bIsPhaseTwo ? "two" : "one"); + + if (m_asBombFaces) + { + for (uint8 i = 0; i < MAX_GNOME_FACES; ++i) + reader.PSendSysMessage("Bomb face %u is %s ", (uint32)i, m_asBombFaces[i].m_bActivated ? "activated" : "not activated"); + } + } + void KilledUnit(Unit* pVictim) { DoScriptText(SAY_SLAY, m_creature); diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index ebbe40974..a92e33b2a 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2129" + #define SD2_REVISION_NR "2130" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 58fc6d7bf..2d16a99ff 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -3,7 +3,7 @@ -- DELETE FROM sd2_db_version; -INSERT INTO sd2_db_version (version) VALUES ('ScriptDev2 (for MaNGOS 11432+) '); +INSERT INTO sd2_db_version (version) VALUES ('ScriptDev2 (for MaNGOS 11526+) '); -- -- Below contains data for table `script_texts` mainly used in C++ parts. diff --git a/sql/updates/r2130_scriptdev2.sql b/sql/updates/r2130_scriptdev2.sql new file mode 100644 index 000000000..39298d875 --- /dev/null +++ b/sql/updates/r2130_scriptdev2.sql @@ -0,0 +1 @@ +UPDATE sd2_db_version SET version='ScriptDev2 (for MaNGOS 11526+) '; From 63fae555a6d4f8bbf2ba6a0c894bce7a69ac5f76 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Tue, 24 May 2011 23:39:08 +0200 Subject: [PATCH 0110/1172] [2131] Rough Cleanup of Boss Illidan AI * Add some basic AIInformation for him * Change a few unneeded things, and make the code more stable against unexpected behaviour * Replace uint64 GUIDs with ObjectGuid, and GetData64 with GetGuid when possible This cleanup can only be considered as rough, and there are many parts of the (long) script that could use further cleanup and work :) * Also replace Scripted_NoMovementAI::AIInformation with a hopefully better comment; ofc this AIInformation doesn't say anything about the real state of movement, but only about the default behaviour of (combat) movement --- include/sc_creature.cpp | 2 +- scripts/outland/black_temple/boss_illidan.cpp | 1549 +++++++++-------- sd2_revision_nr.h | 2 +- 3 files changed, 820 insertions(+), 733 deletions(-) diff --git a/include/sc_creature.cpp b/include/sc_creature.cpp index fcaaec978..4c552b9ce 100644 --- a/include/sc_creature.cpp +++ b/include/sc_creature.cpp @@ -529,7 +529,7 @@ bool ScriptedAI::EnterEvadeIfOutOfCombatArea(const uint32 uiDiff) void Scripted_NoMovementAI::GetAIInformation(ChatHandler& reader) { - reader.PSendSysMessage("ScriptedAI (no movement)"); + reader.PSendSysMessage("Subclass of Scripted_NoMovementAI"); } void Scripted_NoMovementAI::AttackStart(Unit* pWho) diff --git a/scripts/outland/black_temple/boss_illidan.cpp b/scripts/outland/black_temple/boss_illidan.cpp index 5560907db..618e43083 100644 --- a/scripts/outland/black_temple/boss_illidan.cpp +++ b/scripts/outland/black_temple/boss_illidan.cpp @@ -49,31 +49,34 @@ enum CreatureEntry // Gossip for when a player clicks Akama #define GOSSIP_ITEM "We are ready to face Illidan" -#define SAY_CONVO_1 -1564097 -#define SAY_CONVO_2 -1564098 -#define SAY_CONVO_3 -1564099 -#define SAY_CONVO_4 -1564100 -#define SAY_CONVO_5 -1564101 -#define SAY_CONVO_6 -1564102 -#define SAY_CONVO_7 -1564103 -#define SAY_CONVO_8 -1564104 -#define SAY_CONVO_9 -1564105 -#define SAY_CONVO_10 -1564106 -#define SAY_CONVO_11 -1564107 -#define SAY_CONVO_12 -1564108 -#define SAY_CONVO_13 -1564109 -#define SAY_CONVO_14 -1564110 -#define SAY_CONVO_15 -1564111 - -#define SAY_TAUNT_1 -1564112 -#define SAY_TAUNT_2 -1564113 -#define SAY_TAUNT_3 -1564114 -#define SAY_TAUNT_4 -1564115 - -#define SAY_MAIEV_TAUNT_1 -1564116 -#define SAY_MAIEV_TAUNT_2 -1564117 -#define SAY_MAIEV_TAUNT_3 -1564118 -#define SAY_MAIEV_TAUNT_4 -1564119 +enum +{ + SAY_CONVO_1 = -1564097, + SAY_CONVO_2 = -1564098, + SAY_CONVO_3 = -1564099, + SAY_CONVO_4 = -1564100, + SAY_CONVO_5 = -1564101, + SAY_CONVO_6 = -1564102, + SAY_CONVO_7 = -1564103, + SAY_CONVO_8 = -1564104, + SAY_CONVO_9 = -1564105, + SAY_CONVO_10 = -1564106, + SAY_CONVO_11 = -1564107, + SAY_CONVO_12 = -1564108, + SAY_CONVO_13 = -1564109, + SAY_CONVO_14 = -1564110, + SAY_CONVO_15 = -1564111, + + SAY_TAUNT_1 = -1564112, + SAY_TAUNT_2 = -1564113, + SAY_TAUNT_3 = -1564114, + SAY_TAUNT_4 = -1564115, + + SAY_MAIEV_TAUNT_1 = -1564116, + SAY_MAIEV_TAUNT_2 = -1564117, + SAY_MAIEV_TAUNT_3 = -1564118, + SAY_MAIEV_TAUNT_4 = -1564119, +}; //emote only defined if not related to textId (in database) struct Yells @@ -83,7 +86,7 @@ struct Yells bool Talk; }; -static Yells Conversation[]= +static const Yells aConversation[]= { {SAY_CONVO_1, ILLIDAN_STORMRAGE, 8000, 0, true}, {0, ILLIDAN_STORMRAGE, 5000, 396, true}, @@ -109,7 +112,7 @@ static Yells Conversation[]= {0, EMPTY, 1000, 0, false} }; -static Yells RandomTaunts[]= +static const Yells aRandomTaunts[]= { {SAY_TAUNT_1, ILLIDAN_STORMRAGE, 0, 0, false}, {SAY_TAUNT_2, ILLIDAN_STORMRAGE, 0, 0, false}, @@ -117,7 +120,7 @@ static Yells RandomTaunts[]= {SAY_TAUNT_4, ILLIDAN_STORMRAGE, 0, 0, false} }; -static Yells MaievTaunts[]= +static const Yells aMaievTaunts[]= { {SAY_MAIEV_TAUNT_1, MAIEV_SHADOWSONG, 0, 0, false}, {SAY_MAIEV_TAUNT_2, MAIEV_SHADOWSONG, 0, 0, false}, @@ -125,90 +128,93 @@ static Yells MaievTaunts[]= {SAY_MAIEV_TAUNT_4, MAIEV_SHADOWSONG, 0, 0, false} }; -// Yells for/by Akama -#define SAY_AKAMA_BEWARE -1564120 -#define SAY_AKAMA_MINION -1564121 -#define SAY_AKAMA_LEAVE -1564122 - -// Self explanatory -#define SAY_KILL1 -1564123 -#define SAY_KILL2 -1564124 - -// I think I'll fly now and let my subordinates take you on -#define SAY_TAKEOFF -1564125 -#define SAY_SUMMONFLAMES -1564126 - -// When casting Eye Blast. Demon Fire will be appear on places that he casts this -#define SAY_EYE_BLAST -1564127 - -// kk, I go big, dark and demon on you. -#define SAY_MORPH -1564128 - -// I KILL! -#define SAY_ENRAGE -1564129 - -/************** Spells *************/ -// Normal Form -#define SPELL_SHEAR 41032 // Reduces Max. Health by 60% for 7 seconds. Can stack 19 times. 1.5 second cast -#define SPELL_FLAME_CRASH 40832 // Summons an invis/unselect passive mob that has an aura of flame in a circle around him. -#define SPELL_DRAW_SOUL 40904 // 5k Shadow Damage in front of him. Heals Illidan for 100k health (script effect) -#define SPELL_PARASITIC_SHADOWFIEND 41917 // DoT of 3k Shadow every 2 seconds. Lasts 10 seconds. (Script effect: Summon 2 parasites once the debuff has ticked off) -#define SPELL_SUMMON_PARASITICS 41915 // Summons 2 Parasitic Shadowfiends on the target. It's supposed to be cast as soon as the Parasitic Shadowfiend debuff is gone, but the spells aren't linked :( -#define SPELL_AGONIZING_FLAMES 40932 // 4k fire damage initial to target and anyone w/i 5 yards. PHASE 3 ONLY -#define SPELL_ENRAGE 40683 // Increases damage by 50% and attack speed by 30%. 20 seconds, PHASE 5 ONLY -// Flying (Phase 2) -#define SPELL_THROW_GLAIVE 39635 // Throws a glaive on the ground -#define SPELL_THROW_GLAIVE2 39849 // Animation for the above spell -#define SPELL_GLAIVE_RETURNS 39873 // Glaive flies back to Illidan -#define SPELL_FIREBALL 40598 // 2.5k-3.5k damage in 10 yard radius. 2 second cast time. -#define SPELL_DARK_BARRAGE 40585 // 10 second channeled spell, 3k shadow damage per second. -// Demon Form -#define SPELL_DEMON_TRANSFORM_1 40511 // First phase of animations for transforming into Dark Illidan (fall to ground) -#define SPELL_DEMON_TRANSFORM_2 40398 // Second phase of animations (kneel) -#define SPELL_DEMON_TRANSFORM_3 40510 // Final phase of animations (stand up and roar) -#define SPELL_DEMON_FORM 40506 // Transforms into Demon Illidan. Has an Aura of Dread on him. -#define SPELL_SHADOW_BLAST 41078 // 8k - 11k Shadow Damage. Targets highest threat. Has a splash effect, damaging anyone in 20 yards of the target. -#define SPELL_FLAME_BURST 41126 // Hurls fire at entire raid for ~3.5k damage every 10 seconds. Resistable. (Does not work: Script effect) -#define SPELL_FLAME_BURST_EFFECT 41131 // The actual damage. Handled by core (41126 triggers 41131) -// Other Illidan spells -#define SPELL_KNEEL 39656 // Before beginning encounter, this is how he appears (talking to Wilson). -#define SPELL_SHADOW_PRISON 40647 // Illidan casts this spell to immobilize entire raid when he summons Maiev. -#define SPELL_DEATH 41220 // This spell doesn't do anything except stun Illidan and set him on his knees. -#define SPELL_BERSERK 45078 // Damage increased by 500%, attack speed by 150% - -// Non-Illidan spells -#define SPELL_AKAMA_DOOR_CHANNEL 41268 // Akama's channel spell on the door before the Temple Summit -#define SPELL_DEATHSWORN_DOOR_CHANNEL 41269 // Olum and Udalo's channel spell on the door before the Temple Summit -#define SPELL_AKAMA_DOOR_FAIL 41271 // Not sure where this is really used... -#define SPELL_HEALING_POTION 40535 // Akama uses this to heal himself to full. -#define SPELL_AZZINOTH_CHANNEL 39857 // Glaives cast it on Flames. Not sure if this is the right spell. -#define SPELL_SHADOW_DEMON_PASSIVE 41079 // Adds the "shadowform" aura to Shadow Demons. -#define SPELL_CONSUME_SOUL 41080 // Once the Shadow Demons reach their target, they use this to kill them -#define SPELL_PARALYZE 41083 // Shadow Demons cast this on their target -#define SPELL_PURPLE_BEAM 39123 // Purple Beam connecting Shadow Demon to their target -#define SPELL_CAGE_TRAP_DUMMY 40761 // Put this in DB for cage trap GO. -#define SPELL_EYE_BLAST_TRIGGER 40017 // This summons Demon Form every few seconds and deals ~20k damage in its radius -#define SPELL_EYE_BLAST 39908 // This does the blue flamey animation. -#define SPELL_FLAME_CRASH_EFFECT 40836 // Firey blue ring of circle that the other flame crash summons -#define SPELL_BLAZE_EFFECT 40610 // Green flame on the ground, triggers damage (5k) every few seconds -#define SPELL_BLAZE_SUMMON 40637 // Summons the Blaze creature -#define SPELL_DEMON_FIRE 40029 // Blue fire trail left by Eye Blast. Deals 2k per second if players stand on it. -#define SPELL_CAGED 40695 // Caged Trap triggers will cast this on Illidan if he is within 3 yards -#define SPELL_CAGE_TRAP_SUMMON 40694 // Summons a Cage Trap GO (bugged) on the ground along with a Cage Trap Disturb Trigger mob (working) -#define SPELL_CAGE_TRAP_BEAM 40713 // 8 Triggers on the ground in an octagon cast spells like this on Illidan 'caging him' -#define SPELL_FLAME_BLAST 40631 // Flames of Azzinoth use this. Frontal cone AoE 7k-9k damage. -#define SPELL_CHARGE 40602 // Flames of Azzinoth charges whoever is too far from them. They enrage after this. For simplicity, we'll use the same enrage as Illidan. -#define SPELL_TELEPORT_VISUAL 41232 // Teleport visual for Maiev -#define SPELL_SHADOWFIEND_PASSIVE 41913 // Passive aura for shadowfiends +enum +{ + // Yells for/by Akama + SAY_AKAMA_BEWARE = -1564120, + SAY_AKAMA_MINION = -1564121, + SAY_AKAMA_LEAVE = -1564122, + + // Self explanatory + SAY_KILL1 = -1564123, + SAY_KILL2 = -1564124, + + // I think I'll fly now and let my subordinates take you on + SAY_TAKEOFF = -1564125, + SAY_SUMMONFLAMES = -1564126, + + // When casting Eye Blast. Demon Fire will be appear on places that he casts this + SAY_EYE_BLAST = -1564127, + + // kk, I go big, dark and demon on you. + SAY_MORPH = -1564128, + + // I KILL! + SAY_ENRAGE = -1564129, + + /************** Spells *************/ + // Normal Form + SPELL_SHEAR = 41032, // Reduces Max. Health by 60% for 7 seconds. Can stack 19 times. 1.5 second cast + SPELL_FLAME_CRASH = 40832, // Summons an invis/unselect passive mob that has an uiAura of flame in a circle around him. + SPELL_DRAW_SOUL = 40904, // 5k Shadow Damage in front of him. Heals Illidan for 100k health (script effect) + SPELL_PARASITIC_SHADOWFIEND = 41917, // DoT of 3k Shadow every 2 seconds. Lasts 10 seconds. (Script effect: Summon 2 parasites once the debuff has ticked off) + SPELL_SUMMON_PARASITICS = 41915, // Summons 2 Parasitic Shadowfiends on the target. It's supposed to be cast as soon as the Parasitic Shadowfiend debuff is gone, but the spells aren't linked :( + SPELL_AGONIZING_FLAMES = 40932, // 4k fire damage uiInitial to target and anyone w/i 5 yards. PHASE 3 ONLY + SPELL_ENRAGE = 40683, // Increases damage by 50% and attack speed by 30%. 20 seconds, PHASE 5 ONLY + // Flying (Phase 2) + SPELL_THROW_GLAIVE = 39635, // Throws a glaive on the ground + SPELL_THROW_GLAIVE2 = 39849, // Animation for the above spell + SPELL_GLAIVE_RETURNS = 39873, // Glaive flies back to Illidan + SPELL_FIREBALL = 40598, // 2.5k-3.5k damage in 10 yard radius. 2 second cast time. + SPELL_DARK_BARRAGE = 40585, // 10 second channeled spell, 3k shadow damage per second. + // Demon Form + SPELL_DEMON_TRANSFORM_1 = 40511, // First uiPhase of animations for transforming into Dark Illidan (fall to ground) + SPELL_DEMON_TRANSFORM_2 = 40398, // Second uiPhase of animations (kneel) + SPELL_DEMON_TRANSFORM_3 = 40510, // Final uiPhase of animations (stand up and roar) + SPELL_DEMON_FORM = 40506, // Transforms into Demon Illidan. Has an Aura of Dread on him. + SPELL_SHADOW_BLAST = 41078, // 8k - 11k Shadow Damage. Targets highest threat. Has a splash effect, damaging anyone in 20 yards of the target. + SPELL_FLAME_BURST = 41126, // Hurls fire at entire raid for ~3.5k damage every 10 seconds. Resistable. (Does not work: Script effect) + SPELL_FLAME_BURST_EFFECT = 41131, // The actual damage. Handled by core (41126 triggers 41131) + // Other Illidan spells + SPELL_KNEEL = 39656, // Before beginning encounter, this is how he appears (talking to Wilson). + SPELL_SHADOW_PRISON = 40647, // Illidan casts this spell to immobilize entire raid when he summons Maiev. + SPELL_DEATH = 41220, // This spell doesn't do anything except stun Illidan and set him on his knees. + SPELL_BERSERK = 45078, // Damage increased by 500%, attack speed by 150% + + // Non-Illidan spells + SPELL_AKAMA_DOOR_CHANNEL = 41268, // Akama's channel spell on the door before the Temple Summit + SPELL_DEATHSWORN_DOOR_CHANNEL = 41269, // Olum and Udalo's channel spell on the door before the Temple Summit + SPELL_AKAMA_DOOR_FAIL = 41271, // Not sure where this is really used... + SPELL_HEALING_POTION = 40535, // Akama uses this to heal himself to full. + SPELL_AZZINOTH_CHANNEL = 39857, // Glaives cast it on Flames. Not sure if this is the right spell. + SPELL_SHADOW_DEMON_PASSIVE = 41079, // Adds the "shadowform" uiAura to Shadow Demons. + SPELL_CONSUME_SOUL = 41080, // Once the Shadow Demons reach their target, they use this to kill them + SPELL_PARALYZE = 41083, // Shadow Demons cast this on their target + SPELL_PURPLE_BEAM = 39123, // Purple Beam connecting Shadow Demon to their target + SPELL_CAGE_TRAP_DUMMY = 40761, // Put this in DB for cage trap GO. + SPELL_EYE_BLAST_TRIGGER = 40017, // This summons Demon Form every few seconds and deals ~20k damage in its radius + SPELL_EYE_BLAST = 39908, // This does the blue flamey animation. + SPELL_FLAME_CRASH_EFFECT = 40836, // Firey blue ring of circle that the other flame crash summons + SPELL_BLAZE_EFFECT = 40610, // Green flame on the ground, triggers damage (5k) every few seconds + SPELL_BLAZE_SUMMON = 40637, // Summons the Blaze creature + SPELL_DEMON_FIRE = 40029, // Blue fire trail left by Eye Blast. Deals 2k per second if players stand on it. + SPELL_CAGED = 40695, // Caged Trap triggers will cast this on Illidan if he is within 3 yards + SPELL_CAGE_TRAP_SUMMON = 40694, // Summons a Cage Trap GO (bugged) on the ground along with a Cage Trap Disturb Trigger mob (working) + SPELL_CAGE_TRAP_BEAM = 40713, // 8 Triggers on the ground in an octagon cast spells like this on Illidan 'caging him' + SPELL_FLAME_BLAST = 40631, // Flames of Azzinoth use this. Frontal cone AoE 7k-9k damage. + SPELL_CHARGE = 40602, // Flames of Azzinoth charges whoever is too far from them. They enrage after this. For simplicity, we'll use the same enrage as Illidan. + SPELL_TELEPORT_VISUAL = 41232, // Teleport visual for Maiev + SPELL_SHADOWFIEND_PASSIVE = 41913, // Passive uiAura for shadowfiends + + EQUIP_ID_MAIN_HAND = 32837, + EQUIP_ID_OFF_HAND = 32838, +}; // Other defines #define CENTER_X 676.740f #define CENTER_Y 305.297f #define CENTER_Z 353.192f -#define EQUIP_ID_MAIN_HAND 32837 -#define EQUIP_ID_OFF_HAND 32838 - /*** Phase Names ***/ enum Phase { @@ -218,6 +224,7 @@ enum Phase PHASE_DEMON = 4, PHASE_NORMAL_MAIEV = 5, PHASE_DEMON_SEQUENCE = 6, + PHASE_NORMAL_FORM = 7, // Internal marker, for switching back to either NORMAL_2 or NORMAL_MAIEV }; struct Locations @@ -226,7 +233,7 @@ struct Locations uint32 id; }; -static Locations GlaivePosition[]= +static const Locations aGlaivePosition[]= { {695.105f, 305.303f, 354.256f}, {659.338f, 305.303f, 354.256f}, @@ -234,7 +241,7 @@ static Locations GlaivePosition[]= {664.338f, 305.303f, 354.256f} }; -static Locations EyeBlast[]= +static const Locations aEyeBlast[]= { {650.697f, 320.128f, 353.730f}, {652.799f, 275.091f, 353.367f}, @@ -242,7 +249,7 @@ static Locations EyeBlast[]= {709.865f, 325.654f, 353.322f} }; -static Locations AkamaWP[]= +static const Locations aAkamaWP[]= { {770.01f, 304.50f, 312.29f}, // Bottom of the first stairs, at the doors {780.66f, 304.50f, 319.74f}, // Top of the first stairs @@ -256,10 +263,10 @@ static Locations AkamaWP[]= {738.11f, 365.44f, 353.00f}, // in front of the door-thingy (the other one!) {792.18f, 366.62f, 341.42f}, // Down the first flight of stairs {796.84f, 304.89f, 319.76f}, // Down the second flight of stairs - {782.01f, 304.55f, 319.76f} // Final location - back at the initial gates. This is where he will fight the minions! + {782.01f, 304.55f, 319.76f} // Final location - back at the uiInitial gates. This is where he will fight the minions! }; // 755.762, 304.0747, 312.1769 -- This is where Akama should be spawned -static Locations SpiritSpawns[]= +static const Locations aSpiritSpawns[]= { {755.5426f, 309.9156f, 312.2129f, SPIRIT_OF_UDALO}, {755.5426f, 298.7923f, 312.0834f, SPIRIT_OF_OLUM} @@ -280,22 +287,23 @@ struct WayPoints struct Animation // For the demon transformation { - uint32 aura, unaura, timer, size, displayid, phase; - bool equip; + uint32 uiAura, uiUnAura, uiTimer, uiSize, uiDisplayId; + Phase uiPhase; + bool bEquip; }; static Animation DemonTransformation[]= { - {SPELL_DEMON_TRANSFORM_1, 0, 1300, 0, 0, 6, true}, - {SPELL_DEMON_TRANSFORM_2, SPELL_DEMON_TRANSFORM_1, 4000, 0, 0, 6, true}, - {SPELL_DEMON_FORM, 0, 3000, 1073741824, 21322, 6, false}, - {SPELL_DEMON_TRANSFORM_3, SPELL_DEMON_TRANSFORM_2, 3500, 0, 0, 6, false}, - {0, 0, 0, 0, 0, 4, false}, - {SPELL_DEMON_TRANSFORM_1, 0, 1500, 0, 0, 6, false}, - {SPELL_DEMON_TRANSFORM_2, SPELL_DEMON_TRANSFORM_1, 4000, 0, 0, 6, false}, - {0, SPELL_DEMON_FORM, 3000, 1069547520, 21135, 6, false}, - {SPELL_DEMON_TRANSFORM_3, SPELL_DEMON_TRANSFORM_2, 3500, 0, 0, 6, true}, - {0, 0, 0, 0, 0, 8, true} + {SPELL_DEMON_TRANSFORM_1, 0, 1300, 0, 0, PHASE_DEMON_SEQUENCE, true}, + {SPELL_DEMON_TRANSFORM_2, SPELL_DEMON_TRANSFORM_1, 4000, 0, 0, PHASE_DEMON_SEQUENCE, true}, + {SPELL_DEMON_FORM, 0, 3000, 1073741824, 21322, PHASE_DEMON_SEQUENCE, false}, + {SPELL_DEMON_TRANSFORM_3, SPELL_DEMON_TRANSFORM_2, 3500, 0, 0, PHASE_DEMON_SEQUENCE, false}, + {0, 0, 0, 0, 0, PHASE_DEMON, false}, + {SPELL_DEMON_TRANSFORM_1, 0, 1500, 0, 0, PHASE_DEMON_SEQUENCE, false}, + {SPELL_DEMON_TRANSFORM_2, SPELL_DEMON_TRANSFORM_1, 4000, 0, 0, PHASE_DEMON_SEQUENCE, false}, + {0, SPELL_DEMON_FORM, 3000, 1069547520, 21135, PHASE_DEMON_SEQUENCE, false}, + {SPELL_DEMON_TRANSFORM_3, SPELL_DEMON_TRANSFORM_2, 3500, 0, 0, PHASE_DEMON_SEQUENCE, true}, + {0, 0, 0, 0, 0, PHASE_NORMAL_FORM, true} }; /**** Demon Fire will be used for Eye Blast. Illidan needs to have access to it's vars and functions, so we'll set it here ****/ @@ -309,61 +317,64 @@ struct MANGOS_DLL_DECL demonfireAI : public ScriptedAI ScriptedInstance* m_pInstance; - uint64 IllidanGUID; + ObjectGuid m_illidanGuid; - bool IsTrigger; + bool m_bIsTrigger; - uint32 CheckTimer; - uint32 DemonFireTimer; - uint32 DespawnTimer; + uint32 m_uiCheckTimer; + uint32 m_uiDemonFireTimer; + uint32 m_uiDespawnTimer; void Reset() { - IllidanGUID = 0; + m_illidanGuid.Clear(); - IsTrigger = false; + m_bIsTrigger = false; - CheckTimer = 2000; - DemonFireTimer = 0; - DespawnTimer = 45000; + m_uiCheckTimer = 2000; + m_uiDemonFireTimer = 0; + m_uiDespawnTimer = 45000; } void AttackStart(Unit* who) { } void MoveInLineOfSight(Unit *who){ } - void UpdateAI(const uint32 diff) + void UpdateAI(const uint32 uiDiff) { - if (IsTrigger) + if (m_bIsTrigger) return; m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - if (CheckTimer < diff) + if (m_uiCheckTimer < uiDiff) { - if (!IllidanGUID && m_pInstance) + if (!m_illidanGuid && m_pInstance) { if (Creature* pIllidan = m_pInstance->instance->GetCreature(m_pInstance->GetData64(NPC_ILLIDAN_STORMRAGE))) { - IllidanGUID = m_pInstance->GetData64(NPC_ILLIDAN_STORMRAGE); + m_illidanGuid = m_pInstance->GetGuid(NPC_ILLIDAN_STORMRAGE); if (!pIllidan->HasSplineFlag(SPLINEFLAG_NO_SPLINE)) m_creature->SetDeathState(JUST_DIED); } } - CheckTimer = 2000; - }else CheckTimer -= diff; + m_uiCheckTimer = 2000; + } + else + m_uiCheckTimer -= uiDiff; - if (DemonFireTimer < diff) + if (m_uiDemonFireTimer < uiDiff) { DoCastSpellIfCan(m_creature, SPELL_DEMON_FIRE); - DemonFireTimer = 30000; - }else DemonFireTimer -= diff; + m_uiDemonFireTimer = 30000; + } + else + m_uiDemonFireTimer -= uiDiff; - if (DespawnTimer < diff) + if (m_uiDespawnTimer < uiDiff) m_creature->SetDeathState(JUST_DIED); - else DespawnTimer -= diff; - - DoMeleeAttackIfReady(); + else + m_uiDespawnTimer -= uiDiff; } }; @@ -381,30 +392,30 @@ struct MANGOS_DLL_DECL npc_akama_illidanAI : public ScriptedAI ScriptedInstance* m_pInstance; /* Timers */ - uint32 ChannelTimer; - uint32 TalkTimer; - uint32 WalkTimer; - uint32 SummonMinionTimer; + uint32 m_uiChannelTimer; + uint32 m_uiTalkTimer; + uint32 m_uiWalkTimer; + uint32 m_uiSummonMinionTimer; /* GUIDs */ - uint64 IllidanGUID; - uint64 PlayerGUID; - uint64 SpiritGUID[2]; - uint64 ChannelGUID; - - bool IsTalking; - bool StartChanneling; - bool DoorOpen; - bool FightMinions; - bool IsReturningToIllidan; - bool IsWalking; - uint32 TalkCount; - uint32 ChannelCount; + ObjectGuid m_illidanGuid; + ObjectGuid m_playerGuid; + ObjectGuid m_aSpiritGuids[2]; + ObjectGuid m_channelGuid; + + bool m_bIsTalking; + bool m_bStartChanneling; + bool m_bDoorOpen; + bool m_bFightMinions; + bool m_bIsReturningToIllidan; + bool m_bIsWalking; + uint32 m_uiTalkCount; + uint32 m_uiChannelCount; std::list WayPointList; std::list::iterator WayPoint; - void BeginEvent(uint64 PlayerGUID); + void BeginEvent(ObjectGuid playerGuid); void Reset() { @@ -424,28 +435,29 @@ struct MANGOS_DLL_DECL npc_akama_illidanAI : public ScriptedAI } } - IllidanGUID = 0; - PlayerGUID = 0; - ChannelGUID = 0; - for(uint8 i = 0; i < 2; ++i) SpiritGUID[i] = 0; + m_illidanGuid.Clear(); + m_playerGuid.Clear(); + m_channelGuid.Clear(); + for(uint8 i = 0; i < 2; ++i) + m_aSpiritGuids[i].Clear(); - ChannelTimer = 0; - ChannelCount = 0; - SummonMinionTimer = 2000; + m_uiChannelTimer = 0; + m_uiChannelCount = 0; + m_uiSummonMinionTimer = 2000; - WalkTimer = 0; - IsWalking = false; + m_uiWalkTimer = 0; + m_bIsWalking = false; - TalkTimer = 0; - TalkCount = 0; + m_uiTalkTimer = 0; + m_uiTalkCount = 0; KillAllElites(); - IsReturningToIllidan = false; - FightMinions = false; - IsTalking = false; - StartChanneling = false; - DoorOpen = false; + m_bIsReturningToIllidan = false; + m_bFightMinions = false; + m_bIsTalking = false; + m_bStartChanneling = false; + m_bDoorOpen = false; // Database sometimes has strange values.. m_creature->SetUInt32Value(UNIT_NPC_FLAGS, 0); @@ -478,12 +490,12 @@ struct MANGOS_DLL_DECL npc_akama_illidanAI : public ScriptedAI void ReturnToIllidan() { KillAllElites(); - FightMinions = false; - IsReturningToIllidan = true; + m_bFightMinions = false; + m_bIsReturningToIllidan = true; WayPoint = WayPointList.begin(); m_creature->SetSpeedRate(MOVE_RUN, 2.0f); m_creature->RemoveSplineFlag(SPLINEFLAG_WALKMODE); - IsWalking = true; + m_bIsWalking = true; } void AddWaypoint(uint32 id, float x, float y, float z) @@ -492,11 +504,11 @@ struct MANGOS_DLL_DECL npc_akama_illidanAI : public ScriptedAI WayPointList.push_back(AWP); } - void DamageTaken(Unit *done_by, uint32 &damage) + void DamageTaken(Unit* pDealer, uint32& uiDamage) { - if (damage > m_creature->GetHealth() && (done_by->GetGUID() != m_creature->GetGUID())) + if (uiDamage > m_creature->GetHealth() && (pDealer != m_creature)) { - damage = 0; + uiDamage = 0; DoCastSpellIfCan(m_creature, SPELL_HEALING_POTION); } } @@ -507,8 +519,8 @@ struct MANGOS_DLL_DECL npc_akama_illidanAI : public ScriptedAI if (!m_pInstance || m_pInstance->GetData(TYPE_COUNCIL) != DONE) return; - debug_log("SD2: Akama - Door event initiated by player %s", pPlayer->GetName()); - PlayerGUID = pPlayer->GetGUID(); + debug_log("SD2: Akama - Door event initiated by player %s", pPlayer->GetObjectGuid().GetString().c_str()); + m_playerGuid = pPlayer->GetObjectGuid(); if (GameObject* pGate = m_pInstance->instance->GetGameObject(m_pInstance->GetData64(GO_ILLIDAN_GATE))) { @@ -517,7 +529,7 @@ struct MANGOS_DLL_DECL npc_akama_illidanAI : public ScriptedAI Creature* Channel = m_creature->SummonCreature(ILLIDAN_DOOR_TRIGGER, x, y, z+5, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 360000); if (Channel) { - ChannelGUID = Channel->GetGUID(); + m_channelGuid = Channel->GetObjectGuid(); // Invisible but spell visuals can still be seen. Channel->SetDisplayId(11686); @@ -527,15 +539,15 @@ struct MANGOS_DLL_DECL npc_akama_illidanAI : public ScriptedAI m_creature->GetPosition(PosX, PosY, PosZ); for(uint8 i = 0; i < 2; ++i) { - Creature* Spirit = m_creature->SummonCreature(SpiritSpawns[i].id, SpiritSpawns[i].x, SpiritSpawns[i].y, SpiritSpawns[i].z, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 360000); + Creature* Spirit = m_creature->SummonCreature(aSpiritSpawns[i].id, aSpiritSpawns[i].x, aSpiritSpawns[i].y, aSpiritSpawns[i].z, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 360000); if (Spirit) { Spirit->SetVisibility(VISIBILITY_OFF); - SpiritGUID[i] = Spirit->GetGUID(); + m_aSpiritGuids[i] = Spirit->GetGUID(); } } - StartChanneling = true; + m_bStartChanneling = true; m_creature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); DoCastSpellIfCan(Channel, SPELL_AKAMA_DOOR_FAIL); @@ -545,7 +557,7 @@ struct MANGOS_DLL_DECL npc_akama_illidanAI : public ScriptedAI void MovementInform(uint32 type, uint32 id) { - if (type != POINT_MOTION_TYPE || !IsWalking) + if (type != POINT_MOTION_TYPE || !m_bIsWalking) return; if (WayPoint->id != id) @@ -554,7 +566,7 @@ struct MANGOS_DLL_DECL npc_akama_illidanAI : public ScriptedAI switch(id) { case 6: - if (!IsReturningToIllidan) + if (!m_bIsReturningToIllidan) { // open the doors that close the summit for(uint32 i = GO_ILLIDAN_DOOR_R; i < GO_ILLIDAN_DOOR_L+1; ++i) @@ -565,12 +577,12 @@ struct MANGOS_DLL_DECL npc_akama_illidanAI : public ScriptedAI } break; case 7: - if (IsReturningToIllidan) + if (m_bIsReturningToIllidan) { - IsWalking = false; - if (IllidanGUID) + m_bIsWalking = false; + if (m_illidanGuid) { - Creature* Illidan = m_creature->GetMap()->GetCreature(IllidanGUID); + Creature* Illidan = m_creature->GetMap()->GetCreature(m_illidanGuid); if (Illidan) { float dx = Illidan->GetPositionX() + rand()%15; @@ -583,31 +595,31 @@ struct MANGOS_DLL_DECL npc_akama_illidanAI : public ScriptedAI break; case 8: m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - if (!IsReturningToIllidan) + if (!m_bIsReturningToIllidan) { - IsWalking = false; - BeginEvent(PlayerGUID); + m_bIsWalking = false; + BeginEvent(m_playerGuid); } break; case 12: - IsWalking = false; - FightMinions = true; + m_bIsWalking = false; + m_bFightMinions = true; m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); break; } ++WayPoint; - WalkTimer = 200; + m_uiWalkTimer = 200; } void DeleteFromThreatList() { // If we do not have Illidan's GUID, do not proceed - if (!IllidanGUID) + if (!m_illidanGuid) return; // Create a pointer to Illidan - Creature* Illidan = m_creature->GetMap()->GetCreature(IllidanGUID); + Creature* Illidan = m_creature->GetMap()->GetCreature(m_illidanGuid); // No use to continue if Illidan does not exist if (!Illidan) @@ -630,86 +642,88 @@ struct MANGOS_DLL_DECL npc_akama_illidanAI : public ScriptedAI void UpdateAI(const uint32 diff) { - if (IllidanGUID) + if (m_illidanGuid) { - if (Creature* Illidan = m_creature->GetMap()->GetCreature(IllidanGUID)) + if (Creature* Illidan = m_creature->GetMap()->GetCreature(m_illidanGuid)) { if (Illidan->IsInEvadeMode() && !m_creature->IsInEvadeMode()) EnterEvadeMode(); - if (Illidan->GetHealthPercent() < 85.0f && m_creature->isInCombat() && !FightMinions) + if (Illidan->GetHealthPercent() < 85.0f && m_creature->isInCombat() && !m_bFightMinions) { - if (TalkTimer < diff) + if (m_uiTalkTimer < diff) { - switch(TalkCount) + switch(m_uiTalkCount) { case 0: DoScriptText(SAY_AKAMA_MINION, Illidan); - TalkTimer = 8000; - TalkCount = 1; + m_uiTalkTimer = 8000; + m_uiTalkCount = 1; break; case 1: DoScriptText(SAY_AKAMA_LEAVE, m_creature); - TalkTimer = 3000; - TalkCount = 2; + m_uiTalkTimer = 3000; + m_uiTalkCount = 2; break; case 2: - IsTalking = true; - TalkTimer = 2000; + m_bIsTalking = true; + m_uiTalkTimer = 2000; m_creature->RemoveAllAuras(); m_creature->CombatStop(true); m_creature->AttackStop(); m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - TalkCount = 3; + m_uiTalkCount = 3; break; case 3: DeleteFromThreatList(); - IsWalking = true; + m_bIsWalking = true; WayPoint = WayPointList.begin(); std::advance(WayPoint, 9); m_creature->RemoveSplineFlag(SPLINEFLAG_WALKMODE); break; } - }else TalkTimer -= diff; + } + else + m_uiTalkTimer -= diff; } - if (Illidan->GetHealthPercent() < 4.0f && !IsReturningToIllidan) + if (Illidan->GetHealthPercent() < 4.0f && !m_bIsReturningToIllidan) ReturnToIllidan(); } }else { if (m_pInstance) - IllidanGUID = m_pInstance->GetData64(NPC_ILLIDAN_STORMRAGE); + m_illidanGuid = m_pInstance->GetData64(NPC_ILLIDAN_STORMRAGE); } - if (IsWalking && WalkTimer) + if (m_bIsWalking && m_uiWalkTimer) { - if (WalkTimer <= diff) + if (m_uiWalkTimer <= diff) { if (WayPoint == WayPointList.end()) return; m_creature->GetMotionMaster()->MovePoint(WayPoint->id, WayPoint->x, WayPoint->y,WayPoint->z); - WalkTimer = 0; - }else WalkTimer -= diff; + m_uiWalkTimer = 0; + }else m_uiWalkTimer -= diff; } - if (StartChanneling) + if (m_bStartChanneling) { - if (ChannelTimer < diff) + if (m_uiChannelTimer < diff) { - switch(ChannelCount) + switch(m_uiChannelCount) { case 3: - if (!DoorOpen) + if (!m_bDoorOpen) { m_creature->InterruptNonMeleeSpells(true); for(uint8 i = 0; i < 2; ++i) { - if (SpiritGUID[i]) + if (m_aSpiritGuids[i]) { - Creature* Spirit = m_creature->GetMap()->GetCreature(SpiritGUID[i]); + Creature* Spirit = m_creature->GetMap()->GetCreature(m_aSpiritGuids[i]); if (Spirit) Spirit->InterruptNonMeleeSpells(true); } @@ -718,38 +732,38 @@ struct MANGOS_DLL_DECL npc_akama_illidanAI : public ScriptedAI if (GameObject* pGate = m_pInstance->instance->GetGameObject(m_pInstance->GetData64(GO_ILLIDAN_GATE))) pGate->SetGoState(GO_STATE_ACTIVE); - ++ChannelCount; - ChannelTimer = 5000; + ++m_uiChannelCount; + m_uiChannelTimer = 5000; } break; case 4: m_creature->HandleEmote(EMOTE_ONESHOT_SALUTE); - ChannelTimer = 2000; - ++ChannelCount; + m_uiChannelTimer = 2000; + ++m_uiChannelCount; break; case 5: DoScriptText(SAY_AKAMA_BEWARE, m_creature); - if (ChannelGUID) + if (m_channelGuid) { - Creature* ChannelTarget = m_creature->GetMap()->GetCreature(ChannelGUID); + Creature* ChannelTarget = m_creature->GetMap()->GetCreature(m_channelGuid); if (ChannelTarget) ChannelTarget->SetDeathState(JUST_DIED); - ChannelGUID = 0; + m_channelGuid.Clear(); } for(uint8 i = 0; i < 2; ++i) { - if (SpiritGUID[i]) + if (m_aSpiritGuids[i]) { - Creature* Spirit = m_creature->GetMap()->GetCreature(SpiritGUID[i]); + Creature* Spirit = m_creature->GetMap()->GetCreature(m_aSpiritGuids[i]); if (Spirit) Spirit->SetDeathState(JUST_DIED); } } - ChannelTimer = 6000; - ++ChannelCount; + m_uiChannelTimer = 6000; + ++m_uiChannelCount; break; case 6: - StartChanneling = false; + m_bStartChanneling = false; if (WayPointList.empty()) { error_log("SD2: Akama has no waypoints to start with!"); @@ -759,25 +773,25 @@ struct MANGOS_DLL_DECL npc_akama_illidanAI : public ScriptedAI WayPoint = WayPointList.begin(); m_creature->AddSplineFlag(SPLINEFLAG_WALKMODE); m_creature->GetMotionMaster()->MovePoint(WayPoint->id, WayPoint->x, WayPoint->y, WayPoint->z); - IsWalking = true; + m_bIsWalking = true; break; default: - if (ChannelGUID) + if (m_channelGuid) { - Creature* Channel = m_creature->GetMap()->GetCreature(ChannelGUID); + Creature* Channel = m_creature->GetMap()->GetCreature(m_channelGuid); if (Channel) { m_creature->InterruptNonMeleeSpells(true); for(uint8 i = 0; i < 2; ++i) { - if (SpiritGUID[i]) + if (m_aSpiritGuids[i]) { - Creature* Spirit = m_creature->GetMap()->GetCreature(SpiritGUID[i]); + Creature* Spirit = m_creature->GetMap()->GetCreature(m_aSpiritGuids[i]); if (Spirit) { Spirit->InterruptNonMeleeSpells(true); - if (ChannelCount%2 == 0) + if (m_uiChannelCount%2 == 0) { Spirit->CastSpell(Channel, SPELL_DEATHSWORN_DOOR_CHANNEL,false); DoCastSpellIfCan(Channel, SPELL_AKAMA_DOOR_CHANNEL); @@ -790,23 +804,25 @@ struct MANGOS_DLL_DECL npc_akama_illidanAI : public ScriptedAI } } } - if (ChannelCount < 3) - ++ChannelCount; - ChannelTimer = 10000; + if (m_uiChannelCount < 3) + ++m_uiChannelCount; + m_uiChannelTimer = 10000; } } break; } - }else ChannelTimer -= diff; + } + else + m_uiChannelTimer -= diff; } - if (FightMinions) + if (m_bFightMinions) { - if (SummonMinionTimer < diff) + if (m_uiSummonMinionTimer < diff) { - if (IllidanGUID) + if (m_illidanGuid) { - Creature* Illidan = m_creature->GetMap()->GetCreature(IllidanGUID); + Creature* Illidan = m_creature->GetMap()->GetCreature(m_illidanGuid); if (!Illidan || Illidan->IsInEvadeMode()) { Reset(); @@ -824,8 +840,10 @@ struct MANGOS_DLL_DECL npc_akama_illidanAI : public ScriptedAI Elite->AddThreat(m_creature, 1000000.0f); AttackStart(Elite); } - SummonMinionTimer = urand(10000, 16000); - }else SummonMinionTimer -= diff; + m_uiSummonMinionTimer = urand(10000, 16000); + } + else + m_uiSummonMinionTimer -= diff; } // If we don't have a target, or is talking, or has run away, return @@ -841,16 +859,6 @@ struct MANGOS_DLL_DECL boss_illidan_stormrageAI : public ScriptedAI boss_illidan_stormrageAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - - for(uint8 i = 0; i < 2; ++i) - { - FlameGUID[i] = 0; - GlaiveGUID[i] = 0; - } - - AkamaGUID = 0; - MaievGUID = 0; - Reset(); } @@ -858,73 +866,72 @@ struct MANGOS_DLL_DECL boss_illidan_stormrageAI : public ScriptedAI ScriptedInstance* m_pInstance; /** Generic **/ - bool IsTalking; - bool HasSummoned; - bool RefaceVictim; - bool InformAkama; - uint32 Phase; - uint32 GlobalTimer; - uint32 TalkCount; - uint32 DemonFormSequence; + bool m_bIsTalking; + bool m_bHasSummoned; + bool m_bRefaceVictim; + uint32 m_uiPhase; + uint32 m_uiGlobalTimer; + uint32 m_uiTalkCount; + uint32 m_uiDemonFormSequence; /** GUIDs **/ - uint64 FlameGUID[2]; - uint64 GlaiveGUID[2]; - uint64 AkamaGUID; - uint64 MaievGUID; + ObjectGuid m_flameGuids[2]; + ObjectGuid m_glaiveGuids[2]; + ObjectGuid m_akamaGuid; + ObjectGuid m_maievGuid; /** Timers **/ - uint32 ShearTimer; - uint32 DrawSoulTimer; - uint32 FlameCrashTimer; - uint32 ParasiticShadowFiendTimer; - uint32 FireballTimer; - uint32 EyeBlastTimer; - uint32 DarkBarrageTimer; - uint32 SummonBladesTimer; // Animate summoning the Blades of Azzinoth in Phase 2 - uint32 SummonFlamesTimer; // Summon Flames of Azzinoth in Phase 2 - uint32 CheckFlamesTimer; // This is used to check the status of the Flames to see if we should begin entering Phase 3 or not. - uint32 RetrieveBladesTimer; // Animate retrieving the Blades of Azzinoth in Phase 2 -> 3 transition - uint32 LandTimer; // This is used at the end of phase 2 to signal Illidan landing after Flames are dead - uint32 AgonizingFlamesTimer; - uint32 ShadowBlastTimer; - uint32 FlameBurstTimer; - uint32 ShadowDemonTimer; - uint32 TalkTimer; - uint32 TransformTimer; - uint32 EnrageTimer; - uint32 CageTimer; - uint32 LayTrapTimer; - uint32 AnimationTimer; - uint32 TauntTimer; // This is used for his random yells - uint32 FaceVictimTimer; - uint32 BerserkTimer; + uint32 m_uiShearTimer; + uint32 m_uiDrawSoulTimer; + uint32 m_uiFlameCrashTimer; + uint32 m_uiParasiticShadowFiendTimer; + uint32 m_uiFireballTimer; + uint32 m_uiEyeBlastTimer; + uint32 m_uiDarkBarrageTimer; + uint32 m_uiSummonBladesTimer; // Animate summoning the Blades of Azzinoth in Phase 2 + uint32 m_uiSummonFlamesTimer; // Summon Flames of Azzinoth in Phase 2 + uint32 m_uiCheckFlamesTimer; // This is used to check the status of the Flames to see if we should begin entering Phase 3 or not. + uint32 m_uiRetrieveBladesTimer; // Animate retrieving the Blades of Azzinoth in Phase 2 -> 3 transition + uint32 m_uiLandTimer; // This is used at the end of uiPhase 2 to signal Illidan landing after Flames are dead + uint32 m_uiAgonizingFlamesTimer; + uint32 m_uiShadowBlastTimer; + uint32 m_uiFlameBurstTimer; + uint32 m_uiShadowDemonTimer; + uint32 m_uiTalkTimer; + uint32 m_uiTransformTimer; + uint32 m_uiEnrageTimer; + uint32 m_uiCageTimer; + uint32 m_uiLayTrapTimer; + uint32 m_uiAnimationTimer; + uint32 m_uiTauntTimer; // This is used for his random yells + uint32 m_uiFaceVictimTimer; + uint32 m_uiBerserkTimer; void Reset() { - Phase = PHASE_NORMAL; + m_uiPhase = PHASE_NORMAL; // Check if any flames/glaives are alive/existing. Kill if alive and set GUIDs to 0 for(uint8 i = 0; i < 2; ++i) { - if (Creature* Flame = m_creature->GetMap()->GetCreature(FlameGUID[i])) + if (Creature* pFlame = m_creature->GetMap()->GetCreature(m_flameGuids[i])) { - if (Flame->isAlive()) - Flame->SetDeathState(JUST_DIED); + if (pFlame->isAlive()) + pFlame->SetDeathState(JUST_DIED); - FlameGUID[i] = 0; + m_flameGuids[i].Clear(); } - if (Creature* Glaive = m_creature->GetMap()->GetCreature(GlaiveGUID[i])) + if (Creature* pGlaive = m_creature->GetMap()->GetCreature(m_glaiveGuids[i])) { - if (Glaive->isAlive()) - Glaive->SetDeathState(JUST_DIED); + if (pGlaive->isAlive()) + pGlaive->SetDeathState(JUST_DIED); - GlaiveGUID[i] = 0; + m_glaiveGuids[i].Clear(); } } - if (Creature* pAkama = m_creature->GetMap()->GetCreature(AkamaGUID)) + if (Creature* pAkama = m_creature->GetMap()->GetCreature(m_akamaGuid)) { if (!pAkama->isAlive()) pAkama->Respawn(); @@ -932,43 +939,42 @@ struct MANGOS_DLL_DECL boss_illidan_stormrageAI : public ScriptedAI pAkama->AI()->EnterEvadeMode(); } - InformAkama = false; - RefaceVictim = false; - HasSummoned = false; + m_bRefaceVictim = false; + m_bHasSummoned = false; - FaceVictimTimer = 1000; - BerserkTimer = 1500000; - GlobalTimer = 0; - DemonFormSequence = 0; + m_uiFaceVictimTimer = 1000; + m_uiBerserkTimer = 1500000; + m_uiGlobalTimer = 0; + m_uiDemonFormSequence = 0; /** Normal Form **/ - ShearTimer = urand(20000, 30000); // 20 to 30 seconds - FlameCrashTimer = 30000; // 30 seconds - ParasiticShadowFiendTimer = 25000; // 25 seconds - DrawSoulTimer = 50000; // 50 seconds + m_uiShearTimer = urand(20000, 30000); // 20 to 30 seconds + m_uiFlameCrashTimer = 30000; // 30 seconds + m_uiParasiticShadowFiendTimer = 25000; // 25 seconds + m_uiDrawSoulTimer = 50000; // 50 seconds /** Phase 2 **/ - SummonBladesTimer = 10000; - SummonFlamesTimer = 20000; // Phase 2 timers may be incorrect - FireballTimer = 5000; - DarkBarrageTimer = 45000; - EyeBlastTimer = 30000; - CheckFlamesTimer = 5000; - RetrieveBladesTimer = 5000; - LandTimer = 0; + m_uiSummonBladesTimer = 10000; + m_uiSummonFlamesTimer = 20000; // Phase 2 timers may be incorrect + m_uiFireballTimer = 5000; + m_uiDarkBarrageTimer = 45000; + m_uiEyeBlastTimer = 30000; + m_uiCheckFlamesTimer = 5000; + m_uiRetrieveBladesTimer = 5000; + m_uiLandTimer = 0; /** Phase 3+ **/ - AgonizingFlamesTimer = 35000; // Phase 3+ timers may be incorrect - ShadowBlastTimer = 3000; - FlameBurstTimer = 10000; - ShadowDemonTimer = 30000; - TransformTimer = 90000; - EnrageTimer = 40000; - CageTimer = 30000; - LayTrapTimer = CageTimer + 2000; - AnimationTimer = 0; - - TauntTimer = 30000; // This timer may be off. + m_uiAgonizingFlamesTimer = 35000; // Phase 3+ timers may be incorrect + m_uiShadowBlastTimer = 3000; + m_uiFlameBurstTimer = 10000; + m_uiShadowDemonTimer = 30000; + m_uiTransformTimer = 90000; + m_uiEnrageTimer = 40000; + m_uiCageTimer = 30000; + m_uiLayTrapTimer = m_uiCageTimer + 2000; + m_uiAnimationTimer = 0; + + m_uiTauntTimer = 30000; // This timer may be off. m_creature->SetDisplayId(21135); m_creature->InterruptNonMeleeSpells(false); @@ -980,57 +986,64 @@ struct MANGOS_DLL_DECL boss_illidan_stormrageAI : public ScriptedAI m_creature->RemoveSplineFlag(SPLINEFLAG_NO_SPLINE); - IsTalking = false; + m_bIsTalking = false; - TalkCount = 0; - TalkTimer = 0; + m_uiTalkCount = 0; + m_uiTalkTimer = 0; if (m_pInstance) m_pInstance->SetData(TYPE_ILLIDAN, NOT_STARTED); } - void AttackStart(Unit *who) + void GetAIInformation(ChatHandler& reader) { - if (!who || IsTalking || Phase == 2 || Phase == 4 || Phase == 6 || m_creature->HasAura(SPELL_KNEEL, EFFECT_INDEX_0)) + reader.PSendSysMessage("Boss Illidan, current uiPhase = %u, m_uiDemonFormSequence = %u", m_uiPhase, m_uiDemonFormSequence); + reader.PSendSysMessage("Boolean Vars: m_bIsTalking is %s, m_bHasSummoned is %s, m_bRefaceVictim is %s", m_bIsTalking ? "true" : "false", m_bHasSummoned ? "true" : "false", m_bRefaceVictim ? "true" : "false"); + reader.PSendSysMessage("Guids: Akama is %s, Maiev is %s", m_akamaGuid.GetString().c_str(), m_maievGuid.GetString().c_str()); + } + + void AttackStart(Unit* pWho) + { + if (!pWho || m_bIsTalking || m_uiPhase == PHASE_FLIGHT || m_uiPhase == PHASE_DEMON || m_uiPhase == PHASE_DEMON_SEQUENCE || m_creature->HasAura(SPELL_KNEEL, EFFECT_INDEX_0)) return; - if (who == m_creature) + if (pWho == m_creature) return; - if (m_creature->Attack(who, true)) + if (m_creature->Attack(pWho, true)) { - m_creature->AddThreat(who); - m_creature->SetInCombatWith(who); - who->SetInCombatWith(m_creature); + m_creature->AddThreat(pWho); + m_creature->SetInCombatWith(pWho); + pWho->SetInCombatWith(m_creature); - DoStartMovement(who); + DoStartMovement(pWho); } } - void MoveInLineOfSight(Unit *who) + void MoveInLineOfSight(Unit* pWho) { - if (!who || m_creature->getVictim() || IsTalking || m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE)) + if (!pWho || m_creature->getVictim() || m_bIsTalking || m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE)) return; - if (who->isTargetableForAttack() && who->isInAccessablePlaceFor(m_creature) && m_creature->IsHostileTo(who)) + if (pWho->isTargetableForAttack() && pWho->isInAccessablePlaceFor(m_creature) && m_creature->IsHostileTo(pWho)) { - if (!m_creature->CanFly() && m_creature->GetDistanceZ(who) > CREATURE_Z_ATTACK_RANGE) + if (!m_creature->CanFly() && m_creature->GetDistanceZ(pWho) > CREATURE_Z_ATTACK_RANGE) return; - float attackRadius = m_creature->GetAttackDistance(who); - if (m_creature->IsWithinDistInMap(who, attackRadius) && m_creature->IsWithinLOSInMap(who)) + float attackRadius = m_creature->GetAttackDistance(pWho); + if (m_creature->IsWithinDistInMap(pWho, attackRadius) && m_creature->IsWithinLOSInMap(pWho)) { - who->RemoveSpellsCausingAura(SPELL_AURA_MOD_STEALTH); - AttackStart(who); + pWho->RemoveSpellsCausingAura(SPELL_AURA_MOD_STEALTH); + AttackStart(pWho); } } } - void JustDied(Unit *killer) + void JustDied(Unit* pKiller) { - IsTalking = false; - TalkCount = 0; - TalkTimer = 0; + m_bIsTalking = false; + m_uiTalkCount = 0; + m_uiTalkTimer = 0; m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); @@ -1049,31 +1062,31 @@ struct MANGOS_DLL_DECL boss_illidan_stormrageAI : public ScriptedAI } - void KilledUnit(Unit *victim) + void KilledUnit(Unit* pVictim) { - if (victim == m_creature) + if (pVictim == m_creature) return; DoScriptText(urand(0, 1) ? SAY_KILL1 : SAY_KILL2, m_creature); } - void DamageTaken(Unit *done_by, uint32 &damage) + void DamageTaken(Unit* pDealer, uint32& uiDamage) { - if (damage > m_creature->GetHealth()) // Don't let ourselves be slain before we do our death speech + if (uiDamage > m_creature->GetHealth()) // Don't let ourselves be slain before we do our death speech { - damage = 0; + uiDamage = 0; m_creature->SetHealth(m_creature->GetMaxHealth()/100); } } - void Cast(Unit* victim, uint32 Spell, bool triggered = false) + void Cast(Unit* pVictim, uint32 uiSpellId, bool bTriggered = false) { - if (!victim) + if (!pVictim) return; - RefaceVictim = true; - m_creature->SetTargetGuid(victim->GetObjectGuid()); - m_creature->CastSpell(victim, Spell, triggered); + m_bRefaceVictim = true; + m_creature->SetTargetGuid(pVictim->GetObjectGuid()); + m_creature->CastSpell(pVictim, uiSpellId, bTriggered); } /** This will handle the cast of eye blast **/ @@ -1081,30 +1094,30 @@ struct MANGOS_DLL_DECL boss_illidan_stormrageAI : public ScriptedAI { m_creature->InterruptNonMeleeSpells(false); - DarkBarrageTimer += 10000; + m_uiDarkBarrageTimer += 10000; DoScriptText(SAY_EYE_BLAST, m_creature); - uint32 initial = urand(0, 3); - uint32 final = 0; + uint32 uiInitial = urand(0, 3); + uint32 uiFinal = 0; - if (initial < 3) - final = initial+1; + if (uiInitial < 3) + uiFinal = uiInitial+1; - float initial_X = EyeBlast[initial].x; - float initial_Y = EyeBlast[initial].y; - float initial_Z = EyeBlast[initial].z; + float initial_X = aEyeBlast[uiInitial].x; + float initial_Y = aEyeBlast[uiInitial].y; + float initial_Z = aEyeBlast[uiInitial].z; - float final_X = EyeBlast[final].x; - float final_Y = EyeBlast[final].y; - float final_Z = EyeBlast[final].z; + float final_X = aEyeBlast[uiFinal].x; + float final_Y = aEyeBlast[uiFinal].y; + float final_Z = aEyeBlast[uiFinal].z; for(uint8 i = 0; i < 2; ++i) { if (Creature* pTrigger = m_creature->SummonCreature(DEMON_FIRE, initial_X, initial_Y, initial_Z, 0, TEMPSUMMON_TIMED_DESPAWN, 20000)) { if (demonfireAI* pTriggerAI = dynamic_cast(pTrigger->AI())) - pTriggerAI->IsTrigger = true; + pTriggerAI->m_bIsTrigger = true; pTrigger->GetMotionMaster()->MovePoint(0, final_X, final_Y, final_Z); @@ -1138,43 +1151,43 @@ struct MANGOS_DLL_DECL boss_illidan_stormrageAI : public ScriptedAI int32 text = 0; - if (Conversation[count].textId) - text = Conversation[count].textId; + if (aConversation[count].textId) + text = aConversation[count].textId; - TalkTimer = Conversation[count].timer; - uint32 emote = Conversation[count].emote; - IsTalking = Conversation[count].Talk; + m_uiTalkTimer = aConversation[count].timer; + uint32 emote = aConversation[count].emote; + m_bIsTalking = aConversation[count].Talk; Creature* pCreature = NULL; - uint64 GUID = 0; + ObjectGuid Guid; - if (Conversation[count].creature == ILLIDAN_STORMRAGE) + if (aConversation[count].creature == ILLIDAN_STORMRAGE) pCreature = m_creature; - else if (Conversation[count].creature == AKAMA) + else if (aConversation[count].creature == AKAMA) { - if (!AkamaGUID) + if (!m_akamaGuid) { if (m_pInstance) { - AkamaGUID = m_pInstance->GetData64(NPC_AKAMA); - if (!AkamaGUID) + m_akamaGuid = m_pInstance->GetGuid(NPC_AKAMA); + if (!m_akamaGuid) return; - GUID = AkamaGUID; + Guid = m_akamaGuid; } } - else GUID = AkamaGUID; + else Guid = m_akamaGuid; } - else if (Conversation[count].creature == MAIEV_SHADOWSONG) + else if (aConversation[count].creature == MAIEV_SHADOWSONG) { - if (!MaievGUID) + if (!m_maievGuid) return; - GUID = MaievGUID; + Guid = m_maievGuid; } - else if (Conversation[count].creature == EMPTY) // This is just for special cases without speech/sounds/emotes. + else if (aConversation[count].creature == EMPTY) // This is just for special cases without speech/sounds/emotes. return; - if (GUID) // Now we check if we actually specified a GUID, if so: + if (Guid) // Now we check if we actually specified a GUID, if so: // we grab a pointer to that creature - pCreature = m_creature->GetMap()->GetCreature(GUID); + pCreature = m_creature->GetMap()->GetCreature(Guid); if (pCreature) { @@ -1190,35 +1203,31 @@ struct MANGOS_DLL_DECL boss_illidan_stormrageAI : public ScriptedAI pCreature->GetMotionMaster()->MovePoint(0, X, Y, Z); } - void HandleDemonTransformAnimation(uint32 count) + void HandleDemonTransformAnimation(uint32 uiSequenceCount) { - uint32 unaura = DemonTransformation[count].unaura; - uint32 aura = DemonTransformation[count].aura; - uint32 displayid = DemonTransformation[count].displayid; - AnimationTimer = DemonTransformation[count].timer; - uint32 size = DemonTransformation[count].size; + m_uiAnimationTimer = DemonTransformation[uiSequenceCount].uiTimer; m_creature->InterruptNonMeleeSpells(false); - if (DemonTransformation[count].phase != 8) + if (DemonTransformation[uiSequenceCount].uiPhase != PHASE_NORMAL_FORM) { m_creature->GetMotionMaster()->Clear(); m_creature->GetMotionMaster()->MoveIdle(); } - if (unaura) - m_creature->RemoveAurasDueToSpell(unaura); + if (DemonTransformation[uiSequenceCount].uiUnAura) + m_creature->RemoveAurasDueToSpell(DemonTransformation[uiSequenceCount].uiUnAura); - if (aura) - DoCastSpellIfCan(m_creature, aura, CAST_TRIGGERED); + if (DemonTransformation[uiSequenceCount].uiAura) + DoCastSpellIfCan(m_creature, DemonTransformation[uiSequenceCount].uiAura, CAST_TRIGGERED); - if (displayid) + if (DemonTransformation[uiSequenceCount].uiDisplayId) // It's morphin time! - m_creature->SetDisplayId(displayid); - /*if (size) - m_creature->SetUInt32Value(OBJECT_FIELD_SCALE_X, size); // Let us grow! (or shrink)*/ + m_creature->SetDisplayId(DemonTransformation[uiSequenceCount].uiDisplayId); + /*if (DemonTransformation[uiSequenceCount].uiSize) + m_creature->SetUInt32Value(OBJECT_FIELD_SCALE_X, DemonTransformation[uiSequenceCount].uiSize); // Let us grow! (or shrink)*/ - if (DemonTransformation[count].equip) + if (DemonTransformation[uiSequenceCount].bEquip) { // Requip warglaives if needed SetEquipmentSlots(false, EQUIP_ID_MAIN_HAND, EQUIP_ID_OFF_HAND, EQUIP_NO_CHANGE); @@ -1229,24 +1238,26 @@ struct MANGOS_DLL_DECL boss_illidan_stormrageAI : public ScriptedAI SetEquipmentSlots(false, EQUIP_UNEQUIP, EQUIP_UNEQUIP, EQUIP_NO_CHANGE); } - if (DemonTransformation[count].phase != 8) - Phase = DemonTransformation[count].phase; // Set phase properly + if (DemonTransformation[uiSequenceCount].uiPhase != PHASE_NORMAL_FORM) + m_uiPhase = DemonTransformation[uiSequenceCount].uiPhase; // Set uiPhase properly else { // Refollow and attack our old victim m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); - // Depending on whether we summoned Maiev, we switch to either phase 5 or 3 - if (MaievGUID) Phase = PHASE_NORMAL_MAIEV; - else Phase = PHASE_NORMAL_2; + // Depending on whether we summoned Maiev, we switch to either uiPhase 5 or 3 + if (m_maievGuid) + m_uiPhase = PHASE_NORMAL_MAIEV; + else + m_uiPhase = PHASE_NORMAL_2; } - if (count == 7) + if (uiSequenceCount == 7) { DoResetThreat(); m_creature->RemoveAurasDueToSpell(SPELL_DEMON_FORM); } - else if (count == 4) + else if (uiSequenceCount == 4) { DoResetThreat(); if (!m_creature->HasAura(SPELL_DEMON_FORM, EFFECT_INDEX_0)) @@ -1259,11 +1270,11 @@ struct MANGOS_DLL_DECL boss_illidan_stormrageAI : public ScriptedAI { DoScriptText(SAY_TAKEOFF, m_creature); - SummonBladesTimer = 10000; // Summon Glaives when this decrements - SummonFlamesTimer = 20000; // Summon Flames when this decrements - GlobalTimer += 20000; - LandTimer = 0; - Phase = PHASE_FLIGHT; + m_uiSummonBladesTimer = 10000; // Summon Glaives when this decrements + m_uiSummonFlamesTimer = 20000; // Summon Flames when this decrements + m_uiGlobalTimer += 20000; + m_uiLandTimer = 0; + m_uiPhase = PHASE_FLIGHT; m_creature->RemoveAllAuras(); m_creature->SetTargetGuid(ObjectGuid()); @@ -1276,10 +1287,10 @@ struct MANGOS_DLL_DECL boss_illidan_stormrageAI : public ScriptedAI m_creature->GetMotionMaster()->MovePoint(0, CENTER_X, CENTER_Y, CENTER_Z); for(uint8 i = 0; i < 2; ++i) { - Creature* Glaive = m_creature->SummonCreature(BLADE_OF_AZZINOTH, GlaivePosition[i].x, GlaivePosition[i].y, GlaivePosition[i].z, 0, TEMPSUMMON_CORPSE_DESPAWN, 0); + Creature* Glaive = m_creature->SummonCreature(BLADE_OF_AZZINOTH, aGlaivePosition[i].x, aGlaivePosition[i].y, aGlaivePosition[i].z, 0, TEMPSUMMON_CORPSE_DESPAWN, 0); if (Glaive) { - GlaiveGUID[i] = Glaive->GetGUID(); // We need this to remove them later on + m_glaiveGuids[i] = Glaive->GetObjectGuid(); // We need this to remove them later on Glaive->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); Glaive->SetVisibility(VISIBILITY_OFF); Glaive->setFaction(m_creature->getFaction()); @@ -1291,8 +1302,8 @@ struct MANGOS_DLL_DECL boss_illidan_stormrageAI : public ScriptedAI { m_creature->GetMotionMaster()->Clear(false); - LandTimer = 0; - RetrieveBladesTimer = 0; + m_uiLandTimer = 0; + m_uiRetrieveBladesTimer = 0; // Make it look like we're throwing the glaives on the ground DoCastSpellIfCan(m_creature, SPELL_THROW_GLAIVE2); @@ -1304,7 +1315,7 @@ struct MANGOS_DLL_DECL boss_illidan_stormrageAI : public ScriptedAI for(uint8 i = 0; i < 2; ++i) { Creature* Glaive = NULL; - Glaive = m_creature->GetMap()->GetCreature(GlaiveGUID[i]); + Glaive = m_creature->GetMap()->GetCreature(m_glaiveGuids[i]); if (Glaive) { DoCastSpellIfCan(Glaive, SPELL_THROW_GLAIVE, CAST_TRIGGERED); @@ -1321,10 +1332,10 @@ struct MANGOS_DLL_DECL boss_illidan_stormrageAI : public ScriptedAI { Creature* Flame = NULL; Creature* Glaive = NULL; - Glaive = m_creature->GetMap()->GetCreature(GlaiveGUID[i]); + Glaive = m_creature->GetMap()->GetCreature(m_glaiveGuids[i]); if (Glaive) { - Flame = m_creature->SummonCreature(FLAME_OF_AZZINOTH, GlaivePosition[i+2].x, GlaivePosition[i+2].y, GlaivePosition[i+2].z, 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 5000); + Flame = m_creature->SummonCreature(FLAME_OF_AZZINOTH, aGlaivePosition[i+2].x, aGlaivePosition[i+2].y, aGlaivePosition[i+2].z, 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 5000); if (Flame) { // Just in case the database has it as a different faction @@ -1333,8 +1344,8 @@ struct MANGOS_DLL_DECL boss_illidan_stormrageAI : public ScriptedAI // Attack our target! Flame->AI()->AttackStart(m_creature->getVictim()); - // Record GUID in order to check if they're dead later on to move to the next phase - FlameGUID[i] = Flame->GetGUID(); + // Record GUID in order to check if they're dead later on to move to the next uiPhase + m_flameGuids[i] = Flame->GetObjectGuid(); // Glaives do some random Beam type channel on it. Glaive->CastSpell(Flame, SPELL_AZZINOTH_CHANNEL, true); @@ -1354,13 +1365,13 @@ struct MANGOS_DLL_DECL boss_illidan_stormrageAI : public ScriptedAI } } DoResetThreat(); // And now reset our threatlist - HasSummoned = true; + m_bHasSummoned = true; } void SummonMaiev() { - TauntTimer += 4000; - GlobalTimer += 4000; + m_uiTauntTimer += 4000; + m_uiGlobalTimer += 4000; m_creature->InterruptNonMeleeSpells(false); // Interrupt any of our spells Creature* Maiev = NULL; // Summon Maiev near Illidan @@ -1372,11 +1383,11 @@ struct MANGOS_DLL_DECL boss_illidan_stormrageAI : public ScriptedAI // Just in case someone is unaffected by Shadow Prison m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); DoCastSpellIfCan(m_creature, SPELL_SHADOW_PRISON, CAST_TRIGGERED); - TalkCount = 10; - IsTalking = true; // We are now talking/ + m_uiTalkCount = 10; + m_bIsTalking = true; // We are now talking/ Maiev->SetVisibility(VISIBILITY_OFF); // Leave her invisible until she has to talk Maiev->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - MaievGUID = Maiev->GetGUID(); + m_maievGuid = Maiev->GetObjectGuid(); } else // If Maiev cannot be summoned, reset the encounter and post some errors to the console. { @@ -1395,9 +1406,9 @@ struct MANGOS_DLL_DECL boss_illidan_stormrageAI : public ScriptedAI m_creature->GetMotionMaster()->Clear(false); // No moving! m_creature->GetMotionMaster()->MoveIdle(); - if (MaievGUID) + if (m_maievGuid) { - if (Creature* Maiev = m_creature->GetMap()->GetCreature(MaievGUID)) + if (Creature* Maiev = m_creature->GetMap()->GetCreature(m_maievGuid)) { Maiev->CombatStop(true); // Maiev shouldn't do anything either. No point in her attacking us =] Maiev->GetMotionMaster()->Clear(false); // Stop her from moving as well @@ -1413,18 +1424,18 @@ struct MANGOS_DLL_DECL boss_illidan_stormrageAI : public ScriptedAI Maiev->SetTargetGuid(m_creature->GetObjectGuid()); } } - IsTalking = true; - ++TalkCount; + m_bIsTalking = true; + ++m_uiTalkCount; } - void UpdateAI(const uint32 diff) + void UpdateAI(const uint32 uiDiff) { /*** This section will handle the conversations ***/ - if (IsTalking) // Somewhat more efficient using a function rather than a long switch + if (m_bIsTalking) // Somewhat more efficient using a function rather than a long switch { - if (TalkTimer < diff) + if (m_uiTalkTimer < uiDiff) { - switch(TalkCount) // This is only for specialized cases + switch(m_uiTalkCount) // This is only for specialized cases { case 0: // Time to stand up! @@ -1437,16 +1448,16 @@ struct MANGOS_DLL_DECL boss_illidan_stormrageAI : public ScriptedAI m_creature->setFaction(14); break; case 9: - if (AkamaGUID) + if (m_akamaGuid) { - if (Creature* pAkama = m_creature->GetMap()->GetCreature(AkamaGUID)) + if (Creature* pAkama = m_creature->GetMap()->GetCreature(m_akamaGuid)) { // Start attacking Akama AttackStart(pAkama); // Akama stop talk and start attack illidan if (npc_akama_illidanAI* pAkamaAI = dynamic_cast(pAkama->AI())) - pAkamaAI->IsTalking = false; + pAkamaAI->m_bIsTalking = false; pAkama->AI()->AttackStart(m_creature); pAkama->AddThreat(m_creature, 1000000.0f); @@ -1458,9 +1469,9 @@ struct MANGOS_DLL_DECL boss_illidan_stormrageAI : public ScriptedAI debug_log("SD2: Black Temple: Illidan intro complete, players can attack Illidan."); break; case 11: - if (MaievGUID) + if (m_maievGuid) { - Creature* Maiev = m_creature->GetMap()->GetCreature(MaievGUID); + Creature* Maiev = m_creature->GetMap()->GetCreature(m_maievGuid); if (Maiev) { // Maiev is now visible @@ -1475,39 +1486,31 @@ struct MANGOS_DLL_DECL boss_illidan_stormrageAI : public ScriptedAI } break; case 14: - if (MaievGUID) + if (Creature* pMaiev = m_creature->GetMap()->GetCreature(m_maievGuid)) { - Creature* Maiev = m_creature->GetMap()->GetCreature(MaievGUID); - if (Maiev) - { - Maiev->GetMotionMaster()->Clear(false); - Maiev->GetMotionMaster()->MoveChase(m_creature); - // Have Maiev add a lot of threat on us so that players don't pull her off if they damage her via AOE - Maiev->AddThreat(m_creature, 10000000.0f); - // Force Maiev to attack us. - Maiev->AI()->AttackStart(m_creature); - Maiev->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - } + pMaiev->GetMotionMaster()->Clear(false); + pMaiev->GetMotionMaster()->MoveChase(m_creature); + // Have Maiev add a lot of threat on us so that players don't pull her off if they damage her via AOE + pMaiev->AddThreat(m_creature, 10000000.0f); + // Force Maiev to attack us. + pMaiev->AI()->AttackStart(m_creature); + pMaiev->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); } m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); - IsTalking = false; - FaceVictimTimer = 2000; - RefaceVictim = true; + m_bIsTalking = false; + m_uiFaceVictimTimer = 2000; + m_bRefaceVictim = true; break; case 20: // Kill ourself. - if (MaievGUID) + if (Creature* Maiev = m_creature->GetMap()->GetCreature(m_maievGuid)) { - Creature* Maiev = m_creature->GetMap()->GetCreature(MaievGUID); - if (Maiev) - { - // Make Maiev leave - Maiev->CastSpell(Maiev, SPELL_TELEPORT_VISUAL, true); - Maiev->SetDeathState(JUST_DIED); - } + // Make Maiev leave + Maiev->CastSpell(Maiev, SPELL_TELEPORT_VISUAL, true); + Maiev->SetDeathState(JUST_DIED); } - IsTalking = false; + m_bIsTalking = false; if (m_creature->getVictim()) m_creature->getVictim()->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE,SPELL_SCHOOL_MASK_NORMAL, NULL, false); else @@ -1517,203 +1520,239 @@ struct MANGOS_DLL_DECL boss_illidan_stormrageAI : public ScriptedAI } // This function does most of the talking - Talk(TalkCount); - ++TalkCount; - }else TalkTimer -= diff; + Talk(m_uiTalkCount); + ++m_uiTalkCount; + } + else + m_uiTalkTimer -= uiDiff; } + // No further action while talking + if (m_bIsTalking) + return; + // If we don't have a target, return. - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim() || IsTalking) + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; // If we are 'caged', then we shouldn't do anything such as cast spells or transform into Demon Form. if (m_creature->HasAura(SPELL_CAGED, EFFECT_INDEX_0)) { // Just so that he doesn't immediately enrage after he stops being caged. - EnrageTimer = 40000; - CageTimer = 30000; + m_uiEnrageTimer = 40000; + m_uiCageTimer = 30000; return; } // Berserk Timer - flat 25 minutes - if (!m_creature->HasAura(SPELL_BERSERK, EFFECT_INDEX_0) && Phase != PHASE_DEMON_SEQUENCE) + if (m_uiPhase != PHASE_DEMON_SEQUENCE && !m_creature->HasAura(SPELL_BERSERK, EFFECT_INDEX_0)) { - if (BerserkTimer < diff) + if (m_uiBerserkTimer < uiDiff) { DoScriptText(SAY_ENRAGE, m_creature); DoCastSpellIfCan(m_creature, SPELL_BERSERK, CAST_TRIGGERED); - }else BerserkTimer -= diff; + } + else + m_uiBerserkTimer -= uiDiff; } - if (RefaceVictim) + if (m_bRefaceVictim) { - if (FaceVictimTimer < diff) + if (m_uiFaceVictimTimer < uiDiff) { m_creature->SetTargetGuid(m_creature->getVictim()->GetObjectGuid()); - FaceVictimTimer = 1000; - RefaceVictim = false; - }else FaceVictimTimer -= diff; + m_uiFaceVictimTimer = 1000; + m_bRefaceVictim = false; + } + else + m_uiFaceVictimTimer -= uiDiff; } - /** Signal to change to phase 2 **/ - if (m_creature->GetHealthPercent() < 65.0f && Phase == PHASE_NORMAL) + /** Signal to change to uiPhase 2 **/ + if (m_uiPhase == PHASE_NORMAL && m_creature->GetHealthPercent() < 65.0f) + { EnterPhase2(); + return; + } /** Signal to summon Maiev **/ - if (m_creature->GetHealthPercent() < 30.0f && !MaievGUID && (Phase != PHASE_DEMON || Phase != PHASE_DEMON_SEQUENCE)) + if (m_creature->GetHealthPercent() < 30.0f && !m_maievGuid && (m_uiPhase != PHASE_DEMON || m_uiPhase != PHASE_DEMON_SEQUENCE)) + { SummonMaiev(); + return; + } /** Time for the death speech **/ - if (m_creature->GetHealthPercent() < 1.0f && !IsTalking && (Phase != PHASE_DEMON || Phase != PHASE_DEMON_SEQUENCE)) + if (m_creature->GetHealthPercent() < 1.0f && (m_uiPhase != PHASE_DEMON || m_uiPhase != PHASE_DEMON_SEQUENCE)) + { InitializeDeath(); + return; + } /***** Spells for Phase 1, 3 and 5 (Normal Form) ******/ - if (Phase == PHASE_NORMAL || Phase == PHASE_NORMAL_2 || Phase == PHASE_NORMAL_MAIEV) + if (m_uiPhase == PHASE_NORMAL || m_uiPhase == PHASE_NORMAL_2 || m_uiPhase == PHASE_NORMAL_MAIEV) { - if (TauntTimer < diff) // His random taunt/yell timer. + if (m_uiTauntTimer < uiDiff) // His random taunt/yell uiTimer. { uint32 random = urand(0, 3); - int32 yell = RandomTaunts[random].textId; + int32 yell = aRandomTaunts[random].textId; if (yell) DoScriptText(yell, m_creature); - TauntTimer = 32000; - }else TauntTimer -= diff; + m_uiTauntTimer = 32000; + } + else + m_uiTauntTimer -= uiDiff; // Global Timer so that spells do not overlap. - if (GlobalTimer < diff) + if (m_uiGlobalTimer < uiDiff) { - if (ShearTimer < diff) + if (m_uiShearTimer < uiDiff) { DoCastSpellIfCan(m_creature->getVictim(), SPELL_SHEAR); - ShearTimer = urand(25000, 40000); - GlobalTimer += 2000; - }else ShearTimer -= diff; + m_uiShearTimer = urand(25000, 40000); + m_uiGlobalTimer += 2000; + } + else + m_uiShearTimer -= uiDiff; - if (FlameCrashTimer < diff) + if (m_uiFlameCrashTimer < uiDiff) { //It spawns multiple flames sometimes. Therefore, we'll do this manually. //DoCastSpellIfCan(m_creature->getVictim(), SPELL_FLAME_CRASH); m_creature->SummonCreature(FLAME_CRASH, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN, 40000); - FlameCrashTimer = 35000; - GlobalTimer += 2000; - }else FlameCrashTimer -= diff; + m_uiFlameCrashTimer = 35000; + m_uiGlobalTimer += 2000; + } + else + m_uiFlameCrashTimer -= uiDiff; - if (ParasiticShadowFiendTimer < diff) + if (m_uiParasiticShadowFiendTimer < uiDiff) { Unit* target = NULL; target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,1); if (target && target->isAlive() && !target->HasAura(SPELL_PARASITIC_SHADOWFIEND, EFFECT_INDEX_0)) { Cast(target, SPELL_PARASITIC_SHADOWFIEND); - ParasiticShadowFiendTimer = 40000; + m_uiParasiticShadowFiendTimer = 40000; } - }else ParasiticShadowFiendTimer -= diff; + } + else + m_uiParasiticShadowFiendTimer -= uiDiff; - if (DrawSoulTimer < diff) + if (m_uiDrawSoulTimer < uiDiff) { DoCastSpellIfCan(m_creature->getVictim(), SPELL_DRAW_SOUL); - DrawSoulTimer = 55000; - GlobalTimer += 3000; - }else DrawSoulTimer -= diff; - }else GlobalTimer -= diff; + m_uiDrawSoulTimer = 55000; + m_uiGlobalTimer += 3000; + } + else + m_uiDrawSoulTimer -= uiDiff; + } + else + m_uiGlobalTimer -= uiDiff; - if (!IsTalking) - DoMeleeAttackIfReady(); + DoMeleeAttackIfReady(); } /*** Phase 2 ***/ - if (Phase == PHASE_FLIGHT) + if (m_uiPhase == PHASE_FLIGHT) { // Check if we have summoned or not. - if (!HasSummoned) + if (!m_bHasSummoned) { - if (SummonBladesTimer) - if (SummonBladesTimer <= diff) + if (m_uiSummonBladesTimer) { - SummonBladesOfAzzinoth(); - SummonBladesTimer = 0; - }else SummonBladesTimer -= diff; + if (m_uiSummonBladesTimer <= uiDiff) + { + SummonBladesOfAzzinoth(); + m_uiSummonBladesTimer = 0; + } + else + m_uiSummonBladesTimer -= uiDiff; + } - if (SummonFlamesTimer < diff) + if (m_uiSummonFlamesTimer < uiDiff) { SummonFlamesOfAzzinoth(); - }else SummonFlamesTimer -= diff; + } + else + m_uiSummonFlamesTimer -= uiDiff; } if (!m_creature->GetMotionMaster()->empty() && (m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() != POINT_MOTION_TYPE)) m_creature->GetMotionMaster()->Clear(false); - if (HasSummoned) + if (m_bHasSummoned) { - if (CheckFlamesTimer) + if (m_uiCheckFlamesTimer) { - if (CheckFlamesTimer <= diff) + if (m_uiCheckFlamesTimer <= uiDiff) { // Check if flames are dead or non-existant. If so, set GUID to 0. for(uint8 i = 0; i < 2; ++i) { - if (FlameGUID[i]) + if (m_flameGuids[i]) { - Creature* Flame = m_creature->GetMap()->GetCreature(FlameGUID[i]); + Creature* pFlame = m_creature->GetMap()->GetCreature(m_flameGuids[i]); - // If the flame dies, or somehow the pointer becomes invalid, reset GUID to 0. - if (!Flame || !Flame->isAlive()) - FlameGUID[i] = 0; + // If the flame dies, or somehow the pointer becomes invalid, reset Guid. + if (!pFlame || !pFlame->isAlive()) + m_flameGuids[i].Clear(); } } - CheckFlamesTimer = 500; - }else CheckFlamesTimer -= diff; + m_uiCheckFlamesTimer = 500; + } + else + m_uiCheckFlamesTimer -= uiDiff; } - // If both flames are dead/non-existant, kill glaives and change to phase 3. - if (!FlameGUID[0] && !FlameGUID[1] && CheckFlamesTimer) + // If both flames are dead/non-existant, kill glaives and change to uiPhase 3. + if (!m_flameGuids[0] && !m_flameGuids[1] && m_uiCheckFlamesTimer) { - RetrieveBladesTimer = 5000; // Prepare for re-equipin! - CheckFlamesTimer = 0; + m_uiRetrieveBladesTimer = 5000; // Prepare for re-equipin! + m_uiCheckFlamesTimer = 0; } - if (RetrieveBladesTimer) + if (m_uiRetrieveBladesTimer) { - if (RetrieveBladesTimer <= diff) // Time to get back our glaives! + if (m_uiRetrieveBladesTimer <= uiDiff) // Time to get back our glaives! { // Interrupt any spells we might be doing *cough* DArk Barrage *cough* m_creature->InterruptNonMeleeSpells(false); for(uint8 i = 0; i < 2; ++i) { - if (GlaiveGUID[i]) + if (Creature* pGlaive = m_creature->GetMap()->GetCreature(m_glaiveGuids[i])) { - Creature* Glaive = m_creature->GetMap()->GetCreature(GlaiveGUID[i]); - if (Glaive) - { - // Make it look like the Glaive flies back up to us - Glaive->CastSpell(m_creature, SPELL_GLAIVE_RETURNS, true); - // Despawn the Glaive - Glaive->SetDeathState(JUST_DIED); - } - GlaiveGUID[i] = 0; + // Make it look like the Glaive flies back up to us + pGlaive->CastSpell(m_creature, SPELL_GLAIVE_RETURNS, true); + // Despawn the Glaive + pGlaive->SetDeathState(JUST_DIED); + m_glaiveGuids[i].Clear(); } } - // Re-equip our warblades! + // Re-bEquip our warblades! SetEquipmentSlots(false, EQUIP_ID_MAIN_HAND, EQUIP_ID_OFF_HAND, EQUIP_NO_CHANGE); // Prepare for landin'! - LandTimer = 5000; - RetrieveBladesTimer = 0; - }else RetrieveBladesTimer -= diff; + m_uiLandTimer = 5000; + m_uiRetrieveBladesTimer = 0; + } + else + m_uiRetrieveBladesTimer -= uiDiff; } - if (LandTimer) + if (m_uiLandTimer) { // Time to land! - if (LandTimer <= diff) + if (m_uiLandTimer <= uiDiff) { DoResetThreat(); // anndddd touchdown! m_creature->HandleEmote(EMOTE_ONESHOT_LAND); m_creature->RemoveSplineFlag(SPLINEFLAG_NO_SPLINE); - Phase = PHASE_NORMAL_2; + m_uiPhase = PHASE_NORMAL_2; // We should let the raid fight us =) m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); @@ -1721,86 +1760,105 @@ struct MANGOS_DLL_DECL boss_illidan_stormrageAI : public ScriptedAI // Chase our victim! m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); - }else LandTimer -= diff; - return; // Do not continue past this point if LandTimer is not 0 and we are in phase 2. + } + else + m_uiLandTimer -= uiDiff; + + return; // Do not continue past this point if m_uiLandTimer is not 0 and we are in uiPhase 2. } } - if (GlobalTimer < diff) + if (m_uiGlobalTimer < uiDiff) { - if (FireballTimer < diff) + if (m_uiFireballTimer < uiDiff) { Cast(m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0), SPELL_FIREBALL); - FireballTimer = 5000; - }else FireballTimer -= diff; + m_uiFireballTimer = 5000; + } + else + m_uiFireballTimer -= uiDiff; - if (DarkBarrageTimer < diff) + if (m_uiDarkBarrageTimer < uiDiff) { m_creature->InterruptNonMeleeSpells(false); if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) DoCastSpellIfCan(pTarget, SPELL_DARK_BARRAGE); - DarkBarrageTimer = 35000; - GlobalTimer += 9000; - }else DarkBarrageTimer -= diff; + m_uiDarkBarrageTimer = 35000; + m_uiGlobalTimer += 9000; + } + else + m_uiDarkBarrageTimer -= uiDiff; - if (EyeBlastTimer < diff) + if (m_uiEyeBlastTimer < uiDiff) { CastEyeBlast(); - EyeBlastTimer = 30000; - }else EyeBlastTimer -= diff; - }else GlobalTimer -= diff; + m_uiEyeBlastTimer = 30000; + } + else + m_uiEyeBlastTimer -= uiDiff; + } + else + m_uiGlobalTimer -= uiDiff; } /** Phase 3,5 spells only**/ - if (Phase == PHASE_NORMAL_2 || Phase == PHASE_NORMAL_MAIEV) + if (m_uiPhase == PHASE_NORMAL_2 || m_uiPhase == PHASE_NORMAL_MAIEV) { - if (GlobalTimer < diff) + if (m_uiGlobalTimer < uiDiff) { - if (AgonizingFlamesTimer < diff) + if (m_uiAgonizingFlamesTimer < uiDiff) { CastAgonizingFlames(); - AgonizingFlamesTimer = 60000; - }else AgonizingFlamesTimer -= diff; - }else GlobalTimer -= diff; + m_uiAgonizingFlamesTimer = 60000; + } + else + m_uiAgonizingFlamesTimer -= uiDiff; + } + else + m_uiGlobalTimer -= uiDiff; - if (TransformTimer < diff) + if (m_uiTransformTimer < uiDiff) { float CurHealth = m_creature->GetHealthPercent(); - // Prevent Illidan from morphing if less than 32% or 5%, as this may cause issues with the phase transition or death speech - if ((CurHealth < 32.0f && !MaievGUID) || CurHealth < 5.0f) + // Prevent Illidan from morphing if less than 32% or 5%, as this may cause issues with the uiPhase transition or death speech + if ((CurHealth < 32.0f && !m_maievGuid) || CurHealth < 5.0f) return; - Phase = PHASE_DEMON_SEQUENCE; // Transform sequence - DemonFormSequence = 0; - AnimationTimer = 0; + m_uiPhase = PHASE_DEMON_SEQUENCE; // Transform sequence + m_uiDemonFormSequence = 0; + m_uiAnimationTimer = 0; DoScriptText(SAY_MORPH, m_creature); - TransformTimer = 60000; - FlameBurstTimer = 10000; - ShadowDemonTimer = 30000; + m_uiTransformTimer = 60000; + m_uiFlameBurstTimer = 10000; + m_uiShadowDemonTimer = 30000; m_creature->GetMotionMaster()->Clear(false);// Stop moving - }else TransformTimer -= diff; + } + else + m_uiTransformTimer -= uiDiff; } /** Phase 4 spells only (Demon Form) **/ - if (Phase == PHASE_DEMON) + if (m_uiPhase == PHASE_DEMON) { // Stop moving if we are by clearing movement generators. if (!m_creature->GetMotionMaster()->empty()) m_creature->GetMotionMaster()->Clear(false); - if (TransformTimer < diff) + if (m_uiTransformTimer < uiDiff) { - Phase = PHASE_DEMON_SEQUENCE; - DemonFormSequence = 5; - AnimationTimer = 100; - TransformTimer = 60000; - }else TransformTimer -= diff; + m_uiPhase = PHASE_DEMON_SEQUENCE; + m_uiDemonFormSequence = 5; + m_uiAnimationTimer = 100; + m_uiTransformTimer = 60000; + } + else + m_uiTransformTimer -= uiDiff; - if (ShadowDemonTimer < diff) + if (m_uiShadowDemonTimer < uiDiff) { m_creature->InterruptNonMeleeSpells(false); Creature* ShadowDemon = NULL; @@ -1821,50 +1879,60 @@ struct MANGOS_DLL_DECL boss_illidan_stormrageAI : public ScriptedAI } } } - ShadowDemonTimer = 60000; - }else ShadowDemonTimer -= diff; + m_uiShadowDemonTimer = 60000; + } + else + m_uiShadowDemonTimer -= uiDiff; - if (GlobalTimer < diff) + if (m_uiGlobalTimer < uiDiff) { - if (ShadowBlastTimer < diff) + if (m_uiShadowBlastTimer < uiDiff) { Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_TOPAGGRO, 0); if (target && target->isAlive()) { m_creature->SetTargetGuid(target->GetObjectGuid()); DoCastSpellIfCan(target, SPELL_SHADOW_BLAST); - ShadowBlastTimer = 4000; - GlobalTimer += 1500; + m_uiShadowBlastTimer = 4000; + m_uiGlobalTimer += 1500; } if (!m_creature->HasAura(SPELL_DEMON_FORM, EFFECT_INDEX_0)) DoCastSpellIfCan(m_creature, SPELL_DEMON_FORM, CAST_TRIGGERED); - }else ShadowBlastTimer -= diff; + } + else + m_uiShadowBlastTimer -= uiDiff; - if (FlameBurstTimer < diff) + if (m_uiFlameBurstTimer < uiDiff) { DoCastSpellIfCan(m_creature, SPELL_FLAME_BURST); - FlameBurstTimer = 15000; - }else FlameBurstTimer -= diff; - }else GlobalTimer -= diff; + m_uiFlameBurstTimer = 15000; + } + else + m_uiFlameBurstTimer -= uiDiff; + } + else + m_uiGlobalTimer -= uiDiff; } /** Phase 5 timers. Enrage spell **/ - if (Phase == PHASE_NORMAL_MAIEV) + if (m_uiPhase == PHASE_NORMAL_MAIEV) { - if (EnrageTimer < diff) + if (m_uiEnrageTimer < uiDiff) { DoCastSpellIfCan(m_creature, SPELL_ENRAGE); - EnrageTimer = 40000; - CageTimer = 30000; - TransformTimer += 10000; - }else EnrageTimer -= diff; + m_uiEnrageTimer = 40000; + m_uiCageTimer = 30000; + m_uiTransformTimer += 10000; + } + else + m_uiEnrageTimer -= uiDiff; // We'll handle Cage Trap in Illidan's script for simplicity's sake - if (CageTimer < diff) + if (m_uiCageTimer < uiDiff) { - if (MaievGUID) + if (m_maievGuid) { - Creature* Maiev = m_creature->GetMap()->GetCreature(MaievGUID); + Creature* Maiev = m_creature->GetMap()->GetCreature(m_maievGuid); Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0); if (!Maiev || !target || (target->GetTypeId() != TYPEID_PLAYER)) @@ -1879,29 +1947,33 @@ struct MANGOS_DLL_DECL boss_illidan_stormrageAI : public ScriptedAI // summon the trap! Maiev->CastSpell(Maiev, SPELL_CAGE_TRAP_SUMMON, false); } - CageTimer = 15000; - }else CageTimer -= diff; + m_uiCageTimer = 15000; + } + else + m_uiCageTimer -= uiDiff; } - if (Phase == PHASE_DEMON_SEQUENCE) // Demonic Transformation + if (m_uiPhase == PHASE_DEMON_SEQUENCE) // Demonic Transformation { - if (AnimationTimer < diff) + if (m_uiAnimationTimer < uiDiff) { - HandleDemonTransformAnimation(DemonFormSequence); - ++DemonFormSequence; - }else AnimationTimer -= diff; + HandleDemonTransformAnimation(m_uiDemonFormSequence); + ++m_uiDemonFormSequence; + } + else + m_uiAnimationTimer -= uiDiff; } } }; /*********************** End of Illidan AI ******************************************/ -void npc_akama_illidanAI::BeginEvent(uint64 PlayerGUID) +void npc_akama_illidanAI::BeginEvent(ObjectGuid playerGuid) { debug_log("SD2: Akama - Illidan Introduction started. Illidan event properly begun."); if (m_pInstance) { - IllidanGUID = m_pInstance->GetData64(NPC_ILLIDAN_STORMRAGE); + m_illidanGuid = m_pInstance->GetData64(NPC_ILLIDAN_STORMRAGE); m_pInstance->SetData(TYPE_ILLIDAN, IN_PROGRESS); } @@ -1914,11 +1986,11 @@ void npc_akama_illidanAI::BeginEvent(uint64 PlayerGUID) } } - if (IllidanGUID) + if (m_illidanGuid) { m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - if (Creature* pIllidan = m_creature->GetMap()->GetCreature(IllidanGUID)) + if (Creature* pIllidan = m_creature->GetMap()->GetCreature(m_illidanGuid)) { boss_illidan_stormrageAI* pIllidanAI = dynamic_cast(pIllidan->AI()); @@ -1930,16 +2002,16 @@ void npc_akama_illidanAI::BeginEvent(uint64 PlayerGUID) // First line of Akama-Illidan convo - pIllidanAI->TalkCount = 0; + pIllidanAI->m_uiTalkCount = 0; // Begin Talking - pIllidanAI->IsTalking = true; - pIllidanAI->AkamaGUID = m_creature->GetGUID(); + pIllidanAI->m_bIsTalking = true; + pIllidanAI->m_akamaGuid = m_creature->GetObjectGuid(); m_creature->SetTargetGuid(pIllidan->GetObjectGuid()); pIllidan->SetTargetGuid(m_creature->GetObjectGuid()); - IsTalking = true; // Prevent Akama from starting to attack him + m_bIsTalking = true; // Prevent Akama from starting to attack him // Prevent players from talking again m_creature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); @@ -1951,9 +2023,9 @@ void npc_akama_illidanAI::BeginEvent(uint64 PlayerGUID) m_creature->GetMotionMaster()->Clear(false); m_creature->GetMotionMaster()->MoveIdle(); - if (PlayerGUID) + if (playerGuid) { - if (Player* pPlayer = m_creature->GetMap()->GetPlayer(PlayerGUID)) + if (Player* pPlayer = m_creature->GetMap()->GetPlayer(playerGuid)) pIllidan->AddThreat(pPlayer, 100.0f); } } @@ -1989,33 +2061,33 @@ struct MANGOS_DLL_DECL boss_maievAI : public ScriptedAI Reset(); }; - uint32 TauntTimer; - uint64 IllidanGUID; + uint32 m_uiTauntTimer; + ObjectGuid m_illidanGuid; ScriptedInstance* m_pInstance; void Reset() { - TauntTimer = 12000; - IllidanGUID = 0; + m_uiTauntTimer = 12000; } void UpdateAI(const uint32 diff) { - if (!IllidanGUID) + if (!m_illidanGuid) { if (m_pInstance) - IllidanGUID = m_pInstance->GetData64(NPC_ILLIDAN_STORMRAGE); - }else + m_illidanGuid = m_pInstance->GetGuid(NPC_ILLIDAN_STORMRAGE); + } + else { - Creature* Illidan = m_creature->GetMap()->GetCreature(IllidanGUID); + Creature* pIllidan = m_creature->GetMap()->GetCreature(m_illidanGuid); - if (!Illidan || !Illidan->isAlive() || Illidan->IsInEvadeMode()) + if (!pIllidan || !pIllidan->isAlive() || pIllidan->IsInEvadeMode()) { m_creature->SetVisibility(VISIBILITY_OFF); m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); } - else if (Illidan && Illidan->GetHealthPercent() < 2.0f) + else if (pIllidan && pIllidan->GetHealthPercent() < 2.0f) return; } @@ -2023,15 +2095,17 @@ struct MANGOS_DLL_DECL boss_maievAI : public ScriptedAI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - if (TauntTimer < diff) + if (m_uiTauntTimer < diff) { uint32 random = urand(0, 3); - int32 text = MaievTaunts[random].textId; + int32 text = aMaievTaunts[random].textId; DoScriptText(text, m_creature); - TauntTimer = urand(22000, 42000); - }else TauntTimer -= diff; + m_uiTauntTimer = urand(22000, 42000); + } + else + m_uiTauntTimer -= diff; DoMeleeAttackIfReady(); } @@ -2039,49 +2113,46 @@ struct MANGOS_DLL_DECL boss_maievAI : public ScriptedAI struct MANGOS_DLL_DECL cage_trap_triggerAI : public ScriptedAI { - cage_trap_triggerAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + cage_trap_triggerAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } - uint64 IllidanGUID; - uint64 CageTrapGUID; + ObjectGuid m_illidanGuid; + ObjectGuid m_cageTrapGuid; - uint32 DespawnTimer; + uint32 m_uiDespawnTimer; - bool Active; - bool SummonedBeams; + bool m_bActive; + bool m_bSummonedBeams; void Reset() { - IllidanGUID = 0; - CageTrapGUID = 0; + m_bActive = false; + m_bSummonedBeams = false; - Active = false; - SummonedBeams = false; - - DespawnTimer = 0; + m_uiDespawnTimer = 0; m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); } void MoveInLineOfSight(Unit *who) { - if (!Active) + if (!m_bActive) return; if (who && (who->GetTypeId() != TYPEID_PLAYER)) { if (who->GetEntry() == ILLIDAN_STORMRAGE) // Check if who is Illidan { - if (!IllidanGUID && m_creature->IsWithinDistInMap(who, 3) && !who->HasAura(SPELL_CAGED, EFFECT_INDEX_0)) + if (!m_illidanGuid && m_creature->IsWithinDistInMap(who, 3) && !who->HasAura(SPELL_CAGED, EFFECT_INDEX_0)) { - IllidanGUID = who->GetGUID(); + m_illidanGuid = who->GetObjectGuid(); who->CastSpell(who, SPELL_CAGED, true); - DespawnTimer = 5000; + m_uiDespawnTimer = 5000; // Dispel his enrage if (who->HasAura(SPELL_ENRAGE, EFFECT_INDEX_0)) who->RemoveAurasDueToSpell(SPELL_ENRAGE); - if (GameObject* pCageTrap = m_creature->GetMap()->GetGameObject(CageTrapGUID)) + if (GameObject* pCageTrap = m_creature->GetMap()->GetGameObject(m_cageTrapGuid)) pCageTrap->SetLootState(GO_JUST_DEACTIVATED); } } @@ -2090,16 +2161,16 @@ struct MANGOS_DLL_DECL cage_trap_triggerAI : public ScriptedAI void UpdateAI(const uint32 diff) { - if (DespawnTimer) + if (m_uiDespawnTimer) { - if (DespawnTimer <= diff) + if (m_uiDespawnTimer <= diff) m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); - else DespawnTimer -= diff; + else m_uiDespawnTimer -= diff; } - //if (IllidanGUID && !SummonedBeams) + //if (m_illidanGuid && !m_bSummonedBeams) //{ - // if (Creature* pIllidan = m_creature->GetMap()->GetCreature(IllidanGUID) + // if (Creature* pIllidan = m_creature->GetMap()->GetCreature(m_illidanGuid) // { // //TODO: Find proper spells and properly apply 'caged' Illidan effect // } @@ -2122,7 +2193,7 @@ bool GOUse_go_cage_trap(Player* pPlayer, GameObject* pGo) } if (cage_trap_triggerAI* pTriggerAI = dynamic_cast(pTrigger->AI())) - pTriggerAI->Active = true; + pTriggerAI->m_bActive = true; pGo->SetGoState(GO_STATE_ACTIVE); return true; @@ -2132,15 +2203,15 @@ struct MANGOS_DLL_DECL flame_of_azzinothAI : public ScriptedAI { flame_of_azzinothAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} - uint32 FlameBlastTimer; - uint32 SummonBlazeTimer; - uint32 ChargeTimer; + uint32 m_uiFlameBlastTimer; + uint32 m_uiSummonBlazeTimer; + uint32 m_uiChargeTimer; void Reset() { - FlameBlastTimer = urand(15000, 30000); - SummonBlazeTimer = urand(10000, 30000); - ChargeTimer = 5000; + m_uiFlameBlastTimer = urand(15000, 30000); + m_uiSummonBlazeTimer = urand(10000, 30000); + m_uiChargeTimer = 5000; } void Charge() @@ -2182,23 +2253,29 @@ struct MANGOS_DLL_DECL flame_of_azzinothAI : public ScriptedAI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - if (FlameBlastTimer < diff) + if (m_uiFlameBlastTimer < diff) { DoCastSpellIfCan(m_creature->getVictim(), SPELL_FLAME_BLAST); - FlameBlastTimer = 30000; - }else FlameBlastTimer -= diff; + m_uiFlameBlastTimer = 30000; + } + else + m_uiFlameBlastTimer -= diff; - if (SummonBlazeTimer < diff) + if (m_uiSummonBlazeTimer < diff) { DoCastSpellIfCan(m_creature, SPELL_BLAZE_SUMMON); - SummonBlazeTimer = urand(30000, 50000); - }else SummonBlazeTimer -= diff; + m_uiSummonBlazeTimer = urand(30000, 50000); + } + else + m_uiSummonBlazeTimer -= diff; - if (ChargeTimer < diff) + if (m_uiChargeTimer < diff) { Charge(); - ChargeTimer = 5000; - }else ChargeTimer -= diff; + m_uiChargeTimer = 5000; + } + else + m_uiChargeTimer -= diff; DoMeleeAttackIfReady(); } @@ -2206,31 +2283,33 @@ struct MANGOS_DLL_DECL flame_of_azzinothAI : public ScriptedAI struct MANGOS_DLL_DECL shadow_demonAI : public ScriptedAI { - shadow_demonAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + shadow_demonAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } - uint64 TargetGUID; + ObjectGuid m_targetGuid; - void Reset() { TargetGUID = 0; } + void Reset() {} void JustDied(Unit *killer) { - if (TargetGUID) + if (m_targetGuid) { - if (Player* pPlayer = m_creature->GetMap()->GetPlayer(TargetGUID)) + if (Player* pPlayer = m_creature->GetMap()->GetPlayer(m_targetGuid)) pPlayer->RemoveAurasDueToSpell(SPELL_PARALYZE); } } void UpdateAI(const uint32 diff) { - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; // Only cast the below on players. - if (m_creature->getVictim()->GetTypeId() != TYPEID_PLAYER) return; + if (m_creature->getVictim()->GetTypeId() != TYPEID_PLAYER) + return; if (!m_creature->getVictim()->HasAura(SPELL_PARALYZE, EFFECT_INDEX_0)) { - TargetGUID = m_creature->getVictim()->GetGUID(); + m_targetGuid = m_creature->getVictim()->GetObjectGuid(); m_creature->AddThreat(m_creature->getVictim(), 10000000.0f); DoCastSpellIfCan(m_creature, SPELL_SHADOW_DEMON_PASSIVE, CAST_TRIGGERED); DoCastSpellIfCan(m_creature->getVictim(), SPELL_PURPLE_BEAM, CAST_TRIGGERED); @@ -2246,13 +2325,13 @@ struct MANGOS_DLL_DECL flamecrashAI : public ScriptedAI { flamecrashAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} - uint32 FlameCrashTimer; - uint32 DespawnTimer; + uint32 m_uiFlameCrashTimer; + uint32 m_uiDespawnTimer; void Reset() { - FlameCrashTimer = urand(3000, 8000); - DespawnTimer = 60000; + m_uiFlameCrashTimer = urand(3000, 8000); + m_uiDespawnTimer = 60000; } void AttackStart(Unit *who) { } @@ -2261,18 +2340,22 @@ struct MANGOS_DLL_DECL flamecrashAI : public ScriptedAI void UpdateAI(const uint32 diff) { - if (FlameCrashTimer < diff) + if (m_uiFlameCrashTimer < diff) { DoCastSpellIfCan(m_creature, SPELL_FLAME_CRASH_EFFECT); - FlameCrashTimer = 15000; - }else FlameCrashTimer -= diff; + m_uiFlameCrashTimer = 15000; + } + else + m_uiFlameCrashTimer -= diff; - if (DespawnTimer < diff) + if (m_uiDespawnTimer < diff) { // So that players don't see the sparkly effect when we die. m_creature->SetVisibility(VISIBILITY_OFF); m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); - }else DespawnTimer -= diff; + } + else + m_uiDespawnTimer -= diff; } }; @@ -2310,15 +2393,15 @@ struct MANGOS_DLL_DECL mob_parasitic_shadowfiendAI : public ScriptedAI struct MANGOS_DLL_DECL blazeAI : public ScriptedAI { - blazeAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + blazeAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } - uint32 BlazeTimer; - uint32 DespawnTimer; + uint32 m_uiBlazeTimer; + uint32 m_uiDespawnTimer; void Reset() { - BlazeTimer = 2000; - DespawnTimer = 15000; + m_uiBlazeTimer = 2000; + m_uiDespawnTimer = 15000; } void AttackStart(Unit* who) { } @@ -2327,17 +2410,21 @@ struct MANGOS_DLL_DECL blazeAI : public ScriptedAI void UpdateAI(const uint32 diff) { - if (BlazeTimer < diff) + if (m_uiBlazeTimer < diff) { DoCastSpellIfCan(m_creature, SPELL_BLAZE_EFFECT); - BlazeTimer = 15000; - }else BlazeTimer -= diff; + m_uiBlazeTimer = 15000; + } + else + m_uiBlazeTimer -= diff; - if (DespawnTimer < diff) + if (m_uiDespawnTimer < diff) { m_creature->SetVisibility(VISIBILITY_OFF); m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); - }else DespawnTimer -= diff; + } + else + m_uiDespawnTimer -= diff; } }; @@ -2363,7 +2450,7 @@ CreatureAI* GetAI_npc_akama_at_illidan(Creature* pCreature) npc_akama_illidanAI* Akama_AI = new npc_akama_illidanAI(pCreature); for(uint8 i = 0; i < 13; ++i) - Akama_AI->AddWaypoint(i, AkamaWP[i].x, AkamaWP[i].y, AkamaWP[i].z); + Akama_AI->AddWaypoint(i, aAkamaWP[i].x, aAkamaWP[i].y, aAkamaWP[i].z); return ((CreatureAI*)Akama_AI); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index a92e33b2a..83107f102 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2130" + #define SD2_REVISION_NR "2131" #endif // __SD2_REVISION_NR_H__ From 05fa0483aa0bbca86ce6328ece9f00d646e221b6 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Mon, 16 May 2011 14:47:06 +0200 Subject: [PATCH 0111/1172] [2132] Remove now unneeded ObjectGuid.IsEmpty() calls --- base/escort_ai.cpp | 4 ++-- base/follower_ai.cpp | 2 +- include/sc_instance.cpp | 4 ++-- scripts/eastern_kingdoms/eversong_woods.cpp | 2 +- scripts/eastern_kingdoms/ghostlands.cpp | 2 +- .../scarlet_enclave/ebon_hold.cpp | 6 +++--- scripts/eastern_kingdoms/swamp_of_sorrows.cpp | 2 +- scripts/northrend/borean_tundra.cpp | 20 +++++++++---------- scripts/outland/shadowmoon_valley.cpp | 6 +++--- scripts/world/npcs_special.cpp | 6 +++--- sd2_revision_nr.h | 2 +- 11 files changed, 28 insertions(+), 28 deletions(-) diff --git a/base/escort_ai.cpp b/base/escort_ai.cpp index 89ecf0f37..be95899a7 100644 --- a/base/escort_ai.cpp +++ b/base/escort_ai.cpp @@ -170,7 +170,7 @@ void npc_escortAI::MoveInLineOfSight(Unit* pWho) void npc_escortAI::JustDied(Unit* pKiller) { - if (!HasEscortState(STATE_ESCORT_ESCORTING) || m_playerGuid.IsEmpty() || !m_pQuestForEscort) + if (!HasEscortState(STATE_ESCORT_ESCORTING) || !m_playerGuid || !m_pQuestForEscort) return; if (Player* pPlayer = GetPlayerForEscort()) @@ -316,7 +316,7 @@ void npc_escortAI::UpdateAI(const uint32 uiDiff) } //Check if player or any member of his group is within range - if (HasEscortState(STATE_ESCORT_ESCORTING) && !m_playerGuid.IsEmpty() && !m_creature->getVictim() && !HasEscortState(STATE_ESCORT_RETURNING)) + if (HasEscortState(STATE_ESCORT_ESCORTING) && m_playerGuid && !m_creature->getVictim() && !HasEscortState(STATE_ESCORT_RETURNING)) { if (m_uiPlayerCheckTimer < uiDiff) { diff --git a/base/follower_ai.cpp b/base/follower_ai.cpp index af9d3d07e..38aa46281 100644 --- a/base/follower_ai.cpp +++ b/base/follower_ai.cpp @@ -121,7 +121,7 @@ void FollowerAI::MoveInLineOfSight(Unit* pWho) void FollowerAI::JustDied(Unit* pKiller) { - if (!HasFollowState(STATE_FOLLOW_INPROGRESS) || m_leaderGuid.IsEmpty() || !m_pQuestForFollow) + if (!HasFollowState(STATE_FOLLOW_INPROGRESS) || !m_leaderGuid || !m_pQuestForFollow) return; //TODO: need a better check for quests with time limit. diff --git a/include/sc_instance.cpp b/include/sc_instance.cpp index 09a551b0e..28e877854 100644 --- a/include/sc_instance.cpp +++ b/include/sc_instance.cpp @@ -7,7 +7,7 @@ //Optional uiWithRestoreTime. If not defined, autoCloseTime will be used (if not 0 by default in *_template) void ScriptedInstance::DoUseDoorOrButton(ObjectGuid guid, uint32 uiWithRestoreTime, bool bUseAlternativeState) { - if (guid.IsEmpty()) + if (!guid) return; if (GameObject* pGo = instance->GetGameObject(guid)) @@ -26,7 +26,7 @@ void ScriptedInstance::DoUseDoorOrButton(ObjectGuid guid, uint32 uiWithRestoreTi void ScriptedInstance::DoRespawnGameObject(ObjectGuid guid, uint32 uiTimeToDespawn) { - if (guid.IsEmpty()) + if (!guid) return; if (GameObject* pGo = instance->GetGameObject(guid)) diff --git a/scripts/eastern_kingdoms/eversong_woods.cpp b/scripts/eastern_kingdoms/eversong_woods.cpp index 2bdbc0725..fec5a7552 100644 --- a/scripts/eastern_kingdoms/eversong_woods.cpp +++ b/scripts/eastern_kingdoms/eversong_woods.cpp @@ -147,7 +147,7 @@ struct MANGOS_DLL_DECL npc_kelerun_bloodmournAI : public ScriptedAI { if (m_uiTimeOutTimer && m_uiTimeOutTimer < uiDiff) { - if (m_playerGuid.IsEmpty()) + if (!m_playerGuid) { //player are expected to use GO within a minute, if not, event will fail. Reset(); diff --git a/scripts/eastern_kingdoms/ghostlands.cpp b/scripts/eastern_kingdoms/ghostlands.cpp index 1f0869459..d98543332 100644 --- a/scripts/eastern_kingdoms/ghostlands.cpp +++ b/scripts/eastern_kingdoms/ghostlands.cpp @@ -118,7 +118,7 @@ struct MANGOS_DLL_DECL npc_ranger_lilathaAI : public npc_escortAI { if (HasEscortState(STATE_ESCORT_ESCORTING)) { - if (m_heliosGuid.IsEmpty() && pUnit->GetEntry() == NPC_CAPTAIN_HELIOS) + if (!m_heliosGuid && pUnit->GetEntry() == NPC_CAPTAIN_HELIOS) { if (m_creature->IsWithinDistInMap(pUnit, 30.0f)) m_heliosGuid = pUnit->GetObjectGuid(); diff --git a/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp b/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp index e5364c82b..247391176 100644 --- a/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp +++ b/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp @@ -162,7 +162,7 @@ struct MANGOS_DLL_DECL npc_a_special_surpriseAI : public ScriptedAI void MoveInLineOfSight(Unit* pWho) { - if (!m_playerGuid.IsEmpty() || pWho->GetTypeId() != TYPEID_PLAYER || !pWho->IsWithinDist(m_creature, INTERACTION_DISTANCE)) + if (m_playerGuid || pWho->GetTypeId() != TYPEID_PLAYER || !pWho->IsWithinDist(m_creature, INTERACTION_DISTANCE)) return; if (MeetQuestCondition((Player*)pWho)) @@ -171,7 +171,7 @@ struct MANGOS_DLL_DECL npc_a_special_surpriseAI : public ScriptedAI void UpdateAI(const uint32 uiDiff) { - if (!m_playerGuid.IsEmpty() && !m_creature->getVictim() && m_creature->isAlive()) + if (m_playerGuid && !m_creature->getVictim() && m_creature->isAlive()) { if (m_uiExecuteSpeech_Timer < uiDiff) { @@ -995,7 +995,7 @@ struct MANGOS_DLL_DECL npc_unworthy_initiateAI : public ScriptedAI Creature* GetAnchor() { - if (!m_myAnchorGuid.IsEmpty()) + if (m_myAnchorGuid) return m_creature->GetMap()->GetCreature(m_myAnchorGuid); else return GetClosestCreatureWithEntry(m_creature, NPC_ANCHOR, INTERACTION_DISTANCE*2); diff --git a/scripts/eastern_kingdoms/swamp_of_sorrows.cpp b/scripts/eastern_kingdoms/swamp_of_sorrows.cpp index 1c410b76c..899238ed5 100644 --- a/scripts/eastern_kingdoms/swamp_of_sorrows.cpp +++ b/scripts/eastern_kingdoms/swamp_of_sorrows.cpp @@ -72,7 +72,7 @@ struct MANGOS_DLL_DECL npc_galen_goodwardAI : public npc_escortAI case 0: { GameObject* pCage = NULL; - if (!m_galensCageGuid.IsEmpty()) + if (m_galensCageGuid) pCage = m_creature->GetMap()->GetGameObject(m_galensCageGuid); else pCage = GetClosestGameObjectWithEntry(m_creature, GO_GALENS_CAGE, INTERACTION_DISTANCE); diff --git a/scripts/northrend/borean_tundra.cpp b/scripts/northrend/borean_tundra.cpp index 4c00421e0..2c18ea9b9 100644 --- a/scripts/northrend/borean_tundra.cpp +++ b/scripts/northrend/borean_tundra.cpp @@ -453,37 +453,37 @@ struct MANGOS_DLL_DECL npc_sinkhole_kill_creditAI : public ScriptedAI { npc_sinkhole_kill_creditAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } - ObjectGuid m_uiCartGUID; - ObjectGuid m_uiWormGUID; + ObjectGuid m_cartGuid; + ObjectGuid m_wormGuid; uint32 m_uiCartTimer; uint32 m_uiCartPhase; void Reset() { - m_uiCartGUID.Clear(); - m_uiWormGUID.Clear(); + m_cartGuid.Clear(); + m_wormGuid.Clear(); m_uiCartTimer = 2000; m_uiCartPhase = 0; } void JustSummoned(Creature* pSummoned) { - m_uiWormGUID = pSummoned->GetObjectGuid(); + m_wormGuid = pSummoned->GetObjectGuid(); } void JustSummoned(GameObject* pGo) { // Go is not really needed, but ok to use as a check point so only one "event" can be processed at a time - if (!m_uiCartGUID.IsEmpty()) + if (m_cartGuid) return; // Expecting summoned from mangos dummy effect 46797 - m_uiCartGUID = pGo->GetObjectGuid(); + m_cartGuid = pGo->GetObjectGuid(); } void UpdateAI(const uint32 uiDiff) { - if (!m_uiCartGUID.IsEmpty()) + if (m_cartGuid) { if (m_uiCartTimer <= uiDiff) { @@ -504,7 +504,7 @@ struct MANGOS_DLL_DECL npc_sinkhole_kill_creditAI : public ScriptedAI m_uiCartTimer = 2000; break; case 3: - if (Creature* pWorm = m_creature->GetMap()->GetCreature(m_uiWormGUID)) + if (Creature* pWorm = m_creature->GetMap()->GetCreature(m_wormGuid)) { pWorm->SetDeathState(JUST_DIED); pWorm->SetHealth(0); @@ -512,7 +512,7 @@ struct MANGOS_DLL_DECL npc_sinkhole_kill_creditAI : public ScriptedAI m_uiCartTimer = 10000; break; case 4: - if (Creature* pWorm = m_creature->GetMap()->GetCreature(m_uiWormGUID)) + if (Creature* pWorm = m_creature->GetMap()->GetCreature(m_wormGuid)) pWorm->RemoveCorpse(); Reset(); diff --git a/scripts/outland/shadowmoon_valley.cpp b/scripts/outland/shadowmoon_valley.cpp index dfbf28312..e38f14ea0 100644 --- a/scripts/outland/shadowmoon_valley.cpp +++ b/scripts/outland/shadowmoon_valley.cpp @@ -331,7 +331,7 @@ struct MANGOS_DLL_DECL npc_dragonmaw_peonAI : public ScriptedAI bool SetPlayerTarget(ObjectGuid playerGuid) { // Check if event already started - if (!m_playerGuid.IsEmpty()) + if (m_playerGuid) return false; m_playerGuid = playerGuid; @@ -1225,7 +1225,7 @@ struct MANGOS_DLL_DECL npc_lord_illidan_stormrageAI : public Scripted_NoMovement // increment mob count ++m_uiMobCount; - if (m_playerGuid.IsEmpty()) + if (!m_playerGuid) return; if (pSummoned->GetEntry() == NPC_TORLOTH_THE_MAGNIFICENT) @@ -1320,7 +1320,7 @@ struct MANGOS_DLL_DECL npc_lord_illidan_stormrageAI : public Scripted_NoMovement void UpdateAI(const uint32 uiDiff) { - if (m_playerGuid.IsEmpty() || !m_bEventStarted) + if (!m_playerGuid || !m_bEventStarted) return; if (!m_uiMobCount && m_uiWaveCount < 4) diff --git a/scripts/world/npcs_special.cpp b/scripts/world/npcs_special.cpp index 7e202e685..d0a73da6b 100644 --- a/scripts/world/npcs_special.cpp +++ b/scripts/world/npcs_special.cpp @@ -178,7 +178,7 @@ struct MANGOS_DLL_DECL npc_air_force_botsAI : public ScriptedAI if (!pPlayerTarget) return; - Creature* pLastSpawnedGuard = m_spawnedGuid.IsEmpty() ? NULL : GetSummonedGuard(); + Creature* pLastSpawnedGuard = m_spawnedGuid ? GetSummonedGuard() : NULL; // prevent calling GetCreature at next MoveInLineOfSight call - speedup if (!pLastSpawnedGuard) @@ -560,7 +560,7 @@ struct MANGOS_DLL_DECL npc_injured_patientAI : public ScriptedAI { if ((((Player*)caster)->GetQuestStatus(6624) == QUEST_STATUS_INCOMPLETE) || (((Player*)caster)->GetQuestStatus(6622) == QUEST_STATUS_INCOMPLETE)) { - if (!m_doctorGuid.IsEmpty()) + if (m_doctorGuid) { if (Creature* pDoctor = m_creature->GetMap()->GetCreature(m_doctorGuid)) { @@ -618,7 +618,7 @@ struct MANGOS_DLL_DECL npc_injured_patientAI : public ScriptedAI m_creature->SetDeathState(JUST_DIED); m_creature->SetFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_DEAD); - if (!m_doctorGuid.IsEmpty()) + if (m_doctorGuid) { if (Creature* pDoctor = m_creature->GetMap()->GetCreature(m_doctorGuid)) { diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 83107f102..71c9fcb24 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2131" + #define SD2_REVISION_NR "2132" #endif // __SD2_REVISION_NR_H__ From c9ab4522f5ed06a211f611346f08eea66d94b146 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Wed, 25 May 2011 19:21:50 +0200 Subject: [PATCH 0112/1172] [2133] Improve a few things in Zul'Aman * Move many DATA_ enums to simplier style * Store order of rescued hostages * Store time of time-event also in DB-saved string * Fix a few logic bugs (like Hex-lord gate opening) * Make use of Time Run Event texts (require additional work, for case that Malacrass isn't loaded) * The actual events of the time-run hostages are expected to be doable with database scripting! Signed-off-by: Schmoozerd --- .../eastern_kingdoms/zulaman/boss_akilzon.cpp | 2 +- .../eastern_kingdoms/zulaman/boss_halazzi.cpp | 6 +- .../eastern_kingdoms/zulaman/boss_janalai.cpp | 14 +- .../zulaman/boss_malacrass.cpp | 4 +- .../zulaman/instance_zulaman.cpp | 264 ++++++++++++------ scripts/eastern_kingdoms/zulaman/zulaman.cpp | 6 +- scripts/eastern_kingdoms/zulaman/zulaman.h | 74 ++++- sd2_revision_nr.h | 2 +- 8 files changed, 252 insertions(+), 120 deletions(-) diff --git a/scripts/eastern_kingdoms/zulaman/boss_akilzon.cpp b/scripts/eastern_kingdoms/zulaman/boss_akilzon.cpp index e2ad79068..33e430560 100644 --- a/scripts/eastern_kingdoms/zulaman/boss_akilzon.cpp +++ b/scripts/eastern_kingdoms/zulaman/boss_akilzon.cpp @@ -243,7 +243,7 @@ struct MANGOS_DLL_DECL mob_soaring_eagleAI : public ScriptedAI if (!m_pInstance) return; - if (Creature* pAzkil = m_pInstance->instance->GetCreature(m_pInstance->GetData64(DATA_AKILZON))) + if (Creature* pAzkil = m_pInstance->instance->GetCreature(m_pInstance->GetData64(NPC_AKILZON))) { float fX, fY, fZ; pAzkil->GetRandomPoint(pAzkil->GetPositionX(), pAzkil->GetPositionY(), pAzkil->GetPositionZ()+15.0f, 30.0f, fX, fY, fZ); diff --git a/scripts/eastern_kingdoms/zulaman/boss_halazzi.cpp b/scripts/eastern_kingdoms/zulaman/boss_halazzi.cpp index dec0090d3..766e9daa8 100644 --- a/scripts/eastern_kingdoms/zulaman/boss_halazzi.cpp +++ b/scripts/eastern_kingdoms/zulaman/boss_halazzi.cpp @@ -107,7 +107,7 @@ struct MANGOS_DLL_DECL boss_halazziAI : public ScriptedAI if (m_pInstance) { - if (Creature* pSpiritLynx = m_pInstance->instance->GetCreature(m_pInstance->GetData64(DATA_SPIRIT_LYNX))) + if (Creature* pSpiritLynx = m_pInstance->instance->GetCreature(m_pInstance->GetData64(NPC_SPIRIT_LYNX))) pSpiritLynx->ForcedDespawn(); } } @@ -197,7 +197,7 @@ struct MANGOS_DLL_DECL boss_halazziAI : public ScriptedAI } else { - Creature* pSpiritLynx = m_pInstance->instance->GetCreature(m_pInstance->GetData64(DATA_SPIRIT_LYNX)); + Creature* pSpiritLynx = m_pInstance->instance->GetCreature(m_pInstance->GetData64(NPC_SPIRIT_LYNX)); if (m_creature->GetHealthPercent() < 10.0f || (pSpiritLynx && pSpiritLynx->GetHealthPercent() < 10.0f)) @@ -349,7 +349,7 @@ struct MANGOS_DLL_DECL boss_spirit_lynxAI : public ScriptedAI if (!m_pInstance) return; - if (Creature* pHalazzi = m_pInstance->instance->GetCreature(m_pInstance->GetData64(DATA_HALAZZI))) + if (Creature* pHalazzi = m_pInstance->instance->GetCreature(m_pInstance->GetData64(NPC_HALAZZI))) pHalazzi->AI()->KilledUnit(pVictim); } diff --git a/scripts/eastern_kingdoms/zulaman/boss_janalai.cpp b/scripts/eastern_kingdoms/zulaman/boss_janalai.cpp index 9af9b9dab..6a7f311f3 100644 --- a/scripts/eastern_kingdoms/zulaman/boss_janalai.cpp +++ b/scripts/eastern_kingdoms/zulaman/boss_janalai.cpp @@ -363,16 +363,16 @@ struct MANGOS_DLL_DECL boss_janalaiAI : public ScriptedAI if (!m_pInstance) return; - if (uint32 uiEggsRemaining_Right = m_pInstance->GetData(DATA_J_EGGS_RIGHT)) + if (uint32 uiEggsRemaining_Right = m_pInstance->GetData(TYPE_J_EGGS_RIGHT)) { for(uint32 i = 0; i < uiEggsRemaining_Right; ++i) - m_pInstance->SetData(DATA_J_EGGS_RIGHT, SPECIAL); + m_pInstance->SetData(TYPE_J_EGGS_RIGHT, SPECIAL); } - if (uint32 uiEggsRemaining_Left = m_pInstance->GetData(DATA_J_EGGS_LEFT)) + if (uint32 uiEggsRemaining_Left = m_pInstance->GetData(TYPE_J_EGGS_LEFT)) { for(uint32 i = 0; i < uiEggsRemaining_Left; ++i) - m_pInstance->SetData(DATA_J_EGGS_LEFT, SPECIAL); + m_pInstance->SetData(TYPE_J_EGGS_LEFT, SPECIAL); } } } @@ -514,7 +514,7 @@ struct MANGOS_DLL_DECL boss_janalaiAI : public ScriptedAI { if (m_uiHatcherTimer < uiDiff) { - if (!m_pInstance || (m_pInstance->GetData(DATA_J_EGGS_LEFT) == 0 && m_pInstance->GetData(DATA_J_EGGS_RIGHT) == 0)) + if (!m_pInstance || (m_pInstance->GetData(TYPE_J_EGGS_LEFT) == 0 && m_pInstance->GetData(TYPE_J_EGGS_RIGHT) == 0)) m_bIsEggRemaining = false; else { @@ -644,7 +644,7 @@ struct MANGOS_DLL_DECL npc_amanishi_hatcherAI : public ScriptedAI void DoHatchEggs(uint32 uiCount) { - uint32 uiSaveRightOrLeft = m_creature->GetEntry() == NPC_AMANI_HATCHER_1 ? DATA_J_EGGS_RIGHT : DATA_J_EGGS_LEFT; + uint32 uiSaveRightOrLeft = m_creature->GetEntry() == NPC_AMANI_HATCHER_1 ? TYPE_J_EGGS_RIGHT : TYPE_J_EGGS_LEFT; for(uint32 i = 0; i < uiCount; ++i) { @@ -681,7 +681,7 @@ struct MANGOS_DLL_DECL npc_amanishi_hatcherAI : public ScriptedAI if (!m_pInstance) return; - uint32 uiEggsRemaining = m_creature->GetEntry() == NPC_AMANI_HATCHER_1 ? m_pInstance->GetData(DATA_J_EGGS_RIGHT) : m_pInstance->GetData(DATA_J_EGGS_LEFT); + uint32 uiEggsRemaining = m_creature->GetEntry() == NPC_AMANI_HATCHER_1 ? m_pInstance->GetData(TYPE_J_EGGS_RIGHT) : m_pInstance->GetData(TYPE_J_EGGS_LEFT); if (!uiEggsRemaining) { diff --git a/scripts/eastern_kingdoms/zulaman/boss_malacrass.cpp b/scripts/eastern_kingdoms/zulaman/boss_malacrass.cpp index 45c437c6d..6657b36d6 100644 --- a/scripts/eastern_kingdoms/zulaman/boss_malacrass.cpp +++ b/scripts/eastern_kingdoms/zulaman/boss_malacrass.cpp @@ -299,7 +299,7 @@ struct MANGOS_DLL_DECL boss_malacrass_addAI : public ScriptedAI if (!m_pInstance) return; - if (Creature* pMalacrass = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(DATA_MALACRASS))) + if (Creature* pMalacrass = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(NPC_MALACRASS))) pMalacrass->AI()->KilledUnit(pVictim); } @@ -308,7 +308,7 @@ struct MANGOS_DLL_DECL boss_malacrass_addAI : public ScriptedAI if (!m_pInstance) return; - if (Creature* pMalacrass = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(DATA_MALACRASS))) + if (Creature* pMalacrass = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(NPC_MALACRASS))) { switch(urand(0, 2)) { diff --git a/scripts/eastern_kingdoms/zulaman/instance_zulaman.cpp b/scripts/eastern_kingdoms/zulaman/instance_zulaman.cpp index 30d4ec3c8..a0518d87f 100644 --- a/scripts/eastern_kingdoms/zulaman/instance_zulaman.cpp +++ b/scripts/eastern_kingdoms/zulaman/instance_zulaman.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: Instance_Zulaman -SD%Complete: 25 -SDComment: +SD%Complete: 50 +SDComment: Support for Quests and Mini-Events still TODO SDCategory: Zul'Aman EndScriptData */ @@ -32,8 +32,9 @@ struct MANGOS_DLL_DECL instance_zulaman : public ScriptedInstance uint32 m_auiRandVendor[MAX_VENDOR]; std::string strInstData; + TimeEventNpcInfo m_aEventNpcInfo[MAX_CHESTS]; + uint32 m_uiEventTimer; - uint32 m_uiEventMinuteStep; uint32 m_uiGongCount; @@ -60,7 +61,6 @@ struct MANGOS_DLL_DECL instance_zulaman : public ScriptedInstance memset(&m_auiRandVendor, 0, sizeof(m_auiRandVendor)); m_uiEventTimer = MINUTE*IN_MILLISECONDS; - m_uiEventMinuteStep = MINUTE/3; m_uiGongCount = 0; @@ -86,14 +86,20 @@ struct MANGOS_DLL_DECL instance_zulaman : public ScriptedInstance { switch(pCreature->GetEntry()) { - case 23574: m_uiAkilzonGUID = pCreature->GetGUID(); break; - case 23576: m_uiNalorakkGUID = pCreature->GetGUID(); break; - case 23578: m_uiJanalaiGUID = pCreature->GetGUID(); break; - case 23577: m_uiHalazziGUID = pCreature->GetGUID(); break; - case 23863: m_uiZuljinGUID = pCreature->GetGUID(); break; - case 24239: m_uiMalacrassGUID = pCreature->GetGUID(); break; - case 24358: m_uiHarrisonGUID = pCreature->GetGUID(); break; + case NPC_AKILZON: m_uiAkilzonGUID = pCreature->GetGUID(); break; + case NPC_NALORAKK: m_uiNalorakkGUID = pCreature->GetGUID(); break; + case NPC_JANALAI: m_uiJanalaiGUID = pCreature->GetGUID(); break; + case NPC_HALAZZI: m_uiHalazziGUID = pCreature->GetGUID(); break; + case NPC_MALACRASS: m_uiMalacrassGUID = pCreature->GetGUID(); break; + case NPC_ZULJIN: m_uiZuljinGUID = pCreature->GetGUID(); break; + case NPC_HARRISON: m_uiHarrisonGUID = pCreature->GetGUID(); break; case NPC_SPIRIT_LYNX: m_uiSpiritLynxGUID = pCreature->GetGUID(); break; + + case NPC_TANZAR: m_aEventNpcInfo[INDEX_NALORAKK].npGuid = pCreature->GetObjectGuid(); break; + case NPC_KRAZ: m_aEventNpcInfo[INDEX_JANALAI].npGuid = pCreature->GetObjectGuid(); break; + case NPC_ASHLI: m_aEventNpcInfo[INDEX_HALAZZI].npGuid = pCreature->GetObjectGuid(); break; + case NPC_HARKOR: m_aEventNpcInfo[INDEX_AKILZON].npGuid = pCreature->GetObjectGuid(); break; + case NPC_EGG: if (m_auiEncounter[3] != DONE) m_lEggsGUIDList.push_back(pCreature->GetGUID()); @@ -105,16 +111,18 @@ struct MANGOS_DLL_DECL instance_zulaman : public ScriptedInstance { switch(pGo->GetEntry()) { - case 187359: + case GO_STRANGE_GONG: m_uiStrangeGongGUID = pGo->GetGUID(); break; - case 186728: + case GO_MASSIVE_GATE: m_uiMassiveGateGUID = pGo->GetGUID(); - if (m_auiEncounter[0] == IN_PROGRESS || m_auiEncounter[0] == DONE) + if (m_auiEncounter[0] == DONE || m_auiEncounter[0] == FAIL) pGo->SetGoState(GO_STATE_ACTIVE); break; - case 186305: + case GO_HEXLORD_ENTRANCE: m_uiMalacrassEntranceGUID = pGo->GetGUID(); + if (GetKilledPreBosses() == 4) + pGo->SetGoState(GO_STATE_ACTIVE); break; } } @@ -131,22 +139,48 @@ struct MANGOS_DLL_DECL instance_zulaman : public ScriptedInstance ++m_uiGongCount; if (m_uiGongCount == 5) m_auiEncounter[0] = uiData; + return; } if (uiData == IN_PROGRESS) { + DoTimeRunSay(RUN_START); DoUseDoorOrButton(m_uiMassiveGateGUID); - DoUpdateWorldState(WORLD_STATE_COUNTER,m_uiEventMinuteStep); - DoUpdateWorldState(WORLD_STATE_ID,1); - m_auiEncounter[0] = uiData; + if (m_auiEncounter[7]) + SetData(TYPE_RUN_EVENT_TIME, m_auiEncounter[7]); + else + SetData(TYPE_RUN_EVENT_TIME, 20); // 20 Minutes as default time + DoUpdateWorldState(WORLD_STATE_ID, 1); + } + if (uiData == FAIL) + { + DoTimeRunSay(RUN_FAIL); + DoUpdateWorldState(WORLD_STATE_ID, 0); + // Kill remaining Event NPCs + for (uint8 i = 0; i < MAX_CHESTS; ++i) + { + // Not yet rescued, so too late + if (!m_aEventNpcInfo[i].uiSavePosition) + { + if (Creature* pCreature = instance->GetCreature(m_aEventNpcInfo[i].npGuid)) + pCreature->ForcedDespawn(); + } + } + } + if (uiData == DONE) + { + DoTimeRunSay(RUN_DONE); + DoUpdateWorldState(WORLD_STATE_ID, 0); } + m_auiEncounter[0] = uiData; break; case TYPE_AKILZON: if (uiData == DONE) { if (m_auiEncounter[0] == IN_PROGRESS) { - m_uiEventMinuteStep += MINUTE/6; //add 10 minutes - DoUpdateWorldState(WORLD_STATE_COUNTER,m_uiEventMinuteStep); + m_auiEncounter[7] += 10; // Add 10 minutes + SetData(TYPE_RUN_EVENT_TIME, m_auiEncounter[7]); + DoChestEvent(INDEX_AKILZON); } } m_auiEncounter[1] = uiData; @@ -156,8 +190,9 @@ struct MANGOS_DLL_DECL instance_zulaman : public ScriptedInstance { if (m_auiEncounter[0] == IN_PROGRESS) { - m_uiEventMinuteStep += MINUTE/4; //add 15 minutes - DoUpdateWorldState(WORLD_STATE_COUNTER,m_uiEventMinuteStep); + m_auiEncounter[7] += 15; // Add 15 minutes + SetData(TYPE_RUN_EVENT_TIME, m_auiEncounter[7]); + DoChestEvent(INDEX_NALORAKK); } } m_auiEncounter[2] = uiData; @@ -181,50 +216,66 @@ struct MANGOS_DLL_DECL instance_zulaman : public ScriptedInstance } } if (uiData == DONE) + { m_lEggsGUIDList.clear(); + if (m_auiEncounter[0] == IN_PROGRESS) + DoChestEvent(INDEX_JANALAI); + } m_auiEncounter[3] = uiData; break; case TYPE_HALAZZI: + if (uiData == DONE) + { + if (m_auiEncounter[0] == IN_PROGRESS) + DoChestEvent(INDEX_HALAZZI); + } m_auiEncounter[4] = uiData; break; - case TYPE_ZULJIN: + case TYPE_MALACRASS: m_auiEncounter[5] = uiData; break; - case TYPE_MALACRASS: + case TYPE_ZULJIN: m_auiEncounter[6] = uiData; break; - - case DATA_J_EGGS_RIGHT: + case TYPE_J_EGGS_RIGHT: --m_uiEggsRemainingCount_Right; break; - case DATA_J_EGGS_LEFT: + case TYPE_J_EGGS_LEFT: --m_uiEggsRemainingCount_Left; break; - case TYPE_RAND_VENDOR_1: m_auiRandVendor[0] = uiData; break; case TYPE_RAND_VENDOR_2: m_auiRandVendor[1] = uiData; break; + + case TYPE_RUN_EVENT_TIME: + m_auiEncounter[7] = uiData; + DoUpdateWorldState(WORLD_STATE_COUNTER, m_auiEncounter[7]); + break; + default: error_log("SD2: Instance Zulaman: ERROR SetData = %u for type %u does not exist/not implemented.",uiType,uiData); - break; + return; } - if (m_auiEncounter[1] == DONE && m_auiEncounter[2] == DONE && m_auiEncounter[3] == DONE && - m_auiEncounter[4] == DONE && m_auiEncounter[5] != IN_PROGRESS) + if (uiData == DONE && GetKilledPreBosses() == 4 && (uiType == TYPE_AKILZON || uiType == TYPE_NALORAKK || uiType == TYPE_JANALAI || uiType == TYPE_HALAZZI)) + { DoUseDoorOrButton(m_uiMalacrassEntranceGUID); + if (m_auiEncounter[0] == IN_PROGRESS) + SetData(TYPE_EVENT_RUN, DONE); + } - if (uiData == DONE || (uiType == TYPE_EVENT_RUN && uiData == IN_PROGRESS)) + if (uiData == DONE || uiType == TYPE_RUN_EVENT_TIME || uiType == TYPE_EVENT_RUN) { OUT_SAVE_INST_DATA; std::ostringstream saveStream; saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2] << " " << m_auiEncounter[3] << " " << m_auiEncounter[4] << " " << m_auiEncounter[5] << " " - << m_auiEncounter[6]; + << m_auiEncounter[6] << " " << m_auiEncounter[7]; strInstData = saveStream.str(); @@ -250,15 +301,19 @@ struct MANGOS_DLL_DECL instance_zulaman : public ScriptedInstance std::istringstream loadStream(chrIn); loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3] - >> m_auiEncounter[4] >> m_auiEncounter[5] >> m_auiEncounter[6]; + >> m_auiEncounter[4] >> m_auiEncounter[5] >> m_auiEncounter[6] >> m_auiEncounter[7]; - //not changing m_uiEncounter[0], TYPE_EVENT_RUN must not reset to NOT_STARTED - for(uint8 i = 1; i < MAX_ENCOUNTER; ++i) + // Skip m_auiEncounter[7], to start the time event properly if needed + for (uint8 i = 0; i < MAX_ENCOUNTER - 1; ++i) { if (m_auiEncounter[i] == IN_PROGRESS) m_auiEncounter[i] = NOT_STARTED; } + // Restart TYPE_EVENT_RUN if was already started + if (m_auiEncounter[7] != 0 && m_auiEncounter[0] != DONE && m_auiEncounter[0] != FAIL) + SetData(TYPE_EVENT_RUN, IN_PROGRESS); + OUT_LOAD_INST_DATA_COMPLETE; } @@ -266,62 +321,92 @@ struct MANGOS_DLL_DECL instance_zulaman : public ScriptedInstance { switch(uiType) { - case TYPE_EVENT_RUN: - return m_auiEncounter[0]; - case TYPE_AKILZON: - return m_auiEncounter[1]; - case TYPE_NALORAKK: - return m_auiEncounter[2]; - case TYPE_JANALAI: - return m_auiEncounter[3]; - case TYPE_HALAZZI: - return m_auiEncounter[4]; - case TYPE_ZULJIN: - return m_auiEncounter[5]; - case TYPE_MALACRASS: - return m_auiEncounter[6]; - - case DATA_J_EGGS_LEFT: - return m_uiEggsRemainingCount_Left; - case DATA_J_EGGS_RIGHT: - return m_uiEggsRemainingCount_Right; + case TYPE_EVENT_RUN: return m_auiEncounter[0]; + case TYPE_AKILZON: return m_auiEncounter[1]; + case TYPE_NALORAKK: return m_auiEncounter[2]; + case TYPE_JANALAI: return m_auiEncounter[3]; + case TYPE_HALAZZI: return m_auiEncounter[4]; + case TYPE_ZULJIN: return m_auiEncounter[5]; + case TYPE_MALACRASS: return m_auiEncounter[6]; + case TYPE_J_EGGS_LEFT: return m_uiEggsRemainingCount_Left; + case TYPE_J_EGGS_RIGHT: return m_uiEggsRemainingCount_Right; + case TYPE_RAND_VENDOR_1: return m_auiRandVendor[0]; + case TYPE_RAND_VENDOR_2: return m_auiRandVendor[1]; - case TYPE_RAND_VENDOR_1: - return m_auiRandVendor[0]; - case TYPE_RAND_VENDOR_2: - return m_auiRandVendor[1]; + default: + return 0; } - return 0; } uint64 GetData64(uint32 uiData) { switch(uiData) { - case DATA_AKILZON: - return m_uiAkilzonGUID; - case DATA_NALORAKK: - return m_uiNalorakkGUID; - case DATA_JANALAI: - return m_uiJanalaiGUID; - case DATA_HALAZZI: - return m_uiHalazziGUID; - case DATA_SPIRIT_LYNX: - return m_uiSpiritLynxGUID; - case DATA_ZULJIN: - return m_uiZuljinGUID; - case DATA_MALACRASS: - return m_uiMalacrassGUID; - case DATA_HARRISON: - return m_uiHarrisonGUID; - case DATA_GO_GONG: - return m_uiStrangeGongGUID; - case DATA_GO_ENTRANCE: - return m_uiMassiveGateGUID; - case DATA_GO_MALACRASS_GATE: - return m_uiMalacrassEntranceGUID; + case NPC_AKILZON: return m_uiAkilzonGUID; + case NPC_NALORAKK: return m_uiNalorakkGUID; + case NPC_JANALAI: return m_uiJanalaiGUID; + case NPC_HALAZZI: return m_uiHalazziGUID; + case NPC_SPIRIT_LYNX: return m_uiSpiritLynxGUID; + case NPC_ZULJIN: return m_uiZuljinGUID; + case NPC_MALACRASS: return m_uiMalacrassGUID; + case NPC_HARRISON: return m_uiHarrisonGUID; + + case GO_STRANGE_GONG: return m_uiStrangeGongGUID; + case GO_MASSIVE_GATE: return m_uiMassiveGateGUID; + case GO_HEXLORD_ENTRANCE: return m_uiMalacrassEntranceGUID; + + default: + return 0; + } + } + + uint8 GetKilledPreBosses() + { + return (GetData(TYPE_AKILZON) == DONE ? 1 : 0) + (GetData(TYPE_NALORAKK) == DONE ? 1 : 0) + (GetData(TYPE_JANALAI) == DONE ? 1 : 0) + (GetData(TYPE_HALAZZI) == DONE ? 1 : 0); + } + + void DoTimeRunSay(RunEventSteps uiData) + { + // TODO - This yell must be made independend of load state of Malacrass + Creature* pHexlord = instance->GetCreature(m_uiMalacrassGUID); + if (!pHexlord) + return; + + switch (uiData) + { + case RUN_START: DoScriptText(SAY_INST_BEGIN, pHexlord); break; + case RUN_FAIL: DoScriptText(urand(0, 1) ? SAY_INST_SACRIF1 : SAY_INST_SACRIF2, pHexlord); break; + case RUN_DONE: DoScriptText(SAY_INST_COMPLETE, pHexlord); break; + case RUN_PROGRESS: + switch (GetKilledPreBosses()) + { + case 1: DoScriptText(SAY_INST_PROGRESS_1, pHexlord); break; + case 2: DoScriptText(SAY_INST_PROGRESS_2, pHexlord); break; + case 3: DoScriptText(SAY_INST_PROGRESS_3, pHexlord); break; + } + break; + case RUN_FAIL_SOON: + switch (GetKilledPreBosses()) + { + case 0: DoScriptText(SAY_INST_WARN_1, pHexlord); break; + case 1: DoScriptText(SAY_INST_WARN_2, pHexlord); break; + case 2: DoScriptText(SAY_INST_WARN_3, pHexlord); break; + case 3: DoScriptText(SAY_INST_WARN_4, pHexlord); break; + } + break; } - return 0; + } + + void DoChestEvent(BossToChestIndex uiIndex) + { + // Store Order of this kill + m_aEventNpcInfo[uiIndex].uiSavePosition = GetKilledPreBosses() + 1; + + // Do Yell + DoTimeRunSay(RUN_PROGRESS); + + // related NPC: m_aEventNpcInfo[uiIndex].npGuid + // related Chest: m_aEventNpcInfo[uiIndex] // Not yet stored, because likely unneeded } void Update(uint32 uiDiff) @@ -330,16 +415,19 @@ struct MANGOS_DLL_DECL instance_zulaman : public ScriptedInstance { if (m_uiEventTimer <= uiDiff) { - if (m_uiEventMinuteStep == 0) + if (m_auiEncounter[7] == 5) // TODO, verify 5min for warning texts + DoTimeRunSay(RUN_FAIL_SOON); + + if (m_auiEncounter[7] == 0) { debug_log("SD2: Instance Zulaman: event time reach end, event failed."); - m_auiEncounter[0] = FAIL; + SetData(TYPE_EVENT_RUN, FAIL); return; } - --m_uiEventMinuteStep; - DoUpdateWorldState(WORLD_STATE_COUNTER, m_uiEventMinuteStep); - debug_log("SD2: Instance Zulaman: minute decrease to %u.",m_uiEventMinuteStep); + --m_auiEncounter[7]; + SetData(TYPE_RUN_EVENT_TIME, m_auiEncounter[7]); + debug_log("SD2: Instance Zulaman: minute decrease to %u.", m_auiEncounter[7]); m_uiEventTimer = MINUTE*IN_MILLISECONDS; } diff --git a/scripts/eastern_kingdoms/zulaman/zulaman.cpp b/scripts/eastern_kingdoms/zulaman/zulaman.cpp index d5c875fcd..fa76438e8 100644 --- a/scripts/eastern_kingdoms/zulaman/zulaman.cpp +++ b/scripts/eastern_kingdoms/zulaman/zulaman.cpp @@ -59,7 +59,7 @@ struct MANGOS_DLL_DECL npc_forest_frogAI : public ScriptedAI uint32 cEntry = 0; switch(urand(0, 10)) { - case 0: cEntry = 24024; break; //Kraz + case 0: cEntry = 24024; break; //Kraz // wrong here? case 1: cEntry = 24397; break; //Mannuth case 2: cEntry = 24403; break; //Deez case 3: cEntry = 24404; break; //Galathryn @@ -143,7 +143,7 @@ struct MANGOS_DLL_DECL npc_harrison_jones_zaAI : public npc_escortAI case 1: DoScriptText(SAY_AT_GONG, m_creature); - if (GameObject* pEntranceDoor = m_pInstance->instance->GetGameObject(m_pInstance->GetData64(DATA_GO_GONG))) + if (GameObject* pEntranceDoor = m_pInstance->instance->GetGameObject(m_pInstance->GetData64(GO_STRANGE_GONG))) pEntranceDoor->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_UNK1); //Start bang gong for 2min @@ -223,7 +223,7 @@ bool GOUse_go_strange_gong(Player* pPlayer, GameObject* pGo) if (pInstance->GetData(TYPE_EVENT_RUN) == SPECIAL) { - if (Creature* pCreature = pGo->GetMap()->GetCreature(pInstance->GetData64(DATA_HARRISON))) + if (Creature* pCreature = pGo->GetMap()->GetCreature(pInstance->GetData64(NPC_HARRISON))) { if (npc_harrison_jones_zaAI* pHarrisonAI = dynamic_cast(pCreature->AI())) pHarrisonAI->SetHoldState(false); diff --git a/scripts/eastern_kingdoms/zulaman/zulaman.h b/scripts/eastern_kingdoms/zulaman/zulaman.h index 3fafc8c95..661cca0ea 100644 --- a/scripts/eastern_kingdoms/zulaman/zulaman.h +++ b/scripts/eastern_kingdoms/zulaman/zulaman.h @@ -7,8 +7,9 @@ enum InstanceZA { - MAX_ENCOUNTER = 7, + MAX_ENCOUNTER = 8, MAX_VENDOR = 2, + MAX_CHESTS = 4, SAY_INST_RELEASE = -1568067, SAY_INST_BEGIN = -1568068, @@ -37,24 +38,67 @@ enum InstanceZA TYPE_RAND_VENDOR_1 = 8, TYPE_RAND_VENDOR_2 = 9, - DATA_AKILZON = 10, - DATA_NALORAKK = 11, - DATA_JANALAI = 12, - DATA_HALAZZI = 13, - DATA_MALACRASS = 14, - DATA_ZULJIN = 15, - DATA_HARRISON = 16, - DATA_SPIRIT_LYNX = 17, + TYPE_RUN_EVENT_TIME = 10, - DATA_J_EGGS_RIGHT = 19, - DATA_J_EGGS_LEFT = 20, + TYPE_J_EGGS_RIGHT = 11, + TYPE_J_EGGS_LEFT = 12, - DATA_GO_GONG = 21, - DATA_GO_MALACRASS_GATE = 22, - DATA_GO_ENTRANCE = 23, + NPC_AKILZON = 23574, + NPC_NALORAKK = 23576, + NPC_JANALAI = 23578, + NPC_HALAZZI = 23577, + NPC_MALACRASS = 24239, + NPC_ZULJIN = 23863, NPC_EGG = 23817, - NPC_SPIRIT_LYNX = 24143 + NPC_SPIRIT_LYNX = 24143, + + NPC_HARRISON = 24358, + // Time Run Event NPCs + NPC_TANZAR = 23790, // at bear + NPC_KRAZ = 24024, // at phoenix + NPC_ASHLI = 24001, // at lynx + NPC_HARKOR = 23999, // at eagle + // unused (TODO or TODO with DB-tools) + NPC_TANZAR_CORPSE = 24442, + NPC_KRAZ_CORPSE = 24444, + NPC_ASHIL_CORPSE = 24441, + NPC_HARKOR_CORPSE = 24443, + + GO_STRANGE_GONG = 187359, + GO_MASSIVE_GATE = 186728, + GO_HEXLORD_ENTRANCE = 186305, + + // unused, expected to be possible to handle within Database! + GO_TANZARS_TRUNK = 186648, + GO_KRAZS_PACKAGE = 186667, + GO_ASHLIS_BAG = 186672, + GO_HARKORS_SATCHEL = 187021, +}; + +enum BossToChestIndex +{ + INDEX_NALORAKK = 0, + INDEX_JANALAI = 1, + INDEX_HALAZZI = 2, + INDEX_AKILZON = 3 +}; + +enum RunEventSteps +{ + RUN_START = 1, + RUN_FAIL = 2, + RUN_DONE = 3, + RUN_PROGRESS = 4, + RUN_FAIL_SOON = 5 +}; + +struct TimeEventNpcInfo +{ + TimeEventNpcInfo() : uiSavePosition(0) {} + + uint8 uiSavePosition; // stores in what order this npc was saved (0 means unsaved) + ObjectGuid npGuid; }; #endif diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 71c9fcb24..621f8ad21 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2132" + #define SD2_REVISION_NR "2133" #endif // __SD2_REVISION_NR_H__ From 6aa5c62b047225c2128b62744e77be689406f83f Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Wed, 25 May 2011 20:42:41 +0200 Subject: [PATCH 0113/1172] [2134] Add a few more things to Zul'Aman * Add door support for encounter doors * Move to header based instance script * Add IsEncounterInProgress * Set Instance Data for Bosses * Fix Timed-Event yell types --- .../eastern_kingdoms/zulaman/boss_akilzon.cpp | 9 + .../eastern_kingdoms/zulaman/boss_halazzi.cpp | 2 +- .../eastern_kingdoms/zulaman/boss_janalai.cpp | 2 +- .../zulaman/boss_nalorakk.cpp | 9 + .../eastern_kingdoms/zulaman/boss_zuljin.cpp | 9 + .../zulaman/instance_zulaman.cpp | 708 +++++++++--------- scripts/eastern_kingdoms/zulaman/zulaman.h | 63 +- sd2_revision_nr.h | 2 +- sql/scriptdev2_script_full.sql | 24 +- sql/updates/r2134_scriptdev2.sql | 1 + 10 files changed, 464 insertions(+), 365 deletions(-) create mode 100644 sql/updates/r2134_scriptdev2.sql diff --git a/scripts/eastern_kingdoms/zulaman/boss_akilzon.cpp b/scripts/eastern_kingdoms/zulaman/boss_akilzon.cpp index 33e430560..16dbe784c 100644 --- a/scripts/eastern_kingdoms/zulaman/boss_akilzon.cpp +++ b/scripts/eastern_kingdoms/zulaman/boss_akilzon.cpp @@ -89,6 +89,9 @@ struct MANGOS_DLL_DECL boss_akilzonAI : public ScriptedAI void Aggro(Unit* pWho) { DoScriptText(SAY_AGGRO, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_AKILZON, IN_PROGRESS); } void KilledUnit(Unit* pVictim) @@ -106,6 +109,12 @@ struct MANGOS_DLL_DECL boss_akilzonAI : public ScriptedAI m_pInstance->SetData(TYPE_AKILZON, DONE); } + void JustReachedHome() + { + if (m_pInstance) + m_pInstance->SetData(TYPE_AKILZON, FAIL); + } + void JustSummoned(Creature* pSummoned) { if (pSummoned->GetEntry() == NPC_SOARING_EAGLE) diff --git a/scripts/eastern_kingdoms/zulaman/boss_halazzi.cpp b/scripts/eastern_kingdoms/zulaman/boss_halazzi.cpp index 766e9daa8..318bd0962 100644 --- a/scripts/eastern_kingdoms/zulaman/boss_halazzi.cpp +++ b/scripts/eastern_kingdoms/zulaman/boss_halazzi.cpp @@ -114,7 +114,7 @@ struct MANGOS_DLL_DECL boss_halazziAI : public ScriptedAI void JustReachedHome() { - m_pInstance->SetData(TYPE_HALAZZI, NOT_STARTED); + m_pInstance->SetData(TYPE_HALAZZI, FAIL); } void Aggro(Unit* pWho) diff --git a/scripts/eastern_kingdoms/zulaman/boss_janalai.cpp b/scripts/eastern_kingdoms/zulaman/boss_janalai.cpp index 6a7f311f3..93f71cab0 100644 --- a/scripts/eastern_kingdoms/zulaman/boss_janalai.cpp +++ b/scripts/eastern_kingdoms/zulaman/boss_janalai.cpp @@ -210,7 +210,7 @@ struct MANGOS_DLL_DECL boss_janalaiAI : public ScriptedAI void JustReachedHome() { if (m_pInstance) - m_pInstance->SetData(TYPE_JANALAI, NOT_STARTED); + m_pInstance->SetData(TYPE_JANALAI, FAIL); } void JustDied(Unit* Killer) diff --git a/scripts/eastern_kingdoms/zulaman/boss_nalorakk.cpp b/scripts/eastern_kingdoms/zulaman/boss_nalorakk.cpp index 861119788..742fc2bd0 100644 --- a/scripts/eastern_kingdoms/zulaman/boss_nalorakk.cpp +++ b/scripts/eastern_kingdoms/zulaman/boss_nalorakk.cpp @@ -101,6 +101,9 @@ struct MANGOS_DLL_DECL boss_nalorakkAI : public ScriptedAI void Aggro(Unit *who) { DoScriptText(SAY_AGGRO, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_NALORAKK, IN_PROGRESS); } void KilledUnit(Unit* victim) @@ -118,6 +121,12 @@ struct MANGOS_DLL_DECL boss_nalorakkAI : public ScriptedAI m_pInstance->SetData(TYPE_NALORAKK, DONE); } + void JustReachedHome() + { + if (m_pInstance) + m_pInstance->SetData(TYPE_NALORAKK, FAIL); + } + void UpdateAI(const uint32 diff) { //Return since we have no target diff --git a/scripts/eastern_kingdoms/zulaman/boss_zuljin.cpp b/scripts/eastern_kingdoms/zulaman/boss_zuljin.cpp index 8b7a30973..f2bf448a1 100644 --- a/scripts/eastern_kingdoms/zulaman/boss_zuljin.cpp +++ b/scripts/eastern_kingdoms/zulaman/boss_zuljin.cpp @@ -112,6 +112,15 @@ struct MANGOS_DLL_DECL boss_zuljinAI : public ScriptedAI void Aggro(Unit* pWho) { DoScriptText(SAY_AGGRO, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_ZULJIN, IN_PROGRESS); + } + + void JustReachedHome() + { + if (m_pInstance) + m_pInstance->SetData(TYPE_ZULJIN, FAIL); } void KilledUnit(Unit* pVictim) diff --git a/scripts/eastern_kingdoms/zulaman/instance_zulaman.cpp b/scripts/eastern_kingdoms/zulaman/instance_zulaman.cpp index a0518d87f..0e3c7c7ad 100644 --- a/scripts/eastern_kingdoms/zulaman/instance_zulaman.cpp +++ b/scripts/eastern_kingdoms/zulaman/instance_zulaman.cpp @@ -24,418 +24,427 @@ EndScriptData */ #include "precompiled.h" #include "zulaman.h" -struct MANGOS_DLL_DECL instance_zulaman : public ScriptedInstance +instance_zulaman::instance_zulaman(Map* pMap) : ScriptedInstance(pMap), + m_uiEventTimer(MINUTE*IN_MILLISECONDS), + m_uiGongCount(0), + + m_uiAkilzonGUID(0), + m_uiNalorakkGUID(0), + m_uiJanalaiGUID(0), + m_uiHalazziGUID(0), + m_uiSpiritLynxGUID(0), + m_uiZuljinGUID(0), + m_uiMalacrassGUID(0), + m_uiHarrisonGUID(0), + + m_uiStrangeGongGUID(0), + m_uiMassiveGateGUID(0), + m_uiWindDoorGUID(0), + m_uiLynxTempleEntranceGUID(0), + m_uiLynxTempleExitGUID(0), + m_uiMalacrassEntranceGUID(0), + m_uiWoodenDoorGUID(0), + m_uiFireDoorGUID(0), + + m_uiEggsRemainingCount_Left(20), + m_uiEggsRemainingCount_Right(20) { - instance_zulaman(Map* pMap) : ScriptedInstance(pMap) {Initialize();} - - uint32 m_auiEncounter[MAX_ENCOUNTER]; - uint32 m_auiRandVendor[MAX_VENDOR]; - std::string strInstData; - - TimeEventNpcInfo m_aEventNpcInfo[MAX_CHESTS]; - - uint32 m_uiEventTimer; - - uint32 m_uiGongCount; - - uint64 m_uiAkilzonGUID; - uint64 m_uiNalorakkGUID; - uint64 m_uiJanalaiGUID; - uint64 m_uiHalazziGUID; - uint64 m_uiSpiritLynxGUID; - uint64 m_uiZuljinGUID; - uint64 m_uiMalacrassGUID; - uint64 m_uiHarrisonGUID; - - uint64 m_uiStrangeGongGUID; - uint64 m_uiMassiveGateGUID; - uint64 m_uiMalacrassEntranceGUID; + Initialize(); +} - GUIDList m_lEggsGUIDList; - uint32 m_uiEggsRemainingCount_Left; - uint32 m_uiEggsRemainingCount_Right; +void instance_zulaman::Initialize() +{ + memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); + memset(&m_auiRandVendor, 0, sizeof(m_auiRandVendor)); +} - void Initialize() +bool instance_zulaman::IsEncounterInProgress() const +{ + // Skip Time-Event and Time-Event timer + for (uint8 i = 1; i < MAX_ENCOUNTER - 1; ++i) { - memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); - memset(&m_auiRandVendor, 0, sizeof(m_auiRandVendor)); - - m_uiEventTimer = MINUTE*IN_MILLISECONDS; - - m_uiGongCount = 0; - - m_uiAkilzonGUID = 0; - m_uiNalorakkGUID = 0; - m_uiJanalaiGUID = 0; - m_uiHalazziGUID = 0; - m_uiSpiritLynxGUID = 0; - m_uiZuljinGUID = 0; - m_uiMalacrassGUID = 0; - m_uiHarrisonGUID = 0; - - m_uiStrangeGongGUID = 0; - m_uiMassiveGateGUID = 0; - m_uiMalacrassEntranceGUID = 0; - - m_lEggsGUIDList.clear(); - m_uiEggsRemainingCount_Left = 20; - m_uiEggsRemainingCount_Right = 20; + if (m_auiEncounter[i] == IN_PROGRESS) + return true; } - void OnCreatureCreate(Creature* pCreature) + return false; +} + +void instance_zulaman::OnCreatureCreate(Creature* pCreature) +{ + switch(pCreature->GetEntry()) { - switch(pCreature->GetEntry()) - { - case NPC_AKILZON: m_uiAkilzonGUID = pCreature->GetGUID(); break; - case NPC_NALORAKK: m_uiNalorakkGUID = pCreature->GetGUID(); break; - case NPC_JANALAI: m_uiJanalaiGUID = pCreature->GetGUID(); break; - case NPC_HALAZZI: m_uiHalazziGUID = pCreature->GetGUID(); break; - case NPC_MALACRASS: m_uiMalacrassGUID = pCreature->GetGUID(); break; - case NPC_ZULJIN: m_uiZuljinGUID = pCreature->GetGUID(); break; - case NPC_HARRISON: m_uiHarrisonGUID = pCreature->GetGUID(); break; - case NPC_SPIRIT_LYNX: m_uiSpiritLynxGUID = pCreature->GetGUID(); break; - - case NPC_TANZAR: m_aEventNpcInfo[INDEX_NALORAKK].npGuid = pCreature->GetObjectGuid(); break; - case NPC_KRAZ: m_aEventNpcInfo[INDEX_JANALAI].npGuid = pCreature->GetObjectGuid(); break; - case NPC_ASHLI: m_aEventNpcInfo[INDEX_HALAZZI].npGuid = pCreature->GetObjectGuid(); break; - case NPC_HARKOR: m_aEventNpcInfo[INDEX_AKILZON].npGuid = pCreature->GetObjectGuid(); break; - - case NPC_EGG: - if (m_auiEncounter[3] != DONE) - m_lEggsGUIDList.push_back(pCreature->GetGUID()); - break; - } + case NPC_AKILZON: m_uiAkilzonGUID = pCreature->GetGUID(); break; + case NPC_NALORAKK: m_uiNalorakkGUID = pCreature->GetGUID(); break; + case NPC_JANALAI: m_uiJanalaiGUID = pCreature->GetGUID(); break; + case NPC_HALAZZI: m_uiHalazziGUID = pCreature->GetGUID(); break; + case NPC_MALACRASS: m_uiMalacrassGUID = pCreature->GetGUID(); break; + case NPC_ZULJIN: m_uiZuljinGUID = pCreature->GetGUID(); break; + case NPC_HARRISON: m_uiHarrisonGUID = pCreature->GetGUID(); break; + case NPC_SPIRIT_LYNX: m_uiSpiritLynxGUID = pCreature->GetGUID(); break; + + case NPC_TANZAR: m_aEventNpcInfo[INDEX_NALORAKK].npGuid = pCreature->GetObjectGuid(); break; + case NPC_KRAZ: m_aEventNpcInfo[INDEX_JANALAI].npGuid = pCreature->GetObjectGuid(); break; + case NPC_ASHLI: m_aEventNpcInfo[INDEX_HALAZZI].npGuid = pCreature->GetObjectGuid(); break; + case NPC_HARKOR: m_aEventNpcInfo[INDEX_AKILZON].npGuid = pCreature->GetObjectGuid(); break; + + case NPC_EGG: + if (m_auiEncounter[3] != DONE) + m_lEggsGUIDList.push_back(pCreature->GetGUID()); + break; } +} - void OnObjectCreate(GameObject* pGo) +void instance_zulaman::OnObjectCreate(GameObject* pGo) +{ + switch(pGo->GetEntry()) { - switch(pGo->GetEntry()) - { - case GO_STRANGE_GONG: - m_uiStrangeGongGUID = pGo->GetGUID(); - break; - case GO_MASSIVE_GATE: - m_uiMassiveGateGUID = pGo->GetGUID(); - if (m_auiEncounter[0] == DONE || m_auiEncounter[0] == FAIL) - pGo->SetGoState(GO_STATE_ACTIVE); - break; - case GO_HEXLORD_ENTRANCE: - m_uiMalacrassEntranceGUID = pGo->GetGUID(); - if (GetKilledPreBosses() == 4) - pGo->SetGoState(GO_STATE_ACTIVE); - break; - } + case GO_STRANGE_GONG: + m_uiStrangeGongGUID = pGo->GetGUID(); + break; + case GO_MASSIVE_GATE: + m_uiMassiveGateGUID = pGo->GetGUID(); + if (m_auiEncounter[0] == DONE || m_auiEncounter[0] == FAIL) + pGo->SetGoState(GO_STATE_ACTIVE); + break; + case GO_WIND_DOOR: + m_uiWindDoorGUID = pGo->GetGUID(); + break; + case GO_LYNX_TEMPLE_ENTRANCE: + m_uiLynxTempleEntranceGUID = pGo->GetGUID(); + break; + case GO_LYNX_TEMPLE_EXIT: + m_uiLynxTempleExitGUID = pGo->GetGUID(); + if (m_auiEncounter[4] == DONE) + pGo->SetGoState(GO_STATE_ACTIVE); + break; + case GO_HEXLORD_ENTRANCE: + m_uiMalacrassEntranceGUID = pGo->GetGUID(); + if (GetKilledPreBosses() == 4) + pGo->SetGoState(GO_STATE_ACTIVE); + break; + case GO_WOODEN_DOOR: + m_uiWoodenDoorGUID = pGo->GetGUID(); + if (m_auiEncounter[5] == DONE) + pGo->SetGoState(GO_STATE_ACTIVE); + break; + case GO_FIRE_DOOR: + m_uiFireDoorGUID = pGo->GetGUID(); + break; } +} - void SetData(uint32 uiType, uint32 uiData) - { - debug_log("SD2: Instance Zulaman: SetData received for type %u with data %u",uiType,uiData); +void instance_zulaman::SetData(uint32 uiType, uint32 uiData) +{ + debug_log("SD2: Instance Zulaman: SetData received for type %u with data %u",uiType,uiData); - switch(uiType) - { - case TYPE_EVENT_RUN: - if (uiData == SPECIAL) - { - ++m_uiGongCount; - if (m_uiGongCount == 5) - m_auiEncounter[0] = uiData; - return; - } - if (uiData == IN_PROGRESS) - { - DoTimeRunSay(RUN_START); - DoUseDoorOrButton(m_uiMassiveGateGUID); - if (m_auiEncounter[7]) - SetData(TYPE_RUN_EVENT_TIME, m_auiEncounter[7]); - else - SetData(TYPE_RUN_EVENT_TIME, 20); // 20 Minutes as default time - DoUpdateWorldState(WORLD_STATE_ID, 1); - } - if (uiData == FAIL) + switch(uiType) + { + case TYPE_EVENT_RUN: + if (uiData == SPECIAL) + { + ++m_uiGongCount; + if (m_uiGongCount == 5) + m_auiEncounter[0] = uiData; + return; + } + if (uiData == IN_PROGRESS) + { + DoTimeRunSay(RUN_START); + DoUseDoorOrButton(m_uiMassiveGateGUID); + if (m_auiEncounter[7]) + SetData(TYPE_RUN_EVENT_TIME, m_auiEncounter[7]); + else + SetData(TYPE_RUN_EVENT_TIME, 20); // 20 Minutes as default time + DoUpdateWorldState(WORLD_STATE_ID, 1); + } + if (uiData == FAIL) + { + DoTimeRunSay(RUN_FAIL); + DoUpdateWorldState(WORLD_STATE_ID, 0); + // Kill remaining Event NPCs + for (uint8 i = 0; i < MAX_CHESTS; ++i) { - DoTimeRunSay(RUN_FAIL); - DoUpdateWorldState(WORLD_STATE_ID, 0); - // Kill remaining Event NPCs - for (uint8 i = 0; i < MAX_CHESTS; ++i) + // Not yet rescued, so too late + if (!m_aEventNpcInfo[i].uiSavePosition) { - // Not yet rescued, so too late - if (!m_aEventNpcInfo[i].uiSavePosition) - { - if (Creature* pCreature = instance->GetCreature(m_aEventNpcInfo[i].npGuid)) - pCreature->ForcedDespawn(); - } + if (Creature* pCreature = instance->GetCreature(m_aEventNpcInfo[i].npGuid)) + pCreature->ForcedDespawn(); } } - if (uiData == DONE) + } + if (uiData == DONE) + { + DoTimeRunSay(RUN_DONE); + DoUpdateWorldState(WORLD_STATE_ID, 0); + } + m_auiEncounter[0] = uiData; + break; + case TYPE_AKILZON: + DoUseDoorOrButton(m_uiWindDoorGUID); + if (uiData == DONE) + { + if (m_auiEncounter[0] == IN_PROGRESS) { - DoTimeRunSay(RUN_DONE); - DoUpdateWorldState(WORLD_STATE_ID, 0); + m_auiEncounter[7] += 10; // Add 10 minutes + SetData(TYPE_RUN_EVENT_TIME, m_auiEncounter[7]); + DoChestEvent(INDEX_AKILZON); } - m_auiEncounter[0] = uiData; - break; - case TYPE_AKILZON: - if (uiData == DONE) + } + m_auiEncounter[1] = uiData; + break; + case TYPE_NALORAKK: + if (uiData == DONE) + { + if (m_auiEncounter[0] == IN_PROGRESS) { - if (m_auiEncounter[0] == IN_PROGRESS) - { - m_auiEncounter[7] += 10; // Add 10 minutes - SetData(TYPE_RUN_EVENT_TIME, m_auiEncounter[7]); - DoChestEvent(INDEX_AKILZON); - } + m_auiEncounter[7] += 15; // Add 15 minutes + SetData(TYPE_RUN_EVENT_TIME, m_auiEncounter[7]); + DoChestEvent(INDEX_NALORAKK); } - m_auiEncounter[1] = uiData; - break; - case TYPE_NALORAKK: - if (uiData == DONE) - { - if (m_auiEncounter[0] == IN_PROGRESS) - { - m_auiEncounter[7] += 15; // Add 15 minutes - SetData(TYPE_RUN_EVENT_TIME, m_auiEncounter[7]); - DoChestEvent(INDEX_NALORAKK); - } - } - m_auiEncounter[2] = uiData; - break; - case TYPE_JANALAI: - if (uiData == NOT_STARTED) - { - m_uiEggsRemainingCount_Left = 20; - m_uiEggsRemainingCount_Right = 20; + } + m_auiEncounter[2] = uiData; + break; + case TYPE_JANALAI: + if (uiData == NOT_STARTED) + { + m_uiEggsRemainingCount_Left = 20; + m_uiEggsRemainingCount_Right = 20; - if (!m_lEggsGUIDList.empty()) + if (!m_lEggsGUIDList.empty()) + { + for(GUIDList::const_iterator itr = m_lEggsGUIDList.begin(); itr != m_lEggsGUIDList.end(); ++itr) { - for(GUIDList::const_iterator itr = m_lEggsGUIDList.begin(); itr != m_lEggsGUIDList.end(); ++itr) + if (Creature* pEgg = instance->GetCreature(*itr)) { - if (Creature* pEgg = instance->GetCreature(*itr)) - { - if (!pEgg->isAlive()) - pEgg->Respawn(); - } + if (!pEgg->isAlive()) + pEgg->Respawn(); } } } - if (uiData == DONE) - { - m_lEggsGUIDList.clear(); - - if (m_auiEncounter[0] == IN_PROGRESS) - DoChestEvent(INDEX_JANALAI); - } - m_auiEncounter[3] = uiData; - break; - case TYPE_HALAZZI: - if (uiData == DONE) - { - if (m_auiEncounter[0] == IN_PROGRESS) - DoChestEvent(INDEX_HALAZZI); - } - m_auiEncounter[4] = uiData; - break; - case TYPE_MALACRASS: - m_auiEncounter[5] = uiData; - break; - case TYPE_ZULJIN: - m_auiEncounter[6] = uiData; - break; - case TYPE_J_EGGS_RIGHT: - --m_uiEggsRemainingCount_Right; - break; - case TYPE_J_EGGS_LEFT: - --m_uiEggsRemainingCount_Left; - break; - case TYPE_RAND_VENDOR_1: - m_auiRandVendor[0] = uiData; - break; - case TYPE_RAND_VENDOR_2: - m_auiRandVendor[1] = uiData; - break; - - case TYPE_RUN_EVENT_TIME: - m_auiEncounter[7] = uiData; - DoUpdateWorldState(WORLD_STATE_COUNTER, m_auiEncounter[7]); - break; - - default: - error_log("SD2: Instance Zulaman: ERROR SetData = %u for type %u does not exist/not implemented.",uiType,uiData); - return; - } + } + if (uiData == DONE) + { + m_lEggsGUIDList.clear(); - if (uiData == DONE && GetKilledPreBosses() == 4 && (uiType == TYPE_AKILZON || uiType == TYPE_NALORAKK || uiType == TYPE_JANALAI || uiType == TYPE_HALAZZI)) - { + if (m_auiEncounter[0] == IN_PROGRESS) + DoChestEvent(INDEX_JANALAI); + } + m_auiEncounter[3] = uiData; + break; + case TYPE_HALAZZI: + DoUseDoorOrButton(m_uiLynxTempleEntranceGUID); + if (uiData == DONE) + { + DoUseDoorOrButton(m_uiLynxTempleExitGUID); + if (m_auiEncounter[0] == IN_PROGRESS) + DoChestEvent(INDEX_HALAZZI); + } + m_auiEncounter[4] = uiData; + break; + case TYPE_MALACRASS: DoUseDoorOrButton(m_uiMalacrassEntranceGUID); - if (m_auiEncounter[0] == IN_PROGRESS) - SetData(TYPE_EVENT_RUN, DONE); - } - - if (uiData == DONE || uiType == TYPE_RUN_EVENT_TIME || uiType == TYPE_EVENT_RUN) - { - OUT_SAVE_INST_DATA; - - std::ostringstream saveStream; - saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2] << " " - << m_auiEncounter[3] << " " << m_auiEncounter[4] << " " << m_auiEncounter[5] << " " - << m_auiEncounter[6] << " " << m_auiEncounter[7]; - - strInstData = saveStream.str(); - - SaveToDB(); - OUT_SAVE_INST_DATA_COMPLETE; - } + if (uiData == DONE) + DoUseDoorOrButton(m_uiWoodenDoorGUID); + m_auiEncounter[5] = uiData; + break; + case TYPE_ZULJIN: + DoUseDoorOrButton(m_uiFireDoorGUID); + m_auiEncounter[6] = uiData; + break; + case TYPE_J_EGGS_RIGHT: + --m_uiEggsRemainingCount_Right; + break; + case TYPE_J_EGGS_LEFT: + --m_uiEggsRemainingCount_Left; + break; + case TYPE_RAND_VENDOR_1: + m_auiRandVendor[0] = uiData; + break; + case TYPE_RAND_VENDOR_2: + m_auiRandVendor[1] = uiData; + break; + + case TYPE_RUN_EVENT_TIME: + m_auiEncounter[7] = uiData; + DoUpdateWorldState(WORLD_STATE_COUNTER, m_auiEncounter[7]); + break; + + default: + error_log("SD2: Instance Zulaman: ERROR SetData = %u for type %u does not exist/not implemented.",uiType,uiData); + return; } - const char* Save() + if (uiData == DONE && GetKilledPreBosses() == 4 && (uiType == TYPE_AKILZON || uiType == TYPE_NALORAKK || uiType == TYPE_JANALAI || uiType == TYPE_HALAZZI)) { - return strInstData.c_str(); + DoUseDoorOrButton(m_uiMalacrassEntranceGUID); + if (m_auiEncounter[0] == IN_PROGRESS) + SetData(TYPE_EVENT_RUN, DONE); } - void Load(const char* chrIn) + if (uiData == DONE || uiType == TYPE_RUN_EVENT_TIME || uiType == TYPE_EVENT_RUN) { - if (!chrIn) - { - OUT_LOAD_INST_DATA_FAIL; - return; - } - - OUT_LOAD_INST_DATA(chrIn); + OUT_SAVE_INST_DATA; - std::istringstream loadStream(chrIn); - loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3] - >> m_auiEncounter[4] >> m_auiEncounter[5] >> m_auiEncounter[6] >> m_auiEncounter[7]; + std::ostringstream saveStream; + saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2] << " " + << m_auiEncounter[3] << " " << m_auiEncounter[4] << " " << m_auiEncounter[5] << " " + << m_auiEncounter[6] << " " << m_auiEncounter[7]; - // Skip m_auiEncounter[7], to start the time event properly if needed - for (uint8 i = 0; i < MAX_ENCOUNTER - 1; ++i) - { - if (m_auiEncounter[i] == IN_PROGRESS) - m_auiEncounter[i] = NOT_STARTED; - } + m_strInstData = saveStream.str(); - // Restart TYPE_EVENT_RUN if was already started - if (m_auiEncounter[7] != 0 && m_auiEncounter[0] != DONE && m_auiEncounter[0] != FAIL) - SetData(TYPE_EVENT_RUN, IN_PROGRESS); - - OUT_LOAD_INST_DATA_COMPLETE; + SaveToDB(); + OUT_SAVE_INST_DATA_COMPLETE; } +} - uint32 GetData(uint32 uiType) +void instance_zulaman::Load(const char* chrIn) +{ + if (!chrIn) { - switch(uiType) - { - case TYPE_EVENT_RUN: return m_auiEncounter[0]; - case TYPE_AKILZON: return m_auiEncounter[1]; - case TYPE_NALORAKK: return m_auiEncounter[2]; - case TYPE_JANALAI: return m_auiEncounter[3]; - case TYPE_HALAZZI: return m_auiEncounter[4]; - case TYPE_ZULJIN: return m_auiEncounter[5]; - case TYPE_MALACRASS: return m_auiEncounter[6]; - case TYPE_J_EGGS_LEFT: return m_uiEggsRemainingCount_Left; - case TYPE_J_EGGS_RIGHT: return m_uiEggsRemainingCount_Right; - case TYPE_RAND_VENDOR_1: return m_auiRandVendor[0]; - case TYPE_RAND_VENDOR_2: return m_auiRandVendor[1]; - - default: - return 0; - } + OUT_LOAD_INST_DATA_FAIL; + return; } - uint64 GetData64(uint32 uiData) + OUT_LOAD_INST_DATA(chrIn); + + std::istringstream loadStream(chrIn); + loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3] + >> m_auiEncounter[4] >> m_auiEncounter[5] >> m_auiEncounter[6] >> m_auiEncounter[7]; + + // Skip m_auiEncounter[7], to start the time event properly if needed + for (uint8 i = 0; i < MAX_ENCOUNTER - 1; ++i) { - switch(uiData) - { - case NPC_AKILZON: return m_uiAkilzonGUID; - case NPC_NALORAKK: return m_uiNalorakkGUID; - case NPC_JANALAI: return m_uiJanalaiGUID; - case NPC_HALAZZI: return m_uiHalazziGUID; - case NPC_SPIRIT_LYNX: return m_uiSpiritLynxGUID; - case NPC_ZULJIN: return m_uiZuljinGUID; - case NPC_MALACRASS: return m_uiMalacrassGUID; - case NPC_HARRISON: return m_uiHarrisonGUID; - - case GO_STRANGE_GONG: return m_uiStrangeGongGUID; - case GO_MASSIVE_GATE: return m_uiMassiveGateGUID; - case GO_HEXLORD_ENTRANCE: return m_uiMalacrassEntranceGUID; - - default: - return 0; - } + if (m_auiEncounter[i] == IN_PROGRESS) + m_auiEncounter[i] = NOT_STARTED; } - uint8 GetKilledPreBosses() + // Restart TYPE_EVENT_RUN if was already started + if (m_auiEncounter[7] != 0 && m_auiEncounter[0] != DONE && m_auiEncounter[0] != FAIL) + SetData(TYPE_EVENT_RUN, IN_PROGRESS); + + OUT_LOAD_INST_DATA_COMPLETE; +} + +uint32 instance_zulaman::GetData(uint32 uiType) +{ + switch(uiType) { - return (GetData(TYPE_AKILZON) == DONE ? 1 : 0) + (GetData(TYPE_NALORAKK) == DONE ? 1 : 0) + (GetData(TYPE_JANALAI) == DONE ? 1 : 0) + (GetData(TYPE_HALAZZI) == DONE ? 1 : 0); + case TYPE_EVENT_RUN: return m_auiEncounter[0]; + case TYPE_AKILZON: return m_auiEncounter[1]; + case TYPE_NALORAKK: return m_auiEncounter[2]; + case TYPE_JANALAI: return m_auiEncounter[3]; + case TYPE_HALAZZI: return m_auiEncounter[4]; + case TYPE_ZULJIN: return m_auiEncounter[5]; + case TYPE_MALACRASS: return m_auiEncounter[6]; + case TYPE_J_EGGS_LEFT: return m_uiEggsRemainingCount_Left; + case TYPE_J_EGGS_RIGHT: return m_uiEggsRemainingCount_Right; + case TYPE_RAND_VENDOR_1: return m_auiRandVendor[0]; + case TYPE_RAND_VENDOR_2: return m_auiRandVendor[1]; + + default: + return 0; } +} - void DoTimeRunSay(RunEventSteps uiData) +uint64 instance_zulaman::GetData64(uint32 uiData) +{ + switch(uiData) { - // TODO - This yell must be made independend of load state of Malacrass - Creature* pHexlord = instance->GetCreature(m_uiMalacrassGUID); - if (!pHexlord) - return; - - switch (uiData) - { - case RUN_START: DoScriptText(SAY_INST_BEGIN, pHexlord); break; - case RUN_FAIL: DoScriptText(urand(0, 1) ? SAY_INST_SACRIF1 : SAY_INST_SACRIF2, pHexlord); break; - case RUN_DONE: DoScriptText(SAY_INST_COMPLETE, pHexlord); break; - case RUN_PROGRESS: - switch (GetKilledPreBosses()) - { - case 1: DoScriptText(SAY_INST_PROGRESS_1, pHexlord); break; - case 2: DoScriptText(SAY_INST_PROGRESS_2, pHexlord); break; - case 3: DoScriptText(SAY_INST_PROGRESS_3, pHexlord); break; - } - break; - case RUN_FAIL_SOON: - switch (GetKilledPreBosses()) - { - case 0: DoScriptText(SAY_INST_WARN_1, pHexlord); break; - case 1: DoScriptText(SAY_INST_WARN_2, pHexlord); break; - case 2: DoScriptText(SAY_INST_WARN_3, pHexlord); break; - case 3: DoScriptText(SAY_INST_WARN_4, pHexlord); break; - } - break; - } + case NPC_AKILZON: return m_uiAkilzonGUID; + case NPC_NALORAKK: return m_uiNalorakkGUID; + case NPC_JANALAI: return m_uiJanalaiGUID; + case NPC_HALAZZI: return m_uiHalazziGUID; + case NPC_SPIRIT_LYNX: return m_uiSpiritLynxGUID; + case NPC_ZULJIN: return m_uiZuljinGUID; + case NPC_MALACRASS: return m_uiMalacrassGUID; + case NPC_HARRISON: return m_uiHarrisonGUID; + + case GO_STRANGE_GONG: return m_uiStrangeGongGUID; + case GO_MASSIVE_GATE: return m_uiMassiveGateGUID; + case GO_HEXLORD_ENTRANCE: return m_uiMalacrassEntranceGUID; + + default: + return 0; } +} - void DoChestEvent(BossToChestIndex uiIndex) - { - // Store Order of this kill - m_aEventNpcInfo[uiIndex].uiSavePosition = GetKilledPreBosses() + 1; +uint8 instance_zulaman::GetKilledPreBosses() +{ + return (GetData(TYPE_AKILZON) == DONE ? 1 : 0) + (GetData(TYPE_NALORAKK) == DONE ? 1 : 0) + (GetData(TYPE_JANALAI) == DONE ? 1 : 0) + (GetData(TYPE_HALAZZI) == DONE ? 1 : 0); +} - // Do Yell - DoTimeRunSay(RUN_PROGRESS); +void instance_zulaman::DoTimeRunSay(RunEventSteps uiData) +{ + // TODO - This yell must be made independend of load state of Malacrass + Creature* pHexlord = instance->GetCreature(m_uiMalacrassGUID); + if (!pHexlord) + return; - // related NPC: m_aEventNpcInfo[uiIndex].npGuid - // related Chest: m_aEventNpcInfo[uiIndex] // Not yet stored, because likely unneeded + switch (uiData) + { + case RUN_START: DoScriptText(SAY_INST_BEGIN, pHexlord); break; + case RUN_FAIL: DoScriptText(urand(0, 1) ? SAY_INST_SACRIF1 : SAY_INST_SACRIF2, pHexlord); break; + case RUN_DONE: DoScriptText(SAY_INST_COMPLETE, pHexlord); break; + case RUN_PROGRESS: + // This function is on progress called before the data is set to the array + switch (GetKilledPreBosses() + 1) + { + case 1: DoScriptText(SAY_INST_PROGRESS_1, pHexlord); break; + case 2: DoScriptText(SAY_INST_PROGRESS_2, pHexlord); break; + case 3: DoScriptText(SAY_INST_PROGRESS_3, pHexlord); break; + } + break; + case RUN_FAIL_SOON: + switch (GetKilledPreBosses()) + { + case 0: DoScriptText(SAY_INST_WARN_1, pHexlord); break; + case 1: DoScriptText(SAY_INST_WARN_2, pHexlord); break; + case 2: DoScriptText(SAY_INST_WARN_3, pHexlord); break; + case 3: DoScriptText(SAY_INST_WARN_4, pHexlord); break; + } + break; } +} + +void instance_zulaman::DoChestEvent(BossToChestIndex uiIndex) +{ + // Store Order of this kill + m_aEventNpcInfo[uiIndex].uiSavePosition = GetKilledPreBosses() + 1; + + // Do Yell + DoTimeRunSay(RUN_PROGRESS); - void Update(uint32 uiDiff) + // related NPC: m_aEventNpcInfo[uiIndex].npGuid + // related Chest: m_aEventNpcInfo[uiIndex] // Not yet stored, because likely unneeded +} + +void instance_zulaman::Update(uint32 uiDiff) +{ + if (GetData(TYPE_EVENT_RUN) == IN_PROGRESS) { - if (GetData(TYPE_EVENT_RUN) == IN_PROGRESS) + if (m_uiEventTimer <= uiDiff) { - if (m_uiEventTimer <= uiDiff) - { - if (m_auiEncounter[7] == 5) // TODO, verify 5min for warning texts - DoTimeRunSay(RUN_FAIL_SOON); + if (m_auiEncounter[7] == 5) // TODO, verify 5min for warning texts + DoTimeRunSay(RUN_FAIL_SOON); - if (m_auiEncounter[7] == 0) - { - debug_log("SD2: Instance Zulaman: event time reach end, event failed."); - SetData(TYPE_EVENT_RUN, FAIL); - return; - } + if (m_auiEncounter[7] == 0) + { + debug_log("SD2: Instance Zulaman: event time reach end, event failed."); + SetData(TYPE_EVENT_RUN, FAIL); + return; + } - --m_auiEncounter[7]; - SetData(TYPE_RUN_EVENT_TIME, m_auiEncounter[7]); - debug_log("SD2: Instance Zulaman: minute decrease to %u.", m_auiEncounter[7]); + --m_auiEncounter[7]; + SetData(TYPE_RUN_EVENT_TIME, m_auiEncounter[7]); + debug_log("SD2: Instance Zulaman: minute decrease to %u.", m_auiEncounter[7]); - m_uiEventTimer = MINUTE*IN_MILLISECONDS; - } - else - m_uiEventTimer -= uiDiff; + m_uiEventTimer = MINUTE*IN_MILLISECONDS; } + else + m_uiEventTimer -= uiDiff; } -}; +} InstanceData* GetInstanceData_instance_zulaman(Map* pMap) { @@ -445,6 +454,7 @@ InstanceData* GetInstanceData_instance_zulaman(Map* pMap) void AddSC_instance_zulaman() { Script* pNewScript; + pNewScript = new Script; pNewScript->Name = "instance_zulaman"; pNewScript->GetInstanceData = &GetInstanceData_instance_zulaman; diff --git a/scripts/eastern_kingdoms/zulaman/zulaman.h b/scripts/eastern_kingdoms/zulaman/zulaman.h index 661cca0ea..4da49c998 100644 --- a/scripts/eastern_kingdoms/zulaman/zulaman.h +++ b/scripts/eastern_kingdoms/zulaman/zulaman.h @@ -11,7 +11,7 @@ enum InstanceZA MAX_VENDOR = 2, MAX_CHESTS = 4, - SAY_INST_RELEASE = -1568067, + SAY_INST_RELEASE = -1568067, // TODO Event NYI SAY_INST_BEGIN = -1568068, SAY_INST_PROGRESS_1 = -1568069, SAY_INST_PROGRESS_2 = -1568070, @@ -67,7 +67,12 @@ enum InstanceZA GO_STRANGE_GONG = 187359, GO_MASSIVE_GATE = 186728, + GO_WIND_DOOR = 186858, + GO_LYNX_TEMPLE_ENTRANCE = 186304, + GO_LYNX_TEMPLE_EXIT = 186303, GO_HEXLORD_ENTRANCE = 186305, + GO_WOODEN_DOOR = 186306, + GO_FIRE_DOOR = 186859, // unused, expected to be possible to handle within Database! GO_TANZARS_TRUNK = 186648, @@ -101,4 +106,60 @@ struct TimeEventNpcInfo ObjectGuid npGuid; }; +class MANGOS_DLL_DECL instance_zulaman : public ScriptedInstance +{ + public: + instance_zulaman(Map* pMap); + + void Initialize(); + bool IsEncounterInProgress() const; + + void OnCreatureCreate(Creature* pCreature); + void OnObjectCreate(GameObject* pGo); + + void SetData(uint32 uiType, uint32 uiData); + uint32 GetData(uint32 uiType); + uint64 GetData64(uint32 uiData); + + const char* Save() { return m_strInstData.c_str(); } + void Load(const char* chrIn); + + void Update(uint32 uiDiff); + + private: + uint8 GetKilledPreBosses(); + void DoTimeRunSay(RunEventSteps uiData); + void DoChestEvent(BossToChestIndex uiIndex); + + std::string m_strInstData; + uint32 m_auiEncounter[MAX_ENCOUNTER]; + uint32 m_auiRandVendor[MAX_VENDOR]; + TimeEventNpcInfo m_aEventNpcInfo[MAX_CHESTS]; + + uint32 m_uiEventTimer; + uint32 m_uiGongCount; + + uint64 m_uiAkilzonGUID; + uint64 m_uiNalorakkGUID; + uint64 m_uiJanalaiGUID; + uint64 m_uiHalazziGUID; + uint64 m_uiSpiritLynxGUID; + uint64 m_uiZuljinGUID; + uint64 m_uiMalacrassGUID; + uint64 m_uiHarrisonGUID; + + uint64 m_uiStrangeGongGUID; + uint64 m_uiMassiveGateGUID; + uint64 m_uiWindDoorGUID; + uint64 m_uiLynxTempleEntranceGUID; + uint64 m_uiLynxTempleExitGUID; + uint64 m_uiMalacrassEntranceGUID; + uint64 m_uiWoodenDoorGUID; + uint64 m_uiFireDoorGUID; + + GUIDList m_lEggsGUIDList; + uint32 m_uiEggsRemainingCount_Left; + uint32 m_uiEggsRemainingCount_Right; +}; + #endif diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 621f8ad21..e59e44dd7 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2133" + #define SD2_REVISION_NR "2134" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 2d16a99ff..716bdcda3 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -2319,18 +2319,18 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1568065,'Lot more gonna fall like you!',12099,1,0,0,'zuljin SAY_KILL2'), (-1568066,'Mebbe me fall...but da Amani empire...never gonna die...',12100,1,0,0,'zuljin SAY_DEATH'), -(-1568067,'Zul\'jin got a surprise for ya...',12052,1,0,0,'zulaman SAY_INST_RELEASE'), -(-1568068,'Da spirits gonna feast today! Begin da ceremonies, sacrifice da prisoners... make room for our new guests!',12053,1,0,0,'zulaman SAY_INST_BEGIN'), -(-1568069,'Take your pick, trespassers! Any of ma priests be happy to accommodate ya.',12054,1,0,0,'zulaman SAY_INST_PROGRESS_1'), -(-1568070,'Don\'t be shy. Thousands have come before you. Ya not be alone in your service.',12055,1,0,0,'zulaman SAY_INST_PROGRESS_2'), -(-1568071,'Ya gonna fail, strangers. Many try before you, but dey only make us stronger!',12056,1,0,0,'zulaman SAY_INST_PROGRESS_3'), -(-1568072,'Your efforts was in vain, trespassers. The rituals nearly be complete.',12057,1,0,0,'zulaman SAY_INST_WARN_1'), -(-1568073,'Soon da cages gonna be empty, da sacrifices be complete, and you gonna take dere places.',12058,1,0,0,'zulaman SAY_INST_WARN_2'), -(-1568074,'Time be running low, strangers. Soon you gonna join da souls of dem ya failed to save.',12059,1,0,0,'zulaman SAY_INST_WARN_3'), -(-1568075,'Make haste, ma priests! Da rituals must not be interrupted!',12060,1,0,0,'zulaman SAY_INST_WARN_4'), -(-1568076,'Ya make a good try... but now you gonna join da ones who already fall.',12061,1,0,0,'zulaman SAY_INST_SACRIF1'), -(-1568077,'Ya not do too bad. Ya efforts [...] for a small time. Come to me now. Ya prove yourself worthy offerings.',12062,1,0,0,'zulaman SAY_INST_SACRIF2'), -(-1568078,'Watch now. Every offering gonna strengthen our ties to da spirit world. Soon, we gonna be unstoppable!',12065,1,0,0,'zulaman SAY_INST_COMPLETE'), +(-1568067,'Zul\'jin got a surprise for ya...',12052,6,0,0,'zulaman SAY_INST_RELEASE'), +(-1568068,'Da spirits gonna feast today! Begin da ceremonies, sacrifice da prisoners... make room for our new guests!',12053,6,0,0,'zulaman SAY_INST_BEGIN'), +(-1568069,'Take your pick, trespassers! Any of ma priests be happy to accommodate ya.',12054,6,0,0,'zulaman SAY_INST_PROGRESS_1'), +(-1568070,'Don\'t be shy. Thousands have come before you. Ya not be alone in your service.',12055,6,0,0,'zulaman SAY_INST_PROGRESS_2'), +(-1568071,'Ya gonna fail, strangers. Many try before you, but dey only make us stronger!',12056,6,0,0,'zulaman SAY_INST_PROGRESS_3'), +(-1568072,'Your efforts was in vain, trespassers. The rituals nearly be complete.',12057,6,0,0,'zulaman SAY_INST_WARN_1'), +(-1568073,'Soon da cages gonna be empty, da sacrifices be complete, and you gonna take dere places.',12058,6,0,0,'zulaman SAY_INST_WARN_2'), +(-1568074,'Time be running low, strangers. Soon you gonna join da souls of dem ya failed to save.',12059,6,0,0,'zulaman SAY_INST_WARN_3'), +(-1568075,'Make haste, ma priests! Da rituals must not be interrupted!',12060,6,0,0,'zulaman SAY_INST_WARN_4'), +(-1568076,'Ya make a good try... but now you gonna join da ones who already fall.',12061,6,0,0,'zulaman SAY_INST_SACRIF1'), +(-1568077,'Ya not do too bad. Ya efforts [...] for a small time. Come to me now. Ya prove yourself worthy offerings.',12062,6,0,0,'zulaman SAY_INST_SACRIF2'), +(-1568078,'Watch now. Every offering gonna strengthen our ties to da spirit world. Soon, we gonna be unstoppable!',12065,6,0,0,'zulaman SAY_INST_COMPLETE'), (-1568079,'Suit yourself. At least five of you must assist me if we\'re to get inside. Follow me.',0,1,0,0,'harrison SAY_START'), (-1568080,'According to my calculations, if enough of us bang the gong at once the seal on these doors will break and we can enter.',0,1,0,0,'harrison SAY_AT_GONG'), diff --git a/sql/updates/r2134_scriptdev2.sql b/sql/updates/r2134_scriptdev2.sql new file mode 100644 index 000000000..cd63988e7 --- /dev/null +++ b/sql/updates/r2134_scriptdev2.sql @@ -0,0 +1 @@ +UPDATE script_texts SET type=6 WHERE entry BETWEEN -1568078 AND -1568067; From f071cea01dad144be5ddf31a560329f7f4ec4250 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Thu, 26 May 2011 19:48:33 +0200 Subject: [PATCH 0114/1172] [2135] Move Shadow Labyrinth to header based version Also drop wrong IsEncounterInProgress function. --- .../instance_shadow_labyrinth.cpp | 255 ++++++++---------- .../shadow_labyrinth/shadow_labyrinth.h | 30 +++ sd2_revision_nr.h | 2 +- 3 files changed, 147 insertions(+), 140 deletions(-) diff --git a/scripts/outland/auchindoun/shadow_labyrinth/instance_shadow_labyrinth.cpp b/scripts/outland/auchindoun/shadow_labyrinth/instance_shadow_labyrinth.cpp index 5e1573a11..30e66943e 100644 --- a/scripts/outland/auchindoun/shadow_labyrinth/instance_shadow_labyrinth.cpp +++ b/scripts/outland/auchindoun/shadow_labyrinth/instance_shadow_labyrinth.cpp @@ -31,172 +31,148 @@ EndScriptData */ 4 - Murmur event */ -struct MANGOS_DLL_DECL instance_shadow_labyrinth : public ScriptedInstance -{ - instance_shadow_labyrinth(Map* pMap) : ScriptedInstance(pMap) {Initialize();}; - - uint32 m_auiEncounter[MAX_ENCOUNTER]; - std::string strInstData; +instance_shadow_labyrinth::instance_shadow_labyrinth(Map* pMap) : ScriptedInstance(pMap), + m_uiRefectoryDoorGUID(0), + m_uiScreamingHallDoorGUID(0), - uint64 m_uiRefectoryDoorGUID; - uint64 m_uiScreamingHallDoorGUID; + m_uiGrandmasterVorpil(0), + m_uiFelOverseerCount(0) +{ + Initialize(); +} - uint64 m_uiGrandmasterVorpil; - uint32 m_uiFelOverseerCount; +void instance_shadow_labyrinth::Initialize() +{ + memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); +} - void Initialize() +void instance_shadow_labyrinth::OnObjectCreate(GameObject* pGo) +{ + switch(pGo->GetEntry()) { - memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); - - m_uiRefectoryDoorGUID = 0; - m_uiScreamingHallDoorGUID = 0; - - m_uiGrandmasterVorpil = 0; - m_uiFelOverseerCount = 0; + case GO_REFECTORY_DOOR: + m_uiRefectoryDoorGUID = pGo->GetGUID(); + if (m_auiEncounter[2] == DONE) + pGo->SetGoState(GO_STATE_ACTIVE); + break; + case GO_SCREAMING_HALL_DOOR: + m_uiScreamingHallDoorGUID = pGo->GetGUID(); + if (m_auiEncounter[3] == DONE) + pGo->SetGoState(GO_STATE_ACTIVE); + break; } +} - bool IsEncounterInProgress() const +void instance_shadow_labyrinth::OnCreatureCreate(Creature* pCreature) +{ + switch(pCreature->GetEntry()) { - for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) - if (m_auiEncounter[i] == IN_PROGRESS) return true; - - return false; + case NPC_VORPIL: + m_uiGrandmasterVorpil = pCreature->GetGUID(); + break; + case NPC_FEL_OVERSEER: + ++m_uiFelOverseerCount; // TODO should actually only count alive ones + debug_log("SD2: Shadow Labyrinth: counting %u Fel Overseers.", m_uiFelOverseerCount); + break; } +} - void OnObjectCreate(GameObject* pGo) +void instance_shadow_labyrinth::SetData(uint32 uiType, uint32 uiData) +{ + switch(uiType) { - switch(pGo->GetEntry()) - { - case GO_REFECTORY_DOOR: - m_uiRefectoryDoorGUID = pGo->GetGUID(); - if (m_auiEncounter[2] == DONE) - pGo->SetGoState(GO_STATE_ACTIVE); - break; - case GO_SCREAMING_HALL_DOOR: - m_uiScreamingHallDoorGUID = pGo->GetGUID(); - if (m_auiEncounter[3] == DONE) - pGo->SetGoState(GO_STATE_ACTIVE); - break; - } - } + case TYPE_HELLMAW: + m_auiEncounter[0] = uiData; + break; + + case TYPE_OVERSEER: + if (uiData != DONE) + { + error_log("SD2: Shadow Labyrinth: TYPE_OVERSEER did not expect other data than DONE"); + return; + } + if (m_uiFelOverseerCount) + { + --m_uiFelOverseerCount; - void OnCreatureCreate(Creature* pCreature) - { - switch(pCreature->GetEntry()) - { - case 18732: - m_uiGrandmasterVorpil = pCreature->GetGUID(); - break; - case 18796: - if (pCreature->isAlive()) + if (m_uiFelOverseerCount) { - ++m_uiFelOverseerCount; - debug_log("SD2: Shadow Labyrinth: counting %u Fel Overseers.", m_uiFelOverseerCount); - } - break; - } - } + debug_log("SD2: Shadow Labyrinth: %u Fel Overseers left to kill.", m_uiFelOverseerCount); - void SetData(uint32 uiType, uint32 uiData) - { - switch(uiType) - { - case TYPE_HELLMAW: - m_auiEncounter[0] = uiData; - break; - - case TYPE_OVERSEER: - if (uiData != DONE) - { - error_log("SD2: Shadow Labyrinth: TYPE_OVERSEER did not expect other data than DONE"); + // Skip save call return; } - if (m_uiFelOverseerCount) + else { - --m_uiFelOverseerCount; - - if (m_uiFelOverseerCount) - debug_log("SD2: Shadow Labyrinth: %u Fel Overseers left to kill.", m_uiFelOverseerCount); - else - { - m_auiEncounter[1] = DONE; - debug_log("SD2: Shadow Labyrinth: TYPE_OVERSEER == DONE"); - } + m_auiEncounter[1] = DONE; + debug_log("SD2: Shadow Labyrinth: TYPE_OVERSEER == DONE"); } - break; - - case TYPE_INCITER: - if (uiData == DONE) - DoUseDoorOrButton(m_uiRefectoryDoorGUID); - m_auiEncounter[2] = uiData; - break; - - case TYPE_VORPIL: - if (uiData == DONE) - DoUseDoorOrButton(m_uiScreamingHallDoorGUID); - m_auiEncounter[3] = uiData; - break; - - case TYPE_MURMUR: - m_auiEncounter[4] = uiData; - break; - } - - if (uiData == DONE) - { - if (uiType == TYPE_OVERSEER && m_uiFelOverseerCount != 0) - return; + } + break; + + case TYPE_INCITER: + if (uiData == DONE) + DoUseDoorOrButton(m_uiRefectoryDoorGUID); + m_auiEncounter[2] = uiData; + break; + + case TYPE_VORPIL: + if (uiData == DONE) + DoUseDoorOrButton(m_uiScreamingHallDoorGUID); + m_auiEncounter[3] = uiData; + break; + + case TYPE_MURMUR: + m_auiEncounter[4] = uiData; + break; + } - OUT_SAVE_INST_DATA; + if (uiData == DONE) + { + OUT_SAVE_INST_DATA; - std::ostringstream saveStream; - saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " - << m_auiEncounter[2] << " " << m_auiEncounter[3] << " " << m_auiEncounter[4]; + std::ostringstream saveStream; + saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " + << m_auiEncounter[2] << " " << m_auiEncounter[3] << " " << m_auiEncounter[4]; - strInstData = saveStream.str(); + m_strInstData = saveStream.str(); - SaveToDB(); - OUT_SAVE_INST_DATA_COMPLETE; - } + SaveToDB(); + OUT_SAVE_INST_DATA_COMPLETE; } +} - uint32 GetData(uint32 uiType) +uint32 instance_shadow_labyrinth::GetData(uint32 uiType) +{ + switch(uiType) { - switch(uiType) - { - case TYPE_HELLMAW: - return m_auiEncounter[0]; - case TYPE_OVERSEER: - return m_auiEncounter[1]; - } - return false; - } + case TYPE_HELLMAW: return m_auiEncounter[0]; + case TYPE_OVERSEER: return m_auiEncounter[1]; - const char* Save() - { - return strInstData.c_str(); + default: + return 0; } +} - void Load(const char* in) +void instance_shadow_labyrinth::Load(const char* chrIn) +{ + if (!chrIn) { - if (!in) - { - OUT_LOAD_INST_DATA_FAIL; - return; - } + OUT_LOAD_INST_DATA_FAIL; + return; + } - OUT_LOAD_INST_DATA(in); + OUT_LOAD_INST_DATA(chrIn); - std::istringstream loadStream(in); - loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3] >> m_auiEncounter[4]; + std::istringstream loadStream(chrIn); + loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3] >> m_auiEncounter[4]; - for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) - if (m_auiEncounter[i] == IN_PROGRESS) - m_auiEncounter[i] = NOT_STARTED; + for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) + if (m_auiEncounter[i] == IN_PROGRESS) + m_auiEncounter[i] = NOT_STARTED; - OUT_LOAD_INST_DATA_COMPLETE; - } -}; + OUT_LOAD_INST_DATA_COMPLETE; +} InstanceData* GetInstanceData_instance_shadow_labyrinth(Map* pMap) { @@ -205,9 +181,10 @@ InstanceData* GetInstanceData_instance_shadow_labyrinth(Map* pMap) void AddSC_instance_shadow_labyrinth() { - Script *newscript; - newscript = new Script; - newscript->Name = "instance_shadow_labyrinth"; - newscript->GetInstanceData = &GetInstanceData_instance_shadow_labyrinth; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "instance_shadow_labyrinth"; + pNewScript->GetInstanceData = &GetInstanceData_instance_shadow_labyrinth; + pNewScript->RegisterSelf(); } diff --git a/scripts/outland/auchindoun/shadow_labyrinth/shadow_labyrinth.h b/scripts/outland/auchindoun/shadow_labyrinth/shadow_labyrinth.h index b09e29ac2..bfcf6dbf1 100644 --- a/scripts/outland/auchindoun/shadow_labyrinth/shadow_labyrinth.h +++ b/scripts/outland/auchindoun/shadow_labyrinth/shadow_labyrinth.h @@ -15,8 +15,38 @@ enum TYPE_VORPIL = 4, TYPE_MURMUR = 5, + NPC_VORPIL = 18732, + NPC_FEL_OVERSEER = 18796, + GO_REFECTORY_DOOR = 183296, //door opened when blackheart the inciter dies GO_SCREAMING_HALL_DOOR = 183295 //door opened when grandmaster vorpil dies }; +class MANGOS_DLL_DECL instance_shadow_labyrinth : public ScriptedInstance +{ + public: + instance_shadow_labyrinth(Map* pMap); + + void Initialize(); + + void OnObjectCreate(GameObject* pGo); + void OnCreatureCreate(Creature* pCreature); + + void SetData(uint32 uiType, uint32 uiData); + uint32 GetData(uint32 uiType); + + const char* Save() { return m_strInstData.c_str(); } + void Load(const char* chrIn); + + private: + uint32 m_auiEncounter[MAX_ENCOUNTER]; + std::string m_strInstData; + + uint64 m_uiRefectoryDoorGUID; + uint64 m_uiScreamingHallDoorGUID; + + uint64 m_uiGrandmasterVorpil; + uint32 m_uiFelOverseerCount; +}; + #endif diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index e59e44dd7..844ae1cb6 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2134" + #define SD2_REVISION_NR "2135" #endif // __SD2_REVISION_NR_H__ From 8d0427365976921c8a173edd95451a3be7c540a7 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Thu, 26 May 2011 22:29:14 +0200 Subject: [PATCH 0115/1172] [2136] Cleanup and Improve Fel Kael'thas script * Fix a bug introduced in [2090] (Use correct Instance Data from Kael for Faking Phoenix' death * Remove Phoenix Summon Hack and use proper spell * Fix some minor logic bugs (a few reasonable returns mainly) --- .../boss_felblood_kaelthas.cpp | 394 +++++++++--------- sd2_revision_nr.h | 2 +- 2 files changed, 205 insertions(+), 191 deletions(-) diff --git a/scripts/eastern_kingdoms/magisters_terrace/boss_felblood_kaelthas.cpp b/scripts/eastern_kingdoms/magisters_terrace/boss_felblood_kaelthas.cpp index 38646b22e..89f77f85e 100644 --- a/scripts/eastern_kingdoms/magisters_terrace/boss_felblood_kaelthas.cpp +++ b/scripts/eastern_kingdoms/magisters_terrace/boss_felblood_kaelthas.cpp @@ -25,54 +25,54 @@ EndScriptData */ #include "magisters_terrace.h" #include "WorldPacket.h" -#define SAY_AGGRO -1585023 //This yell should be done when the room is cleared. For now, set it as a movelineofsight yell. -#define SAY_PHOENIX -1585024 -#define SAY_FLAMESTRIKE -1585025 -#define SAY_GRAVITY_LAPSE -1585026 -#define SAY_TIRED -1585027 -#define SAY_RECAST_GRAVITY -1585028 -#define SAY_DEATH -1585029 - -/*** Spells ***/ - -// Phase 1 spells -#define SPELL_FIREBALL_NORMAL 44189 // Deals 2700-3300 damage at current target -#define SPELL_FIREBALL_HEROIC 46164 // 4950-6050 - -#define SPELL_PHOENIX 44194 // Summons a phoenix (Doesn't work?) -#define SPELL_PHOENIX_BURN 44197 // A spell Phoenix uses to damage everything around -#define SPELL_REBIRTH_DMG 44196 // DMG if a Phoenix rebirth happen - -#define SPELL_FLAME_STRIKE_DUMMY 44191 // Flamestrike indicator before the damage -#define SPELL_FLAME_STRIKE 44192 // Summons the trigger + animation (projectile) - -#define SPELL_SHOCK_BARRIER 46165 // Heroic only; 10k damage shield, followed by Pyroblast -#define SPELL_PYROBLAST 36819 // Heroic only; 45-55k fire damage - -// Phase 2 spells -#define SPELL_GRAVITY_LAPSE_INITIAL 44224 // Cast at the beginning of every Gravity Lapse -#define SPELL_GRAVITY_LAPSE_CHANNEL 44251 // Channeled; blue beam animation to every enemy in range -#define SPELL_TELEPORT_CENTER 44218 // Should teleport people to the center. Requires DB entry in spell_target_position. -#define SPELL_GRAVITY_LAPSE_FLY 44227 // Hastens flyspeed and allows flying for 1 minute. For some reason removes 44226. -#define SPELL_GRAVITY_LAPSE_DOT 44226 // Knocks up in the air and applies a 300 DPS DoT. -#define SPELL_ARCANE_SPHERE_PASSIVE 44263 // Passive auras on Arcane Spheres -#define SPELL_POWER_FEEDBACK 44233 // Stuns him, making him take 50% more damage for 10 seconds. Cast after Gravity Lapse - -/*** Creatures ***/ -#define NPC_FLAME_STRIKE_TRIGGER 24666 -#define CREATURE_PHOENIX 24674 -#define CREATURE_PHOENIX_EGG 24675 -#define CREATURE_ARCANE_SPHERE 24708 +enum +{ + SAY_AGGRO = -1585023, // This yell should be done when the room is cleared. For now, set it as a movelineofsight yell. + SAY_PHOENIX = -1585024, + SAY_FLAMESTRIKE = -1585025, + SAY_GRAVITY_LAPSE = -1585026, + SAY_TIRED = -1585027, + SAY_RECAST_GRAVITY = -1585028, + SAY_DEATH = -1585029, + + // Phase 1 spells + SPELL_FIREBALL = 44189, // Deals 2700-3300 damage at current target + SPELL_FIREBALL_H = 46164, // 4950-6050 + + SPELL_PHOENIX = 44194, // Summons a phoenix + SPELL_PHOENIX_BURN = 44197, // A spell Phoenix uses to damage everything around + SPELL_REBIRTH_DMG = 44196, // DMG if a Phoenix rebirth happen + + SPELL_FLAME_STRIKE_DUMMY = 44191, // Flamestrike indicator before the damage + SPELL_FLAME_STRIKE = 44192, // Summons the trigger + animation (projectile) + + SPELL_SHOCK_BARRIER = 46165, // Heroic only; 10k damage shield, followed by Pyroblast + SPELL_PYROBLAST = 36819, // Heroic only; 45-55k fire damage + + // Phase 2 spells + SPELL_GRAVITY_LAPSE_INITIAL = 44224, // Cast at the beginning of every Gravity Lapse + SPELL_GRAVITY_LAPSE_CHANNEL = 44251, // Channeled; blue beam animation to every enemy in range + SPELL_TELEPORT_CENTER = 44218, // Should teleport people to the center. Requires DB entry in spell_target_position. + SPELL_GRAVITY_LAPSE_FLY = 44227, // Hastens flyspeed and allows flying for 1 minute. For some reason removes 44226. + SPELL_GRAVITY_LAPSE_DOT = 44226, // Knocks up in the air and applies a 300 DPS DoT. + SPELL_ARCANE_SPHERE_PASSIVE = 44263, // Passive auras on Arcane Spheres + SPELL_POWER_FEEDBACK = 44233, // Stuns him, making him take 50% more damage for 10 seconds. Cast after Gravity Lapse + + NPC_FLAME_STRIKE_TRIGGER = 24666, + NPC_PHOENIX = 24674, + NPC_PHOENIX_EGG = 24675, + NPC_ARCANE_SPHERE = 24708, +}; /** Locations **/ -float KaelLocations[3][2]= +static const float KaelLocations[3][2]= { {148.744659f, 181.377426f}, {140.823883f, 195.403046f}, {156.574188f, 195.650482f}, }; -#define LOCATION_Z -16.727455f +static const float LOCATION_Z = -16.727455f; struct MANGOS_DLL_DECL boss_felblood_kaelthasAI : public ScriptedAI { @@ -86,26 +86,26 @@ struct MANGOS_DLL_DECL boss_felblood_kaelthasAI : public ScriptedAI ScriptedInstance* m_pInstance; bool m_bIsRegularMode; - uint32 FireballTimer; - uint32 PhoenixTimer; - uint32 FlameStrikeTimer; - uint32 CombatPulseTimer; + uint32 m_uiFireballTimer; + uint32 m_uiPhoenixTimer; + uint32 m_uiFlameStrikeTimer; + uint32 m_uiCombatPulseTimer; - //Heroic only - uint32 PyroblastTimer; + // Heroic only + uint32 m_uiPyroblastTimer; - uint32 GravityLapseTimer; - uint32 GravityLapsePhase; + uint32 m_uiGravityLapseTimer; + uint32 m_uiGravityLapsePhase; // 0 = No Gravity Lapse // 1 = Casting Gravity Lapse visual // 2 = Teleported people to self // 3 = Knocked people up in the air // 4 = Applied an aura that allows them to fly, channeling visual, relased Arcane Orbs. - bool FirstGravityLapse; - bool HasTaunted; + bool m_bFirstGravityLapse; + bool m_bHasTaunted; - uint8 Phase; + uint8 m_uiPhase; // 0 = Not started // 1 = Fireball; Summon Phoenix; Flamestrike // 2 = Gravity Lapses @@ -113,23 +113,23 @@ struct MANGOS_DLL_DECL boss_felblood_kaelthasAI : public ScriptedAI void Reset() { // TODO: Timers - FireballTimer = 0; - PhoenixTimer = 10000; - FlameStrikeTimer = 25000; - CombatPulseTimer = 0; + m_uiFireballTimer = 0; + m_uiPhoenixTimer = 10000; + m_uiFlameStrikeTimer = 25000; + m_uiCombatPulseTimer = 0; - PyroblastTimer = 60000; + m_uiPyroblastTimer = 60000; - GravityLapseTimer = 0; - GravityLapsePhase = 0; + m_uiGravityLapseTimer = 0; + m_uiGravityLapsePhase = 0; - FirstGravityLapse = true; - HasTaunted = false; + m_bFirstGravityLapse = true; + m_bHasTaunted = false; - Phase = 0; + m_uiPhase = 0; } - void JustDied(Unit *killer) + void JustDied(Unit* pKiller) { DoScriptText(SAY_DEATH, m_creature); @@ -137,13 +137,13 @@ struct MANGOS_DLL_DECL boss_felblood_kaelthasAI : public ScriptedAI m_pInstance->SetData(TYPE_KAELTHAS, DONE); } - void DamageTaken(Unit* done_by, uint32 &damage) + void DamageTaken(Unit* pDealer, uint32& uiDamage) { - if (damage > m_creature->GetHealth()) + if (uiDamage > m_creature->GetHealth()) RemoveGravityLapse(); // Remove Gravity Lapse so that players fall to ground if they kill him when in air. } - void Aggro(Unit *who) + void Aggro(Unit* pWho) { if (m_pInstance) m_pInstance->SetData(TYPE_KAELTHAS, IN_PROGRESS); @@ -153,24 +153,35 @@ struct MANGOS_DLL_DECL boss_felblood_kaelthasAI : public ScriptedAI { if (m_pInstance) m_pInstance->SetData(TYPE_KAELTHAS, FAIL); - } - void MoveInLineOfSight(Unit *who) + void MoveInLineOfSight(Unit* pWho) { - if (!HasTaunted && m_creature->IsWithinDistInMap(who, 40.0)) + if (!m_bHasTaunted && m_creature->IsWithinDistInMap(pWho, 40.0)) { DoScriptText(SAY_AGGRO, m_creature); - HasTaunted = true; + m_bHasTaunted = true; } - ScriptedAI::MoveInLineOfSight(who); + ScriptedAI::MoveInLineOfSight(pWho); } void JustSummoned(Creature* pSummoned) { - if (pSummoned->GetEntry() == NPC_FLAME_STRIKE_TRIGGER) - pSummoned->CastSpell(pSummoned, SPELL_FLAME_STRIKE_DUMMY, false, NULL, NULL, m_creature->GetObjectGuid()); + switch (pSummoned->GetEntry()) + { + case NPC_FLAME_STRIKE_TRIGGER: + pSummoned->CastSpell(pSummoned, SPELL_FLAME_STRIKE_DUMMY, false, NULL, NULL, m_creature->GetObjectGuid()); + break; + case NPC_PHOENIX: + // TODO ThreatList and Flag removal likely wrong + pSummoned->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE + UNIT_FLAG_NON_ATTACKABLE); + SetThreatList(pSummoned); + + if (m_creature->getVictim()) + pSummoned->AI()->AttackStart(m_creature->getVictim()); + break; + } } void SetThreatList(Creature* SummonedUnit) @@ -252,67 +263,60 @@ struct MANGOS_DLL_DECL boss_felblood_kaelthasAI : public ScriptedAI } } - void UpdateAI(const uint32 diff) + void UpdateAI(const uint32 uiDiff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - switch(Phase) + switch (m_uiPhase) { case 0: { // *Heroic mode only: if (!m_bIsRegularMode) { - if (PyroblastTimer < diff) + if (m_uiPyroblastTimer < uiDiff) { m_creature->InterruptSpell(CURRENT_CHANNELED_SPELL); m_creature->InterruptSpell(CURRENT_GENERIC_SPELL); DoCastSpellIfCan(m_creature, SPELL_SHOCK_BARRIER, CAST_TRIGGERED); DoCastSpellIfCan(m_creature->getVictim(), SPELL_PYROBLAST); - PyroblastTimer = 60000; - }else PyroblastTimer -= diff; + m_uiPyroblastTimer = 60000; + } + else + m_uiPyroblastTimer -= uiDiff; } - if (FireballTimer < diff) + if (m_uiFireballTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), m_bIsRegularMode ? SPELL_FIREBALL_NORMAL : SPELL_FIREBALL_HEROIC); - FireballTimer = urand(2000, 6000); - }else FireballTimer -= diff; + if (DoCastSpellIfCan(m_creature->getVictim(), m_bIsRegularMode ? SPELL_FIREBALL : SPELL_FIREBALL_H) == CAST_OK) + m_uiFireballTimer = urand(2000, 6000); + } + else + m_uiFireballTimer -= uiDiff; - if (PhoenixTimer < diff) + if (m_uiPhoenixTimer < uiDiff) { - - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,1)) + if (DoCastSpellIfCan(m_creature, SPELL_PHOENIX) == CAST_OK) { - uint32 random = urand(1, 2); - float x = KaelLocations[random][0]; - float y = KaelLocations[random][1]; - - if (Creature* Phoenix = m_creature->SummonCreature(CREATURE_PHOENIX, x, y, LOCATION_Z, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 60000)) - { - Phoenix->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE + UNIT_FLAG_NON_ATTACKABLE); - SetThreatList(Phoenix); - Phoenix->AI()->AttackStart(pTarget); - DoScriptText(SAY_PHOENIX, m_creature); - } + DoScriptText(SAY_PHOENIX, m_creature); + m_uiPhoenixTimer = 60000; } + } + else + m_uiPhoenixTimer -= uiDiff; - PhoenixTimer = 60000; - }else PhoenixTimer -= diff; - - if (FlameStrikeTimer < diff) + if (m_uiFlameStrikeTimer < uiDiff) { if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) { - if (m_creature->IsNonMeleeSpellCasted(false)) - m_creature->InterruptNonMeleeSpells(false); - - DoCastSpellIfCan(pTarget, SPELL_FLAME_STRIKE); + DoCastSpellIfCan(pTarget, SPELL_FLAME_STRIKE, CAST_INTERRUPT_PREVIOUS); DoScriptText(SAY_FLAMESTRIKE, m_creature); } - FlameStrikeTimer = urand(15000, 25000); - }else FlameStrikeTimer -= diff; + m_uiFlameStrikeTimer = urand(15000, 25000); + } + else + m_uiFlameStrikeTimer -= uiDiff; // Below 50% if (m_creature->GetHealthPercent() < 50.0f) @@ -321,26 +325,28 @@ struct MANGOS_DLL_DECL boss_felblood_kaelthasAI : public ScriptedAI m_creature->StopMoving(); m_creature->GetMotionMaster()->Clear(); m_creature->GetMotionMaster()->MoveIdle(); - GravityLapseTimer = 0; - GravityLapsePhase = 0; - Phase = 1; + m_uiGravityLapseTimer = 0; + m_uiGravityLapsePhase = 0; + m_uiPhase = 1; + + return; } DoMeleeAttackIfReady(); - } - break; + break; + } case 1: { - if (GravityLapseTimer < diff) + if (m_uiGravityLapseTimer < uiDiff) { - switch(GravityLapsePhase) + switch (m_uiGravityLapsePhase) { case 0: - if (FirstGravityLapse) // Different yells at 50%, and at every following Gravity Lapse + if (m_bFirstGravityLapse) // Different yells at 50%, and at every following Gravity Lapse { DoScriptText(SAY_GRAVITY_LAPSE, m_creature); - FirstGravityLapse = false; + m_bFirstGravityLapse = false; if (m_pInstance) { @@ -357,33 +363,33 @@ struct MANGOS_DLL_DECL boss_felblood_kaelthasAI : public ScriptedAI } DoCastSpellIfCan(m_creature, SPELL_GRAVITY_LAPSE_INITIAL); - GravityLapseTimer = 2000 + diff;// Don't interrupt the visual spell - GravityLapsePhase = 1; + m_uiGravityLapseTimer = 2000 + uiDiff;// Don't interrupt the visual spell + m_uiGravityLapsePhase = 1; break; case 1: TeleportPlayersToSelf(); - GravityLapseTimer = 1000; - GravityLapsePhase = 2; + m_uiGravityLapseTimer = 1000; + m_uiGravityLapsePhase = 2; break; case 2: CastGravityLapseKnockUp(); - GravityLapseTimer = 1000; - GravityLapsePhase = 3; + m_uiGravityLapseTimer = 1000; + m_uiGravityLapsePhase = 3; break; case 3: CastGravityLapseFly(); - GravityLapseTimer = 30000; - GravityLapsePhase = 4; + m_uiGravityLapseTimer = 30000; + m_uiGravityLapsePhase = 4; for(uint8 i = 0; i < 3; ++i) { if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) { - if (Creature* Orb = DoSpawnCreature(CREATURE_ARCANE_SPHERE, 5, 5, 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 30000)) + if (Creature* Orb = DoSpawnCreature(NPC_ARCANE_SPHERE, 5, 5, 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 30000)) Orb->AI()->AttackStart(pTarget); } } @@ -396,13 +402,16 @@ struct MANGOS_DLL_DECL boss_felblood_kaelthasAI : public ScriptedAI DoScriptText(SAY_TIRED, m_creature); DoCastSpellIfCan(m_creature, SPELL_POWER_FEEDBACK); RemoveGravityLapse(); - GravityLapseTimer = 10000; - GravityLapsePhase = 0; + m_uiGravityLapseTimer = 10000; + m_uiGravityLapsePhase = 0; break; } - }else GravityLapseTimer -= diff; + } + else + m_uiGravityLapseTimer -= uiDiff; + + break; } - break; } } }; @@ -416,40 +425,40 @@ struct MANGOS_DLL_DECL mob_felkael_phoenixAI : public ScriptedAI } ScriptedInstance* m_pInstance; - uint32 BurnTimer; - uint32 Death_Timer; - bool Rebirth; - bool FakeDeath; + uint32 m_uiBurnTimer; + uint32 m_uiDeathTimer; + bool m_bRebirth; + bool m_bFakeDeath; void Reset() { - m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE + UNIT_FLAG_NON_ATTACKABLE); - m_creature->CastSpell(m_creature,SPELL_PHOENIX_BURN,true); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_NON_ATTACKABLE); + m_creature->CastSpell(m_creature, SPELL_PHOENIX_BURN, true); - BurnTimer = 2000; - Death_Timer = 3000; - Rebirth = false; - FakeDeath = false; + m_uiBurnTimer = 2000; + m_uiDeathTimer = 3000; + m_bRebirth = false; + m_bFakeDeath = false; } - void DamageTaken(Unit* pKiller, uint32 &damage) + void DamageTaken(Unit* pKiller, uint32& uiDamage) { - if (damage < m_creature->GetHealth()) + if (uiDamage < m_creature->GetHealth()) return; - //Prevent glitch if in fake death - if (FakeDeath) + // Prevent glitch if in fake death + if (m_bFakeDeath) { - damage = 0; + uiDamage = 0; return; } - //Don't really die in all phases of Kael'Thas - if (m_pInstance && m_pInstance->GetData(TYPE_KAELTHAS) == NOT_STARTED) + // Don't really die in all phases of Kael'Thas + if (m_pInstance && m_pInstance->GetData(TYPE_KAELTHAS) == IN_PROGRESS) { - //prevent death - damage = 0; - FakeDeath = true; + // prevent death + uiDamage = 0; + m_bFakeDeath = true; m_creature->InterruptNonMeleeSpells(false); m_creature->SetHealth(0); @@ -464,53 +473,50 @@ struct MANGOS_DLL_DECL mob_felkael_phoenixAI : public ScriptedAI m_creature->GetMotionMaster()->Clear(); m_creature->GetMotionMaster()->MoveIdle(); m_creature->SetStandState(UNIT_STAND_STATE_DEAD); - } - - } - - void JustDied(Unit* slayer) - { - m_creature->SummonCreature(CREATURE_PHOENIX_EGG, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 45000); } - void UpdateAI(const uint32 diff) + void UpdateAI(const uint32 uiDiff) { - //If we are fake death, we cast revbirth and after that we kill the phoenix to spawn the egg. - if (FakeDeath) + // If we are fake death, we cast rebirth and after that we kill the phoenix to spawn the egg. + if (m_bFakeDeath) { - if (!Rebirth) + if (!m_bRebirth) { DoCastSpellIfCan(m_creature, SPELL_REBIRTH_DMG); - Rebirth = true; + m_bRebirth = true; } - if (Rebirth) + if (m_bRebirth) { - if (Death_Timer < diff) + if (m_uiDeathTimer < uiDiff) { - m_creature->SummonCreature(CREATURE_PHOENIX_EGG, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 45000); + m_creature->SummonCreature(NPC_PHOENIX_EGG, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 45000); m_creature->SetDeathState(JUST_DIED); m_creature->RemoveCorpse(); - Rebirth = false; - }else Death_Timer -= diff; + m_bRebirth = false; + } + else + m_uiDeathTimer -= uiDiff; } - + return; } if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - if (BurnTimer < diff) + if (m_uiBurnTimer < uiDiff) { //spell Burn should possible do this, but it doesn't, so do this for now. uint32 dmg = urand(1650,2050); m_creature->DealDamage(m_creature, dmg, 0, DOT, SPELL_SCHOOL_MASK_FIRE, NULL, false); - BurnTimer += 2000; - } BurnTimer -= diff; + m_uiBurnTimer += 2000; + } + else + m_uiBurnTimer -= uiDiff; DoMeleeAttackIfReady(); @@ -521,24 +527,25 @@ struct MANGOS_DLL_DECL mob_felkael_phoenix_eggAI : public ScriptedAI { mob_felkael_phoenix_eggAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} - uint32 HatchTimer; + uint32 m_uiHatchTimer; void Reset() { - HatchTimer = 10000; - + m_uiHatchTimer = 10000; } - void MoveInLineOfSight(Unit* who) {} + void MoveInLineOfSight(Unit* pWho) {} + void AttackStart(Unit* pWho) {} - void UpdateAI(const uint32 diff) + void UpdateAI(const uint32 uiDiff) { - if (HatchTimer < diff) + if (m_uiHatchTimer < uiDiff) { - m_creature->SummonCreature(CREATURE_PHOENIX, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 60000); + m_creature->SummonCreature(NPC_PHOENIX, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 60000); m_creature->DealDamage(m_creature, m_creature->GetMaxHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); - }else HatchTimer -= diff; - + } + else + m_uiHatchTimer -= uiDiff; } }; @@ -546,37 +553,44 @@ struct MANGOS_DLL_DECL mob_arcane_sphereAI : public ScriptedAI { mob_arcane_sphereAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} - uint32 DespawnTimer; - uint32 ChangeTargetTimer; + uint32 m_uiDespawnTimer; + uint32 m_uiChangeTargetTimer; void Reset() { - DespawnTimer = 30000; - ChangeTargetTimer = urand(6000, 12000); + m_uiDespawnTimer = 30000; + m_uiChangeTargetTimer = urand(6000, 12000); m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); DoCastSpellIfCan(m_creature, SPELL_ARCANE_SPHERE_PASSIVE, CAST_TRIGGERED); } - void UpdateAI(const uint32 diff) + void UpdateAI(const uint32 uiDiff) { - if (DespawnTimer < diff) + if (m_uiDespawnTimer < uiDiff) + { m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); - else DespawnTimer -= diff; + return; + } + else + m_uiDespawnTimer -= uiDiff; - if (!m_creature->getVictim() || !m_creature->SelectHostileTarget()) + // Note: This check was reversed for some unknown reason, changed to usual behaviour! + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - if (ChangeTargetTimer < diff) + if (m_uiChangeTargetTimer < uiDiff) { - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) { - m_creature->TauntApply(pTarget); + m_creature->TauntApply(pTarget); // Useless Workaround AttackStart(pTarget); } - ChangeTargetTimer = urand(5000, 15000); - }else ChangeTargetTimer -= diff; + m_uiChangeTargetTimer = urand(5000, 15000); + } + else + m_uiChangeTargetTimer -= uiDiff; } }; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 844ae1cb6..e6da0448f 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2135" + #define SD2_REVISION_NR "2136" #endif // __SD2_REVISION_NR_H__ From b0a49b1d9033129f6d212e3e0ebe6e99a2e4feab Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Fri, 27 May 2011 12:42:53 +0200 Subject: [PATCH 0116/1172] [2137] Add FAIL support for Vazruden Encounter (Hellfire Ramparts) Thanks to X-Savior for researching behaviour --- .../boss_nazan_and_vazruden.cpp | 19 ++++-- .../hellfire_ramparts/hellfire_ramparts.h | 8 ++- .../instance_hellfire_ramparts.cpp | 67 ++++++++++++++++--- sd2_revision_nr.h | 2 +- 4 files changed, 80 insertions(+), 16 deletions(-) diff --git a/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_nazan_and_vazruden.cpp b/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_nazan_and_vazruden.cpp index a7dc0ec18..b8f232b5d 100644 --- a/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_nazan_and_vazruden.cpp +++ b/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_nazan_and_vazruden.cpp @@ -55,9 +55,7 @@ enum POINT_ID_FLYING = 101, POINT_ID_COMBAT = 102, - NPC_VAZRUDEN_HERALD = 17307, NPC_NAZAN = 17536, - NPC_VAZRUDEN = 17537 }; const float afCenterPos[3] = {-1399.401f, 1736.365f, 87.008f}; //moves here to drop off nazan @@ -100,6 +98,12 @@ struct MANGOS_DLL_DECL boss_vazrudenAI : public ScriptedAI m_pInstance->SetData(TYPE_VAZRUDEN, DONE); } + void JustReachedHome() + { + if (m_pInstance) + m_pInstance->SetData(TYPE_VAZRUDEN, FAIL); + } + void KilledUnit(Unit* pVictim) { DoScriptText(urand(0, 1) ? SAY_KILL1 : SAY_KILL2, m_creature); @@ -107,7 +111,7 @@ struct MANGOS_DLL_DECL boss_vazrudenAI : public ScriptedAI void PrepareAndDescendMount() { - if (Creature* pHerald = m_pInstance->instance->GetCreature(m_pInstance->GetData64(NPC_HERALD))) + if (Creature* pHerald = m_pInstance->instance->GetCreature(m_pInstance->GetData64(NPC_VAZRUDEN_HERALD))) { if (pHerald->HasSplineFlag(SPLINEFLAG_WALKMODE)) pHerald->RemoveSplineFlag(SPLINEFLAG_WALKMODE); @@ -238,7 +242,8 @@ struct MANGOS_DLL_DECL boss_vazruden_heraldAI : public ScriptedAI break; } case POINT_ID_FLYING: - m_uiFireballTimer = 3000; + if (m_bIsEventInProgress) // Additional check for wipe case, while nazan is flying to this point + m_uiFireballTimer = 3000; break; } } @@ -294,6 +299,12 @@ struct MANGOS_DLL_DECL boss_vazruden_heraldAI : public ScriptedAI m_pInstance->SetData(TYPE_NAZAN, DONE); } + void JustReachedHome() + { + if (m_pInstance) + m_pInstance->SetData(TYPE_NAZAN, FAIL); + } + void UpdateAI(const uint32 uiDiff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) diff --git a/scripts/outland/hellfire_citadel/hellfire_ramparts/hellfire_ramparts.h b/scripts/outland/hellfire_citadel/hellfire_ramparts/hellfire_ramparts.h index 71a1a7f18..c239a7b92 100644 --- a/scripts/outland/hellfire_citadel/hellfire_ramparts/hellfire_ramparts.h +++ b/scripts/outland/hellfire_citadel/hellfire_ramparts/hellfire_ramparts.h @@ -12,7 +12,9 @@ enum TYPE_VAZRUDEN = 1, TYPE_NAZAN = 2, // Do not change, used in ACID (SetData(SPECIAL) on death of 17517 - NPC_HERALD = 17307, + NPC_HELLFIRE_SENTRY = 17517, + NPC_VAZRUDEN_HERALD = 17307, + NPC_VAZRUDEN = 17537, GO_FEL_IRON_CHEST = 185168, GO_FEL_IRON_CHEST_H = 185169, @@ -35,11 +37,15 @@ class MANGOS_DLL_DECL instance_ramparts : public ScriptedInstance // No need to save and load this instance (only one encounter needs special handling, no doors used) private: + void DoFailVazruden(); + uint32 m_auiEncounter[MAX_ENCOUNTER]; uint32 m_uiSentryCounter; uint64 m_uiChestGUID; uint64 m_uiHeraldGUID; + uint64 m_uiVazrudenGUID; + GUIDList m_lSentryGUIDs; }; #endif diff --git a/scripts/outland/hellfire_citadel/hellfire_ramparts/instance_hellfire_ramparts.cpp b/scripts/outland/hellfire_citadel/hellfire_ramparts/instance_hellfire_ramparts.cpp index 7a01fae55..2fa7e612c 100644 --- a/scripts/outland/hellfire_citadel/hellfire_ramparts/instance_hellfire_ramparts.cpp +++ b/scripts/outland/hellfire_citadel/hellfire_ramparts/instance_hellfire_ramparts.cpp @@ -27,6 +27,7 @@ EndScriptData */ instance_ramparts::instance_ramparts(Map* pMap) : ScriptedInstance(pMap), m_uiSentryCounter(0), m_uiChestGUID(0), + m_uiVazrudenGUID(0), m_uiHeraldGUID(0) { Initialize(); @@ -39,13 +40,23 @@ void instance_ramparts::Initialize() void instance_ramparts::OnCreatureCreate(Creature* pCreature) { - if (pCreature->GetEntry() == NPC_HERALD) - m_uiHeraldGUID = pCreature->GetGUID(); + switch (pCreature->GetEntry()) + { + case NPC_VAZRUDEN_HERALD: + m_uiHeraldGUID = pCreature->GetGUID(); + break; + case NPC_VAZRUDEN: + m_uiVazrudenGUID = pCreature->GetGUID(); + break; + case NPC_HELLFIRE_SENTRY: + m_lSentryGUIDs.push_back(pCreature->GetGUID()); + break; + } } void instance_ramparts::OnObjectCreate(GameObject* pGo) { - switch(pGo->GetEntry()) + switch (pGo->GetEntry()) { case GO_FEL_IRON_CHEST: case GO_FEL_IRON_CHEST_H: @@ -58,11 +69,13 @@ void instance_ramparts::SetData(uint32 uiType, uint32 uiData) { debug_log("SD2: Instance Ramparts: SetData received for type %u with data %u",uiType,uiData); - switch(uiType) + switch (uiType) { case TYPE_VAZRUDEN: if (uiData == DONE && m_auiEncounter[1] == DONE) DoRespawnGameObject(m_uiChestGUID, HOUR*IN_MILLISECONDS); + if (uiData == FAIL && m_auiEncounter[0] != FAIL) + DoFailVazruden(); m_auiEncounter[0] = uiData; break; case TYPE_NAZAN: @@ -72,14 +85,15 @@ void instance_ramparts::SetData(uint32 uiType, uint32 uiData) if (m_uiSentryCounter == 2) m_auiEncounter[1] = uiData; + + return; } if (uiData == DONE && m_auiEncounter[0] == DONE) - { DoRespawnGameObject(m_uiChestGUID, HOUR*IN_MILLISECONDS); - m_auiEncounter[1] = uiData; - } - if (uiData == IN_PROGRESS) - m_auiEncounter[1] = uiData; + if (uiData == FAIL && m_auiEncounter[1] != FAIL) + DoFailVazruden(); + + m_auiEncounter[1] = uiData; break; } } @@ -97,12 +111,45 @@ uint32 instance_ramparts::GetData(uint32 uiType) uint64 instance_ramparts::GetData64(uint32 uiData) { - if (uiData == NPC_HERALD) + if (uiData == NPC_VAZRUDEN_HERALD) return m_uiHeraldGUID; + if (uiData == NPC_VAZRUDEN) + return m_uiVazrudenGUID; return 0; } +void instance_ramparts::DoFailVazruden() +{ + // Store FAIL for both types + m_auiEncounter[0] = FAIL; + m_auiEncounter[1] = FAIL; + + // Restore Sentries (counter and respawn them) + m_uiSentryCounter = 0; + for (GUIDList::const_iterator itr = m_lSentryGUIDs.begin(); itr != m_lSentryGUIDs.end(); ++itr) + { + if (Creature* pSentry = instance->GetCreature(*itr)) + pSentry->Respawn(); + } + + // Respawn or Reset Vazruden the herald + if (Creature* pVazruden = instance->GetCreature(m_uiHeraldGUID)) + { + if (!pVazruden->isAlive()) + pVazruden->Respawn(); + else + { + if (ScriptedAI* pVazrudenAI = dynamic_cast (pVazruden->AI())) + pVazrudenAI->Reset(); + } + } + + // Despawn Vazruden + if (Creature* pVazruden = instance->GetCreature(m_uiVazrudenGUID)) + pVazruden->ForcedDespawn(); +} + InstanceData* GetInstanceData_instance_ramparts(Map* pMap) { return new instance_ramparts(pMap); diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index e6da0448f..3b50048c6 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2136" + #define SD2_REVISION_NR "2137" #endif // __SD2_REVISION_NR_H__ From ccb7b0a78fecded04198e71203f88435a31d2666 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Sat, 28 May 2011 20:38:07 +0200 Subject: [PATCH 0117/1172] [2138] Implement script for boss_bronjahm Second phase disabled, until soulstorm spell proper fixed in core --- .../forge_of_souls/boss_bronjahm.cpp | 187 +++++++++++++++++- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 + sql/updates/r2138_mangos.sql | 1 + 4 files changed, 186 insertions(+), 5 deletions(-) create mode 100644 sql/updates/r2138_mangos.sql diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_bronjahm.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_bronjahm.cpp index 2bfd01a25..bb44dd925 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_bronjahm.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_bronjahm.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: boss_bronjahm -SD%Complete: 0% -SDComment: Placeholder +SD%Complete: 80% +SDComment: Small unknown behaviour for his Shadow Bold use in phase 1; Soulstorm currently bugged in core, hence second phase disabled SDCategory: The Forge of Souls EndScriptData */ @@ -26,13 +26,25 @@ EndScriptData */ enum { - SAY_AGGRO_1 = -1632000, // without sound, really correct? + SAY_AGGRO_1 = -1632000, // Without sound, really correct? SAY_AGGRO_2 = -1632001, SAY_SLAY_1 = -1632002, SAY_SLAY_2 = -1632003, SAY_DEATH = -1632004, SAY_SOULSTORM = -1632005, SAY_CORRUPT_SOUL = -1632006, + + // Heroic spells are selected by spell difficulty dbc + SPELL_SOULSTORM_VISUAL_OOC = 69008, + SPELL_MAGICS_BANE = 68793, + SPELL_SHADOW_BOLT = 70043, + SPELL_CORRUPT_SOUL = 68839, + SPELL_BANISH_VISUAL = 68862, + SPELL_CONSUME_SOUL_TRIGGER = 68861, + SPELL_TELEPORT = 68988, + SPELL_SOULSTORM_VISUAL = 68870, // Cast before Soulstorm, should trigger some visual spells + SPELL_SOULSTORM = 68872, + SPELL_FEAR = 68950, }; struct MANGOS_DLL_DECL boss_bronjahmAI : public ScriptedAI @@ -47,15 +59,32 @@ struct MANGOS_DLL_DECL boss_bronjahmAI : public ScriptedAI instance_forge_of_souls* m_pInstance; bool m_bIsRegularMode; + uint8 m_uiPhase; + + uint32 m_uiMagicsBaneTimer; + uint32 m_uiCorruptSoulTimer; + uint32 m_uiFearTimer; + uint32 m_uiShadowboltTimer; + void Reset() { + m_uiPhase = 0; + m_uiMagicsBaneTimer = urand(8000, 12000); + m_uiCorruptSoulTimer = urand(20000, 30000); + m_uiFearTimer = 1000; + m_uiShadowboltTimer = 5000; + SetCombatMovement(true); } void Aggro(Unit* pWho) { DoScriptText(urand(0, 1) ? SAY_AGGRO_1 : SAY_AGGRO_2, m_creature); + if (m_pInstance) m_pInstance->SetData(TYPE_BRONJAHM, IN_PROGRESS); + + // Remove OOC visual soulstorm effect (added in creature_template_addon + m_creature->RemoveAurasDueToSpell(SPELL_SOULSTORM_VISUAL_OOC); } void KilledUnit(Unit* pVictim) @@ -78,7 +107,104 @@ struct MANGOS_DLL_DECL boss_bronjahmAI : public ScriptedAI void JustReachedHome() { if (m_pInstance) - m_pInstance->SetData(TYPE_BRONJAHM, NOT_STARTED); + m_pInstance->SetData(TYPE_BRONJAHM, FAIL); + } + + void SpellHitTarget(Unit* pTarget, SpellEntry const* pSpellEntry) + { + if (pTarget == m_creature && pSpellEntry->Id == SPELL_TELEPORT) + { + // Say Text and cast Soulstorm + DoScriptText(SAY_SOULSTORM, m_creature); + DoCastSpellIfCan(m_creature, SPELL_SOULSTORM_VISUAL, CAST_TRIGGERED | CAST_INTERRUPT_PREVIOUS); + DoCastSpellIfCan(m_creature, SPELL_SOULSTORM, CAST_INTERRUPT_PREVIOUS); + } + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_uiPhase == 0) // Phase 1 + { + // Switching Phase, Soulstorm is cast in SpellHitTarget + /* TODO - Uncomment when Soulstorm properly implemented in core + * if (m_creature->GetHealthPercent() < 30.0f) + * { + * if (DoCastSpellIfCan(m_creature, SPELL_TELEPORT) == CAST_OK) + * m_uiPhase = 1; + * } + */ + + // Corrupt Soul + if (m_uiCorruptSoulTimer < uiDiff) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, SPELL_CORRUPT_SOUL) == CAST_OK) + { + DoScriptText(SAY_CORRUPT_SOUL, m_creature); + m_uiCorruptSoulTimer = urand(20000, 30000); + } + } + } + else + m_uiCorruptSoulTimer -= uiDiff; + + // Magic's Bane + if (m_uiMagicsBaneTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_MAGICS_BANE) == CAST_OK) + m_uiMagicsBaneTimer = urand(7000, 15000); + } + else + m_uiMagicsBaneTimer -= uiDiff; + + // Used to prevent Shadowbolt-Casting on Aggro for a few seconds + if (m_uiShadowboltTimer <= uiDiff) + m_uiShadowboltTimer = 0; + else + m_uiShadowboltTimer -= uiDiff; + + // Use ShadowBolt as default attack if victim is not in range + // TODO - not entirely clear how this works in case the tank is out of shadow-bolt range + if (!m_uiShadowboltTimer && !m_creature->CanReachWithMeleeAttack(m_creature->getVictim()) && m_creature->GetCombatDistance(m_creature->getVictim()) < 20.0f) + { + if (IsCombatMovement()) + { + SetCombatMovement(false); + m_creature->GetMotionMaster()->MoveIdle(); + m_creature->StopMoving(); + } + DoCastSpellIfCan(m_creature->getVictim(), SPELL_SHADOW_BOLT); + } + else + { + if (!IsCombatMovement()) + { + SetCombatMovement(true); + m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); + m_uiShadowboltTimer = 2000; // Give some time to chase + } + + DoMeleeAttackIfReady(); + } + } + else // Soulstorm Phase + { + if (m_uiFearTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_FEAR) == CAST_OK) + m_uiFearTimer = urand(10000, 15000); + } + else + m_uiFearTimer -= uiDiff; + + // Default attack + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + DoCastSpellIfCan(pTarget, SPELL_SHADOW_BOLT); + } } }; @@ -87,6 +213,54 @@ CreatureAI* GetAI_boss_bronjahm(Creature* pCreature) return new boss_bronjahmAI(pCreature); } +struct MANGOS_DLL_DECL npc_corrupted_soul_fragmentAI : public ScriptedAI +{ + npc_corrupted_soul_fragmentAI(Creature* pCreature) : ScriptedAI(pCreature) + { + Reset(); + DoCastSpellIfCan(m_creature, SPELL_BANISH_VISUAL); + } + + void Reset() + { + SetCombatMovement(true); + } + + void JustDied(Unit* pKiller) + { + if (instance_forge_of_souls* pInstance = (instance_forge_of_souls*)m_creature->GetInstanceData()) + pInstance->SetGuid(DATA_SOULFRAGMENT_REMOVE, m_creature->GetObjectGuid()); + } + + void MoveInLineOfSight(Unit* pWho) + { + if (pWho->GetEntry() == NPC_BRONJAHM) + { + if (m_creature->IsWithinDistInMap(pWho, INTERACTION_DISTANCE)) + { + DoCastSpellIfCan(pWho, SPELL_CONSUME_SOUL_TRIGGER, CAST_TRIGGERED); + + // Inform the instance about a used soul fragment + if (instance_forge_of_souls* pInstance = (instance_forge_of_souls*)m_creature->GetInstanceData()) + pInstance->SetGuid(DATA_SOULFRAGMENT_REMOVE, m_creature->GetObjectGuid()); + + m_creature->ForcedDespawn(); + return; + } + if (IsCombatMovement()) + { + SetCombatMovement(false); + m_creature->GetMotionMaster()->MoveFollow(pWho, 0.0f, 0.0f); + } + } + } +}; + +CreatureAI* GetAI_npc_corrupted_soul_fragment(Creature* pCreature) +{ + return new npc_corrupted_soul_fragmentAI(pCreature); +} + void AddSC_boss_bronjahm() { Script* pNewScript; @@ -95,4 +269,9 @@ void AddSC_boss_bronjahm() pNewScript->Name = "boss_bronjahm"; pNewScript->GetAI = &GetAI_boss_bronjahm; pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_corrupted_soul_fragment"; + pNewScript->GetAI = &GetAI_npc_corrupted_soul_fragment; + pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 3b50048c6..6670bbd44 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2137" + #define SD2_REVISION_NR "2138" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index c5160e995..965e8953b 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -681,6 +681,7 @@ UPDATE creature_template SET ScriptName='npc_silvermoon_harry' WHERE entry=24539 /* FORGE OF SOULS */ UPDATE creature_template SET ScriptName='boss_bronjahm' WHERE entry=36497; +UPDATE creature_template SET ScriptName='npc_corrupted_soul_fragment' WHERE entry=36535; UPDATE creature_template SET ScriptName='boss_devourer_of_souls' WHERE entry=36502; UPDATE instance_template SET ScriptName='instance_forge_of_souls' WHERE map=632; diff --git a/sql/updates/r2138_mangos.sql b/sql/updates/r2138_mangos.sql new file mode 100644 index 000000000..a58a7d536 --- /dev/null +++ b/sql/updates/r2138_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_corrupted_soul_fragment' WHERE entry=36535; From ed43c6fbad70bff734f97ec1410aeb3b5b93ec78 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Sun, 29 May 2011 02:38:46 +0200 Subject: [PATCH 0118/1172] [2139] Fix Compile after MaNGOS Rev 11558. --- scripts/eastern_kingdoms/zulaman/zulaman.cpp | 4 ++-- scripts/kalimdor/ashenvale.cpp | 2 +- .../azjol-nerub/ahnkahet/boss_taldaram.cpp | 2 +- .../azjol-nerub/ahnkahet/instance_ahnkahet.cpp | 4 ++-- scripts/northrend/gundrak/instance_gundrak.cpp | 12 ++++++------ scripts/northrend/nexus/nexus/instance_nexus.cpp | 14 +++++++------- .../northrend/ulduar/ulduar/instance_ulduar.cpp | 6 +++--- .../instance_magtheridons_lair.cpp | 2 +- sd2_revision_nr.h | 2 +- sql/scriptdev2_script_full.sql | 2 +- sql/updates/r2139_scriptdev2.sql | 1 + 11 files changed, 26 insertions(+), 25 deletions(-) create mode 100644 sql/updates/r2139_scriptdev2.sql diff --git a/scripts/eastern_kingdoms/zulaman/zulaman.cpp b/scripts/eastern_kingdoms/zulaman/zulaman.cpp index fa76438e8..c72d9a9d5 100644 --- a/scripts/eastern_kingdoms/zulaman/zulaman.cpp +++ b/scripts/eastern_kingdoms/zulaman/zulaman.cpp @@ -144,7 +144,7 @@ struct MANGOS_DLL_DECL npc_harrison_jones_zaAI : public npc_escortAI DoScriptText(SAY_AT_GONG, m_creature); if (GameObject* pEntranceDoor = m_pInstance->instance->GetGameObject(m_pInstance->GetData64(GO_STRANGE_GONG))) - pEntranceDoor->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_UNK1); + pEntranceDoor->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NO_INTERACT); //Start bang gong for 2min m_creature->CastSpell(m_creature, SPELL_BANGING_THE_GONG, false); @@ -231,7 +231,7 @@ bool GOUse_go_strange_gong(Player* pPlayer, GameObject* pGo) else error_log("SD2: Instance Zulaman: go_strange_gong failed"); - pGo->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_UNK1); + pGo->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NO_INTERACT); return false; } diff --git a/scripts/kalimdor/ashenvale.cpp b/scripts/kalimdor/ashenvale.cpp index a44aa0372..a58ffc882 100644 --- a/scripts/kalimdor/ashenvale.cpp +++ b/scripts/kalimdor/ashenvale.cpp @@ -131,7 +131,7 @@ struct MANGOS_DLL_DECL npc_muglashAI : public npc_escortAI if (GameObject* pGo = GetClosestGameObjectWithEntry(m_creature, GO_NAGA_BRAZIER, INTERACTION_DISTANCE*2)) { //some kind of event flag? Update to player/group only? - pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_UNK1); + pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NO_INTERACT); SetEscortPaused(true); } break; diff --git a/scripts/northrend/azjol-nerub/ahnkahet/boss_taldaram.cpp b/scripts/northrend/azjol-nerub/ahnkahet/boss_taldaram.cpp index db9dd6ceb..6c53f8cba 100644 --- a/scripts/northrend/azjol-nerub/ahnkahet/boss_taldaram.cpp +++ b/scripts/northrend/azjol-nerub/ahnkahet/boss_taldaram.cpp @@ -106,7 +106,7 @@ bool GOUse_go_nerubian_device(Player* pPlayer, GameObject* pGo) return false; pInstance->SetData(TYPE_TALDARAM, SPECIAL); - pGo->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_UNK1); + pGo->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NO_INTERACT); return false; } diff --git a/scripts/northrend/azjol-nerub/ahnkahet/instance_ahnkahet.cpp b/scripts/northrend/azjol-nerub/ahnkahet/instance_ahnkahet.cpp index 70a920154..4ea6f2f4d 100644 --- a/scripts/northrend/azjol-nerub/ahnkahet/instance_ahnkahet.cpp +++ b/scripts/northrend/azjol-nerub/ahnkahet/instance_ahnkahet.cpp @@ -68,11 +68,11 @@ struct MANGOS_DLL_DECL instance_ahnkahet : public ScriptedInstance break; case GO_ANCIENT_DEVICE_L: if (m_auiEncounter[1] == NOT_STARTED) - pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_UNK1); + pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NO_INTERACT); break; case GO_ANCIENT_DEVICE_R: if (m_auiEncounter[1] == NOT_STARTED) - pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_UNK1); + pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NO_INTERACT); break; case GO_VORTEX: m_uiTaldaramVortexGUID = pGo->GetGUID(); diff --git a/scripts/northrend/gundrak/instance_gundrak.cpp b/scripts/northrend/gundrak/instance_gundrak.cpp index 79b672f59..187ee79bb 100644 --- a/scripts/northrend/gundrak/instance_gundrak.cpp +++ b/scripts/northrend/gundrak/instance_gundrak.cpp @@ -126,17 +126,17 @@ void instance_gundrak::OnObjectCreate(GameObject* pGo) case GO_ALTAR_OF_SLADRAN: m_uiAltarOfSladranGUID = pGo->GetGUID(); if (m_auiEncounter[TYPE_SLADRAN] == DONE) - pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_UNK1); + pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NO_INTERACT); break; case GO_ALTAR_OF_MOORABI: m_uiAltarOfMoorabiGUID = pGo->GetGUID(); if (m_auiEncounter[TYPE_MOORABI] == DONE) - pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_UNK1); + pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NO_INTERACT); break; case GO_ALTAR_OF_COLOSSUS: m_uiAltarOfColossusGUID = pGo->GetGUID(); if (m_auiEncounter[TYPE_COLOSSUS] == DONE) - pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_UNK1); + pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NO_INTERACT); break; case GO_SNAKE_KEY: m_uiSnakeKeyGUID = pGo->GetGUID(); @@ -194,7 +194,7 @@ void instance_gundrak::SetData(uint32 uiType, uint32 uiData) m_auiEncounter[TYPE_SLADRAN] = uiData; if (uiData == DONE) if (GameObject* pGo = instance->GetGameObject(m_uiAltarOfSladranGUID)) - pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_UNK1); + pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NO_INTERACT); if (uiData == SPECIAL) m_mAltarInProgress.insert(TypeTimerPair(TYPE_SLADRAN, TIMER_VISUAL_ALTAR)); break; @@ -205,7 +205,7 @@ void instance_gundrak::SetData(uint32 uiType, uint32 uiData) if (!instance->IsRegularDifficulty()) DoUseDoorOrButton(m_uiEckDoorGUID); if (GameObject* pGo = instance->GetGameObject(m_uiAltarOfMoorabiGUID)) - pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_UNK1); + pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NO_INTERACT); } if (uiData == SPECIAL) m_mAltarInProgress.insert(TypeTimerPair(TYPE_MOORABI, TIMER_VISUAL_ALTAR)); @@ -214,7 +214,7 @@ void instance_gundrak::SetData(uint32 uiType, uint32 uiData) m_auiEncounter[TYPE_COLOSSUS] = uiData; if (uiData == DONE) if (GameObject* pGo = instance->GetGameObject(m_uiAltarOfColossusGUID)) - pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_UNK1); + pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NO_INTERACT); if (uiData == SPECIAL) m_mAltarInProgress.insert(TypeTimerPair(TYPE_COLOSSUS, TIMER_VISUAL_ALTAR)); break; diff --git a/scripts/northrend/nexus/nexus/instance_nexus.cpp b/scripts/northrend/nexus/nexus/instance_nexus.cpp index 6976b5aca..e6abc441d 100644 --- a/scripts/northrend/nexus/nexus/instance_nexus.cpp +++ b/scripts/northrend/nexus/nexus/instance_nexus.cpp @@ -38,7 +38,7 @@ bool GOUse_go_containment_sphere(Player* pPlayer, GameObject* pGo) case GO_CONTAINMENT_SPHERE_ORMOROK: pInstance->SetData(TYPE_ORMOROK, SPECIAL); break; } - pGo->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_UNK1); + pGo->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NO_INTERACT); return false; } @@ -86,17 +86,17 @@ struct MANGOS_DLL_DECL instance_nexus : public ScriptedInstance case GO_CONTAINMENT_SPHERE_TELESTRA: m_uiTelestrasContainmentSphereGUID = pGo->GetGUID(); if (m_auiEncounter[0] == DONE) - pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_UNK1); + pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NO_INTERACT); break; case GO_CONTAINMENT_SPHERE_ANOMALUS: m_uiAnomalusContainmentSphereGUID = pGo->GetGUID(); if (m_auiEncounter[1] == DONE) - pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_UNK1); + pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NO_INTERACT); break; case GO_CONTAINMENT_SPHERE_ORMOROK: m_uiOrmoroksContainmentSphereGUID = pGo->GetGUID(); if (m_auiEncounter[2] == DONE) - pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_UNK1); + pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NO_INTERACT); break; } } @@ -153,7 +153,7 @@ struct MANGOS_DLL_DECL instance_nexus : public ScriptedInstance if (uiData == DONE) { if (GameObject* pGo = instance->GetGameObject(m_uiTelestrasContainmentSphereGUID)) - pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_UNK1); + pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NO_INTERACT); } break; case TYPE_ANOMALUS: @@ -161,7 +161,7 @@ struct MANGOS_DLL_DECL instance_nexus : public ScriptedInstance if (uiData == DONE) { if (GameObject* pGo = instance->GetGameObject(m_uiAnomalusContainmentSphereGUID)) - pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_UNK1); + pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NO_INTERACT); } break; case TYPE_ORMOROK: @@ -169,7 +169,7 @@ struct MANGOS_DLL_DECL instance_nexus : public ScriptedInstance if (uiData == DONE) { if (GameObject* pGo = instance->GetGameObject(m_uiOrmoroksContainmentSphereGUID)) - pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_UNK1); + pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NO_INTERACT); } break; case TYPE_KERISTRASZA: diff --git a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp index d1581d0b7..0ff760a9b 100644 --- a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp +++ b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp @@ -274,7 +274,7 @@ void instance_ulduar::OnObjectCreate(GameObject* pGo) break; case GO_BROKEN_HARPOON: m_uiBrokenHarpoonGUID = pGo->GetGUID(); - pGo->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_UNK1); + pGo->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NO_INTERACT); break; // Archivum @@ -335,7 +335,7 @@ void instance_ulduar::OnObjectCreate(GameObject* pGo) case G0_MIMIRON_BUTTON: m_uiMimironButtonGUID = pGo->GetGUID(); if (m_auiEncounter[7] == NOT_STARTED) - pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_UNK1); + pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NO_INTERACT); break; case GO_MIMIRON_DOOR_1: m_uiMimironDoor1GUID = pGo->GetGUID(); @@ -391,7 +391,7 @@ void instance_ulduar::OnObjectCreate(GameObject* pGo) break; case GO_DOOR_LEVER: m_uiThorimLeverGUID = pGo->GetGUID(); - pGo->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_UNK1); + pGo->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NO_INTERACT); break; // Prison diff --git a/scripts/outland/hellfire_citadel/magtheridons_lair/instance_magtheridons_lair.cpp b/scripts/outland/hellfire_citadel/magtheridons_lair/instance_magtheridons_lair.cpp index 12390c55f..96f1ef6fd 100644 --- a/scripts/outland/hellfire_citadel/magtheridons_lair/instance_magtheridons_lair.cpp +++ b/scripts/outland/hellfire_citadel/magtheridons_lair/instance_magtheridons_lair.cpp @@ -75,7 +75,7 @@ struct MANGOS_DLL_DECL instance_magtheridons_lair : public ScriptedInstance switch(pGo->GetEntry()) { case 181713: - pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_UNK1); + pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NO_INTERACT); break; case 183847: //event door m_uiDoorGUID = pGo->GetGUID(); diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 6670bbd44..59034ca85 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2138" + #define SD2_REVISION_NR "2139" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 716bdcda3..675affa24 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -3,7 +3,7 @@ -- DELETE FROM sd2_db_version; -INSERT INTO sd2_db_version (version) VALUES ('ScriptDev2 (for MaNGOS 11526+) '); +INSERT INTO sd2_db_version (version) VALUES ('ScriptDev2 (for MaNGOS 11558+) '); -- -- Below contains data for table `script_texts` mainly used in C++ parts. diff --git a/sql/updates/r2139_scriptdev2.sql b/sql/updates/r2139_scriptdev2.sql new file mode 100644 index 000000000..ef0296ddf --- /dev/null +++ b/sql/updates/r2139_scriptdev2.sql @@ -0,0 +1 @@ +UPDATE sd2_db_version SET version='ScriptDev2 (for MaNGOS 11558+) '; From 5bf5de4d01d59881d800badab0d31feb65a7011c Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Tue, 10 May 2011 22:27:02 +0200 Subject: [PATCH 0119/1172] [2140] Improve coding style in ScriptMgr --- ScriptMgr.cpp | 150 +++++++++++++++++++++++----------------------- sd2_revision_nr.h | 2 +- 2 files changed, 76 insertions(+), 76 deletions(-) diff --git a/ScriptMgr.cpp b/ScriptMgr.cpp index ecd9b77da..547afce96 100644 --- a/ScriptMgr.cpp +++ b/ScriptMgr.cpp @@ -241,27 +241,27 @@ char const* GetScriptLibraryVersion() MANGOS_DLL_EXPORT bool GossipHello(Player* pPlayer, Creature* pCreature) { - Script *tmpscript = m_scripts[pCreature->GetScriptId()]; + Script* pTempScript = m_scripts[pCreature->GetScriptId()]; - if (!tmpscript || !tmpscript->pGossipHello) + if (!pTempScript || !pTempScript->pGossipHello) return false; pPlayer->PlayerTalkClass->ClearMenus(); - return tmpscript->pGossipHello(pPlayer, pCreature); + return pTempScript->pGossipHello(pPlayer, pCreature); } MANGOS_DLL_EXPORT -bool GOGossipHello(Player *pPlayer, GameObject *pGo) +bool GOGossipHello(Player* pPlayer, GameObject* pGo) { - Script *tmpscript = m_scripts[pGo->GetGOInfo()->ScriptId]; + Script* pTempScript = m_scripts[pGo->GetGOInfo()->ScriptId]; - if (!tmpscript || !tmpscript->pGossipHelloGO) + if (!pTempScript || !pTempScript->pGossipHelloGO) return false; pPlayer->PlayerTalkClass->ClearMenus(); - return tmpscript->pGossipHelloGO(pPlayer, pGo); + return pTempScript->pGossipHelloGO(pPlayer, pGo); } MANGOS_DLL_EXPORT @@ -269,29 +269,29 @@ bool GossipSelect(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 { debug_log("SD2: Gossip selection, sender: %u, action: %u", uiSender, uiAction); - Script *tmpscript = m_scripts[pCreature->GetScriptId()]; + Script* pTempScript = m_scripts[pCreature->GetScriptId()]; - if (!tmpscript || !tmpscript->pGossipSelect) + if (!pTempScript || !pTempScript->pGossipSelect) return false; pPlayer->PlayerTalkClass->ClearMenus(); - return tmpscript->pGossipSelect(pPlayer, pCreature, uiSender, uiAction); + return pTempScript->pGossipSelect(pPlayer, pCreature, uiSender, uiAction); } MANGOS_DLL_EXPORT -bool GOGossipSelect(Player *pPlayer, GameObject *pGo, uint32 sender, uint32 action) +bool GOGossipSelect(Player* pPlayer, GameObject* pGo, uint32 uiSender, uint32 uiAction) { - debug_log("SD2: GO Gossip selection, sender: %u, action: %u", sender, action); + debug_log("SD2: GO Gossip selection, sender: %u, action: %u", uiSender, uiAction); - Script *tmpscript = m_scripts[pGo->GetGOInfo()->ScriptId]; + Script* pTempScript = m_scripts[pGo->GetGOInfo()->ScriptId]; - if (!tmpscript || !tmpscript->pGossipSelectGO) + if (!pTempScript || !pTempScript->pGossipSelectGO) return false; pPlayer->PlayerTalkClass->ClearMenus(); - return tmpscript->pGossipSelectGO(pPlayer, pGo, sender, action); + return pTempScript->pGossipSelectGO(pPlayer, pGo, uiSender, uiAction); } MANGOS_DLL_EXPORT @@ -299,229 +299,229 @@ bool GossipSelectWithCode(Player* pPlayer, Creature* pCreature, uint32 uiSender, { debug_log("SD2: Gossip selection with code, sender: %u, action: %u", uiSender, uiAction); - Script *tmpscript = m_scripts[pCreature->GetScriptId()]; + Script* pTempScript = m_scripts[pCreature->GetScriptId()]; - if (!tmpscript || !tmpscript->pGossipSelectWithCode) + if (!pTempScript || !pTempScript->pGossipSelectWithCode) return false; pPlayer->PlayerTalkClass->ClearMenus(); - return tmpscript->pGossipSelectWithCode(pPlayer, pCreature, uiSender, uiAction, sCode); + return pTempScript->pGossipSelectWithCode(pPlayer, pCreature, uiSender, uiAction, sCode); } MANGOS_DLL_EXPORT -bool GOGossipSelectWithCode(Player *pPlayer, GameObject *pGo, uint32 sender, uint32 action, const char* sCode) +bool GOGossipSelectWithCode(Player* pPlayer, GameObject* pGo, uint32 uiSender, uint32 uiAction, const char* sCode) { - debug_log("SD2: GO Gossip selection with code, sender: %u, action: %u", sender, action); + debug_log("SD2: GO Gossip selection with code, sender: %u, action: %u", uiSender, uiAction); - Script *tmpscript = m_scripts[pGo->GetGOInfo()->ScriptId]; + Script* pTempScript = m_scripts[pGo->GetGOInfo()->ScriptId]; - if (!tmpscript || !tmpscript->pGossipSelectGOWithCode) + if (!pTempScript || !pTempScript->pGossipSelectGOWithCode) return false; pPlayer->PlayerTalkClass->ClearMenus(); - return tmpscript->pGossipSelectGOWithCode(pPlayer, pGo, sender, action, sCode); + return pTempScript->pGossipSelectGOWithCode(pPlayer, pGo, uiSender, uiAction, sCode); } MANGOS_DLL_EXPORT bool QuestAccept(Player* pPlayer, Creature* pCreature, const Quest* pQuest) { - Script *tmpscript = m_scripts[pCreature->GetScriptId()]; + Script* pTempScript = m_scripts[pCreature->GetScriptId()]; - if (!tmpscript || !tmpscript->pQuestAcceptNPC) + if (!pTempScript || !pTempScript->pQuestAcceptNPC) return false; pPlayer->PlayerTalkClass->ClearMenus(); - return tmpscript->pQuestAcceptNPC(pPlayer, pCreature, pQuest); + return pTempScript->pQuestAcceptNPC(pPlayer, pCreature, pQuest); } MANGOS_DLL_EXPORT bool QuestRewarded(Player* pPlayer, Creature* pCreature, Quest const* pQuest) { - Script *tmpscript = m_scripts[pCreature->GetScriptId()]; + Script* pTempScript = m_scripts[pCreature->GetScriptId()]; - if (!tmpscript || !tmpscript->pQuestRewardedNPC) + if (!pTempScript || !pTempScript->pQuestRewardedNPC) return false; pPlayer->PlayerTalkClass->ClearMenus(); - return tmpscript->pQuestRewardedNPC(pPlayer, pCreature, pQuest); + return pTempScript->pQuestRewardedNPC(pPlayer, pCreature, pQuest); } MANGOS_DLL_EXPORT uint32 GetNPCDialogStatus(Player* pPlayer, Creature* pCreature) { - Script *tmpscript = m_scripts[pCreature->GetScriptId()]; + Script* pTempScript = m_scripts[pCreature->GetScriptId()]; - if (!tmpscript || !tmpscript->pDialogStatusNPC) + if (!pTempScript || !pTempScript->pDialogStatusNPC) return 100; pPlayer->PlayerTalkClass->ClearMenus(); - return tmpscript->pDialogStatusNPC(pPlayer, pCreature); + return pTempScript->pDialogStatusNPC(pPlayer, pCreature); } MANGOS_DLL_EXPORT uint32 GetGODialogStatus(Player* pPlayer, GameObject* pGo) { - Script *tmpscript = m_scripts[pGo->GetGOInfo()->ScriptId]; + Script* pTempScript = m_scripts[pGo->GetGOInfo()->ScriptId]; - if (!tmpscript || !tmpscript->pDialogStatusGO) + if (!pTempScript || !pTempScript->pDialogStatusGO) return 100; pPlayer->PlayerTalkClass->ClearMenus(); - return tmpscript->pDialogStatusGO(pPlayer, pGo); + return pTempScript->pDialogStatusGO(pPlayer, pGo); } MANGOS_DLL_EXPORT bool ItemQuestAccept(Player* pPlayer, Item* pItem, Quest const* pQuest) { - Script *tmpscript = m_scripts[pItem->GetProto()->ScriptId]; + Script* pTempScript = m_scripts[pItem->GetProto()->ScriptId]; - if (!tmpscript || !tmpscript->pQuestAcceptItem) + if (!pTempScript || !pTempScript->pQuestAcceptItem) return false; pPlayer->PlayerTalkClass->ClearMenus(); - return tmpscript->pQuestAcceptItem(pPlayer, pItem, pQuest); + return pTempScript->pQuestAcceptItem(pPlayer, pItem, pQuest); } MANGOS_DLL_EXPORT bool GOUse(Player* pPlayer, GameObject* pGo) { - Script *tmpscript = m_scripts[pGo->GetGOInfo()->ScriptId]; + Script* pTempScript = m_scripts[pGo->GetGOInfo()->ScriptId]; - if (!tmpscript || !tmpscript->pGOUse) + if (!pTempScript || !pTempScript->pGOUse) return false; - return tmpscript->pGOUse(pPlayer, pGo); + return pTempScript->pGOUse(pPlayer, pGo); } MANGOS_DLL_EXPORT bool GOQuestAccept(Player* pPlayer, GameObject* pGo, const Quest* pQuest) { - Script *tmpscript = m_scripts[pGo->GetGOInfo()->ScriptId]; + Script* pTempScript = m_scripts[pGo->GetGOInfo()->ScriptId]; - if (!tmpscript || !tmpscript->pQuestAcceptGO) + if (!pTempScript || !pTempScript->pQuestAcceptGO) return false; pPlayer->PlayerTalkClass->ClearMenus(); - return tmpscript->pQuestAcceptGO(pPlayer, pGo, pQuest); + return pTempScript->pQuestAcceptGO(pPlayer, pGo, pQuest); } MANGOS_DLL_EXPORT bool GOQuestRewarded(Player* pPlayer, GameObject* pGo, Quest const* pQuest) { - Script *tmpscript = m_scripts[pGo->GetGOInfo()->ScriptId]; + Script* pTempScript = m_scripts[pGo->GetGOInfo()->ScriptId]; - if (!tmpscript || !tmpscript->pQuestRewardedGO) + if (!pTempScript || !pTempScript->pQuestRewardedGO) return false; pPlayer->PlayerTalkClass->ClearMenus(); - return tmpscript->pQuestRewardedGO(pPlayer, pGo, pQuest); + return pTempScript->pQuestRewardedGO(pPlayer, pGo, pQuest); } MANGOS_DLL_EXPORT bool AreaTrigger(Player* pPlayer, AreaTriggerEntry const* atEntry) { - Script *tmpscript = m_scripts[GetAreaTriggerScriptId(atEntry->id)]; + Script* pTempScript = m_scripts[GetAreaTriggerScriptId(atEntry->id)]; - if (!tmpscript || !tmpscript->pAreaTrigger) + if (!pTempScript || !pTempScript->pAreaTrigger) return false; - return tmpscript->pAreaTrigger(pPlayer, atEntry); + return pTempScript->pAreaTrigger(pPlayer, atEntry); } MANGOS_DLL_EXPORT bool ProcessEvent(uint32 uiEventId, Object* pSource, Object* pTarget, bool bIsStart) { - Script *tmpscript = m_scripts[GetEventIdScriptId(uiEventId)]; + Script* pTempScript = m_scripts[GetEventIdScriptId(uiEventId)]; - if (!tmpscript || !tmpscript->pProcessEventId) + if (!pTempScript || !pTempScript->pProcessEventId) return false; // bIsStart may be false, when event is from taxi node events (arrival=false, departure=true) - return tmpscript->pProcessEventId(uiEventId, pSource, pTarget, bIsStart); + return pTempScript->pProcessEventId(uiEventId, pSource, pTarget, bIsStart); } MANGOS_DLL_EXPORT CreatureAI* GetCreatureAI(Creature* pCreature) { - Script *tmpscript = m_scripts[pCreature->GetScriptId()]; + Script* pTempScript = m_scripts[pCreature->GetScriptId()]; - if (!tmpscript || !tmpscript->GetAI) + if (!pTempScript || !pTempScript->GetAI) return NULL; - return tmpscript->GetAI(pCreature); + return pTempScript->GetAI(pCreature); } MANGOS_DLL_EXPORT bool ItemUse(Player* pPlayer, Item* pItem, SpellCastTargets const& targets) { - Script *tmpscript = m_scripts[pItem->GetProto()->ScriptId]; + Script* pTempScript = m_scripts[pItem->GetProto()->ScriptId]; - if (!tmpscript || !tmpscript->pItemUse) + if (!pTempScript || !pTempScript->pItemUse) return false; - return tmpscript->pItemUse(pPlayer, pItem, targets); + return pTempScript->pItemUse(pPlayer, pItem, targets); } MANGOS_DLL_EXPORT bool EffectDummyCreature(Unit* pCaster, uint32 spellId, SpellEffectIndex effIndex, Creature* pTarget) { - Script *tmpscript = m_scripts[pTarget->GetScriptId()]; + Script* pTempScript = m_scripts[pTarget->GetScriptId()]; - if (!tmpscript || !tmpscript->pEffectDummyNPC) + if (!pTempScript || !pTempScript->pEffectDummyNPC) return false; - return tmpscript->pEffectDummyNPC(pCaster, spellId, effIndex, pTarget); + return pTempScript->pEffectDummyNPC(pCaster, spellId, effIndex, pTarget); } MANGOS_DLL_EXPORT bool EffectDummyGameObject(Unit* pCaster, uint32 spellId, SpellEffectIndex effIndex, GameObject* pTarget) { - Script *tmpscript = m_scripts[pTarget->GetGOInfo()->ScriptId]; + Script* pTempScript = m_scripts[pTarget->GetGOInfo()->ScriptId]; - if (!tmpscript || !tmpscript->pEffectDummyGO) + if (!pTempScript || !pTempScript->pEffectDummyGO) return false; - return tmpscript->pEffectDummyGO(pCaster, spellId, effIndex, pTarget); + return pTempScript->pEffectDummyGO(pCaster, spellId, effIndex, pTarget); } MANGOS_DLL_EXPORT bool EffectDummyItem(Unit* pCaster, uint32 spellId, SpellEffectIndex effIndex, Item* pTarget) { - Script *tmpscript = m_scripts[pTarget->GetProto()->ScriptId]; + Script* pTempScript = m_scripts[pTarget->GetProto()->ScriptId]; - if (!tmpscript || !tmpscript->pEffectDummyItem) + if (!pTempScript || !pTempScript->pEffectDummyItem) return false; - return tmpscript->pEffectDummyItem(pCaster, spellId, effIndex, pTarget); + return pTempScript->pEffectDummyItem(pCaster, spellId, effIndex, pTarget); } MANGOS_DLL_EXPORT -bool AuraDummy(Aura const* pAura, bool apply) +bool AuraDummy(Aura const* pAura, bool bApply) { - Script *tmpscript = m_scripts[((Creature*)pAura->GetTarget())->GetScriptId()]; + Script* pTempScript = m_scripts[((Creature*)pAura->GetTarget())->GetScriptId()]; - if (!tmpscript || !tmpscript->pEffectAuraDummy) + if (!pTempScript || !pTempScript->pEffectAuraDummy) return false; - return tmpscript->pEffectAuraDummy(pAura, apply); + return pTempScript->pEffectAuraDummy(pAura, bApply); } MANGOS_DLL_EXPORT InstanceData* CreateInstanceData(Map* pMap) { - Script *tmpscript = m_scripts[pMap->GetScriptId()]; + Script* pTempScript = m_scripts[pMap->GetScriptId()]; - if (!tmpscript || !tmpscript->GetInstanceData) + if (!pTempScript || !pTempScript->GetInstanceData) return NULL; - return tmpscript->GetInstanceData(pMap); + return pTempScript->GetInstanceData(pMap); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 59034ca85..a74b81774 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2139" + #define SD2_REVISION_NR "2140" #endif // __SD2_REVISION_NR_H__ From c0837d32d4f6b03c1a07a6e6361a54700493e7ac Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Wed, 11 May 2011 00:00:40 +0200 Subject: [PATCH 0120/1172] [2141] Implement new Guid Storage for GO and NPC ObjectGuids * Use a std::map to store Guid by entry for GOs and NPCs This is based on ideas by Darkstalker * Add Accessor functions to directly get a GameObject* or Creature* for stored entries * Add Wrapper functions for DoUseDoorOrButton, DoRespawnGameObject to use them with GO-Entry * Add some doxygen comments for sc_instance --- ScriptMgr.h | 2 ++ include/sc_instance.cpp | 69 ++++++++++++++++++++++++++++++++++++++++- include/sc_instance.h | 13 +++++++- sd2_revision_nr.h | 2 +- 4 files changed, 83 insertions(+), 3 deletions(-) diff --git a/ScriptMgr.h b/ScriptMgr.h index 16ca8bfa8..c4a1c1040 100644 --- a/ScriptMgr.h +++ b/ScriptMgr.h @@ -21,6 +21,7 @@ class Unit; class WorldObject; class Aura; class Object; +class ObjectGuid; // ********************************************************* // ************** Some defines used globally *************** @@ -33,6 +34,7 @@ class Object; typedef std::list GUIDList; typedef std::set GUIDSet; typedef std::vector GUIDVector; +typedef std::map EntryGuidMap; /* Escort Factions * TODO: find better namings and definitions. diff --git a/include/sc_instance.cpp b/include/sc_instance.cpp index 28e877854..f98878519 100644 --- a/include/sc_instance.cpp +++ b/include/sc_instance.cpp @@ -4,7 +4,13 @@ #include "precompiled.h" -//Optional uiWithRestoreTime. If not defined, autoCloseTime will be used (if not 0 by default in *_template) +/** + Function that uses a door or a button + + @param guid The ObjectGuid of the Door/ Button that shall be used + @param uiWithRestoreTime (in seconds) if == 0 autoCloseTime will be used (if not 0 by default in *_template) + @param bUseAlternativeState Use to alternative state + */ void ScriptedInstance::DoUseDoorOrButton(ObjectGuid guid, uint32 uiWithRestoreTime, bool bUseAlternativeState) { if (!guid) @@ -24,6 +30,23 @@ void ScriptedInstance::DoUseDoorOrButton(ObjectGuid guid, uint32 uiWithRestoreTi } } +/// Function that uses a door or button that is stored in m_mGoEntryGuidStore +void ScriptedInstance::DoUseDoorOrButton(uint32 uiEntry, uint32 uiWithRestoreTime /*= 0*/, bool bUseAlternativeState /*= false*/) +{ + EntryGuidMap::iterator find = m_mGoEntryGuidStore.find(uiEntry); + if (find != m_mGoEntryGuidStore.end()) + DoUseDoorOrButton(find->second, uiWithRestoreTime, bUseAlternativeState); + else + // Output log, possible reason is not added GO to storage, or not yet loaded + debug_log("SD2: Script call DoUseDoorOrButton(by Entry), but no gameobject of entry %u was created yet, or it was not stored by script for map %u.", uiEntry, instance->GetId()); +} + +/** + Function that respawns a despawned GameObject with given time + + @param guid The ObjectGuid of the GO that shall be respawned + @param uiTimeToDespawn (in seconds) Despawn the GO after this time, default is a minute + */ void ScriptedInstance::DoRespawnGameObject(ObjectGuid guid, uint32 uiTimeToDespawn) { if (!guid) @@ -44,6 +67,23 @@ void ScriptedInstance::DoRespawnGameObject(ObjectGuid guid, uint32 uiTimeToDespa } } +/// Function that respawns a despawned GO that is stored in m_mGoEntryGuidStore +void ScriptedInstance::DoRespawnGameObject(uint32 uiEntry, uint32 uiTimeToDespawn) +{ + EntryGuidMap::iterator find = m_mGoEntryGuidStore.find(uiEntry); + if (find != m_mGoEntryGuidStore.end()) + DoRespawnGameObject(find->second, uiTimeToDespawn); + else + // Output log, possible reason is not added GO to storage, or not yet loaded; + debug_log("SD2: Script call DoRespawnGameObject(by Entry), but no gameobject of entry %u was created yet, or it was not stored by script for map %u.", uiEntry, instance->GetId()); +} + +/** + Helper function to update a world state for all players in the map + + @param uiStateId The WorldState that will be set for all players in the map + @param uiStateData The Value to which the State will be set to + */ void ScriptedInstance::DoUpdateWorldState(uint32 uiStateId, uint32 uiStateData) { Map::PlayerList const& lPlayers = instance->GetPlayers(); @@ -60,6 +100,7 @@ void ScriptedInstance::DoUpdateWorldState(uint32 uiStateId, uint32 uiStateData) debug_log("SD2: DoUpdateWorldState attempt send data but no players in map."); } +/// Get the first found Player* (with requested properties) in the map. Can return NULL. Player* ScriptedInstance::GetPlayerInMap(bool bOnlyAlive /*=false*/, bool bCanBeGamemaster /*=true*/) { Map::PlayerList const& lPlayers = instance->GetPlayers(); @@ -73,3 +114,29 @@ Player* ScriptedInstance::GetPlayerInMap(bool bOnlyAlive /*=false*/, bool bCanBe return NULL; } + +/// Returns a pointer to a loaded GameObject that was stored in m_mGoEntryGuidStore. Can return NULL +GameObject* ScriptedInstance::GetSingleGameObjectFromStorage(uint32 uiEntry) +{ + EntryGuidMap::iterator find = m_mGoEntryGuidStore.find(uiEntry); + if (find != m_mGoEntryGuidStore.end()) + return instance->GetGameObject(find->second); + + // Output log, possible reason is not added GO to map, or not yet loaded; + debug_log("SD2: Script requested gameobject with entry %u, but no gameobject of this entry was created yet, or it was not stored by script for map %u.", uiEntry, instance->GetId()); + + return NULL; +} + +/// Returns a pointer to a loaded Creature that was stored in m_mGoEntryGuidStore. Can return NULL +Creature* ScriptedInstance::GetSingleCreatureFromStorage(uint32 uiEntry) +{ + EntryGuidMap::iterator find = m_mNpcEntryGuidStore.find(uiEntry); + if (find != m_mNpcEntryGuidStore.end()) + return instance->GetCreature(find->second); + + // Output log, possible reason is not added GO to map, or not yet loaded; + debug_log("SD2: Script requested creature with entry %u, but no npc of this entry was created yet, or it was not stored by script for map %u.", uiEntry, instance->GetId()); + + return NULL; +} diff --git a/include/sc_instance.h b/include/sc_instance.h index e6b6d90af..318b07e10 100644 --- a/include/sc_instance.h +++ b/include/sc_instance.h @@ -26,20 +26,31 @@ enum EncounterState class MANGOS_DLL_DECL ScriptedInstance : public InstanceData { public: - ScriptedInstance(Map* pMap) : InstanceData(pMap) {} ~ScriptedInstance() {} + // Default accessor functions + GameObject* GetSingleGameObjectFromStorage(uint32 uiEntry); + Creature* GetSingleCreatureFromStorage(uint32 uiEntry); + // Change active state of doors or buttons void DoUseDoorOrButton(ObjectGuid guid, uint32 uiWithRestoreTime = 0, bool bUseAlternativeState = false); + void DoUseDoorOrButton(uint32 uiEntry, uint32 uiWithRestoreTime = 0, bool bUseAlternativeState = false); // Respawns a GO having negative spawntimesecs in gameobject-table void DoRespawnGameObject(ObjectGuid guid, uint32 uiTimeToDespawn = MINUTE); + void DoRespawnGameObject(uint32 uiEntry, uint32 uiTimeToDespawn = MINUTE); // Sends world state update to all players in instance void DoUpdateWorldState(uint32 uiStateId, uint32 uiStateData); // Get a Player from map Player* GetPlayerInMap(bool bOnlyAlive = false, bool bCanBeGamemaster = true); + + protected: + // Storage for GO-Guids and NPC-Guids + EntryGuidMap m_mGoEntryGuidStore; ///< Store unique GO-Guids by entry + EntryGuidMap m_mNpcEntryGuidStore; ///< Store unique NPC-Guids by entry }; + #endif diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index a74b81774..ee0c3ed54 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2140" + #define SD2_REVISION_NR "2141" #endif // __SD2_REVISION_NR_H__ From ad557bdbb0af4ebdc238613c587a19a932b46263 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Wed, 11 May 2011 00:11:17 +0200 Subject: [PATCH 0121/1172] [2142] Use EntryGuidMap-Storage in Deadmines --- .../eastern_kingdoms/deadmines/deadmines.cpp | 4 +- .../deadmines/instance_deadmines.cpp | 59 ++++--------------- sd2_revision_nr.h | 2 +- 3 files changed, 15 insertions(+), 50 deletions(-) diff --git a/scripts/eastern_kingdoms/deadmines/deadmines.cpp b/scripts/eastern_kingdoms/deadmines/deadmines.cpp index d3110f03e..9fff48726 100644 --- a/scripts/eastern_kingdoms/deadmines/deadmines.cpp +++ b/scripts/eastern_kingdoms/deadmines/deadmines.cpp @@ -117,7 +117,7 @@ struct MANGOS_DLL_DECL boss_mr_smiteAI : public ScriptedAI if (!pInstance) return; - GameObject* pChest = pInstance->instance->GetGameObject(pInstance->GetData64(GO_SMITE_CHEST)); + GameObject* pChest = pInstance->GetSingleGameObjectFromStorage(GO_SMITE_CHEST); if (!pChest) return; @@ -285,7 +285,7 @@ bool GOUse_go_door_lever_dm(Player* pPlayer, GameObject* pGo) if (!pInstance) return false; - GameObject* pGoDoor = pInstance->instance->GetGameObject(pInstance->GetData64(GO_IRON_CLAD_DOOR)); + GameObject* pGoDoor = pInstance->GetSingleGameObjectFromStorage(GO_IRON_CLAD_DOOR); if (pGoDoor && pGoDoor->GetGoState() == GO_STATE_READY) return false; diff --git a/scripts/eastern_kingdoms/deadmines/instance_deadmines.cpp b/scripts/eastern_kingdoms/deadmines/instance_deadmines.cpp index c95c0aece..9f46e792a 100644 --- a/scripts/eastern_kingdoms/deadmines/instance_deadmines.cpp +++ b/scripts/eastern_kingdoms/deadmines/instance_deadmines.cpp @@ -30,14 +30,6 @@ struct MANGOS_DLL_DECL instance_deadmines : public ScriptedInstance uint32 m_auiEncounter[MAX_ENCOUNTER]; - uint64 m_uiFactoryDoorGUID; - uint64 m_uiMastRoomDoorGUID; - uint64 m_uiFoundryDoorGUID; - uint64 m_uiIronCladGUID; - uint64 m_uiCannonGUID; - uint64 m_uiSmiteChestGUID; - uint64 m_uiSmiteGUID; - uint32 m_uiIronDoor_Timer; uint32 m_uiDoor_Step; @@ -45,14 +37,6 @@ struct MANGOS_DLL_DECL instance_deadmines : public ScriptedInstance { memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); - m_uiFactoryDoorGUID = 0; - m_uiMastRoomDoorGUID = 0; - m_uiFoundryDoorGUID = 0; - m_uiIronCladGUID = 0; - m_uiCannonGUID = 0; - m_uiSmiteChestGUID = 0; - m_uiSmiteGUID = 0; - m_uiIronDoor_Timer = 0; m_uiDoor_Step = 0; } @@ -60,7 +44,7 @@ struct MANGOS_DLL_DECL instance_deadmines : public ScriptedInstance void OnCreatureCreate(Creature* pCreature) { if (pCreature->GetEntry() == NPC_MR_SMITE) - m_uiSmiteGUID = pCreature->GetGUID(); + m_mNpcEntryGuidStore[NPC_MR_SMITE] = pCreature->GetObjectGuid(); } void OnObjectCreate(GameObject* pGo) @@ -68,36 +52,30 @@ struct MANGOS_DLL_DECL instance_deadmines : public ScriptedInstance switch(pGo->GetEntry()) { case GO_FACTORY_DOOR: - m_uiFactoryDoorGUID = pGo->GetGUID(); - if (GetData(TYPE_RHAHKZOR) == DONE) pGo->SetGoState(GO_STATE_ACTIVE); break; case GO_MAST_ROOM_DOOR: - m_uiMastRoomDoorGUID = pGo->GetGUID(); - if (GetData(TYPE_SNEED) == DONE) pGo->SetGoState(GO_STATE_ACTIVE); break; case GO_FOUNDRY_DOOR: - m_uiFoundryDoorGUID = pGo->GetGUID(); - if (GetData(TYPE_GILNID) == DONE) pGo->SetGoState(GO_STATE_ACTIVE); break; case GO_IRON_CLAD_DOOR: - m_uiIronCladGUID = pGo->GetGUID(); - break; case GO_DEFIAS_CANNON: - m_uiCannonGUID = pGo->GetGUID(); - break; case GO_SMITE_CHEST: - m_uiSmiteChestGUID = pGo->GetGUID(); break; + + default: + return; } + + m_mGoEntryGuidStore[pGo->GetEntry()] = pGo->GetObjectGuid(); } void OnCreatureDeath(Creature* pCreature) @@ -123,7 +101,7 @@ struct MANGOS_DLL_DECL instance_deadmines : public ScriptedInstance case TYPE_RHAHKZOR: { if (uiData == DONE) - DoUseDoorOrButton(m_uiFactoryDoorGUID); + DoUseDoorOrButton(GO_FACTORY_DOOR); m_auiEncounter[1] = uiData; break; @@ -131,7 +109,7 @@ struct MANGOS_DLL_DECL instance_deadmines : public ScriptedInstance case TYPE_SNEED: { if (uiData == DONE) - DoUseDoorOrButton(m_uiMastRoomDoorGUID); + DoUseDoorOrButton(GO_MAST_ROOM_DOOR); m_auiEncounter[2] = uiData; break; @@ -139,7 +117,7 @@ struct MANGOS_DLL_DECL instance_deadmines : public ScriptedInstance case TYPE_GILNID: { if (uiData == DONE) - DoUseDoorOrButton(m_uiFoundryDoorGUID); + DoUseDoorOrButton(GO_FOUNDRY_DOOR); m_auiEncounter[3] = uiData; break; @@ -148,7 +126,7 @@ struct MANGOS_DLL_DECL instance_deadmines : public ScriptedInstance { if (uiData == IN_PROGRESS) { - if (GameObject* pGo = instance->GetGameObject(m_uiIronCladGUID)) + if (GameObject* pGo = GetSingleGameObjectFromStorage(GO_IRON_CLAD_DOOR)) { pGo->SetGoState(GO_STATE_ACTIVE_ALTERNATIVE); m_uiIronDoor_Timer = 3000; @@ -177,26 +155,13 @@ struct MANGOS_DLL_DECL instance_deadmines : public ScriptedInstance return 0; } - uint64 GetData64(uint32 uiData) - { - switch(uiData) - { - case GO_IRON_CLAD_DOOR: - return m_uiIronCladGUID; - case GO_SMITE_CHEST: - return m_uiSmiteChestGUID; - } - - return 0; - } - void Update(uint32 uiDiff) { if (m_uiIronDoor_Timer) { if (m_uiIronDoor_Timer <= uiDiff) { - if (Creature* pMrSmite = instance->GetCreature(m_uiSmiteGUID)) + if (Creature* pMrSmite = GetSingleCreatureFromStorage(NPC_MR_SMITE)) { switch(m_uiDoor_Step) { @@ -207,7 +172,7 @@ struct MANGOS_DLL_DECL instance_deadmines : public ScriptedInstance break; case 1: { - if (GameObject* pDoor = instance->GetGameObject(m_uiIronCladGUID)) + if (GameObject* pDoor = GetSingleGameObjectFromStorage(GO_IRON_CLAD_DOOR)) { // should be static spawns, fetch the closest ones at the pier if (Creature* pi1 = GetClosestCreatureWithEntry(pDoor, NPC_PIRATE, 40.0f)) diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index ee0c3ed54..73d666f8f 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2141" + #define SD2_REVISION_NR "2142" #endif // __SD2_REVISION_NR_H__ From ddb0b67d0a8063971b46ff6c69ac755376121f07 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Mon, 16 May 2011 20:00:31 +0200 Subject: [PATCH 0122/1172] [2143] Use EntryGuidMap-Storage in Naxxramas --- scripts/northrend/naxxramas/boss_gothik.cpp | 2 +- scripts/northrend/naxxramas/boss_thaddius.cpp | 20 +- .../naxxramas/instance_naxxramas.cpp | 236 +++++------------- scripts/northrend/naxxramas/naxxramas.h | 59 +---- sd2_revision_nr.h | 2 +- 5 files changed, 84 insertions(+), 235 deletions(-) diff --git a/scripts/northrend/naxxramas/boss_gothik.cpp b/scripts/northrend/naxxramas/boss_gothik.cpp index e71158232..bf050b5b3 100644 --- a/scripts/northrend/naxxramas/boss_gothik.cpp +++ b/scripts/northrend/naxxramas/boss_gothik.cpp @@ -403,7 +403,7 @@ bool EffectDummyCreature_spell_anchor(Unit* pCaster, uint32 uiSpellId, SpellEffe case SPELL_B_TO_SKULL: case SPELL_C_TO_SKULL: { - if (Creature* pGoth = pInstance->instance->GetCreature(pInstance->GetData64(NPC_GOTHIK))) + if (Creature* pGoth = pInstance->GetSingleCreatureFromStorage(NPC_GOTHIK)) { uint32 uiNpcEntry = NPC_SPECT_TRAINEE; diff --git a/scripts/northrend/naxxramas/boss_thaddius.cpp b/scripts/northrend/naxxramas/boss_thaddius.cpp index c63ebe3a6..e1d3c537d 100644 --- a/scripts/northrend/naxxramas/boss_thaddius.cpp +++ b/scripts/northrend/naxxramas/boss_thaddius.cpp @@ -138,8 +138,8 @@ struct MANGOS_DLL_DECL boss_thaddiusAI : public Scripted_NoMovementAI m_pInstance->SetData(TYPE_THADDIUS, FAIL); // Respawn Adds: - Creature* pFeugen = m_pInstance->instance->GetCreature(m_pInstance->GetData64(NPC_FEUGEN)); - Creature* pStalagg = m_pInstance->instance->GetCreature(m_pInstance->GetData64(NPC_STALAGG)); + Creature* pFeugen = m_pInstance->GetSingleCreatureFromStorage(NPC_FEUGEN); + Creature* pStalagg = m_pInstance->GetSingleCreatureFromStorage(NPC_STALAGG); if (pFeugen) { pFeugen->ForcedDespawn(); @@ -192,8 +192,8 @@ struct MANGOS_DLL_DECL boss_thaddiusAI : public Scripted_NoMovementAI m_pInstance->SetData(TYPE_THADDIUS, DONE); // Force Despawn of Adds - Creature* pFeugen = m_pInstance->instance->GetCreature(m_pInstance->GetData64(NPC_FEUGEN)); - Creature* pStalagg = m_pInstance->instance->GetCreature(m_pInstance->GetData64(NPC_STALAGG)); + Creature* pFeugen = m_pInstance->GetSingleCreatureFromStorage(NPC_FEUGEN); + Creature* pStalagg = m_pInstance->GetSingleCreatureFromStorage(NPC_STALAGG); if (pFeugen) pFeugen->ForcedDespawn(); @@ -325,8 +325,8 @@ struct MANGOS_DLL_DECL npc_tesla_coilAI : public Scripted_NoMovementAI if (!m_pInstance || m_pInstance->GetData(TYPE_THADDIUS) == DONE) return true; - GameObject* pNoxTeslaFeugen = m_pInstance->instance->GetGameObject(m_pInstance->GetData64(GO_CONS_NOX_TESLA_FEUGEN)); - GameObject* pNoxTeslaStalagg = m_pInstance->instance->GetGameObject(m_pInstance->GetData64(GO_CONS_NOX_TESLA_STALAGG)); + GameObject* pNoxTeslaFeugen = m_pInstance->GetSingleGameObjectFromStorage(GO_CONS_NOX_TESLA_FEUGEN); + GameObject* pNoxTeslaStalagg = m_pInstance->GetSingleGameObjectFromStorage(GO_CONS_NOX_TESLA_STALAGG); // Try again, till Tesla GOs are spawned if (!pNoxTeslaFeugen || !pNoxTeslaStalagg) @@ -358,7 +358,7 @@ struct MANGOS_DLL_DECL npc_tesla_coilAI : public Scripted_NoMovementAI { m_bReapply = false; m_creature->InterruptNonMeleeSpells(true); - GameObject* pGo = m_pInstance->instance->GetGameObject(m_pInstance->GetData64(m_bToFeugen ? GO_CONS_NOX_TESLA_FEUGEN : GO_CONS_NOX_TESLA_STALAGG)); + GameObject* pGo = m_pInstance->GetSingleGameObjectFromStorage(m_bToFeugen ? GO_CONS_NOX_TESLA_FEUGEN : GO_CONS_NOX_TESLA_STALAGG); if (pGo && pGo->GetGoType() == GAMEOBJECT_TYPE_BUTTON && pGo->getLootState() == GO_ACTIVATED) pGo->ResetDoorOrButton(); @@ -398,7 +398,7 @@ struct MANGOS_DLL_DECL npc_tesla_coilAI : public Scripted_NoMovementAI m_uiOverloadTimer = 0; DoCastSpellIfCan(m_creature, SPELL_SHOCK_OVERLOAD, CAST_INTERRUPT_PREVIOUS); DoScriptText(EMOTE_TESLA_OVERLOAD, m_creature); - m_pInstance->DoUseDoorOrButton(m_pInstance->GetData64(m_bToFeugen ? GO_CONS_NOX_TESLA_FEUGEN : GO_CONS_NOX_TESLA_STALAGG)); + m_pInstance->DoUseDoorOrButton(m_bToFeugen ? GO_CONS_NOX_TESLA_FEUGEN : GO_CONS_NOX_TESLA_STALAGG); } else m_uiOverloadTimer -= uiDiff; @@ -457,8 +457,8 @@ struct MANGOS_DLL_DECL boss_thaddiusAddsAI : public ScriptedAI { switch (m_creature->GetEntry()) { - case NPC_FEUGEN: return m_pInstance->instance->GetCreature(m_pInstance->GetData64(NPC_STALAGG)); - case NPC_STALAGG: return m_pInstance->instance->GetCreature(m_pInstance->GetData64(NPC_FEUGEN)); + case NPC_FEUGEN: return m_pInstance->GetSingleCreatureFromStorage(NPC_STALAGG); + case NPC_STALAGG: return m_pInstance->GetSingleCreatureFromStorage(NPC_FEUGEN); default: return NULL; } diff --git a/scripts/northrend/naxxramas/instance_naxxramas.cpp b/scripts/northrend/naxxramas/instance_naxxramas.cpp index 543a5911d..664c50ccc 100644 --- a/scripts/northrend/naxxramas/instance_naxxramas.cpp +++ b/scripts/northrend/naxxramas/instance_naxxramas.cpp @@ -25,59 +25,6 @@ EndScriptData */ #include "naxxramas.h" instance_naxxramas::instance_naxxramas(Map* pMap) : ScriptedInstance(pMap), - m_uiAracEyeRampGUID(0), - m_uiPlagEyeRampGUID(0), - m_uiMiliEyeRampGUID(0), - m_uiConsEyeRampGUID(0), - - m_uiAracPortalGUID(0), - m_uiPlagPortalGUID(0), - m_uiMiliPortalGUID(0), - m_uiConsPortalGUID(0), - - m_uiAnubRekhanGUID(0), - m_uiFaerlinanGUID(0), - - m_uiZeliekGUID(0), - m_uiThaneGUID(0), - m_uiBlaumeuxGUID(0), - m_uiRivendareGUID(0), - - m_uiThaddiusGUID(0), - m_uiStalaggGUID(0), - m_uiFeugenGUID(0), - - m_uiKelthuzadGUID(0), - - m_uiPathExitDoorGUID(0), - m_uiGlutExitDoorGUID(0), - m_uiThadDoorGUID(0), - m_uiThadNoxTeslaFeugenGUID(0), - m_uiThadNoxTeslaStalaggGUID(0), - - m_uiAnubDoorGUID(0), - m_uiAnubGateGUID(0), - m_uiFaerDoorGUID(0), - m_uiFaerWebGUID(0), - m_uiMaexOuterGUID(0), - m_uiMaexInnerGUID(0), - - m_uiGothikGUID(0), - m_uiGothCombatGateGUID(0), - m_uiGothikEntryDoorGUID(0), - m_uiGothikExitDoorGUID(0), - m_uiHorsemenDoorGUID(0), - m_uiHorsemenChestGUID(0), - - m_uiNothEntryDoorGUID(0), - m_uiNothExitDoorGUID(0), - m_uiHeigEntryDoorGUID(0), - m_uiHeigExitDoorGUID(0), - m_uiLoathebDoorGUID(0), - - m_uiKelthuzadDoorGUID(0), - m_uiKelthuzadExitDoorGUID(0), - m_fChamberCenterX(0.0f), m_fChamberCenterY(0.0f), m_fChamberCenterZ(0.0f) @@ -97,17 +44,20 @@ void instance_naxxramas::OnCreatureCreate(Creature* pCreature) { switch(pCreature->GetEntry()) { - case NPC_ANUB_REKHAN: m_uiAnubRekhanGUID = pCreature->GetGUID(); break; - case NPC_FAERLINA: m_uiFaerlinanGUID = pCreature->GetGUID(); break; - case NPC_THADDIUS: m_uiThaddiusGUID = pCreature->GetGUID(); break; - case NPC_STALAGG: m_uiStalaggGUID = pCreature->GetGUID(); break; - case NPC_FEUGEN: m_uiFeugenGUID = pCreature->GetGUID(); break; - case NPC_ZELIEK: m_uiZeliekGUID = pCreature->GetGUID(); break; - case NPC_THANE: m_uiThaneGUID = pCreature->GetGUID(); break; - case NPC_BLAUMEUX: m_uiBlaumeuxGUID = pCreature->GetGUID(); break; - case NPC_RIVENDARE: m_uiRivendareGUID = pCreature->GetGUID(); break; - case NPC_GOTHIK: m_uiGothikGUID = pCreature->GetGUID(); break; - case NPC_KELTHUZAD: m_uiKelthuzadGUID = pCreature->GetGUID(); break; + case NPC_ANUB_REKHAN: + case NPC_FAERLINA: + case NPC_THADDIUS: + case NPC_STALAGG: + case NPC_FEUGEN: + case NPC_ZELIEK: + case NPC_THANE: + case NPC_BLAUMEUX: + case NPC_RIVENDARE: + case NPC_GOTHIK: + case NPC_KELTHUZAD: + m_mNpcEntryGuidStore[pCreature->GetEntry()] = pCreature->GetObjectGuid(); + break; + case NPC_SUB_BOSS_TRIGGER: m_lGothTriggerList.push_back(pCreature->GetGUID()); break; case NPC_TESLA_COIL: m_lThadTeslaCoilList.push_back(pCreature->GetGUID()); break; @@ -122,145 +72,120 @@ void instance_naxxramas::OnObjectCreate(GameObject* pGo) { switch(pGo->GetEntry()) { + // Arachnid Quarter case GO_ARAC_ANUB_DOOR: - m_uiAnubDoorGUID = pGo->GetGUID(); break; case GO_ARAC_ANUB_GATE: - m_uiAnubGateGUID = pGo->GetGUID(); if (m_auiEncounter[TYPE_ANUB_REKHAN] == DONE) pGo->SetGoState(GO_STATE_ACTIVE); break; case GO_ARAC_FAER_WEB: - m_uiFaerWebGUID = pGo->GetGUID(); break; case GO_ARAC_FAER_DOOR: - m_uiFaerDoorGUID = pGo->GetGUID(); if (m_auiEncounter[TYPE_FAERLINA] == DONE) pGo->SetGoState(GO_STATE_ACTIVE); break; case GO_ARAC_MAEX_INNER_DOOR: - m_uiMaexInnerGUID = pGo->GetGUID(); break; case GO_ARAC_MAEX_OUTER_DOOR: - m_uiMaexOuterGUID = pGo->GetGUID(); if (m_auiEncounter[TYPE_FAERLINA] == DONE) pGo->SetGoState(GO_STATE_ACTIVE); break; + // Plague Quarter case GO_PLAG_NOTH_ENTRY_DOOR: - m_uiNothEntryDoorGUID = pGo->GetGUID(); break; case GO_PLAG_NOTH_EXIT_DOOR: - m_uiNothExitDoorGUID = pGo->GetGUID(); if (m_auiEncounter[TYPE_NOTH] == DONE) pGo->SetGoState(GO_STATE_ACTIVE); break; case GO_PLAG_HEIG_ENTRY_DOOR: - m_uiHeigEntryDoorGUID = pGo->GetGUID(); if (m_auiEncounter[TYPE_NOTH] == DONE) pGo->SetGoState(GO_STATE_ACTIVE); break; case GO_PLAG_HEIG_EXIT_DOOR: - m_uiHeigExitDoorGUID = pGo->GetGUID(); if (m_auiEncounter[TYPE_HEIGAN] == DONE) pGo->SetGoState(GO_STATE_ACTIVE); break; case GO_PLAG_LOAT_DOOR: - m_uiLoathebDoorGUID = pGo->GetGUID(); break; + // Military Quarter case GO_MILI_GOTH_ENTRY_GATE: - m_uiGothikEntryDoorGUID = pGo->GetGUID(); break; case GO_MILI_GOTH_EXIT_GATE: - m_uiGothikExitDoorGUID = pGo->GetGUID(); if (m_auiEncounter[TYPE_GOTHIK] == DONE) pGo->SetGoState(GO_STATE_ACTIVE); break; case GO_MILI_GOTH_COMBAT_GATE: - m_uiGothCombatGateGUID = pGo->GetGUID(); break; case GO_MILI_HORSEMEN_DOOR: - m_uiHorsemenDoorGUID = pGo->GetGUID(); if (m_auiEncounter[TYPE_GOTHIK] == DONE) pGo->SetGoState(GO_STATE_ACTIVE); break; - case GO_CHEST_HORSEMEN_NORM: case GO_CHEST_HORSEMEN_HERO: - m_uiHorsemenChestGUID = pGo->GetGUID(); break; + // Construct Quarter case GO_CONS_PATH_EXIT_DOOR: - m_uiPathExitDoorGUID = pGo->GetGUID(); if (m_auiEncounter[TYPE_PATCHWERK] == DONE) pGo->SetGoState(GO_STATE_ACTIVE); break; case GO_CONS_GLUT_EXIT_DOOR: - m_uiGlutExitDoorGUID = pGo->GetGUID(); if (m_auiEncounter[TYPE_GLUTH] == DONE) pGo->SetGoState(GO_STATE_ACTIVE); break; case GO_CONS_THAD_DOOR: - m_uiThadDoorGUID = pGo->GetGUID(); if (m_auiEncounter[TYPE_GLUTH] == DONE) pGo->SetGoState(GO_STATE_ACTIVE); break; case GO_CONS_NOX_TESLA_FEUGEN: - m_uiThadNoxTeslaFeugenGUID = pGo->GetGUID(); if (m_auiEncounter[TYPE_THADDIUS] == DONE) pGo->SetGoState(GO_STATE_READY); break; case GO_CONS_NOX_TESLA_STALAGG: - m_uiThadNoxTeslaStalaggGUID = pGo->GetGUID(); if (m_auiEncounter[TYPE_THADDIUS] == DONE) pGo->SetGoState(GO_STATE_READY); break; + // Frostwyrm Lair case GO_KELTHUZAD_WATERFALL_DOOR: - m_uiKelthuzadDoorGUID = pGo->GetGUID(); if (m_auiEncounter[TYPE_SAPPHIRON] == DONE) pGo->SetGoState(GO_STATE_ACTIVE); break; - case GO_KELTHUZAD_EXIT_DOOR: - m_uiKelthuzadExitDoorGUID = pGo->GetGUID(); break; + // Eyes case GO_ARAC_EYE_RAMP: - m_uiAracEyeRampGUID = pGo->GetGUID(); if (m_auiEncounter[TYPE_MAEXXNA] == DONE) pGo->SetGoState(GO_STATE_ACTIVE); break; case GO_PLAG_EYE_RAMP: - m_uiPlagEyeRampGUID = pGo->GetGUID(); if (m_auiEncounter[TYPE_LOATHEB] == DONE) pGo->SetGoState(GO_STATE_ACTIVE); break; case GO_MILI_EYE_RAMP: - m_uiMiliEyeRampGUID = pGo->GetGUID(); if (m_auiEncounter[TYPE_FOUR_HORSEMEN] == DONE) pGo->SetGoState(GO_STATE_ACTIVE); break; case GO_CONS_EYE_RAMP: - m_uiConsEyeRampGUID = pGo->GetGUID(); if (m_auiEncounter[TYPE_THADDIUS] == DONE) pGo->SetGoState(GO_STATE_ACTIVE); break; + // Portals case GO_ARAC_PORTAL: - m_uiAracPortalGUID = pGo->GetGUID(); - break; case GO_PLAG_PORTAL: - m_uiPlagPortalGUID = pGo->GetGUID(); - break; case GO_MILI_PORTAL: - m_uiMiliPortalGUID = pGo->GetGUID(); - break; case GO_CONS_PORTAL: - m_uiConsPortalGUID = pGo->GetGUID(); break; + + default: + return; } + m_mGoEntryGuidStore[pGo->GetEntry()] = pGo->GetObjectGuid(); } void instance_naxxramas::OnPlayerDeath(Player* pPlayer) @@ -287,18 +212,18 @@ void instance_naxxramas::SetData(uint32 uiType, uint32 uiData) { case TYPE_ANUB_REKHAN: m_auiEncounter[uiType] = uiData; - DoUseDoorOrButton(m_uiAnubDoorGUID); + DoUseDoorOrButton(GO_ARAC_ANUB_DOOR); if (uiData == DONE) - DoUseDoorOrButton(m_uiAnubGateGUID); + DoUseDoorOrButton(GO_ARAC_ANUB_GATE); break; case TYPE_FAERLINA: - DoUseDoorOrButton(m_uiFaerWebGUID); + DoUseDoorOrButton(GO_ARAC_FAER_WEB); if (uiData == IN_PROGRESS) SetSpecialAchievementCriteria(TYPE_ACHIEV_KNOCK_YOU_OUT, true); if (uiData == DONE) { - DoUseDoorOrButton(m_uiFaerDoorGUID); - DoUseDoorOrButton(m_uiMaexOuterGUID); + DoUseDoorOrButton(GO_ARAC_FAER_DOOR); + DoUseDoorOrButton(GO_ARAC_MAEX_OUTER_DOOR); } if (uiData == FAIL) { @@ -313,41 +238,41 @@ void instance_naxxramas::SetData(uint32 uiType, uint32 uiData) break; case TYPE_MAEXXNA: m_auiEncounter[uiType] = uiData; - DoUseDoorOrButton(m_uiMaexInnerGUID, uiData); + DoUseDoorOrButton(GO_ARAC_MAEX_INNER_DOOR, uiData); if (uiData == DONE) { - DoUseDoorOrButton(m_uiAracEyeRampGUID); - DoRespawnGameObject(m_uiAracPortalGUID, 30*MINUTE); + DoUseDoorOrButton(GO_ARAC_EYE_RAMP); + DoRespawnGameObject(GO_ARAC_PORTAL, 30*MINUTE); DoTaunt(); } break; case TYPE_NOTH: m_auiEncounter[uiType] = uiData; - DoUseDoorOrButton(m_uiNothEntryDoorGUID); + DoUseDoorOrButton(GO_PLAG_NOTH_ENTRY_DOOR); if (uiData == DONE) { - DoUseDoorOrButton(m_uiNothExitDoorGUID); - DoUseDoorOrButton(m_uiHeigEntryDoorGUID); + DoUseDoorOrButton(GO_PLAG_NOTH_EXIT_DOOR); + DoUseDoorOrButton(GO_PLAG_HEIG_ENTRY_DOOR); } break; case TYPE_HEIGAN: m_auiEncounter[uiType] = uiData; - DoUseDoorOrButton(m_uiHeigEntryDoorGUID); + DoUseDoorOrButton(GO_PLAG_HEIG_ENTRY_DOOR); // uncomment when eruption is implemented //if (uiData == IN_PROGRESS) // SetSpecialAchievementCriteria(TYPE_ACHIEV_SAFETY_DANCE, true); if (uiData == DONE) - DoUseDoorOrButton(m_uiHeigExitDoorGUID); + DoUseDoorOrButton(GO_PLAG_HEIG_EXIT_DOOR); break; case TYPE_LOATHEB: m_auiEncounter[uiType] = uiData; - DoUseDoorOrButton(m_uiLoathebDoorGUID); + DoUseDoorOrButton(GO_PLAG_LOAT_DOOR); if (uiData == IN_PROGRESS) SetSpecialAchievementCriteria(TYPE_ACHIEV_SPORE_LOSER, true); if (uiData == DONE) { - DoUseDoorOrButton(m_uiPlagEyeRampGUID); - DoRespawnGameObject(m_uiPlagPortalGUID, 30*MINUTE); + DoUseDoorOrButton(GO_PLAG_EYE_RAMP); + DoRespawnGameObject(GO_PLAG_PORTAL, 30*MINUTE); DoTaunt(); } break; @@ -358,41 +283,41 @@ void instance_naxxramas::SetData(uint32 uiType, uint32 uiData) switch(uiData) { case IN_PROGRESS: - DoUseDoorOrButton(m_uiGothikEntryDoorGUID); - DoUseDoorOrButton(m_uiGothCombatGateGUID); + DoUseDoorOrButton(GO_MILI_GOTH_ENTRY_GATE); + DoUseDoorOrButton(GO_MILI_GOTH_COMBAT_GATE); break; case SPECIAL: - DoUseDoorOrButton(m_uiGothCombatGateGUID); + DoUseDoorOrButton(GO_MILI_GOTH_COMBAT_GATE); break; case FAIL: if (m_auiEncounter[uiType] == IN_PROGRESS) - DoUseDoorOrButton(m_uiGothCombatGateGUID); + DoUseDoorOrButton(GO_MILI_GOTH_COMBAT_GATE); - DoUseDoorOrButton(m_uiGothikEntryDoorGUID); + DoUseDoorOrButton(GO_MILI_GOTH_ENTRY_GATE); break; case DONE: - DoUseDoorOrButton(m_uiGothikEntryDoorGUID); - DoUseDoorOrButton(m_uiGothikExitDoorGUID); - DoUseDoorOrButton(m_uiHorsemenDoorGUID); + DoUseDoorOrButton(GO_MILI_GOTH_ENTRY_GATE); + DoUseDoorOrButton(GO_MILI_GOTH_EXIT_GATE); + DoUseDoorOrButton(GO_MILI_HORSEMEN_DOOR); break; } m_auiEncounter[uiType] = uiData; break; case TYPE_FOUR_HORSEMEN: m_auiEncounter[uiType] = uiData; - DoUseDoorOrButton(m_uiHorsemenDoorGUID); + DoUseDoorOrButton(GO_MILI_HORSEMEN_DOOR); if (uiData == DONE) { - DoUseDoorOrButton(m_uiMiliEyeRampGUID); - DoRespawnGameObject(m_uiMiliPortalGUID, 30*MINUTE); - DoRespawnGameObject(m_uiHorsemenChestGUID, 30*MINUTE); + DoUseDoorOrButton(GO_MILI_EYE_RAMP); + DoRespawnGameObject(GO_MILI_PORTAL, 30*MINUTE); + DoRespawnGameObject(instance->IsRegularDifficulty() ? GO_CHEST_HORSEMEN_NORM : GO_CHEST_HORSEMEN_HERO, 30*MINUTE); DoTaunt(); } break; case TYPE_PATCHWERK: m_auiEncounter[uiType] = uiData; if (uiData == DONE) - DoUseDoorOrButton(m_uiPathExitDoorGUID); + DoUseDoorOrButton(GO_CONS_PATH_EXIT_DOOR); break; case TYPE_GROBBULUS: m_auiEncounter[uiType] = uiData; @@ -401,8 +326,8 @@ void instance_naxxramas::SetData(uint32 uiType, uint32 uiData) m_auiEncounter[uiType] = uiData; if (uiData == DONE) { - DoUseDoorOrButton(m_uiGlutExitDoorGUID); - DoUseDoorOrButton(m_uiThadDoorGUID); + DoUseDoorOrButton(GO_CONS_GLUT_EXIT_DOOR); + DoUseDoorOrButton(GO_CONS_THAD_DOOR); } break; case TYPE_THADDIUS: @@ -412,14 +337,14 @@ void instance_naxxramas::SetData(uint32 uiType, uint32 uiData) m_auiEncounter[uiType] = uiData; if (uiData != SPECIAL) - DoUseDoorOrButton(m_uiThadDoorGUID, uiData); + DoUseDoorOrButton(GO_CONS_THAD_DOOR, uiData); // Uncomment when this achievement is implemented //if (uiData == IN_PROGRESS) // SetSpecialAchievementCriteria(TYPE_ACHIEV_SHOCKING, true); if (uiData == DONE) { - DoUseDoorOrButton(m_uiConsEyeRampGUID); - DoRespawnGameObject(m_uiConsPortalGUID, 30*MINUTE); + DoUseDoorOrButton(GO_CONS_EYE_RAMP); + DoRespawnGameObject(GO_CONS_PORTAL, 30*MINUTE); DoTaunt(); } break; @@ -429,11 +354,11 @@ void instance_naxxramas::SetData(uint32 uiType, uint32 uiData) //if (uiData == IN_PROGRESS) // SetSpecialAchievementCriteria(TYPE_ACHIEV_HUNDRED_CLUB, true); if (uiData == DONE) - DoUseDoorOrButton(m_uiKelthuzadDoorGUID); + DoUseDoorOrButton(GO_KELTHUZAD_WATERFALL_DOOR); break; case TYPE_KELTHUZAD: m_auiEncounter[uiType] = uiData; - DoUseDoorOrButton(m_uiKelthuzadExitDoorGUID); + DoUseDoorOrButton(GO_KELTHUZAD_EXIT_DOOR); if (uiData == IN_PROGRESS) SetSpecialAchievementCriteria(TYPE_ACHIEV_GET_ENOUGH, false); break; @@ -493,29 +418,6 @@ uint32 instance_naxxramas::GetData(uint32 uiType) return 0; } -uint64 instance_naxxramas::GetData64(uint32 uiData) -{ - switch(uiData) - { - case NPC_ANUB_REKHAN: return m_uiAnubRekhanGUID; - case NPC_FAERLINA: return m_uiFaerlinanGUID; - case GO_MILI_GOTH_COMBAT_GATE: return m_uiGothCombatGateGUID; - case NPC_ZELIEK: return m_uiZeliekGUID; - case NPC_THANE: return m_uiThaneGUID; - case NPC_BLAUMEUX: return m_uiBlaumeuxGUID; - case NPC_RIVENDARE: return m_uiRivendareGUID; - case NPC_THADDIUS: return m_uiThaddiusGUID; - case NPC_STALAGG: return m_uiStalaggGUID; - case NPC_FEUGEN: return m_uiFeugenGUID; - case GO_CONS_NOX_TESLA_FEUGEN: return m_uiThadNoxTeslaFeugenGUID; - case GO_CONS_NOX_TESLA_STALAGG: return m_uiThadNoxTeslaStalaggGUID; - case NPC_GOTHIK: return m_uiGothikGUID; - case NPC_KELTHUZAD: return m_uiKelthuzadGUID; - default: - return 0; - } -} - void instance_naxxramas::SetSpecialAchievementCriteria(uint32 uiType, bool bIsMet) { if (uiType < MAX_SPECIAL_ACHIEV_CRITS) @@ -571,7 +473,7 @@ bool instance_naxxramas::CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Playe void instance_naxxramas::SetGothTriggers() { - Creature* pGoth = instance->GetCreature(m_uiGothikGUID); + Creature* pGoth = GetSingleCreatureFromStorage(NPC_GOTHIK); if (!pGoth) return; @@ -584,7 +486,7 @@ void instance_naxxramas::SetGothTriggers() pGt.bIsAnchorHigh = (pTrigger->GetPositionZ() >= (pGoth->GetPositionZ() - 5.0f)); pGt.bIsRightSide = IsInRightSideGothArea(pTrigger); - m_mGothTriggerMap[pTrigger->GetGUID()] = pGt; + m_mGothTriggerMap[pTrigger->GetObjectGuid()] = pGt; } } } @@ -593,7 +495,7 @@ Creature* instance_naxxramas::GetClosestAnchorForGoth(Creature* pSource, bool bR { std::list lList; - for (UNORDERED_MAP::iterator itr = m_mGothTriggerMap.begin(); itr != m_mGothTriggerMap.end(); ++itr) + for (UNORDERED_MAP::iterator itr = m_mGothTriggerMap.begin(); itr != m_mGothTriggerMap.end(); ++itr) { if (!itr->second.bIsAnchorHigh) continue; @@ -616,7 +518,7 @@ Creature* instance_naxxramas::GetClosestAnchorForGoth(Creature* pSource, bool bR void instance_naxxramas::GetGothSummonPointCreatures(std::list &lList, bool bRightSide) { - for (UNORDERED_MAP::iterator itr = m_mGothTriggerMap.begin(); itr != m_mGothTriggerMap.end(); ++itr) + for (UNORDERED_MAP::iterator itr = m_mGothTriggerMap.begin(); itr != m_mGothTriggerMap.end(); ++itr) { if (itr->second.bIsAnchorHigh) continue; @@ -631,7 +533,7 @@ void instance_naxxramas::GetGothSummonPointCreatures(std::list &lList bool instance_naxxramas::IsInRightSideGothArea(Unit* pUnit) { - if (GameObject* pCombatGate = instance->GetGameObject(m_uiGothCombatGateGUID)) + if (GameObject* pCombatGate = GetSingleGameObjectFromStorage(GO_MILI_GOTH_COMBAT_GATE)) return (pCombatGate->GetPositionY() >= pUnit->GetPositionY()); error_log("SD2: left/right side check, Gothik combat area failed."); @@ -647,7 +549,7 @@ void instance_naxxramas::SetChamberCenterCoords(float fX, float fY, float fZ) void instance_naxxramas::DoTaunt() { - Creature* pKelThuzad = instance->GetCreature(m_uiKelthuzadGUID); + Creature* pKelThuzad = GetSingleCreatureFromStorage(NPC_KELTHUZAD); if (pKelThuzad && pKelThuzad->isAlive()) { @@ -696,7 +598,7 @@ bool AreaTrigger_at_naxxramas(Player* pPlayer, AreaTriggerEntry const* pAt) if (pInstance->GetData(TYPE_KELTHUZAD) == NOT_STARTED) { - if (Creature* pKelthuzad = pInstance->instance->GetCreature(pInstance->GetData64(NPC_KELTHUZAD))) + if (Creature* pKelthuzad = pInstance->GetSingleCreatureFromStorage(NPC_KELTHUZAD)) { if (pKelthuzad->isAlive()) { @@ -713,7 +615,7 @@ bool AreaTrigger_at_naxxramas(Player* pPlayer, AreaTriggerEntry const* pAt) { if (pInstance->GetData(TYPE_THADDIUS) == NOT_STARTED) { - if (Creature* pThaddius = pInstance->instance->GetCreature(pInstance->GetData64(NPC_THADDIUS))) + if (Creature* pThaddius = pInstance->GetSingleCreatureFromStorage(NPC_THADDIUS)) { pInstance->SetData(TYPE_THADDIUS, SPECIAL); DoScriptText(SAY_THADDIUS_GREET, pThaddius); diff --git a/scripts/northrend/naxxramas/naxxramas.h b/scripts/northrend/naxxramas/naxxramas.h index 5fb987ae2..a7aa1b55c 100644 --- a/scripts/northrend/naxxramas/naxxramas.h +++ b/scripts/northrend/naxxramas/naxxramas.h @@ -78,7 +78,7 @@ enum NPC_SPECT_RIDER = 16150, NPC_SPECT_HORSE = 16149, - // End boss adds + // Kel'Thuzad NPC_SOLDIER_FROZEN = 16427, NPC_UNSTOPPABLE_ABOM = 16428, NPC_SOUL_WEAVER = 16429, @@ -188,7 +188,6 @@ class MANGOS_DLL_DECL instance_naxxramas : public ScriptedInstance void SetData(uint32 uiType, uint32 uiData); uint32 GetData(uint32 uiType); - uint64 GetData64(uint32 uiData); void SetSpecialAchievementCriteria(uint32 uiType, bool bIsMet); bool CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/); @@ -215,64 +214,12 @@ class MANGOS_DLL_DECL instance_naxxramas : public ScriptedInstance bool m_abAchievCriteria[MAX_SPECIAL_ACHIEV_CRITS]; std::string strInstData; - uint64 m_uiAracEyeRampGUID; - uint64 m_uiPlagEyeRampGUID; - uint64 m_uiMiliEyeRampGUID; - uint64 m_uiConsEyeRampGUID; - - uint64 m_uiAracPortalGUID; - uint64 m_uiPlagPortalGUID; - uint64 m_uiMiliPortalGUID; - uint64 m_uiConsPortalGUID; - - uint64 m_uiAnubRekhanGUID; - uint64 m_uiFaerlinanGUID; - - uint64 m_uiZeliekGUID; - uint64 m_uiThaneGUID; - uint64 m_uiBlaumeuxGUID; - uint64 m_uiRivendareGUID; - - uint64 m_uiThaddiusGUID; - uint64 m_uiStalaggGUID; - uint64 m_uiFeugenGUID; - - uint64 m_uiKelthuzadGUID; - - uint64 m_uiPathExitDoorGUID; - uint64 m_uiGlutExitDoorGUID; - - uint64 m_uiThadDoorGUID; GUIDList m_lThadTeslaCoilList; - uint64 m_uiThadNoxTeslaFeugenGUID; - uint64 m_uiThadNoxTeslaStalaggGUID; - - uint64 m_uiAnubDoorGUID; - uint64 m_uiAnubGateGUID; - uint64 m_uiFaerDoorGUID; - uint64 m_uiFaerWebGUID; - uint64 m_uiMaexOuterGUID; - uint64 m_uiMaexInnerGUID; + GUIDList m_lFaerlinaAddGUIDs; - uint64 m_uiGothikGUID; - uint64 m_uiGothCombatGateGUID; - uint64 m_uiGothikEntryDoorGUID; - uint64 m_uiGothikExitDoorGUID; GUIDList m_lGothTriggerList; - UNORDERED_MAP m_mGothTriggerMap; - - uint64 m_uiHorsemenDoorGUID; - uint64 m_uiHorsemenChestGUID; - - uint64 m_uiNothEntryDoorGUID; - uint64 m_uiNothExitDoorGUID; - uint64 m_uiHeigEntryDoorGUID; - uint64 m_uiHeigExitDoorGUID; - uint64 m_uiLoathebDoorGUID; - - uint64 m_uiKelthuzadDoorGUID; - uint64 m_uiKelthuzadExitDoorGUID; + UNORDERED_MAP m_mGothTriggerMap; float m_fChamberCenterX; float m_fChamberCenterY; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 73d666f8f..77ffce812 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2142" + #define SD2_REVISION_NR "2143" #endif // __SD2_REVISION_NR_H__ From 6dc9425e0da66feeded1b8e05b21abac4706e211 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Tue, 31 May 2011 01:41:56 +0200 Subject: [PATCH 0123/1172] [2144] Add DoSimulateText function, Requires MaNGOS Rev [11575] * Also add some more comments to ScriptMgr.cpp * Add a wrapper for this function to ScriptedInstance class * Add a bool param to GetSingleCreatureFromStorage to prevent debug output (simulated text is expected to often operate for not loaded Creatures) --- ScriptMgr.cpp | 67 +++++++++++++++++++++++++++++++++++++++++ ScriptMgr.h | 1 + include/sc_instance.cpp | 5 +-- include/sc_instance.h | 9 +++++- sd2_revision_nr.h | 2 +- 5 files changed, 80 insertions(+), 4 deletions(-) diff --git a/ScriptMgr.cpp b/ScriptMgr.cpp index 547afce96..f807c293b 100644 --- a/ScriptMgr.cpp +++ b/ScriptMgr.cpp @@ -127,6 +127,13 @@ void InitScriptLibrary() //********************************* //*** Functions used globally *** +/** + * Function that does script text + * + * @param iTextEntry Entry of the text, stored in SD2-database + * @param pSource Source of the text + * @param pTarget Can be NULL (depending on CHAT_TYPE of iTextEntry). Possible target for the text + */ void DoScriptText(int32 iTextEntry, WorldObject* pSource, Unit* pTarget) { if (!pSource) @@ -210,6 +217,66 @@ void DoScriptText(int32 iTextEntry, WorldObject* pSource, Unit* pTarget) } } +/** + * Function that either simulates or does script text for a map + * + * @param iTextEntry Entry of the text, stored in SD2-database, only type CHAT_TYPE_ZONE_YELL supported + * @param uiCreatureEntry Id of the creature of whom saying will be simulated + * @param pMap Given Map on which the map-wide text is displayed + * @param pCreatureSource Can be NULL. If pointer to Creature is given, then the creature does the map-wide text + * @param pTarget Can be NULL. Possible target for the text + */ +void DoOrSimulateScriptTextForMap(int32 iTextEntry, uint32 uiCreatureEntry, Map* pMap, Creature* pCreatureSource /*=NULL*/, Unit* pTarget /*=NULL*/) +{ + if (!pMap) + { + error_log("SD2: DoOrSimulateScriptTextForMap entry %i, invalid Map pointer.", iTextEntry); + return; + } + + if (iTextEntry >= 0) + { + error_log("SD2: DoOrSimulateScriptTextForMap with source entry %u for map %u attempts to process text entry %i, but text entry must be negative.", uiCreatureEntry, pMap->GetId(), iTextEntry); + return; + } + + CreatureInfo const* pInfo = GetCreatureTemplateStore(uiCreatureEntry); + if (!pInfo) + { + error_log("SD2: DoOrSimulateScriptTextForMap has invalid source entry %u for map %u.", uiCreatureEntry, pMap->GetId()); + return; + } + + const StringTextData* pData = pSystemMgr.GetTextData(iTextEntry); + + if (!pData) + { + error_log("SD2: DoOrSimulateScriptTextForMap with source entry %u for map %u could not find text entry %i.", uiCreatureEntry, pMap->GetId(), iTextEntry); + return; + } + + debug_log("SD2: DoOrSimulateScriptTextForMap: text entry=%i, Sound=%u, Type=%u, Language=%u, Emote=%u", + iTextEntry, pData->uiSoundId, pData->uiType, pData->uiLanguage, pData->uiEmote); + + if (pData->uiSoundId) + { + if (GetSoundEntriesStore()->LookupEntry(pData->uiSoundId)) + pMap->PlayDirectSoundToMap(pData->uiSoundId); + else + error_log("SD2: DoOrSimulateScriptTextForMap entry %i tried to process invalid sound id %u.", iTextEntry, pData->uiSoundId); + } + + if (pData->uiType == CHAT_TYPE_ZONE_YELL) + { + if (pCreatureSource) // If provided pointer for sayer, use direct version + pMap->MonsterYellToMap(pCreatureSource->GetObjectGuid(), iTextEntry, pData->uiLanguage, pTarget); + else // Simulate yell + pMap->MonsterYellToMap(pInfo, iTextEntry, pData->uiLanguage, pTarget); + } + else + error_log("SD2: DoSimulateScriptTextForMap entry %i has not supported chat type %u.", iTextEntry, pData->uiType); +} + //********************************* //*** Functions used internally *** diff --git a/ScriptMgr.h b/ScriptMgr.h index c4a1c1040..f4036e6c2 100644 --- a/ScriptMgr.h +++ b/ScriptMgr.h @@ -113,6 +113,7 @@ struct Script // Generic scripting text function void DoScriptText(int32 iTextEntry, WorldObject* pSource, Unit* pTarget = NULL); +void DoOrSimulateScriptTextForMap(int32 iTextEntry, uint32 uiCreatureEntry, Map* pMap, Creature* pCreatureSource = NULL, Unit* pTarget = NULL); // ********************************************************* // **************** Internal hook mechanics **************** diff --git a/include/sc_instance.cpp b/include/sc_instance.cpp index f98878519..b341ad7d4 100644 --- a/include/sc_instance.cpp +++ b/include/sc_instance.cpp @@ -129,14 +129,15 @@ GameObject* ScriptedInstance::GetSingleGameObjectFromStorage(uint32 uiEntry) } /// Returns a pointer to a loaded Creature that was stored in m_mGoEntryGuidStore. Can return NULL -Creature* ScriptedInstance::GetSingleCreatureFromStorage(uint32 uiEntry) +Creature* ScriptedInstance::GetSingleCreatureFromStorage(uint32 uiEntry, bool bSkipDebugLog /*=false*/) { EntryGuidMap::iterator find = m_mNpcEntryGuidStore.find(uiEntry); if (find != m_mNpcEntryGuidStore.end()) return instance->GetCreature(find->second); // Output log, possible reason is not added GO to map, or not yet loaded; - debug_log("SD2: Script requested creature with entry %u, but no npc of this entry was created yet, or it was not stored by script for map %u.", uiEntry, instance->GetId()); + if (!bSkipDebugLog) + debug_log("SD2: Script requested creature with entry %u, but no npc of this entry was created yet, or it was not stored by script for map %u.", uiEntry, instance->GetId()); return NULL; } diff --git a/include/sc_instance.h b/include/sc_instance.h index 318b07e10..3d1450a5b 100644 --- a/include/sc_instance.h +++ b/include/sc_instance.h @@ -31,7 +31,7 @@ class MANGOS_DLL_DECL ScriptedInstance : public InstanceData // Default accessor functions GameObject* GetSingleGameObjectFromStorage(uint32 uiEntry); - Creature* GetSingleCreatureFromStorage(uint32 uiEntry); + Creature* GetSingleCreatureFromStorage(uint32 uiEntry, bool bSkipDebugLog = false); // Change active state of doors or buttons void DoUseDoorOrButton(ObjectGuid guid, uint32 uiWithRestoreTime = 0, bool bUseAlternativeState = false); @@ -47,6 +47,13 @@ class MANGOS_DLL_DECL ScriptedInstance : public InstanceData // Get a Player from map Player* GetPlayerInMap(bool bOnlyAlive = false, bool bCanBeGamemaster = true); + /// Wrapper for simulating map-wide text in this instance. It is expected that the Creature is stored in m_mNpcEntryGuidStore if loaded. + void DoOrSimulateScriptTextForThisInstance(int32 iTextEntry, uint32 uiCreatureEntry) + { + // Prevent debug output in GetSingleCreatureFromStorage + DoOrSimulateScriptTextForMap(iTextEntry, uiCreatureEntry, instance, GetSingleCreatureFromStorage(uiCreatureEntry, true)); + } + protected: // Storage for GO-Guids and NPC-Guids EntryGuidMap m_mGoEntryGuidStore; ///< Store unique GO-Guids by entry diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 77ffce812..468c6a2b2 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2143" + #define SD2_REVISION_NR "2144" #endif // __SD2_REVISION_NR_H__ From 80b4ddd3756c326a1e5c167ea70b6fe4d495d0eb Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Tue, 31 May 2011 11:14:31 +0200 Subject: [PATCH 0124/1172] [2145] Use DoOrSimulateScriptTextForThisInstance for Kel'Thuzad Taunts in Naxxramas --- .../naxxramas/instance_naxxramas.cpp | 20 +++++++++---------- sd2_revision_nr.h | 2 +- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/scripts/northrend/naxxramas/instance_naxxramas.cpp b/scripts/northrend/naxxramas/instance_naxxramas.cpp index 664c50ccc..59bcc5e6b 100644 --- a/scripts/northrend/naxxramas/instance_naxxramas.cpp +++ b/scripts/northrend/naxxramas/instance_naxxramas.cpp @@ -549,30 +549,28 @@ void instance_naxxramas::SetChamberCenterCoords(float fX, float fY, float fZ) void instance_naxxramas::DoTaunt() { - Creature* pKelThuzad = GetSingleCreatureFromStorage(NPC_KELTHUZAD); - - if (pKelThuzad && pKelThuzad->isAlive()) + if (m_auiEncounter[TYPE_KELTHUZAD] != DONE) { uint8 uiWingsCleared = 0; - if (m_auiEncounter[2] == DONE) + if (m_auiEncounter[TYPE_MAEXXNA] == DONE) ++uiWingsCleared; - if (m_auiEncounter[5] == DONE) + if (m_auiEncounter[TYPE_LOATHEB] == DONE) ++uiWingsCleared; - if (m_auiEncounter[8] == DONE) + if (m_auiEncounter[TYPE_FOUR_HORSEMEN] == DONE) ++uiWingsCleared; - if (m_auiEncounter[12] == DONE) + if (m_auiEncounter[TYPE_THADDIUS] == DONE) ++uiWingsCleared; switch(uiWingsCleared) { - case 1: DoScriptText(SAY_KELTHUZAD_TAUNT1, pKelThuzad); break; - case 2: DoScriptText(SAY_KELTHUZAD_TAUNT2, pKelThuzad); break; - case 3: DoScriptText(SAY_KELTHUZAD_TAUNT3, pKelThuzad); break; - case 4: DoScriptText(SAY_KELTHUZAD_TAUNT4, pKelThuzad); break; + case 1: DoOrSimulateScriptTextForThisInstance(SAY_KELTHUZAD_TAUNT1, NPC_KELTHUZAD); break; + case 2: DoOrSimulateScriptTextForThisInstance(SAY_KELTHUZAD_TAUNT2, NPC_KELTHUZAD); break; + case 3: DoOrSimulateScriptTextForThisInstance(SAY_KELTHUZAD_TAUNT3, NPC_KELTHUZAD); break; + case 4: DoOrSimulateScriptTextForThisInstance(SAY_KELTHUZAD_TAUNT4, NPC_KELTHUZAD); break; } } } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 468c6a2b2..c4bfd565c 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2144" + #define SD2_REVISION_NR "2145" #endif // __SD2_REVISION_NR_H__ From 53331cb959977b3378c4e49fcb7f82963c81baf7 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Tue, 31 May 2011 03:03:24 +0200 Subject: [PATCH 0125/1172] [2146] Implement Mr. Bigglesworth Event, Requires MaNGOS 11576 --- scripts/northrend/naxxramas/instance_naxxramas.cpp | 6 ++++++ scripts/northrend/naxxramas/naxxramas.h | 3 +++ sd2_revision_nr.h | 2 +- sql/scriptdev2_script_full.sql | 4 ++-- sql/updates/r2146_scriptdev2.sql | 3 +++ 5 files changed, 15 insertions(+), 3 deletions(-) create mode 100644 sql/updates/r2146_scriptdev2.sql diff --git a/scripts/northrend/naxxramas/instance_naxxramas.cpp b/scripts/northrend/naxxramas/instance_naxxramas.cpp index 59bcc5e6b..3f84aa777 100644 --- a/scripts/northrend/naxxramas/instance_naxxramas.cpp +++ b/scripts/northrend/naxxramas/instance_naxxramas.cpp @@ -197,6 +197,12 @@ void instance_naxxramas::OnPlayerDeath(Player* pPlayer) SetSpecialAchievementCriteria(TYPE_ACHIEV_SAFETY_DANCE, false); } +void instance_naxxramas::OnCreatureDeath(Creature* pCreature) +{ + if (pCreature->GetEntry() == NPC_MR_BIGGLESWORTH && m_auiEncounter[TYPE_KELTHUZAD] != DONE) + DoOrSimulateScriptTextForThisInstance(SAY_KELTHUZAD_CAT_DIED, NPC_KELTHUZAD); +} + bool instance_naxxramas::IsEncounterInProgress() const { for (uint8 i = 0; i < TYPE_KELTHUZAD; ++i) diff --git a/scripts/northrend/naxxramas/naxxramas.h b/scripts/northrend/naxxramas/naxxramas.h index a7aa1b55c..c221c0c32 100644 --- a/scripts/northrend/naxxramas/naxxramas.h +++ b/scripts/northrend/naxxramas/naxxramas.h @@ -12,6 +12,7 @@ enum // A few instance-script related texts SAY_THADDIUS_GREET = -1533029, // Kel'Thuzad's taunts after killing Wing Bosses + SAY_KELTHUZAD_CAT_DIED = -1533089, SAY_KELTHUZAD_TAUNT1 = -1533090, SAY_KELTHUZAD_TAUNT2 = -1533091, SAY_KELTHUZAD_TAUNT3 = -1533092, @@ -62,6 +63,7 @@ enum NPC_RIVENDARE = 30549, NPC_KELTHUZAD = 15990, + NPC_MR_BIGGLESWORTH = 16998, // Faerlina NPC_NAXXRAMAS_FOLLOWER = 16505, @@ -185,6 +187,7 @@ class MANGOS_DLL_DECL instance_naxxramas : public ScriptedInstance void OnObjectCreate(GameObject* pGo); void OnPlayerDeath(Player* pPlayer); + void OnCreatureDeath(Creature* pCreature); void SetData(uint32 uiType, uint32 uiData); uint32 GetData(uint32 uiType); diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index c4bfd565c..4a2c3d2d0 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2145" + #define SD2_REVISION_NR "2146" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 675affa24..d74191728 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -3,7 +3,7 @@ -- DELETE FROM sd2_db_version; -INSERT INTO sd2_db_version (version) VALUES ('ScriptDev2 (for MaNGOS 11558+) '); +INSERT INTO sd2_db_version (version) VALUES ('ScriptDev2 (for MaNGOS 11576+) '); -- -- Below contains data for table `script_texts` mainly used in C++ parts. @@ -1427,7 +1427,7 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1533086,'I see no complications... Wait... What is this?',14468,1,0,0,'kelthuzad SAY_SAPP_DIALOG3'), (-1533087,'Your security measures have failed! See to this interruption immediately!',8882,1,0,0,'kelthuzad SAY_SAPP_DIALOG4_LICH'), (-1533088,'Yes, master!',14469,1,0,0,'kelthuzad SAY_SAPP_DIALOG5'), -(-1533089,'No!!! A curse upon you, interlopers! The armies of the Lich King will hunt you down. You will not escape your fate...',14484,1,0,0,'kelthuzad SAY_CAT_DIED'), +(-1533089,'No!!! A curse upon you, interlopers! The armies of the Lich King will hunt you down. You will not escape your fate...',14484,6,0,0,'kelthuzad SAY_CAT_DIED'), (-1533090,'Who dares violate the sanctity of my domain? Be warned, all who trespass here are doomed.',14463,6,0,0,'kelthuzad SAY_TAUNT1'), (-1533091,'Fools, you think yourselves triumphant? You have only taken one step closer to the abyss! ',14464,6,0,0,'kelthuzad SAY_TAUNT2'), (-1533092,'I grow tired of these games. Proceed, and I will banish your souls to oblivion!',14465,6,0,0,'kelthuzad SAY_TAUNT3'), diff --git a/sql/updates/r2146_scriptdev2.sql b/sql/updates/r2146_scriptdev2.sql new file mode 100644 index 000000000..fea90a6ca --- /dev/null +++ b/sql/updates/r2146_scriptdev2.sql @@ -0,0 +1,3 @@ +UPDATE sd2_db_version SET version='ScriptDev2 (for MaNGOS 11576+) '; + +UPDATE script_texts SET type=6 WHERE entry=-1533089; From d151500fc277b299d3c5efc93092eeed546d0c1c Mon Sep 17 00:00:00 2001 From: Xfurry Date: Tue, 31 May 2011 15:34:19 +0200 Subject: [PATCH 0126/1172] [2147] Implement Hakkar Summon Event Some of the mobs need Acid and DB-tuning Any additional information about this event is welcome, much is rather guesswork than solid state! Signed-off-by: Schmoozerd --- .../sunken_temple/instance_sunken_temple.cpp | 260 ++++++++++++++++-- .../sunken_temple/sunken_temple.cpp | 82 ++++++ .../sunken_temple/sunken_temple.h | 49 +++- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 5 + sql/scriptdev2_script_full.sql | 8 +- sql/updates/r2147_mangos.sql | 5 + sql/updates/r2147_scriptdev2.sql | 7 + 8 files changed, 394 insertions(+), 24 deletions(-) create mode 100644 sql/updates/r2147_mangos.sql create mode 100644 sql/updates/r2147_scriptdev2.sql diff --git a/scripts/eastern_kingdoms/sunken_temple/instance_sunken_temple.cpp b/scripts/eastern_kingdoms/sunken_temple/instance_sunken_temple.cpp index 2e4e3a54c..7c2f37b8f 100644 --- a/scripts/eastern_kingdoms/sunken_temple/instance_sunken_temple.cpp +++ b/scripts/eastern_kingdoms/sunken_temple/instance_sunken_temple.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: instance_sunken_temple -SD%Complete: 50 -SDComment: Hakkar Summon Event missing +SD%Complete: 90 +SDComment: Hakkar Summon Event needs more sources to improve SDCategory: Sunken Temple EndScriptData */ @@ -30,7 +30,15 @@ instance_sunken_temple::instance_sunken_temple(Map* pMap) : ScriptedInstance(pMa m_uiJammalanBarrierGUID(0), m_uiIdolOfHakkarGUID(0), m_uiStatueCounter(0), - m_uiProtectorsRemaining(0) + m_uiShadeGUID(0), + m_uiAvatarDoor1GUID(0), + m_uiAvatarDoor2GUID(0), + m_uiAvatarSummonTimer(0), + m_uiSupressorTimer(0), + m_uiFlameCounter(0), + m_uiProtectorsRemaining(0), + m_bCanSummonBloodkeeper(false), + m_bIsFirstHakkarWave(false) { Initialize(); } @@ -55,6 +63,21 @@ void instance_sunken_temple::OnObjectCreate(GameObject* pGo) case GO_ATALAI_LIGHT_BIG: m_luiBigLightGUIDs.push_back(pGo->GetGUID()); break; + case GO_HAKKAR_DOOR_1: + m_uiAvatarDoor1GUID = pGo->GetGUID(); + break; + case GO_HAKKAR_DOOR_2: + m_uiAvatarDoor2GUID = pGo->GetGUID(); + break; + case GO_EVIL_CIRCLE: + m_vuiCircleGUIDs.push_back(pGo->GetGUID()); + break; + case GO_ETERNAL_FLAME_1: + case GO_ETERNAL_FLAME_2: + case GO_ETERNAL_FLAME_3: + case GO_ETERNAL_FLAME_4: + m_luiFlameGUIDs.push_back(pGo->GetGUID()); + break; } } @@ -79,12 +102,30 @@ void instance_sunken_temple::OnCreatureCreate(Creature* pCreature) } } +void instance_sunken_temple::OnCreatureEvade(Creature* pCreature) +{ + switch (pCreature->GetEntry()) + { + // Hakkar Event Mobs: On Wipe set as failed! + case NPC_BLOODKEEPER: + case NPC_HAKKARI_MINION: + case NPC_SUPPRESSOR: + case NPC_AVATAR_OF_HAKKAR: + SetData(TYPE_AVATAR, FAIL); + break; + } +} + void instance_sunken_temple::OnCreatureDeath(Creature* pCreature) { switch (pCreature->GetEntry()) { - case NPC_ATALARION: SetData(TYPE_ATALARION, DONE); break; - case NPC_JAMMALAN: SetData(TYPE_JAMMALAN, DONE); break; + case NPC_ATALARION: SetData(TYPE_ATALARION, DONE); break; + case NPC_JAMMALAN: SetData(TYPE_JAMMALAN, DONE); break; + case NPC_AVATAR_OF_HAKKAR: SetData(TYPE_AVATAR, DONE); break; + + case NPC_SUPPRESSOR: m_bCanSummonBloodkeeper = true; break; + // Jammalain mini-bosses case NPC_ZOLO: case NPC_GASHER: @@ -125,6 +166,87 @@ void instance_sunken_temple::SetData(uint32 uiType, uint32 uiData) break; case TYPE_MALFURION: m_auiEncounter[3] = uiData; + break; + case TYPE_AVATAR: + if (uiData == SPECIAL) + { + ++m_uiFlameCounter; + + Creature* pShade = instance->GetCreature(m_uiShadeGUID); + if (!pShade) + return; + + switch (m_uiFlameCounter) + { + // Yells on each flame + // TODO It might be possible that these yells should be ordered randomly, however this is the seen state + case 1: DoScriptText(SAY_AVATAR_BRAZIER_1, pShade); break; + case 2: DoScriptText(SAY_AVATAR_BRAZIER_2, pShade); break; + case 3: DoScriptText(SAY_AVATAR_BRAZIER_3, pShade); break; + // Summon the avatar of all flames are used + case MAX_FLAMES: + DoScriptText(SAY_AVATAR_BRAZIER_4, pShade); + pShade->CastSpell(pShade, SPELL_SUMMON_AVATAR, true); + m_uiAvatarSummonTimer = 0; + m_uiSupressorTimer = 0; + break; + } + + // Summon the suppressors only after the flames are doused + // Summon timer is confusing random; timers were: 13, 39 and 52 secs; + if (m_uiFlameCounter != MAX_FLAMES) + m_uiSupressorTimer = urand(15000, 45000); + + return; + } + + // Prevent double processing + if (m_auiEncounter[4] == uiData) + return; + + if (uiData == IN_PROGRESS) + { + m_uiSupressorTimer = 0; + DoUpdateFlamesFlags(false); + + // Summon timer; use a small delay + m_uiAvatarSummonTimer = 3000; + m_bIsFirstHakkarWave = true; + + // Summon the shade + Player* pPlayer = GetPlayerInMap(); + if (!pPlayer) + return; + + if (Creature* pShade = pPlayer->SummonCreature(NPC_SHADE_OF_HAKKAR, aSunkenTempleLocation[1].m_fX, aSunkenTempleLocation[1].m_fY, aSunkenTempleLocation[1].m_fZ, aSunkenTempleLocation[1].m_fO, TEMPSUMMON_MANUAL_DESPAWN, 0)) + { + m_uiShadeGUID = pShade->GetGUID(); + pShade->SetRespawnDelay(DAY); + } + + // Respawn circles + for (GUIDVector::const_iterator itr = m_vuiCircleGUIDs.begin(); itr != m_vuiCircleGUIDs.end(); ++itr) + DoRespawnGameObject(*itr, 30*MINUTE); + } + else if (uiData == FAIL) + { + // In case of wipe during the summoning ritual the shade is despawned + // The trash mobs stay in place, they are not despawned; the avatar is not sure if it's despawned or not but most likely he'll stay in place + + // Despawn the shade and the avatar if needed -- TODO, avatar really? + if (Creature* pShade = instance->GetCreature(m_uiShadeGUID)) + pShade->ForcedDespawn(); + + // Reset flames + DoUpdateFlamesFlags(true); + } + + // Use combat doors + DoUseDoorOrButton(m_uiAvatarDoor1GUID); + DoUseDoorOrButton(m_uiAvatarDoor2GUID); + + m_auiEncounter[4] = uiData; + break; } @@ -134,7 +256,9 @@ void instance_sunken_temple::SetData(uint32 uiType, uint32 uiData) std::ostringstream saveStream; - saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2] << " " << m_auiEncounter[3]; + saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2] << " " + << m_auiEncounter[3] << " " << m_auiEncounter[4]; + strInstData = saveStream.str(); SaveToDB(); @@ -144,7 +268,7 @@ void instance_sunken_temple::SetData(uint32 uiType, uint32 uiData) void instance_sunken_temple::DoSpawnAtalarionIfCan() { - // return if already summoned + // Return if already summoned if (m_uiAtalarionGUID) return; @@ -159,7 +283,7 @@ void instance_sunken_temple::DoSpawnAtalarionIfCan() // Spawn the big green lights for (GUIDList::const_iterator itr = m_luiBigLightGUIDs.begin(); itr != m_luiBigLightGUIDs.end(); ++itr) - DoRespawnGameObject(*itr, 30*MINUTE*IN_MILLISECONDS); + DoRespawnGameObject(*itr, 30*MINUTE); } bool instance_sunken_temple::ProcessStatueEvent(uint32 uiEventId) @@ -189,6 +313,21 @@ bool instance_sunken_temple::ProcessStatueEvent(uint32 uiEventId) return true; } +void instance_sunken_temple::DoUpdateFlamesFlags(bool bRestore) +{ + for (GUIDList::const_iterator itr = m_luiFlameGUIDs.begin(); itr != m_luiFlameGUIDs.end(); ++itr) + { + if (GameObject* pFlame = instance->GetGameObject(*itr)) + { + // Remove the flags of the flames for Hakkar event + if (!bRestore) + pFlame->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NO_INTERACT); + else + pFlame->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NO_INTERACT); + } + } +} + void instance_sunken_temple::Load(const char* chrIn) { if (!chrIn) @@ -200,7 +339,7 @@ void instance_sunken_temple::Load(const char* chrIn) OUT_LOAD_INST_DATA(chrIn); std::istringstream loadStream(chrIn); - loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3]; + loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3] >> m_auiEncounter[4]; for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) { @@ -216,16 +355,101 @@ uint32 instance_sunken_temple::GetData(uint32 uiType) { switch(uiType) { - case TYPE_ATALARION: - return m_auiEncounter[0]; - case TYPE_PROTECTORS: - return m_auiEncounter[1]; - case TYPE_JAMMALAN: - return m_auiEncounter[2]; - case TYPE_MALFURION: - return m_auiEncounter[3]; + case TYPE_ATALARION: return m_auiEncounter[0]; + case TYPE_PROTECTORS: return m_auiEncounter[1]; + case TYPE_JAMMALAN: return m_auiEncounter[2]; + case TYPE_MALFURION: return m_auiEncounter[3]; + case TYPE_AVATAR: return m_auiEncounter[4]; + + default: + return 0; + } +} + +void instance_sunken_temple::Update(uint32 uiDiff) +{ + if (m_auiEncounter[4] != IN_PROGRESS) + return; + + // Summon random mobs around the circles + if (m_uiAvatarSummonTimer) + { + if (m_uiAvatarSummonTimer <= uiDiff) + { + Creature* pShade = instance->GetCreature(m_uiShadeGUID); + if (!pShade) + return; + + // If no summon circles are spawned then return + if (m_vuiCircleGUIDs.empty()) + return; + + if (m_bIsFirstHakkarWave) // First wave summoned + { + // Summon at all circles + for (std::vector::const_iterator itr = m_vuiCircleGUIDs.begin(); itr != m_vuiCircleGUIDs.end(); ++itr) + { + if (GameObject* pCircle = instance->GetGameObject(*itr)) + pShade->SummonCreature(NPC_HAKKARI_MINION, pCircle->GetPositionX(), pCircle->GetPositionY(), pCircle->GetPositionZ(), 0, TEMPSUMMON_DEAD_DESPAWN, 0); + } + + // Summon Bloodkeeper at random circle + if (GameObject* pCircle = instance->GetGameObject(m_vuiCircleGUIDs[urand(0, m_vuiCircleGUIDs.size() - 1)])) + pShade->SummonCreature(NPC_BLOODKEEPER, pCircle->GetPositionX(), pCircle->GetPositionY(), pCircle->GetPositionZ(), 0, TEMPSUMMON_DEAD_DESPAWN, 0); + + m_bCanSummonBloodkeeper = false; + m_bIsFirstHakkarWave = false; + m_uiAvatarSummonTimer = 50000; + } + else // Later wave + { + uint32 uiRoll = urand(0, 99); + uint8 uiMaxSummons = uiRoll < 75 ? 1 : uiRoll < 95 ? 2 : 3; + + if (m_bCanSummonBloodkeeper && roll_chance_i(30)) + { + // Summon a Bloodkeeper + if (GameObject* pCircle = instance->GetGameObject(m_vuiCircleGUIDs[urand(0, m_vuiCircleGUIDs.size() - 1)])) + pShade->SummonCreature(NPC_BLOODKEEPER, pCircle->GetPositionX(), pCircle->GetPositionY(), pCircle->GetPositionZ(), 0, TEMPSUMMON_DEAD_DESPAWN, 0); + + m_bCanSummonBloodkeeper = false; + --uiMaxSummons; + } + + for (uint8 i = 0; i < uiMaxSummons; ++i) + { + if (GameObject* pCircle = instance->GetGameObject(m_vuiCircleGUIDs[urand(0, m_vuiCircleGUIDs.size() - 1)])) + pShade->SummonCreature(NPC_HAKKARI_MINION, pCircle->GetPositionX(), pCircle->GetPositionY(), pCircle->GetPositionZ(), 0, TEMPSUMMON_DEAD_DESPAWN, 0); + } + m_uiAvatarSummonTimer = urand(3000, 15000); + } + } + else + m_uiAvatarSummonTimer -= uiDiff; + } + + // Summon nightmare suppressor after flame used + if (m_uiSupressorTimer) + { + if (m_uiSupressorTimer <= uiDiff) + { + Creature* pShade = instance->GetCreature(m_uiShadeGUID); + if (!pShade) + { + // Something went very wrong! + return; + } + + // Summon npc at random door; movement and script handled in DB + uint8 uiSummonLoc = urand(0, 1); + pShade->SummonCreature(NPC_SUPPRESSOR, aHakkariDoorLocations[uiSummonLoc].m_fX, aHakkariDoorLocations[uiSummonLoc].m_fY, aHakkariDoorLocations[uiSummonLoc].m_fZ, 0, TEMPSUMMON_DEAD_DESPAWN, 0); + + // This timer is finished now + m_uiSupressorTimer = 0; + } + else + m_uiSupressorTimer -= uiDiff; } - return 0; } InstanceData* GetInstanceData_instance_sunken_temple(Map* pMap) diff --git a/scripts/eastern_kingdoms/sunken_temple/sunken_temple.cpp b/scripts/eastern_kingdoms/sunken_temple/sunken_temple.cpp index 2be0e1e17..b22990cc5 100644 --- a/scripts/eastern_kingdoms/sunken_temple/sunken_temple.cpp +++ b/scripts/eastern_kingdoms/sunken_temple/sunken_temple.cpp @@ -25,6 +25,9 @@ EndScriptData */ at_shade_of_eranikus npc_malfurion_stormrage event_antalarion_statue_activation +event_avatar_of_hakkar +go_eternal_flame +effectDummy_summon_hakkar EndContentData */ #include "precompiled.h" @@ -175,6 +178,70 @@ bool ProcessEventId_event_antalarion_statue_activation(uint32 uiEventId, Object* return false; } +/*###### +## event_avatar_of_hakkar +######*/ +bool ProcessEventId_event_avatar_of_hakkar(uint32 uiEventId, Object* pSource, Object* pTarget, bool bIsStart) +{ + if (pSource->GetTypeId() == TYPEID_PLAYER) + { + if (instance_sunken_temple* pInstance = (instance_sunken_temple*)((Player*)pSource)->GetInstanceData()) + { + // return if not NOT_STARTED + if (pInstance->GetData(TYPE_AVATAR) != NOT_STARTED) + return true; + + pInstance->SetData(TYPE_AVATAR, IN_PROGRESS); + + return true; + } + } + return false; +} + +/*###### +## go_eternal_flame +######*/ +bool GOUse_go_eternal_flame(Player* pPlayer, GameObject* pGo) +{ + instance_sunken_temple* pInstance = (instance_sunken_temple*)pGo->GetInstanceData(); + + if (!pInstance) + return false; + + if (pInstance->GetData(TYPE_AVATAR) != IN_PROGRESS) + return false; + + // Set data to special when flame is used + pInstance->SetData(TYPE_AVATAR, SPECIAL); + pGo->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NO_INTERACT); + + return true; +} + +/*###### +## effectDummy_summon_hakkar +######*/ +bool EffectDummyCreature_summon_hakkar(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) +{ + // Always check spellid and effectindex + if (uiSpellId == SPELL_SUMMON_AVATAR && uiEffIndex == EFFECT_INDEX_0) + { + if (!pCaster || pCaster->GetTypeId() != TYPEID_UNIT) + return true; + + // Update entry to avatar of Hakkar and cast some visuals + ((Creature*)pCaster)->UpdateEntry(NPC_AVATAR_OF_HAKKAR); + pCaster->CastSpell(pCaster, SPELL_AVATAR_SUMMONED, true); + DoScriptText(SAY_AVATAR_SPAWN, pCaster); + + // Always return true when we are handling this spell and effect + return true; + } + + return false; +} + void AddSC_sunken_temple() { Script* pNewScript; @@ -193,4 +260,19 @@ void AddSC_sunken_temple() pNewScript->Name = "event_antalarion_statue_activation"; pNewScript->pProcessEventId = &ProcessEventId_event_antalarion_statue_activation; pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "event_avatar_of_hakkar"; + pNewScript->pProcessEventId = &ProcessEventId_event_avatar_of_hakkar; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "go_eternal_flame"; + pNewScript->pGOUse = &GOUse_go_eternal_flame; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_shade_of_hakkar"; + pNewScript->pEffectDummyNPC = &EffectDummyCreature_summon_hakkar; + pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/sunken_temple/sunken_temple.h b/scripts/eastern_kingdoms/sunken_temple/sunken_temple.h index 00130d8fa..41afed4d0 100644 --- a/scripts/eastern_kingdoms/sunken_temple/sunken_temple.h +++ b/scripts/eastern_kingdoms/sunken_temple/sunken_temple.h @@ -7,8 +7,9 @@ enum { - MAX_ENCOUNTER = 4, + MAX_ENCOUNTER = 5, MAX_STATUES = 6, + MAX_FLAMES = 4, // Don't change types 1,2 and 3 (handled in ACID) TYPE_ATALARION_OBSOLET= 1, @@ -19,6 +20,7 @@ enum TYPE_PROTECTORS = 5, TYPE_JAMMALAN = 6, TYPE_MALFURION = 7, + TYPE_AVATAR = 8, NPC_ATALARION = 8580, NPC_DREAMSCYTH = 5721, @@ -35,6 +37,12 @@ enum NPC_ZULLOR = 5716, NPC_MIJAN = 5717, + // Avatar of hakkar mobs + NPC_SHADE_OF_HAKKAR = 8440, // Shade of Hakkar appears when the event starts; will despawn when avatar of hakkar is summoned + NPC_BLOODKEEPER = 8438, // Spawned rarely and contains the hakkari blood -> used to extinguish the flames + NPC_HAKKARI_MINION = 8437, // Npc randomly spawned during the event = trash + NPC_SUPPRESSOR = 8497, // Npc summoned at one of the two doors and moves to the boss; + NPC_MALFURION = 15362, GO_ALTAR_OF_HAKKAR = 148836, // Used in order to show the player the order of the statue activation @@ -52,6 +60,10 @@ enum GO_ETERNAL_FLAME_3 = 148420, GO_ETERNAL_FLAME_4 = 148421, + GO_EVIL_CIRCLE = 148998, // Objects used at the avatar event. they are spawned when the event starts, and the mobs are summon atop of them + GO_HAKKAR_DOOR_1 = 149432, // Combat doors + GO_HAKKAR_DOOR_2 = 149433, + GO_JAMMALAN_BARRIER = 149431, // Event ids related to the statue activation @@ -62,7 +74,15 @@ enum EVENT_ID_STATUE_5 = 3099, EVENT_ID_STATUE_6 = 3100, + SPELL_SUMMON_AVATAR = 12639, // Cast by the shade of hakkar, updates entry to avatar + SPELL_AVATAR_SUMMONED = 12948, + SAY_JAMMALAN_INTRO = -1109005, + SAY_AVATAR_BRAZIER_1 = -1109006, + SAY_AVATAR_BRAZIER_2 = -1109007, + SAY_AVATAR_BRAZIER_3 = -1109008, + SAY_AVATAR_BRAZIER_4 = -1109009, + SAY_AVATAR_SPAWN = -1109010, }; // This is also the needed order for activation: S, N, SW, SE, NW, NE @@ -80,6 +100,13 @@ static const SummonLocations aSunkenTempleLocation[] = {-660.5277f, -16.7117f, -90.8357f, 1.6055f} // Malfurion summon loc }; +// Summon location for the suppressors +static const SummonLocations aHakkariDoorLocations[2] = +{ + {-420.629f, 276.682f, -90.827f}, + {-512.015f, 276.134f, -90.827f} +}; + class MANGOS_DLL_DECL instance_sunken_temple : public ScriptedInstance { public: @@ -91,12 +118,14 @@ class MANGOS_DLL_DECL instance_sunken_temple : public ScriptedInstance void OnObjectCreate(GameObject* pGo); void OnCreatureCreate(Creature* pCreature); - // No need currently to use OnEnterCombat or OnEvade + void OnCreatureEvade(Creature* pCreature); void OnCreatureDeath(Creature* pCreature); void SetData(uint32 uiType, uint32 uiData); uint32 GetData(uint32 uiType); + void Update(uint32 uiDiff); + bool ProcessStatueEvent(uint32 uiEventId); const char* Save() { return strInstData.c_str(); } @@ -104,18 +133,30 @@ class MANGOS_DLL_DECL instance_sunken_temple : public ScriptedInstance protected: void DoSpawnAtalarionIfCan(); + void DoUpdateFlamesFlags(bool bRestore); uint32 m_auiEncounter[MAX_ENCOUNTER]; std::string strInstData; + uint8 m_uiProtectorsRemaining; // Jammalan door handling + uint8 m_uiStatueCounter; // Atalarion Statue Event + uint8 m_uiFlameCounter; // Avatar of Hakkar Event + uint32 m_uiAvatarSummonTimer; + uint32 m_uiSupressorTimer; + bool m_bIsFirstHakkarWave; + bool m_bCanSummonBloodkeeper; + uint64 m_uiAtalarionGUID; uint64 m_uiJammalanGUID; + uint64 m_uiShadeGUID; uint64 m_uiJammalanBarrierGUID; uint64 m_uiIdolOfHakkarGUID; - uint8 m_uiStatueCounter; - uint8 m_uiProtectorsRemaining; + uint64 m_uiAvatarDoor1GUID; + uint64 m_uiAvatarDoor2GUID; + GUIDList m_luiFlameGUIDs; GUIDList m_luiBigLightGUIDs; + GUIDVector m_vuiCircleGUIDs; }; #endif diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 4a2c3d2d0..9264e7285 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2146" + #define SD2_REVISION_NR "2147" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 965e8953b..179e15696 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -1048,6 +1048,11 @@ INSERT INTO scripted_event_id VALUES (3098,'event_antalarion_statue_activation'), (3099,'event_antalarion_statue_activation'), (3100,'event_antalarion_statue_activation'); +UPDATE creature_template SET ScriptName='npc_shade_of_hakkar' WHERE entry=8440; +UPDATE gameobject_template SET ScriptName='go_eternal_flame' WHERE entry IN (148418,148419,148420,148421); +DELETE FROM scripted_event_id WHERE id=8502; +INSERT INTO scripted_event_id VALUES +(8502,'event_avatar_of_hakkar'); /* SUNWELL PLATEAU */ UPDATE instance_template SET ScriptName='instance_sunwell_plateau' WHERE map=580; diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index d74191728..3e75dd370 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -849,7 +849,13 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1109003,'Understand this, Eranikus wants nothing more than to be brought to Azeroth from the Dream. Once he is out, he will stop at nothing to destroy my physical manifestation. This, however, is the only way in which you could recover the scepter shard.',0,0,0,0,'malfurion stormrge SAY_MAFLURION3'), (-1109004,'You will bring him back into this world, champion.',0,0,0,0,'malfurion Stormrge SAY_MALFURION4'), -(-1109005,'The shield be down! Rise up Atal\'ai! Rise up!',5861,6,0,0,'jammalan SAY_JAMMALAN_INTRO'); +(-1109005,'The shield be down! Rise up Atal\'ai! Rise up!',5861,6,0,0,'jammalan SAY_JAMMALAN_INTRO'), + +(-1109006,'HAKKAR LIVES!',5870,1,0,0,'avatar SAY_AVATAR_BRAZIER_1'), +(-1109007,'I TASTE THE BLOOD OF LIFE!',5868,1,0,0,'avatar SAY_AVATAR_BRAZIER_2'), +(-1109008,'I DRAW CLOSER TO YOUR WORLD!',5867,1,0,0,'avatar SAY_AVATAR_BRAZIER_3'), +(-1109009,'I AM NEAR!',5869,1,0,0,'avatar SAY_AVATAR_BRAZIER_4'), +(-1109010,'I AM HERE!',0,1,0,0,'avatar SAY_AVATAR_SPAWN'); -- -1 129 000 RAZORFEN DOWNS INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES diff --git a/sql/updates/r2147_mangos.sql b/sql/updates/r2147_mangos.sql new file mode 100644 index 000000000..d71d7d93a --- /dev/null +++ b/sql/updates/r2147_mangos.sql @@ -0,0 +1,5 @@ +UPDATE gameobject_template SET ScriptName='go_eternal_flame' WHERE entry IN (148418,148419,148420,148421); +UPDATE creature_template SET ScriptName='npc_shade_of_hakkar' WHERE entry=8440; +DELETE FROM scripted_event_id WHERE id=8502; +INSERT INTO scripted_event_id VALUES +(8502,'event_avatar_of_hakkar'); diff --git a/sql/updates/r2147_scriptdev2.sql b/sql/updates/r2147_scriptdev2.sql new file mode 100644 index 000000000..781860b3c --- /dev/null +++ b/sql/updates/r2147_scriptdev2.sql @@ -0,0 +1,7 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1109010 AND -1109006; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1109006,'HAKKAR LIVES!',5870,1,0,0,'avatar SAY_AVATAR_BRAZIER_1'), +(-1109007,'I TASTE THE BLOOD OF LIFE!',5868,1,0,0,'avatar SAY_AVATAR_BRAZIER_2'), +(-1109008,'I DRAW CLOSER TO YOUR WORLD!',5867,1,0,0,'avatar SAY_AVATAR_BRAZIER_3'), +(-1109009,'I AM NEAR!',5869,1,0,0,'avatar SAY_AVATAR_BRAZIER_4'), +(-1109010,'I AM HERE!',0,1,0,0,'avatar SAY_AVATAR_SPAWN'); From 4388079dfe2cd3fbed9809e7f4d1db5cc3d9e31d Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Tue, 31 May 2011 16:17:03 +0200 Subject: [PATCH 0127/1172] [2148] Temporarily workaround to restore instances doors or chests Revert this comment, when no more GO-Guids are stored as uint64 value. Also then add some additional safeguard, to prevent calling DoUseDoorOrButton or DoRespawnGameObject with uint64 values. Problem description: uint64 values cast in these functions to uint32, and then ofc do not work. Selfbonk for not carefull enough testing... Signed-off-by: Schmoozerd --- include/sc_instance.cpp | 18 ++++++++++++++++-- include/sc_instance.h | 6 ++++-- sd2_revision_nr.h | 2 +- 3 files changed, 21 insertions(+), 5 deletions(-) diff --git a/include/sc_instance.cpp b/include/sc_instance.cpp index b341ad7d4..f98868e02 100644 --- a/include/sc_instance.cpp +++ b/include/sc_instance.cpp @@ -31,8 +31,15 @@ void ScriptedInstance::DoUseDoorOrButton(ObjectGuid guid, uint32 uiWithRestoreTi } /// Function that uses a door or button that is stored in m_mGoEntryGuidStore -void ScriptedInstance::DoUseDoorOrButton(uint32 uiEntry, uint32 uiWithRestoreTime /*= 0*/, bool bUseAlternativeState /*= false*/) +void ScriptedInstance::DoUseDoorOrButton(uint64 uiEntry, uint32 uiWithRestoreTime /*= 0*/, bool bUseAlternativeState /*= false*/) { + // FIXME REMOVE when no more GO-Guids are stored as uint64 + if (uiEntry > (uint64(HIGHGUID_GAMEOBJECT) << 48)) + { + DoUseDoorOrButton(uiEntry, uiWithRestoreTime, bUseAlternativeState); + return; + } + EntryGuidMap::iterator find = m_mGoEntryGuidStore.find(uiEntry); if (find != m_mGoEntryGuidStore.end()) DoUseDoorOrButton(find->second, uiWithRestoreTime, bUseAlternativeState); @@ -68,8 +75,15 @@ void ScriptedInstance::DoRespawnGameObject(ObjectGuid guid, uint32 uiTimeToDespa } /// Function that respawns a despawned GO that is stored in m_mGoEntryGuidStore -void ScriptedInstance::DoRespawnGameObject(uint32 uiEntry, uint32 uiTimeToDespawn) +void ScriptedInstance::DoRespawnGameObject(uint64 uiEntry, uint32 uiTimeToDespawn) { + // FIXME REMOVE when no more GO-Guids are stored as uint64 + if (uiEntry > (uint64(HIGHGUID_GAMEOBJECT) << 48)) + { + DoRespawnGameObject(uiEntry, uiTimeToDespawn); + return; + } + EntryGuidMap::iterator find = m_mGoEntryGuidStore.find(uiEntry); if (find != m_mGoEntryGuidStore.end()) DoRespawnGameObject(find->second, uiTimeToDespawn); diff --git a/include/sc_instance.h b/include/sc_instance.h index 3d1450a5b..b161f8b75 100644 --- a/include/sc_instance.h +++ b/include/sc_instance.h @@ -35,11 +35,13 @@ class MANGOS_DLL_DECL ScriptedInstance : public InstanceData // Change active state of doors or buttons void DoUseDoorOrButton(ObjectGuid guid, uint32 uiWithRestoreTime = 0, bool bUseAlternativeState = false); - void DoUseDoorOrButton(uint32 uiEntry, uint32 uiWithRestoreTime = 0, bool bUseAlternativeState = false); + // FIXME revert back to uint32 uiEntry when no more GO-Guids are stored as uint64 + void DoUseDoorOrButton(uint64 uiEntry, uint32 uiWithRestoreTime = 0, bool bUseAlternativeState = false); // Respawns a GO having negative spawntimesecs in gameobject-table void DoRespawnGameObject(ObjectGuid guid, uint32 uiTimeToDespawn = MINUTE); - void DoRespawnGameObject(uint32 uiEntry, uint32 uiTimeToDespawn = MINUTE); + // FIXME revert back to uint32 uiEntry when no more GO-Guids are stored as uint64 + void DoRespawnGameObject(uint64 uiEntry, uint32 uiTimeToDespawn = MINUTE); // Sends world state update to all players in instance void DoUpdateWorldState(uint32 uiStateId, uint32 uiStateData); diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 9264e7285..8803cb4b6 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2147" + #define SD2_REVISION_NR "2148" #endif // __SD2_REVISION_NR_H__ From 3abfecdc88640b83fa90042167ec4ff3504a134f Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Tue, 31 May 2011 16:55:30 +0200 Subject: [PATCH 0128/1172] [2149] Forgotten part of last commit... --- include/sc_instance.cpp | 4 ++-- sd2_revision_nr.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/sc_instance.cpp b/include/sc_instance.cpp index f98868e02..3448810cc 100644 --- a/include/sc_instance.cpp +++ b/include/sc_instance.cpp @@ -36,7 +36,7 @@ void ScriptedInstance::DoUseDoorOrButton(uint64 uiEntry, uint32 uiWithRestoreTim // FIXME REMOVE when no more GO-Guids are stored as uint64 if (uiEntry > (uint64(HIGHGUID_GAMEOBJECT) << 48)) { - DoUseDoorOrButton(uiEntry, uiWithRestoreTime, bUseAlternativeState); + DoUseDoorOrButton(ObjectGuid(uiEntry), uiWithRestoreTime, bUseAlternativeState); return; } @@ -80,7 +80,7 @@ void ScriptedInstance::DoRespawnGameObject(uint64 uiEntry, uint32 uiTimeToDespaw // FIXME REMOVE when no more GO-Guids are stored as uint64 if (uiEntry > (uint64(HIGHGUID_GAMEOBJECT) << 48)) { - DoRespawnGameObject(uiEntry, uiTimeToDespawn); + DoRespawnGameObject(ObjectGuid(uiEntry), uiTimeToDespawn); return; } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 8803cb4b6..04f8aaa1d 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2148" + #define SD2_REVISION_NR "2149" #endif // __SD2_REVISION_NR_H__ From 68d82731aeb7f39123c8305423abbb35a1c7db3c Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Tue, 31 May 2011 16:57:25 +0200 Subject: [PATCH 0129/1172] [2150] Use EntryGuidMap-Storage in Blackrock Depths --- .../blackrock_depths/blackrock_depths.cpp | 26 +-- .../blackrock_depths/blackrock_depths.h | 36 +--- .../boss_emperor_dagran_thaurissan.cpp | 6 +- .../blackrock_depths/boss_tomb_of_seven.cpp | 14 +- .../instance_blackrock_depths.cpp | 159 ++++++------------ sd2_revision_nr.h | 2 +- 6 files changed, 76 insertions(+), 167 deletions(-) diff --git a/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.cpp b/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.cpp index 6d79447bb..64b034903 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.cpp +++ b/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.cpp @@ -296,13 +296,13 @@ struct MANGOS_DLL_DECL npc_grimstoneAI : public npc_escortAI // Reset Doors if (m_uiEventPhase >= 9) // North Gate is opened { - m_pInstance->DoUseDoorOrButton(m_pInstance->GetData64(GO_ARENA_2)); - m_pInstance->DoUseDoorOrButton(m_pInstance->GetData64(GO_ARENA_4)); + m_pInstance->DoUseDoorOrButton(GO_ARENA_2); + m_pInstance->DoUseDoorOrButton(GO_ARENA_4); } else if (m_uiEventPhase >= 4) // East Gate is opened { - m_pInstance->DoUseDoorOrButton(m_pInstance->GetData64(GO_ARENA_1)); - m_pInstance->DoUseDoorOrButton(m_pInstance->GetData64(GO_ARENA_4)); + m_pInstance->DoUseDoorOrButton(GO_ARENA_1); + m_pInstance->DoUseDoorOrButton(GO_ARENA_4); } // Despawn Summoned Mobs @@ -327,7 +327,7 @@ struct MANGOS_DLL_DECL npc_grimstoneAI : public npc_escortAI case 0: // Shortly after spawn, start walking //DoScriptText(-1000000, m_creature); // no more text on spawn - m_pInstance->DoUseDoorOrButton(m_pInstance->GetData64(GO_ARENA_4)); + m_pInstance->DoUseDoorOrButton(GO_ARENA_4); Start(false); SetEscortPaused(false); m_uiEventTimer = 0; @@ -342,7 +342,7 @@ struct MANGOS_DLL_DECL npc_grimstoneAI : public npc_escortAI break; case 3: // Open East Gate - m_pInstance->DoUseDoorOrButton(m_pInstance->GetData64(GO_ARENA_1)); + m_pInstance->DoUseDoorOrButton(GO_ARENA_1); m_uiEventTimer = 3000; break; case 4: @@ -366,14 +366,14 @@ struct MANGOS_DLL_DECL npc_grimstoneAI : public npc_escortAI case 7: // Summoned Mobs are dead, continue event m_creature->SetVisibility(VISIBILITY_ON); - m_pInstance->DoUseDoorOrButton(m_pInstance->GetData64(GO_ARENA_1)); + m_pInstance->DoUseDoorOrButton(GO_ARENA_1); //DoScriptText(-1000000, m_creature); // after killed the mobs, no say here SetEscortPaused(false); m_uiEventTimer = 0; break; case 8: // Open North Gate - m_pInstance->DoUseDoorOrButton(m_pInstance->GetData64(GO_ARENA_2)); + m_pInstance->DoUseDoorOrButton(GO_ARENA_2); m_uiEventTimer = 5000; break; case 9: @@ -397,9 +397,9 @@ struct MANGOS_DLL_DECL npc_grimstoneAI : public npc_escortAI case 10: // Boss dead m_lSummonedGUIDList.clear(); - m_pInstance->DoUseDoorOrButton(m_pInstance->GetData64(GO_ARENA_2)); - m_pInstance->DoUseDoorOrButton(m_pInstance->GetData64(GO_ARENA_3)); - m_pInstance->DoUseDoorOrButton(m_pInstance->GetData64(GO_ARENA_4)); + m_pInstance->DoUseDoorOrButton(GO_ARENA_2); + m_pInstance->DoUseDoorOrButton(GO_ARENA_3); + m_pInstance->DoUseDoorOrButton(GO_ARENA_4); SetEscortPaused(false); m_uiEventTimer = 0; break; @@ -681,7 +681,7 @@ struct MANGOS_DLL_DECL npc_rocknotAI : public npc_escortAI void DoGo(uint32 id, uint32 state) { - if (GameObject* pGo = m_pInstance->instance->GetGameObject(m_pInstance->GetData64(id))) + if (GameObject* pGo = m_pInstance->GetSingleGameObjectFromStorage(id)) pGo->SetGoState(GOState(state)); } @@ -736,7 +736,7 @@ struct MANGOS_DLL_DECL npc_rocknotAI : public npc_escortAI DoGo(GO_BAR_KEG_TRAP, 0); //doesn't work very well, leaving code here for future //spell by trap has effect61, this indicate the bar go hostile - if (Creature* pTmp = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(NPC_PHALANX))) + if (Creature* pTmp = m_pInstance->GetSingleCreatureFromStorage(NPC_PHALANX)) pTmp->setFaction(14); // for later, this event(s) has alot more to it. diff --git a/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.h b/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.h index 74310a788..e10f128db 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.h +++ b/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.h @@ -23,7 +23,7 @@ enum NPC_VILEREL = 9036, NPC_GLOOMREL = 9037, NPC_SEETHREL = 9038, - NPC_DOOMREL = 9039, + // NPC_DOOMREL = 9039, NPC_DOPEREL = 9040, GO_ARENA_1 = 161525, @@ -101,7 +101,6 @@ class MANGOS_DLL_DECL instance_blackrock_depths : public ScriptedInstance void SetData(uint32 uiType, uint32 uiData); uint32 GetData(uint32 uiType); - uint64 GetData64(uint32 uiData); const char* Save() { return m_strInstData.c_str(); } void Load(const char* chrIn); @@ -115,39 +114,6 @@ class MANGOS_DLL_DECL instance_blackrock_depths : public ScriptedInstance uint32 m_auiEncounter[MAX_ENCOUNTER]; std::string m_strInstData; - uint64 m_uiEmperorGUID; - uint64 m_uiPrincessGUID; - uint64 m_uiPhalanxGUID; - uint64 m_uiHaterelGUID; - uint64 m_uiAngerrelGUID; - uint64 m_uiVilerelGUID; - uint64 m_uiGloomrelGUID; - uint64 m_uiSeethrelGUID; - uint64 m_uiDoomrelGUID; - uint64 m_uiDoperelGUID; - - uint64 m_uiGoArena1GUID; - uint64 m_uiGoArena2GUID; - uint64 m_uiGoArena3GUID; - uint64 m_uiGoArena4GUID; - uint64 m_uiGoShadowLockGUID; - uint64 m_uiGoShadowMechGUID; - uint64 m_uiGoShadowGiantGUID; - uint64 m_uiGoShadowDummyGUID; - uint64 m_uiGoBarKegGUID; - uint64 m_uiGoBarKegTrapGUID; - uint64 m_uiGoBarDoorGUID; - uint64 m_uiGoTombEnterGUID; - uint64 m_uiGoTombExitGUID; - uint64 m_uiGoLyceumGUID; - uint64 m_uiGoGolemNGUID; - uint64 m_uiGoGolemSGUID; - uint64 m_uiGoThroneGUID; - - uint64 m_uiSpectralChaliceGUID; - uint64 m_uiSevensChestGUID; - uint64 m_uiArenaSpoilsGUID; - uint32 m_uiBarAleCount; float m_fArenaCenterX, m_fArenaCenterY, m_fArenaCenterZ; diff --git a/scripts/eastern_kingdoms/blackrock_depths/boss_emperor_dagran_thaurissan.cpp b/scripts/eastern_kingdoms/blackrock_depths/boss_emperor_dagran_thaurissan.cpp index 191b6fcbb..4264e3d67 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/boss_emperor_dagran_thaurissan.cpp +++ b/scripts/eastern_kingdoms/blackrock_depths/boss_emperor_dagran_thaurissan.cpp @@ -66,7 +66,7 @@ struct MANGOS_DLL_DECL boss_emperor_dagran_thaurissanAI : public ScriptedAI if (!m_pInstance) return; - if (Creature* pPrincess = m_pInstance->instance->GetCreature(m_pInstance->GetData64(NPC_PRINCESS))) + if (Creature* pPrincess = m_pInstance->GetSingleCreatureFromStorage(NPC_PRINCESS)) { if (pPrincess->isAlive()) { @@ -179,7 +179,7 @@ struct MANGOS_DLL_DECL boss_moira_bronzebeardAI : public ScriptedAI { if (m_pInstance) { - if (Creature* pEmperor = m_pInstance->instance->GetCreature(m_pInstance->GetData64(NPC_EMPEROR))) + if (Creature* pEmperor = m_pInstance->GetSingleCreatureFromStorage(NPC_EMPEROR)) { // if evade, then check if he is alive. If not, start make portal if (!pEmperor->isAlive()) @@ -224,7 +224,7 @@ struct MANGOS_DLL_DECL boss_moira_bronzebeardAI : public ScriptedAI //Heal_Timer if (m_uiHeal_Timer < uiDiff) { - if (Creature* pEmperor = m_pInstance->instance->GetCreature(m_pInstance->GetData64(NPC_EMPEROR))) + if (Creature* pEmperor = m_pInstance->GetSingleCreatureFromStorage(NPC_EMPEROR)) { if (pEmperor->isAlive() && pEmperor->GetHealthPercent() != 100.0f) DoCastSpellIfCan(pEmperor, SPELL_HEAL); diff --git a/scripts/eastern_kingdoms/blackrock_depths/boss_tomb_of_seven.cpp b/scripts/eastern_kingdoms/blackrock_depths/boss_tomb_of_seven.cpp index b8c5f9c54..f72118401 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/boss_tomb_of_seven.cpp +++ b/scripts/eastern_kingdoms/blackrock_depths/boss_tomb_of_seven.cpp @@ -80,7 +80,7 @@ bool GossipSelect_boss_gloomrel(Player* pPlayer, Creature* pCreature, uint32 uiS if (ScriptedInstance* pInstance = (ScriptedInstance*)pCreature->GetInstanceData()) { //are 5 minutes expected? go template may have data to despawn when used at quest - pInstance->DoRespawnGameObject(pInstance->GetData64(GO_SPECTRAL_CHALICE), MINUTE*5); + pInstance->DoRespawnGameObject(GO_SPECTRAL_CHALICE, MINUTE*5); } break; } @@ -154,17 +154,17 @@ struct MANGOS_DLL_DECL boss_doomrelAI : public ScriptedAI switch(uiPhase) { case 0: - return m_pInstance->instance->GetCreature(m_pInstance->GetData64(NPC_ANGERREL)); + return m_pInstance->GetSingleCreatureFromStorage(NPC_ANGERREL); case 1: - return m_pInstance->instance->GetCreature(m_pInstance->GetData64(NPC_SEETHREL)); + return m_pInstance->GetSingleCreatureFromStorage(NPC_SEETHREL); case 2: - return m_pInstance->instance->GetCreature(m_pInstance->GetData64(NPC_DOPEREL)); + return m_pInstance->GetSingleCreatureFromStorage(NPC_DOPEREL); case 3: - return m_pInstance->instance->GetCreature(m_pInstance->GetData64(NPC_GLOOMREL)); + return m_pInstance->GetSingleCreatureFromStorage(NPC_GLOOMREL); case 4: - return m_pInstance->instance->GetCreature(m_pInstance->GetData64(NPC_VILEREL)); + return m_pInstance->GetSingleCreatureFromStorage(NPC_VILEREL); case 5: - return m_pInstance->instance->GetCreature(m_pInstance->GetData64(NPC_HATEREL)); + return m_pInstance->GetSingleCreatureFromStorage(NPC_HATEREL); case 6: return m_creature; } diff --git a/scripts/eastern_kingdoms/blackrock_depths/instance_blackrock_depths.cpp b/scripts/eastern_kingdoms/blackrock_depths/instance_blackrock_depths.cpp index deea483c9..de9f398cc 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/instance_blackrock_depths.cpp +++ b/scripts/eastern_kingdoms/blackrock_depths/instance_blackrock_depths.cpp @@ -25,39 +25,6 @@ EndScriptData */ #include "blackrock_depths.h" instance_blackrock_depths::instance_blackrock_depths(Map* pMap) : ScriptedInstance(pMap), - m_uiEmperorGUID(0), - m_uiPrincessGUID(0), - m_uiPhalanxGUID(0), - m_uiHaterelGUID(0), - m_uiAngerrelGUID(0), - m_uiVilerelGUID(0), - m_uiGloomrelGUID(0), - m_uiSeethrelGUID(0), - m_uiDoomrelGUID(0), - m_uiDoperelGUID(0), - - m_uiGoArena1GUID(0), - m_uiGoArena2GUID(0), - m_uiGoArena3GUID(0), - m_uiGoArena4GUID(0), - m_uiGoShadowLockGUID(0), - m_uiGoShadowMechGUID(0), - m_uiGoShadowGiantGUID(0), - m_uiGoShadowDummyGUID(0), - m_uiGoBarKegGUID(0), - m_uiGoBarKegTrapGUID(0), - m_uiGoBarDoorGUID(0), - m_uiGoTombEnterGUID(0), - m_uiGoTombExitGUID(0), - m_uiGoLyceumGUID(0), - m_uiGoGolemNGUID(0), - m_uiGoGolemSGUID(0), - m_uiGoThroneGUID(0), - - m_uiSpectralChaliceGUID(0), - m_uiSevensChestGUID(0), - m_uiArenaSpoilsGUID(0), - m_uiBarAleCount(0), m_fArenaCenterX(0.0f), @@ -76,16 +43,17 @@ void instance_blackrock_depths::OnCreatureCreate(Creature* pCreature) { switch(pCreature->GetEntry()) { - case NPC_EMPEROR: m_uiEmperorGUID = pCreature->GetGUID(); break; - case NPC_PRINCESS: m_uiPrincessGUID = pCreature->GetGUID(); break; - case NPC_PHALANX: m_uiPhalanxGUID = pCreature->GetGUID(); break; - case NPC_HATEREL: m_uiHaterelGUID = pCreature->GetGUID(); break; - case NPC_ANGERREL: m_uiAngerrelGUID = pCreature->GetGUID(); break; - case NPC_VILEREL: m_uiVilerelGUID = pCreature->GetGUID(); break; - case NPC_GLOOMREL: m_uiGloomrelGUID = pCreature->GetGUID(); break; - case NPC_SEETHREL: m_uiSeethrelGUID = pCreature->GetGUID(); break; - case NPC_DOOMREL: m_uiDoomrelGUID = pCreature->GetGUID(); break; - case NPC_DOPEREL: m_uiDoperelGUID = pCreature->GetGUID(); break; + case NPC_EMPEROR: + case NPC_PRINCESS: + case NPC_PHALANX: + case NPC_HATEREL: + case NPC_ANGERREL: + case NPC_VILEREL: + case NPC_GLOOMREL: + case NPC_SEETHREL: + case NPC_DOPEREL: + m_mNpcEntryGuidStore[pCreature->GetEntry()] = pCreature->GetObjectGuid(); + break; } } @@ -93,27 +61,32 @@ void instance_blackrock_depths::OnObjectCreate(GameObject* pGo) { switch(pGo->GetEntry()) { - case GO_ARENA_1: m_uiGoArena1GUID = pGo->GetGUID(); break; - case GO_ARENA_2: m_uiGoArena2GUID = pGo->GetGUID(); break; - case GO_ARENA_3: m_uiGoArena3GUID = pGo->GetGUID(); break; - case GO_ARENA_4: m_uiGoArena4GUID = pGo->GetGUID(); break; - case GO_SHADOW_LOCK: m_uiGoShadowLockGUID = pGo->GetGUID(); break; - case GO_SHADOW_MECHANISM: m_uiGoShadowMechGUID = pGo->GetGUID(); break; - case GO_SHADOW_GIANT_DOOR: m_uiGoShadowGiantGUID = pGo->GetGUID(); break; - case GO_SHADOW_DUMMY: m_uiGoShadowDummyGUID = pGo->GetGUID(); break; - case GO_BAR_KEG_SHOT: m_uiGoBarKegGUID = pGo->GetGUID(); break; - case GO_BAR_KEG_TRAP: m_uiGoBarKegTrapGUID = pGo->GetGUID(); break; - case GO_BAR_DOOR: m_uiGoBarDoorGUID = pGo->GetGUID(); break; - case GO_TOMB_ENTER: m_uiGoTombEnterGUID = pGo->GetGUID(); break; - case GO_TOMB_EXIT: m_uiGoTombExitGUID = pGo->GetGUID(); break; - case GO_LYCEUM: m_uiGoLyceumGUID = pGo->GetGUID(); break; - case GO_GOLEM_ROOM_N: m_uiGoGolemNGUID = pGo->GetGUID(); break; - case GO_GOLEM_ROOM_S: m_uiGoGolemSGUID = pGo->GetGUID(); break; - case GO_THRONE_ROOM: m_uiGoThroneGUID = pGo->GetGUID(); break; - case GO_SPECTRAL_CHALICE: m_uiSpectralChaliceGUID = pGo->GetGUID(); break; - case GO_CHEST_SEVEN: m_uiSevensChestGUID = pGo->GetGUID(); break; - case GO_ARENA_SPOILS: m_uiArenaSpoilsGUID = pGo->GetGUID(); break; + case GO_ARENA_1: + case GO_ARENA_2: + case GO_ARENA_3: + case GO_ARENA_4: + case GO_SHADOW_LOCK: + case GO_SHADOW_MECHANISM: + case GO_SHADOW_GIANT_DOOR: + case GO_SHADOW_DUMMY: + case GO_BAR_KEG_SHOT: + case GO_BAR_KEG_TRAP: + case GO_BAR_DOOR: + case GO_TOMB_ENTER: + case GO_TOMB_EXIT: + case GO_LYCEUM: + case GO_GOLEM_ROOM_N: + case GO_GOLEM_ROOM_S: + case GO_THRONE_ROOM: + case GO_SPECTRAL_CHALICE: + case GO_CHEST_SEVEN: + case GO_ARENA_SPOILS: + break; + + default: + return; } + m_mGoEntryGuidStore[pGo->GetEntry()] = pGo->GetObjectGuid(); } void instance_blackrock_depths::SetData(uint32 uiType, uint32 uiData) @@ -123,7 +96,7 @@ void instance_blackrock_depths::SetData(uint32 uiType, uint32 uiData) case TYPE_RING_OF_LAW: // If finished the arena event after theldren fight if (uiData == DONE && m_auiEncounter[0] == SPECIAL) - DoRespawnGameObject(m_uiArenaSpoilsGUID, HOUR*IN_MILLISECONDS); + DoRespawnGameObject(GO_ARENA_SPOILS, HOUR); m_auiEncounter[0] = uiData; break; case TYPE_VAULT: @@ -139,16 +112,16 @@ void instance_blackrock_depths::SetData(uint32 uiType, uint32 uiData) switch(uiData) { case IN_PROGRESS: - DoUseDoorOrButton(m_uiGoTombEnterGUID); + DoUseDoorOrButton(GO_TOMB_ENTER); break; case FAIL: if (m_auiEncounter[3] == IN_PROGRESS)//prevent use more than one time - DoUseDoorOrButton(m_uiGoTombEnterGUID); + DoUseDoorOrButton(GO_TOMB_ENTER); break; case DONE: - DoRespawnGameObject(m_uiSevensChestGUID, HOUR*IN_MILLISECONDS); - DoUseDoorOrButton(m_uiGoTombExitGUID); - DoUseDoorOrButton(m_uiGoTombEnterGUID); + DoRespawnGameObject(GO_CHEST_SEVEN, HOUR); + DoUseDoorOrButton(GO_TOMB_EXIT); + DoUseDoorOrButton(GO_TOMB_ENTER); break; } m_auiEncounter[3] = uiData; @@ -156,8 +129,8 @@ void instance_blackrock_depths::SetData(uint32 uiType, uint32 uiData) case TYPE_LYCEUM: if (uiData == DONE) { - DoUseDoorOrButton(m_uiGoGolemNGUID); - DoUseDoorOrButton(m_uiGoGolemSGUID); + DoUseDoorOrButton(GO_GOLEM_ROOM_N); + DoUseDoorOrButton(GO_GOLEM_ROOM_S); } m_auiEncounter[4] = uiData; break; @@ -165,17 +138,17 @@ void instance_blackrock_depths::SetData(uint32 uiType, uint32 uiData) switch(uiData) { case IN_PROGRESS: - DoUseDoorOrButton(m_uiGoGolemNGUID); - DoUseDoorOrButton(m_uiGoGolemSGUID); + DoUseDoorOrButton(GO_GOLEM_ROOM_N); + DoUseDoorOrButton(GO_GOLEM_ROOM_S); break; case FAIL: - DoUseDoorOrButton(m_uiGoGolemNGUID); - DoUseDoorOrButton(m_uiGoGolemSGUID); + DoUseDoorOrButton(GO_GOLEM_ROOM_N); + DoUseDoorOrButton(GO_GOLEM_ROOM_S); break; case DONE: - DoUseDoorOrButton(m_uiGoGolemNGUID); - DoUseDoorOrButton(m_uiGoGolemSGUID); - DoUseDoorOrButton(m_uiGoThroneGUID); + DoUseDoorOrButton(GO_GOLEM_ROOM_N); + DoUseDoorOrButton(GO_GOLEM_ROOM_S); + DoUseDoorOrButton(GO_THRONE_ROOM); break; } m_auiEncounter[5] = uiData; @@ -221,36 +194,6 @@ uint32 instance_blackrock_depths::GetData(uint32 uiType) } } -uint64 instance_blackrock_depths::GetData64(uint32 uiData) -{ - switch(uiData) - { - case NPC_EMPEROR: return m_uiEmperorGUID; - case NPC_PRINCESS: return m_uiPrincessGUID; - case NPC_PHALANX: return m_uiPhalanxGUID; - case NPC_HATEREL: return m_uiHaterelGUID; - case NPC_ANGERREL: return m_uiAngerrelGUID; - case NPC_VILEREL: return m_uiVilerelGUID; - case NPC_GLOOMREL: return m_uiGloomrelGUID; - case NPC_SEETHREL: return m_uiSeethrelGUID; - case NPC_DOOMREL: return m_uiDoomrelGUID; - case NPC_DOPEREL: return m_uiDoperelGUID; - - case GO_ARENA_1: return m_uiGoArena1GUID; - case GO_ARENA_2: return m_uiGoArena2GUID; - case GO_ARENA_3: return m_uiGoArena3GUID; - case GO_ARENA_4: return m_uiGoArena4GUID; - case GO_BAR_KEG_SHOT: return m_uiGoBarKegGUID; - case GO_BAR_KEG_TRAP: return m_uiGoBarKegTrapGUID; - case GO_BAR_DOOR: return m_uiGoBarDoorGUID; - case GO_SPECTRAL_CHALICE: return m_uiSpectralChaliceGUID; - case GO_TOMB_EXIT: return m_uiGoTombExitGUID; - - default: - return 0; - } -} - void instance_blackrock_depths::Load(const char* chrIn) { if (!chrIn) diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 04f8aaa1d..f6f124254 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2149" + #define SD2_REVISION_NR "2150" #endif // __SD2_REVISION_NR_H__ From eb19bba92f02ed4ce5ce39b0616174748bb3a8d7 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Tue, 31 May 2011 17:57:26 +0200 Subject: [PATCH 0130/1172] [2151] Use EntryGuidMap-Storage in Blackrock Spire --- .../blackrock_spire/blackrock_spire.h | 15 +-- .../blackrock_spire/boss_gyth.cpp | 10 +- .../instance_blackrock_spire.cpp | 92 +++++++------------ sd2_revision_nr.h | 2 +- 4 files changed, 38 insertions(+), 81 deletions(-) diff --git a/scripts/eastern_kingdoms/blackrock_spire/blackrock_spire.h b/scripts/eastern_kingdoms/blackrock_spire/blackrock_spire.h index e01f40017..a9680010c 100644 --- a/scripts/eastern_kingdoms/blackrock_spire/blackrock_spire.h +++ b/scripts/eastern_kingdoms/blackrock_spire/blackrock_spire.h @@ -58,7 +58,6 @@ class MANGOS_DLL_DECL instance_blackrock_spire : public ScriptedInstance void SetData(uint32 uiType, uint32 uiData); void SetData64(uint32 uiType, uint64 uiData); uint32 GetData(uint32 uiType); - uint64 GetData64(uint32 uiType); const char* Save() { return strInstData.c_str(); } void Load(const char* chrIn); @@ -71,19 +70,7 @@ class MANGOS_DLL_DECL instance_blackrock_spire : public ScriptedInstance uint32 m_auiEncounter[MAX_ENCOUNTER]; std::string strInstData; - uint64 m_uiEmberseerGUID; - uint64 m_uiNefariusGUID; - uint64 m_uiGythGUID; - uint64 m_uiInfiltratorGUID; - - uint64 m_uiEmberseerInDoorGUID; - uint64 m_uiEmberseerCombatDoorGUID; - uint64 m_uiEmberseerOutDoorGUID; - uint64 m_uiGythEntryDoorGUID; - uint64 m_uiGythCombatDoorGUID; - uint64 m_uiGythExitDoorGUID; - - uint64 m_auiRoomRuneGUID[MAX_ROOMS]; + ObjectGuid m_aRoomRuneGuid[MAX_ROOMS]; GUIDList m_alRoomEventMobGUIDSorted[MAX_ROOMS]; GUIDList m_lRoomEventMobGUIDList; GUIDList m_lIncanceratorGUIDList; diff --git a/scripts/eastern_kingdoms/blackrock_spire/boss_gyth.cpp b/scripts/eastern_kingdoms/blackrock_spire/boss_gyth.cpp index c9852d3ae..9261b659c 100644 --- a/scripts/eastern_kingdoms/blackrock_spire/boss_gyth.cpp +++ b/scripts/eastern_kingdoms/blackrock_spire/boss_gyth.cpp @@ -51,7 +51,6 @@ struct MANGOS_DLL_DECL boss_gythAI : public ScriptedAI } instance_blackrock_spire* m_pInstance; - uint64 m_uiCombatDoorGUID; uint32 uiAggroTimer; uint32 uiDragonsTimer; uint32 uiOrcTimer; @@ -90,10 +89,7 @@ struct MANGOS_DLL_DECL boss_gythAI : public ScriptedAI void Aggro(Unit* pWho) { if (m_pInstance) - { m_pInstance->SetData(TYPE_GYTH, IN_PROGRESS); - m_uiCombatDoorGUID = m_pInstance->GetData64(GO_GYTH_COMBAT_DOOR); - } } void JustDied(Unit* pKiller) @@ -141,7 +137,7 @@ struct MANGOS_DLL_DECL boss_gythAI : public ScriptedAI m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); m_creature->RemoveAurasDueToSpell(SPELL_ROOT_SELF); if (m_pInstance) - m_pInstance->DoUseDoorOrButton(m_uiCombatDoorGUID); + m_pInstance->DoUseDoorOrButton(GO_GYTH_COMBAT_DOOR); } else @@ -160,7 +156,7 @@ struct MANGOS_DLL_DECL boss_gythAI : public ScriptedAI SummonCreatureWithRandomTarget(NPC_CHROMATIC_WHELP); --uiLine1Count; if (m_pInstance) - m_pInstance->DoUseDoorOrButton(m_uiCombatDoorGUID); + m_pInstance->DoUseDoorOrButton(GO_GYTH_COMBAT_DOOR); uiDragonsTimer = 60000; } else @@ -178,7 +174,7 @@ struct MANGOS_DLL_DECL boss_gythAI : public ScriptedAI SummonCreatureWithRandomTarget(NPC_CHROMATIC_WHELP); SummonCreatureWithRandomTarget(NPC_CHROMATIC_WHELP); if (m_pInstance) - m_pInstance->DoUseDoorOrButton(m_uiCombatDoorGUID); + m_pInstance->DoUseDoorOrButton(GO_GYTH_COMBAT_DOOR); --uiLine2Count; uiOrcTimer = 60000; } diff --git a/scripts/eastern_kingdoms/blackrock_spire/instance_blackrock_spire.cpp b/scripts/eastern_kingdoms/blackrock_spire/instance_blackrock_spire.cpp index daaaf6fe8..20a352726 100644 --- a/scripts/eastern_kingdoms/blackrock_spire/instance_blackrock_spire.cpp +++ b/scripts/eastern_kingdoms/blackrock_spire/instance_blackrock_spire.cpp @@ -44,19 +44,7 @@ enum 3726 UBRS, entrance to BWL */ -instance_blackrock_spire::instance_blackrock_spire(Map* pMap) : ScriptedInstance(pMap), - m_uiEmberseerGUID(0), - m_uiNefariusGUID(0), - m_uiGythGUID(0), - m_uiInfiltratorGUID(0), - - m_uiEmberseerInDoorGUID(0), - m_uiEmberseerCombatDoorGUID(0), - m_uiEmberseerOutDoorGUID(0), - - m_uiGythEntryDoorGUID(0), - m_uiGythCombatDoorGUID(0), - m_uiGythExitDoorGUID(0) +instance_blackrock_spire::instance_blackrock_spire(Map* pMap) : ScriptedInstance(pMap) { Initialize(); } @@ -64,7 +52,7 @@ instance_blackrock_spire::instance_blackrock_spire(Map* pMap) : ScriptedInstance void instance_blackrock_spire::Initialize() { memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); - memset(&m_auiRoomRuneGUID, 0, sizeof(m_auiRoomRuneGUID)); + memset(&m_aRoomRuneGuid, 0, sizeof(m_aRoomRuneGuid)); } void instance_blackrock_spire::OnObjectCreate(GameObject* pGo) @@ -72,50 +60,49 @@ void instance_blackrock_spire::OnObjectCreate(GameObject* pGo) switch(pGo->GetEntry()) { case GO_EMBERSEER_IN: - m_uiEmberseerInDoorGUID = pGo->GetGUID(); if (GetData(TYPE_ROOM_EVENT) == DONE) pGo->SetGoState(GO_STATE_ACTIVE); break; case GO_DOORS: - m_uiEmberseerCombatDoorGUID = pGo->GetGUID(); break; case GO_EMBERSEER_OUT: - m_uiEmberseerOutDoorGUID = pGo->GetGUID(); if (GetData(TYPE_EMBERSEER) == DONE) pGo->SetGoState(GO_STATE_ACTIVE); break; case GO_GYTH_ENTRY_DOOR: - m_uiGythEntryDoorGUID = pGo->GetGUID(); - break; case GO_GYTH_COMBAT_DOOR: - m_uiGythCombatDoorGUID = pGo->GetGUID(); break; case GO_GYTH_EXIT_DOOR: - m_uiGythExitDoorGUID = pGo->GetGUID(); if (GetData(TYPE_GYTH) == DONE) pGo->SetGoState(GO_STATE_ACTIVE); break; - case GO_ROOM_1_RUNE: m_auiRoomRuneGUID[0] = pGo->GetGUID(); break; - case GO_ROOM_2_RUNE: m_auiRoomRuneGUID[1] = pGo->GetGUID(); break; - case GO_ROOM_3_RUNE: m_auiRoomRuneGUID[2] = pGo->GetGUID(); break; - case GO_ROOM_4_RUNE: m_auiRoomRuneGUID[3] = pGo->GetGUID(); break; - case GO_ROOM_5_RUNE: m_auiRoomRuneGUID[4] = pGo->GetGUID(); break; - case GO_ROOM_6_RUNE: m_auiRoomRuneGUID[5] = pGo->GetGUID(); break; - case GO_ROOM_7_RUNE: m_auiRoomRuneGUID[6] = pGo->GetGUID(); break; + case GO_ROOM_1_RUNE: m_aRoomRuneGuid[0] = pGo->GetObjectGuid(); return; + case GO_ROOM_2_RUNE: m_aRoomRuneGuid[1] = pGo->GetObjectGuid(); return; + case GO_ROOM_3_RUNE: m_aRoomRuneGuid[2] = pGo->GetObjectGuid(); return; + case GO_ROOM_4_RUNE: m_aRoomRuneGuid[3] = pGo->GetObjectGuid(); return; + case GO_ROOM_5_RUNE: m_aRoomRuneGuid[4] = pGo->GetObjectGuid(); return; + case GO_ROOM_6_RUNE: m_aRoomRuneGuid[5] = pGo->GetObjectGuid(); return; + case GO_ROOM_7_RUNE: m_aRoomRuneGuid[6] = pGo->GetObjectGuid(); return; + + case GO_ROOKERY_EGG: m_lRookeryEggGUIDList.push_back(pGo->GetGUID()); return; - case GO_ROOKERY_EGG: m_lRookeryEggGUIDList.push_back(pGo->GetGUID()); break; + default: + return; } + m_mGoEntryGuidStore[pGo->GetEntry()] = pGo->GetObjectGuid(); } void instance_blackrock_spire::OnCreatureCreate(Creature* pCreature) { switch(pCreature->GetEntry()) { - case NPC_PYROGUARD_EMBERSEER: m_uiEmberseerGUID = pCreature->GetEntry(); break; - case NPC_LORD_VICTOR_NEFARIUS: m_uiNefariusGUID = pCreature->GetGUID(); break; - case NPC_GYTH: m_uiGythGUID = pCreature->GetGUID(); break; - case NPC_SCARSHIELD_INFILTRATOR: m_uiInfiltratorGUID = pCreature->GetGUID(); break; + case NPC_PYROGUARD_EMBERSEER: + case NPC_LORD_VICTOR_NEFARIUS: + case NPC_GYTH: + case NPC_SCARSHIELD_INFILTRATOR: + m_mNpcEntryGuidStore[pCreature->GetEntry()] = pCreature->GetObjectGuid(); + case NPC_BLACKHAND_SUMMONER: case NPC_BLACKHAND_VETERAN: m_lRoomEventMobGUIDList.push_back(pCreature->GetGUID()); break; @@ -129,16 +116,16 @@ void instance_blackrock_spire::SetData(uint32 uiType, uint32 uiData) { case TYPE_ROOM_EVENT: if (uiData == DONE) - DoUseDoorOrButton(m_uiEmberseerInDoorGUID); + DoUseDoorOrButton(GO_EMBERSEER_IN); m_auiEncounter[0] = uiData; break; case TYPE_EMBERSEER: if (uiData == IN_PROGRESS || uiData == FAIL) - DoUseDoorOrButton(m_uiEmberseerCombatDoorGUID); + DoUseDoorOrButton(GO_DOORS); else if (uiData == DONE) { - DoUseDoorOrButton(m_uiEmberseerCombatDoorGUID); - DoUseDoorOrButton(m_uiEmberseerOutDoorGUID); + DoUseDoorOrButton(GO_DOORS); + DoUseDoorOrButton(GO_EMBERSEER_OUT); } m_auiEncounter[1] = uiData; break; @@ -147,11 +134,11 @@ void instance_blackrock_spire::SetData(uint32 uiType, uint32 uiData) break; case TYPE_GYTH: if (uiData == IN_PROGRESS || uiData == FAIL) - DoUseDoorOrButton(m_uiGythEntryDoorGUID); + DoUseDoorOrButton(GO_GYTH_ENTRY_DOOR); else if (uiData == DONE) { - DoUseDoorOrButton(m_uiGythEntryDoorGUID); - DoUseDoorOrButton(m_uiGythExitDoorGUID); + DoUseDoorOrButton(GO_GYTH_ENTRY_DOOR); + DoUseDoorOrButton(GO_GYTH_EXIT_DOOR); } m_auiEncounter[3] = uiData; break; @@ -179,15 +166,15 @@ void instance_blackrock_spire::SetData64(uint32 uiType, uint64 uiData) if (uiType == TYPE_ROOM_EVENT && GetData(TYPE_ROOM_EVENT) == IN_PROGRESS) { uint8 uiNotEmptyRoomsCount = 0; - for (uint8 i = 0; i< MAX_ROOMS; ++i) + for (uint8 i = 0; i < MAX_ROOMS; ++i) { - if (m_auiRoomRuneGUID[i]) // This check is used, to ensure which runes still need processing + if (m_aRoomRuneGuid[i]) // This check is used, to ensure which runes still need processing { m_alRoomEventMobGUIDSorted[i].remove(uiData); if (m_alRoomEventMobGUIDSorted[i].empty()) { - DoUseDoorOrButton(m_auiRoomRuneGUID[i]); - m_auiRoomRuneGUID[i] = 0; + DoUseDoorOrButton(m_aRoomRuneGuid[i]); + m_aRoomRuneGuid[i].Clear(); } else ++uiNotEmptyRoomsCount; // found an not empty room @@ -233,19 +220,6 @@ uint32 instance_blackrock_spire::GetData(uint32 uiType) return 0; } -uint64 instance_blackrock_spire::GetData64(uint32 uiType) -{ - switch (uiType) - { - case NPC_PYROGUARD_EMBERSEER: return m_uiEmberseerGUID; - case NPC_LORD_VICTOR_NEFARIUS: return m_uiNefariusGUID; - case NPC_GYTH: return m_uiGythGUID; - case NPC_SCARSHIELD_INFILTRATOR: return m_uiInfiltratorGUID; - case GO_GYTH_COMBAT_DOOR: return m_uiGythCombatDoorGUID; - } - return 0; -} - void instance_blackrock_spire::DoSortRoomEventMobs() { if (GetData(TYPE_ROOM_EVENT) != NOT_STARTED) @@ -253,7 +227,7 @@ void instance_blackrock_spire::DoSortRoomEventMobs() for (uint8 i = 0; i < MAX_ROOMS; ++i) { - if (GameObject* pRune = instance->GetGameObject(m_auiRoomRuneGUID[i])) + if (GameObject* pRune = instance->GetGameObject(m_aRoomRuneGuid[i])) { for (GUIDList::const_iterator itr = m_lRoomEventMobGUIDList.begin(); itr != m_lRoomEventMobGUIDList.end(); ++itr) { @@ -285,7 +259,7 @@ bool AreaTrigger_at_blackrock_spire(Player* pPlayer, AreaTriggerEntry const* pAt break; case AREATRIGGER_STADIUM: if (instance_blackrock_spire* pInstance = (instance_blackrock_spire*) pPlayer->GetInstanceData()) - if (Creature* pGyth = pInstance->instance->GetCreature(pInstance->GetData64(NPC_GYTH))) + if (Creature* pGyth = pInstance->GetSingleCreatureFromStorage(NPC_GYTH)) if (pGyth->isAlive() && !pGyth->isInCombat()) pGyth->AI()->AttackStart(pPlayer); break; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index f6f124254..5bcb4734f 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2150" + #define SD2_REVISION_NR "2151" #endif // __SD2_REVISION_NR_H__ From 579f8ff4e70b13de0f4f5415671b5062dd6c63c8 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Wed, 1 Jun 2011 19:09:01 +0200 Subject: [PATCH 0131/1172] [2152] Use EntryGuidMap-Storage in Sethek Halls and fix door (time should be in seconds) Signed-off-by: Schmoozerd --- .../auchindoun/sethekk_halls/instance_sethekk_halls.cpp | 8 ++++---- scripts/outland/auchindoun/sethekk_halls/sethekk_halls.h | 2 -- sd2_revision_nr.h | 2 +- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/scripts/outland/auchindoun/sethekk_halls/instance_sethekk_halls.cpp b/scripts/outland/auchindoun/sethekk_halls/instance_sethekk_halls.cpp index 46e0bf0b7..95b632700 100644 --- a/scripts/outland/auchindoun/sethekk_halls/instance_sethekk_halls.cpp +++ b/scripts/outland/auchindoun/sethekk_halls/instance_sethekk_halls.cpp @@ -24,8 +24,7 @@ EndScriptData */ #include "precompiled.h" #include "sethekk_halls.h" -instance_sethekk_halls::instance_sethekk_halls(Map* pMap) : ScriptedInstance(pMap), - m_uiIkissDoorGUID(0) +instance_sethekk_halls::instance_sethekk_halls(Map* pMap) : ScriptedInstance(pMap) { Initialize(); } @@ -38,9 +37,10 @@ void instance_sethekk_halls::OnObjectCreate(GameObject* pGo) { if (pGo->GetEntry() == GO_IKISS_DOOR) { - m_uiIkissDoorGUID = pGo->GetGUID(); if (m_auiEncounter[TYPE_IKISS] == DONE) pGo->SetGoState(GO_STATE_ACTIVE); + + m_mGoEntryGuidStore[GO_IKISS_DOOR] = pGo->GetObjectGuid(); } } @@ -54,7 +54,7 @@ void instance_sethekk_halls::SetData(uint32 uiType, uint32 uiData) break; case TYPE_IKISS: if (uiData == DONE) - DoUseDoorOrButton(m_uiIkissDoorGUID, DAY*IN_MILLISECONDS); + DoUseDoorOrButton(GO_IKISS_DOOR, DAY); m_auiEncounter[uiType] = uiData; break; default: diff --git a/scripts/outland/auchindoun/sethekk_halls/sethekk_halls.h b/scripts/outland/auchindoun/sethekk_halls/sethekk_halls.h index 6b2caa1fd..12072d408 100644 --- a/scripts/outland/auchindoun/sethekk_halls/sethekk_halls.h +++ b/scripts/outland/auchindoun/sethekk_halls/sethekk_halls.h @@ -42,8 +42,6 @@ class MANGOS_DLL_DECL instance_sethekk_halls : public ScriptedInstance private: uint32 m_auiEncounter[MAX_ENCOUNTER]; std::string m_strInstData; - - uint64 m_uiIkissDoorGUID; }; #endif diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 5bcb4734f..6bb25f241 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2151" + #define SD2_REVISION_NR "2152" #endif // __SD2_REVISION_NR_H__ From 5ce8441edf13915a9fea20af7b332fb8a5a61359 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Wed, 1 Jun 2011 19:16:08 +0200 Subject: [PATCH 0132/1172] [2153] Use EntryGuidMap-Storage in Shadow Labyrinth Signed-off-by: Schmoozerd --- .../instance_shadow_labyrinth.cpp | 17 ++++++++--------- .../shadow_labyrinth/shadow_labyrinth.h | 4 ---- sd2_revision_nr.h | 2 +- 3 files changed, 9 insertions(+), 14 deletions(-) diff --git a/scripts/outland/auchindoun/shadow_labyrinth/instance_shadow_labyrinth.cpp b/scripts/outland/auchindoun/shadow_labyrinth/instance_shadow_labyrinth.cpp index 30e66943e..7bf3f911c 100644 --- a/scripts/outland/auchindoun/shadow_labyrinth/instance_shadow_labyrinth.cpp +++ b/scripts/outland/auchindoun/shadow_labyrinth/instance_shadow_labyrinth.cpp @@ -32,10 +32,6 @@ EndScriptData */ */ instance_shadow_labyrinth::instance_shadow_labyrinth(Map* pMap) : ScriptedInstance(pMap), - m_uiRefectoryDoorGUID(0), - m_uiScreamingHallDoorGUID(0), - - m_uiGrandmasterVorpil(0), m_uiFelOverseerCount(0) { Initialize(); @@ -51,16 +47,19 @@ void instance_shadow_labyrinth::OnObjectCreate(GameObject* pGo) switch(pGo->GetEntry()) { case GO_REFECTORY_DOOR: - m_uiRefectoryDoorGUID = pGo->GetGUID(); if (m_auiEncounter[2] == DONE) pGo->SetGoState(GO_STATE_ACTIVE); break; case GO_SCREAMING_HALL_DOOR: - m_uiScreamingHallDoorGUID = pGo->GetGUID(); if (m_auiEncounter[3] == DONE) pGo->SetGoState(GO_STATE_ACTIVE); break; + + default: + return; } + + m_mGoEntryGuidStore[pGo->GetEntry()] = pGo->GetObjectGuid(); } void instance_shadow_labyrinth::OnCreatureCreate(Creature* pCreature) @@ -68,7 +67,7 @@ void instance_shadow_labyrinth::OnCreatureCreate(Creature* pCreature) switch(pCreature->GetEntry()) { case NPC_VORPIL: - m_uiGrandmasterVorpil = pCreature->GetGUID(); + m_mNpcEntryGuidStore[NPC_VORPIL] = pCreature->GetObjectGuid(); break; case NPC_FEL_OVERSEER: ++m_uiFelOverseerCount; // TODO should actually only count alive ones @@ -112,13 +111,13 @@ void instance_shadow_labyrinth::SetData(uint32 uiType, uint32 uiData) case TYPE_INCITER: if (uiData == DONE) - DoUseDoorOrButton(m_uiRefectoryDoorGUID); + DoUseDoorOrButton(GO_REFECTORY_DOOR); m_auiEncounter[2] = uiData; break; case TYPE_VORPIL: if (uiData == DONE) - DoUseDoorOrButton(m_uiScreamingHallDoorGUID); + DoUseDoorOrButton(GO_SCREAMING_HALL_DOOR); m_auiEncounter[3] = uiData; break; diff --git a/scripts/outland/auchindoun/shadow_labyrinth/shadow_labyrinth.h b/scripts/outland/auchindoun/shadow_labyrinth/shadow_labyrinth.h index bfcf6dbf1..6dfb8fbec 100644 --- a/scripts/outland/auchindoun/shadow_labyrinth/shadow_labyrinth.h +++ b/scripts/outland/auchindoun/shadow_labyrinth/shadow_labyrinth.h @@ -42,10 +42,6 @@ class MANGOS_DLL_DECL instance_shadow_labyrinth : public ScriptedInstance uint32 m_auiEncounter[MAX_ENCOUNTER]; std::string m_strInstData; - uint64 m_uiRefectoryDoorGUID; - uint64 m_uiScreamingHallDoorGUID; - - uint64 m_uiGrandmasterVorpil; uint32 m_uiFelOverseerCount; }; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 6bb25f241..f7f7c6fe7 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2152" + #define SD2_REVISION_NR "2153" #endif // __SD2_REVISION_NR_H__ From fe817cc208287571471db9a3741e1083cf3b4922 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Thu, 2 Jun 2011 12:26:55 +0200 Subject: [PATCH 0133/1172] [2154] EntryGuidMap-Storage in Tempest Keep - The Eye * Also remove explicit storage of advisors in Kael's script * Really use last enemy of Advisors for reattacking * Fix issue in Blackrock Spire, thanks to Xfurry for pointing * Improve recently added comments, thanks to NoFantasy for pointing Signed-off-by: Schmoozerd --- include/sc_instance.cpp | 4 +- .../instance_blackrock_spire.cpp | 2 +- .../tempest_keep/the_eye/boss_astromancer.cpp | 2 +- .../tempest_keep/the_eye/boss_kaelthas.cpp | 89 ++++++++++++------- .../tempest_keep/the_eye/instance_the_eye.cpp | 37 ++------ .../outland/tempest_keep/the_eye/the_eye.h | 8 -- sd2_revision_nr.h | 2 +- 7 files changed, 68 insertions(+), 76 deletions(-) diff --git a/include/sc_instance.cpp b/include/sc_instance.cpp index 3448810cc..5ba1c204a 100644 --- a/include/sc_instance.cpp +++ b/include/sc_instance.cpp @@ -7,7 +7,7 @@ /** Function that uses a door or a button - @param guid The ObjectGuid of the Door/ Button that shall be used + @param guid The ObjectGuid of the Door/ Button that will be used @param uiWithRestoreTime (in seconds) if == 0 autoCloseTime will be used (if not 0 by default in *_template) @param bUseAlternativeState Use to alternative state */ @@ -51,7 +51,7 @@ void ScriptedInstance::DoUseDoorOrButton(uint64 uiEntry, uint32 uiWithRestoreTim /** Function that respawns a despawned GameObject with given time - @param guid The ObjectGuid of the GO that shall be respawned + @param guid The ObjectGuid of the GO that will be respawned @param uiTimeToDespawn (in seconds) Despawn the GO after this time, default is a minute */ void ScriptedInstance::DoRespawnGameObject(ObjectGuid guid, uint32 uiTimeToDespawn) diff --git a/scripts/eastern_kingdoms/blackrock_spire/instance_blackrock_spire.cpp b/scripts/eastern_kingdoms/blackrock_spire/instance_blackrock_spire.cpp index 20a352726..b33ca9a1a 100644 --- a/scripts/eastern_kingdoms/blackrock_spire/instance_blackrock_spire.cpp +++ b/scripts/eastern_kingdoms/blackrock_spire/instance_blackrock_spire.cpp @@ -102,7 +102,7 @@ void instance_blackrock_spire::OnCreatureCreate(Creature* pCreature) case NPC_GYTH: case NPC_SCARSHIELD_INFILTRATOR: m_mNpcEntryGuidStore[pCreature->GetEntry()] = pCreature->GetObjectGuid(); - + break; case NPC_BLACKHAND_SUMMONER: case NPC_BLACKHAND_VETERAN: m_lRoomEventMobGUIDList.push_back(pCreature->GetGUID()); break; diff --git a/scripts/outland/tempest_keep/the_eye/boss_astromancer.cpp b/scripts/outland/tempest_keep/the_eye/boss_astromancer.cpp index c06b18dc3..f6f3eeae4 100644 --- a/scripts/outland/tempest_keep/the_eye/boss_astromancer.cpp +++ b/scripts/outland/tempest_keep/the_eye/boss_astromancer.cpp @@ -461,7 +461,7 @@ struct MANGOS_DLL_DECL mob_solarium_priestAI : public ScriptedAI { case 0: if (m_pInstance) - pTarget = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(NPC_ASTROMANCER)); + pTarget = m_pInstance->GetSingleCreatureFromStorage(NPC_ASTROMANCER); break; case 1: pTarget = m_creature; diff --git a/scripts/outland/tempest_keep/the_eye/boss_kaelthas.cpp b/scripts/outland/tempest_keep/the_eye/boss_kaelthas.cpp index 1f079bdc6..a9387bd48 100644 --- a/scripts/outland/tempest_keep/the_eye/boss_kaelthas.cpp +++ b/scripts/outland/tempest_keep/the_eye/boss_kaelthas.cpp @@ -126,6 +126,8 @@ enum MAX_ADVISORS = 4 }; +static const uint32 aAdvisors[MAX_ADVISORS] = {NPC_THALADRED, NPC_SANGUINAR, NPC_CAPERNIAN, NPC_TELONICUS}; + uint32 m_auiSpellSummonWeapon[]= { SPELL_SUMMON_WEAPONA, SPELL_SUMMON_WEAPONB, SPELL_SUMMON_WEAPONC, SPELL_SUMMON_WEAPOND, @@ -157,7 +159,7 @@ struct MANGOS_DLL_DECL advisorbase_ai : public ScriptedAI bool m_bFakeDeath; bool m_bDoubled_Health; uint32 m_uiDelayRes_Timer; - uint64 m_uiDelayRes_Target; + ObjectGuid m_delayResTargetGuid; void Reset() { @@ -169,7 +171,7 @@ struct MANGOS_DLL_DECL advisorbase_ai : public ScriptedAI m_bFakeDeath = false; m_uiDelayRes_Timer = 0; - m_uiDelayRes_Target = 0; + m_delayResTargetGuid.Clear(); m_creature->SetStandState(UNIT_STAND_STATE_STAND); m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); @@ -178,7 +180,7 @@ struct MANGOS_DLL_DECL advisorbase_ai : public ScriptedAI //reset encounter if (m_pInstance && (m_pInstance->GetData(TYPE_KAELTHAS_PHASE) == PHASE_1_ADVISOR || m_pInstance->GetData(TYPE_KAELTHAS_PHASE) == PHASE_3_ADVISOR_ALL)) { - if (Creature* pKaelthas = m_pInstance->instance->GetCreature(m_pInstance->GetData64(NPC_KAELTHAS))) + if (Creature* pKaelthas = m_pInstance->GetSingleCreatureFromStorage(NPC_KAELTHAS)) pKaelthas->AI()->EnterEvadeMode(); } } @@ -251,6 +253,9 @@ struct MANGOS_DLL_DECL advisorbase_ai : public ScriptedAI m_creature->GetMotionMaster()->MoveIdle(); m_creature->SetStandState(UNIT_STAND_STATE_DEAD); JustDied(pKiller); + + if (m_creature->getVictim()) + m_delayResTargetGuid = m_creature->getVictim()->GetObjectGuid(); } } @@ -263,16 +268,21 @@ struct MANGOS_DLL_DECL advisorbase_ai : public ScriptedAI m_uiDelayRes_Timer = 0; m_bFakeDeath = false; - Unit* pTarget = m_creature->GetMap()->GetUnit(m_uiDelayRes_Target); + Unit* pTarget = m_creature->GetMap()->GetUnit(m_delayResTargetGuid); - if (!pTarget) + if (!pTarget || !pTarget->isAlive()) pTarget = m_creature->getVictim(); + if (!pTarget) + return; + DoResetThreat(); AttackStart(pTarget); + // In case of same target as before, AttackStart and Attack won't set the target guid. + m_creature->SetTargetGuid(pTarget->GetObjectGuid()); + m_creature->GetMotionMaster()->Clear(); m_creature->GetMotionMaster()->MoveChase(pTarget); - m_creature->AddThreat(pTarget); } else m_uiDelayRes_Timer -= uiDiff; @@ -287,7 +297,6 @@ struct MANGOS_DLL_DECL boss_kaelthasAI : public ScriptedAI boss_kaelthasAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - memset(&m_auiAdvisorGuid, 0, sizeof(m_auiAdvisorGuid)); Reset(); } @@ -312,8 +321,6 @@ struct MANGOS_DLL_DECL boss_kaelthasAI : public ScriptedAI bool m_bIsCastingFireball; bool m_bChainPyros; - uint64 m_auiAdvisorGuid[MAX_ADVISORS]; - void Reset() { m_uiFireball_Timer = urand(5000, 15000); @@ -344,9 +351,12 @@ struct MANGOS_DLL_DECL boss_kaelthasAI : public ScriptedAI void PrepareAdvisors() { + if (!m_pInstance) + return; + for(uint8 i = 0; i < MAX_ADVISORS; ++i) { - if (Creature* pCreature = m_creature->GetMap()->GetCreature(m_auiAdvisorGuid[i])) + if (Creature* pCreature = m_pInstance->GetSingleCreatureFromStorage(aAdvisors[i])) { pCreature->Respawn(); pCreature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); @@ -361,12 +371,14 @@ struct MANGOS_DLL_DECL boss_kaelthasAI : public ScriptedAI if (!m_pInstance) return; - m_auiAdvisorGuid[0] = m_pInstance->GetData64(NPC_THALADRED); - m_auiAdvisorGuid[1] = m_pInstance->GetData64(NPC_SANGUINAR); - m_auiAdvisorGuid[2] = m_pInstance->GetData64(NPC_CAPERNIAN); - m_auiAdvisorGuid[3] = m_pInstance->GetData64(NPC_TELONICUS); + bool bAdivsorsFound = true; + for (uint8 i = 0; i < MAX_ADVISORS; ++i) + { + if (!m_pInstance->GetSingleCreatureFromStorage(aAdvisors[i])) + bAdivsorsFound = false; + } - if (!m_auiAdvisorGuid[0] || !m_auiAdvisorGuid[1] || !m_auiAdvisorGuid[2] || !m_auiAdvisorGuid[3]) + if (!bAdivsorsFound) { error_log("SD2: Kael'Thas One or more advisors missing, Skipping Phases 1-3"); @@ -468,12 +480,14 @@ struct MANGOS_DLL_DECL boss_kaelthasAI : public ScriptedAI DoScriptText(SAY_DEATH, m_creature); if (m_pInstance) + { m_pInstance->SetData(TYPE_KAELTHAS_PHASE, PHASE_6_COMPLETE); - for(uint8 i = 0; i < MAX_ADVISORS; ++i) - { - if (Creature* pAdvisor = m_creature->GetMap()->GetCreature(m_auiAdvisorGuid[i])) - pAdvisor->DealDamage(pAdvisor, pAdvisor->GetMaxHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + for (uint8 i = 0; i < MAX_ADVISORS; ++i) + { + if (Creature* pAdvisor = m_pInstance->GetSingleCreatureFromStorage(aAdvisors[i])) + pAdvisor->DealDamage(pAdvisor, pAdvisor->GetMaxHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + } } } @@ -509,7 +523,8 @@ struct MANGOS_DLL_DECL boss_kaelthasAI : public ScriptedAI case 1: if (m_uiPhase_Timer < uiDiff) { - pAdvisor = m_creature->GetMap()->GetCreature(m_auiAdvisorGuid[0]); + if (m_pInstance) + pAdvisor = m_pInstance->GetSingleCreatureFromStorage(aAdvisors[0]); if (pAdvisor) { @@ -530,7 +545,8 @@ struct MANGOS_DLL_DECL boss_kaelthasAI : public ScriptedAI //Subphase 2 - Start case 2: - pAdvisor = m_creature->GetMap()->GetCreature(m_auiAdvisorGuid[0]); + if (m_pInstance) + pAdvisor = m_pInstance->GetSingleCreatureFromStorage(aAdvisors[0]); if (pAdvisor && (pAdvisor->getStandState() == UNIT_STAND_STATE_DEAD)) { @@ -546,7 +562,8 @@ struct MANGOS_DLL_DECL boss_kaelthasAI : public ScriptedAI case 3: if (m_uiPhase_Timer < uiDiff) { - pAdvisor = m_creature->GetMap()->GetCreature(m_auiAdvisorGuid[1]); + if (m_pInstance) + pAdvisor = m_pInstance->GetSingleCreatureFromStorage(aAdvisors[1]); if (pAdvisor) { @@ -567,7 +584,8 @@ struct MANGOS_DLL_DECL boss_kaelthasAI : public ScriptedAI //Subphase 3 - Start case 4: - pAdvisor = m_creature->GetMap()->GetCreature(m_auiAdvisorGuid[1]); + if (m_pInstance) + pAdvisor = m_pInstance->GetSingleCreatureFromStorage(aAdvisors[1]); if (pAdvisor && (pAdvisor->getStandState() == UNIT_STAND_STATE_DEAD)) { @@ -583,7 +601,8 @@ struct MANGOS_DLL_DECL boss_kaelthasAI : public ScriptedAI case 5: if (m_uiPhase_Timer < uiDiff) { - pAdvisor = m_creature->GetMap()->GetCreature(m_auiAdvisorGuid[2]); + if (m_pInstance) + pAdvisor = m_pInstance->GetSingleCreatureFromStorage(aAdvisors[2]); if (pAdvisor) { @@ -604,7 +623,8 @@ struct MANGOS_DLL_DECL boss_kaelthasAI : public ScriptedAI //Subphase 4 - Start case 6: - pAdvisor = m_creature->GetMap()->GetCreature(m_auiAdvisorGuid[2]); + if (m_pInstance) + pAdvisor = m_pInstance->GetSingleCreatureFromStorage(aAdvisors[2]); if (pAdvisor && (pAdvisor->getStandState() == UNIT_STAND_STATE_DEAD)) { @@ -620,7 +640,8 @@ struct MANGOS_DLL_DECL boss_kaelthasAI : public ScriptedAI case 7: if (m_uiPhase_Timer < uiDiff) { - pAdvisor = m_creature->GetMap()->GetCreature(m_auiAdvisorGuid[3]); + if (m_pInstance) + pAdvisor = m_pInstance->GetSingleCreatureFromStorage(aAdvisors[3]); if (pAdvisor) { @@ -639,7 +660,8 @@ struct MANGOS_DLL_DECL boss_kaelthasAI : public ScriptedAI //End of phase 1 case 8: - pAdvisor = m_creature->GetMap()->GetCreature(m_auiAdvisorGuid[3]); + if (m_pInstance) + pAdvisor = m_pInstance->GetSingleCreatureFromStorage(aAdvisors[3]); if (pAdvisor && (pAdvisor->getStandState() == UNIT_STAND_STATE_DEAD)) { @@ -707,14 +729,13 @@ struct MANGOS_DLL_DECL boss_kaelthasAI : public ScriptedAI for (uint32 i = 0; i < MAX_ADVISORS; ++i) { - Creature* pAdvisor = m_creature->GetMap()->GetCreature(m_auiAdvisorGuid[i]); - - if (!pAdvisor) - error_log("SD2: Kael'Thas Advisor %u does not exist. Possibly despawned? Incorrectly Killed?", i); - else + if (m_pInstance) { - if (advisorbase_ai* pAdvisorAI = dynamic_cast(pAdvisor->AI())) - pAdvisorAI->Revive(pTarget); + if (Creature* pAdvisor = m_pInstance->GetSingleCreatureFromStorage(aAdvisors[i])) + { + if (advisorbase_ai* pAdvisorAI = dynamic_cast(pAdvisor->AI())) + pAdvisorAI->Revive(pTarget); + } } } diff --git a/scripts/outland/tempest_keep/the_eye/instance_the_eye.cpp b/scripts/outland/tempest_keep/the_eye/instance_the_eye.cpp index d96ff0450..57abce989 100644 --- a/scripts/outland/tempest_keep/the_eye/instance_the_eye.cpp +++ b/scripts/outland/tempest_keep/the_eye/instance_the_eye.cpp @@ -25,13 +25,6 @@ EndScriptData */ #include "the_eye.h" instance_the_eye::instance_the_eye(Map* pMap) : ScriptedInstance(pMap), - m_uiThaladredGUID(0), - m_uiSanguinarGUID(0), - m_uiCapernianGUID(0), - m_uiTelonicusGUID(0), - m_uiKaelthasGUID(0), - m_uiAstromancerGUID(0), - m_uiKaelthasEventPhase(0) { Initialize(); @@ -60,12 +53,14 @@ void instance_the_eye::OnCreatureCreate(Creature* pCreature) { switch (pCreature->GetEntry()) { - case NPC_THALADRED: m_uiThaladredGUID = pCreature->GetGUID(); break; - case NPC_TELONICUS: m_uiTelonicusGUID = pCreature->GetGUID(); break; - case NPC_CAPERNIAN: m_uiCapernianGUID = pCreature->GetGUID(); break; - case NPC_SANGUINAR: m_uiSanguinarGUID = pCreature->GetGUID(); break; - case NPC_KAELTHAS: m_uiKaelthasGUID = pCreature->GetGUID(); break; - case NPC_ASTROMANCER: m_uiAstromancerGUID = pCreature->GetGUID(); break; + case NPC_THALADRED: + case NPC_TELONICUS: + case NPC_CAPERNIAN: + case NPC_SANGUINAR: + case NPC_KAELTHAS: + case NPC_ASTROMANCER: + m_mNpcEntryGuidStore[pCreature->GetEntry()] = pCreature->GetObjectGuid(); + break; } } @@ -101,22 +96,6 @@ uint32 instance_the_eye::GetData(uint32 uiType) } } -uint64 instance_the_eye::GetData64(uint32 uiData) -{ - switch(uiData) - { - case NPC_THALADRED: return m_uiThaladredGUID; - case NPC_SANGUINAR: return m_uiSanguinarGUID; - case NPC_CAPERNIAN: return m_uiCapernianGUID; - case NPC_TELONICUS: return m_uiTelonicusGUID; - case NPC_KAELTHAS: return m_uiKaelthasGUID; - case NPC_ASTROMANCER: return m_uiAstromancerGUID; - - default: - return 0; - } -} - InstanceData* GetInstanceData_instance_the_eye(Map* pMap) { return new instance_the_eye(pMap); diff --git a/scripts/outland/tempest_keep/the_eye/the_eye.h b/scripts/outland/tempest_keep/the_eye/the_eye.h index d848b0d0e..5537cb471 100644 --- a/scripts/outland/tempest_keep/the_eye/the_eye.h +++ b/scripts/outland/tempest_keep/the_eye/the_eye.h @@ -47,7 +47,6 @@ class MANGOS_DLL_DECL instance_the_eye : public ScriptedInstance void SetData(uint32 uiType, uint32 uiData); uint32 GetData(uint32 uiType); - uint64 GetData64(uint32 uiData); // No Save or Load needed to current knowledge @@ -55,13 +54,6 @@ class MANGOS_DLL_DECL instance_the_eye : public ScriptedInstance uint32 m_auiEncounter[MAX_ENCOUNTER]; uint32 m_uiKaelthasEventPhase; - - uint64 m_uiThaladredGUID; - uint64 m_uiSanguinarGUID; - uint64 m_uiCapernianGUID; - uint64 m_uiTelonicusGUID; - uint64 m_uiKaelthasGUID; - uint64 m_uiAstromancerGUID; }; #endif diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index f7f7c6fe7..a696707be 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2153" + #define SD2_REVISION_NR "2154" #endif // __SD2_REVISION_NR_H__ From 5166cd5f6889fa7ad4441927c6d543de7b7c49b1 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Thu, 2 Jun 2011 12:38:25 +0200 Subject: [PATCH 0134/1172] [2155] Use EntryGuidMap-Storage in Blackwing Lair --- .../blackwing_lair/blackwing_lair.h | 10 ----- .../blackwing_lair/boss_vaelastrasz.cpp | 11 ++--- .../instance_blackwing_lair.cpp | 40 ++++++------------- sd2_revision_nr.h | 2 +- 4 files changed, 20 insertions(+), 43 deletions(-) diff --git a/scripts/eastern_kingdoms/blackwing_lair/blackwing_lair.h b/scripts/eastern_kingdoms/blackwing_lair/blackwing_lair.h index c459f111f..c807afa6b 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/blackwing_lair.h +++ b/scripts/eastern_kingdoms/blackwing_lair/blackwing_lair.h @@ -58,16 +58,6 @@ class MANGOS_DLL_DECL instance_blackwing_lair : public ScriptedInstance protected: std::string m_strInstData; uint32 m_auiEncounter[MAX_ENCOUNTER]; - - // Doors - uint64 m_uiRazorgoreEnterDoorGUID; - uint64 m_uiRazorgoreExitDoorGUID; - uint64 m_uiVaelastraszDoorGUID; - uint64 m_uiLashlayerDoorGUID; - uint64 m_uiChromaggusEnterDoorGUID; - uint64 m_uiChromaggusExitDoorGUID; - uint64 m_uiChromaggusSideDoorGUID; - uint64 m_uiNefarianDoorGUID; }; #endif diff --git a/scripts/eastern_kingdoms/blackwing_lair/boss_vaelastrasz.cpp b/scripts/eastern_kingdoms/blackwing_lair/boss_vaelastrasz.cpp index 519eedfaa..729537e8d 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/boss_vaelastrasz.cpp +++ b/scripts/eastern_kingdoms/blackwing_lair/boss_vaelastrasz.cpp @@ -56,7 +56,7 @@ struct MANGOS_DLL_DECL boss_vaelastraszAI : public ScriptedAI ScriptedInstance* m_pInstance; - uint64 m_uiPlayerGUID; + ObjectGuid m_playerGuid; uint32 m_uiSpeachTimer; uint32 m_uiSpeachNum; uint32 m_uiCleaveTimer; @@ -70,7 +70,8 @@ struct MANGOS_DLL_DECL boss_vaelastraszAI : public ScriptedAI void Reset() { - m_uiPlayerGUID = 0; + m_playerGuid.Clear(); + m_uiSpeachTimer = 0; m_uiSpeachNum = 0; m_uiCleaveTimer = 8000; // These times are probably wrong @@ -86,7 +87,7 @@ struct MANGOS_DLL_DECL boss_vaelastraszAI : public ScriptedAI void BeginSpeach(Unit* target) { // Stand up and begin speach - m_uiPlayerGUID = target->GetGUID(); + m_playerGuid = target->GetObjectGuid(); // 10 seconds DoScriptText(SAY_LINE_1, m_creature); @@ -149,9 +150,9 @@ struct MANGOS_DLL_DECL boss_vaelastraszAI : public ScriptedAI m_creature->setFaction(103); m_creature->SetHealth(int(m_creature->GetMaxHealth()*.3)); - if (m_uiPlayerGUID) + if (m_playerGuid) { - if (Player* pPlayer = m_creature->GetMap()->GetPlayer(m_uiPlayerGUID)) + if (Player* pPlayer = m_creature->GetMap()->GetPlayer(m_playerGuid)) AttackStart(pPlayer); DoCastSpellIfCan(m_creature, SPELL_ESSENCE_OF_THE_RED); diff --git a/scripts/eastern_kingdoms/blackwing_lair/instance_blackwing_lair.cpp b/scripts/eastern_kingdoms/blackwing_lair/instance_blackwing_lair.cpp index a8b9a3f93..f0bf6a206 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/instance_blackwing_lair.cpp +++ b/scripts/eastern_kingdoms/blackwing_lair/instance_blackwing_lair.cpp @@ -25,15 +25,7 @@ EndScriptData */ #include "blackwing_lair.h" -instance_blackwing_lair::instance_blackwing_lair(Map* pMap) : ScriptedInstance(pMap), - m_uiRazorgoreEnterDoorGUID(0), - m_uiRazorgoreExitDoorGUID(0), - m_uiVaelastraszDoorGUID(0), - m_uiLashlayerDoorGUID(0), - m_uiChromaggusEnterDoorGUID(0), - m_uiChromaggusExitDoorGUID(0), - m_uiChromaggusSideDoorGUID(0), - m_uiNefarianDoorGUID(0) +instance_blackwing_lair::instance_blackwing_lair(Map* pMap) : ScriptedInstance(pMap) { Initialize(); } @@ -58,38 +50,32 @@ void instance_blackwing_lair::OnObjectCreate(GameObject* pGo) switch(pGo->GetEntry()) { case GO_DOOR_RAZORGORE_ENTER: - m_uiRazorgoreEnterDoorGUID = pGo->GetGUID(); break; case GO_DOOR_RAZORGORE_EXIT: - m_uiRazorgoreExitDoorGUID = pGo->GetGUID(); if (m_auiEncounter[TYPE_RAZORGORE] == DONE) pGo->SetGoState(GO_STATE_ACTIVE); break; case GO_DOOR_NEFARIAN: - m_uiNefarianDoorGUID = pGo->GetGUID(); - break; case GO_DOOR_CHROMAGGUS_ENTER: - m_uiChromaggusEnterDoorGUID = pGo->GetGUID(); - break; case GO_DOOR_CHROMAGGUS_SIDE: - m_uiChromaggusSideDoorGUID = pGo->GetGUID(); break; case GO_DOOR_CHROMAGGUS_EXIT: - m_uiChromaggusExitDoorGUID = pGo->GetGUID(); if (m_auiEncounter[TYPE_CHROMAGGUS] == DONE) pGo->SetGoState(GO_STATE_ACTIVE); break; case GO_DOOR_VAELASTRASZ: - m_uiVaelastraszDoorGUID = pGo->GetGUID(); if (m_auiEncounter[TYPE_VAELASTRASZ] == DONE) pGo->SetGoState(GO_STATE_ACTIVE); break; case GO_DOOR_LASHLAYER: - m_uiLashlayerDoorGUID = pGo->GetGUID(); if (m_auiEncounter[TYPE_LASHLAYER] == DONE) pGo->SetGoState(GO_STATE_ACTIVE); break; + + default: + return; } + m_mGoEntryGuidStore[pGo->GetEntry()] = pGo->GetObjectGuid(); } void instance_blackwing_lair::SetData(uint32 uiType, uint32 uiData) @@ -98,21 +84,21 @@ void instance_blackwing_lair::SetData(uint32 uiType, uint32 uiData) { case TYPE_RAZORGORE: m_auiEncounter[uiType] = uiData; - DoUseDoorOrButton(m_uiRazorgoreEnterDoorGUID); + DoUseDoorOrButton(GO_DOOR_RAZORGORE_ENTER); if (uiData == DONE) - DoUseDoorOrButton(m_uiRazorgoreExitDoorGUID); + DoUseDoorOrButton(GO_DOOR_RAZORGORE_EXIT); break; case TYPE_VAELASTRASZ: m_auiEncounter[uiType] = uiData; // Prevent the players from running back to the first room - DoUseDoorOrButton(m_uiRazorgoreExitDoorGUID); + DoUseDoorOrButton(GO_DOOR_RAZORGORE_EXIT); if (uiData == DONE) - DoUseDoorOrButton(m_uiVaelastraszDoorGUID); + DoUseDoorOrButton(GO_DOOR_VAELASTRASZ); break; case TYPE_LASHLAYER: m_auiEncounter[uiType] = uiData; if (uiData == DONE) - DoUseDoorOrButton(m_uiLashlayerDoorGUID); + DoUseDoorOrButton(GO_DOOR_LASHLAYER); break; case TYPE_FIREMAW: case TYPE_EBONROC: @@ -121,13 +107,13 @@ void instance_blackwing_lair::SetData(uint32 uiType, uint32 uiData) break; case TYPE_CHROMAGGUS: m_auiEncounter[uiType] = uiData; - DoUseDoorOrButton(m_uiChromaggusEnterDoorGUID); + DoUseDoorOrButton(GO_DOOR_CHROMAGGUS_ENTER); if (uiData == DONE) - DoUseDoorOrButton(m_uiChromaggusExitDoorGUID); + DoUseDoorOrButton(GO_DOOR_CHROMAGGUS_EXIT); break; case TYPE_NEFARIAN: m_auiEncounter[uiType] = uiData; - DoUseDoorOrButton(m_uiNefarianDoorGUID); + DoUseDoorOrButton(GO_DOOR_NEFARIAN); break; } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index a696707be..5c0b24135 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2154" + #define SD2_REVISION_NR "2155" #endif // __SD2_REVISION_NR_H__ From 35fe83ffb97bd854411d02faba6324946bfc7ec4 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Thu, 2 Jun 2011 12:46:01 +0200 Subject: [PATCH 0135/1172] [2155] Move Dead Mines instance script to header version --- .../eastern_kingdoms/deadmines/deadmines.h | 24 ++ .../deadmines/instance_deadmines.cpp | 287 +++++++++--------- 2 files changed, 165 insertions(+), 146 deletions(-) diff --git a/scripts/eastern_kingdoms/deadmines/deadmines.h b/scripts/eastern_kingdoms/deadmines/deadmines.h index b75325bc8..ad76128bb 100644 --- a/scripts/eastern_kingdoms/deadmines/deadmines.h +++ b/scripts/eastern_kingdoms/deadmines/deadmines.h @@ -35,4 +35,28 @@ enum NPC_SQUALLSHAPER = 1732, }; +class MANGOS_DLL_DECL instance_deadmines : public ScriptedInstance +{ + public: + instance_deadmines(Map* pMap); + + void Initialize(); + + void OnCreatureCreate(Creature* pCreature); + void OnObjectCreate(GameObject* pGo); + + void OnCreatureDeath(Creature* pCreature); + + void SetData(uint32 uiType, uint32 uiData); + uint32 GetData(uint32 uiType); + + void Update(uint32 uiDiff); + + private: + uint32 m_auiEncounter[MAX_ENCOUNTER]; + + uint32 m_uiIronDoorTimer; + uint32 m_uiDoorStep; +}; + #endif diff --git a/scripts/eastern_kingdoms/deadmines/instance_deadmines.cpp b/scripts/eastern_kingdoms/deadmines/instance_deadmines.cpp index 9f46e792a..283dfccf1 100644 --- a/scripts/eastern_kingdoms/deadmines/instance_deadmines.cpp +++ b/scripts/eastern_kingdoms/deadmines/instance_deadmines.cpp @@ -24,190 +24,184 @@ EndScriptData */ #include "precompiled.h" #include "deadmines.h" -struct MANGOS_DLL_DECL instance_deadmines : public ScriptedInstance +instance_deadmines::instance_deadmines(Map* pMap) : ScriptedInstance(pMap), + m_uiIronDoorTimer(0), + m_uiDoorStep(0) { - instance_deadmines(Map* pMap) : ScriptedInstance(pMap) {Initialize();}; + Initialize(); +} - uint32 m_auiEncounter[MAX_ENCOUNTER]; +void instance_deadmines::Initialize() +{ + memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); +} - uint32 m_uiIronDoor_Timer; - uint32 m_uiDoor_Step; +void instance_deadmines::OnCreatureCreate(Creature* pCreature) +{ + if (pCreature->GetEntry() == NPC_MR_SMITE) + m_mNpcEntryGuidStore[NPC_MR_SMITE] = pCreature->GetObjectGuid(); +} - void Initialize() +void instance_deadmines::OnObjectCreate(GameObject* pGo) +{ + switch(pGo->GetEntry()) { - memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); - - m_uiIronDoor_Timer = 0; - m_uiDoor_Step = 0; + case GO_FACTORY_DOOR: + if (GetData(TYPE_RHAHKZOR) == DONE) + pGo->SetGoState(GO_STATE_ACTIVE); + + break; + case GO_MAST_ROOM_DOOR: + if (GetData(TYPE_SNEED) == DONE) + pGo->SetGoState(GO_STATE_ACTIVE); + + break; + case GO_FOUNDRY_DOOR: + if (GetData(TYPE_GILNID) == DONE) + pGo->SetGoState(GO_STATE_ACTIVE); + + break; + case GO_IRON_CLAD_DOOR: + case GO_DEFIAS_CANNON: + case GO_SMITE_CHEST: + break; + + default: + return; } - void OnCreatureCreate(Creature* pCreature) - { - if (pCreature->GetEntry() == NPC_MR_SMITE) - m_mNpcEntryGuidStore[NPC_MR_SMITE] = pCreature->GetObjectGuid(); - } + m_mGoEntryGuidStore[pGo->GetEntry()] = pGo->GetObjectGuid(); +} - void OnObjectCreate(GameObject* pGo) +void instance_deadmines::OnCreatureDeath(Creature* pCreature) +{ + switch(pCreature->GetEntry()) { - switch(pGo->GetEntry()) - { - case GO_FACTORY_DOOR: - if (GetData(TYPE_RHAHKZOR) == DONE) - pGo->SetGoState(GO_STATE_ACTIVE); - - break; - case GO_MAST_ROOM_DOOR: - if (GetData(TYPE_SNEED) == DONE) - pGo->SetGoState(GO_STATE_ACTIVE); - - break; - case GO_FOUNDRY_DOOR: - if (GetData(TYPE_GILNID) == DONE) - pGo->SetGoState(GO_STATE_ACTIVE); - - break; - case GO_IRON_CLAD_DOOR: - case GO_DEFIAS_CANNON: - case GO_SMITE_CHEST: - break; - - default: - return; - } - - m_mGoEntryGuidStore[pGo->GetEntry()] = pGo->GetObjectGuid(); + case NPC_RHAHKZOR: + SetData(TYPE_RHAHKZOR, DONE); + break; + case NPC_SNEED: + SetData(TYPE_SNEED, DONE); + break; + case NPC_GILNID: + SetData(TYPE_GILNID, DONE); + break; } +} - void OnCreatureDeath(Creature* pCreature) +void instance_deadmines::SetData(uint32 uiType, uint32 uiData) +{ + switch(uiType) { - switch(pCreature->GetEntry()) + case TYPE_RHAHKZOR: { - case NPC_RHAHKZOR: - SetData(TYPE_RHAHKZOR, DONE); - break; - case NPC_SNEED: - SetData(TYPE_SNEED, DONE); - break; - case NPC_GILNID: - SetData(TYPE_GILNID, DONE); - break; - } - } + if (uiData == DONE) + DoUseDoorOrButton(GO_FACTORY_DOOR); - void SetData(uint32 uiType, uint32 uiData) - { - switch(uiType) + m_auiEncounter[1] = uiData; + break; + } + case TYPE_SNEED: { - case TYPE_RHAHKZOR: - { - if (uiData == DONE) - DoUseDoorOrButton(GO_FACTORY_DOOR); - - m_auiEncounter[1] = uiData; - break; - } - case TYPE_SNEED: - { - if (uiData == DONE) - DoUseDoorOrButton(GO_MAST_ROOM_DOOR); + if (uiData == DONE) + DoUseDoorOrButton(GO_MAST_ROOM_DOOR); - m_auiEncounter[2] = uiData; - break; - } - case TYPE_GILNID: - { - if (uiData == DONE) - DoUseDoorOrButton(GO_FOUNDRY_DOOR); + m_auiEncounter[2] = uiData; + break; + } + case TYPE_GILNID: + { + if (uiData == DONE) + DoUseDoorOrButton(GO_FOUNDRY_DOOR); - m_auiEncounter[3] = uiData; - break; - } - case TYPE_DEFIAS_ENDDOOR: + m_auiEncounter[3] = uiData; + break; + } + case TYPE_DEFIAS_ENDDOOR: + { + if (uiData == IN_PROGRESS) { - if (uiData == IN_PROGRESS) + if (GameObject* pGo = GetSingleGameObjectFromStorage(GO_IRON_CLAD_DOOR)) { - if (GameObject* pGo = GetSingleGameObjectFromStorage(GO_IRON_CLAD_DOOR)) - { - pGo->SetGoState(GO_STATE_ACTIVE_ALTERNATIVE); - m_uiIronDoor_Timer = 3000; - } + pGo->SetGoState(GO_STATE_ACTIVE_ALTERNATIVE); + m_uiIronDoorTimer = 3000; } - m_auiEncounter[0] = uiData; - break; } + m_auiEncounter[0] = uiData; + break; } } +} - uint32 GetData(uint32 uiType) +uint32 instance_deadmines::GetData(uint32 uiType) +{ + switch(uiType) { - switch(uiType) - { - case TYPE_DEFIAS_ENDDOOR: - return m_auiEncounter[0]; - case TYPE_RHAHKZOR: - return m_auiEncounter[1]; - case TYPE_SNEED: - return m_auiEncounter[2]; - case TYPE_GILNID: - return m_auiEncounter[3]; - } - - return 0; + case TYPE_DEFIAS_ENDDOOR: + return m_auiEncounter[0]; + case TYPE_RHAHKZOR: + return m_auiEncounter[1]; + case TYPE_SNEED: + return m_auiEncounter[2]; + case TYPE_GILNID: + return m_auiEncounter[3]; } - void Update(uint32 uiDiff) + return 0; +} + +void instance_deadmines::Update(uint32 uiDiff) +{ + if (m_uiIronDoorTimer) { - if (m_uiIronDoor_Timer) + if (m_uiIronDoorTimer <= uiDiff) { - if (m_uiIronDoor_Timer <= uiDiff) + if (Creature* pMrSmite = GetSingleCreatureFromStorage(NPC_MR_SMITE)) { - if (Creature* pMrSmite = GetSingleCreatureFromStorage(NPC_MR_SMITE)) + switch(m_uiDoorStep) { - switch(m_uiDoor_Step) + case 0: + DoScriptText(INST_SAY_ALARM1,pMrSmite); + m_uiIronDoorTimer = 2000; + ++m_uiDoorStep; + break; + case 1: { - case 0: - DoScriptText(INST_SAY_ALARM1,pMrSmite); - m_uiIronDoor_Timer = 2000; - ++m_uiDoor_Step; - break; - case 1: + if (GameObject* pDoor = GetSingleGameObjectFromStorage(GO_IRON_CLAD_DOOR)) { - if (GameObject* pDoor = GetSingleGameObjectFromStorage(GO_IRON_CLAD_DOOR)) + // should be static spawns, fetch the closest ones at the pier + if (Creature* pi1 = GetClosestCreatureWithEntry(pDoor, NPC_PIRATE, 40.0f)) { - // should be static spawns, fetch the closest ones at the pier - if (Creature* pi1 = GetClosestCreatureWithEntry(pDoor, NPC_PIRATE, 40.0f)) - { - pi1->RemoveSplineFlag(SPLINEFLAG_WALKMODE); - pi1->GetMotionMaster()->MovePoint(0, pDoor->GetPositionX(), pDoor->GetPositionY(), pDoor->GetPositionZ()); - } - - if (Creature* pi2 = GetClosestCreatureWithEntry(pDoor, NPC_SQUALLSHAPER, 40.0f)) - { - pi2->RemoveSplineFlag(SPLINEFLAG_WALKMODE); - pi2->GetMotionMaster()->MovePoint(0, pDoor->GetPositionX(), pDoor->GetPositionY(), pDoor->GetPositionZ()); - } + pi1->RemoveSplineFlag(SPLINEFLAG_WALKMODE); + pi1->GetMotionMaster()->MovePoint(0, pDoor->GetPositionX(), pDoor->GetPositionY(), pDoor->GetPositionZ()); } - ++m_uiDoor_Step; - m_uiIronDoor_Timer = 10000; - break; + if (Creature* pi2 = GetClosestCreatureWithEntry(pDoor, NPC_SQUALLSHAPER, 40.0f)) + { + pi2->RemoveSplineFlag(SPLINEFLAG_WALKMODE); + pi2->GetMotionMaster()->MovePoint(0, pDoor->GetPositionX(), pDoor->GetPositionY(), pDoor->GetPositionZ()); + } } - case 2: - DoScriptText(INST_SAY_ALARM2,pMrSmite); - m_uiDoor_Step = 0; - m_uiIronDoor_Timer = 0; - debug_log("SD2: Instance Deadmines: Iron door event reached end."); - break; + + ++m_uiDoorStep; + m_uiIronDoorTimer = 10000; + break; } + case 2: + DoScriptText(INST_SAY_ALARM2,pMrSmite); + m_uiDoorStep = 0; + m_uiIronDoorTimer = 0; + debug_log("SD2: Instance Deadmines: Iron door event reached end."); + break; } - else - m_uiIronDoor_Timer = 0; } else - m_uiIronDoor_Timer -= uiDiff; + m_uiIronDoorTimer = 0; } + else + m_uiIronDoorTimer -= uiDiff; } -}; +} InstanceData* GetInstanceData_instance_deadmines(Map* pMap) { @@ -216,9 +210,10 @@ InstanceData* GetInstanceData_instance_deadmines(Map* pMap) void AddSC_instance_deadmines() { - Script *newscript; - newscript = new Script; - newscript->Name = "instance_deadmines"; - newscript->GetInstanceData = &GetInstanceData_instance_deadmines; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "instance_deadmines"; + pNewScript->GetInstanceData = &GetInstanceData_instance_deadmines; + pNewScript->RegisterSelf(); } From 6976a2f96894d2f6025d0cd4c42a8ccbfd35f116 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Thu, 2 Jun 2011 13:12:19 +0200 Subject: [PATCH 0136/1172] [2156] Use EntryGuidMap-Storage in Gnomeregan Also remove comment related to Thermaplugg door Replace a few uint64 GUIDs with ObjectGuid --- .../gnomeregan/boss_thermaplugg.cpp | 2 +- .../gnomeregan/gnomeregan.cpp | 36 +++---- .../eastern_kingdoms/gnomeregan/gnomeregan.h | 14 +-- .../gnomeregan/instance_gnomeregan.cpp | 100 ++++++++---------- sd2_revision_nr.h | 2 +- 5 files changed, 68 insertions(+), 86 deletions(-) diff --git a/scripts/eastern_kingdoms/gnomeregan/boss_thermaplugg.cpp b/scripts/eastern_kingdoms/gnomeregan/boss_thermaplugg.cpp index fa6dfa187..6ba2a4b77 100644 --- a/scripts/eastern_kingdoms/gnomeregan/boss_thermaplugg.cpp +++ b/scripts/eastern_kingdoms/gnomeregan/boss_thermaplugg.cpp @@ -211,7 +211,7 @@ struct MANGOS_DLL_DECL boss_thermapluggAI : public ScriptedAI { // Calculate the spawning position as 90% between face and thermaplugg spawn-pos, and hight hardcoded float fX = 0.0f, fY = 0.0f; - if (GameObject* pFace = m_creature->GetMap()->GetGameObject(m_asBombFaces[i].m_uiGnomeFaceGUID)) + if (GameObject* pFace = m_creature->GetMap()->GetGameObject(m_asBombFaces[i].m_gnomeFaceGuid)) { fX = 0.35*m_afSpawnPos[0] + 0.65*pFace->GetPositionX(); fY = 0.35*m_afSpawnPos[1] + 0.65*pFace->GetPositionY(); diff --git a/scripts/eastern_kingdoms/gnomeregan/gnomeregan.cpp b/scripts/eastern_kingdoms/gnomeregan/gnomeregan.cpp index ad53e4f0e..7aa13def2 100644 --- a/scripts/eastern_kingdoms/gnomeregan/gnomeregan.cpp +++ b/scripts/eastern_kingdoms/gnomeregan/gnomeregan.cpp @@ -141,7 +141,7 @@ struct MANGOS_DLL_DECL npc_blastmaster_emi_shortfuseAI : public npc_escortAI uint8 m_uiPhase; uint32 m_uiPhaseTimer; - uint64 m_uiPlayerGUID; + ObjectGuid m_playerGuid; bool m_bDidAggroText, m_bSouthernCaveInOpened, m_bNorthernCaveInOpened; GUIDList m_luiSummonedMobGUIDs; @@ -177,7 +177,7 @@ struct MANGOS_DLL_DECL npc_blastmaster_emi_shortfuseAI : public npc_escortAI case NPC_CAVERNDEEP_BURROWER: case NPC_CAVERNDEEP_AMBUSHER: { - if (GameObject* pDoor = m_creature->GetMap()->GetGameObject(m_pInstance->GetData64(m_uiPhase > 20 ? GO_CAVE_IN_NORTH : GO_CAVE_IN_SOUTH))) + if (GameObject* pDoor = m_pInstance->GetSingleGameObjectFromStorage(m_uiPhase > 20 ? GO_CAVE_IN_NORTH : GO_CAVE_IN_SOUTH)) { float fX, fY, fZ; pDoor->GetNearPoint(pDoor, fX, fY, fZ, 0.0f, 2.0f, frand(0.0f, 2*M_PI_F)); @@ -247,9 +247,9 @@ struct MANGOS_DLL_DECL npc_blastmaster_emi_shortfuseAI : public npc_escortAI m_pInstance->SetData(TYPE_GRUBBIS, FAIL); if (m_bSouthernCaveInOpened) // close southern cave-in door - m_pInstance->DoUseDoorOrButton(m_pInstance->GetData64(GO_CAVE_IN_SOUTH)); + m_pInstance->DoUseDoorOrButton(GO_CAVE_IN_SOUTH); if (m_bNorthernCaveInOpened) // close northern cave-in door - m_pInstance->DoUseDoorOrButton(m_pInstance->GetData64(GO_CAVE_IN_NORTH)); + m_pInstance->DoUseDoorOrButton(GO_CAVE_IN_NORTH); for (GUIDList::const_iterator itr = m_luiSummonedMobGUIDs.begin(); itr != m_luiSummonedMobGUIDs.end(); ++itr) { @@ -258,7 +258,7 @@ struct MANGOS_DLL_DECL npc_blastmaster_emi_shortfuseAI : public npc_escortAI } } - void StartEvent(uint64 uiPlayerGUID) + void StartEvent(Player* pPlayer) { if (!m_pInstance) return; @@ -267,7 +267,7 @@ struct MANGOS_DLL_DECL npc_blastmaster_emi_shortfuseAI : public npc_escortAI m_uiPhase = 1; m_uiPhaseTimer = 1000; - m_uiPlayerGUID = uiPlayerGUID; + m_playerGuid = pPlayer->GetObjectGuid(); } void WaypointStart(uint32 uiPointId) @@ -277,7 +277,7 @@ struct MANGOS_DLL_DECL npc_blastmaster_emi_shortfuseAI : public npc_escortAI case 10: // Open Southern Cave-In if (m_pInstance && !m_bSouthernCaveInOpened) - m_pInstance->DoUseDoorOrButton(m_pInstance->GetData64(GO_CAVE_IN_SOUTH)); + m_pInstance->DoUseDoorOrButton(GO_CAVE_IN_SOUTH); m_bSouthernCaveInOpened = true; break; case 12: @@ -287,7 +287,7 @@ struct MANGOS_DLL_DECL npc_blastmaster_emi_shortfuseAI : public npc_escortAI DoScriptText(SAY_CHARGE_3, m_creature); // Open Northern Cave-In if (m_pInstance && !m_bNorthernCaveInOpened) - m_pInstance->DoUseDoorOrButton(m_pInstance->GetData64(GO_CAVE_IN_NORTH)); + m_pInstance->DoUseDoorOrButton(GO_CAVE_IN_NORTH); m_bNorthernCaveInOpened = true; break; } @@ -315,7 +315,7 @@ struct MANGOS_DLL_DECL npc_blastmaster_emi_shortfuseAI : public npc_escortAI SetEscortPaused(true); if (m_pInstance) { - if (GameObject* pDoor = m_pInstance->instance->GetGameObject(m_pInstance->GetData64(GO_CAVE_IN_SOUTH))) + if (GameObject* pDoor = m_pInstance->GetSingleGameObjectFromStorage(GO_CAVE_IN_SOUTH)) m_creature->SetFacingToObject(pDoor); } DoScriptText(SAY_BLOW_1_10, m_creature); @@ -357,7 +357,7 @@ struct MANGOS_DLL_DECL npc_blastmaster_emi_shortfuseAI : public npc_escortAI m_uiPhaseTimer = 3500; // 6s delay, but 2500ms for escortstarting break; case 3: - Start(false, m_creature->GetMap()->GetPlayer(m_uiPlayerGUID), NULL, false, false); + Start(false, m_creature->GetMap()->GetPlayer(m_playerGuid), NULL, false, false); m_uiPhaseTimer = 0; break; @@ -377,7 +377,7 @@ struct MANGOS_DLL_DECL npc_blastmaster_emi_shortfuseAI : public npc_escortAI case 7: if (m_pInstance) { - if (GameObject* pDoor = m_pInstance->instance->GetGameObject(m_pInstance->GetData64(GO_CAVE_IN_SOUTH))) + if (GameObject* pDoor = m_pInstance->GetSingleGameObjectFromStorage(GO_CAVE_IN_SOUTH)) m_creature->SetFacingToObject(pDoor); } m_uiPhaseTimer = 2000; @@ -425,7 +425,7 @@ struct MANGOS_DLL_DECL npc_blastmaster_emi_shortfuseAI : public npc_escortAI m_uiPhaseTimer = 1; break; case 15: // shortly before starting WP 14 - if (Player* pPlayer = m_creature->GetMap()->GetPlayer(m_uiPlayerGUID)) + if (Player* pPlayer = m_creature->GetMap()->GetPlayer(m_playerGuid)) m_creature->SetFacingToObject(pPlayer); DoScriptText(SAY_CHARGE_2, m_creature); m_uiPhaseTimer = 0; @@ -447,7 +447,7 @@ struct MANGOS_DLL_DECL npc_blastmaster_emi_shortfuseAI : public npc_escortAI // Close southern cave-in and let charges explode if (m_pInstance) { - m_pInstance->DoUseDoorOrButton(m_pInstance->GetData64(GO_CAVE_IN_SOUTH)); + m_pInstance->DoUseDoorOrButton(GO_CAVE_IN_SOUTH); m_bSouthernCaveInOpened = false; m_pInstance->SetData(TYPE_EXPLOSIVE_CHARGE, DATA_EXPLOSIVE_CHARGE_USE); } @@ -468,7 +468,7 @@ struct MANGOS_DLL_DECL npc_blastmaster_emi_shortfuseAI : public npc_escortAI case 23: if (m_pInstance) { - if (GameObject* pDoor = m_pInstance->instance->GetGameObject(m_pInstance->GetData64(GO_CAVE_IN_NORTH))) + if (GameObject* pDoor = m_pInstance->GetSingleGameObjectFromStorage(GO_CAVE_IN_NORTH)) m_creature->SetFacingToObject(pDoor); } m_uiPhaseTimer = 3000; @@ -520,7 +520,7 @@ struct MANGOS_DLL_DECL npc_blastmaster_emi_shortfuseAI : public npc_escortAI case 31: // shortly after reaching WP 19 if (m_pInstance) { - if (GameObject* pDoor = m_pInstance->instance->GetGameObject(m_pInstance->GetData64(GO_CAVE_IN_NORTH))) + if (GameObject* pDoor = m_pInstance->GetSingleGameObjectFromStorage(GO_CAVE_IN_NORTH)) m_creature->SetFacingToObject(pDoor); } DoScriptText(SAY_BLOW_2_10, m_creature); @@ -538,7 +538,7 @@ struct MANGOS_DLL_DECL npc_blastmaster_emi_shortfuseAI : public npc_escortAI case 34: // 1 sek after Death of Grubbis if (m_pInstance) { - if (GameObject* pDoor = m_pInstance->instance->GetGameObject(m_pInstance->GetData64(GO_CAVE_IN_NORTH))) + if (GameObject* pDoor = m_pInstance->GetSingleGameObjectFromStorage(GO_CAVE_IN_NORTH)) m_creature->SetFacingToObject(pDoor); } m_creature->HandleEmote(EMOTE_ONESHOT_CHEER); @@ -564,7 +564,7 @@ struct MANGOS_DLL_DECL npc_blastmaster_emi_shortfuseAI : public npc_escortAI // Close northern cave-in and let charges explode if (m_pInstance) { - m_pInstance->DoUseDoorOrButton(m_pInstance->GetData64(GO_CAVE_IN_NORTH)); + m_pInstance->DoUseDoorOrButton(GO_CAVE_IN_NORTH); m_bNorthernCaveInOpened = false; m_pInstance->SetData(TYPE_EXPLOSIVE_CHARGE, DATA_EXPLOSIVE_CHARGE_USE); } @@ -616,7 +616,7 @@ bool GossipSelect_npc_blastmaster_emi_shortfuse(Player* pPlayer, Creature* pCrea if (pInstance->GetData(TYPE_GRUBBIS) == NOT_STARTED || pInstance->GetData(TYPE_GRUBBIS) == FAIL) { if (npc_blastmaster_emi_shortfuseAI* pEmiAI = dynamic_cast(pCreature->AI())) - pEmiAI->StartEvent(pPlayer->GetGUID()); + pEmiAI->StartEvent(pPlayer); } } } diff --git a/scripts/eastern_kingdoms/gnomeregan/gnomeregan.h b/scripts/eastern_kingdoms/gnomeregan/gnomeregan.h index adb835bc1..7077f66a8 100644 --- a/scripts/eastern_kingdoms/gnomeregan/gnomeregan.h +++ b/scripts/eastern_kingdoms/gnomeregan/gnomeregan.h @@ -46,7 +46,7 @@ enum struct sBombFace { - uint64 m_uiGnomeFaceGUID; + ObjectGuid m_gnomeFaceGuid; bool m_bActivated; uint32 m_uiBombTimer; }; @@ -64,26 +64,20 @@ class MANGOS_DLL_DECL instance_gnomeregan : public ScriptedInstance void SetData(uint32 uiType, uint32 uiData); uint32 GetData(uint32 uiType); - uint64 GetData64(uint32 uiData); sBombFace* GetBombFaces(); void DoActivateBombFace(uint8 uiIndex); void DoDeactivateBombFace(uint8 uiIndex); - const char* Save() { return strInstData.c_str(); } + const char* Save() { return m_strInstData.c_str(); } void Load(const char* chrIn); protected: uint32 m_auiEncounter[MAX_ENCOUNTER]; - std::string strInstData; + std::string m_strInstData; sBombFace m_asBombFaces[MAX_GNOME_FACES]; - uint64 m_auiExplosiveSortedGUIDs[2][MAX_EXPLOSIVES_PER_SIDE]; - - uint64 m_uiBlastmasterShortfuseGUID; - uint64 m_uiCaveInNorthGUID; - uint64 m_uiCaveInSouthGUID; - uint64 m_uiDoorFinalChamberGUID; + ObjectGuid m_aExplosiveSortedGuids[2][MAX_EXPLOSIVES_PER_SIDE]; GUIDList m_luiExplosiveChargeGUIDs; GUIDList m_luiSpawnedExplosiveChargeGUIDs; diff --git a/scripts/eastern_kingdoms/gnomeregan/instance_gnomeregan.cpp b/scripts/eastern_kingdoms/gnomeregan/instance_gnomeregan.cpp index 0eabbd761..1f759e100 100644 --- a/scripts/eastern_kingdoms/gnomeregan/instance_gnomeregan.cpp +++ b/scripts/eastern_kingdoms/gnomeregan/instance_gnomeregan.cpp @@ -24,11 +24,7 @@ EndScriptData */ #include "precompiled.h" #include "gnomeregan.h" -instance_gnomeregan::instance_gnomeregan(Map* pMap) : ScriptedInstance(pMap), - m_uiBlastmasterShortfuseGUID(0), - m_uiCaveInNorthGUID(0), - m_uiCaveInSouthGUID(0), - m_uiDoorFinalChamberGUID(0) +instance_gnomeregan::instance_gnomeregan(Map* pMap) : ScriptedInstance(pMap) { Initialize(); } @@ -36,34 +32,39 @@ instance_gnomeregan::instance_gnomeregan(Map* pMap) : ScriptedInstance(pMap), void instance_gnomeregan::Initialize() { memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); - memset(&m_asBombFaces, 0, sizeof(m_asBombFaces)); - memset(&m_auiExplosiveSortedGUIDs, 0, sizeof(m_auiExplosiveSortedGUIDs)); + + for (uint8 i = 0; i < MAX_GNOME_FACES; ++i) + { + m_asBombFaces[i].m_bActivated = false; + m_asBombFaces[i].m_uiBombTimer = 0; + } } void instance_gnomeregan::OnCreatureCreate(Creature* pCreature) { - switch (pCreature->GetEntry()) - { - case NPC_BLASTMASTER_SHORTFUSE: m_uiBlastmasterShortfuseGUID = pCreature->GetGUID(); break; - } + if (pCreature->GetEntry() == NPC_BLASTMASTER_SHORTFUSE) + m_mNpcEntryGuidStore[NPC_BLASTMASTER_SHORTFUSE] = pCreature->GetObjectGuid(); } void instance_gnomeregan::OnObjectCreate(GameObject* pGo) { switch(pGo->GetEntry()) { - case GO_RED_ROCKET: m_lRedRocketGUIDs.push_back(pGo->GetGUID()); break; - case GO_CAVE_IN_NORTH: m_uiCaveInNorthGUID = pGo->GetGUID(); break; - case GO_CAVE_IN_SOUTH: m_uiCaveInSouthGUID = pGo->GetGUID(); break; - case GO_EXPLOSIVE_CHARGE: m_luiExplosiveChargeGUIDs.push_back(pGo->GetGUID()); break; - case GO_THE_FINAL_CHAMBER: m_uiDoorFinalChamberGUID = pGo->GetGUID(); break; - - case GO_GNOME_FACE_1: m_asBombFaces[0].m_uiGnomeFaceGUID = pGo->GetGUID(); break; - case GO_GNOME_FACE_2: m_asBombFaces[1].m_uiGnomeFaceGUID = pGo->GetGUID(); break; - case GO_GNOME_FACE_3: m_asBombFaces[2].m_uiGnomeFaceGUID = pGo->GetGUID(); break; - case GO_GNOME_FACE_4: m_asBombFaces[3].m_uiGnomeFaceGUID = pGo->GetGUID(); break; - case GO_GNOME_FACE_5: m_asBombFaces[4].m_uiGnomeFaceGUID = pGo->GetGUID(); break; - case GO_GNOME_FACE_6: m_asBombFaces[5].m_uiGnomeFaceGUID = pGo->GetGUID(); break; + case GO_CAVE_IN_NORTH: + case GO_CAVE_IN_SOUTH: + case GO_THE_FINAL_CHAMBER: + m_mGoEntryGuidStore[pGo->GetEntry()] = pGo->GetObjectGuid(); + break; + + case GO_RED_ROCKET: m_lRedRocketGUIDs.push_back(pGo->GetGUID()); return; + case GO_EXPLOSIVE_CHARGE: m_luiExplosiveChargeGUIDs.push_back(pGo->GetGUID()); return; + + case GO_GNOME_FACE_1: m_asBombFaces[0].m_gnomeFaceGuid = pGo->GetObjectGuid(); return; + case GO_GNOME_FACE_2: m_asBombFaces[1].m_gnomeFaceGuid = pGo->GetObjectGuid(); return; + case GO_GNOME_FACE_3: m_asBombFaces[2].m_gnomeFaceGuid = pGo->GetObjectGuid(); return; + case GO_GNOME_FACE_4: m_asBombFaces[3].m_gnomeFaceGuid = pGo->GetObjectGuid(); return; + case GO_GNOME_FACE_5: m_asBombFaces[4].m_gnomeFaceGuid = pGo->GetObjectGuid(); return; + case GO_GNOME_FACE_6: m_asBombFaces[5].m_gnomeFaceGuid = pGo->GetObjectGuid(); return; } } @@ -97,20 +98,20 @@ void instance_gnomeregan::SetData(uint32 uiType, uint32 uiData) // Sort to south and north uint8 uiCounterSouth = 0; uint8 uiCounterNorth = 0; - GameObject* pCaveInSouth = instance->GetGameObject(m_uiCaveInSouthGUID); - GameObject* pCaveInNorth = instance->GetGameObject(m_uiCaveInNorthGUID); + GameObject* pCaveInSouth = GetSingleGameObjectFromStorage(GO_CAVE_IN_SOUTH); + GameObject* pCaveInNorth = GetSingleGameObjectFromStorage(GO_CAVE_IN_NORTH); if (pCaveInSouth && pCaveInNorth) { for (std::list::iterator itr = lExplosiveCharges.begin(); itr != lExplosiveCharges.end(); ++itr) { if ((*itr)->GetDistanceOrder(pCaveInSouth, pCaveInNorth) && uiCounterSouth < MAX_EXPLOSIVES_PER_SIDE) { - m_auiExplosiveSortedGUIDs[0][uiCounterSouth] = (*itr)->GetGUID(); + m_aExplosiveSortedGuids[0][uiCounterSouth] = (*itr)->GetObjectGuid(); ++uiCounterSouth; } else if (uiCounterNorth < MAX_EXPLOSIVES_PER_SIDE) { - m_auiExplosiveSortedGUIDs[1][uiCounterNorth] = (*itr)->GetGUID(); + m_aExplosiveSortedGuids[1][uiCounterNorth] = (*itr)->GetObjectGuid(); ++uiCounterNorth; } } @@ -132,23 +133,23 @@ void instance_gnomeregan::SetData(uint32 uiType, uint32 uiData) switch (uiData) { case DATA_EXPLOSIVE_CHARGE_1: - DoRespawnGameObject(m_auiExplosiveSortedGUIDs[0][0], HOUR); - m_luiSpawnedExplosiveChargeGUIDs.push_back(m_auiExplosiveSortedGUIDs[0][0]); + DoRespawnGameObject(m_aExplosiveSortedGuids[0][0], HOUR); + m_luiSpawnedExplosiveChargeGUIDs.push_back(m_aExplosiveSortedGuids[0][0].GetRawValue()); break; case DATA_EXPLOSIVE_CHARGE_2: - DoRespawnGameObject(m_auiExplosiveSortedGUIDs[0][1], HOUR); - m_luiSpawnedExplosiveChargeGUIDs.push_back(m_auiExplosiveSortedGUIDs[0][1]); + DoRespawnGameObject(m_aExplosiveSortedGuids[0][1], HOUR); + m_luiSpawnedExplosiveChargeGUIDs.push_back(m_aExplosiveSortedGuids[0][1].GetRawValue()); break; case DATA_EXPLOSIVE_CHARGE_3: - DoRespawnGameObject(m_auiExplosiveSortedGUIDs[1][0], HOUR); - m_luiSpawnedExplosiveChargeGUIDs.push_back(m_auiExplosiveSortedGUIDs[1][0]); + DoRespawnGameObject(m_aExplosiveSortedGuids[1][0], HOUR); + m_luiSpawnedExplosiveChargeGUIDs.push_back(m_aExplosiveSortedGuids[1][0].GetRawValue()); break; case DATA_EXPLOSIVE_CHARGE_4: - DoRespawnGameObject(m_auiExplosiveSortedGUIDs[1][1], HOUR); - m_luiSpawnedExplosiveChargeGUIDs.push_back(m_auiExplosiveSortedGUIDs[1][1]); + DoRespawnGameObject(m_aExplosiveSortedGuids[1][1], HOUR); + m_luiSpawnedExplosiveChargeGUIDs.push_back(m_aExplosiveSortedGuids[1][1]); break; case DATA_EXPLOSIVE_CHARGE_USE: - Creature* pBlastmaster = instance->GetCreature(m_uiBlastmasterShortfuseGUID); + Creature* pBlastmaster = GetSingleCreatureFromStorage(NPC_BLASTMASTER_SHORTFUSE); if (!pBlastmaster) break; for (GUIDList::const_iterator itr = m_luiSpawnedExplosiveChargeGUIDs.begin(); itr != m_luiSpawnedExplosiveChargeGUIDs.end(); ++itr) @@ -165,13 +166,11 @@ void instance_gnomeregan::SetData(uint32 uiType, uint32 uiData) if (uiData == IN_PROGRESS) { // Make Door locked - if (GameObject* pDoor = instance->GetGameObject(m_uiDoorFinalChamberGUID)) + if (GameObject* pDoor = GetSingleGameObjectFromStorage(GO_THE_FINAL_CHAMBER)) { + pDoor->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_LOCKED); if (pDoor->getLootState() == GO_ACTIVATED) pDoor->ResetDoorOrButton(); - - // Doesn't work here, because the flags are to be reseted on next tick in GO::Update - pDoor->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_LOCKED); } // Always directly activates this bomb-face @@ -180,11 +179,11 @@ void instance_gnomeregan::SetData(uint32 uiType, uint32 uiData) else if (uiData == DONE || uiData == FAIL) { // Make Door unlocked again - if (GameObject* pDoor = instance->GetGameObject(m_uiDoorFinalChamberGUID)) + if (GameObject* pDoor = GetSingleGameObjectFromStorage(GO_THE_FINAL_CHAMBER)) { + pDoor->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_LOCKED); if (pDoor->getLootState() == GO_READY) pDoor->UseDoorOrButton(); - pDoor->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_LOCKED); } // Deactivate all remaining BombFaces @@ -201,7 +200,7 @@ void instance_gnomeregan::SetData(uint32 uiType, uint32 uiData) std::ostringstream saveStream; saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1]; - strInstData = saveStream.str(); + m_strInstData = saveStream.str(); SaveToDB(); OUT_SAVE_INST_DATA_COMPLETE; @@ -241,17 +240,6 @@ uint32 instance_gnomeregan::GetData(uint32 uiType) } } -uint64 instance_gnomeregan::GetData64(uint32 uiData) -{ - switch(uiData) - { - case GO_CAVE_IN_NORTH: return m_uiCaveInNorthGUID; - case GO_CAVE_IN_SOUTH: return m_uiCaveInSouthGUID; - default: - return 0; - } -} - sBombFace* instance_gnomeregan::GetBombFaces() { return m_asBombFaces; @@ -264,7 +252,7 @@ void instance_gnomeregan::DoActivateBombFace(uint8 uiIndex) if (!m_asBombFaces[uiIndex].m_bActivated) { - DoUseDoorOrButton(m_asBombFaces[uiIndex].m_uiGnomeFaceGUID); + DoUseDoorOrButton(m_asBombFaces[uiIndex].m_gnomeFaceGuid); m_asBombFaces[uiIndex].m_bActivated = true; m_asBombFaces[uiIndex].m_uiBombTimer = 3000; } @@ -277,7 +265,7 @@ void instance_gnomeregan::DoDeactivateBombFace(uint8 uiIndex) if (m_asBombFaces[uiIndex].m_bActivated) { - DoUseDoorOrButton(m_asBombFaces[uiIndex].m_uiGnomeFaceGUID); + DoUseDoorOrButton(m_asBombFaces[uiIndex].m_gnomeFaceGuid); m_asBombFaces[uiIndex].m_bActivated = false; m_asBombFaces[uiIndex].m_uiBombTimer = 0; } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 5c0b24135..34ca61c39 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2155" + #define SD2_REVISION_NR "2156" #endif // __SD2_REVISION_NR_H__ From 72a9ed5a579fa6eef52ccd66e24235dd62f26299 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Thu, 2 Jun 2011 16:00:17 +0200 Subject: [PATCH 0137/1172] [2157] Use EntryGuidMap-Storage in Karazhan * Also do some rough cleanup of Malchezaar script * Remove unneeded extra scriptloader entry for this file Note that most scripts of this instance can use a serious cleanup! --- .../karazhan/boss_midnight.cpp | 29 +- .../eastern_kingdoms/karazhan/boss_moroes.cpp | 58 +-- .../karazhan/boss_prince_malchezaar.cpp | 411 ++++++++++-------- .../karazhan/boss_shade_of_aran.cpp | 15 +- .../karazhan/boss_terestian_illhoof.cpp | 39 +- .../karazhan/bosses_opera.cpp | 51 ++- .../karazhan/instance_karazhan.cpp | 79 +--- .../eastern_kingdoms/karazhan/karazhan.cpp | 14 +- scripts/eastern_kingdoms/karazhan/karazhan.h | 18 +- sd2_revision_nr.h | 2 +- system/ScriptLoader.cpp | 6 +- 11 files changed, 340 insertions(+), 382 deletions(-) diff --git a/scripts/eastern_kingdoms/karazhan/boss_midnight.cpp b/scripts/eastern_kingdoms/karazhan/boss_midnight.cpp index c5b197944..b67a2d547 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_midnight.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_midnight.cpp @@ -53,14 +53,13 @@ struct MANGOS_DLL_DECL boss_midnightAI : public ScriptedAI { boss_midnightAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} - uint64 m_uiAttumenGUID; + ObjectGuid m_attumenGuid; uint8 m_uiPhase; uint32 m_uiMount_Timer; void Reset() { m_uiPhase = 1; - m_uiAttumenGUID = 0; m_uiMount_Timer = 0; m_creature->SetVisibility(VISIBILITY_ON); @@ -70,7 +69,7 @@ struct MANGOS_DLL_DECL boss_midnightAI : public ScriptedAI { if (m_uiPhase == 2) { - if (Creature* pAttumen = m_creature->GetMap()->GetCreature(m_uiAttumenGUID)) + if (Creature* pAttumen = m_creature->GetMap()->GetCreature(m_attumenGuid)) DoScriptText(SAY_MIDNIGHT_KILL, pAttumen); } } @@ -103,7 +102,7 @@ struct MANGOS_DLL_DECL boss_midnightAI : public ScriptedAI m_uiMount_Timer = 1000; } - void SetMidnight(Creature *, uint64); //Below .. + void SetMidnight(Creature*, ObjectGuid); // Below .. void UpdateAI(const uint32 uiDiff) { @@ -119,9 +118,9 @@ struct MANGOS_DLL_DECL boss_midnightAI : public ScriptedAI if (Creature* pAttumen = m_creature->SummonCreature(SUMMON_ATTUMEN, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 30000)) { - m_uiAttumenGUID = pAttumen->GetGUID(); + m_attumenGuid = pAttumen->GetObjectGuid(); pAttumen->AI()->AttackStart(m_creature->getVictim()); - SetMidnight(pAttumen, m_creature->GetGUID()); + SetMidnight(pAttumen, m_creature->GetObjectGuid()); switch(urand(0, 2)) { @@ -135,7 +134,7 @@ struct MANGOS_DLL_DECL boss_midnightAI : public ScriptedAI case 2: if (m_creature->GetHealthPercent() < 25.0f) { - if (Creature* pAttumen = m_creature->GetMap()->GetCreature(m_uiAttumenGUID)) + if (Creature* pAttumen = m_creature->GetMap()->GetCreature(m_attumenGuid)) Mount(pAttumen); } break; @@ -148,7 +147,7 @@ struct MANGOS_DLL_DECL boss_midnightAI : public ScriptedAI m_creature->SetVisibility(VISIBILITY_OFF); m_creature->GetMotionMaster()->MoveIdle(); - if (Creature *pAttumen = m_creature->GetMap()->GetCreature(m_uiAttumenGUID)) + if (Creature *pAttumen = m_creature->GetMap()->GetCreature(m_attumenGuid)) { pAttumen->SetDisplayId(MOUNTED_DISPLAYID); pAttumen->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); @@ -191,7 +190,7 @@ struct MANGOS_DLL_DECL boss_attumenAI : public ScriptedAI m_uiResetTimer = 0; } - uint64 m_uiMidnightGUID; + ObjectGuid m_midnightGuid; uint8 m_uiPhase; uint32 m_uiCleaveTimer; uint32 m_uiCurseTimer; @@ -219,7 +218,7 @@ struct MANGOS_DLL_DECL boss_attumenAI : public ScriptedAI { DoScriptText(SAY_DEATH, m_creature); - if (Creature* pMidnight = m_creature->GetMap()->GetCreature(m_uiMidnightGUID)) + if (Creature* pMidnight = m_creature->GetMap()->GetCreature(m_midnightGuid)) pMidnight->DealDamage(pMidnight, pMidnight->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); } @@ -231,12 +230,12 @@ struct MANGOS_DLL_DECL boss_attumenAI : public ScriptedAI { m_uiResetTimer = 0; - if (Creature *pMidnight = m_creature->GetMap()->GetCreature(m_uiMidnightGUID)) + if (Creature *pMidnight = m_creature->GetMap()->GetCreature(m_midnightGuid)) { pMidnight->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); pMidnight->SetVisibility(VISIBILITY_ON); } - m_uiMidnightGUID = 0; + m_midnightGuid.Clear(); m_creature->SetVisibility(VISIBILITY_OFF); m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); @@ -309,7 +308,7 @@ struct MANGOS_DLL_DECL boss_attumenAI : public ScriptedAI { if (m_creature->GetHealthPercent() < 25.0f) { - if (Creature *pMidnight = m_creature->GetMap()->GetCreature(m_uiMidnightGUID)) + if (Creature *pMidnight = m_creature->GetMap()->GetCreature(m_midnightGuid)) { if (boss_midnightAI* pMidnightAI = dynamic_cast(pMidnight->AI())) pMidnightAI->Mount(m_creature); @@ -324,10 +323,10 @@ struct MANGOS_DLL_DECL boss_attumenAI : public ScriptedAI } }; -void boss_midnightAI::SetMidnight(Creature* pAttumen, uint64 uiValue) +void boss_midnightAI::SetMidnight(Creature* pAttumen, ObjectGuid midnightGuid) { if (boss_attumenAI* pAttumenAI = dynamic_cast(pAttumen->AI())) - pAttumenAI->m_uiMidnightGUID = uiValue; + pAttumenAI->m_midnightGuid = midnightGuid; } CreatureAI* GetAI_boss_attumen(Creature* pCreature) diff --git a/scripts/eastern_kingdoms/karazhan/boss_moroes.cpp b/scripts/eastern_kingdoms/karazhan/boss_moroes.cpp index 5ce5209b7..19fe82a71 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_moroes.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_moroes.cpp @@ -26,6 +26,8 @@ EndScriptData */ enum { + MAX_GUESTS = 4, + SAY_AGGRO = -1532011, SAY_SPECIAL_1 = -1532012, SAY_SPECIAL_2 = -1532013, @@ -41,7 +43,7 @@ enum SPELL_FRENZY = 37023 }; -const float afLocations[4][4]= +static const float afLocations[4][MAX_GUESTS]= { {-10991.0f, -1884.33f, 81.73f, 0.614315f}, {-10989.4f, -1885.88f, 81.73f, 0.904913f}, @@ -49,7 +51,7 @@ const float afLocations[4][4]= {-10975.9f, -1885.81f, 81.73f, 2.253890f} }; -const uint32 auiAdds[6]= +static const uint32 auiAdds[6]= { 17007, 19872, @@ -70,8 +72,8 @@ struct MANGOS_DLL_DECL boss_moroesAI : public ScriptedAI ScriptedInstance* m_pInstance; - uint64 m_auiAddGUID[4]; - uint32 m_auiAddId[4]; + ObjectGuid m_aAddGuid[MAX_GUESTS]; + uint32 m_auiAddId[MAX_GUESTS]; uint32 m_uiVanish_Timer; uint32 m_uiBlind_Timer; @@ -157,18 +159,18 @@ struct MANGOS_DLL_DECL boss_moroesAI : public ScriptedAI { std::vector vAddList; - for(uint8 i = 0; i < 6; ++i) + for (uint8 i = 0; i < 6; ++i) vAddList.push_back(auiAdds[i]); - while(vAddList.size() > 4) + while (vAddList.size() > MAX_GUESTS) vAddList.erase((vAddList.begin())+(rand()%vAddList.size())); uint8 i = 0; - for(std::vector::iterator itr = vAddList.begin(); itr != vAddList.end(); ++itr, ++i) + for (std::vector::iterator itr = vAddList.begin(); itr != vAddList.end(); ++itr, ++i) { if (Creature* pCreature = m_creature->SummonCreature(*itr, afLocations[i][0], afLocations[i][1], afLocations[i][2], afLocations[i][3], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10000)) { - m_auiAddGUID[i] = pCreature->GetGUID(); + m_aAddGuid[i] = pCreature->GetObjectGuid(); m_auiAddId[i] = *itr; } } @@ -177,9 +179,9 @@ struct MANGOS_DLL_DECL boss_moroesAI : public ScriptedAI } else { - for(uint8 i = 0; i < 4; ++i) + for (uint8 i = 0; i < MAX_GUESTS; ++i) { - if (Creature* pCreature = m_creature->GetMap()->GetCreature(m_auiAddGUID[i])) + if (Creature* pCreature = m_creature->GetMap()->GetCreature(m_aAddGuid[i])) { if (!pCreature->isAlive()) // Exists but is dead { @@ -194,7 +196,7 @@ struct MANGOS_DLL_DECL boss_moroesAI : public ScriptedAI else { // Does not exist if (Creature* pCreature = m_creature->SummonCreature(m_auiAddId[i], afLocations[i][0], afLocations[i][1], afLocations[i][2], afLocations[i][3], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10000)) - m_auiAddGUID[i] = pCreature->GetGUID(); + m_aAddGuid[i] = pCreature->GetObjectGuid(); } } } @@ -202,11 +204,11 @@ struct MANGOS_DLL_DECL boss_moroesAI : public ScriptedAI void AddsAttack() { - for(uint8 i = 0; i < 4; ++i) + for(uint8 i = 0; i < MAX_GUESTS; ++i) { - if (m_auiAddGUID[i]) + if (m_aAddGuid[i]) { - Creature* pTemp = m_creature->GetMap()->GetCreature(m_auiAddGUID[i]); + Creature* pTemp = m_creature->GetMap()->GetCreature(m_aAddGuid[i]); if (pTemp && pTemp->isAlive()) pTemp->AI()->AttackStart(m_creature->getVictim()); else @@ -231,11 +233,11 @@ struct MANGOS_DLL_DECL boss_moroesAI : public ScriptedAI if (m_uiCheckAdds_Timer < uiDiff) { - for (uint8 i = 0; i < 4; ++i) + for (uint8 i = 0; i < MAX_GUESTS; ++i) { - if (m_auiAddGUID[i]) + if (m_aAddGuid[i]) { - Creature* pTemp = m_creature->GetMap()->GetCreature(m_auiAddGUID[i]); + Creature* pTemp = m_creature->GetMap()->GetCreature(m_aAddGuid[i]); if (pTemp && pTemp->isAlive() && (!pTemp->SelectHostileTarget() || !pTemp->getVictim())) pTemp->AI()->AttackStart(m_creature->getVictim()); } @@ -328,12 +330,10 @@ struct MANGOS_DLL_DECL boss_moroes_guestAI : public ScriptedAI { ScriptedInstance* m_pInstance; - uint64 m_auiGuestGUID[4]; + ObjectGuid m_aGuestGuid[MAX_GUESTS]; boss_moroes_guestAI(Creature* pCreature) : ScriptedAI(pCreature) { - memset(&m_auiGuestGUID, 0, sizeof(m_auiGuestGUID)); - m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); AcquireGUID(); Reset(); @@ -350,28 +350,28 @@ struct MANGOS_DLL_DECL boss_moroes_guestAI : public ScriptedAI if (!m_pInstance) return; - m_auiGuestGUID[0] = m_pInstance->GetData64(NPC_MOROES); - - if (Creature* pMoroes = m_creature->GetMap()->GetCreature(m_auiGuestGUID[0])) + if (Creature* pMoroes = m_pInstance->GetSingleCreatureFromStorage(NPC_MOROES)) { + m_aGuestGuid[0] = pMoroes->GetObjectGuid(); + for(uint8 i = 0; i < 3; ++i) { - uint64 uiGUID = 0; + ObjectGuid addGuid; if (boss_moroesAI* pMoroesAI = dynamic_cast(pMoroes->AI())) - uiGUID = pMoroesAI->m_auiAddGUID[i]; + addGuid = pMoroesAI->m_aAddGuid[i]; - if (uiGUID && uiGUID != m_creature->GetGUID()) - m_auiGuestGUID[i+1] = uiGUID; + if (addGuid && addGuid != m_creature->GetObjectGuid()) + m_aGuestGuid[i+1] = addGuid; } } } Unit* SelectTarget() { - if (uint64 uiTempGUID = m_auiGuestGUID[rand()%4]) + if (ObjectGuid tempGuid = m_aGuestGuid[urand(0, MAX_GUESTS-1)]) { - Creature* pTemp = m_creature->GetMap()->GetCreature(uiTempGUID); + Creature* pTemp = m_creature->GetMap()->GetCreature(tempGuid); if (pTemp && pTemp->isAlive()) return pTemp; } diff --git a/scripts/eastern_kingdoms/karazhan/boss_prince_malchezaar.cpp b/scripts/eastern_kingdoms/karazhan/boss_prince_malchezaar.cpp index 4053375dc..0dceffaf4 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_prince_malchezaar.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_prince_malchezaar.cpp @@ -23,18 +23,21 @@ EndScriptData */ #include "precompiled.h" -#define SAY_AGGRO -1532091 -#define SAY_AXE_TOSS1 -1532092 -#define SAY_AXE_TOSS2 -1532093 -#define SAY_SPECIAL1 -1532094 -#define SAY_SPECIAL2 -1532095 -#define SAY_SPECIAL3 -1532096 -#define SAY_SLAY1 -1532097 -#define SAY_SLAY2 -1532098 -#define SAY_SLAY3 -1532099 -#define SAY_SUMMON1 -1532100 -#define SAY_SUMMON2 -1532101 -#define SAY_DEATH -1532102 +enum +{ + SAY_AGGRO = -1532091, + SAY_AXE_TOSS1 = -1532092, + SAY_AXE_TOSS2 = -1532093, + SAY_SPECIAL1 = -1532094, + SAY_SPECIAL2 = -1532095, + SAY_SPECIAL3 = -1532096, + SAY_SLAY1 = -1532097, + SAY_SLAY2 = -1532098, + SAY_SLAY3 = -1532099, + SAY_SUMMON1 = -1532100, + SAY_SUMMON2 = -1532101, + SAY_DEATH = -1532102, +}; // 18 Coordinates for Infernal spawns struct InfernalPoint @@ -66,153 +69,162 @@ static InfernalPoint InfernalPoints[] = {-10935.7f, -1996.0f} }; -#define TOTAL_INFERNAL_POINTS 18 +enum +{ + TOTAL_INFERNAL_POINTS = 18, //Enfeeble is supposed to reduce hp to 1 and then heal player back to full when it ends //Along with reducing healing and regen while enfeebled to 0% //This spell effect will only reduce healing -#define SPELL_ENFEEBLE 30843 //Enfeeble during phase 1 and 2 -#define SPELL_ENFEEBLE_EFFECT 41624 - -#define SPELL_SHADOWNOVA 30852 //Shadownova used during all phases -#define SPELL_SW_PAIN 30854 //Shadow word pain during phase 1 and 3 (different targeting rules though) -#define SPELL_THRASH_PASSIVE 12787 //Extra attack chance during phase 2 -#define SPELL_SUNDER_ARMOR 30901 //Sunder armor during phase 2 -#define SPELL_THRASH_AURA 12787 //Passive proc chance for thrash -#define SPELL_EQUIP_AXES 30857 //Visual for axe equiping -#define SPELL_AMPLIFY_DAMAGE 39095 //Amplifiy during phase 3 -#define SPELL_CLEAVE 30131 //Same as Nightbane. -#define SPELL_HELLFIRE 30859 //Infenals' hellfire aura -#define NETHERSPITE_INFERNAL 17646 //The netherspite infernal creature -#define MALCHEZARS_AXE 17650 //Malchezar's axes (creatures), summoned during phase 3 - -#define INFERNAL_MODEL_INVISIBLE 11686 //Infernal Effects -#define SPELL_INFERNAL_RELAY 30834 - -#define EQUIP_ID_AXE 33542 //Axes info + SPELL_ENFEEBLE = 30843, // Enfeeble during m_uiPhase 1 and 2 + SPELL_ENFEEBLE_EFFECT = 41624, + + SPELL_SHADOWNOVA = 30852, // Shadownova used during all phases + SPELL_SW_PAIN = 30854, // Shadow word pain during m_uiPhase 1 and 3 (different targeting rules though) + SPELL_THRASH_PASSIVE = 12787, // Extra attack chance during m_uiPhase 2 + SPELL_SUNDER_ARMOR = 30901, // Sunder armor during m_uiPhase 2 + SPELL_THRASH_AURA = 12787, // Passive proc chance for thrash + SPELL_EQUIP_AXES = 30857, // Visual for axe equiping + SPELL_AMPLIFY_DAMAGE = 39095, // Amplifiy during m_uiPhase 3 + SPELL_CLEAVE = 30131, // Same as Nightbane. + SPELL_HELLFIRE = 30859, // Infenals' hellfire aura + NETHERSPITE_INFERNAL = 17646, // The netherspite infernal creature + MALCHEZARS_AXE = 17650, // Malchezar's m_aAxeGuid (creatures), summoned during m_uiPhase 3 + + INFERNAL_MODEL_INVISIBLE = 11686, // Infernal Effects + SPELL_INFERNAL_RELAY = 30834, + + EQUIP_ID_AXE = 33542, // Axes info +}; //---------Infernal code first struct MANGOS_DLL_DECL netherspite_infernalAI : public ScriptedAI { - netherspite_infernalAI(Creature* pCreature) : ScriptedAI(pCreature) , - malchezaar(0), HellfireTimer(0), CleanupTimer(0), point(NULL) {Reset();} + netherspite_infernalAI(Creature* pCreature) : ScriptedAI(pCreature), + m_uiHellfireTimer(0), + m_uiCleanupTimer(0), + pPoint(NULL) + { + Reset(); + } - uint32 HellfireTimer; - uint32 CleanupTimer; - uint64 malchezaar; - InfernalPoint *point; + uint32 m_uiHellfireTimer; + uint32 m_uiCleanupTimer; + ObjectGuid m_malchezaarGuid; + InfernalPoint* pPoint; void Reset() {} - void MoveInLineOfSight(Unit *who) {} + void MoveInLineOfSight(Unit* pWho) {} - void UpdateAI(const uint32 diff) + void UpdateAI(const uint32 uiDiff) { - if (HellfireTimer) + if (m_uiHellfireTimer) { - if (HellfireTimer <= diff) + if (m_uiHellfireTimer <= uiDiff) { - DoCastSpellIfCan(m_creature, SPELL_HELLFIRE); - HellfireTimer = 0; - } else HellfireTimer -= diff; + if (DoCastSpellIfCan(m_creature, SPELL_HELLFIRE) == CAST_OK) + m_uiHellfireTimer = 0; + } + else + m_uiHellfireTimer -= uiDiff; } - if (CleanupTimer) + if (m_uiCleanupTimer) { - if (CleanupTimer <= diff) + if (m_uiCleanupTimer <= uiDiff) { Cleanup(); - CleanupTimer = 0; - } else CleanupTimer -= diff; + m_uiCleanupTimer = 0; + } + else + m_uiCleanupTimer -= uiDiff; } } void KilledUnit(Unit *who) { - if (Creature *pMalchezaar = m_creature->GetMap()->GetCreature(malchezaar)) + if (Creature* pMalchezaar = m_creature->GetMap()->GetCreature(m_malchezaarGuid)) pMalchezaar->AI()->KilledUnit(who); } - void SpellHit(Unit *who, const SpellEntry *spell) + void SpellHit(Unit* pWho, const SpellEntry* pSpell) { - if (spell->Id == SPELL_INFERNAL_RELAY) + if (pSpell->Id == SPELL_INFERNAL_RELAY) { m_creature->SetDisplayId(m_creature->GetUInt32Value(UNIT_FIELD_NATIVEDISPLAYID)); m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - HellfireTimer = 4000; - CleanupTimer = 170000; + m_uiHellfireTimer = 4000; + m_uiCleanupTimer = 170000; } } - void DamageTaken(Unit *done_by, uint32 &damage) + void DamageTaken(Unit* pDealer, uint32& uiDamage) { - if (done_by->GetGUID() != malchezaar) - damage = 0; + if (pDealer->GetObjectGuid() != m_malchezaarGuid) + uiDamage = 0; } - void Cleanup(); //below ... + void Cleanup(); // below ... }; struct MANGOS_DLL_DECL boss_malchezaarAI : public ScriptedAI { boss_malchezaarAI(Creature* pCreature) : ScriptedAI(pCreature) { - for(uint8 i =0; i < 2; ++i) - axes[i] = 0; - Reset(); } - uint32 EnfeebleTimer; - uint32 EnfeebleResetTimer; - uint32 ShadowNovaTimer; - uint32 SWPainTimer; + uint32 m_uiEnfeebleTimer; + uint32 m_uiEnfeebleResetTimer; + uint32 m_uiShadowNovaTimer; + uint32 m_uiSWPainTimer; uint32 SunderArmorTimer; - uint32 AmplifyDamageTimer; - uint32 Cleave_Timer; + uint32 m_uiAmplifyDamageTimer; + uint32 m_uiCleave_Timer; uint32 InfernalTimer; - uint32 AxesTargetSwitchTimer; - uint32 InfernalCleanupTimer; + uint32 m_uiAxesTargetSwitchTimer; + uint32 m_uiInfernalCleanupTimer; - GUIDVector infernals; - std::vector positions; + GUIDVector m_vInfernalGuids; + std::vector m_positions; - uint64 axes[2]; - uint64 enfeeble_targets[5]; - uint64 enfeeble_health[5]; + ObjectGuid m_aAxeGuid[2]; + ObjectGuid m_aEnfeebleTargetGuid[5]; + uint32 m_auiEnfeebleHealth[5]; - uint32 phase; + uint32 m_uiPhase; void Reset() { AxesCleanup(); ClearWeapons(); InfernalCleanup(); - positions.clear(); + m_positions.clear(); - for(int i =0; i < 5; ++i) + for (uint8 i = 0; i < 5; ++i) { - enfeeble_targets[i] = 0; - enfeeble_health[i] = 0; + m_aEnfeebleTargetGuid[i].Clear(); + m_auiEnfeebleHealth[i] = 0; } for(int i = 0; i < TOTAL_INFERNAL_POINTS; ++i) - positions.push_back(&InfernalPoints[i]); - - EnfeebleTimer = 30000; - EnfeebleResetTimer = 38000; - ShadowNovaTimer = 35500; - SWPainTimer = 20000; - AmplifyDamageTimer = 5000; - Cleave_Timer = 8000; + m_positions.push_back(&InfernalPoints[i]); + + m_uiEnfeebleTimer = 30000; + m_uiEnfeebleResetTimer = 38000; + m_uiShadowNovaTimer = 35500; + m_uiSWPainTimer = 20000; + m_uiAmplifyDamageTimer = 5000; + m_uiCleave_Timer = 8000; InfernalTimer = 45000; - InfernalCleanupTimer = 47000; - AxesTargetSwitchTimer = urand(7500, 20000); + m_uiInfernalCleanupTimer = 47000; + m_uiAxesTargetSwitchTimer = urand(7500, 20000); SunderArmorTimer = urand(5000, 10000); - phase = 1; + m_uiPhase = 1; } - void KilledUnit(Unit *victim) + void KilledUnit(Unit* pVictim) { switch(urand(0, 2)) { @@ -222,17 +234,17 @@ struct MANGOS_DLL_DECL boss_malchezaarAI : public ScriptedAI } } - void JustDied(Unit *victim) + void JustDied(Unit* pKiller) { DoScriptText(SAY_DEATH, m_creature); AxesCleanup(); ClearWeapons(); InfernalCleanup(); - positions.clear(); + m_positions.clear(); - for(int i = 0; i < TOTAL_INFERNAL_POINTS; ++i) - positions.push_back(&InfernalPoints[i]); + for (uint8 i = 0; i < TOTAL_INFERNAL_POINTS; ++i) + m_positions.push_back(&InfernalPoints[i]); } void Aggro(Unit *who) @@ -242,8 +254,8 @@ struct MANGOS_DLL_DECL boss_malchezaarAI : public ScriptedAI void InfernalCleanup() { - //Infernal Cleanup - for(GUIDVector::const_iterator itr = infernals.begin(); itr!= infernals.end(); ++itr) + // Infernal Cleanup + for(GUIDVector::const_iterator itr = m_vInfernalGuids.begin(); itr!= m_vInfernalGuids.end(); ++itr) { Creature *pInfernal = m_creature->GetMap()->GetCreature(*itr); if (pInfernal && pInfernal->isAlive()) @@ -252,17 +264,17 @@ struct MANGOS_DLL_DECL boss_malchezaarAI : public ScriptedAI pInfernal->SetDeathState(JUST_DIED); } } - infernals.clear(); + m_vInfernalGuids.clear(); } void AxesCleanup() { - for(int i=0; i<2;++i) + for (uint8 i = 0; i < 2; ++i) { - Creature *axe = m_creature->GetMap()->GetCreature(axes[i]); - if (axe && axe->isAlive()) - axe->DealDamage(axe, axe->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); - axes[i] = 0; + Creature* pAxe = m_creature->GetMap()->GetCreature(m_aAxeGuid[i]); + if (pAxe && pAxe->isAlive()) + pAxe->DealDamage(pAxe, pAxe->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + m_aAxeGuid[i].Clear(); } } @@ -310,10 +322,10 @@ struct MANGOS_DLL_DECL boss_malchezaarAI : public ScriptedAI Unit *target = *iter; if (target) { - enfeeble_targets[i] = target->GetGUID(); - enfeeble_health[i] = target->GetHealth(); + m_aEnfeebleTargetGuid[i] = target->GetObjectGuid(); + m_auiEnfeebleHealth[i] = target->GetHealth(); - target->CastSpell(target, SPELL_ENFEEBLE, true, 0, 0, m_creature->GetGUID()); + target->CastSpell(target, SPELL_ENFEEBLE, true, 0, 0, m_creature->GetObjectGuid()); target->SetHealth(1); } } @@ -324,29 +336,29 @@ struct MANGOS_DLL_DECL boss_malchezaarAI : public ScriptedAI { for(int i = 0; i < 5; ++i) { - Player* pTarget = m_creature->GetMap()->GetPlayer(enfeeble_targets[i]); + Player* pTarget = m_creature->GetMap()->GetPlayer(m_aEnfeebleTargetGuid[i]); if (pTarget && pTarget->isAlive()) - pTarget->SetHealth(enfeeble_health[i]); + pTarget->SetHealth(m_auiEnfeebleHealth[i]); - enfeeble_targets[i] = 0; - enfeeble_health[i] = 0; + m_aEnfeebleTargetGuid[i].Clear(); + m_auiEnfeebleHealth[i] = 0; } } - void SummonInfernal(const uint32 diff) + void SummonInfernal() { InfernalPoint *point = NULL; float posX,posY,posZ; - if ((m_creature->GetMapId() != 532) || positions.empty()) + if ((m_creature->GetMapId() != 532) || m_positions.empty()) { m_creature->GetRandomPoint(m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), 60, posX, posY, posZ); } else { - std::vector::iterator itr = positions.begin()+rand()%positions.size(); + std::vector::iterator itr = m_positions.begin()+rand()%m_positions.size(); point = *itr; - positions.erase(itr); + m_positions.erase(itr); posX = point->x; posY = point->y; @@ -365,45 +377,47 @@ struct MANGOS_DLL_DECL boss_malchezaarAI : public ScriptedAI if (pInfernalAI) { if (point) - pInfernalAI->point = point; + pInfernalAI->pPoint = point; - pInfernalAI->malchezaar = m_creature->GetGUID(); + pInfernalAI->m_malchezaarGuid = m_creature->GetObjectGuid(); } - infernals.push_back(Infernal->GetGUID()); + m_vInfernalGuids.push_back(Infernal->GetGUID()); DoCastSpellIfCan(Infernal, SPELL_INFERNAL_RELAY); } DoScriptText(urand(0, 1) ? SAY_SUMMON1 : SAY_SUMMON2, m_creature); } - void UpdateAI(const uint32 diff) + void UpdateAI(const uint32 uiDiff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - if (EnfeebleResetTimer) + if (m_uiEnfeebleResetTimer) { - if (EnfeebleResetTimer <= diff) //Let's not forget to reset that + if (m_uiEnfeebleResetTimer <= uiDiff) //Let's not forget to reset that { EnfeebleResetHealth(); - EnfeebleResetTimer=0; - } else EnfeebleResetTimer -= diff; + m_uiEnfeebleResetTimer=0; + } + else + m_uiEnfeebleResetTimer -= uiDiff; } - if (m_creature->hasUnitState(UNIT_STAT_STUNNED)) //While shifting to phase 2 malchezaar stuns himself + if (m_creature->hasUnitState(UNIT_STAT_STUNNED)) //While shifting to m_uiPhase 2 m_malchezaarGuid stuns himself return; if (m_creature->GetTargetGuid() != m_creature->getVictim()->GetObjectGuid()) m_creature->SetTargetGuid(m_creature->getVictim()->GetObjectGuid()); - if (phase == 1) + if (m_uiPhase == 1) { if (m_creature->GetHealthPercent() < 60.0f) { m_creature->InterruptNonMeleeSpells(false); - phase = 2; + m_uiPhase = 2; //animation DoCastSpellIfCan(m_creature, SPELL_EQUIP_AXES); @@ -432,13 +446,13 @@ struct MANGOS_DLL_DECL boss_malchezaarAI : public ScriptedAI m_creature->SetAttackTime(OFF_ATTACK, (m_creature->GetAttackTime(BASE_ATTACK)*150)/100); } } - else if (phase == 2) + else if (m_uiPhase == 2) { if (m_creature->GetHealthPercent() < 30.0f) { InfernalTimer = 15000; - phase = 3; + m_uiPhase = 3; ClearWeapons(); @@ -447,58 +461,62 @@ struct MANGOS_DLL_DECL boss_malchezaarAI : public ScriptedAI DoScriptText(SAY_AXE_TOSS2, m_creature); - Unit *target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0); - for(uint32 i=0; i<2; ++i) + Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0); + for (uint32 i = 0; i < 2; ++i) { - Creature *axe = m_creature->SummonCreature(MALCHEZARS_AXE, m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 1000); - if (axe) + Creature* pAxe = m_creature->SummonCreature(MALCHEZARS_AXE, m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 1000); + if (pAxe) { - axe->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - axe->setFaction(m_creature->getFaction()); + pAxe->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + pAxe->setFaction(m_creature->getFaction()); - axes[i] = axe->GetGUID(); - if (target) + m_aAxeGuid[i] = pAxe->GetObjectGuid(); + if (pTarget) { - axe->AI()->AttackStart(target); - // axe->getThreatManager().tauntApply(target); //Taunt Apply and fade out does not work properly - // So we'll use a hack to add a lot of threat to our target - axe->AddThreat(target, 10000000.0f); + pAxe->AI()->AttackStart(pTarget); + // pAxe->getThreatManager().tauntApply(pTarget); //Taunt Apply and fade out does not work properly + // So we'll use a hack to add a lot of threat to our pTarget + pAxe->AddThreat(pTarget, 10000000.0f); } } } - if (ShadowNovaTimer > 35000) - ShadowNovaTimer = EnfeebleTimer + 5000; + if (m_uiShadowNovaTimer > 35000) + m_uiShadowNovaTimer = m_uiEnfeebleTimer + 5000; return; } - if (SunderArmorTimer < diff) + if (SunderArmorTimer < uiDiff) { DoCastSpellIfCan(m_creature->getVictim(), SPELL_SUNDER_ARMOR); SunderArmorTimer = urand(10000, 18000); - }else SunderArmorTimer -= diff; + } + else + SunderArmorTimer -= uiDiff; - if (Cleave_Timer < diff) + if (m_uiCleave_Timer < uiDiff) { DoCastSpellIfCan(m_creature->getVictim(), SPELL_CLEAVE); - Cleave_Timer = urand(6000, 12000); + m_uiCleave_Timer = urand(6000, 12000); - }else Cleave_Timer -= diff; + } + else + m_uiCleave_Timer -= uiDiff; } else { - if (AxesTargetSwitchTimer < diff) + if (m_uiAxesTargetSwitchTimer < uiDiff) { - AxesTargetSwitchTimer = urand(7500, 20000); + m_uiAxesTargetSwitchTimer = urand(7500, 20000); Unit *target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0); if (target) { for(int i = 0; i < 2; ++i) { - Creature *axe = m_creature->GetMap()->GetCreature(axes[i]); + Creature *axe = m_creature->GetMap()->GetCreature(m_aAxeGuid[i]); if (axe) { float threat = 1000000.0f; @@ -514,36 +532,44 @@ struct MANGOS_DLL_DECL boss_malchezaarAI : public ScriptedAI } } } - } else AxesTargetSwitchTimer -= diff; + } + else + m_uiAxesTargetSwitchTimer -= uiDiff; - if (AmplifyDamageTimer < diff) + if (m_uiAmplifyDamageTimer < uiDiff) { if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) DoCastSpellIfCan(pTarget, SPELL_AMPLIFY_DAMAGE); - AmplifyDamageTimer = urand(20000, 30000); - }else AmplifyDamageTimer -= diff; + m_uiAmplifyDamageTimer = urand(20000, 30000); + } + else + m_uiAmplifyDamageTimer -= uiDiff; } //Time for global and double timers - if (InfernalTimer < diff) + if (InfernalTimer < uiDiff) { - SummonInfernal(diff); - InfernalTimer = phase == 3 ? 14500 : 44500; //15 secs in phase 3, 45 otherwise - }else InfernalTimer -= diff; + SummonInfernal(); + InfernalTimer = m_uiPhase == 3 ? 14500 : 44500; //15 secs in m_uiPhase 3, 45 otherwise + } + else + InfernalTimer -= uiDiff; - if (ShadowNovaTimer < diff) + if (m_uiShadowNovaTimer < uiDiff) { DoCastSpellIfCan(m_creature->getVictim(), SPELL_SHADOWNOVA); - ShadowNovaTimer = phase == 3 ? 31000 : -1; - } else ShadowNovaTimer -= diff; + m_uiShadowNovaTimer = m_uiPhase == 3 ? 31000 : -1; + } + else + m_uiShadowNovaTimer -= uiDiff; - if (phase != 2) + if (m_uiPhase != 2) { - if (SWPainTimer < diff) + if (m_uiSWPainTimer < uiDiff) { Unit* target = NULL; - if (phase == 1) + if (m_uiPhase == 1) target = m_creature->getVictim(); // the tank else //anyone but the tank target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1); @@ -551,22 +577,26 @@ struct MANGOS_DLL_DECL boss_malchezaarAI : public ScriptedAI if (target) DoCastSpellIfCan(target, SPELL_SW_PAIN); - SWPainTimer = 20000; - }else SWPainTimer -= diff; + m_uiSWPainTimer = 20000; + } + else + m_uiSWPainTimer -= uiDiff; } - if (phase != 3) + if (m_uiPhase != 3) { - if (EnfeebleTimer < diff) + if (m_uiEnfeebleTimer < uiDiff) { EnfeebleHealthEffect(); - EnfeebleTimer = 30000; - ShadowNovaTimer = 5000; - EnfeebleResetTimer = 9000; - }else EnfeebleTimer -= diff; + m_uiEnfeebleTimer = 30000; + m_uiShadowNovaTimer = 5000; + m_uiEnfeebleResetTimer = 9000; + } + else + m_uiEnfeebleTimer -= uiDiff; } - if (phase==2) + if (m_uiPhase==2) DoMeleeAttacksIfReady(); else DoMeleeAttackIfReady(); @@ -574,7 +604,7 @@ struct MANGOS_DLL_DECL boss_malchezaarAI : public ScriptedAI void DoMeleeAttacksIfReady() { - // Check if target is valid + // Check if pTarget is valid if (!m_creature->getVictim()) return; @@ -597,25 +627,25 @@ struct MANGOS_DLL_DECL boss_malchezaarAI : public ScriptedAI void Cleanup(Creature *infernal, InfernalPoint *point) { - for(GUIDVector::iterator itr = infernals.begin(); itr!= infernals.end(); ++itr) + for(GUIDVector::iterator itr = m_vInfernalGuids.begin(); itr!= m_vInfernalGuids.end(); ++itr) if (*itr == infernal->GetGUID()) { - infernals.erase(itr); + m_vInfernalGuids.erase(itr); break; } - positions.push_back(point); + m_positions.push_back(point); } }; void netherspite_infernalAI::Cleanup() { - Creature* pMalchezaar = m_creature->GetMap()->GetCreature(malchezaar); + Creature* pMalchezaar = m_creature->GetMap()->GetCreature(m_malchezaarGuid); if (pMalchezaar && pMalchezaar->isAlive()) { if (boss_malchezaarAI* pMalAI = dynamic_cast(pMalchezaar->AI())) - pMalAI->Cleanup(m_creature, point); + pMalAI->Cleanup(m_creature, pPoint); } } @@ -629,20 +659,17 @@ CreatureAI* GetAI_boss_malchezaar(Creature* pCreature) return new boss_malchezaarAI(pCreature); } -void AddSC_netherspite_infernal() +void AddSC_boss_prince_malchezaar() { - Script *newscript; - newscript = new Script; - newscript->Name = "netherspite_infernal"; - newscript->GetAI = &GetAI_netherspite_infernal; - newscript->RegisterSelf(); -} + Script* pNewScript; -void AddSC_boss_malchezaar() -{ - Script *newscript; - newscript = new Script; - newscript->Name = "boss_malchezaar"; - newscript->GetAI = &GetAI_boss_malchezaar; - newscript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "boss_malchezaar"; + pNewScript->GetAI = &GetAI_boss_malchezaar; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "netherspite_infernal"; + pNewScript->GetAI = &GetAI_netherspite_infernal; + pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/karazhan/boss_shade_of_aran.cpp b/scripts/eastern_kingdoms/karazhan/boss_shade_of_aran.cpp index 99b0623de..325d6c677 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_shade_of_aran.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_shade_of_aran.cpp @@ -104,7 +104,7 @@ struct MANGOS_DLL_DECL boss_aranAI : public ScriptedAI uint32 m_uiFlameWreath_Timer; uint32 m_uiFlameWreathCheck_Timer; - uint64 m_uiFlameWreathTarget[3]; + ObjectGuid m_aFlameWreathTargetGuid[3]; float m_fFWTargPosX[3]; float m_fFWTargPosY[3]; @@ -200,7 +200,7 @@ struct MANGOS_DLL_DECL boss_aranAI : public ScriptedAI { if (*itr) { - m_uiFlameWreathTarget[i] = (*itr)->GetGUID(); + m_aFlameWreathTargetGuid[i] = (*itr)->GetObjectGuid(); m_fFWTargPosX[i] = (*itr)->GetPositionX(); m_fFWTargPosY[i] = (*itr)->GetPositionY(); m_creature->CastSpell((*itr), SPELL_FLAME_WREATH, true); @@ -220,7 +220,7 @@ struct MANGOS_DLL_DECL boss_aranAI : public ScriptedAI { if (m_pInstance) { - if (GameObject* pDoor = m_pInstance->instance->GetGameObject(m_pInstance->GetData64(GO_PRIVATE_LIBRARY_DOOR))) + if (GameObject* pDoor = m_pInstance->GetSingleGameObjectFromStorage(GO_PRIVATE_LIBRARY_DOOR)) pDoor->SetGoState(GO_STATE_READY); m_uiCloseDoor_Timer = 0; @@ -389,7 +389,8 @@ struct MANGOS_DLL_DECL boss_aranAI : public ScriptedAI m_uiFlameWreath_Timer = 20000; m_uiFlameWreathCheck_Timer = 500; - memset(&m_uiFlameWreathTarget, 0, sizeof(m_uiFlameWreathTarget)); + for (uint8 i = 0; i < 3; ++i) + m_aFlameWreathTargetGuid[i].Clear(); FlameWreathEffect(); break; @@ -456,16 +457,16 @@ struct MANGOS_DLL_DECL boss_aranAI : public ScriptedAI { for (uint32 i = 0; i < 3; ++i) { - if (!m_uiFlameWreathTarget[i]) + if (!m_aFlameWreathTargetGuid[i]) continue; - Player* pPlayer = m_creature->GetMap()->GetPlayer(m_uiFlameWreathTarget[i]); + Player* pPlayer = m_creature->GetMap()->GetPlayer(m_aFlameWreathTargetGuid[i]); if (pPlayer && !pPlayer->IsWithinDist2d(m_fFWTargPosX[i], m_fFWTargPosY[i], 3.0f)) { pPlayer->CastSpell(pPlayer, SPELL_EXPLOSION, true, 0, 0, m_creature->GetObjectGuid()); pPlayer->CastSpell(pPlayer, SPELL_KNOCKBACK_500, true); - m_uiFlameWreathTarget[i] = 0; + m_aFlameWreathTargetGuid[i].Clear(); } } m_uiFlameWreathCheck_Timer = 500; diff --git a/scripts/eastern_kingdoms/karazhan/boss_terestian_illhoof.cpp b/scripts/eastern_kingdoms/karazhan/boss_terestian_illhoof.cpp index 25caadad2..dc967d48c 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_terestian_illhoof.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_terestian_illhoof.cpp @@ -61,26 +61,20 @@ enum struct MANGOS_DLL_DECL mob_demon_chainAI : public ScriptedAI { - mob_demon_chainAI(Creature* pCreature) : ScriptedAI(pCreature) - { - Reset(); - } + mob_demon_chainAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } - uint64 m_uiSacrificeGUID; + ObjectGuid m_sacrificeGuid; - void Reset() - { - m_uiSacrificeGUID = 0; - } + void Reset(){} void AttackStart(Unit* pWho) {} void MoveInLineOfSight(Unit* pWho) {} void JustDied(Unit* pKiller) { - if (m_uiSacrificeGUID) + if (m_sacrificeGuid) { - if (Player* pSacrifice = m_creature->GetMap()->GetPlayer(m_uiSacrificeGUID)) + if (Player* pSacrifice = m_creature->GetMap()->GetPlayer(m_sacrificeGuid)) pSacrifice->RemoveAurasDueToSpell(SPELL_SACRIFICE); } } @@ -90,7 +84,6 @@ struct MANGOS_DLL_DECL boss_terestianAI : public ScriptedAI { boss_terestianAI(Creature* pCreature) : ScriptedAI(pCreature) { - memset(&m_uiPortalGUID, 0, sizeof(m_uiPortalGUID)); m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); m_bSummonKilrek = true; Reset(); @@ -98,7 +91,7 @@ struct MANGOS_DLL_DECL boss_terestianAI : public ScriptedAI ScriptedInstance* m_pInstance; - uint64 m_uiPortalGUID[2]; + ObjectGuid m_aPortalGuid[2]; uint32 m_uiSummonKilrekTimer; uint32 m_uiSacrifice_Timer; @@ -126,12 +119,12 @@ struct MANGOS_DLL_DECL boss_terestianAI : public ScriptedAI for(uint8 i = 0; i < 2; ++i) { - if (m_uiPortalGUID[i]) + if (m_aPortalGuid[i]) { - if (Creature* pPortal = m_pInstance->instance->GetCreature(m_uiPortalGUID[i])) + if (Creature* pPortal = m_pInstance->instance->GetCreature(m_aPortalGuid[i])) pPortal->ForcedDespawn(); - m_uiPortalGUID[i] = 0; + m_aPortalGuid[i].Clear(); } } @@ -168,16 +161,16 @@ struct MANGOS_DLL_DECL boss_terestianAI : public ScriptedAI { case NPC_PORTAL: { - if (m_uiPortalGUID[0]) + if (m_aPortalGuid[0]) { - m_uiPortalGUID[1] = pSummoned->GetGUID(); + m_aPortalGuid[1] = pSummoned->GetObjectGuid(); if (npc_fiendish_portalAI* pPortalAI = dynamic_cast(pSummoned->AI())) pPortalAI->m_uiSummonTimer = 10000; } else { - m_uiPortalGUID[0] = pSummoned->GetGUID(); + m_aPortalGuid[0] = pSummoned->GetObjectGuid(); DoCastSpellIfCan(m_creature, SPELL_FIENDISH_PORTAL_1, CAST_TRIGGERED); } @@ -207,12 +200,12 @@ struct MANGOS_DLL_DECL boss_terestianAI : public ScriptedAI for(uint8 i = 0; i < 2; ++i) { - if (m_uiPortalGUID[i]) + if (m_aPortalGuid[i]) { - if (Creature* pPortal = m_pInstance->instance->GetCreature(m_uiPortalGUID[i])) + if (Creature* pPortal = m_pInstance->instance->GetCreature(m_aPortalGuid[i])) pPortal->ForcedDespawn(); - m_uiPortalGUID[i] = 0; + m_aPortalGuid[i].Clear(); } } @@ -248,7 +241,7 @@ struct MANGOS_DLL_DECL boss_terestianAI : public ScriptedAI if (Creature* pChains = m_creature->SummonCreature(NPC_DEMONCHAINS, pTarget->GetPositionX(), pTarget->GetPositionY(), pTarget->GetPositionZ(), 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 21000)) { if (mob_demon_chainAI* pDemonAI = dynamic_cast(pChains->AI())) - pDemonAI->m_uiSacrificeGUID = pTarget->GetGUID(); + pDemonAI->m_sacrificeGuid = pTarget->GetObjectGuid(); pChains->CastSpell(pChains, SPELL_DEMON_CHAINS, true); diff --git a/scripts/eastern_kingdoms/karazhan/bosses_opera.cpp b/scripts/eastern_kingdoms/karazhan/bosses_opera.cpp index cb209f1b4..973366af8 100644 --- a/scripts/eastern_kingdoms/karazhan/bosses_opera.cpp +++ b/scripts/eastern_kingdoms/karazhan/bosses_opera.cpp @@ -213,20 +213,19 @@ struct MANGOS_DLL_DECL mob_titoAI : public ScriptedAI Reset(); } - uint64 DorotheeGUID; + ObjectGuid m_dorotheeGuid; uint32 YipTimer; void Reset() { - DorotheeGUID = 0; YipTimer = 10000; } void JustDied(Unit* killer) { - if (DorotheeGUID) + if (m_dorotheeGuid) { - Creature* Dorothee = m_creature->GetMap()->GetCreature(DorotheeGUID); + Creature* Dorothee = m_creature->GetMap()->GetCreature(m_dorotheeGuid); if (Dorothee && Dorothee->isAlive()) { if (boss_dorotheeAI* pDoroAI = dynamic_cast(Dorothee->AI())) @@ -259,7 +258,7 @@ void boss_dorotheeAI::SummonTito() DoScriptText(SAY_DOROTHEE_SUMMON, m_creature); if (mob_titoAI* pTitoAI = dynamic_cast(pTito->AI())) - pTitoAI->DorotheeGUID = m_creature->GetGUID(); + pTitoAI->m_dorotheeGuid = m_creature->GetObjectGuid(); pTito->AI()->AttackStart(m_creature->getVictim()); @@ -761,7 +760,7 @@ struct MANGOS_DLL_DECL boss_bigbadwolfAI : public ScriptedAI uint32 FearTimer; uint32 SwipeTimer; - uint64 HoodGUID; + ObjectGuid m_hoodGuid; float TempThreat; bool IsChasing; @@ -772,7 +771,7 @@ struct MANGOS_DLL_DECL boss_bigbadwolfAI : public ScriptedAI FearTimer = urand(25000, 35000); SwipeTimer = 5000; - HoodGUID = 0; + m_hoodGuid.Clear(); TempThreat = 0; IsChasing = false; @@ -817,7 +816,7 @@ struct MANGOS_DLL_DECL boss_bigbadwolfAI : public ScriptedAI if (TempThreat) m_creature->getThreatManager().modifyThreatPercent(target, -100); - HoodGUID = target->GetGUID(); + m_hoodGuid = target->GetObjectGuid(); m_creature->AddThreat(target, 1000000.0f); ChaseTimer = 20000; IsChasing = true; @@ -827,9 +826,9 @@ struct MANGOS_DLL_DECL boss_bigbadwolfAI : public ScriptedAI { IsChasing = false; - if (Player* target = m_creature->GetMap()->GetPlayer(HoodGUID)) + if (Player* target = m_creature->GetMap()->GetPlayer(m_hoodGuid)) { - HoodGUID = 0; + m_hoodGuid.Clear(); if (m_creature->getThreatManager().getThreat(target)) m_creature->getThreatManager().modifyThreatPercent(target, -100); @@ -953,7 +952,7 @@ struct MANGOS_DLL_DECL boss_julianneAI : public ScriptedAI uint32 EntryYellTimer; uint32 AggroYellTimer; - uint64 RomuloGUID; + ObjectGuid m_romuloGuid; uint32 Phase; uint32 BlindingPassionTimer; @@ -971,7 +970,7 @@ struct MANGOS_DLL_DECL boss_julianneAI : public ScriptedAI void Reset() { - RomuloGUID = 0; + m_romuloGuid.Clear(); Phase = PHASE_JULIANNE; BlindingPassionTimer = 30000; @@ -1053,7 +1052,7 @@ struct MANGOS_DLL_DECL boss_romuloAI : public ScriptedAI ScriptedInstance* m_pInstance; - uint64 JulianneGUID; + ObjectGuid m_julianneGuid; uint32 Phase; uint32 EntryYellTimer; @@ -1069,7 +1068,7 @@ struct MANGOS_DLL_DECL boss_romuloAI : public ScriptedAI void Reset() { - JulianneGUID = 0; + m_julianneGuid.Clear(); Phase = PHASE_ROMULO; BackwardLungeTimer = 15000; @@ -1093,9 +1092,9 @@ struct MANGOS_DLL_DECL boss_romuloAI : public ScriptedAI { DoScriptText(SAY_ROMULO_AGGRO, m_creature); - if (JulianneGUID) + if (m_julianneGuid) { - Creature* Julianne = m_creature->GetMap()->GetCreature(JulianneGUID); + Creature* Julianne = m_creature->GetMap()->GetCreature(m_julianneGuid); if (Julianne && Julianne->getVictim()) m_creature->AddThreat(Julianne->getVictim()); @@ -1160,7 +1159,7 @@ void boss_julianneAI::DamageTaken(Unit* done_by, uint32 &damage) //if this is true then we have to kill romulo too if (RomuloDead) { - if (Creature* Romulo = m_creature->GetMap()->GetCreature(RomuloGUID)) + if (Creature* Romulo = m_creature->GetMap()->GetCreature(m_romuloGuid)) { Romulo->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); Romulo->GetMotionMaster()->Clear(); @@ -1173,7 +1172,7 @@ void boss_julianneAI::DamageTaken(Unit* done_by, uint32 &damage) } //if not already returned, then romulo is alive and we can pretend die - if (Creature* Romulo = m_creature->GetMap()->GetCreature(RomuloGUID)) + if (Creature* Romulo = m_creature->GetMap()->GetCreature(m_romuloGuid)) { PretendToDie(m_creature); IsFakingDeath = true; @@ -1206,7 +1205,7 @@ void boss_romuloAI::DamageTaken(Unit* done_by, uint32 &damage) IsFakingDeath = true; Phase = PHASE_BOTH; - if (Creature* Julianne = m_creature->GetMap()->GetCreature(JulianneGUID)) + if (Creature* Julianne = m_creature->GetMap()->GetCreature(m_julianneGuid)) { if (boss_julianneAI* pJulAI = dynamic_cast(Julianne->AI())) { @@ -1223,7 +1222,7 @@ void boss_romuloAI::DamageTaken(Unit* done_by, uint32 &damage) { if (JulianneDead) { - if (Creature* Julianne = m_creature->GetMap()->GetCreature(JulianneGUID)) + if (Creature* Julianne = m_creature->GetMap()->GetCreature(m_julianneGuid)) { Julianne->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); Julianne->GetMotionMaster()->Clear(); @@ -1235,7 +1234,7 @@ void boss_romuloAI::DamageTaken(Unit* done_by, uint32 &damage) return; } - if (Creature* Julianne = m_creature->GetMap()->GetCreature(JulianneGUID)) + if (Creature* Julianne = m_creature->GetMap()->GetCreature(m_julianneGuid)) { PretendToDie(m_creature); IsFakingDeath = true; @@ -1294,11 +1293,11 @@ void boss_julianneAI::UpdateAI(const uint32 diff) { if (Creature* pRomulo = m_creature->SummonCreature(CREATURE_ROMULO, ROMULO_X, ROMULO_Y, m_creature->GetPositionZ(), 0, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, HOUR*2*IN_MILLISECONDS)) { - RomuloGUID = pRomulo->GetGUID(); + m_romuloGuid = pRomulo->GetObjectGuid(); if (boss_romuloAI* pRomAI = dynamic_cast(pRomulo->AI())) { - pRomAI->JulianneGUID = m_creature->GetGUID(); + pRomAI->m_julianneGuid = m_creature->GetObjectGuid(); pRomAI->Phase = PHASE_ROMULO; } @@ -1334,7 +1333,7 @@ void boss_julianneAI::UpdateAI(const uint32 diff) { if (ResurrectTimer < diff) { - Creature* pRomulo = m_creature->GetMap()->GetCreature(RomuloGUID); + Creature* pRomulo = m_creature->GetMap()->GetCreature(m_romuloGuid); boss_romuloAI* pRomAI = dynamic_cast(pRomulo->AI()); if (pRomulo && pRomAI && pRomAI->IsFakingDeath) @@ -1376,7 +1375,7 @@ void boss_julianneAI::UpdateAI(const uint32 diff) { if (urand(0, 1) && SummonedRomulo) { - Creature* Romulo = m_creature->GetMap()->GetCreature(RomuloGUID); + Creature* Romulo = m_creature->GetMap()->GetCreature(m_romuloGuid); if (Romulo && Romulo->isAlive() && !RomuloDead) DoCastSpellIfCan(Romulo, SPELL_ETERNAL_AFFECTION); } else DoCastSpellIfCan(m_creature, SPELL_ETERNAL_AFFECTION); @@ -1396,7 +1395,7 @@ void boss_romuloAI::UpdateAI(const uint32 diff) { if (ResurrectTimer < diff) { - Creature* pJulianne = m_creature->GetMap()->GetCreature(JulianneGUID); + Creature* pJulianne = m_creature->GetMap()->GetCreature(m_julianneGuid); boss_julianneAI* pJulAI = dynamic_cast(pJulianne->AI()); if (pJulianne && pJulAI && pJulAI->IsFakingDeath) diff --git a/scripts/eastern_kingdoms/karazhan/instance_karazhan.cpp b/scripts/eastern_kingdoms/karazhan/instance_karazhan.cpp index 3b8552bc4..ef564d142 100644 --- a/scripts/eastern_kingdoms/karazhan/instance_karazhan.cpp +++ b/scripts/eastern_kingdoms/karazhan/instance_karazhan.cpp @@ -39,22 +39,7 @@ EndScriptData */ */ instance_karazhan::instance_karazhan(Map* pMap) : ScriptedInstance(pMap), - m_uiOzDeathCount(0), - - m_uiMoroesGUID(0), - m_uiTerestianGUID(0), - m_uiNightbaneGUID(0), - - m_uiCurtainGUID(0), - m_uiStageDoorLeftGUID(0), - m_uiStageDoorRightGUID(0), - m_uiLibraryDoor(0), - m_uiMassiveDoor(0), - m_uiSideEntranceDoor(0), - m_uiGamesmansDoor(0), - m_uiGamesmansExitDoor(0), - m_uiNetherspaceDoor(0), - m_uiDustCoveredChest(0) + m_uiOzDeathCount(0) { Initialize(); } @@ -80,9 +65,10 @@ void instance_karazhan::OnCreatureCreate(Creature* pCreature) { switch (pCreature->GetEntry()) { - case NPC_TERESTIAN: m_uiTerestianGUID = pCreature->GetGUID(); break; - case NPC_MOROES: m_uiMoroesGUID = pCreature->GetGUID(); break; - case NPC_NIGHTBANE: m_uiNightbaneGUID = pCreature->GetGUID(); break; + case NPC_MOROES: + case NPC_NIGHTBANE: + m_mNpcEntryGuidStore[pCreature->GetEntry()] = pCreature->GetObjectGuid(); + break; } } @@ -91,59 +77,53 @@ void instance_karazhan::OnObjectCreate(GameObject* pGo) switch(pGo->GetEntry()) { case GO_STAGE_CURTAIN: - m_uiCurtainGUID = pGo->GetGUID(); break; case GO_STAGE_DOOR_LEFT: - m_uiStageDoorLeftGUID = pGo->GetGUID(); if (m_auiEncounter[4] == DONE) pGo->SetGoState(GO_STATE_ACTIVE); break; case GO_STAGE_DOOR_RIGHT: - m_uiStageDoorRightGUID = pGo->GetGUID(); if (m_auiEncounter[4] == DONE) pGo->SetGoState(GO_STATE_ACTIVE); break; case GO_PRIVATE_LIBRARY_DOOR: - m_uiLibraryDoor = pGo->GetGUID(); break; case GO_MASSIVE_DOOR: - m_uiMassiveDoor = pGo->GetGUID(); break; case GO_GAMESMANS_HALL_DOOR: - m_uiGamesmansDoor = pGo->GetGUID(); break; case GO_GAMESMANS_HALL_EXIT_DOOR: - m_uiGamesmansExitDoor = pGo->GetGUID(); break; case GO_NETHERSPACE_DOOR: - m_uiNetherspaceDoor = pGo->GetGUID(); break; case GO_SIDE_ENTRANCE_DOOR: - m_uiSideEntranceDoor = pGo->GetGUID(); if (m_auiEncounter[4] != DONE) pGo->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_LOCKED); else pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_LOCKED); break; case GO_DUST_COVERED_CHEST: - m_uiDustCoveredChest = pGo->GetGUID(); break; case GO_OZ_BACKDROP: case GO_OZ_HAY: // if (m_uiOperaEvent == EVENT_OZ) // TODO - respawn, store for later respawn? - break; + return; case GO_HOOD_BACKDROP: case GO_HOOD_TREE: case GO_HOOD_HOUSE: // if (m_uiOperaEvent == EVENT_HOOD) // TODO - respawn, store for later respawn? - break; + return; case GO_RAJ_BACKDROP: case GO_RAJ_MOON: case GO_RAJ_BALCONY: // if (m_uiOperaEvent == EVENT_RAJ) // TODO - respawn, store for later respawn? - break; + return; + + default: + return; } + m_mGoEntryGuidStore[pGo->GetEntry()] = pGo->GetObjectGuid(); } void instance_karazhan::SetData(uint32 uiType, uint32 uiData) @@ -164,9 +144,9 @@ void instance_karazhan::SetData(uint32 uiType, uint32 uiData) m_auiEncounter[3] = uiData; if (uiData == DONE) { - DoUseDoorOrButton(m_uiStageDoorLeftGUID); - DoUseDoorOrButton(m_uiStageDoorRightGUID); - if (GameObject* pSideEntrance = instance->GetGameObject(m_uiSideEntranceDoor)) + DoUseDoorOrButton(GO_STAGE_DOOR_LEFT); + DoUseDoorOrButton(GO_STAGE_DOOR_RIGHT); + if (GameObject* pSideEntrance = GetSingleGameObjectFromStorage(GO_SIDE_ENTRANCE_DOOR)) pSideEntrance->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_LOCKED); } break; @@ -179,15 +159,15 @@ void instance_karazhan::SetData(uint32 uiType, uint32 uiData) case TYPE_ARAN: m_auiEncounter[6] = uiData; if (uiData != IN_PROGRESS) - DoUseDoorOrButton(m_uiLibraryDoor); + DoUseDoorOrButton(GO_PRIVATE_LIBRARY_DOOR); break; case TYPE_NETHERSPITE: m_auiEncounter[7] = uiData; - DoUseDoorOrButton(m_uiMassiveDoor); + DoUseDoorOrButton(GO_MASSIVE_DOOR); break; case TYPE_CHESS: if (uiData == DONE) - DoRespawnGameObject(m_uiDustCoveredChest, DAY); + DoRespawnGameObject(GO_DUST_COVERED_CHEST, DAY); m_auiEncounter[8] = uiData; break; case TYPE_MALCHEZZAR: @@ -246,29 +226,6 @@ uint32 instance_karazhan::GetData(uint32 uiType) } } -uint64 instance_karazhan::GetData64(uint32 uiData) -{ - switch (uiData) - { - case NPC_MOROES: return m_uiMoroesGUID; - case NPC_TERESTIAN: return m_uiTerestianGUID; - case NPC_NIGHTBANE: return m_uiNightbaneGUID; - - case GO_STAGE_DOOR_LEFT: return m_uiStageDoorLeftGUID; - case GO_STAGE_DOOR_RIGHT: return m_uiStageDoorRightGUID; - case GO_STAGE_CURTAIN: return m_uiCurtainGUID; - case GO_PRIVATE_LIBRARY_DOOR: return m_uiLibraryDoor; - case GO_MASSIVE_DOOR: return m_uiMassiveDoor; - case GO_SIDE_ENTRANCE_DOOR: return m_uiSideEntranceDoor; - case GO_GAMESMANS_HALL_DOOR: return m_uiGamesmansDoor; - case GO_GAMESMANS_HALL_EXIT_DOOR: return m_uiGamesmansExitDoor; - case GO_NETHERSPACE_DOOR: return m_uiNetherspaceDoor; - - default: - return 0; - } -} - void instance_karazhan::Load(const char* chrIn) { if (!chrIn) diff --git a/scripts/eastern_kingdoms/karazhan/karazhan.cpp b/scripts/eastern_kingdoms/karazhan/karazhan.cpp index beed1d8d0..db605b7d6 100644 --- a/scripts/eastern_kingdoms/karazhan/karazhan.cpp +++ b/scripts/eastern_kingdoms/karazhan/karazhan.cpp @@ -120,7 +120,7 @@ struct MANGOS_DLL_DECL npc_barnesAI : public npc_escortAI ScriptedInstance* m_pInstance; - uint64 m_uiSpotlightGUID; + ObjectGuid m_spotlightGuid; uint32 m_uiTalkCount; uint32 m_uiTalkTimer; @@ -132,7 +132,7 @@ struct MANGOS_DLL_DECL npc_barnesAI : public npc_escortAI void Reset() { - m_uiSpotlightGUID = 0; + m_spotlightGuid.Clear(); m_uiTalkCount = 0; m_uiTalkTimer = 2000; @@ -167,7 +167,7 @@ struct MANGOS_DLL_DECL npc_barnesAI : public npc_escortAI { case 0: m_creature->CastSpell(m_creature, SPELL_TUXEDO, false); - m_pInstance->DoUseDoorOrButton(m_pInstance->GetData64(GO_STAGE_DOOR_LEFT)); + m_pInstance->DoUseDoorOrButton(GO_STAGE_DOOR_LEFT); break; case 4: m_uiTalkCount = 0; @@ -179,16 +179,16 @@ struct MANGOS_DLL_DECL npc_barnesAI : public npc_escortAI { pSpotlight->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); pSpotlight->CastSpell(pSpotlight, SPELL_SPOTLIGHT, false); - m_uiSpotlightGUID = pSpotlight->GetGUID(); + m_spotlightGuid = pSpotlight->GetObjectGuid(); } break; case 8: - m_pInstance->DoUseDoorOrButton(m_pInstance->GetData64(GO_STAGE_DOOR_LEFT)); + m_pInstance->DoUseDoorOrButton(GO_STAGE_DOOR_LEFT); m_bPerformanceReady = true; break; case 9: PrepareEncounter(); - m_pInstance->DoUseDoorOrButton(m_pInstance->GetData64(GO_STAGE_CURTAIN)); + m_pInstance->DoUseDoorOrButton(GO_STAGE_CURTAIN); break; } } @@ -257,7 +257,7 @@ struct MANGOS_DLL_DECL npc_barnesAI : public npc_escortAI { if (m_uiTalkCount > 3) { - if (Creature* pSpotlight = m_creature->GetMap()->GetCreature(m_uiSpotlightGUID)) + if (Creature* pSpotlight = m_creature->GetMap()->GetCreature(m_spotlightGuid)) pSpotlight->ForcedDespawn(); SetEscortPaused(false); diff --git a/scripts/eastern_kingdoms/karazhan/karazhan.h b/scripts/eastern_kingdoms/karazhan/karazhan.h index 5cb515f9c..cb53d064d 100644 --- a/scripts/eastern_kingdoms/karazhan/karazhan.h +++ b/scripts/eastern_kingdoms/karazhan/karazhan.h @@ -25,7 +25,7 @@ enum DATA_OPERA_OZ_DEATHCOUNT = 12, NPC_MOROES = 15687, - NPC_TERESTIAN = 15688, + // NPC_TERESTIAN = 15688, NPC_NIGHTBANE = 17225, GO_STAGE_CURTAIN = 183932, @@ -73,7 +73,6 @@ class MANGOS_DLL_DECL instance_karazhan : public ScriptedInstance void SetData(uint32 uiType, uint32 uiData); uint32 GetData(uint32 uiType); - uint64 GetData64(uint32 uiData); void Load(const char* chrIn); const char* Save() { return m_strInstData.c_str(); } @@ -84,21 +83,6 @@ class MANGOS_DLL_DECL instance_karazhan : public ScriptedInstance uint32 m_uiOperaEvent; uint32 m_uiOzDeathCount; - - uint64 m_uiMoroesGUID; - uint64 m_uiTerestianGUID; - uint64 m_uiNightbaneGUID; - - uint64 m_uiCurtainGUID; - uint64 m_uiStageDoorLeftGUID; - uint64 m_uiStageDoorRightGUID; - uint64 m_uiLibraryDoor; // Door at Shade of Aran - uint64 m_uiMassiveDoor; // Door at Netherspite - uint64 m_uiSideEntranceDoor; // Side Entrance - uint64 m_uiGamesmansDoor; // Door before Chess - uint64 m_uiGamesmansExitDoor; // Door after Chess - uint64 m_uiNetherspaceDoor; // Door at Malchezaar - uint64 m_uiDustCoveredChest; // Chest respawn at event complete }; class MANGOS_DLL_DECL npc_fiendish_portalAI : public ScriptedAI diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 34ca61c39..83de5b7a2 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2156" + #define SD2_REVISION_NR "2157" #endif // __SD2_REVISION_NR_H__ diff --git a/system/ScriptLoader.cpp b/system/ScriptLoader.cpp index c7985124c..0959568b5 100644 --- a/system/ScriptLoader.cpp +++ b/system/ScriptLoader.cpp @@ -73,9 +73,8 @@ extern void AddSC_boss_maiden_of_virtue(); extern void AddSC_boss_shade_of_aran(); extern void AddSC_boss_netherspite(); extern void AddSC_boss_nightbane(); -extern void AddSC_boss_malchezaar(); +extern void AddSC_boss_prince_malchezaar(); extern void AddSC_boss_terestian_illhoof(); -extern void AddSC_netherspite_infernal(); extern void AddSC_boss_moroes(); extern void AddSC_bosses_opera(); extern void AddSC_chess_event(); @@ -563,9 +562,8 @@ void AddScripts() AddSC_boss_shade_of_aran(); AddSC_boss_netherspite(); AddSC_boss_nightbane(); - AddSC_boss_malchezaar(); + AddSC_boss_prince_malchezaar(); AddSC_boss_terestian_illhoof(); - AddSC_netherspite_infernal(); AddSC_boss_moroes(); AddSC_bosses_opera(); AddSC_chess_event(); From fd53d1f72d8176cf8330f489507637af52d827dd Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Thu, 2 Jun 2011 23:59:14 +0200 Subject: [PATCH 0138/1172] [2158] Use EntryGuidMap-Storage in Magisters Terrace * Also cleanup and improve Selin Fireheart script, the crystals are now handled by direct list passing instead of very custom GetData64 use * Set the crystal-handling into Aggro, because it cannot be assumed that the crystals are loaded before the boss is loaded --- .../boss_felblood_kaelthas.cpp | 4 +- .../boss_priestess_delrissa.cpp | 10 +- .../boss_selin_fireheart.cpp | 313 +++++++++--------- .../instance_magisters_terrace.cpp | 82 ++--- .../magisters_terrace/magisters_terrace.h | 20 +- sd2_revision_nr.h | 2 +- 6 files changed, 194 insertions(+), 237 deletions(-) diff --git a/scripts/eastern_kingdoms/magisters_terrace/boss_felblood_kaelthas.cpp b/scripts/eastern_kingdoms/magisters_terrace/boss_felblood_kaelthas.cpp index 89f77f85e..8e13af4c9 100644 --- a/scripts/eastern_kingdoms/magisters_terrace/boss_felblood_kaelthas.cpp +++ b/scripts/eastern_kingdoms/magisters_terrace/boss_felblood_kaelthas.cpp @@ -350,10 +350,10 @@ struct MANGOS_DLL_DECL boss_felblood_kaelthasAI : public ScriptedAI if (m_pInstance) { - if (GameObject* pKaelLeft = m_pInstance->instance->GetGameObject(m_pInstance->GetData64(GO_KAEL_STATUE_LEFT))) + if (GameObject* pKaelLeft = m_pInstance->GetSingleGameObjectFromStorage(GO_KAEL_STATUE_LEFT)) pKaelLeft->SetGoState(GO_STATE_ACTIVE); - if (GameObject* pKaelRight = m_pInstance->instance->GetGameObject(m_pInstance->GetData64(GO_KAEL_STATUE_RIGHT))) + if (GameObject* pKaelRight = m_pInstance->GetSingleGameObjectFromStorage(GO_KAEL_STATUE_RIGHT)) pKaelRight->SetGoState(GO_STATE_ACTIVE); } } diff --git a/scripts/eastern_kingdoms/magisters_terrace/boss_priestess_delrissa.cpp b/scripts/eastern_kingdoms/magisters_terrace/boss_priestess_delrissa.cpp index d67ba82d1..cf0d42e0b 100644 --- a/scripts/eastern_kingdoms/magisters_terrace/boss_priestess_delrissa.cpp +++ b/scripts/eastern_kingdoms/magisters_terrace/boss_priestess_delrissa.cpp @@ -361,7 +361,7 @@ struct MANGOS_DLL_DECL boss_priestess_lackey_commonAI : public ScriptedAI m_uiResetThreatTimer = urand(5000, 15000); // in case she is not alive and Reset was for some reason called, respawn her (most likely party wipe after killing her) - if (Creature* pDelrissa = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(NPC_DELRISSA))) + if (Creature* pDelrissa = m_pInstance->GetSingleCreatureFromStorage(NPC_DELRISSA)) { if (!pDelrissa->isAlive()) pDelrissa->Respawn(); @@ -387,7 +387,7 @@ struct MANGOS_DLL_DECL boss_priestess_lackey_commonAI : public ScriptedAI } } - if (Creature* pDelrissa = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(NPC_DELRISSA))) + if (Creature* pDelrissa = m_pInstance->GetSingleCreatureFromStorage(NPC_DELRISSA)) { if (pDelrissa->isAlive() && !pDelrissa->getVictim()) { @@ -405,7 +405,7 @@ struct MANGOS_DLL_DECL boss_priestess_lackey_commonAI : public ScriptedAI if (!m_pInstance) return; - Creature* pDelrissa = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(NPC_DELRISSA)); + Creature* pDelrissa = m_pInstance->GetSingleCreatureFromStorage(NPC_DELRISSA); uint32 uiLackeyDeathCount = m_pInstance->GetData(TYPE_DELRISSA_DEATH_COUNT); if (!pDelrissa) @@ -437,7 +437,7 @@ struct MANGOS_DLL_DECL boss_priestess_lackey_commonAI : public ScriptedAI if (!m_pInstance) return; - if (Creature* pDelrissa = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(NPC_DELRISSA))) + if (Creature* pDelrissa = m_pInstance->GetSingleCreatureFromStorage(NPC_DELRISSA)) pDelrissa->AI()->KilledUnit(pVictim); } @@ -446,7 +446,7 @@ struct MANGOS_DLL_DECL boss_priestess_lackey_commonAI : public ScriptedAI if (!m_pInstance) return; - if (Creature* pDelrissa = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(NPC_DELRISSA))) + if (Creature* pDelrissa = m_pInstance->GetSingleCreatureFromStorage(NPC_DELRISSA)) { boss_priestess_delrissaAI* pDelrissaAI = dynamic_cast(pDelrissa->AI()); diff --git a/scripts/eastern_kingdoms/magisters_terrace/boss_selin_fireheart.cpp b/scripts/eastern_kingdoms/magisters_terrace/boss_selin_fireheart.cpp index aa5874dfb..9e8afff11 100644 --- a/scripts/eastern_kingdoms/magisters_terrace/boss_selin_fireheart.cpp +++ b/scripts/eastern_kingdoms/magisters_terrace/boss_selin_fireheart.cpp @@ -24,147 +24,114 @@ EndScriptData */ #include "precompiled.h" #include "magisters_terrace.h" -#define SAY_AGGRO -1585000 -#define SAY_ENERGY -1585001 -#define SAY_EMPOWERED -1585002 -#define SAY_KILL_1 -1585003 -#define SAY_KILL_2 -1585004 -#define SAY_DEATH -1585005 -#define EMOTE_CRYSTAL -1585006 - -//Crystal effect spells -#define SPELL_FEL_CRYSTAL_COSMETIC 44374 -#define SPELL_FEL_CRYSTAL_DUMMY 44329 -#define SPELL_FEL_CRYSTAL_VISUAL 44355 -#define SPELL_MANA_RAGE 44320 // This spell triggers 44321, which changes scale and regens mana Requires an entry in spell_script_target - -//Selin's spells -#define SPELL_DRAIN_LIFE 44294 -#define SPELL_FEL_EXPLOSION 44314 - -#define SPELL_DRAIN_MANA 46153 // Heroic only - -#define CRYSTALS_NUMBER 5 -#define DATA_CRYSTALS 6 - -#define CREATURE_FEL_CRYSTAL 24722 +enum +{ + SAY_AGGRO = -1585000, + SAY_ENERGY = -1585001, + SAY_EMPOWERED = -1585002, + SAY_KILL_1 = -1585003, + SAY_KILL_2 = -1585004, + SAY_DEATH = -1585005, + EMOTE_CRYSTAL = -1585006, + + // Crystal effect spells + SPELL_FEL_CRYSTAL_COSMETIC = 44374, + SPELL_FEL_CRYSTAL_DUMMY = 44329, + SPELL_FEL_CRYSTAL_VISUAL = 44355, + SPELL_MANA_RAGE = 44320, // This spell triggers 44321, which changes scale and regens mana Requires an entry in spell_script_target + + // Selin's spells + SPELL_DRAIN_LIFE = 44294, + SPELL_FEL_EXPLOSION = 44314, + + SPELL_DRAIN_MANA = 46153, // Heroic only +}; struct MANGOS_DLL_DECL boss_selin_fireheartAI : public ScriptedAI { boss_selin_fireheartAI(Creature* pCreature) : ScriptedAI(pCreature) { - m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_pInstance = (instance_magisters_terrace*)pCreature->GetInstanceData(); m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); - - Crystals.clear(); - //GUIDs per instance is static, so we only need to load them once. - if (m_pInstance) - { - uint32 size = m_pInstance->GetData(TYPE_FEL_CRYSTAL_SIZE); - for(uint8 i = 0; i < size; ++i) - { - uint64 guid = m_pInstance->GetData64(NPC_FEL_CRYSTAL); - debug_log("SD2: Selin: Adding Fel Crystal " UI64FMTD " to list", guid); - Crystals.push_back(guid); - } - } Reset(); } - ScriptedInstance* m_pInstance; + instance_magisters_terrace* m_pInstance; bool m_bIsRegularMode; - GUIDList Crystals; + GUIDList m_lCrystalGuids; - uint32 DrainLifeTimer; - uint32 DrainManaTimer; - uint32 FelExplosionTimer; - uint32 DrainCrystalTimer; - uint32 EmpowerTimer; + uint32 m_uiDrainLifeTimer; + uint32 m_uiDrainManaTimer; + uint32 m_uiFelExplosionTimer; + uint32 m_uiDrainCrystalTimer; + uint32 m_uiEmpowerTimer; - bool IsDraining; - bool DrainingCrystal; + bool m_bIsDraining; + bool m_bDrainingCrystal; - uint64 CrystalGUID; // This will help us create a pointer to the crystal we are draining. We store GUIDs, never units in case unit is deleted/offline (offline if player of course). + ObjectGuid m_crystalGuid; // This will help us create a pointer to the crystal we are draining. We store GUIDs, never units in case unit is deleted/offline (offline if player of course). void Reset() { - if (m_pInstance) - { - //for(uint8 i = 0; i < CRYSTALS_NUMBER; ++i) - for(GUIDList::const_iterator itr = Crystals.begin(); itr != Crystals.end(); ++itr) - { - //Creature* pUnit = m_creature->GetMap()->GetCreature(FelCrystals[i]); - if (Creature* pCrystal = m_creature->GetMap()->GetCreature(*itr)) - { - if (!pCrystal->isAlive()) - pCrystal->Respawn(); // Let MaNGOS handle setting death state, etc. - - // Only need to set unselectable flag. You can't attack unselectable units so non_attackable flag is not necessary here. - pCrystal->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - } - } - } - - DrainLifeTimer = urand(3000, 7000); - DrainManaTimer = DrainLifeTimer + 5000; - FelExplosionTimer = 2100; - DrainCrystalTimer = urand(10000, 15000); - DrainCrystalTimer = urand(20000, 25000); - EmpowerTimer = 10000; - - IsDraining = false; - DrainingCrystal = false; - CrystalGUID = 0; + m_uiDrainLifeTimer = urand(3000, 7000); + m_uiDrainManaTimer = m_uiDrainLifeTimer + 5000; + m_uiFelExplosionTimer = 2100; + m_uiDrainCrystalTimer = urand(10000, 15000); + m_uiDrainCrystalTimer = urand(20000, 25000); + m_uiEmpowerTimer = 10000; + + m_bIsDraining = false; + m_bDrainingCrystal = false; + m_crystalGuid.Clear(); } void SelectNearestCrystal() { - if (Crystals.empty()) + if (m_lCrystalGuids.empty()) return; float ShortestDistance = 0; - CrystalGUID = 0; + m_crystalGuid.Clear(); Creature* pCrystal = NULL; - Creature* CrystalChosen = NULL; - //for(uint8 i = 0; i < CRYSTALS_NUMBER; ++i) - for(GUIDList::const_iterator itr = Crystals.begin(); itr != Crystals.end(); ++itr) + Creature* pCrystalChosen = NULL; + + for (GUIDList::const_iterator itr = m_lCrystalGuids.begin(); itr != m_lCrystalGuids.end(); ++itr) { pCrystal = m_creature->GetMap()->GetCreature(*itr); if (pCrystal && pCrystal->isAlive()) { // select nearest - if (!CrystalChosen || m_creature->GetDistanceOrder(pCrystal, CrystalChosen, false)) + if (!pCrystalChosen || m_creature->GetDistanceOrder(pCrystal, pCrystalChosen, false)) { - CrystalGUID = pCrystal->GetGUID(); - CrystalChosen = pCrystal; // Store a copy of pCrystal so we don't need to recreate a pointer to closest crystal for the movement and yell. + m_crystalGuid = pCrystal->GetObjectGuid(); + pCrystalChosen = pCrystal; // Store a copy of pCrystal so we don't need to recreate a pointer to closest crystal for the movement and yell. } } } - if (CrystalChosen) + if (pCrystalChosen) { DoScriptText(SAY_ENERGY, m_creature); DoScriptText(EMOTE_CRYSTAL, m_creature); - CrystalChosen->CastSpell(CrystalChosen, SPELL_FEL_CRYSTAL_COSMETIC, true); + pCrystalChosen->CastSpell(pCrystalChosen, SPELL_FEL_CRYSTAL_COSMETIC, true); float x, y, z; // coords that we move to, close to the crystal. - CrystalChosen->GetClosePoint(x, y, z, m_creature->GetObjectBoundingRadius(), CONTACT_DISTANCE); + pCrystalChosen->GetClosePoint(x, y, z, m_creature->GetObjectBoundingRadius(), CONTACT_DISTANCE); m_creature->RemoveSplineFlag(SPLINEFLAG_WALKMODE); m_creature->GetMotionMaster()->MovePoint(1, x, y, z); - DrainingCrystal = true; + m_bDrainingCrystal = true; } } void ShatterRemainingCrystals() { - if (Crystals.empty()) + if (m_lCrystalGuids.empty()) return; - //for(uint8 i = 0; i < CRYSTALS_NUMBER; ++i) - for(GUIDList::const_iterator itr = Crystals.begin(); itr != Crystals.end(); ++itr) + for (GUIDList::const_iterator itr = m_lCrystalGuids.begin(); itr != m_lCrystalGuids.end(); ++itr) { //Creature* pCrystal = m_creature->GetMap()->GetCreature(FelCrystals[i]); Creature* pCrystal = m_creature->GetMap()->GetCreature(*itr); @@ -174,48 +141,72 @@ struct MANGOS_DLL_DECL boss_selin_fireheartAI : public ScriptedAI } } - void Aggro(Unit* who) + void Aggro(Unit* pWho) { DoScriptText(SAY_AGGRO, m_creature); if (m_pInstance) + { m_pInstance->SetData(TYPE_SELIN, IN_PROGRESS); + + if (m_lCrystalGuids.empty()) + { + // Get and output crystals + m_pInstance->GetFelCrystalList(m_lCrystalGuids); + for (GUIDList::const_iterator itr = m_lCrystalGuids.begin(); itr != m_lCrystalGuids.end(); ++itr) + debug_log("SD2: Selin: Added Fel Crystal %s to list", ObjectGuid(*itr).GetString().c_str()); + } + } } void JustReachedHome() { if (m_pInstance) + { m_pInstance->SetData(TYPE_SELIN, FAIL); + + for (GUIDList::const_iterator itr = m_lCrystalGuids.begin(); itr != m_lCrystalGuids.end(); ++itr) + { + if (Creature* pCrystal = m_creature->GetMap()->GetCreature(*itr)) + { + if (!pCrystal->isAlive()) + pCrystal->Respawn(); // Let MaNGOS handle setting death state, etc. + + // Only need to set unselectable flag. You can't attack unselectable units so non_attackable flag is not necessary here. + pCrystal->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + } + } + } } - void KilledUnit(Unit* victim) + void KilledUnit(Unit* pVictim) { DoScriptText(urand(0, 1) ? SAY_KILL_1 : SAY_KILL_2, m_creature); } - void MovementInform(uint32 type, uint32 id) + void MovementInform(uint32 uiType, uint32 uiPointId) { - if (type == POINT_MOTION_TYPE && id == 1) + if (uiType == POINT_MOTION_TYPE && uiPointId == 1) { - Creature* CrystalChosen = m_creature->GetMap()->GetCreature(CrystalGUID); - if (CrystalChosen && CrystalChosen->isAlive()) + Creature* pCrystalChosen = m_creature->GetMap()->GetCreature(m_crystalGuid); + if (pCrystalChosen && pCrystalChosen->isAlive()) { // Make the crystal attackable // We also remove NON_ATTACKABLE in case the database has it set. - CrystalChosen->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE + UNIT_FLAG_NOT_SELECTABLE); - CrystalChosen->CastSpell(m_creature, SPELL_MANA_RAGE, true); - IsDraining = true; + pCrystalChosen->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE + UNIT_FLAG_NOT_SELECTABLE); + pCrystalChosen->CastSpell(m_creature, SPELL_MANA_RAGE, true); + m_bIsDraining = true; } else { // Make an error message in case something weird happened here - error_log("SD2: Selin Fireheart unable to drain crystal as the crystal is either dead or despawned"); - DrainingCrystal = false; + error_log("SD2: Selin Fireheart unable to drain crystal as the crystal is either dead or deleted.."); + m_bDrainingCrystal = false; } } } - void JustDied(Unit* killer) + void JustDied(Unit* pKiller) { DoScriptText(SAY_DEATH, m_creature); @@ -227,87 +218,97 @@ struct MANGOS_DLL_DECL boss_selin_fireheartAI : public ScriptedAI ShatterRemainingCrystals(); } - void UpdateAI(const uint32 diff) + void UpdateAI(const uint32 uiDiff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - if (!DrainingCrystal) + if (!m_bDrainingCrystal) { - uint32 maxPowerMana = m_creature->GetMaxPower(POWER_MANA); - if (maxPowerMana && ((m_creature->GetPower(POWER_MANA)*100 / maxPowerMana) < 10)) + uint32 uiMaxPowerMana = m_creature->GetMaxPower(POWER_MANA); + if (uiMaxPowerMana && ((m_creature->GetPower(POWER_MANA)*100 / uiMaxPowerMana) < 10)) { - if (DrainLifeTimer < diff) + if (m_uiDrainLifeTimer < uiDiff) { if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) - DoCastSpellIfCan(pTarget, SPELL_DRAIN_LIFE); - - DrainLifeTimer = 10000; - }else DrainLifeTimer -= diff; + { + if (DoCastSpellIfCan(pTarget, SPELL_DRAIN_LIFE) == CAST_OK) + m_uiDrainLifeTimer = 10000; + } + } + else + m_uiDrainLifeTimer -= uiDiff; // Heroic only if (!m_bIsRegularMode) { - if (DrainManaTimer < diff) + if (m_uiDrainManaTimer < uiDiff) { - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1)) - DoCastSpellIfCan(pTarget, SPELL_DRAIN_MANA); + Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1); + if (!pTarget) + pTarget = m_creature->getVictim(); - DrainManaTimer = 10000; - }else DrainManaTimer -= diff; + if (DoCastSpellIfCan(pTarget, SPELL_DRAIN_MANA) == CAST_OK) + m_uiDrainManaTimer = 10000; + } + else + m_uiDrainManaTimer -= uiDiff; } } - if (FelExplosionTimer < diff) + if (m_uiFelExplosionTimer < uiDiff) { - if (!m_creature->IsNonMeleeSpellCasted(false)) - { - DoCastSpellIfCan(m_creature, SPELL_FEL_EXPLOSION); - FelExplosionTimer = 2000; - } - }else FelExplosionTimer -= diff; + if (DoCastSpellIfCan(m_creature, SPELL_FEL_EXPLOSION) == CAST_OK) + m_uiFelExplosionTimer = 2000; + } + else + m_uiFelExplosionTimer -= uiDiff; // If below 10% mana, start recharging - maxPowerMana = m_creature->GetMaxPower(POWER_MANA); - if (maxPowerMana && ((m_creature->GetPower(POWER_MANA)*100 / maxPowerMana) < 10)) + uiMaxPowerMana = m_creature->GetMaxPower(POWER_MANA); + if (uiMaxPowerMana && ((m_creature->GetPower(POWER_MANA)*100 / uiMaxPowerMana) < 10)) { - if (DrainCrystalTimer < diff) + if (m_uiDrainCrystalTimer < uiDiff) { SelectNearestCrystal(); if (m_bIsRegularMode) - DrainCrystalTimer = urand(20000, 25000); + m_uiDrainCrystalTimer = urand(20000, 25000); else - DrainCrystalTimer = urand(10000, 15000); + m_uiDrainCrystalTimer = urand(10000, 15000); - }else DrainCrystalTimer -= diff; + } + else + m_uiDrainCrystalTimer -= uiDiff; } - }else + DoMeleeAttackIfReady(); + } + else // if m_bDrainingCrystal { - if (IsDraining) + if (m_bIsDraining) { - if (EmpowerTimer < diff) + if (m_uiEmpowerTimer < uiDiff) { - IsDraining = false; - DrainingCrystal = false; + m_bIsDraining = false; + m_bDrainingCrystal = false; DoScriptText(SAY_EMPOWERED, m_creature); - Creature* CrystalChosen = m_creature->GetMap()->GetCreature(CrystalGUID); + Creature* CrystalChosen = m_creature->GetMap()->GetCreature(m_crystalGuid); if (CrystalChosen && CrystalChosen->isAlive()) // Use Deal Damage to kill it, not SetDeathState. CrystalChosen->DealDamage(CrystalChosen, CrystalChosen->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); - CrystalGUID = 0; + m_crystalGuid.Clear(); m_creature->GetMotionMaster()->Clear(); m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); - }else EmpowerTimer -= diff; + } + else + m_uiEmpowerTimer -= uiDiff; } } - - DoMeleeAttackIfReady(); // No need to check if we are draining crystal here, as the spell has a stun. } }; @@ -321,26 +322,26 @@ struct MANGOS_DLL_DECL mob_fel_crystalAI : public ScriptedAI mob_fel_crystalAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } void Reset() {} - void AttackStart(Unit* who) {} - void MoveInLineOfSight(Unit* who) {} - void UpdateAI(const uint32 diff) {} + void AttackStart(Unit* pWho) {} + void MoveInLineOfSight(Unit* pWho) {} + void UpdateAI(const uint32 uiDiff) {} void JustDied(Unit* killer) { if (ScriptedInstance* pInstance = (ScriptedInstance*)m_creature->GetInstanceData()) { - Creature* pSelin = m_creature->GetMap()->GetCreature(pInstance->GetData64(NPC_SELIN_FIREHEART)); + Creature* pSelin = pInstance->GetSingleCreatureFromStorage(NPC_SELIN_FIREHEART); if (pSelin && pSelin->isAlive()) { boss_selin_fireheartAI* pSelinAI = dynamic_cast(pSelin->AI()); - if (pSelinAI && pSelinAI->CrystalGUID == m_creature->GetGUID()) + if (pSelinAI && pSelinAI->m_crystalGuid == m_creature->GetObjectGuid()) { // Set this to false if we are the creature that Selin is draining so his AI flows properly - pSelinAI->DrainingCrystal = false; - pSelinAI->IsDraining = false; - pSelinAI->EmpowerTimer = 10000; + pSelinAI->m_bDrainingCrystal = false; + pSelinAI->m_bIsDraining = false; + pSelinAI->m_uiEmpowerTimer = 10000; if (pSelin->getVictim()) { @@ -360,15 +361,15 @@ CreatureAI* GetAI_mob_fel_crystal(Creature* pCreature) void AddSC_boss_selin_fireheart() { - Script *newscript; + Script* pNewScript; - newscript = new Script; - newscript->Name = "boss_selin_fireheart"; - newscript->GetAI = &GetAI_boss_selin_fireheart; - newscript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "boss_selin_fireheart"; + pNewScript->GetAI = &GetAI_boss_selin_fireheart; + pNewScript->RegisterSelf(); - newscript = new Script; - newscript->Name = "mob_fel_crystal"; - newscript->GetAI = &GetAI_mob_fel_crystal; - newscript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "mob_fel_crystal"; + pNewScript->GetAI = &GetAI_mob_fel_crystal; + pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/magisters_terrace/instance_magisters_terrace.cpp b/scripts/eastern_kingdoms/magisters_terrace/instance_magisters_terrace.cpp index 65b79b5f2..54a2fb93b 100644 --- a/scripts/eastern_kingdoms/magisters_terrace/instance_magisters_terrace.cpp +++ b/scripts/eastern_kingdoms/magisters_terrace/instance_magisters_terrace.cpp @@ -32,17 +32,7 @@ EndScriptData */ */ instance_magisters_terrace::instance_magisters_terrace(Map* pMap) : ScriptedInstance(pMap), - m_uiDelrissaDeathCount(0), - - m_uiSelinGUID(0), - m_uiDelrissaGUID(0), - m_uiVexallusDoorGUID(0), - m_uiSelinDoorGUID(0), - m_uiSelinEncounterDoorGUID(0), - m_uiDelrissaDoorGUID(0), - m_uiKaelDoorGUID(0), - - m_bInitializedItr(false) + m_uiDelrissaDeathCount(0) { Initialize(); } @@ -50,16 +40,19 @@ instance_magisters_terrace::instance_magisters_terrace(Map* pMap) : ScriptedInst void instance_magisters_terrace::Initialize() { memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); - memset(&m_auiKaelStatue, 0, sizeof(m_auiKaelStatue)); } void instance_magisters_terrace::OnCreatureCreate(Creature* pCreature) { switch (pCreature->GetEntry()) { - case NPC_SELIN_FIREHEART: m_uiSelinGUID = pCreature->GetGUID(); break; - case NPC_DELRISSA: m_uiDelrissaGUID = pCreature->GetGUID(); break; - case NPC_FEL_CRYSTAL: FelCrystals.push_back(pCreature->GetGUID()); break; + case NPC_SELIN_FIREHEART: + case NPC_DELRISSA: + m_mNpcEntryGuidStore[pCreature->GetEntry()] = pCreature->GetObjectGuid(); + break; + case NPC_FEL_CRYSTAL: + m_lFelCrystalGuid.push_back(pCreature->GetGUID()); + break; } } @@ -68,26 +61,27 @@ void instance_magisters_terrace::OnObjectCreate(GameObject* pGo) switch (pGo->GetEntry()) { case GO_VEXALLUS_DOOR: - m_uiVexallusDoorGUID = pGo->GetGUID(); if (m_auiEncounter[TYPE_VEXALLUS] == DONE) pGo->SetGoState(GO_STATE_ACTIVE); break; case GO_SELIN_DOOR: - m_uiSelinDoorGUID = pGo->GetGUID(); if (m_auiEncounter[TYPE_SELIN] == DONE) pGo->SetGoState(GO_STATE_ACTIVE); break; case GO_DELRISSA_DOOR: - m_uiDelrissaDoorGUID = pGo->GetGUID(); if (m_auiEncounter[TYPE_DELRISSA] == DONE) pGo->SetGoState(GO_STATE_ACTIVE); break; + case GO_SELIN_ENCOUNTER_DOOR: + case GO_KAEL_DOOR: + case GO_KAEL_STATUE_LEFT: + case GO_KAEL_STATUE_RIGHT: + break; - case GO_SELIN_ENCOUNTER_DOOR: m_uiSelinEncounterDoorGUID = pGo->GetGUID(); break; - case GO_KAEL_DOOR: m_uiKaelDoorGUID = pGo->GetGUID(); break; - case GO_KAEL_STATUE_LEFT: m_auiKaelStatue[0] = pGo->GetGUID(); break; - case GO_KAEL_STATUE_RIGHT: m_auiKaelStatue[1] = pGo->GetGUID(); break; + default: + return; } + m_mGoEntryGuidStore[pGo->GetEntry()] = pGo->GetObjectGuid(); } void instance_magisters_terrace::SetData(uint32 uiType, uint32 uiData) @@ -96,24 +90,24 @@ void instance_magisters_terrace::SetData(uint32 uiType, uint32 uiData) { case TYPE_SELIN: if (uiData == DONE) - DoUseDoorOrButton(m_uiSelinDoorGUID); - DoUseDoorOrButton(m_uiSelinEncounterDoorGUID); + DoUseDoorOrButton(GO_SELIN_DOOR); + DoUseDoorOrButton(GO_SELIN_ENCOUNTER_DOOR); m_auiEncounter[uiType] = uiData; break; case TYPE_VEXALLUS: if (uiData == DONE) - DoUseDoorOrButton(m_uiVexallusDoorGUID); + DoUseDoorOrButton(GO_VEXALLUS_DOOR); m_auiEncounter[uiType] = uiData; break; case TYPE_DELRISSA: if (uiData == DONE) - DoUseDoorOrButton(m_uiDelrissaDoorGUID); + DoUseDoorOrButton(GO_DELRISSA_DOOR); if (uiData == IN_PROGRESS) m_uiDelrissaDeathCount = 0; m_auiEncounter[uiType] = uiData; break; case TYPE_KAELTHAS: - DoUseDoorOrButton(m_uiKaelDoorGUID); + DoUseDoorOrButton(GO_KAEL_DOOR); m_auiEncounter[uiType] = uiData; break; case TYPE_DELRISSA_DEATH_COUNT: @@ -169,44 +163,18 @@ uint32 instance_magisters_terrace::GetData(uint32 uiType) case TYPE_DELRISSA: return m_auiEncounter[2]; case TYPE_KAELTHAS: return m_auiEncounter[3]; case TYPE_DELRISSA_DEATH_COUNT: return m_uiDelrissaDeathCount; - case TYPE_FEL_CRYSTAL_SIZE: return FelCrystals.size(); default: return 0; } } -uint64 instance_magisters_terrace::GetData64(uint32 uiData) +void instance_magisters_terrace::GetFelCrystalList(GUIDList& lList) { - switch (uiData) - { - case NPC_SELIN_FIREHEART: return m_uiSelinGUID; - case NPC_DELRISSA: return m_uiDelrissaGUID; - case GO_KAEL_STATUE_LEFT: return m_auiKaelStatue[0]; - case GO_KAEL_STATUE_RIGHT: return m_auiKaelStatue[1]; - - case NPC_FEL_CRYSTAL: - { - if (FelCrystals.empty()) - { - error_log("SD2: Magisters Terrace: No Fel Crystals loaded in Inst Data"); - return 0; - } - - if (!m_bInitializedItr) - { - CrystalItr = FelCrystals.begin(); - m_bInitializedItr = true; - } - - uint64 guid = *CrystalItr; - ++CrystalItr; - return guid; - } + if (m_lFelCrystalGuid.empty()) + error_log("SD2: Magisters Terrace: No Fel Crystals loaded in Inst Data"); - default: - return 0; - } + lList = m_lFelCrystalGuid; } InstanceData* GetInstanceData_instance_magisters_terrace(Map* pMap) diff --git a/scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.h b/scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.h index 0526a6a61..204e02238 100644 --- a/scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.h +++ b/scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.h @@ -14,8 +14,7 @@ enum TYPE_DELRISSA = 2, TYPE_KAELTHAS = 3, - TYPE_FEL_CRYSTAL_SIZE = 4, - TYPE_DELRISSA_DEATH_COUNT = 5, + TYPE_DELRISSA_DEATH_COUNT = 4, NPC_SELIN_FIREHEART = 24723, NPC_DELRISSA = 24560, @@ -46,7 +45,8 @@ class MANGOS_DLL_DECL instance_magisters_terrace : public ScriptedInstance uint32 GetData(uint32 uiType); void SetData(uint32 uiType, uint32 uiData); - uint64 GetData64(uint32 uiData); + + void GetFelCrystalList(GUIDList& lList); const char* Save() { return m_strInstData.c_str(); } void Load(const char* chrIn); @@ -57,19 +57,7 @@ class MANGOS_DLL_DECL instance_magisters_terrace : public ScriptedInstance uint32 m_uiDelrissaDeathCount; - GUIDList FelCrystals; - GUIDList::iterator CrystalItr; - - uint64 m_uiSelinGUID; - uint64 m_uiDelrissaGUID; - uint64 m_uiVexallusDoorGUID; - uint64 m_uiSelinDoorGUID; - uint64 m_uiSelinEncounterDoorGUID; - uint64 m_uiDelrissaDoorGUID; - uint64 m_uiKaelDoorGUID; - uint64 m_auiKaelStatue[2]; - - bool m_bInitializedItr; + GUIDList m_lFelCrystalGuid; }; #endif diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 83de5b7a2..466f3ac5a 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2157" + #define SD2_REVISION_NR "2158" #endif // __SD2_REVISION_NR_H__ From 935f605b0fb218ce61a9240b3bf23cf3b471723b Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Fri, 3 Jun 2011 00:14:30 +0200 Subject: [PATCH 0139/1172] [2159] Use EntryGuidMap-Storage in Molten Core --- .../molten_core/boss_garr.cpp | 2 +- .../molten_core/boss_majordomo_executus.cpp | 17 ++-- .../molten_core/instance_molten_core.cpp | 85 +++++++------------ .../molten_core/molten_core.h | 21 ----- sd2_revision_nr.h | 2 +- 5 files changed, 40 insertions(+), 87 deletions(-) diff --git a/scripts/eastern_kingdoms/molten_core/boss_garr.cpp b/scripts/eastern_kingdoms/molten_core/boss_garr.cpp index e2aa7d50e..5ed5eb9f7 100644 --- a/scripts/eastern_kingdoms/molten_core/boss_garr.cpp +++ b/scripts/eastern_kingdoms/molten_core/boss_garr.cpp @@ -142,7 +142,7 @@ struct MANGOS_DLL_DECL mob_fireswornAI : public ScriptedAI if (m_uiSeparationCheckTimer < uiDiff) { // Distance guesswork, but should be ok - Creature* pGarr = m_pInstance->instance->GetCreature(m_pInstance->GetData64(NPC_GARR)); + Creature* pGarr = m_pInstance->GetSingleCreatureFromStorage(NPC_GARR); if (pGarr && pGarr->isAlive() && !m_creature->IsWithinDist2d(pGarr->GetPositionX(), pGarr->GetPositionY(), 50.0f)) DoCastSpellIfCan(m_creature, SPELL_SEPARATION_ANXIETY, CAST_TRIGGERED); diff --git a/scripts/eastern_kingdoms/molten_core/boss_majordomo_executus.cpp b/scripts/eastern_kingdoms/molten_core/boss_majordomo_executus.cpp index 0b26b066f..dc47972f9 100644 --- a/scripts/eastern_kingdoms/molten_core/boss_majordomo_executus.cpp +++ b/scripts/eastern_kingdoms/molten_core/boss_majordomo_executus.cpp @@ -81,7 +81,7 @@ struct MANGOS_DLL_DECL boss_majordomoAI : public ScriptedAI uint32 m_uiAegisTimer; uint32 m_uiSpeechTimer; - uint64 m_uiRagnarosGUID; + ObjectGuid m_ragnarosGuid; bool m_bHasEncounterFinished; uint8 m_uiAddsKilled; uint8 m_uiSpeech; @@ -96,7 +96,6 @@ struct MANGOS_DLL_DECL boss_majordomoAI : public ScriptedAI m_uiAegisTimer = 5000; m_uiSpeechTimer = 1000; - m_uiRagnarosGUID = 0; m_uiAddsKilled = 0; m_uiSpeech = 0; } @@ -159,7 +158,7 @@ struct MANGOS_DLL_DECL boss_majordomoAI : public ScriptedAI m_creature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); // Prevent possible exploits with double summoning - if (Creature* pRagnaros = m_creature->GetMap()->GetCreature(m_uiRagnarosGUID)) + if (Creature* pRagnaros = m_creature->GetMap()->GetCreature(m_ragnarosGuid)) return; DoScriptText(SAY_SUMMON_0, m_creature, pPlayer); @@ -192,7 +191,7 @@ struct MANGOS_DLL_DECL boss_majordomoAI : public ScriptedAI } else if (pSummoned->GetEntry() == NPC_RAGNAROS) { - m_uiRagnarosGUID = pSummoned->GetGUID(); + m_ragnarosGuid = pSummoned->GetObjectGuid(); pSummoned->CastSpell(pSummoned, SPELL_RAGNA_EMERGE, false); } } @@ -309,7 +308,7 @@ struct MANGOS_DLL_DECL boss_majordomoAI : public ScriptedAI break; case 12: // Reset orientation - if (GameObject* pLavaSteam = m_pInstance->instance->GetGameObject(m_pInstance->GetData64(GO_LAVA_STEAM))) + if (GameObject* pLavaSteam = m_pInstance->GetSingleGameObjectFromStorage(GO_LAVA_STEAM)) m_creature->SetFacingToObject(pLavaSteam); m_uiSpeechTimer = 4500; ++m_uiSpeech; @@ -322,13 +321,13 @@ struct MANGOS_DLL_DECL boss_majordomoAI : public ScriptedAI case 14: // Summon Ragnaros if (m_pInstance) - if (GameObject* pGo = m_pInstance->instance->GetGameObject(m_pInstance->GetData64(GO_LAVA_STEAM))) + if (GameObject* pGo = m_pInstance->GetSingleGameObjectFromStorage(GO_LAVA_STEAM)) m_creature->SummonCreature(NPC_RAGNAROS, pGo->GetPositionX(), pGo->GetPositionY(), pGo->GetPositionZ(), fmod(m_creature->GetOrientation() + M_PI, 2*M_PI), TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 2*HOUR*IN_MILLISECONDS); ++m_uiSpeech; m_uiSpeechTimer = 8700; break; case 15: - if (Creature* pRagnaros = m_creature->GetMap()->GetCreature(m_uiRagnarosGUID)) + if (Creature* pRagnaros = m_creature->GetMap()->GetCreature(m_ragnarosGuid)) DoScriptText(SAY_ARRIVAL1_RAG, pRagnaros); ++m_uiSpeech; m_uiSpeechTimer = 11700; @@ -339,13 +338,13 @@ struct MANGOS_DLL_DECL boss_majordomoAI : public ScriptedAI m_uiSpeechTimer = 8700; break; case 17: - if (Creature* pRagnaros = m_creature->GetMap()->GetCreature(m_uiRagnarosGUID)) + if (Creature* pRagnaros = m_creature->GetMap()->GetCreature(m_ragnarosGuid)) DoScriptText(SAY_ARRIVAL3_RAG, pRagnaros); ++m_uiSpeech; m_uiSpeechTimer = 16500; break; case 18: - if (Creature* pRagnaros = m_creature->GetMap()->GetCreature(m_uiRagnarosGUID)) + if (Creature* pRagnaros = m_creature->GetMap()->GetCreature(m_ragnarosGuid)) pRagnaros->CastSpell(m_creature, SPELL_ELEMENTAL_FIRE, false); // Rest of summoning speech is handled by Ragnaros, as Majordomo will be dead m_uiSpeech = 0; diff --git a/scripts/eastern_kingdoms/molten_core/instance_molten_core.cpp b/scripts/eastern_kingdoms/molten_core/instance_molten_core.cpp index feb92e8e0..cce083dc6 100644 --- a/scripts/eastern_kingdoms/molten_core/instance_molten_core.cpp +++ b/scripts/eastern_kingdoms/molten_core/instance_molten_core.cpp @@ -24,20 +24,7 @@ EndScriptData */ #include "precompiled.h" #include "molten_core.h" -instance_molten_core::instance_molten_core(Map* pMap) : ScriptedInstance(pMap), - m_uiGarrGUID(0), - m_uiSulfuronGUID(0), - m_uiMajordomoGUID(0), - m_uiRuneKoroGUID(0), - m_uiRuneZethGUID(0), - m_uiRuneMazjGUID(0), - m_uiRuneTheriGUID(0), - m_uiRuneBlazGUID(0), - m_uiRuneKressGUID(0), - m_uiRuneMohnGUID(0), - m_uiLavaSteamGUID(0), - m_uiLavaSplashGUID(0), - m_uiFirelordCacheGUID(0) +instance_molten_core::instance_molten_core(Map* pMap) : ScriptedInstance(pMap) { Initialize(); } @@ -69,9 +56,11 @@ void instance_molten_core::OnCreatureCreate(Creature* pCreature) switch (pCreature->GetEntry()) { // Bosses - case NPC_GARR: m_uiGarrGUID = pCreature->GetGUID(); break; - case NPC_SULFURON: m_uiSulfuronGUID = pCreature->GetGUID(); break; - case NPC_MAJORDOMO: m_uiMajordomoGUID = pCreature->GetGUID(); break; + case NPC_GARR: + case NPC_SULFURON: + case NPC_MAJORDOMO: + m_mNpcEntryGuidStore[pCreature->GetEntry()] = pCreature->GetObjectGuid(); + break; // Push adds to lists in order to handle respawn case NPC_FLAMEWAKER_PROTECTOR: m_luiProtectorGUIDs.push_back(pCreature->GetGUID()); break; @@ -87,19 +76,21 @@ void instance_molten_core::OnObjectCreate(GameObject* pGo) switch(pGo->GetEntry()) { // Runes - case GO_RUNE_KRESS: m_uiRuneKressGUID = pGo->GetGUID(); break; // Magmadar - case GO_RUNE_MOHN: m_uiRuneMohnGUID = pGo->GetGUID(); break; // Gehennas - case GO_RUNE_BLAZ: m_uiRuneBlazGUID = pGo->GetGUID(); break; // Garr - case GO_RUNE_MAZJ: m_uiRuneMazjGUID = pGo->GetGUID(); break; // Shazzrah - case GO_RUNE_ZETH: m_uiRuneZethGUID = pGo->GetGUID(); break; // Geddon - case GO_RUNE_THERI: m_uiRuneTheriGUID = pGo->GetGUID(); break; // Golemagg - case GO_RUNE_KORO: m_uiRuneKoroGUID = pGo->GetGUID(); break; // Sulfuron + case GO_RUNE_KRESS: + case GO_RUNE_MOHN: + case GO_RUNE_BLAZ: + case GO_RUNE_MAZJ: + case GO_RUNE_ZETH: + case GO_RUNE_THERI: + case GO_RUNE_KORO: // Majordomo event chest - case GO_CACHE_OF_THE_FIRE_LORD: m_uiFirelordCacheGUID = pGo->GetGUID(); break; + case GO_CACHE_OF_THE_FIRE_LORD: // Ragnaros GOs - case GO_LAVA_STEAM: m_uiLavaSteamGUID = pGo->GetGUID(); break; - case GO_LAVA_SPLASH: m_uiLavaSplashGUID = pGo->GetGUID(); break; + case GO_LAVA_STEAM: + case GO_LAVA_SPLASH: + m_mGoEntryGuidStore[pGo->GetEntry()] = pGo->GetObjectGuid(); + break; } } @@ -115,13 +106,13 @@ void instance_molten_core::SetData(uint32 uiType, uint32 uiData) case TYPE_MAGMADAR: m_auiEncounter[uiType] = uiData; if (uiData == DONE) - DoUseDoorOrButton(m_uiRuneKressGUID); + DoUseDoorOrButton(GO_RUNE_KRESS); break; case TYPE_GEHENNAS: m_auiEncounter[uiType] = uiData; if (uiData == DONE) { - DoUseDoorOrButton(m_uiRuneMohnGUID); + DoUseDoorOrButton(GO_RUNE_MOHN); m_luiFlamewakerGUIDs.clear(); } if (uiData == FAIL) @@ -131,7 +122,7 @@ void instance_molten_core::SetData(uint32 uiType, uint32 uiData) m_auiEncounter[uiType] = uiData; if (uiData == DONE) { - DoUseDoorOrButton(m_uiRuneBlazGUID); + DoUseDoorOrButton(GO_RUNE_BLAZ); m_luiFireswornGUIDs.clear(); } if (uiData == FAIL) @@ -140,18 +131,18 @@ void instance_molten_core::SetData(uint32 uiType, uint32 uiData) case TYPE_SHAZZRAH: m_auiEncounter[uiType] = uiData; if (uiData == DONE) - DoUseDoorOrButton(m_uiRuneMazjGUID); + DoUseDoorOrButton(GO_RUNE_MAZJ); break; case TYPE_GEDDON: m_auiEncounter[uiType] = uiData; if (uiData == DONE) - DoUseDoorOrButton(m_uiRuneZethGUID); + DoUseDoorOrButton(GO_RUNE_ZETH); break; case TYPE_GOLEMAGG: m_auiEncounter[uiType] = uiData; if (uiData == DONE) { - DoUseDoorOrButton(m_uiRuneTheriGUID); + DoUseDoorOrButton(GO_RUNE_THERI); DoHandleAdds(m_luiRagerGUIDs, false); m_luiRagerGUIDs.clear(); } @@ -162,7 +153,7 @@ void instance_molten_core::SetData(uint32 uiType, uint32 uiData) m_auiEncounter[uiType] = uiData; if (uiData == DONE) { - DoUseDoorOrButton(m_uiRuneKoroGUID); + DoUseDoorOrButton(GO_RUNE_KORO); m_luiPriestGUIDs.clear(); } if (uiData == FAIL) @@ -171,7 +162,7 @@ void instance_molten_core::SetData(uint32 uiType, uint32 uiData) case TYPE_MAJORDOMO: m_auiEncounter[uiType] = uiData; if (uiData == DONE) - DoRespawnGameObject(m_uiFirelordCacheGUID); + DoRespawnGameObject(GO_CACHE_OF_THE_FIRE_LORD, HOUR); break; case TYPE_RAGNAROS: m_auiEncounter[uiType] = uiData; @@ -210,14 +201,14 @@ uint32 instance_molten_core::GetData(uint32 uiType) // Handle Majordomo summon here void instance_molten_core::DoSpawnMajordomoIfCan(bool bByPlayerEnter) { - // If already spawned return - if (m_uiMajordomoGUID) - return; - // If both Majordomo and Ragnaros events are finished, return if (m_auiEncounter[TYPE_MAJORDOMO] == DONE && m_auiEncounter[TYPE_RAGNAROS] == DONE) return; + // If already spawned return + if (GetSingleCreatureFromStorage(NPC_MAJORDOMO, true)) + return; + // Check if all rune bosses are done for(uint8 i = TYPE_MAGMADAR; i < TYPE_MAJORDOMO; ++i) { @@ -270,22 +261,6 @@ void instance_molten_core::DoHandleAdds(GUIDList &luiAddsGUIDs, bool bRespawn /* } } -uint64 instance_molten_core::GetData64(uint32 uiData) -{ - switch (uiData) - { - case NPC_GARR: return m_uiGarrGUID; - case NPC_SULFURON: return m_uiSulfuronGUID; - case NPC_MAJORDOMO: return m_uiMajordomoGUID; - - case GO_LAVA_STEAM: return m_uiLavaSteamGUID; - case GO_LAVA_SPLASH: return m_uiLavaSplashGUID; - - default: - return 0; - } -} - void instance_molten_core::Load(const char* chrIn) { if (!chrIn) diff --git a/scripts/eastern_kingdoms/molten_core/molten_core.h b/scripts/eastern_kingdoms/molten_core/molten_core.h index 3a3be26ca..03c8a0f51 100644 --- a/scripts/eastern_kingdoms/molten_core/molten_core.h +++ b/scripts/eastern_kingdoms/molten_core/molten_core.h @@ -98,7 +98,6 @@ class MANGOS_DLL_DECL instance_molten_core : public ScriptedInstance void SetData(uint32 uiType, uint32 uiData); uint32 GetData(uint32 uiType); - uint64 GetData64(uint32 uiData); const char* Save() { return m_strInstData.c_str(); } void Load(const char* chrIn); @@ -112,26 +111,6 @@ class MANGOS_DLL_DECL instance_molten_core : public ScriptedInstance std::string m_strInstData; uint32 m_auiEncounter[MAX_ENCOUNTER]; - // Creatures - uint64 m_uiGarrGUID; - uint64 m_uiSulfuronGUID; - uint64 m_uiMajordomoGUID; - - // Runes - uint64 m_uiRuneKoroGUID; - uint64 m_uiRuneZethGUID; - uint64 m_uiRuneMazjGUID; - uint64 m_uiRuneTheriGUID; - uint64 m_uiRuneBlazGUID; - uint64 m_uiRuneKressGUID; - uint64 m_uiRuneMohnGUID; - - // Ragnaros related GOs - uint64 m_uiLavaSteamGUID; - uint64 m_uiLavaSplashGUID; - // Chests - uint64 m_uiFirelordCacheGUID; - // Adds lists GUIDList m_luiProtectorGUIDs; GUIDList m_luiFlamewakerGUIDs; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 466f3ac5a..40447cc2f 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2158" + #define SD2_REVISION_NR "2159" #endif // __SD2_REVISION_NR_H__ From 6436f23536bbaa56d4b57f21008247c58f9be1c5 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Fri, 3 Jun 2011 00:25:32 +0200 Subject: [PATCH 0140/1172] [2160] Use EntryGuidMap-Storage in Scarlet Monastery, also move to header based style --- .../boss_interrogator_vishas.cpp | 2 +- .../boss_mograine_and_whitemane.cpp | 12 +- .../instance_scarlet_monastery.cpp | 107 +++++++----------- .../scarlet_monastery/scarlet_monastery.h | 17 +++ sd2_revision_nr.h | 2 +- 5 files changed, 67 insertions(+), 73 deletions(-) diff --git a/scripts/eastern_kingdoms/scarlet_monastery/boss_interrogator_vishas.cpp b/scripts/eastern_kingdoms/scarlet_monastery/boss_interrogator_vishas.cpp index c24e0dcb4..d4678751f 100644 --- a/scripts/eastern_kingdoms/scarlet_monastery/boss_interrogator_vishas.cpp +++ b/scripts/eastern_kingdoms/scarlet_monastery/boss_interrogator_vishas.cpp @@ -72,7 +72,7 @@ struct MANGOS_DLL_DECL boss_interrogator_vishasAI : public ScriptedAI return; //Any other actions to do with vorrel? setStandState? - if (Creature *vorrel = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(NPC_VORREL))) + if (Creature *vorrel = m_pInstance->GetSingleCreatureFromStorage(NPC_VORREL)) DoScriptText(SAY_TRIGGER_VORREL, vorrel); } diff --git a/scripts/eastern_kingdoms/scarlet_monastery/boss_mograine_and_whitemane.cpp b/scripts/eastern_kingdoms/scarlet_monastery/boss_mograine_and_whitemane.cpp index ed5f98922..90c4c9d5d 100644 --- a/scripts/eastern_kingdoms/scarlet_monastery/boss_mograine_and_whitemane.cpp +++ b/scripts/eastern_kingdoms/scarlet_monastery/boss_mograine_and_whitemane.cpp @@ -85,7 +85,7 @@ struct MANGOS_DLL_DECL boss_scarlet_commander_mograineAI : public ScriptedAI if (!m_pInstance) return; - if (Creature* pWhitemane = m_pInstance->instance->GetCreature(m_pInstance->GetData64(NPC_WHITEMANE))) + if (Creature* pWhitemane = m_pInstance->GetSingleCreatureFromStorage(NPC_WHITEMANE)) { if (m_creature->isAlive() && !pWhitemane->isAlive()) pWhitemane->Respawn(); @@ -114,7 +114,7 @@ struct MANGOS_DLL_DECL boss_scarlet_commander_mograineAI : public ScriptedAI return; //On first death, fake death and open door, as well as initiate whitemane if exist - if (Creature* pWhitemane = m_pInstance->instance->GetCreature(m_pInstance->GetData64(NPC_WHITEMANE))) + if (Creature* pWhitemane = m_pInstance->GetSingleCreatureFromStorage(NPC_WHITEMANE)) { m_pInstance->SetData(TYPE_MOGRAINE_AND_WHITE_EVENT, IN_PROGRESS); @@ -163,7 +163,7 @@ struct MANGOS_DLL_DECL boss_scarlet_commander_mograineAI : public ScriptedAI if (m_bHasDied && !m_bHeal && m_pInstance && m_pInstance->GetData(TYPE_MOGRAINE_AND_WHITE_EVENT) == SPECIAL) { //On ressurection, stop fake death and heal whitemane and resume fight - if (Creature* pWhitemane = m_pInstance->instance->GetCreature(m_pInstance->GetData64(NPC_WHITEMANE))) + if (Creature* pWhitemane = m_pInstance->GetSingleCreatureFromStorage(NPC_WHITEMANE)) { m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); m_creature->SetStandState(UNIT_STAND_STATE_STAND); @@ -236,7 +236,7 @@ struct MANGOS_DLL_DECL boss_high_inquisitor_whitemaneAI : public ScriptedAI if (!m_pInstance) return; - if (Creature* pMograine = m_pInstance->instance->GetCreature(m_pInstance->GetData64(NPC_MOGRAINE))) + if (Creature* pMograine = m_pInstance->GetSingleCreatureFromStorage(NPC_MOGRAINE)) { if (m_creature->isAlive() && !pMograine->isAlive()) pMograine->Respawn(); @@ -298,7 +298,7 @@ struct MANGOS_DLL_DECL boss_high_inquisitor_whitemaneAI : public ScriptedAI //When casting resuruction make sure to delay so on rez when reinstate battle deepsleep runs out if (m_pInstance && m_uiWait_Timer < uiDiff) { - if (Creature* pMograine = m_pInstance->instance->GetCreature(m_pInstance->GetData64(NPC_MOGRAINE))) + if (Creature* pMograine = m_pInstance->GetSingleCreatureFromStorage(NPC_MOGRAINE)) { DoCastSpellIfCan(pMograine, SPELL_SCARLETRESURRECTION); DoScriptText(SAY_WH_RESSURECT, m_creature); @@ -335,7 +335,7 @@ struct MANGOS_DLL_DECL boss_high_inquisitor_whitemaneAI : public ScriptedAI if (m_pInstance) { - if (Creature* pMograine = m_pInstance->instance->GetCreature(m_pInstance->GetData64(NPC_MOGRAINE))) + if (Creature* pMograine = m_pInstance->GetSingleCreatureFromStorage(NPC_MOGRAINE)) { if (pMograine->isAlive() && pMograine->GetHealthPercent() <= 75.0f) pTarget = pMograine; diff --git a/scripts/eastern_kingdoms/scarlet_monastery/instance_scarlet_monastery.cpp b/scripts/eastern_kingdoms/scarlet_monastery/instance_scarlet_monastery.cpp index 6b54e9acd..7592b1900 100644 --- a/scripts/eastern_kingdoms/scarlet_monastery/instance_scarlet_monastery.cpp +++ b/scripts/eastern_kingdoms/scarlet_monastery/instance_scarlet_monastery.cpp @@ -24,78 +24,54 @@ EndScriptData */ #include "precompiled.h" #include "scarlet_monastery.h" -struct MANGOS_DLL_DECL instance_scarlet_monastery : public ScriptedInstance +instance_scarlet_monastery::instance_scarlet_monastery(Map* pMap) : ScriptedInstance(pMap) { - instance_scarlet_monastery(Map* pMap) : ScriptedInstance(pMap) {Initialize();}; - - uint32 m_auiEncounter[MAX_ENCOUNTER]; - - uint64 m_uiMograineGUID; - uint64 m_uiWhitemaneGUID; - uint64 m_uiVorrelGUID; - uint64 m_uiDoorHighInquisitorGUID; - - void Initialize() - { - memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); - - m_uiMograineGUID = 0; - m_uiWhitemaneGUID = 0; - m_uiVorrelGUID = 0; - m_uiDoorHighInquisitorGUID = 0; - } + Initialize(); +} - void OnCreatureCreate(Creature* pCreature) - { - switch(pCreature->GetEntry()) - { - case NPC_MOGRAINE: m_uiMograineGUID = pCreature->GetGUID(); break; - case NPC_WHITEMANE: m_uiWhitemaneGUID = pCreature->GetGUID(); break; - case NPC_VORREL: m_uiVorrelGUID = pCreature->GetGUID(); break; - } - } +void instance_scarlet_monastery::Initialize() +{ + memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); +} - void OnObjectCreate(GameObject* pGo) +void instance_scarlet_monastery::OnCreatureCreate(Creature* pCreature) +{ + switch(pCreature->GetEntry()) { - if (pGo->GetEntry() == GO_WHITEMANE_DOOR) - m_uiDoorHighInquisitorGUID = pGo->GetGUID(); + case NPC_MOGRAINE: + case NPC_WHITEMANE: + case NPC_VORREL: + m_mNpcEntryGuidStore[pCreature->GetEntry()] = pCreature->GetObjectGuid(); + break; } +} - uint64 GetData64(uint32 data) - { - switch(data) - { - case NPC_MOGRAINE: return m_uiMograineGUID; - case NPC_WHITEMANE: return m_uiWhitemaneGUID; - case NPC_VORREL: return m_uiVorrelGUID; - case GO_WHITEMANE_DOOR: return m_uiDoorHighInquisitorGUID; - - default: - return 0; - } - } +void instance_scarlet_monastery::OnObjectCreate(GameObject* pGo) +{ + if (pGo->GetEntry() == GO_WHITEMANE_DOOR) + m_mGoEntryGuidStore[GO_WHITEMANE_DOOR] = pGo->GetObjectGuid(); +} - void SetData(uint32 uiType, uint32 uiData) +void instance_scarlet_monastery::SetData(uint32 uiType, uint32 uiData) +{ + if (uiType == TYPE_MOGRAINE_AND_WHITE_EVENT) { - if (uiType == TYPE_MOGRAINE_AND_WHITE_EVENT) - { - if (uiData == IN_PROGRESS) - DoUseDoorOrButton(m_uiDoorHighInquisitorGUID); - if (uiData == FAIL) - DoUseDoorOrButton(m_uiDoorHighInquisitorGUID); + if (uiData == IN_PROGRESS) + DoUseDoorOrButton(GO_WHITEMANE_DOOR); + if (uiData == FAIL) + DoUseDoorOrButton(GO_WHITEMANE_DOOR); - m_auiEncounter[0] = uiData; - } + m_auiEncounter[0] = uiData; } +} - uint32 GetData(uint32 uiData) - { - if (uiData == TYPE_MOGRAINE_AND_WHITE_EVENT) - return m_auiEncounter[0]; +uint32 instance_scarlet_monastery::GetData(uint32 uiData) +{ + if (uiData == TYPE_MOGRAINE_AND_WHITE_EVENT) + return m_auiEncounter[0]; - return 0; - } -}; + return 0; +} InstanceData* GetInstanceData_instance_scarlet_monastery(Map* pMap) { @@ -104,9 +80,10 @@ InstanceData* GetInstanceData_instance_scarlet_monastery(Map* pMap) void AddSC_instance_scarlet_monastery() { - Script *newscript; - newscript = new Script; - newscript->Name = "instance_scarlet_monastery"; - newscript->GetInstanceData = &GetInstanceData_instance_scarlet_monastery; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "instance_scarlet_monastery"; + pNewScript->GetInstanceData = &GetInstanceData_instance_scarlet_monastery; + pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/scarlet_monastery/scarlet_monastery.h b/scripts/eastern_kingdoms/scarlet_monastery/scarlet_monastery.h index 540471eed..d19a793e1 100644 --- a/scripts/eastern_kingdoms/scarlet_monastery/scarlet_monastery.h +++ b/scripts/eastern_kingdoms/scarlet_monastery/scarlet_monastery.h @@ -18,4 +18,21 @@ enum GO_WHITEMANE_DOOR = 104600, }; +class MANGOS_DLL_DECL instance_scarlet_monastery : public ScriptedInstance +{ + public: + instance_scarlet_monastery(Map* pMap); + + void Initialize(); + + void OnCreatureCreate(Creature* pCreature); + void OnObjectCreate(GameObject* pGo); + + void SetData(uint32 uiType, uint32 uiData); + uint32 GetData(uint32 uiData); + + private: + uint32 m_auiEncounter[MAX_ENCOUNTER]; +}; + #endif diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 40447cc2f..a26bcbc36 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2159" + #define SD2_REVISION_NR "2160" #endif // __SD2_REVISION_NR_H__ From c25ad8ccda6f6ddb487a706ce9b28c0517994145 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Fri, 3 Jun 2011 00:37:15 +0200 Subject: [PATCH 0141/1172] [2161] Use EntryGuidMap-Storage in Scholomance --- .../scholomance/instance_scholomance.cpp | 56 +++++++++---------- .../scholomance/scholomance.h | 10 +--- sd2_revision_nr.h | 2 +- 3 files changed, 30 insertions(+), 38 deletions(-) diff --git a/scripts/eastern_kingdoms/scholomance/instance_scholomance.cpp b/scripts/eastern_kingdoms/scholomance/instance_scholomance.cpp index 81fbe5973..fd0fcbb5c 100644 --- a/scripts/eastern_kingdoms/scholomance/instance_scholomance.cpp +++ b/scripts/eastern_kingdoms/scholomance/instance_scholomance.cpp @@ -25,10 +25,6 @@ EndScriptData */ #include "scholomance.h" instance_scholomance::instance_scholomance(Map* pMap) : ScriptedInstance(pMap), - m_uiDarkmasterGandlingGUID(0), - m_uiGateKirtonosGUID(0), - m_uiGateRasGUID(0), - m_uiGateGandlingGUID(0), m_uiGandlingEvent(0) { Initialize(); @@ -53,7 +49,7 @@ void instance_scholomance::OnCreatureCreate(Creature* pCreature) switch (pCreature->GetEntry()) { case NPC_DARKMASTER_GANDLING: - m_uiDarkmasterGandlingGUID = pCreature->GetGUID(); + m_mNpcEntryGuidStore[NPC_DARKMASTER_GANDLING] = pCreature->GetObjectGuid(); break; case NPC_BONE_MINION: GandlingEventMap::iterator find = m_mGandlingData.find(m_uiGandlingEvent); @@ -67,16 +63,18 @@ void instance_scholomance::OnObjectCreate(GameObject* pGo) { switch(pGo->GetEntry()) { - case GO_GATE_KIRTONOS: m_uiGateKirtonosGUID = pGo->GetGUID(); break; - case GO_GATE_RAS: m_uiGateRasGUID = pGo->GetGUID(); break; - case GO_GATE_GANDLING: m_uiGateGandlingGUID = pGo->GetGUID(); break; + case GO_GATE_KIRTONOS: + case GO_GATE_RAS: + case GO_GATE_GANDLING: + m_mGoEntryGuidStore[pGo->GetEntry()] = pGo->GetObjectGuid(); + break; - case GO_GATE_MALICIA: m_mGandlingData[EVENT_ID_MALICIA].m_uiDoorGUID = pGo->GetGUID(); break; - case GO_GATE_THEOLEN: m_mGandlingData[EVENT_ID_THEOLEN].m_uiDoorGUID = pGo->GetGUID(); break; - case GO_GATE_POLKELT: m_mGandlingData[EVENT_ID_POLKELT].m_uiDoorGUID = pGo->GetGUID(); break; - case GO_GATE_RAVENIAN: m_mGandlingData[EVENT_ID_RAVENIAN].m_uiDoorGUID = pGo->GetGUID(); break; - case GO_GATE_BAROV: m_mGandlingData[EVENT_ID_BAROV].m_uiDoorGUID = pGo->GetGUID(); break; - case GO_GATE_ILLUCIA: m_mGandlingData[EVENT_ID_ILLUCIA].m_uiDoorGUID = pGo->GetGUID(); break; + case GO_GATE_MALICIA: m_mGandlingData[EVENT_ID_MALICIA].m_doorGuid = pGo->GetObjectGuid(); break; + case GO_GATE_THEOLEN: m_mGandlingData[EVENT_ID_THEOLEN].m_doorGuid = pGo->GetObjectGuid(); break; + case GO_GATE_POLKELT: m_mGandlingData[EVENT_ID_POLKELT].m_doorGuid = pGo->GetObjectGuid(); break; + case GO_GATE_RAVENIAN: m_mGandlingData[EVENT_ID_RAVENIAN].m_doorGuid = pGo->GetObjectGuid(); break; + case GO_GATE_BAROV: m_mGandlingData[EVENT_ID_BAROV].m_doorGuid = pGo->GetObjectGuid(); break; + case GO_GATE_ILLUCIA: m_mGandlingData[EVENT_ID_ILLUCIA].m_doorGuid = pGo->GetObjectGuid(); break; case GO_VIEWING_ROOM_DOOR: // In normal flow of the instance, this door is opened by a dropped key @@ -95,43 +93,43 @@ void instance_scholomance::SetData(uint32 uiType, uint32 uiData) if (m_auiEncounter[uiType] != FAIL && uiData == IN_PROGRESS) return; m_auiEncounter[uiType] = uiData; - DoUseDoorOrButton(m_uiGateKirtonosGUID); + DoUseDoorOrButton(GO_GATE_KIRTONOS); break; case TYPE_RATTLEGORE: m_auiEncounter[uiType] = uiData; break; case TYPE_RAS_FROSTWHISPER: m_auiEncounter[uiType] = uiData; - DoUseDoorOrButton(m_uiGateRasGUID); + DoUseDoorOrButton(GO_GATE_RAS); break; case TYPE_MALICIA: // TODO this code can be simplified, when it is known which event-ids correspond to which room m_auiEncounter[uiType] = uiData; - DoUseDoorOrButton(m_mGandlingData[EVENT_ID_MALICIA].m_uiDoorGUID); + DoUseDoorOrButton(m_mGandlingData[EVENT_ID_MALICIA].m_doorGuid); break; case TYPE_THEOLEN: m_auiEncounter[uiType] = uiData; - DoUseDoorOrButton(m_mGandlingData[EVENT_ID_THEOLEN].m_uiDoorGUID); + DoUseDoorOrButton(m_mGandlingData[EVENT_ID_THEOLEN].m_doorGuid); break; case TYPE_POLKELT: m_auiEncounter[uiType] = uiData; - DoUseDoorOrButton(m_mGandlingData[EVENT_ID_POLKELT].m_uiDoorGUID); + DoUseDoorOrButton(m_mGandlingData[EVENT_ID_POLKELT].m_doorGuid); break; case TYPE_RAVENIAN: m_auiEncounter[uiType] = uiData; - DoUseDoorOrButton(m_mGandlingData[EVENT_ID_RAVENIAN].m_uiDoorGUID); + DoUseDoorOrButton(m_mGandlingData[EVENT_ID_RAVENIAN].m_doorGuid); break; case TYPE_ALEXEI_BAROV: m_auiEncounter[uiType] = uiData; - DoUseDoorOrButton(m_mGandlingData[EVENT_ID_BAROV].m_uiDoorGUID); + DoUseDoorOrButton(m_mGandlingData[EVENT_ID_BAROV].m_doorGuid); break; case TYPE_ILLUCIA_BAROV: m_auiEncounter[uiType] = uiData; - DoUseDoorOrButton(m_mGandlingData[EVENT_ID_ILLUCIA].m_uiDoorGUID); + DoUseDoorOrButton(m_mGandlingData[EVENT_ID_ILLUCIA].m_doorGuid); break; case TYPE_GANDLING: m_auiEncounter[uiType] = uiData; // Close the door to main room, because the encounter will take place only in the main hall and random around all the 6 rooms - DoUseDoorOrButton(m_uiGateGandlingGUID); + DoUseDoorOrButton(GO_GATE_GANDLING); break; } @@ -157,14 +155,14 @@ void instance_scholomance::SetData(uint32 uiType, uint32 uiData) void instance_scholomance::DoSpawnGandlingIfCan(bool bByPlayerEnter) { - // Summon only once - if (m_uiDarkmasterGandlingGUID) - return; - // Do not summon, if event finished if (m_auiEncounter[TYPE_GANDLING] == DONE) return; + // Summon only once + if (GetSingleCreatureFromStorage(NPC_DARKMASTER_GANDLING)) + return; + Player* pPlayer = GetPlayerInMap(); if (!pPlayer) return; @@ -196,7 +194,7 @@ void instance_scholomance::HandlePortalEvent(uint32 uiEventId, uint32 uiData) if (!find->second.m_bIsActive) { find->second.m_bIsActive = true; - DoUseDoorOrButton(find->second.m_uiDoorGUID); + DoUseDoorOrButton(find->second.m_doorGuid); } } // Toggle door and event state in case of state-switch @@ -207,7 +205,7 @@ void instance_scholomance::HandlePortalEvent(uint32 uiEventId, uint32 uiData) uiData == DONE && find->second.m_bIsActive) { find->second.m_bIsActive = !find->second.m_bIsActive; - DoUseDoorOrButton(find->second.m_uiDoorGUID); + DoUseDoorOrButton(find->second.m_doorGuid); } } } diff --git a/scripts/eastern_kingdoms/scholomance/scholomance.h b/scripts/eastern_kingdoms/scholomance/scholomance.h index cf91e0ce6..c9a7048fc 100644 --- a/scripts/eastern_kingdoms/scholomance/scholomance.h +++ b/scripts/eastern_kingdoms/scholomance/scholomance.h @@ -68,9 +68,9 @@ static const SpawnLocation aGandlingSpawnLocs[1] = struct GandlingEventData { - GandlingEventData() : m_bIsActive(false), m_uiDoorGUID(0) {} + GandlingEventData() : m_bIsActive(false) {} bool m_bIsActive; - uint64 m_uiDoorGUID; + ObjectGuid m_doorGuid; std::set m_sAddGuids; }; @@ -108,12 +108,6 @@ class MANGOS_DLL_DECL instance_scholomance : public ScriptedInstance uint32 m_auiEncounter[MAX_ENCOUNTER]; std::string m_strInstData; - uint64 m_uiDarkmasterGandlingGUID; - - uint64 m_uiGateKirtonosGUID; - uint64 m_uiGateRasGUID; - uint64 m_uiGateGandlingGUID; - uint32 m_uiGandlingEvent; GandlingEventMap m_mGandlingData; }; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index a26bcbc36..c7cf32556 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2160" + #define SD2_REVISION_NR "2161" #endif // __SD2_REVISION_NR_H__ From 91de730a443e04126e203087fec0b1a2efc1fe0b Mon Sep 17 00:00:00 2001 From: Xfurry Date: Fri, 3 Jun 2011 11:59:47 +0200 Subject: [PATCH 0142/1172] [2162] Fix compile for MaNGOS Rev 11590 Signed-off-by: Schmoozerd --- ScriptMgr.cpp | 2 +- sd2_revision_nr.h | 2 +- sql/scriptdev2_script_full.sql | 2 +- sql/updates/r2162_scriptdev2.sql | 1 + system/system.cpp | 12 ++++++------ 5 files changed, 10 insertions(+), 9 deletions(-) create mode 100644 sql/updates/r2162_scriptdev2.sql diff --git a/ScriptMgr.cpp b/ScriptMgr.cpp index f807c293b..04c9ebb32 100644 --- a/ScriptMgr.cpp +++ b/ScriptMgr.cpp @@ -103,7 +103,7 @@ void InitScriptLibrary() LoadDatabase(); outstring_log("SD2: Loading C++ scripts"); - barGoLink bar(1); + BarGoLink bar(1); bar.step(); outstring_log(""); diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index c7cf32556..23c29ac54 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2161" + #define SD2_REVISION_NR "2162" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 3e75dd370..58d073764 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -3,7 +3,7 @@ -- DELETE FROM sd2_db_version; -INSERT INTO sd2_db_version (version) VALUES ('ScriptDev2 (for MaNGOS 11576+) '); +INSERT INTO sd2_db_version (version) VALUES ('ScriptDev2 (for MaNGOS 11590+) '); -- -- Below contains data for table `script_texts` mainly used in C++ parts. diff --git a/sql/updates/r2162_scriptdev2.sql b/sql/updates/r2162_scriptdev2.sql new file mode 100644 index 000000000..eb0f8f565 --- /dev/null +++ b/sql/updates/r2162_scriptdev2.sql @@ -0,0 +1 @@ +UPDATE sd2_db_version SET version='ScriptDev2 (for MaNGOS 11590+) '; diff --git a/system/system.cpp b/system/system.cpp index 4bc26c6f9..0a7bf9c21 100644 --- a/system/system.cpp +++ b/system/system.cpp @@ -59,7 +59,7 @@ void SystemMgr::LoadScriptTexts() if (pResult) { - barGoLink bar(pResult->GetRowCount()); + BarGoLink bar(pResult->GetRowCount()); uint32 uiCount = 0; do @@ -103,7 +103,7 @@ void SystemMgr::LoadScriptTexts() } else { - barGoLink bar(1); + BarGoLink bar(1); bar.step(); outstring_log(""); outstring_log(">> Loaded 0 additional Script Texts data. DB table `script_texts` is empty."); @@ -121,7 +121,7 @@ void SystemMgr::LoadScriptTextsCustom() if (pResult) { - barGoLink bar(pResult->GetRowCount()); + BarGoLink bar(pResult->GetRowCount()); uint32 uiCount = 0; do @@ -165,7 +165,7 @@ void SystemMgr::LoadScriptTextsCustom() } else { - barGoLink bar(1); + BarGoLink bar(1); bar.step(); outstring_log(""); outstring_log(">> Loaded 0 additional Custom Texts data. DB table `custom_texts` is empty."); @@ -199,7 +199,7 @@ void SystemMgr::LoadScriptWaypoints() if (pResult) { - barGoLink bar(pResult->GetRowCount()); + BarGoLink bar(pResult->GetRowCount()); uint32 uiNodeCount = 0; do @@ -238,7 +238,7 @@ void SystemMgr::LoadScriptWaypoints() } else { - barGoLink bar(1); + BarGoLink bar(1); bar.step(); outstring_log(""); outstring_log(">> Loaded 0 Script Waypoints. DB table `script_waypoint` is empty."); From b8353ce4a354e12f71fe428c74b00f4bc3fc5e19 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Fri, 3 Jun 2011 12:08:27 +0200 Subject: [PATCH 0143/1172] [2163] Use EntryGuidMap-Storage in Zul'Farrak Signed-off-by: Schmoozerd --- .../kalimdor/zulfarrak/instance_zulfarrak.cpp | 17 ++++------------- scripts/kalimdor/zulfarrak/zulfarrak.cpp | 2 +- scripts/kalimdor/zulfarrak/zulfarrak.h | 3 --- sd2_revision_nr.h | 2 +- 4 files changed, 6 insertions(+), 18 deletions(-) diff --git a/scripts/kalimdor/zulfarrak/instance_zulfarrak.cpp b/scripts/kalimdor/zulfarrak/instance_zulfarrak.cpp index d699b93ad..148c7089a 100644 --- a/scripts/kalimdor/zulfarrak/instance_zulfarrak.cpp +++ b/scripts/kalimdor/zulfarrak/instance_zulfarrak.cpp @@ -24,8 +24,7 @@ EndScriptData */ #include "precompiled.h" #include "zulfarrak.h" -instance_zulfarrak::instance_zulfarrak(Map* pMap) : ScriptedInstance(pMap), - m_uiAntuSulGUID(0) +instance_zulfarrak::instance_zulfarrak(Map* pMap) : ScriptedInstance(pMap) { Initialize(); } @@ -39,7 +38,9 @@ void instance_zulfarrak::OnCreatureCreate(Creature* pCreature) { switch (pCreature->GetEntry()) { - case NPC_ANTUSUL: m_uiAntuSulGUID = pCreature->GetGUID(); break; + case NPC_ANTUSUL: + m_mNpcEntryGuidStore[NPC_ANTUSUL] = pCreature->GetObjectGuid(); + break; } } @@ -107,16 +108,6 @@ uint32 instance_zulfarrak::GetData(uint32 uiType) return 0; } -uint64 instance_zulfarrak::GetData64(uint32 uiData) -{ - switch (uiData) - { - case NPC_ANTUSUL: return m_uiAntuSulGUID; - default: - return 0; - } -} - void instance_zulfarrak::OnCreatureEnterCombat(Creature* pCreature) { switch (pCreature->GetEntry()) diff --git a/scripts/kalimdor/zulfarrak/zulfarrak.cpp b/scripts/kalimdor/zulfarrak/zulfarrak.cpp index 08482a853..7d0b43c65 100644 --- a/scripts/kalimdor/zulfarrak/zulfarrak.cpp +++ b/scripts/kalimdor/zulfarrak/zulfarrak.cpp @@ -250,7 +250,7 @@ bool AreaTrigger_at_zulfarrak(Player* pPlayer, AreaTriggerEntry const* pAt) if (pInstance->GetData(TYPE_ANTUSUL) == NOT_STARTED || pInstance->GetData(TYPE_ANTUSUL) == FAIL) { - if (Creature* pAntuSul = pInstance->instance->GetCreature(pInstance->GetData64(NPC_ANTUSUL))) + if (Creature* pAntuSul = pInstance->GetSingleCreatureFromStorage(NPC_ANTUSUL)) { if (pAntuSul->isAlive()) pAntuSul->AI()->AttackStart(pPlayer); diff --git a/scripts/kalimdor/zulfarrak/zulfarrak.h b/scripts/kalimdor/zulfarrak/zulfarrak.h index 486344f8e..59a2e75fe 100644 --- a/scripts/kalimdor/zulfarrak/zulfarrak.h +++ b/scripts/kalimdor/zulfarrak/zulfarrak.h @@ -46,7 +46,6 @@ class MANGOS_DLL_DECL instance_zulfarrak : public ScriptedInstance void SetData(uint32 uiType, uint32 uiData); uint32 GetData(uint32 uiType); - uint64 GetData64(uint32 uiData); const char* Save() { return strInstData.c_str(); } void Load(const char* chrIn); @@ -54,8 +53,6 @@ class MANGOS_DLL_DECL instance_zulfarrak : public ScriptedInstance protected: uint32 m_auiEncounter[MAX_ENCOUNTER]; std::string strInstData; - - uint64 m_uiAntuSulGUID; }; #endif diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 23c29ac54..b5dd12135 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2162" + #define SD2_REVISION_NR "2163" #endif // __SD2_REVISION_NR_H__ From f6f434747ef86ea1e5cf55a61785b6783c7a78f4 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Fri, 3 Jun 2011 12:13:25 +0200 Subject: [PATCH 0144/1172] [2164] Use EntryGuidMap-Storage in Wailing Caverns Signed-off-by: Schmoozerd --- .../instance_wailing_caverns.cpp | 32 +++++++------------ .../wailing_caverns/wailing_caverns.cpp | 16 +++++----- .../wailing_caverns/wailing_caverns.h | 4 --- sd2_revision_nr.h | 2 +- 4 files changed, 21 insertions(+), 33 deletions(-) diff --git a/scripts/kalimdor/wailing_caverns/instance_wailing_caverns.cpp b/scripts/kalimdor/wailing_caverns/instance_wailing_caverns.cpp index b6907a75a..de8a6f40b 100644 --- a/scripts/kalimdor/wailing_caverns/instance_wailing_caverns.cpp +++ b/scripts/kalimdor/wailing_caverns/instance_wailing_caverns.cpp @@ -24,9 +24,7 @@ EndScriptData */ #include "precompiled.h" #include "wailing_caverns.h" -instance_wailing_caverns::instance_wailing_caverns(Map* pMap) : ScriptedInstance(pMap), - m_uiNaralexGUID(0), - m_uiDiscipleGUID(0) +instance_wailing_caverns::instance_wailing_caverns(Map* pMap) : ScriptedInstance(pMap) { Initialize(); } @@ -40,8 +38,10 @@ void instance_wailing_caverns::OnCreatureCreate(Creature* pCreature) { switch (pCreature->GetEntry()) { - case NPC_NARALEX: m_uiNaralexGUID = pCreature->GetGUID(); break; - case NPC_DISCIPLE: m_uiDiscipleGUID = pCreature->GetGUID(); break; + case NPC_NARALEX: + case NPC_DISCIPLE: + m_mNpcEntryGuidStore[pCreature->GetEntry()] = pCreature->GetObjectGuid(); + break; } } @@ -75,7 +75,7 @@ void instance_wailing_caverns::SetData(uint32 uiType, uint32 uiData) // Yell intro text; only the first time if (m_auiEncounter[4] == NOT_STARTED) { - if (Creature* pDisciple = instance->GetCreature(m_uiDiscipleGUID)) + if (Creature* pDisciple = GetSingleCreatureFromStorage(NPC_DISCIPLE)) DoScriptText(SAY_INTRO, pDisciple); } @@ -134,15 +134,6 @@ uint32 instance_wailing_caverns::GetData(uint32 uiType) return 0; } -uint64 instance_wailing_caverns::GetData64(uint32 uiData) -{ - switch (uiData) - { - case NPC_NARALEX: return m_uiNaralexGUID; - } - return 0; -} - InstanceData* GetInstanceData_instance_wailing_caverns(Map* pMap) { return new instance_wailing_caverns(pMap); @@ -150,9 +141,10 @@ InstanceData* GetInstanceData_instance_wailing_caverns(Map* pMap) void AddSC_instance_wailing_caverns() { - Script* newscript; - newscript = new Script; - newscript->Name = "instance_wailing_caverns"; - newscript->GetInstanceData = &GetInstanceData_instance_wailing_caverns; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "instance_wailing_caverns"; + pNewScript->GetInstanceData = &GetInstanceData_instance_wailing_caverns; + pNewScript->RegisterSelf(); } diff --git a/scripts/kalimdor/wailing_caverns/wailing_caverns.cpp b/scripts/kalimdor/wailing_caverns/wailing_caverns.cpp index a9e1a0a3e..3e995aa97 100644 --- a/scripts/kalimdor/wailing_caverns/wailing_caverns.cpp +++ b/scripts/kalimdor/wailing_caverns/wailing_caverns.cpp @@ -187,7 +187,7 @@ struct MANGOS_DLL_DECL npc_disciple_of_naralexAI : public npc_escortAI DoScriptText(SAY_NARALEX_CHAMBER, m_creature); break; case 32: - if (Creature* pNaralex = m_pInstance->instance->GetCreature(m_pInstance->GetData64(NPC_NARALEX))) + if (Creature* pNaralex = m_pInstance->GetSingleCreatureFromStorage(NPC_NARALEX)) m_creature->SetFacingToObject(pNaralex); m_creature->SetStandState(UNIT_STAND_STATE_KNEEL); @@ -306,7 +306,7 @@ struct MANGOS_DLL_DECL npc_disciple_of_naralexAI : public npc_escortAI ++m_uiSubeventPhase; break; case 2: - if (Creature* pNaralex = m_pInstance->instance->GetCreature(m_pInstance->GetData64(NPC_NARALEX))) + if (Creature* pNaralex = m_pInstance->GetSingleCreatureFromStorage(NPC_NARALEX)) DoScriptText(EMOTE_NARALEX_AWAKE, pNaralex); m_uiEventTimer = 5000; ++m_uiSubeventPhase; @@ -327,14 +327,14 @@ struct MANGOS_DLL_DECL npc_disciple_of_naralexAI : public npc_escortAI break; case 5: // Advance only when all mobs are dead - if (Creature* pNaralex = m_pInstance->instance->GetCreature(m_pInstance->GetData64(NPC_NARALEX))) + if (Creature* pNaralex = m_pInstance->GetSingleCreatureFromStorage(NPC_NARALEX)) DoScriptText(EMOTE_BREAK_THROUGH, pNaralex); ++m_uiSubeventPhase; m_uiEventTimer = 10000; break; case 6: // Mutanus - if (Creature* pNaralex = m_pInstance->instance->GetCreature(m_pInstance->GetData64(NPC_NARALEX))) + if (Creature* pNaralex = m_pInstance->GetSingleCreatureFromStorage(NPC_NARALEX)) DoScriptText(EMOTE_VISION, pNaralex); DoSpawnMob(NPC_MUTANUS, aSummonPositions[4][0], aSummonPositions[4][1]); m_uiEventTimer = 0; @@ -342,7 +342,7 @@ struct MANGOS_DLL_DECL npc_disciple_of_naralexAI : public npc_escortAI break; case 7: // Awaken Naralex after mutanus is defeated - if (Creature* pNaralex = m_pInstance->instance->GetCreature(m_pInstance->GetData64(NPC_NARALEX))) + if (Creature* pNaralex = m_pInstance->GetSingleCreatureFromStorage(NPC_NARALEX)) { pNaralex->SetStandState(UNIT_STAND_STATE_SIT); DoScriptText(SAY_NARALEX_AWAKE, pNaralex); @@ -359,7 +359,7 @@ struct MANGOS_DLL_DECL npc_disciple_of_naralexAI : public npc_escortAI ++m_uiSubeventPhase; break; case 9: - if (Creature* pNaralex = m_pInstance->instance->GetCreature(m_pInstance->GetData64(NPC_NARALEX))) + if (Creature* pNaralex = m_pInstance->GetSingleCreatureFromStorage(NPC_NARALEX)) { DoScriptText(SAY_NARALEX_THANKYOU, pNaralex); pNaralex->SetStandState(UNIT_STAND_STATE_STAND); @@ -369,7 +369,7 @@ struct MANGOS_DLL_DECL npc_disciple_of_naralexAI : public npc_escortAI break; case 10: // Shapeshift into a bird - if (Creature* pNaralex = m_pInstance->instance->GetCreature(m_pInstance->GetData64(NPC_NARALEX))) + if (Creature* pNaralex = m_pInstance->GetSingleCreatureFromStorage(NPC_NARALEX)) { DoScriptText(SAY_FAREWELL, pNaralex); pNaralex->CastSpell(pNaralex, SPELL_SHAPESHIFT, false); @@ -383,7 +383,7 @@ struct MANGOS_DLL_DECL npc_disciple_of_naralexAI : public npc_escortAI m_creature->AddSplineFlag(SPLINEFLAG_FLYING); SetRun(); // Send them flying somewhere outside of the room - if (Creature* pNaralex = m_pInstance->instance->GetCreature(m_pInstance->GetData64(NPC_NARALEX))) + if (Creature* pNaralex = m_pInstance->GetSingleCreatureFromStorage(NPC_NARALEX)) { // ToDo: Make Naralex fly // sort of a hack, compare to boss_onyxia diff --git a/scripts/kalimdor/wailing_caverns/wailing_caverns.h b/scripts/kalimdor/wailing_caverns/wailing_caverns.h index 99d317990..d688ace59 100644 --- a/scripts/kalimdor/wailing_caverns/wailing_caverns.h +++ b/scripts/kalimdor/wailing_caverns/wailing_caverns.h @@ -33,7 +33,6 @@ class MANGOS_DLL_DECL instance_wailing_caverns : public ScriptedInstance void SetData(uint32 uiType, uint32 uiData); uint32 GetData(uint32 uiType); - uint64 GetData64(uint32 uiData); const char* Save() { return strInstData.c_str(); } void Load(const char* chrIn); @@ -41,8 +40,5 @@ class MANGOS_DLL_DECL instance_wailing_caverns : public ScriptedInstance protected: uint32 m_auiEncounter[MAX_ENCOUNTER]; std::string strInstData; - - uint64 m_uiNaralexGUID; - uint64 m_uiDiscipleGUID; }; #endif diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index b5dd12135..0c7a8e786 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2163" + #define SD2_REVISION_NR "2164" #endif // __SD2_REVISION_NR_H__ From cfaf1fec674401158375d7a6c96b5d480d4eafc6 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Fri, 3 Jun 2011 12:33:26 +0200 Subject: [PATCH 0145/1172] [2165] Use EntryGuidMap-Storage in Razorfen Kraul Signed-off-by: Schmoozerd --- .../razorfen_kraul/instance_razorfen_kraul.cpp | 18 +++++++++--------- .../kalimdor/razorfen_kraul/razorfen_kraul.h | 1 - sd2_revision_nr.h | 2 +- 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/scripts/kalimdor/razorfen_kraul/instance_razorfen_kraul.cpp b/scripts/kalimdor/razorfen_kraul/instance_razorfen_kraul.cpp index f55da4c1f..19cc91008 100644 --- a/scripts/kalimdor/razorfen_kraul/instance_razorfen_kraul.cpp +++ b/scripts/kalimdor/razorfen_kraul/instance_razorfen_kraul.cpp @@ -25,7 +25,6 @@ EndScriptData */ #include "razorfen_kraul.h" instance_razorfen_kraul::instance_razorfen_kraul(Map* pMap) : ScriptedInstance(pMap), - m_uiAgathelosWardGUID(0), m_uiWardKeepersRemaining(0) { Initialize(); @@ -41,9 +40,9 @@ void instance_razorfen_kraul::OnObjectCreate(GameObject* pGo) switch(pGo->GetEntry()) { case GO_AGATHELOS_WARD: - m_uiAgathelosWardGUID = pGo->GetGUID(); + m_mGoEntryGuidStore[GO_AGATHELOS_WARD] = pGo->GetObjectGuid(); if (m_auiEncounter[0] == DONE) - DoUseDoorOrButton(m_uiAgathelosWardGUID); + DoUseDoorOrButton(GO_AGATHELOS_WARD); break; } @@ -68,7 +67,7 @@ void instance_razorfen_kraul::SetData(uint32 uiType, uint32 uiData) if (!m_uiWardKeepersRemaining) { m_auiEncounter[0] = uiData; - DoUseDoorOrButton(m_uiAgathelosWardGUID); + DoUseDoorOrButton(GO_AGATHELOS_WARD); } break; } @@ -126,9 +125,10 @@ InstanceData* GetInstanceData_instance_razorfen_kraul(Map* pMap) void AddSC_instance_razorfen_kraul() { - Script* newscript; - newscript = new Script; - newscript->Name = "instance_razorfen_kraul"; - newscript->GetInstanceData = &GetInstanceData_instance_razorfen_kraul; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "instance_razorfen_kraul"; + pNewScript->GetInstanceData = &GetInstanceData_instance_razorfen_kraul; + pNewScript->RegisterSelf(); } diff --git a/scripts/kalimdor/razorfen_kraul/razorfen_kraul.h b/scripts/kalimdor/razorfen_kraul/razorfen_kraul.h index f7e189618..2c6d0011c 100644 --- a/scripts/kalimdor/razorfen_kraul/razorfen_kraul.h +++ b/scripts/kalimdor/razorfen_kraul/razorfen_kraul.h @@ -37,7 +37,6 @@ class MANGOS_DLL_DECL instance_razorfen_kraul : public ScriptedInstance uint32 m_auiEncounter[MAX_ENCOUNTER]; std::string strInstData; - uint64 m_uiAgathelosWardGUID; uint8 m_uiWardKeepersRemaining; }; #endif diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 0c7a8e786..adc1965e2 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2164" + #define SD2_REVISION_NR "2165" #endif // __SD2_REVISION_NR_H__ From dbc17dc8a79746e04f6f345e24ef1546a9128c00 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Fri, 3 Jun 2011 12:38:00 +0200 Subject: [PATCH 0146/1172] [2166] Use EntryGuidMap-Storage in Blackfathom Deeps Signed-off-by: Schmoozerd --- scripts/kalimdor/blackfathom_deeps/blackfathom_deeps.h | 2 -- .../blackfathom_deeps/instance_blackfathom_deeps.cpp | 10 ++++------ sd2_revision_nr.h | 2 +- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/scripts/kalimdor/blackfathom_deeps/blackfathom_deeps.h b/scripts/kalimdor/blackfathom_deeps/blackfathom_deeps.h index 98855a35d..11c9e7343 100644 --- a/scripts/kalimdor/blackfathom_deeps/blackfathom_deeps.h +++ b/scripts/kalimdor/blackfathom_deeps/blackfathom_deeps.h @@ -112,8 +112,6 @@ class MANGOS_DLL_DECL instance_blackfathom_deeps : public ScriptedInstance uint32 m_auiEncounter[MAX_ENCOUNTER]; std::string m_strInstData; - uint64 m_uiKelrisGUID; - uint64 m_uiPortalGUID; uint32 m_uiSpawnMobsTimer[MAX_FIRES]; uint8 m_uiWaveCounter; diff --git a/scripts/kalimdor/blackfathom_deeps/instance_blackfathom_deeps.cpp b/scripts/kalimdor/blackfathom_deeps/instance_blackfathom_deeps.cpp index 5978b5345..c2aa3c564 100644 --- a/scripts/kalimdor/blackfathom_deeps/instance_blackfathom_deeps.cpp +++ b/scripts/kalimdor/blackfathom_deeps/instance_blackfathom_deeps.cpp @@ -30,8 +30,6 @@ EndScriptData */ */ instance_blackfathom_deeps::instance_blackfathom_deeps(Map* pMap) : ScriptedInstance(pMap), - m_uiKelrisGUID(0), - m_uiPortalGUID(0), m_uiWaveCounter(0) { Initialize(); @@ -46,7 +44,7 @@ void instance_blackfathom_deeps::Initialize() void instance_blackfathom_deeps::OnCreatureCreate(Creature* pCreature) { if (pCreature->GetEntry() == NPC_KELRIS) - m_uiKelrisGUID = pCreature->GetGUID(); + m_mNpcEntryGuidStore[NPC_KELRIS] = pCreature->GetObjectGuid(); } void instance_blackfathom_deeps::OnObjectCreate(GameObject* pGo) @@ -57,7 +55,7 @@ void instance_blackfathom_deeps::OnObjectCreate(GameObject* pGo) if (m_auiEncounter[1] == DONE) pGo->SetGoState(GO_STATE_ACTIVE); - m_uiPortalGUID = pGo->GetGUID(); + m_mGoEntryGuidStore[GO_PORTAL_DOOR] = pGo->GetObjectGuid(); break; case GO_SHRINE_1: case GO_SHRINE_2: @@ -71,7 +69,7 @@ void instance_blackfathom_deeps::OnObjectCreate(GameObject* pGo) void instance_blackfathom_deeps::DoSpawnMobs(uint8 uiWaveIndex) { - Creature* pKelris = instance->GetCreature(m_uiKelrisGUID); + Creature* pKelris = GetSingleCreatureFromStorage(NPC_KELRIS); if (!pKelris) return; @@ -125,7 +123,7 @@ void instance_blackfathom_deeps::SetData(uint32 uiType, uint32 uiData) ++m_uiWaveCounter; } else if (uiData == DONE) - DoUseDoorOrButton(m_uiPortalGUID); + DoUseDoorOrButton(GO_PORTAL_DOOR); break; } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index adc1965e2..acedfe386 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2165" + #define SD2_REVISION_NR "2166" #endif // __SD2_REVISION_NR_H__ From a9443d553eec8b420f02decbd1290e46f54f616c Mon Sep 17 00:00:00 2001 From: Xfurry Date: Fri, 3 Jun 2011 13:10:17 +0200 Subject: [PATCH 0147/1172] [2167] Use EntryGuidMap-Storage in Steam Vault Signed-off-by: Schmoozerd --- .../boss_mekgineer_steamrigger.cpp | 4 +- .../steam_vault/instance_steam_vault.cpp | 43 ++++++------------- .../steam_vault/steam_vault.h | 13 +----- sd2_revision_nr.h | 2 +- 4 files changed, 18 insertions(+), 44 deletions(-) diff --git a/scripts/outland/coilfang_reservoir/steam_vault/boss_mekgineer_steamrigger.cpp b/scripts/outland/coilfang_reservoir/steam_vault/boss_mekgineer_steamrigger.cpp index 49b20eff3..ea49095e7 100644 --- a/scripts/outland/coilfang_reservoir/steam_vault/boss_mekgineer_steamrigger.cpp +++ b/scripts/outland/coilfang_reservoir/steam_vault/boss_mekgineer_steamrigger.cpp @@ -226,9 +226,9 @@ struct MANGOS_DLL_DECL mob_steamrigger_mechanicAI : public ScriptedAI { if (Repair_Timer < diff) { - if (m_pInstance && m_pInstance->GetData64(NPC_STEAMRIGGER) && m_pInstance->GetData(TYPE_MEKGINEER_STEAMRIGGER) == IN_PROGRESS) + if (m_pInstance && m_pInstance->GetData(TYPE_MEKGINEER_STEAMRIGGER) == IN_PROGRESS) { - if (Creature* pMekgineer = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(NPC_STEAMRIGGER))) + if (Creature* pMekgineer = m_pInstance->GetSingleCreatureFromStorage(NPC_STEAMRIGGER)) { if (m_creature->IsWithinDistInMap(pMekgineer, MAX_REPAIR_RANGE)) { diff --git a/scripts/outland/coilfang_reservoir/steam_vault/instance_steam_vault.cpp b/scripts/outland/coilfang_reservoir/steam_vault/instance_steam_vault.cpp index 76b83d8a3..7d7a61363 100644 --- a/scripts/outland/coilfang_reservoir/steam_vault/instance_steam_vault.cpp +++ b/scripts/outland/coilfang_reservoir/steam_vault/instance_steam_vault.cpp @@ -47,13 +47,7 @@ bool GOUse_go_main_chambers_access_panel(Player* pPlayer, GameObject* pGo) return true; } -instance_steam_vault::instance_steam_vault(Map* pMap) : ScriptedInstance(pMap), - m_uiThespiaGUID(0), - m_uiMekgineerGUID(0), - m_uiKalithreshGUID(0), - m_uiMainChambersDoor(0), - m_uiAccessPanelHydro(0), - m_uiAccessPanelMek(0) +instance_steam_vault::instance_steam_vault(Map* pMap) : ScriptedInstance(pMap) { Initialize(); } @@ -67,9 +61,9 @@ void instance_steam_vault::OnCreatureCreate(Creature* pCreature) { switch(pCreature->GetEntry()) { - case NPC_THESPIA: m_uiThespiaGUID = pCreature->GetGUID(); break; - case NPC_STEAMRIGGER: m_uiMekgineerGUID = pCreature->GetGUID(); break; - case NPC_KALITRESH: m_uiKalithreshGUID = pCreature->GetGUID(); break; + case NPC_STEAMRIGGER: + m_mNpcEntryGuidStore[NPC_STEAMRIGGER] = pCreature->GetObjectGuid(); + break; } } @@ -77,9 +71,11 @@ void instance_steam_vault::OnObjectCreate(GameObject* pGo) { switch(pGo->GetEntry()) { - case GO_MAIN_CHAMBERS_DOOR: m_uiMainChambersDoor = pGo->GetGUID(); break; - case GO_ACCESS_PANEL_HYDRO: m_uiAccessPanelHydro = pGo->GetGUID(); break; - case GO_ACCESS_PANEL_MEK: m_uiAccessPanelMek = pGo->GetGUID(); break; + case GO_MAIN_CHAMBERS_DOOR: + case GO_ACCESS_PANEL_HYDRO: + case GO_ACCESS_PANEL_MEK: + m_mGoEntryGuidStore[pGo->GetEntry()] = pGo->GetObjectGuid(); + break; } } @@ -90,10 +86,10 @@ void instance_steam_vault::SetData(uint32 uiType, uint32 uiData) case TYPE_HYDROMANCER_THESPIA: if (uiData == SPECIAL) { - DoUseDoorOrButton(m_uiAccessPanelHydro); + DoUseDoorOrButton(GO_ACCESS_PANEL_HYDRO); if (GetData(TYPE_MEKGINEER_STEAMRIGGER) == SPECIAL) - DoUseDoorOrButton(m_uiMainChambersDoor); + DoUseDoorOrButton(GO_MAIN_CHAMBERS_DOOR); debug_log("SD2: Instance Steamvault: Access panel used."); } @@ -102,10 +98,10 @@ void instance_steam_vault::SetData(uint32 uiType, uint32 uiData) case TYPE_MEKGINEER_STEAMRIGGER: if (uiData == SPECIAL) { - DoUseDoorOrButton(m_uiAccessPanelMek); + DoUseDoorOrButton(GO_ACCESS_PANEL_MEK); if (GetData(TYPE_HYDROMANCER_THESPIA) == SPECIAL) - DoUseDoorOrButton(m_uiMainChambersDoor); + DoUseDoorOrButton(GO_MAIN_CHAMBERS_DOOR); debug_log("SD2: Instance Steamvault: Access panel used."); } @@ -134,19 +130,6 @@ uint32 instance_steam_vault::GetData(uint32 uiType) } } -uint64 instance_steam_vault::GetData64(uint32 uiType) -{ - switch (uiType) - { - case NPC_THESPIA: return m_uiThespiaGUID; - case NPC_STEAMRIGGER: return m_uiMekgineerGUID; - case NPC_KALITRESH: return m_uiKalithreshGUID; - - default: - return 0; - } -} - InstanceData* GetInstanceData_instance_steam_vault(Map* pMap) { return new instance_steam_vault(pMap); diff --git a/scripts/outland/coilfang_reservoir/steam_vault/steam_vault.h b/scripts/outland/coilfang_reservoir/steam_vault/steam_vault.h index b0c878057..1f4baad0c 100644 --- a/scripts/outland/coilfang_reservoir/steam_vault/steam_vault.h +++ b/scripts/outland/coilfang_reservoir/steam_vault/steam_vault.h @@ -15,8 +15,8 @@ enum TYPE_DISTILLER = 4, NPC_STEAMRIGGER = 17796, - NPC_KALITRESH = 17798, - NPC_THESPIA = 17797, + //NPC_KALITRESH = 17798, + //NPC_THESPIA = 17797, GO_MAIN_CHAMBERS_DOOR = 183049, GO_ACCESS_PANEL_HYDRO = 184125, @@ -35,18 +35,9 @@ class MANGOS_DLL_DECL instance_steam_vault : public ScriptedInstance void SetData(uint32 uiType, uint32 uiData); uint32 GetData(uint32 uiType); - uint64 GetData64(uint32 uiType); private: uint32 m_auiEncounter[MAX_ENCOUNTER]; - - uint64 m_uiThespiaGUID; - uint64 m_uiMekgineerGUID; - uint64 m_uiKalithreshGUID; - - uint64 m_uiMainChambersDoor; - uint64 m_uiAccessPanelHydro; - uint64 m_uiAccessPanelMek; }; #endif diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index acedfe386..6a0c9f687 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2166" + #define SD2_REVISION_NR "2167" #endif // __SD2_REVISION_NR_H__ From 52d89ca338fcde069d7830e622384cd49ac815d1 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Fri, 3 Jun 2011 13:13:57 +0200 Subject: [PATCH 0148/1172] [2168] Use EntryGuidMap-Storage in Shattered Halls Signed-off-by: Schmoozerd --- .../shattered_halls/boss_nethekurse.cpp | 4 +-- .../instance_shattered_halls.cpp | 28 ++++++------------- .../shattered_halls/shattered_halls.h | 6 ---- sd2_revision_nr.h | 2 +- 4 files changed, 11 insertions(+), 29 deletions(-) diff --git a/scripts/outland/hellfire_citadel/shattered_halls/boss_nethekurse.cpp b/scripts/outland/hellfire_citadel/shattered_halls/boss_nethekurse.cpp index 0064af9d8..e1ba77035 100644 --- a/scripts/outland/hellfire_citadel/shattered_halls/boss_nethekurse.cpp +++ b/scripts/outland/hellfire_citadel/shattered_halls/boss_nethekurse.cpp @@ -369,7 +369,7 @@ struct MANGOS_DLL_DECL mob_fel_orc_convertAI : public ScriptedAI { if (m_pInstance) { - Creature* pKurse = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(NPC_NETHEKURSE)); + Creature* pKurse = m_pInstance->GetSingleCreatureFromStorage(NPC_NETHEKURSE); if (pKurse && m_creature->IsWithinDist(pKurse, 45.0f)) { if (boss_grand_warlock_nethekurseAI* pKurseAI = dynamic_cast(pKurse->AI())) @@ -390,7 +390,7 @@ struct MANGOS_DLL_DECL mob_fel_orc_convertAI : public ScriptedAI if (m_pInstance->GetData(TYPE_NETHEKURSE) != IN_PROGRESS) return; - if (Creature* pKurse = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(NPC_NETHEKURSE))) + if (Creature* pKurse = m_pInstance->GetSingleCreatureFromStorage(NPC_NETHEKURSE)) { if (boss_grand_warlock_nethekurseAI* pKurseAI = dynamic_cast(pKurse->AI())) pKurseAI->DoYellForPeonDeath(pKiller); diff --git a/scripts/outland/hellfire_citadel/shattered_halls/instance_shattered_halls.cpp b/scripts/outland/hellfire_citadel/shattered_halls/instance_shattered_halls.cpp index 9e1991b70..fda8d06ec 100644 --- a/scripts/outland/hellfire_citadel/shattered_halls/instance_shattered_halls.cpp +++ b/scripts/outland/hellfire_citadel/shattered_halls/instance_shattered_halls.cpp @@ -24,10 +24,7 @@ EndScriptData */ #include "precompiled.h" #include "shattered_halls.h" -instance_shattered_halls::instance_shattered_halls(Map* pMap) : ScriptedInstance(pMap), - m_uiNethekurseGUID(0), - m_uiNethekurseDoorGUID(0), - m_uiNethekurseEnterDoorGUID(0) +instance_shattered_halls::instance_shattered_halls(Map* pMap) : ScriptedInstance(pMap) { Initialize(); } @@ -42,22 +39,25 @@ void instance_shattered_halls::OnObjectCreate(GameObject* pGo) switch (pGo->GetEntry()) { case GO_NETHEKURSE_DOOR: - m_uiNethekurseDoorGUID = pGo->GetGUID(); if (m_auiEncounter[TYPE_NETHEKURSE] == DONE) pGo->SetGoState(GO_STATE_ACTIVE); break; case GO_NETHERKURSE_ENTER_DOOR: - m_uiNethekurseEnterDoorGUID = pGo->GetGUID(); if (m_auiEncounter[TYPE_NETHEKURSE] == DONE) pGo->SetGoState(GO_STATE_ACTIVE); break; + + default: + return; } + + m_mGoEntryGuidStore[pGo->GetEntry()] = pGo->GetObjectGuid(); } void instance_shattered_halls::OnCreatureCreate(Creature* pCreature) { if (pCreature->GetEntry() == NPC_NETHEKURSE) - m_uiNethekurseGUID = pCreature->GetGUID(); + m_mNpcEntryGuidStore[NPC_NETHEKURSE] = pCreature->GetObjectGuid(); } void instance_shattered_halls::SetData(uint32 uiType, uint32 uiData) @@ -67,7 +67,7 @@ void instance_shattered_halls::SetData(uint32 uiType, uint32 uiData) case TYPE_NETHEKURSE: m_auiEncounter[uiType] = uiData; if (uiData == DONE) - DoUseDoorOrButton(m_uiNethekurseDoorGUID); + DoUseDoorOrButton(GO_NETHEKURSE_DOOR); break; case TYPE_OMROGG: m_auiEncounter[uiType] = uiData; @@ -119,18 +119,6 @@ uint32 instance_shattered_halls::GetData(uint32 uiType) return 0; } -uint64 instance_shattered_halls::GetData64(uint32 uiData) -{ - switch(uiData) - { - case NPC_NETHEKURSE: return m_uiNethekurseGUID; - case GO_NETHEKURSE_DOOR: return m_uiNethekurseDoorGUID; - case GO_NETHERKURSE_ENTER_DOOR: return m_uiNethekurseEnterDoorGUID; - default: - return 0; - } -} - InstanceData* GetInstanceData_instance_shattered_halls(Map* pMap) { return new instance_shattered_halls(pMap); diff --git a/scripts/outland/hellfire_citadel/shattered_halls/shattered_halls.h b/scripts/outland/hellfire_citadel/shattered_halls/shattered_halls.h index 826f3f233..128d8566e 100644 --- a/scripts/outland/hellfire_citadel/shattered_halls/shattered_halls.h +++ b/scripts/outland/hellfire_citadel/shattered_halls/shattered_halls.h @@ -31,7 +31,6 @@ class MANGOS_DLL_DECL instance_shattered_halls : public ScriptedInstance void SetData(uint32 uiType, uint32 uiData); uint32 GetData(uint32 uiType); - uint64 GetData64(uint32 uiData); const char* Save() { return m_strInstData.c_str(); } void Load(const char* chrIn); @@ -39,11 +38,6 @@ class MANGOS_DLL_DECL instance_shattered_halls : public ScriptedInstance private: uint32 m_auiEncounter[MAX_ENCOUNTER]; std::string m_strInstData; - - uint64 m_uiNethekurseGUID; - - uint64 m_uiNethekurseDoorGUID; - uint64 m_uiNethekurseEnterDoorGUID; }; #endif diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 6a0c9f687..43e4b2ce4 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2167" + #define SD2_REVISION_NR "2168" #endif // __SD2_REVISION_NR_H__ From dd9361e627fbe72c046b5737b6ac7b447d3b3e5a Mon Sep 17 00:00:00 2001 From: Xfurry Date: Fri, 3 Jun 2011 13:16:56 +0200 Subject: [PATCH 0149/1172] [2169] Use EntryGuidMap-Storage in Hellfire Ramparts Signed-off-by: Schmoozerd --- .../boss_nazan_and_vazruden.cpp | 24 +++++++-------- .../hellfire_ramparts/hellfire_ramparts.h | 4 --- .../instance_hellfire_ramparts.cpp | 29 +++++-------------- sd2_revision_nr.h | 2 +- 4 files changed, 20 insertions(+), 39 deletions(-) diff --git a/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_nazan_and_vazruden.cpp b/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_nazan_and_vazruden.cpp index b8f232b5d..3e7ebc8b3 100644 --- a/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_nazan_and_vazruden.cpp +++ b/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_nazan_and_vazruden.cpp @@ -111,7 +111,7 @@ struct MANGOS_DLL_DECL boss_vazrudenAI : public ScriptedAI void PrepareAndDescendMount() { - if (Creature* pHerald = m_pInstance->instance->GetCreature(m_pInstance->GetData64(NPC_VAZRUDEN_HERALD))) + if (Creature* pHerald = m_pInstance->GetSingleCreatureFromStorage(NPC_VAZRUDEN_HERALD)) { if (pHerald->HasSplineFlag(SPLINEFLAG_WALKMODE)) pHerald->RemoveSplineFlag(SPLINEFLAG_WALKMODE); @@ -164,8 +164,8 @@ struct MANGOS_DLL_DECL boss_vazruden_heraldAI : public ScriptedAI uint32 m_uiMovementTimer; uint32 m_uiFireballTimer; - uint64 m_uiLastSeenPlayerGUID; - uint64 m_uiVazrudenGUID; + ObjectGuid m_lastSeenPlayerGuid; + ObjectGuid m_vazrudenGuid; void Reset() { @@ -176,8 +176,8 @@ struct MANGOS_DLL_DECL boss_vazruden_heraldAI : public ScriptedAI m_uiMovementTimer = 0; m_bIsEventInProgress = false; - m_uiLastSeenPlayerGUID = 0; - m_uiVazrudenGUID = 0; + m_lastSeenPlayerGuid.Clear(); + m_vazrudenGuid.Clear(); m_uiFireballTimer = 0; // see boss_onyxia @@ -188,10 +188,10 @@ struct MANGOS_DLL_DECL boss_vazruden_heraldAI : public ScriptedAI void MoveInLineOfSight(Unit* pWho) { - if (m_bIsEventInProgress && !m_uiLastSeenPlayerGUID && pWho->GetTypeId() == TYPEID_PLAYER && pWho->isAlive() && !((Player*)pWho)->isGameMaster()) + if (m_bIsEventInProgress && !m_lastSeenPlayerGuid && pWho->GetTypeId() == TYPEID_PLAYER && pWho->isAlive() && !((Player*)pWho)->isGameMaster()) { if (m_creature->IsWithinDistInMap(pWho, 40.0f)) - m_uiLastSeenPlayerGUID = pWho->GetGUID(); + m_lastSeenPlayerGuid = pWho->GetObjectGuid(); } if (m_pInstance && m_pInstance->GetData(TYPE_NAZAN) != IN_PROGRESS) @@ -235,7 +235,7 @@ struct MANGOS_DLL_DECL boss_vazruden_heraldAI : public ScriptedAI m_creature->SetByteValue(UNIT_FIELD_BYTES_1, 3, 0); m_creature->RemoveSplineFlag(SPLINEFLAG_FLYING); - Player* pPlayer = m_creature->GetMap()->GetPlayer(m_uiLastSeenPlayerGUID); + Player* pPlayer = m_creature->GetMap()->GetPlayer(m_lastSeenPlayerGuid); if (pPlayer && pPlayer->isAlive()) AttackStart(pPlayer); @@ -284,10 +284,10 @@ struct MANGOS_DLL_DECL boss_vazruden_heraldAI : public ScriptedAI if (pSummoned->GetEntry() != NPC_VAZRUDEN) return; - if (Player* pPlayer = m_creature->GetMap()->GetPlayer(m_uiLastSeenPlayerGUID)) + if (Player* pPlayer = m_creature->GetMap()->GetPlayer(m_lastSeenPlayerGuid)) pSummoned->AI()->AttackStart(pPlayer); - m_uiVazrudenGUID = pSummoned->GetGUID(); + m_vazrudenGuid = pSummoned->GetObjectGuid(); if (m_pInstance) m_pInstance->SetData(TYPE_VAZRUDEN, IN_PROGRESS); @@ -326,11 +326,11 @@ struct MANGOS_DLL_DECL boss_vazruden_heraldAI : public ScriptedAI m_uiMovementTimer -= uiDiff; } - if (m_uiVazrudenGUID && m_uiFireballTimer) + if (m_vazrudenGuid && m_uiFireballTimer) { if (m_uiFireballTimer <= uiDiff) { - if (Creature* pVazruden = m_creature->GetMap()->GetCreature(m_uiVazrudenGUID)) + if (Creature* pVazruden = m_creature->GetMap()->GetCreature(m_vazrudenGuid)) { if (Unit* pEnemy = pVazruden->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) DoCastSpellIfCan(pEnemy, m_bIsRegularMode ? SPELL_FIREBALL : SPELL_FIREBALL_H, 0, pVazruden->GetGUID()); diff --git a/scripts/outland/hellfire_citadel/hellfire_ramparts/hellfire_ramparts.h b/scripts/outland/hellfire_citadel/hellfire_ramparts/hellfire_ramparts.h index c239a7b92..ffe9dade8 100644 --- a/scripts/outland/hellfire_citadel/hellfire_ramparts/hellfire_ramparts.h +++ b/scripts/outland/hellfire_citadel/hellfire_ramparts/hellfire_ramparts.h @@ -32,7 +32,6 @@ class MANGOS_DLL_DECL instance_ramparts : public ScriptedInstance void SetData(uint32 uiType, uint32 uiData); uint32 GetData(uint32 uiType); - uint64 GetData64(uint32 uiData); // No need to save and load this instance (only one encounter needs special handling, no doors used) @@ -42,9 +41,6 @@ class MANGOS_DLL_DECL instance_ramparts : public ScriptedInstance uint32 m_auiEncounter[MAX_ENCOUNTER]; uint32 m_uiSentryCounter; - uint64 m_uiChestGUID; - uint64 m_uiHeraldGUID; - uint64 m_uiVazrudenGUID; GUIDList m_lSentryGUIDs; }; diff --git a/scripts/outland/hellfire_citadel/hellfire_ramparts/instance_hellfire_ramparts.cpp b/scripts/outland/hellfire_citadel/hellfire_ramparts/instance_hellfire_ramparts.cpp index 2fa7e612c..533868748 100644 --- a/scripts/outland/hellfire_citadel/hellfire_ramparts/instance_hellfire_ramparts.cpp +++ b/scripts/outland/hellfire_citadel/hellfire_ramparts/instance_hellfire_ramparts.cpp @@ -25,10 +25,7 @@ EndScriptData */ #include "hellfire_ramparts.h" instance_ramparts::instance_ramparts(Map* pMap) : ScriptedInstance(pMap), - m_uiSentryCounter(0), - m_uiChestGUID(0), - m_uiVazrudenGUID(0), - m_uiHeraldGUID(0) + m_uiSentryCounter(0) { Initialize(); } @@ -43,10 +40,8 @@ void instance_ramparts::OnCreatureCreate(Creature* pCreature) switch (pCreature->GetEntry()) { case NPC_VAZRUDEN_HERALD: - m_uiHeraldGUID = pCreature->GetGUID(); - break; case NPC_VAZRUDEN: - m_uiVazrudenGUID = pCreature->GetGUID(); + m_mNpcEntryGuidStore[pCreature->GetEntry()] = pCreature->GetObjectGuid(); break; case NPC_HELLFIRE_SENTRY: m_lSentryGUIDs.push_back(pCreature->GetGUID()); @@ -60,7 +55,7 @@ void instance_ramparts::OnObjectCreate(GameObject* pGo) { case GO_FEL_IRON_CHEST: case GO_FEL_IRON_CHEST_H: - m_uiChestGUID = pGo->GetGUID(); + m_mGoEntryGuidStore[pGo->GetEntry()] = pGo->GetObjectGuid(); break; } } @@ -73,7 +68,7 @@ void instance_ramparts::SetData(uint32 uiType, uint32 uiData) { case TYPE_VAZRUDEN: if (uiData == DONE && m_auiEncounter[1] == DONE) - DoRespawnGameObject(m_uiChestGUID, HOUR*IN_MILLISECONDS); + DoRespawnGameObject(instance->IsRegularDifficulty() ? GO_FEL_IRON_CHEST : GO_FEL_IRON_CHEST_H, HOUR); if (uiData == FAIL && m_auiEncounter[0] != FAIL) DoFailVazruden(); m_auiEncounter[0] = uiData; @@ -89,7 +84,7 @@ void instance_ramparts::SetData(uint32 uiType, uint32 uiData) return; } if (uiData == DONE && m_auiEncounter[0] == DONE) - DoRespawnGameObject(m_uiChestGUID, HOUR*IN_MILLISECONDS); + DoRespawnGameObject(instance->IsRegularDifficulty() ? GO_FEL_IRON_CHEST : GO_FEL_IRON_CHEST_H, HOUR); if (uiData == FAIL && m_auiEncounter[1] != FAIL) DoFailVazruden(); @@ -109,16 +104,6 @@ uint32 instance_ramparts::GetData(uint32 uiType) return 0; } -uint64 instance_ramparts::GetData64(uint32 uiData) -{ - if (uiData == NPC_VAZRUDEN_HERALD) - return m_uiHeraldGUID; - if (uiData == NPC_VAZRUDEN) - return m_uiVazrudenGUID; - - return 0; -} - void instance_ramparts::DoFailVazruden() { // Store FAIL for both types @@ -134,7 +119,7 @@ void instance_ramparts::DoFailVazruden() } // Respawn or Reset Vazruden the herald - if (Creature* pVazruden = instance->GetCreature(m_uiHeraldGUID)) + if (Creature* pVazruden = GetSingleCreatureFromStorage(NPC_VAZRUDEN_HERALD)) { if (!pVazruden->isAlive()) pVazruden->Respawn(); @@ -146,7 +131,7 @@ void instance_ramparts::DoFailVazruden() } // Despawn Vazruden - if (Creature* pVazruden = instance->GetCreature(m_uiVazrudenGUID)) + if (Creature* pVazruden = GetSingleCreatureFromStorage(NPC_VAZRUDEN)) pVazruden->ForcedDespawn(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 43e4b2ce4..7be3affaf 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2168" + #define SD2_REVISION_NR "2169" #endif // __SD2_REVISION_NR_H__ From cf1ad322cb2d49b05347b25154fa406fd3f74d34 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Fri, 3 Jun 2011 16:44:12 +0200 Subject: [PATCH 0150/1172] [2170] Use EntryGuidMap-Storage in Ulduar * Drop unneeded teleporter types * Drop uneeded 'hard-mode' types for Freya and Assembly of Iron * Cleanup a few magic numbers related to types, should increase readability! I hope I didn't screw too much :) --- .../ulduar/ulduar/instance_ulduar.cpp | 514 ++++-------------- scripts/northrend/ulduar/ulduar/ulduar.h | 99 +--- sd2_revision_nr.h | 2 +- 3 files changed, 99 insertions(+), 516 deletions(-) diff --git a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp index 0ff760a9b..a65e1a44a 100644 --- a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp +++ b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp @@ -37,91 +37,7 @@ static sSpawnLocation m_aKeepersSpawnLocs[] = {2036.674f, -73.814f, 411.355f, 2.51f}, // Thorim }; -instance_ulduar::instance_ulduar(Map* pMap) : ScriptedInstance(pMap), - // Creatures - m_uiLeviathanGUID(0), - m_uiIgnisGUID(0), - m_uiRazorscaleGUID(0), - m_uiCommanderGUID(0), - m_uiXT002GUID(0), - m_uiBrundirGUID(0), - m_uiMolgeimGUID(0), - m_uiSteelbreakerGUID(0), - m_uiKologarnGUID(0), - m_uiAuriayaGUID(0), - m_uiMimironGUID(0), - m_uiHodirGUID(0), - m_uiThorimGUID(0), - m_uiFreyaGUID(0), - m_uiVezaxGUID(0), - m_uiYoggSaronGUID(0), - m_uiAlgalonGUID(0), - m_uiRightArmGUID(0), - m_uiLeftArmGUID(0), - m_uiFeralDefenderGUID(0), - m_uiElderBrightleafGUID(0), - m_uiElderStonebarkGUID(0), - m_uiElderIronbrachGUID(0), - m_uiSaroniteAnimusGUID(0), - m_uiRunicColossusGUID(0), - m_uiRuneGiantGUID(0), - m_uiJormungarGUID(0), - m_uiLeviathanMkGUID(0), - m_uiSaraGUID(0), - m_uiYoggBrainGUID(0), - - // Chests - m_uiKologarnLootGUID(0), - m_uiHodirLootGUID(0), - m_uiHodirRareLootGUID(0), - m_uiThorimLootGUID(0), - m_uiThorimRareLootGUID(0), - m_uiMimironLootGUID(0), - m_uiMimironHardLootGUID(0), - m_uiAlagonLootGUID(0), - - // Doors - // The siege - m_uiShieldWallGUID(0), - m_uiLeviathanGateGUID(0), - m_uiXT002GateGUID(0), - m_uiBrokenHarpoonGUID(0), - // Archivum - m_uiIronCouncilDoorGUID(0), - m_uiArchivumDoorGUID(0), - m_uiArchivumConsoleGUID(0), - m_uiUniverseFloorArchivumGUID(0), - // Celestial planetarium - m_uiCelestialDoorGUID(0), - m_uiCelestialConsoleGUID(0), - m_uiUniverseFloorCelestialGUID(0), - m_uiAzerothGlobeGUID(0), - // Kologarn - m_uiShatteredHallsDoorGUID(0), - m_uiKologarnBridgeGUID(0), - // Hodir - m_uiHodirEnterDoorGUID(0), - m_uiHodirWallGUID(0), - m_uiHodirExitDoorGUID(0), - // Mimiron - m_uiMimironButtonGUID(0), - m_uiMimironDoor1GUID(0), - m_uiMimironDoor2GUID(0), - m_uiMimironDoor3GUID(0), - m_uiMimironElevatorGUID(0), - // Thorim - m_uiArenaEnterDoorGUID(0), - m_uiArenaExitDoorGUID(0), - m_uiHallwayDoorGUID(0), - m_uiThorimEnterDoorGUID(0), - m_uiThorimLeverGUID(0), - // Prison - m_uiAncientGateGUID(0), - m_uiVezaxGateGUID(0), - m_uiYoggGateGUID(0), - m_uiBrainDoor1GUID(0), - m_uiBrainDoor2GUID(0), - m_uiBrainDoor3GUID(0) +instance_ulduar::instance_ulduar(Map* pMap) : ScriptedInstance(pMap) { Initialize(); } @@ -131,8 +47,6 @@ void instance_ulduar::Initialize() memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); memset(&m_auiHardBoss, 0, sizeof(m_auiHardBoss)); memset(&m_auiUlduarKeepers, 0, sizeof(m_auiUlduarKeepers)); - memset(&m_auiUlduarTeleporters, 0, sizeof(m_auiUlduarTeleporters)); - memset(&m_auiMimironTelGUID, 0, sizeof(m_auiMimironTelGUID)); } bool instance_ulduar::IsEncounterInProgress() const @@ -150,104 +64,54 @@ void instance_ulduar::OnCreatureCreate(Creature* pCreature) switch (pCreature->GetEntry()) { case NPC_LEVIATHAN: - m_uiLeviathanGUID = pCreature->GetGUID(); - break; case NPC_IGNIS: - m_uiIgnisGUID = pCreature->GetGUID(); - break; case NPC_RAZORSCALE: - m_uiRazorscaleGUID = pCreature->GetGUID(); - break; case NPC_COMMANDER: - m_uiCommanderGUID = pCreature->GetGUID(); - break; case NPC_XT002: - m_uiXT002GUID = pCreature->GetGUID(); - break; case NPC_STEELBREAKER: - m_uiSteelbreakerGUID = pCreature->GetGUID(); - break; case NPC_MOLGEIM: - m_uiMolgeimGUID = pCreature->GetGUID(); - break; case NPC_BRUNDIR: - m_uiBrundirGUID = pCreature->GetGUID(); - break; case NPC_KOLOGARN: - m_uiKologarnGUID = pCreature->GetGUID(); - break; case NPC_RIGHT_ARM: - m_uiRightArmGUID = pCreature->GetGUID(); - break; case NPC_LEFT_ARM: - m_uiLeftArmGUID = pCreature->GetGUID(); - break; case NPC_AURIAYA: - m_uiAuriayaGUID = pCreature->GetGUID(); - break; case NPC_FERAL_DEFENDER: - m_uiFeralDefenderGUID = pCreature->GetGUID(); - break; - case NPC_MIMIRON: - m_uiMimironGUID = pCreature->GetGUID(); - if (m_auiEncounter[7] == DONE) - SpawnFriendlyKeeper(NPC_MIMIRON_IMAGE); - break; case NPC_LEVIATHAN_MK: - m_uiLeviathanMkGUID = pCreature->GetGUID(); - break; - case NPC_HODIR: - m_uiHodirGUID = pCreature->GetGUID(); - if (m_auiEncounter[8] == DONE) - SpawnFriendlyKeeper(NPC_HODIR_IMAGE); - break; - case NPC_THORIM: - m_uiThorimGUID = pCreature->GetGUID(); - if (m_auiEncounter[9] == DONE) - SpawnFriendlyKeeper(NPC_THORIM_IMAGE); - break; case NPC_RUNIC_COLOSSUS: - m_uiRunicColossusGUID = pCreature->GetGUID(); - break; case NPC_RUNE_GIANT: - m_uiRuneGiantGUID = pCreature->GetGUID(); - break; case NPC_JORMUNGAR_BEHEMOTH: - m_uiJormungarGUID = pCreature->GetGUID(); - break; - case NPC_FREYA: - m_uiFreyaGUID = pCreature->GetGUID(); - if (m_auiEncounter[10] == DONE) - SpawnFriendlyKeeper(NPC_FREYA_IMAGE); - break; case NPC_ELDER_BRIGHTLEAF: - m_uiElderBrightleafGUID = pCreature->GetGUID(); - break; case NPC_ELDER_IRONBRACH: - m_uiElderIronbrachGUID = pCreature->GetGUID(); - break; case NPC_ELDER_STONEBARK: - m_uiElderStonebarkGUID = pCreature->GetGUID(); - break; case NPC_VEZAX: - m_uiVezaxGUID = pCreature->GetGUID(); - break; case NPC_SARONITE_ANIMUS: - m_uiSaroniteAnimusGUID = pCreature->GetGUID(); - break; case NPC_YOGGSARON: - m_uiYoggSaronGUID = pCreature->GetGUID(); - break; case NPC_SARA: - m_uiSaraGUID = pCreature->GetGUID(); - break; case NPC_YOGG_BRAIN: - m_uiYoggBrainGUID = pCreature->GetGUID(); - break; case NPC_ALGALON: - m_uiAlgalonGUID = pCreature->GetGUID(); break; + + case NPC_MIMIRON: + if (m_auiEncounter[TYPE_MIMIRON] == DONE) + SpawnFriendlyKeeper(NPC_MIMIRON_IMAGE); + break; + case NPC_HODIR: + if (m_auiEncounter[TYPE_HODIR] == DONE) + SpawnFriendlyKeeper(NPC_HODIR_IMAGE); + break; + case NPC_THORIM: + if (m_auiEncounter[TYPE_THORIM] == DONE) + SpawnFriendlyKeeper(NPC_THORIM_IMAGE); + break; + case NPC_FREYA: + if (m_auiEncounter[TYPE_FREYA] == DONE) + SpawnFriendlyKeeper(NPC_FREYA_IMAGE); + break; + + default: + return; } + m_mNpcEntryGuidStore[pCreature->GetEntry()] = pCreature->GetObjectGuid(); } void instance_ulduar::OnObjectCreate(GameObject* pGo) @@ -257,210 +121,133 @@ void instance_ulduar::OnObjectCreate(GameObject* pGo) // ----------------- Doors & Other ----------------- // The siege case GO_SHIELD_WALL: - m_uiShieldWallGUID = pGo->GetGUID(); break; case GO_LEVIATHAN_GATE: - m_uiLeviathanGateGUID = pGo->GetGUID(); - if (m_auiEncounter[0] == DONE) + if (m_auiEncounter[TYPE_LEVIATHAN] == DONE) pGo->SetGoState(GO_STATE_ACTIVE); break; case GO_XT002_GATE: pGo->SetGoState(GO_STATE_READY); - if (m_auiEncounter[3] == DONE) + if (m_auiEncounter[TYPE_XT002] == DONE) pGo->SetGoState(GO_STATE_ACTIVE); - if (m_auiEncounter[1] == DONE && m_auiEncounter[2] == DONE) + if (m_auiEncounter[TYPE_IGNIS] == DONE && m_auiEncounter[TYPE_RAZORSCALE] == DONE) pGo->SetGoState(GO_STATE_ACTIVE); - m_uiXT002GateGUID = pGo->GetGUID(); break; case GO_BROKEN_HARPOON: - m_uiBrokenHarpoonGUID = pGo->GetGUID(); pGo->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NO_INTERACT); break; // Archivum case GO_IRON_ENTRANCE_DOOR: - m_uiIronCouncilDoorGUID = pGo->GetGUID(); break; case GO_ARCHIVUM_DOOR: - m_uiArchivumDoorGUID = pGo->GetGUID(); - if (m_auiEncounter[4]) + if (m_auiEncounter[TYPE_ASSEMBLY]) pGo->SetGoState(GO_STATE_ACTIVE); break; case GO_ARCHIVUM_CONSOLE: - m_uiArchivumConsoleGUID = pGo->GetGUID(); - break; case GO_UNIVERSE_FLOOR_ARCHIVUM: - m_uiUniverseFloorArchivumGUID = pGo->GetGUID(); - break; // Celestial Planetarium case GO_CELESTIAL_ACCES: - m_uiCelestialConsoleGUID = pGo->GetGUID(); - break; case GO_CELESTIAL_DOOR: - m_uiCelestialDoorGUID = pGo->GetGUID(); - break; case GO_UNIVERSE_FLOOR_CELESTIAL: - m_uiUniverseFloorCelestialGUID = pGo->GetGUID(); - break; case GO_AZEROTH_GLOBE: - m_uiAzerothGlobeGUID = pGo->GetGUID(); break; // Shattered Hallway case GO_KOLOGARN_BRIDGE: - m_uiKologarnBridgeGUID = pGo->GetGUID(); pGo->SetGoState(GO_STATE_ACTIVE); - if (m_auiEncounter[5] == DONE) + if (m_auiEncounter[TYPE_KOLOGARN] == DONE) pGo->SetGoState(GO_STATE_READY); break; case GO_SHATTERED_DOOR: - m_uiShatteredHallsDoorGUID = pGo->GetGUID(); break; // ----------------- The Keepers ----------------- // Hodir case GO_HODIR_EXIT: - m_uiHodirExitDoorGUID = pGo->GetGUID(); - if (m_auiEncounter[8]) + if (m_auiEncounter[TYPE_HODIR]) pGo->SetGoState(GO_STATE_ACTIVE); break; case GO_HODIR_ICE_WALL: - m_uiHodirWallGUID = pGo->GetGUID(); - if (m_auiEncounter[8]) + if (m_auiEncounter[TYPE_HODIR]) pGo->SetGoState(GO_STATE_ACTIVE); break; case GO_HODIR_ENTER: - m_uiHodirEnterDoorGUID = pGo->GetGUID(); break; // Mimiron case G0_MIMIRON_BUTTON: - m_uiMimironButtonGUID = pGo->GetGUID(); - if (m_auiEncounter[7] == NOT_STARTED) + if (m_auiEncounter[TYPE_MIMIRON] == NOT_STARTED) pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NO_INTERACT); break; case GO_MIMIRON_DOOR_1: - m_uiMimironDoor1GUID = pGo->GetGUID(); - break; case GO_MIMIRON_DOOR_2: - m_uiMimironDoor2GUID = pGo->GetGUID(); - break; case GO_MIMIRON_DOOR_3: - m_uiMimironDoor3GUID = pGo->GetGUID(); - break; case GO_MIMIRON_ELEVATOR: - m_uiMimironElevatorGUID = pGo->GetGUID(); - break; case GO_MIMIRON_TEL1: - m_auiMimironTelGUID[0] = pGo->GetGUID(); - break; case GO_MIMIRON_TEL2: - m_auiMimironTelGUID[1] = pGo->GetGUID(); - break; case GO_MIMIRON_TEL3: - m_auiMimironTelGUID[2] = pGo->GetGUID(); - break; case GO_MIMIRON_TEL4: - m_auiMimironTelGUID[3] = pGo->GetGUID(); - break; case GO_MIMIRON_TEL5: - m_auiMimironTelGUID[4] = pGo->GetGUID(); - break; case GO_MIMIRON_TEL6: - m_auiMimironTelGUID[5] = pGo->GetGUID(); - break; case GO_MIMIRON_TEL7: - m_auiMimironTelGUID[6] = pGo->GetGUID(); - break; case GO_MIMIRON_TEL8: - m_auiMimironTelGUID[7] = pGo->GetGUID(); - break; case GO_MIMIRON_TEL9: - m_auiMimironTelGUID[8] = pGo->GetGUID(); - break; // Thorim case GO_DARK_IRON_PORTCULIS: - m_uiArenaExitDoorGUID = pGo->GetGUID(); - break; case GO_RUNED_STONE_DOOR: - m_uiHallwayDoorGUID = pGo->GetGUID(); - break; case GO_THORIM_STONE_DOOR: - m_uiThorimEnterDoorGUID = pGo->GetGUID(); - break; case GO_LIGHTNING_FIELD: - m_uiArenaEnterDoorGUID = pGo->GetGUID(); break; case GO_DOOR_LEVER: - m_uiThorimLeverGUID = pGo->GetGUID(); pGo->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NO_INTERACT); break; // Prison case GO_ANCIENT_GATE: - m_uiAncientGateGUID = pGo->GetGUID(); DoOpenMadnessDoorIfCan(); break; case GO_VEZAX_GATE: - m_uiVezaxGateGUID = pGo->GetGUID(); pGo->SetGoState(GO_STATE_READY); - if (m_auiEncounter[11]) + if (m_auiEncounter[TYPE_VEZAX]) pGo->SetGoState(GO_STATE_ACTIVE); break; case GO_YOGG_GATE: - m_uiYoggGateGUID = pGo->GetGUID(); - break; case GO_BRAIN_DOOR1: - m_uiBrainDoor1GUID = pGo->GetGUID(); - break; case GO_BRAIN_DOOR2: - m_uiBrainDoor2GUID = pGo->GetGUID(); - break; case GO_BRAIN_DOOR3: - m_uiBrainDoor3GUID = pGo->GetGUID(); break; // ----------------- Chests ----------------- // Kologarn case GO_CACHE_OF_LIVING_STONE: case GO_CACHE_OF_LIVING_STONE_H: - m_uiKologarnLootGUID = pGo->GetGUID(); - break; // Hodir case GO_CACHE_OF_WINTER: case GO_CACHE_OF_WINTER_H: - m_uiHodirLootGUID = pGo->GetGUID(); - break; case GO_CACHE_OF_RARE_WINTER: case GO_CACHE_OF_RARE_WINTER_H: - m_uiHodirRareLootGUID = pGo->GetGUID(); - break; // Thorim case GO_CACHE_OF_STORMS: case GO_CACHE_OF_STORMS_H: - m_uiThorimLootGUID = pGo->GetGUID(); - break; case GO_CACHE_OF_RARE_STORMS: case GO_CACHE_OF_RARE_STORMS_H: - m_uiThorimRareLootGUID = pGo->GetGUID(); - break; // Mimiron case GO_CACHE_OF_INOV: case GO_CACHE_OF_INOV_H: - m_uiMimironLootGUID = pGo->GetGUID(); - break; case GO_CACHE_OF_INOV_HARD: case GO_CACHE_OF_INOV_HARD_H: - m_uiMimironHardLootGUID = pGo->GetGUID(); - break; // Alagon case GO_GIFT_OF_OBSERVER: case GO_GIFT_OF_OBSERVER_H: - m_uiAlagonLootGUID = pGo->GetGUID(); break; + + default: + return; } + m_mGoEntryGuidStore[pGo->GetEntry()] = pGo->GetObjectGuid(); } // Used in order to unlock the door to Vezax @@ -468,7 +255,7 @@ void instance_ulduar::DoOpenMadnessDoorIfCan() { if (m_auiEncounter[TYPE_MIMIRON] == DONE && m_auiEncounter[TYPE_HODIR] == DONE && m_auiEncounter[TYPE_THORIM] == DONE && m_auiEncounter[TYPE_FREYA] == DONE) { - if (GameObject* pDoor = instance->GetGameObject(m_uiAncientGateGUID)) + if (GameObject* pDoor = GetSingleGameObjectFromStorage(GO_ANCIENT_GATE)) pDoor->SetGoState(GO_STATE_ACTIVE); } } @@ -478,103 +265,103 @@ void instance_ulduar::SetData(uint32 uiType, uint32 uiData) switch (uiType) { case TYPE_LEVIATHAN: - m_auiEncounter[0] = uiData; - DoUseDoorOrButton(m_uiShieldWallGUID); + m_auiEncounter[uiType] = uiData; + DoUseDoorOrButton(GO_SHIELD_WALL); if (uiData == DONE) { - DoUseDoorOrButton(m_uiXT002GateGUID); - DoUseDoorOrButton(m_uiLeviathanGateGUID); + DoUseDoorOrButton(GO_XT002_GATE); + DoUseDoorOrButton(GO_LEVIATHAN_GATE); } break; case TYPE_IGNIS: - m_auiEncounter[1] = uiData; + m_auiEncounter[uiType] = uiData; break; case TYPE_RAZORSCALE: - m_auiEncounter[2] = uiData; + m_auiEncounter[uiType] = uiData; break; case TYPE_XT002: - m_auiEncounter[3] = uiData; - DoUseDoorOrButton(m_uiXT002GateGUID); + m_auiEncounter[uiType] = uiData; + DoUseDoorOrButton(GO_XT002_GATE); break; case TYPE_ASSEMBLY: - m_auiEncounter[4] = uiData; - DoUseDoorOrButton(m_uiIronCouncilDoorGUID); + m_auiEncounter[uiType] = uiData; + DoUseDoorOrButton(GO_IRON_ENTRANCE_DOOR); if (uiData == DONE) - DoUseDoorOrButton(m_uiArchivumDoorGUID); + DoUseDoorOrButton(GO_ARCHIVUM_DOOR); break; case TYPE_KOLOGARN: - m_auiEncounter[5] = uiData; - DoUseDoorOrButton(m_uiShatteredHallsDoorGUID); + m_auiEncounter[uiType] = uiData; + DoUseDoorOrButton(GO_SHATTERED_DOOR); if (uiData == DONE) { - DoRespawnGameObject(m_uiKologarnLootGUID, 30*MINUTE); - if (GameObject* pBridge = instance->GetGameObject(m_uiKologarnBridgeGUID)) + DoRespawnGameObject(instance->IsRegularDifficulty() ? GO_CACHE_OF_LIVING_STONE : GO_CACHE_OF_LIVING_STONE_H, 30*MINUTE); + if (GameObject* pBridge = GetSingleGameObjectFromStorage(GO_KOLOGARN_BRIDGE)) pBridge->SetGoState(GO_STATE_READY); } break; case TYPE_AURIAYA: - m_auiEncounter[6] = uiData; + m_auiEncounter[uiType] = uiData; break; // Keepers case TYPE_MIMIRON: - m_auiEncounter[7] = uiData; - DoUseDoorOrButton(m_uiMimironDoor1GUID); - DoUseDoorOrButton(m_uiMimironDoor2GUID); - DoUseDoorOrButton(m_uiMimironDoor3GUID); + m_auiEncounter[uiType] = uiData; + DoUseDoorOrButton(GO_MIMIRON_DOOR_1); + DoUseDoorOrButton(GO_MIMIRON_DOOR_2); + DoUseDoorOrButton(GO_MIMIRON_DOOR_3); if (uiData == DONE) { - if (m_auiHardBoss[3] != DONE) - DoRespawnGameObject(m_uiMimironLootGUID, 30*MINUTE); + if (GetData(TYPE_MIMIRON_HARD) != DONE) + DoRespawnGameObject(instance->IsRegularDifficulty() ? GO_CACHE_OF_INOV : GO_CACHE_OF_INOV_H, 30*MINUTE); SpawnFriendlyKeeper(NPC_MIMIRON_IMAGE); } break; case TYPE_HODIR: - m_auiEncounter[8] = uiData; - DoUseDoorOrButton(m_uiHodirEnterDoorGUID); + m_auiEncounter[uiType] = uiData; + DoUseDoorOrButton(GO_HODIR_ENTER); if (uiData == DONE) { - DoUseDoorOrButton(m_uiHodirWallGUID); - DoUseDoorOrButton(m_uiHodirExitDoorGUID); - DoRespawnGameObject(m_uiHodirLootGUID, 30*MINUTE); + DoUseDoorOrButton(GO_HODIR_ICE_WALL); + DoUseDoorOrButton(GO_HODIR_EXIT); + DoRespawnGameObject(instance->IsRegularDifficulty() ? GO_CACHE_OF_WINTER : GO_CACHE_OF_WINTER_H, 30*MINUTE); SpawnFriendlyKeeper(NPC_HODIR_IMAGE); } break; case TYPE_THORIM: - m_auiEncounter[9] = uiData; - DoUseDoorOrButton(m_uiArenaEnterDoorGUID); + m_auiEncounter[uiType] = uiData; + DoUseDoorOrButton(GO_LIGHTNING_FIELD); if (uiData == IN_PROGRESS) - DoUseDoorOrButton(m_uiArenaExitDoorGUID); + DoUseDoorOrButton(GO_DARK_IRON_PORTCULIS); if (uiData == DONE) { - if (m_auiHardBoss[5] != DONE) - DoRespawnGameObject(m_uiThorimLootGUID, 30*MINUTE); + if (GetData(TYPE_THORIM_HARD) != DONE) + DoRespawnGameObject(instance->IsRegularDifficulty() ? GO_CACHE_OF_STORMS : GO_CACHE_OF_STORMS_H, 30*MINUTE); SpawnFriendlyKeeper(NPC_THORIM_IMAGE); } break; case TYPE_FREYA: - m_auiEncounter[10] = uiData; + m_auiEncounter[uiType] = uiData; if (uiData == DONE) SpawnFriendlyKeeper(NPC_FREYA_IMAGE); break; // Prison case TYPE_VEZAX: - m_auiEncounter[11] = uiData; + m_auiEncounter[uiType] = uiData; if (uiData == DONE) - DoUseDoorOrButton(m_uiVezaxGateGUID); + DoUseDoorOrButton(GO_VEZAX_GATE); break; case TYPE_YOGGSARON: - m_auiEncounter[12] = uiData; - DoUseDoorOrButton(m_uiYoggGateGUID); + m_auiEncounter[uiType] = uiData; + DoUseDoorOrButton(GO_YOGG_GATE); break; // Celestial Planetarium case TYPE_ALGALON: - m_auiEncounter[13] = uiData; + m_auiEncounter[uiType] = uiData; //TODO: need to find the proper way to use these - DoUseDoorOrButton(m_uiCelestialDoorGUID); - DoUseDoorOrButton(m_uiUniverseFloorCelestialGUID); + DoUseDoorOrButton(GO_CELESTIAL_DOOR); + DoUseDoorOrButton(GO_UNIVERSE_FLOOR_CELESTIAL); if (uiData == DONE) - DoRespawnGameObject(m_uiAlagonLootGUID, 30*MINUTE); + DoRespawnGameObject(instance->IsRegularDifficulty() ? GO_GIFT_OF_OBSERVER : GO_GIFT_OF_OBSERVER_H, 30*MINUTE); break; // Hard modes @@ -585,31 +372,25 @@ void instance_ulduar::SetData(uint32 uiType, uint32 uiData) m_auiHardBoss[1] = uiData; // TODO: add extra loot break; case TYPE_HODIR_HARD: - m_auiHardBoss[4] = uiData; + m_auiHardBoss[2] = uiData; if (uiData == DONE) - DoRespawnGameObject(m_uiHodirRareLootGUID, 30*MINUTE); - break; - case TYPE_ASSEMBLY_HARD: - m_auiHardBoss[2] = uiData; // TODO: add extra loot - break; - case TYPE_FREYA_HARD: - m_auiHardBoss[6] = uiData; // Hard mode loot in in script + DoRespawnGameObject(instance->IsRegularDifficulty() ? GO_CACHE_OF_RARE_WINTER : GO_CACHE_OF_RARE_WINTER_H, 30*MINUTE); break; case TYPE_THORIM_HARD: - m_auiHardBoss[5] = uiData; + m_auiHardBoss[3] = uiData; if (uiData == DONE) - DoRespawnGameObject(m_uiThorimRareLootGUID, 30*MINUTE); + DoRespawnGameObject(instance->IsRegularDifficulty() ? GO_CACHE_OF_RARE_STORMS : GO_CACHE_OF_RARE_STORMS_H, 30*MINUTE); break; case TYPE_MIMIRON_HARD: - m_auiHardBoss[3] = uiData; + m_auiHardBoss[4] = uiData; if (uiData == DONE) - DoRespawnGameObject(m_uiMimironHardLootGUID, 30*MINUTE); + DoRespawnGameObject(instance->IsRegularDifficulty() ? GO_CACHE_OF_INOV_HARD : GO_CACHE_OF_INOV_HARD_H, 30*MINUTE); break; case TYPE_VEZAX_HARD: - m_auiHardBoss[7] = uiData; // TODO: add extra loot + m_auiHardBoss[5] = uiData; // TODO: add extra loot break; case TYPE_YOGGSARON_HARD: - m_auiHardBoss[8] = uiData; // TODO: add extra loot + m_auiHardBoss[6] = uiData; // TODO: add extra loot break; // Ulduar keepers @@ -625,17 +406,6 @@ void instance_ulduar::SetData(uint32 uiType, uint32 uiData) case TYPE_KEEPER_MIMIRON: m_auiUlduarKeepers[3] = uiData; break; - - // Teleporters - case TYPE_LEVIATHAN_TP: - m_auiUlduarTeleporters[0] = uiData; - break; - case TYPE_XT002_TP: - m_auiUlduarTeleporters[1] = uiData; - break; - case TYPE_MIMIRON_TP: - m_auiUlduarTeleporters[2] = uiData; - break; } DoOpenMadnessDoorIfCan(); @@ -653,8 +423,7 @@ void instance_ulduar::SetData(uint32 uiType, uint32 uiData) << m_auiEncounter[12] << " " << m_auiEncounter[13] << " " << m_auiHardBoss[0] << " " << m_auiHardBoss[1] << " " << m_auiHardBoss[2] << " " << m_auiHardBoss[2] << " " << m_auiHardBoss[4] << " " << m_auiHardBoss[5] << " " << m_auiHardBoss[6] << " " - << m_auiHardBoss[7] << " " << m_auiHardBoss[8] << " " << m_auiUlduarKeepers[0] << " " - << m_auiUlduarKeepers[1] << " " << m_auiUlduarKeepers[2] << " " << m_auiUlduarKeepers[3]; + << m_auiUlduarKeepers[0] << " " << m_auiUlduarKeepers[1] << " " << m_auiUlduarKeepers[2] << " " << m_auiUlduarKeepers[3]; strInstData = saveStream.str(); @@ -663,81 +432,6 @@ void instance_ulduar::SetData(uint32 uiType, uint32 uiData) } } -uint64 instance_ulduar::GetData64(uint32 uiData) -{ - switch (uiData) - { - // Siege - case NPC_LEVIATHAN: - return m_uiLeviathanGUID; - case NPC_IGNIS: - return m_uiIgnisGUID; - case NPC_RAZORSCALE: - return m_uiRazorscaleGUID; - case NPC_COMMANDER: - return m_uiCommanderGUID; - case NPC_XT002: - return m_uiXT002GUID; - // Antechamber - case NPC_STEELBREAKER: - return m_uiSteelbreakerGUID; - case NPC_MOLGEIM: - return m_uiMolgeimGUID; - case NPC_BRUNDIR: - return m_uiBrundirGUID; - case NPC_KOLOGARN: - return m_uiKologarnGUID; - case NPC_LEFT_ARM: - return m_uiLeftArmGUID; - case NPC_RIGHT_ARM: - return m_uiRightArmGUID; - case NPC_AURIAYA: - return m_uiAuriayaGUID; - // Keepers - case NPC_MIMIRON: - return m_uiMimironGUID; - case NPC_LEVIATHAN_MK: - return m_uiLeviathanMkGUID; - case NPC_HODIR: - return m_uiMimironGUID; - case NPC_THORIM: - return m_uiThorimGUID; - case NPC_RUNE_GIANT: - return m_uiRuneGiantGUID; - case NPC_RUNIC_COLOSSUS: - return m_uiRunicColossusGUID; - case NPC_JORMUNGAR_BEHEMOTH: - return m_uiJormungarGUID; - case NPC_FREYA: - return m_uiFreyaGUID; - case NPC_ELDER_BRIGHTLEAF: - return m_uiElderBrightleafGUID; - case NPC_ELDER_IRONBRACH: - return m_uiElderIronbrachGUID; - case NPC_ELDER_STONEBARK: - return m_uiElderStonebarkGUID; - case NPC_VEZAX: - return m_uiVezaxGUID; - case NPC_YOGGSARON: - return m_uiYoggSaronGUID; - case NPC_SARA: - return m_uiSaraGUID; - case NPC_YOGG_BRAIN: - return m_uiYoggBrainGUID; - case NPC_ALGALON: - return m_uiAlgalonGUID; - - // Mimiron hard mode button - case G0_MIMIRON_BUTTON: - return m_uiMimironButtonGUID; - // Celestial door - case GO_CELESTIAL_DOOR: - return m_uiCelestialDoorGUID; - } - - return 0; -} - // TODO: implement all hard mode loot here! bool instance_ulduar::CheckConditionCriteriaMeet(Player const* pSource, uint32 uiMapId, uint32 uiInstanceConditionId) { @@ -790,20 +484,16 @@ uint32 instance_ulduar::GetData(uint32 uiType) return m_auiHardBoss[0]; case TYPE_XT002_HARD: return m_auiHardBoss[1]; - case TYPE_ASSEMBLY_HARD: + case TYPE_HODIR_HARD: return m_auiHardBoss[2]; - case TYPE_MIMIRON_HARD: + case TYPE_THORIM_HARD: return m_auiHardBoss[3]; - case TYPE_HODIR_HARD: + case TYPE_MIMIRON_HARD: return m_auiHardBoss[4]; - case TYPE_THORIM_HARD: - return m_auiHardBoss[5]; - case TYPE_FREYA_HARD: - return m_auiHardBoss[6]; case TYPE_VEZAX_HARD: - return m_auiHardBoss[7]; + return m_auiHardBoss[5]; case TYPE_YOGGSARON_HARD: - return m_auiHardBoss[8]; + return m_auiHardBoss[6]; // Ulduar Keepers case TYPE_KEEPER_HODIR: @@ -814,14 +504,6 @@ uint32 instance_ulduar::GetData(uint32 uiType) return m_auiUlduarKeepers[2]; case TYPE_KEEPER_MIMIRON: return m_auiUlduarKeepers[3]; - - // Teleporters - case TYPE_LEVIATHAN_TP: - return m_auiUlduarTeleporters[0]; - case TYPE_XT002_TP: - return m_auiUlduarTeleporters[1]; - case TYPE_MIMIRON_TP: - return m_auiUlduarTeleporters[2]; } return 0; @@ -855,14 +537,12 @@ void instance_ulduar::Load(const char* strIn) std::istringstream loadStream(strIn); loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3] - >> m_auiEncounter[4] >> m_auiEncounter[5] >> m_auiEncounter[6] >> m_auiEncounter[7] - >> m_auiEncounter[8] >> m_auiEncounter[9] >> m_auiEncounter[10] >> m_auiEncounter[11] - >> m_auiEncounter[12] >> m_auiEncounter[13] >> m_auiHardBoss[0] >> m_auiHardBoss[1] - >> m_auiHardBoss[2] >> m_auiHardBoss[3] >> m_auiHardBoss[4] >> m_auiHardBoss[5] - >> m_auiHardBoss[6] >> m_auiHardBoss[7] >> m_auiHardBoss[8] >> m_auiUlduarKeepers[0] - >> m_auiUlduarKeepers[1] >> m_auiUlduarKeepers[2] >> m_auiUlduarKeepers[3]; - - for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) + >> m_auiEncounter[4] >> m_auiEncounter[5] >> m_auiEncounter[6] >> m_auiEncounter[7] >> m_auiEncounter[8] + >> m_auiEncounter[9] >> m_auiEncounter[10] >> m_auiEncounter[11] >> m_auiEncounter[12] >> m_auiEncounter[13] + >> m_auiHardBoss[0] >> m_auiHardBoss[1] >> m_auiHardBoss[2] >> m_auiHardBoss[3] >> m_auiHardBoss[4] >> m_auiHardBoss[5] >> m_auiHardBoss[6] + >> m_auiUlduarKeepers[0] >> m_auiUlduarKeepers[1] >> m_auiUlduarKeepers[2] >> m_auiUlduarKeepers[3]; + + for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) { if (m_auiEncounter[i] == IN_PROGRESS) m_auiEncounter[i] = NOT_STARTED; diff --git a/scripts/northrend/ulduar/ulduar/ulduar.h b/scripts/northrend/ulduar/ulduar/ulduar.h index 05e11b29d..c4d7fc435 100644 --- a/scripts/northrend/ulduar/ulduar/ulduar.h +++ b/scripts/northrend/ulduar/ulduar/ulduar.h @@ -8,9 +8,8 @@ enum { MAX_ENCOUNTER = 14, - HARD_MODE_ENCOUNTER = 9, + HARD_MODE_ENCOUNTER = 7, KEEPER_ENCOUNTER = 4, - TELEPORTER_ENCOUNTER = 3, // Main boss types TYPE_LEVIATHAN = 0, @@ -32,11 +31,9 @@ enum // Used for hard mode bosses only TYPE_LEVIATHAN_HARD = 14, TYPE_XT002_HARD = 15, - TYPE_ASSEMBLY_HARD = 16, TYPE_MIMIRON_HARD = 17, TYPE_HODIR_HARD = 18, TYPE_THORIM_HARD = 19, - TYPE_FREYA_HARD = 20, TYPE_VEZAX_HARD = 21, TYPE_YOGGSARON_HARD = 22, @@ -47,12 +44,6 @@ enum TYPE_KEEPER_THORIM = 25, TYPE_KEEPER_MIMIRON = 26, - // Teleporter types - // Some teleporters aren't depending directly on a boss, so we use a distinct type for them (maybe use areatrigger?) - TYPE_LEVIATHAN_TP = 27, - TYPE_XT002_TP = 28, - TYPE_MIMIRON_TP = 29, - // The siege of ulduar NPC_LEVIATHAN = 33113, NPC_IGNIS = 33118, @@ -216,7 +207,6 @@ class MANGOS_DLL_DECL instance_ulduar : public ScriptedInstance void SetData(uint32 uiType, uint32 uiData); uint32 GetData(uint32 uiType); - uint64 GetData64(uint32 uiData); const char* Save() { return strInstData.c_str(); } void Load(const char* chrIn); @@ -233,93 +223,6 @@ class MANGOS_DLL_DECL instance_ulduar : public ScriptedInstance uint32 m_auiEncounter[MAX_ENCOUNTER]; uint32 m_auiHardBoss[HARD_MODE_ENCOUNTER]; uint32 m_auiUlduarKeepers[KEEPER_ENCOUNTER]; - uint32 m_auiUlduarTeleporters[TELEPORTER_ENCOUNTER]; - - // Creatures - uint64 m_uiLeviathanGUID; - uint64 m_uiIgnisGUID; - uint64 m_uiRazorscaleGUID; - uint64 m_uiCommanderGUID; - uint64 m_uiXT002GUID; - uint64 m_uiBrundirGUID; - uint64 m_uiMolgeimGUID; - uint64 m_uiSteelbreakerGUID; - uint64 m_uiKologarnGUID; - uint64 m_uiAuriayaGUID; - uint64 m_uiMimironGUID; - uint64 m_uiHodirGUID; - uint64 m_uiThorimGUID; - uint64 m_uiFreyaGUID; - uint64 m_uiVezaxGUID; - uint64 m_uiYoggSaronGUID; - uint64 m_uiAlgalonGUID; - uint64 m_uiRightArmGUID; - uint64 m_uiLeftArmGUID; - uint64 m_uiFeralDefenderGUID; - uint64 m_uiElderBrightleafGUID; - uint64 m_uiElderStonebarkGUID; - uint64 m_uiElderIronbrachGUID; - uint64 m_uiSaroniteAnimusGUID; - uint64 m_uiRunicColossusGUID; - uint64 m_uiRuneGiantGUID; - uint64 m_uiJormungarGUID; - uint64 m_uiLeviathanMkGUID; - uint64 m_uiSaraGUID; - uint64 m_uiYoggBrainGUID; - - // Doors & Objects - // The siege - uint64 m_uiShieldWallGUID; - uint64 m_uiLeviathanGateGUID; - uint64 m_uiXT002GateGUID; - uint64 m_uiBrokenHarpoonGUID; - // Archivum - uint64 m_uiIronCouncilDoorGUID; - uint64 m_uiArchivumDoorGUID; - uint64 m_uiArchivumConsoleGUID; - uint64 m_uiUniverseFloorArchivumGUID; - // Celestial planetarium - uint64 m_uiCelestialDoorGUID; - uint64 m_uiCelestialConsoleGUID; - uint64 m_uiUniverseFloorCelestialGUID; - uint64 m_uiAzerothGlobeGUID; - // Kologarn - uint64 m_uiShatteredHallsDoorGUID; - uint64 m_uiKologarnBridgeGUID; - // Hodir - uint64 m_uiHodirEnterDoorGUID; - uint64 m_uiHodirWallGUID; - uint64 m_uiHodirExitDoorGUID; - // Mimiron - uint64 m_uiMimironButtonGUID; - uint64 m_uiMimironDoor1GUID; - uint64 m_uiMimironDoor2GUID; - uint64 m_uiMimironDoor3GUID; - uint64 m_uiMimironElevatorGUID; - uint64 m_auiMimironTelGUID[9]; - // Thorim - uint64 m_uiArenaEnterDoorGUID; - uint64 m_uiArenaExitDoorGUID; - uint64 m_uiHallwayDoorGUID; - uint64 m_uiThorimEnterDoorGUID; - uint64 m_uiThorimLeverGUID; - // Prison - uint64 m_uiAncientGateGUID; - uint64 m_uiVezaxGateGUID; - uint64 m_uiYoggGateGUID; - uint64 m_uiBrainDoor1GUID; - uint64 m_uiBrainDoor2GUID; - uint64 m_uiBrainDoor3GUID; - - // Chests - uint64 m_uiKologarnLootGUID; - uint64 m_uiHodirLootGUID; - uint64 m_uiHodirRareLootGUID; - uint64 m_uiThorimLootGUID; - uint64 m_uiThorimRareLootGUID; - uint64 m_uiMimironLootGUID; - uint64 m_uiMimironHardLootGUID; - uint64 m_uiAlagonLootGUID; }; #endif diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 7be3affaf..b34e4f148 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2169" + #define SD2_REVISION_NR "2170" #endif // __SD2_REVISION_NR_H__ From a82960481efc6a2403a2dcf788a3153ce8e709bf Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Fri, 3 Jun 2011 18:45:26 +0200 Subject: [PATCH 0151/1172] [2171] Use EntryGuidMap-Storage in Stratholme * Refactor Thuzadin Acolyte Death handling into own function * Use an own structure to hold information for sorted Ziggurats --- .../stratholme/instance_stratholme.cpp | 218 ++++++++---------- .../eastern_kingdoms/stratholme/stratholme.h | 29 +-- sd2_revision_nr.h | 2 +- 3 files changed, 104 insertions(+), 145 deletions(-) diff --git a/scripts/eastern_kingdoms/stratholme/instance_stratholme.cpp b/scripts/eastern_kingdoms/stratholme/instance_stratholme.cpp index 3a35c1bac..2e761e07d 100644 --- a/scripts/eastern_kingdoms/stratholme/instance_stratholme.cpp +++ b/scripts/eastern_kingdoms/stratholme/instance_stratholme.cpp @@ -30,22 +30,7 @@ instance_stratholme::instance_stratholme(Map* pMap) : ScriptedInstance(pMap), m_uiMindlessSummonTimer(0), m_uiSlaugtherSquareTimer(0), m_uiYellCounter(0), - m_uiMindlessCount(0), - - m_uiServiceEntranceGUID(0), - m_uiGauntletGate1GUID(0), - m_uiPortGauntletGUID(0), - m_uiPortSlaugtherGUID(0), - m_uiPortElderGUID(0), - m_uiPortSlaughterGateGUID(0), - m_auiRamsteinDoorGUID(0), - m_auiRivendareDoorGUID(0), - m_uiYsidaCageGUID(0), - - m_uiBaronGUID(0), - m_uiYsidaTriggerGUID(0), - - m_uiAcolyteAnnouncerGUID(0) + m_uiMindlessCount(0) { Initialize(); } @@ -54,23 +39,16 @@ void instance_stratholme::Initialize() { memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); memset(&m_bIsSilverHandDead, false, sizeof(m_bIsSilverHandDead)); - memset(&m_auiZigguratGUID, 0, sizeof(m_auiZigguratGUID)); - memset(&m_auiCrystalSortedGUID, 0, sizeof(m_auiCrystalSortedGUID)); - - m_luiCrystalGUIDs.clear(); - m_sAbomnationGUID.clear(); - m_luiAcolyteGUIDs.clear(); } bool instance_stratholme::StartSlaugtherSquare() { if (m_auiEncounter[TYPE_BARONESS] == SPECIAL && m_auiEncounter[TYPE_NERUB] == SPECIAL && m_auiEncounter[TYPE_PALLID] == SPECIAL) { - if (Creature* pBaron = instance->GetCreature(m_uiBaronGUID)) - DoScriptText(SAY_ANNOUNCE_RIVENDARE, pBaron); + DoOrSimulateScriptTextForThisInstance(SAY_ANNOUNCE_RIVENDARE, NPC_BARON); - DoUseDoorOrButton(m_uiPortGauntletGUID); - DoUseDoorOrButton(m_uiPortSlaugtherGUID); + DoUseDoorOrButton(GO_PORT_GAUNTLET); + DoUseDoorOrButton(GO_PORT_SLAUGTHER); debug_log("SD2: Instance Stratholme: Open slaugther square."); @@ -84,13 +62,22 @@ void instance_stratholme::OnCreatureCreate(Creature* pCreature) { switch(pCreature->GetEntry()) { - case NPC_BARON: m_uiBaronGUID = pCreature->GetGUID(); break; - case NPC_YSIDA_TRIGGER: m_uiYsidaTriggerGUID = pCreature->GetGUID(); break; - case NPC_CRYSTAL: m_luiCrystalGUIDs.push_back(pCreature->GetGUID()); break; + case NPC_BARON: + case NPC_YSIDA_TRIGGER: + case NPC_BARTHILAS: + m_mNpcEntryGuidStore[pCreature->GetEntry()] = pCreature->GetObjectGuid(); + break; + + case NPC_CRYSTAL: + m_luiCrystalGUIDs.push_back(pCreature->GetGUID()); + break; case NPC_ABOM_BILE: - case NPC_ABOM_VENOM: m_sAbomnationGUID.insert(pCreature->GetGUID()); break; - case NPC_THUZADIN_ACOLYTE: m_luiAcolyteGUIDs.push_back(pCreature->GetGUID()); break; - case NPC_BARTHILAS: m_uiBarthilasGUID = pCreature->GetGUID(); break; + case NPC_ABOM_VENOM: + m_sAbomnationGUID.insert(pCreature->GetGUID()); + break; + case NPC_THUZADIN_ACOLYTE: + m_luiAcolyteGUIDs.push_back(pCreature->GetGUID()); + break; } } @@ -99,61 +86,57 @@ void instance_stratholme::OnObjectCreate(GameObject* pGo) switch(pGo->GetEntry()) { case GO_SERVICE_ENTRANCE: - m_uiServiceEntranceGUID = pGo->GetGUID(); break; case GO_GAUNTLET_GATE1: // TODO //weird, but unless flag is set, client will not respond as expected. DB bug? pGo->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_LOCKED); - m_uiGauntletGate1GUID = pGo->GetGUID(); break; + case GO_ZIGGURAT_DOOR_1: - m_auiZigguratGUID[0] = pGo->GetGUID(); + m_zigguratStorage[0].m_doorGuid = pGo->GetObjectGuid(); if (m_auiEncounter[TYPE_BARONESS] == DONE || m_auiEncounter[TYPE_BARONESS] == SPECIAL) pGo->SetGoState(GO_STATE_ACTIVE); - break; + return; case GO_ZIGGURAT_DOOR_2: - m_auiZigguratGUID[1] = pGo->GetGUID(); + m_zigguratStorage[1].m_doorGuid = pGo->GetObjectGuid(); if (m_auiEncounter[TYPE_NERUB] == DONE || m_auiEncounter[TYPE_NERUB] == SPECIAL) pGo->SetGoState(GO_STATE_ACTIVE); - break; + return; case GO_ZIGGURAT_DOOR_3: - m_auiZigguratGUID[2] = pGo->GetGUID(); + m_zigguratStorage[2].m_doorGuid = pGo->GetObjectGuid(); if (m_auiEncounter[TYPE_PALLID] == DONE || m_auiEncounter[TYPE_PALLID] == SPECIAL) pGo->SetGoState(GO_STATE_ACTIVE); - break; + return; + case GO_ZIGGURAT_DOOR_4: - m_auiRamsteinDoorGUID = pGo->GetGUID(); if (m_auiEncounter[TYPE_RAMSTEIN] == DONE) pGo->SetGoState(GO_STATE_ACTIVE); break; case GO_ZIGGURAT_DOOR_5: - m_auiRivendareDoorGUID = pGo->GetGUID(); if (m_auiEncounter[TYPE_RAMSTEIN] == DONE) pGo->SetGoState(GO_STATE_ACTIVE); break; case GO_PORT_GAUNTLET: - m_uiPortGauntletGUID = pGo->GetGUID(); if (m_auiEncounter[TYPE_BARONESS] == SPECIAL && m_auiEncounter[TYPE_NERUB] == SPECIAL && m_auiEncounter[TYPE_PALLID] == SPECIAL) pGo->SetGoState(GO_STATE_ACTIVE); break; case GO_PORT_SLAUGTHER: - m_uiPortSlaugtherGUID = pGo->GetGUID(); if (m_auiEncounter[TYPE_BARONESS] == SPECIAL && m_auiEncounter[TYPE_NERUB] == SPECIAL && m_auiEncounter[TYPE_PALLID] == SPECIAL) pGo->SetGoState(GO_STATE_ACTIVE); break; case GO_PORT_SLAUGHTER_GATE: - m_uiPortSlaughterGateGUID = pGo->GetGUID(); if (m_auiEncounter[TYPE_RAMSTEIN] == DONE) // Might actually be uneeded pGo->SetGoState(GO_STATE_ACTIVE); break; case GO_PORT_ELDERS: - m_uiPortElderGUID = pGo->GetGUID(); - break; case GO_YSIDA_CAGE: - m_uiYsidaCageGUID = pGo->GetGUID(); break; + + default: + return; } + m_mGoEntryGuidStore[pGo->GetEntry()] = pGo->GetObjectGuid(); } void instance_stratholme::SetData(uint32 uiType, uint32 uiData) @@ -168,8 +151,7 @@ void instance_stratholme::SetData(uint32 uiType, uint32 uiData) if (m_auiEncounter[uiType] == IN_PROGRESS || m_auiEncounter[uiType] == FAIL) break; - if (Creature* pBaron = instance->GetCreature(m_uiBaronGUID)) - DoScriptText(SAY_ANNOUNCE_RUN_START, pBaron); + DoOrSimulateScriptTextForThisInstance(SAY_ANNOUNCE_RUN_START, NPC_BARON); m_uiBaronRunTimer = 45*MINUTE*IN_MILLISECONDS; debug_log("SD2: Instance Stratholme: Baron run in progress."); @@ -190,7 +172,7 @@ void instance_stratholme::SetData(uint32 uiType, uint32 uiData) if (uiData == DONE) { DoSortZiggurats(); - DoUseDoorOrButton(m_auiZigguratGUID[uiType - TYPE_BARONESS]); + DoUseDoorOrButton(m_zigguratStorage[uiType - TYPE_BARONESS].m_doorGuid); } if (uiData == SPECIAL) StartSlaugtherSquare(); @@ -201,7 +183,7 @@ void instance_stratholme::SetData(uint32 uiType, uint32 uiData) if (m_auiEncounter[uiType] != SPECIAL && m_auiEncounter[uiType] != DONE) { m_uiSlaugtherSquareTimer = 20000; // TODO - unknown, also possible that this is not the very correct place.. - DoUseDoorOrButton(m_uiPortGauntletGUID); + DoUseDoorOrButton(GO_PORT_GAUNTLET); } uint32 uiCount = m_sAbomnationGUID.size(); @@ -223,14 +205,14 @@ void instance_stratholme::SetData(uint32 uiType, uint32 uiData) if (!uiCount) { - // Old Comment: a bit itchy, it should close m_auiRamsteinDoorGUID door after 10 secs, but it doesn't. skipping it for now. + // Old Comment: a bit itchy, it should close GO_ZIGGURAT_DOOR_4 door after 10 secs, but it doesn't. skipping it for now. // However looks like that this door is no more closed - DoUseDoorOrButton(m_auiRamsteinDoorGUID); + DoUseDoorOrButton(GO_ZIGGURAT_DOOR_4); // No more handlng of Abomnations m_uiSlaugtherSquareTimer = 0; - if (Creature* pBaron = instance->GetCreature(m_uiBaronGUID)) + if (Creature* pBaron = GetSingleCreatureFromStorage(NPC_BARON)) { DoScriptText(SAY_ANNOUNCE_RAMSTEIN, pBaron); if (Creature* pRamstein = pBaron->SummonCreature(NPC_RAMSTEIN, sStratholmeLocation[2].m_fX, sStratholmeLocation[2].m_fY, sStratholmeLocation[2].m_fZ, sStratholmeLocation[2].m_fO, TEMPSUMMON_DEAD_DESPAWN, 0)) @@ -244,18 +226,18 @@ void instance_stratholme::SetData(uint32 uiType, uint32 uiData) } // After fail aggroing Ramstein means wipe on Ramstein, so close door again if (uiData == IN_PROGRESS && m_auiEncounter[uiType] == FAIL) - DoUseDoorOrButton(m_uiPortGauntletGUID); + DoUseDoorOrButton(GO_PORT_GAUNTLET); if (uiData == DONE) { // Open side gate and start summoning skeletons - DoUseDoorOrButton(m_uiPortSlaughterGateGUID); + DoUseDoorOrButton(GO_PORT_SLAUGHTER_GATE); // use this timer as a bool just to start summoning m_uiMindlessSummonTimer = 500; m_uiMindlessCount = 0; m_luiUndeadGUIDs.clear(); // Summon 5 guards - if (Creature* pBaron = instance->GetCreature(m_uiBaronGUID)) + if (Creature* pBaron = GetSingleCreatureFromStorage(NPC_BARON)) { for(uint8 i = 0; i < 5; ++i) { @@ -271,7 +253,7 @@ void instance_stratholme::SetData(uint32 uiType, uint32 uiData) // Open Door again and stop Abomnation if (uiData == FAIL && m_auiEncounter[uiType] != FAIL) { - DoUseDoorOrButton(m_uiPortGauntletGUID); + DoUseDoorOrButton(GO_PORT_GAUNTLET); m_uiSlaugtherSquareTimer = 0; // Let already moving Abomnations stop @@ -294,7 +276,7 @@ void instance_stratholme::SetData(uint32 uiType, uint32 uiData) // Close Slaughterhouse door if needed if (m_auiEncounter[5] == FAIL) // TODO - DoUseDoorOrButton(m_uiPortGauntletGUID); + DoUseDoorOrButton(GO_PORT_GAUNTLET); } if (uiData == DONE) { @@ -315,31 +297,29 @@ void instance_stratholme::SetData(uint32 uiType, uint32 uiData) } // Open cage and finish rescue event - if (Creature* pYsidaT = instance->GetCreature(m_uiYsidaTriggerGUID)) + if (Creature* pYsidaT = GetSingleCreatureFromStorage(NPC_YSIDA_TRIGGER)) { if (Creature* pYsida = pYsidaT->SummonCreature(NPC_YSIDA, pYsidaT->GetPositionX(), pYsidaT->GetPositionY(), pYsidaT->GetPositionZ(), pYsidaT->GetOrientation(), TEMPSUMMON_TIMED_DESPAWN, 1800000)) { DoScriptText(SAY_EPILOGUE, pYsida); pYsida->GetMotionMaster()->MovePoint(0, sStratholmeLocation[7].m_fX, sStratholmeLocation[7].m_fY, sStratholmeLocation[7].m_fZ); } - DoUseDoorOrButton(m_uiYsidaCageGUID); + DoUseDoorOrButton(GO_YSIDA_CAGE); } } // Open Slaughterhouse door again - DoUseDoorOrButton(m_uiPortGauntletGUID); + DoUseDoorOrButton(GO_PORT_GAUNTLET); } if (uiData == FAIL) - DoUseDoorOrButton(m_uiPortGauntletGUID); + DoUseDoorOrButton(GO_PORT_GAUNTLET); - // combat door - DoUseDoorOrButton(m_auiRivendareDoorGUID); m_auiEncounter[5] = uiData; // TODO break; case TYPE_BARTHILAS_RUN: if (uiData == IN_PROGRESS) { - Creature* pBarthilas = instance->GetCreature(m_uiBarthilasGUID); + Creature* pBarthilas = GetSingleCreatureFromStorage(NPC_BARTHILAS); if (pBarthilas && pBarthilas->isAlive() && !pBarthilas->isInCombat()) { DoScriptText(SAY_WARN_BARON, pBarthilas); @@ -358,15 +338,15 @@ void instance_stratholme::SetData(uint32 uiType, uint32 uiData) // Restart after failure, close Gauntlet if (uiData == IN_PROGRESS && m_auiEncounter[7] == FAIL) - DoUseDoorOrButton(m_uiPortGauntletGUID); + DoUseDoorOrButton(GO_PORT_GAUNTLET); // Wipe case - open gauntlet if (uiData == FAIL) - DoUseDoorOrButton(m_uiPortGauntletGUID); + DoUseDoorOrButton(GO_PORT_GAUNTLET); if (uiData == DONE) { - if (Creature* pBaron = instance->GetCreature(m_uiBaronGUID)) + if (Creature* pBaron = GetSingleCreatureFromStorage(NPC_BARON)) DoScriptText(SAY_UNDEAD_DEFEAT, pBaron); - DoUseDoorOrButton(m_auiRivendareDoorGUID); + DoUseDoorOrButton(GO_ZIGGURAT_DOOR_5); } m_auiEncounter[7] = uiData; // TODO @@ -463,19 +443,6 @@ uint32 instance_stratholme::GetData(uint32 uiType) } } -uint64 instance_stratholme::GetData64(uint32 uiData) -{ - switch(uiData) - { - case NPC_BARON: - return m_uiBaronGUID; - case NPC_YSIDA_TRIGGER: - return m_uiYsidaTriggerGUID; - default: - return 0; - } -} - static bool sortByHeight(Creature* pFirst, Creature* pSecond) { return pFirst && pSecond && pFirst->GetPositionZ() > pSecond->GetPositionZ(); @@ -497,11 +464,11 @@ void instance_stratholme::DoSortZiggurats() if (lAcolytes.empty()) return; - if (!m_uiAcolyteAnnouncerGUID) + if (!GetSingleCreatureFromStorage(NPC_THUZADIN_ACOLYTE, true)) { // Sort the acolytes by height, and the one with the biggest height is the announcer (a bit outside the map) lAcolytes.sort(sortByHeight); - m_uiAcolyteAnnouncerGUID = (*lAcolytes.begin())->GetGUID(); + m_mNpcEntryGuidStore[NPC_THUZADIN_ACOLYTE] = (*lAcolytes.begin())->GetObjectGuid(); lAcolytes.erase(lAcolytes.begin()); } @@ -511,11 +478,11 @@ void instance_stratholme::DoSortZiggurats() bool bAlreadyIterated = false; for (uint8 i = 0; i < MAX_ZIGGURATS; ++i) { - if (GameObject* pZigguratDoor = instance->GetGameObject(m_auiZigguratGUID[i])) + if (GameObject* pZigguratDoor = instance->GetGameObject(m_zigguratStorage[i].m_doorGuid)) { - if ((*itr)->isAlive() && (*itr)->IsWithinDistInMap(pZigguratDoor, 30.0f, false)) + if ((*itr)->isAlive() && (*itr)->IsWithinDistInMap(pZigguratDoor, 35.0f, false)) { - m_alZigguratAcolyteGUID[i].push_back((*itr)->GetGUID()); + m_zigguratStorage[i].m_lZigguratAcolyteGuid.push_back((*itr)->GetGUID()); itr = lAcolytes.erase(itr); bAlreadyIterated = true; break; @@ -544,11 +511,11 @@ void instance_stratholme::DoSortZiggurats() bool bAlreadyIterated = false; for (uint8 i = 0; i < MAX_ZIGGURATS; ++i) { - if (GameObject* pZigguratDoor = instance->GetGameObject(m_auiZigguratGUID[i])) + if (GameObject* pZigguratDoor = instance->GetGameObject(m_zigguratStorage[i].m_doorGuid)) { if (pCrystal->IsWithinDistInMap(pZigguratDoor, 50.0f, false)) { - m_auiCrystalSortedGUID[i] = *itr; + m_zigguratStorage[i].m_crystalGuid = pCrystal->GetObjectGuid(); itr = m_luiCrystalGUIDs.erase(itr); bAlreadyIterated = true; break; @@ -619,31 +586,7 @@ void instance_stratholme::OnCreatureDeath(Creature* pCreature) case NPC_BARON: SetData(TYPE_BARON, DONE); break; case NPC_THUZADIN_ACOLYTE: - for (uint8 i = 0; i < MAX_ZIGGURATS; ++i) - { - if (m_alZigguratAcolyteGUID[i].empty()) - continue; // nothing to do anymore for this ziggurat - - m_alZigguratAcolyteGUID[i].remove(pCreature->GetGUID()); - if (m_alZigguratAcolyteGUID[i].empty()) - { - // A random zone yell after one is cleared - int32 aAnnounceSay[MAX_ZIGGURATS] = {SAY_ANNOUNCE_ZIGGURAT_1, SAY_ANNOUNCE_ZIGGURAT_2, SAY_ANNOUNCE_ZIGGURAT_3}; - if (Creature* pAnnouncer = instance->GetCreature(m_uiAcolyteAnnouncerGUID)) - DoScriptText(aAnnounceSay[i], pAnnouncer); - - // Kill Crystal - if (Creature* pCrystal = instance->GetCreature(m_auiCrystalSortedGUID[i])) - pCrystal->DealDamage(pCrystal, pCrystal->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); - - switch (i) - { - case 0: SetData(TYPE_BARONESS, SPECIAL); break; - case 1: SetData(TYPE_NERUB, SPECIAL); break; - case 2: SetData(TYPE_PALLID, SPECIAL); break; - } - } - } + ThazudinAcolyteJustDied(pCreature); break; case NPC_ABOM_BILE: @@ -678,13 +621,41 @@ void instance_stratholme::OnCreatureDeath(Creature* pCreature) } } +void instance_stratholme::ThazudinAcolyteJustDied(Creature* pCreature) +{ + for (uint8 i = 0; i < MAX_ZIGGURATS; ++i) + { + if (m_zigguratStorage[i].m_lZigguratAcolyteGuid.empty()) + continue; // nothing to do anymore for this ziggurat + + m_zigguratStorage[i].m_lZigguratAcolyteGuid.remove(pCreature->GetGUID()); + if (m_zigguratStorage[i].m_lZigguratAcolyteGuid.empty()) + { + // A random zone yell after one is cleared + int32 aAnnounceSay[MAX_ZIGGURATS] = {SAY_ANNOUNCE_ZIGGURAT_1, SAY_ANNOUNCE_ZIGGURAT_2, SAY_ANNOUNCE_ZIGGURAT_3}; + DoOrSimulateScriptTextForThisInstance(aAnnounceSay[i], NPC_THUZADIN_ACOLYTE); + + // Kill Crystal + if (Creature* pCrystal = instance->GetCreature(m_zigguratStorage[i].m_crystalGuid)) + pCrystal->DealDamage(pCrystal, pCrystal->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + + switch (i) + { + case 0: SetData(TYPE_BARONESS, SPECIAL); break; + case 1: SetData(TYPE_NERUB, SPECIAL); break; + case 2: SetData(TYPE_PALLID, SPECIAL); break; + } + } + } +} + void instance_stratholme::Update(uint32 uiDiff) { if (m_uiBarthilasRunTimer) { if (m_uiBarthilasRunTimer <= uiDiff) { - Creature* pBarthilas = instance->GetCreature(m_uiBarthilasGUID); + Creature* pBarthilas = GetSingleCreatureFromStorage(NPC_BARTHILAS); if (pBarthilas && pBarthilas->isAlive() && !pBarthilas->isInCombat()) pBarthilas->NearTeleportTo(sStratholmeLocation[1].m_fX, sStratholmeLocation[1].m_fY, sStratholmeLocation[1].m_fZ, sStratholmeLocation[1].m_fO); @@ -699,14 +670,12 @@ void instance_stratholme::Update(uint32 uiDiff) { if (m_uiYellCounter == 0 && m_uiBaronRunTimer <= 10*MINUTE*IN_MILLISECONDS) { - if (Creature* pBaron = instance->GetCreature(m_uiBaronGUID)) - DoScriptText(SAY_ANNOUNCE_RUN_10_MIN, pBaron); + DoOrSimulateScriptTextForThisInstance(SAY_ANNOUNCE_RUN_10_MIN, NPC_BARON); ++m_uiYellCounter; } else if (m_uiYellCounter == 1 && m_uiBaronRunTimer <= 5*MINUTE*IN_MILLISECONDS) { - if (Creature* pBaron = instance->GetCreature(m_uiBaronGUID)) - DoScriptText(SAY_ANNOUNCE_RUN_5_MIN, pBaron); + DoOrSimulateScriptTextForThisInstance(SAY_ANNOUNCE_RUN_5_MIN, NPC_BARON); ++m_uiYellCounter; } @@ -714,8 +683,7 @@ void instance_stratholme::Update(uint32 uiDiff) { SetData(TYPE_BARON_RUN, FAIL); - if (Creature* pBaron = instance->GetCreature(m_uiBaronGUID)) - DoScriptText(SAY_ANNOUNCE_RUN_FAIL, pBaron); + DoOrSimulateScriptTextForThisInstance(SAY_ANNOUNCE_RUN_FAIL, NPC_BARON); m_uiBaronRunTimer = 0; debug_log("SD2: Instance Stratholme: Baron run event reached end. Event has state %u.", GetData(TYPE_BARON_RUN)); @@ -730,7 +698,7 @@ void instance_stratholme::Update(uint32 uiDiff) { if (m_uiMindlessSummonTimer <= uiDiff) { - if (Creature* pBaron = instance->GetCreature(m_uiBaronGUID)) + if (Creature* pBaron = GetSingleCreatureFromStorage(NPC_BARON)) { // Summon mindless skeletons and move them to random point in the center of the square if (Creature* pTemp = pBaron->SummonCreature(NPC_MINDLESS_UNDEAD, sStratholmeLocation[4].m_fX, sStratholmeLocation[4].m_fY, sStratholmeLocation[4].m_fZ, sStratholmeLocation[4].m_fO, TEMPSUMMON_DEAD_DESPAWN, 0)) @@ -766,7 +734,7 @@ void instance_stratholme::Update(uint32 uiDiff) // Let Move to somewhere in the middle if (!pAbom->isInCombat()) { - if (GameObject* pDoor = instance->GetGameObject(m_uiPortSlaugtherGUID)) + if (GameObject* pDoor = GetSingleGameObjectFromStorage(GO_PORT_SLAUGTHER)) { float fX, fY, fZ; pAbom->GetRandomPoint(pDoor->GetPositionX(), pDoor->GetPositionY(), pDoor->GetPositionZ(), 10.0f, fX, fY, fZ); diff --git a/scripts/eastern_kingdoms/stratholme/stratholme.h b/scripts/eastern_kingdoms/stratholme/stratholme.h index 89deea9a7..e3b48ede5 100644 --- a/scripts/eastern_kingdoms/stratholme/stratholme.h +++ b/scripts/eastern_kingdoms/stratholme/stratholme.h @@ -91,6 +91,13 @@ static sEventLocation sStratholmeLocation[] = {4042.575f, -3337.929f, 115.059f} // ysida move loc }; +struct ZigguratStore +{ + ObjectGuid m_doorGuid; + ObjectGuid m_crystalGuid; + GUIDList m_lZigguratAcolyteGuid; +}; + struct MANGOS_DLL_DECL instance_stratholme : public ScriptedInstance { public: @@ -104,7 +111,6 @@ struct MANGOS_DLL_DECL instance_stratholme : public ScriptedInstance void SetData(uint32 uiType, uint32 uiData); uint32 GetData(uint32 uiType); - uint64 GetData64(uint32 uiData); const char* Save() { return strInstData.c_str(); } void Load(const char* chrIn); @@ -115,10 +121,11 @@ struct MANGOS_DLL_DECL instance_stratholme : public ScriptedInstance void Update(uint32 uiDiff); + protected: bool StartSlaugtherSquare(); void DoSortZiggurats(); + void ThazudinAcolyteJustDied( Creature* pCreature ); - protected: uint32 m_auiEncounter[MAX_ENCOUNTER]; bool m_bIsSilverHandDead[MAX_SILVERHAND]; std::string strInstData; @@ -131,27 +138,11 @@ struct MANGOS_DLL_DECL instance_stratholme : public ScriptedInstance uint32 m_uiYellCounter; uint32 m_uiMindlessCount; - uint64 m_uiServiceEntranceGUID; - uint64 m_uiGauntletGate1GUID; - uint64 m_auiZigguratGUID[MAX_ZIGGURATS]; - uint64 m_auiRamsteinDoorGUID; - uint64 m_auiRivendareDoorGUID; - uint64 m_uiPortGauntletGUID; - uint64 m_uiPortSlaugtherGUID; - uint64 m_uiPortElderGUID; - uint64 m_uiPortSlaughterGateGUID; - uint64 m_uiYsidaCageGUID; - - uint64 m_uiBaronGUID; - uint64 m_uiYsidaTriggerGUID; - uint64 m_uiBarthilasGUID; - uint64 m_uiAcolyteAnnouncerGUID; - uint64 m_auiCrystalSortedGUID[MAX_ZIGGURATS]; + ZigguratStore m_zigguratStorage[MAX_ZIGGURATS]; GUIDList m_luiCrystalGUIDs; GUIDSet m_sAbomnationGUID; GUIDList m_luiAcolyteGUIDs; - GUIDList m_alZigguratAcolyteGUID[MAX_ZIGGURATS]; GUIDList m_luiUndeadGUIDs; GUIDList m_luiGuardGUIDs; }; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index b34e4f148..d9b95eb38 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2170" + #define SD2_REVISION_NR "2171" #endif // __SD2_REVISION_NR_H__ From ef95cd32c59205711fc2c31042f10144a6e1c20a Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Fri, 3 Jun 2011 22:04:53 +0200 Subject: [PATCH 0152/1172] [2172] Use EntryGuidMap-Storage in Sunken Temple --- .../sunken_temple/instance_sunken_temple.cpp | 61 ++++++++----------- .../sunken_temple/sunken_temple.h | 8 --- sd2_revision_nr.h | 2 +- 3 files changed, 27 insertions(+), 44 deletions(-) diff --git a/scripts/eastern_kingdoms/sunken_temple/instance_sunken_temple.cpp b/scripts/eastern_kingdoms/sunken_temple/instance_sunken_temple.cpp index 7c2f37b8f..52df235a5 100644 --- a/scripts/eastern_kingdoms/sunken_temple/instance_sunken_temple.cpp +++ b/scripts/eastern_kingdoms/sunken_temple/instance_sunken_temple.cpp @@ -25,14 +25,7 @@ EndScriptData */ #include "sunken_temple.h" instance_sunken_temple::instance_sunken_temple(Map* pMap) : ScriptedInstance(pMap), - m_uiAtalarionGUID(0), - m_uiJammalanGUID(0), - m_uiJammalanBarrierGUID(0), - m_uiIdolOfHakkarGUID(0), m_uiStatueCounter(0), - m_uiShadeGUID(0), - m_uiAvatarDoor1GUID(0), - m_uiAvatarDoor2GUID(0), m_uiAvatarSummonTimer(0), m_uiSupressorTimer(0), m_uiFlameCounter(0), @@ -53,32 +46,31 @@ void instance_sunken_temple::OnObjectCreate(GameObject* pGo) switch(pGo->GetEntry()) { case GO_JAMMALAN_BARRIER: - m_uiJammalanBarrierGUID = pGo->GetGUID(); if (m_auiEncounter[1] == DONE) - DoUseDoorOrButton(m_uiJammalanBarrierGUID); + pGo->SetGoState(GO_STATE_ACTIVE); break; case GO_IDOL_OF_HAKKAR: - m_uiIdolOfHakkarGUID = pGo->GetGUID(); - break; - case GO_ATALAI_LIGHT_BIG: - m_luiBigLightGUIDs.push_back(pGo->GetGUID()); - break; case GO_HAKKAR_DOOR_1: - m_uiAvatarDoor1GUID = pGo->GetGUID(); - break; case GO_HAKKAR_DOOR_2: - m_uiAvatarDoor2GUID = pGo->GetGUID(); break; + + case GO_ATALAI_LIGHT_BIG: + m_luiBigLightGUIDs.push_back(pGo->GetGUID()); + return; case GO_EVIL_CIRCLE: m_vuiCircleGUIDs.push_back(pGo->GetGUID()); - break; + return; case GO_ETERNAL_FLAME_1: case GO_ETERNAL_FLAME_2: case GO_ETERNAL_FLAME_3: case GO_ETERNAL_FLAME_4: m_luiFlameGUIDs.push_back(pGo->GetGUID()); - break; + return; + + default: + return; } + m_mGoEntryGuidStore[pGo->GetEntry()] = pGo->GetObjectGuid(); } void instance_sunken_temple::OnCreatureCreate(Creature* pCreature) @@ -94,10 +86,8 @@ void instance_sunken_temple::OnCreatureCreate(Creature* pCreature) ++m_uiProtectorsRemaining; break; case NPC_JAMMALAN: - m_uiJammalanGUID = pCreature->GetGUID(); - break; case NPC_ATALARION: - m_uiAtalarionGUID = pCreature->GetGUID(); + m_mNpcEntryGuidStore[pCreature->GetEntry()] = pCreature->GetObjectGuid(); break; } } @@ -124,7 +114,9 @@ void instance_sunken_temple::OnCreatureDeath(Creature* pCreature) case NPC_JAMMALAN: SetData(TYPE_JAMMALAN, DONE); break; case NPC_AVATAR_OF_HAKKAR: SetData(TYPE_AVATAR, DONE); break; - case NPC_SUPPRESSOR: m_bCanSummonBloodkeeper = true; break; + case NPC_SUPPRESSOR: + m_bCanSummonBloodkeeper = true; + break; // Jammalain mini-bosses case NPC_ZOLO: @@ -154,10 +146,9 @@ void instance_sunken_temple::SetData(uint32 uiType, uint32 uiData) if (!m_uiProtectorsRemaining) { m_auiEncounter[1] = uiData; - DoUseDoorOrButton(m_uiJammalanBarrierGUID); + DoUseDoorOrButton(GO_JAMMALAN_BARRIER); // Intro yell - if (Creature* pJammalan = instance->GetCreature(m_uiJammalanGUID)) - DoScriptText(SAY_JAMMALAN_INTRO, pJammalan); + DoOrSimulateScriptTextForThisInstance(SAY_JAMMALAN_INTRO, NPC_JAMMALAN); } } break; @@ -172,7 +163,7 @@ void instance_sunken_temple::SetData(uint32 uiType, uint32 uiData) { ++m_uiFlameCounter; - Creature* pShade = instance->GetCreature(m_uiShadeGUID); + Creature* pShade = GetSingleCreatureFromStorage(NPC_SHADE_OF_HAKKAR); if (!pShade) return; @@ -220,7 +211,7 @@ void instance_sunken_temple::SetData(uint32 uiType, uint32 uiData) if (Creature* pShade = pPlayer->SummonCreature(NPC_SHADE_OF_HAKKAR, aSunkenTempleLocation[1].m_fX, aSunkenTempleLocation[1].m_fY, aSunkenTempleLocation[1].m_fZ, aSunkenTempleLocation[1].m_fO, TEMPSUMMON_MANUAL_DESPAWN, 0)) { - m_uiShadeGUID = pShade->GetGUID(); + m_mNpcEntryGuidStore[NPC_SHADE_OF_HAKKAR] = pShade->GetObjectGuid(); pShade->SetRespawnDelay(DAY); } @@ -234,7 +225,7 @@ void instance_sunken_temple::SetData(uint32 uiType, uint32 uiData) // The trash mobs stay in place, they are not despawned; the avatar is not sure if it's despawned or not but most likely he'll stay in place // Despawn the shade and the avatar if needed -- TODO, avatar really? - if (Creature* pShade = instance->GetCreature(m_uiShadeGUID)) + if (Creature* pShade = GetSingleCreatureFromStorage(NPC_SHADE_OF_HAKKAR)) pShade->ForcedDespawn(); // Reset flames @@ -242,8 +233,8 @@ void instance_sunken_temple::SetData(uint32 uiType, uint32 uiData) } // Use combat doors - DoUseDoorOrButton(m_uiAvatarDoor1GUID); - DoUseDoorOrButton(m_uiAvatarDoor2GUID); + DoUseDoorOrButton(GO_HAKKAR_DOOR_1); + DoUseDoorOrButton(GO_HAKKAR_DOOR_2); m_auiEncounter[4] = uiData; @@ -269,7 +260,7 @@ void instance_sunken_temple::SetData(uint32 uiType, uint32 uiData) void instance_sunken_temple::DoSpawnAtalarionIfCan() { // Return if already summoned - if (m_uiAtalarionGUID) + if (GetSingleCreatureFromStorage(NPC_ATALARION)) return; Player* pPlayer = GetPlayerInMap(); @@ -279,7 +270,7 @@ void instance_sunken_temple::DoSpawnAtalarionIfCan() pPlayer->SummonCreature(NPC_ATALARION, aSunkenTempleLocation[0].m_fX, aSunkenTempleLocation[0].m_fY, aSunkenTempleLocation[0].m_fZ, aSunkenTempleLocation[0].m_fO, TEMPSUMMON_DEAD_DESPAWN, 0); // Spawn the idol of Hakkar - DoRespawnGameObject(m_uiIdolOfHakkarGUID, 30 * MINUTE); + DoRespawnGameObject(GO_IDOL_OF_HAKKAR, 30 * MINUTE); // Spawn the big green lights for (GUIDList::const_iterator itr = m_luiBigLightGUIDs.begin(); itr != m_luiBigLightGUIDs.end(); ++itr) @@ -376,7 +367,7 @@ void instance_sunken_temple::Update(uint32 uiDiff) { if (m_uiAvatarSummonTimer <= uiDiff) { - Creature* pShade = instance->GetCreature(m_uiShadeGUID); + Creature* pShade = GetSingleCreatureFromStorage(NPC_SHADE_OF_HAKKAR); if (!pShade) return; @@ -433,7 +424,7 @@ void instance_sunken_temple::Update(uint32 uiDiff) { if (m_uiSupressorTimer <= uiDiff) { - Creature* pShade = instance->GetCreature(m_uiShadeGUID); + Creature* pShade = GetSingleCreatureFromStorage(NPC_SHADE_OF_HAKKAR); if (!pShade) { // Something went very wrong! diff --git a/scripts/eastern_kingdoms/sunken_temple/sunken_temple.h b/scripts/eastern_kingdoms/sunken_temple/sunken_temple.h index 41afed4d0..95730c397 100644 --- a/scripts/eastern_kingdoms/sunken_temple/sunken_temple.h +++ b/scripts/eastern_kingdoms/sunken_temple/sunken_temple.h @@ -146,14 +146,6 @@ class MANGOS_DLL_DECL instance_sunken_temple : public ScriptedInstance bool m_bIsFirstHakkarWave; bool m_bCanSummonBloodkeeper; - uint64 m_uiAtalarionGUID; - uint64 m_uiJammalanGUID; - uint64 m_uiShadeGUID; - uint64 m_uiJammalanBarrierGUID; - uint64 m_uiIdolOfHakkarGUID; - uint64 m_uiAvatarDoor1GUID; - uint64 m_uiAvatarDoor2GUID; - GUIDList m_luiFlameGUIDs; GUIDList m_luiBigLightGUIDs; GUIDVector m_vuiCircleGUIDs; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index d9b95eb38..fcca83b23 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2171" + #define SD2_REVISION_NR "2172" #endif // __SD2_REVISION_NR_H__ From f8ccef4e7aa9a703a5e7dd5f13086d9c5f0bede6 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Fri, 3 Jun 2011 22:23:40 +0200 Subject: [PATCH 0153/1172] [2173] Use EntryGuidMap-Storage in Sunwell Plateau --- .../sunwell_plateau/boss_kalecgos.cpp | 14 +-- .../instance_sunwell_plateau.cpp | 109 ++++-------------- .../sunwell_plateau/sunwell_plateau.h | 45 ++------ sd2_revision_nr.h | 2 +- 4 files changed, 41 insertions(+), 129 deletions(-) diff --git a/scripts/eastern_kingdoms/sunwell_plateau/boss_kalecgos.cpp b/scripts/eastern_kingdoms/sunwell_plateau/boss_kalecgos.cpp index bd10e51d6..3c989a7fb 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/boss_kalecgos.cpp +++ b/scripts/eastern_kingdoms/sunwell_plateau/boss_kalecgos.cpp @@ -126,7 +126,7 @@ struct MANGOS_DLL_DECL boss_kalecgosAI : public ScriptedAI if (m_pInstance) { // Reset Sathrovarr too - if (Creature* pSath = m_pInstance->instance->GetCreature(m_pInstance->GetData64(NPC_SATHROVARR))) + if (Creature* pSath = m_pInstance->GetSingleCreatureFromStorage(NPC_SATHROVARR)) { if (pSath->isAlive() && pSath->getVictim()) pSath->AI()->EnterEvadeMode(); @@ -209,7 +209,7 @@ struct MANGOS_DLL_DECL boss_kalecgosAI : public ScriptedAI if (!m_pInstance) return; - if (Creature* pSathrovarr = m_pInstance->instance->GetCreature(m_pInstance->GetData64(NPC_SATHROVARR))) + if (Creature* pSathrovarr = m_pInstance->GetSingleCreatureFromStorage(NPC_SATHROVARR)) { if (pSathrovarr->isAlive()) { @@ -218,7 +218,7 @@ struct MANGOS_DLL_DECL boss_kalecgosAI : public ScriptedAI } } - if (Creature* pKalec = m_pInstance->instance->GetCreature(m_pInstance->GetData64(NPC_KALECGOS_HUMAN))) + if (Creature* pKalec = m_pInstance->GetSingleCreatureFromStorage(NPC_KALECGOS_HUMAN)) { pKalec->DeleteThreatList(); pKalec->SetVisibility(VISIBILITY_OFF); @@ -252,7 +252,7 @@ struct MANGOS_DLL_DECL boss_kalecgosAI : public ScriptedAI if (!m_bEnraged && m_creature->GetHealthPercent() < 10.0f) { - if (Creature* pSathrovarr = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(NPC_SATHROVARR))) + if (Creature* pSathrovarr = m_pInstance->GetSingleCreatureFromStorage(NPC_SATHROVARR)) { if (pSathrovarr->isAlive()) pSathrovarr->CastSpell(pSathrovarr, SPELL_CRAZED_RAGE, true); @@ -378,7 +378,7 @@ struct MANGOS_DLL_DECL boss_sathrovarrAI : public ScriptedAI if (!m_pInstance) return; - if (Creature* pKalec = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(NPC_KALECGOS_HUMAN))) + if (Creature* pKalec = m_pInstance->GetSingleCreatureFromStorage(NPC_KALECGOS_HUMAN)) { m_creature->AddThreat(pKalec, 10000000.0f); pKalec->AddThreat(m_creature, 10000000.0f); @@ -400,7 +400,7 @@ struct MANGOS_DLL_DECL boss_sathrovarrAI : public ScriptedAI m_pInstance->SetData(DATA_SET_SPECTRAL_CHECK, 5000); - if (Creature* pKalecgos = m_pInstance->instance->GetCreature(m_pInstance->GetData64(NPC_KALECGOS_DRAGON))) + if (Creature* pKalecgos = m_pInstance->GetSingleCreatureFromStorage(NPC_KALECGOS_DRAGON)) { if (boss_kalecgosAI* pKalecgosAI = dynamic_cast(pKalecgos->AI())) { @@ -423,7 +423,7 @@ struct MANGOS_DLL_DECL boss_sathrovarrAI : public ScriptedAI if (!m_bEnraged && m_creature->GetHealthPercent() < 10.0f) { - if (Creature* pKalecgos = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(NPC_KALECGOS_DRAGON))) + if (Creature* pKalecgos = m_pInstance->GetSingleCreatureFromStorage(NPC_KALECGOS_DRAGON)) { if (pKalecgos->isAlive()) pKalecgos->CastSpell(pKalecgos, SPELL_CRAZED_RAGE, true); diff --git a/scripts/eastern_kingdoms/sunwell_plateau/instance_sunwell_plateau.cpp b/scripts/eastern_kingdoms/sunwell_plateau/instance_sunwell_plateau.cpp index 04174a6c0..d73527825 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/instance_sunwell_plateau.cpp +++ b/scripts/eastern_kingdoms/sunwell_plateau/instance_sunwell_plateau.cpp @@ -34,31 +34,6 @@ EndScriptData */ */ instance_sunwell_plateau::instance_sunwell_plateau(Map* pMap) : ScriptedInstance(pMap), - // Creatures - m_uiKalecgos_DragonGUID(0), - m_uiKalecgos_HumanGUID(0), - m_uiSathrovarrGUID(0), - m_uiBrutallusGUID(0), - m_uiFelmystGUID(0), - m_uiAlythessGUID(0), - m_uiSacrolashGUID(0), - m_uiMuruGUID(0), - m_uiKilJaedenGUID(0), - m_uiKilJaedenControllerGUID(0), - m_uiAnveenaGUID(0), - m_uiKalecgosGUID(0), - // GameObjects - m_uiForceFieldGUID(0), - m_uiBossCollision1GUID(0), - m_uiBossCollision2GUID(0), - m_uiIceBarrierGUID(0), - m_uiDoorFireBarrierGUID(0), - m_uiDoorTheFirstGateGUID(0), - m_uiDoorTheSecondGateGUID(0), - m_uiDoorMuruEnterGateGUID(0), - m_uiDoorMuruExitGateGUID(0), - m_uiDoorTheThirdGateGUID(0), - // Misc m_uiSpectralRealmTimer(5000) { Initialize(); @@ -84,18 +59,13 @@ void instance_sunwell_plateau::OnCreatureCreate(Creature* pCreature) { switch(pCreature->GetEntry()) { - case NPC_KALECGOS_DRAGON: m_uiKalecgos_DragonGUID = pCreature->GetGUID(); break; - case NPC_KALECGOS_HUMAN: m_uiKalecgos_HumanGUID = pCreature->GetGUID(); break; - case NPC_SATHROVARR: m_uiSathrovarrGUID = pCreature->GetGUID(); break; - case NPC_BRUTALLUS: m_uiBrutallusGUID = pCreature->GetGUID(); break; - case NPC_FELMYST: m_uiFelmystGUID = pCreature->GetGUID(); break; - case NPC_ALYTHESS: m_uiAlythessGUID = pCreature->GetGUID(); break; - case NPC_SACROLASH: m_uiSacrolashGUID = pCreature->GetGUID(); break; - case NPC_MURU: m_uiMuruGUID = pCreature->GetGUID(); break; - case NPC_KILJAEDEN: m_uiKilJaedenGUID = pCreature->GetGUID(); break; - case NPC_KILJAEDEN_CONTROLLER: m_uiKilJaedenControllerGUID = pCreature->GetGUID(); break; - case NPC_ANVEENA: m_uiAnveenaGUID = pCreature->GetGUID(); break; - case NPC_KALECGOS: m_uiKalecgosGUID = pCreature->GetGUID(); break; + case NPC_KALECGOS_DRAGON: + case NPC_KALECGOS_HUMAN: + case NPC_SATHROVARR: + case NPC_ALYTHESS: + case NPC_SACROLASH: + m_mNpcEntryGuidStore[pCreature->GetEntry()] = pCreature->GetObjectGuid(); + break; } } @@ -104,46 +74,37 @@ void instance_sunwell_plateau::OnObjectCreate(GameObject* pGo) switch(pGo->GetEntry()) { case GO_FORCEFIELD: - m_uiForceFieldGUID = pGo->GetGUID(); - break; case GO_BOSS_COLLISION_1: - m_uiBossCollision1GUID = pGo->GetGUID(); - break; case GO_BOSS_COLLISION_2: - m_uiBossCollision2GUID = pGo->GetGUID(); - break; case GO_ICE_BARRIER: - m_uiIceBarrierGUID = pGo->GetGUID(); break; case GO_FIRE_BARRIER: - m_uiDoorFireBarrierGUID = pGo->GetGUID(); if (m_auiEncounter[TYPE_KALECGOS] == DONE && m_auiEncounter[TYPE_BRUTALLUS] == DONE && m_auiEncounter[TYPE_FELMYST] == DONE) pGo->SetGoState(GO_STATE_ACTIVE); break; case GO_FIRST_GATE: - m_uiDoorTheFirstGateGUID = pGo->GetGUID(); break; case GO_SECOND_GATE: - m_uiDoorTheSecondGateGUID = pGo->GetGUID(); if (m_auiEncounter[TYPE_EREDAR_TWINS] == DONE) pGo->SetGoState(GO_STATE_ACTIVE); break; case GO_MURU_ENTER_GATE: - m_uiDoorMuruEnterGateGUID = pGo->GetGUID(); if (m_auiEncounter[TYPE_EREDAR_TWINS] == DONE) pGo->SetGoState(GO_STATE_ACTIVE); break; case GO_MURU_EXIT_GATE: - m_uiDoorMuruExitGateGUID = pGo->GetGUID(); if (m_auiEncounter[TYPE_MURU] == DONE) pGo->SetGoState(GO_STATE_ACTIVE); break; case GO_THIRD_GATE: - m_uiDoorTheThirdGateGUID = pGo->GetGUID(); if (m_auiEncounter[TYPE_MURU] == DONE) pGo->SetGoState(GO_STATE_ACTIVE); break; + + default: + return; } + m_mGoEntryGuidStore[pGo->GetEntry()] = pGo->GetObjectGuid(); } void instance_sunwell_plateau::SetData(uint32 uiType, uint32 uiData) @@ -153,38 +114,38 @@ void instance_sunwell_plateau::SetData(uint32 uiType, uint32 uiData) case TYPE_KALECGOS: m_auiEncounter[uiType] = uiData; // combat doors - DoUseDoorOrButton(m_uiForceFieldGUID); - DoUseDoorOrButton(m_uiBossCollision1GUID); - DoUseDoorOrButton(m_uiBossCollision2GUID); + DoUseDoorOrButton(GO_FORCEFIELD); + DoUseDoorOrButton(GO_BOSS_COLLISION_1); + DoUseDoorOrButton(GO_BOSS_COLLISION_2); if (uiData == IN_PROGRESS) SpectralRealmList.clear(); break; case TYPE_BRUTALLUS: m_auiEncounter[uiType] = uiData; if (uiData == SPECIAL) - DoUseDoorOrButton(m_uiIceBarrierGUID,MINUTE); + DoUseDoorOrButton(GO_ICE_BARRIER, MINUTE); break; case TYPE_FELMYST: m_auiEncounter[uiType] = uiData; if (uiData == DONE) - DoUseDoorOrButton(m_uiDoorFireBarrierGUID); + DoUseDoorOrButton(GO_FIRE_BARRIER); break; case TYPE_EREDAR_TWINS: m_auiEncounter[uiType] = uiData; if (uiData == DONE) { - DoUseDoorOrButton(m_uiDoorTheSecondGateGUID); - DoUseDoorOrButton(m_uiDoorMuruEnterGateGUID); + DoUseDoorOrButton(GO_SECOND_GATE); + DoUseDoorOrButton(GO_MURU_ENTER_GATE); } break; case TYPE_MURU: m_auiEncounter[uiType] = uiData; // combat door - DoUseDoorOrButton(m_uiDoorMuruEnterGateGUID); + DoUseDoorOrButton(GO_MURU_ENTER_GATE); if (uiData == DONE) { - DoUseDoorOrButton(m_uiDoorMuruExitGateGUID); - DoUseDoorOrButton(m_uiDoorTheThirdGateGUID); + DoUseDoorOrButton(GO_MURU_EXIT_GATE); + DoUseDoorOrButton(GO_THIRD_GATE); } break; case TYPE_KILJAEDEN: @@ -203,7 +164,7 @@ void instance_sunwell_plateau::SetData(uint32 uiType, uint32 uiData) saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2] << " " << m_auiEncounter[3] << " " << m_auiEncounter[4] << " " << m_auiEncounter[5]; - strInstData = saveStream.str(); + m_strInstData = saveStream.str(); SaveToDB(); OUT_SAVE_INST_DATA_COMPLETE; @@ -224,34 +185,12 @@ uint32 instance_sunwell_plateau::GetData(uint32 uiType) return 0; } -uint64 instance_sunwell_plateau::GetData64(uint32 uiType) -{ - switch(uiType) - { - case NPC_KALECGOS_DRAGON: return m_uiKalecgos_DragonGUID; - case NPC_KALECGOS_HUMAN: return m_uiKalecgos_HumanGUID; - case NPC_SATHROVARR: return m_uiSathrovarrGUID; - case NPC_BRUTALLUS: return m_uiBrutallusGUID; - case NPC_FELMYST: return m_uiFelmystGUID; - case NPC_ALYTHESS: return m_uiAlythessGUID; - case NPC_SACROLASH: return m_uiSacrolashGUID; - case NPC_MURU: return m_uiMuruGUID; - case NPC_KILJAEDEN: return m_uiKilJaedenGUID; - case NPC_KILJAEDEN_CONTROLLER: return m_uiKilJaedenControllerGUID; - case NPC_ANVEENA: return m_uiAnveenaGUID; - case NPC_KALECGOS: return m_uiKalecgosGUID; - case GO_FORCEFIELD: return m_uiForceFieldGUID; - } - - return 0; -} - void instance_sunwell_plateau::EjectPlayer(Player* pPlayer) { debug_log("SD2: Ejecting Player %s from Spectral Realm", pPlayer->GetName()); // Put player back in Kalecgos(Dragon)'s threat list - /*if (Creature* pKalecgos = instance->GetCreature(m_uiKalecgos_DragonGUID)) + /*if (Creature* pKalecgos = GetSingleCreatureFromStorage(NPC_KALECGOS_DRAGON)) { if (pKalecgos->isAlive()) { @@ -261,7 +200,7 @@ void instance_sunwell_plateau::EjectPlayer(Player* pPlayer) } // Remove player from Sathrovarr's threat list - if (Creature* pSath = instance->GetCreature(m_uiSathrovarrGUID)) + if (Creature* pSath = instance->GetCreature(NPC_SATHROVARR)) { if (pSath->isAlive()) { diff --git a/scripts/eastern_kingdoms/sunwell_plateau/sunwell_plateau.h b/scripts/eastern_kingdoms/sunwell_plateau/sunwell_plateau.h index 680eae902..6b6c98af6 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/sunwell_plateau.h +++ b/scripts/eastern_kingdoms/sunwell_plateau/sunwell_plateau.h @@ -22,15 +22,15 @@ enum NPC_KALECGOS_DRAGON = 24850, // kalecgos blue dragon hostile NPC_KALECGOS_HUMAN = 24891, // kalecgos human form in spectral realm NPC_SATHROVARR = 24892, - NPC_BRUTALLUS = 24882, - NPC_FELMYST = 25038, + // NPC_BRUTALLUS = 24882, + // NPC_FELMYST = 25038, NPC_ALYTHESS = 25166, NPC_SACROLASH = 25165, - NPC_MURU = 25741, - NPC_KILJAEDEN = 25315, - NPC_KILJAEDEN_CONTROLLER = 25608, // kiljaeden event controller - NPC_ANVEENA = 26046, // related to kiljaeden event - NPC_KALECGOS = 25319, // related to kiljaeden event + // NPC_MURU = 25741, + // NPC_KILJAEDEN = 25315, + // NPC_KILJAEDEN_CONTROLLER = 25608, // kiljaeden event controller + // NPC_ANVEENA = 26046, // related to kiljaeden event + // NPC_KALECGOS = 25319, // related to kiljaeden event GO_FORCEFIELD = 188421, // kalecgos door + collisions GO_BOSS_COLLISION_1 = 188523, @@ -66,11 +66,10 @@ class MANGOS_DLL_DECL instance_sunwell_plateau : public ScriptedInstance void SetData(uint32 uiType, uint32 uiData); void SetData64(uint32 uiType, uint64 uiData); uint32 GetData(uint32 uiType); - uint64 GetData64(uint32 uiType); void Update(uint32 uiDiff); - const char* Save() { return strInstData.c_str(); } + const char* Save() { return m_strInstData.c_str(); } void Load(const char* chrIn); protected: @@ -78,33 +77,7 @@ class MANGOS_DLL_DECL instance_sunwell_plateau : public ScriptedInstance void EjectPlayers(); uint32 m_auiEncounter[MAX_ENCOUNTER]; - std::string strInstData; - - // Creatures - uint64 m_uiKalecgos_DragonGUID; - uint64 m_uiKalecgos_HumanGUID; - uint64 m_uiSathrovarrGUID; - uint64 m_uiBrutallusGUID; - uint64 m_uiFelmystGUID; - uint64 m_uiAlythessGUID; - uint64 m_uiSacrolashGUID; - uint64 m_uiMuruGUID; - uint64 m_uiKilJaedenGUID; - uint64 m_uiKilJaedenControllerGUID; - uint64 m_uiAnveenaGUID; - uint64 m_uiKalecgosGUID; - - // GameObjects - uint64 m_uiForceFieldGUID; - uint64 m_uiBossCollision1GUID; - uint64 m_uiBossCollision2GUID; - uint64 m_uiIceBarrierGUID; - uint64 m_uiDoorFireBarrierGUID; - uint64 m_uiDoorTheFirstGateGUID; - uint64 m_uiDoorTheSecondGateGUID; - uint64 m_uiDoorMuruEnterGateGUID; - uint64 m_uiDoorMuruExitGateGUID; - uint64 m_uiDoorTheThirdGateGUID; + std::string m_strInstData; // Misc uint32 m_uiSpectralRealmTimer; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index fcca83b23..32a3471aa 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2172" + #define SD2_REVISION_NR "2173" #endif // __SD2_REVISION_NR_H__ From 50dd49887247fb6b2e840af3c9fdd270c7446a0a Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Fri, 3 Jun 2011 22:35:45 +0200 Subject: [PATCH 0154/1172] [2174] Use EntryGuidMap-Storage in Uldaman --- .../uldaman/boss_archaedas.cpp | 2 +- .../uldaman/instance_uldaman.cpp | 35 ++++++++----------- scripts/eastern_kingdoms/uldaman/uldaman.h | 11 +++--- sd2_revision_nr.h | 2 +- 4 files changed, 20 insertions(+), 30 deletions(-) diff --git a/scripts/eastern_kingdoms/uldaman/boss_archaedas.cpp b/scripts/eastern_kingdoms/uldaman/boss_archaedas.cpp index 7e2f9cf26..dd802b78f 100644 --- a/scripts/eastern_kingdoms/uldaman/boss_archaedas.cpp +++ b/scripts/eastern_kingdoms/uldaman/boss_archaedas.cpp @@ -132,7 +132,7 @@ struct MANGOS_DLL_DECL boss_archaedasAI : public ScriptedAI m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); break; case 2: - if (Player* pPlayer = m_creature->GetMap()->GetPlayer(m_pInstance->GetData64(DATA_EVENT_STARTER))) + if (Player* pPlayer = m_creature->GetMap()->GetPlayer(m_pInstance->GetGuid(DATA_EVENT_STARTER))) AttackStart(pPlayer); else EnterEvadeMode(); diff --git a/scripts/eastern_kingdoms/uldaman/instance_uldaman.cpp b/scripts/eastern_kingdoms/uldaman/instance_uldaman.cpp index 11d73dbc0..5ea1fa819 100644 --- a/scripts/eastern_kingdoms/uldaman/instance_uldaman.cpp +++ b/scripts/eastern_kingdoms/uldaman/instance_uldaman.cpp @@ -26,10 +26,6 @@ EndScriptData #include "uldaman.h" instance_uldaman::instance_uldaman(Map* pMap) : ScriptedInstance(pMap), - m_uiTempleDoorUpperGUID(0), - m_uiTempleDoorLowerGUID(0), - m_uiAncientVaultGUID(0), - m_uiPlayerGUID(0), m_uiStoneKeepersFallen(0), m_uiKeeperCooldown(5000) { @@ -39,8 +35,6 @@ instance_uldaman::instance_uldaman(Map* pMap) : ScriptedInstance(pMap), void instance_uldaman::Initialize() { memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); - m_lWardens.clear(); - m_mKeeperMap.clear(); } void instance_uldaman::OnObjectCreate(GameObject* pGo) @@ -50,21 +44,19 @@ void instance_uldaman::OnObjectCreate(GameObject* pGo) case GO_TEMPLE_DOOR_UPPER: if (m_auiEncounter[0] == DONE) pGo->SetGoState(GO_STATE_ACTIVE); - m_uiTempleDoorUpperGUID = pGo->GetGUID(); break; case GO_TEMPLE_DOOR_LOWER: if (m_auiEncounter[0] == DONE) pGo->SetGoState(GO_STATE_ACTIVE); - m_uiTempleDoorLowerGUID = pGo->GetGUID(); break; case GO_ANCIENT_VAULT: if (m_auiEncounter[1] == DONE) pGo->SetGoState(GO_STATE_ACTIVE); - m_uiAncientVaultGUID = pGo->GetGUID(); break; default: - break; + return; } + m_mGoEntryGuidStore[pGo->GetEntry()] = pGo->GetObjectGuid(); } void instance_uldaman::OnCreatureCreate(Creature* pCreature) @@ -80,7 +72,8 @@ void instance_uldaman::OnCreatureCreate(Creature* pCreature) pCreature->SetNoCallAssistance(true); // no assistance break; case NPC_STONE_KEEPER: - m_mKeeperMap[pCreature->GetGUID()] = pCreature->isAlive(); + // FIXME - This isAlive check is currently useless + m_mKeeperMap[pCreature->GetObjectGuid()] = pCreature->isAlive(); pCreature->CastSpell(pCreature, SPELL_STONED, true); pCreature->SetNoCallAssistance(true); // no assistance break; @@ -96,8 +89,8 @@ void instance_uldaman::SetData(uint32 uiType, uint32 uiData) case TYPE_ALTAR_EVENT: if (uiData == DONE) { - DoUseDoorOrButton(m_uiTempleDoorUpperGUID); - DoUseDoorOrButton(m_uiTempleDoorLowerGUID); + DoUseDoorOrButton(GO_TEMPLE_DOOR_UPPER); + DoUseDoorOrButton(GO_TEMPLE_DOOR_LOWER); m_auiEncounter[0] = uiData; } @@ -124,7 +117,7 @@ void instance_uldaman::SetData(uint32 uiType, uint32 uiData) if (pWarden && pWarden->isAlive()) pWarden->ForcedDespawn(); } - DoUseDoorOrButton(m_uiAncientVaultGUID); + DoUseDoorOrButton(GO_ANCIENT_VAULT); } m_auiEncounter[1] = uiData; break; @@ -138,7 +131,7 @@ void instance_uldaman::SetData(uint32 uiType, uint32 uiData) saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1]; - strInstData = saveStream.str(); + m_strInstData = saveStream.str(); SaveToDB(); OUT_SAVE_INST_DATA_COMPLETE; } @@ -171,7 +164,7 @@ void instance_uldaman::SetData64(uint32 uiData, uint64 uiGuid) switch(uiData) { case DATA_EVENT_STARTER: - m_uiPlayerGUID = uiGuid; + m_playerGuid = ObjectGuid(uiGuid); break; } } @@ -191,14 +184,14 @@ uint64 instance_uldaman::GetData64(uint32 uiData) switch(uiData) { case DATA_EVENT_STARTER: - return m_uiPlayerGUID; + return m_playerGuid.GetRawValue(); } return 0; } void instance_uldaman::StartEvent(uint32 uiEventId, Player* pPlayer) { - m_uiPlayerGUID = pPlayer->GetGUID(); + m_playerGuid = pPlayer->GetObjectGuid(); if (uiEventId == EVENT_ID_ALTAR_KEEPER) { @@ -214,7 +207,7 @@ void instance_uldaman::DoResetKeeperEvent() m_auiEncounter[0] = NOT_STARTED; m_uiStoneKeepersFallen = 0; - for (std::map::iterator itr = m_mKeeperMap.begin(); itr != m_mKeeperMap.end(); ++itr) + for (std::map::iterator itr = m_mKeeperMap.begin(); itr != m_mKeeperMap.end(); ++itr) { if (Creature* pKeeper = instance->GetCreature(itr->first)) { @@ -276,7 +269,7 @@ void instance_uldaman::Update(uint32 uiDiff) if (!m_mKeeperMap.empty()) { - for(std::map::iterator itr = m_mKeeperMap.begin(); itr != m_mKeeperMap.end(); ++itr) + for(std::map::iterator itr = m_mKeeperMap.begin(); itr != m_mKeeperMap.end(); ++itr) { // died earlier if (!itr->second) @@ -286,7 +279,7 @@ void instance_uldaman::Update(uint32 uiDiff) { if (pKeeper->isAlive() && !pKeeper->getVictim()) { - if (Player* pPlayer = pKeeper->GetMap()->GetPlayer(m_uiPlayerGUID)) + if (Player* pPlayer = pKeeper->GetMap()->GetPlayer(m_playerGuid)) { // we should use group instead, event starter can be dead while group is still fighting if (pPlayer->isAlive() && !pPlayer->isInCombat()) diff --git a/scripts/eastern_kingdoms/uldaman/uldaman.h b/scripts/eastern_kingdoms/uldaman/uldaman.h index bc0546a44..bbfa19ab7 100644 --- a/scripts/eastern_kingdoms/uldaman/uldaman.h +++ b/scripts/eastern_kingdoms/uldaman/uldaman.h @@ -57,23 +57,20 @@ class MANGOS_DLL_DECL instance_uldaman : public ScriptedInstance Creature* GetClosestDwarfNotInCombat(Creature* pSearcher, uint32 uiPhase); - const char* Save() { return strInstData.c_str(); } + const char* Save() { return m_strInstData.c_str(); } void Load(const char* chrIn); protected: uint32 m_auiEncounter[MAX_ENCOUNTER]; - std::string strInstData; + std::string m_strInstData; - uint64 m_uiTempleDoorUpperGUID; - uint64 m_uiTempleDoorLowerGUID; - uint64 m_uiAncientVaultGUID; - uint64 m_uiPlayerGUID; + ObjectGuid m_playerGuid; uint32 m_uiKeeperCooldown; uint32 m_uiStoneKeepersFallen; GUIDList m_lWardens; - std::map m_mKeeperMap; + std::map m_mKeeperMap; }; #endif diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 32a3471aa..f8273abaa 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2173" + #define SD2_REVISION_NR "2174" #endif // __SD2_REVISION_NR_H__ From 41ba804af2a184eacb96946570ea7562b72740e2 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Fri, 3 Jun 2011 22:54:34 +0200 Subject: [PATCH 0155/1172] [2175] Use EntryGuidMap-Storage in Zul'Aman, fix Zone yells --- .../eastern_kingdoms/zulaman/boss_akilzon.cpp | 2 +- .../eastern_kingdoms/zulaman/boss_halazzi.cpp | 6 +- .../zulaman/boss_malacrass.cpp | 4 +- .../zulaman/instance_zulaman.cpp | 108 +++++------------- scripts/eastern_kingdoms/zulaman/zulaman.cpp | 4 +- scripts/eastern_kingdoms/zulaman/zulaman.h | 25 +--- sd2_revision_nr.h | 2 +- 7 files changed, 41 insertions(+), 110 deletions(-) diff --git a/scripts/eastern_kingdoms/zulaman/boss_akilzon.cpp b/scripts/eastern_kingdoms/zulaman/boss_akilzon.cpp index 16dbe784c..6c3f0023c 100644 --- a/scripts/eastern_kingdoms/zulaman/boss_akilzon.cpp +++ b/scripts/eastern_kingdoms/zulaman/boss_akilzon.cpp @@ -252,7 +252,7 @@ struct MANGOS_DLL_DECL mob_soaring_eagleAI : public ScriptedAI if (!m_pInstance) return; - if (Creature* pAzkil = m_pInstance->instance->GetCreature(m_pInstance->GetData64(NPC_AKILZON))) + if (Creature* pAzkil = m_pInstance->GetSingleCreatureFromStorage(NPC_AKILZON)) { float fX, fY, fZ; pAzkil->GetRandomPoint(pAzkil->GetPositionX(), pAzkil->GetPositionY(), pAzkil->GetPositionZ()+15.0f, 30.0f, fX, fY, fZ); diff --git a/scripts/eastern_kingdoms/zulaman/boss_halazzi.cpp b/scripts/eastern_kingdoms/zulaman/boss_halazzi.cpp index 318bd0962..837334ec7 100644 --- a/scripts/eastern_kingdoms/zulaman/boss_halazzi.cpp +++ b/scripts/eastern_kingdoms/zulaman/boss_halazzi.cpp @@ -107,7 +107,7 @@ struct MANGOS_DLL_DECL boss_halazziAI : public ScriptedAI if (m_pInstance) { - if (Creature* pSpiritLynx = m_pInstance->instance->GetCreature(m_pInstance->GetData64(NPC_SPIRIT_LYNX))) + if (Creature* pSpiritLynx = m_pInstance->GetSingleCreatureFromStorage(NPC_SPIRIT_LYNX)) pSpiritLynx->ForcedDespawn(); } } @@ -197,7 +197,7 @@ struct MANGOS_DLL_DECL boss_halazziAI : public ScriptedAI } else { - Creature* pSpiritLynx = m_pInstance->instance->GetCreature(m_pInstance->GetData64(NPC_SPIRIT_LYNX)); + Creature* pSpiritLynx = m_pInstance->GetSingleCreatureFromStorage(NPC_SPIRIT_LYNX); if (m_creature->GetHealthPercent() < 10.0f || (pSpiritLynx && pSpiritLynx->GetHealthPercent() < 10.0f)) @@ -349,7 +349,7 @@ struct MANGOS_DLL_DECL boss_spirit_lynxAI : public ScriptedAI if (!m_pInstance) return; - if (Creature* pHalazzi = m_pInstance->instance->GetCreature(m_pInstance->GetData64(NPC_HALAZZI))) + if (Creature* pHalazzi = m_pInstance->GetSingleCreatureFromStorage(NPC_HALAZZI)) pHalazzi->AI()->KilledUnit(pVictim); } diff --git a/scripts/eastern_kingdoms/zulaman/boss_malacrass.cpp b/scripts/eastern_kingdoms/zulaman/boss_malacrass.cpp index 6657b36d6..bca4b23a7 100644 --- a/scripts/eastern_kingdoms/zulaman/boss_malacrass.cpp +++ b/scripts/eastern_kingdoms/zulaman/boss_malacrass.cpp @@ -299,7 +299,7 @@ struct MANGOS_DLL_DECL boss_malacrass_addAI : public ScriptedAI if (!m_pInstance) return; - if (Creature* pMalacrass = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(NPC_MALACRASS))) + if (Creature* pMalacrass = m_pInstance->GetSingleCreatureFromStorage(NPC_MALACRASS)) pMalacrass->AI()->KilledUnit(pVictim); } @@ -308,7 +308,7 @@ struct MANGOS_DLL_DECL boss_malacrass_addAI : public ScriptedAI if (!m_pInstance) return; - if (Creature* pMalacrass = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(NPC_MALACRASS))) + if (Creature* pMalacrass = m_pInstance->GetSingleCreatureFromStorage(NPC_MALACRASS)) { switch(urand(0, 2)) { diff --git a/scripts/eastern_kingdoms/zulaman/instance_zulaman.cpp b/scripts/eastern_kingdoms/zulaman/instance_zulaman.cpp index 0e3c7c7ad..bed14fe6a 100644 --- a/scripts/eastern_kingdoms/zulaman/instance_zulaman.cpp +++ b/scripts/eastern_kingdoms/zulaman/instance_zulaman.cpp @@ -28,24 +28,6 @@ instance_zulaman::instance_zulaman(Map* pMap) : ScriptedInstance(pMap), m_uiEventTimer(MINUTE*IN_MILLISECONDS), m_uiGongCount(0), - m_uiAkilzonGUID(0), - m_uiNalorakkGUID(0), - m_uiJanalaiGUID(0), - m_uiHalazziGUID(0), - m_uiSpiritLynxGUID(0), - m_uiZuljinGUID(0), - m_uiMalacrassGUID(0), - m_uiHarrisonGUID(0), - - m_uiStrangeGongGUID(0), - m_uiMassiveGateGUID(0), - m_uiWindDoorGUID(0), - m_uiLynxTempleEntranceGUID(0), - m_uiLynxTempleExitGUID(0), - m_uiMalacrassEntranceGUID(0), - m_uiWoodenDoorGUID(0), - m_uiFireDoorGUID(0), - m_uiEggsRemainingCount_Left(20), m_uiEggsRemainingCount_Right(20) { @@ -74,14 +56,13 @@ void instance_zulaman::OnCreatureCreate(Creature* pCreature) { switch(pCreature->GetEntry()) { - case NPC_AKILZON: m_uiAkilzonGUID = pCreature->GetGUID(); break; - case NPC_NALORAKK: m_uiNalorakkGUID = pCreature->GetGUID(); break; - case NPC_JANALAI: m_uiJanalaiGUID = pCreature->GetGUID(); break; - case NPC_HALAZZI: m_uiHalazziGUID = pCreature->GetGUID(); break; - case NPC_MALACRASS: m_uiMalacrassGUID = pCreature->GetGUID(); break; - case NPC_ZULJIN: m_uiZuljinGUID = pCreature->GetGUID(); break; - case NPC_HARRISON: m_uiHarrisonGUID = pCreature->GetGUID(); break; - case NPC_SPIRIT_LYNX: m_uiSpiritLynxGUID = pCreature->GetGUID(); break; + case NPC_AKILZON: + case NPC_HALAZZI: + case NPC_MALACRASS: + case NPC_HARRISON: + case NPC_SPIRIT_LYNX: + m_mNpcEntryGuidStore[pCreature->GetEntry()] = pCreature->GetObjectGuid(); + break; case NPC_TANZAR: m_aEventNpcInfo[INDEX_NALORAKK].npGuid = pCreature->GetObjectGuid(); break; case NPC_KRAZ: m_aEventNpcInfo[INDEX_JANALAI].npGuid = pCreature->GetObjectGuid(); break; @@ -100,38 +81,34 @@ void instance_zulaman::OnObjectCreate(GameObject* pGo) switch(pGo->GetEntry()) { case GO_STRANGE_GONG: - m_uiStrangeGongGUID = pGo->GetGUID(); break; case GO_MASSIVE_GATE: - m_uiMassiveGateGUID = pGo->GetGUID(); if (m_auiEncounter[0] == DONE || m_auiEncounter[0] == FAIL) pGo->SetGoState(GO_STATE_ACTIVE); break; case GO_WIND_DOOR: - m_uiWindDoorGUID = pGo->GetGUID(); break; case GO_LYNX_TEMPLE_ENTRANCE: - m_uiLynxTempleEntranceGUID = pGo->GetGUID(); break; case GO_LYNX_TEMPLE_EXIT: - m_uiLynxTempleExitGUID = pGo->GetGUID(); if (m_auiEncounter[4] == DONE) pGo->SetGoState(GO_STATE_ACTIVE); break; case GO_HEXLORD_ENTRANCE: - m_uiMalacrassEntranceGUID = pGo->GetGUID(); if (GetKilledPreBosses() == 4) pGo->SetGoState(GO_STATE_ACTIVE); break; case GO_WOODEN_DOOR: - m_uiWoodenDoorGUID = pGo->GetGUID(); if (m_auiEncounter[5] == DONE) pGo->SetGoState(GO_STATE_ACTIVE); break; case GO_FIRE_DOOR: - m_uiFireDoorGUID = pGo->GetGUID(); break; + + default: + return; } + m_mGoEntryGuidStore[pGo->GetEntry()] = pGo->GetObjectGuid(); } void instance_zulaman::SetData(uint32 uiType, uint32 uiData) @@ -151,7 +128,7 @@ void instance_zulaman::SetData(uint32 uiType, uint32 uiData) if (uiData == IN_PROGRESS) { DoTimeRunSay(RUN_START); - DoUseDoorOrButton(m_uiMassiveGateGUID); + DoUseDoorOrButton(GO_MASSIVE_GATE); if (m_auiEncounter[7]) SetData(TYPE_RUN_EVENT_TIME, m_auiEncounter[7]); else @@ -181,7 +158,7 @@ void instance_zulaman::SetData(uint32 uiType, uint32 uiData) m_auiEncounter[0] = uiData; break; case TYPE_AKILZON: - DoUseDoorOrButton(m_uiWindDoorGUID); + DoUseDoorOrButton(GO_WIND_DOOR); if (uiData == DONE) { if (m_auiEncounter[0] == IN_PROGRESS) @@ -233,23 +210,23 @@ void instance_zulaman::SetData(uint32 uiType, uint32 uiData) m_auiEncounter[3] = uiData; break; case TYPE_HALAZZI: - DoUseDoorOrButton(m_uiLynxTempleEntranceGUID); + DoUseDoorOrButton(GO_LYNX_TEMPLE_ENTRANCE); if (uiData == DONE) { - DoUseDoorOrButton(m_uiLynxTempleExitGUID); + DoUseDoorOrButton(GO_LYNX_TEMPLE_EXIT); if (m_auiEncounter[0] == IN_PROGRESS) DoChestEvent(INDEX_HALAZZI); } m_auiEncounter[4] = uiData; break; case TYPE_MALACRASS: - DoUseDoorOrButton(m_uiMalacrassEntranceGUID); + DoUseDoorOrButton(GO_HEXLORD_ENTRANCE); if (uiData == DONE) - DoUseDoorOrButton(m_uiWoodenDoorGUID); + DoUseDoorOrButton(GO_WOODEN_DOOR); m_auiEncounter[5] = uiData; break; case TYPE_ZULJIN: - DoUseDoorOrButton(m_uiFireDoorGUID); + DoUseDoorOrButton(GO_FIRE_DOOR); m_auiEncounter[6] = uiData; break; case TYPE_J_EGGS_RIGHT: @@ -277,7 +254,7 @@ void instance_zulaman::SetData(uint32 uiType, uint32 uiData) if (uiData == DONE && GetKilledPreBosses() == 4 && (uiType == TYPE_AKILZON || uiType == TYPE_NALORAKK || uiType == TYPE_JANALAI || uiType == TYPE_HALAZZI)) { - DoUseDoorOrButton(m_uiMalacrassEntranceGUID); + DoUseDoorOrButton(GO_HEXLORD_ENTRANCE); if (m_auiEncounter[0] == IN_PROGRESS) SetData(TYPE_EVENT_RUN, DONE); } @@ -347,28 +324,6 @@ uint32 instance_zulaman::GetData(uint32 uiType) } } -uint64 instance_zulaman::GetData64(uint32 uiData) -{ - switch(uiData) - { - case NPC_AKILZON: return m_uiAkilzonGUID; - case NPC_NALORAKK: return m_uiNalorakkGUID; - case NPC_JANALAI: return m_uiJanalaiGUID; - case NPC_HALAZZI: return m_uiHalazziGUID; - case NPC_SPIRIT_LYNX: return m_uiSpiritLynxGUID; - case NPC_ZULJIN: return m_uiZuljinGUID; - case NPC_MALACRASS: return m_uiMalacrassGUID; - case NPC_HARRISON: return m_uiHarrisonGUID; - - case GO_STRANGE_GONG: return m_uiStrangeGongGUID; - case GO_MASSIVE_GATE: return m_uiMassiveGateGUID; - case GO_HEXLORD_ENTRANCE: return m_uiMalacrassEntranceGUID; - - default: - return 0; - } -} - uint8 instance_zulaman::GetKilledPreBosses() { return (GetData(TYPE_AKILZON) == DONE ? 1 : 0) + (GetData(TYPE_NALORAKK) == DONE ? 1 : 0) + (GetData(TYPE_JANALAI) == DONE ? 1 : 0) + (GetData(TYPE_HALAZZI) == DONE ? 1 : 0); @@ -376,32 +331,27 @@ uint8 instance_zulaman::GetKilledPreBosses() void instance_zulaman::DoTimeRunSay(RunEventSteps uiData) { - // TODO - This yell must be made independend of load state of Malacrass - Creature* pHexlord = instance->GetCreature(m_uiMalacrassGUID); - if (!pHexlord) - return; - switch (uiData) { - case RUN_START: DoScriptText(SAY_INST_BEGIN, pHexlord); break; - case RUN_FAIL: DoScriptText(urand(0, 1) ? SAY_INST_SACRIF1 : SAY_INST_SACRIF2, pHexlord); break; - case RUN_DONE: DoScriptText(SAY_INST_COMPLETE, pHexlord); break; + case RUN_START: DoOrSimulateScriptTextForThisInstance(SAY_INST_BEGIN, NPC_MALACRASS); break; + case RUN_FAIL: DoOrSimulateScriptTextForThisInstance(urand(0, 1) ? SAY_INST_SACRIF1 : SAY_INST_SACRIF2, NPC_MALACRASS); break; + case RUN_DONE: DoOrSimulateScriptTextForThisInstance(SAY_INST_COMPLETE, NPC_MALACRASS); break; case RUN_PROGRESS: // This function is on progress called before the data is set to the array switch (GetKilledPreBosses() + 1) { - case 1: DoScriptText(SAY_INST_PROGRESS_1, pHexlord); break; - case 2: DoScriptText(SAY_INST_PROGRESS_2, pHexlord); break; - case 3: DoScriptText(SAY_INST_PROGRESS_3, pHexlord); break; + case 1: DoOrSimulateScriptTextForThisInstance(SAY_INST_PROGRESS_1, NPC_MALACRASS); break; + case 2: DoOrSimulateScriptTextForThisInstance(SAY_INST_PROGRESS_2, NPC_MALACRASS); break; + case 3: DoOrSimulateScriptTextForThisInstance(SAY_INST_PROGRESS_3, NPC_MALACRASS); break; } break; case RUN_FAIL_SOON: switch (GetKilledPreBosses()) { - case 0: DoScriptText(SAY_INST_WARN_1, pHexlord); break; - case 1: DoScriptText(SAY_INST_WARN_2, pHexlord); break; - case 2: DoScriptText(SAY_INST_WARN_3, pHexlord); break; - case 3: DoScriptText(SAY_INST_WARN_4, pHexlord); break; + case 0: DoOrSimulateScriptTextForThisInstance(SAY_INST_WARN_1, NPC_MALACRASS); break; + case 1: DoOrSimulateScriptTextForThisInstance(SAY_INST_WARN_2, NPC_MALACRASS); break; + case 2: DoOrSimulateScriptTextForThisInstance(SAY_INST_WARN_3, NPC_MALACRASS); break; + case 3: DoOrSimulateScriptTextForThisInstance(SAY_INST_WARN_4, NPC_MALACRASS); break; } break; } diff --git a/scripts/eastern_kingdoms/zulaman/zulaman.cpp b/scripts/eastern_kingdoms/zulaman/zulaman.cpp index c72d9a9d5..f68007f6c 100644 --- a/scripts/eastern_kingdoms/zulaman/zulaman.cpp +++ b/scripts/eastern_kingdoms/zulaman/zulaman.cpp @@ -143,7 +143,7 @@ struct MANGOS_DLL_DECL npc_harrison_jones_zaAI : public npc_escortAI case 1: DoScriptText(SAY_AT_GONG, m_creature); - if (GameObject* pEntranceDoor = m_pInstance->instance->GetGameObject(m_pInstance->GetData64(GO_STRANGE_GONG))) + if (GameObject* pEntranceDoor = m_pInstance->GetSingleGameObjectFromStorage(GO_STRANGE_GONG)) pEntranceDoor->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NO_INTERACT); //Start bang gong for 2min @@ -223,7 +223,7 @@ bool GOUse_go_strange_gong(Player* pPlayer, GameObject* pGo) if (pInstance->GetData(TYPE_EVENT_RUN) == SPECIAL) { - if (Creature* pCreature = pGo->GetMap()->GetCreature(pInstance->GetData64(NPC_HARRISON))) + if (Creature* pCreature = pInstance->GetSingleCreatureFromStorage(NPC_HARRISON)) { if (npc_harrison_jones_zaAI* pHarrisonAI = dynamic_cast(pCreature->AI())) pHarrisonAI->SetHoldState(false); diff --git a/scripts/eastern_kingdoms/zulaman/zulaman.h b/scripts/eastern_kingdoms/zulaman/zulaman.h index 4da49c998..b4587492c 100644 --- a/scripts/eastern_kingdoms/zulaman/zulaman.h +++ b/scripts/eastern_kingdoms/zulaman/zulaman.h @@ -44,11 +44,11 @@ enum InstanceZA TYPE_J_EGGS_LEFT = 12, NPC_AKILZON = 23574, - NPC_NALORAKK = 23576, - NPC_JANALAI = 23578, + // NPC_NALORAKK = 23576, + // NPC_JANALAI = 23578, NPC_HALAZZI = 23577, NPC_MALACRASS = 24239, - NPC_ZULJIN = 23863, + // NPC_ZULJIN = 23863, NPC_EGG = 23817, NPC_SPIRIT_LYNX = 24143, @@ -119,7 +119,6 @@ class MANGOS_DLL_DECL instance_zulaman : public ScriptedInstance void SetData(uint32 uiType, uint32 uiData); uint32 GetData(uint32 uiType); - uint64 GetData64(uint32 uiData); const char* Save() { return m_strInstData.c_str(); } void Load(const char* chrIn); @@ -139,24 +138,6 @@ class MANGOS_DLL_DECL instance_zulaman : public ScriptedInstance uint32 m_uiEventTimer; uint32 m_uiGongCount; - uint64 m_uiAkilzonGUID; - uint64 m_uiNalorakkGUID; - uint64 m_uiJanalaiGUID; - uint64 m_uiHalazziGUID; - uint64 m_uiSpiritLynxGUID; - uint64 m_uiZuljinGUID; - uint64 m_uiMalacrassGUID; - uint64 m_uiHarrisonGUID; - - uint64 m_uiStrangeGongGUID; - uint64 m_uiMassiveGateGUID; - uint64 m_uiWindDoorGUID; - uint64 m_uiLynxTempleEntranceGUID; - uint64 m_uiLynxTempleExitGUID; - uint64 m_uiMalacrassEntranceGUID; - uint64 m_uiWoodenDoorGUID; - uint64 m_uiFireDoorGUID; - GUIDList m_lEggsGUIDList; uint32 m_uiEggsRemainingCount_Left; uint32 m_uiEggsRemainingCount_Right; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index f8273abaa..28ea7e8b2 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2174" + #define SD2_REVISION_NR "2175" #endif // __SD2_REVISION_NR_H__ From 6e36a5dc5ad310636114ea275808aa14131ccdaa Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Fri, 3 Jun 2011 23:02:28 +0200 Subject: [PATCH 0156/1172] [2176] Use EntryGuidMap-Storage in Zul'Gurub --- .../zulgurub/boss_mandokir.cpp | 2 +- .../eastern_kingdoms/zulgurub/boss_thekal.cpp | 12 ++--- .../zulgurub/instance_zulgurub.cpp | 45 +++---------------- scripts/eastern_kingdoms/zulgurub/zulgurub.h | 7 --- sd2_revision_nr.h | 2 +- 5 files changed, 14 insertions(+), 54 deletions(-) diff --git a/scripts/eastern_kingdoms/zulgurub/boss_mandokir.cpp b/scripts/eastern_kingdoms/zulgurub/boss_mandokir.cpp index a9cc124dc..4e0b44932 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_mandokir.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_mandokir.cpp @@ -167,7 +167,7 @@ struct MANGOS_DLL_DECL boss_mandokirAI : public ScriptedAI if (m_pInstance) { - if (Creature* pJindo = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(NPC_JINDO))) + if (Creature* pJindo = m_pInstance->GetSingleCreatureFromStorage(NPC_JINDO)) { if (pJindo->isAlive()) DoScriptText(SAY_GRATS_JINDO, pJindo); diff --git a/scripts/eastern_kingdoms/zulgurub/boss_thekal.cpp b/scripts/eastern_kingdoms/zulgurub/boss_thekal.cpp index bb1ab7e57..a41696ba3 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_thekal.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_thekal.cpp @@ -191,9 +191,9 @@ struct MANGOS_DLL_DECL boss_thekalAI : public boss_thekalBaseAI m_pInstance->SetData(TYPE_THEKAL, DONE); // remove the two adds - if (Creature* pZath = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(NPC_ZATH))) + if (Creature* pZath = m_pInstance->GetSingleCreatureFromStorage(NPC_ZATH)) pZath->ForcedDespawn(); - if (Creature* pLorkhan = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(NPC_LORKHAN))) + if (Creature* pLorkhan = m_pInstance->GetSingleCreatureFromStorage(NPC_LORKHAN)) pLorkhan->ForcedDespawn(); } @@ -211,12 +211,12 @@ struct MANGOS_DLL_DECL boss_thekalAI : public boss_thekalBaseAI return false; // Else Prevent them Resurrecting - if (Creature* pLorkhan = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(NPC_LORKHAN))) + if (Creature* pLorkhan = m_pInstance->GetSingleCreatureFromStorage(NPC_LORKHAN)) { if (boss_thekalBaseAI* pFakerAI = dynamic_cast(pLorkhan->AI())) pFakerAI->PreventRevive(); } - Creature* pZath = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(NPC_ZATH)); + if (Creature* pZath = m_pInstance->GetSingleCreatureFromStorage(NPC_ZATH)) { if (boss_thekalBaseAI* pFakerAI = dynamic_cast(pZath->AI())) pFakerAI->PreventRevive(); @@ -455,8 +455,8 @@ struct MANGOS_DLL_DECL mob_zealot_lorkhanAI : public boss_thekalBaseAI { if (m_pInstance) { - Creature* pThekal = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(NPC_THEKAL)); - Creature* pZath = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(NPC_ZATH)); + Creature* pThekal = m_pInstance->GetSingleCreatureFromStorage(NPC_THEKAL); + Creature* pZath = m_pInstance->GetSingleCreatureFromStorage(NPC_ZATH); switch(urand(0, 1)) { diff --git a/scripts/eastern_kingdoms/zulgurub/instance_zulgurub.cpp b/scripts/eastern_kingdoms/zulgurub/instance_zulgurub.cpp index a2b4b66e3..3d9e8b263 100644 --- a/scripts/eastern_kingdoms/zulgurub/instance_zulgurub.cpp +++ b/scripts/eastern_kingdoms/zulgurub/instance_zulgurub.cpp @@ -25,11 +25,6 @@ EndScriptData */ #include "zulgurub.h" instance_zulgurub::instance_zulgurub(Map* pMap) : ScriptedInstance(pMap), - m_uiLorKhanGUID(0), - m_uiZathGUID(0), - m_uiThekalGUID(0), - m_uiJindoGUID(0), - m_uiHakkarGUID(0), m_bHasIntroYelled(false), m_bHasAltarYelled(false) { @@ -45,19 +40,13 @@ void instance_zulgurub::DoYellAtTriggerIfCan(uint32 uiTriggerId) { if (uiTriggerId == AREATRIGGER_ENTER && !m_bHasIntroYelled) { - if (Creature* pHakkar = instance->GetCreature(m_uiHakkarGUID)) - { - DoScriptText(SAY_HAKKAR_PROTECT, pHakkar); - m_bHasIntroYelled = true; - } + DoOrSimulateScriptTextForThisInstance(SAY_HAKKAR_PROTECT, NPC_HAKKAR); + m_bHasIntroYelled = true; } else if (uiTriggerId == AREATRIGGER_ALTAR && !m_bHasAltarYelled) { - if (Creature* pHakkar = instance->GetCreature(m_uiHakkarGUID)) - { - DoScriptText(SAY_MINION_DESTROY, pHakkar); - m_bHasAltarYelled = true; - } + DoOrSimulateScriptTextForThisInstance(SAY_MINION_DESTROY, NPC_HAKKAR); + m_bHasAltarYelled = true; } } @@ -66,19 +55,11 @@ void instance_zulgurub::OnCreatureCreate(Creature* pCreature) switch(pCreature->GetEntry()) { case NPC_LORKHAN: - m_uiLorKhanGUID = pCreature->GetGUID(); - break; case NPC_ZATH: - m_uiZathGUID = pCreature->GetGUID(); - break; case NPC_THEKAL: - m_uiThekalGUID = pCreature->GetGUID(); - break; case NPC_JINDO: - m_uiJindoGUID = pCreature->GetGUID(); - break; case NPC_HAKKAR: - m_uiHakkarGUID = pCreature->GetGUID(); + m_mNpcEntryGuidStore[pCreature->GetEntry()] = pCreature->GetObjectGuid(); break; } } @@ -122,7 +103,7 @@ void instance_zulgurub::SetData(uint32 uiType, uint32 uiData) // Each time High Priest dies lower Hakkar's HP void instance_zulgurub::DoLowerHakkarHitPoints() { - if (Creature* pHakkar = instance->GetCreature(m_uiHakkarGUID)) + if (Creature* pHakkar = GetSingleCreatureFromStorage(NPC_HAKKAR)) { if (pHakkar->isAlive() && pHakkar->GetMaxHealth() > HP_LOSS_PER_PRIEST) { @@ -163,20 +144,6 @@ uint32 instance_zulgurub::GetData(uint32 uiType) return 0; } -uint64 instance_zulgurub::GetData64(uint32 uiData) -{ - switch(uiData) - { - case NPC_LORKHAN: return m_uiLorKhanGUID; - case NPC_ZATH: return m_uiZathGUID; - case NPC_THEKAL: return m_uiThekalGUID; - case NPC_JINDO: return m_uiJindoGUID; - case NPC_HAKKAR: return m_uiHakkarGUID; - default: - return 0; - } -} - InstanceData* GetInstanceData_instance_zulgurub(Map* pMap) { return new instance_zulgurub(pMap); diff --git a/scripts/eastern_kingdoms/zulgurub/zulgurub.h b/scripts/eastern_kingdoms/zulgurub/zulgurub.h index b798017a7..f07897e3f 100644 --- a/scripts/eastern_kingdoms/zulgurub/zulgurub.h +++ b/scripts/eastern_kingdoms/zulgurub/zulgurub.h @@ -47,7 +47,6 @@ class MANGOS_DLL_DECL instance_zulgurub : public ScriptedInstance void SetData(uint32 uiType, uint32 uiData); uint32 GetData(uint32 uiType); - uint64 GetData64(uint32 uiData); const char* Save() { return m_strInstData.c_str(); } void Load(const char* chrIn); @@ -60,12 +59,6 @@ class MANGOS_DLL_DECL instance_zulgurub : public ScriptedInstance uint32 m_auiEncounter[MAX_ENCOUNTER]; std::string m_strInstData; - uint64 m_uiLorKhanGUID; - uint64 m_uiZathGUID; - uint64 m_uiThekalGUID; - uint64 m_uiJindoGUID; - uint64 m_uiHakkarGUID; - bool m_bHasIntroYelled; bool m_bHasAltarYelled; }; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 28ea7e8b2..b0b540f5e 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2175" + #define SD2_REVISION_NR "2176" #endif // __SD2_REVISION_NR_H__ From 40360ca556c8aeef3f647982d0577c7e9100045d Mon Sep 17 00:00:00 2001 From: Xfurry Date: Fri, 3 Jun 2011 23:45:17 +0200 Subject: [PATCH 0157/1172] [2177] Use EntryGuidMap-Storage in Ruins of Ahn'Quiraj Signed-off-by: Schmoozerd --- .../instance_ruins_of_ahnqiraj.cpp | 63 ++++--------------- .../ruins_of_ahnqiraj/ruins_of_ahnqiraj.h | 40 ++++-------- sd2_revision_nr.h | 2 +- 3 files changed, 24 insertions(+), 81 deletions(-) diff --git a/scripts/kalimdor/ruins_of_ahnqiraj/instance_ruins_of_ahnqiraj.cpp b/scripts/kalimdor/ruins_of_ahnqiraj/instance_ruins_of_ahnqiraj.cpp index f87403ca8..f2c4e852a 100644 --- a/scripts/kalimdor/ruins_of_ahnqiraj/instance_ruins_of_ahnqiraj.cpp +++ b/scripts/kalimdor/ruins_of_ahnqiraj/instance_ruins_of_ahnqiraj.cpp @@ -24,19 +24,7 @@ EndScriptData */ #include "precompiled.h" #include "ruins_of_ahnqiraj.h" -instance_ruins_of_ahnqiraj::instance_ruins_of_ahnqiraj(Map* pMap) : ScriptedInstance(pMap), - m_uiOssirianGUID(0), - m_uiBuruGUID(0), - m_uiKurinnaxxGUID(0), - m_uiAndorovGUID(0), - m_uiQeezGUID(0), - m_uiTuubidGUID(0), - m_uiDrennGUID(0), - m_uiXurremGUID(0), - m_uiYeggethGUID(0), - m_uiPakkonGUID(0), - m_uiZerranGUID(0), - m_uiRajaxxGUID(0) +instance_ruins_of_ahnqiraj::instance_ruins_of_ahnqiraj(Map* pMap) : ScriptedInstance(pMap) { Initialize(); } @@ -56,18 +44,10 @@ void instance_ruins_of_ahnqiraj::OnCreatureCreate(Creature* pCreature) { switch(pCreature->GetEntry()) { - case NPC_OSSIRIAN: m_uiOssirianGUID = pCreature->GetGUID(); break; - case NPC_BURU: m_uiBuruGUID = pCreature->GetGUID(); break; - case NPC_KURINNAXX: m_uiKurinnaxxGUID = pCreature->GetGUID(); break; - case NPC_GENERAL_ANDOROV: m_uiAndorovGUID = pCreature->GetGUID(); break; - case NPC_CAPTAIN_QEEZ: m_uiQeezGUID = pCreature->GetGUID(); break; - case NPC_CAPTAIN_TUUBID: m_uiTuubidGUID = pCreature->GetGUID(); break; - case NPC_CAPTAIN_DRENN: m_uiDrennGUID = pCreature->GetGUID(); break; - case NPC_CAPTAIN_XURREM: m_uiXurremGUID = pCreature->GetGUID(); break; - case NPC_MAJOR_YEGGETH: m_uiYeggethGUID = pCreature->GetGUID(); break; - case NPC_MAJOR_PAKKON: m_uiPakkonGUID = pCreature->GetGUID(); break; - case NPC_COLONEL_ZERRAN: m_uiZerranGUID = pCreature->GetGUID(); break; - case NPC_RAJAXX: m_uiRajaxxGUID = pCreature->GetGUID(); break; + case NPC_OSSIRIAN: + case NPC_GENERAL_ANDOROV: + m_mNpcEntryGuidStore[pCreature->GetEntry()] = pCreature->GetObjectGuid(); + break; } } @@ -75,8 +55,10 @@ void instance_ruins_of_ahnqiraj::OnObjectCreate(GameObject* pGo) { switch(pGo->GetEntry()) { - // Make them unusable temporarily - case GO_OSSIRIAN_CRYSTAL: pGo->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_INTERACT_COND); break; + case GO_OSSIRIAN_CRYSTAL: + // Make them unusable temporarily + pGo->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_INTERACT_COND); + break; } } @@ -129,8 +111,7 @@ void instance_ruins_of_ahnqiraj::SetData(uint32 uiType, uint32 uiData) DoSapwnAndorovIfCan(); // Yell after kurinnaxx - if (Creature* pOssirian = instance->GetCreature(m_uiOssirianGUID)) - DoScriptText(SAY_OSSIRIAN_INTRO, pOssirian); + DoOrSimulateScriptTextForThisInstance(SAY_OSSIRIAN_INTRO, NPC_OSSIRIAN); } m_auiEncounter[uiType] = uiData; break; @@ -172,7 +153,7 @@ void instance_ruins_of_ahnqiraj::DoSapwnAndorovIfCan() if (m_auiEncounter[TYPE_KURINNAXX] != DONE) return; - if (m_uiAndorovGUID) + if (GetSingleCreatureFromStorage(NPC_GENERAL_ANDOROV)) return; Player* pPlayer = GetPlayerInMap(); @@ -183,28 +164,6 @@ void instance_ruins_of_ahnqiraj::DoSapwnAndorovIfCan() pPlayer->SummonCreature(aAndorovSpawnLocs[i].m_uiEntry, aAndorovSpawnLocs[i].m_fX, aAndorovSpawnLocs[i].m_fY, aAndorovSpawnLocs[i].m_fZ, aAndorovSpawnLocs[i].m_fO, TEMPSUMMON_DEAD_DESPAWN, 0); } -uint64 instance_ruins_of_ahnqiraj::GetData64(uint32 uiData) -{ - switch(uiData) - { - case NPC_OSSIRIAN: return m_uiOssirianGUID; - case NPC_BURU: return m_uiBuruGUID; - case NPC_GENERAL_ANDOROV: return m_uiAndorovGUID; - case NPC_KURINNAXX: return m_uiKurinnaxxGUID; - case NPC_CAPTAIN_QEEZ: return m_uiQeezGUID; - case NPC_CAPTAIN_TUUBID: return m_uiTuubidGUID; - case NPC_CAPTAIN_DRENN: return m_uiDrennGUID; - case NPC_CAPTAIN_XURREM: return m_uiXurremGUID; - case NPC_MAJOR_YEGGETH: return m_uiYeggethGUID; - case NPC_MAJOR_PAKKON: return m_uiPakkonGUID; - case NPC_COLONEL_ZERRAN: return m_uiZerranGUID; - case NPC_RAJAXX: return m_uiRajaxxGUID; - - default: - return 0; - } -} - void instance_ruins_of_ahnqiraj::Load(const char* chrIn) { if (!chrIn) diff --git a/scripts/kalimdor/ruins_of_ahnqiraj/ruins_of_ahnqiraj.h b/scripts/kalimdor/ruins_of_ahnqiraj/ruins_of_ahnqiraj.h index 68f8dd760..0530045ce 100644 --- a/scripts/kalimdor/ruins_of_ahnqiraj/ruins_of_ahnqiraj.h +++ b/scripts/kalimdor/ruins_of_ahnqiraj/ruins_of_ahnqiraj.h @@ -25,13 +25,13 @@ enum NPC_GENERAL_ANDOROV = 15471, // The general and the kaldorei are escorted for the rajaxx encounter NPC_KALDOREI_ELITE = 15473, NPC_RAJAXX = 15341, // All of the following are used in the rajaxx encounter - NPC_COLONEL_ZERRAN = 15385, - NPC_MAJOR_PAKKON = 15388, - NPC_MAJOR_YEGGETH = 15386, - NPC_CAPTAIN_XURREM = 15390, - NPC_CAPTAIN_DRENN = 15389, - NPC_CAPTAIN_TUUBID = 15392, - NPC_CAPTAIN_QEEZ = 15391, + // NPC_COLONEL_ZERRAN = 15385, + // NPC_MAJOR_PAKKON = 15388, + // NPC_MAJOR_YEGGETH = 15386, + // NPC_CAPTAIN_XURREM = 15390, + // NPC_CAPTAIN_DRENN = 15389, + // NPC_CAPTAIN_TUUBID = 15392, + // NPC_CAPTAIN_QEEZ = 15391, GO_OSSIRIAN_CRYSTAL = 180619, // Used in the ossirian encounter @@ -44,15 +44,13 @@ struct SpawnLocation float m_fX, m_fY, m_fZ, m_fO; }; -// These positions are likely wrong, and the npcs need some movement to these coords -// TODO Research proper positions static const SpawnLocation aAndorovSpawnLocs[MAX_HELPERS] = { - {NPC_GENERAL_ANDOROV, -8876.97f, 1651.96f, 21.57f, 5.52f}, - {NPC_KALDOREI_ELITE, -8875.47f, 1653.51f, 21.57f, 5.32f}, - {NPC_KALDOREI_ELITE, -8873.96f, 1655.06f, 21.57f, 5.13f}, - {NPC_KALDOREI_ELITE, -8878.26f, 1650.63f, 21.57f, 5.7f}, - {NPC_KALDOREI_ELITE, -8879.46f, 1649.39f, 21.57f, 5.85f} + {NPC_GENERAL_ANDOROV, -8876.97f, 1651.96f, 21.57f, 5.52f}, // fix these coords + {NPC_KALDOREI_ELITE, -8655.84f, 1509.78f, 32.462f, 2.33341f}, + {NPC_KALDOREI_ELITE, -8657.39f, 1506.28f, 32.418f, 2.33346f}, + {NPC_KALDOREI_ELITE, -8660.96f, 1504.9f, 32.1567f, 2.33306f}, + {NPC_KALDOREI_ELITE, -8664.45f, 1506.44f, 32.0944f, 2.33302f} }; class MANGOS_DLL_DECL instance_ruins_of_ahnqiraj : public ScriptedInstance @@ -75,7 +73,6 @@ class MANGOS_DLL_DECL instance_ruins_of_ahnqiraj : public ScriptedInstance void SetData(uint32 uiType, uint32 uiData); uint32 GetData(uint32 uiType); - uint64 GetData64(uint32 uiData); const char* Save() { return m_strInstData.c_str(); } void Load(const char* chrIn); @@ -85,18 +82,5 @@ class MANGOS_DLL_DECL instance_ruins_of_ahnqiraj : public ScriptedInstance uint32 m_auiEncounter[MAX_ENCOUNTER]; std::string m_strInstData; - - uint64 m_uiOssirianGUID; - uint64 m_uiBuruGUID; - uint64 m_uiKurinnaxxGUID; - uint64 m_uiAndorovGUID; - uint64 m_uiRajaxxGUID; - uint64 m_uiQeezGUID; - uint64 m_uiTuubidGUID; - uint64 m_uiDrennGUID; - uint64 m_uiXurremGUID; - uint64 m_uiYeggethGUID; - uint64 m_uiPakkonGUID; - uint64 m_uiZerranGUID; }; #endif diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index b0b540f5e..cf967b4bd 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2176" + #define SD2_REVISION_NR "2177" #endif // __SD2_REVISION_NR_H__ From 61dceaebac72f82b3e7bac9162b0eec96f50098f Mon Sep 17 00:00:00 2001 From: Xfurry Date: Fri, 3 Jun 2011 23:58:20 +0200 Subject: [PATCH 0158/1172] [2178] Use EntryGuidMap-Storage in Temple of Ahn'Quiraj Signed-off-by: Schmoozerd --- .../temple_of_ahnqiraj/boss_bug_trio.cpp | 4 +- .../temple_of_ahnqiraj/boss_twinemperors.cpp | 4 +- .../temple_of_ahnqiraj/boss_viscidus.cpp | 22 +++++++-- .../instance_temple_of_ahnqiraj.cpp | 49 ++++++------------- .../temple_of_ahnqiraj/temple_of_ahnqiraj.h | 16 +----- sd2_revision_nr.h | 2 +- 6 files changed, 40 insertions(+), 57 deletions(-) diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_bug_trio.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_bug_trio.cpp index 7457f4a1f..7faa35a5b 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/boss_bug_trio.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_bug_trio.cpp @@ -254,8 +254,8 @@ struct MANGOS_DLL_DECL boss_yaujAI : public ScriptedAI { if (m_pInstance) { - Creature* pKri = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(NPC_KRI)); - Creature* pVem = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(NPC_VEM)); + Creature* pKri = m_pInstance->GetSingleCreatureFromStorage(NPC_KRI); + Creature* pVem = m_pInstance->GetSingleCreatureFromStorage(NPC_VEM); switch(urand(0, 2)) { diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_twinemperors.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_twinemperors.cpp index ea1bcde50..54a8e0f61 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/boss_twinemperors.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_twinemperors.cpp @@ -92,11 +92,11 @@ struct MANGOS_DLL_DECL boss_twinemperorsAI : public ScriptedAI EnrageTimer = 15*60000; } - Creature *GetOtherBoss() + Creature* GetOtherBoss() { if (m_pInstance) { - return m_creature->GetMap()->GetCreature(m_pInstance->GetData64(IAmVeklor() ? NPC_VEKNILASH : NPC_VEKLOR)); + return m_pInstance->GetSingleCreatureFromStorage(IAmVeklor() ? NPC_VEKNILASH : NPC_VEKLOR); } else { diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_viscidus.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_viscidus.cpp index 62a1679b5..bf91125fb 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/boss_viscidus.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_viscidus.cpp @@ -23,10 +23,26 @@ EndScriptData */ #include "precompiled.h" -#define SPELL_POISON_SHOCK 25993 -#define SPELL_POISONBOLT_VOLLEY 25991 +enum +{ + // Timer spells + SPELL_POISON_SHOCK = 25993, + SPELL_POISONBOLT_VOLLEY = 25991, + SPELL_TOXIN = 26575, // Triggers toxin cloud + SPELL_TOXIN_CLOUD = 25989, + + // Debuffs gained by the boss on frost damage + SPELL_VISCIDUS_SLOWED = 26034, + SPELL_VISCIDUS_SLOWED_MORE = 26036, + SPELL_VISCIDUS_FREEZE = 25937, + + // When frost damage exceeds a certain limit, then boss explodes + SPELL_REJOIN_VISCIDUS = 25896, + SPELL_VISCIDUS_EXPLODE = 25938, // Casts a lot of spells in the same time: 25865 to 25884; All spells have target coords + SPELL_VISCIDUS_SUICIDE = 26003, -#define SPELL_TOXIN_CLOUD 25989 + NPC_GLOB_OF_VISCIDUS = 15667 +}; void AddSC_boss_viscidus() { diff --git a/scripts/kalimdor/temple_of_ahnqiraj/instance_temple_of_ahnqiraj.cpp b/scripts/kalimdor/temple_of_ahnqiraj/instance_temple_of_ahnqiraj.cpp index 7a0ea5bdb..170f8e5ad 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/instance_temple_of_ahnqiraj.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/instance_temple_of_ahnqiraj.cpp @@ -25,16 +25,8 @@ EndScriptData */ #include "temple_of_ahnqiraj.h" instance_temple_of_ahnqiraj::instance_temple_of_ahnqiraj(Map* pMap) : ScriptedInstance(pMap), - m_uiSkeramGUID(0), - m_uiVemGUID(0), - m_uiKriGUID(0), - m_uiVeklorGUID(0), - m_uiVeknilashGUID(0), m_uiBugTrioDeathCount(0), - m_uiCthunPhase(0), - m_uiSkeramGateGUID(0), - m_uiTwinsEnterDoorGUID(0), - m_uiTwinsExitDoorGUID(0) + m_uiCthunPhase(0) { Initialize(); }; @@ -48,11 +40,12 @@ void instance_temple_of_ahnqiraj::OnCreatureCreate (Creature* pCreature) { switch (pCreature->GetEntry()) { - case NPC_SKERAM: m_uiSkeramGUID = pCreature->GetGUID(); break; - case NPC_VEM: m_uiVemGUID = pCreature->GetGUID(); break; - case NPC_KRI: m_uiKriGUID = pCreature->GetGUID(); break; - case NPC_VEKLOR: m_uiVeklorGUID = pCreature->GetGUID(); break; - case NPC_VEKNILASH: m_uiVeknilashGUID = pCreature->GetGUID(); break; + case NPC_VEM: + case NPC_KRI: + case NPC_VEKLOR: + case NPC_VEKNILASH: + m_mNpcEntryGuidStore[pCreature->GetEntry()] = pCreature->GetObjectGuid(); + break; } } @@ -61,19 +54,21 @@ void instance_temple_of_ahnqiraj::OnObjectCreate(GameObject* pGo) switch (pGo->GetEntry()) { case GO_SKERAM_GATE: - m_uiSkeramGateGUID = pGo->GetGUID(); if (m_auiEncounter[TYPE_SKERAM] == DONE) pGo->SetGoState(GO_STATE_ACTIVE); break; case GO_TWINS_ENTER_DOOR: - m_uiTwinsEnterDoorGUID = pGo->GetGUID(); break; case GO_TWINS_EXIT_DOOR: - m_uiTwinsExitDoorGUID = pGo->GetGUID(); if (m_auiEncounter[TYPE_TWINS] == DONE) pGo->SetGoState(GO_STATE_ACTIVE); break; + + default: + return; } + + m_mGoEntryGuidStore[pGo->GetEntry()] = pGo->GetObjectGuid(); } bool instance_temple_of_ahnqiraj::IsEncounterInProgress() const @@ -89,7 +84,7 @@ void instance_temple_of_ahnqiraj::SetData(uint32 uiType, uint32 uiData) case TYPE_SKERAM: m_auiEncounter[uiType] = uiData; if (uiData == DONE) - DoUseDoorOrButton(m_uiSkeramGateGUID); + DoUseDoorOrButton(GO_SKERAM_GATE); break; case TYPE_VEM: m_auiEncounter[uiType] = uiData; @@ -100,9 +95,9 @@ void instance_temple_of_ahnqiraj::SetData(uint32 uiType, uint32 uiData) return; m_auiEncounter[uiType] = uiData; - DoUseDoorOrButton(m_uiTwinsEnterDoorGUID); + DoUseDoorOrButton(GO_TWINS_ENTER_DOOR); if (uiData == DONE) - DoUseDoorOrButton(m_uiTwinsExitDoorGUID); + DoUseDoorOrButton(GO_TWINS_EXIT_DOOR); break; // The following temporarily datas are not to be saved @@ -166,20 +161,6 @@ uint32 instance_temple_of_ahnqiraj::GetData(uint32 uiType) } } -uint64 instance_temple_of_ahnqiraj::GetData64(uint32 uiData) -{ - switch(uiData) - { - case NPC_SKERAM: return m_uiSkeramGUID; - case NPC_VEM: return m_uiVemGUID; - case NPC_KRI: return m_uiKriGUID; - case NPC_VEKLOR: return m_uiVeklorGUID; - case NPC_VEKNILASH: return m_uiVeknilashGUID; - default: - return 0; - } -} - InstanceData* GetInstanceData_instance_temple_of_ahnqiraj(Map* pMap) { return new instance_temple_of_ahnqiraj(pMap); diff --git a/scripts/kalimdor/temple_of_ahnqiraj/temple_of_ahnqiraj.h b/scripts/kalimdor/temple_of_ahnqiraj/temple_of_ahnqiraj.h index d6fe5c9a3..94241f598 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/temple_of_ahnqiraj.h +++ b/scripts/kalimdor/temple_of_ahnqiraj/temple_of_ahnqiraj.h @@ -13,7 +13,7 @@ enum TYPE_VEM = 1, TYPE_TWINS = 2, - NPC_SKERAM = 15263, + // NPC_SKERAM = 15263, NPC_KRI = 15511, NPC_VEM = 15544, NPC_VEKLOR = 15276, @@ -42,7 +42,6 @@ class MANGOS_DLL_DECL instance_temple_of_ahnqiraj : public ScriptedInstance void SetData(uint32 uiType, uint32 uiData); uint32 GetData(uint32 uiType); - uint64 GetData64(uint32 uiData); const char* Save() { return m_strInstData.c_str(); } void Load(const char* chrIn); @@ -51,20 +50,7 @@ class MANGOS_DLL_DECL instance_temple_of_ahnqiraj : public ScriptedInstance uint32 m_auiEncounter[MAX_ENCOUNTER]; std::string m_strInstData; - // Storing Skeram, Vem and Kri. - uint64 m_uiSkeramGUID; - uint64 m_uiVemGUID; - uint64 m_uiKriGUID; - uint64 m_uiVeklorGUID; - uint64 m_uiVeknilashGUID; - - // Doors - uint64 m_uiSkeramGateGUID; - uint64 m_uiTwinsEnterDoorGUID; - uint64 m_uiTwinsExitDoorGUID; - uint32 m_uiBugTrioDeathCount; - uint32 m_uiCthunPhase; }; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index cf967b4bd..1f650d6e9 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2177" + #define SD2_REVISION_NR "2178" #endif // __SD2_REVISION_NR_H__ From 7a5558f109c02c1d09f7318b8a9946b34c6e231a Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Sat, 4 Jun 2011 00:07:33 +0200 Subject: [PATCH 0159/1172] [2179] Use EntryGuidMap-Storage in Onyxias Lair --- scripts/kalimdor/onyxias_lair/boss_onyxia.cpp | 6 +++--- scripts/kalimdor/onyxias_lair/instance_onyxias_lair.cpp | 3 +-- scripts/kalimdor/onyxias_lair/onyxias_lair.h | 4 ---- sd2_revision_nr.h | 2 +- 4 files changed, 5 insertions(+), 10 deletions(-) diff --git a/scripts/kalimdor/onyxias_lair/boss_onyxia.cpp b/scripts/kalimdor/onyxias_lair/boss_onyxia.cpp index fadb93dee..0ad95ad59 100644 --- a/scripts/kalimdor/onyxias_lair/boss_onyxia.cpp +++ b/scripts/kalimdor/onyxias_lair/boss_onyxia.cpp @@ -220,10 +220,10 @@ struct MANGOS_DLL_DECL boss_onyxiaAI : public ScriptedAI if (!m_pInstance) return; - if (Creature* pTrigger = m_pInstance->instance->GetCreature(m_pInstance->GetOnyxiaTriggerGUID())) + if (Creature* pTrigger = m_pInstance->GetSingleCreatureFromStorage(NPC_ONYXIA_TRIGGER)) { m_creature->GetMap()->CreatureRelocation(m_creature, m_pPointData->fX, m_pPointData->fY, m_pPointData->fZ, m_creature->GetAngle(pTrigger)); - m_creature->SendMonsterMove(m_pPointData->fX, m_pPointData->fY, m_pPointData->fZ, SPLINETYPE_FACINGTARGET, m_creature->GetSplineFlags(), 1, NULL, pTrigger->GetGUID()); + m_creature->SendMonsterMove(m_pPointData->fX, m_pPointData->fY, m_pPointData->fZ, SPLINETYPE_FACINGTARGET, m_creature->GetSplineFlags(), 1, NULL, pTrigger->GetObjectGuid().GetRawValue()); } } } @@ -247,7 +247,7 @@ struct MANGOS_DLL_DECL boss_onyxiaAI : public ScriptedAI if (m_uiPhase == PHASE_BREATH) { - if (Creature* pTrigger = m_pInstance->instance->GetCreature(m_pInstance->GetOnyxiaTriggerGUID())) + if (Creature* pTrigger = m_pInstance->GetSingleCreatureFromStorage(NPC_ONYXIA_TRIGGER)) m_creature->SetFacingToObject(pTrigger); } } diff --git a/scripts/kalimdor/onyxias_lair/instance_onyxias_lair.cpp b/scripts/kalimdor/onyxias_lair/instance_onyxias_lair.cpp index bdf548c3e..f7dde0ae7 100644 --- a/scripts/kalimdor/onyxias_lair/instance_onyxias_lair.cpp +++ b/scripts/kalimdor/onyxias_lair/instance_onyxias_lair.cpp @@ -25,7 +25,6 @@ EndScriptData */ #include "onyxias_lair.h" instance_onyxias_lair::instance_onyxias_lair(Map* pMap) : ScriptedInstance(pMap), - m_uiOnyxTriggerGUID(0), m_uiAchievWhelpsCount(0) { Initialize(); @@ -47,7 +46,7 @@ void instance_onyxias_lair::OnCreatureCreate(Creature* pCreature) switch(pCreature->GetEntry()) { case NPC_ONYXIA_TRIGGER: - m_uiOnyxTriggerGUID = pCreature->GetGUID(); + m_mNpcEntryGuidStore[NPC_ONYXIA_TRIGGER] = pCreature->GetObjectGuid(); break; case NPC_ONYXIA_WHELP: if (m_uiEncounter >= DATA_LIFTOFF && time_t(m_tPhaseTwoStart + TIME_LIMIT_MANY_WHELPS) >= time(NULL)) diff --git a/scripts/kalimdor/onyxias_lair/onyxias_lair.h b/scripts/kalimdor/onyxias_lair/onyxias_lair.h index f43083820..2f493a792 100644 --- a/scripts/kalimdor/onyxias_lair/onyxias_lair.h +++ b/scripts/kalimdor/onyxias_lair/onyxias_lair.h @@ -42,15 +42,11 @@ class MANGOS_DLL_DECL instance_onyxias_lair : public ScriptedInstance bool CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/); - uint64 GetOnyxiaTriggerGUID() { return m_uiOnyxTriggerGUID; } - protected: uint32 m_uiEncounter; uint32 m_uiAchievWhelpsCount; time_t m_tPhaseTwoStart; - - uint64 m_uiOnyxTriggerGUID; }; #endif diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 1f650d6e9..799f2de11 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2178" + #define SD2_REVISION_NR "2179" #endif // __SD2_REVISION_NR_H__ From 8e1439fbf143337fbfbd26b317c611b063718e74 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Sat, 4 Jun 2011 00:24:13 +0200 Subject: [PATCH 0160/1172] [2180] Use EntryGuidMap-Storage in Dire Maul, also handly pylon guards in own functions --- scripts/kalimdor/dire_maul/dire_maul.h | 22 +- .../kalimdor/dire_maul/instance_dire_maul.cpp | 197 ++++++++---------- sd2_revision_nr.h | 2 +- 3 files changed, 89 insertions(+), 132 deletions(-) diff --git a/scripts/kalimdor/dire_maul/dire_maul.h b/scripts/kalimdor/dire_maul/dire_maul.h index 8658fe703..ae3ac41ec 100644 --- a/scripts/kalimdor/dire_maul/dire_maul.h +++ b/scripts/kalimdor/dire_maul/dire_maul.h @@ -89,7 +89,6 @@ class MANGOS_DLL_DECL instance_dire_maul : public ScriptedInstance void SetData(uint32 uiType, uint32 uiData); uint32 GetData(uint32 uiType); - uint64 GetData64(uint32 uiData); void OnCreatureEnterCombat(Creature* pCreature); void OnCreatureDeath(Creature* pCreature); @@ -100,37 +99,22 @@ class MANGOS_DLL_DECL instance_dire_maul : public ScriptedInstance protected: bool CheckAllGeneratorsDestroyed(); void ProcessForceFieldOpening(); + void SortPylonGuards(); + void PylonGuardJustDied(Creature* pCreature); uint32 m_auiEncounter[MAX_ENCOUNTER]; std::string m_strInstData; // East bool m_bWallDestroyed; - - uint64 m_uiCrumbleWallGUID; - uint64 m_uiCorruptVineGUID; - uint64 m_uiConservatoryDoorGUID; - uint64 m_uiOldIronbarkGUID; - GUIDList m_lFelvineShardGUIDs; // West - uint64 m_auiCrystalGeneratorGUID[MAX_GENERATORS]; - - uint64 m_uiPrinceTortheldrinGUID; - uint64 m_uiImmolTharGUID; - uint64 m_uiForcefieldGUID; - uint64 m_uiPrincesChestAuraGUID; - uint64 m_uiTendrisWarpwoodDoorGUID; + ObjectGuid m_aCrystalGeneratorGuid[MAX_GENERATORS]; GUIDList m_luiHighborneSummonerGUIDs; GUIDList m_lGeneratorGuardGUIDs; std::set m_sSortedGeneratorGuards[MAX_GENERATORS]; - - // North - uint64 m_uiGordokGUID; - uint64 m_uiChoRushGUID; - uint64 m_uiMizzleGUID; }; #endif diff --git a/scripts/kalimdor/dire_maul/instance_dire_maul.cpp b/scripts/kalimdor/dire_maul/instance_dire_maul.cpp index bab6ededb..1f4997db8 100644 --- a/scripts/kalimdor/dire_maul/instance_dire_maul.cpp +++ b/scripts/kalimdor/dire_maul/instance_dire_maul.cpp @@ -25,24 +25,7 @@ EndScriptData */ #include "dire_maul.h" instance_dire_maul::instance_dire_maul(Map* pMap) : ScriptedInstance(pMap), - // East - m_bWallDestroyed(false), - m_uiCrumbleWallGUID(0), - m_uiCorruptVineGUID(0), - m_uiConservatoryDoorGUID(0), - m_uiOldIronbarkGUID(0), - - // West - m_uiPrinceTortheldrinGUID(0), - m_uiImmolTharGUID(0), - m_uiForcefieldGUID(0), - m_uiPrincesChestAuraGUID(0), - m_uiTendrisWarpwoodDoorGUID(0), - - // North - m_uiGordokGUID(0), - m_uiChoRushGUID(0), - m_uiMizzleGUID(0) + m_bWallDestroyed(false) { Initialize(); } @@ -50,11 +33,6 @@ instance_dire_maul::instance_dire_maul(Map* pMap) : ScriptedInstance(pMap), void instance_dire_maul::Initialize() { memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); - memset(&m_auiCrystalGeneratorGUID, 0, sizeof(m_auiCrystalGeneratorGUID)); - - m_lFelvineShardGUIDs.clear(); - m_luiHighborneSummonerGUIDs.clear(); - m_lGeneratorGuardGUIDs.clear(); } void instance_dire_maul::OnCreatureCreate(Creature* pCreature) @@ -63,37 +41,33 @@ void instance_dire_maul::OnCreatureCreate(Creature* pCreature) { // East case NPC_OLD_IRONBARK: - m_uiOldIronbarkGUID = pCreature->GetGUID(); break; // West case NPC_PRINCE_TORTHELDRIN: - m_uiPrinceTortheldrinGUID = pCreature->GetGUID(); if (m_auiEncounter[TYPE_IMMOLTHAR] == DONE) pCreature->setFaction(FACTION_HOSTILE); break; case NPC_ARCANE_ABERRATION: case NPC_MANA_REMNANT: m_lGeneratorGuardGUIDs.push_back(pCreature->GetGUID()); - break; + return; case NPC_IMMOLTHAR: - m_uiImmolTharGUID = pCreature->GetGUID(); break; case NPC_HIGHBORNE_SUMMONER: m_luiHighborneSummonerGUIDs.push_back(pCreature->GetGUID()); - break; + return; // North case NPC_CHORUSH: - m_uiChoRushGUID = pCreature->GetGUID(); - break; case NPC_KING_GORDOK: - m_uiGordokGUID = pCreature->GetGUID(); - break; case NPC_MIZZLE_THE_CRAFTY: - m_uiMizzleGUID = pCreature->GetGUID(); break; + + default: + return; } + m_mNpcEntryGuidStore[pCreature->GetEntry()] = pCreature->GetObjectGuid(); } void instance_dire_maul::OnObjectCreate(GameObject* pGo) @@ -102,17 +76,14 @@ void instance_dire_maul::OnObjectCreate(GameObject* pGo) { // East case GO_CONSERVATORY_DOOR: - m_uiConservatoryDoorGUID = pGo->GetGUID(); if (m_auiEncounter[TYPE_IRONBARK] == DONE) pGo->SetGoState(GO_STATE_ACTIVE); break; case GO_CRUMBLE_WALL: - m_uiCrumbleWallGUID = pGo->GetGUID(); if (m_bWallDestroyed || m_auiEncounter[TYPE_ALZZIN] == DONE) pGo->SetGoState(GO_STATE_ACTIVE); break; case GO_CORRUPT_VINE: - m_uiCorruptVineGUID = pGo->GetGUID(); if (m_auiEncounter[TYPE_ALZZIN] == DONE) pGo->SetGoState(GO_STATE_ACTIVE); break; @@ -122,39 +93,41 @@ void instance_dire_maul::OnObjectCreate(GameObject* pGo) // West case GO_CRYSTAL_GENERATOR_1: - m_auiCrystalGeneratorGUID[0] = pGo->GetGUID(); + m_aCrystalGeneratorGuid[0] = pGo->GetObjectGuid(); if (m_auiEncounter[TYPE_PYLON_1] == DONE) pGo->SetGoState(GO_STATE_ACTIVE); - break; + return; case GO_CRYSTAL_GENERATOR_2: - m_auiCrystalGeneratorGUID[1] = pGo->GetGUID(); + m_aCrystalGeneratorGuid[1] = pGo->GetObjectGuid(); if (m_auiEncounter[TYPE_PYLON_2] == DONE) pGo->SetGoState(GO_STATE_ACTIVE); - break; + return; case GO_CRYSTAL_GENERATOR_3: - m_auiCrystalGeneratorGUID[2] = pGo->GetGUID(); + m_aCrystalGeneratorGuid[2] = pGo->GetObjectGuid(); if (m_auiEncounter[TYPE_PYLON_3] == DONE) pGo->SetGoState(GO_STATE_ACTIVE); - break; + return; case GO_CRYSTAL_GENERATOR_4: - m_auiCrystalGeneratorGUID[3] = pGo->GetGUID(); + m_aCrystalGeneratorGuid[3] = pGo->GetObjectGuid(); if (m_auiEncounter[TYPE_PYLON_4] == DONE) pGo->SetGoState(GO_STATE_ACTIVE); - break; + return; case GO_CRYSTAL_GENERATOR_5: - m_auiCrystalGeneratorGUID[4] = pGo->GetGUID(); + m_aCrystalGeneratorGuid[4] = pGo->GetObjectGuid(); if (m_auiEncounter[TYPE_PYLON_5] == DONE) pGo->SetGoState(GO_STATE_ACTIVE); - break; + return; case GO_FORCEFIELD: - m_uiForcefieldGUID = pGo->GetGUID(); if (CheckAllGeneratorsDestroyed()) pGo->SetGoState(GO_STATE_ACTIVE); break; case GO_PRINCES_CHEST_AURA: - m_uiPrincesChestAuraGUID = pGo->GetGUID(); break; + + default: + return; } + m_mGoEntryGuidStore[pGo->GetEntry()] = pGo->GetObjectGuid(); } void instance_dire_maul::SetData(uint32 uiType, uint32 uiData) @@ -166,7 +139,7 @@ void instance_dire_maul::SetData(uint32 uiType, uint32 uiData) if (uiData == DONE) { // Update Old Ironbark so he can open the conservatory door - if (Creature* pIronbark = instance->GetCreature(m_uiOldIronbarkGUID)) + if (Creature* pIronbark = GetSingleCreatureFromStorage(NPC_OLD_IRONBARK)) { DoScriptText(SAY_IRONBARK_REDEEM, pIronbark); pIronbark->UpdateEntry(NPC_IRONBARK_REDEEMED); @@ -182,11 +155,11 @@ void instance_dire_maul::SetData(uint32 uiType, uint32 uiData) { if (!m_bWallDestroyed) { - DoUseDoorOrButton(m_uiCrumbleWallGUID); + DoUseDoorOrButton(GO_CRUMBLE_WALL); m_bWallDestroyed = true; } - DoUseDoorOrButton(m_uiCorruptVineGUID); + DoUseDoorOrButton(GO_CORRUPT_VINE); if (!m_lFelvineShardGUIDs.empty()) { @@ -196,7 +169,7 @@ void instance_dire_maul::SetData(uint32 uiType, uint32 uiData) } else if (uiData == SPECIAL && !m_bWallDestroyed) { - DoUseDoorOrButton(m_uiCrumbleWallGUID); + DoUseDoorOrButton(GO_CRUMBLE_WALL); m_bWallDestroyed = true; } m_auiEncounter[uiType] = uiData; @@ -206,12 +179,12 @@ void instance_dire_maul::SetData(uint32 uiType, uint32 uiData) case TYPE_IMMOLTHAR: if (uiData == DONE) { - if (Creature* pPrince = instance->GetCreature(m_uiPrinceTortheldrinGUID)) + if (Creature* pPrince = GetSingleCreatureFromStorage(NPC_PRINCE_TORTHELDRIN)) { DoScriptText(SAY_FREE_IMMOLTHAR, pPrince); pPrince->setFaction(FACTION_HOSTILE); // Despawn Chest-Aura - if (GameObject* pChestAura = instance->GetGameObject(m_uiPrincesChestAuraGUID)) + if (GameObject* pChestAura = GetSingleGameObjectFromStorage(GO_PRINCES_CHEST_AURA)) pChestAura->Use(pPrince); } } @@ -228,7 +201,7 @@ void instance_dire_maul::SetData(uint32 uiType, uint32 uiData) m_auiEncounter[uiType] = uiData; if (uiData == DONE) { - DoUseDoorOrButton(m_auiCrystalGeneratorGUID[uiType - TYPE_PYLON_1]); + DoUseDoorOrButton(m_aCrystalGeneratorGuid[uiType - TYPE_PYLON_1]); if (CheckAllGeneratorsDestroyed()) ProcessForceFieldOpening(); } @@ -275,17 +248,6 @@ uint32 instance_dire_maul::GetData(uint32 uiType) return 0; } -uint64 instance_dire_maul::GetData64(uint32 uiData) -{ - switch(uiData) - { - case NPC_CHORUSH: return m_uiChoRushGUID; - case NPC_KING_GORDOK: return m_uiGordokGUID; - default: - return 0; - } -} - void instance_dire_maul::OnCreatureEnterCombat(Creature* pCreature) { switch (pCreature->GetEntry()) @@ -294,35 +256,7 @@ void instance_dire_maul::OnCreatureEnterCombat(Creature* pCreature) // - Handling of guards of generators case NPC_ARCANE_ABERRATION: case NPC_MANA_REMNANT: - if (!m_lGeneratorGuardGUIDs.empty()) - { - for (uint8 i = 0; i < MAX_GENERATORS; ++i) - { - GameObject* pGenerator = instance->GetGameObject(m_auiCrystalGeneratorGUID[i]); - // Skip non-existing or finished generators - if (!pGenerator || GetData(TYPE_PYLON_1 + i) == DONE) - continue; - - // Sort all remaining (alive) NPCs to unfinished generators - for (GUIDList::iterator itr = m_lGeneratorGuardGUIDs.begin(); itr != m_lGeneratorGuardGUIDs.end();) - { - Creature* pGuard = instance->GetCreature(*itr); - if (!pGuard || pGuard->isDead()) // Remove invalid guids and dead guards - { - m_lGeneratorGuardGUIDs.erase(itr++); - continue; - } - - if (pGuard->IsWithinDistInMap(pGenerator, 20.0f)) - { - m_sSortedGeneratorGuards[i].insert(pGuard->GetGUIDLow()); - m_lGeneratorGuardGUIDs.erase(itr++); - } - else - ++itr; - } - } - } + SortPylonGuards(); break; // - Set InstData for ImmolThar case NPC_IMMOLTHAR: @@ -348,22 +282,8 @@ void instance_dire_maul::OnCreatureDeath(Creature* pCreature) // - Handling of guards of generators case NPC_ARCANE_ABERRATION: case NPC_MANA_REMNANT: - for (uint8 i = 0; i < MAX_GENERATORS; ++i) - { - // Skip already activated generators - if (GetData(TYPE_PYLON_1 + i) == DONE) - continue; - - // Only process generator where the npc is sorted in - if (m_sSortedGeneratorGuards[i].find(pCreature->GetGUIDLow()) != m_sSortedGeneratorGuards[i].end()) - { - m_sSortedGeneratorGuards[i].erase(pCreature->GetGUIDLow()); - if (m_sSortedGeneratorGuards[i].empty()) - SetData(TYPE_PYLON_1 + i, DONE); + PylonGuardJustDied(pCreature); - break; - } - } break; // - Set InstData for ImmolThar case NPC_IMMOLTHAR: @@ -417,10 +337,10 @@ bool instance_dire_maul::CheckAllGeneratorsDestroyed() void instance_dire_maul::ProcessForceFieldOpening() { // 'Open' the force field - DoUseDoorOrButton(m_uiForcefieldGUID); + DoUseDoorOrButton(GO_FORCEFIELD); // Let the summoners attack Immol'Thar - Creature* pImmolThar = instance->GetCreature(m_uiImmolTharGUID); + Creature* pImmolThar = GetSingleCreatureFromStorage(NPC_IMMOLTHAR); if (!pImmolThar || pImmolThar->isDead()) return; @@ -443,6 +363,59 @@ void instance_dire_maul::ProcessForceFieldOpening() m_luiHighborneSummonerGUIDs.clear(); } +void instance_dire_maul::SortPylonGuards() +{ + if (!m_lGeneratorGuardGUIDs.empty()) + { + for (uint8 i = 0; i < MAX_GENERATORS; ++i) + { + GameObject* pGenerator = instance->GetGameObject(m_aCrystalGeneratorGuid[i]); + // Skip non-existing or finished generators + if (!pGenerator || GetData(TYPE_PYLON_1 + i) == DONE) + continue; + + // Sort all remaining (alive) NPCs to unfinished generators + for (GUIDList::iterator itr = m_lGeneratorGuardGUIDs.begin(); itr != m_lGeneratorGuardGUIDs.end();) + { + Creature* pGuard = instance->GetCreature(*itr); + if (!pGuard || pGuard->isDead()) // Remove invalid guids and dead guards + { + m_lGeneratorGuardGUIDs.erase(itr++); + continue; + } + + if (pGuard->IsWithinDistInMap(pGenerator, 20.0f)) + { + m_sSortedGeneratorGuards[i].insert(pGuard->GetGUIDLow()); + m_lGeneratorGuardGUIDs.erase(itr++); + } + else + ++itr; + } + } + } +} + +void instance_dire_maul::PylonGuardJustDied(Creature* pCreature) +{ + for (uint8 i = 0; i < MAX_GENERATORS; ++i) + { + // Skip already activated generators + if (GetData(TYPE_PYLON_1 + i) == DONE) + continue; + + // Only process generator where the npc is sorted in + if (m_sSortedGeneratorGuards[i].find(pCreature->GetGUIDLow()) != m_sSortedGeneratorGuards[i].end()) + { + m_sSortedGeneratorGuards[i].erase(pCreature->GetGUIDLow()); + if (m_sSortedGeneratorGuards[i].empty()) + SetData(TYPE_PYLON_1 + i, DONE); + + break; + } + } +} + InstanceData* GetInstanceData_instance_dire_maul(Map* pMap) { return new instance_dire_maul(pMap); diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 799f2de11..b4739db0f 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2179" + #define SD2_REVISION_NR "2180" #endif // __SD2_REVISION_NR_H__ From 9723d1551476d390af36aeab49ee608013e0cb01 Mon Sep 17 00:00:00 2001 From: Cher0 Date: Fri, 3 Jun 2011 13:08:16 +0200 Subject: [PATCH 0161/1172] [2181] Cleanup in Shadowfang Keep * Move gossip to DB * Move to header based version Signed-off-by: Schmoozerd --- .../instance_shadowfang_keep.cpp | 322 ++++++++---------- .../shadowfang_keep/shadowfang_keep.cpp | 123 ++++--- .../shadowfang_keep/shadowfang_keep.h | 35 ++ sd2_revision_nr.h | 2 +- sql/scriptdev2_script_full.sql | 4 + sql/updates/r2181_scriptdev2.sql | 3 + 6 files changed, 254 insertions(+), 235 deletions(-) create mode 100644 sql/updates/r2181_scriptdev2.sql diff --git a/scripts/eastern_kingdoms/shadowfang_keep/instance_shadowfang_keep.cpp b/scripts/eastern_kingdoms/shadowfang_keep/instance_shadowfang_keep.cpp index d9ef5c9fe..96f3ee038 100644 --- a/scripts/eastern_kingdoms/shadowfang_keep/instance_shadowfang_keep.cpp +++ b/scripts/eastern_kingdoms/shadowfang_keep/instance_shadowfang_keep.cpp @@ -24,206 +24,185 @@ EndScriptData */ #include "precompiled.h" #include "shadowfang_keep.h" -struct MANGOS_DLL_DECL instance_shadowfang_keep : public ScriptedInstance +instance_shadowfang_keep::instance_shadowfang_keep(Map* pMap) : ScriptedInstance(pMap) { - instance_shadowfang_keep(Map* pMap) : ScriptedInstance(pMap) {Initialize();}; + Initialize(); +} - uint32 m_auiEncounter[MAX_ENCOUNTER]; - std::string strInstData; +void instance_shadowfang_keep::Initialize() +{ + memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); - uint64 m_uiAshGUID; - uint64 m_uiAdaGUID; + m_uiAshGUID = 0; + m_uiAdaGUID = 0; - uint64 m_uiDoorCourtyardGUID; - uint64 m_uiDoorSorcererGUID; - uint64 m_uiDoorArugalGUID; + m_uiDoorCourtyardGUID = 0; + m_uiDoorSorcererGUID = 0; + m_uiDoorArugalGUID = 0; - uint64 m_uiFenrusGUID; - uint64 m_uiVincentGUID; + m_uiFenrusGUID = 0; + m_uiVincentGUID = 0; - uint64 m_uiArugalFocusGUID; + m_uiArugalFocusGUID = 0; +} - void Initialize() +void instance_shadowfang_keep::OnCreatureCreate(Creature* pCreature) +{ + switch(pCreature->GetEntry()) { - memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); - - m_uiAshGUID = 0; - m_uiAdaGUID = 0; - - m_uiDoorCourtyardGUID = 0; - m_uiDoorSorcererGUID = 0; - m_uiDoorArugalGUID = 0; - - m_uiFenrusGUID = 0; - m_uiVincentGUID = 0; - - m_uiArugalFocusGUID = 0; + case NPC_ASH: m_uiAshGUID = pCreature->GetGUID(); break; + case NPC_ADA: m_uiAdaGUID = pCreature->GetGUID(); break; + case NPC_FENRUS: m_uiFenrusGUID = pCreature->GetGUID(); break; + case NPC_VINCENT: + m_uiVincentGUID = pCreature->GetGUID(); + // If Arugal has done the intro, make Vincent dead! + if (m_auiEncounter[4] == DONE) + pCreature->SetStandState(UNIT_STAND_STATE_DEAD); + break; } +} - void OnCreatureCreate(Creature* pCreature) +void instance_shadowfang_keep::OnObjectCreate(GameObject* pGo) +{ + switch(pGo->GetEntry()) { - switch(pCreature->GetEntry()) - { - case NPC_ASH: m_uiAshGUID = pCreature->GetGUID(); break; - case NPC_ADA: m_uiAdaGUID = pCreature->GetGUID(); break; - case NPC_FENRUS: m_uiFenrusGUID = pCreature->GetGUID(); break; - case NPC_VINCENT: - m_uiVincentGUID = pCreature->GetGUID(); - //if Arugal has done the intro, make Vincent dead! - if (m_auiEncounter[4] == DONE) - pCreature->SetStandState(UNIT_STAND_STATE_DEAD); - break; - } + case GO_COURTYARD_DOOR: + m_uiDoorCourtyardGUID = pGo->GetGUID(); + if (m_auiEncounter[0] == DONE) + pGo->SetGoState(GO_STATE_ACTIVE); + break; + // For this we ignore voidwalkers, because if the server restarts + // They won't be there, but Fenrus is dead so the door can't be opened! + case GO_SORCERER_DOOR: + m_uiDoorSorcererGUID = pGo->GetGUID(); + if (m_auiEncounter[2] == DONE) + pGo->SetGoState(GO_STATE_ACTIVE); + break; + case GO_ARUGAL_DOOR: + m_uiDoorArugalGUID = pGo->GetGUID(); + if (m_auiEncounter[3] == DONE) + pGo->SetGoState(GO_STATE_ACTIVE); + break; + case GO_ARUGAL_FOCUS: + m_uiArugalFocusGUID = pGo->GetGUID(); + break; } +} - void OnObjectCreate(GameObject* pGo) - { - switch(pGo->GetEntry()) - { - case GO_COURTYARD_DOOR: - m_uiDoorCourtyardGUID = pGo->GetGUID(); - if (m_auiEncounter[0] == DONE) - pGo->SetGoState(GO_STATE_ACTIVE); - break; - //for this we ignore voidwalkers, because if the server restarts - //they won't be there, but Fenrus is dead so the door can't be opened! - case GO_SORCERER_DOOR: - m_uiDoorSorcererGUID = pGo->GetGUID(); - if (m_auiEncounter[2] == DONE) - pGo->SetGoState(GO_STATE_ACTIVE); - break; - case GO_ARUGAL_DOOR: - m_uiDoorArugalGUID = pGo->GetGUID(); - if (m_auiEncounter[3] == DONE) - pGo->SetGoState(GO_STATE_ACTIVE); - break; - case GO_ARUGAL_FOCUS: - m_uiArugalFocusGUID = pGo->GetGUID(); - break; - } - } +void instance_shadowfang_keep::DoSpeech() +{ + Creature* pAda = instance->GetCreature(m_uiAdaGUID); + Creature* pAsh = instance->GetCreature(m_uiAshGUID); - void DoSpeech() + if (pAda && pAda->isAlive() && pAsh && pAsh->isAlive()) { - Creature* pAda = instance->GetCreature(m_uiAdaGUID); - Creature* pAsh = instance->GetCreature(m_uiAshGUID); - - if (pAda && pAda->isAlive() && pAsh && pAsh->isAlive()) - { - DoScriptText(SAY_BOSS_DIE_AD,pAda); - DoScriptText(SAY_BOSS_DIE_AS,pAsh); - } + DoScriptText(SAY_BOSS_DIE_AD,pAda); + DoScriptText(SAY_BOSS_DIE_AS,pAsh); } +} - void SetData(uint32 uiType, uint32 uiData) +void instance_shadowfang_keep::SetData(uint32 uiType, uint32 uiData) +{ + switch(uiType) { - switch(uiType) - { - case TYPE_FREE_NPC: - if (uiData == DONE) - DoUseDoorOrButton(m_uiDoorCourtyardGUID); - m_auiEncounter[0] = uiData; - break; - case TYPE_RETHILGORE: - if (uiData == DONE) - DoSpeech(); - m_auiEncounter[1] = uiData; - break; - case TYPE_FENRUS: - if (uiData == DONE) - if (Creature* pFenrus = instance->GetCreature(m_uiFenrusGUID)) - pFenrus->SummonCreature(NPC_ARCHMAGE_ARUGAL,-136.89f,2169.17f,136.58f,2.794f,TEMPSUMMON_TIMED_DESPAWN,30000); - m_auiEncounter[2] = uiData; - break; - case TYPE_NANDOS: - if (uiData == DONE) - DoUseDoorOrButton(m_uiDoorArugalGUID); - m_auiEncounter[3] = uiData; - break; - case TYPE_INTRO: - m_auiEncounter[4] = uiData; - break; - case TYPE_VOIDWALKER: - if (uiData == DONE) - { - m_auiEncounter[5]++; - if (m_auiEncounter[5] > 3) - DoUseDoorOrButton(m_uiDoorSorcererGUID); - } - break; - } - - if (uiData == DONE) - { - OUT_SAVE_INST_DATA; - - std::ostringstream saveStream; - saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2] << " " << m_auiEncounter[3] - << " " << m_auiEncounter[4] << " " << m_auiEncounter[5]; - - strInstData = saveStream.str(); - - SaveToDB(); - OUT_SAVE_INST_DATA_COMPLETE; - } + case TYPE_FREE_NPC: + if (uiData == DONE) + DoUseDoorOrButton(m_uiDoorCourtyardGUID); + m_auiEncounter[0] = uiData; + break; + case TYPE_RETHILGORE: + if (uiData == DONE) + DoSpeech(); + m_auiEncounter[1] = uiData; + break; + case TYPE_FENRUS: + if (uiData == DONE) + { + if (Creature* pFenrus = instance->GetCreature(m_uiFenrusGUID)) + pFenrus->SummonCreature(NPC_ARCHMAGE_ARUGAL, -136.89f, 2169.17f, 136.58f, 2.794f, TEMPSUMMON_TIMED_DESPAWN, 30000); + } + m_auiEncounter[2] = uiData; + break; + case TYPE_NANDOS: + if (uiData == DONE) + DoUseDoorOrButton(m_uiDoorArugalGUID); + m_auiEncounter[3] = uiData; + break; + case TYPE_INTRO: + m_auiEncounter[4] = uiData; + break; + case TYPE_VOIDWALKER: + if (uiData == DONE) + { + m_auiEncounter[5]++; + if (m_auiEncounter[5] > 3) + DoUseDoorOrButton(m_uiDoorSorcererGUID); + } + break; } - uint32 GetData(uint32 uiType) + if (uiData == DONE) { - switch(uiType) - { - case TYPE_FREE_NPC: - return m_auiEncounter[0]; - case TYPE_RETHILGORE: - return m_auiEncounter[1]; - case TYPE_FENRUS: - return m_auiEncounter[2]; - case TYPE_NANDOS: - return m_auiEncounter[3]; - case TYPE_INTRO: - return m_auiEncounter[4]; - } - return 0; + OUT_SAVE_INST_DATA; + + std::ostringstream saveStream; + saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2] << " " << m_auiEncounter[3] + << " " << m_auiEncounter[4] << " " << m_auiEncounter[5]; + + m_strInstData = saveStream.str(); + + SaveToDB(); + OUT_SAVE_INST_DATA_COMPLETE; } +} - uint64 GetData64(uint32 uiType) +uint32 instance_shadowfang_keep::GetData(uint32 uiType) +{ + switch(uiType) { - switch(uiType) - { - case GO_ARUGAL_FOCUS: - return m_uiArugalFocusGUID; - } - return 0; + case TYPE_FREE_NPC: return m_auiEncounter[0]; + case TYPE_RETHILGORE: return m_auiEncounter[1]; + case TYPE_FENRUS: return m_auiEncounter[2]; + case TYPE_NANDOS: return m_auiEncounter[3]; + case TYPE_INTRO: return m_auiEncounter[4]; + + default: + return 0; } +} - const char* Save() +uint64 instance_shadowfang_keep::GetData64(uint32 uiType) +{ + switch(uiType) { - return strInstData.c_str(); + case GO_ARUGAL_FOCUS: + return m_uiArugalFocusGUID; } + return 0; +} - void Load(const char* chrIn) +void instance_shadowfang_keep::Load(const char* chrIn) +{ + if (!chrIn) { - if (!chrIn) - { - OUT_LOAD_INST_DATA_FAIL; - return; - } - - OUT_LOAD_INST_DATA(chrIn); + OUT_LOAD_INST_DATA_FAIL; + return; + } - std::istringstream loadStream(chrIn); - loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3] - >> m_auiEncounter[4] >> m_auiEncounter[5]; + OUT_LOAD_INST_DATA(chrIn); - for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) - { - if (m_auiEncounter[i] == IN_PROGRESS) - m_auiEncounter[i] = NOT_STARTED; - } + std::istringstream loadStream(chrIn); + loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3] + >> m_auiEncounter[4] >> m_auiEncounter[5]; - OUT_LOAD_INST_DATA_COMPLETE; + for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) + { + if (m_auiEncounter[i] == IN_PROGRESS) + m_auiEncounter[i] = NOT_STARTED; } -}; + + OUT_LOAD_INST_DATA_COMPLETE; +} InstanceData* GetInstanceData_instance_shadowfang_keep(Map* pMap) { @@ -232,9 +211,10 @@ InstanceData* GetInstanceData_instance_shadowfang_keep(Map* pMap) void AddSC_instance_shadowfang_keep() { - Script *newscript; - newscript = new Script; - newscript->Name = "instance_shadowfang_keep"; - newscript->GetInstanceData = &GetInstanceData_instance_shadowfang_keep; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "instance_shadowfang_keep"; + pNewScript->GetInstanceData = &GetInstanceData_instance_shadowfang_keep; + pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.cpp b/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.cpp index 716e795e9..1001fdee9 100644 --- a/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.cpp +++ b/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.cpp @@ -51,9 +51,9 @@ enum SPELL_UNLOCK = 6421, SPELL_FIRE = 6422, -}; -#define GOSSIP_ITEM_DOOR "Please unlock the courtyard door." + GOSSIP_ITEM_DOOR = -3033000 +}; struct MANGOS_DLL_DECL npc_shadowfang_prisonerAI : public npc_escortAI { @@ -120,8 +120,8 @@ struct MANGOS_DLL_DECL npc_shadowfang_prisonerAI : public npc_escortAI void Reset() {} - //let's prevent Adamant from charging into Ashcrombe's cell - //and beating the crap out of him and vice versa XD + // Let's prevent Adamant from charging into Ashcrombe's cell + // And beating the crap out of him and vice versa XD void AttackStart(Unit* pWho) { if (pWho) @@ -144,7 +144,7 @@ bool GossipHello_npc_shadowfang_prisoner(Player* pPlayer, Creature* pCreature) ScriptedInstance* pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); if (pInstance && pInstance->GetData(TYPE_FREE_NPC) != DONE && pInstance->GetData(TYPE_RETHILGORE) == DONE) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_DOOR, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_DOOR, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); return true; @@ -171,12 +171,11 @@ struct Waypoint float fX, fY, fZ; }; -//Cordinates for voidwalker spawns +// Cordinates for voidwalker spawns static const Waypoint VWWaypoints[]= { - //fX fY fZ - {-146.06f, 2172.84f, 127.953f}, //this is the initial location, in the middle of the room - {-159.547f, 2178.11f, 128.944f}, //when they come back up, they hit this point then walk back down + {-146.06f, 2172.84f, 127.953f}, // This is the initial location, in the middle of the room + {-159.547f, 2178.11f, 128.944f}, // When they come back up, they hit this point then walk back down {-171.113f, 2182.69f, 129.255f}, {-177.613f, 2175.59f, 128.161f}, {-185.396f, 2178.35f, 126.413f}, @@ -211,7 +210,7 @@ struct MANGOS_DLL_DECL mob_arugal_voidwalkerAI : public ScriptedAI } uint32 m_uiResetTimer, m_uiDarkOffering; - uint8 m_uiCurrentPoint, m_uiPosition; //0 - leader, 1 - behind-right, 2 - behind, 3 - behind-left + uint8 m_uiCurrentPoint, m_uiPosition; // 0 - leader, 1 - behind-right, 2 - behind, 3 - behind-left uint64 m_uiLeaderGUID; ScriptedInstance* m_pInstance; bool m_bIsLeader, m_bReverse, m_bWPDone; @@ -219,7 +218,7 @@ struct MANGOS_DLL_DECL mob_arugal_voidwalkerAI : public ScriptedAI void Reset() { m_creature->AddSplineFlag(SPLINEFLAG_WALKMODE); - m_uiDarkOffering = urand(4400,12500); + m_uiDarkOffering = urand(4400, 12500); m_bWPDone = true; Creature* pLeader = m_creature->GetMap()->GetCreature(m_uiLeaderGUID); @@ -269,8 +268,6 @@ struct MANGOS_DLL_DECL mob_arugal_voidwalkerAI : public ScriptedAI } } - //this is the ACID script converted into C++ - //unfortunately, we can't have both AIs at the same time :( void UpdateAI(const uint32 uiDiff) { if (m_bIsLeader && m_bWPDone) @@ -285,7 +282,7 @@ struct MANGOS_DLL_DECL mob_arugal_voidwalkerAI : public ScriptedAI if (m_uiDarkOffering < uiDiff) { - m_uiDarkOffering = urand(4400,12500); + m_uiDarkOffering = urand(4400, 12500); if (Unit* pUnit = DoSelectLowestHpFriendly(10.0f, 290)) DoCastSpellIfCan(pUnit, SPELL_DARK_OFFERING); @@ -293,7 +290,7 @@ struct MANGOS_DLL_DECL mob_arugal_voidwalkerAI : public ScriptedAI else m_uiDarkOffering -= uiDiff; - //Check if we have a current target + // Check if we have a current target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -407,9 +404,9 @@ enum enum ArugalPosition { - POSITION_SPAWN_LEDGE = 1, - POSITION_UPPER_LEDGE, - POSITION_STAIRS + POSITION_SPAWN_LEDGE = 0, + POSITION_UPPER_LEDGE = 1, + POSITION_STAIRS = 2 }; struct SpawnPoint @@ -417,18 +414,18 @@ struct SpawnPoint float fX, fY, fZ, fO; }; -//Cordinates for voidwalker spawns +// Cordinates for voidwalker spawns static const SpawnPoint VWSpawns[]= { //fX fY fZ fO {-155.352f, 2172.780f, 128.448f, 4.679f}, {-147.059f, 2163.193f, 128.696f, 0.128f}, {-148.869f, 2180.859f, 128.448f, 1.814f}, - {-140.203f, 2175.263f, 128.448f, 0.373f}, + {-140.203f, 2175.263f, 128.448f, 0.373f} }; -//roughly the height of Fenrus' room, -//used to tell how he should behave +// Roughly the height of Fenrus' room, +// Used to tell how he should behave const float HEIGHT_FENRUS_ROOM = 140.0f; struct MANGOS_DLL_DECL boss_arugalAI : public ScriptedAI @@ -510,12 +507,13 @@ struct MANGOS_DLL_DECL boss_arugalAI : public ScriptedAI m_uiSpeechTimer = 500; break; case 5: - Creature *pVoidwalker, *pLeader; - pVoidwalker = pLeader = NULL; + { + Creature* pVoidwalker = NULL; + Creature* pLeader = NULL; - for(uint8 i = 0; i < 4; ++i) + for (uint8 i = 0; i < 4; ++i) { - pVoidwalker = m_creature->SummonCreature(NPC_VOIDWALKER,VWSpawns[i].fX, + pVoidwalker = m_creature->SummonCreature(NPC_VOIDWALKER, VWSpawns[i].fX, VWSpawns[i].fY, VWSpawns[i].fZ, VWSpawns[i].fO, TEMPSUMMON_DEAD_DESPAWN, 1); if (!pVoidwalker) @@ -531,6 +529,7 @@ struct MANGOS_DLL_DECL boss_arugalAI : public ScriptedAI } m_uiSpeechStep = 0; return; + } default: m_uiSpeechStep = 0; return; @@ -543,7 +542,7 @@ struct MANGOS_DLL_DECL boss_arugalAI : public ScriptedAI return; } - //Check if we have a current target + // Check if we have a current target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -607,10 +606,10 @@ struct MANGOS_DLL_DECL boss_arugalAI : public ScriptedAI ArugalPosition posNewPosition; if (m_posPosition == POSITION_SPAWN_LEDGE) - posNewPosition = (ArugalPosition)urand(2, 3); + posNewPosition = (ArugalPosition)urand(1, 2); else { - posNewPosition = (ArugalPosition)urand(1, 2); + posNewPosition = (ArugalPosition)urand(0, 1); if (m_posPosition == posNewPosition) posNewPosition = POSITION_STAIRS; @@ -663,7 +662,7 @@ struct MANGOS_DLL_DECL boss_arugalAI : public ScriptedAI ScriptedAI::AttackStart(pWho); } - //make the code nice and pleasing to the eye + // Make the code nice and pleasing to the eye inline float GetManaPercent() { return (((float)m_creature->GetPower(POWER_MANA) / (float)m_creature->GetMaxPower(POWER_MANA)) * 100); @@ -760,7 +759,7 @@ struct MANGOS_DLL_DECL npc_arugalAI : public ScriptedAI m_uiSpeechTimer = 2000; break; case 3: - //make him die + // Make him die if (Creature* pVincent = GetClosestCreatureWithEntry(m_creature,NPC_VINCENT,20.0f)) pVincent->SetStandState(UNIT_STAND_STATE_DEAD); @@ -768,7 +767,7 @@ struct MANGOS_DLL_DECL npc_arugalAI : public ScriptedAI break; case 4: DoScriptText(SAY_INTRO_1, m_creature); - //m_creature->HandleEmote(EMOTE_ONESHOT_TALK); + // m_creature->HandleEmote(EMOTE_ONESHOT_TALK); m_uiSpeechTimer = 1750; break; case 5: @@ -784,7 +783,7 @@ struct MANGOS_DLL_DECL npc_arugalAI : public ScriptedAI m_uiSpeechTimer = 1750; break; case 8: - //m_creature->HandleEmote(EMOTE_ONESHOT_TALK); + // m_creature->HandleEmote(EMOTE_ONESHOT_TALK); DoScriptText(SAY_INTRO_3, m_creature); m_uiSpeechTimer = 1750; break; @@ -886,9 +885,7 @@ struct MANGOS_DLL_DECL npc_deathstalker_vincentAI : public ScriptedAI m_creature->DeleteThreatList(); m_creature->CombatStop(true); m_creature->LoadCreatureAddon(); - m_creature->SetLootRecipient(NULL); - Reset(); } }; @@ -900,32 +897,32 @@ CreatureAI* GetAI_npc_deathstalker_vincent(Creature* pCreature) void AddSC_shadowfang_keep() { - Script *newscript; - - newscript = new Script; - newscript->Name = "npc_shadowfang_prisoner"; - newscript->pGossipHello = &GossipHello_npc_shadowfang_prisoner; - newscript->pGossipSelect = &GossipSelect_npc_shadowfang_prisoner; - newscript->GetAI = &GetAI_npc_shadowfang_prisoner; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "mob_arugal_voidwalker"; - newscript->GetAI = &GetAI_mob_arugal_voidwalker; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_arugal"; - newscript->GetAI = &GetAI_npc_arugal; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "boss_arugal"; - newscript->GetAI = &GetAI_boss_arugal; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_deathstalker_vincent"; - newscript->GetAI = &GetAI_npc_deathstalker_vincent; - newscript->RegisterSelf(); + Script *pNewScript; + + pNewScript = new Script; + pNewScript->Name = "npc_shadowfang_prisoner"; + pNewScript->pGossipHello = &GossipHello_npc_shadowfang_prisoner; + pNewScript->pGossipSelect = &GossipSelect_npc_shadowfang_prisoner; + pNewScript->GetAI = &GetAI_npc_shadowfang_prisoner; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "mob_arugal_voidwalker"; + pNewScript->GetAI = &GetAI_mob_arugal_voidwalker; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_arugal"; + pNewScript->GetAI = &GetAI_npc_arugal; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "boss_arugal"; + pNewScript->GetAI = &GetAI_boss_arugal; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_deathstalker_vincent"; + pNewScript->GetAI = &GetAI_npc_deathstalker_vincent; + pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.h b/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.h index a39a8a5c0..aecd7cf42 100644 --- a/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.h +++ b/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.h @@ -32,4 +32,39 @@ enum GO_ARUGAL_FOCUS = 18973, //this generates the lightning visual in the Fenrus event }; +class MANGOS_DLL_DECL instance_shadowfang_keep : public ScriptedInstance +{ + public: + instance_shadowfang_keep(Map* pMap); + + void Initialize(); + + void OnCreatureCreate(Creature* pCreature); + void OnObjectCreate(GameObject* pGo); + void DoSpeech(); + + void SetData(uint32 uiType, uint32 uiData); + uint32 GetData(uint32 uiType); + uint64 GetData64(uint32 uiType); + + const char* Save() { return m_strInstData.c_str(); } + void Load(const char* chrIn); + + private: + uint32 m_auiEncounter[MAX_ENCOUNTER]; + std::string m_strInstData; + + uint64 m_uiAshGUID; + uint64 m_uiAdaGUID; + + uint64 m_uiDoorCourtyardGUID; + uint64 m_uiDoorSorcererGUID; + uint64 m_uiDoorArugalGUID; + + uint64 m_uiFenrusGUID; + uint64 m_uiVincentGUID; + + uint64 m_uiArugalFocusGUID; +}; + #endif diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index b4739db0f..1858fd6c2 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2180" + #define SD2_REVISION_NR "2181" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 58d073764..b3f0c30cb 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -3524,6 +3524,10 @@ INSERT INTO gossip_texts (entry,content_default,comment) VALUES (-3000107,'[PH] Get Presicion Bombs','greer orehammer GOSSIP_ITEM_GET_BOMBS'), (-3000108,'[PH] Start bombing mission','greer orehammer GOSSIP_ITEM_FLIGHT'); +-- -3 033 000 SHADOWFANG KEEP +INSERT INTO gossip_texts (entry,content_default,comment) VALUES +(-3033000,'Please unlock the courtyard door.','deathstalker adamant/ sorcerer ashcrombe - GOSSIP_ITEM_DOOR'); + -- -3 043 000 WAILING CAVERNS INSERT INTO gossip_texts (entry,content_default,comment) VALUES (-3043000,'Let the event begin!','Disciple of Naralex - GOSSIP_ITEM_BEGIN'); diff --git a/sql/updates/r2181_scriptdev2.sql b/sql/updates/r2181_scriptdev2.sql new file mode 100644 index 000000000..86acf55b1 --- /dev/null +++ b/sql/updates/r2181_scriptdev2.sql @@ -0,0 +1,3 @@ +DELETE FROM gossip_texts WHERE entry=-3033000; +INSERT INTO gossip_texts (entry,content_default,comment) VALUES +(-3033000,'Please unlock the courtyard door.','deathstalker adamant/ sorcerer ashcrombe - GOSSIP_ITEM_DOOR'); From 9bc32690d828783edb6ae53c96cbda7b0431d07d Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Sat, 4 Jun 2011 12:52:23 +0200 Subject: [PATCH 0162/1172] [2182] Use EntryGuidMap-Storage in Shadowfang Keep --- .../instance_shadowfang_keep.cpp | 54 +++++++------------ .../shadowfang_keep/shadowfang_keep.cpp | 16 +++--- .../shadowfang_keep/shadowfang_keep.h | 13 ----- sd2_revision_nr.h | 2 +- 4 files changed, 29 insertions(+), 56 deletions(-) diff --git a/scripts/eastern_kingdoms/shadowfang_keep/instance_shadowfang_keep.cpp b/scripts/eastern_kingdoms/shadowfang_keep/instance_shadowfang_keep.cpp index 96f3ee038..22ff3a9dc 100644 --- a/scripts/eastern_kingdoms/shadowfang_keep/instance_shadowfang_keep.cpp +++ b/scripts/eastern_kingdoms/shadowfang_keep/instance_shadowfang_keep.cpp @@ -32,34 +32,26 @@ instance_shadowfang_keep::instance_shadowfang_keep(Map* pMap) : ScriptedInstance void instance_shadowfang_keep::Initialize() { memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); - - m_uiAshGUID = 0; - m_uiAdaGUID = 0; - - m_uiDoorCourtyardGUID = 0; - m_uiDoorSorcererGUID = 0; - m_uiDoorArugalGUID = 0; - - m_uiFenrusGUID = 0; - m_uiVincentGUID = 0; - - m_uiArugalFocusGUID = 0; } void instance_shadowfang_keep::OnCreatureCreate(Creature* pCreature) { switch(pCreature->GetEntry()) { - case NPC_ASH: m_uiAshGUID = pCreature->GetGUID(); break; - case NPC_ADA: m_uiAdaGUID = pCreature->GetGUID(); break; - case NPC_FENRUS: m_uiFenrusGUID = pCreature->GetGUID(); break; + case NPC_ASH: + case NPC_ADA: + case NPC_FENRUS: + break; case NPC_VINCENT: - m_uiVincentGUID = pCreature->GetGUID(); // If Arugal has done the intro, make Vincent dead! if (m_auiEncounter[4] == DONE) pCreature->SetStandState(UNIT_STAND_STATE_DEAD); break; + + default: + return; } + m_mNpcEntryGuidStore[pCreature->GetEntry()] = pCreature->GetObjectGuid(); } void instance_shadowfang_keep::OnObjectCreate(GameObject* pGo) @@ -67,32 +59,32 @@ void instance_shadowfang_keep::OnObjectCreate(GameObject* pGo) switch(pGo->GetEntry()) { case GO_COURTYARD_DOOR: - m_uiDoorCourtyardGUID = pGo->GetGUID(); if (m_auiEncounter[0] == DONE) pGo->SetGoState(GO_STATE_ACTIVE); break; // For this we ignore voidwalkers, because if the server restarts // They won't be there, but Fenrus is dead so the door can't be opened! case GO_SORCERER_DOOR: - m_uiDoorSorcererGUID = pGo->GetGUID(); if (m_auiEncounter[2] == DONE) pGo->SetGoState(GO_STATE_ACTIVE); break; case GO_ARUGAL_DOOR: - m_uiDoorArugalGUID = pGo->GetGUID(); if (m_auiEncounter[3] == DONE) pGo->SetGoState(GO_STATE_ACTIVE); break; case GO_ARUGAL_FOCUS: - m_uiArugalFocusGUID = pGo->GetGUID(); break; + + default: + return; } + m_mGoEntryGuidStore[pGo->GetEntry()] = pGo->GetObjectGuid(); } void instance_shadowfang_keep::DoSpeech() { - Creature* pAda = instance->GetCreature(m_uiAdaGUID); - Creature* pAsh = instance->GetCreature(m_uiAshGUID); + Creature* pAda = GetSingleCreatureFromStorage(NPC_ADA); + Creature* pAsh = GetSingleCreatureFromStorage(NPC_ASH); if (pAda && pAda->isAlive() && pAsh && pAsh->isAlive()) { @@ -107,7 +99,7 @@ void instance_shadowfang_keep::SetData(uint32 uiType, uint32 uiData) { case TYPE_FREE_NPC: if (uiData == DONE) - DoUseDoorOrButton(m_uiDoorCourtyardGUID); + DoUseDoorOrButton(GO_COURTYARD_DOOR); m_auiEncounter[0] = uiData; break; case TYPE_RETHILGORE: @@ -118,14 +110,14 @@ void instance_shadowfang_keep::SetData(uint32 uiType, uint32 uiData) case TYPE_FENRUS: if (uiData == DONE) { - if (Creature* pFenrus = instance->GetCreature(m_uiFenrusGUID)) + if (Creature* pFenrus = GetSingleCreatureFromStorage(NPC_FENRUS)) pFenrus->SummonCreature(NPC_ARCHMAGE_ARUGAL, -136.89f, 2169.17f, 136.58f, 2.794f, TEMPSUMMON_TIMED_DESPAWN, 30000); } m_auiEncounter[2] = uiData; break; case TYPE_NANDOS: if (uiData == DONE) - DoUseDoorOrButton(m_uiDoorArugalGUID); + DoUseDoorOrButton(GO_ARUGAL_DOOR); m_auiEncounter[3] = uiData; break; case TYPE_INTRO: @@ -136,7 +128,7 @@ void instance_shadowfang_keep::SetData(uint32 uiType, uint32 uiData) { m_auiEncounter[5]++; if (m_auiEncounter[5] > 3) - DoUseDoorOrButton(m_uiDoorSorcererGUID); + DoUseDoorOrButton(GO_SORCERER_DOOR); } break; } @@ -171,16 +163,6 @@ uint32 instance_shadowfang_keep::GetData(uint32 uiType) } } -uint64 instance_shadowfang_keep::GetData64(uint32 uiType) -{ - switch(uiType) - { - case GO_ARUGAL_FOCUS: - return m_uiArugalFocusGUID; - } - return 0; -} - void instance_shadowfang_keep::Load(const char* chrIn) { if (!chrIn) diff --git a/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.cpp b/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.cpp index 1001fdee9..c152e0e88 100644 --- a/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.cpp +++ b/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.cpp @@ -204,14 +204,13 @@ struct MANGOS_DLL_DECL mob_arugal_voidwalkerAI : public ScriptedAI { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); m_bIsLeader = false; - m_uiLeaderGUID = 0; m_uiCurrentPoint = 0; m_bReverse = false; } uint32 m_uiResetTimer, m_uiDarkOffering; uint8 m_uiCurrentPoint, m_uiPosition; // 0 - leader, 1 - behind-right, 2 - behind, 3 - behind-left - uint64 m_uiLeaderGUID; + ObjectGuid m_leaderGuid; ScriptedInstance* m_pInstance; bool m_bIsLeader, m_bReverse, m_bWPDone; @@ -221,7 +220,7 @@ struct MANGOS_DLL_DECL mob_arugal_voidwalkerAI : public ScriptedAI m_uiDarkOffering = urand(4400, 12500); m_bWPDone = true; - Creature* pLeader = m_creature->GetMap()->GetCreature(m_uiLeaderGUID); + Creature* pLeader = m_creature->GetMap()->GetCreature(m_leaderGuid); if (pLeader && pLeader->isAlive()) { m_creature->GetMotionMaster()->MoveFollow(pLeader, 1.0f, M_PI/2*m_uiPosition); @@ -250,7 +249,7 @@ struct MANGOS_DLL_DECL mob_arugal_voidwalkerAI : public ScriptedAI if (pNewLeader) { - m_uiLeaderGUID = pNewLeader->GetGUID(); + m_leaderGuid = pNewLeader->GetObjectGuid(); if (pNewLeader == m_creature) { m_bIsLeader = true; @@ -337,7 +336,12 @@ struct MANGOS_DLL_DECL mob_arugal_voidwalkerAI : public ScriptedAI if (!uiPosition) m_bIsLeader = true; else - pLeader ? m_uiLeaderGUID = pLeader->GetGUID() : m_uiLeaderGUID = 0; + { + if (pLeader) + m_leaderGuid = pLeader->GetObjectGuid(); + else + m_leaderGuid.Clear(); + } Reset(); } @@ -497,7 +501,7 @@ struct MANGOS_DLL_DECL boss_arugalAI : public ScriptedAI break; case 3: if (m_pInstance) - if (GameObject* pLightning = m_creature->GetMap()->GetGameObject(m_pInstance->GetData64(GO_ARUGAL_FOCUS))) + if (GameObject* pLightning = m_pInstance->GetSingleGameObjectFromStorage(GO_ARUGAL_FOCUS)) pLightning->Use(m_creature); m_uiSpeechTimer = 5000; diff --git a/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.h b/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.h index aecd7cf42..4a40cab52 100644 --- a/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.h +++ b/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.h @@ -45,7 +45,6 @@ class MANGOS_DLL_DECL instance_shadowfang_keep : public ScriptedInstance void SetData(uint32 uiType, uint32 uiData); uint32 GetData(uint32 uiType); - uint64 GetData64(uint32 uiType); const char* Save() { return m_strInstData.c_str(); } void Load(const char* chrIn); @@ -53,18 +52,6 @@ class MANGOS_DLL_DECL instance_shadowfang_keep : public ScriptedInstance private: uint32 m_auiEncounter[MAX_ENCOUNTER]; std::string m_strInstData; - - uint64 m_uiAshGUID; - uint64 m_uiAdaGUID; - - uint64 m_uiDoorCourtyardGUID; - uint64 m_uiDoorSorcererGUID; - uint64 m_uiDoorArugalGUID; - - uint64 m_uiFenrusGUID; - uint64 m_uiVincentGUID; - - uint64 m_uiArugalFocusGUID; }; #endif diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 1858fd6c2..c99de98a2 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2181" + #define SD2_REVISION_NR "2182" #endif // __SD2_REVISION_NR_H__ From 66d2d336ab3f4399b70d6450bfe434073f46049f Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Sat, 4 Jun 2011 13:18:27 +0200 Subject: [PATCH 0163/1172] [2183] Remaining uint64 -> ObjectGuid conversions in Eastern Kingdoms --- scripts/eastern_kingdoms/eversong_woods.cpp | 18 ++++---- .../boss_priestess_delrissa.cpp | 41 +++++++++---------- .../stratholme/stratholme.cpp | 9 ++-- .../sunken_temple/instance_sunken_temple.cpp | 2 +- .../eastern_kingdoms/zulaman/boss_janalai.cpp | 23 +++++------ .../zulaman/boss_malacrass.cpp | 19 +++++---- .../eastern_kingdoms/zulgurub/boss_arlokk.cpp | 14 +++---- .../zulgurub/boss_mandokir.cpp | 23 +++++------ sd2_revision_nr.h | 2 +- 9 files changed, 72 insertions(+), 79 deletions(-) diff --git a/scripts/eastern_kingdoms/eversong_woods.cpp b/scripts/eastern_kingdoms/eversong_woods.cpp index fec5a7552..dbfcb72eb 100644 --- a/scripts/eastern_kingdoms/eversong_woods.cpp +++ b/scripts/eastern_kingdoms/eversong_woods.cpp @@ -352,22 +352,22 @@ enum struct MANGOS_DLL_DECL npc_apprentice_mirvedaAI : public ScriptedAI { - npc_apprentice_mirvedaAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + npc_apprentice_mirvedaAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } uint8 m_uiMobCount; uint32 m_uiFireballTimer; - uint64 m_uiPlayerGUID; + ObjectGuid m_playerGuid; void Reset() { m_uiMobCount = 0; - m_uiPlayerGUID = 0; + m_playerGuid.Clear(); m_uiFireballTimer = 0; } void JustDied(Unit* pKiller) { - Player* pPlayer = m_creature->GetMap()->GetPlayer(m_uiPlayerGUID); + Player* pPlayer = m_creature->GetMap()->GetPlayer(m_playerGuid); if (pPlayer && pPlayer->GetQuestStatus(QUEST_UNEXPECTED_RESULT) == QUEST_STATUS_INCOMPLETE) pPlayer->SendQuestFailed(QUEST_UNEXPECTED_RESULT); @@ -386,19 +386,19 @@ struct MANGOS_DLL_DECL npc_apprentice_mirvedaAI : public ScriptedAI if (m_uiMobCount) return; - Player* pPlayer = m_creature->GetMap()->GetPlayer(m_uiPlayerGUID); + Player* pPlayer = m_creature->GetMap()->GetPlayer(m_playerGuid); if (pPlayer && pPlayer->GetQuestStatus(QUEST_UNEXPECTED_RESULT) == QUEST_STATUS_INCOMPLETE) pPlayer->GroupEventHappens(QUEST_UNEXPECTED_RESULT, m_creature); - m_uiPlayerGUID = 0; + m_playerGuid.Clear(); m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER); } - void StartEvent(uint64 uiPlayerGUID) + void StartEvent(Player* pPlayer) { m_creature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER); - m_uiPlayerGUID = uiPlayerGUID; + m_playerGuid = pPlayer->GetObjectGuid(); m_creature->SummonCreature(NPC_GHARSUL, 8745.0f, -7134.32f, 35.22f, 0.0f, TEMPSUMMON_CORPSE_DESPAWN, 4000); m_creature->SummonCreature(NPC_ANGERSHADE, 8745.0f, -7134.32f, 35.22f, 0.0f, TEMPSUMMON_CORPSE_DESPAWN, 4000); @@ -427,7 +427,7 @@ bool QuestAccept_unexpected_results(Player* pPlayer, Creature* pCreature, const { if (pQuest->GetQuestId() == QUEST_UNEXPECTED_RESULT) if (npc_apprentice_mirvedaAI* pMirvedaAI = dynamic_cast(pCreature->AI())) - pMirvedaAI->StartEvent(pPlayer->GetGUID()); + pMirvedaAI->StartEvent(pPlayer); return true; } diff --git a/scripts/eastern_kingdoms/magisters_terrace/boss_priestess_delrissa.cpp b/scripts/eastern_kingdoms/magisters_terrace/boss_priestess_delrissa.cpp index cf0d42e0b..939cc3083 100644 --- a/scripts/eastern_kingdoms/magisters_terrace/boss_priestess_delrissa.cpp +++ b/scripts/eastern_kingdoms/magisters_terrace/boss_priestess_delrissa.cpp @@ -91,7 +91,6 @@ struct MANGOS_DLL_DECL boss_priestess_delrissaAI : public ScriptedAI { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); - memset(&m_auiLackeyGUID, 0, sizeof(m_auiLackeyGUID)); LackeyEntryList.clear(); Reset(); } @@ -100,7 +99,7 @@ struct MANGOS_DLL_DECL boss_priestess_delrissaAI : public ScriptedAI bool m_bIsRegularMode; std::vector LackeyEntryList; - uint64 m_auiLackeyGUID[MAX_ACTIVE_LACKEY]; + ObjectGuid m_aLackeyGuid[MAX_ACTIVE_LACKEY]; uint8 PlayersKilled; @@ -136,7 +135,7 @@ struct MANGOS_DLL_DECL boss_priestess_delrissaAI : public ScriptedAI for(uint8 i = 0; i < MAX_ACTIVE_LACKEY; ++i) { - if (Creature* pAdd = m_creature->GetMap()->GetCreature(m_auiLackeyGUID[i])) + if (Creature* pAdd = m_creature->GetMap()->GetCreature(m_aLackeyGuid[i])) { if (!pAdd->getVictim()) { @@ -176,7 +175,7 @@ struct MANGOS_DLL_DECL boss_priestess_delrissaAI : public ScriptedAI for(std::vector::iterator itr = LackeyEntryList.begin(); itr != LackeyEntryList.end(); ++itr) { if (Creature* pAdd = m_creature->SummonCreature((*itr), LackeyLocations[j][0], LackeyLocations[j][1], fZLocation, fOrientation, TEMPSUMMON_CORPSE_DESPAWN, 0)) - m_auiLackeyGUID[j] = pAdd->GetGUID(); + m_aLackeyGuid[j] = pAdd->GetObjectGuid(); ++j; } @@ -185,13 +184,13 @@ struct MANGOS_DLL_DECL boss_priestess_delrissaAI : public ScriptedAI { for(std::vector::iterator itr = LackeyEntryList.begin(); itr != LackeyEntryList.end(); ++itr) { - Creature* pAdd = m_creature->GetMap()->GetCreature(m_auiLackeyGUID[j]); + Creature* pAdd = m_creature->GetMap()->GetCreature(m_aLackeyGuid[j]); //object already removed, not exist if (!pAdd) { if (Creature* pAdd = m_creature->SummonCreature((*itr), LackeyLocations[j][0], LackeyLocations[j][1], fZLocation, fOrientation, TEMPSUMMON_CORPSE_DESPAWN, 0)) - m_auiLackeyGUID[j] = pAdd->GetGUID(); + m_aLackeyGuid[j] = pAdd->GetObjectGuid(); } ++j; } @@ -237,7 +236,7 @@ struct MANGOS_DLL_DECL boss_priestess_delrissaAI : public ScriptedAI for(uint8 i = 0; i < MAX_ACTIVE_LACKEY; ++i) { - if (Creature* pAdd = m_creature->GetMap()->GetCreature(m_auiLackeyGUID[i])) + if (Creature* pAdd = m_creature->GetMap()->GetCreature(m_aLackeyGuid[i])) { if (pAdd->isAlive() && pAdd->GetHealth() < health) target = pAdd; @@ -254,7 +253,7 @@ struct MANGOS_DLL_DECL boss_priestess_delrissaAI : public ScriptedAI if (urand(0, 1)) { - if (Creature* pAdd = m_creature->GetMap()->GetCreature(m_auiLackeyGUID[rand()%MAX_ACTIVE_LACKEY])) + if (Creature* pAdd = m_creature->GetMap()->GetCreature(m_aLackeyGuid[rand()%MAX_ACTIVE_LACKEY])) { if (pAdd->isAlive()) target = pAdd; @@ -271,7 +270,7 @@ struct MANGOS_DLL_DECL boss_priestess_delrissaAI : public ScriptedAI if (urand(0, 1)) { - if (Creature* pAdd = m_creature->GetMap()->GetCreature(m_auiLackeyGUID[rand()%MAX_ACTIVE_LACKEY])) + if (Creature* pAdd = m_creature->GetMap()->GetCreature(m_aLackeyGuid[rand()%MAX_ACTIVE_LACKEY])) { if (pAdd->isAlive() && !pAdd->HasAura(SPELL_SHIELD)) target = pAdd; @@ -297,7 +296,7 @@ struct MANGOS_DLL_DECL boss_priestess_delrissaAI : public ScriptedAI target = m_creature; else { - if (Creature* pAdd = m_creature->GetMap()->GetCreature(m_auiLackeyGUID[rand()%MAX_ACTIVE_LACKEY])) + if (Creature* pAdd = m_creature->GetMap()->GetCreature(m_aLackeyGuid[rand()%MAX_ACTIVE_LACKEY])) { if (pAdd->isAlive()) target = pAdd; @@ -339,14 +338,13 @@ struct MANGOS_DLL_DECL boss_priestess_lackey_commonAI : public ScriptedAI boss_priestess_lackey_commonAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - memset(&m_auiLackeyGUIDs, 0, sizeof(m_auiLackeyGUIDs)); Reset(); - AcquireGUIDs(); + AcquireGuids(); } ScriptedInstance* m_pInstance; - uint64 m_auiLackeyGUIDs[MAX_ACTIVE_LACKEY]; + ObjectGuid m_aLackeyGuid[MAX_ACTIVE_LACKEY]; uint32 m_uiResetThreatTimer; bool m_bUsedPotion; @@ -377,7 +375,7 @@ struct MANGOS_DLL_DECL boss_priestess_lackey_commonAI : public ScriptedAI { for(uint8 i = 0; i < MAX_ACTIVE_LACKEY; ++i) { - if (Creature* pAdd = m_creature->GetMap()->GetCreature(m_auiLackeyGUIDs[i])) + if (Creature* pAdd = m_creature->GetMap()->GetCreature(m_aLackeyGuid[i])) { if (!pAdd->getVictim() && pAdd != m_creature) { @@ -441,7 +439,7 @@ struct MANGOS_DLL_DECL boss_priestess_lackey_commonAI : public ScriptedAI pDelrissa->AI()->KilledUnit(pVictim); } - void AcquireGUIDs() + void AcquireGuids() { if (!m_pInstance) return; @@ -454,7 +452,7 @@ struct MANGOS_DLL_DECL boss_priestess_lackey_commonAI : public ScriptedAI return; for(uint8 i = 0; i < MAX_ACTIVE_LACKEY; ++i) - m_auiLackeyGUIDs[i] = pDelrissaAI->m_auiLackeyGUID[i]; + m_aLackeyGuid[i] = pDelrissaAI->m_aLackeyGuid[i]; } } @@ -966,11 +964,10 @@ struct MANGOS_DLL_DECL boss_garaxxasAI : public boss_priestess_lackey_commonAI boss_garaxxasAI(Creature* pCreature) : boss_priestess_lackey_commonAI(pCreature) { SetCombatMovement(false); - m_uiPetGUID = 0; Reset(); } - uint64 m_uiPetGUID; + ObjectGuid m_petGuid; uint32 Aimed_Shot_Timer; uint32 Shoot_Timer; @@ -988,7 +985,7 @@ struct MANGOS_DLL_DECL boss_garaxxasAI : public boss_priestess_lackey_commonAI Wing_Clip_Timer = 4000; Freezing_Trap_Timer = 15000; - Creature* pPet = m_creature->GetMap()->GetCreature(m_uiPetGUID); + Creature* pPet = m_creature->GetMap()->GetCreature(m_petGuid); if (!pPet) m_creature->SummonCreature(NPC_SLIVER, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_CORPSE_DESPAWN, 0); @@ -997,7 +994,7 @@ struct MANGOS_DLL_DECL boss_garaxxasAI : public boss_priestess_lackey_commonAI void JustSummoned(Creature* pSummoned) { - m_uiPetGUID = pSummoned->GetGUID(); + m_petGuid = pSummoned->GetObjectGuid(); } void UpdateAI(const uint32 diff) @@ -1144,7 +1141,7 @@ struct MANGOS_DLL_DECL boss_apokoAI : public boss_priestess_lackey_commonAI if (Healing_Wave_Timer < diff) { // std::vector::iterator itr = Group.begin() + rand()%Group.size(); - // uint64 guid = (*itr)->guid; + // ObjectGuid guid = (*itr)->guid; // if (guid) // { // Unit* pAdd = m_creature->GetMap()->GetUnit((*itr)->guid); @@ -1226,7 +1223,7 @@ struct MANGOS_DLL_DECL boss_zelfanAI : public boss_priestess_lackey_commonAI { for(uint8 i = 0; i < MAX_ACTIVE_LACKEY; ++i) { - if (Creature* pAdd = m_creature->GetMap()->GetCreature(m_auiLackeyGUIDs[i])) + if (Creature* pAdd = m_creature->GetMap()->GetCreature(m_aLackeyGuid[i])) { if (pAdd->IsPolymorphed()) { diff --git a/scripts/eastern_kingdoms/stratholme/stratholme.cpp b/scripts/eastern_kingdoms/stratholme/stratholme.cpp index 8919c1eb1..143c51f2e 100644 --- a/scripts/eastern_kingdoms/stratholme/stratholme.cpp +++ b/scripts/eastern_kingdoms/stratholme/stratholme.cpp @@ -135,17 +135,18 @@ enum NPC_FREED_SOUL = 11136, }; +// TODO - likely entirely not needed workaround struct MANGOS_DLL_DECL mob_restless_soulAI : public ScriptedAI { mob_restless_soulAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } - uint64 m_uiTaggerGUID; + ObjectGuid m_taggerGuid; uint32 m_uiDieTimer; bool m_bIsTagged; void Reset() { - m_uiTaggerGUID = 0; + m_taggerGuid.Clear(); m_uiDieTimer = 5000; m_bIsTagged = false; } @@ -157,7 +158,7 @@ struct MANGOS_DLL_DECL mob_restless_soulAI : public ScriptedAI if (!m_bIsTagged && pSpell->Id == SPELL_EGAN_BLASTER && ((Player*)pCaster)->GetQuestStatus(QUEST_RESTLESS_SOUL) == QUEST_STATUS_INCOMPLETE) { m_bIsTagged = true; - m_uiTaggerGUID = pCaster->GetGUID(); + m_taggerGuid = pCaster->GetObjectGuid(); } } } @@ -179,7 +180,7 @@ struct MANGOS_DLL_DECL mob_restless_soulAI : public ScriptedAI { if (m_uiDieTimer < uiDiff) { - if (Player* pPlayer = m_creature->GetMap()->GetPlayer(m_uiTaggerGUID)) + if (Player* pPlayer = m_creature->GetMap()->GetPlayer(m_taggerGuid)) pPlayer->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); } else diff --git a/scripts/eastern_kingdoms/sunken_temple/instance_sunken_temple.cpp b/scripts/eastern_kingdoms/sunken_temple/instance_sunken_temple.cpp index 52df235a5..129744fa6 100644 --- a/scripts/eastern_kingdoms/sunken_temple/instance_sunken_temple.cpp +++ b/scripts/eastern_kingdoms/sunken_temple/instance_sunken_temple.cpp @@ -378,7 +378,7 @@ void instance_sunken_temple::Update(uint32 uiDiff) if (m_bIsFirstHakkarWave) // First wave summoned { // Summon at all circles - for (std::vector::const_iterator itr = m_vuiCircleGUIDs.begin(); itr != m_vuiCircleGUIDs.end(); ++itr) + for (GUIDVector::const_iterator itr = m_vuiCircleGUIDs.begin(); itr != m_vuiCircleGUIDs.end(); ++itr) { if (GameObject* pCircle = instance->GetGameObject(*itr)) pShade->SummonCreature(NPC_HAKKARI_MINION, pCircle->GetPositionX(), pCircle->GetPositionY(), pCircle->GetPositionZ(), 0, TEMPSUMMON_DEAD_DESPAWN, 0); diff --git a/scripts/eastern_kingdoms/zulaman/boss_janalai.cpp b/scripts/eastern_kingdoms/zulaman/boss_janalai.cpp index 93f71cab0..b561d85a7 100644 --- a/scripts/eastern_kingdoms/zulaman/boss_janalai.cpp +++ b/scripts/eastern_kingdoms/zulaman/boss_janalai.cpp @@ -139,8 +139,6 @@ struct MANGOS_DLL_DECL boss_janalaiAI : public ScriptedAI { boss_janalaiAI(Creature* pCreature) : ScriptedAI(pCreature) { - m_uiHatcher1GUID = 0; - m_uiHatcher2GUID = 0; m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); Reset(); } @@ -159,7 +157,6 @@ struct MANGOS_DLL_DECL boss_janalaiAI : public ScriptedAI uint32 m_uiEnrageTimer; uint32 m_uiHatcherTimer; - uint32 eggs; uint32 m_uiWipeTimer; bool m_bIsBombing; @@ -168,26 +165,26 @@ struct MANGOS_DLL_DECL boss_janalaiAI : public ScriptedAI bool m_bIsEnraged; bool m_bCanEnrage; - uint64 m_uiHatcher1GUID; - uint64 m_uiHatcher2GUID; + ObjectGuid m_hatcherOneGuid; + ObjectGuid m_hatcherTwoGuid; void Reset() { m_lBombsGUIDList.clear(); m_lEggsRemainingList.clear(); - if (Creature* pHatcher = m_creature->GetMap()->GetCreature(m_uiHatcher1GUID)) + if (Creature* pHatcher = m_creature->GetMap()->GetCreature(m_hatcherOneGuid)) { pHatcher->AI()->EnterEvadeMode(); pHatcher->SetDeathState(JUST_DIED); - m_uiHatcher1GUID = 0; + m_hatcherOneGuid.Clear(); } - if (Creature* pHatcher = m_creature->GetMap()->GetCreature(m_uiHatcher2GUID)) + if (Creature* pHatcher = m_creature->GetMap()->GetCreature(m_hatcherTwoGuid)) { pHatcher->AI()->EnterEvadeMode(); pHatcher->SetDeathState(JUST_DIED); - m_uiHatcher2GUID = 0; + m_hatcherTwoGuid.Clear(); } m_uiFireBreathTimer = 8000; @@ -239,10 +236,10 @@ struct MANGOS_DLL_DECL boss_janalaiAI : public ScriptedAI switch(pSummoned->GetEntry()) { case NPC_AMANI_HATCHER_1: - m_uiHatcher1GUID = pSummoned->GetGUID(); + m_hatcherOneGuid = pSummoned->GetObjectGuid(); break; case NPC_AMANI_HATCHER_2: - m_uiHatcher2GUID = pSummoned->GetGUID(); + m_hatcherTwoGuid = pSummoned->GetObjectGuid(); break; case NPC_FIRE_BOMB: if (m_bIsBombing) @@ -520,8 +517,8 @@ struct MANGOS_DLL_DECL boss_janalaiAI : public ScriptedAI { DoScriptText(SAY_SUMMON_HATCHER, m_creature); - Creature* pHatcer1 = m_creature->GetMap()->GetCreature(m_uiHatcher1GUID); - Creature* pHatcer2 = m_creature->GetMap()->GetCreature(m_uiHatcher2GUID); + Creature* pHatcer1 = m_creature->GetMap()->GetCreature(m_hatcherOneGuid); + Creature* pHatcer2 = m_creature->GetMap()->GetCreature(m_hatcherTwoGuid); if (!pHatcer1 || (pHatcer1 && !pHatcer1->isAlive())) { diff --git a/scripts/eastern_kingdoms/zulaman/boss_malacrass.cpp b/scripts/eastern_kingdoms/zulaman/boss_malacrass.cpp index bca4b23a7..2cb398200 100644 --- a/scripts/eastern_kingdoms/zulaman/boss_malacrass.cpp +++ b/scripts/eastern_kingdoms/zulaman/boss_malacrass.cpp @@ -128,7 +128,6 @@ struct MANGOS_DLL_DECL boss_malacrassAI : public ScriptedAI boss_malacrassAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - memset(&m_auiAddGUIDs, 0, sizeof(m_auiAddGUIDs)); m_lAddsEntryList.clear(); Reset(); } @@ -136,7 +135,7 @@ struct MANGOS_DLL_DECL boss_malacrassAI : public ScriptedAI ScriptedInstance* m_pInstance; std::list m_lAddsEntryList; - uint64 m_auiAddGUIDs[MAX_ACTIVE_ADDS]; + ObjectGuid m_aAddGuid[MAX_ACTIVE_ADDS]; void Reset() { @@ -155,7 +154,7 @@ struct MANGOS_DLL_DECL boss_malacrassAI : public ScriptedAI for(uint8 i = 0; i < MAX_ACTIVE_ADDS; ++i) { - if (Creature* pAdd = m_creature->GetMap()->GetCreature(m_auiAddGUIDs[i])) + if (Creature* pAdd = m_creature->GetMap()->GetCreature(m_aAddGuid[i])) pAdd->AI()->EnterEvadeMode(); } } @@ -179,7 +178,7 @@ struct MANGOS_DLL_DECL boss_malacrassAI : public ScriptedAI for(std::list::iterator itr = m_lAddsEntryList.begin(); itr != m_lAddsEntryList.end(); ++itr) { if (Creature* pAdd = m_creature->SummonCreature((*itr), m_afAddPosX[j], ADD_POS_Y, ADD_POS_Z, ADD_ORIENT, TEMPSUMMON_CORPSE_DESPAWN, 0)) - m_auiAddGUIDs[j] = pAdd->GetGUID(); + m_aAddGuid[j] = pAdd->GetObjectGuid(); ++j; } @@ -188,13 +187,13 @@ struct MANGOS_DLL_DECL boss_malacrassAI : public ScriptedAI { for(std::list::iterator itr = m_lAddsEntryList.begin(); itr != m_lAddsEntryList.end(); ++itr) { - Creature* pAdd = m_creature->GetMap()->GetCreature(m_auiAddGUIDs[j]); + Creature* pAdd = m_creature->GetMap()->GetCreature(m_aAddGuid[j]); //object already removed, not exist if (!pAdd) { if (pAdd = m_creature->SummonCreature((*itr), m_afAddPosX[j], ADD_POS_Y, ADD_POS_Z, ADD_ORIENT, TEMPSUMMON_CORPSE_DESPAWN, 0)) - m_auiAddGUIDs[j] = pAdd->GetGUID(); + m_aAddGuid[j] = pAdd->GetObjectGuid(); } ++j; } @@ -216,7 +215,7 @@ struct MANGOS_DLL_DECL boss_malacrassAI : public ScriptedAI { for(uint8 i = 0; i < MAX_ACTIVE_ADDS; ++i) { - if (Creature* pAdd = m_creature->GetMap()->GetCreature(m_auiAddGUIDs[i])) + if (Creature* pAdd = m_creature->GetMap()->GetCreature(m_aAddGuid[i])) { if (!pAdd->getVictim()) pAdd->AI()->AttackStart(pWho); @@ -247,14 +246,16 @@ struct MANGOS_DLL_DECL boss_malacrassAI : public ScriptedAI { for(uint8 i = 0; i < MAX_ACTIVE_ADDS; ++i) { - if (Creature* pAdd = m_creature->GetMap()->GetCreature(m_auiAddGUIDs[i])) + if (Creature* pAdd = m_creature->GetMap()->GetCreature(m_aAddGuid[i])) { pAdd->AI()->EnterEvadeMode(); pAdd->SetDeathState(JUST_DIED); } } - memset(&m_auiAddGUIDs, 0, sizeof(m_auiAddGUIDs)); + for (uint8 i = 0; i < MAX_ACTIVE_ADDS; ++i) + m_aAddGuid[i].Clear(); + m_lAddsEntryList.clear(); } diff --git a/scripts/eastern_kingdoms/zulgurub/boss_arlokk.cpp b/scripts/eastern_kingdoms/zulgurub/boss_arlokk.cpp index 80b2077a3..123e31c4c 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_arlokk.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_arlokk.cpp @@ -76,7 +76,7 @@ struct MANGOS_DLL_DECL boss_arlokkAI : public ScriptedAI uint32 m_uiSummon_Timer; uint32 m_uiSummonCount; - uint64 m_uiMarkedGUID; + ObjectGuid m_markedGuid; bool m_bIsPhaseTwo; bool m_bIsVanished; @@ -96,7 +96,7 @@ struct MANGOS_DLL_DECL boss_arlokkAI : public ScriptedAI m_bIsPhaseTwo = false; m_bIsVanished = false; - m_uiMarkedGUID = 0; + m_markedGuid.Clear(); m_creature->SetDisplayId(MODEL_ID_NORMAL); m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); @@ -129,7 +129,7 @@ struct MANGOS_DLL_DECL boss_arlokkAI : public ScriptedAI void DoSummonPhanters() { - if (Player* pPlayer = m_creature->GetMap()->GetPlayer(m_uiMarkedGUID)) + if (Player* pPlayer = m_creature->GetMap()->GetPlayer(m_markedGuid)) { if (pPlayer->isAlive()) DoScriptText(SAY_FEAST_PANTHER, m_creature, pPlayer); @@ -141,7 +141,7 @@ struct MANGOS_DLL_DECL boss_arlokkAI : public ScriptedAI void JustSummoned(Creature* pSummoned) { - if (Player* pPlayer = m_creature->GetMap()->GetPlayer(m_uiMarkedGUID)) + if (Player* pPlayer = m_creature->GetMap()->GetPlayer(m_markedGuid)) { if (pPlayer->isAlive()) pSummoned->AI()->AttackStart(pPlayer); @@ -172,13 +172,11 @@ struct MANGOS_DLL_DECL boss_arlokkAI : public ScriptedAI if (Player* pMark = pTarget->GetCharmerOrOwnerPlayerOrPlayerItself()) { DoCastSpellIfCan(pMark, SPELL_MARK); - m_uiMarkedGUID = pMark->GetGUID(); + m_markedGuid = pMark->GetObjectGuid(); } else { - if (m_uiMarkedGUID) - m_uiMarkedGUID = 0; - + m_markedGuid.Clear(); error_log("SD2: boss_arlokk could not accuire a new target to mark."); } } diff --git a/scripts/eastern_kingdoms/zulgurub/boss_mandokir.cpp b/scripts/eastern_kingdoms/zulgurub/boss_mandokir.cpp index 4e0b44932..9526407a9 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_mandokir.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_mandokir.cpp @@ -91,7 +91,6 @@ struct MANGOS_DLL_DECL boss_mandokirAI : public ScriptedAI boss_mandokirAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_uiOhganGUID = 0; Reset(); } @@ -110,8 +109,8 @@ struct MANGOS_DLL_DECL boss_mandokirAI : public ScriptedAI bool m_bMandokirDownstairs; float m_fTargetThreat; - uint64 m_uiWatchTarget; - uint64 m_uiOhganGUID; + ObjectGuid m_watchTargetGuid; + ObjectGuid m_ohganGuid; void Reset() { @@ -128,9 +127,9 @@ struct MANGOS_DLL_DECL boss_mandokirAI : public ScriptedAI m_bMandokirDownstairs = false; m_fTargetThreat = 0.0f; - m_uiWatchTarget = 0; + m_watchTargetGuid.Clear(); - if (Creature* pOhgan = m_creature->GetMap()->GetCreature(m_uiOhganGUID)) + if (Creature* pOhgan = m_creature->GetMap()->GetCreature(m_ohganGuid)) pOhgan->ForcedDespawn(); } @@ -207,7 +206,7 @@ struct MANGOS_DLL_DECL boss_mandokirAI : public ScriptedAI { if (pSummoned->GetEntry() == NPC_OHGAN) { - m_uiOhganGUID = pSummoned->GetGUID(); + m_ohganGuid = pSummoned->GetObjectGuid(); if (m_creature->getVictim()) pSummoned->AI()->AttackStart(m_creature->getVictim()); @@ -217,7 +216,7 @@ struct MANGOS_DLL_DECL boss_mandokirAI : public ScriptedAI void SummonedCreatureDespawn(Creature* pSummoned) { if (pSummoned->GetEntry() == NPC_OHGAN) - m_uiOhganGUID = 0; + m_ohganGuid.Clear(); } void SpellHitTarget(Unit* pTarget, const SpellEntry* pSpell) @@ -227,7 +226,7 @@ struct MANGOS_DLL_DECL boss_mandokirAI : public ScriptedAI DoScriptText(SAY_WATCH, m_creature, pTarget); DoScriptText(SAY_WATCH_WHISPER, m_creature, pTarget); - m_uiWatchTarget = pTarget->GetGUID(); + m_watchTargetGuid = pTarget->GetObjectGuid(); m_fTargetThreat = m_creature->getThreatManager().getThreat(pTarget); m_uiWatch_Timer = 6000; @@ -267,9 +266,9 @@ struct MANGOS_DLL_DECL boss_mandokirAI : public ScriptedAI if (m_uiWatch_Timer < uiDiff) { //If someone is watched - if (m_uiWatchTarget) + if (m_watchTargetGuid) { - Player* pWatchTarget = m_creature->GetMap()->GetPlayer(m_uiWatchTarget); + Player* pWatchTarget = m_creature->GetMap()->GetPlayer(m_watchTargetGuid); //If threat is higher that previously saved, mandokir will act if (pWatchTarget && pWatchTarget->isAlive() && m_creature->getThreatManager().getThreat(pWatchTarget) > m_fTargetThreat) @@ -280,7 +279,7 @@ struct MANGOS_DLL_DECL boss_mandokirAI : public ScriptedAI DoCastSpellIfCan(pWatchTarget, SPELL_CHARGE); } - m_uiWatchTarget = 0; + m_watchTargetGuid.Clear(); } else { @@ -296,7 +295,7 @@ struct MANGOS_DLL_DECL boss_mandokirAI : public ScriptedAI else m_uiWatch_Timer -= uiDiff; - if (!m_uiWatchTarget) + if (!m_watchTargetGuid) { //Cleave if (m_uiCleave_Timer < uiDiff) diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index c99de98a2..c3db1ed69 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2182" + #define SD2_REVISION_NR "2183" #endif // __SD2_REVISION_NR_H__ From b417a57e73c2301279f9a86a1998773c00a39bd8 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Sat, 4 Jun 2011 15:53:27 +0200 Subject: [PATCH 0164/1172] [2184] Use EntryGuidMap-Storage in Culling of Stratholme, remove a quest-credit hack --- .../culling_of_stratholme.cpp | 10 +- .../culling_of_stratholme.h | 42 +---- .../instance_culling_of_stratholme.cpp | 167 +++++------------- sd2_revision_nr.h | 2 +- 4 files changed, 56 insertions(+), 165 deletions(-) diff --git a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.cpp b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.cpp index 17d17bdab..bb36c1de1 100644 --- a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.cpp +++ b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.cpp @@ -166,7 +166,8 @@ bool QuestAccept_npc_chromie(Player* pPlayer, Creature* pCreature, const Quest* enum { - SPELL_ARCANE_DISRUPTION = 49590 + SPELL_ARCANE_DISRUPTION = 49590, + SPELL_CRATES_KILL_CREDIT = 58109, }; bool EffectAuraDummy_spell_aura_dummy_npc_crates_dummy(const Aura* pAura, bool bApply) @@ -207,7 +208,14 @@ bool EffectAuraDummy_spell_aura_dummy_npc_crates_dummy(const Aura* pAura, bool b } if (pInstance->GetData(TYPE_GRAIN_EVENT) != DONE) + { pInstance->SetData(TYPE_GRAIN_EVENT, IN_PROGRESS); + + // Finished event, give killcredit + if (pInstance->GetData(TYPE_GRAIN_EVENT) == DONE) + pTarget->CastSpell(pTarget, SPELL_CRATES_KILL_CREDIT, true); + } + // pTarget->ForcedDespawn(); // direct despawn has influence on visual effects, // but despawning makes it impossible to multi-use the spell at the same place // perhaps some add. GO-Visual diff --git a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.h b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.h index 7502c803e..dfd7301f8 100644 --- a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.h +++ b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.h @@ -23,12 +23,12 @@ enum NPC_CHROMIE_INN = 26527, NPC_CHROMIE_ENTRANCE = 27915, NPC_CHROMIE_END = 30997, - NPC_HOURGLASS = 28656, + // NPC_HOURGLASS = 28656, NPC_ARTHAS = 26499, - NPC_MEATHOOK = 26529, - NPC_SALRAMM_THE_FLESHCRAFTER = 26530, - NPC_CHRONO_LORD_EPOCH = 26532, - NPC_MALGANIS = 26533, + // NPC_MEATHOOK = 26529, + // NPC_SALRAMM_THE_FLESHCRAFTER = 26530, + // NPC_CHRONO_LORD_EPOCH = 26532, + // NPC_MALGANIS = 26533, NPC_INFINITE_CORRUPTER = 32273, NPC_LORDAERON_CRIER = 27913, NPC_ZOMBIE = 27737, @@ -122,7 +122,6 @@ class MANGOS_DLL_DECL instance_culling_of_stratholme : public ScriptedInstance void SetData(uint32 uiType, uint32 uiData); uint32 GetData(uint32 uiType); - uint64 GetData64(uint32 uiData); const char* Save() { return strInstData.c_str(); } void Load(const char* chrIn); @@ -142,7 +141,6 @@ class MANGOS_DLL_DECL instance_culling_of_stratholme : public ScriptedInstance protected: void OnPlayerEnter(Player* pPlayer); - void UpdateQuestCredit(); void DoChromieHurrySpeech(); uint32 m_auiEncounter[MAX_ENCOUNTER]; @@ -152,42 +150,12 @@ class MANGOS_DLL_DECL instance_culling_of_stratholme : public ScriptedInstance uint32 m_uiRemoveCrateStateTimer; uint32 m_uiArthasRespawnTimer; - uint64 m_uiChromieInnGUID; - uint64 m_uiChromieEntranceGUID; - uint64 m_uiChromieEndGUID; - uint64 m_uiHourglassGUID; - uint64 m_uiArthasGUID; - uint64 m_uiMeathookGUID; - uint64 m_uiSalrammGUID; - uint64 m_uiEpochGUID; - uint64 m_uiMalganisGUID; - uint64 m_uiCorrupterGUID; - uint64 m_uiLordaeronCrierGUID; - - uint64 m_uiBelfastGUID; - uint64 m_uiForrestenGUID; - uint64 m_uiSiabiGUID; - uint64 m_uiJamesGUID; - uint64 m_uiCorricksGUID; - uint64 m_uiStoutmantleGUID; - - uint64 m_uiOwensGUID; - uint64 m_uiMoriganGUID; - uint64 m_uiAndersonGUID; - uint64 m_uiMooreGUID; - uint64 m_uiBattsonGUID; - - uint64 m_uiOReillyGUID; - GUIDList m_luiCratesBunnyGUIDs; GUIDList m_luiFootmanGUIDs; GUIDList m_luiResidentGUIDs; GUIDList m_lAgiatedCitizenGUIDList; GUIDList m_lAgiatedResidentGUIDList; - - uint64 m_uiDoorBookcaseGUID; - uint64 m_uiDarkRunedChestGUID; }; #endif diff --git a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/instance_culling_of_stratholme.cpp b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/instance_culling_of_stratholme.cpp index d424b7676..bd463562c 100644 --- a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/instance_culling_of_stratholme.cpp +++ b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/instance_culling_of_stratholme.cpp @@ -55,36 +55,7 @@ static sSpawnLocation m_aChromieSpawnLocs[] = // need tuning, escp instance_culling_of_stratholme::instance_culling_of_stratholme(Map* pMap) : ScriptedInstance(pMap), m_uiGrainCrateCount(0), m_uiRemoveCrateStateTimer(0), - m_uiArthasRespawnTimer(0), - - m_uiChromieInnGUID(0), - m_uiChromieEntranceGUID(0), - m_uiChromieEndGUID(0), - m_uiHourglassGUID(0), - m_uiArthasGUID(0), - m_uiMeathookGUID(0), - m_uiSalrammGUID(0), - m_uiEpochGUID(0), - m_uiCorrupterGUID(0), - m_uiLordaeronCrierGUID(0), - - m_uiBelfastGUID(0), - m_uiForrestenGUID(0), - m_uiSiabiGUID(0), - m_uiJamesGUID(0), - m_uiCorricksGUID(0), - m_uiStoutmantleGUID(0), - - m_uiOwensGUID(0), - m_uiMoriganGUID(0), - m_uiAndersonGUID(0), - m_uiMooreGUID(0), - m_uiBattsonGUID(0), - - m_uiOReillyGUID(0), - - m_uiDoorBookcaseGUID(0), - m_uiDarkRunedChestGUID(0) + m_uiArthasRespawnTimer(0) { Initialize(); } @@ -98,29 +69,25 @@ void instance_culling_of_stratholme::OnCreatureCreate(Creature* pCreature) { switch(pCreature->GetEntry()) { - case NPC_CHROMIE_INN: m_uiChromieInnGUID = pCreature->GetGUID(); break; - case NPC_CHROMIE_ENTRANCE: m_uiChromieEntranceGUID = pCreature->GetGUID(); break; - case NPC_CHROMIE_END: m_uiChromieEndGUID = pCreature->GetGUID(); break; - case NPC_HOURGLASS: m_uiHourglassGUID = pCreature->GetGUID(); break; - case NPC_ARTHAS: m_uiArthasGUID = pCreature->GetGUID(); break; - case NPC_MEATHOOK: m_uiMeathookGUID = pCreature->GetGUID(); break; - case NPC_SALRAMM_THE_FLESHCRAFTER: m_uiSalrammGUID = pCreature->GetGUID(); break; - case NPC_CHRONO_LORD_EPOCH: m_uiEpochGUID = pCreature->GetGUID(); break; - case NPC_MALGANIS: m_uiMalganisGUID = pCreature->GetGUID(); break; - case NPC_MICHAEL_BELFAST: m_uiBelfastGUID = pCreature->GetGUID(); break; - case NPC_HEARTHSINGER_FORRESTEN: m_uiForrestenGUID = pCreature->GetGUID(); break; - case NPC_FRAS_SIABI: m_uiSiabiGUID = pCreature->GetGUID(); break; - case NPC_FOOTMAN_JAMES: m_uiJamesGUID = pCreature->GetGUID(); break; - case NPC_MAL_CORRICKS: m_uiCorricksGUID = pCreature->GetGUID(); break; - case NPC_GRYAN_STOUTMANTLE: m_uiStoutmantleGUID = pCreature->GetGUID(); break; - case NPC_ROGER_OWENS: m_uiOwensGUID = pCreature->GetGUID(); break; - case NPC_SERGEANT_MORIGAN: m_uiMoriganGUID = pCreature->GetGUID(); break; - case NPC_JENA_ANDERSON: m_uiAndersonGUID = pCreature->GetGUID(); break; - case NPC_MALCOM_MOORE: m_uiMooreGUID = pCreature->GetGUID(); break; - case NPC_BARTLEBY_BATTSON: m_uiBattsonGUID = pCreature->GetGUID(); break; - case NPC_PATRICIA_O_REILLY: m_uiOReillyGUID = pCreature->GetGUID(); break; - case NPC_LORDAERON_CRIER: m_uiLordaeronCrierGUID = pCreature->GetGUID(); break; - case NPC_INFINITE_CORRUPTER: m_uiCorrupterGUID = pCreature->GetGUID(); break; + case NPC_CHROMIE_ENTRANCE: + case NPC_CHROMIE_END: + case NPC_ARTHAS: + case NPC_MICHAEL_BELFAST: + case NPC_HEARTHSINGER_FORRESTEN: + case NPC_FRAS_SIABI: + case NPC_FOOTMAN_JAMES: + case NPC_MAL_CORRICKS: + case NPC_GRYAN_STOUTMANTLE: + case NPC_ROGER_OWENS: + case NPC_SERGEANT_MORIGAN: + case NPC_JENA_ANDERSON: + case NPC_MALCOM_MOORE: + case NPC_BARTLEBY_BATTSON: + case NPC_PATRICIA_O_REILLY: + case NPC_LORDAERON_CRIER: + case NPC_INFINITE_CORRUPTER: + m_mNpcEntryGuidStore[pCreature->GetEntry()] = pCreature->GetObjectGuid(); + break; case NPC_CRATES_BUNNY: m_luiCratesBunnyGUIDs.push_back(pCreature->GetGUID()); break; case NPC_LORDAERON_FOOTMAN: m_luiFootmanGUIDs.push_back(pCreature->GetGUID()); break; @@ -142,33 +109,22 @@ void instance_culling_of_stratholme::OnObjectCreate(GameObject* pGo) switch(pGo->GetEntry()) { case GO_DOOR_BOOKCASE: - m_uiDoorBookcaseGUID = pGo->GetGUID(); if (m_auiEncounter[TYPE_EPOCH_EVENT] == DONE) pGo->SetGoState(GO_STATE_ACTIVE); break; case GO_DARK_RUNED_CHEST: case GO_DARK_RUNED_CHEST_H: - m_uiDarkRunedChestGUID = pGo->GetGUID(); break; - } -} -void instance_culling_of_stratholme::UpdateQuestCredit() -{ - Map::PlayerList const& players = instance->GetPlayers(); - if (!players.isEmpty()) - { - for(Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr) - { - if (Player* pPlayer = itr->getSource()) - pPlayer->KilledMonsterCredit(NPC_CRATES_BUNNY); - } + default: + return; } + m_mGoEntryGuidStore[pGo->GetEntry()] = pGo->GetObjectGuid(); } void instance_culling_of_stratholme::DoChromieHurrySpeech() { - if (Creature* pChromie = instance->GetCreature(m_uiChromieEntranceGUID)) + if (Creature* pChromie = GetSingleCreatureFromStorage(NPC_CHROMIE_ENTRANCE)) { Map::PlayerList const& players = instance->GetPlayers(); if (!players.isEmpty()) @@ -187,7 +143,7 @@ void instance_culling_of_stratholme::SetData(uint32 uiType, uint32 uiData) switch(uiType) { case TYPE_GRAIN_EVENT: - m_auiEncounter[TYPE_GRAIN_EVENT] = uiData; + m_auiEncounter[uiType] = uiData; if (uiData == SPECIAL) DoUpdateWorldState(WORLD_STATE_CRATES, 1); else if (uiData == IN_PROGRESS) @@ -200,41 +156,40 @@ void instance_culling_of_stratholme::SetData(uint32 uiType, uint32 uiData) if (m_uiGrainCrateCount == 5) { - UpdateQuestCredit(); m_uiRemoveCrateStateTimer = 20000; SetData(TYPE_GRAIN_EVENT, DONE); } } break; case TYPE_ARTHAS_INTRO_EVENT: - m_auiEncounter[TYPE_ARTHAS_INTRO_EVENT] = uiData; + m_auiEncounter[uiType] = uiData; break; case TYPE_ARTHAS_ESCORT_EVENT: - m_auiEncounter[TYPE_ARTHAS_ESCORT_EVENT] = uiData; + m_auiEncounter[uiType] = uiData; break; case TYPE_MEATHOOK_EVENT: - m_auiEncounter[TYPE_MEATHOOK_EVENT] = uiData; + m_auiEncounter[uiType] = uiData; if (uiData == DONE) SetData(TYPE_SALRAMM_EVENT, IN_PROGRESS); break; case TYPE_SALRAMM_EVENT: - m_auiEncounter[TYPE_SALRAMM_EVENT] = uiData; + m_auiEncounter[uiType] = uiData; if (uiData == DONE) DoUpdateWorldState(WORLD_STATE_WAVE, 0); // Remove WaveCounter break; case TYPE_EPOCH_EVENT: - m_auiEncounter[TYPE_EPOCH_EVENT] = uiData; + m_auiEncounter[uiType] = uiData; break; case TYPE_MALGANIS_EVENT: - m_auiEncounter[TYPE_MALGANIS_EVENT] = uiData; + m_auiEncounter[uiType] = uiData; if (uiData == DONE) { - DoRespawnGameObject(m_uiDarkRunedChestGUID, 30*MINUTE); + DoRespawnGameObject(instance->IsRegularDifficulty() ? GO_DARK_RUNED_CHEST : GO_DARK_RUNED_CHEST_H, 30*MINUTE); DoSpawnChromieIfNeeded(); } break; case TYPE_INFINITE_CORRUPTER_TIME: - m_auiEncounter[TYPE_INFINITE_CORRUPTER_TIME] = uiData; + m_auiEncounter[uiType] = uiData; if (!uiData) { DoUpdateWorldState(WORLD_STATE_TIME, 0); // Remove Timer @@ -244,7 +199,7 @@ void instance_culling_of_stratholme::SetData(uint32 uiType, uint32 uiData) DoUpdateWorldState(WORLD_STATE_TIME_COUNTER, uiData/(MINUTE*IN_MILLISECONDS)); break; case TYPE_INFINITE_CORRUPTER: - m_auiEncounter[TYPE_INFINITE_CORRUPTER] = uiData; + m_auiEncounter[uiType] = uiData; switch(uiData) { case IN_PROGRESS: @@ -260,7 +215,7 @@ void instance_culling_of_stratholme::SetData(uint32 uiType, uint32 uiData) break; case FAIL: SetData(TYPE_INFINITE_CORRUPTER_TIME, 0); - if (Creature* pCorrupter = instance->GetCreature(m_uiCorrupterGUID)) + if (Creature* pCorrupter = GetSingleCreatureFromStorage(NPC_INFINITE_CORRUPTER)) if (pCorrupter->isAlive()) pCorrupter->ForcedDespawn(); break; @@ -343,50 +298,10 @@ void instance_culling_of_stratholme::OnPlayerEnter(Player* pPlayer) uint32 instance_culling_of_stratholme::GetData(uint32 uiType) { - switch(uiType) - { - case TYPE_GRAIN_EVENT: return m_auiEncounter[0]; - case TYPE_ARTHAS_INTRO_EVENT: return m_auiEncounter[1]; - case TYPE_MEATHOOK_EVENT: return m_auiEncounter[2]; - case TYPE_SALRAMM_EVENT: return m_auiEncounter[3]; - case TYPE_EPOCH_EVENT: return m_auiEncounter[4]; - case TYPE_ARTHAS_ESCORT_EVENT: return m_auiEncounter[5]; - case TYPE_MALGANIS_EVENT: return m_auiEncounter[6]; - case TYPE_INFINITE_CORRUPTER_TIME: return m_auiEncounter[7]; - case TYPE_INFINITE_CORRUPTER: return m_auiEncounter[8]; - default: return 0; - } -} + if (uiType < MAX_ENCOUNTER) + return m_auiEncounter[uiType]; -uint64 instance_culling_of_stratholme::GetData64(uint32 uiData) -{ - switch(uiData) - { - case NPC_CHROMIE_INN: return m_uiChromieInnGUID; - case NPC_CHROMIE_ENTRANCE: return m_uiChromieEntranceGUID; - case NPC_CHROMIE_END: return m_uiChromieEndGUID; - case NPC_HOURGLASS: return m_uiHourglassGUID; - case NPC_ARTHAS: return m_uiArthasGUID; - case NPC_MEATHOOK: return m_uiMeathookGUID; - case NPC_SALRAMM_THE_FLESHCRAFTER: return m_uiSalrammGUID; - case NPC_CHRONO_LORD_EPOCH: return m_uiEpochGUID; - case NPC_MALGANIS: return m_uiMalganisGUID; - case NPC_INFINITE_CORRUPTER: return m_uiCorrupterGUID; - case NPC_MICHAEL_BELFAST: return m_uiBelfastGUID; - case NPC_HEARTHSINGER_FORRESTEN: return m_uiForrestenGUID; - case NPC_FRAS_SIABI: return m_uiSiabiGUID; - case NPC_FOOTMAN_JAMES: return m_uiJamesGUID; - case NPC_MAL_CORRICKS: return m_uiCorricksGUID; - case NPC_GRYAN_STOUTMANTLE: return m_uiStoutmantleGUID; - case NPC_ROGER_OWENS: return m_uiOwensGUID; - case NPC_SERGEANT_MORIGAN: return m_uiMoriganGUID; - case NPC_JENA_ANDERSON: return m_uiAndersonGUID; - case NPC_MALCOM_MOORE: return m_uiMooreGUID; - case NPC_BARTLEBY_BATTSON: return m_uiBattsonGUID; - case NPC_PATRICIA_O_REILLY: return m_uiOReillyGUID; - case GO_DOOR_BOOKCASE: return m_uiDoorBookcaseGUID; - default: return 0; - } + return 0; } uint8 instance_culling_of_stratholme::GetInstancePosition() @@ -474,7 +389,7 @@ void instance_culling_of_stratholme::ArthasJustDied() void instance_culling_of_stratholme::DoSpawnArthasIfNeeded() { - Creature* pArthas = instance->GetCreature(m_uiArthasGUID); + Creature* pArthas = GetSingleCreatureFromStorage(NPC_ARTHAS, true); if (pArthas && pArthas->isAlive()) return; @@ -496,13 +411,13 @@ void instance_culling_of_stratholme::DoSpawnChromieIfNeeded() if (GetInstancePosition() == POS_INSTANCE_FINISHED) { - Creature* pChromie = instance->GetCreature(m_uiChromieEndGUID); + Creature* pChromie = GetSingleCreatureFromStorage(NPC_CHROMIE_END, true); if (!pChromie) pPlayer->SummonCreature(NPC_CHROMIE_END, m_aChromieSpawnLocs[1].m_fX, m_aChromieSpawnLocs[1].m_fY, m_aChromieSpawnLocs[1].m_fZ, m_aChromieSpawnLocs[1].m_fO, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10000); } else if (GetInstancePosition() >= POS_ARTHAS_INTRO) { - Creature* pChromie = instance->GetCreature(m_uiChromieEntranceGUID); + Creature* pChromie = GetSingleCreatureFromStorage(NPC_CHROMIE_ENTRANCE, true); if (!pChromie) pPlayer->SummonCreature(NPC_CHROMIE_ENTRANCE, m_aChromieSpawnLocs[0].m_fX, m_aChromieSpawnLocs[0].m_fY, m_aChromieSpawnLocs[0].m_fZ, m_aChromieSpawnLocs[0].m_fO, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10000); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index c3db1ed69..e8a1d581d 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2183" + #define SD2_REVISION_NR "2184" #endif // __SD2_REVISION_NR_H__ From 262d935a7f2d2898fe16eaa51e85b3fd1c1b725c Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Sat, 4 Jun 2011 16:25:17 +0200 Subject: [PATCH 0165/1172] [2185] Use EntryGuidMap-Storage in Dark Portal --- .../caverns_of_time/dark_portal/dark_portal.cpp | 6 +++--- .../caverns_of_time/dark_portal/dark_portal.h | 3 --- .../dark_portal/instance_dark_portal.cpp | 17 ++++------------- sd2_revision_nr.h | 2 +- 4 files changed, 8 insertions(+), 20 deletions(-) diff --git a/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.cpp b/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.cpp index 23809c01c..07491fafe 100644 --- a/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.cpp +++ b/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.cpp @@ -299,10 +299,10 @@ struct MANGOS_DLL_DECL npc_time_riftAI : public ScriptedAI // uncomment the following if something doesn't work correctly, otherwise just delete // m_creature->UpdateAllowedPositionZ(x, y, z); - if (Unit *Summon = m_creature->SummonCreature(creature_entry, x, y, z, m_creature->GetOrientation(), TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000)) + if (Unit* pSummon = m_creature->SummonCreature(creature_entry, x, y, z, m_creature->GetOrientation(), TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000)) { - if (Creature *temp = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(NPC_MEDIVH))) - Summon->AddThreat(temp); + if (Creature* pMedivh = m_pInstance->GetSingleCreatureFromStorage(NPC_MEDIVH)) + pSummon->AddThreat(pMedivh); } } diff --git a/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.h b/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.h index 8592871f9..59dacc508 100644 --- a/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.h +++ b/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.h @@ -52,7 +52,6 @@ class MANGOS_DLL_DECL instance_dark_portal : public ScriptedInstance void SetData(uint32 uiType, uint32 uiData); uint32 GetData(uint32 uiType); - uint64 GetData64(uint32 uiData); void Update(uint32 uiDiff); @@ -72,8 +71,6 @@ class MANGOS_DLL_DECL instance_dark_portal : public ScriptedInstance uint8 m_uiRiftWaveId; uint32 m_uiNextPortalTimer; - - uint64 m_uiMedivhGUID; uint8 m_uiCurrentRiftId; }; diff --git a/scripts/kalimdor/caverns_of_time/dark_portal/instance_dark_portal.cpp b/scripts/kalimdor/caverns_of_time/dark_portal/instance_dark_portal.cpp index c38c849ff..9faa74d74 100644 --- a/scripts/kalimdor/caverns_of_time/dark_portal/instance_dark_portal.cpp +++ b/scripts/kalimdor/caverns_of_time/dark_portal/instance_dark_portal.cpp @@ -50,8 +50,7 @@ static Wave RiftWaves[]= {NPC_AEONUS, 0} }; -instance_dark_portal::instance_dark_portal(Map* pMap) : ScriptedInstance(pMap), - m_uiMedivhGUID(0) +instance_dark_portal::instance_dark_portal(Map* pMap) : ScriptedInstance(pMap) { Initialize(); } @@ -93,7 +92,7 @@ void instance_dark_portal::OnPlayerEnter(Player* pPlayer) void instance_dark_portal::OnCreatureCreate(Creature* pCreature) { if (pCreature->GetEntry() == NPC_MEDIVH) - m_uiMedivhGUID = pCreature->GetGUID(); + m_mNpcEntryGuidStore[NPC_MEDIVH] = pCreature->GetObjectGuid(); } // what other conditions to check? @@ -135,7 +134,7 @@ void instance_dark_portal::SetData(uint32 uiType, uint32 uiData) if (!m_uiShieldPercent) { - if (Creature* pMedivh = instance->GetCreature(m_uiMedivhGUID)) + if (Creature* pMedivh = GetSingleCreatureFromStorage(NPC_MEDIVH)) { if (pMedivh->isAlive()) { @@ -208,14 +207,6 @@ uint32 instance_dark_portal::GetData(uint32 uiType) } } -uint64 instance_dark_portal::GetData64(uint32 uiData) -{ - if (uiData == NPC_MEDIVH) - return m_uiMedivhGUID; - - return 0; -} - Creature* instance_dark_portal::SummonedPortalBoss(Creature* pSource) { uint32 uiEntry = RiftWaves[GetRiftWaveId()].PortalBoss; @@ -239,7 +230,7 @@ Creature* instance_dark_portal::SummonedPortalBoss(Creature* pSource) void instance_dark_portal::DoSpawnPortal() { - if (Creature* pMedivh = instance->GetCreature(m_uiMedivhGUID)) + if (Creature* pMedivh = GetSingleCreatureFromStorage(NPC_MEDIVH)) { uint8 uiTmp = urand(0, 2); diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index e8a1d581d..572531309 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2184" + #define SD2_REVISION_NR "2185" #endif // __SD2_REVISION_NR_H__ From 993c02937b136a1a414987da7d1482d1002d4f4d Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Sat, 4 Jun 2011 17:32:01 +0200 Subject: [PATCH 0166/1172] [2186] Use EntryGuidMap-Storage in Mount Hyjal * Also move to header version * Make independend from Acid * Remove some unused variables --- .../caverns_of_time/hyjal/boss_archimonde.cpp | 70 ++-- .../kalimdor/caverns_of_time/hyjal/hyjal.cpp | 2 +- .../kalimdor/caverns_of_time/hyjal/hyjal.h | 111 +++--- .../caverns_of_time/hyjal/hyjalAI.cpp | 36 +- .../kalimdor/caverns_of_time/hyjal/hyjalAI.h | 2 +- .../caverns_of_time/hyjal/instance_hyjal.cpp | 319 +++++++++--------- sd2_revision_nr.h | 2 +- 7 files changed, 271 insertions(+), 271 deletions(-) diff --git a/scripts/kalimdor/caverns_of_time/hyjal/boss_archimonde.cpp b/scripts/kalimdor/caverns_of_time/hyjal/boss_archimonde.cpp index 95e3442e6..d192412e8 100644 --- a/scripts/kalimdor/caverns_of_time/hyjal/boss_archimonde.cpp +++ b/scripts/kalimdor/caverns_of_time/hyjal/boss_archimonde.cpp @@ -76,21 +76,15 @@ struct mob_ancient_wispAI : public ScriptedAI mob_ancient_wispAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - ArchimondeGUID = 0; Reset(); } ScriptedInstance* m_pInstance; - uint64 ArchimondeGUID; uint32 CheckTimer; void Reset() { CheckTimer = 1000; - - if (m_pInstance) - ArchimondeGUID = m_pInstance->GetData64(DATA_ARCHIMONDE); - m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); } @@ -98,9 +92,12 @@ struct mob_ancient_wispAI : public ScriptedAI void UpdateAI(const uint32 diff) { + if (!m_pInstance) + return; + if (CheckTimer < diff) { - if (Creature* Archimonde = m_creature->GetMap()->GetCreature(ArchimondeGUID)) + if (Creature* Archimonde = m_pInstance->GetSingleCreatureFromStorage(NPC_ARCHIMONDE)) { if (Archimonde->GetHealthPercent() < 2.0f || !Archimonde->isAlive()) DoCastSpellIfCan(m_creature, SPELL_DENOUEMENT_WISP); @@ -130,33 +127,33 @@ struct MANGOS_DLL_DECL mob_doomfire_targettingAI : public ScriptedAI { mob_doomfire_targettingAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } - uint64 TargetGUID; - uint32 ChangeTargetTimer; + ObjectGuid m_targetGuid; + uint32 m_uiChangeTargetTimer; void Reset() { - TargetGUID = 0; - ChangeTargetTimer = 5000; + m_targetGuid.Clear(); + m_uiChangeTargetTimer = 5000; } - void MoveInLineOfSight(Unit* who) + void MoveInLineOfSight(Unit* pWwho) { - //will update once TargetGUID is 0. In case noone actually moves(not likely) and this is 0 + //will update once m_targetGuid is 0. In case noone actually moves(not likely) and this is 0 //when UpdateAI needs it, it will be forced to select randomPoint - if (!TargetGUID && who->GetTypeId() == TYPEID_PLAYER) - TargetGUID = who->GetGUID(); + if (!m_targetGuid && pWwho->GetTypeId() == TYPEID_PLAYER) + m_targetGuid = pWwho->GetObjectGuid(); } - void DamageTaken(Unit *done_by, uint32 &damage) { damage = 0; } + void DamageTaken(Unit* pDealer, uint32& uiDamage) { uiDamage = 0; } - void UpdateAI(const uint32 diff) + void UpdateAI(const uint32 uiDiff) { - if (ChangeTargetTimer < diff) + if (m_uiChangeTargetTimer < uiDiff) { - if (Player* pPlayer = m_creature->GetMap()->GetPlayer(TargetGUID)) + if (Player* pPlayer = m_creature->GetMap()->GetPlayer(m_targetGuid)) { m_creature->GetMotionMaster()->MoveFollow(pPlayer, 0.0f, 0.0f); - TargetGUID = 0; + m_targetGuid.Clear(); } else { @@ -165,8 +162,8 @@ struct MANGOS_DLL_DECL mob_doomfire_targettingAI : public ScriptedAI m_creature->GetMotionMaster()->MovePoint(0, x, y, z); } - ChangeTargetTimer = 5000; - }else ChangeTargetTimer -= diff; + m_uiChangeTargetTimer = 5000; + }else m_uiChangeTargetTimer -= uiDiff; } }; @@ -188,8 +185,8 @@ struct MANGOS_DLL_DECL boss_archimondeAI : public ScriptedAI ScriptedInstance* m_pInstance; - uint64 DoomfireSpiritGUID; - uint64 WorldTreeGUID; + ObjectGuid m_doomfireSpiritGuid; + ObjectGuid m_worldTreeGuid; uint32 DrainNordrassilTimer; uint32 FearTimer; @@ -210,11 +207,8 @@ struct MANGOS_DLL_DECL boss_archimondeAI : public ScriptedAI void Reset() { - if (m_pInstance) - m_pInstance->SetData(TYPE_ARCHIMONDE, NOT_STARTED); - - DoomfireSpiritGUID = 0; - WorldTreeGUID = 0; + m_doomfireSpiritGuid.Clear(); + m_worldTreeGuid.Clear(); DrainNordrassilTimer = 0; FearTimer = 42000; @@ -237,9 +231,6 @@ struct MANGOS_DLL_DECL boss_archimondeAI : public ScriptedAI { m_creature->InterruptSpell(CURRENT_CHANNELED_SPELL); DoScriptText(SAY_AGGRO, m_creature); - - if (m_pInstance) - m_pInstance->SetData(TYPE_ARCHIMONDE, IN_PROGRESS); } void KilledUnit(Unit* pVictim) @@ -277,9 +268,6 @@ struct MANGOS_DLL_DECL boss_archimondeAI : public ScriptedAI void JustDied(Unit *victim) { DoScriptText(SAY_DEATH, m_creature); - - if (m_pInstance) - m_pInstance->SetData(TYPE_ARCHIMONDE, DONE); } bool CanUseFingerOfDeath() @@ -332,7 +320,7 @@ struct MANGOS_DLL_DECL boss_archimondeAI : public ScriptedAI if (pSummoned->GetEntry() == CREATURE_DOOMFIRE_SPIRIT) { - DoomfireSpiritGUID = pSummoned->GetGUID(); + m_doomfireSpiritGuid = pSummoned->GetObjectGuid(); } if (pSummoned->GetEntry() == CREATURE_DOOMFIRE) @@ -340,10 +328,10 @@ struct MANGOS_DLL_DECL boss_archimondeAI : public ScriptedAI pSummoned->CastSpell(pSummoned,SPELL_DOOMFIRE_SPAWN,false); pSummoned->CastSpell(pSummoned, SPELL_DOOMFIRE, true, NULL, NULL, m_creature->GetObjectGuid()); - if (Creature* pDoomfireSpirit = m_creature->GetMap()->GetCreature(DoomfireSpiritGUID)) + if (Creature* pDoomfireSpirit = m_creature->GetMap()->GetCreature(m_doomfireSpiritGuid)) { pSummoned->GetMotionMaster()->MoveFollow(pDoomfireSpirit,0.0f,0.0f); - DoomfireSpiritGUID = 0; + m_doomfireSpiritGuid.Clear(); } } } @@ -386,9 +374,9 @@ struct MANGOS_DLL_DECL boss_archimondeAI : public ScriptedAI Creature *temp = m_creature->SummonCreature(CREATURE_CHANNEL_TARGET, NORDRASSIL_X, NORDRASSIL_Y, NORDRASSIL_Z, 0.0f, TEMPSUMMON_TIMED_DESPAWN, 1200000); if (temp) - WorldTreeGUID = temp->GetGUID(); + m_worldTreeGuid = temp->GetObjectGuid(); - if (Creature *Nordrassil = m_creature->GetMap()->GetCreature(WorldTreeGUID)) + if (Creature *Nordrassil = m_creature->GetMap()->GetCreature(m_worldTreeGuid)) { Nordrassil->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); Nordrassil->SetDisplayId(11686); @@ -397,7 +385,7 @@ struct MANGOS_DLL_DECL boss_archimondeAI : public ScriptedAI } } - if (Creature *Nordrassil = m_creature->GetMap()->GetCreature(WorldTreeGUID)) + if (Creature *Nordrassil = m_creature->GetMap()->GetCreature(m_worldTreeGuid)) { Nordrassil->CastSpell(m_creature, SPELL_DRAIN_WORLD_TREE_2, true); DrainNordrassilTimer = 1000; diff --git a/scripts/kalimdor/caverns_of_time/hyjal/hyjal.cpp b/scripts/kalimdor/caverns_of_time/hyjal/hyjal.cpp index a2e2498a4..2805a008c 100644 --- a/scripts/kalimdor/caverns_of_time/hyjal/hyjal.cpp +++ b/scripts/kalimdor/caverns_of_time/hyjal/hyjal.cpp @@ -192,7 +192,7 @@ bool GossipHello_npc_tyrande_whisperwind(Player* pPlayer, Creature* pCreature) if (ScriptedInstance* pInstance = (ScriptedInstance*)pCreature->GetInstanceData()) { // Only let them get item if Azgalor is dead. - if (pInstance->GetData(TYPE_AZGALOR) == DONE && !pPlayer->HasItemCount(ITEM_TEAR_OF_GODDESS,1)) + if (pInstance->GetData(TYPE_AZGALOR) == DONE && !pPlayer->HasItemCount(ITEM_TEAR_OF_GODDESS, 1)) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_TYRANDE, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF); } diff --git a/scripts/kalimdor/caverns_of_time/hyjal/hyjal.h b/scripts/kalimdor/caverns_of_time/hyjal/hyjal.h index 2e4cff739..4a7f3623e 100644 --- a/scripts/kalimdor/caverns_of_time/hyjal/hyjal.h +++ b/scripts/kalimdor/caverns_of_time/hyjal/hyjal.h @@ -7,65 +7,86 @@ #define ERROR_INST_DATA "SD2: Instance data not set properly for Mount Hyjal. Encounters will be buggy" -enum eNPC +enum { - NPC_JAINA = 17772, - NPC_THRALL = 17852, - NPC_TYRANDE = 17948, + MAX_ENCOUNTER = 5, + + TYPE_WINTERCHILL = 0, + TYPE_ANETHERON = 1, + // TYPE_ANETHERON_OLD = 2, // Used in Acid + TYPE_KAZROGAL = 3, + TYPE_AZGALOR = 4, + TYPE_ARCHIMONDE = 5, + + // TYPE_AZGALOR_OLD = 6, // Used in Acid + TYPE_TRASH_COUNT = 7, + TYPE_RETREAT = 8, + + // ACID scripted, don't touch id's (or provide update for ACID), in Acid scripted SetData types: 11, 2, 9, 6 and 14 + // TYPE_WINTERCHILL_OLD = 11, + // DATA_TRASH_OLD = 14, + // TYPE_KAZROGAL_OLD = 9, + + WORLD_STATE_WAVES = 2842, + WORLD_STATE_ENEMY = 2453, + WORLD_STATE_ENEMYCOUNT = 2454, + + NPC_JAINA = 17772, + NPC_THRALL = 17852, + NPC_TYRANDE = 17948, // Bosses summoned after every 8 waves - NPC_WINTERCHILL = 17767, - NPC_ANETHERON = 17808, - NPC_KAZROGAL = 17888, - NPC_AZGALOR = 17842, - NPC_ARCHIMONDE = 17968, + NPC_WINTERCHILL = 17767, + NPC_ANETHERON = 17808, + NPC_KAZROGAL = 17888, + NPC_AZGALOR = 17842, + NPC_ARCHIMONDE = 17968, // Trash Mobs summoned in waves - NPC_NECRO = 17899, - NPC_ABOMI = 17898, - NPC_GHOUL = 17895, - NPC_BANSH = 17905, - NPC_CRYPT = 17897, - NPC_GARGO = 17906, - NPC_FROST = 17907, - NPC_GIANT = 17908, - NPC_STALK = 17916, - - NPC_WATER_ELEMENTAL = 18001, - NPC_DIRE_WOLF = 17854, - - GO_ANCIENT_GEM = 185557 + NPC_NECRO = 17899, + NPC_ABOMI = 17898, + NPC_GHOUL = 17895, + NPC_BANSH = 17905, + NPC_CRYPT = 17897, + NPC_GARGO = 17906, + NPC_FROST = 17907, + NPC_GIANT = 17908, + NPC_STALK = 17916, + + NPC_WATER_ELEMENTAL = 18001, + NPC_DIRE_WOLF = 17854, + + GO_ANCIENT_GEM = 185557, }; -enum +class MANGOS_DLL_DECL instance_mount_hyjal : public ScriptedInstance { - MAX_ENCOUNTER = 5, + public: + instance_mount_hyjal(Map* pMap); - WORLD_STATE_WAVES = 2842, - WORLD_STATE_ENEMY = 2453, - WORLD_STATE_ENEMYCOUNT = 2454, + void Initialize(); + bool IsEncounterInProgress() const; + + void OnCreatureCreate(Creature* pCreature); + void OnObjectCreate(GameObject* pGo); + + void OnCreatureEnterCombat(Creature* pCreature); + void OnCreatureEvade(Creature* pCreature); + void OnCreatureDeath(Creature* pCreature); - // ACID scripted, don't touch id's (or provide update for ACID) - TYPE_WINTERCHILL = 11, - TYPE_ANETHERON = 2, - TYPE_KAZROGAL = 9, - TYPE_AZGALOR = 6, + void SetData(uint32 uiType, uint32 uiData); + uint32 GetData(uint32 uiType); - TYPE_ARCHIMONDE = 4, + const char* Save() { return m_strSaveData.c_str(); } + void Load(const char* chrIn); - DATA_ANETHERON = 1, - DATA_RAGEWINTERCHILL = 10, - DATA_AZGALOR = 5, - DATA_KAZROGAL = 8, + private: + uint32 m_auiEncounter[MAX_ENCOUNTER]; + std::string m_strSaveData; - DATA_ARCHIMONDE = 3, - DATA_JAINAPROUDMOORE = 7, - DATA_THRALL = 12, - DATA_TYRANDEWHISPERWIND = 13, + GUIDList lAncientGemGUIDList; - DATA_TRASH = 14, - DATA_RESET_TRASH_COUNT = 15, - TYPE_RETREAT = 16 + uint32 m_uiTrashCount; }; #endif diff --git a/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.cpp b/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.cpp index 2a198495f..33fc48b1c 100644 --- a/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.cpp +++ b/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.cpp @@ -82,9 +82,9 @@ sHyjalYells m_aHyjalYell[]= void hyjalAI::Reset() { - // GUIDs - m_uiBossGUID[0] = 0; - m_uiBossGUID[1] = 0; + // BossGuids + m_aBossGuid[0].Clear(); + m_aBossGuid[1].Clear(); // Timers m_uiNextWaveTimer = 10000; @@ -126,11 +126,11 @@ void hyjalAI::Reset() if (!m_pInstance) return; - m_bIsFirstBossDead = m_uiBase ? m_pInstance->GetData(TYPE_KAZROGAL) : m_pInstance->GetData(TYPE_WINTERCHILL); - m_bIsSecondBossDead = m_uiBase ? m_pInstance->GetData(TYPE_AZGALOR) : m_pInstance->GetData(TYPE_ANETHERON); + m_bIsFirstBossDead = m_uiBase ? m_pInstance->GetData(TYPE_KAZROGAL) == DONE : m_pInstance->GetData(TYPE_WINTERCHILL) == DONE; + m_bIsSecondBossDead = m_uiBase ? m_pInstance->GetData(TYPE_AZGALOR) == DONE : m_pInstance->GetData(TYPE_ANETHERON) == DONE; // Reset Instance Data for trash count - m_pInstance->SetData(DATA_RESET_TRASH_COUNT, 0); + m_pInstance->SetData(TYPE_TRASH_COUNT, 0); } void hyjalAI::EnterEvadeMode() @@ -151,8 +151,8 @@ void hyjalAI::JustReachedHome() if (m_uiBase == BASE_ALLY) DoCastSpellIfCan(m_creature, SPELL_BRILLIANCE_AURA, CAST_TRIGGERED); - m_bIsFirstBossDead = m_uiBase ? m_pInstance->GetData(TYPE_KAZROGAL) : m_pInstance->GetData(TYPE_WINTERCHILL); - m_bIsSecondBossDead = m_uiBase ? m_pInstance->GetData(TYPE_AZGALOR) : m_pInstance->GetData(TYPE_ANETHERON); + m_bIsFirstBossDead = m_uiBase ? m_pInstance->GetData(TYPE_KAZROGAL) == DONE : m_pInstance->GetData(TYPE_WINTERCHILL) == DONE; + m_bIsSecondBossDead = m_uiBase ? m_pInstance->GetData(TYPE_AZGALOR) == DONE : m_pInstance->GetData(TYPE_ANETHERON) == DONE; } void hyjalAI::Aggro(Unit *who) @@ -226,9 +226,9 @@ void hyjalAI::JustSummoned(Creature* pSummoned) if (pSummoned->IsWorldBoss()) { if (!m_bIsFirstBossDead) - m_uiBossGUID[0] = pSummoned->GetGUID(); + m_aBossGuid[0] = pSummoned->GetObjectGuid(); else - m_uiBossGUID[1] = pSummoned->GetGUID(); + m_aBossGuid[1] = pSummoned->GetObjectGuid(); m_uiCheckTimer = 5000; } @@ -256,7 +256,7 @@ void hyjalAI::SummonNextWave() return; } - m_uiEnemyCount = m_pInstance->GetData(DATA_TRASH); + m_uiEnemyCount = m_pInstance->GetData(TYPE_TRASH_COUNT); for(uint8 i = 0; i < MAX_WAVE_MOB; ++i) { @@ -276,7 +276,7 @@ void hyjalAI::SummonNextWave() // Enable world state m_pInstance->DoUpdateWorldState(WORLD_STATE_ENEMY, 1); - m_pInstance->SetData(DATA_TRASH, m_uiEnemyCount); // Send data for instance script to update count + m_pInstance->SetData(TYPE_TRASH_COUNT, m_uiEnemyCount); // Send data for instance script to update count if (!m_bDebugMode) m_uiNextWaveTimer = pWaveData->m_uiWaveTimer; @@ -390,7 +390,7 @@ void hyjalAI::UpdateAI(const uint32 uiDiff) if (m_uiWaveMoveTimer < uiDiff) { // Skip the master timer, and start next wave in 5. Clear the list, it should not be any here now. - if (!m_pInstance->GetData(DATA_TRASH)) + if (!m_pInstance->GetData(TYPE_TRASH_COUNT)) { lWaveMobGUIDList.clear(); m_uiNextWaveTimer = 5000; @@ -425,18 +425,18 @@ void hyjalAI::UpdateAI(const uint32 uiDiff) { for(uint8 i = 0; i < 2; ++i) { - if (m_uiBossGUID[i]) + if (m_aBossGuid[i]) { - Creature* pBoss = m_creature->GetMap()->GetCreature(m_uiBossGUID[i]); + Creature* pBoss = m_creature->GetMap()->GetCreature(m_aBossGuid[i]); if (pBoss && !pBoss->isAlive()) { - if (m_uiBossGUID[i] == m_uiBossGUID[0]) + if (m_aBossGuid[i] == m_aBossGuid[0]) { DoTalk(INCOMING); m_bIsFirstBossDead = true; } - else if (m_uiBossGUID[i] == m_uiBossGUID[1]) + else if (m_aBossGuid[i] == m_aBossGuid[1]) { DoTalk(SUCCESS); m_bIsSecondBossDead = true; @@ -447,7 +447,7 @@ void hyjalAI::UpdateAI(const uint32 uiDiff) m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); - m_uiBossGUID[i] = 0; + m_aBossGuid[i].Clear(); // Reset world state for enemies to disable it m_pInstance->DoUpdateWorldState(WORLD_STATE_ENEMY, 0); diff --git a/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.h b/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.h index 47c5036b4..86f5172c4 100644 --- a/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.h +++ b/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.h @@ -167,7 +167,7 @@ struct MANGOS_DLL_DECL hyjalAI : public ScriptedAI ScriptedInstance* m_pInstance; - uint64 m_uiBossGUID[2]; + ObjectGuid m_aBossGuid[2]; uint32 m_uiNextWaveTimer; uint32 m_uiWaveCount; diff --git a/scripts/kalimdor/caverns_of_time/hyjal/instance_hyjal.cpp b/scripts/kalimdor/caverns_of_time/hyjal/instance_hyjal.cpp index 7fe52ee8f..ecd83b70e 100644 --- a/scripts/kalimdor/caverns_of_time/hyjal/instance_hyjal.cpp +++ b/scripts/kalimdor/caverns_of_time/hyjal/instance_hyjal.cpp @@ -32,202 +32,192 @@ EndScriptData */ 4 - Archimonde event */ -struct MANGOS_DLL_DECL instance_mount_hyjal : public ScriptedInstance +instance_mount_hyjal::instance_mount_hyjal(Map* pMap) : ScriptedInstance(pMap), + m_uiTrashCount(0) { - instance_mount_hyjal(Map* pMap) : ScriptedInstance(pMap) {Initialize();}; - - uint32 m_auiEncounter[MAX_ENCOUNTER]; - std::string strSaveData; - - GUIDList lAncientGemGUIDList; - - uint64 m_uiRageWinterchill; - uint64 m_uiAnetheron; - uint64 m_uiKazrogal; - uint64 m_uiAzgalor; - uint64 m_uiArchimonde; - uint64 m_uiJainaProudmoore; - uint64 m_uiThrall; - uint64 m_uiTyrandeWhisperwind; - - uint32 m_uiTrashCount; - - void Initialize() - { - memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); + Initialize(); +} - lAncientGemGUIDList.clear(); +void instance_mount_hyjal::Initialize() +{ + memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); +} - m_uiRageWinterchill = 0; - m_uiAnetheron = 0; - m_uiKazrogal = 0; - m_uiAzgalor = 0; - m_uiArchimonde = 0; - m_uiJainaProudmoore = 0; - m_uiThrall = 0; - m_uiTyrandeWhisperwind = 0; +bool instance_mount_hyjal::IsEncounterInProgress() const +{ + for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) + if (m_auiEncounter[i] == IN_PROGRESS) return true; - m_uiTrashCount = 0; - } + return false; +} - bool IsEncounterInProgress() const - { - for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) - if (m_auiEncounter[i] == IN_PROGRESS) return true; +void instance_mount_hyjal::OnCreatureCreate(Creature* pCreature) +{ + if (pCreature->GetEntry() == NPC_ARCHIMONDE) + m_mNpcEntryGuidStore[NPC_ARCHIMONDE] == pCreature->GetObjectGuid(); +} - return false; - } +void instance_mount_hyjal::OnObjectCreate(GameObject* pGo) +{ + if (pGo->GetEntry() == GO_ANCIENT_GEM) + lAncientGemGUIDList.push_back(pGo->GetGUID()); +} - void OnCreatureCreate(Creature* pCreature) +void instance_mount_hyjal::OnCreatureEnterCombat(Creature* pCreature) +{ + switch (pCreature->GetEntry()) { - switch(pCreature->GetEntry()) - { - case NPC_WINTERCHILL: m_uiRageWinterchill = pCreature->GetGUID(); break; - case NPC_ANETHERON: m_uiAnetheron = pCreature->GetGUID(); break; - case NPC_KAZROGAL: m_uiKazrogal = pCreature->GetGUID(); break; - case NPC_AZGALOR: m_uiAzgalor = pCreature->GetGUID(); break; - case NPC_ARCHIMONDE: m_uiArchimonde = pCreature->GetGUID(); break; - case NPC_JAINA: m_uiJainaProudmoore = pCreature->GetGUID(); break; - case NPC_THRALL: m_uiThrall = pCreature->GetGUID(); break; - case NPC_TYRANDE: m_uiTyrandeWhisperwind = pCreature->GetGUID(); break; - } + case NPC_WINTERCHILL: SetData(TYPE_WINTERCHILL, IN_PROGRESS); break; + case NPC_ANETHERON: SetData(TYPE_ANETHERON, IN_PROGRESS); break; + case NPC_KAZROGAL: SetData(TYPE_KAZROGAL, IN_PROGRESS); break; + case NPC_AZGALOR: SetData(TYPE_AZGALOR, IN_PROGRESS); break; + case NPC_ARCHIMONDE: SetData(TYPE_ARCHIMONDE, IN_PROGRESS); break; } +} - void OnObjectCreate(GameObject* pGo) +void instance_mount_hyjal::OnCreatureEvade(Creature* pCreature) +{ + switch (pCreature->GetEntry()) { - if (pGo->GetEntry() == GO_ANCIENT_GEM) - lAncientGemGUIDList.push_back(pGo->GetGUID()); + case NPC_WINTERCHILL: SetData(TYPE_WINTERCHILL, FAIL); break; + case NPC_ANETHERON: SetData(TYPE_ANETHERON, FAIL); break; + case NPC_KAZROGAL: SetData(TYPE_KAZROGAL, FAIL); break; + case NPC_AZGALOR: SetData(TYPE_AZGALOR, FAIL); break; + case NPC_ARCHIMONDE: SetData(TYPE_ARCHIMONDE, FAIL); break; } +} - uint64 GetData64(uint32 uiData) +void instance_mount_hyjal::OnCreatureDeath(Creature* pCreature) +{ + switch (pCreature->GetEntry()) { - switch(uiData) - { - case DATA_RAGEWINTERCHILL: return m_uiRageWinterchill; - case DATA_ANETHERON: return m_uiAnetheron; - case DATA_KAZROGAL: return m_uiKazrogal; - case DATA_AZGALOR: return m_uiAzgalor; - case DATA_ARCHIMONDE: return m_uiArchimonde; - case DATA_JAINAPROUDMOORE: return m_uiJainaProudmoore; - case DATA_THRALL: return m_uiThrall; - case DATA_TYRANDEWHISPERWIND: return m_uiTyrandeWhisperwind; - } - - return 0; + case NPC_WINTERCHILL: SetData(TYPE_WINTERCHILL, DONE); break; + case NPC_ANETHERON: SetData(TYPE_ANETHERON, DONE); break; + case NPC_KAZROGAL: SetData(TYPE_KAZROGAL, DONE); break; + case NPC_AZGALOR: SetData(TYPE_AZGALOR, DONE); break; + case NPC_ARCHIMONDE: SetData(TYPE_ARCHIMONDE, DONE); break; + + // Trash Mobs summoned in waves + case NPC_NECRO: + case NPC_ABOMI: + case NPC_GHOUL: + case NPC_BANSH: + case NPC_CRYPT: + case NPC_GARGO: + case NPC_FROST: + case NPC_GIANT: + case NPC_STALK: + // Decrease counter, and update world-state + if (m_uiTrashCount) + { + --m_uiTrashCount; + DoUpdateWorldState(WORLD_STATE_ENEMYCOUNT, m_uiTrashCount); + } + break; } +} - void SetData(uint32 uiType, uint32 uiData) +void instance_mount_hyjal::SetData(uint32 uiType, uint32 uiData) +{ + switch(uiType) { - switch(uiType) - { - case TYPE_WINTERCHILL: - if (m_auiEncounter[0] == DONE) - return; - m_auiEncounter[0] = uiData; - break; - case TYPE_ANETHERON: - if (m_auiEncounter[1] == DONE) - return; - m_auiEncounter[1] = uiData; - break; - case TYPE_KAZROGAL: - if (m_auiEncounter[2] == DONE) - return; - m_auiEncounter[2] = uiData; - break; - case TYPE_AZGALOR: - if (m_auiEncounter[3] == DONE) - return; - m_auiEncounter[3] = uiData; - break; - case TYPE_ARCHIMONDE: - m_auiEncounter[4] = uiData; - break; - - case DATA_RESET_TRASH_COUNT: - m_uiTrashCount = 0; - break; - - case DATA_TRASH: - if (uiData) - m_uiTrashCount = uiData; - else - --m_uiTrashCount; - - DoUpdateWorldState(WORLD_STATE_ENEMYCOUNT, m_uiTrashCount); - break; - - case TYPE_RETREAT: - if (uiData == SPECIAL) + case TYPE_WINTERCHILL: + if (m_auiEncounter[0] == DONE) + return; + m_auiEncounter[0] = uiData; + break; + case TYPE_ANETHERON: + if (m_auiEncounter[1] == DONE) + return; + m_auiEncounter[1] = uiData; + break; + case TYPE_KAZROGAL: + if (m_auiEncounter[2] == DONE) + return; + m_auiEncounter[2] = uiData; + break; + case TYPE_AZGALOR: + if (m_auiEncounter[3] == DONE) + return; + m_auiEncounter[3] = uiData; + break; + case TYPE_ARCHIMONDE: + m_auiEncounter[4] = uiData; + break; + + case TYPE_TRASH_COUNT: + m_uiTrashCount = uiData; + DoUpdateWorldState(WORLD_STATE_ENEMYCOUNT, m_uiTrashCount); + break; + + case TYPE_RETREAT: + if (uiData == SPECIAL) + { + if (!lAncientGemGUIDList.empty()) { - if (!lAncientGemGUIDList.empty()) + for(GUIDList::const_iterator itr = lAncientGemGUIDList.begin(); itr != lAncientGemGUIDList.end(); ++itr) { - for(GUIDList::const_iterator itr = lAncientGemGUIDList.begin(); itr != lAncientGemGUIDList.end(); ++itr) - { - //don't know how long it expected - DoRespawnGameObject(*itr,DAY); - } + //don't know how long it expected + DoRespawnGameObject(*itr, DAY); } } - break; - } + } + break; + } - debug_log("SD2: Instance Hyjal: Instance data updated for event %u (Data=%u)", uiType, uiData); + debug_log("SD2: Instance Hyjal: Instance data updated for event %u (Data=%u)", uiType, uiData); - if (uiData == DONE) - { - OUT_SAVE_INST_DATA; + if (uiData == DONE) + { + OUT_SAVE_INST_DATA; - std::ostringstream saveStream; - saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2] << " " - << m_auiEncounter[3] << " " << m_auiEncounter[4]; + std::ostringstream saveStream; + saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2] << " " + << m_auiEncounter[3] << " " << m_auiEncounter[4]; - strSaveData = saveStream.str(); + m_strSaveData = saveStream.str(); - SaveToDB(); - OUT_SAVE_INST_DATA_COMPLETE; - } + SaveToDB(); + OUT_SAVE_INST_DATA_COMPLETE; } +} - uint32 GetData(uint32 uiType) +uint32 instance_mount_hyjal::GetData(uint32 uiType) +{ + switch(uiType) { - switch(uiType) - { - case TYPE_WINTERCHILL: return m_auiEncounter[0]; - case TYPE_ANETHERON: return m_auiEncounter[1]; - case TYPE_KAZROGAL: return m_auiEncounter[2]; - case TYPE_AZGALOR: return m_auiEncounter[3]; - case TYPE_ARCHIMONDE: return m_auiEncounter[4]; - case DATA_TRASH: return m_uiTrashCount; - } - return 0; - } + case TYPE_WINTERCHILL: return m_auiEncounter[0]; + case TYPE_ANETHERON: return m_auiEncounter[1]; + case TYPE_KAZROGAL: return m_auiEncounter[2]; + case TYPE_AZGALOR: return m_auiEncounter[3]; + case TYPE_ARCHIMONDE: return m_auiEncounter[4]; - const char* Save() - { - return strSaveData.c_str(); + case TYPE_TRASH_COUNT: return m_uiTrashCount; + + default: + return 0; } +} - void Load(const char* in) +void instance_mount_hyjal::Load(const char* chrIn) +{ + if (!chrIn) { - if (!in) - { - OUT_LOAD_INST_DATA_FAIL; - return; - } + OUT_LOAD_INST_DATA_FAIL; + return; + } - OUT_LOAD_INST_DATA(in); + OUT_LOAD_INST_DATA(chrIn); - std::istringstream loadStream(in); - loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3] >> m_auiEncounter[4]; + std::istringstream loadStream(chrIn); + loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3] >> m_auiEncounter[4]; - for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) - if (m_auiEncounter[i] == IN_PROGRESS) // Do not load an encounter as IN_PROGRESS - reset it instead. - m_auiEncounter[i] = NOT_STARTED; + for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) + if (m_auiEncounter[i] == IN_PROGRESS) // Do not load an encounter as IN_PROGRESS - reset it instead. + m_auiEncounter[i] = NOT_STARTED; - OUT_LOAD_INST_DATA_COMPLETE; - } -}; + OUT_LOAD_INST_DATA_COMPLETE; +} InstanceData* GetInstanceData_instance_mount_hyjal(Map* pMap) { @@ -236,9 +226,10 @@ InstanceData* GetInstanceData_instance_mount_hyjal(Map* pMap) void AddSC_instance_mount_hyjal() { - Script *newscript; - newscript = new Script; - newscript->Name = "instance_hyjal"; - newscript->GetInstanceData = &GetInstanceData_instance_mount_hyjal; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "instance_hyjal"; + pNewScript->GetInstanceData = &GetInstanceData_instance_mount_hyjal; + pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 572531309..6cd61d31b 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2185" + #define SD2_REVISION_NR "2186" #endif // __SD2_REVISION_NR_H__ From b149df47ec343a460b982f5dd2c5fa604d99ae06 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Sat, 4 Jun 2011 17:42:59 +0200 Subject: [PATCH 0167/1172] [2187] Use EntryGuidMap-Storage in Old Hillsbrand * Drop unneeded GUID variables for Scarloc and his mount --- .../old_hillsbrad/instance_old_hillsbrad.cpp | 21 ++++--------------- .../old_hillsbrad/old_hillsbrad.cpp | 21 +++++++------------ .../old_hillsbrad/old_hillsbrad.h | 12 +++-------- sd2_revision_nr.h | 2 +- 4 files changed, 15 insertions(+), 41 deletions(-) diff --git a/scripts/kalimdor/caverns_of_time/old_hillsbrad/instance_old_hillsbrad.cpp b/scripts/kalimdor/caverns_of_time/old_hillsbrad/instance_old_hillsbrad.cpp index 6258c96bf..9b3d02036 100644 --- a/scripts/kalimdor/caverns_of_time/old_hillsbrad/instance_old_hillsbrad.cpp +++ b/scripts/kalimdor/caverns_of_time/old_hillsbrad/instance_old_hillsbrad.cpp @@ -26,11 +26,7 @@ EndScriptData */ instance_old_hillsbrad::instance_old_hillsbrad(Map* pMap) : ScriptedInstance(pMap), m_uiBarrelCount(0), - m_uiThrallEventCount(0), - m_uiThrallGUID(0), - m_uiTarethaGUID(0), - m_uiScarlocGUID(0), - m_uiEpochGUID(0) + m_uiThrallEventCount(0) { Initialize(); } @@ -45,13 +41,9 @@ void instance_old_hillsbrad::OnCreatureCreate(Creature* pCreature) switch(pCreature->GetEntry()) { case NPC_THRALL: - m_uiThrallGUID = pCreature->GetGUID(); - break; case NPC_TARETHA: - m_uiTarethaGUID = pCreature->GetGUID(); - break; case NPC_EPOCH: - m_uiEpochGUID = pCreature->GetGUID(); + m_mNpcEntryGuidStore[pCreature->GetEntry()] = pCreature->GetObjectGuid(); break; } } @@ -61,14 +53,14 @@ void instance_old_hillsbrad::OnCreatureDeath(Creature* pCreature) if (pCreature->GetEntry() == NPC_EPOCH) { // notify thrall so he can continue - if (Creature* pThrall = instance->GetCreature(m_uiThrallGUID)) + if (Creature* pThrall = GetSingleCreatureFromStorage(NPC_THRALL)) pThrall->AI()->KilledUnit(pCreature); } } void instance_old_hillsbrad::HandleThrallRelocation() { - if (Creature* pThrall = instance->GetCreature(m_uiThrallGUID)) + if (Creature* pThrall = GetSingleCreatureFromStorage(NPC_THRALL)) { debug_log("SD2: Instance Old Hillsbrad: Thrall relocation"); @@ -201,11 +193,6 @@ uint32 instance_old_hillsbrad::GetData(uint32 uiData) } } -uint64 instance_old_hillsbrad::GetData64(uint32 uiData) -{ - return 0; -} - void instance_old_hillsbrad::UpdateLodgeQuestCredit() { Map::PlayerList const& players = instance->GetPlayers(); diff --git a/scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.cpp b/scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.cpp index c52d76775..9c1c7baf9 100644 --- a/scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.cpp +++ b/scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.cpp @@ -37,7 +37,7 @@ struct MANGOS_DLL_DECL npc_tarethaAI : public npc_escortAI npc_tarethaAI(Creature* pCreature); instance_old_hillsbrad* m_pInstance; - uint64 m_uiErozionGUID; + ObjectGuid m_erozionGuid; uint32 m_uiErozionEventTimer; uint32 m_uiErozionPhase; @@ -256,15 +256,11 @@ struct MANGOS_DLL_DECL npc_thrall_old_hillsbradAI : public npc_escortAI instance_old_hillsbrad* m_pInstance; - uint64 m_uiScarlocMountGUID; - bool m_bIsLowHp; bool m_bHadMount; void Reset() { - m_uiScarlocMountGUID = 0; - m_bIsLowHp = false; if (m_bHadMount) @@ -517,9 +513,7 @@ struct MANGOS_DLL_DECL npc_thrall_old_hillsbradAI : public npc_escortAI case NPC_BARN_GUARDSMAN: case NPC_BARN_PROTECTOR: case NPC_BARN_LOOKOUT: - break; case NPC_SKARLOC_MOUNT: - m_uiScarlocMountGUID = pSummoned->GetGUID(); break; default: pSummoned->AI()->AttackStart(m_creature); @@ -718,7 +712,6 @@ enum npc_tarethaAI::npc_tarethaAI(Creature* pCreature) : npc_escortAI(pCreature) { m_pInstance = (instance_old_hillsbrad*)pCreature->GetInstanceData(); - m_uiErozionGUID = 0; m_uiErozionEventTimer = 5000; m_uiErozionPhase = 0; Reset(); @@ -727,7 +720,7 @@ npc_tarethaAI::npc_tarethaAI(Creature* pCreature) : npc_escortAI(pCreature) void npc_tarethaAI::JustSummoned(Creature* pSummoned) { if (pSummoned->GetEntry() == NPC_EROZION) - m_uiErozionGUID = pSummoned->GetGUID(); + m_erozionGuid = pSummoned->GetObjectGuid(); else DoScriptText(SAY_EPOCH_ENTER1, pSummoned); } @@ -775,23 +768,23 @@ void npc_tarethaAI::UpdateEscortAI(const uint32 uiDiff) DoScriptText(SAY_TR_THEN_WHO, pThrall); break; case 4: - if (Creature* pErozion = m_creature->GetMap()->GetCreature(m_uiErozionGUID)) + if (Creature* pErozion = m_creature->GetMap()->GetCreature(m_erozionGuid)) DoScriptText(SAY_PRE_WIPE, pErozion); break; case 5: - //if (Creature* pErozion = m_creature->GetMap()->GetCreature(m_uiErozionGUID)) + //if (Creature* pErozion = m_creature->GetMap()->GetCreature(m_erozionGuid)) //pErozion->AI()->DoCastSpellIfCan(); break; case 6: - if (Creature* pErozion = m_creature->GetMap()->GetCreature(m_uiErozionGUID)) + if (Creature* pErozion = m_creature->GetMap()->GetCreature(m_erozionGuid)) DoScriptText(SAY_WIPE_MEMORY, pErozion); break; case 7: - if (Creature* pErozion = m_creature->GetMap()->GetCreature(m_uiErozionGUID)) + if (Creature* pErozion = m_creature->GetMap()->GetCreature(m_erozionGuid)) DoScriptText(SAY_ABOUT_TARETHA, pErozion); break; case 8: - if (Creature* pErozion = m_creature->GetMap()->GetCreature(m_uiErozionGUID)) + if (Creature* pErozion = m_creature->GetMap()->GetCreature(m_erozionGuid)) DoScriptText(SAY_AFTER_WIPE, pErozion); break; case 9: diff --git a/scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.h b/scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.h index 4ca9e1a2c..dbc2a27eb 100644 --- a/scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.h +++ b/scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.h @@ -43,26 +43,20 @@ class MANGOS_DLL_DECL instance_old_hillsbrad : public ScriptedInstance void SetData(uint32 uiType, uint32 uiData); uint32 GetData(uint32 uiType); - uint64 GetData64(uint32 uiData); void HandleThrallRelocation(); void UpdateLodgeQuestCredit(); - Creature* GetThrall() { return instance->GetCreature(m_uiThrallGUID); } - Creature* GetTaretha() { return instance->GetCreature(m_uiTarethaGUID); } - Creature* GetScarloc() { return instance->GetCreature(m_uiScarlocGUID); } - Creature* GetEpoch() { return instance->GetCreature(m_uiEpochGUID); } + Creature* GetThrall() { return GetSingleCreatureFromStorage(NPC_THRALL); } + Creature* GetTaretha() { return GetSingleCreatureFromStorage(NPC_TARETHA); } + Creature* GetEpoch() { return GetSingleCreatureFromStorage(NPC_EPOCH); } protected: uint32 m_auiEncounter[MAX_ENCOUNTER]; uint32 m_uiBarrelCount; uint32 m_uiThrallEventCount; - uint64 m_uiThrallGUID; - uint64 m_uiTarethaGUID; - uint64 m_uiScarlocGUID; - uint64 m_uiEpochGUID; }; #endif diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 6cd61d31b..e427a473d 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2186" + #define SD2_REVISION_NR "2187" #endif // __SD2_REVISION_NR_H__ From e7cf342fec1cd510e667b2a675c8c4704afa4d31 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Sat, 4 Jun 2011 18:46:44 +0200 Subject: [PATCH 0168/1172] [2188] Cleanup boss C'Thun * Replace uint64 with ObjectGuid - this removes remaining uint64 stored guids from kalimdor * Introduce some coding style (not finished) * Add clear fail support for CThun phases * Ensure phase transiting doesn't fail * Add support against solo-attempts (he is an ancient god, no chance there!) Please test with a couple of players and report problems :) --- .../temple_of_ahnqiraj/boss_cthun.cpp | 1338 +++++++++-------- .../instance_temple_of_ahnqiraj.cpp | 22 +- .../temple_of_ahnqiraj/temple_of_ahnqiraj.h | 16 +- sd2_revision_nr.h | 2 +- 4 files changed, 712 insertions(+), 666 deletions(-) diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_cthun.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_cthun.cpp index 93c0d47ea..d0318cafa 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/boss_cthun.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_cthun.cpp @@ -24,65 +24,57 @@ EndScriptData */ #include "precompiled.h" #include "temple_of_ahnqiraj.h" -//Text emote -#define EMOTE_WEAKENED -1531011 - -#define PI 3.14 - -//****** Out of Combat ****** -//Random Wispers - No txt only sound -#define RANDOM_SOUND_WHISPER 8663 - -//***** Phase 1 ******** - -//Mobs -#define BOSS_EYE_OF_CTHUN 15589 -#define MOB_CLAW_TENTACLE 15725 -#define MOB_EYE_TENTACLE 15726 -#define MOB_SMALL_PORTAL 15904 - -//Eye Spells -#define SPELL_GREEN_BEAM 26134 -#define SPELL_DARK_GLARE 26029 -#define SPELL_RED_COLORATION 22518 //Probably not the right spell but looks similar - -//Eye Tentacles Spells -#define SPELL_MIND_FLAY 26143 - -//Claw Tentacles Spells -#define SPELL_GROUND_RUPTURE 26139 -#define SPELL_HAMSTRING 26141 - -#define MOB_ - -//*****Phase 2****** -//Body spells -//#define SPELL_CARAPACE_CTHUN 26156 //Was removed from client dbcs -#define SPELL_TRANSFORM 26232 - -//Eye Tentacles Spells -//SAME AS PHASE1 - -//Giant Claw Tentacles -#define SPELL_MASSIVE_GROUND_RUPTURE 26100 - -//Also casts Hamstring -#define SPELL_THRASH 3391 - -//Giant Eye Tentacles -//CHAIN CASTS "SPELL_GREEN_BEAM" - -//Stomach Spells -#define SPELL_MOUTH_TENTACLE 26332 -#define SPELL_EXIT_STOMACH_KNOCKBACK 25383 -#define SPELL_DIGESTIVE_ACID 26476 - -//Mobs -#define MOB_BODY_OF_CTHUN 15809 -#define MOB_GIANT_CLAW_TENTACLE 15728 -#define MOB_GIANT_EYE_TENTACLE 15334 -#define MOB_FLESH_TENTACLE 15802 -#define MOB_GIANT_PORTAL 15910 +enum +{ + EMOTE_WEAKENED = -1531011, + + // ****** Out of Combat ****** + // Random Wispers - No text only sound, maybe handle them in instance script! + RANDOM_SOUND_WHISPER = 8663, + + // ***** Phase 1 ******** + NPC_EYE_OF_CTHUN = 15589, + MOB_CLAW_TENTACLE = 15725, + MOB_EYE_TENTACLE = 15726, + MOB_SMALL_PORTAL = 15904, + + SPELL_GREEN_BEAM = 26134, + SPELL_DARK_GLARE = 26029, + SPELL_RED_COLORATION = 22518, // Probably not the right spell but looks similar + + // Eye Tentacles Spells + SPELL_MIND_FLAY = 26143, + + // Claw Tentacles Spells + SPELL_GROUND_RUPTURE = 26139, + SPELL_HAMSTRING = 26141, + + // *****Phase 2****** + // Body spells + // SPELL_CARAPACE_CTHUN = 26156, // Was removed from client dbcs + SPELL_TRANSFORM = 26232, + + // Giant Claw Tentacles + SPELL_MASSIVE_GROUND_RUPTURE = 26100, + + // Also casts Hamstring + SPELL_THRASH = 3391, + + // Giant Eye Tentacles + // CHAIN CASTS "SPELL_GREEN_BEAM" + + // Stomach Spells + SPELL_MOUTH_TENTACLE = 26332, + SPELL_EXIT_STOMACH_KNOCKBACK = 25383, + SPELL_DIGESTIVE_ACID = 26476, + + // Mobs + MOB_BODY_OF_CTHUN = 15809, + MOB_GIANT_CLAW_TENTACLE = 15728, + MOB_GIANT_EYE_TENTACLE = 15334, + MOB_FLESH_TENTACLE = 15802, + MOB_GIANT_PORTAL = 15910, +}; //Stomach Teleport positions #define STOMACH_X -8562.0f @@ -101,30 +93,30 @@ EndScriptData */ #define TENTACLE_POS2_Z -98.0f #define TENTACLE_POS2_O 2.12f -//Kick out position +//Kick out position -- unneeded - replace this with areatrigger handling of trigger [Trigger 4033]! #define KICK_X -8545.0f #define KICK_Y 1984.0f #define KICK_Z -96.0f struct MANGOS_DLL_DECL flesh_tentacleAI : public ScriptedAI { - flesh_tentacleAI(Creature* pCreature) : ScriptedAI(pCreature), Parent(0) + flesh_tentacleAI(Creature* pCreature) : ScriptedAI(pCreature) { SetCombatMovement(false); Reset(); } - uint64 Parent; - uint32 CheckTimer; + ObjectGuid m_cThunGuid; + uint32 m_uiCheckTimer; - void SpawnedByCthun(uint64 p) + void SpawnedByCthun(Creature* pCThun) { - Parent = p; + m_cThunGuid = pCThun->GetObjectGuid(); } void Reset() { - CheckTimer = 1000; + m_uiCheckTimer = 1000; } void UpdateAI(const uint32 diff); @@ -147,114 +139,120 @@ struct MANGOS_DLL_DECL eye_of_cthunAI : public ScriptedAI ScriptedInstance* m_pInstance; - //Global variables - uint32 PhaseTimer; + // Global variables + uint32 m_uiPhaseTimer; - //Eye beam phase - uint32 BeamTimer; - uint32 EyeTentacleTimer; - uint32 ClawTentacleTimer; + // Eye beam phase + uint32 m_uiBeamTimer; + uint32 m_uiEyeTentacleTimer; + uint32 m_uiClawTentacleTimer; - //Dark Glare phase - uint32 DarkGlareTick; - uint32 DarkGlareTickTimer; - float DarkGlareAngle; - bool ClockWise; + // Dark Glare phase + uint32 m_uiDarkGlareTick; + uint32 m_uiDarkGlareTickTimer; + float m_fDarkGlareAngle; + bool m_bClockWise; void Reset() { - //Phase information - PhaseTimer = 50000; //First dark glare in 50 seconds + // Phase information + m_uiPhaseTimer = 50000; // First dark glare in 50 seconds - //Eye beam phase 50 seconds - BeamTimer = 3000; - EyeTentacleTimer = 45000; //Always spawns 5 seconds before Dark Beam - ClawTentacleTimer = 12500; //4 per Eye beam phase (unsure if they spawn durring Dark beam) + // Eye beam phase 50 seconds + m_uiBeamTimer = 3000; + m_uiEyeTentacleTimer = 45000; // Always spawns 5 seconds before Dark Beam + m_uiClawTentacleTimer = 12500; // 4 per Eye beam phase (unsure if they spawn durring Dark beam) - //Dark Beam phase 35 seconds (each tick = 1 second, 35 ticks) - DarkGlareTick = 0; - DarkGlareTickTimer = 1000; - DarkGlareAngle = 0; - ClockWise = false; + // Dark Beam phase 35 seconds (each tick = 1 second, 35 ticks) + m_uiDarkGlareTick = 0; + m_uiDarkGlareTickTimer = 1000; + m_fDarkGlareAngle = 0; + m_bClockWise = false; - //Reset flags + // Reset flags m_creature->RemoveAurasDueToSpell(SPELL_RED_COLORATION); m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_NON_ATTACKABLE); + } - //Reset Phase - if (m_pInstance) - m_pInstance->SetData(TYPE_CTHUN_PHASE, 0); + void JustSummoned(Creature* pSummoned) + { + if (pSummoned->GetEntry() == MOB_EYE_TENTACLE) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + pSummoned->AI()->AttackStart(pTarget); + } } void SpawnEyeTentacle(float x, float y) { - Creature* Spawned; - Spawned = (Creature*)m_creature->SummonCreature(MOB_EYE_TENTACLE,m_creature->GetPositionX()+x,m_creature->GetPositionY()+y,m_creature->GetPositionZ(),0,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,500); - if (Spawned) - { - Unit* target; - target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0); + m_creature->SummonCreature(MOB_EYE_TENTACLE, m_creature->GetPositionX()+x ,m_creature->GetPositionY()+y, m_creature->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 500); + } - if (target) - Spawned->AI()->AttackStart(target); - } + void Aggro(Unit* pWho) + { + if (m_pInstance) + m_pInstance->SetData(TYPE_CTHUN_PHASE, PHASE_EYE_NORMAL); } - void UpdateAI(const uint32 diff) + void EnterEvadeMode() { - //Check if we have a target + if (m_pInstance) + m_pInstance->SetData(TYPE_CTHUN_PHASE, PHASE_NOT_STARTED); + + ScriptedAI::EnterEvadeMode(); + } + + void UpdateAI(const uint32 uiDiff) + { + // Check if we have a target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - //No instance + // No instance if (!m_pInstance) return; switch (m_pInstance->GetData(TYPE_CTHUN_PHASE)) { - case 0: + case PHASE_EYE_NORMAL: { - //BeamTimer - if (BeamTimer < diff) + // m_uiBeamTimer + if (m_uiBeamTimer < uiDiff) { - //SPELL_GREEN_BEAM - Unit* target = NULL; - target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0); - if (target) + // SPELL_GREEN_BEAM + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) { m_creature->InterruptNonMeleeSpells(false); - DoCastSpellIfCan(target,SPELL_GREEN_BEAM); + DoCastSpellIfCan(pTarget, SPELL_GREEN_BEAM); - //Correctly update our target - m_creature->SetTargetGuid(target->GetObjectGuid()); + // Correctly update our target + m_creature->SetTargetGuid(pTarget->GetObjectGuid()); } //Beam every 3 seconds - BeamTimer = 3000; - }else BeamTimer -= diff; + m_uiBeamTimer = 3000; + } + else + m_uiBeamTimer -= uiDiff; - //ClawTentacleTimer - if (ClawTentacleTimer < diff) + // m_uiClawTentacleTimer + if (m_uiClawTentacleTimer < uiDiff) { - Unit* target = NULL; - target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0); - if (target) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) { - Creature* Spawned = NULL; - - //Spawn claw tentacle on the random target - Spawned = (Creature*)m_creature->SummonCreature(MOB_CLAW_TENTACLE,target->GetPositionX(),target->GetPositionY(),target->GetPositionZ(),0,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,500); - - if (Spawned) - Spawned->AI()->AttackStart(target); + // Spawn claw tentacle on the random target + if (Creature* pSummoned = m_creature->SummonCreature(MOB_CLAW_TENTACLE, pTarget->GetPositionX(), pTarget->GetPositionY(), pTarget->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 500)) + pSummoned->AI()->AttackStart(pTarget); } - //One claw tentacle every 12.5 seconds - ClawTentacleTimer = 12500; - }else ClawTentacleTimer -= diff; + // One claw tentacle every 12.5 seconds + m_uiClawTentacleTimer = 12500; + } + else + m_uiClawTentacleTimer -= uiDiff; - //EyeTentacleTimer - if (EyeTentacleTimer < diff) + // m_uiEyeTentacleTimer + if (m_uiEyeTentacleTimer < uiDiff) { //Spawn the 8 Eye Tentacles in the corret spots SpawnEyeTentacle(0, 20); //south @@ -267,159 +265,172 @@ struct MANGOS_DLL_DECL eye_of_cthunAI : public ScriptedAI SpawnEyeTentacle(-20, 0); // east SpawnEyeTentacle(-10, 10); // south east - //No point actually putting a timer here since - //These shouldn't trigger agian until after phase shifts - EyeTentacleTimer = 45000; - }else EyeTentacleTimer -= diff; + // No point actually putting a timer here since + // These shouldn't trigger agian until after phase shifts + m_uiEyeTentacleTimer = 45000; + } + else + m_uiEyeTentacleTimer -= uiDiff; - //PhaseTimer - if (PhaseTimer < diff) + // m_uiPhaseTimer + if (m_uiPhaseTimer < uiDiff) { //Switch to Dark Beam - m_pInstance->SetData(TYPE_CTHUN_PHASE, 1); + m_pInstance->SetData(TYPE_CTHUN_PHASE, PHASE_EYE_DARK_GLARE); m_creature->InterruptNonMeleeSpells(false); - //Select random target for dark beam to start on - Unit* target = NULL; - target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0); - - if (target) + // Select random target for dark beam to start on + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) { - //Correctly update our target - m_creature->SetTargetGuid(target->GetObjectGuid()); - - //Face our target - DarkGlareAngle = m_creature->GetAngle(target); - DarkGlareTickTimer = 1000; - DarkGlareTick = 0; - ClockWise = urand(0, 1); + // Correctly update our target + m_creature->SetTargetGuid(pTarget->GetObjectGuid()); + + // Face our target + m_fDarkGlareAngle = m_creature->GetAngle(pTarget); + m_uiDarkGlareTickTimer = 1000; + m_uiDarkGlareTick = 0; + m_bClockWise = urand(0, 1); } - //Add red coloration to C'thun - DoCastSpellIfCan(m_creature,SPELL_RED_COLORATION); + // Add red coloration to C'thun + DoCastSpellIfCan(m_creature, SPELL_RED_COLORATION); - //Freeze animation + // Freeze animation - //Darkbeam for 35 seconds - PhaseTimer = 35000; - }else PhaseTimer -= diff; + // Darkbeam for 35 seconds + m_uiPhaseTimer = 35000; + } + else + m_uiPhaseTimer -= uiDiff; + break; } - break; - case 1: + case PHASE_EYE_DARK_GLARE: { - //EyeTentacleTimer - if (DarkGlareTick < 35) - if (DarkGlareTickTimer < diff) + // Dark Glare + if (m_uiDarkGlareTick < 35) { - //Remove any target - m_creature->SetTargetGuid(ObjectGuid()); + if (m_uiDarkGlareTickTimer < uiDiff) + { + // Remove any target + m_creature->SetTargetGuid(ObjectGuid()); - //Set angle and cast - if (ClockWise) - m_creature->SetOrientation(DarkGlareAngle + ((float)DarkGlareTick*PI/35)); - else m_creature->SetOrientation(DarkGlareAngle - ((float)DarkGlareTick*PI/35)); + // Set angle and cast + m_creature->SetOrientation(m_fDarkGlareAngle + (m_bClockWise ? 1 : -1) * ((float)m_uiDarkGlareTick*M_PI_F/35)); - m_creature->StopMoving(); + m_creature->StopMoving(); - //Actual dark glare cast, maybe something missing here? - m_creature->CastSpell(NULL, SPELL_DARK_GLARE, false); + // Actual dark glare cast, maybe something missing here? + DoCastSpellIfCan(m_creature, SPELL_DARK_GLARE); - //Increase tick - ++DarkGlareTick; + // Increase tick + ++m_uiDarkGlareTick; - //1 second per tick - DarkGlareTickTimer = 1000; - }else DarkGlareTickTimer -= diff; + // 1 second per tick + m_uiDarkGlareTickTimer = 1000; + } + else + m_uiDarkGlareTickTimer -= uiDiff; + } - //PhaseTimer - if (PhaseTimer < diff) + // m_uiPhaseTimer + if (m_uiPhaseTimer < uiDiff) { - //Switch to Eye Beam - m_pInstance->SetData(TYPE_CTHUN_PHASE, 0); + // Switch to Eye Beam + m_pInstance->SetData(TYPE_CTHUN_PHASE, PHASE_EYE_NORMAL); - BeamTimer = 3000; - EyeTentacleTimer = 45000; //Always spawns 5 seconds before Dark Beam - ClawTentacleTimer = 12500; //4 per Eye beam phase (unsure if they spawn durring Dark beam) + m_uiBeamTimer = 3000; + m_uiEyeTentacleTimer = 45000; //Always spawns 5 seconds before Dark Beam + m_uiClawTentacleTimer = 12500; //4 per Eye beam phase (unsure if they spawn durring Dark beam) m_creature->InterruptNonMeleeSpells(false); - //Remove Red coloration from c'thun + // Remove Red coloration from C'thun m_creature->RemoveAurasDueToSpell(SPELL_RED_COLORATION); - //Freeze animation + // Freeze animation m_creature->SetUInt32Value(UNIT_FIELD_FLAGS, 0); - //Eye Beam for 50 seconds - PhaseTimer = 50000; - }else PhaseTimer -= diff; - }break; + // Eye Beam for 50 seconds + m_uiPhaseTimer = 50000; + } + else + m_uiPhaseTimer -= uiDiff; - //Transition phase - case 2: + break; + } + // Transition phase + case PHASE_TRANSITION: { - //Remove any target + // Remove any target m_creature->SetTargetGuid(ObjectGuid()); m_creature->SetHealth(0); + + // Do not kill yet, to be able to reset on evade + break; } - //Dead phase - case 5: + // Dead phase + case PHASE_FINISH: { m_creature->DealDamage(m_creature, m_creature->GetMaxHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NONE, NULL, false); + return; } } } - void DamageTaken(Unit *done_by, uint32 &damage) + void DamageTaken(Unit* pDealer, uint32& uiDamage) { - //No instance + // No instance if (!m_pInstance) return; switch (m_pInstance->GetData(TYPE_CTHUN_PHASE)) { - case 0: - case 1: + case PHASE_EYE_NORMAL: + case PHASE_EYE_DARK_GLARE: { - //Only if it will kill - if (damage < m_creature->GetHealth()) + // Only if it will kill + if (uiDamage < m_creature->GetHealth()) return; - //Fake death in phase 0 or 1 (green beam or dark glare phase) + // Fake death in phase 0 or 1 (green beam or dark glare phase) m_creature->InterruptNonMeleeSpells(false); - //Remove Red coloration from c'thun + // Remove Red coloration from c'thun m_creature->RemoveAurasDueToSpell(SPELL_RED_COLORATION); - //Reset to normal emote state and prevent select and attack + // Reset to normal emote state and prevent select and attack m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_NON_ATTACKABLE); - //Remove Target field + // Remove Target field m_creature->SetTargetGuid(ObjectGuid()); - //Death animation/respawning; - m_pInstance->SetData(TYPE_CTHUN_PHASE, 2); + // Death animation/ respawning; + m_pInstance->SetData(TYPE_CTHUN_PHASE, PHASE_TRANSITION); + // Ensure CThun is in combat + if (Creature* pCThun = m_pInstance->GetSingleCreatureFromStorage(NPC_CTHUN)) + pCThun->AI()->AttackStart(pDealer); m_creature->SetHealth(0); - damage = 0; + uiDamage = 0; m_creature->InterruptNonMeleeSpells(true); m_creature->RemoveAllAuras(); - } - break; - case 5: + break; + } + case PHASE_FINISH: { - //Allow death here + // Allow death here return; } default: { - //Prevent death in this phase - damage = 0; + // Prevent death in this phase + uiDamage = 0; return; } break; @@ -442,26 +453,24 @@ struct MANGOS_DLL_DECL cthunAI : public ScriptedAI ScriptedInstance* m_pInstance; - //Out of combat whisper timer - uint32 WisperTimer; + // Out of combat whisper timer + uint32 m_uiWisperTimer; - //Global variables - uint32 PhaseTimer; + // Global variables + uint32 m_uiPhaseTimer; //------------------- - //Phase transition - uint64 HoldPlayer; + // Body Phase + uint32 m_uiEyeTentacleTimer; + uint8 m_uiFleshTentaclesKilled; + uint32 m_uiGiantClawTentacleTimer; + uint32 m_uiGiantEyeTentacleTimer; + uint32 m_uiStomachAcidTimer; + uint32 m_uiStomachEnterTimer; + uint32 m_uiStomachEnterVisTimer; - //Body Phase - uint32 EyeTentacleTimer; - uint8 FleshTentaclesKilled; - uint32 GiantClawTentacleTimer; - uint32 GiantEyeTentacleTimer; - uint32 StomachAcidTimer; - uint32 StomachEnterTimer; - uint32 StomachEnterVisTimer; - uint64 StomachEnterTarget; + ObjectGuid m_stomachEnterTargetGuid; // Stomach map, bool = true then in stomach typedef UNORDERED_MAP StomachMap; @@ -469,347 +478,332 @@ struct MANGOS_DLL_DECL cthunAI : public ScriptedAI void Reset() { - //One random wisper every 90 - 300 seconds - WisperTimer = 90000; - - //Phase information - PhaseTimer = 10000; //Emerge in 10 seconds - - //No hold player for transition - HoldPlayer = 0; - - //Body Phase - EyeTentacleTimer = 30000; - FleshTentaclesKilled = 0; - GiantClawTentacleTimer = 15000; //15 seconds into body phase (1 min repeat) - GiantEyeTentacleTimer = 45000; //15 seconds into body phase (1 min repeat) - StomachAcidTimer = 4000; //Every 4 seconds - StomachEnterTimer = 10000; //Every 10 seconds - StomachEnterVisTimer = 0; //Always 3.5 seconds after Stomach Enter Timer - StomachEnterTarget = 0; //Target to be teleported to stomach - - //Clear players in stomach and outside + // One random wisper every 90 - 300 seconds + m_uiWisperTimer = 90000; + + // Phase information + m_uiPhaseTimer = 10000; // Emerge in 10 seconds + + // Body Phase + m_uiEyeTentacleTimer = 30000; + m_uiFleshTentaclesKilled = 0; + m_uiGiantClawTentacleTimer = 15000; // 15 seconds into body phase (1 min repeat) + m_uiGiantEyeTentacleTimer = 45000; // 15 seconds into body phase (1 min repeat) + m_uiStomachAcidTimer = 4000; // Every 4 seconds + m_uiStomachEnterTimer = 10000; // Every 10 seconds + m_uiStomachEnterVisTimer = 0; // Always 3.5 seconds after Stomach Enter Timer + m_stomachEnterTargetGuid.Clear(); // Target to be teleported to stomach + + // Clear players in stomach and outside m_mStomachMap.clear(); - //Reset flags + // Reset flags m_creature->RemoveAurasDueToSpell(SPELL_TRANSFORM); m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_NON_ATTACKABLE); - - if (m_pInstance) - m_pInstance->SetData(TYPE_CTHUN_PHASE, 0); } - void SpawnEyeTentacle(float x, float y) + void JustSummoned(Creature* pSummoned) { - Creature* Spawned; - Spawned = (Creature*)m_creature->SummonCreature(MOB_EYE_TENTACLE,m_creature->GetPositionX()+x,m_creature->GetPositionY()+y,m_creature->GetPositionZ(),0,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,500); - if (Spawned) + if (pSummoned->GetEntry() == MOB_EYE_TENTACLE) { - Unit* target; - - target = SelectRandomNotStomach(); - - if (target) - Spawned->AI()->AttackStart(target); + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + pSummoned->AI()->AttackStart(pTarget); } } - Unit* SelectRandomNotStomach() + void SpawnEyeTentacle(float x, float y) + { + m_creature->SummonCreature(MOB_EYE_TENTACLE, m_creature->GetPositionX()+x ,m_creature->GetPositionY()+y, m_creature->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 500); + } + + Player* SelectRandomNotStomach() { if (m_mStomachMap.empty()) return NULL; - StomachMap::iterator i = m_mStomachMap.begin(); + std::vector vTempTargets; + vTempTargets.reserve(m_mStomachMap.size()); - std::list temp; - std::list::iterator j; - - //Get all players in map - while (i != m_mStomachMap.end()) + // Get all players in map + for (StomachMap::const_iterator itr = m_mStomachMap.begin(); itr != m_mStomachMap.end(); ++itr) { - //Check for valid player - Unit* pUnit = m_creature->GetMap()->GetUnit(i->first); + // Check for valid player + Player* pPlayer = m_creature->GetMap()->GetPlayer(itr->first); - //Only units out of stomach - if (pUnit && i->second == false) - { - temp.push_back(pUnit); - } - ++i; + // Only units out of stomach + if (pPlayer && itr->second == false) + vTempTargets.push_back(pPlayer); } - if (temp.empty()) + if (vTempTargets.empty()) return NULL; - j = temp.begin(); - - //Get random but only if we have more than one unit on threat list - if (temp.size() > 1) - advance (j , rand() % (temp.size() - 1)); - - return (*j); + // Get random but only if we have more than one unit on threat list + return vTempTargets[urand(0, vTempTargets.size()- 1)]; } - void UpdateAI(const uint32 diff) + void UpdateAI(const uint32 uiDiff) { - //Check if we have a target + // Check if we have a target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) { - //No target so we'll use this section to do our random wispers instance wide - //WisperTimer - if (WisperTimer < diff) + // No target so we'll use this section to do our random wispers instance wide + // WisperTimer + if (m_uiWisperTimer < uiDiff) { - Map *map = m_creature->GetMap(); - if (!map->IsDungeon()) + if (!m_creature->GetMap()->IsDungeon()) return; - //Play random sound to the zone - Map::PlayerList const &PlayerList = map->GetPlayers(); - - if (!PlayerList.isEmpty()) - { - for(Map::PlayerList::const_iterator itr = PlayerList.begin(); itr != PlayerList.end(); ++itr) - { - if (Player* pPlr = itr->getSource()) - pPlr->PlayDirectSound(RANDOM_SOUND_WHISPER,pPlr); - } - } + // Play random sound to the map + m_creature->GetMap()->PlayDirectSoundToMap(RANDOM_SOUND_WHISPER); - //One random wisper every 90 - 300 seconds - WisperTimer = urand(90000, 300000); - }else WisperTimer -= diff; + // One random wisper every 90 - 300 seconds + m_uiWisperTimer = urand(90000, 300000); + } + else + m_uiWisperTimer -= uiDiff; return; } m_creature->SetTargetGuid(ObjectGuid()); - //No instance + // No instance if (!m_pInstance) return; switch (m_pInstance->GetData(TYPE_CTHUN_PHASE)) { - //Transition phase - case 2: + // Transition phase + case PHASE_TRANSITION: { - //PhaseTimer - if (PhaseTimer < diff) + // PhaseTimer + if (m_uiPhaseTimer < uiDiff) { - //Switch - m_pInstance->SetData(TYPE_CTHUN_PHASE, 3); + // Switch + m_pInstance->SetData(TYPE_CTHUN_PHASE, PHASE_CTHUN); - //Switch to c'thun model + // Switch to C'thun model m_creature->InterruptNonMeleeSpells(false); DoCastSpellIfCan(m_creature, SPELL_TRANSFORM); m_creature->SetHealth(m_creature->GetMaxHealth()); m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_NON_ATTACKABLE); - //Emerging phase + // Emerging phase m_creature->SetInCombatWithZone(); - //Place all units in threat list on outside of stomach + // Place all units in threat list on outside of stomach m_mStomachMap.clear(); ThreatList const& tList = m_creature->getThreatManager().getThreatList(); for (ThreatList::const_iterator i = tList.begin();i != tList.end(); ++i) { - //Outside stomach - m_mStomachMap[(*i)->getUnitGuid()] = false; + // Outside stomach, only players + if ((*i)->getUnitGuid().IsPlayer()) + m_mStomachMap[(*i)->getUnitGuid()] = false; } - //Spawn 2 flesh tentacles - FleshTentaclesKilled = 0; + // Spawn 2 flesh tentacles + m_uiFleshTentaclesKilled = 0; - //Spawn flesh tentacle + // Spawn flesh tentacle Creature* pSpawned = m_creature->SummonCreature(MOB_FLESH_TENTACLE, TENTACLE_POS1_X, TENTACLE_POS1_Y, TENTACLE_POS1_Z, TENTACLE_POS1_O, TEMPSUMMON_CORPSE_DESPAWN, 0); if (!pSpawned) - ++FleshTentaclesKilled; + ++m_uiFleshTentaclesKilled; else { if (flesh_tentacleAI* pTentacleAI = dynamic_cast(pSpawned->AI())) - pTentacleAI->SpawnedByCthun(m_creature->GetGUID()); + pTentacleAI->SpawnedByCthun(m_creature); } - //Spawn flesh tentacle + // Spawn flesh tentacle pSpawned = m_creature->SummonCreature(MOB_FLESH_TENTACLE, TENTACLE_POS2_X, TENTACLE_POS2_Y, TENTACLE_POS2_Z, TENTACLE_POS2_O, TEMPSUMMON_CORPSE_DESPAWN, 0); if (!pSpawned) - ++FleshTentaclesKilled; + ++m_uiFleshTentaclesKilled; else { if (flesh_tentacleAI* pTentacleAI = dynamic_cast(pSpawned->AI())) - pTentacleAI->SpawnedByCthun(m_creature->GetGUID()); + pTentacleAI->SpawnedByCthun(m_creature); } - PhaseTimer = 0; - }else PhaseTimer -= diff; + m_uiPhaseTimer = 0; + } + else + m_uiPhaseTimer -= uiDiff; - }break; + break; - //Body Phase - case 3: + } + // Body Phase + case PHASE_CTHUN: { - //Remove Target field - m_creature->SetTargetGuid(ObjectGuid()); - - //Weaken - if (FleshTentaclesKilled > 1) + // Weaken + if (m_uiFleshTentaclesKilled > 1) { - m_pInstance->SetData(TYPE_CTHUN_PHASE, 4); + m_pInstance->SetData(TYPE_CTHUN_PHASE, PHASE_CTHUN_WEAKENED); DoScriptText(EMOTE_WEAKENED, m_creature); - PhaseTimer = 45000; + m_uiPhaseTimer = 45000; DoCastSpellIfCan(m_creature, SPELL_RED_COLORATION, CAST_TRIGGERED); - StomachMap::iterator i = m_mStomachMap.begin(); - - //Kick all players out of stomach - while (i != m_mStomachMap.end()) + // Kick all players out of stomach + for (StomachMap::iterator itr = m_mStomachMap.begin(); itr != m_mStomachMap.end(); ++itr) { - //Check for valid player - Unit* pUnit = m_creature->GetMap()->GetUnit(i->first); + // Check for valid player + Player* pPlayer = m_creature->GetMap()->GetPlayer(itr->first); - //Only move units in stomach - if (pUnit && i->second == true) + if (pPlayer && itr->second == true) { - //Teleport each player out - DoTeleportPlayer(pUnit, m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ()+10, rand()%6); + // Teleport each player out + DoTeleportPlayer(pPlayer, m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ()+10, rand()%6); - //Cast knockback on them - DoCastSpellIfCan(pUnit, SPELL_EXIT_STOMACH_KNOCKBACK, CAST_TRIGGERED); + // Cast knockback on them + DoCastSpellIfCan(pPlayer, SPELL_EXIT_STOMACH_KNOCKBACK, CAST_TRIGGERED); - //Remove the acid debuff - pUnit->RemoveAurasDueToSpell(SPELL_DIGESTIVE_ACID); + // Remove the acid debuff + pPlayer->RemoveAurasDueToSpell(SPELL_DIGESTIVE_ACID); - i->second = false; + itr->second = false; } - ++i; } return; } - //Stomach acid - if (StomachAcidTimer < diff) + // Stomach acid + if (m_uiStomachAcidTimer < uiDiff) { - //Apply aura to all players in stomach - StomachMap::iterator i = m_mStomachMap.begin(); - - while (i != m_mStomachMap.end()) + // Apply aura to all players in stomach + for (StomachMap::iterator itr = m_mStomachMap.begin(); itr != m_mStomachMap.end(); ++itr) { - //Check for valid player - Unit* pUnit = m_creature->GetMap()->GetUnit(i->first); + // Check for valid player + Player* pPlayer = m_creature->GetMap()->GetPlayer(itr->first); - //Only apply to units in stomach - if (pUnit && i->second == true) + // Only apply to units in stomach + if (pPlayer && itr->second == true) { - //Cast digestive acid on them - DoCastSpellIfCan(pUnit, SPELL_DIGESTIVE_ACID, CAST_TRIGGERED); + // Cast digestive acid on them + DoCastSpellIfCan(pPlayer, SPELL_DIGESTIVE_ACID, CAST_TRIGGERED); - //Check if player should be kicked from stomach - if (pUnit->IsWithinDist3d(KICK_X, KICK_Y, KICK_Z, 15.0f)) + // Check if player should be kicked from stomach + if (pPlayer->IsWithinDist3d(KICK_X, KICK_Y, KICK_Z, 10.0f)) { - //Teleport each player out - DoTeleportPlayer(pUnit, m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ()+10, rand()%6); + // Teleport each player out + DoTeleportPlayer(pPlayer, m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ()+10, rand()%6); - //Cast knockback on them - DoCastSpellIfCan(pUnit, SPELL_EXIT_STOMACH_KNOCKBACK, CAST_TRIGGERED); + // Cast knockback on them + DoCastSpellIfCan(pPlayer, SPELL_EXIT_STOMACH_KNOCKBACK, CAST_TRIGGERED); - //Remove the acid debuff - pUnit->RemoveAurasDueToSpell(SPELL_DIGESTIVE_ACID); + // Remove the acid debuff + pPlayer->RemoveAurasDueToSpell(SPELL_DIGESTIVE_ACID); - i->second = false; + itr->second = false; } } - ++i; } - StomachAcidTimer = 4000; - }else StomachAcidTimer -= diff; + m_uiStomachAcidTimer = 4000; + } + else + m_uiStomachAcidTimer -= uiDiff; - //Stomach Enter Timer - if (StomachEnterTimer < diff) + // Stomach Enter Timer + if (m_uiStomachEnterTimer < uiDiff) { - Unit* target = NULL; - target = SelectRandomNotStomach(); - - if (target) + if (Player* pTarget = SelectRandomNotStomach()) { - //Set target in stomach - m_mStomachMap[target->GetObjectGuid()] = true; - target->InterruptNonMeleeSpells(false); - target->CastSpell(target, SPELL_MOUTH_TENTACLE, true, NULL, NULL, m_creature->GetObjectGuid()); - StomachEnterTarget = target->GetGUID(); - StomachEnterVisTimer = 3800; + // Set target in stomach + m_mStomachMap[pTarget->GetObjectGuid()] = true; + pTarget->InterruptNonMeleeSpells(false); + pTarget->CastSpell(pTarget, SPELL_MOUTH_TENTACLE, true, NULL, NULL, m_creature->GetObjectGuid()); + m_stomachEnterTargetGuid = pTarget->GetObjectGuid(); + m_uiStomachEnterVisTimer = 3800; } - StomachEnterTimer = 13800; - }else StomachEnterTimer -= diff; + m_uiStomachEnterTimer = 13800; + } + else + m_uiStomachEnterTimer -= uiDiff; - if (StomachEnterVisTimer && StomachEnterTarget) - if (StomachEnterVisTimer <= diff) + if (m_uiStomachEnterVisTimer && m_stomachEnterTargetGuid) { - //Check for valid player - Unit* pUnit = m_creature->GetMap()->GetUnit(StomachEnterTarget); - - if (pUnit) + if (m_uiStomachEnterVisTimer <= uiDiff) { - DoTeleportPlayer(pUnit, STOMACH_X, STOMACH_Y, STOMACH_Z, STOMACH_O); - } + // Check for valid player + if (Player* pPlayer = m_creature->GetMap()->GetPlayer(m_stomachEnterTargetGuid)) + DoTeleportPlayer(pPlayer, STOMACH_X, STOMACH_Y, STOMACH_Z, STOMACH_O); - StomachEnterTarget = 0; - StomachEnterVisTimer = 0; - }else StomachEnterVisTimer -= diff; + m_stomachEnterTargetGuid.Clear(); + m_uiStomachEnterVisTimer = 0; - //GientClawTentacleTimer - if (GiantClawTentacleTimer < diff) + // Note that actually C'Thun cannot be soloed, so kill all players, if no player left outside of stomach + bool bKillAllPlayer = true; + for (StomachMap::iterator itr = m_mStomachMap.begin(); itr != m_mStomachMap.end(); ++itr) + { + Player* pPlayer = m_creature->GetMap()->GetPlayer(itr->first); + if (itr->second == false && pPlayer) + { + bKillAllPlayer = false; + break; + } + } + if (bKillAllPlayer) + { + for (StomachMap::iterator itr = m_mStomachMap.begin(); itr != m_mStomachMap.end(); ++itr) + { + if (Player* pPlayer = m_creature->GetMap()->GetPlayer(itr->first)) + m_creature->DealDamage(pPlayer, pPlayer->GetMaxHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NONE, NULL, false); + } + EnterEvadeMode(); + return; + } + } + else + m_uiStomachEnterVisTimer -= uiDiff; + } + + // GientClawTentacleTimer + if (m_uiGiantClawTentacleTimer < uiDiff) { - Unit* target = NULL; - target = SelectRandomNotStomach(); - if (target) + if (Player* pTarget = SelectRandomNotStomach()) { Creature* Spawned = NULL; - //Spawn claw tentacle on the random target - Spawned = (Creature*)m_creature->SummonCreature(MOB_GIANT_CLAW_TENTACLE,target->GetPositionX(),target->GetPositionY(),target->GetPositionZ(),0,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,500); - - if (Spawned) - Spawned->AI()->AttackStart(target); + // Spawn claw tentacle on the random target + if (Creature* pSummoned = m_creature->SummonCreature(MOB_GIANT_CLAW_TENTACLE, pTarget->GetPositionX(), pTarget->GetPositionY(), pTarget->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 500)) + pSummoned->AI()->AttackStart(pTarget); } - //One giant claw tentacle every minute - GiantClawTentacleTimer = 60000; - }else GiantClawTentacleTimer -= diff; + // One giant claw tentacle every minute + m_uiGiantClawTentacleTimer = 60000; + } + else + m_uiGiantClawTentacleTimer -= uiDiff; - //GiantEyeTentacleTimer - if (GiantEyeTentacleTimer < diff) + // GiantEyeTentacleTimer + if (m_uiGiantEyeTentacleTimer < uiDiff) { - Unit* target = NULL; - target = SelectRandomNotStomach(); - if (target) + if (Player* pTarget = SelectRandomNotStomach()) { - - Creature* Spawned = NULL; - - //Spawn claw tentacle on the random target - Spawned = (Creature*)m_creature->SummonCreature(MOB_GIANT_EYE_TENTACLE,target->GetPositionX(),target->GetPositionY(),target->GetPositionZ(),0,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,500); - - if (Spawned) - Spawned->AI()->AttackStart(target); + // Spawn claw tentacle on the random target + if (Creature* pSummoned = m_creature->SummonCreature(MOB_GIANT_EYE_TENTACLE, pTarget->GetPositionX(), pTarget->GetPositionY(), pTarget->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 500)) + pSummoned->AI()->AttackStart(pTarget); } - //One giant eye tentacle every minute - GiantEyeTentacleTimer = 60000; - }else GiantEyeTentacleTimer -= diff; + // One giant eye tentacle every minute + m_uiGiantEyeTentacleTimer = 60000; + } + else + m_uiGiantEyeTentacleTimer -= uiDiff; - //EyeTentacleTimer - if (EyeTentacleTimer < diff) + // EyeTentacleTimer + if (m_uiEyeTentacleTimer < uiDiff) { - //Spawn the 8 Eye Tentacles in the corret spots + // Spawn the 8 Eye Tentacles in the corret spots SpawnEyeTentacle(0, 25); //south SpawnEyeTentacle(12, 12); //south west SpawnEyeTentacle(25, 0); //west @@ -821,98 +815,113 @@ struct MANGOS_DLL_DECL cthunAI : public ScriptedAI SpawnEyeTentacle(-12, 12); // south east //These spawn at every 30 seconds - EyeTentacleTimer = 30000; - }else EyeTentacleTimer -= diff; + m_uiEyeTentacleTimer = 30000; + } + else + m_uiEyeTentacleTimer -= uiDiff; - }break; + break; - //Weakened state - case 4: + } + // Weakened state + case PHASE_CTHUN_WEAKENED: { - //PhaseTimer - if (PhaseTimer < diff) + // PhaseTimer + if (m_uiPhaseTimer < uiDiff) { - //Switch - m_pInstance->SetData(TYPE_CTHUN_PHASE, 3); + // Switch + m_pInstance->SetData(TYPE_CTHUN_PHASE, PHASE_CTHUN); - //Remove red coloration + // Remove red coloration m_creature->RemoveAurasDueToSpell(SPELL_RED_COLORATION); - //Spawn 2 flesh tentacles - FleshTentaclesKilled = 0; + // Spawn 2 flesh tentacles + m_uiFleshTentaclesKilled = 0; - //Spawn flesh tentacle + // Spawn flesh tentacle Creature* pSpawned = m_creature->SummonCreature(MOB_FLESH_TENTACLE, TENTACLE_POS1_X, TENTACLE_POS1_Y, TENTACLE_POS1_Z, TENTACLE_POS1_O, TEMPSUMMON_CORPSE_DESPAWN, 0); if (!pSpawned) - ++FleshTentaclesKilled; + ++m_uiFleshTentaclesKilled; else { if (flesh_tentacleAI* pTentacleAI = dynamic_cast(pSpawned->AI())) - pTentacleAI->SpawnedByCthun(m_creature->GetGUID()); + pTentacleAI->SpawnedByCthun(m_creature); } - //Spawn flesh tentacle + pSpawned = NULL; + // Spawn flesh tentacle pSpawned = m_creature->SummonCreature(MOB_FLESH_TENTACLE, TENTACLE_POS2_X, TENTACLE_POS2_Y, TENTACLE_POS2_Z, TENTACLE_POS2_O, TEMPSUMMON_CORPSE_DESPAWN, 0); if (!pSpawned) - ++FleshTentaclesKilled; + ++m_uiFleshTentaclesKilled; else { if (flesh_tentacleAI* pTentacleAI = dynamic_cast(pSpawned->AI())) - pTentacleAI->SpawnedByCthun(m_creature->GetGUID()); + pTentacleAI->SpawnedByCthun(m_creature); } - PhaseTimer = 0; - }else PhaseTimer -= diff; + m_uiPhaseTimer = 0; + } + else + m_uiPhaseTimer -= uiDiff; } } } void JustDied(Unit* pKiller) { - //Switch + // Switch if (m_pInstance) - m_pInstance->SetData(TYPE_CTHUN_PHASE, 5); + m_pInstance->SetData(TYPE_CTHUN_PHASE, PHASE_FINISH); } - void DamageTaken(Unit *done_by, uint32 &damage) + void EnterEvadeMode() { - //No instance + if (m_pInstance) + m_pInstance->SetData(TYPE_CTHUN_PHASE, PHASE_NOT_STARTED); + + ScriptedAI::EnterEvadeMode(); + } + + void DamageTaken(Unit* pDealer, uint32& uiDamage) + { + // No instance if (!m_pInstance) return; switch (m_pInstance->GetData(TYPE_CTHUN_PHASE)) { - case 3: + case PHASE_CTHUN: { - //Not weakened so reduce damage by 99% - if (damage / 99 > 0) damage/= 99; - else damage = 1; + // Not weakened so reduce damage by 99% + if (uiDamage / 99 > 0) uiDamage/= 99; + else + uiDamage = 1; - //Prevent death in non-weakened state - if (damage >= m_creature->GetHealth()) - damage = 0; + // Prevent death in non-weakened state + if (uiDamage >= m_creature->GetHealth()) + uiDamage = 0; return; } break; - case 4: + case PHASE_CTHUN_WEAKENED: { //Weakened - takes normal damage return; } default: - damage = 0; + uiDamage = 0; break; } } void FleshTentcleKilled() { - ++FleshTentaclesKilled; + ++m_uiFleshTentaclesKilled; } }; @@ -924,26 +933,26 @@ struct MANGOS_DLL_DECL eye_tentacleAI : public ScriptedAI Reset(); if (Unit* pPortal = m_creature->SummonCreature(MOB_SMALL_PORTAL, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_CORPSE_DESPAWN, 0)) - Portal = pPortal->GetGUID(); + m_portalGuid = pPortal->GetObjectGuid(); } - uint32 MindflayTimer; - uint32 KillSelfTimer; - uint64 Portal; + uint32 m_uiMindflayTimer; + uint32 m_uiKillSelfTimer; + ObjectGuid m_portalGuid; void JustDied(Unit*) { - if (Creature* pCreature = m_creature->GetMap()->GetCreature(Portal)) + if (Creature* pCreature = m_creature->GetMap()->GetCreature(m_portalGuid)) pCreature->DealDamage(pCreature, pCreature->GetMaxHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NONE, NULL, false); } void Reset() { - //Mind flay half a second after we spawn - MindflayTimer = 500; + // Mind flay half a second after we spawn + m_uiMindflayTimer = 500; - //This prevents eyes from overlapping - KillSelfTimer = 35000; + // This prevents eyes from overlapping + m_uiKillSelfTimer = 35000; } void Aggro(Unit* pWho) @@ -951,31 +960,35 @@ struct MANGOS_DLL_DECL eye_tentacleAI : public ScriptedAI m_creature->SetInCombatWithZone(); } - void UpdateAI(const uint32 diff) + void UpdateAI(const uint32 uiDiff) { - //Check if we have a target + // Check if we have a target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - //KillSelfTimer - if (KillSelfTimer < diff) + // KillSelfTimer + if (m_uiKillSelfTimer < uiDiff) { m_creature->DealDamage(m_creature, m_creature->GetMaxHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NONE, NULL, false); return; - }else KillSelfTimer -= diff; + } + else + m_uiKillSelfTimer -= uiDiff; - //MindflayTimer - if (MindflayTimer < diff) + // MindflayTimer + if (m_uiMindflayTimer < uiDiff) { Unit* target = NULL; - target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0); + target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0); if (target && !target->HasAura(SPELL_DIGESTIVE_ACID, EFFECT_INDEX_0)) - DoCastSpellIfCan(target,SPELL_MIND_FLAY); + DoCastSpellIfCan(target, SPELL_MIND_FLAY); //Mindflay every 10 seconds - MindflayTimer = 10100; - }else MindflayTimer -= diff; + m_uiMindflayTimer = 10100; + } + else + m_uiMindflayTimer -= uiDiff; } }; @@ -987,26 +1000,26 @@ struct MANGOS_DLL_DECL claw_tentacleAI : public ScriptedAI Reset(); if (Unit* pPortal = m_creature->SummonCreature(MOB_SMALL_PORTAL, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_CORPSE_DESPAWN, 0)) - Portal = pPortal->GetGUID(); + m_portalGuid = pPortal->GetObjectGuid(); } - uint32 GroundRuptureTimer; - uint32 HamstringTimer; - uint32 EvadeTimer; - uint64 Portal; + uint32 m_uiGroundRuptureTimer; + uint32 m_uiHamstringTimer; + uint32 m_uiEvadeTimer; + ObjectGuid m_portalGuid; void JustDied(Unit*) { - if (Creature* pCreature = m_creature->GetMap()->GetCreature(Portal)) + if (Creature* pCreature = m_creature->GetMap()->GetCreature(m_portalGuid)) pCreature->DealDamage(pCreature, pCreature->GetMaxHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NONE, NULL, false); } void Reset() { - //First rupture should happen half a second after we spawn - GroundRuptureTimer = 500; - HamstringTimer = 2000; - EvadeTimer = 5000; + // First rupture should happen half a second after we spawn + m_uiGroundRuptureTimer = 500; + m_uiHamstringTimer = 2000; + m_uiEvadeTimer = 5000; } void Aggro(Unit* pWho) @@ -1014,59 +1027,66 @@ struct MANGOS_DLL_DECL claw_tentacleAI : public ScriptedAI m_creature->SetInCombatWithZone(); } - void UpdateAI(const uint32 diff) + void UpdateAI(const uint32 uiDiff) { - //Check if we have a target + // Check if we have a target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - //EvadeTimer + // EvadeTimer if (!m_creature->CanReachWithMeleeAttack(m_creature->getVictim())) - if (EvadeTimer < diff) { - if (Creature* pCreature = m_creature->GetMap()->GetCreature(Portal)) - pCreature->DealDamage(pCreature, pCreature->GetMaxHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NONE, NULL, false); - - //Dissapear and reappear at new position - m_creature->SetVisibility(VISIBILITY_OFF); - - Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0); - if (!target) + if (m_uiEvadeTimer < uiDiff) { - m_creature->DealDamage(m_creature, m_creature->GetMaxHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NONE, NULL, false); - return; - } + if (Creature* pCreature = m_creature->GetMap()->GetCreature(m_portalGuid)) + pCreature->DealDamage(pCreature, pCreature->GetMaxHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NONE, NULL, false); - if (!target->HasAura(SPELL_DIGESTIVE_ACID, EFFECT_INDEX_0)) - { - m_creature->GetMap()->CreatureRelocation(m_creature, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0); + // Dissapear and reappear at new position + m_creature->SetVisibility(VISIBILITY_OFF); - if (Unit* pPortal = m_creature->SummonCreature(MOB_SMALL_PORTAL, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_CORPSE_DESPAWN, 0)) - Portal = pPortal->GetGUID(); + Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0); + if (!pTarget) + { + m_creature->DealDamage(m_creature, m_creature->GetMaxHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NONE, NULL, false); + return; + } - GroundRuptureTimer = 500; - HamstringTimer = 2000; - EvadeTimer = 5000; - AttackStart(target); - } + if (!pTarget->HasAura(SPELL_DIGESTIVE_ACID, EFFECT_INDEX_0)) + { + m_creature->GetMap()->CreatureRelocation(m_creature, pTarget->GetPositionX(), pTarget->GetPositionY(), pTarget->GetPositionZ(), 0); - m_creature->SetVisibility(VISIBILITY_ON); + if (Unit* pPortal = m_creature->SummonCreature(MOB_SMALL_PORTAL, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_CORPSE_DESPAWN, 0)) + m_portalGuid = pPortal->GetObjectGuid(); - }else EvadeTimer -= diff; + m_uiGroundRuptureTimer = 500; + m_uiHamstringTimer = 2000; + m_uiEvadeTimer = 5000; + AttackStart(pTarget); + } - //GroundRuptureTimer - if (GroundRuptureTimer < diff) + m_creature->SetVisibility(VISIBILITY_ON); + } + else + m_uiEvadeTimer -= uiDiff; + } + + // GroundRuptureTimer + if (m_uiGroundRuptureTimer < uiDiff) { DoCastSpellIfCan(m_creature->getVictim(),SPELL_GROUND_RUPTURE); - GroundRuptureTimer = 30000; - }else GroundRuptureTimer -= diff; + m_uiGroundRuptureTimer = 30000; + } + else + m_uiGroundRuptureTimer -= uiDiff; - //HamstringTimer - if (HamstringTimer < diff) + // HamstringTimer + if (m_uiHamstringTimer < uiDiff) { DoCastSpellIfCan(m_creature->getVictim(),SPELL_HAMSTRING); - HamstringTimer = 5000; - }else HamstringTimer -= diff; + m_uiHamstringTimer = 5000; + } + else + m_uiHamstringTimer -= uiDiff; DoMeleeAttackIfReady(); } @@ -1080,28 +1100,28 @@ struct MANGOS_DLL_DECL giant_claw_tentacleAI : public ScriptedAI Reset(); if (Unit* pPortal = m_creature->SummonCreature(MOB_GIANT_PORTAL, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_CORPSE_DESPAWN, 0)) - Portal = pPortal->GetGUID(); + m_portalGuid = pPortal->GetObjectGuid(); } - uint32 GroundRuptureTimer; - uint32 ThrashTimer; - uint32 HamstringTimer; - uint32 EvadeTimer; - uint64 Portal; + uint32 m_uiGroundRuptureTimer; + uint32 m_uiThrashTimer; + uint32 m_uiHamstringTimer; + uint32 m_uiEvadeTimer; + ObjectGuid m_portalGuid; void JustDied(Unit*) { - if (Creature* pCreature = m_creature->GetMap()->GetCreature(Portal)) + if (Creature* pCreature = m_creature->GetMap()->GetCreature(m_portalGuid)) pCreature->DealDamage(pCreature, pCreature->GetMaxHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NONE, NULL, false); } void Reset() { //First rupture should happen half a second after we spawn - GroundRuptureTimer = 500; - HamstringTimer = 2000; - ThrashTimer = 5000; - EvadeTimer = 5000; + m_uiGroundRuptureTimer = 500; + m_uiHamstringTimer = 2000; + m_uiThrashTimer = 5000; + m_uiEvadeTimer = 5000; } void Aggro(Unit* pWho) @@ -1109,68 +1129,78 @@ struct MANGOS_DLL_DECL giant_claw_tentacleAI : public ScriptedAI m_creature->SetInCombatWithZone(); } - void UpdateAI(const uint32 diff) + void UpdateAI(const uint32 uiDiff) { - //Check if we have a target + // Check if we have a target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - //EvadeTimer + // EvadeTimer if (m_creature->CanReachWithMeleeAttack(m_creature->getVictim())) - if (EvadeTimer < diff) { - if (Creature* pCreature = m_creature->GetMap()->GetCreature(Portal)) - pCreature->DealDamage(pCreature, pCreature->GetMaxHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NONE, NULL, false); + if (m_uiEvadeTimer < uiDiff) + { + if (Creature* pCreature = m_creature->GetMap()->GetCreature(m_portalGuid)) + pCreature->DealDamage(pCreature, pCreature->GetMaxHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NONE, NULL, false); - //Dissapear and reappear at new position - m_creature->SetVisibility(VISIBILITY_OFF); + // Dissapear and reappear at new position + m_creature->SetVisibility(VISIBILITY_OFF); - Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0); + Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0); - if (!target) - { - m_creature->DealDamage(m_creature, m_creature->GetMaxHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NONE, NULL, false); - return; - } + if (!target) + { + m_creature->DealDamage(m_creature, m_creature->GetMaxHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NONE, NULL, false); + return; + } - if (!target->HasAura(SPELL_DIGESTIVE_ACID, EFFECT_INDEX_0)) - { - m_creature->GetMap()->CreatureRelocation(m_creature, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0); + if (!target->HasAura(SPELL_DIGESTIVE_ACID, EFFECT_INDEX_0)) + { + m_creature->GetMap()->CreatureRelocation(m_creature, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0); - if (Unit* pPortal = m_creature->SummonCreature(MOB_GIANT_PORTAL, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_CORPSE_DESPAWN, 0)) - Portal = pPortal->GetGUID(); + if (Unit* pPortal = m_creature->SummonCreature(MOB_GIANT_PORTAL, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_CORPSE_DESPAWN, 0)) + m_portalGuid = pPortal->GetObjectGuid(); - GroundRuptureTimer = 500; - HamstringTimer = 2000; - ThrashTimer = 5000; - EvadeTimer = 5000; - AttackStart(target); - } + m_uiGroundRuptureTimer = 500; + m_uiHamstringTimer = 2000; + m_uiThrashTimer = 5000; + m_uiEvadeTimer = 5000; + AttackStart(target); + } - m_creature->SetVisibility(VISIBILITY_ON); + m_creature->SetVisibility(VISIBILITY_ON); - }else EvadeTimer -= diff; + } + else + m_uiEvadeTimer -= uiDiff; + } - //GroundRuptureTimer - if (GroundRuptureTimer < diff) + // GroundRuptureTimer + if (m_uiGroundRuptureTimer < uiDiff) { DoCastSpellIfCan(m_creature->getVictim(),SPELL_GROUND_RUPTURE); - GroundRuptureTimer = 30000; - }else GroundRuptureTimer -= diff; + m_uiGroundRuptureTimer = 30000; + } + else + m_uiGroundRuptureTimer -= uiDiff; - //ThrashTimer - if (ThrashTimer < diff) + // ThrashTimer + if (m_uiThrashTimer < uiDiff) { DoCastSpellIfCan(m_creature->getVictim(),SPELL_THRASH); - ThrashTimer = 10000; - }else ThrashTimer -= diff; + m_uiThrashTimer = 10000; + } + else + m_uiThrashTimer -= uiDiff; - //HamstringTimer - if (HamstringTimer < diff) + // HamstringTimer + if (m_uiHamstringTimer < uiDiff) { DoCastSpellIfCan(m_creature->getVictim(),SPELL_HAMSTRING); - HamstringTimer = 10000; - }else HamstringTimer -= diff; + m_uiHamstringTimer = 10000; + } + else + m_uiHamstringTimer -= uiDiff; DoMeleeAttackIfReady(); } @@ -1184,22 +1214,22 @@ struct MANGOS_DLL_DECL giant_eye_tentacleAI : public ScriptedAI Reset(); if (Unit* pPortal = m_creature->SummonCreature(MOB_GIANT_PORTAL, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_CORPSE_DESPAWN, 0)) - Portal = pPortal->GetGUID(); + m_portalGuid = pPortal->GetObjectGuid(); } - uint32 BeamTimer; - uint64 Portal; + uint32 m_uiBeamTimer; + ObjectGuid m_portalGuid; void JustDied(Unit*) { - if (Creature* pCreature = m_creature->GetMap()->GetCreature(Portal)) + if (Creature* pCreature = m_creature->GetMap()->GetCreature(m_portalGuid)) pCreature->DealDamage(pCreature, pCreature->GetMaxHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NONE, NULL, false); } void Reset() { //Green Beam half a second after we spawn - BeamTimer = 500; + m_uiBeamTimer = 500; } void Aggro(Unit* pWho) @@ -1207,59 +1237,65 @@ struct MANGOS_DLL_DECL giant_eye_tentacleAI : public ScriptedAI m_creature->SetInCombatWithZone(); } - void UpdateAI(const uint32 diff) + void UpdateAI(const uint32 uiDiff) { - //Check if we have a target + // Check if we have a target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - //BeamTimer - if (BeamTimer < diff) + // BeamTimer + if (m_uiBeamTimer < uiDiff) { Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0); if (target && !target->HasAura(SPELL_DIGESTIVE_ACID, EFFECT_INDEX_0)) DoCastSpellIfCan(target,SPELL_GREEN_BEAM); - //Beam every 2 seconds - BeamTimer = 2100; - }else BeamTimer -= diff; + // Beam every 2 seconds + m_uiBeamTimer = 2100; + } + else + m_uiBeamTimer -= uiDiff; } }; -//Flesh tentacle functions -void flesh_tentacleAI::UpdateAI(const uint32 diff) +// Flesh tentacle functions +void flesh_tentacleAI::UpdateAI(const uint32 uiDiff) { - //Check if we have a target + // Check if we have a target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - if (Parent) - if (CheckTimer < diff) + if (m_cThunGuid) { - Creature* pParent = m_creature->GetMap()->GetCreature(Parent); - - if (!pParent || !pParent->isAlive() || !pParent->isInCombat()) + if (m_uiCheckTimer < uiDiff) { - Parent = 0; - m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NONE, NULL, false); - return; - } + Creature* pParent = m_creature->GetMap()->GetCreature(m_cThunGuid); + + if (!pParent || !pParent->isAlive() || !pParent->isInCombat()) + { + m_cThunGuid.Clear(); + m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NONE, NULL, false); + return; + } - CheckTimer = 1000; - }else CheckTimer -= diff; + m_uiCheckTimer = 1000; + } + else + m_uiCheckTimer -= uiDiff; + } DoMeleeAttackIfReady(); } void flesh_tentacleAI::JustDied(Unit* killer) { - if (!Parent) + if (!m_cThunGuid) { - error_log("SD2: flesh_tentacle: No Parent variable"); + error_log("SD2: flesh_tentacle: No m_cThunGuid variable"); return; } - if (Creature* pCthun = m_creature->GetMap()->GetCreature(Parent)) + if (Creature* pCthun = m_creature->GetMap()->GetCreature(m_cThunGuid)) { if (cthunAI* pCthunAI = dynamic_cast(pCthun->AI())) pCthunAI->FleshTentcleKilled(); @@ -1268,7 +1304,7 @@ void flesh_tentacleAI::JustDied(Unit* killer) error_log("SD2: flesh_tentacle: No Cthun"); } -//GetAIs +// GetAIs CreatureAI* GetAI_eye_of_cthun(Creature* pCreature) { return new eye_of_cthunAI(pCreature); @@ -1306,41 +1342,41 @@ CreatureAI* GetAI_flesh_tentacle(Creature* pCreature) void AddSC_boss_cthun() { - Script *newscript; + Script* pNewScript; //Eye - newscript = new Script; - newscript->Name = "boss_eye_of_cthun"; - newscript->GetAI = &GetAI_eye_of_cthun; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "boss_cthun"; - newscript->GetAI = &GetAI_cthun; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "mob_eye_tentacle"; - newscript->GetAI = &GetAI_eye_tentacle; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "mob_claw_tentacle"; - newscript->GetAI = &GetAI_claw_tentacle; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "mob_giant_claw_tentacle"; - newscript->GetAI = &GetAI_giant_claw_tentacle; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "mob_giant_eye_tentacle"; - newscript->GetAI = &GetAI_giant_eye_tentacle; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "mob_giant_flesh_tentacle"; - newscript->GetAI = &GetAI_flesh_tentacle; - newscript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "boss_eye_of_cthun"; + pNewScript->GetAI = &GetAI_eye_of_cthun; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "boss_cthun"; + pNewScript->GetAI = &GetAI_cthun; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "mob_eye_tentacle"; + pNewScript->GetAI = &GetAI_eye_tentacle; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "mob_claw_tentacle"; + pNewScript->GetAI = &GetAI_claw_tentacle; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "mob_giant_claw_tentacle"; + pNewScript->GetAI = &GetAI_giant_claw_tentacle; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "mob_giant_eye_tentacle"; + pNewScript->GetAI = &GetAI_giant_eye_tentacle; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "mob_giant_flesh_tentacle"; + pNewScript->GetAI = &GetAI_flesh_tentacle; + pNewScript->RegisterSelf(); } diff --git a/scripts/kalimdor/temple_of_ahnqiraj/instance_temple_of_ahnqiraj.cpp b/scripts/kalimdor/temple_of_ahnqiraj/instance_temple_of_ahnqiraj.cpp index 170f8e5ad..dc84eaf21 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/instance_temple_of_ahnqiraj.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/instance_temple_of_ahnqiraj.cpp @@ -25,8 +25,7 @@ EndScriptData */ #include "temple_of_ahnqiraj.h" instance_temple_of_ahnqiraj::instance_temple_of_ahnqiraj(Map* pMap) : ScriptedInstance(pMap), - m_uiBugTrioDeathCount(0), - m_uiCthunPhase(0) + m_uiBugTrioDeathCount(0) { Initialize(); }; @@ -44,6 +43,7 @@ void instance_temple_of_ahnqiraj::OnCreatureCreate (Creature* pCreature) case NPC_KRI: case NPC_VEKLOR: case NPC_VEKNILASH: + case NPC_CTHUN: m_mNpcEntryGuidStore[pCreature->GetEntry()] = pCreature->GetObjectGuid(); break; } @@ -99,15 +99,14 @@ void instance_temple_of_ahnqiraj::SetData(uint32 uiType, uint32 uiData) if (uiData == DONE) DoUseDoorOrButton(GO_TWINS_EXIT_DOOR); break; + case TYPE_CTHUN_PHASE: + m_auiEncounter[uiType] = uiData; + break; // The following temporarily datas are not to be saved case DATA_BUG_TRIO_DEATH: ++m_uiBugTrioDeathCount; return; - - case TYPE_CTHUN_PHASE: - m_uiCthunPhase = uiData; - return; } if (uiData == DONE) @@ -115,7 +114,7 @@ void instance_temple_of_ahnqiraj::SetData(uint32 uiType, uint32 uiData) OUT_SAVE_INST_DATA; std::ostringstream saveStream; - saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2]; + saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2] << " " << m_auiEncounter[3]; m_strInstData = saveStream.str(); @@ -135,7 +134,7 @@ void instance_temple_of_ahnqiraj::Load(const char* chrIn) OUT_LOAD_INST_DATA(chrIn); std::istringstream loadStream(chrIn); - loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2]; + loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3]; for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) { @@ -151,11 +150,12 @@ uint32 instance_temple_of_ahnqiraj::GetData(uint32 uiType) switch(uiType) { case TYPE_VEM: - return m_auiEncounter[0]; + return m_auiEncounter[1]; + case TYPE_CTHUN_PHASE: + return m_auiEncounter[3];; + case DATA_BUG_TRIO_DEATH: return m_uiBugTrioDeathCount; - case TYPE_CTHUN_PHASE: - return m_uiCthunPhase; default: return 0; } diff --git a/scripts/kalimdor/temple_of_ahnqiraj/temple_of_ahnqiraj.h b/scripts/kalimdor/temple_of_ahnqiraj/temple_of_ahnqiraj.h index 94241f598..577ed8dbd 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/temple_of_ahnqiraj.h +++ b/scripts/kalimdor/temple_of_ahnqiraj/temple_of_ahnqiraj.h @@ -7,25 +7,36 @@ enum { - MAX_ENCOUNTER = 3, + MAX_ENCOUNTER = 4, TYPE_SKERAM = 0, TYPE_VEM = 1, TYPE_TWINS = 2, + TYPE_CTHUN_PHASE = 3, // NPC_SKERAM = 15263, NPC_KRI = 15511, NPC_VEM = 15544, NPC_VEKLOR = 15276, NPC_VEKNILASH = 15275, + NPC_CTHUN = 15727, GO_SKERAM_GATE = 180636, GO_TWINS_ENTER_DOOR = 180634, GO_TWINS_EXIT_DOOR = 180635, DATA_BUG_TRIO_DEATH = 10, +}; - TYPE_CTHUN_PHASE = 20 +enum CThunPhase +{ + PHASE_NOT_STARTED = 0, + PHASE_EYE_NORMAL = 1, + PHASE_EYE_DARK_GLARE = 2, + PHASE_TRANSITION = 3, + PHASE_CTHUN = 4, + PHASE_CTHUN_WEAKENED = 5, + PHASE_FINISH = 6, }; class MANGOS_DLL_DECL instance_temple_of_ahnqiraj : public ScriptedInstance @@ -51,7 +62,6 @@ class MANGOS_DLL_DECL instance_temple_of_ahnqiraj : public ScriptedInstance std::string m_strInstData; uint32 m_uiBugTrioDeathCount; - uint32 m_uiCthunPhase; }; #endif diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index e427a473d..98fad6f17 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2187" + #define SD2_REVISION_NR "2188" #endif // __SD2_REVISION_NR_H__ From 78b7273e1173af43aad40c5cd8c77374fe62a145 Mon Sep 17 00:00:00 2001 From: foot Date: Sat, 4 Jun 2011 20:49:07 +0200 Subject: [PATCH 0169/1172] [2189] Fix Logic bug for Anub'Rekhan related to Impale ability Signed-off-by: Schmoozerd --- scripts/northrend/naxxramas/boss_anubrekhan.cpp | 10 +++++----- sd2_revision_nr.h | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/northrend/naxxramas/boss_anubrekhan.cpp b/scripts/northrend/naxxramas/boss_anubrekhan.cpp index 8b276a910..568cccb8d 100644 --- a/scripts/northrend/naxxramas/boss_anubrekhan.cpp +++ b/scripts/northrend/naxxramas/boss_anubrekhan.cpp @@ -142,12 +142,12 @@ struct MANGOS_DLL_DECL boss_anubrekhanAI : public ScriptedAI // Impale if (m_uiImpaleTimer < uiDiff) { - //Cast Impale on a random target - //Do NOT cast it when we are afflicted by locust swarm - if (!m_creature->HasAura(SPELL_LOCUSTSWARM) || !m_creature->HasAura(SPELL_LOCUSTSWARM_H)) + // Cast Impale on a random target + // Do NOT cast it when we are afflicted by locust swarm + if (!m_creature->HasAura(SPELL_LOCUSTSWARM) && !m_creature->HasAura(SPELL_LOCUSTSWARM_H)) { - if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) - DoCastSpellIfCan(target, m_bIsRegularMode ? SPELL_IMPALE : SPELL_IMPALE_H); + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + DoCastSpellIfCan(pTarget, m_bIsRegularMode ? SPELL_IMPALE : SPELL_IMPALE_H); } m_uiImpaleTimer = 15000; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 98fad6f17..ee17a73a4 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2188" + #define SD2_REVISION_NR "2189" #endif // __SD2_REVISION_NR_H__ From f1098e674c9660f10ad1fa3b003048e623ce4b85 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Sun, 5 Jun 2011 04:00:02 +0200 Subject: [PATCH 0170/1172] [2190] Use EntryGuidMap-Storage in Ahn'kahet: The old Kingdom --- .../northrend/azjol-nerub/ahnkahet/ahnkahet.h | 47 +++- .../azjol-nerub/ahnkahet/boss_nadox.cpp | 2 +- .../ahnkahet/instance_ahnkahet.cpp | 254 ++++++++---------- sd2_revision_nr.h | 2 +- 4 files changed, 147 insertions(+), 158 deletions(-) diff --git a/scripts/northrend/azjol-nerub/ahnkahet/ahnkahet.h b/scripts/northrend/azjol-nerub/ahnkahet/ahnkahet.h index a3ebfc0d2..bc6a5fc66 100644 --- a/scripts/northrend/azjol-nerub/ahnkahet/ahnkahet.h +++ b/scripts/northrend/azjol-nerub/ahnkahet/ahnkahet.h @@ -13,21 +13,44 @@ */ enum { - MAX_ENCOUNTER = 5, + MAX_ENCOUNTER = 5, - TYPE_NADOX = 0, - TYPE_TALDARAM = 1, - TYPE_JEDOGA = 2, - TYPE_VOLAZJ = 3, - TYPE_AMANITAR = 4, + TYPE_NADOX = 0, + TYPE_TALDARAM = 1, + TYPE_JEDOGA = 2, + TYPE_VOLAZJ = 3, + TYPE_AMANITAR = 4, - GO_DOOR_TALDARAM = 192236, - GO_ANCIENT_DEVICE_L = 193093, - GO_ANCIENT_DEVICE_R = 193094, - GO_VORTEX = 193564, + GO_DOOR_TALDARAM = 192236, + GO_ANCIENT_DEVICE_L = 193093, + GO_ANCIENT_DEVICE_R = 193094, + GO_VORTEX = 193564, - NPC_ELDER_NADOX = 29309, - NPC_JEDOGA_SHADOWSEEKER = 29310 + NPC_ELDER_NADOX = 29309, + //NPC_JEDOGA_SHADOWSEEKER = 29310, +}; + +class MANGOS_DLL_DECL instance_ahnkahet : public ScriptedInstance +{ + public: + instance_ahnkahet(Map* pMap); + + void Initialize(); + + void OnCreatureCreate(Creature* pCreature); + void OnObjectCreate(GameObject* pGo); + + void SetData(uint32 uiType, uint32 uiData); + uint32 GetData(uint32 uiType); + + const char* Save() { return m_strInstData.c_str(); } + void Load(const char* chrIn); + + private: + uint32 m_auiEncounter[MAX_ENCOUNTER]; + std::string m_strInstData; + + uint8 m_uiDevicesActivated; }; #endif diff --git a/scripts/northrend/azjol-nerub/ahnkahet/boss_nadox.cpp b/scripts/northrend/azjol-nerub/ahnkahet/boss_nadox.cpp index bc49f3ab4..ff10a5647 100644 --- a/scripts/northrend/azjol-nerub/ahnkahet/boss_nadox.cpp +++ b/scripts/northrend/azjol-nerub/ahnkahet/boss_nadox.cpp @@ -77,7 +77,7 @@ struct MANGOS_DLL_DECL mob_ahnkahar_eggAI : public ScriptedAI if (m_pInstance) { - if (Creature* pElderNadox = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(NPC_ELDER_NADOX))) + if (Creature* pElderNadox = m_pInstance->GetSingleCreatureFromStorage(NPC_ELDER_NADOX)) { float fPosX, fPosY, fPosZ; pElderNadox->GetPosition(fPosX, fPosY, fPosZ); diff --git a/scripts/northrend/azjol-nerub/ahnkahet/instance_ahnkahet.cpp b/scripts/northrend/azjol-nerub/ahnkahet/instance_ahnkahet.cpp index 4ea6f2f4d..a82d75590 100644 --- a/scripts/northrend/azjol-nerub/ahnkahet/instance_ahnkahet.cpp +++ b/scripts/northrend/azjol-nerub/ahnkahet/instance_ahnkahet.cpp @@ -24,171 +24,137 @@ EndScriptData */ #include "precompiled.h" #include "ahnkahet.h" -struct MANGOS_DLL_DECL instance_ahnkahet : public ScriptedInstance +instance_ahnkahet::instance_ahnkahet(Map* pMap) : ScriptedInstance(pMap), + m_uiDevicesActivated(0) { - instance_ahnkahet(Map* pMap) : ScriptedInstance(pMap) {Initialize();}; - - uint32 m_auiEncounter[MAX_ENCOUNTER]; - std::string strInstData; + Initialize(); +} - uint64 m_uiElderNadoxGUID; - uint64 m_uiJedogaShadowseekerGUID; - uint64 m_uiTaldaramDoorGUID; - uint64 m_uiTaldaramVortexGUID; - uint8 m_uiDevicesActivated; +void instance_ahnkahet::Initialize() +{ + memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); +} - void Initialize() +void instance_ahnkahet::OnCreatureCreate(Creature* pCreature) +{ + switch(pCreature->GetEntry()) { - memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); - - m_uiElderNadoxGUID = 0; - m_uiJedogaShadowseekerGUID = 0; - m_uiTaldaramDoorGUID = 0; - m_uiTaldaramVortexGUID = 0; - m_uiDevicesActivated = 0; + case NPC_ELDER_NADOX: + m_mNpcEntryGuidStore[pCreature->GetEntry()] = pCreature->GetObjectGuid(); + break; } +} - void OnCreatureCreate(Creature* pCreature) +void instance_ahnkahet::OnObjectCreate(GameObject* pGo) +{ + switch(pGo->GetEntry()) { - switch(pCreature->GetEntry()) - { - case NPC_ELDER_NADOX: m_uiElderNadoxGUID = pCreature->GetGUID(); break; - case NPC_JEDOGA_SHADOWSEEKER: m_uiJedogaShadowseekerGUID = pCreature->GetGUID(); break; - } - } + case GO_DOOR_TALDARAM: + if (m_auiEncounter[TYPE_TALDARAM] == DONE) + pGo->SetGoState(GO_STATE_ACTIVE); + break; + case GO_VORTEX: + if (m_auiEncounter[TYPE_TALDARAM] != NOT_STARTED) + pGo->SetGoState(GO_STATE_ACTIVE); + break; + + case GO_ANCIENT_DEVICE_L: + if (m_auiEncounter[TYPE_TALDARAM] == NOT_STARTED) + pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NO_INTERACT); + return; + case GO_ANCIENT_DEVICE_R: + if (m_auiEncounter[TYPE_TALDARAM] == NOT_STARTED) + pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NO_INTERACT); + return; - void OnObjectCreate(GameObject* pGo) - { - switch(pGo->GetEntry()) - { - case GO_DOOR_TALDARAM: - m_uiTaldaramDoorGUID = pGo->GetGUID(); - if (m_auiEncounter[1] == DONE) - DoUseDoorOrButton(m_uiTaldaramDoorGUID); - break; - case GO_ANCIENT_DEVICE_L: - if (m_auiEncounter[1] == NOT_STARTED) - pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NO_INTERACT); - break; - case GO_ANCIENT_DEVICE_R: - if (m_auiEncounter[1] == NOT_STARTED) - pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NO_INTERACT); - break; - case GO_VORTEX: - m_uiTaldaramVortexGUID = pGo->GetGUID(); - if (m_auiEncounter[1] != NOT_STARTED) - DoUseDoorOrButton(m_uiTaldaramVortexGUID); - break; - } + default: + return; } + m_mGoEntryGuidStore[pGo->GetEntry()] = pGo->GetObjectGuid(); +} + +void instance_ahnkahet::SetData(uint32 uiType, uint32 uiData) +{ + debug_log("SD2: Instance Ahn'Kahet: SetData received for type %u with data %u", uiType, uiData); - void SetData(uint32 uiType, uint32 uiData) + switch(uiType) { - debug_log("SD2: Instance Ahn'Kahet: SetData received for type %u with data %u",uiType,uiData); - - switch(uiType) - { - case TYPE_NADOX: - m_auiEncounter[0] = uiData; - break; - case TYPE_TALDARAM: - if (uiData == SPECIAL) + case TYPE_NADOX: + m_auiEncounter[uiType] = uiData; + break; + case TYPE_TALDARAM: + if (uiData == SPECIAL) + { + if (m_uiDevicesActivated < 2) + ++m_uiDevicesActivated; + + if (m_uiDevicesActivated == 2) { - if (m_uiDevicesActivated < 2) - ++m_uiDevicesActivated; - - if (m_uiDevicesActivated == 2) - { - m_auiEncounter[1] = uiData; - DoUseDoorOrButton(m_uiTaldaramVortexGUID); - } + m_auiEncounter[uiType] = uiData; + DoUseDoorOrButton(GO_VORTEX); } - if (uiData == DONE) - { - m_auiEncounter[1] = uiData; - DoUseDoorOrButton(m_uiTaldaramDoorGUID); - } - break; - case TYPE_JEDOGA: - m_auiEncounter[2] = uiData; - break; - case TYPE_VOLAZJ: - m_auiEncounter[3] = uiData; - break; - case TYPE_AMANITAR: - m_auiEncounter[4] = uiData; - break; - default: - error_log("SD2: Instance Ahn'Kahet: ERROR SetData = %u for type %u does not exist/not implemented.",uiType,uiData); - break; - } - - if (uiData == DONE) - { - OUT_SAVE_INST_DATA; - - std::ostringstream saveStream; - saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2] << " " << m_auiEncounter[3] - << " " << m_auiEncounter[4]; - - strInstData = saveStream.str(); - - SaveToDB(); - OUT_SAVE_INST_DATA_COMPLETE; - } - } - - const char* Save() - { - return strInstData.c_str(); + } + if (uiData == DONE) + { + m_auiEncounter[uiType] = uiData; + DoUseDoorOrButton(GO_DOOR_TALDARAM); + } + break; + case TYPE_JEDOGA: + case TYPE_VOLAZJ: + case TYPE_AMANITAR: + m_auiEncounter[uiType] = uiData; + break; + + default: + error_log("SD2: Instance Ahn'Kahet: ERROR SetData = %u for type %u does not exist/not implemented.", uiType, uiData); + break; } - void Load(const char* chrIn) + if (uiData == DONE) { - if (!chrIn) - { - OUT_LOAD_INST_DATA_FAIL; - return; - } - - OUT_LOAD_INST_DATA(chrIn); + OUT_SAVE_INST_DATA; - std::istringstream loadStream(chrIn); - loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3] >> m_auiEncounter[4]; + std::ostringstream saveStream; + saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2] << " " << m_auiEncounter[3] + << " " << m_auiEncounter[4]; - for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) - { - if (m_auiEncounter[i] == IN_PROGRESS) - m_auiEncounter[i] = NOT_STARTED; - } + m_strInstData = saveStream.str(); - OUT_LOAD_INST_DATA_COMPLETE; + SaveToDB(); + OUT_SAVE_INST_DATA_COMPLETE; } +} - uint32 GetData(uint32 uiType) +void instance_ahnkahet::Load(const char* chrIn) +{ + if (!chrIn) { - switch(uiType) - { - case TYPE_TALDARAM: - return m_auiEncounter[0]; - case TYPE_JEDOGA: - return m_auiEncounter[1]; - } - return 0; + OUT_LOAD_INST_DATA_FAIL; + return; } - uint64 GetData64(uint32 uiData) + OUT_LOAD_INST_DATA(chrIn); + + std::istringstream loadStream(chrIn); + loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3] >> m_auiEncounter[4]; + + for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) { - switch(uiData) - { - case NPC_ELDER_NADOX: - return m_uiElderNadoxGUID; - case NPC_JEDOGA_SHADOWSEEKER: - return m_uiJedogaShadowseekerGUID; - } - return 0; + if (m_auiEncounter[i] == IN_PROGRESS) + m_auiEncounter[i] = NOT_STARTED; } -}; + + OUT_LOAD_INST_DATA_COMPLETE; +} + +uint32 instance_ahnkahet::GetData(uint32 uiType) +{ + if (uiType < MAX_ENCOUNTER) + return m_auiEncounter[uiType]; + + return 0; +} InstanceData* GetInstanceData_instance_ahnkahet(Map* pMap) { @@ -197,10 +163,10 @@ InstanceData* GetInstanceData_instance_ahnkahet(Map* pMap) void AddSC_instance_ahnkahet() { - Script* newscript; + Script* pNewScript; - newscript = new Script; - newscript->Name = "instance_ahnkahet"; - newscript->GetInstanceData = &GetInstanceData_instance_ahnkahet; - newscript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "instance_ahnkahet"; + pNewScript->GetInstanceData = &GetInstanceData_instance_ahnkahet; + pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index ee17a73a4..07edc55be 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2189" + #define SD2_REVISION_NR "2190" #endif // __SD2_REVISION_NR_H__ From d9492911030f8ba8c53dc609485720bbbd99d781 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Sun, 5 Jun 2011 04:13:28 +0200 Subject: [PATCH 0171/1172] [2191] Use EntryGuidMap-Storage in Azjol-Nerub --- .../azjol-nerub/azjol-nerub/azjol-nerub.h | 33 ++++----- .../azjol-nerub/instance_azjol-nerub.cpp | 73 ++++++++----------- sd2_revision_nr.h | 2 +- 3 files changed, 47 insertions(+), 61 deletions(-) diff --git a/scripts/northrend/azjol-nerub/azjol-nerub/azjol-nerub.h b/scripts/northrend/azjol-nerub/azjol-nerub/azjol-nerub.h index 2f9c65324..c39cf3a55 100644 --- a/scripts/northrend/azjol-nerub/azjol-nerub/azjol-nerub.h +++ b/scripts/northrend/azjol-nerub/azjol-nerub/azjol-nerub.h @@ -8,7 +8,6 @@ enum { MAX_ENCOUNTER = 3, - MAX_WATCHERS = 3, TYPE_KRIKTHIR = 0, TYPE_HADRONOX = 1, @@ -30,41 +29,37 @@ enum GO_DOOR_ANUBARAK_3 = 192398 }; -struct MANGOS_DLL_DECL instance_azjol_nerub : public ScriptedInstance +static const uint32 aWatchers[] = {NPC_GASHRA, NPC_NARJIL, NPC_SILTHIK}; + +class MANGOS_DLL_DECL instance_azjol_nerub : public ScriptedInstance { public: instance_azjol_nerub(Map* pMap); - ~instance_azjol_nerub() {}; void Initialize(); + void OnObjectCreate(GameObject* pGo); void OnCreatureCreate(Creature* pCreature); - void OnCreatureEvade(Creature* pCreature); + void OnCreatureEnterCombat(Creature* pCreature); + void OnCreatureEvade(Creature* pCreature); void OnCreatureDeath(Creature* pCreature); + void SetData(uint32 uiType, uint32 uiData); - const char* Save() { return strInstData.c_str(); } + + const char* Save() { return m_strInstData.c_str(); } void Load(const char* chrIn); + void Update(uint32 uiDiff); + + private: void DoSendWatcherOrKrikthir(); - protected: uint32 m_auiEncounter[MAX_ENCOUNTER]; - std::string strInstData; - - uint64 m_uiDoorKrikthirGUID; - uint64 m_uiDoorAnubarak1GUID; - uint64 m_uiDoorAnubarak2GUID; - uint64 m_uiDoorAnubarak3GUID; - - uint64 m_uiKrikthirGUID; - uint64 m_uiGashraGUID; - uint64 m_uiNarjilGUID; - uint64 m_uiSilthikGUID; + std::string m_strInstData; - uint64 m_uiPlayerGUID; + ObjectGuid m_playerGuid; - uint64 m_auiWatcherGUIDS[3]; uint32 m_uiWatcherTimer; }; #endif diff --git a/scripts/northrend/azjol-nerub/azjol-nerub/instance_azjol-nerub.cpp b/scripts/northrend/azjol-nerub/azjol-nerub/instance_azjol-nerub.cpp index 80a822d76..9bd8e6703 100644 --- a/scripts/northrend/azjol-nerub/azjol-nerub/instance_azjol-nerub.cpp +++ b/scripts/northrend/azjol-nerub/azjol-nerub/instance_azjol-nerub.cpp @@ -25,18 +25,6 @@ EndScriptData */ #include "azjol-nerub.h" instance_azjol_nerub::instance_azjol_nerub(Map* pMap) : ScriptedInstance(pMap), - m_uiDoorKrikthirGUID(0), - m_uiDoorAnubarak1GUID(0), - m_uiDoorAnubarak2GUID(0), - m_uiDoorAnubarak3GUID(0), - - m_uiKrikthirGUID(0), - m_uiGashraGUID(0), - m_uiNarjilGUID(0), - m_uiSilthikGUID(0), - - m_uiPlayerGUID(0), - m_uiWatcherTimer(0) { Initialize(); @@ -45,7 +33,6 @@ instance_azjol_nerub::instance_azjol_nerub(Map* pMap) : ScriptedInstance(pMap), void instance_azjol_nerub::Initialize() { memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); - memset(&m_auiWatcherGUIDS, 0, sizeof(m_auiWatcherGUIDS)); } void instance_azjol_nerub::OnObjectCreate(GameObject* pGo) @@ -53,36 +40,39 @@ void instance_azjol_nerub::OnObjectCreate(GameObject* pGo) switch(pGo->GetEntry()) { case GO_DOOR_KRIKTHIR: - m_uiDoorKrikthirGUID = pGo->GetGUID(); - if (m_auiEncounter[0] == DONE) + if (m_auiEncounter[TYPE_KRIKTHIR] == DONE) pGo->SetGoState(GO_STATE_ACTIVE); break; + // TODO - check if these (encounter) doors are really closed by default in the database case GO_DOOR_ANUBARAK_1: - m_uiDoorAnubarak1GUID = pGo->GetGUID(); - if (m_auiEncounter[2] == DONE || m_auiEncounter[2] == NOT_STARTED) + if (m_auiEncounter[TYPE_ANUBARAK] == DONE || m_auiEncounter[TYPE_ANUBARAK] == NOT_STARTED) pGo->SetGoState(GO_STATE_ACTIVE); break; case GO_DOOR_ANUBARAK_2: - m_uiDoorAnubarak2GUID = pGo->GetGUID(); - if (m_auiEncounter[2] == DONE || m_auiEncounter[2] == NOT_STARTED) + if (m_auiEncounter[TYPE_ANUBARAK] == DONE || m_auiEncounter[TYPE_ANUBARAK] == NOT_STARTED) pGo->SetGoState(GO_STATE_ACTIVE); break; case GO_DOOR_ANUBARAK_3: - m_uiDoorAnubarak3GUID = pGo->GetGUID(); - if (m_auiEncounter[2] == DONE || m_auiEncounter[2] == NOT_STARTED) + if (m_auiEncounter[TYPE_ANUBARAK] == DONE || m_auiEncounter[TYPE_ANUBARAK] == NOT_STARTED) pGo->SetGoState(GO_STATE_ACTIVE); break; + + default: + return; } + m_mGoEntryGuidStore[pGo->GetEntry()] = pGo->GetObjectGuid(); } void instance_azjol_nerub::OnCreatureCreate(Creature* pCreature) { switch(pCreature->GetEntry()) { - case NPC_KRIKTHIR: m_uiKrikthirGUID = pCreature->GetGUID(); break; - case NPC_GASHRA: m_auiWatcherGUIDS[0] = pCreature->GetGUID(); break; - case NPC_NARJIL: m_auiWatcherGUIDS[1] = pCreature->GetGUID(); break; - case NPC_SILTHIK: m_auiWatcherGUIDS[2] = pCreature->GetGUID(); break; + case NPC_KRIKTHIR: + case NPC_GASHRA: + case NPC_NARJIL: + case NPC_SILTHIK: + m_mNpcEntryGuidStore[pCreature->GetEntry()] = pCreature->GetObjectGuid(); + break; } } @@ -91,7 +81,7 @@ void instance_azjol_nerub::OnCreatureDeath(Creature* pCreature) uint32 uiEntry = pCreature->GetEntry(); if (uiEntry == NPC_GASHRA || uiEntry == NPC_NARJIL || uiEntry == NPC_SILTHIK) { - if (m_auiEncounter[0] == NOT_STARTED) + if (m_auiEncounter[TYPE_KRIKTHIR] == NOT_STARTED) m_uiWatcherTimer = 5000; } } @@ -103,8 +93,8 @@ void instance_azjol_nerub::OnCreatureEnterCombat(Creature* pCreature) if (uiEntry == NPC_GASHRA || uiEntry == NPC_NARJIL || uiEntry == NPC_SILTHIK) { // Creature enter combat is not equal to having a victim yet. - if (!m_uiPlayerGUID && pCreature->getVictim()) - m_uiPlayerGUID = pCreature->getVictim()->GetCharmerOrOwnerPlayerOrPlayerItself()->GetGUID(); + if (!m_playerGuid && pCreature->getVictim()) + m_playerGuid = pCreature->getVictim()->GetCharmerOrOwnerPlayerOrPlayerItself()->GetObjectGuid(); } } @@ -112,7 +102,7 @@ void instance_azjol_nerub::OnCreatureEvade(Creature* pCreature) { uint32 uiEntry = pCreature->GetEntry(); if (uiEntry == NPC_GASHRA || uiEntry == NPC_NARJIL || uiEntry == NPC_SILTHIK) - m_uiPlayerGUID = 0; + m_playerGuid.Clear(); } void instance_azjol_nerub::Update(uint32 uiDiff) @@ -132,14 +122,14 @@ void instance_azjol_nerub::Update(uint32 uiDiff) void instance_azjol_nerub::DoSendWatcherOrKrikthir() { Creature* pAttacker = NULL; - Creature* pKrikthir = instance->GetCreature(m_uiKrikthirGUID); + Creature* pKrikthir = GetSingleCreatureFromStorage(NPC_KRIKTHIR); if (!pKrikthir) return; - for (uint8 i = 0; i < MAX_WATCHERS; ++i) + for (uint8 i = 0; i < countof(aWatchers); ++i) { - if (Creature* pTemp = instance->GetCreature(m_auiWatcherGUIDS[i])) + if (Creature* pTemp = GetSingleCreatureFromStorage(aWatchers[i])) { if (pTemp->isAlive()) { @@ -163,7 +153,7 @@ void instance_azjol_nerub::DoSendWatcherOrKrikthir() else pAttacker = pKrikthir; - if (Unit* pTarget = instance->GetUnit(m_uiPlayerGUID)) + if (Player* pTarget = instance->GetPlayer(m_playerGuid)) { if (pTarget->isAlive()) pAttacker->AI()->AttackStart(pTarget); @@ -175,18 +165,18 @@ void instance_azjol_nerub::SetData(uint32 uiType, uint32 uiData) switch(uiType) { case TYPE_KRIKTHIR: - m_auiEncounter[0] = uiData; + m_auiEncounter[uiType] = uiData; if (uiData == DONE) - DoUseDoorOrButton(m_uiDoorKrikthirGUID); + DoUseDoorOrButton(GO_DOOR_KRIKTHIR); break; case TYPE_HADRONOX: - m_auiEncounter[1] = uiData; + m_auiEncounter[uiType] = uiData; break; case TYPE_ANUBARAK: - m_auiEncounter[2] = uiData; - DoUseDoorOrButton(m_uiDoorAnubarak1GUID); - DoUseDoorOrButton(m_uiDoorAnubarak2GUID); - DoUseDoorOrButton(m_uiDoorAnubarak3GUID); + m_auiEncounter[uiType] = uiData; + DoUseDoorOrButton(GO_DOOR_ANUBARAK_1); + DoUseDoorOrButton(GO_DOOR_ANUBARAK_2); + DoUseDoorOrButton(GO_DOOR_ANUBARAK_3); break; } @@ -197,7 +187,7 @@ void instance_azjol_nerub::SetData(uint32 uiType, uint32 uiData) std::ostringstream saveStream; saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2]; - strInstData = saveStream.str(); + m_strInstData = saveStream.str(); SaveToDB(); OUT_SAVE_INST_DATA_COMPLETE; @@ -234,6 +224,7 @@ InstanceData* GetInstanceData_instance_azjol_nerub(Map* pMap) void AddSC_instance_azjol_nerub() { Script* pNewScript; + pNewScript = new Script; pNewScript->Name = "instance_azjol-nerub"; pNewScript->GetInstanceData = &GetInstanceData_instance_azjol_nerub; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 07edc55be..88bf4b994 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2190" + #define SD2_REVISION_NR "2191" #endif // __SD2_REVISION_NR_H__ From 6f632e949c79dcc7e3330c28f3e79fa0d403093b Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Sun, 5 Jun 2011 12:40:41 +0200 Subject: [PATCH 0172/1172] [2192] Move instance script for trial of the crusader to header version --- .../instance_trial_of_the_crusader.cpp | 203 ++++++------------ .../trial_of_the_crusader.cpp | 3 - .../trial_of_the_crusader.h | 52 +++-- sd2_revision_nr.h | 2 +- 4 files changed, 105 insertions(+), 155 deletions(-) diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp index 27b09bf89..3700186cf 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp @@ -32,156 +32,91 @@ EndScriptData */ 4 - Anubarak */ -struct MANGOS_DLL_DECL instance_trial_of_the_crusader : public ScriptedInstance +instance_trial_of_the_crusader::instance_trial_of_the_crusader(Map* pMap) : ScriptedInstance(pMap) { - instance_trial_of_the_crusader(Map* pMap) : ScriptedInstance(pMap) {Initialize();}; - - uint32 m_auiEncounter[MAX_ENCOUNTER]; - std::string strInstData; + Initialize(); +} - uint32 m_uiGormokGUID; - uint32 m_uiAcidmawGUID; - uint32 m_uiDreadscaleGUID; - uint32 m_uiIcehowlGUID; - uint32 m_uiJaraxxusGUID; - uint32 m_uiFjolaGUID; - uint32 m_uiEydisGUID; - uint32 m_uiAnubarakGUID; +void instance_trial_of_the_crusader::Initialize() +{ + memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); +} - void Initialize() - { - memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); +bool instance_trial_of_the_crusader::IsEncounterInProgress() const +{ + for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) + if (m_auiEncounter[i] == IN_PROGRESS) return true; - m_uiGormokGUID = 0; - m_uiAcidmawGUID = 0; - m_uiDreadscaleGUID = 0; - m_uiIcehowlGUID = 0; - m_uiJaraxxusGUID = 0; - m_uiFjolaGUID = 0; - m_uiEydisGUID = 0; - m_uiAnubarakGUID = 0; + return false; +} +void instance_trial_of_the_crusader::SetData(uint32 uiType, uint32 uiData) +{ + switch(uiType) + { + case TYPE_NORTHREND_BEASTS: + m_auiEncounter[uiType] = uiData; + break; + case TYPE_JARAXXUS: + m_auiEncounter[uiType] = uiData; + break; + case TYPE_FACTION_CHAMPIONS: + m_auiEncounter[uiType] = uiData; + break; + case TYPE_TWIN_VALKYR: + m_auiEncounter[uiType] = uiData; + break; + case TYPE_ANUBARAK: + m_auiEncounter[uiType] = uiData; + break; + default: + error_log("SD2: Instance Trial of The Crusader: ERROR SetData = %u for type %u does not exist/not implemented.", uiType, uiData); + return; } - bool IsEncounterInProgress() const + if (uiData == DONE) { - for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) - if (m_auiEncounter[i] == IN_PROGRESS) return true; + OUT_SAVE_INST_DATA; - return false; - } + std::ostringstream saveStream; + saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2] << " " + << m_auiEncounter[3] << " " << m_auiEncounter[4]; - void OnCreatureCreate(Creature* pCreature) - { - switch(pCreature->GetEntry()) - { - case 34796: m_uiGormokGUID = pCreature->GetGUID(); break; - case 35144: m_uiAcidmawGUID = pCreature->GetGUID(); break; - case 34799: m_uiDreadscaleGUID = pCreature->GetGUID(); break; - case 34797: m_uiIcehowlGUID = pCreature->GetGUID(); break; - case 34780: m_uiJaraxxusGUID = pCreature->GetGUID(); break; - case 34497: m_uiFjolaGUID = pCreature->GetGUID(); break; - case 34496: m_uiEydisGUID = pCreature->GetGUID(); break; - case 34564: m_uiAnubarakGUID = pCreature->GetGUID(); break; - } - } + m_strInstData = saveStream.str(); - void SetData(uint32 uiType, uint32 uiData) - { - debug_log("SD2: Instance Trial Of The Crusader: SetData received for type %u with data %u",uiType,uiData); - - switch(uiType) - { - case TYPE_NORTHREND_BEASTS: - m_auiEncounter[0] = uiData; - break; - case TYPE_JARAXXUS: - m_auiEncounter[1] = uiData; - break; - case TYPE_FACTION_CHAMPIONS: - m_auiEncounter[2] = uiData; - break; - case TYPE_TWIN_VALKYR: - m_auiEncounter[3] = uiData; - break; - case TYPE_ANUBARAK: - m_auiEncounter[4] = uiData; - break; - default: - error_log("SD2: Instance Trial of The Crusader: ERROR SetData = %u for type %u does not exist/not implemented.",uiType,uiData); - break; - } - - if (uiData == DONE) - { - OUT_SAVE_INST_DATA; - - std::ostringstream saveStream; - saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2] << " " - << m_auiEncounter[3] << " " << m_auiEncounter[4]; - - strInstData = saveStream.str(); - - SaveToDB(); - OUT_SAVE_INST_DATA_COMPLETE; - } + SaveToDB(); + OUT_SAVE_INST_DATA_COMPLETE; } +} - uint32 GetData(uint32 uiType) - { - switch(uiType) - { - case TYPE_NORTHREND_BEASTS: return m_auiEncounter[0]; - case TYPE_JARAXXUS: return m_auiEncounter[1]; - case TYPE_FACTION_CHAMPIONS: return m_auiEncounter[2]; - case TYPE_TWIN_VALKYR: return m_auiEncounter[3]; - case TYPE_ANUBARAK: return m_auiEncounter[4]; - } - return 0; - } +uint32 instance_trial_of_the_crusader::GetData(uint32 uiType) +{ + if (uiType < MAX_ENCOUNTER) + return m_auiEncounter[uiType]; - uint64 GetData64(uint32 uiData) - { - switch(uiData) - { - case DATA_GORMOK: return m_uiGormokGUID; - case DATA_ACIDMAW: return m_uiAcidmawGUID; - case DATA_DREADSCALE: return m_uiDreadscaleGUID; - case DATA_ICEHOWL: return m_uiIcehowlGUID; - case DATA_JARAXXUS: return m_uiJaraxxusGUID; - case DATA_FJOLA: return m_uiFjolaGUID; - case DATA_EYDIS: return m_uiEydisGUID; - case DATA_ANUBARAK: return m_uiAnubarakGUID; - } - return 0; - } + return 0; +} - const char* Save() +void instance_trial_of_the_crusader::Load(const char* chrIn) +{ + if (!chrIn) { - return strInstData.c_str(); + OUT_LOAD_INST_DATA_FAIL; + return; } - void Load(const char* chrIn) - { - if (!chrIn) - { - OUT_LOAD_INST_DATA_FAIL; - return; - } - - OUT_LOAD_INST_DATA(chrIn); + OUT_LOAD_INST_DATA(chrIn); - std::istringstream loadStream(chrIn); - loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3] - >> m_auiEncounter[4]; + std::istringstream loadStream(chrIn); + loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3] + >> m_auiEncounter[4]; - for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) - if (m_auiEncounter[i] == IN_PROGRESS) // Do not load an encounter as "In Progress" - reset it instead. - m_auiEncounter[i] = NOT_STARTED; + for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) + if (m_auiEncounter[i] == IN_PROGRESS) // Do not load an encounter as "In Progress" - reset it instead. + m_auiEncounter[i] = NOT_STARTED; - OUT_LOAD_INST_DATA_COMPLETE; - } -}; + OUT_LOAD_INST_DATA_COMPLETE; +} InstanceData* GetInstanceData_instance_trial_of_the_crusader(Map* pMap) { @@ -190,10 +125,10 @@ InstanceData* GetInstanceData_instance_trial_of_the_crusader(Map* pMap) void AddSC_instance_trial_of_the_crusader() { - Script* newscript; + Script* pNewScript; - newscript = new Script; - newscript->Name = "instance_trial_of_the_crusader"; - newscript->GetInstanceData = &GetInstanceData_instance_trial_of_the_crusader; - newscript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "instance_trial_of_the_crusader"; + pNewScript->GetInstanceData = &GetInstanceData_instance_trial_of_the_crusader; + pNewScript->RegisterSelf(); } diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp index 76236adaf..f6c9b12b3 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp @@ -76,9 +76,6 @@ enum SAY_LKING_ANUB_INTRO_3 = -1649037, SAY_ANUB_ANUB_INTRO_1 = -1649038, - NPC_GORMOK = 34796, - NPC_JARAXXUS = 34780, - GOSSIP_ITEM_START_EVENT1 = -3649000 }; diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h index b4e8b87d2..7c6b43022 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h @@ -7,23 +7,41 @@ enum { - MAX_ENCOUNTER = 5, - - TYPE_NORTHREND_BEASTS = 1, - TYPE_JARAXXUS = 2, - TYPE_FACTION_CHAMPIONS = 3, - TYPE_TWIN_VALKYR = 4, - TYPE_ANUBARAK = 5, - - DATA_GORMOK = 6, - DATA_ACIDMAW = 7, - DATA_DREADSCALE = 8, - DATA_ICEHOWL = 9, - DATA_JARAXXUS = 10, - DATA_FACTION_CHAMPIONS = 11, - DATA_FJOLA = 12, - DATA_EYDIS = 13, - DATA_ANUBARAK = 14, + MAX_ENCOUNTER = 5, + + TYPE_NORTHREND_BEASTS = 0, + TYPE_JARAXXUS = 1, + TYPE_FACTION_CHAMPIONS = 2, + TYPE_TWIN_VALKYR = 3, + TYPE_ANUBARAK = 4, + + NPC_GORMOK = 34796, + NPC_ACIDMAW = 35144, + NPC_DREADSCALE = 34799, + NPC_ICEHOWL = 34797, + NPCJARAXXUS = 34780, + NPC_FJOLA = 34497, + NPC_EYDIS = 34496, + NPC_ANUBARAK = 34564, +}; + +class MANGOS_DLL_DECL instance_trial_of_the_crusader : public ScriptedInstance +{ + public: + instance_trial_of_the_crusader(Map* pMap); + + void Initialize(); + bool IsEncounterInProgress() const; + + void SetData(uint32 uiType, uint32 uiData); + uint32 GetData(uint32 uiType); + + const char* Save() { return m_strInstData.c_str(); } + void Load(const char* chrIn); + + private: + uint32 m_auiEncounter[MAX_ENCOUNTER]; + std::string m_strInstData; }; #endif diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 88bf4b994..e1d0ee520 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2191" + #define SD2_REVISION_NR "2192" #endif // __SD2_REVISION_NR_H__ From 4f1a467a2996c5b03118065b65fa365e2ca23ecd Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Sun, 5 Jun 2011 12:57:10 +0200 Subject: [PATCH 0173/1172] [2193] Use EntryGuidMap-Storage in Gundrak --- scripts/northrend/gundrak/gundrak.h | 28 +--- .../northrend/gundrak/instance_gundrak.cpp | 154 ++++++------------ sd2_revision_nr.h | 2 +- 3 files changed, 54 insertions(+), 130 deletions(-) diff --git a/scripts/northrend/gundrak/gundrak.h b/scripts/northrend/gundrak/gundrak.h index 1cccde129..65d4d3a2d 100644 --- a/scripts/northrend/gundrak/gundrak.h +++ b/scripts/northrend/gundrak/gundrak.h @@ -73,9 +73,8 @@ class MANGOS_DLL_DECL instance_gundrak : public ScriptedInstance void SetData(uint32 uiType, uint32 uiData); uint32 GetData(uint32 uiType); - uint64 GetData64(uint32 uiData); - const char* Save() { return strInstData.c_str(); } + const char* Save() { return m_strInstData.c_str(); } void Load(const char* chrIn); void Update(uint32 uiDiff); @@ -83,34 +82,15 @@ class MANGOS_DLL_DECL instance_gundrak : public ScriptedInstance protected: void DoAltarVisualEffect(uint8 uiType); uint32 m_auiEncounter[MAX_ENCOUNTER]; - std::string strInstData; - - uint64 m_uiEckDoorGUID; - uint64 m_uiEckUnderwaterDoorGUID; - uint64 m_uiGaldarahDoorGUID; - uint64 m_uiExitDoorLeftGUID; - uint64 m_uiExitDoorRightGUID; - uint64 m_uiSnakeKeyGUID; - uint64 m_uiMammothKeyGUID; - uint64 m_uiTrollKeyGUID; - uint64 m_uiRhinoKeyGUID; - uint64 m_uiAltarOfSladranGUID; - uint64 m_uiAltarOfMoorabiGUID; - uint64 m_uiAltarOfColossusGUID; - uint64 m_uiBridgeGUID; - uint64 m_uiCollisionGUID; - - uint64 m_uiSladranGUID; - uint64 m_uiElementalGUID; - uint64 m_uiColossusGUID; + std::string m_strInstData; TypeTimerMap m_mAltarInProgress; TypeTimerMap m_mBeamInProgress; TypeTimerMap m_mKeyInProgress; GUIDList m_luiStalkerGUIDs; - GUIDList m_luiStalkerCasterGUIDs; - GUIDList m_luiStalkerTargetGUIDs; + GUIDVector m_vStalkerCasterGuids; + GUIDVector m_vStalkerTargetGuids; }; #endif diff --git a/scripts/northrend/gundrak/instance_gundrak.cpp b/scripts/northrend/gundrak/instance_gundrak.cpp index 187ee79bb..18bc21fec 100644 --- a/scripts/northrend/gundrak/instance_gundrak.cpp +++ b/scripts/northrend/gundrak/instance_gundrak.cpp @@ -42,25 +42,7 @@ bool GOUse_go_gundrak_altar(Player* pPlayer, GameObject* pGo) return true; } -instance_gundrak::instance_gundrak(Map* pMap) : ScriptedInstance(pMap), - m_uiEckDoorGUID(0), - m_uiEckUnderwaterDoorGUID(0), - m_uiGaldarahDoorGUID(0), - m_uiExitDoorLeftGUID(0), - m_uiExitDoorRightGUID(0), - m_uiSnakeKeyGUID(0), - m_uiMammothKeyGUID(0), - m_uiTrollKeyGUID(0), - m_uiRhinoKeyGUID(0), - m_uiAltarOfSladranGUID(0), - m_uiAltarOfMoorabiGUID(0), - m_uiAltarOfColossusGUID(0), - m_uiBridgeGUID(0), - m_uiCollisionGUID(0), - - m_uiSladranGUID(0), - m_uiElementalGUID(0), - m_uiColossusGUID(0) +instance_gundrak::instance_gundrak(Map* pMap) : ScriptedInstance(pMap) { Initialize(); } @@ -68,17 +50,24 @@ instance_gundrak::instance_gundrak(Map* pMap) : ScriptedInstance(pMap), void instance_gundrak::Initialize() { memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); + + m_vStalkerCasterGuids.reserve(3); + m_vStalkerTargetGuids.reserve(3); } void instance_gundrak::OnCreatureCreate(Creature* pCreature) { switch(pCreature->GetEntry()) { - case NPC_SLADRAN: m_uiSladranGUID = pCreature->GetGUID(); break; - case NPC_ELEMENTAL: m_uiElementalGUID = pCreature->GetGUID(); break; - case NPC_COLOSSUS: m_uiColossusGUID = pCreature->GetGUID(); break; + case NPC_SLADRAN: + case NPC_ELEMENTAL: + case NPC_COLOSSUS: + m_mNpcEntryGuidStore[pCreature->GetEntry()] = pCreature->GetObjectGuid(); + break; - case NPC_INVISIBLE_STALKER: m_luiStalkerGUIDs.push_back(pCreature->GetGUID()); break; + case NPC_INVISIBLE_STALKER: + m_luiStalkerGUIDs.push_back(pCreature->GetGUID()); + break; } } @@ -100,64 +89,50 @@ void instance_gundrak::OnObjectCreate(GameObject* pGo) switch(pGo->GetEntry()) { case GO_ECK_DOOR: - m_uiEckDoorGUID = pGo->GetGUID(); if (m_auiEncounter[TYPE_MOORABI] == DONE && !instance->IsRegularDifficulty()) - DoUseDoorOrButton(m_uiEckDoorGUID); + pGo->SetGoState(GO_STATE_ACTIVE); break; case GO_ECK_UNDERWATER_DOOR: - m_uiEckUnderwaterDoorGUID = pGo->GetGUID(); if (m_auiEncounter[TYPE_ECK] == DONE) - DoUseDoorOrButton(m_uiEckUnderwaterDoorGUID); + pGo->SetGoState(GO_STATE_ACTIVE); break; case GO_GALDARAH_DOOR: - m_uiGaldarahDoorGUID = pGo->GetGUID(); - DoUseDoorOrButton(m_uiGaldarahDoorGUID); + pGo->SetGoState(GO_STATE_ACTIVE); break; case GO_EXIT_DOOR_L: - m_uiExitDoorLeftGUID = pGo->GetGUID(); if (m_auiEncounter[TYPE_GALDARAH] == DONE) - DoUseDoorOrButton(m_uiExitDoorLeftGUID); + pGo->SetGoState(GO_STATE_ACTIVE); break; case GO_EXIT_DOOR_R: - m_uiExitDoorRightGUID = pGo->GetGUID(); if (m_auiEncounter[TYPE_GALDARAH] == DONE) - DoUseDoorOrButton(m_uiExitDoorRightGUID); + pGo->SetGoState(GO_STATE_ACTIVE); break; case GO_ALTAR_OF_SLADRAN: - m_uiAltarOfSladranGUID = pGo->GetGUID(); if (m_auiEncounter[TYPE_SLADRAN] == DONE) pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NO_INTERACT); break; case GO_ALTAR_OF_MOORABI: - m_uiAltarOfMoorabiGUID = pGo->GetGUID(); if (m_auiEncounter[TYPE_MOORABI] == DONE) pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NO_INTERACT); break; case GO_ALTAR_OF_COLOSSUS: - m_uiAltarOfColossusGUID = pGo->GetGUID(); if (m_auiEncounter[TYPE_COLOSSUS] == DONE) pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NO_INTERACT); break; case GO_SNAKE_KEY: - m_uiSnakeKeyGUID = pGo->GetGUID(); - break; case GO_TROLL_KEY: - m_uiTrollKeyGUID = pGo->GetGUID(); - break; case GO_MAMMOTH_KEY: - m_uiMammothKeyGUID = pGo->GetGUID(); - break; case GO_RHINO_KEY: - m_uiRhinoKeyGUID = pGo->GetGUID(); - break; case GO_BRIDGE: - m_uiBridgeGUID = pGo->GetGUID(); - break; case GO_COLLISION: - m_uiCollisionGUID = pGo->GetGUID(); break; + + default: + return; } + m_mGoEntryGuidStore[pGo->GetEntry()] = pGo->GetObjectGuid(); } + void instance_gundrak::Load(const char* chrIn) { if (!chrIn) @@ -193,7 +168,7 @@ void instance_gundrak::SetData(uint32 uiType, uint32 uiData) case TYPE_SLADRAN: m_auiEncounter[TYPE_SLADRAN] = uiData; if (uiData == DONE) - if (GameObject* pGo = instance->GetGameObject(m_uiAltarOfSladranGUID)) + if (GameObject* pGo = GetSingleGameObjectFromStorage(GO_ALTAR_OF_SLADRAN)) pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NO_INTERACT); if (uiData == SPECIAL) m_mAltarInProgress.insert(TypeTimerPair(TYPE_SLADRAN, TIMER_VISUAL_ALTAR)); @@ -203,8 +178,8 @@ void instance_gundrak::SetData(uint32 uiType, uint32 uiData) if (uiData == DONE) { if (!instance->IsRegularDifficulty()) - DoUseDoorOrButton(m_uiEckDoorGUID); - if (GameObject* pGo = instance->GetGameObject(m_uiAltarOfMoorabiGUID)) + DoUseDoorOrButton(GO_ECK_DOOR); + if (GameObject* pGo = GetSingleGameObjectFromStorage(GO_ALTAR_OF_MOORABI)) pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NO_INTERACT); } if (uiData == SPECIAL) @@ -213,28 +188,28 @@ void instance_gundrak::SetData(uint32 uiType, uint32 uiData) case TYPE_COLOSSUS: m_auiEncounter[TYPE_COLOSSUS] = uiData; if (uiData == DONE) - if (GameObject* pGo = instance->GetGameObject(m_uiAltarOfColossusGUID)) + if (GameObject* pGo = GetSingleGameObjectFromStorage(GO_ALTAR_OF_COLOSSUS)) pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NO_INTERACT); if (uiData == SPECIAL) m_mAltarInProgress.insert(TypeTimerPair(TYPE_COLOSSUS, TIMER_VISUAL_ALTAR)); break; case TYPE_GALDARAH: m_auiEncounter[TYPE_GALDARAH] = uiData; - DoUseDoorOrButton(m_uiGaldarahDoorGUID); + DoUseDoorOrButton(GO_GALDARAH_DOOR); if (uiData == DONE) { - DoUseDoorOrButton(m_uiExitDoorLeftGUID); - DoUseDoorOrButton(m_uiExitDoorRightGUID); + DoUseDoorOrButton(GO_EXIT_DOOR_L); + DoUseDoorOrButton(GO_EXIT_DOOR_R); } break; case TYPE_ECK: m_auiEncounter[TYPE_ECK] = uiData; if (uiData == DONE) - DoUseDoorOrButton(m_uiEckUnderwaterDoorGUID); + DoUseDoorOrButton(GO_ECK_UNDERWATER_DOOR); break; default: error_log("SD2: Instance Gundrak: ERROR SetData = %u for type %u does not exist/not implemented.", uiType, uiData); - break; + return; } if (uiData == DONE || uiData == SPECIAL) // Save activated altars, too @@ -245,7 +220,7 @@ void instance_gundrak::SetData(uint32 uiType, uint32 uiData) saveStream << m_auiEncounter[TYPE_SLADRAN] << " " << m_auiEncounter[TYPE_MOORABI] << " " << m_auiEncounter[TYPE_COLOSSUS] << " " << m_auiEncounter[TYPE_GALDARAH] << " " << m_auiEncounter[TYPE_ECK]; - strInstData = saveStream.str(); + m_strInstData = saveStream.str(); SaveToDB(); OUT_SAVE_INST_DATA_COMPLETE; @@ -254,33 +229,9 @@ void instance_gundrak::SetData(uint32 uiType, uint32 uiData) uint32 instance_gundrak::GetData(uint32 uiType) { - switch(uiType) - { - case TYPE_SLADRAN: - return m_auiEncounter[TYPE_SLADRAN]; - case TYPE_MOORABI: - return m_auiEncounter[TYPE_MOORABI]; - case TYPE_COLOSSUS: - return m_auiEncounter[TYPE_COLOSSUS]; - case TYPE_GALDARAH: - return m_auiEncounter[TYPE_GALDARAH]; - case TYPE_ECK: - return m_auiEncounter[TYPE_ECK]; - } - return 0; -} + if (uiType < MAX_ENCOUNTER) + return m_auiEncounter[uiType]; -uint64 instance_gundrak::GetData64(uint32 uiType) -{ - switch(uiType) - { - case NPC_SLADRAN: - return m_uiSladranGUID; - case NPC_ELEMENTAL: - return m_uiElementalGUID; - case NPC_COLOSSUS: - return m_uiColossusGUID; - } return 0; } @@ -295,7 +246,7 @@ void instance_gundrak::DoAltarVisualEffect(uint8 uiType) if (!m_luiStalkerGUIDs.empty()) { float fHeight = 10.0f; // A bit higher than the altar is needed - if (GameObject* pCollusAltar = instance->GetGameObject(m_uiAltarOfColossusGUID)) + if (GameObject* pCollusAltar = GetSingleGameObjectFromStorage(GO_ALTAR_OF_COLOSSUS)) fHeight += pCollusAltar->GetPositionZ(); std::list lStalkerTargets, lStalkerCasters; @@ -315,13 +266,13 @@ void instance_gundrak::DoAltarVisualEffect(uint8 uiType) lStalkerCasters.sort(sortFromEastToWest); for (std::list::const_iterator itr = lStalkerTargets.begin(); itr != lStalkerTargets.end(); ++itr) - m_luiStalkerTargetGUIDs.push_back((*itr)->GetGUID()); + m_vStalkerTargetGuids.push_back((*itr)->GetGUID()); for (std::list::const_iterator itr = lStalkerCasters.begin(); itr != lStalkerCasters.end(); ++itr) - m_luiStalkerCasterGUIDs.push_back((*itr)->GetGUID()); + m_vStalkerCasterGuids.push_back((*itr)->GetGUID()); } // Verify that the DB has enough trigger spawned - if (m_luiStalkerTargetGUIDs.size() < 3 || m_luiStalkerCasterGUIDs.size() < 3) + if (m_vStalkerTargetGuids.size() < 3 || m_vStalkerCasterGuids.size() < 3) return; // Get the Index from the bosses @@ -335,14 +286,8 @@ void instance_gundrak::DoAltarVisualEffect(uint8 uiType) return; } - GUIDList::iterator targetItr = m_luiStalkerTargetGUIDs.begin(); - GUIDList::iterator casterItr = m_luiStalkerCasterGUIDs.begin(); - - advance(targetItr, uiIndex); - advance(casterItr, uiIndex); - - Creature* pTarget = instance->GetCreature(*targetItr); - Creature* pCaster = instance->GetCreature(*casterItr); + Creature* pTarget = instance->GetCreature(m_vStalkerTargetGuids[uiIndex]); + Creature* pCaster = instance->GetCreature(m_vStalkerCasterGuids[uiIndex]); if (!pTarget || !pCaster) return; @@ -387,9 +332,9 @@ void instance_gundrak::Update(uint32 uiDiff) // Use Key switch (itr->first) { - case TYPE_SLADRAN: DoUseDoorOrButton(m_uiSnakeKeyGUID); break; - case TYPE_MOORABI: DoUseDoorOrButton(m_uiMammothKeyGUID); break; - case TYPE_COLOSSUS: DoUseDoorOrButton(m_uiTrollKeyGUID); break; + case TYPE_SLADRAN: DoUseDoorOrButton(GO_SNAKE_KEY); break; + case TYPE_MOORABI: DoUseDoorOrButton(GO_MAMMOTH_KEY); break; + case TYPE_COLOSSUS: DoUseDoorOrButton(GO_TROLL_KEY); break; } // Set Timer for Beam-Duration m_mKeyInProgress.insert(TypeTimerPair(itr->first, TIMER_VISUAL_KEY)); @@ -414,21 +359,20 @@ void instance_gundrak::Update(uint32 uiDiff) if (m_auiEncounter[0] == SPECIAL && m_auiEncounter[1] == SPECIAL && m_auiEncounter[2] == SPECIAL && m_mAltarInProgress.empty() && m_mBeamInProgress.empty() && m_mKeyInProgress.size() == 1) { - DoUseDoorOrButton(m_uiCollisionGUID); - DoUseDoorOrButton(m_uiRhinoKeyGUID, 0, true); + DoUseDoorOrButton(GO_COLLISION); + DoUseDoorOrButton(GO_RHINO_KEY, 0, true); // The already closed keys cannot be done with DoUseDoorOrButton - if (GameObject* pTrollKey = instance->GetGameObject(m_uiTrollKeyGUID)) + if (GameObject* pTrollKey = GetSingleGameObjectFromStorage(GO_TROLL_KEY)) pTrollKey->SetGoState(GO_STATE_ACTIVE_ALTERNATIVE); - if (GameObject* pMammothKey = instance->GetGameObject(m_uiMammothKeyGUID)) + if (GameObject* pMammothKey = GetSingleGameObjectFromStorage(GO_MAMMOTH_KEY)) pMammothKey->SetGoState(GO_STATE_ACTIVE_ALTERNATIVE); - if (GameObject* pSnakeKey = instance->GetGameObject(m_uiSnakeKeyGUID)) + if (GameObject* pSnakeKey = GetSingleGameObjectFromStorage(GO_SNAKE_KEY)) pSnakeKey->SetGoState(GO_STATE_ACTIVE_ALTERNATIVE); // GO_BRIDGE is type 35 (TRAP_DOOR) and needs to be handled directly // Real Use of this GO is unknown, but this change of state is expected - if (GameObject* pBridge = instance->GetGameObject(m_uiBridgeGUID)) - pBridge->SetGoState(GO_STATE_READY); + DoUseDoorOrButton(GO_BRIDGE); } // Remove this timer, as processed m_mKeyInProgress.erase(itr++); diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index e1d0ee520..6e2fb1bc5 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2192" + #define SD2_REVISION_NR "2193" #endif // __SD2_REVISION_NR_H__ From 6344e241c3e4fb2e02ef55b861a161710e2a5a83 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Sun, 5 Jun 2011 13:13:08 +0200 Subject: [PATCH 0174/1172] [2194] Use EntryGuidMap-Storage in Forge of Souls --- .../forge_of_souls/forge_of_souls.h | 4 --- .../instance_forge_of_souls.cpp | 29 ++++++------------- sd2_revision_nr.h | 2 +- 3 files changed, 10 insertions(+), 25 deletions(-) diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/forge_of_souls.h b/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/forge_of_souls.h index 58d872a54..bbc6c93b5 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/forge_of_souls.h +++ b/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/forge_of_souls.h @@ -100,7 +100,6 @@ class MANGOS_DLL_DECL instance_forge_of_souls : public ScriptedInstance void SetData(uint32 uiType, uint32 uiData); uint32 GetData(uint32 uiType); - uint64 GetData64(uint32 uiData); void SetData64(uint32 uiType, uint64 uiData); void OnPlayerEnter(Player* pPlayer); @@ -118,9 +117,6 @@ class MANGOS_DLL_DECL instance_forge_of_souls : public ScriptedInstance uint32 m_uiTeam; // Team of first entered player, used to set if Jaina or Silvana to spawn - uint64 m_uiBronjahmGUID; - uint64 m_uiDevourerOrSoulsGUID; - GUIDList m_luiSoulFragmentAliveGUIDs; GUIDList m_lEventMobGUIDs; }; diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/instance_forge_of_souls.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/instance_forge_of_souls.cpp index 2c9ed242e..d53152017 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/instance_forge_of_souls.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/instance_forge_of_souls.cpp @@ -26,9 +26,7 @@ EndScriptData */ instance_forge_of_souls::instance_forge_of_souls(Map* pMap) : ScriptedInstance(pMap), m_bCriteriaPhantomBlastFailed(false), - m_uiTeam(0), - m_uiBronjahmGUID(0), - m_uiDevourerOrSoulsGUID(0) + m_uiTeam(0) { Initialize(); } @@ -40,11 +38,15 @@ void instance_forge_of_souls::Initialize() void instance_forge_of_souls::OnCreatureCreate(Creature* pCreature) { - switch(pCreature->GetEntry()) + switch (pCreature->GetEntry()) { - case NPC_BRONJAHM: m_uiBronjahmGUID = pCreature->GetGUID(); break; - case NPC_DEVOURER_OF_SOULS: m_uiDevourerOrSoulsGUID = pCreature->GetGUID(); break; - case NPC_CORRUPTED_SOUL_FRAGMENT: m_luiSoulFragmentAliveGUIDs.push_back(pCreature->GetGUID()); break; + case NPC_BRONJAHM: + m_mNpcEntryGuidStore[pCreature->GetEntry()] = pCreature->GetObjectGuid(); + break; + + case NPC_CORRUPTED_SOUL_FRAGMENT: + m_luiSoulFragmentAliveGUIDs.push_back(pCreature->GetGUID()); + break; } } @@ -189,19 +191,6 @@ uint32 instance_forge_of_souls::GetData(uint32 uiType) } } -uint64 instance_forge_of_souls::GetData64(uint32 uiData) -{ - switch(uiData) - { - case NPC_BRONJAHM: - return m_uiBronjahmGUID; - case NPC_DEVOURER_OF_SOULS: - return m_uiDevourerOrSoulsGUID; - default: - return 0; - } -} - void instance_forge_of_souls::SetData64(uint32 uiType, uint64 uiData) { if (uiType == DATA_SOULFRAGMENT_REMOVE) diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 6e2fb1bc5..d6c89924e 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2193" + #define SD2_REVISION_NR "2194" #endif // __SD2_REVISION_NR_H__ From 0017e68cf0728f0d827fef68cf36dc13e19bf6d5 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Sun, 5 Jun 2011 13:19:43 +0200 Subject: [PATCH 0175/1172] [2195] Use EntryGuidMap-Storage in Pit of Saron --- .../pit_of_saron/instance_pit_of_saron.cpp | 61 ++++++------------- .../frozen_halls/pit_of_saron/pit_of_saron.h | 17 +----- sd2_revision_nr.h | 2 +- 3 files changed, 22 insertions(+), 58 deletions(-) diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/instance_pit_of_saron.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/instance_pit_of_saron.cpp index 65b05855e..098455060 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/instance_pit_of_saron.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/instance_pit_of_saron.cpp @@ -24,15 +24,7 @@ EndScriptData */ #include "precompiled.h" #include "pit_of_saron.h" -instance_pit_of_saron::instance_pit_of_saron(Map* pMap) : ScriptedInstance(pMap), - m_uiTyrannusIntroGUID(0), - m_uiGarfrostGUID(0), - m_uiKrickGUID(0), - m_uiIckGUID(0), - m_uiTyrannusGUID(0), - m_uiRimefangGUID(0), - m_uiIcewallGUID(0), - m_uiHallsPortGUID(0) +instance_pit_of_saron::instance_pit_of_saron(Map* pMap) : ScriptedInstance(pMap) { Initialize(); } @@ -46,12 +38,14 @@ void instance_pit_of_saron::OnCreatureCreate(Creature* pCreature) { switch(pCreature->GetEntry()) { - case NPC_TYRANNUS_INTRO: m_uiTyrannusIntroGUID = pCreature->GetGUID(); break; - case NPC_GARFROST: m_uiGarfrostGUID = pCreature->GetGUID(); break; - case NPC_KRICK: m_uiKrickGUID = pCreature->GetGUID(); break; - case NPC_ICK: m_uiIckGUID = pCreature->GetGUID(); break; - case NPC_TYRANNUS: m_uiTyrannusGUID = pCreature->GetGUID(); break; - case NPC_RIMEFANG: m_uiRimefangGUID = pCreature->GetGUID(); break; + case NPC_TYRANNUS_INTRO: + case NPC_GARFROST: + case NPC_KRICK: + case NPC_ICK: + case NPC_TYRANNUS: + case NPC_RIMEFANG: + m_mNpcEntryGuidStore[pCreature->GetEntry()] = pCreature->GetObjectGuid(); + break; } } @@ -60,14 +54,16 @@ void instance_pit_of_saron::OnObjectCreate(GameObject* pGo) switch(pGo->GetEntry()) { case GO_ICEWALL: - m_uiIcewallGUID = pGo->GetGUID(); if (m_auiEncounter[TYPE_GARFROST] == DONE && m_auiEncounter[TYPE_KRICK] == DONE) pGo->SetGoState(GO_STATE_ACTIVE); break; case GO_HALLS_OF_REFLECT_PORT: - m_uiHallsPortGUID = pGo->GetGUID(); break; + + default: + return; } + m_mGoEntryGuidStore[pGo->GetEntry()] = pGo->GetObjectGuid(); } void instance_pit_of_saron::SetData(uint32 uiType, uint32 uiData) @@ -76,12 +72,12 @@ void instance_pit_of_saron::SetData(uint32 uiType, uint32 uiData) { case TYPE_GARFROST: if (uiData == DONE && m_auiEncounter[TYPE_KRICK] == DONE) - DoUseDoorOrButton(m_uiIcewallGUID); + DoUseDoorOrButton(GO_ICEWALL); m_auiEncounter[uiType] = uiData; break; case TYPE_KRICK: if (uiData == DONE && m_auiEncounter[TYPE_GARFROST] == DONE) - DoUseDoorOrButton(m_uiIcewallGUID); + DoUseDoorOrButton(GO_ICEWALL); m_auiEncounter[uiType] = uiData; break; case TYPE_TYRANNUS: @@ -98,7 +94,7 @@ void instance_pit_of_saron::SetData(uint32 uiType, uint32 uiData) std::ostringstream saveStream; saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2]; - strInstData = saveStream.str(); + m_strInstData = saveStream.str(); SaveToDB(); OUT_SAVE_INST_DATA_COMPLETE; @@ -129,29 +125,10 @@ void instance_pit_of_saron::Load(const char* chrIn) uint32 instance_pit_of_saron::GetData(uint32 uiType) { - switch(uiType) - { - case TYPE_GARFROST: return m_auiEncounter[uiType]; - case TYPE_KRICK: return m_auiEncounter[uiType]; - case TYPE_TYRANNUS: return m_auiEncounter[uiType]; - default: - return 0; - } -} + if (uiType < MAX_ENCOUNTER) + return m_auiEncounter[uiType]; -uint64 instance_pit_of_saron::GetData64(uint32 uiData) -{ - switch(uiData) - { - case NPC_TYRANNUS_INTRO: return m_uiTyrannusIntroGUID; - case NPC_GARFROST: return m_uiGarfrostGUID; - case NPC_KRICK: return m_uiKrickGUID; - case NPC_ICK: return m_uiIckGUID; - case NPC_TYRANNUS: return m_uiTyrannusGUID; - case NPC_RIMEFANG: return m_uiRimefangGUID; - default: - return 0; - } + return 0; } InstanceData* GetInstanceData_instance_pit_of_saron(Map* pMap) diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/pit_of_saron.h b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/pit_of_saron.h index aaab104a5..8ab87c3db 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/pit_of_saron.h +++ b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/pit_of_saron.h @@ -51,26 +51,13 @@ class MANGOS_DLL_DECL instance_pit_of_saron : public ScriptedInstance void SetData(uint32 uiType, uint32 uiData); uint32 GetData(uint32 uiType); - uint64 GetData64(uint32 uiData); - const char* Save() { return strInstData.c_str(); } + const char* Save() { return m_strInstData.c_str(); } void Load(const char* chrIn); protected: uint32 m_auiEncounter[MAX_ENCOUNTER]; - std::string strInstData; - - // Creature GUIDs - uint64 m_uiTyrannusIntroGUID; - uint64 m_uiGarfrostGUID; - uint64 m_uiKrickGUID; - uint64 m_uiIckGUID; - uint64 m_uiTyrannusGUID; - uint64 m_uiRimefangGUID; - - // GameObject GUIDs - uint64 m_uiIcewallGUID; - uint64 m_uiHallsPortGUID; + std::string m_strInstData; }; #endif diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index d6c89924e..b2eede7ca 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2194" + #define SD2_REVISION_NR "2195" #endif // __SD2_REVISION_NR_H__ From 816d69cb0473d25404baf569dde2a76b52f37b65 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Sun, 5 Jun 2011 14:03:47 +0200 Subject: [PATCH 0176/1172] [2196] Use EntryGuidMap-Storage in Nexus * Also move Nexus instance script to header version * Also fix forgotten GetData64 -> GetSingle convertion in Gundrak.. --- scripts/northrend/gundrak/boss_sladran.cpp | 2 +- .../northrend/nexus/nexus/boss_anomalus.cpp | 18 +- .../northrend/nexus/nexus/instance_nexus.cpp | 275 +++++++----------- scripts/northrend/nexus/nexus/nexus.h | 25 +- sd2_revision_nr.h | 2 +- 5 files changed, 142 insertions(+), 180 deletions(-) diff --git a/scripts/northrend/gundrak/boss_sladran.cpp b/scripts/northrend/gundrak/boss_sladran.cpp index d10ef4ab3..e1f38624f 100644 --- a/scripts/northrend/gundrak/boss_sladran.cpp +++ b/scripts/northrend/gundrak/boss_sladran.cpp @@ -78,7 +78,7 @@ struct MANGOS_DLL_DECL mob_sladran_summon_targetAI : public ScriptedAI if (!m_pInstance) return; - if (Creature* pSladran = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(NPC_SLADRAN))) + if (Creature* pSladran = m_pInstance->GetSingleCreatureFromStorage(NPC_SLADRAN)) { float fPosX, fPosY, fPosZ; pSladran->GetPosition(fPosX, fPosY, fPosZ); diff --git a/scripts/northrend/nexus/nexus/boss_anomalus.cpp b/scripts/northrend/nexus/nexus/boss_anomalus.cpp index 6e9c16946..9b45f7769 100644 --- a/scripts/northrend/nexus/nexus/boss_anomalus.cpp +++ b/scripts/northrend/nexus/nexus/boss_anomalus.cpp @@ -75,14 +75,14 @@ struct MANGOS_DLL_DECL boss_anomalusAI : public ScriptedAI bool m_bChaoticRift; uint32 m_uiSparkTimer; uint32 m_uiCreateRiftTimer; - uint64 m_uiChaoticRiftGUID; + ObjectGuid m_chaoticRiftGuid; void Reset() { m_bChaoticRift = false; m_uiSparkTimer = 5000; m_uiCreateRiftTimer = 25000; - m_uiChaoticRiftGUID = 0; + m_chaoticRiftGuid.Clear(); } void Aggro(Unit* pWho) @@ -108,6 +108,8 @@ struct MANGOS_DLL_DECL boss_anomalusAI : public ScriptedAI { if (pSummoned->GetEntry() == NPC_CHAOTIC_RIFT) { + m_chaoticRiftGuid = pSummoned->GetObjectGuid(); + DoScriptText(SAY_RIFT, m_creature); if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) @@ -117,25 +119,23 @@ struct MANGOS_DLL_DECL boss_anomalusAI : public ScriptedAI void SummonedCreatureDespawn(Creature* pSummoned) { - if (pSummoned->GetGUID() == m_uiChaoticRiftGUID) + if (pSummoned->GetObjectGuid() == m_chaoticRiftGuid) { if (m_creature->HasAura(SPELL_RIFT_SHIELD)) m_creature->RemoveAurasDueToSpell(SPELL_RIFT_SHIELD); - m_uiChaoticRiftGUID = 0; + m_chaoticRiftGuid.Clear(); } } - uint64 CreateRiftAtRandomPoint() + void CreateRiftAtRandomPoint() { float fPosX, fPosY, fPosZ; m_creature->GetPosition(fPosX, fPosY, fPosZ); m_creature->GetRandomPoint(fPosX, fPosY, fPosZ, urand(15, 25), fPosX, fPosY, fPosZ); - Creature* pRift = m_creature->SummonCreature(NPC_CHAOTIC_RIFT, fPosX, fPosY, fPosZ, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 1000); + m_creature->SummonCreature(NPC_CHAOTIC_RIFT, fPosX, fPosY, fPosZ, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 10000); DoScriptText(EMOTE_OPEN_RIFT, m_creature); - - return pRift?pRift->GetGUID():0; } void UpdateAI(const uint32 uiDiff) @@ -147,7 +147,7 @@ struct MANGOS_DLL_DECL boss_anomalusAI : public ScriptedAI if (!m_bChaoticRift && m_creature->GetHealthPercent() < 50.0f) { DoScriptText(EMOTE_SHIELD, m_creature); - m_uiChaoticRiftGUID = CreateRiftAtRandomPoint(); + CreateRiftAtRandomPoint(); DoScriptText(SAY_SHIELD, m_creature); DoCastSpellIfCan(m_creature, SPELL_RIFT_SHIELD); diff --git a/scripts/northrend/nexus/nexus/instance_nexus.cpp b/scripts/northrend/nexus/nexus/instance_nexus.cpp index e6abc441d..d5c6bc6aa 100644 --- a/scripts/northrend/nexus/nexus/instance_nexus.cpp +++ b/scripts/northrend/nexus/nexus/instance_nexus.cpp @@ -42,197 +42,136 @@ bool GOUse_go_containment_sphere(Player* pPlayer, GameObject* pGo) return false; } -struct MANGOS_DLL_DECL instance_nexus : public ScriptedInstance +instance_nexus::instance_nexus(Map* pMap) : ScriptedInstance(pMap) { - instance_nexus(Map* pMap) : ScriptedInstance(pMap) {Initialize();}; - - uint32 m_auiEncounter[MAX_ENCOUNTER]; - std::string strInstData; - - uint64 m_uiAnomalusGUID; - uint64 m_uiKeristrazaGUID; + Initialize(); +} - uint64 m_uiTelestrasContainmentSphereGUID; - uint64 m_uiAnomalusContainmentSphereGUID; - uint64 m_uiOrmoroksContainmentSphereGUID; +void instance_nexus::Initialize() +{ + memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); +} - void Initialize() +void instance_nexus::OnObjectCreate(GameObject* pGo) +{ + switch (pGo->GetEntry()) { - memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); - - m_uiAnomalusGUID = 0; - m_uiKeristrazaGUID = 0; - - m_uiTelestrasContainmentSphereGUID = 0; - m_uiAnomalusContainmentSphereGUID = 0; - m_uiOrmoroksContainmentSphereGUID = 0; + case GO_CONTAINMENT_SPHERE_TELESTRA: + if (m_auiEncounter[TYPE_TELESTRA] == DONE) + pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NO_INTERACT); + break; + case GO_CONTAINMENT_SPHERE_ANOMALUS: + if (m_auiEncounter[TYPE_ANOMALUS] == DONE) + pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NO_INTERACT); + break; + case GO_CONTAINMENT_SPHERE_ORMOROK: + if (m_auiEncounter[TYPE_ORMOROK] == DONE) + pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NO_INTERACT); + break; + + default: + return; } + m_mGoEntryGuidStore[pGo->GetEntry()] = pGo->GetObjectGuid(); +} - bool IsEncounterInProgress() const - { - for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) - { - if (m_auiEncounter[i] == IN_PROGRESS) - return true; - } +void instance_nexus::OnCreatureCreate(Creature* pCreature) +{ + if (pCreature->GetEntry() == NPC_KERISTRASZA) + m_mNpcEntryGuidStore[NPC_KERISTRASZA] = pCreature->GetObjectGuid(); +} - return false; - } +uint32 instance_nexus::GetData(uint32 uiType) +{ + if (uiType < MAX_ENCOUNTER) + return m_auiEncounter[uiType]; + + return 0; +} - void OnObjectCreate(GameObject* pGo) +void instance_nexus::SetData(uint32 uiType, uint32 uiData) +{ + switch (uiType) { - switch(pGo->GetEntry()) - { - case GO_CONTAINMENT_SPHERE_TELESTRA: - m_uiTelestrasContainmentSphereGUID = pGo->GetGUID(); - if (m_auiEncounter[0] == DONE) + case TYPE_TELESTRA: + m_auiEncounter[uiType] = uiData; + if (uiData == DONE) + { + if (GameObject* pGo = GetSingleGameObjectFromStorage(GO_CONTAINMENT_SPHERE_TELESTRA)) pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NO_INTERACT); - break; - case GO_CONTAINMENT_SPHERE_ANOMALUS: - m_uiAnomalusContainmentSphereGUID = pGo->GetGUID(); - if (m_auiEncounter[1] == DONE) + } + break; + case TYPE_ANOMALUS: + m_auiEncounter[uiType] = uiData; + if (uiData == DONE) + { + if (GameObject* pGo = GetSingleGameObjectFromStorage(GO_CONTAINMENT_SPHERE_ANOMALUS)) pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NO_INTERACT); - break; - case GO_CONTAINMENT_SPHERE_ORMOROK: - m_uiOrmoroksContainmentSphereGUID = pGo->GetGUID(); - if (m_auiEncounter[2] == DONE) + } + break; + case TYPE_ORMOROK: + m_auiEncounter[uiType] = uiData; + if (uiData == DONE) + { + if (GameObject* pGo = GetSingleGameObjectFromStorage(GO_CONTAINMENT_SPHERE_ORMOROK)) pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NO_INTERACT); - break; - } - } - - void OnCreatureCreate(Creature* pCreature) - { - switch(pCreature->GetEntry()) - { - case NPC_ANOMALUS: - m_uiAnomalusGUID = pCreature->GetGUID(); - break; - case NPC_KERISTRASZA: - m_uiKeristrazaGUID = pCreature->GetGUID(); - break; - } + } + break; + case TYPE_KERISTRASZA: + m_auiEncounter[uiType] = uiData; + break; + default: + error_log("SD2: Instance Nexus: ERROR SetData = %u for type %u does not exist/not implemented.", uiType, uiData); + return; } - uint64 GetData64(uint32 uiType) + if (m_auiEncounter[TYPE_TELESTRA] == SPECIAL && m_auiEncounter[TYPE_ANOMALUS] == SPECIAL && m_auiEncounter[TYPE_ORMOROK] == SPECIAL) { - switch(uiType) - { - case NPC_ANOMALUS: - return m_uiAnomalusGUID; - } + // release Keristrasza from her prison here + m_auiEncounter[TYPE_KERISTRASZA] = SPECIAL; - return 0; - } - - uint32 GetData(uint32 uiType) - { - switch(uiType) + if (Creature* pCreature = GetSingleCreatureFromStorage(NPC_KERISTRASZA)) { - case TYPE_TELESTRA: - return m_auiEncounter[0]; - case TYPE_ANOMALUS: - return m_auiEncounter[1]; - case TYPE_ORMOROK: - return m_auiEncounter[2]; - case TYPE_KERISTRASZA: - return m_auiEncounter[3]; + if (pCreature->isAlive()) + pCreature->RemoveAurasDueToSpell(SPELL_FROZEN_PRISON); } - - return 0; } - void SetData(uint32 uiType, uint32 uiData) + if (uiData == DONE) { - debug_log("SD2: Instance Nexus: SetData received for type %u with data %u", uiType, uiData); + OUT_SAVE_INST_DATA; - switch(uiType) - { - case TYPE_TELESTRA: - m_auiEncounter[0] = uiData; - if (uiData == DONE) - { - if (GameObject* pGo = instance->GetGameObject(m_uiTelestrasContainmentSphereGUID)) - pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NO_INTERACT); - } - break; - case TYPE_ANOMALUS: - m_auiEncounter[1] = uiData; - if (uiData == DONE) - { - if (GameObject* pGo = instance->GetGameObject(m_uiAnomalusContainmentSphereGUID)) - pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NO_INTERACT); - } - break; - case TYPE_ORMOROK: - m_auiEncounter[2] = uiData; - if (uiData == DONE) - { - if (GameObject* pGo = instance->GetGameObject(m_uiOrmoroksContainmentSphereGUID)) - pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NO_INTERACT); - } - break; - case TYPE_KERISTRASZA: - m_auiEncounter[3] = uiData; - break; - default: - error_log("SD2: Instance Nexus: ERROR SetData = %u for type %u does not exist/not implemented.", uiType, uiData); - break; - } - - if (m_auiEncounter[0] == SPECIAL && m_auiEncounter[1] == SPECIAL && m_auiEncounter[2] == SPECIAL) - { - // release Keristrasza from her prison here - m_auiEncounter[3] = SPECIAL; - - if (Creature* pCreature = instance->GetCreature(m_uiKeristrazaGUID)) - { - if (pCreature->isAlive()) - pCreature->RemoveAurasDueToSpell(SPELL_FROZEN_PRISON); - } - } + std::ostringstream saveStream; + saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2] << " " << m_auiEncounter[3]; - if (uiData == DONE) - { - OUT_SAVE_INST_DATA; + m_strInstData = saveStream.str(); - std::ostringstream saveStream; - saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2] << " " << m_auiEncounter[3]; - - strInstData = saveStream.str(); - - SaveToDB(); - OUT_SAVE_INST_DATA_COMPLETE; - } + SaveToDB(); + OUT_SAVE_INST_DATA_COMPLETE; } +} - const char* Save() +void instance_nexus::Load(const char* chrIn) +{ + if (!chrIn) { - return strInstData.c_str(); + OUT_LOAD_INST_DATA_FAIL; + return; } - void Load(const char* chrIn) - { - if (!chrIn) - { - OUT_LOAD_INST_DATA_FAIL; - return; - } - - OUT_LOAD_INST_DATA(chrIn); + OUT_LOAD_INST_DATA(chrIn); - std::istringstream loadStream(chrIn); - loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3]; - - for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) - { - if (m_auiEncounter[i] == IN_PROGRESS) - m_auiEncounter[i] = NOT_STARTED; - } + std::istringstream loadStream(chrIn); + loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3]; - OUT_LOAD_INST_DATA_COMPLETE; + for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) + { + if (m_auiEncounter[i] == IN_PROGRESS) + m_auiEncounter[i] = NOT_STARTED; } -}; + + OUT_LOAD_INST_DATA_COMPLETE; +} InstanceData* GetInstanceData_instance_nexus(Map* pMap) { @@ -241,15 +180,15 @@ InstanceData* GetInstanceData_instance_nexus(Map* pMap) void AddSC_instance_nexus() { - Script* newscript; + Script* pNewScript; - newscript = new Script; - newscript->Name = "instance_nexus"; - newscript->GetInstanceData = &GetInstanceData_instance_nexus; - newscript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "instance_nexus"; + pNewScript->GetInstanceData = &GetInstanceData_instance_nexus; + pNewScript->RegisterSelf(); - newscript = new Script; - newscript->Name = "go_containment_sphere"; - newscript->pGOUse = &GOUse_go_containment_sphere; - newscript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "go_containment_sphere"; + pNewScript->pGOUse = &GOUse_go_containment_sphere; + pNewScript->RegisterSelf(); } diff --git a/scripts/northrend/nexus/nexus/nexus.h b/scripts/northrend/nexus/nexus/nexus.h index 35876a507..d66240ff5 100644 --- a/scripts/northrend/nexus/nexus/nexus.h +++ b/scripts/northrend/nexus/nexus/nexus.h @@ -23,6 +23,29 @@ enum GO_CONTAINMENT_SPHERE_ANOMALUS = 188527, GO_CONTAINMENT_SPHERE_ORMOROK = 188528, - SPELL_FROZEN_PRISON = 47854 // may not be correct spell + SPELL_FROZEN_PRISON = 47854, // may not be correct spell }; + +class MANGOS_DLL_DECL instance_nexus : public ScriptedInstance +{ + public: + instance_nexus(Map* pMap); + + void Initialize(); + + void OnObjectCreate(GameObject* pGo); + void OnCreatureCreate(Creature* pCreature); + + uint32 GetData(uint32 uiType); + void SetData(uint32 uiType, uint32 uiData); + + const char* Save() { return m_strInstData.c_str(); } + + void Load(const char* chrIn); + + private: + uint32 m_auiEncounter[MAX_ENCOUNTER]; + std::string m_strInstData; +}; + #endif diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index b2eede7ca..e54b8d08a 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2195" + #define SD2_REVISION_NR "2196" #endif // __SD2_REVISION_NR_H__ From e6ba84cb47cdfcf8c665cea8de7188f90c25c16c Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Sun, 5 Jun 2011 14:14:47 +0200 Subject: [PATCH 0177/1172] [2197] Use EntryGuidMap-Storage in Obsidian Sanctum --- .../obsidian_sanctum/boss_sartharion.cpp | 18 +++++------ .../instance_obsidian_sanctum.cpp | 31 ++----------------- .../obsidian_sanctum/obsidian_sanctum.h | 5 --- sd2_revision_nr.h | 2 +- 4 files changed, 13 insertions(+), 43 deletions(-) diff --git a/scripts/northrend/obsidian_sanctum/boss_sartharion.cpp b/scripts/northrend/obsidian_sanctum/boss_sartharion.cpp index 829b05408..c87ba587c 100644 --- a/scripts/northrend/obsidian_sanctum/boss_sartharion.cpp +++ b/scripts/northrend/obsidian_sanctum/boss_sartharion.cpp @@ -255,9 +255,9 @@ struct MANGOS_DLL_DECL boss_sartharionAI : public ScriptedAI void FetchDragons() { - Creature* pTene = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(NPC_TENEBRON)); - Creature* pShad = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(NPC_SHADRON)); - Creature* pVesp = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(NPC_VESPERON)); + Creature* pTene = m_pInstance->GetSingleCreatureFromStorage(NPC_TENEBRON); + Creature* pShad = m_pInstance->GetSingleCreatureFromStorage(NPC_SHADRON); + Creature* pVesp = m_pInstance->GetSingleCreatureFromStorage(NPC_VESPERON); //if at least one of the dragons are alive and are being called uint8 uiCountFetchableDragons = 0; @@ -299,7 +299,7 @@ struct MANGOS_DLL_DECL boss_sartharionAI : public ScriptedAI { if (m_pInstance) { - Creature* pTemp = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(uiEntry)); + Creature* pTemp = m_pInstance->GetSingleCreatureFromStorage(uiEntry); if (pTemp && pTemp->isAlive() && !pTemp->getVictim()) { @@ -689,10 +689,10 @@ struct MANGOS_DLL_DECL dummy_dragonAI : public ScriptedAI return; // Twilight Revenge to main boss - if (Creature* pSartharion = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(NPC_SARTHARION))) + if (Creature* pSartharion = m_pInstance->GetSingleCreatureFromStorage(NPC_SARTHARION)) { if (pSartharion->isAlive()) - m_creature->CastSpell(pSartharion,SPELL_TWILIGHT_REVENGE,true); + m_creature->CastSpell(pSartharion, SPELL_TWILIGHT_REVENGE, true); } } } @@ -963,7 +963,7 @@ struct MANGOS_DLL_DECL mob_acolyte_of_shadronAI : public ScriptedAI if (m_pInstance->GetData(TYPE_SARTHARION_EVENT) == IN_PROGRESS) { //not solo fight, so main boss has deduff - pDebuffTarget = m_pInstance->instance->GetCreature(m_pInstance->GetData64(NPC_SARTHARION)); + pDebuffTarget = m_pInstance->GetSingleCreatureFromStorage(NPC_SARTHARION); if (pDebuffTarget && pDebuffTarget->isAlive() && pDebuffTarget->HasAura(SPELL_GIFT_OF_TWILIGTH_SAR)) pDebuffTarget->RemoveAurasDueToSpell(SPELL_GIFT_OF_TWILIGTH_SAR); @@ -971,7 +971,7 @@ struct MANGOS_DLL_DECL mob_acolyte_of_shadronAI : public ScriptedAI else { //event not in progress, then solo fight and must remove debuff mini-boss - pDebuffTarget = m_pInstance->instance->GetCreature(m_pInstance->GetData64(NPC_SHADRON)); + pDebuffTarget = m_pInstance->GetSingleCreatureFromStorage(NPC_SHADRON); if (pDebuffTarget && pDebuffTarget->isAlive() && pDebuffTarget->HasAura(SPELL_GIFT_OF_TWILIGTH_SHA)) pDebuffTarget->RemoveAurasDueToSpell(SPELL_GIFT_OF_TWILIGTH_SHA); @@ -1017,7 +1017,7 @@ struct MANGOS_DLL_DECL mob_acolyte_of_vesperonAI : public ScriptedAI // remove twilight torment on Vesperon if (m_pInstance) { - Creature* pVesperon = m_pInstance->instance->GetCreature(m_pInstance->GetData64(NPC_VESPERON)); + Creature* pVesperon = m_pInstance->GetSingleCreatureFromStorage(NPC_VESPERON); if (pVesperon && pVesperon->isAlive() && pVesperon->HasAura(SPELL_TWILIGHT_TORMENT_VESP)) pVesperon->RemoveAurasDueToSpell(SPELL_TWILIGHT_TORMENT_VESP); diff --git a/scripts/northrend/obsidian_sanctum/instance_obsidian_sanctum.cpp b/scripts/northrend/obsidian_sanctum/instance_obsidian_sanctum.cpp index 0da011f09..f2a388285 100644 --- a/scripts/northrend/obsidian_sanctum/instance_obsidian_sanctum.cpp +++ b/scripts/northrend/obsidian_sanctum/instance_obsidian_sanctum.cpp @@ -29,11 +29,7 @@ EndScriptData */ */ instance_obsidian_sanctum::instance_obsidian_sanctum(Map* pMap) : ScriptedInstance(pMap), - m_uiAliveDragons(0), - m_uiSartharionGUID(0), - m_uiTenebronGUID(0), - m_uiShadronGUID(0), - m_uiVesperonGUID(0) + m_uiAliveDragons(0) { Initialize(); } @@ -47,22 +43,14 @@ void instance_obsidian_sanctum::OnCreatureCreate(Creature* pCreature) { switch(pCreature->GetEntry()) { - case NPC_SARTHARION: - m_uiSartharionGUID = pCreature->GetGUID(); - break; // The three dragons below set to active state once created. // We must expect bigger raid to encounter main boss, and then three dragons must be active due to grid differences case NPC_TENEBRON: - m_uiTenebronGUID = pCreature->GetGUID(); - pCreature->SetActiveObjectState(true); - break; case NPC_SHADRON: - m_uiShadronGUID = pCreature->GetGUID(); - pCreature->SetActiveObjectState(true); - break; case NPC_VESPERON: - m_uiVesperonGUID = pCreature->GetGUID(); pCreature->SetActiveObjectState(true); + case NPC_SARTHARION: + m_mNpcEntryGuidStore[pCreature->GetEntry()] = pCreature->GetObjectGuid(); break; } } @@ -85,19 +73,6 @@ uint32 instance_obsidian_sanctum::GetData(uint32 uiType) return 0; } -uint64 instance_obsidian_sanctum::GetData64(uint32 uiData) -{ - switch(uiData) - { - case NPC_SARTHARION: return m_uiSartharionGUID; - case NPC_TENEBRON: return m_uiTenebronGUID; - case NPC_SHADRON: return m_uiShadronGUID; - case NPC_VESPERON: return m_uiVesperonGUID; - default: - return 0; - } -} - bool instance_obsidian_sanctum::CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/) { switch (uiCriteriaId) diff --git a/scripts/northrend/obsidian_sanctum/obsidian_sanctum.h b/scripts/northrend/obsidian_sanctum/obsidian_sanctum.h index 376da68a0..1e5527a28 100644 --- a/scripts/northrend/obsidian_sanctum/obsidian_sanctum.h +++ b/scripts/northrend/obsidian_sanctum/obsidian_sanctum.h @@ -42,16 +42,11 @@ class MANGOS_DLL_DECL instance_obsidian_sanctum : public ScriptedInstance void SetData(uint32 uiType, uint32 uiData); uint32 GetData(uint32 uiType); - uint64 GetData64(uint32 uiData); bool CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/); private: uint32 m_auiEncounter[MAX_ENCOUNTER]; - uint64 m_uiSartharionGUID; - uint64 m_uiTenebronGUID; - uint64 m_uiShadronGUID; - uint64 m_uiVesperonGUID; uint8 m_uiAliveDragons; }; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index e54b8d08a..770890f4f 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2196" + #define SD2_REVISION_NR "2197" #endif // __SD2_REVISION_NR_H__ From 8441a29c3aea4461d2ff60049ad4fd3e15baaa10 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Sun, 5 Jun 2011 14:31:53 +0200 Subject: [PATCH 0178/1172] [2198] Use EntryGuidMap-Storage in Halls of Lightning, also move to header version --- .../halls_of_lightning/boss_bjarngrim.cpp | 4 +- .../ulduar/halls_of_lightning/boss_ionar.cpp | 2 +- .../halls_of_lightning/halls_of_lightning.h | 34 ++- .../instance_halls_of_lightning.cpp | 263 +++++++----------- sd2_revision_nr.h | 2 +- 5 files changed, 131 insertions(+), 174 deletions(-) diff --git a/scripts/northrend/ulduar/halls_of_lightning/boss_bjarngrim.cpp b/scripts/northrend/ulduar/halls_of_lightning/boss_bjarngrim.cpp index 6e1d503ae..a420adf23 100644 --- a/scripts/northrend/ulduar/halls_of_lightning/boss_bjarngrim.cpp +++ b/scripts/northrend/ulduar/halls_of_lightning/boss_bjarngrim.cpp @@ -344,7 +344,7 @@ struct MANGOS_DLL_DECL mob_stormforged_lieutenantAI : public ScriptedAI { if (m_pInstance) { - if (Creature* pBjarngrim = m_pInstance->instance->GetCreature(m_pInstance->GetData64(DATA_BJARNGRIM))) + if (Creature* pBjarngrim = m_pInstance->GetSingleCreatureFromStorage(NPC_BJARNGRIM)) { if (pBjarngrim->isAlive() && !pBjarngrim->getVictim()) pBjarngrim->AI()->AttackStart(pWho); @@ -370,7 +370,7 @@ struct MANGOS_DLL_DECL mob_stormforged_lieutenantAI : public ScriptedAI { if (m_pInstance) { - if (Creature* pBjarngrim = m_pInstance->instance->GetCreature(m_pInstance->GetData64(DATA_BJARNGRIM))) + if (Creature* pBjarngrim = m_pInstance->GetSingleCreatureFromStorage(NPC_BJARNGRIM)) { if (pBjarngrim->isAlive()) DoCastSpellIfCan(pBjarngrim, m_bIsRegularMode ? SPELL_RENEW_STEEL_N : SPELL_RENEW_STEEL_H); diff --git a/scripts/northrend/ulduar/halls_of_lightning/boss_ionar.cpp b/scripts/northrend/ulduar/halls_of_lightning/boss_ionar.cpp index bb3774976..b37623c0a 100644 --- a/scripts/northrend/ulduar/halls_of_lightning/boss_ionar.cpp +++ b/scripts/northrend/ulduar/halls_of_lightning/boss_ionar.cpp @@ -350,7 +350,7 @@ struct MANGOS_DLL_DECL mob_spark_of_ionarAI : public ScriptedAI if (uiPointId == POINT_CALLBACK) { - if (Creature* pIonar = m_pInstance->instance->GetCreature(m_pInstance->GetData64(DATA_IONAR))) + if (Creature* pIonar = m_pInstance->GetSingleCreatureFromStorage(NPC_IONAR)) { if (!pIonar->isAlive()) { diff --git a/scripts/northrend/ulduar/halls_of_lightning/halls_of_lightning.h b/scripts/northrend/ulduar/halls_of_lightning/halls_of_lightning.h index 1eba693ff..60d6895fd 100644 --- a/scripts/northrend/ulduar/halls_of_lightning/halls_of_lightning.h +++ b/scripts/northrend/ulduar/halls_of_lightning/halls_of_lightning.h @@ -9,15 +9,10 @@ enum { MAX_ENCOUNTER = 4, - DATA_BJARNGRIM = 1, - DATA_IONAR = 2, - DATA_LOKEN = 3, - DATA_VOLKHAN = 4, - - TYPE_BJARNGRIM = 10, - TYPE_IONAR = 11, - TYPE_LOKEN = 12, - TYPE_VOLKHAN = 13, + TYPE_BJARNGRIM = 0, + TYPE_VOLKHAN = 1, + TYPE_IONAR = 2, + TYPE_LOKEN = 3, NPC_BJARNGRIM = 28586, NPC_VOLKHAN = 28587, @@ -30,4 +25,25 @@ enum GO_LOKEN_THRONE = 192654 }; +class MANGOS_DLL_DECL instance_halls_of_lightning : public ScriptedInstance +{ + public: + instance_halls_of_lightning(Map* pMap); + + void Initialize(); + + void OnCreatureCreate(Creature* pCreature); + void OnObjectCreate(GameObject* pGo); + + void SetData(uint32 uiType, uint32 uiData); + uint32 GetData(uint32 uiType); + + const char* Save() { return m_strInstData.c_str(); } + void Load(const char* chrIn); + + private: + uint32 m_auiEncounter[MAX_ENCOUNTER]; + std::string m_strInstData; +}; + #endif diff --git a/scripts/northrend/ulduar/halls_of_lightning/instance_halls_of_lightning.cpp b/scripts/northrend/ulduar/halls_of_lightning/instance_halls_of_lightning.cpp index 6bd600442..5c8269f6c 100644 --- a/scripts/northrend/ulduar/halls_of_lightning/instance_halls_of_lightning.cpp +++ b/scripts/northrend/ulduar/halls_of_lightning/instance_halls_of_lightning.cpp @@ -31,185 +31,125 @@ EndScriptData */ 3 - Loken */ -struct MANGOS_DLL_DECL instance_halls_of_lightning : public ScriptedInstance +instance_halls_of_lightning::instance_halls_of_lightning(Map* pMap) : ScriptedInstance(pMap) { - instance_halls_of_lightning(Map* pMap) : ScriptedInstance(pMap) {Initialize();}; - - uint32 m_auiEncounter[MAX_ENCOUNTER]; - std::string strInstData; - - uint64 m_uiGeneralBjarngrimGUID; - uint64 m_uiIonarGUID; - uint64 m_uiLokenGUID; - uint64 m_uiVolkhanGUID; + Initialize(); +} - uint64 m_uiVolkhanDoorGUID; - uint64 m_uiIonarDoorGUID; - uint64 m_uiLokenDoorGUID; - uint64 m_uiLokenGlobeGUID; +void instance_halls_of_lightning::Initialize() +{ + memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); +} - void Initialize() +void instance_halls_of_lightning::OnCreatureCreate(Creature* pCreature) +{ + switch(pCreature->GetEntry()) { - memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); - - m_uiGeneralBjarngrimGUID = 0; - m_uiVolkhanGUID = 0; - m_uiIonarGUID = 0; - m_uiLokenGUID = 0; - - m_uiVolkhanDoorGUID = 0; - m_uiIonarDoorGUID = 0; - m_uiLokenDoorGUID = 0; - m_uiLokenGlobeGUID = 0; + case NPC_BJARNGRIM: + case NPC_IONAR: + m_mNpcEntryGuidStore[pCreature->GetEntry()] = pCreature->GetObjectGuid(); + break; } +} - void OnCreatureCreate(Creature* pCreature) +void instance_halls_of_lightning::OnObjectCreate(GameObject* pGo) +{ + switch(pGo->GetEntry()) { - switch(pCreature->GetEntry()) - { - case NPC_BJARNGRIM: - m_uiGeneralBjarngrimGUID = pCreature->GetGUID(); - break; - case NPC_VOLKHAN: - m_uiVolkhanGUID = pCreature->GetGUID(); - break; - case NPC_IONAR: - m_uiIonarGUID = pCreature->GetGUID(); - break; - case NPC_LOKEN: - m_uiLokenGUID = pCreature->GetGUID(); - break; - } + case GO_VOLKHAN_DOOR: + if (m_auiEncounter[TYPE_VOLKHAN] == DONE) + pGo->SetGoState(GO_STATE_ACTIVE); + break; + case GO_IONAR_DOOR: + if (m_auiEncounter[TYPE_IONAR] == DONE) + pGo->SetGoState(GO_STATE_ACTIVE); + break; + case GO_LOKEN_DOOR: + if (m_auiEncounter[TYPE_LOKEN] == DONE) + pGo->SetGoState(GO_STATE_ACTIVE); + break; + case GO_LOKEN_THRONE: + break; + + default: + return; } + m_mGoEntryGuidStore[pGo->GetEntry()] = pGo->GetObjectGuid(); +} - void OnObjectCreate(GameObject* pGo) +void instance_halls_of_lightning::SetData(uint32 uiType, uint32 uiData) +{ + switch(uiType) { - switch(pGo->GetEntry()) - { - case GO_VOLKHAN_DOOR: - m_uiVolkhanDoorGUID = pGo->GetGUID(); - if (m_auiEncounter[1] == DONE) - pGo->SetGoState(GO_STATE_ACTIVE); - break; - case GO_IONAR_DOOR: - m_uiIonarDoorGUID = pGo->GetGUID(); - if (m_auiEncounter[2] == DONE) - pGo->SetGoState(GO_STATE_ACTIVE); - break; - case GO_LOKEN_DOOR: - m_uiLokenDoorGUID = pGo->GetGUID(); - if (m_auiEncounter[3] == DONE) - pGo->SetGoState(GO_STATE_ACTIVE); - break; - case GO_LOKEN_THRONE: - m_uiLokenGlobeGUID = pGo->GetGUID(); - break; - } + case TYPE_BJARNGRIM: + m_auiEncounter[uiType] = uiData; + break; + case TYPE_VOLKHAN: + if (uiData == DONE) + DoUseDoorOrButton(GO_VOLKHAN_DOOR); + m_auiEncounter[uiType] = uiData; + break; + case TYPE_IONAR: + if (uiData == DONE) + DoUseDoorOrButton(GO_IONAR_DOOR); + m_auiEncounter[uiType] = uiData; + break; + case TYPE_LOKEN: + if (uiData == DONE) + { + DoUseDoorOrButton(GO_LOKEN_DOOR); + + //Appears to be type 5 GO with animation. Need to figure out how this work, code below only placeholder + if (GameObject* pGlobe = GetSingleGameObjectFromStorage(GO_LOKEN_THRONE)) + pGlobe->SetGoState(GO_STATE_ACTIVE); + } + m_auiEncounter[uiType] = uiData; + break; } - void SetData(uint32 uiType, uint32 uiData) + if (uiData == DONE) { - switch(uiType) - { - case TYPE_BJARNGRIM: - m_auiEncounter[0] = uiData; - break; - case TYPE_VOLKHAN: - if (uiData == DONE) - DoUseDoorOrButton(m_uiVolkhanDoorGUID); - m_auiEncounter[1] = uiData; - break; - case TYPE_IONAR: - if (uiData == DONE) - DoUseDoorOrButton(m_uiIonarDoorGUID); - m_auiEncounter[2] = uiData; - break; - case TYPE_LOKEN: - if (uiData == DONE) - { - DoUseDoorOrButton(m_uiLokenDoorGUID); - - //Appears to be type 5 GO with animation. Need to figure out how this work, code below only placeholder - if (GameObject* pGlobe = instance->GetGameObject(m_uiLokenGlobeGUID)) - pGlobe->SetGoState(GO_STATE_ACTIVE); - } - m_auiEncounter[3] = uiData; - break; - } - - if (uiData == DONE) - { - OUT_SAVE_INST_DATA; - - std::ostringstream saveStream; - saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2] << " " << m_auiEncounter[3]; - - strInstData = saveStream.str(); - - SaveToDB(); - OUT_SAVE_INST_DATA_COMPLETE; - } - } + OUT_SAVE_INST_DATA; - const char* Save() - { - return strInstData.c_str(); - } + std::ostringstream saveStream; + saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2] << " " << m_auiEncounter[3]; - uint32 GetData(uint32 uiType) - { - switch(uiType) - { - case TYPE_BJARNGRIM: - return m_auiEncounter[0]; - case TYPE_VOLKHAN: - return m_auiEncounter[1]; - case TYPE_IONAR: - return m_auiEncounter[2]; - case TYPE_LOKEN: - return m_auiEncounter[3]; - } - return 0; - } + m_strInstData = saveStream.str(); - uint64 GetData64(uint32 uiData) - { - switch(uiData) - { - case DATA_BJARNGRIM: - return m_uiGeneralBjarngrimGUID; - case DATA_VOLKHAN: - return m_uiVolkhanGUID; - case DATA_IONAR: - return m_uiIonarGUID; - case DATA_LOKEN: - return m_uiLokenGUID; - } - return 0; + SaveToDB(); + OUT_SAVE_INST_DATA_COMPLETE; } +} - void Load(const char* in) - { - if (!in) - { - OUT_LOAD_INST_DATA_FAIL; - return; - } +uint32 instance_halls_of_lightning::GetData(uint32 uiType) +{ + if (uiType < MAX_ENCOUNTER) + return m_auiEncounter[uiType]; + + return 0; +} - OUT_LOAD_INST_DATA(in); +void instance_halls_of_lightning::Load(const char* chrIn) +{ + if (!chrIn) + { + OUT_LOAD_INST_DATA_FAIL; + return; + } - std::istringstream loadStream(in); - loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3]; + OUT_LOAD_INST_DATA(chrIn); - for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) - { - if (m_auiEncounter[i] == IN_PROGRESS) - m_auiEncounter[i] = NOT_STARTED; - } + std::istringstream loadStream(chrIn); + loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3]; - OUT_LOAD_INST_DATA_COMPLETE; + for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) + { + if (m_auiEncounter[i] == IN_PROGRESS) + m_auiEncounter[i] = NOT_STARTED; } -}; + + OUT_LOAD_INST_DATA_COMPLETE; +} InstanceData* GetInstanceData_instance_halls_of_lightning(Map* pMap) { @@ -218,9 +158,10 @@ InstanceData* GetInstanceData_instance_halls_of_lightning(Map* pMap) void AddSC_instance_halls_of_lightning() { - Script *newscript; - newscript = new Script; - newscript->Name = "instance_halls_of_lightning"; - newscript->GetInstanceData = &GetInstanceData_instance_halls_of_lightning; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "instance_halls_of_lightning"; + pNewScript->GetInstanceData = &GetInstanceData_instance_halls_of_lightning; + pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 770890f4f..e7dd66077 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2197" + #define SD2_REVISION_NR "2198" #endif // __SD2_REVISION_NR_H__ From 62b3a02cae12e3bfeb3060fc2fd6da9199c28f85 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Sun, 5 Jun 2011 15:19:53 +0200 Subject: [PATCH 0179/1172] [2199] Use EntryGuidMap-Storage in Utgarde Keep --- .../utgarde_keep/boss_keleseth.cpp | 2 +- .../boss_skarvald_and_dalronn.cpp | 11 ++--- .../utgarde_keep/instance_utgarde_keep.cpp | 48 ++++--------------- .../utgarde_keep/utgarde_keep.cpp | 6 +-- .../utgarde_keep/utgarde_keep/utgarde_keep.h | 12 ----- sd2_revision_nr.h | 2 +- 6 files changed, 20 insertions(+), 61 deletions(-) diff --git a/scripts/northrend/utgarde_keep/utgarde_keep/boss_keleseth.cpp b/scripts/northrend/utgarde_keep/utgarde_keep/boss_keleseth.cpp index 3d12b552c..1b8368660 100644 --- a/scripts/northrend/utgarde_keep/utgarde_keep/boss_keleseth.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_keep/boss_keleseth.cpp @@ -158,7 +158,7 @@ struct MANGOS_DLL_DECL mob_vrykul_skeletonAI : public ScriptedAI if (urand(0, 3)) DoCastSpellIfCan(m_creature->getVictim(), SPELL_DECREPIFY_H); else if (m_pInstance && m_pInstance->GetData(TYPE_KELESETH) == IN_PROGRESS) - if (Creature* pKeleseth = m_pInstance->instance->GetCreature(m_pInstance->GetData64(NPC_KELESETH))) + if (Creature* pKeleseth = m_pInstance->GetSingleCreatureFromStorage(NPC_KELESETH)) DoCastSpellIfCan(pKeleseth, SPELL_BONE_ARMOR); } diff --git a/scripts/northrend/utgarde_keep/utgarde_keep/boss_skarvald_and_dalronn.cpp b/scripts/northrend/utgarde_keep/utgarde_keep/boss_skarvald_and_dalronn.cpp index 5d739590c..57d73162e 100644 --- a/scripts/northrend/utgarde_keep/utgarde_keep/boss_skarvald_and_dalronn.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_keep/boss_skarvald_and_dalronn.cpp @@ -80,20 +80,19 @@ struct MANGOS_DLL_DECL boss_s_and_d_dummyAI : public ScriptedAI { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); - m_uiGhostGUID = 0; Reset(); } ScriptedInstance* m_pInstance; bool m_bIsRegularMode; - uint64 m_uiGhostGUID; + ObjectGuid m_ghostGuid; Creature* GetBuddy() { if (!m_pInstance) return NULL; - return m_pInstance->instance->GetCreature(m_pInstance->GetData64(m_creature->GetEntry() == NPC_DALRONN ? NPC_SKARVALD : NPC_DALRONN)); + return m_pInstance->GetSingleCreatureFromStorage(m_creature->GetEntry() == NPC_DALRONN ? NPC_SKARVALD : NPC_DALRONN); } void Reset() { } @@ -106,7 +105,7 @@ struct MANGOS_DLL_DECL boss_s_and_d_dummyAI : public ScriptedAI pBuddy->Respawn(); } - if (Creature* pGhost = m_creature->GetMap()->GetCreature(m_uiGhostGUID)) + if (Creature* pGhost = m_creature->GetMap()->GetCreature(m_ghostGuid)) { if (pGhost->isAlive()) pGhost->ForcedDespawn(); @@ -131,7 +130,7 @@ struct MANGOS_DLL_DECL boss_s_and_d_dummyAI : public ScriptedAI { // EventAI can probably handle ghosts if (pSummoned->GetEntry() == NPC_DAL_GHOST || pSummoned->GetEntry() == NPC_SKA_GHOST) - m_uiGhostGUID = pSummoned->GetGUID(); + m_ghostGuid = pSummoned->GetObjectGuid(); Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_TOPAGGRO,1); @@ -154,7 +153,7 @@ struct MANGOS_DLL_DECL boss_s_and_d_dummyAI : public ScriptedAI } else { - if (Creature* pGhost = m_creature->GetMap()->GetCreature(m_uiGhostGUID)) + if (Creature* pGhost = m_creature->GetMap()->GetCreature(m_ghostGuid)) pGhost->ForcedDespawn(); pBuddy->SetFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE); diff --git a/scripts/northrend/utgarde_keep/utgarde_keep/instance_utgarde_keep.cpp b/scripts/northrend/utgarde_keep/utgarde_keep/instance_utgarde_keep.cpp index 2fea1f1d3..72c14ace2 100644 --- a/scripts/northrend/utgarde_keep/utgarde_keep/instance_utgarde_keep.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_keep/instance_utgarde_keep.cpp @@ -25,16 +25,6 @@ EndScriptData */ #include "utgarde_keep.h" instance_utgarde_keep::instance_utgarde_keep(Map* pMap) : ScriptedInstance(pMap), - m_uiKelesethGUID(0), - m_uiSkarvaldGUID(0), - m_uiDalronnGUID(0), - - m_uiBellow1GUID(0), - m_uiBellow2GUID(0), - m_uiBellow3GUID(0), - m_uiForgeFire1GUID(0), - m_uiForgeFire2GUID(0), - m_uiForgeFire3GUID(0), m_bKelesethAchievFailed(false) { Initialize(); @@ -49,47 +39,47 @@ void instance_utgarde_keep::OnCreatureCreate(Creature* pCreature) { switch(pCreature->GetEntry()) { - case NPC_KELESETH: m_uiKelesethGUID = pCreature->GetGUID(); break; - case NPC_SKARVALD: m_uiSkarvaldGUID = pCreature->GetGUID(); break; - case NPC_DALRONN: m_uiDalronnGUID = pCreature->GetGUID(); break; + case NPC_KELESETH: + case NPC_SKARVALD: + case NPC_DALRONN: + m_mNpcEntryGuidStore[pCreature->GetEntry()] = pCreature->GetObjectGuid(); + break; } } void instance_utgarde_keep::OnObjectCreate(GameObject* pGo) { - switch(pGo->GetEntry()) + switch (pGo->GetEntry()) { case GO_BELLOW_1: - m_uiBellow1GUID = pGo->GetGUID(); if (m_auiEncounter[TYPE_BELLOW_1] == DONE) pGo->SetGoState(GO_STATE_ACTIVE); break; case GO_BELLOW_2: - m_uiBellow2GUID = pGo->GetGUID(); if (m_auiEncounter[TYPE_BELLOW_2] == DONE) pGo->SetGoState(GO_STATE_ACTIVE); break; case GO_BELLOW_3: - m_uiBellow3GUID = pGo->GetGUID(); if (m_auiEncounter[TYPE_BELLOW_3] == DONE) pGo->SetGoState(GO_STATE_ACTIVE); break; case GO_FORGEFIRE_1: - m_uiForgeFire1GUID = pGo->GetGUID(); if (m_auiEncounter[TYPE_BELLOW_1] == DONE) pGo->SetGoState(GO_STATE_ACTIVE); break; case GO_FORGEFIRE_2: - m_uiForgeFire2GUID = pGo->GetGUID(); if (m_auiEncounter[TYPE_BELLOW_2] == DONE) pGo->SetGoState(GO_STATE_ACTIVE); break; case GO_FORGEFIRE_3: - m_uiForgeFire3GUID = pGo->GetGUID(); if (m_auiEncounter[TYPE_BELLOW_3] == DONE) pGo->SetGoState(GO_STATE_ACTIVE); break; + + default: + return; } + m_mGoEntryGuidStore[pGo->GetEntry()] = pGo->GetObjectGuid(); } void instance_utgarde_keep::OnCreatureDeath(Creature* pCreature) @@ -145,24 +135,6 @@ uint32 instance_utgarde_keep::GetData(uint32 uiType) return 0; } -uint64 instance_utgarde_keep::GetData64(uint32 uiData) -{ - switch(uiData) - { - case NPC_KELESETH: return m_uiKelesethGUID; - case NPC_SKARVALD: return m_uiSkarvaldGUID; - case NPC_DALRONN: return m_uiDalronnGUID; - case GO_BELLOW_1: return m_uiBellow1GUID; - case GO_BELLOW_2: return m_uiBellow2GUID; - case GO_BELLOW_3: return m_uiBellow3GUID; - case GO_FORGEFIRE_1: return m_uiForgeFire1GUID; - case GO_FORGEFIRE_2: return m_uiForgeFire2GUID; - case GO_FORGEFIRE_3: return m_uiForgeFire3GUID; - default: - return 0; - } -} - void instance_utgarde_keep::Load(const char* chrIn) { if (!chrIn) diff --git a/scripts/northrend/utgarde_keep/utgarde_keep/utgarde_keep.cpp b/scripts/northrend/utgarde_keep/utgarde_keep/utgarde_keep.cpp index 9407b0c28..2cd6c332e 100644 --- a/scripts/northrend/utgarde_keep/utgarde_keep/utgarde_keep.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_keep/utgarde_keep.cpp @@ -68,7 +68,7 @@ struct MANGOS_DLL_DECL mob_dragonflayer_forge_masterAI : public ScriptedAI uint32 uiGOBellow = 0; uint32 uiGOFire = 0; - for(uint8 i = 0; i < MAX_FORGE; ++i) + for (uint8 i = 0; i < MAX_FORGE; ++i) { switch(i) { @@ -77,7 +77,7 @@ struct MANGOS_DLL_DECL mob_dragonflayer_forge_masterAI : public ScriptedAI case 2: uiGOBellow = GO_BELLOW_3; break; } - if (GameObject* pGOTemp = m_pInstance->instance->GetGameObject(m_pInstance->GetData64(uiGOBellow))) + if (GameObject* pGOTemp = m_pInstance->GetSingleGameObjectFromStorage(uiGOBellow)) lGOList.push_back(pGOTemp); } @@ -100,7 +100,7 @@ struct MANGOS_DLL_DECL mob_dragonflayer_forge_masterAI : public ScriptedAI case GO_BELLOW_3: uiGOFire = GO_FORGEFIRE_3; m_uiForgeEncounterId = TYPE_BELLOW_3; break; } - if (GameObject* pGOTemp = m_pInstance->instance->GetGameObject(m_pInstance->GetData64(uiGOFire))) + if (GameObject* pGOTemp = m_pInstance->GetSingleGameObjectFromStorage(uiGOFire)) { if (pGOTemp->getLootState() == GO_READY) pGOTemp->UseDoorOrButton(DAY); diff --git a/scripts/northrend/utgarde_keep/utgarde_keep/utgarde_keep.h b/scripts/northrend/utgarde_keep/utgarde_keep/utgarde_keep.h index dec46a9d7..4401019c8 100644 --- a/scripts/northrend/utgarde_keep/utgarde_keep/utgarde_keep.h +++ b/scripts/northrend/utgarde_keep/utgarde_keep/utgarde_keep.h @@ -47,7 +47,6 @@ class MANGOS_DLL_DECL instance_utgarde_keep : public ScriptedInstance void SetData(uint32 uiType, uint32 uiData); uint32 GetData(uint32 uiType); - uint64 GetData64(uint32 uiData); const char* Save() { return m_strInstData.c_str(); } void Load(const char* chrIn); @@ -58,17 +57,6 @@ class MANGOS_DLL_DECL instance_utgarde_keep : public ScriptedInstance uint32 m_auiEncounter[MAX_ENCOUNTER]; std::string m_strInstData; - uint64 m_uiKelesethGUID; - uint64 m_uiSkarvaldGUID; - uint64 m_uiDalronnGUID; - - uint64 m_uiBellow1GUID; - uint64 m_uiBellow2GUID; - uint64 m_uiBellow3GUID; - uint64 m_uiForgeFire1GUID; - uint64 m_uiForgeFire2GUID; - uint64 m_uiForgeFire3GUID; - bool m_bKelesethAchievFailed; }; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index e7dd66077..caa895d55 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2198" + #define SD2_REVISION_NR "2199" #endif // __SD2_REVISION_NR_H__ From 72bd282c6754ece37030220d50212e477bd323e3 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Sun, 5 Jun 2011 15:31:18 +0200 Subject: [PATCH 0180/1172] [2200] Use EntryGuidMap-Storage in Utgarde Pinacle, also move to header version --- .../instance_utgarde_pinnacle.cpp | 175 ++++++++---------- .../utgarde_pinnacle/utgarde_pinnacle.h | 20 ++ sd2_revision_nr.h | 2 +- 3 files changed, 96 insertions(+), 101 deletions(-) diff --git a/scripts/northrend/utgarde_keep/utgarde_pinnacle/instance_utgarde_pinnacle.cpp b/scripts/northrend/utgarde_keep/utgarde_pinnacle/instance_utgarde_pinnacle.cpp index 60dd9145a..03527f02b 100644 --- a/scripts/northrend/utgarde_keep/utgarde_pinnacle/instance_utgarde_pinnacle.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_pinnacle/instance_utgarde_pinnacle.cpp @@ -24,121 +24,96 @@ EndScriptData */ #include "precompiled.h" #include "utgarde_pinnacle.h" -struct MANGOS_DLL_DECL instance_pinnacle : public ScriptedInstance +instance_pinnacle::instance_pinnacle(Map* pMap) : ScriptedInstance(pMap) { - instance_pinnacle(Map* pMap) : ScriptedInstance(pMap) {Initialize();}; - - uint32 m_auiEncounter[MAX_ENCOUNTER]; - std::string strInstData; + Initialize(); +} - uint64 m_uiSkadiDoorGUID; +void instance_pinnacle::Initialize() +{ + memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); +} - void Initialize() +void instance_pinnacle::OnObjectCreate(GameObject* pGo) +{ + switch(pGo->GetEntry()) { - memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); + case GO_DOOR_SKADI: + if (m_auiEncounter[TYPE_SKADI] == DONE) + pGo->SetGoState(GO_STATE_ACTIVE); + m_mGoEntryGuidStore[GO_DOOR_SKADI] = pGo->GetObjectGuid(); + break; + } +} - m_uiSkadiDoorGUID = 0; +void instance_pinnacle::SetData(uint32 uiType, uint32 uiData) +{ + switch (uiType) + { + case TYPE_SVALA: + m_auiEncounter[uiType] = uiData; + break; + case TYPE_GORTOK: + m_auiEncounter[uiType] = uiData; + break; + case TYPE_SKADI: + if (uiData == DONE) + DoUseDoorOrButton(GO_DOOR_SKADI); + + m_auiEncounter[uiType] = uiData; + break; + case TYPE_YMIRON: + m_auiEncounter[uiType] = uiData; + break; + default: + error_log("SD2: Instance Pinnacle: SetData = %u for type %u does not exist/not implemented.", uiType, uiData); + return; } - void OnObjectCreate(GameObject* pGo) + // Saving also SPECIAL for this instance + if (uiData == DONE || uiData == SPECIAL) { - switch(pGo->GetEntry()) - { - case GO_DOOR_SKADI: - m_uiSkadiDoorGUID = pGo->GetGUID(); + OUT_SAVE_INST_DATA; - if (m_auiEncounter[2] == DONE) - pGo->SetGoState(GO_STATE_ACTIVE); + std::ostringstream saveStream; + saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2] << " " << m_auiEncounter[3]; - break; - } - } + m_strInstData = saveStream.str(); - void SetData(uint32 uiType, uint32 uiData) - { - debug_log("SD2: Instance Pinnacle: SetData received for type %u with data %u", uiType, uiData); - - switch(uiType) - { - case TYPE_SVALA: - m_auiEncounter[0] = uiData; - break; - case TYPE_GORTOK: - m_auiEncounter[1] = uiData; - break; - case TYPE_SKADI: - if (uiData == DONE) - DoUseDoorOrButton(m_uiSkadiDoorGUID); - - m_auiEncounter[2] = uiData; - break; - case TYPE_YMIRON: - m_auiEncounter[3] = uiData; - break; - default: - error_log("SD2: Instance Pinnacle: SetData = %u for type %u does not exist/not implemented.", uiType, uiData); - break; - } - - //saving also SPECIAL for this instance - if (uiData == DONE || uiData == SPECIAL) - { - OUT_SAVE_INST_DATA; - - std::ostringstream saveStream; - saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2] << " " << m_auiEncounter[3]; - - strInstData = saveStream.str(); - - SaveToDB(); - OUT_SAVE_INST_DATA_COMPLETE; - } + SaveToDB(); + OUT_SAVE_INST_DATA_COMPLETE; } +} - uint32 GetData(uint32 uiType) - { - switch(uiType) - { - case TYPE_SVALA: - return m_auiEncounter[0]; - case TYPE_GORTOK: - return m_auiEncounter[1]; - case TYPE_SKADI: - return m_auiEncounter[2]; - case TYPE_YMIRON: - return m_auiEncounter[3]; - } - - return 0; - } +uint32 instance_pinnacle::GetData(uint32 uiType) +{ + if (uiType < MAX_ENCOUNTER) + return m_auiEncounter[uiType]; - const char* Save() - { - return strInstData.c_str(); - } + return 0; +} - void Load(const char* chrIn) +void instance_pinnacle::Load(const char* chrIn) +{ + if (!chrIn) { - if (!chrIn) - { - OUT_LOAD_INST_DATA_FAIL; - return; - } - - OUT_LOAD_INST_DATA(chrIn); + OUT_LOAD_INST_DATA_FAIL; + return; + } - std::istringstream loadStream(chrIn); - loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3]; + OUT_LOAD_INST_DATA(chrIn); - for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) - { - if (m_auiEncounter[i] == IN_PROGRESS) - m_auiEncounter[i] = NOT_STARTED; - } + std::istringstream loadStream(chrIn); + loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3]; - OUT_LOAD_INST_DATA_COMPLETE; + for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) + { + if (m_auiEncounter[i] == IN_PROGRESS) + m_auiEncounter[i] = NOT_STARTED; } -}; + + OUT_LOAD_INST_DATA_COMPLETE; +} InstanceData* GetInstanceData_instance_pinnacle(Map* pMap) { @@ -147,10 +122,10 @@ InstanceData* GetInstanceData_instance_pinnacle(Map* pMap) void AddSC_instance_pinnacle() { - Script* newscript; + Script* pNewScript; - newscript = new Script; - newscript->Name = "instance_pinnacle"; - newscript->GetInstanceData = &GetInstanceData_instance_pinnacle; - newscript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "instance_pinnacle"; + pNewScript->GetInstanceData = &GetInstanceData_instance_pinnacle; + pNewScript->RegisterSelf(); } diff --git a/scripts/northrend/utgarde_keep/utgarde_pinnacle/utgarde_pinnacle.h b/scripts/northrend/utgarde_keep/utgarde_pinnacle/utgarde_pinnacle.h index 43c1c6cd3..ae70c7b25 100644 --- a/scripts/northrend/utgarde_keep/utgarde_pinnacle/utgarde_pinnacle.h +++ b/scripts/northrend/utgarde_keep/utgarde_pinnacle/utgarde_pinnacle.h @@ -23,4 +23,24 @@ enum NPC_RHINO = 26686 }; +class MANGOS_DLL_DECL instance_pinnacle : public ScriptedInstance +{ + public: + instance_pinnacle(Map* pMap); + + void Initialize(); + + void OnObjectCreate(GameObject* pGo); + + void SetData(uint32 uiType, uint32 uiData); + uint32 GetData(uint32 uiType); + + const char* Save() { return m_strInstData.c_str(); } + void Load(const char* chrIn); + + private: + uint32 m_auiEncounter[MAX_ENCOUNTER]; + std::string m_strInstData; +}; + #endif diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index caa895d55..50e07ed94 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2199" + #define SD2_REVISION_NR "2200" #endif // __SD2_REVISION_NR_H__ From 4284fcdaa1c87a05fb8d6be0d7bf4a5e720b25cb Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Sun, 5 Jun 2011 16:21:38 +0200 Subject: [PATCH 0181/1172] [2201] Use EntryGuidMap-Storage in Violet Hold --- .../violet_hold/instance_violet_hold.cpp | 156 ++++++------------ scripts/northrend/violet_hold/violet_hold.cpp | 6 +- scripts/northrend/violet_hold/violet_hold.h | 50 ++---- sd2_revision_nr.h | 2 +- 4 files changed, 69 insertions(+), 145 deletions(-) diff --git a/scripts/northrend/violet_hold/instance_violet_hold.cpp b/scripts/northrend/violet_hold/instance_violet_hold.cpp index 209278189..672ed2507 100644 --- a/scripts/northrend/violet_hold/instance_violet_hold.cpp +++ b/scripts/northrend/violet_hold/instance_violet_hold.cpp @@ -25,26 +25,6 @@ EndScriptData */ #include "violet_hold.h" instance_violet_hold::instance_violet_hold(Map* pMap) : ScriptedInstance(pMap), - m_uiSinclariGUID(0), - m_uiSinclariAltGUID(0), - m_uiErekemGUID(0), - m_uiMoraggGUID(0), - m_uiIchoronGUID(0), - m_uiXevozzGUID(0), - m_uiLavanthorGUID(0), - m_uiZuramatGUID(0), - - m_uiArokkoaGUID(0), - m_uiVoidLordGUID(0), - m_uiEtheralGUID(0), - m_uiSwirlingGUID(0), - m_uiWatcherGUID(0), - m_uiLavaHoundGUID(0), - - m_uiCellErekemGuard_LGUID(0), - m_uiCellErekemGuard_RGUID(0), - m_uiIntroCrystalGUID(0), - m_uiWorldState(0), m_uiWorldStateSealCount(100), m_uiWorldStatePortalCount(0), @@ -59,7 +39,7 @@ instance_violet_hold::instance_violet_hold(Map* pMap) : ScriptedInstance(pMap), void instance_violet_hold::Initialize() { memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); - m_uiMaxCountPortalLoc = (sizeof(afPortalLocation)/sizeof(sPortalData)) - 1; + m_uiMaxCountPortalLoc = (sizeof(afPortalLocation)/sizeof(PortalData)) - 1; } void instance_violet_hold::ResetVariables() @@ -75,17 +55,17 @@ void instance_violet_hold::ResetAll() CallGuards(true); SetIntroPortals(false); - for (std::vector::const_iterator itr = m_vRandomBosses.begin(); itr != m_vRandomBosses.end(); ++itr) + for (std::vector::const_iterator itr = m_vRandomBosses.begin(); itr != m_vRandomBosses.end(); ++itr) { - const sBossInformation* pData = GetBossInformation((*itr)->uiEntry); + const BossInformation* pData = GetBossInformation((*itr)->uiEntry); if (pData && GetData(pData->uiType) == DONE) { - if (Creature* pGhostBoss = instance->GetCreature(GetData64(pData->uiGhostEntry))) + if (Creature* pGhostBoss = GetSingleCreatureFromStorage(pData->uiGhostEntry)) { if (!pGhostBoss->isAlive()) pGhostBoss->Respawn(); } - else if (Creature* pSummoner = instance->GetCreature(m_uiSinclariAltGUID)) + else if (Creature* pSummoner = GetSingleCreatureFromStorage(NPC_SINCLARI_ALT)) pSummoner->SummonCreature(pData->uiGhostEntry, (*itr)->fX, (*itr)->fY, (*itr)->fZ, (*itr)->fO, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 600*IN_MILLISECONDS); // Close Door if still open @@ -98,49 +78,39 @@ void instance_violet_hold::OnCreatureCreate(Creature* pCreature) { switch(pCreature->GetEntry()) { - case NPC_SINCLARI: m_uiSinclariGUID = pCreature->GetGUID(); break; - case NPC_SINCLARI_ALT: m_uiSinclariAltGUID = pCreature->GetGUID(); break; - case NPC_DOOR_SEAL: m_uiDoorSealGUID = pCreature->GetGUID(); break; + case NPC_SINCLARI: + case NPC_SINCLARI_ALT: + case NPC_DOOR_SEAL: + break; case NPC_EREKEM: - m_lRandomBossList.push_back(pCreature->GetEntry()); - m_uiErekemGUID = pCreature->GetGUID(); - break; case NPC_MORAGG: - m_lRandomBossList.push_back(pCreature->GetEntry()); - m_uiMoraggGUID = pCreature->GetGUID(); - break; case NPC_ICHORON: - m_lRandomBossList.push_back(pCreature->GetEntry()); - m_uiIchoronGUID = pCreature->GetGUID(); - break; case NPC_XEVOZZ: - m_lRandomBossList.push_back(pCreature->GetEntry()); - m_uiXevozzGUID = pCreature->GetGUID(); - break; case NPC_LAVANTHOR: - m_lRandomBossList.push_back(pCreature->GetEntry()); - m_uiLavanthorGUID = pCreature->GetGUID(); - break; case NPC_ZURAMAT: m_lRandomBossList.push_back(pCreature->GetEntry()); - m_uiZuramatGUID = pCreature->GetGUID(); break; case NPC_PORTAL_INTRO: m_lIntroPortalList.push_back(pCreature->GetGUID()); - break; + return; case NPC_HOLD_GUARD: m_lGuardsList.push_back(pCreature->GetGUID()); + return; + + case NPC_ARAKKOA: + case NPC_VOID_LORD: + case NPC_ETHERAL: + case NPC_SWIRLING: + case NPC_WATCHER: + case NPC_LAVA_HOUND: break; - case NPC_ARAKKOA: m_uiArokkoaGUID = pCreature->GetGUID(); break; - case NPC_VOID_LORD: m_uiVoidLordGUID = pCreature->GetGUID(); break; - case NPC_ETHERAL: m_uiEtheralGUID = pCreature->GetGUID(); break; - case NPC_SWIRLING: m_uiSwirlingGUID = pCreature->GetGUID(); break; - case NPC_WATCHER: m_uiWatcherGUID = pCreature->GetGUID(); break; - case NPC_LAVA_HOUND: m_uiLavaHoundGUID = pCreature->GetGUID(); break; + default: + return; } + m_mNpcEntryGuidStore[pCreature->GetEntry()] = pCreature->GetObjectGuid(); } void instance_violet_hold::OnObjectCreate(GameObject* pGo) @@ -148,37 +118,35 @@ void instance_violet_hold::OnObjectCreate(GameObject* pGo) switch(pGo->GetEntry()) { case GO_CELL_LAVANTHOR: - m_mBossToCellMap.insert(BossToCellMap::value_type(NPC_LAVANTHOR, pGo->GetGUID())); - break; + m_mBossToCellMap.insert(BossToCellMap::value_type(NPC_LAVANTHOR, pGo->GetObjectGuid())); + return; case GO_CELL_MORAGG: - m_mBossToCellMap.insert(BossToCellMap::value_type(NPC_MORAGG, pGo->GetGUID())); - break; + m_mBossToCellMap.insert(BossToCellMap::value_type(NPC_MORAGG, pGo->GetObjectGuid())); + return; case GO_CELL_ZURAMAT: - m_mBossToCellMap.insert(BossToCellMap::value_type(NPC_ZURAMAT, pGo->GetGUID())); - break; + m_mBossToCellMap.insert(BossToCellMap::value_type(NPC_ZURAMAT, pGo->GetObjectGuid())); + return; case GO_CELL_XEVOZZ: - m_mBossToCellMap.insert(BossToCellMap::value_type(NPC_XEVOZZ, pGo->GetGUID())); - break; + m_mBossToCellMap.insert(BossToCellMap::value_type(NPC_XEVOZZ, pGo->GetObjectGuid())); + return; case GO_CELL_ICHORON: - m_mBossToCellMap.insert(BossToCellMap::value_type(NPC_ICHORON, pGo->GetGUID())); - break; + m_mBossToCellMap.insert(BossToCellMap::value_type(NPC_ICHORON, pGo->GetObjectGuid())); + return; case GO_CELL_EREKEM: - m_mBossToCellMap.insert(BossToCellMap::value_type(NPC_EREKEM, pGo->GetGUID())); - break; + m_mBossToCellMap.insert(BossToCellMap::value_type(NPC_EREKEM, pGo->GetObjectGuid())); + return; case GO_CELL_EREKEM_GUARD_L: - m_mBossToCellMap.insert(BossToCellMap::value_type(NPC_EREKEM, pGo->GetGUID())); - break; + m_mBossToCellMap.insert(BossToCellMap::value_type(NPC_EREKEM, pGo->GetObjectGuid())); + return; case GO_CELL_EREKEM_GUARD_R: - m_mBossToCellMap.insert(BossToCellMap::value_type(NPC_EREKEM, pGo->GetGUID())); - break; + m_mBossToCellMap.insert(BossToCellMap::value_type(NPC_EREKEM, pGo->GetObjectGuid())); + return; case GO_INTRO_CRYSTAL: - m_uiIntroCrystalGUID = pGo->GetGUID(); - break; case GO_PRISON_SEAL_DOOR: - m_uiDoorSealGUID = pGo->GetGUID(); break; } + m_mGoEntryGuidStore[pGo->GetEntry()] = pGo->GetObjectGuid(); } void instance_violet_hold::UpdateCellForBoss(uint32 uiBossEntry, bool bForceClosing /*= false*/) @@ -241,13 +209,13 @@ void instance_violet_hold::SetData(uint32 uiType, uint32 uiData) ResetAll(); break; case IN_PROGRESS: - DoUseDoorOrButton(m_uiDoorSealGUID); + DoUseDoorOrButton(GO_PRISON_SEAL_DOOR); UpdateWorldState(); m_uiPortalId = urand(0, 2); m_uiPortalTimer = 15000; break; case FAIL: - if (Creature* pSinclari = instance->GetCreature(m_uiSinclariGUID)) + if (Creature* pSinclari = GetSingleCreatureFromStorage(NPC_SINCLARI)) pSinclari->Respawn(); break; case DONE: @@ -332,7 +300,7 @@ void instance_violet_hold::SetData(uint32 uiType, uint32 uiData) << m_auiEncounter[6] << " " << m_auiEncounter[7] << " " << m_auiEncounter[8] << " " << m_auiEncounter[9]; - strInstData = saveStream.str(); + m_strInstData = saveStream.str(); SaveToDB(); OUT_SAVE_INST_DATA_COMPLETE; @@ -396,9 +364,9 @@ void instance_violet_hold::SetIntroPortals(bool bDeactivate) void instance_violet_hold::SpawnPortal() { - if (const sPortalData* pData = GetPortalData()) + if (const PortalData* pData = GetPortalData()) { - if (Creature* pController = instance->GetCreature(m_uiSinclariAltGUID)) + if (Creature* pController = GetSingleCreatureFromStorage(NPC_SINCLARI_ALT)) { uint32 uiPortalEntry; @@ -439,12 +407,12 @@ void instance_violet_hold::SetPortalId() } } -sBossSpawn* instance_violet_hold::CreateBossSpawnByEntry(uint32 uiEntry) +BossSpawn* instance_violet_hold::CreateBossSpawnByEntry(uint32 uiEntry) { - sBossSpawn* pBossSpawn = new sBossSpawn; + BossSpawn* pBossSpawn = new BossSpawn; pBossSpawn->uiEntry = uiEntry; - if (Creature* pBoss = instance->GetCreature(GetData64(uiEntry))) + if (Creature* pBoss = GetSingleCreatureFromStorage(uiEntry)) pBoss->GetRespawnCoord(pBossSpawn->fX, pBossSpawn->fY, pBossSpawn->fZ, &(pBossSpawn->fO)); return pBossSpawn; @@ -493,7 +461,7 @@ void instance_violet_hold::SetRandomBosses() m_vRandomBosses.push_back(CreateBossSpawnByEntry(*itr)); } - for (std::vector::const_iterator itr = m_vRandomBosses.begin(); itr != m_vRandomBosses.end(); ++itr) + for (std::vector::const_iterator itr = m_vRandomBosses.begin(); itr != m_vRandomBosses.end(); ++itr) debug_log("SD2: instance_violet_hold first random boss is entry %u", (*itr)->uiEntry); } @@ -511,7 +479,7 @@ void instance_violet_hold::CallGuards(bool bRespawn) { pGuard->AI()->EnterEvadeMode(); - if (Creature* pSinclari = instance->GetCreature(m_uiSinclariGUID)) + if (Creature* pSinclari = GetSingleCreatureFromStorage(NPC_SINCLARI)) pGuard->GetMotionMaster()->MoveFollow(pSinclari, 0.0f, 0.0f); pGuard->ForcedDespawn(20000); @@ -531,7 +499,7 @@ void instance_violet_hold::ProcessActivationCrystal(Unit* pUser, bool bIsIntro) } if (bIsIntro) - DoUseDoorOrButton(m_uiIntroCrystalGUID); + DoUseDoorOrButton(GO_INTRO_CRYSTAL); // else, kill (and despawn?) certain trash mobs. Also boss affected, but not killed. } @@ -554,28 +522,6 @@ uint32 instance_violet_hold::GetRandomMobForNormalPortal() } } -uint64 instance_violet_hold::GetData64(uint32 uiData) -{ - switch (uiData) - { - case NPC_EREKEM: return m_uiErekemGUID; - case NPC_MORAGG: return m_uiMoraggGUID; - case NPC_ICHORON: return m_uiIchoronGUID; - case NPC_XEVOZZ: return m_uiXevozzGUID; - case NPC_LAVANTHOR: return m_uiLavanthorGUID; - case NPC_ZURAMAT: return m_uiZuramatGUID; - - case NPC_ARAKKOA: return m_uiArokkoaGUID; - case NPC_VOID_LORD: return m_uiVoidLordGUID; - case NPC_ETHERAL: return m_uiEtheralGUID; - case NPC_SWIRLING: return m_uiSwirlingGUID; - case NPC_WATCHER: return m_uiWatcherGUID; - case NPC_LAVA_HOUND: return m_uiLavaHoundGUID; - default: - return 0; - } -} - void instance_violet_hold::OnCreatureEnterCombat(Creature* pCreature) { switch (pCreature->GetEntry()) @@ -699,7 +645,7 @@ void instance_violet_hold::Update(uint32 uiDiff) } } -sBossInformation const* instance_violet_hold::GetBossInformation(uint32 uiEntry/* = 0*/) +BossInformation const* instance_violet_hold::GetBossInformation(uint32 uiEntry/* = 0*/) { uint32 mEntry = uiEntry; if (!mEntry) @@ -725,7 +671,7 @@ sBossInformation const* instance_violet_hold::GetBossInformation(uint32 uiEntry/ instance_violet_hold::~instance_violet_hold() { // Need to free std::vector m_vRandomBosses; - for (std::vector::const_iterator itr = m_vRandomBosses.begin(); itr != m_vRandomBosses.end(); ++itr) + for (std::vector::const_iterator itr = m_vRandomBosses.begin(); itr != m_vRandomBosses.end(); ++itr) { if (*itr) delete (*itr); diff --git a/scripts/northrend/violet_hold/violet_hold.cpp b/scripts/northrend/violet_hold/violet_hold.cpp index 432d317e1..ffbf007e7 100644 --- a/scripts/northrend/violet_hold/violet_hold.cpp +++ b/scripts/northrend/violet_hold/violet_hold.cpp @@ -275,7 +275,7 @@ struct MANGOS_DLL_DECL npc_teleportation_portalAI : public ScriptedAI { if (!m_pInstance) return; - const sBossInformation* pData = m_pInstance->GetBossInformation(); + const BossInformation* pData = m_pInstance->GetBossInformation(); if (pData) pSummoned->GetMotionMaster()->MovePoint(pData->uiWayPointId, pData->fX, pData->fY, pData->fZ); return; @@ -298,9 +298,9 @@ struct MANGOS_DLL_DECL npc_teleportation_portalAI : public ScriptedAI pSummoned->CastSpell(pSummoned, SPELL_SHIELD_DISRUPTION, false); if (m_pInstance) { - if (const sBossInformation* pData = m_pInstance->GetBossInformation()) + if (const BossInformation* pData = m_pInstance->GetBossInformation()) { - if (Creature* pBoss = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(m_pInstance->GetData(pData->uiType) != DONE ? pData->uiEntry : pData->uiGhostEntry))) + if (Creature* pBoss = m_pInstance->GetSingleCreatureFromStorage(m_pInstance->GetData(pData->uiType) != DONE ? pData->uiEntry : pData->uiGhostEntry)) { m_pInstance->UpdateCellForBoss(pData->uiEntry); if (pData->iSayEntry) diff --git a/scripts/northrend/violet_hold/violet_hold.h b/scripts/northrend/violet_hold/violet_hold.h index 6bd26abd2..bd1630d73 100644 --- a/scripts/northrend/violet_hold/violet_hold.h +++ b/scripts/northrend/violet_hold/violet_hold.h @@ -130,13 +130,13 @@ enum ePortalType PORTAL_TYPE_BOSS, }; -struct sPortalData +struct PortalData { ePortalType pPortalType; float fX, fY, fZ, fOrient; }; -static const sPortalData afPortalLocation[]= +static const PortalData afPortalLocation[]= { {PORTAL_TYPE_NORM, 1936.07f, 803.198f, 53.3749f, 3.1241f}, //balcony {PORTAL_TYPE_NORM, 1877.51f, 850.104f, 44.6599f, 4.7822f}, //erekem @@ -149,20 +149,20 @@ static const sPortalData afPortalLocation[]= {PORTAL_TYPE_BOSS, 1890.73f, 803.309f, 38.4001f, 2.4139f}, //center }; -struct sBossInformation +struct BossInformation { uint32 uiType, uiEntry, uiGhostEntry, uiWayPointId; float fX, fY, fZ; // Waypoint for Saboteur int32 iSayEntry; }; -struct sBossSpawn +struct BossSpawn { uint32 uiEntry; float fX, fY, fZ, fO; }; -static const sBossInformation aBossInformation[] = +static const BossInformation aBossInformation[] = { {TYPE_EREKEM, NPC_EREKEM, NPC_ARAKKOA, 1, 1877.03f, 853.84f, 43.33f, SAY_RELEASE_EREKEM}, {TYPE_ZURAMAT, NPC_ZURAMAT, NPC_VOID_LORD, 1, 1922.41f, 847.95f, 47.15f, SAY_RELEASE_ZURAMAT}, @@ -200,12 +200,12 @@ class MANGOS_DLL_DECL instance_violet_hold : public ScriptedInstance uint32 GetCurrentPortalNumber() { return m_uiWorldStatePortalCount; } - sPortalData const* GetPortalData() { return &afPortalLocation[m_uiPortalId]; } - sBossInformation const* GetBossInformation(uint32 uiEntry = 0); + PortalData const* GetPortalData() { return &afPortalLocation[m_uiPortalId]; } + BossInformation const* GetBossInformation(uint32 uiEntry = 0); bool IsCurrentPortalForTrash() { - if (m_uiWorldStatePortalCount % 6) + if (m_uiWorldStatePortalCount % MAX_MINIBOSSES) return true; return false; @@ -213,7 +213,7 @@ class MANGOS_DLL_DECL instance_violet_hold : public ScriptedInstance bool IsNextPortalForTrash() { - if ((m_uiWorldStatePortalCount+1) % 6) + if ((m_uiWorldStatePortalCount+1) % MAX_MINIBOSSES) return true; return false; @@ -231,40 +231,18 @@ class MANGOS_DLL_DECL instance_violet_hold : public ScriptedInstance void SetData(uint32 uiType, uint32 uiData); uint32 GetData(uint32 uiType); - uint64 GetData64(uint32 uiData); - const char* Save() { return strInstData.c_str(); } + const char* Save() { return m_strInstData.c_str(); } void Load(const char* chrIn); void Update(uint32 uiDiff); - typedef std::multimap BossToCellMap; + typedef std::multimap BossToCellMap; protected: - sBossSpawn* CreateBossSpawnByEntry(uint32 uiEntry); + BossSpawn* CreateBossSpawnByEntry(uint32 uiEntry); uint32 m_auiEncounter[MAX_ENCOUNTER]; - std::string strInstData; - - uint64 m_uiSinclariGUID; - uint64 m_uiSinclariAltGUID; - uint64 m_uiErekemGUID; - uint64 m_uiMoraggGUID; - uint64 m_uiIchoronGUID; - uint64 m_uiXevozzGUID; - uint64 m_uiLavanthorGUID; - uint64 m_uiZuramatGUID; - // Ghost Forms - uint64 m_uiArokkoaGUID; - uint64 m_uiVoidLordGUID; - uint64 m_uiEtheralGUID; - uint64 m_uiSwirlingGUID; - uint64 m_uiWatcherGUID; - uint64 m_uiLavaHoundGUID; - - uint64 m_uiCellErekemGuard_LGUID; - uint64 m_uiCellErekemGuard_RGUID; - uint64 m_uiIntroCrystalGUID; - uint64 m_uiDoorSealGUID; + std::string m_strInstData; uint32 m_uiWorldState; uint32 m_uiWorldStateSealCount; @@ -280,7 +258,7 @@ class MANGOS_DLL_DECL instance_violet_hold : public ScriptedInstance GUIDList m_lGuardsList; std::list m_lRandomBossList; - std::vector m_vRandomBosses; + std::vector m_vRandomBosses; }; #endif diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 50e07ed94..04cb21e95 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2200" + #define SD2_REVISION_NR "2201" #endif // __SD2_REVISION_NR_H__ From b618292ea93dd2ae2e9f0012cb93ad9f284a934f Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Fri, 25 Feb 2011 17:01:28 +0100 Subject: [PATCH 0182/1172] [2202] Improve instance script for Halls of Stone * Move to header version * Provide some base layout for Brann escort Event --- .../ulduar/halls_of_stone/halls_of_stone.cpp | 14 +- .../ulduar/halls_of_stone/halls_of_stone.h | 59 ++- .../instance_halls_of_stone.cpp | 450 ++++++++++++------ sd2_revision_nr.h | 2 +- 4 files changed, 378 insertions(+), 147 deletions(-) diff --git a/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.cpp b/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.cpp index 1e0d8e4d3..50a8daad4 100644 --- a/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.cpp +++ b/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.cpp @@ -150,8 +150,8 @@ bool GossipHello_npc_brann_hos(Player* pPlayer, Creature* pCreature) if (pCreature->isQuestGiver()) pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); - pPlayer->SEND_GOSSIP_MENU(TEXT_ID_START, pCreature->GetObjectGuid()); pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_START, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + pPlayer->SEND_GOSSIP_MENU(TEXT_ID_START, pCreature->GetObjectGuid()); //pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_PROGRESS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); //pPlayer->SEND_GOSSIP_MENU(TEXT_ID_PROGRESS, pCreature->GetObjectGuid()); @@ -160,8 +160,16 @@ bool GossipHello_npc_brann_hos(Player* pPlayer, Creature* pCreature) bool GossipSelect_npc_brann_hos(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) { - if (uiAction == GOSSIP_ACTION_INFO_DEF+1 || uiAction == GOSSIP_ACTION_INFO_DEF+2) - pPlayer->CLOSE_GOSSIP_MENU(); + switch (uiAction) + { + case GOSSIP_ACTION_INFO_DEF + 1: + if (npc_brann_hosAI* pBrannAi = dynamic_cast (pCreature->AI())) + pBrannAi->Start(false, pPlayer->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 2: + break; + } + pPlayer->CLOSE_GOSSIP_MENU(); return true; } diff --git a/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.h b/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.h index 642d40926..c5854607b 100644 --- a/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.h +++ b/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.h @@ -19,6 +19,8 @@ enum NPC_KADDRAK = 30898, NPC_ABEDNEUM = 30899, NPC_MARNAK = 30897, + NPC_TRIBUNAL_OF_AGES = 28234, + NPC_WORLDTRIGGER = 22515, GO_DOOR_SJONNIR = 191296, GO_DOOR_TRIBUNAL = 191294, // possibly closed during event? @@ -33,7 +35,62 @@ enum GO_TRIBUNAL_CONSOLE = 193907, GO_TRIBUNAL_FLOOR = 191527, - GO_SJONNIR_CONSOLE = 193906 + GO_SJONNIR_CONSOLE = 193906, + + MAX_FACES = 3, + FACE_MARNAK = 0, + FACE_ABEDNEUM = 1, + FACE_KADDRAK = 2, +}; + +struct Face +{ + uint64 m_uiLeftEyeGUID; + uint64 m_uiRightEyeGUID; + uint64 m_uiGoFaceGUID; + uint64 m_uiSpeakerGUID; + bool m_bIsActive; + uint32 m_uiTimer; +}; + +class MANGOS_DLL_DECL instance_halls_of_stone : public ScriptedInstance +{ + public: + instance_halls_of_stone(Map* pMap); + void Initialize(); + + void OnCreatureCreate(Creature* pCreature); + void OnObjectCreate(GameObject* pGo); + + void SetData(uint32 uiType, uint32 uiData); + uint32 GetData(uint32 uiType); + uint64 GetData64(uint32 uiData); + + void Update(uint32 uiDiff); + + void ActivateFace(uint8 uiFace, bool bAfterEvent); + void DoFaceSpeak(uint8 uiFace, int32 iTextId); + + private: + void SortFaces(); + void ProcessFace(uint8 uiFace); + + uint32 m_auiEncounter[MAX_ENCOUNTER]; + Face m_aFaces[MAX_FACES]; + + std::list m_lKaddrakGUIDs; + std::list m_lAbedneumGUIDs; + std::list m_lMarnakGUIDs; + std::list m_lTribunalGUIDs; + std::list m_lWorldtriggerGUIDs; + + uint64 m_uiBrannGUID; + uint64 m_uiSjonnirDoorGUID; + uint64 m_uiTribunalDoorGUID; + uint64 m_uiTribunalChestGUID; + uint64 m_uiTribunalConsoleGUID; + uint64 m_uiTribunalFloorGUID; + uint64 m_uiSjonnirConsoleGUID; }; #endif diff --git a/scripts/northrend/ulduar/halls_of_stone/instance_halls_of_stone.cpp b/scripts/northrend/ulduar/halls_of_stone/instance_halls_of_stone.cpp index 4ad1fb3a4..08ef224d5 100644 --- a/scripts/northrend/ulduar/halls_of_stone/instance_halls_of_stone.cpp +++ b/scripts/northrend/ulduar/halls_of_stone/instance_halls_of_stone.cpp @@ -24,173 +24,338 @@ EndScriptData */ #include "precompiled.h" #include "halls_of_stone.h" -struct MANGOS_DLL_DECL instance_halls_of_stone : public ScriptedInstance +enum { - instance_halls_of_stone(Map* pMap) : ScriptedInstance(pMap) {Initialize();}; + // KADDRAK + SPELL_GLARE_OF_THE_TRIBUNAL = 50988, + SPELL_GLARE_OF_THE_TRIBUNAL_H = 59870, - uint32 m_auiEncounter[MAX_ENCOUNTER]; + // MARNAK + SPELL_SUMMON_DARK_MATTER_TARGET = 51003, + SPELL_DARK_MATTER = 51012, // Exact mechanics unknown + SPELL_DARK_MATTER_H = 59868, + // NPC_DARK_MATTER_TARGET = 28237, - uint64 m_uiBrannGUID; - uint64 m_uiKaddrakGUID; - uint64 m_uiAbedneumGUID; - uint64 m_uiMarnakGUID; + // ABEDNEUM + SPELL_SUMMON_SEARING_GAZE_TARGET = 51146, + SPELL_SEARING_GAZE = 51136, + SPELL_SEARING_GAZE_H = 59867, + // NPC_SEARING_GAZE_TARGET = 28265, +}; - uint64 m_uiSjonnirDoorGUID; - uint64 m_uiTribunalDoorGUID; - uint64 m_uiTribunalChestGUID; - uint64 m_uiTribunalHeadRightGUID; - uint64 m_uiTribunalHeadCenterGUID; - uint64 m_uiTribunalHeadLeftGUID; - uint64 m_uiTribunalConsoleGUID; - uint64 m_uiTribunalFloorGUID; - uint64 m_uiSjonnirConsoleGUID; +instance_halls_of_stone::instance_halls_of_stone(Map* pMap) : ScriptedInstance(pMap), + m_uiBrannGUID(0), - void Initialize() + m_uiSjonnirDoorGUID(0), + m_uiTribunalDoorGUID(0), + m_uiTribunalChestGUID(0), + m_uiTribunalConsoleGUID(0), + m_uiTribunalFloorGUID(0), + m_uiSjonnirConsoleGUID(0) +{ + Initialize(); +} + +void instance_halls_of_stone::Initialize() +{ + memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); + + for (uint8 i = 0; i < MAX_FACES; ++i) { - memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); - - m_uiBrannGUID = 0; - m_uiKaddrakGUID = 0; - m_uiAbedneumGUID = 0; - m_uiMarnakGUID = 0; - - m_uiSjonnirDoorGUID = 0; - m_uiTribunalDoorGUID = 0; - m_uiTribunalChestGUID = 0; - m_uiTribunalHeadRightGUID = 0; - m_uiTribunalHeadCenterGUID = 0; - m_uiTribunalHeadLeftGUID = 0; - m_uiTribunalConsoleGUID = 0; - m_uiTribunalFloorGUID = 0; - m_uiSjonnirConsoleGUID = 0; + m_aFaces[i].m_bIsActive = false; + m_aFaces[i].m_uiGoFaceGUID = 0; + m_aFaces[i].m_uiLeftEyeGUID = 0; + m_aFaces[i].m_uiRightEyeGUID = 0; + m_aFaces[i].m_uiSpeakerGUID = 0; + m_aFaces[i].m_uiTimer = 1000; } +} - void OnCreatureCreate(Creature* pCreature) +void instance_halls_of_stone::OnCreatureCreate(Creature* pCreature) +{ + switch(pCreature->GetEntry()) { - switch(pCreature->GetEntry()) - { - case NPC_BRANN: - m_uiBrannGUID = pCreature->GetGUID(); - break; - case NPC_KADDRAK: - m_uiKaddrakGUID = pCreature->GetGUID(); - break; - case NPC_ABEDNEUM: - m_uiAbedneumGUID = pCreature->GetGUID(); - break; - case NPC_MARNAK: - m_uiMarnakGUID = pCreature->GetGUID(); - break; - } + case NPC_BRANN: m_uiBrannGUID = pCreature->GetGUID(); break; + case NPC_KADDRAK: m_lKaddrakGUIDs.push_back(pCreature->GetGUID()); break; + case NPC_ABEDNEUM: m_lAbedneumGUIDs.push_back(pCreature->GetGUID()); break; + case NPC_MARNAK: m_lMarnakGUIDs.push_back(pCreature->GetGUID()); break; + case NPC_TRIBUNAL_OF_AGES: m_lTribunalGUIDs.push_back(pCreature->GetGUID()); break; + case NPC_WORLDTRIGGER: m_lWorldtriggerGUIDs.push_back(pCreature->GetGUID()); break; + } +} + +void instance_halls_of_stone::OnObjectCreate(GameObject* pGo) +{ + switch(pGo->GetEntry()) + { + case GO_DOOR_SJONNIR: + m_uiSjonnirDoorGUID = pGo->GetGUID(); + break; + case GO_DOOR_TRIBUNAL: + m_uiTribunalDoorGUID = pGo->GetGUID(); + break; + case GO_TRIBUNAL_CHEST: + case GO_TRIBUNAL_CHEST_H: + m_uiTribunalChestGUID = pGo->GetGUID(); + break; + case GO_TRIBUNAL_HEAD_RIGHT: + m_aFaces[FACE_MARNAK].m_uiGoFaceGUID = pGo->GetGUID(); + break; + case GO_TRIBUNAL_HEAD_CENTER: + m_aFaces[FACE_ABEDNEUM].m_uiGoFaceGUID = pGo->GetGUID(); + break; + case GO_TRIBUNAL_HEAD_LEFT: + m_aFaces[FACE_KADDRAK].m_uiGoFaceGUID = pGo->GetGUID(); + break; + case GO_TRIBUNAL_CONSOLE: + m_uiTribunalConsoleGUID = pGo->GetGUID(); + break; + case GO_TRIBUNAL_FLOOR: + m_uiTribunalFloorGUID = pGo->GetGUID(); + break; + case GO_SJONNIR_CONSOLE: + m_uiSjonnirConsoleGUID = pGo->GetGUID(); + break; + } +} + +void instance_halls_of_stone::SetData(uint32 uiType, uint32 uiData) +{ + switch(uiType) + { + case TYPE_TRIBUNAL: + m_auiEncounter[0] = uiData; + if (uiData == IN_PROGRESS) + SortFaces(); + if (uiData == DONE) + DoRespawnGameObject(m_uiTribunalChestGUID); + if (uiData == SPECIAL || uiData == FAIL) + { + for (uint8 i = 0; i < MAX_FACES; ++i) + { + // Shut down the faces + DoUseDoorOrButton(m_aFaces[i].m_uiGoFaceGUID); // TODO, double check, this removes the "red" + m_aFaces[i].m_bIsActive = false; + m_aFaces[i].m_uiTimer = 1000; + } + } + break; + case TYPE_MAIDEN: + m_auiEncounter[1] = uiData; + break; + case TYPE_KRYSTALLUS: + m_auiEncounter[2] = uiData; + break; + case TYPE_SJONNIR: + m_auiEncounter[3] = uiData; + break; + } +} + +uint32 instance_halls_of_stone::GetData(uint32 uiType) +{ + switch(uiType) + { + case TYPE_TRIBUNAL: return m_auiEncounter[0]; + case TYPE_MAIDEN: return m_auiEncounter[1]; + case TYPE_KRYSTALLUS: return m_auiEncounter[2]; + case TYPE_SJONNIR: return m_auiEncounter[3]; + default: + return 0; + } +} + +uint64 instance_halls_of_stone::GetData64(uint32 uiData) +{ + switch(uiData) + { + case NPC_BRANN: return m_uiBrannGUID; + case GO_DOOR_SJONNIR: return m_uiSjonnirDoorGUID; + case GO_DOOR_TRIBUNAL: return m_uiTribunalDoorGUID; + case GO_TRIBUNAL_CONSOLE: return m_uiTribunalConsoleGUID; + case GO_TRIBUNAL_FLOOR: return m_uiTribunalFloorGUID; + case GO_SJONNIR_CONSOLE: return m_uiSjonnirConsoleGUID; + default: + return 0; } +} - void OnObjectCreate(GameObject* pGo) +struct SortHelper +{ + SortHelper(WorldObject const* pRef): m_pRef(pRef) {} + bool operator()(WorldObject* pLeft, WorldObject* pRight) { - switch(pGo->GetEntry()) + return m_pRef->GetDistanceOrder(pLeft, pRight); + } + WorldObject const* m_pRef; +}; + +// Small Helper-function +void GetValidNPCsOfList(Map* pMap, std::list& lGUIDs, std::list& lNPCs) +{ + lNPCs.clear(); + for (std::list::const_iterator itr = lGUIDs.begin(); itr != lGUIDs.end(); ++itr) + { + if (Creature* pMob = pMap->GetCreature(*itr)) + lNPCs.push_back(pMob); + } +} + +void instance_halls_of_stone::SortFaces() +{ + std::list lPossibleEyes; + GameObject* pFace = NULL; + + // FACE_MARNAK + if (pFace = instance->GetGameObject(m_aFaces[FACE_MARNAK].m_uiGoFaceGUID)) + { + // Find Marnak NPCs + GetValidNPCsOfList(instance, m_lMarnakGUIDs, lPossibleEyes); + if (lPossibleEyes.size() > 1) + { + lPossibleEyes.sort(SortHelper(pFace)); + std::list::const_iterator itr = lPossibleEyes.begin(); + m_aFaces[FACE_MARNAK].m_uiLeftEyeGUID = (*itr)->GetGUID(); + ++itr; + m_aFaces[FACE_MARNAK].m_uiSpeakerGUID = (*itr)->GetGUID(); + } + // Find Worldtrigger NPC + GetValidNPCsOfList(instance, m_lWorldtriggerGUIDs, lPossibleEyes); + if (!lPossibleEyes.empty()) { - case GO_DOOR_SJONNIR: - m_uiSjonnirDoorGUID = pGo->GetGUID(); - break; - case GO_DOOR_TRIBUNAL: - m_uiTribunalDoorGUID = pGo->GetGUID(); - break; - case GO_TRIBUNAL_CHEST: - case GO_TRIBUNAL_CHEST_H: - m_uiTribunalChestGUID = pGo->GetGUID(); - break; - case GO_TRIBUNAL_HEAD_RIGHT: - m_uiTribunalHeadRightGUID = pGo->GetGUID(); - break; - case GO_TRIBUNAL_HEAD_CENTER: - m_uiTribunalHeadCenterGUID = pGo->GetGUID(); - break; - case GO_TRIBUNAL_HEAD_LEFT: - m_uiTribunalHeadLeftGUID = pGo->GetGUID(); - break; - case GO_TRIBUNAL_CONSOLE: - m_uiTribunalConsoleGUID = pGo->GetGUID(); - break; - case GO_TRIBUNAL_FLOOR: - m_uiTribunalFloorGUID = pGo->GetGUID(); - break; - case GO_SJONNIR_CONSOLE: - m_uiSjonnirConsoleGUID = pGo->GetGUID(); - break; + lPossibleEyes.sort(SortHelper(pFace)); + m_aFaces[FACE_MARNAK].m_uiRightEyeGUID = (*lPossibleEyes.begin())->GetGUID(); } } - void SetData(uint32 uiType, uint32 uiData) + // FACE_ABEDNEUM + if (pFace = instance->GetGameObject(m_aFaces[FACE_ABEDNEUM].m_uiGoFaceGUID)) { - switch(uiType) + // Find Abedneum NPCs + GetValidNPCsOfList(instance, m_lAbedneumGUIDs, lPossibleEyes); + if (lPossibleEyes.size() > 1) { - case TYPE_TRIBUNAL: - m_auiEncounter[0] = uiData; - if (uiData == DONE) - DoRespawnGameObject(m_uiTribunalChestGUID); - break; - case TYPE_MAIDEN: - m_auiEncounter[1] = uiData; - break; - case TYPE_KRYSTALLUS: - m_auiEncounter[2] = uiData; - break; - case TYPE_SJONNIR: - m_auiEncounter[3] = uiData; - break; + lPossibleEyes.sort(SortHelper(pFace)); + std::list::const_iterator itr = lPossibleEyes.begin(); + m_aFaces[FACE_ABEDNEUM].m_uiLeftEyeGUID = (*itr)->GetGUID(); + ++itr; + m_aFaces[FACE_ABEDNEUM].m_uiSpeakerGUID = (*itr)->GetGUID(); + } + // Find Worldtrigger NPC + GetValidNPCsOfList(instance, m_lWorldtriggerGUIDs, lPossibleEyes); + if (!lPossibleEyes.empty()) + { + lPossibleEyes.sort(SortHelper(pFace)); + m_aFaces[FACE_ABEDNEUM].m_uiRightEyeGUID = (*lPossibleEyes.begin())->GetGUID(); } } - uint32 GetData(uint32 uiType) + // FACE_KADDRAK + if (pFace = instance->GetGameObject(m_aFaces[FACE_KADDRAK].m_uiGoFaceGUID)) { - switch(uiType) + // Find Marnak NPCs + GetValidNPCsOfList(instance, m_lKaddrakGUIDs, lPossibleEyes); + if (lPossibleEyes.size() > 1) { - case TYPE_TRIBUNAL: - return m_auiEncounter[0]; - case TYPE_MAIDEN: - return m_auiEncounter[1]; - case TYPE_KRYSTALLUS: - return m_auiEncounter[2]; - case TYPE_SJONNIR: - return m_auiEncounter[3]; + lPossibleEyes.sort(SortHelper(pFace)); + std::list::const_iterator itr = lPossibleEyes.begin(); + m_aFaces[FACE_KADDRAK].m_uiLeftEyeGUID = (*itr)->GetGUID(); + ++itr; + m_aFaces[FACE_KADDRAK].m_uiSpeakerGUID = (*itr)->GetGUID(); + } + // Find Tribunal NPC + GetValidNPCsOfList(instance, m_lTribunalGUIDs, lPossibleEyes); + if (!lPossibleEyes.empty()) + { + lPossibleEyes.sort(SortHelper(pFace)); + m_aFaces[FACE_KADDRAK].m_uiRightEyeGUID = (*lPossibleEyes.begin())->GetGUID(); } - return 0; } - uint64 GetData64(uint32 uiData) + // Clear GUIDs + m_lKaddrakGUIDs.clear(); + m_lAbedneumGUIDs.clear(); + m_lMarnakGUIDs.clear(); + m_lTribunalGUIDs.clear(); + m_lWorldtriggerGUIDs.clear(); +} + +void instance_halls_of_stone::ActivateFace(uint8 uiFace, bool bAfterEvent) +{ + if (uiFace >= MAX_FACES) + return; + + if (bAfterEvent) + DoUseDoorOrButton(m_aFaces[uiFace].m_uiGoFaceGUID); + else { - switch(uiData) + DoUseDoorOrButton(m_aFaces[uiFace].m_uiGoFaceGUID, 0, true); + m_aFaces[uiFace].m_bIsActive = true; + } +} + +void instance_halls_of_stone::DoFaceSpeak(uint8 uiFace, int32 iTextId) +{ + if (uiFace >= MAX_FACES) + return; + + if (Creature* pSpeaker = instance->GetCreature(m_aFaces[uiFace].m_uiSpeakerGUID)) + DoScriptText(iTextId, pSpeaker); +} + +void instance_halls_of_stone::Update(uint32 uiDiff) +{ + if (m_auiEncounter[TYPE_TRIBUNAL] == IN_PROGRESS) + { + for (uint8 i = 0; i < MAX_FACES; ++i) { - case NPC_BRANN: - return m_uiBrannGUID; - case NPC_KADDRAK: - return m_uiKaddrakGUID; - case NPC_ABEDNEUM: - return m_uiAbedneumGUID; - case NPC_MARNAK: - return m_uiMarnakGUID; - case GO_DOOR_SJONNIR: - return m_uiSjonnirDoorGUID; - case GO_DOOR_TRIBUNAL: - return m_uiTribunalDoorGUID; - case GO_TRIBUNAL_CHEST: - case GO_TRIBUNAL_CHEST_H: - return m_uiTribunalChestGUID; - case GO_TRIBUNAL_HEAD_RIGHT: - return m_uiTribunalHeadRightGUID; - case GO_TRIBUNAL_HEAD_CENTER: - return m_uiTribunalHeadCenterGUID; - case GO_TRIBUNAL_HEAD_LEFT: - return m_uiTribunalHeadLeftGUID; - case GO_TRIBUNAL_CONSOLE: - return m_uiTribunalConsoleGUID; - case GO_TRIBUNAL_FLOOR: - return m_uiTribunalFloorGUID; - case GO_SJONNIR_CONSOLE: - return m_uiSjonnirConsoleGUID; + if (!m_aFaces[i].m_bIsActive) + continue; + + if (m_aFaces[i].m_uiTimer < uiDiff) + ProcessFace(i); + else + m_aFaces[i].m_uiTimer -= uiDiff; } - return 0; } -}; +} + +void instance_halls_of_stone::ProcessFace(uint8 uiFace) +{ + // Cast dmg spell from face eyes, and reset timer for face + switch (uiFace) + { + case FACE_KADDRAK: + if (Creature* pEye = instance->GetCreature(m_aFaces[uiFace].m_uiLeftEyeGUID)) + pEye->CastSpell(pEye, instance->IsRegularDifficulty() ? SPELL_GLARE_OF_THE_TRIBUNAL : SPELL_GLARE_OF_THE_TRIBUNAL_H, true); + if (Creature* pEye = instance->GetCreature(m_aFaces[uiFace].m_uiRightEyeGUID)) + pEye->CastSpell(pEye, instance->IsRegularDifficulty() ? SPELL_GLARE_OF_THE_TRIBUNAL : SPELL_GLARE_OF_THE_TRIBUNAL_H, true); + m_aFaces[uiFace].m_uiTimer = 1500; // TODO, verify + break; + case FACE_MARNAK: + if (Creature* pEye = instance->GetCreature(m_aFaces[uiFace].m_uiLeftEyeGUID)) + pEye->CastSpell(pEye, SPELL_SUMMON_DARK_MATTER_TARGET, true); + // One should be enough.. + //if (Creature* pEye = instance->GetCreature(m_aFaces[uiFace].m_uiRightEyeGUID)) + // pEye->CastSpell(pEye, SPELL_SUMMON_DARK_MATTER_TARGET, true); + m_aFaces[uiFace].m_uiTimer = 6000; // TODO, verify, was 3s+0..1s + break; + case FACE_ABEDNEUM: + if (Creature* pEye = instance->GetCreature(m_aFaces[uiFace].m_uiLeftEyeGUID)) + pEye->CastSpell(pEye, SPELL_SUMMON_SEARING_GAZE_TARGET, true); + // One should be enough.. + //if (Creature* pEye = instance->GetCreature(m_aFaces[uiFace].m_uiRightEyeGUID)) + // pEye->CastSpell(pEye, SPELL_SUMMON_SEARING_GAZE_TARGET, true); + m_aFaces[uiFace].m_uiTimer = 6000; // TODO, verify, was 3s+0..2s + break; + default: + return; + } + if (Creature* pEye = instance->GetCreature(m_aFaces[uiFace].m_uiLeftEyeGUID)) + pEye->MonsterSay("debug: Left Eye", 0); + if (Creature* pEye = instance->GetCreature(m_aFaces[uiFace].m_uiRightEyeGUID)) + pEye->MonsterSay("debug: Right Eye", 0); +} InstanceData* GetInstanceData_instance_halls_of_stone(Map* pMap) { @@ -199,9 +364,10 @@ InstanceData* GetInstanceData_instance_halls_of_stone(Map* pMap) void AddSC_instance_halls_of_stone() { - Script *newscript; - newscript = new Script; - newscript->Name = "instance_halls_of_stone"; - newscript->GetInstanceData = &GetInstanceData_instance_halls_of_stone; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "instance_halls_of_stone"; + pNewScript->GetInstanceData = &GetInstanceData_instance_halls_of_stone; + pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 04cb21e95..ffcad42a5 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2201" + #define SD2_REVISION_NR "2202" #endif // __SD2_REVISION_NR_H__ From 60ee99fcb088024cce86c0b5a56fa27bb99866f1 Mon Sep 17 00:00:00 2001 From: ckegg Date: Sat, 26 Feb 2011 23:59:14 +0100 Subject: [PATCH 0183/1172] [2203] Implement basic Halls of Stone, Brann event. Note that this event might or might not work, but at least there is now a very solid framework to fill in and fix the missing things. Remark also that there are problems related to needed spell-support Signed-off-by: Schmoozerd --- .../ulduar/halls_of_stone/halls_of_stone.cpp | 490 +++++++++++++++++- .../ulduar/halls_of_stone/halls_of_stone.h | 22 +- .../instance_halls_of_stone.cpp | 107 ++-- sd2_revision_nr.h | 2 +- 4 files changed, 540 insertions(+), 81 deletions(-) diff --git a/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.cpp b/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.cpp index 50a8daad4..e0dc69549 100644 --- a/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.cpp +++ b/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: Halls_of_Stone -SD%Complete: 20% -SDComment: +SD%Complete: 50% +SDComment: Just base mechanics in script, timers and stuff is very uncertain, event-spells are not working SDCategory: Halls of Stone EndScriptData */ @@ -25,6 +25,11 @@ EndScriptData */ #include "halls_of_stone.h" #include "escort_ai.h" +/* Notes + * The timers and handling of texts is not confirmed, but should also not be too far off + * The spells "of the statues" (handled in instance script), need quite much of core support + */ + enum { SAY_KILL_1 = -1599012, @@ -91,12 +96,31 @@ enum SAY_ENTRANCE_MEET = -1599064, TEXT_ID_START = 13100, - TEXT_ID_PROGRESS = 13101 + TEXT_ID_PROGRESS = 13101, + + SPELL_STEALTH = 58506, + + NPC_DARK_RUNE_PROTECTOR = 27983, + NPC_DARK_RUNE_STORMCALLER = 27984, + NPC_IRON_GOLEM_CUSTODIAN = 27985, + + QUEST_HALLS_OF_STONE = 13207, }; #define GOSSIP_ITEM_START "Brann, it would be our honor!" #define GOSSIP_ITEM_PROGRESS "Let's move Brann, enough of the history lessons!" +struct Location +{ + float fX, fY, fZ; +}; + +static Location SpawnLoc[]= +{ + {946.992f, 397.016f, 208.374f}, + {960.748f, 382.944f, 208.374f}, +}; + /*###### ## npc_brann_hos ######*/ @@ -105,23 +129,37 @@ struct MANGOS_DLL_DECL npc_brann_hosAI : public npc_escortAI { npc_brann_hosAI(Creature* pCreature) : npc_escortAI(pCreature) { - m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_pInstance = (instance_halls_of_stone*)pCreature->GetInstanceData(); m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); Reset(); } - ScriptedInstance* m_pInstance; + instance_halls_of_stone* m_pInstance; bool m_bIsRegularMode; + bool m_bHasContinued; + bool m_bIsBattle; + bool m_bIsLowHP; + + uint32 m_uiStep; + uint32 m_uiPhaseTimer; + + GUIDList m_luiDwarfGUIDs; + void Reset() { - } + if (!HasEscortState(STATE_ESCORT_ESCORTING)) + { + m_bIsLowHP = false; + m_bIsBattle = false; + m_bHasContinued = false; - void WaypointReached(uint32 uiPointId) - { + m_uiStep = 0; + m_uiPhaseTimer = 0; + } } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) // TODO - possible better as SummonedJustDied { switch(urand(0, 2)) { @@ -134,15 +172,424 @@ struct MANGOS_DLL_DECL npc_brann_hosAI : public npc_escortAI void JustDied(Unit* pKiller) { DoScriptText(SAY_DEATH, m_creature); + + if (m_pInstance) + { + m_pInstance->SetData(TYPE_TRIBUNAL, FAIL); + // Continue at right state after respawn + if (m_bHasContinued) + m_pInstance->SetData(TYPE_TRIBUNAL, IN_PROGRESS); + } + + for (GUIDList::const_iterator itr = m_luiDwarfGUIDs.begin(); itr != m_luiDwarfGUIDs.end(); ++itr) + { + if (Creature* pDwarf = m_creature->GetMap()->GetCreature(*itr)) + pDwarf->ForcedDespawn(); + } + m_luiDwarfGUIDs.clear(); + } + + void AttackStart(Unit* pWho) + { + if (!pWho) + return; + + if (!m_bIsBattle) + return; + + npc_escortAI::AttackStart(pWho); + } + + void ContinueEvent() + { + if (!m_pInstance || m_pInstance->GetData(TYPE_TRIBUNAL) != IN_PROGRESS) + return; + + m_creature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); + SetRun(true); + SetEscortPaused(false); + m_bHasContinued = true; + } + + void JustStartedEscort() + { + if (m_pInstance) + m_pInstance->SetData(TYPE_TRIBUNAL, IN_PROGRESS); + + DoScriptText(SAY_ESCORT_START, m_creature); + } + + void WaypointReached(uint32 uiPointId) + { + switch (uiPointId) + { + case 13: // Before Tribunal Event, Continue with Gossip Interaction + DoScriptText(SAY_EVENT_INTRO_1, m_creature); + SetEscortPaused(true); + m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); + break; + case 17: // Reach Tribunal + SetEscortPaused(true); + m_uiPhaseTimer = 500; + break; + case 18: // Reach Floor Event + SetEscortPaused(true); + if (m_pInstance) + { + if (GameObject* pKonsole = m_pInstance->instance->GetGameObject(m_pInstance->GetData64(GO_TRIBUNAL_CONSOLE))) + m_creature->SetFacingToObject(pKonsole); + m_pInstance->DoUseDoorOrButton(m_pInstance->GetData64(GO_TRIBUNAL_FLOOR)); + } + m_uiPhaseTimer = 1000; + break; + } + } + + void SpawnDwarf(uint32 uEntry) + { + switch (uEntry) + { + case NPC_DARK_RUNE_PROTECTOR: + { + uint32 uiSpawnNumber = (m_bIsRegularMode ? 2 : 3); + for (uint8 i = 0; i < uiSpawnNumber; ++i) + m_creature->SummonCreature(NPC_DARK_RUNE_PROTECTOR, SpawnLoc[0].fX, SpawnLoc[0].fY, SpawnLoc[0].fZ, 0.0f, TEMPSUMMON_DEAD_DESPAWN, 30000); + m_creature->SummonCreature(NPC_DARK_RUNE_STORMCALLER, SpawnLoc[0].fX, SpawnLoc[0].fY, SpawnLoc[0].fZ, 0.0f, TEMPSUMMON_DEAD_DESPAWN, 30000); + break; + } + case NPC_DARK_RUNE_STORMCALLER: + for (uint8 i = 0; i < 2; ++i) + m_creature->SummonCreature(NPC_DARK_RUNE_STORMCALLER, SpawnLoc[1].fX, SpawnLoc[1].fY, SpawnLoc[1].fZ, 0.0f, TEMPSUMMON_DEAD_DESPAWN, 30000); + break; + case NPC_IRON_GOLEM_CUSTODIAN: + m_creature->SummonCreature(NPC_IRON_GOLEM_CUSTODIAN, SpawnLoc[1].fX, SpawnLoc[1].fY, SpawnLoc[1].fZ, 0.0f, TEMPSUMMON_DEAD_DESPAWN, 30000); + break; + } + } + + void JustSummoned(Creature* pSummoned) + { + m_luiDwarfGUIDs.push_back(pSummoned->GetGUID()); + + pSummoned->AI()->AttackStart(m_creature); } void UpdateEscortAI(const uint32 uiDiff) { + if (m_uiPhaseTimer && m_uiPhaseTimer <= uiDiff) + { + switch (m_uiStep) + { + // Begin Event + case 0: + // TODO, this is wrong, must be "using or similar" + m_creature->SetStandState(UNIT_STAND_STATE_KNEEL); + m_uiPhaseTimer = 1500; + break; + case 1: + DoScriptText(SAY_EVENT_INTRO_2, m_creature); + m_uiPhaseTimer = 2500; + break; + case 2: + if (m_pInstance) + m_pInstance->DoUseDoorOrButton(m_pInstance->GetData64(GO_TRIBUNAL_CONSOLE)); + m_uiPhaseTimer = 6500; + break; + case 3: + if (m_pInstance) + m_pInstance->DoFaceSpeak(FACE_ABEDNEUM, SAY_EVENT_INTRO_3_ABED); + m_uiPhaseTimer = 8500; + break; + + // Activate Kaddrak + case 4: + DoScriptText(SAY_EVENT_A_1, m_creature); + m_uiPhaseTimer = 6500; + break; + case 5: + if (m_pInstance) + m_pInstance->DoFaceSpeak(FACE_KADDRAK, SAY_EVENT_A_2_KADD); + m_uiPhaseTimer = 12500; + break; + case 6: + DoScriptText(SAY_EVENT_A_3, m_creature); + m_uiPhaseTimer = 6000; + break; + case 7: + if (m_pInstance) + m_pInstance->ActivateFace(FACE_KADDRAK, false); + m_uiPhaseTimer = 5000; + break; + case 8: + SpawnDwarf(NPC_DARK_RUNE_PROTECTOR); + m_uiPhaseTimer = 20000; + break; + + // Activate Marnak + case 9: + DoScriptText(SAY_EVENT_B_1, m_creature); + m_uiPhaseTimer = 6000; + break; + case 10: + if (m_pInstance) + m_pInstance->DoFaceSpeak(FACE_MARNAK, SAY_EVENT_B_2_MARN); + SpawnDwarf(NPC_DARK_RUNE_PROTECTOR); + m_uiPhaseTimer = 20000; + break; + case 11: + DoScriptText(SAY_EVENT_B_3, m_creature); + m_uiPhaseTimer = 5000; + break; + case 12: + if (m_pInstance) + m_pInstance->ActivateFace(FACE_MARNAK, false); + m_uiPhaseTimer = 10000; + break; + case 13: + SpawnDwarf(NPC_DARK_RUNE_PROTECTOR); + m_uiPhaseTimer = 10000; + break; + case 14: + SpawnDwarf(NPC_DARK_RUNE_STORMCALLER); + m_uiPhaseTimer = (20000); + break; + case 15: + DoScriptText(SAY_EVENT_C_1, m_creature); + SpawnDwarf(NPC_DARK_RUNE_PROTECTOR); + m_uiPhaseTimer = 10000; + break; + case 16: + SpawnDwarf(NPC_DARK_RUNE_STORMCALLER); + m_uiPhaseTimer = 20000; + break; + + // Activate Abedneum + case 17: + if (m_pInstance) + m_pInstance->DoFaceSpeak(FACE_ABEDNEUM, SAY_EVENT_C_2_ABED); + SpawnDwarf(NPC_DARK_RUNE_PROTECTOR); + m_uiPhaseTimer = 20000; + break; + case 18: + DoScriptText(SAY_EVENT_C_3, m_creature); + m_uiPhaseTimer = 5000; + break; + case 19: + if (m_pInstance) + m_pInstance->ActivateFace(FACE_ABEDNEUM, false); + m_uiPhaseTimer = 5000; + break; + case 20: + SpawnDwarf(NPC_DARK_RUNE_STORMCALLER); + m_uiPhaseTimer = 10000; + break; + case 21: + SpawnDwarf(NPC_DARK_RUNE_PROTECTOR); + m_uiPhaseTimer = 15000; + break; + + case 22: + DoScriptText(SAY_EVENT_D_1, m_creature); + SpawnDwarf(NPC_IRON_GOLEM_CUSTODIAN); + m_uiPhaseTimer = 20000; + break; + case 23: + if (m_pInstance) + m_pInstance->DoFaceSpeak(FACE_ABEDNEUM, SAY_EVENT_D_2_ABED); + SpawnDwarf(NPC_DARK_RUNE_PROTECTOR); + m_uiPhaseTimer = 5000; + break; + case 24: + SpawnDwarf(NPC_DARK_RUNE_STORMCALLER); + m_uiPhaseTimer = 15000; + break; + case 25: + DoScriptText(SAY_EVENT_D_3, m_creature); + SpawnDwarf(NPC_IRON_GOLEM_CUSTODIAN); + m_uiPhaseTimer = 5000; + break; + case 26: + SpawnDwarf(NPC_DARK_RUNE_PROTECTOR); + m_uiPhaseTimer = 5000; + break; + case 27: + SpawnDwarf(NPC_DARK_RUNE_STORMCALLER); + m_uiPhaseTimer = 10000; + break; + case 28: + if (m_pInstance) + m_pInstance->DoFaceSpeak(FACE_ABEDNEUM, SAY_EVENT_D_4_ABED); + SpawnDwarf(NPC_DARK_RUNE_PROTECTOR); + m_uiPhaseTimer = 10000; + break; + + // End Event + case 29: + DoScriptText(SAY_EVENT_END_01, m_creature); + m_creature->SetStandState(UNIT_STAND_STATE_STAND);// TODO TODO + if (m_pInstance) + m_pInstance->SetData(TYPE_TRIBUNAL, SPECIAL); // Kill remaining npcs + SetEscortPaused(false); + m_uiPhaseTimer = 3000; + // break; + // case 30: + if (m_pInstance) + m_pInstance->ActivateFace(FACE_ABEDNEUM, true); + m_uiPhaseTimer = 0; + break; + case 30: + DoScriptText(SAY_EVENT_END_02, m_creature); + m_uiPhaseTimer = 5500; + break; + case 31: + if (m_pInstance) + m_pInstance->DoFaceSpeak(FACE_ABEDNEUM, SAY_EVENT_END_03_ABED); + m_uiPhaseTimer = 8500; + break; + case 32: + DoScriptText(SAY_EVENT_END_04, m_creature); + m_uiPhaseTimer = 11500; + break; + case 33: + if (m_pInstance) + m_pInstance->DoFaceSpeak(FACE_ABEDNEUM, SAY_EVENT_END_05_ABED); + m_uiPhaseTimer = 11500; + break; + case 34: + DoScriptText(SAY_EVENT_END_06, m_creature); + m_uiPhaseTimer = 4500; + break; + case 35: + if (m_pInstance) + m_pInstance->DoFaceSpeak(FACE_ABEDNEUM, SAY_EVENT_END_07_ABED); + m_uiPhaseTimer = 22500; + break; + case 36: + DoScriptText(SAY_EVENT_END_08, m_creature); + m_uiPhaseTimer = 7500; + break; + case 37: + if (m_pInstance) + m_pInstance->DoFaceSpeak(FACE_KADDRAK, SAY_EVENT_END_09_KADD); + m_uiPhaseTimer = 18500; + break; + case 38: + DoScriptText(SAY_EVENT_END_10, m_creature); + m_uiPhaseTimer = 5500; + break; + case 39: + if (m_pInstance) + m_pInstance->DoFaceSpeak(FACE_KADDRAK, SAY_EVENT_END_11_KADD); + m_uiPhaseTimer = 20500; + break; + case 40: + DoScriptText(SAY_EVENT_END_12, m_creature); + m_uiPhaseTimer = 2500; + break; + case 41: + if (m_pInstance) + m_pInstance->DoFaceSpeak(FACE_KADDRAK, SAY_EVENT_END_13_KADD); + m_uiPhaseTimer = 19500; + break; + case 42: + DoScriptText(SAY_EVENT_END_14, m_creature); + m_uiPhaseTimer = 10500; + break; + case 43: + if (m_pInstance) + m_pInstance->DoFaceSpeak(FACE_MARNAK, SAY_EVENT_END_15_MARN); + m_uiPhaseTimer = 6500; + break; + case 44: + DoScriptText(SAY_EVENT_END_16, m_creature); + m_uiPhaseTimer = 6500; + break; + case 45: + if (m_pInstance) + m_pInstance->DoFaceSpeak(FACE_MARNAK, SAY_EVENT_END_17_MARN); + m_uiPhaseTimer = 25500; + break; + case 46: + DoScriptText(SAY_EVENT_END_18, m_creature); + m_uiPhaseTimer = 23500; + break; + case 47: + if (m_pInstance) + m_pInstance->DoFaceSpeak(FACE_MARNAK, SAY_EVENT_END_19_MARN); + m_uiPhaseTimer = 3500; + break; + case 48: + DoScriptText(SAY_EVENT_END_20, m_creature); + m_uiPhaseTimer = 8500; + break; + case 49: + if (m_pInstance) + m_pInstance->DoFaceSpeak(FACE_ABEDNEUM, SAY_EVENT_END_21_ABED); + m_uiPhaseTimer = 5500; + break; + case 50: + { + if (m_pInstance) + { + m_pInstance->DoUseDoorOrButton(m_pInstance->GetData64(GO_TRIBUNAL_FLOOR)); + m_pInstance->SetData(TYPE_TRIBUNAL, DONE); + } + + Player* pPlayer = GetPlayerForEscort(); + if (pPlayer) + pPlayer->GroupEventHappens(QUEST_HALLS_OF_STONE, m_creature); + + m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); + m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER); + + m_uiPhaseTimer = 180000; + break; + } + case 51: + SetEscortPaused(false); + break; + } + ++m_uiStep; + } + else if (m_uiPhaseTimer) + m_uiPhaseTimer -= uiDiff; + + if (!m_bIsLowHP && m_creature->GetHealthPercent() < 30) + { + DoScriptText(SAY_LOW_HEALTH, m_creature); + m_bIsLowHP = true; + } + else if (m_bIsLowHP && m_creature->GetHealthPercent() > 30) + m_bIsLowHP = false; + + // No Combat abilities needed here if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - - DoMeleeAttackIfReady(); } + + // Respawn Handling: Relocate and Set Escort to WP 13 + void JustRespawned() + { + if (!m_pInstance) + return; + + Reset(); + + if (m_pInstance->GetData(TYPE_TRIBUNAL) == IN_PROGRESS) + { + SetEscortPaused(true); + + m_uiStep = 0; + m_uiPhaseTimer = 0; + + m_creature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER); + + // Relocate to position of WP 13 + m_creature->GetMap()->CreatureRelocation(m_creature, 941.101563f, 377.373413f, 207.421f, 3.85f); + + SetCurrentWaypoint(13); + } + } }; bool GossipHello_npc_brann_hos(Player* pPlayer, Creature* pCreature) @@ -150,11 +597,20 @@ bool GossipHello_npc_brann_hos(Player* pPlayer, Creature* pCreature) if (pCreature->isQuestGiver()) pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_START, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - pPlayer->SEND_GOSSIP_MENU(TEXT_ID_START, pCreature->GetObjectGuid()); + if (instance_halls_of_stone* pInstance = (instance_halls_of_stone*)(pCreature->GetInstanceData())) + { + if (pInstance->GetData(TYPE_TRIBUNAL) == NOT_STARTED || pInstance->GetData(TYPE_TRIBUNAL) == FAIL) + { + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_START, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); + pPlayer->SEND_GOSSIP_MENU(TEXT_ID_START, pCreature->GetObjectGuid()); + } + else if (pInstance->GetData(TYPE_TRIBUNAL) == IN_PROGRESS) + { + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_PROGRESS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); + pPlayer->SEND_GOSSIP_MENU(TEXT_ID_PROGRESS, pCreature->GetObjectGuid()); + } + } - //pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_PROGRESS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); - //pPlayer->SEND_GOSSIP_MENU(TEXT_ID_PROGRESS, pCreature->GetObjectGuid()); return true; } @@ -164,9 +620,11 @@ bool GossipSelect_npc_brann_hos(Player* pPlayer, Creature* pCreature, uint32 uiS { case GOSSIP_ACTION_INFO_DEF + 1: if (npc_brann_hosAI* pBrannAi = dynamic_cast (pCreature->AI())) - pBrannAi->Start(false, pPlayer->GetGUID()); + pBrannAi->Start(false, pPlayer); break; case GOSSIP_ACTION_INFO_DEF + 2: + if (npc_brann_hosAI* pBrannAi = dynamic_cast (pCreature->AI())) + pBrannAi->ContinueEvent(); break; } pPlayer->CLOSE_GOSSIP_MENU(); diff --git a/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.h b/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.h index c5854607b..f5437943c 100644 --- a/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.h +++ b/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.h @@ -14,7 +14,7 @@ enum TYPE_KRYSTALLUS = 2, TYPE_SJONNIR = 3, - NPC_BRANN = 28070, + // NPC_BRANN = 28070, NPC_KADDRAK = 30898, NPC_ABEDNEUM = 30899, @@ -45,10 +45,12 @@ enum struct Face { - uint64 m_uiLeftEyeGUID; - uint64 m_uiRightEyeGUID; - uint64 m_uiGoFaceGUID; - uint64 m_uiSpeakerGUID; + Face() : m_bIsActive(false), m_uiTimer(1000) {} + + ObjectGuid m_leftEyeGuid; + ObjectGuid m_rightEyeGuid; + ObjectGuid m_goFaceGuid; + ObjectGuid m_speakerGuid; bool m_bIsActive; uint32 m_uiTimer; }; @@ -78,11 +80,11 @@ class MANGOS_DLL_DECL instance_halls_of_stone : public ScriptedInstance uint32 m_auiEncounter[MAX_ENCOUNTER]; Face m_aFaces[MAX_FACES]; - std::list m_lKaddrakGUIDs; - std::list m_lAbedneumGUIDs; - std::list m_lMarnakGUIDs; - std::list m_lTribunalGUIDs; - std::list m_lWorldtriggerGUIDs; + GUIDList m_lKaddrakGUIDs; + GUIDList m_lAbedneumGUIDs; + GUIDList m_lMarnakGUIDs; + GUIDList m_lTribunalGUIDs; + GUIDList m_lWorldtriggerGUIDs; uint64 m_uiBrannGUID; uint64 m_uiSjonnirDoorGUID; diff --git a/scripts/northrend/ulduar/halls_of_stone/instance_halls_of_stone.cpp b/scripts/northrend/ulduar/halls_of_stone/instance_halls_of_stone.cpp index 08ef224d5..766dce561 100644 --- a/scripts/northrend/ulduar/halls_of_stone/instance_halls_of_stone.cpp +++ b/scripts/northrend/ulduar/halls_of_stone/instance_halls_of_stone.cpp @@ -59,23 +59,12 @@ instance_halls_of_stone::instance_halls_of_stone(Map* pMap) : ScriptedInstance(p void instance_halls_of_stone::Initialize() { memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); - - for (uint8 i = 0; i < MAX_FACES; ++i) - { - m_aFaces[i].m_bIsActive = false; - m_aFaces[i].m_uiGoFaceGUID = 0; - m_aFaces[i].m_uiLeftEyeGUID = 0; - m_aFaces[i].m_uiRightEyeGUID = 0; - m_aFaces[i].m_uiSpeakerGUID = 0; - m_aFaces[i].m_uiTimer = 1000; - } } void instance_halls_of_stone::OnCreatureCreate(Creature* pCreature) { switch(pCreature->GetEntry()) { - case NPC_BRANN: m_uiBrannGUID = pCreature->GetGUID(); break; case NPC_KADDRAK: m_lKaddrakGUIDs.push_back(pCreature->GetGUID()); break; case NPC_ABEDNEUM: m_lAbedneumGUIDs.push_back(pCreature->GetGUID()); break; case NPC_MARNAK: m_lMarnakGUIDs.push_back(pCreature->GetGUID()); break; @@ -99,13 +88,13 @@ void instance_halls_of_stone::OnObjectCreate(GameObject* pGo) m_uiTribunalChestGUID = pGo->GetGUID(); break; case GO_TRIBUNAL_HEAD_RIGHT: - m_aFaces[FACE_MARNAK].m_uiGoFaceGUID = pGo->GetGUID(); + m_aFaces[FACE_MARNAK].m_goFaceGuid = pGo->GetObjectGuid(); break; case GO_TRIBUNAL_HEAD_CENTER: - m_aFaces[FACE_ABEDNEUM].m_uiGoFaceGUID = pGo->GetGUID(); + m_aFaces[FACE_ABEDNEUM].m_goFaceGuid = pGo->GetObjectGuid(); break; case GO_TRIBUNAL_HEAD_LEFT: - m_aFaces[FACE_KADDRAK].m_uiGoFaceGUID = pGo->GetGUID(); + m_aFaces[FACE_KADDRAK].m_goFaceGuid = pGo->GetObjectGuid(); break; case GO_TRIBUNAL_CONSOLE: m_uiTribunalConsoleGUID = pGo->GetGUID(); @@ -125,19 +114,34 @@ void instance_halls_of_stone::SetData(uint32 uiType, uint32 uiData) { case TYPE_TRIBUNAL: m_auiEncounter[0] = uiData; - if (uiData == IN_PROGRESS) - SortFaces(); - if (uiData == DONE) - DoRespawnGameObject(m_uiTribunalChestGUID); - if (uiData == SPECIAL || uiData == FAIL) + switch (uiData) { - for (uint8 i = 0; i < MAX_FACES; ++i) - { - // Shut down the faces - DoUseDoorOrButton(m_aFaces[i].m_uiGoFaceGUID); // TODO, double check, this removes the "red" - m_aFaces[i].m_bIsActive = false; - m_aFaces[i].m_uiTimer = 1000; - } + case IN_PROGRESS: + SortFaces(); + break; + case DONE: + // DoRespawnGameObject(m_uiTribunalChestGUID); + // Actually, this one need to be changed faction or similar.. + break; + case FAIL: + for (uint8 i = 0; i < MAX_FACES; ++i) + { + // Shut down the faces + if (m_aFaces[i].m_bIsActive) + DoUseDoorOrButton(m_aFaces[i].m_goFaceGuid); + m_aFaces[i].m_bIsActive = false; + m_aFaces[i].m_uiTimer = 1000; + } + break; + case SPECIAL: + for (uint8 i = 0; i < MAX_FACES; ++i) + { + m_aFaces[i].m_bIsActive = false; + m_aFaces[i].m_uiTimer = 1000; + // TODO - Kill NPCs + // TODO - Check which stay red and how long (also find out how they get red..) + } + break; } break; case TYPE_MAIDEN: @@ -169,7 +173,6 @@ uint64 instance_halls_of_stone::GetData64(uint32 uiData) { switch(uiData) { - case NPC_BRANN: return m_uiBrannGUID; case GO_DOOR_SJONNIR: return m_uiSjonnirDoorGUID; case GO_DOOR_TRIBUNAL: return m_uiTribunalDoorGUID; case GO_TRIBUNAL_CONSOLE: return m_uiTribunalConsoleGUID; @@ -191,10 +194,10 @@ struct SortHelper }; // Small Helper-function -void GetValidNPCsOfList(Map* pMap, std::list& lGUIDs, std::list& lNPCs) +static void GetValidNPCsOfList(Map* pMap, GUIDList& lGUIDs, std::list& lNPCs) { lNPCs.clear(); - for (std::list::const_iterator itr = lGUIDs.begin(); itr != lGUIDs.end(); ++itr) + for (GUIDList::const_iterator itr = lGUIDs.begin(); itr != lGUIDs.end(); ++itr) { if (Creature* pMob = pMap->GetCreature(*itr)) lNPCs.push_back(pMob); @@ -207,7 +210,7 @@ void instance_halls_of_stone::SortFaces() GameObject* pFace = NULL; // FACE_MARNAK - if (pFace = instance->GetGameObject(m_aFaces[FACE_MARNAK].m_uiGoFaceGUID)) + if (pFace = instance->GetGameObject(m_aFaces[FACE_MARNAK].m_goFaceGuid)) { // Find Marnak NPCs GetValidNPCsOfList(instance, m_lMarnakGUIDs, lPossibleEyes); @@ -215,21 +218,21 @@ void instance_halls_of_stone::SortFaces() { lPossibleEyes.sort(SortHelper(pFace)); std::list::const_iterator itr = lPossibleEyes.begin(); - m_aFaces[FACE_MARNAK].m_uiLeftEyeGUID = (*itr)->GetGUID(); + m_aFaces[FACE_MARNAK].m_leftEyeGuid = (*itr)->GetObjectGuid(); ++itr; - m_aFaces[FACE_MARNAK].m_uiSpeakerGUID = (*itr)->GetGUID(); + m_aFaces[FACE_MARNAK].m_speakerGuid = (*itr)->GetObjectGuid(); } // Find Worldtrigger NPC GetValidNPCsOfList(instance, m_lWorldtriggerGUIDs, lPossibleEyes); if (!lPossibleEyes.empty()) { lPossibleEyes.sort(SortHelper(pFace)); - m_aFaces[FACE_MARNAK].m_uiRightEyeGUID = (*lPossibleEyes.begin())->GetGUID(); + m_aFaces[FACE_MARNAK].m_rightEyeGuid = (*lPossibleEyes.begin())->GetObjectGuid(); } } // FACE_ABEDNEUM - if (pFace = instance->GetGameObject(m_aFaces[FACE_ABEDNEUM].m_uiGoFaceGUID)) + if (pFace = instance->GetGameObject(m_aFaces[FACE_ABEDNEUM].m_goFaceGuid)) { // Find Abedneum NPCs GetValidNPCsOfList(instance, m_lAbedneumGUIDs, lPossibleEyes); @@ -237,21 +240,21 @@ void instance_halls_of_stone::SortFaces() { lPossibleEyes.sort(SortHelper(pFace)); std::list::const_iterator itr = lPossibleEyes.begin(); - m_aFaces[FACE_ABEDNEUM].m_uiLeftEyeGUID = (*itr)->GetGUID(); + m_aFaces[FACE_ABEDNEUM].m_leftEyeGuid = (*itr)->GetObjectGuid(); ++itr; - m_aFaces[FACE_ABEDNEUM].m_uiSpeakerGUID = (*itr)->GetGUID(); + m_aFaces[FACE_ABEDNEUM].m_speakerGuid = (*itr)->GetObjectGuid(); } // Find Worldtrigger NPC GetValidNPCsOfList(instance, m_lWorldtriggerGUIDs, lPossibleEyes); if (!lPossibleEyes.empty()) { lPossibleEyes.sort(SortHelper(pFace)); - m_aFaces[FACE_ABEDNEUM].m_uiRightEyeGUID = (*lPossibleEyes.begin())->GetGUID(); + m_aFaces[FACE_ABEDNEUM].m_rightEyeGuid = (*lPossibleEyes.begin())->GetObjectGuid(); } } // FACE_KADDRAK - if (pFace = instance->GetGameObject(m_aFaces[FACE_KADDRAK].m_uiGoFaceGUID)) + if (pFace = instance->GetGameObject(m_aFaces[FACE_KADDRAK].m_goFaceGuid)) { // Find Marnak NPCs GetValidNPCsOfList(instance, m_lKaddrakGUIDs, lPossibleEyes); @@ -259,16 +262,16 @@ void instance_halls_of_stone::SortFaces() { lPossibleEyes.sort(SortHelper(pFace)); std::list::const_iterator itr = lPossibleEyes.begin(); - m_aFaces[FACE_KADDRAK].m_uiLeftEyeGUID = (*itr)->GetGUID(); + m_aFaces[FACE_KADDRAK].m_leftEyeGuid = (*itr)->GetObjectGuid(); ++itr; - m_aFaces[FACE_KADDRAK].m_uiSpeakerGUID = (*itr)->GetGUID(); + m_aFaces[FACE_KADDRAK].m_speakerGuid = (*itr)->GetObjectGuid(); } // Find Tribunal NPC GetValidNPCsOfList(instance, m_lTribunalGUIDs, lPossibleEyes); if (!lPossibleEyes.empty()) { lPossibleEyes.sort(SortHelper(pFace)); - m_aFaces[FACE_KADDRAK].m_uiRightEyeGUID = (*lPossibleEyes.begin())->GetGUID(); + m_aFaces[FACE_KADDRAK].m_rightEyeGuid = (*lPossibleEyes.begin())->GetObjectGuid(); } } @@ -286,10 +289,10 @@ void instance_halls_of_stone::ActivateFace(uint8 uiFace, bool bAfterEvent) return; if (bAfterEvent) - DoUseDoorOrButton(m_aFaces[uiFace].m_uiGoFaceGUID); + DoUseDoorOrButton(m_aFaces[uiFace].m_goFaceGuid); else { - DoUseDoorOrButton(m_aFaces[uiFace].m_uiGoFaceGUID, 0, true); + DoUseDoorOrButton(m_aFaces[uiFace].m_goFaceGuid, 0, true); m_aFaces[uiFace].m_bIsActive = true; } } @@ -299,7 +302,7 @@ void instance_halls_of_stone::DoFaceSpeak(uint8 uiFace, int32 iTextId) if (uiFace >= MAX_FACES) return; - if (Creature* pSpeaker = instance->GetCreature(m_aFaces[uiFace].m_uiSpeakerGUID)) + if (Creature* pSpeaker = instance->GetCreature(m_aFaces[uiFace].m_speakerGuid)) DoScriptText(iTextId, pSpeaker); } @@ -326,35 +329,31 @@ void instance_halls_of_stone::ProcessFace(uint8 uiFace) switch (uiFace) { case FACE_KADDRAK: - if (Creature* pEye = instance->GetCreature(m_aFaces[uiFace].m_uiLeftEyeGUID)) + if (Creature* pEye = instance->GetCreature(m_aFaces[uiFace].m_leftEyeGuid)) pEye->CastSpell(pEye, instance->IsRegularDifficulty() ? SPELL_GLARE_OF_THE_TRIBUNAL : SPELL_GLARE_OF_THE_TRIBUNAL_H, true); - if (Creature* pEye = instance->GetCreature(m_aFaces[uiFace].m_uiRightEyeGUID)) + if (Creature* pEye = instance->GetCreature(m_aFaces[uiFace].m_rightEyeGuid)) pEye->CastSpell(pEye, instance->IsRegularDifficulty() ? SPELL_GLARE_OF_THE_TRIBUNAL : SPELL_GLARE_OF_THE_TRIBUNAL_H, true); m_aFaces[uiFace].m_uiTimer = 1500; // TODO, verify break; case FACE_MARNAK: - if (Creature* pEye = instance->GetCreature(m_aFaces[uiFace].m_uiLeftEyeGUID)) + if (Creature* pEye = instance->GetCreature(m_aFaces[uiFace].m_leftEyeGuid)) pEye->CastSpell(pEye, SPELL_SUMMON_DARK_MATTER_TARGET, true); // One should be enough.. - //if (Creature* pEye = instance->GetCreature(m_aFaces[uiFace].m_uiRightEyeGUID)) + //if (Creature* pEye = instance->GetCreature(m_aFaces[uiFace].m_rightEyeGuid)) // pEye->CastSpell(pEye, SPELL_SUMMON_DARK_MATTER_TARGET, true); m_aFaces[uiFace].m_uiTimer = 6000; // TODO, verify, was 3s+0..1s break; case FACE_ABEDNEUM: - if (Creature* pEye = instance->GetCreature(m_aFaces[uiFace].m_uiLeftEyeGUID)) + if (Creature* pEye = instance->GetCreature(m_aFaces[uiFace].m_leftEyeGuid)) pEye->CastSpell(pEye, SPELL_SUMMON_SEARING_GAZE_TARGET, true); // One should be enough.. - //if (Creature* pEye = instance->GetCreature(m_aFaces[uiFace].m_uiRightEyeGUID)) + //if (Creature* pEye = instance->GetCreature(m_aFaces[uiFace].m_rightEyeGuid)) // pEye->CastSpell(pEye, SPELL_SUMMON_SEARING_GAZE_TARGET, true); m_aFaces[uiFace].m_uiTimer = 6000; // TODO, verify, was 3s+0..2s break; default: return; } - if (Creature* pEye = instance->GetCreature(m_aFaces[uiFace].m_uiLeftEyeGUID)) - pEye->MonsterSay("debug: Left Eye", 0); - if (Creature* pEye = instance->GetCreature(m_aFaces[uiFace].m_uiRightEyeGUID)) - pEye->MonsterSay("debug: Right Eye", 0); } InstanceData* GetInstanceData_instance_halls_of_stone(Map* pMap) diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index ffcad42a5..902a2c21d 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2202" + #define SD2_REVISION_NR "2203" #endif // __SD2_REVISION_NR_H__ From c67a700d1680a76be2b6efaebac98bc22c518bf6 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Sun, 5 Jun 2011 17:42:53 +0200 Subject: [PATCH 0184/1172] [2204] Use EntryGuidMap-Storage in Halls of Stone --- .../ulduar/halls_of_stone/halls_of_stone.cpp | 8 ++-- .../ulduar/halls_of_stone/halls_of_stone.h | 9 ---- .../instance_halls_of_stone.cpp | 45 ++++--------------- sd2_revision_nr.h | 2 +- 4 files changed, 14 insertions(+), 50 deletions(-) diff --git a/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.cpp b/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.cpp index e0dc69549..c8ef2eff1 100644 --- a/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.cpp +++ b/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.cpp @@ -236,9 +236,9 @@ struct MANGOS_DLL_DECL npc_brann_hosAI : public npc_escortAI SetEscortPaused(true); if (m_pInstance) { - if (GameObject* pKonsole = m_pInstance->instance->GetGameObject(m_pInstance->GetData64(GO_TRIBUNAL_CONSOLE))) + if (GameObject* pKonsole = m_pInstance->GetSingleGameObjectFromStorage(GO_TRIBUNAL_CONSOLE)) m_creature->SetFacingToObject(pKonsole); - m_pInstance->DoUseDoorOrButton(m_pInstance->GetData64(GO_TRIBUNAL_FLOOR)); + m_pInstance->DoUseDoorOrButton(GO_TRIBUNAL_FLOOR); } m_uiPhaseTimer = 1000; break; @@ -292,7 +292,7 @@ struct MANGOS_DLL_DECL npc_brann_hosAI : public npc_escortAI break; case 2: if (m_pInstance) - m_pInstance->DoUseDoorOrButton(m_pInstance->GetData64(GO_TRIBUNAL_CONSOLE)); + m_pInstance->DoUseDoorOrButton(GO_TRIBUNAL_CONSOLE); m_uiPhaseTimer = 6500; break; case 3: @@ -531,7 +531,7 @@ struct MANGOS_DLL_DECL npc_brann_hosAI : public npc_escortAI { if (m_pInstance) { - m_pInstance->DoUseDoorOrButton(m_pInstance->GetData64(GO_TRIBUNAL_FLOOR)); + m_pInstance->DoUseDoorOrButton(GO_TRIBUNAL_FLOOR); m_pInstance->SetData(TYPE_TRIBUNAL, DONE); } diff --git a/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.h b/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.h index f5437943c..1a4b58a41 100644 --- a/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.h +++ b/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.h @@ -66,7 +66,6 @@ class MANGOS_DLL_DECL instance_halls_of_stone : public ScriptedInstance void SetData(uint32 uiType, uint32 uiData); uint32 GetData(uint32 uiType); - uint64 GetData64(uint32 uiData); void Update(uint32 uiDiff); @@ -85,14 +84,6 @@ class MANGOS_DLL_DECL instance_halls_of_stone : public ScriptedInstance GUIDList m_lMarnakGUIDs; GUIDList m_lTribunalGUIDs; GUIDList m_lWorldtriggerGUIDs; - - uint64 m_uiBrannGUID; - uint64 m_uiSjonnirDoorGUID; - uint64 m_uiTribunalDoorGUID; - uint64 m_uiTribunalChestGUID; - uint64 m_uiTribunalConsoleGUID; - uint64 m_uiTribunalFloorGUID; - uint64 m_uiSjonnirConsoleGUID; }; #endif diff --git a/scripts/northrend/ulduar/halls_of_stone/instance_halls_of_stone.cpp b/scripts/northrend/ulduar/halls_of_stone/instance_halls_of_stone.cpp index 766dce561..8ea90f585 100644 --- a/scripts/northrend/ulduar/halls_of_stone/instance_halls_of_stone.cpp +++ b/scripts/northrend/ulduar/halls_of_stone/instance_halls_of_stone.cpp @@ -43,15 +43,7 @@ enum // NPC_SEARING_GAZE_TARGET = 28265, }; -instance_halls_of_stone::instance_halls_of_stone(Map* pMap) : ScriptedInstance(pMap), - m_uiBrannGUID(0), - - m_uiSjonnirDoorGUID(0), - m_uiTribunalDoorGUID(0), - m_uiTribunalChestGUID(0), - m_uiTribunalConsoleGUID(0), - m_uiTribunalFloorGUID(0), - m_uiSjonnirConsoleGUID(0) +instance_halls_of_stone::instance_halls_of_stone(Map* pMap) : ScriptedInstance(pMap) { Initialize(); } @@ -78,34 +70,29 @@ void instance_halls_of_stone::OnObjectCreate(GameObject* pGo) switch(pGo->GetEntry()) { case GO_DOOR_SJONNIR: - m_uiSjonnirDoorGUID = pGo->GetGUID(); break; case GO_DOOR_TRIBUNAL: - m_uiTribunalDoorGUID = pGo->GetGUID(); - break; case GO_TRIBUNAL_CHEST: case GO_TRIBUNAL_CHEST_H: - m_uiTribunalChestGUID = pGo->GetGUID(); break; case GO_TRIBUNAL_HEAD_RIGHT: m_aFaces[FACE_MARNAK].m_goFaceGuid = pGo->GetObjectGuid(); - break; + return; case GO_TRIBUNAL_HEAD_CENTER: m_aFaces[FACE_ABEDNEUM].m_goFaceGuid = pGo->GetObjectGuid(); - break; + return; case GO_TRIBUNAL_HEAD_LEFT: m_aFaces[FACE_KADDRAK].m_goFaceGuid = pGo->GetObjectGuid(); - break; + return; case GO_TRIBUNAL_CONSOLE: - m_uiTribunalConsoleGUID = pGo->GetGUID(); - break; case GO_TRIBUNAL_FLOOR: - m_uiTribunalFloorGUID = pGo->GetGUID(); - break; case GO_SJONNIR_CONSOLE: - m_uiSjonnirConsoleGUID = pGo->GetGUID(); break; + + default: + return; } + m_mGoEntryGuidStore[pGo->GetEntry()] = pGo->GetObjectGuid(); } void instance_halls_of_stone::SetData(uint32 uiType, uint32 uiData) @@ -120,7 +107,7 @@ void instance_halls_of_stone::SetData(uint32 uiType, uint32 uiData) SortFaces(); break; case DONE: - // DoRespawnGameObject(m_uiTribunalChestGUID); + // DoRespawnGameObject(instance->isRegularDifficulty ? GO_TRIBUNAL_CHEST : GO_TRIBUNAL_CHEST_H); // Actually, this one need to be changed faction or similar.. break; case FAIL: @@ -169,20 +156,6 @@ uint32 instance_halls_of_stone::GetData(uint32 uiType) } } -uint64 instance_halls_of_stone::GetData64(uint32 uiData) -{ - switch(uiData) - { - case GO_DOOR_SJONNIR: return m_uiSjonnirDoorGUID; - case GO_DOOR_TRIBUNAL: return m_uiTribunalDoorGUID; - case GO_TRIBUNAL_CONSOLE: return m_uiTribunalConsoleGUID; - case GO_TRIBUNAL_FLOOR: return m_uiTribunalFloorGUID; - case GO_SJONNIR_CONSOLE: return m_uiSjonnirConsoleGUID; - default: - return 0; - } -} - struct SortHelper { SortHelper(WorldObject const* pRef): m_pRef(pRef) {} diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 902a2c21d..cd277b8f0 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2203" + #define SD2_REVISION_NR "2204" #endif // __SD2_REVISION_NR_H__ From d1872d74a5e814fc0acc7a5e954e3957ba37f1af Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Sun, 5 Jun 2011 18:51:00 +0200 Subject: [PATCH 0185/1172] [2205] Remove remaining uint64->ObjectGuid guid variables in Northrend --- scripts/northrend/naxxramas/boss_maexxna.cpp | 17 +++++++---------- .../halls_of_lightning/boss_bjarngrim.cpp | 5 ++--- sd2_revision_nr.h | 2 +- 3 files changed, 10 insertions(+), 14 deletions(-) diff --git a/scripts/northrend/naxxramas/boss_maexxna.cpp b/scripts/northrend/naxxramas/boss_maexxna.cpp index a516a0a8d..e1a51a9e3 100644 --- a/scripts/northrend/naxxramas/boss_maexxna.cpp +++ b/scripts/northrend/naxxramas/boss_maexxna.cpp @@ -66,31 +66,28 @@ struct MANGOS_DLL_DECL npc_web_wrapAI : public ScriptedAI { npc_web_wrapAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } - uint64 m_uiVictimGUID; + ObjectGuid m_victimGuid; - void Reset() - { - m_uiVictimGUID = 0; - } + void Reset() {} - void MoveInLineOfSight(Unit* pWho) { } - void AttackStart(Unit* pWho) { } + void MoveInLineOfSight(Unit* pWho) {} + void AttackStart(Unit* pWho) {} void SetVictim(Unit* pVictim) { if (pVictim) { DoTeleportPlayer(pVictim, m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), pVictim->GetOrientation()); - m_uiVictimGUID = pVictim->GetGUID(); + m_victimGuid = pVictim->GetObjectGuid(); pVictim->CastSpell(pVictim, SPELL_WEBWRAP, true); } } void JustDied(Unit* pKiller) { - if (m_uiVictimGUID) + if (m_victimGuid) { - if (Player* pVictim = m_creature->GetMap()->GetPlayer(m_uiVictimGUID)) + if (Player* pVictim = m_creature->GetMap()->GetPlayer(m_victimGuid)) { if (pVictim->isAlive()) pVictim->RemoveAurasDueToSpell(SPELL_WEBWRAP); diff --git a/scripts/northrend/ulduar/halls_of_lightning/boss_bjarngrim.cpp b/scripts/northrend/ulduar/halls_of_lightning/boss_bjarngrim.cpp index a420adf23..767fa144f 100644 --- a/scripts/northrend/ulduar/halls_of_lightning/boss_bjarngrim.cpp +++ b/scripts/northrend/ulduar/halls_of_lightning/boss_bjarngrim.cpp @@ -79,7 +79,6 @@ struct MANGOS_DLL_DECL boss_bjarngrimAI : public ScriptedAI m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); m_uiStance = STANCE_DEFENSIVE; - memset(&m_auiStormforgedLieutenantGUID, 0, sizeof(m_auiStormforgedLieutenantGUID)); Reset(); } @@ -106,7 +105,7 @@ struct MANGOS_DLL_DECL boss_bjarngrimAI : public ScriptedAI uint32 m_uiMortalStrike_Timer; uint32 m_uiSlam_Timer; - uint64 m_auiStormforgedLieutenantGUID[2]; + ObjectGuid m_aStormforgedLieutenantGuid[2]; // TODO - not filled yet. void Reset() { @@ -131,7 +130,7 @@ struct MANGOS_DLL_DECL boss_bjarngrimAI : public ScriptedAI for(uint8 i = 0; i < 2; ++i) { - if (Creature* pStormforgedLieutenant = m_creature->GetMap()->GetCreature(m_auiStormforgedLieutenantGUID[i])) + if (Creature* pStormforgedLieutenant = m_creature->GetMap()->GetCreature(m_aStormforgedLieutenantGuid[i])) { if (!pStormforgedLieutenant->isAlive()) pStormforgedLieutenant->Respawn(); diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index cd277b8f0..bb255f458 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2204" + #define SD2_REVISION_NR "2205" #endif // __SD2_REVISION_NR_H__ From 4255a718c5f4eaad17c84a348e054831c71e343b Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Mon, 6 Jun 2011 00:47:24 +0200 Subject: [PATCH 0186/1172] [2206] Use EntryGuidMap-Storage in Black Temple * Illidari council: Remove explicit storing of guids (they are stored in instance script) * Illidari council: Rough cleanup * Fix two bugs in npc_akama_illidanAI::DeleteFromThreatList() Please reports freshly introduced bugs.. --- scripts/outland/black_temple/black_temple.h | 28 +- .../outland/black_temple/boss_bloodboil.cpp | 14 +- scripts/outland/black_temple/boss_illidan.cpp | 35 +- .../black_temple/boss_mother_shahraz.cpp | 14 +- .../black_temple/boss_reliquary_of_souls.cpp | 77 +- .../black_temple/boss_shade_of_akama.cpp | 39 +- .../outland/black_temple/boss_supremus.cpp | 8 +- .../black_temple/boss_teron_gorefiend.cpp | 44 +- .../outland/black_temple/illidari_council.cpp | 784 +++++++++--------- .../black_temple/instance_black_temple.cpp | 132 +-- sd2_revision_nr.h | 2 +- 11 files changed, 540 insertions(+), 637 deletions(-) diff --git a/scripts/outland/black_temple/black_temple.h b/scripts/outland/black_temple/black_temple.h index aba7fe543..3ad7fac2c 100644 --- a/scripts/outland/black_temple/black_temple.h +++ b/scripts/outland/black_temple/black_temple.h @@ -19,8 +19,8 @@ enum TYPE_COUNCIL = 7, TYPE_ILLIDAN = 8, - NPC_WARLORD_NAJENTUS = 22887, - NPC_SUPREMUS = 22898, + // NPC_WARLORD_NAJENTUS = 22887, + // NPC_SUPREMUS = 22898, NPC_SHADE_OF_AKAMA = 22841, NPC_AKAMA_SHADE = 22990, NPC_ILLIDARI_COUNCIL = 23426, @@ -69,28 +69,8 @@ class MANGOS_DLL_DECL instance_black_temple : public ScriptedInstance uint32 m_auiEncounter[MAX_ENCOUNTER]; std::string m_strInstData; - uint64 m_uiNajentusGUID; - uint64 m_uiAkamaGUID; // This is the Akama that starts the Illidan encounter. - uint64 m_uiAkama_ShadeGUID; // This is the Akama that starts the Shade of Akama encounter. - uint64 m_uiShadeOfAkamaGUID; - uint64 m_uiSupremusGUID; - uint64 m_uiLadyMalandeGUID; - uint64 m_uiGathiosTheShattererGUID; - uint64 m_uiHighNethermancerZerevorGUID; - uint64 m_uiVerasDarkshadowGUID; - uint64 m_uiIllidariCouncilGUID; - uint64 m_uiBloodElfCouncilVoiceGUID; - uint64 m_uiIllidanStormrageGUID; - - uint64 m_uiNajentusGateGUID; - uint64 m_uiMainTempleDoorsGUID; - uint64 m_uiShadeAkamaDoorGUID; - uint64 m_uiIllidanGateGUID; - uint64 m_uiIllidanDoorGUID[2]; - uint64 m_uiShahrazPreDoorGUID; - uint64 m_uiShahrazPostDoorGUID; - uint64 m_uiPreCouncilDoorGUID; - uint64 m_uiCouncilDoorGUID; + ObjectGuid m_akamaGuid; // This is the Akama that starts the Illidan encounter. + ObjectGuid m_illidanStormrageGuid; }; #endif diff --git a/scripts/outland/black_temple/boss_bloodboil.cpp b/scripts/outland/black_temple/boss_bloodboil.cpp index 6e8da16f8..f8c7be6a5 100644 --- a/scripts/outland/black_temple/boss_bloodboil.cpp +++ b/scripts/outland/black_temple/boss_bloodboil.cpp @@ -62,7 +62,7 @@ struct MANGOS_DLL_DECL boss_gurtogg_bloodboilAI : public ScriptedAI ScriptedInstance* m_pInstance; - uint64 TargetGUID; + ObjectGuid m_targetGuid; float TargetThreat; @@ -82,7 +82,7 @@ struct MANGOS_DLL_DECL boss_gurtogg_bloodboilAI : public ScriptedAI void Reset() { - TargetGUID = 0; + m_targetGuid.Clear(); TargetThreat = 0; @@ -176,7 +176,7 @@ struct MANGOS_DLL_DECL boss_gurtogg_bloodboilAI : public ScriptedAI }*/ } - void RevertThreatOnTarget(uint64 guid) + void RevertThreatOnTarget(ObjectGuid guid) { if (Player* pPlayer = m_creature->GetMap()->GetPlayer(guid)) { @@ -277,7 +277,7 @@ struct MANGOS_DLL_DECL boss_gurtogg_bloodboilAI : public ScriptedAI Phase1 = false; TargetThreat = m_creature->getThreatManager().getThreat(target); - TargetGUID = target->GetGUID(); + m_targetGuid = target->GetObjectGuid(); target->CastSpell(m_creature, SPELL_TAUNT_GURTOGG, true); if (m_creature->getThreatManager().getThreat(target)) @@ -304,10 +304,10 @@ struct MANGOS_DLL_DECL boss_gurtogg_bloodboilAI : public ScriptedAI } }else // Encounter is a loop pretty much. Phase 1 -> Phase 2 -> Phase 1 -> Phase 2 till death or enrage { - if (TargetGUID) - RevertThreatOnTarget(TargetGUID); + if (m_targetGuid) + RevertThreatOnTarget(m_targetGuid); - TargetGUID = 0; + m_targetGuid.Clear(); Phase1 = true; BloodboilTimer = 10000; BloodboilCount = 0; diff --git a/scripts/outland/black_temple/boss_illidan.cpp b/scripts/outland/black_temple/boss_illidan.cpp index 618e43083..3dc5fc348 100644 --- a/scripts/outland/black_temple/boss_illidan.cpp +++ b/scripts/outland/black_temple/boss_illidan.cpp @@ -350,7 +350,7 @@ struct MANGOS_DLL_DECL demonfireAI : public ScriptedAI { if (!m_illidanGuid && m_pInstance) { - if (Creature* pIllidan = m_pInstance->instance->GetCreature(m_pInstance->GetData64(NPC_ILLIDAN_STORMRAGE))) + if (Creature* pIllidan = m_pInstance->instance->GetCreature(m_pInstance->GetGuid(NPC_ILLIDAN_STORMRAGE))) { m_illidanGuid = m_pInstance->GetGuid(NPC_ILLIDAN_STORMRAGE); @@ -422,7 +422,7 @@ struct MANGOS_DLL_DECL npc_akama_illidanAI : public ScriptedAI if (m_pInstance) { m_pInstance->SetData(TYPE_ILLIDAN, NOT_STARTED); - GameObject* pGate = m_pInstance->instance->GetGameObject(m_pInstance->GetData64(GO_ILLIDAN_GATE)); + GameObject* pGate = m_pInstance->GetSingleGameObjectFromStorage(GO_ILLIDAN_GATE); // close door if already open (when raid wipes or something) if (pGate && !pGate->GetGoState()) @@ -430,7 +430,7 @@ struct MANGOS_DLL_DECL npc_akama_illidanAI : public ScriptedAI for(uint32 i = GO_ILLIDAN_DOOR_R; i < GO_ILLIDAN_DOOR_L + 1; ++i) { - if (GameObject* pDoor = m_pInstance->instance->GetGameObject(m_pInstance->GetData64(i))) + if (GameObject* pDoor = m_pInstance->GetSingleGameObjectFromStorage(i)) pDoor->SetGoState(GO_STATE_ACTIVE); } } @@ -522,7 +522,7 @@ struct MANGOS_DLL_DECL npc_akama_illidanAI : public ScriptedAI debug_log("SD2: Akama - Door event initiated by player %s", pPlayer->GetObjectGuid().GetString().c_str()); m_playerGuid = pPlayer->GetObjectGuid(); - if (GameObject* pGate = m_pInstance->instance->GetGameObject(m_pInstance->GetData64(GO_ILLIDAN_GATE))) + if (GameObject* pGate = m_pInstance->GetSingleGameObjectFromStorage(GO_ILLIDAN_GATE)) { float x,y,z; pGate->GetPosition(x, y, z); @@ -571,7 +571,7 @@ struct MANGOS_DLL_DECL npc_akama_illidanAI : public ScriptedAI // open the doors that close the summit for(uint32 i = GO_ILLIDAN_DOOR_R; i < GO_ILLIDAN_DOOR_L+1; ++i) { - if (GameObject* pDoor = m_pInstance->instance->GetGameObject(m_pInstance->GetData64(i))) + if (GameObject* pDoor = m_pInstance->GetSingleGameObjectFromStorage(i)) pDoor->SetGoState(GO_STATE_ACTIVE); } } @@ -625,19 +625,21 @@ struct MANGOS_DLL_DECL npc_akama_illidanAI : public ScriptedAI if (!Illidan) return; - ThreatList const& tList = m_creature->getThreatManager().getThreatList(); + ThreatList const& tList = Illidan->getThreatManager().getThreatList(); for (ThreatList::const_iterator itr = tList.begin();itr != tList.end(); ++itr) { - // Loop through threatlist till our GUID is found in it. + // Loop through threatlist till our Guid is found in it. if ((*itr)->getUnitGuid() == m_creature->GetObjectGuid()) { (*itr)->removeReference(); // Delete ourself from his threatlist. - return; // No need to continue anymore. + break; // No need to continue anymore. } } // Now we delete our threatlist to prevent attacking anyone for now m_creature->DeleteThreatList(); + // Also we remove all auras, to prevent delayed damage + m_creature->RemoveAllAuras(); } void UpdateAI(const uint32 diff) @@ -693,7 +695,7 @@ struct MANGOS_DLL_DECL npc_akama_illidanAI : public ScriptedAI }else { if (m_pInstance) - m_illidanGuid = m_pInstance->GetData64(NPC_ILLIDAN_STORMRAGE); + m_illidanGuid = m_pInstance->GetGuid(NPC_ILLIDAN_STORMRAGE); } if (m_bIsWalking && m_uiWalkTimer) @@ -729,7 +731,7 @@ struct MANGOS_DLL_DECL npc_akama_illidanAI : public ScriptedAI } } - if (GameObject* pGate = m_pInstance->instance->GetGameObject(m_pInstance->GetData64(GO_ILLIDAN_GATE))) + if (GameObject* pGate = m_pInstance->GetSingleGameObjectFromStorage(GO_ILLIDAN_GATE)) pGate->SetGoState(GO_STATE_ACTIVE); ++m_uiChannelCount; @@ -1056,7 +1058,7 @@ struct MANGOS_DLL_DECL boss_illidan_stormrageAI : public ScriptedAI for(uint32 i = GO_ILLIDAN_DOOR_R; i < GO_ILLIDAN_DOOR_L + 1; ++i) { // Open Doors - if (GameObject* pDoor = m_pInstance->instance->GetGameObject(m_pInstance->GetData64(i))) + if (GameObject* pDoor = m_pInstance->GetSingleGameObjectFromStorage(i)) pDoor->SetGoState(GO_STATE_ACTIVE); } @@ -1961,7 +1963,7 @@ struct MANGOS_DLL_DECL boss_illidan_stormrageAI : public ScriptedAI ++m_uiDemonFormSequence; } else - m_uiAnimationTimer -= uiDiff; + m_uiAnimationTimer -= uiDiff; } } }; @@ -1973,17 +1975,14 @@ void npc_akama_illidanAI::BeginEvent(ObjectGuid playerGuid) debug_log("SD2: Akama - Illidan Introduction started. Illidan event properly begun."); if (m_pInstance) { - m_illidanGuid = m_pInstance->GetData64(NPC_ILLIDAN_STORMRAGE); + m_illidanGuid = m_pInstance->GetGuid(NPC_ILLIDAN_STORMRAGE); m_pInstance->SetData(TYPE_ILLIDAN, IN_PROGRESS); } if (m_pInstance) { - for(uint32 i = GO_ILLIDAN_DOOR_R; i < GO_ILLIDAN_DOOR_L+1; ++i) - { - if (GameObject* pDoor = m_pInstance->instance->GetGameObject(m_pInstance->GetData64(i))) - pDoor->SetGoState(GO_STATE_READY); - } + m_pInstance->DoUseDoorOrButton(GO_ILLIDAN_DOOR_R); + m_pInstance->DoUseDoorOrButton(GO_ILLIDAN_DOOR_L); } if (m_illidanGuid) diff --git a/scripts/outland/black_temple/boss_mother_shahraz.cpp b/scripts/outland/black_temple/boss_mother_shahraz.cpp index b5234993d..ee6cb4533 100644 --- a/scripts/outland/black_temple/boss_mother_shahraz.cpp +++ b/scripts/outland/black_temple/boss_mother_shahraz.cpp @@ -86,7 +86,7 @@ struct MANGOS_DLL_DECL boss_shahrazAI : public ScriptedAI ScriptedInstance* m_pInstance; - uint64 TargetGUID[3]; + ObjectGuid m_targetGuid[3]; uint32 BeamTimer; uint32 BeamCount; uint32 CurrentBeam; @@ -102,8 +102,8 @@ struct MANGOS_DLL_DECL boss_shahrazAI : public ScriptedAI void Reset() { - for(uint8 i = 0; i<3; ++i) - TargetGUID[i] = 0; + for (uint8 i = 0; i < 3; ++i) + m_targetGuid[i].Clear(); BeamTimer = 60000; // Timers may be incorrect BeamCount = 0; @@ -158,7 +158,7 @@ struct MANGOS_DLL_DECL boss_shahrazAI : public ScriptedAI Unit* pUnit = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1); if (pUnit && pUnit->isAlive() && (pUnit->GetTypeId() == TYPEID_PLAYER)) { - TargetGUID[i] = pUnit->GetGUID(); + m_targetGuid[i] = pUnit->GetObjectGuid(); pUnit->CastSpell(pUnit, SPELL_TELEPORT_VISUAL, true); DoTeleportPlayer(pUnit, X, Y, Z, pUnit->GetOrientation()); } @@ -239,12 +239,12 @@ struct MANGOS_DLL_DECL boss_shahrazAI : public ScriptedAI { for(uint8 i = 0; i < 3; ++i) { - if (TargetGUID[i]) + if (m_targetGuid[i]) { - if (Player* pPlayer = m_creature->GetMap()->GetPlayer(TargetGUID[i])) + if (Player* pPlayer = m_creature->GetMap()->GetPlayer(m_targetGuid[i])) pPlayer->CastSpell(pPlayer, SPELL_ATTRACTION, true); - TargetGUID[i] = 0; + m_targetGuid[i].Clear(); } } diff --git a/scripts/outland/black_temple/boss_reliquary_of_souls.cpp b/scripts/outland/black_temple/boss_reliquary_of_souls.cpp index 5145a5e8a..ab026bfad 100644 --- a/scripts/outland/black_temple/boss_reliquary_of_souls.cpp +++ b/scripts/outland/black_temple/boss_reliquary_of_souls.cpp @@ -98,11 +98,11 @@ struct MANGOS_DLL_DECL npc_enslaved_soulAI : public ScriptedAI { npc_enslaved_soulAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} - uint64 ReliquaryGUID; + ObjectGuid m_reliquaryGuid; void Reset() { - ReliquaryGUID = 0; + m_reliquaryGuid.Clear(); } void DamageTaken(Unit *done_by, uint32 &damage) @@ -132,18 +132,15 @@ struct MANGOS_DLL_DECL boss_reliquary_of_soulsAI : public ScriptedAI { boss_reliquary_of_soulsAI(Creature* pCreature) : ScriptedAI(pCreature) { - SufferingGUID = 0; - DesireGUID = 0; - AngerGUID = 0; m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); Reset(); } ScriptedInstance* m_pInstance; - uint64 SufferingGUID; - uint64 DesireGUID; - uint64 AngerGUID; + ObjectGuid m_sufferingGuid; + ObjectGuid m_desireGuid; + ObjectGuid m_angerGuid; uint32 SoulDeathCount; // 0 = Out of Combat, 1 = Not started, 2 = Suffering, 3 = Souls, 4 = Desire, 5 = Souls, 6 = Anger @@ -188,12 +185,12 @@ struct MANGOS_DLL_DECL boss_reliquary_of_soulsAI : public ScriptedAI { Creature* pEssence = NULL; - if (SufferingGUID) - pEssence = m_creature->GetMap()->GetCreature(SufferingGUID); - else if (DesireGUID) - pEssence = m_creature->GetMap()->GetCreature(DesireGUID); - else if (AngerGUID) - pEssence = m_creature->GetMap()->GetCreature(AngerGUID); + if (m_sufferingGuid) + pEssence = m_creature->GetMap()->GetCreature(m_sufferingGuid); + else if (m_desireGuid) + pEssence = m_creature->GetMap()->GetCreature(m_desireGuid); + else if (m_angerGuid) + pEssence = m_creature->GetMap()->GetCreature(m_angerGuid); if (pEssence && pEssence->isAlive()) pEssence->ForcedDespawn(); @@ -242,7 +239,7 @@ struct MANGOS_DLL_DECL boss_reliquary_of_soulsAI : public ScriptedAI if (target && Soul) { if (npc_enslaved_soulAI* pSoulAI = dynamic_cast(Soul->AI())) - pSoulAI->ReliquaryGUID = m_creature->GetGUID(); + pSoulAI->m_reliquaryGuid = m_creature->GetObjectGuid(); Soul->CastSpell(Soul, ENSLAVED_SOUL_PASSIVE, true); Soul->AddThreat(target); @@ -309,7 +306,7 @@ struct MANGOS_DLL_DECL boss_reliquary_of_soulsAI : public ScriptedAI EssenceSuffering->AI()->AttackStart(target); } - SufferingGUID = EssenceSuffering->GetGUID(); + m_sufferingGuid = EssenceSuffering->GetObjectGuid(); } EndingPhase = false; @@ -319,9 +316,9 @@ struct MANGOS_DLL_DECL boss_reliquary_of_soulsAI : public ScriptedAI if (Phase == 2) { - if (SufferingGUID) + if (m_sufferingGuid) { - Creature* EssenceSuffering = m_creature->GetMap()->GetCreature(SufferingGUID); + Creature* EssenceSuffering = m_creature->GetMap()->GetCreature(m_sufferingGuid); if (!EssenceSuffering || (!EssenceSuffering->isAlive())) EnterEvadeMode(); @@ -369,7 +366,7 @@ struct MANGOS_DLL_DECL boss_reliquary_of_soulsAI : public ScriptedAI SummonSoulTimer = 1000; EndingPhase = false; Phase = 3; - SufferingGUID = 0; + m_sufferingGuid.Clear(); }else DespawnEssenceTimer -= diff; } } @@ -412,7 +409,7 @@ struct MANGOS_DLL_DECL boss_reliquary_of_soulsAI : public ScriptedAI EssenceDesire->AI()->AttackStart(target); } - DesireGUID = EssenceDesire->GetGUID(); + m_desireGuid = EssenceDesire->GetObjectGuid(); SoulDeathCount = 0; } @@ -423,9 +420,9 @@ struct MANGOS_DLL_DECL boss_reliquary_of_soulsAI : public ScriptedAI if (Phase == 4) { - if (DesireGUID) + if (m_desireGuid) { - Creature* EssenceDesire = m_creature->GetMap()->GetCreature(DesireGUID); + Creature* EssenceDesire = m_creature->GetMap()->GetCreature(m_desireGuid); if (!EssenceDesire || !EssenceDesire->isAlive()) EnterEvadeMode(); @@ -475,7 +472,7 @@ struct MANGOS_DLL_DECL boss_reliquary_of_soulsAI : public ScriptedAI SummonSoulTimer = 1000; EndingPhase = false; Phase = 5; - DesireGUID = 0; + m_desireGuid.Clear(); }else DespawnEssenceTimer -= diff; } } @@ -517,7 +514,7 @@ struct MANGOS_DLL_DECL boss_reliquary_of_soulsAI : public ScriptedAI EssenceAnger->AI()->AttackStart(target); } - AngerGUID = EssenceAnger->GetGUID(); + m_angerGuid = EssenceAnger->GetObjectGuid(); DoScriptText(ANGER_SAY_FREED, EssenceAnger); SoulDeathCount = 0; } @@ -529,9 +526,9 @@ struct MANGOS_DLL_DECL boss_reliquary_of_soulsAI : public ScriptedAI if (Phase == 6) { - if (AngerGUID) + if (m_angerGuid) { - Creature* EssenceAnger = m_creature->GetMap()->GetCreature(AngerGUID); + Creature* EssenceAnger = m_creature->GetMap()->GetCreature(m_angerGuid); if (!EssenceAnger) EnterEvadeMode(); @@ -540,7 +537,7 @@ struct MANGOS_DLL_DECL boss_reliquary_of_soulsAI : public ScriptedAI { if (!EssenceAnger->isAlive()) { - AngerGUID = 0; + m_angerGuid.Clear(); m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); } } @@ -553,7 +550,7 @@ struct MANGOS_DLL_DECL boss_essence_of_sufferingAI : public ScriptedAI { boss_essence_of_sufferingAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} - uint64 StatAuraGUID; + ObjectGuid m_statAuraGuid; // TODO currently unused - bug? uint32 AggroYellTimer; uint32 FixateTimer; @@ -562,7 +559,7 @@ struct MANGOS_DLL_DECL boss_essence_of_sufferingAI : public ScriptedAI void Reset() { - StatAuraGUID = 0; + m_statAuraGuid.Clear(); AggroYellTimer = 5000; FixateTimer = 5000; @@ -577,9 +574,9 @@ struct MANGOS_DLL_DECL boss_essence_of_sufferingAI : public ScriptedAI damage = 0; // 10% of total health, signalling time to return m_creature->SetHealth(m_creature->GetMaxHealth()/10); - if (StatAuraGUID) + if (m_statAuraGuid) { - if (Player* pPlayer = m_creature->GetMap()->GetPlayer(StatAuraGUID)) + if (Player* pPlayer = m_creature->GetMap()->GetPlayer(m_statAuraGuid)) pPlayer->RemoveAurasDueToSpell(AURA_OF_SUFFERING_ARMOR); } } @@ -641,9 +638,9 @@ struct MANGOS_DLL_DECL boss_essence_of_sufferingAI : public ScriptedAI if (m_creature->GetHealthPercent() <= 10.0f) { - if (StatAuraGUID) + if (m_statAuraGuid) { - if (Player* pPlayer = m_creature->GetMap()->GetPlayer(StatAuraGUID)) + if (Player* pPlayer = m_creature->GetMap()->GetPlayer(m_statAuraGuid)) pPlayer->RemoveAurasDueToSpell(AURA_OF_SUFFERING_ARMOR); } } @@ -797,7 +794,7 @@ struct MANGOS_DLL_DECL boss_essence_of_angerAI : public ScriptedAI { boss_essence_of_angerAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} - uint64 AggroTargetGUID; + ObjectGuid m_aggroTargetGuid; uint32 AggroYellTimer; uint32 CheckTankTimer; @@ -808,7 +805,7 @@ struct MANGOS_DLL_DECL boss_essence_of_angerAI : public ScriptedAI void Reset() { - AggroTargetGUID = 0; + m_aggroTargetGuid.Clear(); AggroYellTimer = 5000; CheckTankTimer = 5000; @@ -861,7 +858,7 @@ struct MANGOS_DLL_DECL boss_essence_of_angerAI : public ScriptedAI if (!CheckedAggro) { - AggroTargetGUID = m_creature->getVictim()->GetGUID(); + m_aggroTargetGuid = m_creature->getVictim()->GetObjectGuid(); CheckedAggro = true; } @@ -876,12 +873,12 @@ struct MANGOS_DLL_DECL boss_essence_of_angerAI : public ScriptedAI if (CheckTankTimer < diff) { - if (m_creature->getVictim()->GetGUID() != AggroTargetGUID) + if (m_creature->getVictim()->GetObjectGuid() != m_aggroTargetGuid) { DoScriptText(ANGER_SAY_BEFORE, m_creature); DoCastSpellIfCan(m_creature, SPELL_SELF_SEETHE); DoCastSpellIfCan(m_creature->getVictim(), SPELL_ENEMY_SEETHE, CAST_TRIGGERED); - AggroTargetGUID = m_creature->getVictim()->GetGUID(); + m_aggroTargetGuid = m_creature->getVictim()->GetObjectGuid(); } CheckTankTimer = 2000; }else CheckTankTimer -= diff; @@ -910,9 +907,9 @@ struct MANGOS_DLL_DECL boss_essence_of_angerAI : public ScriptedAI void npc_enslaved_soulAI::JustDied(Unit *killer) { - if (ReliquaryGUID) + if (m_reliquaryGuid) { - if (Creature* pReliquary = m_creature->GetMap()->GetCreature(ReliquaryGUID)) + if (Creature* pReliquary = m_creature->GetMap()->GetCreature(m_reliquaryGuid)) { if (boss_reliquary_of_soulsAI* pReliqAI = dynamic_cast(pReliquary->AI())) pReliqAI->SoulDeathCount++; diff --git a/scripts/outland/black_temple/boss_shade_of_akama.cpp b/scripts/outland/black_temple/boss_shade_of_akama.cpp index c73e94a8e..1fd55342b 100644 --- a/scripts/outland/black_temple/boss_shade_of_akama.cpp +++ b/scripts/outland/black_temple/boss_shade_of_akama.cpp @@ -119,8 +119,6 @@ struct MANGOS_DLL_DECL boss_shade_of_akamaAI : public ScriptedAI boss_shade_of_akamaAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_lChannelersGUIDList.clear(); - m_lSorcerersGUIDList.clear(); Reset(); } @@ -129,8 +127,6 @@ struct MANGOS_DLL_DECL boss_shade_of_akamaAI : public ScriptedAI GUIDList m_lChannelersGUIDList; GUIDList m_lSorcerersGUIDList; - uint64 m_uiAkamaGUID; - uint32 m_uiSorcererCount; uint32 m_uiDeathCount; @@ -184,7 +180,8 @@ struct MANGOS_DLL_DECL boss_shade_of_akamaAI : public ScriptedAI RespawnChannelersIfDeadOrEvade(); } - void IncrementDeathCount(uint64 uiGuid = 0) // If guid is set, will remove it from list of sorcerer + // If guid is set, will remove it from list of sorcerer + void IncrementDeathCount(ObjectGuid uiGuid = ObjectGuid()) { debug_log("SD2: Increasing Death Count for Shade of Akama encounter"); ++m_uiDeathCount; @@ -192,9 +189,9 @@ struct MANGOS_DLL_DECL boss_shade_of_akamaAI : public ScriptedAI if (uiGuid) { if (m_lSorcerersGUIDList.empty()) - error_log("SD2: boss_shade_of_akamaAI attempt to remove guid " UI64FMTD " from Sorcerers list but list is already empty", uiGuid); + error_log("SD2: boss_shade_of_akamaAI attempt to remove guid %s from Sorcerers list but list is already empty", uiGuid.GetString().c_str()); else - m_lSorcerersGUIDList.remove(uiGuid); + m_lSorcerersGUIDList.remove(uiGuid.GetRawValue()); } } @@ -283,7 +280,7 @@ struct MANGOS_DLL_DECL boss_shade_of_akamaAI : public ScriptedAI for(std::list::iterator itr = lChannelerList.begin(); itr != lChannelerList.end(); ++itr) { m_lChannelersGUIDList.push_back((*itr)->GetGUID()); - debug_log("SD2: boss_shade_of_akamaAI found channeler " UI64FMTD ". Adding to list", (*itr)->GetGUID()); + debug_log("SD2: boss_shade_of_akamaAI found channeler %s. Adding to list", (*itr)->GetObjectGuid().GetString().c_str()); (*itr)->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); } @@ -323,7 +320,7 @@ struct MANGOS_DLL_DECL boss_shade_of_akamaAI : public ScriptedAI m_afSpawnLoc[uiRand].m_fX, m_afSpawnLoc[uiRand].m_fY, m_afSpawnLoc[uiRand].m_fZ, m_afSpawnLoc[uiRand].m_fO, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 25000)) { - if (Creature* pAkama = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(NPC_AKAMA_SHADE))) + if (Creature* pAkama = m_pInstance->GetSingleCreatureFromStorage(NPC_AKAMA_SHADE)) pDefender->AI()->AttackStart(pAkama); } @@ -342,7 +339,7 @@ struct MANGOS_DLL_DECL boss_shade_of_akamaAI : public ScriptedAI if (m_uiDeathCount >= 6) { - if (Creature* pAkama = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(NPC_AKAMA_SHADE))) + if (Creature* pAkama = m_pInstance->GetSingleCreatureFromStorage(NPC_AKAMA_SHADE)) { if (pAkama && pAkama->isAlive()) { @@ -364,7 +361,7 @@ struct MANGOS_DLL_DECL boss_shade_of_akamaAI : public ScriptedAI { if (m_uiReduceHealthTimer < uiDiff) { - if (Creature* pAkama = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(NPC_AKAMA_SHADE))) + if (Creature* pAkama = m_pInstance->GetSingleCreatureFromStorage(NPC_AKAMA_SHADE)) { if (pAkama->isAlive()) { @@ -455,7 +452,7 @@ struct MANGOS_DLL_DECL npc_akamaAI : public ScriptedAI if (!m_pInstance) return; - if (Creature* pShade = m_pInstance->instance->GetCreature(m_pInstance->GetData64(NPC_SHADE_OF_AKAMA))) + if (Creature* pShade = m_pInstance->GetSingleCreatureFromStorage(NPC_SHADE_OF_AKAMA)) { if (boss_shade_of_akamaAI* pShadeAI = dynamic_cast(pShade->AI())) pShadeAI->PrepareChannelers(); @@ -489,7 +486,7 @@ struct MANGOS_DLL_DECL npc_akamaAI : public ScriptedAI ++m_uiWayPointId; break; case 1: - if (Creature* pShade = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(NPC_SHADE_OF_AKAMA))) + if (Creature* pShade = m_pInstance->GetSingleCreatureFromStorage(NPC_SHADE_OF_AKAMA)) { DoCastSpellIfCan(pShade, SPELL_AKAMA_SOUL_RETRIEVE); m_uiEndingTalkCount = 0; @@ -511,7 +508,7 @@ struct MANGOS_DLL_DECL npc_akamaAI : public ScriptedAI if (!m_bCanStartCombat) { - if (Creature* pShade = m_pInstance->instance->GetCreature(m_pInstance->GetData64(NPC_SHADE_OF_AKAMA))) + if (Creature* pShade = m_pInstance->GetSingleCreatureFromStorage(NPC_SHADE_OF_AKAMA)) { if (!pShade->isAlive()) { @@ -550,7 +547,7 @@ struct MANGOS_DLL_DECL npc_akamaAI : public ScriptedAI { if (m_uiCheckTimer < uiDiff) { - if (Creature* pShade = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(NPC_SHADE_OF_AKAMA))) + if (Creature* pShade = m_pInstance->GetSingleCreatureFromStorage(NPC_SHADE_OF_AKAMA)) { if (!pShade->isAlive()) { @@ -671,7 +668,7 @@ struct MANGOS_DLL_DECL npc_akamaAI : public ScriptedAI if (m_uiDestructivePoisonTimer < uiDiff) { - if (Creature* pShade = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(NPC_SHADE_OF_AKAMA))) + if (Creature* pShade = m_pInstance->GetSingleCreatureFromStorage(NPC_SHADE_OF_AKAMA)) { if (pShade->isAlive()) DoCastSpellIfCan(pShade, SPELL_DESTRUCTIVE_POISON); @@ -749,7 +746,7 @@ struct MANGOS_DLL_DECL mob_ashtongue_channelerAI : public ScriptedAI if (!m_pInstance) return; - if (Creature* pShade = m_pInstance->instance->GetCreature(m_pInstance->GetData64(NPC_SHADE_OF_AKAMA))) + if (Creature* pShade = m_pInstance->GetSingleCreatureFromStorage(NPC_SHADE_OF_AKAMA)) { if (pShade->isAlive()) { @@ -769,7 +766,7 @@ struct MANGOS_DLL_DECL mob_ashtongue_channelerAI : public ScriptedAI //start channel (not nice way to start channeling) if (!m_creature->IsNonMeleeSpellCasted(false) && !m_creature->getVictim() && m_pInstance) { - if (Creature* pShade = m_pInstance->instance->GetCreature(m_pInstance->GetData64(NPC_SHADE_OF_AKAMA))) + if (Creature* pShade = m_pInstance->GetSingleCreatureFromStorage(NPC_SHADE_OF_AKAMA)) m_creature->CastSpell(pShade, SPELL_SHADE_SOUL_CHANNEL, false); } } @@ -802,12 +799,12 @@ struct MANGOS_DLL_DECL mob_ashtongue_sorcererAI : public ScriptedAI if (!m_pInstance) return; - if (Creature* pShade = m_pInstance->instance->GetCreature(m_pInstance->GetData64(NPC_SHADE_OF_AKAMA))) + if (Creature* pShade = m_pInstance->GetSingleCreatureFromStorage(NPC_SHADE_OF_AKAMA)) { if (pShade->isAlive()) { if (boss_shade_of_akamaAI* pShadeAI = dynamic_cast(pShade->AI())) - pShadeAI->IncrementDeathCount(m_creature->GetGUID()); + pShadeAI->IncrementDeathCount(m_creature->GetObjectGuid()); else error_log("SD2: mob_ashtongue_sorcererAI dead but unable to increment DeathCount for Shade of Akama."); } @@ -821,7 +818,7 @@ struct MANGOS_DLL_DECL mob_ashtongue_sorcererAI : public ScriptedAI if (m_uiCheckTimer < uiDiff) { - Creature* pShade = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(NPC_SHADE_OF_AKAMA)); + Creature* pShade = m_pInstance->GetSingleCreatureFromStorage(NPC_SHADE_OF_AKAMA); if (pShade && pShade->isAlive() && m_creature->isAlive()) { diff --git a/scripts/outland/black_temple/boss_supremus.cpp b/scripts/outland/black_temple/boss_supremus.cpp index 1cba91ace..255d45996 100644 --- a/scripts/outland/black_temple/boss_supremus.cpp +++ b/scripts/outland/black_temple/boss_supremus.cpp @@ -99,7 +99,7 @@ struct MANGOS_DLL_DECL boss_supremusAI : public ScriptedAI uint32 m_uiBerserkTimer; uint32 m_uiMoltenPunchTimer; - uint64 m_uiLastGazeTargetGUID; + ObjectGuid m_lastGazeTargetGuid; bool m_bTankPhase; @@ -113,7 +113,7 @@ struct MANGOS_DLL_DECL boss_supremusAI : public ScriptedAI m_uiMoltenPunchTimer = 8000; m_uiBerserkTimer = 15*MINUTE*IN_MILLISECONDS; - m_uiLastGazeTargetGUID = 0; + m_lastGazeTargetGuid.Clear(); m_bTankPhase = true; } @@ -187,7 +187,7 @@ struct MANGOS_DLL_DECL boss_supremusAI : public ScriptedAI void KilledUnit(Unit* pKilled) { - if (!m_bTankPhase && pKilled->GetGUID() == m_uiLastGazeTargetGUID) + if (!m_bTankPhase && pKilled->GetObjectGuid() == m_lastGazeTargetGuid) m_uiSwitchTargetTimer = 0; } @@ -262,7 +262,7 @@ struct MANGOS_DLL_DECL boss_supremusAI : public ScriptedAI m_creature->AddThreat(pTarget, 5000000.0f); DoScriptText(EMOTE_NEW_TARGET, m_creature); m_uiSwitchTargetTimer = 10000; - m_uiLastGazeTargetGUID = pTarget->GetGUID(); + m_lastGazeTargetGuid = pTarget->GetObjectGuid(); } } else diff --git a/scripts/outland/black_temple/boss_teron_gorefiend.cpp b/scripts/outland/black_temple/boss_teron_gorefiend.cpp index 79e55f832..6f15b5f5a 100644 --- a/scripts/outland/black_temple/boss_teron_gorefiend.cpp +++ b/scripts/outland/black_temple/boss_teron_gorefiend.cpp @@ -61,13 +61,12 @@ struct MANGOS_DLL_DECL mob_doom_blossomAI : public ScriptedAI uint32 m_uiCheckTeronTimer; uint32 m_uiShadowBoltTimer; - uint64 m_uiTeronGUID; + ObjectGuid m_teronGuid; void Reset() { m_uiCheckTeronTimer = 5000; m_uiShadowBoltTimer = 12000; - m_uiTeronGUID = 0; } void AttackStart(Unit* pWho) { } @@ -77,11 +76,11 @@ struct MANGOS_DLL_DECL mob_doom_blossomAI : public ScriptedAI { if (m_uiCheckTeronTimer < uiDiff) { - if (m_uiTeronGUID) + if (m_teronGuid) { m_creature->SetInCombatWithZone(); - Creature* pTeron = m_creature->GetMap()->GetCreature(m_uiTeronGUID); + Creature* pTeron = m_creature->GetMap()->GetCreature(m_teronGuid); if (pTeron && (!pTeron->isAlive() || pTeron->IsInEvadeMode())) m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); } @@ -107,7 +106,7 @@ struct MANGOS_DLL_DECL mob_doom_blossomAI : public ScriptedAI m_uiShadowBoltTimer -= uiDiff; } - void SetTeronGUID(uint64 uiGUID){ m_uiTeronGUID = uiGUID; } + void SetTeronGUID(ObjectGuid guid){ m_teronGuid = guid; } }; struct MANGOS_DLL_DECL mob_shadowy_constructAI : public ScriptedAI @@ -117,16 +116,15 @@ struct MANGOS_DLL_DECL mob_shadowy_constructAI : public ScriptedAI Reset(); } - uint64 m_uiGhostGUID; - uint64 m_uiTeronGUID; + ObjectGuid m_ghostGuid; + ObjectGuid m_teronGuid; // TODO unused, possible bug? uint32 m_uiCheckPlayerTimer; uint32 m_uiCheckTeronTimer; void Reset() { - m_uiGhostGUID = 0; - m_uiTeronGUID = 0; + m_ghostGuid.Clear(); m_uiCheckPlayerTimer = 2000; m_uiCheckTeronTimer = 5000; @@ -134,7 +132,7 @@ struct MANGOS_DLL_DECL mob_shadowy_constructAI : public ScriptedAI void MoveInLineOfSight(Unit* pWho) { - if (!pWho || !pWho->isAlive() || pWho->GetGUID() == m_uiGhostGUID) + if (!pWho || !pWho->isAlive() || pWho->GetObjectGuid() == m_ghostGuid) return; ScriptedAI::MoveInLineOfSight(pWho); @@ -143,7 +141,7 @@ struct MANGOS_DLL_DECL mob_shadowy_constructAI : public ScriptedAI /* Comment it out for now. NOTE TO FUTURE DEV: UNCOMMENT THIS OUT ONLY AFTER MIND CONTROL IS IMPLEMENTED void DamageTaken(Unit* done_by, uint32 &damage) { - if (done_by->GetGUID() != m_uiGhostGUID) + if (done_by->GetGUID() != m_ghostGuid) damage = 0; // Only the ghost can deal damage. } */ @@ -185,7 +183,7 @@ struct MANGOS_DLL_DECL mob_shadowy_constructAI : public ScriptedAI if (m_uiCheckTeronTimer < uiDiff) { - Creature* pTeron = m_creature->GetMap()->GetCreature(m_uiTeronGUID); + Creature* pTeron = m_creature->GetMap()->GetCreature(m_teronGuid); if (!pTeron || !pTeron->isAlive() || pTeron->IsInEvadeMode()) m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); @@ -215,8 +213,8 @@ struct MANGOS_DLL_DECL boss_teron_gorefiendAI : public ScriptedAI uint32 m_uiRandomYellTimer; uint32 m_uiAggroTimer; - uint64 m_uiAggroTargetGUID; - uint64 m_uiGhostGUID; // Player that gets killed by Shadow of Death and gets turned into a ghost + ObjectGuid m_aggroTargetGuid; + ObjectGuid m_ghostGuid; // Player that gets killed by Shadow of Death and gets turned into a ghost bool m_bIntro; @@ -234,7 +232,7 @@ struct MANGOS_DLL_DECL boss_teron_gorefiendAI : public ScriptedAI m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); m_uiAggroTimer = 20000; - m_uiAggroTargetGUID = 0; + m_aggroTargetGuid.Clear(); m_bIntro = false; } @@ -259,7 +257,7 @@ struct MANGOS_DLL_DECL boss_teron_gorefiendAI : public ScriptedAI DoScriptText(SAY_INTRO, m_creature); m_creature->HandleEmote(EMOTE_STATE_TALK); - m_uiAggroTargetGUID = pWho->GetGUID(); + m_aggroTargetGuid = pWho->GetObjectGuid(); m_bIntro = true; } } @@ -313,8 +311,8 @@ struct MANGOS_DLL_DECL boss_teron_gorefiendAI : public ScriptedAI /************************************************************************/ Player* pGhost = NULL; - if (m_uiGhostGUID) - pGhost = m_creature->GetMap()->GetPlayer(m_uiGhostGUID); + if (m_ghostGuid) + pGhost = m_creature->GetMap()->GetPlayer(m_ghostGuid); if (pGhost && pGhost->isAlive() && pGhost->HasAura(SPELL_SHADOW_OF_DEATH, EFFECT_INDEX_0)) { @@ -338,7 +336,7 @@ struct MANGOS_DLL_DECL boss_teron_gorefiendAI : public ScriptedAI SetThreatList(pConstruct); // Use same function as Doom Blossom to set Threat List. if (mob_shadowy_constructAI* pConstructAI = dynamic_cast(pConstruct->AI())) - pConstructAI->m_uiGhostGUID = m_uiGhostGUID; + pConstructAI->m_ghostGuid = m_ghostGuid; Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1); pConstruct->GetMotionMaster()->MoveChase(pTarget ? pTarget : m_creature->getVictim()); @@ -360,9 +358,9 @@ struct MANGOS_DLL_DECL boss_teron_gorefiendAI : public ScriptedAI m_creature->HandleEmote(EMOTE_STATE_NONE); m_bIntro = false; - if (m_uiAggroTargetGUID) + if (m_aggroTargetGuid) { - if (Player* pPlayer = m_creature->GetMap()->GetPlayer(m_uiAggroTargetGUID)) + if (Player* pPlayer = m_creature->GetMap()->GetPlayer(m_aggroTargetGuid)) AttackStart(pPlayer); m_creature->SetInCombatWithZone(); @@ -409,7 +407,7 @@ struct MANGOS_DLL_DECL boss_teron_gorefiendAI : public ScriptedAI pDoomBlossom->AddThreat(pTarget); if (mob_doom_blossomAI* pDoomBlossomAI = dynamic_cast(pDoomBlossom->AI())) - pDoomBlossomAI->SetTeronGUID(m_creature->GetGUID()); + pDoomBlossomAI->SetTeronGUID(m_creature->GetObjectGuid()); SetThreatList(pDoomBlossom); } @@ -453,7 +451,7 @@ struct MANGOS_DLL_DECL boss_teron_gorefiendAI : public ScriptedAI if (pTarget && pTarget->isAlive() && pTarget->GetTypeId() == TYPEID_PLAYER) { DoCastSpellIfCan(pTarget, SPELL_SHADOW_OF_DEATH); - m_uiGhostGUID = pTarget->GetGUID(); + m_ghostGuid = pTarget->GetObjectGuid(); m_uiShadowOfDeathTimer = 30000; m_uiSummonShadowsTimer = 53000; // Make it VERY close but slightly less so that we can check if the aura is still on the pPlayer } diff --git a/scripts/outland/black_temple/illidari_council.cpp b/scripts/outland/black_temple/illidari_council.cpp index b711b4967..8103e4709 100644 --- a/scripts/outland/black_temple/illidari_council.cpp +++ b/scripts/outland/black_temple/illidari_council.cpp @@ -24,30 +24,33 @@ EndScriptData */ #include "precompiled.h" #include "black_temple.h" -//Speech'n'Sounds -#define SAY_GATH_SLAY -1564085 -#define SAY_GATH_SLAY_COMNT -1564089 -#define SAY_GATH_DEATH -1564093 -#define SAY_GATH_SPECIAL1 -1564077 -#define SAY_GATH_SPECIAL2 -1564081 - -#define SAY_VERA_SLAY -1564086 -#define SAY_VERA_COMNT -1564089 -#define SAY_VERA_DEATH -1564094 -#define SAY_VERA_SPECIAL1 -1564078 -#define SAY_VERA_SPECIAL2 -1564082 - -#define SAY_MALA_SLAY -1564087 -#define SAY_MALA_COMNT -1564090 -#define SAY_MALA_DEATH -1564095 -#define SAY_MALA_SPECIAL1 -1564079 -#define SAY_MALA_SPECIAL2 -1564083 - -#define SAY_ZERE_SLAY -1564088 -#define SAY_ZERE_COMNT -1564091 -#define SAY_ZERE_DEATH -1564096 -#define SAY_ZERE_SPECIAL1 -1564080 -#define SAY_ZERE_SPECIAL2 -1564084 +enum +{ + //Speech'n'Sounds + SAY_GATH_SLAY = -1564085, + SAY_GATH_SLAY_COMNT = -1564089, + SAY_GATH_DEATH = -1564093, + SAY_GATH_SPECIAL1 = -1564077, + SAY_GATH_SPECIAL2 = -1564081, + + SAY_VERA_SLAY = -1564086, + SAY_VERA_COMNT = -1564089, + SAY_VERA_DEATH = -1564094, + SAY_VERA_SPECIAL1 = -1564078, + SAY_VERA_SPECIAL2 = -1564082, + + SAY_MALA_SLAY = -1564087, + SAY_MALA_COMNT = -1564090, + SAY_MALA_DEATH = -1564095, + SAY_MALA_SPECIAL1 = -1564079, + SAY_MALA_SPECIAL2 = -1564083, + + SAY_ZERE_SLAY = -1564088, + SAY_ZERE_COMNT = -1564091, + SAY_ZERE_DEATH = -1564096, + SAY_ZERE_SPECIAL1 = -1564080, + SAY_ZERE_SPECIAL2 = -1564084, +}; #define ERROR_INST_DATA "SD2 ERROR: Instance Data for Black Temple not set properly; Illidari Council event will not function properly." @@ -57,7 +60,7 @@ struct CouncilYells uint32 timer; }; -static CouncilYells CouncilAggro[]= +static const CouncilYells CouncilAggro[]= { {-1564069, 5000}, // Gathios {-1564070, 5500}, // Veras @@ -66,7 +69,7 @@ static CouncilYells CouncilAggro[]= }; // Need to get proper timers for this later -static CouncilYells CouncilEnrage[]= +static const CouncilYells CouncilEnrage[]= { {-1564073, 2000}, // Gathios {-1564074, 6000}, // Veras @@ -74,115 +77,118 @@ static CouncilYells CouncilEnrage[]= {-1564076, 0}, // Zerevor }; -// High Nethermancer Zerevor's spells -#define SPELL_FLAMESTRIKE 41481 -#define SPELL_BLIZZARD 41482 -#define SPELL_ARCANE_BOLT 41483 -#define SPELL_ARCANE_EXPLOSION 41524 -#define SPELL_DAMPEN_MAGIC 41478 - -// Lady Malande's spells -#define SPELL_EMPOWERED_SMITE 41471 -#define SPELL_CIRCLE_OF_HEALING 41455 -#define SPELL_REFLECTIVE_SHIELD 41475 -#define SPELL_DIVINE_WRATH 41472 -#define SPELL_HEAL_VISUAL 24171 - -// Gathios the Shatterer's spells -#define SPELL_BLESS_PROTECTION 41450 -#define SPELL_BLESS_SPELLWARD 41451 -#define SPELL_CONSECRATION 41541 -#define SPELL_HAMMER_OF_JUSTICE 41468 -#define SPELL_SEAL_OF_COMMAND 41469 -#define SPELL_SEAL_OF_BLOOD 41459 -#define SPELL_CHROMATIC_AURA 41453 -#define SPELL_DEVOTION_AURA 41452 - -// Veras Darkshadow's spells -#define SPELL_DEADLY_POISON 41485 -#define SPELL_ENVENOM 41487 -#define SPELL_VANISH 41479 - -#define SPELL_BERSERK 45078 +enum +{ + // High Nethermancer Zerevor's spells + SPELL_FLAMESTRIKE = 41481, + SPELL_BLIZZARD = 41482, + SPELL_ARCANE_BOLT = 41483, + SPELL_ARCANE_EXPLOSION = 41524, + SPELL_DAMPEN_MAGIC = 41478, + + // Lady Malande's spells + SPELL_EMPOWERED_SMITE = 41471, + SPELL_CIRCLE_OF_HEALING = 41455, + SPELL_REFLECTIVE_SHIELD = 41475, + SPELL_DIVINE_WRATH = 41472, + SPELL_HEAL_VISUAL = 24171, + + // Gathios the Shatterer's spells + SPELL_BLESS_PROTECTION = 41450, + SPELL_BLESS_SPELLWARD = 41451, + SPELL_CONSECRATION = 41541, + SPELL_HAMMER_OF_JUSTICE = 41468, + SPELL_SEAL_OF_COMMAND = 41469, + SPELL_SEAL_OF_BLOOD = 41459, + SPELL_CHROMATIC_AURA = 41453, + SPELL_DEVOTION_AURA = 41452, + + // Veras Darkshadow's spells + SPELL_DEADLY_POISON = 41485, + SPELL_ENVENOM = 41487, + SPELL_VANISH = 41479, + + SPELL_BERSERK = 45078, +}; + +static const uint32 aCouncilMember[] = {NPC_GATHIOS, NPC_VERAS, NPC_LADY_MALANDE, NPC_ZEREVOR}; struct MANGOS_DLL_DECL mob_blood_elf_council_voice_triggerAI : public ScriptedAI { mob_blood_elf_council_voice_triggerAI(Creature* pCreature) : ScriptedAI(pCreature) { - for(uint8 i = 0; i < 4; ++i) - Council[i] = 0; + m_pInstance = (ScriptedInstance*)(m_creature->GetInstanceData()); Reset(); } + ScriptedInstance* m_pInstance; - uint64 Council[4]; - - uint32 EnrageTimer; - uint32 AggroYellTimer; + uint32 m_uiEnrageTimer; + uint32 m_uiAggroYellTimer; - uint8 YellCounter; // Serves as the counter for both the aggro and enrage yells + uint8 m_uiYellCounter; // Serves as the counter for both the aggro and enrage yells - bool EventStarted; + bool m_bEventStarted; - void Reset() + void StartVoiceEvent() { - EnrageTimer = 900000; // 15 minutes - AggroYellTimer = 500; - YellCounter = 0; + if (!m_pInstance) + return; - EventStarted = false; + m_bEventStarted = true; } - // finds and stores the GUIDs for each Council member using instance data system. - void LoadCouncilGUIDs() + void Reset() { - if (ScriptedInstance* pInstance = (ScriptedInstance*)m_creature->GetInstanceData()) - { - Council[0] = pInstance->GetData64(NPC_GATHIOS); - Council[1] = pInstance->GetData64(NPC_VERAS); - Council[2] = pInstance->GetData64(NPC_LADY_MALANDE); - Council[3] = pInstance->GetData64(NPC_ZEREVOR); - }else error_log(ERROR_INST_DATA); + m_uiEnrageTimer = 15*MINUTE*IN_MILLISECONDS; // 15 minutes + m_uiAggroYellTimer = 500; + m_uiYellCounter = 0; + + m_bEventStarted = false; } - void AttackStart(Unit* who) {} - void MoveInLineOfSight(Unit* who) {} + void AttackStart(Unit* pWho) {} + void MoveInLineOfSight(Unit* pWho) {} - void UpdateAI(const uint32 diff) + void UpdateAI(const uint32 uiDiff) { - if (!EventStarted) + if (!m_bEventStarted) return; - if (YellCounter > 3) + if (m_uiYellCounter > 3) return; - if (AggroYellTimer) + if (m_uiAggroYellTimer) { - if (AggroYellTimer <= diff) + if (m_uiAggroYellTimer <= uiDiff) { - if (Creature* pMember = m_creature->GetMap()->GetCreature(Council[YellCounter])) + if (Creature* pMember = m_pInstance->GetSingleCreatureFromStorage(aCouncilMember[m_uiYellCounter])) { - DoScriptText(CouncilAggro[YellCounter].entry, pMember); - AggroYellTimer = CouncilAggro[YellCounter].timer; + DoScriptText(CouncilAggro[m_uiYellCounter].entry, pMember); + m_uiAggroYellTimer = CouncilAggro[m_uiYellCounter].timer; } - ++YellCounter; + ++m_uiYellCounter; - if (YellCounter > 3) - YellCounter = 0; // Reuse for Enrage Yells - }else AggroYellTimer -= diff; + if (m_uiYellCounter > 3) + m_uiYellCounter = 0; // Reuse for Enrage Yells + } + else + m_uiAggroYellTimer -= uiDiff; } - if (EnrageTimer) + if (m_uiEnrageTimer) { - if (EnrageTimer <= diff) + if (m_uiEnrageTimer <= uiDiff) { - if (Creature* pMember = m_creature->GetMap()->GetCreature(Council[YellCounter])) + if (Creature* pMember = m_pInstance->GetSingleCreatureFromStorage(aCouncilMember[m_uiYellCounter])) { pMember->CastSpell(pMember, SPELL_BERSERK, true); - DoScriptText(CouncilEnrage[YellCounter].entry, pMember); - EnrageTimer = CouncilEnrage[YellCounter].timer; + DoScriptText(CouncilEnrage[m_uiYellCounter].entry, pMember); + m_uiEnrageTimer = CouncilEnrage[m_uiYellCounter].timer; } - ++YellCounter; - }else EnrageTimer -= diff; + ++m_uiYellCounter; + } + else + m_uiEnrageTimer -= uiDiff; } } }; @@ -192,45 +198,26 @@ struct MANGOS_DLL_DECL mob_illidari_councilAI : public ScriptedAI mob_illidari_councilAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - - for(uint8 i = 0; i < 4; ++i) - Council[i] = 0; - Reset(); } ScriptedInstance* m_pInstance; - uint64 Council[4]; + uint32 m_uiCheckTimer; + uint32 m_uiEndEventTimer; - uint32 CheckTimer; - uint32 EndEventTimer; + uint8 m_uiDeathCount; - uint8 DeathCount; - - bool EventBegun; + bool m_bEventBegun; void Reset() { - CheckTimer = 2000; - EndEventTimer = 0; - - DeathCount = 0; + m_uiCheckTimer = 2000; + m_uiEndEventTimer = 0; - for(uint8 i = 0; i < 4; ++i) - { - if (Creature* pMember = m_creature->GetMap()->GetCreature(Council[i])) - { - if (!pMember->isAlive()) - { - pMember->RemoveCorpse(); - pMember->Respawn(); - } - pMember->AI()->EnterEvadeMode(); - } - } + m_uiDeathCount = 0; - EventBegun = false; + m_bEventBegun = false; m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); @@ -238,53 +225,55 @@ struct MANGOS_DLL_DECL mob_illidari_councilAI : public ScriptedAI if (m_pInstance) { - //if already done, not do anything + // If already done, not do anything if (m_pInstance->GetData(TYPE_COUNCIL) == DONE) return; - if (Creature* VoiceTrigger = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(NPC_COUNCIL_VOICE))) + if (Creature* VoiceTrigger = m_pInstance->GetSingleCreatureFromStorage(NPC_COUNCIL_VOICE)) VoiceTrigger->AI()->EnterEvadeMode(); m_pInstance->SetData(TYPE_COUNCIL, NOT_STARTED); + + for(uint8 i = 0; i < 4; ++i) + { + if (Creature* pMember = m_pInstance->GetSingleCreatureFromStorage(aCouncilMember[i])) + { + if (!pMember->isAlive()) + { + pMember->RemoveCorpse(); + pMember->Respawn(); + } + pMember->AI()->EnterEvadeMode(); + } + } } } - void AttackStart(Unit* who) {} - void MoveInLineOfSight(Unit* who) {} + void AttackStart(Unit* pWho) {} + void MoveInLineOfSight(Unit* pWho) {} - void StartEvent(Unit *target) + void StartEvent(Unit* pTarget) { if (!m_pInstance) return; - if (target && target->isAlive() && !EventBegun) + if (pTarget && pTarget->isAlive() && !m_bEventBegun) { - // Prevent further handling for next council member aggroing - EventBegun = true; - - Council[0] = m_pInstance->GetData64(NPC_GATHIOS); - Council[1] = m_pInstance->GetData64(NPC_ZEREVOR); - Council[2] = m_pInstance->GetData64(NPC_LADY_MALANDE); - Council[3] = m_pInstance->GetData64(NPC_VERAS); + // Prevent further handling for next council uiMember aggroing + m_bEventBegun = true; // Start the event for the Voice Trigger - if (Creature* pVoiceTrigger = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(NPC_COUNCIL_VOICE))) + if (Creature* pVoiceTrigger = m_pInstance->GetSingleCreatureFromStorage(NPC_COUNCIL_VOICE)) { if (mob_blood_elf_council_voice_triggerAI* pVoiceAI = dynamic_cast(pVoiceTrigger->AI())) - { - pVoiceAI->LoadCouncilGUIDs(); - pVoiceAI->EventStarted = true; - } + pVoiceAI->StartVoiceEvent(); } for(uint8 i = 0; i < 4; ++i) { - if (Council[i]) - { - Creature* pMember = m_creature->GetMap()->GetCreature(Council[i]); - if (pMember && pMember->isAlive() && !pMember->isInCombat()) - pMember->AI()->AttackStart(target); - } + Creature* pMember = m_pInstance->GetSingleCreatureFromStorage(aCouncilMember[i]); + if (pMember && pMember->isAlive() && !pMember->isInCombat()) + pMember->AI()->AttackStart(pTarget); } // All are set into combat now, Set Instance Data @@ -294,68 +283,66 @@ struct MANGOS_DLL_DECL mob_illidari_councilAI : public ScriptedAI void UpdateAI(const uint32 diff) { - if (!EventBegun) + if (!m_bEventBegun) // Can only be true when m_pInstance is valid return; - if (EndEventTimer) + if (m_uiEndEventTimer) { - if (EndEventTimer <= diff) + if (m_uiEndEventTimer <= diff) { - if (DeathCount > 3) + if (m_uiDeathCount > 3) { - if (m_pInstance) - { - if (Creature* VoiceTrigger = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(NPC_COUNCIL_VOICE))) - VoiceTrigger->DealDamage(VoiceTrigger, VoiceTrigger->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + if (Creature* VoiceTrigger = m_pInstance->GetSingleCreatureFromStorage(NPC_COUNCIL_VOICE)) + VoiceTrigger->DealDamage(VoiceTrigger, VoiceTrigger->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + + m_pInstance->SetData(TYPE_COUNCIL, DONE); - m_pInstance->SetData(TYPE_COUNCIL, DONE); - } m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); return; } - Creature* pMember = m_creature->GetMap()->GetCreature(Council[DeathCount]); + Creature* pMember = m_pInstance->GetSingleCreatureFromStorage(aCouncilMember[m_uiDeathCount]); if (pMember && pMember->isAlive()) pMember->DealDamage(pMember, pMember->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); - ++DeathCount; - EndEventTimer = 1500; - }else EndEventTimer -= diff; + ++m_uiDeathCount; + m_uiEndEventTimer = 1500; + } + else + m_uiEndEventTimer -= diff; } - if (CheckTimer) + if (m_uiCheckTimer) { - if (CheckTimer <= diff) + if (m_uiCheckTimer <= diff) { uint8 EvadeCheck = 0; for(uint8 i = 0; i < 4; ++i) { - if (Council[i]) + if (Creature* Member = m_pInstance->GetSingleCreatureFromStorage(aCouncilMember[i])) { - if (Creature* Member = m_creature->GetMap()->GetCreature(Council[i])) + // This is the evade/death check. + if (Member->isAlive() && !Member->SelectHostileTarget()) + ++EvadeCheck; // If all members evade, we reset so that players can properly reset the event + else if (!Member->isAlive()) // If even one uiMember dies, kill the rest, set instance data, and kill self. { - // This is the evade/death check. - if (Member->isAlive() && !Member->SelectHostileTarget()) - ++EvadeCheck; //If all members evade, we reset so that players can properly reset the event - else if (!Member->isAlive()) //If even one member dies, kill the rest, set instance data, and kill self. - { - EndEventTimer = 1000; - CheckTimer = 0; - return; - } + m_uiEndEventTimer = 1000; + m_uiCheckTimer = 0; + return; } } } if (EvadeCheck > 3) { - if (m_pInstance) - m_pInstance->SetData(TYPE_COUNCIL, FAIL); + m_pInstance->SetData(TYPE_COUNCIL, FAIL); Reset(); } - CheckTimer = 2000; - }else CheckTimer -= diff; + m_uiCheckTimer = 2000; + } + else + m_uiCheckTimer -= diff; } } }; @@ -365,24 +352,15 @@ struct MANGOS_DLL_DECL boss_illidari_councilAI : public ScriptedAI boss_illidari_councilAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - - for(uint8 i = 0; i < 4; ++i) - Council[i] = 0; - - LoadedGUIDs = false; } ScriptedInstance* m_pInstance; - uint64 Council[4]; - - bool LoadedGUIDs; - void Aggro(Unit* pWho) { if (m_pInstance) { - if (Creature* pController = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(NPC_ILLIDARI_COUNCIL))) + if (Creature* pController = m_pInstance->GetSingleCreatureFromStorage(NPC_ILLIDARI_COUNCIL)) { if (mob_illidari_councilAI* pControlAI = dynamic_cast(pController->AI())) pControlAI->StartEvent(pWho); @@ -393,13 +371,6 @@ struct MANGOS_DLL_DECL boss_illidari_councilAI : public ScriptedAI error_log(ERROR_INST_DATA); EnterEvadeMode(); } - - // Load GUIDs on first aggro because the creature guids are only set as the creatures are created in world- - // this means that for each creature, it will attempt to LoadGUIDs even though some of the other creatures are - // not in world, and thus have no GUID set in the instance data system. Putting it in aggro ensures that all the creatures - // have been loaded and have their GUIDs set in the instance data system. - if (!LoadedGUIDs) - LoadGUIDs(); } void DamageTaken(Unit* done_by, uint32 &damage) @@ -408,111 +379,112 @@ struct MANGOS_DLL_DECL boss_illidari_councilAI : public ScriptedAI return; damage /= 4; + if (!m_pInstance) + return; + for(uint8 i = 0; i < 4; ++i) { - if (Creature* pCouncil = m_creature->GetMap()->GetCreature(Council[i])) + if (Creature* pCouncil = m_pInstance->GetSingleCreatureFromStorage(aCouncilMember[i])) { if (pCouncil != m_creature && damage < pCouncil->GetHealth()) pCouncil->SetHealth(pCouncil->GetHealth() - damage); } } } - - void LoadGUIDs() - { - if (!m_pInstance) - { - error_log(ERROR_INST_DATA); - return; - } - - Council[0] = m_pInstance->GetData64(NPC_LADY_MALANDE); - Council[1] = m_pInstance->GetData64(NPC_ZEREVOR); - Council[2] = m_pInstance->GetData64(NPC_GATHIOS); - Council[3] = m_pInstance->GetData64(NPC_VERAS); - - LoadedGUIDs = true; - } }; struct MANGOS_DLL_DECL boss_gathios_the_shattererAI : public boss_illidari_councilAI { boss_gathios_the_shattererAI(Creature* pCreature) : boss_illidari_councilAI(pCreature) { Reset(); } - uint32 ConsecrationTimer; - uint32 HammerOfJusticeTimer; - uint32 SealTimer; - uint32 AuraTimer; - uint32 BlessingTimer; + uint32 m_uiConsecrationTimer; + uint32 m_uiHammerOfJusticeTimer; + uint32 m_uiSealTimer; + uint32 m_uiAuraTimer; + uint32 m_uiBlessingTimer; void Reset() { - ConsecrationTimer = 40000; - HammerOfJusticeTimer = 10000; - SealTimer = 40000; - AuraTimer = 90000; - BlessingTimer = 60000; + m_uiConsecrationTimer = 40000; + m_uiHammerOfJusticeTimer = 10000; + m_uiSealTimer = 40000; + m_uiAuraTimer = 90000; + m_uiBlessingTimer = 60000; } - void KilledUnit(Unit *victim) + void KilledUnit(Unit* pVictim) { DoScriptText(SAY_GATH_SLAY, m_creature); } - void JustDied(Unit *victim) + void JustDied(Unit* pKiller) { DoScriptText(SAY_GATH_DEATH, m_creature); } Unit* SelectCouncilMember() { + if (!m_pInstance) + return m_creature; + Unit* pUnit = m_creature; - uint32 member = 0; // He chooses Lady Malande most often + uint32 uiMember = 2; // He chooses Lady Malande most often if (!urand(0, 9)) // But there is a chance he picks someone else. - member = urand(1, 3); + { + uiMember += urand(1, 3); + uiMember %= 4; + } - if (member != 2) // No need to create another pointer - pUnit = m_creature->GetMap()->GetCreature(Council[member]); + if (uiMember != 0) // No need to create another pointer + pUnit = m_pInstance->GetSingleCreatureFromStorage(aCouncilMember[uiMember]); return pUnit; } void CastAuraOnCouncil() { - uint32 spellid = 0; + uint32 uiSpellid = 0; switch(urand(0, 1)) { - case 0: spellid = SPELL_DEVOTION_AURA; break; - case 1: spellid = SPELL_CHROMATIC_AURA; break; + case 0: uiSpellid = SPELL_DEVOTION_AURA; break; + case 1: uiSpellid = SPELL_CHROMATIC_AURA; break; } + + if (!m_pInstance) + return; + for(uint8 i = 0; i < 4; ++i) { - if (Creature* pCouncil = m_creature->GetMap()->GetCreature(Council[i])) - pCouncil->CastSpell(pCouncil, spellid, true, NULL, NULL, m_creature->GetObjectGuid()); + if (Creature* pCouncil = m_pInstance->GetSingleCreatureFromStorage(aCouncilMember[i])) + pCouncil->CastSpell(pCouncil, uiSpellid, true, NULL, NULL, m_creature->GetObjectGuid()); } } - void UpdateAI(const uint32 diff) + void UpdateAI(const uint32 uiDiff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - if (BlessingTimer < diff) + if (m_uiBlessingTimer < uiDiff) { if (Unit* pUnit = SelectCouncilMember()) DoCastSpellIfCan(pUnit, urand(0, 1) ? SPELL_BLESS_SPELLWARD : SPELL_BLESS_PROTECTION); - BlessingTimer = 60000; - }else BlessingTimer -= diff; + m_uiBlessingTimer = 60000; + } + else + m_uiBlessingTimer -= uiDiff; - if (ConsecrationTimer < diff) + if (m_uiConsecrationTimer < uiDiff) { DoCastSpellIfCan(m_creature, SPELL_CONSECRATION); - ConsecrationTimer = 40000; - }else ConsecrationTimer -= diff; + m_uiConsecrationTimer = 40000; + } + else + m_uiConsecrationTimer -= uiDiff; - if (HammerOfJusticeTimer < diff) + if (m_uiHammerOfJusticeTimer < uiDiff) { if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) { @@ -520,22 +492,28 @@ struct MANGOS_DLL_DECL boss_gathios_the_shattererAI : public boss_illidari_counc if (m_creature->IsInRange(target, 10.0f, 40.0f, false)) { DoCastSpellIfCan(target, SPELL_HAMMER_OF_JUSTICE); - HammerOfJusticeTimer = 20000; + m_uiHammerOfJusticeTimer = 20000; } } - }else HammerOfJusticeTimer -= diff; + } + else + m_uiHammerOfJusticeTimer -= uiDiff; - if (SealTimer < diff) + if (m_uiSealTimer < uiDiff) { DoCastSpellIfCan(m_creature, urand(0, 1) ? SPELL_SEAL_OF_COMMAND : SPELL_SEAL_OF_BLOOD); - SealTimer = 40000; - }else SealTimer -= diff; + m_uiSealTimer = 40000; + } + else + m_uiSealTimer -= uiDiff; - if (AuraTimer < diff) + if (m_uiAuraTimer < uiDiff) { CastAuraOnCouncil(); - AuraTimer = 90000; - }else AuraTimer -= diff; + m_uiAuraTimer = 90000; + } + else + m_uiAuraTimer -= uiDiff; DoMeleeAttackIfReady(); } @@ -545,92 +523,102 @@ struct MANGOS_DLL_DECL boss_high_nethermancer_zerevorAI : public boss_illidari_c { boss_high_nethermancer_zerevorAI(Creature* pCreature) : boss_illidari_councilAI(pCreature) { Reset(); } - uint32 BlizzardTimer; - uint32 FlamestrikeTimer; - uint32 ArcaneBoltTimer; - uint32 DampenMagicTimer; - uint32 Cooldown; - uint32 ArcaneExplosionTimer; + uint32 m_uiBlizzardTimer; + uint32 m_uiFlamestrikeTimer; + uint32 m_uiArcaneBoltTimer; + uint32 m_uiDampenMagicTimer; + uint32 m_uiCooldown; + uint32 m_uiArcaneExplosionTimer; void Reset() { - BlizzardTimer = urand(30000, 90000); - FlamestrikeTimer = urand(30000, 90000); - ArcaneBoltTimer = 10000; - DampenMagicTimer = 2000; - ArcaneExplosionTimer = 14000; - Cooldown = 0; + m_uiBlizzardTimer = urand(30000, 90000); + m_uiFlamestrikeTimer = urand(30000, 90000); + m_uiArcaneBoltTimer = 10000; + m_uiDampenMagicTimer = 2000; + m_uiArcaneExplosionTimer = 14000; + m_uiCooldown = 0; } - void KilledUnit(Unit *victim) + void KilledUnit(Unit* pVictim) { DoScriptText(SAY_ZERE_SLAY, m_creature); } - void JustDied(Unit *victim) + void JustDied(Unit* pKiller) { DoScriptText(SAY_ZERE_DEATH, m_creature); } - void UpdateAI(const uint32 diff) + void UpdateAI(const uint32 uiDiff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - if (Cooldown) + if (m_uiCooldown) { - if (Cooldown < diff) - Cooldown = 0; + if (m_uiCooldown < uiDiff) + m_uiCooldown = 0; else { - Cooldown -= diff; + m_uiCooldown -= uiDiff; return; // Don't cast any other spells if global cooldown is still ticking } } - if (DampenMagicTimer < diff) + if (m_uiDampenMagicTimer < uiDiff) { DoCastSpellIfCan(m_creature, SPELL_DAMPEN_MAGIC); - Cooldown = 1000; - DampenMagicTimer = 110000; // almost 2 minutes - ArcaneBoltTimer += 1000; // Give the Mage some time to spellsteal Dampen. - }else DampenMagicTimer -= diff; + m_uiCooldown = 1000; + m_uiDampenMagicTimer = 110000; // Almost 2 minutes + m_uiArcaneBoltTimer += 1000; // Give the Mage some time to spellsteal Dampen. + } + else + m_uiDampenMagicTimer -= uiDiff; - if (ArcaneExplosionTimer < diff) + if (m_uiArcaneExplosionTimer < uiDiff) { DoCastSpellIfCan(m_creature->getVictim(), SPELL_ARCANE_EXPLOSION); - Cooldown = 1000; - ArcaneExplosionTimer = 14000; - }else ArcaneExplosionTimer -= diff; + m_uiCooldown = 1000; + m_uiArcaneExplosionTimer = 14000; + } + else + m_uiArcaneExplosionTimer -= uiDiff; - if (ArcaneBoltTimer < diff) + if (m_uiArcaneBoltTimer < uiDiff) { DoCastSpellIfCan(m_creature->getVictim(), SPELL_ARCANE_BOLT); - ArcaneBoltTimer = 3000; - Cooldown = 2000; - }else ArcaneBoltTimer -= diff; + m_uiArcaneBoltTimer = 3000; + m_uiCooldown = 2000; + } + else + m_uiArcaneBoltTimer -= uiDiff; - if (BlizzardTimer < diff) + if (m_uiBlizzardTimer < uiDiff) { if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) { DoCastSpellIfCan(target, SPELL_BLIZZARD); - BlizzardTimer = urand(45000, 90000); - FlamestrikeTimer += 10000; - Cooldown = 1000; + m_uiBlizzardTimer = urand(45000, 90000); + m_uiFlamestrikeTimer += 10000; + m_uiCooldown = 1000; } - }else BlizzardTimer -= diff; + } + else + m_uiBlizzardTimer -= uiDiff; - if (FlamestrikeTimer < diff) + if (m_uiFlamestrikeTimer < uiDiff) { if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) { DoCastSpellIfCan(target, SPELL_FLAMESTRIKE); - FlamestrikeTimer = urand(55000, 100000); - BlizzardTimer += 10000; - Cooldown = 2000; + m_uiFlamestrikeTimer = urand(55000, 100000); + m_uiBlizzardTimer += 10000; + m_uiCooldown = 2000; } - }else FlamestrikeTimer -= diff; + } + else + m_uiFlamestrikeTimer -= uiDiff; } }; @@ -638,64 +626,72 @@ struct MANGOS_DLL_DECL boss_lady_malandeAI : public boss_illidari_councilAI { boss_lady_malandeAI(Creature* pCreature) : boss_illidari_councilAI(pCreature) { Reset(); } - uint32 EmpoweredSmiteTimer; - uint32 CircleOfHealingTimer; - uint32 DivineWrathTimer; - uint32 ReflectiveShieldTimer; + uint32 m_uiEmpoweredSmiteTimer; + uint32 m_uiCircleOfHealingTimer; + uint32 m_uiDivineWrathTimer; + uint32 m_uiReflectiveShieldTimer; void Reset() { - EmpoweredSmiteTimer = 38000; - CircleOfHealingTimer = 20000; - DivineWrathTimer = 40000; - ReflectiveShieldTimer = 0; + m_uiEmpoweredSmiteTimer = 38000; + m_uiCircleOfHealingTimer = 20000; + m_uiDivineWrathTimer = 40000; + m_uiReflectiveShieldTimer = 0; } - void KilledUnit(Unit *victim) + void KilledUnit(Unit* pVictim) { DoScriptText(SAY_MALA_SLAY, m_creature); } - void JustDied(Unit *victim) + void JustDied(Unit* pKiller) { DoScriptText(SAY_MALA_DEATH, m_creature); } - void UpdateAI(const uint32 diff) + void UpdateAI(const uint32 uiDiff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - if (EmpoweredSmiteTimer < diff) + if (m_uiEmpoweredSmiteTimer < uiDiff) { - if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) { - DoCastSpellIfCan(target, SPELL_EMPOWERED_SMITE); - EmpoweredSmiteTimer = 38000; + DoCastSpellIfCan(pTarget, SPELL_EMPOWERED_SMITE); + m_uiEmpoweredSmiteTimer = 38000; } - }else EmpoweredSmiteTimer -= diff; + } + else + m_uiEmpoweredSmiteTimer -= uiDiff; - if (CircleOfHealingTimer < diff) + if (m_uiCircleOfHealingTimer < uiDiff) { //Currently bugged and puts Malande on the threatlist of the other council members. It also heals players. //DoCastSpellIfCan(m_creature, SPELL_CIRCLE_OF_HEALING); - CircleOfHealingTimer = 60000; - }else CircleOfHealingTimer -= diff; + m_uiCircleOfHealingTimer = 60000; + } + else + m_uiCircleOfHealingTimer -= uiDiff; - if (DivineWrathTimer < diff) + if (m_uiDivineWrathTimer < uiDiff) { if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) { DoCastSpellIfCan(target, SPELL_DIVINE_WRATH); - DivineWrathTimer = urand(40000, 80000); + m_uiDivineWrathTimer = urand(40000, 80000); } - }else DivineWrathTimer -= diff; + } + else + m_uiDivineWrathTimer -= uiDiff; - if (ReflectiveShieldTimer < diff) + if (m_uiReflectiveShieldTimer < uiDiff) { DoCastSpellIfCan(m_creature, SPELL_REFLECTIVE_SHIELD); - ReflectiveShieldTimer = 65000; - }else ReflectiveShieldTimer -= diff; + m_uiReflectiveShieldTimer = 65000; + } + else + m_uiReflectiveShieldTimer -= uiDiff; DoMeleeAttackIfReady(); } @@ -705,96 +701,102 @@ struct MANGOS_DLL_DECL boss_veras_darkshadowAI : public boss_illidari_councilAI { boss_veras_darkshadowAI(Creature* pCreature) : boss_illidari_councilAI(pCreature) { Reset(); } - uint64 EnvenomTargetGUID; - - uint32 DeadlyPoisonTimer; - uint32 VanishTimer; - uint32 AppearEnvenomTimer; + uint32 m_uiDeadlyPoisonTimer; + uint32 m_uiVanishTimer; + uint32 m_uiAppearEnvenomTimer; - bool HasVanished; + bool m_bHasVanished; void Reset() { - EnvenomTargetGUID = 0; + m_uiDeadlyPoisonTimer = 20000; + m_uiVanishTimer = urand(60000, 120000); + m_uiAppearEnvenomTimer = 150000; - DeadlyPoisonTimer = 20000; - VanishTimer = urand(60000, 120000); - AppearEnvenomTimer = 150000; - - HasVanished = false; + m_bHasVanished = false; m_creature->SetVisibility(VISIBILITY_ON); m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); } - void KilledUnit(Unit *victim) + void KilledUnit(Unit* pVictim) { DoScriptText(SAY_VERA_SLAY, m_creature); } - void JustDied(Unit *victim) + void JustDied(Unit* pKiller) { DoScriptText(SAY_VERA_DEATH, m_creature); } - void UpdateAI(const uint32 diff) + void UpdateAI(const uint32 uiDiff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - if (!HasVanished) + if (!m_bHasVanished) { - if (DeadlyPoisonTimer < diff) + if (m_uiDeadlyPoisonTimer < uiDiff) { DoCastSpellIfCan(m_creature->getVictim(), SPELL_DEADLY_POISON); - DeadlyPoisonTimer = urand(15000, 45000); - }else DeadlyPoisonTimer -= diff; + m_uiDeadlyPoisonTimer = urand(15000, 45000); + } + else + m_uiDeadlyPoisonTimer -= uiDiff; - if (AppearEnvenomTimer < diff) // Cast Envenom. This is cast 4 seconds after Vanish is over + if (m_uiAppearEnvenomTimer < uiDiff) // Cast Envenom. This is cast 4 seconds after Vanish is over { DoCastSpellIfCan(m_creature->getVictim(), SPELL_ENVENOM); - AppearEnvenomTimer = 90000; - }else AppearEnvenomTimer -= diff; + m_uiAppearEnvenomTimer = 90000; + } + else + m_uiAppearEnvenomTimer -= uiDiff; - if (VanishTimer < diff) // Disappear and stop attacking, but follow a random unit + if (m_uiVanishTimer < uiDiff) // Disappear and stop attacking, but follow a random unit { - if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) { - VanishTimer = 30000; - AppearEnvenomTimer= 28000; - HasVanished = true; + m_uiVanishTimer = 30000; + m_uiAppearEnvenomTimer= 28000; + m_bHasVanished = true; m_creature->SetVisibility(VISIBILITY_OFF); m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); DoResetThreat(); // Chase a unit. Check before DoMeleeAttackIfReady prevents from attacking - m_creature->AddThreat(target, 500000.0f); - m_creature->GetMotionMaster()->MoveChase(target); + m_creature->AddThreat(pTarget, 500000.0f); + m_creature->GetMotionMaster()->MoveChase(pTarget); } - }else VanishTimer -= diff; + } + else + m_uiVanishTimer -= uiDiff; DoMeleeAttackIfReady(); } else { - if (VanishTimer < diff) // Become attackable and poison current target + if (m_uiVanishTimer < uiDiff) // Become attackable and poison current target { Unit* target = m_creature->getVictim(); DoCastSpellIfCan(target, SPELL_DEADLY_POISON); m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); DoResetThreat(); - m_creature->AddThreat(target, 3000.0f); // Make Veras attack his target for a while, he will cast Envenom 4 seconds after. - DeadlyPoisonTimer += 6000; - VanishTimer = 90000; - AppearEnvenomTimer = 4000; - HasVanished = false; - }else VanishTimer -= diff; - - if (AppearEnvenomTimer < diff) // Appear 2 seconds before becoming attackable (Shifting out of vanish) + m_creature->AddThreat(target, 3000.0f); // Make Veras attack his pTarget for a while, he will cast Envenom 4 seconds after. + m_uiDeadlyPoisonTimer += 6000; + m_uiVanishTimer = 90000; + m_uiAppearEnvenomTimer = 4000; + m_bHasVanished = false; + } + else + m_uiVanishTimer -= uiDiff; + + if (m_uiAppearEnvenomTimer < uiDiff) // Appear 2 seconds before becoming attackable (Shifting out of vanish) { m_creature->GetMotionMaster()->Clear(); m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); m_creature->SetVisibility(VISIBILITY_ON); - AppearEnvenomTimer = 6000; - }else AppearEnvenomTimer -= diff; + m_uiAppearEnvenomTimer = 6000; + } + else + m_uiAppearEnvenomTimer -= uiDiff; } } }; @@ -831,35 +833,35 @@ CreatureAI* GetAI_boss_high_nethermancer_zerevor(Creature* pCreature) void AddSC_boss_illidari_council() { - Script *newscript; - - newscript = new Script; - newscript->Name = "mob_illidari_council"; - newscript->GetAI = &GetAI_mob_illidari_council; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "mob_blood_elf_council_voice_trigger"; - newscript->GetAI = &GetAI_mob_blood_elf_council_voice_trigger; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "boss_gathios_the_shatterer"; - newscript->GetAI = &GetAI_boss_gathios_the_shatterer; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "boss_lady_malande"; - newscript->GetAI = &GetAI_boss_lady_malande; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "boss_veras_darkshadow"; - newscript->GetAI = &GetAI_boss_veras_darkshadow; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "boss_high_nethermancer_zerevor"; - newscript->GetAI = &GetAI_boss_high_nethermancer_zerevor; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "mob_illidari_council"; + pNewScript->GetAI = &GetAI_mob_illidari_council; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "mob_blood_elf_council_voice_trigger"; + pNewScript->GetAI = &GetAI_mob_blood_elf_council_voice_trigger; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "boss_gathios_the_shatterer"; + pNewScript->GetAI = &GetAI_boss_gathios_the_shatterer; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "boss_lady_malande"; + pNewScript->GetAI = &GetAI_boss_lady_malande; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "boss_veras_darkshadow"; + pNewScript->GetAI = &GetAI_boss_veras_darkshadow; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "boss_high_nethermancer_zerevor"; + pNewScript->GetAI = &GetAI_boss_high_nethermancer_zerevor; + pNewScript->RegisterSelf(); } diff --git a/scripts/outland/black_temple/instance_black_temple.cpp b/scripts/outland/black_temple/instance_black_temple.cpp index 4b1a75b9c..09b5e936d 100644 --- a/scripts/outland/black_temple/instance_black_temple.cpp +++ b/scripts/outland/black_temple/instance_black_temple.cpp @@ -36,28 +36,7 @@ EndScriptData */ 8 - Illidan Stormrage Event */ -instance_black_temple::instance_black_temple(Map* pMap) : ScriptedInstance(pMap), - m_uiNajentusGUID(0), - m_uiAkamaGUID(0), - m_uiAkama_ShadeGUID(0), - m_uiShadeOfAkamaGUID(0), - m_uiSupremusGUID(0), - m_uiLadyMalandeGUID(0), - m_uiGathiosTheShattererGUID(0), - m_uiHighNethermancerZerevorGUID(0), - m_uiVerasDarkshadowGUID(0), - m_uiIllidariCouncilGUID(0), - m_uiBloodElfCouncilVoiceGUID(0), - m_uiIllidanStormrageGUID(0), - - m_uiNajentusGateGUID(0), - m_uiMainTempleDoorsGUID(0), - m_uiShadeAkamaDoorGUID(0), - m_uiIllidanGateGUID(0), - m_uiShahrazPreDoorGUID(0), - m_uiShahrazPostDoorGUID(0), - m_uiPreCouncilDoorGUID(0), - m_uiCouncilDoorGUID(0) +instance_black_temple::instance_black_temple(Map* pMap) : ScriptedInstance(pMap) { Initialize(); }; @@ -65,9 +44,6 @@ instance_black_temple::instance_black_temple(Map* pMap) : ScriptedInstance(pMap) void instance_black_temple::Initialize() { memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); - - m_uiIllidanDoorGUID[0] = 0; - m_uiIllidanDoorGUID[1] = 0; } bool instance_black_temple::IsEncounterInProgress() const @@ -82,18 +58,20 @@ void instance_black_temple::OnCreatureCreate(Creature* pCreature) { switch(pCreature->GetEntry()) { - case NPC_WARLORD_NAJENTUS: m_uiNajentusGUID = pCreature->GetGUID(); break; - case NPC_AKAMA: m_uiAkamaGUID = pCreature->GetGUID(); break; - case NPC_AKAMA_SHADE: m_uiAkama_ShadeGUID = pCreature->GetGUID(); break; - case NPC_SHADE_OF_AKAMA: m_uiShadeOfAkamaGUID = pCreature->GetGUID(); break; - case NPC_SUPREMUS: m_uiSupremusGUID = pCreature->GetGUID(); break; - case NPC_ILLIDAN_STORMRAGE: m_uiIllidanStormrageGUID = pCreature->GetGUID(); break; - case NPC_GATHIOS: m_uiGathiosTheShattererGUID = pCreature->GetGUID(); break; - case NPC_ZEREVOR: m_uiHighNethermancerZerevorGUID = pCreature->GetGUID(); break; - case NPC_LADY_MALANDE: m_uiLadyMalandeGUID = pCreature->GetGUID(); break; - case NPC_VERAS: m_uiVerasDarkshadowGUID = pCreature->GetGUID(); break; - case NPC_ILLIDARI_COUNCIL: m_uiIllidariCouncilGUID = pCreature->GetGUID(); break; - case NPC_COUNCIL_VOICE: m_uiBloodElfCouncilVoiceGUID = pCreature->GetGUID(); break; + // SPECIAL - guid is directly used, keep open how to handle + case NPC_AKAMA: m_akamaGuid = pCreature->GetObjectGuid(); break; + case NPC_ILLIDAN_STORMRAGE: m_illidanStormrageGuid = pCreature->GetObjectGuid(); break; + + case NPC_AKAMA_SHADE: + case NPC_SHADE_OF_AKAMA: + case NPC_GATHIOS: + case NPC_ZEREVOR: + case NPC_LADY_MALANDE: + case NPC_VERAS: + case NPC_ILLIDARI_COUNCIL: + case NPC_COUNCIL_VOICE: + m_mNpcEntryGuidStore[pCreature->GetEntry()] = pCreature->GetObjectGuid(); + break; } } @@ -102,45 +80,38 @@ void instance_black_temple::OnObjectCreate(GameObject* pGo) switch(pGo->GetEntry()) { case GO_NAJENTUS_GATE: // Gate past Naj'entus (at the entrance to Supermoose's courtyards) - m_uiNajentusGateGUID = pGo->GetGUID(); if (m_auiEncounter[TYPE_NAJENTUS] == DONE) pGo->SetGoState(GO_STATE_ACTIVE); break; case GO_SUPREMUS_DOORS: // Main Temple Doors - right past Supermoose (Supremus) - m_uiMainTempleDoorsGUID = pGo->GetGUID(); if (m_auiEncounter[TYPE_SUPREMUS] == DONE) pGo->SetGoState(GO_STATE_ACTIVE); break; case GO_SHADE_OF_AKAMA: // Door close during encounter - m_uiShadeAkamaDoorGUID = pGo->GetGUID(); break; case GO_PRE_SHAHRAZ_DOOR: // Door leading to Mother Shahraz - m_uiShahrazPreDoorGUID = pGo->GetGUID(); if (CanPreMotherDoorOpen()) pGo->SetGoState(GO_STATE_ACTIVE); break; case GO_POST_SHAHRAZ_DOOR: // Door after shahraz - m_uiShahrazPostDoorGUID = pGo->GetGUID(); if (m_auiEncounter[6] == DONE) pGo->SetGoState(GO_STATE_ACTIVE); break; case GO_PRE_COUNCIL_DOOR: // Door leading to the Council (grand promenade) - m_uiPreCouncilDoorGUID = pGo->GetGUID(); break; case GO_COUNCIL_DOOR: // Door leading to the Council (inside) - m_uiCouncilDoorGUID = pGo->GetGUID(); break; case GO_ILLIDAN_GATE: // Gate leading to Temple Summit - m_uiIllidanGateGUID = pGo->GetGUID(); // TODO - dependend on council state break; case GO_ILLIDAN_DOOR_R: // Right door at Temple Summit - m_uiIllidanDoorGUID[0] = pGo->GetGUID(); - break; case GO_ILLIDAN_DOOR_L: // Left door at Temple Summit - m_uiIllidanDoorGUID[1] = pGo->GetGUID(); break; + + default: + return; } + m_mGoEntryGuidStore[pGo->GetEntry()] = pGo->GetObjectGuid(); } bool instance_black_temple::CanPreMotherDoorOpen() @@ -164,46 +135,34 @@ void instance_black_temple::SetData(uint32 uiType, uint32 uiData) case TYPE_NAJENTUS: m_auiEncounter[uiType] = uiData; if (uiData == DONE) - DoUseDoorOrButton(m_uiNajentusGateGUID); + DoUseDoorOrButton(GO_NAJENTUS_GATE); break; case TYPE_SUPREMUS: m_auiEncounter[uiType] = uiData; if (uiData == DONE) - DoUseDoorOrButton(m_uiMainTempleDoorsGUID); + DoUseDoorOrButton(GO_SUPREMUS_DOORS); break; case TYPE_SHADE: - m_auiEncounter[uiType] = uiData; - if (uiData == DONE && CanPreMotherDoorOpen()) - DoUseDoorOrButton(m_uiShahrazPreDoorGUID); - break; case TYPE_GOREFIEND: - m_auiEncounter[uiType] = uiData; - if (uiData == DONE && CanPreMotherDoorOpen()) - DoUseDoorOrButton(m_uiShahrazPreDoorGUID); - break; case TYPE_BLOODBOIL: - m_auiEncounter[uiType] = uiData; - if (uiData == DONE && CanPreMotherDoorOpen()) - DoUseDoorOrButton(m_uiShahrazPreDoorGUID); - break; case TYPE_RELIQUIARY: m_auiEncounter[uiType] = uiData; if (uiData == DONE && CanPreMotherDoorOpen()) - DoUseDoorOrButton(m_uiShahrazPreDoorGUID); + DoUseDoorOrButton(GO_PRE_SHAHRAZ_DOOR); break; case TYPE_SHAHRAZ: if (uiData == DONE) - DoUseDoorOrButton(m_uiShahrazPostDoorGUID); + DoUseDoorOrButton(GO_POST_SHAHRAZ_DOOR); m_auiEncounter[uiType] = uiData; break; case TYPE_COUNCIL: - DoUseDoorOrButton(m_uiCouncilDoorGUID); + DoUseDoorOrButton(GO_COUNCIL_DOOR); m_auiEncounter[uiType] = uiData; break; case TYPE_ILLIDAN: m_auiEncounter[uiType] = uiData; break; default: error_log("SD2: Instance Black Temple: ERROR SetData = %u for type %u does not exist/not implemented.", uiType, uiData); - break; + return; } if (uiData == DONE) @@ -224,47 +183,18 @@ void instance_black_temple::SetData(uint32 uiType, uint32 uiData) uint32 instance_black_temple::GetData(uint32 uiType) { - switch(uiType) - { - case TYPE_NAJENTUS: return m_auiEncounter[0]; - case TYPE_SUPREMUS: return m_auiEncounter[1]; - case TYPE_SHADE: return m_auiEncounter[2]; - case TYPE_GOREFIEND: return m_auiEncounter[3]; - case TYPE_BLOODBOIL: return m_auiEncounter[4]; - case TYPE_RELIQUIARY: return m_auiEncounter[5]; - case TYPE_SHAHRAZ: return m_auiEncounter[6]; - case TYPE_COUNCIL: return m_auiEncounter[7]; - case TYPE_ILLIDAN: return m_auiEncounter[8]; - default: - return 0; - } + if (uiType < MAX_ENCOUNTER) + return m_auiEncounter[uiType]; + + return 0; } uint64 instance_black_temple::GetData64(uint32 uiData) { switch(uiData) { - case NPC_WARLORD_NAJENTUS: return m_uiNajentusGUID; - case NPC_AKAMA: return m_uiAkamaGUID; - case NPC_AKAMA_SHADE: return m_uiAkama_ShadeGUID; - case NPC_SHADE_OF_AKAMA: return m_uiShadeOfAkamaGUID; - case NPC_SUPREMUS: return m_uiSupremusGUID; - case NPC_ILLIDAN_STORMRAGE: return m_uiIllidanStormrageGUID; - case NPC_GATHIOS: return m_uiGathiosTheShattererGUID; - case NPC_ZEREVOR: return m_uiHighNethermancerZerevorGUID; - case NPC_LADY_MALANDE: return m_uiLadyMalandeGUID; - case NPC_VERAS: return m_uiVerasDarkshadowGUID; - case NPC_ILLIDARI_COUNCIL: return m_uiIllidariCouncilGUID; - case GO_NAJENTUS_GATE: return m_uiNajentusGateGUID; - case GO_ILLIDAN_GATE: return m_uiIllidanGateGUID; - case GO_ILLIDAN_DOOR_R: return m_uiIllidanDoorGUID[0]; - case GO_ILLIDAN_DOOR_L: return m_uiIllidanDoorGUID[1]; - case GO_SUPREMUS_DOORS: return m_uiMainTempleDoorsGUID; - case NPC_COUNCIL_VOICE: return m_uiBloodElfCouncilVoiceGUID; - case GO_PRE_SHAHRAZ_DOOR: return m_uiShahrazPreDoorGUID; - case GO_POST_SHAHRAZ_DOOR: return m_uiShahrazPostDoorGUID; - case GO_PRE_COUNCIL_DOOR: return m_uiPreCouncilDoorGUID; - case GO_COUNCIL_DOOR: return m_uiCouncilDoorGUID; + case NPC_AKAMA: return m_akamaGuid.GetRawValue(); + case NPC_ILLIDAN_STORMRAGE: return m_illidanStormrageGuid.GetRawValue(); default: return 0; } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index bb255f458..ca997f73c 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2205" + #define SD2_REVISION_NR "2206" #endif // __SD2_REVISION_NR_H__ From 98c8af81cb25b91706d966735562bb7cd805b107 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Mon, 6 Jun 2011 14:39:25 +0200 Subject: [PATCH 0187/1172] [2207] Use EntryGuidMap-Storage in SSC --- .../boss_fathomlord_karathress.cpp | 113 +++++++++--------- .../serpent_shrine/boss_lady_vashj.cpp | 13 +- .../boss_leotheras_the_blind.cpp | 9 +- .../instance_serpent_shrine.cpp | 36 ++---- .../serpent_shrine/serpent_shrine.h | 7 +- sd2_revision_nr.h | 2 +- 6 files changed, 80 insertions(+), 100 deletions(-) diff --git a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_fathomlord_karathress.cpp b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_fathomlord_karathress.cpp index b9eca0eca..16eeed1d7 100644 --- a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_fathomlord_karathress.cpp +++ b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_fathomlord_karathress.cpp @@ -74,13 +74,14 @@ enum // position for Seer Olum const float afCoords_Olum[] = {446.78f, -542.76f, -7.54773f, 0.401581f}; +static const uint32 aAdvisors[] = {NPC_SHARKKIS, NPC_TIDALVESS, NPC_CARIBDIS}; + //Fathom-Lord Karathress AI struct MANGOS_DLL_DECL boss_fathomlord_karathressAI : public ScriptedAI { boss_fathomlord_karathressAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - memset(&m_auiAdvisorsGUID, 0, sizeof(m_auiAdvisorsGUID)); Reset(); } @@ -92,27 +93,11 @@ struct MANGOS_DLL_DECL boss_fathomlord_karathressAI : public ScriptedAI bool m_bBlessingOfTides_MobsChecked; - uint64 m_auiAdvisorsGUID[MAX_ADVISORS]; // the GUIDs from the advisors - void Reset() { m_uiCataclysmicBoltTimer = 10000; m_uiEnrageTimer = 600000; m_bBlessingOfTides_MobsChecked = false; - - for(uint8 i = 0; i < MAX_ADVISORS; ++i) - { - if (Creature* pAdvisor = m_creature->GetMap()->GetCreature(m_auiAdvisorsGUID[i])) - { - if (pAdvisor->getVictim()) - pAdvisor->AI()->EnterEvadeMode(); - else if (!pAdvisor->isAlive()) - pAdvisor->Respawn(); - } - } - - if (m_pInstance) - m_pInstance->SetData(TYPE_KARATHRESS_EVENT, NOT_STARTED); } // TODO - unneeded workaround - the spell should be cast by adviser onto karathress; text can also be handled in their AI @@ -148,28 +133,16 @@ struct MANGOS_DLL_DECL boss_fathomlord_karathressAI : public ScriptedAI DoCastSpellIfCan(m_creature, uiSpell); } - void GetAdvisors() - { - if (!m_pInstance) - return; - - m_auiAdvisorsGUID[0] = m_pInstance->GetData64(NPC_SHARKKIS); - m_auiAdvisorsGUID[1] = m_pInstance->GetData64(NPC_TIDALVESS); - m_auiAdvisorsGUID[2] = m_pInstance->GetData64(NPC_CARIBDIS); - } - void Aggro(Unit* pWho) { if (!m_pInstance) return; - GetAdvisors(); - DoScriptText(SAY_AGGRO, m_creature); if (Player* pPlayer = pWho->GetCharmerOrOwnerPlayerOrPlayerItself()) { - m_pInstance->SetData64(DATA_KARATHRESS_STARTER, pPlayer->GetGUID()); + m_pInstance->SetGuid(DATA_KARATHRESS_STARTER, pPlayer->GetObjectGuid()); m_pInstance->SetData(TYPE_KARATHRESS_EVENT, IN_PROGRESS); } } @@ -195,25 +168,45 @@ struct MANGOS_DLL_DECL boss_fathomlord_karathressAI : public ScriptedAI m_creature->SummonCreature(NPC_SEER_OLUM, afCoords_Olum[0], afCoords_Olum[1], afCoords_Olum[2], afCoords_Olum[3], TEMPSUMMON_TIMED_DESPAWN, 3600000); } + void JustReachedHome() + { + if (!m_pInstance) + return; + + for (uint8 i = 0; i < MAX_ADVISORS; ++i) + { + if (Creature* pAdvisor = m_pInstance->GetSingleCreatureFromStorage(aAdvisors[i])) + { + if (pAdvisor->getVictim()) + pAdvisor->AI()->EnterEvadeMode(); + else if (!pAdvisor->isAlive()) + pAdvisor->Respawn(); + } + } + + if (m_pInstance) + m_pInstance->SetData(TYPE_KARATHRESS_EVENT, FAIL); + } + void UpdateAI(const uint32 uiDiff) { + if (!m_pInstance) + return; + //Return since we have no target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) { //check if the event is started - if (m_pInstance && m_pInstance->GetData(TYPE_KARATHRESS_EVENT) == IN_PROGRESS) + if (m_pInstance->GetData(TYPE_KARATHRESS_EVENT) == IN_PROGRESS) { if (Player* pTarget = m_creature->GetMap()->GetPlayer(m_pInstance->GetData64(DATA_KARATHRESS_STARTER))) - { AttackStart(pTarget); - GetAdvisors(); - } } return; } //someone evaded! - if (m_pInstance && m_pInstance->GetData(TYPE_KARATHRESS_EVENT) == NOT_STARTED) + if (m_pInstance->GetData(TYPE_KARATHRESS_EVENT) == FAIL) { EnterEvadeMode(); return; @@ -240,7 +233,7 @@ struct MANGOS_DLL_DECL boss_fathomlord_karathressAI : public ScriptedAI { for(uint8 i = 0; i < MAX_ADVISORS; ++i) { - if (Creature* pAdvisor = m_creature->GetMap()->GetCreature(m_auiAdvisorsGUID[i])) + if (Creature* pAdvisor = m_pInstance->GetSingleCreatureFromStorage(aAdvisors[i])) { //stack max three times (one for each alive) if (pAdvisor->isAlive()) @@ -284,7 +277,7 @@ struct MANGOS_DLL_DECL Advisor_Base_AI : public ScriptedAI void JustReachedHome() { if (m_pInstance && m_pInstance->GetData(TYPE_KARATHRESS_EVENT) == IN_PROGRESS) - m_pInstance->SetData(TYPE_KARATHRESS_EVENT, NOT_STARTED); + m_pInstance->SetData(TYPE_KARATHRESS_EVENT, FAIL); } void Aggro(Unit *pWho) @@ -292,11 +285,11 @@ struct MANGOS_DLL_DECL Advisor_Base_AI : public ScriptedAI if (!m_pInstance) return; - if (m_pInstance->GetData(TYPE_KARATHRESS_EVENT) == NOT_STARTED) + if (m_pInstance->GetData(TYPE_KARATHRESS_EVENT) == NOT_STARTED || m_pInstance->GetData(TYPE_KARATHRESS_EVENT) == FAIL) m_pInstance->SetData(TYPE_KARATHRESS_EVENT, IN_PROGRESS); if (Player* pPlayer = pWho->GetCharmerOrOwnerPlayerOrPlayerItself()) - m_pInstance->SetData64(DATA_KARATHRESS_STARTER, pPlayer->GetGUID()); + m_pInstance->SetGuid(DATA_KARATHRESS_STARTER, pPlayer->GetObjectGuid()); } void JustDied(Unit* pVictim) @@ -304,7 +297,7 @@ struct MANGOS_DLL_DECL Advisor_Base_AI : public ScriptedAI if (!m_pInstance) return; - if (Creature* pKarathress = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(NPC_KARATHRESS))) + if (Creature* pKarathress = m_pInstance->GetSingleCreatureFromStorage(NPC_KARATHRESS)) { if (boss_fathomlord_karathressAI* pKaraAI = dynamic_cast(pKarathress->AI())) pKaraAI->EventAdvisorDeath(m_creature->GetEntry()); @@ -368,20 +361,23 @@ struct MANGOS_DLL_DECL boss_fathomguard_sharkkisAI : public Advisor_Base_AI void UpdateAI(const uint32 uiDiff) { + if (!m_pInstance) + return; + //Return since we have no target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) { //check if the event is started - if (m_pInstance && m_pInstance->GetData(TYPE_KARATHRESS_EVENT) == IN_PROGRESS) + if (m_pInstance->GetData(TYPE_KARATHRESS_EVENT) == IN_PROGRESS) { - if (Player* pTarget = m_creature->GetMap()->GetPlayer(m_pInstance->GetData64(DATA_KARATHRESS_STARTER))) + if (Player* pTarget = m_creature->GetMap()->GetPlayer(m_pInstance->GetGuid(DATA_KARATHRESS_STARTER))) AttackStart(pTarget); } return; } //someone evaded! - if (m_pInstance && m_pInstance->GetData(TYPE_KARATHRESS_EVENT) == NOT_STARTED) + if (m_pInstance->GetData(TYPE_KARATHRESS_EVENT) == FAIL) { EnterEvadeMode(); return; @@ -450,20 +446,23 @@ struct MANGOS_DLL_DECL boss_fathomguard_tidalvessAI : public Advisor_Base_AI void UpdateAI(const uint32 uiDiff) { + if (!m_pInstance) + return; + //Return since we have no target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) { //check if the event is started - if (m_pInstance && m_pInstance->GetData(TYPE_KARATHRESS_EVENT) == IN_PROGRESS) + if (m_pInstance->GetData(TYPE_KARATHRESS_EVENT) == IN_PROGRESS) { - if (Player* pTarget = m_creature->GetMap()->GetPlayer(m_pInstance->GetData64(DATA_KARATHRESS_STARTER))) + if (Player* pTarget = m_creature->GetMap()->GetPlayer(m_pInstance->GetGuid(DATA_KARATHRESS_STARTER))) AttackStart(pTarget); } return; } //someone evaded! - if (m_pInstance && m_pInstance->GetData(TYPE_KARATHRESS_EVENT) == NOT_STARTED) + if (m_pInstance->GetData(TYPE_KARATHRESS_EVENT) == FAIL) { EnterEvadeMode(); return; @@ -501,20 +500,23 @@ struct MANGOS_DLL_DECL boss_fathomguard_caribdisAI : public Advisor_Base_AI void UpdateAI(const uint32 uiDiff) { + if (!m_pInstance) + return; + //Return since we have no target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) { //check if the event is started - if (m_pInstance && m_pInstance->GetData(TYPE_KARATHRESS_EVENT) == IN_PROGRESS) + if (m_pInstance->GetData(TYPE_KARATHRESS_EVENT) == IN_PROGRESS) { - if (Player* pTarget = m_creature->GetMap()->GetPlayer(m_pInstance->GetData64(DATA_KARATHRESS_STARTER))) + if (Player* pTarget = m_creature->GetMap()->GetPlayer(m_pInstance->GetGuid(DATA_KARATHRESS_STARTER))) AttackStart(pTarget); } return; } //someone evaded! - if (m_pInstance && m_pInstance->GetData(TYPE_KARATHRESS_EVENT) == NOT_STARTED) + if (m_pInstance->GetData(TYPE_KARATHRESS_EVENT) == FAIL) { EnterEvadeMode(); return; @@ -544,15 +546,12 @@ struct MANGOS_DLL_DECL boss_fathomguard_caribdisAI : public Advisor_Base_AI // It can be cast on any of the mobs Unit* pUnit = NULL; - if (m_pInstance) + switch (urand(0, 3)) { - switch(urand(0, 3)) - { - case 0: pUnit = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(NPC_KARATHRESS)); break; - case 1: pUnit = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(NPC_SHARKKIS)); break; - case 2: pUnit = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(NPC_TIDALVESS)); break; - case 3: pUnit = m_creature; break; - } + case 0: pUnit = m_pInstance->GetSingleCreatureFromStorage(NPC_KARATHRESS); break; + case 1: pUnit = m_pInstance->GetSingleCreatureFromStorage(NPC_SHARKKIS); break; + case 2: pUnit = m_pInstance->GetSingleCreatureFromStorage(NPC_TIDALVESS); break; + case 3: pUnit = m_creature; break; } if (!pUnit) diff --git a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_lady_vashj.cpp b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_lady_vashj.cpp index e7d3d4d45..520b3ffc4 100644 --- a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_lady_vashj.cpp +++ b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_lady_vashj.cpp @@ -119,13 +119,12 @@ struct MANGOS_DLL_DECL boss_lady_vashjAI : public ScriptedAI boss_lady_vashjAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - memset(&m_auiShieldGeneratorChannel, 0, sizeof(m_auiShieldGeneratorChannel)); Reset(); } ScriptedInstance *m_pInstance; // the instance - uint64 m_auiShieldGeneratorChannel[MAX_SHIELD_GEN]; + ObjectGuid m_auiShieldGeneratorChannel[MAX_SHIELD_GEN]; // timers uint32 m_uiShockBlast_Timer; @@ -181,7 +180,7 @@ struct MANGOS_DLL_DECL boss_lady_vashjAI : public ScriptedAI if (pTemp->isAlive()) pTemp->SetDeathState(JUST_DIED); - m_auiShieldGeneratorChannel[i] = 0; + m_auiShieldGeneratorChannel[i].Clear(); } } } @@ -212,7 +211,7 @@ struct MANGOS_DLL_DECL boss_lady_vashjAI : public ScriptedAI for(uint8 i = 0; i < MAX_SHIELD_GEN; ++i) { if (Creature* pCreature = m_creature->SummonCreature(NPC_SHIELD_GENERATOR, afShieldGeneratorChannelPos[i][0], afShieldGeneratorChannelPos[i][1], afShieldGeneratorChannelPos[i][2], afShieldGeneratorChannelPos[i][3], TEMPSUMMON_CORPSE_DESPAWN, 0)) - m_auiShieldGeneratorChannel[i] = pCreature->GetGUID(); + m_auiShieldGeneratorChannel[i] = pCreature->GetObjectGuid(); } } } @@ -507,7 +506,7 @@ struct MANGOS_DLL_DECL mob_enchanted_elementalAI : public ScriptedAI { if (m_pInstance) { - if (Creature* pVashj = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(NPC_LADYVASHJ))) + if (Creature* pVashj = m_pInstance->GetSingleCreatureFromStorage(NPC_LADYVASHJ)) { if (pVashj->IsWithinDistInMap(m_creature, INTERACTION_DISTANCE)) { @@ -607,7 +606,7 @@ struct MANGOS_DLL_DECL mob_toxic_sporebatAI : public ScriptedAI if (m_pInstance) { //check if vashj is death - Creature* pVashj = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(NPC_LADYVASHJ)); + Creature* pVashj = m_pInstance->GetSingleCreatureFromStorage(NPC_LADYVASHJ); if (!pVashj || !pVashj->isAlive()) { //remove @@ -657,7 +656,7 @@ bool ItemUse_item_tainted_core(Player* pPlayer, Item* pItem, SpellCastTargets co return true; } - Creature* pVashj = pPlayer->GetMap()->GetCreature(pInstance->GetData64(NPC_LADYVASHJ)); + Creature* pVashj = pInstance->GetSingleCreatureFromStorage(NPC_LADYVASHJ); if (!pVashj) return true; diff --git a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_leotheras_the_blind.cpp b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_leotheras_the_blind.cpp index 75da7509a..91ef34a37 100644 --- a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_leotheras_the_blind.cpp +++ b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_leotheras_the_blind.cpp @@ -68,7 +68,6 @@ struct MANGOS_DLL_DECL boss_leotheras_the_blindAI : public ScriptedAI boss_leotheras_the_blindAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_uiShadowLeo = 0; Reset(); } @@ -83,7 +82,7 @@ struct MANGOS_DLL_DECL boss_leotheras_the_blindAI : public ScriptedAI bool m_bDemonForm; bool m_bIsFinalForm; - uint64 m_uiShadowLeo; + ObjectGuid m_shadowLeoGuid; void Reset() { @@ -127,7 +126,7 @@ struct MANGOS_DLL_DECL boss_leotheras_the_blindAI : public ScriptedAI { if (m_creature->getVictim() && pSummoned->GetEntry() == NPC_SHADOW_LEO) { - m_uiShadowLeo = pSummoned->GetGUID(); + m_shadowLeoGuid = pSummoned->GetObjectGuid(); pSummoned->AI()->AttackStart(m_creature->getVictim()); } } @@ -137,9 +136,9 @@ struct MANGOS_DLL_DECL boss_leotheras_the_blindAI : public ScriptedAI DoScriptText(SAY_DEATH, m_creature); //despawn copy - if (m_uiShadowLeo) + if (m_shadowLeoGuid) { - if (Creature* pShadowLeo = m_creature->GetMap()->GetCreature(m_uiShadowLeo)) + if (Creature* pShadowLeo = m_creature->GetMap()->GetCreature(m_shadowLeoGuid)) pShadowLeo->ForcedDespawn(); } diff --git a/scripts/outland/coilfang_reservoir/serpent_shrine/instance_serpent_shrine.cpp b/scripts/outland/coilfang_reservoir/serpent_shrine/instance_serpent_shrine.cpp index eb9b11b6d..29d982d24 100644 --- a/scripts/outland/coilfang_reservoir/serpent_shrine/instance_serpent_shrine.cpp +++ b/scripts/outland/coilfang_reservoir/serpent_shrine/instance_serpent_shrine.cpp @@ -33,13 +33,7 @@ EndScriptData */ 5 - Lady Vashj Event */ -instance_serpentshrine_cavern::instance_serpentshrine_cavern(Map* pMap) : ScriptedInstance(pMap), - m_uiSharkkis(0), - m_uiTidalvess(0), - m_uiCaribdis(0), - m_uiLadyVashj(0), - m_uiKarathress(0), - m_uiKarathressEvent_Starter(0) +instance_serpentshrine_cavern::instance_serpentshrine_cavern(Map* pMap) : ScriptedInstance(pMap) { Initialize(); } @@ -65,34 +59,28 @@ void instance_serpentshrine_cavern::OnCreatureCreate(Creature* pCreature) { switch (pCreature->GetEntry()) { - case NPC_LADYVASHJ: m_uiLadyVashj = pCreature->GetGUID(); break; - case NPC_KARATHRESS: m_uiKarathress = pCreature->GetGUID(); break; - case NPC_SHARKKIS: m_uiSharkkis = pCreature->GetGUID(); break; - case NPC_TIDALVESS: m_uiTidalvess = pCreature->GetGUID(); break; - case NPC_CARIBDIS: m_uiCaribdis = pCreature->GetGUID(); break; + case NPC_LADYVASHJ: + case NPC_KARATHRESS: + case NPC_SHARKKIS: + case NPC_TIDALVESS: + case NPC_CARIBDIS: + m_mNpcEntryGuidStore[pCreature->GetEntry()] = pCreature->GetObjectGuid(); + break; } } void instance_serpentshrine_cavern::SetData64(uint32 uiType, uint64 uiData) { if (uiType == DATA_KARATHRESS_STARTER) - m_uiKarathressEvent_Starter = uiData; + m_karathressEventStarterGuid = ObjectGuid(uiData); } uint64 instance_serpentshrine_cavern::GetData64(uint32 uiData) { - switch (uiData) - { - case NPC_SHARKKIS: return m_uiSharkkis; - case NPC_TIDALVESS: return m_uiTidalvess; - case NPC_CARIBDIS: return m_uiCaribdis; - case NPC_LADYVASHJ: return m_uiLadyVashj; - case NPC_KARATHRESS: return m_uiKarathress; - case DATA_KARATHRESS_STARTER: return m_uiKarathressEvent_Starter; + if (uiData == DATA_KARATHRESS_STARTER) + return m_karathressEventStarterGuid.GetRawValue(); - default: - return 0; - } + return 0; } void instance_serpentshrine_cavern::SetData(uint32 uiType, uint32 uiData) diff --git a/scripts/outland/coilfang_reservoir/serpent_shrine/serpent_shrine.h b/scripts/outland/coilfang_reservoir/serpent_shrine/serpent_shrine.h index 503d0c410..58a98cff3 100644 --- a/scripts/outland/coilfang_reservoir/serpent_shrine/serpent_shrine.h +++ b/scripts/outland/coilfang_reservoir/serpent_shrine/serpent_shrine.h @@ -55,12 +55,7 @@ class MANGOS_DLL_DECL instance_serpentshrine_cavern : public ScriptedInstance uint32 m_auiShieldGenerator[MAX_GENERATOR]; std::string m_strInstData; - uint64 m_uiSharkkis; - uint64 m_uiTidalvess; - uint64 m_uiCaribdis; - uint64 m_uiLadyVashj; - uint64 m_uiKarathress; - uint64 m_uiKarathressEvent_Starter; + ObjectGuid m_karathressEventStarterGuid; }; #endif diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index ca997f73c..1be655033 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2206" + #define SD2_REVISION_NR "2207" #endif // __SD2_REVISION_NR_H__ From a98f6e26b56b828fbf0bcdd6e08efe60ee92b691 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Mon, 6 Jun 2011 15:52:05 +0200 Subject: [PATCH 0188/1172] [2208] Use EntryGuidMap-Storage in Gruuls Lair --- .../gruuls_lair/boss_high_king_maulgar.cpp | 97 ++++++------------- scripts/outland/gruuls_lair/gruuls_lair.h | 9 -- .../gruuls_lair/instance_gruuls_lair.cpp | 47 +++------ sd2_revision_nr.h | 2 +- 4 files changed, 46 insertions(+), 109 deletions(-) diff --git a/scripts/outland/gruuls_lair/boss_high_king_maulgar.cpp b/scripts/outland/gruuls_lair/boss_high_king_maulgar.cpp index 5b052761d..2c78321d6 100644 --- a/scripts/outland/gruuls_lair/boss_high_king_maulgar.cpp +++ b/scripts/outland/gruuls_lair/boss_high_king_maulgar.cpp @@ -72,13 +72,14 @@ enum const float DISTANCE_KIGGLER = 20.0f; const float DISTANCE_KROSH = 30.0f; +static const uint32 aCouncilMember[] = {NPC_BLINDEYE, NPC_KIGGLER, NPC_KROSH, NPC_OLM}; + //High King Maulgar AI struct MANGOS_DLL_DECL boss_high_king_maulgarAI : public ScriptedAI { boss_high_king_maulgarAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - memset(&m_auiCouncil, 0, sizeof(m_auiCouncil)); Reset(); } @@ -93,8 +94,6 @@ struct MANGOS_DLL_DECL boss_high_king_maulgarAI : public ScriptedAI bool m_bPhase2; - uint64 m_auiCouncil[MAX_COUNCIL]; // Council GUIDs - void Reset() { m_uiArcingSmash_Timer = urand(8000, 14000); @@ -108,9 +107,12 @@ struct MANGOS_DLL_DECL boss_high_king_maulgarAI : public ScriptedAI void JustReachedHome() { + if (!m_pInstance) + return; + for (uint8 i = 0; i < MAX_COUNCIL; ++i) { - if (Creature* pCreature = m_creature->GetMap()->GetCreature(m_auiCouncil[i])) + if (Creature* pCreature = m_pInstance->GetSingleCreatureFromStorage(aCouncilMember[i])) { if (!pCreature->isAlive()) pCreature->Respawn(); @@ -119,8 +121,7 @@ struct MANGOS_DLL_DECL boss_high_king_maulgarAI : public ScriptedAI } } - if (m_pInstance && m_pInstance->GetData(TYPE_MAULGAR_EVENT) == IN_PROGRESS) - m_pInstance->SetData(TYPE_MAULGAR_EVENT, NOT_STARTED); + m_pInstance->SetData(TYPE_MAULGAR_EVENT, FAIL); } void KilledUnit() @@ -149,26 +150,20 @@ struct MANGOS_DLL_DECL boss_high_king_maulgarAI : public ScriptedAI if (!m_pInstance) return; - GetCouncil(); - DoScriptText(SAY_AGGRO, m_creature); - m_creature->CallForHelp(50.0f); - - if (m_pInstance->GetData(TYPE_MAULGAR_EVENT) == NOT_STARTED) - m_pInstance->SetData(TYPE_MAULGAR_EVENT, IN_PROGRESS); - } - - void GetCouncil() - { - if (!m_pInstance) - return; + m_pInstance->SetData(TYPE_MAULGAR_EVENT, IN_PROGRESS); - //get council member's guid to respawn them if needed - m_auiCouncil[0] = m_pInstance->GetData64(NPC_KIGGLER); - m_auiCouncil[1] = m_pInstance->GetData64(NPC_BLINDEYE); - m_auiCouncil[2] = m_pInstance->GetData64(NPC_OLM); - m_auiCouncil[3] = m_pInstance->GetData64(NPC_KROSH); + for (uint8 i = 0; i < MAX_COUNCIL; ++i) + { + if (Creature* pCreature = m_pInstance->GetSingleCreatureFromStorage(aCouncilMember[i])) + { + if (!pCreature->isAlive()) + pCreature->Respawn(); + if (!pCreature->getVictim()) + pCreature->AI()->AttackStart(pWho); + } + } } void EventCouncilDeath() @@ -188,13 +183,6 @@ struct MANGOS_DLL_DECL boss_high_king_maulgarAI : public ScriptedAI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - //someone evaded! - if (m_pInstance && m_pInstance->GetData(TYPE_MAULGAR_EVENT) == NOT_STARTED) - { - EnterEvadeMode(); - return; - } - //m_uiArcingSmash_Timer if (m_uiArcingSmash_Timer < uiDiff) { @@ -269,16 +257,22 @@ struct MANGOS_DLL_DECL Council_Base_AI : public ScriptedAI void JustReachedHome() { - if (m_pInstance && m_pInstance->GetData(TYPE_MAULGAR_EVENT) == IN_PROGRESS) - m_pInstance->SetData(TYPE_MAULGAR_EVENT, NOT_STARTED); + if (!m_pInstance) + return; + + Creature* pMaulgar = m_pInstance->GetSingleCreatureFromStorage(NPC_MAULGAR); + if (pMaulgar && pMaulgar->isAlive() && pMaulgar->getVictim()) + pMaulgar->AI()->EnterEvadeMode(); } void Aggro(Unit *pWho) { - if (m_pInstance && m_pInstance->GetData(TYPE_MAULGAR_EVENT) == NOT_STARTED) - m_pInstance->SetData(TYPE_MAULGAR_EVENT, IN_PROGRESS); + if (!m_pInstance) + return; - m_creature->CallForHelp(50.0f); + Creature* pMaulgar = m_pInstance->GetSingleCreatureFromStorage(NPC_MAULGAR); + if (pMaulgar && pMaulgar->isAlive() && !pMaulgar->getVictim()) + pMaulgar->AI()->AttackStart((pWho)); } void JustDied(Unit* pVictim) @@ -286,9 +280,8 @@ struct MANGOS_DLL_DECL Council_Base_AI : public ScriptedAI if (!m_pInstance) return; - Creature* pMaulgar = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(NPC_MAULGAR)); - - if (pMaulgar->isAlive()) + Creature* pMaulgar = m_pInstance->GetSingleCreatureFromStorage(NPC_MAULGAR); + if (pMaulgar && pMaulgar->isAlive()) { if (boss_high_king_maulgarAI* pMaulgarAI = dynamic_cast(pMaulgar->AI())) pMaulgarAI->EventCouncilDeath(); @@ -318,13 +311,6 @@ struct MANGOS_DLL_DECL boss_olm_the_summonerAI : public Council_Base_AI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - //someone evaded! - if (m_pInstance && m_pInstance->GetData(TYPE_MAULGAR_EVENT) == NOT_STARTED) - { - EnterEvadeMode(); - return; - } - //m_uiDarkDecay_Timer if (m_uiDarkDecay_Timer < uiDiff) { @@ -408,13 +394,6 @@ struct MANGOS_DLL_DECL boss_kiggler_the_crazedAI : public Council_Base_AI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - //someone evaded! - if (m_pInstance && m_pInstance->GetData(TYPE_MAULGAR_EVENT) == NOT_STARTED) - { - EnterEvadeMode(); - return; - } - if (m_uiGreatherPolymorph_Timer < uiDiff) { if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) @@ -477,13 +456,6 @@ struct MANGOS_DLL_DECL boss_blindeye_the_seerAI : public Council_Base_AI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - //someone evaded! - if (m_pInstance && m_pInstance->GetData(TYPE_MAULGAR_EVENT) == NOT_STARTED) - { - EnterEvadeMode(); - return; - } - //m_uiGreaterPowerWordShield_Timer if (m_uiGreaterPowerWordShield_Timer < uiDiff) { @@ -552,13 +524,6 @@ struct MANGOS_DLL_DECL boss_krosh_firehandAI : public Council_Base_AI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - //someone evaded! - if (m_pInstance && m_pInstance->GetData(TYPE_MAULGAR_EVENT) == NOT_STARTED) - { - EnterEvadeMode(); - return; - } - //m_uiGreaterFireball_Timer if (m_uiGreaterFireball_Timer < uiDiff) { diff --git a/scripts/outland/gruuls_lair/gruuls_lair.h b/scripts/outland/gruuls_lair/gruuls_lair.h index e6dd70243..9cf5d5c61 100644 --- a/scripts/outland/gruuls_lair/gruuls_lair.h +++ b/scripts/outland/gruuls_lair/gruuls_lair.h @@ -37,7 +37,6 @@ struct MANGOS_DLL_DECL instance_gruuls_lair : public ScriptedInstance void SetData(uint32 uiType, uint32 uiData); uint32 GetData(uint32 uiType); - uint64 GetData64(uint32 uiData); const char* Save() { return m_strSaveData.c_str(); } void Load(const char* chrIn); @@ -45,14 +44,6 @@ struct MANGOS_DLL_DECL instance_gruuls_lair : public ScriptedInstance private: uint32 m_auiEncounter[MAX_ENCOUNTER]; std::string m_strSaveData; - - uint64 m_uiMaulgarGUID; - uint64 m_uiKigglerGUID; - uint64 m_uiBlindeyeGUID; - uint64 m_uiOlmGUID; - uint64 m_uiKroshGUID; - uint64 m_uiMaulgarDoorGUID; - uint64 m_uiGruulEncounterDoorGUID; }; #endif diff --git a/scripts/outland/gruuls_lair/instance_gruuls_lair.cpp b/scripts/outland/gruuls_lair/instance_gruuls_lair.cpp index 50ab57e8d..708fa12f0 100644 --- a/scripts/outland/gruuls_lair/instance_gruuls_lair.cpp +++ b/scripts/outland/gruuls_lair/instance_gruuls_lair.cpp @@ -29,15 +29,7 @@ EndScriptData */ 2 - Gruul event */ -instance_gruuls_lair::instance_gruuls_lair(Map *pMap) : ScriptedInstance(pMap), - m_uiMaulgarGUID(0), - m_uiKigglerGUID(0), - m_uiBlindeyeGUID(0), - m_uiOlmGUID(0), - m_uiKroshGUID(0), - - m_uiMaulgarDoorGUID(0), - m_uiGruulEncounterDoorGUID(0) +instance_gruuls_lair::instance_gruuls_lair(Map *pMap) : ScriptedInstance(pMap) { Initialize(); } @@ -60,11 +52,13 @@ void instance_gruuls_lair::OnCreatureCreate(Creature* pCreature) { switch (pCreature->GetEntry()) { - case NPC_MAULGAR: m_uiMaulgarGUID = pCreature->GetGUID(); break; - case NPC_KROSH: m_uiKroshGUID = pCreature->GetGUID(); break; - case NPC_OLM: m_uiOlmGUID = pCreature->GetGUID(); break; - case NPC_KIGGLER: m_uiKigglerGUID = pCreature->GetGUID(); break; - case NPC_BLINDEYE: m_uiBlindeyeGUID = pCreature->GetGUID(); break; + case NPC_MAULGAR: + case NPC_KROSH: + case NPC_OLM: + case NPC_KIGGLER: + case NPC_BLINDEYE: + m_mNpcEntryGuidStore[pCreature->GetEntry()] = pCreature->GetObjectGuid(); + break; } } @@ -73,14 +67,16 @@ void instance_gruuls_lair::OnObjectCreate(GameObject* pGo) switch (pGo->GetEntry()) { case GO_PORT_GRONN_1: - m_uiMaulgarDoorGUID = pGo->GetGUID(); if (m_auiEncounter[0] == DONE) pGo->SetGoState(GO_STATE_ACTIVE); break; case GO_PORT_GRONN_2: - m_uiGruulEncounterDoorGUID = pGo->GetGUID(); break; + + default: + return; } + m_mGoEntryGuidStore[pGo->GetEntry()] = pGo->GetObjectGuid(); } void instance_gruuls_lair::SetData(uint32 uiType, uint32 uiData) @@ -89,11 +85,11 @@ void instance_gruuls_lair::SetData(uint32 uiType, uint32 uiData) { case TYPE_MAULGAR_EVENT: if (uiData == DONE) - DoUseDoorOrButton(m_uiMaulgarDoorGUID); + DoUseDoorOrButton(GO_PORT_GRONN_1); m_auiEncounter[0] = uiData; break; case TYPE_GRUUL_EVENT: - DoUseDoorOrButton(m_uiGruulEncounterDoorGUID); + DoUseDoorOrButton(GO_PORT_GRONN_2); m_auiEncounter[1] = uiData; break; } @@ -124,21 +120,6 @@ uint32 instance_gruuls_lair::GetData(uint32 uiType) } } -uint64 instance_gruuls_lair::GetData64(uint32 uiData) -{ - switch (uiData) - { - case NPC_MAULGAR: return m_uiMaulgarGUID; - case NPC_BLINDEYE: return m_uiBlindeyeGUID; - case NPC_KIGGLER: return m_uiKigglerGUID; - case NPC_KROSH: return m_uiKroshGUID; - case NPC_OLM: return m_uiOlmGUID; - - default: - return 0; - } -} - void instance_gruuls_lair::Load(const char* chrIn) { if (!chrIn) diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 1be655033..710b4ced4 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2207" + #define SD2_REVISION_NR "2208" #endif // __SD2_REVISION_NR_H__ From 923c24876fb052a2fbff099002d23db6c6d2f11a Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Mon, 6 Jun 2011 15:52:41 +0200 Subject: [PATCH 0189/1172] [2209] Move instance scripts for The Mechanar to header version --- .../the_mechanar/instance_mechanar.cpp | 52 +++++++++---------- .../tempest_keep/the_mechanar/mechanar.h | 14 +++++ sd2_revision_nr.h | 2 +- 3 files changed, 39 insertions(+), 29 deletions(-) diff --git a/scripts/outland/tempest_keep/the_mechanar/instance_mechanar.cpp b/scripts/outland/tempest_keep/the_mechanar/instance_mechanar.cpp index 3edeb1a2b..184da0527 100644 --- a/scripts/outland/tempest_keep/the_mechanar/instance_mechanar.cpp +++ b/scripts/outland/tempest_keep/the_mechanar/instance_mechanar.cpp @@ -24,35 +24,30 @@ EndScriptData */ #include "precompiled.h" #include "mechanar.h" -struct MANGOS_DLL_DECL instance_mechanar : public ScriptedInstance -{ - instance_mechanar(Map* pMap) : ScriptedInstance(pMap) {Initialize();}; - - uint32 m_auiEncounter[MAX_ENCOUNTER]; +instance_mechanar::instance_mechanar(Map* pMap) : ScriptedInstance(pMap) { Initialize(); } - void Initialize() - { - memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); - } +void instance_mechanar::Initialize() +{ + memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); +} - void SetData(uint32 uiType, uint32 uiData) +void instance_mechanar::SetData(uint32 uiType, uint32 uiData) +{ + switch(uiType) { - switch(uiType) - { - case TYPE_SEPETHREA: - m_auiEncounter[0] = uiData; - break; - } + case TYPE_SEPETHREA: + m_auiEncounter[0] = uiData; + break; } +} - uint32 GetData(uint32 uiType) - { - if (uiType == TYPE_SEPETHREA) - return m_auiEncounter[0]; +uint32 instance_mechanar::GetData(uint32 uiType) +{ + if (uiType == TYPE_SEPETHREA) + return m_auiEncounter[0]; - return 0; - } -}; + return 0; +} InstanceData* GetInstanceData_instance_mechanar(Map* pMap) { @@ -61,9 +56,10 @@ InstanceData* GetInstanceData_instance_mechanar(Map* pMap) void AddSC_instance_mechanar() { - Script *newscript; - newscript = new Script; - newscript->Name = "instance_mechanar"; - newscript->GetInstanceData = &GetInstanceData_instance_mechanar; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "instance_mechanar"; + pNewScript->GetInstanceData = &GetInstanceData_instance_mechanar; + pNewScript->RegisterSelf(); } diff --git a/scripts/outland/tempest_keep/the_mechanar/mechanar.h b/scripts/outland/tempest_keep/the_mechanar/mechanar.h index 7752f871f..d665af4bb 100644 --- a/scripts/outland/tempest_keep/the_mechanar/mechanar.h +++ b/scripts/outland/tempest_keep/the_mechanar/mechanar.h @@ -12,4 +12,18 @@ enum TYPE_SEPETHREA = 1 }; +class MANGOS_DLL_DECL instance_mechanar : public ScriptedInstance +{ + public: + instance_mechanar(Map* pMap); + + void Initialize(); + + void SetData(uint32 uiType, uint32 uiData); + uint32 GetData(uint32 uiType); + + private: + uint32 m_auiEncounter[MAX_ENCOUNTER]; +}; + #endif diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 710b4ced4..7800b2940 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2208" + #define SD2_REVISION_NR "2209" #endif // __SD2_REVISION_NR_H__ From 844b90e092b7e012b247e33317ce5e6cd966ba57 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Mon, 6 Jun 2011 16:04:42 +0200 Subject: [PATCH 0190/1172] [2210] Use EntryGuidMap-Storage in Arcatraz, also move to header version --- .../tempest_keep/arcatraz/arcatraz.cpp | 2 +- .../outland/tempest_keep/arcatraz/arcatraz.h | 17 ++ .../arcatraz/boss_harbinger_skyriss.cpp | 4 +- .../arcatraz/instance_arcatraz.cpp | 256 +++++++----------- sd2_revision_nr.h | 2 +- 5 files changed, 125 insertions(+), 156 deletions(-) diff --git a/scripts/outland/tempest_keep/arcatraz/arcatraz.cpp b/scripts/outland/tempest_keep/arcatraz/arcatraz.cpp index e82b94ac7..1102d1af8 100644 --- a/scripts/outland/tempest_keep/arcatraz/arcatraz.cpp +++ b/scripts/outland/tempest_keep/arcatraz/arcatraz.cpp @@ -320,7 +320,7 @@ struct MANGOS_DLL_DECL npc_warden_mellicharAI : public ScriptedAI { m_pInstance->SetData(TYPE_HARBINGERSKYRISS, IN_PROGRESS); - if (GameObject* pSphere = m_pInstance->instance->GetGameObject(m_pInstance->GetData64(GO_SEAL_SPHERE))) + if (GameObject* pSphere = m_pInstance->GetSingleGameObjectFromStorage(GO_SEAL_SPHERE)) pSphere->SetGoState(GO_STATE_READY); m_bIsEventRunning = true; diff --git a/scripts/outland/tempest_keep/arcatraz/arcatraz.h b/scripts/outland/tempest_keep/arcatraz/arcatraz.h index c8f3863f9..0cffb1dd9 100644 --- a/scripts/outland/tempest_keep/arcatraz/arcatraz.h +++ b/scripts/outland/tempest_keep/arcatraz/arcatraz.h @@ -31,4 +31,21 @@ enum GO_POD_OMEGA = 183965, // Pod fifth boss wave }; +class MANGOS_DLL_DECL instance_arcatraz : public ScriptedInstance +{ + public: + instance_arcatraz(Map* pMap); + + void Initialize(); + + void OnObjectCreate(GameObject* pGo); + void OnCreatureCreate(Creature* pCreature); + + void SetData(uint32 uiType, uint32 uiData); + uint32 GetData(uint32 uiType); + + private: + uint32 m_auiEncounter[MAX_ENCOUNTER]; +}; + #endif diff --git a/scripts/outland/tempest_keep/arcatraz/boss_harbinger_skyriss.cpp b/scripts/outland/tempest_keep/arcatraz/boss_harbinger_skyriss.cpp index bf5483d92..52af5cca4 100644 --- a/scripts/outland/tempest_keep/arcatraz/boss_harbinger_skyriss.cpp +++ b/scripts/outland/tempest_keep/arcatraz/boss_harbinger_skyriss.cpp @@ -147,14 +147,14 @@ struct MANGOS_DLL_DECL boss_harbinger_skyrissAI : public ScriptedAI { case 1: DoScriptText(SAY_INTRO, m_creature); - if (GameObject* pSphere = m_pInstance->instance->GetGameObject(m_pInstance->GetData64(GO_SEAL_SPHERE))) + if (GameObject* pSphere = m_pInstance->GetSingleGameObjectFromStorage(GO_SEAL_SPHERE)) pSphere->SetGoState(GO_STATE_ACTIVE); ++m_uiIntroPhase; m_uiIntroTimer = 25000; break; case 2: DoScriptText(SAY_AGGRO, m_creature); - if (Creature* pMellic = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(NPC_MELLICHAR))) + if (Creature* pMellic = m_pInstance->GetSingleCreatureFromStorage(NPC_MELLICHAR)) { // should have a better way to do this. possibly spell exist. pMellic->SetDeathState(JUST_DIED); diff --git a/scripts/outland/tempest_keep/arcatraz/instance_arcatraz.cpp b/scripts/outland/tempest_keep/arcatraz/instance_arcatraz.cpp index 8206b1390..aca7824e6 100644 --- a/scripts/outland/tempest_keep/arcatraz/instance_arcatraz.cpp +++ b/scripts/outland/tempest_keep/arcatraz/instance_arcatraz.cpp @@ -31,164 +31,115 @@ EndScriptData */ 4 - Harbinger Skyriss event, 5 sub-events */ -struct MANGOS_DLL_DECL instance_arcatraz : public ScriptedInstance -{ - instance_arcatraz(Map* pMap) : ScriptedInstance(pMap) {Initialize();}; - - uint32 m_auiEncounter[MAX_ENCOUNTER]; - - uint64 m_uiCore_Security_Field_AlphaGUID; - uint64 m_uiCore_Security_Field_BetaGUID; - uint64 m_uiPod_AlphaGUID; - uint64 m_uiPod_GammaGUID; - uint64 m_uiPod_BetaGUID; - uint64 m_uiPod_DeltaGUID; - uint64 m_uiPod_OmegaGUID; - - uint64 m_uiGoSphereGUID; - uint64 m_uiMellicharGUID; - - void Initialize() - { - memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); - - m_uiCore_Security_Field_AlphaGUID = 0; - m_uiCore_Security_Field_BetaGUID = 0; - m_uiPod_AlphaGUID = 0; - m_uiPod_BetaGUID = 0; - m_uiPod_DeltaGUID = 0; - m_uiPod_GammaGUID = 0; - m_uiPod_OmegaGUID = 0; - - m_uiGoSphereGUID = 0; - m_uiMellicharGUID = 0; - } +instance_arcatraz::instance_arcatraz(Map* pMap) : ScriptedInstance(pMap) { Initialize(); } - bool IsEncounterInProgress() const - { - for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) - if (m_auiEncounter[i] == IN_PROGRESS) return true; - - return false; - } - - void OnObjectCreate(GameObject* pGo) - { - switch(pGo->GetEntry()) - { - case GO_CORE_SECURITY_FIELD_ALPHA: m_uiCore_Security_Field_AlphaGUID = pGo->GetGUID(); break; - case GO_CORE_SECURITY_FIELD_BETA: m_uiCore_Security_Field_BetaGUID = pGo->GetGUID(); break; - case GO_SEAL_SPHERE: m_uiGoSphereGUID = pGo->GetGUID(); break; - case GO_POD_ALPHA: m_uiPod_AlphaGUID = pGo->GetGUID(); break; - case GO_POD_BETA: m_uiPod_BetaGUID = pGo->GetGUID(); break; - case GO_POD_DELTA: m_uiPod_DeltaGUID = pGo->GetGUID(); break; - case GO_POD_GAMMA: m_uiPod_GammaGUID = pGo->GetGUID(); break; - case GO_POD_OMEGA: m_uiPod_OmegaGUID = pGo->GetGUID(); break; - } - } +void instance_arcatraz::Initialize() +{ + memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); +} - void OnCreatureCreate(Creature* pCreature) +void instance_arcatraz::OnObjectCreate(GameObject* pGo) +{ + switch(pGo->GetEntry()) { - if (pCreature->GetEntry() == NPC_MELLICHAR) - m_uiMellicharGUID = pCreature->GetGUID(); + case GO_CORE_SECURITY_FIELD_ALPHA: + case GO_CORE_SECURITY_FIELD_BETA: + case GO_SEAL_SPHERE: + case GO_POD_ALPHA: + case GO_POD_BETA: + case GO_POD_DELTA: + case GO_POD_GAMMA: + case GO_POD_OMEGA: + m_mGoEntryGuidStore[pGo->GetEntry()] = pGo->GetObjectGuid(); + break; } +} - void SetData(uint32 uiType, uint32 uiData) - { - switch(uiType) - { - case TYPE_ZEREKETH: - m_auiEncounter[0] = uiData; - break; - - case TYPE_DALLIAH: - if (uiData == DONE) - DoUseDoorOrButton(m_uiCore_Security_Field_BetaGUID); - m_auiEncounter[1] = uiData; - break; - - case TYPE_SOCCOTHRATES: - if (uiData == DONE) - DoUseDoorOrButton(m_uiCore_Security_Field_AlphaGUID); - m_auiEncounter[2] = uiData; - break; - - case TYPE_HARBINGERSKYRISS: - if (uiData == NOT_STARTED || uiData == FAIL) - { - m_auiEncounter[4] = NOT_STARTED; - m_auiEncounter[5] = NOT_STARTED; - m_auiEncounter[6] = NOT_STARTED; - m_auiEncounter[7] = NOT_STARTED; - m_auiEncounter[8] = NOT_STARTED; - } - m_auiEncounter[3] = uiData; - break; - - case TYPE_WARDEN_1: - if (uiData == IN_PROGRESS) - DoUseDoorOrButton(m_uiPod_AlphaGUID); - m_auiEncounter[4] = uiData; - break; - - case TYPE_WARDEN_2: - if (uiData == IN_PROGRESS) - DoUseDoorOrButton(m_uiPod_BetaGUID); - m_auiEncounter[5] = uiData; - break; - - case TYPE_WARDEN_3: - if (uiData == IN_PROGRESS) - DoUseDoorOrButton(m_uiPod_DeltaGUID); - m_auiEncounter[6] = uiData; - break; - - case TYPE_WARDEN_4: - if (uiData == IN_PROGRESS) - DoUseDoorOrButton(m_uiPod_GammaGUID); - m_auiEncounter[7] = uiData; - break; - - case TYPE_WARDEN_5: - if (uiData == IN_PROGRESS) - DoUseDoorOrButton(m_uiPod_OmegaGUID); - m_auiEncounter[8] = uiData; - break; - } - } +void instance_arcatraz::OnCreatureCreate(Creature* pCreature) +{ + if (pCreature->GetEntry() == NPC_MELLICHAR) + m_mNpcEntryGuidStore[NPC_MELLICHAR] = pCreature->GetObjectGuid(); +} - uint32 GetData(uint32 uiType) +void instance_arcatraz::SetData(uint32 uiType, uint32 uiData) +{ + switch(uiType) { - switch(uiType) - { - case TYPE_HARBINGERSKYRISS: - return m_auiEncounter[3]; - case TYPE_WARDEN_1: - return m_auiEncounter[4]; - case TYPE_WARDEN_2: - return m_auiEncounter[5]; - case TYPE_WARDEN_3: - return m_auiEncounter[6]; - case TYPE_WARDEN_4: - return m_auiEncounter[7]; - case TYPE_WARDEN_5: - return m_auiEncounter[8]; - } - return 0; + case TYPE_ZEREKETH: + m_auiEncounter[0] = uiData; + break; + + case TYPE_DALLIAH: + if (uiData == DONE) + DoUseDoorOrButton(GO_CORE_SECURITY_FIELD_BETA); + m_auiEncounter[1] = uiData; + break; + + case TYPE_SOCCOTHRATES: + if (uiData == DONE) + DoUseDoorOrButton(GO_CORE_SECURITY_FIELD_ALPHA); + m_auiEncounter[2] = uiData; + break; + + case TYPE_HARBINGERSKYRISS: + if (uiData == NOT_STARTED || uiData == FAIL) + { + m_auiEncounter[4] = NOT_STARTED; + m_auiEncounter[5] = NOT_STARTED; + m_auiEncounter[6] = NOT_STARTED; + m_auiEncounter[7] = NOT_STARTED; + m_auiEncounter[8] = NOT_STARTED; + } + m_auiEncounter[3] = uiData; + break; + + case TYPE_WARDEN_1: + if (uiData == IN_PROGRESS) + DoUseDoorOrButton(GO_POD_ALPHA); + m_auiEncounter[4] = uiData; + break; + + case TYPE_WARDEN_2: + if (uiData == IN_PROGRESS) + DoUseDoorOrButton(GO_POD_BETA); + m_auiEncounter[5] = uiData; + break; + + case TYPE_WARDEN_3: + if (uiData == IN_PROGRESS) + DoUseDoorOrButton(GO_POD_DELTA); + m_auiEncounter[6] = uiData; + break; + + case TYPE_WARDEN_4: + if (uiData == IN_PROGRESS) + DoUseDoorOrButton(GO_POD_GAMMA); + m_auiEncounter[7] = uiData; + break; + + case TYPE_WARDEN_5: + if (uiData == IN_PROGRESS) + DoUseDoorOrButton(GO_POD_OMEGA); + m_auiEncounter[8] = uiData; + break; } +} - uint64 GetData64(uint32 uiData) +uint32 instance_arcatraz::GetData(uint32 uiType) +{ + switch(uiType) { - switch(uiData) - { - case NPC_MELLICHAR: - return m_uiMellicharGUID; - case GO_SEAL_SPHERE: - return m_uiGoSphereGUID; - } - return 0; + case TYPE_HARBINGERSKYRISS: return m_auiEncounter[3]; + case TYPE_WARDEN_1: return m_auiEncounter[4]; + case TYPE_WARDEN_2: return m_auiEncounter[5]; + case TYPE_WARDEN_3: return m_auiEncounter[6]; + case TYPE_WARDEN_4: return m_auiEncounter[7]; + case TYPE_WARDEN_5: return m_auiEncounter[8]; + + default: + return 0; } -}; +} InstanceData* GetInstanceData_instance_arcatraz(Map* pMap) { @@ -197,9 +148,10 @@ InstanceData* GetInstanceData_instance_arcatraz(Map* pMap) void AddSC_instance_arcatraz() { - Script *newscript; - newscript = new Script; - newscript->Name = "instance_arcatraz"; - newscript->GetInstanceData = &GetInstanceData_instance_arcatraz; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "instance_arcatraz"; + pNewScript->GetInstanceData = &GetInstanceData_instance_arcatraz; + pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 7800b2940..326057d4b 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2209" + #define SD2_REVISION_NR "2210" #endif // __SD2_REVISION_NR_H__ From 31ee89067c0c00f07d0136b6c8fd6f41969e4a43 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Mon, 6 Jun 2011 17:07:21 +0200 Subject: [PATCH 0191/1172] [2211] Use EntryGuidMap-Storage in Magtheridons Lair, also move to header version --- .../magtheridons_lair/boss_magtheridon.cpp | 20 +- .../instance_magtheridons_lair.cpp | 372 ++++++++---------- .../magtheridons_lair/magtheridons_lair.h | 44 ++- sd2_revision_nr.h | 2 +- 4 files changed, 227 insertions(+), 211 deletions(-) diff --git a/scripts/outland/hellfire_citadel/magtheridons_lair/boss_magtheridon.cpp b/scripts/outland/hellfire_citadel/magtheridons_lair/boss_magtheridon.cpp index 28d4ef095..416cebff7 100644 --- a/scripts/outland/hellfire_citadel/magtheridons_lair/boss_magtheridon.cpp +++ b/scripts/outland/hellfire_citadel/magtheridons_lair/boss_magtheridon.cpp @@ -85,7 +85,7 @@ enum MAX_CLICK = 5 }; -typedef std::map CubeMap; +typedef std::map CubeMap; struct MANGOS_DLL_DECL mob_abyssalAI : public ScriptedAI { @@ -197,7 +197,7 @@ struct MANGOS_DLL_DECL boss_magtheridonAI : public ScriptedAI Reset(); } - CubeMap Cube; + CubeMap m_mCube; ScriptedInstance* m_pInstance; @@ -244,13 +244,13 @@ struct MANGOS_DLL_DECL boss_magtheridonAI : public ScriptedAI } } - void SetClicker(uint64 uiCubeGUID, uint64 uiClickerGUID) + void SetClicker(GameObject* pGo, Player* pPlayer) { // to avoid multiclicks from 1 cube - if (uint64 guid = Cube[uiCubeGUID]) + if (ObjectGuid guid = m_mCube[pGo->GetObjectGuid()]) DebuffClicker(m_creature->GetMap()->GetPlayer(guid)); - Cube[uiCubeGUID] = uiClickerGUID; + m_mCube[pGo->GetObjectGuid()] = pPlayer->GetObjectGuid(); m_bNeedCheckCube = true; } @@ -279,14 +279,14 @@ struct MANGOS_DLL_DECL boss_magtheridonAI : public ScriptedAI // now checking if every clicker has debuff from manticron // if not - apply mind exhaustion and delete from clicker's list - for(CubeMap::iterator i = Cube.begin(); i != Cube.end(); ++i) + for(CubeMap::iterator i = m_mCube.begin(); i != m_mCube.end(); ++i) { Player* pClicker = m_creature->GetMap()->GetPlayer(i->second); if (!pClicker || !pClicker->HasAura(SPELL_SHADOW_GRASP, EFFECT_INDEX_1)) { DebuffClicker(pClicker); - i->second = 0; + i->second.Clear(); } else ++ClickerNum; @@ -537,7 +537,7 @@ struct MANGOS_DLL_DECL mob_hellfire_channelerAI : public ScriptedAI m_creature->InterruptNonMeleeSpells(false); - if (Creature* pMagtheridon = m_pInstance->instance->GetCreature(m_pInstance->GetData64(DATA_MAGTHERIDON))) + if (Creature* pMagtheridon = m_pInstance->GetSingleCreatureFromStorage(NPC_MAGTHERIDON)) { if (!pMagtheridon->isAlive()) return; @@ -643,7 +643,7 @@ bool GOUse_go_manticron_cube(Player* pPlayer, GameObject* pGo) if (pInstance->GetData(TYPE_MAGTHERIDON_EVENT) != IN_PROGRESS) return true; - if (Creature* pMagtheridon = pInstance->instance->GetCreature(pInstance->GetData64(DATA_MAGTHERIDON))) + if (Creature* pMagtheridon = pInstance->GetSingleCreatureFromStorage(NPC_MAGTHERIDON)) { if (!pMagtheridon->isAlive()) return true; @@ -657,7 +657,7 @@ bool GOUse_go_manticron_cube(Player* pPlayer, GameObject* pGo) pPlayer->CastSpell(pPlayer, SPELL_SHADOW_GRASP_VISUAL, false); if (boss_magtheridonAI* pMagAI = dynamic_cast(pMagtheridon->AI())) - pMagAI->SetClicker(pGo->GetGUID(), pPlayer->GetGUID()); + pMagAI->SetClicker(pGo, pPlayer); } } diff --git a/scripts/outland/hellfire_citadel/magtheridons_lair/instance_magtheridons_lair.cpp b/scripts/outland/hellfire_citadel/magtheridons_lair/instance_magtheridons_lair.cpp index 96f1ef6fd..fa02457cb 100644 --- a/scripts/outland/hellfire_citadel/magtheridons_lair/instance_magtheridons_lair.cpp +++ b/scripts/outland/hellfire_citadel/magtheridons_lair/instance_magtheridons_lair.cpp @@ -24,252 +24,229 @@ EndScriptData */ #include "precompiled.h" #include "magtheridons_lair.h" -struct MANGOS_DLL_DECL instance_magtheridons_lair : public ScriptedInstance +instance_magtheridons_lair::instance_magtheridons_lair(Map* pMap) : ScriptedInstance(pMap) { Initialize(); } + +void instance_magtheridons_lair::Initialize() { - instance_magtheridons_lair(Map* pMap) : ScriptedInstance(pMap) { Initialize(); } + memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); - uint32 m_auiEncounter[MAX_ENCOUNTER]; + m_uiCageTimer = 0; + m_uiRespawnTimer = 0; +} - uint64 m_uiMagtheridonGUID; - GUIDSet ChannelerGUID; - uint64 m_uiDoorGUID; - GUIDSet ColumnGUID; +bool instance_magtheridons_lair::IsEncounterInProgress() const +{ + for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) + if (m_auiEncounter[i] == IN_PROGRESS) + return true; - uint32 m_uiCageTimer; - uint32 m_uiRespawnTimer; + return false; +} - void Initialize() +void instance_magtheridons_lair::OnCreatureCreate(Creature* pCreature) +{ + switch(pCreature->GetEntry()) { - memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); - - ChannelerGUID.clear(); - ColumnGUID.clear(); - - m_uiMagtheridonGUID = 0; - m_uiDoorGUID = 0; - - m_uiCageTimer = 0; - m_uiRespawnTimer = 0; - } - - bool IsEncounterInProgress() const - { - for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) - if (m_auiEncounter[i] == IN_PROGRESS) - return true; - - return false; + case NPC_MAGTHERIDON: + m_mNpcEntryGuidStore[NPC_MAGTHERIDON] = pCreature->GetObjectGuid(); + break; + case NPC_CHANNELER: + m_sChannelerGuid.insert(pCreature->GetGUID()); + break; } +} - void OnCreatureCreate(Creature* pCreature) +void instance_magtheridons_lair::OnObjectCreate(GameObject* pGo) +{ + switch(pGo->GetEntry()) { - switch(pCreature->GetEntry()) - { - case NPC_MAGTHERION: m_uiMagtheridonGUID = pCreature->GetGUID(); break; - case NPC_CHANNELER: ChannelerGUID.insert(pCreature->GetGUID()); break; - } + case GO_MANTICRON_CUBE: + pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NO_INTERACT); + break; + case GO_DOODAD_HF_MAG_DOOR01: // event door + m_mGoEntryGuidStore[GO_DOODAD_HF_MAG_DOOR01] = pGo->GetObjectGuid(); + break; + case GO_DOODAD_HF_RAID_FX01: // hall + case GO_MAGTHERIDON_COLUMN_003: // six columns + case GO_MAGTHERIDON_COLUMN_002: + case GO_MAGTHERIDON_COLUMN_004: + case GO_MAGTHERIDON_COLUMN_005: + case GO_MAGTHERIDON_COLUMN_000: + case GO_MAGTHERIDON_COLUMN_001: + m_sColumnGuid.insert(pGo->GetGUID()); + break; } +} - void OnObjectCreate(GameObject* pGo) +void instance_magtheridons_lair::SetData(uint32 uiType, uint32 uiData) +{ + switch(uiType) { - switch(pGo->GetEntry()) - { - case 181713: - pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NO_INTERACT); - break; - case 183847: //event door - m_uiDoorGUID = pGo->GetGUID(); - break; - case 184653: // hall - case 184634: // six columns - case 184635: - case 184636: - case 184637: - case 184638: - case 184639: - ColumnGUID.insert(pGo->GetGUID()); - break; - } - } + case TYPE_MAGTHERIDON_EVENT: + m_auiEncounter[0] = uiData; + if (uiData == NOT_STARTED) + m_uiRespawnTimer = 10000; + if (uiData != IN_PROGRESS) + { + if (GameObject* pDoor = GetSingleGameObjectFromStorage(GO_DOODAD_HF_MAG_DOOR01)) + pDoor->SetGoState(GO_STATE_ACTIVE); + } + break; + case TYPE_CHANNELER_EVENT: + switch(uiData) + { + case NOT_STARTED: // Reset all channelers once one is reset. + if (m_auiEncounter[1] != NOT_STARTED) + { + m_auiEncounter[1] = NOT_STARTED; - void SetData(uint32 uiType, uint32 uiData) - { - switch(uiType) - { - case TYPE_MAGTHERIDON_EVENT: - m_auiEncounter[0] = uiData; - if (uiData == NOT_STARTED) - m_uiRespawnTimer = 10000; - if (uiData != IN_PROGRESS) - { - if (GameObject* pDoor = instance->GetGameObject(m_uiDoorGUID)) - pDoor->SetGoState(GO_STATE_ACTIVE); - } - break; - case TYPE_CHANNELER_EVENT: - switch(uiData) - { - case NOT_STARTED: // Reset all channelers once one is reset. - if (m_auiEncounter[1] != NOT_STARTED) + if (m_sChannelerGuid.empty()) { - m_auiEncounter[1] = NOT_STARTED; + debug_log("SD2: Instance Magtheridon: Channeler GUID list are empty."); + break; + } - if (ChannelerGUID.empty()) + for(GUIDSet::const_iterator itr = m_sChannelerGuid.begin(); itr != m_sChannelerGuid.end(); ++itr) + { + if (Creature* pChanneler = instance->GetCreature(*itr)) { - debug_log("SD2: Instance Magtheridon: Channeler GUID list are empty."); - break; + if (pChanneler->isAlive()) + pChanneler->AI()->EnterEvadeMode(); + else + pChanneler->Respawn(); } + } - for(GUIDSet::const_iterator itr = ChannelerGUID.begin(); itr != ChannelerGUID.end(); ++itr) - { - if (Creature* pChanneler = instance->GetCreature(*itr)) - { - if (pChanneler->isAlive()) - pChanneler->AI()->EnterEvadeMode(); - else - pChanneler->Respawn(); - } - } + m_uiCageTimer = 0; - m_uiCageTimer = 0; + if (GameObject* pDoor = GetSingleGameObjectFromStorage(GO_DOODAD_HF_MAG_DOOR01)) + pDoor->SetGoState(GO_STATE_ACTIVE); + } + break; + case IN_PROGRESS: // Event start. + if (m_auiEncounter[1] != IN_PROGRESS) + { + m_auiEncounter[1] = IN_PROGRESS; - if (GameObject* pDoor = instance->GetGameObject(m_uiDoorGUID)) - pDoor->SetGoState(GO_STATE_ACTIVE); - } - break; - case IN_PROGRESS: // Event start. - if (m_auiEncounter[1] != IN_PROGRESS) + // Let all five channelers aggro. + for(GUIDSet::const_iterator itr = m_sChannelerGuid.begin(); itr != m_sChannelerGuid.end(); ++itr) { - m_auiEncounter[1] = IN_PROGRESS; + Creature* pChanneler = instance->GetCreature(*itr); - // Let all five channelers aggro. - for(GUIDSet::const_iterator itr = ChannelerGUID.begin(); itr != ChannelerGUID.end(); ++itr) - { - Creature* pChanneler = instance->GetCreature(*itr); + if (pChanneler && pChanneler->isAlive()) + AttackNearestTarget(pChanneler); + } - if (pChanneler && pChanneler->isAlive()) - AttackNearestTarget(pChanneler); - } + // Magtheridon breaks free after two minutes. + Creature* pMagtheridon = GetSingleCreatureFromStorage(NPC_MAGTHERIDON); - // Magtheridon breaks free after two minutes. - Creature* pMagtheridon = instance->GetCreature(m_uiMagtheridonGUID); + if (pMagtheridon && pMagtheridon->isAlive()) + m_uiCageTimer = 120000; - if (pMagtheridon && pMagtheridon->isAlive()) - m_uiCageTimer = 120000; + if (GameObject* pDoor = GetSingleGameObjectFromStorage(GO_DOODAD_HF_MAG_DOOR01)) + pDoor->SetGoState(GO_STATE_READY); + } + break; + case DONE: // Add buff and check if all channelers are dead. + for(GUIDSet::iterator itr = m_sChannelerGuid.begin(); itr != m_sChannelerGuid.end(); ++itr) + { + Creature* pChanneler = instance->GetCreature(*itr); - if (GameObject* pDoor = instance->GetGameObject(m_uiDoorGUID)) - pDoor->SetGoState(GO_STATE_READY); - } - break; - case DONE: // Add buff and check if all channelers are dead. - for(GUIDSet::iterator itr = ChannelerGUID.begin(); itr != ChannelerGUID.end(); ++itr) + if (pChanneler && pChanneler->isAlive()) { - Creature* pChanneler = instance->GetCreature(*itr); - - if (pChanneler && pChanneler->isAlive()) - { - //Channeler->InterruptNonMeleeSpells(false); - //Channeler->CastSpell(Channeler, SPELL_SOUL_TRANSFER, false); - uiData = IN_PROGRESS; - break; - } + //Channeler->InterruptNonMeleeSpells(false); + //Channeler->CastSpell(Channeler, SPELL_SOUL_TRANSFER, false); + uiData = IN_PROGRESS; + break; } - break; - } - m_auiEncounter[1] = uiData; - break; - case TYPE_HALL_COLLAPSE: - // IN_PROGRESS - collapse / NOT_STARTED - reset - for(GUIDSet::const_iterator itr = ColumnGUID.begin(); itr != ColumnGUID.end(); ++itr) - DoUseDoorOrButton(*itr); - break; - } + } + break; + } + m_auiEncounter[1] = uiData; + break; + case TYPE_HALL_COLLAPSE: + // IN_PROGRESS - collapse / NOT_STARTED - reset + for(GUIDSet::const_iterator itr = m_sColumnGuid.begin(); itr != m_sColumnGuid.end(); ++itr) + DoUseDoorOrButton(*itr); + break; } +} - uint32 GetData(uint32 uiType) - { - if (uiType == TYPE_MAGTHERIDON_EVENT) - return m_auiEncounter[0]; - if (uiType == TYPE_CHANNELER_EVENT) - return m_auiEncounter[1]; - - return 0; - } +uint32 instance_magtheridons_lair::GetData(uint32 uiType) +{ + if (uiType == TYPE_MAGTHERIDON_EVENT) + return m_auiEncounter[0]; + if (uiType == TYPE_CHANNELER_EVENT) + return m_auiEncounter[1]; - uint64 GetData64(uint32 uiData) - { - if (uiData == DATA_MAGTHERIDON) - return m_uiMagtheridonGUID; + return 0; +} - return 0; - } +void instance_magtheridons_lair::AttackNearestTarget(Creature* pCreature) +{ + float minRange = VISIBLE_RANGE; + float range; + Player* target = NULL; - void AttackNearestTarget(Creature* pCreature) + Map::PlayerList const& players = instance->GetPlayers(); + for(Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr) { - float minRange = VISIBLE_RANGE; - float range; - Player* target = NULL; - - Map::PlayerList const& players = instance->GetPlayers(); - for(Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr) + if (Player* i_pl = itr->getSource()) { - if (Player* i_pl = itr->getSource()) + if (i_pl->isTargetableForAttack()) { - if (i_pl->isTargetableForAttack()) + range = i_pl->GetDistance(pCreature); + if (range < minRange) { - range = i_pl->GetDistance(pCreature); - if (range < minRange) - { - minRange = range; - target = i_pl; - } + minRange = range; + target = i_pl; } } } + } - if (!target) - { - debug_log("SD2: Instance Magtheridon: AttackNearestTarget failed. No player."); - return; - } - pCreature->AI()->AttackStart(target); + if (!target) + { + debug_log("SD2: Instance Magtheridon: AttackNearestTarget failed. No player."); + return; } + pCreature->AI()->AttackStart(target); +} - void Update(uint32 uiDiff) +void instance_magtheridons_lair::Update(uint32 uiDiff) +{ + if (m_uiCageTimer) { - if (m_uiCageTimer) + if (m_uiCageTimer <= uiDiff) { - if (m_uiCageTimer <= uiDiff) - { - SetData(TYPE_MAGTHERIDON_EVENT, IN_PROGRESS); - m_uiCageTimer = 0; - } - else - m_uiCageTimer -= uiDiff; + SetData(TYPE_MAGTHERIDON_EVENT, IN_PROGRESS); + m_uiCageTimer = 0; } + else + m_uiCageTimer -= uiDiff; + } - if (m_uiRespawnTimer) + if (m_uiRespawnTimer) + { + if (m_uiRespawnTimer <= uiDiff) { - if (m_uiRespawnTimer <= uiDiff) + for(GUIDSet::const_iterator itr = m_sChannelerGuid.begin(); itr != m_sChannelerGuid.end(); ++itr) { - for(GUIDSet::const_iterator itr = ChannelerGUID.begin(); itr != ChannelerGUID.end(); ++itr) + if (Creature* pChanneler = instance->GetCreature(*itr)) { - if (Creature* pChanneler = instance->GetCreature(*itr)) - { - if (pChanneler->isAlive()) - pChanneler->AI()->EnterEvadeMode(); - else - pChanneler->Respawn(); - } + if (pChanneler->isAlive()) + pChanneler->AI()->EnterEvadeMode(); + else + pChanneler->Respawn(); } - - m_uiRespawnTimer = 0; } - else - m_uiRespawnTimer -= uiDiff; + + m_uiRespawnTimer = 0; } + else + m_uiRespawnTimer -= uiDiff; } -}; +} InstanceData* GetInstanceData_instance_magtheridons_lair(Map* pMap) { @@ -278,9 +255,10 @@ InstanceData* GetInstanceData_instance_magtheridons_lair(Map* pMap) void AddSC_instance_magtheridons_lair() { - Script *newscript; - newscript = new Script; - newscript->Name = "instance_magtheridons_lair"; - newscript->GetInstanceData = &GetInstanceData_instance_magtheridons_lair; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "instance_magtheridons_lair"; + pNewScript->GetInstanceData = &GetInstanceData_instance_magtheridons_lair; + pNewScript->RegisterSelf(); } diff --git a/scripts/outland/hellfire_citadel/magtheridons_lair/magtheridons_lair.h b/scripts/outland/hellfire_citadel/magtheridons_lair/magtheridons_lair.h index 385e1f8c6..e0e00e5fb 100644 --- a/scripts/outland/hellfire_citadel/magtheridons_lair/magtheridons_lair.h +++ b/scripts/outland/hellfire_citadel/magtheridons_lair/magtheridons_lair.h @@ -11,18 +11,56 @@ enum TYPE_MAGTHERIDON_EVENT = 1, TYPE_CHANNELER_EVENT = 2, - DATA_MAGTHERIDON = 3, TYPE_HALL_COLLAPSE = 4, DATA_CHANNELER = 5, - NPC_MAGTHERION = 17257, + NPC_MAGTHERIDON = 17257, NPC_CHANNELER = 17256, SPELL_SOUL_TRANSFER = 30531, SPELL_BLAZE_TARGET = 30541, SPELL_DEBRIS_DAMAGE = 30631, - SPELL_DEBRIS_KNOCKDOWN = 36449 + SPELL_DEBRIS_KNOCKDOWN = 36449, + + GO_MANTICRON_CUBE = 181713, + GO_DOODAD_HF_MAG_DOOR01 = 183847, + GO_DOODAD_HF_RAID_FX01 = 184653, + GO_MAGTHERIDON_COLUMN_003 = 184634, + GO_MAGTHERIDON_COLUMN_002 = 184635, + GO_MAGTHERIDON_COLUMN_004 = 184636, + GO_MAGTHERIDON_COLUMN_005 = 184637, + GO_MAGTHERIDON_COLUMN_000 = 184638, + GO_MAGTHERIDON_COLUMN_001 = 184639, +}; + +struct MANGOS_DLL_DECL instance_magtheridons_lair : public ScriptedInstance +{ + public: + instance_magtheridons_lair(Map* pMap); + + void Initialize(); + + bool IsEncounterInProgress() const; + + void OnCreatureCreate(Creature* pCreature); + void OnObjectCreate(GameObject* pGo); + + void SetData(uint32 uiType, uint32 uiData); + uint32 GetData(uint32 uiType); + + void AttackNearestTarget(Creature* pCreature); + + void Update(uint32 uiDiff); + + private: + uint32 m_auiEncounter[MAX_ENCOUNTER]; + + GUIDSet m_sChannelerGuid; + GUIDSet m_sColumnGuid; + + uint32 m_uiCageTimer; + uint32 m_uiRespawnTimer; }; #endif diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 326057d4b..1e91dc768 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2210" + #define SD2_REVISION_NR "2211" #endif // __SD2_REVISION_NR_H__ From e99ef530d1ae52f008e347e47921521b398855d4 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Mon, 6 Jun 2011 23:23:54 +0200 Subject: [PATCH 0192/1172] [2212] Implement Broggok Event in Blood Furnace * Also cleanup Broggok * Add an additional spell to boss Kelidan * Thanks to rowman for additional information Signed-off-by: Schmoozerd --- .../blood_furnace/blood_furnace.h | 40 ++- .../blood_furnace/boss_broggok.cpp | 132 ++++++--- .../boss_kelidan_the_breaker.cpp | 3 + .../blood_furnace/instance_blood_furnace.cpp | 261 ++++++++++++++++-- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 + sql/scriptdev2_script_full.sql | 4 +- sql/updates/r2212_mangos.sql | 1 + sql/updates/r2212_scriptdev2.sql | 3 + 9 files changed, 376 insertions(+), 71 deletions(-) create mode 100644 sql/updates/r2212_mangos.sql create mode 100644 sql/updates/r2212_scriptdev2.sql diff --git a/scripts/outland/hellfire_citadel/blood_furnace/blood_furnace.h b/scripts/outland/hellfire_citadel/blood_furnace/blood_furnace.h index 947f470f5..8c91ea4ae 100644 --- a/scripts/outland/hellfire_citadel/blood_furnace/blood_furnace.h +++ b/scripts/outland/hellfire_citadel/blood_furnace/blood_furnace.h @@ -8,6 +8,7 @@ enum { MAX_ENCOUNTER = 3, + MAX_ORC_WAVES = 4, TYPE_THE_MAKER_EVENT = 0, TYPE_BROGGOK_EVENT = 1, @@ -16,6 +17,7 @@ enum NPC_THE_MAKER = 17381, NPC_BROGGOK = 17380, NPC_KELIDAN_THE_MAKER = 17377, + NPC_NASCENT_FEL_ORC = 17398, // Used in the Broggok event GO_DOOR_FINAL_EXIT = 181766, GO_DOOR_MAKER_FRONT = 181811, @@ -28,10 +30,23 @@ enum GO_PRISON_CELL_MAKER2 = 181814, // The maker cell back right GO_PRISON_CELL_MAKER3 = 181816, // The maker cell front left GO_PRISON_CELL_MAKER4 = 181815, // The maker cell back left - GO_PRISON_CELL_BROGGOK1 = 181821, // Broggok cell front right - GO_PRISON_CELL_BROGGOK2 = 181818, // Broggok cell back right - GO_PRISON_CELL_BROGGOK3 = 181820, // Broggok cell front left - GO_PRISON_CELL_BROGGOK4 = 181817, // Broggok cell back left + + GO_PRISON_CELL_BROGGOK_1 = 181817, // Broggok cell back left (NE) + GO_PRISON_CELL_BROGGOK_2 = 181818, // Broggok cell back right (SE) + GO_PRISON_CELL_BROGGOK_3 = 181820, // Broggok cell front left (NW) + GO_PRISON_CELL_BROGGOK_4 = 181821, // Broggok cell front right (SW) + + SAY_BROGGOK_INTRO = -1542015, +}; + +struct BroggokEventInfo +{ + BroggokEventInfo() : m_bIsCellOpened(false), m_uiKilledOrcCount(0) {} + + ObjectGuid m_cellGuid; + bool m_bIsCellOpened; + uint8 m_uiKilledOrcCount; + GUIDSet m_sSortedOrcGuids; }; class MANGOS_DLL_DECL instance_blood_furnace : public ScriptedInstance @@ -44,14 +59,24 @@ class MANGOS_DLL_DECL instance_blood_furnace : public ScriptedInstance void OnCreatureCreate(Creature* pCreature); void OnObjectCreate(GameObject* pGo); + void OnCreatureDeath(Creature* pCreature); + void OnCreatureEvade(Creature* pCreature); + uint64 GetData64(uint32 uiData); void SetData(uint32 uiType, uint32 uiData); uint32 GetData(uint32 uiType); + void Update(uint32 uiDiff); + void Load(const char* chrIn); const char* Save() { return m_strInstData.c_str(); } + void GetMovementDistanceForIndex(uint32 uiIndex, float& dx, float& dy); + private: + void DoSortBroggokOrcs(); + void DoNextBroggokEventPhase(); + uint32 m_auiEncounter[MAX_ENCOUNTER]; std::string m_strInstData; @@ -74,6 +99,13 @@ class MANGOS_DLL_DECL instance_blood_furnace : public ScriptedInstance uint64 m_uiPrisonCell6GUID; uint64 m_uiPrisonCell7GUID; uint64 m_uiPrisonCell8GUID; + + BroggokEventInfo m_aBroggokEvent[MAX_ORC_WAVES]; + + uint32 m_uiBroggokEventTimer; // Timer for opening the event cages; only on heroic mode = 30 secs + uint8 m_uiBroggokEventPhase; + + GUIDList m_luiNascentOrcGUIDs; }; #endif diff --git a/scripts/outland/hellfire_citadel/blood_furnace/boss_broggok.cpp b/scripts/outland/hellfire_citadel/blood_furnace/boss_broggok.cpp index 5cbb7b3e1..096de3448 100644 --- a/scripts/outland/hellfire_citadel/blood_furnace/boss_broggok.cpp +++ b/scripts/outland/hellfire_citadel/blood_furnace/boss_broggok.cpp @@ -29,87 +29,126 @@ enum SAY_AGGRO = -1542008, SPELL_SLIME_SPRAY = 30913, - H_SPELL_SLIME_SPRAY = 38458, + SPELL_SLIME_SPRAY_H = 38458, SPELL_POISON_CLOUD = 30916, SPELL_POISON_BOLT = 30917, - H_SPELL_POISON_BOLT = 38459, + SPELL_POISON_BOLT_H = 38459, - SPELL_POISON = 30914 + SPELL_POISON = 30914, + + POINT_EVENT_COMBAT = 1, }; struct MANGOS_DLL_DECL boss_broggokAI : public ScriptedAI { boss_broggokAI(Creature* pCreature) : ScriptedAI(pCreature) { - m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_pInstance = (instance_blood_furnace*)pCreature->GetInstanceData(); m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); Reset(); } - ScriptedInstance* m_pInstance; + instance_blood_furnace* m_pInstance; bool m_bIsRegularMode; - uint32 AcidSpray_Timer; - uint32 PoisonSpawn_Timer; - uint32 PoisonBolt_Timer; + uint32 m_uiAcidSprayTimer; + uint32 m_uiPoisonSpawnTimer; + uint32 m_uiPoisonBoltTimer; void Reset() { - AcidSpray_Timer = 10000; - PoisonSpawn_Timer = 5000; - PoisonBolt_Timer = 7000; + m_uiAcidSprayTimer = 10000; + m_uiPoisonSpawnTimer = 5000; + m_uiPoisonBoltTimer = 7000; } - void Aggro(Unit *who) + void Aggro(Unit* pWho) { DoScriptText(SAY_AGGRO, m_creature); if (m_pInstance) - m_pInstance->SetData(TYPE_BROGGOK_EVENT,IN_PROGRESS); + m_pInstance->SetData(TYPE_BROGGOK_EVENT, IN_PROGRESS); } - void JustReachedHome() + void JustSummoned(Creature* pSummoned) { - if (m_pInstance) - m_pInstance->SetData(TYPE_BROGGOK_EVENT,FAIL); + // ToDo: set correct flags and data in DB!!! + pSummoned->setFaction(16); + pSummoned->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + pSummoned->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + pSummoned->CastSpell(pSummoned, SPELL_POISON, false, NULL, NULL, m_creature->GetObjectGuid()); } - void JustSummoned(Creature *summoned) + void JustDied(Unit* pWho) { - summoned->setFaction(16); - summoned->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - summoned->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - summoned->CastSpell(summoned, SPELL_POISON, false, NULL, NULL, m_creature->GetObjectGuid()); + if (m_pInstance) + m_pInstance->SetData(TYPE_BROGGOK_EVENT, DONE); } - void JustDied(Unit *who) + void EnterEvadeMode() { + m_creature->RemoveAllAuras(); + m_creature->DeleteThreatList(); + m_creature->CombatStop(true); + m_creature->LoadCreatureAddon(); + + m_creature->SetLootRecipient(NULL); + + Reset(); + + if (!m_creature->isAlive()) + return; + if (m_pInstance) - m_pInstance->SetData(TYPE_BROGGOK_EVENT,DONE); + { + float dx, dy; + float fRespX, fRespY, fRespZ; + m_creature->GetRespawnCoord(fRespX, fRespY, fRespZ); + m_pInstance->GetMovementDistanceForIndex(4, dx, dy); + m_creature->GetMotionMaster()->MovePoint(POINT_EVENT_COMBAT, dx, dy, fRespZ); + } + else + m_creature->GetMotionMaster()->MoveTargetedHome(); + } + + // Reset Orientation + void MovementInform(uint32 uiMotionType, uint32 uiPointId) + { + if (uiMotionType != POINT_MOTION_TYPE || uiPointId != POINT_EVENT_COMBAT) + return; + + if (GameObject* pFrontDoor = m_pInstance->GetSingleGameObjectFromStorage(GO_DOOR_BROGGOK_FRONT)) + m_creature->SetFacingToObject(pFrontDoor); } - void UpdateAI(const uint32 diff) + void UpdateAI(const uint32 uiDiff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - if (AcidSpray_Timer < diff) + if (m_uiAcidSprayTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), m_bIsRegularMode ? H_SPELL_SLIME_SPRAY : SPELL_SLIME_SPRAY); - AcidSpray_Timer = urand(4000, 12000); - }else AcidSpray_Timer -=diff; + if (DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_SLIME_SPRAY : SPELL_SLIME_SPRAY_H) == CAST_OK) + m_uiAcidSprayTimer = urand(4000, 12000); + } + else + m_uiAcidSprayTimer -= uiDiff; - if (PoisonBolt_Timer < diff) + if (m_uiPoisonBoltTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), m_bIsRegularMode ? H_SPELL_POISON_BOLT : SPELL_POISON_BOLT); - PoisonBolt_Timer = urand(4000, 12000); - }else PoisonBolt_Timer -=diff; + if (DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_POISON_BOLT : SPELL_POISON_BOLT_H) == CAST_OK) + m_uiPoisonBoltTimer = urand(4000, 12000); + } + else + m_uiPoisonBoltTimer -= uiDiff; - if (PoisonSpawn_Timer < diff) + if (m_uiPoisonSpawnTimer < uiDiff) { - DoCastSpellIfCan(m_creature,SPELL_POISON_CLOUD); - PoisonSpawn_Timer = 20000; - }else PoisonSpawn_Timer -=diff; + if (DoCastSpellIfCan(m_creature, SPELL_POISON_CLOUD) == CAST_OK) + m_uiPoisonSpawnTimer = 20000; + } + else + m_uiPoisonSpawnTimer -= uiDiff; DoMeleeAttackIfReady(); } @@ -136,14 +175,15 @@ CreatureAI* GetAI_mob_broggok_poisoncloud(Creature* pCreature) void AddSC_boss_broggok() { - Script *newscript; - newscript = new Script; - newscript->Name = "boss_broggok"; - newscript->GetAI = &GetAI_boss_broggok; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "mob_broggok_poisoncloud"; - newscript->GetAI = &GetAI_mob_broggok_poisoncloud; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_broggok"; + pNewScript->GetAI = &GetAI_boss_broggok; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "mob_broggok_poisoncloud"; + pNewScript->GetAI = &GetAI_mob_broggok_poisoncloud; + pNewScript->RegisterSelf(); } diff --git a/scripts/outland/hellfire_citadel/blood_furnace/boss_kelidan_the_breaker.cpp b/scripts/outland/hellfire_citadel/blood_furnace/boss_kelidan_the_breaker.cpp index c76bc3103..27645826f 100644 --- a/scripts/outland/hellfire_citadel/blood_furnace/boss_kelidan_the_breaker.cpp +++ b/scripts/outland/hellfire_citadel/blood_furnace/boss_kelidan_the_breaker.cpp @@ -41,6 +41,7 @@ enum SAY_DIE = -1542007, SPELL_CORRUPTION = 30938, + SPELL_EVOCATION = 30935, // Aura channeled by the boss SPELL_FIRE_NOVA = 33132, H_SPELL_FIRE_NOVA = 37371, @@ -77,6 +78,8 @@ struct MANGOS_DLL_DECL boss_kelidan_the_breakerAI : public ScriptedAI BurningNova_Timer = 15000; Corruption_Timer = 5000; Firenova = false; + + DoCastSpellIfCan(m_creature, SPELL_EVOCATION); } void Aggro(Unit *who) diff --git a/scripts/outland/hellfire_citadel/blood_furnace/instance_blood_furnace.cpp b/scripts/outland/hellfire_citadel/blood_furnace/instance_blood_furnace.cpp index 96b44c955..0f468f82c 100644 --- a/scripts/outland/hellfire_citadel/blood_furnace/instance_blood_furnace.cpp +++ b/scripts/outland/hellfire_citadel/blood_furnace/instance_blood_furnace.cpp @@ -43,7 +43,10 @@ instance_blood_furnace::instance_blood_furnace(Map* pMap) : ScriptedInstance(pMa m_uiPrisonCell5GUID(0), m_uiPrisonCell6GUID(0), m_uiPrisonCell7GUID(0), - m_uiPrisonCell8GUID(0) + m_uiPrisonCell8GUID(0), + + m_uiBroggokEventTimer(30000), + m_uiBroggokEventPhase(0) { Initialize(); } @@ -60,6 +63,9 @@ void instance_blood_furnace::OnCreatureCreate(Creature* pCreature) case NPC_THE_MAKER: m_uiMakerGUID = pCreature->GetGUID(); break; case NPC_BROGGOK: m_uiBroggokGUID = pCreature->GetGUID(); break; case NPC_KELIDAN_THE_MAKER: m_uiKelidanGUID = pCreature->GetGUID(); break; + case NPC_NASCENT_FEL_ORC: + m_luiNascentOrcGUIDs.push_back(pCreature->GetGUID()); + break; } } @@ -93,14 +99,14 @@ void instance_blood_furnace::OnObjectCreate(GameObject* pGo) if (m_auiEncounter[TYPE_KELIDAN_EVENT] == DONE && pGo->GetGoState() == GO_STATE_READY) DoUseDoorOrButton(m_uiDoorFinalExitGUID); break; - case GO_PRISON_CELL_MAKER1: m_uiPrisonCell1GUID = pGo->GetGUID(); break; - case GO_PRISON_CELL_MAKER2: m_uiPrisonCell2GUID = pGo->GetGUID(); break; - case GO_PRISON_CELL_MAKER3: m_uiPrisonCell3GUID = pGo->GetGUID(); break; - case GO_PRISON_CELL_MAKER4: m_uiPrisonCell4GUID = pGo->GetGUID(); break; - case GO_PRISON_CELL_BROGGOK1: m_uiPrisonCell5GUID = pGo->GetGUID(); break; - case GO_PRISON_CELL_BROGGOK2: m_uiPrisonCell6GUID = pGo->GetGUID(); break; - case GO_PRISON_CELL_BROGGOK3: m_uiPrisonCell7GUID = pGo->GetGUID(); break; - case GO_PRISON_CELL_BROGGOK4: m_uiPrisonCell8GUID = pGo->GetGUID(); break; + case GO_PRISON_CELL_MAKER1: m_uiPrisonCell1GUID = pGo->GetGUID(); break; + case GO_PRISON_CELL_MAKER2: m_uiPrisonCell2GUID = pGo->GetGUID(); break; + case GO_PRISON_CELL_MAKER3: m_uiPrisonCell3GUID = pGo->GetGUID(); break; + case GO_PRISON_CELL_MAKER4: m_uiPrisonCell4GUID = pGo->GetGUID(); break; + case GO_PRISON_CELL_BROGGOK_1: m_aBroggokEvent[0].m_cellGuid = pGo->GetObjectGuid(); return; + case GO_PRISON_CELL_BROGGOK_2: m_aBroggokEvent[1].m_cellGuid = pGo->GetObjectGuid(); return; + case GO_PRISON_CELL_BROGGOK_3: m_aBroggokEvent[2].m_cellGuid = pGo->GetObjectGuid(); return; + case GO_PRISON_CELL_BROGGOK_4: m_aBroggokEvent[3].m_cellGuid = pGo->GetObjectGuid(); return; } } @@ -114,10 +120,6 @@ uint64 instance_blood_furnace::GetData64(uint32 uiData) case GO_PRISON_CELL_MAKER2: return m_uiPrisonCell2GUID; case GO_PRISON_CELL_MAKER3: return m_uiPrisonCell3GUID; case GO_PRISON_CELL_MAKER4: return m_uiPrisonCell4GUID; - case GO_PRISON_CELL_BROGGOK1: return m_uiPrisonCell5GUID; - case GO_PRISON_CELL_BROGGOK2: return m_uiPrisonCell6GUID; - case GO_PRISON_CELL_BROGGOK3: return m_uiPrisonCell7GUID; - case GO_PRISON_CELL_BROGGOK4: return m_uiPrisonCell8GUID; default: return 0; @@ -141,14 +143,47 @@ void instance_blood_furnace::SetData(uint32 uiType, uint32 uiData) m_auiEncounter[uiType] = uiData; break; case TYPE_BROGGOK_EVENT: + if (m_auiEncounter[uiType] == uiData) + return; + + // Combat door; the exit door is opened in event + DoUseDoorOrButton(m_uiDoorBroggokFrontGUID); if (uiData == IN_PROGRESS) - DoUseDoorOrButton(m_uiDoorBroggokFrontGUID); - if (uiData == FAIL) - DoUseDoorOrButton(m_uiDoorBroggokFrontGUID); - if (uiData == DONE) { - DoUseDoorOrButton(m_uiDoorBroggokFrontGUID); - DoUseDoorOrButton(m_uiDoorBrokkokRearGUID); + if (m_uiBroggokEventPhase <= MAX_ORC_WAVES) + { + m_uiBroggokEventPhase = 0; + DoSortBroggokOrcs(); + // open first cage + DoNextBroggokEventPhase(); + } + } + else if (uiData == FAIL) + { + // On wipe we reset only the orcs; if the party wipes at the boss itself then the orcs don't reset + if (m_uiBroggokEventPhase <= MAX_ORC_WAVES) + { + for (uint8 i = 0; i < MAX_ORC_WAVES; ++i) + { + // Reset Orcs + if (!m_aBroggokEvent[i].m_bIsCellOpened) + continue; + + m_aBroggokEvent[i].m_uiKilledOrcCount = 0; + for (GUIDSet::const_iterator itr = m_aBroggokEvent[i].m_sSortedOrcGuids.begin(); itr != m_aBroggokEvent[i].m_sSortedOrcGuids.end(); ++itr) + { + if (Creature* pOrc = instance->GetCreature(*itr)) + { + if (!pOrc->isAlive()) + pOrc->Respawn(); + } + } + + // Close Door + DoUseDoorOrButton(m_aBroggokEvent[i].m_cellGuid); + m_aBroggokEvent[i].m_bIsCellOpened = false; + } + } } m_auiEncounter[uiType] = uiData; break; @@ -179,6 +214,111 @@ void instance_blood_furnace::SetData(uint32 uiType, uint32 uiData) } } +void instance_blood_furnace::DoNextBroggokEventPhase() +{ + // Get Movement Position + float dx, dy; + GetMovementDistanceForIndex(m_uiBroggokEventPhase, dx, dy); + + // Open door to the final boss now and move boss to the center of the room + if (m_uiBroggokEventPhase >= MAX_ORC_WAVES) + { + DoUseDoorOrButton(m_uiDoorBrokkokRearGUID); + + if (Creature* pBroggok = instance->GetCreature(m_uiBroggokGUID)) + { + pBroggok->RemoveSplineFlag(SPLINEFLAG_WALKMODE); + pBroggok->GetMotionMaster()->MovePoint(0, dx, dy, pBroggok->GetPositionZ()); + } + } + else + { + // Open cage door + if (!m_aBroggokEvent[m_uiBroggokEventPhase].m_bIsCellOpened) + DoUseDoorOrButton(m_aBroggokEvent[m_uiBroggokEventPhase].m_cellGuid); + + m_aBroggokEvent[m_uiBroggokEventPhase].m_bIsCellOpened = true; + + for(GUIDSet::const_iterator itr = m_aBroggokEvent[m_uiBroggokEventPhase].m_sSortedOrcGuids.begin(); itr != m_aBroggokEvent[m_uiBroggokEventPhase].m_sSortedOrcGuids.end(); ++itr) + { + if (Creature* pOrc = instance->GetCreature(*itr)) + { + // Remove unit flags from npcs + pOrc->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + pOrc->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + + // Move them out of the cages + pOrc->RemoveSplineFlag(SPLINEFLAG_WALKMODE); + pOrc->GetMotionMaster()->MovePoint(0, pOrc->GetPositionX() + dx, pOrc->GetPositionY() + dy, pOrc->GetPositionZ()); + } + } + } + + // Prepare for further handling + m_uiBroggokEventTimer = 30000; + ++m_uiBroggokEventPhase; +} + +void instance_blood_furnace::OnCreatureEvade(Creature* pCreature) +{ + if (m_auiEncounter[TYPE_BROGGOK_EVENT] == FAIL) + return; + + if (pCreature->GetEntry() == NPC_BROGGOK) + SetData(TYPE_BROGGOK_EVENT, FAIL); + + else if (pCreature->GetEntry() == NPC_NASCENT_FEL_ORC) + { + for (uint8 i = 0; i < m_uiBroggokEventPhase; ++i) + { + if (m_aBroggokEvent[i].m_sSortedOrcGuids.find(pCreature->GetGUID()) != m_aBroggokEvent[i].m_sSortedOrcGuids.end()) + SetData(TYPE_BROGGOK_EVENT, FAIL); + } + } +} + +void instance_blood_furnace::OnCreatureDeath(Creature* pCreature) +{ + if (m_auiEncounter[TYPE_BROGGOK_EVENT] != IN_PROGRESS) + return; + + if (pCreature->GetEntry() == NPC_NASCENT_FEL_ORC) + { + uint8 uiClearedCells = 0; + for (uint8 i = 0; i < m_uiBroggokEventPhase; ++i) + { + if (m_aBroggokEvent[i].m_sSortedOrcGuids.size() == m_aBroggokEvent[i].m_uiKilledOrcCount) + { + ++uiClearedCells; + continue; + } + + // Increase kill counter, if we found a mob of this cell + if (m_aBroggokEvent[i].m_sSortedOrcGuids.find(pCreature->GetGUID()) != m_aBroggokEvent[i].m_sSortedOrcGuids.end()) + m_aBroggokEvent[i].m_uiKilledOrcCount++; + + if (m_aBroggokEvent[i].m_sSortedOrcGuids.size() == m_aBroggokEvent[i].m_uiKilledOrcCount) + ++uiClearedCells; + } + + // Increase phase when all opened cells are cleared + if (uiClearedCells == m_uiBroggokEventPhase) + DoNextBroggokEventPhase(); + } +} + +void instance_blood_furnace::Update(uint32 uiDiff) +{ + // Broggok Event: For the last wave we don't check the timer; the boss is released only when all mobs die, also the timer is only active on heroic + if (m_auiEncounter[TYPE_BROGGOK_EVENT] == IN_PROGRESS && m_uiBroggokEventPhase < MAX_ORC_WAVES && !instance->IsRegularDifficulty()) + { + if (m_uiBroggokEventTimer < uiDiff) + DoNextBroggokEventPhase(); + else + m_uiBroggokEventTimer -= uiDiff; + } +} + uint32 instance_blood_furnace::GetData(uint32 uiType) { if (uiType < MAX_ENCOUNTER) @@ -207,11 +347,89 @@ void instance_blood_furnace::Load(const char* chrIn) OUT_LOAD_INST_DATA_COMPLETE; } +// Sort all nascent orcs in the instance in order to get only those near broggok doors +void instance_blood_furnace::DoSortBroggokOrcs() +{ + for (GUIDList::const_iterator itr = m_luiNascentOrcGUIDs.begin(); itr != m_luiNascentOrcGUIDs.end(); ++itr) + { + if (Creature* pOrc = instance->GetCreature(*itr)) + { + for (uint8 i = 0; i < MAX_ORC_WAVES; ++i) + { + if (GameObject* pDoor = instance->GetGameObject(m_aBroggokEvent[i].m_cellGuid)) + { + if (pOrc->IsWithinDistInMap(pDoor, 15.0f)) + { + m_aBroggokEvent[i].m_sSortedOrcGuids.insert(pOrc->GetGUID()); + if (!pOrc->isAlive()) + pOrc->Respawn(); + break; + } + } + } + } + } +} + +// Helper function to calculate the position to where the orcs should move +// For case of orc-indexes the difference, for Braggok his position +void instance_blood_furnace::GetMovementDistanceForIndex(uint32 uiIndex, float& dx, float& dy) +{ + GameObject* pDoor[2]; + + if (uiIndex < MAX_ORC_WAVES) + { + // Use doors 0, 1 for index 0 or 1; and use doors 2, 3 for index 2 or 3 + pDoor[0] = instance->GetGameObject(m_aBroggokEvent[(uiIndex / 2) * 2].m_cellGuid); + pDoor[1] = instance->GetGameObject(m_aBroggokEvent[(uiIndex / 2) * 2 + 1].m_cellGuid); + } + else + { + // Use doors 0 and 3 for Braggok case (which means the middle point is the center of the room) + pDoor[0] = instance->GetGameObject(m_aBroggokEvent[0].m_cellGuid); + pDoor[1] = instance->GetGameObject(m_aBroggokEvent[3].m_cellGuid); + } + + if (!pDoor[0] || !pDoor[1]) + return; + + if (uiIndex < MAX_ORC_WAVES) + { + dx = (pDoor[0]->GetPositionX() + pDoor[1]->GetPositionX()) / 2 - pDoor[uiIndex % 2]->GetPositionX(); + dy = (pDoor[0]->GetPositionY() + pDoor[1]->GetPositionY()) / 2 - pDoor[uiIndex % 2]->GetPositionY(); + } + else + { + dx = (pDoor[0]->GetPositionX() + pDoor[1]->GetPositionX()) / 2; + dy = (pDoor[0]->GetPositionY() + pDoor[1]->GetPositionY()) / 2; + } +} + InstanceData* GetInstanceData_instance_blood_furnace(Map* pMap) { return new instance_blood_furnace(pMap); } +bool GOUse_go_prison_cell_lever(Player* pPlayer, GameObject* pGo) +{ + ScriptedInstance* pInstance = (ScriptedInstance*)pGo->GetInstanceData(); + + if (!pInstance) + return false; + + // Set broggok event in progress + if (pInstance->GetData(TYPE_BROGGOK_EVENT) != DONE && pInstance->GetData(TYPE_BROGGOK_EVENT) != IN_PROGRESS) + { + pInstance->SetData(TYPE_BROGGOK_EVENT, IN_PROGRESS); + + // Yell intro + if (Creature* pBroggok = pInstance->instance->GetCreature(pInstance->GetData64(NPC_BROGGOK))) + DoScriptText(SAY_BROGGOK_INTRO, pBroggok); + } + + return false; +} + void AddSC_instance_blood_furnace() { Script* pNewScript; @@ -220,4 +438,9 @@ void AddSC_instance_blood_furnace() pNewScript->Name = "instance_blood_furnace"; pNewScript->GetInstanceData = &GetInstanceData_instance_blood_furnace; pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "go_prison_cell_lever"; + pNewScript->pGOUse = &GOUse_go_prison_cell_lever; + pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 1e91dc768..1e49d0783 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2211" + #define SD2_REVISION_NR "2212" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 179e15696..089ccf300 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -617,6 +617,7 @@ UPDATE creature_template SET ScriptName='boss_broggok' WHERE entry=17380; UPDATE creature_template SET ScriptName='boss_kelidan_the_breaker' WHERE entry=17377; UPDATE creature_template SET ScriptName='mob_broggok_poisoncloud' WHERE entry=17662; UPDATE creature_template SET ScriptName='mob_shadowmoon_channeler' WHERE entry=17653; +UPDATE gameobject_template SET ScriptName='go_prison_cell_lever' WHERE entry=181982; UPDATE instance_template SET ScriptName='instance_blood_furnace' WHERE map=542; /* HELLFIRE RAMPARTS */ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index b3f0c30cb..3b05fb14e 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -1625,7 +1625,9 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1542011,'Anger... Hate... These are tools I can use.',10288,1,0,0,'the_maker SAY_AGGRO_3'), (-1542012,'Let\'s see what I can make of you.',10289,1,0,0,'the_maker SAY_KILL_1'), (-1542013,'It is pointless to resist.',10290,1,0,0,'the_maker SAY_KILL_2'), -(-1542014,'Stay away from... me.',10291,1,0,0,'the_maker SAY_DIE'); +(-1542014,'Stay away from... me.',10291,1,0,0,'the_maker SAY_DIE'), + +(-1542015,'Kill them!',0,1,0,0,'broggok SAY_BROGGOK_INTRO'); -- -1 543 000 HELLFIRE RAMPARTS INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES diff --git a/sql/updates/r2212_mangos.sql b/sql/updates/r2212_mangos.sql new file mode 100644 index 000000000..66731128c --- /dev/null +++ b/sql/updates/r2212_mangos.sql @@ -0,0 +1 @@ +UPDATE gameobject_template SET ScriptName='go_prison_cell_lever' WHERE entry=181982; diff --git a/sql/updates/r2212_scriptdev2.sql b/sql/updates/r2212_scriptdev2.sql new file mode 100644 index 000000000..7959e301b --- /dev/null +++ b/sql/updates/r2212_scriptdev2.sql @@ -0,0 +1,3 @@ +DELETE FROM script_texts WHERE entry=-1542015; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1542015,'Kill them!',0,1,0,0,'broggok SAY_BROGGOK_INTRO'); From 114ea588b50742b2cbf5fce4811fcce5a89a3295 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Tue, 7 Jun 2011 00:26:53 +0200 Subject: [PATCH 0193/1172] [2213] Use EntryGuidMap-Storage in Blood Furnace --- .../blood_furnace/blood_furnace.h | 33 ++----- .../blood_furnace/instance_blood_furnace.cpp | 90 ++++++------------- sd2_revision_nr.h | 2 +- 3 files changed, 32 insertions(+), 93 deletions(-) diff --git a/scripts/outland/hellfire_citadel/blood_furnace/blood_furnace.h b/scripts/outland/hellfire_citadel/blood_furnace/blood_furnace.h index 8c91ea4ae..9e9209936 100644 --- a/scripts/outland/hellfire_citadel/blood_furnace/blood_furnace.h +++ b/scripts/outland/hellfire_citadel/blood_furnace/blood_furnace.h @@ -14,9 +14,9 @@ enum TYPE_BROGGOK_EVENT = 1, TYPE_KELIDAN_EVENT = 2, - NPC_THE_MAKER = 17381, + // NPC_THE_MAKER = 17381, NPC_BROGGOK = 17380, - NPC_KELIDAN_THE_MAKER = 17377, + // NPC_KELIDAN_THE_BREAKER = 17377, NPC_NASCENT_FEL_ORC = 17398, // Used in the Broggok event GO_DOOR_FINAL_EXIT = 181766, @@ -26,10 +26,10 @@ enum GO_DOOR_BROGGOK_REAR = 181819, GO_DOOR_KELIDAN_EXIT = 181823, - GO_PRISON_CELL_MAKER1 = 181813, // The maker cell front right - GO_PRISON_CELL_MAKER2 = 181814, // The maker cell back right - GO_PRISON_CELL_MAKER3 = 181816, // The maker cell front left - GO_PRISON_CELL_MAKER4 = 181815, // The maker cell back left + // GO_PRISON_CELL_MAKER1 = 181813, // The maker cell front right + // GO_PRISON_CELL_MAKER2 = 181814, // The maker cell back right + // GO_PRISON_CELL_MAKER3 = 181816, // The maker cell front left + // GO_PRISON_CELL_MAKER4 = 181815, // The maker cell back left GO_PRISON_CELL_BROGGOK_1 = 181817, // Broggok cell back left (NE) GO_PRISON_CELL_BROGGOK_2 = 181818, // Broggok cell back right (SE) @@ -62,7 +62,6 @@ class MANGOS_DLL_DECL instance_blood_furnace : public ScriptedInstance void OnCreatureDeath(Creature* pCreature); void OnCreatureEvade(Creature* pCreature); - uint64 GetData64(uint32 uiData); void SetData(uint32 uiType, uint32 uiData); uint32 GetData(uint32 uiType); @@ -80,26 +79,6 @@ class MANGOS_DLL_DECL instance_blood_furnace : public ScriptedInstance uint32 m_auiEncounter[MAX_ENCOUNTER]; std::string m_strInstData; - uint64 m_uiMakerGUID; - uint64 m_uiBroggokGUID; - uint64 m_uiKelidanGUID; - - uint64 m_uiDoorFinalExitGUID; - uint64 m_uiDoorMakerFrontGUID; - uint64 m_uiDoorMakerRearGUID; - uint64 m_uiDoorBroggokFrontGUID; - uint64 m_uiDoorBrokkokRearGUID; - uint64 m_uiDoorKelidanExitGUID; - - uint64 m_uiPrisonCell1GUID; - uint64 m_uiPrisonCell2GUID; - uint64 m_uiPrisonCell3GUID; - uint64 m_uiPrisonCell4GUID; - uint64 m_uiPrisonCell5GUID; - uint64 m_uiPrisonCell6GUID; - uint64 m_uiPrisonCell7GUID; - uint64 m_uiPrisonCell8GUID; - BroggokEventInfo m_aBroggokEvent[MAX_ORC_WAVES]; uint32 m_uiBroggokEventTimer; // Timer for opening the event cages; only on heroic mode = 30 secs diff --git a/scripts/outland/hellfire_citadel/blood_furnace/instance_blood_furnace.cpp b/scripts/outland/hellfire_citadel/blood_furnace/instance_blood_furnace.cpp index 0f468f82c..7ef0cefb9 100644 --- a/scripts/outland/hellfire_citadel/blood_furnace/instance_blood_furnace.cpp +++ b/scripts/outland/hellfire_citadel/blood_furnace/instance_blood_furnace.cpp @@ -25,26 +25,6 @@ EndScriptData */ #include "blood_furnace.h" instance_blood_furnace::instance_blood_furnace(Map* pMap) : ScriptedInstance(pMap), - m_uiMakerGUID(0), - m_uiBroggokGUID(0), - m_uiKelidanGUID(0), - - m_uiDoorFinalExitGUID(0), - m_uiDoorMakerFrontGUID(0), - m_uiDoorMakerRearGUID(0), - m_uiDoorBroggokFrontGUID(0), - m_uiDoorBrokkokRearGUID(0), - m_uiDoorKelidanExitGUID(0), - - m_uiPrisonCell1GUID(0), - m_uiPrisonCell2GUID(0), - m_uiPrisonCell3GUID(0), - m_uiPrisonCell4GUID(0), - m_uiPrisonCell5GUID(0), - m_uiPrisonCell6GUID(0), - m_uiPrisonCell7GUID(0), - m_uiPrisonCell8GUID(0), - m_uiBroggokEventTimer(30000), m_uiBroggokEventPhase(0) { @@ -60,9 +40,10 @@ void instance_blood_furnace::OnCreatureCreate(Creature* pCreature) { switch (pCreature->GetEntry()) { - case NPC_THE_MAKER: m_uiMakerGUID = pCreature->GetGUID(); break; - case NPC_BROGGOK: m_uiBroggokGUID = pCreature->GetGUID(); break; - case NPC_KELIDAN_THE_MAKER: m_uiKelidanGUID = pCreature->GetGUID(); break; + case NPC_BROGGOK: + m_mNpcEntryGuidStore[pCreature->GetEntry()] = pCreature->GetObjectGuid(); + break; + case NPC_NASCENT_FEL_ORC: m_luiNascentOrcGUIDs.push_back(pCreature->GetGUID()); break; @@ -74,56 +55,35 @@ void instance_blood_furnace::OnObjectCreate(GameObject* pGo) switch (pGo->GetEntry()) { case GO_DOOR_MAKER_FRONT: // the maker front door - m_uiDoorMakerFrontGUID = pGo->GetGUID(); break; case GO_DOOR_MAKER_REAR: // the maker rear door - m_uiDoorMakerRearGUID = pGo->GetGUID(); - if (m_auiEncounter[TYPE_THE_MAKER_EVENT] == DONE && pGo->GetGoState() == GO_STATE_READY) - DoUseDoorOrButton(m_uiDoorMakerRearGUID); + if (m_auiEncounter[TYPE_THE_MAKER_EVENT] == DONE) + pGo->SetGoState(GO_STATE_ACTIVE); break; case GO_DOOR_BROGGOK_FRONT: // broggok front door - m_uiDoorBroggokFrontGUID = pGo->GetGUID(); break; case GO_DOOR_BROGGOK_REAR: // broggok rear door - m_uiDoorBrokkokRearGUID = pGo->GetGUID(); - if (m_auiEncounter[TYPE_BROGGOK_EVENT] == DONE && pGo->GetGoState() == GO_STATE_READY) - DoUseDoorOrButton(m_uiDoorBrokkokRearGUID); + if (m_auiEncounter[TYPE_BROGGOK_EVENT] == DONE) + pGo->SetGoState(GO_STATE_ACTIVE); break; case GO_DOOR_KELIDAN_EXIT: // kelidan exit door - m_uiDoorKelidanExitGUID = pGo->GetGUID(); - if (m_auiEncounter[TYPE_KELIDAN_EVENT] == DONE && pGo->GetGoState() == GO_STATE_READY) - DoUseDoorOrButton(m_uiDoorKelidanExitGUID); + if (m_auiEncounter[TYPE_KELIDAN_EVENT] == DONE) + pGo->SetGoState(GO_STATE_ACTIVE); break; case GO_DOOR_FINAL_EXIT: // final exit door - m_uiDoorFinalExitGUID = pGo->GetGUID(); - if (m_auiEncounter[TYPE_KELIDAN_EVENT] == DONE && pGo->GetGoState() == GO_STATE_READY) - DoUseDoorOrButton(m_uiDoorFinalExitGUID); + if (m_auiEncounter[TYPE_KELIDAN_EVENT] == DONE) + pGo->SetGoState(GO_STATE_ACTIVE); break; - case GO_PRISON_CELL_MAKER1: m_uiPrisonCell1GUID = pGo->GetGUID(); break; - case GO_PRISON_CELL_MAKER2: m_uiPrisonCell2GUID = pGo->GetGUID(); break; - case GO_PRISON_CELL_MAKER3: m_uiPrisonCell3GUID = pGo->GetGUID(); break; - case GO_PRISON_CELL_MAKER4: m_uiPrisonCell4GUID = pGo->GetGUID(); break; + case GO_PRISON_CELL_BROGGOK_1: m_aBroggokEvent[0].m_cellGuid = pGo->GetObjectGuid(); return; case GO_PRISON_CELL_BROGGOK_2: m_aBroggokEvent[1].m_cellGuid = pGo->GetObjectGuid(); return; case GO_PRISON_CELL_BROGGOK_3: m_aBroggokEvent[2].m_cellGuid = pGo->GetObjectGuid(); return; case GO_PRISON_CELL_BROGGOK_4: m_aBroggokEvent[3].m_cellGuid = pGo->GetObjectGuid(); return; - } -} - -uint64 instance_blood_furnace::GetData64(uint32 uiData) -{ - switch (uiData) - { - case NPC_THE_MAKER: return m_uiMakerGUID; - case NPC_BROGGOK: return m_uiBroggokGUID; - case GO_PRISON_CELL_MAKER1: return m_uiPrisonCell1GUID; - case GO_PRISON_CELL_MAKER2: return m_uiPrisonCell2GUID; - case GO_PRISON_CELL_MAKER3: return m_uiPrisonCell3GUID; - case GO_PRISON_CELL_MAKER4: return m_uiPrisonCell4GUID; default: - return 0; + return; } + m_mGoEntryGuidStore[pGo->GetEntry()] = pGo->GetObjectGuid(); } void instance_blood_furnace::SetData(uint32 uiType, uint32 uiData) @@ -132,13 +92,13 @@ void instance_blood_furnace::SetData(uint32 uiType, uint32 uiData) { case TYPE_THE_MAKER_EVENT: if (uiData == IN_PROGRESS) - DoUseDoorOrButton(m_uiDoorMakerFrontGUID); + DoUseDoorOrButton(GO_DOOR_MAKER_FRONT); if (uiData == FAIL) - DoUseDoorOrButton(m_uiDoorMakerFrontGUID); + DoUseDoorOrButton(GO_DOOR_MAKER_FRONT); if (uiData == DONE) { - DoUseDoorOrButton(m_uiDoorMakerFrontGUID); - DoUseDoorOrButton(m_uiDoorMakerRearGUID); + DoUseDoorOrButton(GO_DOOR_MAKER_FRONT); + DoUseDoorOrButton(GO_DOOR_MAKER_REAR); } m_auiEncounter[uiType] = uiData; break; @@ -147,7 +107,7 @@ void instance_blood_furnace::SetData(uint32 uiType, uint32 uiData) return; // Combat door; the exit door is opened in event - DoUseDoorOrButton(m_uiDoorBroggokFrontGUID); + DoUseDoorOrButton(GO_DOOR_BROGGOK_FRONT); if (uiData == IN_PROGRESS) { if (m_uiBroggokEventPhase <= MAX_ORC_WAVES) @@ -190,8 +150,8 @@ void instance_blood_furnace::SetData(uint32 uiType, uint32 uiData) case TYPE_KELIDAN_EVENT: if (uiData == DONE) { - DoUseDoorOrButton(m_uiDoorKelidanExitGUID); - DoUseDoorOrButton(m_uiDoorFinalExitGUID); + DoUseDoorOrButton(GO_DOOR_KELIDAN_EXIT); + DoUseDoorOrButton(GO_DOOR_FINAL_EXIT); } m_auiEncounter[uiType] = uiData; break; @@ -223,9 +183,9 @@ void instance_blood_furnace::DoNextBroggokEventPhase() // Open door to the final boss now and move boss to the center of the room if (m_uiBroggokEventPhase >= MAX_ORC_WAVES) { - DoUseDoorOrButton(m_uiDoorBrokkokRearGUID); + DoUseDoorOrButton(GO_DOOR_BROGGOK_REAR); - if (Creature* pBroggok = instance->GetCreature(m_uiBroggokGUID)) + if (Creature* pBroggok = GetSingleCreatureFromStorage(NPC_BROGGOK)) { pBroggok->RemoveSplineFlag(SPLINEFLAG_WALKMODE); pBroggok->GetMotionMaster()->MovePoint(0, dx, dy, pBroggok->GetPositionZ()); @@ -423,7 +383,7 @@ bool GOUse_go_prison_cell_lever(Player* pPlayer, GameObject* pGo) pInstance->SetData(TYPE_BROGGOK_EVENT, IN_PROGRESS); // Yell intro - if (Creature* pBroggok = pInstance->instance->GetCreature(pInstance->GetData64(NPC_BROGGOK))) + if (Creature* pBroggok = pInstance->GetSingleCreatureFromStorage(NPC_BROGGOK)) DoScriptText(SAY_BROGGOK_INTRO, pBroggok); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 1e49d0783..b5d17b426 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2212" + #define SD2_REVISION_NR "2213" #endif // __SD2_REVISION_NR_H__ From d30b4d533c5de423b7cfe76501634fe778910cb9 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Mon, 6 Jun 2011 16:12:21 +0200 Subject: [PATCH 0194/1172] [2214] Remaining uint64->ObjectGuid conversions for Outlands, also a few more forgotten --- .../sunwell_plateau/boss_kalecgos.cpp | 10 +++--- .../auchenai_crypts/boss_exarch_maladaar.cpp | 8 ++--- .../shadow_labyrinth/boss_murmur.cpp | 10 +++--- .../boss_fathomlord_karathress.cpp | 2 +- .../boss_omor_the_unscarred.cpp | 13 ++++--- .../shattered_halls/boss_nethekurse.cpp | 10 +++--- .../boss_warbringer_omrogg.cpp | 36 +++++++++---------- .../botanica/boss_warp_splinter.cpp | 15 ++++---- sd2_revision_nr.h | 2 +- 9 files changed, 51 insertions(+), 55 deletions(-) diff --git a/scripts/eastern_kingdoms/sunwell_plateau/boss_kalecgos.cpp b/scripts/eastern_kingdoms/sunwell_plateau/boss_kalecgos.cpp index 3c989a7fb..504b3b0ba 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/boss_kalecgos.cpp +++ b/scripts/eastern_kingdoms/sunwell_plateau/boss_kalecgos.cpp @@ -178,7 +178,7 @@ struct MANGOS_DLL_DECL boss_kalecgosAI : public ScriptedAI pTarget->CastSpell(pTarget, SPELL_SPECTRAL_REALM_FORCE_FACTION, true); pTarget->CastSpell(pTarget, SPELL_SPECTRAL_REALM, true); - m_pInstance->SetData64(DATA_PLAYER_SPECTRAL_REALM, pTarget->GetGUID()); + m_pInstance->SetGuid(DATA_PLAYER_SPECTRAL_REALM, pTarget->GetObjectGuid()); } } @@ -510,7 +510,7 @@ struct MANGOS_DLL_DECL boss_kalecgos_humanoidAI : public ScriptedAI { if (m_pInstance) { - /*Player* pPlayer = m_creature->GetMap()->GetPlayer(m_pInstance->GetData64(DATA_RANDOM_SPECTRAL_PLAYER)); + /*Player* pPlayer = m_creature->GetMap()->GetPlayer(m_pInstance->GetGuid(DATA_RANDOM_SPECTRAL_PLAYER)); if (pPlayer) DoCastSpellIfCan(pPlayer, SPELL_REVITALIZE);*/ RevitalizeTimer = 30000; @@ -553,7 +553,7 @@ bool GOUse_go_spectral_rift(Player* pPlayer, GameObject* pGo) pPlayer->CastSpell(pPlayer, SPELL_SPECTRAL_REALM, true); // Add player to pSath's threat list - /*if (Creature* pSath = pInstance->instance->GetCreature(pInstance->GetData64(DATA_KALECGOS_DRAGON))) + /*if (Creature* pSath = pInstance->GetSingleCreatureFromStorage(NPC_KALECGOS_DRAGON)) ++ TODO might contain typos { if (pSath->isAlive()) { @@ -563,7 +563,7 @@ bool GOUse_go_spectral_rift(Player* pPlayer, GameObject* pGo) } // Remove player from Sathrovarr's threat list - if (Creature* pKalecgos = pInstance->instance->GetCreature(pInstance->GetData64(DATA_SATHROVARR))) + if (Creature* pKalecgos = pInstance->GetSingleCreatureFromStorage(NPC_SATHROVARR)) ++ TODO might contain typos { if (pKalecgos->isAlive()) { @@ -575,7 +575,7 @@ bool GOUse_go_spectral_rift(Player* pPlayer, GameObject* pGo) } }*/ - pInstance->SetData64(DATA_PLAYER_SPECTRAL_REALM, pPlayer->GetGUID()); + pInstance->SetGuid(DATA_PLAYER_SPECTRAL_REALM, pPlayer->GetObjectGuid()); } return true; diff --git a/scripts/outland/auchindoun/auchenai_crypts/boss_exarch_maladaar.cpp b/scripts/outland/auchindoun/auchenai_crypts/boss_exarch_maladaar.cpp index 621649f5b..1aae4d20b 100644 --- a/scripts/outland/auchindoun/auchenai_crypts/boss_exarch_maladaar.cpp +++ b/scripts/outland/auchindoun/auchenai_crypts/boss_exarch_maladaar.cpp @@ -156,7 +156,7 @@ struct MANGOS_DLL_DECL boss_exarch_maladaarAI : public ScriptedAI Reset(); } - uint64 m_uiTargetGUID; + ObjectGuid m_targetGuid; uint32 m_uiFearTimer; uint32 m_uiRibbonOfSoulsTimer; @@ -167,7 +167,7 @@ struct MANGOS_DLL_DECL boss_exarch_maladaarAI : public ScriptedAI void Reset() { - m_uiTargetGUID = 0; + m_targetGuid.Clear(); m_uiFearTimer = urand(15000, 20000); m_uiRibbonOfSoulsTimer = 5000; @@ -205,7 +205,7 @@ struct MANGOS_DLL_DECL boss_exarch_maladaarAI : public ScriptedAI pSummoned->CastSpell(pSummoned, SPELL_STOLEN_SOUL_VISUAL, false); pSummoned->setFaction(m_creature->getFaction()); - if (Player* pTarget = m_creature->GetMap()->GetPlayer(m_uiTargetGUID)) + if (Player* pTarget = m_creature->GetMap()->GetPlayer(m_targetGuid)) { if (mob_stolen_soulAI* pSoulAI = dynamic_cast(pSummoned->AI())) { @@ -260,7 +260,7 @@ struct MANGOS_DLL_DECL boss_exarch_maladaarAI : public ScriptedAI DoScriptText(urand(0, 1) ? SAY_ROAR : SAY_SOUL_CLEAVE, m_creature); - m_uiTargetGUID = pTarget->GetGUID(); + m_targetGuid = pTarget->GetObjectGuid(); DoCastSpellIfCan(pTarget, SPELL_STOLEN_SOUL); DoSpawnCreature(NPC_STOLEN_SOUL, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 10000); diff --git a/scripts/outland/auchindoun/shadow_labyrinth/boss_murmur.cpp b/scripts/outland/auchindoun/shadow_labyrinth/boss_murmur.cpp index 0de40677b..ab6d2666f 100644 --- a/scripts/outland/auchindoun/shadow_labyrinth/boss_murmur.cpp +++ b/scripts/outland/auchindoun/shadow_labyrinth/boss_murmur.cpp @@ -57,7 +57,7 @@ struct MANGOS_DLL_DECL boss_murmurAI : public ScriptedAI uint32 ThunderingStorm_Timer; bool CanSonicBoom; bool CanShockWave; - uint64 m_uiPlayerTargetGUID; + ObjectGuid m_playerTargetGuid; void Reset() { @@ -69,7 +69,7 @@ struct MANGOS_DLL_DECL boss_murmurAI : public ScriptedAI ThunderingStorm_Timer = 12000; //Casting directly after Sonic Boom. CanSonicBoom = false; CanShockWave = false; - m_uiPlayerTargetGUID = 0; + m_playerTargetGuid.Clear(); //database should have `RegenHealth`=0 to prevent regen uint32 hp = (m_creature->GetMaxHealth()*40)/100; @@ -170,7 +170,7 @@ struct MANGOS_DLL_DECL boss_murmurAI : public ScriptedAI if (temp->GetTypeId() == TYPEID_PLAYER) { DoCastSpellIfCan(temp, SPELL_MAGNETIC_PULL); - m_uiPlayerTargetGUID = temp->GetGUID(); + m_playerTargetGuid = temp->GetObjectGuid(); CanShockWave = true; } MagneticPull_Timer = 2500; @@ -178,12 +178,12 @@ struct MANGOS_DLL_DECL boss_murmurAI : public ScriptedAI } else { - if (Player* pPlayer = m_creature->GetMap()->GetPlayer(m_uiPlayerTargetGUID)) + if (Player* pPlayer = m_creature->GetMap()->GetPlayer(m_playerTargetGuid)) pPlayer->CastSpell(pPlayer, SPELL_SHOCKWAVE, true); MagneticPull_Timer = urand(15000, 30000); CanShockWave = false; - m_uiPlayerTargetGUID = 0; + m_playerTargetGuid.Clear(); } }else MagneticPull_Timer -= diff; diff --git a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_fathomlord_karathress.cpp b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_fathomlord_karathress.cpp index 16eeed1d7..59c4e92ce 100644 --- a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_fathomlord_karathress.cpp +++ b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_fathomlord_karathress.cpp @@ -199,7 +199,7 @@ struct MANGOS_DLL_DECL boss_fathomlord_karathressAI : public ScriptedAI //check if the event is started if (m_pInstance->GetData(TYPE_KARATHRESS_EVENT) == IN_PROGRESS) { - if (Player* pTarget = m_creature->GetMap()->GetPlayer(m_pInstance->GetData64(DATA_KARATHRESS_STARTER))) + if (Player* pTarget = m_creature->GetMap()->GetPlayer(m_pInstance->GetGuid(DATA_KARATHRESS_STARTER))) AttackStart(pTarget); } return; diff --git a/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_omor_the_unscarred.cpp b/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_omor_the_unscarred.cpp index 6c1e5f988..0ece363c2 100644 --- a/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_omor_the_unscarred.cpp +++ b/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_omor_the_unscarred.cpp @@ -59,7 +59,7 @@ struct MANGOS_DLL_DECL boss_omor_the_unscarredAI : public ScriptedAI uint32 Shadowbolt_Timer; uint32 Summon_Timer; uint32 SummonedCount; - uint64 playerGUID; + ObjectGuid m_playerGuid; bool CanPullBack; void Reset() @@ -73,7 +73,7 @@ struct MANGOS_DLL_DECL boss_omor_the_unscarredAI : public ScriptedAI Shadowbolt_Timer = 2000; Summon_Timer = 10000; SummonedCount = 0; - playerGUID = 0; + m_playerGuid.Clear(); CanPullBack = false; } @@ -130,7 +130,7 @@ struct MANGOS_DLL_DECL boss_omor_the_unscarredAI : public ScriptedAI { if (ShadowWhip_Timer < diff) { - if (Player* pPlayer = m_creature->GetMap()->GetPlayer(playerGUID)) + if (Player* pPlayer = m_creature->GetMap()->GetPlayer(m_playerGuid)) { //if unit dosen't have this flag, then no pulling back (script will attempt cast, even if orbital strike was resisted) if (pPlayer->HasMovementFlag(MOVEFLAG_FALLING)) @@ -139,7 +139,7 @@ struct MANGOS_DLL_DECL boss_omor_the_unscarredAI : public ScriptedAI DoCastSpellIfCan(pPlayer,SPELL_SHADOW_WHIP); } } - playerGUID = 0; + m_playerGuid.Clear(); ShadowWhip_Timer = 2000; CanPullBack = false; }else ShadowWhip_Timer -= diff; @@ -155,10 +155,9 @@ struct MANGOS_DLL_DECL boss_omor_the_unscarredAI : public ScriptedAI { DoCastSpellIfCan(temp,SPELL_ORBITAL_STRIKE); OrbitalStrike_Timer = urand(14000, 16000); - playerGUID = temp->GetGUID(); + m_playerGuid = temp->GetObjectGuid(); - if (playerGUID) - CanPullBack = true; + CanPullBack = true; } }else OrbitalStrike_Timer -= diff; diff --git a/scripts/outland/hellfire_citadel/shattered_halls/boss_nethekurse.cpp b/scripts/outland/hellfire_citadel/shattered_halls/boss_nethekurse.cpp index e1ba77035..3b5cf1555 100644 --- a/scripts/outland/hellfire_citadel/shattered_halls/boss_nethekurse.cpp +++ b/scripts/outland/hellfire_citadel/shattered_halls/boss_nethekurse.cpp @@ -107,7 +107,7 @@ struct MANGOS_DLL_DECL boss_grand_warlock_nethekurseAI : public ScriptedAI uint32 m_uiShadowFissureTimer; uint32 m_uiCleaveTimer; - uint64 m_uiLastEventInvokerGUID; + ObjectGuid m_lastEventInvokerGuid; void Reset() { @@ -127,7 +127,7 @@ struct MANGOS_DLL_DECL boss_grand_warlock_nethekurseAI : public ScriptedAI m_uiShadowFissureTimer = 8000; m_uiCleaveTimer = 5000; - m_uiLastEventInvokerGUID = 0; + m_lastEventInvokerGuid.Clear(); } void DoYellForPeonAggro(Unit* pWho) @@ -139,7 +139,7 @@ struct MANGOS_DLL_DECL boss_grand_warlock_nethekurseAI : public ScriptedAI ++m_uiPeonEngagedCount; if (pWho) - m_uiLastEventInvokerGUID = pWho->GetGUID(); + m_lastEventInvokerGuid = pWho->GetObjectGuid(); } void DoYellForPeonDeath(Unit* pKiller) @@ -182,7 +182,7 @@ struct MANGOS_DLL_DECL boss_grand_warlock_nethekurseAI : public ScriptedAI m_bIsMainEvent = true; m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - if (Unit* pEnemy = m_creature->GetMap()->GetUnit(m_uiLastEventInvokerGUID)) + if (Unit* pEnemy = m_creature->GetMap()->GetUnit(m_lastEventInvokerGuid)) AttackStart(pEnemy); } @@ -215,7 +215,7 @@ struct MANGOS_DLL_DECL boss_grand_warlock_nethekurseAI : public ScriptedAI m_bIntroOnce = true; m_bIsIntroEvent = true; - m_uiLastEventInvokerGUID = pWho->GetGUID(); + m_lastEventInvokerGuid = pWho->GetObjectGuid(); if (m_pInstance) m_pInstance->SetData(TYPE_NETHEKURSE, IN_PROGRESS); diff --git a/scripts/outland/hellfire_citadel/shattered_halls/boss_warbringer_omrogg.cpp b/scripts/outland/hellfire_citadel/shattered_halls/boss_warbringer_omrogg.cpp index 1804cfe2e..209834318 100644 --- a/scripts/outland/hellfire_citadel/shattered_halls/boss_warbringer_omrogg.cpp +++ b/scripts/outland/hellfire_citadel/shattered_halls/boss_warbringer_omrogg.cpp @@ -134,8 +134,6 @@ struct MANGOS_DLL_DECL boss_warbringer_omroggAI : public ScriptedAI { boss_warbringer_omroggAI(Creature* pCreature) : ScriptedAI(pCreature) { - m_uiLeftHeadGUID = 0; - m_uiRightHeadGUID = 0; m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); Reset(); @@ -144,8 +142,8 @@ struct MANGOS_DLL_DECL boss_warbringer_omroggAI : public ScriptedAI ScriptedInstance* m_pInstance; bool m_bIsRegularMode; - uint64 m_uiLeftHeadGUID; - uint64 m_uiRightHeadGUID; + ObjectGuid m_leftHeadGuid; + ObjectGuid m_rightHeadGuid; int m_iAggro; int m_iThreat; @@ -166,16 +164,16 @@ struct MANGOS_DLL_DECL boss_warbringer_omroggAI : public ScriptedAI void Reset() { - if (Creature* pLeftHead = m_creature->GetMap()->GetCreature(m_uiLeftHeadGUID)) + if (Creature* pLeftHead = m_creature->GetMap()->GetCreature(m_leftHeadGuid)) { pLeftHead->SetDeathState(JUST_DIED); - m_uiLeftHeadGUID = 0; + m_leftHeadGuid.Clear(); } - if (Creature* pRightHead = m_creature->GetMap()->GetCreature(m_uiRightHeadGUID)) + if (Creature* pRightHead = m_creature->GetMap()->GetCreature(m_rightHeadGuid)) { pRightHead->SetDeathState(JUST_DIED); - m_uiRightHeadGUID = 0; + m_rightHeadGuid.Clear(); } m_bAggroYell = false; @@ -197,8 +195,8 @@ struct MANGOS_DLL_DECL boss_warbringer_omroggAI : public ScriptedAI void DoYellForThreat() { - Creature* pLeftHead = m_creature->GetMap()->GetCreature(m_uiLeftHeadGUID); - Creature* pRightHead = m_creature->GetMap()->GetCreature(m_uiRightHeadGUID); + Creature* pLeftHead = m_creature->GetMap()->GetCreature(m_leftHeadGuid); + Creature* pRightHead = m_creature->GetMap()->GetCreature(m_rightHeadGuid); if (!pLeftHead || !pRightHead) return; @@ -218,7 +216,7 @@ struct MANGOS_DLL_DECL boss_warbringer_omroggAI : public ScriptedAI m_creature->SummonCreature(NPC_LEFT_HEAD, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_DEAD_DESPAWN, 0); m_creature->SummonCreature(NPC_RIGHT_HEAD, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_DEAD_DESPAWN, 0); - if (Creature* pLeftHead = m_creature->GetMap()->GetCreature(m_uiLeftHeadGUID)) + if (Creature* pLeftHead = m_creature->GetMap()->GetCreature(m_leftHeadGuid)) { m_iAggro = irand(0, 2); @@ -235,10 +233,10 @@ struct MANGOS_DLL_DECL boss_warbringer_omroggAI : public ScriptedAI void JustSummoned(Creature* pSummoned) { if (pSummoned->GetEntry() == NPC_LEFT_HEAD) - m_uiLeftHeadGUID = pSummoned->GetGUID(); + m_leftHeadGuid = pSummoned->GetObjectGuid(); if (pSummoned->GetEntry() == NPC_RIGHT_HEAD) - m_uiRightHeadGUID = pSummoned->GetGUID(); + m_rightHeadGuid = pSummoned->GetObjectGuid(); //summoned->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); //summoned->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); @@ -247,8 +245,8 @@ struct MANGOS_DLL_DECL boss_warbringer_omroggAI : public ScriptedAI void KilledUnit(Unit* pVictim) { - Creature* pLeftHead = m_creature->GetMap()->GetCreature(m_uiLeftHeadGUID); - Creature* pRightHead = m_creature->GetMap()->GetCreature(m_uiRightHeadGUID); + Creature* pLeftHead = m_creature->GetMap()->GetCreature(m_leftHeadGuid); + Creature* pRightHead = m_creature->GetMap()->GetCreature(m_rightHeadGuid); if (!pLeftHead || !pRightHead) return; @@ -273,8 +271,8 @@ struct MANGOS_DLL_DECL boss_warbringer_omroggAI : public ScriptedAI void JustDied(Unit* pKiller) { - Creature* pLeftHead = m_creature->GetMap()->GetCreature(m_uiLeftHeadGUID); - Creature* pRightHead = m_creature->GetMap()->GetCreature(m_uiRightHeadGUID); + Creature* pLeftHead = m_creature->GetMap()->GetCreature(m_leftHeadGuid); + Creature* pRightHead = m_creature->GetMap()->GetCreature(m_rightHeadGuid); if (!pLeftHead || !pRightHead) return; @@ -295,8 +293,8 @@ struct MANGOS_DLL_DECL boss_warbringer_omroggAI : public ScriptedAI { m_uiDelay_Timer = 3500; - Creature* pLeftHead = m_creature->GetMap()->GetCreature(m_uiLeftHeadGUID); - Creature* pRightHead = m_creature->GetMap()->GetCreature(m_uiRightHeadGUID); + Creature* pLeftHead = m_creature->GetMap()->GetCreature(m_leftHeadGuid); + Creature* pRightHead = m_creature->GetMap()->GetCreature(m_rightHeadGuid); if (!pLeftHead || !pRightHead) return; diff --git a/scripts/outland/tempest_keep/botanica/boss_warp_splinter.cpp b/scripts/outland/tempest_keep/botanica/boss_warp_splinter.cpp index efe795dff..6b4169855 100644 --- a/scripts/outland/tempest_keep/botanica/boss_warp_splinter.cpp +++ b/scripts/outland/tempest_keep/botanica/boss_warp_splinter.cpp @@ -31,11 +31,10 @@ struct MANGOS_DLL_DECL mob_treantAI : public ScriptedAI { mob_treantAI (Creature* pCreature) : ScriptedAI(pCreature) { - WarpGuid = 0; Reset(); } - uint64 WarpGuid; + ObjectGuid m_warpGuid; void Reset() { @@ -49,7 +48,7 @@ struct MANGOS_DLL_DECL mob_treantAI : public ScriptedAI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - if (m_creature->getVictim()->GetGUID() != WarpGuid) + if (m_creature->getVictim()->GetObjectGuid() != m_warpGuid) DoMeleeAttackIfReady(); } }; @@ -97,7 +96,7 @@ struct MANGOS_DLL_DECL boss_warp_splinterAI : public ScriptedAI uint32 Arcane_Volley_Timer; uint32 CheckTreantLOS_Timer; uint32 TreantLife_Timer; - uint64 Treant_GUIDs[6]; + ObjectGuid m_aTreantGuid[6]; float Treant_Spawn_Pos_X; float Treant_Spawn_Pos_Y; @@ -111,7 +110,7 @@ struct MANGOS_DLL_DECL boss_warp_splinterAI : public ScriptedAI TreantLife_Timer = 999999; for(int i = 0; i < 6; ++i) - Treant_GUIDs[i] = 0; + m_aTreantGuid[i].Clear(); m_creature->SetSpeedRate(MOVE_RUN, 0.7f); } @@ -147,10 +146,10 @@ struct MANGOS_DLL_DECL boss_warp_splinterAI : public ScriptedAI { //pTreant->GetMotionMaster()->Mutate(new TargetedMovementGenerator(*m_creature)); pTreant->AddThreat(m_creature); - Treant_GUIDs[i] = pTreant->GetGUID(); + m_aTreantGuid[i] = pTreant->GetObjectGuid(); if (mob_treantAI* pTreantAI = dynamic_cast(pTreant->AI())) - pTreantAI->WarpGuid = m_creature->GetGUID(); + pTreantAI->m_warpGuid = m_creature->GetObjectGuid(); } } @@ -162,7 +161,7 @@ struct MANGOS_DLL_DECL boss_warp_splinterAI : public ScriptedAI { for(int i=0; i<6; ++i) { - Creature* pTreant = m_creature->GetMap()->GetCreature(Treant_GUIDs[i]); + Creature* pTreant = m_creature->GetMap()->GetCreature(m_aTreantGuid[i]); if (pTreant) { diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index b5d17b426..c5eae96d2 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2213" + #define SD2_REVISION_NR "2214" #endif // __SD2_REVISION_NR_H__ From 99ced8193c325b69c8b0a0ac61c034ae39f16e76 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Mon, 6 Jun 2011 18:38:02 +0200 Subject: [PATCH 0195/1172] [2215] Replace remaining GetGUID uses --- ScriptMgr.h | 8 ++++---- include/sc_gossip.h | 4 ++-- .../blackrock_depths/blackrock_depths.cpp | 2 +- .../instance_blackrock_spire.cpp | 6 +++--- .../gnomeregan/boss_thermaplugg.cpp | 6 +++--- .../gnomeregan/gnomeregan.cpp | 4 ++-- .../gnomeregan/instance_gnomeregan.cpp | 10 +++++----- .../karazhan/boss_prince_malchezaar.cpp | 4 ++-- .../magisters_terrace/boss_vexallus.cpp | 2 +- .../instance_magisters_terrace.cpp | 2 +- .../molten_core/boss_majordomo_executus.cpp | 2 +- .../molten_core/instance_molten_core.cpp | 10 +++++----- .../stratholme/instance_stratholme.cpp | 20 +++++++++---------- .../sunken_temple/instance_sunken_temple.cpp | 6 +++--- .../sunken_temple/sunken_temple.cpp | 2 +- .../instance_sunwell_plateau.cpp | 2 +- .../uldaman/instance_uldaman.cpp | 2 +- .../eastern_kingdoms/zulaman/boss_janalai.cpp | 2 +- .../zulaman/instance_zulaman.cpp | 2 +- .../instance_culling_of_stratholme.cpp | 10 +++++----- .../caverns_of_time/hyjal/hyjalAI.cpp | 2 +- .../caverns_of_time/hyjal/instance_hyjal.cpp | 2 +- .../kalimdor/dire_maul/instance_dire_maul.cpp | 6 +++--- .../mob_anubisath_sentinel.cpp | 10 +++++----- .../northrend/gundrak/instance_gundrak.cpp | 6 +++--- .../instance_forge_of_souls.cpp | 4 ++-- .../northrend/naxxramas/boss_kelthuzad.cpp | 10 +++++----- .../naxxramas/instance_naxxramas.cpp | 6 +++--- .../ulduar/halls_of_lightning/boss_ionar.cpp | 2 +- .../halls_of_lightning/boss_volkhan.cpp | 2 +- .../ulduar/halls_of_stone/halls_of_stone.cpp | 2 +- .../instance_halls_of_stone.cpp | 10 +++++----- .../violet_hold/instance_violet_hold.cpp | 4 ++-- scripts/northrend/violet_hold/violet_hold.cpp | 6 +++--- scripts/outland/black_temple/boss_illidan.cpp | 2 +- .../black_temple/boss_shade_of_akama.cpp | 8 ++++---- .../black_temple/boss_teron_gorefiend.cpp | 2 +- .../blood_furnace/instance_blood_furnace.cpp | 8 ++++---- .../boss_nazan_and_vazruden.cpp | 2 +- .../instance_hellfire_ramparts.cpp | 2 +- .../instance_magtheridons_lair.cpp | 4 ++-- .../boss_warchief_kargath_bladefist.cpp | 4 ++-- .../botanica/boss_high_botanist_freywinn.cpp | 2 +- scripts/world/npcs_special.cpp | 2 +- sd2_revision_nr.h | 2 +- 45 files changed, 108 insertions(+), 108 deletions(-) diff --git a/ScriptMgr.h b/ScriptMgr.h index f4036e6c2..4ff458495 100644 --- a/ScriptMgr.h +++ b/ScriptMgr.h @@ -30,10 +30,10 @@ class ObjectGuid; #define VISIBLE_RANGE (166.0f) // MAX visible range (size of grid) #define DEFAULT_TEXT "" -// Some typedefs for storing GUIDs -typedef std::list GUIDList; -typedef std::set GUIDSet; -typedef std::vector GUIDVector; +// Some typedefs for storing Guids +typedef std::list GUIDList; +typedef std::set GUIDSet; +typedef std::vector GUIDVector; typedef std::map EntryGuidMap; /* Escort Factions diff --git a/include/sc_gossip.h b/include/sc_gossip.h index 28d7e7a9b..fa97fc894 100644 --- a/include/sc_gossip.h +++ b/include/sc_gossip.h @@ -140,8 +140,8 @@ extern uint32 GetSkillLevel(Player* pPlayer, uint32 uiSkill); #define ADD_GOSSIP_ITEM_ID(uiIcon, iTextId, uiSender, uiOptionId) PlayerTalkClass->GetGossipMenu().AddMenuItem(uiIcon, iTextId, uiSender, uiOptionId, 0, 0) #define ADD_GOSSIP_ITEM_EXTENDED(uiIcon, chrText, uiSender, uiOptionId, chrBoxMessage, uiBoxMoney, bCode) PlayerTalkClass->GetGossipMenu().AddMenuItem(uiIcon, chrText, uiSender, uiOptionId, chrBoxMessage, uiBoxMoney, bCode) -// This fuction Sends the current menu to show to client, uiTextId - NPCTEXTID(uint32) , uiGuid - npc guid(uint64) -#define SEND_GOSSIP_MENU(uiTextId, uiGuid) PlayerTalkClass->SendGossipMenu(uiTextId, uiGuid) +// This fuction Sends the current menu to show to client, uiTextId - NPCTEXTID(uint32) , uiGuid - npc guid(ObjectGuid) +#define SEND_GOSSIP_MENU(uiTextId, guid) PlayerTalkClass->SendGossipMenu(uiTextId, guid) // This fuction shows POI(point of interest) to client. // a - position X diff --git a/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.cpp b/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.cpp index 64b034903..55a542e37 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.cpp +++ b/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.cpp @@ -196,7 +196,7 @@ struct MANGOS_DLL_DECL npc_grimstoneAI : public npc_escortAI m_creature->GetRandomPoint(fX, fY, fZ, 10.0f, fcX, fcY, fcZ); pSummoned->GetMotionMaster()->MovePoint(1, fcX, fcY, fcZ); - m_lSummonedGUIDList.push_back(pSummoned->GetGUID()); + m_lSummonedGUIDList.push_back(pSummoned->GetObjectGuid()); } void DoChallengeQuestCredit() diff --git a/scripts/eastern_kingdoms/blackrock_spire/instance_blackrock_spire.cpp b/scripts/eastern_kingdoms/blackrock_spire/instance_blackrock_spire.cpp index b33ca9a1a..0c0943593 100644 --- a/scripts/eastern_kingdoms/blackrock_spire/instance_blackrock_spire.cpp +++ b/scripts/eastern_kingdoms/blackrock_spire/instance_blackrock_spire.cpp @@ -85,7 +85,7 @@ void instance_blackrock_spire::OnObjectCreate(GameObject* pGo) case GO_ROOM_6_RUNE: m_aRoomRuneGuid[5] = pGo->GetObjectGuid(); return; case GO_ROOM_7_RUNE: m_aRoomRuneGuid[6] = pGo->GetObjectGuid(); return; - case GO_ROOKERY_EGG: m_lRookeryEggGUIDList.push_back(pGo->GetGUID()); return; + case GO_ROOKERY_EGG: m_lRookeryEggGUIDList.push_back(pGo->GetObjectGuid()); return; default: return; @@ -105,8 +105,8 @@ void instance_blackrock_spire::OnCreatureCreate(Creature* pCreature) break; case NPC_BLACKHAND_SUMMONER: - case NPC_BLACKHAND_VETERAN: m_lRoomEventMobGUIDList.push_back(pCreature->GetGUID()); break; - case NPC_BLACKHAND_INCANCERATOR: m_lIncanceratorGUIDList.push_back(pCreature->GetGUID()); break; + case NPC_BLACKHAND_VETERAN: m_lRoomEventMobGUIDList.push_back(pCreature->GetObjectGuid()); break; + case NPC_BLACKHAND_INCANCERATOR: m_lIncanceratorGUIDList.push_back(pCreature->GetObjectGuid()); break; } } diff --git a/scripts/eastern_kingdoms/gnomeregan/boss_thermaplugg.cpp b/scripts/eastern_kingdoms/gnomeregan/boss_thermaplugg.cpp index 6ba2a4b77..92bd191fb 100644 --- a/scripts/eastern_kingdoms/gnomeregan/boss_thermaplugg.cpp +++ b/scripts/eastern_kingdoms/gnomeregan/boss_thermaplugg.cpp @@ -130,7 +130,7 @@ struct MANGOS_DLL_DECL boss_thermapluggAI : public ScriptedAI { if (pSummoned->GetEntry() == NPC_WALKING_BOMB) { - m_lSummonedBombGUIDs.push_back(pSummoned->GetGUID()); + m_lSummonedBombGUIDs.push_back(pSummoned->GetObjectGuid()); // calculate point for falling down float fX, fY; fX = 0.2*m_afSpawnPos[0] + 0.8*pSummoned->GetPositionX(); @@ -142,12 +142,12 @@ struct MANGOS_DLL_DECL boss_thermapluggAI : public ScriptedAI void SummonedMovementInform(Creature* pSummoned, uint32 uiMotionType, uint32 uiPointId) { if (pSummoned->GetEntry() == NPC_WALKING_BOMB && uiMotionType == POINT_MOTION_TYPE && uiPointId == 1) - m_lLandedBombGUIDs.push_back(pSummoned->GetGUID()); + m_lLandedBombGUIDs.push_back(pSummoned->GetObjectGuid()); } void SummonedCreatureDespawn(Creature* pSummoned) { - m_lSummonedBombGUIDs.remove(pSummoned->GetGUID()); + m_lSummonedBombGUIDs.remove(pSummoned->GetObjectGuid()); } void UpdateAI(const uint32 uiDiff) diff --git a/scripts/eastern_kingdoms/gnomeregan/gnomeregan.cpp b/scripts/eastern_kingdoms/gnomeregan/gnomeregan.cpp index 7aa13def2..239ce3f03 100644 --- a/scripts/eastern_kingdoms/gnomeregan/gnomeregan.cpp +++ b/scripts/eastern_kingdoms/gnomeregan/gnomeregan.cpp @@ -190,7 +190,7 @@ struct MANGOS_DLL_DECL npc_blastmaster_emi_shortfuseAI : public npc_escortAI DoScriptText(SAY_GRUBBIS_SPAWN, pSummoned); break; } - m_luiSummonedMobGUIDs.push_back(pSummoned->GetGUID()); + m_luiSummonedMobGUIDs.push_back(pSummoned->GetObjectGuid()); } void SummonedCreatureJustDied(Creature* pSummoned) @@ -201,7 +201,7 @@ struct MANGOS_DLL_DECL npc_blastmaster_emi_shortfuseAI : public npc_escortAI m_pInstance->SetData(TYPE_GRUBBIS, DONE); m_uiPhaseTimer = 1000; } - m_luiSummonedMobGUIDs.remove(pSummoned->GetGUID()); + m_luiSummonedMobGUIDs.remove(pSummoned->GetObjectGuid()); } bool IsPreparingExplosiveCharge() diff --git a/scripts/eastern_kingdoms/gnomeregan/instance_gnomeregan.cpp b/scripts/eastern_kingdoms/gnomeregan/instance_gnomeregan.cpp index 1f759e100..292db984f 100644 --- a/scripts/eastern_kingdoms/gnomeregan/instance_gnomeregan.cpp +++ b/scripts/eastern_kingdoms/gnomeregan/instance_gnomeregan.cpp @@ -56,8 +56,8 @@ void instance_gnomeregan::OnObjectCreate(GameObject* pGo) m_mGoEntryGuidStore[pGo->GetEntry()] = pGo->GetObjectGuid(); break; - case GO_RED_ROCKET: m_lRedRocketGUIDs.push_back(pGo->GetGUID()); return; - case GO_EXPLOSIVE_CHARGE: m_luiExplosiveChargeGUIDs.push_back(pGo->GetGUID()); return; + case GO_RED_ROCKET: m_lRedRocketGUIDs.push_back(pGo->GetObjectGuid()); return; + case GO_EXPLOSIVE_CHARGE: m_luiExplosiveChargeGUIDs.push_back(pGo->GetObjectGuid()); return; case GO_GNOME_FACE_1: m_asBombFaces[0].m_gnomeFaceGuid = pGo->GetObjectGuid(); return; case GO_GNOME_FACE_2: m_asBombFaces[1].m_gnomeFaceGuid = pGo->GetObjectGuid(); return; @@ -134,15 +134,15 @@ void instance_gnomeregan::SetData(uint32 uiType, uint32 uiData) { case DATA_EXPLOSIVE_CHARGE_1: DoRespawnGameObject(m_aExplosiveSortedGuids[0][0], HOUR); - m_luiSpawnedExplosiveChargeGUIDs.push_back(m_aExplosiveSortedGuids[0][0].GetRawValue()); + m_luiSpawnedExplosiveChargeGUIDs.push_back(m_aExplosiveSortedGuids[0][0]); break; case DATA_EXPLOSIVE_CHARGE_2: DoRespawnGameObject(m_aExplosiveSortedGuids[0][1], HOUR); - m_luiSpawnedExplosiveChargeGUIDs.push_back(m_aExplosiveSortedGuids[0][1].GetRawValue()); + m_luiSpawnedExplosiveChargeGUIDs.push_back(m_aExplosiveSortedGuids[0][1]); break; case DATA_EXPLOSIVE_CHARGE_3: DoRespawnGameObject(m_aExplosiveSortedGuids[1][0], HOUR); - m_luiSpawnedExplosiveChargeGUIDs.push_back(m_aExplosiveSortedGuids[1][0].GetRawValue()); + m_luiSpawnedExplosiveChargeGUIDs.push_back(m_aExplosiveSortedGuids[1][0]); break; case DATA_EXPLOSIVE_CHARGE_4: DoRespawnGameObject(m_aExplosiveSortedGuids[1][1], HOUR); diff --git a/scripts/eastern_kingdoms/karazhan/boss_prince_malchezaar.cpp b/scripts/eastern_kingdoms/karazhan/boss_prince_malchezaar.cpp index 0dceffaf4..ca4929c0c 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_prince_malchezaar.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_prince_malchezaar.cpp @@ -382,7 +382,7 @@ struct MANGOS_DLL_DECL boss_malchezaarAI : public ScriptedAI pInfernalAI->m_malchezaarGuid = m_creature->GetObjectGuid(); } - m_vInfernalGuids.push_back(Infernal->GetGUID()); + m_vInfernalGuids.push_back(Infernal->GetObjectGuid()); DoCastSpellIfCan(Infernal, SPELL_INFERNAL_RELAY); } @@ -628,7 +628,7 @@ struct MANGOS_DLL_DECL boss_malchezaarAI : public ScriptedAI void Cleanup(Creature *infernal, InfernalPoint *point) { for(GUIDVector::iterator itr = m_vInfernalGuids.begin(); itr!= m_vInfernalGuids.end(); ++itr) - if (*itr == infernal->GetGUID()) + if (*itr == infernal->GetObjectGuid()) { m_vInfernalGuids.erase(itr); break; diff --git a/scripts/eastern_kingdoms/magisters_terrace/boss_vexallus.cpp b/scripts/eastern_kingdoms/magisters_terrace/boss_vexallus.cpp index a1818c7da..fa14d8e1b 100644 --- a/scripts/eastern_kingdoms/magisters_terrace/boss_vexallus.cpp +++ b/scripts/eastern_kingdoms/magisters_terrace/boss_vexallus.cpp @@ -201,7 +201,7 @@ struct MANGOS_DLL_DECL mob_pure_energyAI : public ScriptedAI return; if (Player* pPlayer = pKiller->GetCharmerOrOwnerPlayerOrPlayerItself()) - pPlayer->CastSpell(pPlayer, SPELL_ENERGY_FEEDBACK, true, NULL, NULL, pVex->GetGUID()); + pPlayer->CastSpell(pPlayer, SPELL_ENERGY_FEEDBACK, true, NULL, NULL, pVex->GetObjectGuid()); } } } diff --git a/scripts/eastern_kingdoms/magisters_terrace/instance_magisters_terrace.cpp b/scripts/eastern_kingdoms/magisters_terrace/instance_magisters_terrace.cpp index 54a2fb93b..467bebf34 100644 --- a/scripts/eastern_kingdoms/magisters_terrace/instance_magisters_terrace.cpp +++ b/scripts/eastern_kingdoms/magisters_terrace/instance_magisters_terrace.cpp @@ -51,7 +51,7 @@ void instance_magisters_terrace::OnCreatureCreate(Creature* pCreature) m_mNpcEntryGuidStore[pCreature->GetEntry()] = pCreature->GetObjectGuid(); break; case NPC_FEL_CRYSTAL: - m_lFelCrystalGuid.push_back(pCreature->GetGUID()); + m_lFelCrystalGuid.push_back(pCreature->GetObjectGuid()); break; } } diff --git a/scripts/eastern_kingdoms/molten_core/boss_majordomo_executus.cpp b/scripts/eastern_kingdoms/molten_core/boss_majordomo_executus.cpp index dc47972f9..56aa05f73 100644 --- a/scripts/eastern_kingdoms/molten_core/boss_majordomo_executus.cpp +++ b/scripts/eastern_kingdoms/molten_core/boss_majordomo_executus.cpp @@ -186,7 +186,7 @@ struct MANGOS_DLL_DECL boss_majordomoAI : public ScriptedAI { if (pSummoned->GetEntry() == NPC_FLAMEWAKER_HEALER || pSummoned->GetEntry() == NPC_FLAMEWAKER_ELITE) { - m_luiMajordomoAddsGUIDs.push_back(pSummoned->GetGUID()); + m_luiMajordomoAddsGUIDs.push_back(pSummoned->GetObjectGuid()); pSummoned->SetRespawnDelay(2*HOUR); } else if (pSummoned->GetEntry() == NPC_RAGNAROS) diff --git a/scripts/eastern_kingdoms/molten_core/instance_molten_core.cpp b/scripts/eastern_kingdoms/molten_core/instance_molten_core.cpp index cce083dc6..e093663ee 100644 --- a/scripts/eastern_kingdoms/molten_core/instance_molten_core.cpp +++ b/scripts/eastern_kingdoms/molten_core/instance_molten_core.cpp @@ -63,11 +63,11 @@ void instance_molten_core::OnCreatureCreate(Creature* pCreature) break; // Push adds to lists in order to handle respawn - case NPC_FLAMEWAKER_PROTECTOR: m_luiProtectorGUIDs.push_back(pCreature->GetGUID()); break; - case NPC_FLAMEWAKER: m_luiFlamewakerGUIDs.push_back(pCreature->GetGUID()); break; - case NPC_FIRESWORN: m_luiFireswornGUIDs.push_back(pCreature->GetGUID()); break; - case NPC_FLAMEWAKER_PRIEST: m_luiPriestGUIDs.push_back(pCreature->GetGUID()); break; - case NPC_CORE_RAGER: m_luiRagerGUIDs.push_back(pCreature->GetGUID()); break; + case NPC_FLAMEWAKER_PROTECTOR: m_luiProtectorGUIDs.push_back(pCreature->GetObjectGuid()); break; + case NPC_FLAMEWAKER: m_luiFlamewakerGUIDs.push_back(pCreature->GetObjectGuid()); break; + case NPC_FIRESWORN: m_luiFireswornGUIDs.push_back(pCreature->GetObjectGuid()); break; + case NPC_FLAMEWAKER_PRIEST: m_luiPriestGUIDs.push_back(pCreature->GetObjectGuid()); break; + case NPC_CORE_RAGER: m_luiRagerGUIDs.push_back(pCreature->GetObjectGuid()); break; } } diff --git a/scripts/eastern_kingdoms/stratholme/instance_stratholme.cpp b/scripts/eastern_kingdoms/stratholme/instance_stratholme.cpp index 2e761e07d..1262d2e28 100644 --- a/scripts/eastern_kingdoms/stratholme/instance_stratholme.cpp +++ b/scripts/eastern_kingdoms/stratholme/instance_stratholme.cpp @@ -69,14 +69,14 @@ void instance_stratholme::OnCreatureCreate(Creature* pCreature) break; case NPC_CRYSTAL: - m_luiCrystalGUIDs.push_back(pCreature->GetGUID()); + m_luiCrystalGUIDs.push_back(pCreature->GetObjectGuid()); break; case NPC_ABOM_BILE: case NPC_ABOM_VENOM: - m_sAbomnationGUID.insert(pCreature->GetGUID()); + m_sAbomnationGUID.insert(pCreature->GetObjectGuid()); break; case NPC_THUZADIN_ACOLYTE: - m_luiAcolyteGUIDs.push_back(pCreature->GetGUID()); + m_luiAcolyteGUIDs.push_back(pCreature->GetObjectGuid()); break; } } @@ -244,7 +244,7 @@ void instance_stratholme::SetData(uint32 uiType, uint32 uiData) float fX, fY, fZ; pBaron->GetRandomPoint(sStratholmeLocation[6].m_fX, sStratholmeLocation[6].m_fY, sStratholmeLocation[6].m_fZ, 5.0f, fX, fY, fZ); if (Creature* pTemp = pBaron->SummonCreature(NPC_BLACK_GUARD, sStratholmeLocation[6].m_fX, sStratholmeLocation[6].m_fY, sStratholmeLocation[6].m_fZ, sStratholmeLocation[6].m_fO, TEMPSUMMON_DEAD_DESPAWN, 0)) - m_luiGuardGUIDs.push_back(pTemp->GetGUID()); + m_luiGuardGUIDs.push_back(pTemp->GetObjectGuid()); } debug_log("SD2: Instance Stratholme - Slaugther event: Summoned 5 guards."); @@ -482,7 +482,7 @@ void instance_stratholme::DoSortZiggurats() { if ((*itr)->isAlive() && (*itr)->IsWithinDistInMap(pZigguratDoor, 35.0f, false)) { - m_zigguratStorage[i].m_lZigguratAcolyteGuid.push_back((*itr)->GetGUID()); + m_zigguratStorage[i].m_lZigguratAcolyteGuid.push_back((*itr)->GetObjectGuid()); itr = lAcolytes.erase(itr); bAlreadyIterated = true; break; @@ -496,7 +496,7 @@ void instance_stratholme::DoSortZiggurats() // In case some mobs have not been able to be sorted, store their GUIDs again for (std::list::const_iterator itr = lAcolytes.begin(); itr != lAcolytes.end(); ++itr) - m_luiAcolyteGUIDs.push_back((*itr)->GetGUID()); + m_luiAcolyteGUIDs.push_back((*itr)->GetObjectGuid()); // Sort Crystal for (GUIDList::iterator itr = m_luiCrystalGUIDs.begin(); itr != m_luiCrystalGUIDs.end(); ) @@ -596,7 +596,7 @@ void instance_stratholme::OnCreatureDeath(Creature* pCreature) break; case NPC_MINDLESS_UNDEAD: - m_luiUndeadGUIDs.remove(pCreature->GetGUID()); + m_luiUndeadGUIDs.remove(pCreature->GetObjectGuid()); if (m_luiUndeadGUIDs.empty()) { // Let the black Guards move out of the citadel @@ -613,7 +613,7 @@ void instance_stratholme::OnCreatureDeath(Creature* pCreature) } break; case NPC_BLACK_GUARD: - m_luiGuardGUIDs.remove(pCreature->GetGUID()); + m_luiGuardGUIDs.remove(pCreature->GetObjectGuid()); if (m_luiGuardGUIDs.empty()) SetData(TYPE_BLACK_GUARDS, DONE); @@ -628,7 +628,7 @@ void instance_stratholme::ThazudinAcolyteJustDied(Creature* pCreature) if (m_zigguratStorage[i].m_lZigguratAcolyteGuid.empty()) continue; // nothing to do anymore for this ziggurat - m_zigguratStorage[i].m_lZigguratAcolyteGuid.remove(pCreature->GetGUID()); + m_zigguratStorage[i].m_lZigguratAcolyteGuid.remove(pCreature->GetObjectGuid()); if (m_zigguratStorage[i].m_lZigguratAcolyteGuid.empty()) { // A random zone yell after one is cleared @@ -706,7 +706,7 @@ void instance_stratholme::Update(uint32 uiDiff) float fX, fY, fZ; pBaron->GetRandomPoint(sStratholmeLocation[5].m_fX, sStratholmeLocation[5].m_fY, sStratholmeLocation[5].m_fZ, 20.0f, fX, fY, fZ); pTemp->GetMotionMaster()->MovePoint(0, fX, fY, fZ); - m_luiUndeadGUIDs.push_back(pTemp->GetGUID()); + m_luiUndeadGUIDs.push_back(pTemp->GetObjectGuid()); ++m_uiMindlessCount; } } diff --git a/scripts/eastern_kingdoms/sunken_temple/instance_sunken_temple.cpp b/scripts/eastern_kingdoms/sunken_temple/instance_sunken_temple.cpp index 129744fa6..578990d66 100644 --- a/scripts/eastern_kingdoms/sunken_temple/instance_sunken_temple.cpp +++ b/scripts/eastern_kingdoms/sunken_temple/instance_sunken_temple.cpp @@ -55,16 +55,16 @@ void instance_sunken_temple::OnObjectCreate(GameObject* pGo) break; case GO_ATALAI_LIGHT_BIG: - m_luiBigLightGUIDs.push_back(pGo->GetGUID()); + m_luiBigLightGUIDs.push_back(pGo->GetObjectGuid()); return; case GO_EVIL_CIRCLE: - m_vuiCircleGUIDs.push_back(pGo->GetGUID()); + m_vuiCircleGUIDs.push_back(pGo->GetObjectGuid()); return; case GO_ETERNAL_FLAME_1: case GO_ETERNAL_FLAME_2: case GO_ETERNAL_FLAME_3: case GO_ETERNAL_FLAME_4: - m_luiFlameGUIDs.push_back(pGo->GetGUID()); + m_luiFlameGUIDs.push_back(pGo->GetObjectGuid()); return; default: diff --git a/scripts/eastern_kingdoms/sunken_temple/sunken_temple.cpp b/scripts/eastern_kingdoms/sunken_temple/sunken_temple.cpp index b22990cc5..16b5c5904 100644 --- a/scripts/eastern_kingdoms/sunken_temple/sunken_temple.cpp +++ b/scripts/eastern_kingdoms/sunken_temple/sunken_temple.cpp @@ -158,7 +158,7 @@ bool ProcessEventId_event_antalarion_statue_activation(uint32 uiEventId, Object* { // Activate the green light if the correct statue is activated if (GameObject* pLight = GetClosestGameObjectWithEntry((GameObject*)pTarget, GO_ATALAI_LIGHT, INTERACTION_DISTANCE)) - pInstance->DoRespawnGameObject(pLight->GetGUID(), 30 * MINUTE); + pInstance->DoRespawnGameObject(pLight->GetObjectGuid(), 30 * MINUTE); } else { diff --git a/scripts/eastern_kingdoms/sunwell_plateau/instance_sunwell_plateau.cpp b/scripts/eastern_kingdoms/sunwell_plateau/instance_sunwell_plateau.cpp index d73527825..b0c725364 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/instance_sunwell_plateau.cpp +++ b/scripts/eastern_kingdoms/sunwell_plateau/instance_sunwell_plateau.cpp @@ -229,7 +229,7 @@ void instance_sunwell_plateau::EjectPlayers() if (plr && !plr->HasAura(SPELL_SPECTRAL_REALM)) { - SpectralRealmList.remove(plr->GetGUID()); + SpectralRealmList.remove(plr->GetObjectGuid()); EjectPlayer(plr); } } diff --git a/scripts/eastern_kingdoms/uldaman/instance_uldaman.cpp b/scripts/eastern_kingdoms/uldaman/instance_uldaman.cpp index 5ea1fa819..5b6876e08 100644 --- a/scripts/eastern_kingdoms/uldaman/instance_uldaman.cpp +++ b/scripts/eastern_kingdoms/uldaman/instance_uldaman.cpp @@ -67,7 +67,7 @@ void instance_uldaman::OnCreatureCreate(Creature* pCreature) case NPC_CUSTODIAN: case NPC_GUARDIAN: case NPC_VAULT_WARDER: - m_lWardens.push_back(pCreature->GetGUID()); + m_lWardens.push_back(pCreature->GetObjectGuid()); pCreature->CastSpell(pCreature, SPELL_STONED, true); pCreature->SetNoCallAssistance(true); // no assistance break; diff --git a/scripts/eastern_kingdoms/zulaman/boss_janalai.cpp b/scripts/eastern_kingdoms/zulaman/boss_janalai.cpp index b561d85a7..e7689bc18 100644 --- a/scripts/eastern_kingdoms/zulaman/boss_janalai.cpp +++ b/scripts/eastern_kingdoms/zulaman/boss_janalai.cpp @@ -245,7 +245,7 @@ struct MANGOS_DLL_DECL boss_janalaiAI : public ScriptedAI if (m_bIsBombing) { //store bombs in list to be used in BlowUpBombs() - m_lBombsGUIDList.push_back(pSummoned->GetGUID()); + m_lBombsGUIDList.push_back(pSummoned->GetObjectGuid()); if (pSummoned->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE)) pSummoned->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); diff --git a/scripts/eastern_kingdoms/zulaman/instance_zulaman.cpp b/scripts/eastern_kingdoms/zulaman/instance_zulaman.cpp index bed14fe6a..24e80b21b 100644 --- a/scripts/eastern_kingdoms/zulaman/instance_zulaman.cpp +++ b/scripts/eastern_kingdoms/zulaman/instance_zulaman.cpp @@ -71,7 +71,7 @@ void instance_zulaman::OnCreatureCreate(Creature* pCreature) case NPC_EGG: if (m_auiEncounter[3] != DONE) - m_lEggsGUIDList.push_back(pCreature->GetGUID()); + m_lEggsGUIDList.push_back(pCreature->GetObjectGuid()); break; } } diff --git a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/instance_culling_of_stratholme.cpp b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/instance_culling_of_stratholme.cpp index bd463562c..b4c0e51a5 100644 --- a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/instance_culling_of_stratholme.cpp +++ b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/instance_culling_of_stratholme.cpp @@ -89,18 +89,18 @@ void instance_culling_of_stratholme::OnCreatureCreate(Creature* pCreature) m_mNpcEntryGuidStore[pCreature->GetEntry()] = pCreature->GetObjectGuid(); break; - case NPC_CRATES_BUNNY: m_luiCratesBunnyGUIDs.push_back(pCreature->GetGUID()); break; - case NPC_LORDAERON_FOOTMAN: m_luiFootmanGUIDs.push_back(pCreature->GetGUID()); break; + case NPC_CRATES_BUNNY: m_luiCratesBunnyGUIDs.push_back(pCreature->GetObjectGuid()); break; + case NPC_LORDAERON_FOOTMAN: m_luiFootmanGUIDs.push_back(pCreature->GetObjectGuid()); break; case NPC_STRATHOLME_CITIZEN: case NPC_STRATHOLME_RESIDENT: if (m_auiEncounter[TYPE_ARTHAS_INTRO_EVENT] == DONE) pCreature->UpdateEntry(NPC_ZOMBIE); else - m_luiResidentGUIDs.push_back(pCreature->GetGUID()); + m_luiResidentGUIDs.push_back(pCreature->GetObjectGuid()); break; - case NPC_AGIATED_STRATHOLME_CITIZEN: m_lAgiatedCitizenGUIDList.push_back(pCreature->GetGUID()); break; - case NPC_AGIATED_STRATHOLME_RESIDENT: m_lAgiatedResidentGUIDList.push_back(pCreature->GetGUID()); break; + case NPC_AGIATED_STRATHOLME_CITIZEN: m_lAgiatedCitizenGUIDList.push_back(pCreature->GetObjectGuid()); break; + case NPC_AGIATED_STRATHOLME_RESIDENT: m_lAgiatedResidentGUIDList.push_back(pCreature->GetObjectGuid()); break; } } diff --git a/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.cpp b/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.cpp index 33fc48b1c..5fc80bc11 100644 --- a/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.cpp +++ b/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.cpp @@ -233,7 +233,7 @@ void hyjalAI::JustSummoned(Creature* pSummoned) m_uiCheckTimer = 5000; } else - lWaveMobGUIDList.push_back(pSummoned->GetGUID()); + lWaveMobGUIDList.push_back(pSummoned->GetObjectGuid()); } void hyjalAI::SummonNextWave() diff --git a/scripts/kalimdor/caverns_of_time/hyjal/instance_hyjal.cpp b/scripts/kalimdor/caverns_of_time/hyjal/instance_hyjal.cpp index ecd83b70e..257d19aa8 100644 --- a/scripts/kalimdor/caverns_of_time/hyjal/instance_hyjal.cpp +++ b/scripts/kalimdor/caverns_of_time/hyjal/instance_hyjal.cpp @@ -60,7 +60,7 @@ void instance_mount_hyjal::OnCreatureCreate(Creature* pCreature) void instance_mount_hyjal::OnObjectCreate(GameObject* pGo) { if (pGo->GetEntry() == GO_ANCIENT_GEM) - lAncientGemGUIDList.push_back(pGo->GetGUID()); + lAncientGemGUIDList.push_back(pGo->GetObjectGuid()); } void instance_mount_hyjal::OnCreatureEnterCombat(Creature* pCreature) diff --git a/scripts/kalimdor/dire_maul/instance_dire_maul.cpp b/scripts/kalimdor/dire_maul/instance_dire_maul.cpp index 1f4997db8..23e48cbbd 100644 --- a/scripts/kalimdor/dire_maul/instance_dire_maul.cpp +++ b/scripts/kalimdor/dire_maul/instance_dire_maul.cpp @@ -50,12 +50,12 @@ void instance_dire_maul::OnCreatureCreate(Creature* pCreature) break; case NPC_ARCANE_ABERRATION: case NPC_MANA_REMNANT: - m_lGeneratorGuardGUIDs.push_back(pCreature->GetGUID()); + m_lGeneratorGuardGUIDs.push_back(pCreature->GetObjectGuid()); return; case NPC_IMMOLTHAR: break; case NPC_HIGHBORNE_SUMMONER: - m_luiHighborneSummonerGUIDs.push_back(pCreature->GetGUID()); + m_luiHighborneSummonerGUIDs.push_back(pCreature->GetObjectGuid()); return; // North @@ -88,7 +88,7 @@ void instance_dire_maul::OnObjectCreate(GameObject* pGo) pGo->SetGoState(GO_STATE_ACTIVE); break; case GO_FELVINE_SHARD: - m_lFelvineShardGUIDs.push_back(pGo->GetGUID()); + m_lFelvineShardGUIDs.push_back(pGo->GetObjectGuid()); break; // West diff --git a/scripts/kalimdor/temple_of_ahnqiraj/mob_anubisath_sentinel.cpp b/scripts/kalimdor/temple_of_ahnqiraj/mob_anubisath_sentinel.cpp index fe14c0294..ffc2e40b8 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/mob_anubisath_sentinel.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/mob_anubisath_sentinel.cpp @@ -65,7 +65,7 @@ struct MANGOS_DLL_DECL npc_anubisath_sentinelAI : public ScriptedAI { for(GUIDList::const_iterator itr = m_lAssistList.begin(); itr != m_lAssistList.end(); ++itr) { - if (*itr == m_creature->GetGUID()) + if (*itr == m_creature->GetObjectGuid()) continue; if (Creature* pBuddy = m_creature->GetMap()->GetCreature(*itr)) @@ -112,7 +112,7 @@ struct MANGOS_DLL_DECL npc_anubisath_sentinelAI : public ScriptedAI { if (Creature* pBuddy = m_creature->GetMap()->GetCreature(*itr)) { - if (*itr == m_creature->GetGUID()) + if (*itr == m_creature->GetObjectGuid()) continue; if (!pBuddy->isAlive()) @@ -130,7 +130,7 @@ struct MANGOS_DLL_DECL npc_anubisath_sentinelAI : public ScriptedAI { for(GUIDList::const_iterator itr = m_lAssistList.begin(); itr != m_lAssistList.end(); ++itr) { - if (*itr == m_creature->GetGUID()) + if (*itr == m_creature->GetObjectGuid()) continue; if (Creature* pBuddy = m_creature->GetMap()->GetCreature(*itr)) @@ -151,9 +151,9 @@ struct MANGOS_DLL_DECL npc_anubisath_sentinelAI : public ScriptedAI for(std::list::iterator iter = lAssistList.begin(); iter != lAssistList.end(); ++iter) { - m_lAssistList.push_back((*iter)->GetGUID()); + m_lAssistList.push_back((*iter)->GetObjectGuid()); - if ((*iter)->GetGUID() == m_creature->GetGUID()) + if ((*iter)->GetObjectGuid() == m_creature->GetObjectGuid()) continue; (*iter)->AI()->AttackStart(pTarget); diff --git a/scripts/northrend/gundrak/instance_gundrak.cpp b/scripts/northrend/gundrak/instance_gundrak.cpp index 18bc21fec..1f2e93d8a 100644 --- a/scripts/northrend/gundrak/instance_gundrak.cpp +++ b/scripts/northrend/gundrak/instance_gundrak.cpp @@ -66,7 +66,7 @@ void instance_gundrak::OnCreatureCreate(Creature* pCreature) break; case NPC_INVISIBLE_STALKER: - m_luiStalkerGUIDs.push_back(pCreature->GetGUID()); + m_luiStalkerGUIDs.push_back(pCreature->GetObjectGuid()); break; } } @@ -266,9 +266,9 @@ void instance_gundrak::DoAltarVisualEffect(uint8 uiType) lStalkerCasters.sort(sortFromEastToWest); for (std::list::const_iterator itr = lStalkerTargets.begin(); itr != lStalkerTargets.end(); ++itr) - m_vStalkerTargetGuids.push_back((*itr)->GetGUID()); + m_vStalkerTargetGuids.push_back((*itr)->GetObjectGuid()); for (std::list::const_iterator itr = lStalkerCasters.begin(); itr != lStalkerCasters.end(); ++itr) - m_vStalkerCasterGuids.push_back((*itr)->GetGUID()); + m_vStalkerCasterGuids.push_back((*itr)->GetObjectGuid()); } // Verify that the DB has enough trigger spawned diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/instance_forge_of_souls.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/instance_forge_of_souls.cpp index d53152017..65109997f 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/instance_forge_of_souls.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/instance_forge_of_souls.cpp @@ -45,7 +45,7 @@ void instance_forge_of_souls::OnCreatureCreate(Creature* pCreature) break; case NPC_CORRUPTED_SOUL_FRAGMENT: - m_luiSoulFragmentAliveGUIDs.push_back(pCreature->GetGUID()); + m_luiSoulFragmentAliveGUIDs.push_back(pCreature->GetObjectGuid()); break; } } @@ -71,7 +71,7 @@ void instance_forge_of_souls::ProcessEventNpcs(Player* pPlayer, bool bChanged) { if (Creature* pSummon = pPlayer->SummonCreature(m_uiTeam == HORDE ? aEventBeginLocations[i].uiEntryHorde : aEventBeginLocations[i].uiEntryAlliance, aEventBeginLocations[i].fSpawnX, aEventBeginLocations[i].fSpawnY, aEventBeginLocations[i].fSpawnZ, aEventBeginLocations[i].fSpawnO, TEMPSUMMON_DEAD_DESPAWN, 24*HOUR*IN_MILLISECONDS)) - m_lEventMobGUIDs.push_back(pSummon->GetGUID()); + m_lEventMobGUIDs.push_back(pSummon->GetObjectGuid()); } } else diff --git a/scripts/northrend/naxxramas/boss_kelthuzad.cpp b/scripts/northrend/naxxramas/boss_kelthuzad.cpp index 93b15de0f..1a746a154 100644 --- a/scripts/northrend/naxxramas/boss_kelthuzad.cpp +++ b/scripts/northrend/naxxramas/boss_kelthuzad.cpp @@ -314,7 +314,7 @@ struct MANGOS_DLL_DECL boss_kelthuzadAI : public ScriptedAI { DoScriptText(EMOTE_GUARDIAN, m_creature); - m_lAddsSet.insert(pSummoned->GetGUID()); + m_lAddsSet.insert(pSummoned->GetObjectGuid()); ++m_uiGuardiansCount; pSummoned->SetInCombatWithZone(); @@ -325,10 +325,10 @@ struct MANGOS_DLL_DECL boss_kelthuzadAI : public ScriptedAI case NPC_SOUL_WEAVER: { if (m_uiIntroPackCount < 7) - m_lIntroMobsSet.insert(pSummoned->GetGUID()); + m_lIntroMobsSet.insert(pSummoned->GetObjectGuid()); else { - m_lAddsSet.insert(pSummoned->GetGUID()); + m_lAddsSet.insert(pSummoned->GetObjectGuid()); if (m_pInstance) { @@ -350,10 +350,10 @@ struct MANGOS_DLL_DECL boss_kelthuzadAI : public ScriptedAI case NPC_GUARDIAN: case NPC_SOLDIER_FROZEN: case NPC_SOUL_WEAVER: - m_lAddsSet.erase(pSummoned->GetGUID()); + m_lAddsSet.erase(pSummoned->GetObjectGuid()); break; case NPC_UNSTOPPABLE_ABOM: - m_lAddsSet.erase(pSummoned->GetGUID()); + m_lAddsSet.erase(pSummoned->GetObjectGuid()); ++m_uiKilledAbomination; if (m_uiKilledAbomination >= ACHIEV_REQ_KILLED_ABOMINATIONS) diff --git a/scripts/northrend/naxxramas/instance_naxxramas.cpp b/scripts/northrend/naxxramas/instance_naxxramas.cpp index 3f84aa777..bd7800b86 100644 --- a/scripts/northrend/naxxramas/instance_naxxramas.cpp +++ b/scripts/northrend/naxxramas/instance_naxxramas.cpp @@ -58,12 +58,12 @@ void instance_naxxramas::OnCreatureCreate(Creature* pCreature) m_mNpcEntryGuidStore[pCreature->GetEntry()] = pCreature->GetObjectGuid(); break; - case NPC_SUB_BOSS_TRIGGER: m_lGothTriggerList.push_back(pCreature->GetGUID()); break; - case NPC_TESLA_COIL: m_lThadTeslaCoilList.push_back(pCreature->GetGUID()); break; + case NPC_SUB_BOSS_TRIGGER: m_lGothTriggerList.push_back(pCreature->GetObjectGuid()); break; + case NPC_TESLA_COIL: m_lThadTeslaCoilList.push_back(pCreature->GetObjectGuid()); break; case NPC_NAXXRAMAS_FOLLOWER: case NPC_NAXXRAMAS_WORSHIPPER: - m_lFaerlinaAddGUIDs.push_back(pCreature->GetGUID()); + m_lFaerlinaAddGUIDs.push_back(pCreature->GetObjectGuid()); break; } } diff --git a/scripts/northrend/ulduar/halls_of_lightning/boss_ionar.cpp b/scripts/northrend/ulduar/halls_of_lightning/boss_ionar.cpp index b37623c0a..99f86ce2d 100644 --- a/scripts/northrend/ulduar/halls_of_lightning/boss_ionar.cpp +++ b/scripts/northrend/ulduar/halls_of_lightning/boss_ionar.cpp @@ -210,7 +210,7 @@ struct MANGOS_DLL_DECL boss_ionarAI : public ScriptedAI if (m_creature->getVictim()) pSummoned->AI()->AttackStart(pTarget ? pTarget : m_creature->getVictim()); - m_lSparkGUIDList.push_back(pSummoned->GetGUID()); + m_lSparkGUIDList.push_back(pSummoned->GetObjectGuid()); } } diff --git a/scripts/northrend/ulduar/halls_of_lightning/boss_volkhan.cpp b/scripts/northrend/ulduar/halls_of_lightning/boss_volkhan.cpp index c1a0bb821..185afe305 100644 --- a/scripts/northrend/ulduar/halls_of_lightning/boss_volkhan.cpp +++ b/scripts/northrend/ulduar/halls_of_lightning/boss_volkhan.cpp @@ -196,7 +196,7 @@ struct MANGOS_DLL_DECL boss_volkhanAI : public ScriptedAI { if (pSummoned->GetEntry() == NPC_MOLTEN_GOLEM) { - m_lGolemGUIDList.push_back(pSummoned->GetGUID()); + m_lGolemGUIDList.push_back(pSummoned->GetObjectGuid()); if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) pSummoned->AI()->AttackStart(pTarget); diff --git a/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.cpp b/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.cpp index c8ef2eff1..f96e4f074 100644 --- a/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.cpp +++ b/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.cpp @@ -269,7 +269,7 @@ struct MANGOS_DLL_DECL npc_brann_hosAI : public npc_escortAI void JustSummoned(Creature* pSummoned) { - m_luiDwarfGUIDs.push_back(pSummoned->GetGUID()); + m_luiDwarfGUIDs.push_back(pSummoned->GetObjectGuid()); pSummoned->AI()->AttackStart(m_creature); } diff --git a/scripts/northrend/ulduar/halls_of_stone/instance_halls_of_stone.cpp b/scripts/northrend/ulduar/halls_of_stone/instance_halls_of_stone.cpp index 8ea90f585..59c9ee8cb 100644 --- a/scripts/northrend/ulduar/halls_of_stone/instance_halls_of_stone.cpp +++ b/scripts/northrend/ulduar/halls_of_stone/instance_halls_of_stone.cpp @@ -57,11 +57,11 @@ void instance_halls_of_stone::OnCreatureCreate(Creature* pCreature) { switch(pCreature->GetEntry()) { - case NPC_KADDRAK: m_lKaddrakGUIDs.push_back(pCreature->GetGUID()); break; - case NPC_ABEDNEUM: m_lAbedneumGUIDs.push_back(pCreature->GetGUID()); break; - case NPC_MARNAK: m_lMarnakGUIDs.push_back(pCreature->GetGUID()); break; - case NPC_TRIBUNAL_OF_AGES: m_lTribunalGUIDs.push_back(pCreature->GetGUID()); break; - case NPC_WORLDTRIGGER: m_lWorldtriggerGUIDs.push_back(pCreature->GetGUID()); break; + case NPC_KADDRAK: m_lKaddrakGUIDs.push_back(pCreature->GetObjectGuid()); break; + case NPC_ABEDNEUM: m_lAbedneumGUIDs.push_back(pCreature->GetObjectGuid()); break; + case NPC_MARNAK: m_lMarnakGUIDs.push_back(pCreature->GetObjectGuid()); break; + case NPC_TRIBUNAL_OF_AGES: m_lTribunalGUIDs.push_back(pCreature->GetObjectGuid()); break; + case NPC_WORLDTRIGGER: m_lWorldtriggerGUIDs.push_back(pCreature->GetObjectGuid()); break; } } diff --git a/scripts/northrend/violet_hold/instance_violet_hold.cpp b/scripts/northrend/violet_hold/instance_violet_hold.cpp index 672ed2507..945400a18 100644 --- a/scripts/northrend/violet_hold/instance_violet_hold.cpp +++ b/scripts/northrend/violet_hold/instance_violet_hold.cpp @@ -93,10 +93,10 @@ void instance_violet_hold::OnCreatureCreate(Creature* pCreature) break; case NPC_PORTAL_INTRO: - m_lIntroPortalList.push_back(pCreature->GetGUID()); + m_lIntroPortalList.push_back(pCreature->GetObjectGuid()); return; case NPC_HOLD_GUARD: - m_lGuardsList.push_back(pCreature->GetGUID()); + m_lGuardsList.push_back(pCreature->GetObjectGuid()); return; case NPC_ARAKKOA: diff --git a/scripts/northrend/violet_hold/violet_hold.cpp b/scripts/northrend/violet_hold/violet_hold.cpp index ffbf007e7..eb275c13c 100644 --- a/scripts/northrend/violet_hold/violet_hold.cpp +++ b/scripts/northrend/violet_hold/violet_hold.cpp @@ -264,12 +264,12 @@ struct MANGOS_DLL_DECL npc_teleportation_portalAI : public ScriptedAI break; case NPC_AZURE_CAPTAIN: DoScriptText(EMOTE_DRAGONFLIGHT_PORTAL, pSummoned); - m_lMobSet.insert(pSummoned->GetGUID()); + m_lMobSet.insert(pSummoned->GetObjectGuid()); break; case NPC_AZURE_RAIDER: case NPC_AZURE_SORCEROR: case NPC_AZURE_STALKER: - m_lMobSet.insert(pSummoned->GetGUID()); + m_lMobSet.insert(pSummoned->GetObjectGuid()); return; case NPC_AZURE_SABOTEUR: { @@ -327,7 +327,7 @@ struct MANGOS_DLL_DECL npc_teleportation_portalAI : public ScriptedAI case NPC_AZURE_SORCEROR: case NPC_AZURE_STALKER: { - m_lMobSet.erase(pSummoned->GetGUID()); + m_lMobSet.erase(pSummoned->GetObjectGuid()); if (!m_lMobSet.empty()) return; diff --git a/scripts/outland/black_temple/boss_illidan.cpp b/scripts/outland/black_temple/boss_illidan.cpp index 3dc5fc348..e3a34c48f 100644 --- a/scripts/outland/black_temple/boss_illidan.cpp +++ b/scripts/outland/black_temple/boss_illidan.cpp @@ -543,7 +543,7 @@ struct MANGOS_DLL_DECL npc_akama_illidanAI : public ScriptedAI if (Spirit) { Spirit->SetVisibility(VISIBILITY_OFF); - m_aSpiritGuids[i] = Spirit->GetGUID(); + m_aSpiritGuids[i] = Spirit->GetObjectGuid(); } } diff --git a/scripts/outland/black_temple/boss_shade_of_akama.cpp b/scripts/outland/black_temple/boss_shade_of_akama.cpp index 1fd55342b..b566f8253 100644 --- a/scripts/outland/black_temple/boss_shade_of_akama.cpp +++ b/scripts/outland/black_temple/boss_shade_of_akama.cpp @@ -191,7 +191,7 @@ struct MANGOS_DLL_DECL boss_shade_of_akamaAI : public ScriptedAI if (m_lSorcerersGUIDList.empty()) error_log("SD2: boss_shade_of_akamaAI attempt to remove guid %s from Sorcerers list but list is already empty", uiGuid.GetString().c_str()); else - m_lSorcerersGUIDList.remove(uiGuid.GetRawValue()); + m_lSorcerersGUIDList.remove(uiGuid); } } @@ -210,7 +210,7 @@ struct MANGOS_DLL_DECL boss_shade_of_akamaAI : public ScriptedAI pSorcerer->GetMotionMaster()->MovePoint(0, m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ()); pSorcerer->SetTargetGuid(m_creature->GetObjectGuid()); - m_lSorcerersGUIDList.push_back(pSorcerer->GetGUID()); + m_lSorcerersGUIDList.push_back(pSorcerer->GetObjectGuid()); --m_uiDeathCount; ++m_uiSorcererCount; @@ -279,7 +279,7 @@ struct MANGOS_DLL_DECL boss_shade_of_akamaAI : public ScriptedAI for(std::list::iterator itr = lChannelerList.begin(); itr != lChannelerList.end(); ++itr) { - m_lChannelersGUIDList.push_back((*itr)->GetGUID()); + m_lChannelersGUIDList.push_back((*itr)->GetObjectGuid()); debug_log("SD2: boss_shade_of_akamaAI found channeler %s. Adding to list", (*itr)->GetObjectGuid().GetString().c_str()); (*itr)->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); @@ -583,7 +583,7 @@ struct MANGOS_DLL_DECL npc_akamaAI : public ScriptedAI pBroken->GetMotionMaster()->MovePoint(0, wx, wy, wz); pBroken->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - m_lBrokenGUIDList.push_back(pBroken->GetGUID()); + m_lBrokenGUIDList.push_back(pBroken->GetObjectGuid()); } } diff --git a/scripts/outland/black_temple/boss_teron_gorefiend.cpp b/scripts/outland/black_temple/boss_teron_gorefiend.cpp index 6f15b5f5a..9eff35e52 100644 --- a/scripts/outland/black_temple/boss_teron_gorefiend.cpp +++ b/scripts/outland/black_temple/boss_teron_gorefiend.cpp @@ -141,7 +141,7 @@ struct MANGOS_DLL_DECL mob_shadowy_constructAI : public ScriptedAI /* Comment it out for now. NOTE TO FUTURE DEV: UNCOMMENT THIS OUT ONLY AFTER MIND CONTROL IS IMPLEMENTED void DamageTaken(Unit* done_by, uint32 &damage) { - if (done_by->GetGUID() != m_ghostGuid) + if (done_by->GetObjectGuid() != m_ghostGuid) damage = 0; // Only the ghost can deal damage. } */ diff --git a/scripts/outland/hellfire_citadel/blood_furnace/instance_blood_furnace.cpp b/scripts/outland/hellfire_citadel/blood_furnace/instance_blood_furnace.cpp index 7ef0cefb9..8ce38b61a 100644 --- a/scripts/outland/hellfire_citadel/blood_furnace/instance_blood_furnace.cpp +++ b/scripts/outland/hellfire_citadel/blood_furnace/instance_blood_furnace.cpp @@ -45,7 +45,7 @@ void instance_blood_furnace::OnCreatureCreate(Creature* pCreature) break; case NPC_NASCENT_FEL_ORC: - m_luiNascentOrcGUIDs.push_back(pCreature->GetGUID()); + m_luiNascentOrcGUIDs.push_back(pCreature->GetObjectGuid()); break; } } @@ -231,7 +231,7 @@ void instance_blood_furnace::OnCreatureEvade(Creature* pCreature) { for (uint8 i = 0; i < m_uiBroggokEventPhase; ++i) { - if (m_aBroggokEvent[i].m_sSortedOrcGuids.find(pCreature->GetGUID()) != m_aBroggokEvent[i].m_sSortedOrcGuids.end()) + if (m_aBroggokEvent[i].m_sSortedOrcGuids.find(pCreature->GetObjectGuid()) != m_aBroggokEvent[i].m_sSortedOrcGuids.end()) SetData(TYPE_BROGGOK_EVENT, FAIL); } } @@ -254,7 +254,7 @@ void instance_blood_furnace::OnCreatureDeath(Creature* pCreature) } // Increase kill counter, if we found a mob of this cell - if (m_aBroggokEvent[i].m_sSortedOrcGuids.find(pCreature->GetGUID()) != m_aBroggokEvent[i].m_sSortedOrcGuids.end()) + if (m_aBroggokEvent[i].m_sSortedOrcGuids.find(pCreature->GetObjectGuid()) != m_aBroggokEvent[i].m_sSortedOrcGuids.end()) m_aBroggokEvent[i].m_uiKilledOrcCount++; if (m_aBroggokEvent[i].m_sSortedOrcGuids.size() == m_aBroggokEvent[i].m_uiKilledOrcCount) @@ -320,7 +320,7 @@ void instance_blood_furnace::DoSortBroggokOrcs() { if (pOrc->IsWithinDistInMap(pDoor, 15.0f)) { - m_aBroggokEvent[i].m_sSortedOrcGuids.insert(pOrc->GetGUID()); + m_aBroggokEvent[i].m_sSortedOrcGuids.insert(pOrc->GetObjectGuid()); if (!pOrc->isAlive()) pOrc->Respawn(); break; diff --git a/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_nazan_and_vazruden.cpp b/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_nazan_and_vazruden.cpp index 3e7ebc8b3..e2b7de238 100644 --- a/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_nazan_and_vazruden.cpp +++ b/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_nazan_and_vazruden.cpp @@ -333,7 +333,7 @@ struct MANGOS_DLL_DECL boss_vazruden_heraldAI : public ScriptedAI if (Creature* pVazruden = m_creature->GetMap()->GetCreature(m_vazrudenGuid)) { if (Unit* pEnemy = pVazruden->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) - DoCastSpellIfCan(pEnemy, m_bIsRegularMode ? SPELL_FIREBALL : SPELL_FIREBALL_H, 0, pVazruden->GetGUID()); + DoCastSpellIfCan(pEnemy, m_bIsRegularMode ? SPELL_FIREBALL : SPELL_FIREBALL_H, 0, pVazruden->GetObjectGuid()); } m_uiFireballTimer = urand(4000, 8000); } diff --git a/scripts/outland/hellfire_citadel/hellfire_ramparts/instance_hellfire_ramparts.cpp b/scripts/outland/hellfire_citadel/hellfire_ramparts/instance_hellfire_ramparts.cpp index 533868748..28f1b6d76 100644 --- a/scripts/outland/hellfire_citadel/hellfire_ramparts/instance_hellfire_ramparts.cpp +++ b/scripts/outland/hellfire_citadel/hellfire_ramparts/instance_hellfire_ramparts.cpp @@ -44,7 +44,7 @@ void instance_ramparts::OnCreatureCreate(Creature* pCreature) m_mNpcEntryGuidStore[pCreature->GetEntry()] = pCreature->GetObjectGuid(); break; case NPC_HELLFIRE_SENTRY: - m_lSentryGUIDs.push_back(pCreature->GetGUID()); + m_lSentryGUIDs.push_back(pCreature->GetObjectGuid()); break; } } diff --git a/scripts/outland/hellfire_citadel/magtheridons_lair/instance_magtheridons_lair.cpp b/scripts/outland/hellfire_citadel/magtheridons_lair/instance_magtheridons_lair.cpp index fa02457cb..64df70c97 100644 --- a/scripts/outland/hellfire_citadel/magtheridons_lair/instance_magtheridons_lair.cpp +++ b/scripts/outland/hellfire_citadel/magtheridons_lair/instance_magtheridons_lair.cpp @@ -51,7 +51,7 @@ void instance_magtheridons_lair::OnCreatureCreate(Creature* pCreature) m_mNpcEntryGuidStore[NPC_MAGTHERIDON] = pCreature->GetObjectGuid(); break; case NPC_CHANNELER: - m_sChannelerGuid.insert(pCreature->GetGUID()); + m_sChannelerGuid.insert(pCreature->GetObjectGuid()); break; } } @@ -73,7 +73,7 @@ void instance_magtheridons_lair::OnObjectCreate(GameObject* pGo) case GO_MAGTHERIDON_COLUMN_005: case GO_MAGTHERIDON_COLUMN_000: case GO_MAGTHERIDON_COLUMN_001: - m_sColumnGuid.insert(pGo->GetGUID()); + m_sColumnGuid.insert(pGo->GetObjectGuid()); break; } } diff --git a/scripts/outland/hellfire_citadel/shattered_halls/boss_warchief_kargath_bladefist.cpp b/scripts/outland/hellfire_citadel/shattered_halls/boss_warchief_kargath_bladefist.cpp index d9debc1a7..188222d07 100644 --- a/scripts/outland/hellfire_citadel/shattered_halls/boss_warchief_kargath_bladefist.cpp +++ b/scripts/outland/hellfire_citadel/shattered_halls/boss_warchief_kargath_bladefist.cpp @@ -113,10 +113,10 @@ struct MANGOS_DLL_DECL boss_warchief_kargath_bladefistAI : public ScriptedAI if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) summoned->AI()->AttackStart(pTarget); - adds.push_back(summoned->GetGUID()); + adds.push_back(summoned->GetObjectGuid()); break; case MOB_SHATTERED_ASSASSIN: - assassins.push_back(summoned->GetGUID()); + assassins.push_back(summoned->GetObjectGuid()); break; } } diff --git a/scripts/outland/tempest_keep/botanica/boss_high_botanist_freywinn.cpp b/scripts/outland/tempest_keep/botanica/boss_high_botanist_freywinn.cpp index b68213780..330ff068c 100644 --- a/scripts/outland/tempest_keep/botanica/boss_high_botanist_freywinn.cpp +++ b/scripts/outland/tempest_keep/botanica/boss_high_botanist_freywinn.cpp @@ -72,7 +72,7 @@ struct MANGOS_DLL_DECL boss_high_botanist_freywinnAI : public ScriptedAI void JustSummoned(Creature *summoned) { if (summoned->GetEntry() == ENTRY_FRAYER) - Adds_List.push_back(summoned->GetGUID()); + Adds_List.push_back(summoned->GetObjectGuid()); } void DoSummonSeedling() diff --git a/scripts/world/npcs_special.cpp b/scripts/world/npcs_special.cpp index d0a73da6b..12581ba93 100644 --- a/scripts/world/npcs_special.cpp +++ b/scripts/world/npcs_special.cpp @@ -759,7 +759,7 @@ void npc_doctorAI::UpdateAI(const uint32 diff) //303, this flag appear to be required for client side item->spell to work (TARGET_SINGLE_FRIEND) Patient->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PVP_ATTACKABLE); - Patients.push_back(Patient->GetGUID()); + Patients.push_back(Patient->GetObjectGuid()); npc_injured_patientAI* pPatientAI = dynamic_cast(Patient->AI()); diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index c5eae96d2..f9f9d74f5 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2214" + #define SD2_REVISION_NR "2215" #endif // __SD2_REVISION_NR_H__ From d9eb4e62b3ba867f6355ffd1abe4d2744f19874c Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Tue, 7 Jun 2011 00:59:02 +0200 Subject: [PATCH 0196/1172] [2216] Fix a possible crash related to Broggok event --- .../outland/hellfire_citadel/blood_furnace/blood_furnace.h | 2 +- .../hellfire_citadel/blood_furnace/instance_blood_furnace.cpp | 4 ++-- sd2_revision_nr.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/outland/hellfire_citadel/blood_furnace/blood_furnace.h b/scripts/outland/hellfire_citadel/blood_furnace/blood_furnace.h index 9e9209936..690ccd70b 100644 --- a/scripts/outland/hellfire_citadel/blood_furnace/blood_furnace.h +++ b/scripts/outland/hellfire_citadel/blood_furnace/blood_furnace.h @@ -82,7 +82,7 @@ class MANGOS_DLL_DECL instance_blood_furnace : public ScriptedInstance BroggokEventInfo m_aBroggokEvent[MAX_ORC_WAVES]; uint32 m_uiBroggokEventTimer; // Timer for opening the event cages; only on heroic mode = 30 secs - uint8 m_uiBroggokEventPhase; + uint32 m_uiBroggokEventPhase; GUIDList m_luiNascentOrcGUIDs; }; diff --git a/scripts/outland/hellfire_citadel/blood_furnace/instance_blood_furnace.cpp b/scripts/outland/hellfire_citadel/blood_furnace/instance_blood_furnace.cpp index 8ce38b61a..1f96f7c37 100644 --- a/scripts/outland/hellfire_citadel/blood_furnace/instance_blood_furnace.cpp +++ b/scripts/outland/hellfire_citadel/blood_furnace/instance_blood_furnace.cpp @@ -229,7 +229,7 @@ void instance_blood_furnace::OnCreatureEvade(Creature* pCreature) else if (pCreature->GetEntry() == NPC_NASCENT_FEL_ORC) { - for (uint8 i = 0; i < m_uiBroggokEventPhase; ++i) + for (uint8 i = 0; i < std::min(m_uiBroggokEventPhase, MAX_ORC_WAVES); ++i) { if (m_aBroggokEvent[i].m_sSortedOrcGuids.find(pCreature->GetObjectGuid()) != m_aBroggokEvent[i].m_sSortedOrcGuids.end()) SetData(TYPE_BROGGOK_EVENT, FAIL); @@ -245,7 +245,7 @@ void instance_blood_furnace::OnCreatureDeath(Creature* pCreature) if (pCreature->GetEntry() == NPC_NASCENT_FEL_ORC) { uint8 uiClearedCells = 0; - for (uint8 i = 0; i < m_uiBroggokEventPhase; ++i) + for (uint8 i = 0; i < std::min(m_uiBroggokEventPhase, MAX_ORC_WAVES); ++i) { if (m_aBroggokEvent[i].m_sSortedOrcGuids.size() == m_aBroggokEvent[i].m_uiKilledOrcCount) { diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index f9f9d74f5..f5f40af3a 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2215" + #define SD2_REVISION_NR "2216" #endif // __SD2_REVISION_NR_H__ From 7c4e9e36d64cdc19572e4fd27ca1495363b46384 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Tue, 7 Jun 2011 01:11:56 +0200 Subject: [PATCH 0197/1172] [2217] Revert temporarily workaround introduced for converting to EntryGuidMap-Storage Any ideas how to add a safeguard to at least warn about uint64 values used in the uint32 functions are very welcome! Revert "[2148] Temporarily workaround to restore instances doors or chests" This reverts commit 4388079dfe2cd3fbed9809e7f4d1db5cc3d9e31d Revert "[2149] Forgotten part of last commit..." This reverts commit 3abfecdc88640b83fa90042167ec4ff3504a134f. --- include/sc_instance.cpp | 18 ++---------------- include/sc_instance.h | 6 ++---- sd2_revision_nr.h | 2 +- 3 files changed, 5 insertions(+), 21 deletions(-) diff --git a/include/sc_instance.cpp b/include/sc_instance.cpp index 5ba1c204a..d7905ccd9 100644 --- a/include/sc_instance.cpp +++ b/include/sc_instance.cpp @@ -31,15 +31,8 @@ void ScriptedInstance::DoUseDoorOrButton(ObjectGuid guid, uint32 uiWithRestoreTi } /// Function that uses a door or button that is stored in m_mGoEntryGuidStore -void ScriptedInstance::DoUseDoorOrButton(uint64 uiEntry, uint32 uiWithRestoreTime /*= 0*/, bool bUseAlternativeState /*= false*/) +void ScriptedInstance::DoUseDoorOrButton(uint32 uiEntry, uint32 uiWithRestoreTime /*= 0*/, bool bUseAlternativeState /*= false*/) { - // FIXME REMOVE when no more GO-Guids are stored as uint64 - if (uiEntry > (uint64(HIGHGUID_GAMEOBJECT) << 48)) - { - DoUseDoorOrButton(ObjectGuid(uiEntry), uiWithRestoreTime, bUseAlternativeState); - return; - } - EntryGuidMap::iterator find = m_mGoEntryGuidStore.find(uiEntry); if (find != m_mGoEntryGuidStore.end()) DoUseDoorOrButton(find->second, uiWithRestoreTime, bUseAlternativeState); @@ -75,15 +68,8 @@ void ScriptedInstance::DoRespawnGameObject(ObjectGuid guid, uint32 uiTimeToDespa } /// Function that respawns a despawned GO that is stored in m_mGoEntryGuidStore -void ScriptedInstance::DoRespawnGameObject(uint64 uiEntry, uint32 uiTimeToDespawn) +void ScriptedInstance::DoRespawnGameObject(uint32 uiEntry, uint32 uiTimeToDespawn) { - // FIXME REMOVE when no more GO-Guids are stored as uint64 - if (uiEntry > (uint64(HIGHGUID_GAMEOBJECT) << 48)) - { - DoRespawnGameObject(ObjectGuid(uiEntry), uiTimeToDespawn); - return; - } - EntryGuidMap::iterator find = m_mGoEntryGuidStore.find(uiEntry); if (find != m_mGoEntryGuidStore.end()) DoRespawnGameObject(find->second, uiTimeToDespawn); diff --git a/include/sc_instance.h b/include/sc_instance.h index b161f8b75..3d1450a5b 100644 --- a/include/sc_instance.h +++ b/include/sc_instance.h @@ -35,13 +35,11 @@ class MANGOS_DLL_DECL ScriptedInstance : public InstanceData // Change active state of doors or buttons void DoUseDoorOrButton(ObjectGuid guid, uint32 uiWithRestoreTime = 0, bool bUseAlternativeState = false); - // FIXME revert back to uint32 uiEntry when no more GO-Guids are stored as uint64 - void DoUseDoorOrButton(uint64 uiEntry, uint32 uiWithRestoreTime = 0, bool bUseAlternativeState = false); + void DoUseDoorOrButton(uint32 uiEntry, uint32 uiWithRestoreTime = 0, bool bUseAlternativeState = false); // Respawns a GO having negative spawntimesecs in gameobject-table void DoRespawnGameObject(ObjectGuid guid, uint32 uiTimeToDespawn = MINUTE); - // FIXME revert back to uint32 uiEntry when no more GO-Guids are stored as uint64 - void DoRespawnGameObject(uint64 uiEntry, uint32 uiTimeToDespawn = MINUTE); + void DoRespawnGameObject(uint32 uiEntry, uint32 uiTimeToDespawn = MINUTE); // Sends world state update to all players in instance void DoUpdateWorldState(uint32 uiStateId, uint32 uiStateData); diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index f5f40af3a..a4ff48859 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2216" + #define SD2_REVISION_NR "2217" #endif // __SD2_REVISION_NR_H__ From b851f853d12ac4904414a6b5efc08b08cc983d3c Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Tue, 7 Jun 2011 11:21:31 +0200 Subject: [PATCH 0198/1172] [2218] Unify a few style issues in instance scripts --- scripts/eastern_kingdoms/blackrock_spire/blackrock_spire.h | 4 ++-- .../blackrock_spire/instance_blackrock_spire.cpp | 2 +- .../eastern_kingdoms/karazhan/boss_terestian_illhoof.cpp | 2 -- scripts/eastern_kingdoms/karazhan/karazhan.h | 2 -- scripts/eastern_kingdoms/stratholme/instance_stratholme.cpp | 2 +- scripts/eastern_kingdoms/stratholme/stratholme.h | 6 +++--- .../sunken_temple/instance_sunken_temple.cpp | 2 +- scripts/eastern_kingdoms/sunken_temple/sunken_temple.h | 4 ++-- .../culling_of_stratholme/culling_of_stratholme.h | 4 ++-- .../instance_culling_of_stratholme.cpp | 2 +- scripts/kalimdor/caverns_of_time/hyjal/hyjal.h | 2 -- scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.cpp | 3 --- scripts/kalimdor/razorfen_kraul/instance_razorfen_kraul.cpp | 4 ++-- scripts/kalimdor/razorfen_kraul/razorfen_kraul.h | 4 ++-- .../kalimdor/wailing_caverns/instance_wailing_caverns.cpp | 2 +- scripts/kalimdor/wailing_caverns/wailing_caverns.h | 4 ++-- scripts/kalimdor/zulfarrak/instance_zulfarrak.cpp | 2 +- scripts/kalimdor/zulfarrak/zulfarrak.h | 4 ++-- scripts/northrend/draktharon_keep/draktharon_keep.h | 4 ++-- .../northrend/draktharon_keep/instance_draktharon_keep.cpp | 2 +- .../frozen_halls/forge_of_souls/forge_of_souls.h | 4 ++-- .../frozen_halls/forge_of_souls/instance_forge_of_souls.cpp | 2 +- scripts/northrend/naxxramas/instance_naxxramas.cpp | 2 +- scripts/northrend/naxxramas/naxxramas.h | 4 ++-- scripts/northrend/ulduar/ulduar/instance_ulduar.cpp | 2 +- scripts/northrend/ulduar/ulduar/ulduar.h | 4 ++-- scripts/outland/black_temple/illidari_council.cpp | 5 ----- scripts/outland/gruuls_lair/gruuls_lair.h | 2 +- .../hellfire_citadel/magtheridons_lair/magtheridons_lair.h | 2 +- sd2_revision_nr.h | 2 +- 30 files changed, 38 insertions(+), 52 deletions(-) diff --git a/scripts/eastern_kingdoms/blackrock_spire/blackrock_spire.h b/scripts/eastern_kingdoms/blackrock_spire/blackrock_spire.h index a9680010c..f172e5e11 100644 --- a/scripts/eastern_kingdoms/blackrock_spire/blackrock_spire.h +++ b/scripts/eastern_kingdoms/blackrock_spire/blackrock_spire.h @@ -59,7 +59,7 @@ class MANGOS_DLL_DECL instance_blackrock_spire : public ScriptedInstance void SetData64(uint32 uiType, uint64 uiData); uint32 GetData(uint32 uiType); - const char* Save() { return strInstData.c_str(); } + const char* Save() { return m_strInstData.c_str(); } void Load(const char* chrIn); void DoSortRoomEventMobs(); @@ -68,7 +68,7 @@ class MANGOS_DLL_DECL instance_blackrock_spire : public ScriptedInstance protected: uint32 m_auiEncounter[MAX_ENCOUNTER]; - std::string strInstData; + std::string m_strInstData; ObjectGuid m_aRoomRuneGuid[MAX_ROOMS]; GUIDList m_alRoomEventMobGUIDSorted[MAX_ROOMS]; diff --git a/scripts/eastern_kingdoms/blackrock_spire/instance_blackrock_spire.cpp b/scripts/eastern_kingdoms/blackrock_spire/instance_blackrock_spire.cpp index 0c0943593..156693d9c 100644 --- a/scripts/eastern_kingdoms/blackrock_spire/instance_blackrock_spire.cpp +++ b/scripts/eastern_kingdoms/blackrock_spire/instance_blackrock_spire.cpp @@ -154,7 +154,7 @@ void instance_blackrock_spire::SetData(uint32 uiType, uint32 uiData) std::ostringstream saveStream; saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2] << " " << m_auiEncounter[3] << " " << m_auiEncounter[4]; - strInstData = saveStream.str(); + m_strInstData = saveStream.str(); SaveToDB(); OUT_SAVE_INST_DATA_COMPLETE; diff --git a/scripts/eastern_kingdoms/karazhan/boss_terestian_illhoof.cpp b/scripts/eastern_kingdoms/karazhan/boss_terestian_illhoof.cpp index dc967d48c..7e278a3c0 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_terestian_illhoof.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_terestian_illhoof.cpp @@ -146,8 +146,6 @@ struct MANGOS_DLL_DECL boss_terestianAI : public ScriptedAI if (m_pInstance) m_pInstance->SetData(TYPE_TERESTIAN, IN_PROGRESS); - else - ERROR_INST_DATA(m_creature); } void KilledUnit(Unit* pVictim) diff --git a/scripts/eastern_kingdoms/karazhan/karazhan.h b/scripts/eastern_kingdoms/karazhan/karazhan.h index cb53d064d..abf74f6dc 100644 --- a/scripts/eastern_kingdoms/karazhan/karazhan.h +++ b/scripts/eastern_kingdoms/karazhan/karazhan.h @@ -57,8 +57,6 @@ enum OperaEvents EVENT_RAJ = 3 }; -#define ERROR_INST_DATA(a) error_log("SD2: Instance Data for Karazhan not set properly. Encounter for Creature Entry %u may not work properly.", a->GetEntry()); - class MANGOS_DLL_DECL instance_karazhan : public ScriptedInstance { public: diff --git a/scripts/eastern_kingdoms/stratholme/instance_stratholme.cpp b/scripts/eastern_kingdoms/stratholme/instance_stratholme.cpp index 1262d2e28..a48165c81 100644 --- a/scripts/eastern_kingdoms/stratholme/instance_stratholme.cpp +++ b/scripts/eastern_kingdoms/stratholme/instance_stratholme.cpp @@ -378,7 +378,7 @@ void instance_stratholme::SetData(uint32 uiType, uint32 uiData) saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2] << " " << m_auiEncounter[3] << " " << m_auiEncounter[4] << " " << m_auiEncounter[5] << " " << m_auiEncounter[6]; - strInstData = saveStream.str(); + m_strInstData = saveStream.str(); SaveToDB(); OUT_SAVE_INST_DATA_COMPLETE; diff --git a/scripts/eastern_kingdoms/stratholme/stratholme.h b/scripts/eastern_kingdoms/stratholme/stratholme.h index e3b48ede5..6111f4e67 100644 --- a/scripts/eastern_kingdoms/stratholme/stratholme.h +++ b/scripts/eastern_kingdoms/stratholme/stratholme.h @@ -98,7 +98,7 @@ struct ZigguratStore GUIDList m_lZigguratAcolyteGuid; }; -struct MANGOS_DLL_DECL instance_stratholme : public ScriptedInstance +class MANGOS_DLL_DECL instance_stratholme : public ScriptedInstance { public: instance_stratholme(Map* pMap); @@ -112,7 +112,7 @@ struct MANGOS_DLL_DECL instance_stratholme : public ScriptedInstance void SetData(uint32 uiType, uint32 uiData); uint32 GetData(uint32 uiType); - const char* Save() { return strInstData.c_str(); } + const char* Save() { return m_strInstData.c_str(); } void Load(const char* chrIn); void OnCreatureEnterCombat(Creature* pCreature); @@ -128,7 +128,7 @@ struct MANGOS_DLL_DECL instance_stratholme : public ScriptedInstance uint32 m_auiEncounter[MAX_ENCOUNTER]; bool m_bIsSilverHandDead[MAX_SILVERHAND]; - std::string strInstData; + std::string m_strInstData; uint32 m_uiBaronRunTimer; uint32 m_uiBarthilasRunTimer; diff --git a/scripts/eastern_kingdoms/sunken_temple/instance_sunken_temple.cpp b/scripts/eastern_kingdoms/sunken_temple/instance_sunken_temple.cpp index 578990d66..6b425b507 100644 --- a/scripts/eastern_kingdoms/sunken_temple/instance_sunken_temple.cpp +++ b/scripts/eastern_kingdoms/sunken_temple/instance_sunken_temple.cpp @@ -250,7 +250,7 @@ void instance_sunken_temple::SetData(uint32 uiType, uint32 uiData) saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2] << " " << m_auiEncounter[3] << " " << m_auiEncounter[4]; - strInstData = saveStream.str(); + m_strInstData = saveStream.str(); SaveToDB(); OUT_SAVE_INST_DATA_COMPLETE; diff --git a/scripts/eastern_kingdoms/sunken_temple/sunken_temple.h b/scripts/eastern_kingdoms/sunken_temple/sunken_temple.h index 95730c397..c55e7d32e 100644 --- a/scripts/eastern_kingdoms/sunken_temple/sunken_temple.h +++ b/scripts/eastern_kingdoms/sunken_temple/sunken_temple.h @@ -128,7 +128,7 @@ class MANGOS_DLL_DECL instance_sunken_temple : public ScriptedInstance bool ProcessStatueEvent(uint32 uiEventId); - const char* Save() { return strInstData.c_str(); } + const char* Save() { return m_strInstData.c_str(); } void Load(const char* chrIn); protected: @@ -136,7 +136,7 @@ class MANGOS_DLL_DECL instance_sunken_temple : public ScriptedInstance void DoUpdateFlamesFlags(bool bRestore); uint32 m_auiEncounter[MAX_ENCOUNTER]; - std::string strInstData; + std::string m_strInstData; uint8 m_uiProtectorsRemaining; // Jammalan door handling uint8 m_uiStatueCounter; // Atalarion Statue Event diff --git a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.h b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.h index dfd7301f8..18e69c5a6 100644 --- a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.h +++ b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.h @@ -123,7 +123,7 @@ class MANGOS_DLL_DECL instance_culling_of_stratholme : public ScriptedInstance void SetData(uint32 uiType, uint32 uiData); uint32 GetData(uint32 uiType); - const char* Save() { return strInstData.c_str(); } + const char* Save() { return m_strInstData.c_str(); } void Load(const char* chrIn); void Update(uint32 uiDiff); @@ -144,7 +144,7 @@ class MANGOS_DLL_DECL instance_culling_of_stratholme : public ScriptedInstance void DoChromieHurrySpeech(); uint32 m_auiEncounter[MAX_ENCOUNTER]; - std::string strInstData; + std::string m_strInstData; uint8 m_uiGrainCrateCount; uint32 m_uiRemoveCrateStateTimer; diff --git a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/instance_culling_of_stratholme.cpp b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/instance_culling_of_stratholme.cpp index b4c0e51a5..32e8fbda2 100644 --- a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/instance_culling_of_stratholme.cpp +++ b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/instance_culling_of_stratholme.cpp @@ -232,7 +232,7 @@ void instance_culling_of_stratholme::SetData(uint32 uiType, uint32 uiData) << m_auiEncounter[3] << " " << m_auiEncounter[4] << " " << m_auiEncounter[5] << " " << m_auiEncounter[6] << " " << m_auiEncounter[7] << " " << m_auiEncounter[8]; - strInstData = saveStream.str(); + m_strInstData = saveStream.str(); SaveToDB(); OUT_SAVE_INST_DATA_COMPLETE; diff --git a/scripts/kalimdor/caverns_of_time/hyjal/hyjal.h b/scripts/kalimdor/caverns_of_time/hyjal/hyjal.h index 4a7f3623e..1a3236886 100644 --- a/scripts/kalimdor/caverns_of_time/hyjal/hyjal.h +++ b/scripts/kalimdor/caverns_of_time/hyjal/hyjal.h @@ -5,8 +5,6 @@ #ifndef DEF_HYJAL_H #define DEF_HYJAL_H -#define ERROR_INST_DATA "SD2: Instance data not set properly for Mount Hyjal. Encounters will be buggy" - enum { MAX_ENCOUNTER = 5, diff --git a/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.cpp b/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.cpp index 5fc80bc11..4acca5d2d 100644 --- a/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.cpp +++ b/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.cpp @@ -243,10 +243,7 @@ void hyjalAI::SummonNextWave() DoTalk(RALLY); if (!m_pInstance) - { - error_log(ERROR_INST_DATA); return; - } sHyjalWave* pWaveData = m_uiBase ? &m_aHyjalWavesHorde[m_uiWaveCount] : &m_aHyjalWavesAlliance[m_uiWaveCount]; diff --git a/scripts/kalimdor/razorfen_kraul/instance_razorfen_kraul.cpp b/scripts/kalimdor/razorfen_kraul/instance_razorfen_kraul.cpp index 19cc91008..db0f57797 100644 --- a/scripts/kalimdor/razorfen_kraul/instance_razorfen_kraul.cpp +++ b/scripts/kalimdor/razorfen_kraul/instance_razorfen_kraul.cpp @@ -42,7 +42,7 @@ void instance_razorfen_kraul::OnObjectCreate(GameObject* pGo) case GO_AGATHELOS_WARD: m_mGoEntryGuidStore[GO_AGATHELOS_WARD] = pGo->GetObjectGuid(); if (m_auiEncounter[0] == DONE) - DoUseDoorOrButton(GO_AGATHELOS_WARD); + pGo->SetGoState(GO_STATE_ACTIVE); break; } @@ -79,7 +79,7 @@ void instance_razorfen_kraul::SetData(uint32 uiType, uint32 uiData) std::ostringstream saveStream; saveStream << m_auiEncounter[0]; - strInstData = saveStream.str(); + m_strInstData = saveStream.str(); SaveToDB(); OUT_SAVE_INST_DATA_COMPLETE; diff --git a/scripts/kalimdor/razorfen_kraul/razorfen_kraul.h b/scripts/kalimdor/razorfen_kraul/razorfen_kraul.h index 2c6d0011c..10cd21fe7 100644 --- a/scripts/kalimdor/razorfen_kraul/razorfen_kraul.h +++ b/scripts/kalimdor/razorfen_kraul/razorfen_kraul.h @@ -30,12 +30,12 @@ class MANGOS_DLL_DECL instance_razorfen_kraul : public ScriptedInstance void SetData(uint32 uiType, uint32 uiData); uint32 GetData(uint32 uiType); - const char* Save() { return strInstData.c_str(); } + const char* Save() { return m_strInstData.c_str(); } void Load(const char* chrIn); protected: uint32 m_auiEncounter[MAX_ENCOUNTER]; - std::string strInstData; + std::string m_strInstData; uint8 m_uiWardKeepersRemaining; }; diff --git a/scripts/kalimdor/wailing_caverns/instance_wailing_caverns.cpp b/scripts/kalimdor/wailing_caverns/instance_wailing_caverns.cpp index de8a6f40b..c81cc1451 100644 --- a/scripts/kalimdor/wailing_caverns/instance_wailing_caverns.cpp +++ b/scripts/kalimdor/wailing_caverns/instance_wailing_caverns.cpp @@ -91,7 +91,7 @@ void instance_wailing_caverns::SetData(uint32 uiType, uint32 uiData) saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2] << " " << m_auiEncounter[3] << " " << m_auiEncounter[4] << " " << m_auiEncounter[5]; - strInstData = saveStream.str(); + m_strInstData = saveStream.str(); SaveToDB(); OUT_SAVE_INST_DATA_COMPLETE; } diff --git a/scripts/kalimdor/wailing_caverns/wailing_caverns.h b/scripts/kalimdor/wailing_caverns/wailing_caverns.h index d688ace59..067ff0827 100644 --- a/scripts/kalimdor/wailing_caverns/wailing_caverns.h +++ b/scripts/kalimdor/wailing_caverns/wailing_caverns.h @@ -34,11 +34,11 @@ class MANGOS_DLL_DECL instance_wailing_caverns : public ScriptedInstance void SetData(uint32 uiType, uint32 uiData); uint32 GetData(uint32 uiType); - const char* Save() { return strInstData.c_str(); } + const char* Save() { return m_strInstData.c_str(); } void Load(const char* chrIn); protected: uint32 m_auiEncounter[MAX_ENCOUNTER]; - std::string strInstData; + std::string m_strInstData; }; #endif diff --git a/scripts/kalimdor/zulfarrak/instance_zulfarrak.cpp b/scripts/kalimdor/zulfarrak/instance_zulfarrak.cpp index 148c7089a..84b9b2532 100644 --- a/scripts/kalimdor/zulfarrak/instance_zulfarrak.cpp +++ b/scripts/kalimdor/zulfarrak/instance_zulfarrak.cpp @@ -70,7 +70,7 @@ void instance_zulfarrak::SetData(uint32 uiType, uint32 uiData) saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2] << " " << m_auiEncounter[3] << " " << m_auiEncounter[4] << " " << m_auiEncounter[5] << " " << m_auiEncounter[6] << " " << m_auiEncounter[7]; - strInstData = saveStream.str(); + m_strInstData = saveStream.str(); SaveToDB(); OUT_SAVE_INST_DATA_COMPLETE; diff --git a/scripts/kalimdor/zulfarrak/zulfarrak.h b/scripts/kalimdor/zulfarrak/zulfarrak.h index 59a2e75fe..30c29683a 100644 --- a/scripts/kalimdor/zulfarrak/zulfarrak.h +++ b/scripts/kalimdor/zulfarrak/zulfarrak.h @@ -47,12 +47,12 @@ class MANGOS_DLL_DECL instance_zulfarrak : public ScriptedInstance void SetData(uint32 uiType, uint32 uiData); uint32 GetData(uint32 uiType); - const char* Save() { return strInstData.c_str(); } + const char* Save() { return m_strInstData.c_str(); } void Load(const char* chrIn); protected: uint32 m_auiEncounter[MAX_ENCOUNTER]; - std::string strInstData; + std::string m_strInstData; }; #endif diff --git a/scripts/northrend/draktharon_keep/draktharon_keep.h b/scripts/northrend/draktharon_keep/draktharon_keep.h index 9de2a234f..876cd87fb 100644 --- a/scripts/northrend/draktharon_keep/draktharon_keep.h +++ b/scripts/northrend/draktharon_keep/draktharon_keep.h @@ -43,12 +43,12 @@ class MANGOS_DLL_DECL instance_draktharon_keep : public ScriptedInstance bool CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/); - const char* Save() { return strInstData.c_str(); } + const char* Save() { return m_strInstData.c_str(); } void Load(const char* chrIn); protected: uint32 m_auiEncounter[MAX_ENCOUNTER]; - std::string strInstData; + std::string m_strInstData; uint32 m_uiDreadAddsKilled; bool m_bNovosAddGrounded; diff --git a/scripts/northrend/draktharon_keep/instance_draktharon_keep.cpp b/scripts/northrend/draktharon_keep/instance_draktharon_keep.cpp index 6012a362b..9b35c64c8 100644 --- a/scripts/northrend/draktharon_keep/instance_draktharon_keep.cpp +++ b/scripts/northrend/draktharon_keep/instance_draktharon_keep.cpp @@ -105,7 +105,7 @@ void instance_draktharon_keep::SetData(uint32 uiType, uint32 uiData) std::ostringstream saveStream; saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2] << " " << m_auiEncounter[3]; - strInstData = saveStream.str(); + m_strInstData = saveStream.str(); SaveToDB(); OUT_SAVE_INST_DATA_COMPLETE; diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/forge_of_souls.h b/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/forge_of_souls.h index bbc6c93b5..9134866cb 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/forge_of_souls.h +++ b/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/forge_of_souls.h @@ -106,12 +106,12 @@ class MANGOS_DLL_DECL instance_forge_of_souls : public ScriptedInstance void ProcessEventNpcs(Player* pPlayer, bool bChanged); bool CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/); - const char* Save() { return strInstData.c_str(); } + const char* Save() { return m_strInstData.c_str(); } void Load(const char* chrIn); protected: uint32 m_auiEncounter[MAX_ENCOUNTER]; - std::string strInstData; + std::string m_strInstData; bool m_bCriteriaPhantomBlastFailed; diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/instance_forge_of_souls.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/instance_forge_of_souls.cpp index 65109997f..9b2bd9288 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/instance_forge_of_souls.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/instance_forge_of_souls.cpp @@ -149,7 +149,7 @@ void instance_forge_of_souls::SetData(uint32 uiType, uint32 uiData) std::ostringstream saveStream; saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1]; - strInstData = saveStream.str(); + m_strInstData = saveStream.str(); SaveToDB(); OUT_SAVE_INST_DATA_COMPLETE; diff --git a/scripts/northrend/naxxramas/instance_naxxramas.cpp b/scripts/northrend/naxxramas/instance_naxxramas.cpp index bd7800b86..37c44a1af 100644 --- a/scripts/northrend/naxxramas/instance_naxxramas.cpp +++ b/scripts/northrend/naxxramas/instance_naxxramas.cpp @@ -384,7 +384,7 @@ void instance_naxxramas::SetData(uint32 uiType, uint32 uiData) << m_auiEncounter[9] << " " << m_auiEncounter[10] << " " << m_auiEncounter[11] << " " << m_auiEncounter[12] << " " << m_auiEncounter[13] << " " << m_auiEncounter[14] << " " << m_auiEncounter[15]; - strInstData = saveStream.str(); + m_strInstData = saveStream.str(); SaveToDB(); OUT_SAVE_INST_DATA_COMPLETE; diff --git a/scripts/northrend/naxxramas/naxxramas.h b/scripts/northrend/naxxramas/naxxramas.h index c221c0c32..41db6feef 100644 --- a/scripts/northrend/naxxramas/naxxramas.h +++ b/scripts/northrend/naxxramas/naxxramas.h @@ -195,7 +195,7 @@ class MANGOS_DLL_DECL instance_naxxramas : public ScriptedInstance void SetSpecialAchievementCriteria(uint32 uiType, bool bIsMet); bool CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/); - const char* Save() { return strInstData.c_str(); } + const char* Save() { return m_strInstData.c_str(); } void Load(const char* chrIn); // goth @@ -215,7 +215,7 @@ class MANGOS_DLL_DECL instance_naxxramas : public ScriptedInstance protected: uint32 m_auiEncounter[MAX_ENCOUNTER]; bool m_abAchievCriteria[MAX_SPECIAL_ACHIEV_CRITS]; - std::string strInstData; + std::string m_strInstData; GUIDList m_lThadTeslaCoilList; diff --git a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp index a65e1a44a..1d8acdf93 100644 --- a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp +++ b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp @@ -425,7 +425,7 @@ void instance_ulduar::SetData(uint32 uiType, uint32 uiData) << m_auiHardBoss[4] << " " << m_auiHardBoss[5] << " " << m_auiHardBoss[6] << " " << m_auiUlduarKeepers[0] << " " << m_auiUlduarKeepers[1] << " " << m_auiUlduarKeepers[2] << " " << m_auiUlduarKeepers[3]; - strInstData = saveStream.str(); + m_strInstData = saveStream.str(); SaveToDB(); OUT_SAVE_INST_DATA_COMPLETE; diff --git a/scripts/northrend/ulduar/ulduar/ulduar.h b/scripts/northrend/ulduar/ulduar/ulduar.h index c4d7fc435..a01f49f3d 100644 --- a/scripts/northrend/ulduar/ulduar/ulduar.h +++ b/scripts/northrend/ulduar/ulduar/ulduar.h @@ -208,7 +208,7 @@ class MANGOS_DLL_DECL instance_ulduar : public ScriptedInstance void SetData(uint32 uiType, uint32 uiData); uint32 GetData(uint32 uiType); - const char* Save() { return strInstData.c_str(); } + const char* Save() { return m_strInstData.c_str(); } void Load(const char* chrIn); // Dummy, leave till correct solution for hardmode found @@ -219,7 +219,7 @@ class MANGOS_DLL_DECL instance_ulduar : public ScriptedInstance void SpawnFriendlyKeeper(uint32 uiWho); protected: - std::string strInstData; + std::string m_strInstData; uint32 m_auiEncounter[MAX_ENCOUNTER]; uint32 m_auiHardBoss[HARD_MODE_ENCOUNTER]; uint32 m_auiUlduarKeepers[KEEPER_ENCOUNTER]; diff --git a/scripts/outland/black_temple/illidari_council.cpp b/scripts/outland/black_temple/illidari_council.cpp index 8103e4709..6bcad1cee 100644 --- a/scripts/outland/black_temple/illidari_council.cpp +++ b/scripts/outland/black_temple/illidari_council.cpp @@ -52,8 +52,6 @@ enum SAY_ZERE_SPECIAL2 = -1564084, }; -#define ERROR_INST_DATA "SD2 ERROR: Instance Data for Black Temple not set properly; Illidari Council event will not function properly." - struct CouncilYells { int32 entry; @@ -367,10 +365,7 @@ struct MANGOS_DLL_DECL boss_illidari_councilAI : public ScriptedAI } } else - { - error_log(ERROR_INST_DATA); EnterEvadeMode(); - } } void DamageTaken(Unit* done_by, uint32 &damage) diff --git a/scripts/outland/gruuls_lair/gruuls_lair.h b/scripts/outland/gruuls_lair/gruuls_lair.h index 9cf5d5c61..bbe35672f 100644 --- a/scripts/outland/gruuls_lair/gruuls_lair.h +++ b/scripts/outland/gruuls_lair/gruuls_lair.h @@ -24,7 +24,7 @@ enum NPC_OLM = 18834, }; -struct MANGOS_DLL_DECL instance_gruuls_lair : public ScriptedInstance +class MANGOS_DLL_DECL instance_gruuls_lair : public ScriptedInstance { public: instance_gruuls_lair(Map *pMap); diff --git a/scripts/outland/hellfire_citadel/magtheridons_lair/magtheridons_lair.h b/scripts/outland/hellfire_citadel/magtheridons_lair/magtheridons_lair.h index e0e00e5fb..b47645d89 100644 --- a/scripts/outland/hellfire_citadel/magtheridons_lair/magtheridons_lair.h +++ b/scripts/outland/hellfire_citadel/magtheridons_lair/magtheridons_lair.h @@ -34,7 +34,7 @@ enum GO_MAGTHERIDON_COLUMN_001 = 184639, }; -struct MANGOS_DLL_DECL instance_magtheridons_lair : public ScriptedInstance +class MANGOS_DLL_DECL instance_magtheridons_lair : public ScriptedInstance { public: instance_magtheridons_lair(Map* pMap); diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index a4ff48859..cf8eaa08f 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2217" + #define SD2_REVISION_NR "2218" #endif // __SD2_REVISION_NR_H__ From 7b7e765ed32cf9d196064d04815d3fc433b3024a Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Tue, 7 Jun 2011 15:22:22 +0200 Subject: [PATCH 0199/1172] [2219] Implement timed achievement criterias for scripted bosses Note that handling starting timed achievement criterias might be removed from SD2 whenever there will be a more advanced system with DB and core --- include/sc_instance.cpp | 22 +++++++++++++ include/sc_instance.h | 3 ++ .../onyxias_lair/instance_onyxias_lair.cpp | 3 ++ scripts/kalimdor/onyxias_lair/onyxias_lair.h | 2 ++ .../northrend/azjol-nerub/ahnkahet/ahnkahet.h | 2 ++ .../ahnkahet/instance_ahnkahet.cpp | 6 +++- .../azjol-nerub/azjol-nerub/azjol-nerub.h | 32 ++++++++++--------- .../azjol-nerub/instance_azjol-nerub.cpp | 2 ++ .../naxxramas/instance_naxxramas.cpp | 5 +++ scripts/northrend/naxxramas/naxxramas.h | 4 +++ .../halls_of_lightning/halls_of_lightning.h | 4 ++- .../instance_halls_of_lightning.cpp | 2 ++ .../ulduar/halls_of_stone/halls_of_stone.h | 2 ++ .../instance_halls_of_stone.cpp | 2 ++ sd2_revision_nr.h | 2 +- 15 files changed, 75 insertions(+), 18 deletions(-) diff --git a/include/sc_instance.cpp b/include/sc_instance.cpp index d7905ccd9..e93cb451a 100644 --- a/include/sc_instance.cpp +++ b/include/sc_instance.cpp @@ -141,3 +141,25 @@ Creature* ScriptedInstance::GetSingleCreatureFromStorage(uint32 uiEntry, bool bS return NULL; } + +/** + Helper function to start a timed achievement criteria for players in the map + + @param criteriaType The Type that is required to complete the criteria, see enum AchievementCriteriaTypes in MaNGOS + @param uiTimedCriteriaMiscId The ID that identifies how the criteria is started + */ +void ScriptedInstance::DoStartTimedAchievement(AchievementCriteriaTypes criteriaType, uint32 uiTimedCriteriaMiscId) +{ + Map::PlayerList const& lPlayers = instance->GetPlayers(); + + if (!lPlayers.isEmpty()) + { + for(Map::PlayerList::const_iterator itr = lPlayers.begin(); itr != lPlayers.end(); ++itr) + { + if (Player* pPlayer = itr->getSource()) + pPlayer->StartTimedAchievementCriteria(criteriaType, uiTimedCriteriaMiscId); + } + } + else + debug_log("SD2: DoStartTimedAchievement attempt start achievements but no players in map."); +} diff --git a/include/sc_instance.h b/include/sc_instance.h index 3d1450a5b..d7e037e51 100644 --- a/include/sc_instance.h +++ b/include/sc_instance.h @@ -54,6 +54,9 @@ class MANGOS_DLL_DECL ScriptedInstance : public InstanceData DoOrSimulateScriptTextForMap(iTextEntry, uiCreatureEntry, instance, GetSingleCreatureFromStorage(uiCreatureEntry, true)); } + // Starts a timed achievement criteria for all players in instance + void DoStartTimedAchievement(AchievementCriteriaTypes criteriaType, uint32 uiTimedCriteriaMiscId); + protected: // Storage for GO-Guids and NPC-Guids EntryGuidMap m_mGoEntryGuidStore; ///< Store unique GO-Guids by entry diff --git a/scripts/kalimdor/onyxias_lair/instance_onyxias_lair.cpp b/scripts/kalimdor/onyxias_lair/instance_onyxias_lair.cpp index f7dde0ae7..cec7e972c 100644 --- a/scripts/kalimdor/onyxias_lair/instance_onyxias_lair.cpp +++ b/scripts/kalimdor/onyxias_lair/instance_onyxias_lair.cpp @@ -62,7 +62,10 @@ void instance_onyxias_lair::SetData(uint32 uiType, uint32 uiData) m_uiEncounter = uiData; if (uiData == IN_PROGRESS) + { + DoStartTimedAchievement(ACHIEVEMENT_CRITERIA_TYPE_KILL_CREATURE, ACHIEV_START_ONYXIA_ID); m_uiAchievWhelpsCount = 0; + } if (uiData == DATA_LIFTOFF) m_tPhaseTwoStart = time(NULL); diff --git a/scripts/kalimdor/onyxias_lair/onyxias_lair.h b/scripts/kalimdor/onyxias_lair/onyxias_lair.h index 2f493a792..f869ca954 100644 --- a/scripts/kalimdor/onyxias_lair/onyxias_lair.h +++ b/scripts/kalimdor/onyxias_lair/onyxias_lair.h @@ -24,6 +24,8 @@ enum ACHIEV_CRIT_MANY_WHELPS_H = 12568, ACHIEV_CRIT_NO_BREATH_N = 12566, // Acheivements 4404, 4407 ACHIEV_CRIT_NO_BREATH_H = 12569, + + ACHIEV_START_ONYXIA_ID = 6601, }; class MANGOS_DLL_DECL instance_onyxias_lair : public ScriptedInstance diff --git a/scripts/northrend/azjol-nerub/ahnkahet/ahnkahet.h b/scripts/northrend/azjol-nerub/ahnkahet/ahnkahet.h index bc6a5fc66..114e5355a 100644 --- a/scripts/northrend/azjol-nerub/ahnkahet/ahnkahet.h +++ b/scripts/northrend/azjol-nerub/ahnkahet/ahnkahet.h @@ -28,6 +28,8 @@ enum NPC_ELDER_NADOX = 29309, //NPC_JEDOGA_SHADOWSEEKER = 29310, + + ACHIEV_START_VOLAZJ_ID = 20382, }; class MANGOS_DLL_DECL instance_ahnkahet : public ScriptedInstance diff --git a/scripts/northrend/azjol-nerub/ahnkahet/instance_ahnkahet.cpp b/scripts/northrend/azjol-nerub/ahnkahet/instance_ahnkahet.cpp index a82d75590..803645577 100644 --- a/scripts/northrend/azjol-nerub/ahnkahet/instance_ahnkahet.cpp +++ b/scripts/northrend/azjol-nerub/ahnkahet/instance_ahnkahet.cpp @@ -101,10 +101,14 @@ void instance_ahnkahet::SetData(uint32 uiType, uint32 uiData) } break; case TYPE_JEDOGA: - case TYPE_VOLAZJ: case TYPE_AMANITAR: m_auiEncounter[uiType] = uiData; break; + case TYPE_VOLAZJ: + m_auiEncounter[uiType] = uiData; + if (uiData == IN_PROGRESS) + DoStartTimedAchievement(ACHIEVEMENT_CRITERIA_TYPE_KILL_CREATURE, ACHIEV_START_VOLAZJ_ID); + break; default: error_log("SD2: Instance Ahn'Kahet: ERROR SetData = %u for type %u does not exist/not implemented.", uiType, uiData); diff --git a/scripts/northrend/azjol-nerub/azjol-nerub/azjol-nerub.h b/scripts/northrend/azjol-nerub/azjol-nerub/azjol-nerub.h index c39cf3a55..7d75103b7 100644 --- a/scripts/northrend/azjol-nerub/azjol-nerub/azjol-nerub.h +++ b/scripts/northrend/azjol-nerub/azjol-nerub/azjol-nerub.h @@ -7,26 +7,28 @@ enum { - MAX_ENCOUNTER = 3, + MAX_ENCOUNTER = 3, - TYPE_KRIKTHIR = 0, - TYPE_HADRONOX = 1, - TYPE_ANUBARAK = 2, + TYPE_KRIKTHIR = 0, + TYPE_HADRONOX = 1, + TYPE_ANUBARAK = 2, - NPC_KRIKTHIR = 28684, + NPC_KRIKTHIR = 28684, - SAY_SEND_GROUP_1 = -1601004, - SAY_SEND_GROUP_2 = -1601005, - SAY_SEND_GROUP_3 = -1601006, + SAY_SEND_GROUP_1 = -1601004, + SAY_SEND_GROUP_2 = -1601005, + SAY_SEND_GROUP_3 = -1601006, - NPC_GASHRA = 28730, - NPC_NARJIL = 28729, - NPC_SILTHIK = 28731, + NPC_GASHRA = 28730, + NPC_NARJIL = 28729, + NPC_SILTHIK = 28731, - GO_DOOR_KRIKTHIR = 192395, - GO_DOOR_ANUBARAK_1 = 192396, - GO_DOOR_ANUBARAK_2 = 192397, - GO_DOOR_ANUBARAK_3 = 192398 + GO_DOOR_KRIKTHIR = 192395, + GO_DOOR_ANUBARAK_1 = 192396, + GO_DOOR_ANUBARAK_2 = 192397, + GO_DOOR_ANUBARAK_3 = 192398, + + ACHIEV_START_ANUB_ID = 20381, }; static const uint32 aWatchers[] = {NPC_GASHRA, NPC_NARJIL, NPC_SILTHIK}; diff --git a/scripts/northrend/azjol-nerub/azjol-nerub/instance_azjol-nerub.cpp b/scripts/northrend/azjol-nerub/azjol-nerub/instance_azjol-nerub.cpp index 9bd8e6703..80faf8118 100644 --- a/scripts/northrend/azjol-nerub/azjol-nerub/instance_azjol-nerub.cpp +++ b/scripts/northrend/azjol-nerub/azjol-nerub/instance_azjol-nerub.cpp @@ -177,6 +177,8 @@ void instance_azjol_nerub::SetData(uint32 uiType, uint32 uiData) DoUseDoorOrButton(GO_DOOR_ANUBARAK_1); DoUseDoorOrButton(GO_DOOR_ANUBARAK_2); DoUseDoorOrButton(GO_DOOR_ANUBARAK_3); + if (uiData == IN_PROGRESS) + DoStartTimedAchievement(ACHIEVEMENT_CRITERIA_TYPE_KILL_CREATURE, ACHIEV_START_ANUB_ID); break; } diff --git a/scripts/northrend/naxxramas/instance_naxxramas.cpp b/scripts/northrend/naxxramas/instance_naxxramas.cpp index 37c44a1af..58a83c5ef 100644 --- a/scripts/northrend/naxxramas/instance_naxxramas.cpp +++ b/scripts/northrend/naxxramas/instance_naxxramas.cpp @@ -220,7 +220,10 @@ void instance_naxxramas::SetData(uint32 uiType, uint32 uiData) m_auiEncounter[uiType] = uiData; DoUseDoorOrButton(GO_ARAC_ANUB_DOOR); if (uiData == DONE) + { DoUseDoorOrButton(GO_ARAC_ANUB_GATE); + DoStartTimedAchievement(ACHIEVEMENT_CRITERIA_TYPE_KILL_CREATURE, ACHIEV_START_MAEXXNA_ID); + } break; case TYPE_FAERLINA: DoUseDoorOrButton(GO_ARAC_FAER_WEB); @@ -322,6 +325,8 @@ void instance_naxxramas::SetData(uint32 uiType, uint32 uiData) break; case TYPE_PATCHWERK: m_auiEncounter[uiType] = uiData; + if (uiData == IN_PROGRESS) + DoStartTimedAchievement(ACHIEVEMENT_CRITERIA_TYPE_KILL_CREATURE, ACHIEV_START_PATCHWERK_ID); if (uiData == DONE) DoUseDoorOrButton(GO_CONS_PATH_EXIT_DOOR); break; diff --git a/scripts/northrend/naxxramas/naxxramas.h b/scripts/northrend/naxxramas/naxxramas.h index 41db6feef..3ae6d9564 100644 --- a/scripts/northrend/naxxramas/naxxramas.h +++ b/scripts/northrend/naxxramas/naxxramas.h @@ -165,6 +165,10 @@ enum ACHIEV_CRIT_UNDYING_MAEX = 13238, ACHIEV_CRIT_UNDYING_LOA = 13239, ACHIEV_CRIT_UNDYING_THAD = 13240, + + // Timed achievement criterias + ACHIEV_START_PATCHWERK_ID = 10286, + ACHIEV_START_MAEXXNA_ID = 9891, }; struct GothTrigger diff --git a/scripts/northrend/ulduar/halls_of_lightning/halls_of_lightning.h b/scripts/northrend/ulduar/halls_of_lightning/halls_of_lightning.h index 60d6895fd..ba0fe82b3 100644 --- a/scripts/northrend/ulduar/halls_of_lightning/halls_of_lightning.h +++ b/scripts/northrend/ulduar/halls_of_lightning/halls_of_lightning.h @@ -22,7 +22,9 @@ enum GO_VOLKHAN_DOOR = 191325, //_doors07 GO_IONAR_DOOR = 191326, //_doors05 GO_LOKEN_DOOR = 191324, //_doors02 - GO_LOKEN_THRONE = 192654 + GO_LOKEN_THRONE = 192654, + + ACHIEV_START_LOKEN_ID = 20384, }; class MANGOS_DLL_DECL instance_halls_of_lightning : public ScriptedInstance diff --git a/scripts/northrend/ulduar/halls_of_lightning/instance_halls_of_lightning.cpp b/scripts/northrend/ulduar/halls_of_lightning/instance_halls_of_lightning.cpp index 5c8269f6c..989eeb9b2 100644 --- a/scripts/northrend/ulduar/halls_of_lightning/instance_halls_of_lightning.cpp +++ b/scripts/northrend/ulduar/halls_of_lightning/instance_halls_of_lightning.cpp @@ -95,6 +95,8 @@ void instance_halls_of_lightning::SetData(uint32 uiType, uint32 uiData) m_auiEncounter[uiType] = uiData; break; case TYPE_LOKEN: + if (uiData == IN_PROGRESS) + DoStartTimedAchievement(ACHIEVEMENT_CRITERIA_TYPE_KILL_CREATURE, ACHIEV_START_LOKEN_ID); if (uiData == DONE) { DoUseDoorOrButton(GO_LOKEN_DOOR); diff --git a/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.h b/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.h index 1a4b58a41..9fd2637fc 100644 --- a/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.h +++ b/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.h @@ -41,6 +41,8 @@ enum FACE_MARNAK = 0, FACE_ABEDNEUM = 1, FACE_KADDRAK = 2, + + ACHIEV_START_MAIDEN_ID = 20383, }; struct Face diff --git a/scripts/northrend/ulduar/halls_of_stone/instance_halls_of_stone.cpp b/scripts/northrend/ulduar/halls_of_stone/instance_halls_of_stone.cpp index 59c9ee8cb..1e4f4d3c4 100644 --- a/scripts/northrend/ulduar/halls_of_stone/instance_halls_of_stone.cpp +++ b/scripts/northrend/ulduar/halls_of_stone/instance_halls_of_stone.cpp @@ -133,6 +133,8 @@ void instance_halls_of_stone::SetData(uint32 uiType, uint32 uiData) break; case TYPE_MAIDEN: m_auiEncounter[1] = uiData; + if (uiData == IN_PROGRESS) + DoStartTimedAchievement(ACHIEVEMENT_CRITERIA_TYPE_KILL_CREATURE, ACHIEV_START_MAIDEN_ID); break; case TYPE_KRYSTALLUS: m_auiEncounter[2] = uiData; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index cf8eaa08f..28d7d9531 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2218" + #define SD2_REVISION_NR "2219" #endif // __SD2_REVISION_NR_H__ From 3dc5ac20e765a51786fbf721b81e6bd1674bacb2 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Tue, 7 Jun 2011 20:34:32 +0200 Subject: [PATCH 0200/1172] [2220] Add texts for Ruby Sanctum Signed-off-by: Schmoozerd --- .../northrend/ruby_sanctum/boss_baltharus.cpp | 26 ++++++++++- .../northrend/ruby_sanctum/boss_halion.cpp | 24 +++++++++- .../northrend/ruby_sanctum/boss_saviana.cpp | 13 +++++- .../ruby_sanctum/boss_zarithrian.cpp | 13 +++++- sd2_revision_nr.h | 2 +- sql/scriptdev2_script_full.sql | 45 ++++++++++++++++++- sql/updates/r2220_scriptdev2.sql | 45 +++++++++++++++++++ 7 files changed, 158 insertions(+), 10 deletions(-) create mode 100644 sql/updates/r2220_scriptdev2.sql diff --git a/scripts/northrend/ruby_sanctum/boss_baltharus.cpp b/scripts/northrend/ruby_sanctum/boss_baltharus.cpp index 68bfcbabd..9ff1ee01c 100644 --- a/scripts/northrend/ruby_sanctum/boss_baltharus.cpp +++ b/scripts/northrend/ruby_sanctum/boss_baltharus.cpp @@ -16,13 +16,35 @@ /* ScriptData SDName: boss_baltharus -SD%Complete: -SDComment: placeholder +SD%Complete: 20 +SDComment: only yells SDCategory: Ruby Sanctum EndScriptData */ #include "precompiled.h" +enum +{ + // Xerestrasza intro and outro texts + SAY_HELP = -1724000, + SAY_THANKS = -1724002, + SAY_OUTRO_1 = -1724003, + SAY_OUTRO_2 = -1724004, + SAY_OUTRO_3 = -1724005, + SAY_OUTRO_4 = -1724006, + SAY_OUTRO_5 = -1724007, + SAY_OUTRO_6 = -1724008, + SAY_OUTRO_7 = -1724009, + + // Baltharus texts + SAY_INTRO = -1724001, + SAY_AGGRO = -1724010, + SAY_SLAY_1 = -1724011, + SAY_SLAY_2 = -1724012, + SAY_DEATH = -1724013, + SAY_SPLIT = -1724014, +} + void AddSC_boss_baltharus() { } diff --git a/scripts/northrend/ruby_sanctum/boss_halion.cpp b/scripts/northrend/ruby_sanctum/boss_halion.cpp index c18d8d9e8..01c6d56d8 100644 --- a/scripts/northrend/ruby_sanctum/boss_halion.cpp +++ b/scripts/northrend/ruby_sanctum/boss_halion.cpp @@ -16,13 +16,33 @@ /* ScriptData SDName: boss_halion -SD%Complete: -SDComment: placeholder +SD%Complete: 20 +SDComment: only yells SDCategory: Ruby Sanctum EndScriptData */ #include "precompiled.h" +enum +{ + SAY_SPAWN = -1724024, + SAY_AGGRO = -1724025, + SAY_SLAY = -1724026, // There is an additonal sound entry related to SLAY: 17502 + SAY_DEATH = -1724027, + SAY_BERSERK = -1724028, + SAY_FIREBALL = -1724029, + SAY_SPHERES = -1724030, + SAY_PHASE_2 = -1724031, + SAY_PHASE_3 = -1724032, + + EMOTE_SPHERES = -1724033, + EMOTE_OUT_OF_TWILLIGHT = -1724034, + EMOTE_OUT_OF_PHYSICAL = -1724035, + EMOTE_INTO_TWILLIGHT = -1724036, + EMOTE_INTO_PHYSICAL = -1724037, + EMOTE_REGENERATE = -1724038, +} + void AddSC_boss_halion() { } diff --git a/scripts/northrend/ruby_sanctum/boss_saviana.cpp b/scripts/northrend/ruby_sanctum/boss_saviana.cpp index 2d9921764..9ffa38588 100644 --- a/scripts/northrend/ruby_sanctum/boss_saviana.cpp +++ b/scripts/northrend/ruby_sanctum/boss_saviana.cpp @@ -16,13 +16,22 @@ /* ScriptData SDName: boss_saviana -SD%Complete: -SDComment: placeholder +SD%Complete: 20 +SDComment: only yells SDCategory: Ruby Sanctum EndScriptData */ #include "precompiled.h" +enum +{ + SAY_AGGRO = -1724015, + SAY_SLAY_1 = -1724016, + SAY_SLAY_2 = -1724017, + SAY_SPECIAL = -1724018, + SOUND_DEATH = 17531, // On death it has only a screaming sound +} + void AddSC_boss_saviana() { } diff --git a/scripts/northrend/ruby_sanctum/boss_zarithrian.cpp b/scripts/northrend/ruby_sanctum/boss_zarithrian.cpp index 66131c779..78b0a6fb0 100644 --- a/scripts/northrend/ruby_sanctum/boss_zarithrian.cpp +++ b/scripts/northrend/ruby_sanctum/boss_zarithrian.cpp @@ -16,13 +16,22 @@ /* ScriptData SDName: boss_zarithrian -SD%Complete: -SDComment:placeholder +SD%Complete: 20 +SDComment: only texts SDCategory: Ruby Sanctum EndScriptData */ #include "precompiled.h" +enum +{ + SAY_AGGRO = -1724019, + SAY_SLAY_1 = -1724020, + SAY_SLAY_2 = -1724021, + SAY_DEATH = -1724022, + SAY_SUMMON = -1724023, +} + void AddSC_boss_zarithrian() { } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 28d7d9531..95d617afa 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2219" + #define SD2_REVISION_NR "2220" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 3b05fb14e..e5050a456 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -3466,7 +3466,50 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen -- -1 668 000 ICC: HALLS OF REFLECTION -- -1 724 000 RUBY SANCTUM - +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1724000,'Help! I am trapped within this tree! I require aid!',17490,6,0,0,'xerestraza SAY_HELP'), +(-1724001,'Your power wanes, ancient one! Soon, you will join your friends!',17525,6,0,0,'baltharus SAY_INTRO'), +(-1724002,'Thank you! I could have not held out for much longer. A terrible thing has happened here.',17491,1,0,0,'xerestraza SAY_THANKS'), +(-1724003,'We believed that the Sanctum was well fortified, but we were not prepareted for the nature of this assault.',17492,0,0,0,'xerestraza SAY_OUTRO_1'), +(-1724004,'The Black Dragonkin materialized from thin air, and set upon us before we could react.',17493,0,0,0,'xerestraza SAY_OUTRO_2'), +(-1724005,'We did not stand a chance. As my brethren perished around me, I managed to retreat hear and bar the entrance.',17494,0,0,0,'xerestraza SAY_OUTRO_3'), +(-1724006,'They slaughtered us with cold efficiency, but the true focus of their interest seemed to be the eggs kept here in the sanctum.',17495,0,0,0,'xerestraza SAY_OUTRO_4'), +(-1724007,'The commander of the forces on the ground here is a cruel brute named Zarithrian. But I fear there are greater powers at work.',17496,0,0,0,'xerestraza SAY_OUTRO_5'), +(-1724008,'In their initial assault I caught a glimpse of their true leader, a fearsome full-grown Twilight Dragon.',17497,0,0,0,'xerestraza SAY_OUTRO_6'), +(-1724009,'I know not the extent of their plans heroes, but I know this: they cannot be allowed to succeed!',17498,0,0,0,'xerestraza SAY_OUTRO_7'), + +(-1724010,'Ah, the entertainment has arrived.',17520,1,0,0,'baltharus SAY_AGGRO'), +(-1724011,'Baltharus leaves no survivors!',17521,1,0,0,'baltharus SAY_SLAY_1'), +(-1724012,'This world has enough heroes.',17522,1,0,0,'baltharus SAY_SLAY_2'), +(-1724013,'I... Didn\'t see that coming...',17523,1,0,0,'baltharus SAY_DEATH'), +(-1724014,'Twice the pain and half the fun.',17524,1,0,0,'baltharus SAY_SPLIT'), + +(-1724015,'You will suffer for this intrusion!',17528,1,0,0,'saviana SAY_AGGRO'), +(-1724016,'As it should be...',17529,1,0,0,'saviana SAY_SLAY_1'), +(-1724017,'Halion will be pleased.',17530,1,0,0,'saviana SAY_SLAY_2'), +(-1724018,'Burn in the master\'s flame!',17532,1,0,0,'saviana SAY_SPECIAL'), + +(-1724019,'Alexstrasza has chosen capable allies... A pity that I must END YOU!',17512,1,0,0,'zarithrian SAY_AGGRO'), +(-1724020,'You thought you stood a chance?',17513,1,0,0,'zarithrian SAY_SLAY_1'), +(-1724021,'It\'s for the best.',17514,1,0,0,'zarithrian SAY_SLAY_2'), +(-1724022,'HALION! I...',17515,1,0,0,'zarithrian SAY_DEATH'), +(-1724023,'Turn them to ash, minions!',17516,1,0,0,'zarithrian SAY_SUMMON'), + +(-1724024,'Meddlesome insects! You\'re too late: The Ruby Sanctum\'s lost.',17499,6,0,0,'halion SAY_SPAWN'), +(-1724025,'Your world teeters on the brink of annihilation. You will ALL bear witness to the coming of a new age of DESTRUCTION!',17500,1,0,0,'halion SAY_AGGRO'), +(-1724026,'Another hero falls.',17501,1,0,0,'halion SAY_SLAY'), +(-1724027,'Relish this victory, mortals, for it will be your last! This world will burn with the master\'s return!',17503,1,0,0,'halion SAY_DEATH'), +(-1724028,'Not good enough.',17504,1,0,0,'halion SAY_BERSERK'), +(-1724029,'The heavens burn!',17505,1,0,0,'halion SAY_FIREBALL'), +(-1724030,'Beware the shadow!',17506,1,0,0,'halion SAY_SPHERES'), +(-1724031,'You will find only suffering within the realm of twilight! Enter if you dare!',17507,1,0,0,'halion SAY_PHASE_2'), +(-1724032,'I am the light and the darkness! Cower, mortals, before the herald of Deathwing!',17508,1,0,0,'halion SAY_PHASE_3'), +(-1724033,'The orbining spheres pulse with dark energy!',0,3,0,0,'halion EMOTE_SPHERES'), +(-1724034,'Your efforts force %s further out of the twillight realm!',0,3,0,0,'halion EMOTE_OUT_OF_TWILLIGHT'), +(-1724035,'Your efforts force %s further out of the physical realm!',0,3,0,0,'halion EMOTE_OUT_OF_PHYSICAL'), +(-1724036,'Your companions\' efforts force Halion further into the twillight realm!',0,3,0,0,'halion EMOTE_INTO_TWILLIGHT'), +(-1724037,'Your companions\' efforts force Halion further into the physical realm!',0,3,0,0,'halion EMOTE_INTO_PHYSICAL'), +(-1724038,'Without pressure in both realms %s begins to regenerate.',0,3,0,0,'halion EMOTE_REGENERATE'); -- -1 999 900 EXAMPLE TEXT INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES diff --git a/sql/updates/r2220_scriptdev2.sql b/sql/updates/r2220_scriptdev2.sql new file mode 100644 index 000000000..12451c82c --- /dev/null +++ b/sql/updates/r2220_scriptdev2.sql @@ -0,0 +1,45 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1724038 AND -1724000; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1724000,'Help! I am trapped within this tree! I require aid!',17490,6,0,0,'xerestraza SAY_XERESTRASZA_HELP'), +(-1724001,'Your power wanes, ancient one! Soon, you will join your friends!',17525,6,0,0,'baltharus SAY_BALTHARUS_INTRO'), +(-1724002,'Thank you! I could have not held out for much longer. A terrible thing has happened here.',17491,1,0,0,'xerestraza SAY_XERESTRASZA_THANKS'), +(-1724003,'We believed that the Sanctum was well fortified, but we were not prepareted for the nature of this assault.',17492,0,0,0,'xerestraza SAY_OUTRO_1'), +(-1724004,'The Black Dragonkin materialized from thin air, and set upon us before we could react.',17493,0,0,0,'xerestraza SAY_OUTRO_2'), +(-1724005,'We did not stand a chance. As my brethren perished around me, I managed to retreat hear and bar the entrance.',17494,0,0,0,'xerestraza SAY_OUTRO_3'), +(-1724006,'They slaughtered us with cold efficiency, but the true focus of their interest seemed to be the eggs kept here in the sanctum.',17495,0,0,0,'xerestraza SAY_OUTRO_4'), +(-1724007,'The commander of the forces on the ground here is a cruel brute named Zarithrian. But I fear there are greater powers at work.',17496,0,0,0,'xerestraza SAY_OUTRO_5'), +(-1724008,'In their initial assault I caught a glimpse of their true leader, a fearsome full-grown Twilight Dragon.',17497,0,0,0,'xerestraza SAY_OUTRO_6'), +(-1724009,'I know not the extent of their plans heroes, but I know this: they cannot be allowed to succeed!',17498,0,0,0,'xerestraza SAY_OUTRO_7'), + +(-1724010,'Ah, the entertainment has arrived.',17520,1,0,0,'baltharus SAY_AGGRO'), +(-1724011,'Baltharus leaves no survivors!',17521,1,0,0,'baltharus SAY_SLAY_1'), +(-1724012,'This world has enough heroes.',17522,1,0,0,'baltharus SAY_SLAY_2'), +(-1724013,'I... Didn\'t see that coming...',17523,1,0,0,'baltharus SAY_DEATH'), +(-1724014,'Twice the pain and half the fun.',17524,1,0,0,'baltharus SAY_SPLIT'), + +(-1724015,'You will suffer for this intrusion!',17528,1,0,0,'saviana SAY_AGGRO'), +(-1724016,'As it should be...',17529,1,0,0,'saviana SAY_SLAY_1'), +(-1724017,'Halion will be pleased.',17530,1,0,0,'saviana SAY_SLAY_2'), +(-1724018,'Burn in the master\'s flame!',17532,1,0,0,'saviana SAY_SPECIAL'), + +(-1724019,'Alexstrasza has chosen capable allies... A pity that I must END YOU!',17512,1,0,0,'zarithrian SAY_AGGRO'), +(-1724020,'You thought you stood a chance?',17513,1,0,0,'zarithrian SAY_SLAY_1'), +(-1724021,'It\'s for the best.',17514,1,0,0,'zarithrian SAY_SLAY_2'), +(-1724022,'HALION! I...',17515,1,0,0,'zarithrian SAY_DEATH'), +(-1724023,'Turn them to ash, minions!',17516,1,0,0,'zarithrian SAY_SUMMON'), + +(-1724024,'Meddlesome insects! You\'re too late: The Ruby Sanctum\'s lost.',17499,6,0,0,'halion SAY_SPAWN'), +(-1724025,'Your world teeters on the brink of annihilation. You will ALL bear witness to the coming of a new age of DESTRUCTION!',17500,1,0,0,'halion SAY_AGGRO'), +(-1724026,'Another hero falls.',17501,1,0,0,'halion SAY_SLAY'), +(-1724027,'Relish this victory, mortals, for it will be your last! This world will burn with the master\'s return!',17503,1,0,0,'halion SAY_DEATH'), +(-1724028,'Not good enough.',17504,1,0,0,'halion SAY_BERSERK'), +(-1724029,'The heavens burn!',17505,1,0,0,'halion SAY_FIREBALL'), +(-1724030,'Beware the shadow!',17506,1,0,0,'halion SAY_SPHERES'), +(-1724031,'You will find only suffering within the realm of twilight! Enter if you dare!',17507,1,0,0,'halion SAY_PHASE_2'), +(-1724032,'I am the light and the darkness! Cower, mortals, before the herald of Deathwing!',17508,1,0,0,'halion SAY_PHASE_3'), +(-1724033,'The orbining spheres pulse with dark energy!',0,3,0,0,'halion EMOTE_SPHERES'), +(-1724034,'Your efforts force %s further out of the twillight realm!',0,3,0,0,'halion EMOTE_OUT_OF_TWILLIGHT'), +(-1724035,'Your efforts force %s further out of the physical realm!',0,3,0,0,'halion EMOTE_OUT_OF_PHYSICAL'), +(-1724036,'Your companions\' efforts force Halion further into the twillight realm!',0,3,0,0,'halion EMOTE_INTO_TWILLIGHT'), +(-1724037,'Your companions\' efforts force Halion further into the physical realm!',0,3,0,0,'halion EMOTE_INTO_PHYSICAL'), +(-1724038,'Without pressure in both realms %s begins to regenerate.',0,3,0,0,'halion EMOTE_REGENERATE'); From 2d3368be4c7254a08e7471fe66f529e46855c5a0 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Tue, 7 Jun 2011 20:43:34 +0200 Subject: [PATCH 0201/1172] [2221] Fix compile and add proper coordinates for general Andorov (AQ20) --- scripts/kalimdor/ruins_of_ahnqiraj/ruins_of_ahnqiraj.h | 2 +- scripts/northrend/ruby_sanctum/boss_baltharus.cpp | 2 +- scripts/northrend/ruby_sanctum/boss_halion.cpp | 2 +- scripts/northrend/ruby_sanctum/boss_saviana.cpp | 2 +- scripts/northrend/ruby_sanctum/boss_zarithrian.cpp | 2 +- sd2_revision_nr.h | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/kalimdor/ruins_of_ahnqiraj/ruins_of_ahnqiraj.h b/scripts/kalimdor/ruins_of_ahnqiraj/ruins_of_ahnqiraj.h index 0530045ce..5840906e0 100644 --- a/scripts/kalimdor/ruins_of_ahnqiraj/ruins_of_ahnqiraj.h +++ b/scripts/kalimdor/ruins_of_ahnqiraj/ruins_of_ahnqiraj.h @@ -46,7 +46,7 @@ struct SpawnLocation static const SpawnLocation aAndorovSpawnLocs[MAX_HELPERS] = { - {NPC_GENERAL_ANDOROV, -8876.97f, 1651.96f, 21.57f, 5.52f}, // fix these coords + {NPC_GENERAL_ANDOROV, -8660.4f, 1510.29f, 32.449f, 2.2184f}, {NPC_KALDOREI_ELITE, -8655.84f, 1509.78f, 32.462f, 2.33341f}, {NPC_KALDOREI_ELITE, -8657.39f, 1506.28f, 32.418f, 2.33346f}, {NPC_KALDOREI_ELITE, -8660.96f, 1504.9f, 32.1567f, 2.33306f}, diff --git a/scripts/northrend/ruby_sanctum/boss_baltharus.cpp b/scripts/northrend/ruby_sanctum/boss_baltharus.cpp index 9ff1ee01c..551ee2e35 100644 --- a/scripts/northrend/ruby_sanctum/boss_baltharus.cpp +++ b/scripts/northrend/ruby_sanctum/boss_baltharus.cpp @@ -43,7 +43,7 @@ enum SAY_SLAY_2 = -1724012, SAY_DEATH = -1724013, SAY_SPLIT = -1724014, -} +}; void AddSC_boss_baltharus() { diff --git a/scripts/northrend/ruby_sanctum/boss_halion.cpp b/scripts/northrend/ruby_sanctum/boss_halion.cpp index 01c6d56d8..bd5c824c7 100644 --- a/scripts/northrend/ruby_sanctum/boss_halion.cpp +++ b/scripts/northrend/ruby_sanctum/boss_halion.cpp @@ -41,7 +41,7 @@ enum EMOTE_INTO_TWILLIGHT = -1724036, EMOTE_INTO_PHYSICAL = -1724037, EMOTE_REGENERATE = -1724038, -} +}; void AddSC_boss_halion() { diff --git a/scripts/northrend/ruby_sanctum/boss_saviana.cpp b/scripts/northrend/ruby_sanctum/boss_saviana.cpp index 9ffa38588..c6679e020 100644 --- a/scripts/northrend/ruby_sanctum/boss_saviana.cpp +++ b/scripts/northrend/ruby_sanctum/boss_saviana.cpp @@ -30,7 +30,7 @@ enum SAY_SLAY_2 = -1724017, SAY_SPECIAL = -1724018, SOUND_DEATH = 17531, // On death it has only a screaming sound -} +}; void AddSC_boss_saviana() { diff --git a/scripts/northrend/ruby_sanctum/boss_zarithrian.cpp b/scripts/northrend/ruby_sanctum/boss_zarithrian.cpp index 78b0a6fb0..d0f01293a 100644 --- a/scripts/northrend/ruby_sanctum/boss_zarithrian.cpp +++ b/scripts/northrend/ruby_sanctum/boss_zarithrian.cpp @@ -30,7 +30,7 @@ enum SAY_SLAY_2 = -1724021, SAY_DEATH = -1724022, SAY_SUMMON = -1724023, -} +}; void AddSC_boss_zarithrian() { diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 95d617afa..d5c83208f 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2220" + #define SD2_REVISION_NR "2221" #endif // __SD2_REVISION_NR_H__ From c95d16dafc5675129df5485f7ba1fb0ef51e6733 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Tue, 7 Jun 2011 21:06:12 +0200 Subject: [PATCH 0202/1172] [2222] Remove a few double lines --- scripts/eastern_kingdoms/blackrock_spire/blackrock_spire.h | 1 - .../eastern_kingdoms/blackwing_lair/instance_blackwing_lair.cpp | 1 - scripts/eastern_kingdoms/eversong_woods.cpp | 1 - scripts/eastern_kingdoms/karazhan/boss_netherspite.cpp | 1 - .../magisters_terrace/boss_felblood_kaelthas.cpp | 2 -- .../scarlet_monastery/boss_mograine_and_whitemane.cpp | 1 - .../eastern_kingdoms/stratholme/boss_order_of_silver_hand.cpp | 1 - scripts/kalimdor/dustwallow_marsh.cpp | 1 - scripts/kalimdor/temple_of_ahnqiraj/boss_skeram.cpp | 1 - scripts/northrend/gundrak/boss_moorabi.cpp | 1 - scripts/northrend/ulduar/halls_of_stone/boss_sjonnir.cpp | 1 - .../outland/auchindoun/sethekk_halls/boss_darkweaver_syth.cpp | 1 - scripts/outland/black_temple/boss_warlord_najentus.cpp | 1 - scripts/outland/boss_doomwalker.cpp | 1 - .../coilfang_reservoir/steam_vault/instance_steam_vault.cpp | 1 - scripts/outland/netherstorm.cpp | 2 -- scripts/world/mob_generic_creature.cpp | 1 - scripts/world/npcs_special.cpp | 1 - sd2_revision_nr.h | 2 +- system/MangosdRev.cpp | 1 - 20 files changed, 1 insertion(+), 22 deletions(-) diff --git a/scripts/eastern_kingdoms/blackrock_spire/blackrock_spire.h b/scripts/eastern_kingdoms/blackrock_spire/blackrock_spire.h index f172e5e11..c2c3c29f3 100644 --- a/scripts/eastern_kingdoms/blackrock_spire/blackrock_spire.h +++ b/scripts/eastern_kingdoms/blackrock_spire/blackrock_spire.h @@ -32,7 +32,6 @@ enum GO_GYTH_COMBAT_DOOR = 175185, // control in boss_script, because will auto-close after each wave GO_GYTH_EXIT_DOOR = 175186, - GO_ROOM_7_RUNE = 175194, GO_ROOM_3_RUNE = 175195, GO_ROOM_6_RUNE = 175196, diff --git a/scripts/eastern_kingdoms/blackwing_lair/instance_blackwing_lair.cpp b/scripts/eastern_kingdoms/blackwing_lair/instance_blackwing_lair.cpp index f0bf6a206..3c53a2f78 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/instance_blackwing_lair.cpp +++ b/scripts/eastern_kingdoms/blackwing_lair/instance_blackwing_lair.cpp @@ -24,7 +24,6 @@ EndScriptData */ #include "precompiled.h" #include "blackwing_lair.h" - instance_blackwing_lair::instance_blackwing_lair(Map* pMap) : ScriptedInstance(pMap) { Initialize(); diff --git a/scripts/eastern_kingdoms/eversong_woods.cpp b/scripts/eastern_kingdoms/eversong_woods.cpp index dbfcb72eb..b31fdfd7f 100644 --- a/scripts/eastern_kingdoms/eversong_woods.cpp +++ b/scripts/eastern_kingdoms/eversong_woods.cpp @@ -538,7 +538,6 @@ CreatureAI* GetAI_npc_infused_crystalAI(Creature* pCreature) return new npc_infused_crystalAI (pCreature); } - void AddSC_eversong_woods() { Script* pNewScript; diff --git a/scripts/eastern_kingdoms/karazhan/boss_netherspite.cpp b/scripts/eastern_kingdoms/karazhan/boss_netherspite.cpp index 57955e9b3..442525d0c 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_netherspite.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_netherspite.cpp @@ -106,7 +106,6 @@ struct MANGOS_DLL_DECL boss_netherspiteAI : public ScriptedAI uint32 m_uiPhaseSwitchTimer; uint32 m_uiNetherbreathTimer; - void Reset() { m_bIsEnraged = false; diff --git a/scripts/eastern_kingdoms/magisters_terrace/boss_felblood_kaelthas.cpp b/scripts/eastern_kingdoms/magisters_terrace/boss_felblood_kaelthas.cpp index 8e13af4c9..ba4aefab3 100644 --- a/scripts/eastern_kingdoms/magisters_terrace/boss_felblood_kaelthas.cpp +++ b/scripts/eastern_kingdoms/magisters_terrace/boss_felblood_kaelthas.cpp @@ -384,7 +384,6 @@ struct MANGOS_DLL_DECL boss_felblood_kaelthasAI : public ScriptedAI m_uiGravityLapseTimer = 30000; m_uiGravityLapsePhase = 4; - for(uint8 i = 0; i < 3; ++i) { if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) @@ -518,7 +517,6 @@ struct MANGOS_DLL_DECL mob_felkael_phoenixAI : public ScriptedAI else m_uiBurnTimer -= uiDiff; - DoMeleeAttackIfReady(); } }; diff --git a/scripts/eastern_kingdoms/scarlet_monastery/boss_mograine_and_whitemane.cpp b/scripts/eastern_kingdoms/scarlet_monastery/boss_mograine_and_whitemane.cpp index 90c4c9d5d..0543821de 100644 --- a/scripts/eastern_kingdoms/scarlet_monastery/boss_mograine_and_whitemane.cpp +++ b/scripts/eastern_kingdoms/scarlet_monastery/boss_mograine_and_whitemane.cpp @@ -243,7 +243,6 @@ struct MANGOS_DLL_DECL boss_high_inquisitor_whitemaneAI : public ScriptedAI } } - void JustReachedHome() { if (m_pInstance) diff --git a/scripts/eastern_kingdoms/stratholme/boss_order_of_silver_hand.cpp b/scripts/eastern_kingdoms/stratholme/boss_order_of_silver_hand.cpp index e7a59e355..2fd514fd3 100644 --- a/scripts/eastern_kingdoms/stratholme/boss_order_of_silver_hand.cpp +++ b/scripts/eastern_kingdoms/stratholme/boss_order_of_silver_hand.cpp @@ -142,7 +142,6 @@ CreatureAI* GetAI_boss_silver_hand_bossesAI(Creature* pCreature) return new boss_silver_hand_bossesAI(pCreature); } - void AddSC_boss_order_of_silver_hand() { Script *newscript; diff --git a/scripts/kalimdor/dustwallow_marsh.cpp b/scripts/kalimdor/dustwallow_marsh.cpp index 9d905ea90..8e077731f 100644 --- a/scripts/kalimdor/dustwallow_marsh.cpp +++ b/scripts/kalimdor/dustwallow_marsh.cpp @@ -50,7 +50,6 @@ enum NPC_RISEN_SPIRIT = 23554 }; - struct MANGOS_DLL_DECL mobs_risen_husk_spiritAI : public ScriptedAI { mobs_risen_husk_spiritAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_skeram.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_skeram.cpp index aad80e5d2..80381f42b 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/boss_skeram.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_skeram.cpp @@ -298,7 +298,6 @@ struct MANGOS_DLL_DECL boss_skeramAI : public ScriptedAI Image2->AI()->AttackStart(target); } - Invisible = true; delete place1; delete place2; diff --git a/scripts/northrend/gundrak/boss_moorabi.cpp b/scripts/northrend/gundrak/boss_moorabi.cpp index 0ef08cdd4..f129b15d9 100644 --- a/scripts/northrend/gundrak/boss_moorabi.cpp +++ b/scripts/northrend/gundrak/boss_moorabi.cpp @@ -66,7 +66,6 @@ struct MANGOS_DLL_DECL boss_moorabiAI : public ScriptedAI instance_gundrak* m_pInstance; bool m_bIsRegularMode; - uint32 m_uiStabTimer; // used for stab and gore uint32 m_uiQuakeTimer; // used for quake and ground tremor uint32 m_uiRoarTimer; // both roars on it diff --git a/scripts/northrend/ulduar/halls_of_stone/boss_sjonnir.cpp b/scripts/northrend/ulduar/halls_of_stone/boss_sjonnir.cpp index c1e1d0866..ad5b1d24f 100644 --- a/scripts/northrend/ulduar/halls_of_stone/boss_sjonnir.cpp +++ b/scripts/northrend/ulduar/halls_of_stone/boss_sjonnir.cpp @@ -95,7 +95,6 @@ struct MANGOS_DLL_DECL boss_sjonnirAI : public ScriptedAI m_creature->CastSpell(m_creature, m_bIsRegularMode ? SPELL_SUMMON_IRON_TROGG : SPELL_SUMMON_IRON_TROGG_H, true); } - void JustSummoned(Creature* pSummoned) { if (pSummoned->GetEntry() == NPC_IRON_TROGG || pSummoned->GetEntry() == NPC_IRON_DWARF || pSummoned->GetEntry() == NPC_MALFORMED_OOZE) diff --git a/scripts/outland/auchindoun/sethekk_halls/boss_darkweaver_syth.cpp b/scripts/outland/auchindoun/sethekk_halls/boss_darkweaver_syth.cpp index 25d124eaf..90df11fbb 100644 --- a/scripts/outland/auchindoun/sethekk_halls/boss_darkweaver_syth.cpp +++ b/scripts/outland/auchindoun/sethekk_halls/boss_darkweaver_syth.cpp @@ -215,7 +215,6 @@ struct MANGOS_DLL_DECL mob_syth_fireAI : public ScriptedAI uint32 flameshock_timer; uint32 flamebuffet_timer; - void Reset() { m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_FIRE, true); diff --git a/scripts/outland/black_temple/boss_warlord_najentus.cpp b/scripts/outland/black_temple/boss_warlord_najentus.cpp index ab701130a..63c19886a 100644 --- a/scripts/outland/black_temple/boss_warlord_najentus.cpp +++ b/scripts/outland/black_temple/boss_warlord_najentus.cpp @@ -198,7 +198,6 @@ struct MANGOS_DLL_DECL boss_najentusAI : public ScriptedAI else m_uiNeedleSpineTimer -= uiDiff; - DoMeleeAttackIfReady(); } }; diff --git a/scripts/outland/boss_doomwalker.cpp b/scripts/outland/boss_doomwalker.cpp index a1ba497f5..1244e3f41 100644 --- a/scripts/outland/boss_doomwalker.cpp +++ b/scripts/outland/boss_doomwalker.cpp @@ -91,7 +91,6 @@ struct MANGOS_DLL_DECL boss_doomwalkerAI : public ScriptedAI DoScriptText(SAY_AGGRO, m_creature); } - void MoveInLineOfSight(Unit *who) { if (who && who->GetTypeId() == TYPEID_PLAYER && m_creature->IsHostileTo(who)) diff --git a/scripts/outland/coilfang_reservoir/steam_vault/instance_steam_vault.cpp b/scripts/outland/coilfang_reservoir/steam_vault/instance_steam_vault.cpp index 7d7a61363..2e50852d4 100644 --- a/scripts/outland/coilfang_reservoir/steam_vault/instance_steam_vault.cpp +++ b/scripts/outland/coilfang_reservoir/steam_vault/instance_steam_vault.cpp @@ -24,7 +24,6 @@ EndScriptData */ #include "precompiled.h" #include "steam_vault.h" - /* Steam Vaults encounters: 1 - Hydromancer Thespia Event 2 - Mekgineer Steamrigger Event diff --git a/scripts/outland/netherstorm.cpp b/scripts/outland/netherstorm.cpp index 5cf5a9dd3..87864213a 100644 --- a/scripts/outland/netherstorm.cpp +++ b/scripts/outland/netherstorm.cpp @@ -615,8 +615,6 @@ bool AreaTrigger_at_commander_dawnforge(Player* pPlayer, AreaTriggerEntry const* pDawnforgeAI->CanStartEvent(pPlayer); return true; } - - } return false; } diff --git a/scripts/world/mob_generic_creature.cpp b/scripts/world/mob_generic_creature.cpp index 39f6d0e51..1899de44f 100644 --- a/scripts/world/mob_generic_creature.cpp +++ b/scripts/world/mob_generic_creature.cpp @@ -145,7 +145,6 @@ struct MANGOS_DLL_DECL generic_creatureAI : public ScriptedAI //Set our global cooldown GlobalCooldown = GENERIC_CREATURE_COOLDOWN; - }//If no spells available and we arn't moving run to target else if (IsSelfRooted) { diff --git a/scripts/world/npcs_special.cpp b/scripts/world/npcs_special.cpp index 12581ba93..bfeb13e88 100644 --- a/scripts/world/npcs_special.cpp +++ b/scripts/world/npcs_special.cpp @@ -1634,7 +1634,6 @@ enum #define GOSSIP_LOST_THE_MASTERS_KEY "I've lost my key to the Karazhan." #define GOSSIP_LOST_VIOLET_HOLD_KEY "I've lost my key to the Violet Hold." - bool GossipHello_npc_locksmith(Player* pPlayer, Creature* pCreature) { diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index d5c83208f..c2e21dede 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2221" + #define SD2_REVISION_NR "2222" #endif // __SD2_REVISION_NR_H__ diff --git a/system/MangosdRev.cpp b/system/MangosdRev.cpp index f47abb874..430b2bbf2 100644 --- a/system/MangosdRev.cpp +++ b/system/MangosdRev.cpp @@ -12,7 +12,6 @@ # define MANGOS_DLL_EXPORT extern "C" export #endif - MANGOS_DLL_EXPORT char const* GetMangosRevStr() { From 9a2080006628ff16493ffc69494ba20f182326fb Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Fri, 10 Jun 2011 15:10:33 +0200 Subject: [PATCH 0203/1172] [2223] Fix Compile for MaNGOS Rev [11619] --- .../blackrock_spire/instance_blackrock_spire.cpp | 2 +- .../sunwell_plateau/instance_sunwell_plateau.cpp | 2 +- .../frozen_halls/forge_of_souls/instance_forge_of_souls.cpp | 2 +- sd2_revision_nr.h | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/eastern_kingdoms/blackrock_spire/instance_blackrock_spire.cpp b/scripts/eastern_kingdoms/blackrock_spire/instance_blackrock_spire.cpp index 156693d9c..1c7a8c207 100644 --- a/scripts/eastern_kingdoms/blackrock_spire/instance_blackrock_spire.cpp +++ b/scripts/eastern_kingdoms/blackrock_spire/instance_blackrock_spire.cpp @@ -170,7 +170,7 @@ void instance_blackrock_spire::SetData64(uint32 uiType, uint64 uiData) { if (m_aRoomRuneGuid[i]) // This check is used, to ensure which runes still need processing { - m_alRoomEventMobGUIDSorted[i].remove(uiData); + m_alRoomEventMobGUIDSorted[i].remove(ObjectGuid(uiData)); if (m_alRoomEventMobGUIDSorted[i].empty()) { DoUseDoorOrButton(m_aRoomRuneGuid[i]); diff --git a/scripts/eastern_kingdoms/sunwell_plateau/instance_sunwell_plateau.cpp b/scripts/eastern_kingdoms/sunwell_plateau/instance_sunwell_plateau.cpp index b0c725364..922be413b 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/instance_sunwell_plateau.cpp +++ b/scripts/eastern_kingdoms/sunwell_plateau/instance_sunwell_plateau.cpp @@ -174,7 +174,7 @@ void instance_sunwell_plateau::SetData(uint32 uiType, uint32 uiData) void instance_sunwell_plateau::SetData64(uint32 uiType, uint64 uiData) { if (uiType == DATA_PLAYER_SPECTRAL_REALM) - SpectralRealmList.push_back(uiData); + SpectralRealmList.push_back(ObjectGuid(uiData)); } uint32 instance_sunwell_plateau::GetData(uint32 uiType) diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/instance_forge_of_souls.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/instance_forge_of_souls.cpp index 9b2bd9288..1bf431a44 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/instance_forge_of_souls.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/instance_forge_of_souls.cpp @@ -194,7 +194,7 @@ uint32 instance_forge_of_souls::GetData(uint32 uiType) void instance_forge_of_souls::SetData64(uint32 uiType, uint64 uiData) { if (uiType == DATA_SOULFRAGMENT_REMOVE) - m_luiSoulFragmentAliveGUIDs.remove(uiData); + m_luiSoulFragmentAliveGUIDs.remove(ObjectGuid(uiData)); } InstanceData* GetInstanceData_instance_forge_of_souls(Map* pMap) diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index c2e21dede..229b4c21f 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2222" + #define SD2_REVISION_NR "2223" #endif // __SD2_REVISION_NR_H__ From d45bfbf496f080f0616351a0874ebd0122ae60f5 Mon Sep 17 00:00:00 2001 From: VladimirMangos Date: Sat, 11 Jun 2011 18:52:38 +0200 Subject: [PATCH 0204/1172] [2224] Use IsFitToFamilyMask wrapper instead of direct access --- scripts/kalimdor/azuremyst_isle.cpp | 2 +- sd2_revision_nr.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/kalimdor/azuremyst_isle.cpp b/scripts/kalimdor/azuremyst_isle.cpp index be243d354..f87a61e1a 100644 --- a/scripts/kalimdor/azuremyst_isle.cpp +++ b/scripts/kalimdor/azuremyst_isle.cpp @@ -103,7 +103,7 @@ struct MANGOS_DLL_DECL npc_draenei_survivorAI : public ScriptedAI void SpellHit(Unit* pCaster, const SpellEntry* pSpell) { - if (pSpell->SpellFamilyFlags2 & 0x080000000) + if (pSpell->IsFitToFamilyMask(UI64LIT(0x0000000000000000), 0x080000000)) { m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PVP_ATTACKABLE); m_creature->SetStandState(UNIT_STAND_STATE_STAND); diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 229b4c21f..528b1c60c 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2223" + #define SD2_REVISION_NR "2224" #endif // __SD2_REVISION_NR_H__ From 9449908d2991c8893edc868401392a93959faae7 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Sat, 11 Jun 2011 19:08:31 +0200 Subject: [PATCH 0205/1172] [2225] Update TBC-patch --- ..._to_MaNGOS_one.patch => ScriptDev2_2224_to_MaNGOS_one.patch} | 2 +- sd2_revision_nr.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) rename patches/custom/{ScriptDev2_2007_to_MaNGOS_one.patch => ScriptDev2_2224_to_MaNGOS_one.patch} (99%) diff --git a/patches/custom/ScriptDev2_2007_to_MaNGOS_one.patch b/patches/custom/ScriptDev2_2224_to_MaNGOS_one.patch similarity index 99% rename from patches/custom/ScriptDev2_2007_to_MaNGOS_one.patch rename to patches/custom/ScriptDev2_2224_to_MaNGOS_one.patch index 822d39d21..450fb68e3 100644 --- a/patches/custom/ScriptDev2_2007_to_MaNGOS_one.patch +++ b/patches/custom/ScriptDev2_2224_to_MaNGOS_one.patch @@ -58,7 +58,7 @@ index 94879c4..8aef16e 100644 void SpellHit(Unit* pCaster, const SpellEntry* pSpell) { -- if (pSpell->SpellFamilyFlags2 & 0x080000000) +- if (pSpell->IsFitToFamilyMask(UI64LIT(0x0000000000000000), 0x080000000)) + if (pSpell->Id == 28880) { m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PVP_ATTACKABLE); diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 528b1c60c..70759584d 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2224" + #define SD2_REVISION_NR "2225" #endif // __SD2_REVISION_NR_H__ From 557dbb290ecd19a13832a167b4d1b93136ec8cfd Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Wed, 22 Jun 2011 19:35:54 +0200 Subject: [PATCH 0206/1172] [2226] Comment weird return in Scarlet Monastery, thanks to Goaul for pointing --- .../scarlet_monastery/boss_azshir_the_sleepless.cpp | 2 +- sd2_revision_nr.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/eastern_kingdoms/scarlet_monastery/boss_azshir_the_sleepless.cpp b/scripts/eastern_kingdoms/scarlet_monastery/boss_azshir_the_sleepless.cpp index 26cebf953..dcb3b6d47 100644 --- a/scripts/eastern_kingdoms/scarlet_monastery/boss_azshir_the_sleepless.cpp +++ b/scripts/eastern_kingdoms/scarlet_monastery/boss_azshir_the_sleepless.cpp @@ -54,7 +54,7 @@ struct MANGOS_DLL_DECL boss_azshir_the_sleeplessAI : public ScriptedAI if (SoulSiphon_Timer < diff) { DoCastSpellIfCan(m_creature->getVictim(),SPELL_SOULSIPHON); - return; + // return; // Why was this return here? SoulSiphon_Timer = 20000; }else SoulSiphon_Timer -= diff; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 70759584d..ef217f92d 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2225" + #define SD2_REVISION_NR "2226" #endif // __SD2_REVISION_NR_H__ From 5ac688718162daabc91c712fcee280d2c7cb3da3 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Sat, 25 Jun 2011 01:28:09 +0200 Subject: [PATCH 0207/1172] [2227] Implement Drak Tharon Keep - Novos the Summoner Thanks to Nonid for old EventAI script for timers and base mechanics The visual Beam Channel spells need some core fix to proper ignore LoS barriers --- .../northrend/draktharon_keep/boss_novos.cpp | 302 +++++++++++++++++- .../draktharon_keep/draktharon_keep.h | 41 +++ .../instance_draktharon_keep.cpp | 182 ++++++++++- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 + sql/updates/r2227_mangos.sql | 1 + 6 files changed, 520 insertions(+), 9 deletions(-) create mode 100644 sql/updates/r2227_mangos.sql diff --git a/scripts/northrend/draktharon_keep/boss_novos.cpp b/scripts/northrend/draktharon_keep/boss_novos.cpp index 5449fec4c..13a9a1181 100644 --- a/scripts/northrend/draktharon_keep/boss_novos.cpp +++ b/scripts/northrend/draktharon_keep/boss_novos.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: Boss_Novos -SD%Complete: 20% -SDComment: +SD%Complete: 80% +SDComment: Summon Timers are vague, many visual spells fail (LoS) SDCategory: Drak'Tharon Keep EndScriptData */ @@ -35,30 +35,106 @@ enum EMOTE_ASSISTANCE = -1600011, + SPELL_ARCANE_FIELD = 47346, + SPELL_IMMUNITY = 34098, + SPELL_SUMMON_MINIONS_H = 59910, // (at least) on Phase-Switch, TODO1 research on appearence; TODO2 implement spell. Triggers 59935, 59938, 59939, 59940 + SPELL_FROSTBOLT = 49037, + SPELL_FROSTBOLT_H = 59855, + SPELL_ARCANE_BLAST = 49198, + SPELL_ARCANE_BLAST_H = 59909, + SPELL_BLIZZARD = 49034, + SPELL_BLIZZARD_H = 59854, + SPELL_TOUCH_OF_MISERY = 50090, // TODO - purpose of this spell (triggers SPELL_WRATH_OF_MISERY) unknown + SPELL_WRATH_OF_MISERY = 50089, + SPELL_WRATH_OF_MISERY_H = 59856, + + // SPELL_SUMMON_CRYSTAL_HANDLER = 49179, // Spell seems to be unused, perhaps only server-side, and especially no suitable positioned caster are found for this spell + SPELL_SUMMON_FETID_TROLL_CORPSE = 49103, + SPELL_SUMMON_HULKING_CORPSE = 49104, + SPELL_SUMMON_RISON_SHADOWCASTER = 49105, + + // Spells 'Crystal Handler Death' 47336, 55801, 55803, 55805 (defined in instance script) + NPC_CRYSTAL_HANDLER = 26627, NPC_HULKING_CORPSE = 27597, NPC_FETID_TROLL_CORPSE = 27598, NPC_RISON_SHADOWCASTER = 27600 }; +// The Crystal Handlers are summoned around the two entrances of the room +static const float aHandlerSummonPos[2][3] = +{ + {-342.894836f, -727.016846f, 28.581081f}, + {-410.644653f, -731.826904f, 28.580412f} +}; + /*###### ## boss_novos ######*/ -struct MANGOS_DLL_DECL boss_novosAI : public ScriptedAI +enum Phases { - boss_novosAI(Creature* pCreature) : ScriptedAI(pCreature) + PHASE_SHIELDED = 0, + PHASE_WAITING = 1, + PHASE_NORMAL = 2, +}; + +struct MANGOS_DLL_DECL boss_novosAI : public Scripted_NoMovementAI +{ + boss_novosAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { - m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_pInstance = (instance_draktharon_keep*)pCreature->GetInstanceData(); m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); Reset(); } - ScriptedInstance* m_pInstance; + instance_draktharon_keep* m_pInstance; bool m_bIsRegularMode; + uint32 m_uiSummonHandlerTimer; // TODO the summoning timers are weak + uint32 m_uiSummonShadowcasterTimer; + uint32 m_uiSummonFetidTrollTimer; + uint32 m_uiSummonHulkingCorpseTimer; + uint32 m_uiPhaseTimer; + uint32 m_uiArcaneBlastTimer; + uint32 m_uiBlizzardTimer; + uint32 m_uiWrathTimer; + + uint8 m_uiSummonedHandlers; + uint8 m_uiLostCrystals; + Phases m_uiPhase; + void Reset() { + m_uiSummonHandlerTimer = 25000; + m_uiSummonShadowcasterTimer = 3000; + m_uiSummonFetidTrollTimer = 10000; + m_uiSummonHulkingCorpseTimer = 30000; + m_uiPhaseTimer = 3000; + m_uiArcaneBlastTimer = urand(6000, 8000); + m_uiBlizzardTimer = urand(8000, 12000); + m_uiWrathTimer = urand(12000, 15000); + + m_uiSummonedHandlers = 0; + m_uiLostCrystals = 0; + // This ensures that in the shield phase m_pInstance is valid + m_uiPhase = m_pInstance ? PHASE_SHIELDED : PHASE_NORMAL; + } + + void LostOneCrystal() + { + ++m_uiLostCrystals; + + DoScriptText(urand(0, 1) ? SAY_BUBBLE_1 : SAY_BUBBLE_2, m_creature); + + if (m_uiLostCrystals == MAX_CRYSTALS) + { + // Enter Phase 2 + if (m_bIsRegularMode) + DoCastSpellIfCan(m_creature, SPELL_SUMMON_MINIONS_H); + + m_uiPhase = PHASE_WAITING; + } } void MoveInLineOfSight(Unit* pWho) @@ -79,6 +155,9 @@ struct MANGOS_DLL_DECL boss_novosAI : public ScriptedAI { DoScriptText(SAY_AGGRO, m_creature); + DoCastSpellIfCan(m_creature, SPELL_ARCANE_FIELD); + DoCastSpellIfCan(m_creature, SPELL_IMMUNITY, CAST_TRIGGERED); + if (m_pInstance) m_pInstance->SetData(TYPE_NOVOS, IN_PROGRESS); } @@ -102,12 +181,129 @@ struct MANGOS_DLL_DECL boss_novosAI : public ScriptedAI m_pInstance->SetData(TYPE_NOVOS, FAIL); } + void JustSummoned(Creature* pSummoned) + { + switch (pSummoned->GetEntry()) + { + case NPC_CRYSTAL_HANDLER: + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + pSummoned->AI()->AttackStart(pTarget); + break; + } + } + + void SummonedCreatureJustDied(Creature* pSummoned) + { + if (pSummoned->GetEntry() == NPC_CRYSTAL_HANDLER) + { + uint8 uiIndex = 0; + if (m_pInstance) + { + if (Creature* pTarget = m_pInstance->GetNextCrystalTarget(pSummoned, uiIndex)) + pSummoned->CastSpell(pTarget, aCrystalHandlerDeathSpells[uiIndex], true, NULL, NULL, m_creature->GetObjectGuid()); + } + } + } + void UpdateAI(const uint32 uiDiff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - DoMeleeAttackIfReady(); + switch (m_uiPhase) + { + case PHASE_SHIELDED: // Event Phase, only summoning of mobs + if (m_uiSummonHandlerTimer < uiDiff) + { + float fX, fY, fZ; + ++m_uiSummonedHandlers; + m_creature->GetRandomPoint(aHandlerSummonPos[m_uiSummonedHandlers % 2][0], aHandlerSummonPos[m_uiSummonedHandlers % 2][1], aHandlerSummonPos[m_uiSummonedHandlers % 2][2], 10.0f, fX, fY, fZ); + m_creature->SummonCreature(NPC_CRYSTAL_HANDLER, fX, fY, fZ, 0.0f, TEMPSUMMON_DEAD_DESPAWN, 0); + + DoScriptText(SAY_ADDS, m_creature); + DoScriptText(EMOTE_ASSISTANCE, m_creature); + + m_uiSummonHandlerTimer = 40000; + } + else + m_uiSummonHandlerTimer -= uiDiff; + + if (m_uiSummonShadowcasterTimer < uiDiff) + { + if (Creature* pSummoner = m_pInstance->GetSummonDummy()) + pSummoner->CastSpell(pSummoner, SPELL_SUMMON_RISON_SHADOWCASTER, false, NULL, NULL, m_creature->GetObjectGuid()); + m_uiSummonShadowcasterTimer = 25000; + } + else + m_uiSummonShadowcasterTimer -= uiDiff; + + if (m_uiSummonFetidTrollTimer < uiDiff) + { + if (Creature* pSummoner = m_pInstance->GetSummonDummy()) + pSummoner->CastSpell(pSummoner, SPELL_SUMMON_FETID_TROLL_CORPSE, false, NULL, NULL, m_creature->GetObjectGuid()); + m_uiSummonFetidTrollTimer = 5000; + } + else + m_uiSummonFetidTrollTimer -= uiDiff; + + if (m_uiSummonHulkingCorpseTimer < uiDiff) + { + if (Creature* pSummoner = m_pInstance->GetSummonDummy()) + pSummoner->CastSpell(pSummoner, SPELL_SUMMON_HULKING_CORPSE, false, NULL, NULL, m_creature->GetObjectGuid()); + m_uiSummonHulkingCorpseTimer = 30000; + } + else + m_uiSummonHulkingCorpseTimer -= uiDiff; + + break; + + case PHASE_WAITING: // Short delay between last destroyed crystal and entering combat + if (m_uiPhaseTimer < uiDiff) + { + m_uiPhase = PHASE_NORMAL; + // Remove Immunity and Shield Aura + m_creature->InterruptNonMeleeSpells(true); + m_creature->RemoveAllAuras(); + } + else + m_uiPhaseTimer -= uiDiff; + + break; + + case PHASE_NORMAL: // Normal Phase, attack enemies + if (m_uiArcaneBlastTimer < uiDiff) + { + // TODO - might be possible that this spell is only casted, when there is an enemy in range + if (DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_ARCANE_BLAST : SPELL_ARCANE_BLAST_H) == CAST_OK) + m_uiArcaneBlastTimer = urand(7000, 9000); + } + else + m_uiArcaneBlastTimer -= uiDiff; + + if (m_uiBlizzardTimer < uiDiff) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + if (DoCastSpellIfCan(pTarget, m_bIsRegularMode ? SPELL_BLIZZARD : SPELL_BLIZZARD_H) == CAST_OK) + m_uiBlizzardTimer = urand(9000, 13500); + } + else + m_uiBlizzardTimer -= uiDiff; + + if (m_uiWrathTimer < uiDiff) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + if (DoCastSpellIfCan(pTarget, m_bIsRegularMode ? SPELL_WRATH_OF_MISERY : SPELL_WRATH_OF_MISERY_H) == CAST_OK) + m_uiWrathTimer = urand(12500, 17200); + } + else + m_uiWrathTimer -= uiDiff; + + if (!m_creature->IsNonMeleeSpellCasted(true)) // TODO Use this additional check, because might want to change the random target to be a target that is in LoS (which then is expensive) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + DoCastSpellIfCan(pTarget, m_bIsRegularMode ? SPELL_FROSTBOLT : SPELL_FROSTBOLT_H); + + break; + } } }; @@ -116,6 +312,92 @@ CreatureAI* GetAI_boss_novos(Creature* pCreature) return new boss_novosAI(pCreature); } +// Small helper script to handle summoned adds for Novos +struct MANGOS_DLL_DECL npc_crystal_channel_targetAI : public ScriptedAI +{ + npc_crystal_channel_targetAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (instance_draktharon_keep*)pCreature->GetInstanceData(); + } + + instance_draktharon_keep* m_pInstance; + + void Reset() {} + void MoveInLineOfSight(Unit* pWho) {} + void AttackStart(Unit* pWho) {} + void UpdateAI(const uint32 uiDiff) {} + + void JustSummoned(Creature* pSummoned) + { + if (pSummoned->GetEntry() == NPC_HULKING_CORPSE || pSummoned->GetEntry() == NPC_FETID_TROLL_CORPSE || pSummoned->GetEntry() == NPC_RISON_SHADOWCASTER) + { + // Let them move down the stairs + float fX, fY, fZ; + + // The end of the stairs is approximately at 1/3 of the way between summoning-position and novos, height of Novos + if (Creature* pNovos = m_pInstance->GetSingleCreatureFromStorage(NPC_NOVOS)) + { + m_creature->GetRandomPoint(0.70*pNovos->GetPositionX() + 0.30*pSummoned->GetPositionX(), 0.70*pNovos->GetPositionY() + 0.30*pSummoned->GetPositionY(), pNovos->GetPositionZ() + 1.5f, 4.0f, fX, fY, fZ); + pSummoned->GetMotionMaster()->MovePoint(1, fX, fY, fZ); + } + } + } + + void SummonedMovementInform(Creature* pSummoned, uint32 uiMotionType, uint32 uiPointId) + { + if (uiPointId != 1 || uiMotionType != POINT_MOTION_TYPE || (pSummoned->GetEntry() != NPC_HULKING_CORPSE && pSummoned->GetEntry() != NPC_FETID_TROLL_CORPSE && pSummoned->GetEntry() != NPC_RISON_SHADOWCASTER)) + return; + + if (!pSummoned->isInCombat() && m_pInstance) + { + if (Creature* pNovos = m_pInstance->GetSingleCreatureFromStorage(NPC_NOVOS)) + { + if (Unit* pTarget = pNovos->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + pSummoned->AI()->AttackStart(pTarget); + } + } + } +}; + +CreatureAI* GetAI_npc_crystal_channel_target(Creature* pCreature) +{ + return new npc_crystal_channel_targetAI(pCreature); +} + + +// Handling of the dummy auras of Crystal Handler Death spells, on remove the Crystal needs to be opened +bool EffectAuraDummy_npc_crystal_channel_target(const Aura* pAura, bool bApply) +{ + for (uint8 i = 0; i < MAX_CRYSTALS; ++i) + { + if (pAura->GetId() == aCrystalHandlerDeathSpells[i]) + { + if (pAura->GetEffIndex() == EFFECT_INDEX_0 && !bApply) + { + if (Creature* pCreature = (Creature*)pAura->GetTarget()) + { + if (instance_draktharon_keep* pInstance = (instance_draktharon_keep*)pCreature->GetInstanceData()) + { + if (pInstance->GetData(TYPE_NOVOS) == NOT_STARTED || pInstance->GetData(TYPE_NOVOS) == FAIL) + return true; + + pInstance->DoHandleCrystal(i); + + // Inform Novos about removed + if (Creature* pNovos = pInstance->GetSingleCreatureFromStorage(NPC_NOVOS)) + if (boss_novosAI* pNovosAI = dynamic_cast(pNovos->AI())) + pNovosAI->LostOneCrystal(); + } + } + } + + return true; + } + } + + return false; +} + void AddSC_boss_novos() { Script* pNewScript; @@ -124,4 +406,10 @@ void AddSC_boss_novos() pNewScript->Name = "boss_novos"; pNewScript->GetAI = &GetAI_boss_novos; pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_crystal_channel_target"; + pNewScript->GetAI = &GetAI_npc_crystal_channel_target; + pNewScript->pEffectAuraDummy = &EffectAuraDummy_npc_crystal_channel_target; + pNewScript->RegisterSelf(); } diff --git a/scripts/northrend/draktharon_keep/draktharon_keep.h b/scripts/northrend/draktharon_keep/draktharon_keep.h index 876cd87fb..8e924e348 100644 --- a/scripts/northrend/draktharon_keep/draktharon_keep.h +++ b/scripts/northrend/draktharon_keep/draktharon_keep.h @@ -14,18 +14,43 @@ enum TYPE_KING_DRED = 2, TYPE_THARONJA = 3, + NPC_NOVOS = 26631, NPC_KING_DRED = 27483, // Adds of King Dred Encounter - deaths counted for achievement NPC_DRAKKARI_GUTRIPPER = 26641, NPC_DRAKKARI_SCYTHECLAW = 26628, + // Novos Encounter + SPELL_BEAM_CHANNEL = 52106, + SPELL_CRYSTAL_HANDLER_DEATH_1 = 47336, + SPELL_CRYSTAL_HANDLER_DEATH_2 = 55801, + SPELL_CRYSTAL_HANDLER_DEATH_3 = 55803, + SPELL_CRYSTAL_HANDLER_DEATH_4 = 55805, + + MAX_CRYSTALS = 4, + NPC_CRYSTAL_CHANNEL_TARGET = 26712, + GO_CRYSTAL_SW = 189299, + GO_CRYSTAL_NE = 189300, + GO_CRYSTAL_NW = 189301, + GO_CRYSTAL_SE = 189302, + // Achievement Criterias to be handled with SD2 ACHIEV_CRIT_BETTER_OFF_DREAD = 7318, ACHIEV_CRIT_CONSUME_JUNCTION = 7579, ACHIEV_CRIT_OH_NOVOS = 7361, }; +static const uint32 aCrystalHandlerDeathSpells[MAX_CRYSTALS] = + {SPELL_CRYSTAL_HANDLER_DEATH_1, SPELL_CRYSTAL_HANDLER_DEATH_2, SPELL_CRYSTAL_HANDLER_DEATH_3, SPELL_CRYSTAL_HANDLER_DEATH_4}; + +struct NovosCrystalInfo +{ + ObjectGuid m_crystalGuid; + ObjectGuid m_channelGuid; + bool m_bWasUsed; +}; + class MANGOS_DLL_DECL instance_draktharon_keep : public ScriptedInstance { public: @@ -41,18 +66,34 @@ class MANGOS_DLL_DECL instance_draktharon_keep : public ScriptedInstance void OnCreatureEvade(Creature* pCreature); void OnCreatureDeath(Creature* pCreature); + void OnCreatureCreate(Creature* pCreature); + void OnObjectCreate(GameObject* pGo); + bool CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/); const char* Save() { return m_strInstData.c_str(); } void Load(const char* chrIn); + Creature* GetNextCrystalTarget(Creature* pCrystalHandler, uint8& uiIndex); + void DoHandleCrystal(uint8 uiIndex); + Creature* GetSummonDummy(); + protected: + void DoSortNovosDummies(); + uint32 m_auiEncounter[MAX_ENCOUNTER]; std::string m_strInstData; uint32 m_uiDreadAddsKilled; bool m_bNovosAddGrounded; bool m_bTrollgoreConsume; + + ObjectGuid m_novosChannelGuid; + + NovosCrystalInfo m_aNovosCrystalInfo[MAX_CRYSTALS]; + + GUIDVector m_vSummonDummyGuids; + GUIDList m_lNovosDummyGuids; }; #endif diff --git a/scripts/northrend/draktharon_keep/instance_draktharon_keep.cpp b/scripts/northrend/draktharon_keep/instance_draktharon_keep.cpp index 9b35c64c8..6781270bd 100644 --- a/scripts/northrend/draktharon_keep/instance_draktharon_keep.cpp +++ b/scripts/northrend/draktharon_keep/instance_draktharon_keep.cpp @@ -58,6 +58,153 @@ void instance_draktharon_keep::OnCreatureDeath(Creature* pCreature) SetData(TYPE_KING_DRED, DONE); } +void instance_draktharon_keep::OnCreatureCreate(Creature* pCreature) +{ + switch (pCreature->GetEntry()) + { + case NPC_NOVOS: + m_mNpcEntryGuidStore[NPC_NOVOS] = pCreature->GetObjectGuid(); + break; + case NPC_CRYSTAL_CHANNEL_TARGET: + m_lNovosDummyGuids.push_back(pCreature->GetObjectGuid()); + break; + } +} + +void instance_draktharon_keep::OnObjectCreate(GameObject* pGo) +{ + switch (pGo->GetEntry()) + { + case GO_CRYSTAL_SW: m_aNovosCrystalInfo[0].m_crystalGuid = pGo->GetObjectGuid(); break; + case GO_CRYSTAL_NW: m_aNovosCrystalInfo[1].m_crystalGuid = pGo->GetObjectGuid(); break; + case GO_CRYSTAL_SE: m_aNovosCrystalInfo[2].m_crystalGuid = pGo->GetObjectGuid(); break; + case GO_CRYSTAL_NE: m_aNovosCrystalInfo[3].m_crystalGuid = pGo->GetObjectGuid(); break; + } +} + +void instance_draktharon_keep::DoSortNovosDummies() +{ + // Sorting once is good enough + if (m_lNovosDummyGuids.empty()) + return; + + Creature* pNovos = GetSingleCreatureFromStorage(NPC_NOVOS); + if (!pNovos) + return; + + // First sort the Dummies to the Crystals + for (uint8 i = 0; i < MAX_CRYSTALS; ++i) + { + GameObject* pCrystal = instance->GetGameObject(m_aNovosCrystalInfo[i].m_crystalGuid); + if (!pCrystal) + continue; + + for (GUIDList::iterator itr = m_lNovosDummyGuids.begin(); itr != m_lNovosDummyGuids.end();) + { + Creature* pDummy = instance->GetCreature(*itr); + if (!pDummy) + { + m_lNovosDummyGuids.erase(itr++); + continue; + } + + // Check if dummy fits to crystal + if (pCrystal->IsWithinDistInMap(pDummy, INTERACTION_DISTANCE, false)) + { + m_aNovosCrystalInfo[i].m_channelGuid = pDummy->GetObjectGuid(); + m_lNovosDummyGuids.erase(itr); + break; + } + + ++itr; + } + } + + // Find the crystal channel target (above Novos) + float fNovosX, fNovosY, fNovosZ; + pNovos->GetRespawnCoord(fNovosX, fNovosY, fNovosZ); + for (GUIDList::iterator itr = m_lNovosDummyGuids.begin(); itr != m_lNovosDummyGuids.end();) + { + Creature* pDummy = instance->GetCreature(*itr); + if (!pDummy) + { + m_lNovosDummyGuids.erase(itr++); + continue; + } + + // As the wanted dummy is exactly above Novos, check small range, and only 2d + if (pDummy->IsWithinDist2d(fNovosX, fNovosY, 5.0f)) + { + m_novosChannelGuid = pDummy->GetObjectGuid(); + m_lNovosDummyGuids.erase(itr); + break; + } + + ++itr; + } + + // Summon positions (at end of stairs) + for (GUIDList::iterator itr = m_lNovosDummyGuids.begin(); itr != m_lNovosDummyGuids.end();) + { + Creature* pDummy = instance->GetCreature(*itr); + if (!pDummy) + { + m_lNovosDummyGuids.erase(itr++); + continue; + } + + // The wanted dummies are quite above Novos + if (pDummy->GetPositionZ() > fNovosZ + 20.0f) + { + m_vSummonDummyGuids.push_back(pDummy->GetObjectGuid()); + m_lNovosDummyGuids.erase(itr++); + } + else + ++itr; + } + + // Clear remaining (unused) dummies + m_lNovosDummyGuids.clear(); +} + +Creature* instance_draktharon_keep::GetNextCrystalTarget(Creature* pCrystalHandler, uint8& uiIndex) +{ + Creature* pTarget = NULL; + uiIndex = 0; + + for (uint8 i = 0; i < MAX_CRYSTALS; ++i) + { + Creature* pDummy = instance->GetCreature(m_aNovosCrystalInfo[i].m_channelGuid); + // Return the nearest 'unused' crystal dummy + // unused means, that the crystal was not already used, and the dummy-npc doesn't have the aura that will trigger the use on remove + if (pDummy && !m_aNovosCrystalInfo[i].m_bWasUsed && (!pTarget || pCrystalHandler->GetDistanceOrder(pDummy, pTarget)) && !pDummy->HasAura(aCrystalHandlerDeathSpells[i])) + { + pTarget = pDummy; + uiIndex = i; + } + } + + return pTarget; +} + +void instance_draktharon_keep::DoHandleCrystal(uint8 uiIndex) +{ + m_aNovosCrystalInfo[uiIndex].m_bWasUsed = true; + + DoUseDoorOrButton(m_aNovosCrystalInfo[uiIndex].m_crystalGuid); + + if (Creature* pDummy = instance->GetCreature(m_aNovosCrystalInfo[uiIndex].m_channelGuid)) + pDummy->InterruptNonMeleeSpells(false); +} + +Creature* instance_draktharon_keep::GetSummonDummy() +{ + if (m_vSummonDummyGuids.empty()) + return NULL; + + return instance->GetCreature(m_vSummonDummyGuids[urand(0, m_vSummonDummyGuids.size() - 1)]); +} + bool instance_draktharon_keep::CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/) { switch (uiCriteriaId) @@ -83,9 +230,42 @@ void instance_draktharon_keep::SetData(uint32 uiType, uint32 uiData) break; case TYPE_NOVOS: if (uiData == IN_PROGRESS) + { + // Sort the dummies + DoSortNovosDummies(); + + // Cast some visual spells + Creature* pTarget = instance->GetCreature(m_novosChannelGuid); + for (uint8 i = 0; i < MAX_CRYSTALS; ++i) + { + Creature* pCaster = instance->GetCreature(m_aNovosCrystalInfo[i].m_channelGuid); + if (pCaster && pTarget) + pCaster->CastSpell(pTarget, SPELL_BEAM_CHANNEL, false); + + m_aNovosCrystalInfo[i].m_bWasUsed = false; + } + + // Achievement related m_bNovosAddGrounded = false; - if (uiData == SPECIAL) + } + else if (uiData == SPECIAL) + { + // Achievement related m_bNovosAddGrounded = true; + } + else if (uiData == FAIL) + { + // Interrupt casted spells + for (uint8 i = 0; i < MAX_CRYSTALS; ++i) + { + Creature* pDummy = instance->GetCreature(m_aNovosCrystalInfo[i].m_channelGuid); + if (pDummy) + pDummy->InterruptNonMeleeSpells(false); + // And reset used crystals + if (m_aNovosCrystalInfo[i].m_bWasUsed) + DoUseDoorOrButton(m_aNovosCrystalInfo[i].m_crystalGuid); + } + } m_auiEncounter[uiType] = uiData; break; case TYPE_KING_DRED: diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index ef217f92d..b01f8fd5b 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2226" + #define SD2_REVISION_NR "2227" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 089ccf300..7b565e331 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -504,6 +504,7 @@ UPDATE creature_template SET ScriptName='npc_torastrasza' WHERE entry=26949; /* DRAK'THARON KEEP */ UPDATE creature_template SET ScriptName='boss_novos' WHERE entry=26631; +UPDATE creature_template SET ScriptName='npc_crystal_channel_target' WHERE entry=26712; UPDATE creature_template SET ScriptName='boss_tharonja' WHERE entry=26632; UPDATE creature_template SET ScriptName='boss_trollgore' WHERE entry=26630; UPDATE instance_template SET ScriptName='instance_draktharon_keep' WHERE map=600; diff --git a/sql/updates/r2227_mangos.sql b/sql/updates/r2227_mangos.sql new file mode 100644 index 000000000..fe4df6021 --- /dev/null +++ b/sql/updates/r2227_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_crystal_channel_target' WHERE entry=26712; From 81db0e95c6e56e74eeebf43fb3189443f20e5419 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sat, 25 Jun 2011 01:35:50 +0200 Subject: [PATCH 0208/1172] [2228] Implement summon Timmy the Cruel support in Stratholme Also fix Typo from 2227 Signed-off-by: Schmoozerd --- .../stratholme/instance_stratholme.cpp | 43 +++++++++---- .../eastern_kingdoms/stratholme/stratholme.h | 60 +++++++++++-------- .../northrend/draktharon_keep/boss_novos.cpp | 2 +- sd2_revision_nr.h | 2 +- 4 files changed, 71 insertions(+), 36 deletions(-) diff --git a/scripts/eastern_kingdoms/stratholme/instance_stratholme.cpp b/scripts/eastern_kingdoms/stratholme/instance_stratholme.cpp index a48165c81..56bbae2ba 100644 --- a/scripts/eastern_kingdoms/stratholme/instance_stratholme.cpp +++ b/scripts/eastern_kingdoms/stratholme/instance_stratholme.cpp @@ -78,6 +78,14 @@ void instance_stratholme::OnCreatureCreate(Creature* pCreature) case NPC_THUZADIN_ACOLYTE: m_luiAcolyteGUIDs.push_back(pCreature->GetObjectGuid()); break; + case NPC_CRIMSON_INITIATE: + case NPC_CRIMSON_GALLANT: + case NPC_CRIMSON_GUARDSMAN: + case NPC_CRIMSON_CONJURER: + // Only store those in the yard + if (pCreature->IsWithinDist2d(aTimmyLocation[1].m_fX, aTimmyLocation[1].m_fY, 40.0f)) + m_suiCrimsonLowGuids.insert(pCreature->GetGUIDLow()); + break; } } @@ -215,8 +223,8 @@ void instance_stratholme::SetData(uint32 uiType, uint32 uiData) if (Creature* pBaron = GetSingleCreatureFromStorage(NPC_BARON)) { DoScriptText(SAY_ANNOUNCE_RAMSTEIN, pBaron); - if (Creature* pRamstein = pBaron->SummonCreature(NPC_RAMSTEIN, sStratholmeLocation[2].m_fX, sStratholmeLocation[2].m_fY, sStratholmeLocation[2].m_fZ, sStratholmeLocation[2].m_fO, TEMPSUMMON_DEAD_DESPAWN, 0)) - pRamstein->GetMotionMaster()->MovePoint(0, sStratholmeLocation[3].m_fX, sStratholmeLocation[3].m_fY, sStratholmeLocation[3].m_fZ); + if (Creature* pRamstein = pBaron->SummonCreature(NPC_RAMSTEIN, aStratholmeLocation[2].m_fX, aStratholmeLocation[2].m_fY, aStratholmeLocation[2].m_fZ, aStratholmeLocation[2].m_fO, TEMPSUMMON_DEAD_DESPAWN, 0)) + pRamstein->GetMotionMaster()->MovePoint(0, aStratholmeLocation[3].m_fX, aStratholmeLocation[3].m_fY, aStratholmeLocation[3].m_fZ); debug_log("SD2: Instance Stratholme - Slaugther event: Ramstein spawned."); } @@ -242,8 +250,8 @@ void instance_stratholme::SetData(uint32 uiType, uint32 uiData) for(uint8 i = 0; i < 5; ++i) { float fX, fY, fZ; - pBaron->GetRandomPoint(sStratholmeLocation[6].m_fX, sStratholmeLocation[6].m_fY, sStratholmeLocation[6].m_fZ, 5.0f, fX, fY, fZ); - if (Creature* pTemp = pBaron->SummonCreature(NPC_BLACK_GUARD, sStratholmeLocation[6].m_fX, sStratholmeLocation[6].m_fY, sStratholmeLocation[6].m_fZ, sStratholmeLocation[6].m_fO, TEMPSUMMON_DEAD_DESPAWN, 0)) + pBaron->GetRandomPoint(aStratholmeLocation[6].m_fX, aStratholmeLocation[6].m_fY, aStratholmeLocation[6].m_fZ, 5.0f, fX, fY, fZ); + if (Creature* pTemp = pBaron->SummonCreature(NPC_BLACK_GUARD, aStratholmeLocation[6].m_fX, aStratholmeLocation[6].m_fY, aStratholmeLocation[6].m_fZ, aStratholmeLocation[6].m_fO, TEMPSUMMON_DEAD_DESPAWN, 0)) m_luiGuardGUIDs.push_back(pTemp->GetObjectGuid()); } @@ -302,7 +310,7 @@ void instance_stratholme::SetData(uint32 uiType, uint32 uiData) if (Creature* pYsida = pYsidaT->SummonCreature(NPC_YSIDA, pYsidaT->GetPositionX(), pYsidaT->GetPositionY(), pYsidaT->GetPositionZ(), pYsidaT->GetOrientation(), TEMPSUMMON_TIMED_DESPAWN, 1800000)) { DoScriptText(SAY_EPILOGUE, pYsida); - pYsida->GetMotionMaster()->MovePoint(0, sStratholmeLocation[7].m_fX, sStratholmeLocation[7].m_fY, sStratholmeLocation[7].m_fZ); + pYsida->GetMotionMaster()->MovePoint(0, aStratholmeLocation[7].m_fX, aStratholmeLocation[7].m_fY, aStratholmeLocation[7].m_fZ); } DoUseDoorOrButton(GO_YSIDA_CAGE); } @@ -324,7 +332,7 @@ void instance_stratholme::SetData(uint32 uiType, uint32 uiData) { DoScriptText(SAY_WARN_BARON, pBarthilas); pBarthilas->RemoveSplineFlag(SPLINEFLAG_WALKMODE); - pBarthilas->GetMotionMaster()->MovePoint(0, sStratholmeLocation[0].m_fX, sStratholmeLocation[0].m_fY, sStratholmeLocation[0].m_fZ); + pBarthilas->GetMotionMaster()->MovePoint(0, aStratholmeLocation[0].m_fX, aStratholmeLocation[0].m_fY, aStratholmeLocation[0].m_fZ); m_uiBarthilasRunTimer = 8000; } @@ -606,7 +614,7 @@ void instance_stratholme::OnCreatureDeath(Creature* pCreature) if (pGuard && pGuard->isAlive() && !pGuard->isInCombat()) { float fX, fY, fZ; - pGuard->GetRandomPoint(sStratholmeLocation[5].m_fX, sStratholmeLocation[5].m_fY, sStratholmeLocation[5].m_fZ, 10.0f, fX, fY, fZ); + pGuard->GetRandomPoint(aStratholmeLocation[5].m_fX, aStratholmeLocation[5].m_fY, aStratholmeLocation[5].m_fZ, 10.0f, fX, fY, fZ); pGuard->GetMotionMaster()->MovePoint(0, fX, fY, fZ); } } @@ -618,6 +626,21 @@ void instance_stratholme::OnCreatureDeath(Creature* pCreature) SetData(TYPE_BLACK_GUARDS, DONE); break; + + // Timmy spawn support + case NPC_CRIMSON_INITIATE: + case NPC_CRIMSON_GALLANT: + case NPC_CRIMSON_GUARDSMAN: + case NPC_CRIMSON_CONJURER: + if (m_suiCrimsonLowGuids.find(pCreature->GetGUIDLow()) != m_suiCrimsonLowGuids.end()) + { + m_suiCrimsonLowGuids.erase(pCreature->GetGUIDLow()); + + // If all courtyard mobs are dead then summon Timmy + if (m_suiCrimsonLowGuids.empty()) + pCreature->SummonCreature(NPC_TIMMY_THE_CRUEL, aTimmyLocation[0].m_fX, aTimmyLocation[0].m_fY, aTimmyLocation[0].m_fZ, aTimmyLocation[0].m_fO, TEMPSUMMON_DEAD_DESPAWN, 0); + } + break; } } @@ -657,7 +680,7 @@ void instance_stratholme::Update(uint32 uiDiff) { Creature* pBarthilas = GetSingleCreatureFromStorage(NPC_BARTHILAS); if (pBarthilas && pBarthilas->isAlive() && !pBarthilas->isInCombat()) - pBarthilas->NearTeleportTo(sStratholmeLocation[1].m_fX, sStratholmeLocation[1].m_fY, sStratholmeLocation[1].m_fZ, sStratholmeLocation[1].m_fO); + pBarthilas->NearTeleportTo(aStratholmeLocation[1].m_fX, aStratholmeLocation[1].m_fY, aStratholmeLocation[1].m_fZ, aStratholmeLocation[1].m_fO); SetData(TYPE_BARTHILAS_RUN, DONE); m_uiBarthilasRunTimer = 0; @@ -701,10 +724,10 @@ void instance_stratholme::Update(uint32 uiDiff) if (Creature* pBaron = GetSingleCreatureFromStorage(NPC_BARON)) { // Summon mindless skeletons and move them to random point in the center of the square - if (Creature* pTemp = pBaron->SummonCreature(NPC_MINDLESS_UNDEAD, sStratholmeLocation[4].m_fX, sStratholmeLocation[4].m_fY, sStratholmeLocation[4].m_fZ, sStratholmeLocation[4].m_fO, TEMPSUMMON_DEAD_DESPAWN, 0)) + if (Creature* pTemp = pBaron->SummonCreature(NPC_MINDLESS_UNDEAD, aStratholmeLocation[4].m_fX, aStratholmeLocation[4].m_fY, aStratholmeLocation[4].m_fZ, aStratholmeLocation[4].m_fO, TEMPSUMMON_DEAD_DESPAWN, 0)) { float fX, fY, fZ; - pBaron->GetRandomPoint(sStratholmeLocation[5].m_fX, sStratholmeLocation[5].m_fY, sStratholmeLocation[5].m_fZ, 20.0f, fX, fY, fZ); + pBaron->GetRandomPoint(aStratholmeLocation[5].m_fX, aStratholmeLocation[5].m_fY, aStratholmeLocation[5].m_fZ, 20.0f, fX, fY, fZ); pTemp->GetMotionMaster()->MovePoint(0, fX, fY, fZ); m_luiUndeadGUIDs.push_back(pTemp->GetObjectGuid()); ++m_uiMindlessCount; diff --git a/scripts/eastern_kingdoms/stratholme/stratholme.h b/scripts/eastern_kingdoms/stratholme/stratholme.h index 6111f4e67..d9f3a8ee4 100644 --- a/scripts/eastern_kingdoms/stratholme/stratholme.h +++ b/scripts/eastern_kingdoms/stratholme/stratholme.h @@ -28,33 +28,38 @@ enum TYPE_SH_VICAR = 24, TYPE_SH_AELMAR = 25, + NPC_TIMMY_THE_CRUEL = 10808, NPC_BARTHILAS = 10435, NPC_BARONESS_ANASTARI = 10436, NPC_NERUBENKAN = 10437, NPC_MALEKI_THE_PALLID = 10438, NPC_RAMSTEIN = 10439, NPC_BARON = 10440, - NPC_CRYSTAL = 10415, // three ziggurat crystals - NPC_THUZADIN_ACOLYTE = 10399, // acolytes in ziggurats + NPC_CRYSTAL = 10415, // Three ziggurat crystals + NPC_THUZADIN_ACOLYTE = 10399, // Acolytes in ziggurats NPC_ABOM_BILE = 10416, NPC_ABOM_VENOM = 10417, - NPC_MINDLESS_UNDEAD = 11030, // zombies summoned after ramstein - NPC_BLACK_GUARD = 10394, // zombies summoned after ramstein + NPC_MINDLESS_UNDEAD = 11030, // Zombies summoned after Ramstein + NPC_BLACK_GUARD = 10394, // Zombies summoned after Ramstein NPC_YSIDA = 16031, NPC_YSIDA_TRIGGER = 16100, + NPC_CRIMSON_INITIATE = 10420, // A couple of them related to spawn Timmy + NPC_CRIMSON_GALLANT = 10424, + NPC_CRIMSON_GUARDSMAN = 10418, + NPC_CRIMSON_CONJURER = 10419, GO_SERVICE_ENTRANCE = 175368, GO_GAUNTLET_GATE1 = 175357, - GO_PORT_SLAUGHTER_GATE = 175358, //port used at the undeads event - GO_ZIGGURAT_DOOR_1 = 175380, //baroness - GO_ZIGGURAT_DOOR_2 = 175379, //nerub'enkan - GO_ZIGGURAT_DOOR_3 = 175381, //maleki - GO_ZIGGURAT_DOOR_4 = 175405, //rammstein - GO_ZIGGURAT_DOOR_5 = 175796, //baron - GO_PORT_GAUNTLET = 175374, //port from gauntlet to slaugther - GO_PORT_SLAUGTHER = 175373, //port at slaugther - GO_PORT_ELDERS = 175377, //port at elders square - GO_YSIDA_CAGE = 181071, // cage to open after baron event is done + GO_PORT_SLAUGHTER_GATE = 175358, // Port used at the undeads event + GO_ZIGGURAT_DOOR_1 = 175380, // Baroness + GO_ZIGGURAT_DOOR_2 = 175379, // Nerub'enkan + GO_ZIGGURAT_DOOR_3 = 175381, // Maleki + GO_ZIGGURAT_DOOR_4 = 175405, // Ramstein + GO_ZIGGURAT_DOOR_5 = 175796, // Baron + GO_PORT_GAUNTLET = 175374, // Port from gauntlet to slaugther + GO_PORT_SLAUGTHER = 175373, // Port at slaugther + GO_PORT_ELDERS = 175377, // Port at elders square + GO_YSIDA_CAGE = 181071, // Cage to open after baron event is done QUEST_DEAD_MAN_PLEA = 8945, SPELL_BARON_ULTIMATUM = 27861, @@ -74,21 +79,27 @@ enum SAY_EPILOGUE = -1329015, }; -struct sEventLocation +struct EventLocation { float m_fX, m_fY, m_fZ, m_fO; }; -static sEventLocation sStratholmeLocation[] = +static const EventLocation aStratholmeLocation[] = { - {3725.577f, -3599.484f, 142.367f}, // barthilas door run - {4068.284f, -3535.678f, 122.771f, 2.50f}, // barthilas tele - {4032.643f, -3378.546f, 119.752f, 4.74f}, // ramstein summon loc - {4032.843f, -3390.246f, 119.732f}, // ramstein move loc - {3969.357f, -3391.871f, 119.116f, 5.91f}, // skeletons summon loc - {4033.044f, -3431.031f, 119.055f}, // skeletons move loc - {4032.602f, -3378.506f, 119.752f, 4.74f}, // guards summon loc - {4042.575f, -3337.929f, 115.059f} // ysida move loc + {3725.577f, -3599.484f, 142.367f}, // Barthilas door run + {4068.284f, -3535.678f, 122.771f, 2.50f}, // Barthilas tele + {4032.643f, -3378.546f, 119.752f, 4.74f}, // Ramstein summon loc + {4032.843f, -3390.246f, 119.732f}, // Ramstein move loc + {3969.357f, -3391.871f, 119.116f, 5.91f}, // Skeletons summon loc + {4033.044f, -3431.031f, 119.055f}, // Skeletons move loc + {4032.602f, -3378.506f, 119.752f, 4.74f}, // Guards summon loc + {4042.575f, -3337.929f, 115.059f} // Ysida move loc +}; + +static const EventLocation aTimmyLocation[] = +{ + {3696.851f, -3152.736f, 127.661f, 4.024f}, // Timmy spawn loc + {3668.603f, -3183.314f, 126.215f} // Courtyard mobs sort point }; struct ZigguratStore @@ -140,6 +151,7 @@ class MANGOS_DLL_DECL instance_stratholme : public ScriptedInstance ZigguratStore m_zigguratStorage[MAX_ZIGGURATS]; + std::set m_suiCrimsonLowGuids; GUIDList m_luiCrystalGUIDs; GUIDSet m_sAbomnationGUID; GUIDList m_luiAcolyteGUIDs; diff --git a/scripts/northrend/draktharon_keep/boss_novos.cpp b/scripts/northrend/draktharon_keep/boss_novos.cpp index 13a9a1181..3b30f54c7 100644 --- a/scripts/northrend/draktharon_keep/boss_novos.cpp +++ b/scripts/northrend/draktharon_keep/boss_novos.cpp @@ -130,7 +130,7 @@ struct MANGOS_DLL_DECL boss_novosAI : public Scripted_NoMovementAI if (m_uiLostCrystals == MAX_CRYSTALS) { // Enter Phase 2 - if (m_bIsRegularMode) + if (!m_bIsRegularMode) DoCastSpellIfCan(m_creature, SPELL_SUMMON_MINIONS_H); m_uiPhase = PHASE_WAITING; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index b01f8fd5b..231ce9d10 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2227" + #define SD2_REVISION_NR "2228" #endif // __SD2_REVISION_NR_H__ From 619f213bcda210ef67817b6bcf178bfb28d4e2f9 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sat, 25 Jun 2011 15:21:15 +0200 Subject: [PATCH 0209/1172] [2229] Implement Doomgrip summon event in BRD Signed-off-by: Schmoozerd --- .../blackrock_depths/blackrock_depths.cpp | 22 +++++++ .../blackrock_depths/blackrock_depths.h | 14 +++++ .../instance_blackrock_depths.cpp | 59 +++++++++++++++++++ sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 + sql/updates/r2229_mangos.sql | 1 + 6 files changed, 98 insertions(+), 1 deletion(-) create mode 100644 sql/updates/r2229_mangos.sql diff --git a/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.cpp b/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.cpp index 55a542e37..af53f227b 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.cpp +++ b/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.cpp @@ -23,6 +23,7 @@ EndScriptData */ /* ContentData go_shadowforge_brazier +go_relic_coffer_door at_ring_of_law npc_grimstone mob_phalanx @@ -50,6 +51,22 @@ bool GOUse_go_shadowforge_brazier(Player* pPlayer, GameObject* pGo) return false; } +/*###### +## go_relic_coffer_door +######*/ + +bool GOUse_go_relic_coffer_door(Player* pPlayer, GameObject* pGo) +{ + if (ScriptedInstance* pInstance = (ScriptedInstance*)pGo->GetInstanceData()) + { + // check if the event is already done + if (pInstance->GetData(TYPE_VAULT) != DONE && pInstance->GetData(TYPE_VAULT) != IN_PROGRESS) + pInstance->SetData(TYPE_VAULT, SPECIAL); + } + + return false; +} + /*###### ## npc_grimstone ######*/ @@ -796,6 +813,11 @@ void AddSC_blackrock_depths() pNewScript->pGOUse = &GOUse_go_shadowforge_brazier; pNewScript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "go_relic_coffer_door"; + pNewScript->pGOUse = &GOUse_go_relic_coffer_door; + pNewScript->RegisterSelf(); + pNewScript = new Script; pNewScript->Name = "at_ring_of_law"; pNewScript->pAreaTrigger = &AreaTrigger_at_ring_of_law; diff --git a/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.h b/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.h index e10f128db..8ee3b6c1e 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.h +++ b/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.h @@ -8,6 +8,8 @@ enum { MAX_ENCOUNTER = 6, + MAX_RELIC_DOORS = 12, + TYPE_RING_OF_LAW = 1, TYPE_VAULT = 2, TYPE_BAR = 3, @@ -25,6 +27,8 @@ enum NPC_SEETHREL = 9038, // NPC_DOOMREL = 9039, NPC_DOPEREL = 9040, + NPC_WATCHER_DOOMGRIP = 9476, + NPC_WARBRINGER_CONST = 8905, // Four of them in Relict Vault are related to Doomgrip summon event GO_ARENA_1 = 161525, GO_ARENA_2 = 161522, @@ -48,6 +52,9 @@ enum GO_SPECTRAL_CHALICE = 164869, GO_CHEST_SEVEN = 169243, GO_ARENA_SPOILS = 181074, + GO_SECRET_DOOR = 174553, + + SPELL_STONED = 10255, // Aura of Warbringer Constructs in Relict Vault }; enum ArenaNPCs @@ -88,6 +95,9 @@ static const uint32 aArenaNPCs[] = NPC_GOROSH, NPC_GRIZZLE, NPC_EVISCERATOR, NPC_OKTHOR, NPC_ANUBSHIAH, NPC_HEDRUM }; +// Used to summon Watcher Doomgrip (guesswork) +static const float aVaultPositions[4] = {821.905f, -338.382f, -50.134f, 3.78736f}; + class MANGOS_DLL_DECL instance_blackrock_depths : public ScriptedInstance { public: @@ -97,6 +107,7 @@ class MANGOS_DLL_DECL instance_blackrock_depths : public ScriptedInstance void Initialize(); void OnCreatureCreate(Creature* pCreature); + void OnCreatureDeath(Creature* pCreature); void OnObjectCreate(GameObject* pGo); void SetData(uint32 uiType, uint32 uiData); @@ -115,8 +126,11 @@ class MANGOS_DLL_DECL instance_blackrock_depths : public ScriptedInstance std::string m_strInstData; uint32 m_uiBarAleCount; + uint8 m_uiCofferDoorsOpened; float m_fArenaCenterX, m_fArenaCenterY, m_fArenaCenterZ; + + GUIDSet m_sVaultNpcGuids; }; #endif diff --git a/scripts/eastern_kingdoms/blackrock_depths/instance_blackrock_depths.cpp b/scripts/eastern_kingdoms/blackrock_depths/instance_blackrock_depths.cpp index de9f398cc..78574e929 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/instance_blackrock_depths.cpp +++ b/scripts/eastern_kingdoms/blackrock_depths/instance_blackrock_depths.cpp @@ -26,6 +26,7 @@ EndScriptData */ instance_blackrock_depths::instance_blackrock_depths(Map* pMap) : ScriptedInstance(pMap), m_uiBarAleCount(0), + m_uiCofferDoorsOpened(0), m_fArenaCenterX(0.0f), m_fArenaCenterY(0.0f), @@ -54,6 +55,17 @@ void instance_blackrock_depths::OnCreatureCreate(Creature* pCreature) case NPC_DOPEREL: m_mNpcEntryGuidStore[pCreature->GetEntry()] = pCreature->GetObjectGuid(); break; + + case NPC_WARBRINGER_CONST: + // Golems not in the Relict Vault? + if (std::abs(pCreature->GetPositionZ() - aVaultPositions[2]) > 1.0f || !pCreature->IsWithinDist2d(aVaultPositions[0], aVaultPositions[1], 20.0f)) + break; + // Golems in Relict Vault need to have a stoned aura, set manually to prevent reapply when reached home + pCreature->CastSpell(pCreature, SPELL_STONED, true); + // Store the Relict Vault Golems into m_sVaultNpcGuids + case NPC_WATCHER_DOOMGRIP: + m_sVaultNpcGuids.insert(pCreature->GetObjectGuid()); + break; } } @@ -81,6 +93,7 @@ void instance_blackrock_depths::OnObjectCreate(GameObject* pGo) case GO_SPECTRAL_CHALICE: case GO_CHEST_SEVEN: case GO_ARENA_SPOILS: + case GO_SECRET_DOOR: break; default: @@ -100,6 +113,34 @@ void instance_blackrock_depths::SetData(uint32 uiType, uint32 uiData) m_auiEncounter[0] = uiData; break; case TYPE_VAULT: + if (uiData == SPECIAL) + { + ++m_uiCofferDoorsOpened; + + if (m_uiCofferDoorsOpened == MAX_RELIC_DOORS) + { + SetData(TYPE_VAULT, IN_PROGRESS); + + Creature* pConstruct = NULL; + + // Activate vault constructs + for (GUIDSet::const_iterator itr = m_sVaultNpcGuids.begin(); itr != m_sVaultNpcGuids.end(); ++itr) + { + if (pConstruct = instance->GetCreature(*itr)) + pConstruct->RemoveAurasDueToSpell(SPELL_STONED); + } + + if (!pConstruct) + return; + + // Summon doomgrip + pConstruct->SummonCreature(NPC_WATCHER_DOOMGRIP, aVaultPositions[0], aVaultPositions[1], aVaultPositions[2], aVaultPositions[3], TEMPSUMMON_DEAD_DESPAWN, 0); + } + // No need to store in this case + return; + } + if (uiData == DONE) + DoUseDoorOrButton(GO_SECRET_DOOR); m_auiEncounter[1] = uiData; break; case TYPE_BAR: @@ -230,6 +271,24 @@ void instance_blackrock_depths::OnCreatureEvade(Creature* pCreature) } } +void instance_blackrock_depths::OnCreatureDeath(Creature* pCreature) +{ + switch(pCreature->GetEntry()) + { + case NPC_WARBRINGER_CONST: + case NPC_WATCHER_DOOMGRIP: + if (GetData(TYPE_VAULT) == IN_PROGRESS) + { + m_sVaultNpcGuids.erase(pCreature->GetObjectGuid()); + + // If all event npcs dead then set event to done + if (m_sVaultNpcGuids.empty()) + SetData(TYPE_VAULT, DONE); + } + break; + } +} + InstanceData* GetInstanceData_instance_blackrock_depths(Map* pMap) { return new instance_blackrock_depths(pMap); diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 231ce9d10..09659582f 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2228" + #define SD2_REVISION_NR "2229" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 7b565e331..0d91a5646 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -304,6 +304,7 @@ UPDATE creature_template SET ScriptName='npc_lokhtos_darkbargainer' WHERE entry= UPDATE creature_template SET ScriptName='npc_kharan_mighthammer' WHERE entry=9021; UPDATE creature_template SET ScriptName='npc_rocknot' WHERE entry=9503; UPDATE gameobject_template SET ScriptName='go_shadowforge_brazier' WHERE entry IN (174744, 174745); +UPDATE gameobject_template SET ScriptName='go_relic_coffer_door' WHERE entry IN (174554, 174555, 174556, 174557, 174558, 174559, 174560, 174561, 174562, 174563, 174564, 174566); /* BLACKROCK SPIRE */ UPDATE instance_template SET ScriptName='instance_blackrock_spire' WHERE map=229; diff --git a/sql/updates/r2229_mangos.sql b/sql/updates/r2229_mangos.sql new file mode 100644 index 000000000..44d66d217 --- /dev/null +++ b/sql/updates/r2229_mangos.sql @@ -0,0 +1 @@ +UPDATE gameobject_template SET ScriptName='go_relic_coffer_door' WHERE entry IN (174554, 174555, 174556, 174557, 174558, 174559, 174560, 174561, 174562, 174563, 174564, 174566); From 81a3eaff070d2a480197e8e57df30ef66b307350 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Sat, 25 Jun 2011 16:43:58 +0200 Subject: [PATCH 0210/1172] [2230] Various small Changes * Improve Add-handling for Utgarde Keep, Prince Keleseth (research done by ZPS) * Comment improvements in BRD * Code improvements for Ragnaros (replace std::list with std::vector --- .../blackrock_depths/blackrock_depths.h | 2 +- .../instance_blackrock_depths.cpp | 2 +- .../molten_core/boss_ragnaros.cpp | 11 +++--- .../utgarde_keep/boss_keleseth.cpp | 37 ++++++++++++------- sd2_revision_nr.h | 2 +- 5 files changed, 31 insertions(+), 23 deletions(-) diff --git a/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.h b/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.h index 8ee3b6c1e..961430c4d 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.h +++ b/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.h @@ -95,7 +95,7 @@ static const uint32 aArenaNPCs[] = NPC_GOROSH, NPC_GRIZZLE, NPC_EVISCERATOR, NPC_OKTHOR, NPC_ANUBSHIAH, NPC_HEDRUM }; -// Used to summon Watcher Doomgrip (guesswork) +// Used to summon Watcher Doomgrip static const float aVaultPositions[4] = {821.905f, -338.382f, -50.134f, 3.78736f}; class MANGOS_DLL_DECL instance_blackrock_depths : public ScriptedInstance diff --git a/scripts/eastern_kingdoms/blackrock_depths/instance_blackrock_depths.cpp b/scripts/eastern_kingdoms/blackrock_depths/instance_blackrock_depths.cpp index 78574e929..a7d191b29 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/instance_blackrock_depths.cpp +++ b/scripts/eastern_kingdoms/blackrock_depths/instance_blackrock_depths.cpp @@ -156,7 +156,7 @@ void instance_blackrock_depths::SetData(uint32 uiType, uint32 uiData) DoUseDoorOrButton(GO_TOMB_ENTER); break; case FAIL: - if (m_auiEncounter[3] == IN_PROGRESS)//prevent use more than one time + if (m_auiEncounter[3] == IN_PROGRESS) // Prevent use more than one time DoUseDoorOrButton(GO_TOMB_ENTER); break; case DONE: diff --git a/scripts/eastern_kingdoms/molten_core/boss_ragnaros.cpp b/scripts/eastern_kingdoms/molten_core/boss_ragnaros.cpp index c2354be0d..67d06cb8f 100644 --- a/scripts/eastern_kingdoms/molten_core/boss_ragnaros.cpp +++ b/scripts/eastern_kingdoms/molten_core/boss_ragnaros.cpp @@ -245,20 +245,19 @@ struct MANGOS_DLL_DECL boss_ragnarosAI : public Scripted_NoMovementAI if (m_uiHammerTimer < uiDiff) { // Select a target with mana-bar - std::list lValidTargets; + std::vector vValidTargets; ThreatList const& tList = m_creature->getThreatManager().getThreatList(); + vValidTargets.reserve(tList.size()); for (ThreatList::const_iterator iter = tList.begin(); iter != tList.end(); ++iter) { Unit* pTempTarget = m_creature->GetMap()->GetUnit((*iter)->getUnitGuid()); if (pTempTarget && pTempTarget->getPowerType() == POWER_MANA) - lValidTargets.push_back(pTempTarget); + vValidTargets.push_back(pTempTarget); } - if (!lValidTargets.empty()) + if (!vValidTargets.empty()) { - std::list::const_iterator itr = lValidTargets.begin(); - advance(itr, urand(0, lValidTargets.size() - 1)); - if (DoCastSpellIfCan(*itr, SPELL_MIGHT_OF_RAGNAROS) == CAST_OK) + if (DoCastSpellIfCan(vValidTargets[urand(0, vValidTargets.size() -1)], SPELL_MIGHT_OF_RAGNAROS) == CAST_OK) { DoScriptText(SAY_HAMMER, m_creature); m_uiHammerTimer = 11000; diff --git a/scripts/northrend/utgarde_keep/utgarde_keep/boss_keleseth.cpp b/scripts/northrend/utgarde_keep/utgarde_keep/boss_keleseth.cpp index 1b8368660..629ef2553 100644 --- a/scripts/northrend/utgarde_keep/utgarde_keep/boss_keleseth.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_keep/boss_keleseth.cpp @@ -106,14 +106,8 @@ struct MANGOS_DLL_DECL mob_vrykul_skeletonAI : public ScriptedAI m_uiReviveTimer = 0; } - void DamageTaken(Unit* pDoneBy, uint32 &uiDamage) + void DamageTaken(Unit* pDoneBy, uint32& uiDamage) { - if (!m_pInstance || m_pInstance->GetData(TYPE_KELESETH) != IN_PROGRESS) - { - uiDamage = m_creature->GetHealth(); - return; - } - if (m_uiReviveTimer) { uiDamage = 0; @@ -158,8 +152,10 @@ struct MANGOS_DLL_DECL mob_vrykul_skeletonAI : public ScriptedAI if (urand(0, 3)) DoCastSpellIfCan(m_creature->getVictim(), SPELL_DECREPIFY_H); else if (m_pInstance && m_pInstance->GetData(TYPE_KELESETH) == IN_PROGRESS) + { if (Creature* pKeleseth = m_pInstance->GetSingleCreatureFromStorage(NPC_KELESETH)) DoCastSpellIfCan(pKeleseth, SPELL_BONE_ARMOR); + } } m_uiCastTimer = urand(5000, 15000); @@ -196,6 +192,8 @@ struct MANGOS_DLL_DECL boss_kelesethAI : public ScriptedAI uint32 m_uiSummonTimer; uint32 m_uiShadowboltTimer; + GUIDList m_lSummonedAddGuids; + void Reset() { // timers need confirmation @@ -203,7 +201,7 @@ struct MANGOS_DLL_DECL boss_kelesethAI : public ScriptedAI m_uiSummonTimer = 5000 ; m_uiShadowboltTimer = 0; - DespawnAdds(); + DespawnOrKillAdds(true); } void AttackStart(Unit* pWho) @@ -232,20 +230,29 @@ struct MANGOS_DLL_DECL boss_kelesethAI : public ScriptedAI m_creature->SummonCreature(NPC_VRYKUL_SKELETON, fAddPosition[0]+rand()%7, fAddPosition[1]+rand()%7, fAddPosition[2], fAddPosition[3], TEMPSUMMON_DEAD_DESPAWN, 0); } - void DespawnAdds() + void DespawnOrKillAdds(bool bDespawn) { - std::list lAddsList; - GetCreatureListWithEntryInGrid(lAddsList, m_creature, NPC_VRYKUL_SKELETON, 100.0f); + for (GUIDList::const_iterator itr = m_lSummonedAddGuids.begin(); itr != m_lSummonedAddGuids.end(); ++itr) + { + if (Creature* pAdd = m_creature->GetMap()->GetCreature(*itr)) + { + if (bDespawn) + pAdd->ForcedDespawn(); + else + pAdd->DealDamage(pAdd, pAdd->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + } + } - if (!lAddsList.empty()) - for(std::list::iterator itr = lAddsList.begin(); itr != lAddsList.end(); ++itr) - (*itr)->ForcedDespawn(); + m_lSummonedAddGuids.clear(); } void JustSummoned(Creature* pSummoned) { if (pSummoned->GetEntry() == NPC_VRYKUL_SKELETON) + { pSummoned->AI()->AttackStart(m_creature->getVictim()); + m_lSummonedAddGuids.push_back(pSummoned->GetObjectGuid()); + } if (pSummoned->GetEntry() == NPC_FROST_TOMB) pSummoned->ApplySpellImmune(0, IMMUNITY_DAMAGE, SPELL_SCHOOL_MASK_FROST, true); @@ -257,6 +264,8 @@ struct MANGOS_DLL_DECL boss_kelesethAI : public ScriptedAI if (m_pInstance) m_pInstance->SetData(TYPE_KELESETH, DONE); + + DespawnOrKillAdds(false); } void JustReachedHome() diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 09659582f..762bb5925 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2229" + #define SD2_REVISION_NR "2230" #endif // __SD2_REVISION_NR_H__ From 782572dfbddc67ebfa885fd1f7b0167dbbf3ed07 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Sun, 26 Jun 2011 21:19:19 +0200 Subject: [PATCH 0211/1172] [2231] Update TBC Compatibility patch --- .../ScriptDev2_2224_to_MaNGOS_one.patch | 267 +++++++++++++++++- sd2_revision_nr.h | 2 +- 2 files changed, 253 insertions(+), 16 deletions(-) diff --git a/patches/custom/ScriptDev2_2224_to_MaNGOS_one.patch b/patches/custom/ScriptDev2_2224_to_MaNGOS_one.patch index 450fb68e3..27018ecee 100644 --- a/patches/custom/ScriptDev2_2224_to_MaNGOS_one.patch +++ b/patches/custom/ScriptDev2_2224_to_MaNGOS_one.patch @@ -1,4 +1,4 @@ -From d858813d233e400278d18dff699e17600f104869 Mon Sep 17 00:00:00 2001 +From 97cb357e0ae38576c88d2445bd1a5df3b6f0c5db Mon Sep 17 00:00:00 2001 From: ScriptDev2 Date: Thu, 24 Mar 2011 00:16:38 +0100 Subject: [PATCH] ScriptDev2 - One Compatibility patch @@ -6,14 +6,28 @@ Subject: [PATCH] ScriptDev2 - One Compatibility patch Signed-off-by: Schmoozerd --- include/precompiled.h | 5 + + include/sc_instance.cpp | 22 -- + include/sc_instance.h | 3 - .../shadowfang_keep/shadowfang_keep.cpp | 8 +- scripts/kalimdor/azuremyst_isle.cpp | 2 +- scripts/kalimdor/onyxias_lair/boss_onyxia.cpp | 4 +- + .../onyxias_lair/instance_onyxias_lair.cpp | 3 - + scripts/kalimdor/onyxias_lair/onyxias_lair.h | 2 - + scripts/northrend/azjol-nerub/ahnkahet/ahnkahet.h | 2 - + .../azjol-nerub/ahnkahet/instance_ahnkahet.cpp | 6 +- + .../azjol-nerub/azjol-nerub/azjol-nerub.h | 2 - + .../azjol-nerub/instance_azjol-nerub.cpp | 2 - scripts/northrend/dragonblight.cpp | 2 +- + scripts/northrend/naxxramas/instance_naxxramas.cpp | 5 - + scripts/northrend/naxxramas/naxxramas.h | 4 - + .../ulduar/halls_of_lightning/halls_of_lightning.h | 4 +- + .../instance_halls_of_lightning.cpp | 2 - + .../ulduar/halls_of_stone/halls_of_stone.h | 2 - + .../halls_of_stone/instance_halls_of_stone.cpp | 2 - .../auchenai_crypts/boss_exarch_maladaar.cpp | 8 +- scripts/world/item_scripts.cpp | 2 +- system/ScriptLoader.cpp | 316 ++----------------- - 8 files changed, 52 insertions(+), 295 deletions(-) + 22 files changed, 54 insertions(+), 354 deletions(-) diff --git a/include/precompiled.h b/include/precompiled.h index 11b6b31..2f202a3 100644 @@ -31,11 +45,55 @@ index 11b6b31..2f202a3 100644 #ifdef WIN32 # include BOOL APIENTRY DllMain(HANDLE hModule, DWORD ul_reason_for_call, LPVOID lpReserved) +diff --git a/include/sc_instance.cpp b/include/sc_instance.cpp +index e93cb45..d7905cc 100644 +--- a/include/sc_instance.cpp ++++ b/include/sc_instance.cpp +@@ -141,25 +141,3 @@ Creature* ScriptedInstance::GetSingleCreatureFromStorage(uint32 uiEntry, bool bS + + return NULL; + } +- +-/** +- Helper function to start a timed achievement criteria for players in the map +- +- @param criteriaType The Type that is required to complete the criteria, see enum AchievementCriteriaTypes in MaNGOS +- @param uiTimedCriteriaMiscId The ID that identifies how the criteria is started +- */ +-void ScriptedInstance::DoStartTimedAchievement(AchievementCriteriaTypes criteriaType, uint32 uiTimedCriteriaMiscId) +-{ +- Map::PlayerList const& lPlayers = instance->GetPlayers(); +- +- if (!lPlayers.isEmpty()) +- { +- for(Map::PlayerList::const_iterator itr = lPlayers.begin(); itr != lPlayers.end(); ++itr) +- { +- if (Player* pPlayer = itr->getSource()) +- pPlayer->StartTimedAchievementCriteria(criteriaType, uiTimedCriteriaMiscId); +- } +- } +- else +- debug_log("SD2: DoStartTimedAchievement attempt start achievements but no players in map."); +-} +diff --git a/include/sc_instance.h b/include/sc_instance.h +index d7e037e..3d1450a 100644 +--- a/include/sc_instance.h ++++ b/include/sc_instance.h +@@ -54,9 +54,6 @@ class MANGOS_DLL_DECL ScriptedInstance : public InstanceData + DoOrSimulateScriptTextForMap(iTextEntry, uiCreatureEntry, instance, GetSingleCreatureFromStorage(uiCreatureEntry, true)); + } + +- // Starts a timed achievement criteria for all players in instance +- void DoStartTimedAchievement(AchievementCriteriaTypes criteriaType, uint32 uiTimedCriteriaMiscId); +- + protected: + // Storage for GO-Guids and NPC-Guids + EntryGuidMap m_mGoEntryGuidStore; ///< Store unique GO-Guids by entry diff --git a/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.cpp b/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.cpp -index 2cb6676..d3b1c0c 100644 +index c152e0e..090b8c3 100644 --- a/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.cpp +++ b/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.cpp -@@ -91,10 +91,10 @@ struct MANGOS_DLL_DECL npc_shadowfang_prisonerAI : public npc_escortAI +@@ -89,10 +89,10 @@ struct MANGOS_DLL_DECL npc_shadowfang_prisonerAI : public npc_escortAI else DoScriptText(EMOTE_UNLOCK_DOOR_AD, m_creature); break; @@ -51,7 +109,7 @@ index 2cb6676..d3b1c0c 100644 if (m_uiNpcEntry == NPC_ASH) DoScriptText(SAY_POST_DOOR_AS, m_creature); diff --git a/scripts/kalimdor/azuremyst_isle.cpp b/scripts/kalimdor/azuremyst_isle.cpp -index 94879c4..8aef16e 100644 +index f87a61e..79522f6 100644 --- a/scripts/kalimdor/azuremyst_isle.cpp +++ b/scripts/kalimdor/azuremyst_isle.cpp @@ -103,7 +103,7 @@ struct MANGOS_DLL_DECL npc_draenei_survivorAI : public ScriptedAI @@ -64,7 +122,7 @@ index 94879c4..8aef16e 100644 m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PVP_ATTACKABLE); m_creature->SetStandState(UNIT_STAND_STATE_STAND); diff --git a/scripts/kalimdor/onyxias_lair/boss_onyxia.cpp b/scripts/kalimdor/onyxias_lair/boss_onyxia.cpp -index fadb93d..d446e44 100644 +index 0ad95ad..ef332f9 100644 --- a/scripts/kalimdor/onyxias_lair/boss_onyxia.cpp +++ b/scripts/kalimdor/onyxias_lair/boss_onyxia.cpp @@ -312,7 +312,7 @@ struct MANGOS_DLL_DECL boss_onyxiaAI : public ScriptedAI @@ -85,8 +143,94 @@ index fadb93d..d446e44 100644 m_pInstance->SetData(TYPE_ONYXIA, DATA_PLAYER_TOASTED); } }; +diff --git a/scripts/kalimdor/onyxias_lair/instance_onyxias_lair.cpp b/scripts/kalimdor/onyxias_lair/instance_onyxias_lair.cpp +index cec7e97..f7dde0a 100644 +--- a/scripts/kalimdor/onyxias_lair/instance_onyxias_lair.cpp ++++ b/scripts/kalimdor/onyxias_lair/instance_onyxias_lair.cpp +@@ -62,10 +62,7 @@ void instance_onyxias_lair::SetData(uint32 uiType, uint32 uiData) + + m_uiEncounter = uiData; + if (uiData == IN_PROGRESS) +- { +- DoStartTimedAchievement(ACHIEVEMENT_CRITERIA_TYPE_KILL_CREATURE, ACHIEV_START_ONYXIA_ID); + m_uiAchievWhelpsCount = 0; +- } + if (uiData == DATA_LIFTOFF) + m_tPhaseTwoStart = time(NULL); + +diff --git a/scripts/kalimdor/onyxias_lair/onyxias_lair.h b/scripts/kalimdor/onyxias_lair/onyxias_lair.h +index f869ca9..2f493a7 100644 +--- a/scripts/kalimdor/onyxias_lair/onyxias_lair.h ++++ b/scripts/kalimdor/onyxias_lair/onyxias_lair.h +@@ -24,8 +24,6 @@ enum + ACHIEV_CRIT_MANY_WHELPS_H = 12568, + ACHIEV_CRIT_NO_BREATH_N = 12566, // Acheivements 4404, 4407 + ACHIEV_CRIT_NO_BREATH_H = 12569, +- +- ACHIEV_START_ONYXIA_ID = 6601, + }; + + class MANGOS_DLL_DECL instance_onyxias_lair : public ScriptedInstance +diff --git a/scripts/northrend/azjol-nerub/ahnkahet/ahnkahet.h b/scripts/northrend/azjol-nerub/ahnkahet/ahnkahet.h +index 114e535..bc6a5fc 100644 +--- a/scripts/northrend/azjol-nerub/ahnkahet/ahnkahet.h ++++ b/scripts/northrend/azjol-nerub/ahnkahet/ahnkahet.h +@@ -28,8 +28,6 @@ enum + + NPC_ELDER_NADOX = 29309, + //NPC_JEDOGA_SHADOWSEEKER = 29310, +- +- ACHIEV_START_VOLAZJ_ID = 20382, + }; + + class MANGOS_DLL_DECL instance_ahnkahet : public ScriptedInstance +diff --git a/scripts/northrend/azjol-nerub/ahnkahet/instance_ahnkahet.cpp b/scripts/northrend/azjol-nerub/ahnkahet/instance_ahnkahet.cpp +index 8036455..a82d755 100644 +--- a/scripts/northrend/azjol-nerub/ahnkahet/instance_ahnkahet.cpp ++++ b/scripts/northrend/azjol-nerub/ahnkahet/instance_ahnkahet.cpp +@@ -101,13 +101,9 @@ void instance_ahnkahet::SetData(uint32 uiType, uint32 uiData) + } + break; + case TYPE_JEDOGA: +- case TYPE_AMANITAR: +- m_auiEncounter[uiType] = uiData; +- break; + case TYPE_VOLAZJ: ++ case TYPE_AMANITAR: + m_auiEncounter[uiType] = uiData; +- if (uiData == IN_PROGRESS) +- DoStartTimedAchievement(ACHIEVEMENT_CRITERIA_TYPE_KILL_CREATURE, ACHIEV_START_VOLAZJ_ID); + break; + + default: +diff --git a/scripts/northrend/azjol-nerub/azjol-nerub/azjol-nerub.h b/scripts/northrend/azjol-nerub/azjol-nerub/azjol-nerub.h +index 7d75103..b61e85c 100644 +--- a/scripts/northrend/azjol-nerub/azjol-nerub/azjol-nerub.h ++++ b/scripts/northrend/azjol-nerub/azjol-nerub/azjol-nerub.h +@@ -27,8 +27,6 @@ enum + GO_DOOR_ANUBARAK_1 = 192396, + GO_DOOR_ANUBARAK_2 = 192397, + GO_DOOR_ANUBARAK_3 = 192398, +- +- ACHIEV_START_ANUB_ID = 20381, + }; + + static const uint32 aWatchers[] = {NPC_GASHRA, NPC_NARJIL, NPC_SILTHIK}; +diff --git a/scripts/northrend/azjol-nerub/azjol-nerub/instance_azjol-nerub.cpp b/scripts/northrend/azjol-nerub/azjol-nerub/instance_azjol-nerub.cpp +index 80faf81..9bd8e67 100644 +--- a/scripts/northrend/azjol-nerub/azjol-nerub/instance_azjol-nerub.cpp ++++ b/scripts/northrend/azjol-nerub/azjol-nerub/instance_azjol-nerub.cpp +@@ -177,8 +177,6 @@ void instance_azjol_nerub::SetData(uint32 uiType, uint32 uiData) + DoUseDoorOrButton(GO_DOOR_ANUBARAK_1); + DoUseDoorOrButton(GO_DOOR_ANUBARAK_2); + DoUseDoorOrButton(GO_DOOR_ANUBARAK_3); +- if (uiData == IN_PROGRESS) +- DoStartTimedAchievement(ACHIEVEMENT_CRITERIA_TYPE_KILL_CREATURE, ACHIEV_START_ANUB_ID); + break; + } + diff --git a/scripts/northrend/dragonblight.cpp b/scripts/northrend/dragonblight.cpp -index a315b31..3335302 100644 +index a69dbc6..0bde6be 100644 --- a/scripts/northrend/dragonblight.cpp +++ b/scripts/northrend/dragonblight.cpp @@ -101,7 +101,7 @@ bool GossipSelect_npc_alexstrasza_wr_gate(Player* pPlayer, Creature* pCreature, @@ -98,8 +242,101 @@ index a315b31..3335302 100644 } return true; +diff --git a/scripts/northrend/naxxramas/instance_naxxramas.cpp b/scripts/northrend/naxxramas/instance_naxxramas.cpp +index 58a83c5..37c44a1 100644 +--- a/scripts/northrend/naxxramas/instance_naxxramas.cpp ++++ b/scripts/northrend/naxxramas/instance_naxxramas.cpp +@@ -220,10 +220,7 @@ void instance_naxxramas::SetData(uint32 uiType, uint32 uiData) + m_auiEncounter[uiType] = uiData; + DoUseDoorOrButton(GO_ARAC_ANUB_DOOR); + if (uiData == DONE) +- { + DoUseDoorOrButton(GO_ARAC_ANUB_GATE); +- DoStartTimedAchievement(ACHIEVEMENT_CRITERIA_TYPE_KILL_CREATURE, ACHIEV_START_MAEXXNA_ID); +- } + break; + case TYPE_FAERLINA: + DoUseDoorOrButton(GO_ARAC_FAER_WEB); +@@ -325,8 +322,6 @@ void instance_naxxramas::SetData(uint32 uiType, uint32 uiData) + break; + case TYPE_PATCHWERK: + m_auiEncounter[uiType] = uiData; +- if (uiData == IN_PROGRESS) +- DoStartTimedAchievement(ACHIEVEMENT_CRITERIA_TYPE_KILL_CREATURE, ACHIEV_START_PATCHWERK_ID); + if (uiData == DONE) + DoUseDoorOrButton(GO_CONS_PATH_EXIT_DOOR); + break; +diff --git a/scripts/northrend/naxxramas/naxxramas.h b/scripts/northrend/naxxramas/naxxramas.h +index 3ae6d95..41db6fe 100644 +--- a/scripts/northrend/naxxramas/naxxramas.h ++++ b/scripts/northrend/naxxramas/naxxramas.h +@@ -165,10 +165,6 @@ enum + ACHIEV_CRIT_UNDYING_MAEX = 13238, + ACHIEV_CRIT_UNDYING_LOA = 13239, + ACHIEV_CRIT_UNDYING_THAD = 13240, +- +- // Timed achievement criterias +- ACHIEV_START_PATCHWERK_ID = 10286, +- ACHIEV_START_MAEXXNA_ID = 9891, + }; + + struct GothTrigger +diff --git a/scripts/northrend/ulduar/halls_of_lightning/halls_of_lightning.h b/scripts/northrend/ulduar/halls_of_lightning/halls_of_lightning.h +index ba0fe82..60d6895 100644 +--- a/scripts/northrend/ulduar/halls_of_lightning/halls_of_lightning.h ++++ b/scripts/northrend/ulduar/halls_of_lightning/halls_of_lightning.h +@@ -22,9 +22,7 @@ enum + GO_VOLKHAN_DOOR = 191325, //_doors07 + GO_IONAR_DOOR = 191326, //_doors05 + GO_LOKEN_DOOR = 191324, //_doors02 +- GO_LOKEN_THRONE = 192654, +- +- ACHIEV_START_LOKEN_ID = 20384, ++ GO_LOKEN_THRONE = 192654 + }; + + class MANGOS_DLL_DECL instance_halls_of_lightning : public ScriptedInstance +diff --git a/scripts/northrend/ulduar/halls_of_lightning/instance_halls_of_lightning.cpp b/scripts/northrend/ulduar/halls_of_lightning/instance_halls_of_lightning.cpp +index 989eeb9..5c8269f 100644 +--- a/scripts/northrend/ulduar/halls_of_lightning/instance_halls_of_lightning.cpp ++++ b/scripts/northrend/ulduar/halls_of_lightning/instance_halls_of_lightning.cpp +@@ -95,8 +95,6 @@ void instance_halls_of_lightning::SetData(uint32 uiType, uint32 uiData) + m_auiEncounter[uiType] = uiData; + break; + case TYPE_LOKEN: +- if (uiData == IN_PROGRESS) +- DoStartTimedAchievement(ACHIEVEMENT_CRITERIA_TYPE_KILL_CREATURE, ACHIEV_START_LOKEN_ID); + if (uiData == DONE) + { + DoUseDoorOrButton(GO_LOKEN_DOOR); +diff --git a/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.h b/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.h +index 9fd2637..1a4b58a 100644 +--- a/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.h ++++ b/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.h +@@ -41,8 +41,6 @@ enum + FACE_MARNAK = 0, + FACE_ABEDNEUM = 1, + FACE_KADDRAK = 2, +- +- ACHIEV_START_MAIDEN_ID = 20383, + }; + + struct Face +diff --git a/scripts/northrend/ulduar/halls_of_stone/instance_halls_of_stone.cpp b/scripts/northrend/ulduar/halls_of_stone/instance_halls_of_stone.cpp +index 1e4f4d3..59c9ee8 100644 +--- a/scripts/northrend/ulduar/halls_of_stone/instance_halls_of_stone.cpp ++++ b/scripts/northrend/ulduar/halls_of_stone/instance_halls_of_stone.cpp +@@ -133,8 +133,6 @@ void instance_halls_of_stone::SetData(uint32 uiType, uint32 uiData) + break; + case TYPE_MAIDEN: + m_auiEncounter[1] = uiData; +- if (uiData == IN_PROGRESS) +- DoStartTimedAchievement(ACHIEVEMENT_CRITERIA_TYPE_KILL_CREATURE, ACHIEV_START_MAIDEN_ID); + break; + case TYPE_KRYSTALLUS: + m_auiEncounter[2] = uiData; diff --git a/scripts/outland/auchindoun/auchenai_crypts/boss_exarch_maladaar.cpp b/scripts/outland/auchindoun/auchenai_crypts/boss_exarch_maladaar.cpp -index 621649f..26d6622 100644 +index 1aae4d2..862938b 100644 --- a/scripts/outland/auchindoun/auchenai_crypts/boss_exarch_maladaar.cpp +++ b/scripts/outland/auchindoun/auchenai_crypts/boss_exarch_maladaar.cpp @@ -107,10 +107,10 @@ struct MANGOS_DLL_DECL mob_stolen_soulAI : public ScriptedAI @@ -131,10 +368,10 @@ index 4474aa7..8a70bbc 100644 return true; } diff --git a/system/ScriptLoader.cpp b/system/ScriptLoader.cpp -index f30904e..6e7650a 100644 +index 0959568..02a269f 100644 --- a/system/ScriptLoader.cpp +++ b/system/ScriptLoader.cpp -@@ -102,7 +102,22 @@ extern void AddSC_boss_majordomo(); +@@ -98,7 +98,22 @@ extern void AddSC_boss_majordomo(); extern void AddSC_boss_ragnaros(); extern void AddSC_instance_molten_core(); extern void AddSC_molten_core(); @@ -158,7 +395,7 @@ index f30904e..6e7650a 100644 extern void AddSC_boss_arcanist_doan(); // scarlet_monastery extern void AddSC_boss_azshir_the_sleepless(); extern void AddSC_boss_bloodmage_thalnos(); -@@ -214,8 +229,6 @@ extern void AddSC_boss_epoch_hunter(); +@@ -210,8 +225,6 @@ extern void AddSC_boss_epoch_hunter(); extern void AddSC_boss_lieutenant_drake(); extern void AddSC_instance_old_hillsbrad(); extern void AddSC_old_hillsbrad(); @@ -167,7 +404,7 @@ index f30904e..6e7650a 100644 extern void AddSC_dire_maul(); // dire_maul extern void AddSC_instance_dire_maul(); extern void AddSC_boss_celebras_the_cursed(); // maraudon -@@ -271,144 +284,7 @@ extern void AddSC_ungoro_crater(); +@@ -269,144 +282,7 @@ extern void AddSC_ungoro_crater(); extern void AddSC_winterspring(); // northrend @@ -313,7 +550,7 @@ index f30904e..6e7650a 100644 // outland extern void AddSC_boss_exarch_maladaar(); // auchindoun, auchenai_crypts -@@ -592,7 +468,22 @@ void AddScripts() +@@ -587,7 +463,22 @@ void AddScripts() AddSC_boss_ragnaros(); AddSC_instance_molten_core(); AddSC_molten_core(); @@ -337,7 +574,7 @@ index f30904e..6e7650a 100644 AddSC_boss_arcanist_doan(); // scarlet_monastery AddSC_boss_azshir_the_sleepless(); AddSC_boss_bloodmage_thalnos(); -@@ -704,8 +595,6 @@ void AddScripts() +@@ -699,8 +590,6 @@ void AddScripts() AddSC_boss_lieutenant_drake(); AddSC_instance_old_hillsbrad(); AddSC_old_hillsbrad(); @@ -346,7 +583,7 @@ index f30904e..6e7650a 100644 AddSC_dire_maul(); // dire_maul AddSC_instance_dire_maul(); AddSC_boss_celebras_the_cursed(); // maraudon -@@ -761,144 +650,7 @@ void AddScripts() +@@ -758,144 +647,7 @@ void AddScripts() AddSC_winterspring(); // northrend diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 762bb5925..5765f4cdf 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2230" + #define SD2_REVISION_NR "2231" #endif // __SD2_REVISION_NR_H__ From 66a62bbab239f7298a12f3a9ed608e0281642a86 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Sun, 26 Jun 2011 20:22:33 +0200 Subject: [PATCH 0212/1172] [2232] A few dragon tunings * Remove unneeded spell-enums in Onyxia (thanks to Cher0 for pointing) * Also improve Onyxia Whelp handling (Remove invalid array access, make whelps less agressive) * Add some additional comment to Sapphirion, set summoned npcs into combat * Fix Seeping Fog Summon Timer for Emerald Dragons (thanks to Click for noting) --- scripts/kalimdor/onyxias_lair/boss_onyxia.cpp | 39 ++++++++++++------- .../northrend/naxxramas/boss_sapphiron.cpp | 11 +++++- scripts/world/bosses_emerald_dragons.cpp | 2 +- sd2_revision_nr.h | 2 +- 4 files changed, 38 insertions(+), 16 deletions(-) diff --git a/scripts/kalimdor/onyxias_lair/boss_onyxia.cpp b/scripts/kalimdor/onyxias_lair/boss_onyxia.cpp index 0ad95ad59..6df2d50a4 100644 --- a/scripts/kalimdor/onyxias_lair/boss_onyxia.cpp +++ b/scripts/kalimdor/onyxias_lair/boss_onyxia.cpp @@ -42,8 +42,6 @@ enum SPELL_KNOCK_AWAY = 19633, SPELL_FIREBALL = 18392, SPELL_FIREBALL_H = 68926, - SPELL_ERRUPTION = 17731, // does not work - SPELL_ERRUPTION_H = 69294, // does not work //Not much choise about these. We have to make own defintion on the direction/start-end point SPELL_BREATH_NORTH_TO_SOUTH = 17086, // 20x in "array" @@ -77,7 +75,7 @@ enum PHASE_BREATH_POST = 5 }; -struct sOnyxMove +struct OnyxiaMove { uint32 uiLocId; uint32 uiLocIdEnd; @@ -85,7 +83,7 @@ struct sOnyxMove float fX, fY, fZ; }; -static sOnyxMove aMoveData[]= +static OnyxiaMove aMoveData[]= { {0, 4, SPELL_BREATH_NORTH_TO_SOUTH, 22.8763f, -217.152f, -60.0548f}, //north {1, 5, SPELL_BREATH_NE_TO_SW, 10.2191f, -247.912f, -60.896f}, //north-east @@ -97,7 +95,7 @@ static sOnyxMove aMoveData[]= {7, 3, SPELL_BREATH_NW_TO_SE, 6.8951f, -180.246f, -60.896f}, //north-west }; -static float afSpawnLocations[4][3]= +static const float afSpawnLocations[3][3]= { {-30.127f, -254.463f, -89.440f}, // whelps {-30.817f, -177.106f, -89.258f}, // whelps @@ -110,7 +108,7 @@ struct MANGOS_DLL_DECL boss_onyxiaAI : public ScriptedAI { m_pInstance = (instance_onyxias_lair*)pCreature->GetInstanceData(); m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); - m_uiMaxBreathPositions = sizeof(aMoveData)/sizeof(sOnyxMove); + m_uiMaxBreathPositions = sizeof(aMoveData)/sizeof(OnyxiaMove); Reset(); } @@ -127,7 +125,7 @@ struct MANGOS_DLL_DECL boss_onyxiaAI : public ScriptedAI uint32 m_uiMovePoint; uint32 m_uiMovementTimer; - sOnyxMove* m_pPointData; + OnyxiaMove* m_pPointData; uint32 m_uiFireballTimer; uint32 m_uiSummonWhelpsTimer; @@ -192,13 +190,28 @@ struct MANGOS_DLL_DECL boss_onyxiaAI : public ScriptedAI void JustSummoned(Creature* pSummoned) { - pSummoned->GetMotionMaster()->MovePoint(0, afSpawnLocations[3][0], afSpawnLocations[3][1], afSpawnLocations[3][2]); - pSummoned->SetInCombatWithZone(); + if (Creature* pTrigger = m_pInstance->GetSingleCreatureFromStorage(NPC_ONYXIA_TRIGGER)) + { + // Get some random point near the center + float fX, fY, fZ; + pSummoned->GetRandomPoint(pTrigger->GetPositionX(), pTrigger->GetPositionY(), pTrigger->GetPositionZ(), 20.0f, fX, fY, fZ); + pSummoned->GetMotionMaster()->MovePoint(1, fX, fY, fZ); + } + else + pSummoned->SetInCombatWithZone(); if (pSummoned->GetEntry() == NPC_ONYXIA_WHELP) ++m_uiSummonCount; } + void SummonedMovementInform(Creature* pSummoned, uint32 uiMoveType, uint32 uiPointId) + { + if (uiMoveType != POINT_MOTION_TYPE || uiPointId != 1 || !m_creature->getVictim()) + return; + + pSummoned->SetInCombatWithZone(); + } + void KilledUnit(Unit* pVictim) { DoScriptText(SAY_KILL, m_creature); @@ -229,7 +242,7 @@ struct MANGOS_DLL_DECL boss_onyxiaAI : public ScriptedAI } } - sOnyxMove* GetMoveData() + OnyxiaMove* GetMoveData() { for (uint32 i = 0; i < m_uiMaxBreathPositions; ++i) { @@ -393,8 +406,8 @@ struct MANGOS_DLL_DECL boss_onyxiaAI : public ScriptedAI { if (m_uiWhelpTimer < uiDiff) { - m_creature->SummonCreature(NPC_ONYXIA_WHELP, afSpawnLocations[0][0], afSpawnLocations[0][1], afSpawnLocations[0][2], 0.0f, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 30000); - m_creature->SummonCreature(NPC_ONYXIA_WHELP, afSpawnLocations[1][0], afSpawnLocations[1][1], afSpawnLocations[1][2], 0.0f, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 30000); + m_creature->SummonCreature(NPC_ONYXIA_WHELP, afSpawnLocations[0][0], afSpawnLocations[0][1], afSpawnLocations[0][2], 0.0f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, MINUTE*IN_MILLISECONDS); + m_creature->SummonCreature(NPC_ONYXIA_WHELP, afSpawnLocations[1][0], afSpawnLocations[1][1], afSpawnLocations[1][2], 0.0f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, MINUTE*IN_MILLISECONDS); m_uiWhelpTimer = 500; } else @@ -404,7 +417,7 @@ struct MANGOS_DLL_DECL boss_onyxiaAI : public ScriptedAI { m_bIsSummoningWhelps = false; m_uiSummonCount = 0; - m_uiSummonWhelpsTimer = 80000; // 90s -10s for summoning + m_uiSummonWhelpsTimer = 80000; // 90s - 10s for summoning } } else diff --git a/scripts/northrend/naxxramas/boss_sapphiron.cpp b/scripts/northrend/naxxramas/boss_sapphiron.cpp index c068f2f41..8b5ce98a4 100644 --- a/scripts/northrend/naxxramas/boss_sapphiron.cpp +++ b/scripts/northrend/naxxramas/boss_sapphiron.cpp @@ -22,7 +22,7 @@ SDCategory: Naxxramas EndScriptData */ /* Additional comments: - * Bugged spells: 28560 (needs maxTarget = 1, Summon of 16474 implementation, TODO, how long?) + * Bugged spells: 28560 (needs maxTarget = 1, Summon of 16474 implementation, TODO, 30s duration) * 28526 (needs ScriptEffect to cast 28522 onto random target) * * Blizzard might need handling for their movement @@ -140,6 +140,15 @@ struct MANGOS_DLL_DECL boss_sapphironAI : public ScriptedAI m_pInstance->SetData(TYPE_SAPPHIRON, FAIL); } + void JustSummoned(Creature* pSummoned) + { + if (pSummoned->GetEntry() == NPC_YOU_KNOW_WHO) + { + if (Unit* pEnemy = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + pSummoned->AI()->AttackStart(pEnemy); + } + } + void MovementInform(uint32 uiType, uint32 uiPointId) { if (uiType == POINT_MOTION_TYPE && m_Phase == PHASE_LIFT_OFF) diff --git a/scripts/world/bosses_emerald_dragons.cpp b/scripts/world/bosses_emerald_dragons.cpp index f1517a0b0..3f4608fed 100644 --- a/scripts/world/bosses_emerald_dragons.cpp +++ b/scripts/world/bosses_emerald_dragons.cpp @@ -116,7 +116,7 @@ struct MANGOS_DLL_DECL boss_emerald_dragonAI : public ScriptedAI { DoCastSpellIfCan(m_creature, SPELL_SEEPING_FOG_R, CAST_TRIGGERED); DoCastSpellIfCan(m_creature, SPELL_SEEPING_FOG_L, CAST_TRIGGERED); - m_uiSeepingFogTimer = urand(8000, 16000); + m_uiSeepingFogTimer = urand(120000, 150000); // Rather Guesswork, but one Fog has 2min duration, hence a bit longer } else m_uiSeepingFogTimer -= uiDiff; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 5765f4cdf..392de5e6d 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2231" + #define SD2_REVISION_NR "2232" #endif // __SD2_REVISION_NR_H__ From 4486b33457d92e076f622f5a1a6548ce270d20c2 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Mon, 27 Jun 2011 00:46:24 +0200 Subject: [PATCH 0213/1172] [2233] Housegardening in sc_gossip.h Remove two invalid (since at least 2008) macros: * SEND_QUEST_DETAILS * SEND_REQUESTEDITEMS Please feedback about your use of other in sc_gossip.h defined macros, because I intend to remove the ones that we don't use in SD2! --- include/sc_gossip.h | 33 +++++++++++++-------------------- sd2_revision_nr.h | 2 +- 2 files changed, 14 insertions(+), 21 deletions(-) diff --git a/include/sc_gossip.h b/include/sc_gossip.h index fa97fc894..6524f1af5 100644 --- a/include/sc_gossip.h +++ b/include/sc_gossip.h @@ -140,7 +140,9 @@ extern uint32 GetSkillLevel(Player* pPlayer, uint32 uiSkill); #define ADD_GOSSIP_ITEM_ID(uiIcon, iTextId, uiSender, uiOptionId) PlayerTalkClass->GetGossipMenu().AddMenuItem(uiIcon, iTextId, uiSender, uiOptionId, 0, 0) #define ADD_GOSSIP_ITEM_EXTENDED(uiIcon, chrText, uiSender, uiOptionId, chrBoxMessage, uiBoxMoney, bCode) PlayerTalkClass->GetGossipMenu().AddMenuItem(uiIcon, chrText, uiSender, uiOptionId, chrBoxMessage, uiBoxMoney, bCode) -// This fuction Sends the current menu to show to client, uiTextId - NPCTEXTID(uint32) , uiGuid - npc guid(ObjectGuid) +// This fuction Sends the current menu to show to client +// uiTextId - NPCTEXTID (uint32) +// guid - npc guid (ObjectGuid) #define SEND_GOSSIP_MENU(uiTextId, guid) PlayerTalkClass->SendGossipMenu(uiTextId, guid) // This fuction shows POI(point of interest) to client. @@ -155,34 +157,25 @@ extern uint32 GetSkillLevel(Player* pPlayer, uint32 uiSkill); // Closes the Menu #define CLOSE_GOSSIP_MENU() PlayerTalkClass->CloseGossip() -// Fuction to tell to client the details -// a - quest object -// b - npc guid(uint64) -// c - Activate accept(bool) -#define SEND_QUEST_DETAILS(a, b, c) PlayerTalkClass->SendQuestDetails(a, b, c) - -// Fuction to tell to client the requested items to complete quest -// a - quest object -// b - npc guid(uint64) -// c - Iscompletable(bool) -// d - close at cancel(bool) - in case single incomplite ques -#define SEND_REQUESTEDITEMS(a, b, c, d) PlayerTalkClass->SendRequestedItems(a, b, c, d) - -// Fuctions to send NPC lists, a - is always the npc guid(uint64) +// Fuctions to send NPC lists +// a - is always the npc guid (ObjectGuid) #define SEND_VENDORLIST(a) GetSession()->SendListInventory(a) #define SEND_TRAINERLIST(a) GetSession()->SendTrainerList(a) #define SEND_BANKERLIST(a) GetSession()->SendShowBank(a) #define SEND_TABARDLIST(a) GetSession()->SendTabardVendorActivate(a) #define SEND_TAXILIST(a) GetSession()->SendTaxiStatus(a) -// Function to send the Auction List, a - npc guid(uint64), b - pointer to npc(Creature*) -#define SEND_AUCTIONLIST(a, b) GetSession()->SendAuctionHello(a, b) +// Function to send the Auction List +// a - pointer to unit (Unit*) +#define SEND_AUCTIONLIST(a) GetSession()->SendAuctionHello(a) // Ressurect's the player if is dead. #define SEND_SPRESURRECT() GetSession()->SendSpiritResurrect() -// ----------------------------------- - -// defined fuctions to use with Creature +// Function to send the Quest Dialogue Status +// a - pointer to player (Player*) +// b - pointer to questgiver (Object*) +// c - defstatus (uint32) #define QUEST_DIALOG_STATUS(a, b, c) GetSession()->getDialogStatus(a, b, c) + #endif diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 392de5e6d..db3a8bfe9 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2232" + #define SD2_REVISION_NR "2233" #endif // __SD2_REVISION_NR_H__ From 867c992b9b214f735aca1bd5c02dea4c2a68e02f Mon Sep 17 00:00:00 2001 From: Cher0 Date: Sun, 3 Jul 2011 18:31:59 +0200 Subject: [PATCH 0214/1172] [2234] Fix possible crash for Onyxia Signed-off-by: Schmoozerd --- scripts/kalimdor/onyxias_lair/boss_onyxia.cpp | 3 +++ sd2_revision_nr.h | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/kalimdor/onyxias_lair/boss_onyxia.cpp b/scripts/kalimdor/onyxias_lair/boss_onyxia.cpp index 6df2d50a4..c8152f569 100644 --- a/scripts/kalimdor/onyxias_lair/boss_onyxia.cpp +++ b/scripts/kalimdor/onyxias_lair/boss_onyxia.cpp @@ -190,6 +190,9 @@ struct MANGOS_DLL_DECL boss_onyxiaAI : public ScriptedAI void JustSummoned(Creature* pSummoned) { + if (!m_pInstance) + return; + if (Creature* pTrigger = m_pInstance->GetSingleCreatureFromStorage(NPC_ONYXIA_TRIGGER)) { // Get some random point near the center diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index db3a8bfe9..2e66c88d4 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2233" + #define SD2_REVISION_NR "2234" #endif // __SD2_REVISION_NR_H__ From 577f0e04b01eec64fe3d521f3d36cef1c2578e01 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sun, 3 Jul 2011 20:16:43 +0200 Subject: [PATCH 0215/1172] [2235] Add Intro Event for Vaelastrasz (BWL) * Also improve selecting targets for Burning Adrenaline * Fix an engrish typo (thanks to Kid10) Signed-off-by: Schmoozerd --- .../blackwing_lair/blackwing_lair.h | 9 +- .../blackwing_lair/boss_vaelastrasz.cpp | 213 +++++++++++++----- .../instance_blackwing_lair.cpp | 20 +- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 2 + sql/scriptdev2_script_full.sql | 4 +- sql/updates/r2235_mangos.sql | 2 + sql/updates/r2235_scriptdev2.sql | 2 + 8 files changed, 198 insertions(+), 56 deletions(-) create mode 100644 sql/updates/r2235_mangos.sql create mode 100644 sql/updates/r2235_scriptdev2.sql diff --git a/scripts/eastern_kingdoms/blackwing_lair/blackwing_lair.h b/scripts/eastern_kingdoms/blackwing_lair/blackwing_lair.h index c807afa6b..b98841fee 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/blackwing_lair.h +++ b/scripts/eastern_kingdoms/blackwing_lair/blackwing_lair.h @@ -27,6 +27,7 @@ enum NPC_CHROMAGGUS = 14020, NPC_NEFARIAN = 11583, NPC_LORD_NEFARIAN = 10162, + NPC_BLACKWING_TECHNICIAN = 13996, // Flees at Vael intro event GO_DOOR_RAZORGORE_ENTER = 176964, GO_DOOR_RAZORGORE_EXIT = 176965, @@ -35,9 +36,12 @@ enum GO_DOOR_CHROMAGGUS_SIDE = 179116, GO_DOOR_CHROMAGGUS_EXIT = 179117, GO_DOOR_VAELASTRASZ = 179364, - GO_DOOR_LASHLAYER = 179365 + GO_DOOR_LASHLAYER = 179365, }; +// Coords used to spawn Nefarius at the throne +static const float aNefariusSpawnLoc[4] = {-7466.16f, -1040.80f, 412.053f, 2.14675f}; + class MANGOS_DLL_DECL instance_blackwing_lair : public ScriptedInstance { public: @@ -47,6 +51,7 @@ class MANGOS_DLL_DECL instance_blackwing_lair : public ScriptedInstance void Initialize(); bool IsEncounterInProgress() const; + void OnCreatureCreate(Creature* pCreature); void OnObjectCreate(GameObject* pGo); void SetData(uint32 uiType, uint32 uiData); @@ -58,6 +63,8 @@ class MANGOS_DLL_DECL instance_blackwing_lair : public ScriptedInstance protected: std::string m_strInstData; uint32 m_auiEncounter[MAX_ENCOUNTER]; + + GUIDList m_lTechnicianGuids; }; #endif diff --git a/scripts/eastern_kingdoms/blackwing_lair/boss_vaelastrasz.cpp b/scripts/eastern_kingdoms/blackwing_lair/boss_vaelastrasz.cpp index 729537e8d..dd0f57002 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/boss_vaelastrasz.cpp +++ b/scripts/eastern_kingdoms/blackwing_lair/boss_vaelastrasz.cpp @@ -31,17 +31,30 @@ enum SAY_LINE_3 = -1469028, SAY_HALFLIFE = -1469029, SAY_KILLTARGET = -1469030, - SAY_NEFARIUS_CORRUPT = -1469006, //when he corrupts Vaelastrasz; possible to start the event by arrea trigger id = 3626 + SAY_NEFARIUS_CORRUPT_1 = -1469006, // When he corrupts Vaelastrasz + SAY_NEFARIUS_CORRUPT_2 = -1469032, + SAY_TECHNICIAN_RUN = -1469034, SPELL_ESSENCE_OF_THE_RED = 23513, SPELL_FLAME_BREATH = 23461, SPELL_FIRE_NOVA = 23462, SPELL_TAIL_SWEEP = 15847, SPELL_BURNING_ADRENALINE = 23620, - SPELL_CLEAVE = 20684 // Chain cleave is most likely named something different and contains a dummy effect -}; + SPELL_CLEAVE = 20684, // Chain cleave is most likely named something different and contains a dummy effect + + SPELL_NEFARIUS_CORRUPTION = 23642, -#define GOSSIP_ITEM "Start Event " + GOSSIP_ITEM_VAEL_1 = -3469003, + GOSSIP_ITEM_VAEL_2 = -3469004, + // Vael Gossip texts might be 7156 and 7256; At the moment are missing from DB + // For the moment add the default values + GOSSIP_TEXT_VAEL_1 = 384, + GOSSIP_TEXT_VAEL_2 = 384, + + FACTION_HOSTILE = 14, + + AREATRIGGER_VAEL_INTRO = 3626, +}; struct MANGOS_DLL_DECL boss_vaelastraszAI : public ScriptedAI { @@ -50,15 +63,20 @@ struct MANGOS_DLL_DECL boss_vaelastraszAI : public ScriptedAI m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); Reset(); - // TODO Research what actually is supposed to happen here - pCreature->setFaction(35); + // Set stand state to dead before the intro event + m_creature->SetStandState(UNIT_STAND_STATE_DEAD); } ScriptedInstance* m_pInstance; + ObjectGuid m_nefariusGuid; + uint32 m_uiIntroTimer; + uint8 m_uiIntroPhase; + ObjectGuid m_playerGuid; - uint32 m_uiSpeachTimer; - uint32 m_uiSpeachNum; + uint32 m_uiSpeechTimer; + uint8 m_uiSpeechNum; + uint32 m_uiCleaveTimer; uint32 m_uiFlameBreathTimer; uint32 m_uiFireNovaTimer; @@ -66,14 +84,15 @@ struct MANGOS_DLL_DECL boss_vaelastraszAI : public ScriptedAI uint32 m_uiBurningAdrenalineTankTimer; uint32 m_uiTailSweepTimer; bool m_bHasYelled; - bool mbIsDoingSpeach; void Reset() { m_playerGuid.Clear(); - m_uiSpeachTimer = 0; - m_uiSpeachNum = 0; + m_uiIntroTimer = 0; + m_uiIntroPhase = 0; + m_uiSpeechTimer = 0; + m_uiSpeechNum = 0; m_uiCleaveTimer = 8000; // These times are probably wrong m_uiFlameBreathTimer = 11000; m_uiBurningAdrenalineCasterTimer = 15000; @@ -81,20 +100,33 @@ struct MANGOS_DLL_DECL boss_vaelastraszAI : public ScriptedAI m_uiFireNovaTimer = 5000; m_uiTailSweepTimer = 20000; m_bHasYelled = false; - mbIsDoingSpeach = false; + + // Creature should have only 1/3 of hp + m_creature->SetHealth(uint32(m_creature->GetMaxHealth()*.3)); } - void BeginSpeach(Unit* target) + void BeginIntro() + { + // Start Intro delayed + m_uiIntroTimer = 1000; + + if (m_pInstance) + m_pInstance->SetData(TYPE_VAELASTRASZ, SPECIAL); + } + + void BeginSpeech(Player* pTarget) { // Stand up and begin speach - m_playerGuid = target->GetObjectGuid(); + m_playerGuid = pTarget->GetObjectGuid(); // 10 seconds DoScriptText(SAY_LINE_1, m_creature); - m_uiSpeachTimer = 10000; - m_uiSpeachNum = 0; - mbIsDoingSpeach = true; + // Make boss stand + m_creature->SetStandState(UNIT_STAND_STATE_STAND); + + m_uiSpeechTimer = 10000; + m_uiSpeechNum = 0; } void KilledUnit(Unit* pVictim) @@ -110,6 +142,7 @@ struct MANGOS_DLL_DECL boss_vaelastraszAI : public ScriptedAI if (m_pInstance) m_pInstance->SetData(TYPE_VAELASTRASZ, IN_PROGRESS); + // Buff players on aggro DoCastSpellIfCan(m_creature, SPELL_ESSENCE_OF_THE_RED); } @@ -125,45 +158,85 @@ struct MANGOS_DLL_DECL boss_vaelastraszAI : public ScriptedAI m_pInstance->SetData(TYPE_VAELASTRASZ, FAIL); } + void JustSummoned(Creature* pSummoned) + { + if (pSummoned->GetEntry() == NPC_LORD_NEFARIAN) + { + // Set not selectable, so players won't interact with it + pSummoned->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + m_nefariusGuid = pSummoned->GetObjectGuid(); + } + } + void UpdateAI(const uint32 uiDiff) { - // Speach - if (mbIsDoingSpeach) + if (m_uiIntroTimer) + { + if (m_uiIntroTimer <= uiDiff) + { + switch (m_uiIntroPhase) + { + case 0: + m_creature->SummonCreature(NPC_LORD_NEFARIAN, aNefariusSpawnLoc[0], aNefariusSpawnLoc[1], aNefariusSpawnLoc[2], aNefariusSpawnLoc[3], TEMPSUMMON_TIMED_DESPAWN, 25000); + m_uiIntroTimer = 1000; + break; + case 1: + if (Creature* pNefarius = m_creature->GetMap()->GetCreature(m_nefariusGuid)) + { + pNefarius->CastSpell(m_creature, SPELL_NEFARIUS_CORRUPTION, true); + DoScriptText(SAY_NEFARIUS_CORRUPT_1, pNefarius); + } + m_uiIntroTimer = 16000; + break; + case 2: + if (Creature* pNefarius = m_creature->GetMap()->GetCreature(m_nefariusGuid)) + DoScriptText(SAY_NEFARIUS_CORRUPT_2, pNefarius); + + // Set npc flags now + m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); + m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER); + m_uiIntroTimer = 0; + break; + } + ++m_uiIntroPhase; + } + else + m_uiIntroTimer -= uiDiff; + } + + // Speech + if (m_uiSpeechTimer) { - if (m_uiSpeachTimer < uiDiff) + if (m_uiSpeechTimer <= uiDiff) { - switch (m_uiSpeachNum) + switch (m_uiSpeechNum) { case 0: // 16 seconds till next line DoScriptText(SAY_LINE_2, m_creature); - m_uiSpeachTimer = 16000; - ++m_uiSpeachNum; + m_uiSpeechTimer = 16000; + ++m_uiSpeechNum; break; case 1: // This one is actually 16 seconds but we only go to 10 seconds because he starts attacking after he says "I must fight this!" DoScriptText(SAY_LINE_3, m_creature); - m_uiSpeachTimer = 10000; - ++m_uiSpeachNum; + m_uiSpeechTimer = 10000; + ++m_uiSpeechNum; break; case 2: - m_creature->setFaction(103); - m_creature->SetHealth(int(m_creature->GetMaxHealth()*.3)); + m_creature->setFaction(FACTION_HOSTILE); if (m_playerGuid) { if (Player* pPlayer = m_creature->GetMap()->GetPlayer(m_playerGuid)) AttackStart(pPlayer); - - DoCastSpellIfCan(m_creature, SPELL_ESSENCE_OF_THE_RED); } - m_uiSpeachTimer = 0; - mbIsDoingSpeach = false; + m_uiSpeechTimer = 0; break; } } else - m_uiSpeachTimer -= uiDiff; + m_uiSpeechTimer -= uiDiff; } // Return since we have no target @@ -198,20 +271,24 @@ struct MANGOS_DLL_DECL boss_vaelastraszAI : public ScriptedAI // Burning Adrenaline Caster Timer if (m_uiBurningAdrenalineCasterTimer < uiDiff) { - Unit* pTarget = NULL; + std::vector vManaPlayers; - // TODO Target Selection must be improved! - int i = 0 ; - while (i < 3) // max 3 tries to get a random target with power_mana + // Scan for mana targets in threat list + ThreatList const& tList = m_creature->getThreatManager().getThreatList(); + vManaPlayers.reserve(tList.size()); + for (ThreatList::const_iterator iter = tList.begin();iter != tList.end(); ++iter) { - ++i; - pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1); - if (pTarget) - if (pTarget->getPowerType() == POWER_MANA) - i=3; + Unit* pTempTarget = m_creature->GetMap()->GetUnit((*iter)->getUnitGuid()); + + if (pTempTarget && pTempTarget->getPowerType() == POWER_MANA && pTempTarget->GetTypeId() == TYPEID_PLAYER) + vManaPlayers.push_back(pTempTarget); } - if (pTarget) // cast on self (see below) - pTarget->CastSpell(pTarget, SPELL_BURNING_ADRENALINE, true); + + if (vManaPlayers.empty()) + return; + + Unit* pTarget = vManaPlayers[urand(0, vManaPlayers.size() - 1)]; + pTarget->CastSpell(pTarget, SPELL_BURNING_ADRENALINE, true, NULL, NULL, m_creature->GetObjectGuid()); m_uiBurningAdrenalineCasterTimer = 15000; } @@ -223,7 +300,7 @@ struct MANGOS_DLL_DECL boss_vaelastraszAI : public ScriptedAI { // have the victim cast the spell on himself otherwise the third effect aura will be applied // to Vael instead of the player - m_creature->getVictim()->CastSpell(m_creature->getVictim(), SPELL_BURNING_ADRENALINE, true); + m_creature->getVictim()->CastSpell(m_creature->getVictim(), SPELL_BURNING_ADRENALINE, true, NULL, NULL, m_creature->GetObjectGuid()); m_uiBurningAdrenalineTankTimer = 45000; } @@ -254,12 +331,17 @@ struct MANGOS_DLL_DECL boss_vaelastraszAI : public ScriptedAI bool GossipSelect_boss_vaelastrasz(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) { - if (uiAction == GOSSIP_ACTION_INFO_DEF + 1) // Fight time + switch (uiAction) { - pPlayer->CLOSE_GOSSIP_MENU(); - - if (boss_vaelastraszAI* pVaelAI = dynamic_cast(pCreature->AI())) - pVaelAI->BeginSpeach((Unit*)pPlayer); + case GOSSIP_ACTION_INFO_DEF + 1: + pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_VAEL_2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXT_VAEL_2, pCreature->GetObjectGuid()); + break; + case GOSSIP_ACTION_INFO_DEF + 2: + pPlayer->CLOSE_GOSSIP_MENU(); + if (boss_vaelastraszAI* pVaelAI = dynamic_cast(pCreature->AI())) + pVaelAI->BeginSpeech(pPlayer); + break; } return true; @@ -270,8 +352,8 @@ bool GossipHello_boss_vaelastrasz(Player* pPlayer, Creature* pCreature) if (pCreature->isQuestGiver()) pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); - pPlayer->SEND_GOSSIP_MENU(907, pCreature->GetObjectGuid()); + pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_VAEL_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXT_VAEL_1, pCreature->GetObjectGuid()); return true; } @@ -281,6 +363,30 @@ CreatureAI* GetAI_boss_vaelastrasz(Creature* pCreature) return new boss_vaelastraszAI(pCreature); } +bool AreaTrigger_at_vaelastrasz(Player* pPlayer, AreaTriggerEntry const* pAt) +{ + if (pAt->id == AREATRIGGER_VAEL_INTRO) + { + if (pPlayer->isGameMaster() || pPlayer->isDead()) + return false; + + if (instance_blackwing_lair* pInstance = (instance_blackwing_lair*)pPlayer->GetInstanceData()) + { + // Handle intro event + if (pInstance->GetData(TYPE_VAELASTRASZ) == NOT_STARTED) + { + if (Creature* pVaelastrasz = pInstance->GetSingleCreatureFromStorage(NPC_VAELASTRASZ)) + if (boss_vaelastraszAI* pVaelAI = dynamic_cast(pVaelastrasz->AI())) + pVaelAI->BeginIntro(); + } + + // ToDo: make goblins flee + } + } + + return false; +} + void AddSC_boss_vaelastrasz() { Script* pNewScript; @@ -291,4 +397,9 @@ void AddSC_boss_vaelastrasz() pNewScript->pGossipHello = &GossipHello_boss_vaelastrasz; pNewScript->pGossipSelect = &GossipSelect_boss_vaelastrasz; pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "at_vaelastrasz"; + pNewScript->pAreaTrigger = &AreaTrigger_at_vaelastrasz; + pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/blackwing_lair/instance_blackwing_lair.cpp b/scripts/eastern_kingdoms/blackwing_lair/instance_blackwing_lair.cpp index 3c53a2f78..7493116c7 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/instance_blackwing_lair.cpp +++ b/scripts/eastern_kingdoms/blackwing_lair/instance_blackwing_lair.cpp @@ -44,6 +44,21 @@ bool instance_blackwing_lair::IsEncounterInProgress() const return false; } +void instance_blackwing_lair::OnCreatureCreate(Creature* pCreature) +{ + switch (pCreature->GetEntry()) + { + case NPC_BLACKWING_TECHNICIAN: + // Sort creatures so we can get only the ones near Vaelastrasz + if (pCreature->IsWithinDist2d(aNefariusSpawnLoc[0], aNefariusSpawnLoc[1], 50.0f)) + m_lTechnicianGuids.push_back(pCreature->GetObjectGuid()); + break; + case NPC_VAELASTRASZ: + m_mNpcEntryGuidStore[NPC_VAELASTRASZ] = pCreature->GetObjectGuid(); + break; + } +} + void instance_blackwing_lair::OnObjectCreate(GameObject* pGo) { switch(pGo->GetEntry()) @@ -89,8 +104,9 @@ void instance_blackwing_lair::SetData(uint32 uiType, uint32 uiData) break; case TYPE_VAELASTRASZ: m_auiEncounter[uiType] = uiData; - // Prevent the players from running back to the first room - DoUseDoorOrButton(GO_DOOR_RAZORGORE_EXIT); + // Prevent the players from running back to the first room; use if the encounter is not special + if (uiData != SPECIAL) + DoUseDoorOrButton(GO_DOOR_RAZORGORE_EXIT); if (uiData == DONE) DoUseDoorOrButton(GO_DOOR_VAELASTRASZ); break; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 2e66c88d4..fdd89eea4 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2234" + #define SD2_REVISION_NR "2235" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 0d91a5646..382591437 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -46,6 +46,8 @@ DELETE FROM scripted_areatrigger WHERE entry IN (3958, 3960); INSERT INTO scripted_areatrigger VALUES (3958, 'at_zulgurub'), (3960, 'at_zulgurub'); +DELETE FROM scripted_areatrigger WHERE entry=3626; +INSERT INTO scripted_areatrigger VALUES (3626, 'at_vaelastrasz'); /* BATTLEGROUNDS */ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index e5050a456..8466a4d6d 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -1139,7 +1139,9 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1469032,'Get up, little red wyrm...and destroy them!',0,1,0,1,'victor_nefarius SAY_NEFARIUS_CORRUPT_2'), -(-1469033,'%s flee as the controlling power of the orb is drained.',0,2,0,0,'razorgore EMOTE_TROOPS_FLEE'); +(-1469033,'%s flee as the controlling power of the orb is drained.',0,2,0,0,'razorgore EMOTE_TROOPS_FLEE'), + +(-1469034,'Run! They are coming.',0,1,0,0,'blackwing technician SAY_TECHNICIAN_RUN'); -- -1 509 000 RUINS OF AHN'QIRAJ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES diff --git a/sql/updates/r2235_mangos.sql b/sql/updates/r2235_mangos.sql new file mode 100644 index 000000000..0d2d8c78b --- /dev/null +++ b/sql/updates/r2235_mangos.sql @@ -0,0 +1,2 @@ +DELETE FROM scripted_areatrigger WHERE entry=3626; +INSERT INTO scripted_areatrigger VALUES (3626, 'at_vaelastrasz'); diff --git a/sql/updates/r2235_scriptdev2.sql b/sql/updates/r2235_scriptdev2.sql new file mode 100644 index 000000000..83a0079f9 --- /dev/null +++ b/sql/updates/r2235_scriptdev2.sql @@ -0,0 +1,2 @@ +DELETE FROM script_texts WHERE entry=-1469034; +(-1469034,'Run! They are coming.',0,1,0,0,'blackwing technician SAY_TECHNICIAN_RUN'); From 157997dff5f64cb1cd993a45d8e69e7fd008bd42 Mon Sep 17 00:00:00 2001 From: Jethro Date: Mon, 4 Jul 2011 11:36:54 +0200 Subject: [PATCH 0216/1172] [2236] Fix SQL update from rev 2235 --- sd2_revision_nr.h | 2 +- sql/updates/r2235_scriptdev2.sql | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index fdd89eea4..8f4fbe500 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2235" + #define SD2_REVISION_NR "2236" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/updates/r2235_scriptdev2.sql b/sql/updates/r2235_scriptdev2.sql index 83a0079f9..c138d9d6b 100644 --- a/sql/updates/r2235_scriptdev2.sql +++ b/sql/updates/r2235_scriptdev2.sql @@ -1,2 +1,3 @@ DELETE FROM script_texts WHERE entry=-1469034; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES (-1469034,'Run! They are coming.',0,1,0,0,'blackwing technician SAY_TECHNICIAN_RUN'); From ed4a18df29b0db382da98a5bed73ff6d224b07e6 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Mon, 4 Jul 2011 01:25:26 +0300 Subject: [PATCH 0217/1172] [2237] Implement script for Sjonnir (Ulduar - Halls of Stone) * Also add Save and Load support to instance script Signed-off-by: Schmoozerd --- .../ulduar/halls_of_stone/boss_sjonnir.cpp | 137 ++++++++++++++++-- .../ulduar/halls_of_stone/halls_of_stone.cpp | 4 + .../ulduar/halls_of_stone/halls_of_stone.h | 5 + .../instance_halls_of_stone.cpp | 43 +++++- sd2_revision_nr.h | 2 +- 5 files changed, 175 insertions(+), 16 deletions(-) diff --git a/scripts/northrend/ulduar/halls_of_stone/boss_sjonnir.cpp b/scripts/northrend/ulduar/halls_of_stone/boss_sjonnir.cpp index ad5b1d24f..fa23604a7 100644 --- a/scripts/northrend/ulduar/halls_of_stone/boss_sjonnir.cpp +++ b/scripts/northrend/ulduar/halls_of_stone/boss_sjonnir.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: Boss_Sjonnir -SD%Complete: 20% -SDComment: +SD%Complete: 60% +SDComment: Brann Event missing, no proper source for timers SDCategory: Halls of Stone EndScriptData */ @@ -47,22 +47,29 @@ enum SPELL_LIGHTNING_RING = 50840, SPELL_LIGHTNING_RING_H = 59848, + // Cast on aggro SPELL_SUMMON_IRON_DWARF = 50789, // periodic dummy aura, tick each 30sec or each 20sec in heroic SPELL_SUMMON_IRON_DWARF_H = 59860, // left/right 50790,50791 + // Cast at 75% hp (also Brann has some yells at that point) SPELL_SUMMON_IRON_TROGG = 50792, // periodic dummy aura, tick each 10sec or each 7sec in heroic SPELL_SUMMON_IRON_TROGG_H = 59859, // left/right 50793,50794 + // Cast at 50% hp SPELL_SUMMON_MALFORMED_OOZE = 50801, // periodic dummy aura, tick each 5sec or each 3sec in heroic SPELL_SUMMON_MALFORMED_OOZE_H = 59858, // left/right 50802,50803 + // Cast at 15% hp when Bran repairs the machine + SPELL_SUMMON_EARTHEN_DWARF = 50824, // left/right 50825, 50826 + SPELL_SUMMON_IRON_SLUDGE = 50747, // instakill TARGET_SCRIPT SPELL_IRON_SLUDGE_SPAWN_VISUAL = 50777, NPC_IRON_TROGG = 27979, NPC_IRON_DWARF = 27982, NPC_MALFORMED_OOZE = 27981, - NPC_IRON_SLUDGE = 28165 + NPC_IRON_SLUDGE = 28165, + NPC_EARTHEN_DWARF = 27980, }; /*###### @@ -81,18 +88,48 @@ struct MANGOS_DLL_DECL boss_sjonnirAI : public ScriptedAI ScriptedInstance* m_pInstance; bool m_bIsRegularMode; + uint32 m_uiChainLightningTimer; + uint32 m_uiLightningShieldTimer; + uint32 m_uiStaticChargeTimer; + uint32 m_uiLightningRingTimer; + uint32 m_uiFrenzyTimer; + + uint8 m_uiHpCheck; + void Reset() { - if (m_creature->isAlive()) - m_creature->CastSpell(m_creature, m_bIsRegularMode ? SPELL_LIGHTNING_SHIELD : SPELL_LIGHTNING_SHIELD_H, false); + m_uiChainLightningTimer = urand(3000, 8000); // TODO timers weak + m_uiLightningShieldTimer = urand(20000, 25000); + m_uiStaticChargeTimer = urand(20000, 25000); + m_uiLightningRingTimer = urand(30000, 35000); + m_uiFrenzyTimer = 4*MINUTE*IN_MILLISECONDS; // TODO no proper source for this "long" + + m_uiHpCheck = 75; } void Aggro(Unit* pWho) { DoScriptText(SAY_AGGRO, m_creature); - m_creature->CastSpell(m_creature, m_bIsRegularMode ? SPELL_SUMMON_IRON_DWARF : SPELL_SUMMON_IRON_DWARF_H, true); - m_creature->CastSpell(m_creature, m_bIsRegularMode ? SPELL_SUMMON_IRON_TROGG : SPELL_SUMMON_IRON_TROGG_H, true); + DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_LIGHTNING_SHIELD : SPELL_LIGHTNING_SHIELD_H, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_SUMMON_IRON_DWARF : SPELL_SUMMON_IRON_DWARF_H, CAST_TRIGGERED); + + if (m_pInstance) + m_pInstance->SetData(TYPE_SJONNIR, IN_PROGRESS); + } + + void JustDied(Unit* pKiller) + { + DoScriptText(SAY_DEATH, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_SJONNIR, DONE); + } + + void JustReachedHome() + { + if (m_pInstance) + m_pInstance->SetData(TYPE_SJONNIR, FAIL); } void JustSummoned(Creature* pSummoned) @@ -105,6 +142,8 @@ struct MANGOS_DLL_DECL boss_sjonnirAI : public ScriptedAI pSummoned->RemoveSplineFlag(SPLINEFLAG_WALKMODE); pSummoned->GetMotionMaster()->MovePoint(0, fX, fY, fZ); } + else if (pSummoned->GetEntry() == NPC_EARTHEN_DWARF) + pSummoned->AI()->AttackStart(m_creature); } void KilledUnit(Unit* pVictim) @@ -117,9 +156,20 @@ struct MANGOS_DLL_DECL boss_sjonnirAI : public ScriptedAI } } - void JustDied(Unit* pKiller) + bool DoFrenzyIfCan() { - DoScriptText(SAY_DEATH, m_creature); + if (!m_uiFrenzyTimer) + return true; + + if (DoCastSpellIfCan(m_creature, SPELL_FRENZY) == CAST_OK) + { + DoCastSpellIfCan(m_creature, SPELL_SUMMON_EARTHEN_DWARF, CAST_TRIGGERED); + m_uiFrenzyTimer = 0; + + return true; + } + + return false; } void UpdateAI(const uint32 uiDiff) @@ -127,6 +177,65 @@ struct MANGOS_DLL_DECL boss_sjonnirAI : public ScriptedAI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; + if (m_creature->GetHealthPercent() <= (float)m_uiHpCheck) + { + switch(m_uiHpCheck) + { + case 75: + if (DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_SUMMON_IRON_TROGG : SPELL_SUMMON_IRON_TROGG_H, CAST_TRIGGERED) == CAST_OK) + m_uiHpCheck = 50; + break; + case 50: + if (DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_SUMMON_MALFORMED_OOZE : SPELL_SUMMON_MALFORMED_OOZE_H, CAST_TRIGGERED) == CAST_OK) + m_uiHpCheck = 15; + case 15: + if (DoFrenzyIfCan()) + m_uiHpCheck = 0; + + break; + } + } + + if (m_uiChainLightningTimer < uiDiff) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, m_bIsRegularMode ? SPELL_CHAIN_LIGHTNING : SPELL_CHAIN_LIGHTNING_H) == CAST_OK) + m_uiChainLightningTimer = urand(10000, 15000); + } + } + else + m_uiChainLightningTimer -= uiDiff; + + if (m_uiLightningShieldTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_LIGHTNING_SHIELD : SPELL_LIGHTNING_SHIELD_H) == CAST_OK) + m_uiLightningShieldTimer = urand(20000, 25000); + } + else + m_uiLightningShieldTimer -= uiDiff; + + if (m_uiStaticChargeTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), m_bIsRegularMode ? SPELL_STATIC_CHARGE : SPELL_STATIC_CHARGE_H) == CAST_OK) + m_uiStaticChargeTimer = urand(20000, 25000); + } + else + m_uiStaticChargeTimer -= uiDiff; + + if (m_uiLightningRingTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_LIGHTNING_RING : SPELL_LIGHTNING_RING_H) == CAST_OK) + m_uiLightningRingTimer = urand(30000, 35000); + } + else + m_uiLightningRingTimer -= uiDiff; + + if (m_uiFrenzyTimer <= uiDiff) + DoFrenzyIfCan(); + else + m_uiFrenzyTimer -= uiDiff; + DoMeleeAttackIfReady(); } }; @@ -138,10 +247,10 @@ CreatureAI* GetAI_boss_sjonnir(Creature* pCreature) void AddSC_boss_sjonnir() { - Script *newscript; + Script* pNewScript; - newscript = new Script; - newscript->Name = "boss_sjonnir"; - newscript->GetAI = &GetAI_boss_sjonnir; - newscript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "boss_sjonnir"; + pNewScript->GetAI = &GetAI_boss_sjonnir; + pNewScript->RegisterSelf(); } diff --git a/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.cpp b/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.cpp index f96e4f074..868f95a5f 100644 --- a/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.cpp +++ b/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.cpp @@ -100,6 +100,8 @@ enum SPELL_STEALTH = 58506, + SPELL_ACHIEVEMENT_CHECK = 59046, // Doesn't exist in client dbc + NPC_DARK_RUNE_PROTECTOR = 27983, NPC_DARK_RUNE_STORMCALLER = 27984, NPC_IRON_GOLEM_CUSTODIAN = 27985, @@ -535,6 +537,8 @@ struct MANGOS_DLL_DECL npc_brann_hosAI : public npc_escortAI m_pInstance->SetData(TYPE_TRIBUNAL, DONE); } + // Should cast spell 59046 (doesn't exist in client dbc), criterias are ACHIEVEMENT_CRITERIA_TYPE_BE_SPELL_TARGET + Player* pPlayer = GetPlayerForEscort(); if (pPlayer) pPlayer->GroupEventHappens(QUEST_HALLS_OF_STONE, m_creature); diff --git a/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.h b/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.h index 9fd2637fc..e9c5af25b 100644 --- a/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.h +++ b/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.h @@ -21,6 +21,7 @@ enum NPC_MARNAK = 30897, NPC_TRIBUNAL_OF_AGES = 28234, NPC_WORLDTRIGGER = 22515, + NPC_SJONNIR = 27978, GO_DOOR_SJONNIR = 191296, GO_DOOR_TRIBUNAL = 191294, // possibly closed during event? @@ -69,6 +70,9 @@ class MANGOS_DLL_DECL instance_halls_of_stone : public ScriptedInstance void SetData(uint32 uiType, uint32 uiData); uint32 GetData(uint32 uiType); + const char* Save() { return m_strInstData.c_str(); } + void Load(const char* chrIn); + void Update(uint32 uiDiff); void ActivateFace(uint8 uiFace, bool bAfterEvent); @@ -80,6 +84,7 @@ class MANGOS_DLL_DECL instance_halls_of_stone : public ScriptedInstance uint32 m_auiEncounter[MAX_ENCOUNTER]; Face m_aFaces[MAX_FACES]; + std::string m_strInstData; GUIDList m_lKaddrakGUIDs; GUIDList m_lAbedneumGUIDs; diff --git a/scripts/northrend/ulduar/halls_of_stone/instance_halls_of_stone.cpp b/scripts/northrend/ulduar/halls_of_stone/instance_halls_of_stone.cpp index 1e4f4d3c4..5e5262637 100644 --- a/scripts/northrend/ulduar/halls_of_stone/instance_halls_of_stone.cpp +++ b/scripts/northrend/ulduar/halls_of_stone/instance_halls_of_stone.cpp @@ -62,6 +62,9 @@ void instance_halls_of_stone::OnCreatureCreate(Creature* pCreature) case NPC_MARNAK: m_lMarnakGUIDs.push_back(pCreature->GetObjectGuid()); break; case NPC_TRIBUNAL_OF_AGES: m_lTribunalGUIDs.push_back(pCreature->GetObjectGuid()); break; case NPC_WORLDTRIGGER: m_lWorldtriggerGUIDs.push_back(pCreature->GetObjectGuid()); break; + case NPC_SJONNIR: + m_mNpcEntryGuidStore[NPC_SJONNIR] = pCreature->GetObjectGuid(); + break; } } @@ -107,8 +110,10 @@ void instance_halls_of_stone::SetData(uint32 uiType, uint32 uiData) SortFaces(); break; case DONE: - // DoRespawnGameObject(instance->isRegularDifficulty ? GO_TRIBUNAL_CHEST : GO_TRIBUNAL_CHEST_H); // Actually, this one need to be changed faction or similar.. + DoRespawnGameObject(instance->IsRegularDifficulty() ? GO_TRIBUNAL_CHEST : GO_TRIBUNAL_CHEST_H); + // Door workaround because of the missing Bran event + DoUseDoorOrButton(GO_DOOR_SJONNIR); break; case FAIL: for (uint8 i = 0; i < MAX_FACES; ++i) @@ -141,8 +146,22 @@ void instance_halls_of_stone::SetData(uint32 uiType, uint32 uiData) break; case TYPE_SJONNIR: m_auiEncounter[3] = uiData; + DoUseDoorOrButton(GO_DOOR_SJONNIR); break; } + + if (uiData == DONE) + { + OUT_SAVE_INST_DATA; + + std::ostringstream saveStream; + saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2] << " " << m_auiEncounter[3]; + + m_strInstData = saveStream.str(); + + SaveToDB(); + OUT_SAVE_INST_DATA_COMPLETE; + } } uint32 instance_halls_of_stone::GetData(uint32 uiType) @@ -298,6 +317,28 @@ void instance_halls_of_stone::Update(uint32 uiDiff) } } +void instance_halls_of_stone::Load(const char* chrIn) +{ + if (!chrIn) + { + OUT_LOAD_INST_DATA_FAIL; + return; + } + + OUT_LOAD_INST_DATA(chrIn); + + std::istringstream loadStream(chrIn); + loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3]; + + for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) + { + if (m_auiEncounter[i] == IN_PROGRESS) + m_auiEncounter[i] = NOT_STARTED; + } + + OUT_LOAD_INST_DATA_COMPLETE; +} + void instance_halls_of_stone::ProcessFace(uint8 uiFace) { // Cast dmg spell from face eyes, and reset timer for face diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 8f4fbe500..fb558ae41 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2236" + #define SD2_REVISION_NR "2237" #endif // __SD2_REVISION_NR_H__ From 387191afcea5587dae7afad37551461e4c0a4b4a Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Thu, 7 Jul 2011 15:56:48 +0200 Subject: [PATCH 0218/1172] [2238] Make escortAI::SetCurrentWaypoint less strict for order of waypoints Before n waypoints had to have the waypoint-ids 1..n, now they can be given as desired. This especially makes it more easy to split long paths in different subpaths (which have no influece on the choice of the waypoint-ids between each other) --- base/escort_ai.cpp | 26 +++++++++++++++----------- sd2_revision_nr.h | 2 +- 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/base/escort_ai.cpp b/base/escort_ai.cpp index be95899a7..1ecce7851 100644 --- a/base/escort_ai.cpp +++ b/base/escort_ai.cpp @@ -425,23 +425,27 @@ void npc_escortAI::FillPointMovementListForCreature() void npc_escortAI::SetCurrentWaypoint(uint32 uiPointId) { - if (!(HasEscortState(STATE_ESCORT_PAUSED))) // only when paused + if (!(HasEscortState(STATE_ESCORT_PAUSED))) // Only when paused return; - if (uiPointId >= WaypointList.size()) // too high number + if (uiPointId == CurrentWP->uiId) // Already here return; - if (uiPointId == CurrentWP->uiId) // already here - return; - - CurrentWP = WaypointList.begin(); // set to begin (can't -- backwards in itr list) - - while(uiPointId != CurrentWP->uiId) + bool bFoundWaypoint = false; + for (std::list::iterator itr = WaypointList.begin(); itr != WaypointList.end(); ++itr) { - ++CurrentWP; - - if (CurrentWP == WaypointList.end()) + if (itr->uiId == uiPointId) + { + CurrentWP = itr; // Set to found itr + bFoundWaypoint = true; break; + } + } + + if (!bFoundWaypoint) + { + debug_log("SD2: EscortAI current waypoint tried to set to id %u, but doesn't exist in WaypointList", uiPointId); + return; } m_uiWPWaitTimer = 1; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index fb558ae41..c65efb65e 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2237" + #define SD2_REVISION_NR "2238" #endif // __SD2_REVISION_NR_H__ From 00b75c89e78a91edc4c22065d44364ca340341a0 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Fri, 8 Jul 2011 17:27:16 +0200 Subject: [PATCH 0219/1172] [2239] Update to MaNGOS Rev 11720 Replace SendMonsterMove with MonsterMoveWithSpeed Replace for Onyxia with MovePoint (is worse in visual, but to recreate the same effect would require some unwanted dependencies) Also reorder a bit in VC90 project files Signed-off-by: Schmoozerd --- VC90/90ScriptDev2.vcproj | 35 +++++++++---------- base/escort_ai.cpp | 13 +++---- .../blackwing_lair/boss_nefarian.cpp | 4 +-- .../blackwing_lair/boss_victor_nefarius.cpp | 4 +-- .../deadmines/instance_deadmines.cpp | 4 +-- scripts/eastern_kingdoms/hinterlands.cpp | 2 +- .../boss_selin_fireheart.cpp | 2 +- .../shadowfang_keep/shadowfang_keep.cpp | 2 +- .../stratholme/instance_stratholme.cpp | 2 +- scripts/eastern_kingdoms/undercity.cpp | 5 ++- .../eastern_kingdoms/zulaman/boss_akilzon.cpp | 4 +-- .../eastern_kingdoms/zulaman/boss_janalai.cpp | 4 +-- .../zulgurub/boss_mandokir.cpp | 2 +- .../caverns_of_time/hyjal/hyjalAI.cpp | 4 +-- scripts/kalimdor/onyxias_lair/boss_onyxia.cpp | 18 +++------- .../kalimdor/temple_of_ahnqiraj/boss_ouro.cpp | 3 +- .../wailing_caverns/wailing_caverns.cpp | 8 ++--- scripts/northrend/borean_tundra.cpp | 2 +- scripts/northrend/howling_fjord.cpp | 2 +- .../obsidian_sanctum/boss_sartharion.cpp | 3 +- .../halls_of_lightning/boss_volkhan.cpp | 4 +-- .../ulduar/halls_of_stone/boss_sjonnir.cpp | 2 +- .../utgarde_pinnacle/boss_svala.cpp | 10 ++---- scripts/outland/black_temple/boss_illidan.cpp | 14 ++++---- .../black_temple/boss_shade_of_akama.cpp | 6 ++-- .../blood_furnace/instance_blood_furnace.cpp | 4 +-- .../boss_nazan_and_vazruden.cpp | 9 ++--- scripts/outland/nagrand.cpp | 2 +- scripts/outland/shadowmoon_valley.cpp | 2 +- .../tempest_keep/the_eye/boss_kaelthas.cpp | 4 +-- scripts/world/npcs_special.cpp | 2 +- sd2_revision_nr.h | 2 +- sql/scriptdev2_script_full.sql | 2 +- sql/updates/r2239_scriptdev2.sql | 1 + 34 files changed, 78 insertions(+), 109 deletions(-) create mode 100644 sql/updates/r2239_scriptdev2.sql diff --git a/VC90/90ScriptDev2.vcproj b/VC90/90ScriptDev2.vcproj index fc9dd6307..a757ba326 100644 --- a/VC90/90ScriptDev2.vcproj +++ b/VC90/90ScriptDev2.vcproj @@ -570,6 +570,10 @@ + + @@ -622,10 +626,6 @@ RelativePath="..\scripts\eastern_kingdoms\blackrock_spire\instance_blackrock_spire.cpp" > - - @@ -1999,15 +1999,15 @@ Name="ruby_sanctum" > - diff --git a/base/escort_ai.cpp b/base/escort_ai.cpp index 1ecce7851..a5d51d9ef 100644 --- a/base/escort_ai.cpp +++ b/base/escort_ai.cpp @@ -363,11 +363,7 @@ void npc_escortAI::MovementInform(uint32 uiMoveType, uint32 uiPointId) { debug_log("SD2: EscortAI has returned to original position before combat"); - if (m_bIsRunning && m_creature->HasSplineFlag(SPLINEFLAG_WALKMODE)) - m_creature->RemoveSplineFlag(SPLINEFLAG_WALKMODE); - else if (!m_bIsRunning && !m_creature->HasSplineFlag(SPLINEFLAG_WALKMODE)) - m_creature->AddSplineFlag(SPLINEFLAG_WALKMODE); - + m_creature->SetWalk(!m_bIsRunning); RemoveEscortState(STATE_ESCORT_RETURNING); if (!m_uiWPWaitTimer) @@ -458,14 +454,14 @@ void npc_escortAI::SetRun(bool bRun) if (bRun) { if (!m_bIsRunning) - m_creature->RemoveSplineFlag(SPLINEFLAG_WALKMODE); + m_creature->SetWalk(false); else debug_log("SD2: EscortAI attempt to set run mode, but is already running."); } else { if (m_bIsRunning) - m_creature->AddSplineFlag(SPLINEFLAG_WALKMODE); + m_creature->SetWalk(true); else debug_log("SD2: EscortAI attempt to set walk mode, but is already walking."); } @@ -525,8 +521,7 @@ void npc_escortAI::Start(bool bRun, const Player* pPlayer, const Quest* pQuest, CurrentWP = WaypointList.begin(); //Set initial speed - if (m_bIsRunning) - m_creature->RemoveSplineFlag(SPLINEFLAG_WALKMODE); + m_creature->SetWalk(!m_bIsRunning); AddEscortState(STATE_ESCORT_ESCORTING); diff --git a/scripts/eastern_kingdoms/blackwing_lair/boss_nefarian.cpp b/scripts/eastern_kingdoms/blackwing_lair/boss_nefarian.cpp index 332b7ac29..798d51ff1 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/boss_nefarian.cpp +++ b/scripts/eastern_kingdoms/blackwing_lair/boss_nefarian.cpp @@ -135,10 +135,10 @@ struct MANGOS_DLL_DECL boss_nefarianAI : public ScriptedAI DoScriptText(SAY_AGGRO, m_creature); // Remove flying in case Nefarian aggroes before his combat point was reached - if (m_creature->HasSplineFlag(SPLINEFLAG_FLYING)) + if (m_creature->IsLevitating()) { m_creature->SetByteValue(UNIT_FIELD_BYTES_1, 3, 0); - m_creature->RemoveSplineFlag(SPLINEFLAG_FLYING); + m_creature->SetLevitate(false); } DoCastSpellIfCan(m_creature, SPELL_SHADOWFLAME_INITIAL); diff --git a/scripts/eastern_kingdoms/blackwing_lair/boss_victor_nefarius.cpp b/scripts/eastern_kingdoms/blackwing_lair/boss_victor_nefarius.cpp index 689889cf3..5f530b77c 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/boss_victor_nefarius.cpp +++ b/scripts/eastern_kingdoms/blackwing_lair/boss_victor_nefarius.cpp @@ -148,11 +148,11 @@ struct MANGOS_DLL_DECL boss_victor_nefariusAI : public ScriptedAI { if (pSummoned->GetEntry() == NPC_NEFARIAN) { - pSummoned->RemoveSplineFlag(SPLINEFLAG_WALKMODE); + pSummoned->SetWalk(false); // see boss_onyxia (also note the removal of this in boss_nefarian) pSummoned->SetByteValue(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_UNK_2); - pSummoned->AddSplineFlag(SPLINEFLAG_FLYING); + pSummoned->SetLevitate(true); // Let Nefarian fly towards combat area pSummoned->GetMotionMaster()->MovePoint(1, aNefarianLocs[4].m_fX, aNefarianLocs[4].m_fY, aNefarianLocs[4].m_fZ); diff --git a/scripts/eastern_kingdoms/deadmines/instance_deadmines.cpp b/scripts/eastern_kingdoms/deadmines/instance_deadmines.cpp index 283dfccf1..0ecd412c9 100644 --- a/scripts/eastern_kingdoms/deadmines/instance_deadmines.cpp +++ b/scripts/eastern_kingdoms/deadmines/instance_deadmines.cpp @@ -172,13 +172,13 @@ void instance_deadmines::Update(uint32 uiDiff) // should be static spawns, fetch the closest ones at the pier if (Creature* pi1 = GetClosestCreatureWithEntry(pDoor, NPC_PIRATE, 40.0f)) { - pi1->RemoveSplineFlag(SPLINEFLAG_WALKMODE); + pi1->SetWalk(false); pi1->GetMotionMaster()->MovePoint(0, pDoor->GetPositionX(), pDoor->GetPositionY(), pDoor->GetPositionZ()); } if (Creature* pi2 = GetClosestCreatureWithEntry(pDoor, NPC_SQUALLSHAPER, 40.0f)) { - pi2->RemoveSplineFlag(SPLINEFLAG_WALKMODE); + pi2->SetWalk(false); pi2->GetMotionMaster()->MovePoint(0, pDoor->GetPositionX(), pDoor->GetPositionY(), pDoor->GetPositionZ()); } } diff --git a/scripts/eastern_kingdoms/hinterlands.cpp b/scripts/eastern_kingdoms/hinterlands.cpp index 98e7dfc48..39e6fe111 100644 --- a/scripts/eastern_kingdoms/hinterlands.cpp +++ b/scripts/eastern_kingdoms/hinterlands.cpp @@ -232,7 +232,7 @@ struct MANGOS_DLL_DECL npc_rinjiAI : public npc_escortAI void JustSummoned(Creature* pSummoned) { - pSummoned->RemoveSplineFlag(SPLINEFLAG_WALKMODE); + m_creature->SetWalk(false); pSummoned->GetMotionMaster()->MovePoint(0, m_afAmbushMoveTo[m_iSpawnId].m_fX, m_afAmbushMoveTo[m_iSpawnId].m_fY, m_afAmbushMoveTo[m_iSpawnId].m_fZ); } diff --git a/scripts/eastern_kingdoms/magisters_terrace/boss_selin_fireheart.cpp b/scripts/eastern_kingdoms/magisters_terrace/boss_selin_fireheart.cpp index 9e8afff11..d807da3eb 100644 --- a/scripts/eastern_kingdoms/magisters_terrace/boss_selin_fireheart.cpp +++ b/scripts/eastern_kingdoms/magisters_terrace/boss_selin_fireheart.cpp @@ -120,7 +120,7 @@ struct MANGOS_DLL_DECL boss_selin_fireheartAI : public ScriptedAI float x, y, z; // coords that we move to, close to the crystal. pCrystalChosen->GetClosePoint(x, y, z, m_creature->GetObjectBoundingRadius(), CONTACT_DISTANCE); - m_creature->RemoveSplineFlag(SPLINEFLAG_WALKMODE); + m_creature->SetWalk(false); m_creature->GetMotionMaster()->MovePoint(1, x, y, z); m_bDrainingCrystal = true; } diff --git a/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.cpp b/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.cpp index c152e0e88..e39c6901d 100644 --- a/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.cpp +++ b/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.cpp @@ -216,7 +216,7 @@ struct MANGOS_DLL_DECL mob_arugal_voidwalkerAI : public ScriptedAI void Reset() { - m_creature->AddSplineFlag(SPLINEFLAG_WALKMODE); + m_creature->SetWalk(true); m_uiDarkOffering = urand(4400, 12500); m_bWPDone = true; diff --git a/scripts/eastern_kingdoms/stratholme/instance_stratholme.cpp b/scripts/eastern_kingdoms/stratholme/instance_stratholme.cpp index 56bbae2ba..109c6ba4e 100644 --- a/scripts/eastern_kingdoms/stratholme/instance_stratholme.cpp +++ b/scripts/eastern_kingdoms/stratholme/instance_stratholme.cpp @@ -331,7 +331,7 @@ void instance_stratholme::SetData(uint32 uiType, uint32 uiData) if (pBarthilas && pBarthilas->isAlive() && !pBarthilas->isInCombat()) { DoScriptText(SAY_WARN_BARON, pBarthilas); - pBarthilas->RemoveSplineFlag(SPLINEFLAG_WALKMODE); + pBarthilas->SetWalk(false); pBarthilas->GetMotionMaster()->MovePoint(0, aStratholmeLocation[0].m_fX, aStratholmeLocation[0].m_fY, aStratholmeLocation[0].m_fZ); m_uiBarthilasRunTimer = 8000; diff --git a/scripts/eastern_kingdoms/undercity.cpp b/scripts/eastern_kingdoms/undercity.cpp index 2053f89cd..6ca99d4e9 100644 --- a/scripts/eastern_kingdoms/undercity.cpp +++ b/scripts/eastern_kingdoms/undercity.cpp @@ -171,9 +171,8 @@ struct MANGOS_DLL_DECL npc_highborne_lamenterAI : public ScriptedAI { if (EventMove_Timer < diff) { - m_creature->AddSplineFlag(SPLINEFLAG_NO_SPLINE); - m_creature->SendMonsterMoveWithSpeed(m_creature->GetPositionX(),m_creature->GetPositionY(),HIGHBORNE_LOC_Y_NEW,5000); - m_creature->GetMap()->CreatureRelocation(m_creature,m_creature->GetPositionX(),m_creature->GetPositionY(),HIGHBORNE_LOC_Y_NEW,m_creature->GetOrientation()); + m_creature->SetLevitate(true); + m_creature->MonsterMoveWithSpeed(m_creature->GetPositionX(),m_creature->GetPositionY(),HIGHBORNE_LOC_Y_NEW,3.f); EventMove = false; }else EventMove_Timer -= diff; } diff --git a/scripts/eastern_kingdoms/zulaman/boss_akilzon.cpp b/scripts/eastern_kingdoms/zulaman/boss_akilzon.cpp index 6c3f0023c..7a907b7cb 100644 --- a/scripts/eastern_kingdoms/zulaman/boss_akilzon.cpp +++ b/scripts/eastern_kingdoms/zulaman/boss_akilzon.cpp @@ -257,9 +257,7 @@ struct MANGOS_DLL_DECL mob_soaring_eagleAI : public ScriptedAI float fX, fY, fZ; pAzkil->GetRandomPoint(pAzkil->GetPositionX(), pAzkil->GetPositionY(), pAzkil->GetPositionZ()+15.0f, 30.0f, fX, fY, fZ); - if (m_creature->HasSplineFlag(SPLINEFLAG_WALKMODE)) - m_creature->RemoveSplineFlag(SPLINEFLAG_WALKMODE); - + m_creature->SetWalk(false); m_creature->GetMotionMaster()->MovePoint(POINT_ID_RANDOM, fX, fY, fZ); m_bCanMoveToRandom = false; diff --git a/scripts/eastern_kingdoms/zulaman/boss_janalai.cpp b/scripts/eastern_kingdoms/zulaman/boss_janalai.cpp index e7689bc18..b2659500a 100644 --- a/scripts/eastern_kingdoms/zulaman/boss_janalai.cpp +++ b/scripts/eastern_kingdoms/zulaman/boss_janalai.cpp @@ -603,9 +603,7 @@ struct MANGOS_DLL_DECL npc_amanishi_hatcherAI : public ScriptedAI m_uiHatchlingCount = 1; m_bCanMoveNext = false; m_bWaypointEnd = false; - - if (m_creature->HasSplineFlag(SPLINEFLAG_WALKMODE)) - m_creature->RemoveSplineFlag(SPLINEFLAG_WALKMODE); + m_creature->SetWalk(false); } void MoveInLineOfSight(Unit* pWho) {} diff --git a/scripts/eastern_kingdoms/zulgurub/boss_mandokir.cpp b/scripts/eastern_kingdoms/zulgurub/boss_mandokir.cpp index 9526407a9..f78204eba 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_mandokir.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_mandokir.cpp @@ -256,7 +256,7 @@ struct MANGOS_DLL_DECL boss_mandokirAI : public ScriptedAI if (!m_bMandokirDownstairs && m_pInstance && (m_pInstance->GetData(TYPE_OHGAN) == SPECIAL || m_pInstance->GetData(TYPE_OHGAN) == FAIL)) { m_bMandokirDownstairs = true; - m_creature->RemoveSplineFlag(SPLINEFLAG_WALKMODE); + m_creature->SetWalk(false); m_creature->GetMotionMaster()->MovePoint(POINT_DOWNSTAIRS, aMandokirDownstairsPos.fX, aMandokirDownstairsPos.fY, aMandokirDownstairsPos.fZ); } diff --git a/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.cpp b/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.cpp index 4acca5d2d..d5bd17ec5 100644 --- a/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.cpp +++ b/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.cpp @@ -218,7 +218,7 @@ void hyjalAI::JustSummoned(Creature* pSummoned) float fX, fY, fZ; pSummoned->GetRandomPoint(pMove->m_fX, pMove->m_fY, pMove->m_fZ, 10.0f, fX, fY, fZ); - pSummoned->RemoveSplineFlag(SPLINEFLAG_WALKMODE); + pSummoned->SetWalk(false); pSummoned->GetMotionMaster()->MovePoint(0, fX, fY, fZ); } @@ -402,7 +402,7 @@ void hyjalAI::UpdateAI(const uint32 uiDiff) if (!pTemp->isAlive() || pTemp->getVictim()) continue; - pTemp->RemoveSplineFlag(SPLINEFLAG_WALKMODE); + pTemp->SetWalk(false); pTemp->GetMotionMaster()->MovePoint(1, m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ()); } } diff --git a/scripts/kalimdor/onyxias_lair/boss_onyxia.cpp b/scripts/kalimdor/onyxias_lair/boss_onyxia.cpp index c8152f569..8a3673a85 100644 --- a/scripts/kalimdor/onyxias_lair/boss_onyxia.cpp +++ b/scripts/kalimdor/onyxias_lair/boss_onyxia.cpp @@ -175,7 +175,7 @@ struct MANGOS_DLL_DECL boss_onyxiaAI : public ScriptedAI void JustReachedHome() { // in case evade in phase 2, see comments for hack where phase 2 is set - m_creature->RemoveSplineFlag(SPLINEFLAG_FLYING); + m_creature->SetLevitate(false); m_creature->SetByteFlag(UNIT_FIELD_BYTES_1, 3, 0); if (m_pInstance) @@ -231,17 +231,9 @@ struct MANGOS_DLL_DECL boss_onyxiaAI : public ScriptedAI pSpell->Id == SPELL_BREATH_SOUTH_TO_NORTH || pSpell->Id == SPELL_BREATH_NORTH_TO_SOUTH) { + // This was sent with SendMonsterMove - which resulted in better speed than now if (m_pPointData = GetMoveData()) - { - if (!m_pInstance) - return; - - if (Creature* pTrigger = m_pInstance->GetSingleCreatureFromStorage(NPC_ONYXIA_TRIGGER)) - { - m_creature->GetMap()->CreatureRelocation(m_creature, m_pPointData->fX, m_pPointData->fY, m_pPointData->fZ, m_creature->GetAngle(pTrigger)); - m_creature->SendMonsterMove(m_pPointData->fX, m_pPointData->fY, m_pPointData->fZ, SPLINETYPE_FACINGTARGET, m_creature->GetSplineFlags(), 1, NULL, pTrigger->GetObjectGuid().GetRawValue()); - } - } + m_creature->GetMotionMaster()->MovePoint(m_pPointData->uiLocId, m_pPointData->fX, m_pPointData->fY, m_pPointData->fZ); } } @@ -329,7 +321,7 @@ struct MANGOS_DLL_DECL boss_onyxiaAI : public ScriptedAI // sort of a hack, it is unclear how this really work but the values appear to be valid m_creature->SetByteValue(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_UNK_2); - m_creature->AddSplineFlag(SPLINEFLAG_FLYING); + m_creature->SetLevitate(true); if (m_pPointData) m_creature->GetMotionMaster()->MovePoint(m_pPointData->uiLocId, m_pPointData->fX, m_pPointData->fY, m_pPointData->fZ); @@ -352,7 +344,7 @@ struct MANGOS_DLL_DECL boss_onyxiaAI : public ScriptedAI // undo flying m_creature->SetByteValue(UNIT_FIELD_BYTES_1, 3, 0); - m_creature->RemoveSplineFlag(SPLINEFLAG_FLYING); + m_creature->SetLevitate(false); SetCombatMovement(true); m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_ouro.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_ouro.cpp index e9ad59a7b..0865d3ab9 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/boss_ouro.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_ouro.cpp @@ -137,8 +137,7 @@ struct MANGOS_DLL_DECL boss_ouroAI : public ScriptedAI { if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) { - m_creature->GetMap()->CreatureRelocation(m_creature, pTarget->GetPositionX(), pTarget->GetPositionY(), pTarget->GetPositionZ(), 0.0f); - m_creature->SendMonsterMove(pTarget->GetPositionX(), pTarget->GetPositionY(), pTarget->GetPositionZ(), SPLINETYPE_NORMAL, SPLINEFLAG_WALKMODE, 1); + m_creature->MonsterMoveWithSpeed(pTarget->GetPositionX(), pTarget->GetPositionY(), pTarget->GetPositionZ(), 28.f); } m_uiChangeTargetTimer = urand(10000, 20000); diff --git a/scripts/kalimdor/wailing_caverns/wailing_caverns.cpp b/scripts/kalimdor/wailing_caverns/wailing_caverns.cpp index 3e995aa97..abdbbf6b9 100644 --- a/scripts/kalimdor/wailing_caverns/wailing_caverns.cpp +++ b/scripts/kalimdor/wailing_caverns/wailing_caverns.cpp @@ -152,7 +152,7 @@ struct MANGOS_DLL_DECL npc_disciple_of_naralexAI : public npc_escortAI Reset(); // Remove running - m_creature->AddSplineFlag(SPLINEFLAG_WALKMODE); + m_creature->SetWalk(true); } else npc_escortAI::EnterEvadeMode(); @@ -380,7 +380,7 @@ struct MANGOS_DLL_DECL npc_disciple_of_naralexAI : public npc_escortAI break; case 11: SetEscortPaused(false); - m_creature->AddSplineFlag(SPLINEFLAG_FLYING); + m_creature->SetLevitate(true); SetRun(); // Send them flying somewhere outside of the room if (Creature* pNaralex = m_pInstance->GetSingleCreatureFromStorage(NPC_NARALEX)) @@ -390,8 +390,8 @@ struct MANGOS_DLL_DECL npc_disciple_of_naralexAI : public npc_escortAI pNaralex->SetByteValue(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_UNK_2); // Set to flying - pNaralex->AddSplineFlag(SPLINEFLAG_FLYING); - pNaralex->RemoveSplineFlag(SPLINEFLAG_WALKMODE); + pNaralex->SetLevitate(true); + pNaralex->SetWalk(false); // Set following pNaralex->GetMotionMaster()->MoveFollow(m_creature, 5.0f, 0); diff --git a/scripts/northrend/borean_tundra.cpp b/scripts/northrend/borean_tundra.cpp index 2c18ea9b9..8d304d5c1 100644 --- a/scripts/northrend/borean_tundra.cpp +++ b/scripts/northrend/borean_tundra.cpp @@ -372,7 +372,7 @@ bool EffectDummyCreature_npc_oil_stained_wolf(Unit* pCaster, uint32 uiSpellId, S if (uiEffIndex == EFFECT_INDEX_0 && pCreatureTarget->getFaction() != FACTION_MONSTER && !pCreatureTarget->HasAura(SPELL_HAS_EATEN)) { pCreatureTarget->SetFactionTemporary(FACTION_MONSTER); - pCreatureTarget->RemoveSplineFlag(SPLINEFLAG_WALKMODE); + pCreatureTarget->SetWalk(false); pCreatureTarget->GetMotionMaster()->MoveIdle(); diff --git a/scripts/northrend/howling_fjord.cpp b/scripts/northrend/howling_fjord.cpp index a94cfb0c3..1ffc6a07b 100644 --- a/scripts/northrend/howling_fjord.cpp +++ b/scripts/northrend/howling_fjord.cpp @@ -192,7 +192,7 @@ struct MANGOS_DLL_DECL npc_daegarnAI : public ScriptedAI { if (pPlayer->isAlive()) { - pSummon->RemoveSplineFlag(SPLINEFLAG_WALKMODE); + pSummon->SetWalk(false); pSummon->GetMotionMaster()->MovePoint(0, afCenter[0], afCenter[1], afCenter[2]); return; } diff --git a/scripts/northrend/obsidian_sanctum/boss_sartharion.cpp b/scripts/northrend/obsidian_sanctum/boss_sartharion.cpp index c87ba587c..822eb0dd9 100644 --- a/scripts/northrend/obsidian_sanctum/boss_sartharion.cpp +++ b/scripts/northrend/obsidian_sanctum/boss_sartharion.cpp @@ -303,8 +303,7 @@ struct MANGOS_DLL_DECL boss_sartharionAI : public ScriptedAI if (pTemp && pTemp->isAlive() && !pTemp->getVictim()) { - if (pTemp->HasSplineFlag(SPLINEFLAG_WALKMODE)) - pTemp->RemoveSplineFlag(SPLINEFLAG_WALKMODE); + pTemp->SetWalk(false); if (pTemp->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE)) pTemp->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); diff --git a/scripts/northrend/ulduar/halls_of_lightning/boss_volkhan.cpp b/scripts/northrend/ulduar/halls_of_lightning/boss_volkhan.cpp index 185afe305..6a1ec0381 100644 --- a/scripts/northrend/ulduar/halls_of_lightning/boss_volkhan.cpp +++ b/scripts/northrend/ulduar/halls_of_lightning/boss_volkhan.cpp @@ -329,9 +329,7 @@ bool EffectDummyCreature_npc_volkhan_anvil(Unit* pCaster, uint32 uiSpellId, Spel if (pCaster->GetMotionMaster()->GetCurrentMovementGeneratorType() == CHASE_MOTION_TYPE) pCaster->GetMotionMaster()->MovementExpired(); - ((Creature*)pCaster)->GetMap()->CreatureRelocation((Creature*)pCaster, fX, fY, fZ, pCreatureTarget->GetOrientation()); - ((Creature*)pCaster)->SendMonsterMove(fX, fY, fZ, SPLINETYPE_NORMAL, ((Creature*)pCaster)->GetSplineFlags(), 1); - + pCaster->MonsterMoveWithSpeed(fX, fY, fZ, 28.f); pCreatureTarget->CastSpell(pCaster, SPELL_TEMPER_DUMMY, false); //always return true when we are handling this spell and effect diff --git a/scripts/northrend/ulduar/halls_of_stone/boss_sjonnir.cpp b/scripts/northrend/ulduar/halls_of_stone/boss_sjonnir.cpp index fa23604a7..4c0623ea3 100644 --- a/scripts/northrend/ulduar/halls_of_stone/boss_sjonnir.cpp +++ b/scripts/northrend/ulduar/halls_of_stone/boss_sjonnir.cpp @@ -139,7 +139,7 @@ struct MANGOS_DLL_DECL boss_sjonnirAI : public ScriptedAI float fX, fY, fZ; pSummoned->GetRandomPoint(m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), 10.0f, fX, fY, fZ); - pSummoned->RemoveSplineFlag(SPLINEFLAG_WALKMODE); + pSummoned->SetWalk(false); pSummoned->GetMotionMaster()->MovePoint(0, fX, fY, fZ); } else if (pSummoned->GetEntry() == NPC_EARTHEN_DWARF) diff --git a/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_svala.cpp b/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_svala.cpp index 4f9b1f6cc..1c548875e 100644 --- a/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_svala.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_svala.cpp @@ -128,9 +128,7 @@ struct MANGOS_DLL_DECL boss_svalaAI : public ScriptedAI void Aggro(Unit* pWho) { - if (m_creature->HasSplineFlag(SPLINEFLAG_FLYING)) - m_creature->RemoveSplineFlag(SPLINEFLAG_FLYING); - + m_creature->SetLevitate(false); DoScriptText(SAY_AGGRO, m_creature); } @@ -184,10 +182,8 @@ struct MANGOS_DLL_DECL boss_svalaAI : public ScriptedAI float fX, fZ, fY; m_creature->GetRespawnCoord(fX, fY, fZ); - m_creature->AddSplineFlag(SPLINEFLAG_FLYING); - - m_creature->SendMonsterMoveWithSpeed(fX, fY, fZ + 5.0f, m_uiIntroTimer); - m_creature->GetMap()->CreatureRelocation(m_creature, fX, fY, fZ + 5.0f, m_creature->GetOrientation()); + m_creature->SetLevitate(true); + m_creature->GetMotionMaster()->MovePoint(0, fX, fY, fZ + 5.0f); } void UpdateAI(const uint32 uiDiff) diff --git a/scripts/outland/black_temple/boss_illidan.cpp b/scripts/outland/black_temple/boss_illidan.cpp index e3a34c48f..02f842869 100644 --- a/scripts/outland/black_temple/boss_illidan.cpp +++ b/scripts/outland/black_temple/boss_illidan.cpp @@ -354,7 +354,7 @@ struct MANGOS_DLL_DECL demonfireAI : public ScriptedAI { m_illidanGuid = m_pInstance->GetGuid(NPC_ILLIDAN_STORMRAGE); - if (!pIllidan->HasSplineFlag(SPLINEFLAG_NO_SPLINE)) + if (!pIllidan->IsLevitating()) m_creature->SetDeathState(JUST_DIED); } } @@ -494,7 +494,7 @@ struct MANGOS_DLL_DECL npc_akama_illidanAI : public ScriptedAI m_bIsReturningToIllidan = true; WayPoint = WayPointList.begin(); m_creature->SetSpeedRate(MOVE_RUN, 2.0f); - m_creature->RemoveSplineFlag(SPLINEFLAG_WALKMODE); + m_creature->SetWalk(false); m_bIsWalking = true; } @@ -681,7 +681,7 @@ struct MANGOS_DLL_DECL npc_akama_illidanAI : public ScriptedAI m_bIsWalking = true; WayPoint = WayPointList.begin(); std::advance(WayPoint, 9); - m_creature->RemoveSplineFlag(SPLINEFLAG_WALKMODE); + m_creature->SetWalk(false); break; } } @@ -773,7 +773,7 @@ struct MANGOS_DLL_DECL npc_akama_illidanAI : public ScriptedAI } WayPoint = WayPointList.begin(); - m_creature->AddSplineFlag(SPLINEFLAG_WALKMODE); + m_creature->SetWalk(true); m_creature->GetMotionMaster()->MovePoint(WayPoint->id, WayPoint->x, WayPoint->y, WayPoint->z); m_bIsWalking = true; break; @@ -986,7 +986,7 @@ struct MANGOS_DLL_DECL boss_illidan_stormrageAI : public ScriptedAI // Unequip warglaives if needed SetEquipmentSlots(false, EQUIP_UNEQUIP, EQUIP_UNEQUIP, EQUIP_NO_CHANGE); - m_creature->RemoveSplineFlag(SPLINEFLAG_NO_SPLINE); + m_creature->SetLevitate(false); m_bIsTalking = false; @@ -1284,7 +1284,7 @@ struct MANGOS_DLL_DECL boss_illidan_stormrageAI : public ScriptedAI m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); // We now hover! - m_creature->AddSplineFlag(SPLINEFLAG_NO_SPLINE); + m_creature->SetLevitate(true); m_creature->GetMotionMaster()->MovePoint(0, CENTER_X, CENTER_Y, CENTER_Z); for(uint8 i = 0; i < 2; ++i) @@ -1753,7 +1753,7 @@ struct MANGOS_DLL_DECL boss_illidan_stormrageAI : public ScriptedAI // anndddd touchdown! m_creature->HandleEmote(EMOTE_ONESHOT_LAND); - m_creature->RemoveSplineFlag(SPLINEFLAG_NO_SPLINE); + m_creature->SetLevitate(false); m_uiPhase = PHASE_NORMAL_2; // We should let the raid fight us =) diff --git a/scripts/outland/black_temple/boss_shade_of_akama.cpp b/scripts/outland/black_temple/boss_shade_of_akama.cpp index b566f8253..818bff867 100644 --- a/scripts/outland/black_temple/boss_shade_of_akama.cpp +++ b/scripts/outland/black_temple/boss_shade_of_akama.cpp @@ -206,7 +206,7 @@ struct MANGOS_DLL_DECL boss_shade_of_akamaAI : public ScriptedAI m_afSpawnLoc[uiRand].m_fX, m_afSpawnLoc[uiRand].m_fY, m_afSpawnLoc[uiRand].m_fZ, m_afSpawnLoc[uiRand].m_fO, TEMPSUMMON_DEAD_DESPAWN, 0)) { - pSorcerer->RemoveSplineFlag(SPLINEFLAG_WALKMODE); + pSorcerer->SetWalk(false); pSorcerer->GetMotionMaster()->MovePoint(0, m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ()); pSorcerer->SetTargetGuid(m_creature->GetObjectGuid()); @@ -226,7 +226,7 @@ struct MANGOS_DLL_DECL boss_shade_of_akamaAI : public ScriptedAI m_afSpawnLoc[uiRand].m_fX, m_afSpawnLoc[uiRand].m_fY, m_afSpawnLoc[uiRand].m_fZ, m_afSpawnLoc[uiRand].m_fO, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 25000)) { - pSpawn->RemoveSplineFlag(SPLINEFLAG_WALKMODE); + pSpawn->SetWalk(false); pSpawn->GetMotionMaster()->MovePoint(0, LOC_RAND_TO_CENTER_X, LOC_RAND_TO_CENTER_Y, LOC_RAND_TO_CENTER_Z); } } @@ -553,7 +553,7 @@ struct MANGOS_DLL_DECL npc_akamaAI : public ScriptedAI { m_bIsShadeDead = true; m_uiWayPointId = 0; - m_creature->AddSplineFlag(SPLINEFLAG_WALKMODE); + m_creature->SetWalk(true); m_creature->GetMotionMaster()->MovePoint(m_uiWayPointId, m_afAkamaWP[0].m_fX, m_afAkamaWP[0].m_fY, m_afAkamaWP[0].m_fZ); } } diff --git a/scripts/outland/hellfire_citadel/blood_furnace/instance_blood_furnace.cpp b/scripts/outland/hellfire_citadel/blood_furnace/instance_blood_furnace.cpp index 1f96f7c37..915120b23 100644 --- a/scripts/outland/hellfire_citadel/blood_furnace/instance_blood_furnace.cpp +++ b/scripts/outland/hellfire_citadel/blood_furnace/instance_blood_furnace.cpp @@ -187,7 +187,7 @@ void instance_blood_furnace::DoNextBroggokEventPhase() if (Creature* pBroggok = GetSingleCreatureFromStorage(NPC_BROGGOK)) { - pBroggok->RemoveSplineFlag(SPLINEFLAG_WALKMODE); + pBroggok->SetWalk(false); pBroggok->GetMotionMaster()->MovePoint(0, dx, dy, pBroggok->GetPositionZ()); } } @@ -208,7 +208,7 @@ void instance_blood_furnace::DoNextBroggokEventPhase() pOrc->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); // Move them out of the cages - pOrc->RemoveSplineFlag(SPLINEFLAG_WALKMODE); + pOrc->SetWalk(false); pOrc->GetMotionMaster()->MovePoint(0, pOrc->GetPositionX() + dx, pOrc->GetPositionY() + dy, pOrc->GetPositionZ()); } } diff --git a/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_nazan_and_vazruden.cpp b/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_nazan_and_vazruden.cpp index e2b7de238..50bf22f28 100644 --- a/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_nazan_and_vazruden.cpp +++ b/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_nazan_and_vazruden.cpp @@ -113,11 +113,8 @@ struct MANGOS_DLL_DECL boss_vazrudenAI : public ScriptedAI { if (Creature* pHerald = m_pInstance->GetSingleCreatureFromStorage(NPC_VAZRUDEN_HERALD)) { - if (pHerald->HasSplineFlag(SPLINEFLAG_WALKMODE)) - pHerald->RemoveSplineFlag(SPLINEFLAG_WALKMODE); - + pHerald->SetWalk(false); pHerald->GetMotionMaster()->MovePoint(POINT_ID_COMBAT, afCombatPos[0], afCombatPos[1], afCombatPos[2]); - DoScriptText(EMOTE_DESCEND, pHerald); } } @@ -183,7 +180,7 @@ struct MANGOS_DLL_DECL boss_vazruden_heraldAI : public ScriptedAI // see boss_onyxia // sort of a hack, it is unclear how this really work but the values appear to be valid m_creature->SetByteValue(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_UNK_2); - m_creature->AddSplineFlag(SPLINEFLAG_FLYING); + m_creature->SetLevitate(true); } void MoveInLineOfSight(Unit* pWho) @@ -233,7 +230,7 @@ struct MANGOS_DLL_DECL boss_vazruden_heraldAI : public ScriptedAI // Landing // undo flying m_creature->SetByteValue(UNIT_FIELD_BYTES_1, 3, 0); - m_creature->RemoveSplineFlag(SPLINEFLAG_FLYING); + m_creature->SetLevitate(false); Player* pPlayer = m_creature->GetMap()->GetPlayer(m_lastSeenPlayerGuid); if (pPlayer && pPlayer->isAlive()) diff --git a/scripts/outland/nagrand.cpp b/scripts/outland/nagrand.cpp index a567b1c00..17377e268 100644 --- a/scripts/outland/nagrand.cpp +++ b/scripts/outland/nagrand.cpp @@ -515,7 +515,7 @@ struct MANGOS_DLL_DECL npc_maghar_captiveAI : public npc_escortAI if (pSummoned->IsTotem()) return; - pSummoned->RemoveSplineFlag(SPLINEFLAG_WALKMODE); + pSummoned->SetWalk(false); pSummoned->GetMotionMaster()->MovePoint(0, m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ()); } diff --git a/scripts/outland/shadowmoon_valley.cpp b/scripts/outland/shadowmoon_valley.cpp index e38f14ea0..26326e89b 100644 --- a/scripts/outland/shadowmoon_valley.cpp +++ b/scripts/outland/shadowmoon_valley.cpp @@ -386,7 +386,7 @@ struct MANGOS_DLL_DECL npc_dragonmaw_peonAI : public ScriptedAI float fX, fY, fZ; pMutton->GetContactPoint(m_creature, fX, fY, fZ, CONTACT_DISTANCE); - m_creature->RemoveSplineFlag(SPLINEFLAG_WALKMODE); + m_creature->SetWalk(false); m_creature->GetMotionMaster()->MovePoint(POINT_DEST, fX, fY, fZ); } } diff --git a/scripts/outland/tempest_keep/the_eye/boss_kaelthas.cpp b/scripts/outland/tempest_keep/the_eye/boss_kaelthas.cpp index a9387bd48..cfe1a1789 100644 --- a/scripts/outland/tempest_keep/the_eye/boss_kaelthas.cpp +++ b/scripts/outland/tempest_keep/the_eye/boss_kaelthas.cpp @@ -931,9 +931,7 @@ struct MANGOS_DLL_DECL boss_kaelthasAI : public ScriptedAI m_creature->StopMoving(); m_creature->GetMotionMaster()->Clear(); m_creature->GetMotionMaster()->MoveIdle(); - - m_creature->GetMap()->CreatureRelocation(m_creature, afGravityPos[0], afGravityPos[1], afGravityPos[2], 0.0f); - m_creature->SendMonsterMove(afGravityPos[0], afGravityPos[1], afGravityPos[2], SPLINETYPE_NORMAL, SPLINEFLAG_NONE, 1); + m_creature->MonsterMoveWithSpeed(afGravityPos[0], afGravityPos[1], afGravityPos[2], 28.f); // 1) Kael'thas will portal the whole raid right into his body std::vector vGuids; diff --git a/scripts/world/npcs_special.cpp b/scripts/world/npcs_special.cpp index bfeb13e88..31a85d3b9 100644 --- a/scripts/world/npcs_special.cpp +++ b/scripts/world/npcs_special.cpp @@ -583,7 +583,7 @@ struct MANGOS_DLL_DECL npc_injured_patientAI : public ScriptedAI case 2: DoScriptText(SAY_DOC3,m_creature); break; } - m_creature->RemoveSplineFlag(SPLINEFLAG_WALKMODE); + m_creature->SetWalk(false); uint32 mobId = m_creature->GetEntry(); diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index c65efb65e..2c3fd3720 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2238" + #define SD2_REVISION_NR "2239" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 8466a4d6d..c5e842385 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -3,7 +3,7 @@ -- DELETE FROM sd2_db_version; -INSERT INTO sd2_db_version (version) VALUES ('ScriptDev2 (for MaNGOS 11590+) '); +INSERT INTO sd2_db_version (version) VALUES ('ScriptDev2 (for MaNGOS 11720+) '); -- -- Below contains data for table `script_texts` mainly used in C++ parts. diff --git a/sql/updates/r2239_scriptdev2.sql b/sql/updates/r2239_scriptdev2.sql new file mode 100644 index 000000000..e24c0537e --- /dev/null +++ b/sql/updates/r2239_scriptdev2.sql @@ -0,0 +1 @@ +UPDATE sd2_db_version SET version='ScriptDev2 (for MaNGOS 11720+) '; From 1f4b3098022ba11f897121b17d9e2c0aa6dbeb92 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Fri, 8 Jul 2011 18:37:22 +0200 Subject: [PATCH 0220/1172] [2240] Remove old flying hack from Sapphiron --- scripts/northrend/naxxramas/boss_sapphiron.cpp | 6 +++--- sd2_revision_nr.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/northrend/naxxramas/boss_sapphiron.cpp b/scripts/northrend/naxxramas/boss_sapphiron.cpp index 8b5ce98a4..f4a17f9ec 100644 --- a/scripts/northrend/naxxramas/boss_sapphiron.cpp +++ b/scripts/northrend/naxxramas/boss_sapphiron.cpp @@ -26,7 +26,6 @@ EndScriptData */ * 28526 (needs ScriptEffect to cast 28522 onto random target) * * Blizzard might need handling for their movement - * SetHover hackz must be replaced by proper opcodes 04D3(Liftoff) 04D4(Landing) * Achievement-criteria check needs implementation * * Frost-Breath ability: the dummy spell 30101 is self cast, so it won't take the needed delay of ~7s until it reaches its target @@ -117,6 +116,7 @@ struct MANGOS_DLL_DECL boss_sapphironAI : public ScriptedAI m_uiIceboltCount = 0; SetCombatMovement(true); + m_creature->SetLevitate(false); //m_creature->ApplySpellMod(SPELL_FROST_AURA, SPELLMOD_DURATION, -1); } @@ -155,7 +155,7 @@ struct MANGOS_DLL_DECL boss_sapphironAI : public ScriptedAI { DoScriptText(EMOTE_FLY, m_creature); m_creature->HandleEmote(EMOTE_ONESHOT_LIFTOFF); - m_creature->SetHover(true); + m_creature->SetLevitate(true); m_Phase = PHASE_AIR_BOLTS; m_uiFrostBreathTimer = 5000; @@ -276,7 +276,7 @@ struct MANGOS_DLL_DECL boss_sapphironAI : public ScriptedAI // Begin Landing DoScriptText(EMOTE_GROUND, m_creature); m_creature->HandleEmote(EMOTE_ONESHOT_LAND); - m_creature->SetHover(false); + m_creature->SetLevitate(false); m_Phase = PHASE_LANDING; m_uiLandTimer = 2000; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 2c3fd3720..9dfa9da36 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2239" + #define SD2_REVISION_NR "2240" #endif // __SD2_REVISION_NR_H__ From b082eac6f47b864279f89cd66a79e9ac842db49c Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Fri, 8 Jul 2011 19:41:43 +0200 Subject: [PATCH 0221/1172] [2241] Add mangos_scriptname_clear.sql to clear all ScriptNames Use the sql/mangos_scriptname_clear.sql SQL-script to clear all ScriptNames from the WorldDatabase. Combined with mangos_scriptname_full.sql you can set all ScriptNames to the ones expected by official SD2. --- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_clear.sql | 10 ++++++++++ sql/mangos_scriptname_full.sql | 11 ++++++++++- 3 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 sql/mangos_scriptname_clear.sql diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 9dfa9da36..79c30aac0 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2240" + #define SD2_REVISION_NR "2241" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_clear.sql b/sql/mangos_scriptname_clear.sql new file mode 100644 index 000000000..9be32f4ea --- /dev/null +++ b/sql/mangos_scriptname_clear.sql @@ -0,0 +1,10 @@ +-- Clear all ScriptNames +-- This will clear all ScriptNames from any table in the World-Database + +TRUNCATE scripted_areatrigger; +TRUNCATE scripted_event_id; +UPDATE creature_template SET ScriptName=''; +UPDATE gameobject_template SET ScriptName=''; +UPDATE item_template SET ScriptName=''; +UPDATE instance_template SET ScriptName=''; +UPDATE world_template SET ScriptName=''; diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 382591437..36d5757ef 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -143,7 +143,16 @@ UPDATE creature_template SET ScriptName='npc_locksmith' WHERE entry IN (29665,29 -- UPDATE creature_template SET ScriptName='npc_innkeeper' WHERE npcflag=npcflag|65536; /* SPELL */ -UPDATE creature_template SET ScriptName='spell_dummy_npc' WHERE entry IN (16880,1200,26616,26643,16518,25793,25758,25752,25792,25753,26421,26841,27808,27122,28068,12298,12296,24918,17157,17326,17654,16847,18879,26270,26268,30146,25084,25085,32149,22105,29330,29338,29329,28465,28600,29327,29319,28053,28054,28093); +UPDATE creature_template SET ScriptName='spell_dummy_npc' WHERE entry IN ( +-- eastern kingdoms +1200, +-- kalimdor +12296,12298, +-- outland +16880,16518,16847,17157,17326,17654,18879,22105,24918,25084,25085, +-- northrend +25752,25753,25758,25792,25793,26268,26270,26421,26616,26643,26841,27122,27808,28053,28054,28068,28093,28465,28600,29319,29327,29329,29330,29338,30146,32149); + UPDATE gameobject_template SET ScriptName='spell_dummy_go' WHERE entry IN (181616,186949); /* */ From 2491f69675cfb3bd73f184c48445272fb19b71a7 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sat, 30 Apr 2011 17:39:21 +0300 Subject: [PATCH 0222/1172] [2242] Add yells for Eredar Twins and Felmyst (Sunwell) Signed-off-by: Schmoozerd --- .../sunwell_plateau/boss_eredar_twins.cpp | 27 +++++++++++++++ .../sunwell_plateau/boss_felmyst.cpp | 13 ++++++++ sd2_revision_nr.h | 2 +- sql/scriptdev2_script_full.sql | 33 ++++++++++++++++++- sql/updates/r2242_scriptdev2.sql | 32 ++++++++++++++++++ 5 files changed, 105 insertions(+), 2 deletions(-) create mode 100644 sql/updates/r2242_scriptdev2.sql diff --git a/scripts/eastern_kingdoms/sunwell_plateau/boss_eredar_twins.cpp b/scripts/eastern_kingdoms/sunwell_plateau/boss_eredar_twins.cpp index 9f86d21b3..ef67e141e 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/boss_eredar_twins.cpp +++ b/scripts/eastern_kingdoms/sunwell_plateau/boss_eredar_twins.cpp @@ -22,6 +22,33 @@ SDCategory: Sunwell Plateau EndScriptData */ #include "precompiled.h" +#include "sunwell_plateau.h" + +enum +{ + SAY_INTRO_1 = -1580044, + SAY_INTRO_2 = -1580045, + SAY_INTRO_3 = -1580046, + SAY_INTRO_4 = -1580047, + SAY_INTRO_5 = -1580048, + SAY_INTRO_6 = -1580049, + SAY_INTRO_7 = -1580050, + SAY_INTRO_8 = -1580051, + + SAY_SACROLASH_SHADOW_NOVA = -1580052, + SAY_SACROLASH_EMPOWER = -1580053, + SAY_SACROLASH_KILL_1 = -1580054, + SAY_SACROLASH_KILL_2 = -1580055, + SAY_SACROLASH_DEAD = -1580056, + SAY_SACROLASH_BERSERK = -1580057, + + SAY_ALYTHESS_CANFLAGRATION = -1580058, + SAY_ALYTHESS_EMPOWER = -1580059, + SAY_ALYTHESS_KILL_1 = -1580060, + SAY_ALYTHESS_KILL_2 = -1580061, + SAY_ALYTHESS_DEAD = -1580062, + SAY_ALYTHESS_BERSERK = -1580063, +}; void AddSC_boss_eredar_twins() { diff --git a/scripts/eastern_kingdoms/sunwell_plateau/boss_felmyst.cpp b/scripts/eastern_kingdoms/sunwell_plateau/boss_felmyst.cpp index c7d78444e..e7619db2a 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/boss_felmyst.cpp +++ b/scripts/eastern_kingdoms/sunwell_plateau/boss_felmyst.cpp @@ -22,6 +22,19 @@ SDCategory: Sunwell Plateau EndScriptData */ #include "precompiled.h" +#include "sunwell_plateau.h" + +enum +{ + SAY_INTRO = -1580036, + SAY_KILL_1 = -1580037, + SAY_KILL_2 = -1580038, + SAY_DEATH = -1580042, + SAY_TAKEOFF = -1580040, + SAY_BREATH = -1580039, + SAY_BERSERK = -1580041, + SAY_KALECGOS_OUTRO = -1580043, +}; void AddSC_boss_felmyst() { diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 79c30aac0..1d9b1d23c 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2241" + #define SD2_REVISION_NR "2242" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index c5e842385..376ce2dcd 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -2496,7 +2496,38 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1580032,'Where is Anveena, demon? What has become of Kalec?',12473,1,0,0,'madrigosa YELL_MADR_INTRO'), (-1580033,'You will tell me where they are!',12474,1,0,0,'madrigosa YELL_MADR_ICE_BLOCK'), (-1580034,'Speak, I grow weary of asking!',12475,1,0,0,'madrigosa YELL_MADR_TRAP'), -(-1580035,'Malygos, my lord! I did my best!',12476,1,0,0,'madrigosa YELL_MADR_DEATH'); +(-1580035,'Malygos, my lord! I did my best!',12476,1,0,0,'madrigosa YELL_MADR_DEATH'), + +(-1580036,'Glory to Kil\'jaeden! Death to all who oppose!',12477,1,0,0,'felmyst SAY_INTRO'), +(-1580037,'I kill for the master!',12480,1,0,0,'felmyst SAY_KILL_1'), +(-1580038,'The end has come! ',12481,1,0,0,'felmyst SAY_KILL_2'), +(-1580039,'Choke on your final breath! ',12478,1,0,0,'felmyst SAY_BREATH'), +(-1580040,'I am stronger than ever before! ',12479,1,0,0,'felmyst SAY_TAKEOFF'), +(-1580041,'No more hesitation! Your fates are written! ',12482,1,0,0,'felmyst SAY_BERSERK'), +(-1580042,'Kil\'jaeden... will... prevail... ',12483,1,0,0,'felmyst SAY_DEATH'), +(-1580043,'Madrigosa deserved a far better fate. You did what had to be done, but this battle is far from over.',12439,1,0,0,'kalecgos SAY_KALECGOS_OUTRO'), + +(-1580044,'Misery...',12484,1,0,0,'sacrolash SAY_INTRO_1'), +(-1580045,'Depravity...',0,1,0,0,'alythess SAY_INTRO_2'), +(-1580046,'Confusion...',0,1,0,0,'sacrolash SAY_INTRO_3'), +(-1580047,'Hatred...',0,1,0,0,'alythess SAY_INTRO_4'), +(-1580048,'Mistrust...',0,1,0,0,'sacrolash SAY_INTRO_5'), +(-1580049,'Chaos...',0,1,0,0,'alythess SAY_INTRO_6'), +(-1580050,'These are the hallmarks...',0,1,0,0,'sacrolash SAY_INTRO_7'), +(-1580051,'These are the pillars...',0,1,0,0,'alythess SAY_INTRO_8'), + +(-1580052,'Shadow to the aid of fire!',12485,1,0,0,'sacrolash SAY_SACROLASH_SHADOW_NOVA'), +(-1580053,'Alythess! Your fire burns within me!',12488,1,0,0,'sacrolash SAY_SACROLASH_EMPOWER'), +(-1580054,'Shadows, engulf!',12486,1,0,0,'sacrolash SAY_SACROLASH_KILL_1'), +(-1580055,'Ee-nok Kryul!',12487,1,0,0,'sacrolash SAY_SACROLASH_KILL_2'), +(-1580056,'I... fade.',12399,1,0,0,'sacrolash SAY_SACROLASH_DEAD'), +(-1580057,'Time is a luxury you no longer possess!',0,1,0,0,'sacrolash SAY_SACROLASH_BERSERK'), +(-1580058,'Fire to the aid of shadow!',12489,1,0,0,'alythess SAY_ALYTHESS_CANFLAGRATION'), +(-1580059,'Sacrolash!',12492,1,0,0,'alythess SAY_ALYTHESS_EMPOWER'), +(-1580060,'Fire, consume!',12490,1,0,0,'alythess SAY_ALYTHESS_KILL_1'), +(-1580061,'Ed-ir Halach!',12491,1,0,0,'alythess SAY_ALYTHESS_KILL_2'), +(-1580062,'De-ek Anur!',12494,1,0,0,'alythess SAY_ALYTHESS_DEAD'), +(-1580063,'Your luck has run its course!',12493,1,0,0,'alythess SAY_ALYTHESS_BERSERK'); -- -1 585 000 MAGISTER'S TERRACE INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES diff --git a/sql/updates/r2242_scriptdev2.sql b/sql/updates/r2242_scriptdev2.sql new file mode 100644 index 000000000..643ecc457 --- /dev/null +++ b/sql/updates/r2242_scriptdev2.sql @@ -0,0 +1,32 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1580063 AND -1580036; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1580036,'Glory to Kil\'jaeden! Death to all who oppose!',12477,1,0,0,'felmyst SAY_INTRO'), +(-1580037,'I kill for the master!',12480,1,0,0,'felmyst SAY_KILL_1'), +(-1580038,'The end has come! ',12481,1,0,0,'felmyst SAY_KILL_2'), +(-1580039,'Choke on your final breath! ',12478,1,0,0,'felmyst SAY_BREATH'), +(-1580040,'I am stronger than ever before! ',12479,1,0,0,'felmyst SAY_TAKEOFF'), +(-1580041,'No more hesitation! Your fates are written! ',12482,1,0,0,'felmyst SAY_BERSERK'), +(-1580042,'Kil\'jaeden... will... prevail... ',12483,1,0,0,'felmyst SAY_DEATH'), +(-1580043,'Madrigosa deserved a far better fate. You did what had to be done, but this battle is far from over.',12439,1,0,0,'kalecgos SAY_KALECGOS_OUTRO'), + +(-1580044,'Misery...',12484,1,0,0,'sacrolash SAY_INTRO_1'), +(-1580045,'Depravity...',0,1,0,0,'alythess SAY_INTRO_2'), +(-1580046,'Confusion...',0,1,0,0,'sacrolash SAY_INTRO_3'), +(-1580047,'Hatred...',0,1,0,0,'alythess SAY_INTRO_4'), +(-1580048,'Mistrust...',0,1,0,0,'sacrolash SAY_INTRO_5'), +(-1580049,'Chaos...',0,1,0,0,'alythess SAY_INTRO_6'), +(-1580050,'These are the hallmarks...',0,1,0,0,'sacrolash SAY_INTRO_7'), +(-1580051,'These are the pillars...',0,1,0,0,'alythess SAY_INTRO_8'), + +(-1580052,'Shadow to the aid of fire!',12485,1,0,0,'sacrolash SAY_SACROLASH_SHADOW_NOVA'), +(-1580053,'Alythess! Your fire burns within me!',12488,1,0,0,'sacrolash SAY_SACROLASH_EMPOWER'), +(-1580054,'Shadows, engulf!',12486,1,0,0,'sacrolash SAY_SACROLASH_KILL_1'), +(-1580055,'Ee-nok Kryul!',12487,1,0,0,'sacrolash SAY_SACROLASH_KILL_2'), +(-1580056,'I... fade.',12399,1,0,0,'sacrolash SAY_SACROLASH_DEAD'), +(-1580057,'Time is a luxury you no longer possess!',0,1,0,0,'sacrolash SAY_SACROLASH_BERSERK'), +(-1580058,'Fire to the aid of shadow!',12489,1,0,0,'alythess SAY_ALYTHESS_CANFLAGRATION'), +(-1580059,'Sacrolash!',12492,1,0,0,'alythess SAY_ALYTHESS_EMPOWER'), +(-1580060,'Fire, consume!',12490,1,0,0,'alythess SAY_ALYTHESS_KILL_1'), +(-1580061,'Ed-ir Halach!',12491,1,0,0,'alythess SAY_ALYTHESS_KILL_2'), +(-1580062,'De-ek Anur!',12494,1,0,0,'alythess SAY_ALYTHESS_DEAD'), +(-1580063,'Your luck has run its course!',12493,1,0,0,'alythess SAY_ALYTHESS_BERSERK'); From b1f83e8c5520ae1199e6a3fe99909cf96df30922 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Sat, 9 Jul 2011 00:29:24 +0200 Subject: [PATCH 0223/1172] [2243] Add texts for Kil'Jaeden (Sunwell) --- .../sunwell_plateau/boss_kiljaeden.cpp | 36 +++++++++++++++++++ sd2_revision_nr.h | 2 +- sql/scriptdev2_script_full.sql | 34 +++++++++++++++++- sql/updates/r2243_scriptdev2.sql | 33 +++++++++++++++++ 4 files changed, 103 insertions(+), 2 deletions(-) create mode 100644 sql/updates/r2243_scriptdev2.sql diff --git a/scripts/eastern_kingdoms/sunwell_plateau/boss_kiljaeden.cpp b/scripts/eastern_kingdoms/sunwell_plateau/boss_kiljaeden.cpp index 2ebb51330..d9db5bfb9 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/boss_kiljaeden.cpp +++ b/scripts/eastern_kingdoms/sunwell_plateau/boss_kiljaeden.cpp @@ -22,6 +22,42 @@ SDCategory: Sunwell Plateau EndScriptData */ #include "precompiled.h" +#include "sunwell_plateau.h" + +enum +{ + SAY_ORDER_1 = -1580064, + SAY_ORDER_2 = -1580065, + SAY_ORDER_3 = -1580066, + SAY_ORDER_4 = -1580067, + SAY_ORDER_5 = -1580068, + SAY_EMERGE = -1580069, + SAY_SLAY_1 = -1580070, + SAY_SLAY_2 = -1580071, + SAY_REFLECTION_1 = -1580072, + SAY_REFLECTION_2 = -1580073, + SAY_DARKNESS_1 = -1580074, + SAY_DARKNESS_2 = -1580075, + SAY_DARKNESS_3 = -1580076, + SAY_PHASE_3 = -1580077, + SAY_PHASE_4 = -1580078, + SAY_PHASE_5 = -1580079, + SAY_KALECGOS_INTRO = -1580080, + SAY_KALECGOS_AWAKE_1 = -1580081, + SAY_ANVEENA_IMPRISONED = -1580082, + SAY_KALECGOS_AWAKE_2 = -1580083, + SAY_ANVEENA_LOST = -1580084, + SAY_KALECGOS_AWAKE_4 = -1580085, + SAY_ANVEENA_AWAKE = -1580086, + SAY_KALECGOS_AWAKE_5 = -1580087, + SAY_ANVEENA_SACRIFICE = -1580088, + SAY_KALECGOS_GOODBYE = -1580089, + SAY_KALECGOS_ENCOURAGE = -1580090, + SAY_KALECGOS_ORB_1 = -1580091, + SAY_KALECGOS_ORB_2 = -1580092, + SAY_KALECGOS_ORB_3 = -1580093, + SAY_KALECGOS_ORB_4 = -1580094, +}; void AddSC_boss_kiljaeden() { diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 1d9b1d23c..55f1b9f47 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2242" + #define SD2_REVISION_NR "2243" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 376ce2dcd..194ad0288 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -2527,7 +2527,39 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1580060,'Fire, consume!',12490,1,0,0,'alythess SAY_ALYTHESS_KILL_1'), (-1580061,'Ed-ir Halach!',12491,1,0,0,'alythess SAY_ALYTHESS_KILL_2'), (-1580062,'De-ek Anur!',12494,1,0,0,'alythess SAY_ALYTHESS_DEAD'), -(-1580063,'Your luck has run its course!',12493,1,0,0,'alythess SAY_ALYTHESS_BERSERK'); +(-1580063,'Your luck has run its course!',12493,1,0,0,'alythess SAY_ALYTHESS_BERSERK'), + +(-1580064,'All my plans have led to this!',12495,1,0,0,'kiljaeden SAY_ORDER_1'), +(-1580065,'Stay on task! Do not waste time!',12496,1,0,0,'kiljaeden SAY_ORDER_2'), +(-1580066,'I have waited long enough!',12497,1,0,0,'kiljaeden SAY_ORDER_3'), +(-1580067,'Fail me and suffer for eternity!',12498,1,0,0,'kiljaeden SAY_ORDER_4'), +(-1580068,'Drain the girl! Drain her power until there is nothing but a vacant shell!',12499,1,0,0,'kiljaeden SAY_ORDER_5'), +(-1580069,'The expendible have perished... So be it! Now I shall succeed where Sargeras could not! I will bleed this wretched world and secure my place as the true master of the Burning Legion. The end has come! Let the unraveling of this world commence!',12500,1,0,0,'kiljaeden SAY_EMERGE'), +(-1580070,'Another step towards destruction!',12501,1,0,0,'kiljaeden SAY_SLAY_1'), +(-1580071,'Anukh-Kyrie!',12502,1,0,0,'kiljaeden SAY_SLAY_2'), +(-1580072,'Who can you trust?',12503,1,0,0,'kiljaeden SAY_REFLECTION_1'), +(-1580073,'The enemy is among you.',12504,1,0,0,'kiljaeden SAY_REFLECTION_2'), +(-1580074,'Chaos!',12505,1,0,0,'kiljaeden SAY_DARKNESS_1'), +(-1580075,'Destruction!',12506,1,0,0,'kiljaeden SAY_DARKNESS_2'), +(-1580076,'Oblivion!',12507,1,0,0,'kiljaeden SAY_DARKNESS_3'), +(-1580077,'I will not be denied! This world shall fall!',12508,1,0,0,'kiljaeden SAY_PHASE_3'), +(-1580078,'Do not harbor false hope. You cannot win!',12509,1,0,0,'kiljaeden SAY_PHASE_4'), +(-1580079,'Aggghh! The powers of the Sunwell... turn... against me! What have you done? What have you done???',12510,1,0,0,'kiljaeden SAY_PHASE_5'), +(-1580080,'You are not alone. The Blue Dragonflight shall help you vanquish the Deceiver.',12438,1,0,0,'kalecgos SAY_KALECGOS_INTRO'), +(-1580081,'Anveena, you must awaken, this world needs you!',12445,1,0,0,'kalecgos SAY_KALECGOS_AWAKE_1'), +(-1580082,'I serve only the Master now.',12511,1,0,0,'anveena SAY_ANVEENA_IMPRISONED'), +(-1580083,'You must let go! You must become what you were always meant to be! The time is now, Anveena!',12446,1,0,0,'kalecgos SAY_KALECGOS_AWAKE_2'), +(-1580084,'But I\'m... lost. I cannot find my way back.',12512,1,0,0,'anveena SAY_ANVEENA_LOST'), +(-1580085,'Anveena, I love you! Focus on my voice, come back for me now! Only you can cleanse the Sunwell!',12447,1,0,0,'kalecgos SAY_KALECGOS_AWAKE_4'), +(-1580086,'Kalec... Kalec?',12513,1,0,0,'anveena SAY_ANVEENA_AWAKE'), +(-1580087,'Yes, Anveena! Let fate embrace you now!',12448,1,0,0,'kalecgos SAY_KALECGOS_AWAKE_5'), +(-1580088,'The nightmare is over, the spell is broken! Goodbye, Kalec, my love!',12514,1,0,0,'anveena SAY_ANVEENA_SACRIFICE'), +(-1580089,'Goodbye, Anveena, my love. Few will remember your name, yet this day you change the course of destiny. What was once corrupt is now pure. Heroes, do not let her sacrifice be in vain.',12450,1,0,0,'kalecgos SAY_KALECGOS_GOODBYE'), +(-1580090,'Strike now, heroes, while he is weakened! Vanquish the Deceiver!',12449,1,0,0,'kalecgos SAY_KALECGOS_ENCOURAGE'), +(-1580091,'I will channel my power into the orbs, be ready!',12440,1,0,0,'kalecgos SAY_KALECGOS_ORB_1'), +(-1580092,'I have empowered another orb! Use it quickly!',12441,1,0,0,'kalecgos SAY_KALECGOS_ORB_2'), +(-1580093,'Another orb is ready! Make haste!',12442,1,0,0,'kalecgos SAY_KALECGOS_ORB_3'), +(-1580094,'I have channeled all I can! The power is in your hands!',12443,1,0,0,'kalecgos SAY_KALECGOS_ORB_4'); -- -1 585 000 MAGISTER'S TERRACE INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES diff --git a/sql/updates/r2243_scriptdev2.sql b/sql/updates/r2243_scriptdev2.sql new file mode 100644 index 000000000..a8cd9d905 --- /dev/null +++ b/sql/updates/r2243_scriptdev2.sql @@ -0,0 +1,33 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1580094 AND -1580064; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1580064,'All my plans have led to this!',12495,1,0,0,'kiljaeden SAY_ORDER_1'), +(-1580065,'Stay on task! Do not waste time!',12496,1,0,0,'kiljaeden SAY_ORDER_2'), +(-1580066,'I have waited long enough!',12497,1,0,0,'kiljaeden SAY_ORDER_3'), +(-1580067,'Fail me and suffer for eternity!',12498,1,0,0,'kiljaeden SAY_ORDER_4'), +(-1580068,'Drain the girl! Drain her power until there is nothing but a vacant shell!',12499,1,0,0,'kiljaeden SAY_ORDER_5'), +(-1580069,'The expendible have perished... So be it! Now I shall succeed where Sargeras could not! I will bleed this wretched world and secure my place as the true master of the Burning Legion. The end has come! Let the unraveling of this world commence!',12500,1,0,0,'kiljaeden SAY_EMERGE'), +(-1580070,'Another step towards destruction!',12501,1,0,0,'kiljaeden SAY_SLAY_1'), +(-1580071,'Anukh-Kyrie!',12502,1,0,0,'kiljaeden SAY_SLAY_2'), +(-1580072,'Who can you trust?',12503,1,0,0,'kiljaeden SAY_REFLECTION_1'), +(-1580073,'The enemy is among you.',12504,1,0,0,'kiljaeden SAY_REFLECTION_2'), +(-1580074,'Chaos!',12505,1,0,0,'kiljaeden SAY_DARKNESS_1'), +(-1580075,'Destruction!',12506,1,0,0,'kiljaeden SAY_DARKNESS_2'), +(-1580076,'Oblivion!',12507,1,0,0,'kiljaeden SAY_DARKNESS_3'), +(-1580077,'I will not be denied! This world shall fall!',12508,1,0,0,'kiljaeden SAY_PHASE_3'), +(-1580078,'Do not harbor false hope. You cannot win!',12509,1,0,0,'kiljaeden SAY_PHASE_4'), +(-1580079,'Aggghh! The powers of the Sunwell... turn... against me! What have you done? What have you done???',12510,1,0,0,'kiljaeden SAY_PHASE_5'), +(-1580080,'You are not alone. The Blue Dragonflight shall help you vanquish the Deceiver.',12438,1,0,0,'kalecgos SAY_KALECGOS_INTRO'), +(-1580081,'Anveena, you must awaken, this world needs you!',12445,1,0,0,'kalecgos SAY_KALECGOS_AWAKE_1'), +(-1580082,'I serve only the Master now.',12511,1,0,0,'anveena SAY_ANVEENA_IMPRISONED'), +(-1580083,'You must let go! You must become what you were always meant to be! The time is now, Anveena!',12446,1,0,0,'kalecgos SAY_KALECGOS_AWAKE_2'), +(-1580084,'But I\'m... lost. I cannot find my way back.',12512,1,0,0,'anveena SAY_ANVEENA_LOST'), +(-1580085,'Anveena, I love you! Focus on my voice, come back for me now! Only you can cleanse the Sunwell!',12447,1,0,0,'kalecgos SAY_KALECGOS_AWAKE_4'), +(-1580086,'Kalec... Kalec?',12513,1,0,0,'anveena SAY_ANVEENA_AWAKE'), +(-1580087,'Yes, Anveena! Let fate embrace you now!',12448,1,0,0,'kalecgos SAY_KALECGOS_AWAKE_5'), +(-1580088,'The nightmare is over, the spell is broken! Goodbye, Kalec, my love!',12514,1,0,0,'anveena SAY_ANVEENA_SACRIFICE'), +(-1580089,'Goodbye, Anveena, my love. Few will remember your name, yet this day you change the course of destiny. What was once corrupt is now pure. Heroes, do not let her sacrifice be in vain.',12450,1,0,0,'kalecgos SAY_KALECGOS_GOODBYE'), +(-1580090,'Strike now, heroes, while he is weakened! Vanquish the Deceiver!',12449,1,0,0,'kalecgos SAY_KALECGOS_ENCOURAGE'), +(-1580091,'I will channel my power into the orbs, be ready!',12440,1,0,0,'kalecgos SAY_KALECGOS_ORB_1'), +(-1580092,'I have empowered another orb! Use it quickly!',12441,1,0,0,'kalecgos SAY_KALECGOS_ORB_2'), +(-1580093,'Another orb is ready! Make haste!',12442,1,0,0,'kalecgos SAY_KALECGOS_ORB_3'), +(-1580094,'I have channeled all I can! The power is in your hands!',12443,1,0,0,'kalecgos SAY_KALECGOS_ORB_4'); From ed081d8471716bb71fb7e688f120532c7a670f3b Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Sun, 10 Jul 2011 14:07:06 +0200 Subject: [PATCH 0224/1172] [2244] Implement helper class to handle dialogues * Add structs DialogueEntry and DialogueEntryTwoSide to define the structure of an dialogue DialogueEntry is What is spoken by Whom and When DialogueEntryTwoSide is What is speaken by Whom or WhatAlternative is spoken by WhomAlternatively and When * Add helper class DialogueHelper which does the actual work of an dialogue. Either an object of this class must be used as member where a dialogue is to be used, or this class can be used with multi-inheriting to be able to react when a dialogue"event" happend. (Use the multi-inheriting only when needed) Thanks to crackm and vladimir for helping out with programming techniques! --- include/sc_instance.cpp | 133 ++++++++++++++++++++++++++++++++++++++++ include/sc_instance.h | 53 ++++++++++++++++ sd2_revision_nr.h | 2 +- 3 files changed, 187 insertions(+), 1 deletion(-) diff --git a/include/sc_instance.cpp b/include/sc_instance.cpp index e93cb451a..d9b97d64c 100644 --- a/include/sc_instance.cpp +++ b/include/sc_instance.cpp @@ -163,3 +163,136 @@ void ScriptedInstance::DoStartTimedAchievement(AchievementCriteriaTypes criteria else debug_log("SD2: DoStartTimedAchievement attempt start achievements but no players in map."); } + +/** + Constructor for DialogueHelper + + @param pDialogueArray The static const array of DialogueEntry holding the information about the dialogue. This array MUST be terminated by {0,0,0} + */ +DialogueHelper::DialogueHelper(DialogueEntry const* pDialogueArray) : + m_pDialogueArray(pDialogueArray), + m_pDialogueTwoSideArray(NULL), + m_pInstance(NULL), + m_pCurrentEntry(NULL), + m_pCurrentEntryTwoSide(NULL), + m_uiTimer(0), + m_bIsFirstSide(true) +{} + +/** + Constructor for DialogueHelper (Two Sides) + + @param pDialogueTwoSideArray The static const array of DialogueEntryTwoSide holding the information about the dialogue. This array MUST be terminated by {0,0,0,0,0} + */ +DialogueHelper::DialogueHelper(DialogueEntryTwoSide const* pDialogueTwoSideArray) : + m_pDialogueArray(NULL), + m_pDialogueTwoSideArray(pDialogueTwoSideArray), + m_pInstance(NULL), + m_pCurrentEntry(NULL), + m_pCurrentEntryTwoSide(NULL), + m_uiTimer(0), + m_bIsFirstSide(true) +{} + +/** + Function to start a (part of a) dialogue + + @param iTextEntry The TextEntry of the dialogue that will be started (must be always the entry of first side) + */ +void DialogueHelper::StartNextDialogueText(int32 iTextEntry) +{ + // Find iTextEntry + bool bFound = false; + + if (m_pDialogueArray) // One Side + { + for (DialogueEntry const* pEntry = m_pDialogueArray; pEntry->iTextEntry; ++pEntry) + { + if (pEntry->iTextEntry == iTextEntry) + { + m_pCurrentEntry = pEntry; + bFound = true; + break; + } + } + } + else // Two Sides + { + for (DialogueEntryTwoSide const* pEntry = m_pDialogueTwoSideArray; pEntry->iTextEntry; ++pEntry) + { + if (pEntry->iTextEntry == iTextEntry) + { + m_pCurrentEntryTwoSide = pEntry; + bFound = true; + break; + } + } + } + + if (!bFound) + { + error_log("SD2: Script call DialogueHelper::StartNextDialogueText, but textEntry %i is not in provided dialogue (on map id %u)", iTextEntry, m_pInstance ? m_pInstance->instance->GetId() : 0); + return; + } + + DoNextDialogueStep(); +} + +/// Internal helper function to do the actual say of a DialogueEntry +void DialogueHelper::DoNextDialogueStep() +{ + // Last Dialogue Entry done? + if (m_pCurrentEntry && !m_pCurrentEntry->iTextEntry || m_pCurrentEntryTwoSide && !m_pCurrentEntryTwoSide->iTextEntry) + { + m_uiTimer = 0; + return; + } + + // Get Text, SpeakerEntry and Timer + int32 iTextEntry = 0; + uint32 uiSpeakerEntry = 0; + + if (m_pDialogueArray) // One Side + { + uiSpeakerEntry = m_pCurrentEntry->uiSayerEntry; + iTextEntry = m_pCurrentEntry->iTextEntry; + + m_uiTimer = m_pCurrentEntry->uiTimer; + } + else // Two Sides + { + // Second Entries can be 0, if they are the entry from first side will be taken + uiSpeakerEntry = !m_bIsFirstSide && m_pCurrentEntryTwoSide->uiSayerEntryAlt ? m_pCurrentEntryTwoSide->uiSayerEntryAlt : m_pCurrentEntryTwoSide->uiSayerEntry; + iTextEntry = !m_bIsFirstSide && m_pCurrentEntryTwoSide->iTextEntryAlt ? m_pCurrentEntryTwoSide->iTextEntryAlt : m_pCurrentEntryTwoSide->iTextEntry; + + m_uiTimer = m_pCurrentEntryTwoSide->uiTimer; + } + + // Get Speaker + Creature* pSpeaker = NULL; + if (m_pInstance && uiSpeakerEntry) + pSpeaker = m_pInstance->GetSingleCreatureFromStorage(uiSpeakerEntry); + + if (pSpeaker && iTextEntry < 0) + DoScriptText(iTextEntry, pSpeaker); + + JustDidDialogueStep(m_pDialogueArray ? m_pCurrentEntry->iTextEntry : m_pCurrentEntryTwoSide->iTextEntry); + + // Increment position + if (m_pDialogueArray) + ++m_pCurrentEntry; + else + ++m_pCurrentEntryTwoSide; +} + +/// Call this function within any DialogueUpdate method. This is required for saying next steps in a dialogue +void DialogueHelper::DialogueUpdate(uint32 uiDiff) +{ + if (m_uiTimer) + { + if (m_uiTimer <= uiDiff) + DoNextDialogueStep(); + else + m_uiTimer -= uiDiff; + } +} diff --git a/include/sc_instance.h b/include/sc_instance.h index d7e037e51..5d16e5574 100644 --- a/include/sc_instance.h +++ b/include/sc_instance.h @@ -63,4 +63,57 @@ class MANGOS_DLL_DECL ScriptedInstance : public InstanceData EntryGuidMap m_mNpcEntryGuidStore; ///< Store unique NPC-Guids by entry }; +/// A static const array of this structure must be handled to DialogueHelper +struct DialogueEntry +{ + int32 iTextEntry; ///< To be said text entry + uint32 uiSayerEntry; ///< Entry of the mob who should say + uint32 uiTimer; ///< Time delay until next text of array is said (0 stops) +}; + +/// A static const array of this structure must be handled to DialogueHelper +struct DialogueEntryTwoSide +{ + int32 iTextEntry; ///< To be said text entry (first side) + uint32 uiSayerEntry; ///< Entry of the mob who should say (first side) + int32 iTextEntryAlt; ///< To be said text entry (second side) + uint32 uiSayerEntryAlt; ///< Entry of the mob who should say (second side) + uint32 uiTimer; ///< Time delay until next text of array is said (0 stops) +}; + +/// Helper class handling a dialogue given as static const array of DialogueEntry or DialogueEntryTwoSide +class DialogueHelper +{ + public: + // The array MUST be terminated by {0,0,0} + DialogueHelper(DialogueEntry const* pDialogueArray); + // The array MUST be terminated by {0,0,0,0,0} + DialogueHelper(DialogueEntryTwoSide const* aDialogueTwoSide); + + /// Function that MUST be called + void InitializeDialogueHelper(ScriptedInstance* pInstance) { m_pInstance = pInstance; } + /// Set if take first entries or second entries + void SetDialogueSide(bool bIsFirstSide) { m_bIsFirstSide = bIsFirstSide; } + + void StartNextDialogueText(int32 iTextEntry); + + void DialogueUpdate(uint32 uiDiff); + + protected: + virtual void JustDidDialogueStep(int32 iEntry) {} + + private: + void DoNextDialogueStep(); + + ScriptedInstance* m_pInstance; + + DialogueEntry const* m_pDialogueArray; + DialogueEntry const* m_pCurrentEntry; + DialogueEntryTwoSide const* m_pDialogueTwoSideArray; + DialogueEntryTwoSide const* m_pCurrentEntryTwoSide; + + uint32 m_uiTimer; + bool m_bIsFirstSide; +}; + #endif diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 55f1b9f47..26c06e2d0 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2243" + #define SD2_REVISION_NR "2244" #endif // __SD2_REVISION_NR_H__ From 0fd7976e8535aa1faeacc2ce2867da4ff1f14ebc Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sun, 10 Jul 2011 21:00:34 +0200 Subject: [PATCH 0225/1172] [2245] Improve script for Kelidan (Blood Furnace) * Generic Cleanup * Proper Add handling (setup casting, shared aggro) * Add Magtheridon yell (thanks to infernos) Signed-off-by: Schmoozerd --- .../blood_furnace/blood_furnace.h | 9 +- .../boss_kelidan_the_breaker.cpp | 333 +++++++++++++----- .../blood_furnace/instance_blood_furnace.cpp | 8 +- sd2_revision_nr.h | 2 +- sql/scriptdev2_script_full.sql | 4 +- sql/updates/r2245_scriptdev2.sql | 3 + 6 files changed, 274 insertions(+), 85 deletions(-) create mode 100644 sql/updates/r2245_scriptdev2.sql diff --git a/scripts/outland/hellfire_citadel/blood_furnace/blood_furnace.h b/scripts/outland/hellfire_citadel/blood_furnace/blood_furnace.h index 690ccd70b..b139f9739 100644 --- a/scripts/outland/hellfire_citadel/blood_furnace/blood_furnace.h +++ b/scripts/outland/hellfire_citadel/blood_furnace/blood_furnace.h @@ -16,8 +16,10 @@ enum // NPC_THE_MAKER = 17381, NPC_BROGGOK = 17380, - // NPC_KELIDAN_THE_BREAKER = 17377, + NPC_KELIDAN_THE_BREAKER = 17377, NPC_NASCENT_FEL_ORC = 17398, // Used in the Broggok event + NPC_MAGTHERIDON = 21174, + NPC_SHADOWMOON_CHANNELER = 17653, GO_DOOR_FINAL_EXIT = 181766, GO_DOOR_MAKER_FRONT = 181811, @@ -72,6 +74,8 @@ class MANGOS_DLL_DECL instance_blood_furnace : public ScriptedInstance void GetMovementDistanceForIndex(uint32 uiIndex, float& dx, float& dy); + void GetKelidanAddList(GUIDList& lList) { lList = m_lChannelersGuids; m_lChannelersGuids.clear(); } + private: void DoSortBroggokOrcs(); void DoNextBroggokEventPhase(); @@ -84,7 +88,8 @@ class MANGOS_DLL_DECL instance_blood_furnace : public ScriptedInstance uint32 m_uiBroggokEventTimer; // Timer for opening the event cages; only on heroic mode = 30 secs uint32 m_uiBroggokEventPhase; - GUIDList m_luiNascentOrcGUIDs; + GUIDList m_luiNascentOrcGuids; + GUIDList m_lChannelersGuids; }; #endif diff --git a/scripts/outland/hellfire_citadel/blood_furnace/boss_kelidan_the_breaker.cpp b/scripts/outland/hellfire_citadel/blood_furnace/boss_kelidan_the_breaker.cpp index 27645826f..cb6e4c943 100644 --- a/scripts/outland/hellfire_citadel/blood_furnace/boss_kelidan_the_breaker.cpp +++ b/scripts/outland/hellfire_citadel/blood_furnace/boss_kelidan_the_breaker.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: Boss_Kelidan_The_Breaker -SD%Complete: 60 -SDComment: Event with channeleres vs. boss not implemented yet +SD%Complete: 100 +SDComment: SDCategory: Hellfire Citadel, Blood Furnace EndScriptData */ @@ -31,6 +31,9 @@ EndContentData */ enum { + MAX_ADDS = 5, + + SAY_MAGTHERIDON_INTRO = -1542016, // Yell by Magtheridon SAY_WAKE = -1542000, SAY_ADD_AGGRO_1 = -1542001, SAY_ADD_AGGRO_2 = -1542002, @@ -41,53 +44,84 @@ enum SAY_DIE = -1542007, SPELL_CORRUPTION = 30938, - SPELL_EVOCATION = 30935, // Aura channeled by the boss + SPELL_EVOCATION = 30935, SPELL_FIRE_NOVA = 33132, - H_SPELL_FIRE_NOVA = 37371, + SPELL_FIRE_NOVA_H = 37371, SPELL_SHADOW_BOLT_VOLLEY = 28599, - H_SPELL_SHADOW_BOLT_VOLLEY = 40070, + SPELL_SHADOW_BOLT_VOLLEY_H = 40070, SPELL_BURNING_NOVA = 30940, - SPELL_VORTEX = 37370 + SPELL_VORTEX = 37370, + + SPELL_CHANNELING = 39123, +}; + +struct SortByAngle +{ + SortByAngle(WorldObject const* pRef): m_pRef(pRef) {} + bool operator()(WorldObject* pLeft, WorldObject* pRight) + { + return m_pRef->GetAngle(pLeft) < m_pRef->GetAngle(pRight); + } + WorldObject const* m_pRef; }; struct MANGOS_DLL_DECL boss_kelidan_the_breakerAI : public ScriptedAI { boss_kelidan_the_breakerAI(Creature* pCreature) : ScriptedAI(pCreature) { - m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_pInstance = (instance_blood_furnace*)pCreature->GetInstanceData(); m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); + m_uiSetupAddsTimer = 100; + m_bDidMagtheridonYell = false; + DoCastSpellIfCan(m_creature, SPELL_EVOCATION); Reset(); } - ScriptedInstance* m_pInstance; + instance_blood_furnace* m_pInstance; bool m_bIsRegularMode; - uint32 ShadowVolley_Timer; - uint32 BurningNova_Timer; - uint32 Firenova_Timer; - uint32 Corruption_Timer; - bool Firenova; + uint32 m_uiShadowVolleyTimer; + uint32 m_uiBurningNovaTimer; + uint32 m_uiFirenovaTimer; + uint32 m_uiCorruptionTimer; + uint32 m_uiSetupAddsTimer; + uint8 m_uiKilledAdds; + bool m_bDidMagtheridonYell; + + GUIDVector m_vAddGuids; void Reset() { - ShadowVolley_Timer = 1000; - BurningNova_Timer = 15000; - Corruption_Timer = 5000; - Firenova = false; + m_uiShadowVolleyTimer = 1000; + m_uiBurningNovaTimer = 15000; + m_uiCorruptionTimer = 5000; + m_uiFirenovaTimer = 0; + m_uiKilledAdds = 0; + } - DoCastSpellIfCan(m_creature, SPELL_EVOCATION); + void MoveInLineOfSight(Unit* pWho) + { + if (!m_bDidMagtheridonYell && pWho->GetTypeId() == TYPEID_PLAYER && !((Player*)pWho)->isGameMaster() && m_creature->_IsWithinDist(pWho, 73.0f, false)) + { + if (m_pInstance) + m_pInstance->DoOrSimulateScriptTextForThisInstance(SAY_MAGTHERIDON_INTRO, NPC_MAGTHERIDON); + + m_bDidMagtheridonYell = true; + } + + ScriptedAI::MoveInLineOfSight(pWho); } - void Aggro(Unit *who) + void Aggro(Unit* pWho) { DoScriptText(SAY_WAKE, m_creature); } - void KilledUnit(Unit* victim) + void KilledUnit(Unit* pVictim) { if (urand(0, 1)) return; @@ -95,59 +129,153 @@ struct MANGOS_DLL_DECL boss_kelidan_the_breakerAI : public ScriptedAI DoScriptText(urand(0, 1) ? SAY_KILL_1 : SAY_KILL_2, m_creature); } - void JustDied(Unit* Killer) + void JustDied(Unit* pKiller) { DoScriptText(SAY_DIE, m_creature); if (m_pInstance) - m_pInstance->SetData(TYPE_KELIDAN_EVENT,DONE); + m_pInstance->SetData(TYPE_KELIDAN_EVENT, DONE); } - void UpdateAI(const uint32 diff) + void JustReachedHome() { - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + if (m_pInstance) + m_pInstance->SetData(TYPE_KELIDAN_EVENT, FAIL); + + DoCastSpellIfCan(m_creature, SPELL_EVOCATION); + m_uiSetupAddsTimer = 2000; + } + + void DoSetupAdds() + { + m_uiSetupAddsTimer = 0; + + if (!m_pInstance) return; - if (Firenova) + GUIDList lAddGuids; + m_pInstance->GetKelidanAddList(lAddGuids); + + // Sort Adds to vector if not already done + if (!lAddGuids.empty()) { - if (Firenova_Timer < diff) + m_vAddGuids.reserve(lAddGuids.size()); + std::list lAdds; + for (GUIDList::const_iterator itr = lAddGuids.begin(); itr != lAddGuids.end(); ++itr) { - DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_FIRE_NOVA : H_SPELL_FIRE_NOVA); - Firenova = false; - ShadowVolley_Timer = 2000; - }else Firenova_Timer -=diff; + if (Creature* pAdd = m_pInstance->instance->GetCreature(*itr)) + lAdds.push_back(pAdd); + } + // Sort them by angle + lAdds.sort(SortByAngle(m_creature)); + for (std::list::const_iterator itr = lAdds.begin(); itr != lAdds.end(); ++itr) + m_vAddGuids.push_back((*itr)->GetObjectGuid()); + } - return; + // Respawn killed adds and reset counter + m_uiKilledAdds = 0; + for (GUIDVector::const_iterator itr = m_vAddGuids.begin(); itr != m_vAddGuids.end(); ++itr) + { + Creature* pAdd = m_pInstance->instance->GetCreature(*itr); + if (pAdd && !pAdd->isAlive()) + pAdd->Respawn(); + } + + // Cast pentagram + uint8 s = m_vAddGuids.size(); + for (uint8 i = 0; i < s; ++i) + { + Creature* pCaster = m_pInstance->instance->GetCreature(m_vAddGuids[i]); + Creature* pTarget = m_pInstance->instance->GetCreature(m_vAddGuids[(i + 2) % s]); + if (pCaster && pTarget) + pCaster->CastSpell(pTarget, SPELL_CHANNELING, false); + } + } + + void AddJustAggroed(Unit* pWho) + { + // Let all adds attack + for (GUIDVector::const_iterator itr = m_vAddGuids.begin(); itr != m_vAddGuids.end(); ++itr) + { + Creature* pAdd = m_creature->GetMap()->GetCreature(*itr); + if (pAdd && !pAdd->getVictim()) + pAdd->AI()->AttackStart(pWho); + } + } + + void AddJustReachedHome() + { + m_uiSetupAddsTimer = 2000; + } + + void AddJustDied(Unit* pKiller) + { + ++m_uiKilledAdds; + if (m_uiKilledAdds == MAX_ADDS) + { + m_creature->InterruptNonMeleeSpells(true); + AttackStart(pKiller); } + } - if (ShadowVolley_Timer < diff) + void UpdateAI(const uint32 uiDiff) + { + if (m_uiSetupAddsTimer) { - DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_SHADOW_BOLT_VOLLEY : H_SPELL_SHADOW_BOLT_VOLLEY); - ShadowVolley_Timer = urand(5000, 13000); - }else ShadowVolley_Timer -=diff; + if (m_uiSetupAddsTimer <= uiDiff) + DoSetupAdds(); + else + m_uiSetupAddsTimer -= uiDiff; + } + + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; - if (Corruption_Timer < diff) + if (m_uiFirenovaTimer) { - DoCastSpellIfCan(m_creature,SPELL_CORRUPTION); - Corruption_Timer = urand(30000, 50000); - }else Corruption_Timer -=diff; + if (m_uiFirenovaTimer <= uiDiff) + { + if (DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_FIRE_NOVA : SPELL_FIRE_NOVA_H) == CAST_OK) + { + m_uiFirenovaTimer = 0; + m_uiShadowVolleyTimer = 2000; + } + } + else + m_uiFirenovaTimer -=uiDiff; + } - if (BurningNova_Timer < diff) + if (m_uiShadowVolleyTimer < uiDiff) { - if (m_creature->IsNonMeleeSpellCasted(false)) - m_creature->InterruptNonMeleeSpells(true); + if (DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_SHADOW_BOLT_VOLLEY : SPELL_SHADOW_BOLT_VOLLEY_H) == CAST_OK) + m_uiShadowVolleyTimer = urand(5000, 13000); + } + else + m_uiShadowVolleyTimer -=uiDiff; - DoScriptText(SAY_NOVA, m_creature); + if (m_uiCorruptionTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_CORRUPTION) == CAST_OK) + m_uiCorruptionTimer = urand(30000, 50000); + } + else + m_uiCorruptionTimer -=uiDiff; - if (!m_bIsRegularMode) - DoCastSpellIfCan(m_creature, SPELL_VORTEX); + if (m_uiBurningNovaTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_BURNING_NOVA, CAST_TRIGGERED) == CAST_OK) + { + DoScriptText(SAY_NOVA, m_creature); - DoCastSpellIfCan(m_creature,SPELL_BURNING_NOVA); + if (!m_bIsRegularMode) + DoCastSpellIfCan(m_creature, SPELL_VORTEX, CAST_TRIGGERED); - BurningNova_Timer = urand(20000, 28000); - Firenova_Timer= 5000; - Firenova = true; - }else BurningNova_Timer -=diff; + m_uiBurningNovaTimer = urand(20000, 28000); + m_uiFirenovaTimer = 5000; + } + } + else + m_uiBurningNovaTimer -= uiDiff; DoMeleeAttackIfReady(); } @@ -165,12 +293,10 @@ CreatureAI* GetAI_boss_kelidan_the_breaker(Creature* pCreature) enum { SPELL_SHADOW_BOLT = 12739, - H_SPELL_SHADOW_BOLT = 15472, + SPELL_SHADOW_BOLT_H = 15472, SPELL_MARK_OF_SHADOW = 30937, - - SPELL_CHANNELING = 0 //initial spell channeling boss/each other not known -}; //when engaged all channelers must stop, trigger yell (SAY_ADD_AGGRO_*), and engage. +}; struct MANGOS_DLL_DECL mob_shadowmoon_channelerAI : public ScriptedAI { @@ -184,37 +310,86 @@ struct MANGOS_DLL_DECL mob_shadowmoon_channelerAI : public ScriptedAI ScriptedInstance* m_pInstance; bool m_bIsRegularMode; - uint32 ShadowBolt_Timer; - uint32 MarkOfShadow_Timer; + uint32 m_uiShadowBoltTimer; + uint32 m_uiMarkOfShadowTimer; void Reset() { - ShadowBolt_Timer = urand(1000, 2000); - MarkOfShadow_Timer = urand(5000, 7000); + m_uiShadowBoltTimer = urand(1000, 2000); + m_uiMarkOfShadowTimer = urand(5000, 7000); } - void Aggro(Unit* who) + void Aggro(Unit* pWho) { - //trigger boss to yell + m_creature->InterruptNonMeleeSpells(false); + + switch(urand(0, 2)) + { + case 0: + DoScriptText(SAY_ADD_AGGRO_1, m_creature); + break; + case 1: + DoScriptText(SAY_ADD_AGGRO_2, m_creature); + break; + case 2: + DoScriptText(SAY_ADD_AGGRO_3, m_creature); + break; + } + + if (!m_pInstance) + return; + + if (Creature* pKelidan = m_pInstance->GetSingleCreatureFromStorage(NPC_KELIDAN_THE_BREAKER)) + if (boss_kelidan_the_breakerAI* pKelidanAI = dynamic_cast (pKelidan->AI())) + pKelidanAI->AddJustAggroed(pWho); + } + + void JustDied(Unit* pKiller) + { + if (!m_pInstance) + return; + + if (Creature* pKelidan = m_pInstance->GetSingleCreatureFromStorage(NPC_KELIDAN_THE_BREAKER)) + if (boss_kelidan_the_breakerAI* pKelidanAI = dynamic_cast (pKelidan->AI())) + pKelidanAI->AddJustDied(pKiller); + } + + void JustReachedHome() + { + if (!m_pInstance) + return; + + if (Creature* pKelidan = m_pInstance->GetSingleCreatureFromStorage(NPC_KELIDAN_THE_BREAKER)) + if (boss_kelidan_the_breakerAI* pKelidanAI = dynamic_cast (pKelidan->AI())) + pKelidanAI->AddJustReachedHome(); } - void UpdateAI(const uint32 diff) + void UpdateAI(const uint32 uiDiff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - if (MarkOfShadow_Timer < diff) + if (m_uiMarkOfShadowTimer < uiDiff) { - if (Unit *target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) - DoCastSpellIfCan(target,SPELL_MARK_OF_SHADOW); - MarkOfShadow_Timer = urand(15000, 20000); - }else MarkOfShadow_Timer -=diff; + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, SPELL_MARK_OF_SHADOW) == CAST_OK) + m_uiMarkOfShadowTimer = urand(15000, 20000); + } + } + else + m_uiMarkOfShadowTimer -=uiDiff; - if (ShadowBolt_Timer < diff) + if (m_uiShadowBoltTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), m_bIsRegularMode ? SPELL_SHADOW_BOLT : H_SPELL_SHADOW_BOLT); - ShadowBolt_Timer = urand(5000, 6000); - }else ShadowBolt_Timer -=diff; + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, m_bIsRegularMode ? SPELL_SHADOW_BOLT : SPELL_SHADOW_BOLT_H) == CAST_OK) + m_uiShadowBoltTimer = urand(5000, 6000); + } + } + else + m_uiShadowBoltTimer -=uiDiff; DoMeleeAttackIfReady(); } @@ -227,15 +402,15 @@ CreatureAI* GetAI_mob_shadowmoon_channeler(Creature* pCreature) void AddSC_boss_kelidan_the_breaker() { - Script *newscript; + Script* pNewScript; - newscript = new Script; - newscript->Name = "boss_kelidan_the_breaker"; - newscript->GetAI = &GetAI_boss_kelidan_the_breaker; - newscript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "boss_kelidan_the_breaker"; + pNewScript->GetAI = &GetAI_boss_kelidan_the_breaker; + pNewScript->RegisterSelf(); - newscript = new Script; - newscript->Name = "mob_shadowmoon_channeler"; - newscript->GetAI = &GetAI_mob_shadowmoon_channeler; - newscript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "mob_shadowmoon_channeler"; + pNewScript->GetAI = &GetAI_mob_shadowmoon_channeler; + pNewScript->RegisterSelf(); } diff --git a/scripts/outland/hellfire_citadel/blood_furnace/instance_blood_furnace.cpp b/scripts/outland/hellfire_citadel/blood_furnace/instance_blood_furnace.cpp index 915120b23..c7a76e986 100644 --- a/scripts/outland/hellfire_citadel/blood_furnace/instance_blood_furnace.cpp +++ b/scripts/outland/hellfire_citadel/blood_furnace/instance_blood_furnace.cpp @@ -41,11 +41,15 @@ void instance_blood_furnace::OnCreatureCreate(Creature* pCreature) switch (pCreature->GetEntry()) { case NPC_BROGGOK: + case NPC_KELIDAN_THE_BREAKER: m_mNpcEntryGuidStore[pCreature->GetEntry()] = pCreature->GetObjectGuid(); break; case NPC_NASCENT_FEL_ORC: - m_luiNascentOrcGUIDs.push_back(pCreature->GetObjectGuid()); + m_luiNascentOrcGuids.push_back(pCreature->GetObjectGuid()); + break; + case NPC_SHADOWMOON_CHANNELER: + m_lChannelersGuids.push_back(pCreature->GetObjectGuid()); break; } } @@ -310,7 +314,7 @@ void instance_blood_furnace::Load(const char* chrIn) // Sort all nascent orcs in the instance in order to get only those near broggok doors void instance_blood_furnace::DoSortBroggokOrcs() { - for (GUIDList::const_iterator itr = m_luiNascentOrcGUIDs.begin(); itr != m_luiNascentOrcGUIDs.end(); ++itr) + for (GUIDList::const_iterator itr = m_luiNascentOrcGuids.begin(); itr != m_luiNascentOrcGuids.end(); ++itr) { if (Creature* pOrc = instance->GetCreature(*itr)) { diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 26c06e2d0..24a2f45bd 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2244" + #define SD2_REVISION_NR "2245" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 194ad0288..d3e563401 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -1629,7 +1629,9 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1542013,'It is pointless to resist.',10290,1,0,0,'the_maker SAY_KILL_2'), (-1542014,'Stay away from... me.',10291,1,0,0,'the_maker SAY_DIE'), -(-1542015,'Kill them!',0,1,0,0,'broggok SAY_BROGGOK_INTRO'); +(-1542015,'Kill them!',0,1,0,0,'broggok SAY_BROGGOK_INTRO'), + +(-1542016,'How long do you beleive your pathetic sorcery can hold me?',0,6,0,0,'magtheridon SAY_MAGTHERIDON_WARN'); -- -1 543 000 HELLFIRE RAMPARTS INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES diff --git a/sql/updates/r2245_scriptdev2.sql b/sql/updates/r2245_scriptdev2.sql new file mode 100644 index 000000000..eea7f9549 --- /dev/null +++ b/sql/updates/r2245_scriptdev2.sql @@ -0,0 +1,3 @@ +DELETE FROM script_texts WHERE entry=-1542016; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1542016,'How long do you beleive your pathetic sorcery can hold me?',0,6,0,0,'magtheridon SAY_MAGTHERIDON_WARN'); From 2db5cf2e450a211597d05da3f8ce4da74925cd5a Mon Sep 17 00:00:00 2001 From: Xfurry Date: Wed, 13 Jul 2011 22:18:19 +0200 Subject: [PATCH 0226/1172] [2246] Add Texts for Icecrown Citadel Gunship-Event texts are missing. Likely most Boss-Emotes are missing. Special thanks to Xfurry for providing base texts and additional effort to clean them for submission! --- .../icecrown_citadel/blood_prince_council.cpp | 24 ++ .../boss_blood_queen_lanathel.cpp | 13 ++ .../boss_deathbringer_saurfang.cpp | 46 ++++ .../icecrown_citadel/boss_festergut.cpp | 15 ++ .../boss_lady_deathwhisper.cpp | 21 ++ .../icecrown_citadel/boss_lord_marrowgar.cpp | 14 ++ .../boss_professor_putricide.cpp | 13 ++ .../icecrown_citadel/boss_rotface.cpp | 15 ++ .../icecrown_citadel/boss_sindragosa.cpp | 14 ++ .../icecrown_citadel/boss_the_lich_king.cpp | 39 ++++ .../boss_valithria_dreamwalker.cpp | 26 +++ sd2_revision_nr.h | 2 +- sql/scriptdev2_script_full.sql | 207 +++++++++++++++++ sql/updates/r2246_scriptdev2.sql | 208 ++++++++++++++++++ 14 files changed, 656 insertions(+), 1 deletion(-) create mode 100644 sql/updates/r2246_scriptdev2.sql diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/blood_prince_council.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/blood_prince_council.cpp index ab2116738..2ceee96ba 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/blood_prince_council.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/blood_prince_council.cpp @@ -23,6 +23,30 @@ EndScriptData */ #include "precompiled.h" +enum +{ + SAY_COUNCIL_INTRO_1 = 1631101, // Intro by Bloodqueen + SAY_COUNCIL_INTRO_2 = 1631102, + SAY_KELESETH_INVOCATION = 1631103, + SAY_KELESETH_SPECIAL = 1631104, + SAY_KELESETH_SLAY_1 = 1631105, + SAY_SKELESETH_SLAY_2 = 1631106, + SAY_KELESETH_BERSERK = 1631107, + SAY_KELESETH_DEATH = 1631108, + SAY_TALDARAM_INVOCATION = 1631109, + SAY_TALDARAM_SPECIAL = 1631110, + SAY_TALDARAM_SLAY_1 = 1631111, + SAY_TALDARAM_SLAY_2 = 1631112, + SAY_TALDARAM_BERSERK = 1631113, + SAY_TALDARAM_DEATH = 1631114, + SAY_VALANAR_INVOCATION = 1631115, + SAY_VALANAR_SPECIAL = 1631116, + SAY_VALANAR_SLAY_1 = 1631117, + SAY_VALANAR_SLAY_2 = 1631118, + SAY_VALANAR_BERSERK = 1631119, + SAY_VALANAR_DEATH = 1631120, +}; + void AddSC_blood_prince_council() { } diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_blood_queen_lanathel.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_blood_queen_lanathel.cpp index c97f9389e..bb5e22825 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_blood_queen_lanathel.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_blood_queen_lanathel.cpp @@ -23,6 +23,19 @@ EndScriptData */ #include "precompiled.h" +enum +{ + SAY_AGGRO = 1631121, + SAY_BITE_1 = 1631122, + SAY_BITE_2 = 1631123, + SAY_SHADOWS = 1631124, + SAY_PACT = 1631125, + SAY_MC = 1631126, + SAY_AIR_PHASE = 1631127, + SAY_BERSERK = 1631128, + SAY_DEATH = 1631129, +}; + void AddSC_boss_blood_queen_lanathel() { } diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp index 1c350e0f0..0bdb2e7e8 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp @@ -23,6 +23,52 @@ EndScriptData */ #include "precompiled.h" +enum +{ + SAY_AGGRO = 1631028, + SAY_FALLENCHAMPION = 1631029, + SAY_BLOODBEASTS = 1631030, + SAY_SLAY_1 = 1631031, + SAY_SLAY_2 = 1631032, + SAY_BERSERK = 1631033, + SAY_DEATH = 1631034, + SAY_INTRO_ALLY_0 = 1631035, + SAY_INTRO_ALLY_1 = 1631036, + SAY_INTRO_ALLY_2 = 1631037, + SAY_INTRO_ALLY_3 = 1631038, + SAY_INTRO_ALLY_4 = 1631039, + SAY_INTRO_ALLY_5 = 1631040, + SAY_INTRO_HORDE_1 = 1631041, + SAY_INTRO_HORDE_2 = 1631042, + SAY_INTRO_HORDE_3 = 1631043, + SAY_INTRO_HORDE_4 = 1631044, + SAY_INTRO_HORDE_5 = 1631045, + SAY_INTRO_HORDE_6 = 1631046, + SAY_INTRO_HORDE_7 = 1631047, + SAY_INTRO_HORDE_8 = 1631048, + SAY_INTRO_HORDE_9 = 1631049, + SAY_OUTRO_ALLY_1 = 1631050, + SAY_OUTRO_ALLY_2 = 1631051, + SAY_OUTRO_ALLY_3 = 1631052, + SAY_OUTRO_ALLY_4 = 1631053, + SAY_OUTRO_ALLY_5 = 1631054, + SAY_OUTRO_ALLY_6 = 1631055, + SAY_OUTRO_ALLY_7 = 1631056, + SAY_OUTRO_ALLY_8 = 1631057, + SAY_OUTRO_ALLY_9 = 1631058, + SAY_OUTRO_ALLY_10 = 1631059, + SAY_OUTRO_ALLY_11 = 1631060, + SAY_OUTRO_ALLY_12 = 1631061, + SAY_OUTRO_ALLY_13 = 1631062, + SAY_OUTRO_ALLY_14 = 1631063, + SAY_OUTRO_ALLY_15 = 1631064, + SAY_OUTRO_ALLY_16 = 1631065, + SAY_OUTRO_HORDE_1 = 1631066, + SAY_OUTRO_HORDE_2 = 1631067, + SAY_OUTRO_HORDE_3 = 1631068, + SAY_OUTRO_HORDE_4 = 1631069, +}; + void AddSC_boss_deathbringer_saurfang() { } diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_festergut.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_festergut.cpp index 032e9c8c5..ddb3ca2f5 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_festergut.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_festergut.cpp @@ -23,6 +23,21 @@ EndScriptData */ #include "precompiled.h" +enum +{ + SAY_STINKY_DIES = 1631081, + SAY_AGGRO = 1631082, + SAY_BLIGHT = 1631083, + SAY_SPORE = 1631084, + SAY_PUNGUENT_BLIGHT = 1631085, + SAY_PUNGUENT_BLIGHT_EMOTE = 1631086, + SAY_SLAY_1 = 1631087, + SAY_SLAY_2 = 1631088, + SAY_BERSERK = 1631089, + SAY_DEATH = 1631090, + SAY_FESTERGUT_DEATH = 1631091, +}; + void AddSC_boss_festergut() { } diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lady_deathwhisper.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lady_deathwhisper.cpp index ae65d214b..89192a509 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lady_deathwhisper.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lady_deathwhisper.cpp @@ -23,6 +23,27 @@ EndScriptData */ #include "precompiled.h" +enum +{ + SAY_SPEECH_1 = 1631011, + SAY_SPEECH_2 = 1631012, + SAY_SPEECH_3 = 1631013, + SAY_SPEECH_4 = 1631014, + SAY_SPEECH_5 = 1631015, + SAY_SPEECH_6 = 1631016, + SAY_SPEECH_7 = 1631017, + SAY_AGGRO = 1631018, + SAY_PHASE_TWO = 1631019, + SAY_DARK_EMPOWERMENT = 1631020, + SAY_DARK_TRANSFORMATION = 1631021, + SAY_ANIMATE_DEAD = 1631022, + SAY_DOMINATE_MIND = 1631023, + SAY_BERSERK = 1631024, + SAY_DEATH = 1631025, + SAY_SLAY_1 = 1631026, + SAY_SLAY_2 = 1631027, +}; + void AddSC_boss_lady_deathwhisper() { } diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp index a22c26aaa..440b7d64f 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp @@ -23,6 +23,20 @@ EndScriptData */ #include "precompiled.h" +enum +{ + SAY_INTRO = 1631001, + SAY_AGGRO = 1631002, + SAY_BONE_STORM = 1631003, + SAY_BONE_SPIKE_1 = 1631004, + SAY_BONE_SPIKE_2 = 1631005, + SAY_BONE_SPIKE_3 = 1631006, + SAY_SLAY_1 = 1631007, + SAY_SLAY_2 = 1631008, + SAY_DEATH = 1631009, + SAY_BERSERK = 1631010, +}; + void AddSC_boss_lord_marrowgar() { } diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_professor_putricide.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_professor_putricide.cpp index 07588fc21..d8e288191 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_professor_putricide.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_professor_putricide.cpp @@ -23,6 +23,19 @@ EndScriptData */ #include "precompiled.h" +enum +{ + SAY_AGGRO = 1631092, + SAY_AIRLOCK = 1631093, + SAY_PHASE_CHANGE = 1631094, + SAY_TRANSFORM_1 = 1631095, + SAY_TRANSFORM_2 = 1631096, + SAY_SLAY_1 = 1631097, + SAY_SLAY_2 = 1631098, + SAY_BERSERK = 1631099, + SAY_DEATH = 1631100, +}; + void AddSC_boss_professor_putricide() { } diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_rotface.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_rotface.cpp index 350f59f69..e18634ee8 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_rotface.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_rotface.cpp @@ -23,6 +23,21 @@ EndScriptData */ #include "precompiled.h" +enum +{ + SAY_PRECIOUS_DIES = 1631070, + SAY_AGGRO = 1631071, + SAY_SLIME_SPRAY = 1631072, + SAY_OOZE_EXPLODE = 1631073, + SAY_SLIME_FLOW_1 = 1631074, + SAY_SLIME_FLOW_2 = 1631075, + SAY_SLAY_1 = 1631076, + SAY_SLAY_2 = 1631077, + SAY_BERSERK = 1631078, + SAY_DEATH = 1631079, + SAY_ROTFACE_DEATH = 1631080, +}; + void AddSC_boss_rotface() { } diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp index 170402308..047a31503 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp @@ -23,6 +23,20 @@ EndScriptData */ #include "precompiled.h" +enum +{ + SAY_AGGRO = 1631148, + SAY_UNCHAINED_MAGIC = 1631149, + SAY_BLISTERING_COLD = 1631150, + SAY_RESPIRE = 1631151, + SAY_TAKEOFF = 1631152, + SAY_PHASE_3 = 1631153, + SAY_SLAY_1 = 1631154, + SAY_SLAY_2 = 1631155, + SAY_BERSERK = 1631156, + SAY_DEATH = 1631157, +}; + void AddSC_boss_sindragosa() { } diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_the_lich_king.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_the_lich_king.cpp index 0f41e3a22..740b6a691 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_the_lich_king.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_the_lich_king.cpp @@ -23,6 +23,45 @@ EndScriptData */ #include "precompiled.h" +enum +{ + SAY_INTRO_1 = 1631158, + SAY_INTRO_2 = 1631159, + SAY_INTRO_3 = 1631160, + SAY_INTRO_4 = 1631161, + SAY_INTRO_5 = 1631162, + SAY_AGGRO = 1631163, + SAY_REMORSELESS_WINTER = 1631164, + SAY_SHATTER_ARENA = 1631165, + SAY_SUMMON_VALKYR = 1631166, + SAY_HARVEST_SOUL = 1631167, + SAY_FM_TERENAS_AID_1 = 1631168, + SAY_FM_TERENAS_AID_2 = 1631169, + SAY_FM_TERENAS_AID_3 = 1631170, + SAY_FM_PLAYER_ESCAPE = 1631171, + SAY_FM_PLAYER_DEATH = 1631172, + SAY_SPECIAL_1 = 1631173, + SAY_SPECIAL_2 = 1631174, + SAY_LAST_PHASE = 1631175, + SAY_SLAY_1 = 1631176, + SAY_SLAY_2 = 1631177, + SAY_ENRAGE = 1631178, + SAY_OUTRO_1 = 1631179, + SAY_OUTRO_2 = 1631180, + SAY_OUTRO_3 = 1631181, + SAY_OUTRO_4 = 1631182, + SAY_OUTRO_5 = 1631183, + SAY_OUTRO_6 = 1631184, + SAY_OUTRO_7 = 1631185, + SAY_OUTRO_8 = 1631186, + SAY_OUTRO_9 = 1631187, + SAY_OUTRO_10 = 1631188, + SAY_OUTRO_11 = 1631189, + SAY_OUTRO_12 = 1631190, + SAY_OUTRO_13 = 1631191, + SAY_OUTRO_14 = 1631192, +}; + void AddSC_boss_the_lich_king() { } diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_valithria_dreamwalker.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_valithria_dreamwalker.cpp index 47a99ba70..c0196e01d 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_valithria_dreamwalker.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_valithria_dreamwalker.cpp @@ -23,6 +23,32 @@ EndScriptData */ #include "precompiled.h" +enum SvalnaTexts // TODO Maybe need own file? +{ + SAY_SVALNA_EVENT_1 = 1631130, + SAY_SVALNA_EVENT_2 = 1631131, + SAY_SVALNA_EVENT_3 = 1631132, + SAY_SVALNA_EVENT_4 = 1631133, + SAY_KILLING_CRUSADERS = 1631134, + SAY_RESSURECT = 1631135, + SAY_SVALNA_AGGRO = 1631136, + SAY_KILL_CAPTAIN = 1631137, + SAY_KILL_PLAYER = 1631138, + SAY_DEATH = 1631139, +}; + +enum +{ + SAY_AGGRO = 1631140, + SAY_PORTAL = 1631141, + SAY_75_HEALTH = 1631142, + SAY_25_HEALTH = 1631143, + SAY_0_HEALTH = 1631144, + SAY_PLAYER_DIES = 1631145, + SAY_BERSERK = 1631146, + SAY_VICTORY = 1631147, +}; + void AddSC_boss_valithria_dreamwalker() { } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 24a2f45bd..fcfa2b427 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2245" + #define SD2_REVISION_NR "2246" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index d3e563401..a88d5b3de 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -3337,6 +3337,213 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1619039,' ',14049,1,0,0,'volazj SAY_DEATH_2'); -- -1 631 000 ICC: ICECROWN CITADEL +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1631001,'This is the beginning AND the end, mortals. None may enter the master\'s sanctum!',16950,1,0,0,'marrowgar SAY_INTRO'), +(-1631002,'The Scourge will wash over this world as a swarm of death and destruction!',16941,1,0,0,'marrowgar SAY_AGGRO'), +(-1631003,'BONE STORM!',16946,1,0,0,'marrowgar SAY_BONE_STORM'), +(-1631004,'Bound by bone!',16947,1,0,0,'marrowgar SAY_BONE_SPIKE_1'), +(-1631005,'Stick Around!',16948,1,0,0,'marrowgar SAY_BONE_SPIKE_2'), +(-1631006,'The only escape is death!',16949,1,0,0,'marrowgar SAY_BONE_SPIKE_3'), +(-1631007,'More bones for the offering!',16942,1,0,0,'marrowgar SAY_SLAY_1'), +(-1631008,'Languish in damnation!',16943,1,0,0,'marrowgar SAY_SLAY_2'), +(-1631009,'I see... only darkness...',16944,1,0,0,'marrowgar SAY_DEATH'), +(-1631010,'THE MASTER\'S RAGE COURSES THROUGH ME!',16945,1,0,0,'marrowgar SAY_BERSERK'), + +(-1631011,'You have found your way here, because you are among the few gifted with true vision in a world cursed with blindness.',17272,1,0,0,'deathwhisper SAY_SPEECH_1'), +(-1631012,'You can see through the fog that hangs over this world like a shroud, and grasp where true power lies.',17273,1,0,0,'deathwhisper SAY_SPEECH_2'), +(-1631013,'Fix your eyes upon your crude hands: the sinew, the soft meat, the dark blood coursing within.',16878,1,0,0,'deathwhisper SAY_SPEECH_3'), +(-1631014,'It is a weakness; a crippling flaw.... A joke played by the Creators upon their own creations.',17268,1,0,0,'deathwhisper SAY_SPEECH_4'), +(-1631015,'The sooner you come to accept your condition as a defect, the sooner you will find yourselves in a position to transcend it.',17269,1,0,0,'deathwhisper SAY_SPEECH_5'), +(-1631016,'Through our Master, all things are possible. His power is without limit, and his will unbending.',17270,1,0,0,'deathwhisper SAY_SPEECH_6'), +(-1631017,'Those who oppose him will be destroyed utterly, and those who serve -- who serve wholly, unquestioningly, with utter devotion of mind and soul -- elevated to heights beyond your ken.',17271,1,0,0,'deathwhisper SAY_SPEECH_7'), +(-1631018,'What is this disturbance?! You dare trespass upon this hallowed ground? This shall be your final resting place.',16868,1,0,0,'deathwhisper SAY_AGGRO'), +(-1631019,'Enough! I see I must take matters into my own hands!',16877,1,0,0,'deathwhisper SAY_PHASE_TWO'), +(-1631020,'Take this blessing and show these intruders a taste of our master\'s power.',16873,1,0,0,'deathwhisper SAY_DARK_EMPOWERMENT'), +(-1631021,'I release you from the curse of flesh!',16874,1,0,0,'deathwhisper SAY_DARK_TRANSFORMATION'), +(-1631022,'Arise and exalt in your pure form!',16875,1,0,0,'deathwhisper SAY_ANIMATE_DEAD'), +(-1631023,'You are weak, powerless to resist my will!',16876,1,0,0,'deathwhisper SAY_DOMINATE_MIND'), +(-1631024,'This charade has gone on long enough.',16872,1,0,0,'deathwhisper SAY_BERSERK'), +(-1631025,'All part of the masters plan! Your end is... inevitable!',16871,1,0,0,'deathwhisper SAY_DEATH'), +(-1631026,'Do you yet grasp of the futility of your actions?',16869,1,0,0,'deathwhisper SAY_SLAY_1'), +(-1631027,'Embrace the darkness... Darkness eternal!',16870,1,0,0,'deathwhisper SAY_SLAY_2'), + +(-1631028,'BY THE MIGHT OF THE LICH KING!',16694,1,0,0,'saurfang SAY_AGGRO'), +(-1631029,'The ground runs red with your blood!',16699,1,0,0,'saurfang SAY_FALLENCHAMPION'), +(-1631030,'Feast, my minions!',16700,1,0,0,'saurfang SAY_BLOODBEASTS'), +(-1631031,'You are nothing!',16695,1,0,0,'saurfang SAY_SLAY_1'), +(-1631032,'Your soul will find no redemption here!',16696,1,0,0,'saurfang SAY_SLAY_2'), +(-1631033,'I have become...DEATH!',16698,1,0,0,'saurfang SAY_BERSERK'), +(-1631034,'I... Am... Released.',16697,1,0,0,'saurfang SAY_DEATH'), +(-1631035,'Let\'s get a move on then! Move ou...',16974,1,0,0,'bronzebeard SAY_INTRO_ALLY_0'), +(-1631036,'For every Horde soldier that you killed, for every Alliance dog that fell, the Lich King\'s armies grew. Even now the Val\'kyr work to raise your fallen... As Scourge.',16701,1,0,0,'saurfang SAY_INTRO_ALLY_1'), +(-1631037,'Things are about to get much worse. Come, taste the power that the Lich King has bestowed upon me!',16702,1,0,0,'saurfang SAY_INTRO_ALLY_2'), +(-1631038,'A lone orc, against the might of the Alliance?',16970,1,0,0,'bronzebeard SAY_INTRO_ALLY_3'), +(-1631039,'Charge!',16971,1,0,0,'bronzebeard SAY_INTRO_ALLY_4'), +(-1631040,'Hahahaha! Dwarves...',16703,1,0,0,'saurfang SAY_INTRO_ALLY_5'), +(-1631041,'Kor\'kron, move out! Champions, watch your backs. The Scourge have been..',17103,1,0,0,'overlord SAY_INTRO_HORDE_1'), +(-1631042,'Join me, father. Join me and we will crush this world in the name of the Scourge -- for the glory of the Lich King!',16704,1,0,0,'saurfang SAY_INTRO_HORDE_2'), +(-1631043,'My boy died at the Wrath Gate. I am here only to collect his body.',17097,0,0,0,'overlord SAY_INTRO_HORDE_3'), +(-1631044,'Stubborn and old. What chance do you have? I am stronger, and more powerful than you ever were.',16705,1,0,0,'saurfang SAY_INTRO_HORDE_4'), +(-1631045,'We named him Dranosh. It means "Heart of Draenor" in orcish. I would not let the warlocks take him. My boy would be safe, hidden away by the elders of Garadar.',17098,0,0,0,'overlord SAY_INTRO_HORDE_5'), +(-1631046,'I made a promise to his mother before she died; that I would cross the Dark Portal alone - whether I lived or died, my son would be safe. Untainted...',17099,0,0,0,'overlord SAY_INTRO_HORDE_6'), +(-1631047,'Today, I fulfill that promise.',17100,0,0,0,'overlord SAY_INTRO_HORDE_7'), +(-1631048,'High Overlord Saurfang charges!',17104,2,0,0,'overlord SAY_INTRO_HORDE_8'), +(-1631049,'Pathetic old orc. Come then heroes. Come and face the might of the Scourge!',16706,1,0,0,'saurfang SAY_INTRO_HORDE_9'), +(-1631050,'%s gasps for air',16975,2,0,0,'bronzebeard SAY_OUTRO_ALLY_1'), +(-1631051,'That was Saurfang\'s boy - the Horde commander at the Wrath Gate. Such a tragic end...',16976,0,0,0,'bronzebeard SAY_OUTRO_ALLY_2'), +(-1631052,'What in the... There, in the distance!',16977,0,0,0,'bronzebeard SAY_OUTRO_ALLY_3'), +(-1631053,'Soldiers, fall in! Looks like the Horde are comin\' in to take another shot!',16978,1,0,0,'bronzebeard SAY_OUTRO_ALLY_4'), +(-1631054,'Don\'t force my hand, orc. We can\'t let you pass.',16972,0,0,0,'bronzebeard SAY_OUTRO_ALLY_5'), +(-1631055,'Behind you lies the body of my only son. Nothing will keep me from him.',17094,0,0,0,'overlord SAY_OUTRO_ALLY_6'), +(-1631056,'He... I can\'t do it. Get back on your ship and we\'ll spare your life.',16973,0,0,0,'bronzebeard SAY_OUTRO_ALLY_7'), +(-1631057,'Stand down, Muradin. Let a grieving father pass.',16690,0,0,0,'varian SAY_OUTRO_ALLY_8'), +(-1631058,'No\'ku kil zil\'nok ha tar.',17096,0,1,0,'overlord SAY_OUTRO_ALLY_9'), +(-1631059,'I will not forget this kindess. I thank you, highness.',17095,0,0,0,'overlord SAY_OUTRO_ALLY_10'), +(-1631060,'I... I was not at the Wrathgate. But the soldiers who survived told me much of what happened. Your son fought with honor. He died a hero\'s death. He deserves a hero\'s burial.',16691,0,0,0,'varian SAY_OUTRO_ALLY_11'), +(-1631061,'%s cries.',16651,2,0,0,'proudmore SAY_OUTRO_ALLY_12'), +(-1631062,'Jaina, why are you crying?',16692,0,0,0,'varian SAY_OUTRO_ALLY_13'), +(-1631063,'It was nothing, your majesty. Just... I\'m proud of my king.',16652,0,0,0,'proudmore SAY_OUTRO_ALLY_14'), +(-1631064,'Bah! Muradin, secure the deck and prepare our soldiers for an assault on the upper citadel. I\'ll send out another regiment from Stormwind.',16693,0,0,0,'varian SAY_OUTRO_ALLY_15'), +(-1631065,'Right away, yer majesty!',16979,0,0,0,'bronzebeard SAY_OUTRO_ALLY_16'), +(-1631066,'%s coughs.',17105,2,0,0,'overlord SAY_OUTRO_HORDE_1'), +(-1631067,'%s weeps over the corpse of his son.',17106,2,0,0,'overlord SAY_OUTRO_HORDE_2'), +(-1631068,'You will have a proper ceremony in Nagrand next to the pyres of your mother and ancestors.',17101,0,0,0,'overlord SAY_OUTRO_HORDE_3'), +(-1631069,'Honor, young heroes... no matter how dire the battle... Never forsake it!',17102,0,0,0,'overlord SAY_OUTRO_HORDE_4'), + +(-1631070,'What? Precious? Noooooooooo!!!',16993,6,0,0,'rotface SAY_PRECIOUS_DIES'), +(-1631071,'WEEEEEE!',16986,1,0,0,'rotface SAY_AGGRO'), +(-1631072,'Icky sticky.',16991,1,0,0,'rotface SAY_SLIME_SPRAY'), +(-1631073,'I think I made an angry poo-poo. It gonna blow!',16992,1,0,0,'rotface SAY_OOZE_EXPLODE'), +(-1631074,'Great news, everyone! The slime is flowing again!',17126,1,0,0,'putricide SAY_SLIME_FLOW_1'), +(-1631075,'Good news, everyone! I\'ve fixed the poison slime pipes!',17123,1,0,0,'putricide SAY_SLIME_FLOW_2'), +(-1631076,'Daddy make toys out of you!',16987,1,0,0,'rotface SAY_SLAY_1'), +(-1631077,'I brokes-ded it...',16988,1,0,0,'rotface SAY_SLAY_2'), +(-1631078,'Sleepy Time!',16990,1,0,0,'rotface SAY_BERSERK'), +(-1631079,'Bad news daddy.',16989,1,0,0,'rotface SAY_DEATH'), +(-1631080,'Terrible news, everyone, Rotface is dead! But great news everyone, he left behind plenty of ooze for me to use! Whaa...? I\'m a poet, and I didn\'t know it? Astounding!',17146,6,0,0,'putricide SAY_ROTFACE_DEATH'), + +(-1631081,'NOOOO! You kill Stinky! You pay!',16907,6,0,0,'festergut SAY_STINKY_DIES'), +(-1631082,'Fun time!',16901,1,0,0,'festergut SAY_AGGRO'), +(-1631083,'Just an ordinary gas cloud. But watch out, because that\'s no ordinary gas cloud! ',17119,1,0,0,'putricide SAY_BLIGHT'), +(-1631084,'%s farts.',16911,2,0,0,'festergut SAY_SPORE'), +(-1631085,'Gyah! Uhhh, I not feel so good...',16906,1,0,0,'festergut SAY_PUNGUENT_BLIGHT'), +(-1631086,'%s vomits',0,2,0,0,'festergut SAY_PUNGUENT_BLIGHT_EMOTE'), +(-1631087,'Daddy, I did it',16902,1,0,0,'festergut SAY_SLAY_1'), +(-1631088,'Dead, dead, dead!',16903,1,0,0,'festergut SAY_SLAY_2'), +(-1631089,'Fun time over!',16905,1,0,0,'festergut SAY_BERSERK'), +(-1631090,'Da ... Ddy...',16904,1,0,0,'festergut SAY_DEATH'), +(-1631091,'Oh, Festergut. You were always my favorite. Next to Rotface. The good news is you left behind so much gas, I can practically taste it!',17124,6,0,0,'putricide SAY_FESTERGUT_DEATH'), + +(-1631092,'Good news, everyone! I think I perfected a plague that will destroy all life on Azeroth!',17114,1,0,0,'putricide SAY_AGGRO'), +(-1631093,'You can\'t come in here all dirty like that! You need that nasty flesh scrubbed off first!',17125,1,0,0,'putricide SAY_AIRLOCK'), +(-1631094,'Two oozes, one room! So many delightful possibilities...',17122,1,0,0,'putricide SAY_PHASE_CHANGE'), +(-1631095,'Hmm. I don\'t feel a thing. Whaa...? Where\'d those come from?',17120,1,0,0,'putricide SAY_TRANSFORM_1'), +(-1631096,'Tastes like... Cherry! Oh! Excuse me!',17121,1,0,0,'putricide SAY_TRANSFORM_2'), +(-1631097,'Hmm... Interesting...',17115,1,0,0,'putricide SAY_SLAY_1'), +(-1631098,'That was unexpected!',17116,1,0,0,'putricide SAY_SLAY_2'), +(-1631099,'Great news, everyone!',17118,1,0,0,'putricide SAY_BERSERK'), +(-1631100,'Bad news, everyone! I don\'t think I\'m going to make it',17117,1,0,0,'putricide SAY_DEATH'), + +(-1631101,'Foolish mortals. You thought us defeated so easily? The San\'layn are the Lich King\'s immortal soldiers! Now you shall face their might combined!',16795,6,0,0,'lanathel SAY_COUNCIL_INTRO_1'), +(-1631102,'Rise up, brothers, and destroy our enemies',16796,6,0,0,'lanathel SAY_COUNCIL_INTRO_2'), + +(-1631103,'Such wondrous power! The Darkfallen Orb has made me INVINCIBLE!',16727,1,0,0,'keleseth SAY_KELESETH_INVOCATION'), +(-1631104,'Blood will flow!',16728,1,0,0,'keleseth SAY_KELESETH_SPECIAL'), +(-1631105,'Were you ever a threat?',16723,1,0,0,'keleseth SAY_KELESETH_SLAY_1'), +(-1631106,'Truth is found in death.',16724,1,0,0,'keleseth SAY_SKELESETH_SLAY_2'), +(-1631107,'%s cackles maniacally!',16726,2,0,0,'keleseth SAY_KELESETH_BERSERK'), +(-1631108,'My queen... they come...',16725,1,0,0,'keleseth SAY_KELESETH_DEATH'), + +(-1631109,'Tremble before Taldaram, mortals, for the power of the orb flows through me!',16857,1,0,0,'taldaram SAY_TALDARAM_INVOCATION'), +(-1631110,'Delight in the pain!',16858,1,0,0,'taldaram SAY_TALDARAM_SPECIAL'), +(-1631111,'Worm food.',16853,1,0,0,'taldaram SAY_TALDARAM_SLAY_1'), +(-1631112,'Beg for mercy!',16854,1,0,0,'taldaram SAY_TALDARAM_SLAY_2'), +(-1631113,'%s laughs.',16856,2,0,0,'taldaram SAY_TALDARAM_BERSERK'), +(-1631114,'%s gurgles and dies.',16855,2,0,0,'taldaram SAY_TALDARAM_DEATH'), + +(-1631115,'Naxxanar was merely a setback! With the power of the orb, Valanar will have his vengeance!',16685,1,0,0,'valanar SAY_VALANAR_INVOCATION'), +(-1631116,'My cup runneth over.',16686,1,0,0,'valanar SAY_VALANAR_SPECIAL'), +(-1631117,'Dinner... is served.',16681,1,0,0,'valanar SAY_VALANAR_SLAY_1'), +(-1631118,'Dinner... is served.',16682,1,0,0,'valanar SAY_VALANAR_SLAY_2'), +(-1631119,'BOW DOWN BEFORE THE SAN\'LAYN!',16684,1,0,0,'valanar SAY_VALANAR_BERSERK'), +(-1631120,'...why...?',16683,1,0,0,'valanar SAY_VALANAR_DEATH'), + +(-1631121,'You have made an... unwise... decision.',16782,1,0,0,'blood_queen SAY_AGGRO'), +(-1631122,'Just a taste...',16783,1,0,0,'blood_queen SAY_BITE_1'), +(-1631123,'Know my hunger!',16784,1,0,0,'blood_queen SAY_BITE_2'), +(-1631124,'SUFFER!',16786,1,0,0,'blood_queen SAY_SHADOWS'), +(-1631125,'Can you handle this?',16787,1,0,0,'blood_queen SAY_PACT'), +(-1631126,'Yes... feed my precious one! You\'re mine now!',16790,1,0,0,'blood_queen SAY_MC'), +(-1631127,'Here it comes.',16788,1,0,0,'blood_queen SAY_AIR_PHASE'), +(-1631128,'THIS ENDS NOW!',16793,1,0,0,'blood_queen SAY_BERSERK'), +(-1631129,'But... we were getting along... so well...',16794,1,0,0,'blood_queen SAY_DEATH'), + +(-1631130,'Ready your arms, my Argent Brothers. The Vrykul will protect the Frost Queen with their lives.',16819,1,0,0,'scourgebane SAY_SVALNA_EVENT_1'), +(-1631131,'Even dying here beats spending another day collecting reagents for that madman, Finklestein.',16585,1,0,0,'arnath SAY_SVALNA_EVENT_2'), +(-1631132,'Enough idle banter! Our champions have arrived - support them as we push our way through the hall!',16820,1,0,0,'scourgebane SAY_SVALNA_EVENT_3'), +(-1631133,'You may have once fought beside me, Crok, but now you are nothing more than a traitor. Come, your second death approaches!',17017,1,0,0,'svalna SAY_SVALNA_EVENT_4'), +(-1631134,'Miserable creatures, Die!',17018,1,0,0,'svalna SAY_KILLING_CRUSADERS'), +(-1631135,'Foolish Crok, you brought my reinforcements with you! Arise Argent Champions and serve the Lich King in death!',17019,1,0,0,'svalna SAY_RESSURECT'), +(-1631136,'Come Scourgebane, I\'ll show the Lich King which one of us is truly worthy of the title, champion!',17020,1,0,0,'svalna SAY_SVALNA_AGGRO'), +(-1631137,'What? They died so easily? No matter.',17022,1,0,0,'svalna SAY_KILL_CAPTAIN'), +(-1631138,'What a pitiful choice of an ally Crok.',17021,1,0,0,'svalna SAY_KILL_PLAYER'), +(-1631139,'Perhaps... you were right... Crok, you must not approach the Frost Queen, quickly, stop them!',17023,1,0,0,'svalna SAY_DEATH'), + +(-1631140,'Heroes, lend me your aid! I... I cannot hold them off much longer! You must heal my wounds!',17064,1,0,0,'dreamwalker SAY_AGGRO'), +(-1631141,'I have opened a portal into the Dream. Your salvation lies within, heroes.',17068,1,0,0,'dreamwalker SAY_PORTAL'), +(-1631142,'My strength is returning! Press on, heroes!',17070,1,0,0,'dreamwalker SAY_75_HEALTH'), +(-1631143,'I will not last much longer!',17069,1,0,0,'dreamwalker SAY_25_HEALTH'), +(-1631144,'Forgive me for what I do! I... cannot... stop... ONLY NIGHTMARES REMAIN!',17072,1,0,0,'dreamwalker SAY_0_HEALTH'), +(-1631145,'A tragic loss...',17066,1,0,0,'dreamwalker SAY_PLAYER_DIES'), +(-1631146,'FAILURES!',17067,1,0,0,'dreamwalker SAY_BERSERK'), +(-1631147,'I am renewed! Ysera grants me the favor to lay these foul creatures to rest!',17071,1,0,0,'dreamwalker SAY_VICTORY'), + +(-1631148,'You are fools who have come to this place! The icy winds of Northrend will consume your souls!',17007,1,0,0,'sindragosa SAY_AGGRO'), +(-1631149,'Suffer, mortals, as your pathetic magic betrays you!',17014,1,0,0,'sindragosa SAY_UNCHAINED_MAGIC'), +(-1631150,'Can you feel the cold hand of death upon your heart?',17013,1,0,0,'sindragosa SAY_BLISTERING_COLD'), +(-1631151,'Aaah! It burns! What sorcery is this?!',17015,1,0,0,'sindragosa SAY_RESPIRE'), +(-1631152,'Your incursion ends here! None shall survive!',17012,1,0,0,'sindragosa SAY_TAKEOFF'), +(-1631153,'Now feel my master\'s limitless power and despair!',17016,1,0,0,'sindragosa SAY_PHASE_3'), +(-1631154,'Perish!',17008,1,0,0,'sindragosa SAY_SLAY_1'), +(-1631155,'A flaw of mortality...',17009,1,0,0,'sindragosa SAY_SLAY_2'), +(-1631156,'Enough! I tire of these games!',17011,1,0,0,'sindragosa SAY_BERSERK'), +(-1631157,'Free...at last...',17010,1,0,0,'sindragosa SAY_DEATH'), + +(-1631158,'So...the Light\'s vaunted justice has finally arrived. Shall I lay down Frostmourne and throw myself at your mercy, Fordring?',17349,1,0,0,'lich_king SAY_INTRO_1'), +(-1631159,'We will grant you a swift death, Arthas. More than can be said for the thousands you\'ve tortured and slain.',17390,1,0,0,'tirion SAY_INTRO_2'), +(-1631160,'You will learn of that first hand. When my work is complete, you will beg for mercy -- and I will deny you. Your anguished cries will be testament to my unbridled power.',17350,1,0,0,'lich_king SAY_INTRO_3'), +(-1631161,'So be it. Champions, attack!',17391,1,0,0,'tirion SAY_INTRO_4'), +(-1631162,'I\'ll keep you alive to witness the end, Fordring. I would not want the Light\'s greatest champion to miss seeing this wretched world remade in my image.',17351,1,0,0,'lich_king SAY_INTRO_5'), +(-1631163,'Come then champions, feed me your rage!',17352,1,0,0,'lich_king SAY_AGGRO'), +(-1631164,'I will freeze you from within until all that remains is an icy husk!',17369,1,0,0,'lich_king SAY_REMORSELESS_WINTER'), +(-1631165,'Watch as the world around you collapses!',17370,1,0,0,'lich_king SAY_SHATTER_ARENA'), +(-1631166,'Val\'kyr, your master calls!',17373,1,0,0,'lich_king SAY_SUMMON_VALKYR'), +(-1631167,'Frostmourne hungers...',17366,1,0,0,'lich_king SAY_HARVEST_SOUL'), +(-1631168,'You have come to bring Arthas to justice? To see the Lich King destroyed?',17394,1,0,0,'terenas SAY_FM_TERENAS_AID_1'), +(-1631169,'First, you must escape Frostmourne\'s hold, or be damned as I am; trapped within this cursed blade for all eternity.',17395,1,0,0,'terenas SAY_FM_TERENAS_AID_2'), +(-1631170,'Aid me in destroying these tortured souls! Together we will loosen Frostmourne\'s hold and weaken the Lich King from within!',17396,1,0,0,'terenas SAY_FM_TERENAS_AID_3'), +(-1631171,'Argh... Frostmourne, obey me!',17367,1,0,0,'lich_king SAY_FM_PLAYER_ESCAPE'), +(-1631172,'Frostmourne feeds on the soul of your fallen ally!',17368,1,0,0,'lich_king SAY_FM_PLAYER_DEATH'), +(-1631173,'Apocalypse!',17371,1,0,0,'lich_king SAY_SPECIAL_1'), +(-1631174,'Bow down before your lord and master!',17372,1,0,0,'lich_king SAY_SPECIAL_2'), +(-1631175,'You gnats actually hurt me! Perhaps I\'ve toyed with you long enough, now taste the vengeance of the grave!',17359,1,0,0,'lich_king SAY_LAST_PHASE'), +(-1631176,'Hope wanes!',17363,1,0,0,'lich_king SAY_SLAY_1'), +(-1631177,'The end has come!',17364,1,0,0,'lich_king SAY_SLAY_2'), +(-1631178,'Face now your tragic end!',17365,1,0,0,'lich_king SAY_ENRAGE'), +(-1631179,'No question remains unanswered. No doubts linger. You are Azeroth\'s greatest champions! You overcame every challenge I laid before you. My mightiest servants have fallen before your relentless onslaught, your unbridled fury...',17353,1,0,0,'lich_king SAY_OUTRO_1'), +(-1631180,'Is it truly righteousness that drives you? I wonder',17354,1,0,0,'lich_king SAY_OUTRO_2'), +(-1631181,'You trained them well, Fordring. You delivered the greatest fighting force this world has ever known... right into my hands -- exactly as I intended. You shall be rewarded for your unwitting sacrifice.',17355,1,0,0,'lich_king SAY_OUTRO_3'), +(-1631182,'Watch now as I raise them from the dead to become masters of the Scourge. They will shroud this world in chaos and destruction. Azeroth\'s fall will come at their hands -- and you will be the first to die.',17356,1,0,0,'lich_king SAY_OUTRO_4'), +(-1631183,'I delight in the irony.',17357,1,0,0,'lich_king SAY_OUTRO_5'), +(-1631184,'LIGHT, GRANT ME ONE FINAL BLESSING. GIVE ME THE STRENGTH... TO SHATTER THESE BONDS!',17392,1,0,0,'tirion SAY_OUTRO_6'), +(-1631185,'Impossible...',17358,1,0,0,'lich_king SAY_OUTRO_7'), +(-1631186,'No more, Arthas! No more lives will be consumed by your hatred!',17393,1,0,0,'tirion SAY_OUTRO_8'), +(-1631187,'Free at last! It is over, my son. This is the moment of reckoning.',17397,1,0,0,'terenas SAY_OUTRO_9'), +(-1631188,'Rise up, champions of the Light!',17398,1,0,0,'terenas SAY_OUTRO_10'), +(-1631189,'THE LICH KING...MUST...FALL!',17389,1,0,0,'tirion SAY_OUTRO_11'), +(-1631190,'Now I stand, the lion before the lambs... and they do not fear.',17361,1,0,0,'lich_king SAY_OUTRO_12'), +(-1631191,'They cannot fear.',17362,1,0,0,'lich_king SAY_OUTRO_13'), +(-1631192,'%s dies',17374,2,0,0,'lich_king SAY_OUTRO_14'); -- -1 632 000 ICC: FORGE OF SOULS INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES diff --git a/sql/updates/r2246_scriptdev2.sql b/sql/updates/r2246_scriptdev2.sql new file mode 100644 index 000000000..a8c5c536b --- /dev/null +++ b/sql/updates/r2246_scriptdev2.sql @@ -0,0 +1,208 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1631192 AND -1631001; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1631001,'This is the beginning AND the end, mortals. None may enter the master\'s sanctum!',16950,1,0,0,'marrowgar SAY_INTRO'), +(-1631002,'The Scourge will wash over this world as a swarm of death and destruction!',16941,1,0,0,'marrowgar SAY_AGGRO'), +(-1631003,'BONE STORM!',16946,1,0,0,'marrowgar SAY_BONE_STORM'), +(-1631004,'Bound by bone!',16947,1,0,0,'marrowgar SAY_BONE_SPIKE_1'), +(-1631005,'Stick Around!',16948,1,0,0,'marrowgar SAY_BONE_SPIKE_2'), +(-1631006,'The only escape is death!',16949,1,0,0,'marrowgar SAY_BONE_SPIKE_3'), +(-1631007,'More bones for the offering!',16942,1,0,0,'marrowgar SAY_SLAY_1'), +(-1631008,'Languish in damnation!',16943,1,0,0,'marrowgar SAY_SLAY_2'), +(-1631009,'I see... only darkness...',16944,1,0,0,'marrowgar SAY_DEATH'), +(-1631010,'THE MASTER\'S RAGE COURSES THROUGH ME!',16945,1,0,0,'marrowgar SAY_BERSERK'), + +(-1631011,'You have found your way here, because you are among the few gifted with true vision in a world cursed with blindness.',17272,1,0,0,'deathwhisper SAY_SPEECH_1'), +(-1631012,'You can see through the fog that hangs over this world like a shroud, and grasp where true power lies.',17273,1,0,0,'deathwhisper SAY_SPEECH_2'), +(-1631013,'Fix your eyes upon your crude hands: the sinew, the soft meat, the dark blood coursing within.',16878,1,0,0,'deathwhisper SAY_SPEECH_3'), +(-1631014,'It is a weakness; a crippling flaw.... A joke played by the Creators upon their own creations.',17268,1,0,0,'deathwhisper SAY_SPEECH_4'), +(-1631015,'The sooner you come to accept your condition as a defect, the sooner you will find yourselves in a position to transcend it.',17269,1,0,0,'deathwhisper SAY_SPEECH_5'), +(-1631016,'Through our Master, all things are possible. His power is without limit, and his will unbending.',17270,1,0,0,'deathwhisper SAY_SPEECH_6'), +(-1631017,'Those who oppose him will be destroyed utterly, and those who serve -- who serve wholly, unquestioningly, with utter devotion of mind and soul -- elevated to heights beyond your ken.',17271,1,0,0,'deathwhisper SAY_SPEECH_7'), +(-1631018,'What is this disturbance?! You dare trespass upon this hallowed ground? This shall be your final resting place.',16868,1,0,0,'deathwhisper SAY_AGGRO'), +(-1631019,'Enough! I see I must take matters into my own hands!',16877,1,0,0,'deathwhisper SAY_PHASE_TWO'), +(-1631020,'Take this blessing and show these intruders a taste of our master\'s power.',16873,1,0,0,'deathwhisper SAY_DARK_EMPOWERMENT'), +(-1631021,'I release you from the curse of flesh!',16874,1,0,0,'deathwhisper SAY_DARK_TRANSFORMATION'), +(-1631022,'Arise and exalt in your pure form!',16875,1,0,0,'deathwhisper SAY_ANIMATE_DEAD'), +(-1631023,'You are weak, powerless to resist my will!',16876,1,0,0,'deathwhisper SAY_DOMINATE_MIND'), +(-1631024,'This charade has gone on long enough.',16872,1,0,0,'deathwhisper SAY_BERSERK'), +(-1631025,'All part of the masters plan! Your end is... inevitable!',16871,1,0,0,'deathwhisper SAY_DEATH'), +(-1631026,'Do you yet grasp of the futility of your actions?',16869,1,0,0,'deathwhisper SAY_SLAY_1'), +(-1631027,'Embrace the darkness... Darkness eternal!',16870,1,0,0,'deathwhisper SAY_SLAY_2'), + +(-1631028,'BY THE MIGHT OF THE LICH KING!',16694,1,0,0,'saurfang SAY_AGGRO'), +(-1631029,'The ground runs red with your blood!',16699,1,0,0,'saurfang SAY_FALLENCHAMPION'), +(-1631030,'Feast, my minions!',16700,1,0,0,'saurfang SAY_BLOODBEASTS'), +(-1631031,'You are nothing!',16695,1,0,0,'saurfang SAY_SLAY_1'), +(-1631032,'Your soul will find no redemption here!',16696,1,0,0,'saurfang SAY_SLAY_2'), +(-1631033,'I have become...DEATH!',16698,1,0,0,'saurfang SAY_BERSERK'), +(-1631034,'I... Am... Released.',16697,1,0,0,'saurfang SAY_DEATH'), +(-1631035,'Let\'s get a move on then! Move ou...',16974,1,0,0,'bronzebeard SAY_INTRO_ALLY_0'), +(-1631036,'For every Horde soldier that you killed, for every Alliance dog that fell, the Lich King\'s armies grew. Even now the Val\'kyr work to raise your fallen... As Scourge.',16701,1,0,0,'saurfang SAY_INTRO_ALLY_1'), +(-1631037,'Things are about to get much worse. Come, taste the power that the Lich King has bestowed upon me!',16702,1,0,0,'saurfang SAY_INTRO_ALLY_2'), +(-1631038,'A lone orc, against the might of the Alliance?',16970,1,0,0,'bronzebeard SAY_INTRO_ALLY_3'), +(-1631039,'Charge!',16971,1,0,0,'bronzebeard SAY_INTRO_ALLY_4'), +(-1631040,'Hahahaha! Dwarves...',16703,1,0,0,'saurfang SAY_INTRO_ALLY_5'), +(-1631041,'Kor\'kron, move out! Champions, watch your backs. The Scourge have been..',17103,1,0,0,'overlord SAY_INTRO_HORDE_1'), +(-1631042,'Join me, father. Join me and we will crush this world in the name of the Scourge -- for the glory of the Lich King!',16704,1,0,0,'saurfang SAY_INTRO_HORDE_2'), +(-1631043,'My boy died at the Wrath Gate. I am here only to collect his body.',17097,0,0,0,'overlord SAY_INTRO_HORDE_3'), +(-1631044,'Stubborn and old. What chance do you have? I am stronger, and more powerful than you ever were.',16705,1,0,0,'saurfang SAY_INTRO_HORDE_4'), +(-1631045,'We named him Dranosh. It means "Heart of Draenor" in orcish. I would not let the warlocks take him. My boy would be safe, hidden away by the elders of Garadar.',17098,0,0,0,'overlord SAY_INTRO_HORDE_5'), +(-1631046,'I made a promise to his mother before she died; that I would cross the Dark Portal alone - whether I lived or died, my son would be safe. Untainted...',17099,0,0,0,'overlord SAY_INTRO_HORDE_6'), +(-1631047,'Today, I fulfill that promise.',17100,0,0,0,'overlord SAY_INTRO_HORDE_7'), +(-1631048,'High Overlord Saurfang charges!',17104,2,0,0,'overlord SAY_INTRO_HORDE_8'), +(-1631049,'Pathetic old orc. Come then heroes. Come and face the might of the Scourge!',16706,1,0,0,'saurfang SAY_INTRO_HORDE_9'), +(-1631050,'%s gasps for air',16975,2,0,0,'bronzebeard SAY_OUTRO_ALLY_1'), +(-1631051,'That was Saurfang\'s boy - the Horde commander at the Wrath Gate. Such a tragic end...',16976,0,0,0,'bronzebeard SAY_OUTRO_ALLY_2'), +(-1631052,'What in the... There, in the distance!',16977,0,0,0,'bronzebeard SAY_OUTRO_ALLY_3'), +(-1631053,'Soldiers, fall in! Looks like the Horde are comin\' in to take another shot!',16978,1,0,0,'bronzebeard SAY_OUTRO_ALLY_4'), +(-1631054,'Don\'t force my hand, orc. We can\'t let you pass.',16972,0,0,0,'bronzebeard SAY_OUTRO_ALLY_5'), +(-1631055,'Behind you lies the body of my only son. Nothing will keep me from him.',17094,0,0,0,'overlord SAY_OUTRO_ALLY_6'), +(-1631056,'He... I can\'t do it. Get back on your ship and we\'ll spare your life.',16973,0,0,0,'bronzebeard SAY_OUTRO_ALLY_7'), +(-1631057,'Stand down, Muradin. Let a grieving father pass.',16690,0,0,0,'varian SAY_OUTRO_ALLY_8'), +(-1631058,'No\'ku kil zil\'nok ha tar.',17096,0,1,0,'overlord SAY_OUTRO_ALLY_9'), +(-1631059,'I will not forget this kindess. I thank you, highness.',17095,0,0,0,'overlord SAY_OUTRO_ALLY_10'), +(-1631060,'I... I was not at the Wrathgate. But the soldiers who survived told me much of what happened. Your son fought with honor. He died a hero\'s death. He deserves a hero\'s burial.',16691,0,0,0,'varian SAY_OUTRO_ALLY_11'), +(-1631061,'%s cries.',16651,2,0,0,'proudmore SAY_OUTRO_ALLY_12'), +(-1631062,'Jaina, why are you crying?',16692,0,0,0,'varian SAY_OUTRO_ALLY_13'), +(-1631063,'It was nothing, your majesty. Just... I\'m proud of my king.',16652,0,0,0,'proudmore SAY_OUTRO_ALLY_14'), +(-1631064,'Bah! Muradin, secure the deck and prepare our soldiers for an assault on the upper citadel. I\'ll send out another regiment from Stormwind.',16693,0,0,0,'varian SAY_OUTRO_ALLY_15'), +(-1631065,'Right away, yer majesty!',16979,0,0,0,'bronzebeard SAY_OUTRO_ALLY_16'), +(-1631066,'%s coughs.',17105,2,0,0,'overlord SAY_OUTRO_HORDE_1'), +(-1631067,'%s weeps over the corpse of his son.',17106,2,0,0,'overlord SAY_OUTRO_HORDE_2'), +(-1631068,'You will have a proper ceremony in Nagrand next to the pyres of your mother and ancestors.',17101,0,0,0,'overlord SAY_OUTRO_HORDE_3'), +(-1631069,'Honor, young heroes... no matter how dire the battle... Never forsake it!',17102,0,0,0,'overlord SAY_OUTRO_HORDE_4'), + +(-1631070,'What? Precious? Noooooooooo!!!',16993,6,0,0,'rotface SAY_PRECIOUS_DIES'), +(-1631071,'WEEEEEE!',16986,1,0,0,'rotface SAY_AGGRO'), +(-1631072,'Icky sticky.',16991,1,0,0,'rotface SAY_SLIME_SPRAY'), +(-1631073,'I think I made an angry poo-poo. It gonna blow!',16992,1,0,0,'rotface SAY_OOZE_EXPLODE'), +(-1631074,'Great news, everyone! The slime is flowing again!',17126,1,0,0,'putricide SAY_SLIME_FLOW_1'), +(-1631075,'Good news, everyone! I\'ve fixed the poison slime pipes!',17123,1,0,0,'putricide SAY_SLIME_FLOW_2'), +(-1631076,'Daddy make toys out of you!',16987,1,0,0,'rotface SAY_SLAY_1'), +(-1631077,'I brokes-ded it...',16988,1,0,0,'rotface SAY_SLAY_2'), +(-1631078,'Sleepy Time!',16990,1,0,0,'rotface SAY_BERSERK'), +(-1631079,'Bad news daddy.',16989,1,0,0,'rotface SAY_DEATH'), +(-1631080,'Terrible news, everyone, Rotface is dead! But great news everyone, he left behind plenty of ooze for me to use! Whaa...? I\'m a poet, and I didn\'t know it? Astounding!',17146,6,0,0,'putricide SAY_ROTFACE_DEATH'), + +(-1631081,'NOOOO! You kill Stinky! You pay!',16907,6,0,0,'festergut SAY_STINKY_DIES'), +(-1631082,'Fun time!',16901,1,0,0,'festergut SAY_AGGRO'), +(-1631083,'Just an ordinary gas cloud. But watch out, because that\'s no ordinary gas cloud! ',17119,1,0,0,'putricide SAY_BLIGHT'), +(-1631084,'%s farts.',16911,2,0,0,'festergut SAY_SPORE'), +(-1631085,'Gyah! Uhhh, I not feel so good...',16906,1,0,0,'festergut SAY_PUNGUENT_BLIGHT'), +(-1631086,'%s vomits',0,2,0,0,'festergut SAY_PUNGUENT_BLIGHT_EMOTE'), +(-1631087,'Daddy, I did it',16902,1,0,0,'festergut SAY_SLAY_1'), +(-1631088,'Dead, dead, dead!',16903,1,0,0,'festergut SAY_SLAY_2'), +(-1631089,'Fun time over!',16905,1,0,0,'festergut SAY_BERSERK'), +(-1631090,'Da ... Ddy...',16904,1,0,0,'festergut SAY_DEATH'), +(-1631091,'Oh, Festergut. You were always my favorite. Next to Rotface. The good news is you left behind so much gas, I can practically taste it!',17124,6,0,0,'putricide SAY_FESTERGUT_DEATH'), + +(-1631092,'Good news, everyone! I think I perfected a plague that will destroy all life on Azeroth!',17114,1,0,0,'putricide SAY_AGGRO'), +(-1631093,'You can\'t come in here all dirty like that! You need that nasty flesh scrubbed off first!',17125,1,0,0,'putricide SAY_AIRLOCK'), +(-1631094,'Two oozes, one room! So many delightful possibilities...',17122,1,0,0,'putricide SAY_PHASE_CHANGE'), +(-1631095,'Hmm. I don\'t feel a thing. Whaa...? Where\'d those come from?',17120,1,0,0,'putricide SAY_TRANSFORM_1'), +(-1631096,'Tastes like... Cherry! Oh! Excuse me!',17121,1,0,0,'putricide SAY_TRANSFORM_2'), +(-1631097,'Hmm... Interesting...',17115,1,0,0,'putricide SAY_SLAY_1'), +(-1631098,'That was unexpected!',17116,1,0,0,'putricide SAY_SLAY_2'), +(-1631099,'Great news, everyone!',17118,1,0,0,'putricide SAY_BERSERK'), +(-1631100,'Bad news, everyone! I don\'t think I\'m going to make it',17117,1,0,0,'putricide SAY_DEATH'), + +(-1631101,'Foolish mortals. You thought us defeated so easily? The San\'layn are the Lich King\'s immortal soldiers! Now you shall face their might combined!',16795,6,0,0,'lanathel SAY_COUNCIL_INTRO_1'), +(-1631102,'Rise up, brothers, and destroy our enemies',16796,6,0,0,'lanathel SAY_COUNCIL_INTRO_2'), + +(-1631103,'Such wondrous power! The Darkfallen Orb has made me INVINCIBLE!',16727,1,0,0,'keleseth SAY_KELESETH_INVOCATION'), +(-1631104,'Blood will flow!',16728,1,0,0,'keleseth SAY_KELESETH_SPECIAL'), +(-1631105,'Were you ever a threat?',16723,1,0,0,'keleseth SAY_KELESETH_SLAY_1'), +(-1631106,'Truth is found in death.',16724,1,0,0,'keleseth SAY_SKELESETH_SLAY_2'), +(-1631107,'%s cackles maniacally!',16726,2,0,0,'keleseth SAY_KELESETH_BERSERK'), +(-1631108,'My queen... they come...',16725,1,0,0,'keleseth SAY_KELESETH_DEATH'), + +(-1631109,'Tremble before Taldaram, mortals, for the power of the orb flows through me!',16857,1,0,0,'taldaram SAY_TALDARAM_INVOCATION'), +(-1631110,'Delight in the pain!',16858,1,0,0,'taldaram SAY_TALDARAM_SPECIAL'), +(-1631111,'Worm food.',16853,1,0,0,'taldaram SAY_TALDARAM_SLAY_1'), +(-1631112,'Beg for mercy!',16854,1,0,0,'taldaram SAY_TALDARAM_SLAY_2'), +(-1631113,'%s laughs.',16856,2,0,0,'taldaram SAY_TALDARAM_BERSERK'), +(-1631114,'%s gurgles and dies.',16855,2,0,0,'taldaram SAY_TALDARAM_DEATH'), + +(-1631115,'Naxxanar was merely a setback! With the power of the orb, Valanar will have his vengeance!',16685,1,0,0,'valanar SAY_VALANAR_INVOCATION'), +(-1631116,'My cup runneth over.',16686,1,0,0,'valanar SAY_VALANAR_SPECIAL'), +(-1631117,'Dinner... is served.',16681,1,0,0,'valanar SAY_VALANAR_SLAY_1'), +(-1631118,'Dinner... is served.',16682,1,0,0,'valanar SAY_VALANAR_SLAY_2'), +(-1631119,'BOW DOWN BEFORE THE SAN\'LAYN!',16684,1,0,0,'valanar SAY_VALANAR_BERSERK'), +(-1631120,'...why...?',16683,1,0,0,'valanar SAY_VALANAR_DEATH'), + +(-1631121,'You have made an... unwise... decision.',16782,1,0,0,'blood_queen SAY_AGGRO'), +(-1631122,'Just a taste...',16783,1,0,0,'blood_queen SAY_BITE_1'), +(-1631123,'Know my hunger!',16784,1,0,0,'blood_queen SAY_BITE_2'), +(-1631124,'SUFFER!',16786,1,0,0,'blood_queen SAY_SHADOWS'), +(-1631125,'Can you handle this?',16787,1,0,0,'blood_queen SAY_PACT'), +(-1631126,'Yes... feed my precious one! You\'re mine now!',16790,1,0,0,'blood_queen SAY_MC'), +(-1631127,'Here it comes.',16788,1,0,0,'blood_queen SAY_AIR_PHASE'), +(-1631128,'THIS ENDS NOW!',16793,1,0,0,'blood_queen SAY_BERSERK'), +(-1631129,'But... we were getting along... so well...',16794,1,0,0,'blood_queen SAY_DEATH'), + +(-1631130,'Ready your arms, my Argent Brothers. The Vrykul will protect the Frost Queen with their lives.',16819,1,0,0,'scourgebane SAY_SVALNA_EVENT_1'), +(-1631131,'Even dying here beats spending another day collecting reagents for that madman, Finklestein.',16585,1,0,0,'arnath SAY_SVALNA_EVENT_2'), +(-1631132,'Enough idle banter! Our champions have arrived - support them as we push our way through the hall!',16820,1,0,0,'scourgebane SAY_SVALNA_EVENT_3'), +(-1631133,'You may have once fought beside me, Crok, but now you are nothing more than a traitor. Come, your second death approaches!',17017,1,0,0,'svalna SAY_SVALNA_EVENT_4'), +(-1631134,'Miserable creatures, Die!',17018,1,0,0,'svalna SAY_KILLING_CRUSADERS'), +(-1631135,'Foolish Crok, you brought my reinforcements with you! Arise Argent Champions and serve the Lich King in death!',17019,1,0,0,'svalna SAY_RESSURECT'), +(-1631136,'Come Scourgebane, I\'ll show the Lich King which one of us is truly worthy of the title, champion!',17020,1,0,0,'svalna SAY_SVALNA_AGGRO'), +(-1631137,'What? They died so easily? No matter.',17022,1,0,0,'svalna SAY_KILL_CAPTAIN'), +(-1631138,'What a pitiful choice of an ally Crok.',17021,1,0,0,'svalna SAY_KILL_PLAYER'), +(-1631139,'Perhaps... you were right... Crok, you must not approach the Frost Queen, quickly, stop them!',17023,1,0,0,'svalna SAY_DEATH'), + +(-1631140,'Heroes, lend me your aid! I... I cannot hold them off much longer! You must heal my wounds!',17064,1,0,0,'dreamwalker SAY_AGGRO'), +(-1631141,'I have opened a portal into the Dream. Your salvation lies within, heroes.',17068,1,0,0,'dreamwalker SAY_PORTAL'), +(-1631142,'My strength is returning! Press on, heroes!',17070,1,0,0,'dreamwalker SAY_75_HEALTH'), +(-1631143,'I will not last much longer!',17069,1,0,0,'dreamwalker SAY_25_HEALTH'), +(-1631144,'Forgive me for what I do! I... cannot... stop... ONLY NIGHTMARES REMAIN!',17072,1,0,0,'dreamwalker SAY_0_HEALTH'), +(-1631145,'A tragic loss...',17066,1,0,0,'dreamwalker SAY_PLAYER_DIES'), +(-1631146,'FAILURES!',17067,1,0,0,'dreamwalker SAY_BERSERK'), +(-1631147,'I am renewed! Ysera grants me the favor to lay these foul creatures to rest!',17071,1,0,0,'dreamwalker SAY_VICTORY'), + +(-1631148,'You are fools who have come to this place! The icy winds of Northrend will consume your souls!',17007,1,0,0,'sindragosa SAY_AGGRO'), +(-1631149,'Suffer, mortals, as your pathetic magic betrays you!',17014,1,0,0,'sindragosa SAY_UNCHAINED_MAGIC'), +(-1631150,'Can you feel the cold hand of death upon your heart?',17013,1,0,0,'sindragosa SAY_BLISTERING_COLD'), +(-1631151,'Aaah! It burns! What sorcery is this?!',17015,1,0,0,'sindragosa SAY_RESPIRE'), +(-1631152,'Your incursion ends here! None shall survive!',17012,1,0,0,'sindragosa SAY_TAKEOFF'), +(-1631153,'Now feel my master\'s limitless power and despair!',17016,1,0,0,'sindragosa SAY_PHASE_3'), +(-1631154,'Perish!',17008,1,0,0,'sindragosa SAY_SLAY_1'), +(-1631155,'A flaw of mortality...',17009,1,0,0,'sindragosa SAY_SLAY_2'), +(-1631156,'Enough! I tire of these games!',17011,1,0,0,'sindragosa SAY_BERSERK'), +(-1631157,'Free...at last...',17010,1,0,0,'sindragosa SAY_DEATH'), + +(-1631158,'So...the Light\'s vaunted justice has finally arrived. Shall I lay down Frostmourne and throw myself at your mercy, Fordring?',17349,1,0,0,'lich_king SAY_INTRO_1'), +(-1631159,'We will grant you a swift death, Arthas. More than can be said for the thousands you\'ve tortured and slain.',17390,1,0,0,'tirion SAY_INTRO_2'), +(-1631160,'You will learn of that first hand. When my work is complete, you will beg for mercy -- and I will deny you. Your anguished cries will be testament to my unbridled power.',17350,1,0,0,'lich_king SAY_INTRO_3'), +(-1631161,'So be it. Champions, attack!',17391,1,0,0,'tirion SAY_INTRO_4'), +(-1631162,'I\'ll keep you alive to witness the end, Fordring. I would not want the Light\'s greatest champion to miss seeing this wretched world remade in my image.',17351,1,0,0,'lich_king SAY_INTRO_5'), +(-1631163,'Come then champions, feed me your rage!',17352,1,0,0,'lich_king SAY_AGGRO'), +(-1631164,'I will freeze you from within until all that remains is an icy husk!',17369,1,0,0,'lich_king SAY_REMORSELESS_WINTER'), +(-1631165,'Watch as the world around you collapses!',17370,1,0,0,'lich_king SAY_SHATTER_ARENA'), +(-1631166,'Val\'kyr, your master calls!',17373,1,0,0,'lich_king SAY_SUMMON_VALKYR'), +(-1631167,'Frostmourne hungers...',17366,1,0,0,'lich_king SAY_HARVEST_SOUL'), +(-1631168,'You have come to bring Arthas to justice? To see the Lich King destroyed?',17394,1,0,0,'terenas SAY_FM_TERENAS_AID_1'), +(-1631169,'First, you must escape Frostmourne\'s hold, or be damned as I am; trapped within this cursed blade for all eternity.',17395,1,0,0,'terenas SAY_FM_TERENAS_AID_2'), +(-1631170,'Aid me in destroying these tortured souls! Together we will loosen Frostmourne\'s hold and weaken the Lich King from within!',17396,1,0,0,'terenas SAY_FM_TERENAS_AID_3'), +(-1631171,'Argh... Frostmourne, obey me!',17367,1,0,0,'lich_king SAY_FM_PLAYER_ESCAPE'), +(-1631172,'Frostmourne feeds on the soul of your fallen ally!',17368,1,0,0,'lich_king SAY_FM_PLAYER_DEATH'), +(-1631173,'Apocalypse!',17371,1,0,0,'lich_king SAY_SPECIAL_1'), +(-1631174,'Bow down before your lord and master!',17372,1,0,0,'lich_king SAY_SPECIAL_2'), +(-1631175,'You gnats actually hurt me! Perhaps I\'ve toyed with you long enough, now taste the vengeance of the grave!',17359,1,0,0,'lich_king SAY_LAST_PHASE'), +(-1631176,'Hope wanes!',17363,1,0,0,'lich_king SAY_SLAY_1'), +(-1631177,'The end has come!',17364,1,0,0,'lich_king SAY_SLAY_2'), +(-1631178,'Face now your tragic end!',17365,1,0,0,'lich_king SAY_ENRAGE'), +(-1631179,'No question remains unanswered. No doubts linger. You are Azeroth\'s greatest champions! You overcame every challenge I laid before you. My mightiest servants have fallen before your relentless onslaught, your unbridled fury...',17353,1,0,0,'lich_king SAY_OUTRO_1'), +(-1631180,'Is it truly righteousness that drives you? I wonder',17354,1,0,0,'lich_king SAY_OUTRO_2'), +(-1631181,'You trained them well, Fordring. You delivered the greatest fighting force this world has ever known... right into my hands -- exactly as I intended. You shall be rewarded for your unwitting sacrifice.',17355,1,0,0,'lich_king SAY_OUTRO_3'), +(-1631182,'Watch now as I raise them from the dead to become masters of the Scourge. They will shroud this world in chaos and destruction. Azeroth\'s fall will come at their hands -- and you will be the first to die.',17356,1,0,0,'lich_king SAY_OUTRO_4'), +(-1631183,'I delight in the irony.',17357,1,0,0,'lich_king SAY_OUTRO_5'), +(-1631184,'LIGHT, GRANT ME ONE FINAL BLESSING. GIVE ME THE STRENGTH... TO SHATTER THESE BONDS!',17392,1,0,0,'tirion SAY_OUTRO_6'), +(-1631185,'Impossible...',17358,1,0,0,'lich_king SAY_OUTRO_7'), +(-1631186,'No more, Arthas! No more lives will be consumed by your hatred!',17393,1,0,0,'tirion SAY_OUTRO_8'), +(-1631187,'Free at last! It is over, my son. This is the moment of reckoning.',17397,1,0,0,'terenas SAY_OUTRO_9'), +(-1631188,'Rise up, champions of the Light!',17398,1,0,0,'terenas SAY_OUTRO_10'), +(-1631189,'THE LICH KING...MUST...FALL!',17389,1,0,0,'tirion SAY_OUTRO_11'), +(-1631190,'Now I stand, the lion before the lambs... and they do not fear.',17361,1,0,0,'lich_king SAY_OUTRO_12'), +(-1631191,'They cannot fear.',17362,1,0,0,'lich_king SAY_OUTRO_13'), +(-1631192,'%s dies',17374,2,0,0,'lich_king SAY_OUTRO_14'); From f12b20682c6ecf0b298f10652b17506d169f57a8 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Fri, 15 Jul 2011 19:55:01 +0200 Subject: [PATCH 0227/1172] [2247] Add texts for Malygos --- .../nexus/eye_of_eternity/boss_malygos.cpp | 40 +++++++++++++++++++ sd2_revision_nr.h | 2 +- sql/scriptdev2_script_full.sql | 36 +++++++++++++++++ sql/updates/r2247_scriptdev2.sql | 37 +++++++++++++++++ 4 files changed, 114 insertions(+), 1 deletion(-) create mode 100644 sql/updates/r2247_scriptdev2.sql diff --git a/scripts/northrend/nexus/eye_of_eternity/boss_malygos.cpp b/scripts/northrend/nexus/eye_of_eternity/boss_malygos.cpp index be7fe7f28..00790bf7a 100644 --- a/scripts/northrend/nexus/eye_of_eternity/boss_malygos.cpp +++ b/scripts/northrend/nexus/eye_of_eternity/boss_malygos.cpp @@ -23,6 +23,46 @@ EndScriptData */ #include "precompiled.h" +enum +{ + SAY_INTRO_1 = -1616000, + SAY_INTRO_2 = -1616001, + SAY_INTRO_3 = -1616002, + SAY_INTRO_4 = -1616003, + SAY_INTRO_5 = -1616004, + SAY_AGGRO = -1616005, + SAY_VORTEX = -1616006, + SAY_SPARK_BUFF = -1616007, + SAY_SLAY_1_A = -1616008, + SAY_SLAY_1_B = -1616009, + SAY_SLAY_1_C = -1616010, + SAY_END_PHASE_1 = -1616011, + SAY_START_PHASE_2 = -1616012, + SAY_DEEP_BREATH = -1616013, + SAY_SHELL = -1616014, + SAY_SLAY_2_A = -1616015, + SAY_SLAY_2_B = -1616016, + SAY_SLAY_2_C = -1616017, + SAY_END_PHASE_2 = -1616018, + SAY_INTRO_PHASE_3 = -1616019, + SAY_START_PHASE_3 = -1616020, + SAY_SLAY_3_A = -1616021, + SAY_SLAY_3_B = -1616022, + SAY_SLAY_3_C = -1616023, + SAY_SURGE = -1616024, + SAY_SPELL_1 = -1616025, + SAY_SPELL_2 = -1616026, + SAY_SPELL_3 = -1616027, + SAY_DEATH = -1616028, + SAY_OUTRO_1 = -1616029, + SAY_OUTRO_2 = -1616030, + SAY_OUTRO_3 = -1616031, + SAY_OUTRO_4 = -1616032, + + SAY_EMOTE_SPARK = -1616033, + SAY_EMOTE_BREATH = -1616034, +}; + void AddSC_boss_malygos() { } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index fcfa2b427..68c481c5b 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2246" + #define SD2_REVISION_NR "2247" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index a88d5b3de..d38eeadac 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -3289,6 +3289,42 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1615042,'%s begins to open a Twilight Portal!',0,5,0,0,'sartharion drake WHISPER_OPEN_PORTAL'); -- -1 616 000 EYE OF ETERNITY +INSERT INTO script_texts (entry,content_default,sound,type,LANGUAGE,emote,comment) VALUES +(-1616000,'Lesser beings, intruding here! A shame that your excess courage does not compensate for your stupidity!',14512,1,0,0,'malygos SAY_INTRO_1'), +(-1616001,'None but the blue dragonflight are welcome here! Perhaps this is the work of Alexstrasza? Well then, she has sent you to your deaths.',14513,1,0,0,'malygos SAY_INTRO_2'), +(-1616002,'What could you hope to accomplish, to storm brazenly into my domain? To employ MAGIC? Against ME? ',14514,1,0,0,'malygos SAY_INTRO_3'), +(-1616003,'I am without limits here... the rules of your cherished reality do not apply... In this realm, I am in control...',14515,1,0,0,'malygos SAY_INTRO_4'), +(-1616004,'I give you one chance. Pledge fealty to me, and perhaps I won''t slaughter you for your insolence!',14516,1,0,0,'malygos SAY_INTRO_5'), +(-1616005,'My patience has reached its limit, I WILL BE RID OF YOU!',14517,1,0,0,'malygos SAY_AGGRO'), +(-1616006,'Watch helplessly as your hopes are swept away...',14525,1,0,0,'malygos SAY_VORTEX'), +(-1616007,'I AM UNSTOPPABLE!',14533,1,0,0,'malygos SAY_SPARK_BUFF'), +(-1616008,'Your stupidity has finally caught up to you!',14519,1,0,0,'malygos SAY_SLAY_1_A'), +(-1616009,'More artifacts to confiscate...',14520,1,0,0,'malygos SAY_SLAY_1_B'), +(-1616010,' How very... naive...',14521,1,0,0,'malygos SAY_SLAY_1_C'), +(-1616011,'I had hoped to end your lives quickly, but you have proven more...resilient then I had anticipated. Nonetheless, your efforts are in vain, it is you reckless, careless mortals who are to blame for this war! I do what I must...And if it means your...extinction...THEN SO BE IT!',14522,1,0,0,'malygos SAY_END_PHASE_1'), +(-1616012,'Few have experienced the pain I will now inflict upon you!',14523,1,0,0,'malygos SAY_START_PHASE_2'), +(-1616013,'YOU WILL NOT SUCCEED WHILE I DRAW BREATH!',14518,1,0,0,'malygos SAY_DEEP_BREATH'), +(-1616014,'I will teach you IGNORANT children just how little you know of magic...',14524,1,0,0,'malygos SAY_SHELL'), +(-1616015,'Your energy will be put to good use!',14526,1,0,0,'malygos SAY_SLAY_2_A'), +(-1616016,'I am the spell-weaver! My power is infinite!',14527,1,0,0,'malygos SAY_SLAY_2_B'), +(-1616017,'Your spirit will linger here forever!',14528,1,0,0, 'malygos SAY_SLAY_2_C'), +(-1616018,'ENOUGH! If you intend to reclaim Azeroth\'s magic, then you shall have it...',14529,1,0,0,'malygos SAY_END_PHASE_2'), +(-1616019,'Now your benefactors make their appearance...But they are too late. The powers contained here are sufficient to destroy the world ten times over! What do you think they will do to you?',14530,1,0,0,'malygos SAY_INTRO_PHASE_3'), +(-1616020,'SUBMIT!',14531,1,0,0,'malygos SAY_START_PHASE_3'), +(-1616021,'Alexstrasza! Another of your brood falls!',14534,1,0,0,'malygos SAY_SLAY_3_A'), +(-1616022,'Little more then gnats!',14535,1,0,0,'malygos SAY_SLAY_3_B'), +(-1616023,'Your red allies will share your fate...',14536,1,0,1,'malygos SAY_SLAY_3_C'), +(-1616024,'The powers at work here exceed anything you could possibly imagine!',14532,1,0,0,'malygos SAY_SURGE'), +(-1616025,'Still standing? Not for long...',14537,1,0,0,'malygos SAY_SPELL_1'), +(-1616026,'Your cause is lost!',14538,1,0,0,'malygos SAY_SPELL_2'), +(-1616027,'Your fragile mind will be shattered!',14539,1,0,0,'malygos SAY_SPELL_3'), +(-1616028,'UNTHINKABLE! The mortals will destroy... e-everything... my sister... what have you-',14540,1,0,0,'malygos SAY_DEATH'), +(-1616029,'I did what I had to, brother. You gave me no alternative.',14406,1,0,1,'alextrasza SAY_OUTRO_1'), +(-1616030,'And so ends the Nexus War.',14407,1,0,1,'alextrasza SAY_OUTRO_2'), +(-1616031,'This resolution pains me deeply, but the destruction, the monumental loss of life had to end. Regardless of Malygos\' recent transgressions, I will mourn his loss. He was once a guardian, a protector. This day, one of the world\'s mightiest has fallen.',14408,1,0,1,'alextrasza SAY_OUTRO_3'), +(-1616032,'The red dragonflight will take on the burden of mending the devastation wrought on Azeroth. Return home to your people and rest. Tomorrow will bring you new challenges, and you must be ready to face them. Life...goes on.',14409,1,0,1,'alextrasza SAY_OUTRO_4'), +(-1616033,'A Power Spark forms from a nearby rift!',0,3,0,0,'malygos SAY_EMOTE_SPARK'), +(-1616034,'%s takes a deep breath...',0,3,0,0,'malygos SAY_EMOTE_BREATH'); -- -1 619 000 AHN'KAHET INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES diff --git a/sql/updates/r2247_scriptdev2.sql b/sql/updates/r2247_scriptdev2.sql new file mode 100644 index 000000000..372e84ba6 --- /dev/null +++ b/sql/updates/r2247_scriptdev2.sql @@ -0,0 +1,37 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1616034 AND -1616000; +INSERT INTO script_texts (entry,content_default,sound,type,LANGUAGE,emote,comment) VALUES +(-1616000,'Lesser beings, intruding here! A shame that your excess courage does not compensate for your stupidity!',14512,1,0,0,'malygos SAY_INTRO_1'), +(-1616001,'None but the blue dragonflight are welcome here! Perhaps this is the work of Alexstrasza? Well then, she has sent you to your deaths.',14513,1,0,0,'malygos SAY_INTRO_2'), +(-1616002,'What could you hope to accomplish, to storm brazenly into my domain? To employ MAGIC? Against ME? ',14514,1,0,0,'malygos SAY_INTRO_3'), +(-1616003,'I am without limits here... the rules of your cherished reality do not apply... In this realm, I am in control...',14515,1,0,0,'malygos SAY_INTRO_4'), +(-1616004,'I give you one chance. Pledge fealty to me, and perhaps I won''t slaughter you for your insolence!',14516,1,0,0,'malygos SAY_INTRO_5'), +(-1616005,'My patience has reached its limit, I WILL BE RID OF YOU!',14517,1,0,0,'malygos SAY_AGGRO'), +(-1616006,'Watch helplessly as your hopes are swept away...',14525,1,0,0,'malygos SAY_VORTEX'), +(-1616007,'I AM UNSTOPPABLE!',14533,1,0,0,'malygos SAY_SPARK_BUFF'), +(-1616008,'Your stupidity has finally caught up to you!',14519,1,0,0,'malygos SAY_SLAY_1_A'), +(-1616009,'More artifacts to confiscate...',14520,1,0,0,'malygos SAY_SLAY_1_B'), +(-1616010,' How very... naive...',14521,1,0,0,'malygos SAY_SLAY_1_C'), +(-1616011,'I had hoped to end your lives quickly, but you have proven more...resilient then I had anticipated. Nonetheless, your efforts are in vain, it is you reckless, careless mortals who are to blame for this war! I do what I must...And if it means your...extinction...THEN SO BE IT!',14522,1,0,0,'malygos SAY_END_PHASE_1'), +(-1616012,'Few have experienced the pain I will now inflict upon you!',14523,1,0,0,'malygos SAY_START_PHASE_2'), +(-1616013,'YOU WILL NOT SUCCEED WHILE I DRAW BREATH!',14518,1,0,0,'malygos SAY_DEEP_BREATH'), +(-1616014,'I will teach you IGNORANT children just how little you know of magic...',14524,1,0,0,'malygos SAY_SHELL'), +(-1616015,'Your energy will be put to good use!',14526,1,0,0,'malygos SAY_SLAY_2_A'), +(-1616016,'I am the spell-weaver! My power is infinite!',14527,1,0,0,'malygos SAY_SLAY_2_B'), +(-1616017,'Your spirit will linger here forever!',14528,1,0,0, 'malygos SAY_SLAY_2_C'), +(-1616018,'ENOUGH! If you intend to reclaim Azeroth\'s magic, then you shall have it...',14529,1,0,0,'malygos SAY_END_PHASE_2'), +(-1616019,'Now your benefactors make their appearance...But they are too late. The powers contained here are sufficient to destroy the world ten times over! What do you think they will do to you?',14530,1,0,0,'malygos SAY_INTRO_PHASE_3'), +(-1616020,'SUBMIT!',14531,1,0,0,'malygos SAY_START_PHASE_3'), +(-1616021,'Alexstrasza! Another of your brood falls!',14534,1,0,0,'malygos SAY_SLAY_3_A'), +(-1616022,'Little more then gnats!',14535,1,0,0,'malygos SAY_SLAY_3_B'), +(-1616023,'Your red allies will share your fate...',14536,1,0,1,'malygos SAY_SLAY_3_C'), +(-1616024,'The powers at work here exceed anything you could possibly imagine!',14532,1,0,0,'malygos SAY_SURGE'), +(-1616025,'Still standing? Not for long...',14537,1,0,0,'malygos SAY_SPELL_1'), +(-1616026,'Your cause is lost!',14538,1,0,0,'malygos SAY_SPELL_2'), +(-1616027,'Your fragile mind will be shattered!',14539,1,0,0,'malygos SAY_SPELL_3'), +(-1616028,'UNTHINKABLE! The mortals will destroy... e-everything... my sister... what have you-',14540,1,0,0,'malygos SAY_DEATH'), +(-1616029,'I did what I had to, brother. You gave me no alternative.',14406,1,0,1,'alextrasza SAY_OUTRO_1'), +(-1616030,'And so ends the Nexus War.',14407,1,0,1,'alextrasza SAY_OUTRO_2'), +(-1616031,'This resolution pains me deeply, but the destruction, the monumental loss of life had to end. Regardless of Malygos\' recent transgressions, I will mourn his loss. He was once a guardian, a protector. This day, one of the world\'s mightiest has fallen.',14408,1,0,1,'alextrasza SAY_OUTRO_3'), +(-1616032,'The red dragonflight will take on the burden of mending the devastation wrought on Azeroth. Return home to your people and rest. Tomorrow will bring you new challenges, and you must be ready to face them. Life...goes on.',14409,1,0,1,'alextrasza SAY_OUTRO_4'), +(-1616033,'A Power Spark forms from a nearby rift!',0,3,0,0,'malygos SAY_EMOTE_SPARK'), +(-1616034,'%s takes a deep breath...',0,3,0,0,'malygos SAY_EMOTE_BREATH'); From 07af2a71dceadcb1daebd8a6142176ce837c0ad2 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Mon, 18 Jul 2011 14:14:16 +0200 Subject: [PATCH 0228/1172] [2248] Add Sapphiron outro dialogue * Add possibility to simulate texts with dialogue helper * Fix taunts after killing wing-bosses to be displayed shortly after the boss got killed Note at translators/ backporting: The texts and soundIds(LK) for the sapphi dialogue have changed with wotlk --- include/sc_instance.cpp | 20 ++++++--- include/sc_instance.h | 3 +- .../northrend/naxxramas/boss_kelthuzad.cpp | 28 ++++++------- .../naxxramas/instance_naxxramas.cpp | 42 +++++++++++++++++-- scripts/northrend/naxxramas/naxxramas.h | 17 +++++++- sd2_revision_nr.h | 2 +- sql/scriptdev2_script_full.sql | 10 ++--- sql/updates/r2248_scriptdev2.sql | 5 +++ 8 files changed, 95 insertions(+), 32 deletions(-) create mode 100644 sql/updates/r2248_scriptdev2.sql diff --git a/include/sc_instance.cpp b/include/sc_instance.cpp index d9b97d64c..9db67e653 100644 --- a/include/sc_instance.cpp +++ b/include/sc_instance.cpp @@ -176,6 +176,7 @@ DialogueHelper::DialogueHelper(DialogueEntry const* pDialogueArray) : m_pCurrentEntry(NULL), m_pCurrentEntryTwoSide(NULL), m_uiTimer(0), + m_bCanSimulate(false), m_bIsFirstSide(true) {} @@ -191,6 +192,7 @@ DialogueHelper::DialogueHelper(DialogueEntryTwoSide const* pDialogueTwoSideArray m_pCurrentEntry(NULL), m_pCurrentEntryTwoSide(NULL), m_uiTimer(0), + m_bCanSimulate(false), m_bIsFirstSide(true) {} @@ -268,13 +270,19 @@ void DialogueHelper::DoNextDialogueStep() m_uiTimer = m_pCurrentEntryTwoSide->uiTimer; } - // Get Speaker - Creature* pSpeaker = NULL; - if (m_pInstance && uiSpeakerEntry) - pSpeaker = m_pInstance->GetSingleCreatureFromStorage(uiSpeakerEntry); + // Simulate Case + if (m_bCanSimulate && m_pInstance && uiSpeakerEntry && iTextEntry < 0) + m_pInstance->DoOrSimulateScriptTextForThisInstance(iTextEntry, uiSpeakerEntry); + else + { + // Get Speaker + Creature* pSpeaker = NULL; + if (m_pInstance && uiSpeakerEntry) + pSpeaker = m_pInstance->GetSingleCreatureFromStorage(uiSpeakerEntry); - if (pSpeaker && iTextEntry < 0) - DoScriptText(iTextEntry, pSpeaker); + if (pSpeaker && iTextEntry < 0) + DoScriptText(iTextEntry, pSpeaker); + } JustDidDialogueStep(m_pDialogueArray ? m_pCurrentEntry->iTextEntry : m_pCurrentEntryTwoSide->iTextEntry); diff --git a/include/sc_instance.h b/include/sc_instance.h index 5d16e5574..10eb8930b 100644 --- a/include/sc_instance.h +++ b/include/sc_instance.h @@ -91,7 +91,7 @@ class DialogueHelper DialogueHelper(DialogueEntryTwoSide const* aDialogueTwoSide); /// Function that MUST be called - void InitializeDialogueHelper(ScriptedInstance* pInstance) { m_pInstance = pInstance; } + void InitializeDialogueHelper(ScriptedInstance* pInstance, bool bCanSimulateText = false) { m_pInstance = pInstance; m_bCanSimulate = bCanSimulateText; } /// Set if take first entries or second entries void SetDialogueSide(bool bIsFirstSide) { m_bIsFirstSide = bIsFirstSide; } @@ -114,6 +114,7 @@ class DialogueHelper uint32 m_uiTimer; bool m_bIsFirstSide; + bool m_bCanSimulate; }; #endif diff --git a/scripts/northrend/naxxramas/boss_kelthuzad.cpp b/scripts/northrend/naxxramas/boss_kelthuzad.cpp index 1a746a154..738db938a 100644 --- a/scripts/northrend/naxxramas/boss_kelthuzad.cpp +++ b/scripts/northrend/naxxramas/boss_kelthuzad.cpp @@ -30,16 +30,6 @@ EndScriptData */ enum { - //when shappiron dies. dialog between kel and lich king (in this order) - SAY_SAPP_DIALOG1 = -1533084, - SAY_SAPP_DIALOG2_LICH = -1533085, - SAY_SAPP_DIALOG3 = -1533086, - SAY_SAPP_DIALOG4_LICH = -1533087, - SAY_SAPP_DIALOG5 = -1533088, - - //when cat dies - SAY_CAT_DIED = -1533089, - SAY_SUMMON_MINIONS = -1533105, //start of phase 1 EMOTE_PHASE2 = -1533135, //start of phase 2 @@ -115,6 +105,7 @@ struct MANGOS_DLL_DECL boss_kelthuzadAI : public ScriptedAI uint32 m_uiGuardiansCount; uint32 m_uiGuardiansCountMax; uint32 m_uiGuardiansTimer; + uint32 m_uiLichKingAnswerTimer; uint32 m_uiFrostBoltTimer; uint32 m_uiFrostBoltNovaTimer; uint32 m_uiChainsTimer; @@ -146,6 +137,7 @@ struct MANGOS_DLL_DECL boss_kelthuzadAI : public ScriptedAI m_uiShadowFissureTimer = 25000; //25 seconds m_uiFrostBlastTimer = urand(30000, 60000); //Random time between 30-60 seconds m_uiGuardiansTimer = 5000; //5 seconds for summoning each Guardian of Icecrown in phase 3 + m_uiLichKingAnswerTimer = 4000; m_uiGuardiansCount = 0; m_uiSummonIntroTimer = 0; m_uiIntroPackCount = 0; @@ -539,10 +531,6 @@ struct MANGOS_DLL_DECL boss_kelthuzadAI : public ScriptedAI { m_uiPhase = PHASE_GUARDIANS; DoScriptText(SAY_REQUEST_AID, m_creature); - - // here Lich King should respond to Kel'Thuzad but I don't know which creature to make talk - // so for now just make Kel'Thuzad says it. - DoScriptText(SAY_ANSWER_REQUEST, m_creature); } } else if (m_uiPhase == PHASE_GUARDIANS && m_uiGuardiansCount < m_uiGuardiansCountMax) @@ -555,6 +543,18 @@ struct MANGOS_DLL_DECL boss_kelthuzadAI : public ScriptedAI } else m_uiGuardiansTimer -= uiDiff; + + if (m_uiLichKingAnswerTimer && m_pInstance) + { + if (m_uiLichKingAnswerTimer <= uiDiff) + { + if (Creature* pLichKing = m_pInstance->GetSingleCreatureFromStorage(NPC_THE_LICHKING)) + DoScriptText(SAY_ANSWER_REQUEST, pLichKing); + m_uiLichKingAnswerTimer = 0; + } + else + m_uiLichKingAnswerTimer -= uiDiff; + } } DoMeleeAttackIfReady(); diff --git a/scripts/northrend/naxxramas/instance_naxxramas.cpp b/scripts/northrend/naxxramas/instance_naxxramas.cpp index 58a83c5ef..9743a74bf 100644 --- a/scripts/northrend/naxxramas/instance_naxxramas.cpp +++ b/scripts/northrend/naxxramas/instance_naxxramas.cpp @@ -24,7 +24,19 @@ EndScriptData */ #include "precompiled.h" #include "naxxramas.h" +static const DialogueEntry aNaxxDialogue[] = +{ + {SAY_SAPP_DIALOG1, NPC_KELTHUZAD, 6000}, + {SAY_SAPP_DIALOG2_LICH, NPC_THE_LICHKING, 6000}, + {SAY_SAPP_DIALOG3, NPC_KELTHUZAD, 10000}, + {SAY_SAPP_DIALOG4_LICH, NPC_THE_LICHKING, 12000}, + {SAY_SAPP_DIALOG5, NPC_KELTHUZAD, 0}, + {0,0,0} +}; + instance_naxxramas::instance_naxxramas(Map* pMap) : ScriptedInstance(pMap), + m_uiTauntTimer(0), + m_dialogueHelper(aNaxxDialogue), m_fChamberCenterX(0.0f), m_fChamberCenterY(0.0f), m_fChamberCenterZ(0.0f) @@ -38,6 +50,8 @@ void instance_naxxramas::Initialize() for (uint8 i = 0; i < MAX_SPECIAL_ACHIEV_CRITS; ++i) m_abAchievCriteria[i] = false; + + m_dialogueHelper.InitializeDialogueHelper(this, true); } void instance_naxxramas::OnCreatureCreate(Creature* pCreature) @@ -55,6 +69,7 @@ void instance_naxxramas::OnCreatureCreate(Creature* pCreature) case NPC_RIVENDARE: case NPC_GOTHIK: case NPC_KELTHUZAD: + case NPC_THE_LICHKING: m_mNpcEntryGuidStore[pCreature->GetEntry()] = pCreature->GetObjectGuid(); break; @@ -252,7 +267,7 @@ void instance_naxxramas::SetData(uint32 uiType, uint32 uiData) { DoUseDoorOrButton(GO_ARAC_EYE_RAMP); DoRespawnGameObject(GO_ARAC_PORTAL, 30*MINUTE); - DoTaunt(); + m_uiTauntTimer = 5000; } break; case TYPE_NOTH: @@ -282,7 +297,7 @@ void instance_naxxramas::SetData(uint32 uiType, uint32 uiData) { DoUseDoorOrButton(GO_PLAG_EYE_RAMP); DoRespawnGameObject(GO_PLAG_PORTAL, 30*MINUTE); - DoTaunt(); + m_uiTauntTimer = 5000; } break; case TYPE_RAZUVIOUS: @@ -320,7 +335,7 @@ void instance_naxxramas::SetData(uint32 uiType, uint32 uiData) DoUseDoorOrButton(GO_MILI_EYE_RAMP); DoRespawnGameObject(GO_MILI_PORTAL, 30*MINUTE); DoRespawnGameObject(instance->IsRegularDifficulty() ? GO_CHEST_HORSEMEN_NORM : GO_CHEST_HORSEMEN_HERO, 30*MINUTE); - DoTaunt(); + m_uiTauntTimer = 5000; } break; case TYPE_PATCHWERK: @@ -356,7 +371,7 @@ void instance_naxxramas::SetData(uint32 uiType, uint32 uiData) { DoUseDoorOrButton(GO_CONS_EYE_RAMP); DoRespawnGameObject(GO_CONS_PORTAL, 30*MINUTE); - DoTaunt(); + m_uiTauntTimer = 5000; } break; case TYPE_SAPPHIRON: @@ -365,7 +380,10 @@ void instance_naxxramas::SetData(uint32 uiType, uint32 uiData) //if (uiData == IN_PROGRESS) // SetSpecialAchievementCriteria(TYPE_ACHIEV_HUNDRED_CLUB, true); if (uiData == DONE) + { DoUseDoorOrButton(GO_KELTHUZAD_WATERFALL_DOOR); + m_dialogueHelper.StartNextDialogueText(SAY_SAPP_DIALOG1); + } break; case TYPE_KELTHUZAD: m_auiEncounter[uiType] = uiData; @@ -482,6 +500,22 @@ bool instance_naxxramas::CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Playe } } +void instance_naxxramas::Update(uint32 uiDiff) +{ + if (m_uiTauntTimer) + { + if (m_uiTauntTimer <= uiDiff) + { + DoTaunt(); + m_uiTauntTimer = 0; + } + else + m_uiTauntTimer -= uiDiff; + } + + m_dialogueHelper.DialogueUpdate(uiDiff); +} + void instance_naxxramas::SetGothTriggers() { Creature* pGoth = GetSingleCreatureFromStorage(NPC_GOTHIK); diff --git a/scripts/northrend/naxxramas/naxxramas.h b/scripts/northrend/naxxramas/naxxramas.h index 3ae6d9564..c21f8177f 100644 --- a/scripts/northrend/naxxramas/naxxramas.h +++ b/scripts/northrend/naxxramas/naxxramas.h @@ -11,12 +11,20 @@ enum // A few instance-script related texts SAY_THADDIUS_GREET = -1533029, - // Kel'Thuzad's taunts after killing Wing Bosses + + // Kel'Thuzad SAY_KELTHUZAD_CAT_DIED = -1533089, + // Kel'Thuzad's taunts after killing Wing Bosses SAY_KELTHUZAD_TAUNT1 = -1533090, SAY_KELTHUZAD_TAUNT2 = -1533091, SAY_KELTHUZAD_TAUNT3 = -1533092, SAY_KELTHUZAD_TAUNT4 = -1533093, + // Dialogues with Lich King + SAY_SAPP_DIALOG1 = -1533084, + SAY_SAPP_DIALOG2_LICH = -1533085, + SAY_SAPP_DIALOG3 = -1533086, + SAY_SAPP_DIALOG4_LICH = -1533087, + SAY_SAPP_DIALOG5 = -1533088, TYPE_ANUB_REKHAN = 0, TYPE_FAERLINA = 1, @@ -63,6 +71,7 @@ enum NPC_RIVENDARE = 30549, NPC_KELTHUZAD = 15990, + NPC_THE_LICHKING = 16980, NPC_MR_BIGGLESWORTH = 16998, // Faerlina @@ -202,6 +211,8 @@ class MANGOS_DLL_DECL instance_naxxramas : public ScriptedInstance const char* Save() { return m_strInstData.c_str(); } void Load(const char* chrIn); + void Update(uint32 uiDiff); + // goth void SetGothTriggers(); Creature* GetClosestAnchorForGoth(Creature* pSource, bool bRightSide); @@ -231,6 +242,10 @@ class MANGOS_DLL_DECL instance_naxxramas : public ScriptedInstance float m_fChamberCenterX; float m_fChamberCenterY; float m_fChamberCenterZ; + + uint32 m_uiTauntTimer; + + DialogueHelper m_dialogueHelper; }; #endif diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 68c481c5b..0fd4f2c04 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2247" + #define SD2_REVISION_NR "2248" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index d38eeadac..720a5809a 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -1430,11 +1430,11 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1533082,'%s takes in a deep breath...',0,3,0,0,'sapphiron EMOTE_BREATH'), (-1533083,'%s resumes his attacks!',0,3,0,0,'sapphiron EMOTE_GROUND'), -(-1533084,'Our preparations continue as planned, master.',14467,1,0,0,'kelthuzad SAY_SAPP_DIALOG1'), -(-1533085,'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.',8881,1,0,0,'kelthuzad SAY_SAPP_DIALOG2_LICH'), -(-1533086,'I see no complications... Wait... What is this?',14468,1,0,0,'kelthuzad SAY_SAPP_DIALOG3'), -(-1533087,'Your security measures have failed! See to this interruption immediately!',8882,1,0,0,'kelthuzad SAY_SAPP_DIALOG4_LICH'), -(-1533088,'Yes, master!',14469,1,0,0,'kelthuzad SAY_SAPP_DIALOG5'), +(-1533084,'Your forces are nearly marshalled to strike back against your enemies, my liege.',14467,6,0,0,'kelthuzad SAY_SAPP_DIALOG1'), +(-1533085,'Soon we will eradicate the Alliance and Horde, then the rest of Azeroth will fall before the might of my army.',14768,6,0,0,'lich_king SAY_SAPP_DIALOG2_LICH'), +(-1533086,'Yes, Master. The time of their ultimate demise grows close...What is this?',14468,6,0,0,'kelthuzad SAY_SAPP_DIALOG3'), +(-1533087,'Invaders...here?! DESTROY them, Kel\'Thuzad! Naxxramas must not fall!',14769,6,0,0,'lich_king SAY_SAPP_DIALOG4_LICH'), +(-1533088,'As you command, Master!',14469,6,0,0,'kelthuzad SAY_SAPP_DIALOG5'), (-1533089,'No!!! A curse upon you, interlopers! The armies of the Lich King will hunt you down. You will not escape your fate...',14484,6,0,0,'kelthuzad SAY_CAT_DIED'), (-1533090,'Who dares violate the sanctity of my domain? Be warned, all who trespass here are doomed.',14463,6,0,0,'kelthuzad SAY_TAUNT1'), (-1533091,'Fools, you think yourselves triumphant? You have only taken one step closer to the abyss! ',14464,6,0,0,'kelthuzad SAY_TAUNT2'), diff --git a/sql/updates/r2248_scriptdev2.sql b/sql/updates/r2248_scriptdev2.sql new file mode 100644 index 000000000..17d9f58db --- /dev/null +++ b/sql/updates/r2248_scriptdev2.sql @@ -0,0 +1,5 @@ +UPDATE script_texts SET content_default='Your forces are nearly marshalled to strike back against your enemies, my liege.', type=6 WHERE entry = -1533084; +UPDATE script_texts SET content_default='Soon we will eradicate the Alliance and Horde, then the rest of Azeroth will fall before the might of my army.', type=6, sound=14768, comment='lich_king SAY_SAPP_DIALOG2_LICH' WHERE entry = -1533085; +UPDATE script_texts SET content_default='Yes, Master. The time of their ultimate demise grows close...What is this?', type=6 WHERE entry = -1533086; +UPDATE script_texts SET content_default='Invaders...here?! DESTROY them, Kel\'Thuzad! Naxxramas must not fall!', type=6, sound=14769, comment='lich_king SAY_SAPP_DIALOG4_LICH' WHERE entry = -1533087; +UPDATE script_texts SET content_default='As you command, Master!', type=6 WHERE entry = -1533088; From bc3dee3b4462e45ea79ef42701faca2ee7e84d6c Mon Sep 17 00:00:00 2001 From: Insanity Peppers Date: Wed, 20 Jul 2011 18:23:35 +0200 Subject: [PATCH 0229/1172] [2249] Fix '' in SQLs Signed-off-by: Schmoozerd --- sd2_revision_nr.h | 2 +- sql/scriptdev2_script_full.sql | 4 ++-- sql/updates/r2249_scriptdev2.sql | 2 ++ 3 files changed, 5 insertions(+), 3 deletions(-) create mode 100644 sql/updates/r2249_scriptdev2.sql diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 0fd4f2c04..1f5ac5c0a 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2248" + #define SD2_REVISION_NR "2249" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 720a5809a..50e68688f 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -1087,7 +1087,7 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1409021,'I go now to summon the lord whos house this is. Should you seek an audiance with him your paltry lives will surly be forfit. Nevertheless seek out his lair if you dare!',0,1,0,0,'majordomo SAY_DEFEAT_3'), (-1409022,'My flame! Please don\'t take away my flame... ',8042,1,0,0,'ragnaros SAY_ARRIVAL4_MAJ'), (-1409023,'Very well, $N.',0,0,0,0,'majordomo SAY_SUMMON_0'), -(-1409024,'Impudent whelps! You''ve rushed headlong to your own deaths! See now, the master stirs!',0,1,0,0,'majordomo SAY_SUMMON_1'); +(-1409024,'Impudent whelps! You\'ve rushed headlong to your own deaths! See now, the master stirs!',0,1,0,0,'majordomo SAY_SUMMON_1'); -- -1 429 000 DIRE MAUL INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES @@ -3294,7 +3294,7 @@ INSERT INTO script_texts (entry,content_default,sound,type,LANGUAGE,emote,commen (-1616001,'None but the blue dragonflight are welcome here! Perhaps this is the work of Alexstrasza? Well then, she has sent you to your deaths.',14513,1,0,0,'malygos SAY_INTRO_2'), (-1616002,'What could you hope to accomplish, to storm brazenly into my domain? To employ MAGIC? Against ME? ',14514,1,0,0,'malygos SAY_INTRO_3'), (-1616003,'I am without limits here... the rules of your cherished reality do not apply... In this realm, I am in control...',14515,1,0,0,'malygos SAY_INTRO_4'), -(-1616004,'I give you one chance. Pledge fealty to me, and perhaps I won''t slaughter you for your insolence!',14516,1,0,0,'malygos SAY_INTRO_5'), +(-1616004,'I give you one chance. Pledge fealty to me, and perhaps I won\'t slaughter you for your insolence!',14516,1,0,0,'malygos SAY_INTRO_5'), (-1616005,'My patience has reached its limit, I WILL BE RID OF YOU!',14517,1,0,0,'malygos SAY_AGGRO'), (-1616006,'Watch helplessly as your hopes are swept away...',14525,1,0,0,'malygos SAY_VORTEX'), (-1616007,'I AM UNSTOPPABLE!',14533,1,0,0,'malygos SAY_SPARK_BUFF'), diff --git a/sql/updates/r2249_scriptdev2.sql b/sql/updates/r2249_scriptdev2.sql new file mode 100644 index 000000000..ea5786d7d --- /dev/null +++ b/sql/updates/r2249_scriptdev2.sql @@ -0,0 +1,2 @@ +UPDATE script_texts SET content_default='Impudent whelps! You\'ve rushed headlong to your own deaths! See now, the master stirs!' WHERE entry=-1409024; +UPDATE script_texts SET content_default='I give you one chance. Pledge fealty to me, and perhaps I won\'t slaughter you for your insolence!' WHERE entry=-1616004; From c6d9c33741e60a62bb39d52bc309746d5f8770d1 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Thu, 21 Jul 2011 03:37:59 +0200 Subject: [PATCH 0230/1172] [2250] Implement framework to support ToC25 * Use DialogueHelper class to handle the ToC25 dialogues * Add gossip scripts for Barrett Ramsey to start encounters --- .../trial_of_the_crusader/boss_jaraxxus.cpp | 1 - .../boss_northrend_beasts.cpp | 2 + .../instance_trial_of_the_crusader.cpp | 269 ++++++++++++++++-- .../trial_of_the_crusader.cpp | 200 +++++++++---- .../trial_of_the_crusader.h | 51 +++- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 + sql/scriptdev2_script_full.sql | 21 +- sql/updates/r2250_mangos.sql | 1 + sql/updates/r2250_scriptdev2.sql | 18 ++ 10 files changed, 475 insertions(+), 91 deletions(-) create mode 100644 sql/updates/r2250_mangos.sql create mode 100644 sql/updates/r2250_scriptdev2.sql diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_jaraxxus.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_jaraxxus.cpp index 3d39dec69..41cec867d 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_jaraxxus.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_jaraxxus.cpp @@ -33,7 +33,6 @@ enum SAY_AGGRO = -1649040, SAY_SLAY_1 = -1649041, SAY_SLAY_2 = -1649042, - SAY_DEATH = -1649043, SAY_BERSERK = -1649044, SAY_INCINERATE = -1649045, SAY_MISTRESS = -1649046, diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp index 0e6f264fa..ee1cfe248 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp @@ -24,6 +24,8 @@ EndScriptData */ #include "precompiled.h" #include "trial_of_the_crusader.h" +// TODO need to script npc 36549 - Beast Combat Stalker, set into combat in begin, destroy on end + /*###### ## boss_gormok ######*/ diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp index 3700186cf..6914edb63 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp @@ -25,14 +25,123 @@ EndScriptData */ #include "trial_of_the_crusader.h" /* Trial Of The Crusader encounters: -0 - Northrend Beasts -1 - Jaraxxus -2 - Faction Champions -3 - Twin Valkyr -4 - Anubarak +0 - Wipe Count +1 - Northrend Beasts +2 - Jaraxxus +3 - Faction Champions +4 - Twin Valkyr +5 - Anubarak */ -instance_trial_of_the_crusader::instance_trial_of_the_crusader(Map* pMap) : ScriptedInstance(pMap) +enum +{ + SAY_TIRION_RAID_INTRO_LONG = -1649000, + SAY_RAID_TRIALS_INTRO = -1649001, + + // Northrend Beasts + SAY_TIRION_BEAST_1 = -1649002, + SAY_VARIAN_BEAST_1 = -1649003, + SAY_GARROSH_BEAST_1 = -1649004, + SAY_TIRION_BEAST_2 = -1649005, + SAY_TIRION_BEAST_3 = -1649006, + SAY_TIRION_BEAST_SLAY = -1649007, + SAY_TIRION_BEAST_WIPE = -1649008, + + // Jaraxxus Encounter + SAY_TIRION_JARAXXUS_INTRO_1 = -1649009, + SAY_WILFRED_JARAXXUS_INTRO_1 = -1649010, + SAY_WILFRED_JARAXXUS_INTRO_2 = -1649011, + SAY_WILFRED_JARAXXUS_INTRO_3 = -1649012, + SAY_JARAXXUS_JARAXXAS_INTRO_1 = -1649013, + SAY_WILFRED_DEATH = -1649014, + SAY_TIRION_JARAXXUS_INTRO_2 = -1649015, + SAY_JARAXXUS_DEATH = -1649043, + SAY_TIRION_JARAXXUS_EXIT_1 = -1649016, + SAY_GARROSH_JARAXXUS_EXIT_1 = -1649017, + SAY_VARIAN_JARAXXUS_SLAY = -1649018, + SAY_TIRION_JARAXXUS_EXIT_2 = -1649019, + + // Faction-Champions + SAY_TIRION_PVP_INTRO_1 = -1649020, + SAY_GARROSH_PVP_A_INTRO_1 = -1649021, + SAY_VARIAN_PVP_H_INTRO_1 = -1649022, + SAY_TIRION_PVP_INTRO_2 = -1649023, + SAY_VARIAN_PVP_H_INTRO_2 = -1649024, + SAY_GARROSH_PVP_A_INTRO_2 = -1649025, + SAY_VARIAN_PVP_A_WIN = -1649026, + SAY_GARROSH_PVP_H_WIN = -1649027, + SAY_TIRION_PVP_WIN = -1649028, + + // Twin Valkyrs + SAY_TIRION_TWINS_INTRO = -1649029, + SAY_RAID_INTRO_SHORT = -1649030, + SAY_VARIAN_TWINS_A_WIN = -1649031, + SAY_GARROSH_TWINS_H_WIN = -1649032, + SAY_TIRION_TWINS_WIN = -1649033, + + // Anub'Arak Encounter + SAY_LKING_ANUB_INTRO_1 = -1649034, + SAY_TIRION_ABUN_INTRO_1 = -1649035, + SAY_LKING_ANUB_INTRO_2 = -1649036, + SAY_LKING_ANUB_INTRO_3 = -1649037, + SAY_ANUB_ANUB_INTRO_1 = -1649038, // NYI +}; + +static const DialogueEntryTwoSide aTocDialogues[] = +{ + // Beasts related, summons in between not handled here + {TYPE_NORTHREND_BEASTS, 0, 0, 0, 24000}, + {SAY_TIRION_BEAST_1, NPC_TIRION_A, 0, 0, 12000}, + {SAY_VARIAN_BEAST_1, NPC_VARIAN, SAY_GARROSH_BEAST_1, NPC_GARROSH, 0}, + {SAY_TIRION_BEAST_SLAY, NPC_TIRION_A, 0, 0, 8000}, + {NPC_RAMSEY_2, 0, 0, 0, 0}, + {SAY_TIRION_BEAST_WIPE, NPC_TIRION_A, 0, 0, 8000}, + {NPC_RAMSEY_1, 0, 0, 0, 0}, + // Jaruxxus (Intro) + {TYPE_JARAXXUS, 0, 0, 0, 1000}, + {SAY_TIRION_JARAXXUS_INTRO_1, NPC_TIRION_A, 0, 0, 6000}, + {NPC_FIZZLEBANG, 0, 0, 0, 26000}, + {SAY_WILFRED_JARAXXUS_INTRO_1, NPC_FIZZLEBANG, 0, 0, 10000}, + {SAY_WILFRED_JARAXXUS_INTRO_2, NPC_FIZZLEBANG, 0, 0, 12000}, + {SAY_WILFRED_JARAXXUS_INTRO_3, NPC_FIZZLEBANG, 0, 0, 12000}, // Summon also Jaraxxus + {SAY_JARAXXUS_JARAXXAS_INTRO_1, NPC_JARAXXUS, 0, 0, 5000}, + {SAY_WILFRED_DEATH, NPC_FIZZLEBANG, 0, 0, 1000}, + {1, 0, 0, 0, 5000}, // Kill Fizzlebang // TODO Either skip this line, or use something better than '1' as entry + {SAY_TIRION_JARAXXUS_INTRO_2, NPC_TIRION_A, 0, 0, 0}, + // Jaruxxus (Outro) + {SAY_JARAXXUS_DEATH, NPC_JARAXXUS, 0, 0, 6000}, // Jaraxxus Death + {SAY_TIRION_JARAXXUS_EXIT_1, NPC_TIRION_A, 0, 0, 5000}, + {SAY_GARROSH_JARAXXUS_EXIT_1, NPC_GARROSH, 0, 0, 11000}, + {SAY_VARIAN_JARAXXUS_SLAY, NPC_VARIAN, 0, 0, 8000}, + {SAY_TIRION_JARAXXUS_EXIT_2, NPC_TIRION_A, 0, 0, 19000}, + {NPC_RAMSEY_3, 0, 0, 0, 0}, + // Grand Champions + {SAY_TIRION_PVP_INTRO_1, NPC_TIRION_A, 0, 0, 9000}, + {SAY_GARROSH_PVP_A_INTRO_1, NPC_GARROSH, SAY_VARIAN_PVP_H_INTRO_1, NPC_VARIAN, 14000}, + {SAY_TIRION_PVP_INTRO_2, NPC_TIRION_A, 0, 0, 1000}, + {TYPE_FACTION_CHAMPIONS, 0, 0, 0, 5000}, + {SAY_GARROSH_PVP_A_INTRO_2, NPC_GARROSH, SAY_VARIAN_PVP_H_INTRO_2, NPC_VARIAN, 0}, + {SAY_VARIAN_PVP_A_WIN, NPC_VARIAN, SAY_GARROSH_PVP_H_WIN, NPC_GARROSH, 4000}, + {SAY_TIRION_PVP_WIN, NPC_TIRION_A, 0, 0, 27000}, + {NPC_RAMSEY_4, 0, 0, 0, 0}, + // Twin Valkyrs + {TYPE_TWIN_VALKYR, 0, 0, 0, 17000}, + {NPC_FJOLA, 0, 0, 0, 0}, // Summon Twins + {NPC_EYDIS, 0, 0, 0, 2000}, // Twins killed // TODO Find better entry + {NPC_RAMSEY_5, 0, 0, 0, 4000}, + {SAY_VARIAN_TWINS_A_WIN, NPC_VARIAN, SAY_GARROSH_TWINS_H_WIN, NPC_GARROSH, 1000}, + {SAY_TIRION_TWINS_WIN, NPC_TIRION_A, 0, 0, 0}, + // Anub'arak + {TYPE_ANUBARAK, 0, 0, 0, 19000}, + {SAY_LKING_ANUB_INTRO_1, NPC_THE_LICHKING, 0, 0, 9000}, + {SAY_TIRION_ABUN_INTRO_1, NPC_TIRION_A, 0, 0, 6000}, + {SAY_LKING_ANUB_INTRO_2, NPC_THE_LICHKING, 0, 0, 19000}, + {SAY_LKING_ANUB_INTRO_3, NPC_THE_LICHKING, 0, 0, 0}, + {0, 0, 0, 0 ,0} +}; + +instance_trial_of_the_crusader::instance_trial_of_the_crusader(Map* pMap) : ScriptedInstance(pMap), DialogueHelper(aTocDialogues), + m_uiTeam(TEAM_NONE) { Initialize(); } @@ -40,47 +149,134 @@ instance_trial_of_the_crusader::instance_trial_of_the_crusader(Map* pMap) : Scri void instance_trial_of_the_crusader::Initialize() { memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); + InitializeDialogueHelper(this); } bool instance_trial_of_the_crusader::IsEncounterInProgress() const { - for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) - if (m_auiEncounter[i] == IN_PROGRESS) return true; + for (uint8 i = TYPE_NORTHREND_BEASTS; i < MAX_ENCOUNTER; ++i) + { + if (m_auiEncounter[i] == IN_PROGRESS) + return true; + } return false; } +void instance_trial_of_the_crusader::OnCreatureCreate(Creature* pCreature) +{ + switch (pCreature->GetEntry()) + { + case NPC_TIRION_A: + case NPC_TIRION_B: + case NPC_VARIAN: + case NPC_GARROSH: + case NPC_FIZZLEBANG: + case NPC_JARAXXUS: + case NPC_THE_LICHKING: + m_mNpcEntryGuidStore[pCreature->GetEntry()] = pCreature->GetObjectGuid(); + } +} + +void instance_trial_of_the_crusader::OnObjectCreate(GameObject* pGo) +{ + +} + +void instance_trial_of_the_crusader::OnPlayerEnter(Player* pPlayer) +{ + if (m_uiTeam) + return; + + m_uiTeam = pPlayer->GetTeam(); + SetDialogueSide(m_uiTeam == ALLIANCE); + + DoSummonRamsey(0); +} + void instance_trial_of_the_crusader::SetData(uint32 uiType, uint32 uiData) { switch(uiType) { - case TYPE_NORTHREND_BEASTS: + case TYPE_WIPE_COUNT: m_auiEncounter[uiType] = uiData; break; - case TYPE_JARAXXUS: + case TYPE_NORTHREND_BEASTS: + if (uiData == SPECIAL) + { + if (Creature* pTirion = GetSingleCreatureFromStorage(NPC_TIRION_A)) + DoScriptText(m_auiEncounter[uiType] != FAIL ? SAY_TIRION_RAID_INTRO_LONG : SAY_RAID_TRIALS_INTRO, pTirion); + StartNextDialogueText(TYPE_NORTHREND_BEASTS); + } + else if (uiData == FAIL) + { + SetData(TYPE_WIPE_COUNT, m_auiEncounter[TYPE_WIPE_COUNT] + 1); + StartNextDialogueText(SAY_TIRION_BEAST_WIPE); + } + else if (uiData == DONE) + StartNextDialogueText(SAY_TIRION_BEAST_SLAY); m_auiEncounter[uiType] = uiData; break; - case TYPE_FACTION_CHAMPIONS: + case TYPE_JARAXXUS: + if (uiData == SPECIAL) + // TODO - What happen in wipe case? + StartNextDialogueText(TYPE_JARAXXUS); + else if (uiData == FAIL) + { + SetData(TYPE_WIPE_COUNT, m_auiEncounter[TYPE_WIPE_COUNT] + 1); + StartNextDialogueText(NPC_RAMSEY_2); + } + else if (uiData == DONE) + StartNextDialogueText(SAY_JARAXXUS_DEATH); m_auiEncounter[uiType] = uiData; break; - case TYPE_TWIN_VALKYR: + case TYPE_FACTION_CHAMPIONS: + if (uiData == SPECIAL) + StartNextDialogueText(m_auiEncounter[uiType] != FAIL ? SAY_TIRION_PVP_INTRO_1 : TYPE_FACTION_CHAMPIONS); + else if (uiData == FAIL) + { + SetData(TYPE_WIPE_COUNT, m_auiEncounter[TYPE_WIPE_COUNT] + 1); + StartNextDialogueText(NPC_RAMSEY_3); + } + else if (uiData == DONE) + StartNextDialogueText(SAY_VARIAN_PVP_A_WIN); m_auiEncounter[uiType] = uiData; break; - case TYPE_ANUBARAK: + case TYPE_TWIN_VALKYR: + if (uiData == SPECIAL) + { + if (Creature* pTirion = GetSingleCreatureFromStorage(NPC_TIRION_A)) + DoScriptText(m_auiEncounter[uiType] != FAIL ? SAY_TIRION_TWINS_INTRO : SAY_RAID_INTRO_SHORT, pTirion); + + } + else if (uiData == FAIL) + { + SetData(TYPE_WIPE_COUNT, m_auiEncounter[TYPE_WIPE_COUNT] + 1); + StartNextDialogueText(NPC_RAMSEY_4); + } + else if (uiData == DONE) + StartNextDialogueText(NPC_EYDIS); + m_auiEncounter[uiType] = uiData; + break; + case TYPE_ANUBARAK: + if (uiData == SPECIAL) + StartNextDialogueText(TYPE_ANUBARAK); + else if (uiData == FAIL) + SetData(TYPE_WIPE_COUNT, m_auiEncounter[TYPE_WIPE_COUNT] + 1); m_auiEncounter[uiType] = uiData; break; - default: + default: error_log("SD2: Instance Trial of The Crusader: ERROR SetData = %u for type %u does not exist/not implemented.", uiType, uiData); return; } - if (uiData == DONE) + if (uiData == DONE || uiType == TYPE_WIPE_COUNT) { OUT_SAVE_INST_DATA; std::ostringstream saveStream; saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2] << " " - << m_auiEncounter[3] << " " << m_auiEncounter[4]; + << m_auiEncounter[3] << " " << m_auiEncounter[4] << " " << m_auiEncounter[5]; m_strInstData = saveStream.str(); @@ -109,15 +305,52 @@ void instance_trial_of_the_crusader::Load(const char* chrIn) std::istringstream loadStream(chrIn); loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3] - >> m_auiEncounter[4]; + >> m_auiEncounter[4] >> m_auiEncounter[5]; - for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) + for(uint8 i = TYPE_NORTHREND_BEASTS; i < MAX_ENCOUNTER; ++i) if (m_auiEncounter[i] == IN_PROGRESS) // Do not load an encounter as "In Progress" - reset it instead. m_auiEncounter[i] = NOT_STARTED; OUT_LOAD_INST_DATA_COMPLETE; } +void instance_trial_of_the_crusader::DoSummonRamsey(uint32 uiEntry) +{ + Player* pPlayer = GetPlayerInMap(); + if (!pPlayer) + return; + + if (uiEntry) + ; + // For initial case, figure which Ramsay to summon + else if (m_auiEncounter[TYPE_TWIN_VALKYR] == DONE) + uiEntry = NPC_RAMSEY_5; + else if (m_auiEncounter[TYPE_FACTION_CHAMPIONS] == DONE) + uiEntry = NPC_RAMSEY_4; + else if (m_auiEncounter[TYPE_JARAXXUS] == DONE) + uiEntry = NPC_RAMSEY_3; + else if (m_auiEncounter[TYPE_NORTHREND_BEASTS] == DONE) + uiEntry = NPC_RAMSEY_2; + else + uiEntry = NPC_RAMSEY_1; + + pPlayer->SummonCreature(uiEntry, aRamsayPositions[0][0], aRamsayPositions[0][1], aRamsayPositions[0][2], aRamsayPositions[0][3], TEMPSUMMON_DEAD_DESPAWN, 0); +} + +void instance_trial_of_the_crusader::JustDidDialogueStep(int32 iEntry) +{ + switch (iEntry) + { + case NPC_RAMSEY_1: + case NPC_RAMSEY_2: + case NPC_RAMSEY_3: + case NPC_RAMSEY_4: + case NPC_RAMSEY_5: + DoSummonRamsey(iEntry); + break; + } +} + InstanceData* GetInstanceData_instance_trial_of_the_crusader(Map* pMap) { return new instance_trial_of_the_crusader(pMap); diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp index f6c9b12b3..512553951 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp @@ -26,63 +26,85 @@ EndScriptData */ enum { - SAY_TIRION_RAID_INTRO_LONG = -1649000, - SAY_RAID_TRIALS_INTRO = -1649001, - - // Northrend Beasts - SAY_TIRION_BEAST_1 = -1649002, - SAY_VARIAN_BEAST_1 = -1649003, - SAY_GARROSH_BEAST_1 = -1649004, - SAY_TIRION_BEAST_2 = -1649005, - SAY_TIRION_BEAST_3 = -1649006, - SAY_TIRION_BEAST_SLAY = -1649007, - SAY_TIRION_BEAST_WIPE = -1649008, - - // Jaraxxus Encounter - SAY_TIRION_JARAXXUS_INTRO_1 = -1649009, - SAY_WILFRED_JARAXXUS_INTRO_1 = -1649010, - SAY_WILFRED_JARAXXUS_INTRO_2 = -1649011, - SAY_WILFRED_JARAXXUS_INTRO_3 = -1649012, - SAY_JARAXXUS_JARAXXAS_INTRO_1 = -1649013, - SAY_WILFRED_DEATH = -1649014, - SAY_TIRION_JARAXXUS_INTRO_2 = -1649015, - SAY_TIRION_JARAXXUS_EXIT_1 = -1649016, - SAY_GARROSH_JARAXXUS_EXIT_1 = -1649017, - SAY_VARIAN_JARAXXUS_SLAY = -1649018, - SAY_TIRION_JARAXXUS_EXIT_2 = -1649019, - - // Faction-Champions - SAY_TIRION_PVP_INTRO_1 = -1649020, - SAY_GARROSH_PVP_A_INTRO_1 = -1649021, - SAY_VARIAN_PVP_H_INTRO_1 = -1649022, - SAY_TIRION_PVP_INTRO_2 = -1649023, - SAY_VARIAN_PVP_A_INTRO_2 = -1649024, - SAY_GARROSH_PVP_H_INTRO_2 = -1649025, - SAY_VARIAN_PVP_A_WIN = -1649026, - SAY_GARROSH_PVP_H_WIN = -1649027, - SAY_TIRION_PVP_WIN = -1649028, - - // Twin Valkyrs - SAY_TIRION_TWINS_INTRO = -1649029, - SAY_RAID_INTRO_SHORT = -1649030, - SAY_VARIAN_TWINS_A_WIN = -1649031, - SAY_GARROSH_TWINS_H_WIN = -1649032, - SAY_TIRION_TWINS_WIN = -1649033, - - // Anub'Arak Encounter - SAY_LKING_ANUB_INTRO_1 = -1649034, - SAY_TIRION_ABUN_INTRO_1 = -1649035, - SAY_LKING_ANUB_INTRO_2 = -1649036, - SAY_LKING_ANUB_INTRO_3 = -1649037, - SAY_ANUB_ANUB_INTRO_1 = -1649038, - - GOSSIP_ITEM_START_EVENT1 = -3649000 + GOSSIP_TEXT_BEAST_INIT = 14664, + GOSSIP_TEXT_BEAST_START = 14665, + GOSSIP_TEXT_BEAST_WIPE_INIT = 14667, + GOSSIP_TEXT_BEAST_WIPE_START = 14668, + + GOSSIP_TEXT_JARAXXUS_INIT = 14678, + GOSSIP_TEXT_JARAXXUS_START = 14680, + GOSSIP_TEXT_JARAXXUS_WIPE_INIT = 14679, + GOSSIP_TEXT_JARAXXUS_WIPE_START = 14682, + + GOSSIP_TEXT_PVP_INIT = 14813, + GOSSIP_TEXT_PVP_START = 14814, + GOSSIP_TEXT_PVP_WIPE_INIT = 14815, + GOSSIP_TEXT_PVP_WIPE_START = 14816, + + GOSSIP_TEXT_TWINS_INIT = 14819, + GOSSIP_TEXT_TWINS_START = 14821, + GOSSIP_TEXT_TWINS_WIPE_INIT = 14820, + GOSSIP_TEXT_TWINS_WIPE_START = 14822, + + GOSSIP_TEXT_ANUB_INIT = 14828, + GOSSIP_TEXT_ANUB_START = 14829, + + GOSSIP_ITEM_BEAST_INIT = -3649000, + GOSSIP_ITEM_BEAST_START = -3649001, + GOSSIP_ITEM_BEAST_WIPE_INIT = -3649002, + GOSSIP_ITEM_BEAST_WIPE_START = -3000000, + + GOSSIP_ITEM_JARAXXUS_INIT = -3649003, + GOSSIP_ITEM_JARAXXUS_START = -3000000, + GOSSIP_ITEM_JARAXXUS_WIPE_INIT = -3649004, + GOSSIP_ITEM_JARAXXUS_WIPE_START = -3000000, + + GOSSIP_ITEM_PVP_INIT = -3649005, + GOSSIP_ITEM_PVP_START = -3649006, + GOSSIP_ITEM_PVP_WIPE_INIT = -3000000, + GOSSIP_ITEM_PVP_WIPE_START = -3000000, + + GOSSIP_ITEM_TWINS_INIT = -3649007, + GOSSIP_ITEM_TWINS_START = -3649008, + GOSSIP_ITEM_TWINS_WIPE_INIT = -3000000, + GOSSIP_ITEM_TWINS_WIPE_START = -3000000, + + GOSSIP_ITEM_ANUB_INIT = -3649009, + GOSSIP_ITEM_ANUB_START = -3649010, }; /*###### ## npc_barrett_ramsey ######*/ +struct RamseyInfo +{ + uint32 uiEntry; + uint32 uiTextEntry; + int32 iGossipItem; + uint32 uiWipeTextEntry; + int32 iWipeGossipItem; + uint32 uiOptionId; // If . > 0 SetInstData(. , SPECIAL), else open new DiagMenu +}; + +static const RamseyInfo aRamseyInfo[] = +{ + {NPC_RAMSEY_1, GOSSIP_TEXT_BEAST_INIT, GOSSIP_ITEM_BEAST_INIT, GOSSIP_TEXT_BEAST_WIPE_INIT, GOSSIP_ITEM_BEAST_WIPE_INIT, 0}, + {NPC_RAMSEY_1, GOSSIP_TEXT_BEAST_START, GOSSIP_ITEM_BEAST_START, GOSSIP_TEXT_BEAST_WIPE_START, GOSSIP_ITEM_BEAST_WIPE_START, TYPE_NORTHREND_BEASTS}, + + {NPC_RAMSEY_2, GOSSIP_TEXT_JARAXXUS_INIT, GOSSIP_ITEM_JARAXXUS_INIT, GOSSIP_TEXT_JARAXXUS_WIPE_INIT, GOSSIP_ITEM_JARAXXUS_WIPE_INIT, 0}, + {NPC_RAMSEY_2, GOSSIP_TEXT_JARAXXUS_START, GOSSIP_ITEM_JARAXXUS_START, GOSSIP_TEXT_JARAXXUS_WIPE_START, GOSSIP_ITEM_JARAXXUS_WIPE_START, TYPE_JARAXXUS}, + + {NPC_RAMSEY_3, GOSSIP_TEXT_PVP_INIT, GOSSIP_ITEM_PVP_INIT, GOSSIP_TEXT_PVP_WIPE_INIT, GOSSIP_ITEM_PVP_WIPE_INIT, 0}, + {NPC_RAMSEY_3, GOSSIP_TEXT_PVP_START, GOSSIP_ITEM_PVP_START, GOSSIP_TEXT_PVP_WIPE_START, GOSSIP_ITEM_PVP_WIPE_START, TYPE_FACTION_CHAMPIONS}, + + {NPC_RAMSEY_4, GOSSIP_TEXT_TWINS_INIT, GOSSIP_ITEM_TWINS_INIT, GOSSIP_TEXT_TWINS_WIPE_INIT, GOSSIP_ITEM_TWINS_WIPE_INIT, 0}, + {NPC_RAMSEY_4, GOSSIP_TEXT_TWINS_START, GOSSIP_ITEM_TWINS_START, GOSSIP_TEXT_TWINS_WIPE_START, GOSSIP_ITEM_TWINS_WIPE_START, TYPE_TWIN_VALKYR}, + + {NPC_RAMSEY_5, GOSSIP_TEXT_ANUB_INIT, GOSSIP_ITEM_ANUB_INIT, 0, 0, 0}, + {NPC_RAMSEY_5, GOSSIP_TEXT_ANUB_START, GOSSIP_ITEM_ANUB_START, 0, 0, TYPE_ANUBARAK}, +}; + struct MANGOS_DLL_DECL npc_barrett_ramseyAI : public ScriptedAI { npc_barrett_ramseyAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} @@ -91,26 +113,88 @@ struct MANGOS_DLL_DECL npc_barrett_ramseyAI : public ScriptedAI void Reset() {} - void StartEvent(Player* pPlayer) + void MovementInform(uint32 uiType, uint32 uiPointId) { - // code starting the event here + if (uiType == POINT_MOTION_TYPE && uiPointId == 1) + m_creature->ForcedDespawn(); } }; bool GossipHello_npc_barrett_ramsey(Player* pPlayer, Creature* pCreature) { - pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_START_EVENT1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); + ScriptedInstance* pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + uint8 uiPos = 0; + uint32 uiType = 0; + + for (uint8 i = 0; i < countof(aRamseyInfo); ++i) + { + if (pCreature->GetEntry() == aRamseyInfo[i].uiEntry) + { + if (!aRamseyInfo[i].uiOptionId) + uiPos = i; + else + { + uiType = aRamseyInfo[i].uiOptionId; + break; + } + } + } + + if (!uiType || !pInstance) + return true; + + if (pInstance->GetData(uiType) == FAIL) + { + pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, aRamseyInfo[uiPos].iWipeGossipItem, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF); + pPlayer->SEND_GOSSIP_MENU(aRamseyInfo[uiPos].uiWipeTextEntry, pCreature->GetObjectGuid()); + } + else + { + pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, aRamseyInfo[uiPos].iGossipItem, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF); + pPlayer->SEND_GOSSIP_MENU(aRamseyInfo[uiPos].uiTextEntry, pCreature->GetObjectGuid()); + } + return true; } bool GossipSelect_npc_barrett_ramsey(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) { - if (uiAction == GOSSIP_ACTION_INFO_DEF+1) + ScriptedInstance* pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + if (!pInstance) + return true; + + if (uiAction > GOSSIP_ACTION_INFO_DEF) { + // Begin Event + uint32 uiType = uiAction - GOSSIP_ACTION_INFO_DEF; + if (pInstance->GetData(uiType) == FAIL || pInstance->GetData(uiType) == NOT_STARTED) + pInstance->SetData(uiAction - GOSSIP_ACTION_INFO_DEF, SPECIAL); + pPlayer->CLOSE_GOSSIP_MENU(); - if (npc_barrett_ramseyAI* pBarrettAI = dynamic_cast(pCreature->AI())) - pBarrettAI->StartEvent(pPlayer); + pCreature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + pCreature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); + pCreature->GetMotionMaster()->MovePoint(1, aRamsayPositions[1][0], aRamsayPositions[1][1], aRamsayPositions[1][2]); + + return true; + } + + for (uint8 i = 0; i < countof(aRamseyInfo); ++i) + { + if (pCreature->GetEntry() == aRamseyInfo[i].uiEntry && aRamseyInfo[i].uiOptionId) + { + if (pInstance->GetData(aRamseyInfo[i].uiOptionId) == FAIL) + { + pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, aRamseyInfo[i].iWipeGossipItem, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + aRamseyInfo[i].uiOptionId); + pPlayer->SEND_GOSSIP_MENU(aRamseyInfo[i].uiWipeTextEntry, pCreature->GetObjectGuid()); + } + else + { + pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, aRamseyInfo[i].iGossipItem, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + aRamseyInfo[i].uiOptionId); + pPlayer->SEND_GOSSIP_MENU(aRamseyInfo[i].uiTextEntry, pCreature->GetObjectGuid()); + } + + return true; + } } return true; diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h index 7c6b43022..41df6b7d2 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h @@ -7,25 +7,48 @@ enum { - MAX_ENCOUNTER = 5, + MAX_ENCOUNTER = 6, - TYPE_NORTHREND_BEASTS = 0, - TYPE_JARAXXUS = 1, - TYPE_FACTION_CHAMPIONS = 2, - TYPE_TWIN_VALKYR = 3, - TYPE_ANUBARAK = 4, + TYPE_WIPE_COUNT = 0, + TYPE_NORTHREND_BEASTS = 1, + TYPE_JARAXXUS = 2, + TYPE_FACTION_CHAMPIONS = 3, + TYPE_TWIN_VALKYR = 4, + TYPE_ANUBARAK = 5, + NPC_BEAST_COMBAT_STALKER = 36549, NPC_GORMOK = 34796, NPC_ACIDMAW = 35144, NPC_DREADSCALE = 34799, NPC_ICEHOWL = 34797, - NPCJARAXXUS = 34780, + NPC_JARAXXUS = 34780, NPC_FJOLA = 34497, NPC_EYDIS = 34496, NPC_ANUBARAK = 34564, + + NPC_TIRION_A = 34996, + NPC_TIRION_B = 36095, // Summoned after his text (Champions, you're alive! Not only have you defeated every challenge of the Trial of the Crusader, but also thwarted Arthas' plans! Your skill and cunning will prove to be a powerful weapon against the Scourge. Well done! Allow one of the Crusade's mages to transport you to the surface!) is said.. + NPC_VARIAN = 34990, + NPC_GARROSH = 34995, + NPC_FIZZLEBANG = 35458, + NPC_THE_LICHKING = 16980, + NPC_RAMSEY_1 = 34816, + NPC_RAMSEY_2 = 35035, + NPC_RAMSEY_3 = 35766, + NPC_RAMSEY_4 = 35770, + NPC_RAMSEY_5 = 35771, + NPC_RAMSEY_6 = 35895, // Unknown what these three NPCs are used for, maybe horde events? + NPC_RAMSEY_7 = 35909, + NPC_RAMSEY_8 = 35910, }; -class MANGOS_DLL_DECL instance_trial_of_the_crusader : public ScriptedInstance +static const float aRamsayPositions[2][4] = +{ + {559.1528f, 90.55729f, 395.2734f, 5.078908f}, // Summon Position + {563.556f, 78.72571f, 395.2125f, 0.0f} // Movement Position +}; + +class MANGOS_DLL_DECL instance_trial_of_the_crusader : public ScriptedInstance, private DialogueHelper { public: instance_trial_of_the_crusader(Map* pMap); @@ -33,15 +56,27 @@ class MANGOS_DLL_DECL instance_trial_of_the_crusader : public ScriptedInstance void Initialize(); bool IsEncounterInProgress() const; + void OnCreatureCreate(Creature* pCreature); + void OnObjectCreate(GameObject* pGo); + + void OnPlayerEnter(Player* pPlayer); + void SetData(uint32 uiType, uint32 uiData); uint32 GetData(uint32 uiType); const char* Save() { return m_strInstData.c_str(); } void Load(const char* chrIn); + void Update(uint32 uiDiff) { DialogueUpdate(uiDiff); } + private: + void DoSummonRamsey(uint32 uiEntry); + void JustDidDialogueStep(int32 iEntry); + uint32 m_auiEncounter[MAX_ENCOUNTER]; std::string m_strInstData; + + Team m_uiTeam; }; #endif diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 1f5ac5c0a..6a4ea5253 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2249" + #define SD2_REVISION_NR "2250" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 36d5757ef..953eea0af 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -470,6 +470,7 @@ UPDATE creature_template SET ScriptName='boss_the_lurker_below' WHERE entry=2121 /* TRIAL OF THE CRUSADER */ UPDATE instance_template SET ScriptName='instance_trial_of_the_crusader' WHERE map=649; +UPDATE creature_template SET ScriptName='npc_barrett_ramsey' WHERE entry IN (34816, 35035, 35766, 35770, 35771); UPDATE creature_template SET ScriptName='boss_gormok' WHERE entry=34796; UPDATE creature_template SET ScriptName='boss_acidmaw' WHERE entry=35144; UPDATE creature_template SET ScriptName='boss_dreadscale' WHERE entry=34799; diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 50e68688f..6d50bf4d2 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -3640,9 +3640,9 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1649021,'The Horde demands justice! We challenge the Alliance. Allow us to battle in place of your knights, paladin. We will show these dogs what it means to insult the Horde!',16023,1,0,0,'garrosh SAY_GARROSH_PVP_A_INTRO_1'), (-1649022,'Our honor has been besmirched! They make wild claims and false accusations against us. I demand justice! Allow my champions to fight in place of your knights, Tirion. We challenge the Horde!',16066,1,0,0,'varian SAY_VARIAN_PVP_H_INTRO_1'), (-1649023,'Very well, I will allow it. Fight with honor!',16048,1,0,0,'tirion SAY_TIRION_PVP_INTRO_2'), -(-1649024,'Fight for the glory of the Alliance, heroes! Honor your king and your people!',16065,1,0,0,'varian SAY_VARIAN_PVP_A_INTRO_2'), -(-1649025,'Show them no mercy, Horde champions! LOK\'TAR OGAR!',16022,1,0,0,'garrosh SAY_GARROSH_PVP_H_INTRO_2'), -(-1649026,'Glory to the alliance.',16067,1,0,0,'varian SAY_VARIAN_PVP_A_WIN'), +(-1649024,'Fight for the glory of the Alliance, heroes! Honor your king and your people!',16065,1,0,0,'varian SAY_VARIAN_PVP_H_INTRO_2'), +(-1649025,'Show them no mercy, Horde champions! LOK\'TAR OGAR!',16022,1,0,0,'garrosh SAY_GARROSH_PVP_A_INTRO_2'), +(-1649026,'GLORY TO THE ALLIANCE!',16067,1,0,0,'varian SAY_VARIAN_PVP_A_WIN'), (-1649027,'That was just a taste of what the future brings. FOR THE HORDE!',16024,1,0,0,'garrosh SAY_GARROSH_PVP_H_WIN'), (-1649028,'A shallow and tragic victory. We are weaker as a whole from the losses suffered today. Who but the Lich King could benefit from such foolishness? Great warriors have lost their lives. And for what? The true threat looms ahead - the Lich King awaits us all in death.',16049,1,0,0,'tirion SAY_TIRION_PVP_WIN'), @@ -3656,7 +3656,7 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1649035,'Arthas! You are hopelessly outnumbered! Lay down Frostmourne and I will grant you a just death.',16052,1,0,0,'tirion SAY_TIRION_ABUN_INTRO_1'), (-1649036,'The Nerubians built an empire beneath the frozen wastes of Northrend. An empire that you so foolishly built your structures upon. MY EMPIRE.',16322,1,0,0,'lich_king SAY_LKING_ANUB_INTRO_2'), (-1649037,'The souls of your fallen champions will be mine, Fordring.',16323,1,0,0,'lich_king SAY_LKING_ANUB_INTRO_3'), -(-1649038,'Ahhh... Our guests arrived, just as the master promised.',16235,1,0,0,'anubarak SAY_ANUB_ANUB_INTRO_1'), +(-1649038,'Ahhh, our guests have arrived, just as the master promised.',16235,1,0,0,'anubarak SAY_ANUB_ANUB_INTRO_1'), (-1649039,'%s glares at $N and lets out a bellowing roar!',0,3,0,0,'icehowl EMOTE_MASSIVE_CRASH'), @@ -3944,7 +3944,18 @@ INSERT INTO gossip_texts (entry,content_default,comment) VALUES -- -3 649 000 TRIAL OF CRUSADER INSERT INTO gossip_texts (entry,content_default,comment) VALUES -(-3649000,'Yes. We are prepared for the challenges ahead of us.','barrett GOSSIP_ITEM_START_EVENT1'); +(-3649000,'Yes. We are prepared for the challenges ahead of us.','barrett GOSSIP_ITEM_BEAST_INIT'), +(-3649001,'Bring forth the first challenge!','barrett GOSSIP_ITEM_BEAST_START'), +(-3649002,'We want another shot at those beasts!','barrett GOSSIP_ITEM_BEAST_WIPE_INIT'), +(-3649003,'What new challenge awaits us?','barrett GOSSIP_ITEM_JARAXXUS_INIT'), +(-3649004,'We\'re ready to fight the sorceror again.','barrett GOSSIP_ITEM_JARAXXUS_WIPE_INIT'), +(-3649005,'Of course!','barrett GOSSIP_ITEM_PVP_INIT'), +(-3649006,'Give the signal! We\'re ready to go!','barrett GOSSIP_ITEM_PVP_START'), +(-3649007,'That tough, huh?','barrett GOSSIP_ITEM_TWINS_INIT'), +(-3649008,'Val\'kyr? We\'re ready for them','barrett GOSSIP_ITEM_TWINS_START'), +(-3649009,'Your words of praise are appreciated, Coliseum Master.','barrett GOSSIP_ITEM_ANUB_INIT'), +(-3649010,'That is strange...','barrett GOSSIP_ITEM_ANUB_START'); + -- -- Below just for beautiful view in table, run at own desire diff --git a/sql/updates/r2250_mangos.sql b/sql/updates/r2250_mangos.sql new file mode 100644 index 000000000..8ea3fd994 --- /dev/null +++ b/sql/updates/r2250_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_barrett_ramsey' WHERE entry IN (34816, 35035, 35766, 35770, 35771); diff --git a/sql/updates/r2250_scriptdev2.sql b/sql/updates/r2250_scriptdev2.sql new file mode 100644 index 000000000..1f16702e3 --- /dev/null +++ b/sql/updates/r2250_scriptdev2.sql @@ -0,0 +1,18 @@ +UPDATE script_texts SET comment='varian SAY_VARIAN_PVP_H_INTRO_2' WHERE entry=-1649024; +UPDATE script_texts SET comment='garrosh SAY_GARROSH_PVP_A_INTRO_2' WHERE entry=-1649025; +UPDATE script_texts SET content_default='GLORY TO THE ALLIANCE!' WHERE entry=-1649026; +UPDATE script_texts SET content_default='Ahhh, our guests have arrived, just as the master promised.' WHERE entry=-1649038; + +UPDATE gossip_texts SET comment='barrett GOSSIP_ITEM_BEAST_INIT' WHERE entry=-3649000; +DELETE FROM gossip_texts WHERE entry BETWEEN -3649010 AND -3649001; +INSERT INTO gossip_texts (entry,content_default,comment) VALUES +(-3649001,'Bring forth the first challenge!','barrett GOSSIP_ITEM_BEAST_START'), +(-3649002,'We want another shot at those beasts!','barrett GOSSIP_ITEM_BEAST_WIPE_INIT'), +(-3649003,'What new challenge awaits us?','barrett GOSSIP_ITEM_JARAXXUS_INIT'), +(-3649004,'We\'re ready to fight the sorceror again.','barrett GOSSIP_ITEM_JARAXXUS_WIPE_INIT'), +(-3649005,'Of course!','barrett GOSSIP_ITEM_PVP_INIT'), +(-3649006,'Give the signal! We\'re ready to go!','barrett GOSSIP_ITEM_PVP_START'), +(-3649007,'That tough, huh?','barrett GOSSIP_ITEM_TWINS_INIT'), +(-3649008,'Val\'kyr? We\'re ready for them','barrett GOSSIP_ITEM_TWINS_START'), +(-3649009,'Your words of praise are appreciated, Coliseum Master.','barrett GOSSIP_ITEM_ANUB_INIT'), +(-3649010,'That is strange...','barrett GOSSIP_ITEM_ANUB_START'); From ba4ce0c398ed7b0f0a86d17653e859f8b8704a9e Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Thu, 21 Jul 2011 15:24:53 +0200 Subject: [PATCH 0231/1172] [2251] Add Summon positions and basic boss summons to ToC25 --- .../instance_trial_of_the_crusader.cpp | 19 +++++++++++++++++++ .../trial_of_the_crusader.h | 13 +++++++++++++ sd2_revision_nr.h | 2 +- 3 files changed, 33 insertions(+), 1 deletion(-) diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp index 6914edb63..c07aa32c2 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp @@ -348,6 +348,25 @@ void instance_trial_of_the_crusader::JustDidDialogueStep(int32 iEntry) case NPC_RAMSEY_5: DoSummonRamsey(iEntry); break; + case SAY_VARIAN_BEAST_1: + if (Player* pPlayer = GetPlayerInMap()) + pPlayer->SummonCreature(NPC_BEAST_COMBAT_STALKER, aSpawnPositions[0][0], aSpawnPositions[0][1], aSpawnPositions[0][2], aSpawnPositions[0][3], TEMPSUMMON_DEAD_DESPAWN, 0); + break; + case NPC_FIZZLEBANG: + if (Player* pPlayer = GetPlayerInMap()) + pPlayer->SummonCreature(NPC_FIZZLEBANG, aSpawnPositions[5][0], aSpawnPositions[5][1], aSpawnPositions[5][2], aSpawnPositions[5][3], TEMPSUMMON_DEAD_DESPAWN, 0); + break; + case SAY_WILFRED_JARAXXUS_INTRO_3: + if (Player* pPlayer = GetPlayerInMap()) + pPlayer->SummonCreature(NPC_JARAXXUS, aSpawnPositions[6][0], aSpawnPositions[6][1], aSpawnPositions[6][2], aSpawnPositions[6][3], TEMPSUMMON_DEAD_DESPAWN, 0); + break; + case NPC_FJOLA: + if (Player* pPlayer = GetPlayerInMap()) + { + pPlayer->SummonCreature(NPC_FJOLA, aSpawnPositions[7][0], aSpawnPositions[7][1], aSpawnPositions[7][2], aSpawnPositions[7][3], TEMPSUMMON_DEAD_DESPAWN, 0); + pPlayer->SummonCreature(NPC_EYDIS, aSpawnPositions[8][0], aSpawnPositions[8][1], aSpawnPositions[8][2], aSpawnPositions[8][3], TEMPSUMMON_DEAD_DESPAWN, 0); + } + break; } } diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h index 41df6b7d2..eb8b32ea5 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h @@ -48,6 +48,19 @@ static const float aRamsayPositions[2][4] = {563.556f, 78.72571f, 395.2125f, 0.0f} // Movement Position }; +static const float aSpawnPositions[][4] = +{ + {563.8941f, 137.3333f, 405.8467f, 0.0f}, // Beast combat stalker (Summoned when SAY_VARIAN_BEAST_1) + {563.9358f, 229.8299f, 394.8061f, 4.694936f}, // Gormok (vehicle) (Summoned when SAY_VARIAN_BEAST_1) + {564.3301f, 232.1549f, 394.8188f, 1.621917f}, // Dreadscale (Summoned when Tirion says SAY_TIRION_BEAST_2) + {549.5139f, 170.1389f, 394.7965f, 5.009095f}, // Acidmaw (Summoned(?) 14s after Dreadscale) + {563.6081f, 228.1491f, 394.7057f, 4.664022f}, // Icehowl (Summoned when SAY_TIRION_BEAST_3) + {563.6007f, 208.5278f, 395.2696f, 4.729842f}, // Fizzlebang + {563.8264f, 140.6563f, 393.9861f, 4.694936f}, // Jaraxxus + {571.684f, 204.9028f, 399.263f, 4.590216f}, // Fjola + {555.4514f, 205.8889f, 399.2634f, 4.886922f}, // Eydis +}; + class MANGOS_DLL_DECL instance_trial_of_the_crusader : public ScriptedInstance, private DialogueHelper { public: diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 6a4ea5253..e380a8c7c 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2250" + #define SD2_REVISION_NR "2251" #endif // __SD2_REVISION_NR_H__ From 1965c8f68d2b3fcb4d773858148631b50d453191 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Thu, 21 Jul 2011 15:57:22 +0200 Subject: [PATCH 0232/1172] [2252] Add script for Beast Event Controller (ToC25) --- .../trial_of_the_crusader/boss_jaraxxus.cpp | 15 +- .../boss_northrend_beasts.cpp | 162 ++++++++++++++---- .../boss_twin_valkyr.cpp | 18 +- .../instance_trial_of_the_crusader.cpp | 7 +- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 + sql/updates/r2252_mangos.sql | 1 + 7 files changed, 153 insertions(+), 53 deletions(-) create mode 100644 sql/updates/r2252_mangos.sql diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_jaraxxus.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_jaraxxus.cpp index 41cec867d..0b30df27c 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_jaraxxus.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_jaraxxus.cpp @@ -54,7 +54,7 @@ struct MANGOS_DLL_DECL boss_jaraxxusAI : public ScriptedAI void JustReachedHome() { if (m_pInstance) - m_pInstance->SetData(TYPE_JARAXXUS, NOT_STARTED); + m_pInstance->SetData(TYPE_JARAXXUS, FAIL); } void JustDied(Unit* pKiller) @@ -65,6 +65,9 @@ struct MANGOS_DLL_DECL boss_jaraxxusAI : public ScriptedAI void Aggro(Unit* pWho) { + if (m_pInstance) + m_pInstance->SetData(TYPE_JARAXXUS, IN_PROGRESS); + m_creature->SetInCombatWithZone(); } @@ -84,10 +87,10 @@ CreatureAI* GetAI_boss_jaraxxus(Creature* pCreature) void AddSC_boss_jaraxxus() { - Script* newscript; + Script* pNewScript; - newscript = new Script; - newscript->Name = "boss_jaraxxus"; - newscript->GetAI = &GetAI_boss_jaraxxus; - newscript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "boss_jaraxxus"; + pNewScript->GetAI = &GetAI_boss_jaraxxus; + pNewScript->RegisterSelf(); } diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp index ee1cfe248..17a8b52ff 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp @@ -24,10 +24,111 @@ EndScriptData */ #include "precompiled.h" #include "trial_of_the_crusader.h" +/*###### +## npc_beast_combat_stalker +######*/ + +enum +{ + SAY_TIRION_BEAST_2 = -1649005, + SAY_TIRION_BEAST_3 = -1649006, +}; + // TODO need to script npc 36549 - Beast Combat Stalker, set into combat in begin, destroy on end +struct MANGOS_DLL_DECL npc_beast_combat_stalkerAI : public ScriptedAI +{ + npc_beast_combat_stalkerAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_vSummonedBossGuids.reserve(4); + Reset(); + m_creature->SetInCombatWithZone(); + } + + ScriptedInstance* m_pInstance; + GUIDVector m_vSummonedBossGuids; + bool m_bFirstWormDied; + + void Reset() + { + m_bFirstWormDied = true; // TODO - change to = false; when second worm handling is implemented. + } + + void JustReachedHome() + { + if (m_pInstance) + m_pInstance->SetData(TYPE_NORTHREND_BEASTS, FAIL); + + for (GUIDVector::const_iterator itr = m_vSummonedBossGuids.begin(); itr != m_vSummonedBossGuids.end(); ++itr) + { + if (Creature* pBoss = m_creature->GetMap()->GetCreature(*itr)) + pBoss->ForcedDespawn(); + } + + m_vSummonedBossGuids.clear(); + m_creature->ForcedDespawn(); + } + + void Aggro(Unit* pWho) + { + if (m_pInstance) + m_pInstance->SetData(TYPE_NORTHREND_BEASTS, IN_PROGRESS); + } + + void JustSummoned(Creature* pSummoned) + { + m_vSummonedBossGuids.push_back(pSummoned->GetObjectGuid()); + pSummoned->SetInCombatWithZone(); // TODO correct? + } + + void SummonedCreatureJustDied(Creature* pSummoned) + { + if (!m_pInstance) + return; + + switch (pSummoned->GetEntry()) + { + case NPC_GORMOK: + if (Creature* pTirion = m_pInstance->GetSingleCreatureFromStorage(NPC_TIRION_A)) + DoScriptText(SAY_TIRION_BEAST_2, pTirion); + + m_creature->SummonCreature(NPC_DREADSCALE, aSpawnPositions[2][0], aSpawnPositions[2][1], aSpawnPositions[2][2], aSpawnPositions[2][3], TEMPSUMMON_DEAD_DESPAWN, 0); + break; + + case NPC_DREADSCALE: + case NPC_ACIDMAW: + if (m_bFirstWormDied) + { + if (Creature* pTirion = m_pInstance->GetSingleCreatureFromStorage(NPC_TIRION_A)) + DoScriptText(SAY_TIRION_BEAST_3, pTirion); + + m_creature->SummonCreature(NPC_ICEHOWL, aSpawnPositions[4][0], aSpawnPositions[4][1], aSpawnPositions[4][2], aSpawnPositions[4][3], TEMPSUMMON_DEAD_DESPAWN, 0); + } + else + m_bFirstWormDied = true; + break; + + case NPC_ICEHOWL: + m_pInstance->SetData(TYPE_NORTHREND_BEASTS, DONE); + m_creature->ForcedDespawn(); + break; + } + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + } +}; + +CreatureAI* GetAI_npc_beast_combat_stalker(Creature* pCreature) +{ + return new npc_beast_combat_stalkerAI(pCreature); +} /*###### -## boss_gormok +## boss_gormok, vehicle driven by 34800 (multiple times) ######*/ struct MANGOS_DLL_DECL boss_gormokAI : public ScriptedAI @@ -44,13 +145,10 @@ struct MANGOS_DLL_DECL boss_gormokAI : public ScriptedAI void JustReachedHome() { - if (m_pInstance) - m_pInstance->SetData(TYPE_NORTHREND_BEASTS, NOT_STARTED); } void Aggro(Unit* pWho) { - m_creature->SetInCombatWithZone(); } void UpdateAI(const uint32 uiDiff) @@ -85,13 +183,10 @@ struct MANGOS_DLL_DECL boss_acidmawAI : public ScriptedAI void JustReachedHome() { - if (m_pInstance) - m_pInstance->SetData(TYPE_NORTHREND_BEASTS, NOT_STARTED); } void Aggro(Unit* pWho) { - m_creature->SetInCombatWithZone(); } void UpdateAI(const uint32 uiDiff) @@ -126,13 +221,10 @@ struct MANGOS_DLL_DECL boss_dreadscaleAI : public ScriptedAI void JustReachedHome() { - if (m_pInstance) - m_pInstance->SetData(TYPE_NORTHREND_BEASTS, NOT_STARTED); } void Aggro(Unit* pWho) { - m_creature->SetInCombatWithZone(); } void UpdateAI(const uint32 uiDiff) @@ -172,13 +264,10 @@ struct MANGOS_DLL_DECL boss_icehowlAI : public ScriptedAI void JustReachedHome() { - if (m_pInstance) - m_pInstance->SetData(TYPE_NORTHREND_BEASTS, NOT_STARTED); } void Aggro(Unit* pWho) { - m_creature->SetInCombatWithZone(); } void UpdateAI(const uint32 uiDiff) @@ -197,26 +286,31 @@ CreatureAI* GetAI_boss_icehowl(Creature* pCreature) void AddSC_northrend_beasts() { - Script* newscript; - - newscript = new Script; - newscript->Name = "boss_gormok"; - newscript->GetAI = &GetAI_boss_gormok; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "boss_acidmaw"; - newscript->GetAI = &GetAI_boss_acidmaw; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "boss_dreadscale"; - newscript->GetAI = &GetAI_boss_dreadscale; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "boss_icehowl"; - newscript->GetAI = &GetAI_boss_icehowl; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "npc_beast_combat_stalker"; + pNewScript->GetAI = &GetAI_npc_beast_combat_stalker; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "boss_gormok"; + pNewScript->GetAI = &GetAI_boss_gormok; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "boss_acidmaw"; + pNewScript->GetAI = &GetAI_boss_acidmaw; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "boss_dreadscale"; + pNewScript->GetAI = &GetAI_boss_dreadscale; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "boss_icehowl"; + pNewScript->GetAI = &GetAI_boss_icehowl; + pNewScript->RegisterSelf(); } diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp index 08d4731b6..59b703116 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp @@ -98,15 +98,15 @@ CreatureAI* GetAI_boss_eydis(Creature* pCreature) void AddSC_twin_valkyr() { - Script* newscript; + Script* pNewScript; - newscript = new Script; - newscript->Name = "boss_fjola"; - newscript->GetAI = &GetAI_boss_fjola; - newscript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "boss_fjola"; + pNewScript->GetAI = &GetAI_boss_fjola; + pNewScript->RegisterSelf(); - newscript = new Script; - newscript->Name = "boss_eydis"; - newscript->GetAI = &GetAI_boss_fjola; - newscript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "boss_eydis"; + pNewScript->GetAI = &GetAI_boss_fjola; + pNewScript->RegisterSelf(); } diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp index c07aa32c2..d8da5a1ae 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp @@ -42,8 +42,6 @@ enum SAY_TIRION_BEAST_1 = -1649002, SAY_VARIAN_BEAST_1 = -1649003, SAY_GARROSH_BEAST_1 = -1649004, - SAY_TIRION_BEAST_2 = -1649005, - SAY_TIRION_BEAST_3 = -1649006, SAY_TIRION_BEAST_SLAY = -1649007, SAY_TIRION_BEAST_WIPE = -1649008, @@ -350,7 +348,10 @@ void instance_trial_of_the_crusader::JustDidDialogueStep(int32 iEntry) break; case SAY_VARIAN_BEAST_1: if (Player* pPlayer = GetPlayerInMap()) - pPlayer->SummonCreature(NPC_BEAST_COMBAT_STALKER, aSpawnPositions[0][0], aSpawnPositions[0][1], aSpawnPositions[0][2], aSpawnPositions[0][3], TEMPSUMMON_DEAD_DESPAWN, 0); + { + if (Creature* pBeasts = pPlayer->SummonCreature(NPC_BEAST_COMBAT_STALKER, aSpawnPositions[0][0], aSpawnPositions[0][1], aSpawnPositions[0][2], aSpawnPositions[0][3], TEMPSUMMON_DEAD_DESPAWN, 0)) + pBeasts->SummonCreature(NPC_GORMOK, aSpawnPositions[1][0], aSpawnPositions[1][1], aSpawnPositions[1][2], aSpawnPositions[1][3], TEMPSUMMON_DEAD_DESPAWN, 0); + } break; case NPC_FIZZLEBANG: if (Player* pPlayer = GetPlayerInMap()) diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index e380a8c7c..fb301a694 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2251" + #define SD2_REVISION_NR "2252" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 953eea0af..14c84d729 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -471,6 +471,7 @@ UPDATE creature_template SET ScriptName='boss_the_lurker_below' WHERE entry=2121 /* TRIAL OF THE CRUSADER */ UPDATE instance_template SET ScriptName='instance_trial_of_the_crusader' WHERE map=649; UPDATE creature_template SET ScriptName='npc_barrett_ramsey' WHERE entry IN (34816, 35035, 35766, 35770, 35771); +UPDATE creature_template SET ScriptName='npc_beast_combat_stalker' WHERE entry=36549; UPDATE creature_template SET ScriptName='boss_gormok' WHERE entry=34796; UPDATE creature_template SET ScriptName='boss_acidmaw' WHERE entry=35144; UPDATE creature_template SET ScriptName='boss_dreadscale' WHERE entry=34799; diff --git a/sql/updates/r2252_mangos.sql b/sql/updates/r2252_mangos.sql new file mode 100644 index 000000000..87a785571 --- /dev/null +++ b/sql/updates/r2252_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_beast_combat_stalker' WHERE entry=36549; From 1c7890e32970a1b169ae2fb82af4f9ea101ffe65 Mon Sep 17 00:00:00 2001 From: Azelen Date: Thu, 21 Jul 2011 21:07:04 +0200 Subject: [PATCH 0233/1172] [2253] Fix text enums for ICC --- .../icecrown_citadel/blood_prince_council.cpp | 40 ++++----- .../boss_blood_queen_lanathel.cpp | 18 ++-- .../boss_deathbringer_saurfang.cpp | 84 +++++++++---------- .../icecrown_citadel/boss_festergut.cpp | 22 ++--- .../boss_lady_deathwhisper.cpp | 34 ++++---- .../icecrown_citadel/boss_lord_marrowgar.cpp | 20 ++--- .../boss_professor_putricide.cpp | 18 ++-- .../icecrown_citadel/boss_rotface.cpp | 22 ++--- .../icecrown_citadel/boss_sindragosa.cpp | 20 ++--- .../icecrown_citadel/boss_the_lich_king.cpp | 70 ++++++++-------- .../boss_valithria_dreamwalker.cpp | 36 ++++---- sd2_revision_nr.h | 2 +- 12 files changed, 193 insertions(+), 193 deletions(-) diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/blood_prince_council.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/blood_prince_council.cpp index 2ceee96ba..57838d23c 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/blood_prince_council.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/blood_prince_council.cpp @@ -25,26 +25,26 @@ EndScriptData */ enum { - SAY_COUNCIL_INTRO_1 = 1631101, // Intro by Bloodqueen - SAY_COUNCIL_INTRO_2 = 1631102, - SAY_KELESETH_INVOCATION = 1631103, - SAY_KELESETH_SPECIAL = 1631104, - SAY_KELESETH_SLAY_1 = 1631105, - SAY_SKELESETH_SLAY_2 = 1631106, - SAY_KELESETH_BERSERK = 1631107, - SAY_KELESETH_DEATH = 1631108, - SAY_TALDARAM_INVOCATION = 1631109, - SAY_TALDARAM_SPECIAL = 1631110, - SAY_TALDARAM_SLAY_1 = 1631111, - SAY_TALDARAM_SLAY_2 = 1631112, - SAY_TALDARAM_BERSERK = 1631113, - SAY_TALDARAM_DEATH = 1631114, - SAY_VALANAR_INVOCATION = 1631115, - SAY_VALANAR_SPECIAL = 1631116, - SAY_VALANAR_SLAY_1 = 1631117, - SAY_VALANAR_SLAY_2 = 1631118, - SAY_VALANAR_BERSERK = 1631119, - SAY_VALANAR_DEATH = 1631120, + SAY_COUNCIL_INTRO_1 = -1631101, // Intro by Bloodqueen + SAY_COUNCIL_INTRO_2 = -1631102, + SAY_KELESETH_INVOCATION = -1631103, + SAY_KELESETH_SPECIAL = -1631104, + SAY_KELESETH_SLAY_1 = -1631105, + SAY_SKELESETH_SLAY_2 = -1631106, + SAY_KELESETH_BERSERK = -1631107, + SAY_KELESETH_DEATH = -1631108, + SAY_TALDARAM_INVOCATION = -1631109, + SAY_TALDARAM_SPECIAL = -1631110, + SAY_TALDARAM_SLAY_1 = -1631111, + SAY_TALDARAM_SLAY_2 = -1631112, + SAY_TALDARAM_BERSERK = -1631113, + SAY_TALDARAM_DEATH = -1631114, + SAY_VALANAR_INVOCATION = -1631115, + SAY_VALANAR_SPECIAL = -1631116, + SAY_VALANAR_SLAY_1 = -1631117, + SAY_VALANAR_SLAY_2 = -1631118, + SAY_VALANAR_BERSERK = -1631119, + SAY_VALANAR_DEATH = -1631120, }; void AddSC_blood_prince_council() diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_blood_queen_lanathel.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_blood_queen_lanathel.cpp index bb5e22825..55cbaed7b 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_blood_queen_lanathel.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_blood_queen_lanathel.cpp @@ -25,15 +25,15 @@ EndScriptData */ enum { - SAY_AGGRO = 1631121, - SAY_BITE_1 = 1631122, - SAY_BITE_2 = 1631123, - SAY_SHADOWS = 1631124, - SAY_PACT = 1631125, - SAY_MC = 1631126, - SAY_AIR_PHASE = 1631127, - SAY_BERSERK = 1631128, - SAY_DEATH = 1631129, + SAY_AGGRO = -1631121, + SAY_BITE_1 = -1631122, + SAY_BITE_2 = -1631123, + SAY_SHADOWS = -1631124, + SAY_PACT = -1631125, + SAY_MC = -1631126, + SAY_AIR_PHASE = -1631127, + SAY_BERSERK = -1631128, + SAY_DEATH = -1631129, }; void AddSC_boss_blood_queen_lanathel() diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp index 0bdb2e7e8..004d9d7e0 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp @@ -25,48 +25,48 @@ EndScriptData */ enum { - SAY_AGGRO = 1631028, - SAY_FALLENCHAMPION = 1631029, - SAY_BLOODBEASTS = 1631030, - SAY_SLAY_1 = 1631031, - SAY_SLAY_2 = 1631032, - SAY_BERSERK = 1631033, - SAY_DEATH = 1631034, - SAY_INTRO_ALLY_0 = 1631035, - SAY_INTRO_ALLY_1 = 1631036, - SAY_INTRO_ALLY_2 = 1631037, - SAY_INTRO_ALLY_3 = 1631038, - SAY_INTRO_ALLY_4 = 1631039, - SAY_INTRO_ALLY_5 = 1631040, - SAY_INTRO_HORDE_1 = 1631041, - SAY_INTRO_HORDE_2 = 1631042, - SAY_INTRO_HORDE_3 = 1631043, - SAY_INTRO_HORDE_4 = 1631044, - SAY_INTRO_HORDE_5 = 1631045, - SAY_INTRO_HORDE_6 = 1631046, - SAY_INTRO_HORDE_7 = 1631047, - SAY_INTRO_HORDE_8 = 1631048, - SAY_INTRO_HORDE_9 = 1631049, - SAY_OUTRO_ALLY_1 = 1631050, - SAY_OUTRO_ALLY_2 = 1631051, - SAY_OUTRO_ALLY_3 = 1631052, - SAY_OUTRO_ALLY_4 = 1631053, - SAY_OUTRO_ALLY_5 = 1631054, - SAY_OUTRO_ALLY_6 = 1631055, - SAY_OUTRO_ALLY_7 = 1631056, - SAY_OUTRO_ALLY_8 = 1631057, - SAY_OUTRO_ALLY_9 = 1631058, - SAY_OUTRO_ALLY_10 = 1631059, - SAY_OUTRO_ALLY_11 = 1631060, - SAY_OUTRO_ALLY_12 = 1631061, - SAY_OUTRO_ALLY_13 = 1631062, - SAY_OUTRO_ALLY_14 = 1631063, - SAY_OUTRO_ALLY_15 = 1631064, - SAY_OUTRO_ALLY_16 = 1631065, - SAY_OUTRO_HORDE_1 = 1631066, - SAY_OUTRO_HORDE_2 = 1631067, - SAY_OUTRO_HORDE_3 = 1631068, - SAY_OUTRO_HORDE_4 = 1631069, + SAY_AGGRO = -1631028, + SAY_FALLENCHAMPION = -1631029, + SAY_BLOODBEASTS = -1631030, + SAY_SLAY_1 = -1631031, + SAY_SLAY_2 = -1631032, + SAY_BERSERK = -1631033, + SAY_DEATH = -1631034, + SAY_INTRO_ALLY_0 = -1631035, + SAY_INTRO_ALLY_1 = -1631036, + SAY_INTRO_ALLY_2 = -1631037, + SAY_INTRO_ALLY_3 = -1631038, + SAY_INTRO_ALLY_4 = -1631039, + SAY_INTRO_ALLY_5 = -1631040, + SAY_INTRO_HORDE_1 = -1631041, + SAY_INTRO_HORDE_2 = -1631042, + SAY_INTRO_HORDE_3 = -1631043, + SAY_INTRO_HORDE_4 = -1631044, + SAY_INTRO_HORDE_5 = -1631045, + SAY_INTRO_HORDE_6 = -1631046, + SAY_INTRO_HORDE_7 = -1631047, + SAY_INTRO_HORDE_8 = -1631048, + SAY_INTRO_HORDE_9 = -1631049, + SAY_OUTRO_ALLY_1 = -1631050, + SAY_OUTRO_ALLY_2 = -1631051, + SAY_OUTRO_ALLY_3 = -1631052, + SAY_OUTRO_ALLY_4 = -1631053, + SAY_OUTRO_ALLY_5 = -1631054, + SAY_OUTRO_ALLY_6 = -1631055, + SAY_OUTRO_ALLY_7 = -1631056, + SAY_OUTRO_ALLY_8 = -1631057, + SAY_OUTRO_ALLY_9 = -1631058, + SAY_OUTRO_ALLY_10 = -1631059, + SAY_OUTRO_ALLY_11 = -1631060, + SAY_OUTRO_ALLY_12 = -1631061, + SAY_OUTRO_ALLY_13 = -1631062, + SAY_OUTRO_ALLY_14 = -1631063, + SAY_OUTRO_ALLY_15 = -1631064, + SAY_OUTRO_ALLY_16 = -1631065, + SAY_OUTRO_HORDE_1 = -1631066, + SAY_OUTRO_HORDE_2 = -1631067, + SAY_OUTRO_HORDE_3 = -1631068, + SAY_OUTRO_HORDE_4 = -1631069, }; void AddSC_boss_deathbringer_saurfang() diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_festergut.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_festergut.cpp index ddb3ca2f5..d0ce13034 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_festergut.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_festergut.cpp @@ -25,17 +25,17 @@ EndScriptData */ enum { - SAY_STINKY_DIES = 1631081, - SAY_AGGRO = 1631082, - SAY_BLIGHT = 1631083, - SAY_SPORE = 1631084, - SAY_PUNGUENT_BLIGHT = 1631085, - SAY_PUNGUENT_BLIGHT_EMOTE = 1631086, - SAY_SLAY_1 = 1631087, - SAY_SLAY_2 = 1631088, - SAY_BERSERK = 1631089, - SAY_DEATH = 1631090, - SAY_FESTERGUT_DEATH = 1631091, + SAY_STINKY_DIES = -1631081, + SAY_AGGRO = -1631082, + SAY_BLIGHT = -1631083, + SAY_SPORE = -1631084, + SAY_PUNGUENT_BLIGHT = -1631085, + SAY_PUNGUENT_BLIGHT_EMOTE = -1631086, + SAY_SLAY_1 = -1631087, + SAY_SLAY_2 = -1631088, + SAY_BERSERK = -1631089, + SAY_DEATH = -1631090, + SAY_FESTERGUT_DEATH = -1631091, }; void AddSC_boss_festergut() diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lady_deathwhisper.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lady_deathwhisper.cpp index 89192a509..848329f6b 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lady_deathwhisper.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lady_deathwhisper.cpp @@ -25,23 +25,23 @@ EndScriptData */ enum { - SAY_SPEECH_1 = 1631011, - SAY_SPEECH_2 = 1631012, - SAY_SPEECH_3 = 1631013, - SAY_SPEECH_4 = 1631014, - SAY_SPEECH_5 = 1631015, - SAY_SPEECH_6 = 1631016, - SAY_SPEECH_7 = 1631017, - SAY_AGGRO = 1631018, - SAY_PHASE_TWO = 1631019, - SAY_DARK_EMPOWERMENT = 1631020, - SAY_DARK_TRANSFORMATION = 1631021, - SAY_ANIMATE_DEAD = 1631022, - SAY_DOMINATE_MIND = 1631023, - SAY_BERSERK = 1631024, - SAY_DEATH = 1631025, - SAY_SLAY_1 = 1631026, - SAY_SLAY_2 = 1631027, + SAY_SPEECH_1 = -1631011, + SAY_SPEECH_2 = -1631012, + SAY_SPEECH_3 = -1631013, + SAY_SPEECH_4 = -1631014, + SAY_SPEECH_5 = -1631015, + SAY_SPEECH_6 = -1631016, + SAY_SPEECH_7 = -1631017, + SAY_AGGRO = -1631018, + SAY_PHASE_TWO = -1631019, + SAY_DARK_EMPOWERMENT = -1631020, + SAY_DARK_TRANSFORMATION = -1631021, + SAY_ANIMATE_DEAD = -1631022, + SAY_DOMINATE_MIND = -1631023, + SAY_BERSERK = -1631024, + SAY_DEATH = -1631025, + SAY_SLAY_1 = -1631026, + SAY_SLAY_2 = -1631027, }; void AddSC_boss_lady_deathwhisper() diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp index 440b7d64f..2624cc5b0 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp @@ -25,16 +25,16 @@ EndScriptData */ enum { - SAY_INTRO = 1631001, - SAY_AGGRO = 1631002, - SAY_BONE_STORM = 1631003, - SAY_BONE_SPIKE_1 = 1631004, - SAY_BONE_SPIKE_2 = 1631005, - SAY_BONE_SPIKE_3 = 1631006, - SAY_SLAY_1 = 1631007, - SAY_SLAY_2 = 1631008, - SAY_DEATH = 1631009, - SAY_BERSERK = 1631010, + SAY_INTRO = -1631001, + SAY_AGGRO = -1631002, + SAY_BONE_STORM = -1631003, + SAY_BONE_SPIKE_1 = -1631004, + SAY_BONE_SPIKE_2 = -1631005, + SAY_BONE_SPIKE_3 = -1631006, + SAY_SLAY_1 = -1631007, + SAY_SLAY_2 = -1631008, + SAY_DEATH = -1631009, + SAY_BERSERK = -1631010, }; void AddSC_boss_lord_marrowgar() diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_professor_putricide.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_professor_putricide.cpp index d8e288191..a6a2adfa4 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_professor_putricide.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_professor_putricide.cpp @@ -25,15 +25,15 @@ EndScriptData */ enum { - SAY_AGGRO = 1631092, - SAY_AIRLOCK = 1631093, - SAY_PHASE_CHANGE = 1631094, - SAY_TRANSFORM_1 = 1631095, - SAY_TRANSFORM_2 = 1631096, - SAY_SLAY_1 = 1631097, - SAY_SLAY_2 = 1631098, - SAY_BERSERK = 1631099, - SAY_DEATH = 1631100, + SAY_AGGRO = -1631092, + SAY_AIRLOCK = -1631093, + SAY_PHASE_CHANGE = -1631094, + SAY_TRANSFORM_1 = -1631095, + SAY_TRANSFORM_2 = -1631096, + SAY_SLAY_1 = -1631097, + SAY_SLAY_2 = -1631098, + SAY_BERSERK = -1631099, + SAY_DEATH = -1631100, }; void AddSC_boss_professor_putricide() diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_rotface.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_rotface.cpp index e18634ee8..f2e51e5b5 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_rotface.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_rotface.cpp @@ -25,17 +25,17 @@ EndScriptData */ enum { - SAY_PRECIOUS_DIES = 1631070, - SAY_AGGRO = 1631071, - SAY_SLIME_SPRAY = 1631072, - SAY_OOZE_EXPLODE = 1631073, - SAY_SLIME_FLOW_1 = 1631074, - SAY_SLIME_FLOW_2 = 1631075, - SAY_SLAY_1 = 1631076, - SAY_SLAY_2 = 1631077, - SAY_BERSERK = 1631078, - SAY_DEATH = 1631079, - SAY_ROTFACE_DEATH = 1631080, + SAY_PRECIOUS_DIES = -1631070, + SAY_AGGRO = -1631071, + SAY_SLIME_SPRAY = -1631072, + SAY_OOZE_EXPLODE = -1631073, + SAY_SLIME_FLOW_1 = -1631074, + SAY_SLIME_FLOW_2 = -1631075, + SAY_SLAY_1 = -1631076, + SAY_SLAY_2 = -1631077, + SAY_BERSERK = -1631078, + SAY_DEATH = -1631079, + SAY_ROTFACE_DEATH = -1631080, }; void AddSC_boss_rotface() diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp index 047a31503..4b68903fc 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp @@ -25,16 +25,16 @@ EndScriptData */ enum { - SAY_AGGRO = 1631148, - SAY_UNCHAINED_MAGIC = 1631149, - SAY_BLISTERING_COLD = 1631150, - SAY_RESPIRE = 1631151, - SAY_TAKEOFF = 1631152, - SAY_PHASE_3 = 1631153, - SAY_SLAY_1 = 1631154, - SAY_SLAY_2 = 1631155, - SAY_BERSERK = 1631156, - SAY_DEATH = 1631157, + SAY_AGGRO = -1631148, + SAY_UNCHAINED_MAGIC = -1631149, + SAY_BLISTERING_COLD = -1631150, + SAY_RESPIRE = -1631151, + SAY_TAKEOFF = -1631152, + SAY_PHASE_3 = -1631153, + SAY_SLAY_1 = -1631154, + SAY_SLAY_2 = -1631155, + SAY_BERSERK = -1631156, + SAY_DEATH = -1631157, }; void AddSC_boss_sindragosa() diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_the_lich_king.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_the_lich_king.cpp index 740b6a691..7a79d882f 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_the_lich_king.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_the_lich_king.cpp @@ -25,41 +25,41 @@ EndScriptData */ enum { - SAY_INTRO_1 = 1631158, - SAY_INTRO_2 = 1631159, - SAY_INTRO_3 = 1631160, - SAY_INTRO_4 = 1631161, - SAY_INTRO_5 = 1631162, - SAY_AGGRO = 1631163, - SAY_REMORSELESS_WINTER = 1631164, - SAY_SHATTER_ARENA = 1631165, - SAY_SUMMON_VALKYR = 1631166, - SAY_HARVEST_SOUL = 1631167, - SAY_FM_TERENAS_AID_1 = 1631168, - SAY_FM_TERENAS_AID_2 = 1631169, - SAY_FM_TERENAS_AID_3 = 1631170, - SAY_FM_PLAYER_ESCAPE = 1631171, - SAY_FM_PLAYER_DEATH = 1631172, - SAY_SPECIAL_1 = 1631173, - SAY_SPECIAL_2 = 1631174, - SAY_LAST_PHASE = 1631175, - SAY_SLAY_1 = 1631176, - SAY_SLAY_2 = 1631177, - SAY_ENRAGE = 1631178, - SAY_OUTRO_1 = 1631179, - SAY_OUTRO_2 = 1631180, - SAY_OUTRO_3 = 1631181, - SAY_OUTRO_4 = 1631182, - SAY_OUTRO_5 = 1631183, - SAY_OUTRO_6 = 1631184, - SAY_OUTRO_7 = 1631185, - SAY_OUTRO_8 = 1631186, - SAY_OUTRO_9 = 1631187, - SAY_OUTRO_10 = 1631188, - SAY_OUTRO_11 = 1631189, - SAY_OUTRO_12 = 1631190, - SAY_OUTRO_13 = 1631191, - SAY_OUTRO_14 = 1631192, + SAY_INTRO_1 = -1631158, + SAY_INTRO_2 = -1631159, + SAY_INTRO_3 = -1631160, + SAY_INTRO_4 = -1631161, + SAY_INTRO_5 = -1631162, + SAY_AGGRO = -1631163, + SAY_REMORSELESS_WINTER = -1631164, + SAY_SHATTER_ARENA = -1631165, + SAY_SUMMON_VALKYR = -1631166, + SAY_HARVEST_SOUL = -1631167, + SAY_FM_TERENAS_AID_1 = -1631168, + SAY_FM_TERENAS_AID_2 = -1631169, + SAY_FM_TERENAS_AID_3 = -1631170, + SAY_FM_PLAYER_ESCAPE = -1631171, + SAY_FM_PLAYER_DEATH = -1631172, + SAY_SPECIAL_1 = -1631173, + SAY_SPECIAL_2 = -1631174, + SAY_LAST_PHASE = -1631175, + SAY_SLAY_1 = -1631176, + SAY_SLAY_2 = -1631177, + SAY_ENRAGE = -1631178, + SAY_OUTRO_1 = -1631179, + SAY_OUTRO_2 = -1631180, + SAY_OUTRO_3 = -1631181, + SAY_OUTRO_4 = -1631182, + SAY_OUTRO_5 = -1631183, + SAY_OUTRO_6 = -1631184, + SAY_OUTRO_7 = -1631185, + SAY_OUTRO_8 = -1631186, + SAY_OUTRO_9 = -1631187, + SAY_OUTRO_10 = -1631188, + SAY_OUTRO_11 = -1631189, + SAY_OUTRO_12 = -1631190, + SAY_OUTRO_13 = -1631191, + SAY_OUTRO_14 = -1631192, }; void AddSC_boss_the_lich_king() diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_valithria_dreamwalker.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_valithria_dreamwalker.cpp index c0196e01d..d4cbef9c0 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_valithria_dreamwalker.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_valithria_dreamwalker.cpp @@ -25,28 +25,28 @@ EndScriptData */ enum SvalnaTexts // TODO Maybe need own file? { - SAY_SVALNA_EVENT_1 = 1631130, - SAY_SVALNA_EVENT_2 = 1631131, - SAY_SVALNA_EVENT_3 = 1631132, - SAY_SVALNA_EVENT_4 = 1631133, - SAY_KILLING_CRUSADERS = 1631134, - SAY_RESSURECT = 1631135, - SAY_SVALNA_AGGRO = 1631136, - SAY_KILL_CAPTAIN = 1631137, - SAY_KILL_PLAYER = 1631138, - SAY_DEATH = 1631139, + SAY_SVALNA_EVENT_1 = -1631130, + SAY_SVALNA_EVENT_2 = -1631131, + SAY_SVALNA_EVENT_3 = -1631132, + SAY_SVALNA_EVENT_4 = -1631133, + SAY_KILLING_CRUSADERS = -1631134, + SAY_RESSURECT = -1631135, + SAY_SVALNA_AGGRO = -1631136, + SAY_KILL_CAPTAIN = -1631137, + SAY_KILL_PLAYER = -1631138, + SAY_DEATH = -1631139, }; enum { - SAY_AGGRO = 1631140, - SAY_PORTAL = 1631141, - SAY_75_HEALTH = 1631142, - SAY_25_HEALTH = 1631143, - SAY_0_HEALTH = 1631144, - SAY_PLAYER_DIES = 1631145, - SAY_BERSERK = 1631146, - SAY_VICTORY = 1631147, + SAY_AGGRO = -1631140, + SAY_PORTAL = -1631141, + SAY_75_HEALTH = -1631142, + SAY_25_HEALTH = -1631143, + SAY_0_HEALTH = -1631144, + SAY_PLAYER_DIES = -1631145, + SAY_BERSERK = -1631146, + SAY_VICTORY = -1631147, }; void AddSC_boss_valithria_dreamwalker() diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index fb301a694..200a2aca5 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2252" + #define SD2_REVISION_NR "2253" #endif // __SD2_REVISION_NR_H__ From 3f647bffe9e9d53e810fd494d0b9905ea5a197df Mon Sep 17 00:00:00 2001 From: Xfurry Date: Thu, 21 Jul 2011 21:50:15 +0200 Subject: [PATCH 0234/1172] [2254] Improve Ambassador Hellmaw (Shadow Labyrinth) * Cleanup boss script * Remove his SD2 waypoints, this is expected to be done by world DB providers * Note: His banishment doesn't work due is mechanics immunity, I consider this as core bug. Signed-off-by: Schmoozerd --- .../boss_ambassador_hellmaw.cpp | 186 +++++++----------- .../instance_shadow_labyrinth.cpp | 15 +- .../shadow_labyrinth/shadow_labyrinth.h | 7 +- sd2_revision_nr.h | 2 +- sql/scriptdev2_script_full.sql | 12 -- sql/updates/r2254_scriptdev2.sql | 1 + 6 files changed, 87 insertions(+), 136 deletions(-) create mode 100644 sql/updates/r2254_scriptdev2.sql diff --git a/scripts/outland/auchindoun/shadow_labyrinth/boss_ambassador_hellmaw.cpp b/scripts/outland/auchindoun/shadow_labyrinth/boss_ambassador_hellmaw.cpp index 36659b633..c6b0fa4b9 100644 --- a/scripts/outland/auchindoun/shadow_labyrinth/boss_ambassador_hellmaw.cpp +++ b/scripts/outland/auchindoun/shadow_labyrinth/boss_ambassador_hellmaw.cpp @@ -23,61 +23,51 @@ EndScriptData */ #include "precompiled.h" #include "shadow_labyrinth.h" -#include "escort_ai.h" -#define SAY_INTRO -1555000 - -#define SAY_AGGRO1 -1555001 -#define SAY_AGGRO2 -1555002 -#define SAY_AGGRO3 -1555003 - -#define SAY_HELP -1555004 - -#define SAY_SLAY1 -1555005 -#define SAY_SLAY2 -1555006 - -#define SAY_DEATH -1555007 - -#define SPELL_BANISH 30231 -#define SPELL_CORROSIVE_ACID 33551 -#define SPELL_FEAR 33547 -#define SPELL_ENRAGE 34970 +enum +{ + SAY_AGGRO_1 = -1555001, + SAY_AGGRO_2 = -1555002, + SAY_AGGRO_3 = -1555003, + SAY_HELP = -1555004, + SAY_SLAY_1 = -1555005, + SAY_SLAY_2 = -1555006, + SAY_DEATH = -1555007, + + SPELL_CORROSIVE_ACID = 33551, + SPELL_FEAR = 33547, + SPELL_ENRAGE = 34970 +}; -struct MANGOS_DLL_DECL boss_ambassador_hellmawAI : public npc_escortAI +struct MANGOS_DLL_DECL boss_ambassador_hellmawAI : public ScriptedAI { - boss_ambassador_hellmawAI(Creature* pCreature) : npc_escortAI(pCreature) + boss_ambassador_hellmawAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); Reset(); + + if (m_pInstance && m_creature->isAlive()) + { + if (m_pInstance->GetData(TYPE_OVERSEER) != DONE) + DoCastSpellIfCan(m_creature, SPELL_BANISH, CAST_TRIGGERED); + } } ScriptedInstance* m_pInstance; bool m_bIsRegularMode; - uint32 EventCheck_Timer; - uint32 CorrosiveAcid_Timer; - uint32 Fear_Timer; - uint32 Enrage_Timer; - bool Intro; - bool IsBanished; - bool Enraged; + uint32 m_uiCorrosiveAcidTimer; + uint32 m_uiFearTimer; + uint32 m_uiEnrageTimer; + bool m_bIsEnraged; void Reset() { - EventCheck_Timer = 5000; - CorrosiveAcid_Timer = urand(5000, 10000); - Fear_Timer = urand(25000, 30000); - Enrage_Timer = 180000; - Intro = false; - IsBanished = true; - Enraged = false; - - if (m_pInstance && m_creature->isAlive()) - { - if (m_pInstance->GetData(TYPE_OVERSEER) != DONE) - m_creature->CastSpell(m_creature, SPELL_BANISH, true); - } + m_uiCorrosiveAcidTimer = urand(5000, 10000); + m_uiFearTimer = urand(25000, 30000); + m_uiEnrageTimer = 3*MINUTE*IN_MILLISECONDS; + m_bIsEnraged = false; } void JustReachedHome() @@ -86,54 +76,25 @@ struct MANGOS_DLL_DECL boss_ambassador_hellmawAI : public npc_escortAI m_pInstance->SetData(TYPE_HELLMAW, FAIL); } - void WaypointReached(uint32 i) - { - } - - void DoIntro() - { - if (m_creature->HasAura(SPELL_BANISH, EFFECT_INDEX_0)) - m_creature->RemoveAurasDueToSpell(SPELL_BANISH); - - IsBanished = false; - Intro = true; - - if (m_pInstance) - { - if (m_pInstance->GetData(TYPE_HELLMAW) != FAIL) - { - DoScriptText(SAY_INTRO, m_creature); - Start(false, NULL, NULL, false, true); - } - - m_pInstance->SetData(TYPE_HELLMAW, IN_PROGRESS); - } - } - - void MoveInLineOfSight(Unit *who) - { - if (m_creature->HasAura(SPELL_BANISH, EFFECT_INDEX_0)) - return; - - npc_escortAI::MoveInLineOfSight(who); - } - - void Aggro(Unit *who) + void Aggro(Unit* pWho) { switch(urand(0, 2)) { - 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 0: DoScriptText(SAY_AGGRO_1, m_creature); break; + case 1: DoScriptText(SAY_AGGRO_2, m_creature); break; + case 2: DoScriptText(SAY_AGGRO_3, m_creature); break; } + + if (m_pInstance) + m_pInstance->SetData(TYPE_HELLMAW, IN_PROGRESS); } - void KilledUnit(Unit *victim) + void KilledUnit(Unit* pVictim) { - DoScriptText(urand(0, 1) ? SAY_SLAY1 : SAY_SLAY2, m_creature); + DoScriptText(urand(0, 1) ? SAY_SLAY_1 : SAY_SLAY_2, m_creature); } - void JustDied(Unit *victim) + void JustDied(Unit* pKiller) { DoScriptText(SAY_DEATH, m_creature); @@ -141,52 +102,36 @@ struct MANGOS_DLL_DECL boss_ambassador_hellmawAI : public npc_escortAI m_pInstance->SetData(TYPE_HELLMAW, DONE); } - void UpdateEscortAI(const uint32 diff) + void UpdateAI(const uint32 uiDiff) { - if (!Intro && !HasEscortState(STATE_ESCORT_ESCORTING)) - { - if (EventCheck_Timer < diff) - { - if (m_pInstance) - { - if (m_pInstance->GetData(TYPE_OVERSEER) == DONE) - { - DoIntro(); - return; - } - } - EventCheck_Timer = 5000; - return; - } - else - { - EventCheck_Timer -= diff; - return; - } - } - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - if (CorrosiveAcid_Timer < diff) + if (m_uiCorrosiveAcidTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_CORROSIVE_ACID); - CorrosiveAcid_Timer = urand(15000, 25000); - }else CorrosiveAcid_Timer -= diff; + if (DoCastSpellIfCan(m_creature, SPELL_CORROSIVE_ACID) == CAST_OK) + m_uiCorrosiveAcidTimer = urand(15000, 25000); + } + else + m_uiCorrosiveAcidTimer -= uiDiff; - if (Fear_Timer < diff) + if (m_uiFearTimer < uiDiff) { - DoCastSpellIfCan(m_creature,SPELL_FEAR); - Fear_Timer = urand(20000, 35000); - }else Fear_Timer -= diff; + if (DoCastSpellIfCan(m_creature, SPELL_FEAR) == CAST_OK) + m_uiFearTimer = urand(20000, 35000); + } + else + m_uiFearTimer -= uiDiff; - if (!m_bIsRegularMode) + if (!m_bIsRegularMode && !m_bIsEnraged) { - if (!Enraged && Enrage_Timer < diff) + if (m_uiEnrageTimer < uiDiff) { - DoCastSpellIfCan(m_creature,SPELL_ENRAGE); - Enraged = true; - }else Enrage_Timer -= diff; + if (DoCastSpellIfCan(m_creature, SPELL_ENRAGE) == CAST_OK) + m_bIsEnraged = true; + } + else + m_uiEnrageTimer -= uiDiff; } DoMeleeAttackIfReady(); @@ -200,9 +145,10 @@ CreatureAI* GetAI_boss_ambassador_hellmaw(Creature* pCreature) void AddSC_boss_ambassador_hellmaw() { - Script *newscript; - newscript = new Script; - newscript->Name = "boss_ambassador_hellmaw"; - newscript->GetAI = &GetAI_boss_ambassador_hellmaw; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_ambassador_hellmaw"; + pNewScript->GetAI = &GetAI_boss_ambassador_hellmaw; + pNewScript->RegisterSelf(); } diff --git a/scripts/outland/auchindoun/shadow_labyrinth/instance_shadow_labyrinth.cpp b/scripts/outland/auchindoun/shadow_labyrinth/instance_shadow_labyrinth.cpp index 7bf3f911c..42ff53cb8 100644 --- a/scripts/outland/auchindoun/shadow_labyrinth/instance_shadow_labyrinth.cpp +++ b/scripts/outland/auchindoun/shadow_labyrinth/instance_shadow_labyrinth.cpp @@ -67,7 +67,8 @@ void instance_shadow_labyrinth::OnCreatureCreate(Creature* pCreature) switch(pCreature->GetEntry()) { case NPC_VORPIL: - m_mNpcEntryGuidStore[NPC_VORPIL] = pCreature->GetObjectGuid(); + case NPC_HELLMAW: + m_mNpcEntryGuidStore[pCreature->GetEntry()] = pCreature->GetObjectGuid(); break; case NPC_FEL_OVERSEER: ++m_uiFelOverseerCount; // TODO should actually only count alive ones @@ -103,6 +104,14 @@ void instance_shadow_labyrinth::SetData(uint32 uiType, uint32 uiData) } else { + if (Creature* pHellmaw = GetSingleCreatureFromStorage(NPC_HELLMAW)) + { + // yell intro and remove banish aura + DoScriptText(SAY_HELLMAW_INTRO, pHellmaw); + if (pHellmaw->HasAura(SPELL_BANISH)) + pHellmaw->RemoveAurasDueToSpell(SPELL_BANISH); + } + m_auiEncounter[1] = DONE; debug_log("SD2: Shadow Labyrinth: TYPE_OVERSEER == DONE"); } @@ -166,9 +175,11 @@ void instance_shadow_labyrinth::Load(const char* chrIn) std::istringstream loadStream(chrIn); loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3] >> m_auiEncounter[4]; - for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) + for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) + { if (m_auiEncounter[i] == IN_PROGRESS) m_auiEncounter[i] = NOT_STARTED; + } OUT_LOAD_INST_DATA_COMPLETE; } diff --git a/scripts/outland/auchindoun/shadow_labyrinth/shadow_labyrinth.h b/scripts/outland/auchindoun/shadow_labyrinth/shadow_labyrinth.h index 6dfb8fbec..df674af4c 100644 --- a/scripts/outland/auchindoun/shadow_labyrinth/shadow_labyrinth.h +++ b/scripts/outland/auchindoun/shadow_labyrinth/shadow_labyrinth.h @@ -15,11 +15,16 @@ enum TYPE_VORPIL = 4, TYPE_MURMUR = 5, + NPC_HELLMAW = 18731, NPC_VORPIL = 18732, NPC_FEL_OVERSEER = 18796, GO_REFECTORY_DOOR = 183296, //door opened when blackheart the inciter dies - GO_SCREAMING_HALL_DOOR = 183295 //door opened when grandmaster vorpil dies + GO_SCREAMING_HALL_DOOR = 183295, //door opened when grandmaster vorpil dies + + SAY_HELLMAW_INTRO = -1555000, + + SPELL_BANISH = 30231, }; class MANGOS_DLL_DECL instance_shadow_labyrinth : public ScriptedInstance diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 200a2aca5..cf4b21b0d 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2253" + #define SD2_REVISION_NR "2254" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 6d50bf4d2..454a6d136 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -5165,18 +5165,6 @@ INSERT INTO script_waypoint VALUES (18210, 18, -1324.803589, 8510.688477, 13.050, 0, ''), (18210, 19, -1312.075439, 8492.709961, 14.235, 0, ''); -DELETE FROM script_waypoint WHERE entry=18731; -INSERT INTO script_waypoint VALUES -(18731, 0, -157.366, 2.177, 8.073, 0, ''), -(18731, 1, -172.266, -18.280, 8.073, 0, ''), -(18731, 2, -171.051, -38.748, 8.073, 0, ''), -(18731, 3, -170.718, -59.436, 8.073, 0, ''), -(18731, 4, -156.659, -72.118, 8.073, 0, ''), -(18731, 5, -142.292, -59.423, 8.073, 0, ''), -(18731, 6, -141.779, -38.972, 8.073, 0, ''), -(18731, 7, -142.922, -18.950, 8.073, 0, ''), -(18731, 8, -157.366, 2.177, 8.073, 0, ''); - DELETE FROM script_waypoint WHERE entry=18887; INSERT INTO script_waypoint VALUES (18887, 0, 2650.06, 665.473, 61.9305, 0, ''), diff --git a/sql/updates/r2254_scriptdev2.sql b/sql/updates/r2254_scriptdev2.sql new file mode 100644 index 000000000..53dc1f60d --- /dev/null +++ b/sql/updates/r2254_scriptdev2.sql @@ -0,0 +1 @@ +DELETE FROM script_waypoint WHERE entry=18731; From 7aceba5efaab03f22d80e7f610f589b271d0e289 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Thu, 21 Jul 2011 23:56:57 +0200 Subject: [PATCH 0235/1172] [2255] Implement script for Eredar Twins (Sunwell) * Add encounter mechanics * Note a few spells are of unknown use, or not working * Provide rough script for Shadow Image adds, might require DB tunings * Add Areatrigger support to start intro Signed-off-by: Schmoozerd --- .../sunwell_plateau/boss_eredar_twins.cpp | 522 +++++++++++++++++- .../instance_sunwell_plateau.cpp | 21 + .../sunwell_plateau/sunwell_plateau.h | 4 + sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 5 + sql/updates/r2255_mangos.sql | 6 + 6 files changed, 557 insertions(+), 3 deletions(-) create mode 100644 sql/updates/r2255_mangos.sql diff --git a/scripts/eastern_kingdoms/sunwell_plateau/boss_eredar_twins.cpp b/scripts/eastern_kingdoms/sunwell_plateau/boss_eredar_twins.cpp index ef67e141e..e8bd88baa 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/boss_eredar_twins.cpp +++ b/scripts/eastern_kingdoms/sunwell_plateau/boss_eredar_twins.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: boss_eredar_twins -SD%Complete: -SDComment: +SD%Complete: 75 +SDComment: A few spells are not working proper yet SDCategory: Sunwell Plateau EndScriptData */ @@ -48,8 +48,526 @@ enum SAY_ALYTHESS_KILL_2 = -1580061, SAY_ALYTHESS_DEAD = -1580062, SAY_ALYTHESS_BERSERK = -1580063, + + // Shared spells + SPELL_TWINS_ENRAGE = 46587, + SPELL_EMPOWER = 45366, // Cast on self when the twin sister dies + SPELL_DARK_FLAME = 45345, + + // Sacrolash spells + SPELL_DARK_TOUCHED = 45347, // TODO NYI - Player debuff; removed by shadow damage + SPELL_SHADOW_BLADES = 45248, // 10 secs + SPELL_DARK_STRIKE = 45271, + SPELL_SHADOW_NOVA = 45329, // 30-35 secs + SPELL_CONFOUNDING_BLOW = 45256, // Daze; 25 secs + SPELL_SHADOW_NOVA_UNK = 45332, // Unknown + + // Shadow Image spells + NPC_SHADOW_IMAGE = 25214, + SPELL_SHADOWFURY = 45270, + SPELL_IMAGE_VISUAL = 45263, + + // Alythess spells + SPELL_PYROGENICS = 45230, // Self buff; 15secs + SPELL_FLAME_TOUCHED = 45348, // TODO NYI - Player debuff; removed by shadow damage + SPELL_CONFLAGRATION = 45342, // 30-35 secs + SPELL_BLAZE = 45235, // On main target every 3 secs; should trigger 45236 which leaves a fire on the ground + SPELL_FLAME_SEAR = 46771, // A few random targets debuff + SPELL_CONFLAGRATION_UNK = 45333, // Unknown +}; + +static const DialogueEntry aIntroDialogue[] = +{ + {SAY_INTRO_1, NPC_SACROLASH, 1000}, + {SAY_INTRO_2, NPC_ALYTHESS, 1000}, + {SAY_INTRO_3, NPC_SACROLASH, 1000}, + {SAY_INTRO_4, NPC_ALYTHESS, 1000}, + {SAY_INTRO_5, NPC_SACROLASH, 1000}, + {SAY_INTRO_6, NPC_ALYTHESS, 1000}, + {SAY_INTRO_7, NPC_SACROLASH, 3000}, + {SAY_INTRO_8, NPC_ALYTHESS, 0}, + {0, 0, 0}, +}; + +struct MANGOS_DLL_DECL boss_alythessAI : public ScriptedAI +{ + boss_alythessAI(Creature* pCreature) : ScriptedAI(pCreature), + m_introDialogue(aIntroDialogue) + { + m_pInstance = ((instance_sunwell_plateau*)pCreature->GetInstanceData()); + m_introDialogue.InitializeDialogueHelper(m_pInstance); + Reset(); + } + + ScriptedInstance* m_pInstance; + DialogueHelper m_introDialogue; + + uint32 m_uiEnrageTimer; + uint32 m_uiPyrogenicsTimer; + uint32 m_uiFlameTouchedTimer; + uint32 m_uiConflagrationTimer; + uint32 m_uiBlazeTimer; + uint32 m_uiFlameSearTimer; + bool m_bDidIntro; + + void Reset() + { + m_uiEnrageTimer = 6*MINUTE*IN_MILLISECONDS; + m_uiPyrogenicsTimer = 20000; + m_uiFlameTouchedTimer = 30000; + m_uiConflagrationTimer = urand(25000, 30000); + m_uiBlazeTimer = 1000; + m_uiFlameSearTimer = 5000; + m_bDidIntro = false; + } + + void JustReachedHome() + { + if (m_pInstance) + { + if (m_pInstance->GetData(TYPE_EREDAR_TWINS) != FAIL) + m_pInstance->SetData(TYPE_EREDAR_TWINS, FAIL); + + // Respawn dead sister + if (Creature* pSister = m_pInstance->GetSingleCreatureFromStorage(NPC_SACROLASH)) + { + if (!pSister->isAlive()) + pSister->Respawn(); + } + } + } + + void Aggro(Unit* pWho) + { + if (m_pInstance) + { + if (m_pInstance->GetData(TYPE_EREDAR_TWINS) != IN_PROGRESS) + m_pInstance->SetData(TYPE_EREDAR_TWINS, IN_PROGRESS); + } + } + + void AttackStart(Unit* pWho) + { + if (m_creature->Attack(pWho, false)) + { + m_creature->AddThreat(pWho); + m_creature->SetInCombatWith(pWho); + pWho->SetInCombatWith(m_creature); + + // Only range attack + m_creature->GetMotionMaster()->MoveChase(pWho, 10.0f); + } + } + + void KilledUnit(Unit* pVictim) + { + DoScriptText(urand(0, 1) ? SAY_ALYTHESS_KILL_1 : SAY_ALYTHESS_KILL_2, m_creature); + } + + void JustDied(Unit* pKiller) + { + if (m_pInstance) + { + if (Creature* pSacrolash = m_pInstance->GetSingleCreatureFromStorage(NPC_SACROLASH)) + { + if (!pSacrolash->isAlive()) + { + m_pInstance->SetData(TYPE_EREDAR_TWINS, DONE); + DoScriptText(SAY_ALYTHESS_DEAD, m_creature); + } + else + { + // Remove loot flag and cast empower + m_creature->RemoveFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE); + DoScriptText(SAY_SACROLASH_EMPOWER, pSacrolash); + pSacrolash->InterruptNonMeleeSpells(true); + pSacrolash->CastSpell(pSacrolash, SPELL_EMPOWER, false); + } + } + } + } + + void UpdateAI(const uint32 uiDiff) + { + if (m_pInstance && m_pInstance->GetData(TYPE_EREDAR_TWINS) == SPECIAL) + { + if (!m_bDidIntro) + { + m_introDialogue.StartNextDialogueText(SAY_INTRO_1); + m_bDidIntro = true; + } + m_introDialogue.DialogueUpdate(uiDiff); + } + + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_uiEnrageTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_TWINS_ENRAGE) == CAST_OK) + { + DoScriptText(SAY_ALYTHESS_BERSERK, m_creature); + m_uiEnrageTimer = 6*MINUTE*IN_MILLISECONDS; + } + } + else + m_uiEnrageTimer -= uiDiff; + + if (m_uiPyrogenicsTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_PYROGENICS) == CAST_OK) + m_uiPyrogenicsTimer = urand(25000, 30000); + } + else + m_uiPyrogenicsTimer -= uiDiff; + + /* // Spell needs research of fix; it shoudn't be cast on self + if (m_uiFlameTouchedTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_FLAME_TOUCHED) == CAST_OK) + m_uiFlameTouchedTimer = urand(10000, 13000); + } + else + m_uiFlameTouchedTimer -= uiDiff; + */ + + if (m_uiConflagrationTimer < uiDiff) + { + Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_TOPAGGRO, 3); + if (!pTarget) + pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0); + + if (DoCastSpellIfCan(pTarget, SPELL_CONFLAGRATION) == CAST_OK) + { + DoScriptText(SAY_ALYTHESS_CANFLAGRATION, m_creature); + m_uiConflagrationTimer = urand(20000, 25000); + } + } + else + m_uiConflagrationTimer -= uiDiff; + + if (m_uiFlameSearTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_FLAME_SEAR) == CAST_OK) + m_uiFlameSearTimer = 10000; + } + else + m_uiFlameSearTimer -= uiDiff; + + if (m_uiBlazeTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_BLAZE) == CAST_OK) + m_uiBlazeTimer = 3000; + } + else + m_uiBlazeTimer -= uiDiff; + } }; +struct MANGOS_DLL_DECL boss_sacrolashAI : public ScriptedAI +{ + boss_sacrolashAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = ((instance_sunwell_plateau*)pCreature->GetInstanceData()); + Reset(); + } + + ScriptedInstance* m_pInstance; + + uint32 m_uiEnrageTimer; + uint32 m_uiDarkTouchedTimer; + uint32 m_uiShadowNovaTimer; + uint32 m_uiConfoundingBlowTimer; + uint32 m_uiShadowBladesTimer; + uint32 m_uiSummonShadowImage; + + void Reset() + { + m_uiEnrageTimer = 6*MINUTE*IN_MILLISECONDS; + m_uiDarkTouchedTimer = 30000; + m_uiShadowNovaTimer = 15000; + m_uiConfoundingBlowTimer = 30000; + m_uiShadowBladesTimer = 15000; + m_uiSummonShadowImage = 10000; + } + + void JustReachedHome() + { + if (m_pInstance) + { + if (m_pInstance->GetData(TYPE_EREDAR_TWINS) != FAIL) + m_pInstance->SetData(TYPE_EREDAR_TWINS, FAIL); + + // Respawn dead sister + if (Creature* pSister = m_pInstance->GetSingleCreatureFromStorage(NPC_ALYTHESS)) + { + if (!pSister->isAlive()) + pSister->Respawn(); + } + } + } + + void Aggro(Unit* pWho) + { + if (m_pInstance) + { + if (m_pInstance->GetData(TYPE_EREDAR_TWINS) != IN_PROGRESS) + m_pInstance->SetData(TYPE_EREDAR_TWINS, IN_PROGRESS); + } + } + + void KilledUnit(Unit* pVictim) + { + DoScriptText(urand(0, 1) ? SAY_SACROLASH_KILL_1 : SAY_SACROLASH_KILL_2, m_creature); + } + + void JustDied(Unit* pKiller) + { + if (m_pInstance) + { + if (Creature* pAlythess = m_pInstance->GetSingleCreatureFromStorage(NPC_ALYTHESS)) + { + if (!pAlythess->isAlive()) + { + m_pInstance->SetData(TYPE_EREDAR_TWINS, DONE); + DoScriptText(SAY_SACROLASH_DEAD, m_creature); + } + else + { + // Remove loot flag and cast empower + m_creature->RemoveFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE); + DoScriptText(SAY_ALYTHESS_EMPOWER, pAlythess); + pAlythess->InterruptNonMeleeSpells(true); + pAlythess->CastSpell(pAlythess, SPELL_EMPOWER, false); + } + } + } + } + + // Return a random target which it's not in range of 10 yards of boss + Unit* GetRandomTargetAtDist(float fDist) + { + std::vector m_vRangeTargets; + + ThreatList const& tList = m_creature->getThreatManager().getThreatList(); + for (ThreatList::const_iterator iter = tList.begin();iter != tList.end(); ++iter) + { + if (Unit* pTempTarget = m_creature->GetMap()->GetUnit((*iter)->getUnitGuid())) + { + if (!pTempTarget->IsWithinDistInMap(m_creature, fDist)) + m_vRangeTargets.push_back(pTempTarget); + } + } + + if (!m_vRangeTargets.empty()) + return m_vRangeTargets[urand(0, m_vRangeTargets.size() - 1)]; + else + return m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1); + } + + void JustSummoned(Creature* pSummoned) + { + if (pSummoned->GetEntry() == NPC_SHADOW_IMAGE) + { + pSummoned->CastSpell(pSummoned, SPELL_IMAGE_VISUAL, false); + // Attack random range target + if (Unit* pTarget = GetRandomTargetAtDist(10.0f)) + pSummoned->AI()->AttackStart(pTarget); + } + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_uiEnrageTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_TWINS_ENRAGE) == CAST_OK) + { + DoScriptText(SAY_SACROLASH_BERSERK, m_creature); + m_uiEnrageTimer = 6*MINUTE*IN_MILLISECONDS; + } + } + else + m_uiEnrageTimer -= uiDiff; + + /* // Spell needs research of fix; it shoudn't be cast on self + if (m_uiDarkTouchedTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_DARK_TOUCHED) == CAST_OK) + m_uiDarkTouchedTimer = urand(10000, 13000); + } + else + m_uiDarkTouchedTimer -= uiDiff; + */ + + if (m_uiShadowBladesTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_SHADOW_BLADES) == CAST_OK) + m_uiShadowBladesTimer = urand(13000, 15000); + } + else + m_uiShadowBladesTimer -= uiDiff; + + if (m_uiShadowNovaTimer < uiDiff) + { + Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_TOPAGGRO, 2); + if (!pTarget) + pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0); + + if (DoCastSpellIfCan(pTarget, SPELL_SHADOW_NOVA) == CAST_OK) + { + DoScriptText(SAY_SACROLASH_SHADOW_NOVA, m_creature); + m_uiShadowNovaTimer = urand(30000, 35000); + } + } + else + m_uiShadowNovaTimer -= uiDiff; + + if (m_uiConfoundingBlowTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_CONFOUNDING_BLOW) == CAST_OK) + { + // Reset threat + if (m_creature->getThreatManager().getThreat(m_creature->getVictim())) + m_creature->getThreatManager().modifyThreatPercent(m_creature->getVictim(), -100); + + m_uiConfoundingBlowTimer = urand(25000, 30000); + } + } + else + m_uiConfoundingBlowTimer -= uiDiff; + + if (m_uiSummonShadowImage < uiDiff) + { + // Summon 3 shadow images at the boss position + for(uint8 i = 0; i < 3; ++i) + m_creature->SummonCreature(NPC_SHADOW_IMAGE, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 3000); + + m_uiSummonShadowImage = urand(10000, 12000); + } + else + m_uiSummonShadowImage -= uiDiff; + + // Overwrite the melee attack in order to apply the dark strike + if (m_creature->CanReachWithMeleeAttack(m_creature->getVictim())) + { + // Make sure our attack is ready and we aren't currently casting + if (m_creature->isAttackReady() && !m_creature->IsNonMeleeSpellCasted(false)) + { + DoCastSpellIfCan(m_creature->getVictim(), SPELL_DARK_STRIKE); + + m_creature->AttackerStateUpdate(m_creature->getVictim()); + m_creature->resetAttackTimer(); + } + } + } +}; + +struct MANGOS_DLL_DECL npc_shadow_imageAI : public ScriptedAI +{ + npc_shadow_imageAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } + + uint32 m_uiChosenAbility; + uint32 m_uiSuicideTimer; + uint32 m_uiAbilityTimer; + uint8 m_uiDarkStrikes; + + void Reset() + { + // Choose only one spell for attack + m_uiChosenAbility = urand(0, 1) ? SPELL_DARK_STRIKE : SPELL_SHADOWFURY; + m_uiAbilityTimer = 500; + m_uiDarkStrikes = 0; + m_uiSuicideTimer = 0; + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + // Suicide on timer; this is needed because of the cast time + if (m_uiSuicideTimer) + { + if (m_uiSuicideTimer <= uiDiff) + { + m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + return; + } + else + m_uiSuicideTimer -= uiDiff; + } + else + { + // Do chosen ability + switch (m_uiChosenAbility) + { + case SPELL_SHADOWFURY: + if (m_uiAbilityTimer < uiDiff) + { + if (m_creature->IsWithinDistInMap(m_creature->getVictim(), INTERACTION_DISTANCE)) + { + if (DoCastSpellIfCan(m_creature, SPELL_SHADOWFURY) == CAST_OK) + m_uiSuicideTimer = 1000; + } + } + else + m_uiAbilityTimer -= uiDiff; + break; + case SPELL_DARK_STRIKE: + if (m_uiAbilityTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_DARK_STRIKE) == CAST_OK) + { + ++m_uiDarkStrikes; + // kill itself after 2 strikes + if (m_uiDarkStrikes == 2) + m_uiSuicideTimer = 1000; + else + m_uiAbilityTimer = 1000; + } + } + else + m_uiAbilityTimer -= uiDiff; + break; + } + } + } +}; + +CreatureAI* GetAI_boss_alythess(Creature* pCreature) +{ + return new boss_alythessAI (pCreature); +} + +CreatureAI* GetAI_boss_sacrolash(Creature* pCreature) +{ + return new boss_sacrolashAI (pCreature); +} + +CreatureAI* GetAI_npc_shadow_image(Creature* pCreature) +{ + return new npc_shadow_imageAI (pCreature); +} + void AddSC_boss_eredar_twins() { + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_alythess"; + pNewScript->GetAI = &GetAI_boss_alythess; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "boss_sacrolash"; + pNewScript->GetAI = &GetAI_boss_sacrolash; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_shadow_image"; + pNewScript->GetAI = &GetAI_npc_shadow_image; + pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/sunwell_plateau/instance_sunwell_plateau.cpp b/scripts/eastern_kingdoms/sunwell_plateau/instance_sunwell_plateau.cpp index 922be413b..2488b7948 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/instance_sunwell_plateau.cpp +++ b/scripts/eastern_kingdoms/sunwell_plateau/instance_sunwell_plateau.cpp @@ -280,6 +280,22 @@ InstanceData* GetInstanceData_instance_sunwell_plateau(Map* pMap) return new instance_sunwell_plateau(pMap); } +bool AreaTrigger_at_sunwell_plateau(Player* pPlayer, AreaTriggerEntry const* pAt) +{ + if (pAt->id == AREATRIGGER_TWINS) + { + if (pPlayer->isGameMaster() || pPlayer->isDead()) + return false; + + instance_sunwell_plateau* pInstance = (instance_sunwell_plateau*)pPlayer->GetInstanceData(); + + if (pInstance && pInstance->GetData(TYPE_EREDAR_TWINS) == NOT_STARTED) + pInstance->SetData(TYPE_EREDAR_TWINS, SPECIAL); + } + + return false; +} + void AddSC_instance_sunwell_plateau() { Script* pNewScript; @@ -288,4 +304,9 @@ void AddSC_instance_sunwell_plateau() pNewScript->Name = "instance_sunwell_plateau"; pNewScript->GetInstanceData = &GetInstanceData_instance_sunwell_plateau; pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "at_sunwell_plateau"; + pNewScript->pAreaTrigger = &AreaTrigger_at_sunwell_plateau; + pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/sunwell_plateau/sunwell_plateau.h b/scripts/eastern_kingdoms/sunwell_plateau/sunwell_plateau.h index 6b6c98af6..bfc2b8a34 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/sunwell_plateau.h +++ b/scripts/eastern_kingdoms/sunwell_plateau/sunwell_plateau.h @@ -43,6 +43,10 @@ enum GO_MURU_EXIT_GATE = 188118, GO_THIRD_GATE = 187765, // door after muru; why another? + SAY_TWINS_INTRO = -1580044, + + AREATRIGGER_TWINS = 4937, + // spells related to kalecgos event SPELL_SPECTRAL_REALM = 46021, SPELL_TELEPORT_NORMAL_REALM = 46020, diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index cf4b21b0d..66c3eeec9 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2254" + #define SD2_REVISION_NR "2255" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 14c84d729..09d5b9332 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -48,6 +48,8 @@ INSERT INTO scripted_areatrigger VALUES (3960, 'at_zulgurub'); DELETE FROM scripted_areatrigger WHERE entry=3626; INSERT INTO scripted_areatrigger VALUES (3626, 'at_vaelastrasz'); +DELETE FROM scripted_areatrigger WHERE entry=4937; +INSERT INTO scripted_areatrigger VALUES (4937, 'at_sunwell_plateau'); /* BATTLEGROUNDS */ @@ -1079,6 +1081,9 @@ UPDATE creature_template SET ScriptName='boss_sathrovarr' WHERE entry=24892; UPDATE gameobject_template SET ScriptName='go_spectral_rift' WHERE entry=187055; DELETE FROM scripted_areatrigger WHERE entry=4853; INSERT INTO scripted_areatrigger VALUES (4853,'at_madrigosa'); +UPDATE creature_template SET ScriptName='boss_alythess' WHERE entry=25166; +UPDATE creature_template SET ScriptName='boss_sacrolash' WHERE entry=25165; +UPDATE creature_template SET ScriptName='npc_shadow_image' WHERE entry=25214; /* SWAMP OF SORROWS */ UPDATE creature_template SET ScriptName='npc_galen_goodward' WHERE entry=5391; diff --git a/sql/updates/r2255_mangos.sql b/sql/updates/r2255_mangos.sql new file mode 100644 index 000000000..e49bd9df7 --- /dev/null +++ b/sql/updates/r2255_mangos.sql @@ -0,0 +1,6 @@ +DELETE FROM scripted_areatrigger WHERE entry=4937; +INSERT INTO scripted_areatrigger VALUES (4937, 'at_sunwell_plateau'); + +UPDATE creature_template SET ScriptName='boss_alythess' WHERE entry=25166; +UPDATE creature_template SET ScriptName='boss_sacrolash' WHERE entry=25165; +UPDATE creature_template SET ScriptName='npc_shadow_image' WHERE entry=25214; From ce97d3f90e0c190e96f131d0213b86705ae59938 Mon Sep 17 00:00:00 2001 From: Bastii Date: Fri, 22 Jul 2011 22:12:22 +0200 Subject: [PATCH 0236/1172] [2256] Cleanup and Improve boss Blackheart the Inciter (Shadow Labyrinth) Signed-off-by: Schmoozerd --- .../boss_blackheart_the_inciter.cpp | 173 ++++++++++-------- sd2_revision_nr.h | 2 +- 2 files changed, 98 insertions(+), 77 deletions(-) diff --git a/scripts/outland/auchindoun/shadow_labyrinth/boss_blackheart_the_inciter.cpp b/scripts/outland/auchindoun/shadow_labyrinth/boss_blackheart_the_inciter.cpp index 806ce787e..0332a3100 100644 --- a/scripts/outland/auchindoun/shadow_labyrinth/boss_blackheart_the_inciter.cpp +++ b/scripts/outland/auchindoun/shadow_labyrinth/boss_blackheart_the_inciter.cpp @@ -24,32 +24,35 @@ EndScriptData */ #include "precompiled.h" #include "shadow_labyrinth.h" -#define SPELL_INCITE_CHAOS 33676 -#define SPELL_INCITE_CHAOS_B 33684 //debuff applied to each member of party -#define SPELL_CHARGE 33709 -#define SPELL_WAR_STOMP 33707 - -#define SAY_INTRO1 -1555008 -#define SAY_INTRO2 -1555009 -#define SAY_INTRO3 -1555010 -#define SAY_AGGRO1 -1555011 -#define SAY_AGGRO2 -1555012 -#define SAY_AGGRO3 -1555013 -#define SAY_SLAY1 -1555014 -#define SAY_SLAY2 -1555015 -#define SAY_HELP -1555016 -#define SAY_DEATH -1555017 - -#define SAY2_INTRO1 -1555018 -#define SAY2_INTRO2 -1555019 -#define SAY2_INTRO3 -1555020 -#define SAY2_AGGRO1 -1555021 -#define SAY2_AGGRO2 -1555022 -#define SAY2_AGGRO3 -1555023 -#define SAY2_SLAY1 -1555024 -#define SAY2_SLAY2 -1555025 -#define SAY2_HELP -1555026 -#define SAY2_DEATH -1555027 +enum +{ + SPELL_INCITE_CHAOS = 33676, + SPELL_INCITE_CHAOS_B = 33684, // Debuff applied to each member of party + SPELL_CHARGE = 33709, + SPELL_WAR_STOMP = 33707, + + SAY_INTRO1 = -1555008, + SAY_INTRO2 = -1555009, + SAY_INTRO3 = -1555010, + SAY_AGGRO1 = -1555011, + SAY_AGGRO2 = -1555012, + SAY_AGGRO3 = -1555013, + SAY_SLAY1 = -1555014, + SAY_SLAY2 = -1555015, + SAY_HELP = -1555016, + SAY_DEATH = -1555017, + + SAY2_INTRO1 = -1555018, + SAY2_INTRO2 = -1555019, + SAY2_INTRO3 = -1555020, + SAY2_AGGRO1 = -1555021, + SAY2_AGGRO2 = -1555022, + SAY2_AGGRO3 = -1555023, + SAY2_SLAY1 = -1555024, + SAY2_SLAY2 = -1555025, + SAY2_HELP = -1555026, + SAY2_DEATH = -1555027, +}; struct MANGOS_DLL_DECL boss_blackheart_the_inciterAI : public ScriptedAI { @@ -61,30 +64,28 @@ struct MANGOS_DLL_DECL boss_blackheart_the_inciterAI : public ScriptedAI ScriptedInstance* m_pInstance; - bool InciteChaos; - uint32 InciteChaos_Timer; - uint32 InciteChaosWait_Timer; - uint32 Charge_Timer; - uint32 Knockback_Timer; + bool m_bInciteChaos; + uint32 m_uiInciteChaosTimer; + uint32 m_uiInciteChaosWaitTimer; + uint32 m_uiChargeTimer; + uint32 m_uiKnockbackTimer; void Reset() { - InciteChaos = false; - InciteChaos_Timer = 20000; - InciteChaosWait_Timer = 15000; - Charge_Timer = 5000; - Knockback_Timer = 15000; - - if (m_pInstance) - m_pInstance->SetData(TYPE_INCITER, NOT_STARTED); + m_bInciteChaos = false; + m_uiInciteChaosTimer = 20000; + m_uiInciteChaosWaitTimer = 15000; + m_uiChargeTimer = 5000; + m_uiKnockbackTimer = 15000; + SetCombatMovement(true); } - void KilledUnit(Unit *victim) + void KilledUnit(Unit* pVictim) { DoScriptText(urand(0, 1) ? SAY_SLAY1 : SAY_SLAY2, m_creature); } - void JustDied(Unit *victim) + void JustDied(Unit* pKiller) { DoScriptText(SAY_DEATH, m_creature); @@ -92,7 +93,7 @@ struct MANGOS_DLL_DECL boss_blackheart_the_inciterAI : public ScriptedAI m_pInstance->SetData(TYPE_INCITER, DONE); } - void Aggro(Unit *who) + void Aggro(Unit* pWho) { switch(urand(0, 2)) { @@ -105,57 +106,77 @@ struct MANGOS_DLL_DECL boss_blackheart_the_inciterAI : public ScriptedAI m_pInstance->SetData(TYPE_INCITER, IN_PROGRESS); } - void UpdateAI(const uint32 diff) + void JustReachedHome() + { + + if (m_pInstance) + m_pInstance->SetData(TYPE_INCITER, FAIL); + } + + void UpdateAI(const uint32 uiDiff) { - //Return since we have no target + // Return since we have no pTarget if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - if (InciteChaos) + if (m_bInciteChaos) { - if (InciteChaosWait_Timer < diff) + if (m_uiInciteChaosWaitTimer < uiDiff) { - InciteChaos = false; - InciteChaosWait_Timer = 15000; - }else InciteChaosWait_Timer -= diff; + m_bInciteChaos = false; + m_uiInciteChaosWaitTimer = 15000; + SetCombatMovement(true); + m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); + } + else + m_uiInciteChaosWaitTimer -= uiDiff; return; } - if (InciteChaos_Timer < diff) + if (m_uiInciteChaosTimer < uiDiff) { - DoCastSpellIfCan(m_creature, SPELL_INCITE_CHAOS); - - std::vector vGuids; - m_creature->FillGuidsListFromThreatList(vGuids); - for (std::vector::const_iterator itr = vGuids.begin();itr != vGuids.end(); ++itr) + if (DoCastSpellIfCan(m_creature, SPELL_INCITE_CHAOS) == CAST_OK) { - Unit* target = m_creature->GetMap()->GetUnit(*itr); - - if (target && target->GetTypeId() == TYPEID_PLAYER) - target->CastSpell(target,SPELL_INCITE_CHAOS_B,true); + std::vector vGuids; + m_creature->FillGuidsListFromThreatList(vGuids); + for (std::vector::const_iterator itr = vGuids.begin();itr != vGuids.end(); ++itr) + { + Unit* pTarget = m_creature->GetMap()->GetUnit(*itr); + + if (pTarget && pTarget->GetTypeId() == TYPEID_PLAYER) + pTarget->CastSpell(pTarget, SPELL_INCITE_CHAOS_B, true, NULL, NULL, m_creature->GetObjectGuid()); + } + + DoResetThreat(); + m_bInciteChaos = true; + m_uiInciteChaosTimer = 40000; + SetCombatMovement(false); + m_creature->StopMoving(); + return; } + } + else + m_uiInciteChaosTimer -= uiDiff; - DoResetThreat(); - InciteChaos = true; - InciteChaos_Timer = 40000; - return; - }else InciteChaos_Timer -= diff; - - //Charge_Timer - if (Charge_Timer < diff) + // Charge Timer + if (m_uiChargeTimer < uiDiff) { - if (Unit *target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) - DoCastSpellIfCan(target, SPELL_CHARGE); - Charge_Timer = urand(15000, 25000); - }else Charge_Timer -= diff; + Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0); + if (pTarget && DoCastSpellIfCan(pTarget, SPELL_CHARGE) == CAST_OK) + m_uiChargeTimer = urand(15000, 25000); + } + else + m_uiChargeTimer -= uiDiff; - //Knockback_Timer - if (Knockback_Timer < diff) + // Knockback Timer + if (m_uiKnockbackTimer < uiDiff) { - DoCastSpellIfCan(m_creature, SPELL_WAR_STOMP); - Knockback_Timer = urand(18000, 24000); - }else Knockback_Timer -= diff; + if (DoCastSpellIfCan(m_creature, SPELL_WAR_STOMP) == CAST_OK) + m_uiKnockbackTimer = urand(18000, 24000); + } + else + m_uiKnockbackTimer -= uiDiff; DoMeleeAttackIfReady(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 66c3eeec9..3345bfa10 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2255" + #define SD2_REVISION_NR "2256" #endif // __SD2_REVISION_NR_H__ From b481cfdc996bb59682087adfa363178ec79c410b Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Sat, 23 Jul 2011 21:12:09 +0200 Subject: [PATCH 0237/1172] [2257] Add support for Feugen and Stalagg Chain spells This expects MaNGOS Rev 11750 Also remove unneeded LoadCreatureAddon call for Thaddius --- scripts/northrend/naxxramas/boss_thaddius.cpp | 38 +++++++++++-------- sd2_revision_nr.h | 2 +- 2 files changed, 24 insertions(+), 16 deletions(-) diff --git a/scripts/northrend/naxxramas/boss_thaddius.cpp b/scripts/northrend/naxxramas/boss_thaddius.cpp index e1d3c537d..2ec1a316c 100644 --- a/scripts/northrend/naxxramas/boss_thaddius.cpp +++ b/scripts/northrend/naxxramas/boss_thaddius.cpp @@ -83,6 +83,8 @@ enum // Tesla Spells SPELL_FEUGEN_CHAIN = 28111, SPELL_STALAGG_CHAIN = 28096, + SPELL_FEUGEN_TESLA_PASSIVE = 28109, + SPELL_STALAGG_TESLA_PASSIVE = 28097, SPELL_SHOCK_OVERLOAD = 28159, SPELL_SHOCK = 28099, }; @@ -170,11 +172,6 @@ struct MANGOS_DLL_DECL boss_thaddiusAI : public Scripted_NoMovementAI Reset(); } - void JustReachedHome() - { - m_creature->LoadCreatureAddon(); - } - void KilledUnit(Unit* pVictim) { if (pVictim->GetTypeId() != TYPEID_PLAYER) @@ -316,9 +313,22 @@ struct MANGOS_DLL_DECL npc_tesla_coilAI : public Scripted_NoMovementAI uint32 m_uiOverloadTimer; void Reset() {} - void AttackStart(Unit* pWho) {} void MoveInLineOfSight(Unit* pWho) {} + void Aggro(Unit* pWho) + { + DoScriptText(EMOTE_LOSING_LINK, m_creature); + } + + // Overwrite this function here to + // * Keep Chain spells casted when evading after useless EnterCombat caused by 'buffing' the add + // * To not remove the Passive spells when evading after ie killed a player + void EnterEvadeMode() + { + m_creature->DeleteThreatList(); + m_creature->CombatStop(); + } + bool SetupChain() { // Check, if instance_ script failed or encounter finished @@ -334,14 +344,10 @@ struct MANGOS_DLL_DECL npc_tesla_coilAI : public Scripted_NoMovementAI m_bToFeugen = m_creature->GetDistanceOrder(pNoxTeslaFeugen, pNoxTeslaStalagg); - return true; + if (DoCastSpellIfCan(m_creature, m_bToFeugen ? SPELL_FEUGEN_CHAIN : SPELL_STALAGG_CHAIN) == CAST_OK) + return true; - /* TODO Uncomment when Chain spells are proper implemented - * if (DoCastSpellIfCan(m_creature, m_bToFeugen ? SPELL_FEUGEN_CHAIN : SPELL_STALAGG_CHAIN) == CAST_OK) - * return true; - * - * return false; - */ + return false; } void ReApplyChain(uint32 uiEntry) @@ -363,8 +369,7 @@ struct MANGOS_DLL_DECL npc_tesla_coilAI : public Scripted_NoMovementAI if (pGo && pGo->GetGoType() == GAMEOBJECT_TYPE_BUTTON && pGo->getLootState() == GO_ACTIVATED) pGo->ResetDoorOrButton(); - // TODO Uncomment when chain spells are proper implemented - // DoCastSpellIfCan(m_creature, m_bToFeugen ? SPELL_FEUGEN_CHAIN : SPELL_STALAGG_CHAIN); + DoCastSpellIfCan(m_creature, m_bToFeugen ? SPELL_FEUGEN_CHAIN : SPELL_STALAGG_CHAIN); } } @@ -375,6 +380,8 @@ struct MANGOS_DLL_DECL npc_tesla_coilAI : public Scripted_NoMovementAI void UpdateAI(const uint32 uiDiff) { + m_creature->SelectHostileTarget(); + if (!m_uiOverloadTimer && !m_uiSetupTimer && !m_bReapply) return; // Nothing to do this tick @@ -396,6 +403,7 @@ struct MANGOS_DLL_DECL npc_tesla_coilAI : public Scripted_NoMovementAI if (m_uiOverloadTimer <= uiDiff) { m_uiOverloadTimer = 0; + m_creature->RemoveAurasDueToSpell(m_bToFeugen ? SPELL_FEUGEN_TESLA_PASSIVE : SPELL_STALAGG_TESLA_PASSIVE); DoCastSpellIfCan(m_creature, SPELL_SHOCK_OVERLOAD, CAST_INTERRUPT_PREVIOUS); DoScriptText(EMOTE_TESLA_OVERLOAD, m_creature); m_pInstance->DoUseDoorOrButton(m_bToFeugen ? GO_CONS_NOX_TESLA_FEUGEN : GO_CONS_NOX_TESLA_STALAGG); diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 3345bfa10..7ab7d49e2 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2256" + #define SD2_REVISION_NR "2257" #endif // __SD2_REVISION_NR_H__ From b1cbe37e3a61fa62480d719982ef9b4b0e2d0b0a Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Mon, 8 Aug 2011 13:32:19 +0200 Subject: [PATCH 0238/1172] [2258] Improve some spell define related style issues and bugs * Fix heroic spell TAIL_SWEEP for sapphiron, thanks to Reamer for pointing * Fix spells for Bloodfurnace:The Maker and Sethek Halls:Syth to cast heroic spells in heroic mode and normal spells in normal mode * Use enum for Darkweaver Syth - add comment for missing heroic spells! * Convert remaining H_SPELL defines to SPELL_NAME_H style --- .../dark_portal/boss_aeonus.cpp | 4 +- .../dark_portal/boss_chrono_lord_deja.cpp | 8 +-- .../dark_portal/boss_temporus.cpp | 4 +- .../naxxramas/boss_four_horsemen.cpp | 10 +-- .../northrend/naxxramas/boss_sapphiron.cpp | 2 +- .../mana_tombs/boss_pandemonius.cpp | 8 +-- .../sethekk_halls/boss_darkweaver_syth.cpp | 71 ++++++++++--------- .../boss_grandmaster_vorpil.cpp | 8 +-- .../steam_vault/boss_hydromancer_thespia.cpp | 4 +- .../boss_mekgineer_steamrigger.cpp | 6 +- .../blood_furnace/boss_the_maker.cpp | 4 +- .../boss_omor_the_unscarred.cpp | 8 +-- .../boss_watchkeeper_gargolmar.cpp | 4 +- .../shattered_halls/boss_nethekurse.cpp | 4 +- .../boss_warbringer_omrogg.cpp | 4 +- .../boss_warchief_kargath_bladefist.cpp | 4 +- .../boss_gatewatcher_ironhand.cpp | 8 +-- .../boss_nethermancer_sepethrea.cpp | 4 +- .../boss_pathaleon_the_calculator.cpp | 4 +- sd2_revision_nr.h | 2 +- 20 files changed, 86 insertions(+), 85 deletions(-) diff --git a/scripts/kalimdor/caverns_of_time/dark_portal/boss_aeonus.cpp b/scripts/kalimdor/caverns_of_time/dark_portal/boss_aeonus.cpp index 5d52c7d71..b9b22144d 100644 --- a/scripts/kalimdor/caverns_of_time/dark_portal/boss_aeonus.cpp +++ b/scripts/kalimdor/caverns_of_time/dark_portal/boss_aeonus.cpp @@ -38,7 +38,7 @@ enum SPELL_TIME_STOP = 31422, SPELL_ENRAGE = 37605, SPELL_SAND_BREATH = 31473, - H_SPELL_SAND_BREATH = 39049 + SPELL_SAND_BREATH_H = 39049 }; struct MANGOS_DLL_DECL boss_aeonusAI : public ScriptedAI @@ -106,7 +106,7 @@ struct MANGOS_DLL_DECL boss_aeonusAI : public ScriptedAI //Sand Breath if (SandBreath_Timer < diff) { - DoCastSpellIfCan(m_creature->getVictim(), m_bIsRegularMode ? SPELL_SAND_BREATH : H_SPELL_SAND_BREATH); + DoCastSpellIfCan(m_creature->getVictim(), m_bIsRegularMode ? SPELL_SAND_BREATH : SPELL_SAND_BREATH_H); SandBreath_Timer = urand(15000, 25000); }else SandBreath_Timer -= diff; diff --git a/scripts/kalimdor/caverns_of_time/dark_portal/boss_chrono_lord_deja.cpp b/scripts/kalimdor/caverns_of_time/dark_portal/boss_chrono_lord_deja.cpp index c0d8fe65b..effb9b0a4 100644 --- a/scripts/kalimdor/caverns_of_time/dark_portal/boss_chrono_lord_deja.cpp +++ b/scripts/kalimdor/caverns_of_time/dark_portal/boss_chrono_lord_deja.cpp @@ -32,9 +32,9 @@ EndScriptData */ #define SAY_DEATH -1269011 #define SPELL_ARCANE_BLAST 31457 -#define H_SPELL_ARCANE_BLAST 38538 +#define SPELL_ARCANE_BLAST_H 38538 #define SPELL_ARCANE_DISCHARGE 31472 -#define H_SPELL_ARCANE_DISCHARGE 38539 +#define SPELL_ARCANE_DISCHARGE_H 38539 #define SPELL_TIME_LAPSE 31467 #define SPELL_ATTRACTION 38540 //Not Implemented (Heroic mode) @@ -105,7 +105,7 @@ struct MANGOS_DLL_DECL boss_chrono_lord_dejaAI : public ScriptedAI //Arcane Blast if (ArcaneBlast_Timer < diff) { - DoCastSpellIfCan(m_creature->getVictim(), m_bIsRegularMode ? SPELL_ARCANE_BLAST : H_SPELL_ARCANE_BLAST); + DoCastSpellIfCan(m_creature->getVictim(), m_bIsRegularMode ? SPELL_ARCANE_BLAST : SPELL_ARCANE_BLAST_H); ArcaneBlast_Timer = urand(15000, 25000); }else ArcaneBlast_Timer -= diff; @@ -113,7 +113,7 @@ struct MANGOS_DLL_DECL boss_chrono_lord_dejaAI : public ScriptedAI if (ArcaneDischarge_Timer < diff) { if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) - DoCastSpellIfCan(target, m_bIsRegularMode ? SPELL_ARCANE_DISCHARGE : H_SPELL_ARCANE_DISCHARGE); + DoCastSpellIfCan(target, m_bIsRegularMode ? SPELL_ARCANE_DISCHARGE : SPELL_ARCANE_DISCHARGE_H); ArcaneDischarge_Timer = urand(20000, 30000); }else ArcaneDischarge_Timer -= diff; diff --git a/scripts/kalimdor/caverns_of_time/dark_portal/boss_temporus.cpp b/scripts/kalimdor/caverns_of_time/dark_portal/boss_temporus.cpp index c7efabad9..537f0c8ae 100644 --- a/scripts/kalimdor/caverns_of_time/dark_portal/boss_temporus.cpp +++ b/scripts/kalimdor/caverns_of_time/dark_portal/boss_temporus.cpp @@ -34,7 +34,7 @@ EndScriptData */ #define SPELL_HASTE 31458 #define SPELL_MORTAL_WOUND 31464 #define SPELL_WING_BUFFET 31475 -#define H_SPELL_WING_BUFFET 38593 +#define SPELL_WING_BUFFET_H 38593 #define SPELL_REFLECT 38592 //Not Implemented (Heroic mod) struct MANGOS_DLL_DECL boss_temporusAI : public ScriptedAI @@ -118,7 +118,7 @@ struct MANGOS_DLL_DECL boss_temporusAI : public ScriptedAI //Wing ruffet if (WingBuffet_Timer < diff) { - DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_WING_BUFFET : H_SPELL_WING_BUFFET); + DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_WING_BUFFET : SPELL_WING_BUFFET_H); WingBuffet_Timer = urand(20000, 30000); }else WingBuffet_Timer -= diff; diff --git a/scripts/northrend/naxxramas/boss_four_horsemen.cpp b/scripts/northrend/naxxramas/boss_four_horsemen.cpp index 7e8048030..db41d4e6f 100644 --- a/scripts/northrend/naxxramas/boss_four_horsemen.cpp +++ b/scripts/northrend/naxxramas/boss_four_horsemen.cpp @@ -44,9 +44,9 @@ enum SPELL_MARK_OF_BLAUMEUX = 28833, SPELL_UNYILDING_PAIN = 57381, SPELL_VOIDZONE = 28863, - H_SPELL_VOIDZONE = 57463, + SPELL_VOIDZONE_H = 57463, SPELL_SHADOW_BOLT = 57374, - H_SPELL_SHADOW_BOLT = 57464, + SPELL_SHADOW_BOLT_H = 57464, //baron rivendare SAY_RIVE_AGGRO1 = -1533065, @@ -62,7 +62,7 @@ enum SPELL_MARK_OF_RIVENDARE = 28834, SPELL_UNHOLY_SHADOW = 28882, - H_SPELL_UNHOLY_SHADOW = 57369, + SPELL_UNHOLY_SHADOW_H = 57369, //thane korthazz SAY_KORT_AGGRO = -1533051, @@ -89,9 +89,9 @@ enum SPELL_MARK_OF_ZELIEK = 28835, SPELL_HOLY_WRATH = 28883, - H_SPELL_HOLY_WRATH = 57466, + SPELL_HOLY_WRATH_H = 57466, SPELL_HOLY_BOLT = 57376, - H_SPELL_HOLY_BOLT = 57465, + SPELL_HOLY_BOLT_H = 57465, // horseman spirits NPC_SPIRIT_OF_BLAUMEUX = 16776, diff --git a/scripts/northrend/naxxramas/boss_sapphiron.cpp b/scripts/northrend/naxxramas/boss_sapphiron.cpp index f4a17f9ec..58d98e222 100644 --- a/scripts/northrend/naxxramas/boss_sapphiron.cpp +++ b/scripts/northrend/naxxramas/boss_sapphiron.cpp @@ -182,7 +182,7 @@ struct MANGOS_DLL_DECL boss_sapphironAI : public ScriptedAI if (m_uiTailSweepTimer < uiDiff) { - if (DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_TAIL_SWEEP : SPELL_TAIL_SWEEP) == CAST_OK) + if (DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_TAIL_SWEEP : SPELL_TAIL_SWEEP_H) == CAST_OK) m_uiTailSweepTimer = urand(7000, 10000); } else diff --git a/scripts/outland/auchindoun/mana_tombs/boss_pandemonius.cpp b/scripts/outland/auchindoun/mana_tombs/boss_pandemonius.cpp index f953705ea..56fa79a90 100644 --- a/scripts/outland/auchindoun/mana_tombs/boss_pandemonius.cpp +++ b/scripts/outland/auchindoun/mana_tombs/boss_pandemonius.cpp @@ -35,9 +35,9 @@ EndScriptData */ #define EMOTE_DARK_SHELL -1557014 #define SPELL_VOID_BLAST 32325 -#define H_SPELL_VOID_BLAST 38760 +#define SPELL_VOID_BLAST_H 38760 #define SPELL_DARK_SHELL 32358 -#define H_SPELL_DARK_SHELL 38759 +#define SPELL_DARK_SHELL_H 38759 struct MANGOS_DLL_DECL boss_pandemoniusAI : public ScriptedAI { @@ -89,7 +89,7 @@ struct MANGOS_DLL_DECL boss_pandemoniusAI : public ScriptedAI { if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) { - DoCastSpellIfCan(target, m_bIsRegularMode ? SPELL_VOID_BLAST : H_SPELL_VOID_BLAST); + DoCastSpellIfCan(target, m_bIsRegularMode ? SPELL_VOID_BLAST : SPELL_VOID_BLAST_H); VoidBlast_Timer = 500; ++VoidBlast_Counter; } @@ -110,7 +110,7 @@ struct MANGOS_DLL_DECL boss_pandemoniusAI : public ScriptedAI DoScriptText(EMOTE_DARK_SHELL, m_creature); - DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_DARK_SHELL : H_SPELL_DARK_SHELL); + DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_DARK_SHELL : SPELL_DARK_SHELL_H); DarkShell_Timer = 20000; }else DarkShell_Timer -= diff; } diff --git a/scripts/outland/auchindoun/sethekk_halls/boss_darkweaver_syth.cpp b/scripts/outland/auchindoun/sethekk_halls/boss_darkweaver_syth.cpp index 90df11fbb..ef0298d85 100644 --- a/scripts/outland/auchindoun/sethekk_halls/boss_darkweaver_syth.cpp +++ b/scripts/outland/auchindoun/sethekk_halls/boss_darkweaver_syth.cpp @@ -23,37 +23,38 @@ EndScriptData */ #include "precompiled.h" -#define SAY_SUMMON -1556000 - -#define SAY_AGGRO_1 -1556001 -#define SAY_AGGRO_2 -1556002 -#define SAY_AGGRO_3 -1556003 - -#define SAY_SLAY_1 -1556004 -#define SAY_SLAY_2 -1556005 - -#define SAY_DEATH -1556006 - -#define SPELL_FROST_SHOCK 37865 -#define SPELL_FLAME_SHOCK 34354 -#define SPELL_SHADOW_SHOCK 30138 -#define SPELL_ARCANE_SHOCK 37132 - -#define SPELL_CHAIN_LIGHTNING 39945 - -#define SPELL_SUMMON_SYTH_FIRE 33537 // Spawns 19203 -#define SPELL_SUMMON_SYTH_ARCANE 33538 // Spawns 19205 -#define SPELL_SUMMON_SYTH_FROST 33539 // Spawns 19204 -#define SPELL_SUMMON_SYTH_SHADOW 33540 // Spawns 19206 - -#define SPELL_FLAME_BUFFET 33526 -#define H_SPELL_FLAME_BUFFET 38141 -#define SPELL_ARCANE_BUFFET 33527 -#define H_SPELL_ARCANE_BUFFET 38138 -#define SPELL_FROST_BUFFET 33528 -#define H_SPELL_FROST_BUFFET 38142 -#define SPELL_SHADOW_BUFFET 33529 -#define H_SPELL_SHADOW_BUFFET 38143 +enum +{ + SAY_SUMMON = -1556000, + SAY_AGGRO_1 = -1556001, + SAY_AGGRO_2 = -1556002, + SAY_AGGRO_3 = -1556003, + SAY_SLAY_1 = -1556004, + SAY_SLAY_2 = -1556005, + SAY_DEATH = -1556006, + + // TODO Heroic spells (shock, chain lightning) missing, unknown if IDs are correct + SPELL_FROST_SHOCK = 37865, + SPELL_FLAME_SHOCK = 34354, + SPELL_SHADOW_SHOCK = 30138, + SPELL_ARCANE_SHOCK = 37132, + + SPELL_CHAIN_LIGHTNING = 39945, + + SPELL_SUMMON_SYTH_FIRE = 33537, // Spawns 19203 + SPELL_SUMMON_SYTH_ARCANE = 33538, // Spawns 19205 + SPELL_SUMMON_SYTH_FROST = 33539, // Spawns 19204 + SPELL_SUMMON_SYTH_SHADOW = 33540, // Spawns 19206 + + SPELL_FLAME_BUFFET = 33526, + SPELL_FLAME_BUFFET_H = 38141, + SPELL_ARCANE_BUFFET = 33527, + SPELL_ARCANE_BUFFET_H = 38138, + SPELL_FROST_BUFFET = 33528, + SPELL_FROST_BUFFET_H = 38142, + SPELL_SHADOW_BUFFET = 33529, + SPELL_SHADOW_BUFFET_H = 38143, +}; struct MANGOS_DLL_DECL boss_darkweaver_sythAI : public ScriptedAI { @@ -238,7 +239,7 @@ struct MANGOS_DLL_DECL mob_syth_fireAI : public ScriptedAI if (flamebuffet_timer < diff) { if (Unit *target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) - DoCastSpellIfCan(target, m_bIsRegularMode ? H_SPELL_FLAME_BUFFET : SPELL_FLAME_BUFFET); + DoCastSpellIfCan(target, m_bIsRegularMode ? SPELL_FLAME_BUFFET : SPELL_FLAME_BUFFET_H); flamebuffet_timer = 5000; @@ -288,7 +289,7 @@ struct MANGOS_DLL_DECL mob_syth_arcaneAI : public ScriptedAI if (arcanebuffet_timer < diff) { if (Unit *target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) - DoCastSpellIfCan(target, m_bIsRegularMode ? H_SPELL_ARCANE_BUFFET : SPELL_ARCANE_BUFFET); + DoCastSpellIfCan(target, m_bIsRegularMode ? SPELL_ARCANE_BUFFET : SPELL_ARCANE_BUFFET_H); arcanebuffet_timer = 5000; }else arcanebuffet_timer -= diff; @@ -337,7 +338,7 @@ struct MANGOS_DLL_DECL mob_syth_frostAI : public ScriptedAI if (frostbuffet_timer < diff) { if (Unit *target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) - DoCastSpellIfCan(target, m_bIsRegularMode ? H_SPELL_FROST_BUFFET : SPELL_FROST_BUFFET); + DoCastSpellIfCan(target, m_bIsRegularMode ? SPELL_FROST_BUFFET : SPELL_FROST_BUFFET_H); frostbuffet_timer = 5000; }else frostbuffet_timer -= diff; @@ -386,7 +387,7 @@ struct MANGOS_DLL_DECL mob_syth_shadowAI : public ScriptedAI if (shadowbuffet_timer < diff) { if (Unit *target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) - DoCastSpellIfCan(target, m_bIsRegularMode ? H_SPELL_SHADOW_BUFFET : SPELL_SHADOW_BUFFET); + DoCastSpellIfCan(target, m_bIsRegularMode ? SPELL_SHADOW_BUFFET : SPELL_SHADOW_BUFFET_H); shadowbuffet_timer = 5000; }else shadowbuffet_timer -= diff; diff --git a/scripts/outland/auchindoun/shadow_labyrinth/boss_grandmaster_vorpil.cpp b/scripts/outland/auchindoun/shadow_labyrinth/boss_grandmaster_vorpil.cpp index 6e430df0f..37e276cbf 100644 --- a/scripts/outland/auchindoun/shadow_labyrinth/boss_grandmaster_vorpil.cpp +++ b/scripts/outland/auchindoun/shadow_labyrinth/boss_grandmaster_vorpil.cpp @@ -43,8 +43,8 @@ EndScriptData */ #define SPELL_SUMMON_VOIDWALKER_D 33585 #define SPELL_SUMMON_VOIDWALKER_E 33586 #define SPELL_RAIN_OF_FIRE 33617 -#define H_SPELL_RAIN_OF_FIRE 39363 -#define H_SPELL_BANISH 38791 +#define SPELL_RAIN_OF_FIRE_H 39363 +#define SPELL_BANISH_H 38791 #define ENTRY_VOID_PORTAL 19224 #define ENTRY_VOID_TRAVELER 19226 @@ -170,7 +170,7 @@ struct MANGOS_DLL_DECL boss_grandmaster_vorpilAI : public ScriptedAI } Teleport = false; - DoCastSpellIfCan(m_creature->getVictim(), m_bIsRegularMode ? SPELL_RAIN_OF_FIRE : H_SPELL_RAIN_OF_FIRE); + DoCastSpellIfCan(m_creature->getVictim(), m_bIsRegularMode ? SPELL_RAIN_OF_FIRE : SPELL_RAIN_OF_FIRE_H); Teleport_Timer = 1000; }else Teleport_Timer -= diff; @@ -210,7 +210,7 @@ struct MANGOS_DLL_DECL boss_grandmaster_vorpilAI : public ScriptedAI if (Banish_Timer < diff) { if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1)) - DoCastSpellIfCan(target,H_SPELL_BANISH); + DoCastSpellIfCan(target,SPELL_BANISH_H); Banish_Timer = 35000; }else Banish_Timer -= diff; } diff --git a/scripts/outland/coilfang_reservoir/steam_vault/boss_hydromancer_thespia.cpp b/scripts/outland/coilfang_reservoir/steam_vault/boss_hydromancer_thespia.cpp index 96f086f42..82ed301d5 100644 --- a/scripts/outland/coilfang_reservoir/steam_vault/boss_hydromancer_thespia.cpp +++ b/scripts/outland/coilfang_reservoir/steam_vault/boss_hydromancer_thespia.cpp @@ -135,7 +135,7 @@ struct MANGOS_DLL_DECL boss_thespiaAI : public ScriptedAI }; #define SPELL_WATER_BOLT_VOLLEY 34449 -#define H_SPELL_WATER_BOLT_VOLLEY 37924 +#define SPELL_WATER_BOLT_VOLLEY_H 37924 struct MANGOS_DLL_DECL mob_coilfang_waterelementalAI : public ScriptedAI { @@ -160,7 +160,7 @@ struct MANGOS_DLL_DECL mob_coilfang_waterelementalAI : public ScriptedAI if (WaterBoltVolley_Timer < diff) { - DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_WATER_BOLT_VOLLEY : H_SPELL_WATER_BOLT_VOLLEY); + DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_WATER_BOLT_VOLLEY : SPELL_WATER_BOLT_VOLLEY_H); WaterBoltVolley_Timer = urand(7000, 12000); }else WaterBoltVolley_Timer -= diff; diff --git a/scripts/outland/coilfang_reservoir/steam_vault/boss_mekgineer_steamrigger.cpp b/scripts/outland/coilfang_reservoir/steam_vault/boss_mekgineer_steamrigger.cpp index ea49095e7..422fea4e2 100644 --- a/scripts/outland/coilfang_reservoir/steam_vault/boss_mekgineer_steamrigger.cpp +++ b/scripts/outland/coilfang_reservoir/steam_vault/boss_mekgineer_steamrigger.cpp @@ -42,7 +42,7 @@ EndContentData */ #define SPELL_SUPER_SHRINK_RAY 31485 #define SPELL_SAW_BLADE 31486 #define SPELL_ELECTRIFIED_NET 35107 -#define H_SPELL_ENRAGE 1 //corrent enrage spell not known +#define SPELL_ENRAGE_H 1 //corrent enrage spell not known #define ENTRY_STREAMRIGGER_MECHANIC 17951 @@ -192,7 +192,7 @@ CreatureAI* GetAI_boss_mekgineer_steamrigger(Creature* pCreature) #define SPELL_DISPEL_MAGIC 17201 #define SPELL_REPAIR 31532 -#define H_SPELL_REPAIR 37936 +#define SPELL_REPAIR_H 37936 #define MAX_REPAIR_RANGE (13.0f) //we should be at least at this range for repair #define MIN_REPAIR_RANGE (7.0f) //we can stop movement at this range to repair but not required @@ -238,7 +238,7 @@ struct MANGOS_DLL_DECL mob_steamrigger_mechanicAI : public ScriptedAI //m_creature->GetMotionMaster()->MovementExpired(); //m_creature->GetMotionMaster()->MoveIdle(); - DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_REPAIR : H_SPELL_REPAIR, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_REPAIR : SPELL_REPAIR_H, CAST_TRIGGERED); } Repair_Timer = 5000; } diff --git a/scripts/outland/hellfire_citadel/blood_furnace/boss_the_maker.cpp b/scripts/outland/hellfire_citadel/blood_furnace/boss_the_maker.cpp index 0ca5742cc..0aced3bc7 100644 --- a/scripts/outland/hellfire_citadel/blood_furnace/boss_the_maker.cpp +++ b/scripts/outland/hellfire_citadel/blood_furnace/boss_the_maker.cpp @@ -35,7 +35,7 @@ enum SPELL_ACID_SPRAY = 38153, // heroic 38973 ??? 38153 SPELL_EXPLODING_BREAKER = 30925, - H_SPELL_EXPLODING_BREAKER = 40059, + SPELL_EXPLODING_BREAKER_H = 40059, SPELL_KNOCKDOWN = 20276, SPELL_DOMINATION = 25772 // ??? }; @@ -111,7 +111,7 @@ struct MANGOS_DLL_DECL boss_the_makerAI : public ScriptedAI if (ExplodingBreaker_Timer < diff) { if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) - DoCastSpellIfCan(target, m_bIsRegularMode ? H_SPELL_EXPLODING_BREAKER : SPELL_EXPLODING_BREAKER); + DoCastSpellIfCan(target, m_bIsRegularMode ? SPELL_EXPLODING_BREAKER : SPELL_EXPLODING_BREAKER_H); ExplodingBreaker_Timer = urand(4000, 12000); }else ExplodingBreaker_Timer -=diff; diff --git a/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_omor_the_unscarred.cpp b/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_omor_the_unscarred.cpp index 0ece363c2..aecebb01c 100644 --- a/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_omor_the_unscarred.cpp +++ b/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_omor_the_unscarred.cpp @@ -35,10 +35,10 @@ EndScriptData */ #define SPELL_ORBITAL_STRIKE 30637 #define SPELL_SHADOW_WHIP 30638 #define SPELL_TREACHEROUS_AURA 30695 -#define H_SPELL_BANE_OF_TREACHERY 37566 +#define SPELL_BANE_OF_TREACHERY_H 37566 #define SPELL_DEMONIC_SHIELD 31901 #define SPELL_SHADOW_BOLT 30686 -#define H_SPELL_SHADOW_BOLT 39297 +#define SPELL_SHADOW_BOLT_H 39297 #define SPELL_SUMMON_FIENDISH_HOUND 30707 struct MANGOS_DLL_DECL boss_omor_the_unscarredAI : public ScriptedAI @@ -176,7 +176,7 @@ struct MANGOS_DLL_DECL boss_omor_the_unscarredAI : public ScriptedAI if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) { - DoCastSpellIfCan(target, m_bIsRegularMode ? SPELL_TREACHEROUS_AURA : H_SPELL_BANE_OF_TREACHERY); + DoCastSpellIfCan(target, m_bIsRegularMode ? SPELL_TREACHEROUS_AURA : SPELL_BANE_OF_TREACHERY_H); Aura_Timer = urand(8000, 16000); } }else Aura_Timer -= diff; @@ -188,7 +188,7 @@ struct MANGOS_DLL_DECL boss_omor_the_unscarredAI : public ScriptedAI if (target) target = m_creature->getVictim(); - DoCastSpellIfCan(target, m_bIsRegularMode ? SPELL_SHADOW_BOLT : H_SPELL_SHADOW_BOLT); + DoCastSpellIfCan(target, m_bIsRegularMode ? SPELL_SHADOW_BOLT : SPELL_SHADOW_BOLT_H); Shadowbolt_Timer = urand(4000, 6500); } }else Shadowbolt_Timer -= diff; diff --git a/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_watchkeeper_gargolmar.cpp b/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_watchkeeper_gargolmar.cpp index a9170ec29..2a5e202c9 100644 --- a/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_watchkeeper_gargolmar.cpp +++ b/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_watchkeeper_gargolmar.cpp @@ -34,7 +34,7 @@ EndScriptData */ #define SAY_DIE -1543008 #define SPELL_MORTAL_WOUND 30641 -#define H_SPELL_MORTAL_WOUND 36814 +#define SPELL_MORTAL_WOUND_H 36814 #define SPELL_SURGE 34645 #define SPELL_RETALIATION 22857 @@ -113,7 +113,7 @@ struct MANGOS_DLL_DECL boss_watchkeeper_gargolmarAI : public ScriptedAI if (MortalWound_Timer < diff) { - DoCastSpellIfCan(m_creature->getVictim(), m_bIsRegularMode ? SPELL_MORTAL_WOUND : H_SPELL_MORTAL_WOUND); + DoCastSpellIfCan(m_creature->getVictim(), m_bIsRegularMode ? SPELL_MORTAL_WOUND : SPELL_MORTAL_WOUND_H); MortalWound_Timer = urand(5000, 13000); }else MortalWound_Timer -= diff; diff --git a/scripts/outland/hellfire_citadel/shattered_halls/boss_nethekurse.cpp b/scripts/outland/hellfire_citadel/shattered_halls/boss_nethekurse.cpp index 3b5cf1555..41f480172 100644 --- a/scripts/outland/hellfire_citadel/shattered_halls/boss_nethekurse.cpp +++ b/scripts/outland/hellfire_citadel/shattered_halls/boss_nethekurse.cpp @@ -69,7 +69,7 @@ enum SPELL_SHADOW_FISSURE = 30496, // Summon the ShadowFissure NPC SPELL_SHADOW_CLEAVE = 30495, - H_SPELL_SHADOW_SLAM = 35953, + SPELL_SHADOW_SLAM_H = 35953, SPELL_HEMORRHAGE = 30478, @@ -309,7 +309,7 @@ struct MANGOS_DLL_DECL boss_grand_warlock_nethekurseAI : public ScriptedAI if (m_uiCleaveTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), m_bIsRegularMode ? SPELL_SHADOW_CLEAVE : H_SPELL_SHADOW_SLAM); + DoCastSpellIfCan(m_creature->getVictim(), m_bIsRegularMode ? SPELL_SHADOW_CLEAVE : SPELL_SHADOW_SLAM_H); m_uiCleaveTimer = urand(6000, 8500); } else diff --git a/scripts/outland/hellfire_citadel/shattered_halls/boss_warbringer_omrogg.cpp b/scripts/outland/hellfire_citadel/shattered_halls/boss_warbringer_omrogg.cpp index 209834318..c107d0cd6 100644 --- a/scripts/outland/hellfire_citadel/shattered_halls/boss_warbringer_omrogg.cpp +++ b/scripts/outland/hellfire_citadel/shattered_halls/boss_warbringer_omrogg.cpp @@ -40,7 +40,7 @@ enum SPELL_THUNDERCLAP = 30633, SPELL_BURNING_MAUL = 30598, - H_SPELL_BURNING_MAUL = 36056, + SPELL_BURNING_MAUL_H = 36056, NPC_LEFT_HEAD = 19523, NPC_RIGHT_HEAD = 19524 @@ -347,7 +347,7 @@ struct MANGOS_DLL_DECL boss_warbringer_omroggAI : public ScriptedAI if (m_uiBurningMaul_Timer < uiDiff) { DoScriptText(EMOTE_ENRAGE, m_creature); - DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_BURNING_MAUL : H_SPELL_BURNING_MAUL); + DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_BURNING_MAUL : SPELL_BURNING_MAUL_H); m_uiBurningMaul_Timer = 40000; m_uiBlastWave_Timer = 16000; m_uiBlastCount = 1; diff --git a/scripts/outland/hellfire_citadel/shattered_halls/boss_warchief_kargath_bladefist.cpp b/scripts/outland/hellfire_citadel/shattered_halls/boss_warchief_kargath_bladefist.cpp index 188222d07..d7586879a 100644 --- a/scripts/outland/hellfire_citadel/shattered_halls/boss_warchief_kargath_bladefist.cpp +++ b/scripts/outland/hellfire_citadel/shattered_halls/boss_warchief_kargath_bladefist.cpp @@ -35,7 +35,7 @@ EndContentData */ #define SAY_DEATH -1540047 #define SPELL_BLADE_DANCE 30739 -#define H_SPELL_CHARGE 25821 +#define SPELL_CHARGE_H 25821 #define TARGET_NUM 5 @@ -238,7 +238,7 @@ struct MANGOS_DLL_DECL boss_warchief_kargath_bladefistAI : public ScriptedAI if (Charge_timer <= diff) { if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) - DoCastSpellIfCan(pTarget, H_SPELL_CHARGE); + DoCastSpellIfCan(pTarget, SPELL_CHARGE_H); Charge_timer = 0; }else Charge_timer -= diff; diff --git a/scripts/outland/tempest_keep/the_mechanar/boss_gatewatcher_ironhand.cpp b/scripts/outland/tempest_keep/the_mechanar/boss_gatewatcher_ironhand.cpp index 19ee13f08..3807b95d3 100644 --- a/scripts/outland/tempest_keep/the_mechanar/boss_gatewatcher_ironhand.cpp +++ b/scripts/outland/tempest_keep/the_mechanar/boss_gatewatcher_ironhand.cpp @@ -32,10 +32,10 @@ EndScriptData */ #define EMOTE_HAMMER -1554012 #define SPELL_SHADOW_POWER 35322 -#define H_SPELL_SHADOW_POWER 39193 +#define SPELL_SHADOW_POWER_H 39193 #define SPELL_HAMMER_PUNCH 35326 #define SPELL_JACKHAMMER 35327 -#define H_SPELL_JACKHAMMER 39194 +#define SPELL_JACKHAMMER_H 39194 #define SPELL_STREAM_OF_MACHINE_FLUID 35311 struct MANGOS_DLL_DECL boss_gatewatcher_iron_handAI : public ScriptedAI @@ -93,7 +93,7 @@ struct MANGOS_DLL_DECL boss_gatewatcher_iron_handAI : public ScriptedAI //Shadow Power if (Shadow_Power_Timer < diff) { - DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_SHADOW_POWER : H_SPELL_SHADOW_POWER); + DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_SHADOW_POWER : SPELL_SHADOW_POWER_H); Shadow_Power_Timer = urand(20000, 28000); }else Shadow_Power_Timer -= diff; @@ -102,7 +102,7 @@ struct MANGOS_DLL_DECL boss_gatewatcher_iron_handAI : public ScriptedAI { //TODO: expect cast this about 5 times in a row (?), announce it by emote only once DoScriptText(EMOTE_HAMMER, m_creature); - DoCastSpellIfCan(m_creature->getVictim(), m_bIsRegularMode ? SPELL_JACKHAMMER : H_SPELL_JACKHAMMER); + DoCastSpellIfCan(m_creature->getVictim(), m_bIsRegularMode ? SPELL_JACKHAMMER : SPELL_JACKHAMMER_H); //chance to yell, but not same time as emote (after spell in fact casted) if (urand(0, 4)) diff --git a/scripts/outland/tempest_keep/the_mechanar/boss_nethermancer_sepethrea.cpp b/scripts/outland/tempest_keep/the_mechanar/boss_nethermancer_sepethrea.cpp index c9a460ef8..57231e1f3 100644 --- a/scripts/outland/tempest_keep/the_mechanar/boss_nethermancer_sepethrea.cpp +++ b/scripts/outland/tempest_keep/the_mechanar/boss_nethermancer_sepethrea.cpp @@ -149,7 +149,7 @@ CreatureAI* GetAI_boss_nethermancer_sepethrea(Creature* pCreature) } #define SPELL_INFERNO 35268 -#define H_SPELL_INFERNO 39346 +#define SPELL_INFERNO_H 39346 #define SPELL_FIRE_TAIL 35278 struct MANGOS_DLL_DECL mob_ragin_flamesAI : public ScriptedAI @@ -194,7 +194,7 @@ struct MANGOS_DLL_DECL mob_ragin_flamesAI : public ScriptedAI if (inferno_Timer < diff) { - DoCastSpellIfCan(m_creature->getVictim(), m_bIsRegularMode ? SPELL_INFERNO : H_SPELL_INFERNO); + DoCastSpellIfCan(m_creature->getVictim(), m_bIsRegularMode ? SPELL_INFERNO : SPELL_INFERNO_H); m_creature->TauntApply(m_creature->getVictim()); diff --git a/scripts/outland/tempest_keep/the_mechanar/boss_pathaleon_the_calculator.cpp b/scripts/outland/tempest_keep/the_mechanar/boss_pathaleon_the_calculator.cpp index f490294c6..fd41f0f0f 100644 --- a/scripts/outland/tempest_keep/the_mechanar/boss_pathaleon_the_calculator.cpp +++ b/scripts/outland/tempest_keep/the_mechanar/boss_pathaleon_the_calculator.cpp @@ -36,7 +36,7 @@ EndScriptData */ #define SPELL_MANA_TAP 36021 #define SPELL_ARCANE_TORRENT 36022 #define SPELL_DOMINATION 35280 -#define H_SPELL_ARCANE_EXPLOSION 15453 +#define SPELL_ARCANE_EXPLOSION_H 15453 #define SPELL_FRENZY 36992 #define SPELL_SUMMON_NETHER_WRAITH_1 35285 //Spells work, but not implemented @@ -144,7 +144,7 @@ struct MANGOS_DLL_DECL boss_pathaleon_the_calculatorAI : public ScriptedAI { if (ArcaneExplosion_Timer < diff) { - DoCastSpellIfCan(m_creature->getVictim(),H_SPELL_ARCANE_EXPLOSION); + DoCastSpellIfCan(m_creature->getVictim(),SPELL_ARCANE_EXPLOSION_H); ArcaneExplosion_Timer = urand(10000, 14000); }else ArcaneExplosion_Timer -= diff; } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 7ab7d49e2..bd580ff16 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2257" + #define SD2_REVISION_NR "2258" #endif // __SD2_REVISION_NR_H__ From 6a345b77f0b734f6bc4f05f8727c9e498139b8af Mon Sep 17 00:00:00 2001 From: Reamer Date: Mon, 8 Aug 2011 22:49:05 +0200 Subject: [PATCH 0239/1172] [2259] Fix another typo for Sapphiron, do a bit comment housekeeping * Make Sapphiron follow enemies proper after landing * Add quest 11020 to SDComment for shadowmoon_valley.cpp * Add go_hand_of_iruxos_crystal to ContentData Signed-off-by: Schmoozerd --- scripts/northrend/naxxramas/boss_sapphiron.cpp | 5 ++--- scripts/outland/shadowmoon_valley.cpp | 2 +- scripts/world/go_scripts.cpp | 1 + sd2_revision_nr.h | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/northrend/naxxramas/boss_sapphiron.cpp b/scripts/northrend/naxxramas/boss_sapphiron.cpp index 58d98e222..021d87cd9 100644 --- a/scripts/northrend/naxxramas/boss_sapphiron.cpp +++ b/scripts/northrend/naxxramas/boss_sapphiron.cpp @@ -17,7 +17,7 @@ /* ScriptData SDName: Boss_Sapphiron SD%Complete: 80 -SDComment: Havy-Snow-Storms need proper handling, Some spells need core implementation, Hover is currently hacked +SDComment: Some spells need core implementation SDCategory: Naxxramas EndScriptData */ @@ -25,7 +25,6 @@ EndScriptData */ * Bugged spells: 28560 (needs maxTarget = 1, Summon of 16474 implementation, TODO, 30s duration) * 28526 (needs ScriptEffect to cast 28522 onto random target) * - * Blizzard might need handling for their movement * Achievement-criteria check needs implementation * * Frost-Breath ability: the dummy spell 30101 is self cast, so it won't take the needed delay of ~7s until it reaches its target @@ -291,7 +290,7 @@ struct MANGOS_DLL_DECL boss_sapphironAI : public ScriptedAI { m_Phase = PHASE_GROUND; - SetCombatMovement(false); + SetCombatMovement(true); m_creature->GetMotionMaster()->Clear(false); m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); diff --git a/scripts/outland/shadowmoon_valley.cpp b/scripts/outland/shadowmoon_valley.cpp index 26326e89b..5a08630d3 100644 --- a/scripts/outland/shadowmoon_valley.cpp +++ b/scripts/outland/shadowmoon_valley.cpp @@ -17,7 +17,7 @@ /* ScriptData SDName: Shadowmoon_Valley SD%Complete: 100 -SDComment: Quest support: 10519, 10583, 10601, 10781, 10814, 10804, 10854, 11082, 10458, 10480, 10481. Vendor Drake Dealer Hurlunk. +SDComment: Quest support: 10519, 10583, 10601, 10781, 10814, 10804, 10854, 11082, 10458, 10480, 10481, 11020. Vendor Drake Dealer Hurlunk. SDCategory: Shadowmoon Valley EndScriptData */ diff --git a/scripts/world/go_scripts.cpp b/scripts/world/go_scripts.cpp index 9fd81e944..a394784b9 100644 --- a/scripts/world/go_scripts.cpp +++ b/scripts/world/go_scripts.cpp @@ -39,6 +39,7 @@ go_tele_to_violet_stand go_andorhal_tower go_scourge_enclosure go_lab_work_reagents +go_hand_of_iruxos_crystal EndContentData */ #include "precompiled.h" diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index bd580ff16..da9557e91 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2258" + #define SD2_REVISION_NR "2259" #endif // __SD2_REVISION_NR_H__ From ef2906de1b3d72e3dfbc1d274703377fc68536b7 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Tue, 9 Aug 2011 12:53:16 +0200 Subject: [PATCH 0240/1172] [2260] Improve Hellfire Ramparts Special thanks to X-Savior for research! * Add Abilities for Nazan et Vazruden Encounter * Cleanup and improve script for Omor * Cleanup and improve Gargolmar, also add missing overpower ability --- .../boss_nazan_and_vazruden.cpp | 91 ++++++++- .../boss_omor_the_unscarred.cpp | 192 +++++++++--------- .../boss_watchkeeper_gargolmar.cpp | 149 +++++++------- sd2_revision_nr.h | 2 +- 4 files changed, 262 insertions(+), 172 deletions(-) diff --git a/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_nazan_and_vazruden.cpp b/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_nazan_and_vazruden.cpp index 50bf22f28..4b3c86b4c 100644 --- a/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_nazan_and_vazruden.cpp +++ b/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_nazan_and_vazruden.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: Boss_Nazan_And_Vazruden -SD%Complete: 30 -SDComment: Encounter is not complete. TODO: re-check script when MovementInform call from core work as expected. +SD%Complete: 95 +SDComment: Bellowing Roar Timer (heroic) needs some love SDCategory: Hellfire Citadel, Hellfire Ramparts EndScriptData */ @@ -39,16 +39,21 @@ enum SPELL_SUMMON_VAZRUDEN = 30717, //vazruden - SPELL_REVENGE = 40392, + SPELL_REVENGE = 19130, + SPELL_REVENGE_H = 40392, //nazan - SPELL_FIREBALL = 30691, // TODO: IDs not verified - SPELL_FIREBALL_H = 36920, + SPELL_FIREBALL = 30691, // This and the next while flying (dmg values will change in cata) + SPELL_FIREBALL_B = 33793, + SPELL_FIREBALL_H = 32491, + SPELL_FIREBALL_B_H = 33794, + SPELL_FIREBALL_LAND = 34653, // While landed + SPELL_FIREBALL_LAND_H = 36920, SPELL_CONE_OF_FIRE = 30926, - SPELL_H_CONE_OF_FIRE = 36921, + SPELL_CONE_OF_FIRE_H = 36921, - SPELL_H_BELLOW_ROAR = 39427, + SPELL_BELLOW_ROAR_H = 39427, //misc POINT_ID_CENTER = 100, @@ -73,11 +78,13 @@ struct MANGOS_DLL_DECL boss_vazrudenAI : public ScriptedAI ScriptedInstance* m_pInstance; bool m_bIsRegularMode; + uint32 m_uiRevengeTimer; bool m_bHealthBelow; void Reset() { m_bHealthBelow = false; + m_uiRevengeTimer = urand(5500, 8400); } void Aggro(Unit* pWho) @@ -132,6 +139,14 @@ struct MANGOS_DLL_DECL boss_vazrudenAI : public ScriptedAI m_bHealthBelow = true; } + if (m_uiRevengeTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), m_bIsRegularMode ? SPELL_REVENGE : SPELL_REVENGE_H) == CAST_OK) + m_uiRevengeTimer = urand(11400, 14300); + } + else + m_uiRevengeTimer -= uiDiff; + DoMeleeAttackIfReady(); } }; @@ -160,6 +175,9 @@ struct MANGOS_DLL_DECL boss_vazruden_heraldAI : public ScriptedAI bool m_bIsEventInProgress; uint32 m_uiMovementTimer; uint32 m_uiFireballTimer; + uint32 m_uiFireballBTimer; + uint32 m_uiConeOfFireTimer; + uint32 m_uiBellowingRoarTimer; ObjectGuid m_lastSeenPlayerGuid; ObjectGuid m_vazrudenGuid; @@ -176,6 +194,9 @@ struct MANGOS_DLL_DECL boss_vazruden_heraldAI : public ScriptedAI m_lastSeenPlayerGuid.Clear(); m_vazrudenGuid.Clear(); m_uiFireballTimer = 0; + m_uiFireballBTimer = 2100; + m_uiConeOfFireTimer = urand(8100, 19700); + m_uiBellowingRoarTimer = 100; // TODO Guesswork, though such an AoE fear soon after landing seems fitting // see boss_onyxia // sort of a hack, it is unclear how this really work but the values appear to be valid @@ -236,11 +257,14 @@ struct MANGOS_DLL_DECL boss_vazruden_heraldAI : public ScriptedAI if (pPlayer && pPlayer->isAlive()) AttackStart(pPlayer); + // Initialize for combat + m_uiFireballTimer = urand(5200, 16500); + break; } case POINT_ID_FLYING: if (m_bIsEventInProgress) // Additional check for wipe case, while nazan is flying to this point - m_uiFireballTimer = 3000; + m_uiFireballTimer = 1; break; } } @@ -330,17 +354,64 @@ struct MANGOS_DLL_DECL boss_vazruden_heraldAI : public ScriptedAI if (Creature* pVazruden = m_creature->GetMap()->GetCreature(m_vazrudenGuid)) { if (Unit* pEnemy = pVazruden->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) - DoCastSpellIfCan(pEnemy, m_bIsRegularMode ? SPELL_FIREBALL : SPELL_FIREBALL_H, 0, pVazruden->GetObjectGuid()); + { + if (DoCastSpellIfCan(pEnemy, m_bIsRegularMode ? SPELL_FIREBALL : SPELL_FIREBALL_H, 0, pVazruden->GetObjectGuid()) == CAST_OK) + m_uiFireballTimer = urand(2100, 7300); + } } - m_uiFireballTimer = urand(4000, 8000); } else m_uiFireballTimer -= uiDiff; + + if (m_uiFireballBTimer < uiDiff) + { + if (Creature* pVazruden = m_creature->GetMap()->GetCreature(m_vazrudenGuid)) + { + if (Unit* pEnemy = pVazruden->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pEnemy, m_bIsRegularMode ? SPELL_FIREBALL_B : SPELL_FIREBALL_B_H, 0, pVazruden->GetObjectGuid()) == CAST_OK) + m_uiFireballBTimer = 15700; + } + } + } + else + m_uiFireballBTimer -= uiDiff; } return; } + // In Combat + if (m_uiFireballTimer < uiDiff) + { + if (Unit* pEnemy = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pEnemy, m_bIsRegularMode ? SPELL_FIREBALL_LAND : SPELL_FIREBALL_LAND_H) == CAST_OK) + m_uiFireballTimer = urand(7300, 13200); + } + } + else + m_uiFireballTimer -= uiDiff; + + if (m_uiConeOfFireTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), m_bIsRegularMode ? SPELL_CONE_OF_FIRE : SPELL_CONE_OF_FIRE_H) == CAST_OK) + m_uiConeOfFireTimer = urand(7300, 13200); + } + else + m_uiConeOfFireTimer -= uiDiff; + + if (!m_bIsRegularMode) + { + if (m_uiBellowingRoarTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_BELLOW_ROAR_H) == CAST_OK) + m_uiBellowingRoarTimer = urand(8000, 12000); // TODO Guesswork, 8s cooldown + } + else + m_uiBellowingRoarTimer -= uiDiff; + } + DoMeleeAttackIfReady(); } }; diff --git a/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_omor_the_unscarred.cpp b/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_omor_the_unscarred.cpp index aecebb01c..9de8415f8 100644 --- a/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_omor_the_unscarred.cpp +++ b/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_omor_the_unscarred.cpp @@ -23,23 +23,26 @@ EndScriptData */ #include "precompiled.h" -#define SAY_AGGRO_1 -1543009 -#define SAY_AGGRO_2 -1543010 -#define SAY_AGGRO_3 -1543011 -#define SAY_SUMMON -1543012 -#define SAY_CURSE -1543013 -#define SAY_KILL_1 -1543014 -#define SAY_DIE -1543015 -#define SAY_WIPE -1543016 - -#define SPELL_ORBITAL_STRIKE 30637 -#define SPELL_SHADOW_WHIP 30638 -#define SPELL_TREACHEROUS_AURA 30695 -#define SPELL_BANE_OF_TREACHERY_H 37566 -#define SPELL_DEMONIC_SHIELD 31901 -#define SPELL_SHADOW_BOLT 30686 -#define SPELL_SHADOW_BOLT_H 39297 -#define SPELL_SUMMON_FIENDISH_HOUND 30707 +enum +{ + SAY_AGGRO_1 = -1543009, + SAY_AGGRO_2 = -1543010, + SAY_AGGRO_3 = -1543011, + SAY_SUMMON = -1543012, + SAY_CURSE = -1543013, + SAY_KILL_1 = -1543014, + SAY_DIE = -1543015, + SAY_WIPE = -1543016, + + SPELL_ORBITAL_STRIKE = 30637, + SPELL_SHADOW_WHIP = 30638, + SPELL_TREACHEROUS_AURA = 30695, + SPELL_BANE_OF_TREACHERY_H = 37566, + SPELL_DEMONIC_SHIELD = 31901, + SPELL_SHADOW_BOLT = 30686, + SPELL_SHADOW_BOLT_H = 39297, + SPELL_SUMMON_FIENDISH_HOUND = 30707, +}; struct MANGOS_DLL_DECL boss_omor_the_unscarredAI : public ScriptedAI { @@ -52,32 +55,30 @@ struct MANGOS_DLL_DECL boss_omor_the_unscarredAI : public ScriptedAI bool m_bIsRegularMode; - uint32 OrbitalStrike_Timer; - uint32 ShadowWhip_Timer; - uint32 Aura_Timer; - uint32 DemonicShield_Timer; - uint32 Shadowbolt_Timer; - uint32 Summon_Timer; - uint32 SummonedCount; + uint32 m_uiOrbitalStrikeTimer; + uint32 m_uiShadowWhipTimer; + uint32 m_uiAuraTimer; + uint32 m_uiDemonicShieldTimer; + uint32 m_uiShadowboltTimer; + uint32 m_uiSummonTimer; ObjectGuid m_playerGuid; - bool CanPullBack; + bool m_bCanPullBack; void Reset() { DoScriptText(SAY_WIPE, m_creature); - OrbitalStrike_Timer = 25000; - ShadowWhip_Timer = 2000; - Aura_Timer = 10000; - DemonicShield_Timer = 1000; - Shadowbolt_Timer = 2000; - Summon_Timer = 10000; - SummonedCount = 0; + m_uiOrbitalStrikeTimer = 25000; + m_uiShadowWhipTimer = 2000; + m_uiAuraTimer = urand(12300, 23300); + m_uiDemonicShieldTimer = 1000; + m_uiShadowboltTimer = urand(6600, 8900); + m_uiSummonTimer = urand(19600, 23100); m_playerGuid.Clear(); - CanPullBack = false; + m_bCanPullBack = false; } - void Aggro(Unit *who) + void Aggro(Unit* pWho) { switch(urand(0, 2)) { @@ -87,7 +88,7 @@ struct MANGOS_DLL_DECL boss_omor_the_unscarredAI : public ScriptedAI } } - void KilledUnit(Unit* victim) + void KilledUnit(Unit* pVictim) { if (urand(0, 1)) return; @@ -95,103 +96,108 @@ struct MANGOS_DLL_DECL boss_omor_the_unscarredAI : public ScriptedAI DoScriptText(SAY_KILL_1, m_creature); } - void JustSummoned(Creature* summoned) + void JustSummoned(Creature* pSummoned) { DoScriptText(SAY_SUMMON, m_creature); - if (Unit* random = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) - summoned->AI()->AttackStart(random); - - ++SummonedCount; + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + pSummoned->AI()->AttackStart(pTarget); } - void JustDied(Unit* Killer) + void JustDied(Unit* pKiller) { DoScriptText(SAY_DIE, m_creature); } - void UpdateAI(const uint32 diff) + void UpdateAI(const uint32 uiDiff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - //only two may be wrong, perhaps increase timer and spawn periodically instead. - if (SummonedCount < 2) + if (m_uiSummonTimer < uiDiff) { - if (Summon_Timer < diff) - { - m_creature->InterruptNonMeleeSpells(false); - DoCastSpellIfCan(m_creature,SPELL_SUMMON_FIENDISH_HOUND); - Summon_Timer = urand(15000, 30000); - }else Summon_Timer -= diff; + if (DoCastSpellIfCan(m_creature, SPELL_SUMMON_FIENDISH_HOUND) == CAST_OK) + m_uiSummonTimer = urand(24100, 26900); } + else + m_uiSummonTimer -= uiDiff; - if (CanPullBack) + if (m_bCanPullBack) { - if (ShadowWhip_Timer < diff) + if (m_uiShadowWhipTimer < uiDiff) { if (Player* pPlayer = m_creature->GetMap()->GetPlayer(m_playerGuid)) { //if unit dosen't have this flag, then no pulling back (script will attempt cast, even if orbital strike was resisted) if (pPlayer->HasMovementFlag(MOVEFLAG_FALLING)) - { - m_creature->InterruptNonMeleeSpells(false); - DoCastSpellIfCan(pPlayer,SPELL_SHADOW_WHIP); - } + DoCastSpellIfCan(pPlayer, SPELL_SHADOW_WHIP, CAST_INTERRUPT_PREVIOUS); } m_playerGuid.Clear(); - ShadowWhip_Timer = 2000; - CanPullBack = false; - }else ShadowWhip_Timer -= diff; + m_uiShadowWhipTimer = 2000; + m_bCanPullBack = false; + } + else + m_uiShadowWhipTimer -= uiDiff; } - else if (OrbitalStrike_Timer < diff) + else if (m_uiOrbitalStrikeTimer < uiDiff) { - Unit* temp = NULL; + Unit* pTemp = NULL; if (m_creature->CanReachWithMeleeAttack(m_creature->getVictim())) - temp = m_creature->getVictim(); - else temp = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0); + pTemp = m_creature->getVictim(); + else + pTemp = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0); - if (temp && temp->GetTypeId() == TYPEID_PLAYER) + if (pTemp && pTemp->GetTypeId() == TYPEID_PLAYER) { - DoCastSpellIfCan(temp,SPELL_ORBITAL_STRIKE); - OrbitalStrike_Timer = urand(14000, 16000); - m_playerGuid = temp->GetObjectGuid(); + if (DoCastSpellIfCan(pTemp, SPELL_ORBITAL_STRIKE) == CAST_OK) + { + m_uiOrbitalStrikeTimer = urand(14000, 16000); + m_playerGuid = pTemp->GetObjectGuid(); - CanPullBack = true; + m_bCanPullBack = true; + } } - }else OrbitalStrike_Timer -= diff; + } + else + m_uiOrbitalStrikeTimer -= uiDiff; if (m_creature->GetHealthPercent() < 20.0f) { - if (DemonicShield_Timer < diff) + if (m_uiDemonicShieldTimer < uiDiff) { - DoCastSpellIfCan(m_creature,SPELL_DEMONIC_SHIELD); - DemonicShield_Timer = 15000; - }else DemonicShield_Timer -= diff; + if (DoCastSpellIfCan(m_creature, SPELL_DEMONIC_SHIELD) == CAST_OK) + m_uiDemonicShieldTimer = 15000; + } + else + m_uiDemonicShieldTimer -= uiDiff; } - if (Aura_Timer < diff) + if (m_uiAuraTimer < uiDiff) { - DoScriptText(SAY_CURSE, m_creature); - - if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) { - DoCastSpellIfCan(target, m_bIsRegularMode ? SPELL_TREACHEROUS_AURA : SPELL_BANE_OF_TREACHERY_H); - Aura_Timer = urand(8000, 16000); + if (DoCastSpellIfCan(pTarget, m_bIsRegularMode ? SPELL_TREACHEROUS_AURA : SPELL_BANE_OF_TREACHERY_H) == CAST_OK) + { + m_uiAuraTimer = urand(8000, 16000); + DoScriptText(SAY_CURSE, m_creature); + } } - }else Aura_Timer -= diff; + } + else + m_uiAuraTimer -= uiDiff; - if (Shadowbolt_Timer < diff) + if (m_uiShadowboltTimer < uiDiff) { - if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1)) { - if (target) - target = m_creature->getVictim(); - - DoCastSpellIfCan(target, m_bIsRegularMode ? SPELL_SHADOW_BOLT : SPELL_SHADOW_BOLT_H); - Shadowbolt_Timer = urand(4000, 6500); + if (DoCastSpellIfCan(pTarget, m_bIsRegularMode ? SPELL_SHADOW_BOLT : SPELL_SHADOW_BOLT_H) == CAST_OK) + m_uiShadowboltTimer = urand(4200, 7300); } - }else Shadowbolt_Timer -= diff; + else + m_uiShadowboltTimer = 2000; + } + else + m_uiShadowboltTimer -= uiDiff; DoMeleeAttackIfReady(); } @@ -204,10 +210,10 @@ CreatureAI* GetAI_boss_omor_the_unscarredAI(Creature* pCreature) void AddSC_boss_omor_the_unscarred() { - Script *newscript; + Script* pNewScript; - newscript = new Script; - newscript->Name = "boss_omor_the_unscarred"; - newscript->GetAI = &GetAI_boss_omor_the_unscarredAI; - newscript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "boss_omor_the_unscarred"; + pNewScript->GetAI = &GetAI_boss_omor_the_unscarredAI; + pNewScript->RegisterSelf(); } diff --git a/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_watchkeeper_gargolmar.cpp b/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_watchkeeper_gargolmar.cpp index 2a5e202c9..abf65178b 100644 --- a/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_watchkeeper_gargolmar.cpp +++ b/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_watchkeeper_gargolmar.cpp @@ -17,26 +17,30 @@ /* ScriptData SDName: Boss_Watchkeeper_Gargolmar SD%Complete: 80 -SDComment: Missing adds to heal him. Surge should be used on target furthest away, not random. +SDComment: Missing adds to heal him. Surge should be used on pTarget furthest away, not random. SDCategory: Hellfire Citadel, Hellfire Ramparts EndScriptData */ #include "precompiled.h" -#define SAY_TAUNT -1543000 -#define SAY_HEAL -1543001 -#define SAY_SURGE -1543002 -#define SAY_AGGRO_1 -1543003 -#define SAY_AGGRO_2 -1543004 -#define SAY_AGGRO_3 -1543005 -#define SAY_KILL_1 -1543006 -#define SAY_KILL_2 -1543007 -#define SAY_DIE -1543008 - -#define SPELL_MORTAL_WOUND 30641 -#define SPELL_MORTAL_WOUND_H 36814 -#define SPELL_SURGE 34645 -#define SPELL_RETALIATION 22857 +enum +{ + SAY_TAUNT = -1543000, + SAY_HEAL = -1543001, + SAY_SURGE = -1543002, + SAY_AGGRO_1 = -1543003, + SAY_AGGRO_2 = -1543004, + SAY_AGGRO_3 = -1543005, + SAY_KILL_1 = -1543006, + SAY_KILL_2 = -1543007, + SAY_DIE = -1543008, + + SPELL_MORTAL_WOUND = 30641, + SPELL_MORTAL_WOUND_H = 36814, + SPELL_SURGE = 34645, + SPELL_RETALIATION = 22857, + SPELL_OVERPOWER = 32154, +}; struct MANGOS_DLL_DECL boss_watchkeeper_gargolmarAI : public ScriptedAI { @@ -48,24 +52,26 @@ struct MANGOS_DLL_DECL boss_watchkeeper_gargolmarAI : public ScriptedAI bool m_bIsRegularMode; - uint32 Surge_Timer; - uint32 MortalWound_Timer; - uint32 Retaliation_Timer; + uint32 m_uiSurgeTimer; + uint32 m_uiMortalWoundTimer; + uint32 m_uiRetaliationTimer; + uint32 m_uiOverpowerTimer; - bool HasTaunted; - bool YelledForHeal; + bool m_bHasTaunted; + bool m_bYelledForHeal; void Reset() { - Surge_Timer = 5000; - MortalWound_Timer = 4000; - Retaliation_Timer = 0; + m_uiSurgeTimer = urand(2400, 6100); + m_uiMortalWoundTimer = urand(3500, 14400); + m_uiRetaliationTimer = 0; + m_uiOverpowerTimer = urand(3600, 14800); - HasTaunted = false; - YelledForHeal = false; + m_bHasTaunted = false; + m_bYelledForHeal = false; } - void Aggro(Unit *who) + void Aggro(Unit* pWho) { switch(urand(0, 2)) { @@ -75,73 +81,79 @@ struct MANGOS_DLL_DECL boss_watchkeeper_gargolmarAI : public ScriptedAI } } - void MoveInLineOfSight(Unit* who) + void MoveInLineOfSight(Unit* pWho) { - if (!m_creature->getVictim() && who->isTargetableForAttack() && (m_creature->IsHostileTo(who)) && who->isInAccessablePlaceFor(m_creature)) + if (!m_bHasTaunted && m_creature->IsWithinDistInMap(pWho, 60.0f)) { - 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)) - { - who->RemoveSpellsCausingAura(SPELL_AURA_MOD_STEALTH); - AttackStart(who); - } - else if (!HasTaunted && m_creature->IsWithinDistInMap(who, 60.0f)) - { - DoScriptText(SAY_TAUNT, m_creature); - HasTaunted = true; - } + DoScriptText(SAY_TAUNT, m_creature); + m_bHasTaunted = true; } + + ScriptedAI::MoveInLineOfSight(pWho); } - void KilledUnit(Unit* victim) + void KilledUnit(Unit* pVictim) { DoScriptText(urand(0, 1) ? SAY_KILL_1 : SAY_KILL_2, m_creature); } - void JustDied(Unit* Killer) + void JustDied(Unit* pKiller) { DoScriptText(SAY_DIE, m_creature); } - void UpdateAI(const uint32 diff) + void UpdateAI(const uint32 uiDiff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - if (MortalWound_Timer < diff) + if (m_uiMortalWoundTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), m_bIsRegularMode ? SPELL_MORTAL_WOUND : SPELL_MORTAL_WOUND_H); - MortalWound_Timer = urand(5000, 13000); - }else MortalWound_Timer -= diff; + if (DoCastSpellIfCan(m_creature->getVictim(), m_bIsRegularMode ? SPELL_MORTAL_WOUND : SPELL_MORTAL_WOUND_H) == CAST_OK) + m_uiMortalWoundTimer = urand(6100, 12200); + } + else + m_uiMortalWoundTimer -= uiDiff; - if (Surge_Timer < diff) + if (m_uiSurgeTimer < uiDiff) { - DoScriptText(SAY_SURGE, m_creature); - - if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) - DoCastSpellIfCan(target,SPELL_SURGE); - - Surge_Timer = urand(5000, 12000); - }else Surge_Timer -= diff; + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, SPELL_SURGE) == CAST_OK) + { + DoScriptText(SAY_SURGE, m_creature); + m_uiSurgeTimer = urand(12100, 21700); + } + } + } + else + m_uiSurgeTimer -= uiDiff; if (m_creature->GetHealthPercent() < 20.0f) { - if (Retaliation_Timer < diff) + if (m_uiRetaliationTimer < uiDiff) { - DoCastSpellIfCan(m_creature,SPELL_RETALIATION); - Retaliation_Timer = 30000; - }else Retaliation_Timer -= diff; + if (DoCastSpellIfCan(m_creature,SPELL_RETALIATION) == CAST_OK) + m_uiRetaliationTimer = 30000; + } + else + m_uiRetaliationTimer -= uiDiff; } - if (!YelledForHeal) + if (m_uiOverpowerTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_OVERPOWER) == CAST_OK) + m_uiOverpowerTimer = urand(18100, 33700); + } + else + m_uiOverpowerTimer -= uiDiff; + + if (!m_bYelledForHeal) { if (m_creature->GetHealthPercent() < 40.0f) { DoScriptText(SAY_HEAL, m_creature); - YelledForHeal = true; + m_bYelledForHeal = true; } } @@ -156,9 +168,10 @@ CreatureAI* GetAI_boss_watchkeeper_gargolmarAI(Creature* pCreature) void AddSC_boss_watchkeeper_gargolmar() { - Script *newscript; - newscript = new Script; - newscript->Name = "boss_watchkeeper_gargolmar"; - newscript->GetAI = &GetAI_boss_watchkeeper_gargolmarAI; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_watchkeeper_gargolmar"; + pNewScript->GetAI = &GetAI_boss_watchkeeper_gargolmarAI; + pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index da9557e91..b3c956100 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2259" + #define SD2_REVISION_NR "2260" #endif // __SD2_REVISION_NR_H__ From 2cf61e583eb4e4beab3f6a42d0fc9393a004f4e6 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Wed, 10 Aug 2011 20:11:38 +0200 Subject: [PATCH 0241/1172] [2261] Some enlarging of sc_creature * Make the interface between CreatureAI and ScriptedAI more stable by listing all CreatureAI virtuals and mark them with override, this will throw compile errors if they get changed and will mismatch * Add a few comments what the ScriptedAI functions in SD2 do by default - how they are called can be seen in MaNGOS --- include/sc_creature.cpp | 41 +++++++- include/sc_creature.h | 225 ++++++++++++++++++++++++---------------- sd2_revision_nr.h | 2 +- 3 files changed, 174 insertions(+), 94 deletions(-) diff --git a/include/sc_creature.cpp b/include/sc_creature.cpp index 4c552b9ce..5ce152bc1 100644 --- a/include/sc_creature.cpp +++ b/include/sc_creature.cpp @@ -20,11 +20,13 @@ ScriptedAI::ScriptedAI(Creature* pCreature) : CreatureAI(pCreature), m_uiEvadeCheckCooldown(2500) {} +/// This function shows if combat movement is enabled, overwrite for more info void ScriptedAI::GetAIInformation(ChatHandler& reader) { reader.PSendSysMessage("ScriptedAI, combat movement is %s", reader.GetOnOffStr(m_bCombatMovement)); } +/// Return if the creature can "see" pWho bool ScriptedAI::IsVisible(Unit* pWho) const { if (!pWho) @@ -33,6 +35,15 @@ bool ScriptedAI::IsVisible(Unit* pWho) const return m_creature->IsWithinDist(pWho, VISIBLE_RANGE) && pWho->isVisibleForOrDetect(m_creature, m_creature, true); } +/** + * This function triggers the creature attacking pWho, depending on conditions like: + * - Can the creature start an attack? + * - Is pWho hostile to the creature? + * - Can the creature reach pWho? + * - Is pWho in aggro-range? + * If the creature can attack pWho, it will if it has no victim. + * Inside dungeons, the creature will get into combat with pWho, even if it has already a victim + */ void ScriptedAI::MoveInLineOfSight(Unit* pWho) { if (m_creature->CanInitiateAttack() && pWho->isTargetableForAttack() && @@ -57,9 +68,13 @@ void ScriptedAI::MoveInLineOfSight(Unit* pWho) } } +/** + * This function sets the TargetGuid for the creature if required + * Also it will handle the combat movement (chase movement), depending on SetCombatMovement(bool) + */ void ScriptedAI::AttackStart(Unit* pWho) { - if (pWho && m_creature->Attack(pWho, true)) + if (pWho && m_creature->Attack(pWho, true)) // The Attack function also uses basic checks if pWho can be attacked { m_creature->AddThreat(pWho); m_creature->SetInCombatWith(pWho); @@ -70,16 +85,21 @@ void ScriptedAI::AttackStart(Unit* pWho) } } +/** + * This function only calls Aggro, which is to be used for scripting purposes + */ void ScriptedAI::EnterCombat(Unit* pEnemy) { if (pEnemy) Aggro(pEnemy); } -void ScriptedAI::Aggro(Unit* pEnemy) -{ -} - +/** + * Main update function, by default let the creature behave as expected by a mob (threat management and melee dmg) + * Always handle here threat-management with m_creature->SelectHostileTarget() + * Handle (if required) melee attack with DoMeleeAttackIfReady() + * This is usally overwritten to support timers for ie spells + */ void ScriptedAI::UpdateAI(const uint32 uiDiff) { //Check if we have a current target @@ -89,6 +109,16 @@ void ScriptedAI::UpdateAI(const uint32 uiDiff) DoMeleeAttackIfReady(); } +/** + * This function cleans up the combat state if the creature evades + * It will: + * - Drop Auras + * - Drop all threat + * - Stop combat + * - Move the creature home + * - Clear tagging for loot + * - call Reset() + */ void ScriptedAI::EnterEvadeMode() { m_creature->RemoveAllAuras(); @@ -104,6 +134,7 @@ void ScriptedAI::EnterEvadeMode() Reset(); } +/// This function calls Reset() to reset variables as expected void ScriptedAI::JustRespawned() { Reset(); diff --git a/include/sc_creature.h b/include/sc_creature.h index 42a2a0953..97cb94c4a 100644 --- a/include/sc_creature.h +++ b/include/sc_creature.h @@ -40,135 +40,184 @@ enum SCEquip EQUIP_UNEQUIP = 0 }; +/// Documentation of CreatureAI functions can be found in MaNGOS source +// Only list them here again to ensure that the interface between SD2 and the core is not changed unnoticed struct MANGOS_DLL_DECL ScriptedAI : public CreatureAI { - explicit ScriptedAI(Creature* pCreature); - ~ScriptedAI() {} + public: + explicit ScriptedAI(Creature* pCreature); + ~ScriptedAI() {} - //************* - //CreatureAI Functions - //************* + // ************* + // CreatureAI Functions + // ************* - void GetAIInformation(ChatHandler& reader); + // == Information about AI ======================== + // Get information about the AI + void GetAIInformation(ChatHandler& reader) override; + + // == Reactions At ================================= + + // Called if IsVisible(Unit* pWho) is true at each relative pWho move + void MoveInLineOfSight(Unit* pWho) override; + + // Called for reaction at enter to combat if not in combat yet (enemy can be NULL) + void EnterCombat(Unit* pEnemy) override; + + // Called at stoping attack by any attacker + void EnterEvadeMode() override; + + // Called when reached home after MoveTargetHome (in evade) + void JustReachedHome() override {} + + // Called at any heal cast/item used (call non implemented in mangos) + // void HealBy(Unit* pHealer, uint32 uiAmountHealed) override {} + + // Called at any Damage to any victim (before damage apply) + void DamageDeal(Unit* pDoneTo, uint32& uiDamage) override {} + + // Called at any Damage from any attacker (before damage apply) + void DamageTaken(Unit* pDealer, uint32& uiDamage) override {} + + // Called at creature death + void JustDied(Unit* pKiller) override {} + + // Called when the corpse of this creature gets removed + void CorpseRemoved(uint32& uiRespawnDelay) override {} + + // Called when a summoned creature is killed + void SummonedCreatureJustDied(Creature* pSummoned) {} + + // Called at creature killing another unit + void KilledUnit(Unit* pVictim) override {} - //Called if IsVisible(Unit *who) is true at each *who move - void MoveInLineOfSight(Unit*); + // Called when owner of m_creature (if m_creature is PROTECTOR_PET) kills a unit + void OwnerKilledUnit(Unit* pVictim) override {} - //Called at each attack of m_creature by any victim - void AttackStart(Unit*); + // Called when the creature successfully summons a creature + void JustSummoned(Creature* pSummoned) override {} - // Called for reaction at enter to combat if not in combat yet (enemy can be NULL) - void EnterCombat(Unit*); + // Called when the creature successfully summons a gameobject + void JustSummoned(GameObject* pGo) override {} - //Called at stoping attack by any attacker - void EnterEvadeMode(); + // Called when a summoned creature gets TemporarySummon::UnSummon ed + void SummonedCreatureDespawn(Creature* pSummoned) override {} - //Called at any heal cast/item used (call non implemented in mangos) - void HealBy(Unit* pHealer, uint32 uiAmountHealed) {} + // Called when hit by a spell + void SpellHit(Unit* pCaster, const SpellEntry* pSpell) override {} - // Called at any Damage to any victim (before damage apply) - void DamageDeal(Unit* pDoneTo, uint32& uiDamage) {} + // Called when spell hits creature's target + void SpellHitTarget(Unit* pTarget, const SpellEntry* pSpell) override {} - // Called at any Damage from any attacker (before damage apply) - void DamageTaken(Unit* pDoneBy, uint32& uiDamage) {} + // Called when the creature is target of hostile action: swing, hostile spell landed, fear/etc) + /// This will by default result in reattacking, if the creature has no victim + void AttackedBy(Unit* pAttacker) override { CreatureAI::AttackedBy(pAttacker); } - //Is unit visible for MoveInLineOfSight - bool IsVisible(Unit* pWho) const; + // Called when creature is respawned (for reseting variables) + void JustRespawned() override; - //Called at World update tick - void UpdateAI(const uint32); + // Called at waypoint reached or point movement finished + void MovementInform(uint32 uiMovementType, uint32 uiData) override {} - //Called at creature death - void JustDied(Unit*) {} + // Called if a temporary summoned of m_creature reach a move point + void SummonedMovementInform(Creature* pSummoned, uint32 uiMotionType, uint32 uiData) override {} - //Called at creature killing another unit - void KilledUnit(Unit*) {} + // Called at text emote receive from player + void ReceiveEmote(Player* pPlayer, uint32 uiEmote) override {} - // Called when the creature summon successfully other creature - void JustSummoned(Creature*) {} + // Called at each attack of m_creature by any victim + void AttackStart(Unit* pWho) override; - // Called when a summoned creature is despawned - void SummonedCreatureDespawn(Creature*) {} + // Called at World update tick + void UpdateAI(const uint32) override; - // Called when hit by a spell - void SpellHit(Unit*, const SpellEntry*) {} + // == State checks ================================= - // Called when creature is spawned or respawned (for reseting variables) - void JustRespawned(); + // Check if unit is visible for MoveInLineOfSight + bool IsVisible(Unit* pWho) const override; - //Called at waypoint reached or PointMovement end - void MovementInform(uint32, uint32) {} + // Called when victim entered water and creature can not enter water + bool canReachByRangeAttack(Unit* pWho) override { return CreatureAI::canReachByRangeAttack(pWho); } - //************* - // Variables - //************* + // ************* + // Variables + // ************* - //************* - //Pure virtual functions - //************* + // ************* + // Pure virtual functions + // ************* - //Called at creature reset either by death or evade - virtual void Reset() = 0; + /** + * This is a SD2 internal function, that every AI must implement + * Usally used to reset combat variables + * Called by default on creature evade and respawn + * In most scripts also called in the constructor of the AI + */ + virtual void Reset() = 0; - //Called at creature EnterCombat - virtual void Aggro(Unit*); + /// Called at creature EnterCombat with an enemy + /** + * This is a SD2 internal function + * Called by default on creature EnterCombat with an enemy + */ + virtual void Aggro(Unit*) {} - //************* - //AI Helper Functions - //************* + // ************* + // AI Helper Functions + // ************* - //Start movement toward victim - void DoStartMovement(Unit* pVictim, float fDistance = 0, float fAngle = 0); + // Start movement toward victim + void DoStartMovement(Unit* pVictim, float fDistance = 0, float fAngle = 0); - //Start no movement on victim - void DoStartNoMovement(Unit* pVictim); + // Start no movement on victim + void DoStartNoMovement(Unit* pVictim); - //Stop attack of current victim - void DoStopAttack(); + // Stop attack of current victim + void DoStopAttack(); - //Cast spell by Id - void DoCast(Unit* pTarget, uint32 uiSpellId, bool bTriggered = false); + // Cast spell by Id + void DoCast(Unit* pTarget, uint32 uiSpellId, bool bTriggered = false); - //Cast spell by spell info - void DoCastSpell(Unit* pTarget, SpellEntry const* pSpellInfo, bool bTriggered = false); + // Cast spell by spell info + void DoCastSpell(Unit* pTarget, SpellEntry const* pSpellInfo, bool bTriggered = false); - //Plays a sound to all nearby players - void DoPlaySoundToSet(WorldObject* pSource, uint32 uiSoundId); + // Plays a sound to all nearby players + void DoPlaySoundToSet(WorldObject* pSource, uint32 uiSoundId); - //Drops all threat to 0%. Does not remove players from the threat list - void DoResetThreat(); + // Drops all threat to 0%. Does not remove enemies from the threat list + void DoResetThreat(); - //Teleports a player without dropping threat (only teleports to same map) - void DoTeleportPlayer(Unit* pUnit, float fX, float fY, float fZ, float fO); + // Teleports a player without dropping threat (only teleports to same map) + void DoTeleportPlayer(Unit* pUnit, float fX, float fY, float fZ, float fO); - //Returns friendly unit with the most amount of hp missing from max hp - Unit* DoSelectLowestHpFriendly(float fRange, uint32 uiMinHPDiff = 1); + // Returns friendly unit with the most amount of hp missing from max hp + Unit* DoSelectLowestHpFriendly(float fRange, uint32 uiMinHPDiff = 1); - //Returns a list of friendly CC'd units within range - std::list DoFindFriendlyCC(float fRange); + // Returns a list of friendly CC'd units within range + std::list DoFindFriendlyCC(float fRange); - //Returns a list of all friendly units missing a specific buff within range - std::list DoFindFriendlyMissingBuff(float fRange, uint32 uiSpellId); + // Returns a list of all friendly units missing a specific buff within range + std::list DoFindFriendlyMissingBuff(float fRange, uint32 uiSpellId); - //Return a player with at least minimumRange from m_creature - Player* GetPlayerAtMinimumRange(float fMinimumRange); + // Return a player with at least minimumRange from m_creature + Player* GetPlayerAtMinimumRange(float fMinimumRange); - //Spawns a creature relative to m_creature - Creature* DoSpawnCreature(uint32 uiId, float fX, float fY, float fZ, float fAngle, uint32 uiType, uint32 uiDespawntime); + // Spawns a creature relative to m_creature + Creature* DoSpawnCreature(uint32 uiId, float fX, float fY, float fZ, float fAngle, uint32 uiType, uint32 uiDespawntime); - //Returns spells that meet the specified criteria from the creatures spell list - SpellEntry const* SelectSpell(Unit* pTarget, int32 uiSchool, int32 uiMechanic, SelectTarget selectTargets, uint32 uiPowerCostMin, uint32 uiPowerCostMax, float fRangeMin, float fRangeMax, SelectEffect selectEffect); + // Returns spells that meet the specified criteria from the creatures spell list + SpellEntry const* SelectSpell(Unit* pTarget, int32 uiSchool, int32 uiMechanic, SelectTarget selectTargets, uint32 uiPowerCostMin, uint32 uiPowerCostMax, float fRangeMin, float fRangeMax, SelectEffect selectEffect); - //Checks if you can cast the specified spell - bool CanCast(Unit* pTarget, SpellEntry const* pSpell, bool bTriggered = false); + // Checks if you can cast the specified spell + bool CanCast(Unit* pTarget, SpellEntry const* pSpell, bool bTriggered = false); - void SetEquipmentSlots(bool bLoadDefault, int32 uiMainHand = EQUIP_NO_CHANGE, int32 uiOffHand = EQUIP_NO_CHANGE, int32 uiRanged = EQUIP_NO_CHANGE); + void SetEquipmentSlots(bool bLoadDefault, int32 uiMainHand = EQUIP_NO_CHANGE, int32 uiOffHand = EQUIP_NO_CHANGE, int32 uiRanged = EQUIP_NO_CHANGE); - //Generally used to control if MoveChase() is to be used or not in AttackStart(). Some creatures does not chase victims - void SetCombatMovement(bool bCombatMove); - bool IsCombatMovement() { return m_bCombatMovement; } + // Generally used to control if MoveChase() is to be used or not in AttackStart(). Some creatures do not chase victims + void SetCombatMovement(bool bCombatMove); + bool IsCombatMovement() { return m_bCombatMovement; } - bool EnterEvadeIfOutOfCombatArea(const uint32 uiDiff); + bool EnterEvadeIfOutOfCombatArea(const uint32 uiDiff); private: bool m_bCombatMovement; @@ -181,8 +230,8 @@ struct MANGOS_DLL_DECL Scripted_NoMovementAI : public ScriptedAI void GetAIInformation(ChatHandler& reader); - //Called at each attack of m_creature by any victim - void AttackStart(Unit*); + // Called at each attack of m_creature by any victim + void AttackStart(Unit* pWho); }; #endif diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index b3c956100..be1ec8e8a 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2260" + #define SD2_REVISION_NR "2261" #endif // __SD2_REVISION_NR_H__ From 5d281ded9d882341c08feb5dc25d79b7af7c3e94 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Thu, 11 Aug 2011 13:54:04 +0200 Subject: [PATCH 0242/1172] [2262] Enable second phase for Bronjahm --- .../forge_of_souls/boss_bronjahm.cpp | 16 +++++++--------- sd2_revision_nr.h | 2 +- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_bronjahm.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_bronjahm.cpp index bb44dd925..2e1c55ffb 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_bronjahm.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_bronjahm.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: boss_bronjahm -SD%Complete: 80% -SDComment: Small unknown behaviour for his Shadow Bold use in phase 1; Soulstorm currently bugged in core, hence second phase disabled +SD%Complete: 90% +SDComment: Small unknown behaviour for his Shadow Bold use in phase 1; Soulstorm needs additional handling in core SDCategory: The Forge of Souls EndScriptData */ @@ -129,13 +129,11 @@ struct MANGOS_DLL_DECL boss_bronjahmAI : public ScriptedAI if (m_uiPhase == 0) // Phase 1 { // Switching Phase, Soulstorm is cast in SpellHitTarget - /* TODO - Uncomment when Soulstorm properly implemented in core - * if (m_creature->GetHealthPercent() < 30.0f) - * { - * if (DoCastSpellIfCan(m_creature, SPELL_TELEPORT) == CAST_OK) - * m_uiPhase = 1; - * } - */ + if (m_creature->GetHealthPercent() < 30.0f) + { + if (DoCastSpellIfCan(m_creature, SPELL_TELEPORT) == CAST_OK) + m_uiPhase = 1; + } // Corrupt Soul if (m_uiCorruptSoulTimer < uiDiff) diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index be1ec8e8a..872adf63a 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2261" + #define SD2_REVISION_NR "2262" #endif // __SD2_REVISION_NR_H__ From 3f26d7c5db3ceb9117fb4a9681da238340a3522d Mon Sep 17 00:00:00 2001 From: Xfurry Date: Fri, 12 Aug 2011 21:45:54 +0200 Subject: [PATCH 0243/1172] [2263] Implement basic script for General Vezax in Ulduar Signed-off-by: Schmoozerd --- .../ulduar/ulduar/boss_general_vezax.cpp | 276 +++++++++++++++++- .../ulduar/ulduar/instance_ulduar.cpp | 10 + scripts/northrend/ulduar/ulduar/ulduar.h | 5 + sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 4 + sql/updates/r2263_mangos.sql | 4 + 6 files changed, 299 insertions(+), 2 deletions(-) create mode 100644 sql/updates/r2263_mangos.sql diff --git a/scripts/northrend/ulduar/ulduar/boss_general_vezax.cpp b/scripts/northrend/ulduar/ulduar/boss_general_vezax.cpp index 8b96937bc..f55f9fca3 100644 --- a/scripts/northrend/ulduar/ulduar/boss_general_vezax.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_general_vezax.cpp @@ -16,7 +16,7 @@ /* ScriptData SDName: boss_general_vezax -SD%Complete: 0% +SD%Complete: 80% SDComment: SDCategory: Ulduar EndScriptData */ @@ -37,9 +37,283 @@ enum EMOTE_VAPOR = -1603103, EMOTE_SURGE = -1603104, EMOTE_ANIMUS = -1603105, + + SPELL_AURA_OF_DESPAIR = 62692, + SPELL_SHADOW_CRASH = 62660, + SPELL_MARK_OF_FACELESS = 63276, // triggers 63278 + SPELL_SEARING_FLAMES = 62661, + SPELL_SURGE_OF_DARKNESS = 62662, + SPELL_BERSERK = 26662, + SPELL_SARONITE_BARRIER = 63364, // also sends event 9735 + SPELL_SUMMON_ANIMUS = 63145, // the animus should spam 63420 on target - to be done in acid + SPELL_SUMMON_VAPORS = 63081, + SPELL_ANIMUS_FORMATION = 63319, // visual aura on the vapors + SPELL_SARONITE_VAPORS = 63323, // cast by vapor on death + SPELL_CORRUPTED_RAGE = 68415, // Unused + SPELL_CORRUPTED_WISDOM = 64646, + + MAX_HARD_MODE_VAPORS = 6, + + NPC_SARONITE_VAPOR = 33488, +}; + +struct MANGOS_DLL_DECL boss_general_vezaxAI : public ScriptedAI +{ + boss_general_vezaxAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (instance_ulduar*)pCreature->GetInstanceData(); + Reset(); + } + + instance_ulduar* m_pInstance; + + uint32 m_uiEnrageTimer; + uint32 m_uiCrashTimer; + uint32 m_uiMarkTimer; + uint32 m_uiFlamesTimer; + uint32 m_uiSurgeTimer; + uint32 m_uiSaroniteVaporTimer; + uint32 m_uiSaroniteBarrierTimer; + + uint8 m_uiVaporsGathered; + + GUIDList m_lVaporsGuids; + + void Reset() + { + m_uiEnrageTimer = 10*MINUTE*IN_MILLISECONDS; + m_uiFlamesTimer = 8000; + m_uiSaroniteVaporTimer = 30000; + m_uiSurgeTimer = 60000; + m_uiMarkTimer = 20000; + m_uiCrashTimer = 15000; + m_uiSaroniteBarrierTimer = 0; + m_uiVaporsGathered = 0; + } + + void Aggro(Unit* pWho) + { + if (m_pInstance) + { + m_pInstance->SetData(TYPE_VEZAX, IN_PROGRESS); + m_pInstance->SetData(TYPE_VEZAX_HARD, NOT_STARTED); + } + + DoCastSpellIfCan(m_creature, SPELL_AURA_OF_DESPAIR); + + DoScriptText(SAY_AGGRO, m_creature); + } + + void JustReachedHome() + { + if (m_pInstance) + m_pInstance->SetData(TYPE_VEZAX, FAIL); + } + + void JustDied(Unit* pKiller) + { + if (m_pInstance) + m_pInstance->SetData(TYPE_VEZAX, DONE); + + DoScriptText(SAY_DEATH, m_creature); + } + + void KilledUnit(Unit* pVictim) + { + DoScriptText(urand(0, 1) ? SAY_SLAY_1 : SAY_SLAY_2, m_creature); + } + + void JustSummoned(Creature* pSummoned) + { + if (pSummoned->GetEntry() == NPC_SARONITE_VAPOR) + { + m_lVaporsGuids.push_back(pSummoned->GetObjectGuid()); + + // if vapors have reached the max number for hard mode then summon animus + if (m_lVaporsGuids.size() == MAX_HARD_MODE_VAPORS) + DoPrepareAnimusIfCan(); + } + // ToDo: faction should be set in DB + else if (pSummoned->GetEntry() == NPC_SARONITE_ANIMUS) + pSummoned->setFaction(14); + } + + void SummonedCreatureJustDied(Creature* pSummoned) + { + // decrease the number of vapors when they die + if (pSummoned->GetEntry() == NPC_SARONITE_VAPOR) + { + pSummoned->CastSpell(pSummoned, SPELL_SARONITE_VAPORS, true); + m_lVaporsGuids.remove(pSummoned->GetObjectGuid()); + } + // remove saronite barrier when animus dies + else if (pSummoned->GetEntry() == NPC_SARONITE_ANIMUS) + { + m_creature->RemoveAurasDueToSpell(SPELL_SARONITE_BARRIER); + + if (m_creature->isAlive() && m_pInstance) + m_pInstance->SetData(TYPE_VEZAX_HARD, DONE); + } + } + + void SummonedMovementInform(Creature* pSummoned, uint32 uiMoveType, uint32 uiPointId) + { + if (uiMoveType != POINT_MOTION_TYPE || uiPointId != 0 || pSummoned->GetEntry() != NPC_SARONITE_VAPOR) + return; + + ++m_uiVaporsGathered; + + // Cast the saronite formation aura when all vapors arive + if (m_uiVaporsGathered == MAX_HARD_MODE_VAPORS) + { + pSummoned->CastSpell(pSummoned, SPELL_ANIMUS_FORMATION, true); + + // Despawn the vapors + for (GUIDList::const_iterator itr = m_lVaporsGuids.begin(); itr != m_lVaporsGuids.end(); ++itr) + { + if (Creature* pVapor = m_creature->GetMap()->GetCreature(*itr)) + pVapor->ForcedDespawn(4000); + } + + DoScriptText(EMOTE_ANIMUS, m_creature); + m_uiSaroniteBarrierTimer = 4000; + } + } + + // Merge vapors + void DoPrepareAnimusIfCan() + { + // Gather the vapors to the boss - NOTE: not sure if position is ok + for (GUIDList::const_iterator itr = m_lVaporsGuids.begin(); itr != m_lVaporsGuids.end(); ++itr) + { + // Better place: near him or some fixed position? + if (Creature* pVapor = m_creature->GetMap()->GetCreature(*itr)) + pVapor->GetMotionMaster()->MovePoint(0, m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ()); + } + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_uiSaroniteBarrierTimer) + { + if (m_uiSaroniteBarrierTimer <= uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_SARONITE_BARRIER) == CAST_OK) + m_uiSaroniteBarrierTimer = 0; + } + else + m_uiSaroniteBarrierTimer -= uiDiff; + } + + // summon saronite vapors before the hard mode + if (m_pInstance && m_pInstance->GetData(TYPE_VEZAX_HARD) == NOT_STARTED) + { + if (m_uiSaroniteVaporTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_SUMMON_VAPORS) == CAST_OK) + { + DoScriptText(EMOTE_VAPOR, m_creature); + m_uiSaroniteVaporTimer = 30000; + } + } + else + m_uiSaroniteVaporTimer -= uiDiff; + } + + if (m_uiFlamesTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_SEARING_FLAMES) == CAST_OK) + m_uiFlamesTimer = urand(5000, 10000); + } + else + m_uiFlamesTimer -= uiDiff; + + if (m_uiSurgeTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_SURGE_OF_DARKNESS) == CAST_OK) + { + DoScriptText(SAY_SURGE, m_creature); + DoScriptText(EMOTE_SURGE, m_creature); + m_uiSurgeTimer = 62000; + } + } + else + m_uiSurgeTimer -= uiDiff; + + if (m_uiMarkTimer < uiDiff) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1)) + { + if (DoCastSpellIfCan(pTarget, SPELL_MARK_OF_FACELESS) == CAST_OK) + m_uiMarkTimer = urand(25000, 30000); + } + } + else + m_uiMarkTimer -= uiDiff; + + if (m_uiCrashTimer < uiDiff) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1)) + { + if (DoCastSpellIfCan(pTarget, SPELL_SHADOW_CRASH) == CAST_OK) + m_uiCrashTimer = 15000; + } + } + else + m_uiCrashTimer -= uiDiff; + + if (m_uiEnrageTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_BERSERK) == CAST_OK) + { + DoScriptText(SAY_ENRAGE, m_creature); + m_uiEnrageTimer = 30000; + } + } + else + m_uiEnrageTimer -= uiDiff; + + DoMeleeAttackIfReady(); + } }; +CreatureAI* GetAI_boss_general_vezax(Creature* pCreature) +{ + return new boss_general_vezaxAI(pCreature); +} + +bool ProcessEventId_event_spell_saronite_barrier(uint32 uiEventId, Object* pSource, Object* pTarget, bool bIsStart) +{ + if (pSource->GetTypeId() == TYPEID_UNIT && ((Creature*)pSource)->GetEntry() == NPC_VEZAX) + { + if (instance_ulduar* pInstance = (instance_ulduar*)((Creature*)pSource)->GetInstanceData()) + { + // Start hard mode for Vezax and summon the Animus + pInstance->SetData(TYPE_VEZAX_HARD, IN_PROGRESS); + + ((Creature*)pSource)->CastSpell((Creature*)pSource, SPELL_SUMMON_ANIMUS, true); + DoScriptText(SAY_HARD_MODE, (Creature*)pSource); + + return true; + } + } + return false; +} + void AddSC_boss_general_vezax() { + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_general_vezax"; + pNewScript->GetAI = &GetAI_boss_general_vezax; + pNewScript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "event_spell_saronite_barrier"; + pNewScript->pProcessEventId = &ProcessEventId_event_spell_saronite_barrier; + pNewScript->RegisterSelf(); } diff --git a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp index 1d8acdf93..8aac81285 100644 --- a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp +++ b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp @@ -551,6 +551,16 @@ void instance_ulduar::Load(const char* strIn) OUT_LOAD_INST_DATA_COMPLETE; } +bool instance_ulduar::CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/) +{ + switch (uiCriteriaId) + { + case ACHIEV_CRIT_SARONITE_N: + case ACHIEV_CRIT_SARONITE_H: + return GetData(TYPE_VEZAX_HARD) == DONE; + } +} + InstanceData* GetInstanceData_instance_ulduar(Map* pMap) { return new instance_ulduar(pMap); diff --git a/scripts/northrend/ulduar/ulduar/ulduar.h b/scripts/northrend/ulduar/ulduar/ulduar.h index a01f49f3d..20c1cdc73 100644 --- a/scripts/northrend/ulduar/ulduar/ulduar.h +++ b/scripts/northrend/ulduar/ulduar/ulduar.h @@ -191,6 +191,10 @@ enum // World state used for algalon timer WORLD_STATE_TIMER = 4132, WORLD_STATE_TIMER_COUNT = 4131, + + // Achievement related + ACHIEV_CRIT_SARONITE_N = 10451, // General Vezax, achievs 3181, 3188 + ACHIEV_CRIT_SARONITE_H = 10462, }; class MANGOS_DLL_DECL instance_ulduar : public ScriptedInstance @@ -211,6 +215,7 @@ class MANGOS_DLL_DECL instance_ulduar : public ScriptedInstance const char* Save() { return m_strInstData.c_str(); } void Load(const char* chrIn); + bool CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/); // Dummy, leave till correct solution for hardmode found bool CheckConditionCriteriaMeet(Player const* pSource, uint32 uiMapId, uint32 uiInstanceConditionId); diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 872adf63a..ad4d49b16 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2262" + #define SD2_REVISION_NR "2263" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 09d5b9332..b68be4815 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -1231,6 +1231,10 @@ UPDATE creature_template SET ScriptName='npc_brann_hos' WHERE entry=28070; /* ULDUAR */ UPDATE instance_template SET ScriptName='instance_ulduar' WHERE map=603; +UPDATE creature_template SET ScriptName='boss_general_vezax' WHERE entry=33271; +DELETE FROM scripted_event_id WHERE id=9735; +INSERT INTO scripted_event_id VALUES +(9735,'event_spell_saronite_barrier'); /* UN'GORO CRATER */ UPDATE creature_template SET ScriptName='npc_ame01' WHERE entry=9623; diff --git a/sql/updates/r2263_mangos.sql b/sql/updates/r2263_mangos.sql new file mode 100644 index 000000000..2164eb593 --- /dev/null +++ b/sql/updates/r2263_mangos.sql @@ -0,0 +1,4 @@ +UPDATE creature_template SET ScriptName='boss_general_vezax' WHERE entry=33271; +DELETE FROM scripted_event_id WHERE id=9735; +INSERT INTO scripted_event_id VALUES +(9735,'event_spell_saronite_barrier'); From 1ee626ebe043936bc5087195ff51ee283324789b Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Sat, 13 Aug 2011 01:00:27 +0200 Subject: [PATCH 0244/1172] [2264] Cleanup script for Warchief Kargath Bladefist * Remove some unneeded vars, thanks to Goaul for pointing * Move Evade check to proper place * Fix warning in instance_ulduar.cpp, thanks to Pandore for pointing --- include/sc_creature.cpp | 7 + .../ulduar/ulduar/instance_ulduar.cpp | 3 + .../boss_warchief_kargath_bladefist.cpp | 251 +++++++++--------- sd2_revision_nr.h | 2 +- 4 files changed, 140 insertions(+), 123 deletions(-) diff --git a/include/sc_creature.cpp b/include/sc_creature.cpp index 5ce152bc1..fe6772a45 100644 --- a/include/sc_creature.cpp +++ b/include/sc_creature.cpp @@ -506,6 +506,7 @@ enum NPC_JAN_ALAI = 23578, NPC_SARTHARION = 28860, NPC_TALON_KING_IKISS = 18473, + NPC_KARGATH_BLADEFIST = 16808, }; bool ScriptedAI::EnterEvadeIfOutOfCombatArea(const uint32 uiDiff) @@ -544,11 +545,17 @@ bool ScriptedAI::EnterEvadeIfOutOfCombatArea(const uint32 uiDiff) return false; break; case NPC_TALON_KING_IKISS: + { float fX, fY, fZ; m_creature->GetRespawnCoord(fX, fY, fZ); if (m_creature->GetDistance2d(fX, fY) < 70.0f) return false; break; + } + case NPC_KARGATH_BLADEFIST: + if (fX < 255.0f && fX > 205.0f) + return false; + break; default: error_log("SD2: EnterEvadeIfOutOfCombatArea used for creature entry %u, but does not have any definition.", m_creature->GetEntry()); return false; diff --git a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp index 8aac81285..5253b580a 100644 --- a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp +++ b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp @@ -558,6 +558,9 @@ bool instance_ulduar::CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player c case ACHIEV_CRIT_SARONITE_N: case ACHIEV_CRIT_SARONITE_H: return GetData(TYPE_VEZAX_HARD) == DONE; + + default: + return false; } } diff --git a/scripts/outland/hellfire_citadel/shattered_halls/boss_warchief_kargath_bladefist.cpp b/scripts/outland/hellfire_citadel/shattered_halls/boss_warchief_kargath_bladefist.cpp index d7586879a..7d92884ca 100644 --- a/scripts/outland/hellfire_citadel/shattered_halls/boss_warchief_kargath_bladefist.cpp +++ b/scripts/outland/hellfire_citadel/shattered_halls/boss_warchief_kargath_bladefist.cpp @@ -27,22 +27,25 @@ EndContentData */ #include "precompiled.h" -#define SAY_AGGRO1 -1540042 -#define SAY_AGGRO2 -1540043 -#define SAY_AGGRO3 -1540044 -#define SAY_SLAY1 -1540045 -#define SAY_SLAY2 -1540046 -#define SAY_DEATH -1540047 - -#define SPELL_BLADE_DANCE 30739 -#define SPELL_CHARGE_H 25821 - -#define TARGET_NUM 5 - -#define MOB_SHATTERED_ASSASSIN 17695 -#define MOB_HEARTHEN_GUARD 17621 -#define MOB_SHARPSHOOTER_GUARD 17622 -#define MOB_REAVER_GUARD 17623 +enum +{ + SAY_AGGRO1 = -1540042, + SAY_AGGRO2 = -1540043, + SAY_AGGRO3 = -1540044, + SAY_SLAY1 = -1540045, + SAY_SLAY2 = -1540046, + SAY_DEATH = -1540047, + + SPELL_BLADE_DANCE = 30739, + SPELL_CHARGE_H = 25821, + + TARGET_NUM = 5, + + NPC_SHATTERED_ASSASSIN = 17695, + NPC_HEARTHEN_GUARD = 17621, + NPC_SHARPSHOOTER_GUARD = 17622, + NPC_REAVER_GUARD = 17623, +}; float AssassEntrance[3] = {275.136f, -84.29f, 2.3f}; // y -8 float AssassExit[3] = {184.233f, -84.29f, 2.3f}; // y -8 @@ -60,21 +63,20 @@ struct MANGOS_DLL_DECL boss_warchief_kargath_bladefistAI : public ScriptedAI ScriptedInstance* m_pInstance; bool m_bIsRegularMode; - GUIDVector adds; - GUIDVector assassins; + GUIDVector m_vAddGuids; + GUIDVector m_vAssassinGuids; - uint32 Charge_timer; - uint32 Blade_Dance_Timer; - uint32 Summon_Assistant_Timer; - uint32 resetcheck_timer; - uint32 Wait_Timer; + uint32 m_uiChargeTimer; + uint32 m_uiBladeDanceTimer; + uint32 m_uiSummonAssistantTimer; + uint32 m_uiWaitTimer; - uint32 Assassins_Timer; + uint32 m_uiAssassinsTimer; - uint32 summoned; - bool InBlade; + uint32 m_uiSummoned; + bool m_bInBlade; - uint32 target_num; + uint32 m_uiTargetNum; void Reset() { @@ -82,18 +84,17 @@ struct MANGOS_DLL_DECL boss_warchief_kargath_bladefistAI : public ScriptedAI m_creature->SetSpeedRate(MOVE_RUN, 2.0f); - summoned = 2; - InBlade = false; - Wait_Timer = 0; + m_uiSummoned = 2; + m_bInBlade = false; + m_uiWaitTimer = 0; - Charge_timer = 0; - Blade_Dance_Timer = 45000; - Summon_Assistant_Timer = 30000; - Assassins_Timer = 5000; - resetcheck_timer = 5000; + m_uiChargeTimer = 0; + m_uiBladeDanceTimer = 45000; + m_uiSummonAssistantTimer = 30000; + m_uiAssassinsTimer = 5000; } - void Aggro(Unit *who) + void Aggro(Unit* pWho) { switch(urand(0, 2)) { @@ -103,51 +104,51 @@ struct MANGOS_DLL_DECL boss_warchief_kargath_bladefistAI : public ScriptedAI } } - void JustSummoned(Creature *summoned) + void JustSummoned(Creature* pSummoned) { - switch(summoned->GetEntry()) + switch(pSummoned->GetEntry()) { - case MOB_HEARTHEN_GUARD: - case MOB_SHARPSHOOTER_GUARD: - case MOB_REAVER_GUARD: - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) - summoned->AI()->AttackStart(pTarget); + case NPC_HEARTHEN_GUARD: + case NPC_SHARPSHOOTER_GUARD: + case NPC_REAVER_GUARD: + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + pSummoned->AI()->AttackStart(pTarget); - adds.push_back(summoned->GetObjectGuid()); + m_vAddGuids.push_back(pSummoned->GetObjectGuid()); break; - case MOB_SHATTERED_ASSASSIN: - assassins.push_back(summoned->GetObjectGuid()); + case NPC_SHATTERED_ASSASSIN: + m_vAssassinGuids.push_back(pSummoned->GetObjectGuid()); break; } } - void KilledUnit(Unit *victim) + void KilledUnit(Unit* pVictim) { - if (victim->GetTypeId() == TYPEID_PLAYER) + if (pVictim->GetTypeId() == TYPEID_PLAYER) DoScriptText(urand(0, 1) ? SAY_SLAY1 : SAY_SLAY2, m_creature); } - void JustDied(Unit* Killer) + void JustDied(Unit* pKiller) { DoScriptText(SAY_DEATH, m_creature); removeAdds(); } - void MovementInform(uint32 type, uint32 id) + void MovementInform(uint32 uiType, uint32 uiPointId) { - if (InBlade) + if (m_bInBlade) { - if (type != POINT_MOTION_TYPE) + if (uiType != POINT_MOTION_TYPE) return; - if (id != 1) + if (uiPointId != 1) return; - if (target_num > 0) // to prevent loops + if (m_uiTargetNum > 0) // to prevent loops { - Wait_Timer = 1; + m_uiWaitTimer = 1; DoCastSpellIfCan(m_creature, SPELL_BLADE_DANCE, CAST_TRIGGERED); - --target_num; + --m_uiTargetNum; } } } @@ -157,127 +158,132 @@ struct MANGOS_DLL_DECL boss_warchief_kargath_bladefistAI : public ScriptedAI if (!m_pInstance) return; - for(GUIDVector::const_iterator itr = adds.begin(); itr != adds.end(); ++itr) + for (GUIDVector::const_iterator itr = m_vAddGuids.begin(); itr != m_vAddGuids.end(); ++itr) { if (Creature* pTemp = m_pInstance->instance->GetCreature(*itr)) pTemp->ForcedDespawn(); } - adds.clear(); + m_vAddGuids.clear(); - for(GUIDVector::const_iterator itr = assassins.begin(); itr != assassins.end(); ++itr) + for (GUIDVector::const_iterator itr = m_vAssassinGuids.begin(); itr != m_vAssassinGuids.end(); ++itr) { if (Creature* pTemp = m_pInstance->instance->GetCreature(*itr)) pTemp->ForcedDespawn(); } - assassins.clear(); + m_vAssassinGuids.clear(); } void SpawnAssassin() { - m_creature->SummonCreature(MOB_SHATTERED_ASSASSIN,AssassEntrance[0],AssassEntrance[1]+8, AssassEntrance[2], 0,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,30000); - m_creature->SummonCreature(MOB_SHATTERED_ASSASSIN,AssassEntrance[0],AssassEntrance[1]-8, AssassEntrance[2], 0,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,30000); - m_creature->SummonCreature(MOB_SHATTERED_ASSASSIN,AssassExit[0],AssassExit[1]+8, AssassExit[2], 0,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,30000); - m_creature->SummonCreature(MOB_SHATTERED_ASSASSIN,AssassExit[0],AssassExit[1]-8, AssassExit[2], 0,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,30000); + m_creature->SummonCreature(NPC_SHATTERED_ASSASSIN, AssassEntrance[0], AssassEntrance[1]+8, AssassEntrance[2], 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 24000); + m_creature->SummonCreature(NPC_SHATTERED_ASSASSIN, AssassEntrance[0], AssassEntrance[1]-8, AssassEntrance[2], 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 24000); + m_creature->SummonCreature(NPC_SHATTERED_ASSASSIN, AssassExit[0], AssassExit[1]+8, AssassExit[2], 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 24000); + m_creature->SummonCreature(NPC_SHATTERED_ASSASSIN, AssassExit[0], AssassExit[1]-8, AssassExit[2], 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 24000); } - void UpdateAI(const uint32 diff) + void UpdateAI(const uint32 uiDiff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - if (Assassins_Timer) - if (Assassins_Timer <= diff) + // Check if out of range + if (EnterEvadeIfOutOfCombatArea(uiDiff)) + return; + + if (m_uiAssassinsTimer) + { + if (m_uiAssassinsTimer <= uiDiff) { SpawnAssassin(); - Assassins_Timer = 0; - }else Assassins_Timer -= diff; + m_uiAssassinsTimer = 0; + } + else + m_uiAssassinsTimer -= uiDiff; + } - if (InBlade) + if (m_bInBlade) { - if (Wait_Timer) - if (Wait_Timer <= diff) + if (m_uiWaitTimer) + { + if (m_uiWaitTimer <= uiDiff) { - if (target_num <= 0) + if (m_uiTargetNum == 0) { // stop bladedance - InBlade = false; + m_bInBlade = false; m_creature->SetSpeedRate(MOVE_RUN, 2.0f); - (*m_creature).GetMotionMaster()->MoveChase(m_creature->getVictim()); - Wait_Timer = 0; + m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); + m_uiWaitTimer = 0; if (!m_bIsRegularMode) - Charge_timer = 5000; + m_uiChargeTimer = 5000; } else { - //move in bladedance - float x,y,randx,randy; + // move in bladedance + float x, y, randx, randy; randx = (rand()%40); randy = (rand()%40); x = 210+ randx ; y = -60- randy ; - (*m_creature).GetMotionMaster()->MovePoint(1,x,y,m_creature->GetPositionZ()); - Wait_Timer = 0; + m_creature->GetMotionMaster()->MovePoint(1, x, y, m_creature->GetPositionZ()); + m_uiWaitTimer = 0; } - }else Wait_Timer -= diff; + } + else + m_uiWaitTimer -= uiDiff; + } } - else + else // !m_bInBlade { - if (Blade_Dance_Timer < diff) + if (m_uiBladeDanceTimer < uiDiff) { - target_num = TARGET_NUM; - Wait_Timer = 1; - InBlade = true; - Blade_Dance_Timer = 30000; + m_uiTargetNum = TARGET_NUM; + m_uiWaitTimer = 1; + m_bInBlade = true; + m_uiBladeDanceTimer = 30000; m_creature->SetSpeedRate(MOVE_RUN, 4.0f); return; - }else Blade_Dance_Timer -= diff; + } + else + m_uiBladeDanceTimer -= uiDiff; - if (Charge_timer) - if (Charge_timer <= diff) + if (m_uiChargeTimer) + { + if (m_uiChargeTimer <= uiDiff) { - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) DoCastSpellIfCan(pTarget, SPELL_CHARGE_H); - Charge_timer = 0; - }else Charge_timer -= diff; + m_uiChargeTimer = 0; + } + else + m_uiChargeTimer -= uiDiff; + } - if (Summon_Assistant_Timer < diff) + if (m_uiSummonAssistantTimer < uiDiff) { - Unit* target = NULL; - - for(uint32 i = 0; i < summoned; ++i) + for (uint32 i = 0; i < m_uiSummoned; ++i) { - switch(urand(0, 2)) + switch (urand(0, 2)) { - case 0: m_creature->SummonCreature(MOB_HEARTHEN_GUARD, AddsEntrance[0], AddsEntrance[1], AddsEntrance[2], 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,30000); break; - case 1: m_creature->SummonCreature(MOB_SHARPSHOOTER_GUARD, AddsEntrance[0], AddsEntrance[1], AddsEntrance[2], 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,30000); break; - case 2: m_creature->SummonCreature(MOB_REAVER_GUARD, AddsEntrance[0], AddsEntrance[1], AddsEntrance[2], 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,30000); break; + case 0: m_creature->SummonCreature(NPC_HEARTHEN_GUARD, AddsEntrance[0], AddsEntrance[1], AddsEntrance[2], 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 20000); break; + case 1: m_creature->SummonCreature(NPC_SHARPSHOOTER_GUARD, AddsEntrance[0], AddsEntrance[1], AddsEntrance[2], 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 20000); break; + case 2: m_creature->SummonCreature(NPC_REAVER_GUARD, AddsEntrance[0], AddsEntrance[1], AddsEntrance[2], 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 20000); break; } } if (!urand(0, 4)) - ++summoned; + ++m_uiSummoned; - Summon_Assistant_Timer = urand(25000, 35000); + m_uiSummonAssistantTimer = urand(25000, 35000); } - else Summon_Assistant_Timer -= diff; + else + m_uiSummonAssistantTimer -= uiDiff; DoMeleeAttackIfReady(); } - - if (resetcheck_timer < diff) - { - uint32 tempx,tempy; - tempx = uint32(m_creature->GetPositionX()); - tempy = uint32(m_creature->GetPositionY()); - if (tempx > 255 || tempx < 205) - { - EnterEvadeMode(); - } - resetcheck_timer = 5000; - }else resetcheck_timer -= diff; } }; @@ -288,9 +294,10 @@ CreatureAI* GetAI_boss_warchief_kargath_bladefist(Creature* pCreature) void AddSC_boss_warchief_kargath_bladefist() { - Script *newscript; - newscript = new Script; - newscript->Name = "boss_warchief_kargath_bladefist"; - newscript->GetAI = &GetAI_boss_warchief_kargath_bladefist; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_warchief_kargath_bladefist"; + pNewScript->GetAI = &GetAI_boss_warchief_kargath_bladefist; + pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index ad4d49b16..3222299d6 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2263" + #define SD2_REVISION_NR "2264" #endif // __SD2_REVISION_NR_H__ From 5a793891eed5a4530224991563b9d25bbb87e3a3 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Sun, 14 Aug 2011 22:23:32 +0200 Subject: [PATCH 0245/1172] [2265] Fix a possible Bug for Ionar In case one of the sparks would switch aggro, it would MoveChase the new target, and hence the waypoint movement would be skipped --- .../ulduar/halls_of_lightning/boss_ionar.cpp | 11 +++++------ sd2_revision_nr.h | 2 +- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/scripts/northrend/ulduar/halls_of_lightning/boss_ionar.cpp b/scripts/northrend/ulduar/halls_of_lightning/boss_ionar.cpp index 99f86ce2d..aef7ab58d 100644 --- a/scripts/northrend/ulduar/halls_of_lightning/boss_ionar.cpp +++ b/scripts/northrend/ulduar/halls_of_lightning/boss_ionar.cpp @@ -185,8 +185,9 @@ struct MANGOS_DLL_DECL boss_ionarAI : public ScriptedAI { if (pSpark->isAlive()) { - if (pSpark->GetMotionMaster()->GetCurrentMovementGeneratorType() == CHASE_MOTION_TYPE) - pSpark->GetMotionMaster()->MovementExpired(); + // Required to prevent combat movement, elsewise they might switch movement on aggro-change + if (ScriptedAI* pSparkAI = dynamic_cast(pSpark->AI())) + pSparkAI->SetCombatMovement(false); pSpark->GetMotionMaster()->MovePoint(POINT_CALLBACK, m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ()); } @@ -205,10 +206,8 @@ struct MANGOS_DLL_DECL boss_ionarAI : public ScriptedAI { pSummoned->CastSpell(pSummoned, m_bIsRegularMode ? SPELL_SPARK_VISUAL_TRIGGER_N : SPELL_SPARK_VISUAL_TRIGGER_H, true); - Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0); - - if (m_creature->getVictim()) - pSummoned->AI()->AttackStart(pTarget ? pTarget : m_creature->getVictim()); + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + pSummoned->AI()->AttackStart(pTarget); m_lSparkGUIDList.push_back(pSummoned->GetObjectGuid()); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 3222299d6..303fcf501 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2264" + #define SD2_REVISION_NR "2265" #endif // __SD2_REVISION_NR_H__ From f24040a92f206109354772590c24feda589b8c8d Mon Sep 17 00:00:00 2001 From: Xfurry Date: Mon, 15 Aug 2011 00:30:41 +0200 Subject: [PATCH 0246/1172] [2266] Small improvement for Sunwell Plateau Eredar Twins The Twins should switch their special ability when the first sister died Signed-off-by: Schmoozerd --- .../sunwell_plateau/boss_eredar_twins.cpp | 30 ++++++++++++------- sd2_revision_nr.h | 2 +- 2 files changed, 20 insertions(+), 12 deletions(-) diff --git a/scripts/eastern_kingdoms/sunwell_plateau/boss_eredar_twins.cpp b/scripts/eastern_kingdoms/sunwell_plateau/boss_eredar_twins.cpp index e8bd88baa..4240c2a77 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/boss_eredar_twins.cpp +++ b/scripts/eastern_kingdoms/sunwell_plateau/boss_eredar_twins.cpp @@ -17,7 +17,7 @@ /* ScriptData SDName: boss_eredar_twins SD%Complete: 75 -SDComment: A few spells are not working proper yet +SDComment: A few spells are not working proper yet; Shadow image script needs improvement SDCategory: Sunwell Plateau EndScriptData */ @@ -79,12 +79,12 @@ enum static const DialogueEntry aIntroDialogue[] = { {SAY_INTRO_1, NPC_SACROLASH, 1000}, - {SAY_INTRO_2, NPC_ALYTHESS, 1000}, - {SAY_INTRO_3, NPC_SACROLASH, 1000}, - {SAY_INTRO_4, NPC_ALYTHESS, 1000}, - {SAY_INTRO_5, NPC_SACROLASH, 1000}, - {SAY_INTRO_6, NPC_ALYTHESS, 1000}, - {SAY_INTRO_7, NPC_SACROLASH, 3000}, + {SAY_INTRO_2, NPC_ALYTHESS, 1500}, + {SAY_INTRO_3, NPC_SACROLASH, 1500}, + {SAY_INTRO_4, NPC_ALYTHESS, 1500}, + {SAY_INTRO_5, NPC_SACROLASH, 1500}, + {SAY_INTRO_6, NPC_ALYTHESS, 1500}, + {SAY_INTRO_7, NPC_SACROLASH, 2500}, {SAY_INTRO_8, NPC_ALYTHESS, 0}, {0, 0, 0}, }; @@ -237,9 +237,13 @@ struct MANGOS_DLL_DECL boss_alythessAI : public ScriptedAI if (!pTarget) pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0); - if (DoCastSpellIfCan(pTarget, SPELL_CONFLAGRATION) == CAST_OK) + // If sister is dead cast shadownova instead of conflagration + bool bSwitchSpell = m_creature->HasAura(SPELL_EMPOWER); + if (DoCastSpellIfCan(pTarget, bSwitchSpell ? SPELL_SHADOW_NOVA : SPELL_CONFLAGRATION) == CAST_OK) { - DoScriptText(SAY_ALYTHESS_CANFLAGRATION, m_creature); + if (!bSwitchSpell) + DoScriptText(SAY_ALYTHESS_CANFLAGRATION, m_creature); + m_uiConflagrationTimer = urand(20000, 25000); } } @@ -416,9 +420,13 @@ struct MANGOS_DLL_DECL boss_sacrolashAI : public ScriptedAI if (!pTarget) pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0); - if (DoCastSpellIfCan(pTarget, SPELL_SHADOW_NOVA) == CAST_OK) + // If sister is dead cast conflagration instead of shadownova + bool bSwitchSpell = m_creature->HasAura(SPELL_EMPOWER); + if (DoCastSpellIfCan(pTarget, bSwitchSpell ? SPELL_CONFLAGRATION : SPELL_SHADOW_NOVA) == CAST_OK) { - DoScriptText(SAY_SACROLASH_SHADOW_NOVA, m_creature); + if (!bSwitchSpell) + DoScriptText(SAY_SACROLASH_SHADOW_NOVA, m_creature); + m_uiShadowNovaTimer = urand(30000, 35000); } } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 303fcf501..4475d288d 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2265" + #define SD2_REVISION_NR "2266" #endif // __SD2_REVISION_NR_H__ From ee7edfee17c5da3f1087b64507c47493998d8e0a Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Thu, 1 Sep 2011 14:52:59 +0200 Subject: [PATCH 0247/1172] [2267] Fix a possible bug for Prince Keleseth. Now summoned adds are killed properly on Keleseth death while they are faking death --- .../northrend/utgarde_keep/utgarde_keep/boss_keleseth.cpp | 5 ++++- sd2_revision_nr.h | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/scripts/northrend/utgarde_keep/utgarde_keep/boss_keleseth.cpp b/scripts/northrend/utgarde_keep/utgarde_keep/boss_keleseth.cpp index 629ef2553..e4db26d98 100644 --- a/scripts/northrend/utgarde_keep/utgarde_keep/boss_keleseth.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_keep/boss_keleseth.cpp @@ -239,7 +239,10 @@ struct MANGOS_DLL_DECL boss_kelesethAI : public ScriptedAI if (bDespawn) pAdd->ForcedDespawn(); else - pAdd->DealDamage(pAdd, pAdd->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + { + pAdd->SetDeathState(JUST_DIED); + pAdd->SetHealth(0); + } } } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 4475d288d..eeccf7e83 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2266" + #define SD2_REVISION_NR "2267" #endif // __SD2_REVISION_NR_H__ From cd525e1d8c0283e119cf3284ecf2bfa53d9f28bd Mon Sep 17 00:00:00 2001 From: Xfurry Date: Thu, 1 Sep 2011 22:05:59 +0200 Subject: [PATCH 0248/1172] [2268] Implement Shattered Halls - Executioner event * Fix typos and Nethekurse entrence door * Add Evade text for Warchief Kargath * Implement (basic) executioner event Signed-off-by: Schmoozerd --- .../shattered_halls/boss_nethekurse.cpp | 17 +- .../boss_warchief_kargath_bladefist.cpp | 33 +++- .../instance_shattered_halls.cpp | 182 +++++++++++++++++- .../shattered_halls/shattered_halls.h | 60 +++++- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 2 + sql/scriptdev2_script_full.sql | 6 +- sql/updates/r2268_mangos.sql | 2 + sql/updates/r2268_scriptdev2.sql | 5 + 9 files changed, 278 insertions(+), 31 deletions(-) create mode 100644 sql/updates/r2268_mangos.sql create mode 100644 sql/updates/r2268_scriptdev2.sql diff --git a/scripts/outland/hellfire_citadel/shattered_halls/boss_nethekurse.cpp b/scripts/outland/hellfire_citadel/shattered_halls/boss_nethekurse.cpp index 41f480172..719e9192a 100644 --- a/scripts/outland/hellfire_citadel/shattered_halls/boss_nethekurse.cpp +++ b/scripts/outland/hellfire_citadel/shattered_halls/boss_nethekurse.cpp @@ -71,10 +71,10 @@ enum SPELL_SHADOW_CLEAVE = 30495, SPELL_SHADOW_SLAM_H = 35953, + SPELL_SHADOW_SEAR = 30735, // On fel orcs - not sure yet how it is used SPELL_HEMORRHAGE = 30478, - SPELL_CONSUMPTION = 30497, - SPELL_TEMPORARY_VISUAL = 39312, // this is wrong, a temporary solution. spell consumption already has the purple visual, but doesn't display as it should + SPELL_CONSUMPTION = 30497, // Cast by the shadow fissure NPC_FEL_ORC_CONVERT = 17083, }; @@ -206,11 +206,8 @@ struct MANGOS_DLL_DECL boss_grand_warlock_nethekurseAI : public ScriptedAI void MoveInLineOfSight(Unit* pWho) { - if (!m_bIntroOnce && m_creature->IsWithinDistInMap(pWho, 50.0f)) + if (!m_bIntroOnce && pWho->GetTypeId() == TYPEID_PLAYER && !((Player*)pWho)->isGameMaster() && m_creature->IsWithinDistInMap(pWho, 50.0f) && m_creature->IsWithinLOSInMap(pWho)) { - if (pWho->GetTypeId() != TYPEID_PLAYER) - return; - DoScriptText(SAY_INTRO, m_creature); m_bIntroOnce = true; m_bIsIntroEvent = true; @@ -239,12 +236,10 @@ struct MANGOS_DLL_DECL boss_grand_warlock_nethekurseAI : public ScriptedAI void JustSummoned(Creature* pSummoned) { - pSummoned->setFaction(16); + // ToDo: this should be done in DB pSummoned->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); pSummoned->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - // triggered spell of consumption does not properly show it's SpellVisual, wrong spellid? - pSummoned->CastSpell(pSummoned, SPELL_TEMPORARY_VISUAL, true); pSummoned->CastSpell(pSummoned, SPELL_CONSUMPTION, false, NULL, NULL, m_creature->GetObjectGuid()); } @@ -416,9 +411,9 @@ struct MANGOS_DLL_DECL mob_fel_orc_convertAI : public ScriptedAI }; // NOTE: this creature are also summoned by other spells, for different creatures -struct MANGOS_DLL_DECL mob_lesser_shadow_fissureAI : public ScriptedAI +struct MANGOS_DLL_DECL mob_lesser_shadow_fissureAI : public Scripted_NoMovementAI { - mob_lesser_shadow_fissureAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + mob_lesser_shadow_fissureAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { Reset(); } void Reset() { } void MoveInLineOfSight(Unit* pWho) { } diff --git a/scripts/outland/hellfire_citadel/shattered_halls/boss_warchief_kargath_bladefist.cpp b/scripts/outland/hellfire_citadel/shattered_halls/boss_warchief_kargath_bladefist.cpp index 7d92884ca..e0629da35 100644 --- a/scripts/outland/hellfire_citadel/shattered_halls/boss_warchief_kargath_bladefist.cpp +++ b/scripts/outland/hellfire_citadel/shattered_halls/boss_warchief_kargath_bladefist.cpp @@ -26,6 +26,7 @@ boss_warchief_kargath_bladefist EndContentData */ #include "precompiled.h" +#include "shattered_halls.h" enum { @@ -35,6 +36,7 @@ enum SAY_SLAY1 = -1540045, SAY_SLAY2 = -1540046, SAY_DEATH = -1540047, + SAY_EVADE = -1540048, SPELL_BLADE_DANCE = 30739, SPELL_CHARGE_H = 25821, @@ -80,8 +82,6 @@ struct MANGOS_DLL_DECL boss_warchief_kargath_bladefistAI : public ScriptedAI void Reset() { - removeAdds(); - m_creature->SetSpeedRate(MOVE_RUN, 2.0f); m_uiSummoned = 2; @@ -102,6 +102,9 @@ struct MANGOS_DLL_DECL boss_warchief_kargath_bladefistAI : public ScriptedAI case 1: DoScriptText(SAY_AGGRO2, m_creature); break; case 2: DoScriptText(SAY_AGGRO3, m_creature); break; } + + if (m_pInstance) + m_pInstance->SetData(TYPE_BLADEFIST, IN_PROGRESS); } void JustSummoned(Creature* pSummoned) @@ -131,7 +134,18 @@ struct MANGOS_DLL_DECL boss_warchief_kargath_bladefistAI : public ScriptedAI void JustDied(Unit* pKiller) { DoScriptText(SAY_DEATH, m_creature); - removeAdds(); + DoDespawnAdds(); + + if (m_pInstance) + m_pInstance->SetData(TYPE_BLADEFIST, DONE); + } + + void JustReachedHome() + { + DoDespawnAdds(); + + if (m_pInstance) + m_pInstance->SetData(TYPE_BLADEFIST, FAIL); } void MovementInform(uint32 uiType, uint32 uiPointId) @@ -153,14 +167,12 @@ struct MANGOS_DLL_DECL boss_warchief_kargath_bladefistAI : public ScriptedAI } } - void removeAdds() + // Note: this should be done by creature linkin in core + void DoDespawnAdds() { - if (!m_pInstance) - return; - for (GUIDVector::const_iterator itr = m_vAddGuids.begin(); itr != m_vAddGuids.end(); ++itr) { - if (Creature* pTemp = m_pInstance->instance->GetCreature(*itr)) + if (Creature* pTemp = m_creature->GetMap()->GetCreature(*itr)) pTemp->ForcedDespawn(); } @@ -168,7 +180,7 @@ struct MANGOS_DLL_DECL boss_warchief_kargath_bladefistAI : public ScriptedAI for (GUIDVector::const_iterator itr = m_vAssassinGuids.begin(); itr != m_vAssassinGuids.end(); ++itr) { - if (Creature* pTemp = m_pInstance->instance->GetCreature(*itr)) + if (Creature* pTemp = m_creature->GetMap()->GetCreature(*itr)) pTemp->ForcedDespawn(); } @@ -190,7 +202,10 @@ struct MANGOS_DLL_DECL boss_warchief_kargath_bladefistAI : public ScriptedAI // Check if out of range if (EnterEvadeIfOutOfCombatArea(uiDiff)) + { + DoScriptText(SAY_EVADE, m_creature); return; + } if (m_uiAssassinsTimer) { diff --git a/scripts/outland/hellfire_citadel/shattered_halls/instance_shattered_halls.cpp b/scripts/outland/hellfire_citadel/shattered_halls/instance_shattered_halls.cpp index fda8d06ec..5c314e778 100644 --- a/scripts/outland/hellfire_citadel/shattered_halls/instance_shattered_halls.cpp +++ b/scripts/outland/hellfire_citadel/shattered_halls/instance_shattered_halls.cpp @@ -24,7 +24,10 @@ EndScriptData */ #include "precompiled.h" #include "shattered_halls.h" -instance_shattered_halls::instance_shattered_halls(Map* pMap) : ScriptedInstance(pMap) +instance_shattered_halls::instance_shattered_halls(Map* pMap) : ScriptedInstance(pMap), + m_uiExecutionTimer(55*MINUTE*IN_MILLISECONDS), + m_uiTeam(0), + m_uiExecutionStage(0) { Initialize(); } @@ -34,6 +37,20 @@ void instance_shattered_halls::Initialize() memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); } +void instance_shattered_halls::OnPlayerEnter(Player* pPlayer) +{ + // Only on heroic + if (instance->IsRegularDifficulty() || m_uiTeam) + return; + + m_uiTeam = pPlayer->GetTeam(); + + if (m_uiTeam == ALLIANCE) + pPlayer->SummonCreature(aSoldiersLocs[1].m_uiAllianceEntry, aSoldiersLocs[1].m_fX, aSoldiersLocs[1].m_fY, aSoldiersLocs[1].m_fZ, aSoldiersLocs[1].m_fO, TEMPSUMMON_DEAD_DESPAWN, 0); + else + pPlayer->SummonCreature(aSoldiersLocs[0].m_uiHordeEntry, aSoldiersLocs[0].m_fX, aSoldiersLocs[0].m_fY, aSoldiersLocs[0].m_fZ, aSoldiersLocs[0].m_fO, TEMPSUMMON_DEAD_DESPAWN, 0); +} + void instance_shattered_halls::OnObjectCreate(GameObject* pGo) { switch (pGo->GetEntry()) @@ -42,7 +59,7 @@ void instance_shattered_halls::OnObjectCreate(GameObject* pGo) if (m_auiEncounter[TYPE_NETHEKURSE] == DONE) pGo->SetGoState(GO_STATE_ACTIVE); break; - case GO_NETHERKURSE_ENTER_DOOR: + case GO_NETHEKURSE_ENTER_DOOR: if (m_auiEncounter[TYPE_NETHEKURSE] == DONE) pGo->SetGoState(GO_STATE_ACTIVE); break; @@ -56,8 +73,20 @@ void instance_shattered_halls::OnObjectCreate(GameObject* pGo) void instance_shattered_halls::OnCreatureCreate(Creature* pCreature) { - if (pCreature->GetEntry() == NPC_NETHEKURSE) - m_mNpcEntryGuidStore[NPC_NETHEKURSE] = pCreature->GetObjectGuid(); + switch (pCreature->GetEntry()) + { + case NPC_NETHEKURSE: + case NPC_KARGATH_BLADEFIST: + case NPC_EXECUTIONER: + case NPC_SOLDIER_ALLIANCE_2: + case NPC_SOLDIER_ALLIANCE_3: + case NPC_OFFICER_ALLIANCE: + case NPC_SOLDIER_HORDE_2: + case NPC_SOLDIER_HORDE_3: + case NPC_OFFICER_HORDE: + m_mNpcEntryGuidStore[pCreature->GetEntry()] = pCreature->GetObjectGuid(); + break; + } } void instance_shattered_halls::SetData(uint32 uiType, uint32 uiData) @@ -67,13 +96,47 @@ void instance_shattered_halls::SetData(uint32 uiType, uint32 uiData) case TYPE_NETHEKURSE: m_auiEncounter[uiType] = uiData; if (uiData == DONE) + { DoUseDoorOrButton(GO_NETHEKURSE_DOOR); + DoUseDoorOrButton(GO_NETHEKURSE_ENTER_DOOR); + } break; case TYPE_OMROGG: m_auiEncounter[uiType] = uiData; break; case TYPE_BLADEFIST: m_auiEncounter[uiType] = uiData; + if (uiData == DONE) + { + // Make executioner attackable only after the final boss is dead + if (Creature* pExecutioner = GetSingleCreatureFromStorage(NPC_EXECUTIONER)) + pExecutioner->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_NON_ATTACKABLE); + } + break; + case TYPE_EXECUTION: + m_auiEncounter[uiType] = uiData; + if (uiData == IN_PROGRESS) + { + if (Player* pPlayer = GetPlayerInMap()) + { + // summon the 3 npcs for execution + for (uint8 i = 2; i < 5; ++i) + pPlayer->SummonCreature(m_uiTeam == ALLIANCE ? aSoldiersLocs[i].m_uiAllianceEntry : aSoldiersLocs[i].m_uiHordeEntry, aSoldiersLocs[i].m_fX, aSoldiersLocs[i].m_fY, aSoldiersLocs[i].m_fZ, aSoldiersLocs[i].m_fO, TEMPSUMMON_DEAD_DESPAWN, 0); + + // Summon the executioner for 80 min; ToDo: set the flags in DB + if (Creature* pExecutioner = pPlayer->SummonCreature(NPC_EXECUTIONER, afExecutionerLoc[0], afExecutionerLoc[1], afExecutionerLoc[2], afExecutionerLoc[3], TEMPSUMMON_TIMED_DESPAWN, 80*MINUTE*IN_MILLISECONDS, true)) + pExecutioner->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_NON_ATTACKABLE); + + // cast the execution spell + DoCastGroupDebuff(SPELL_KARGATH_EXECUTIONER_1); + } + } + if (uiData == DONE) + { + // Allow playes to complete the quest only after the executioner is dead + if (Creature* pOfficer = GetSingleCreatureFromStorage(m_uiTeam == ALLIANCE ? NPC_OFFICER_ALLIANCE : NPC_OFFICER_HORDE)) + pOfficer->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP | UNIT_NPC_FLAG_QUESTGIVER); + } break; } @@ -83,7 +146,7 @@ void instance_shattered_halls::SetData(uint32 uiType, uint32 uiData) std::ostringstream saveStream; - saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2]; + saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2] << " " << m_auiEncounter[3]; m_strInstData = saveStream.str(); SaveToDB(); @@ -102,11 +165,13 @@ void instance_shattered_halls::Load(const char* chrIn) OUT_LOAD_INST_DATA(chrIn); std::istringstream loadStream(chrIn); - loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2]; + loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3]; for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) + { if (m_auiEncounter[i] == IN_PROGRESS) m_auiEncounter[i] = NOT_STARTED; + } OUT_LOAD_INST_DATA_COMPLETE; } @@ -119,11 +184,111 @@ uint32 instance_shattered_halls::GetData(uint32 uiType) return 0; } +void instance_shattered_halls::OnCreatureDeath(Creature* pCreature) +{ + if (pCreature->GetEntry() == NPC_EXECUTIONER) + SetData(TYPE_EXECUTION, DONE); +} + +void instance_shattered_halls::OnCreatureEnterCombat(Creature* pCreature) +{ + // Set data to special in order to pause the event timer + // This is according to the blizz comments which say that it is possible to complete the event if you engage the npc while you have only a few seconds left + if (pCreature->GetEntry() == NPC_EXECUTIONER) + SetData(TYPE_EXECUTION, SPECIAL); +} + +void instance_shattered_halls::OnCreatureEvade(Creature* pCreature) +{ + // If npc evades continue the counting + if (pCreature->GetEntry() == NPC_EXECUTIONER) + SetData(TYPE_EXECUTION, IN_PROGRESS); +} + +void instance_shattered_halls::Update(uint32 uiDiff) +{ + if (m_auiEncounter[TYPE_EXECUTION] != IN_PROGRESS) + return; + + if (m_uiExecutionTimer < uiDiff) + { + switch(m_uiExecutionStage) + { + case 0: + // Kill the officer + if (Creature* pSoldier = GetSingleCreatureFromStorage(m_uiTeam == ALLIANCE ? NPC_OFFICER_ALLIANCE : NPC_OFFICER_HORDE)) + pSoldier->DealDamage(pSoldier, pSoldier->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + + // Make Kargath yell + DoOrSimulateScriptTextForThisInstance(m_uiTeam == ALLIANCE ? SAY_KARGATH_EXECUTE_ALLY : SAY_KARGATH_EXECUTE_HORDE, NPC_KARGATH_BLADEFIST); + + // Set timer for the next execution + DoCastGroupDebuff(SPELL_KARGATH_EXECUTIONER_2); + m_uiExecutionTimer = 10*MINUTE*IN_MILLISECONDS; + break; + case 1: + if (Creature* pSoldier = GetSingleCreatureFromStorage(m_uiTeam == ALLIANCE ? NPC_SOLDIER_ALLIANCE_2 : NPC_SOLDIER_HORDE_2)) + pSoldier->DealDamage(pSoldier, pSoldier->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + + DoCastGroupDebuff(SPELL_KARGATH_EXECUTIONER_3); + m_uiExecutionTimer = 15*MINUTE*IN_MILLISECONDS; + break; + case 2: + if (Creature* pSoldier = GetSingleCreatureFromStorage(m_uiTeam == ALLIANCE ? NPC_SOLDIER_ALLIANCE_3 : NPC_SOLDIER_HORDE_3)) + pSoldier->DealDamage(pSoldier, pSoldier->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + + SetData(TYPE_EXECUTION, FAIL); + m_uiExecutionTimer = 0; + break; + } + ++m_uiExecutionStage; + } + else + m_uiExecutionTimer -= uiDiff; +} + +// Add debuff to all players in the instance +void instance_shattered_halls::DoCastGroupDebuff(uint32 uiSpellId) +{ + Map::PlayerList const& lPlayers = instance->GetPlayers(); + + for (Map::PlayerList::const_iterator itr = lPlayers.begin(); itr != lPlayers.end(); ++itr) + { + Player* pPlayer = itr->getSource(); + if (pPlayer && !pPlayer->HasAura(uiSpellId)) + pPlayer->CastSpell(pPlayer, uiSpellId, true); + } +} + InstanceData* GetInstanceData_instance_shattered_halls(Map* pMap) { return new instance_shattered_halls(pMap); } +bool AreaTrigger_at_shattered_halls(Player* pPlayer, AreaTriggerEntry const* pAt) +{ + if (pPlayer->isGameMaster() || pPlayer->isDead()) + return false; + + instance_shattered_halls* pInstance = (instance_shattered_halls*)pPlayer->GetInstanceData(); + + if (!pInstance) + return false; + + // Only on heroic + if (pInstance->instance->IsRegularDifficulty()) + return false; + + // Don't allow players to cheat + if (pInstance->GetData(TYPE_BLADEFIST) == DONE || pInstance->GetData(TYPE_OMROGG) == DONE) + return false; + + if (pInstance->GetData(TYPE_EXECUTION) == NOT_STARTED) + pInstance->SetData(TYPE_EXECUTION, IN_PROGRESS); + + return true; +} + void AddSC_instance_shattered_halls() { Script* pNewScript; @@ -132,4 +297,9 @@ void AddSC_instance_shattered_halls() pNewScript->Name = "instance_shattered_halls"; pNewScript->GetInstanceData = &GetInstanceData_instance_shattered_halls; pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "at_shattered_halls"; + pNewScript->pAreaTrigger = &AreaTrigger_at_shattered_halls; + pNewScript->RegisterSelf(); } diff --git a/scripts/outland/hellfire_citadel/shattered_halls/shattered_halls.h b/scripts/outland/hellfire_citadel/shattered_halls/shattered_halls.h index 128d8566e..5df350768 100644 --- a/scripts/outland/hellfire_citadel/shattered_halls/shattered_halls.h +++ b/scripts/outland/hellfire_citadel/shattered_halls/shattered_halls.h @@ -7,16 +7,56 @@ enum { - MAX_ENCOUNTER = 3, + MAX_ENCOUNTER = 4, TYPE_NETHEKURSE = 0, TYPE_OMROGG = 1, - TYPE_BLADEFIST = 2, // TODO Currently unhandled + TYPE_BLADEFIST = 2, // Note: if players skip Omrogg and go straight to Karagth then Omrogg comes to aid Karagth + TYPE_EXECUTION = 3, NPC_NETHEKURSE = 16807, + NPC_KARGATH_BLADEFIST = 16808, + NPC_EXECUTIONER = 17301, // must be killed for the executioner event + + NPC_SOLDIER_ALLIANCE_1 = 17288, // quest giver for 9524 + NPC_SOLDIER_ALLIANCE_2 = 17289, + NPC_SOLDIER_ALLIANCE_3 = 17292, + NPC_OFFICER_ALLIANCE = 17290, // quest objective + + NPC_SOLDIER_HORDE_1 = 17294, // quest giver for 9525 + NPC_SOLDIER_HORDE_2 = 17295, + NPC_SOLDIER_HORDE_3 = 17297, + NPC_OFFICER_HORDE = 17296, // quest objective GO_NETHEKURSE_DOOR = 182540, - GO_NETHERKURSE_ENTER_DOOR = 182539, // TODO Currently unhandled + GO_NETHEKURSE_ENTER_DOOR = 182539, + + SPELL_KARGATH_EXECUTIONER_1 = 39288, // 55 min - first prisoner - officer + SPELL_KARGATH_EXECUTIONER_2 = 39289, // 10 min - second prisoner + SPELL_KARGATH_EXECUTIONER_3 = 39290, // 15 min - last prisoner + + // I'm not sure if these texts are used at the execution but this is most likely they are used to + SAY_KARGATH_EXECUTE_ALLY = -1540049, + SAY_KARGATH_EXECUTE_HORDE = -1540050, + + //AT_NETHEKURSE = 4524, // Area trigger used for the execution event +}; + +struct SpawnLocation +{ + uint32 m_uiAllianceEntry, m_uiHordeEntry; + float m_fX, m_fY, m_fZ, m_fO; +}; + +const float afExecutionerLoc[4] = {151.443f, -84.439f, 1.938f, 6.283f}; + +static SpawnLocation aSoldiersLocs[] = +{ + {0, NPC_SOLDIER_HORDE_1, 119.609f, 256.127f, -45.254f, 5.133f}, + {NPC_SOLDIER_ALLIANCE_1, 0, 131.106f, 254.520f, -45.236f, 3.951f}, + {NPC_SOLDIER_ALLIANCE_3, NPC_SOLDIER_HORDE_3, 151.040f, -91.558f, 1.936f, 1.559f}, + {NPC_SOLDIER_ALLIANCE_2, NPC_SOLDIER_HORDE_2, 150.669f, -77.015f, 1.933f, 4.705f}, + {NPC_OFFICER_ALLIANCE, NPC_OFFICER_HORDE, 138.241f, -84.198f, 1.907f, 0.055f} }; class MANGOS_DLL_DECL instance_shattered_halls : public ScriptedInstance @@ -26,18 +66,32 @@ class MANGOS_DLL_DECL instance_shattered_halls : public ScriptedInstance void Initialize(); + void OnPlayerEnter(Player* pPlayer); + void OnObjectCreate(GameObject* pGo); void OnCreatureCreate(Creature* pCreature); + void OnCreatureDeath(Creature* pCreature); + void OnCreatureEvade(Creature* pCreature); + void OnCreatureEnterCombat(Creature* pCreature); + void SetData(uint32 uiType, uint32 uiData); uint32 GetData(uint32 uiType); const char* Save() { return m_strInstData.c_str(); } void Load(const char* chrIn); + void Update(uint32 uiDiff); + + void DoCastGroupDebuff(uint32 uiSpellId); + private: uint32 m_auiEncounter[MAX_ENCOUNTER]; std::string m_strInstData; + + uint32 m_uiExecutionTimer; + uint32 m_uiTeam; + uint8 m_uiExecutionStage; }; #endif diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index eeccf7e83..a5b791270 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2267" + #define SD2_REVISION_NR "2268" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index b68be4815..a973d68f9 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -50,6 +50,8 @@ DELETE FROM scripted_areatrigger WHERE entry=3626; INSERT INTO scripted_areatrigger VALUES (3626, 'at_vaelastrasz'); DELETE FROM scripted_areatrigger WHERE entry=4937; INSERT INTO scripted_areatrigger VALUES (4937, 'at_sunwell_plateau'); +DELETE FROM scripted_areatrigger WHERE entry=4524; +INSERT INTO scripted_areatrigger VALUES (4524,'at_shattered_halls'); /* BATTLEGROUNDS */ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 454a6d136..3f4a3f173 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -1607,7 +1607,11 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1540044,'I am called Bladefist for a reason, as you will see!',10325,1,0,0,'kargath SAY_AGGRO3'), (-1540045,'For the real Horde!',10326,1,0,0,'kargath SAY_SLAY1'), (-1540046,'I am the only Warchief!',10327,1,0,0,'kargath SAY_SLAY2'), -(-1540047,'The true Horde... will.. prevail...',10328,1,0,0,'kargath SAY_DEATH'); +(-1540047,'The true Horde... will.. prevail...',10328,1,0,0,'kargath SAY_DEATH'), +(-1540048,'Cowards! You\'ll never pull me into the shadows!',0,1,0,0,'kargath SAY_EVADE'), + +(-1540049,'The Alliance dares to intrude this far into my fortress? Bring out the Honor Hold prisoners and call for the executioner! They\'ll pay with their lives for this trespass!',0,6,0,0,'kargath SAY_EXECUTE_ALLY'), +(-1540050,'It looks like we have a ranking officer among our captives...how amusing. Execute the green-skinned dog at once!',0,6,0,0,'kargath SAY_EXECUTE_HORDE'); -- -1 542 000 BLOOD FURNACE INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES diff --git a/sql/updates/r2268_mangos.sql b/sql/updates/r2268_mangos.sql new file mode 100644 index 000000000..0188cf53d --- /dev/null +++ b/sql/updates/r2268_mangos.sql @@ -0,0 +1,2 @@ +DELETE FROM scripted_areatrigger WHERE entry=4524; +INSERT INTO scripted_areatrigger VALUES (4524,'at_shattered_halls'); diff --git a/sql/updates/r2268_scriptdev2.sql b/sql/updates/r2268_scriptdev2.sql new file mode 100644 index 000000000..3ec82ad32 --- /dev/null +++ b/sql/updates/r2268_scriptdev2.sql @@ -0,0 +1,5 @@ +DELETE FROM script_texts WHERE entry IN (-1540048, -1540049, -1540050); +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1540048,'Cowards! You\'ll never pull me into the shadows!',0,1,0,0,'kargath SAY_EVADE'), +(-1540049,'The Alliance dares to intrude this far into my fortress? Bring out the Honor Hold prisoners and call for the executioner! They\'ll pay with their lives for this trespass!',0,6,0,0,'kargath SAY_EXECUTE_ALLY'), +(-1540050,'It looks like we have a ranking officer among our captives...how amusing. Execute the green-skinned dog at once!',0,6,0,0,'kargath SAY_EXECUTE_HORDE'); From 8df0e54acc7d3388237692b840f7de3223add880 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Tue, 12 Apr 2011 13:33:06 +0200 Subject: [PATCH 0249/1172] [2269] Modify EscortAI * It is now possible to continue to the next waypoint, without waiting for next Update tick * Mobs won't despawn anymore when they finished the last waittime if the escorting is paused - thanks to Vinolentus for emphasizing that this was very unexpected behaviour * Mobs will now properly move to their last point independend of current movegen Please test escort scripts, and report if there are problems! --- base/escort_ai.cpp | 112 ++++++++++++++++++++++++--------------------- base/escort_ai.h | 1 + sd2_revision_nr.h | 2 +- 3 files changed, 63 insertions(+), 52 deletions(-) diff --git a/base/escort_ai.cpp b/base/escort_ai.cpp index a5d51d9ef..dc7965071 100644 --- a/base/escort_ai.cpp +++ b/base/escort_ai.cpp @@ -221,20 +221,14 @@ void npc_escortAI::EnterEvadeMode() { debug_log("SD2: EscortAI has left combat and is now returning to CombatStartPosition."); - if (m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() == CHASE_MOTION_TYPE) - { - AddEscortState(STATE_ESCORT_RETURNING); + AddEscortState(STATE_ESCORT_RETURNING); - float fPosX, fPosY, fPosZ; - m_creature->GetCombatStartPosition(fPosX, fPosY, fPosZ); - m_creature->GetMotionMaster()->MovePoint(POINT_LAST_POINT, fPosX, fPosY, fPosZ); - } + float fPosX, fPosY, fPosZ; + m_creature->GetCombatStartPosition(fPosX, fPosY, fPosZ); + m_creature->GetMotionMaster()->MovePoint(POINT_LAST_POINT, fPosX, fPosY, fPosZ); } else - { - if (m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() == CHASE_MOTION_TYPE) - m_creature->GetMotionMaster()->MoveTargetedHome(); - } + m_creature->GetMotionMaster()->MoveTargetedHome(); Reset(); } @@ -265,57 +259,67 @@ bool npc_escortAI::IsPlayerOrGroupInRange() return false; } -void npc_escortAI::UpdateAI(const uint32 uiDiff) +// Returns false, if npc is despawned +bool npc_escortAI::MoveToNextWaypoint() { - //Waypoint Updating - if (HasEscortState(STATE_ESCORT_ESCORTING) && !m_creature->getVictim() && m_uiWPWaitTimer && !HasEscortState(STATE_ESCORT_RETURNING)) + // Do nothing if escorting is paused + if (HasEscortState(STATE_ESCORT_PAUSED)) + return true; + + // Final Waypoint reached (and final wait time waited) + if (CurrentWP == WaypointList.end()) { - if (m_uiWPWaitTimer <= uiDiff) + debug_log("SD2: EscortAI reached end of waypoints"); + + if (m_bCanReturnToStart) { - //End of the line - if (CurrentWP == WaypointList.end()) - { - debug_log("SD2: EscortAI reached end of waypoints"); + float fRetX, fRetY, fRetZ; + m_creature->GetRespawnCoord(fRetX, fRetY, fRetZ); - if (m_bCanReturnToStart) - { - float fRetX, fRetY, fRetZ; - m_creature->GetRespawnCoord(fRetX, fRetY, fRetZ); + m_creature->GetMotionMaster()->MovePoint(POINT_HOME, fRetX, fRetY, fRetZ); - m_creature->GetMotionMaster()->MovePoint(POINT_HOME, fRetX, fRetY, fRetZ); + m_uiWPWaitTimer = 0; - m_uiWPWaitTimer = 0; + debug_log("SD2: EscortAI are returning home to spawn location: %u, %f, %f, %f", POINT_HOME, fRetX, fRetY, fRetZ); + return true; + } - debug_log("SD2: EscortAI are returning home to spawn location: %u, %f, %f, %f", POINT_HOME, fRetX, fRetY, fRetZ); - return; - } + if (m_bCanInstantRespawn) + { + m_creature->SetDeathState(JUST_DIED); + m_creature->Respawn(); + } + else + m_creature->ForcedDespawn(); - if (m_bCanInstantRespawn) - { - m_creature->SetDeathState(JUST_DIED); - m_creature->Respawn(); - } - else - m_creature->ForcedDespawn(); + return false; + } - return; - } + m_creature->GetMotionMaster()->MovePoint(CurrentWP->uiId, CurrentWP->fX, CurrentWP->fY, CurrentWP->fZ); + debug_log("SD2: EscortAI start waypoint %u (%f, %f, %f).", CurrentWP->uiId, CurrentWP->fX, CurrentWP->fY, CurrentWP->fZ); - if (!HasEscortState(STATE_ESCORT_PAUSED)) - { - m_creature->GetMotionMaster()->MovePoint(CurrentWP->uiId, CurrentWP->fX, CurrentWP->fY, CurrentWP->fZ); - debug_log("SD2: EscortAI start waypoint %u (%f, %f, %f).", CurrentWP->uiId, CurrentWP->fX, CurrentWP->fY, CurrentWP->fZ); + WaypointStart(CurrentWP->uiId); - WaypointStart(CurrentWP->uiId); + m_uiWPWaitTimer = 0; - m_uiWPWaitTimer = 0; - } + return true; +} + +void npc_escortAI::UpdateAI(const uint32 uiDiff) +{ + // Waypoint Updating + if (HasEscortState(STATE_ESCORT_ESCORTING) && !m_creature->getVictim() && m_uiWPWaitTimer && !HasEscortState(STATE_ESCORT_RETURNING)) + { + if (m_uiWPWaitTimer <= uiDiff) + { + if (!MoveToNextWaypoint()) + return; } else m_uiWPWaitTimer -= uiDiff; } - //Check if player or any member of his group is within range + // Check if player or any member of his group is within range if (HasEscortState(STATE_ESCORT_ESCORTING) && m_playerGuid && !m_creature->getVictim() && !HasEscortState(STATE_ESCORT_RETURNING)) { if (m_uiPlayerCheckTimer < uiDiff) @@ -346,7 +350,7 @@ void npc_escortAI::UpdateAI(const uint32 uiDiff) void npc_escortAI::UpdateEscortAI(const uint32 uiDiff) { - //Check if we have a current target + // Check if we have a current target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -365,16 +369,13 @@ void npc_escortAI::MovementInform(uint32 uiMoveType, uint32 uiPointId) m_creature->SetWalk(!m_bIsRunning); RemoveEscortState(STATE_ESCORT_RETURNING); - - if (!m_uiWPWaitTimer) - m_uiWPWaitTimer = 1; } else if (uiPointId == POINT_HOME) { debug_log("SD2: EscortAI has returned to original home location and will continue from beginning of waypoint list."); CurrentWP = WaypointList.begin(); - m_uiWPWaitTimer = 1; + m_uiWPWaitTimer = 0; } else { @@ -390,10 +391,19 @@ void npc_escortAI::MovementInform(uint32 uiMoveType, uint32 uiPointId) //Call WP function WaypointReached(CurrentWP->uiId); - m_uiWPWaitTimer = CurrentWP->uiWaitTime + 1; + m_uiWPWaitTimer = CurrentWP->uiWaitTime; ++CurrentWP; } + + if (!m_uiWPWaitTimer) + { + // Continue WP Movement if Can + if (HasEscortState(STATE_ESCORT_ESCORTING) && !HasEscortState(STATE_ESCORT_PAUSED | STATE_ESCORT_RETURNING) && !m_creature->getVictim()) + MoveToNextWaypoint(); + else + m_uiWPWaitTimer = 1; + } } /*void npc_escortAI::AddWaypoint(uint32 id, float x, float y, float z, uint32 WaitTimeMs) diff --git a/base/escort_ai.h b/base/escort_ai.h index 550116f6a..e4b052750 100644 --- a/base/escort_ai.h +++ b/base/escort_ai.h @@ -85,6 +85,7 @@ struct MANGOS_DLL_DECL npc_escortAI : public ScriptedAI private: bool AssistPlayerInCombat(Unit* pWho); bool IsPlayerOrGroupInRange(); + bool MoveToNextWaypoint(); void FillPointMovementListForCreature(); void AddEscortState(uint32 uiEscortState) { m_uiEscortState |= uiEscortState; } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index a5b791270..8a84cfcdc 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2268" + #define SD2_REVISION_NR "2269" #endif // __SD2_REVISION_NR_H__ From cb76512a4bced7e6f3b866d559780d747c1504c9 Mon Sep 17 00:00:00 2001 From: Klark20 Date: Fri, 2 Sep 2011 18:54:45 +0200 Subject: [PATCH 0250/1172] [2270] Fix some parts of ICC texts, also note further uncertainties --- sd2_revision_nr.h | 2 +- sql/scriptdev2_script_full.sql | 16 ++++++++-------- sql/updates/r2270_scriptdev2.sql | 2 ++ 3 files changed, 11 insertions(+), 9 deletions(-) create mode 100644 sql/updates/r2270_scriptdev2.sql diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 8a84cfcdc..a28eeeb02 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2269" + #define SD2_REVISION_NR "2270" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 3f4a3f173..5313df36d 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -3465,9 +3465,9 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1631081,'NOOOO! You kill Stinky! You pay!',16907,6,0,0,'festergut SAY_STINKY_DIES'), (-1631082,'Fun time!',16901,1,0,0,'festergut SAY_AGGRO'), (-1631083,'Just an ordinary gas cloud. But watch out, because that\'s no ordinary gas cloud! ',17119,1,0,0,'putricide SAY_BLIGHT'), -(-1631084,'%s farts.',16911,2,0,0,'festergut SAY_SPORE'), +(-1631084,'%s farts.',16911,2,0,0,'festergut SAY_SPORE'), -- TODO Can be wrong (-1631085,'Gyah! Uhhh, I not feel so good...',16906,1,0,0,'festergut SAY_PUNGUENT_BLIGHT'), -(-1631086,'%s vomits',0,2,0,0,'festergut SAY_PUNGUENT_BLIGHT_EMOTE'), +(-1631086,'%s vomits',0,2,0,0,'festergut SAY_PUNGUENT_BLIGHT_EMOTE'), -- TODO Can be wrong (-1631087,'Daddy, I did it',16902,1,0,0,'festergut SAY_SLAY_1'), (-1631088,'Dead, dead, dead!',16903,1,0,0,'festergut SAY_SLAY_2'), (-1631089,'Fun time over!',16905,1,0,0,'festergut SAY_BERSERK'), @@ -3491,20 +3491,20 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1631104,'Blood will flow!',16728,1,0,0,'keleseth SAY_KELESETH_SPECIAL'), (-1631105,'Were you ever a threat?',16723,1,0,0,'keleseth SAY_KELESETH_SLAY_1'), (-1631106,'Truth is found in death.',16724,1,0,0,'keleseth SAY_SKELESETH_SLAY_2'), -(-1631107,'%s cackles maniacally!',16726,2,0,0,'keleseth SAY_KELESETH_BERSERK'), +(-1631107,'%s cackles maniacally!',16726,2,0,0,'keleseth SAY_KELESETH_BERSERK'), -- TODO Can be wrong (-1631108,'My queen... they come...',16725,1,0,0,'keleseth SAY_KELESETH_DEATH'), (-1631109,'Tremble before Taldaram, mortals, for the power of the orb flows through me!',16857,1,0,0,'taldaram SAY_TALDARAM_INVOCATION'), (-1631110,'Delight in the pain!',16858,1,0,0,'taldaram SAY_TALDARAM_SPECIAL'), (-1631111,'Worm food.',16853,1,0,0,'taldaram SAY_TALDARAM_SLAY_1'), (-1631112,'Beg for mercy!',16854,1,0,0,'taldaram SAY_TALDARAM_SLAY_2'), -(-1631113,'%s laughs.',16856,2,0,0,'taldaram SAY_TALDARAM_BERSERK'), -(-1631114,'%s gurgles and dies.',16855,2,0,0,'taldaram SAY_TALDARAM_DEATH'), +(-1631113,'%s laughs.',16856,2,0,0,'taldaram SAY_TALDARAM_BERSERK'), -- TODO Can be wrong +(-1631114,'%s gurgles and dies.',16855,2,0,0,'taldaram SAY_TALDARAM_DEATH'), -- TODO Can be wrong (-1631115,'Naxxanar was merely a setback! With the power of the orb, Valanar will have his vengeance!',16685,1,0,0,'valanar SAY_VALANAR_INVOCATION'), (-1631116,'My cup runneth over.',16686,1,0,0,'valanar SAY_VALANAR_SPECIAL'), (-1631117,'Dinner... is served.',16681,1,0,0,'valanar SAY_VALANAR_SLAY_1'), -(-1631118,'Dinner... is served.',16682,1,0,0,'valanar SAY_VALANAR_SLAY_2'), +(-1631118,'Do you see NOW the power of the Darkfallen?',16682,1,0,0,'valanar SAY_VALANAR_SLAY_2'), (-1631119,'BOW DOWN BEFORE THE SAN\'LAYN!',16684,1,0,0,'valanar SAY_VALANAR_BERSERK'), (-1631120,'...why...?',16683,1,0,0,'valanar SAY_VALANAR_DEATH'), @@ -3527,7 +3527,7 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1631136,'Come Scourgebane, I\'ll show the Lich King which one of us is truly worthy of the title, champion!',17020,1,0,0,'svalna SAY_SVALNA_AGGRO'), (-1631137,'What? They died so easily? No matter.',17022,1,0,0,'svalna SAY_KILL_CAPTAIN'), (-1631138,'What a pitiful choice of an ally Crok.',17021,1,0,0,'svalna SAY_KILL_PLAYER'), -(-1631139,'Perhaps... you were right... Crok, you must not approach the Frost Queen, quickly, stop them!',17023,1,0,0,'svalna SAY_DEATH'), +(-1631139,'Perhaps... you were right... Crok.',17023,1,0,0,'svalna SAY_DEATH'), (-1631140,'Heroes, lend me your aid! I... I cannot hold them off much longer! You must heal my wounds!',17064,1,0,0,'dreamwalker SAY_AGGRO'), (-1631141,'I have opened a portal into the Dream. Your salvation lies within, heroes.',17068,1,0,0,'dreamwalker SAY_PORTAL'), @@ -3583,7 +3583,7 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1631189,'THE LICH KING...MUST...FALL!',17389,1,0,0,'tirion SAY_OUTRO_11'), (-1631190,'Now I stand, the lion before the lambs... and they do not fear.',17361,1,0,0,'lich_king SAY_OUTRO_12'), (-1631191,'They cannot fear.',17362,1,0,0,'lich_king SAY_OUTRO_13'), -(-1631192,'%s dies',17374,2,0,0,'lich_king SAY_OUTRO_14'); +(-1631192,'%s dies',17374,2,0,0,'lich_king SAY_OUTRO_14'); -- TODO Can be wrong -- -1 632 000 ICC: FORGE OF SOULS INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES diff --git a/sql/updates/r2270_scriptdev2.sql b/sql/updates/r2270_scriptdev2.sql new file mode 100644 index 000000000..95b485a91 --- /dev/null +++ b/sql/updates/r2270_scriptdev2.sql @@ -0,0 +1,2 @@ +UPDATE script_texts SET content_default='Do you see NOW the power of the Darkfallen?' WHERE entry=-1631118; +UPDATE script_texts SET content_default='Perhaps... you were right... Crok.' WHERE entry=-1631139; From 79f2d1d20ad0e624b3cce91e52bb9f54700ac2f5 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Sat, 3 Sep 2011 16:10:38 +0200 Subject: [PATCH 0251/1172] [2271] Fix Quest 9718, As the crow flies Note to DB-devs: The Quest-Explored script for (taxi)event 11225 is now obsolete --- scripts/outland/zangarmarsh.cpp | 4 +++- sd2_revision_nr.h | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/outland/zangarmarsh.cpp b/scripts/outland/zangarmarsh.cpp index e8c2f225e..df15961fc 100644 --- a/scripts/outland/zangarmarsh.cpp +++ b/scripts/outland/zangarmarsh.cpp @@ -370,7 +370,8 @@ bool GossipSelect_npc_timothy_daniels(Player* pPlayer, Creature* pCreature, uint enum { - EVENT_ID_STORMCROW = 11225, + QUEST_AS_THE_CROW_FLIES = 9718, + EVENT_ID_STORMCROW = 11225, }; bool ProcessEventId_event_taxi_stormcrow(uint32 uiEventId, Object* pSource, Object* pTarget, bool bIsStart) @@ -378,6 +379,7 @@ bool ProcessEventId_event_taxi_stormcrow(uint32 uiEventId, Object* pSource, Obje if (uiEventId == EVENT_ID_STORMCROW && !bIsStart && pSource->GetTypeId() == TYPEID_PLAYER) { ((Player*)pSource)->SetDisplayId(((Player*)pSource)->GetNativeDisplayId()); + ((Player*)pSource)->AreaExploredOrEventHappens(QUEST_AS_THE_CROW_FLIES); return true; } return false; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index a28eeeb02..66da7ce4f 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2270" + #define SD2_REVISION_NR "2271" #endif // __SD2_REVISION_NR_H__ From 68aec196b99732359fff36c3af71aba5a58ce3e9 Mon Sep 17 00:00:00 2001 From: DaC Date: Mon, 5 Sep 2011 16:19:23 +0200 Subject: [PATCH 0252/1172] [2272] Terokkar Forest: Captive Child - replace wrong call with MovementInform Signed-off-by: Schmoozerd --- scripts/outland/terokkar_forest.cpp | 6 +++--- sd2_revision_nr.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/outland/terokkar_forest.cpp b/scripts/outland/terokkar_forest.cpp index e696784b8..686440a6a 100644 --- a/scripts/outland/terokkar_forest.cpp +++ b/scripts/outland/terokkar_forest.cpp @@ -976,10 +976,10 @@ struct MANGOS_DLL_DECL npc_captive_child : public ScriptedAI void Reset() {} - void WaypointReached(uint32 uiPointId) + void MovementInform(uint32 uiMotionType, uint32 uiPointId) { - // we only have one waypoint - m_creature->ForcedDespawn(); + if (uiMotionType == POINT_MOTION_TYPE) + m_creature->ForcedDespawn(); // we only have one waypoint } }; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 66da7ce4f..b61649ea2 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2271" + #define SD2_REVISION_NR "2272" #endif // __SD2_REVISION_NR_H__ From cd48854fc3bdb24ae06ad07fa2daad89eb799180 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Tue, 6 Sep 2011 15:00:31 +0200 Subject: [PATCH 0253/1172] [2273] Add placeholders for world map scripts --- VC100/100ScriptDev2.vcxproj | 1 + VC100/100ScriptDev2.vcxproj.filters | 3 + VC80/80ScriptDev2.vcproj | 4 + VC90/90ScriptDev2.vcproj | 4 + include/sc_instance.h | 11 ++- scripts/world/world_map_scripts.cpp | 110 ++++++++++++++++++++++++++++ sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 8 ++ sql/updates/r2273_mangos.sql | 6 ++ system/ScriptLoader.cpp | 2 + 10 files changed, 148 insertions(+), 3 deletions(-) create mode 100644 scripts/world/world_map_scripts.cpp create mode 100644 sql/updates/r2273_mangos.sql diff --git a/VC100/100ScriptDev2.vcxproj b/VC100/100ScriptDev2.vcxproj index 753da68a3..cf314563c 100644 --- a/VC100/100ScriptDev2.vcxproj +++ b/VC100/100ScriptDev2.vcxproj @@ -685,6 +685,7 @@ + Create Create diff --git a/VC100/100ScriptDev2.vcxproj.filters b/VC100/100ScriptDev2.vcxproj.filters index 3be0f52d1..400b891aa 100644 --- a/VC100/100ScriptDev2.vcxproj.filters +++ b/VC100/100ScriptDev2.vcxproj.filters @@ -1710,6 +1710,9 @@ scripts\world + + scripts\world + include diff --git a/VC80/80ScriptDev2.vcproj b/VC80/80ScriptDev2.vcproj index dffc0c4a8..63ee6ed44 100644 --- a/VC80/80ScriptDev2.vcproj +++ b/VC80/80ScriptDev2.vcproj @@ -2913,6 +2913,10 @@ RelativePath="..\scripts\world\spell_scripts.cpp" > + + + + GetMapName(), instance->GetId(), instance->GetInstanceId()) #define OUT_SAVE_INST_DATA_COMPLETE debug_log("SD2: Saving Instance Data for Instance %s (Map %d, Instance Id %d) completed.", instance->GetMapName(), instance->GetId(), instance->GetInstanceId()) #define OUT_LOAD_INST_DATA(a) debug_log("SD2: Loading Instance Data for Instance %s (Map %d, Instance Id %d). Input is '%s'", instance->GetMapName(), instance->GetId(), instance->GetInstanceId(), a) -#define OUT_LOAD_INST_DATA_COMPLETE debug_log("SD2: Instance Data Load for Instance %s (Map %d, Instance Id: %d) is complete.",instance->GetMapName(), instance->GetId(), instance->GetInstanceId()) -#define OUT_LOAD_INST_DATA_FAIL error_log("SD2: Unable to load Instance Data for Instance %s (Map %d, Instance Id: %d).",instance->GetMapName(), instance->GetId(), instance->GetInstanceId()) +#define OUT_LOAD_INST_DATA_COMPLETE debug_log("SD2: Instance Data Load for Instance %s (Map %d, Instance Id: %d) is complete.", instance->GetMapName(), instance->GetId(), instance->GetInstanceId()) +#define OUT_LOAD_INST_DATA_FAIL error_log("SD2: Unable to load Instance Data for Instance %s (Map %d, Instance Id: %d).", instance->GetMapName(), instance->GetId(), instance->GetInstanceId()) class MANGOS_DLL_DECL ScriptedInstance : public InstanceData { @@ -63,6 +63,13 @@ class MANGOS_DLL_DECL ScriptedInstance : public InstanceData EntryGuidMap m_mNpcEntryGuidStore; ///< Store unique NPC-Guids by entry }; +// Class for world maps (May need additional zone-wide functions later on) +class MANGOS_DLL_DECL ScriptedMap : public ScriptedInstance +{ + public: + ScriptedMap(Map* pMap) : ScriptedInstance(pMap) {} +}; + /// A static const array of this structure must be handled to DialogueHelper struct DialogueEntry { diff --git a/scripts/world/world_map_scripts.cpp b/scripts/world/world_map_scripts.cpp new file mode 100644 index 000000000..c3995fb51 --- /dev/null +++ b/scripts/world/world_map_scripts.cpp @@ -0,0 +1,110 @@ +/* Copyright (C) 2006 - 2011 ScriptDev2 + * 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: world_map_scripts +SD%Complete: 0 +SDComment: Placeholder, Scripts for continents +SDCategory: World Map Scripts +EndScriptData */ + +#include "precompiled.h" + +/* ********************************************************* + * EASTERN KINGDOMS + */ +struct MANGOS_DLL_DECL world_map_eastern_kingdoms : public ScriptedMap +{ + world_map_eastern_kingdoms(Map* pMap) : ScriptedMap(pMap) {} + + void SetData(uint32 uiType, uint32 uiData) {} +}; + +InstanceData* GetInstanceData_world_map_eastern_kingdoms(Map* pMap) +{ + return new world_map_eastern_kingdoms(pMap); +} + +/* ********************************************************* + * KALIMDOR + */ +struct MANGOS_DLL_DECL world_map_kalimdor : public ScriptedMap +{ + world_map_kalimdor(Map* pMap) : ScriptedMap(pMap) {} + + void SetData(uint32 uiType, uint32 uiData) {} +}; + +InstanceData* GetInstanceData_world_map_kalimdor(Map* pMap) +{ + return new world_map_kalimdor(pMap); +} + +/* ********************************************************* + * OUTLAND + */ + +struct MANGOS_DLL_DECL world_map_outland : public ScriptedMap +{ + world_map_outland(Map* pMap) : ScriptedMap(pMap) {} + + void SetData(uint32 uiType, uint32 uiData) {} +}; + +InstanceData* GetInstanceData_world_map_outland(Map* pMap) +{ + return new world_map_outland(pMap); +} + +/* ********************************************************* + * NORTHREND + */ +struct MANGOS_DLL_DECL world_map_northrend : public ScriptedMap +{ + world_map_northrend(Map* pMap) : ScriptedMap(pMap) {} + + void SetData(uint32 uiType, uint32 uiData) {} +}; + +InstanceData* GetInstanceData_world_map_northrend(Map* pMap) +{ + return new world_map_northrend(pMap); +} + +void AddSC_world_map_scripts() +{ + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "world_map_eastern_kingdoms"; + pNewScript->GetInstanceData = &GetInstanceData_world_map_eastern_kingdoms; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "world_map_kalimdor"; + pNewScript->GetInstanceData = &GetInstanceData_world_map_kalimdor; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "world_map_outland"; + pNewScript->GetInstanceData = &GetInstanceData_world_map_outland; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "world_map_northrend"; + pNewScript->GetInstanceData = &GetInstanceData_world_map_northrend; + pNewScript->RegisterSelf(); +} diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index b61649ea2..91a48662b 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2272" + #define SD2_REVISION_NR "2273" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index a973d68f9..f7d19261b 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -159,6 +159,14 @@ UPDATE creature_template SET ScriptName='spell_dummy_npc' WHERE entry IN ( UPDATE gameobject_template SET ScriptName='spell_dummy_go' WHERE entry IN (181616,186949); +/* WORLD MAP SCRIPTS */ +DELETE FROM world_template WHERE map IN (0, 1, 530, 571); +INSERT INTO world_template VALUES +(0, 'world_map_eastern_kingdoms'), +(1, 'world_map_kalimdor'), +(530, 'world_map_outland'), +(571, 'world_map_northrend'); + /* */ /* ZONE */ /* */ diff --git a/sql/updates/r2273_mangos.sql b/sql/updates/r2273_mangos.sql new file mode 100644 index 000000000..46cdc72f8 --- /dev/null +++ b/sql/updates/r2273_mangos.sql @@ -0,0 +1,6 @@ +DELETE FROM world_template WHERE map IN (0, 1, 530, 571); +INSERT INTO world_template VALUES +(0, 'world_map_eastern_kingdoms'), +(1, 'world_map_kalimdor'), +(530, 'world_map_outland'), +(571, 'world_map_northrend'); diff --git a/system/ScriptLoader.cpp b/system/ScriptLoader.cpp index 0959568b5..eb2ca2537 100644 --- a/system/ScriptLoader.cpp +++ b/system/ScriptLoader.cpp @@ -25,6 +25,7 @@ extern void AddSC_item_scripts(); extern void AddSC_npc_professions(); extern void AddSC_npcs_special(); extern void AddSC_spell_scripts(); +extern void AddSC_world_map_scripts(); // eastern kingdoms extern void AddSC_blackrock_depths(); // blackrock_depths @@ -514,6 +515,7 @@ void AddScripts() AddSC_npc_professions(); AddSC_npcs_special(); AddSC_spell_scripts(); + AddSC_world_map_scripts(); // eastern kingdoms AddSC_blackrock_depths(); // blackrock_depths From 8f0dfbf2b23806d78a342d3f50a95cf7d236cb90 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Tue, 6 Sep 2011 15:07:47 +0200 Subject: [PATCH 0254/1172] [2274] Add support for spawning of npc 25003 --- scripts/world/world_map_scripts.cpp | 48 +++++++++++++++++++++++++++-- sd2_revision_nr.h | 2 +- 2 files changed, 47 insertions(+), 3 deletions(-) diff --git a/scripts/world/world_map_scripts.cpp b/scripts/world/world_map_scripts.cpp index c3995fb51..0d8169563 100644 --- a/scripts/world/world_map_scripts.cpp +++ b/scripts/world/world_map_scripts.cpp @@ -17,7 +17,7 @@ /* ScriptData SDName: world_map_scripts SD%Complete: 0 -SDComment: Placeholder, Scripts for continents +SDComment: Quest support: 11538 SDCategory: World Map Scripts EndScriptData */ @@ -57,9 +57,53 @@ InstanceData* GetInstanceData_world_map_kalimdor(Map* pMap) * OUTLAND */ +enum +{ + NPC_EMISSARY_OF_HATE = 25003, + NPC_IRESPEAKER = 24999, + NPC_UNLEASHED_HELLION = 25002, +}; + +static const float aSpawnLocations[1][4] = +{ + {12583.019531f, -6916.194336f, 4.601806f, 6.182446f} // Emissary of Hate, guesswork +}; + struct MANGOS_DLL_DECL world_map_outland : public ScriptedMap { - world_map_outland(Map* pMap) : ScriptedMap(pMap) {} + world_map_outland(Map* pMap) : ScriptedMap(pMap) { Initialize(); } + + uint8 m_uiEmissaryOfHate_KilledAddCount; + + void Initialize() + { + m_uiEmissaryOfHate_KilledAddCount = 0; + } + + void OnCreatureCreate(Creature* pCreature) + { + if (pCreature->GetEntry() == NPC_EMISSARY_OF_HATE) + m_mNpcEntryGuidStore[NPC_EMISSARY_OF_HATE] = pCreature->GetObjectGuid(); + } + + void OnCreatureDeath(Creature* pCreature) + { + switch (pCreature->GetEntry()) + { + case NPC_IRESPEAKER: + case NPC_UNLEASHED_HELLION: + if (!GetSingleCreatureFromStorage(NPC_EMISSARY_OF_HATE, true)) + { + ++m_uiEmissaryOfHate_KilledAddCount; + if (m_uiEmissaryOfHate_KilledAddCount == 6) + { + pCreature->SummonCreature(NPC_EMISSARY_OF_HATE, aSpawnLocations[0][0], aSpawnLocations[0][1], aSpawnLocations[0][2], aSpawnLocations[0][3], TEMPSUMMON_DEAD_DESPAWN, 0); + m_uiEmissaryOfHate_KilledAddCount = 0; + } + } + break; + } + } void SetData(uint32 uiType, uint32 uiData) {} }; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 91a48662b..0a1cc1ade 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2273" + #define SD2_REVISION_NR "2274" #endif // __SD2_REVISION_NR_H__ From 5f1c7842eb529c53c283a7510813492ae9310bde Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Tue, 6 Sep 2011 22:55:24 +0200 Subject: [PATCH 0255/1172] [2275] Ulduar - Clearify chest enums, and unscramble a few to proper IDs IDs were changed for Thorim and Algalon, check your loot --- .../ulduar/ulduar/instance_ulduar.cpp | 48 +++++++++---------- scripts/northrend/ulduar/ulduar/ulduar.h | 33 +++++++------ sd2_revision_nr.h | 2 +- 3 files changed, 41 insertions(+), 42 deletions(-) diff --git a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp index 5253b580a..e398553c9 100644 --- a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp +++ b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp @@ -218,30 +218,30 @@ void instance_ulduar::OnObjectCreate(GameObject* pGo) // ----------------- Chests ----------------- // Kologarn - case GO_CACHE_OF_LIVING_STONE: - case GO_CACHE_OF_LIVING_STONE_H: + case GO_CACHE_OF_LIVING_STONE_10: + case GO_CACHE_OF_LIVING_STONE_25: // Hodir - case GO_CACHE_OF_WINTER: - case GO_CACHE_OF_WINTER_H: - case GO_CACHE_OF_RARE_WINTER: - case GO_CACHE_OF_RARE_WINTER_H: + case GO_CACHE_OF_WINTER_10: + case GO_CACHE_OF_WINTER_25: + case GO_CACHE_OF_RARE_WINTER_10: + case GO_CACHE_OF_RARE_WINTER_25: // Thorim - case GO_CACHE_OF_STORMS: - case GO_CACHE_OF_STORMS_H: - case GO_CACHE_OF_RARE_STORMS: - case GO_CACHE_OF_RARE_STORMS_H: + case GO_CACHE_OF_STORMS_10: + case GO_CACHE_OF_STORMS_25: + case GO_CACHE_OF_STORMS_10_H: + case GO_CACHE_OF_STORMS_25_H: // Mimiron - case GO_CACHE_OF_INOV: - case GO_CACHE_OF_INOV_H: - case GO_CACHE_OF_INOV_HARD: - case GO_CACHE_OF_INOV_HARD_H: + case GO_CACHE_OF_INOV_10: + case GO_CACHE_OF_INOV_25: + case GO_CACHE_OF_INOV_10_H: + case GO_CACHE_OF_INOV_25_H: // Alagon - case GO_GIFT_OF_OBSERVER: - case GO_GIFT_OF_OBSERVER_H: + case GO_GIFT_OF_OBSERVER_10: + case GO_GIFT_OF_OBSERVER_25: break; default: @@ -294,7 +294,7 @@ void instance_ulduar::SetData(uint32 uiType, uint32 uiData) DoUseDoorOrButton(GO_SHATTERED_DOOR); if (uiData == DONE) { - DoRespawnGameObject(instance->IsRegularDifficulty() ? GO_CACHE_OF_LIVING_STONE : GO_CACHE_OF_LIVING_STONE_H, 30*MINUTE); + DoRespawnGameObject(instance->IsRegularDifficulty() ? GO_CACHE_OF_LIVING_STONE_10 : GO_CACHE_OF_LIVING_STONE_25, 30*MINUTE); if (GameObject* pBridge = GetSingleGameObjectFromStorage(GO_KOLOGARN_BRIDGE)) pBridge->SetGoState(GO_STATE_READY); } @@ -311,7 +311,7 @@ void instance_ulduar::SetData(uint32 uiType, uint32 uiData) if (uiData == DONE) { if (GetData(TYPE_MIMIRON_HARD) != DONE) - DoRespawnGameObject(instance->IsRegularDifficulty() ? GO_CACHE_OF_INOV : GO_CACHE_OF_INOV_H, 30*MINUTE); + DoRespawnGameObject(instance->IsRegularDifficulty() ? GO_CACHE_OF_INOV_10 : GO_CACHE_OF_INOV_25, 30*MINUTE); SpawnFriendlyKeeper(NPC_MIMIRON_IMAGE); } break; @@ -322,7 +322,7 @@ void instance_ulduar::SetData(uint32 uiType, uint32 uiData) { DoUseDoorOrButton(GO_HODIR_ICE_WALL); DoUseDoorOrButton(GO_HODIR_EXIT); - DoRespawnGameObject(instance->IsRegularDifficulty() ? GO_CACHE_OF_WINTER : GO_CACHE_OF_WINTER_H, 30*MINUTE); + DoRespawnGameObject(instance->IsRegularDifficulty() ? GO_CACHE_OF_WINTER_10 : GO_CACHE_OF_WINTER_25, 30*MINUTE); SpawnFriendlyKeeper(NPC_HODIR_IMAGE); } break; @@ -334,7 +334,7 @@ void instance_ulduar::SetData(uint32 uiType, uint32 uiData) if (uiData == DONE) { if (GetData(TYPE_THORIM_HARD) != DONE) - DoRespawnGameObject(instance->IsRegularDifficulty() ? GO_CACHE_OF_STORMS : GO_CACHE_OF_STORMS_H, 30*MINUTE); + DoRespawnGameObject(instance->IsRegularDifficulty() ? GO_CACHE_OF_STORMS_10 : GO_CACHE_OF_STORMS_25, 30*MINUTE); SpawnFriendlyKeeper(NPC_THORIM_IMAGE); } break; @@ -361,7 +361,7 @@ void instance_ulduar::SetData(uint32 uiType, uint32 uiData) DoUseDoorOrButton(GO_CELESTIAL_DOOR); DoUseDoorOrButton(GO_UNIVERSE_FLOOR_CELESTIAL); if (uiData == DONE) - DoRespawnGameObject(instance->IsRegularDifficulty() ? GO_GIFT_OF_OBSERVER : GO_GIFT_OF_OBSERVER_H, 30*MINUTE); + DoRespawnGameObject(instance->IsRegularDifficulty() ? GO_GIFT_OF_OBSERVER_10 : GO_GIFT_OF_OBSERVER_25, 30*MINUTE); break; // Hard modes @@ -374,17 +374,17 @@ void instance_ulduar::SetData(uint32 uiType, uint32 uiData) case TYPE_HODIR_HARD: m_auiHardBoss[2] = uiData; if (uiData == DONE) - DoRespawnGameObject(instance->IsRegularDifficulty() ? GO_CACHE_OF_RARE_WINTER : GO_CACHE_OF_RARE_WINTER_H, 30*MINUTE); + DoRespawnGameObject(instance->IsRegularDifficulty() ? GO_CACHE_OF_RARE_WINTER_10 : GO_CACHE_OF_RARE_WINTER_25, 30*MINUTE); break; case TYPE_THORIM_HARD: m_auiHardBoss[3] = uiData; if (uiData == DONE) - DoRespawnGameObject(instance->IsRegularDifficulty() ? GO_CACHE_OF_RARE_STORMS : GO_CACHE_OF_RARE_STORMS_H, 30*MINUTE); + DoRespawnGameObject(instance->IsRegularDifficulty() ? GO_CACHE_OF_STORMS_10_H : GO_CACHE_OF_STORMS_25_H, 30*MINUTE); break; case TYPE_MIMIRON_HARD: m_auiHardBoss[4] = uiData; if (uiData == DONE) - DoRespawnGameObject(instance->IsRegularDifficulty() ? GO_CACHE_OF_INOV_HARD : GO_CACHE_OF_INOV_HARD_H, 30*MINUTE); + DoRespawnGameObject(instance->IsRegularDifficulty() ? GO_CACHE_OF_INOV_10_H : GO_CACHE_OF_INOV_25_H, 30*MINUTE); break; case TYPE_VEZAX_HARD: m_auiHardBoss[5] = uiData; // TODO: add extra loot diff --git a/scripts/northrend/ulduar/ulduar/ulduar.h b/scripts/northrend/ulduar/ulduar/ulduar.h index 20c1cdc73..61b0ac49e 100644 --- a/scripts/northrend/ulduar/ulduar/ulduar.h +++ b/scripts/northrend/ulduar/ulduar/ulduar.h @@ -103,31 +103,30 @@ enum // Loot chests // Kologarn - GO_CACHE_OF_LIVING_STONE = 195046, - GO_CACHE_OF_LIVING_STONE_H = 195047, + GO_CACHE_OF_LIVING_STONE_10 = 195046, + GO_CACHE_OF_LIVING_STONE_25 = 195047, // Hodir - GO_CACHE_OF_WINTER = 194307, - GO_CACHE_OF_WINTER_H = 194308, - GO_CACHE_OF_RARE_WINTER = 194200, - GO_CACHE_OF_RARE_WINTER_H = 194201, + GO_CACHE_OF_WINTER_10 = 194307, + GO_CACHE_OF_WINTER_25 = 194308, + GO_CACHE_OF_RARE_WINTER_10 = 194200, + GO_CACHE_OF_RARE_WINTER_25 = 194201, // Mimiron - GO_CACHE_OF_INOV = 194789, - GO_CACHE_OF_INOV_H = 194956, - GO_CACHE_OF_INOV_HARD = 194957, - GO_CACHE_OF_INOV_HARD_H = 194958, + GO_CACHE_OF_INOV_10 = 194789, + GO_CACHE_OF_INOV_25 = 194956, + GO_CACHE_OF_INOV_10_H = 194957, + GO_CACHE_OF_INOV_25_H = 194958, // Thorim - GO_CACHE_OF_STORMS = 194312, - GO_CACHE_OF_STORMS_H = 194314, - GO_CACHE_OF_RARE_STORMS = 194313, - GO_CACHE_OF_RARE_STORMS_H = 194315, + GO_CACHE_OF_STORMS_10 = 194312, + GO_CACHE_OF_STORMS_25 = 194315, + GO_CACHE_OF_STORMS_10_H = 194313, + GO_CACHE_OF_STORMS_25_H = 194314, // Alagon - GO_GIFT_OF_OBSERVER_H = 194821, - GO_GIFT_OF_OBSERVER = 194822, - GO_GIFT_OF_OBSERVER_HH = 194823, // Purpose Unknown + GO_GIFT_OF_OBSERVER_10 = 194821, + GO_GIFT_OF_OBSERVER_25 = 194822, // Doors and other Objects // The siege diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 0a1cc1ade..9e49bdadc 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2274" + #define SD2_REVISION_NR "2275" #endif // __SD2_REVISION_NR_H__ From acf3d1a9e1ace525594bb3645d059e6f2f92eb1a Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Sun, 11 Sep 2011 14:31:23 +0200 Subject: [PATCH 0256/1172] [2276] Implement script for Forge of Souls - Devourer of Souls Expects spell fixes of MaNGOS 11792+ Also fix a typo (TYPE_DECOURER -> TYPE_DEVOURER), thanks to alexluana for pointing --- .../forge_of_souls/boss_devourer_of_souls.cpp | 218 +++++++++++++++++- .../forge_of_souls/forge_of_souls.h | 2 +- .../instance_forge_of_souls.cpp | 4 +- sd2_revision_nr.h | 2 +- 4 files changed, 213 insertions(+), 13 deletions(-) diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_devourer_of_souls.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_devourer_of_souls.cpp index c95ca3850..be6838e71 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_devourer_of_souls.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_devourer_of_souls.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: boss_devourer_of_souls -SD%Complete: 0% -SDComment: Placeholder +SD%Complete: 90% +SDComment: Timers need more love, NPC_UNLEASHED_SOUL are not handled proper SDCategory: The Forge of Souls EndScriptData */ @@ -26,7 +26,6 @@ EndScriptData */ enum { - // TODO, how to change the face on random?, how to know which face is shown, to use the additional entries SAY_MALE_1_AGGRO = -1632007, SAY_FEMALE_AGGRO = -1632008, SAY_MALE_1_SLAY_1 = -1632009, @@ -49,8 +48,28 @@ enum EMOTE_WAILING_SOULS = -1632025, FACE_NORMAL = 0, - FACE_UNLEASHING = 1, - FACE_WAILING = 2, + FACE_WAILING = 1, + FACE_UNLEASHING = 2, + + SPELL_PHANTOM_BLAST = 68982, + SPELL_PHANTOM_BLAST_H = 70322, + SPELL_WELL_OF_SOULS = 68820, // spawns 36536, this one should cast 68854 (triggers normal dmg spell 68863 ) - 68855(visual) - 72630 (visual) + SPELL_WELL_OF_SOULS_TRIGGER = 68854, + SPELL_WELL_OF_SOULS_VISUAL1 = 68855, + SPELL_WELL_OF_SOULS_VISUAL2 = 72630, + + SPELL_MIRRORED_SOUL = 69048, // selecting target, applying aura 69023 to pass on dmg, dmg triggers 69034 with right amount + SPELL_UNLEASHED_SOULS = 68939, // trigger (68967, select nearby target trigger 68979(summon 36595)), transform, root + SPELL_WAILING_SOULS = 68899, + SPELL_WALIING_SOULS_TARGETS = 68912, + + SPELL_DRUID_MORPH_1_5 = 68931, // delayed visual, 1.5s delay - used before wailing souls + SPELL_DRUID_MORPH_0_5 = 68977, // delayed visual, .5s delay - used before unleash souls + SPELL_SUBMERGE_VISUAL = 68909, // visual used to 'whirl' the heads, used by SPELL_DRUID_MORPH if spell DRUID_MORPH is used to "end" a phase + SPELL_DRUID_MORPH = 68929, // used after wailing and unleashed souls, also triggered by DRUIT_MORPH_* + + NPC_WELL_OF_SOULS = 36536, + NPC_UNLEASHED_SOUL = 36595, }; static const int aTexts[6][3] = @@ -59,7 +78,7 @@ static const int aTexts[6][3] = {SAY_MALE_1_SLAY_1, SAY_FEMALE_SLAY_1, SAY_MALE_2_SLAY_1}, // 1 - slay1 {SAY_MALE_1_SLAY_2, SAY_FEMALE_SLAY_2, SAY_MALE_2_SLAY_2}, // 2 - slay2 {SAY_MALE_1_DEATH, SAY_FEMALE_DEATH, SAY_MALE_2_DEATH}, // 3 - death - {SAY_MALE_1_SOUL_ATTACK, SAY_FEMALE_SOUL_ATTACK, SAY_MALE_2_SOUL_ATTACK}, // 4 - soul + {SAY_MALE_1_SOUL_ATTACK, SAY_FEMALE_SOUL_ATTACK, SAY_MALE_2_SOUL_ATTACK}, // 4 - unleashing soul {SAY_MALE_1_DARK_GLARE, SAY_FEMALE_DARK_GLARE, 0} // 5 - glare }; @@ -76,16 +95,32 @@ struct MANGOS_DLL_DECL boss_devourer_of_soulsAI : public ScriptedAI uint8 m_uiFace; bool m_bIsRegularMode; + uint32 m_uiPhantomBlastTimer; + uint32 m_uiWellTimer; + uint32 m_uiMirrorTimer; + uint32 m_uiUnleashTimer; + uint32 m_uiWailingTimer; + uint32 m_uiEndPhaseTimer; + + GUIDList m_lWellGuids; + void Reset() { m_uiFace = FACE_NORMAL; + + m_uiPhantomBlastTimer = urand(5000, 10000); + m_uiWellTimer = urand(10000, 15000); + m_uiMirrorTimer = urand(10000, 15000); + m_uiUnleashTimer = urand(15000, 20000); + m_uiWailingTimer = urand(40000, 60000); + m_uiEndPhaseTimer = 0; } void Aggro(Unit* pWho) { DoScriptText(aTexts[0][m_uiFace], m_creature); if (m_pInstance) - m_pInstance->SetData(TYPE_DECOURER_OF_SOULS, IN_PROGRESS); + m_pInstance->SetData(TYPE_DEVOURER_OF_SOULS, IN_PROGRESS); } void KilledUnit(Unit* pVictim) @@ -102,19 +137,184 @@ struct MANGOS_DLL_DECL boss_devourer_of_soulsAI : public ScriptedAI DoScriptText(aTexts[3][m_uiFace], m_creature); if (m_pInstance) + m_pInstance->SetData(TYPE_DEVOURER_OF_SOULS, DONE); + + for (GUIDList::const_iterator itr = m_lWellGuids.begin(); itr != m_lWellGuids.end(); ++itr) { - m_pInstance->SetData(TYPE_DECOURER_OF_SOULS, DONE); + if (Creature* pWell = m_creature->GetMap()->GetCreature(*itr)) + pWell->ForcedDespawn(); } + m_lWellGuids.clear(); } void JustReachedHome() { if (m_pInstance) { - m_pInstance->SetData(NPC_DEVOURER_OF_SOULS, NOT_STARTED); + m_pInstance->SetData(NPC_DEVOURER_OF_SOULS, FAIL); // If we previously failed, set such that possible to try again m_pInstance->SetData(TYPE_ACHIEV_PHANTOM_BLAST, IN_PROGRESS); } + + for (GUIDList::const_iterator itr = m_lWellGuids.begin(); itr != m_lWellGuids.end(); ++itr) + { + if (Creature* pWell = m_creature->GetMap()->GetCreature(*itr)) + pWell->ForcedDespawn(); + } + m_lWellGuids.clear(); + } + + void JustSummoned(Creature* pSummoned) + { + if (pSummoned->GetEntry() == NPC_WELL_OF_SOULS) + { + m_lWellGuids.push_back(pSummoned->GetObjectGuid()); + pSummoned->CastSpell(pSummoned, SPELL_WELL_OF_SOULS_TRIGGER, true, NULL, NULL, m_creature->GetObjectGuid()); + // Commented as of not stacking auras + //pSummoned->CastSpell(pSummoned, SPELL_WELL_OF_SOULS_VISUAL1, true); + //pSummoned->CastSpell(pSummoned, SPELL_WELL_OF_SOULS_VISUAL2, true); + } + else if (pSummoned->GetEntry() == NPC_UNLEASHED_SOUL) + { + if (Unit* pEnemy = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + // It seems the summoned should rather walk towards the boss, but this results in them attacking the healer + pSummoned->AI()->AttackStart(pEnemy); + pSummoned->AddThreat(pEnemy, 10000.0f); + } + pSummoned->ForcedDespawn(15000); // Note that this is sort of a hack, the more correct fix however would require to toggle the interpretation of summon properties in mangos + } + } + + void SpellHitTarget(Unit* pTarget, SpellEntry const* pSpellEntry) + { + switch (pSpellEntry->Id) + { + // If we hit a target with phantom blast, the achievement_criteria is failed + case SPELL_PHANTOM_BLAST: + case SPELL_PHANTOM_BLAST_H: + if (m_pInstance) + m_pInstance->SetData(TYPE_ACHIEV_PHANTOM_BLAST, FAIL); + break; + // Might be placed somewhere else better, important is to note that this text is said after the 3s cast time + case SPELL_WAILING_SOULS: + DoScriptText(aTexts[5][m_uiFace], m_creature); + break; + } + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->isInCombat()) + return; + + // Ending a phase + if (m_uiEndPhaseTimer) + { + if (m_uiEndPhaseTimer <= uiDiff) + { + DoCastSpellIfCan(m_creature, SPELL_DRUID_MORPH, CAST_INTERRUPT_PREVIOUS); + // Sumberge visual might be cast as effect of the above spell. + DoCastSpellIfCan(m_creature, SPELL_SUBMERGE_VISUAL, CAST_TRIGGERED); + m_uiEndPhaseTimer = 0; + + m_uiFace = FACE_NORMAL; + } + else + m_uiEndPhaseTimer -= uiDiff; + } + + // No additional spells, no target selection for wailing souls + if (m_uiFace == FACE_WAILING) + { + // Some special handling in case of starting phase of wailings + if (ObjectGuid targetGuid = m_creature->GetTargetGuid()) + { + if (Unit* pTarget = m_creature->GetMap()->GetUnit(targetGuid)) + m_creature->SetFacingTo(m_creature->GetAngle(pTarget)); + } + + if (m_creature->getThreatManager().isThreatListEmpty() || !m_creature->getThreatManager().getHostileTarget()) + m_creature->SelectHostileTarget(); // Most likely must evade, use additional checks in case evading would be prevented + return; + } + + // Update Target and do Combat Spells + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + // No additional abilities while unleashing + if (m_uiFace == FACE_UNLEASHING) + return; + + // Phantom Blast + if (m_uiPhantomBlastTimer < uiDiff) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, m_bIsRegularMode ? SPELL_PHANTOM_BLAST : SPELL_PHANTOM_BLAST_H) == CAST_OK) + m_uiPhantomBlastTimer = urand(5000, 10000); // TODO + } + } + else + m_uiPhantomBlastTimer -= uiDiff; + + // Jump towards random enemy + if (m_uiWellTimer < uiDiff) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, SPELL_WELL_OF_SOULS) == CAST_OK) + m_uiWellTimer = urand(15000, 25000); // TODO + } + } + else + m_uiWellTimer -= uiDiff; + + // DMG reflection + if (m_uiMirrorTimer < uiDiff) + { + if (!m_creature->IsNonMeleeSpellCasted(true)) + { + DoCastSpellIfCan(m_creature, SPELL_MIRRORED_SOUL, CAST_TRIGGERED); + m_uiMirrorTimer = urand(25000, 35000); // TODO + DoScriptText(EMOTE_MIRRORED_SOUL, m_creature); + } + } + else + m_uiMirrorTimer -= uiDiff; + + // Spawning of Adds + if (m_uiUnleashTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_UNLEASHED_SOULS) == CAST_OK && DoCastSpellIfCan(m_creature, SPELL_DRUID_MORPH_0_5, CAST_TRIGGERED) == CAST_OK) + { + DoScriptText(EMOTE_UNLEASH_SOULS, m_creature); + m_uiUnleashTimer = urand(30000, 60000); // TODO + + m_uiFace = FACE_UNLEASHING; + DoScriptText(aTexts[4][m_uiFace], m_creature); + m_uiEndPhaseTimer = 4500; // 5000 (Duration of Unleasing) + 850(Cast time for unleashing) - 1000(duration of whirl) - a bit air + } + } + else + m_uiUnleashTimer -= uiDiff; + + if (m_uiWailingTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_WALIING_SOULS_TARGETS) == CAST_OK) + { + DoCastSpellIfCan(m_creature, SPELL_DRUID_MORPH_1_5, CAST_TRIGGERED); + DoScriptText(EMOTE_WAILING_SOULS, m_creature); + m_uiFace = FACE_WAILING; + m_uiEndPhaseTimer = 12500; // 100000 (Duration of Wailing) + 3000(casting time) - 1000 (duration of whirl) + 500 (some add. time) + m_uiWailingTimer = urand(25000, 35000); // TODO + } + } + else + m_uiWailingTimer -= uiDiff; + + DoMeleeAttackIfReady(); } }; diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/forge_of_souls.h b/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/forge_of_souls.h index 9134866cb..b3bada206 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/forge_of_souls.h +++ b/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/forge_of_souls.h @@ -9,7 +9,7 @@ enum { MAX_ENCOUNTER = 2, TYPE_BRONJAHM = 1, - TYPE_DECOURER_OF_SOULS = 2, + TYPE_DEVOURER_OF_SOULS = 2, TYPE_ACHIEV_PHANTOM_BLAST = 3, DATA_SOULFRAGMENT_REMOVE = 4, // on Death and on Use diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/instance_forge_of_souls.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/instance_forge_of_souls.cpp index 1bf431a44..2684e3d29 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/instance_forge_of_souls.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/instance_forge_of_souls.cpp @@ -132,7 +132,7 @@ void instance_forge_of_souls::SetData(uint32 uiType, uint32 uiData) } m_luiSoulFragmentAliveGUIDs.clear(); break; - case TYPE_DECOURER_OF_SOULS: + case TYPE_DEVOURER_OF_SOULS: m_auiEncounter[1] = uiData; if (uiData == DONE) ProcessEventNpcs(GetPlayerInMap(), true); @@ -184,7 +184,7 @@ uint32 instance_forge_of_souls::GetData(uint32 uiType) { case TYPE_BRONJAHM: return m_auiEncounter[0]; - case TYPE_DECOURER_OF_SOULS: + case TYPE_DEVOURER_OF_SOULS: return m_auiEncounter[1]; default: return 0; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 9e49bdadc..5f4595b71 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2275" + #define SD2_REVISION_NR "2276" #endif // __SD2_REVISION_NR_H__ From e7f2348429a89b07ca162554cee49242d0c575a3 Mon Sep 17 00:00:00 2001 From: "evil.at.wow" Date: Sun, 11 Sep 2011 15:30:49 +0200 Subject: [PATCH 0257/1172] [2277] Fix typo in Wailing Caverns escort event texts Signed-off-by: Schmoozerd --- sd2_revision_nr.h | 2 +- sql/scriptdev2_script_full.sql | 2 +- sql/updates/r2277_scriptdev2.sql | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 sql/updates/r2277_scriptdev2.sql diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 5f4595b71..f9244a5dc 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2276" + #define SD2_REVISION_NR "2277" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 5313df36d..8e6a55a3b 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -760,7 +760,7 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen -- -1 043 000 WAILING CAVERNS INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES (-1043000,'At last! Naralex can be awakened! Come aid me, brave adventurers!',0,6,0,0,'Disciple of Naralex - SAY_INTRO'), -(-1043001,'I must make the nescessary preparations before the awakening ritual can begin. You must protect me!',0,0,0,0,'SAY_PREPARE'), +(-1043001,'I must make the necessary preparations before the awakening ritual can begin. You must protect me!',0,0,0,0,'SAY_PREPARE'), (-1043002,'These caverns were once a temple of promise for regrowth in the Barrens. Now, they are the halls of nightmares.',0,0,0,0,'Disciple of Naralex - SAY_FIRST_CORNER'), (-1043003,'Come. We must continue. There is much to be done before we can pull Naralex from his nightmare.',0,0,0,0,'Disciple of Naralex - SAY_CONTINUE'), (-1043004,'Within this circle of fire I must cast the spell to banish the spirits of the slain Fanglords.',0,0,0,0,'Disciple of Naralex - SAY_CIRCLE_BANISH'), diff --git a/sql/updates/r2277_scriptdev2.sql b/sql/updates/r2277_scriptdev2.sql new file mode 100644 index 000000000..933e10cdd --- /dev/null +++ b/sql/updates/r2277_scriptdev2.sql @@ -0,0 +1 @@ +UPDATE script_texts SET content_default='I must make the necessary preparations before the awakening ritual can begin. You must protect me!' WHERE entry=-1043001; From b1c571621512a7b72f4365c52cb85b50966d2ca0 Mon Sep 17 00:00:00 2001 From: DaC Date: Sun, 11 Sep 2011 15:34:10 +0200 Subject: [PATCH 0258/1172] [2278] Fix possible spawns for Webbed Creature in Bloodmyst Isle Note: There are spells related to this event, likely whole script should be changed to a spell effect and eventAi script Signed-off-by: Schmoozerd --- scripts/kalimdor/bloodmyst_isle.cpp | 4 ++-- sd2_revision_nr.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/kalimdor/bloodmyst_isle.cpp b/scripts/kalimdor/bloodmyst_isle.cpp index 539c866c6..e9726d3e7 100644 --- a/scripts/kalimdor/bloodmyst_isle.cpp +++ b/scripts/kalimdor/bloodmyst_isle.cpp @@ -33,7 +33,7 @@ EndContentData */ ######*/ //possible creatures to be spawned -const uint32 possibleSpawns[32] = {17322, 17661, 17496, 17522, 17340, 17352, 17333, 17524, 17654, 17348, 17339, 17345, 17359, 17353, 17336, 17550, 17330, 17701, 17321, 17680, 17325, 17320, 17683, 17342, 17715, 17334, 17341, 17338, 17337, 17346, 17344, 17327}; +const uint32 possibleSpawns[31] = {17322, 17661, 17496, 17522, 17340, 17352, 17333, 17524, 17654, 17348, 17339, 17345, 17359, 17353, 17336, 17550, 17330, 17701, 17321, 17325, 17320, 17683, 17342, 17715, 17334, 17341, 17338, 17337, 17346, 17344, 17327}; struct MANGOS_DLL_DECL mob_webbed_creatureAI : public ScriptedAI { @@ -56,7 +56,7 @@ struct MANGOS_DLL_DECL mob_webbed_creatureAI : public ScriptedAI break; case 1: case 2: - spawnCreatureID = possibleSpawns[urand(0, 31)]; + spawnCreatureID = possibleSpawns[urand(0, 30)]; break; } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index f9244a5dc..6d6afd54a 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2277" + #define SD2_REVISION_NR "2278" #endif // __SD2_REVISION_NR_H__ From f675987e562b24d26c9a53e828151a081649e0c8 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Sun, 14 Aug 2011 01:07:46 +0200 Subject: [PATCH 0259/1172] [2279] Implement event controller npc for ToC25 Beasts * Add Berserker * Let the beasts move into the arena * Add support for delayed attack and calling the bosses on timer for heroic modes Thanks to authors in Dev-Section for provided research of what is happening --- .../boss_northrend_beasts.cpp | 146 +++++++++++++++--- .../trial_of_the_crusader.h | 7 + sd2_revision_nr.h | 2 +- 3 files changed, 130 insertions(+), 25 deletions(-) diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp index 17a8b52ff..e32cfc463 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp @@ -32,26 +32,49 @@ enum { SAY_TIRION_BEAST_2 = -1649005, SAY_TIRION_BEAST_3 = -1649006, + + SPELL_BERSERK = 26662, + + PHASE_GORMOK = 0, + PHASE_WORMS = 1, + PHASE_ICEHOWL = 2, }; -// TODO need to script npc 36549 - Beast Combat Stalker, set into combat in begin, destroy on end -struct MANGOS_DLL_DECL npc_beast_combat_stalkerAI : public ScriptedAI +struct MANGOS_DLL_DECL npc_beast_combat_stalkerAI : public Scripted_NoMovementAI { - npc_beast_combat_stalkerAI(Creature* pCreature) : ScriptedAI(pCreature) + npc_beast_combat_stalkerAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_vSummonedBossGuids.reserve(4); Reset(); m_creature->SetInCombatWithZone(); } ScriptedInstance* m_pInstance; - GUIDVector m_vSummonedBossGuids; + ObjectGuid m_aSummonedBossGuid[4]; bool m_bFirstWormDied; + uint32 m_uiBerserkTimer; + uint32 m_uiAttackDelayTimer; + uint32 m_uiNextBeastTimer; + uint32 m_uiPhase; void Reset() { - m_bFirstWormDied = true; // TODO - change to = false; when second worm handling is implemented. + m_uiAttackDelayTimer = 0; + m_uiNextBeastTimer = 0; + m_bFirstWormDied = false; + m_uiPhase = PHASE_GORMOK; + + if (m_creature->GetMap()->GetDifficulty() == RAID_DIFFICULTY_10MAN_NORMAL || m_creature->GetMap()->GetDifficulty() == RAID_DIFFICULTY_25MAN_NORMAL) + m_uiBerserkTimer = 15*MINUTE*IN_MILLISECONDS; + else + m_uiBerserkTimer = 9*MINUTE*IN_MILLISECONDS; + } + + void MoveInLineOfSight(Unit* pWho) {} + + void DamageTaken(Unit* pDealer, uint32& uiDamage) + { + uiDamage = 0; } void JustReachedHome() @@ -59,13 +82,12 @@ struct MANGOS_DLL_DECL npc_beast_combat_stalkerAI : public ScriptedAI if (m_pInstance) m_pInstance->SetData(TYPE_NORTHREND_BEASTS, FAIL); - for (GUIDVector::const_iterator itr = m_vSummonedBossGuids.begin(); itr != m_vSummonedBossGuids.end(); ++itr) + for (uint8 i = 0; i < 4; ++i) { - if (Creature* pBoss = m_creature->GetMap()->GetCreature(*itr)) + if (Creature* pBoss = m_creature->GetMap()->GetCreature(m_aSummonedBossGuid[i])) pBoss->ForcedDespawn(); } - m_vSummonedBossGuids.clear(); m_creature->ForcedDespawn(); } @@ -77,8 +99,46 @@ struct MANGOS_DLL_DECL npc_beast_combat_stalkerAI : public ScriptedAI void JustSummoned(Creature* pSummoned) { - m_vSummonedBossGuids.push_back(pSummoned->GetObjectGuid()); - pSummoned->SetInCombatWithZone(); // TODO correct? + switch (pSummoned->GetEntry()) + { + case NPC_GORMOK: m_uiPhase = PHASE_GORMOK; break; + case NPC_DREADSCALE: m_uiPhase = PHASE_WORMS; break; + case NPC_ICEHOWL: m_uiPhase = PHASE_ICEHOWL; break; + case NPC_ACIDMAW: + // Cast emerge and delayed set in combat? + pSummoned->SetInCombatWithZone(); + m_aSummonedBossGuid[3] = pSummoned->GetObjectGuid(); + return; + } + + m_aSummonedBossGuid[m_uiPhase] = pSummoned->GetObjectGuid(); + + pSummoned->GetMotionMaster()->MovePoint(m_uiPhase, aMovePositions[m_uiPhase][0], aMovePositions[m_uiPhase][1], aMovePositions[m_uiPhase][2]); + + // Next beasts are summoned only for heroic modes + if (m_creature->GetMap()->GetDifficulty() == RAID_DIFFICULTY_10MAN_HEROIC || m_creature->GetMap()->GetDifficulty() == RAID_DIFFICULTY_25MAN_HEROIC) + m_uiNextBeastTimer = 150*IN_MILLISECONDS; // 2 min 30 + + m_uiAttackDelayTimer = 15000; // TODO, must be checked. + } + + // Only for Dreadscale and Icehowl + void DoSummonNextBeast(uint32 uiBeastEntry) + { + if (uiBeastEntry == NPC_DREADSCALE) + { + if (Creature* pTirion = m_pInstance->GetSingleCreatureFromStorage(NPC_TIRION_A)) + DoScriptText(SAY_TIRION_BEAST_2, pTirion); + + m_creature->SummonCreature(NPC_DREADSCALE, aSpawnPositions[2][0], aSpawnPositions[2][1], aSpawnPositions[2][2], aSpawnPositions[2][3], TEMPSUMMON_DEAD_DESPAWN, 0); + } + else + { + if (Creature* pTirion = m_pInstance->GetSingleCreatureFromStorage(NPC_TIRION_A)) + DoScriptText(SAY_TIRION_BEAST_3, pTirion); + + m_creature->SummonCreature(NPC_ICEHOWL, aSpawnPositions[4][0], aSpawnPositions[4][1], aSpawnPositions[4][2], aSpawnPositions[4][3], TEMPSUMMON_DEAD_DESPAWN, 0); + } } void SummonedCreatureJustDied(Creature* pSummoned) @@ -89,21 +149,14 @@ struct MANGOS_DLL_DECL npc_beast_combat_stalkerAI : public ScriptedAI switch (pSummoned->GetEntry()) { case NPC_GORMOK: - if (Creature* pTirion = m_pInstance->GetSingleCreatureFromStorage(NPC_TIRION_A)) - DoScriptText(SAY_TIRION_BEAST_2, pTirion); - - m_creature->SummonCreature(NPC_DREADSCALE, aSpawnPositions[2][0], aSpawnPositions[2][1], aSpawnPositions[2][2], aSpawnPositions[2][3], TEMPSUMMON_DEAD_DESPAWN, 0); + if (m_uiPhase == PHASE_GORMOK) + DoSummonNextBeast(NPC_DREADSCALE); break; case NPC_DREADSCALE: case NPC_ACIDMAW: - if (m_bFirstWormDied) - { - if (Creature* pTirion = m_pInstance->GetSingleCreatureFromStorage(NPC_TIRION_A)) - DoScriptText(SAY_TIRION_BEAST_3, pTirion); - - m_creature->SummonCreature(NPC_ICEHOWL, aSpawnPositions[4][0], aSpawnPositions[4][1], aSpawnPositions[4][2], aSpawnPositions[4][3], TEMPSUMMON_DEAD_DESPAWN, 0); - } + if (m_bFirstWormDied && m_uiPhase == PHASE_WORMS) + DoSummonNextBeast(NPC_ICEHOWL); else m_bFirstWormDied = true; break; @@ -117,8 +170,53 @@ struct MANGOS_DLL_DECL npc_beast_combat_stalkerAI : public ScriptedAI void UpdateAI(const uint32 uiDiff) { - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; + if (m_uiNextBeastTimer) + { + if (m_uiNextBeastTimer <= uiDiff) + { + if (m_uiPhase == PHASE_GORMOK) + DoSummonNextBeast(NPC_DREADSCALE); + else if (m_uiPhase == PHASE_WORMS) + DoSummonNextBeast(NPC_ICEHOWL); + + m_uiNextBeastTimer = 0; + } + else + m_uiNextBeastTimer -= uiDiff; + } + + if (m_uiAttackDelayTimer) + { + if (m_uiAttackDelayTimer <= uiDiff) + { + if (m_uiPhase == PHASE_WORMS) + m_creature->SummonCreature(NPC_ACIDMAW, aSpawnPositions[3][0], aSpawnPositions[3][1], aSpawnPositions[3][2], aSpawnPositions[3][3], TEMPSUMMON_DEAD_DESPAWN, 0); + + if (Creature* pBeast = m_creature->GetMap()->GetCreature(m_aSummonedBossGuid[m_uiPhase])) + pBeast->SetInCombatWithZone(); + + m_uiAttackDelayTimer = 0; + } + else + m_uiAttackDelayTimer -= uiDiff; + } + + if (m_uiBerserkTimer) + { + if (m_uiBerserkTimer < uiDiff) + { + for (uint8 i = 0; i < 4; ++i) + { + Creature* pBoss = m_creature->GetMap()->GetCreature(m_aSummonedBossGuid[i]); + if (pBoss && pBoss->isAlive()) + pBoss->CastSpell(pBoss, SPELL_BERSERK, true); + } + } + else + m_uiBerserkTimer -= uiDiff; + } + + m_creature->SelectHostileTarget(); } }; diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h index eb8b32ea5..248ba42ea 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h @@ -61,6 +61,13 @@ static const float aSpawnPositions[][4] = {555.4514f, 205.8889f, 399.2634f, 4.886922f}, // Eydis }; +static const float aMovePositions[][3] = +{ + {563.748f, 179.766f, 394.4862f}, // Gormok + {576.5347f, 168.9514f, 394.7064f}, // Dreadscale + {563.8577f, 176.5885f, 394.4417f}, // Icehowl +}; + class MANGOS_DLL_DECL instance_trial_of_the_crusader : public ScriptedInstance, private DialogueHelper { public: diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 6d6afd54a..71c4ffa95 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2278" + #define SD2_REVISION_NR "2279" #endif // __SD2_REVISION_NR_H__ From b8409495e4eef9e1c8bf842c500059402c2299e9 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Mon, 12 Sep 2011 14:50:20 +0200 Subject: [PATCH 0260/1172] [2280] Let Keristrasza in Nexus proper release from her frozen prison --- scripts/northrend/nexus/nexus/boss_keristrasza.cpp | 2 +- scripts/northrend/nexus/nexus/instance_nexus.cpp | 7 ++++--- scripts/northrend/nexus/nexus/nexus.h | 2 +- sd2_revision_nr.h | 2 +- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/scripts/northrend/nexus/nexus/boss_keristrasza.cpp b/scripts/northrend/nexus/nexus/boss_keristrasza.cpp index b236122fa..f2f83b398 100644 --- a/scripts/northrend/nexus/nexus/boss_keristrasza.cpp +++ b/scripts/northrend/nexus/nexus/boss_keristrasza.cpp @@ -84,7 +84,7 @@ struct MANGOS_DLL_DECL boss_keristraszaAI : public ScriptedAI if (m_creature->isAlive()) { if (m_pInstance->GetData(TYPE_KERISTRASZA) != SPECIAL) - m_creature->CastSpell(m_creature, SPELL_FROZEN_PRISON, true); + DoCastSpellIfCan(m_creature, SPELL_FROZEN_PRISON, CAST_TRIGGERED); } } diff --git a/scripts/northrend/nexus/nexus/instance_nexus.cpp b/scripts/northrend/nexus/nexus/instance_nexus.cpp index d5c6bc6aa..914c4f930 100644 --- a/scripts/northrend/nexus/nexus/instance_nexus.cpp +++ b/scripts/northrend/nexus/nexus/instance_nexus.cpp @@ -130,10 +130,11 @@ void instance_nexus::SetData(uint32 uiType, uint32 uiData) // release Keristrasza from her prison here m_auiEncounter[TYPE_KERISTRASZA] = SPECIAL; - if (Creature* pCreature = GetSingleCreatureFromStorage(NPC_KERISTRASZA)) + Creature* pCreature = GetSingleCreatureFromStorage(NPC_KERISTRASZA); + if (pCreature && pCreature->isAlive()) { - if (pCreature->isAlive()) - pCreature->RemoveAurasDueToSpell(SPELL_FROZEN_PRISON); + pCreature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PASSIVE | UNIT_FLAG_OOC_NOT_ATTACKABLE); + pCreature->RemoveAurasDueToSpell(SPELL_FROZEN_PRISON); } } diff --git a/scripts/northrend/nexus/nexus/nexus.h b/scripts/northrend/nexus/nexus/nexus.h index d66240ff5..e82712d8e 100644 --- a/scripts/northrend/nexus/nexus/nexus.h +++ b/scripts/northrend/nexus/nexus/nexus.h @@ -23,7 +23,7 @@ enum GO_CONTAINMENT_SPHERE_ANOMALUS = 188527, GO_CONTAINMENT_SPHERE_ORMOROK = 188528, - SPELL_FROZEN_PRISON = 47854, // may not be correct spell + SPELL_FROZEN_PRISON = 47854, }; class MANGOS_DLL_DECL instance_nexus : public ScriptedInstance diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 71c4ffa95..cb2123c07 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2279" + #define SD2_REVISION_NR "2280" #endif // __SD2_REVISION_NR_H__ From 0288f8dd160a69065db326a5fc0ff56ee7413fdc Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Tue, 13 Sep 2011 13:54:30 +0200 Subject: [PATCH 0261/1172] [2281] Fix a reset bug for DK-Initiate (quest 12848) --- scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp | 7 ++++++- sd2_revision_nr.h | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp b/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp index 247391176..514edd8a2 100644 --- a/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp +++ b/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp @@ -962,7 +962,6 @@ struct MANGOS_DLL_DECL npc_unworthy_initiateAI : public ScriptedAI if (m_creature->getFaction() != m_uiNormFaction) m_creature->setFaction(m_uiNormFaction); - m_myAnchorGuid.Clear(); m_uiAnchorCheckTimer = 5000; m_uiPhase = PHASE_INACTIVE_OR_COMBAT; m_uiPhaseTimer = 7500; @@ -975,6 +974,12 @@ struct MANGOS_DLL_DECL npc_unworthy_initiateAI : public ScriptedAI void JustReachedHome() { SetAnchor(); + + if (Creature* pAnchor = GetAnchor()) + { + if (npc_unworthy_initiate_anchorAI* pAnchorAI = dynamic_cast(pAnchor->AI())) + pAnchorAI->ResetPrison(); + } } void JustRespawned() diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index cb2123c07..22e2a38b8 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2280" + #define SD2_REVISION_NR "2281" #endif // __SD2_REVISION_NR_H__ From e36677e9f09cd975429f492f8bbe52775ffcc039 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Tue, 13 Sep 2011 15:28:40 +0200 Subject: [PATCH 0262/1172] [2282] Make Novos unselectable in shield phase and small tunings --- .../northrend/draktharon_keep/boss_novos.cpp | 29 ++++++++++++------- sd2_revision_nr.h | 2 +- 2 files changed, 19 insertions(+), 12 deletions(-) diff --git a/scripts/northrend/draktharon_keep/boss_novos.cpp b/scripts/northrend/draktharon_keep/boss_novos.cpp index 3b30f54c7..8860edc2c 100644 --- a/scripts/northrend/draktharon_keep/boss_novos.cpp +++ b/scripts/northrend/draktharon_keep/boss_novos.cpp @@ -37,7 +37,7 @@ enum SPELL_ARCANE_FIELD = 47346, SPELL_IMMUNITY = 34098, - SPELL_SUMMON_MINIONS_H = 59910, // (at least) on Phase-Switch, TODO1 research on appearence; TODO2 implement spell. Triggers 59935, 59938, 59939, 59940 + SPELL_SUMMON_MINIONS_H = 59910, SPELL_FROSTBOLT = 49037, SPELL_FROSTBOLT_H = 59855, SPELL_ARCANE_BLAST = 49198, @@ -58,7 +58,8 @@ enum NPC_CRYSTAL_HANDLER = 26627, NPC_HULKING_CORPSE = 27597, NPC_FETID_TROLL_CORPSE = 27598, - NPC_RISON_SHADOWCASTER = 27600 + NPC_RISON_SHADOWCASTER = 27600, + NPC_ROTTED_TROLL_CORPSE = 32786, // On heroic as effect of SPELL_SUMMON_MINIONS_H }; // The Crystal Handlers are summoned around the two entrances of the room @@ -119,6 +120,8 @@ struct MANGOS_DLL_DECL boss_novosAI : public Scripted_NoMovementAI m_uiLostCrystals = 0; // This ensures that in the shield phase m_pInstance is valid m_uiPhase = m_pInstance ? PHASE_SHIELDED : PHASE_NORMAL; + + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); } void LostOneCrystal() @@ -127,14 +130,8 @@ struct MANGOS_DLL_DECL boss_novosAI : public Scripted_NoMovementAI DoScriptText(urand(0, 1) ? SAY_BUBBLE_1 : SAY_BUBBLE_2, m_creature); - if (m_uiLostCrystals == MAX_CRYSTALS) - { - // Enter Phase 2 - if (!m_bIsRegularMode) - DoCastSpellIfCan(m_creature, SPELL_SUMMON_MINIONS_H); - + if (m_uiLostCrystals == MAX_CRYSTALS) // Enter Phase 2 m_uiPhase = PHASE_WAITING; - } } void MoveInLineOfSight(Unit* pWho) @@ -155,8 +152,12 @@ struct MANGOS_DLL_DECL boss_novosAI : public Scripted_NoMovementAI { DoScriptText(SAY_AGGRO, m_creature); - DoCastSpellIfCan(m_creature, SPELL_ARCANE_FIELD); + DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_ARCANE_BLAST : SPELL_ARCANE_BLAST_H, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_IMMUNITY, CAST_TRIGGERED); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + + DoCastSpellIfCan(m_creature, SPELL_ARCANE_FIELD); if (m_pInstance) m_pInstance->SetData(TYPE_NOVOS, IN_PROGRESS); @@ -186,6 +187,7 @@ struct MANGOS_DLL_DECL boss_novosAI : public Scripted_NoMovementAI switch (pSummoned->GetEntry()) { case NPC_CRYSTAL_HANDLER: + case NPC_ROTTED_TROLL_CORPSE: if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) pSummoned->AI()->AttackStart(pTarget); break; @@ -262,8 +264,13 @@ struct MANGOS_DLL_DECL boss_novosAI : public Scripted_NoMovementAI { m_uiPhase = PHASE_NORMAL; // Remove Immunity and Shield Aura - m_creature->InterruptNonMeleeSpells(true); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); m_creature->RemoveAllAuras(); + + if (!m_bIsRegularMode) + DoCastSpellIfCan(m_creature, SPELL_SUMMON_MINIONS_H, CAST_INTERRUPT_PREVIOUS); + else + m_creature->InterruptNonMeleeSpells(true); } else m_uiPhaseTimer -= uiDiff; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 22e2a38b8..3566a9474 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2281" + #define SD2_REVISION_NR "2282" #endif // __SD2_REVISION_NR_H__ From 0782e2bd62188ff5d2ad6d076d7aeb6f14d23e09 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Wed, 14 Sep 2011 00:05:50 +0300 Subject: [PATCH 0263/1172] [2283] Implement basic abilities for Hadronox --- .../azjol-nerub/azjol-nerub/boss_hadronox.cpp | 75 ++++++++++++++++++- sd2_revision_nr.h | 2 +- 2 files changed, 74 insertions(+), 3 deletions(-) diff --git a/scripts/northrend/azjol-nerub/azjol-nerub/boss_hadronox.cpp b/scripts/northrend/azjol-nerub/azjol-nerub/boss_hadronox.cpp index 4204600fb..58dc81302 100644 --- a/scripts/northrend/azjol-nerub/azjol-nerub/boss_hadronox.cpp +++ b/scripts/northrend/azjol-nerub/azjol-nerub/boss_hadronox.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: Boss_Hadronox -SD%Complete: 20% -SDComment: +SD%Complete: 50% +SDComment: Only basic abilities. Gauntlet event NYI SDCategory: Azjol'Nerub EndScriptData */ @@ -26,9 +26,33 @@ EndScriptData */ enum { + SPELL_PIERCE_ARMOR = 53418, + SPELL_ACID_CLOUD = 53400, + SPELL_ACID_CLOUD_H = 59419, + SPELL_LEECH_POISON = 53030, + SPELL_LEECH_POISON_H = 59417, + SPELL_WEB_GRAB = 57731, + SPELL_WEB_GRAB_H = 59421, + // Gauntlet end spells - send events 19101 and 19102 + //SPELL_WEB_FRONT_DOORS = 53177, + //SPELL_WEB_SIDE_DOORS = 53185, + + // Gauntlet summoned npcs + //NPC_ANUBAR_CHAMPION_1 = 29062, + //NPC_ANUBAR_CRYPT_FIEND_1 = 29063, + //NPC_ANUBAR_NECROMANCER_1 = 29064, + //NPC_ANUBAR_CHAMPION_2 = 29096, + //NPC_ANUBAR_CRYPT_FIEND_2 = 29097, + //NPC_ANUBAR_NECROMANCER_2 = 29098, }; + /* ##### Gauntlet description ##### + * This is the timed gauntlet - waves of non-elite spiders will spawn from the 3 doors located a little above the main room + * They will make their way down to fight Hadronox but she will head to the main room, fighting the spiders + * When Hadronox enters the main room, she will web the doors, and no more spiders will spawn. + */ + /*###### ## boss_hadronox ######*/ @@ -45,8 +69,17 @@ struct MANGOS_DLL_DECL boss_hadronoxAI : public ScriptedAI instance_azjol_nerub* m_pInstance; bool m_bIsRegularMode; + uint32 m_uiAcidTimer; + uint32 m_uiLeechTimer; + uint32 m_uiPierceTimer; + uint32 m_uiGrabTimer; + void Reset() { + m_uiAcidTimer = urand(10000, 14000); + m_uiLeechTimer = urand(3000, 9000); + m_uiPierceTimer = urand(1000, 3000); + m_uiGrabTimer = urand(15000, 19000); } void KilledUnit(Unit* pVictim) @@ -59,6 +92,44 @@ struct MANGOS_DLL_DECL boss_hadronoxAI : public ScriptedAI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; + if (m_uiPierceTimer < uiDiff) + { + if(DoCastSpellIfCan(m_creature->getVictim(), SPELL_PIERCE_ARMOR) == CAST_OK) + m_uiPierceTimer = 8000; + } + else + m_uiPierceTimer -= uiDiff; + + if (m_uiAcidTimer < uiDiff) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, m_bIsRegularMode ? SPELL_ACID_CLOUD : SPELL_ACID_CLOUD_H) == CAST_OK) + m_uiAcidTimer = urand(10000, 15000); + } + } + else + m_uiAcidTimer -= uiDiff; + + if (m_uiLeechTimer < uiDiff) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, m_bIsRegularMode ? SPELL_LEECH_POISON : SPELL_LEECH_POISON_H) == CAST_OK) + m_uiLeechTimer = urand(10000, 15000); + } + } + else + m_uiLeechTimer -= uiDiff; + + if (m_uiGrabTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_WEB_GRAB : SPELL_WEB_GRAB_H) == CAST_OK) + m_uiGrabTimer = urand(25000, 30000); + } + else + m_uiGrabTimer -= uiDiff; + DoMeleeAttackIfReady(); } }; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 3566a9474..a7e388cbc 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2282" + #define SD2_REVISION_NR "2283" #endif // __SD2_REVISION_NR_H__ From 68bda1a6edc2986881cdcff316ff2ca72d7fedcc Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Wed, 14 Sep 2011 14:38:47 +0200 Subject: [PATCH 0264/1172] [2284] Fix some problems with escortAI releated to special InCombat behaviour Thanks to Faq for pointing. Note that many of these problems are releated to default InCombat behaviour in core. --- base/escort_ai.cpp | 22 ++++++++++++++++------ sd2_revision_nr.h | 2 +- 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/base/escort_ai.cpp b/base/escort_ai.cpp index dc7965071..ad29e7d4e 100644 --- a/base/escort_ai.cpp +++ b/base/escort_ai.cpp @@ -82,6 +82,9 @@ void npc_escortAI::AttackStart(Unit* pWho) void npc_escortAI::EnterCombat(Unit* pEnemy) { + // Store combat start position + m_creature->SetCombatStartPosition(m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ()); + if (!pEnemy) return; @@ -219,13 +222,17 @@ void npc_escortAI::EnterEvadeMode() if (HasEscortState(STATE_ESCORT_ESCORTING)) { - debug_log("SD2: EscortAI has left combat and is now returning to CombatStartPosition."); + // We have left our path + if (m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() != POINT_MOTION_TYPE) + { + debug_log("SD2: EscortAI has left combat and is now returning to CombatStartPosition."); - AddEscortState(STATE_ESCORT_RETURNING); + AddEscortState(STATE_ESCORT_RETURNING); - float fPosX, fPosY, fPosZ; - m_creature->GetCombatStartPosition(fPosX, fPosY, fPosZ); - m_creature->GetMotionMaster()->MovePoint(POINT_LAST_POINT, fPosX, fPosY, fPosZ); + float fPosX, fPosY, fPosZ; + m_creature->GetCombatStartPosition(fPosX, fPosY, fPosZ); + m_creature->GetMotionMaster()->MovePoint(POINT_LAST_POINT, fPosX, fPosY, fPosZ); + } } else m_creature->GetMotionMaster()->MoveTargetedHome(); @@ -382,12 +389,15 @@ void npc_escortAI::MovementInform(uint32 uiMoveType, uint32 uiPointId) //Make sure that we are still on the right waypoint if (CurrentWP->uiId != uiPointId) { - error_log("SD2: EscortAI reached waypoint out of order %u, expected %u.", uiPointId, CurrentWP->uiId); + error_log("SD2: EscortAI for Npc %u reached waypoint out of order %u, expected %u.", m_creature->GetEntry(), uiPointId, CurrentWP->uiId); return; } debug_log("SD2: EscortAI waypoint %u reached.", CurrentWP->uiId); + // In case we were moving while in combat, we should evade back to this position + m_creature->SetCombatStartPosition(m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ()); + //Call WP function WaypointReached(CurrentWP->uiId); diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index a7e388cbc..b1c69a4fa 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2283" + #define SD2_REVISION_NR "2284" #endif // __SD2_REVISION_NR_H__ From 2ef96c517f05bc94717c520d5b1ddc39c555b058 Mon Sep 17 00:00:00 2001 From: Reamer Date: Fri, 16 Sep 2011 22:28:27 +0200 Subject: [PATCH 0265/1172] [2285] Fix IsEncounterInProgress for Naxxramas Signed-off-by: Schmoozerd --- scripts/northrend/naxxramas/instance_naxxramas.cpp | 10 ++++++++-- sd2_revision_nr.h | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/scripts/northrend/naxxramas/instance_naxxramas.cpp b/scripts/northrend/naxxramas/instance_naxxramas.cpp index 9743a74bf..e85686d4e 100644 --- a/scripts/northrend/naxxramas/instance_naxxramas.cpp +++ b/scripts/northrend/naxxramas/instance_naxxramas.cpp @@ -220,9 +220,15 @@ void instance_naxxramas::OnCreatureDeath(Creature* pCreature) bool instance_naxxramas::IsEncounterInProgress() const { - for (uint8 i = 0; i < TYPE_KELTHUZAD; ++i) - if (m_auiEncounter[i] == IN_PROGRESS || m_auiEncounter[i] == SPECIAL) + for (uint8 i = 0; i <= TYPE_KELTHUZAD; ++i) + { + if (m_auiEncounter[i] == IN_PROGRESS) return true; + } + + // Some Encounters use SPECIAL while in progress + if (m_auiEncounter[TYPE_GOTHIK] == SPECIAL) + return true; return false; } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index b1c69a4fa..3f413f033 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2284" + #define SD2_REVISION_NR "2285" #endif // __SD2_REVISION_NR_H__ From b7186c598cc40a2c4b1ed93e392f9ac10d683d13 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Tue, 20 Sep 2011 01:10:25 +0300 Subject: [PATCH 0266/1172] [2284] Implement script for Zul'jin * Add boss phases and phase transitions * Lynx abilities not yet implemented * Feather vortexes need ACID support --- .../eastern_kingdoms/zulaman/boss_zuljin.cpp | 324 ++++++++++++++++-- .../zulaman/instance_zulaman.cpp | 4 + scripts/eastern_kingdoms/zulaman/zulaman.h | 5 + sd2_revision_nr.h | 2 +- sql/scriptdev2_script_full.sql | 7 +- sql/updates/r2284_scriptdev2.sql | 6 + 6 files changed, 320 insertions(+), 28 deletions(-) create mode 100644 sql/updates/r2284_scriptdev2.sql diff --git a/scripts/eastern_kingdoms/zulaman/boss_zuljin.cpp b/scripts/eastern_kingdoms/zulaman/boss_zuljin.cpp index f2bf448a1..d448fc0de 100644 --- a/scripts/eastern_kingdoms/zulaman/boss_zuljin.cpp +++ b/scripts/eastern_kingdoms/zulaman/boss_zuljin.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: Boss_Zuljin -SD%Complete: 0 -SDComment: +SD%Complete: 70 +SDComment: Timers. Lynx phase abilities NYI SDCategory: Zul'Aman EndScriptData */ @@ -38,6 +38,11 @@ enum SAY_KILL2 = -1568065, SAY_DEATH = -1568066, + EMOTE_BEAR_SPIRIT = -1568082, + EMOTE_EAGLE_SPIRIT = -1568083, + EMOTE_LYNX_SPIRIT = -1568084, + EMOTE_DRAGONHAWK_SPIRIT = -1568085, + // Troll Form SPELL_WHIRLWIND = 17207, SPELL_GRIEVOUS_THROW = 43093, //removes debuff after full healed @@ -47,31 +52,27 @@ enum SPELL_OVERPOWER = 43456, //use after melee attack dodged // Eagle Form - SPELL_ENERGY_STORM = 43983, //enemy area aura, trigger 42577 - SPELL_ZAP_INFORM = 42577, - SPELL_ZAP_DAMAGE = 43137, //1250 damage + SPELL_ENERGY_STORM = 43983, //enemy area aura, trigger 42577 on vortexes which cast 43137 on targets SPELL_SUMMON_CYCLONE = 43112, //summon four feather vortex - CREATURE_FEATHER_VORTEX = 24136, + NPC_FEATHER_VORTEX = 24136, //ToDo: script via ACID SPELL_CYCLONE_VISUAL = 43119, //trigger 43147 visual SPELL_CYCLONE_PASSIVE = 43120, //trigger 43121 (4y aoe) every second // Lynx Form - SPELL_CLAW_RAGE_HASTE = 42583, + SPELL_CLAW_RAGE_HASTE = 42583, // Charges a random target and applies dummy effect 43149 on it SPELL_CLAW_RAGE_TRIGGER = 43149, - SPELL_CLAW_RAGE_DAMAGE = 43150, - SPELL_LYNX_RUSH_HASTE = 43152, - SPELL_LYNX_RUSH_DAMAGE = 43153, + SPELL_LYNX_RUSH_HASTE = 43152, // Charges 9 targets in a row - Dummy effect should apply 43153 // Dragonhawk Form SPELL_FLAME_WHIRL = 43213, //trigger two spells SPELL_FLAME_BREATH = 43215, SPELL_SUMMON_PILLAR = 43216, //summon 24187 - CREATURE_COLUMN_OF_FIRE = 24187, + NPC_COLUMN_OF_FIRE = 24187, SPELL_PILLAR_TRIGGER = 43218, //trigger 43217 // Cosmetic - SPELL_SPIRIT_AURA = 42466, - SPELL_SIPHON_SOUL = 43501, + SPELL_SPIRIT_DRAINED = 42520, + SPELL_SPIRIT_DRAIN = 42542, // Transforms SPELL_SHAPE_OF_THE_BEAR = 42594, @@ -79,34 +80,89 @@ enum SPELL_SHAPE_OF_THE_LYNX = 42607, SPELL_SHAPE_OF_THE_DRAGONHAWK = 42608, - SPELL_BERSERK = 45078, + SPELL_BERSERK = 45078, // Berserk timer or existance is unk - WEAPON_ID = 33975, + MAX_VORTEXES = 4, + POINT_ID_CENTER = 0, PHASE_BEAR = 0, PHASE_EAGLE = 1, PHASE_LYNX = 2, PHASE_DRAGONHAWK = 3, - PHASE_TROLL = 4 + PHASE_TROLL = 4, +}; + +struct BossPhase +{ + uint32 uiSpiritSpellId, uiYellId, uiEmoteId, uiSpiritId; + uint8 uiPhase; +}; + +static const BossPhase aZuljinPhases[] = +{ + {SPELL_SHAPE_OF_THE_BEAR, SAY_BEAR_TRANSFORM, EMOTE_BEAR_SPIRIT, NPC_BEAR_SPIRIT, PHASE_BEAR}, + {SPELL_SHAPE_OF_THE_EAGLE, SAY_EAGLE_TRANSFORM, EMOTE_EAGLE_SPIRIT, NPC_EAGLE_SPIRIT, PHASE_EAGLE}, + {SPELL_SHAPE_OF_THE_LYNX, SAY_LYNX_TRANSFORM, EMOTE_LYNX_SPIRIT, NPC_LYNX_SPIRIT, PHASE_LYNX}, + {SPELL_SHAPE_OF_THE_DRAGONHAWK, SAY_DRAGONHAWK_TRANSFORM, EMOTE_DRAGONHAWK_SPIRIT, NPC_DRAGONHAWK_SPIRIT, PHASE_DRAGONHAWK} }; //coords for going for changing form -const float CENTER_X = 120.148811f; -const float CENTER_Y = 703.713684f; -const float CENTER_Z = 45.111477f; +static const float fZuljinMoveLoc[3] = {120.148811f, 703.713684f, 45.111477f}; struct MANGOS_DLL_DECL boss_zuljinAI : public ScriptedAI { boss_zuljinAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bHasTaunted = false; Reset(); } ScriptedInstance* m_pInstance; + uint8 m_uiPhase; + uint8 m_uiHealthCheck; + + uint32 m_uiWhirlwindTimer; + uint32 m_uiGrievousThrowTimer; + + uint32 m_uiParalysisTimer; + uint32 m_uiOverpowerTimer; + + uint32 m_uiClawRageTimer; + uint32 m_uiLynxRushTimer; + + uint32 m_uiFlameWhirlTimer; + uint32 m_uiFlameBreathTimer; + uint32 m_uiPillarOfFireTimer; + + bool m_bHasTaunted; + bool m_bIsInTransition; + uint32 m_uiTransformTimer; + + GUIDList m_lSummonsList; + void Reset() { + m_uiHealthCheck = 80; + m_uiPhase = PHASE_TROLL; + + m_uiWhirlwindTimer = 7000; + m_uiGrievousThrowTimer = 8000; + + m_uiParalysisTimer = 7000; + m_uiOverpowerTimer = 5000; + + m_uiClawRageTimer = 5000; + m_uiLynxRushTimer = 14000; + + m_uiFlameWhirlTimer = 7000; + m_uiFlameBreathTimer = 15000; + m_uiPillarOfFireTimer = 7000; + + m_bIsInTransition = false; + + SetCombatMovement(true); } void Aggro(Unit* pWho) @@ -121,6 +177,19 @@ struct MANGOS_DLL_DECL boss_zuljinAI : public ScriptedAI { if (m_pInstance) m_pInstance->SetData(TYPE_ZULJIN, FAIL); + + // Despawn all feather vortexes + DoDespawnVortexes(); + + // Reset all spirits + for (uint8 i = 0; i < MAX_VORTEXES; ++i) + { + if (Creature* pSpirit = m_pInstance->GetSingleCreatureFromStorage(aZuljinPhases[i].uiSpiritId)) + { + pSpirit->SetStandState(UNIT_STAND_STATE_STAND); + pSpirit->AI()->EnterEvadeMode(); + } + } } void KilledUnit(Unit* pVictim) @@ -138,11 +207,213 @@ struct MANGOS_DLL_DECL boss_zuljinAI : public ScriptedAI m_pInstance->SetData(TYPE_ZULJIN, DONE); } - void UpdateAI(const uint32 diff) + void MoveInLineOfSight(Unit* pWho) + { + if (!m_bHasTaunted && m_creature->IsWithinDistInMap(pWho, 60.0f)) + { + DoScriptText(SAY_INTRO, m_creature); + m_bHasTaunted = true; + } + + ScriptedAI::MoveInLineOfSight(pWho); + } + + void DoDespawnVortexes() + { + for (GUIDList::const_iterator itr = m_lSummonsList.begin(); itr != m_lSummonsList.end(); ++itr) + { + if (Creature* pVortex = m_creature->GetMap()->GetCreature(*itr)) + pVortex->ForcedDespawn(); + } + } + + void JustSummoned(Creature* pSummoned) + { + switch(pSummoned->GetEntry()) + { + case NPC_FEATHER_VORTEX: + pSummoned->CastSpell(pSummoned, SPELL_CYCLONE_VISUAL, true); + pSummoned->CastSpell(pSummoned, SPELL_CYCLONE_PASSIVE, true); + m_lSummonsList.push_back(pSummoned->GetObjectGuid()); + if (m_creature->getVictim()) + pSummoned->AI()->AttackStart(m_creature->getVictim()); + break; + case NPC_COLUMN_OF_FIRE: + pSummoned->CastSpell(pSummoned, SPELL_PILLAR_TRIGGER, true); + break; + } + } + + void MovementInform(uint32 uiMotionType, uint32 uiPointId) + { + if (uiMotionType != POINT_MOTION_TYPE || uiPointId != POINT_ID_CENTER) + return; + + // increment phase + if (m_uiPhase == PHASE_TROLL) + m_uiPhase = PHASE_BEAR; + else + ++m_uiPhase; + + // drain the spirit + if (Creature* pSpirit = m_pInstance->GetSingleCreatureFromStorage(aZuljinPhases[m_uiPhase].uiSpiritId)) + pSpirit->CastSpell(m_creature, SPELL_SPIRIT_DRAIN, false); + } + + void SpellHit(Unit* pCaster, const SpellEntry* pSpell) + { + if (pSpell->Id == SPELL_SPIRIT_DRAIN) + { + DoCastSpellIfCan(m_creature, aZuljinPhases[m_uiPhase].uiSpiritSpellId); + DoScriptText(aZuljinPhases[m_uiPhase].uiYellId, m_creature); + DoScriptText(aZuljinPhases[m_uiPhase].uiEmoteId, m_creature); + + // in eagle phase we don't move + if (m_uiPhase != PHASE_EAGLE) + { + SetCombatMovement(true); + if (m_creature->getVictim()) + { + m_creature->GetMotionMaster()->Clear(); + m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); + } + } + // In Eagle phase we just cast Energy storm and summon 4 Feather cyclones; Boss doesn't move in this phase + else + { + DoCastSpellIfCan(m_creature, SPELL_ENERGY_STORM, CAST_TRIGGERED); + + // summon 4 vortexes + for (uint8 i = 0; i < MAX_VORTEXES; ++i) + DoCastSpellIfCan(m_creature, SPELL_SUMMON_CYCLONE, CAST_TRIGGERED); + } + + m_bIsInTransition = false; + } + } + + void UpdateAI(const uint32 uiDiff) { - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim() || m_bIsInTransition) return; + if (m_creature->GetHealthPercent() < m_uiHealthCheck) + { + m_uiHealthCheck -= 20; + m_bIsInTransition = true; + + SetCombatMovement(false); + m_creature->GetMotionMaster()->MovePoint(POINT_ID_CENTER, fZuljinMoveLoc[0], fZuljinMoveLoc[1], fZuljinMoveLoc[2]); + + // Despawn vortexes and remvoe the energy storm after eagle phase is complete + if (m_uiPhase == PHASE_EAGLE) + { + m_creature->RemoveAurasDueToSpell(SPELL_ENERGY_STORM); + DoDespawnVortexes(); + } + + // Reset threat + DoResetThreat(); + + // don't do this after troll phase + if (m_uiPhase != PHASE_TROLL) + { + if (m_creature->HasAura(aZuljinPhases[m_uiPhase].uiSpiritSpellId)) + m_creature->RemoveAurasDueToSpell(aZuljinPhases[m_uiPhase].uiSpiritSpellId); + + // drain spirit + if (Creature* pSpirit = m_pInstance->GetSingleCreatureFromStorage(aZuljinPhases[m_uiPhase].uiSpiritId)) + { + pSpirit->InterruptNonMeleeSpells(false); + pSpirit->CastSpell(m_creature, SPELL_SPIRIT_DRAINED, false); + pSpirit->SetStandState(UNIT_STAND_STATE_DEAD); + } + } + } + + switch (m_uiPhase) + { + case PHASE_TROLL: + + if(m_uiWhirlwindTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_WHIRLWIND) == CAST_OK) + m_uiWhirlwindTimer = urand(15000, 20000); + } + else + m_uiWhirlwindTimer -= uiDiff; + + if(m_uiGrievousThrowTimer < uiDiff) + { + if(Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, SPELL_GRIEVOUS_THROW) == CAST_OK) + m_uiGrievousThrowTimer = 10000; + } + } + else + m_uiGrievousThrowTimer -= uiDiff; + + break; + case PHASE_BEAR: + + if(m_uiParalysisTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_CREEPING_PARALYSIS) == CAST_OK) + m_uiParalysisTimer = 27000; + } + else + m_uiParalysisTimer -= uiDiff; + + if(m_uiOverpowerTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_OVERPOWER) == CAST_OK) + m_uiOverpowerTimer = urand(12000, 16000); + } + else + m_uiOverpowerTimer -= uiDiff; + + break; + case PHASE_EAGLE: + // Nothing here; Spells casted just once at the beginning of the phase; + break; + case PHASE_LYNX: + // ToDo: Note for further development of this phase! + // In this phase the boss used two melee spells: SPELL_CLAW_RAGE_HASTE and SPELL_LYNX_RUSH_HASTE + // However the way these spells are used and what are their mechanics and timers is highly unknown + break; + case PHASE_DRAGONHAWK: + + if(m_uiFlameWhirlTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_FLAME_WHIRL) == CAST_OK) + m_uiFlameWhirlTimer = 15000; + } + else + m_uiFlameWhirlTimer -= uiDiff; + + if(m_uiPillarOfFireTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_SUMMON_PILLAR) == CAST_OK) + m_uiPillarOfFireTimer = urand(17000, 22000); + } + else + m_uiPillarOfFireTimer -= uiDiff; + + if(m_uiFlameBreathTimer < uiDiff) + { + if(Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(m_creature, SPELL_FLAME_BREATH) == CAST_OK) + m_uiFlameBreathTimer = 15000; + } + } + else + m_uiFlameBreathTimer -= uiDiff; + + break; + } + DoMeleeAttackIfReady(); } }; @@ -154,9 +425,10 @@ CreatureAI* GetAI_boss_zuljin(Creature* pCreature) void AddSC_boss_zuljin() { - Script *newscript; - newscript = new Script; - newscript->Name = "boss_zuljin"; - newscript->GetAI = &GetAI_boss_zuljin; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_zuljin"; + pNewScript->GetAI = &GetAI_boss_zuljin; + pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/zulaman/instance_zulaman.cpp b/scripts/eastern_kingdoms/zulaman/instance_zulaman.cpp index 24e80b21b..a6645af6e 100644 --- a/scripts/eastern_kingdoms/zulaman/instance_zulaman.cpp +++ b/scripts/eastern_kingdoms/zulaman/instance_zulaman.cpp @@ -61,6 +61,10 @@ void instance_zulaman::OnCreatureCreate(Creature* pCreature) case NPC_MALACRASS: case NPC_HARRISON: case NPC_SPIRIT_LYNX: + case NPC_BEAR_SPIRIT: + case NPC_EAGLE_SPIRIT: + case NPC_LYNX_SPIRIT: + case NPC_DRAGONHAWK_SPIRIT: m_mNpcEntryGuidStore[pCreature->GetEntry()] = pCreature->GetObjectGuid(); break; diff --git a/scripts/eastern_kingdoms/zulaman/zulaman.h b/scripts/eastern_kingdoms/zulaman/zulaman.h index b4587492c..68ce92acf 100644 --- a/scripts/eastern_kingdoms/zulaman/zulaman.h +++ b/scripts/eastern_kingdoms/zulaman/zulaman.h @@ -65,6 +65,11 @@ enum InstanceZA NPC_ASHIL_CORPSE = 24441, NPC_HARKOR_CORPSE = 24443, + NPC_BEAR_SPIRIT = 23878, // They should all have aura 42466 + NPC_EAGLE_SPIRIT = 23880, + NPC_LYNX_SPIRIT = 23877, + NPC_DRAGONHAWK_SPIRIT = 23879, + GO_STRANGE_GONG = 187359, GO_MASSIVE_GATE = 186728, GO_WIND_DOOR = 186858, diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 3f413f033..b1c69a4fa 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2285" + #define SD2_REVISION_NR "2284" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 8e6a55a3b..997466552 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -2350,7 +2350,12 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1568079,'Suit yourself. At least five of you must assist me if we\'re to get inside. Follow me.',0,1,0,0,'harrison SAY_START'), (-1568080,'According to my calculations, if enough of us bang the gong at once the seal on these doors will break and we can enter.',0,1,0,0,'harrison SAY_AT_GONG'), -(-1568081,'I\'ve researched this site extensively and I won\'t allow any dim-witted treasure hunters to swoop in and steal what belongs to in a museum. I\'ll lead this charge.',0,1,0,0,'harrison SAY_OPEN_ENTRANCE'); +(-1568081,'I\'ve researched this site extensively and I won\'t allow any dim-witted treasure hunters to swoop in and steal what belongs to in a museum. I\'ll lead this charge.',0,1,0,0,'harrison SAY_OPEN_ENTRANCE'), + +(-1568082,'%s absorbs the essence of the bear spirit!',0,2,0,0,'zuljin EMOTE_BEAR_SPIRIT'), +(-1568083,'%s absorbs the essence of the eagle spirit!',0,2,0,0,'zuljin EMOTE_EAGLE_SPIRIT'), +(-1568084,'%s absorbs the essence of the lynx spirit!',0,2,0,0,'zuljin EMOTE_LYNX_SPIRIT'), +(-1568085,'%s absorbs the essence of the dragonhawk spirit!',0,2,0,0,'zuljin EMOTE_DRAGONHAWK_SPIRIT'); -- -1 574 000 UTGARDE KEEP INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES diff --git a/sql/updates/r2284_scriptdev2.sql b/sql/updates/r2284_scriptdev2.sql new file mode 100644 index 000000000..fe4c2f731 --- /dev/null +++ b/sql/updates/r2284_scriptdev2.sql @@ -0,0 +1,6 @@ +DELETE FROM script_texts WHERE entry IN (-1568082,-1568083,-1568084,-1568085); +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1568082,'%s absorbs the essence of the bear spirit!',0,2,0,0,'zuljin EMOTE_BEAR_SPIRIT'), +(-1568083,'%s absorbs the essence of the eagle spirit!',0,2,0,0,'zuljin EMOTE_EAGLE_SPIRIT'), +(-1568084,'%s absorbs the essence of the lynx spirit!',0,2,0,0,'zuljin EMOTE_LYNX_SPIRIT'), +(-1568085,'%s absorbs the essence of the dragonhawk spirit!',0,2,0,0,'zuljin EMOTE_DRAGONHAWK_SPIRIT'); \ No newline at end of file From b9121671345a6fb3ef1c75ef0f8511a9d6a42e30 Mon Sep 17 00:00:00 2001 From: Klark20 Date: Fri, 2 Sep 2011 00:05:07 +0200 Subject: [PATCH 0267/1172] [2286] Remove Gossip script for Npc Ishanah Signed-off-by: Schmoozerd --- scripts/outland/shattrath_city.cpp | 35 ------------------------------ sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 - sql/updates/r2286_mangos.sql | 1 + 4 files changed, 2 insertions(+), 37 deletions(-) create mode 100644 sql/updates/r2286_mangos.sql diff --git a/scripts/outland/shattrath_city.cpp b/scripts/outland/shattrath_city.cpp index 6f834e437..82ec1f032 100644 --- a/scripts/outland/shattrath_city.cpp +++ b/scripts/outland/shattrath_city.cpp @@ -258,35 +258,6 @@ CreatureAI* GetAI_npc_dirty_larry(Creature* pCreature) return new npc_dirty_larryAI(pCreature); } -/*###### -## npc_ishanah -######*/ - -#define GOSSIP_ISHANAH_1 "Who are the Sha'tar?" -#define GOSSIP_ISHANAH_2 "Isn't Shattrath a draenei city? Why do you allow others here?" - -bool GossipHello_npc_ishanah(Player* pPlayer, Creature* pCreature) -{ - if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); - - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ISHANAH_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ISHANAH_2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); - - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); - return true; -} - -bool GossipSelect_npc_ishanah(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) -{ - if (uiAction == GOSSIP_ACTION_INFO_DEF+1) - pPlayer->SEND_GOSSIP_MENU(9458, pCreature->GetObjectGuid()); - else if (uiAction == GOSSIP_ACTION_INFO_DEF+2) - pPlayer->SEND_GOSSIP_MENU(9459, pCreature->GetObjectGuid()); - - return true; -} - /*###### ## npc_khadgar ######*/ @@ -865,12 +836,6 @@ void AddSC_shattrath_city() newscript->pGossipSelect = &GossipSelect_npc_dirty_larry; newscript->RegisterSelf(); - newscript = new Script; - newscript->Name = "npc_ishanah"; - newscript->pGossipHello = &GossipHello_npc_ishanah; - newscript->pGossipSelect = &GossipSelect_npc_ishanah; - newscript->RegisterSelf(); - newscript = new Script; newscript->Name = "npc_khadgar"; newscript->pGossipHello = &GossipHello_npc_khadgar; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index b1c69a4fa..3cf8de38a 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2284" + #define SD2_REVISION_NR "2286" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index f7d19261b..8820330c5 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -998,7 +998,6 @@ UPDATE gameobject_template SET ScriptName='go_crystal_prison' WHERE entry=185126 /* SHATTRATH */ UPDATE creature_template SET ScriptName='npc_dirty_larry' WHERE entry=19720; -UPDATE creature_template SET ScriptName='npc_ishanah' WHERE entry=18538; UPDATE creature_template SET ScriptName='npc_khadgar' WHERE entry=18166; UPDATE creature_template SET ScriptName='npc_khadgars_servant' WHERE entry=19685; UPDATE creature_template SET ScriptName='npc_raliq_the_drunk' WHERE entry=18585; diff --git a/sql/updates/r2286_mangos.sql b/sql/updates/r2286_mangos.sql new file mode 100644 index 000000000..3fc888726 --- /dev/null +++ b/sql/updates/r2286_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='' WHERE entry=18538; From c05a3a4bea2ded97b765db18ff93256857c6ce91 Mon Sep 17 00:00:00 2001 From: Klark20 Date: Mon, 6 Jun 2011 12:57:51 +0200 Subject: [PATCH 0268/1172] [2287] Remove gossip for npc The Lump Signed-off-by: Klark20 --- scripts/outland/nagrand.cpp | 69 ++++++------------------------------- sd2_revision_nr.h | 2 +- 2 files changed, 11 insertions(+), 60 deletions(-) diff --git a/scripts/outland/nagrand.cpp b/scripts/outland/nagrand.cpp index 17377e268..e6f3082e8 100644 --- a/scripts/outland/nagrand.cpp +++ b/scripts/outland/nagrand.cpp @@ -34,24 +34,15 @@ EndContentData */ #include "escort_ai.h" /*###### -## mob_lump - TODO: remove gossip, can be done in database +## mob_lump ######*/ enum { - QUEST_NOT_ON_MY_WATCH = 9918, - NPC_LUMPS_QUEST_CREDIT = 18354, - SAY_LUMP_AGGRO_1 = -1000190, SAY_LUMP_AGGRO_2 = -1000191, SAY_LUMP_DEFEAT = -1000192, - TEXT_ID_LUMP_1 = 9352, - TEXT_ID_LUMP_2 = 9353, - TEXT_ID_LUMP_3 = 9354, - TEXT_ID_LUMP_4 = 9355, - TEXT_ID_LUMP_5 = 9356, - SPELL_VISUAL_SLEEP = 16093, SPELL_SPEAR_THROW = 32248, @@ -94,23 +85,19 @@ struct MANGOS_DLL_DECL mob_lumpAI : public ScriptedAI { if (m_creature->GetHealth() < uiDamage || (m_creature->GetHealth() - uiDamage)*100 / m_creature->GetMaxHealth() < 30) { - Player* pPlayer = pDealer->GetCharmerOrOwnerPlayerOrPlayerItself(); - if (!m_bReset && pPlayer && pPlayer->GetQuestStatus(QUEST_NOT_ON_MY_WATCH) == QUEST_STATUS_INCOMPLETE) - { - uiDamage = 0; //Take 0 damage + uiDamage = 0; //Take 0 damage - m_creature->RemoveAllAuras(); - m_creature->DeleteThreatList(); - m_creature->CombatStop(true); + m_creature->RemoveAllAuras(); + m_creature->DeleteThreatList(); + m_creature->CombatStop(true); - // should get unit_flags UNIT_FLAG_OOC_NOT_ATTACKABLE | UNIT_FLAG_PASSIVE at faction change, but unclear why/for what reason, skipped (no flags expected as default) - m_creature->setFaction(FACTION_FRIENDLY); + // should get unit_flags UNIT_FLAG_OOC_NOT_ATTACKABLE | UNIT_FLAG_PASSIVE at faction change, but unclear why/for what reason, skipped (no flags expected as default) + m_creature->setFaction(FACTION_FRIENDLY); - m_creature->SetStandState(UNIT_STAND_STATE_SIT); - DoScriptText(SAY_LUMP_DEFEAT, m_creature, pPlayer); + m_creature->SetStandState(UNIT_STAND_STATE_SIT); + DoScriptText(SAY_LUMP_DEFEAT, m_creature); - m_bReset = true; - } + m_bReset = true; } } @@ -161,40 +148,6 @@ CreatureAI* GetAI_mob_lump(Creature* pCreature) return new mob_lumpAI(pCreature); } -bool GossipHello_mob_lump(Player* pPlayer, Creature* pCreature) -{ - if (pPlayer->GetQuestStatus(QUEST_NOT_ON_MY_WATCH) == QUEST_STATUS_INCOMPLETE) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "I need answers, ogre!", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF); - - pPlayer->SEND_GOSSIP_MENU(TEXT_ID_LUMP_1, pCreature->GetObjectGuid()); - - return true; -} - -bool GossipSelect_mob_lump(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) -{ - switch(uiAction) - { - case GOSSIP_ACTION_INFO_DEF: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Why are Boulderfist out this far? You know that this is Kurenai territory.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); - pPlayer->SEND_GOSSIP_MENU(TEXT_ID_LUMP_2, pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF + 1: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "And you think you can just eat anything you want? You're obviously trying to eat the Broken of Telaar.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); - pPlayer->SEND_GOSSIP_MENU(TEXT_ID_LUMP_3, pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF + 2: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "This means war, Lump! War I say!", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); - pPlayer->SEND_GOSSIP_MENU(TEXT_ID_LUMP_4, pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF + 3: - pPlayer->SEND_GOSSIP_MENU(TEXT_ID_LUMP_5, pCreature->GetObjectGuid()); - pPlayer->TalkedToCreature(NPC_LUMPS_QUEST_CREDIT, pCreature->GetObjectGuid()); - break; - } - return true; -} - /*###### ## npc_altruis_the_sufferer ######*/ @@ -641,8 +594,6 @@ void AddSC_nagrand() pNewScript = new Script; pNewScript->Name = "mob_lump"; pNewScript->GetAI = &GetAI_mob_lump; - pNewScript->pGossipHello = &GossipHello_mob_lump; - pNewScript->pGossipSelect = &GossipSelect_mob_lump; pNewScript->RegisterSelf(); pNewScript = new Script; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 3cf8de38a..43bff2bf9 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2286" + #define SD2_REVISION_NR "2287" #endif // __SD2_REVISION_NR_H__ From 2bda452f2f3b0689402e52cbef4b88a184420902 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Wed, 21 Sep 2011 23:36:44 +0300 Subject: [PATCH 0269/1172] [2288] Implement abilities for Hex Lord Malacrass Spell 43501 - Siphon Soul - requires core support --- .../zulaman/boss_malacrass.cpp | 308 ++++++++++++++---- sd2_revision_nr.h | 2 +- 2 files changed, 254 insertions(+), 56 deletions(-) diff --git a/scripts/eastern_kingdoms/zulaman/boss_malacrass.cpp b/scripts/eastern_kingdoms/zulaman/boss_malacrass.cpp index 2cb398200..5a4114649 100644 --- a/scripts/eastern_kingdoms/zulaman/boss_malacrass.cpp +++ b/scripts/eastern_kingdoms/zulaman/boss_malacrass.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: Boss_Malacrass -SD%Complete: 10 -SDComment: Contain adds and adds selection +SD%Complete: 70 +SDComment: Contain adds and adds selection; Stolen abilities timers need improvement SDCategory: Zul'Aman EndScriptData */ @@ -38,15 +38,22 @@ enum SAY_ADD_DIED3 = -1568054, SAY_DEATH = -1568055, + /* Notes about the event: + * The boss casts siphon soul right after he finishes the spirit bolts channel, which takes 10 sec + * The siphon soul is a channeled spell for 30 sec during which the boss uses some class abilities of the target + * Basically the boss casts a dummy spell which chooses a random target on which it casts the actuall channel spell + * The drain power spell acts as a enrage timer. It's cast each 30 seconds after the boss' health is below 80% + */ SPELL_SPIRIT_BOLTS = 43383, + SPELL_SIPHON_SOUL_DUMMY = 43498, SPELL_SIPHON_SOUL = 43501, SPELL_DRAIN_POWER = 44131, //for various powers he uses after using soul drain //Death Knight SPELL_DK_DEATH_AND_DECAY = 61603, - SPELL_DK_PLAGUE_STRIKE = 61606, - SPELL_DK_MARK_OF_BLOOD = 61600, + SPELL_DK_PLAGUE_STRIKE = 61600, + SPELL_DK_MARK_OF_BLOOD = 61606, //Druid SPELL_DR_THORNS = 43420, @@ -98,7 +105,11 @@ enum SPELL_WR_SPELL_REFLECT = 43443, //misc - //WEAPON_ID = 33494, //weapon equip id, must be set by database. + TARGET_TYPE_RANDOM = 0, + TARGET_TYPE_VICTIM = 1, + TARGET_TYPE_SELF = 2, + TARGET_TYPE_FRIENDLY = 3, + MAX_ACTIVE_ADDS = 4 }; @@ -123,6 +134,76 @@ SpawnGroup m_auiSpawnEntry[] = {24246, 24247}, //Darkheart / Koragg }; +struct PlayerAbilityStruct +{ + uint32 m_uiSpellId; + uint8 m_uiTargetType; + uint32 m_uiInitialTimer, m_uiCooldown; +}; + +// Classes are in the same order as they are in DBC +static PlayerAbilityStruct m_aMalacrassStolenAbility[][4] = +{ + { // 0* shadow priest - exception: it seems that the priest has two specs. We use this slot for the shadow priest + {SPELL_PR_MIND_CONTROL, TARGET_TYPE_RANDOM, 15000, 30000}, + {SPELL_PR_MIND_BLAST, TARGET_TYPE_RANDOM, 23000, 30000}, + {SPELL_PR_SW_DEATH, TARGET_TYPE_RANDOM, 5000, 16000} + }, + { // 1 warrior + {SPELL_WR_SPELL_REFLECT, TARGET_TYPE_SELF, 2000, 30000}, + {SPELL_WR_WHIRLWIND, TARGET_TYPE_SELF, 10000, 30000}, + {SPELL_WR_MORTAL_STRIKE, TARGET_TYPE_VICTIM, 6000, 15000} + }, + { // 2 paladin + {SPELL_PA_CONSECRATION, TARGET_TYPE_SELF, 10000, 30000}, + {SPELL_PA_HOLY_LIGHT, TARGET_TYPE_FRIENDLY, 17000, 30000}, + {SPELL_PA_AVENGING_WRATH, TARGET_TYPE_SELF, 0, 30000} + }, + { // 3 hunter + {SPELL_HU_EXPLOSIVE_TRAP, TARGET_TYPE_SELF, 12000, 30000}, + {SPELL_HU_FREEZING_TRAP, TARGET_TYPE_SELF, 3000, 30000}, + {SPELL_HU_SNAKE_TRAP, TARGET_TYPE_SELF, 21000, 30000} + }, + { // 4 rogue + {SPELL_RO_WOUND_POISON, TARGET_TYPE_VICTIM, 3000, 17000}, + {SPELL_RO_SLICE_DICE, TARGET_TYPE_SELF, 17000, 30000}, + {SPELL_RO_BLIND, TARGET_TYPE_RANDOM, 12000, 30000} + }, + { // 5 priest + {SPELL_PR_PAIN_SUPP, TARGET_TYPE_FRIENDLY, 24000, 30000}, + {SPELL_PR_HEAL, TARGET_TYPE_FRIENDLY, 16000, 30000}, + {SPELL_PR_PSYCHIC_SCREAM, TARGET_TYPE_RANDOM, 8000, 30000} + }, + { // 6 death knight + {SPELL_DK_DEATH_AND_DECAY, TARGET_TYPE_RANDOM, 25000, 30000}, + {SPELL_DK_PLAGUE_STRIKE, TARGET_TYPE_VICTIM, 5000, 17000}, + {SPELL_DK_MARK_OF_BLOOD, TARGET_TYPE_RANDOM, 14000, 30000} + }, + { // 7 shaman + {SPELL_SH_FIRE_NOVA, TARGET_TYPE_SELF, 25000, 30000}, + {SPELL_SH_HEALING_WAVE, TARGET_TYPE_FRIENDLY, 15000, 30000}, + {SPELL_SH_CHAIN_LIGHT, TARGET_TYPE_RANDOM, 4000, 16000} + }, + { // 8 mage + {SPELL_MG_FIREBALL, TARGET_TYPE_RANDOM, 8000, 30000}, + {SPELL_MG_FROSTBOLT, TARGET_TYPE_RANDOM, 25000, 30000}, + {SPELL_MG_ICE_LANCE, TARGET_TYPE_RANDOM, 2000, 18000}, + {SPELL_MG_FROST_NOVA, TARGET_TYPE_SELF, 17000, 30000} + }, + { // 9 warlock + {SPELL_WL_CURSE_OF_DOOM, TARGET_TYPE_RANDOM, 0, 30000}, + {SPELL_WL_RAIN_OF_FIRE, TARGET_TYPE_RANDOM, 16000, 30000}, + {SPELL_WL_UNSTABLE_AFFL, TARGET_TYPE_RANDOM, 8000, 13000} + }, + { // 10 unused - no class in DBC here + }, + { // 11 druid + {SPELL_DR_LIFEBLOOM, TARGET_TYPE_FRIENDLY, 15000, 30000}, + {SPELL_DR_THORNS, TARGET_TYPE_SELF, 0, 30000}, + {SPELL_DR_MOONFIRE, TARGET_TYPE_RANDOM, 8000, 13000} + } +}; + struct MANGOS_DLL_DECL boss_malacrassAI : public ScriptedAI { boss_malacrassAI(Creature* pCreature) : ScriptedAI(pCreature) @@ -134,17 +215,29 @@ struct MANGOS_DLL_DECL boss_malacrassAI : public ScriptedAI ScriptedInstance* m_pInstance; + uint32 m_uiSpiritBoltsTimer; + uint32 m_uiDrainPowerTimer; + uint32 m_uiSiphonSoulTimer; + uint32 m_uiPlayerAbilityTimer; + uint8 m_uiPlayerClass; + + bool m_bCanUsePlayerSpell; + + std::vector m_vPlayerSpellTimer; std::list m_lAddsEntryList; ObjectGuid m_aAddGuid[MAX_ACTIVE_ADDS]; void Reset() { - InitializeAdds(); + m_uiSpiritBoltsTimer = 30000; + m_uiDrainPowerTimer = 0; + m_uiSiphonSoulTimer = 40000; + m_uiPlayerAbilityTimer = 10000; + m_uiPlayerClass = 0; - if (!m_pInstance) - return; + m_bCanUsePlayerSpell = false; - m_pInstance->SetData(TYPE_MALACRASS, NOT_STARTED); + InitializeAdds(); } void JustReachedHome() @@ -242,6 +335,28 @@ struct MANGOS_DLL_DECL boss_malacrassAI : public ScriptedAI m_pInstance->SetData(TYPE_MALACRASS, DONE); } + void SpellHitTarget(Unit* pTarget, const SpellEntry* pSpell) + { + // Set the player's class when hit with soul siphon + if (pTarget->GetTypeId() == TYPEID_PLAYER && pSpell->Id == SPELL_SIPHON_SOUL) + { + m_uiPlayerClass = ((Player*)pTarget)->getClass(); + m_bCanUsePlayerSpell = true; + + // In case the player it's priest we can choose either a holy priest or a shadow priest + if (m_uiPlayerClass == CLASS_PRIEST) + m_uiPlayerClass = urand(0, 1) ? CLASS_PRIEST : 0; + + // Init the spell timers + uint8 m_uiMaxSpells = m_uiPlayerClass == CLASS_MAGE ? 4 : 3; + + m_vPlayerSpellTimer.clear(); + m_vPlayerSpellTimer.reserve(m_uiMaxSpells); + for (uint8 i = 0; i < m_uiMaxSpells; ++i) + m_vPlayerSpellTimer.push_back(m_aMalacrassStolenAbility[m_uiPlayerClass][i].m_uiInitialTimer); + } + } + void CleanAdds() { for(uint8 i = 0; i < MAX_ACTIVE_ADDS; ++i) @@ -259,11 +374,94 @@ struct MANGOS_DLL_DECL boss_malacrassAI : public ScriptedAI m_lAddsEntryList.clear(); } + bool CanUseSpecialAbility(uint32 uiSpellIndex) + { + Unit* pTarget = NULL; + + switch(m_aMalacrassStolenAbility[m_uiPlayerClass][uiSpellIndex].m_uiTargetType) + { + case TARGET_TYPE_SELF: + pTarget = m_creature; + break; + case TARGET_TYPE_VICTIM: + pTarget = m_creature->getVictim(); + break; + case TARGET_TYPE_RANDOM: + pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0); + break; + case TARGET_TYPE_FRIENDLY: + pTarget = DoSelectLowestHpFriendly(50.0f); + break; + } + + if (pTarget) + { + if (DoCastSpellIfCan(pTarget, m_aMalacrassStolenAbility[m_uiPlayerClass][uiSpellIndex].m_uiSpellId, CAST_TRIGGERED) == CAST_OK) + return true; + } + + return false; + } + void UpdateAI(const uint32 uiDiff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; + // Acts as an enrage timer + if (m_creature->GetHealthPercent() < 80.0f) + { + if (m_uiDrainPowerTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_DRAIN_POWER) == CAST_OK) + { + DoScriptText(SAY_DRAIN_POWER, m_creature); + m_uiDrainPowerTimer = 30000; + } + } + else + m_uiDrainPowerTimer -= uiDiff; + } + + if (m_uiSpiritBoltsTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_SPIRIT_BOLTS) == CAST_OK) + { + DoScriptText(SAY_SPIRIT_BOLTS, m_creature); + m_bCanUsePlayerSpell = false; + m_uiSpiritBoltsTimer = 40000; + } + } + else + m_uiSpiritBoltsTimer -= uiDiff; + + if (m_uiSiphonSoulTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_SIPHON_SOUL_DUMMY) == CAST_OK) + { + DoScriptText(SAY_SOUL_SIPHON, m_creature); + m_uiSiphonSoulTimer = 40000; + } + } + else + m_uiSiphonSoulTimer -= uiDiff; + + // Use abilities only during the siphon soul phases + if (m_bCanUsePlayerSpell) + { + // Loop through all abilities + for (uint8 i = 0; i < m_vPlayerSpellTimer.size(); ++i) + { + if (m_vPlayerSpellTimer[i] < uiDiff) + { + if (CanUseSpecialAbility(i)) + m_vPlayerSpellTimer[i] = m_aMalacrassStolenAbility[m_uiPlayerClass][i].m_uiCooldown; + } + else + m_vPlayerSpellTimer[i] -= uiDiff; + } + } + DoMeleeAttackIfReady(); } }; @@ -817,50 +1015,50 @@ CreatureAI* GetAI_mob_koragg(Creature* pCreature) void AddSC_boss_malacrass() { - Script* newscript; - - newscript = new Script; - newscript->Name = "boss_malacrass"; - newscript->GetAI = &GetAI_boss_malacrass; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "mob_thurg"; - newscript->GetAI = &GetAI_mob_thurg; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "mob_gazakroth"; - newscript->GetAI = &GetAI_mob_gazakroth; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "mob_lord_raadan"; - newscript->GetAI = &GetAI_mob_lord_raadan; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "mob_darkheart"; - newscript->GetAI = &GetAI_mob_darkheart; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "mob_slither"; - newscript->GetAI = &GetAI_mob_slither; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "mob_fenstalker"; - newscript->GetAI = &GetAI_mob_fenstalker; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "mob_koragg"; - newscript->GetAI = &GetAI_mob_koragg; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "mob_alyson_antille"; - newscript->GetAI = &GetAI_mob_alyson_antille; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_malacrass"; + pNewScript->GetAI = &GetAI_boss_malacrass; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "mob_thurg"; + pNewScript->GetAI = &GetAI_mob_thurg; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "mob_gazakroth"; + pNewScript->GetAI = &GetAI_mob_gazakroth; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "mob_lord_raadan"; + pNewScript->GetAI = &GetAI_mob_lord_raadan; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "mob_darkheart"; + pNewScript->GetAI = &GetAI_mob_darkheart; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "mob_slither"; + pNewScript->GetAI = &GetAI_mob_slither; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "mob_fenstalker"; + pNewScript->GetAI = &GetAI_mob_fenstalker; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "mob_koragg"; + pNewScript->GetAI = &GetAI_mob_koragg; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "mob_alyson_antille"; + pNewScript->GetAI = &GetAI_mob_alyson_antille; + pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 43bff2bf9..e945a9a6b 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2287" + #define SD2_REVISION_NR "2288" #endif // __SD2_REVISION_NR_H__ From 1276f7847bc8074508a75690962cec587b69bac5 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Fri, 23 Sep 2011 01:31:25 +0300 Subject: [PATCH 0270/1172] [2289] Implement quest 8736 - The Nightmare Manifests * The Phantasm Shade summon event has a lot of guesswork inside * Fly effect for Eranikus is disabled due to the impossibility to cancel the effect * Thanks to Nitka for providing the original patch and Patman for providing the HD video recording --- scripts/kalimdor/moonglade.cpp | 846 ++++++++++++++++++++++++++++++- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 2 + sql/scriptdev2_script_full.sql | 77 ++- sql/updates/r2289_mangos.sql | 2 + sql/updates/r2289_scriptdev2.sql | 76 +++ 6 files changed, 976 insertions(+), 29 deletions(-) create mode 100644 sql/updates/r2289_mangos.sql create mode 100644 sql/updates/r2289_scriptdev2.sql diff --git a/scripts/kalimdor/moonglade.cpp b/scripts/kalimdor/moonglade.cpp index a71f583fe..7f982e884 100644 --- a/scripts/kalimdor/moonglade.cpp +++ b/scripts/kalimdor/moonglade.cpp @@ -17,7 +17,7 @@ /* ScriptData SDName: Moonglade SD%Complete: 100 -SDComment: Quest support: 30, 272, 5929, 5930, 10965. Special Flight Paths for Druid class. +SDComment: Quest support: 30, 272, 5929, 5930, 8736, 10965. Special Flight Paths for Druid class. SDCategory: Moonglade EndScriptData */ @@ -26,6 +26,8 @@ npc_bunthen_plainswind npc_clintar_dw_spirit npc_great_bear_spirit npc_silva_filnaveth +npc_keeper_remulos +boss_eranikus EndContentData */ #include "precompiled.h" @@ -330,34 +332,824 @@ bool GossipSelect_npc_silva_filnaveth(Player* pPlayer, Creature* pCreature, uint } /*###### -## +## npc_keeper_remulos ######*/ +enum +{ + SPELL_CONJURE_RIFT = 25813, // summon Eranikus + SPELL_HEALING_TOUCH = 23381, + SPELL_REGROWTH = 20665, + SPELL_REJUVENATION = 20664, + SPELL_STARFIRE = 21668, + SPELL_ERANIKUS_REDEEMED = 25846, // transform Eranikus + //SPELL_MOONGLADE_TRANQUILITY = unk, // spell which acts as a spotlight over Eranikus after he is redeemed + + NPC_ERANIKUS_TYRANT = 15491, + NPC_NIGHTMARE_PHANTASM = 15629, // shadows summoned during the event - should cast 17228 and 21307 + NPC_REMULOS = 11832, + NPC_TYRANDE_WHISPERWIND = 15633, // appears with the priestess during the event to help the players - should cast healing spells + NPC_ELUNE_PRIESTESS = 15634, + + QUEST_NIGHTMARE_MANIFESTS = 8736, + + // yells -> in cronological order + SAY_REMULOS_INTRO_1 = -1000669, // remulos intro + SAY_REMULOS_INTRO_2 = -1000670, + SAY_REMULOS_INTRO_3 = -1000671, + SAY_REMULOS_INTRO_4 = -1000672, + SAY_REMULOS_INTRO_5 = -1000673, + + EMOTE_SUMMON_ERANIKUS = -1000674, // eranikus spawn - world emote + SAY_ERANIKUS_SPAWN = -1000675, + + SAY_REMULOS_TAUNT_1 = -1000676, // eranikus and remulos chat + EMOTE_ERANIKUS_LAUGH = -1000677, + SAY_ERANIKUS_TAUNT_2 = -1000678, + SAY_REMULOS_TAUNT_3 = -1000679, + SAY_ERANIKUS_TAUNT_4 = -1000680, + + EMOTE_ERANIKUS_ATTACK = -1000681, // start attack + SAY_REMULOS_DEFEND_1 = -1000682, + SAY_REMULOS_DEFEND_2 = -1000683, + SAY_ERANIKUS_SHADOWS = -1000684, + SAY_REMULOS_DEFEND_3 = -1000685, + SAY_ERANIKUS_ATTACK_1 = -1000686, + SAY_ERANIKUS_ATTACK_2 = -1000687, + SAY_ERANIKUS_ATTACK_3 = -1000688, + SAY_ERANIKUS_KILL = -1000706, + + SAY_TYRANDE_APPEAR = -1000689, // Tyrande appears + SAY_TYRANDE_HEAL = -1000690, // yelled by tyrande when healing is needed + SAY_TYRANDE_FORGIVEN_1 = -1000691, + SAY_TYRANDE_FORGIVEN_2 = -1000692, + SAY_TYRANDE_FORGIVEN_3 = -1000693, + SAY_ERANIKUS_DEFEAT_1 = -1000694, + SAY_ERANIKUS_DEFEAT_2 = -1000695, + SAY_ERANIKUS_DEFEAT_3 = -1000696, + EMOTE_ERANIKUS_REDEEM = -1000697, // world emote before WotLK + + EMOTE_TYRANDE_KNEEL = -1000698, + SAY_TYRANDE_REDEEMED = -1000699, + + SAY_REDEEMED_1 = -1000700, // eranikus redeemed + SAY_REDEEMED_2 = -1000701, + SAY_REDEEMED_3 = -1000702, + SAY_REDEEMED_4 = -1000703, + + SAY_REMULOS_OUTRO_1 = -1000704, // remulos outro + SAY_REMULOS_OUTRO_2 = -1000705, + + POINT_ID_ERANIKUS_FLIGHT = 0, + POINT_ID_ERANIKUS_COMBAT = 1, + POINT_ID_ERANIKUS_REDEEMED = 2, + + MAX_SHADOWS = 3, // the max shadows summoned per turn + MAX_SUMMON_TURNS = 10, // There are about 10 summoned shade waves +}; + +struct EventLocations +{ + float m_fX, m_fY, m_fZ, m_fO; +}; + +static EventLocations aEranikusLocations[] = +{ + {7881.72f, -2651.23f, 493.29f, 0.40f}, // eranikus spawn loc + {7929.86f, -2574.88f, 505.35f}, // eranikus flight move loc + {7912.98f, -2568.99f, 488.71f}, // eranikus combat move loc + {7906.57f, -2565.63f, 488.39f}, // eranikus redeemed loc +}; + +static EventLocations aTyrandeLocations[] = +{ + // Tyrande should appear along the pathway, but because of the missing pathfinding we'll summon here closer to Eranikus + {7948.89f, -2575.58f, 490.05f, 3.03f}, // tyrande spawn loc + {7888.32f, -2566.25f, 487.02f}, // tyrande heal loc + {7901.83f, -2565.24f, 488.04f}, // tyrande eranikus loc +}; + +static EventLocations aShadowsLocations[] = +{ + // Inside the house shades - first wave only + {7832.78f, -2604.57f, 489.29f}, + {7826.68f, -2538.46f, 489.30f}, + {7811.48f, -2573.20f, 488.49f}, + // Outside shade points - basically only the first set of coords is used for the summoning; there is no solid proof of using the other coords + {7888.32f, -2566.25f, 487.02f}, + {7946.12f, -2577.10f, 489.97f}, + {7963.00f, -2492.03f, 487.84f} +}; + +struct MANGOS_DLL_DECL npc_keeper_remulosAI : public npc_escortAI +{ + npc_keeper_remulosAI(Creature* pCreature) : npc_escortAI(pCreature) { Reset(); } + + uint32 m_uiHealTimer; + uint32 m_uiStarfireTimer; + uint32 m_uiShadesummonTimer; + uint32 m_uiOutroTimer; + + ObjectGuid m_eranikusGuid; + + uint8 m_uiOutroPhase; + uint8 m_uiSummonCount; + + bool m_bIsFirstWave; + + void Reset() + { + if (!HasEscortState(STATE_ESCORT_ESCORTING)) + { + m_uiOutroTimer = 0; + m_uiOutroPhase = 0; + m_uiSummonCount = 0; + + m_eranikusGuid.Clear(); + + m_uiShadesummonTimer = 0; + m_uiHealTimer = 10000; + m_uiStarfireTimer = 25000; + + m_bIsFirstWave = true; + } + } + + void JustSummoned(Creature* pSummoned) + { + switch(pSummoned->GetEntry()) + { + case NPC_ERANIKUS_TYRANT: + m_eranikusGuid = pSummoned->GetObjectGuid(); + // Make Eranikus unattackable first + // ToDo: uncomment the fly effect when it will be possible to cancel it properly + //pSummoned->SetByteValue(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_UNK_2); + pSummoned->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + pSummoned->SetLevitate(true); + break; + case NPC_NIGHTMARE_PHANTASM: + // ToDo: set faction to DB + pSummoned->setFaction(14); + pSummoned->AI()->AttackStart(m_creature); + break; + } + } + + void SummonedMovementInform(Creature* pSummoned, uint32 uiType, uint32 uiPointId) + { + if (uiType != POINT_MOTION_TYPE || pSummoned->GetEntry() != NPC_ERANIKUS_TYRANT) + return; + + switch(uiPointId) + { + case POINT_ID_ERANIKUS_FLIGHT: + // Set Eranikus to face Remulos + pSummoned->SetFacingToObject(m_creature); + break; + case POINT_ID_ERANIKUS_COMBAT: + // Start attack + pSummoned->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + pSummoned->AI()->AttackStart(m_creature); + DoScriptText(SAY_ERANIKUS_ATTACK_2, pSummoned); + break; + } + } + + void JustDied(Unit* pKiller) + { + // Make Eranikus evade in order to despawn all the summons + if (Creature* pEranikus = m_creature->GetMap()->GetCreature(m_eranikusGuid)) + pEranikus->AI()->EnterEvadeMode(); + + npc_escortAI::JustDied(pKiller); + } + + void WaypointReached(uint32 uiPointId) + { + switch(uiPointId) + { + case 0: + if (Player* pPlayer = GetPlayerForEscort()) + DoScriptText(SAY_REMULOS_INTRO_1, m_creature, pPlayer); + break; + case 1: + DoScriptText(SAY_REMULOS_INTRO_2, m_creature); + break; + case 13: + if (Player* pPlayer = GetPlayerForEscort()) + DoScriptText(SAY_REMULOS_INTRO_3, m_creature, pPlayer); + break; + case 14: + DoScriptText(SAY_REMULOS_INTRO_4, m_creature); + break; + case 15: + DoScriptText(SAY_REMULOS_INTRO_5, m_creature); + break; + case 16: + DoCastSpellIfCan(m_creature, SPELL_CONJURE_RIFT); + break; + case 17: + if (Creature* pEranikus = m_creature->GetMap()->GetCreature(m_eranikusGuid)) + { + // This big yellow emote was removed at some point in WotLK + //DoScriptText(EMOTE_SUMMON_ERANIKUS, pEranikus); + DoScriptText(SAY_ERANIKUS_SPAWN, pEranikus); + } + break; + case 18: + DoScriptText(SAY_REMULOS_TAUNT_1, m_creature); + break; + case 19: + if (Creature* pEranikus = m_creature->GetMap()->GetCreature(m_eranikusGuid)) + DoScriptText(EMOTE_ERANIKUS_LAUGH, pEranikus); + break; + case 20: + if (Creature* pEranikus = m_creature->GetMap()->GetCreature(m_eranikusGuid)) + DoScriptText(SAY_ERANIKUS_TAUNT_2, pEranikus); + break; + case 21: + DoScriptText(SAY_REMULOS_TAUNT_3, m_creature); + break; + case 22: + if (Creature* pEranikus = m_creature->GetMap()->GetCreature(m_eranikusGuid)) + DoScriptText(SAY_ERANIKUS_TAUNT_4, pEranikus); + break; + case 23: + if (Creature* pEranikus = m_creature->GetMap()->GetCreature(m_eranikusGuid)) + DoScriptText(EMOTE_ERANIKUS_ATTACK, pEranikus); + break; + case 24: + if (Player* pPlayer = GetPlayerForEscort()) + DoScriptText(SAY_REMULOS_DEFEND_1, m_creature, pPlayer); + if (Creature* pEranikus = m_creature->GetMap()->GetCreature(m_eranikusGuid)) + pEranikus->GetMotionMaster()->MovePoint(POINT_ID_ERANIKUS_FLIGHT, aEranikusLocations[1].m_fX, aEranikusLocations[1].m_fY, aEranikusLocations[1].m_fZ); + break; + case 28: + DoScriptText(SAY_REMULOS_DEFEND_2, m_creature); + if (Creature* pEranikus = m_creature->GetMap()->GetCreature(m_eranikusGuid)) + m_creature->SetFacingToObject(pEranikus); + break; + case 29: + if (Creature* pEranikus = m_creature->GetMap()->GetCreature(m_eranikusGuid)) + DoScriptText(SAY_ERANIKUS_SHADOWS, pEranikus); + break; + case 30: + DoScriptText(SAY_REMULOS_DEFEND_3, m_creature); + SetEscortPaused(true); + m_uiShadesummonTimer = 5000; + break; + case 31: + SetEscortPaused(true); + break; + } + } + + void DoHandleOutro(Creature* pTarget) + { + if (Player* pPlayer = GetPlayerForEscort()) + pPlayer->GroupEventHappens(QUEST_NIGHTMARE_MANIFESTS, pTarget); + + m_uiOutroTimer = 3000; + } + + void UpdateEscortAI(const uint32 uiDiff) + { + if (m_uiOutroTimer) + { + if (m_uiOutroTimer <= uiDiff) + { + switch(m_uiOutroPhase) + { + case 0: + DoScriptText(SAY_REMULOS_OUTRO_1, m_creature); + m_uiOutroTimer = 3000; + break; + case 1: + // Despawn Remulos after the outro is finished - he will respawn automatically at his home position after a few min + DoScriptText(SAY_REMULOS_OUTRO_2, m_creature); + m_creature->SetRespawnDelay(1*MINUTE); + m_creature->ForcedDespawn(3000); + m_uiOutroTimer = 0; + break; + } + ++m_uiOutroPhase; + } + else + m_uiOutroTimer -= uiDiff; + } + + // during the battle + if (m_uiShadesummonTimer) + { + if (m_uiShadesummonTimer <= uiDiff) + { + // do this yell only first time + if (m_bIsFirstWave) + { + // summon 3 shades inside the house + for (uint8 i = 0; i < MAX_SHADOWS; ++i) + m_creature->SummonCreature(NPC_NIGHTMARE_PHANTASM, aShadowsLocations[i].m_fX, aShadowsLocations[i].m_fY, aShadowsLocations[i].m_fZ, 0,TEMPSUMMON_DEAD_DESPAWN, 0); + + if (Creature* pEranikus = m_creature->GetMap()->GetCreature(m_eranikusGuid)) + DoScriptText(SAY_ERANIKUS_ATTACK_1, pEranikus); + + ++m_uiSummonCount; + SetEscortPaused(false); + m_bIsFirstWave = false; + } + + // Summon 3 shades per turn until the maximum summon turns are reached + float fX, fY, fZ; + // Randomize the summon point + uint8 uiSummonPoint = roll_chance_i(70) ? MAX_SHADOWS : urand(MAX_SHADOWS + 1, MAX_SHADOWS + 2); + + if (m_uiSummonCount < MAX_SUMMON_TURNS) + { + for (uint8 i = 0; i < MAX_SHADOWS; ++i) + { + m_creature->GetRandomPoint(aShadowsLocations[uiSummonPoint].m_fX, aShadowsLocations[uiSummonPoint].m_fY, aShadowsLocations[uiSummonPoint].m_fZ, 10.0f, fX, fY, fZ); + m_creature->SummonCreature(NPC_NIGHTMARE_PHANTASM, fX, fY, fZ, 0.0f, TEMPSUMMON_DEAD_DESPAWN, 0); + } + + ++m_uiSummonCount; + } + + // If all the shades were summoned then set Eranikus in combat + // We don't count the dead shades, because the boss is usually set in combat before all shades are dead + if (m_uiSummonCount == MAX_SUMMON_TURNS) + { + m_uiShadesummonTimer = 0; + + if (Creature* pEranikus = m_creature->GetMap()->GetCreature(m_eranikusGuid)) + { + pEranikus->SetByteFlag(UNIT_FIELD_BYTES_1, 3, 0); + pEranikus->SetLevitate(false); + pEranikus->GetMotionMaster()->MovePoint(POINT_ID_ERANIKUS_COMBAT, aEranikusLocations[2].m_fX, aEranikusLocations[2].m_fY, aEranikusLocations[2].m_fZ); + } + } + else + m_uiShadesummonTimer = urand(20000, 30000); + } + else + m_uiShadesummonTimer -= uiDiff; + } + + // Combat spells + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_uiHealTimer < uiDiff) + { + if (Unit* pTarget = DoSelectLowestHpFriendly(DEFAULT_VISIBILITY_DISTANCE)) + { + switch(urand(0, 2)) + { + case 0: DoCastSpellIfCan(pTarget, SPELL_HEALING_TOUCH); break; + case 1: DoCastSpellIfCan(pTarget, SPELL_REJUVENATION); break; + case 2: DoCastSpellIfCan(pTarget, SPELL_REGROWTH); break; + } + } + m_uiHealTimer = 10000; + } + else + m_uiHealTimer -= uiDiff; + + if (m_uiStarfireTimer < uiDiff) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, SPELL_STARFIRE) == CAST_OK) + m_uiStarfireTimer = 20000; + } + } + else + m_uiStarfireTimer -= uiDiff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_npc_keeper_remulos(Creature* pCreature) +{ + return new npc_keeper_remulosAI(pCreature); +} + +bool QuestAccept_npc_keeper_remulos(Player* pPlayer, Creature* pCreature, const Quest* pQuest) +{ + if (pQuest->GetQuestId() == QUEST_NIGHTMARE_MANIFESTS) + { + if (npc_keeper_remulosAI* pEscortAI = dynamic_cast(pCreature->AI())) + pEscortAI->Start(true, pPlayer, pQuest); + + return true; + } + + // Return false for other quests in order to handle DB scripts. Example: quest 8447 + return false; +} + +bool EffectDummyCreature_conjure_rift(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) +{ + //always check spellid and effectindex + if (uiSpellId == SPELL_CONJURE_RIFT && uiEffIndex == EFFECT_INDEX_0) + { + pCaster->SummonCreature(NPC_ERANIKUS_TYRANT, aEranikusLocations[0].m_fX, aEranikusLocations[0].m_fY, aEranikusLocations[0].m_fZ, aEranikusLocations[0].m_fO, TEMPSUMMON_DEAD_DESPAWN, 0); + + //always return true when we are handling this spell and effect + return true; + } + + return false; +} + +/*###### +## boss_eranikus +######*/ + +enum +{ + NPC_KEEPER_REMULOS = 11832, + + SPELL_ACID_BREATH = 24839, + SPELL_NOXIOUS_BREATH = 24818, + SPELL_SHADOWBOLT_VOLLEY = 25586, + SPELL_ARCANE_CHANNELING = 23017, // used by Tyrande - not sure if it's the right id + + FACTION_FRIENDLY = 35, + MAX_PRIESTESS = 7, + + POINT_ID_TYRANDE_HEAL = 0, + POINT_ID_TYRANDE_ABSOLUTION = 1, +}; + +struct MANGOS_DLL_DECL boss_eranikusAI : public ScriptedAI +{ + boss_eranikusAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } + + uint32 m_uiAcidBreathTimer; + uint32 m_uiNoxiousBreathTimer; + uint32 m_uiShadowboltVolleyTimer; + uint32 m_uiEventTimer; + uint32 m_uiTyrandeMoveTimer; + + uint8 m_uiEventPhase; + uint8 m_uiTyrandeMovePoint; + uint8 m_uiHealthCheck; + + ObjectGuid m_remulosGuid; + ObjectGuid m_tyrandeGuid; + GUIDList m_lPriestessList; + + void Reset() + { + m_uiAcidBreathTimer = 10000; + m_uiNoxiousBreathTimer = 3000; + m_uiShadowboltVolleyTimer = 5000; + m_uiTyrandeMoveTimer = 0; + + m_remulosGuid.Clear(); + m_tyrandeGuid.Clear(); + + m_uiHealthCheck = 85; + m_uiEventPhase = 0; + m_uiEventTimer = 0; + + // For some reason the boss doesn't move in combat + SetCombatMovement(false); + } + + void EnterEvadeMode() + { + if (m_creature->GetHealthPercent() < 20.0f) + { + m_creature->RemoveAllAuras(); + m_creature->DeleteThreatList(); + m_creature->CombatStop(true); + m_creature->LoadCreatureAddon(); + + m_creature->SetLootRecipient(NULL); + + // Get Remulos guid and make him stop summoning shades + if (Creature* pRemulos = GetClosestCreatureWithEntry(m_creature, NPC_REMULOS, 50.0f)) + { + m_remulosGuid = pRemulos->GetObjectGuid(); + pRemulos->AI()->EnterEvadeMode(); + } + + // Despawn the priestess + DoDespawnSummoned(); + + // redeem eranikus + m_uiEventTimer = 5000; + m_creature->setFaction(FACTION_FRIENDLY); + } + else + { + // There may be a core issue related to the reached home function for summoned creatures so we are cleaning things up here + // if the creature evades while the event is in progress then we despawn all the summoned, including himself + m_creature->ForcedDespawn(); + DoDespawnSummoned(); + + if (Creature* pTyrande = m_creature->GetMap()->GetCreature(m_tyrandeGuid)) + pTyrande->ForcedDespawn(); + } + } + + void KilledUnit(Unit* pVictim) + { + if (pVictim->GetTypeId() != TYPEID_PLAYER) + return; + + DoScriptText(SAY_ERANIKUS_KILL, m_creature); + } + + void DoSummonHealers() + { + float fX, fY, fZ; + for (uint8 j = 0; j < MAX_PRIESTESS; ++j) + { + m_creature->GetRandomPoint(aTyrandeLocations[0].m_fX, aTyrandeLocations[0].m_fY, aTyrandeLocations[0].m_fZ, 10.0f, fX, fY, fZ); + m_creature->SummonCreature(NPC_ELUNE_PRIESTESS, fX, fY, fZ, 0.0f, TEMPSUMMON_CORPSE_DESPAWN, 0); + } + } + + void JustSummoned(Creature* pSummoned) + { + switch(pSummoned->GetEntry()) + { + case NPC_TYRANDE_WHISPERWIND: + m_tyrandeGuid = pSummoned->GetObjectGuid(); + pSummoned->SetWalk(false); + pSummoned->GetMotionMaster()->MovePoint(POINT_ID_TYRANDE_HEAL, aTyrandeLocations[1].m_fX, aTyrandeLocations[1].m_fY, aTyrandeLocations[1].m_fZ); + break; + case NPC_ELUNE_PRIESTESS: + m_lPriestessList.push_back(pSummoned->GetObjectGuid()); + float fX, fY, fZ; + pSummoned->SetWalk(false); + m_creature->GetRandomPoint(aTyrandeLocations[1].m_fX, aTyrandeLocations[1].m_fY, aTyrandeLocations[1].m_fZ, 10.0f, fX, fY, fZ); + pSummoned->GetMotionMaster()->MovePoint(POINT_ID_TYRANDE_HEAL, fX, fY, fZ); + break; + } + } + + void DoDespawnSummoned() + { + for(GUIDList::const_iterator itr = m_lPriestessList.begin(); itr != m_lPriestessList.end(); ++itr) + { + if (Creature* pTemp = m_creature->GetMap()->GetCreature(*itr)) + pTemp->ForcedDespawn(); + } + } + + void SummonedMovementInform(Creature* pSummoned, uint32 uiType, uint32 uiPointId) + { + if (uiType != POINT_MOTION_TYPE) + return; + + switch(uiPointId) + { + case POINT_ID_TYRANDE_HEAL: + if (pSummoned->GetEntry() == NPC_TYRANDE_WHISPERWIND) + { + // Unmont, yell and prepare to channel the spell on Eranikus + DoScriptText(SAY_TYRANDE_HEAL, pSummoned); + pSummoned->Unmount(); + m_uiTyrandeMoveTimer = 5000; + } + // Unmount the priestess - unk what is their exact purpose (maybe healer) + else if (pSummoned->GetEntry() == NPC_ELUNE_PRIESTESS) + pSummoned->Unmount(); + break; + case POINT_ID_TYRANDE_ABSOLUTION: + if (pSummoned->GetEntry() == NPC_TYRANDE_WHISPERWIND) + { + pSummoned->CastSpell(pSummoned, SPELL_ARCANE_CHANNELING, false); + DoScriptText(SAY_TYRANDE_FORGIVEN_1, pSummoned); + } + break; + } + } + + void MovementInform(uint32 uiType, uint32 uiPointId) + { + if (uiType != POINT_MOTION_TYPE || uiPointId != POINT_ID_ERANIKUS_REDEEMED) + return; + + DoScriptText(SAY_REDEEMED_1, m_creature); + m_uiEventTimer = 11000; + } + + void UpdateAI(const uint32 uiDiff) + { + if (m_uiEventTimer) + { + if (m_uiEventTimer <= uiDiff) + { + switch(m_uiEventPhase) + { + case 0: + // Eranikus is redeemed - make Tyrande kneel and stop casting + if (Creature* pTyrande = m_creature->GetMap()->GetCreature(m_tyrandeGuid)) + { + pTyrande->InterruptNonMeleeSpells(false); + pTyrande->SetStandState(UNIT_STAND_STATE_KNEEL); + DoScriptText(EMOTE_TYRANDE_KNEEL, pTyrande); + } + if (Creature* pRemulos = m_creature->GetMap()->GetCreature(m_remulosGuid)) + pRemulos->SetFacingToObject(m_creature); + // Note: this emote was a world wide yellow emote before WotLK + DoScriptText(EMOTE_ERANIKUS_REDEEM, m_creature); + //DoCastSpellIfCan(m_creature, SPELL_MOONGLADE_TRANQUILITY); // spell id unk for the moment + m_creature->SetStandState(UNIT_STAND_STATE_DEAD); + m_uiEventTimer = 5000; + break; + case 1: + if (Creature* pTyrande = m_creature->GetMap()->GetCreature(m_tyrandeGuid)) + DoScriptText(SAY_TYRANDE_REDEEMED, pTyrande); + m_uiEventTimer = 6000; + break; + case 2: + // Transform Eranikus into elf + DoCastSpellIfCan(m_creature, SPELL_ERANIKUS_REDEEMED); + m_uiEventTimer = 5000; + break; + case 3: + // Move Eranikus in front of Tyrande + m_creature->SetStandState(UNIT_STAND_STATE_STAND); + m_creature->SetWalk(true); + m_creature->GetMotionMaster()->MovePoint(POINT_ID_ERANIKUS_REDEEMED, aEranikusLocations[3].m_fX, aEranikusLocations[3].m_fY, aEranikusLocations[3].m_fZ); + m_uiEventTimer = 0; + break; + case 4: + DoScriptText(SAY_REDEEMED_2, m_creature); + m_uiEventTimer = 11000; + break; + case 5: + DoScriptText(SAY_REDEEMED_3, m_creature); + m_uiEventTimer = 13000; + break; + case 6: + DoScriptText(SAY_REDEEMED_4, m_creature); + m_uiEventTimer = 7000; + break; + case 7: + // Complete Quest and end event + if (Creature* pTyrande = m_creature->GetMap()->GetCreature(m_tyrandeGuid)) + { + pTyrande->SetStandState(UNIT_STAND_STATE_STAND); + pTyrande->ForcedDespawn(9000); + } + if (Creature* pRemulos = m_creature->GetMap()->GetCreature(m_remulosGuid)) + ((npc_keeper_remulosAI*)pRemulos->AI())->DoHandleOutro(m_creature); + m_creature->HandleEmote(EMOTE_ONESHOT_BOW); + m_creature->ForcedDespawn(2000); + break; + } + ++m_uiEventPhase; + } + else + m_uiEventTimer -= uiDiff; + } + + // Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + // Move Tyrande after she is summoned + if (m_uiTyrandeMoveTimer) + { + if (m_uiTyrandeMoveTimer <= uiDiff) + { + if (Creature* pTyrande = m_creature->GetMap()->GetCreature(m_tyrandeGuid)) + pTyrande->GetMotionMaster()->MovePoint(POINT_ID_TYRANDE_ABSOLUTION, aTyrandeLocations[2].m_fX, aTyrandeLocations[2].m_fY, aTyrandeLocations[2].m_fZ); + m_uiTyrandeMoveTimer = 0; + } + else + m_uiTyrandeMoveTimer -= uiDiff; + } + + // Not sure if this should be handled by health percent, but this is the only reasonable way + if (m_creature->GetHealthPercent() < m_uiHealthCheck) + { + switch(m_uiHealthCheck) + { + case 85: + DoScriptText(SAY_ERANIKUS_ATTACK_3, m_creature); + // Here Tyrande only yells but she doesn't appear anywhere - we summon here for 1 second just to handle the yell + if (Creature* pTyrande = m_creature->SummonCreature(NPC_TYRANDE_WHISPERWIND, aTyrandeLocations[0].m_fX, aTyrandeLocations[0].m_fY, aTyrandeLocations[0].m_fZ, 0, TEMPSUMMON_TIMED_DESPAWN, 1000)) + DoScriptText(SAY_TYRANDE_APPEAR, pTyrande); + m_uiHealthCheck = 75; + break; + case 75: + // Eranikus yells again + DoScriptText(SAY_ERANIKUS_ATTACK_3, m_creature); + m_uiHealthCheck = 50; + break; + case 50: + // Summon Tyrande - she enters the fight this time + m_creature->SummonCreature(NPC_TYRANDE_WHISPERWIND, aTyrandeLocations[0].m_fX, aTyrandeLocations[0].m_fY, aTyrandeLocations[0].m_fZ, 0, TEMPSUMMON_CORPSE_DESPAWN, 0); + m_uiHealthCheck = 35; + break; + case 35: + // Summon the priestess + DoSummonHealers(); + DoScriptText(SAY_ERANIKUS_DEFEAT_1, m_creature); + m_uiHealthCheck = 31; + break; + case 31: + if (Creature* pTyrande = m_creature->GetMap()->GetCreature(m_tyrandeGuid)) + DoScriptText(SAY_TYRANDE_FORGIVEN_2, pTyrande); + m_uiHealthCheck = 27; + break; + case 27: + if (Creature* pTyrande = m_creature->GetMap()->GetCreature(m_tyrandeGuid)) + DoScriptText(SAY_TYRANDE_FORGIVEN_3, pTyrande); + m_uiHealthCheck = 25; + break; + case 25: + DoScriptText(SAY_ERANIKUS_DEFEAT_2, m_creature); + m_uiHealthCheck = 20; + break; + case 20: + // Eranikus is redeemed - stop the fight + DoScriptText(SAY_ERANIKUS_DEFEAT_3, m_creature); + m_creature->AI()->EnterEvadeMode(); + m_uiHealthCheck = 0; + break; + } + } + + // Combat spells + if (m_uiAcidBreathTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_ACID_BREATH) == CAST_OK) + m_uiAcidBreathTimer = 15000; + } + else + m_uiAcidBreathTimer -= uiDiff; + + if (m_uiNoxiousBreathTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_NOXIOUS_BREATH) == CAST_OK) + m_uiNoxiousBreathTimer = 30000; + } + else + m_uiNoxiousBreathTimer -= uiDiff; + + if (m_uiShadowboltVolleyTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_SHADOWBOLT_VOLLEY) == CAST_OK) + m_uiShadowboltVolleyTimer = 25000; + } + else + m_uiShadowboltVolleyTimer -= uiDiff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_eranikus(Creature* pCreature) +{ + return new boss_eranikusAI(pCreature); +} + void AddSC_moonglade() { - Script *newscript; - - newscript = new Script; - newscript->Name = "npc_bunthen_plainswind"; - newscript->pGossipHello = &GossipHello_npc_bunthen_plainswind; - newscript->pGossipSelect = &GossipSelect_npc_bunthen_plainswind; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_clintar_dw_spirit"; - newscript->GetAI = &GetAI_npc_clintar_dw_spirit; - newscript->pEffectDummyNPC = &EffectDummyCreature_npc_clintar_dw_spirit; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_great_bear_spirit"; - newscript->pGossipHello = &GossipHello_npc_great_bear_spirit; - newscript->pGossipSelect = &GossipSelect_npc_great_bear_spirit; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_silva_filnaveth"; - newscript->pGossipHello = &GossipHello_npc_silva_filnaveth; - newscript->pGossipSelect = &GossipSelect_npc_silva_filnaveth; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "npc_bunthen_plainswind"; + pNewScript->pGossipHello = &GossipHello_npc_bunthen_plainswind; + pNewScript->pGossipSelect = &GossipSelect_npc_bunthen_plainswind; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_clintar_dw_spirit"; + pNewScript->GetAI = &GetAI_npc_clintar_dw_spirit; + pNewScript->pEffectDummyNPC = &EffectDummyCreature_npc_clintar_dw_spirit; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_great_bear_spirit"; + pNewScript->pGossipHello = &GossipHello_npc_great_bear_spirit; + pNewScript->pGossipSelect = &GossipSelect_npc_great_bear_spirit; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_silva_filnaveth"; + pNewScript->pGossipHello = &GossipHello_npc_silva_filnaveth; + pNewScript->pGossipSelect = &GossipSelect_npc_silva_filnaveth; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_keeper_remulos"; + pNewScript->GetAI = &GetAI_npc_keeper_remulos; + pNewScript->pQuestAcceptNPC = &QuestAccept_npc_keeper_remulos; + pNewScript->pEffectDummyNPC = &EffectDummyCreature_conjure_rift; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "boss_eranikus"; + pNewScript->GetAI = &GetAI_boss_eranikus; + pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index e945a9a6b..bbd405415 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2288" + #define SD2_REVISION_NR "2289" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 8820330c5..8d95c69f5 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -817,6 +817,8 @@ UPDATE creature_template SET ScriptName='npc_bunthen_plainswind' WHERE entry=117 UPDATE creature_template SET ScriptName='npc_clintar_dw_spirit' WHERE entry=22916; UPDATE creature_template SET ScriptName='npc_great_bear_spirit' WHERE entry=11956; UPDATE creature_template SET ScriptName='npc_silva_filnaveth' WHERE entry=11800; +UPDATE creature_template SET ScriptName='npc_keeper_remulos' WHERE entry=11832; +UPDATE creature_template SET ScriptName='boss_eranikus' WHERE entry=15491; /* MULGORE */ UPDATE creature_template SET ScriptName='npc_kyle_the_frenzied' WHERE entry=23616; diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 997466552..6dbd46679 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -719,7 +719,46 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1000666,'I can sense the SHADOW on your hearts. There can be no rest for the wicked!',0,1,0,0,'lethon SAY_LETHON_AGGRO'), (-1000667,'Your wicked souls shall feed my power!',0,1,0,0,'lethon SAY_LETHON_SHADE'), -(-1000668,'%s releases the last of its energies into the nearby runestone, successfully reactivating it.',0,2,0,0,'infused crystal SAY_DEFENSE_FINISH'); +(-1000668,'%s releases the last of its energies into the nearby runestone, successfully reactivating it.',0,2,0,0,'infused crystal SAY_DEFENSE_FINISH'), + +(-1000669,'We will locate the origin of the Nightmare through the fragments you collected, $N. From there, we will pull Eranikus through a rift in the Dream. Steel yourself, $C. We are inviting the embodiment of the Nightmare into our world.',0,0,0,0,'remulos SAY_REMULOS_INTRO_1'), +(-1000670,'To Nighthaven! Keep your army close, champion. ',0,0,0,0,'remulos SAY_REMULOS_INTRO_2'), +(-1000671,'The rift will be opened there, above the Lake Elun\'ara. Prepare yourself, $N. Eranikus entry into our world will be wrought with chaos and strife.',0,0,0,0,'remulos SAY_REMULOS_INTRO_3'), +(-1000672,'He will stop at nothing to get to Malfurion\'s physical manifistation. That must not happen... We must keep the beast occupied long enough for Tyrande to arrive.',0,0,0,0,'remulos SAY_REMULOS_INTRO_4'), +(-1000673,'Defend Nightaven, hero...',0,0,0,0,'remulos SAY_REMULOS_INTRO_5'), +(-1000674,'%s has entered our world',0,3,0,0,'eranikus EMOTE_SUMMON_ERANIKUS'), +(-1000675,'Pitful predictable mortals... You know not what you have done! The master\'s will fulfilled. The Moonglade shall be destroyed and Malfurion along with it!',0,1,0,0,'eranikus SAY_ERANIKUS_SPAWN'), +(-1000676,'Fiend! Face the might of Cenarius!',0,1,0,1,'remulos SAY_REMULOS_TAUNT_1'), +(-1000677,'%s lets loose a sinister laugh.',0,2,0,0,'eranikus EMOTE_ERANIKUS_LAUGH'), +(-1000678,'You are certanly not your father, insect. Should it interest me, I would crush you with but a swipe of my claws. Turn Shan\'do Stormrage over to me and your pitiful life will be spared along with the lives of your people.',0,1,0,0,'eranikus SAY_ERANIKUS_TAUNT_2'), +(-1000679,'Who is the predictable one, beast? Surely you did not think that we would summon you on top of Malfurion? Your redemption comes, Eranikus. You will be cleansed of this madness - this corruption.',0,1,0,1,'remulos SAY_REMULOS_TAUNT_3'), +(-1000680,'My redemption? You are bold, little one. My redemption comes by the will of my god.',0,1,0,0,'eranikus SAY_ERANIKUS_TAUNT_4'), +(-1000681,'%s roars furiously.',0,2,0,0,'eranikus EMOTE_ERANIKUS_ATTACK'), +(-1000682,'Hurry, $N! We must find protective cover!',0,0,0,0,'remulos SAY_REMULOS_DEFEND_1'), +(-1000683,'Please, champion, protect our people.',0,0,0,1,'remulos SAY_REMULOS_DEFEND_2'), +(-1000684,'Rise, servants of the Nightmare! Rise and destroy this world! Let there be no survivors...',0,1,0,0,'eranikus SAY_ERANIKUS_SHADOWS'), +(-1000685,'We will battle these fiends, together! Nighthaven\'s Defenders are also among us. They will fight to the death if asked. Now, quickly, we must drive these aberations back to the Nightmare. Destroy them all!',0,0,0,1,'remulos SAY_REMULOS_DEFEND_3'), +(-1000686,'Where is your savior? How long can you hold out against my attacks?',0,1,0,0,'eranikus SAY_ERANIKUS_ATTACK_1'), +(-1000687,'Defeated my minions? Then face me, mortals!',0,1,0,0,'eranikus SAY_ERANIKUS_ATTACK_2'), +(-1000688,'Remulos, look how easy they fall before me? You can stop this, fool. Turn the druid over to me and it will all be over...',0,1,0,0,'eranikus SAY_ERANIKUS_ATTACK_3'), +(-1000689,'Elune, hear my prayers. Grant us serenity! Watch over our fallen...',0,1,0,0,'tyrande SAY_TYRANDE_APPEAR'), +(-1000690,'Tend to the injuries of the wounded, sisters!',0,0,0,0,'tyrande SAY_TYRANDE_HEAL'), +(-1000691,'Seek absolution, Eranikus. All will be forgiven...',0,1,0,0,'tyrande SAY_TYRANDE_FORGIVEN_1'), +(-1000692,'You will be forgiven, Eranikus. Elune will always love you. Break free of the bonds that command you!',0,1,0,0,'tyrande SAY_TYRANDE_FORGIVEN_2'), +(-1000693,'The grasp of the Old Gods is unmoving. He is consumed by their dark thoughts... I... I... I cannot... cannot channel much longer... Elune aide me.',0,0,0,0,'tyrande SAY_TYRANDE_FORGIVEN_3'), +(-1000694,'IT BURNS! THE PAIN.. SEARING...',0,1,0,0,'eranikus SAY_ERANIKUS_DEFEAT_1'), +(-1000695,'WHY? Why did this happen to... to me? Where were you Tyrande? Where were you when I fell from the grace of Elune?',0,1,0,0,'eranikus SAY_ERANIKUS_DEFEAT_2'), +(-1000696,'I... I feel... I feel the touch of Elune upon my being once more... She smiles upon me... Yes... I...', 0,1,0,0,'eranikus SAY_ERANIKUS_DEFEAT_3'), +(-1000697,'%s is wholly consumed by the Light of Elune. Tranquility sets in over the Moonglade',0,2,0,0,'eranikus EMOTE_ERANIKUS_REDEEM'), +(-1000698,'%s falls to one knee.',0,2,0,0,'tyrande EMOTE_TYRANDE_KNEEL'), +(-1000699,'Praise be to Elune... Eranikus is redeemed.',0,1,0,0,'tyrande SAY_TYRANDE_REDEEMED'), +(-1000700,'For so long, I was lost... The Nightmare\'s corruption had consumed me... And now, you... all of you.. you have saved me. Released me from its grasp.',0,0,0,0,'eranikus SAY_REDEEMED_1'), +(-1000701,'But... Malfurion, Cenarius, Ysera... They still fight. They need me. I must return to the Dream at once.', 0,0,0,0,'eranikus SAY_REDEEMED_2'), +(-1000702,'My lady, I am unworthy of your prayer. Truly, you are an angel of light. Please, assist me in returning to the barrow den so that I may return to the Dream. I like Malfurion, also have a love awaiting me... I must return to her... to protect her...', 0,0,0,0,'eranikus SAY_REDEEMED_3'), +(-1000703,'And heroes... I hold that which you seek. May it once more see the evil dissolved. Remulos, see to it that our champion receives the shard of the Green Flight.',0,0,0,0,'eranikus SAY_REDEEMED_4'), +(-1000704,'It will be done, Eranikus. Be well, ancient one.',0,0,0,0,'remulos SAY_REMULOS_OUTRO_1'), +(-1000705,'Let us leave Nighthave, hero. Seek me out at the grove.',0,0,0,0,'remulos SAY_REMULOS_OUTRO_2'), +(-1000706,'Your world shall suffer an unmerciful end. The Nightmare comes for you!',0,0,0,0,'eranikus SAY_ERANIKUS_KILL'); -- -1 033 000 SHADOWFANG KEEP INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES @@ -6047,4 +6086,40 @@ INSERT INTO script_waypoint VALUES (8516, 24,2575.60, 950.138, 52.8460, 0, ''), (8516, 25,2575.60, 950.138, 52.8460, 0, ''); +DELETE FROM script_waypoint WHERE entry=11832; +INSERT INTO script_waypoint VALUES +(11832, 0, 7848.385645, -2216.356670, 470.888333, 15000, 'SAY_REMULOS_INTRO_1'), +(11832, 1, 7848.385645, -2216.356670, 470.888333, 5000, 'SAY_REMULOS_INTRO_2'), +(11832, 2, 7829.785645, -2244.836670, 463.853333, 0, ''), +(11832, 3, 7819.010742, -2304.344238, 455.956726, 0, ''), +(11832, 4, 7931.099121, -2314.350830, 473.054047, 0, ''), +(11832, 5, 7943.553223, -2324.688721, 477.676819, 0, ''), +(11832, 6, 7952.017578, -2351.135010, 485.234924, 0, ''), +(11832, 7, 7963.672852, -2412.990967, 488.953369, 0, ''), +(11832, 8, 7975.178223, -2551.602051, 490.079926, 0, ''), +(11832, 9, 7948.046875, -2570.828613, 489.750732, 0, ''), +(11832, 10, 7947.161133, -2583.396729, 490.066284, 0, ''), +(11832, 11, 7951.086426, -2596.215088, 489.831268, 0, ''), +(11832, 12, 7948.267090, -2610.062988, 492.340424, 0, ''), +(11832, 13, 7928.521973, -2625.954346, 492.447540, 14000, 'SAY_REMULOS_INTRO_3'), +(11832, 14, 7928.521973, -2625.954346, 492.447540, 12000, 'SAY_REMULOS_INTRO_4'), +(11832, 15, 7928.521973, -2625.954346, 492.447540, 5000, 'SAY_REMULOS_INTRO_5'), +(11832, 16, 7928.521973, -2625.954346, 492.447540, 13000, 'SPELL_CONJURE_RIFT'), +(11832, 17, 7928.521973, -2625.954346, 492.447540, 11000, 'SAY_ERANIKUS_SPAWN'), +(11832, 18, 7928.521973, -2625.954346, 492.447540, 5000, 'SAY_REMULOS_TAUNT_1'), +(11832, 19, 7928.521973, -2625.954346, 492.447540, 3000, 'EMOTE_ERANIKUS_LAUGH'), +(11832, 20, 7928.521973, -2625.954346, 492.447540, 10000, 'SAY_ERANIKUS_TAUNT_2'), +(11832, 21, 7928.521973, -2625.954346, 492.447540, 12000, 'SAY_REMULOS_TAUNT_3'), +(11832, 22, 7928.521973, -2625.954346, 492.447540, 6000, 'SAY_ERANIKUS_TAUNT_4'), +(11832, 23, 7928.521973, -2625.954346, 492.447540, 7000, 'EMOTE_ERANIKUS_ATTACK'), +(11832, 24, 7928.521973, -2625.954346, 492.447540, 0, 'SAY_REMULOS_DEFEND_1 - eranikus flies up'), +(11832, 25, 7948.267090, -2610.062988, 492.340424, 0, ''), +(11832, 26, 7952.318848, -2594.118408, 490.070374, 0, ''), +(11832, 27, 7913.988770, -2567.002686, 488.330566, 0, ''), +(11832, 28, 7835.454102, -2571.099121, 489.289246, 6000, 'SAY_REMULOS_DEFEND_2'), +(11832, 29, 7835.454102, -2571.099121, 489.289246, 4000, 'SAY_ERANIKUS_SHADOWS'), +(11832, 30, 7835.454102, -2571.099121, 489.289246, 0, 'SAY_REMULOS_DEFEND_3 - escort paused'), +(11832, 31, 7897.283691, -2560.652344, 487.461304, 0, ''), +(11832, 32, 7897.283691, -2560.652344, 487.461304, 0, ''); + -- EOF diff --git a/sql/updates/r2289_mangos.sql b/sql/updates/r2289_mangos.sql new file mode 100644 index 000000000..eaad25349 --- /dev/null +++ b/sql/updates/r2289_mangos.sql @@ -0,0 +1,2 @@ +UPDATE creature_template SET ScriptName='npc_keeper_remulos' WHERE entry=11832; +UPDATE creature_template SET ScriptName='boss_eranikus' WHERE entry=15491; \ No newline at end of file diff --git a/sql/updates/r2289_scriptdev2.sql b/sql/updates/r2289_scriptdev2.sql new file mode 100644 index 000000000..a131a0c6e --- /dev/null +++ b/sql/updates/r2289_scriptdev2.sql @@ -0,0 +1,76 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1000706 AND -1000669; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1000669,'We will locate the origin of the Nightmare through the fragments you collected, $N. From there, we will pull Eranikus through a rift in the Dream. Steel yourself, $C. We are inviting the embodiment of the Nightmare into our world.',0,0,0,0,'remulos SAY_REMULOS_INTRO_1'), +(-1000670,'To Nighthaven! Keep your army close, champion. ',0,0,0,0,'remulos SAY_REMULOS_INTRO_2'), +(-1000671,'The rift will be opened there, above the Lake Elun\'ara. Prepare yourself, $N. Eranikus entry into our world will be wrought with chaos and strife.',0,0,0,0,'remulos SAY_REMULOS_INTRO_3'), +(-1000672,'He will stop at nothing to get to Malfurion\'s physical manifistation. That must not happen... We must keep the beast occupied long enough for Tyrande to arrive.',0,0,0,0,'remulos SAY_REMULOS_INTRO_4'), +(-1000673,'Defend Nightaven, hero...',0,0,0,0,'remulos SAY_REMULOS_INTRO_5'), +(-1000674,'%s has entered our world',0,3,0,0,'eranikus EMOTE_SUMMON_ERANIKUS'), +(-1000675,'Pitful predictable mortals... You know not what you have done! The master\'s will fulfilled. The Moonglade shall be destroyed and Malfurion along with it!',0,1,0,0,'eranikus SAY_ERANIKUS_SPAWN'), +(-1000676,'Fiend! Face the might of Cenarius!',0,1,0,1,'remulos SAY_REMULOS_TAUNT_1'), +(-1000677,'%s lets loose a sinister laugh.',0,2,0,0,'eranikus EMOTE_ERANIKUS_LAUGH'), +(-1000678,'You are certanly not your father, insect. Should it interest me, I would crush you with but a swipe of my claws. Turn Shan\'do Stormrage over to me and your pitiful life will be spared along with the lives of your people.',0,1,0,0,'eranikus SAY_ERANIKUS_TAUNT_2'), +(-1000679,'Who is the predictable one, beast? Surely you did not think that we would summon you on top of Malfurion? Your redemption comes, Eranikus. You will be cleansed of this madness - this corruption.',0,1,0,1,'remulos SAY_REMULOS_TAUNT_3'), +(-1000680,'My redemption? You are bold, little one. My redemption comes by the will of my god.',0,1,0,0,'eranikus SAY_ERANIKUS_TAUNT_4'), +(-1000681,'%s roars furiously.',0,2,0,0,'eranikus EMOTE_ERANIKUS_ATTACK'), +(-1000682,'Hurry, $N! We must find protective cover!',0,0,0,0,'remulos SAY_REMULOS_DEFEND_1'), +(-1000683,'Please, champion, protect our people.',0,0,0,1,'remulos SAY_REMULOS_DEFEND_2'), +(-1000684,'Rise, servants of the Nightmare! Rise and destroy this world! Let there be no survivors...',0,1,0,0,'eranikus SAY_ERANIKUS_SHADOWS'), +(-1000685,'We will battle these fiends, together! Nighthaven\'s Defenders are also among us. They will fight to the death if asked. Now, quickly, we must drive these aberations back to the Nightmare. Destroy them all!',0,0,0,1,'remulos SAY_REMULOS_DEFEND_3'), +(-1000686,'Where is your savior? How long can you hold out against my attacks?',0,1,0,0,'eranikus SAY_ERANIKUS_ATTACK_1'), +(-1000687,'Defeated my minions? Then face me, mortals!',0,1,0,0,'eranikus SAY_ERANIKUS_ATTACK_2'), +(-1000688,'Remulos, look how easy they fall before me? You can stop this, fool. Turn the druid over to me and it will all be over...',0,1,0,0,'eranikus SAY_ERANIKUS_ATTACK_3'), +(-1000689,'Elune, hear my prayers. Grant us serenity! Watch over our fallen...',0,1,0,0,'tyrande SAY_TYRANDE_APPEAR'), +(-1000690,'Tend to the injuries of the wounded, sisters!',0,0,0,0,'tyrande SAY_TYRANDE_HEAL'), +(-1000691,'Seek absolution, Eranikus. All will be forgiven...',0,1,0,0,'tyrande SAY_TYRANDE_FORGIVEN_1'), +(-1000692,'You will be forgiven, Eranikus. Elune will always love you. Break free of the bonds that command you!',0,1,0,0,'tyrande SAY_TYRANDE_FORGIVEN_2'), +(-1000693,'The grasp of the Old Gods is unmoving. He is consumed by their dark thoughts... I... I... I cannot... cannot channel much longer... Elune aide me.',0,0,0,0,'tyrande SAY_TYRANDE_FORGIVEN_3'), +(-1000694,'IT BURNS! THE PAIN.. SEARING...',0,1,0,0,'eranikus SAY_ERANIKUS_DEFEAT_1'), +(-1000695,'WHY? Why did this happen to... to me? Where were you Tyrande? Where were you when I fell from the grace of Elune?',0,1,0,0,'eranikus SAY_ERANIKUS_DEFEAT_2'), +(-1000696,'I... I feel... I feel the touch of Elune upon my being once more... She smiles upon me... Yes... I...', 0,1,0,0,'eranikus SAY_ERANIKUS_DEFEAT_3'), +(-1000697,'%s is wholly consumed by the Light of Elune. Tranquility sets in over the Moonglade',0,2,0,0,'eranikus EMOTE_ERANIKUS_REDEEM'), +(-1000698,'%s falls to one knee.',0,2,0,0,'tyrande EMOTE_TYRANDE_KNEEL'), +(-1000699,'Praise be to Elune... Eranikus is redeemed.',0,1,0,0,'tyrande SAY_TYRANDE_REDEEMED'), +(-1000700,'For so long, I was lost... The Nightmare\'s corruption had consumed me... And now, you... all of you.. you have saved me. Released me from its grasp.',0,0,0,0,'eranikus SAY_REDEEMED_1'), +(-1000701,'But... Malfurion, Cenarius, Ysera... They still fight. They need me. I must return to the Dream at once.', 0,0,0,0,'eranikus SAY_REDEEMED_2'), +(-1000702,'My lady, I am unworthy of your prayer. Truly, you are an angel of light. Please, assist me in returning to the barrow den so that I may return to the Dream. I like Malfurion, also have a love awaiting me... I must return to her... to protect her...', 0,0,0,0,'eranikus SAY_REDEEMED_3'), +(-1000703,'And heroes... I hold that which you seek. May it once more see the evil dissolved. Remulos, see to it that our champion receives the shard of the Green Flight.',0,0,0,0,'eranikus SAY_REDEEMED_4'), +(-1000704,'It will be done, Eranikus. Be well, ancient one.',0,0,0,0,'remulos SAY_REMULOS_OUTRO_1'), +(-1000705,'Let us leave Nighthave, hero. Seek me out at the grove.',0,0,0,0,'remulos SAY_REMULOS_OUTRO_2'), +(-1000706,'Your world shall suffer an unmerciful end. The Nightmare comes for you!',0,0,0,0,'eranikus SAY_ERANIKUS_KILL'); + +DELETE FROM script_waypoint WHERE entry=11832; +INSERT INTO script_waypoint VALUES +(11832, 0, 7848.385645, -2216.356670, 470.888333, 15000, 'SAY_REMULOS_INTRO_1'), +(11832, 1, 7848.385645, -2216.356670, 470.888333, 5000, 'SAY_REMULOS_INTRO_2'), +(11832, 2, 7829.785645, -2244.836670, 463.853333, 0, ''), +(11832, 3, 7819.010742, -2304.344238, 455.956726, 0, ''), +(11832, 4, 7931.099121, -2314.350830, 473.054047, 0, ''), +(11832, 5, 7943.553223, -2324.688721, 477.676819, 0, ''), +(11832, 6, 7952.017578, -2351.135010, 485.234924, 0, ''), +(11832, 7, 7963.672852, -2412.990967, 488.953369, 0, ''), +(11832, 8, 7975.178223, -2551.602051, 490.079926, 0, ''), +(11832, 9, 7948.046875, -2570.828613, 489.750732, 0, ''), +(11832, 10, 7947.161133, -2583.396729, 490.066284, 0, ''), +(11832, 11, 7951.086426, -2596.215088, 489.831268, 0, ''), +(11832, 12, 7948.267090, -2610.062988, 492.340424, 0, ''), +(11832, 13, 7928.521973, -2625.954346, 492.447540, 14000, 'SAY_REMULOS_INTRO_3'), +(11832, 14, 7928.521973, -2625.954346, 492.447540, 12000, 'SAY_REMULOS_INTRO_4'), +(11832, 15, 7928.521973, -2625.954346, 492.447540, 5000, 'SAY_REMULOS_INTRO_5'), +(11832, 16, 7928.521973, -2625.954346, 492.447540, 13000, 'SPELL_CONJURE_RIFT'), +(11832, 17, 7928.521973, -2625.954346, 492.447540, 11000, 'SAY_ERANIKUS_SPAWN'), +(11832, 18, 7928.521973, -2625.954346, 492.447540, 5000, 'SAY_REMULOS_TAUNT_1'), +(11832, 19, 7928.521973, -2625.954346, 492.447540, 3000, 'EMOTE_ERANIKUS_LAUGH'), +(11832, 20, 7928.521973, -2625.954346, 492.447540, 10000, 'SAY_ERANIKUS_TAUNT_2'), +(11832, 21, 7928.521973, -2625.954346, 492.447540, 12000, 'SAY_REMULOS_TAUNT_3'), +(11832, 22, 7928.521973, -2625.954346, 492.447540, 6000, 'SAY_ERANIKUS_TAUNT_4'), +(11832, 23, 7928.521973, -2625.954346, 492.447540, 7000, 'EMOTE_ERANIKUS_ATTACK'), +(11832, 24, 7928.521973, -2625.954346, 492.447540, 0, 'SAY_REMULOS_DEFEND_1 - eranikus flies up'), +(11832, 25, 7948.267090, -2610.062988, 492.340424, 0, ''), +(11832, 26, 7952.318848, -2594.118408, 490.070374, 0, ''), +(11832, 27, 7913.988770, -2567.002686, 488.330566, 0, ''), +(11832, 28, 7835.454102, -2571.099121, 489.289246, 6000, 'SAY_REMULOS_DEFEND_2'), +(11832, 29, 7835.454102, -2571.099121, 489.289246, 4000, 'SAY_ERANIKUS_SHADOWS'), +(11832, 30, 7835.454102, -2571.099121, 489.289246, 0, 'SAY_REMULOS_DEFEND_3 - escort paused'), +(11832, 31, 7897.283691, -2560.652344, 487.461304, 0, ''), +(11832, 32, 7897.283691, -2560.652344, 487.461304, 0, ''); \ No newline at end of file From 05f10404312dc3386e849f22b67bd25162125b52 Mon Sep 17 00:00:00 2001 From: dufernst Date: Fri, 23 Sep 2011 01:53:23 +0300 Subject: [PATCH 0271/1172] [2290] Fix XT002 door in Ulduar Also fix the Leviathan's exit door And add new lines at the end of the previous commited files Signed-off-by: Xfurry --- scripts/northrend/ulduar/ulduar/instance_ulduar.cpp | 4 ++-- scripts/northrend/ulduar/ulduar/ulduar.h | 5 ++--- sd2_revision_nr.h | 2 +- sql/updates/r2289_mangos.sql | 2 +- sql/updates/r2289_scriptdev2.sql | 2 +- 5 files changed, 7 insertions(+), 8 deletions(-) diff --git a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp index e398553c9..da2b48581 100644 --- a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp +++ b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp @@ -130,7 +130,7 @@ void instance_ulduar::OnObjectCreate(GameObject* pGo) pGo->SetGoState(GO_STATE_READY); if (m_auiEncounter[TYPE_XT002] == DONE) pGo->SetGoState(GO_STATE_ACTIVE); - if (m_auiEncounter[TYPE_IGNIS] == DONE && m_auiEncounter[TYPE_RAZORSCALE] == DONE) + if (m_auiEncounter[TYPE_LEVIATHAN] == DONE) pGo->SetGoState(GO_STATE_ACTIVE); break; case GO_BROKEN_HARPOON: @@ -270,7 +270,7 @@ void instance_ulduar::SetData(uint32 uiType, uint32 uiData) if (uiData == DONE) { DoUseDoorOrButton(GO_XT002_GATE); - DoUseDoorOrButton(GO_LEVIATHAN_GATE); + DoUseDoorOrButton(GO_LIGHTNING_FIELD); } break; case TYPE_IGNIS: diff --git a/scripts/northrend/ulduar/ulduar/ulduar.h b/scripts/northrend/ulduar/ulduar/ulduar.h index 61b0ac49e..d0616ffe3 100644 --- a/scripts/northrend/ulduar/ulduar/ulduar.h +++ b/scripts/northrend/ulduar/ulduar/ulduar.h @@ -131,8 +131,8 @@ enum // Doors and other Objects // The siege GO_SHIELD_WALL = 194416, // Gate before Leviathan - GO_LEVIATHAN_GATE = 194630, // Gate after Leviathan -> this should be used before the boss enter the arena - // There should be another gate after the Leviathan here which should be used during the Leviathan encounter + GO_LIGHTNING_FIELD = 194559, // Lightning gate after the Leviathan. It closes after the boss enters the arena + GO_LEVIATHAN_GATE = 194630, // Gate after Leviathan -> this will be broken when the boss enters the arena GO_XT002_GATE = 194631, // Gate before Xt002 GO_BROKEN_HARPOON = 194565, // Broken harpoon from Razorscale @@ -176,7 +176,6 @@ enum GO_RUNED_STONE_DOOR = 194557, // Door after the runic colossus GO_THORIM_STONE_DOOR = 194558, // Door after the ancient rune giant GO_LIGHTNING_DOOR = 194905, // Arena exit door - GO_LIGHTNING_FIELD = 194559, // For the platform animation GO_DOOR_LEVER = 194264, // In front of the door // Descent to madness diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index bbd405415..2f984248a 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2289" + #define SD2_REVISION_NR "2290" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/updates/r2289_mangos.sql b/sql/updates/r2289_mangos.sql index eaad25349..76dbc5224 100644 --- a/sql/updates/r2289_mangos.sql +++ b/sql/updates/r2289_mangos.sql @@ -1,2 +1,2 @@ UPDATE creature_template SET ScriptName='npc_keeper_remulos' WHERE entry=11832; -UPDATE creature_template SET ScriptName='boss_eranikus' WHERE entry=15491; \ No newline at end of file +UPDATE creature_template SET ScriptName='boss_eranikus' WHERE entry=15491; diff --git a/sql/updates/r2289_scriptdev2.sql b/sql/updates/r2289_scriptdev2.sql index a131a0c6e..e14771184 100644 --- a/sql/updates/r2289_scriptdev2.sql +++ b/sql/updates/r2289_scriptdev2.sql @@ -73,4 +73,4 @@ INSERT INTO script_waypoint VALUES (11832, 29, 7835.454102, -2571.099121, 489.289246, 4000, 'SAY_ERANIKUS_SHADOWS'), (11832, 30, 7835.454102, -2571.099121, 489.289246, 0, 'SAY_REMULOS_DEFEND_3 - escort paused'), (11832, 31, 7897.283691, -2560.652344, 487.461304, 0, ''), -(11832, 32, 7897.283691, -2560.652344, 487.461304, 0, ''); \ No newline at end of file +(11832, 32, 7897.283691, -2560.652344, 487.461304, 0, ''); From 64befa3c215c7bccc8de7a0d0bce55fc9a808c8f Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Fri, 23 Sep 2011 12:24:51 +0200 Subject: [PATCH 0272/1172] [2291] Remove obsolete macros from gossip.h --- include/sc_gossip.h | 22 ---------------------- sd2_revision_nr.h | 2 +- 2 files changed, 1 insertion(+), 23 deletions(-) diff --git a/include/sc_gossip.h b/include/sc_gossip.h index 6524f1af5..06217cb79 100644 --- a/include/sc_gossip.h +++ b/include/sc_gossip.h @@ -145,15 +145,6 @@ extern uint32 GetSkillLevel(Player* pPlayer, uint32 uiSkill); // guid - npc guid (ObjectGuid) #define SEND_GOSSIP_MENU(uiTextId, guid) PlayerTalkClass->SendGossipMenu(uiTextId, guid) -// This fuction shows POI(point of interest) to client. -// a - position X -// b - position Y -// c - Icon Id -// d - Flags -// e - Data -// f - Location Name -#define SEND_POI(a, b, c, d, e, f) PlayerTalkClass->SendPointOfInterest(a, b, c, d, e, f) - // Closes the Menu #define CLOSE_GOSSIP_MENU() PlayerTalkClass->CloseGossip() @@ -165,17 +156,4 @@ extern uint32 GetSkillLevel(Player* pPlayer, uint32 uiSkill); #define SEND_TABARDLIST(a) GetSession()->SendTabardVendorActivate(a) #define SEND_TAXILIST(a) GetSession()->SendTaxiStatus(a) -// Function to send the Auction List -// a - pointer to unit (Unit*) -#define SEND_AUCTIONLIST(a) GetSession()->SendAuctionHello(a) - -// Ressurect's the player if is dead. -#define SEND_SPRESURRECT() GetSession()->SendSpiritResurrect() - -// Function to send the Quest Dialogue Status -// a - pointer to player (Player*) -// b - pointer to questgiver (Object*) -// c - defstatus (uint32) -#define QUEST_DIALOG_STATUS(a, b, c) GetSession()->getDialogStatus(a, b, c) - #endif diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 2f984248a..28978ffc7 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2290" + #define SD2_REVISION_NR "2291" #endif // __SD2_REVISION_NR_H__ From 1f40c574efc1d47f6168f84b1e3df43c92f06c1f Mon Sep 17 00:00:00 2001 From: Vinolentus <655ff4c91d8e57f5@gmail.com> Date: Sat, 24 Sep 2011 06:35:01 +0400 Subject: [PATCH 0273/1172] [2292] Restore ScriptedPetAI's eysight. Merge pull request #4 Also make the interface between ScriptedPetAI and MaNGOS safer. Signed-off-by: Schmoozerd --- base/pet_ai.cpp | 6 ++++++ base/pet_ai.h | 14 ++++++++------ sd2_revision_nr.h | 2 +- 3 files changed, 15 insertions(+), 7 deletions(-) diff --git a/base/pet_ai.cpp b/base/pet_ai.cpp index 040484359..a73a47a2f 100644 --- a/base/pet_ai.cpp +++ b/base/pet_ai.cpp @@ -15,6 +15,12 @@ EndScriptData */ ScriptedPetAI::ScriptedPetAI(Creature* pCreature) : CreatureAI(pCreature) {} +bool ScriptedPetAI::IsVisible(Unit* pWho) const +{ + return pWho && m_creature->IsWithinDist(pWho, VISIBLE_RANGE) + && pWho->isVisibleForOrDetect(m_creature, m_creature, true); +} + void ScriptedPetAI::MoveInLineOfSight(Unit* pWho) { if (m_creature->getVictim()) diff --git a/base/pet_ai.h b/base/pet_ai.h index 8665f488a..d5f4d4567 100644 --- a/base/pet_ai.h +++ b/base/pet_ai.h @@ -12,17 +12,19 @@ class MANGOS_DLL_DECL ScriptedPetAI : public CreatureAI explicit ScriptedPetAI(Creature* pCreature); ~ScriptedPetAI() {} - void MoveInLineOfSight(Unit* /*pWho*/); + void MoveInLineOfSight(Unit* /*pWho*/) override; - void AttackStart(Unit* /*pWho*/); + void AttackStart(Unit* /*pWho*/) override; - void AttackedBy(Unit* /*pAttacker*/); + void AttackedBy(Unit* /*pAttacker*/) override; - void KilledUnit(Unit* /*pVictim*/) {} + bool IsVisible(Unit* /*pWho*/) const override; - void OwnerKilledUnit(Unit* /*pVictim*/) {} + void KilledUnit(Unit* /*pVictim*/) override {} - void UpdateAI(const uint32 uiDiff); + void OwnerKilledUnit(Unit* /*pVictim*/) override {} + + void UpdateAI(const uint32 uiDiff) override; virtual void Reset() {} diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 28978ffc7..b59d14c81 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2291" + #define SD2_REVISION_NR "2292" #endif // __SD2_REVISION_NR_H__ From 0ead9f5d7e2a0dbb7333056ef82babb633a63873 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Sat, 24 Sep 2011 15:46:50 +0200 Subject: [PATCH 0274/1172] [2293] Fix warnings for Zul'jin, thanks to Goaul for pointing --- scripts/eastern_kingdoms/zulaman/boss_zuljin.cpp | 8 +++++--- sd2_revision_nr.h | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/scripts/eastern_kingdoms/zulaman/boss_zuljin.cpp b/scripts/eastern_kingdoms/zulaman/boss_zuljin.cpp index d448fc0de..771eea7ca 100644 --- a/scripts/eastern_kingdoms/zulaman/boss_zuljin.cpp +++ b/scripts/eastern_kingdoms/zulaman/boss_zuljin.cpp @@ -94,7 +94,9 @@ enum struct BossPhase { - uint32 uiSpiritSpellId, uiYellId, uiEmoteId, uiSpiritId; + uint32 uiSpiritSpellId; + int32 iYellId, iEmoteId; + uint32 uiSpiritId; uint8 uiPhase; }; @@ -265,8 +267,8 @@ struct MANGOS_DLL_DECL boss_zuljinAI : public ScriptedAI if (pSpell->Id == SPELL_SPIRIT_DRAIN) { DoCastSpellIfCan(m_creature, aZuljinPhases[m_uiPhase].uiSpiritSpellId); - DoScriptText(aZuljinPhases[m_uiPhase].uiYellId, m_creature); - DoScriptText(aZuljinPhases[m_uiPhase].uiEmoteId, m_creature); + DoScriptText(aZuljinPhases[m_uiPhase].iYellId, m_creature); + DoScriptText(aZuljinPhases[m_uiPhase].iEmoteId, m_creature); // in eagle phase we don't move if (m_uiPhase != PHASE_EAGLE) diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index b59d14c81..35a733575 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2292" + #define SD2_REVISION_NR "2293" #endif // __SD2_REVISION_NR_H__ From 6dd484b21ff78344c4f1c97e092f43b8992e34f1 Mon Sep 17 00:00:00 2001 From: Vinolentus <655ff4c91d8e57f5@gmail.com> Date: Sat, 24 Sep 2011 21:15:09 +0400 Subject: [PATCH 0275/1172] [2294] Fix some invalid virtuals Signed-off-by: Schmoozerd --- scripts/eastern_kingdoms/boss_kruul.cpp | 2 +- .../scarlet_monastery/boss_mograine_and_whitemane.cpp | 2 +- .../kalimdor/razorfen_downs/boss_amnennar_the_coldbringer.cpp | 2 +- .../frozen_halls/pit_of_saron/boss_forgemaster_garfrost.cpp | 2 +- scripts/outland/gruuls_lair/boss_high_king_maulgar.cpp | 2 +- sd2_revision_nr.h | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/eastern_kingdoms/boss_kruul.cpp b/scripts/eastern_kingdoms/boss_kruul.cpp index ab0159eb5..c5dc0cbea 100644 --- a/scripts/eastern_kingdoms/boss_kruul.cpp +++ b/scripts/eastern_kingdoms/boss_kruul.cpp @@ -58,7 +58,7 @@ struct MANGOS_DLL_DECL boss_kruulAI : public ScriptedAI Hound_Timer = 8000; } - void KilledUnit() + void KilledUnit(Unit* pVictim) { // When a player, pet or totem gets killed, Lord Kazzak casts this spell to instantly regenerate 70,000 health. DoCastSpellIfCan(m_creature,SPELL_CAPTURESOUL); diff --git a/scripts/eastern_kingdoms/scarlet_monastery/boss_mograine_and_whitemane.cpp b/scripts/eastern_kingdoms/scarlet_monastery/boss_mograine_and_whitemane.cpp index 0543821de..d5a01dcfe 100644 --- a/scripts/eastern_kingdoms/scarlet_monastery/boss_mograine_and_whitemane.cpp +++ b/scripts/eastern_kingdoms/scarlet_monastery/boss_mograine_and_whitemane.cpp @@ -252,7 +252,7 @@ struct MANGOS_DLL_DECL boss_high_inquisitor_whitemaneAI : public ScriptedAI } } - void MoveInLineOfSight() + void MoveInLineOfSight(Unit* pWho) { //This needs to be empty because Whitemane should NOT aggro while fighting Mograine. Mograine will give us a target. } diff --git a/scripts/kalimdor/razorfen_downs/boss_amnennar_the_coldbringer.cpp b/scripts/kalimdor/razorfen_downs/boss_amnennar_the_coldbringer.cpp index 4d7bbef20..41ddc0b4f 100644 --- a/scripts/kalimdor/razorfen_downs/boss_amnennar_the_coldbringer.cpp +++ b/scripts/kalimdor/razorfen_downs/boss_amnennar_the_coldbringer.cpp @@ -60,7 +60,7 @@ struct MANGOS_DLL_DECL boss_amnennar_the_coldbringerAI : public ScriptedAI DoScriptText(SAY_AGGRO, m_creature); } - void KilledUnit() + void KilledUnit(Unit* pVictim) { DoScriptText(SAY_KILL, m_creature); } diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_forgemaster_garfrost.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_forgemaster_garfrost.cpp index 3bcf4cb15..8ea59b4fd 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_forgemaster_garfrost.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_forgemaster_garfrost.cpp @@ -94,7 +94,7 @@ struct MANGOS_DLL_DECL boss_forgemaster_garfrostAI : public ScriptedAI DoScriptText(SAY_DEATH, m_creature, pKiller); } - void KilledUnit() + void KilledUnit(Unit* pVictim) { DoScriptText(SAY_SLAY_1, m_creature); } diff --git a/scripts/outland/gruuls_lair/boss_high_king_maulgar.cpp b/scripts/outland/gruuls_lair/boss_high_king_maulgar.cpp index 2c78321d6..6e8302aea 100644 --- a/scripts/outland/gruuls_lair/boss_high_king_maulgar.cpp +++ b/scripts/outland/gruuls_lair/boss_high_king_maulgar.cpp @@ -124,7 +124,7 @@ struct MANGOS_DLL_DECL boss_high_king_maulgarAI : public ScriptedAI m_pInstance->SetData(TYPE_MAULGAR_EVENT, FAIL); } - void KilledUnit() + void KilledUnit(Unit* pVictim) { switch(urand(0, 2)) { diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 35a733575..aa862d4f4 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2293" + #define SD2_REVISION_NR "2294" #endif // __SD2_REVISION_NR_H__ From e5dcf6ce9fadee25ecf9906ed20eaac755e48067 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Sat, 24 Sep 2011 23:37:41 +0200 Subject: [PATCH 0276/1172] [2295] Fix more warnings, thanks to goaul for pointing --- include/sc_creature.cpp | 4 ++-- include/sc_creature.h | 2 +- .../blackwing_lair/boss_chromaggus.cpp | 11 ++--------- .../magisters_terrace/boss_felblood_kaelthas.cpp | 13 ------------- .../magisters_terrace/boss_selin_fireheart.cpp | 1 - scripts/eastern_kingdoms/zulaman/boss_halazzi.cpp | 2 +- scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.cpp | 4 ++-- scripts/kalimdor/temple_of_ahnqiraj/boss_cthun.cpp | 2 -- .../temple_of_ahnqiraj/boss_twinemperors.cpp | 2 -- scripts/northrend/naxxramas/boss_sapphiron.cpp | 2 +- .../northrend/violet_hold/instance_violet_hold.cpp | 9 +-------- scripts/northrend/violet_hold/violet_hold.cpp | 2 +- .../serpent_shrine/boss_hydross_the_unstable.cpp | 2 +- scripts/outland/hellfire_peninsula.cpp | 2 +- .../outland/tempest_keep/the_eye/boss_kaelthas.cpp | 12 ++++++------ sd2_revision_nr.h | 2 +- 16 files changed, 20 insertions(+), 52 deletions(-) diff --git a/include/sc_creature.cpp b/include/sc_creature.cpp index fe6772a45..d426a1f10 100644 --- a/include/sc_creature.cpp +++ b/include/sc_creature.cpp @@ -196,7 +196,7 @@ Creature* ScriptedAI::DoSpawnCreature(uint32 uiId, float fX, float fY, float fZ, return m_creature->SummonCreature(uiId,m_creature->GetPositionX()+fX, m_creature->GetPositionY()+fY, m_creature->GetPositionZ()+fZ, fAngle, (TempSummonType)uiType, uiDespawntime); } -SpellEntry const* ScriptedAI::SelectSpell(Unit* pTarget, int32 uiSchool, int32 uiMechanic, SelectTarget selectTargets, uint32 uiPowerCostMin, uint32 uiPowerCostMax, float fRangeMin, float fRangeMax, SelectEffect selectEffects) +SpellEntry const* ScriptedAI::SelectSpell(Unit* pTarget, int32 uiSchool, int32 iMechanic, SelectTarget selectTargets, uint32 uiPowerCostMin, uint32 uiPowerCostMax, float fRangeMin, float fRangeMax, SelectEffect selectEffects) { //No target so we can't cast if (!pTarget) @@ -238,7 +238,7 @@ SpellEntry const* ScriptedAI::SelectSpell(Unit* pTarget, int32 uiSchool, int32 u continue; //Check for spell mechanic if specified - if (uiMechanic >= 0 && pTempSpell->Mechanic != uiMechanic) + if (iMechanic >= 0 && pTempSpell->Mechanic != (uint32)iMechanic) continue; //Make sure that the spell uses the requested amount of power diff --git a/include/sc_creature.h b/include/sc_creature.h index 97cb94c4a..8dc26c5fe 100644 --- a/include/sc_creature.h +++ b/include/sc_creature.h @@ -206,7 +206,7 @@ struct MANGOS_DLL_DECL ScriptedAI : public CreatureAI Creature* DoSpawnCreature(uint32 uiId, float fX, float fY, float fZ, float fAngle, uint32 uiType, uint32 uiDespawntime); // Returns spells that meet the specified criteria from the creatures spell list - SpellEntry const* SelectSpell(Unit* pTarget, int32 uiSchool, int32 uiMechanic, SelectTarget selectTargets, uint32 uiPowerCostMin, uint32 uiPowerCostMax, float fRangeMin, float fRangeMax, SelectEffect selectEffect); + SpellEntry const* SelectSpell(Unit* pTarget, int32 uiSchool, int32 iMechanic, SelectTarget selectTargets, uint32 uiPowerCostMin, uint32 uiPowerCostMax, float fRangeMin, float fRangeMax, SelectEffect selectEffect); // Checks if you can cast the specified spell bool CanCast(Unit* pTarget, SpellEntry const* pSpell, bool bTriggered = false); diff --git a/scripts/eastern_kingdoms/blackwing_lair/boss_chromaggus.cpp b/scripts/eastern_kingdoms/blackwing_lair/boss_chromaggus.cpp index a5516538c..a0298316b 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/boss_chromaggus.cpp +++ b/scripts/eastern_kingdoms/blackwing_lair/boss_chromaggus.cpp @@ -136,15 +136,8 @@ struct MANGOS_DLL_DECL boss_chromaggusAI : public ScriptedAI m_creature->RemoveAurasDueToSpell(m_uiCurrentVulnerabilitySpell); // Cast new random vurlnabilty on self - uint32 uiSpell; - switch(urand(0, 4)) - { - case 0: uiSpell = SPELL_FIRE_VULNERABILITY; break; - case 1: uiSpell = SPELL_FROST_VULNERABILITY; break; - case 2: uiSpell = SPELL_SHADOW_VULNERABILITY; break; - case 3: uiSpell = SPELL_NATURE_VULNERABILITY; break; - case 4: uiSpell = SPELL_ARCANE_VULNERABILITY; break; - } + uint32 aSpellId[] = {SPELL_FIRE_VULNERABILITY, SPELL_FROST_VULNERABILITY, SPELL_SHADOW_VULNERABILITY, SPELL_NATURE_VULNERABILITY, SPELL_ARCANE_VULNERABILITY}; + uint32 uiSpell = aSpellId[urand(0, 4)]; if (DoCastSpellIfCan(m_creature, uiSpell) == CAST_OK) { diff --git a/scripts/eastern_kingdoms/magisters_terrace/boss_felblood_kaelthas.cpp b/scripts/eastern_kingdoms/magisters_terrace/boss_felblood_kaelthas.cpp index ba4aefab3..aef2904a3 100644 --- a/scripts/eastern_kingdoms/magisters_terrace/boss_felblood_kaelthas.cpp +++ b/scripts/eastern_kingdoms/magisters_terrace/boss_felblood_kaelthas.cpp @@ -64,16 +64,6 @@ enum NPC_ARCANE_SPHERE = 24708, }; -/** Locations **/ -static const float KaelLocations[3][2]= -{ - {148.744659f, 181.377426f}, - {140.823883f, 195.403046f}, - {156.574188f, 195.650482f}, -}; - -static const float LOCATION_Z = -16.727455f; - struct MANGOS_DLL_DECL boss_felblood_kaelthasAI : public ScriptedAI { boss_felblood_kaelthasAI(Creature* pCreature) : ScriptedAI(pCreature) @@ -203,9 +193,6 @@ struct MANGOS_DLL_DECL boss_felblood_kaelthasAI : public ScriptedAI void TeleportPlayersToSelf() { - float x = KaelLocations[0][0]; - float y = KaelLocations[0][1]; - DoCastSpellIfCan(m_creature, SPELL_TELEPORT_CENTER, CAST_TRIGGERED); std::vector vGuids; diff --git a/scripts/eastern_kingdoms/magisters_terrace/boss_selin_fireheart.cpp b/scripts/eastern_kingdoms/magisters_terrace/boss_selin_fireheart.cpp index d807da3eb..4ed785f16 100644 --- a/scripts/eastern_kingdoms/magisters_terrace/boss_selin_fireheart.cpp +++ b/scripts/eastern_kingdoms/magisters_terrace/boss_selin_fireheart.cpp @@ -91,7 +91,6 @@ struct MANGOS_DLL_DECL boss_selin_fireheartAI : public ScriptedAI if (m_lCrystalGuids.empty()) return; - float ShortestDistance = 0; m_crystalGuid.Clear(); Creature* pCrystal = NULL; Creature* pCrystalChosen = NULL; diff --git a/scripts/eastern_kingdoms/zulaman/boss_halazzi.cpp b/scripts/eastern_kingdoms/zulaman/boss_halazzi.cpp index 837334ec7..f6a342e8c 100644 --- a/scripts/eastern_kingdoms/zulaman/boss_halazzi.cpp +++ b/scripts/eastern_kingdoms/zulaman/boss_halazzi.cpp @@ -206,7 +206,7 @@ struct MANGOS_DLL_DECL boss_halazziAI : public ScriptedAI DoScriptText(SAY_MERGE, m_creature); - uint32 uiSpellId; + uint32 uiSpellId = 0; switch(m_uiPhaseCounter) { diff --git a/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.cpp b/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.cpp index d5bd17ec5..302d924da 100644 --- a/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.cpp +++ b/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.cpp @@ -175,7 +175,7 @@ void hyjalAI::SpawnCreatureForWave(uint32 uiMobEntry) for (uint32 i = 0; i < uiMaxCount; ++i) { - if (m_aHyjalSpawnLoc[i].m_pBaseArea != m_uiBase) + if (m_aHyjalSpawnLoc[i].m_pBaseArea != (eBaseArea)m_uiBase) continue; ++uiJ; @@ -206,7 +206,7 @@ void hyjalAI::JustSummoned(Creature* pSummoned) for (uint32 i = 0; i < uiMaxCount; ++i) { - if (m_aHyjalWaveMoveTo[i].m_pBaseArea != m_uiBase) + if (m_aHyjalWaveMoveTo[i].m_pBaseArea != (eBaseArea)m_uiBase) continue; pMove = &m_aHyjalWaveMoveTo[i]; diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_cthun.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_cthun.cpp index d0318cafa..a7c6af4a5 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/boss_cthun.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_cthun.cpp @@ -771,8 +771,6 @@ struct MANGOS_DLL_DECL cthunAI : public ScriptedAI { if (Player* pTarget = SelectRandomNotStomach()) { - Creature* Spawned = NULL; - // Spawn claw tentacle on the random target if (Creature* pSummoned = m_creature->SummonCreature(MOB_GIANT_CLAW_TENTACLE, pTarget->GetPositionX(), pTarget->GetPositionY(), pTarget->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 500)) pSummoned->AI()->AttackStart(pTarget); diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_twinemperors.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_twinemperors.cpp index 54a8e0f61..324eb7749 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/boss_twinemperors.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_twinemperors.cpp @@ -186,8 +186,6 @@ struct MANGOS_DLL_DECL boss_twinemperorsAI : public ScriptedAI #define HEAL_BROTHER_AMOUNT 30000.0f uint32 largerAmount = (uint32)((HEAL_BROTHER_AMOUNT * mult) - HEAL_BROTHER_AMOUNT); - uint32 myh = m_creature->GetHealth(); - uint32 hish = pOtherBoss->GetHealth(); if (mytotal > histotal) { uint32 h = m_creature->GetHealth()+largerAmount; diff --git a/scripts/northrend/naxxramas/boss_sapphiron.cpp b/scripts/northrend/naxxramas/boss_sapphiron.cpp index 021d87cd9..4a617e95b 100644 --- a/scripts/northrend/naxxramas/boss_sapphiron.cpp +++ b/scripts/northrend/naxxramas/boss_sapphiron.cpp @@ -227,7 +227,7 @@ struct MANGOS_DLL_DECL boss_sapphironAI : public ScriptedAI break; case PHASE_AIR_BOLTS: // WOTLK Changed, originally was 5 - if (m_uiIceboltCount == (m_bIsRegularMode ? 2 : 3)) + if (m_uiIceboltCount == (uint32)(m_bIsRegularMode ? 2 : 3)) { if (m_uiFrostBreathTimer < uiDiff) { diff --git a/scripts/northrend/violet_hold/instance_violet_hold.cpp b/scripts/northrend/violet_hold/instance_violet_hold.cpp index 945400a18..7dfb72693 100644 --- a/scripts/northrend/violet_hold/instance_violet_hold.cpp +++ b/scripts/northrend/violet_hold/instance_violet_hold.cpp @@ -368,14 +368,7 @@ void instance_violet_hold::SpawnPortal() { if (Creature* pController = GetSingleCreatureFromStorage(NPC_SINCLARI_ALT)) { - uint32 uiPortalEntry; - - switch(pData->pPortalType) - { - case PORTAL_TYPE_NORM: uiPortalEntry = NPC_PORTAL; break; - case PORTAL_TYPE_SQUAD: - case PORTAL_TYPE_BOSS: uiPortalEntry = NPC_PORTAL_ELITE; break; - } + uint32 uiPortalEntry = pData->pPortalType == PORTAL_TYPE_NORM ? NPC_PORTAL : NPC_PORTAL_ELITE; pController->SummonCreature(uiPortalEntry, pData->fX, pData->fY, pData->fZ, pData->fOrient, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 1800*IN_MILLISECONDS); } diff --git a/scripts/northrend/violet_hold/violet_hold.cpp b/scripts/northrend/violet_hold/violet_hold.cpp index eb275c13c..16e7e5513 100644 --- a/scripts/northrend/violet_hold/violet_hold.cpp +++ b/scripts/northrend/violet_hold/violet_hold.cpp @@ -228,7 +228,7 @@ struct MANGOS_DLL_DECL npc_teleportation_portalAI : public ScriptedAI { for(uint8 i = 0; i < 4; ++i) { - uint32 uiSummonId; + uint32 uiSummonId = 0; switch(i) { diff --git a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_hydross_the_unstable.cpp b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_hydross_the_unstable.cpp index 07631c2b5..eb56aac69 100644 --- a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_hydross_the_unstable.cpp +++ b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_hydross_the_unstable.cpp @@ -237,7 +237,7 @@ struct MANGOS_DLL_DECL boss_hydross_the_unstableAI : public ScriptedAI { if (m_uiMarkOfHydross_Count <= 5) { - uint32 uiMarkSpell; + uint32 uiMarkSpell = 0; switch(m_uiMarkOfHydross_Count) { diff --git a/scripts/outland/hellfire_peninsula.cpp b/scripts/outland/hellfire_peninsula.cpp index 7b44a545c..37479823d 100644 --- a/scripts/outland/hellfire_peninsula.cpp +++ b/scripts/outland/hellfire_peninsula.cpp @@ -240,7 +240,7 @@ struct MANGOS_DLL_DECL npc_demoniac_scryerAI : public ScriptedAI { ++m_uiButtressCount; - float fAngle; + float fAngle = 0.0f; switch(m_uiButtressCount) { diff --git a/scripts/outland/tempest_keep/the_eye/boss_kaelthas.cpp b/scripts/outland/tempest_keep/the_eye/boss_kaelthas.cpp index cfe1a1789..5b9afa5a3 100644 --- a/scripts/outland/tempest_keep/the_eye/boss_kaelthas.cpp +++ b/scripts/outland/tempest_keep/the_eye/boss_kaelthas.cpp @@ -152,7 +152,7 @@ struct MANGOS_DLL_DECL advisorbase_ai : public ScriptedAI Reset(); } protected: - uint32 m_uiAdvisor_Speech; + int32 m_iAdvisor_Speech; public: ScriptedInstance* m_pInstance; @@ -217,7 +217,7 @@ struct MANGOS_DLL_DECL advisorbase_ai : public ScriptedAI void JustDied(Unit* pKiller) { if (m_pInstance && m_pInstance->GetData(TYPE_KAELTHAS_PHASE) == PHASE_3_ADVISOR_ALL) - DoScriptText(m_uiAdvisor_Speech, m_creature); + DoScriptText(m_iAdvisor_Speech, m_creature); } void DamageTaken(Unit* pKiller, uint32 &damage) @@ -1036,7 +1036,7 @@ struct MANGOS_DLL_DECL boss_thaladred_the_darkenerAI : public advisorbase_ai { boss_thaladred_the_darkenerAI(Creature* pCreature) : advisorbase_ai(pCreature) { - m_uiAdvisor_Speech = SAY_THALADRED_DEATH; + m_iAdvisor_Speech = SAY_THALADRED_DEATH; } uint32 m_uiGaze_Timer; @@ -1117,7 +1117,7 @@ struct MANGOS_DLL_DECL boss_lord_sanguinarAI : public advisorbase_ai { boss_lord_sanguinarAI(Creature* pCreature) : advisorbase_ai(pCreature) { - m_uiAdvisor_Speech = SAY_SANGUINAR_DEATH; + m_iAdvisor_Speech = SAY_SANGUINAR_DEATH; } uint32 m_uiFear_Timer; @@ -1169,7 +1169,7 @@ struct MANGOS_DLL_DECL boss_grand_astromancer_capernianAI : public advisorbase_a { boss_grand_astromancer_capernianAI(Creature* pCreature) : advisorbase_ai(pCreature) { - m_uiAdvisor_Speech = SAY_CAPERNIAN_DEATH; + m_iAdvisor_Speech = SAY_CAPERNIAN_DEATH; } uint32 m_uiFireball_Timer; @@ -1297,7 +1297,7 @@ struct MANGOS_DLL_DECL boss_master_engineer_telonicusAI : public advisorbase_ai { boss_master_engineer_telonicusAI(Creature* pCreature) : advisorbase_ai(pCreature) { - m_uiAdvisor_Speech = SAY_TELONICUS_DEATH; + m_iAdvisor_Speech = SAY_TELONICUS_DEATH; } uint32 m_uiBomb_Timer; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index aa862d4f4..42a46cedb 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2294" + #define SD2_REVISION_NR "2295" #endif // __SD2_REVISION_NR_H__ From 0fbc21fb9bfd42f3522110f6a86e56e471e7fff5 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Sun, 25 Sep 2011 02:20:44 +0200 Subject: [PATCH 0277/1172] [2296] Update SD2-TBC Compatibility Patch for one s1389 --- ...ch => ScriptDev2_2295_to_MaNGOS_one.patch} | 91 ++++++++++++------- sd2_revision_nr.h | 2 +- 2 files changed, 57 insertions(+), 36 deletions(-) rename patches/custom/{ScriptDev2_2224_to_MaNGOS_one.patch => ScriptDev2_2295_to_MaNGOS_one.patch} (91%) diff --git a/patches/custom/ScriptDev2_2224_to_MaNGOS_one.patch b/patches/custom/ScriptDev2_2295_to_MaNGOS_one.patch similarity index 91% rename from patches/custom/ScriptDev2_2224_to_MaNGOS_one.patch rename to patches/custom/ScriptDev2_2295_to_MaNGOS_one.patch index 27018ecee..564cd1981 100644 --- a/patches/custom/ScriptDev2_2224_to_MaNGOS_one.patch +++ b/patches/custom/ScriptDev2_2295_to_MaNGOS_one.patch @@ -1,11 +1,11 @@ -From 97cb357e0ae38576c88d2445bd1a5df3b6f0c5db Mon Sep 17 00:00:00 2001 +From 899b1c722576f971dde0603531ac5519a29aa95a Mon Sep 17 00:00:00 2001 From: ScriptDev2 Date: Thu, 24 Mar 2011 00:16:38 +0100 Subject: [PATCH] ScriptDev2 - One Compatibility patch Signed-off-by: Schmoozerd --- - include/precompiled.h | 5 + + include/precompiled.h | 9 + include/sc_instance.cpp | 22 -- include/sc_instance.h | 3 - .../shadowfang_keep/shadowfang_keep.cpp | 8 +- @@ -25,36 +25,39 @@ Signed-off-by: Schmoozerd .../ulduar/halls_of_stone/halls_of_stone.h | 2 - .../halls_of_stone/instance_halls_of_stone.cpp | 2 - .../auchenai_crypts/boss_exarch_maladaar.cpp | 8 +- + .../hellfire_ramparts/boss_omor_the_unscarred.cpp | 2 +- scripts/world/item_scripts.cpp | 2 +- system/ScriptLoader.cpp | 316 ++----------------- - 22 files changed, 54 insertions(+), 354 deletions(-) + 23 files changed, 59 insertions(+), 355 deletions(-) diff --git a/include/precompiled.h b/include/precompiled.h -index 11b6b31..2f202a3 100644 +index 11b6b31..40cf637 100644 --- a/include/precompiled.h +++ b/include/precompiled.h -@@ -11,6 +11,11 @@ +@@ -11,6 +11,15 @@ #include "sc_grid_searchers.h" #include "sc_instance.h" +enum backports +{ -+ UNIT_VIRTUAL_ITEM_SLOT_ID = UNIT_VIRTUAL_ITEM_SLOT_DISPLAY ++ UNIT_VIRTUAL_ITEM_SLOT_ID = UNIT_VIRTUAL_ITEM_SLOT_DISPLAY, ++ RAID_DIFFICULTY_10MAN_NORMAL = 0, ++ RAID_DIFFICULTY_25MAN_NORMAL = 0, ++ RAID_DIFFICULTY_10MAN_HEROIC = 0, ++ RAID_DIFFICULTY_25MAN_HEROIC = 0, +}; + #ifdef WIN32 # include BOOL APIENTRY DllMain(HANDLE hModule, DWORD ul_reason_for_call, LPVOID lpReserved) diff --git a/include/sc_instance.cpp b/include/sc_instance.cpp -index e93cb45..d7905cc 100644 +index 9db67e6..ba224a7 100644 --- a/include/sc_instance.cpp +++ b/include/sc_instance.cpp -@@ -141,25 +141,3 @@ Creature* ScriptedInstance::GetSingleCreatureFromStorage(uint32 uiEntry, bool bS - - return NULL; +@@ -143,28 +143,6 @@ Creature* ScriptedInstance::GetSingleCreatureFromStorage(uint32 uiEntry, bool bS } -- --/** + + /** - Helper function to start a timed achievement criteria for players in the map - - @param criteriaType The Type that is required to complete the criteria, see enum AchievementCriteriaTypes in MaNGOS @@ -75,8 +78,13 @@ index e93cb45..d7905cc 100644 - else - debug_log("SD2: DoStartTimedAchievement attempt start achievements but no players in map."); -} +- +-/** + Constructor for DialogueHelper + + @param pDialogueArray The static const array of DialogueEntry holding the information about the dialogue. This array MUST be terminated by {0,0,0} diff --git a/include/sc_instance.h b/include/sc_instance.h -index d7e037e..3d1450a 100644 +index 36c9336..679429a 100644 --- a/include/sc_instance.h +++ b/include/sc_instance.h @@ -54,9 +54,6 @@ class MANGOS_DLL_DECL ScriptedInstance : public InstanceData @@ -90,7 +98,7 @@ index d7e037e..3d1450a 100644 // Storage for GO-Guids and NPC-Guids EntryGuidMap m_mGoEntryGuidStore; ///< Store unique GO-Guids by entry diff --git a/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.cpp b/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.cpp -index c152e0e..090b8c3 100644 +index e39c690..f3cf2b9 100644 --- a/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.cpp +++ b/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.cpp @@ -89,10 +89,10 @@ struct MANGOS_DLL_DECL npc_shadowfang_prisonerAI : public npc_escortAI @@ -122,19 +130,19 @@ index f87a61e..79522f6 100644 m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PVP_ATTACKABLE); m_creature->SetStandState(UNIT_STAND_STATE_STAND); diff --git a/scripts/kalimdor/onyxias_lair/boss_onyxia.cpp b/scripts/kalimdor/onyxias_lair/boss_onyxia.cpp -index 0ad95ad..ef332f9 100644 +index 8a3673a..00697c4 100644 --- a/scripts/kalimdor/onyxias_lair/boss_onyxia.cpp +++ b/scripts/kalimdor/onyxias_lair/boss_onyxia.cpp -@@ -312,7 +312,7 @@ struct MANGOS_DLL_DECL boss_onyxiaAI : public ScriptedAI +@@ -320,7 +320,7 @@ struct MANGOS_DLL_DECL boss_onyxiaAI : public ScriptedAI DoScriptText(SAY_PHASE_2_TRANS, m_creature); // sort of a hack, it is unclear how this really work but the values appear to be valid - m_creature->SetByteValue(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_UNK_2); + m_creature->SetByteValue(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_ALWAYS_STAND/* | UNIT_BYTE1_FLAG_UNK_2*/); - m_creature->AddSplineFlag(SPLINEFLAG_FLYING); + m_creature->SetLevitate(true); if (m_pPointData) -@@ -438,7 +438,7 @@ struct MANGOS_DLL_DECL boss_onyxiaAI : public ScriptedAI +@@ -446,7 +446,7 @@ struct MANGOS_DLL_DECL boss_onyxiaAI : public ScriptedAI return; // All and only the Onyxia Deep Breath Spells have these visuals @@ -243,10 +251,10 @@ index a69dbc6..0bde6be 100644 return true; diff --git a/scripts/northrend/naxxramas/instance_naxxramas.cpp b/scripts/northrend/naxxramas/instance_naxxramas.cpp -index 58a83c5..37c44a1 100644 +index e85686d..8937d46 100644 --- a/scripts/northrend/naxxramas/instance_naxxramas.cpp +++ b/scripts/northrend/naxxramas/instance_naxxramas.cpp -@@ -220,10 +220,7 @@ void instance_naxxramas::SetData(uint32 uiType, uint32 uiData) +@@ -241,10 +241,7 @@ void instance_naxxramas::SetData(uint32 uiType, uint32 uiData) m_auiEncounter[uiType] = uiData; DoUseDoorOrButton(GO_ARAC_ANUB_DOOR); if (uiData == DONE) @@ -257,7 +265,7 @@ index 58a83c5..37c44a1 100644 break; case TYPE_FAERLINA: DoUseDoorOrButton(GO_ARAC_FAER_WEB); -@@ -325,8 +322,6 @@ void instance_naxxramas::SetData(uint32 uiType, uint32 uiData) +@@ -346,8 +343,6 @@ void instance_naxxramas::SetData(uint32 uiType, uint32 uiData) break; case TYPE_PATCHWERK: m_auiEncounter[uiType] = uiData; @@ -267,10 +275,10 @@ index 58a83c5..37c44a1 100644 DoUseDoorOrButton(GO_CONS_PATH_EXIT_DOOR); break; diff --git a/scripts/northrend/naxxramas/naxxramas.h b/scripts/northrend/naxxramas/naxxramas.h -index 3ae6d95..41db6fe 100644 +index c21f817..7f2876a 100644 --- a/scripts/northrend/naxxramas/naxxramas.h +++ b/scripts/northrend/naxxramas/naxxramas.h -@@ -165,10 +165,6 @@ enum +@@ -174,10 +174,6 @@ enum ACHIEV_CRIT_UNDYING_MAEX = 13238, ACHIEV_CRIT_UNDYING_LOA = 13239, ACHIEV_CRIT_UNDYING_THAD = 13240, @@ -310,10 +318,10 @@ index 989eeb9..5c8269f 100644 { DoUseDoorOrButton(GO_LOKEN_DOOR); diff --git a/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.h b/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.h -index 9fd2637..1a4b58a 100644 +index e9c5af2..14ff4eb 100644 --- a/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.h +++ b/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.h -@@ -41,8 +41,6 @@ enum +@@ -42,8 +42,6 @@ enum FACE_MARNAK = 0, FACE_ABEDNEUM = 1, FACE_KADDRAK = 2, @@ -323,10 +331,10 @@ index 9fd2637..1a4b58a 100644 struct Face diff --git a/scripts/northrend/ulduar/halls_of_stone/instance_halls_of_stone.cpp b/scripts/northrend/ulduar/halls_of_stone/instance_halls_of_stone.cpp -index 1e4f4d3..59c9ee8 100644 +index 5e52626..2930f00 100644 --- a/scripts/northrend/ulduar/halls_of_stone/instance_halls_of_stone.cpp +++ b/scripts/northrend/ulduar/halls_of_stone/instance_halls_of_stone.cpp -@@ -133,8 +133,6 @@ void instance_halls_of_stone::SetData(uint32 uiType, uint32 uiData) +@@ -138,8 +138,6 @@ void instance_halls_of_stone::SetData(uint32 uiType, uint32 uiData) break; case TYPE_MAIDEN: m_auiEncounter[1] = uiData; @@ -354,6 +362,19 @@ index 1aae4d2..862938b 100644 } } else +diff --git a/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_omor_the_unscarred.cpp b/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_omor_the_unscarred.cpp +index 9de8415..692a391 100644 +--- a/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_omor_the_unscarred.cpp ++++ b/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_omor_the_unscarred.cpp +@@ -129,7 +129,7 @@ struct MANGOS_DLL_DECL boss_omor_the_unscarredAI : public ScriptedAI + if (Player* pPlayer = m_creature->GetMap()->GetPlayer(m_playerGuid)) + { + //if unit dosen't have this flag, then no pulling back (script will attempt cast, even if orbital strike was resisted) +- if (pPlayer->HasMovementFlag(MOVEFLAG_FALLING)) ++ if (pPlayer->HasMovementFlag(MOVEMENTFLAG_FALLING)) + DoCastSpellIfCan(pPlayer, SPELL_SHADOW_WHIP, CAST_INTERRUPT_PREVIOUS); + } + m_playerGuid.Clear(); diff --git a/scripts/world/item_scripts.cpp b/scripts/world/item_scripts.cpp index 4474aa7..8a70bbc 100644 --- a/scripts/world/item_scripts.cpp @@ -368,10 +389,10 @@ index 4474aa7..8a70bbc 100644 return true; } diff --git a/system/ScriptLoader.cpp b/system/ScriptLoader.cpp -index 0959568..02a269f 100644 +index eb2ca25..2139385 100644 --- a/system/ScriptLoader.cpp +++ b/system/ScriptLoader.cpp -@@ -98,7 +98,22 @@ extern void AddSC_boss_majordomo(); +@@ -99,7 +99,22 @@ extern void AddSC_boss_majordomo(); extern void AddSC_boss_ragnaros(); extern void AddSC_instance_molten_core(); extern void AddSC_molten_core(); @@ -395,7 +416,7 @@ index 0959568..02a269f 100644 extern void AddSC_boss_arcanist_doan(); // scarlet_monastery extern void AddSC_boss_azshir_the_sleepless(); extern void AddSC_boss_bloodmage_thalnos(); -@@ -210,8 +225,6 @@ extern void AddSC_boss_epoch_hunter(); +@@ -211,8 +226,6 @@ extern void AddSC_boss_epoch_hunter(); extern void AddSC_boss_lieutenant_drake(); extern void AddSC_instance_old_hillsbrad(); extern void AddSC_old_hillsbrad(); @@ -404,7 +425,7 @@ index 0959568..02a269f 100644 extern void AddSC_dire_maul(); // dire_maul extern void AddSC_instance_dire_maul(); extern void AddSC_boss_celebras_the_cursed(); // maraudon -@@ -269,144 +282,7 @@ extern void AddSC_ungoro_crater(); +@@ -270,144 +283,7 @@ extern void AddSC_ungoro_crater(); extern void AddSC_winterspring(); // northrend @@ -550,7 +571,7 @@ index 0959568..02a269f 100644 // outland extern void AddSC_boss_exarch_maladaar(); // auchindoun, auchenai_crypts -@@ -587,7 +463,22 @@ void AddScripts() +@@ -589,7 +465,22 @@ void AddScripts() AddSC_boss_ragnaros(); AddSC_instance_molten_core(); AddSC_molten_core(); @@ -574,7 +595,7 @@ index 0959568..02a269f 100644 AddSC_boss_arcanist_doan(); // scarlet_monastery AddSC_boss_azshir_the_sleepless(); AddSC_boss_bloodmage_thalnos(); -@@ -699,8 +590,6 @@ void AddScripts() +@@ -701,8 +592,6 @@ void AddScripts() AddSC_boss_lieutenant_drake(); AddSC_instance_old_hillsbrad(); AddSC_old_hillsbrad(); @@ -583,7 +604,7 @@ index 0959568..02a269f 100644 AddSC_dire_maul(); // dire_maul AddSC_instance_dire_maul(); AddSC_boss_celebras_the_cursed(); // maraudon -@@ -758,144 +647,7 @@ void AddScripts() +@@ -760,144 +649,7 @@ void AddScripts() AddSC_winterspring(); // northrend @@ -730,5 +751,5 @@ index 0959568..02a269f 100644 // outland AddSC_boss_exarch_maladaar(); // auchindoun, auchenai_crypts -- -1.7.3.1.msysgit.0 +1.7.6.msysgit.0 diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 42a46cedb..61ea7a9ad 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2295" + #define SD2_REVISION_NR "2296" #endif // __SD2_REVISION_NR_H__ From 4035375a2f78f37fe2329c9b97e4c6f785522ea1 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Sun, 25 Sep 2011 19:02:06 +0200 Subject: [PATCH 0278/1172] [2297] Fix some issues with Ionar in Halls of Lightning --- .../ulduar/halls_of_lightning/boss_ionar.cpp | 102 +++++++++--------- sd2_revision_nr.h | 2 +- 2 files changed, 52 insertions(+), 52 deletions(-) diff --git a/scripts/northrend/ulduar/halls_of_lightning/boss_ionar.cpp b/scripts/northrend/ulduar/halls_of_lightning/boss_ionar.cpp index aef7ab58d..9ce7e7cd5 100644 --- a/scripts/northrend/ulduar/halls_of_lightning/boss_ionar.cpp +++ b/scripts/northrend/ulduar/halls_of_lightning/boss_ionar.cpp @@ -72,25 +72,25 @@ struct MANGOS_DLL_DECL boss_ionarAI : public ScriptedAI bool m_bIsRegularMode; + bool m_bIsDesperseCasting; bool m_bIsSplitPhase; - uint32 m_uiSplit_Timer; + uint32 m_uiSplitTimer; uint32 m_uiSparkAtHomeCount; - uint32 m_uiStaticOverload_Timer; - uint32 m_uiBallLightning_Timer; + uint32 m_uiStaticOverloadTimer; + uint32 m_uiBallLightningTimer; uint32 m_uiHealthAmountModifier; void Reset() { - m_lSparkGUIDList.clear(); - m_bIsSplitPhase = true; - m_uiSplit_Timer = 25000; + m_bIsDesperseCasting = false; + m_uiSplitTimer = 25000; m_uiSparkAtHomeCount = 0; - m_uiStaticOverload_Timer = urand(5000, 6000); - m_uiBallLightning_Timer = urand(10000, 11000); + m_uiStaticOverloadTimer = urand(5000, 6000); + m_uiBallLightningTimer = urand(10000, 11000); m_uiHealthAmountModifier = 1; @@ -120,7 +120,9 @@ struct MANGOS_DLL_DECL boss_ionarAI : public ScriptedAI void JustReachedHome() { if (m_pInstance) - m_pInstance->SetData(TYPE_IONAR, NOT_STARTED); + m_pInstance->SetData(TYPE_IONAR, FAIL); + + DespawnSpark(); } void AttackStart(Unit* pWho) @@ -157,10 +159,7 @@ struct MANGOS_DLL_DECL boss_ionarAI : public ScriptedAI void DespawnSpark() { - if (m_lSparkGUIDList.empty()) - return; - - for(GUIDList::const_iterator itr = m_lSparkGUIDList.begin(); itr != m_lSparkGUIDList.end(); ++itr) + for (GUIDList::const_iterator itr = m_lSparkGUIDList.begin(); itr != m_lSparkGUIDList.end(); ++itr) { if (Creature* pTemp = m_creature->GetMap()->GetCreature(*itr)) { @@ -172,14 +171,10 @@ struct MANGOS_DLL_DECL boss_ionarAI : public ScriptedAI m_lSparkGUIDList.clear(); } - //make sparks come back + // make sparks come back void CallBackSparks() { - //should never be empty here, but check - if (m_lSparkGUIDList.empty()) - return; - - for(GUIDList::const_iterator itr = m_lSparkGUIDList.begin(); itr != m_lSparkGUIDList.end(); ++itr) + for (GUIDList::const_iterator itr = m_lSparkGUIDList.begin(); itr != m_lSparkGUIDList.end(); ++itr) { if (Creature* pSpark = m_creature->GetMap()->GetCreature(*itr)) { @@ -215,18 +210,15 @@ struct MANGOS_DLL_DECL boss_ionarAI : public ScriptedAI void UpdateAI(const uint32 uiDiff) { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + // Splitted if (m_creature->GetVisibility() == VISIBILITY_OFF) { - if (!m_creature->isInCombat()) - { - Reset(); - return; - } - - if (m_uiSplit_Timer < uiDiff) + if (m_uiSplitTimer < uiDiff) { - m_uiSplit_Timer = 2500; + m_uiSplitTimer = 2500; // Return sparks to where Ionar splitted if (m_bIsSplitPhase) @@ -238,13 +230,12 @@ struct MANGOS_DLL_DECL boss_ionarAI : public ScriptedAI else if (m_uiSparkAtHomeCount == MAX_SPARKS) { m_creature->SetVisibility(VISIBILITY_ON); - m_creature->CastSpell(m_creature, SPELL_SPARK_DESPAWN, false); - - DespawnSpark(); + DoCastSpellIfCan(m_creature, SPELL_SPARK_DESPAWN); m_uiSparkAtHomeCount = 0; - m_uiSplit_Timer = 25000; + m_uiSplitTimer = 25000; m_bIsSplitPhase = true; + m_bIsDesperseCasting = false; if (m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() != CHASE_MOTION_TYPE) { @@ -254,44 +245,43 @@ struct MANGOS_DLL_DECL boss_ionarAI : public ScriptedAI } } else - m_uiSplit_Timer -= uiDiff; + m_uiSplitTimer -= uiDiff; return; } - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - if (m_uiStaticOverload_Timer < uiDiff) + if (m_uiStaticOverloadTimer < uiDiff) { if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) - DoCastSpellIfCan(pTarget, m_bIsRegularMode ? SPELL_STATIC_OVERLOAD_N : SPELL_STATIC_OVERLOAD_H); - - m_uiStaticOverload_Timer = urand(5000, 6000); + { + if (DoCastSpellIfCan(pTarget, m_bIsRegularMode ? SPELL_STATIC_OVERLOAD_N : SPELL_STATIC_OVERLOAD_H) == CAST_OK) + m_uiStaticOverloadTimer = urand(5000, 6000); + } } else - m_uiStaticOverload_Timer -= uiDiff; + m_uiStaticOverloadTimer -= uiDiff; - if (m_uiBallLightning_Timer < uiDiff) + if (m_uiBallLightningTimer < uiDiff) { if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) - m_creature->CastSpell(pTarget->GetPositionX(), pTarget->GetPositionY(), pTarget->GetPositionZ(), m_bIsRegularMode ? SPELL_BALL_LIGHTNING_N : SPELL_BALL_LIGHTNING_H, false, NULL, NULL, m_creature->GetObjectGuid()); - m_uiBallLightning_Timer = urand(10000, 11000); + { + if (DoCastSpellIfCan(pTarget, m_bIsRegularMode ? SPELL_BALL_LIGHTNING_N : SPELL_BALL_LIGHTNING_H) == CAST_OK) + m_uiBallLightningTimer = urand(10000, 11000); + } } else - m_uiBallLightning_Timer -= uiDiff; + m_uiBallLightningTimer -= uiDiff; // Health check if (m_creature->GetHealthPercent() < float(100 - 20*m_uiHealthAmountModifier)) { ++m_uiHealthAmountModifier; - DoScriptText(urand(0, 1) ? SAY_SPLIT_1 : SAY_SPLIT_2, m_creature); - - if (m_creature->IsNonMeleeSpellCasted(false)) - m_creature->InterruptNonMeleeSpells(false); - - DoCastSpellIfCan(m_creature, SPELL_DISPERSE); + if (!m_bIsDesperseCasting && DoCastSpellIfCan(m_creature, SPELL_DISPERSE, CAST_INTERRUPT_PREVIOUS) == CAST_OK) + { + DoScriptText(urand(0, 1) ? SAY_SPLIT_1 : SAY_SPLIT_2, m_creature); + m_bIsDesperseCasting = true; + } } DoMeleeAttackIfReady(); @@ -311,7 +301,7 @@ bool EffectDummyCreature_boss_ionar(Unit* pCaster, uint32 uiSpellId, SpellEffect if (pCreatureTarget->GetEntry() != NPC_IONAR) return true; - for(uint8 i = 0; i < MAX_SPARKS; ++i) + for (uint8 i = 0; i < MAX_SPARKS; ++i) pCreatureTarget->CastSpell(pCreatureTarget, SPELL_SUMMON_SPARK, true); pCreatureTarget->AttackStop(); @@ -323,6 +313,16 @@ bool EffectDummyCreature_boss_ionar(Unit* pCaster, uint32 uiSpellId, SpellEffect //always return true when we are handling this spell and effect return true; } + else if (uiSpellId == SPELL_SPARK_DESPAWN && uiEffIndex == EFFECT_INDEX_0) + { + if (pCreatureTarget->GetEntry() != NPC_IONAR) + return true; + + if (boss_ionarAI* pIonarAI = dynamic_cast (pCreatureTarget->AI())) + pIonarAI->DespawnSpark(); + + return true; + } return false; } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 61ea7a9ad..3ff386a32 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2296" + #define SD2_REVISION_NR "2297" #endif // __SD2_REVISION_NR_H__ From fe6f03edca5de5d3d370a85f59461546099da0f9 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Sun, 25 Sep 2011 21:12:28 +0200 Subject: [PATCH 0279/1172] [2298] Fix Typos and a spell cast for boss Gal'darah, Gundrak --- scripts/northrend/gundrak/boss_galdarah.cpp | 4 ++-- sd2_revision_nr.h | 2 +- sql/scriptdev2_script_full.sql | 2 +- sql/updates/r2298_scriptdev2.sql | 1 + 4 files changed, 5 insertions(+), 4 deletions(-) create mode 100644 sql/updates/r2298_scriptdev2.sql diff --git a/scripts/northrend/gundrak/boss_galdarah.cpp b/scripts/northrend/gundrak/boss_galdarah.cpp index 7d027d4b2..96547037e 100644 --- a/scripts/northrend/gundrak/boss_galdarah.cpp +++ b/scripts/northrend/gundrak/boss_galdarah.cpp @@ -61,7 +61,7 @@ enum SPELL_IMPALING_CHARGE = 54956, SPELL_IMPALING_CHARGE_H = 59827, SPELL_STOMP = 55292, - SPELL_STOMP_H = 59826, + SPELL_STOMP_H = 59829, }; /*###### @@ -137,7 +137,7 @@ struct MANGOS_DLL_DECL boss_galdarahAI : public ScriptedAI if (pSummoned->GetEntry() == NPC_RHINO_SPIRIT) { if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1)) - pSummoned->CastSpell(pTarget, m_bIsRegularMode ? SPELL_STAMPEDE_RHINO : SPELL_STAMPEDE_RHINO_H, false); + pSummoned->CastSpell(pTarget, m_bIsRegularMode ? SPELL_STAMPEDE_RHINO : SPELL_STAMPEDE_RHINO_H, false, NULL, NULL, m_creature->GetObjectGuid()); } } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 3ff386a32..2ee1a6d9d 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2297" + #define SD2_REVISION_NR "2298" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 6dbd46679..4f1756f3b 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -3146,7 +3146,7 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1604028,'Even the mighty... can fall.',14439,1,0,0,'galdarah SAY_DEATH'), (-1604029,'%s transforms into a Mammoth!',14724,2,0,0,'moorabi EMOTE_TRANSFORMED'), -(-1604030,'%N is impaled!',0,3,0,0,'EMOTE_IMPALED'); +(-1604030,'$N is impaled!',0,3,0,0,'EMOTE_IMPALED'); -- -1 608 000 VIOLET HOLD diff --git a/sql/updates/r2298_scriptdev2.sql b/sql/updates/r2298_scriptdev2.sql new file mode 100644 index 000000000..965fab0ce --- /dev/null +++ b/sql/updates/r2298_scriptdev2.sql @@ -0,0 +1 @@ +UPDATE script_texts SET content_default='$N is impaled!' WHERE entry=-1604030; From d0968309838d48c51ffc4946d3cb56a6e1680b6c Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Sun, 25 Sep 2011 21:55:42 +0200 Subject: [PATCH 0280/1172] [2299] Fix the target of the Emote for all cases - Gal'darah --- scripts/northrend/gundrak/boss_galdarah.cpp | 4 +++- sd2_revision_nr.h | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/northrend/gundrak/boss_galdarah.cpp b/scripts/northrend/gundrak/boss_galdarah.cpp index 96547037e..847650fde 100644 --- a/scripts/northrend/gundrak/boss_galdarah.cpp +++ b/scripts/northrend/gundrak/boss_galdarah.cpp @@ -234,8 +234,10 @@ struct MANGOS_DLL_DECL boss_galdarahAI : public ScriptedAI if (m_uiSpecialAbilityTimer < uiDiff) { Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1); + if (!pTarget) + pTarget = m_creature->getVictim(); - if (DoCastSpellIfCan(pTarget ? pTarget : m_creature->getVictim(), m_bIsRegularMode ? SPELL_IMPALING_CHARGE : SPELL_IMPALING_CHARGE_H) == CAST_OK) + if (DoCastSpellIfCan(pTarget, m_bIsRegularMode ? SPELL_IMPALING_CHARGE : SPELL_IMPALING_CHARGE_H) == CAST_OK) { DoScriptText(EMOTE_IMPALED, m_creature, pTarget); m_uiSpecialAbilityTimer = 12000; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 2ee1a6d9d..910aa6218 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2298" + #define SD2_REVISION_NR "2299" #endif // __SD2_REVISION_NR_H__ From 579d9f000e35e20b6277463e3deda3afa560f41a Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Sun, 25 Sep 2011 23:06:50 +0300 Subject: [PATCH 0281/1172] [2998,5] Fix a typo for Hexlord Malacrass. Patch by rowman --- scripts/eastern_kingdoms/zulaman/boss_malacrass.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/eastern_kingdoms/zulaman/boss_malacrass.cpp b/scripts/eastern_kingdoms/zulaman/boss_malacrass.cpp index 5a4114649..3ad0e2ff3 100644 --- a/scripts/eastern_kingdoms/zulaman/boss_malacrass.cpp +++ b/scripts/eastern_kingdoms/zulaman/boss_malacrass.cpp @@ -87,7 +87,7 @@ enum //Rogue SPELL_RO_WOUND_POISON = 39665, SPELL_RO_BLIND = 43433, - SPELL_RO_SLICE_DICE = 43457, + SPELL_RO_SLICE_DICE = 43547, //Shaman SPELL_SH_CHAIN_LIGHT = 43435, From 17d76dec36ad184f50bc7bfb3c47f23dd07b9f2c Mon Sep 17 00:00:00 2001 From: stfx Date: Mon, 26 Sep 2011 18:24:43 +0200 Subject: [PATCH 0282/1172] [2300] Improve some things in Deadmines * Mr. Smite: Fix delay handling after he "used" his chest * Cannon event: Improve timed handling, make code more default, fix say types Signed-off-by: Schmoozerd --- .../eastern_kingdoms/deadmines/deadmines.cpp | 11 +-- .../eastern_kingdoms/deadmines/deadmines.h | 1 - .../deadmines/instance_deadmines.cpp | 69 +++++++------------ sd2_revision_nr.h | 2 +- sql/scriptdev2_script_full.sql | 4 +- sql/updates/r2300_scriptdev2.sql | 1 + 6 files changed, 30 insertions(+), 58 deletions(-) create mode 100644 sql/updates/r2300_scriptdev2.sql diff --git a/scripts/eastern_kingdoms/deadmines/deadmines.cpp b/scripts/eastern_kingdoms/deadmines/deadmines.cpp index 9fff48726..f863d9936 100644 --- a/scripts/eastern_kingdoms/deadmines/deadmines.cpp +++ b/scripts/eastern_kingdoms/deadmines/deadmines.cpp @@ -145,7 +145,7 @@ struct MANGOS_DLL_DECL boss_mr_smiteAI : public ScriptedAI m_creature->SetStandState(UNIT_STAND_STATE_STAND); m_uiPhase = PHASE_EQUIP_END; - m_uiEquipTimer = 5000; + m_uiEquipTimer = 1000; Unit* pVictim = m_creature->SelectAttackingTarget(ATTACKING_TARGET_TOPAGGRO, 0); @@ -154,14 +154,6 @@ struct MANGOS_DLL_DECL boss_mr_smiteAI : public ScriptedAI EnterEvadeMode(); return; } - - // Takes longer to run further distance. Not accurate, but will probably be sufficient for most cases - if (m_creature->IsWithinDistInMap(pVictim, ATTACK_DISTANCE)) - m_uiEquipTimer -= 1000; - else if (m_creature->IsWithinDistInMap(pVictim, 2*ATTACK_DISTANCE)) - m_uiEquipTimer -= 2000; - else - m_uiEquipTimer -= 3000; } void PhaseEquipEnd() @@ -248,6 +240,7 @@ struct MANGOS_DLL_DECL boss_mr_smiteAI : public ScriptedAI m_uiPhase = PHASE_EQUIP_START; m_uiEquipTimer = 2500; + // will clear getVictim (m_attacking) m_creature->AttackStop(true); m_creature->RemoveAurasDueToSpell(SPELL_THRASH); } diff --git a/scripts/eastern_kingdoms/deadmines/deadmines.h b/scripts/eastern_kingdoms/deadmines/deadmines.h index ad76128bb..747098463 100644 --- a/scripts/eastern_kingdoms/deadmines/deadmines.h +++ b/scripts/eastern_kingdoms/deadmines/deadmines.h @@ -56,7 +56,6 @@ class MANGOS_DLL_DECL instance_deadmines : public ScriptedInstance uint32 m_auiEncounter[MAX_ENCOUNTER]; uint32 m_uiIronDoorTimer; - uint32 m_uiDoorStep; }; #endif diff --git a/scripts/eastern_kingdoms/deadmines/instance_deadmines.cpp b/scripts/eastern_kingdoms/deadmines/instance_deadmines.cpp index 0ecd412c9..050ef6321 100644 --- a/scripts/eastern_kingdoms/deadmines/instance_deadmines.cpp +++ b/scripts/eastern_kingdoms/deadmines/instance_deadmines.cpp @@ -25,8 +25,7 @@ EndScriptData */ #include "deadmines.h" instance_deadmines::instance_deadmines(Map* pMap) : ScriptedInstance(pMap), - m_uiIronDoorTimer(0), - m_uiDoorStep(0) + m_uiIronDoorTimer(0) { Initialize(); } @@ -121,12 +120,29 @@ void instance_deadmines::SetData(uint32 uiType, uint32 uiData) { if (uiData == IN_PROGRESS) { - if (GameObject* pGo = GetSingleGameObjectFromStorage(GO_IRON_CLAD_DOOR)) + DoUseDoorOrButton(GO_IRON_CLAD_DOOR, 0, true); + m_uiIronDoorTimer = 15000; + + if (Creature* pMrSmite = GetSingleCreatureFromStorage(NPC_MR_SMITE)) + DoScriptText(INST_SAY_ALARM1, pMrSmite); + + if (GameObject* pDoor = GetSingleGameObjectFromStorage(GO_IRON_CLAD_DOOR)) { - pGo->SetGoState(GO_STATE_ACTIVE_ALTERNATIVE); - m_uiIronDoorTimer = 3000; + // should be static spawns, fetch the closest ones at the pier + if (Creature* pi1 = GetClosestCreatureWithEntry(pDoor, NPC_PIRATE, 40.0f)) + { + pi1->SetWalk(false); + pi1->GetMotionMaster()->MovePoint(0, pDoor->GetPositionX(), pDoor->GetPositionY(), pDoor->GetPositionZ()); + } + + if (Creature* pi2 = GetClosestCreatureWithEntry(pDoor, NPC_SQUALLSHAPER, 40.0f)) + { + pi2->SetWalk(false); + pi2->GetMotionMaster()->MovePoint(0, pDoor->GetPositionX(), pDoor->GetPositionY(), pDoor->GetPositionZ()); + } } } + m_auiEncounter[0] = uiData; break; } @@ -157,46 +173,9 @@ void instance_deadmines::Update(uint32 uiDiff) if (m_uiIronDoorTimer <= uiDiff) { if (Creature* pMrSmite = GetSingleCreatureFromStorage(NPC_MR_SMITE)) - { - switch(m_uiDoorStep) - { - case 0: - DoScriptText(INST_SAY_ALARM1,pMrSmite); - m_uiIronDoorTimer = 2000; - ++m_uiDoorStep; - break; - case 1: - { - if (GameObject* pDoor = GetSingleGameObjectFromStorage(GO_IRON_CLAD_DOOR)) - { - // should be static spawns, fetch the closest ones at the pier - if (Creature* pi1 = GetClosestCreatureWithEntry(pDoor, NPC_PIRATE, 40.0f)) - { - pi1->SetWalk(false); - pi1->GetMotionMaster()->MovePoint(0, pDoor->GetPositionX(), pDoor->GetPositionY(), pDoor->GetPositionZ()); - } - - if (Creature* pi2 = GetClosestCreatureWithEntry(pDoor, NPC_SQUALLSHAPER, 40.0f)) - { - pi2->SetWalk(false); - pi2->GetMotionMaster()->MovePoint(0, pDoor->GetPositionX(), pDoor->GetPositionY(), pDoor->GetPositionZ()); - } - } - - ++m_uiDoorStep; - m_uiIronDoorTimer = 10000; - break; - } - case 2: - DoScriptText(INST_SAY_ALARM2,pMrSmite); - m_uiDoorStep = 0; - m_uiIronDoorTimer = 0; - debug_log("SD2: Instance Deadmines: Iron door event reached end."); - break; - } - } - else - m_uiIronDoorTimer = 0; + DoScriptText(INST_SAY_ALARM2, pMrSmite); + + m_uiIronDoorTimer = 0; } else m_uiIronDoorTimer -= uiDiff; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 910aa6218..9c6da5b67 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2299" + #define SD2_REVISION_NR "2300" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 4f1756f3b..afa7819ec 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -791,8 +791,8 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen -- -1 036 000 DEADMINES INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES -(-1036000,'You there, check out that noise.',5775,1,7,0,'smite INST_SAY_ALARM1'), -(-1036001,'We\'re under attack! A vast, ye swabs! Repel the invaders!',5777,1,7,0,'smite INST_SAY_ALARM2'), +(-1036000,'You there, check out that noise.',5775,6,7,0,'smite INST_SAY_ALARM1'), +(-1036001,'We\'re under attack! A vast, ye swabs! Repel the invaders!',5777,6,7,0,'smite INST_SAY_ALARM2'), (-1036002,'You land lubbers are tougher than I thought! I\'ll have to improvise!',5778,0,0,21,'smite SAY_PHASE_2'), (-1036003,'D\'ah! Now you\'re making me angry!',5779,0,0,15,'smite SAY_PHASE_3'); diff --git a/sql/updates/r2300_scriptdev2.sql b/sql/updates/r2300_scriptdev2.sql new file mode 100644 index 000000000..cdfd62dc9 --- /dev/null +++ b/sql/updates/r2300_scriptdev2.sql @@ -0,0 +1 @@ +UPDATE script_texts SET type=6 WHERE entry IN (-1036000, -1036001); From c81e1173d741ca2b68512b2a6f42860efa6e0a61 Mon Sep 17 00:00:00 2001 From: stfx Date: Mon, 26 Sep 2011 19:49:59 +0200 Subject: [PATCH 0283/1172] [2301] Let SD2 wrapper to change equipment to use MaNGOS wrapper Signed-off-by: Schmoozerd --- include/sc_creature.cpp | 16 ++++++++-------- include/sc_creature.h | 2 +- sd2_revision_nr.h | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/include/sc_creature.cpp b/include/sc_creature.cpp index d426a1f10..c625da773 100644 --- a/include/sc_creature.cpp +++ b/include/sc_creature.cpp @@ -474,22 +474,22 @@ Player* ScriptedAI::GetPlayerAtMinimumRange(float fMinimumRange) return pPlayer; } -void ScriptedAI::SetEquipmentSlots(bool bLoadDefault, int32 uiMainHand, int32 uiOffHand, int32 uiRanged) +void ScriptedAI::SetEquipmentSlots(bool bLoadDefault, int32 iMainHand, int32 iOffHand, int32 iRanged) { if (bLoadDefault) { - m_creature->LoadEquipment(m_creature->GetCreatureInfo()->equipmentId,true); + m_creature->LoadEquipment(m_creature->GetCreatureInfo()->equipmentId, true); return; } - if (uiMainHand >= 0) - m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID + 0, uint32(uiMainHand)); + if (iMainHand >= 0) + m_creature->SetVirtualItem(VIRTUAL_ITEM_SLOT_0, iMainHand); - if (uiOffHand >= 0) - m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID + 1, uint32(uiOffHand)); + if (iOffHand >= 0) + m_creature->SetVirtualItem(VIRTUAL_ITEM_SLOT_1, iOffHand); - if (uiRanged >= 0) - m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID + 2, uint32(uiRanged)); + if (iRanged >= 0) + m_creature->SetVirtualItem(VIRTUAL_ITEM_SLOT_2, iRanged); } void ScriptedAI::SetCombatMovement(bool bCombatMove) diff --git a/include/sc_creature.h b/include/sc_creature.h index 8dc26c5fe..ad14bea2f 100644 --- a/include/sc_creature.h +++ b/include/sc_creature.h @@ -211,7 +211,7 @@ struct MANGOS_DLL_DECL ScriptedAI : public CreatureAI // Checks if you can cast the specified spell bool CanCast(Unit* pTarget, SpellEntry const* pSpell, bool bTriggered = false); - void SetEquipmentSlots(bool bLoadDefault, int32 uiMainHand = EQUIP_NO_CHANGE, int32 uiOffHand = EQUIP_NO_CHANGE, int32 uiRanged = EQUIP_NO_CHANGE); + void SetEquipmentSlots(bool bLoadDefault, int32 iMainHand = EQUIP_NO_CHANGE, int32 iOffHand = EQUIP_NO_CHANGE, int32 iRanged = EQUIP_NO_CHANGE); // Generally used to control if MoveChase() is to be used or not in AttackStart(). Some creatures do not chase victims void SetCombatMovement(bool bCombatMove); diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 9c6da5b67..70db8f69a 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2300" + #define SD2_REVISION_NR "2301" #endif // __SD2_REVISION_NR_H__ From 9438d49b62f81d543489b87e8c8e60d94afb1fcd Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Wed, 5 Oct 2011 11:41:55 +0200 Subject: [PATCH 0284/1172] [2302] Reorder TYPE_ enums in hyjal. Requires Acid 3.0.9 --- .../kalimdor/caverns_of_time/hyjal/hyjal.h | 19 ++++------- .../caverns_of_time/hyjal/instance_hyjal.cpp | 34 ++++++------------- sd2_revision_nr.h | 2 +- 3 files changed, 18 insertions(+), 37 deletions(-) diff --git a/scripts/kalimdor/caverns_of_time/hyjal/hyjal.h b/scripts/kalimdor/caverns_of_time/hyjal/hyjal.h index 1a3236886..9f4672fb0 100644 --- a/scripts/kalimdor/caverns_of_time/hyjal/hyjal.h +++ b/scripts/kalimdor/caverns_of_time/hyjal/hyjal.h @@ -11,19 +11,12 @@ enum TYPE_WINTERCHILL = 0, TYPE_ANETHERON = 1, - // TYPE_ANETHERON_OLD = 2, // Used in Acid - TYPE_KAZROGAL = 3, - TYPE_AZGALOR = 4, - TYPE_ARCHIMONDE = 5, - - // TYPE_AZGALOR_OLD = 6, // Used in Acid - TYPE_TRASH_COUNT = 7, - TYPE_RETREAT = 8, - - // ACID scripted, don't touch id's (or provide update for ACID), in Acid scripted SetData types: 11, 2, 9, 6 and 14 - // TYPE_WINTERCHILL_OLD = 11, - // DATA_TRASH_OLD = 14, - // TYPE_KAZROGAL_OLD = 9, + TYPE_KAZROGAL = 2, + TYPE_AZGALOR = 3, + TYPE_ARCHIMONDE = 4, + + TYPE_TRASH_COUNT = 5, + TYPE_RETREAT = 6, WORLD_STATE_WAVES = 2842, WORLD_STATE_ENEMY = 2453, diff --git a/scripts/kalimdor/caverns_of_time/hyjal/instance_hyjal.cpp b/scripts/kalimdor/caverns_of_time/hyjal/instance_hyjal.cpp index 257d19aa8..acd64064c 100644 --- a/scripts/kalimdor/caverns_of_time/hyjal/instance_hyjal.cpp +++ b/scripts/kalimdor/caverns_of_time/hyjal/instance_hyjal.cpp @@ -122,27 +122,15 @@ void instance_mount_hyjal::SetData(uint32 uiType, uint32 uiData) switch(uiType) { case TYPE_WINTERCHILL: - if (m_auiEncounter[0] == DONE) - return; - m_auiEncounter[0] = uiData; - break; case TYPE_ANETHERON: - if (m_auiEncounter[1] == DONE) - return; - m_auiEncounter[1] = uiData; - break; case TYPE_KAZROGAL: - if (m_auiEncounter[2] == DONE) - return; - m_auiEncounter[2] = uiData; - break; case TYPE_AZGALOR: - if (m_auiEncounter[3] == DONE) + if (m_auiEncounter[uiType] == DONE) return; - m_auiEncounter[3] = uiData; + m_auiEncounter[uiType] = uiData; break; case TYPE_ARCHIMONDE: - m_auiEncounter[4] = uiData; + m_auiEncounter[uiType] = uiData; break; case TYPE_TRASH_COUNT: @@ -186,14 +174,14 @@ uint32 instance_mount_hyjal::GetData(uint32 uiType) { switch(uiType) { - case TYPE_WINTERCHILL: return m_auiEncounter[0]; - case TYPE_ANETHERON: return m_auiEncounter[1]; - case TYPE_KAZROGAL: return m_auiEncounter[2]; - case TYPE_AZGALOR: return m_auiEncounter[3]; - case TYPE_ARCHIMONDE: return m_auiEncounter[4]; - - case TYPE_TRASH_COUNT: return m_uiTrashCount; - + case TYPE_WINTERCHILL: + case TYPE_ANETHERON: + case TYPE_KAZROGAL: + case TYPE_AZGALOR: + case TYPE_ARCHIMONDE: + return m_auiEncounter[uiType]; + case TYPE_TRASH_COUNT: + return m_uiTrashCount; default: return 0; } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 70db8f69a..0177a5d43 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2301" + #define SD2_REVISION_NR "2302" #endif // __SD2_REVISION_NR_H__ From 623418385a02f56954ae808391b422fdb6cdbad7 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Wed, 5 Oct 2011 11:48:59 +0200 Subject: [PATCH 0285/1172] [2303] Reorder TYPE_ enums in sunken temple. Requires Acid 3.0.9 --- .../sunken_temple/instance_sunken_temple.cpp | 30 +++++++------------ .../sunken_temple/sunken_temple.h | 15 ++++------ sd2_revision_nr.h | 2 +- 3 files changed, 16 insertions(+), 31 deletions(-) diff --git a/scripts/eastern_kingdoms/sunken_temple/instance_sunken_temple.cpp b/scripts/eastern_kingdoms/sunken_temple/instance_sunken_temple.cpp index 6b425b507..7c0903a3a 100644 --- a/scripts/eastern_kingdoms/sunken_temple/instance_sunken_temple.cpp +++ b/scripts/eastern_kingdoms/sunken_temple/instance_sunken_temple.cpp @@ -46,7 +46,7 @@ void instance_sunken_temple::OnObjectCreate(GameObject* pGo) switch(pGo->GetEntry()) { case GO_JAMMALAN_BARRIER: - if (m_auiEncounter[1] == DONE) + if (m_auiEncounter[TYPE_PROTECTORS] == DONE) pGo->SetGoState(GO_STATE_ACTIVE); break; case GO_IDOL_OF_HAKKAR: @@ -137,7 +137,7 @@ void instance_sunken_temple::SetData(uint32 uiType, uint32 uiData) case TYPE_ATALARION: if (uiData == SPECIAL) DoSpawnAtalarionIfCan(); - m_auiEncounter[0] = uiData; + m_auiEncounter[uiType] = uiData; break; case TYPE_PROTECTORS: if (uiData == DONE) @@ -145,7 +145,7 @@ void instance_sunken_temple::SetData(uint32 uiType, uint32 uiData) --m_uiProtectorsRemaining; if (!m_uiProtectorsRemaining) { - m_auiEncounter[1] = uiData; + m_auiEncounter[uiType] = uiData; DoUseDoorOrButton(GO_JAMMALAN_BARRIER); // Intro yell DoOrSimulateScriptTextForThisInstance(SAY_JAMMALAN_INTRO, NPC_JAMMALAN); @@ -153,10 +153,7 @@ void instance_sunken_temple::SetData(uint32 uiType, uint32 uiData) } break; case TYPE_JAMMALAN: - m_auiEncounter[2] = uiData; - break; - case TYPE_MALFURION: - m_auiEncounter[3] = uiData; + m_auiEncounter[uiType] = uiData; break; case TYPE_AVATAR: if (uiData == SPECIAL) @@ -192,7 +189,7 @@ void instance_sunken_temple::SetData(uint32 uiType, uint32 uiData) } // Prevent double processing - if (m_auiEncounter[4] == uiData) + if (m_auiEncounter[uiType] == uiData) return; if (uiData == IN_PROGRESS) @@ -236,7 +233,7 @@ void instance_sunken_temple::SetData(uint32 uiType, uint32 uiData) DoUseDoorOrButton(GO_HAKKAR_DOOR_1); DoUseDoorOrButton(GO_HAKKAR_DOOR_2); - m_auiEncounter[4] = uiData; + m_auiEncounter[uiType] = uiData; break; } @@ -344,22 +341,15 @@ void instance_sunken_temple::Load(const char* chrIn) uint32 instance_sunken_temple::GetData(uint32 uiType) { - switch(uiType) - { - case TYPE_ATALARION: return m_auiEncounter[0]; - case TYPE_PROTECTORS: return m_auiEncounter[1]; - case TYPE_JAMMALAN: return m_auiEncounter[2]; - case TYPE_MALFURION: return m_auiEncounter[3]; - case TYPE_AVATAR: return m_auiEncounter[4]; + if (uiType < MAX_ENCOUNTER) + return m_auiEncounter[uiType]; - default: - return 0; - } + return 0; } void instance_sunken_temple::Update(uint32 uiDiff) { - if (m_auiEncounter[4] != IN_PROGRESS) + if (m_auiEncounter[TYPE_AVATAR] != IN_PROGRESS) return; // Summon random mobs around the circles diff --git a/scripts/eastern_kingdoms/sunken_temple/sunken_temple.h b/scripts/eastern_kingdoms/sunken_temple/sunken_temple.h index c55e7d32e..9dc96ba69 100644 --- a/scripts/eastern_kingdoms/sunken_temple/sunken_temple.h +++ b/scripts/eastern_kingdoms/sunken_temple/sunken_temple.h @@ -11,16 +11,11 @@ enum MAX_STATUES = 6, MAX_FLAMES = 4, - // Don't change types 1,2 and 3 (handled in ACID) - TYPE_ATALARION_OBSOLET= 1, - TYPE_PROTECTORS_OBS = 2, - TYPE_JAMMALAN_OBS = 3, - - TYPE_ATALARION = 4, - TYPE_PROTECTORS = 5, - TYPE_JAMMALAN = 6, - TYPE_MALFURION = 7, - TYPE_AVATAR = 8, + TYPE_ATALARION = 0, + TYPE_PROTECTORS = 1, + TYPE_JAMMALAN = 2, + TYPE_MALFURION = 3, + TYPE_AVATAR = 4, NPC_ATALARION = 8580, NPC_DREAMSCYTH = 5721, diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 0177a5d43..1e0a25ec5 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2302" + #define SD2_REVISION_NR "2303" #endif // __SD2_REVISION_NR_H__ From a0f3636424c469d39ef8293f222fc62acf3d3566 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Wed, 5 Oct 2011 11:55:11 +0200 Subject: [PATCH 0286/1172] [2304] Reorder TYPE_ enums in stratholme. Requires Acid 3.0.9 --- .../stratholme/instance_stratholme.cpp | 32 ++++++++----------- .../eastern_kingdoms/stratholme/stratholme.h | 7 ++-- sd2_revision_nr.h | 2 +- 3 files changed, 17 insertions(+), 24 deletions(-) diff --git a/scripts/eastern_kingdoms/stratholme/instance_stratholme.cpp b/scripts/eastern_kingdoms/stratholme/instance_stratholme.cpp index 109c6ba4e..76de2ac4f 100644 --- a/scripts/eastern_kingdoms/stratholme/instance_stratholme.cpp +++ b/scripts/eastern_kingdoms/stratholme/instance_stratholme.cpp @@ -283,7 +283,7 @@ void instance_stratholme::SetData(uint32 uiType, uint32 uiData) SetData(TYPE_BARON_RUN, DONE); // Close Slaughterhouse door if needed - if (m_auiEncounter[5] == FAIL) // TODO + if (m_auiEncounter[uiType] == FAIL) DoUseDoorOrButton(GO_PORT_GAUNTLET); } if (uiData == DONE) @@ -322,7 +322,7 @@ void instance_stratholme::SetData(uint32 uiType, uint32 uiData) if (uiData == FAIL) DoUseDoorOrButton(GO_PORT_GAUNTLET); - m_auiEncounter[5] = uiData; // TODO + m_auiEncounter[uiType] = uiData; break; case TYPE_BARTHILAS_RUN: if (uiData == IN_PROGRESS) @@ -337,15 +337,15 @@ void instance_stratholme::SetData(uint32 uiType, uint32 uiData) m_uiBarthilasRunTimer = 8000; } } - m_auiEncounter[6] = uiData; // TODO + m_auiEncounter[uiType] = uiData; break; case TYPE_BLACK_GUARDS: // Prevent double action - if (m_auiEncounter[7] == uiData) // TODO + if (m_auiEncounter[uiType] == uiData) return; // Restart after failure, close Gauntlet - if (uiData == IN_PROGRESS && m_auiEncounter[7] == FAIL) + if (uiData == IN_PROGRESS && m_auiEncounter[uiType] == FAIL) DoUseDoorOrButton(GO_PORT_GAUNTLET); // Wipe case - open gauntlet if (uiData == FAIL) @@ -356,7 +356,7 @@ void instance_stratholme::SetData(uint32 uiType, uint32 uiData) DoScriptText(SAY_UNDEAD_DEFEAT, pBaron); DoUseDoorOrButton(GO_ZIGGURAT_DOOR_5); } - m_auiEncounter[7] = uiData; // TODO + m_auiEncounter[uiType] = uiData; // No need to save anything here, so return return; @@ -414,12 +414,12 @@ void instance_stratholme::Load(const char* chrIn) } // Special Treatment for the Ziggurat-Bosses, as otherwise the event couldn't reload - if (m_auiEncounter[1] == DONE) - m_auiEncounter[1] = SPECIAL; - if (m_auiEncounter[2] == DONE) - m_auiEncounter[2] = SPECIAL; - if (m_auiEncounter[3] == DONE) - m_auiEncounter[3] = SPECIAL; + if (m_auiEncounter[TYPE_BARONESS] == DONE) + m_auiEncounter[TYPE_BARONESS] = SPECIAL; + if (m_auiEncounter[TYPE_NERUB] == DONE) + m_auiEncounter[TYPE_NERUB] = SPECIAL; + if (m_auiEncounter[TYPE_PALLID] == DONE) + m_auiEncounter[TYPE_PALLID] = SPECIAL; OUT_LOAD_INST_DATA_COMPLETE; } @@ -433,19 +433,13 @@ uint32 instance_stratholme::GetData(uint32 uiType) return 1; return 0; case TYPE_BARON_RUN: - return m_auiEncounter[0]; case TYPE_BARONESS: - return m_auiEncounter[1]; case TYPE_NERUB: - return m_auiEncounter[2]; case TYPE_PALLID: - return m_auiEncounter[3]; case TYPE_RAMSTEIN: - return m_auiEncounter[4]; case TYPE_BARON: - return m_auiEncounter[5]; case TYPE_BARTHILAS_RUN: - return m_auiEncounter[6]; + return m_auiEncounter[uiType]; default: return 0; } diff --git a/scripts/eastern_kingdoms/stratholme/stratholme.h b/scripts/eastern_kingdoms/stratholme/stratholme.h index d9f3a8ee4..ca2e19650 100644 --- a/scripts/eastern_kingdoms/stratholme/stratholme.h +++ b/scripts/eastern_kingdoms/stratholme/stratholme.h @@ -16,10 +16,9 @@ enum TYPE_NERUB = TYPE_BARONESS + 1, // Assert that these three TYPEs are in correct order. TYPE_PALLID = TYPE_BARONESS + 2, TYPE_RAMSTEIN = 4, - TYPE_RAMSTEIN_OBSOLETE = 5, // Still set in Acid, remove when removed from Acid :) - TYPE_BARON = 6, // Adapt then - TYPE_BARTHILAS_RUN = 7, - TYPE_BLACK_GUARDS = 8, + TYPE_BARON = 5, + TYPE_BARTHILAS_RUN = 6, + TYPE_BLACK_GUARDS = 7, TYPE_SH_QUEST = 20, TYPE_SH_CATHELA = 21, diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 1e0a25ec5..412950944 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2303" + #define SD2_REVISION_NR "2304" #endif // __SD2_REVISION_NR_H__ From 799047aef345c42979f7d2ee9157b9113f624701 Mon Sep 17 00:00:00 2001 From: stfx Date: Thu, 6 Oct 2011 16:22:10 +0200 Subject: [PATCH 0287/1172] [2305] Add better support for CHAT_TYPE_ZONE_YELL. Requires MaNGOS [11812] * Improve a few style thingies * Fix a bug that would play sound with the Simulate function without having ZONE_YELL tpye * Add support to play sound of ZONE_YELL to the whole zone * Add support for whispered sound (currently unused) Signed-off-by: Schmoozerd --- ScriptMgr.cpp | 34 +++++++++++++++++++++----------- sd2_revision_nr.h | 2 +- sql/scriptdev2_script_full.sql | 2 +- sql/updates/r2305_scriptdev2.sql | 1 + 4 files changed, 25 insertions(+), 14 deletions(-) create mode 100644 sql/updates/r2305_scriptdev2.sql diff --git a/ScriptMgr.cpp b/ScriptMgr.cpp index 04c9ebb32..d12e8b2b1 100644 --- a/ScriptMgr.cpp +++ b/ScriptMgr.cpp @@ -151,7 +151,6 @@ void DoScriptText(int32 iTextEntry, WorldObject* pSource, Unit* pTarget) } const StringTextData* pData = pSystemMgr.GetTextData(iTextEntry); - if (!pData) { error_log("SD2: DoScriptText with source entry %u (TypeId=%u, guid=%u) could not find text entry %i.", @@ -166,7 +165,18 @@ void DoScriptText(int32 iTextEntry, WorldObject* pSource, Unit* pTarget) if (pData->uiSoundId) { if (GetSoundEntriesStore()->LookupEntry(pData->uiSoundId)) - pSource->PlayDirectSound(pData->uiSoundId); + { + if (pData->uiType == CHAT_TYPE_ZONE_YELL) + pSource->GetMap()->PlayDirectSoundToMap(pData->uiSoundId, pSource->GetZoneId()); + else if (pData->uiType == CHAT_TYPE_WHISPER || pData->uiType == CHAT_TYPE_BOSS_WHISPER) + { + // An error will be displayed for the text + if (pTarget && pTarget->GetTypeId() == TYPEID_PLAYER) + pSource->PlayDirectSound(pData->uiSoundId, (Player*)pTarget); + } + else + pSource->PlayDirectSound(pData->uiSoundId); + } else error_log("SD2: DoScriptText entry %i tried to process invalid sound id %u.", iTextEntry, pData->uiSoundId); } @@ -248,7 +258,6 @@ void DoOrSimulateScriptTextForMap(int32 iTextEntry, uint32 uiCreatureEntry, Map* } const StringTextData* pData = pSystemMgr.GetTextData(iTextEntry); - if (!pData) { error_log("SD2: DoOrSimulateScriptTextForMap with source entry %u for map %u could not find text entry %i.", uiCreatureEntry, pMap->GetId(), iTextEntry); @@ -258,6 +267,12 @@ void DoOrSimulateScriptTextForMap(int32 iTextEntry, uint32 uiCreatureEntry, Map* debug_log("SD2: DoOrSimulateScriptTextForMap: text entry=%i, Sound=%u, Type=%u, Language=%u, Emote=%u", iTextEntry, pData->uiSoundId, pData->uiType, pData->uiLanguage, pData->uiEmote); + if (pData->uiType != CHAT_TYPE_ZONE_YELL) + { + error_log("SD2: DoSimulateScriptTextForMap entry %i has not supported chat type %u.", iTextEntry, pData->uiType); + return; + } + if (pData->uiSoundId) { if (GetSoundEntriesStore()->LookupEntry(pData->uiSoundId)) @@ -266,15 +281,10 @@ void DoOrSimulateScriptTextForMap(int32 iTextEntry, uint32 uiCreatureEntry, Map* error_log("SD2: DoOrSimulateScriptTextForMap entry %i tried to process invalid sound id %u.", iTextEntry, pData->uiSoundId); } - if (pData->uiType == CHAT_TYPE_ZONE_YELL) - { - if (pCreatureSource) // If provided pointer for sayer, use direct version - pMap->MonsterYellToMap(pCreatureSource->GetObjectGuid(), iTextEntry, pData->uiLanguage, pTarget); - else // Simulate yell - pMap->MonsterYellToMap(pInfo, iTextEntry, pData->uiLanguage, pTarget); - } - else - error_log("SD2: DoSimulateScriptTextForMap entry %i has not supported chat type %u.", iTextEntry, pData->uiType); + if (pCreatureSource) // If provided pointer for sayer, use direct version + pMap->MonsterYellToMap(pCreatureSource->GetObjectGuid(), iTextEntry, pData->uiLanguage, pTarget); + else // Simulate yell + pMap->MonsterYellToMap(pInfo, iTextEntry, pData->uiLanguage, pTarget); } //********************************* diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 412950944..7046d8154 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2304" + #define SD2_REVISION_NR "2305" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index afa7819ec..ffb6bc9bb 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -3,7 +3,7 @@ -- DELETE FROM sd2_db_version; -INSERT INTO sd2_db_version (version) VALUES ('ScriptDev2 (for MaNGOS 11720+) '); +INSERT INTO sd2_db_version (version) VALUES ('ScriptDev2 (for MaNGOS 11812+) '); -- -- Below contains data for table `script_texts` mainly used in C++ parts. diff --git a/sql/updates/r2305_scriptdev2.sql b/sql/updates/r2305_scriptdev2.sql new file mode 100644 index 000000000..2965bfc8c --- /dev/null +++ b/sql/updates/r2305_scriptdev2.sql @@ -0,0 +1 @@ +UPDATE sd2_db_version SET version='ScriptDev2 (for MaNGOS 11812+) '; From 7a7e7cfcab39f6f8fd47239ba0e697a65a2a89d1 Mon Sep 17 00:00:00 2001 From: stfx Date: Thu, 6 Oct 2011 16:45:30 +0200 Subject: [PATCH 0288/1172] [2306] Add save & load support for Deadmines * Improve code in a few places * Remove unneeded script for a lever Signed-off-by: Schmoozerd --- .../eastern_kingdoms/deadmines/deadmines.cpp | 46 +++-------- .../eastern_kingdoms/deadmines/deadmines.h | 15 ++-- .../deadmines/instance_deadmines.cpp | 80 ++++++++++++------- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 - sql/updates/r2306_mangos.sql | 1 + 6 files changed, 76 insertions(+), 69 deletions(-) create mode 100644 sql/updates/r2306_mangos.sql diff --git a/scripts/eastern_kingdoms/deadmines/deadmines.cpp b/scripts/eastern_kingdoms/deadmines/deadmines.cpp index f863d9936..5a85c3e89 100644 --- a/scripts/eastern_kingdoms/deadmines/deadmines.cpp +++ b/scripts/eastern_kingdoms/deadmines/deadmines.cpp @@ -271,21 +271,6 @@ CreatureAI* GetAI_boss_mr_smite(Creature* pCreature) return new boss_mr_smiteAI(pCreature); } -bool GOUse_go_door_lever_dm(Player* pPlayer, GameObject* pGo) -{ - ScriptedInstance* pInstance = (ScriptedInstance*)pGo->GetInstanceData(); - - if (!pInstance) - return false; - - GameObject* pGoDoor = pInstance->GetSingleGameObjectFromStorage(GO_IRON_CLAD_DOOR); - - if (pGoDoor && pGoDoor->GetGoState() == GO_STATE_READY) - return false; - - return true; -} - bool GOUse_go_defias_cannon(Player* pPlayer, GameObject* pGo) { ScriptedInstance* pInstance = (ScriptedInstance*)pGo->GetInstanceData(); @@ -293,29 +278,24 @@ bool GOUse_go_defias_cannon(Player* pPlayer, GameObject* pGo) if (!pInstance) return false; - if (pInstance->GetData(TYPE_DEFIAS_ENDDOOR) == DONE || pInstance->GetData(TYPE_DEFIAS_ENDDOOR) == IN_PROGRESS) + if (pInstance->GetData(TYPE_IRON_CLAD_DOOR) == DONE) return false; - pInstance->SetData(TYPE_DEFIAS_ENDDOOR, IN_PROGRESS); + pInstance->SetData(TYPE_IRON_CLAD_DOOR, DONE); return false; } void AddSC_deadmines() { - Script *newscript; - - newscript = new Script; - newscript->Name = "boss_mr_smite"; - newscript->GetAI = &GetAI_boss_mr_smite; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "go_door_lever_dm"; - newscript->pGOUse = &GOUse_go_door_lever_dm; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "go_defias_cannon"; - newscript->pGOUse = &GOUse_go_defias_cannon; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_mr_smite"; + pNewScript->GetAI = &GetAI_boss_mr_smite; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "go_defias_cannon"; + pNewScript->pGOUse = &GOUse_go_defias_cannon; + pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/deadmines/deadmines.h b/scripts/eastern_kingdoms/deadmines/deadmines.h index 747098463..b297dd114 100644 --- a/scripts/eastern_kingdoms/deadmines/deadmines.h +++ b/scripts/eastern_kingdoms/deadmines/deadmines.h @@ -9,20 +9,19 @@ enum { MAX_ENCOUNTER = 4, - TYPE_DEFIAS_ENDDOOR = 1, - TYPE_RHAHKZOR = 2, - TYPE_SNEED = 3, - TYPE_GILNID = 4, + TYPE_RHAHKZOR = 0, + TYPE_SNEED = 1, + TYPE_GILNID = 2, + TYPE_IRON_CLAD_DOOR = 3, INST_SAY_ALARM1 = -1036000, INST_SAY_ALARM2 = -1036001, GO_FACTORY_DOOR = 13965, // rhahk'zor - GO_FOUNDRY_DOOR = 16399, // gilnid GO_MAST_ROOM_DOOR = 16400, // sneed + GO_FOUNDRY_DOOR = 16399, // gilnid GO_HEAVY_DOOR_1 = 17153, // to sneed GO_HEAVY_DOOR_2 = 17154, // to gilnid - GO_DOOR_LEVER = 101833, GO_IRON_CLAD_DOOR = 16397, GO_DEFIAS_CANNON = 16398, GO_SMITE_CHEST = 144111, // use to get correct location of mr.smites equipment changes @@ -50,10 +49,14 @@ class MANGOS_DLL_DECL instance_deadmines : public ScriptedInstance void SetData(uint32 uiType, uint32 uiData); uint32 GetData(uint32 uiType); + const char* Save() { return m_strInstData.c_str(); } + void Load(const char* chrIn); + void Update(uint32 uiDiff); private: uint32 m_auiEncounter[MAX_ENCOUNTER]; + std::string m_strInstData; uint32 m_uiIronDoorTimer; }; diff --git a/scripts/eastern_kingdoms/deadmines/instance_deadmines.cpp b/scripts/eastern_kingdoms/deadmines/instance_deadmines.cpp index 050ef6321..d269d8bc2 100644 --- a/scripts/eastern_kingdoms/deadmines/instance_deadmines.cpp +++ b/scripts/eastern_kingdoms/deadmines/instance_deadmines.cpp @@ -46,21 +46,25 @@ void instance_deadmines::OnObjectCreate(GameObject* pGo) switch(pGo->GetEntry()) { case GO_FACTORY_DOOR: - if (GetData(TYPE_RHAHKZOR) == DONE) + if (m_auiEncounter[TYPE_RHAHKZOR] == DONE) pGo->SetGoState(GO_STATE_ACTIVE); break; case GO_MAST_ROOM_DOOR: - if (GetData(TYPE_SNEED) == DONE) + if (m_auiEncounter[TYPE_SNEED] == DONE) pGo->SetGoState(GO_STATE_ACTIVE); break; case GO_FOUNDRY_DOOR: - if (GetData(TYPE_GILNID) == DONE) + if (m_auiEncounter[TYPE_GILNID] == DONE) pGo->SetGoState(GO_STATE_ACTIVE); break; case GO_IRON_CLAD_DOOR: + if (m_auiEncounter[TYPE_IRON_CLAD_DOOR] == DONE) + pGo->SetGoState(GO_STATE_ACTIVE_ALTERNATIVE); + + break; case GO_DEFIAS_CANNON: case GO_SMITE_CHEST: break; @@ -76,15 +80,9 @@ void instance_deadmines::OnCreatureDeath(Creature* pCreature) { switch(pCreature->GetEntry()) { - case NPC_RHAHKZOR: - SetData(TYPE_RHAHKZOR, DONE); - break; - case NPC_SNEED: - SetData(TYPE_SNEED, DONE); - break; - case NPC_GILNID: - SetData(TYPE_GILNID, DONE); - break; + case NPC_RHAHKZOR: SetData(TYPE_RHAHKZOR, DONE); break; + case NPC_SNEED: SetData(TYPE_SNEED, DONE); break; + case NPC_GILNID: SetData(TYPE_GILNID, DONE); break; } } @@ -97,7 +95,7 @@ void instance_deadmines::SetData(uint32 uiType, uint32 uiData) if (uiData == DONE) DoUseDoorOrButton(GO_FACTORY_DOOR); - m_auiEncounter[1] = uiData; + m_auiEncounter[uiType] = uiData; break; } case TYPE_SNEED: @@ -105,7 +103,7 @@ void instance_deadmines::SetData(uint32 uiType, uint32 uiData) if (uiData == DONE) DoUseDoorOrButton(GO_MAST_ROOM_DOOR); - m_auiEncounter[2] = uiData; + m_auiEncounter[uiType] = uiData; break; } case TYPE_GILNID: @@ -113,12 +111,12 @@ void instance_deadmines::SetData(uint32 uiType, uint32 uiData) if (uiData == DONE) DoUseDoorOrButton(GO_FOUNDRY_DOOR); - m_auiEncounter[3] = uiData; + m_auiEncounter[uiType] = uiData; break; } - case TYPE_DEFIAS_ENDDOOR: + case TYPE_IRON_CLAD_DOOR: { - if (uiData == IN_PROGRESS) + if (uiData == DONE) { DoUseDoorOrButton(GO_IRON_CLAD_DOOR, 0, true); m_uiIronDoorTimer = 15000; @@ -143,27 +141,53 @@ void instance_deadmines::SetData(uint32 uiType, uint32 uiData) } } - m_auiEncounter[0] = uiData; + m_auiEncounter[uiType] = uiData; break; } } + + if (uiData == DONE) + { + OUT_SAVE_INST_DATA; + + std::ostringstream saveStream; + saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2] << " " << m_auiEncounter[3]; + + m_strInstData = saveStream.str(); + + SaveToDB(); + OUT_SAVE_INST_DATA_COMPLETE; + } } uint32 instance_deadmines::GetData(uint32 uiType) { - switch(uiType) + if (uiType < MAX_ENCOUNTER) + return m_auiEncounter[uiType]; + + return 0; +} + +void instance_deadmines::Load(const char* chrIn) +{ + if (!chrIn) { - case TYPE_DEFIAS_ENDDOOR: - return m_auiEncounter[0]; - case TYPE_RHAHKZOR: - return m_auiEncounter[1]; - case TYPE_SNEED: - return m_auiEncounter[2]; - case TYPE_GILNID: - return m_auiEncounter[3]; + OUT_LOAD_INST_DATA_FAIL; + return; } - return 0; + OUT_LOAD_INST_DATA(chrIn); + + std::istringstream loadStream(chrIn); + loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3]; + + for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) + { + if (m_auiEncounter[i] == IN_PROGRESS) + m_auiEncounter[i] = NOT_STARTED; + } + + OUT_LOAD_INST_DATA_COMPLETE; } void instance_deadmines::Update(uint32 uiDiff) diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 7046d8154..6a9acf371 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2305" + #define SD2_REVISION_NR "2306" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 8d95c69f5..41e975f36 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -509,7 +509,6 @@ UPDATE creature_template SET ScriptName='npc_threshwackonator' WHERE entry=6669; UPDATE creature_template SET ScriptName='boss_mr_smite' WHERE entry=646; UPDATE instance_template SET ScriptName='instance_deadmines' WHERE map=36; UPDATE gameobject_template SET ScriptName='go_defias_cannon' WHERE entry=16398; -UPDATE gameobject_template SET ScriptName='go_door_lever_dm' WHERE entry=101833; /* DEADWIND PASS */ diff --git a/sql/updates/r2306_mangos.sql b/sql/updates/r2306_mangos.sql new file mode 100644 index 000000000..6f927771f --- /dev/null +++ b/sql/updates/r2306_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='' WHERE entry=101833; From 2c198613680a05cfa3393a57e6476d7677a1704f Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Thu, 6 Oct 2011 23:33:31 +0300 Subject: [PATCH 0289/1172] [2306.5] Thanks to NeatElves for pointing. Reapply sql update file from 2306 (Edit via Github) --- sql/updates/r2306_mangos.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql/updates/r2306_mangos.sql b/sql/updates/r2306_mangos.sql index 6f927771f..fcfcff321 100644 --- a/sql/updates/r2306_mangos.sql +++ b/sql/updates/r2306_mangos.sql @@ -1 +1 @@ -UPDATE creature_template SET ScriptName='' WHERE entry=101833; +UPDATE gameobject_template SET ScriptName='' WHERE entry=101833; From 562b7b9093749d2472f90e700da2bb35a3cf0c12 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sat, 8 Oct 2011 15:48:33 +0200 Subject: [PATCH 0290/1172] [2307] Implement Boss Auriaya in Ulduar, blame Xfurry if something is wrong :P Signed-off-by: Schmoozerd --- .../northrend/ulduar/ulduar/boss_auriaya.cpp | 316 +++++++++++++++++- .../ulduar/ulduar/instance_ulduar.cpp | 31 ++ scripts/northrend/ulduar/ulduar/ulduar.h | 12 + sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 2 + sql/updates/r2307_mangos.sql | 2 + 6 files changed, 363 insertions(+), 2 deletions(-) create mode 100644 sql/updates/r2307_mangos.sql diff --git a/scripts/northrend/ulduar/ulduar/boss_auriaya.cpp b/scripts/northrend/ulduar/ulduar/boss_auriaya.cpp index a20947d9d..3673333a0 100644 --- a/scripts/northrend/ulduar/ulduar/boss_auriaya.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_auriaya.cpp @@ -17,7 +17,7 @@ /* ScriptData SDName: boss_auriaya SD%Complete: 0% -SDComment: +SDComment: Aura Remove for Feral Defender needs love SDCategory: Ulduar EndScriptData */ @@ -33,9 +33,323 @@ enum SAY_DEATH = -1603083, EMOTE_SCREECH = -1603084, EMOTE_DEFENDER = -1603085, + + // Auriaya + SPELL_BERSERK = 47008, + SPELL_GUARDIAN_SWARM = 64396, // triggers 64397 + SPELL_SENTINEL_BLAST = 64389, // triggers 64392 + SPELL_SENTINEL_BLAST_H = 64678, // triggers 64679 + SPELL_SONIC_SCREECH = 64422, + SPELL_SONIC_SCREECH_H = 64688, + SPELL_TERRIFYING_SCREECH = 64386, + SPELL_ACTIVATE_FERAL_DEFENDER = 64449, // triggers 64447 + SPELL_ACTIVATE_FERAL_DEFENDER_TRIGG = 64448, + + // Feral Defender spells + SPELL_FERAL_ESSENCE = 64455, + SPELL_FERAL_ESSENCE_REMOVAL = 64456, // remove 1 stack of 64455 + SPELL_FERAL_POUNCE = 64478, + SPELL_FERAL_POUNCE_H = 64669, + SPELL_FERAL_RUSH = 64489, // should trigger repeatedly on random targets 64496 - 64674 + SPELL_SEEPING_FERAL_ESSENCE_SUMMON = 64457, + SPELL_FEIGN_DEATH = 64461, // dummy - possible related to the feral defender feign death - not used + SPELL_FULL_HEAL = 64460, // on feign death remove + + // Seeping Feral Essence + SPELL_SEEPING_FERAL_ESSENCE = 64458, + SPELL_SEEPING_FERAL_ESSENCE_H = 64676, + + //NPC_SEEPING_FERAL_ESSENCE = 34098, // summoned by the feral defender on feign death + //NPC_GUARDIAN_SWARN = 34034, // summoned by spell + NPC_FERAL_DEFENDER_STALKER = 34096, +}; + +struct MANGOS_DLL_DECL boss_auriayaAI : public ScriptedAI +{ + boss_auriayaAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (instance_ulduar*)pCreature->GetInstanceData(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); + Reset(); + } + + instance_ulduar* m_pInstance; + bool m_bIsRegularMode; + + uint32 m_uiEnrageTimer; + uint32 m_uiSwarmTimer; + uint32 m_uiSonicScreechTimer; + uint32 m_uiSentinelBlastTimer; + uint32 m_uiTerrifyingScreechTimer; + uint32 m_uiDefenderTimer; + + void Reset() + { + m_uiEnrageTimer = 10*MINUTE*IN_MILLISECONDS; + m_uiSwarmTimer = 50000; + m_uiSonicScreechTimer = 58000; + m_uiSentinelBlastTimer = 40000; + m_uiTerrifyingScreechTimer = 38000; + m_uiDefenderTimer = 1*MINUTE*IN_MILLISECONDS; + } + + void JustDied(Unit* pKiller) + { + DoScriptText(SAY_DEATH, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_AURIAYA, DONE); + } + + void Aggro(Unit* pWho) + { + if (m_pInstance) + m_pInstance->SetData(TYPE_AURIAYA, IN_PROGRESS); + + DoScriptText(SAY_AGGRO, m_creature); + } + + void KilledUnit(Unit* pVictim) + { + DoScriptText(urand(0, 1) ? SAY_SLAY_1 : SAY_SLAY_2, m_creature); + } + + void JustReachedHome() + { + if (m_pInstance) + m_pInstance->SetData(TYPE_AURIAYA, FAIL); + } + + void JustSummoned(Creature* pSummoned) + { + // Summon the feral defender + if (pSummoned->GetEntry() == NPC_FERAL_DEFENDER_STALKER) + DoCastSpellIfCan(pSummoned, SPELL_ACTIVATE_FERAL_DEFENDER, CAST_INTERRUPT_PREVIOUS); + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_uiTerrifyingScreechTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_TERRIFYING_SCREECH) == CAST_OK) + { + DoScriptText(EMOTE_SCREECH, m_creature); + m_uiTerrifyingScreechTimer = 35000; + m_uiSentinelBlastTimer = 2000; + } + } + else + m_uiTerrifyingScreechTimer -= uiDiff; + + if (m_uiSentinelBlastTimer < uiDiff) + { + // Cast Sentinel blast right after terrifying screech + if (DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_SENTINEL_BLAST : SPELL_SENTINEL_BLAST_H) == CAST_OK) + m_uiSentinelBlastTimer = 35000; + } + else + m_uiSentinelBlastTimer -= uiDiff; + + if (m_uiDefenderTimer) + { + if (m_uiDefenderTimer <= uiDiff) + { + // Summon the feral defender trigger + if (DoCastSpellIfCan(m_creature, SPELL_ACTIVATE_FERAL_DEFENDER_TRIGG) == CAST_OK) + m_uiDefenderTimer = 0; + } + else + m_uiDefenderTimer -= uiDiff; + } + + if (m_uiSonicScreechTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_SONIC_SCREECH : SPELL_SONIC_SCREECH_H) == CAST_OK) + m_uiSonicScreechTimer = 27000; + } + else + m_uiSonicScreechTimer -= uiDiff; + + if (m_uiSwarmTimer < uiDiff) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, SPELL_GUARDIAN_SWARM) == CAST_OK) + m_uiSwarmTimer = 37000; + } + } + else + m_uiSwarmTimer -= uiDiff; + + if (m_uiEnrageTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_BERSERK) == CAST_OK) + { + DoScriptText(SAY_BERSERK, m_creature); + m_uiEnrageTimer = 10*MINUTE*IN_MILLISECONDS; + } + } + else + m_uiEnrageTimer -= uiDiff; + + DoMeleeAttackIfReady(); + } }; +CreatureAI* GetAI_boss_auriaya(Creature* pCreature) +{ + return new boss_auriayaAI(pCreature); +} + +struct MANGOS_DLL_DECL boss_feral_defenderAI : public ScriptedAI +{ + boss_feral_defenderAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (instance_ulduar*)pCreature->GetInstanceData(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); + Reset(); + } + + instance_ulduar* m_pInstance; + bool m_bIsRegularMode; + + uint32 m_uiPounceTimer; + uint32 m_uiFeralRushTimer; + uint32 m_uiReviveDelayTimer; + uint32 m_uiKilledCount; + + void Reset() + { + m_uiReviveDelayTimer = 0; + m_uiPounceTimer = 5000; + m_uiFeralRushTimer = 10000; + m_uiKilledCount = 0; + + DoCastSpellIfCan(m_creature, SPELL_FERAL_ESSENCE); + } + + void JustDied(Unit* pKiller) + { + // Set achiev criteria to true + if (m_pInstance) + m_pInstance->SetSpecialAchievementCriteria(TYPE_ACHIEV_NINE_LIVES, true); + } + + void DamageTaken(Unit* pDoneBy, uint32& uiDamage) + { + // If we don't have the feral essence anymore then ignore this + if (m_uiKilledCount >= 8) // 9-1 == 8 + return; + + if (m_uiReviveDelayTimer) // Already faking + { + uiDamage = 0; + return; + } + + if (uiDamage > m_creature->GetHealth()) + { + uiDamage = 0; + + m_creature->InterruptNonMeleeSpells(true); + m_creature->SetHealth(0); + m_creature->StopMoving(); + m_creature->ClearComboPointHolders(); + //m_creature->RemoveAllAurasOnDeath(); // TODO Should only remove negative auras + m_creature->ModifyAuraState(AURA_STATE_HEALTHLESS_20_PERCENT, false); + m_creature->ModifyAuraState(AURA_STATE_HEALTHLESS_35_PERCENT, false); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + m_creature->ClearAllReactives(); + m_creature->GetMotionMaster()->Clear(); + m_creature->GetMotionMaster()->MoveIdle(); + m_creature->SetStandState(UNIT_STAND_STATE_DEAD); + + // Remove one aura stack and summon a feral essence + DoCastSpellIfCan(m_creature, SPELL_FERAL_ESSENCE_REMOVAL, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_SEEPING_FERAL_ESSENCE_SUMMON, CAST_TRIGGERED); + + m_uiReviveDelayTimer = 30000; + ++m_uiKilledCount; + } + } + + void JustSummoned(Creature* pSummoned) + { + // Cast seeping feral essence on the summoned + pSummoned->CastSpell(pSummoned, m_bIsRegularMode ? SPELL_SEEPING_FERAL_ESSENCE : SPELL_SEEPING_FERAL_ESSENCE_H, true, NULL, NULL, m_creature->GetObjectGuid()); + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_uiReviveDelayTimer) + { + if (m_uiReviveDelayTimer <= uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_FULL_HEAL) == CAST_OK) + { + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + m_creature->SetStandState(UNIT_STAND_STATE_STAND); + + DoResetThreat(); + m_uiReviveDelayTimer = 0; + + // Assume Attack - it should jump to victim + if (m_creature->getVictim()) + m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); + } + } + else + m_uiReviveDelayTimer -= uiDiff; + + // No Further action while faking + return; + } + + if (m_uiPounceTimer < uiDiff) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, m_bIsRegularMode ? SPELL_FERAL_POUNCE : SPELL_FERAL_POUNCE_H) == CAST_OK) + m_uiPounceTimer = 5000; + } + } + else + m_uiPounceTimer -= uiDiff; + + if (m_uiFeralRushTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_FERAL_RUSH) == CAST_OK) + m_uiFeralRushTimer = 35000; + } + else + m_uiFeralRushTimer -= uiDiff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_feral_defender(Creature* pCreature) +{ + return new boss_feral_defenderAI(pCreature); +} + void AddSC_boss_auriaya() { + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_auriaya"; + pNewScript->GetAI = GetAI_boss_auriaya; + pNewScript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "boss_feral_defender"; + pNewScript->GetAI = &GetAI_boss_feral_defender; + pNewScript->RegisterSelf(); } diff --git a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp index da2b48581..bef2d152b 100644 --- a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp +++ b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp @@ -47,6 +47,9 @@ void instance_ulduar::Initialize() memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); memset(&m_auiHardBoss, 0, sizeof(m_auiHardBoss)); memset(&m_auiUlduarKeepers, 0, sizeof(m_auiUlduarKeepers)); + + for (uint8 i = 0; i < MAX_SPECIAL_ACHIEV_CRITS; ++i) + m_abAchievCriteria[i] = false; } bool instance_ulduar::IsEncounterInProgress() const @@ -301,6 +304,11 @@ void instance_ulduar::SetData(uint32 uiType, uint32 uiData) break; case TYPE_AURIAYA: m_auiEncounter[uiType] = uiData; + if (uiData == IN_PROGRESS) + { + SetSpecialAchievementCriteria(TYPE_ACHIEV_CAT_LADY, true); + SetSpecialAchievementCriteria(TYPE_ACHIEV_NINE_LIVES, false); + } break; // Keepers case TYPE_MIMIRON: @@ -525,6 +533,17 @@ void instance_ulduar::SpawnFriendlyKeeper(uint32 uiWho) } } +void instance_ulduar::OnCreatureDeath(Creature* pCreature) +{ + switch(pCreature->GetEntry()) + { + case NPC_SANCTUM_SENTRY: + if (GetData(TYPE_AURIAYA) == IN_PROGRESS) + SetSpecialAchievementCriteria(TYPE_ACHIEV_CAT_LADY, false); + break; + } +} + void instance_ulduar::Load(const char* strIn) { if (!strIn) @@ -551,6 +570,12 @@ void instance_ulduar::Load(const char* strIn) OUT_LOAD_INST_DATA_COMPLETE; } +void instance_ulduar::SetSpecialAchievementCriteria(uint32 uiType, bool bIsMet) +{ + if (uiType < MAX_SPECIAL_ACHIEV_CRITS) + m_abAchievCriteria[uiType] = bIsMet; +} + bool instance_ulduar::CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/) { switch (uiCriteriaId) @@ -558,6 +583,12 @@ bool instance_ulduar::CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player c case ACHIEV_CRIT_SARONITE_N: case ACHIEV_CRIT_SARONITE_H: return GetData(TYPE_VEZAX_HARD) == DONE; + case ACHIEV_CRIT_CAT_LADY_N: + case ACHIEV_CRIT_CAT_LADY_H: + return m_abAchievCriteria[TYPE_ACHIEV_CAT_LADY]; + case ACHIEV_CRIT_NINE_LIVES_N: + case ACHIEV_CRIT_NINE_LIVES_H: + return m_abAchievCriteria[TYPE_ACHIEV_NINE_LIVES]; default: return false; diff --git a/scripts/northrend/ulduar/ulduar/ulduar.h b/scripts/northrend/ulduar/ulduar/ulduar.h index d0616ffe3..b030761f8 100644 --- a/scripts/northrend/ulduar/ulduar/ulduar.h +++ b/scripts/northrend/ulduar/ulduar/ulduar.h @@ -101,6 +101,11 @@ enum NPC_KEEPER_MIMIRON = 33244, NPC_KEEPER_THORIM = 33242, + MAX_SPECIAL_ACHIEV_CRITS = 2, + + TYPE_ACHIEV_CAT_LADY = 0, + TYPE_ACHIEV_NINE_LIVES = 1, + // Loot chests // Kologarn GO_CACHE_OF_LIVING_STONE_10 = 195046, @@ -193,6 +198,10 @@ enum // Achievement related ACHIEV_CRIT_SARONITE_N = 10451, // General Vezax, achievs 3181, 3188 ACHIEV_CRIT_SARONITE_H = 10462, + ACHIEV_CRIT_CAT_LADY_N = 10400, // Auriaya, achievs 3006, 3007 + ACHIEV_CRIT_CAT_LADY_H = 10184, + ACHIEV_CRIT_NINE_LIVES_N = 10399, // Auriaya, achievs 3076, 3077 + ACHIEV_CRIT_NINE_LIVES_H = 10243, }; class MANGOS_DLL_DECL instance_ulduar : public ScriptedInstance @@ -205,6 +214,7 @@ class MANGOS_DLL_DECL instance_ulduar : public ScriptedInstance bool IsEncounterInProgress() const; void OnCreatureCreate(Creature* pCreature); + void OnCreatureDeath(Creature* pCreature); void OnObjectCreate(GameObject* pGo); void SetData(uint32 uiType, uint32 uiData); @@ -213,6 +223,7 @@ class MANGOS_DLL_DECL instance_ulduar : public ScriptedInstance const char* Save() { return m_strInstData.c_str(); } void Load(const char* chrIn); + void SetSpecialAchievementCriteria(uint32 uiType, bool bIsMet); bool CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/); // Dummy, leave till correct solution for hardmode found bool CheckConditionCriteriaMeet(Player const* pSource, uint32 uiMapId, uint32 uiInstanceConditionId); @@ -226,6 +237,7 @@ class MANGOS_DLL_DECL instance_ulduar : public ScriptedInstance uint32 m_auiEncounter[MAX_ENCOUNTER]; uint32 m_auiHardBoss[HARD_MODE_ENCOUNTER]; uint32 m_auiUlduarKeepers[KEEPER_ENCOUNTER]; + bool m_abAchievCriteria[MAX_SPECIAL_ACHIEV_CRITS]; }; #endif diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 6a9acf371..11e875a65 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2306" + #define SD2_REVISION_NR "2307" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 41e975f36..09a5fc8e6 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -1242,6 +1242,8 @@ UPDATE creature_template SET ScriptName='npc_brann_hos' WHERE entry=28070; /* ULDUAR */ UPDATE instance_template SET ScriptName='instance_ulduar' WHERE map=603; UPDATE creature_template SET ScriptName='boss_general_vezax' WHERE entry=33271; +UPDATE creature_template SET ScriptName='boss_auriaya' WHERE entry=33515; +UPDATE creature_template SET ScriptName='boss_feral_defender' WHERE entry=34035; DELETE FROM scripted_event_id WHERE id=9735; INSERT INTO scripted_event_id VALUES (9735,'event_spell_saronite_barrier'); diff --git a/sql/updates/r2307_mangos.sql b/sql/updates/r2307_mangos.sql new file mode 100644 index 000000000..7e09bb2a0 --- /dev/null +++ b/sql/updates/r2307_mangos.sql @@ -0,0 +1,2 @@ +UPDATE creature_template SET ScriptName='boss_auriaya' WHERE entry=33515; +UPDATE creature_template SET ScriptName='boss_feral_defender' WHERE entry=34035; From 548322ef7a0854b78806bedac72f19aaf462f769 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Mon, 10 Oct 2011 20:48:02 +0300 Subject: [PATCH 0291/1172] [2308] Implement dialogue helper extension for non-instances Signed-off-by: Xfurry --- include/sc_instance.cpp | 19 +++++++++++-------- include/sc_instance.h | 5 ++++- sd2_revision_nr.h | 2 +- 3 files changed, 16 insertions(+), 10 deletions(-) diff --git a/include/sc_instance.cpp b/include/sc_instance.cpp index 9db67e653..3f954c522 100644 --- a/include/sc_instance.cpp +++ b/include/sc_instance.cpp @@ -271,16 +271,19 @@ void DialogueHelper::DoNextDialogueStep() } // Simulate Case - if (m_bCanSimulate && m_pInstance && uiSpeakerEntry && iTextEntry < 0) - m_pInstance->DoOrSimulateScriptTextForThisInstance(iTextEntry, uiSpeakerEntry); - else + if (uiSpeakerEntry && iTextEntry < 0) { - // Get Speaker - Creature* pSpeaker = NULL; - if (m_pInstance && uiSpeakerEntry) - pSpeaker = m_pInstance->GetSingleCreatureFromStorage(uiSpeakerEntry); + // Use Speaker if directly provided + Creature* pSpeaker = GetSpeakerByEntry(uiSpeakerEntry); + if (m_pInstance && !pSpeaker) // Get Speaker from instance + { + if (m_bCanSimulate) // Simulate case + m_pInstance->DoOrSimulateScriptTextForThisInstance(iTextEntry, uiSpeakerEntry); + else + pSpeaker = m_pInstance->GetSingleCreatureFromStorage(uiSpeakerEntry); + } - if (pSpeaker && iTextEntry < 0) + if (pSpeaker) DoScriptText(iTextEntry, pSpeaker); } diff --git a/include/sc_instance.h b/include/sc_instance.h index 36c9336c8..f41f83d22 100644 --- a/include/sc_instance.h +++ b/include/sc_instance.h @@ -97,7 +97,7 @@ class DialogueHelper // The array MUST be terminated by {0,0,0,0,0} DialogueHelper(DialogueEntryTwoSide const* aDialogueTwoSide); - /// Function that MUST be called + /// Function to initialize the dialogue helper for instances. If not used with instances, GetSpeakerByEntry MUST be overwritten to obtain the speakers void InitializeDialogueHelper(ScriptedInstance* pInstance, bool bCanSimulateText = false) { m_pInstance = pInstance; m_bCanSimulate = bCanSimulateText; } /// Set if take first entries or second entries void SetDialogueSide(bool bIsFirstSide) { m_bIsFirstSide = bIsFirstSide; } @@ -107,7 +107,10 @@ class DialogueHelper void DialogueUpdate(uint32 uiDiff); protected: + /// Will be called when a dialogue step was done virtual void JustDidDialogueStep(int32 iEntry) {} + /// Will be called to get a speaker, MUST be implemented if not used in instances + virtual Creature* GetSpeakerByEntry(uint32 uiEntry) { return NULL; } private: void DoNextDialogueStep(); diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 11e875a65..5c55eeccd 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2307" + #define SD2_REVISION_NR "2308" #endif // __SD2_REVISION_NR_H__ From 5749e88e70846f2b9bb0c0656236f1cbef73eea1 Mon Sep 17 00:00:00 2001 From: Junta Date: Mon, 10 Oct 2011 21:01:09 +0300 Subject: [PATCH 0292/1172] [2309] Implement quest 4901 Signed-off-by: Xfurry --- scripts/kalimdor/winterspring.cpp | 482 ++++++++++++++++++++++++++++-- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 2 + sql/scriptdev2_script_full.sql | 83 ++++- sql/updates/r2309_mangos.sql | 2 + sql/updates/r2309_scriptdev2.sql | 82 +++++ 6 files changed, 631 insertions(+), 22 deletions(-) create mode 100644 sql/updates/r2309_mangos.sql create mode 100644 sql/updates/r2309_scriptdev2.sql diff --git a/scripts/kalimdor/winterspring.cpp b/scripts/kalimdor/winterspring.cpp index cf07b0dc8..e4c35c769 100644 --- a/scripts/kalimdor/winterspring.cpp +++ b/scripts/kalimdor/winterspring.cpp @@ -17,7 +17,7 @@ /* ScriptData SDName: Winterspring SD%Complete: 90 -SDComment: Quest support: 5126 (Loraxs' tale missing proper gossip items text). Vendor Rivern Frostwind. Obtain Cache of Mau'ari +SDComment: Quest support: 4901, 5126 (Loraxs' tale missing proper gossip items text). Vendor Rivern Frostwind. Obtain Cache of Mau'ari SDCategory: Winterspring EndScriptData */ @@ -25,9 +25,11 @@ EndScriptData */ npc_lorax npc_rivern_frostwind npc_witch_doctor_mauari +npc_ranshalla EndContentData */ #include "precompiled.h" +#include "escort_ai.h" /*###### ## npc_lorax @@ -133,25 +135,465 @@ bool GossipSelect_npc_witch_doctor_mauari(Player* pPlayer, Creature* pCreature, return true; } +/*#### +# npc_ranshalla +####*/ + +enum +{ + // Escort texts + SAY_QUEST_START = -1000739, + SAY_ENTER_OWL_THICKET = -1000707, + SAY_REACH_TORCH_1 = -1000708, + SAY_REACH_TORCH_2 = -1000709, + SAY_REACH_TORCH_3 = -1000710, + SAY_AFTER_TORCH_1 = -1000711, + SAY_AFTER_TORCH_2 = -1000712, + SAY_REACH_ALTAR_1 = -1000713, + SAY_REACH_ALTAR_2 = -1000714, + + // After lighting the altar cinematic + SAY_RANSHALLA_ALTAR_1 = -1000715, + SAY_RANSHALLA_ALTAR_2 = -1000716, + SAY_PRIESTESS_ALTAR_3 = -1000717, + SAY_PRIESTESS_ALTAR_4 = -1000718, + SAY_RANSHALLA_ALTAR_5 = -1000719, + SAY_RANSHALLA_ALTAR_6 = -1000720, + SAY_PRIESTESS_ALTAR_7 = -1000721, + SAY_PRIESTESS_ALTAR_8 = -1000722, + SAY_PRIESTESS_ALTAR_9 = -1000723, + SAY_PRIESTESS_ALTAR_10 = -1000724, + SAY_PRIESTESS_ALTAR_11 = -1000725, + SAY_PRIESTESS_ALTAR_12 = -1000726, + SAY_PRIESTESS_ALTAR_13 = -1000727, + SAY_PRIESTESS_ALTAR_14 = -1000728, + SAY_VOICE_ALTAR_15 = -1000729, + SAY_PRIESTESS_ALTAR_16 = -1000730, + SAY_PRIESTESS_ALTAR_17 = -1000731, + SAY_PRIESTESS_ALTAR_18 = -1000732, + SAY_PRIESTESS_ALTAR_19 = -1000733, + SAY_PRIESTESS_ALTAR_20 = -1000734, + SAY_PRIESTESS_ALTAR_21 = -1000735, + SAY_QUEST_END_1 = -1000736, + SAY_QUEST_END_2 = -1000737, + + EMOTE_CHANT_SPELL = -1000738, + + SPELL_LIGHT_TORCH = 18953, // channeled spell by Ranshalla while waiting for the torches / altar + + NPC_RANSHALLA = 10300, + NPC_PRIESTESS_ELUNE = 12116, + NPC_VOICE_ELUNE = 12152, + NPC_GUARDIAN_ELUNE = 12140, + + NPC_PRIESTESS_DATA_1 = 1, // dummy member for the first priestess (right) + NPC_PRIESTESS_DATA_2 = 2, // dummy member for the second priestess (left) + DATA_MOVE_PRIESTESS = 3, // dummy member to check the priestess movement + DATA_EVENT_END = 4, // dummy member to indicate the event end + + GO_ELUNE_ALTAR = 177404, + GO_ELUNE_FIRE = 177417, + GO_ELUNE_GEM = 177414, // is respawned in script + GO_ELUNE_LIGHT = 177415, // are respawned in script + + QUEST_GUARDIANS_ALTAR = 4901, +}; + +static const DialogueEntry aIntroDialogue[] = +{ + {SAY_REACH_ALTAR_1, NPC_RANSHALLA, 2000}, + {SAY_REACH_ALTAR_2, NPC_RANSHALLA, 3000}, + {NPC_RANSHALLA, 0, 0}, // start the altar channeling + {SAY_PRIESTESS_ALTAR_3, NPC_PRIESTESS_DATA_2, 1000}, + {SAY_PRIESTESS_ALTAR_4, NPC_PRIESTESS_DATA_1, 4000}, + {SAY_RANSHALLA_ALTAR_5, NPC_RANSHALLA, 4000}, + {SAY_RANSHALLA_ALTAR_6, NPC_RANSHALLA, 4000}, // start the escort here + {SAY_PRIESTESS_ALTAR_7, NPC_PRIESTESS_DATA_2, 4000}, + {SAY_PRIESTESS_ALTAR_8, NPC_PRIESTESS_DATA_2, 5000}, // show the gem + {GO_ELUNE_GEM, 0, 5000}, + {SAY_PRIESTESS_ALTAR_9, NPC_PRIESTESS_DATA_1, 4000}, // move priestess 1 near m_creature + {NPC_PRIESTESS_DATA_1, 0, 3000}, + {SAY_PRIESTESS_ALTAR_10, NPC_PRIESTESS_DATA_1, 5000}, + {SAY_PRIESTESS_ALTAR_11, NPC_PRIESTESS_DATA_1, 4000}, + {SAY_PRIESTESS_ALTAR_12, NPC_PRIESTESS_DATA_1, 5000}, + {SAY_PRIESTESS_ALTAR_13, NPC_PRIESTESS_DATA_1, 8000}, // summon voice and guard of elune + {NPC_VOICE_ELUNE, 0, 12000}, + {SAY_VOICE_ALTAR_15, NPC_VOICE_ELUNE, 5000}, // move priestess 2 near m_creature + {NPC_PRIESTESS_DATA_2, 0, 3000}, + {SAY_PRIESTESS_ALTAR_16, NPC_PRIESTESS_DATA_2, 4000}, + {SAY_PRIESTESS_ALTAR_17, NPC_PRIESTESS_DATA_2, 6000}, + {SAY_PRIESTESS_ALTAR_18, NPC_PRIESTESS_DATA_1, 5000}, + {SAY_PRIESTESS_ALTAR_19, NPC_PRIESTESS_DATA_1, 3000}, // move the owlbeast + {NPC_GUARDIAN_ELUNE, 0, 2000}, + {SAY_PRIESTESS_ALTAR_20, NPC_PRIESTESS_DATA_1, 4000}, // move the first priestess up + {SAY_PRIESTESS_ALTAR_21, NPC_PRIESTESS_DATA_2, 10000}, // move second priestess up + {DATA_MOVE_PRIESTESS, 0, 6000}, // despawn the gem + {DATA_EVENT_END, 0, 2000}, // turn towards the player + {SAY_QUEST_END_2, NPC_RANSHALLA, 0}, + {0, 0, 0}, +}; + +struct EventLocations +{ + float m_fX, m_fY, m_fZ, m_fO; +}; + +static EventLocations aWingThicketLocations[] = +{ + {5515.98f, -4903.43f, 846.30f, 4.58f}, // 0 right priestess summon loc + {5501.94f, -4920.20f, 848.69f, 6.15f}, // 1 left priestess summon loc + {5497.35f, -4906.49f, 850.83f, 2.76f}, // 2 guard of elune summon loc + {5518.38f, -4913.47f, 845.57f}, // 3 right priestess move loc + {5510.36f, -4921.17f, 846.33f}, // 4 left priestess move loc + {5511.31f, -4913.82f, 847.17f}, // 5 guard of elune move loc + {5518.51f, -4917.56f, 845.23f}, // 6 right priestess second move loc + {5514.40f, -4921.16f, 845.49f} // 7 left priestess second move loc +}; + +struct MANGOS_DLL_DECL npc_ranshallaAI : public npc_escortAI, private DialogueHelper +{ + npc_ranshallaAI(Creature* pCreature) : npc_escortAI(pCreature), + DialogueHelper(aIntroDialogue) + { + Reset(); + } + + uint32 m_uiDelayTimer; + + ObjectGuid m_firstPriestessGuid; + ObjectGuid m_secondPriestessGuid; + ObjectGuid m_guardEluneGuid; + ObjectGuid m_voiceEluneGuid; + ObjectGuid m_altarGuid; + + void Reset() + { + m_uiDelayTimer = 0; + } + + // Called when the player activates the torch / altar + void DoContinueEscort(bool bIsAltarWaypoint = false) + { + if (bIsAltarWaypoint) + DoScriptText(SAY_RANSHALLA_ALTAR_1, m_creature); + else + { + switch(urand(0, 1)) + { + case 0: DoScriptText(SAY_AFTER_TORCH_1, m_creature); break; + case 1: DoScriptText(SAY_AFTER_TORCH_2, m_creature); break; + } + } + + m_uiDelayTimer = 2000; + } + + // Called when Ranshalla starts to channel on a torch / altar + void DoChannelTorchSpell(bool bIsAltarWaypoint = false) + { + // Check if we are using the fire or the altar and remove the no_interact flag + if (bIsAltarWaypoint) + { + if (GameObject* pGo = GetClosestGameObjectWithEntry(m_creature, GO_ELUNE_ALTAR, 10.0f)) + { + pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NO_INTERACT); + m_creature->SetFacingToObject(pGo); + m_altarGuid = pGo->GetObjectGuid(); + } + } + else + { + if (GameObject* pGo = GetClosestGameObjectWithEntry(m_creature, GO_ELUNE_FIRE, 10.0f)) + pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NO_INTERACT); + } + + // Yell and set escort to pause + switch(urand(0, 2)) + { + case 0: DoScriptText(SAY_REACH_TORCH_1, m_creature); break; + case 1: DoScriptText(SAY_REACH_TORCH_2, m_creature); break; + case 2: DoScriptText(SAY_REACH_TORCH_3, m_creature); break; + } + + DoScriptText(EMOTE_CHANT_SPELL, m_creature); + DoCastSpellIfCan(m_creature, SPELL_LIGHT_TORCH); + SetEscortPaused(true); + } + + void DoSummonPriestess() + { + // Summon 2 Elune priestess and make each of them move to a different spot + if (Creature* pPriestess = m_creature->SummonCreature(NPC_PRIESTESS_ELUNE, aWingThicketLocations[0].m_fX, aWingThicketLocations[0].m_fY, aWingThicketLocations[0].m_fZ, aWingThicketLocations[0].m_fO, TEMPSUMMON_CORPSE_DESPAWN, 0)) + { + pPriestess->GetMotionMaster()->MovePoint(0, aWingThicketLocations[3].m_fX, aWingThicketLocations[3].m_fY, aWingThicketLocations[3].m_fZ); + m_firstPriestessGuid = pPriestess->GetObjectGuid(); + } + if (Creature* pPriestess = m_creature->SummonCreature(NPC_PRIESTESS_ELUNE, aWingThicketLocations[1].m_fX, aWingThicketLocations[1].m_fY, aWingThicketLocations[1].m_fZ, aWingThicketLocations[1].m_fO, TEMPSUMMON_CORPSE_DESPAWN, 0)) + { + // Left priestess should have a distinct move point because she is the one who starts the dialogue at point reach + pPriestess->GetMotionMaster()->MovePoint(1, aWingThicketLocations[4].m_fX, aWingThicketLocations[4].m_fY, aWingThicketLocations[4].m_fZ); + m_secondPriestessGuid = pPriestess->GetObjectGuid(); + } + } + + void SummonedMovementInform(Creature* pSummoned, uint32 uiType, uint32 uiPointId) + { + if (uiType != POINT_MOTION_TYPE || pSummoned->GetEntry() != NPC_PRIESTESS_ELUNE || uiPointId != 1) + return; + + // Start the dialogue when the priestess reach the altar (they should both reach the point in the same time) + StartNextDialogueText(SAY_PRIESTESS_ALTAR_3); + } + + void WaypointReached(uint32 uiPointId) + { + switch(uiPointId) + { + case 3: + DoScriptText(SAY_ENTER_OWL_THICKET, m_creature); + break; + case 10: // Cavern 1 + case 15: // Cavern 2 + case 20: // Cavern 3 + case 25: // Cavern 4 + case 36: // Cavern 5 + DoChannelTorchSpell(); + break; + case 39: + StartNextDialogueText(SAY_REACH_ALTAR_1); + SetEscortPaused(true); + break; + case 41: + { + // Search for all nearest lights and respawn them + std::list m_lEluneLights; + GetGameObjectListWithEntryInGrid(m_lEluneLights, m_creature, GO_ELUNE_LIGHT, 20.0f); + for (std::list::const_iterator itr = m_lEluneLights.begin(); itr != m_lEluneLights.end(); ++itr) + { + if ((*itr)->isSpawned()) + continue; + + (*itr)->SetRespawnTime(115); + (*itr)->Refresh(); + } + + if (GameObject* pAltar = m_creature->GetMap()->GetGameObject(m_altarGuid)) + m_creature->SetFacingToObject(pAltar); + break; + } + case 42: + // Summon the 2 priestess + SetEscortPaused(true); + DoSummonPriestess(); + DoScriptText(SAY_RANSHALLA_ALTAR_2, m_creature); + break; + case 44: + // Stop the escort and turn towards the altar + SetEscortPaused(true); + if (GameObject* pAltar = m_creature->GetMap()->GetGameObject(m_altarGuid)) + m_creature->SetFacingToObject(pAltar); + break; + } + } + + void JustDidDialogueStep(int32 iEntry) + { + switch(iEntry) + { + case NPC_RANSHALLA: + // Start the altar channeling + DoChannelTorchSpell(true); + break; + case SAY_RANSHALLA_ALTAR_6: + SetEscortPaused(false); + break; + case SAY_PRIESTESS_ALTAR_8: + // make the gem respawn + if (GameObject* pGem = GetClosestGameObjectWithEntry(m_creature, GO_ELUNE_GEM, 10.0f)) + { + if (pGem->isSpawned()) + break; + + pGem->SetRespawnTime(90); + pGem->Refresh(); + } + break; + case SAY_PRIESTESS_ALTAR_9: + // move near the escort npc + if (Creature* pPriestess = m_creature->GetMap()->GetCreature(m_firstPriestessGuid)) + pPriestess->GetMotionMaster()->MovePoint(0, aWingThicketLocations[6].m_fX, aWingThicketLocations[6].m_fY, aWingThicketLocations[6].m_fZ); + break; + case SAY_PRIESTESS_ALTAR_13: + // summon the Guardian of Elune + if (Creature* pGuard = m_creature->SummonCreature(NPC_GUARDIAN_ELUNE, aWingThicketLocations[2].m_fX, aWingThicketLocations[2].m_fY, aWingThicketLocations[2].m_fZ, aWingThicketLocations[2].m_fO, TEMPSUMMON_CORPSE_DESPAWN, 0)) + { + pGuard->GetMotionMaster()->MovePoint(0, aWingThicketLocations[5].m_fX, aWingThicketLocations[5].m_fY, aWingThicketLocations[5].m_fZ); + m_guardEluneGuid = pGuard->GetObjectGuid(); + } + // summon the Voice of Elune + if (GameObject* pAltar = m_creature->GetMap()->GetGameObject(m_altarGuid)) + { + if (Creature* pVoice = m_creature->SummonCreature(NPC_VOICE_ELUNE, pAltar->GetPositionX(), pAltar->GetPositionY(), pAltar->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN, 30000)) + m_voiceEluneGuid = pVoice->GetObjectGuid(); + } + break; + case SAY_VOICE_ALTAR_15: + // move near the escort npc and continue dialogue + if (Creature* pPriestess = m_creature->GetMap()->GetCreature(m_secondPriestessGuid)) + { + DoScriptText(SAY_PRIESTESS_ALTAR_14, pPriestess); + pPriestess->GetMotionMaster()->MovePoint(0, aWingThicketLocations[7].m_fX, aWingThicketLocations[7].m_fY, aWingThicketLocations[7].m_fZ); + } + break; + case SAY_PRIESTESS_ALTAR_19: + // make the voice of elune leave + if (Creature* pGuard = m_creature->GetMap()->GetCreature(m_guardEluneGuid)) + { + pGuard->GetMotionMaster()->MovePoint(0, aWingThicketLocations[2].m_fX, aWingThicketLocations[2].m_fY, aWingThicketLocations[2].m_fZ); + pGuard->ForcedDespawn(4000); + } + break; + case SAY_PRIESTESS_ALTAR_20: + // make the first priestess leave + if (Creature* pPriestess = m_creature->GetMap()->GetCreature(m_firstPriestessGuid)) + { + pPriestess->GetMotionMaster()->MovePoint(0, aWingThicketLocations[0].m_fX, aWingThicketLocations[0].m_fY, aWingThicketLocations[0].m_fZ); + pPriestess->ForcedDespawn(4000); + } + break; + case SAY_PRIESTESS_ALTAR_21: + // make the second priestess leave + if (Creature* pPriestess = m_creature->GetMap()->GetCreature(m_secondPriestessGuid)) + { + pPriestess->GetMotionMaster()->MovePoint(0, aWingThicketLocations[1].m_fX, aWingThicketLocations[1].m_fY, aWingThicketLocations[1].m_fZ); + pPriestess->ForcedDespawn(4000); + } + break; + case DATA_EVENT_END: + // Turn towards the player + if (Player* pPlayer = GetPlayerForEscort()) + { + m_creature->SetFacingToObject(pPlayer); + DoScriptText(SAY_QUEST_END_1, m_creature, pPlayer); + } + break; + case SAY_QUEST_END_2: + // Turn towards the altar and kneel - quest complete + if (GameObject* pAltar = m_creature->GetMap()->GetGameObject(m_altarGuid)) + m_creature->SetFacingToObject(pAltar); + m_creature->SetStandState(UNIT_STAND_STATE_KNEEL); + if (Player* pPlayer = GetPlayerForEscort()) + pPlayer->GroupEventHappens(QUEST_GUARDIANS_ALTAR, m_creature); + break; + } + } + + Creature* GetSpeakerByEntry(uint32 uiEntry) + { + switch (uiEntry) + { + case NPC_RANSHALLA: return m_creature; + case NPC_VOICE_ELUNE: return m_creature->GetMap()->GetCreature(m_voiceEluneGuid); + case NPC_PRIESTESS_DATA_1: return m_creature->GetMap()->GetCreature(m_firstPriestessGuid); + case NPC_PRIESTESS_DATA_2: return m_creature->GetMap()->GetCreature(m_secondPriestessGuid); + + default: + return NULL; + } + + } + + void UpdateEscortAI(const uint32 uiDiff) + { + DialogueUpdate(uiDiff); + + if (m_uiDelayTimer) + { + if (m_uiDelayTimer <= uiDiff) + { + m_creature->InterruptNonMeleeSpells(false); + SetEscortPaused(false); + m_uiDelayTimer = 0; + } + else + m_uiDelayTimer -= uiDiff; + } + + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_npc_ranshalla(Creature* pCreature) +{ + return new npc_ranshallaAI(pCreature); +} + +bool QuestAccept_npc_ranshalla(Player* pPlayer, Creature* pCreature, const Quest* pQuest) +{ + if (pQuest->GetQuestId() == QUEST_GUARDIANS_ALTAR) + { + DoScriptText(SAY_QUEST_START, pCreature); + pCreature->setFaction(FACTION_ESCORT_A_NEUTRAL_PASSIVE); + + if (npc_ranshallaAI* pEscortAI = dynamic_cast(pCreature->AI())) + pEscortAI->Start(false, pPlayer, pQuest, true); + + return true; + } + + return false; +} + +bool GOUse_go_elune_fire(Player* pPlayer, GameObject* pGo) +{ + // Check if we are using the torches or the altar + bool bIsAltar = false; + + if (pGo->GetEntry() == GO_ELUNE_ALTAR) + bIsAltar = true; + + if (Creature* pRanshalla = GetClosestCreatureWithEntry(pGo, NPC_RANSHALLA, 10.0f)) + { + if (npc_ranshallaAI* pEscortAI = dynamic_cast(pRanshalla->AI())) + pEscortAI->DoContinueEscort(bIsAltar); + } + + return false; +} + void AddSC_winterspring() { - Script *newscript; - - newscript = new Script; - newscript->Name = "npc_lorax"; - newscript->pGossipHello = &GossipHello_npc_lorax; - newscript->pGossipSelect = &GossipSelect_npc_lorax; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_rivern_frostwind"; - newscript->pGossipHello = &GossipHello_npc_rivern_frostwind; - newscript->pGossipSelect = &GossipSelect_npc_rivern_frostwind; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_witch_doctor_mauari"; - newscript->pGossipHello = &GossipHello_npc_witch_doctor_mauari; - newscript->pGossipSelect = &GossipSelect_npc_witch_doctor_mauari; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "npc_lorax"; + pNewScript->pGossipHello = &GossipHello_npc_lorax; + pNewScript->pGossipSelect = &GossipSelect_npc_lorax; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_rivern_frostwind"; + pNewScript->pGossipHello = &GossipHello_npc_rivern_frostwind; + pNewScript->pGossipSelect = &GossipSelect_npc_rivern_frostwind; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_witch_doctor_mauari"; + pNewScript->pGossipHello = &GossipHello_npc_witch_doctor_mauari; + pNewScript->pGossipSelect = &GossipSelect_npc_witch_doctor_mauari; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_ranshalla"; + pNewScript->GetAI = &GetAI_npc_ranshalla; + pNewScript->pQuestAcceptNPC = &QuestAccept_npc_ranshalla; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "go_elune_fire"; + pNewScript->pGOUse = &GOUse_go_elune_fire; + pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 5c55eeccd..b673ffdc4 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2308" + #define SD2_REVISION_NR "2309" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 09a5fc8e6..589f9c643 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -1315,6 +1315,8 @@ UPDATE creature_template SET ScriptName='npc_mikhail' WHERE entry=4963; UPDATE creature_template SET ScriptName='npc_lorax' WHERE entry=10918; UPDATE creature_template SET ScriptName='npc_rivern_frostwind' WHERE entry=10618; UPDATE creature_template SET ScriptName='npc_witch_doctor_mauari' WHERE entry=10307; +UPDATE creature_template SET ScriptName='npc_ranshalla' WHERE entry=10300; +UPDATE gameobject_template SET ScriptName='go_elune_fire' WHERE entry IN (177417, 177404); /* ZANGARMARSH */ DELETE FROM scripted_event_id WHERE id=11225; diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index ffb6bc9bb..ca24bb0be 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -758,7 +758,41 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1000703,'And heroes... I hold that which you seek. May it once more see the evil dissolved. Remulos, see to it that our champion receives the shard of the Green Flight.',0,0,0,0,'eranikus SAY_REDEEMED_4'), (-1000704,'It will be done, Eranikus. Be well, ancient one.',0,0,0,0,'remulos SAY_REMULOS_OUTRO_1'), (-1000705,'Let us leave Nighthave, hero. Seek me out at the grove.',0,0,0,0,'remulos SAY_REMULOS_OUTRO_2'), -(-1000706,'Your world shall suffer an unmerciful end. The Nightmare comes for you!',0,0,0,0,'eranikus SAY_ERANIKUS_KILL'); +(-1000706,'Your world shall suffer an unmerciful end. The Nightmare comes for you!',0,0,0,0,'eranikus SAY_ERANIKUS_KILL'), + +(-1000707,'This blue light... It\'s strange. What do you think it means?',0,0,0,0,'Ranshalla SAY_ENTER_OWL_THICKET'), +(-1000708,'We\'ve found it!',0,0,0,0,'Ranshalla SAY_REACH_TORCH_1'), +(-1000709,'Please, light this while I am channeling',0,0,0,0,'Ranshalla SAY_REACH_TORCH_2'), +(-1000710,'This is the place. Let\'s light it.',0,0,0,0,'Ranshalla SAY_REACH_TORCH_3'), +(-1000711,'Let\'s find the next one.',0,0,0,0,'Ranshalla SAY_AFTER_TORCH_1'), +(-1000712,'We must continue on now.',0,0,0,0,'Ranshalla SAY_AFTER_TORCH_2'), +(-1000713,'It is time for the final step; we must activate the altar.',0,0,0,0,'Ranshalla SAY_REACH_ALTAR_1'), +(-1000714,'I will read the words carved into the stone, and you must find a way to light it.',0,0,0,0,'Ranshalla SAY_REACH_ALTAR_2'), +(-1000715,'The altar is glowing! We have done it!',0,0,0,0,'Ranshalla SAY_RANSHALLA_ALTAR_1'), +(-1000716,'What is happening? Look!',0,0,0,0,'Ranshalla SAY_RANSHALLA_ALTAR_2'), +(-1000717,'It has been many years...',0,0,0,0,'Priestess of Elune SAY_PRIESTESS_ALTAR_3'), +(-1000718,'Who has disturbed the altar of the goddess?',0,0,0,0,'Priestess of Elune SAY_PRIESTESS_ALTAR_4'), +(-1000719,'Please, priestesses, forgive us for our intrusion. We do not wish any harm here.',0,0,0,0,'Ranshalla SAY_RANSHALLA_ALTAR_5'), +(-1000720,'We only wish to know why the wildkin guard this area...',0,0,0,0,'Ranshalla SAY_RANSHALLA_ALTAR_6'), +(-1000721,'Enu thora\'serador. This is a sacred place.',0,0,0,0,'Priestess of Elune SAY_PRIESTESS_ALTAR_7'), +(-1000722,'We will show you...',0,0,0,0,'Priestess of Elune SAY_PRIESTESS_ALTAR_8'), +(-1000723,'Look above you; thara dormil dorah...',0,0,0,0,'Priestess of Elune SAY_PRIESTESS_ALTAR_9'), +(-1000724,'This gem once allowed direct communication with Elune, herself.',0,0,0,0,'Priestess of Elune SAY_PRIESTESS_ALTAR_10'), +(-1000725,'Through the gem, Elune channeled her infinite wisdom...',0,0,0,0,'Priestess of Elune SAY_PRIESTESS_ALTAR_11'), +(-1000726,'Realizing that the gem needed to be protected, we turned to the goddess herself.',0,0,0,0,'Priestess of Elune SAY_PRIESTESS_ALTAR_12'), +(-1000727,'Soon after, we began to have visions of a creature... A creature with the feathers of an owl, but the will and might of a bear...',0,0,0,0,'Priestess of Elune SAY_PRIESTESS_ALTAR_13'), +(-1000728,'It was on that day that the wildkin were given to us. Fierce guardians, the goddess assigned the wildkin to protect all of her sacred places.',0,0,0,0,'Priestess of Elune SAY_PRIESTESS_ALTAR_14'), +(-1000729,'Anu\'dorini Talah, Ru shallora enudoril.',0,0,0,0,'Voice of Elune SAY_VOICE_ALTAR_15'), +(-1000730,'But now, many years later, the wildkin have grown more feral, and without the guidance of the goddess, they are confused...',0,0,0,0,'Priestess of Elune SAY_PRIESTESS_ALTAR_16'), +(-1000731,'Without a purpose, they wander... But many find their way back to the sacred areas that they once were sworn to protect.',0,0,0,0,'Priestess of Elune SAY_PRIESTESS_ALTAR_17'), +(-1000732,'Wildkin are inherently magical; this power was bestowed upon them by the goddess.',0,0,0,0,'Priestess of Elune SAY_PRIESTESS_ALTAR_18'), +(-1000733,'Know that wherever you might find them in the world, they are protecting something of importance, as they were entrusted to do so long ago.',0,0,0,0,'Priestess of Elune SAY_PRIESTESS_ALTAR_19'), +(-1000734,'Please, remember what we have shown you...',0,0,0,0,'Priestess of Elune SAY_PRIESTESS_ALTAR_20'), +(-1000735,'Farewell.',0,0,0,0,'Priestess of Elune SAY_PRIESTESS_ALTAR_21'), +(-1000736,'Thank you for you help, $n. I wish you well in your adventures.',0,0,0,0,'Ranshalla SAY_QUEST_END_1'), +(-1000737,'I want to stay here and reflect on what we have seen. Please see Erelas and tell him what we have learned.',0,0,0,0,'Ranshalla SAY_QUEST_END_2'), +(-1000738,'%s begins chanting a strange spell...',0,2,0,0,'Ranshalla EMOTE_CHANT_SPELL'), +(-1000739,'Remember, I need your help to properly channel. I will ask you to aid me several times in our path, so please be ready.',0,0,0,0,'Ranshalla SAY_QUEST_START'); -- -1 033 000 SHADOWFANG KEEP INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES @@ -6122,4 +6156,51 @@ INSERT INTO script_waypoint VALUES (11832, 31, 7897.283691, -2560.652344, 487.461304, 0, ''), (11832, 32, 7897.283691, -2560.652344, 487.461304, 0, ''); +DELETE FROM script_waypoint WHERE entry=10300; +INSERT INTO script_waypoint VALUES +(10300, 1, 5728.81, -4801.15, 778.18, 0, ''), +(10300, 2, 5730.22, -4818.34, 777.11, 0, ''), +(10300, 3, 5728.12, -4835.76, 778.15, 1000, 'SAY_ENTER_OWL_THICKET'), +(10300, 4, 5718.85, -4865.62, 787.56, 0, ''), +(10300, 5, 5697.13, -4909.12, 801.53, 0, ''), +(10300, 6, 5684.20, -4913.75, 801.60, 0, ''), +(10300, 7, 5674.67, -4915.78, 802.13, 0, ''), +(10300, 8, 5665.61, -4919.22, 804.85, 0, ''), +(10300, 9, 5638.22, -4897.58, 804.97, 0, ''), +(10300, 10, 5632.67, -4892.05, 805.44, 0, 'Cavern 1 - EMOTE_CHANT_SPELL'), +(10300, 11, 5664.58, -4921.84, 804.91, 0, ''), +(10300, 12, 5684.21, -4943.81, 802.80, 0, ''), +(10300, 13, 5724.92, -4983.69, 808.25, 0, ''), +(10300, 14, 5753.39, -4990.73, 809.84, 0, ''), +(10300, 15, 5765.62, -4994.89, 809.42, 0, 'Cavern 2 - EMOTE_CHANT_SPELL'), +(10300, 16, 5724.94, -4983.58, 808.29, 0, ''), +(10300, 17, 5699.61, -4989.82, 808.03, 0, ''), +(10300, 18, 5686.80, -5012.17, 807.27, 0, ''), +(10300, 19, 5691.43, -5037.43, 807.73, 0, ''), +(10300, 20, 5694.24, -5054.64, 808.85, 0, 'Cavern 3 - EMOTE_CHANT_SPELL'), +(10300, 21, 5686.88, -5012.18, 807.23, 0, ''), +(10300, 22, 5664.94, -5001.12, 807.78, 0, ''), +(10300, 23, 5647.12, -5002.84, 807.54, 0, ''), +(10300, 24, 5629.23, -5014.88, 807.94, 0, ''), +(10300, 25, 5611.26, -5025.62, 808.36, 0, 'Cavern 4 - EMOTE_CHANT_SPELL'), +(10300, 26, 5647.13, -5002.85, 807.57, 0, ''), +(10300, 27, 5641.12, -4973.22, 809.39, 0, ''), +(10300, 28, 5622.97, -4953.58, 811.12, 0, ''), +(10300, 29, 5601.52, -4939.49, 820.77, 0, ''), +(10300, 30, 5571.87, -4936.22, 831.35, 0, ''), +(10300, 31, 5543.23, -4933.67, 838.33, 0, ''), +(10300, 32, 5520.86, -4942.05, 843.02, 0, ''), +(10300, 33, 5509.15, -4946.31, 849.36, 0, ''), +(10300, 34, 5498.45, -4950.08, 849.98, 0, ''), +(10300, 35, 5485.78, -4963.40, 850.43, 0, ''), +(10300, 36, 5467.92, -4980.67, 851.89, 0, 'Cavern 5 - EMOTE_CHANT_SPELL'), +(10300, 37, 5498.68, -4950.45, 849.96, 0, ''), +(10300, 38, 5518.68, -4921.94, 844.65, 0, ''), +(10300, 39, 5517.66, -4920.82, 845.12, 0, 'SAY_REACH_ALTAR_1'), +(10300, 40, 5518.38, -4913.47, 845.57, 0, ''), +(10300, 41, 5511.31, -4913.82, 847.17, 5000, 'light the spotlights'), +(10300, 42, 5511.31, -4913.82, 847.17, 0, 'start altar cinematic - SAY_RANSHALLA_ALTAR_2'), +(10300, 43, 5510.36, -4921.17, 846.33, 0, ''), +(10300, 44, 5517.66, -4920.82, 845.12, 0, 'escort paused'); + -- EOF diff --git a/sql/updates/r2309_mangos.sql b/sql/updates/r2309_mangos.sql new file mode 100644 index 000000000..c5227c910 --- /dev/null +++ b/sql/updates/r2309_mangos.sql @@ -0,0 +1,2 @@ +UPDATE creature_template SET ScriptName='npc_ranshalla' WHERE entry=10300; +UPDATE gameobject_template SET ScriptName='go_elune_fire' WHERE entry IN (177417, 177404); diff --git a/sql/updates/r2309_scriptdev2.sql b/sql/updates/r2309_scriptdev2.sql new file mode 100644 index 000000000..8d4a93570 --- /dev/null +++ b/sql/updates/r2309_scriptdev2.sql @@ -0,0 +1,82 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1000739 AND -1000707; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1000707,'This blue light... It\'s strange. What do you think it means?',0,0,0,0,'Ranshalla SAY_ENTER_OWL_THICKET'), +(-1000708,'We\'ve found it!',0,0,0,0,'Ranshalla SAY_REACH_TORCH_1'), +(-1000709,'Please, light this while I am channeling',0,0,0,0,'Ranshalla SAY_REACH_TORCH_2'), +(-1000710,'This is the place. Let\'s light it.',0,0,0,0,'Ranshalla SAY_REACH_TORCH_3'), +(-1000711,'Let\'s find the next one.',0,0,0,0,'Ranshalla SAY_AFTER_TORCH_1'), +(-1000712,'We must continue on now.',0,0,0,0,'Ranshalla SAY_AFTER_TORCH_2'), +(-1000713,'It is time for the final step; we must activate the altar.',0,0,0,0,'Ranshalla SAY_REACH_ALTAR_1'), +(-1000714,'I will read the words carved into the stone, and you must find a way to light it.',0,0,0,0,'Ranshalla SAY_REACH_ALTAR_2'), +(-1000715,'The altar is glowing! We have done it!',0,0,0,0,'Ranshalla SAY_RANSHALLA_ALTAR_1'), +(-1000716,'What is happening? Look!',0,0,0,0,'Ranshalla SAY_RANSHALLA_ALTAR_2'), +(-1000717,'It has been many years...',0,0,0,0,'Priestess of Elune SAY_PRIESTESS_ALTAR_3'), +(-1000718,'Who has disturbed the altar of the goddess?',0,0,0,0,'Priestess of Elune SAY_PRIESTESS_ALTAR_4'), +(-1000719,'Please, priestesses, forgive us for our intrusion. We do not wish any harm here.',0,0,0,0,'Ranshalla SAY_RANSHALLA_ALTAR_5'), +(-1000720,'We only wish to know why the wildkin guard this area...',0,0,0,0,'Ranshalla SAY_RANSHALLA_ALTAR_6'), +(-1000721,'Enu thora\'serador. This is a sacred place.',0,0,0,0,'Priestess of Elune SAY_PRIESTESS_ALTAR_7'), +(-1000722,'We will show you...',0,0,0,0,'Priestess of Elune SAY_PRIESTESS_ALTAR_8'), +(-1000723,'Look above you; thara dormil dorah...',0,0,0,0,'Priestess of Elune SAY_PRIESTESS_ALTAR_9'), +(-1000724,'This gem once allowed direct communication with Elune, herself.',0,0,0,0,'Priestess of Elune SAY_PRIESTESS_ALTAR_10'), +(-1000725,'Through the gem, Elune channeled her infinite wisdom...',0,0,0,0,'Priestess of Elune SAY_PRIESTESS_ALTAR_11'), +(-1000726,'Realizing that the gem needed to be protected, we turned to the goddess herself.',0,0,0,0,'Priestess of Elune SAY_PRIESTESS_ALTAR_12'), +(-1000727,'Soon after, we began to have visions of a creature... A creature with the feathers of an owl, but the will and might of a bear...',0,0,0,0,'Priestess of Elune SAY_PRIESTESS_ALTAR_13'), +(-1000728,'It was on that day that the wildkin were given to us. Fierce guardians, the goddess assigned the wildkin to protect all of her sacred places.',0,0,0,0,'Priestess of Elune SAY_PRIESTESS_ALTAR_14'), +(-1000729,'Anu\'dorini Talah, Ru shallora enudoril.',0,0,0,0,'Voice of Elune SAY_VOICE_ALTAR_15'), +(-1000730,'But now, many years later, the wildkin have grown more feral, and without the guidance of the goddess, they are confused...',0,0,0,0,'Priestess of Elune SAY_PRIESTESS_ALTAR_16'), +(-1000731,'Without a purpose, they wander... But many find their way back to the sacred areas that they once were sworn to protect.',0,0,0,0,'Priestess of Elune SAY_PRIESTESS_ALTAR_17'), +(-1000732,'Wildkin are inherently magical; this power was bestowed upon them by the goddess.',0,0,0,0,'Priestess of Elune SAY_PRIESTESS_ALTAR_18'), +(-1000733,'Know that wherever you might find them in the world, they are protecting something of importance, as they were entrusted to do so long ago.',0,0,0,0,'Priestess of Elune SAY_PRIESTESS_ALTAR_19'), +(-1000734,'Please, remember what we have shown you...',0,0,0,0,'Priestess of Elune SAY_PRIESTESS_ALTAR_20'), +(-1000735,'Farewell.',0,0,0,0,'Priestess of Elune SAY_PRIESTESS_ALTAR_21'), +(-1000736,'Thank you for you help, $n. I wish you well in your adventures.',0,0,0,0,'Ranshalla SAY_QUEST_END_1'), +(-1000737,'I want to stay here and reflect on what we have seen. Please see Erelas and tell him what we have learned.',0,0,0,0,'Ranshalla SAY_QUEST_END_2'), +(-1000738,'%s begins chanting a strange spell...',0,2,0,0,'Ranshalla EMOTE_CHANT_SPELL'), +(-1000739,'Remember, I need your help to properly channel. I will ask you to aid me several times in our path, so please be ready.',0,0,0,0,'Ranshalla SAY_QUEST_START'); + +DELETE FROM script_waypoint WHERE entry=10300; +INSERT INTO script_waypoint VALUES +(10300, 1, 5728.81, -4801.15, 778.18, 0, ''), +(10300, 2, 5730.22, -4818.34, 777.11, 0, ''), +(10300, 3, 5728.12, -4835.76, 778.15, 1000, 'SAY_ENTER_OWL_THICKET'), +(10300, 4, 5718.85, -4865.62, 787.56, 0, ''), +(10300, 5, 5697.13, -4909.12, 801.53, 0, ''), +(10300, 6, 5684.20, -4913.75, 801.60, 0, ''), +(10300, 7, 5674.67, -4915.78, 802.13, 0, ''), +(10300, 8, 5665.61, -4919.22, 804.85, 0, ''), +(10300, 9, 5638.22, -4897.58, 804.97, 0, ''), +(10300, 10, 5632.67, -4892.05, 805.44, 0, 'Cavern 1 - EMOTE_CHANT_SPELL'), +(10300, 11, 5664.58, -4921.84, 804.91, 0, ''), +(10300, 12, 5684.21, -4943.81, 802.80, 0, ''), +(10300, 13, 5724.92, -4983.69, 808.25, 0, ''), +(10300, 14, 5753.39, -4990.73, 809.84, 0, ''), +(10300, 15, 5765.62, -4994.89, 809.42, 0, 'Cavern 2 - EMOTE_CHANT_SPELL'), +(10300, 16, 5724.94, -4983.58, 808.29, 0, ''), +(10300, 17, 5699.61, -4989.82, 808.03, 0, ''), +(10300, 18, 5686.80, -5012.17, 807.27, 0, ''), +(10300, 19, 5691.43, -5037.43, 807.73, 0, ''), +(10300, 20, 5694.24, -5054.64, 808.85, 0, 'Cavern 3 - EMOTE_CHANT_SPELL'), +(10300, 21, 5686.88, -5012.18, 807.23, 0, ''), +(10300, 22, 5664.94, -5001.12, 807.78, 0, ''), +(10300, 23, 5647.12, -5002.84, 807.54, 0, ''), +(10300, 24, 5629.23, -5014.88, 807.94, 0, ''), +(10300, 25, 5611.26, -5025.62, 808.36, 0, 'Cavern 4 - EMOTE_CHANT_SPELL'), +(10300, 26, 5647.13, -5002.85, 807.57, 0, ''), +(10300, 27, 5641.12, -4973.22, 809.39, 0, ''), +(10300, 28, 5622.97, -4953.58, 811.12, 0, ''), +(10300, 29, 5601.52, -4939.49, 820.77, 0, ''), +(10300, 30, 5571.87, -4936.22, 831.35, 0, ''), +(10300, 31, 5543.23, -4933.67, 838.33, 0, ''), +(10300, 32, 5520.86, -4942.05, 843.02, 0, ''), +(10300, 33, 5509.15, -4946.31, 849.36, 0, ''), +(10300, 34, 5498.45, -4950.08, 849.98, 0, ''), +(10300, 35, 5485.78, -4963.40, 850.43, 0, ''), +(10300, 36, 5467.92, -4980.67, 851.89, 0, 'Cavern 5 - EMOTE_CHANT_SPELL'), +(10300, 37, 5498.68, -4950.45, 849.96, 0, ''), +(10300, 38, 5518.68, -4921.94, 844.65, 0, ''), +(10300, 39, 5517.66, -4920.82, 845.12, 0, 'SAY_REACH_ALTAR_1'), +(10300, 40, 5518.38, -4913.47, 845.57, 0, ''), +(10300, 41, 5511.31, -4913.82, 847.17, 5000, 'light the spotlights'), +(10300, 42, 5511.31, -4913.82, 847.17, 0, 'start altar cinematic - SAY_RANSHALLA_ALTAR_2'), +(10300, 43, 5510.36, -4921.17, 846.33, 0, ''), +(10300, 44, 5517.66, -4920.82, 845.12, 0, 'escort paused'); From b2556e7f73b29514f378a7fed10cce68dd16cc14 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Mon, 10 Oct 2011 22:54:35 +0300 Subject: [PATCH 0293/1172] [2310] Make use of the shiny new dialogue helper in quest 8736 --- scripts/kalimdor/moonglade.cpp | 112 ++++++++++++++++++------------- sd2_revision_nr.h | 2 +- sql/scriptdev2_script_full.sql | 26 ++----- sql/updates/r2310_scriptdev2.sql | 21 ++++++ 4 files changed, 92 insertions(+), 69 deletions(-) create mode 100644 sql/updates/r2310_scriptdev2.sql diff --git a/scripts/kalimdor/moonglade.cpp b/scripts/kalimdor/moonglade.cpp index 7f982e884..12f3413a7 100644 --- a/scripts/kalimdor/moonglade.cpp +++ b/scripts/kalimdor/moonglade.cpp @@ -408,6 +408,26 @@ enum MAX_SUMMON_TURNS = 10, // There are about 10 summoned shade waves }; +static const DialogueEntry aIntroDialogue[] = +{ + {NPC_REMULOS, 0, 14000}, // target player + {SAY_REMULOS_INTRO_4, NPC_REMULOS, 12000}, + {SAY_REMULOS_INTRO_5, NPC_REMULOS, 5000}, + {SPELL_CONJURE_RIFT, 0, 13000}, // conjure rift spell + {SAY_ERANIKUS_SPAWN, NPC_ERANIKUS_TYRANT, 11000}, + {SAY_REMULOS_TAUNT_1, NPC_REMULOS, 5000}, + {EMOTE_ERANIKUS_LAUGH, NPC_ERANIKUS_TYRANT, 3000}, + {SAY_ERANIKUS_TAUNT_2, NPC_ERANIKUS_TYRANT, 10000}, + {SAY_REMULOS_TAUNT_3, NPC_REMULOS, 12000}, + {SAY_ERANIKUS_TAUNT_4, NPC_ERANIKUS_TYRANT, 6000}, + {EMOTE_ERANIKUS_ATTACK, NPC_ERANIKUS_TYRANT, 7000}, + {NPC_ERANIKUS_TYRANT, 0, 0}, // target player - restart the escort and move Eranikus above the village + {SAY_REMULOS_DEFEND_2, NPC_REMULOS, 6000}, // face Eranikus + {SAY_ERANIKUS_SHADOWS, NPC_ERANIKUS_TYRANT, 4000}, + {SAY_REMULOS_DEFEND_3, NPC_REMULOS, 0}, + {0, 0, 0}, +}; + struct EventLocations { float m_fX, m_fY, m_fZ, m_fO; @@ -441,9 +461,13 @@ static EventLocations aShadowsLocations[] = {7963.00f, -2492.03f, 487.84f} }; -struct MANGOS_DLL_DECL npc_keeper_remulosAI : public npc_escortAI +struct MANGOS_DLL_DECL npc_keeper_remulosAI : public npc_escortAI, private DialogueHelper { - npc_keeper_remulosAI(Creature* pCreature) : npc_escortAI(pCreature) { Reset(); } + npc_keeper_remulosAI(Creature* pCreature) : npc_escortAI(pCreature), + DialogueHelper(aIntroDialogue) + { + Reset(); + } uint32 m_uiHealTimer; uint32 m_uiStarfireTimer; @@ -536,71 +560,61 @@ struct MANGOS_DLL_DECL npc_keeper_remulosAI : public npc_escortAI DoScriptText(SAY_REMULOS_INTRO_2, m_creature); break; case 13: - if (Player* pPlayer = GetPlayerForEscort()) - DoScriptText(SAY_REMULOS_INTRO_3, m_creature, pPlayer); - break; - case 14: - DoScriptText(SAY_REMULOS_INTRO_4, m_creature); - break; - case 15: - DoScriptText(SAY_REMULOS_INTRO_5, m_creature); - break; - case 16: - DoCastSpellIfCan(m_creature, SPELL_CONJURE_RIFT); + StartNextDialogueText(NPC_REMULOS); + SetEscortPaused(true); break; case 17: - if (Creature* pEranikus = m_creature->GetMap()->GetCreature(m_eranikusGuid)) - { - // This big yellow emote was removed at some point in WotLK - //DoScriptText(EMOTE_SUMMON_ERANIKUS, pEranikus); - DoScriptText(SAY_ERANIKUS_SPAWN, pEranikus); - } + StartNextDialogueText(SAY_REMULOS_DEFEND_2); + SetEscortPaused(true); break; case 18: - DoScriptText(SAY_REMULOS_TAUNT_1, m_creature); - break; - case 19: - if (Creature* pEranikus = m_creature->GetMap()->GetCreature(m_eranikusGuid)) - DoScriptText(EMOTE_ERANIKUS_LAUGH, pEranikus); - break; - case 20: - if (Creature* pEranikus = m_creature->GetMap()->GetCreature(m_eranikusGuid)) - DoScriptText(SAY_ERANIKUS_TAUNT_2, pEranikus); + SetEscortPaused(true); break; - case 21: - DoScriptText(SAY_REMULOS_TAUNT_3, m_creature); + } + } + + Creature* GetSpeakerByEntry(uint32 uiEntry) + { + switch (uiEntry) + { + case NPC_REMULOS: return m_creature; + case NPC_ERANIKUS_TYRANT: return m_creature->GetMap()->GetCreature(m_eranikusGuid); + + default: + return NULL; + } + } + + void JustDidDialogueStep(int32 iEntry) + { + switch(iEntry) + { + case NPC_REMULOS: + if (Player* pPlayer = GetPlayerForEscort()) + DoScriptText(SAY_REMULOS_INTRO_3, m_creature, pPlayer); break; - case 22: - if (Creature* pEranikus = m_creature->GetMap()->GetCreature(m_eranikusGuid)) - DoScriptText(SAY_ERANIKUS_TAUNT_4, pEranikus); + case SPELL_CONJURE_RIFT: + DoCastSpellIfCan(m_creature, SPELL_CONJURE_RIFT); break; - case 23: - if (Creature* pEranikus = m_creature->GetMap()->GetCreature(m_eranikusGuid)) - DoScriptText(EMOTE_ERANIKUS_ATTACK, pEranikus); + case SAY_ERANIKUS_SPAWN: + // This big yellow emote was removed at some point in WotLK + //DoScriptText(EMOTE_SUMMON_ERANIKUS, pEranikus); break; - case 24: + case NPC_ERANIKUS_TYRANT: if (Player* pPlayer = GetPlayerForEscort()) DoScriptText(SAY_REMULOS_DEFEND_1, m_creature, pPlayer); if (Creature* pEranikus = m_creature->GetMap()->GetCreature(m_eranikusGuid)) pEranikus->GetMotionMaster()->MovePoint(POINT_ID_ERANIKUS_FLIGHT, aEranikusLocations[1].m_fX, aEranikusLocations[1].m_fY, aEranikusLocations[1].m_fZ); + SetEscortPaused(false); break; - case 28: - DoScriptText(SAY_REMULOS_DEFEND_2, m_creature); + case SAY_REMULOS_DEFEND_2: if (Creature* pEranikus = m_creature->GetMap()->GetCreature(m_eranikusGuid)) m_creature->SetFacingToObject(pEranikus); break; - case 29: - if (Creature* pEranikus = m_creature->GetMap()->GetCreature(m_eranikusGuid)) - DoScriptText(SAY_ERANIKUS_SHADOWS, pEranikus); - break; - case 30: - DoScriptText(SAY_REMULOS_DEFEND_3, m_creature); + case SAY_REMULOS_DEFEND_3: SetEscortPaused(true); m_uiShadesummonTimer = 5000; break; - case 31: - SetEscortPaused(true); - break; } } @@ -614,6 +628,8 @@ struct MANGOS_DLL_DECL npc_keeper_remulosAI : public npc_escortAI void UpdateEscortAI(const uint32 uiDiff) { + DialogueUpdate(uiDiff); + if (m_uiOutroTimer) { if (m_uiOutroTimer <= uiDiff) diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index b673ffdc4..0ed60bc7f 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2309" + #define SD2_REVISION_NR "2310" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index ca24bb0be..49ca0478b 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -6135,26 +6135,12 @@ INSERT INTO script_waypoint VALUES (11832, 10, 7947.161133, -2583.396729, 490.066284, 0, ''), (11832, 11, 7951.086426, -2596.215088, 489.831268, 0, ''), (11832, 12, 7948.267090, -2610.062988, 492.340424, 0, ''), -(11832, 13, 7928.521973, -2625.954346, 492.447540, 14000, 'SAY_REMULOS_INTRO_3'), -(11832, 14, 7928.521973, -2625.954346, 492.447540, 12000, 'SAY_REMULOS_INTRO_4'), -(11832, 15, 7928.521973, -2625.954346, 492.447540, 5000, 'SAY_REMULOS_INTRO_5'), -(11832, 16, 7928.521973, -2625.954346, 492.447540, 13000, 'SPELL_CONJURE_RIFT'), -(11832, 17, 7928.521973, -2625.954346, 492.447540, 11000, 'SAY_ERANIKUS_SPAWN'), -(11832, 18, 7928.521973, -2625.954346, 492.447540, 5000, 'SAY_REMULOS_TAUNT_1'), -(11832, 19, 7928.521973, -2625.954346, 492.447540, 3000, 'EMOTE_ERANIKUS_LAUGH'), -(11832, 20, 7928.521973, -2625.954346, 492.447540, 10000, 'SAY_ERANIKUS_TAUNT_2'), -(11832, 21, 7928.521973, -2625.954346, 492.447540, 12000, 'SAY_REMULOS_TAUNT_3'), -(11832, 22, 7928.521973, -2625.954346, 492.447540, 6000, 'SAY_ERANIKUS_TAUNT_4'), -(11832, 23, 7928.521973, -2625.954346, 492.447540, 7000, 'EMOTE_ERANIKUS_ATTACK'), -(11832, 24, 7928.521973, -2625.954346, 492.447540, 0, 'SAY_REMULOS_DEFEND_1 - eranikus flies up'), -(11832, 25, 7948.267090, -2610.062988, 492.340424, 0, ''), -(11832, 26, 7952.318848, -2594.118408, 490.070374, 0, ''), -(11832, 27, 7913.988770, -2567.002686, 488.330566, 0, ''), -(11832, 28, 7835.454102, -2571.099121, 489.289246, 6000, 'SAY_REMULOS_DEFEND_2'), -(11832, 29, 7835.454102, -2571.099121, 489.289246, 4000, 'SAY_ERANIKUS_SHADOWS'), -(11832, 30, 7835.454102, -2571.099121, 489.289246, 0, 'SAY_REMULOS_DEFEND_3 - escort paused'), -(11832, 31, 7897.283691, -2560.652344, 487.461304, 0, ''), -(11832, 32, 7897.283691, -2560.652344, 487.461304, 0, ''); +(11832, 13, 7928.521973, -2625.954346, 492.447540, 0, 'escort paused - SAY_REMULOS_INTRO_3'), +(11832, 14, 7948.267090, -2610.062988, 492.340424, 0, ''), +(11832, 15, 7952.318848, -2594.118408, 490.070374, 0, ''), +(11832, 16, 7913.988770, -2567.002686, 488.330566, 0, ''), +(11832, 17, 7835.454102, -2571.099121, 489.289246, 0, 'escort paused - SAY_REMULOS_DEFEND_2'), +(11832, 18, 7897.283691, -2560.652344, 487.461304, 0, 'escort paused'); DELETE FROM script_waypoint WHERE entry=10300; INSERT INTO script_waypoint VALUES diff --git a/sql/updates/r2310_scriptdev2.sql b/sql/updates/r2310_scriptdev2.sql new file mode 100644 index 000000000..4f2ed914b --- /dev/null +++ b/sql/updates/r2310_scriptdev2.sql @@ -0,0 +1,21 @@ +DELETE FROM script_waypoint WHERE entry=11832; +INSERT INTO script_waypoint VALUES +(11832, 0, 7848.385645, -2216.356670, 470.888333, 15000, 'SAY_REMULOS_INTRO_1'), +(11832, 1, 7848.385645, -2216.356670, 470.888333, 5000, 'SAY_REMULOS_INTRO_2'), +(11832, 2, 7829.785645, -2244.836670, 463.853333, 0, ''), +(11832, 3, 7819.010742, -2304.344238, 455.956726, 0, ''), +(11832, 4, 7931.099121, -2314.350830, 473.054047, 0, ''), +(11832, 5, 7943.553223, -2324.688721, 477.676819, 0, ''), +(11832, 6, 7952.017578, -2351.135010, 485.234924, 0, ''), +(11832, 7, 7963.672852, -2412.990967, 488.953369, 0, ''), +(11832, 8, 7975.178223, -2551.602051, 490.079926, 0, ''), +(11832, 9, 7948.046875, -2570.828613, 489.750732, 0, ''), +(11832, 10, 7947.161133, -2583.396729, 490.066284, 0, ''), +(11832, 11, 7951.086426, -2596.215088, 489.831268, 0, ''), +(11832, 12, 7948.267090, -2610.062988, 492.340424, 0, ''), +(11832, 13, 7928.521973, -2625.954346, 492.447540, 0, 'escort paused - SAY_REMULOS_INTRO_3'), +(11832, 14, 7948.267090, -2610.062988, 492.340424, 0, ''), +(11832, 15, 7952.318848, -2594.118408, 490.070374, 0, ''), +(11832, 16, 7913.988770, -2567.002686, 488.330566, 0, ''), +(11832, 17, 7835.454102, -2571.099121, 489.289246, 0, 'escort paused - SAY_REMULOS_DEFEND_2'), +(11832, 18, 7897.283691, -2560.652344, 487.461304, 0, 'escort paused'); From cf45e9f858f34a3b344cb47a2d9656964133d60a Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Tue, 11 Oct 2011 17:49:42 +0200 Subject: [PATCH 0294/1172] [2311] Remove applying of STONED aura in Uldaman, expected to be done with DB tools --- scripts/eastern_kingdoms/uldaman/instance_uldaman.cpp | 3 --- sd2_revision_nr.h | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/scripts/eastern_kingdoms/uldaman/instance_uldaman.cpp b/scripts/eastern_kingdoms/uldaman/instance_uldaman.cpp index 5b6876e08..ea6d664dc 100644 --- a/scripts/eastern_kingdoms/uldaman/instance_uldaman.cpp +++ b/scripts/eastern_kingdoms/uldaman/instance_uldaman.cpp @@ -68,13 +68,11 @@ void instance_uldaman::OnCreatureCreate(Creature* pCreature) case NPC_GUARDIAN: case NPC_VAULT_WARDER: m_lWardens.push_back(pCreature->GetObjectGuid()); - pCreature->CastSpell(pCreature, SPELL_STONED, true); pCreature->SetNoCallAssistance(true); // no assistance break; case NPC_STONE_KEEPER: // FIXME - This isAlive check is currently useless m_mKeeperMap[pCreature->GetObjectGuid()] = pCreature->isAlive(); - pCreature->CastSpell(pCreature, SPELL_STONED, true); pCreature->SetNoCallAssistance(true); // no assistance break; default: @@ -213,7 +211,6 @@ void instance_uldaman::DoResetKeeperEvent() { pKeeper->SetDeathState(JUST_DIED); pKeeper->Respawn(); - pKeeper->CastSpell(pKeeper, SPELL_STONED, true); pKeeper->SetNoCallAssistance(true); itr->second = true; } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 0ed60bc7f..035016231 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2310" + #define SD2_REVISION_NR "2311" #endif // __SD2_REVISION_NR_H__ From ece285c42a79079840b5dc7807910a11184da61a Mon Sep 17 00:00:00 2001 From: Xfurry Date: Wed, 12 Oct 2011 23:22:58 +0300 Subject: [PATCH 0295/1172] [2312] Drop MaNGOS one compatibility patch New SD2 repo for MaNGOS one can be found at https://github.com/mangos-one/scriptdev2 Also more information can be found at "backport SD2 to 0.12 branch of MaNGOS" thread on SD2 forums --- .../ScriptDev2_2295_to_MaNGOS_one.patch | 755 ------------------ sd2_revision_nr.h | 2 +- 2 files changed, 1 insertion(+), 756 deletions(-) delete mode 100644 patches/custom/ScriptDev2_2295_to_MaNGOS_one.patch diff --git a/patches/custom/ScriptDev2_2295_to_MaNGOS_one.patch b/patches/custom/ScriptDev2_2295_to_MaNGOS_one.patch deleted file mode 100644 index 564cd1981..000000000 --- a/patches/custom/ScriptDev2_2295_to_MaNGOS_one.patch +++ /dev/null @@ -1,755 +0,0 @@ -From 899b1c722576f971dde0603531ac5519a29aa95a Mon Sep 17 00:00:00 2001 -From: ScriptDev2 -Date: Thu, 24 Mar 2011 00:16:38 +0100 -Subject: [PATCH] ScriptDev2 - One Compatibility patch - -Signed-off-by: Schmoozerd ---- - include/precompiled.h | 9 + - include/sc_instance.cpp | 22 -- - include/sc_instance.h | 3 - - .../shadowfang_keep/shadowfang_keep.cpp | 8 +- - scripts/kalimdor/azuremyst_isle.cpp | 2 +- - scripts/kalimdor/onyxias_lair/boss_onyxia.cpp | 4 +- - .../onyxias_lair/instance_onyxias_lair.cpp | 3 - - scripts/kalimdor/onyxias_lair/onyxias_lair.h | 2 - - scripts/northrend/azjol-nerub/ahnkahet/ahnkahet.h | 2 - - .../azjol-nerub/ahnkahet/instance_ahnkahet.cpp | 6 +- - .../azjol-nerub/azjol-nerub/azjol-nerub.h | 2 - - .../azjol-nerub/instance_azjol-nerub.cpp | 2 - - scripts/northrend/dragonblight.cpp | 2 +- - scripts/northrend/naxxramas/instance_naxxramas.cpp | 5 - - scripts/northrend/naxxramas/naxxramas.h | 4 - - .../ulduar/halls_of_lightning/halls_of_lightning.h | 4 +- - .../instance_halls_of_lightning.cpp | 2 - - .../ulduar/halls_of_stone/halls_of_stone.h | 2 - - .../halls_of_stone/instance_halls_of_stone.cpp | 2 - - .../auchenai_crypts/boss_exarch_maladaar.cpp | 8 +- - .../hellfire_ramparts/boss_omor_the_unscarred.cpp | 2 +- - scripts/world/item_scripts.cpp | 2 +- - system/ScriptLoader.cpp | 316 ++----------------- - 23 files changed, 59 insertions(+), 355 deletions(-) - -diff --git a/include/precompiled.h b/include/precompiled.h -index 11b6b31..40cf637 100644 ---- a/include/precompiled.h -+++ b/include/precompiled.h -@@ -11,6 +11,15 @@ - #include "sc_grid_searchers.h" - #include "sc_instance.h" - -+enum backports -+{ -+ UNIT_VIRTUAL_ITEM_SLOT_ID = UNIT_VIRTUAL_ITEM_SLOT_DISPLAY, -+ RAID_DIFFICULTY_10MAN_NORMAL = 0, -+ RAID_DIFFICULTY_25MAN_NORMAL = 0, -+ RAID_DIFFICULTY_10MAN_HEROIC = 0, -+ RAID_DIFFICULTY_25MAN_HEROIC = 0, -+}; -+ - #ifdef WIN32 - # include - BOOL APIENTRY DllMain(HANDLE hModule, DWORD ul_reason_for_call, LPVOID lpReserved) -diff --git a/include/sc_instance.cpp b/include/sc_instance.cpp -index 9db67e6..ba224a7 100644 ---- a/include/sc_instance.cpp -+++ b/include/sc_instance.cpp -@@ -143,28 +143,6 @@ Creature* ScriptedInstance::GetSingleCreatureFromStorage(uint32 uiEntry, bool bS - } - - /** -- Helper function to start a timed achievement criteria for players in the map -- -- @param criteriaType The Type that is required to complete the criteria, see enum AchievementCriteriaTypes in MaNGOS -- @param uiTimedCriteriaMiscId The ID that identifies how the criteria is started -- */ --void ScriptedInstance::DoStartTimedAchievement(AchievementCriteriaTypes criteriaType, uint32 uiTimedCriteriaMiscId) --{ -- Map::PlayerList const& lPlayers = instance->GetPlayers(); -- -- if (!lPlayers.isEmpty()) -- { -- for(Map::PlayerList::const_iterator itr = lPlayers.begin(); itr != lPlayers.end(); ++itr) -- { -- if (Player* pPlayer = itr->getSource()) -- pPlayer->StartTimedAchievementCriteria(criteriaType, uiTimedCriteriaMiscId); -- } -- } -- else -- debug_log("SD2: DoStartTimedAchievement attempt start achievements but no players in map."); --} -- --/** - Constructor for DialogueHelper - - @param pDialogueArray The static const array of DialogueEntry holding the information about the dialogue. This array MUST be terminated by {0,0,0} -diff --git a/include/sc_instance.h b/include/sc_instance.h -index 36c9336..679429a 100644 ---- a/include/sc_instance.h -+++ b/include/sc_instance.h -@@ -54,9 +54,6 @@ class MANGOS_DLL_DECL ScriptedInstance : public InstanceData - DoOrSimulateScriptTextForMap(iTextEntry, uiCreatureEntry, instance, GetSingleCreatureFromStorage(uiCreatureEntry, true)); - } - -- // Starts a timed achievement criteria for all players in instance -- void DoStartTimedAchievement(AchievementCriteriaTypes criteriaType, uint32 uiTimedCriteriaMiscId); -- - protected: - // Storage for GO-Guids and NPC-Guids - EntryGuidMap m_mGoEntryGuidStore; ///< Store unique GO-Guids by entry -diff --git a/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.cpp b/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.cpp -index e39c690..f3cf2b9 100644 ---- a/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.cpp -+++ b/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.cpp -@@ -89,10 +89,10 @@ struct MANGOS_DLL_DECL npc_shadowfang_prisonerAI : public npc_escortAI - else - DoScriptText(EMOTE_UNLOCK_DOOR_AD, m_creature); - break; -- case 12: -- if (m_uiNpcEntry != NPC_ASH) -- m_creature->HandleEmote(EMOTE_ONESHOT_USESTANDING); -- break; -+// case 12: -+// if (m_uiNpcEntry != NPC_ASH) -+// m_creature->HandleEmote(EMOTE_ONESHOT_USESTANDING); -+// break; - case 13: - if (m_uiNpcEntry == NPC_ASH) - DoScriptText(SAY_POST_DOOR_AS, m_creature); -diff --git a/scripts/kalimdor/azuremyst_isle.cpp b/scripts/kalimdor/azuremyst_isle.cpp -index f87a61e..79522f6 100644 ---- a/scripts/kalimdor/azuremyst_isle.cpp -+++ b/scripts/kalimdor/azuremyst_isle.cpp -@@ -103,7 +103,7 @@ struct MANGOS_DLL_DECL npc_draenei_survivorAI : public ScriptedAI - - void SpellHit(Unit* pCaster, const SpellEntry* pSpell) - { -- if (pSpell->IsFitToFamilyMask(UI64LIT(0x0000000000000000), 0x080000000)) -+ if (pSpell->Id == 28880) - { - m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PVP_ATTACKABLE); - m_creature->SetStandState(UNIT_STAND_STATE_STAND); -diff --git a/scripts/kalimdor/onyxias_lair/boss_onyxia.cpp b/scripts/kalimdor/onyxias_lair/boss_onyxia.cpp -index 8a3673a..00697c4 100644 ---- a/scripts/kalimdor/onyxias_lair/boss_onyxia.cpp -+++ b/scripts/kalimdor/onyxias_lair/boss_onyxia.cpp -@@ -320,7 +320,7 @@ struct MANGOS_DLL_DECL boss_onyxiaAI : public ScriptedAI - DoScriptText(SAY_PHASE_2_TRANS, m_creature); - - // sort of a hack, it is unclear how this really work but the values appear to be valid -- m_creature->SetByteValue(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_UNK_2); -+ m_creature->SetByteValue(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_ALWAYS_STAND/* | UNIT_BYTE1_FLAG_UNK_2*/); - m_creature->SetLevitate(true); - - if (m_pPointData) -@@ -446,7 +446,7 @@ struct MANGOS_DLL_DECL boss_onyxiaAI : public ScriptedAI - return; - - // All and only the Onyxia Deep Breath Spells have these visuals -- if (pSpell->SpellVisual[0] == SPELL_VISUAL_BREATH_A || pSpell->SpellVisual[0] == SPELL_VISUAL_BREATH_B) -+ if (pSpell->SpellVisual == SPELL_VISUAL_BREATH_A || pSpell->SpellVisual == SPELL_VISUAL_BREATH_B) - m_pInstance->SetData(TYPE_ONYXIA, DATA_PLAYER_TOASTED); - } - }; -diff --git a/scripts/kalimdor/onyxias_lair/instance_onyxias_lair.cpp b/scripts/kalimdor/onyxias_lair/instance_onyxias_lair.cpp -index cec7e97..f7dde0a 100644 ---- a/scripts/kalimdor/onyxias_lair/instance_onyxias_lair.cpp -+++ b/scripts/kalimdor/onyxias_lair/instance_onyxias_lair.cpp -@@ -62,10 +62,7 @@ void instance_onyxias_lair::SetData(uint32 uiType, uint32 uiData) - - m_uiEncounter = uiData; - if (uiData == IN_PROGRESS) -- { -- DoStartTimedAchievement(ACHIEVEMENT_CRITERIA_TYPE_KILL_CREATURE, ACHIEV_START_ONYXIA_ID); - m_uiAchievWhelpsCount = 0; -- } - if (uiData == DATA_LIFTOFF) - m_tPhaseTwoStart = time(NULL); - -diff --git a/scripts/kalimdor/onyxias_lair/onyxias_lair.h b/scripts/kalimdor/onyxias_lair/onyxias_lair.h -index f869ca9..2f493a7 100644 ---- a/scripts/kalimdor/onyxias_lair/onyxias_lair.h -+++ b/scripts/kalimdor/onyxias_lair/onyxias_lair.h -@@ -24,8 +24,6 @@ enum - ACHIEV_CRIT_MANY_WHELPS_H = 12568, - ACHIEV_CRIT_NO_BREATH_N = 12566, // Acheivements 4404, 4407 - ACHIEV_CRIT_NO_BREATH_H = 12569, -- -- ACHIEV_START_ONYXIA_ID = 6601, - }; - - class MANGOS_DLL_DECL instance_onyxias_lair : public ScriptedInstance -diff --git a/scripts/northrend/azjol-nerub/ahnkahet/ahnkahet.h b/scripts/northrend/azjol-nerub/ahnkahet/ahnkahet.h -index 114e535..bc6a5fc 100644 ---- a/scripts/northrend/azjol-nerub/ahnkahet/ahnkahet.h -+++ b/scripts/northrend/azjol-nerub/ahnkahet/ahnkahet.h -@@ -28,8 +28,6 @@ enum - - NPC_ELDER_NADOX = 29309, - //NPC_JEDOGA_SHADOWSEEKER = 29310, -- -- ACHIEV_START_VOLAZJ_ID = 20382, - }; - - class MANGOS_DLL_DECL instance_ahnkahet : public ScriptedInstance -diff --git a/scripts/northrend/azjol-nerub/ahnkahet/instance_ahnkahet.cpp b/scripts/northrend/azjol-nerub/ahnkahet/instance_ahnkahet.cpp -index 8036455..a82d755 100644 ---- a/scripts/northrend/azjol-nerub/ahnkahet/instance_ahnkahet.cpp -+++ b/scripts/northrend/azjol-nerub/ahnkahet/instance_ahnkahet.cpp -@@ -101,13 +101,9 @@ void instance_ahnkahet::SetData(uint32 uiType, uint32 uiData) - } - break; - case TYPE_JEDOGA: -- case TYPE_AMANITAR: -- m_auiEncounter[uiType] = uiData; -- break; - case TYPE_VOLAZJ: -+ case TYPE_AMANITAR: - m_auiEncounter[uiType] = uiData; -- if (uiData == IN_PROGRESS) -- DoStartTimedAchievement(ACHIEVEMENT_CRITERIA_TYPE_KILL_CREATURE, ACHIEV_START_VOLAZJ_ID); - break; - - default: -diff --git a/scripts/northrend/azjol-nerub/azjol-nerub/azjol-nerub.h b/scripts/northrend/azjol-nerub/azjol-nerub/azjol-nerub.h -index 7d75103..b61e85c 100644 ---- a/scripts/northrend/azjol-nerub/azjol-nerub/azjol-nerub.h -+++ b/scripts/northrend/azjol-nerub/azjol-nerub/azjol-nerub.h -@@ -27,8 +27,6 @@ enum - GO_DOOR_ANUBARAK_1 = 192396, - GO_DOOR_ANUBARAK_2 = 192397, - GO_DOOR_ANUBARAK_3 = 192398, -- -- ACHIEV_START_ANUB_ID = 20381, - }; - - static const uint32 aWatchers[] = {NPC_GASHRA, NPC_NARJIL, NPC_SILTHIK}; -diff --git a/scripts/northrend/azjol-nerub/azjol-nerub/instance_azjol-nerub.cpp b/scripts/northrend/azjol-nerub/azjol-nerub/instance_azjol-nerub.cpp -index 80faf81..9bd8e67 100644 ---- a/scripts/northrend/azjol-nerub/azjol-nerub/instance_azjol-nerub.cpp -+++ b/scripts/northrend/azjol-nerub/azjol-nerub/instance_azjol-nerub.cpp -@@ -177,8 +177,6 @@ void instance_azjol_nerub::SetData(uint32 uiType, uint32 uiData) - DoUseDoorOrButton(GO_DOOR_ANUBARAK_1); - DoUseDoorOrButton(GO_DOOR_ANUBARAK_2); - DoUseDoorOrButton(GO_DOOR_ANUBARAK_3); -- if (uiData == IN_PROGRESS) -- DoStartTimedAchievement(ACHIEVEMENT_CRITERIA_TYPE_KILL_CREATURE, ACHIEV_START_ANUB_ID); - break; - } - -diff --git a/scripts/northrend/dragonblight.cpp b/scripts/northrend/dragonblight.cpp -index a69dbc6..0bde6be 100644 ---- a/scripts/northrend/dragonblight.cpp -+++ b/scripts/northrend/dragonblight.cpp -@@ -101,7 +101,7 @@ bool GossipSelect_npc_alexstrasza_wr_gate(Player* pPlayer, Creature* pCreature, - if (uiAction == GOSSIP_ACTION_INFO_DEF+1) - { - pPlayer->CLOSE_GOSSIP_MENU(); -- pPlayer->SendMovieStart(MOVIE_ID_GATES); -+// pPlayer->SendMovieStart(MOVIE_ID_GATES); - } - - return true; -diff --git a/scripts/northrend/naxxramas/instance_naxxramas.cpp b/scripts/northrend/naxxramas/instance_naxxramas.cpp -index e85686d..8937d46 100644 ---- a/scripts/northrend/naxxramas/instance_naxxramas.cpp -+++ b/scripts/northrend/naxxramas/instance_naxxramas.cpp -@@ -241,10 +241,7 @@ void instance_naxxramas::SetData(uint32 uiType, uint32 uiData) - m_auiEncounter[uiType] = uiData; - DoUseDoorOrButton(GO_ARAC_ANUB_DOOR); - if (uiData == DONE) -- { - DoUseDoorOrButton(GO_ARAC_ANUB_GATE); -- DoStartTimedAchievement(ACHIEVEMENT_CRITERIA_TYPE_KILL_CREATURE, ACHIEV_START_MAEXXNA_ID); -- } - break; - case TYPE_FAERLINA: - DoUseDoorOrButton(GO_ARAC_FAER_WEB); -@@ -346,8 +343,6 @@ void instance_naxxramas::SetData(uint32 uiType, uint32 uiData) - break; - case TYPE_PATCHWERK: - m_auiEncounter[uiType] = uiData; -- if (uiData == IN_PROGRESS) -- DoStartTimedAchievement(ACHIEVEMENT_CRITERIA_TYPE_KILL_CREATURE, ACHIEV_START_PATCHWERK_ID); - if (uiData == DONE) - DoUseDoorOrButton(GO_CONS_PATH_EXIT_DOOR); - break; -diff --git a/scripts/northrend/naxxramas/naxxramas.h b/scripts/northrend/naxxramas/naxxramas.h -index c21f817..7f2876a 100644 ---- a/scripts/northrend/naxxramas/naxxramas.h -+++ b/scripts/northrend/naxxramas/naxxramas.h -@@ -174,10 +174,6 @@ enum - ACHIEV_CRIT_UNDYING_MAEX = 13238, - ACHIEV_CRIT_UNDYING_LOA = 13239, - ACHIEV_CRIT_UNDYING_THAD = 13240, -- -- // Timed achievement criterias -- ACHIEV_START_PATCHWERK_ID = 10286, -- ACHIEV_START_MAEXXNA_ID = 9891, - }; - - struct GothTrigger -diff --git a/scripts/northrend/ulduar/halls_of_lightning/halls_of_lightning.h b/scripts/northrend/ulduar/halls_of_lightning/halls_of_lightning.h -index ba0fe82..60d6895 100644 ---- a/scripts/northrend/ulduar/halls_of_lightning/halls_of_lightning.h -+++ b/scripts/northrend/ulduar/halls_of_lightning/halls_of_lightning.h -@@ -22,9 +22,7 @@ enum - GO_VOLKHAN_DOOR = 191325, //_doors07 - GO_IONAR_DOOR = 191326, //_doors05 - GO_LOKEN_DOOR = 191324, //_doors02 -- GO_LOKEN_THRONE = 192654, -- -- ACHIEV_START_LOKEN_ID = 20384, -+ GO_LOKEN_THRONE = 192654 - }; - - class MANGOS_DLL_DECL instance_halls_of_lightning : public ScriptedInstance -diff --git a/scripts/northrend/ulduar/halls_of_lightning/instance_halls_of_lightning.cpp b/scripts/northrend/ulduar/halls_of_lightning/instance_halls_of_lightning.cpp -index 989eeb9..5c8269f 100644 ---- a/scripts/northrend/ulduar/halls_of_lightning/instance_halls_of_lightning.cpp -+++ b/scripts/northrend/ulduar/halls_of_lightning/instance_halls_of_lightning.cpp -@@ -95,8 +95,6 @@ void instance_halls_of_lightning::SetData(uint32 uiType, uint32 uiData) - m_auiEncounter[uiType] = uiData; - break; - case TYPE_LOKEN: -- if (uiData == IN_PROGRESS) -- DoStartTimedAchievement(ACHIEVEMENT_CRITERIA_TYPE_KILL_CREATURE, ACHIEV_START_LOKEN_ID); - if (uiData == DONE) - { - DoUseDoorOrButton(GO_LOKEN_DOOR); -diff --git a/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.h b/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.h -index e9c5af2..14ff4eb 100644 ---- a/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.h -+++ b/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.h -@@ -42,8 +42,6 @@ enum - FACE_MARNAK = 0, - FACE_ABEDNEUM = 1, - FACE_KADDRAK = 2, -- -- ACHIEV_START_MAIDEN_ID = 20383, - }; - - struct Face -diff --git a/scripts/northrend/ulduar/halls_of_stone/instance_halls_of_stone.cpp b/scripts/northrend/ulduar/halls_of_stone/instance_halls_of_stone.cpp -index 5e52626..2930f00 100644 ---- a/scripts/northrend/ulduar/halls_of_stone/instance_halls_of_stone.cpp -+++ b/scripts/northrend/ulduar/halls_of_stone/instance_halls_of_stone.cpp -@@ -138,8 +138,6 @@ void instance_halls_of_stone::SetData(uint32 uiType, uint32 uiData) - break; - case TYPE_MAIDEN: - m_auiEncounter[1] = uiData; -- if (uiData == IN_PROGRESS) -- DoStartTimedAchievement(ACHIEVEMENT_CRITERIA_TYPE_KILL_CREATURE, ACHIEV_START_MAIDEN_ID); - break; - case TYPE_KRYSTALLUS: - m_auiEncounter[2] = uiData; -diff --git a/scripts/outland/auchindoun/auchenai_crypts/boss_exarch_maladaar.cpp b/scripts/outland/auchindoun/auchenai_crypts/boss_exarch_maladaar.cpp -index 1aae4d2..862938b 100644 ---- a/scripts/outland/auchindoun/auchenai_crypts/boss_exarch_maladaar.cpp -+++ b/scripts/outland/auchindoun/auchenai_crypts/boss_exarch_maladaar.cpp -@@ -107,10 +107,10 @@ struct MANGOS_DLL_DECL mob_stolen_soulAI : public ScriptedAI - DoCastSpellIfCan(m_creature->getVictim(), SPELL_MOONFIRE); - m_uiSpellTimer = 10000; - break; -- case CLASS_DEATH_KNIGHT: -- DoCastSpellIfCan(m_creature->getVictim(), SPELL_PLAGUE_STRIKE); -- m_uiSpellTimer = 10000; -- break; -+// case CLASS_DEATH_KNIGHT: -+// DoCastSpellIfCan(m_creature->getVictim(), SPELL_PLAGUE_STRIKE); -+// m_uiSpellTimer = 10000; -+// break; - } - } - else -diff --git a/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_omor_the_unscarred.cpp b/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_omor_the_unscarred.cpp -index 9de8415..692a391 100644 ---- a/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_omor_the_unscarred.cpp -+++ b/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_omor_the_unscarred.cpp -@@ -129,7 +129,7 @@ struct MANGOS_DLL_DECL boss_omor_the_unscarredAI : public ScriptedAI - if (Player* pPlayer = m_creature->GetMap()->GetPlayer(m_playerGuid)) - { - //if unit dosen't have this flag, then no pulling back (script will attempt cast, even if orbital strike was resisted) -- if (pPlayer->HasMovementFlag(MOVEFLAG_FALLING)) -+ if (pPlayer->HasMovementFlag(MOVEMENTFLAG_FALLING)) - DoCastSpellIfCan(pPlayer, SPELL_SHADOW_WHIP, CAST_INTERRUPT_PREVIOUS); - } - m_playerGuid.Clear(); -diff --git a/scripts/world/item_scripts.cpp b/scripts/world/item_scripts.cpp -index 4474aa7..8a70bbc 100644 ---- a/scripts/world/item_scripts.cpp -+++ b/scripts/world/item_scripts.cpp -@@ -47,7 +47,7 @@ bool ItemUse_item_arcane_charges(Player* pPlayer, Item* pItem, const SpellCastTa - pPlayer->SendEquipError(EQUIP_ERR_NONE, pItem, NULL); - - if (const SpellEntry* pSpellInfo = GetSpellStore()->LookupEntry(SPELL_ARCANE_CHARGES)) -- Spell::SendCastResult(pPlayer, pSpellInfo, 1, SPELL_FAILED_NOT_ON_GROUND); -+ Spell::SendCastResult(pPlayer, pSpellInfo, 1, SPELL_FAILED_ERROR); - - return true; - } -diff --git a/system/ScriptLoader.cpp b/system/ScriptLoader.cpp -index eb2ca25..2139385 100644 ---- a/system/ScriptLoader.cpp -+++ b/system/ScriptLoader.cpp -@@ -99,7 +99,22 @@ extern void AddSC_boss_majordomo(); - extern void AddSC_boss_ragnaros(); - extern void AddSC_instance_molten_core(); - extern void AddSC_molten_core(); --extern void AddSC_ebon_hold(); // scarlet_enclave -+extern void AddSC_boss_anubrekhan(); // naxxramas -+extern void AddSC_boss_four_horsemen(); -+extern void AddSC_boss_faerlina(); -+extern void AddSC_boss_gluth(); -+extern void AddSC_boss_gothik(); -+extern void AddSC_boss_grobbulus(); -+extern void AddSC_boss_kelthuzad(); -+extern void AddSC_boss_loatheb(); -+extern void AddSC_boss_maexxna(); -+extern void AddSC_boss_noth(); -+extern void AddSC_boss_heigan(); -+extern void AddSC_boss_patchwerk(); -+extern void AddSC_boss_razuvious(); -+extern void AddSC_boss_sapphiron(); -+extern void AddSC_boss_thaddius(); -+extern void AddSC_instance_naxxramas(); - extern void AddSC_boss_arcanist_doan(); // scarlet_monastery - extern void AddSC_boss_azshir_the_sleepless(); - extern void AddSC_boss_bloodmage_thalnos(); -@@ -211,8 +226,6 @@ extern void AddSC_boss_epoch_hunter(); - extern void AddSC_boss_lieutenant_drake(); - extern void AddSC_instance_old_hillsbrad(); - extern void AddSC_old_hillsbrad(); --extern void AddSC_culling_of_stratholme(); // COT, culling_of_stratholme --extern void AddSC_instance_culling_of_stratholme(); - extern void AddSC_dire_maul(); // dire_maul - extern void AddSC_instance_dire_maul(); - extern void AddSC_boss_celebras_the_cursed(); // maraudon -@@ -270,144 +283,7 @@ extern void AddSC_ungoro_crater(); - extern void AddSC_winterspring(); - - // northrend --extern void AddSC_boss_jedoga(); // azjol-nerub, ahnkahet --extern void AddSC_boss_nadox(); --extern void AddSC_boss_taldaram(); --extern void AddSC_boss_volazj(); --extern void AddSC_instance_ahnkahet(); --extern void AddSC_boss_anubarak(); // azjol-nerub, azjol-nerub --extern void AddSC_boss_hadronox(); --extern void AddSC_boss_krikthir(); --extern void AddSC_instance_azjol_nerub(); --extern void AddSC_trial_of_the_champion(); // CC, trial_of_the_champion --extern void AddSC_boss_grand_champions(); --extern void AddSC_instance_trial_of_the_champion(); --extern void AddSC_boss_anubarak_trial(); // CC, trial_of_the_crusader --extern void AddSC_boss_faction_champions(); --extern void AddSC_boss_jaraxxus(); --extern void AddSC_instance_trial_of_the_crusader(); --extern void AddSC_northrend_beasts(); --extern void AddSC_trial_of_the_crusader(); --extern void AddSC_twin_valkyr(); --extern void AddSC_boss_novos(); // draktharon_keep --extern void AddSC_boss_tharonja(); --extern void AddSC_boss_trollgore(); --extern void AddSC_instance_draktharon_keep(); --extern void AddSC_boss_colossus(); // gundrak --extern void AddSC_boss_eck(); --extern void AddSC_boss_galdarah(); --extern void AddSC_boss_moorabi(); --extern void AddSC_boss_sladran(); --extern void AddSC_instance_gundrak(); --extern void AddSC_boss_bronjahm(); // ICC, forge_of_souls --extern void AddSC_boss_devourer_of_souls(); --extern void AddSC_instance_forge_of_souls(); --extern void AddSC_boss_falric(); // ICC, halls_of_reflection --extern void AddSC_boss_lich_king(); --extern void AddSC_boss_marwyn(); --extern void AddSC_halls_of_reflection(); --extern void AddSC_instance_halls_of_reflection(); --extern void AddSC_boss_garfrost(); // ICC, pit_of_saron --extern void AddSC_boss_krick_and_ick(); --extern void AddSC_boss_tyrannus(); --extern void AddSC_instance_pit_of_saron(); --extern void AddSC_pit_of_saron(); --extern void AddSC_blood_prince_council(); // ICC, icecrown_citadel --extern void AddSC_boss_blood_queen_lanathel(); --extern void AddSC_boss_deathbringer_saurfang(); --extern void AddSC_boss_festergut(); --extern void AddSC_boss_lady_deathwhisper(); --extern void AddSC_boss_lord_marrowgar(); --extern void AddSC_boss_professor_putricide(); --extern void AddSC_boss_rotface(); --extern void AddSC_boss_sindragosa(); --extern void AddSC_boss_the_lich_king(); --extern void AddSC_boss_valithria_dreamwalker(); --extern void AddSC_gunship_battle(); --extern void AddSC_instance_icecrown_citadel(); --extern void AddSC_boss_anubrekhan(); // naxxramas --extern void AddSC_boss_four_horsemen(); --extern void AddSC_boss_faerlina(); --extern void AddSC_boss_gluth(); --extern void AddSC_boss_gothik(); --extern void AddSC_boss_grobbulus(); --extern void AddSC_boss_kelthuzad(); --extern void AddSC_boss_loatheb(); --extern void AddSC_boss_maexxna(); --extern void AddSC_boss_noth(); --extern void AddSC_boss_heigan(); --extern void AddSC_boss_patchwerk(); --extern void AddSC_boss_razuvious(); --extern void AddSC_boss_sapphiron(); --extern void AddSC_boss_thaddius(); --extern void AddSC_instance_naxxramas(); --extern void AddSC_boss_malygos(); // nexus, eye_of_eternity --extern void AddSC_boss_anomalus(); // nexus, nexus --extern void AddSC_boss_keristrasza(); --extern void AddSC_boss_ormorok(); --extern void AddSC_boss_telestra(); --extern void AddSC_instance_nexus(); --extern void AddSC_boss_sartharion(); // obsidian_sanctum --extern void AddSC_instance_obsidian_sanctum(); --extern void AddSC_boss_baltharus(); // ruby_sanctum --extern void AddSC_boss_halion(); --extern void AddSC_boss_saviana(); --extern void AddSC_boss_zarithrian(); --extern void AddSC_instance_ruby_sanctum(); --extern void AddSC_boss_bjarngrim(); // ulduar, halls_of_lightning --extern void AddSC_boss_ionar(); --extern void AddSC_boss_loken(); --extern void AddSC_boss_volkhan(); --extern void AddSC_instance_halls_of_lightning(); --extern void AddSC_boss_maiden_of_grief(); // ulduar, halls_of_stone --extern void AddSC_boss_sjonnir(); --extern void AddSC_halls_of_stone(); --extern void AddSC_instance_halls_of_stone(); --extern void AddSC_boss_assembly_of_iron(); // ulduar, ulduar --extern void AddSC_boss_algalon(); --extern void AddSC_boss_auriaya(); --extern void AddSC_boss_flame_leviathan(); --extern void AddSC_boss_freya(); --extern void AddSC_boss_general_vezax(); --extern void AddSC_boss_hodir(); --extern void AddSC_boss_ignis(); --extern void AddSC_boss_kologarn(); --extern void AddSC_boss_mimiron(); --extern void AddSC_boss_razorscale(); --extern void AddSC_boss_thorim(); --extern void AddSC_boss_xt_002(); --extern void AddSC_boss_yogg_saron(); --extern void AddSC_instance_ulduar(); --extern void AddSC_ulduar(); --extern void AddSC_boss_ingvar(); // utgarde_keep, utgarde_keep --extern void AddSC_boss_keleseth(); --extern void AddSC_boss_skarvald_and_dalronn(); --extern void AddSC_instance_utgarde_keep(); --extern void AddSC_utgarde_keep(); --extern void AddSC_boss_gortok(); // utgarde_keep, utgarde_pinnacle --extern void AddSC_boss_skadi(); --extern void AddSC_boss_svala(); --extern void AddSC_boss_ymiron(); --extern void AddSC_instance_pinnacle(); --extern void AddSC_boss_archavon(); // vault_of_archavon --extern void AddSC_boss_emalon(); --extern void AddSC_boss_koralon(); --extern void AddSC_boss_toravon(); --extern void AddSC_instance_vault_of_archavon(); --extern void AddSC_boss_erekem(); // violet_hold --extern void AddSC_boss_ichoron(); --extern void AddSC_instance_violet_hold(); --extern void AddSC_violet_hold(); -- --extern void AddSC_borean_tundra(); --extern void AddSC_dalaran(); --extern void AddSC_dragonblight(); --extern void AddSC_grizzly_hills(); --extern void AddSC_howling_fjord(); --extern void AddSC_icecrown(); --extern void AddSC_sholazar_basin(); --extern void AddSC_storm_peaks(); --extern void AddSC_zuldrak(); -+// removed - - // outland - extern void AddSC_boss_exarch_maladaar(); // auchindoun, auchenai_crypts -@@ -589,7 +465,22 @@ void AddScripts() - AddSC_boss_ragnaros(); - AddSC_instance_molten_core(); - AddSC_molten_core(); -- AddSC_ebon_hold(); // scarlet_enclave -+ AddSC_boss_anubrekhan(); // naxxramas -+ AddSC_boss_four_horsemen(); -+ AddSC_boss_faerlina(); -+ AddSC_boss_gluth(); -+ AddSC_boss_gothik(); -+ AddSC_boss_grobbulus(); -+ AddSC_boss_kelthuzad(); -+ AddSC_boss_loatheb(); -+ AddSC_boss_maexxna(); -+ AddSC_boss_noth(); -+ AddSC_boss_heigan(); -+ AddSC_boss_patchwerk(); -+ AddSC_boss_razuvious(); -+ AddSC_boss_sapphiron(); -+ AddSC_boss_thaddius(); -+ AddSC_instance_naxxramas(); - AddSC_boss_arcanist_doan(); // scarlet_monastery - AddSC_boss_azshir_the_sleepless(); - AddSC_boss_bloodmage_thalnos(); -@@ -701,8 +592,6 @@ void AddScripts() - AddSC_boss_lieutenant_drake(); - AddSC_instance_old_hillsbrad(); - AddSC_old_hillsbrad(); -- AddSC_culling_of_stratholme(); // CoT, culling_of_stratholme -- AddSC_instance_culling_of_stratholme(); - AddSC_dire_maul(); // dire_maul - AddSC_instance_dire_maul(); - AddSC_boss_celebras_the_cursed(); // maraudon -@@ -760,144 +649,7 @@ void AddScripts() - AddSC_winterspring(); - - // northrend -- AddSC_boss_jedoga(); // azjol-nerub, ahnkahet -- AddSC_boss_nadox(); -- AddSC_boss_taldaram(); -- AddSC_boss_volazj(); -- AddSC_instance_ahnkahet(); -- AddSC_boss_anubarak(); // azjol-nerub, azjol-nerub -- AddSC_boss_hadronox(); -- AddSC_boss_krikthir(); -- AddSC_instance_azjol_nerub(); -- AddSC_boss_grand_champions(); // CC, trial_of_the_champion -- AddSC_instance_trial_of_the_champion(); -- AddSC_trial_of_the_champion(); -- AddSC_boss_anubarak_trial(); // CC, trial_of_the_crusader -- AddSC_boss_faction_champions(); -- AddSC_boss_jaraxxus(); -- AddSC_instance_trial_of_the_crusader(); -- AddSC_northrend_beasts(); -- AddSC_trial_of_the_crusader(); -- AddSC_twin_valkyr(); -- AddSC_boss_novos(); // draktharon_keep -- AddSC_boss_tharonja(); -- AddSC_boss_trollgore(); -- AddSC_instance_draktharon_keep(); -- AddSC_boss_colossus(); // gundrak -- AddSC_boss_eck(); -- AddSC_boss_galdarah(); -- AddSC_boss_moorabi(); -- AddSC_boss_sladran(); -- AddSC_instance_gundrak(); -- AddSC_boss_bronjahm(); // ICC, FH, forge_of_souls -- AddSC_boss_devourer_of_souls(); -- AddSC_instance_forge_of_souls(); -- AddSC_boss_falric(); // ICC, FH, halls_of_reflection -- AddSC_boss_lich_king(); -- AddSC_boss_marwyn(); -- AddSC_halls_of_reflection(); -- AddSC_instance_halls_of_reflection(); -- AddSC_boss_garfrost(); // ICC, FH, pit_of_saron -- AddSC_boss_krick_and_ick(); -- AddSC_boss_tyrannus(); -- AddSC_instance_pit_of_saron(); -- AddSC_pit_of_saron(); -- AddSC_blood_prince_council(); // ICC, icecrown_citadel -- AddSC_boss_blood_queen_lanathel(); -- AddSC_boss_deathbringer_saurfang(); -- AddSC_boss_festergut(); -- AddSC_boss_lady_deathwhisper(); -- AddSC_boss_lord_marrowgar(); -- AddSC_boss_professor_putricide(); -- AddSC_boss_rotface(); -- AddSC_boss_sindragosa(); -- AddSC_boss_the_lich_king(); -- AddSC_boss_valithria_dreamwalker(); -- AddSC_gunship_battle(); -- AddSC_instance_icecrown_citadel(); -- AddSC_boss_anubrekhan(); // naxxramas -- AddSC_boss_four_horsemen(); -- AddSC_boss_faerlina(); -- AddSC_boss_gluth(); -- AddSC_boss_gothik(); -- AddSC_boss_grobbulus(); -- AddSC_boss_kelthuzad(); -- AddSC_boss_loatheb(); -- AddSC_boss_maexxna(); -- AddSC_boss_noth(); -- AddSC_boss_heigan(); -- AddSC_boss_patchwerk(); -- AddSC_boss_razuvious(); -- AddSC_boss_sapphiron(); -- AddSC_boss_thaddius(); -- AddSC_instance_naxxramas(); -- AddSC_boss_malygos(); // nexus, eye_of_eternity -- AddSC_boss_anomalus(); // nexus, nexus -- AddSC_boss_keristrasza(); -- AddSC_boss_ormorok(); -- AddSC_boss_telestra(); -- AddSC_instance_nexus(); -- AddSC_boss_sartharion(); // obsidian_sanctum -- AddSC_instance_obsidian_sanctum(); -- AddSC_boss_baltharus(); // ruby_sanctum -- AddSC_boss_halion(); -- AddSC_boss_saviana(); -- AddSC_boss_zarithrian(); -- AddSC_instance_ruby_sanctum(); -- AddSC_boss_bjarngrim(); // ulduar, halls_of_lightning -- AddSC_boss_ionar(); -- AddSC_boss_loken(); -- AddSC_boss_volkhan(); -- AddSC_instance_halls_of_lightning(); -- AddSC_boss_maiden_of_grief(); // ulduar, halls_of_stone -- AddSC_boss_sjonnir(); -- AddSC_halls_of_stone(); -- AddSC_instance_halls_of_stone(); -- AddSC_boss_assembly_of_iron(); // ulduar, ulduar -- AddSC_boss_algalon(); -- AddSC_boss_auriaya(); -- AddSC_boss_flame_leviathan(); -- AddSC_boss_freya(); -- AddSC_boss_general_vezax(); -- AddSC_boss_hodir(); -- AddSC_boss_ignis(); -- AddSC_boss_kologarn(); -- AddSC_boss_mimiron(); -- AddSC_boss_razorscale(); -- AddSC_boss_thorim(); -- AddSC_boss_xt_002(); -- AddSC_boss_yogg_saron(); -- AddSC_instance_ulduar(); -- AddSC_ulduar(); -- AddSC_boss_ingvar(); // UK, utgarde_keep -- AddSC_boss_keleseth(); -- AddSC_boss_skarvald_and_dalronn(); -- AddSC_instance_utgarde_keep(); -- AddSC_utgarde_keep(); -- AddSC_boss_gortok(); // UK, utgarde_pinnacle -- AddSC_boss_skadi(); -- AddSC_boss_svala(); -- AddSC_boss_ymiron(); -- AddSC_instance_pinnacle(); -- AddSC_boss_archavon(); // vault_of_archavon -- AddSC_boss_emalon(); -- AddSC_boss_koralon(); -- AddSC_boss_toravon(); -- AddSC_instance_vault_of_archavon(); -- AddSC_boss_erekem(); // violet_hold -- AddSC_boss_ichoron(); -- AddSC_instance_violet_hold(); -- AddSC_violet_hold(); -- -- AddSC_borean_tundra(); -- AddSC_dalaran(); -- AddSC_dragonblight(); -- AddSC_grizzly_hills(); -- AddSC_howling_fjord(); -- AddSC_icecrown(); -- AddSC_sholazar_basin(); -- AddSC_storm_peaks(); -- AddSC_zuldrak(); -+ // removed - - // outland - AddSC_boss_exarch_maladaar(); // auchindoun, auchenai_crypts --- -1.7.6.msysgit.0 - diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 035016231..821d9ed46 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2311" + #define SD2_REVISION_NR "2312" #endif // __SD2_REVISION_NR_H__ From 4666fbd6f369b92375b710d50cf2f816b1f4de11 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Fri, 14 Oct 2011 02:28:31 +0300 Subject: [PATCH 0296/1172] [2313] Implement quest 8519 Thanks Nitka for providing the original script --- scripts/kalimdor/silithus.cpp | 680 ++++++++++++++++++++++++++++++- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 2 + sql/scriptdev2_script_full.sql | 34 +- sql/updates/r2313_mangos.sql | 2 + sql/updates/r2313_scriptdev2.sql | 33 ++ 6 files changed, 737 insertions(+), 16 deletions(-) create mode 100644 sql/updates/r2313_mangos.sql create mode 100644 sql/updates/r2313_scriptdev2.sql diff --git a/scripts/kalimdor/silithus.cpp b/scripts/kalimdor/silithus.cpp index 807d07dc7..8df63629a 100644 --- a/scripts/kalimdor/silithus.cpp +++ b/scripts/kalimdor/silithus.cpp @@ -17,13 +17,14 @@ /* ScriptData SDName: Silithus SD%Complete: 100 -SDComment: Quest support: 7785, 8304. +SDComment: Quest support: 7785, 8304, 8519. SDCategory: Silithus EndScriptData */ /* ContentData npc_highlord_demitrian npcs_rutgar_and_frankal +npc_anachronos_the_ancient EndContentData */ #include "precompiled.h" @@ -234,19 +235,670 @@ bool GossipSelect_npcs_rutgar_and_frankal(Player* pPlayer, Creature* pCreature, return true; } +/*### +## npc_anachronos_the_ancient +###*/ + +enum +{ + // Dragons + NPC_MERITHRA_OF_THE_DREAM = 15378, + NPC_CAELESTRASZ = 15379, + NPC_ARYGOS = 15380, + NPC_ANACHRONOS_THE_ANCIENT = 15381, + NPC_ANACHRONOS_QUEST_TRIGGER = 15454, // marks some movement for the dragons + + // Elfs + NPC_FANDRAL_STAGHELM = 15382, + NPC_KALDOREI_INFANTRY = 15423, + + // Qiraji warriors + NPC_QIRAJI_WASP = 15414, + NPC_QIRAJI_DRONE = 15421, + NPC_QIRAJI_TANK = 15422, + NPC_ANUBISATH_CONQUEROR = 15424, + + QUEST_A_PAWN_ON_THE_ETERNAL_BOARD = 8519, + + // Yells -> in chronological order + SAY_ANACHRONOS_INTRO_1 = -1000740, + SAY_FANDRAL_INTRO_2 = -1000741, + SAY_MERITHRA_INTRO_3 = -1000742, + EMOTE_ARYGOS_NOD = -1000743, + SAY_CAELESTRASZ_INTRO_4 = -1000744, + EMOTE_MERITHRA_GLANCE = -1000745, + SAY_MERITHRA_INTRO_5 = -1000746, + + SAY_MERITHRA_ATTACK_1 = -1000747, + SAY_ARYGOS_ATTACK_2 = -1000748, + SAY_ARYGOS_ATTACK_3 = -1000749, + SAY_CAELESTRASZ_ATTACK_4 = -1000750, + SAY_CAELESTRASZ_ATTACK_5 = -1000751, + + SAY_ANACHRONOS_SEAL_1 = -1000752, + SAY_FANDRAL_SEAL_2 = -1000753, + SAY_ANACHRONOS_SEAL_3 = -1000754, + SAY_ANACHRONOS_SEAL_4 = -1000755, + SAY_ANACHRONOS_SEAL_5 = -1000756, + SAY_FANDRAL_SEAL_6 = -1000757, + + EMOTE_FANDRAL_EXHAUSTED = -1000758, + SAY_ANACHRONOS_EPILOGUE_1 = -1000759, + SAY_ANACHRONOS_EPILOGUE_2 = -1000760, + SAY_ANACHRONOS_EPILOGUE_3 = -1000761, + EMOTE_ANACHRONOS_SCEPTER = -1000762, + SAY_FANDRAL_EPILOGUE_4 = -1000763, + SAY_FANDRAL_EPILOGUE_5 = -1000764, + EMOTE_FANDRAL_SHATTER = -1000765, + SAY_ANACHRONOS_EPILOGUE_6 = -1000766, + SAY_FANDRAL_EPILOGUE_7 = -1000767, + EMOTE_ANACHRONOS_DISPPOINTED = -1000768, + EMOTE_ANACHRONOS_PICKUP = -1000769, + SAY_ANACHRONOS_EPILOGUE_8 = -1000770, + + // The transform spell for Anachronos was removed from DBC + DISPLAY_ID_BRONZE_DRAGON = 15500, + + // Spells + SPELL_GREEN_DRAGON_TRANSFORM = 25105, + SPELL_RED_DRAGON_TRANSFORM = 25106, + SPELL_BLUE_DRAGON_TRANSFORM = 25107, + //SPELL_BRONZE_DRAGON_TRANSFORM = 25108, // Spell was removed - exists only before 2.0.1 + + SPELL_MERITHRA_WAKE = 25145, // should trigger 25172 on targets + SPELL_ARYGOS_VENGEANCE = 25149, + SPELL_CAELESTRASZ_MOLTEN_RAIN = 25150, + + SPELL_TIME_STOP = 25158, // Anachronos stops the battle - should trigger 25171 + SPELL_GLYPH_OF_WARDING = 25166, // Sends event 9427 - should activate Go 176148 + SPELL_PRISMATIC_BARRIER = 25159, // Sends event 9425 - should activate Go 176146 + SPELL_CALL_ANCIENTS = 25167, // Sends event 9426 - should activate Go 176147 + SPELL_SHATTER_HAMMER = 25182, // Breakes the scepter - needs DB coords + + POINT_ID_DRAGON_ATTACK = 1, + POINT_ID_EXIT = 2, + POINT_ID_GATE = 3, + POINT_ID_SCEPTER_1 = 4, + POINT_ID_SCEPTER_2 = 5, + POINT_ID_EPILOGUE = 6, + DATA_HANDLE_SCEPTER = 7, // dummy members - used in dialogue helper + DATA_MERITHRA_ATTACK = 8, + DATA_CAELASTRASZ_ATTACK = 9, + + MAX_DRAGONS = 4, + MAX_CONQUERORS = 3, + MAX_QIRAJI = 6, + MAX_KALDOREI = 20, +}; + +/* Known event issues: + * The Kaldorei and Qiraji soldiers don't have the correct flags and factions in DB + * The Ahn'Qiraj gate gameobjects are missing from DB + * The spells used by the dragons upon the Qiraji need core support + * The script events sent by the spells which close the AQ gate needs DB support + * Can't make Fandral equip the Scepter when Anachronos handles it to him + */ + +static const DialogueEntry aEventDialogue[] = +{ + {NPC_ANACHRONOS_THE_ANCIENT, 0, 2000}, // summon the dragons + {SAY_ANACHRONOS_INTRO_1, NPC_ANACHRONOS_THE_ANCIENT, 3000}, + {EMOTE_ONESHOT_SHOUT, NPC_ANACHRONOS_THE_ANCIENT, 3000}, // make Anachronos shout and summon the warriors + {SAY_FANDRAL_INTRO_2, NPC_FANDRAL_STAGHELM, 6000}, + {EMOTE_MERITHRA_GLANCE, NPC_MERITHRA_OF_THE_DREAM, 2000}, + {SAY_MERITHRA_INTRO_3, NPC_MERITHRA_OF_THE_DREAM, 3000}, + {EMOTE_ARYGOS_NOD, NPC_ARYGOS, 4000}, + {SAY_CAELESTRASZ_INTRO_4, NPC_CAELESTRASZ, 9000}, + {SAY_MERITHRA_INTRO_5, NPC_MERITHRA_OF_THE_DREAM, 5000}, + {NPC_ANACHRONOS_QUEST_TRIGGER, 0, 0}, // send Merithra to fight + {DATA_MERITHRA_ATTACK, 0, 5000}, // make Merithra wait + {SAY_MERITHRA_ATTACK_1, NPC_MERITHRA_OF_THE_DREAM, 1000}, + {SPELL_GREEN_DRAGON_TRANSFORM, 0, 6000}, + {SAY_ARYGOS_ATTACK_2, NPC_ARYGOS, 5000}, + {NPC_ARYGOS, 0, 1000}, // send Arygos to fight + {POINT_ID_EXIT, 0, 4000}, // make Merithra exit + {SAY_ARYGOS_ATTACK_3, NPC_ARYGOS, 4000}, + {SPELL_BLUE_DRAGON_TRANSFORM, 0, 5000}, + {SPELL_ARYGOS_VENGEANCE, 0, 7000}, + {POINT_ID_DRAGON_ATTACK, 0, 1000}, // make Arygos exit + {SAY_CAELESTRASZ_ATTACK_4, NPC_CAELESTRASZ, 5000}, + {NPC_CAELESTRASZ, 0, 0}, // send Caelestrasz to fight + {DATA_CAELASTRASZ_ATTACK, 0, 3000}, // make Caelestrasz wait + {SAY_CAELESTRASZ_ATTACK_5, NPC_CAELESTRASZ, 5000}, + {SPELL_RED_DRAGON_TRANSFORM, 0, 4000}, // transform Caelestrasz + {SPELL_CAELESTRASZ_MOLTEN_RAIN, 0, 6000}, // Caelestrasz casts molten rain + {SAY_ANACHRONOS_SEAL_1, NPC_ANACHRONOS_THE_ANCIENT, 5000}, + {SAY_FANDRAL_SEAL_2, NPC_FANDRAL_STAGHELM, 3000}, + {SAY_ANACHRONOS_SEAL_3, NPC_ANACHRONOS_THE_ANCIENT, 1000}, + {POINT_ID_GATE, 0, 1000}, // send Anachronos to the gate + {NPC_FANDRAL_STAGHELM, 0, 0}, // send Fandral to the gate + {SPELL_TIME_STOP, 0, 7000}, // Anachronos casts Time Stop + {SPELL_PRISMATIC_BARRIER, 0, 15000}, + {SPELL_GLYPH_OF_WARDING, 0, 4000}, + {SAY_ANACHRONOS_SEAL_5, NPC_ANACHRONOS_THE_ANCIENT, 3000}, + {SAY_FANDRAL_SEAL_6, NPC_FANDRAL_STAGHELM, 9000}, + {EMOTE_FANDRAL_EXHAUSTED, NPC_FANDRAL_STAGHELM, 1000}, + {SAY_ANACHRONOS_EPILOGUE_1, NPC_ANACHRONOS_THE_ANCIENT, 6000}, + {SAY_ANACHRONOS_EPILOGUE_2, NPC_ANACHRONOS_THE_ANCIENT, 5000}, + {SAY_ANACHRONOS_EPILOGUE_3, NPC_ANACHRONOS_THE_ANCIENT, 15000}, + {DATA_HANDLE_SCEPTER, NPC_ANACHRONOS_THE_ANCIENT, 3000}, // handle the scepter + {SAY_FANDRAL_EPILOGUE_4, NPC_FANDRAL_STAGHELM, 3000}, + {POINT_ID_SCEPTER_2, 0, 4000}, // make Anachronos stand + {SAY_FANDRAL_EPILOGUE_5, NPC_FANDRAL_STAGHELM, 12000}, + {EMOTE_FANDRAL_SHATTER, NPC_FANDRAL_STAGHELM, 3000}, + {SAY_ANACHRONOS_EPILOGUE_6, NPC_ANACHRONOS_THE_ANCIENT, 0}, + {SAY_FANDRAL_EPILOGUE_7, NPC_FANDRAL_STAGHELM, 8000}, + {POINT_ID_EPILOGUE, 0, 4000}, // move Fandral to Anachronos + {EMOTE_ANACHRONOS_DISPPOINTED, NPC_ANACHRONOS_THE_ANCIENT, 1000}, + {POINT_ID_SCEPTER_1, 0, 0}, // make Anachronos pick the pieces + {0, 0, 0}, +}; + +struct EventLocations +{ + float m_fX, m_fY, m_fZ, m_fO; + uint32 m_uiEntry; +}; + +static EventLocations aEternalBoardNPCs[MAX_DRAGONS] = +{ + {-8029.301f, 1534.612f, 2.609f, 3.121f, NPC_FANDRAL_STAGHELM}, + {-8034.227f, 1536.580f, 2.609f, 6.161f, NPC_ARYGOS}, + {-8031.935f, 1532.658f, 2.609f, 1.012f, NPC_CAELESTRASZ}, + {-8034.106f, 1534.224f, 2.609f, 0.290f, NPC_MERITHRA_OF_THE_DREAM}, +}; + +static EventLocations aEternalBoardMovement[] = +{ + {-8159.951f, 1525.241f, 74.994f}, // 0 Flight position for dragons + {-8106.238f, 1525.948f, 2.639f}, // 1 Anachronos gate location + {-8103.861f, 1525.923f, 2.677f}, // 2 Fandral gate location + {-8107.387f, 1523.641f, 2.609f}, // 3 Shattered scepter + {-8100.921f, 1527.740f, 2.871f}, // 4 Fandral epilogue location + {-8115.270f, 1515.926f, 3.305f}, // 5 Anachronos gather broken scepter 1 + {-8116.879f, 1530.615f, 3.762f}, // 6 Anachronos gather broken scepter 2 + {-7997.790f, 1548.664f, 3.738f}, // 7 Fandral exit location + {-8061.933f, 1496.196f, 2.556f}, // 8 Anachronos launch location + {-8008.705f, 1446.063f, 44.104f}, // 9 Anachronos flight location + {-8085.748f, 1521.484f, 2.624f} // 10 Anchor point for the army summoning +}; + +struct MANGOS_DLL_DECL npc_anachronos_the_ancientAI : public ScriptedAI, private DialogueHelper +{ + npc_anachronos_the_ancientAI(Creature* pCreature) : ScriptedAI(pCreature), + DialogueHelper(aEventDialogue) + { + Reset(); + } + + uint32 m_uiEventTimer; + + uint8 m_uiEventStage; + + ObjectGuid m_fandralGuid; + ObjectGuid m_merithraGuid; + ObjectGuid m_CaelestraszGuid; + ObjectGuid m_arygosGuid; + ObjectGuid m_playerGuid; + ObjectGuid m_triggerGuid; + + GUIDList m_lQirajiWarriorsList; + + void Reset() + { + // We summon the rest of the dragons on timer + m_uiEventTimer = 100; + m_uiEventStage = 0; + } + + void JustDidDialogueStep(int32 iEntry) + { + switch(iEntry) + { + case NPC_ANACHRONOS_THE_ANCIENT: + // Call the other dragons + DoSummonDragons(); + break; + case EMOTE_ONESHOT_SHOUT: + // Summon warriors + DoSummonWarriors(); + m_creature->HandleEmote(EMOTE_ONESHOT_SHOUT); + break; + case SAY_FANDRAL_INTRO_2: + if (Creature* pFandral = m_creature->GetMap()->GetCreature(m_fandralGuid)) + pFandral->SetFacingToObject(m_creature); + break; + case EMOTE_MERITHRA_GLANCE: + if (Creature* pMerithra = m_creature->GetMap()->GetCreature(m_merithraGuid)) + { + if (Creature* pFandral = m_creature->GetMap()->GetCreature(m_fandralGuid)) + pFandral->SetFacingToObject(pMerithra); + } + break; + case NPC_ANACHRONOS_QUEST_TRIGGER: + // Move Merithra to attack + if (Creature* pTrigger = GetClosestCreatureWithEntry(m_creature, NPC_ANACHRONOS_QUEST_TRIGGER, 35.0f)) + { + m_triggerGuid = pTrigger->GetObjectGuid(); + if (Creature* pMerithra = m_creature->GetMap()->GetCreature(m_merithraGuid)) + { + pMerithra->SetWalk(false); + pMerithra->GetMotionMaster()->MovePoint(POINT_ID_DRAGON_ATTACK, pTrigger->GetPositionX(), pTrigger->GetPositionY(), pTrigger->GetPositionZ()); + } + } + break; + case SPELL_GREEN_DRAGON_TRANSFORM: + if (Creature* pMerithra = m_creature->GetMap()->GetCreature(m_merithraGuid)) + pMerithra->CastSpell(pMerithra, SPELL_GREEN_DRAGON_TRANSFORM, false); + break; + case SAY_ARYGOS_ATTACK_2: + if (Creature* pMerithra = m_creature->GetMap()->GetCreature(m_merithraGuid)) + pMerithra->CastSpell(pMerithra, SPELL_MERITHRA_WAKE, false); + break; + case NPC_ARYGOS: + // Move Arygos to attack + if (Creature* pTrigger = m_creature->GetMap()->GetCreature(m_triggerGuid)) + { + if (Creature* pArygos = m_creature->GetMap()->GetCreature(m_arygosGuid)) + { + pArygos->SetWalk(false); + pArygos->GetMotionMaster()->MovePoint(POINT_ID_DRAGON_ATTACK, pTrigger->GetPositionX(), pTrigger->GetPositionY(), pTrigger->GetPositionZ()); + } + } + break; + case POINT_ID_EXIT: + // Move Merithra to the exit point + if (Creature* pMerithra = m_creature->GetMap()->GetCreature(m_merithraGuid)) + { + pMerithra->SetByteValue(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_UNK_2); + pMerithra->SetLevitate(true); + pMerithra->GetMotionMaster()->MovePoint(POINT_ID_EXIT, aEternalBoardMovement[0].m_fX, aEternalBoardMovement[0].m_fY, aEternalBoardMovement[0].m_fZ); + pMerithra->ForcedDespawn(9000); + } + break; + case SPELL_BLUE_DRAGON_TRANSFORM: + if (Creature* pArygos = m_creature->GetMap()->GetCreature(m_arygosGuid)) + pArygos->CastSpell(pArygos, SPELL_BLUE_DRAGON_TRANSFORM, false); + break; + case SPELL_ARYGOS_VENGEANCE: + if (Creature* pArygos = m_creature->GetMap()->GetCreature(m_arygosGuid)) + pArygos->CastSpell(pArygos, SPELL_ARYGOS_VENGEANCE, false); + break; + case POINT_ID_DRAGON_ATTACK: + // Move Arygos to the exit point + if (Creature* pArygos = m_creature->GetMap()->GetCreature(m_arygosGuid)) + { + pArygos->SetByteValue(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_UNK_2); + pArygos->SetLevitate(true); + pArygos->GetMotionMaster()->MovePoint(POINT_ID_EXIT, aEternalBoardMovement[0].m_fX, aEternalBoardMovement[0].m_fY, aEternalBoardMovement[0].m_fZ); + pArygos->ForcedDespawn(9000); + } + break; + case NPC_CAELESTRASZ: + // Move Caelestrasz to attack + if (Creature* pTrigger = m_creature->GetMap()->GetCreature(m_triggerGuid)) + { + if (Creature* pCaelestrasz = m_creature->GetMap()->GetCreature(m_CaelestraszGuid)) + { + pCaelestrasz->SetWalk(false); + pCaelestrasz->GetMotionMaster()->MovePoint(POINT_ID_DRAGON_ATTACK, pTrigger->GetPositionX(), pTrigger->GetPositionY(), pTrigger->GetPositionZ()); + } + } + break; + case SPELL_RED_DRAGON_TRANSFORM: + if (Creature* pCaelestrasz = m_creature->GetMap()->GetCreature(m_CaelestraszGuid)) + pCaelestrasz->CastSpell(pCaelestrasz, SPELL_RED_DRAGON_TRANSFORM, false); + break; + case SPELL_CAELESTRASZ_MOLTEN_RAIN: + if (Creature* pCaelestrasz = m_creature->GetMap()->GetCreature(m_CaelestraszGuid)) + pCaelestrasz->CastSpell(pCaelestrasz, SPELL_CAELESTRASZ_MOLTEN_RAIN, false); + break; + case SAY_ANACHRONOS_SEAL_1: + // Send Caelestrasz on flight + if (Creature* pCaelestrasz = m_creature->GetMap()->GetCreature(m_CaelestraszGuid)) + { + pCaelestrasz->SetByteValue(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_UNK_2); + pCaelestrasz->SetLevitate(true); + pCaelestrasz->GetMotionMaster()->MovePoint(POINT_ID_EXIT, aEternalBoardMovement[0].m_fX, aEternalBoardMovement[0].m_fY, aEternalBoardMovement[0].m_fZ); + pCaelestrasz->ForcedDespawn(9000); + } + if (Creature* pFandral = m_creature->GetMap()->GetCreature(m_fandralGuid)) + m_creature->SetFacingToObject(pFandral); + break; + case SAY_FANDRAL_SEAL_2: + if (Creature* pFandral = m_creature->GetMap()->GetCreature(m_fandralGuid)) + pFandral->SetFacingToObject(m_creature); + break; + case POINT_ID_GATE: + // Send Anachronos to the gate + m_creature->SetWalk(false); + m_creature->GetMotionMaster()->MovePoint(POINT_ID_GATE, aEternalBoardMovement[1].m_fX, aEternalBoardMovement[1].m_fY, aEternalBoardMovement[1].m_fZ); + break; + case NPC_FANDRAL_STAGHELM: + // Send Fandral to the gate + if (Creature* pFandral = m_creature->GetMap()->GetCreature(m_fandralGuid)) + { + pFandral->SetWalk(false); + pFandral->GetMotionMaster()->MovePoint(POINT_ID_GATE, aEternalBoardMovement[2].m_fX, aEternalBoardMovement[2].m_fY, aEternalBoardMovement[2].m_fZ); + } + break; + case SPELL_PRISMATIC_BARRIER: + DoCastSpellIfCan(m_creature, SPELL_PRISMATIC_BARRIER); + break; + case SPELL_GLYPH_OF_WARDING: + DoCastSpellIfCan(m_creature, SPELL_GLYPH_OF_WARDING); + break; + case SAY_FANDRAL_SEAL_6: + // Here Anachronos should continue to cast something + if (Creature* pFandral = m_creature->GetMap()->GetCreature(m_fandralGuid)) + pFandral->CastSpell(pFandral, SPELL_CALL_ANCIENTS, false); + break; + case EMOTE_FANDRAL_EXHAUSTED: + if (Creature* pFandral = m_creature->GetMap()->GetCreature(m_fandralGuid)) + { + pFandral->SetStandState(UNIT_STAND_STATE_KNEEL); + m_creature->SetFacingToObject(pFandral); + } + break; + case DATA_HANDLE_SCEPTER: + // Give the scepter to Fandral (it should equip it somehow) + if (Creature* pFandral = m_creature->GetMap()->GetCreature(m_fandralGuid)) + DoScriptText(EMOTE_ANACHRONOS_SCEPTER, m_creature, pFandral); + m_creature->SetStandState(UNIT_STAND_STATE_KNEEL); + break; + case SAY_FANDRAL_EPILOGUE_4: + if (Creature* pFandral = m_creature->GetMap()->GetCreature(m_fandralGuid)) + pFandral->SetStandState(UNIT_STAND_STATE_STAND); + break; + case POINT_ID_SCEPTER_2: + m_creature->SetStandState(UNIT_STAND_STATE_STAND); + break; + case EMOTE_FANDRAL_SHATTER: + // Shatter the scepter + if (Creature* pFandral = m_creature->GetMap()->GetCreature(m_fandralGuid)) + pFandral->CastSpell(pFandral, SPELL_SHATTER_HAMMER, false); + break; + case SAY_ANACHRONOS_EPILOGUE_6: + if (Creature* pFandral = m_creature->GetMap()->GetCreature(m_fandralGuid)) + { + pFandral->SetWalk(true); + pFandral->GetMotionMaster()->MovePoint(POINT_ID_SCEPTER_1, aEternalBoardMovement[3].m_fX, aEternalBoardMovement[3].m_fY, aEternalBoardMovement[3].m_fZ); + } + break; + case POINT_ID_EPILOGUE: + // Make Fandral leave + if (Creature* pFandral = m_creature->GetMap()->GetCreature(m_fandralGuid)) + pFandral->GetMotionMaster()->MovePoint(POINT_ID_EXIT, aEternalBoardMovement[7].m_fX, aEternalBoardMovement[7].m_fY, aEternalBoardMovement[7].m_fZ); + break; + case POINT_ID_SCEPTER_1: + // Anachronos collects the pieces + m_creature->SetWalk(true); + m_creature->GetMotionMaster()->MovePoint(POINT_ID_SCEPTER_1, aEternalBoardMovement[5].m_fX, aEternalBoardMovement[5].m_fY, aEternalBoardMovement[5].m_fZ); + break; + } + } + + Creature* GetSpeakerByEntry(uint32 uiEntry) + { + switch (uiEntry) + { + case NPC_ANACHRONOS_THE_ANCIENT: return m_creature; + case NPC_ARYGOS: return m_creature->GetMap()->GetCreature(m_arygosGuid); + case NPC_CAELESTRASZ: return m_creature->GetMap()->GetCreature(m_CaelestraszGuid); + case NPC_MERITHRA_OF_THE_DREAM: return m_creature->GetMap()->GetCreature(m_merithraGuid); + case NPC_FANDRAL_STAGHELM: return m_creature->GetMap()->GetCreature(m_fandralGuid); + + default: + return NULL; + } + } + + void DoSummonDragons() + { + for (uint8 i = 0; i < MAX_DRAGONS; ++i) + m_creature->SummonCreature(aEternalBoardNPCs[i].m_uiEntry, aEternalBoardNPCs[i].m_fX, aEternalBoardNPCs[i].m_fY, aEternalBoardNPCs[i].m_fZ, aEternalBoardNPCs[i].m_fO, TEMPSUMMON_CORPSE_DESPAWN, 0); + + // Also summon the 3 anubisath conquerors + float fX, fY, fZ; + for (uint8 i = 0; i < MAX_CONQUERORS; ++i) + { + m_creature->GetRandomPoint(aEternalBoardMovement[10].m_fX, aEternalBoardMovement[10].m_fY, aEternalBoardMovement[10].m_fZ, 20.0f, fX, fY, fZ); + m_creature->SummonCreature(NPC_ANUBISATH_CONQUEROR, fX, fY, fZ, 0, TEMPSUMMON_CORPSE_DESPAWN, 0); + } + } + + void DoSummonWarriors() + { + float fX, fY, fZ; + // Summon kaldorei warriors + for(uint8 i = 0; i < MAX_KALDOREI; ++i) + { + m_creature->GetRandomPoint(aEternalBoardMovement[10].m_fX, aEternalBoardMovement[10].m_fY, aEternalBoardMovement[10].m_fZ, 10.0f, fX, fY, fZ); + m_creature->SummonCreature(NPC_KALDOREI_INFANTRY, fX, fY, fZ, 0.0f, TEMPSUMMON_CORPSE_DESPAWN, 0); + } + + // Summon Qiraji warriors + for(uint8 i = 0; i < MAX_QIRAJI; ++i) + { + m_creature->GetRandomPoint(aEternalBoardMovement[10].m_fX, aEternalBoardMovement[10].m_fY, aEternalBoardMovement[10].m_fZ, 15.0f, fX, fY, fZ); + m_creature->SummonCreature(NPC_QIRAJI_WASP, fX, fY, fZ, 0.0f, TEMPSUMMON_CORPSE_DESPAWN, 0); + + m_creature->GetRandomPoint(aEternalBoardMovement[10].m_fX, aEternalBoardMovement[10].m_fY, aEternalBoardMovement[10].m_fZ, 15.0f, fX, fY, fZ); + m_creature->SummonCreature(NPC_QIRAJI_DRONE, fX, fY, fZ, 0.0f, TEMPSUMMON_CORPSE_DESPAWN, 0); + + m_creature->GetRandomPoint(aEternalBoardMovement[10].m_fX, aEternalBoardMovement[10].m_fY, aEternalBoardMovement[10].m_fZ, 15.0f, fX, fY, fZ); + m_creature->SummonCreature(NPC_QIRAJI_TANK, fX, fY, fZ, 0.0f, TEMPSUMMON_CORPSE_DESPAWN, 0); + } + } + + void DoUnsummonArmy() + { + for (GUIDList::const_iterator itr = m_lQirajiWarriorsList.begin(); itr != m_lQirajiWarriorsList.end(); ++itr) + { + if (Creature* pTemp = m_creature->GetMap()->GetCreature(*itr)) + pTemp->ForcedDespawn(); + } + } + + void JustSummoned(Creature* pSummoned) + { + // Also remove npc flags where needed + switch(pSummoned->GetEntry()) + { + case NPC_FANDRAL_STAGHELM: + m_fandralGuid = pSummoned->GetObjectGuid(); + break; + case NPC_MERITHRA_OF_THE_DREAM: + m_merithraGuid = pSummoned->GetObjectGuid(); + pSummoned->SetUInt32Value(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_NONE); + break; + case NPC_CAELESTRASZ: + m_CaelestraszGuid = pSummoned->GetObjectGuid(); + pSummoned->SetUInt32Value(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_NONE); + break; + case NPC_ARYGOS: + m_arygosGuid = pSummoned->GetObjectGuid(); + pSummoned->SetUInt32Value(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_NONE); + break; + case NPC_ANUBISATH_CONQUEROR: + case NPC_QIRAJI_WASP: + case NPC_QIRAJI_DRONE: + case NPC_QIRAJI_TANK: + case NPC_KALDOREI_INFANTRY: + m_lQirajiWarriorsList.push_back(pSummoned->GetObjectGuid()); + break; + } + } + + void MovementInform(uint32 uiType, uint32 uiPointId) + { + if (uiType != POINT_MOTION_TYPE) + return; + + switch(uiPointId) + { + case POINT_ID_GATE: + // Cast time stop when he reaches the gate + DoCastSpellIfCan(m_creature, SPELL_TIME_STOP); + StartNextDialogueText(SPELL_TIME_STOP); + break; + case POINT_ID_SCEPTER_1: + // Pickup the pieces + DoScriptText(EMOTE_ANACHRONOS_PICKUP, m_creature); + m_creature->SetStandState(UNIT_STAND_STATE_KNEEL); + m_uiEventTimer = 2000; + break; + case POINT_ID_SCEPTER_2: + // Pickup the pieces + DoScriptText(SAY_ANACHRONOS_EPILOGUE_8, m_creature); + m_creature->SetStandState(UNIT_STAND_STATE_KNEEL); + m_uiEventTimer = 4000; + break; + case POINT_ID_EXIT: + // Spell was removed, manually change the display + //DoCastSpellIfCan(m_creature, SPELL_BRONZE_DRAGON_TRANSFORM); + m_creature->SetDisplayId(DISPLAY_ID_BRONZE_DRAGON); + m_uiEventTimer = 4000; + break; + } + } + + void SummonedMovementInform(Creature* pSummoned, uint32 uiType, uint32 uiPointId) + { + if (uiType != POINT_MOTION_TYPE) + return; + + if (pSummoned->GetEntry() == NPC_FANDRAL_STAGHELM) + { + switch(uiPointId) + { + case POINT_ID_EPILOGUE: + // Face Anachronos and restart the dialogue + pSummoned->SetFacingToObject(m_creature); + StartNextDialogueText(SAY_FANDRAL_EPILOGUE_7); + DoUnsummonArmy(); + break; + case POINT_ID_SCEPTER_1: + pSummoned->GetMotionMaster()->MovePoint(POINT_ID_EPILOGUE, aEternalBoardMovement[4].m_fX, aEternalBoardMovement[4].m_fY, aEternalBoardMovement[4].m_fZ); + break; + case POINT_ID_EXIT: + pSummoned->ForcedDespawn(); + break; + } + } + else if (uiPointId == POINT_ID_DRAGON_ATTACK) + { + switch(pSummoned->GetEntry()) + { + case NPC_MERITHRA_OF_THE_DREAM: + StartNextDialogueText(DATA_MERITHRA_ATTACK); + break; + case NPC_CAELESTRASZ: + StartNextDialogueText(DATA_CAELASTRASZ_ATTACK); + break; + } + } + } + + void UpdateAI(const uint32 uiDiff) + { + DialogueUpdate(uiDiff); + + if (m_uiEventTimer) + { + if (m_uiEventTimer <= uiDiff) + { + switch(m_uiEventStage) + { + case 0: + // Start the dialogue + StartNextDialogueText(NPC_ANACHRONOS_THE_ANCIENT); + m_uiEventTimer = 0; + break; + case 1: + // Do the epilogue movement + m_creature->GetMotionMaster()->MovePoint(POINT_ID_SCEPTER_2, aEternalBoardMovement[6].m_fX, aEternalBoardMovement[6].m_fY, aEternalBoardMovement[6].m_fZ); + m_creature->SetStandState(UNIT_STAND_STATE_STAND); + m_uiEventTimer = 0; + break; + case 2: + // Complete quest and despawn gate + if (Player* pPlayer = m_creature->GetMap()->GetPlayer(m_playerGuid)) + pPlayer->GroupEventHappens(QUEST_A_PAWN_ON_THE_ETERNAL_BOARD, m_creature); + m_creature->SetStandState(UNIT_STAND_STATE_STAND); + m_uiEventTimer = 4000; + break; + case 3: + // Move to exit + m_creature->SetWalk(false); + m_creature->GetMotionMaster()->MovePoint(POINT_ID_EXIT, aEternalBoardMovement[8].m_fX, aEternalBoardMovement[8].m_fY, aEternalBoardMovement[8].m_fZ); + m_uiEventTimer = 0; + break; + case 4: + // Take off and fly + m_creature->SetByteValue(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_UNK_2); + m_creature->SetLevitate(true); + m_creature->GetMotionMaster()->MovePoint(0, aEternalBoardMovement[9].m_fX, aEternalBoardMovement[9].m_fY, aEternalBoardMovement[9].m_fZ); + m_creature->ForcedDespawn(10000); + m_uiEventTimer = 0; + break; + } + ++m_uiEventStage; + } + else + m_uiEventTimer -= uiDiff; + } + } +}; + +CreatureAI* GetAI_npc_anachronos_the_ancient(Creature* pCreature) +{ + return new npc_anachronos_the_ancientAI(pCreature); +} + +bool QuestAcceptGO_crystalline_tear(Player* pPlayer, GameObject* pGo, const Quest* pQuest) +{ + // Summon the controller dragon at GO position (orientation is wrong - hardcoded) + if (pQuest->GetQuestId() == QUEST_A_PAWN_ON_THE_ETERNAL_BOARD) + { + // Check if event is already in progress first + if (Creature* pAnachronos = GetClosestCreatureWithEntry(pGo, NPC_ANACHRONOS_THE_ANCIENT, 90.0f)) + return true; + + if (Creature* pAnachronos = pPlayer->SummonCreature(NPC_ANACHRONOS_THE_ANCIENT, pGo->GetPositionX(), pGo->GetPositionY(), pGo->GetPositionZ(), 3.75f, TEMPSUMMON_CORPSE_DESPAWN, 0)) + { + // Send the player's guid in order to handle the quest complete + if (npc_anachronos_the_ancientAI* pAnachronosAI = dynamic_cast(pAnachronos->AI())) + pAnachronosAI->m_playerGuid = pPlayer->GetObjectGuid(); + } + } + + return true; +} + void AddSC_silithus() { - Script *newscript; - - newscript = new Script; - newscript->Name = "npc_highlord_demitrian"; - newscript->pGossipHello = &GossipHello_npc_highlord_demitrian; - newscript->pGossipSelect = &GossipSelect_npc_highlord_demitrian; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npcs_rutgar_and_frankal"; - newscript->pGossipHello = &GossipHello_npcs_rutgar_and_frankal; - newscript->pGossipSelect = &GossipSelect_npcs_rutgar_and_frankal; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "npc_highlord_demitrian"; + pNewScript->pGossipHello = &GossipHello_npc_highlord_demitrian; + pNewScript->pGossipSelect = &GossipSelect_npc_highlord_demitrian; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npcs_rutgar_and_frankal"; + pNewScript->pGossipHello = &GossipHello_npcs_rutgar_and_frankal; + pNewScript->pGossipSelect = &GossipSelect_npcs_rutgar_and_frankal; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_anachronos_the_ancient"; + pNewScript->GetAI = &GetAI_npc_anachronos_the_ancient; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "go_crystalline_tear"; + pNewScript->pQuestAcceptGO = &QuestAcceptGO_crystalline_tear; + pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 821d9ed46..164757058 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2312" + #define SD2_REVISION_NR "2313" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 589f9c643..a1364f69d 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -1015,6 +1015,8 @@ UPDATE creature_template SET ScriptName='npc_vekjik' WHERE entry=28315; /* SILITHUS */ UPDATE creature_template SET ScriptName='npc_highlord_demitrian' WHERE entry=14347; UPDATE creature_template SET ScriptName='npcs_rutgar_and_frankal' WHERE entry IN (15170,15171); +UPDATE creature_template SET ScriptName='npc_anachronos_the_ancient' WHERE entry=15381; +UPDATE gameobject_template SET ScriptName='go_crystalline_tear' WHERE entry=180633; /* SILVERMOON */ UPDATE creature_template SET ScriptName='npc_blood_knight_stillblade' WHERE entry=17768; diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 49ca0478b..59ba0c689 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -792,7 +792,39 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1000736,'Thank you for you help, $n. I wish you well in your adventures.',0,0,0,0,'Ranshalla SAY_QUEST_END_1'), (-1000737,'I want to stay here and reflect on what we have seen. Please see Erelas and tell him what we have learned.',0,0,0,0,'Ranshalla SAY_QUEST_END_2'), (-1000738,'%s begins chanting a strange spell...',0,2,0,0,'Ranshalla EMOTE_CHANT_SPELL'), -(-1000739,'Remember, I need your help to properly channel. I will ask you to aid me several times in our path, so please be ready.',0,0,0,0,'Ranshalla SAY_QUEST_START'); +(-1000739,'Remember, I need your help to properly channel. I will ask you to aid me several times in our path, so please be ready.',0,0,0,0,'Ranshalla SAY_QUEST_START'), + +(-1000740,'We must act quickly or shall be lost!',0,0,0,1,'SAY_ANACHRONOS_INTRO_1'), +(-1000741,'My forces cannot overcome the Qiraji defenses. We will not be able to get close enough to place our precious barrier, dragon.',0,0,0,0,'SAY_FANDRAL_INTRO_2'), +(-1000742,'There is a way...',0,0,0,22,'SAY_MERITHRA_INTRO_3'), +(-1000743,'%s nods knowingly.',0,2,0,0,'EMOTE_ARYGOS_NOD'), +(-1000744,'Aye, Fandral, remember these words: Let not your grief guide your faith. These thoughts you hold... dark places you go, night elf.Absolution cannot be had through misguided vengeance.',0,0,0,1,'SAY_CAELESTRASZ_INTRO_4'), +(-1000745,'%s glances at her compatriots.',0,2,0,0,'EMOTE_MERITHRA_GLANCE'), +(-1000746,'We will push him back, Anachronos. This is wow. Uphold your end of this task. Let not your hands falter as you seal our fates behind the barrier.',0,0,0,1,'SAY_MERITHRA_INTRO_5'), +(-1000747,'Succumb to the endless dream, little ones. Let it comsume you!',0,1,0,22,'SAY_MERITHRA_ATTACK_1'), +(-1000748,'Anachronos, the diversion will give you an the young druid time enough to seal the gate. Do not falter. Now, let us see how they deal with chaotic magic.',0,0,0,1,'SAY_ARYGOS_ATTACK_2'), +(-1000749,'Let them feelt the wrath of the blue flight! May Malygos protect me!',0,1,0,22,'SAY_ARYGOS_ATTACK_3'), +(-1000750,'Do not forget sacrifices made on this day, night elf. We have all suffered immensely at the hands of these beasts.',0,0,0,1,'SAY_CAELESTRASZ_ATTACK_4'), +(-1000751,'Alexstrasza, give me the resolve to drive your enemies back.',0,1,0,22,'SAY_CAELESTRASZ_ATTACK_5'), +(-1000752,'NOW,STAGHELM! WE GO NOW! Prepare your magic!',0,0,0,22,'SAY_ANACHRONOS_SEAL_1'), +(-1000753,'It is done, dragon. Lead the way!',0,0,0,25,'SAY_FANDRAL_SEAL_2'), +(-1000754,'Stay close.',0,0,0,0,'SAY_ANACHRONOS_SEAL_3'), +(-1000755,'The sands of time will halt, but only for a moment! I will now conjure the barrier.',0,0,0,0,'SAY_ANACHRONOS_SEAL_4'), +(-1000756,'FINISH THE SPELL, STAGHELM! I CANNOT HOLD THE GLYPHS OF WARDING IN PLACE MUCH LONGER! CALL FORTH THE ROOTS!', 0,0,0,0,'SAY_ANACHRONOS_SEAL_5'), +(-1000757,'Ancient ones guide my hand... Wake from your slumber! WAKE AND SEAL THIS CURSED PLACE!',0,0,0,0, 'SAY_FANDRAL_SEAL_6'), +(-1000758,'%s falls to one knee - exhausted.',0,2,0,0,'EMOTE_FANDRAL_EXHAUSTED'), +(-1000759,'It... It is over, Lord Staghelm. We are victorious. Albeit the cost for this victory was great.',0,0,0,1,'SAY_ANACHRONOS_EPILOGUE_1'), +(-1000760,'There is but one duty that remains…',0,0,0,1,'SAY_ANACHRONOS_EPILOGUE_2'), +(-1000761,'Before I leave this place, I make one final offering for you, Lord Staghelm. Should a time arise in which you must gain entry to this accursed fortress, use the scepter of the shifting sands on the sacred gong. The magic holding the barrier together will dissipate an the horrors of the Ahn\'Qiraj will be unleashed upon the world once more.',0,0,0,1,'SAY_ANACHRONOS_EPILOGUE_3'), +(-1000762,'%s hands the Scepter of the Shifting Sands to $N.',0,2,0,0,'EMOTE_ANACHRONOS_SCEPTER'), +(-1000763,'After the savagery that my people have witnessed and felt, you expect me to accept another burden, dragon? Surely you are mad.',0,0,0,1,'SAY_FANDRAL_EPILOGUE_4'), +(-1000764,'I want nothing to do with Silithus, the Qiraji and least of all, any damed dragons!',0,0,0,1,'SAY_FANDRAL_EPILOGUE_5'), +(-1000765,'%s hurls the Scepter of the Shifting Sands into the barrier, shattering it.',0,2,0,0,'EMOTE_FANDRAL_SHATTER'), +(-1000766,'Lord Staghelm, where are you going? You would shatter our bond for the sake of pride?',0,0,0,1,'SAY_ANACHRONOS_EPILOGUE_6'), +(-1000767,'My son\'s soul will find no comfort in this hollow victory, dragon! I will have him back. Though it takes a millenia. I WILL have my son back!',0,0,0,1,'SAY_FANDRAL_EPILOGUE_7'), +(-1000768,'%s shakes his head in disappointment.',0,2,0,25,'EMOTE_ANACHRONOS_DISPPOINTED'), +(-1000769,'%s kneels down to pickup the fragments of the shattered scepter.',0,2,0,0,'EMOTE_ANACHRONOS_PICKUP'), +(-1000770,'And now you know all that there is to know, mortal…',0,0,0,0,'SAY_ANACHRONOS_EPILOGUE_8'); -- -1 033 000 SHADOWFANG KEEP INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES diff --git a/sql/updates/r2313_mangos.sql b/sql/updates/r2313_mangos.sql new file mode 100644 index 000000000..5fe0836f4 --- /dev/null +++ b/sql/updates/r2313_mangos.sql @@ -0,0 +1,2 @@ +UPDATE creature_template SET ScriptName='npc_anachronos_the_ancient' WHERE entry=15381; +UPDATE gameobject_template SET ScriptName='go_crystalline_tear' WHERE entry=180633; diff --git a/sql/updates/r2313_scriptdev2.sql b/sql/updates/r2313_scriptdev2.sql new file mode 100644 index 000000000..406edf099 --- /dev/null +++ b/sql/updates/r2313_scriptdev2.sql @@ -0,0 +1,33 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1000770 AND -1000740; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1000740,'We must act quickly or shall be lost!',0,0,0,1,'SAY_ANACHRONOS_INTRO_1'), +(-1000741,'My forces cannot overcome the Qiraji defenses. We will not be able to get close enough to place our precious barrier, dragon.',0,0,0,0,'SAY_FANDRAL_INTRO_2'), +(-1000742,'There is a way...',0,0,0,22,'SAY_MERITHRA_INTRO_3'), +(-1000743,'%s nods knowingly.',0,2,0,0,'EMOTE_ARYGOS_NOD'), +(-1000744,'Aye, Fandral, remember these words: Let not your grief guide your faith. These thoughts you hold... dark places you go, night elf.Absolution cannot be had through misguided vengeance.',0,0,0,1,'SAY_CAELESTRASZ_INTRO_4'), +(-1000745,'%s glances at her compatriots.',0,2,0,0,'EMOTE_MERITHRA_GLANCE'), +(-1000746,'We will push him back, Anachronos. This is wow. Uphold your end of this task. Let not your hands falter as you seal our fates behind the barrier.',0,0,0,1,'SAY_MERITHRA_INTRO_5'), +(-1000747,'Succumb to the endless dream, little ones. Let it comsume you!',0,1,0,22,'SAY_MERITHRA_ATTACK_1'), +(-1000748,'Anachronos, the diversion will give you an the young druid time enough to seal the gate. Do not falter. Now, let us see how they deal with chaotic magic.',0,0,0,1,'SAY_ARYGOS_ATTACK_2'), +(-1000749,'Let them feelt the wrath of the blue flight! May Malygos protect me!',0,1,0,22,'SAY_ARYGOS_ATTACK_3'), +(-1000750,'Do not forget sacrifices made on this day, night elf. We have all suffered immensely at the hands of these beasts.',0,0,0,1,'SAY_CAELESTRASZ_ATTACK_4'), +(-1000751,'Alexstrasza, give me the resolve to drive your enemies back.',0,1,0,22,'SAY_CAELESTRASZ_ATTACK_5'), +(-1000752,'NOW,STAGHELM! WE GO NOW! Prepare your magic!',0,0,0,22,'SAY_ANACHRONOS_SEAL_1'), +(-1000753,'It is done, dragon. Lead the way!',0,0,0,25,'SAY_FANDRAL_SEAL_2'), +(-1000754,'Stay close.',0,0,0,0,'SAY_ANACHRONOS_SEAL_3'), +(-1000755,'The sands of time will halt, but only for a moment! I will now conjure the barrier.',0,0,0,0,'SAY_ANACHRONOS_SEAL_4'), +(-1000756,'FINISH THE SPELL, STAGHELM! I CANNOT HOLD THE GLYPHS OF WARDING IN PLACE MUCH LONGER! CALL FORTH THE ROOTS!', 0,0,0,0,'SAY_ANACHRONOS_SEAL_5'), +(-1000757,'Ancient ones guide my hand... Wake from your slumber! WAKE AND SEAL THIS CURSED PLACE!',0,0,0,0, 'SAY_FANDRAL_SEAL_6'), +(-1000758,'%s falls to one knee - exhausted.',0,2,0,0,'EMOTE_FANDRAL_EXHAUSTED'), +(-1000759,'It... It is over, Lord Staghelm. We are victorious. Albeit the cost for this victory was great.',0,0,0,1,'SAY_ANACHRONOS_EPILOGUE_1'), +(-1000760,'There is but one duty that remains…',0,0,0,1,'SAY_ANACHRONOS_EPILOGUE_2'), +(-1000761,'Before I leave this place, I make one final offering for you, Lord Staghelm. Should a time arise in which you must gain entry to this accursed fortress, use the scepter of the shifting sands on the sacred gong. The magic holding the barrier together will dissipate an the horrors of the Ahn\'Qiraj will be unleashed upon the world once more.',0,0,0,1,'SAY_ANACHRONOS_EPILOGUE_3'), +(-1000762,'%s hands the Scepter of the Shifting Sands to $N.',0,2,0,0,'EMOTE_ANACHRONOS_SCEPTER'), +(-1000763,'After the savagery that my people have witnessed and felt, you expect me to accept another burden, dragon? Surely you are mad.',0,0,0,1,'SAY_FANDRAL_EPILOGUE_4'), +(-1000764,'I want nothing to do with Silithus, the Qiraji and least of all, any damed dragons!',0,0,0,1,'SAY_FANDRAL_EPILOGUE_5'), +(-1000765,'%s hurls the Scepter of the Shifting Sands into the barrier, shattering it.',0,2,0,0,'EMOTE_FANDRAL_SHATTER'), +(-1000766,'Lord Staghelm, where are you going? You would shatter our bond for the sake of pride?',0,0,0,1,'SAY_ANACHRONOS_EPILOGUE_6'), +(-1000767,'My son\'s soul will find no comfort in this hollow victory, dragon! I will have him back. Though it takes a millenia. I WILL have my son back!',0,0,0,1,'SAY_FANDRAL_EPILOGUE_7'), +(-1000768,'%s shakes his head in disappointment.',0,2,0,25,'EMOTE_ANACHRONOS_DISPPOINTED'), +(-1000769,'%s kneels down to pickup the fragments of the shattered scepter.',0,2,0,0,'EMOTE_ANACHRONOS_PICKUP'), +(-1000770,'And now you know all that there is to know, mortal…',0,0,0,0,'SAY_ANACHRONOS_EPILOGUE_8'); From 8c3b59268711189e546c8d0da266e809c69ebd34 Mon Sep 17 00:00:00 2001 From: Klark20 Date: Sat, 15 Oct 2011 18:03:39 +0200 Subject: [PATCH 0297/1172] [2314] Remove a bunch of now obsolete gossip scripts Signed-off-by: Schmoozerd --- scripts/eastern_kingdoms/uldaman/uldaman.cpp | 101 +----- scripts/kalimdor/dustwallow_marsh.cpp | 40 +-- scripts/kalimdor/tanaris.cpp | 118 ++---- scripts/northrend/borean_tundra.cpp | 259 +------------- scripts/northrend/dalaran.cpp | 50 +-- scripts/northrend/dragonblight.cpp | 45 +-- scripts/northrend/storm_peaks.cpp | 248 +------------ scripts/outland/blades_edge_mountains.cpp | 138 +------ scripts/outland/hellfire_peninsula.cpp | 356 ++----------------- scripts/outland/nagrand.cpp | 69 +--- scripts/outland/netherstorm.cpp | 44 +-- scripts/outland/shadowmoon_valley.cpp | 350 ++++-------------- scripts/outland/shattrath_city.cpp | 236 ++---------- scripts/outland/terokkar_forest.cpp | 76 +--- scripts/outland/zangarmarsh.cpp | 203 ++--------- scripts/world/npcs_special.cpp | 155 -------- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 40 +-- sql/scriptdev2_script_full.sql | 2 +- sql/updates/r2314_mangos.sql | 40 +++ sql/updates/r2314_scriptdev2.sql | 1 + 21 files changed, 259 insertions(+), 2314 deletions(-) create mode 100644 sql/updates/r2314_mangos.sql create mode 100644 sql/updates/r2314_scriptdev2.sql diff --git a/scripts/eastern_kingdoms/uldaman/uldaman.cpp b/scripts/eastern_kingdoms/uldaman/uldaman.cpp index 55644b0cb..5bc3de711 100644 --- a/scripts/eastern_kingdoms/uldaman/uldaman.cpp +++ b/scripts/eastern_kingdoms/uldaman/uldaman.cpp @@ -16,111 +16,14 @@ /* ScriptData SDName: Uldaman -SD%Complete: 100 -SDComment: Quest support: 2278 +SD%Complete: 0 +SDComment: Placeholder SDCategory: Uldaman EndScriptData */ -/* ContentData -npc_lore_keeper_of_norgannon -EndContentData */ - #include "precompiled.h" #include "uldaman.h" -/*###### -## npc_lore_keeper_of_norgannon -######*/ - -bool GossipHello_npc_lore_keeper_of_norgannon(Player* pPlayer, Creature* pCreature) -{ - if (pPlayer->GetQuestStatus(2278) == QUEST_STATUS_INCOMPLETE) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Who are the Earthen?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - - pPlayer->SEND_GOSSIP_MENU(1079, pCreature->GetObjectGuid()); - - return true; -} - -bool GossipSelect_npc_lore_keeper_of_norgannon(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) -{ - switch(uiAction) - { - case GOSSIP_ACTION_INFO_DEF+1: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "What is a \"subterranean being matrix\"?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); - pPlayer->SEND_GOSSIP_MENU(1080, pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF+2: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "What are the anomalies you speak of?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3); - pPlayer->SEND_GOSSIP_MENU(1081, pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF+3: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "What is a resilient foundation of construction?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+4); - pPlayer->SEND_GOSSIP_MENU(1082, pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF+4: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "So... the Earthen were made out of stone?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+5); - pPlayer->SEND_GOSSIP_MENU(1083, pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF+5: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Anything else I should know about the Earthen?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+6); - pPlayer->SEND_GOSSIP_MENU(1084, pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF+6: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "I think I understand the Creators' design intent for the Earthen now. What are the Earthen's anomalies that you spoke of earlier?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+7); - pPlayer->SEND_GOSSIP_MENU(1085, pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF+7: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "What high-stress environments would cause the Earthen to destabilize?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+8); - pPlayer->SEND_GOSSIP_MENU(1086, pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF+8: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "What happens when the Earthen destabilize?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+9); - pPlayer->SEND_GOSSIP_MENU(1087, pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF+9: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Troggs?! Are the troggs you mention the same as the ones in the world today?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+10); - pPlayer->SEND_GOSSIP_MENU(1088, pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF+10: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "You mentioned two results when the Earthen destabilize. What is the second?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+11); - pPlayer->SEND_GOSSIP_MENU(1089, pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF+11: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Dwarves!!! Now you're telling me that dwarves originally came from the Earthen?!", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+12); - pPlayer->SEND_GOSSIP_MENU(1090, pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF+12: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "These dwarves are the same ones today, yes? Do the dwarves maintain any other links to the Earthen?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+13); - pPlayer->SEND_GOSSIP_MENU(1091, pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF+13: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Who are the Creators?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+14); - pPlayer->SEND_GOSSIP_MENU(1092, pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF+14: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "This is a lot to think about.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+15); - pPlayer->SEND_GOSSIP_MENU(1093, pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF+15: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "I will access the discs now.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+16); - pPlayer->SEND_GOSSIP_MENU(1094, pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF+16: - pPlayer->CLOSE_GOSSIP_MENU(); - pPlayer->AreaExploredOrEventHappens(2278); - break; - } - return true; -} - void AddSC_uldaman() { - Script* pNewScript; - - pNewScript = new Script; - pNewScript->Name = "npc_lore_keeper_of_norgannon"; - pNewScript->pGossipHello = &GossipHello_npc_lore_keeper_of_norgannon; - pNewScript->pGossipSelect = &GossipSelect_npc_lore_keeper_of_norgannon; - pNewScript->RegisterSelf(); } diff --git a/scripts/kalimdor/dustwallow_marsh.cpp b/scripts/kalimdor/dustwallow_marsh.cpp index 8e077731f..aedc243c8 100644 --- a/scripts/kalimdor/dustwallow_marsh.cpp +++ b/scripts/kalimdor/dustwallow_marsh.cpp @@ -17,7 +17,7 @@ /* ScriptData SDName: Dustwallow_Marsh SD%Complete: 95 -SDComment: Quest support: 558, 1173, 1273, 1324, 11209, 11126, 11142, 11180. Vendor Nat Pagle +SDComment: Quest support: 558, 1173, 1273, 1324, 11209, 11126, 11180. Vendor Nat Pagle SDCategory: Dustwallow Marsh EndScriptData */ @@ -30,7 +30,6 @@ npc_morokk npc_nat_pagle npc_ogron npc_private_hendel -npc_cassa_crimsonwing EndContentData */ #include "precompiled.h" @@ -777,37 +776,6 @@ CreatureAI* GetAI_npc_private_hendel(Creature* pCreature) return new npc_private_hendelAI(pCreature); } -/*###### -## npc_cassa_crimsonwing -######*/ - -enum -{ - QUEST_SURVEY_ALCAZ = 11142, - SPELL_ALCAZ_SURVEY = 42295 -}; - -#define GOSSIP_RIDE "" - -bool GossipHello_npc_cassa_crimsonwing(Player* pPlayer, Creature* pCreature) -{ - if (pPlayer->GetQuestStatus(QUEST_SURVEY_ALCAZ) == QUEST_STATUS_INCOMPLETE) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_RIDE, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); - return true; -} - -bool GossipSelect_npc_cassa_crimsonwing(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) -{ - if (uiAction == GOSSIP_ACTION_INFO_DEF+1) - { - pPlayer->CLOSE_GOSSIP_MENU(); - pPlayer->CastSpell(pPlayer, SPELL_ALCAZ_SURVEY, false); - } - return true; -} - /*###### ## at_nats_landing ######*/ @@ -883,12 +851,6 @@ void AddSC_dustwallow_marsh() pNewScript->pQuestAcceptNPC = &QuestAccept_npc_private_hendel; pNewScript->RegisterSelf(); - pNewScript = new Script; - pNewScript->Name = "npc_cassa_crimsonwing"; - pNewScript->pGossipHello = &GossipHello_npc_cassa_crimsonwing; - pNewScript->pGossipSelect = &GossipSelect_npc_cassa_crimsonwing; - pNewScript->RegisterSelf(); - pNewScript = new Script; pNewScript->Name = "at_nats_landing"; pNewScript->pAreaTrigger = &AreaTrigger_at_nats_landing; diff --git a/scripts/kalimdor/tanaris.cpp b/scripts/kalimdor/tanaris.cpp index d045b95da..2ca63ec3e 100644 --- a/scripts/kalimdor/tanaris.cpp +++ b/scripts/kalimdor/tanaris.cpp @@ -17,7 +17,7 @@ /* ScriptData SDName: Tanaris SD%Complete: 80 -SDComment: Quest support: 648, 1560, 2954, 4005, 10277, 10279(Special flight path). Noggenfogger vendor +SDComment: Quest support: 648, 1560, 2954, 4005, 10277. Noggenfogger vendor SDCategory: Tanaris EndScriptData */ @@ -26,7 +26,6 @@ mob_aquementas npc_custodian_of_time npc_marin_noggenfogger npc_oox17tn -npc_steward_of_time npc_stone_watcher_of_norgannon npc_tooga EndContentData */ @@ -337,44 +336,6 @@ bool QuestAccept_npc_oox17tn(Player* pPlayer, Creature* pCreature, const Quest* return true; } -/*###### -## npc_steward_of_time -######*/ - -#define GOSSIP_ITEM_FLIGHT "Please take me to the master's lair." - -bool GossipHello_npc_steward_of_time(Player* pPlayer, Creature* pCreature) -{ - if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); - - if (pPlayer->GetQuestStatus(10279) == QUEST_STATUS_INCOMPLETE || pPlayer->GetQuestRewardStatus(10279)) - { - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_FLIGHT, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); - pPlayer->SEND_GOSSIP_MENU(9978, pCreature->GetObjectGuid()); - } - else - pPlayer->SEND_GOSSIP_MENU(9977, pCreature->GetObjectGuid()); - - return true; -} - -bool QuestAccept_npc_steward_of_time(Player* pPlayer, Creature* pCreature, const Quest* pQuest) -{ - if (pQuest->GetQuestId() == 10279) //Quest: To The Master's Lair - pPlayer->CastSpell(pPlayer,34891,true); //(Flight through Caverns) - - return false; -} - -bool GossipSelect_npc_steward_of_time(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) -{ - if (uiAction == GOSSIP_ACTION_INFO_DEF + 1) - pPlayer->CastSpell(pPlayer,34891,true); //(Flight through Caverns) - - return true; -} - /*###### ## npc_stone_watcher_of_norgannon ######*/ @@ -592,46 +553,39 @@ bool QuestAccept_npc_tooga(Player* pPlayer, Creature* pCreature, const Quest* pQ void AddSC_tanaris() { - Script *newscript; - - newscript = new Script; - newscript->Name = "mob_aquementas"; - newscript->GetAI = &GetAI_mob_aquementas; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_custodian_of_time"; - newscript->GetAI = &GetAI_npc_custodian_of_time; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_marin_noggenfogger"; - newscript->pGossipHello = &GossipHello_npc_marin_noggenfogger; - newscript->pGossipSelect = &GossipSelect_npc_marin_noggenfogger; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_oox17tn"; - newscript->GetAI = &GetAI_npc_oox17tn; - newscript->pQuestAcceptNPC = &QuestAccept_npc_oox17tn; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_steward_of_time"; - newscript->pGossipHello = &GossipHello_npc_steward_of_time; - newscript->pGossipSelect = &GossipSelect_npc_steward_of_time; - newscript->pQuestAcceptNPC = &QuestAccept_npc_steward_of_time; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_stone_watcher_of_norgannon"; - newscript->pGossipHello = &GossipHello_npc_stone_watcher_of_norgannon; - newscript->pGossipSelect = &GossipSelect_npc_stone_watcher_of_norgannon; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_tooga"; - newscript->GetAI = &GetAI_npc_tooga; - newscript->pQuestAcceptNPC = &QuestAccept_npc_tooga; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "mob_aquementas"; + pNewScript->GetAI = &GetAI_mob_aquementas; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_custodian_of_time"; + pNewScript->GetAI = &GetAI_npc_custodian_of_time; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_marin_noggenfogger"; + pNewScript->pGossipHello = &GossipHello_npc_marin_noggenfogger; + pNewScript->pGossipSelect = &GossipSelect_npc_marin_noggenfogger; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_oox17tn"; + pNewScript->GetAI = &GetAI_npc_oox17tn; + pNewScript->pQuestAcceptNPC = &QuestAccept_npc_oox17tn; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_stone_watcher_of_norgannon"; + pNewScript->pGossipHello = &GossipHello_npc_stone_watcher_of_norgannon; + pNewScript->pGossipSelect = &GossipSelect_npc_stone_watcher_of_norgannon; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_tooga"; + pNewScript->GetAI = &GetAI_npc_tooga; + pNewScript->pQuestAcceptNPC = &QuestAccept_npc_tooga; + pNewScript->RegisterSelf(); } diff --git a/scripts/northrend/borean_tundra.cpp b/scripts/northrend/borean_tundra.cpp index 8d304d5c1..b0ad9c75d 100644 --- a/scripts/northrend/borean_tundra.cpp +++ b/scripts/northrend/borean_tundra.cpp @@ -17,176 +17,20 @@ /* ScriptData SDName: Borean_Tundra SD%Complete: 100 -SDComment: Quest support: 11708, 11692, 11961, 11865. Taxi vendors. 11570 +SDComment: Quest support: 11865, 11728, 11897, 11570 SDCategory: Borean Tundra EndScriptData */ /* ContentData -npc_fizzcrank_fullthrottle -npc_iruk -npc_kara_thricestar npc_nesingwary_trapper go_caribou_trap npc_sinkhole_kill_credit -npc_surristrasz -npc_tiare npc_lurgglbr EndContentData */ #include "precompiled.h" #include "escort_ai.h" -/*###### -## npc_fizzcrank_fullthrottle -######*/ - -#define GOSSIP_ITEM_GO_ON "Go on." -#define GOSSIP_ITEM_TELL_ME "Tell me what's going on out here, Fizzcrank." - -enum -{ - GOSSIP_TEXTID_FIZZCRANK1 = 12456, - GOSSIP_TEXTID_FIZZCRANK2 = 12457, - GOSSIP_TEXTID_FIZZCRANK3 = 12458, - GOSSIP_TEXTID_FIZZCRANK4 = 12459, - GOSSIP_TEXTID_FIZZCRANK5 = 12460, - GOSSIP_TEXTID_FIZZCRANK6 = 12461, - GOSSIP_TEXTID_FIZZCRANK7 = 12462, - GOSSIP_TEXTID_FIZZCRANK8 = 12463, - GOSSIP_TEXTID_FIZZCRANK9 = 12464, - - QUEST_THE_MECHAGNOMES = 11708 -}; - -bool GossipHello_npc_fizzcrank_fullthrottle(Player* pPlayer, Creature* pCreature) -{ - if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); - - if (pPlayer->GetQuestStatus(QUEST_THE_MECHAGNOMES) == QUEST_STATUS_INCOMPLETE) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_TELL_ME, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); - return true; -} - -bool GossipSelect_npc_fizzcrank_fullthrottle(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) -{ - switch(uiAction) - { - case GOSSIP_ACTION_INFO_DEF+1: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_GO_ON, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); - pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_FIZZCRANK1, pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF+2: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_GO_ON, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); - pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_FIZZCRANK2, pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF+3: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_GO_ON, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4); - pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_FIZZCRANK3, pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF+4: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_GO_ON, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 5); - pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_FIZZCRANK4, pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF+5: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_GO_ON, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 6); - pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_FIZZCRANK5, pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF+6: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_GO_ON, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 7); - pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_FIZZCRANK6, pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF+7: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_GO_ON, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 8); - pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_FIZZCRANK7, pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF+8: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_GO_ON, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 9); - pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_FIZZCRANK8, pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF+9: - pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_FIZZCRANK9, pCreature->GetObjectGuid()); - pPlayer->AreaExploredOrEventHappens(QUEST_THE_MECHAGNOMES); - break; - } - return true; -} - -/*###### -## npc_iruk -######*/ - -#define GOSSIP_ITEM_IRUK "" - -enum -{ - QUEST_SPIRITS_WATCH_OVER_US = 11961, - SPELL_CREATE_TOTEM = 46816 -}; - -bool GossipHello_npc_iruk(Player* pPlayer, Creature* pCreature) -{ - if (pPlayer->GetQuestStatus(QUEST_SPIRITS_WATCH_OVER_US) == QUEST_STATUS_INCOMPLETE) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_IRUK, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); - - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); - return true; -} - -bool GossipSelect_npc_iruk(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) -{ - if (uiAction == GOSSIP_ACTION_INFO_DEF + 1) - { - pPlayer->CLOSE_GOSSIP_MENU(); - pPlayer->CastSpell(pPlayer,SPELL_CREATE_TOTEM,true); - } - - return true; -} - -/*###### -## npc_kara_thricestar -######*/ - -#define GOSSIP_ITEM_THRICESTAR1 "Do you think I could take a ride on one of those flying machines?" -#define GOSSIP_ITEM_THRICESTAR2 "Kara, I need to be flown out the Dens of Dying to find Bixie." - -enum -{ - QUEST_CHECK_IN_WITH_BIXIE = 11692, - SPELL_FIZZCRANK_AIRSTRIP = 51446 -}; - -bool GossipHello_npc_kara_thricestar(Player* pPlayer, Creature* pCreature) -{ - if (pCreature->isTaxi()) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_TAXI, GOSSIP_ITEM_THRICESTAR1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); - - if (pPlayer->GetQuestStatus(QUEST_CHECK_IN_WITH_BIXIE) == QUEST_STATUS_COMPLETE) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_THRICESTAR2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); - - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); - return true; -} - -bool GossipSelect_npc_kara_thricestar(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) -{ - switch(uiAction) - { - case GOSSIP_ACTION_INFO_DEF + 1: - pPlayer->GetSession()->SendTaxiMenu(pCreature); - break; - case GOSSIP_ACTION_INFO_DEF + 2: - pPlayer->CLOSE_GOSSIP_MENU(); - pPlayer->CastSpell(pPlayer, SPELL_FIZZCRANK_AIRSTRIP, false); - break; - } - - return true; -} - /*###### ## npc_nesingwary_trapper ######*/ @@ -532,77 +376,6 @@ CreatureAI* GetAI_npc_sinkhole_kill_credit(Creature* pCreature) return new npc_sinkhole_kill_creditAI(pCreature); } -/*###### -## npc_surristrasz -######*/ - -#define GOSSIP_ITEM_FREE_FLIGHT "I'd like passage to the Transitus Shield." -#define GOSSIP_ITEM_FLIGHT "May I use a drake to fly elsewhere?" - -enum -{ - SPELL_ABMER_TO_COLDARRA = 46064 -}; - -bool GossipHello_npc_surristrasz(Player* pPlayer, Creature* pCreature) -{ - if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); - - if (pCreature->isTaxi()) - { - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_FREE_FLIGHT, GOSSIP_SENDER_MAIN, GOSSIP_OPTION_GOSSIP); - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_TAXI, GOSSIP_ITEM_FLIGHT, GOSSIP_SENDER_MAIN, GOSSIP_OPTION_TAXIVENDOR); - } - - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); - return true; -} - -bool GossipSelect_npc_surristrasz(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) -{ - if (uiAction == GOSSIP_OPTION_GOSSIP) - { - pPlayer->CLOSE_GOSSIP_MENU(); - - //TaxiPath 795 (amber to coldarra) - pPlayer->CastSpell(pPlayer, SPELL_ABMER_TO_COLDARRA, true); - } - - if (uiAction == GOSSIP_OPTION_TAXIVENDOR) - pPlayer->GetSession()->SendTaxiMenu(pCreature); - - return true; -} - -/*###### -## npc_tiare -######*/ - -#define GOSSIP_ITEM_TELEPORT "Teleport me to Amber Ledge, please." - -enum -{ - SPELL_TELEPORT_COLDARRA = 50135 -}; - -bool GossipHello_npc_tiare(Player* pPlayer, Creature* pCreature) -{ - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_TELEPORT, GOSSIP_SENDER_MAIN, GOSSIP_OPTION_GOSSIP); - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); - return true; -} - -bool GossipSelect_npc_tiare(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) -{ - if (uiAction == GOSSIP_OPTION_GOSSIP) - { - pPlayer->CLOSE_GOSSIP_MENU(); - pPlayer->CastSpell(pPlayer, SPELL_TELEPORT_COLDARRA, true); - } - return true; -} - /*###### ## npc_lurgglbr ######*/ @@ -748,24 +521,6 @@ void AddSC_borean_tundra() { Script* pNewScript; - pNewScript = new Script; - pNewScript->Name = "npc_fizzcrank_fullthrottle"; - pNewScript->pGossipHello = &GossipHello_npc_fizzcrank_fullthrottle; - pNewScript->pGossipSelect = &GossipSelect_npc_fizzcrank_fullthrottle; - pNewScript->RegisterSelf(); - - pNewScript = new Script; - pNewScript->Name = "npc_iruk"; - pNewScript->pGossipHello = &GossipHello_npc_iruk; - pNewScript->pGossipSelect = &GossipSelect_npc_iruk; - pNewScript->RegisterSelf(); - - pNewScript = new Script; - pNewScript->Name = "npc_kara_thricestar"; - pNewScript->pGossipHello = &GossipHello_npc_kara_thricestar; - pNewScript->pGossipSelect = &GossipSelect_npc_kara_thricestar; - pNewScript->RegisterSelf(); - pNewScript = new Script; pNewScript->Name = "npc_nesingwary_trapper"; pNewScript->GetAI = &GetAI_npc_nesingwary_trapper; @@ -788,18 +543,6 @@ void AddSC_borean_tundra() pNewScript->GetAI = &GetAI_npc_sinkhole_kill_credit; pNewScript->RegisterSelf(); - pNewScript = new Script; - pNewScript->Name = "npc_surristrasz"; - pNewScript->pGossipHello = &GossipHello_npc_surristrasz; - pNewScript->pGossipSelect = &GossipSelect_npc_surristrasz; - pNewScript->RegisterSelf(); - - pNewScript = new Script; - pNewScript->Name = "npc_tiare"; - pNewScript->pGossipHello = &GossipHello_npc_tiare; - pNewScript->pGossipSelect = &GossipSelect_npc_tiare; - pNewScript->RegisterSelf(); - pNewScript = new Script; pNewScript->Name = "npc_lurgglbr"; pNewScript->GetAI = &GetAI_npc_lurgglbr; diff --git a/scripts/northrend/dalaran.cpp b/scripts/northrend/dalaran.cpp index ef793f1f4..528bdc3f7 100644 --- a/scripts/northrend/dalaran.cpp +++ b/scripts/northrend/dalaran.cpp @@ -23,7 +23,6 @@ EndScriptData */ /* ContentData npc_dalaran_guardian_mage -npc_zirdomi EndContentData */ #include "precompiled.h" @@ -75,51 +74,12 @@ CreatureAI* GetAI_npc_dalaran_guardian_mage(Creature* pCreature) return new npc_dalaran_guardian_mageAI(pCreature); } -/*###### -## npc_zidormi -######*/ - -#define GOSSIP_ITEM_ZIDORMI1 "Take me to the Caverns of Time." - -enum -{ - SPELL_TELEPORT_COT = 46343, - GOSSIP_TEXTID_ZIDORMI1 = 14066 -}; - -bool GossipHello_npc_zidormi(Player* pPlayer, Creature* pCreature) -{ - if (pPlayer->getLevel() >= 65) - { - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_ZIDORMI1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); - } - else - pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_ZIDORMI1, pCreature->GetObjectGuid()); - - return true; -} - -bool GossipSelect_npc_zidormi(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) -{ - if (uiAction == GOSSIP_ACTION_INFO_DEF+1) - pPlayer->CastSpell(pPlayer,SPELL_TELEPORT_COT,false); - - return true; -} - void AddSC_dalaran() { - Script *newscript; - - newscript = new Script; - newscript->Name = "npc_dalaran_guardian_mage"; - newscript->GetAI = &GetAI_npc_dalaran_guardian_mage; - newscript->RegisterSelf(); + Script* pNewScript; - newscript = new Script; - newscript->Name = "npc_zidormi"; - newscript->pGossipHello = &GossipHello_npc_zidormi; - newscript->pGossipSelect = &GossipSelect_npc_zidormi; - newscript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "npc_dalaran_guardian_mage"; + pNewScript->GetAI = &GetAI_npc_dalaran_guardian_mage; + pNewScript->RegisterSelf(); } diff --git a/scripts/northrend/dragonblight.cpp b/scripts/northrend/dragonblight.cpp index a69dbc673..cb64b6638 100644 --- a/scripts/northrend/dragonblight.cpp +++ b/scripts/northrend/dragonblight.cpp @@ -17,13 +17,12 @@ /* ScriptData SDName: Dragonblight SD%Complete: 100 -SDComment: Quest support: 12166, 12261, 12499/12500(end sequenze). Taxi paths Wyrmrest temple. +SDComment: Quest support: 12166, 12261. Taxi paths Wyrmrest temple. SDCategory: Dragonblight EndScriptData */ /* ContentData npc_afrasastrasz -npc_alexstrasza_wr_gate npc_destructive_ward npc_tariolstrasz npc_torastrasza @@ -71,42 +70,6 @@ bool GossipSelect_npc_afrasastrasz(Player* pPlayer, Creature* pCreature, uint32 return true; } -/*###### -## npc_alexstrasza_wr_gate -######*/ - -enum -{ - QUEST_RETURN_TO_AG_A = 12499, - QUEST_RETURN_TO_AG_H = 12500, - MOVIE_ID_GATES = 14 -}; - -#define GOSSIP_ITEM_WHAT_HAPPENED "Alexstrasza, can you show me what happened here?" - -bool GossipHello_npc_alexstrasza_wr_gate(Player* pPlayer, Creature* pCreature) -{ - if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); - - if (pPlayer->GetQuestRewardStatus(QUEST_RETURN_TO_AG_A) || pPlayer->GetQuestRewardStatus(QUEST_RETURN_TO_AG_H)) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_WHAT_HAPPENED, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); - return true; -} - -bool GossipSelect_npc_alexstrasza_wr_gate(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) -{ - if (uiAction == GOSSIP_ACTION_INFO_DEF+1) - { - pPlayer->CLOSE_GOSSIP_MENU(); - pPlayer->SendMovieStart(MOVIE_ID_GATES); - } - - return true; -} - /*##### # npc_destructive_ward #####*/ @@ -336,12 +299,6 @@ void AddSC_dragonblight() pNewScript->pGossipSelect = &GossipSelect_npc_afrasastrasz; pNewScript->RegisterSelf(); - pNewScript = new Script; - pNewScript->Name = "npc_alexstrasza_wr_gate"; - pNewScript->pGossipHello = &GossipHello_npc_alexstrasza_wr_gate; - pNewScript->pGossipSelect = &GossipSelect_npc_alexstrasza_wr_gate; - pNewScript->RegisterSelf(); - pNewScript = new Script; pNewScript->Name = "npc_destructive_ward"; pNewScript->GetAI = &GetAI_npc_destructive_ward; diff --git a/scripts/northrend/storm_peaks.cpp b/scripts/northrend/storm_peaks.cpp index 03680e6f6..b4a560bd5 100644 --- a/scripts/northrend/storm_peaks.cpp +++ b/scripts/northrend/storm_peaks.cpp @@ -16,260 +16,16 @@ /* ScriptData SDName: Storm_Peaks -SD%Complete: 100 -SDComment: Vendor Support (31247). Quest support: 12970, 12684 +SD%Complete: 0 +SDComment: Placeholder SDCategory: Storm Peaks EndScriptData */ /* ContentData -npc_loklira_the_crone -npc_roxi_ramrocket -npc_frostborn_scout EndContentData */ #include "precompiled.h" -/*###### -## npc_frostborn_scout -######*/ - -enum Scout -{ - QUEST_MISSING_SCOUT = 12864, - - GOSSIP_TEXTID_SCOUT_1 = 13611, - GOSSIP_TEXTID_SCOUT_2 = 13612, - GOSSIP_TEXTID_SCOUT_3 = 13613, - GOSSIP_TEXTID_SCOUT_4 = 13614 - -}; - -#define GOSSIP_ITEM_SCOUT_1 "Are you okay? I've come to take you back to Frosthold if you can stand." -#define GOSSIP_ITEM_SCOUT_2 "I'm sorry that I didn't get here sooner. What happened?" -#define GOSSIP_ITEM_SCOUT_3 "I'll go get some help. Hang in there." - -bool GossipHello_npc_frostborn_scout(Player* pPlayer, Creature* pCreature) -{ - if (pPlayer->GetQuestStatus(QUEST_MISSING_SCOUT) == QUEST_STATUS_INCOMPLETE) - { - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_SCOUT_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_SCOUT_1, pCreature->GetObjectGuid()); - return true; - } - - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); - return true; -} - -bool GossipSelect_npc_frostborn_scout(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) -{ - switch(uiAction) - { - case GOSSIP_ACTION_INFO_DEF+1: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_SCOUT_2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); - pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_SCOUT_2, pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF+2: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_SCOUT_3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); - pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_SCOUT_3, pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF+3: - pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_SCOUT_4, pCreature->GetObjectGuid()); - pPlayer->AreaExploredOrEventHappens(QUEST_MISSING_SCOUT); - break; - } - return true; -} - -/*###### -## npc_loklira_the_crone -######*/ - -#define GOSSIP_ITEM_TELL_ME "Tell me about this proposal." -#define GOSSIP_ITEM_WHAT_HAPPENED "What happened then?" -#define GOSSIP_ITEM_YOU_WANT_ME "You want me to take part in the Hyldsmeet to end the war?" -#define GOSSIP_ITEM_VERY_WELL "Very well. I'll take part in this competition." - -enum -{ - GOSSIP_TEXTID_LOKLIRA1 = 13777, - GOSSIP_TEXTID_LOKLIRA2 = 13778, - GOSSIP_TEXTID_LOKLIRA3 = 13779, - GOSSIP_TEXTID_LOKLIRA4 = 13780, - - QUEST_THE_HYLDSMEET = 12970, - - CREDIT_LOKLIRA = 30467 -}; - -bool GossipHello_npc_loklira_the_crone(Player* pPlayer, Creature* pCreature) -{ - if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); - - if (pPlayer->GetQuestStatus(QUEST_THE_HYLDSMEET) == QUEST_STATUS_INCOMPLETE) - { - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_TELL_ME, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_LOKLIRA1, pCreature->GetObjectGuid()); - return true; - } - - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); - return true; -} - -bool GossipSelect_npc_loklira_the_crone(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) -{ - switch(uiAction) - { - case GOSSIP_ACTION_INFO_DEF+1: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_WHAT_HAPPENED, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); - pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_LOKLIRA2, pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF+2: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_YOU_WANT_ME, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); - pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_LOKLIRA3, pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF+3: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_VERY_WELL, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4); - pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_LOKLIRA4, pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF+4: - pPlayer->TalkedToCreature(CREDIT_LOKLIRA, pCreature->GetObjectGuid()); - pPlayer->CLOSE_GOSSIP_MENU(); - break; - } - return true; -} - -/*###### -## npc_thorim -######*/ - -#define GOSSIP_ITEM_THORIM1 "Can you tell me what became of Sif?" -#define GOSSIP_ITEM_THORIM2 "He did more than that, Thorim. He controls Ulduar now." -#define GOSSIP_ITEM_THORIM3 "It needn't end this way." - -enum -{ - QUEST_SIBLING_RIVALRY = 13064, - - SPELL_THORIM_STORY_KILL_CREDIT = 56940, - - GOSSIP_TEXTID_THORIM1 = 13799, - GOSSIP_TEXTID_THORIM2 = 13801, - GOSSIP_TEXTID_THORIM3 = 13802, - GOSSIP_TEXTID_THORIM4 = 13803 -}; - -bool GossipHello_npc_thorim(Player* pPlayer, Creature* pCreature) -{ - if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); - - if (pPlayer->GetQuestStatus(QUEST_SIBLING_RIVALRY) == QUEST_STATUS_INCOMPLETE) - { - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_THORIM1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_THORIM1, pCreature->GetObjectGuid()); - } - else - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); - - return true; -} - -bool GossipSelect_npc_thorim(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) -{ - switch(uiAction) - { - case GOSSIP_ACTION_INFO_DEF+1: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_THORIM2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); - pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_THORIM2, pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF+2: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_THORIM3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3); - pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_THORIM3, pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF+3: - pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_THORIM4, pCreature->GetObjectGuid()); - pCreature->CastSpell(pPlayer, SPELL_THORIM_STORY_KILL_CREDIT, true); - break; - } - - return true; -} - -/*###### -## npc_roxi_ramrocket -######*/ - -#define GOSSIP_TEXT_RAMROCKET1 "How do you fly in this cold climate?" -#define GOSSIP_TEXT_RAMROCKET2 "I hear you sell motorcycle parts." - -enum -{ - SPELL_MECHANO_HOG = 60866, - SPELL_MEKGINEER_CHOPPER = 60867 -}; - -bool GossipHello_npc_roxi_ramrocket(Player* pPlayer, Creature* pCreature) -{ - if (pCreature->isTrainer()) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_TRAINER, GOSSIP_TEXT_RAMROCKET1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRAIN); - - if (pCreature->isVendor()) - { - if (pPlayer->HasSpell(SPELL_MECHANO_HOG) || pPlayer->HasSpell(SPELL_MEKGINEER_CHOPPER)) - { - if (pPlayer->HasSkill(SKILL_ENGINEERING) && pPlayer->GetBaseSkillValue(SKILL_ENGINEERING) >= 450) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_VENDOR, GOSSIP_TEXT_RAMROCKET2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE); - } - } - - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); - return true; -} - -bool GossipSelect_npc_roxi_ramrocket(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) -{ - switch(uiAction) - { - case GOSSIP_ACTION_TRAIN: - pPlayer->SEND_TRAINERLIST(pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_TRADE: - pPlayer->SEND_VENDORLIST(pCreature->GetObjectGuid()); - break; - } - - return true; -} - void AddSC_storm_peaks() { - Script* newscript; - - newscript = new Script; - newscript->Name = "npc_frostborn_scout"; - newscript->pGossipHello = &GossipHello_npc_frostborn_scout; - newscript->pGossipSelect = &GossipSelect_npc_frostborn_scout; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_loklira_the_crone"; - newscript->pGossipHello = &GossipHello_npc_loklira_the_crone; - newscript->pGossipSelect = &GossipSelect_npc_loklira_the_crone; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_thorim"; - newscript->pGossipHello = &GossipHello_npc_thorim; - newscript->pGossipSelect = &GossipSelect_npc_thorim; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_roxi_ramrocket"; - newscript->pGossipHello = &GossipHello_npc_roxi_ramrocket; - newscript->pGossipSelect = &GossipSelect_npc_roxi_ramrocket; - newscript->RegisterSelf(); } diff --git a/scripts/outland/blades_edge_mountains.cpp b/scripts/outland/blades_edge_mountains.cpp index fd3cd93ad..0cf3f07bd 100644 --- a/scripts/outland/blades_edge_mountains.cpp +++ b/scripts/outland/blades_edge_mountains.cpp @@ -17,7 +17,7 @@ /* ScriptData SDName: Blades_Edge_Mountains SD%Complete: 90 -SDComment: Quest support: 10503, 10504, 10556, 10609, 10682, 10980. Ogri'la->Skettis Flight. (npc_daranelle needs bit more work before consider complete) +SDComment: Quest support: 10503, 10504, 10556, 10609. (npc_daranelle needs bit more work before consider complete) SDCategory: Blade's Edge Mountains EndScriptData */ @@ -25,9 +25,6 @@ EndScriptData */ mobs_bladespire_ogre mobs_nether_drake npc_daranelle -npc_overseer_nuaar -npc_saikkal_the_elder -npc_skyguard_handler_irena EndContentData */ #include "precompiled.h" @@ -265,127 +262,26 @@ CreatureAI* GetAI_npc_daranelle(Creature* pCreature) return new npc_daranelleAI(pCreature); } -/*###### -## npc_overseer_nuaar -######*/ - -bool GossipHello_npc_overseer_nuaar(Player* pPlayer, Creature* pCreature) -{ - if (pPlayer->GetQuestStatus(10682) == QUEST_STATUS_INCOMPLETE) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Overseer, I am here to negotiate on behalf of the Cenarion Expedition.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - - pPlayer->SEND_GOSSIP_MENU(10532, pCreature->GetObjectGuid()); - - return true; -} - -bool GossipSelect_npc_overseer_nuaar(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) -{ - if (uiAction == GOSSIP_ACTION_INFO_DEF+1) - { - pPlayer->SEND_GOSSIP_MENU(10533, pCreature->GetObjectGuid()); - pPlayer->AreaExploredOrEventHappens(10682); - } - return true; -} - -/*###### -## npc_saikkal_the_elder -######*/ - -bool GossipHello_npc_saikkal_the_elder(Player* pPlayer, Creature* pCreature) -{ - if (pPlayer->GetQuestStatus(10980) == QUEST_STATUS_INCOMPLETE) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Yes... yes, it's me.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - - pPlayer->SEND_GOSSIP_MENU(10794, pCreature->GetObjectGuid()); - - return true; -} - -bool GossipSelect_npc_saikkal_the_elder(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) -{ - switch(uiAction) - { - case GOSSIP_ACTION_INFO_DEF+1: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Yes elder. Tell me more of the book.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); - pPlayer->SEND_GOSSIP_MENU(10795, pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF+2: - pPlayer->TalkedToCreature(pCreature->GetEntry(), pCreature->GetObjectGuid()); - pPlayer->SEND_GOSSIP_MENU(10796, pCreature->GetObjectGuid()); - break; - } - return true; -} - -/*###### -## npc_skyguard_handler_irena -######*/ - -#define GOSSIP_SKYGUARD "Fly me to Skettis please" - -bool GossipHello_npc_skyguard_handler_irena(Player* pPlayer, Creature* pCreature) -{ - if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); - - if (pPlayer->GetReputationRank(1031) >= REP_HONORED) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SKYGUARD, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); - - return true; -} - -bool GossipSelect_npc_skyguard_handler_irena(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) -{ - if (uiAction == GOSSIP_ACTION_INFO_DEF+1) - { - pPlayer->CLOSE_GOSSIP_MENU(); - pPlayer->CastSpell(pPlayer,41278,true); //TaxiPath 706 - } - return true; -} - /*###### ## AddSC ######*/ void AddSC_blades_edge_mountains() { - Script *newscript; - - newscript = new Script; - newscript->Name = "mobs_bladespire_ogre"; - newscript->GetAI = &GetAI_mobs_bladespire_ogre; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "mobs_nether_drake"; - newscript->GetAI = &GetAI_mobs_nether_drake; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_daranelle"; - newscript->GetAI = &GetAI_npc_daranelle; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_overseer_nuaar"; - newscript->pGossipHello = &GossipHello_npc_overseer_nuaar; - newscript->pGossipSelect = &GossipSelect_npc_overseer_nuaar; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_saikkal_the_elder"; - newscript->pGossipHello = &GossipHello_npc_saikkal_the_elder; - newscript->pGossipSelect = &GossipSelect_npc_saikkal_the_elder; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_skyguard_handler_irena"; - newscript->pGossipHello = &GossipHello_npc_skyguard_handler_irena; - newscript->pGossipSelect = &GossipSelect_npc_skyguard_handler_irena; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "mobs_bladespire_ogre"; + pNewScript->GetAI = &GetAI_mobs_bladespire_ogre; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "mobs_nether_drake"; + pNewScript->GetAI = &GetAI_mobs_nether_drake; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_daranelle"; + pNewScript->GetAI = &GetAI_npc_daranelle; + pNewScript->RegisterSelf(); } diff --git a/scripts/outland/hellfire_peninsula.cpp b/scripts/outland/hellfire_peninsula.cpp index 37479823d..c8e4e755c 100644 --- a/scripts/outland/hellfire_peninsula.cpp +++ b/scripts/outland/hellfire_peninsula.cpp @@ -17,21 +17,15 @@ /* ScriptData SDName: Hellfire_Peninsula SD%Complete: 100 -SDComment: Quest support: 9375, 9410, 9418, 10129, 10146, 10162, 10163, 10340, 10346, 10347, 10382 (Special flight paths), 10838 +SDComment: Quest support: 9375, 9410, 9418, 10838 SDCategory: Hellfire Peninsula EndScriptData */ /* ContentData npc_aeranas -go_haaleshi_altar npc_ancestral_wolf npc_demoniac_scryer -npc_gryphoneer_windbellow -npc_naladu npc_tracy_proudwell -npc_trollbane -npc_wing_commander_dabiree -npc_wing_commander_brack npc_wounded_blood_elf EndContentData */ @@ -51,8 +45,6 @@ EndContentData */ #define SPELL_ENVELOPING_WINDS 15535 #define SPELL_SHOCK 12553 -#define C_AERANAS 17085 - struct MANGOS_DLL_DECL npc_aeranasAI : public ScriptedAI { npc_aeranasAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } @@ -119,16 +111,6 @@ CreatureAI* GetAI_npc_aeranas(Creature* pCreature) return new npc_aeranasAI(pCreature); } -/*###### -## go_haaleshi_altar -######*/ - -bool GOUse_go_haaleshi_altar(Player* pPlayer, GameObject* pGo) -{ - pGo->SummonCreature(C_AERANAS, -1321.79f, 4043.80f, 116.24f, 1.25f, TEMPSUMMON_TIMED_DESPAWN, 180000); - return false; -} - /*###### ## npc_ancestral_wolf ######*/ @@ -359,87 +341,6 @@ bool GossipSelect_npc_demoniac_scryer(Player* pPlayer, Creature* pCreature, uint return true; } -/*###### -## npc_gryphoneer_windbellow -######*/ - -enum -{ - QUEST_ABYSSAL_A = 10163, - QUEST_RETURN_ABYSSAL_A = 10346, - QUEST_TO_THE_FRONT = 10382, - SPELL_TAXI_AERIAL_ASSULT = 33899, - SPELL_TAXI_TO_BEACH_HEAD = 35065 -}; - -#define GOSSIP_ITEM1_WIN "Fly me to The Abyssal Shelf" -#define GOSSIP_ITEM2_WIN "Fly me to Honor Point" - -bool GossipHello_npc_gryphoneer_windbellow(Player* pPlayer, Creature* pCreature) -{ - if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); - - //Mission: The Abyssal Shelf || Return to the Abyssal Shelf - if (pPlayer->GetQuestStatus(QUEST_ABYSSAL_A) == QUEST_STATUS_INCOMPLETE || - pPlayer->GetQuestStatus(QUEST_RETURN_ABYSSAL_A) == QUEST_STATUS_INCOMPLETE) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM1_WIN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - - //Go to the Front - if (pPlayer->GetQuestStatus(QUEST_TO_THE_FRONT) == QUEST_STATUS_COMPLETE || - pPlayer->GetQuestRewardStatus(QUEST_TO_THE_FRONT)) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM2_WIN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); - - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); - return true; -} - -bool GossipSelect_npc_gryphoneer_windbellow(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) -{ - if (uiAction == GOSSIP_ACTION_INFO_DEF+1) - { - pPlayer->CLOSE_GOSSIP_MENU(); - //TaxiPath 589 - pPlayer->CastSpell(pPlayer,SPELL_TAXI_AERIAL_ASSULT,true); - } - if (uiAction == GOSSIP_ACTION_INFO_DEF+2) - { - pPlayer->CLOSE_GOSSIP_MENU(); - //TaxiPath 607 - pPlayer->CastSpell(pPlayer,SPELL_TAXI_TO_BEACH_HEAD,true); - } - return true; -} - -/*###### -## npc_naladu -######*/ - -#define GOSSIP_NALADU_ITEM1 "Why don't you escape?" - -enum -{ - GOSSIP_TEXTID_NALADU1 = 9788 -}; - -bool GossipHello_npc_naladu(Player* pPlayer, Creature* pCreature) -{ - if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); - - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_NALADU_ITEM1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); - return true; -} - -bool GossipSelect_npc_naladu(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) -{ - if (uiAction == GOSSIP_ACTION_INFO_DEF+1) - pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_NALADU1, pCreature->GetObjectGuid()); - - return true; -} - /*###### ## npc_tracy_proudwell ######*/ @@ -488,166 +389,6 @@ bool GossipSelect_npc_tracy_proudwell(Player* pPlayer, Creature* pCreature, uint return true; } -/*###### -## npc_trollbane -######*/ - -#define GOSSIP_TROLLBANE_ITEM1 "Tell me of the Sons of Lothar." -#define GOSSIP_TROLLBANE_ITEM2 "" -#define GOSSIP_TROLLBANE_ITEM3 "Tell me of your homeland." - -enum -{ - GOSSIP_TEXTID_TROLLBANE1 = 9932, - GOSSIP_TEXTID_TROLLBANE2 = 9933, - GOSSIP_TEXTID_TROLLBANE3 = 8772 -}; - -bool GossipHello_npc_trollbane(Player* pPlayer, Creature* pCreature) -{ - if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); - - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TROLLBANE_ITEM1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TROLLBANE_ITEM3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); - return true; -} - -bool GossipSelect_npc_trollbane(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) -{ - switch(uiAction) - { - case GOSSIP_ACTION_INFO_DEF+1: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TROLLBANE_ITEM2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); - pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_TROLLBANE1, pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF+2: - pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_TROLLBANE2, pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF+3: - pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_TROLLBANE3, pCreature->GetObjectGuid()); - break; - } - - return true; -} - -/*###### -## npc_wing_commander_dabiree -######*/ - -enum -{ - SPELL_TAXI_TO_GATEWAYS = 33768, - SPELL_TAXI_TO_SHATTER = 35069, - QUEST_MISSION_GATEWAYS_A = 10146, - QUEST_SHATTER_POINT = 10340 -}; - -#define GOSSIP_ITEM1_DAB "Fly me to Murketh and Shaadraz Gateways" -#define GOSSIP_ITEM2_DAB "Fly me to Shatter Point" - -bool GossipHello_npc_wing_commander_dabiree(Player* pPlayer, Creature* pCreature) -{ - if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); - - //Mission: The Murketh and Shaadraz Gateways - if (pPlayer->GetQuestStatus(QUEST_MISSION_GATEWAYS_A) == QUEST_STATUS_INCOMPLETE) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM1_DAB, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - - //Shatter Point - if (pPlayer->GetQuestStatus(QUEST_SHATTER_POINT) == QUEST_STATUS_COMPLETE || - pPlayer->GetQuestRewardStatus(QUEST_SHATTER_POINT)) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM2_DAB, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); - - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); - return true; -} - -bool GossipSelect_npc_wing_commander_dabiree(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) -{ - if (uiAction == GOSSIP_ACTION_INFO_DEF+1) - { - pPlayer->CLOSE_GOSSIP_MENU(); - //TaxiPath 585 - pPlayer->CastSpell(pPlayer,SPELL_TAXI_TO_GATEWAYS,true); - } - if (uiAction == GOSSIP_ACTION_INFO_DEF+2) - { - pPlayer->CLOSE_GOSSIP_MENU(); - //TaxiPath 612 - pPlayer->CastSpell(pPlayer,SPELL_TAXI_TO_SHATTER,true); - } - return true; -} - -/*###### -## npc_wing_commander_brack -######*/ - -enum -{ - QUEST_MISSION_GATEWAYS_H = 10129, - QUEST_ABYSSAL_H = 10162, - QUEST_RETURN_ABYSSAL_H = 10347, - QUEST_SPINEBREAKER = 10242, - SPELL_TAXI_GATEWAYS_H = 33659, - SPELL_TAXI_ASSULT_H = 33825, - SPELL_TAXI_SPINEBREAKER = 34578 -}; - -#define GOSSIP_ITEM1_BRA "I'm on a bombing mission for Forward Commander To'arch. I need a wyvern destroyer!" -#define GOSSIP_ITEM2_BRA "Fly me to The Abyssal Shelf" -#define GOSSIP_ITEM3_BRA "Lend me a Wind Rider, I'm going to Spinebreaker Post." - -bool GossipHello_npc_wing_commander_brack(Player* pPlayer, Creature* pCreature) -{ - if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); - - //Mission: The Murketh and Shaadraz Gateways - if (pPlayer->GetQuestStatus(QUEST_MISSION_GATEWAYS_H) == QUEST_STATUS_INCOMPLETE) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM1_BRA, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - - //Mission: The Abyssal Shelf || Return to the Abyssal Shelf - if (pPlayer->GetQuestStatus(QUEST_ABYSSAL_H) == QUEST_STATUS_INCOMPLETE || - pPlayer->GetQuestStatus(QUEST_RETURN_ABYSSAL_H) == QUEST_STATUS_INCOMPLETE) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM2_BRA, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); - - //Spinebreaker Post - if (pPlayer->GetQuestStatus(QUEST_SPINEBREAKER) == QUEST_STATUS_COMPLETE || - pPlayer->GetQuestRewardStatus(QUEST_SPINEBREAKER)) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM3_BRA, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3); - - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); - return true; -} - -bool GossipSelect_npc_wing_commander_brack(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) -{ - switch(uiAction) - { - case GOSSIP_ACTION_INFO_DEF+1: - pPlayer->CLOSE_GOSSIP_MENU(); - //TaxiPath 584 - pPlayer->CastSpell(pPlayer,SPELL_TAXI_GATEWAYS_H,true); - break; - case GOSSIP_ACTION_INFO_DEF+2: - pPlayer->CLOSE_GOSSIP_MENU(); - //TaxiPath 587 - pPlayer->CastSpell(pPlayer,SPELL_TAXI_ASSULT_H,true); - break; - case GOSSIP_ACTION_INFO_DEF+3: - pPlayer->CLOSE_GOSSIP_MENU(); - //TaxiPath 604 - pPlayer->CastSpell(pPlayer,SPELL_TAXI_SPINEBREAKER,true); - break; - } - return true; -} - /*###### ## npc_wounded_blood_elf ######*/ @@ -735,69 +476,34 @@ bool QuestAccept_npc_wounded_blood_elf(Player* pPlayer, Creature* pCreature, con void AddSC_hellfire_peninsula() { - Script *newscript; - - newscript = new Script; - newscript->Name = "npc_aeranas"; - newscript->GetAI = &GetAI_npc_aeranas; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "go_haaleshi_altar"; - newscript->pGOUse = &GOUse_go_haaleshi_altar; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_ancestral_wolf"; - newscript->GetAI = &GetAI_npc_ancestral_wolf; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_demoniac_scryer"; - newscript->GetAI = &GetAI_npc_demoniac_scryer; - newscript->pGossipHello = &GossipHello_npc_demoniac_scryer; - newscript->pGossipSelect = &GossipSelect_npc_demoniac_scryer; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_gryphoneer_windbellow"; - newscript->pGossipHello = &GossipHello_npc_gryphoneer_windbellow; - newscript->pGossipSelect = &GossipSelect_npc_gryphoneer_windbellow; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_naladu"; - newscript->pGossipHello = &GossipHello_npc_naladu; - newscript->pGossipSelect = &GossipSelect_npc_naladu; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_tracy_proudwell"; - newscript->pGossipHello = &GossipHello_npc_tracy_proudwell; - newscript->pGossipSelect = &GossipSelect_npc_tracy_proudwell; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_trollbane"; - newscript->pGossipHello = &GossipHello_npc_trollbane; - newscript->pGossipSelect = &GossipSelect_npc_trollbane; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_wing_commander_dabiree"; - newscript->pGossipHello = &GossipHello_npc_wing_commander_dabiree; - newscript->pGossipSelect = &GossipSelect_npc_wing_commander_dabiree; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_wing_commander_brack"; - newscript->pGossipHello = &GossipHello_npc_wing_commander_brack; - newscript->pGossipSelect = &GossipSelect_npc_wing_commander_brack; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_wounded_blood_elf"; - newscript->GetAI = &GetAI_npc_wounded_blood_elf; - newscript->pQuestAcceptNPC = &QuestAccept_npc_wounded_blood_elf; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "npc_aeranas"; + pNewScript->GetAI = &GetAI_npc_aeranas; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_ancestral_wolf"; + pNewScript->GetAI = &GetAI_npc_ancestral_wolf; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_demoniac_scryer"; + pNewScript->GetAI = &GetAI_npc_demoniac_scryer; + pNewScript->pGossipHello = &GossipHello_npc_demoniac_scryer; + pNewScript->pGossipSelect = &GossipSelect_npc_demoniac_scryer; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_tracy_proudwell"; + pNewScript->pGossipHello = &GossipHello_npc_tracy_proudwell; + pNewScript->pGossipSelect = &GossipSelect_npc_tracy_proudwell; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_wounded_blood_elf"; + pNewScript->GetAI = &GetAI_npc_wounded_blood_elf; + pNewScript->pQuestAcceptNPC = &QuestAccept_npc_wounded_blood_elf; + pNewScript->RegisterSelf(); } diff --git a/scripts/outland/nagrand.cpp b/scripts/outland/nagrand.cpp index e6f3082e8..bea5f974a 100644 --- a/scripts/outland/nagrand.cpp +++ b/scripts/outland/nagrand.cpp @@ -17,7 +17,7 @@ /* ScriptData SDName: Nagrand SD%Complete: 90 -SDComment: Quest support: 9868, 9918, 9991, 10044, 10085, 10107, 10108, 10172, 10646. TextId's unknown for altruis_the_sufferer and greatmother_geyah (npc_text) +SDComment: Quest support: 9868, 9918, 9991, 10044, 10085, 10172, 10646. TextId's unknown for altruis_the_sufferer and greatmother_geyah (npc_text) SDCategory: Nagrand EndScriptData */ @@ -25,7 +25,6 @@ EndScriptData */ mob_lump npc_altruis_the_sufferer npc_greatmother_geyah -npc_lantresor_of_the_blade npc_maghar_captive npc_creditmarker_visit_with_ancestors EndContentData */ @@ -324,66 +323,6 @@ bool GossipSelect_npc_greatmother_geyah(Player* pPlayer, Creature* pCreature, ui return true; } -/*###### -## npc_lantresor_of_the_blade -######*/ - -bool GossipHello_npc_lantresor_of_the_blade(Player* pPlayer, Creature* pCreature) -{ - if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); - - if (pPlayer->GetQuestStatus(10107) == QUEST_STATUS_INCOMPLETE || pPlayer->GetQuestStatus(10108) == QUEST_STATUS_INCOMPLETE) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "I have killed many of your ogres, Lantresor. I have no fear.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF); - - pPlayer->SEND_GOSSIP_MENU(9361, pCreature->GetObjectGuid()); - - return true; -} - -bool GossipSelect_npc_lantresor_of_the_blade(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) -{ - switch(uiAction) - { - case GOSSIP_ACTION_INFO_DEF: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Should I know? You look like an orc to me.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); - pPlayer->SEND_GOSSIP_MENU(9362, pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF+1: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "And the other half?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); - pPlayer->SEND_GOSSIP_MENU(9363, pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF+2: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "I have heard of your kind, but I never thought to see the day when I would meet a half-breed.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); - pPlayer->SEND_GOSSIP_MENU(9364, pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF+3: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "My apologies. I did not mean to offend. I am here on behalf of my people.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4); - pPlayer->SEND_GOSSIP_MENU(9365, pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF+4: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "My people ask that you pull back your Boulderfist ogres and cease all attacks on our territories. In return, we will also pull back our forces.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 5); - pPlayer->SEND_GOSSIP_MENU(9366, pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF+5: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "We will fight you until the end, then, Lantresor. We will not stand idly by as you pillage our towns and kill our people.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 6); - pPlayer->SEND_GOSSIP_MENU(9367, pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF+6: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "What do I need to do?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 7); - pPlayer->SEND_GOSSIP_MENU(9368, pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF+7: - pPlayer->SEND_GOSSIP_MENU(9369, pCreature->GetObjectGuid()); - if (pPlayer->GetQuestStatus(10107) == QUEST_STATUS_INCOMPLETE) - pPlayer->AreaExploredOrEventHappens(10107); - if (pPlayer->GetQuestStatus(10108) == QUEST_STATUS_INCOMPLETE) - pPlayer->AreaExploredOrEventHappens(10108); - break; - } - return true; -} - /*##### ## npc_maghar_captive #####*/ @@ -609,12 +548,6 @@ void AddSC_nagrand() pNewScript->pGossipSelect = &GossipSelect_npc_greatmother_geyah; pNewScript->RegisterSelf(); - pNewScript = new Script; - pNewScript->Name = "npc_lantresor_of_the_blade"; - pNewScript->pGossipHello = &GossipHello_npc_lantresor_of_the_blade; - pNewScript->pGossipSelect = &GossipSelect_npc_lantresor_of_the_blade; - pNewScript->RegisterSelf(); - pNewScript = new Script; pNewScript->Name = "npc_maghar_captive"; pNewScript->GetAI = &GetAI_npc_maghar_captive; diff --git a/scripts/outland/netherstorm.cpp b/scripts/outland/netherstorm.cpp index 87864213a..76f7239d2 100644 --- a/scripts/outland/netherstorm.cpp +++ b/scripts/outland/netherstorm.cpp @@ -17,7 +17,7 @@ /* ScriptData SDName: Netherstorm SD%Complete: 80 -SDComment: Quest support: 10438, 10652 (special flight paths), 10299, 10321, 10322, 10323, 10329, 10330, 10337, 10338, 10365(Shutting Down Manaforge), 10198, 10191, 10924 +SDComment: Quest support: 10438, 10299, 10321, 10322, 10323, 10329, 10330, 10337, 10338, 10365(Shutting Down Manaforge), 10198, 10191, 10924 SDCategory: Netherstorm EndScriptData */ @@ -26,7 +26,6 @@ npc_manaforge_control_console go_manaforge_control_console npc_commander_dawnforge npc_protectorate_nether_drake -npc_veronia npc_bessy npc_maxx_a_million EndContentData */ @@ -652,42 +651,6 @@ bool GossipSelect_npc_protectorate_nether_drake(Player* pPlayer, Creature* pCrea return true; } -/*###### -## npc_veronia -######*/ - -enum -{ - QUEST_BEHIND_ENEMY_LINES = 10652, - SPELL_STEALTH_FLIGHT = 34905 -}; - -#define GOSSIP_ITEM_FLY_CORUU "Fly me to Manaforge Coruu please" - -bool GossipHello_npc_veronia(Player* pPlayer, Creature* pCreature) -{ - if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); - - // Behind Enemy Lines - if (pPlayer->GetQuestStatus(QUEST_BEHIND_ENEMY_LINES) && !pPlayer->GetQuestRewardStatus(QUEST_BEHIND_ENEMY_LINES)) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_FLY_CORUU, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF); - - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); - - return true; -} - -bool GossipSelect_npc_veronia(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) -{ - if (uiAction == GOSSIP_ACTION_INFO_DEF) - { - pPlayer->CLOSE_GOSSIP_MENU(); - pPlayer->CastSpell(pPlayer, SPELL_STEALTH_FLIGHT, true);//TaxiPath 606 - } - return true; -} - /*###### ## npc_bessy ######*/ @@ -981,11 +944,6 @@ void AddSC_netherstorm() pNewScript->pGossipSelect = &GossipSelect_npc_protectorate_nether_drake; pNewScript->RegisterSelf(); - pNewScript = new Script; - pNewScript->Name = "npc_veronia"; - pNewScript->pGossipHello = &GossipHello_npc_veronia; - pNewScript->pGossipSelect = &GossipSelect_npc_veronia; - pNewScript->RegisterSelf(); pNewScript = new Script; pNewScript->Name = "npc_bessy"; diff --git a/scripts/outland/shadowmoon_valley.cpp b/scripts/outland/shadowmoon_valley.cpp index 5a08630d3..6ea007825 100644 --- a/scripts/outland/shadowmoon_valley.cpp +++ b/scripts/outland/shadowmoon_valley.cpp @@ -17,7 +17,7 @@ /* ScriptData SDName: Shadowmoon_Valley SD%Complete: 100 -SDComment: Quest support: 10519, 10583, 10601, 10781, 10814, 10804, 10854, 11082, 10458, 10480, 10481, 11020. Vendor Drake Dealer Hurlunk. +SDComment: Quest support: 10781, 10804, 10854, 10458, 10480, 10481, 11020. Vendor Drake Dealer Hurlunk. SDCategory: Shadowmoon Valley EndScriptData */ @@ -26,11 +26,7 @@ mob_mature_netherwing_drake mob_enslaved_netherwing_drake npc_dragonmaw_peon npc_drake_dealer_hurlunk -npcs_flanis_swiftwing_and_kagrosh -npc_murkblood_overseer -npc_neltharaku npc_karynaku -npc_oronok_tornheart npc_wilda mob_torloth npc_lord_illidan_stormrage @@ -472,204 +468,6 @@ bool GossipSelect_npc_drake_dealer_hurlunk(Player* pPlayer, Creature* pCreature, return true; } -/*###### -## npc_flanis_swiftwing_and_kagrosh -######*/ - -bool GossipHello_npcs_flanis_swiftwing_and_kagrosh(Player* pPlayer, Creature* pCreature) -{ - if (pPlayer->GetQuestStatus(10583) == QUEST_STATUS_INCOMPLETE && !pPlayer->HasItemCount(30658,1,true)) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Take Flanis's Pack", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - if (pPlayer->GetQuestStatus(10601) == QUEST_STATUS_INCOMPLETE && !pPlayer->HasItemCount(30659,1,true)) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Take Kagrosh's Pack", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); - - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); - - return true; -} - -bool GossipSelect_npcs_flanis_swiftwing_and_kagrosh(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) -{ - if (uiAction == GOSSIP_ACTION_INFO_DEF+1) - { - if (Item* pItem = pPlayer->StoreNewItemInInventorySlot(30658, 1)) - pPlayer->SendNewItem(pItem, 1, true, false); - - pPlayer->CLOSE_GOSSIP_MENU(); - } - if (uiAction == GOSSIP_ACTION_INFO_DEF+2) - { - if (Item* pItem = pPlayer->StoreNewItemInInventorySlot(30659, 1)) - pPlayer->SendNewItem(pItem, 1, true, false); - - pPlayer->CLOSE_GOSSIP_MENU(); - } - return true; -} - -/*###### -## npc_murkblood_overseer -######*/ - -#define QUEST_11082 11082 - -bool GossipHello_npc_murkblood_overseer(Player* pPlayer, Creature* pCreature) -{ - if (pPlayer->GetQuestStatus(QUEST_11082) == QUEST_STATUS_INCOMPLETE) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "I am here for you, overseer.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - - pPlayer->SEND_GOSSIP_MENU(10940, pCreature->GetObjectGuid()); - return true; -} - -bool GossipSelect_npc_murkblood_overseer(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) -{ - switch(uiAction) - { - case GOSSIP_ACTION_INFO_DEF+1: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "How dare you question an overseer of the Dragonmaw!", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); - //correct id not known - pPlayer->SEND_GOSSIP_MENU(10940, pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF+2: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Who speaks of me? What are you talking about, broken?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3); - //correct id not known - pPlayer->SEND_GOSSIP_MENU(10940, pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF+3: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Continue please.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+4); - //correct id not known - pPlayer->SEND_GOSSIP_MENU(10940, pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF+4: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Who are these bidders?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+5); - //correct id not known - pPlayer->SEND_GOSSIP_MENU(10940, pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF+5: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Well... yes.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+6); - //correct id not known - pPlayer->SEND_GOSSIP_MENU(10940, pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF+6: - //correct id not known - pPlayer->SEND_GOSSIP_MENU(10940, pCreature->GetObjectGuid()); - pCreature->CastSpell(pPlayer,41121,false); - pPlayer->AreaExploredOrEventHappens(QUEST_11082); - break; - } - return true; -} - -/*###### -## npc_neltharaku -######*/ - -bool GossipHello_npc_neltharaku(Player* pPlayer, Creature* pCreature) -{ - if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); - - if (pPlayer->GetQuestStatus(10814) == QUEST_STATUS_INCOMPLETE) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "I am listening, dragon", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - - pPlayer->SEND_GOSSIP_MENU(10613, pCreature->GetObjectGuid()); - - return true; -} - -bool GossipSelect_npc_neltharaku(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) -{ - switch(uiAction) - { - case GOSSIP_ACTION_INFO_DEF+1: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "But you are dragons! How could orcs do this to you?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); - pPlayer->SEND_GOSSIP_MENU(10614, pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF+2: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Your mate?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3); - pPlayer->SEND_GOSSIP_MENU(10615, pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF+3: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "I have battled many beasts, dragon. I will help you.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+4); - pPlayer->SEND_GOSSIP_MENU(10616, pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF+4: - pPlayer->CLOSE_GOSSIP_MENU(); - pPlayer->AreaExploredOrEventHappens(10814); - break; - } - return true; -} - -/*###### -## npc_oronok -######*/ - -#define GOSSIP_ORONOK1 "I am ready to hear your story, Oronok." -#define GOSSIP_ORONOK2 "How do I find the cipher?" -#define GOSSIP_ORONOK3 "How do you know all of this?" -#define GOSSIP_ORONOK4 "Yet what? What is it, Oronok?" -#define GOSSIP_ORONOK5 "Continue, please." -#define GOSSIP_ORONOK6 "So what of the cipher now? And your boys?" -#define GOSSIP_ORONOK7 "I will find your boys and the cipher, Oronok." - -bool GossipHello_npc_oronok_tornheart(Player* pPlayer, Creature* pCreature) -{ - if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); - if (pCreature->isVendor()) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_VENDOR, GOSSIP_TEXT_BROWSE_GOODS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE); - - if (pPlayer->GetQuestStatus(10519) == QUEST_STATUS_INCOMPLETE) - { - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ORONOK1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF); - pPlayer->SEND_GOSSIP_MENU(10312, pCreature->GetObjectGuid()); - }else - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); - - return true; -} - -bool GossipSelect_npc_oronok_tornheart(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) -{ - switch(uiAction) - { - case GOSSIP_ACTION_TRADE: - pPlayer->SEND_VENDORLIST(pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ORONOK2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - pPlayer->SEND_GOSSIP_MENU(10313, pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF+1: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ORONOK3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); - pPlayer->SEND_GOSSIP_MENU(10314, pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF+2: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ORONOK4, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3); - pPlayer->SEND_GOSSIP_MENU(10315, pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF+3: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ORONOK5, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+4); - pPlayer->SEND_GOSSIP_MENU(10316, pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF+4: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ORONOK6, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+5); - pPlayer->SEND_GOSSIP_MENU(10317, pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF+5: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ORONOK7, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+6); - pPlayer->SEND_GOSSIP_MENU(10318, pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF+6: - pPlayer->CLOSE_GOSSIP_MENU(); - pPlayer->AreaExploredOrEventHappens(10519); - break; - } - return true; -} - /*#### # npc_karynaku ####*/ @@ -1537,89 +1335,65 @@ bool ProcessEventId_event_spell_soul_captured_credit(uint32 uiEventId, Object* p void AddSC_shadowmoon_valley() { - Script *newscript; - - newscript = new Script; - newscript->Name = "mob_mature_netherwing_drake"; - newscript->GetAI = &GetAI_mob_mature_netherwing_drake; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "mob_enslaved_netherwing_drake"; - newscript->GetAI = &GetAI_mob_enslaved_netherwing_drake; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_dragonmaw_peon"; - newscript->GetAI = &GetAI_npc_dragonmaw_peon; - newscript->pEffectDummyNPC = &EffectDummyCreature_npc_dragonmaw_peon; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_drake_dealer_hurlunk"; - newscript->pGossipHello = &GossipHello_npc_drake_dealer_hurlunk; - newscript->pGossipSelect = &GossipSelect_npc_drake_dealer_hurlunk; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npcs_flanis_swiftwing_and_kagrosh"; - newscript->pGossipHello = &GossipHello_npcs_flanis_swiftwing_and_kagrosh; - newscript->pGossipSelect = &GossipSelect_npcs_flanis_swiftwing_and_kagrosh; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_murkblood_overseer"; - newscript->pGossipHello = &GossipHello_npc_murkblood_overseer; - newscript->pGossipSelect = &GossipSelect_npc_murkblood_overseer; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_neltharaku"; - newscript->pGossipHello = &GossipHello_npc_neltharaku; - newscript->pGossipSelect = &GossipSelect_npc_neltharaku; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_karynaku"; - newscript->pQuestAcceptNPC = &QuestAccept_npc_karynaku; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_oronok_tornheart"; - newscript->pGossipHello = &GossipHello_npc_oronok_tornheart; - newscript->pGossipSelect = &GossipSelect_npc_oronok_tornheart; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_wilda"; - newscript->GetAI = &GetAI_npc_wilda; - newscript->pQuestAcceptNPC = &QuestAccept_npc_wilda; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_lord_illidan_stormrage"; - newscript->GetAI = &GetAI_npc_lord_illidan_stormrage; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "mob_torloth"; - newscript->GetAI = &GetAI_mob_torloth; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_totem_of_spirits"; - newscript->GetAI = &GetAI_npc_totem_of_spirits; - newscript->pEffectDummyNPC = &EffectDummyCreature_npc_totem_of_spirits; - newscript->pEffectAuraDummy = &EffectAuraDummy_npc_totem_of_spirits; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "event_spell_soul_captured_credit"; - newscript->pProcessEventId = &ProcessEventId_event_spell_soul_captured_credit; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "go_crystal_prison"; - newscript->pQuestAcceptGO = &GOQuestAccept_GO_crystal_prison; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "mob_mature_netherwing_drake"; + pNewScript->GetAI = &GetAI_mob_mature_netherwing_drake; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "mob_enslaved_netherwing_drake"; + pNewScript->GetAI = &GetAI_mob_enslaved_netherwing_drake; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_dragonmaw_peon"; + pNewScript->GetAI = &GetAI_npc_dragonmaw_peon; + pNewScript->pEffectDummyNPC = &EffectDummyCreature_npc_dragonmaw_peon; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_drake_dealer_hurlunk"; + pNewScript->pGossipHello = &GossipHello_npc_drake_dealer_hurlunk; + pNewScript->pGossipSelect = &GossipSelect_npc_drake_dealer_hurlunk; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_karynaku"; + pNewScript->pQuestAcceptNPC = &QuestAccept_npc_karynaku; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_wilda"; + pNewScript->GetAI = &GetAI_npc_wilda; + pNewScript->pQuestAcceptNPC = &QuestAccept_npc_wilda; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_lord_illidan_stormrage"; + pNewScript->GetAI = &GetAI_npc_lord_illidan_stormrage; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "mob_torloth"; + pNewScript->GetAI = &GetAI_mob_torloth; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_totem_of_spirits"; + pNewScript->GetAI = &GetAI_npc_totem_of_spirits; + pNewScript->pEffectDummyNPC = &EffectDummyCreature_npc_totem_of_spirits; + pNewScript->pEffectAuraDummy = &EffectAuraDummy_npc_totem_of_spirits; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "event_spell_soul_captured_credit"; + pNewScript->pProcessEventId = &ProcessEventId_event_spell_soul_captured_credit; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "go_crystal_prison"; + pNewScript->pQuestAcceptGO = &GOQuestAccept_GO_crystal_prison; + pNewScript->RegisterSelf(); } diff --git a/scripts/outland/shattrath_city.cpp b/scripts/outland/shattrath_city.cpp index 82ec1f032..05f7ee259 100644 --- a/scripts/outland/shattrath_city.cpp +++ b/scripts/outland/shattrath_city.cpp @@ -17,19 +17,16 @@ /* ScriptData SDName: Shattrath_City SD%Complete: 100 -SDComment: Quest support: 10004, 10009, 10211, 10231. Flask vendors, Teleport to Caverns of Time +SDComment: Quest support: 10004, 10231. Flask vendors SDCategory: Shattrath City EndScriptData */ /* ContentData npc_dirty_larry npc_ishanah -npc_khadgar npc_khadgars_servant -npc_raliq_the_drunk npc_salsalabim npc_shattrathflaskvendors -npc_zephyr EndContentData */ #include "precompiled.h" @@ -258,70 +255,6 @@ CreatureAI* GetAI_npc_dirty_larry(Creature* pCreature) return new npc_dirty_larryAI(pCreature); } -/*###### -## npc_khadgar -######*/ - -enum -{ - QUEST_CITY_LIGHT = 10211, -}; - -#define KHADGAR_GOSSIP_1 "I've heard your name spoken only in whispers, mage. Who are you?" -#define KHADGAR_GOSSIP_2 "Go on, please." -#define KHADGAR_GOSSIP_3 "I see." -#define KHADGAR_GOSSIP_4 "What did you do then?" -#define KHADGAR_GOSSIP_5 "What happened next?" -#define KHADGAR_GOSSIP_7 "There was something else I wanted to ask you." - -bool GossipHello_npc_khadgar(Player* pPlayer, Creature* pCreature) -{ - if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); - - if (pPlayer->GetQuestRewardStatus(QUEST_CITY_LIGHT)) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, KHADGAR_GOSSIP_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - - pPlayer->SEND_GOSSIP_MENU(9243, pCreature->GetObjectGuid()); - return true; -} - -bool GossipSelect_npc_khadgar(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) -{ - switch(uiAction) - { - case GOSSIP_ACTION_INFO_DEF+1: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, KHADGAR_GOSSIP_2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); - pPlayer->SEND_GOSSIP_MENU(9876, pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF+2: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, KHADGAR_GOSSIP_3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3); - pPlayer->SEND_GOSSIP_MENU(9877, pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF+3: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, KHADGAR_GOSSIP_4, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+4); - pPlayer->SEND_GOSSIP_MENU(9878, pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF+4: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, KHADGAR_GOSSIP_5, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+5); - pPlayer->SEND_GOSSIP_MENU(9879, pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF+5: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, KHADGAR_GOSSIP_3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+6); - pPlayer->SEND_GOSSIP_MENU(9880, pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF+6: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, KHADGAR_GOSSIP_7, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+7); - pPlayer->SEND_GOSSIP_MENU(9881, pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF+7: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, KHADGAR_GOSSIP_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - pPlayer->SEND_GOSSIP_MENU(9243, pCreature->GetObjectGuid()); - break; - } - return true; -} - /*###### ## npc_khadgars_servant ######*/ @@ -371,7 +304,9 @@ enum NPC_ADYRIA = 18596, NPC_ANCHORITE = 19142, NPC_ARCANIST = 18547, - NPC_HAGGARD = 19684 + NPC_HAGGARD = 19684, + + QUEST_CITY_LIGHT = 10211 }; struct MANGOS_DLL_DECL npc_khadgars_servantAI : public npc_escortAI @@ -611,78 +546,6 @@ CreatureAI* GetAI_npc_khadgars_servant(Creature* pCreature) return new npc_khadgars_servantAI(pCreature); } -/*###### -## npc_raliq_the_drunk -######*/ - -enum -{ - SPELL_UPPERCUT = 10966, - QUEST_CRACK_SKULLS = 10009, - FACTION_HOSTILE_RD = 45 -}; - -#define GOSSIP_RALIQ "You owe Sim'salabim money. Hand them over or die!" - -struct MANGOS_DLL_DECL npc_raliq_the_drunkAI : public ScriptedAI -{ - npc_raliq_the_drunkAI(Creature* pCreature) : ScriptedAI(pCreature) - { - m_uiNormFaction = pCreature->getFaction(); - Reset(); - } - - uint32 m_uiNormFaction; - uint32 m_uiUppercut_Timer; - - void Reset() - { - m_uiUppercut_Timer = 5000; - - if (m_creature->getFaction() != m_uiNormFaction) - m_creature->setFaction(m_uiNormFaction); - } - - void UpdateAI(const uint32 diff) - { - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - if (m_uiUppercut_Timer < diff) - { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_UPPERCUT); - m_uiUppercut_Timer = 15000; - }else m_uiUppercut_Timer -= diff; - - DoMeleeAttackIfReady(); - } -}; - -CreatureAI* GetAI_npc_raliq_the_drunk(Creature* pCreature) -{ - return new npc_raliq_the_drunkAI(pCreature); -} - -bool GossipHello_npc_raliq_the_drunk(Player* pPlayer, Creature* pCreature) -{ - if (pPlayer->GetQuestStatus(QUEST_CRACK_SKULLS) == QUEST_STATUS_INCOMPLETE) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_RALIQ, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - - pPlayer->SEND_GOSSIP_MENU(9440, pCreature->GetObjectGuid()); - return true; -} - -bool GossipSelect_npc_raliq_the_drunk(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) -{ - if (uiAction == GOSSIP_ACTION_INFO_DEF+1) - { - pPlayer->CLOSE_GOSSIP_MENU(); - pCreature->setFaction(FACTION_HOSTILE_RD); - pCreature->AI()->AttackStart(pPlayer); - } - return true; -} - /*###### # npc_salsalabim ######*/ @@ -803,72 +666,31 @@ bool GossipSelect_npc_shattrathflaskvendors(Player* pPlayer, Creature* pCreature return true; } -/*###### -# npc_zephyr -######*/ - -bool GossipHello_npc_zephyr(Player* pPlayer, Creature* pCreature) -{ - if (pPlayer->GetReputationRank(989) >= REP_REVERED) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Take me to the Caverns of Time.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); - - return true; -} - -bool GossipSelect_npc_zephyr(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) -{ - if (uiAction == GOSSIP_ACTION_INFO_DEF+1) - pPlayer->CastSpell(pPlayer,37778,false); - - return true; -} - void AddSC_shattrath_city() { - Script *newscript; - - newscript = new Script; - newscript->Name = "npc_dirty_larry"; - newscript->GetAI = &GetAI_npc_dirty_larry; - newscript->pGossipHello = &GossipHello_npc_dirty_larry; - newscript->pGossipSelect = &GossipSelect_npc_dirty_larry; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_khadgar"; - newscript->pGossipHello = &GossipHello_npc_khadgar; - newscript->pGossipSelect = &GossipSelect_npc_khadgar; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_khadgars_servant"; - newscript->GetAI = &GetAI_npc_khadgars_servant; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_raliq_the_drunk"; - newscript->GetAI = &GetAI_npc_raliq_the_drunk; - newscript->pGossipHello = &GossipHello_npc_raliq_the_drunk; - newscript->pGossipSelect = &GossipSelect_npc_raliq_the_drunk; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_salsalabim"; - newscript->GetAI = &GetAI_npc_salsalabim; - newscript->pGossipHello = &GossipHello_npc_salsalabim; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_shattrathflaskvendors"; - newscript->pGossipHello = &GossipHello_npc_shattrathflaskvendors; - newscript->pGossipSelect = &GossipSelect_npc_shattrathflaskvendors; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_zephyr"; - newscript->pGossipHello = &GossipHello_npc_zephyr; - newscript->pGossipSelect = &GossipSelect_npc_zephyr; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "npc_dirty_larry"; + pNewScript->GetAI = &GetAI_npc_dirty_larry; + pNewScript->pGossipHello = &GossipHello_npc_dirty_larry; + pNewScript->pGossipSelect = &GossipSelect_npc_dirty_larry; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_khadgars_servant"; + pNewScript->GetAI = &GetAI_npc_khadgars_servant; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_salsalabim"; + pNewScript->GetAI = &GetAI_npc_salsalabim; + pNewScript->pGossipHello = &GossipHello_npc_salsalabim; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_shattrathflaskvendors"; + pNewScript->pGossipHello = &GossipHello_npc_shattrathflaskvendors; + pNewScript->pGossipSelect = &GossipSelect_npc_shattrathflaskvendors; + pNewScript->RegisterSelf(); } diff --git a/scripts/outland/terokkar_forest.cpp b/scripts/outland/terokkar_forest.cpp index 686440a6a..350c27688 100644 --- a/scripts/outland/terokkar_forest.cpp +++ b/scripts/outland/terokkar_forest.cpp @@ -17,7 +17,7 @@ /* ScriptData SDName: Terokkar_Forest SD%Complete: 80 -SDComment: Quest support: 9889, 10009, 10873, 10896, 10446/10447, 10852, 10887, 10922, 11096, 11093, 10051, 10052. Skettis->Ogri'la Flight +SDComment: Quest support: 9889, 10009, 10873, 10896, 10446/10447, 10852, 10887, 10922, 11096, 11093, 10051, 10052. SDCategory: Terokkar Forest EndScriptData */ @@ -32,7 +32,6 @@ npc_hungry_nether_ray npc_letoll npc_mana_bomb_exp_trigger go_mana_bomb -npc_skyguard_handler_deesak npc_slim go_veil_skith_cage npc_captive_child @@ -369,24 +368,16 @@ CreatureAI* GetAI_npc_akuno(Creature* pCreature) } /*###### -## npc_floon -- TODO move to EventAI and WorldDB (gossip) +## npc_floon -- TODO move to EventAI ######*/ enum { - SAY_FLOON_ATTACK = -1000195, - SPELL_SILENCE = 6726, SPELL_FROSTBOLT = 9672, SPELL_FROST_NOVA = 11831, - - FACTION_HOSTILE_FL = 1738, - QUEST_CRACK_SKULLS = 10009 }; -#define GOSSIP_FLOON1 "You owe Sim'salabim money. Hand them over or die!" -#define GOSSIP_FLOON2 "Hand over the money or die...again!" - struct MANGOS_DLL_DECL npc_floonAI : public ScriptedAI { npc_floonAI(Creature* pCreature) : ScriptedAI(pCreature) @@ -442,61 +433,6 @@ CreatureAI* GetAI_npc_floon(Creature* pCreature) return new npc_floonAI(pCreature); } -bool GossipHello_npc_floon(Player* pPlayer, Creature* pCreature) -{ - if (pPlayer->GetQuestStatus(QUEST_CRACK_SKULLS) == QUEST_STATUS_INCOMPLETE) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_FLOON1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF); - - pPlayer->SEND_GOSSIP_MENU(9442, pCreature->GetObjectGuid()); - return true; -} - -bool GossipSelect_npc_floon(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) -{ - if (uiAction == GOSSIP_ACTION_INFO_DEF) - { - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_FLOON2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - pPlayer->SEND_GOSSIP_MENU(9443, pCreature->GetObjectGuid()); - } - if (uiAction == GOSSIP_ACTION_INFO_DEF+1) - { - pPlayer->CLOSE_GOSSIP_MENU(); - pCreature->setFaction(FACTION_HOSTILE_FL); - DoScriptText(SAY_FLOON_ATTACK, pCreature, pPlayer); - pCreature->AI()->AttackStart(pPlayer); - } - return true; -} - -/*###### -## npc_skyguard_handler_deesak -- TODO move to WorldDB (gossip) -######*/ - -#define GOSSIP_SKYGUARD "Fly me to Ogri'la please" - -bool GossipHello_npc_skyguard_handler_deesak(Player* pPlayer, Creature* pCreature) -{ - if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); - - if (pPlayer->GetReputationRank(1031) >= REP_HONORED) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SKYGUARD, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); - - return true; -} - -bool GossipSelect_npc_skyguard_handler_deesak(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) -{ - if (uiAction == GOSSIP_ACTION_INFO_DEF+1) - { - pPlayer->CLOSE_GOSSIP_MENU(); - pPlayer->CastSpell(pPlayer,41279,true); //TaxiPath 705 (Taxi - Skettis to Skyguard Outpost) - } - return true; -} - /*###### ## npc_hungry_nether_ray ######*/ @@ -1173,8 +1109,6 @@ void AddSC_terokkar_forest() pNewScript = new Script; pNewScript->Name = "npc_floon"; pNewScript->GetAI = &GetAI_npc_floon; - pNewScript->pGossipHello = &GossipHello_npc_floon; - pNewScript->pGossipSelect = &GossipSelect_npc_floon; pNewScript->RegisterSelf(); pNewScript = new Script; @@ -1198,12 +1132,6 @@ void AddSC_terokkar_forest() pNewScript->pGOUse = &GOUse_go_mana_bomb; pNewScript->RegisterSelf(); - pNewScript = new Script; - pNewScript->Name = "npc_skyguard_handler_deesak"; - pNewScript->pGossipHello = &GossipHello_npc_skyguard_handler_deesak; - pNewScript->pGossipSelect = &GossipSelect_npc_skyguard_handler_deesak; - pNewScript->RegisterSelf(); - pNewScript = new Script; pNewScript->Name = "npc_slim"; pNewScript->pGossipHello = &GossipHello_npc_slim; diff --git a/scripts/outland/zangarmarsh.cpp b/scripts/outland/zangarmarsh.cpp index df15961fc..69caff32c 100644 --- a/scripts/outland/zangarmarsh.cpp +++ b/scripts/outland/zangarmarsh.cpp @@ -17,17 +17,14 @@ /* ScriptData SDName: Zangarmarsh SD%Complete: 100 -SDComment: Quest support: 9752, 9785, 9803, 10009. Mark Of ... buffs. +SDComment: Quest support: 9752, 9785, 10009. Mark Of ... buffs. SDCategory: Zangarmarsh EndScriptData */ /* ContentData npcs_ashyen_and_keleth npc_cooshcoosh -npc_elder_kuruti npc_kayra_longmane -npc_mortog_steamhead -npc_timothy_daniels event_stormcrow EndContentData */ @@ -119,12 +116,8 @@ bool GossipSelect_npcs_ashyen_and_keleth(Player* pPlayer, Creature* pCreature, u enum { SPELL_LIGHTNING_BOLT = 9532, - QUEST_CRACK_SKULLS = 10009, - FACTION_HOSTILE_CO = 45 }; -#define GOSSIP_COOSH "You owe Sim'salabim money. Hand them over or die!" - struct MANGOS_DLL_DECL npc_cooshcooshAI : public ScriptedAI { npc_cooshcooshAI(Creature* pCreature) : ScriptedAI(pCreature) @@ -164,71 +157,6 @@ CreatureAI* GetAI_npc_cooshcoosh(Creature* pCreature) return new npc_cooshcooshAI(pCreature); } -bool GossipHello_npc_cooshcoosh(Player* pPlayer, Creature* pCreature) -{ - if (pPlayer->GetQuestStatus(QUEST_CRACK_SKULLS) == QUEST_STATUS_INCOMPLETE) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_COOSH, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF); - - pPlayer->SEND_GOSSIP_MENU(9441, pCreature->GetObjectGuid()); - return true; -} - -bool GossipSelect_npc_cooshcoosh(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) -{ - if (uiAction == GOSSIP_ACTION_INFO_DEF) - { - pPlayer->CLOSE_GOSSIP_MENU(); - pCreature->setFaction(FACTION_HOSTILE_CO); - pCreature->AI()->AttackStart(pPlayer); - } - return true; -} - -/*###### -## npc_elder_kuruti -######*/ - -#define GOSSIP_ITEM_KUR1 "Offer treat" -#define GOSSIP_ITEM_KUR2 "Im a messenger for Draenei" -#define GOSSIP_ITEM_KUR3 "Get message" - -bool GossipHello_npc_elder_kuruti(Player* pPlayer, Creature* pCreature) -{ - if (pPlayer->GetQuestStatus(9803) == QUEST_STATUS_INCOMPLETE) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KUR1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF); - - pPlayer->SEND_GOSSIP_MENU(9226, pCreature->GetObjectGuid()); - - return true; -} - -bool GossipSelect_npc_elder_kuruti(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) -{ - switch(uiAction) - { - case GOSSIP_ACTION_INFO_DEF: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KUR2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); - pPlayer->SEND_GOSSIP_MENU(9227, pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF + 1: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KUR3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); - pPlayer->SEND_GOSSIP_MENU(9229, pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF + 2: - { - if (!pPlayer->HasItemCount(24573,1)) - { - if (Item* pItem = pPlayer->StoreNewItemInInventorySlot(24573, 1)) - pPlayer->SendNewItem(pItem, 1, true, false); - } - - pPlayer->SEND_GOSSIP_MENU(9231, pCreature->GetObjectGuid()); - break; - } - } - return true; -} - /*##### ## npc_kayra_longmane #####*/ @@ -301,69 +229,6 @@ CreatureAI* GetAI_npc_kayra_longmane(Creature* pCreature) return new npc_kayra_longmaneAI(pCreature); } -/*###### -## npc_mortog_steamhead -######*/ - -bool GossipHello_npc_mortog_steamhead(Player* pPlayer, Creature* pCreature) -{ - if (pCreature->isVendor() && pPlayer->GetReputationRank(942) == REP_EXALTED) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_VENDOR, GOSSIP_TEXT_BROWSE_GOODS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE); - - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); - - return true; -} - -bool GossipSelect_npc_mortog_steamhead(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) -{ - if (uiAction == GOSSIP_ACTION_TRADE) - { - pPlayer->SEND_VENDORLIST(pCreature->GetObjectGuid()); - } - return true; -} - -/*###### -## npc_timothy_daniels -######*/ - -#define GOSSIP_TIMOTHY_DANIELS_ITEM1 "Specialist, eh? Just what kind of specialist are you, anyway?" -#define GOSSIP_TEXT_BROWSE_POISONS "Let me browse your reagents and poison supplies." - -enum -{ - GOSSIP_TEXTID_TIMOTHY_DANIELS1 = 9239 -}; - -bool GossipHello_npc_timothy_daniels(Player* pPlayer, Creature* pCreature) -{ - if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); - - if (pCreature->isVendor()) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_VENDOR, GOSSIP_TEXT_BROWSE_POISONS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE); - - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TIMOTHY_DANIELS_ITEM1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); - return true; -} - -bool GossipSelect_npc_timothy_daniels(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) -{ - switch(uiAction) - { - case GOSSIP_ACTION_INFO_DEF+1: - pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_TIMOTHY_DANIELS1, pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_TRADE: - pPlayer->SEND_VENDORLIST(pCreature->GetObjectGuid()); - break; - } - - return true; -} - /*###### ## event_stormcrow ######*/ @@ -387,47 +252,27 @@ bool ProcessEventId_event_taxi_stormcrow(uint32 uiEventId, Object* pSource, Obje void AddSC_zangarmarsh() { - Script *newscript; - - newscript = new Script; - newscript->Name = "npcs_ashyen_and_keleth"; - newscript->pGossipHello = &GossipHello_npcs_ashyen_and_keleth; - newscript->pGossipSelect = &GossipSelect_npcs_ashyen_and_keleth; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_cooshcoosh"; - newscript->GetAI = &GetAI_npc_cooshcoosh; - newscript->pGossipHello = &GossipHello_npc_cooshcoosh; - newscript->pGossipSelect = &GossipSelect_npc_cooshcoosh; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_elder_kuruti"; - newscript->pGossipHello = &GossipHello_npc_elder_kuruti; - newscript->pGossipSelect = &GossipSelect_npc_elder_kuruti; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_kayra_longmane"; - newscript->GetAI = &GetAI_npc_kayra_longmane; - newscript->pQuestAcceptNPC = &QuestAccept_npc_kayra_longmane; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_mortog_steamhead"; - newscript->pGossipHello = &GossipHello_npc_mortog_steamhead; - newscript->pGossipSelect = &GossipSelect_npc_mortog_steamhead; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_timothy_daniels"; - newscript->pGossipHello = &GossipHello_npc_timothy_daniels; - newscript->pGossipSelect = &GossipSelect_npc_timothy_daniels; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "event_taxi_stormcrow"; - newscript->pProcessEventId = &ProcessEventId_event_taxi_stormcrow; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "npcs_ashyen_and_keleth"; + pNewScript->pGossipHello = &GossipHello_npcs_ashyen_and_keleth; + pNewScript->pGossipSelect = &GossipSelect_npcs_ashyen_and_keleth; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_cooshcoosh"; + pNewScript->GetAI = &GetAI_npc_cooshcoosh; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_kayra_longmane"; + pNewScript->GetAI = &GetAI_npc_kayra_longmane; + pNewScript->pQuestAcceptNPC = &QuestAccept_npc_kayra_longmane; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "event_taxi_stormcrow"; + pNewScript->pProcessEventId = &ProcessEventId_event_taxi_stormcrow; + pNewScript->RegisterSelf(); } diff --git a/scripts/world/npcs_special.cpp b/scripts/world/npcs_special.cpp index 31a85d3b9..118a9b84e 100644 --- a/scripts/world/npcs_special.cpp +++ b/scripts/world/npcs_special.cpp @@ -36,13 +36,11 @@ npc_garments_of_quests 80% NPC's related to all Garments of-quests 5621, 56 npc_injured_patient 100% patients for triage-quests (6622 and 6624) npc_doctor 100% Gustaf Vanhowzen and Gregory Victor, quest 6622 and 6624 (Triage) npc_innkeeper 25% ScriptName not assigned. Innkeepers in general. -npc_kingdom_of_dalaran_quests Misc NPC's gossip option related to quests 12791, 12794 and 12796 npc_lunaclaw_spirit 100% Appears at two different locations, quest 6001/6002 npc_mount_vendor 100% Regular mount vendors all over the world. Display gossip if player doesn't meet the requirements to buy npc_rogue_trainer 80% Scripted trainers, so they are able to offer item 17126 for class quest 6681 npc_sayge 100% Darkmoon event fortune teller, buff player based on answers given npc_tabard_vendor 50% allow recovering quest related tabards, achievement related ones need core support -npc_locksmith 75% list of keys needs to be confirmed EndContentData */ /*######## @@ -1100,44 +1098,6 @@ bool GossipSelect_npc_innkeeper(Player* pPlayer, Creature* pCreature, uint32 uiS return true; } -/*###### -## npc_kingdom_of_dalaran_quests -######*/ - -enum -{ - SPELL_TELEPORT_DALARAN = 53360, - ITEM_KT_SIGNET = 39740, - QUEST_MAGICAL_KINGDOM_A = 12794, - QUEST_MAGICAL_KINGDOM_H = 12791, - QUEST_MAGICAL_KINGDOM_N = 12796 -}; - -#define GOSSIP_ITEM_TELEPORT_TO "I am ready to be teleported to Dalaran." - -bool GossipHello_npc_kingdom_of_dalaran_quests(Player* pPlayer, Creature* pCreature) -{ - if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); - - if (pPlayer->HasItemCount(ITEM_KT_SIGNET,1) && (!pPlayer->GetQuestRewardStatus(QUEST_MAGICAL_KINGDOM_A) || - !pPlayer->GetQuestRewardStatus(QUEST_MAGICAL_KINGDOM_H) || !pPlayer->GetQuestRewardStatus(QUEST_MAGICAL_KINGDOM_N))) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_TELEPORT_TO, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); - return true; -} - -bool GossipSelect_npc_kingdom_of_dalaran_quests(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) -{ - if (uiAction == GOSSIP_ACTION_INFO_DEF+1) - { - pPlayer->CLOSE_GOSSIP_MENU(); - pPlayer->CastSpell(pPlayer,SPELL_TELEPORT_DALARAN,false); - } - return true; -} - /*###### ## npc_lunaclaw_spirit ######*/ @@ -1597,109 +1557,6 @@ bool GossipSelect_npc_tabard_vendor(Player* pPlayer, Creature* pCreature, uint32 return true; } -/*###### -## npc_locksmith -######*/ - -enum -{ - QUEST_HOW_TO_BRAKE_IN_TO_THE_ARCATRAZ = 10704, - QUEST_DARK_IRON_LEGACY = 3802, - QUEST_THE_KEY_TO_SCHOLOMANCE_A = 5505, - QUEST_THE_KEY_TO_SCHOLOMANCE_H = 5511, - QUEST_HOTTER_THAN_HELL_A = 10758, - QUEST_HOTTER_THAN_HELL_H = 10764, - QUEST_RETURN_TO_KHAGDAR = 9837, - QUEST_CONTAINMENT = 13159, - - ITEM_ARCATRAZ_KEY = 31084, - ITEM_SHADOWFORGE_KEY = 11000, - ITEM_SKELETON_KEY = 13704, - ITEM_SHATTERED_HALLS_KEY = 28395, - ITEM_THE_MASTERS_KEY = 24490, - ITEM_VIOLET_HOLD_KEY = 42482, - - SPELL_ARCATRAZ_KEY = 54881, - SPELL_SHADOWFORGE_KEY = 54882, - SPELL_SKELETON_KEY = 54883, - SPELL_SHATTERED_HALLS_KEY = 54884, - SPELL_THE_MASTERS_KEY = 54885, - SPELL_VIOLET_HOLD_KEY = 67253 -}; - -#define GOSSIP_LOST_ARCATRAZ_KEY "I've lost my key to the Arcatraz." -#define GOSSIP_LOST_SHADOWFORGE_KEY "I've lost my key to the Blackrock Depths." -#define GOSSIP_LOST_SKELETON_KEY "I've lost my key to the Scholomance." -#define GOSSIP_LOST_SHATTERED_HALLS_KEY "I've lost my key to the Shattered Halls." -#define GOSSIP_LOST_THE_MASTERS_KEY "I've lost my key to the Karazhan." -#define GOSSIP_LOST_VIOLET_HOLD_KEY "I've lost my key to the Violet Hold." - -bool GossipHello_npc_locksmith(Player* pPlayer, Creature* pCreature) -{ - - // Arcatraz Key - if (pPlayer->GetQuestRewardStatus(QUEST_HOW_TO_BRAKE_IN_TO_THE_ARCATRAZ) && !pPlayer->HasItemCount(ITEM_ARCATRAZ_KEY, 1, true)) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LOST_ARCATRAZ_KEY, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF +1); - - // Shadowforge Key - if (pPlayer->GetQuestRewardStatus(QUEST_DARK_IRON_LEGACY) && !pPlayer->HasItemCount(ITEM_SHADOWFORGE_KEY, 1, true)) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LOST_SHADOWFORGE_KEY, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF +2); - - // Skeleton Key - if ((pPlayer->GetQuestRewardStatus(QUEST_THE_KEY_TO_SCHOLOMANCE_A) || pPlayer->GetQuestRewardStatus(QUEST_THE_KEY_TO_SCHOLOMANCE_H)) && - !pPlayer->HasItemCount(ITEM_SKELETON_KEY, 1, true)) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LOST_SKELETON_KEY, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF +3); - - // Shatered Halls Key - if ((pPlayer->GetQuestRewardStatus(QUEST_HOTTER_THAN_HELL_A) || pPlayer->GetQuestRewardStatus(QUEST_HOTTER_THAN_HELL_H)) && - !pPlayer->HasItemCount(ITEM_SHATTERED_HALLS_KEY, 1, true)) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LOST_SHATTERED_HALLS_KEY, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF +4); - - // Master's Key - if (pPlayer->GetQuestRewardStatus(QUEST_RETURN_TO_KHAGDAR) && !pPlayer->HasItemCount(ITEM_THE_MASTERS_KEY, 1, true)) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LOST_THE_MASTERS_KEY, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF +5); - - // Violet Hold Key - if (pPlayer->GetQuestRewardStatus(QUEST_CONTAINMENT) && !pPlayer->HasItemCount(ITEM_VIOLET_HOLD_KEY, 1, true)) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LOST_VIOLET_HOLD_KEY, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF +6); - - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); - - return true; -} - -bool GossipSelect_npc_locksmith(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) -{ - switch(uiAction) - { - case GOSSIP_ACTION_INFO_DEF+1: - pPlayer->CLOSE_GOSSIP_MENU(); - pPlayer->CastSpell(pPlayer, SPELL_ARCATRAZ_KEY, false); - break; - case GOSSIP_ACTION_INFO_DEF+2: - pPlayer->CLOSE_GOSSIP_MENU(); - pPlayer->CastSpell(pPlayer, SPELL_SHADOWFORGE_KEY, false); - break; - case GOSSIP_ACTION_INFO_DEF+3: - pPlayer->CLOSE_GOSSIP_MENU(); - pPlayer->CastSpell(pPlayer, SPELL_SKELETON_KEY, false); - break; - case GOSSIP_ACTION_INFO_DEF+4: - pPlayer->CLOSE_GOSSIP_MENU(); - pPlayer->CastSpell(pPlayer, SPELL_SHATTERED_HALLS_KEY, false); - break; - case GOSSIP_ACTION_INFO_DEF+5: - pPlayer->CLOSE_GOSSIP_MENU(); - pPlayer->CastSpell(pPlayer, SPELL_THE_MASTERS_KEY, false); - break; - case GOSSIP_ACTION_INFO_DEF+6: - pPlayer->CLOSE_GOSSIP_MENU(); - pPlayer->CastSpell(pPlayer, SPELL_VIOLET_HOLD_KEY, false); - break; - } - return true; -} - void AddSC_npcs_special() { Script* newscript; @@ -1748,12 +1605,6 @@ void AddSC_npcs_special() newscript->pGossipSelect = &GossipSelect_npc_innkeeper; newscript->RegisterSelf(false); // script and error report disabled, but script can be used for custom needs, adding ScriptName - newscript = new Script; - newscript->Name = "npc_kingdom_of_dalaran_quests"; - newscript->pGossipHello = &GossipHello_npc_kingdom_of_dalaran_quests; - newscript->pGossipSelect = &GossipSelect_npc_kingdom_of_dalaran_quests; - newscript->RegisterSelf(); - newscript = new Script; newscript->Name = "npc_lunaclaw_spirit"; newscript->pGossipHello = &GossipHello_npc_lunaclaw_spirit; @@ -1783,10 +1634,4 @@ void AddSC_npcs_special() newscript->pGossipHello = &GossipHello_npc_tabard_vendor; newscript->pGossipSelect = &GossipSelect_npc_tabard_vendor; newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_locksmith"; - newscript->pGossipHello = &GossipHello_npc_locksmith; - newscript->pGossipSelect = &GossipSelect_npc_locksmith; - newscript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 164757058..6d09698ac 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2313" + #define SD2_REVISION_NR "2314" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index a1364f69d..ca79b9ebb 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -129,7 +129,6 @@ UPDATE creature_template SET ScriptName='npc_chicken_cluck' WHERE entry=620; UPDATE creature_template SET ScriptName='npc_dancing_flames' WHERE entry=25305; UPDATE creature_template SET ScriptName='npc_garments_of_quests' WHERE entry IN (12429,12423,12427,12430,12428); UPDATE creature_template SET ScriptName='npc_guardian' WHERE entry=5764; -UPDATE creature_template SET ScriptName='npc_kingdom_of_dalaran_quests' WHERE entry IN (29169,23729,26673,27158,29158,29161,26471,29155,29159,29160,29162); UPDATE creature_template SET ScriptName='npc_lunaclaw_spirit' WHERE entry=12144; UPDATE creature_template SET ScriptName='npc_mount_vendor' WHERE entry IN (384,1261,1460,2357,3362,3685,4730,4731,4885,7952,7955,16264,17584); UPDATE creature_template SET ScriptName='npc_doctor' WHERE entry IN (12939,12920); @@ -141,7 +140,6 @@ UPDATE creature_template SET ScriptName='npc_prof_tailor' WHERE entry IN (22208, UPDATE creature_template SET ScriptName='npc_rogue_trainer' WHERE entry IN (918,4163,3328,4583,5165,5167,13283,16684); UPDATE creature_template SET ScriptName='npc_sayge' WHERE entry=14822; UPDATE creature_template SET ScriptName='npc_tabard_vendor' WHERE entry=28776; -UPDATE creature_template SET ScriptName='npc_locksmith' WHERE entry IN (29665,29725,29728); -- disabled, but can be used for custom -- UPDATE creature_template SET ScriptName='' WHERE npcflag!=npcflag|65536 AND ScriptName='npc_innkeeper'; -- UPDATE creature_template SET ScriptName='npc_innkeeper' WHERE npcflag=npcflag|65536; @@ -223,7 +221,7 @@ UPDATE creature_template SET ScriptName='boss_ambassador_hellmaw' WHERE entry=18 /* AHN'KAHET */ UPDATE creature_template SET ScriptName='boss_jedoga' WHERE entry=29310; UPDATE creature_template SET ScriptName='boss_nadox' WHERE entry=29309; -UPDATE creature_template SET ScriptName = 'mob_ahnkahar_egg' WHERE entry IN (30172,30173); +UPDATE creature_template SET ScriptName='mob_ahnkahar_egg' WHERE entry IN (30172,30173); UPDATE creature_template SET ScriptName='boss_taldaram' WHERE entry=29308; UPDATE gameobject_template SET ScriptName='go_nerubian_device' WHERE entry IN (193093,193094); UPDATE creature_template SET ScriptName='boss_volazj' WHERE entry=29311; @@ -362,9 +360,6 @@ UPDATE creature_template SET ScriptName='boss_nefarian' WHERE entry=11583; UPDATE creature_template SET ScriptName='mobs_bladespire_ogre' WHERE entry IN (19998,20334,21296,21975); UPDATE creature_template SET ScriptName='mobs_nether_drake' WHERE entry IN (20021,21817,21820,21821,21823); UPDATE creature_template SET ScriptName='npc_daranelle' WHERE entry=21469; -UPDATE creature_template SET ScriptName='npc_overseer_nuaar' WHERE entry=21981; -UPDATE creature_template SET ScriptName='npc_saikkal_the_elder' WHERE entry=22932; -UPDATE creature_template SET ScriptName='npc_skyguard_handler_deesak' WHERE entry=23415; /* BLASTED LANDS */ UPDATE creature_template SET ScriptName='npc_deathly_usher' WHERE entry=8816; @@ -375,15 +370,10 @@ UPDATE creature_template SET ScriptName='mob_webbed_creature' WHERE entry=17680; UPDATE creature_template SET ScriptName='npc_captured_sunhawk_agent' WHERE entry=17824; /* BOREAN TUNDRA */ -UPDATE creature_template SET ScriptName='npc_fizzcrank_fullthrottle' WHERE entry=25590; -UPDATE creature_template SET ScriptName='npc_iruk' WHERE entry=26219; -UPDATE creature_template SET ScriptName='npc_kara_thricestar' WHERE entry=26602; UPDATE creature_template SET ScriptName='npc_nesingwary_trapper' WHERE entry=25835; UPDATE creature_template SET ScriptName='npc_oil_stained_wolf' WHERE entry=25791; UPDATE gameobject_template SET ScriptName='go_caribou_trap' WHERE entry IN (187982,187995,187996,187997,187998,187999,188000,188001,188002,188003,188004,188005,188006,188007,188008); UPDATE creature_template SET ScriptName='npc_sinkhole_kill_credit' WHERE entry IN (26248,26249); -UPDATE creature_template SET ScriptName='npc_surristrasz' WHERE entry=24795; -UPDATE creature_template SET ScriptName='npc_tiare' WHERE entry=30051; UPDATE creature_template SET ScriptName='npc_lurgglbr' WHERE entry=25208; /* BURNING STEPPES */ @@ -495,7 +485,6 @@ UPDATE creature_template SET ScriptName='boss_eydis' WHERE entry=34496; /* DALARAN */ UPDATE creature_template SET ScriptName='npc_dalaran_guardian_mage' WHERE entry IN (29255, 29254); -UPDATE creature_template SET ScriptName='npc_zidormi' WHERE entry=31848; /* DARKSHORE */ UPDATE creature_template SET ScriptName='npc_kerlonian' WHERE entry=11218; @@ -522,7 +511,6 @@ UPDATE instance_template SET ScriptName='instance_dire_maul' WHERE map=429; /* DRAGONBLIGHT */ UPDATE creature_template SET ScriptName='npc_afrasastrasz' WHERE entry=27575; -UPDATE creature_template SET ScriptName='npc_alexstrasza_wr_gate' WHERE entry=31333; UPDATE creature_template SET ScriptName='npc_destructive_ward' WHERE entry=27430; UPDATE creature_template SET ScriptName='npc_tariolstrasz' WHERE entry=26443; UPDATE creature_template SET ScriptName='npc_torastrasza' WHERE entry=26949; @@ -551,7 +539,6 @@ UPDATE creature_template SET ScriptName='npc_lady_jaina_proudmoore' WHERE entry= UPDATE creature_template SET ScriptName='npc_ogron' WHERE entry=4983; UPDATE creature_template SET ScriptName='npc_morokk' WHERE entry=4500; UPDATE creature_template SET ScriptName='npc_nat_pagle' WHERE entry=12919; -UPDATE creature_template SET ScriptName='npc_cassa_crimsonwing' WHERE entry=23704; UPDATE creature_template SET ScriptName='npc_restless_apparition' WHERE entry=23861; UPDATE creature_template SET ScriptName='npc_private_hendel' WHERE entry=4966; DELETE FROM scripted_areatrigger WHERE entry=4752; @@ -674,15 +661,9 @@ UPDATE creature_template SET ScriptName='mob_hellfire_channeler' WHERE entry=172 /* HELLFIRE PENINSULA */ UPDATE creature_template SET ScriptName='boss_doomlord_kazzak' WHERE entry=18728; UPDATE creature_template SET ScriptName='npc_aeranas' WHERE entry=17085; -UPDATE gameobject_template SET ScriptName='go_haaleshi_altar' WHERE entry=181606; UPDATE creature_template SET ScriptName='npc_ancestral_wolf' WHERE entry=17077; UPDATE creature_template SET ScriptName='npc_demoniac_scryer' WHERE entry=22258; -UPDATE creature_template SET ScriptName='npc_gryphoneer_windbellow' WHERE entry=20235; -UPDATE creature_template SET ScriptName='npc_naladu' WHERE entry=19361; UPDATE creature_template SET ScriptName='npc_tracy_proudwell' WHERE entry=18266; -UPDATE creature_template SET ScriptName='npc_trollbane' WHERE entry=16819; -UPDATE creature_template SET ScriptName='npc_wing_commander_brack' WHERE entry=19401; -UPDATE creature_template SET ScriptName='npc_wing_commander_dabiree' WHERE entry=19409; UPDATE creature_template SET ScriptName='npc_wounded_blood_elf' WHERE entry=16993; /* HILLSBRAD FOOTHILLS */ @@ -827,7 +808,6 @@ UPDATE creature_template SET ScriptName='npc_skorn_whitecloud' WHERE entry=3052; UPDATE creature_template SET ScriptName='mob_lump' WHERE entry=18351; UPDATE creature_template SET ScriptName='npc_altruis_the_sufferer' WHERE entry=18417; UPDATE creature_template SET ScriptName='npc_greatmother_geyah' WHERE entry=18141; -UPDATE creature_template SET ScriptName='npc_lantresor_of_the_blade' WHERE entry=18261; UPDATE creature_template SET ScriptName='npc_maghar_captive' WHERE entry=18210; UPDATE creature_template SET ScriptName='npc_creditmarker_visit_with_ancestors' WHERE entry IN (18840,18841,18842,18843); @@ -864,7 +844,6 @@ UPDATE gameobject_template SET ScriptName='go_manaforge_control_console' WHERE e UPDATE creature_template SET ScriptName='npc_manaforge_control_console' WHERE entry IN (20209,20417,20418,20440); UPDATE creature_template SET ScriptName='npc_commander_dawnforge' WHERE entry=19831; UPDATE creature_template SET ScriptName='npc_protectorate_nether_drake' WHERE entry=20903; -UPDATE creature_template SET ScriptName='npc_veronia' WHERE entry=20162; UPDATE creature_template SET ScriptName='npc_bessy' WHERE entry=20415; UPDATE creature_template SET ScriptName='npc_maxx_a_million' WHERE entry=19589; UPDATE creature_template SET ScriptName='npc_zeppit' WHERE entry=22484; @@ -978,10 +957,6 @@ UPDATE creature_template SET ScriptName='boss_arugal' WHERE entry=4275; UPDATE creature_template SET ScriptName='boss_doomwalker' WHERE entry=17711; UPDATE creature_template SET ScriptName='npc_drake_dealer_hurlunk' WHERE entry=23489; UPDATE creature_template SET ScriptName='npc_dragonmaw_peon' WHERE entry=22252; -UPDATE creature_template SET ScriptName='npcs_flanis_swiftwing_and_kagrosh' WHERE entry IN (21725,21727); -UPDATE creature_template SET ScriptName='npc_murkblood_overseer' WHERE entry=23309; -UPDATE creature_template SET ScriptName='npc_neltharaku' WHERE entry=21657; -UPDATE creature_template SET ScriptName='npc_oronok_tornheart' WHERE entry=21183; UPDATE creature_template SET ScriptName='mob_mature_netherwing_drake' WHERE entry=21648; UPDATE creature_template SET ScriptName='mob_enslaved_netherwing_drake' WHERE entry=21722; UPDATE creature_template SET ScriptName='npc_karynaku' WHERE entry=22112; @@ -999,12 +974,9 @@ UPDATE gameobject_template SET ScriptName='go_crystal_prison' WHERE entry=185126 /* SHATTRATH */ UPDATE creature_template SET ScriptName='npc_dirty_larry' WHERE entry=19720; -UPDATE creature_template SET ScriptName='npc_khadgar' WHERE entry=18166; UPDATE creature_template SET ScriptName='npc_khadgars_servant' WHERE entry=19685; -UPDATE creature_template SET ScriptName='npc_raliq_the_drunk' WHERE entry=18585; UPDATE creature_template SET ScriptName='npc_salsalabim' WHERE entry=18584; UPDATE creature_template SET ScriptName='npc_shattrathflaskvendors' WHERE entry IN (23483,23484); -UPDATE creature_template SET ScriptName='npc_zephyr' WHERE entry=25967; /* SHOLAZAR BASIN */ UPDATE creature_template SET ScriptName='npc_helice' WHERE entry=28787; @@ -1032,10 +1004,6 @@ UPDATE creature_template SET ScriptName='npc_braug_dimspirit' WHERE entry=4489; UPDATE creature_template SET ScriptName='npc_kaya' WHERE entry=11856; /* STORM PEAKS */ -UPDATE creature_template SET ScriptName='npc_loklira_the_crone' WHERE entry=29975; -UPDATE creature_template SET ScriptName='npc_thorim' WHERE entry=29445; -UPDATE creature_template SET ScriptName='npc_roxi_ramrocket' WHERE entry=31247; -UPDATE creature_template SET ScriptName = 'npc_frostborn_scout' WHERE entry = 29811; /* STORMWIND CITY */ UPDATE creature_template SET ScriptName='npc_archmage_malin' WHERE entry=2708; @@ -1105,7 +1073,6 @@ UPDATE creature_template SET ScriptName='mob_aquementas' WHERE entry=9453; UPDATE creature_template SET ScriptName='npc_custodian_of_time' WHERE entry=20129; UPDATE creature_template SET ScriptName='npc_marin_noggenfogger' WHERE entry=7564; UPDATE creature_template SET ScriptName='npc_oox17tn' WHERE entry=7784; -UPDATE creature_template SET ScriptName='npc_steward_of_time' WHERE entry=20142; UPDATE creature_template SET ScriptName='npc_stone_watcher_of_norgannon' WHERE entry=7918; UPDATE creature_template SET ScriptName='npc_tooga' WHERE entry=5955; @@ -1191,7 +1158,6 @@ UPDATE creature_template SET ScriptName='npc_hungry_nether_ray' WHERE entry=2343 UPDATE creature_template SET ScriptName='npc_letoll' WHERE entry=22458; UPDATE creature_template SET ScriptName='npc_mana_bomb_exp_trigger' WHERE entry=20767; UPDATE gameobject_template SET ScriptName='go_mana_bomb' WHERE entry=184725; -UPDATE creature_template SET ScriptName='npc_skyguard_handler_irena' WHERE entry=23413; UPDATE creature_template SET ScriptName='npc_slim' WHERE entry=19679; UPDATE creature_template SET ScriptName='npc_captive_child' WHERE entry=22314; UPDATE creature_template SET ScriptName='npc_isla_starmane' WHERE entry=18760; @@ -1217,7 +1183,6 @@ INSERT INTO scripted_event_id VALUES (2268,'event_spell_altar_boss_aggro'); UPDATE creature_template SET ScriptName='boss_archaedas' WHERE entry=2748; UPDATE creature_template SET ScriptName='mob_archaeras_add' WHERE entry IN (7309,7076,7077,10120); -UPDATE creature_template SET ScriptName='npc_lore_keeper_of_norgannon' WHERE entry=7172; UPDATE instance_template SET ScriptName='instance_uldaman' WHERE map=70; /* */ @@ -1325,10 +1290,7 @@ DELETE FROM scripted_event_id WHERE id=11225; INSERT INTO scripted_event_id VALUES (11225,'event_taxi_stormcrow'); UPDATE creature_template SET ScriptName='npcs_ashyen_and_keleth' WHERE entry IN (17900,17901); UPDATE creature_template SET ScriptName='npc_cooshcoosh' WHERE entry=18586; -UPDATE creature_template SET ScriptName='npc_elder_kuruti' WHERE entry=18197; UPDATE creature_template SET ScriptName='npc_kayra_longmane' WHERE entry=17969; -UPDATE creature_template SET ScriptName='npc_mortog_steamhead' WHERE entry=23373; -UPDATE creature_template SET ScriptName='npc_timothy_daniels' WHERE entry=18019; /* ZUL'AMAN */ UPDATE instance_template SET ScriptName='instance_zulaman' WHERE map=568; diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 59ba0c689..80e692e70 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -159,7 +159,7 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1000194,'I give up! Please don\'t kill me!',0,0,0,0,'unkor SAY_SUBMIT'), -(-1000195,'I choose the third option: KILLING YOU!',0,0,0,0,'floon SAY_FLOON_ATTACK'), +(-1000195,'REUSE ME',0,0,0,0,'REUSE ME'), (-1000196,'Belore...',0,0,1,0,'lady_sylvanas SAY_LAMENT_END'), (-1000197,'%s kneels down and pick up the amulet.',0,2,1,0,'lady_sylvanas EMOTE_LAMENT_END'), diff --git a/sql/updates/r2314_mangos.sql b/sql/updates/r2314_mangos.sql new file mode 100644 index 000000000..9b9546407 --- /dev/null +++ b/sql/updates/r2314_mangos.sql @@ -0,0 +1,40 @@ +UPDATE creature_template SET ScriptName='' WHERE entry=19361; +UPDATE creature_template SET ScriptName='' WHERE entry=18197; +UPDATE creature_template SET ScriptName='' WHERE entry=18019; +UPDATE creature_template SET ScriptName='' WHERE entry=20142; +UPDATE creature_template SET ScriptName='' WHERE entry IN (29665,29725,29728); +UPDATE creature_template SET ScriptName='' WHERE entry=18166; +UPDATE creature_template SET ScriptName='' WHERE entry=16819; +UPDATE creature_template SET ScriptName='' WHERE entry=19409; +UPDATE creature_template SET ScriptName='' WHERE entry=7172; +UPDATE creature_template SET ScriptName='' WHERE entry=23309; +UPDATE creature_template SET ScriptName='' WHERE entry=21657; +UPDATE creature_template SET ScriptName='' WHERE entry=20235; +UPDATE creature_template SET ScriptName='' WHERE entry=18261; +UPDATE creature_template SET ScriptName='' WHERE entry=25967; +UPDATE creature_template SET ScriptName='' WHERE entry=23704; +UPDATE creature_template SET ScriptName='' WHERE entry=21981; +UPDATE creature_template SET ScriptName='' WHERE entry=23413; +UPDATE creature_template SET ScriptName='' WHERE entry=23415; +UPDATE creature_template SET ScriptName='' WHERE entry=21727; +UPDATE creature_template SET ScriptName='' WHERE entry=21725; +UPDATE creature_template SET ScriptName='' WHERE entry=21183; +UPDATE creature_template SET ScriptName='' WHERE entry=19401; +UPDATE creature_template SET ScriptName='' WHERE entry=18585; +UPDATE creature_template SET ScriptName='' WHERE entry=20162; +UPDATE creature_template SET ScriptName='' WHERE entry=22932; +UPDATE creature_template SET ScriptName='' WHERE entry=23373; +UPDATE creature_template SET ScriptName='' WHERE entry=25590; +UPDATE creature_template SET ScriptName='' WHERE entry=26219; +UPDATE creature_template SET ScriptName='' WHERE entry=30051; +UPDATE creature_template SET ScriptName='' WHERE entry=26602; +UPDATE creature_template SET ScriptName='' WHERE entry=24795; +UPDATE creature_template SET ScriptName='' WHERE entry=31848; +UPDATE creature_template SET ScriptName='' WHERE entry=29975; +UPDATE creature_template SET ScriptName='' WHERE entry=31333; +UPDATE creature_template SET ScriptName='' WHERE entry=29445; +UPDATE creature_template SET ScriptName='' WHERE entry=31247; +UPDATE creature_template SET ScriptName='' WHERE entry=29811; +UPDATE creature_template SET ScriptName='' WHERE entry IN (29169,23729,26673,27158,29158,29161,26471,29155,29159,29160,29162); + +UPDATE gameobject_template SET ScriptName='' WHERE entry=181606; diff --git a/sql/updates/r2314_scriptdev2.sql b/sql/updates/r2314_scriptdev2.sql new file mode 100644 index 000000000..86f015379 --- /dev/null +++ b/sql/updates/r2314_scriptdev2.sql @@ -0,0 +1 @@ +UPDATE script_texts SET content_default='REUSE ME', comment='REUSE ME' WHERE entry=-1000195; From e70711bde779312a2c1eb8afb8e883f4d92e6468 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Sat, 15 Oct 2011 18:34:36 +0200 Subject: [PATCH 0298/1172] [2315] Rename all 'newscript' to 'pNewScript' --- scripts/battlegrounds/battleground.cpp | 12 +- .../eastern_kingdoms/alterac_mountains.cpp | 2 +- scripts/eastern_kingdoms/arathi_highlands.cpp | 12 +- .../boss_ambassador_flamelash.cpp | 11 +- .../blackrock_depths/boss_anubshiah.cpp | 11 +- .../boss_emperor_dagran_thaurissan.cpp | 18 +- .../boss_general_angerforge.cpp | 11 +- .../boss_gorosh_the_dervish.cpp | 11 +- .../blackrock_depths/boss_grizzle.cpp | 11 +- .../boss_high_interrogator_gerstahn.cpp | 11 +- .../blackrock_depths/boss_magmus.cpp | 11 +- .../blackrock_depths/boss_tomb_of_seven.cpp | 28 +-- .../blackrock_spire/boss_drakkisath.cpp | 11 +- .../blackrock_spire/boss_gyth.cpp | 1 + .../blackrock_spire/boss_halycon.cpp | 11 +- .../blackrock_spire/boss_highlord_omokk.cpp | 11 +- .../boss_mother_smolderweb.cpp | 11 +- .../boss_overlord_wyrmthalak.cpp | 11 +- .../boss_pyroguard_emberseer.cpp | 1 + .../boss_quartermaster_zigris.cpp | 11 +- .../blackrock_spire/boss_rend_blackhand.cpp | 11 +- .../boss_shadow_hunter_voshgajin.cpp | 11 +- .../blackrock_spire/boss_the_beast.cpp | 11 +- .../blackrock_spire/boss_warmaster_voone.cpp | 11 +- .../instance_blackrock_spire.cpp | 1 + .../blackwing_lair/boss_firemaw.cpp | 11 +- .../blackwing_lair/boss_flamegor.cpp | 11 +- scripts/eastern_kingdoms/blasted_lands.cpp | 26 +-- scripts/eastern_kingdoms/boss_kruul.cpp | 11 +- scripts/eastern_kingdoms/burning_steppes.cpp | 16 +- scripts/eastern_kingdoms/dun_morogh.cpp | 10 +- .../eastern_kingdoms/eastern_plaguelands.cpp | 48 ++--- scripts/eastern_kingdoms/elwynn_forest.cpp | 10 +- scripts/eastern_kingdoms/ghostlands.cpp | 50 ++--- scripts/eastern_kingdoms/ironforge.cpp | 12 +- .../karazhan/boss_curator.cpp | 11 +- .../karazhan/boss_maiden_of_virtue.cpp | 11 +- .../karazhan/boss_midnight.cpp | 18 +- .../eastern_kingdoms/karazhan/boss_moroes.cpp | 72 +++---- .../karazhan/boss_netherspite.cpp | 10 +- .../karazhan/boss_shade_of_aran.cpp | 18 +- .../karazhan/boss_terestian_illhoof.cpp | 32 +-- .../karazhan/bosses_opera.cpp | 106 ++++----- .../eastern_kingdoms/karazhan/karazhan.cpp | 28 +-- scripts/eastern_kingdoms/loch_modan.cpp | 26 +-- .../boss_felblood_kaelthas.cpp | 42 ++-- .../boss_priestess_delrissa.cpp | 102 ++++----- .../magisters_terrace/boss_vexallus.cpp | 18 +- .../magisters_terrace/magisters_terrace.cpp | 16 +- .../eastern_kingdoms/redridge_mountains.cpp | 12 +- .../scarlet_monastery/boss_arcanist_doan.cpp | 11 +- .../boss_azshir_the_sleepless.cpp | 11 +- .../boss_bloodmage_thalnos.cpp | 11 +- .../boss_headless_horseman.cpp | 10 +- .../scarlet_monastery/boss_herod.cpp | 1 + .../boss_high_inquisitor_fairbanks.cpp | 11 +- .../boss_houndmaster_loksey.cpp | 11 +- .../boss_interrogator_vishas.cpp | 11 +- .../boss_mograine_and_whitemane.cpp | 18 +- .../scarlet_monastery/boss_scorn.cpp | 11 +- .../boss_death_knight_darkreaver.cpp | 10 +- .../scholomance/boss_jandice_barov.cpp | 21 +- .../scholomance/boss_kormok.cpp | 11 +- .../scholomance/boss_vectus.cpp | 11 +- scripts/eastern_kingdoms/searing_gorge.cpp | 38 ++-- .../shadowfang_keep/shadowfang_keep.cpp | 2 +- scripts/eastern_kingdoms/silvermoon_city.cpp | 11 +- .../eastern_kingdoms/silverpine_forest.cpp | 26 +-- scripts/eastern_kingdoms/stormwind_city.cpp | 50 ++--- .../eastern_kingdoms/stranglethorn_vale.cpp | 10 +- .../stratholme/boss_baroness_anastari.cpp | 11 +- .../stratholme/boss_cannon_master_willey.cpp | 11 +- .../stratholme/boss_dathrohan_balnazzar.cpp | 11 +- .../stratholme/boss_magistrate_barthilas.cpp | 11 +- .../stratholme/boss_maleki_the_pallid.cpp | 11 +- .../stratholme/boss_nerubenkan.cpp | 11 +- .../stratholme/boss_order_of_silver_hand.cpp | 10 +- .../stratholme/boss_postmaster_malown.cpp | 11 +- .../stratholme/boss_ramstein_the_gorger.cpp | 11 +- .../stratholme/boss_timmy_the_cruel.cpp | 11 +- .../sunwell_plateau/boss_brutallus.cpp | 18 +- .../sunwell_plateau/boss_kalecgos.cpp | 42 ++-- scripts/eastern_kingdoms/swamp_of_sorrows.cpp | 12 +- scripts/eastern_kingdoms/tirisfal_glades.cpp | 34 +-- scripts/eastern_kingdoms/undercity.cpp | 36 ++-- .../eastern_kingdoms/western_plaguelands.cpp | 36 ++-- scripts/eastern_kingdoms/wetlands.cpp | 18 +- .../eastern_kingdoms/zulaman/boss_akilzon.cpp | 18 +- .../eastern_kingdoms/zulaman/boss_halazzi.cpp | 18 +- .../zulaman/boss_nalorakk.cpp | 11 +- scripts/eastern_kingdoms/zulaman/zulaman.cpp | 36 ++-- .../eastern_kingdoms/zulgurub/boss_arlokk.cpp | 18 +- .../zulgurub/boss_gahzranka.cpp | 11 +- .../eastern_kingdoms/zulgurub/boss_grilek.cpp | 11 +- .../zulgurub/boss_hazzarah.cpp | 11 +- .../zulgurub/boss_mandokir.cpp | 18 +- .../eastern_kingdoms/zulgurub/boss_marli.cpp | 18 +- .../zulgurub/boss_renataki.cpp | 11 +- .../zulgurub/boss_venoxis.cpp | 11 +- .../zulgurub/boss_wushoolay.cpp | 11 +- scripts/kalimdor/ashenvale.cpp | 48 ++--- scripts/kalimdor/azshara.cpp | 58 ++--- scripts/kalimdor/azuremyst_isle.cpp | 60 +++--- scripts/kalimdor/bloodmyst_isle.cpp | 24 +-- .../dark_portal/boss_aeonus.cpp | 11 +- .../dark_portal/boss_chrono_lord_deja.cpp | 11 +- .../dark_portal/boss_temporus.cpp | 11 +- .../dark_portal/dark_portal.cpp | 34 +-- .../caverns_of_time/hyjal/boss_archimonde.cpp | 41 ++-- .../kalimdor/caverns_of_time/hyjal/hyjal.cpp | 42 ++-- .../old_hillsbrad/boss_captain_skarloc.cpp | 11 +- .../old_hillsbrad/boss_epoch_hunter.cpp | 11 +- .../old_hillsbrad/boss_leutenant_drake.cpp | 18 +- scripts/kalimdor/feralas.cpp | 36 ++-- .../maraudon/boss_celebras_the_cursed.cpp | 11 +- scripts/kalimdor/maraudon/boss_landslide.cpp | 11 +- scripts/kalimdor/maraudon/boss_noxxion.cpp | 11 +- .../maraudon/boss_princess_theradras.cpp | 11 +- scripts/kalimdor/mulgore.cpp | 24 +-- scripts/kalimdor/orgrimmar.cpp | 40 ++-- .../boss_amnennar_the_coldbringer.cpp | 11 +- .../ruins_of_ahnqiraj/boss_ayamiss.cpp | 11 +- .../ruins_of_ahnqiraj/boss_kurinnaxx.cpp | 11 +- .../kalimdor/ruins_of_ahnqiraj/boss_moam.cpp | 11 +- .../ruins_of_ahnqiraj/ruins_of_ahnqiraj.cpp | 11 +- scripts/kalimdor/stonetalon_mountains.cpp | 26 +-- scripts/kalimdor/teldrassil.cpp | 12 +- .../temple_of_ahnqiraj/boss_bug_trio.cpp | 31 +-- .../temple_of_ahnqiraj/boss_fankriss.cpp | 11 +- .../temple_of_ahnqiraj/boss_huhuran.cpp | 11 +- .../kalimdor/temple_of_ahnqiraj/boss_ouro.cpp | 11 +- .../temple_of_ahnqiraj/boss_skeram.cpp | 11 +- .../temple_of_ahnqiraj/boss_twinemperors.cpp | 18 +- .../mob_anubisath_sentinel.cpp | 11 +- scripts/kalimdor/the_barrens.cpp | 80 +++---- scripts/kalimdor/thousand_needles.cpp | 52 ++--- scripts/kalimdor/thunder_bluff.cpp | 16 +- .../azjol-nerub/ahnkahet/boss_jedoga.cpp | 10 +- .../azjol-nerub/ahnkahet/boss_nadox.cpp | 18 +- .../azjol-nerub/ahnkahet/boss_taldaram.cpp | 18 +- .../azjol-nerub/ahnkahet/boss_volazj.cpp | 10 +- .../boss_anubarak_trial.cpp | 10 +- scripts/northrend/gundrak/boss_moorabi.cpp | 10 +- scripts/northrend/gundrak/boss_sladran.cpp | 18 +- scripts/northrend/icecrown.cpp | 12 +- .../northrend/naxxramas/boss_anubrekhan.cpp | 11 +- .../naxxramas/boss_four_horsemen.cpp | 42 ++-- scripts/northrend/naxxramas/boss_gluth.cpp | 11 +- scripts/northrend/naxxramas/boss_gothik.cpp | 18 +- scripts/northrend/naxxramas/boss_heigan.cpp | 11 +- .../northrend/naxxramas/boss_kelthuzad.cpp | 10 +- scripts/northrend/naxxramas/boss_loatheb.cpp | 11 +- .../northrend/naxxramas/boss_patchwerk.cpp | 11 +- .../northrend/nexus/nexus/boss_anomalus.cpp | 18 +- .../nexus/nexus/boss_keristrasza.cpp | 10 +- .../northrend/nexus/nexus/boss_ormorok.cpp | 10 +- .../northrend/nexus/nexus/boss_telestra.cpp | 10 +- .../obsidian_sanctum/boss_sartharion.cpp | 82 +++---- .../halls_of_lightning/boss_bjarngrim.cpp | 18 +- .../ulduar/halls_of_lightning/boss_ionar.cpp | 24 +-- .../ulduar/halls_of_lightning/boss_loken.cpp | 10 +- .../halls_of_lightning/boss_volkhan.cpp | 34 +-- .../halls_of_stone/boss_maiden_of_grief.cpp | 10 +- .../utgarde_keep/utgarde_keep/boss_ingvar.cpp | 18 +- .../boss_skarvald_and_dalronn.cpp | 18 +- .../utgarde_keep/utgarde_keep.cpp | 10 +- .../utgarde_pinnacle/boss_gortok.cpp | 10 +- .../utgarde_pinnacle/boss_skadi.cpp | 18 +- .../utgarde_pinnacle/boss_svala.cpp | 18 +- .../utgarde_pinnacle/boss_ymiron.cpp | 10 +- scripts/northrend/violet_hold/violet_hold.cpp | 48 ++--- .../auchenai_crypts/boss_exarch_maladaar.cpp | 32 +-- .../mana_tombs/boss_nexusprince_shaffar.cpp | 18 +- .../mana_tombs/boss_pandemonius.cpp | 11 +- .../sethekk_halls/boss_darkweaver_syth.cpp | 51 ++--- .../sethekk_halls/boss_talon_king_ikiss.cpp | 10 +- .../boss_blackheart_the_inciter.cpp | 11 +- .../boss_grandmaster_vorpil.cpp | 11 +- .../shadow_labyrinth/boss_murmur.cpp | 11 +- scripts/outland/black_temple/black_temple.cpp | 12 +- .../outland/black_temple/boss_bloodboil.cpp | 11 +- scripts/outland/black_temple/boss_illidan.cpp | 124 +++++------ .../black_temple/boss_mother_shahraz.cpp | 11 +- .../black_temple/boss_reliquary_of_souls.cpp | 51 ++--- .../black_temple/boss_shade_of_akama.cpp | 45 ++-- .../black_temple/boss_teron_gorefiend.cpp | 31 +-- scripts/outland/boss_doomlord_kazzak.cpp | 11 +- scripts/outland/boss_doomwalker.cpp | 11 +- .../boss_hydross_the_unstable.cpp | 11 +- .../serpent_shrine/boss_lady_vashj.cpp | 61 +++--- .../boss_leotheras_the_blind.cpp | 18 +- .../boss_morogrim_tidewalker.cpp | 18 +- .../steam_vault/boss_hydromancer_thespia.cpp | 18 +- .../boss_mekgineer_steamrigger.cpp | 18 +- .../steam_vault/boss_warlord_kalithresh.cpp | 18 +- .../underbog/boss_hungarfen.cpp | 18 +- scripts/outland/gruuls_lair/boss_gruul.cpp | 11 +- .../gruuls_lair/boss_high_king_maulgar.cpp | 52 ++--- .../blood_furnace/boss_the_maker.cpp | 11 +- .../boss_nazan_and_vazruden.cpp | 18 +- .../magtheridons_lair/boss_magtheridon.cpp | 41 ++-- .../boss_warbringer_omrogg.cpp | 18 +- .../tempest_keep/arcatraz/arcatraz.cpp | 32 +-- .../botanica/boss_high_botanist_freywinn.cpp | 10 +- .../tempest_keep/botanica/boss_laj.cpp | 10 +- .../botanica/boss_warp_splinter.cpp | 18 +- .../tempest_keep/the_eye/boss_kaelthas.cpp | 71 +++--- .../tempest_keep/the_eye/boss_void_reaver.cpp | 11 +- .../outland/tempest_keep/the_eye/the_eye.cpp | 11 +- .../boss_gatewatcher_ironhand.cpp | 11 +- .../boss_nethermancer_sepethrea.cpp | 21 +- .../boss_pathaleon_the_calculator.cpp | 21 +- scripts/world/guards.cpp | 202 +++++++++--------- scripts/world/item_scripts.cpp | 42 ++-- scripts/world/mob_generic_creature.cpp | 11 +- scripts/world/npc_professions.cpp | 62 +++--- scripts/world/npcs_special.cpp | 150 ++++++------- scripts/world/spell_scripts.cpp | 24 +-- sd2_revision_nr.h | 2 +- 219 files changed, 2437 insertions(+), 2334 deletions(-) diff --git a/scripts/battlegrounds/battleground.cpp b/scripts/battlegrounds/battleground.cpp index b1eb51029..1f020e5dc 100644 --- a/scripts/battlegrounds/battleground.cpp +++ b/scripts/battlegrounds/battleground.cpp @@ -102,11 +102,11 @@ CreatureAI* GetAI_npc_spirit_guide(Creature* pCreature) void AddSC_battleground() { - Script* newscript; + Script* pNewScript; - newscript = new Script; - newscript->Name = "npc_spirit_guide"; - newscript->GetAI = &GetAI_npc_spirit_guide; - newscript->pGossipHello = &GossipHello_npc_spirit_guide; - newscript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "npc_spirit_guide"; + pNewScript->GetAI = &GetAI_npc_spirit_guide; + pNewScript->pGossipHello = &GossipHello_npc_spirit_guide; + pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/alterac_mountains.cpp b/scripts/eastern_kingdoms/alterac_mountains.cpp index 52db739af..0744f0c35 100644 --- a/scripts/eastern_kingdoms/alterac_mountains.cpp +++ b/scripts/eastern_kingdoms/alterac_mountains.cpp @@ -28,5 +28,5 @@ EndContentData */ /*void AddSC_alterac_mountains() { - Script *newscript; + Script* pNewScript; }*/ diff --git a/scripts/eastern_kingdoms/arathi_highlands.cpp b/scripts/eastern_kingdoms/arathi_highlands.cpp index 07f5c9e60..832d7a732 100644 --- a/scripts/eastern_kingdoms/arathi_highlands.cpp +++ b/scripts/eastern_kingdoms/arathi_highlands.cpp @@ -116,11 +116,11 @@ CreatureAI* GetAI_npc_professor_phizzlethorpe(Creature* pCreature) void AddSC_arathi_highlands() { - Script * newscript; + Script* pNewScript; - newscript = new Script; - newscript->Name = "npc_professor_phizzlethorpe"; - newscript->GetAI = &GetAI_npc_professor_phizzlethorpe; - newscript->pQuestAcceptNPC = &QuestAccept_npc_professor_phizzlethorpe; - newscript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "npc_professor_phizzlethorpe"; + pNewScript->GetAI = &GetAI_npc_professor_phizzlethorpe; + pNewScript->pQuestAcceptNPC = &QuestAccept_npc_professor_phizzlethorpe; + pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/blackrock_depths/boss_ambassador_flamelash.cpp b/scripts/eastern_kingdoms/blackrock_depths/boss_ambassador_flamelash.cpp index c1d687a11..518e97902 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/boss_ambassador_flamelash.cpp +++ b/scripts/eastern_kingdoms/blackrock_depths/boss_ambassador_flamelash.cpp @@ -96,9 +96,10 @@ CreatureAI* GetAI_boss_ambassador_flamelash(Creature* pCreature) void AddSC_boss_ambassador_flamelash() { - Script *newscript; - newscript = new Script; - newscript->Name = "boss_ambassador_flamelash"; - newscript->GetAI = &GetAI_boss_ambassador_flamelash; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_ambassador_flamelash"; + pNewScript->GetAI = &GetAI_boss_ambassador_flamelash; + pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/blackrock_depths/boss_anubshiah.cpp b/scripts/eastern_kingdoms/blackrock_depths/boss_anubshiah.cpp index 29844960a..a411f3f68 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/boss_anubshiah.cpp +++ b/scripts/eastern_kingdoms/blackrock_depths/boss_anubshiah.cpp @@ -103,9 +103,10 @@ CreatureAI* GetAI_boss_anubshiah(Creature* pCreature) void AddSC_boss_anubshiah() { - Script *newscript; - newscript = new Script; - newscript->Name = "boss_anubshiah"; - newscript->GetAI = &GetAI_boss_anubshiah; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_anubshiah"; + pNewScript->GetAI = &GetAI_boss_anubshiah; + pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/blackrock_depths/boss_emperor_dagran_thaurissan.cpp b/scripts/eastern_kingdoms/blackrock_depths/boss_emperor_dagran_thaurissan.cpp index 4264e3d67..31914ffba 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/boss_emperor_dagran_thaurissan.cpp +++ b/scripts/eastern_kingdoms/blackrock_depths/boss_emperor_dagran_thaurissan.cpp @@ -246,15 +246,15 @@ CreatureAI* GetAI_boss_moira_bronzebeard(Creature* pCreature) void AddSC_boss_draganthaurissan() { - Script *newscript; + Script* pNewScript; - newscript = new Script; - newscript->Name = "boss_emperor_dagran_thaurissan"; - newscript->GetAI = &GetAI_boss_emperor_dagran_thaurissan; - newscript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "boss_emperor_dagran_thaurissan"; + pNewScript->GetAI = &GetAI_boss_emperor_dagran_thaurissan; + pNewScript->RegisterSelf(); - newscript = new Script; - newscript->Name = "boss_moira_bronzebeard"; - newscript->GetAI = &GetAI_boss_moira_bronzebeard; - newscript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "boss_moira_bronzebeard"; + pNewScript->GetAI = &GetAI_boss_moira_bronzebeard; + pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/blackrock_depths/boss_general_angerforge.cpp b/scripts/eastern_kingdoms/blackrock_depths/boss_general_angerforge.cpp index 0acb31d27..fc9a3e0cf 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/boss_general_angerforge.cpp +++ b/scripts/eastern_kingdoms/blackrock_depths/boss_general_angerforge.cpp @@ -155,9 +155,10 @@ CreatureAI* GetAI_boss_general_angerforge(Creature* pCreature) void AddSC_boss_general_angerforge() { - Script *newscript; - newscript = new Script; - newscript->Name = "boss_general_angerforge"; - newscript->GetAI = &GetAI_boss_general_angerforge; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_general_angerforge"; + pNewScript->GetAI = &GetAI_boss_general_angerforge; + pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/blackrock_depths/boss_gorosh_the_dervish.cpp b/scripts/eastern_kingdoms/blackrock_depths/boss_gorosh_the_dervish.cpp index 915345169..3605382ee 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/boss_gorosh_the_dervish.cpp +++ b/scripts/eastern_kingdoms/blackrock_depths/boss_gorosh_the_dervish.cpp @@ -69,9 +69,10 @@ CreatureAI* GetAI_boss_gorosh_the_dervish(Creature* pCreature) void AddSC_boss_gorosh_the_dervish() { - Script *newscript; - newscript = new Script; - newscript->Name = "boss_gorosh_the_dervish"; - newscript->GetAI = &GetAI_boss_gorosh_the_dervish; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_gorosh_the_dervish"; + pNewScript->GetAI = &GetAI_boss_gorosh_the_dervish; + pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/blackrock_depths/boss_grizzle.cpp b/scripts/eastern_kingdoms/blackrock_depths/boss_grizzle.cpp index e3a38d9dd..1eb569bc6 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/boss_grizzle.cpp +++ b/scripts/eastern_kingdoms/blackrock_depths/boss_grizzle.cpp @@ -77,9 +77,10 @@ CreatureAI* GetAI_boss_grizzle(Creature* pCreature) void AddSC_boss_grizzle() { - Script *newscript; - newscript = new Script; - newscript->Name = "boss_grizzle"; - newscript->GetAI = &GetAI_boss_grizzle; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_grizzle"; + pNewScript->GetAI = &GetAI_boss_grizzle; + pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/blackrock_depths/boss_high_interrogator_gerstahn.cpp b/scripts/eastern_kingdoms/blackrock_depths/boss_high_interrogator_gerstahn.cpp index f3f76176d..45de58dac 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/boss_high_interrogator_gerstahn.cpp +++ b/scripts/eastern_kingdoms/blackrock_depths/boss_high_interrogator_gerstahn.cpp @@ -105,9 +105,10 @@ CreatureAI* GetAI_boss_high_interrogator_gerstahn(Creature* pCreature) void AddSC_boss_high_interrogator_gerstahn() { - Script *newscript; - newscript = new Script; - newscript->Name = "boss_high_interrogator_gerstahn"; - newscript->GetAI = &GetAI_boss_high_interrogator_gerstahn; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_high_interrogator_gerstahn"; + pNewScript->GetAI = &GetAI_boss_high_interrogator_gerstahn; + pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/blackrock_depths/boss_magmus.cpp b/scripts/eastern_kingdoms/blackrock_depths/boss_magmus.cpp index 645b25eec..24007b335 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/boss_magmus.cpp +++ b/scripts/eastern_kingdoms/blackrock_depths/boss_magmus.cpp @@ -105,9 +105,10 @@ CreatureAI* GetAI_boss_magmus(Creature* pCreature) void AddSC_boss_magmus() { - Script *newscript; - newscript = new Script; - newscript->Name = "boss_magmus"; - newscript->GetAI = &GetAI_boss_magmus; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_magmus"; + pNewScript->GetAI = &GetAI_boss_magmus; + pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/blackrock_depths/boss_tomb_of_seven.cpp b/scripts/eastern_kingdoms/blackrock_depths/boss_tomb_of_seven.cpp index f72118401..d681f2c20 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/boss_tomb_of_seven.cpp +++ b/scripts/eastern_kingdoms/blackrock_depths/boss_tomb_of_seven.cpp @@ -308,18 +308,18 @@ bool GossipSelect_boss_doomrel(Player* pPlayer, Creature* pCreature, uint32 uiSe void AddSC_boss_tomb_of_seven() { - Script *newscript; - - newscript = new Script; - newscript->Name = "boss_gloomrel"; - newscript->pGossipHello = &GossipHello_boss_gloomrel; - newscript->pGossipSelect = &GossipSelect_boss_gloomrel; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "boss_doomrel"; - newscript->GetAI = &GetAI_boss_doomrel; - newscript->pGossipHello = &GossipHello_boss_doomrel; - newscript->pGossipSelect = &GossipSelect_boss_doomrel; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_gloomrel"; + pNewScript->pGossipHello = &GossipHello_boss_gloomrel; + pNewScript->pGossipSelect = &GossipSelect_boss_gloomrel; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "boss_doomrel"; + pNewScript->GetAI = &GetAI_boss_doomrel; + pNewScript->pGossipHello = &GossipHello_boss_doomrel; + pNewScript->pGossipSelect = &GossipSelect_boss_doomrel; + pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/blackrock_spire/boss_drakkisath.cpp b/scripts/eastern_kingdoms/blackrock_spire/boss_drakkisath.cpp index ab186311a..8242d9b1f 100644 --- a/scripts/eastern_kingdoms/blackrock_spire/boss_drakkisath.cpp +++ b/scripts/eastern_kingdoms/blackrock_spire/boss_drakkisath.cpp @@ -101,9 +101,10 @@ CreatureAI* GetAI_boss_drakkisath(Creature* pCreature) void AddSC_boss_drakkisath() { - Script* newscript; - newscript = new Script; - newscript->Name = "boss_drakkisath"; - newscript->GetAI = &GetAI_boss_drakkisath; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_drakkisath"; + pNewScript->GetAI = &GetAI_boss_drakkisath; + pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/blackrock_spire/boss_gyth.cpp b/scripts/eastern_kingdoms/blackrock_spire/boss_gyth.cpp index 9261b659c..2b3f2b629 100644 --- a/scripts/eastern_kingdoms/blackrock_spire/boss_gyth.cpp +++ b/scripts/eastern_kingdoms/blackrock_spire/boss_gyth.cpp @@ -237,6 +237,7 @@ CreatureAI* GetAI_boss_gyth(Creature* pCreature) void AddSC_boss_gyth() { Script* pNewScript; + pNewScript = new Script; pNewScript->Name = "boss_gyth"; pNewScript->GetAI = &GetAI_boss_gyth; diff --git a/scripts/eastern_kingdoms/blackrock_spire/boss_halycon.cpp b/scripts/eastern_kingdoms/blackrock_spire/boss_halycon.cpp index 93329569b..ec3a97a62 100644 --- a/scripts/eastern_kingdoms/blackrock_spire/boss_halycon.cpp +++ b/scripts/eastern_kingdoms/blackrock_spire/boss_halycon.cpp @@ -83,9 +83,10 @@ CreatureAI* GetAI_boss_halycon(Creature* pCreature) void AddSC_boss_halycon() { - Script *newscript; - newscript = new Script; - newscript->Name = "boss_halycon"; - newscript->GetAI = &GetAI_boss_halycon; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_halycon"; + pNewScript->GetAI = &GetAI_boss_halycon; + pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/blackrock_spire/boss_highlord_omokk.cpp b/scripts/eastern_kingdoms/blackrock_spire/boss_highlord_omokk.cpp index 997b1e386..93e6aea76 100644 --- a/scripts/eastern_kingdoms/blackrock_spire/boss_highlord_omokk.cpp +++ b/scripts/eastern_kingdoms/blackrock_spire/boss_highlord_omokk.cpp @@ -125,9 +125,10 @@ CreatureAI* GetAI_boss_highlordomokk(Creature* pCreature) void AddSC_boss_highlordomokk() { - Script* newscript; - newscript = new Script; - newscript->Name = "boss_highlord_omokk"; - newscript->GetAI = &GetAI_boss_highlordomokk; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_highlord_omokk"; + pNewScript->GetAI = &GetAI_boss_highlordomokk; + pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/blackrock_spire/boss_mother_smolderweb.cpp b/scripts/eastern_kingdoms/blackrock_spire/boss_mother_smolderweb.cpp index dc66641ea..d7332b8c0 100644 --- a/scripts/eastern_kingdoms/blackrock_spire/boss_mother_smolderweb.cpp +++ b/scripts/eastern_kingdoms/blackrock_spire/boss_mother_smolderweb.cpp @@ -84,9 +84,10 @@ CreatureAI* GetAI_boss_mothersmolderweb(Creature* pCreature) void AddSC_boss_mothersmolderweb() { - Script* newscript; - newscript = new Script; - newscript->Name = "boss_mother_smolderweb"; - newscript->GetAI = &GetAI_boss_mothersmolderweb; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_mother_smolderweb"; + pNewScript->GetAI = &GetAI_boss_mothersmolderweb; + pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/blackrock_spire/boss_overlord_wyrmthalak.cpp b/scripts/eastern_kingdoms/blackrock_spire/boss_overlord_wyrmthalak.cpp index a69b3deb4..b530eb04b 100644 --- a/scripts/eastern_kingdoms/blackrock_spire/boss_overlord_wyrmthalak.cpp +++ b/scripts/eastern_kingdoms/blackrock_spire/boss_overlord_wyrmthalak.cpp @@ -134,9 +134,10 @@ CreatureAI* GetAI_boss_overlordwyrmthalak(Creature* pCreature) void AddSC_boss_overlordwyrmthalak() { - Script* newscript; - newscript = new Script; - newscript->Name = "boss_overlord_wyrmthalak"; - newscript->GetAI = &GetAI_boss_overlordwyrmthalak; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_overlord_wyrmthalak"; + pNewScript->GetAI = &GetAI_boss_overlordwyrmthalak; + pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/blackrock_spire/boss_pyroguard_emberseer.cpp b/scripts/eastern_kingdoms/blackrock_spire/boss_pyroguard_emberseer.cpp index a95290c61..cf51b821c 100644 --- a/scripts/eastern_kingdoms/blackrock_spire/boss_pyroguard_emberseer.cpp +++ b/scripts/eastern_kingdoms/blackrock_spire/boss_pyroguard_emberseer.cpp @@ -126,6 +126,7 @@ CreatureAI* GetAI_boss_pyroguard_emberseer(Creature* pCreature) void AddSC_boss_pyroguard_emberseer() { Script* pNewScript; + pNewScript = new Script; pNewScript->Name = "boss_pyroguard_emberseer"; pNewScript->GetAI = &GetAI_boss_pyroguard_emberseer; diff --git a/scripts/eastern_kingdoms/blackrock_spire/boss_quartermaster_zigris.cpp b/scripts/eastern_kingdoms/blackrock_spire/boss_quartermaster_zigris.cpp index 0d702610a..3ed964158 100644 --- a/scripts/eastern_kingdoms/blackrock_spire/boss_quartermaster_zigris.cpp +++ b/scripts/eastern_kingdoms/blackrock_spire/boss_quartermaster_zigris.cpp @@ -81,9 +81,10 @@ CreatureAI* GetAI_boss_quatermasterzigris(Creature* pCreature) void AddSC_boss_quatermasterzigris() { - Script* newscript; - newscript = new Script; - newscript->Name = "quartermaster_zigris"; - newscript->GetAI = &GetAI_boss_quatermasterzigris; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "quartermaster_zigris"; + pNewScript->GetAI = &GetAI_boss_quatermasterzigris; + pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/blackrock_spire/boss_rend_blackhand.cpp b/scripts/eastern_kingdoms/blackrock_spire/boss_rend_blackhand.cpp index 7beaa9bd2..9de579d36 100644 --- a/scripts/eastern_kingdoms/blackrock_spire/boss_rend_blackhand.cpp +++ b/scripts/eastern_kingdoms/blackrock_spire/boss_rend_blackhand.cpp @@ -89,9 +89,10 @@ CreatureAI* GetAI_boss_rend_blackhand(Creature* pCreature) void AddSC_boss_rend_blackhand() { - Script* newscript; - newscript = new Script; - newscript->Name = "boss_rend_blackhand"; - newscript->GetAI = &GetAI_boss_rend_blackhand; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_rend_blackhand"; + pNewScript->GetAI = &GetAI_boss_rend_blackhand; + pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/blackrock_spire/boss_shadow_hunter_voshgajin.cpp b/scripts/eastern_kingdoms/blackrock_spire/boss_shadow_hunter_voshgajin.cpp index 5a22b83e7..b99471407 100644 --- a/scripts/eastern_kingdoms/blackrock_spire/boss_shadow_hunter_voshgajin.cpp +++ b/scripts/eastern_kingdoms/blackrock_spire/boss_shadow_hunter_voshgajin.cpp @@ -92,9 +92,10 @@ CreatureAI* GetAI_boss_shadowvosh(Creature* pCreature) void AddSC_boss_shadowvosh() { - Script* newscript; - newscript = new Script; - newscript->Name = "boss_shadow_hunter_voshgajin"; - newscript->GetAI = &GetAI_boss_shadowvosh; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_shadow_hunter_voshgajin"; + pNewScript->GetAI = &GetAI_boss_shadowvosh; + pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/blackrock_spire/boss_the_beast.cpp b/scripts/eastern_kingdoms/blackrock_spire/boss_the_beast.cpp index 3745a88b4..151e888f4 100644 --- a/scripts/eastern_kingdoms/blackrock_spire/boss_the_beast.cpp +++ b/scripts/eastern_kingdoms/blackrock_spire/boss_the_beast.cpp @@ -91,9 +91,10 @@ CreatureAI* GetAI_boss_thebeast(Creature* pCreature) void AddSC_boss_thebeast() { - Script* newscript; - newscript = new Script; - newscript->Name = "boss_the_beast"; - newscript->GetAI = &GetAI_boss_thebeast; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_the_beast"; + pNewScript->GetAI = &GetAI_boss_thebeast; + pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/blackrock_spire/boss_warmaster_voone.cpp b/scripts/eastern_kingdoms/blackrock_spire/boss_warmaster_voone.cpp index f1d873743..a277d49f9 100644 --- a/scripts/eastern_kingdoms/blackrock_spire/boss_warmaster_voone.cpp +++ b/scripts/eastern_kingdoms/blackrock_spire/boss_warmaster_voone.cpp @@ -110,9 +110,10 @@ CreatureAI* GetAI_boss_warmastervoone(Creature* pCreature) void AddSC_boss_warmastervoone() { - Script *newscript; - newscript = new Script; - newscript->Name = "boss_warmaster_voone"; - newscript->GetAI = &GetAI_boss_warmastervoone; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_warmaster_voone"; + pNewScript->GetAI = &GetAI_boss_warmastervoone; + pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/blackrock_spire/instance_blackrock_spire.cpp b/scripts/eastern_kingdoms/blackrock_spire/instance_blackrock_spire.cpp index 1c7a8c207..826a7fedc 100644 --- a/scripts/eastern_kingdoms/blackrock_spire/instance_blackrock_spire.cpp +++ b/scripts/eastern_kingdoms/blackrock_spire/instance_blackrock_spire.cpp @@ -270,6 +270,7 @@ bool AreaTrigger_at_blackrock_spire(Player* pPlayer, AreaTriggerEntry const* pAt void AddSC_instance_blackrock_spire() { Script* pNewScript; + pNewScript = new Script; pNewScript->Name = "instance_blackrock_spire"; pNewScript->GetInstanceData = &GetInstanceData_instance_blackrock_spire; diff --git a/scripts/eastern_kingdoms/blackwing_lair/boss_firemaw.cpp b/scripts/eastern_kingdoms/blackwing_lair/boss_firemaw.cpp index 17c5310ef..6057a78f4 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/boss_firemaw.cpp +++ b/scripts/eastern_kingdoms/blackwing_lair/boss_firemaw.cpp @@ -118,9 +118,10 @@ CreatureAI* GetAI_boss_firemaw(Creature* pCreature) void AddSC_boss_firemaw() { - Script *newscript; - newscript = new Script; - newscript->Name = "boss_firemaw"; - newscript->GetAI = &GetAI_boss_firemaw; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_firemaw"; + pNewScript->GetAI = &GetAI_boss_firemaw; + pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/blackwing_lair/boss_flamegor.cpp b/scripts/eastern_kingdoms/blackwing_lair/boss_flamegor.cpp index 5e836b04a..fc7a2b5d7 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/boss_flamegor.cpp +++ b/scripts/eastern_kingdoms/blackwing_lair/boss_flamegor.cpp @@ -123,9 +123,10 @@ CreatureAI* GetAI_boss_flamegor(Creature* pCreature) void AddSC_boss_flamegor() { - Script *newscript; - newscript = new Script; - newscript->Name = "boss_flamegor"; - newscript->GetAI = &GetAI_boss_flamegor; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_flamegor"; + pNewScript->GetAI = &GetAI_boss_flamegor; + pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/blasted_lands.cpp b/scripts/eastern_kingdoms/blasted_lands.cpp index 30bc4a2b9..b6b6057b7 100644 --- a/scripts/eastern_kingdoms/blasted_lands.cpp +++ b/scripts/eastern_kingdoms/blasted_lands.cpp @@ -143,17 +143,17 @@ bool GossipSelect_npc_fallen_hero_of_horde(Player* pPlayer, Creature* pCreature, void AddSC_blasted_lands() { - Script *newscript; - - newscript = new Script; - newscript->Name = "npc_deathly_usher"; - newscript->pGossipHello = &GossipHello_npc_deathly_usher; - newscript->pGossipSelect = &GossipSelect_npc_deathly_usher; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_fallen_hero_of_horde"; - newscript->pGossipHello = &GossipHello_npc_fallen_hero_of_horde; - newscript->pGossipSelect = &GossipSelect_npc_fallen_hero_of_horde; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "npc_deathly_usher"; + pNewScript->pGossipHello = &GossipHello_npc_deathly_usher; + pNewScript->pGossipSelect = &GossipSelect_npc_deathly_usher; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_fallen_hero_of_horde"; + pNewScript->pGossipHello = &GossipHello_npc_fallen_hero_of_horde; + pNewScript->pGossipSelect = &GossipSelect_npc_fallen_hero_of_horde; + pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/boss_kruul.cpp b/scripts/eastern_kingdoms/boss_kruul.cpp index c5dc0cbea..1bd65042d 100644 --- a/scripts/eastern_kingdoms/boss_kruul.cpp +++ b/scripts/eastern_kingdoms/boss_kruul.cpp @@ -170,9 +170,10 @@ CreatureAI* GetAI_boss_kruul(Creature* pCreature) void AddSC_boss_kruul() { - Script *newscript; - newscript = new Script; - newscript->Name = "boss_kruul"; - newscript->GetAI = &GetAI_boss_kruul; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_kruul"; + pNewScript->GetAI = &GetAI_boss_kruul; + pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/burning_steppes.cpp b/scripts/eastern_kingdoms/burning_steppes.cpp index 45675191c..f1b07e52d 100644 --- a/scripts/eastern_kingdoms/burning_steppes.cpp +++ b/scripts/eastern_kingdoms/burning_steppes.cpp @@ -138,12 +138,12 @@ bool GossipSelect_npc_ragged_john(Player* pPlayer, Creature* pCreature, uint32 u void AddSC_burning_steppes() { - Script *newscript; - - newscript = new Script; - newscript->Name = "npc_ragged_john"; - newscript->GetAI = &GetAI_npc_ragged_john; - newscript->pGossipHello = &GossipHello_npc_ragged_john; - newscript->pGossipSelect = &GossipSelect_npc_ragged_john; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "npc_ragged_john"; + pNewScript->GetAI = &GetAI_npc_ragged_john; + pNewScript->pGossipHello = &GossipHello_npc_ragged_john; + pNewScript->pGossipSelect = &GossipSelect_npc_ragged_john; + pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/dun_morogh.cpp b/scripts/eastern_kingdoms/dun_morogh.cpp index 8b024548c..9d9a63a10 100644 --- a/scripts/eastern_kingdoms/dun_morogh.cpp +++ b/scripts/eastern_kingdoms/dun_morogh.cpp @@ -82,10 +82,10 @@ CreatureAI* GetAI_npc_narm_faulk(Creature* pCreature) void AddSC_dun_morogh() { - Script *newscript; + Script* pNewScript; - newscript = new Script; - newscript->Name = "npc_narm_faulk"; - newscript->GetAI = &GetAI_npc_narm_faulk; - newscript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "npc_narm_faulk"; + pNewScript->GetAI = &GetAI_npc_narm_faulk; + pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/eastern_plaguelands.cpp b/scripts/eastern_kingdoms/eastern_plaguelands.cpp index 74e803be9..5c28a3943 100644 --- a/scripts/eastern_kingdoms/eastern_plaguelands.cpp +++ b/scripts/eastern_kingdoms/eastern_plaguelands.cpp @@ -149,28 +149,28 @@ bool GossipSelect_npc_tirion_fordring(Player* pPlayer, Creature* pCreature, uint void AddSC_eastern_plaguelands() { - Script *newscript; - - newscript = new Script; - newscript->Name = "mobs_ghoul_flayer"; - newscript->GetAI = &GetAI_mobs_ghoul_flayer; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_augustus_the_touched"; - newscript->pGossipHello = &GossipHello_npc_augustus_the_touched; - newscript->pGossipSelect = &GossipSelect_npc_augustus_the_touched; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_darrowshire_spirit"; - newscript->GetAI = &GetAI_npc_darrowshire_spirit; - newscript->pGossipHello = &GossipHello_npc_darrowshire_spirit; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_tirion_fordring"; - newscript->pGossipHello = &GossipHello_npc_tirion_fordring; - newscript->pGossipSelect = &GossipSelect_npc_tirion_fordring; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "mobs_ghoul_flayer"; + pNewScript->GetAI = &GetAI_mobs_ghoul_flayer; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_augustus_the_touched"; + pNewScript->pGossipHello = &GossipHello_npc_augustus_the_touched; + pNewScript->pGossipSelect = &GossipSelect_npc_augustus_the_touched; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_darrowshire_spirit"; + pNewScript->GetAI = &GetAI_npc_darrowshire_spirit; + pNewScript->pGossipHello = &GossipHello_npc_darrowshire_spirit; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_tirion_fordring"; + pNewScript->pGossipHello = &GossipHello_npc_tirion_fordring; + pNewScript->pGossipSelect = &GossipSelect_npc_tirion_fordring; + pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/elwynn_forest.cpp b/scripts/eastern_kingdoms/elwynn_forest.cpp index 74ed77726..fad26c1f2 100644 --- a/scripts/eastern_kingdoms/elwynn_forest.cpp +++ b/scripts/eastern_kingdoms/elwynn_forest.cpp @@ -82,10 +82,10 @@ CreatureAI* GetAI_npc_henze_faulk(Creature* pCreature) void AddSC_elwynn_forest() { - Script *newscript; + Script* pNewScript; - newscript = new Script; - newscript->Name = "npc_henze_faulk"; - newscript->GetAI = &GetAI_npc_henze_faulk; - newscript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "npc_henze_faulk"; + pNewScript->GetAI = &GetAI_npc_henze_faulk; + pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/ghostlands.cpp b/scripts/eastern_kingdoms/ghostlands.cpp index d98543332..d251c25bb 100644 --- a/scripts/eastern_kingdoms/ghostlands.cpp +++ b/scripts/eastern_kingdoms/ghostlands.cpp @@ -241,29 +241,29 @@ bool GossipSelect_npc_rathis_tomber(Player* pPlayer, Creature* pCreature, uint32 void AddSC_ghostlands() { - Script *newscript; - - newscript = new Script; - newscript->Name = "npc_blood_knight_dawnstar"; - newscript->pGossipHello = &GossipHello_npc_blood_knight_dawnstar; - newscript->pGossipSelect = &GossipSelect_npc_blood_knight_dawnstar; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_budd_nedreck"; - newscript->pGossipHello = &GossipHello_npc_budd_nedreck; - newscript->pGossipSelect = &GossipSelect_npc_budd_nedreck; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_ranger_lilatha"; - newscript->GetAI = &GetAI_npc_ranger_lilathaAI; - newscript->pQuestAcceptNPC = &QuestAccept_npc_ranger_lilatha; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_rathis_tomber"; - newscript->pGossipHello = &GossipHello_npc_rathis_tomber; - newscript->pGossipSelect = &GossipSelect_npc_rathis_tomber; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "npc_blood_knight_dawnstar"; + pNewScript->pGossipHello = &GossipHello_npc_blood_knight_dawnstar; + pNewScript->pGossipSelect = &GossipSelect_npc_blood_knight_dawnstar; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_budd_nedreck"; + pNewScript->pGossipHello = &GossipHello_npc_budd_nedreck; + pNewScript->pGossipSelect = &GossipSelect_npc_budd_nedreck; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_ranger_lilatha"; + pNewScript->GetAI = &GetAI_npc_ranger_lilathaAI; + pNewScript->pQuestAcceptNPC = &QuestAccept_npc_ranger_lilatha; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_rathis_tomber"; + pNewScript->pGossipHello = &GossipHello_npc_rathis_tomber; + pNewScript->pGossipSelect = &GossipSelect_npc_rathis_tomber; + pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/ironforge.cpp b/scripts/eastern_kingdoms/ironforge.cpp index 5b8b1e706..cc157a72a 100644 --- a/scripts/eastern_kingdoms/ironforge.cpp +++ b/scripts/eastern_kingdoms/ironforge.cpp @@ -83,11 +83,11 @@ bool GossipSelect_npc_royal_historian_archesonus(Player* pPlayer, Creature* pCre void AddSC_ironforge() { - Script *newscript; + Script* pNewScript; - newscript = new Script; - newscript->Name = "npc_royal_historian_archesonus"; - newscript->pGossipHello = &GossipHello_npc_royal_historian_archesonus; - newscript->pGossipSelect = &GossipSelect_npc_royal_historian_archesonus; - newscript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "npc_royal_historian_archesonus"; + pNewScript->pGossipHello = &GossipHello_npc_royal_historian_archesonus; + pNewScript->pGossipSelect = &GossipSelect_npc_royal_historian_archesonus; + pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/karazhan/boss_curator.cpp b/scripts/eastern_kingdoms/karazhan/boss_curator.cpp index 1d05193d4..4fbb1a2ea 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_curator.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_curator.cpp @@ -203,9 +203,10 @@ CreatureAI* GetAI_boss_curator(Creature* pCreature) void AddSC_boss_curator() { - Script* newscript; - newscript = new Script; - newscript->Name = "boss_curator"; - newscript->GetAI = &GetAI_boss_curator; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_curator"; + pNewScript->GetAI = &GetAI_boss_curator; + pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/karazhan/boss_maiden_of_virtue.cpp b/scripts/eastern_kingdoms/karazhan/boss_maiden_of_virtue.cpp index a54fad24a..9f27914a6 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_maiden_of_virtue.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_maiden_of_virtue.cpp @@ -151,9 +151,10 @@ CreatureAI* GetAI_boss_maiden_of_virtue(Creature* pCreature) void AddSC_boss_maiden_of_virtue() { - Script* newscript; - newscript = new Script; - newscript->Name = "boss_maiden_of_virtue"; - newscript->GetAI = &GetAI_boss_maiden_of_virtue; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_maiden_of_virtue"; + pNewScript->GetAI = &GetAI_boss_maiden_of_virtue; + pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/karazhan/boss_midnight.cpp b/scripts/eastern_kingdoms/karazhan/boss_midnight.cpp index b67a2d547..1b6fb3bff 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_midnight.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_midnight.cpp @@ -336,15 +336,15 @@ CreatureAI* GetAI_boss_attumen(Creature* pCreature) void AddSC_boss_attumen() { - Script* newscript; + Script* pNewScript; - newscript = new Script; - newscript->Name = "boss_attumen"; - newscript->GetAI = &GetAI_boss_attumen; - newscript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "boss_attumen"; + pNewScript->GetAI = &GetAI_boss_attumen; + pNewScript->RegisterSelf(); - newscript = new Script; - newscript->Name = "boss_midnight"; - newscript->GetAI = &GetAI_boss_midnight; - newscript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "boss_midnight"; + pNewScript->GetAI = &GetAI_boss_midnight; + pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/karazhan/boss_moroes.cpp b/scripts/eastern_kingdoms/karazhan/boss_moroes.cpp index 19fe82a71..69a0ba733 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_moroes.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_moroes.cpp @@ -805,40 +805,40 @@ CreatureAI* GetAI_lord_crispin_ference(Creature* pCreature) void AddSC_boss_moroes() { - Script* newscript; - - newscript = new Script; - newscript->Name = "boss_moroes"; - newscript->GetAI = &GetAI_boss_moroes; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "boss_baroness_dorothea_millstipe"; - newscript->GetAI = &GetAI_baroness_dorothea_millstipe; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "boss_baron_rafe_dreuger"; - newscript->GetAI = &GetAI_baron_rafe_dreuger; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "boss_lady_catriona_von_indi"; - newscript->GetAI = &GetAI_lady_catriona_von_indi; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "boss_lady_keira_berrybuck"; - newscript->GetAI = &GetAI_lady_keira_berrybuck; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "boss_lord_robin_daris"; - newscript->GetAI = &GetAI_lord_robin_daris; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "boss_lord_crispin_ference"; - newscript->GetAI = &GetAI_lord_crispin_ference; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_moroes"; + pNewScript->GetAI = &GetAI_boss_moroes; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "boss_baroness_dorothea_millstipe"; + pNewScript->GetAI = &GetAI_baroness_dorothea_millstipe; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "boss_baron_rafe_dreuger"; + pNewScript->GetAI = &GetAI_baron_rafe_dreuger; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "boss_lady_catriona_von_indi"; + pNewScript->GetAI = &GetAI_lady_catriona_von_indi; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "boss_lady_keira_berrybuck"; + pNewScript->GetAI = &GetAI_lady_keira_berrybuck; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "boss_lord_robin_daris"; + pNewScript->GetAI = &GetAI_lord_robin_daris; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "boss_lord_crispin_ference"; + pNewScript->GetAI = &GetAI_lord_crispin_ference; + pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/karazhan/boss_netherspite.cpp b/scripts/eastern_kingdoms/karazhan/boss_netherspite.cpp index 442525d0c..cb15f8130 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_netherspite.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_netherspite.cpp @@ -217,10 +217,10 @@ CreatureAI* GetAI_boss_netherspite(Creature* pCreature) void AddSC_boss_netherspite() { - Script* newscript; + Script* pNewScript; - newscript = new Script; - newscript->Name = "boss_netherspite"; - newscript->GetAI = &GetAI_boss_netherspite; - newscript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "boss_netherspite"; + pNewScript->GetAI = &GetAI_boss_netherspite; + pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/karazhan/boss_shade_of_aran.cpp b/scripts/eastern_kingdoms/karazhan/boss_shade_of_aran.cpp index 325d6c677..e10e2c028 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_shade_of_aran.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_shade_of_aran.cpp @@ -546,15 +546,15 @@ CreatureAI* GetAI_water_elemental(Creature* pCreature) void AddSC_boss_shade_of_aran() { - Script* newscript; + Script* pNewScript; - newscript = new Script; - newscript->Name = "boss_shade_of_aran"; - newscript->GetAI = &GetAI_boss_aran; - newscript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "boss_shade_of_aran"; + pNewScript->GetAI = &GetAI_boss_aran; + pNewScript->RegisterSelf(); - newscript = new Script; - newscript->Name = "mob_aran_elemental"; - newscript->GetAI = &GetAI_water_elemental; - newscript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "mob_aran_elemental"; + pNewScript->GetAI = &GetAI_water_elemental; + pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/karazhan/boss_terestian_illhoof.cpp b/scripts/eastern_kingdoms/karazhan/boss_terestian_illhoof.cpp index 7e278a3c0..620cf3029 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_terestian_illhoof.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_terestian_illhoof.cpp @@ -333,20 +333,20 @@ CreatureAI* GetAI_boss_terestian_illhoof(Creature* pCreature) void AddSC_boss_terestian_illhoof() { - Script* newscript; - - newscript = new Script; - newscript->Name = "boss_terestian_illhoof"; - newscript->GetAI = &GetAI_boss_terestian_illhoof; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_fiendish_portal"; - newscript->GetAI = &GetAI_npc_fiendish_portal; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "mob_demon_chain"; - newscript->GetAI = &GetAI_mob_demon_chain; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_terestian_illhoof"; + pNewScript->GetAI = &GetAI_boss_terestian_illhoof; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_fiendish_portal"; + pNewScript->GetAI = &GetAI_npc_fiendish_portal; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "mob_demon_chain"; + pNewScript->GetAI = &GetAI_mob_demon_chain; + pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/karazhan/bosses_opera.cpp b/scripts/eastern_kingdoms/karazhan/bosses_opera.cpp index 973366af8..5457850df 100644 --- a/scripts/eastern_kingdoms/karazhan/bosses_opera.cpp +++ b/scripts/eastern_kingdoms/karazhan/bosses_opera.cpp @@ -1456,64 +1456,64 @@ CreatureAI* GetAI_boss_romulo(Creature* pCreature) void AddSC_bosses_opera() { - Script* newscript; + Script* pNewScript; // Oz - newscript = new Script; - newscript->GetAI = &GetAI_boss_dorothee; - newscript->Name = "boss_dorothee"; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->GetAI = &GetAI_boss_strawman; - newscript->Name = "boss_strawman"; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->GetAI = &GetAI_boss_tinhead; - newscript->Name = "boss_tinhead"; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->GetAI = &GetAI_boss_roar; - newscript->Name = "boss_roar"; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->GetAI = &GetAI_boss_crone; - newscript->Name = "boss_crone"; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->GetAI = &GetAI_mob_tito; - newscript->Name = "mob_tito"; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->GetAI = &GetAI_mob_cyclone; - newscript->Name = "mob_cyclone"; - newscript->RegisterSelf(); + pNewScript = new Script; + pNewScript->GetAI = &GetAI_boss_dorothee; + pNewScript->Name = "boss_dorothee"; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->GetAI = &GetAI_boss_strawman; + pNewScript->Name = "boss_strawman"; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->GetAI = &GetAI_boss_tinhead; + pNewScript->Name = "boss_tinhead"; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->GetAI = &GetAI_boss_roar; + pNewScript->Name = "boss_roar"; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->GetAI = &GetAI_boss_crone; + pNewScript->Name = "boss_crone"; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->GetAI = &GetAI_mob_tito; + pNewScript->Name = "mob_tito"; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->GetAI = &GetAI_mob_cyclone; + pNewScript->Name = "mob_cyclone"; + pNewScript->RegisterSelf(); // Hood - newscript = new Script; - newscript->pGossipHello = &GossipHello_npc_grandmother; - newscript->pGossipSelect = &GossipSelect_npc_grandmother; - newscript->Name = "npc_grandmother"; - newscript->RegisterSelf(); + pNewScript = new Script; + pNewScript->pGossipHello = &GossipHello_npc_grandmother; + pNewScript->pGossipSelect = &GossipSelect_npc_grandmother; + pNewScript->Name = "npc_grandmother"; + pNewScript->RegisterSelf(); - newscript = new Script; - newscript->GetAI = &GetAI_boss_bigbadwolf; - newscript->Name = "boss_bigbadwolf"; - newscript->RegisterSelf(); + pNewScript = new Script; + pNewScript->GetAI = &GetAI_boss_bigbadwolf; + pNewScript->Name = "boss_bigbadwolf"; + pNewScript->RegisterSelf(); // Romeo And Juliet - newscript = new Script; - newscript->GetAI = &GetAI_boss_julianne; - newscript->Name = "boss_julianne"; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->GetAI = &GetAI_boss_romulo; - newscript->Name = "boss_romulo"; - newscript->RegisterSelf(); + pNewScript = new Script; + pNewScript->GetAI = &GetAI_boss_julianne; + pNewScript->Name = "boss_julianne"; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->GetAI = &GetAI_boss_romulo; + pNewScript->Name = "boss_romulo"; + pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/karazhan/karazhan.cpp b/scripts/eastern_kingdoms/karazhan/karazhan.cpp index db605b7d6..9505119fb 100644 --- a/scripts/eastern_kingdoms/karazhan/karazhan.cpp +++ b/scripts/eastern_kingdoms/karazhan/karazhan.cpp @@ -416,18 +416,18 @@ bool GossipSelect_npc_berthold(Player* pPlayer, Creature* pCreature, uint32 uiSe void AddSC_karazhan() { - Script* newscript; - - newscript = new Script; - newscript->Name = "npc_barnes"; - newscript->GetAI = &GetAI_npc_barnesAI; - newscript->pGossipHello = &GossipHello_npc_barnes; - newscript->pGossipSelect = &GossipSelect_npc_barnes; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_berthold"; - newscript->pGossipHello = &GossipHello_npc_berthold; - newscript->pGossipSelect = &GossipSelect_npc_berthold; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "npc_barnes"; + pNewScript->GetAI = &GetAI_npc_barnesAI; + pNewScript->pGossipHello = &GossipHello_npc_barnes; + pNewScript->pGossipSelect = &GossipSelect_npc_barnes; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_berthold"; + pNewScript->pGossipHello = &GossipHello_npc_berthold; + pNewScript->pGossipSelect = &GossipSelect_npc_berthold; + pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/loch_modan.cpp b/scripts/eastern_kingdoms/loch_modan.cpp index e7d4ba87b..1ea12bf04 100644 --- a/scripts/eastern_kingdoms/loch_modan.cpp +++ b/scripts/eastern_kingdoms/loch_modan.cpp @@ -179,17 +179,17 @@ CreatureAI* GetAI_npc_miran(Creature* pCreature) void AddSC_loch_modan() { - Script* newscript; - - newscript = new Script; - newscript->Name = "npc_mountaineer_pebblebitty"; - newscript->pGossipHello = &GossipHello_npc_mountaineer_pebblebitty; - newscript->pGossipSelect = &GossipSelect_npc_mountaineer_pebblebitty; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_miran"; - newscript->GetAI = &GetAI_npc_miran; - newscript->pQuestAcceptNPC = &QuestAccept_npc_miran; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "npc_mountaineer_pebblebitty"; + pNewScript->pGossipHello = &GossipHello_npc_mountaineer_pebblebitty; + pNewScript->pGossipSelect = &GossipSelect_npc_mountaineer_pebblebitty; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_miran"; + pNewScript->GetAI = &GetAI_npc_miran; + pNewScript->pQuestAcceptNPC = &QuestAccept_npc_miran; + pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/magisters_terrace/boss_felblood_kaelthas.cpp b/scripts/eastern_kingdoms/magisters_terrace/boss_felblood_kaelthas.cpp index aef2904a3..41a98a7be 100644 --- a/scripts/eastern_kingdoms/magisters_terrace/boss_felblood_kaelthas.cpp +++ b/scripts/eastern_kingdoms/magisters_terrace/boss_felblood_kaelthas.cpp @@ -601,25 +601,25 @@ CreatureAI* GetAI_mob_felkael_phoenix_egg(Creature* pCreature) void AddSC_boss_felblood_kaelthas() { - Script *newscript; - - newscript = new Script; - newscript->Name = "boss_felblood_kaelthas"; - newscript->GetAI = &GetAI_boss_felblood_kaelthas; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "mob_arcane_sphere"; - newscript->GetAI = &GetAI_mob_arcane_sphere; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "mob_felkael_phoenix"; - newscript->GetAI = &GetAI_mob_felkael_phoenix; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "mob_felkael_phoenix_egg"; - newscript->GetAI = &GetAI_mob_felkael_phoenix_egg; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_felblood_kaelthas"; + pNewScript->GetAI = &GetAI_boss_felblood_kaelthas; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "mob_arcane_sphere"; + pNewScript->GetAI = &GetAI_mob_arcane_sphere; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "mob_felkael_phoenix"; + pNewScript->GetAI = &GetAI_mob_felkael_phoenix; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "mob_felkael_phoenix_egg"; + pNewScript->GetAI = &GetAI_mob_felkael_phoenix_egg; + pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/magisters_terrace/boss_priestess_delrissa.cpp b/scripts/eastern_kingdoms/magisters_terrace/boss_priestess_delrissa.cpp index 939cc3083..8638caa05 100644 --- a/scripts/eastern_kingdoms/magisters_terrace/boss_priestess_delrissa.cpp +++ b/scripts/eastern_kingdoms/magisters_terrace/boss_priestess_delrissa.cpp @@ -1280,55 +1280,55 @@ CreatureAI* GetAI_zelfan(Creature* pCreature) void AddSC_boss_priestess_delrissa() { - Script *newscript; - - newscript = new Script; - newscript->Name = "boss_priestess_delrissa"; - newscript->GetAI = &GetAI_boss_priestess_delrissa; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "boss_kagani_nightstrike"; - newscript->GetAI = &GetAI_boss_kagani_nightstrike; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "boss_ellris_duskhallow"; - newscript->GetAI = &GetAI_ellris_duskhallow; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "boss_eramas_brightblaze"; - newscript->GetAI = &GetAI_eramas_brightblaze; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "boss_yazzai"; - newscript->GetAI = &GetAI_yazzai; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "boss_warlord_salaris"; - newscript->GetAI = &GetAI_warlord_salaris; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "boss_garaxxas"; - newscript->GetAI = &GetAI_garaxxas; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "boss_apoko"; - newscript->GetAI = &GetAI_apoko; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "boss_zelfan"; - newscript->GetAI = &GetAI_zelfan; - newscript->RegisterSelf(); - - /*newscript = new Script; - newscript->Name = "mob_high_explosive_sheep"; - newscript->GetAI = &GetAI_mob_high_explosive_sheep; - newscript->RegisterSelf();*/ + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_priestess_delrissa"; + pNewScript->GetAI = &GetAI_boss_priestess_delrissa; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "boss_kagani_nightstrike"; + pNewScript->GetAI = &GetAI_boss_kagani_nightstrike; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "boss_ellris_duskhallow"; + pNewScript->GetAI = &GetAI_ellris_duskhallow; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "boss_eramas_brightblaze"; + pNewScript->GetAI = &GetAI_eramas_brightblaze; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "boss_yazzai"; + pNewScript->GetAI = &GetAI_yazzai; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "boss_warlord_salaris"; + pNewScript->GetAI = &GetAI_warlord_salaris; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "boss_garaxxas"; + pNewScript->GetAI = &GetAI_garaxxas; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "boss_apoko"; + pNewScript->GetAI = &GetAI_apoko; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "boss_zelfan"; + pNewScript->GetAI = &GetAI_zelfan; + pNewScript->RegisterSelf(); + + /*pNewScript = new Script; + pNewScript->Name = "mob_high_explosive_sheep"; + pNewScript->GetAI = &GetAI_mob_high_explosive_sheep; + pNewScript->RegisterSelf();*/ } diff --git a/scripts/eastern_kingdoms/magisters_terrace/boss_vexallus.cpp b/scripts/eastern_kingdoms/magisters_terrace/boss_vexallus.cpp index fa14d8e1b..013612d53 100644 --- a/scripts/eastern_kingdoms/magisters_terrace/boss_vexallus.cpp +++ b/scripts/eastern_kingdoms/magisters_terrace/boss_vexallus.cpp @@ -217,15 +217,15 @@ CreatureAI* GetAI_mob_pure_energy(Creature* pCreature) void AddSC_boss_vexallus() { - Script *newscript; + Script* pNewScript; - newscript = new Script; - newscript->Name = "boss_vexallus"; - newscript->GetAI = &GetAI_boss_vexallus; - newscript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "boss_vexallus"; + pNewScript->GetAI = &GetAI_boss_vexallus; + pNewScript->RegisterSelf(); - newscript = new Script; - newscript->Name = "mob_pure_energy"; - newscript->GetAI = &GetAI_mob_pure_energy; - newscript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "mob_pure_energy"; + pNewScript->GetAI = &GetAI_mob_pure_energy; + pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.cpp b/scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.cpp index 680ad286e..e012bdbb7 100644 --- a/scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.cpp +++ b/scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.cpp @@ -163,12 +163,12 @@ bool GossipSelect_npc_kalecgos(Player* pPlayer, Creature* pCreature, uint32 uiSe void AddSC_magisters_terrace() { - Script *newscript; - - newscript = new Script; - newscript->Name = "npc_kalecgos"; - newscript->GetAI = &GetAI_npc_kalecgos; - newscript->pGossipHello = &GossipHello_npc_kalecgos; - newscript->pGossipSelect = &GossipSelect_npc_kalecgos; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "npc_kalecgos"; + pNewScript->GetAI = &GetAI_npc_kalecgos; + pNewScript->pGossipHello = &GossipHello_npc_kalecgos; + pNewScript->pGossipSelect = &GossipSelect_npc_kalecgos; + pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/redridge_mountains.cpp b/scripts/eastern_kingdoms/redridge_mountains.cpp index eaf73c6d8..622575997 100644 --- a/scripts/eastern_kingdoms/redridge_mountains.cpp +++ b/scripts/eastern_kingdoms/redridge_mountains.cpp @@ -135,11 +135,11 @@ bool QuestAccept_npc_corporal_keeshan(Player* pPlayer, Creature* pCreature, cons void AddSC_redridge_mountains() { - Script* NewScript; + Script* pNewScript; - NewScript = new Script; - NewScript->Name = "npc_corporal_keeshan"; - NewScript->GetAI = &GetAI_npc_corporal_keeshan; - NewScript->pQuestAcceptNPC = &QuestAccept_npc_corporal_keeshan; - NewScript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "npc_corporal_keeshan"; + pNewScript->GetAI = &GetAI_npc_corporal_keeshan; + pNewScript->pQuestAcceptNPC = &QuestAccept_npc_corporal_keeshan; + pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/scarlet_monastery/boss_arcanist_doan.cpp b/scripts/eastern_kingdoms/scarlet_monastery/boss_arcanist_doan.cpp index 7fa26c4c5..9adceba35 100644 --- a/scripts/eastern_kingdoms/scarlet_monastery/boss_arcanist_doan.cpp +++ b/scripts/eastern_kingdoms/scarlet_monastery/boss_arcanist_doan.cpp @@ -119,9 +119,10 @@ CreatureAI* GetAI_boss_arcanist_doan(Creature* pCreature) void AddSC_boss_arcanist_doan() { - Script *newscript; - newscript = new Script; - newscript->Name = "boss_arcanist_doan"; - newscript->GetAI = &GetAI_boss_arcanist_doan; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_arcanist_doan"; + pNewScript->GetAI = &GetAI_boss_arcanist_doan; + pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/scarlet_monastery/boss_azshir_the_sleepless.cpp b/scripts/eastern_kingdoms/scarlet_monastery/boss_azshir_the_sleepless.cpp index dcb3b6d47..eab9422c0 100644 --- a/scripts/eastern_kingdoms/scarlet_monastery/boss_azshir_the_sleepless.cpp +++ b/scripts/eastern_kingdoms/scarlet_monastery/boss_azshir_the_sleepless.cpp @@ -85,9 +85,10 @@ CreatureAI* GetAI_boss_azshir_the_sleepless(Creature* pCreature) void AddSC_boss_azshir_the_sleepless() { - Script *newscript; - newscript = new Script; - newscript->Name = "boss_azshir_the_sleepless"; - newscript->GetAI = &GetAI_boss_azshir_the_sleepless; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_azshir_the_sleepless"; + pNewScript->GetAI = &GetAI_boss_azshir_the_sleepless; + pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/scarlet_monastery/boss_bloodmage_thalnos.cpp b/scripts/eastern_kingdoms/scarlet_monastery/boss_bloodmage_thalnos.cpp index a7b992d8e..feb77986d 100644 --- a/scripts/eastern_kingdoms/scarlet_monastery/boss_bloodmage_thalnos.cpp +++ b/scripts/eastern_kingdoms/scarlet_monastery/boss_bloodmage_thalnos.cpp @@ -115,9 +115,10 @@ CreatureAI* GetAI_boss_bloodmage_thalnos(Creature* pCreature) void AddSC_boss_bloodmage_thalnos() { - Script *newscript; - newscript = new Script; - newscript->Name = "boss_bloodmage_thalnos"; - newscript->GetAI = &GetAI_boss_bloodmage_thalnos; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_bloodmage_thalnos"; + pNewScript->GetAI = &GetAI_boss_bloodmage_thalnos; + pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/scarlet_monastery/boss_headless_horseman.cpp b/scripts/eastern_kingdoms/scarlet_monastery/boss_headless_horseman.cpp index ed726d319..2a2445bab 100644 --- a/scripts/eastern_kingdoms/scarlet_monastery/boss_headless_horseman.cpp +++ b/scripts/eastern_kingdoms/scarlet_monastery/boss_headless_horseman.cpp @@ -81,10 +81,10 @@ CreatureAI* GetAI_boss_headless_horseman(Creature* pCreature) void AddSC_boss_headless_horseman() { - Script* NewScript; + Script* pNewScript; - NewScript = new Script; - NewScript->Name = "boss_headless_horseman"; - NewScript->GetAI = GetAI_boss_headless_horseman; - NewScript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "boss_headless_horseman"; + pNewScript->GetAI = GetAI_boss_headless_horseman; + pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/scarlet_monastery/boss_herod.cpp b/scripts/eastern_kingdoms/scarlet_monastery/boss_herod.cpp index 2ea2a4766..9e1477366 100644 --- a/scripts/eastern_kingdoms/scarlet_monastery/boss_herod.cpp +++ b/scripts/eastern_kingdoms/scarlet_monastery/boss_herod.cpp @@ -175,6 +175,7 @@ CreatureAI* GetAI_mob_scarlet_trainee(Creature* pCreature) void AddSC_boss_herod() { Script* pNewScript; + pNewScript = new Script; pNewScript->Name = "boss_herod"; pNewScript->GetAI = &GetAI_boss_herod; diff --git a/scripts/eastern_kingdoms/scarlet_monastery/boss_high_inquisitor_fairbanks.cpp b/scripts/eastern_kingdoms/scarlet_monastery/boss_high_inquisitor_fairbanks.cpp index 79fdf60c1..a3d8b7bc0 100644 --- a/scripts/eastern_kingdoms/scarlet_monastery/boss_high_inquisitor_fairbanks.cpp +++ b/scripts/eastern_kingdoms/scarlet_monastery/boss_high_inquisitor_fairbanks.cpp @@ -120,9 +120,10 @@ CreatureAI* GetAI_boss_high_inquisitor_fairbanks(Creature* pCreature) void AddSC_boss_high_inquisitor_fairbanks() { - Script *newscript; - newscript = new Script; - newscript->Name = "boss_high_inquisitor_fairbanks"; - newscript->GetAI = &GetAI_boss_high_inquisitor_fairbanks; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_high_inquisitor_fairbanks"; + pNewScript->GetAI = &GetAI_boss_high_inquisitor_fairbanks; + pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/scarlet_monastery/boss_houndmaster_loksey.cpp b/scripts/eastern_kingdoms/scarlet_monastery/boss_houndmaster_loksey.cpp index 973ec8a8e..d5156cd32 100644 --- a/scripts/eastern_kingdoms/scarlet_monastery/boss_houndmaster_loksey.cpp +++ b/scripts/eastern_kingdoms/scarlet_monastery/boss_houndmaster_loksey.cpp @@ -69,9 +69,10 @@ CreatureAI* GetAI_boss_houndmaster_loksey(Creature* pCreature) void AddSC_boss_houndmaster_loksey() { - Script *newscript; - newscript = new Script; - newscript->Name = "boss_houndmaster_loksey"; - newscript->GetAI = &GetAI_boss_houndmaster_loksey; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_houndmaster_loksey"; + pNewScript->GetAI = &GetAI_boss_houndmaster_loksey; + pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/scarlet_monastery/boss_interrogator_vishas.cpp b/scripts/eastern_kingdoms/scarlet_monastery/boss_interrogator_vishas.cpp index d4678751f..1f874f7dc 100644 --- a/scripts/eastern_kingdoms/scarlet_monastery/boss_interrogator_vishas.cpp +++ b/scripts/eastern_kingdoms/scarlet_monastery/boss_interrogator_vishas.cpp @@ -112,9 +112,10 @@ CreatureAI* GetAI_boss_interrogator_vishas(Creature* pCreature) void AddSC_boss_interrogator_vishas() { - Script *newscript; - newscript = new Script; - newscript->Name = "boss_interrogator_vishas"; - newscript->GetAI = &GetAI_boss_interrogator_vishas; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_interrogator_vishas"; + pNewScript->GetAI = &GetAI_boss_interrogator_vishas; + pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/scarlet_monastery/boss_mograine_and_whitemane.cpp b/scripts/eastern_kingdoms/scarlet_monastery/boss_mograine_and_whitemane.cpp index d5a01dcfe..8ce2ad560 100644 --- a/scripts/eastern_kingdoms/scarlet_monastery/boss_mograine_and_whitemane.cpp +++ b/scripts/eastern_kingdoms/scarlet_monastery/boss_mograine_and_whitemane.cpp @@ -383,15 +383,15 @@ CreatureAI* GetAI_boss_high_inquisitor_whitemane(Creature* pCreature) void AddSC_boss_mograine_and_whitemane() { - Script *newscript; + Script* pNewScript; - newscript = new Script; - newscript->Name = "boss_scarlet_commander_mograine"; - newscript->GetAI = &GetAI_boss_scarlet_commander_mograine; - newscript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "boss_scarlet_commander_mograine"; + pNewScript->GetAI = &GetAI_boss_scarlet_commander_mograine; + pNewScript->RegisterSelf(); - newscript = new Script; - newscript->Name = "boss_high_inquisitor_whitemane"; - newscript->GetAI = &GetAI_boss_high_inquisitor_whitemane; - newscript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "boss_high_inquisitor_whitemane"; + pNewScript->GetAI = &GetAI_boss_high_inquisitor_whitemane; + pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/scarlet_monastery/boss_scorn.cpp b/scripts/eastern_kingdoms/scarlet_monastery/boss_scorn.cpp index 3f2b01490..982a22d8f 100644 --- a/scripts/eastern_kingdoms/scarlet_monastery/boss_scorn.cpp +++ b/scripts/eastern_kingdoms/scarlet_monastery/boss_scorn.cpp @@ -88,9 +88,10 @@ CreatureAI* GetAI_boss_scorn(Creature* pCreature) void AddSC_boss_scorn() { - Script *newscript; - newscript = new Script; - newscript->Name = "boss_scorn"; - newscript->GetAI = &GetAI_boss_scorn; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_scorn"; + pNewScript->GetAI = &GetAI_boss_scorn; + pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/scholomance/boss_death_knight_darkreaver.cpp b/scripts/eastern_kingdoms/scholomance/boss_death_knight_darkreaver.cpp index 4006f3b75..6e8b82a58 100644 --- a/scripts/eastern_kingdoms/scholomance/boss_death_knight_darkreaver.cpp +++ b/scripts/eastern_kingdoms/scholomance/boss_death_knight_darkreaver.cpp @@ -47,10 +47,10 @@ CreatureAI* GetAI_boss_death_knight_darkreaver(Creature* pCreature) void AddSC_boss_death_knight_darkreaver() { - Script *newscript; + Script* pNewScript; - newscript = new Script; - newscript->Name = "boss_death_knight_darkreaver"; - newscript->GetAI = &GetAI_boss_death_knight_darkreaver; - newscript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "boss_death_knight_darkreaver"; + pNewScript->GetAI = &GetAI_boss_death_knight_darkreaver; + pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/scholomance/boss_jandice_barov.cpp b/scripts/eastern_kingdoms/scholomance/boss_jandice_barov.cpp index 4203ad040..43ac1ee4c 100644 --- a/scripts/eastern_kingdoms/scholomance/boss_jandice_barov.cpp +++ b/scripts/eastern_kingdoms/scholomance/boss_jandice_barov.cpp @@ -188,14 +188,15 @@ CreatureAI* GetAI_mob_illusionofjandicebarov(Creature* pCreature) void AddSC_boss_jandicebarov() { - Script *newscript; - newscript = new Script; - newscript->Name = "boss_jandice_barov"; - newscript->GetAI = &GetAI_boss_jandicebarov; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "mob_illusionofjandicebarov"; - newscript->GetAI = &GetAI_mob_illusionofjandicebarov; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_jandice_barov"; + pNewScript->GetAI = &GetAI_boss_jandicebarov; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "mob_illusionofjandicebarov"; + pNewScript->GetAI = &GetAI_mob_illusionofjandicebarov; + pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/scholomance/boss_kormok.cpp b/scripts/eastern_kingdoms/scholomance/boss_kormok.cpp index 52237d52a..443aca2ab 100644 --- a/scripts/eastern_kingdoms/scholomance/boss_kormok.cpp +++ b/scripts/eastern_kingdoms/scholomance/boss_kormok.cpp @@ -145,9 +145,10 @@ CreatureAI* GetAI_boss_kormok(Creature* pCreature) void AddSC_boss_kormok() { - Script *newscript; - newscript = new Script; - newscript->Name = "boss_kormok"; - newscript->GetAI = &GetAI_boss_kormok; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_kormok"; + pNewScript->GetAI = &GetAI_boss_kormok; + pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/scholomance/boss_vectus.cpp b/scripts/eastern_kingdoms/scholomance/boss_vectus.cpp index 2e731251b..3ae9d2057 100644 --- a/scripts/eastern_kingdoms/scholomance/boss_vectus.cpp +++ b/scripts/eastern_kingdoms/scholomance/boss_vectus.cpp @@ -95,9 +95,10 @@ CreatureAI* GetAI_boss_vectus(Creature* pCreature) void AddSC_boss_vectus() { - Script *newscript; - newscript = new Script; - newscript->Name = "boss_vectus"; - newscript->GetAI = &GetAI_boss_vectus; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_vectus"; + pNewScript->GetAI = &GetAI_boss_vectus; + pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/searing_gorge.cpp b/scripts/eastern_kingdoms/searing_gorge.cpp index 466b5b70d..e3ab9832b 100644 --- a/scripts/eastern_kingdoms/searing_gorge.cpp +++ b/scripts/eastern_kingdoms/searing_gorge.cpp @@ -137,23 +137,23 @@ bool GossipSelect_npc_zamael_lunthistle(Player* pPlayer, Creature* pCreature, ui void AddSC_searing_gorge() { - Script *newscript; - - newscript = new Script; - newscript->Name = "npc_kalaran_windblade"; - newscript->pGossipHello = &GossipHello_npc_kalaran_windblade; - newscript->pGossipSelect = &GossipSelect_npc_kalaran_windblade; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_lothos_riftwaker"; - newscript->pGossipHello = &GossipHello_npc_lothos_riftwaker; - newscript->pGossipSelect = &GossipSelect_npc_lothos_riftwaker; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_zamael_lunthistle"; - newscript->pGossipHello = &GossipHello_npc_zamael_lunthistle; - newscript->pGossipSelect = &GossipSelect_npc_zamael_lunthistle; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "npc_kalaran_windblade"; + pNewScript->pGossipHello = &GossipHello_npc_kalaran_windblade; + pNewScript->pGossipSelect = &GossipSelect_npc_kalaran_windblade; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_lothos_riftwaker"; + pNewScript->pGossipHello = &GossipHello_npc_lothos_riftwaker; + pNewScript->pGossipSelect = &GossipSelect_npc_lothos_riftwaker; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_zamael_lunthistle"; + pNewScript->pGossipHello = &GossipHello_npc_zamael_lunthistle; + pNewScript->pGossipSelect = &GossipSelect_npc_zamael_lunthistle; + pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.cpp b/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.cpp index e39c6901d..ee8ad69ea 100644 --- a/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.cpp +++ b/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.cpp @@ -901,7 +901,7 @@ CreatureAI* GetAI_npc_deathstalker_vincent(Creature* pCreature) void AddSC_shadowfang_keep() { - Script *pNewScript; + Script* pNewScript; pNewScript = new Script; pNewScript->Name = "npc_shadowfang_prisoner"; diff --git a/scripts/eastern_kingdoms/silvermoon_city.cpp b/scripts/eastern_kingdoms/silvermoon_city.cpp index dcbd26607..5c09906a7 100644 --- a/scripts/eastern_kingdoms/silvermoon_city.cpp +++ b/scripts/eastern_kingdoms/silvermoon_city.cpp @@ -88,9 +88,10 @@ CreatureAI* GetAI_npc_blood_knight_stillblade(Creature* pCreature) void AddSC_silvermoon_city() { - Script *newscript; - newscript = new Script; - newscript->Name = "npc_blood_knight_stillblade"; - newscript->GetAI = &GetAI_npc_blood_knight_stillblade; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "npc_blood_knight_stillblade"; + pNewScript->GetAI = &GetAI_npc_blood_knight_stillblade; + pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/silverpine_forest.cpp b/scripts/eastern_kingdoms/silverpine_forest.cpp index 2c39d77af..9b33c7893 100644 --- a/scripts/eastern_kingdoms/silverpine_forest.cpp +++ b/scripts/eastern_kingdoms/silverpine_forest.cpp @@ -304,17 +304,17 @@ CreatureAI* GetAI_npc_deathstalker_faerleia(Creature* pCreature) void AddSC_silverpine_forest() { - Script* newscript; - - newscript = new Script; - newscript->Name = "npc_deathstalker_erland"; - newscript->GetAI = &GetAI_npc_deathstalker_erland; - newscript->pQuestAcceptNPC = &QuestAccept_npc_deathstalker_erland; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_deathstalker_faerleia"; - newscript->GetAI = &GetAI_npc_deathstalker_faerleia; - newscript->pQuestAcceptNPC = &QuestAccept_npc_deathstalker_faerleia; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "npc_deathstalker_erland"; + pNewScript->GetAI = &GetAI_npc_deathstalker_erland; + pNewScript->pQuestAcceptNPC = &QuestAccept_npc_deathstalker_erland; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_deathstalker_faerleia"; + pNewScript->GetAI = &GetAI_npc_deathstalker_faerleia; + pNewScript->pQuestAcceptNPC = &QuestAccept_npc_deathstalker_faerleia; + pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/stormwind_city.cpp b/scripts/eastern_kingdoms/stormwind_city.cpp index e1885123d..c1f5d9056 100644 --- a/scripts/eastern_kingdoms/stormwind_city.cpp +++ b/scripts/eastern_kingdoms/stormwind_city.cpp @@ -240,29 +240,29 @@ bool GossipSelect_npc_lady_katrana_prestor(Player* pPlayer, Creature* pCreature, void AddSC_stormwind_city() { - Script *newscript; - - newscript = new Script; - newscript->Name = "npc_archmage_malin"; - newscript->pGossipHello = &GossipHello_npc_archmage_malin; - newscript->pGossipSelect = &GossipSelect_npc_archmage_malin; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_bartleby"; - newscript->GetAI = &GetAI_npc_bartleby; - newscript->pQuestAcceptNPC = &QuestAccept_npc_bartleby; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_dashel_stonefist"; - newscript->GetAI = &GetAI_npc_dashel_stonefist; - newscript->pQuestAcceptNPC = &QuestAccept_npc_dashel_stonefist; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_lady_katrana_prestor"; - newscript->pGossipHello = &GossipHello_npc_lady_katrana_prestor; - newscript->pGossipSelect = &GossipSelect_npc_lady_katrana_prestor; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "npc_archmage_malin"; + pNewScript->pGossipHello = &GossipHello_npc_archmage_malin; + pNewScript->pGossipSelect = &GossipSelect_npc_archmage_malin; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_bartleby"; + pNewScript->GetAI = &GetAI_npc_bartleby; + pNewScript->pQuestAcceptNPC = &QuestAccept_npc_bartleby; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_dashel_stonefist"; + pNewScript->GetAI = &GetAI_npc_dashel_stonefist; + pNewScript->pQuestAcceptNPC = &QuestAccept_npc_dashel_stonefist; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_lady_katrana_prestor"; + pNewScript->pGossipHello = &GossipHello_npc_lady_katrana_prestor; + pNewScript->pGossipSelect = &GossipSelect_npc_lady_katrana_prestor; + pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/stranglethorn_vale.cpp b/scripts/eastern_kingdoms/stranglethorn_vale.cpp index 88734de68..94438017a 100644 --- a/scripts/eastern_kingdoms/stranglethorn_vale.cpp +++ b/scripts/eastern_kingdoms/stranglethorn_vale.cpp @@ -98,10 +98,10 @@ CreatureAI* GetAI_mob_yenniku(Creature *_Creature) void AddSC_stranglethorn_vale() { - Script *newscript; + Script* pNewScript; - newscript = new Script; - newscript->Name = "mob_yenniku"; - newscript->GetAI = &GetAI_mob_yenniku; - newscript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "mob_yenniku"; + pNewScript->GetAI = &GetAI_mob_yenniku; + pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/stratholme/boss_baroness_anastari.cpp b/scripts/eastern_kingdoms/stratholme/boss_baroness_anastari.cpp index a94739f9d..1ea146931 100644 --- a/scripts/eastern_kingdoms/stratholme/boss_baroness_anastari.cpp +++ b/scripts/eastern_kingdoms/stratholme/boss_baroness_anastari.cpp @@ -104,9 +104,10 @@ CreatureAI* GetAI_boss_baroness_anastari(Creature* pCreature) void AddSC_boss_baroness_anastari() { - Script *newscript; - newscript = new Script; - newscript->Name = "boss_baroness_anastari"; - newscript->GetAI = &GetAI_boss_baroness_anastari; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_baroness_anastari"; + pNewScript->GetAI = &GetAI_boss_baroness_anastari; + pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/stratholme/boss_cannon_master_willey.cpp b/scripts/eastern_kingdoms/stratholme/boss_cannon_master_willey.cpp index 91bdc8615..2d0d44697 100644 --- a/scripts/eastern_kingdoms/stratholme/boss_cannon_master_willey.cpp +++ b/scripts/eastern_kingdoms/stratholme/boss_cannon_master_willey.cpp @@ -207,9 +207,10 @@ CreatureAI* GetAI_boss_cannon_master_willey(Creature* pCreature) void AddSC_boss_cannon_master_willey() { - Script *newscript; - newscript = new Script; - newscript->Name = "boss_cannon_master_willey"; - newscript->GetAI = &GetAI_boss_cannon_master_willey; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_cannon_master_willey"; + pNewScript->GetAI = &GetAI_boss_cannon_master_willey; + pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/stratholme/boss_dathrohan_balnazzar.cpp b/scripts/eastern_kingdoms/stratholme/boss_dathrohan_balnazzar.cpp index 8e12d5262..cd37ffd17 100644 --- a/scripts/eastern_kingdoms/stratholme/boss_dathrohan_balnazzar.cpp +++ b/scripts/eastern_kingdoms/stratholme/boss_dathrohan_balnazzar.cpp @@ -222,9 +222,10 @@ CreatureAI* GetAI_boss_dathrohan_balnazzar(Creature* pCreature) void AddSC_boss_dathrohan_balnazzar() { - Script *newscript; - newscript = new Script; - newscript->Name = "boss_dathrohan_balnazzar"; - newscript->GetAI = &GetAI_boss_dathrohan_balnazzar; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_dathrohan_balnazzar"; + pNewScript->GetAI = &GetAI_boss_dathrohan_balnazzar; + pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/stratholme/boss_magistrate_barthilas.cpp b/scripts/eastern_kingdoms/stratholme/boss_magistrate_barthilas.cpp index d22b368fb..216e353ba 100644 --- a/scripts/eastern_kingdoms/stratholme/boss_magistrate_barthilas.cpp +++ b/scripts/eastern_kingdoms/stratholme/boss_magistrate_barthilas.cpp @@ -120,9 +120,10 @@ CreatureAI* GetAI_boss_magistrate_barthilas(Creature* pCreature) void AddSC_boss_magistrate_barthilas() { - Script *newscript; - newscript = new Script; - newscript->Name = "boss_magistrate_barthilas"; - newscript->GetAI = &GetAI_boss_magistrate_barthilas; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_magistrate_barthilas"; + pNewScript->GetAI = &GetAI_boss_magistrate_barthilas; + pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/stratholme/boss_maleki_the_pallid.cpp b/scripts/eastern_kingdoms/stratholme/boss_maleki_the_pallid.cpp index d67a02757..c7744abf8 100644 --- a/scripts/eastern_kingdoms/stratholme/boss_maleki_the_pallid.cpp +++ b/scripts/eastern_kingdoms/stratholme/boss_maleki_the_pallid.cpp @@ -94,9 +94,10 @@ CreatureAI* GetAI_boss_maleki_the_pallid(Creature* pCreature) void AddSC_boss_maleki_the_pallid() { - Script *newscript; - newscript = new Script; - newscript->Name = "boss_maleki_the_pallid"; - newscript->GetAI = &GetAI_boss_maleki_the_pallid; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_maleki_the_pallid"; + pNewScript->GetAI = &GetAI_boss_maleki_the_pallid; + pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/stratholme/boss_nerubenkan.cpp b/scripts/eastern_kingdoms/stratholme/boss_nerubenkan.cpp index 6b2dfe750..565bc6e92 100644 --- a/scripts/eastern_kingdoms/stratholme/boss_nerubenkan.cpp +++ b/scripts/eastern_kingdoms/stratholme/boss_nerubenkan.cpp @@ -123,9 +123,10 @@ CreatureAI* GetAI_boss_nerubenkan(Creature* pCreature) void AddSC_boss_nerubenkan() { - Script *newscript; - newscript = new Script; - newscript->Name = "boss_nerubenkan"; - newscript->GetAI = &GetAI_boss_nerubenkan; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_nerubenkan"; + pNewScript->GetAI = &GetAI_boss_nerubenkan; + pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/stratholme/boss_order_of_silver_hand.cpp b/scripts/eastern_kingdoms/stratholme/boss_order_of_silver_hand.cpp index 2fd514fd3..48bc446d0 100644 --- a/scripts/eastern_kingdoms/stratholme/boss_order_of_silver_hand.cpp +++ b/scripts/eastern_kingdoms/stratholme/boss_order_of_silver_hand.cpp @@ -144,10 +144,10 @@ CreatureAI* GetAI_boss_silver_hand_bossesAI(Creature* pCreature) void AddSC_boss_order_of_silver_hand() { - Script *newscript; + Script* pNewScript; - newscript = new Script; - newscript->Name = "boss_silver_hand_bosses"; - newscript->GetAI = &GetAI_boss_silver_hand_bossesAI; - newscript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "boss_silver_hand_bosses"; + pNewScript->GetAI = &GetAI_boss_silver_hand_bossesAI; + pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/stratholme/boss_postmaster_malown.cpp b/scripts/eastern_kingdoms/stratholme/boss_postmaster_malown.cpp index 8d87ea9ec..72b005831 100644 --- a/scripts/eastern_kingdoms/stratholme/boss_postmaster_malown.cpp +++ b/scripts/eastern_kingdoms/stratholme/boss_postmaster_malown.cpp @@ -131,9 +131,10 @@ CreatureAI* GetAI_boss_postmaster_malown(Creature* pCreature) void AddSC_boss_postmaster_malown() { - Script *newscript; - newscript = new Script; - newscript->Name = "boss_postmaster_malown"; - newscript->GetAI = &GetAI_boss_postmaster_malown; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_postmaster_malown"; + pNewScript->GetAI = &GetAI_boss_postmaster_malown; + pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/stratholme/boss_ramstein_the_gorger.cpp b/scripts/eastern_kingdoms/stratholme/boss_ramstein_the_gorger.cpp index 15b65883a..433f33b86 100644 --- a/scripts/eastern_kingdoms/stratholme/boss_ramstein_the_gorger.cpp +++ b/scripts/eastern_kingdoms/stratholme/boss_ramstein_the_gorger.cpp @@ -75,9 +75,10 @@ CreatureAI* GetAI_boss_ramstein_the_gorger(Creature* pCreature) void AddSC_boss_ramstein_the_gorger() { - Script *newscript; - newscript = new Script; - newscript->Name = "boss_ramstein_the_gorger"; - newscript->GetAI = &GetAI_boss_ramstein_the_gorger; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_ramstein_the_gorger"; + pNewScript->GetAI = &GetAI_boss_ramstein_the_gorger; + pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/stratholme/boss_timmy_the_cruel.cpp b/scripts/eastern_kingdoms/stratholme/boss_timmy_the_cruel.cpp index e2d617dd8..c9d2672f7 100644 --- a/scripts/eastern_kingdoms/stratholme/boss_timmy_the_cruel.cpp +++ b/scripts/eastern_kingdoms/stratholme/boss_timmy_the_cruel.cpp @@ -62,9 +62,10 @@ CreatureAI* GetAI_boss_timmy_the_cruel(Creature* pCreature) void AddSC_boss_timmy_the_cruel() { - Script *newscript; - newscript = new Script; - newscript->Name = "boss_timmy_the_cruel"; - newscript->GetAI = &GetAI_boss_timmy_the_cruel; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_timmy_the_cruel"; + pNewScript->GetAI = &GetAI_boss_timmy_the_cruel; + pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/sunwell_plateau/boss_brutallus.cpp b/scripts/eastern_kingdoms/sunwell_plateau/boss_brutallus.cpp index dd20b48f5..dfc36e16c 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/boss_brutallus.cpp +++ b/scripts/eastern_kingdoms/sunwell_plateau/boss_brutallus.cpp @@ -207,15 +207,15 @@ bool AreaTrigger_at_madrigosa(Player* pPlayer, AreaTriggerEntry const* pAt) void AddSC_boss_brutallus() { - Script *newscript; + Script* pNewScript; - newscript = new Script; - newscript->Name = "boss_brutallus"; - newscript->GetAI = &GetAI_boss_brutallus; - newscript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "boss_brutallus"; + pNewScript->GetAI = &GetAI_boss_brutallus; + pNewScript->RegisterSelf(); - newscript = new Script; - newscript->Name = "at_madrigosa"; - newscript->pAreaTrigger = &AreaTrigger_at_madrigosa; - newscript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "at_madrigosa"; + pNewScript->pAreaTrigger = &AreaTrigger_at_madrigosa; + pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/sunwell_plateau/boss_kalecgos.cpp b/scripts/eastern_kingdoms/sunwell_plateau/boss_kalecgos.cpp index 504b3b0ba..5bc6b8c91 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/boss_kalecgos.cpp +++ b/scripts/eastern_kingdoms/sunwell_plateau/boss_kalecgos.cpp @@ -598,25 +598,25 @@ CreatureAI* GetAI_boss_kalecgos_humanoid(Creature* pCreature) void AddSC_boss_kalecgos() { - Script* newscript; - - newscript = new Script; - newscript->GetAI = &GetAI_boss_kalecgos; - newscript->Name = "boss_kalecgos"; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->GetAI = &GetAI_boss_sathrovarr; - newscript->Name = "boss_sathrovarr"; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->GetAI = &GetAI_boss_kalecgos_humanoid; - newscript->Name = "boss_kalecgos_humanoid"; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->pGOUse = &GOUse_go_spectral_rift; - newscript->Name = "go_spectral_rift"; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->GetAI = &GetAI_boss_kalecgos; + pNewScript->Name = "boss_kalecgos"; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->GetAI = &GetAI_boss_sathrovarr; + pNewScript->Name = "boss_sathrovarr"; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->GetAI = &GetAI_boss_kalecgos_humanoid; + pNewScript->Name = "boss_kalecgos_humanoid"; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->pGOUse = &GOUse_go_spectral_rift; + pNewScript->Name = "go_spectral_rift"; + pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/swamp_of_sorrows.cpp b/scripts/eastern_kingdoms/swamp_of_sorrows.cpp index 899238ed5..70930d39a 100644 --- a/scripts/eastern_kingdoms/swamp_of_sorrows.cpp +++ b/scripts/eastern_kingdoms/swamp_of_sorrows.cpp @@ -152,11 +152,11 @@ CreatureAI* GetAI_npc_galen_goodward(Creature* pCreature) void AddSC_swamp_of_sorrows() { - Script* newscript; + Script* pNewScript; - newscript = new Script; - newscript->Name = "npc_galen_goodward"; - newscript->GetAI = &GetAI_npc_galen_goodward; - newscript->pQuestAcceptNPC = &QuestAccept_npc_galen_goodward; - newscript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "npc_galen_goodward"; + pNewScript->GetAI = &GetAI_npc_galen_goodward; + pNewScript->pQuestAcceptNPC = &QuestAccept_npc_galen_goodward; + pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/tirisfal_glades.cpp b/scripts/eastern_kingdoms/tirisfal_glades.cpp index 5be648f2b..5639cac15 100644 --- a/scripts/eastern_kingdoms/tirisfal_glades.cpp +++ b/scripts/eastern_kingdoms/tirisfal_glades.cpp @@ -188,21 +188,21 @@ bool QuestAccept_npc_calvin_montague(Player* pPlayer, Creature* pCreature, const void AddSC_tirisfal_glades() { - Script *newscript; - - newscript = new Script; - newscript->Name = "go_mausoleum_door"; - newscript->pGOUse = &GOUse_go_mausoleum_door; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "go_mausoleum_trigger"; - newscript->pGOUse = &GOUse_go_mausoleum_trigger; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_calvin_montague"; - newscript->GetAI = &GetAI_npc_calvin_montague; - newscript->pQuestAcceptNPC = &QuestAccept_npc_calvin_montague; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "go_mausoleum_door"; + pNewScript->pGOUse = &GOUse_go_mausoleum_door; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "go_mausoleum_trigger"; + pNewScript->pGOUse = &GOUse_go_mausoleum_trigger; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_calvin_montague"; + pNewScript->GetAI = &GetAI_npc_calvin_montague; + pNewScript->pQuestAcceptNPC = &QuestAccept_npc_calvin_montague; + pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/undercity.cpp b/scripts/eastern_kingdoms/undercity.cpp index 6ca99d4e9..9dc93427c 100644 --- a/scripts/eastern_kingdoms/undercity.cpp +++ b/scripts/eastern_kingdoms/undercity.cpp @@ -236,22 +236,22 @@ bool GossipSelect_npc_parqual_fintallas(Player* pPlayer, Creature* pCreature, ui void AddSC_undercity() { - Script *newscript; - - newscript = new Script; - newscript->Name = "npc_lady_sylvanas_windrunner"; - newscript->GetAI = &GetAI_npc_lady_sylvanas_windrunner; - newscript->pQuestRewardedNPC = &QuestRewarded_npc_lady_sylvanas_windrunner; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_highborne_lamenter"; - newscript->GetAI = &GetAI_npc_highborne_lamenter; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_parqual_fintallas"; - newscript->pGossipHello = &GossipHello_npc_parqual_fintallas; - newscript->pGossipSelect = &GossipSelect_npc_parqual_fintallas; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "npc_lady_sylvanas_windrunner"; + pNewScript->GetAI = &GetAI_npc_lady_sylvanas_windrunner; + pNewScript->pQuestRewardedNPC = &QuestRewarded_npc_lady_sylvanas_windrunner; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_highborne_lamenter"; + pNewScript->GetAI = &GetAI_npc_highborne_lamenter; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_parqual_fintallas"; + pNewScript->pGossipHello = &GossipHello_npc_parqual_fintallas; + pNewScript->pGossipSelect = &GossipSelect_npc_parqual_fintallas; + pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/western_plaguelands.cpp b/scripts/eastern_kingdoms/western_plaguelands.cpp index 942a2cfac..3e4e6b853 100644 --- a/scripts/eastern_kingdoms/western_plaguelands.cpp +++ b/scripts/eastern_kingdoms/western_plaguelands.cpp @@ -201,22 +201,22 @@ CreatureAI* GetAI_npc_the_scourge_cauldron(Creature* pCreature) void AddSC_western_plaguelands() { - Script *newscript; - - newscript = new Script; - newscript->Name = "npcs_dithers_and_arbington"; - newscript->pGossipHello = &GossipHello_npcs_dithers_and_arbington; - newscript->pGossipSelect = &GossipSelect_npcs_dithers_and_arbington; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_myranda_the_hag"; - newscript->pGossipHello = &GossipHello_npc_myranda_the_hag; - newscript->pGossipSelect = &GossipSelect_npc_myranda_the_hag; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_the_scourge_cauldron"; - newscript->GetAI = &GetAI_npc_the_scourge_cauldron; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "npcs_dithers_and_arbington"; + pNewScript->pGossipHello = &GossipHello_npcs_dithers_and_arbington; + pNewScript->pGossipSelect = &GossipSelect_npcs_dithers_and_arbington; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_myranda_the_hag"; + pNewScript->pGossipHello = &GossipHello_npc_myranda_the_hag; + pNewScript->pGossipSelect = &GossipSelect_npc_myranda_the_hag; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_the_scourge_cauldron"; + pNewScript->GetAI = &GetAI_npc_the_scourge_cauldron; + pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/wetlands.cpp b/scripts/eastern_kingdoms/wetlands.cpp index b1e9941e3..5193b1ba8 100644 --- a/scripts/eastern_kingdoms/wetlands.cpp +++ b/scripts/eastern_kingdoms/wetlands.cpp @@ -153,15 +153,15 @@ bool QuestAccept_npc_mikhail(Player* pPlayer, Creature* pCreature, const Quest* void AddSC_wetlands() { - Script *newscript; + Script* pNewScript; - newscript = new Script; - newscript->Name = "npc_tapoke_slim_jahn"; - newscript->GetAI = &GetAI_npc_tapoke_slim_jahn; - newscript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "npc_tapoke_slim_jahn"; + pNewScript->GetAI = &GetAI_npc_tapoke_slim_jahn; + pNewScript->RegisterSelf(); - newscript = new Script; - newscript->Name = "npc_mikhail"; - newscript->pQuestAcceptNPC = &QuestAccept_npc_mikhail; - newscript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "npc_mikhail"; + pNewScript->pQuestAcceptNPC = &QuestAccept_npc_mikhail; + pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/zulaman/boss_akilzon.cpp b/scripts/eastern_kingdoms/zulaman/boss_akilzon.cpp index 7a907b7cb..222e849ad 100644 --- a/scripts/eastern_kingdoms/zulaman/boss_akilzon.cpp +++ b/scripts/eastern_kingdoms/zulaman/boss_akilzon.cpp @@ -303,15 +303,15 @@ CreatureAI* GetAI_mob_soaring_eagle(Creature* pCreature) void AddSC_boss_akilzon() { - Script *newscript; + Script* pNewScript; - newscript = new Script; - newscript->Name = "boss_akilzon"; - newscript->GetAI = &GetAI_boss_akilzon; - newscript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "boss_akilzon"; + pNewScript->GetAI = &GetAI_boss_akilzon; + pNewScript->RegisterSelf(); - newscript = new Script; - newscript->Name = "mob_soaring_eagle"; - newscript->GetAI = &GetAI_mob_soaring_eagle; - newscript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "mob_soaring_eagle"; + pNewScript->GetAI = &GetAI_mob_soaring_eagle; + pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/zulaman/boss_halazzi.cpp b/scripts/eastern_kingdoms/zulaman/boss_halazzi.cpp index f6a342e8c..f38054618 100644 --- a/scripts/eastern_kingdoms/zulaman/boss_halazzi.cpp +++ b/scripts/eastern_kingdoms/zulaman/boss_halazzi.cpp @@ -385,15 +385,15 @@ CreatureAI* GetAI_boss_spirit_lynx(Creature* pCreature) void AddSC_boss_halazzi() { - Script* newscript; + Script* pNewScript; - newscript = new Script; - newscript->Name = "boss_halazzi"; - newscript->GetAI = &GetAI_boss_halazzi; - newscript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "boss_halazzi"; + pNewScript->GetAI = &GetAI_boss_halazzi; + pNewScript->RegisterSelf(); - newscript = new Script; - newscript->Name = "boss_spirit_lynx"; - newscript->GetAI = &GetAI_boss_spirit_lynx; - newscript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "boss_spirit_lynx"; + pNewScript->GetAI = &GetAI_boss_spirit_lynx; + pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/zulaman/boss_nalorakk.cpp b/scripts/eastern_kingdoms/zulaman/boss_nalorakk.cpp index 742fc2bd0..1a71544c1 100644 --- a/scripts/eastern_kingdoms/zulaman/boss_nalorakk.cpp +++ b/scripts/eastern_kingdoms/zulaman/boss_nalorakk.cpp @@ -258,9 +258,10 @@ CreatureAI* GetAI_boss_nalorakk(Creature* pCreature) void AddSC_boss_nalorakk() { - Script *newscript; - newscript = new Script; - newscript->Name = "boss_nalorakk"; - newscript->GetAI = &GetAI_boss_nalorakk; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_nalorakk"; + pNewScript->GetAI = &GetAI_boss_nalorakk; + pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/zulaman/zulaman.cpp b/scripts/eastern_kingdoms/zulaman/zulaman.cpp index f68007f6c..ea2491716 100644 --- a/scripts/eastern_kingdoms/zulaman/zulaman.cpp +++ b/scripts/eastern_kingdoms/zulaman/zulaman.cpp @@ -241,22 +241,22 @@ bool GOUse_go_strange_gong(Player* pPlayer, GameObject* pGo) void AddSC_zulaman() { - Script *newscript; - - newscript = new Script; - newscript->Name = "npc_forest_frog"; - newscript->GetAI = &GetAI_npc_forest_frog; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_harrison_jones_za"; - newscript->GetAI = &GetAI_npc_harrison_jones_za; - newscript->pGossipHello = &GossipHello_npc_harrison_jones_za; - newscript->pGossipSelect = &GossipSelect_npc_harrison_jones_za; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "go_strange_gong"; - newscript->pGOUse = &GOUse_go_strange_gong; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "npc_forest_frog"; + pNewScript->GetAI = &GetAI_npc_forest_frog; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_harrison_jones_za"; + pNewScript->GetAI = &GetAI_npc_harrison_jones_za; + pNewScript->pGossipHello = &GossipHello_npc_harrison_jones_za; + pNewScript->pGossipSelect = &GossipSelect_npc_harrison_jones_za; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "go_strange_gong"; + pNewScript->pGOUse = &GOUse_go_strange_gong; + pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/zulgurub/boss_arlokk.cpp b/scripts/eastern_kingdoms/zulgurub/boss_arlokk.cpp index 123e31c4c..cf8dd70ad 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_arlokk.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_arlokk.cpp @@ -273,15 +273,15 @@ CreatureAI* GetAI_boss_arlokk(Creature* pCreature) void AddSC_boss_arlokk() { - Script *newscript; + Script* pNewScript; - newscript = new Script; - newscript->Name = "go_gong_of_bethekk"; - newscript->pGOUse = &GOUse_go_gong_of_bethekk; - newscript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "go_gong_of_bethekk"; + pNewScript->pGOUse = &GOUse_go_gong_of_bethekk; + pNewScript->RegisterSelf(); - newscript = new Script; - newscript->Name = "boss_arlokk"; - newscript->GetAI = &GetAI_boss_arlokk; - newscript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "boss_arlokk"; + pNewScript->GetAI = &GetAI_boss_arlokk; + pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/zulgurub/boss_gahzranka.cpp b/scripts/eastern_kingdoms/zulgurub/boss_gahzranka.cpp index 9cd78c9cd..eff9a11eb 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_gahzranka.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_gahzranka.cpp @@ -80,9 +80,10 @@ CreatureAI* GetAI_boss_gahzranka(Creature* pCreature) void AddSC_boss_gahzranka() { - Script *newscript; - newscript = new Script; - newscript->Name = "boss_gahzranka"; - newscript->GetAI = &GetAI_boss_gahzranka; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_gahzranka"; + pNewScript->GetAI = &GetAI_boss_gahzranka; + pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/zulgurub/boss_grilek.cpp b/scripts/eastern_kingdoms/zulgurub/boss_grilek.cpp index 083529baa..24dea6a3f 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_grilek.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_grilek.cpp @@ -80,9 +80,10 @@ CreatureAI* GetAI_boss_grilek(Creature* pCreature) void AddSC_boss_grilek() { - Script *newscript; - newscript = new Script; - newscript->Name = "boss_grilek"; - newscript->GetAI = &GetAI_boss_grilek; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_grilek"; + pNewScript->GetAI = &GetAI_boss_grilek; + pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/zulgurub/boss_hazzarah.cpp b/scripts/eastern_kingdoms/zulgurub/boss_hazzarah.cpp index 938777c24..d1078a848 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_hazzarah.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_hazzarah.cpp @@ -88,9 +88,10 @@ CreatureAI* GetAI_boss_hazzarah(Creature* pCreature) void AddSC_boss_hazzarah() { - Script *newscript; - newscript = new Script; - newscript->Name = "boss_hazzarah"; - newscript->GetAI = &GetAI_boss_hazzarah; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_hazzarah"; + pNewScript->GetAI = &GetAI_boss_hazzarah; + pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/zulgurub/boss_mandokir.cpp b/scripts/eastern_kingdoms/zulgurub/boss_mandokir.cpp index f78204eba..b865d5dc1 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_mandokir.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_mandokir.cpp @@ -428,15 +428,15 @@ CreatureAI* GetAI_mob_ohgan(Creature* pCreature) void AddSC_boss_mandokir() { - Script *newscript; + Script* pNewScript; - newscript = new Script; - newscript->Name = "boss_mandokir"; - newscript->GetAI = &GetAI_boss_mandokir; - newscript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "boss_mandokir"; + pNewScript->GetAI = &GetAI_boss_mandokir; + pNewScript->RegisterSelf(); - newscript = new Script; - newscript->Name = "mob_ohgan"; - newscript->GetAI = &GetAI_mob_ohgan; - newscript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "mob_ohgan"; + pNewScript->GetAI = &GetAI_mob_ohgan; + pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/zulgurub/boss_marli.cpp b/scripts/eastern_kingdoms/zulgurub/boss_marli.cpp index b6ad12deb..21e33cfb7 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_marli.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_marli.cpp @@ -353,15 +353,15 @@ CreatureAI* GetAI_mob_spawn_of_marli(Creature* pCreature) void AddSC_boss_marli() { - Script* newscript; + Script* pNewScript; - newscript = new Script; - newscript->Name = "boss_marli"; - newscript->GetAI = &GetAI_boss_marli; - newscript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "boss_marli"; + pNewScript->GetAI = &GetAI_boss_marli; + pNewScript->RegisterSelf(); - newscript = new Script; - newscript->Name = "mob_spawn_of_marli"; - newscript->GetAI = &GetAI_mob_spawn_of_marli; - newscript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "mob_spawn_of_marli"; + pNewScript->GetAI = &GetAI_mob_spawn_of_marli; + pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/zulgurub/boss_renataki.cpp b/scripts/eastern_kingdoms/zulgurub/boss_renataki.cpp index d0e53226b..e47b8a012 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_renataki.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_renataki.cpp @@ -137,9 +137,10 @@ CreatureAI* GetAI_boss_renataki(Creature* pCreature) void AddSC_boss_renataki() { - Script *newscript; - newscript = new Script; - newscript->Name = "boss_renataki"; - newscript->GetAI = &GetAI_boss_renataki; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_renataki"; + pNewScript->GetAI = &GetAI_boss_renataki; + pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/zulgurub/boss_venoxis.cpp b/scripts/eastern_kingdoms/zulgurub/boss_venoxis.cpp index 9495e1a6d..a283a6e17 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_venoxis.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_venoxis.cpp @@ -257,9 +257,10 @@ CreatureAI* GetAI_boss_venoxis(Creature* pCreature) void AddSC_boss_venoxis() { - Script *newscript; - newscript = new Script; - newscript->Name = "boss_venoxis"; - newscript->GetAI = &GetAI_boss_venoxis; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_venoxis"; + pNewScript->GetAI = &GetAI_boss_venoxis; + pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/zulgurub/boss_wushoolay.cpp b/scripts/eastern_kingdoms/zulgurub/boss_wushoolay.cpp index 5a5ea2aca..08a82c561 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_wushoolay.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_wushoolay.cpp @@ -72,9 +72,10 @@ CreatureAI* GetAI_boss_wushoolay(Creature* pCreature) void AddSC_boss_wushoolay() { - Script *newscript; - newscript = new Script; - newscript->Name = "boss_wushoolay"; - newscript->GetAI = &GetAI_boss_wushoolay; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_wushoolay"; + pNewScript->GetAI = &GetAI_boss_wushoolay; + pNewScript->RegisterSelf(); } diff --git a/scripts/kalimdor/ashenvale.cpp b/scripts/kalimdor/ashenvale.cpp index a58ffc882..2b070ee70 100644 --- a/scripts/kalimdor/ashenvale.cpp +++ b/scripts/kalimdor/ashenvale.cpp @@ -420,28 +420,28 @@ CreatureAI* GetAI_npc_torek(Creature* pCreature) void AddSC_ashenvale() { - Script *newscript; - - newscript = new Script; - newscript->Name = "npc_muglash"; - newscript->GetAI = &GetAI_npc_muglash; - newscript->pQuestAcceptNPC = &QuestAccept_npc_muglash; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "go_naga_brazier"; - newscript->pGOUse = &GOUse_go_naga_brazier; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_ruul_snowhoof"; - newscript->GetAI = &GetAI_npc_ruul_snowhoofAI; - newscript->pQuestAcceptNPC = &QuestAccept_npc_ruul_snowhoof; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_torek"; - newscript->GetAI = &GetAI_npc_torek; - newscript->pQuestAcceptNPC = &QuestAccept_npc_torek; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "npc_muglash"; + pNewScript->GetAI = &GetAI_npc_muglash; + pNewScript->pQuestAcceptNPC = &QuestAccept_npc_muglash; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "go_naga_brazier"; + pNewScript->pGOUse = &GOUse_go_naga_brazier; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_ruul_snowhoof"; + pNewScript->GetAI = &GetAI_npc_ruul_snowhoofAI; + pNewScript->pQuestAcceptNPC = &QuestAccept_npc_ruul_snowhoof; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_torek"; + pNewScript->GetAI = &GetAI_npc_torek; + pNewScript->pQuestAcceptNPC = &QuestAccept_npc_torek; + pNewScript->RegisterSelf(); } diff --git a/scripts/kalimdor/azshara.cpp b/scripts/kalimdor/azshara.cpp index e2b773f07..a3a4e7874 100644 --- a/scripts/kalimdor/azshara.cpp +++ b/scripts/kalimdor/azshara.cpp @@ -360,33 +360,33 @@ bool GossipSelect_npc_loramus_thalipedes(Player* pPlayer, Creature* pCreature, u void AddSC_azshara() { - Script *newscript; - - newscript = new Script; - newscript->Name = "npc_rizzle_sprysprocket"; - newscript->GetAI = &GetAI_npc_rizzle_sprysprocket; - newscript->pGossipHello = &GossipHello_npc_rizzle_sprysprocket; - newscript->pGossipSelect = &GossipSelect_npc_rizzle_sprysprocket; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_depth_charge"; - newscript->GetAI = &GetAI_npc_depth_charge; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "go_southfury_moonstone"; - newscript->pGOUse = &GOUse_go_southfury_moonstone; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "mobs_spitelashes"; - newscript->GetAI = &GetAI_mobs_spitelashes; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_loramus_thalipedes"; - newscript->pGossipHello = &GossipHello_npc_loramus_thalipedes; - newscript->pGossipSelect = &GossipSelect_npc_loramus_thalipedes; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "npc_rizzle_sprysprocket"; + pNewScript->GetAI = &GetAI_npc_rizzle_sprysprocket; + pNewScript->pGossipHello = &GossipHello_npc_rizzle_sprysprocket; + pNewScript->pGossipSelect = &GossipSelect_npc_rizzle_sprysprocket; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_depth_charge"; + pNewScript->GetAI = &GetAI_npc_depth_charge; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "go_southfury_moonstone"; + pNewScript->pGOUse = &GOUse_go_southfury_moonstone; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "mobs_spitelashes"; + pNewScript->GetAI = &GetAI_mobs_spitelashes; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_loramus_thalipedes"; + pNewScript->pGossipHello = &GossipHello_npc_loramus_thalipedes; + pNewScript->pGossipSelect = &GossipSelect_npc_loramus_thalipedes; + pNewScript->RegisterSelf(); } diff --git a/scripts/kalimdor/azuremyst_isle.cpp b/scripts/kalimdor/azuremyst_isle.cpp index f87a61e1a..576b38b0f 100644 --- a/scripts/kalimdor/azuremyst_isle.cpp +++ b/scripts/kalimdor/azuremyst_isle.cpp @@ -431,34 +431,34 @@ bool GossipSelect_npc_susurrus(Player* pPlayer, Creature* pCreature, uint32 uiSe void AddSC_azuremyst_isle() { - Script *newscript; - - newscript = new Script; - newscript->Name = "npc_draenei_survivor"; - newscript->GetAI = &GetAI_npc_draenei_survivor; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_engineer_spark_overgrind"; - newscript->GetAI = &GetAI_npc_engineer_spark_overgrind; - newscript->pGossipHello = &GossipHello_npc_engineer_spark_overgrind; - newscript->pGossipSelect = &GossipSelect_npc_engineer_spark_overgrind; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_injured_draenei"; - newscript->GetAI = &GetAI_npc_injured_draenei; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_magwin"; - newscript->GetAI = &GetAI_npc_magwinAI; - newscript->pQuestAcceptNPC = &QuestAccept_npc_magwin; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_susurrus"; - newscript->pGossipHello = &GossipHello_npc_susurrus; - newscript->pGossipSelect = &GossipSelect_npc_susurrus; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "npc_draenei_survivor"; + pNewScript->GetAI = &GetAI_npc_draenei_survivor; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_engineer_spark_overgrind"; + pNewScript->GetAI = &GetAI_npc_engineer_spark_overgrind; + pNewScript->pGossipHello = &GossipHello_npc_engineer_spark_overgrind; + pNewScript->pGossipSelect = &GossipSelect_npc_engineer_spark_overgrind; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_injured_draenei"; + pNewScript->GetAI = &GetAI_npc_injured_draenei; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_magwin"; + pNewScript->GetAI = &GetAI_npc_magwinAI; + pNewScript->pQuestAcceptNPC = &QuestAccept_npc_magwin; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_susurrus"; + pNewScript->pGossipHello = &GossipHello_npc_susurrus; + pNewScript->pGossipSelect = &GossipSelect_npc_susurrus; + pNewScript->RegisterSelf(); } diff --git a/scripts/kalimdor/bloodmyst_isle.cpp b/scripts/kalimdor/bloodmyst_isle.cpp index e9726d3e7..898f401bc 100644 --- a/scripts/kalimdor/bloodmyst_isle.cpp +++ b/scripts/kalimdor/bloodmyst_isle.cpp @@ -122,16 +122,16 @@ bool GossipSelect_npc_captured_sunhawk_agent(Player* pPlayer, Creature* pCreatur void AddSC_bloodmyst_isle() { - Script *newscript; - - newscript = new Script; - newscript->Name = "mob_webbed_creature"; - newscript->GetAI = &GetAI_mob_webbed_creature; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_captured_sunhawk_agent"; - newscript->pGossipHello = &GossipHello_npc_captured_sunhawk_agent; - newscript->pGossipSelect = &GossipSelect_npc_captured_sunhawk_agent; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "mob_webbed_creature"; + pNewScript->GetAI = &GetAI_mob_webbed_creature; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_captured_sunhawk_agent"; + pNewScript->pGossipHello = &GossipHello_npc_captured_sunhawk_agent; + pNewScript->pGossipSelect = &GossipSelect_npc_captured_sunhawk_agent; + pNewScript->RegisterSelf(); } diff --git a/scripts/kalimdor/caverns_of_time/dark_portal/boss_aeonus.cpp b/scripts/kalimdor/caverns_of_time/dark_portal/boss_aeonus.cpp index b9b22144d..1292f7e33 100644 --- a/scripts/kalimdor/caverns_of_time/dark_portal/boss_aeonus.cpp +++ b/scripts/kalimdor/caverns_of_time/dark_portal/boss_aeonus.cpp @@ -136,9 +136,10 @@ CreatureAI* GetAI_boss_aeonus(Creature* pCreature) void AddSC_boss_aeonus() { - Script *newscript; - newscript = new Script; - newscript->Name = "boss_aeonus"; - newscript->GetAI = &GetAI_boss_aeonus; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_aeonus"; + pNewScript->GetAI = &GetAI_boss_aeonus; + pNewScript->RegisterSelf(); } diff --git a/scripts/kalimdor/caverns_of_time/dark_portal/boss_chrono_lord_deja.cpp b/scripts/kalimdor/caverns_of_time/dark_portal/boss_chrono_lord_deja.cpp index effb9b0a4..dae68399b 100644 --- a/scripts/kalimdor/caverns_of_time/dark_portal/boss_chrono_lord_deja.cpp +++ b/scripts/kalimdor/caverns_of_time/dark_portal/boss_chrono_lord_deja.cpp @@ -146,9 +146,10 @@ CreatureAI* GetAI_boss_chrono_lord_deja(Creature* pCreature) void AddSC_boss_chrono_lord_deja() { - Script *newscript; - newscript = new Script; - newscript->Name = "boss_chrono_lord_deja"; - newscript->GetAI = &GetAI_boss_chrono_lord_deja; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_chrono_lord_deja"; + pNewScript->GetAI = &GetAI_boss_chrono_lord_deja; + pNewScript->RegisterSelf(); } diff --git a/scripts/kalimdor/caverns_of_time/dark_portal/boss_temporus.cpp b/scripts/kalimdor/caverns_of_time/dark_portal/boss_temporus.cpp index 537f0c8ae..1bba00fe6 100644 --- a/scripts/kalimdor/caverns_of_time/dark_portal/boss_temporus.cpp +++ b/scripts/kalimdor/caverns_of_time/dark_portal/boss_temporus.cpp @@ -142,9 +142,10 @@ CreatureAI* GetAI_boss_temporus(Creature* pCreature) void AddSC_boss_temporus() { - Script *newscript; - newscript = new Script; - newscript->Name = "boss_temporus"; - newscript->GetAI = &GetAI_boss_temporus; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_temporus"; + pNewScript->GetAI = &GetAI_boss_temporus; + pNewScript->RegisterSelf(); } diff --git a/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.cpp b/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.cpp index 07491fafe..d5287ec35 100644 --- a/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.cpp +++ b/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.cpp @@ -396,21 +396,21 @@ bool GossipSelect_npc_saat(Player* pPlayer, Creature* pCreature, uint32 uiSender void AddSC_dark_portal() { - Script *newscript; - - newscript = new Script; - newscript->Name = "npc_medivh_bm"; - newscript->GetAI = &GetAI_npc_medivh_bm; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_time_rift"; - newscript->GetAI = &GetAI_npc_time_rift; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_saat"; - newscript->pGossipHello = &GossipHello_npc_saat; - newscript->pGossipSelect = &GossipSelect_npc_saat; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "npc_medivh_bm"; + pNewScript->GetAI = &GetAI_npc_medivh_bm; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_time_rift"; + pNewScript->GetAI = &GetAI_npc_time_rift; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_saat"; + pNewScript->pGossipHello = &GossipHello_npc_saat; + pNewScript->pGossipSelect = &GossipSelect_npc_saat; + pNewScript->RegisterSelf(); } diff --git a/scripts/kalimdor/caverns_of_time/hyjal/boss_archimonde.cpp b/scripts/kalimdor/caverns_of_time/hyjal/boss_archimonde.cpp index d192412e8..2dcc76bfd 100644 --- a/scripts/kalimdor/caverns_of_time/hyjal/boss_archimonde.cpp +++ b/scripts/kalimdor/caverns_of_time/hyjal/boss_archimonde.cpp @@ -549,24 +549,25 @@ CreatureAI* GetAI_mob_ancient_wisp(Creature* pCreature) void AddSC_boss_archimonde() { - Script *newscript; - newscript = new Script; - newscript->Name = "boss_archimonde"; - newscript->GetAI = &GetAI_boss_archimonde; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "mob_doomfire"; - newscript->GetAI = &GetAI_mob_doomfire; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "mob_doomfire_targetting"; - newscript->GetAI = &GetAI_mob_doomfire_targetting; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "mob_ancient_wisp"; - newscript->GetAI = &GetAI_mob_ancient_wisp; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_archimonde"; + pNewScript->GetAI = &GetAI_boss_archimonde; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "mob_doomfire"; + pNewScript->GetAI = &GetAI_mob_doomfire; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "mob_doomfire_targetting"; + pNewScript->GetAI = &GetAI_mob_doomfire_targetting; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "mob_ancient_wisp"; + pNewScript->GetAI = &GetAI_mob_ancient_wisp; + pNewScript->RegisterSelf(); } diff --git a/scripts/kalimdor/caverns_of_time/hyjal/hyjal.cpp b/scripts/kalimdor/caverns_of_time/hyjal/hyjal.cpp index 2805a008c..29f6b7d7b 100644 --- a/scripts/kalimdor/caverns_of_time/hyjal/hyjal.cpp +++ b/scripts/kalimdor/caverns_of_time/hyjal/hyjal.cpp @@ -214,25 +214,25 @@ bool GossipSelect_npc_tyrande_whisperwind(Player* pPlayer, Creature* pCreature, void AddSC_hyjal() { - Script *newscript; - - newscript = new Script; - newscript->Name = "npc_jaina_proudmoore"; - newscript->GetAI = &GetAI_npc_jaina_proudmoore; - newscript->pGossipHello = &GossipHello_npc_jaina_proudmoore; - newscript->pGossipSelect = &GossipSelect_npc_jaina_proudmoore; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_thrall"; - newscript->GetAI = &GetAI_npc_thrall; - newscript->pGossipHello = &GossipHello_npc_thrall; - newscript->pGossipSelect = &GossipSelect_npc_thrall; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_tyrande_whisperwind"; - newscript->pGossipHello = &GossipHello_npc_tyrande_whisperwind; - newscript->pGossipSelect = &GossipSelect_npc_tyrande_whisperwind; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "npc_jaina_proudmoore"; + pNewScript->GetAI = &GetAI_npc_jaina_proudmoore; + pNewScript->pGossipHello = &GossipHello_npc_jaina_proudmoore; + pNewScript->pGossipSelect = &GossipSelect_npc_jaina_proudmoore; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_thrall"; + pNewScript->GetAI = &GetAI_npc_thrall; + pNewScript->pGossipHello = &GossipHello_npc_thrall; + pNewScript->pGossipSelect = &GossipSelect_npc_thrall; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_tyrande_whisperwind"; + pNewScript->pGossipHello = &GossipHello_npc_tyrande_whisperwind; + pNewScript->pGossipSelect = &GossipSelect_npc_tyrande_whisperwind; + pNewScript->RegisterSelf(); } diff --git a/scripts/kalimdor/caverns_of_time/old_hillsbrad/boss_captain_skarloc.cpp b/scripts/kalimdor/caverns_of_time/old_hillsbrad/boss_captain_skarloc.cpp index 010148815..2d78c3604 100644 --- a/scripts/kalimdor/caverns_of_time/old_hillsbrad/boss_captain_skarloc.cpp +++ b/scripts/kalimdor/caverns_of_time/old_hillsbrad/boss_captain_skarloc.cpp @@ -144,9 +144,10 @@ CreatureAI* GetAI_boss_captain_skarloc(Creature* pCreature) void AddSC_boss_captain_skarloc() { - Script *newscript; - newscript = new Script; - newscript->Name = "boss_captain_skarloc"; - newscript->GetAI = &GetAI_boss_captain_skarloc; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_captain_skarloc"; + pNewScript->GetAI = &GetAI_boss_captain_skarloc; + pNewScript->RegisterSelf(); } diff --git a/scripts/kalimdor/caverns_of_time/old_hillsbrad/boss_epoch_hunter.cpp b/scripts/kalimdor/caverns_of_time/old_hillsbrad/boss_epoch_hunter.cpp index 0d56ee9af..1c8714af9 100644 --- a/scripts/kalimdor/caverns_of_time/old_hillsbrad/boss_epoch_hunter.cpp +++ b/scripts/kalimdor/caverns_of_time/old_hillsbrad/boss_epoch_hunter.cpp @@ -130,9 +130,10 @@ CreatureAI* GetAI_boss_epoch_hunter(Creature* pCreature) void AddSC_boss_epoch_hunter() { - Script *newscript; - newscript = new Script; - newscript->Name = "boss_epoch_hunter"; - newscript->GetAI = &GetAI_boss_epoch_hunter; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_epoch_hunter"; + pNewScript->GetAI = &GetAI_boss_epoch_hunter; + pNewScript->RegisterSelf(); } diff --git a/scripts/kalimdor/caverns_of_time/old_hillsbrad/boss_leutenant_drake.cpp b/scripts/kalimdor/caverns_of_time/old_hillsbrad/boss_leutenant_drake.cpp index 7e1d94dbd..ef62d9df7 100644 --- a/scripts/kalimdor/caverns_of_time/old_hillsbrad/boss_leutenant_drake.cpp +++ b/scripts/kalimdor/caverns_of_time/old_hillsbrad/boss_leutenant_drake.cpp @@ -174,15 +174,15 @@ CreatureAI* GetAI_boss_lieutenant_drake(Creature* pCreature) void AddSC_boss_lieutenant_drake() { - Script *newscript; + Script* pNewScript; - newscript = new Script; - newscript->Name = "go_barrel_old_hillsbrad"; - newscript->pGOUse = &GOUse_go_barrel_old_hillsbrad; - newscript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "go_barrel_old_hillsbrad"; + pNewScript->pGOUse = &GOUse_go_barrel_old_hillsbrad; + pNewScript->RegisterSelf(); - newscript = new Script; - newscript->Name = "boss_lieutenant_drake"; - newscript->GetAI = &GetAI_boss_lieutenant_drake; - newscript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "boss_lieutenant_drake"; + pNewScript->GetAI = &GetAI_boss_lieutenant_drake; + pNewScript->RegisterSelf(); } diff --git a/scripts/kalimdor/feralas.cpp b/scripts/kalimdor/feralas.cpp index dbc88c7a0..98bf3a169 100644 --- a/scripts/kalimdor/feralas.cpp +++ b/scripts/kalimdor/feralas.cpp @@ -179,22 +179,22 @@ bool GossipHello_npc_screecher_spirit(Player* pPlayer, Creature* pCreature) void AddSC_feralas() { - Script *newscript; - - newscript = new Script; - newscript->Name = "npc_gregan_brewspewer"; - newscript->pGossipHello = &GossipHello_npc_gregan_brewspewer; - newscript->pGossipSelect = &GossipSelect_npc_gregan_brewspewer; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_oox22fe"; - newscript->GetAI = &GetAI_npc_oox22fe; - newscript->pQuestAcceptNPC = &QuestAccept_npc_oox22fe; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_screecher_spirit"; - newscript->pGossipHello = &GossipHello_npc_screecher_spirit; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "npc_gregan_brewspewer"; + pNewScript->pGossipHello = &GossipHello_npc_gregan_brewspewer; + pNewScript->pGossipSelect = &GossipSelect_npc_gregan_brewspewer; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_oox22fe"; + pNewScript->GetAI = &GetAI_npc_oox22fe; + pNewScript->pQuestAcceptNPC = &QuestAccept_npc_oox22fe; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_screecher_spirit"; + pNewScript->pGossipHello = &GossipHello_npc_screecher_spirit; + pNewScript->RegisterSelf(); } diff --git a/scripts/kalimdor/maraudon/boss_celebras_the_cursed.cpp b/scripts/kalimdor/maraudon/boss_celebras_the_cursed.cpp index 87bdb0076..e253779d9 100644 --- a/scripts/kalimdor/maraudon/boss_celebras_the_cursed.cpp +++ b/scripts/kalimdor/maraudon/boss_celebras_the_cursed.cpp @@ -87,9 +87,10 @@ CreatureAI* GetAI_celebras_the_cursed(Creature* pCreature) void AddSC_boss_celebras_the_cursed() { - Script *newscript; - newscript = new Script; - newscript->Name = "celebras_the_cursed"; - newscript->GetAI = &GetAI_celebras_the_cursed; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "celebras_the_cursed"; + pNewScript->GetAI = &GetAI_celebras_the_cursed; + pNewScript->RegisterSelf(); } diff --git a/scripts/kalimdor/maraudon/boss_landslide.cpp b/scripts/kalimdor/maraudon/boss_landslide.cpp index 104807d48..80e8f0ecb 100644 --- a/scripts/kalimdor/maraudon/boss_landslide.cpp +++ b/scripts/kalimdor/maraudon/boss_landslide.cpp @@ -82,9 +82,10 @@ CreatureAI* GetAI_boss_landslide(Creature* pCreature) void AddSC_boss_landslide() { - Script *newscript; - newscript = new Script; - newscript->Name = "boss_landslide"; - newscript->GetAI = &GetAI_boss_landslide; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_landslide"; + pNewScript->GetAI = &GetAI_boss_landslide; + pNewScript->RegisterSelf(); } diff --git a/scripts/kalimdor/maraudon/boss_noxxion.cpp b/scripts/kalimdor/maraudon/boss_noxxion.cpp index 01b167ff2..684ab546d 100644 --- a/scripts/kalimdor/maraudon/boss_noxxion.cpp +++ b/scripts/kalimdor/maraudon/boss_noxxion.cpp @@ -137,9 +137,10 @@ CreatureAI* GetAI_boss_noxxion(Creature* pCreature) void AddSC_boss_noxxion() { - Script *newscript; - newscript = new Script; - newscript->Name = "boss_noxxion"; - newscript->GetAI = &GetAI_boss_noxxion; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_noxxion"; + pNewScript->GetAI = &GetAI_boss_noxxion; + pNewScript->RegisterSelf(); } diff --git a/scripts/kalimdor/maraudon/boss_princess_theradras.cpp b/scripts/kalimdor/maraudon/boss_princess_theradras.cpp index cfd3f3072..2d75f5bac 100644 --- a/scripts/kalimdor/maraudon/boss_princess_theradras.cpp +++ b/scripts/kalimdor/maraudon/boss_princess_theradras.cpp @@ -96,9 +96,10 @@ CreatureAI* GetAI_boss_ptheradras(Creature* pCreature) void AddSC_boss_ptheradras() { - Script *newscript; - newscript = new Script; - newscript->Name = "boss_princess_theradras"; - newscript->GetAI = &GetAI_boss_ptheradras; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_princess_theradras"; + pNewScript->GetAI = &GetAI_boss_ptheradras; + pNewScript->RegisterSelf(); } diff --git a/scripts/kalimdor/mulgore.cpp b/scripts/kalimdor/mulgore.cpp index 0c37aa142..7b436fbd3 100644 --- a/scripts/kalimdor/mulgore.cpp +++ b/scripts/kalimdor/mulgore.cpp @@ -195,16 +195,16 @@ bool GossipSelect_npc_skorn_whitecloud(Player* pPlayer, Creature* pCreature, uin void AddSC_mulgore() { - Script *newscript; - - newscript = new Script; - newscript->Name = "npc_kyle_the_frenzied"; - newscript->GetAI = &GetAI_npc_kyle_the_frenzied; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_skorn_whitecloud"; - newscript->pGossipHello = &GossipHello_npc_skorn_whitecloud; - newscript->pGossipSelect = &GossipSelect_npc_skorn_whitecloud; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "npc_kyle_the_frenzied"; + pNewScript->GetAI = &GetAI_npc_kyle_the_frenzied; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_skorn_whitecloud"; + pNewScript->pGossipHello = &GossipHello_npc_skorn_whitecloud; + pNewScript->pGossipSelect = &GossipSelect_npc_skorn_whitecloud; + pNewScript->RegisterSelf(); } diff --git a/scripts/kalimdor/orgrimmar.cpp b/scripts/kalimdor/orgrimmar.cpp index ed827de0d..6e56f9663 100644 --- a/scripts/kalimdor/orgrimmar.cpp +++ b/scripts/kalimdor/orgrimmar.cpp @@ -251,24 +251,24 @@ bool GossipSelect_npc_thrall_warchief(Player* pPlayer, Creature* pCreature, uint void AddSC_orgrimmar() { - Script *newscript; - - newscript = new Script; - newscript->Name = "npc_neeru_fireblade"; - newscript->pGossipHello = &GossipHello_npc_neeru_fireblade; - newscript->pGossipSelect = &GossipSelect_npc_neeru_fireblade; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_shenthul"; - newscript->GetAI = &GetAI_npc_shenthul; - newscript->pQuestAcceptNPC = &QuestAccept_npc_shenthul; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_thrall_warchief"; - newscript->GetAI = &GetAI_npc_thrall_warchief; - newscript->pGossipHello = &GossipHello_npc_thrall_warchief; - newscript->pGossipSelect = &GossipSelect_npc_thrall_warchief; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "npc_neeru_fireblade"; + pNewScript->pGossipHello = &GossipHello_npc_neeru_fireblade; + pNewScript->pGossipSelect = &GossipSelect_npc_neeru_fireblade; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_shenthul"; + pNewScript->GetAI = &GetAI_npc_shenthul; + pNewScript->pQuestAcceptNPC = &QuestAccept_npc_shenthul; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_thrall_warchief"; + pNewScript->GetAI = &GetAI_npc_thrall_warchief; + pNewScript->pGossipHello = &GossipHello_npc_thrall_warchief; + pNewScript->pGossipSelect = &GossipSelect_npc_thrall_warchief; + pNewScript->RegisterSelf(); } diff --git a/scripts/kalimdor/razorfen_downs/boss_amnennar_the_coldbringer.cpp b/scripts/kalimdor/razorfen_downs/boss_amnennar_the_coldbringer.cpp index 41ddc0b4f..2455bf240 100644 --- a/scripts/kalimdor/razorfen_downs/boss_amnennar_the_coldbringer.cpp +++ b/scripts/kalimdor/razorfen_downs/boss_amnennar_the_coldbringer.cpp @@ -121,9 +121,10 @@ CreatureAI* GetAI_boss_amnennar_the_coldbringer(Creature* pCreature) void AddSC_boss_amnennar_the_coldbringer() { - Script *newscript; - newscript = new Script; - newscript->Name = "boss_amnennar_the_coldbringer"; - newscript->GetAI = &GetAI_boss_amnennar_the_coldbringer; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_amnennar_the_coldbringer"; + pNewScript->GetAI = &GetAI_boss_amnennar_the_coldbringer; + pNewScript->RegisterSelf(); } diff --git a/scripts/kalimdor/ruins_of_ahnqiraj/boss_ayamiss.cpp b/scripts/kalimdor/ruins_of_ahnqiraj/boss_ayamiss.cpp index 587c200ef..4988ee00b 100644 --- a/scripts/kalimdor/ruins_of_ahnqiraj/boss_ayamiss.cpp +++ b/scripts/kalimdor/ruins_of_ahnqiraj/boss_ayamiss.cpp @@ -111,9 +111,10 @@ CreatureAI* GetAI_boss_ayamiss(Creature* pCreature) void AddSC_boss_ayamiss() { - Script* newscript; - newscript = new Script; - newscript->Name = "boss_ayamiss"; - newscript->GetAI = &GetAI_boss_ayamiss; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_ayamiss"; + pNewScript->GetAI = &GetAI_boss_ayamiss; + pNewScript->RegisterSelf(); } diff --git a/scripts/kalimdor/ruins_of_ahnqiraj/boss_kurinnaxx.cpp b/scripts/kalimdor/ruins_of_ahnqiraj/boss_kurinnaxx.cpp index 2d395471c..084fc797a 100644 --- a/scripts/kalimdor/ruins_of_ahnqiraj/boss_kurinnaxx.cpp +++ b/scripts/kalimdor/ruins_of_ahnqiraj/boss_kurinnaxx.cpp @@ -89,9 +89,10 @@ CreatureAI* GetAI_boss_kurinnaxx(Creature* pCreature) void AddSC_boss_kurinnaxx() { - Script* newscript; - newscript = new Script; - newscript->Name = "boss_kurinnaxx"; - newscript->GetAI = &GetAI_boss_kurinnaxx; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_kurinnaxx"; + pNewScript->GetAI = &GetAI_boss_kurinnaxx; + pNewScript->RegisterSelf(); } diff --git a/scripts/kalimdor/ruins_of_ahnqiraj/boss_moam.cpp b/scripts/kalimdor/ruins_of_ahnqiraj/boss_moam.cpp index 5d2139d65..c50fc1ec7 100644 --- a/scripts/kalimdor/ruins_of_ahnqiraj/boss_moam.cpp +++ b/scripts/kalimdor/ruins_of_ahnqiraj/boss_moam.cpp @@ -166,9 +166,10 @@ CreatureAI* GetAI_boss_moam(Creature* pCreature) void AddSC_boss_moam() { - Script* newscript; - newscript = new Script; - newscript->Name = "boss_moam"; - newscript->GetAI = &GetAI_boss_moam; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_moam"; + pNewScript->GetAI = &GetAI_boss_moam; + pNewScript->RegisterSelf(); } diff --git a/scripts/kalimdor/ruins_of_ahnqiraj/ruins_of_ahnqiraj.cpp b/scripts/kalimdor/ruins_of_ahnqiraj/ruins_of_ahnqiraj.cpp index 03f25d97c..323f42331 100644 --- a/scripts/kalimdor/ruins_of_ahnqiraj/ruins_of_ahnqiraj.cpp +++ b/scripts/kalimdor/ruins_of_ahnqiraj/ruins_of_ahnqiraj.cpp @@ -162,9 +162,10 @@ CreatureAI* GetAI_mob_anubisath_guardian(Creature* pCreature) void AddSC_ruins_of_ahnqiraj() { - Script* newscript; - newscript = new Script; - newscript->Name = "mob_anubisath_guardian"; - newscript->GetAI = &GetAI_mob_anubisath_guardian; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "mob_anubisath_guardian"; + pNewScript->GetAI = &GetAI_mob_anubisath_guardian; + pNewScript->RegisterSelf(); } diff --git a/scripts/kalimdor/stonetalon_mountains.cpp b/scripts/kalimdor/stonetalon_mountains.cpp index 9ff02ac93..72bd1c962 100644 --- a/scripts/kalimdor/stonetalon_mountains.cpp +++ b/scripts/kalimdor/stonetalon_mountains.cpp @@ -144,17 +144,17 @@ bool QuestAccept_npc_kaya(Player* pPlayer, Creature* pCreature, Quest const* pQu void AddSC_stonetalon_mountains() { - Script *newscript; - - newscript = new Script; - newscript->Name = "npc_braug_dimspirit"; - newscript->pGossipHello = &GossipHello_npc_braug_dimspirit; - newscript->pGossipSelect = &GossipSelect_npc_braug_dimspirit; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_kaya"; - newscript->GetAI = &GetAI_npc_kaya; - newscript->pQuestAcceptNPC = &QuestAccept_npc_kaya; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "npc_braug_dimspirit"; + pNewScript->pGossipHello = &GossipHello_npc_braug_dimspirit; + pNewScript->pGossipSelect = &GossipSelect_npc_braug_dimspirit; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_kaya"; + pNewScript->GetAI = &GetAI_npc_kaya; + pNewScript->pQuestAcceptNPC = &QuestAccept_npc_kaya; + pNewScript->RegisterSelf(); } diff --git a/scripts/kalimdor/teldrassil.cpp b/scripts/kalimdor/teldrassil.cpp index 0fbdf4684..1802e33a6 100644 --- a/scripts/kalimdor/teldrassil.cpp +++ b/scripts/kalimdor/teldrassil.cpp @@ -103,11 +103,11 @@ bool QuestAccept_npc_mist(Player* pPlayer, Creature* pCreature, const Quest* pQu void AddSC_teldrassil() { - Script *newscript; + Script* pNewScript; - newscript = new Script; - newscript->Name = "npc_mist"; - newscript->GetAI = &GetAI_npc_mist; - newscript->pQuestAcceptNPC = &QuestAccept_npc_mist; - newscript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "npc_mist"; + pNewScript->GetAI = &GetAI_npc_mist; + pNewScript->pQuestAcceptNPC = &QuestAccept_npc_mist; + pNewScript->RegisterSelf(); } diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_bug_trio.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_bug_trio.cpp index 7faa35a5b..5b3977558 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/boss_bug_trio.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_bug_trio.cpp @@ -314,19 +314,20 @@ CreatureAI* GetAI_boss_kri(Creature* pCreature) void AddSC_bug_trio() { - Script *newscript; - newscript = new Script; - newscript->Name = "boss_kri"; - newscript->GetAI = &GetAI_boss_kri; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "boss_vem"; - newscript->GetAI = &GetAI_boss_vem; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "boss_yauj"; - newscript->GetAI = &GetAI_boss_yauj; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_kri"; + pNewScript->GetAI = &GetAI_boss_kri; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "boss_vem"; + pNewScript->GetAI = &GetAI_boss_vem; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "boss_yauj"; + pNewScript->GetAI = &GetAI_boss_yauj; + pNewScript->RegisterSelf(); } diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_fankriss.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_fankriss.cpp index a0b988561..54aed5f63 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/boss_fankriss.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_fankriss.cpp @@ -190,9 +190,10 @@ CreatureAI* GetAI_boss_fankriss(Creature* pCreature) void AddSC_boss_fankriss() { - Script *newscript; - newscript = new Script; - newscript->Name = "boss_fankriss"; - newscript->GetAI = &GetAI_boss_fankriss; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_fankriss"; + pNewScript->GetAI = &GetAI_boss_fankriss; + pNewScript->RegisterSelf(); } diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_huhuran.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_huhuran.cpp index 345800856..df0ba7eec 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/boss_huhuran.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_huhuran.cpp @@ -135,9 +135,10 @@ CreatureAI* GetAI_boss_huhuran(Creature* pCreature) void AddSC_boss_huhuran() { - Script *newscript; - newscript = new Script; - newscript->Name = "boss_huhuran"; - newscript->GetAI = &GetAI_boss_huhuran; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_huhuran"; + pNewScript->GetAI = &GetAI_boss_huhuran; + pNewScript->RegisterSelf(); } diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_ouro.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_ouro.cpp index 0865d3ab9..7d180577f 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/boss_ouro.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_ouro.cpp @@ -169,9 +169,10 @@ CreatureAI* GetAI_boss_ouro(Creature* pCreature) void AddSC_boss_ouro() { - Script* newscript; - newscript = new Script; - newscript->Name = "boss_ouro"; - newscript->GetAI = &GetAI_boss_ouro; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_ouro"; + pNewScript->GetAI = &GetAI_boss_ouro; + pNewScript->RegisterSelf(); } diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_skeram.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_skeram.cpp index 80381f42b..7afa5676f 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/boss_skeram.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_skeram.cpp @@ -312,9 +312,10 @@ CreatureAI* GetAI_boss_skeram(Creature* pCreature) void AddSC_boss_skeram() { - Script *newscript; - newscript = new Script; - newscript->Name = "boss_skeram"; - newscript->GetAI = &GetAI_boss_skeram; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_skeram"; + pNewScript->GetAI = &GetAI_boss_skeram; + pNewScript->RegisterSelf(); } diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_twinemperors.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_twinemperors.cpp index 324eb7749..4c285d271 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/boss_twinemperors.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_twinemperors.cpp @@ -647,15 +647,15 @@ CreatureAI* GetAI_boss_veklor(Creature* pCreature) void AddSC_boss_twinemperors() { - Script *newscript; + Script* pNewScript; - newscript = new Script; - newscript->Name = "boss_veknilash"; - newscript->GetAI = &GetAI_boss_veknilash; - newscript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "boss_veknilash"; + pNewScript->GetAI = &GetAI_boss_veknilash; + pNewScript->RegisterSelf(); - newscript = new Script; - newscript->Name = "boss_veklor"; - newscript->GetAI = &GetAI_boss_veklor; - newscript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "boss_veklor"; + pNewScript->GetAI = &GetAI_boss_veklor; + pNewScript->RegisterSelf(); } diff --git a/scripts/kalimdor/temple_of_ahnqiraj/mob_anubisath_sentinel.cpp b/scripts/kalimdor/temple_of_ahnqiraj/mob_anubisath_sentinel.cpp index ffc2e40b8..400fba209 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/mob_anubisath_sentinel.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/mob_anubisath_sentinel.cpp @@ -188,9 +188,10 @@ CreatureAI* GetAI_npc_anubisath_sentinel(Creature* pCreature) void AddSC_mob_anubisath_sentinel() { - Script *newscript; - newscript = new Script; - newscript->Name = "mob_anubisath_sentinel"; - newscript->GetAI = &GetAI_npc_anubisath_sentinel; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "mob_anubisath_sentinel"; + pNewScript->GetAI = &GetAI_npc_anubisath_sentinel; + pNewScript->RegisterSelf(); } diff --git a/scripts/kalimdor/the_barrens.cpp b/scripts/kalimdor/the_barrens.cpp index 88d7cda80..e2ff615c1 100644 --- a/scripts/kalimdor/the_barrens.cpp +++ b/scripts/kalimdor/the_barrens.cpp @@ -644,44 +644,44 @@ CreatureAI* GetAI_npc_wizzlecranks_shredder(Creature* pCreature) void AddSC_the_barrens() { - Script *newscript; - - newscript = new Script; - newscript->Name = "npc_beaten_corpse"; - newscript->pGossipHello = &GossipHello_npc_beaten_corpse; - newscript->pGossipSelect = &GossipSelect_npc_beaten_corpse; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_gilthares"; - newscript->GetAI = &GetAI_npc_gilthares; - newscript->pQuestAcceptNPC = &QuestAccept_npc_gilthares; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_sputtervalve"; - newscript->pGossipHello = &GossipHello_npc_sputtervalve; - newscript->pGossipSelect = &GossipSelect_npc_sputtervalve; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_taskmaster_fizzule"; - newscript->GetAI = &GetAI_npc_taskmaster_fizzule; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_twiggy_flathead"; - newscript->GetAI = &GetAI_npc_twiggy_flathead; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "at_twiggy_flathead"; - newscript->pAreaTrigger = &AreaTrigger_at_twiggy_flathead; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_wizzlecranks_shredder"; - newscript->GetAI = &GetAI_npc_wizzlecranks_shredder; - newscript->pQuestAcceptNPC = &QuestAccept_npc_wizzlecranks_shredder; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "npc_beaten_corpse"; + pNewScript->pGossipHello = &GossipHello_npc_beaten_corpse; + pNewScript->pGossipSelect = &GossipSelect_npc_beaten_corpse; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_gilthares"; + pNewScript->GetAI = &GetAI_npc_gilthares; + pNewScript->pQuestAcceptNPC = &QuestAccept_npc_gilthares; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_sputtervalve"; + pNewScript->pGossipHello = &GossipHello_npc_sputtervalve; + pNewScript->pGossipSelect = &GossipSelect_npc_sputtervalve; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_taskmaster_fizzule"; + pNewScript->GetAI = &GetAI_npc_taskmaster_fizzule; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_twiggy_flathead"; + pNewScript->GetAI = &GetAI_npc_twiggy_flathead; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "at_twiggy_flathead"; + pNewScript->pAreaTrigger = &AreaTrigger_at_twiggy_flathead; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_wizzlecranks_shredder"; + pNewScript->GetAI = &GetAI_npc_wizzlecranks_shredder; + pNewScript->pQuestAcceptNPC = &QuestAccept_npc_wizzlecranks_shredder; + pNewScript->RegisterSelf(); } diff --git a/scripts/kalimdor/thousand_needles.cpp b/scripts/kalimdor/thousand_needles.cpp index e6455ad2e..03045ed5e 100644 --- a/scripts/kalimdor/thousand_needles.cpp +++ b/scripts/kalimdor/thousand_needles.cpp @@ -369,30 +369,30 @@ bool GossipSelect_npc_plucky_johnson(Player* pPlayer, Creature* pCreature, uint3 void AddSC_thousand_needles() { - Script* newscript; - - newscript = new Script; - newscript->Name = "npc_kanati"; - newscript->GetAI = &GetAI_npc_kanati; - newscript->pQuestAcceptNPC = &QuestAccept_npc_kanati; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_lakota_windsong"; - newscript->GetAI = &GetAI_npc_lakota_windsong; - newscript->pQuestAcceptNPC = &QuestAccept_npc_lakota_windsong; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_paoka_swiftmountain"; - newscript->GetAI = &GetAI_npc_paoka_swiftmountain; - newscript->pQuestAcceptNPC = &QuestAccept_npc_paoka_swiftmountain; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_plucky_johnson"; - newscript->GetAI = &GetAI_npc_plucky_johnson; - newscript->pGossipHello = &GossipHello_npc_plucky_johnson; - newscript->pGossipSelect = &GossipSelect_npc_plucky_johnson; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "npc_kanati"; + pNewScript->GetAI = &GetAI_npc_kanati; + pNewScript->pQuestAcceptNPC = &QuestAccept_npc_kanati; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_lakota_windsong"; + pNewScript->GetAI = &GetAI_npc_lakota_windsong; + pNewScript->pQuestAcceptNPC = &QuestAccept_npc_lakota_windsong; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_paoka_swiftmountain"; + pNewScript->GetAI = &GetAI_npc_paoka_swiftmountain; + pNewScript->pQuestAcceptNPC = &QuestAccept_npc_paoka_swiftmountain; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_plucky_johnson"; + pNewScript->GetAI = &GetAI_npc_plucky_johnson; + pNewScript->pGossipHello = &GossipHello_npc_plucky_johnson; + pNewScript->pGossipSelect = &GossipSelect_npc_plucky_johnson; + pNewScript->RegisterSelf(); } diff --git a/scripts/kalimdor/thunder_bluff.cpp b/scripts/kalimdor/thunder_bluff.cpp index 3a1ca986e..baedbdacf 100644 --- a/scripts/kalimdor/thunder_bluff.cpp +++ b/scripts/kalimdor/thunder_bluff.cpp @@ -123,12 +123,12 @@ bool GossipSelect_npc_cairne_bloodhoof(Player* pPlayer, Creature* pCreature, uin void AddSC_thunder_bluff() { - Script *newscript; - - newscript = new Script; - newscript->Name = "npc_cairne_bloodhoof"; - newscript->GetAI = &GetAI_npc_cairne_bloodhoof; - newscript->pGossipHello = &GossipHello_npc_cairne_bloodhoof; - newscript->pGossipSelect = &GossipSelect_npc_cairne_bloodhoof; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "npc_cairne_bloodhoof"; + pNewScript->GetAI = &GetAI_npc_cairne_bloodhoof; + pNewScript->pGossipHello = &GossipHello_npc_cairne_bloodhoof; + pNewScript->pGossipSelect = &GossipSelect_npc_cairne_bloodhoof; + pNewScript->RegisterSelf(); } diff --git a/scripts/northrend/azjol-nerub/ahnkahet/boss_jedoga.cpp b/scripts/northrend/azjol-nerub/ahnkahet/boss_jedoga.cpp index ff4e2469d..1211b8924 100644 --- a/scripts/northrend/azjol-nerub/ahnkahet/boss_jedoga.cpp +++ b/scripts/northrend/azjol-nerub/ahnkahet/boss_jedoga.cpp @@ -176,10 +176,10 @@ CreatureAI* GetAI_boss_jedoga(Creature* pCreature) void AddSC_boss_jedoga() { - Script* newscript; + Script* pNewScript; - newscript = new Script; - newscript->Name = "boss_jedoga"; - newscript->GetAI = &GetAI_boss_jedoga; - newscript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "boss_jedoga"; + pNewScript->GetAI = &GetAI_boss_jedoga; + pNewScript->RegisterSelf(); } diff --git a/scripts/northrend/azjol-nerub/ahnkahet/boss_nadox.cpp b/scripts/northrend/azjol-nerub/ahnkahet/boss_nadox.cpp index ff10a5647..f026b944d 100644 --- a/scripts/northrend/azjol-nerub/ahnkahet/boss_nadox.cpp +++ b/scripts/northrend/azjol-nerub/ahnkahet/boss_nadox.cpp @@ -223,15 +223,15 @@ CreatureAI* GetAI_boss_nadox(Creature* pCreature) void AddSC_boss_nadox() { - Script* newscript; + Script* pNewScript; - newscript = new Script; - newscript->Name = "boss_nadox"; - newscript->GetAI = &GetAI_boss_nadox; - newscript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "boss_nadox"; + pNewScript->GetAI = &GetAI_boss_nadox; + pNewScript->RegisterSelf(); - newscript = new Script; - newscript->Name = "mob_ahnkahar_egg"; - newscript->GetAI = &GetAI_mob_ahnkahar_egg; - newscript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "mob_ahnkahar_egg"; + pNewScript->GetAI = &GetAI_mob_ahnkahar_egg; + pNewScript->RegisterSelf(); } diff --git a/scripts/northrend/azjol-nerub/ahnkahet/boss_taldaram.cpp b/scripts/northrend/azjol-nerub/ahnkahet/boss_taldaram.cpp index 6c53f8cba..54f9a8004 100644 --- a/scripts/northrend/azjol-nerub/ahnkahet/boss_taldaram.cpp +++ b/scripts/northrend/azjol-nerub/ahnkahet/boss_taldaram.cpp @@ -112,15 +112,15 @@ bool GOUse_go_nerubian_device(Player* pPlayer, GameObject* pGo) void AddSC_boss_taldaram() { - Script* newscript; + Script* pNewScript; - newscript = new Script; - newscript->Name = "boss_taldaram"; - newscript->GetAI = &GetAI_boss_taldaram; - newscript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "boss_taldaram"; + pNewScript->GetAI = &GetAI_boss_taldaram; + pNewScript->RegisterSelf(); - newscript = new Script; - newscript->Name = "go_nerubian_device"; - newscript->pGOUse = &GOUse_go_nerubian_device; - newscript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "go_nerubian_device"; + pNewScript->pGOUse = &GOUse_go_nerubian_device; + pNewScript->RegisterSelf(); } diff --git a/scripts/northrend/azjol-nerub/ahnkahet/boss_volazj.cpp b/scripts/northrend/azjol-nerub/ahnkahet/boss_volazj.cpp index 4963c3787..8cb277320 100644 --- a/scripts/northrend/azjol-nerub/ahnkahet/boss_volazj.cpp +++ b/scripts/northrend/azjol-nerub/ahnkahet/boss_volazj.cpp @@ -91,10 +91,10 @@ CreatureAI* GetAI_boss_volazj(Creature* pCreature) void AddSC_boss_volazj() { - Script *newscript; + Script* pNewScript; - newscript = new Script; - newscript->Name = "boss_volazj"; - newscript->GetAI = &GetAI_boss_volazj; - newscript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "boss_volazj"; + pNewScript->GetAI = &GetAI_boss_volazj; + pNewScript->RegisterSelf(); } diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp index a1f6aecc6..0f2e496da 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp @@ -80,10 +80,10 @@ CreatureAI* GetAI_boss_anubarak_trial(Creature* pCreature) void AddSC_boss_anubarak_trial() { - Script* newscript; + Script* pNewScript; - newscript = new Script; - newscript->Name = "boss_anubarak_trial"; - newscript->GetAI = &GetAI_boss_anubarak_trial; - newscript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "boss_anubarak_trial"; + pNewScript->GetAI = &GetAI_boss_anubarak_trial; + pNewScript->RegisterSelf(); } \ No newline at end of file diff --git a/scripts/northrend/gundrak/boss_moorabi.cpp b/scripts/northrend/gundrak/boss_moorabi.cpp index f129b15d9..25b8e1f3c 100644 --- a/scripts/northrend/gundrak/boss_moorabi.cpp +++ b/scripts/northrend/gundrak/boss_moorabi.cpp @@ -178,10 +178,10 @@ CreatureAI* GetAI_boss_moorabi(Creature* pCreature) void AddSC_boss_moorabi() { - Script* newscript; + Script* pNewScript; - newscript = new Script; - newscript->Name = "boss_moorabi"; - newscript->GetAI = &GetAI_boss_moorabi; - newscript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "boss_moorabi"; + pNewScript->GetAI = &GetAI_boss_moorabi; + pNewScript->RegisterSelf(); } diff --git a/scripts/northrend/gundrak/boss_sladran.cpp b/scripts/northrend/gundrak/boss_sladran.cpp index e1f38624f..fcd109b4a 100644 --- a/scripts/northrend/gundrak/boss_sladran.cpp +++ b/scripts/northrend/gundrak/boss_sladran.cpp @@ -232,15 +232,15 @@ CreatureAI* GetAI_boss_sladran(Creature* pCreature) void AddSC_boss_sladran() { - Script* newscript; + Script* pNewScript; - newscript = new Script; - newscript->Name = "boss_sladran"; - newscript->GetAI = &GetAI_boss_sladran; - newscript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "boss_sladran"; + pNewScript->GetAI = &GetAI_boss_sladran; + pNewScript->RegisterSelf(); - newscript = new Script; - newscript->Name = "mob_sladran_summon_target"; - newscript->GetAI = &GetAI_mob_sladran_summon_target; - newscript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "mob_sladran_summon_target"; + pNewScript->GetAI = &GetAI_mob_sladran_summon_target; + pNewScript->RegisterSelf(); } diff --git a/scripts/northrend/icecrown.cpp b/scripts/northrend/icecrown.cpp index 28e48ca7e..e5e214d62 100644 --- a/scripts/northrend/icecrown.cpp +++ b/scripts/northrend/icecrown.cpp @@ -54,11 +54,11 @@ bool GossipSelect_npc_dame_evniki_kapsalis(Player* pPlayer, Creature* pCreature, void AddSC_icecrown() { - Script* newscript; + Script* pNewScript; - newscript = new Script; - newscript->Name = "npc_dame_evniki_kapsalis"; - newscript->pGossipHello = &GossipHello_npc_dame_evniki_kapsalis; - newscript->pGossipSelect = &GossipSelect_npc_dame_evniki_kapsalis; - newscript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "npc_dame_evniki_kapsalis"; + pNewScript->pGossipHello = &GossipHello_npc_dame_evniki_kapsalis; + pNewScript->pGossipSelect = &GossipSelect_npc_dame_evniki_kapsalis; + pNewScript->RegisterSelf(); } diff --git a/scripts/northrend/naxxramas/boss_anubrekhan.cpp b/scripts/northrend/naxxramas/boss_anubrekhan.cpp index 568cccb8d..7c2924985 100644 --- a/scripts/northrend/naxxramas/boss_anubrekhan.cpp +++ b/scripts/northrend/naxxramas/boss_anubrekhan.cpp @@ -184,9 +184,10 @@ CreatureAI* GetAI_boss_anubrekhan(Creature* pCreature) void AddSC_boss_anubrekhan() { - Script* NewScript; - NewScript = new Script; - NewScript->Name = "boss_anubrekhan"; - NewScript->GetAI = &GetAI_boss_anubrekhan; - NewScript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_anubrekhan"; + pNewScript->GetAI = &GetAI_boss_anubrekhan; + pNewScript->RegisterSelf(); } diff --git a/scripts/northrend/naxxramas/boss_four_horsemen.cpp b/scripts/northrend/naxxramas/boss_four_horsemen.cpp index db41d4e6f..6ece1b314 100644 --- a/scripts/northrend/naxxramas/boss_four_horsemen.cpp +++ b/scripts/northrend/naxxramas/boss_four_horsemen.cpp @@ -379,25 +379,25 @@ CreatureAI* GetAI_boss_sir_zeliek(Creature* pCreature) 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(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_lady_blaumeux"; + pNewScript->GetAI = &GetAI_boss_lady_blaumeux; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "boss_rivendare_naxx"; + pNewScript->GetAI = &GetAI_boss_rivendare_naxx; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "boss_thane_korthazz"; + pNewScript->GetAI = &GetAI_boss_thane_korthazz; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "boss_sir_zeliek"; + pNewScript->GetAI = &GetAI_boss_sir_zeliek; + pNewScript->RegisterSelf(); } diff --git a/scripts/northrend/naxxramas/boss_gluth.cpp b/scripts/northrend/naxxramas/boss_gluth.cpp index 73d94a626..809b163f8 100644 --- a/scripts/northrend/naxxramas/boss_gluth.cpp +++ b/scripts/northrend/naxxramas/boss_gluth.cpp @@ -197,9 +197,10 @@ CreatureAI* GetAI_boss_gluth(Creature* pCreature) void AddSC_boss_gluth() { - Script* NewScript; - NewScript = new Script; - NewScript->Name = "boss_gluth"; - NewScript->GetAI = &GetAI_boss_gluth; - NewScript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_gluth"; + pNewScript->GetAI = &GetAI_boss_gluth; + pNewScript->RegisterSelf(); } diff --git a/scripts/northrend/naxxramas/boss_gothik.cpp b/scripts/northrend/naxxramas/boss_gothik.cpp index bf050b5b3..691a2d04b 100644 --- a/scripts/northrend/naxxramas/boss_gothik.cpp +++ b/scripts/northrend/naxxramas/boss_gothik.cpp @@ -426,15 +426,15 @@ bool EffectDummyCreature_spell_anchor(Unit* pCaster, uint32 uiSpellId, SpellEffe void AddSC_boss_gothik() { - Script* newscript; + Script* pNewScript; - newscript = new Script; - newscript->Name = "boss_gothik"; - newscript->GetAI = &GetAI_boss_gothik; - newscript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "boss_gothik"; + pNewScript->GetAI = &GetAI_boss_gothik; + pNewScript->RegisterSelf(); - newscript = new Script; - newscript->Name = "spell_anchor"; - newscript->pEffectDummyNPC = &EffectDummyCreature_spell_anchor; - newscript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "spell_anchor"; + pNewScript->pEffectDummyNPC = &EffectDummyCreature_spell_anchor; + pNewScript->RegisterSelf(); } diff --git a/scripts/northrend/naxxramas/boss_heigan.cpp b/scripts/northrend/naxxramas/boss_heigan.cpp index 6929095a3..9c59e6b7c 100644 --- a/scripts/northrend/naxxramas/boss_heigan.cpp +++ b/scripts/northrend/naxxramas/boss_heigan.cpp @@ -218,9 +218,10 @@ CreatureAI* GetAI_boss_heigan(Creature* pCreature) void AddSC_boss_heigan() { - Script* NewScript; - NewScript = new Script; - NewScript->Name = "boss_heigan"; - NewScript->GetAI = &GetAI_boss_heigan; - NewScript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_heigan"; + pNewScript->GetAI = &GetAI_boss_heigan; + pNewScript->RegisterSelf(); } diff --git a/scripts/northrend/naxxramas/boss_kelthuzad.cpp b/scripts/northrend/naxxramas/boss_kelthuzad.cpp index 738db938a..8b222dddf 100644 --- a/scripts/northrend/naxxramas/boss_kelthuzad.cpp +++ b/scripts/northrend/naxxramas/boss_kelthuzad.cpp @@ -569,10 +569,10 @@ CreatureAI* GetAI_boss_kelthuzad(Creature* pCreature) void AddSC_boss_kelthuzad() { - Script* NewScript; + Script* pNewScript; - NewScript = new Script; - NewScript->Name = "boss_kelthuzad"; - NewScript->GetAI = &GetAI_boss_kelthuzad; - NewScript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "boss_kelthuzad"; + pNewScript->GetAI = &GetAI_boss_kelthuzad; + pNewScript->RegisterSelf(); } diff --git a/scripts/northrend/naxxramas/boss_loatheb.cpp b/scripts/northrend/naxxramas/boss_loatheb.cpp index bfa6b2ea0..18369bfaa 100644 --- a/scripts/northrend/naxxramas/boss_loatheb.cpp +++ b/scripts/northrend/naxxramas/boss_loatheb.cpp @@ -182,9 +182,10 @@ CreatureAI* GetAI_boss_loatheb(Creature* pCreature) void AddSC_boss_loatheb() { - Script* NewScript; - NewScript = new Script; - NewScript->Name = "boss_loatheb"; - NewScript->GetAI = &GetAI_boss_loatheb; - NewScript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_loatheb"; + pNewScript->GetAI = &GetAI_boss_loatheb; + pNewScript->RegisterSelf(); } diff --git a/scripts/northrend/naxxramas/boss_patchwerk.cpp b/scripts/northrend/naxxramas/boss_patchwerk.cpp index 36aea9ff9..2d89dfb4b 100644 --- a/scripts/northrend/naxxramas/boss_patchwerk.cpp +++ b/scripts/northrend/naxxramas/boss_patchwerk.cpp @@ -191,9 +191,10 @@ CreatureAI* GetAI_boss_patchwerk(Creature* pCreature) void AddSC_boss_patchwerk() { - Script* NewScript; - NewScript = new Script; - NewScript->Name = "boss_patchwerk"; - NewScript->GetAI = &GetAI_boss_patchwerk; - NewScript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_patchwerk"; + pNewScript->GetAI = &GetAI_boss_patchwerk; + pNewScript->RegisterSelf(); } diff --git a/scripts/northrend/nexus/nexus/boss_anomalus.cpp b/scripts/northrend/nexus/nexus/boss_anomalus.cpp index 9b45f7769..05a9e1707 100644 --- a/scripts/northrend/nexus/nexus/boss_anomalus.cpp +++ b/scripts/northrend/nexus/nexus/boss_anomalus.cpp @@ -234,15 +234,15 @@ CreatureAI* GetAI_mob_chaotic_rift(Creature* pCreature) void AddSC_boss_anomalus() { - Script* newscript; + Script* pNewScript; - newscript = new Script; - newscript->Name = "boss_anomalus"; - newscript->GetAI = &GetAI_boss_anomalus; - newscript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "boss_anomalus"; + pNewScript->GetAI = &GetAI_boss_anomalus; + pNewScript->RegisterSelf(); - newscript = new Script; - newscript->Name = "mob_chaotic_rift"; - newscript->GetAI = &GetAI_mob_chaotic_rift; - newscript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "mob_chaotic_rift"; + pNewScript->GetAI = &GetAI_mob_chaotic_rift; + pNewScript->RegisterSelf(); } diff --git a/scripts/northrend/nexus/nexus/boss_keristrasza.cpp b/scripts/northrend/nexus/nexus/boss_keristrasza.cpp index f2f83b398..b96834a97 100644 --- a/scripts/northrend/nexus/nexus/boss_keristrasza.cpp +++ b/scripts/northrend/nexus/nexus/boss_keristrasza.cpp @@ -210,10 +210,10 @@ CreatureAI* GetAI_boss_keristrasza(Creature* pCreature) void AddSC_boss_keristrasza() { - Script *newscript; + Script* pNewScript; - newscript = new Script; - newscript->Name = "boss_keristrasza"; - newscript->GetAI = &GetAI_boss_keristrasza; - newscript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "boss_keristrasza"; + pNewScript->GetAI = &GetAI_boss_keristrasza; + pNewScript->RegisterSelf(); } diff --git a/scripts/northrend/nexus/nexus/boss_ormorok.cpp b/scripts/northrend/nexus/nexus/boss_ormorok.cpp index 016f424b5..5466a47e7 100644 --- a/scripts/northrend/nexus/nexus/boss_ormorok.cpp +++ b/scripts/northrend/nexus/nexus/boss_ormorok.cpp @@ -168,10 +168,10 @@ CreatureAI* GetAI_boss_ormorok(Creature* pCreature) void AddSC_boss_ormorok() { - Script *newscript; + Script* pNewScript; - newscript = new Script; - newscript->Name = "boss_ormorok"; - newscript->GetAI = &GetAI_boss_ormorok; - newscript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "boss_ormorok"; + pNewScript->GetAI = &GetAI_boss_ormorok; + pNewScript->RegisterSelf(); } diff --git a/scripts/northrend/nexus/nexus/boss_telestra.cpp b/scripts/northrend/nexus/nexus/boss_telestra.cpp index a41914b62..930e9d36b 100644 --- a/scripts/northrend/nexus/nexus/boss_telestra.cpp +++ b/scripts/northrend/nexus/nexus/boss_telestra.cpp @@ -251,10 +251,10 @@ CreatureAI* GetAI_boss_telestra(Creature* pCreature) void AddSC_boss_telestra() { - Script *newscript; + Script* pNewScript; - newscript = new Script; - newscript->Name = "boss_telestra"; - newscript->GetAI = &GetAI_boss_telestra; - newscript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "boss_telestra"; + pNewScript->GetAI = &GetAI_boss_telestra; + pNewScript->RegisterSelf(); } diff --git a/scripts/northrend/obsidian_sanctum/boss_sartharion.cpp b/scripts/northrend/obsidian_sanctum/boss_sartharion.cpp index 822eb0dd9..a6717be87 100644 --- a/scripts/northrend/obsidian_sanctum/boss_sartharion.cpp +++ b/scripts/northrend/obsidian_sanctum/boss_sartharion.cpp @@ -1099,45 +1099,45 @@ CreatureAI* GetAI_mob_twilight_whelp(Creature* pCreature) void AddSC_boss_sartharion() { - Script *newscript; - - newscript = new Script; - newscript->Name = "boss_sartharion"; - newscript->GetAI = &GetAI_boss_sartharion; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "mob_vesperon"; - newscript->GetAI = &GetAI_mob_vesperon; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "mob_shadron"; - newscript->GetAI = &GetAI_mob_shadron; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "mob_tenebron"; - newscript->GetAI = &GetAI_mob_tenebron; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "mob_acolyte_of_shadron"; - newscript->GetAI = &GetAI_mob_acolyte_of_shadron; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "mob_acolyte_of_vesperon"; - newscript->GetAI = &GetAI_mob_acolyte_of_vesperon; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "mob_twilight_eggs"; - newscript->GetAI = &GetAI_mob_twilight_eggs; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "mob_twilight_whelp"; - newscript->GetAI = &GetAI_mob_twilight_whelp; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_sartharion"; + pNewScript->GetAI = &GetAI_boss_sartharion; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "mob_vesperon"; + pNewScript->GetAI = &GetAI_mob_vesperon; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "mob_shadron"; + pNewScript->GetAI = &GetAI_mob_shadron; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "mob_tenebron"; + pNewScript->GetAI = &GetAI_mob_tenebron; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "mob_acolyte_of_shadron"; + pNewScript->GetAI = &GetAI_mob_acolyte_of_shadron; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "mob_acolyte_of_vesperon"; + pNewScript->GetAI = &GetAI_mob_acolyte_of_vesperon; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "mob_twilight_eggs"; + pNewScript->GetAI = &GetAI_mob_twilight_eggs; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "mob_twilight_whelp"; + pNewScript->GetAI = &GetAI_mob_twilight_whelp; + pNewScript->RegisterSelf(); } diff --git a/scripts/northrend/ulduar/halls_of_lightning/boss_bjarngrim.cpp b/scripts/northrend/ulduar/halls_of_lightning/boss_bjarngrim.cpp index 767fa144f..81dc554a9 100644 --- a/scripts/northrend/ulduar/halls_of_lightning/boss_bjarngrim.cpp +++ b/scripts/northrend/ulduar/halls_of_lightning/boss_bjarngrim.cpp @@ -396,15 +396,15 @@ CreatureAI* GetAI_mob_stormforged_lieutenant(Creature* pCreature) void AddSC_boss_bjarngrim() { - Script *newscript; + Script* pNewScript; - newscript = new Script; - newscript->Name = "boss_bjarngrim"; - newscript->GetAI = &GetAI_boss_bjarngrim; - newscript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "boss_bjarngrim"; + pNewScript->GetAI = &GetAI_boss_bjarngrim; + pNewScript->RegisterSelf(); - newscript = new Script; - newscript->Name = "mob_stormforged_lieutenant"; - newscript->GetAI = &GetAI_mob_stormforged_lieutenant; - newscript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "mob_stormforged_lieutenant"; + pNewScript->GetAI = &GetAI_mob_stormforged_lieutenant; + pNewScript->RegisterSelf(); } diff --git a/scripts/northrend/ulduar/halls_of_lightning/boss_ionar.cpp b/scripts/northrend/ulduar/halls_of_lightning/boss_ionar.cpp index 9ce7e7cd5..d97140b31 100644 --- a/scripts/northrend/ulduar/halls_of_lightning/boss_ionar.cpp +++ b/scripts/northrend/ulduar/halls_of_lightning/boss_ionar.cpp @@ -373,16 +373,16 @@ CreatureAI* GetAI_mob_spark_of_ionar(Creature* pCreature) void AddSC_boss_ionar() { - Script *newscript; - - newscript = new Script; - newscript->Name = "boss_ionar"; - newscript->GetAI = &GetAI_boss_ionar; - newscript->pEffectDummyNPC = &EffectDummyCreature_boss_ionar; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "mob_spark_of_ionar"; - newscript->GetAI = &GetAI_mob_spark_of_ionar; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_ionar"; + pNewScript->GetAI = &GetAI_boss_ionar; + pNewScript->pEffectDummyNPC = &EffectDummyCreature_boss_ionar; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "mob_spark_of_ionar"; + pNewScript->GetAI = &GetAI_mob_spark_of_ionar; + pNewScript->RegisterSelf(); } diff --git a/scripts/northrend/ulduar/halls_of_lightning/boss_loken.cpp b/scripts/northrend/ulduar/halls_of_lightning/boss_loken.cpp index 30f5bbeda..885c09c22 100644 --- a/scripts/northrend/ulduar/halls_of_lightning/boss_loken.cpp +++ b/scripts/northrend/ulduar/halls_of_lightning/boss_loken.cpp @@ -219,10 +219,10 @@ CreatureAI* GetAI_boss_loken(Creature* pCreature) void AddSC_boss_loken() { - Script *newscript; + Script* pNewScript; - newscript = new Script; - newscript->Name = "boss_loken"; - newscript->GetAI = &GetAI_boss_loken; - newscript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "boss_loken"; + pNewScript->GetAI = &GetAI_boss_loken; + pNewScript->RegisterSelf(); } diff --git a/scripts/northrend/ulduar/halls_of_lightning/boss_volkhan.cpp b/scripts/northrend/ulduar/halls_of_lightning/boss_volkhan.cpp index 6a1ec0381..e64725a83 100644 --- a/scripts/northrend/ulduar/halls_of_lightning/boss_volkhan.cpp +++ b/scripts/northrend/ulduar/halls_of_lightning/boss_volkhan.cpp @@ -455,21 +455,21 @@ CreatureAI* GetAI_mob_molten_golem(Creature* pCreature) void AddSC_boss_volkhan() { - Script *newscript; - - newscript = new Script; - newscript->Name = "boss_volkhan"; - newscript->GetAI = &GetAI_boss_volkhan; - newscript->pEffectDummyNPC = &EffectDummyCreature_boss_volkhan; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_volkhan_anvil"; - newscript->pEffectDummyNPC = &EffectDummyCreature_npc_volkhan_anvil; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "mob_molten_golem"; - newscript->GetAI = &GetAI_mob_molten_golem; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_volkhan"; + pNewScript->GetAI = &GetAI_boss_volkhan; + pNewScript->pEffectDummyNPC = &EffectDummyCreature_boss_volkhan; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_volkhan_anvil"; + pNewScript->pEffectDummyNPC = &EffectDummyCreature_npc_volkhan_anvil; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "mob_molten_golem"; + pNewScript->GetAI = &GetAI_mob_molten_golem; + pNewScript->RegisterSelf(); } diff --git a/scripts/northrend/ulduar/halls_of_stone/boss_maiden_of_grief.cpp b/scripts/northrend/ulduar/halls_of_stone/boss_maiden_of_grief.cpp index 57ae2aed8..9a4a96d63 100644 --- a/scripts/northrend/ulduar/halls_of_stone/boss_maiden_of_grief.cpp +++ b/scripts/northrend/ulduar/halls_of_stone/boss_maiden_of_grief.cpp @@ -143,10 +143,10 @@ CreatureAI* GetAI_boss_maiden_of_grief(Creature* pCreature) void AddSC_boss_maiden_of_grief() { - Script *newscript; + Script* pNewScript; - newscript = new Script; - newscript->Name = "boss_maiden_of_grief"; - newscript->GetAI = &GetAI_boss_maiden_of_grief; - newscript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "boss_maiden_of_grief"; + pNewScript->GetAI = &GetAI_boss_maiden_of_grief; + pNewScript->RegisterSelf(); } diff --git a/scripts/northrend/utgarde_keep/utgarde_keep/boss_ingvar.cpp b/scripts/northrend/utgarde_keep/utgarde_keep/boss_ingvar.cpp index a57b89afa..951f216be 100644 --- a/scripts/northrend/utgarde_keep/utgarde_keep/boss_ingvar.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_keep/boss_ingvar.cpp @@ -223,15 +223,15 @@ CreatureAI* GetAI_npc_annhylde(Creature* pCreature) void AddSC_boss_ingvar() { - Script *newscript; + Script* pNewScript; - newscript = new Script; - newscript->Name = "boss_ingvar"; - newscript->GetAI = &GetAI_boss_ingvar; - newscript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "boss_ingvar"; + pNewScript->GetAI = &GetAI_boss_ingvar; + pNewScript->RegisterSelf(); - newscript = new Script; - newscript->Name = "npc_annhylde"; - newscript->GetAI = &GetAI_npc_annhylde; - newscript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "npc_annhylde"; + pNewScript->GetAI = &GetAI_npc_annhylde; + pNewScript->RegisterSelf(); } diff --git a/scripts/northrend/utgarde_keep/utgarde_keep/boss_skarvald_and_dalronn.cpp b/scripts/northrend/utgarde_keep/utgarde_keep/boss_skarvald_and_dalronn.cpp index 57d73162e..c70130662 100644 --- a/scripts/northrend/utgarde_keep/utgarde_keep/boss_skarvald_and_dalronn.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_keep/boss_skarvald_and_dalronn.cpp @@ -320,15 +320,15 @@ CreatureAI* GetAI_boss_dalronn(Creature* pCreature) void AddSC_boss_skarvald_and_dalronn() { - Script *newscript; + Script* pNewScript; - newscript = new Script; - newscript->Name = "boss_skarvald"; - newscript->GetAI = &GetAI_boss_skarvald; - newscript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "boss_skarvald"; + pNewScript->GetAI = &GetAI_boss_skarvald; + pNewScript->RegisterSelf(); - newscript = new Script; - newscript->Name = "boss_dalronn"; - newscript->GetAI = &GetAI_boss_dalronn; - newscript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "boss_dalronn"; + pNewScript->GetAI = &GetAI_boss_dalronn; + pNewScript->RegisterSelf(); } diff --git a/scripts/northrend/utgarde_keep/utgarde_keep/utgarde_keep.cpp b/scripts/northrend/utgarde_keep/utgarde_keep/utgarde_keep.cpp index 2cd6c332e..45274cd9f 100644 --- a/scripts/northrend/utgarde_keep/utgarde_keep/utgarde_keep.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_keep/utgarde_keep.cpp @@ -149,10 +149,10 @@ CreatureAI* GetAI_mob_dragonflayer_forge_master(Creature* pCreature) void AddSC_utgarde_keep() { - Script *newscript; + Script* pNewScript; - newscript = new Script; - newscript->Name = "mob_dragonflayer_forge_master"; - newscript->GetAI = &GetAI_mob_dragonflayer_forge_master; - newscript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "mob_dragonflayer_forge_master"; + pNewScript->GetAI = &GetAI_mob_dragonflayer_forge_master; + pNewScript->RegisterSelf(); } diff --git a/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_gortok.cpp b/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_gortok.cpp index 62207d62e..e47b12e4c 100644 --- a/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_gortok.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_gortok.cpp @@ -96,10 +96,10 @@ CreatureAI* GetAI_boss_gortok(Creature* pCreature) void AddSC_boss_gortok() { - Script *newscript; + Script* pNewScript; - newscript = new Script; - newscript->Name = "boss_gortok"; - newscript->GetAI = &GetAI_boss_gortok; - newscript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "boss_gortok"; + pNewScript->GetAI = &GetAI_boss_gortok; + pNewScript->RegisterSelf(); } diff --git a/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_skadi.cpp b/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_skadi.cpp index 9fe4c3ebb..89e284e12 100644 --- a/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_skadi.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_skadi.cpp @@ -134,15 +134,15 @@ bool AreaTrigger_at_skadi(Player* pPlayer, AreaTriggerEntry const* pAt) void AddSC_boss_skadi() { - Script *newscript; + Script* pNewScript; - newscript = new Script; - newscript->Name = "boss_skadi"; - newscript->GetAI = &GetAI_boss_skadi; - newscript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "boss_skadi"; + pNewScript->GetAI = &GetAI_boss_skadi; + pNewScript->RegisterSelf(); - newscript = new Script; - newscript->Name = "at_skadi"; - newscript->pAreaTrigger = &AreaTrigger_at_skadi; - newscript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "at_skadi"; + pNewScript->pAreaTrigger = &AreaTrigger_at_skadi; + pNewScript->RegisterSelf(); } diff --git a/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_svala.cpp b/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_svala.cpp index 1c548875e..17ce98b9e 100644 --- a/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_svala.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_svala.cpp @@ -257,15 +257,15 @@ bool AreaTrigger_at_svala_intro(Player* pPlayer, AreaTriggerEntry const* pAt) void AddSC_boss_svala() { - Script *newscript; + Script* pNewScript; - newscript = new Script; - newscript->Name = "boss_svala"; - newscript->GetAI = &GetAI_boss_svala; - newscript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "boss_svala"; + pNewScript->GetAI = &GetAI_boss_svala; + pNewScript->RegisterSelf(); - newscript = new Script; - newscript->Name = "at_svala_intro"; - newscript->pAreaTrigger = &AreaTrigger_at_svala_intro; - newscript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "at_svala_intro"; + pNewScript->pAreaTrigger = &AreaTrigger_at_svala_intro; + pNewScript->RegisterSelf(); } diff --git a/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_ymiron.cpp b/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_ymiron.cpp index d2576d39c..518ff19d8 100644 --- a/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_ymiron.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_ymiron.cpp @@ -94,10 +94,10 @@ CreatureAI* GetAI_boss_ymiron(Creature* pCreature) void AddSC_boss_ymiron() { - Script *newscript; + Script* pNewScript; - newscript = new Script; - newscript->Name = "boss_ymiron"; - newscript->GetAI = &GetAI_boss_ymiron; - newscript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "boss_ymiron"; + pNewScript->GetAI = &GetAI_boss_ymiron; + pNewScript->RegisterSelf(); } diff --git a/scripts/northrend/violet_hold/violet_hold.cpp b/scripts/northrend/violet_hold/violet_hold.cpp index 16e7e5513..94415e43c 100644 --- a/scripts/northrend/violet_hold/violet_hold.cpp +++ b/scripts/northrend/violet_hold/violet_hold.cpp @@ -406,28 +406,28 @@ bool EffectDummyCreature_npc_teleportation_portal(Unit* pCaster, uint32 uiSpellI void AddSC_violet_hold() { - Script *newscript; - - newscript = new Script; - newscript->Name = "go_activation_crystal"; - newscript->pGOUse = &GOUse_go_activation_crystal; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_door_seal"; - newscript->pEffectDummyNPC = &EffectDummyCreature_npc_door_seal; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_sinclari"; - newscript->GetAI = &GetAI_npc_sinclari; - newscript->pGossipHello = &GossipHello_npc_sinclari; - newscript->pGossipSelect = &GossipSelect_npc_sinclari; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_teleportation_portal"; - newscript->GetAI = &GetAI_npc_teleportation_portal; - newscript->pEffectDummyNPC = &EffectDummyCreature_npc_teleportation_portal; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "go_activation_crystal"; + pNewScript->pGOUse = &GOUse_go_activation_crystal; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_door_seal"; + pNewScript->pEffectDummyNPC = &EffectDummyCreature_npc_door_seal; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_sinclari"; + pNewScript->GetAI = &GetAI_npc_sinclari; + pNewScript->pGossipHello = &GossipHello_npc_sinclari; + pNewScript->pGossipSelect = &GossipSelect_npc_sinclari; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_teleportation_portal"; + pNewScript->GetAI = &GetAI_npc_teleportation_portal; + pNewScript->pEffectDummyNPC = &EffectDummyCreature_npc_teleportation_portal; + pNewScript->RegisterSelf(); } diff --git a/scripts/outland/auchindoun/auchenai_crypts/boss_exarch_maladaar.cpp b/scripts/outland/auchindoun/auchenai_crypts/boss_exarch_maladaar.cpp index 1aae4d20b..87a181302 100644 --- a/scripts/outland/auchindoun/auchenai_crypts/boss_exarch_maladaar.cpp +++ b/scripts/outland/auchindoun/auchenai_crypts/boss_exarch_maladaar.cpp @@ -342,20 +342,20 @@ CreatureAI* GetAI_mob_avatar_of_martyred(Creature* pCreature) void AddSC_boss_exarch_maladaar() { - Script* newscript; - - newscript = new Script; - newscript->Name = "boss_exarch_maladaar"; - newscript->GetAI = &GetAI_boss_exarch_maladaar; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "mob_avatar_of_martyred"; - newscript->GetAI = &GetAI_mob_avatar_of_martyred; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "mob_stolen_soul"; - newscript->GetAI = &GetAI_mob_stolen_soul; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_exarch_maladaar"; + pNewScript->GetAI = &GetAI_boss_exarch_maladaar; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "mob_avatar_of_martyred"; + pNewScript->GetAI = &GetAI_mob_avatar_of_martyred; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "mob_stolen_soul"; + pNewScript->GetAI = &GetAI_mob_stolen_soul; + pNewScript->RegisterSelf(); } diff --git a/scripts/outland/auchindoun/mana_tombs/boss_nexusprince_shaffar.cpp b/scripts/outland/auchindoun/mana_tombs/boss_nexusprince_shaffar.cpp index 6d997c5cb..f7b105739 100644 --- a/scripts/outland/auchindoun/mana_tombs/boss_nexusprince_shaffar.cpp +++ b/scripts/outland/auchindoun/mana_tombs/boss_nexusprince_shaffar.cpp @@ -251,15 +251,15 @@ CreatureAI* GetAI_mob_ethereal_beacon(Creature* pCreature) void AddSC_boss_nexusprince_shaffar() { - Script *newscript; + Script* pNewScript; - newscript = new Script; - newscript->Name = "boss_nexusprince_shaffar"; - newscript->GetAI = &GetAI_boss_nexusprince_shaffar; - newscript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "boss_nexusprince_shaffar"; + pNewScript->GetAI = &GetAI_boss_nexusprince_shaffar; + pNewScript->RegisterSelf(); - newscript = new Script; - newscript->Name = "mob_ethereal_beacon"; - newscript->GetAI = &GetAI_mob_ethereal_beacon; - newscript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "mob_ethereal_beacon"; + pNewScript->GetAI = &GetAI_mob_ethereal_beacon; + pNewScript->RegisterSelf(); } diff --git a/scripts/outland/auchindoun/mana_tombs/boss_pandemonius.cpp b/scripts/outland/auchindoun/mana_tombs/boss_pandemonius.cpp index 56fa79a90..4f1d5ec76 100644 --- a/scripts/outland/auchindoun/mana_tombs/boss_pandemonius.cpp +++ b/scripts/outland/auchindoun/mana_tombs/boss_pandemonius.cpp @@ -126,9 +126,10 @@ CreatureAI* GetAI_boss_pandemonius(Creature* pCreature) void AddSC_boss_pandemonius() { - Script *newscript; - newscript = new Script; - newscript->Name = "boss_pandemonius"; - newscript->GetAI = &GetAI_boss_pandemonius; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_pandemonius"; + pNewScript->GetAI = &GetAI_boss_pandemonius; + pNewScript->RegisterSelf(); } diff --git a/scripts/outland/auchindoun/sethekk_halls/boss_darkweaver_syth.cpp b/scripts/outland/auchindoun/sethekk_halls/boss_darkweaver_syth.cpp index ef0298d85..b4509040c 100644 --- a/scripts/outland/auchindoun/sethekk_halls/boss_darkweaver_syth.cpp +++ b/scripts/outland/auchindoun/sethekk_halls/boss_darkweaver_syth.cpp @@ -403,29 +403,30 @@ CreatureAI* GetAI_mob_syth_shadow(Creature* pCreature) void AddSC_boss_darkweaver_syth() { - Script *newscript; - newscript = new Script; - newscript->Name = "boss_darkweaver_syth"; - newscript->GetAI = &GetAI_boss_darkweaver_syth; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "mob_syth_fire"; - newscript->GetAI = &GetAI_mob_syth_fire; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "mob_syth_arcane"; - newscript->GetAI = &GetAI_mob_syth_arcane; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "mob_syth_frost"; - newscript->GetAI = &GetAI_mob_syth_frost; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "mob_syth_shadow"; - newscript->GetAI = &GetAI_mob_syth_shadow; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_darkweaver_syth"; + pNewScript->GetAI = &GetAI_boss_darkweaver_syth; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "mob_syth_fire"; + pNewScript->GetAI = &GetAI_mob_syth_fire; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "mob_syth_arcane"; + pNewScript->GetAI = &GetAI_mob_syth_arcane; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "mob_syth_frost"; + pNewScript->GetAI = &GetAI_mob_syth_frost; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "mob_syth_shadow"; + pNewScript->GetAI = &GetAI_mob_syth_shadow; + pNewScript->RegisterSelf(); } \ No newline at end of file diff --git a/scripts/outland/auchindoun/sethekk_halls/boss_talon_king_ikiss.cpp b/scripts/outland/auchindoun/sethekk_halls/boss_talon_king_ikiss.cpp index 952b71434..2625b4bb5 100644 --- a/scripts/outland/auchindoun/sethekk_halls/boss_talon_king_ikiss.cpp +++ b/scripts/outland/auchindoun/sethekk_halls/boss_talon_king_ikiss.cpp @@ -205,10 +205,10 @@ CreatureAI* GetAI_boss_talon_king_ikiss(Creature* pCreature) void AddSC_boss_talon_king_ikiss() { - Script* pNewscript; + Script* pNewScript; - pNewscript = new Script; - pNewscript->Name = "boss_talon_king_ikiss"; - pNewscript->GetAI = &GetAI_boss_talon_king_ikiss; - pNewscript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "boss_talon_king_ikiss"; + pNewScript->GetAI = &GetAI_boss_talon_king_ikiss; + pNewScript->RegisterSelf(); } diff --git a/scripts/outland/auchindoun/shadow_labyrinth/boss_blackheart_the_inciter.cpp b/scripts/outland/auchindoun/shadow_labyrinth/boss_blackheart_the_inciter.cpp index 0332a3100..f354fe9b4 100644 --- a/scripts/outland/auchindoun/shadow_labyrinth/boss_blackheart_the_inciter.cpp +++ b/scripts/outland/auchindoun/shadow_labyrinth/boss_blackheart_the_inciter.cpp @@ -188,9 +188,10 @@ CreatureAI* GetAI_boss_blackheart_the_inciter(Creature* pCreature) void AddSC_boss_blackheart_the_inciter() { - Script *newscript; - newscript = new Script; - newscript->Name = "boss_blackheart_the_inciter"; - newscript->GetAI = &GetAI_boss_blackheart_the_inciter; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_blackheart_the_inciter"; + pNewScript->GetAI = &GetAI_boss_blackheart_the_inciter; + pNewScript->RegisterSelf(); } diff --git a/scripts/outland/auchindoun/shadow_labyrinth/boss_grandmaster_vorpil.cpp b/scripts/outland/auchindoun/shadow_labyrinth/boss_grandmaster_vorpil.cpp index 37e276cbf..0d17d0994 100644 --- a/scripts/outland/auchindoun/shadow_labyrinth/boss_grandmaster_vorpil.cpp +++ b/scripts/outland/auchindoun/shadow_labyrinth/boss_grandmaster_vorpil.cpp @@ -226,9 +226,10 @@ CreatureAI* GetAI_boss_grandmaster_vorpil(Creature* pCreature) void AddSC_boss_grandmaster_vorpil() { - Script *newscript; - newscript = new Script; - newscript->Name = "boss_grandmaster_vorpil"; - newscript->GetAI = &GetAI_boss_grandmaster_vorpil; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_grandmaster_vorpil"; + pNewScript->GetAI = &GetAI_boss_grandmaster_vorpil; + pNewScript->RegisterSelf(); } diff --git a/scripts/outland/auchindoun/shadow_labyrinth/boss_murmur.cpp b/scripts/outland/auchindoun/shadow_labyrinth/boss_murmur.cpp index ab6d2666f..815ebdc07 100644 --- a/scripts/outland/auchindoun/shadow_labyrinth/boss_murmur.cpp +++ b/scripts/outland/auchindoun/shadow_labyrinth/boss_murmur.cpp @@ -200,9 +200,10 @@ CreatureAI* GetAI_boss_murmur(Creature* pCreature) void AddSC_boss_murmur() { - Script *newscript; - newscript = new Script; - newscript->Name = "boss_murmur"; - newscript->GetAI = &GetAI_boss_murmur; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_murmur"; + pNewScript->GetAI = &GetAI_boss_murmur; + pNewScript->RegisterSelf(); } diff --git a/scripts/outland/black_temple/black_temple.cpp b/scripts/outland/black_temple/black_temple.cpp index 66739737d..0fc36b1e6 100644 --- a/scripts/outland/black_temple/black_temple.cpp +++ b/scripts/outland/black_temple/black_temple.cpp @@ -58,11 +58,11 @@ bool GossipSelect_npc_spirit_of_olum(Player* pPlayer, Creature* pCreature, uint3 void AddSC_black_temple() { - Script *newscript; + Script* pNewScript; - newscript = new Script; - newscript->Name = "npc_spirit_of_olum"; - newscript->pGossipHello = &GossipHello_npc_spirit_of_olum; - newscript->pGossipSelect = &GossipSelect_npc_spirit_of_olum; - newscript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "npc_spirit_of_olum"; + pNewScript->pGossipHello = &GossipHello_npc_spirit_of_olum; + pNewScript->pGossipSelect = &GossipSelect_npc_spirit_of_olum; + pNewScript->RegisterSelf(); } diff --git a/scripts/outland/black_temple/boss_bloodboil.cpp b/scripts/outland/black_temple/boss_bloodboil.cpp index f8c7be6a5..2d7f6387b 100644 --- a/scripts/outland/black_temple/boss_bloodboil.cpp +++ b/scripts/outland/black_temple/boss_bloodboil.cpp @@ -337,9 +337,10 @@ CreatureAI* GetAI_boss_gurtogg_bloodboil(Creature* pCreature) void AddSC_boss_gurtogg_bloodboil() { - Script *newscript; - newscript = new Script; - newscript->Name = "boss_gurtogg_bloodboil"; - newscript->GetAI = &GetAI_boss_gurtogg_bloodboil; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_gurtogg_bloodboil"; + pNewScript->GetAI = &GetAI_boss_gurtogg_bloodboil; + pNewScript->RegisterSelf(); } diff --git a/scripts/outland/black_temple/boss_illidan.cpp b/scripts/outland/black_temple/boss_illidan.cpp index 02f842869..1fc8953d0 100644 --- a/scripts/outland/black_temple/boss_illidan.cpp +++ b/scripts/outland/black_temple/boss_illidan.cpp @@ -2503,69 +2503,69 @@ CreatureAI* GetAI_parasitic_shadowfiend(Creature* pCreature) void AddSC_boss_illidan() { - Script* newscript; - - newscript = new Script; - newscript->Name = "boss_illidan_stormrage"; - newscript->GetAI = &GetAI_boss_illidan_stormrage; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_akama_illidan"; - newscript->GetAI = &GetAI_npc_akama_at_illidan; - newscript->pGossipHello = &GossipHello_npc_akama_at_illidan; - newscript->pGossipSelect = &GossipSelect_npc_akama_at_illidan; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "boss_maiev_shadowsong"; - newscript->GetAI = &GetAI_boss_maiev; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "mob_flame_of_azzinoth"; - newscript->GetAI = &GetAI_mob_flame_of_azzinoth; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "mob_blade_of_azzinoth"; - newscript->GetAI = &GetAI_blade_of_azzinoth; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "gameobject_cage_trap"; - newscript->pGOUse = &GOUse_go_cage_trap; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "mob_cage_trap_trigger"; - newscript->GetAI = &GetAI_cage_trap_trigger; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "mob_shadow_demon"; - newscript->GetAI = &GetAI_shadow_demon; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "mob_flame_crash"; - newscript->GetAI = &GetAI_flamecrash; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "mob_demon_fire"; - newscript->GetAI = &GetAI_demonfire; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "mob_blaze"; - newscript->GetAI = &GetAI_blaze; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_illidan_stormrage"; + pNewScript->GetAI = &GetAI_boss_illidan_stormrage; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_akama_illidan"; + pNewScript->GetAI = &GetAI_npc_akama_at_illidan; + pNewScript->pGossipHello = &GossipHello_npc_akama_at_illidan; + pNewScript->pGossipSelect = &GossipSelect_npc_akama_at_illidan; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "boss_maiev_shadowsong"; + pNewScript->GetAI = &GetAI_boss_maiev; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "mob_flame_of_azzinoth"; + pNewScript->GetAI = &GetAI_mob_flame_of_azzinoth; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "mob_blade_of_azzinoth"; + pNewScript->GetAI = &GetAI_blade_of_azzinoth; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "gameobject_cage_trap"; + pNewScript->pGOUse = &GOUse_go_cage_trap; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "mob_cage_trap_trigger"; + pNewScript->GetAI = &GetAI_cage_trap_trigger; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "mob_shadow_demon"; + pNewScript->GetAI = &GetAI_shadow_demon; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "mob_flame_crash"; + pNewScript->GetAI = &GetAI_flamecrash; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "mob_demon_fire"; + pNewScript->GetAI = &GetAI_demonfire; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "mob_blaze"; + pNewScript->GetAI = &GetAI_blaze; + pNewScript->RegisterSelf(); /* ** TODO dead code - newscript = new Script; - newscript->Name = "mob_parasitic_shadowfiend"; - newscript->GetAI = &GetAI_parasitic_shadowfiend; - newscript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "mob_parasitic_shadowfiend"; + pNewScript->GetAI = &GetAI_parasitic_shadowfiend; + pNewScript->RegisterSelf(); */ } diff --git a/scripts/outland/black_temple/boss_mother_shahraz.cpp b/scripts/outland/black_temple/boss_mother_shahraz.cpp index ee6cb4533..2a9d74f84 100644 --- a/scripts/outland/black_temple/boss_mother_shahraz.cpp +++ b/scripts/outland/black_temple/boss_mother_shahraz.cpp @@ -298,9 +298,10 @@ CreatureAI* GetAI_boss_shahraz(Creature* pCreature) void AddSC_boss_mother_shahraz() { - Script *newscript; - newscript = new Script; - newscript->Name = "boss_mother_shahraz"; - newscript->GetAI = &GetAI_boss_shahraz; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_mother_shahraz"; + pNewScript->GetAI = &GetAI_boss_shahraz; + pNewScript->RegisterSelf(); } diff --git a/scripts/outland/black_temple/boss_reliquary_of_souls.cpp b/scripts/outland/black_temple/boss_reliquary_of_souls.cpp index ab026bfad..151508b35 100644 --- a/scripts/outland/black_temple/boss_reliquary_of_souls.cpp +++ b/scripts/outland/black_temple/boss_reliquary_of_souls.cpp @@ -944,29 +944,30 @@ CreatureAI* GetAI_npc_enslaved_soul(Creature* pCreature) void AddSC_boss_reliquary_of_souls() { - Script *newscript; - newscript = new Script; - newscript->Name = "boss_reliquary_of_souls"; - newscript->GetAI = &GetAI_boss_reliquary_of_souls; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "boss_essence_of_suffering"; - newscript->GetAI = &GetAI_boss_essence_of_suffering; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "boss_essence_of_desire"; - newscript->GetAI = &GetAI_boss_essence_of_desire; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "boss_essence_of_anger"; - newscript->GetAI = &GetAI_boss_essence_of_anger; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_enslaved_soul"; - newscript->GetAI = &GetAI_npc_enslaved_soul; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_reliquary_of_souls"; + pNewScript->GetAI = &GetAI_boss_reliquary_of_souls; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "boss_essence_of_suffering"; + pNewScript->GetAI = &GetAI_boss_essence_of_suffering; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "boss_essence_of_desire"; + pNewScript->GetAI = &GetAI_boss_essence_of_desire; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "boss_essence_of_anger"; + pNewScript->GetAI = &GetAI_boss_essence_of_anger; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_enslaved_soul"; + pNewScript->GetAI = &GetAI_npc_enslaved_soul; + pNewScript->RegisterSelf(); } diff --git a/scripts/outland/black_temple/boss_shade_of_akama.cpp b/scripts/outland/black_temple/boss_shade_of_akama.cpp index 818bff867..c23ad9745 100644 --- a/scripts/outland/black_temple/boss_shade_of_akama.cpp +++ b/scripts/outland/black_temple/boss_shade_of_akama.cpp @@ -861,26 +861,27 @@ CreatureAI* GetAI_mob_ashtongue_sorcerer(Creature* pCreature) void AddSC_boss_shade_of_akama() { - Script *newscript; - newscript = new Script; - newscript->Name = "boss_shade_of_akama"; - newscript->GetAI = &GetAI_boss_shade_of_akama; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_akama_shade"; - newscript->GetAI = &GetAI_npc_akama_shade; - newscript->pGossipHello = &GossipHello_npc_akama; - newscript->pGossipSelect = &GossipSelect_npc_akama; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "mob_ashtongue_channeler"; - newscript->GetAI = &GetAI_mob_ashtongue_channeler; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "mob_ashtongue_sorcerer"; - newscript->GetAI = &GetAI_mob_ashtongue_sorcerer; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_shade_of_akama"; + pNewScript->GetAI = &GetAI_boss_shade_of_akama; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_akama_shade"; + pNewScript->GetAI = &GetAI_npc_akama_shade; + pNewScript->pGossipHello = &GossipHello_npc_akama; + pNewScript->pGossipSelect = &GossipSelect_npc_akama; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "mob_ashtongue_channeler"; + pNewScript->GetAI = &GetAI_mob_ashtongue_channeler; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "mob_ashtongue_sorcerer"; + pNewScript->GetAI = &GetAI_mob_ashtongue_sorcerer; + pNewScript->RegisterSelf(); } diff --git a/scripts/outland/black_temple/boss_teron_gorefiend.cpp b/scripts/outland/black_temple/boss_teron_gorefiend.cpp index 9eff35e52..55879ab2f 100644 --- a/scripts/outland/black_temple/boss_teron_gorefiend.cpp +++ b/scripts/outland/black_temple/boss_teron_gorefiend.cpp @@ -497,19 +497,20 @@ CreatureAI* GetAI_boss_teron_gorefiend(Creature* pCreature) void AddSC_boss_teron_gorefiend() { - Script *newscript; - newscript = new Script; - newscript->Name = "mob_doom_blossom"; - newscript->GetAI = &GetAI_mob_doom_blossom; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "mob_shadowy_construct"; - newscript->GetAI = &GetAI_mob_shadowy_construct; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "boss_teron_gorefiend"; - newscript->GetAI = &GetAI_boss_teron_gorefiend; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "mob_doom_blossom"; + pNewScript->GetAI = &GetAI_mob_doom_blossom; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "mob_shadowy_construct"; + pNewScript->GetAI = &GetAI_mob_shadowy_construct; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "boss_teron_gorefiend"; + pNewScript->GetAI = &GetAI_boss_teron_gorefiend; + pNewScript->RegisterSelf(); } diff --git a/scripts/outland/boss_doomlord_kazzak.cpp b/scripts/outland/boss_doomlord_kazzak.cpp index 25afc29a1..6527b8444 100644 --- a/scripts/outland/boss_doomlord_kazzak.cpp +++ b/scripts/outland/boss_doomlord_kazzak.cpp @@ -175,9 +175,10 @@ CreatureAI* GetAI_boss_doomlordkazzak(Creature* pCreature) void AddSC_boss_doomlordkazzak() { - Script *newscript; - newscript = new Script; - newscript->Name = "boss_doomlord_kazzak"; - newscript->GetAI = &GetAI_boss_doomlordkazzak; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_doomlord_kazzak"; + pNewScript->GetAI = &GetAI_boss_doomlordkazzak; + pNewScript->RegisterSelf(); } diff --git a/scripts/outland/boss_doomwalker.cpp b/scripts/outland/boss_doomwalker.cpp index 1244e3f41..b72e65c62 100644 --- a/scripts/outland/boss_doomwalker.cpp +++ b/scripts/outland/boss_doomwalker.cpp @@ -175,9 +175,10 @@ CreatureAI* GetAI_boss_doomwalker(Creature* pCreature) void AddSC_boss_doomwalker() { - Script *newscript; - newscript = new Script; - newscript->Name = "boss_doomwalker"; - newscript->GetAI = &GetAI_boss_doomwalker; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_doomwalker"; + pNewScript->GetAI = &GetAI_boss_doomwalker; + pNewScript->RegisterSelf(); } diff --git a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_hydross_the_unstable.cpp b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_hydross_the_unstable.cpp index eb56aac69..13d658401 100644 --- a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_hydross_the_unstable.cpp +++ b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_hydross_the_unstable.cpp @@ -314,9 +314,10 @@ CreatureAI* GetAI_boss_hydross_the_unstable(Creature* pCreature) void AddSC_boss_hydross_the_unstable() { - Script *newscript; - newscript = new Script; - newscript->Name = "boss_hydross_the_unstable"; - newscript->GetAI = &GetAI_boss_hydross_the_unstable; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_hydross_the_unstable"; + pNewScript->GetAI = &GetAI_boss_hydross_the_unstable; + pNewScript->RegisterSelf(); } diff --git a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_lady_vashj.cpp b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_lady_vashj.cpp index 520b3ffc4..326f71f28 100644 --- a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_lady_vashj.cpp +++ b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_lady_vashj.cpp @@ -735,34 +735,35 @@ CreatureAI* GetAI_mob_shield_generator_channel(Creature* pCreature) void AddSC_boss_lady_vashj() { - Script *newscript; - newscript = new Script; - newscript->Name = "boss_lady_vashj"; - newscript->GetAI = &GetAI_boss_lady_vashj; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "mob_enchanted_elemental"; - newscript->GetAI = &GetAI_mob_enchanted_elemental; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "mob_tainted_elemental"; - newscript->GetAI = &GetAI_mob_tainted_elemental; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "mob_toxic_sporebat"; - newscript->GetAI = &GetAI_mob_toxic_sporebat; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "mob_shield_generator_channel"; - newscript->GetAI = &GetAI_mob_shield_generator_channel; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "item_tainted_core"; - newscript->pItemUse = &ItemUse_item_tainted_core; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_lady_vashj"; + pNewScript->GetAI = &GetAI_boss_lady_vashj; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "mob_enchanted_elemental"; + pNewScript->GetAI = &GetAI_mob_enchanted_elemental; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "mob_tainted_elemental"; + pNewScript->GetAI = &GetAI_mob_tainted_elemental; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "mob_toxic_sporebat"; + pNewScript->GetAI = &GetAI_mob_toxic_sporebat; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "mob_shield_generator_channel"; + pNewScript->GetAI = &GetAI_mob_shield_generator_channel; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "item_tainted_core"; + pNewScript->pItemUse = &ItemUse_item_tainted_core; + pNewScript->RegisterSelf(); } diff --git a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_leotheras_the_blind.cpp b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_leotheras_the_blind.cpp index 91ef34a37..a041c934b 100644 --- a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_leotheras_the_blind.cpp +++ b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_leotheras_the_blind.cpp @@ -327,15 +327,15 @@ CreatureAI* GetAI_boss_leotheras_the_blind_demonform(Creature* pCreature) void AddSC_boss_leotheras_the_blind() { - Script *newscript; + Script* pNewScript; - newscript = new Script; - newscript->Name = "boss_leotheras_the_blind"; - newscript->GetAI = &GetAI_boss_leotheras_the_blind; - newscript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "boss_leotheras_the_blind"; + pNewScript->GetAI = &GetAI_boss_leotheras_the_blind; + pNewScript->RegisterSelf(); - newscript = new Script; - newscript->Name = "boss_leotheras_the_blind_demonform"; - newscript->GetAI = &GetAI_boss_leotheras_the_blind_demonform; - newscript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "boss_leotheras_the_blind_demonform"; + pNewScript->GetAI = &GetAI_boss_leotheras_the_blind_demonform; + pNewScript->RegisterSelf(); } diff --git a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_morogrim_tidewalker.cpp b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_morogrim_tidewalker.cpp index 8d47d3eea..6bb782656 100644 --- a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_morogrim_tidewalker.cpp +++ b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_morogrim_tidewalker.cpp @@ -303,15 +303,15 @@ CreatureAI* GetAI_mob_water_globule(Creature* pCreature) void AddSC_boss_morogrim_tidewalker() { - Script *newscript; + Script* pNewScript; - newscript = new Script; - newscript->Name = "boss_morogrim_tidewalker"; - newscript->GetAI = &GetAI_boss_morogrim_tidewalker; - newscript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "boss_morogrim_tidewalker"; + pNewScript->GetAI = &GetAI_boss_morogrim_tidewalker; + pNewScript->RegisterSelf(); - newscript = new Script; - newscript->Name = "mob_water_globule"; - newscript->GetAI = &GetAI_mob_water_globule; - newscript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "mob_water_globule"; + pNewScript->GetAI = &GetAI_mob_water_globule; + pNewScript->RegisterSelf(); } diff --git a/scripts/outland/coilfang_reservoir/steam_vault/boss_hydromancer_thespia.cpp b/scripts/outland/coilfang_reservoir/steam_vault/boss_hydromancer_thespia.cpp index 82ed301d5..68f1f3ab4 100644 --- a/scripts/outland/coilfang_reservoir/steam_vault/boss_hydromancer_thespia.cpp +++ b/scripts/outland/coilfang_reservoir/steam_vault/boss_hydromancer_thespia.cpp @@ -180,15 +180,15 @@ CreatureAI* GetAI_mob_coilfang_waterelementalAI(Creature* pCreature) void AddSC_boss_hydromancer_thespia() { - Script *newscript; + Script* pNewScript; - newscript = new Script; - newscript->Name = "boss_hydromancer_thespia"; - newscript->GetAI = &GetAI_boss_thespiaAI; - newscript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "boss_hydromancer_thespia"; + pNewScript->GetAI = &GetAI_boss_thespiaAI; + pNewScript->RegisterSelf(); - newscript = new Script; - newscript->Name = "mob_coilfang_waterelemental"; - newscript->GetAI = &GetAI_mob_coilfang_waterelementalAI; - newscript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "mob_coilfang_waterelemental"; + pNewScript->GetAI = &GetAI_mob_coilfang_waterelementalAI; + pNewScript->RegisterSelf(); } diff --git a/scripts/outland/coilfang_reservoir/steam_vault/boss_mekgineer_steamrigger.cpp b/scripts/outland/coilfang_reservoir/steam_vault/boss_mekgineer_steamrigger.cpp index 422fea4e2..a292b0687 100644 --- a/scripts/outland/coilfang_reservoir/steam_vault/boss_mekgineer_steamrigger.cpp +++ b/scripts/outland/coilfang_reservoir/steam_vault/boss_mekgineer_steamrigger.cpp @@ -265,15 +265,15 @@ CreatureAI* GetAI_mob_steamrigger_mechanic(Creature* pCreature) void AddSC_boss_mekgineer_steamrigger() { - Script *newscript; + Script* pNewScript; - newscript = new Script; - newscript->Name = "boss_mekgineer_steamrigger"; - newscript->GetAI = &GetAI_boss_mekgineer_steamrigger; - newscript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "boss_mekgineer_steamrigger"; + pNewScript->GetAI = &GetAI_boss_mekgineer_steamrigger; + pNewScript->RegisterSelf(); - newscript = new Script; - newscript->Name = "mob_steamrigger_mechanic"; - newscript->GetAI = &GetAI_mob_steamrigger_mechanic; - newscript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "mob_steamrigger_mechanic"; + pNewScript->GetAI = &GetAI_mob_steamrigger_mechanic; + pNewScript->RegisterSelf(); } diff --git a/scripts/outland/coilfang_reservoir/steam_vault/boss_warlord_kalithresh.cpp b/scripts/outland/coilfang_reservoir/steam_vault/boss_warlord_kalithresh.cpp index 6e1ffe336..633735d2c 100644 --- a/scripts/outland/coilfang_reservoir/steam_vault/boss_warlord_kalithresh.cpp +++ b/scripts/outland/coilfang_reservoir/steam_vault/boss_warlord_kalithresh.cpp @@ -196,15 +196,15 @@ CreatureAI* GetAI_boss_warlord_kalithresh(Creature* pCreature) void AddSC_boss_warlord_kalithresh() { - Script *newscript; + Script* pNewScript; - newscript = new Script; - newscript->Name = "mob_naga_distiller"; - newscript->GetAI = &GetAI_mob_naga_distiller; - newscript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "mob_naga_distiller"; + pNewScript->GetAI = &GetAI_mob_naga_distiller; + pNewScript->RegisterSelf(); - newscript = new Script; - newscript->Name = "boss_warlord_kalithresh"; - newscript->GetAI = &GetAI_boss_warlord_kalithresh; - newscript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "boss_warlord_kalithresh"; + pNewScript->GetAI = &GetAI_boss_warlord_kalithresh; + pNewScript->RegisterSelf(); } diff --git a/scripts/outland/coilfang_reservoir/underbog/boss_hungarfen.cpp b/scripts/outland/coilfang_reservoir/underbog/boss_hungarfen.cpp index 38d1d4367..a803133f8 100644 --- a/scripts/outland/coilfang_reservoir/underbog/boss_hungarfen.cpp +++ b/scripts/outland/coilfang_reservoir/underbog/boss_hungarfen.cpp @@ -136,15 +136,15 @@ CreatureAI* GetAI_mob_underbog_mushroom(Creature* pCreature) void AddSC_boss_hungarfen() { - Script *newscript; + Script* pNewScript; - newscript = new Script; - newscript->Name = "boss_hungarfen"; - newscript->GetAI = &GetAI_boss_hungarfen; - newscript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "boss_hungarfen"; + pNewScript->GetAI = &GetAI_boss_hungarfen; + pNewScript->RegisterSelf(); - newscript = new Script; - newscript->Name = "mob_underbog_mushroom"; - newscript->GetAI = &GetAI_mob_underbog_mushroom; - newscript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "mob_underbog_mushroom"; + pNewScript->GetAI = &GetAI_mob_underbog_mushroom; + pNewScript->RegisterSelf(); } diff --git a/scripts/outland/gruuls_lair/boss_gruul.cpp b/scripts/outland/gruuls_lair/boss_gruul.cpp index 7c5459c03..33af4e558 100644 --- a/scripts/outland/gruuls_lair/boss_gruul.cpp +++ b/scripts/outland/gruuls_lair/boss_gruul.cpp @@ -275,9 +275,10 @@ CreatureAI* GetAI_boss_gruul(Creature* pCreature) void AddSC_boss_gruul() { - Script *newscript; - newscript = new Script; - newscript->Name = "boss_gruul"; - newscript->GetAI = &GetAI_boss_gruul; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_gruul"; + pNewScript->GetAI = &GetAI_boss_gruul; + pNewScript->RegisterSelf(); } diff --git a/scripts/outland/gruuls_lair/boss_high_king_maulgar.cpp b/scripts/outland/gruuls_lair/boss_high_king_maulgar.cpp index 6e8302aea..8acbc454c 100644 --- a/scripts/outland/gruuls_lair/boss_high_king_maulgar.cpp +++ b/scripts/outland/gruuls_lair/boss_high_king_maulgar.cpp @@ -592,30 +592,30 @@ CreatureAI *GetAI_boss_krosh_firehand(Creature* pCreature) void AddSC_boss_high_king_maulgar() { - Script *newscript; - - newscript = new Script; - newscript->Name = "boss_high_king_maulgar"; - newscript->GetAI = &GetAI_boss_high_king_maulgar; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "boss_kiggler_the_crazed"; - newscript->GetAI = &GetAI_boss_kiggler_the_crazed; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "boss_blindeye_the_seer"; - newscript->GetAI = &GetAI_boss_blindeye_the_seer; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "boss_olm_the_summoner"; - newscript->GetAI = &GetAI_boss_olm_the_summoner; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "boss_krosh_firehand"; - newscript->GetAI = &GetAI_boss_krosh_firehand; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_high_king_maulgar"; + pNewScript->GetAI = &GetAI_boss_high_king_maulgar; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "boss_kiggler_the_crazed"; + pNewScript->GetAI = &GetAI_boss_kiggler_the_crazed; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "boss_blindeye_the_seer"; + pNewScript->GetAI = &GetAI_boss_blindeye_the_seer; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "boss_olm_the_summoner"; + pNewScript->GetAI = &GetAI_boss_olm_the_summoner; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "boss_krosh_firehand"; + pNewScript->GetAI = &GetAI_boss_krosh_firehand; + pNewScript->RegisterSelf(); } diff --git a/scripts/outland/hellfire_citadel/blood_furnace/boss_the_maker.cpp b/scripts/outland/hellfire_citadel/blood_furnace/boss_the_maker.cpp index 0aced3bc7..d5fdf714f 100644 --- a/scripts/outland/hellfire_citadel/blood_furnace/boss_the_maker.cpp +++ b/scripts/outland/hellfire_citadel/blood_furnace/boss_the_maker.cpp @@ -142,9 +142,10 @@ CreatureAI* GetAI_boss_the_makerAI(Creature* pCreature) void AddSC_boss_the_maker() { - Script *newscript; - newscript = new Script; - newscript->Name = "boss_the_maker"; - newscript->GetAI = &GetAI_boss_the_makerAI; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_the_maker"; + pNewScript->GetAI = &GetAI_boss_the_makerAI; + pNewScript->RegisterSelf(); } diff --git a/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_nazan_and_vazruden.cpp b/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_nazan_and_vazruden.cpp index 4b3c86b4c..9958cf06c 100644 --- a/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_nazan_and_vazruden.cpp +++ b/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_nazan_and_vazruden.cpp @@ -423,15 +423,15 @@ CreatureAI* GetAI_boss_vazruden_herald(Creature* pCreature) void AddSC_boss_nazan_and_vazruden() { - Script *newscript; + Script* pNewScript; - newscript = new Script; - newscript->Name = "boss_vazruden"; - newscript->GetAI = &GetAI_boss_vazruden; - newscript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "boss_vazruden"; + pNewScript->GetAI = &GetAI_boss_vazruden; + pNewScript->RegisterSelf(); - newscript = new Script; - newscript->Name = "boss_vazruden_herald"; - newscript->GetAI = &GetAI_boss_vazruden_herald; - newscript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "boss_vazruden_herald"; + pNewScript->GetAI = &GetAI_boss_vazruden_herald; + pNewScript->RegisterSelf(); } diff --git a/scripts/outland/hellfire_citadel/magtheridons_lair/boss_magtheridon.cpp b/scripts/outland/hellfire_citadel/magtheridons_lair/boss_magtheridon.cpp index 416cebff7..c3c331161 100644 --- a/scripts/outland/hellfire_citadel/magtheridons_lair/boss_magtheridon.cpp +++ b/scripts/outland/hellfire_citadel/magtheridons_lair/boss_magtheridon.cpp @@ -681,24 +681,25 @@ CreatureAI* GetAI_mob_abyssalAI(Creature* pCreature) void AddSC_boss_magtheridon() { - Script *newscript; - newscript = new Script; - newscript->Name = "boss_magtheridon"; - newscript->GetAI = &GetAI_boss_magtheridon; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "mob_hellfire_channeler"; - newscript->GetAI = &GetAI_mob_hellfire_channeler; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "go_manticron_cube"; - newscript->pGOUse = &GOUse_go_manticron_cube; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "mob_abyssal"; - newscript->GetAI = &GetAI_mob_abyssalAI; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_magtheridon"; + pNewScript->GetAI = &GetAI_boss_magtheridon; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "mob_hellfire_channeler"; + pNewScript->GetAI = &GetAI_mob_hellfire_channeler; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "go_manticron_cube"; + pNewScript->pGOUse = &GOUse_go_manticron_cube; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "mob_abyssal"; + pNewScript->GetAI = &GetAI_mob_abyssalAI; + pNewScript->RegisterSelf(); } diff --git a/scripts/outland/hellfire_citadel/shattered_halls/boss_warbringer_omrogg.cpp b/scripts/outland/hellfire_citadel/shattered_halls/boss_warbringer_omrogg.cpp index c107d0cd6..667c5871a 100644 --- a/scripts/outland/hellfire_citadel/shattered_halls/boss_warbringer_omrogg.cpp +++ b/scripts/outland/hellfire_citadel/shattered_halls/boss_warbringer_omrogg.cpp @@ -392,15 +392,15 @@ CreatureAI* GetAI_mob_omrogg_heads(Creature* pCreature) void AddSC_boss_warbringer_omrogg() { - Script *newscript; + Script* pNewScript; - newscript = new Script; - newscript->Name = "boss_warbringer_omrogg"; - newscript->GetAI = &GetAI_boss_warbringer_omrogg; - newscript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "boss_warbringer_omrogg"; + pNewScript->GetAI = &GetAI_boss_warbringer_omrogg; + pNewScript->RegisterSelf(); - newscript = new Script; - newscript->Name = "mob_omrogg_heads"; - newscript->GetAI = &GetAI_mob_omrogg_heads; - newscript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "mob_omrogg_heads"; + pNewScript->GetAI = &GetAI_mob_omrogg_heads; + pNewScript->RegisterSelf(); } diff --git a/scripts/outland/tempest_keep/arcatraz/arcatraz.cpp b/scripts/outland/tempest_keep/arcatraz/arcatraz.cpp index 1102d1af8..e1624cc41 100644 --- a/scripts/outland/tempest_keep/arcatraz/arcatraz.cpp +++ b/scripts/outland/tempest_keep/arcatraz/arcatraz.cpp @@ -507,20 +507,20 @@ CreatureAI* GetAI_mob_zerekethvoidzoneAI(Creature* pCreature) void AddSC_arcatraz() { - Script *newscript; - - newscript = new Script; - newscript->Name = "npc_millhouse_manastorm"; - newscript->GetAI = &GetAI_npc_millhouse_manastorm; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_warden_mellichar"; - newscript->GetAI = &GetAI_npc_warden_mellichar; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "mob_zerekethvoidzone"; - newscript->GetAI = &GetAI_mob_zerekethvoidzoneAI; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "npc_millhouse_manastorm"; + pNewScript->GetAI = &GetAI_npc_millhouse_manastorm; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_warden_mellichar"; + pNewScript->GetAI = &GetAI_npc_warden_mellichar; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "mob_zerekethvoidzone"; + pNewScript->GetAI = &GetAI_mob_zerekethvoidzoneAI; + pNewScript->RegisterSelf(); } diff --git a/scripts/outland/tempest_keep/botanica/boss_high_botanist_freywinn.cpp b/scripts/outland/tempest_keep/botanica/boss_high_botanist_freywinn.cpp index 330ff068c..35069d885 100644 --- a/scripts/outland/tempest_keep/botanica/boss_high_botanist_freywinn.cpp +++ b/scripts/outland/tempest_keep/botanica/boss_high_botanist_freywinn.cpp @@ -178,10 +178,10 @@ CreatureAI* GetAI_boss_high_botanist_freywinn(Creature* pCreature) void AddSC_boss_high_botanist_freywinn() { - Script *newscript; + Script* pNewScript; - newscript = new Script; - newscript->Name = "boss_high_botanist_freywinn"; - newscript->GetAI = &GetAI_boss_high_botanist_freywinn; - newscript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "boss_high_botanist_freywinn"; + pNewScript->GetAI = &GetAI_boss_high_botanist_freywinn; + pNewScript->RegisterSelf(); } diff --git a/scripts/outland/tempest_keep/botanica/boss_laj.cpp b/scripts/outland/tempest_keep/botanica/boss_laj.cpp index 67630c046..b9fba4b91 100644 --- a/scripts/outland/tempest_keep/botanica/boss_laj.cpp +++ b/scripts/outland/tempest_keep/botanica/boss_laj.cpp @@ -185,10 +185,10 @@ CreatureAI* GetAI_boss_laj(Creature* pCreature) void AddSC_boss_laj() { - Script *newscript; + Script* pNewScript; - newscript = new Script; - newscript->Name = "boss_laj"; - newscript->GetAI = &GetAI_boss_laj; - newscript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "boss_laj"; + pNewScript->GetAI = &GetAI_boss_laj; + pNewScript->RegisterSelf(); } diff --git a/scripts/outland/tempest_keep/botanica/boss_warp_splinter.cpp b/scripts/outland/tempest_keep/botanica/boss_warp_splinter.cpp index 6b4169855..b3a06f3be 100644 --- a/scripts/outland/tempest_keep/botanica/boss_warp_splinter.cpp +++ b/scripts/outland/tempest_keep/botanica/boss_warp_splinter.cpp @@ -227,15 +227,15 @@ CreatureAI* GetAI_mob_treant(Creature* pCreature) void AddSC_boss_warp_splinter() { - Script *newscript; + Script* pNewScript; - newscript = new Script; - newscript->Name = "boss_warp_splinter"; - newscript->GetAI = &GetAI_boss_warp_splinter; - newscript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "boss_warp_splinter"; + pNewScript->GetAI = &GetAI_boss_warp_splinter; + pNewScript->RegisterSelf(); - newscript = new Script; - newscript->Name = "mob_warp_splinter_treant"; - newscript->GetAI = &GetAI_mob_treant; - newscript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "mob_warp_splinter_treant"; + pNewScript->GetAI = &GetAI_mob_treant; + pNewScript->RegisterSelf(); } diff --git a/scripts/outland/tempest_keep/the_eye/boss_kaelthas.cpp b/scripts/outland/tempest_keep/the_eye/boss_kaelthas.cpp index 5b9afa5a3..0db3f3faa 100644 --- a/scripts/outland/tempest_keep/the_eye/boss_kaelthas.cpp +++ b/scripts/outland/tempest_keep/the_eye/boss_kaelthas.cpp @@ -1484,39 +1484,40 @@ CreatureAI* GetAI_mob_phoenix_egg_tk(Creature* pCreature) void AddSC_boss_kaelthas() { - Script *newscript; - newscript = new Script; - newscript->Name = "boss_kaelthas"; - newscript->GetAI = &GetAI_boss_kaelthas; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "boss_thaladred_the_darkener"; - newscript->GetAI = &GetAI_boss_thaladred_the_darkener; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "boss_lord_sanguinar"; - newscript->GetAI = &GetAI_boss_lord_sanguinar; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "boss_grand_astromancer_capernian"; - newscript->GetAI = &GetAI_boss_grand_astromancer_capernian; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "boss_master_engineer_telonicus"; - newscript->GetAI = &GetAI_boss_master_engineer_telonicus; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "mob_phoenix_tk"; - newscript->GetAI = &GetAI_mob_phoenix_tk; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "mob_phoenix_egg_tk"; - newscript->GetAI = &GetAI_mob_phoenix_egg_tk; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_kaelthas"; + pNewScript->GetAI = &GetAI_boss_kaelthas; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "boss_thaladred_the_darkener"; + pNewScript->GetAI = &GetAI_boss_thaladred_the_darkener; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "boss_lord_sanguinar"; + pNewScript->GetAI = &GetAI_boss_lord_sanguinar; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "boss_grand_astromancer_capernian"; + pNewScript->GetAI = &GetAI_boss_grand_astromancer_capernian; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "boss_master_engineer_telonicus"; + pNewScript->GetAI = &GetAI_boss_master_engineer_telonicus; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "mob_phoenix_tk"; + pNewScript->GetAI = &GetAI_mob_phoenix_tk; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "mob_phoenix_egg_tk"; + pNewScript->GetAI = &GetAI_mob_phoenix_egg_tk; + pNewScript->RegisterSelf(); } diff --git a/scripts/outland/tempest_keep/the_eye/boss_void_reaver.cpp b/scripts/outland/tempest_keep/the_eye/boss_void_reaver.cpp index 4ec8ce6d6..33e85ba6d 100644 --- a/scripts/outland/tempest_keep/the_eye/boss_void_reaver.cpp +++ b/scripts/outland/tempest_keep/the_eye/boss_void_reaver.cpp @@ -170,9 +170,10 @@ CreatureAI* GetAI_boss_void_reaver(Creature* pCreature) void AddSC_boss_void_reaver() { - Script *newscript; - newscript = new Script; - newscript->Name = "boss_void_reaver"; - newscript->GetAI = &GetAI_boss_void_reaver; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_void_reaver"; + pNewScript->GetAI = &GetAI_boss_void_reaver; + pNewScript->RegisterSelf(); } diff --git a/scripts/outland/tempest_keep/the_eye/the_eye.cpp b/scripts/outland/tempest_keep/the_eye/the_eye.cpp index d23e2279f..72be6af1e 100644 --- a/scripts/outland/tempest_keep/the_eye/the_eye.cpp +++ b/scripts/outland/tempest_keep/the_eye/the_eye.cpp @@ -86,9 +86,10 @@ CreatureAI* GetAI_mob_crystalcore_devastator(Creature* pCreature) void AddSC_the_eye() { - Script *newscript; - newscript = new Script; - newscript->Name = "mob_crystalcore_devastator"; - newscript->GetAI = &GetAI_mob_crystalcore_devastator; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "mob_crystalcore_devastator"; + pNewScript->GetAI = &GetAI_mob_crystalcore_devastator; + pNewScript->RegisterSelf(); } diff --git a/scripts/outland/tempest_keep/the_mechanar/boss_gatewatcher_ironhand.cpp b/scripts/outland/tempest_keep/the_mechanar/boss_gatewatcher_ironhand.cpp index 3807b95d3..10f81e4b8 100644 --- a/scripts/outland/tempest_keep/the_mechanar/boss_gatewatcher_ironhand.cpp +++ b/scripts/outland/tempest_keep/the_mechanar/boss_gatewatcher_ironhand.cpp @@ -128,9 +128,10 @@ CreatureAI* GetAI_boss_gatewatcher_iron_hand(Creature* pCreature) void AddSC_boss_gatewatcher_iron_hand() { - Script *newscript; - newscript = new Script; - newscript->Name = "boss_gatewatcher_iron_hand"; - newscript->GetAI = &GetAI_boss_gatewatcher_iron_hand; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_gatewatcher_iron_hand"; + pNewScript->GetAI = &GetAI_boss_gatewatcher_iron_hand; + pNewScript->RegisterSelf(); } diff --git a/scripts/outland/tempest_keep/the_mechanar/boss_nethermancer_sepethrea.cpp b/scripts/outland/tempest_keep/the_mechanar/boss_nethermancer_sepethrea.cpp index 57231e1f3..9da442c6a 100644 --- a/scripts/outland/tempest_keep/the_mechanar/boss_nethermancer_sepethrea.cpp +++ b/scripts/outland/tempest_keep/the_mechanar/boss_nethermancer_sepethrea.cpp @@ -234,14 +234,15 @@ CreatureAI* GetAI_mob_ragin_flames(Creature* pCreature) } void AddSC_boss_nethermancer_sepethrea() { - Script *newscript; - newscript = new Script; - newscript->Name = "boss_nethermancer_sepethrea"; - newscript->GetAI = &GetAI_boss_nethermancer_sepethrea; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "mob_ragin_flames"; - newscript->GetAI = &GetAI_mob_ragin_flames; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_nethermancer_sepethrea"; + pNewScript->GetAI = &GetAI_boss_nethermancer_sepethrea; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "mob_ragin_flames"; + pNewScript->GetAI = &GetAI_mob_ragin_flames; + pNewScript->RegisterSelf(); } diff --git a/scripts/outland/tempest_keep/the_mechanar/boss_pathaleon_the_calculator.cpp b/scripts/outland/tempest_keep/the_mechanar/boss_pathaleon_the_calculator.cpp index fd41f0f0f..eea30dbc0 100644 --- a/scripts/outland/tempest_keep/the_mechanar/boss_pathaleon_the_calculator.cpp +++ b/scripts/outland/tempest_keep/the_mechanar/boss_pathaleon_the_calculator.cpp @@ -226,14 +226,15 @@ CreatureAI* GetAI_mob_nether_wraith(Creature* pCreature) void AddSC_boss_pathaleon_the_calculator() { - Script *newscript; - newscript = new Script; - newscript->Name = "boss_pathaleon_the_calculator"; - newscript->GetAI = &GetAI_boss_pathaleon_the_calculator; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "mob_nether_wraith"; - newscript->GetAI = &GetAI_mob_nether_wraith; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_pathaleon_the_calculator"; + pNewScript->GetAI = &GetAI_boss_pathaleon_the_calculator; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "mob_nether_wraith"; + pNewScript->GetAI = &GetAI_mob_nether_wraith; + pNewScript->RegisterSelf(); } diff --git a/scripts/world/guards.cpp b/scripts/world/guards.cpp index ff3423171..4892021bf 100644 --- a/scripts/world/guards.cpp +++ b/scripts/world/guards.cpp @@ -273,105 +273,105 @@ CreatureAI* GetAI_guard_undercity(Creature* pCreature) void AddSC_guards() { - Script *newscript; - - newscript = new Script; - newscript->Name = "guard_azuremyst"; - newscript->GetAI = &GetAI_guard_azuremyst; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "guard_bluffwatcher"; - newscript->GetAI = &GetAI_guard_bluffwatcher; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "guard_contested"; - newscript->GetAI = &GetAI_guard_contested; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "guard_darnassus"; - newscript->GetAI = &GetAI_guard_darnassus; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "guard_dunmorogh"; - newscript->GetAI = &GetAI_guard_dunmorogh; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "guard_durotar"; - newscript->GetAI = &GetAI_guard_durotar; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "guard_elwynnforest"; - newscript->GetAI = &GetAI_guard_elwynnforest; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "guard_eversong"; - newscript->GetAI = &GetAI_guard_eversong; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "guard_exodar"; - newscript->GetAI = &GetAI_guard_exodar; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "guard_ironforge"; - newscript->GetAI = &GetAI_guard_ironforge; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "guard_mulgore"; - newscript->GetAI = &GetAI_guard_mulgore; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "guard_orgrimmar"; - newscript->GetAI = &GetAI_guard_orgrimmar; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "guard_shattrath"; - newscript->GetAI = &GetAI_guard_shattrath; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "guard_shattrath_aldor"; - newscript->GetAI = &GetAI_guard_shattrath_aldor; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "guard_shattrath_scryer"; - newscript->GetAI = &GetAI_guard_shattrath_scryer; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "guard_silvermoon"; - newscript->GetAI = &GetAI_guard_silvermoon; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "guard_stormwind"; - newscript->GetAI = &GetAI_guard_stormwind; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "guard_teldrassil"; - newscript->GetAI = &GetAI_guard_teldrassil; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "guard_tirisfal"; - newscript->GetAI = &GetAI_guard_tirisfal; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "guard_undercity"; - newscript->GetAI = &GetAI_guard_undercity; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "guard_azuremyst"; + pNewScript->GetAI = &GetAI_guard_azuremyst; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "guard_bluffwatcher"; + pNewScript->GetAI = &GetAI_guard_bluffwatcher; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "guard_contested"; + pNewScript->GetAI = &GetAI_guard_contested; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "guard_darnassus"; + pNewScript->GetAI = &GetAI_guard_darnassus; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "guard_dunmorogh"; + pNewScript->GetAI = &GetAI_guard_dunmorogh; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "guard_durotar"; + pNewScript->GetAI = &GetAI_guard_durotar; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "guard_elwynnforest"; + pNewScript->GetAI = &GetAI_guard_elwynnforest; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "guard_eversong"; + pNewScript->GetAI = &GetAI_guard_eversong; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "guard_exodar"; + pNewScript->GetAI = &GetAI_guard_exodar; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "guard_ironforge"; + pNewScript->GetAI = &GetAI_guard_ironforge; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "guard_mulgore"; + pNewScript->GetAI = &GetAI_guard_mulgore; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "guard_orgrimmar"; + pNewScript->GetAI = &GetAI_guard_orgrimmar; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "guard_shattrath"; + pNewScript->GetAI = &GetAI_guard_shattrath; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "guard_shattrath_aldor"; + pNewScript->GetAI = &GetAI_guard_shattrath_aldor; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "guard_shattrath_scryer"; + pNewScript->GetAI = &GetAI_guard_shattrath_scryer; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "guard_silvermoon"; + pNewScript->GetAI = &GetAI_guard_silvermoon; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "guard_stormwind"; + pNewScript->GetAI = &GetAI_guard_stormwind; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "guard_teldrassil"; + pNewScript->GetAI = &GetAI_guard_teldrassil; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "guard_tirisfal"; + pNewScript->GetAI = &GetAI_guard_tirisfal; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "guard_undercity"; + pNewScript->GetAI = &GetAI_guard_undercity; + pNewScript->RegisterSelf(); } diff --git a/scripts/world/item_scripts.cpp b/scripts/world/item_scripts.cpp index 4474aa709..02dadbe83 100644 --- a/scripts/world/item_scripts.cpp +++ b/scripts/world/item_scripts.cpp @@ -129,25 +129,25 @@ bool ItemUse_item_petrov_cluster_bombs(Player* pPlayer, Item* pItem, const Spell void AddSC_item_scripts() { - Script *newscript; - - newscript = new Script; - newscript->Name = "item_arcane_charges"; - newscript->pItemUse = &ItemUse_item_arcane_charges; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "item_flying_machine"; - newscript->pItemUse = &ItemUse_item_flying_machine; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "item_gor_dreks_ointment"; - newscript->pItemUse = &ItemUse_item_gor_dreks_ointment; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "item_petrov_cluster_bombs"; - newscript->pItemUse = &ItemUse_item_petrov_cluster_bombs; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "item_arcane_charges"; + pNewScript->pItemUse = &ItemUse_item_arcane_charges; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "item_flying_machine"; + pNewScript->pItemUse = &ItemUse_item_flying_machine; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "item_gor_dreks_ointment"; + pNewScript->pItemUse = &ItemUse_item_gor_dreks_ointment; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "item_petrov_cluster_bombs"; + pNewScript->pItemUse = &ItemUse_item_petrov_cluster_bombs; + pNewScript->RegisterSelf(); } diff --git a/scripts/world/mob_generic_creature.cpp b/scripts/world/mob_generic_creature.cpp index 1899de44f..44adbf82a 100644 --- a/scripts/world/mob_generic_creature.cpp +++ b/scripts/world/mob_generic_creature.cpp @@ -163,9 +163,10 @@ CreatureAI* GetAI_generic_creature(Creature* pCreature) void AddSC_generic_creature() { - Script *newscript; - newscript = new Script; - newscript->Name = "generic_creature"; - newscript->GetAI = &GetAI_generic_creature; - newscript->RegisterSelf(false); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "generic_creature"; + pNewScript->GetAI = &GetAI_generic_creature; + pNewScript->RegisterSelf(false); } diff --git a/scripts/world/npc_professions.cpp b/scripts/world/npc_professions.cpp index 3f0878a20..c376c447e 100644 --- a/scripts/world/npc_professions.cpp +++ b/scripts/world/npc_professions.cpp @@ -1169,35 +1169,35 @@ bool GossipSelect_npc_prof_tailor(Player* pPlayer, Creature* pCreature, uint32 u void AddSC_npc_professions() { - Script *newscript; - - newscript = new Script; - newscript->Name = "npc_prof_alchemy"; - newscript->pGossipHello = &GossipHello_npc_prof_alchemy; - newscript->pGossipSelect = &GossipSelect_npc_prof_alchemy; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_prof_blacksmith"; - newscript->pGossipHello = &GossipHello_npc_prof_blacksmith; - newscript->pGossipSelect = &GossipSelect_npc_prof_blacksmith; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_prof_leather"; - newscript->pGossipHello = &GossipHello_npc_prof_leather; - newscript->pGossipSelect = &GossipSelect_npc_prof_leather; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_prof_tailor"; - newscript->pGossipHello = &GossipHello_npc_prof_tailor; - newscript->pGossipSelect = &GossipSelect_npc_prof_tailor; - newscript->RegisterSelf(); - - /*newscript = new Script; - newscript->Name = "go_soothsaying_for_dummies"; - newscript->pGOUse = &GOUse_go_soothsaying_for_dummies; - //newscript->pGossipSelect = &GossipSelect_go_soothsaying_for_dummies; - newscript->RegisterSelf();*/ + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "npc_prof_alchemy"; + pNewScript->pGossipHello = &GossipHello_npc_prof_alchemy; + pNewScript->pGossipSelect = &GossipSelect_npc_prof_alchemy; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_prof_blacksmith"; + pNewScript->pGossipHello = &GossipHello_npc_prof_blacksmith; + pNewScript->pGossipSelect = &GossipSelect_npc_prof_blacksmith; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_prof_leather"; + pNewScript->pGossipHello = &GossipHello_npc_prof_leather; + pNewScript->pGossipSelect = &GossipSelect_npc_prof_leather; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_prof_tailor"; + pNewScript->pGossipHello = &GossipHello_npc_prof_tailor; + pNewScript->pGossipSelect = &GossipSelect_npc_prof_tailor; + pNewScript->RegisterSelf(); + + /*pNewScript = new Script; + pNewScript->Name = "go_soothsaying_for_dummies"; + pNewScript->pGOUse = &GOUse_go_soothsaying_for_dummies; + //pNewScript->pGossipSelect = &GossipSelect_go_soothsaying_for_dummies; + pNewScript->RegisterSelf();*/ } diff --git a/scripts/world/npcs_special.cpp b/scripts/world/npcs_special.cpp index 118a9b84e..2bdae858c 100644 --- a/scripts/world/npcs_special.cpp +++ b/scripts/world/npcs_special.cpp @@ -1559,79 +1559,79 @@ bool GossipSelect_npc_tabard_vendor(Player* pPlayer, Creature* pCreature, uint32 void AddSC_npcs_special() { - Script* newscript; - - newscript = new Script; - newscript->Name = "npc_air_force_bots"; - newscript->GetAI = &GetAI_npc_air_force_bots; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_chicken_cluck"; - newscript->GetAI = &GetAI_npc_chicken_cluck; - newscript->pQuestAcceptNPC = &QuestAccept_npc_chicken_cluck; - newscript->pQuestRewardedNPC = &QuestRewarded_npc_chicken_cluck; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_dancing_flames"; - newscript->GetAI = &GetAI_npc_dancing_flames; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_injured_patient"; - newscript->GetAI = &GetAI_npc_injured_patient; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_doctor"; - newscript->GetAI = &GetAI_npc_doctor; - newscript->pQuestAcceptNPC = &QuestAccept_npc_doctor; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_garments_of_quests"; - newscript->GetAI = &GetAI_npc_garments_of_quests; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_guardian"; - newscript->GetAI = &GetAI_npc_guardian; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_innkeeper"; - newscript->pGossipHello = &GossipHello_npc_innkeeper; - newscript->pGossipSelect = &GossipSelect_npc_innkeeper; - newscript->RegisterSelf(false); // script and error report disabled, but script can be used for custom needs, adding ScriptName - - newscript = new Script; - newscript->Name = "npc_lunaclaw_spirit"; - newscript->pGossipHello = &GossipHello_npc_lunaclaw_spirit; - newscript->pGossipSelect = &GossipSelect_npc_lunaclaw_spirit; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_mount_vendor"; - newscript->pGossipHello = &GossipHello_npc_mount_vendor; - newscript->pGossipSelect = &GossipSelect_npc_mount_vendor; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_rogue_trainer"; - newscript->pGossipHello = &GossipHello_npc_rogue_trainer; - newscript->pGossipSelect = &GossipSelect_npc_rogue_trainer; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_sayge"; - newscript->pGossipHello = &GossipHello_npc_sayge; - newscript->pGossipSelect = &GossipSelect_npc_sayge; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_tabard_vendor"; - newscript->pGossipHello = &GossipHello_npc_tabard_vendor; - newscript->pGossipSelect = &GossipSelect_npc_tabard_vendor; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "npc_air_force_bots"; + pNewScript->GetAI = &GetAI_npc_air_force_bots; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_chicken_cluck"; + pNewScript->GetAI = &GetAI_npc_chicken_cluck; + pNewScript->pQuestAcceptNPC = &QuestAccept_npc_chicken_cluck; + pNewScript->pQuestRewardedNPC = &QuestRewarded_npc_chicken_cluck; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_dancing_flames"; + pNewScript->GetAI = &GetAI_npc_dancing_flames; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_injured_patient"; + pNewScript->GetAI = &GetAI_npc_injured_patient; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_doctor"; + pNewScript->GetAI = &GetAI_npc_doctor; + pNewScript->pQuestAcceptNPC = &QuestAccept_npc_doctor; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_garments_of_quests"; + pNewScript->GetAI = &GetAI_npc_garments_of_quests; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_guardian"; + pNewScript->GetAI = &GetAI_npc_guardian; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_innkeeper"; + pNewScript->pGossipHello = &GossipHello_npc_innkeeper; + pNewScript->pGossipSelect = &GossipSelect_npc_innkeeper; + pNewScript->RegisterSelf(false); // script and error report disabled, but script can be used for custom needs, adding ScriptName + + pNewScript = new Script; + pNewScript->Name = "npc_lunaclaw_spirit"; + pNewScript->pGossipHello = &GossipHello_npc_lunaclaw_spirit; + pNewScript->pGossipSelect = &GossipSelect_npc_lunaclaw_spirit; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_mount_vendor"; + pNewScript->pGossipHello = &GossipHello_npc_mount_vendor; + pNewScript->pGossipSelect = &GossipSelect_npc_mount_vendor; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_rogue_trainer"; + pNewScript->pGossipHello = &GossipHello_npc_rogue_trainer; + pNewScript->pGossipSelect = &GossipSelect_npc_rogue_trainer; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_sayge"; + pNewScript->pGossipHello = &GossipHello_npc_sayge; + pNewScript->pGossipSelect = &GossipSelect_npc_sayge; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_tabard_vendor"; + pNewScript->pGossipHello = &GossipHello_npc_tabard_vendor; + pNewScript->pGossipSelect = &GossipSelect_npc_tabard_vendor; + pNewScript->RegisterSelf(); } diff --git a/scripts/world/spell_scripts.cpp b/scripts/world/spell_scripts.cpp index 697bb6cc6..70927568c 100644 --- a/scripts/world/spell_scripts.cpp +++ b/scripts/world/spell_scripts.cpp @@ -907,16 +907,16 @@ bool EffectDummyCreature_spell_dummy_npc(Unit* pCaster, uint32 uiSpellId, SpellE void AddSC_spell_scripts() { - Script* pNewscript; - - pNewscript = new Script; - pNewscript->Name = "spell_dummy_go"; - pNewscript->pEffectDummyGO = &EffectDummyGameObj_spell_dummy_go; - pNewscript->RegisterSelf(); - - pNewscript = new Script; - pNewscript->Name = "spell_dummy_npc"; - pNewscript->pEffectDummyNPC = &EffectDummyCreature_spell_dummy_npc; - pNewscript->pEffectAuraDummy = &EffectAuraDummy_spell_aura_dummy_npc; - pNewscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "spell_dummy_go"; + pNewScript->pEffectDummyGO = &EffectDummyGameObj_spell_dummy_go; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "spell_dummy_npc"; + pNewScript->pEffectDummyNPC = &EffectDummyCreature_spell_dummy_npc; + pNewScript->pEffectAuraDummy = &EffectAuraDummy_spell_aura_dummy_npc; + pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 6d09698ac..4bba4febf 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2314" + #define SD2_REVISION_NR "2315" #endif // __SD2_REVISION_NR_H__ From 6e9ddeaa11098a48db5c238e4707fb7be29a8e4a Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Sun, 16 Oct 2011 23:31:03 +0200 Subject: [PATCH 0299/1172] [2316] Remove hardcoded linking of adds in MoltenCore --- .../molten_core/boss_majordomo_executus.cpp | 3 -- .../molten_core/instance_molten_core.cpp | 49 ------------------- .../molten_core/molten_core.h | 10 ---- sd2_revision_nr.h | 2 +- 4 files changed, 1 insertion(+), 63 deletions(-) diff --git a/scripts/eastern_kingdoms/molten_core/boss_majordomo_executus.cpp b/scripts/eastern_kingdoms/molten_core/boss_majordomo_executus.cpp index 56aa05f73..5e827a881 100644 --- a/scripts/eastern_kingdoms/molten_core/boss_majordomo_executus.cpp +++ b/scripts/eastern_kingdoms/molten_core/boss_majordomo_executus.cpp @@ -124,10 +124,7 @@ struct MANGOS_DLL_DECL boss_majordomoAI : public ScriptedAI if (!m_bHasEncounterFinished) // Normal reached home, FAIL { if (m_pInstance) - { m_pInstance->SetData(TYPE_MAJORDOMO, FAIL); - m_pInstance->DoHandleAdds(m_luiMajordomoAddsGUIDs); - } } else // Finished the encounter, DONE { diff --git a/scripts/eastern_kingdoms/molten_core/instance_molten_core.cpp b/scripts/eastern_kingdoms/molten_core/instance_molten_core.cpp index e093663ee..7daafe74a 100644 --- a/scripts/eastern_kingdoms/molten_core/instance_molten_core.cpp +++ b/scripts/eastern_kingdoms/molten_core/instance_molten_core.cpp @@ -61,13 +61,6 @@ void instance_molten_core::OnCreatureCreate(Creature* pCreature) case NPC_MAJORDOMO: m_mNpcEntryGuidStore[pCreature->GetEntry()] = pCreature->GetObjectGuid(); break; - - // Push adds to lists in order to handle respawn - case NPC_FLAMEWAKER_PROTECTOR: m_luiProtectorGUIDs.push_back(pCreature->GetObjectGuid()); break; - case NPC_FLAMEWAKER: m_luiFlamewakerGUIDs.push_back(pCreature->GetObjectGuid()); break; - case NPC_FIRESWORN: m_luiFireswornGUIDs.push_back(pCreature->GetObjectGuid()); break; - case NPC_FLAMEWAKER_PRIEST: m_luiPriestGUIDs.push_back(pCreature->GetObjectGuid()); break; - case NPC_CORE_RAGER: m_luiRagerGUIDs.push_back(pCreature->GetObjectGuid()); break; } } @@ -100,8 +93,6 @@ void instance_molten_core::SetData(uint32 uiType, uint32 uiData) { case TYPE_LUCIFRON: m_auiEncounter[uiType] = uiData; - if (uiData == FAIL) - DoHandleAdds(m_luiProtectorGUIDs); break; case TYPE_MAGMADAR: m_auiEncounter[uiType] = uiData; @@ -111,22 +102,12 @@ void instance_molten_core::SetData(uint32 uiType, uint32 uiData) case TYPE_GEHENNAS: m_auiEncounter[uiType] = uiData; if (uiData == DONE) - { DoUseDoorOrButton(GO_RUNE_MOHN); - m_luiFlamewakerGUIDs.clear(); - } - if (uiData == FAIL) - DoHandleAdds(m_luiFlamewakerGUIDs); break; case TYPE_GARR: m_auiEncounter[uiType] = uiData; if (uiData == DONE) - { DoUseDoorOrButton(GO_RUNE_BLAZ); - m_luiFireswornGUIDs.clear(); - } - if (uiData == FAIL) - DoHandleAdds(m_luiFireswornGUIDs); break; case TYPE_SHAZZRAH: m_auiEncounter[uiType] = uiData; @@ -141,23 +122,12 @@ void instance_molten_core::SetData(uint32 uiType, uint32 uiData) case TYPE_GOLEMAGG: m_auiEncounter[uiType] = uiData; if (uiData == DONE) - { DoUseDoorOrButton(GO_RUNE_THERI); - DoHandleAdds(m_luiRagerGUIDs, false); - m_luiRagerGUIDs.clear(); - } - if (uiData == FAIL) - DoHandleAdds(m_luiRagerGUIDs); break; case TYPE_SULFURON: m_auiEncounter[uiType] = uiData; if (uiData == DONE) - { DoUseDoorOrButton(GO_RUNE_KORO); - m_luiPriestGUIDs.clear(); - } - if (uiData == FAIL) - DoHandleAdds(m_luiPriestGUIDs); break; case TYPE_MAJORDOMO: m_auiEncounter[uiType] = uiData; @@ -242,25 +212,6 @@ void instance_molten_core::DoSpawnMajordomoIfCan(bool bByPlayerEnter) } } -void instance_molten_core::DoHandleAdds(GUIDList &luiAddsGUIDs, bool bRespawn /*=true*/) -{ - if (luiAddsGUIDs.empty()) - return; - - for (GUIDList::const_iterator itr = luiAddsGUIDs.begin(); itr != luiAddsGUIDs.end(); ++itr) - { - if (Creature* pAdd = instance->GetCreature(*itr)) - { - // Respawn dead mobs (or corpses) - if (bRespawn && !pAdd->isAlive()) - pAdd->Respawn(); - // Kill adds - else if (!bRespawn) - pAdd->DealDamage(pAdd, pAdd->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); - } - } -} - void instance_molten_core::Load(const char* chrIn) { if (!chrIn) diff --git a/scripts/eastern_kingdoms/molten_core/molten_core.h b/scripts/eastern_kingdoms/molten_core/molten_core.h index 03c8a0f51..f219efce0 100644 --- a/scripts/eastern_kingdoms/molten_core/molten_core.h +++ b/scripts/eastern_kingdoms/molten_core/molten_core.h @@ -102,21 +102,11 @@ class MANGOS_DLL_DECL instance_molten_core : public ScriptedInstance const char* Save() { return m_strInstData.c_str(); } void Load(const char* chrIn); - // TODO Remove this, when creature linking implemented in MaNGOS - void DoHandleAdds(GUIDList &m_luiAddsGUIDs, bool bRespawn = true); - protected: void DoSpawnMajordomoIfCan(bool bByPlayerEnter); std::string m_strInstData; uint32 m_auiEncounter[MAX_ENCOUNTER]; - - // Adds lists - GUIDList m_luiProtectorGUIDs; - GUIDList m_luiFlamewakerGUIDs; - GUIDList m_luiFireswornGUIDs; - GUIDList m_luiPriestGUIDs; - GUIDList m_luiRagerGUIDs; }; #endif diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 4bba4febf..95188c210 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2315" + #define SD2_REVISION_NR "2316" #endif // __SD2_REVISION_NR_H__ From be1a91d945bcc0c0031eaa73c78a1a23861f9b6b Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Mon, 17 Oct 2011 18:39:28 +0200 Subject: [PATCH 0300/1172] [2317] Remove a bunch of now obsolete CallForHelp calls --- scripts/eastern_kingdoms/molten_core/boss_garr.cpp | 2 -- scripts/eastern_kingdoms/molten_core/boss_gehennas.cpp | 2 -- scripts/eastern_kingdoms/molten_core/boss_golemagg.cpp | 2 -- scripts/eastern_kingdoms/molten_core/boss_lucifron.cpp | 2 -- .../eastern_kingdoms/molten_core/boss_sulfuron_harbinger.cpp | 2 -- scripts/eastern_kingdoms/molten_core/molten_core.h | 2 -- scripts/northrend/ulduar/halls_of_lightning/boss_bjarngrim.cpp | 3 --- sd2_revision_nr.h | 2 +- 8 files changed, 1 insertion(+), 16 deletions(-) diff --git a/scripts/eastern_kingdoms/molten_core/boss_garr.cpp b/scripts/eastern_kingdoms/molten_core/boss_garr.cpp index 5ed5eb9f7..1f68c70e7 100644 --- a/scripts/eastern_kingdoms/molten_core/boss_garr.cpp +++ b/scripts/eastern_kingdoms/molten_core/boss_garr.cpp @@ -61,8 +61,6 @@ struct MANGOS_DLL_DECL boss_garrAI : public ScriptedAI { if (m_pInstance) m_pInstance->SetData(TYPE_GARR, IN_PROGRESS); - - m_creature->CallForHelp(RANGE_CALL_FOR_HELP); } void JustDied(Unit* pKiller) diff --git a/scripts/eastern_kingdoms/molten_core/boss_gehennas.cpp b/scripts/eastern_kingdoms/molten_core/boss_gehennas.cpp index 52aa715a2..fa2cc23ac 100644 --- a/scripts/eastern_kingdoms/molten_core/boss_gehennas.cpp +++ b/scripts/eastern_kingdoms/molten_core/boss_gehennas.cpp @@ -56,8 +56,6 @@ struct MANGOS_DLL_DECL boss_gehennasAI : public ScriptedAI { if (m_pInstance) m_pInstance->SetData(TYPE_GEHENNAS, IN_PROGRESS); - - m_creature->CallForHelp(RANGE_CALL_FOR_HELP); } void JustDied(Unit* pKiller) diff --git a/scripts/eastern_kingdoms/molten_core/boss_golemagg.cpp b/scripts/eastern_kingdoms/molten_core/boss_golemagg.cpp index 8fa766ef0..ad5b2d4ac 100644 --- a/scripts/eastern_kingdoms/molten_core/boss_golemagg.cpp +++ b/scripts/eastern_kingdoms/molten_core/boss_golemagg.cpp @@ -66,8 +66,6 @@ struct MANGOS_DLL_DECL boss_golemaggAI : public ScriptedAI { if (m_pInstance) m_pInstance->SetData(TYPE_GOLEMAGG, IN_PROGRESS); - - m_creature->CallForHelp(1.5 * RANGE_CALL_FOR_HELP); } void JustDied(Unit* pKiller) diff --git a/scripts/eastern_kingdoms/molten_core/boss_lucifron.cpp b/scripts/eastern_kingdoms/molten_core/boss_lucifron.cpp index 0bbb453f5..0a135700d 100644 --- a/scripts/eastern_kingdoms/molten_core/boss_lucifron.cpp +++ b/scripts/eastern_kingdoms/molten_core/boss_lucifron.cpp @@ -56,8 +56,6 @@ struct MANGOS_DLL_DECL boss_lucifronAI : public ScriptedAI { if (m_pInstance) m_pInstance->SetData(TYPE_LUCIFRON, IN_PROGRESS); - - m_creature->CallForHelp(RANGE_CALL_FOR_HELP); } void JustDied(Unit* pKiller) diff --git a/scripts/eastern_kingdoms/molten_core/boss_sulfuron_harbinger.cpp b/scripts/eastern_kingdoms/molten_core/boss_sulfuron_harbinger.cpp index ebea28060..328f09484 100644 --- a/scripts/eastern_kingdoms/molten_core/boss_sulfuron_harbinger.cpp +++ b/scripts/eastern_kingdoms/molten_core/boss_sulfuron_harbinger.cpp @@ -67,8 +67,6 @@ struct MANGOS_DLL_DECL boss_sulfuronAI : public ScriptedAI { if (m_pInstance) m_pInstance->SetData(TYPE_SULFURON, IN_PROGRESS); - - m_creature->CallForHelp(RANGE_CALL_FOR_HELP); } void JustDied(Unit* pKiller) diff --git a/scripts/eastern_kingdoms/molten_core/molten_core.h b/scripts/eastern_kingdoms/molten_core/molten_core.h index f219efce0..2721adfae 100644 --- a/scripts/eastern_kingdoms/molten_core/molten_core.h +++ b/scripts/eastern_kingdoms/molten_core/molten_core.h @@ -81,8 +81,6 @@ static sSpawnLocation m_aMajordomoLocations[2] = {NPC_MAJORDOMO, 847.103f, -816.153f, -229.775f, 4.344f} // Summon and teleport location (near Ragnaros) }; -static const float RANGE_CALL_FOR_HELP = 20.0f; - class MANGOS_DLL_DECL instance_molten_core : public ScriptedInstance { public: diff --git a/scripts/northrend/ulduar/halls_of_lightning/boss_bjarngrim.cpp b/scripts/northrend/ulduar/halls_of_lightning/boss_bjarngrim.cpp index 81dc554a9..76b6a3435 100644 --- a/scripts/northrend/ulduar/halls_of_lightning/boss_bjarngrim.cpp +++ b/scripts/northrend/ulduar/halls_of_lightning/boss_bjarngrim.cpp @@ -151,9 +151,6 @@ struct MANGOS_DLL_DECL boss_bjarngrimAI : public ScriptedAI { DoScriptText(SAY_AGGRO, m_creature); - //must get both lieutenants here and make sure they are with him - m_creature->CallForHelp(30.0f); - if (m_pInstance) m_pInstance->SetData(TYPE_BJARNGRIM, IN_PROGRESS); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 95188c210..d0db2f561 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2316" + #define SD2_REVISION_NR "2317" #endif // __SD2_REVISION_NR_H__ From 7aab8fd2bfd0aec595e7380ee378baf1326bf133 Mon Sep 17 00:00:00 2001 From: Junta Date: Tue, 18 Oct 2011 21:44:50 +0300 Subject: [PATCH 0301/1172] [2318] Implement quest 976 Signed-off-by: Xfurry --- scripts/kalimdor/ashenvale.cpp | 186 ++++++++++++++++++++++++++++++- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 + sql/scriptdev2_script_full.sql | 49 +++++++- sql/updates/r2318_mangos.sql | 1 + sql/updates/r2318_scriptdev2.sql | 47 ++++++++ 6 files changed, 283 insertions(+), 3 deletions(-) create mode 100644 sql/updates/r2318_mangos.sql create mode 100644 sql/updates/r2318_scriptdev2.sql diff --git a/scripts/kalimdor/ashenvale.cpp b/scripts/kalimdor/ashenvale.cpp index 2b070ee70..0df11c755 100644 --- a/scripts/kalimdor/ashenvale.cpp +++ b/scripts/kalimdor/ashenvale.cpp @@ -17,7 +17,7 @@ /* ScriptData SDName: Ashenvale SD%Complete: 70 -SDComment: Quest support: 6482, 6544, 6641 +SDComment: Quest support: 976, 6482, 6544, 6641 SDCategory: Ashenvale Forest EndScriptData */ @@ -25,6 +25,7 @@ EndScriptData */ npc_muglash npc_ruul_snowhoof npc_torek +npc_feero_ironhand EndContentData */ #include "precompiled.h" @@ -418,6 +419,183 @@ CreatureAI* GetAI_npc_torek(Creature* pCreature) return new npc_torekAI(pCreature); } +/*#### +# npc_feero_ironhand +####*/ + +enum +{ + SAY_QUEST_START = -1000771, + SAY_FIRST_AMBUSH_START = -1000772, + SAY_FIRST_AMBUSH_END = -1000773, + SAY_SECOND_AMBUSH_START = -1000774, + SAY_SCOUT_SECOND_AMBUSH = -1000775, + SAY_SECOND_AMBUSH_END = -1000776, + SAY_FINAL_AMBUSH_START = -1000777, + SAY_BALIZAR_FINAL_AMBUSH = -1000778, + SAY_FINAL_AMBUSH_ATTACK = -1000779, + SAY_QUEST_END = -1000780, + + QUEST_SUPPLIES_TO_AUBERDINE = 976, + + NPC_DARK_STRAND_ASSASSIN = 3879, + NPC_FORSAKEN_SCOUT = 3893, + + NPC_ALIGAR_THE_TORMENTOR = 3898, + NPC_BALIZAR_THE_UMBRAGE = 3899, + NPC_CAEDAKAR_THE_VICIOUS = 3900, +}; + +/* + * Notes about the event: + * The summon coords and event sequence are guesswork based on the comments from wowhead and wowwiki + */ + +// Distance, Angle or Offset +static const float aSummonPositions[2][2] = +{ + {30.0f, 1.25f}, + {30.0f, 0.95f} +}; + +// Hardcoded positions for the last 3 mobs +static const float aEliteSummonPositions[3][4] = +{ + {4243.12f, 108.22f, 38.12f, 3.62f}, + {4240.95f, 114.04f, 38.35f, 3.56f}, + {4235.78f, 118.09f, 38.08f, 4.12f} +}; + +struct MANGOS_DLL_DECL npc_feero_ironhandAI : public npc_escortAI +{ + npc_feero_ironhandAI(Creature* pCreature) : npc_escortAI(pCreature) + { + Reset(); + } + + uint8 m_uiCreaturesCount; + bool m_bIsAttacked; + + void Reset() + { + if (!HasEscortState(STATE_ESCORT_ESCORTING)) + { + m_uiCreaturesCount = 0; + m_bIsAttacked = false; + } + } + + void WaypointReached(uint32 uiPointId) + { + switch(uiPointId) + { + case 14: + // Prepare the first ambush + DoScriptText(SAY_FIRST_AMBUSH_START, m_creature); + for (uint8 i = 0; i < 4; ++i) + DoSpawnMob(NPC_DARK_STRAND_ASSASSIN, aSummonPositions[0][0], aSummonPositions[0][1] - M_PI_F/4 * i); + break; + case 20: + // Prepare the second ambush + DoScriptText(SAY_SECOND_AMBUSH_START, m_creature); + for (uint8 i = 0; i < 3; ++i) + DoSpawnMob(NPC_FORSAKEN_SCOUT, aSummonPositions[1][0], aSummonPositions[1][1] - M_PI_F/3 * i); + break; + case 29: + // Final ambush + DoScriptText(SAY_FINAL_AMBUSH_START, m_creature); + m_creature->SummonCreature(NPC_BALIZAR_THE_UMBRAGE, aEliteSummonPositions[0][0], aEliteSummonPositions[0][1], aEliteSummonPositions[0][2], aEliteSummonPositions[0][3], TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 20000); + m_creature->SummonCreature(NPC_ALIGAR_THE_TORMENTOR, aEliteSummonPositions[1][0], aEliteSummonPositions[1][1], aEliteSummonPositions[1][2], aEliteSummonPositions[1][3], TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 20000); + m_creature->SummonCreature(NPC_CAEDAKAR_THE_VICIOUS, aEliteSummonPositions[2][0], aEliteSummonPositions[2][1], aEliteSummonPositions[2][2], aEliteSummonPositions[2][3], TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 20000); + break; + case 30: + // Complete the quest + if (Player* pPlayer = GetPlayerForEscort()) + pPlayer->GroupEventHappens(QUEST_SUPPLIES_TO_AUBERDINE, m_creature); + break; + } + } + + void AttackedBy(Unit* pWho) + { + // Yell only at the first attack + if (!m_bIsAttacked) + { + if (((Creature*)pWho)->GetEntry() == NPC_BALIZAR_THE_UMBRAGE) + { + DoScriptText(SAY_FINAL_AMBUSH_ATTACK, m_creature); + m_bIsAttacked = true; + } + } + } + + // Summon mobs at calculated points + void DoSpawnMob(uint32 uiEntry, float fDistance, float fAngle) + { + float fX, fY, fZ; + m_creature->GetNearPoint(m_creature, fX, fY, fZ, 0, fDistance, fAngle); + + m_creature->SummonCreature(uiEntry, fX, fY, fZ, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 20000); + } + + void SummonedCreatureJustDied(Creature* pSummoned) + { + --m_uiCreaturesCount; + + if (!m_uiCreaturesCount) + { + switch(pSummoned->GetEntry()) + { + case NPC_DARK_STRAND_ASSASSIN: + DoScriptText(SAY_FIRST_AMBUSH_END, m_creature); + break; + case NPC_FORSAKEN_SCOUT: + DoScriptText(SAY_SECOND_AMBUSH_END, m_creature); + break; + case NPC_ALIGAR_THE_TORMENTOR: + case NPC_BALIZAR_THE_UMBRAGE: + case NPC_CAEDAKAR_THE_VICIOUS: + DoScriptText(SAY_QUEST_END, m_creature); + break; + } + } + } + + void JustSummoned(Creature* pSummoned) + { + if (pSummoned->GetEntry() == NPC_FORSAKEN_SCOUT) + { + // Only one of the scouts yells + if (m_uiCreaturesCount == 1) + DoScriptText(SAY_SCOUT_SECOND_AMBUSH, pSummoned, m_creature); + } + else if (pSummoned->GetEntry() == NPC_BALIZAR_THE_UMBRAGE) + DoScriptText(SAY_BALIZAR_FINAL_AMBUSH, pSummoned); + + ++m_uiCreaturesCount; + pSummoned->AI()->AttackStart(m_creature); + } +}; + +CreatureAI* GetAI_npc_feero_ironhand(Creature* pCreature) +{ + return new npc_feero_ironhandAI(pCreature); +} + +bool QuestAccept_npc_feero_ironhand(Player* pPlayer, Creature* pCreature, const Quest* pQuest) +{ + if (pQuest->GetQuestId() == QUEST_SUPPLIES_TO_AUBERDINE) + { + DoScriptText(SAY_QUEST_START, pCreature, pPlayer); + pCreature->setFaction(FACTION_ESCORT_A_NEUTRAL_PASSIVE); + + if (npc_feero_ironhandAI* pEscortAI = dynamic_cast(pCreature->AI())) + pEscortAI->Start(true, pPlayer, pQuest, true); + } + + return true; +} + void AddSC_ashenvale() { Script* pNewScript; @@ -444,4 +622,10 @@ void AddSC_ashenvale() pNewScript->GetAI = &GetAI_npc_torek; pNewScript->pQuestAcceptNPC = &QuestAccept_npc_torek; pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_feero_ironhand"; + pNewScript->GetAI = &GetAI_npc_feero_ironhand; + pNewScript->pQuestAcceptNPC = &QuestAccept_npc_feero_ironhand; + pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index d0db2f561..50b4199ca 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2317" + #define SD2_REVISION_NR "2318" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index ca79b9ebb..e2ecf984d 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -183,6 +183,7 @@ UPDATE creature_template SET ScriptName='npc_muglash' WHERE entry=12717; UPDATE gameobject_template SET ScriptName='go_naga_brazier' WHERE entry=178247; UPDATE creature_template SET ScriptName='npc_ruul_snowhoof' WHERE entry=12818; UPDATE creature_template SET ScriptName='npc_torek' WHERE entry=12858; +UPDATE creature_template SET ScriptName='npc_feero_ironhand' WHERE entry=4484; /* */ /* AUCHINDOUN */ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 80e692e70..8a4333d5e 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -824,7 +824,18 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1000767,'My son\'s soul will find no comfort in this hollow victory, dragon! I will have him back. Though it takes a millenia. I WILL have my son back!',0,0,0,1,'SAY_FANDRAL_EPILOGUE_7'), (-1000768,'%s shakes his head in disappointment.',0,2,0,25,'EMOTE_ANACHRONOS_DISPPOINTED'), (-1000769,'%s kneels down to pickup the fragments of the shattered scepter.',0,2,0,0,'EMOTE_ANACHRONOS_PICKUP'), -(-1000770,'And now you know all that there is to know, mortal…',0,0,0,0,'SAY_ANACHRONOS_EPILOGUE_8'); +(-1000770,'And now you know all that there is to know, mortal…',0,0,0,0,'SAY_ANACHRONOS_EPILOGUE_8'), + +(-1000771,'Let\'s go $N!',0,0,0,0,'Feero Ironhand SAY_QUEST_START'), +(-1000772,'It looks like we\'re in trouble. Look lively, here they come!',0,0,0,0,'Feero Ironhand SAY_FIRST_AMBUSH_START'), +(-1000773,'Assassins from that cult you found... Let\'s get moving before someone else finds us out here.',0,0,0,0,'Feero Ironhand SAY_FIRST_AMBUSH_END'), +(-1000774,'Hold! I sense an evil presence... Undead!',0,0,0,0,'Feero Ironhand SAY_SECOND_AMBUSH_START'), +(-1000775,'A $C! Slaying him would please the master. Attack!',0,0,0,0,'Forsaken Scout SAY_SCOUT_SECOND_AMBUSH'), +(-1000776,'They\'re coming out of the woodwork today. Let\'s keep moving or we may find more things that want me dead.',0,0,0,0,'Feero Ironhand SAY_SECOND_AMBUSH_END'), +(-1000777,'These three again?',0,0,0,0,'Feero Ironhand SAY_FINAL_AMBUSH_START'), +(-1000778,'Not quite so sure of yourself without the Purifier, hm?',0,0,0,0,'Balizar the Umbrage SAY_BALIZAR_FINAL_AMBUSH'), +(-1000779,'I\'ll finish you off for good this time!',0,0,0,0,'Feero Ironhand SAY_FINAL_AMBUSH_ATTACK'), +(-1000780,'Well done! I should be fine on my own from here. Remember to talk to Delgren when you return to Maestra\'s Post in Ashenvale.',0,0,0,0,'Feero Ironhand SAY_QUEST_END'); -- -1 033 000 SHADOWFANG KEEP INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES @@ -6221,4 +6232,40 @@ INSERT INTO script_waypoint VALUES (10300, 43, 5510.36, -4921.17, 846.33, 0, ''), (10300, 44, 5517.66, -4920.82, 845.12, 0, 'escort paused'); +DELETE FROM script_waypoint WHERE entry=4484; +INSERT INTO script_waypoint VALUES +(4484, 0, 3178.57, 188.52, 4.27, 0, 'SAY_QUEST_START'), +(4484, 1, 3189.82, 198.56, 5.62, 0, ''), +(4484, 2, 3215.21, 185.78, 6.43, 0, ''), +(4484, 3, 3224.05, 183.08, 6.74, 0, ''), +(4484, 4, 3228.11, 194.97, 7.51, 0, ''), +(4484, 5, 3225.33, 201.78, 7.25, 0, ''), +(4484, 6, 3233.33, 226.88, 10.18, 0, ''), +(4484, 7, 3274.12, 225.83, 10.72, 0, ''), +(4484, 8, 3321.63, 209.82, 12.36, 0, ''), +(4484, 9, 3369.66, 226.21, 11.69, 0, ''), +(4484, 10, 3402.35, 227.20, 9.48, 0, ''), +(4484, 11, 3441.92, 224.75, 10.85, 0, ''), +(4484, 12, 3453.87, 220.31, 12.52, 0, ''), +(4484, 13, 3472.51, 213.68, 13.26, 0, ''), +(4484, 14, 3515.49, 212.96, 9.76, 5000, 'SAY_FIRST_AMBUSH_START'), +(4484, 15, 3516.21, 212.84, 9.52, 20000, 'SAY_FIRST_AMBUSH_END'), +(4484, 16, 3548.22, 217.12, 7.34, 0, ''), +(4484, 17, 3567.57, 219.43, 5.22, 0, ''), +(4484, 18, 3659.85, 209.68, 2.27, 0, ''), +(4484, 19, 3734.90, 177.64, 6.75, 0, ''), +(4484, 20, 3760.24, 162.51, 7.49, 5000, 'SAY_SECOND_AMBUSH_START'), +(4484, 21, 3761.58, 161.14, 7.37, 20000, 'SAY_SECOND_AMBUSH_END'), +(4484, 22, 3801.17, 129.87, 9.38, 0, ''), +(4484, 23, 3815.53, 118.53, 10.14, 0, ''), +(4484, 24, 3894.58, 44.88, 15.49, 0, ''), +(4484, 25, 3972.83, 0.42, 17.34, 0, ''), +(4484, 26, 4026.41, -7.63, 16.77, 0, ''), +(4484, 27, 4086.24, 12.32, 16.12, 0, ''), +(4484, 28, 4158.79, 50.67, 25.86, 0, ''), +(4484, 29, 4223.48, 99.52, 35.47, 5000, 'SAY_FINAL_AMBUSH_START'), +(4484, 30, 4224.28, 100.02, 35.49, 10000, 'SAY_QUEST_END'), +(4484, 31, 4243.45, 117.44, 38.83, 0, ''), +(4484, 32, 4264.18, 134.22, 42.96, 0, ''); + -- EOF diff --git a/sql/updates/r2318_mangos.sql b/sql/updates/r2318_mangos.sql new file mode 100644 index 000000000..43e9bf4b3 --- /dev/null +++ b/sql/updates/r2318_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_feero_ironhand' WHERE entry=4484; diff --git a/sql/updates/r2318_scriptdev2.sql b/sql/updates/r2318_scriptdev2.sql new file mode 100644 index 000000000..b4772f516 --- /dev/null +++ b/sql/updates/r2318_scriptdev2.sql @@ -0,0 +1,47 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1000771 AND -1000780; +(-1000771,'Let\'s go $N!',0,0,0,0,'Feero Ironhand SAY_QUEST_START'), +(-1000772,'It looks like we\'re in trouble. Look lively, here they come!',0,0,0,0,'Feero Ironhand SAY_FIRST_AMBUSH_START'), +(-1000773,'Assassins from that cult you found... Let\'s get moving before someone else finds us out here.',0,0,0,0,'Feero Ironhand SAY_FIRST_AMBUSH_END'), +(-1000774,'Hold! I sense an evil presence... Undead!',0,0,0,0,'Feero Ironhand SAY_SECOND_AMBUSH_START'), +(-1000775,'A $C! Slaying him would please the master. Attack!',0,0,0,0,'Forsaken Scout SAY_SCOUT_SECOND_AMBUSH'), +(-1000776,'They\'re coming out of the woodwork today. Let\'s keep moving or we may find more things that want me dead.',0,0,0,0,'Feero Ironhand SAY_SECOND_AMBUSH_END'), +(-1000777,'These three again?',0,0,0,0,'Feero Ironhand SAY_FINAL_AMBUSH_START'), +(-1000778,'Not quite so sure of yourself without the Purifier, hm?',0,0,0,0,'Balizar the Umbrage SAY_BALIZAR_FINAL_AMBUSH'), +(-1000779,'I\'ll finish you off for good this time!',0,0,0,0,'Feero Ironhand SAY_FINAL_AMBUSH_ATTACK'), +(-1000780,'Well done! I should be fine on my own from here. Remember to talk to Delgren when you return to Maestra\'s Post in Ashenvale.',0,0,0,0,'Feero Ironhand SAY_QUEST_END'); + +DELETE FROM script_waypoint WHERE entry=4484; +INSERT INTO script_waypoint VALUES +(4484, 0, 3178.57, 188.52, 4.27, 0, 'SAY_QUEST_START'), +(4484, 1, 3189.82, 198.56, 5.62, 0, ''), +(4484, 2, 3215.21, 185.78, 6.43, 0, ''), +(4484, 3, 3224.05, 183.08, 6.74, 0, ''), +(4484, 4, 3228.11, 194.97, 7.51, 0, ''), +(4484, 5, 3225.33, 201.78, 7.25, 0, ''), +(4484, 6, 3233.33, 226.88, 10.18, 0, ''), +(4484, 7, 3274.12, 225.83, 10.72, 0, ''), +(4484, 8, 3321.63, 209.82, 12.36, 0, ''), +(4484, 9, 3369.66, 226.21, 11.69, 0, ''), +(4484, 10, 3402.35, 227.20, 9.48, 0, ''), +(4484, 11, 3441.92, 224.75, 10.85, 0, ''), +(4484, 12, 3453.87, 220.31, 12.52, 0, ''), +(4484, 13, 3472.51, 213.68, 13.26, 0, ''), +(4484, 14, 3515.49, 212.96, 9.76, 5000, 'SAY_FIRST_AMBUSH_START'), +(4484, 15, 3516.21, 212.84, 9.52, 20000, 'SAY_FIRST_AMBUSH_END'), +(4484, 16, 3548.22, 217.12, 7.34, 0, ''), +(4484, 17, 3567.57, 219.43, 5.22, 0, ''), +(4484, 18, 3659.85, 209.68, 2.27, 0, ''), +(4484, 19, 3734.90, 177.64, 6.75, 0, ''), +(4484, 20, 3760.24, 162.51, 7.49, 5000, 'SAY_SECOND_AMBUSH_START'), +(4484, 21, 3761.58, 161.14, 7.37, 20000, 'SAY_SECOND_AMBUSH_END'), +(4484, 22, 3801.17, 129.87, 9.38, 0, ''), +(4484, 23, 3815.53, 118.53, 10.14, 0, ''), +(4484, 24, 3894.58, 44.88, 15.49, 0, ''), +(4484, 25, 3972.83, 0.42, 17.34, 0, ''), +(4484, 26, 4026.41, -7.63, 16.77, 0, ''), +(4484, 27, 4086.24, 12.32, 16.12, 0, ''), +(4484, 28, 4158.79, 50.67, 25.86, 0, ''), +(4484, 29, 4223.48, 99.52, 35.47, 5000, 'SAY_FINAL_AMBUSH_START'), +(4484, 30, 4224.28, 100.02, 35.49, 10000, 'SAY_QUEST_END'), +(4484, 31, 4243.45, 117.44, 38.83, 0, ''), +(4484, 32, 4264.18, 134.22, 42.96, 0, ''); From fe91731f2aa3eb5122bec7b64d3f37257beff45b Mon Sep 17 00:00:00 2001 From: Xfurry Date: Tue, 18 Oct 2011 22:43:38 +0300 Subject: [PATCH 0302/1172] [2319] Fix update query for my latest commit Thanks jethro84530 for pointing the issue --- sd2_revision_nr.h | 2 +- sql/updates/r2318_scriptdev2.sql | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 50b4199ca..07b1059e4 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2318" + #define SD2_REVISION_NR "2319" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/updates/r2318_scriptdev2.sql b/sql/updates/r2318_scriptdev2.sql index b4772f516..da6ae8ad4 100644 --- a/sql/updates/r2318_scriptdev2.sql +++ b/sql/updates/r2318_scriptdev2.sql @@ -1,4 +1,5 @@ DELETE FROM script_texts WHERE entry BETWEEN -1000771 AND -1000780; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES (-1000771,'Let\'s go $N!',0,0,0,0,'Feero Ironhand SAY_QUEST_START'), (-1000772,'It looks like we\'re in trouble. Look lively, here they come!',0,0,0,0,'Feero Ironhand SAY_FIRST_AMBUSH_START'), (-1000773,'Assassins from that cult you found... Let\'s get moving before someone else finds us out here.',0,0,0,0,'Feero Ironhand SAY_FIRST_AMBUSH_END'), From 6af16060c5a90f23134376a385b2c1a068eb86f2 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Wed, 2 Nov 2011 20:54:02 +0200 Subject: [PATCH 0303/1172] [2320] Implement script for Al'ar Thank you to everyone who had a contribution to this patch during the long development process --- .../tempest_keep/the_eye/boss_alar.cpp | 334 +++++++++++++++++- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 2 + sql/updates/r2320_mangos.sql | 1 + 4 files changed, 336 insertions(+), 3 deletions(-) create mode 100644 sql/updates/r2320_mangos.sql diff --git a/scripts/outland/tempest_keep/the_eye/boss_alar.cpp b/scripts/outland/tempest_keep/the_eye/boss_alar.cpp index 10525ff6e..d7b2e5f2c 100644 --- a/scripts/outland/tempest_keep/the_eye/boss_alar.cpp +++ b/scripts/outland/tempest_keep/the_eye/boss_alar.cpp @@ -16,13 +16,343 @@ /* ScriptData SDName: boss_alar -SD%Complete: 0 -SDComment: Placeholder +SD%Complete: 70 +SDComment: Dive Bomb event NYI SDCategory: Tempest Keep, The Eye EndScriptData */ #include "precompiled.h" +#include "the_eye.h" + +enum +{ + // spells + // phase 1 + SPELL_FLAME_BUFFET = 34121, // if nobody is in range + SPELL_FLAME_QUILLS = 34229, + SPELL_EMBER_BLAST = 34341, // usee when the boss dies first time + SPELL_REBIRTH = 34342, + + // phase 2 + SPELL_MELT_ARMOR = 35410, + SPELL_DIVE_BOMB_VISUAL = 35367, // visual transform to fire ball + SPELL_DIVE_BOMB = 35181, // dive bomb damage spell + SPELL_BOMB_REBIRTH = 35369, // used after the dive bomb - to transform back to phoenis + SPELL_CHARGE = 35412, // used while in Dive Bomb form - to charge a target + //SPELL_SUMMON_ADDS = 18814, // summons 3*19551 - Not sure if the spell is the right id + SPELL_BERSERK = 27680, // this spell is used only during phase II + + NPC_EMBER_OF_ALAR = 19551, // scripted in Acid + NPC_FLAME_PATCH = 20602, + SPELL_FLAME_PATCH = 35380, + + MAX_PLATFORMS = 4, + + POINT_ID_RESSURRECT = 0, // center of the hall + POINT_ID_PLATFORM = 1, // platform points + POINT_ID_QUILLS = 2, // center of the hall - in air + + PHASE_ONE = 1, + PHASE_REBIRTH = 2, + PHASE_TWO = 3, +}; + +struct EventLocation +{ + float m_fX, m_fY, m_fZ; +}; + +// Platform locations from left to right (as standing at the entrance) +static const EventLocation aPlatformLocation[MAX_PLATFORMS] = +{ + {340.15f, 58.65f, 17.71f}, + {388.09f, 31.54f, 20.18f}, + {388.18f, -32.85f, 20.18f}, + {340.29f, -60.19f, 17.72f} +}; + +static const EventLocation aCenterLocation[] = +{ + {331.0f, 0.01f, 39.0f}, + {331.0, 0.01f, -2.39f}, +}; + +struct MANGOS_DLL_DECL boss_alarAI : public ScriptedAI +{ + boss_alarAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = ((ScriptedInstance*)pCreature->GetInstanceData()); + Reset(); + } + + ScriptedInstance* m_pInstance; + + uint8 m_uiPhase; + uint8 m_uiCurrentPlatformId; + uint32 m_uiRangeCheckTimer; + uint32 m_uiBerserkTimer; + + uint32 m_uiPlatformMoveTimer; + uint32 m_uiFlameQuillsTimer; + uint32 m_uiFlamePatchTimer; + uint32 m_uiDiveBombTimer; + uint32 m_uiMeltArmorTimer; + + bool m_bCanSummonEmber; + + void Reset() + { + // Start phase one and move to the closest platform + m_uiPhase = PHASE_ONE; + SetCombatMovement(false); + + m_uiRangeCheckTimer = 0; + m_uiCurrentPlatformId = 0; + m_uiPlatformMoveTimer = 35000; + m_uiFlameQuillsTimer = 170000; // at the 5th platform + + m_uiBerserkTimer = 10*MINUTE*IN_MILLISECONDS; // only after phase 2 starts + m_uiFlamePatchTimer = 20000; + m_uiDiveBombTimer = 30000; + m_uiMeltArmorTimer = 10000; + + m_bCanSummonEmber = true; + } + + void Aggro (Unit* pWho) + { + if(m_pInstance) + m_pInstance->SetData(TYPE_ALAR, IN_PROGRESS); + + // The boss will always move to the first platform from the left side; also set the movement to idle to stop the DB movement + m_creature->GetMotionMaster()->MoveIdle(); + m_creature->GetMotionMaster()->MovePoint(POINT_ID_PLATFORM, aPlatformLocation[m_uiCurrentPlatformId].m_fX, aPlatformLocation[m_uiCurrentPlatformId].m_fY, aPlatformLocation[m_uiCurrentPlatformId].m_fZ); + } + + void JustReachedHome() + { + if(m_pInstance) + m_pInstance->SetData(TYPE_ALAR, FAIL); + } + + void JustDied(Unit* pKiller) + { + if(m_pInstance) + m_pInstance->SetData(TYPE_ALAR, DONE); + } + + void JustSummoned(Creature* pSummoned) + { + if (pSummoned->GetEntry() == NPC_FLAME_PATCH) + pSummoned->CastSpell(pSummoned, SPELL_FLAME_PATCH, true); + else + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + pSummoned->AI()->AttackStart(pTarget); + } + } + + void SummonedCreatureJustDied(Creature* pSummoned) + { + // drain 3% of boss health when the ember dies + if (pSummoned->GetEntry() == NPC_EMBER_OF_ALAR) + { + // Check first if we have enough health to drain + if (m_creature->GetMaxHealth()*.03f > m_creature->GetHealth()) + m_creature->DealDamage(m_creature, m_creature->GetMaxHealth()*.03f, NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + } + } + + void EnterEvadeMode() + { + // Don't evade if the boss has the ember blast invisibility aura + if (m_creature->HasAura(SPELL_EMBER_BLAST)) + return; + + ScriptedAI::EnterEvadeMode(); + } + + void MovementInform(uint32 uiMotionType, uint32 uiPointId) + { + if (uiMotionType != POINT_MOTION_TYPE) + return; + + switch (uiPointId) + { + case POINT_ID_QUILLS: + if (DoCastSpellIfCan(m_creature, SPELL_FLAME_QUILLS) == CAST_OK) + { + // Set the platform id so the boss will move to the last or the first platform + m_uiCurrentPlatformId = urand(0, 1) ? 2 : 3; + m_uiPlatformMoveTimer = 10000; + } + break; + case POINT_ID_PLATFORM: + // When we reach the platform we start the range check and we can summon the embers + m_bCanSummonEmber = true; + m_uiRangeCheckTimer = 2000; + break; + case POINT_ID_RESSURRECT: + // remove the invisibility aura + if (m_creature->HasAura(SPELL_EMBER_BLAST)) + m_creature->RemoveAurasDueToSpell(SPELL_EMBER_BLAST); + + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + m_creature->SetStandState(UNIT_STAND_STATE_STAND); + + // cast rebirth and remove fake death + if (DoCastSpellIfCan(m_creature, SPELL_REBIRTH) == CAST_OK) + { + DoResetThreat(); + + // start following target + SetCombatMovement(true); + if (m_creature->getVictim()) + m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); + + m_uiPhase = PHASE_TWO; + } + break; + } + } + + void DamageTaken(Unit* pKiller, uint32& uiDamage) + { + // Only init fake in phase one + if (m_uiPhase != PHASE_ONE) + return; + + if (uiDamage < m_creature->GetHealth()) + return; + + m_creature->InterruptNonMeleeSpells(true); + // We set the health to 1 in order to avoid the forced death stand flag - this way we can have the ressurrect animation + m_creature->SetHealth(1); + m_creature->StopMoving(); + m_creature->ClearComboPointHolders(); + m_creature->RemoveAllAurasOnDeath(); + m_creature->ModifyAuraState(AURA_STATE_HEALTHLESS_20_PERCENT, false); + m_creature->ModifyAuraState(AURA_STATE_HEALTHLESS_35_PERCENT, false); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + m_creature->ClearAllReactives(); + m_creature->GetMotionMaster()->Clear(); + m_creature->GetMotionMaster()->MoveIdle(); + m_creature->SetStandState(UNIT_STAND_STATE_DEAD); + + // Stop damage and stop checking for flame buffet. + uiDamage = 0; + m_uiRangeCheckTimer = 0; + + if (DoCastSpellIfCan(m_creature, SPELL_EMBER_BLAST, CAST_TRIGGERED) == CAST_OK) + { + // Move to the center of the hall and ressurrect + m_uiPhase = PHASE_REBIRTH; + m_creature->GetMotionMaster()->MovePoint(POINT_ID_RESSURRECT, aCenterLocation[1].m_fX, aCenterLocation[1].m_fY, aCenterLocation[1].m_fZ); + } + } + + void UpdateAI(const uint32 uiDiff) + { + if(!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + // Platform phase + if (m_uiPhase == PHASE_ONE) + { + if (m_uiFlameQuillsTimer < uiDiff) + { + // Move to Flame Quills position; stop range check, platform moving and ember summoning + m_creature->GetMotionMaster()->MovePoint(POINT_ID_QUILLS, aCenterLocation[0].m_fX, aCenterLocation[0].m_fY, aCenterLocation[0].m_fZ); + m_uiRangeCheckTimer = 0; + m_bCanSummonEmber = false; + m_uiPlatformMoveTimer = 0; + m_uiFlameQuillsTimer = 180000; + } + else + m_uiFlameQuillsTimer -= uiDiff; + + if (m_uiPlatformMoveTimer) + { + if (m_uiPlatformMoveTimer <= uiDiff) + { + // go to next platform + ++m_uiCurrentPlatformId; + + if (m_uiCurrentPlatformId == MAX_PLATFORMS) + m_uiCurrentPlatformId = 0; + + // move to next platform and summon one ember only if moving on platforms (we avoid the summoning during the Flame Quills move) + if (m_bCanSummonEmber) + m_creature->SummonCreature(NPC_EMBER_OF_ALAR, 0, 0, 0, 0, TEMPSUMMON_DEAD_DESPAWN, 0); + + m_creature->GetMotionMaster()->MovePoint(POINT_ID_PLATFORM, aPlatformLocation[m_uiCurrentPlatformId].m_fX, aPlatformLocation[m_uiCurrentPlatformId].m_fY, aPlatformLocation[m_uiCurrentPlatformId].m_fZ); + + m_uiRangeCheckTimer = 0; + m_uiPlatformMoveTimer = 35000; + } + else + m_uiPlatformMoveTimer -= uiDiff; + } + } + // Combat phase + else if (m_uiPhase == PHASE_TWO) + { + if (m_uiBerserkTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_BERSERK) == CAST_OK) + m_uiBerserkTimer = 10*MINUTE*IN_MILLISECONDS; + } + else + m_uiBerserkTimer -= uiDiff; + + if (m_uiFlamePatchTimer < uiDiff) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + m_creature->SummonCreature(NPC_FLAME_PATCH, pTarget->GetPositionX(), pTarget->GetPositionY(), pTarget->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN, 30000); + m_uiFlamePatchTimer = 30000; + } + } + else + m_uiFlamePatchTimer -= uiDiff; + + if (m_uiMeltArmorTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_MELT_ARMOR) == CAST_OK) + m_uiMeltArmorTimer = 60000; + } + else + m_uiMeltArmorTimer -= uiDiff; + } + + // only cast flame buffet when not in motion + if (m_uiRangeCheckTimer) + { + if (m_uiRangeCheckTimer <= uiDiff) + { + if (!m_creature->IsWithinDistInMap(m_creature->getVictim(), ATTACK_DISTANCE)) + DoCastSpellIfCan(m_creature, SPELL_FLAME_BUFFET); + m_uiRangeCheckTimer = 2000; + } + else + m_uiRangeCheckTimer -= uiDiff; + } + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_alar(Creature *pCreature) +{ + return new boss_alarAI (pCreature); +} void AddSC_boss_alar() { + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_alar"; + pNewScript->GetAI = &GetAI_boss_alar; + pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 07b1059e4..8ed523358 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2319" + #define SD2_REVISION_NR "2320" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index e2ecf984d..6613cf314 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -1110,6 +1110,8 @@ UPDATE creature_template SET ScriptName='npc_millhouse_manastorm' WHERE entry=20 UPDATE instance_template SET ScriptName='instance_the_eye' WHERE map=550; /* The Eye Trash Mobs */ UPDATE creature_template SET ScriptName='mob_crystalcore_devastator' WHERE entry=20040; +/* Al'ar event */ +UPDATE creature_template SET ScriptName='boss_alar' WHERE entry=19514; /* Void Reaver event */ UPDATE creature_template SET ScriptName='boss_void_reaver' WHERE entry=19516; /* Astromancer event */ diff --git a/sql/updates/r2320_mangos.sql b/sql/updates/r2320_mangos.sql new file mode 100644 index 000000000..973d35e7a --- /dev/null +++ b/sql/updates/r2320_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='boss_alar' WHERE entry=19514; From 48d77fa2fb9f24e5e46fe9a4cd6223a41fdd45ed Mon Sep 17 00:00:00 2001 From: stfx Date: Fri, 4 Nov 2011 17:50:52 +0100 Subject: [PATCH 0304/1172] [2321] Improve Mr Smite in Deadmines * Remove unneeded evade check in PhaseEquipProcess * Fix Texts Signed-off-by: Schmoozerd --- VC100/100ScriptDev2.vcxproj | 1 + VC80/80ScriptDev2.vcproj | 4 + VC90/90ScriptDev2.vcproj | 4 + .../deadmines/boss_mr_smite.cpp | 278 ++++++++++++++++++ .../eastern_kingdoms/deadmines/deadmines.cpp | 256 +--------------- sd2_revision_nr.h | 2 +- sql/scriptdev2_script_full.sql | 4 +- sql/updates/r2321_scriptdev2.sql | 2 + system/ScriptLoader.cpp | 3 +- 9 files changed, 296 insertions(+), 258 deletions(-) create mode 100644 scripts/eastern_kingdoms/deadmines/boss_mr_smite.cpp create mode 100644 sql/updates/r2321_scriptdev2.sql diff --git a/VC100/100ScriptDev2.vcxproj b/VC100/100ScriptDev2.vcxproj index cf314563c..003dee807 100644 --- a/VC100/100ScriptDev2.vcxproj +++ b/VC100/100ScriptDev2.vcxproj @@ -276,6 +276,7 @@ + diff --git a/VC80/80ScriptDev2.vcproj b/VC80/80ScriptDev2.vcproj index 63ee6ed44..11cffa20f 100644 --- a/VC80/80ScriptDev2.vcproj +++ b/VC80/80ScriptDev2.vcproj @@ -679,6 +679,10 @@ + + diff --git a/VC90/90ScriptDev2.vcproj b/VC90/90ScriptDev2.vcproj index 1284716d7..c30b3c062 100644 --- a/VC90/90ScriptDev2.vcproj +++ b/VC90/90ScriptDev2.vcproj @@ -678,6 +678,10 @@ + + diff --git a/scripts/eastern_kingdoms/deadmines/boss_mr_smite.cpp b/scripts/eastern_kingdoms/deadmines/boss_mr_smite.cpp new file mode 100644 index 000000000..2b1aa23d9 --- /dev/null +++ b/scripts/eastern_kingdoms/deadmines/boss_mr_smite.cpp @@ -0,0 +1,278 @@ +/* Copyright (C) 2006 - 2011 ScriptDev2 + * 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_Mr_Smite +SD%Complete: 100 +SDComment: +SDCategory: Deadmines +EndScriptData */ + +#include "precompiled.h" +#include "deadmines.h" + +enum +{ + SAY_PHASE_2 = -1036002, + SAY_PHASE_3 = -1036003, + + // EQUIP_ID_SWORD = 2179, // default equipment, not used in code + EQUIP_ID_AXE = 2183, + EQUIP_ID_HAMMER = 10756, + + SPELL_NIBLE_REFLEXES = 6433, // removed after phase 1 + SPELL_SMITE_SLAM = 6435, + SPELL_SMITE_STOMP = 6432, + SPELL_SMITE_HAMMER = 6436, + SPELL_THRASH = 12787, // unclear, possible 3417 (only 10% proc chance) + + PHASE_1 = 1, + PHASE_2 = 2, + PHASE_3 = 3, + PHASE_EQUIP_NULL = 4, + PHASE_EQUIP_START = 5, + PHASE_EQUIP_PROCESS = 6, + PHASE_EQUIP_END = 7, +}; + +struct MANGOS_DLL_DECL boss_mr_smiteAI : public ScriptedAI +{ + boss_mr_smiteAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } + + uint32 m_uiPhase; + uint32 m_uiEquipTimer; + uint32 m_uiSlamTimer; + + void Reset() + { + m_uiPhase = PHASE_1; + m_uiEquipTimer = 0; + m_uiSlamTimer = 9000; + + DoCastSpellIfCan(m_creature, SPELL_NIBLE_REFLEXES, CAST_TRIGGERED); + + // must assume database has the default equipment set + SetEquipmentSlots(true); + } + + void AttackedBy(Unit* pAttacker) + { + if (m_creature->getVictim()) + return; + + if (m_uiPhase > PHASE_3) + return; + + AttackStart(pAttacker); + } + + void AttackStart(Unit* pWho) + { + if (m_uiPhase > PHASE_3) + return; + + if (m_creature->Attack(pWho, true)) + { + m_creature->AddThreat(pWho); + m_creature->SetInCombatWith(pWho); + pWho->SetInCombatWith(m_creature); + + m_creature->GetMotionMaster()->MoveChase(pWho); + } + } + + void MovementInform(uint32 uiMotionType, uint32 uiPointId) + { + if (uiMotionType != POINT_MOTION_TYPE) + return; + + m_creature->SetSheath(SHEATH_STATE_UNARMED); + m_creature->SetStandState(UNIT_STAND_STATE_KNEEL); + + m_uiEquipTimer = 3000; + m_uiPhase = PHASE_EQUIP_PROCESS; + } + + void PhaseEquipStart() + { + ScriptedInstance* pInstance = (ScriptedInstance*)m_creature->GetInstanceData(); + + if (!pInstance) + return; + + GameObject* pChest = pInstance->GetSingleGameObjectFromStorage(GO_SMITE_CHEST); + + if (!pChest) + return; + + m_uiPhase = PHASE_EQUIP_NULL; + + float fX, fY, fZ; + pChest->GetContactPoint(m_creature, fX, fY, fZ, CONTACT_DISTANCE); + + m_creature->GetMotionMaster()->Clear(); + m_creature->SetFacingToObject(pChest); + m_creature->GetMotionMaster()->MovePoint(0, fX, fY, fZ); + } + + void PhaseEquipProcess() + { + if (m_creature->GetHealthPercent() < 33.0f) + { + // It's Hammer, go Hammer! + SetEquipmentSlots(false, EQUIP_ID_HAMMER, EQUIP_UNEQUIP); + DoCastSpellIfCan(m_creature, SPELL_SMITE_HAMMER); + } + else + SetEquipmentSlots(false, EQUIP_ID_AXE, EQUIP_ID_AXE); + + m_creature->SetStandState(UNIT_STAND_STATE_STAND); + m_uiPhase = PHASE_EQUIP_END; + m_uiEquipTimer = 1000; + + Unit* pVictim = m_creature->SelectAttackingTarget(ATTACKING_TARGET_TOPAGGRO, 0); + + if (!pVictim) + { + EnterEvadeMode(); + return; + } + } + + void PhaseEquipEnd() + { + // We don't have getVictim, so select from threat list + Unit* pVictim = m_creature->SelectAttackingTarget(ATTACKING_TARGET_TOPAGGRO, 0); + + if (!pVictim) + { + EnterEvadeMode(); + return; + } + + m_creature->SetSheath(SHEATH_STATE_MELEE); + + m_uiPhase = m_creature->GetHealthPercent() < 33.0f ? PHASE_3 : PHASE_2; + + if (m_uiPhase == PHASE_2) + DoCastSpellIfCan(m_creature, SPELL_THRASH, CAST_TRIGGERED); + + AttackStart(pVictim); + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + { + if (m_uiEquipTimer) + { + // decrease the cooldown in between equipment change phases + if (m_uiEquipTimer > uiDiff) + { + m_uiEquipTimer -= uiDiff; + return; + } + else + m_uiEquipTimer = 0; + } + + switch(m_uiPhase) + { + case PHASE_EQUIP_START: + PhaseEquipStart(); + break; + case PHASE_EQUIP_PROCESS: + PhaseEquipProcess(); + break; + case PHASE_EQUIP_END: + PhaseEquipEnd(); + break; + } + + return; + } + + // the normal combat phases + switch(m_uiPhase) + { + case PHASE_1: + { + if (m_creature->GetHealthPercent() < 66.0f) + { + if (DoCastSpellIfCan(m_creature, SPELL_SMITE_STOMP) == CAST_OK) + { + DoScriptText(SAY_PHASE_2, m_creature); + m_uiPhase = PHASE_EQUIP_START; + m_uiEquipTimer = 2500; + + // will clear getVictim (m_attacking) + m_creature->AttackStop(true); + m_creature->RemoveAurasDueToSpell(SPELL_NIBLE_REFLEXES); + } + return; + } + break; + } + case PHASE_2: + { + if (m_creature->GetHealthPercent() < 33.0f) + { + if (DoCastSpellIfCan(m_creature, SPELL_SMITE_STOMP) == CAST_OK) + { + DoScriptText(SAY_PHASE_3, m_creature); + m_uiPhase = PHASE_EQUIP_START; + m_uiEquipTimer = 2500; + + // will clear getVictim (m_attacking) + m_creature->AttackStop(true); + m_creature->RemoveAurasDueToSpell(SPELL_THRASH); + } + return; + } + break; + } + case PHASE_3: + { + if (m_uiSlamTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_SMITE_SLAM) == CAST_OK) + m_uiSlamTimer = 11000; + } + else + m_uiSlamTimer -= uiDiff; + + break; + } + } + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_mr_smite(Creature* pCreature) +{ + return new boss_mr_smiteAI(pCreature); +} + +void AddSC_boss_mr_smite() +{ + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_mr_smite"; + pNewScript->GetAI = &GetAI_boss_mr_smite; + pNewScript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/deadmines/deadmines.cpp b/scripts/eastern_kingdoms/deadmines/deadmines.cpp index 5a85c3e89..0664c2ca0 100644 --- a/scripts/eastern_kingdoms/deadmines/deadmines.cpp +++ b/scripts/eastern_kingdoms/deadmines/deadmines.cpp @@ -16,261 +16,14 @@ /* ScriptData SDName: Deadmines -SD%Complete: 75 -SDComment: Contains boss_mr_smite and GO for event at end door +SD%Complete: 100 +SDComment: Contains GO for Iron Clad door event SDCategory: Deadmines EndScriptData */ #include "precompiled.h" #include "deadmines.h" -/*###### -## boss_mr_smite -######*/ - -enum -{ - SAY_PHASE_2 = -1036002, - SAY_PHASE_3 = -1036003, - - // EQUIP_ID_SWORD = 2179, // default equipment, not used in code - EQUIP_ID_AXE = 2183, - EQUIP_ID_HAMMER = 10756, - - SPELL_NIBLE_REFLEXES = 6433, // removed after phase 1 - SPELL_SMITE_SLAM = 6435, - SPELL_SMITE_STOMP = 6432, - SPELL_SMITE_HAMMER = 6436, - SPELL_THRASH = 12787, // unclear, possible 3417 (only 10% proc chance) - - PHASE_1 = 1, - PHASE_2 = 2, - PHASE_3 = 3, - PHASE_EQUIP_NULL = 4, - PHASE_EQUIP_START = 5, - PHASE_EQUIP_PROCESS = 6, - PHASE_EQUIP_END = 7, -}; - -struct MANGOS_DLL_DECL boss_mr_smiteAI : public ScriptedAI -{ - boss_mr_smiteAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } - - uint32 m_uiPhase; - uint32 m_uiEquipTimer; - uint32 m_uiSlamTimer; - - void Reset() - { - m_uiPhase = PHASE_1; - m_uiEquipTimer = 0; - m_uiSlamTimer = 9000; - - DoCastSpellIfCan(m_creature, SPELL_NIBLE_REFLEXES, CAST_TRIGGERED); - - // must assume database has the default equipment set - SetEquipmentSlots(true); - } - - void AttackedBy(Unit* pAttacker) - { - if (m_creature->getVictim()) - return; - - if (m_uiPhase > PHASE_3) - return; - - AttackStart(pAttacker); - } - - void AttackStart(Unit* pWho) - { - if (m_uiPhase > PHASE_3) - return; - - if (m_creature->Attack(pWho, true)) - { - m_creature->AddThreat(pWho); - m_creature->SetInCombatWith(pWho); - pWho->SetInCombatWith(m_creature); - - m_creature->GetMotionMaster()->MoveChase(pWho); - } - } - - void MovementInform(uint32 uiMotionType, uint32 uiPointId) - { - if (uiMotionType != POINT_MOTION_TYPE) - return; - - m_creature->SetSheath(SHEATH_STATE_UNARMED); - m_creature->SetStandState(UNIT_STAND_STATE_KNEEL); - - m_uiEquipTimer = 3000; - m_uiPhase = PHASE_EQUIP_PROCESS; - } - - void PhaseEquipStart() - { - ScriptedInstance* pInstance = (ScriptedInstance*)m_creature->GetInstanceData(); - - if (!pInstance) - return; - - GameObject* pChest = pInstance->GetSingleGameObjectFromStorage(GO_SMITE_CHEST); - - if (!pChest) - return; - - m_uiPhase = PHASE_EQUIP_NULL; - - float fX, fY, fZ; - pChest->GetContactPoint(m_creature, fX, fY, fZ, CONTACT_DISTANCE); - - m_creature->GetMotionMaster()->Clear(); - m_creature->SetFacingToObject(pChest); - m_creature->GetMotionMaster()->MovePoint(0, fX, fY, fZ); - } - - void PhaseEquipProcess() - { - if (m_creature->GetHealthPercent() < 33.0f) - { - // It's Hammer, go Hammer! - SetEquipmentSlots(false, EQUIP_ID_HAMMER, EQUIP_UNEQUIP); - DoCastSpellIfCan(m_creature, SPELL_SMITE_HAMMER); - } - else - SetEquipmentSlots(false, EQUIP_ID_AXE, EQUIP_ID_AXE); - - m_creature->SetStandState(UNIT_STAND_STATE_STAND); - m_uiPhase = PHASE_EQUIP_END; - m_uiEquipTimer = 1000; - - Unit* pVictim = m_creature->SelectAttackingTarget(ATTACKING_TARGET_TOPAGGRO, 0); - - if (!pVictim) - { - EnterEvadeMode(); - return; - } - } - - void PhaseEquipEnd() - { - // We don't have getVictim, so select from threat list - Unit* pVictim = m_creature->SelectAttackingTarget(ATTACKING_TARGET_TOPAGGRO, 0); - - if (!pVictim) - { - EnterEvadeMode(); - return; - } - - m_creature->SetSheath(SHEATH_STATE_MELEE); - - m_uiPhase = m_creature->GetHealthPercent() < 33.0f ? PHASE_3 : PHASE_2; - - if (m_uiPhase == PHASE_2) - DoCastSpellIfCan(m_creature, SPELL_THRASH, CAST_TRIGGERED); - - AttackStart(pVictim); - } - - void UpdateAI(const uint32 uiDiff) - { - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - { - if (m_uiEquipTimer) - { - // decrease the cooldown in between equipment change phases - if (m_uiEquipTimer > uiDiff) - { - m_uiEquipTimer -= uiDiff; - return; - } - else - m_uiEquipTimer = 0; - } - - switch(m_uiPhase) - { - case PHASE_EQUIP_START: - PhaseEquipStart(); - break; - case PHASE_EQUIP_PROCESS: - PhaseEquipProcess(); - break; - case PHASE_EQUIP_END: - PhaseEquipEnd(); - break; - } - - return; - } - - // the normal combat phases - switch(m_uiPhase) - { - case PHASE_1: - { - if (m_creature->GetHealthPercent() < 66.0f) - { - if (DoCastSpellIfCan(m_creature, SPELL_SMITE_STOMP) == CAST_OK) - { - DoScriptText(SAY_PHASE_2, m_creature); - m_uiPhase = PHASE_EQUIP_START; - m_uiEquipTimer = 2500; - - // will clear getVictim (m_attacking) - m_creature->AttackStop(true); - m_creature->RemoveAurasDueToSpell(SPELL_NIBLE_REFLEXES); - } - return; - } - break; - } - case PHASE_2: - { - if (m_creature->GetHealthPercent() < 33.0f) - { - if (DoCastSpellIfCan(m_creature, SPELL_SMITE_STOMP) == CAST_OK) - { - DoScriptText(SAY_PHASE_3, m_creature); - m_uiPhase = PHASE_EQUIP_START; - m_uiEquipTimer = 2500; - - // will clear getVictim (m_attacking) - m_creature->AttackStop(true); - m_creature->RemoveAurasDueToSpell(SPELL_THRASH); - } - return; - } - break; - } - case PHASE_3: - { - if (m_uiSlamTimer < uiDiff) - { - if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_SMITE_SLAM) == CAST_OK) - m_uiSlamTimer = 11000; - } - else - m_uiSlamTimer -= uiDiff; - - break; - } - } - - DoMeleeAttackIfReady(); - } -}; - -CreatureAI* GetAI_boss_mr_smite(Creature* pCreature) -{ - return new boss_mr_smiteAI(pCreature); -} - bool GOUse_go_defias_cannon(Player* pPlayer, GameObject* pGo) { ScriptedInstance* pInstance = (ScriptedInstance*)pGo->GetInstanceData(); @@ -289,11 +42,6 @@ void AddSC_deadmines() { Script* pNewScript; - pNewScript = new Script; - pNewScript->Name = "boss_mr_smite"; - pNewScript->GetAI = &GetAI_boss_mr_smite; - pNewScript->RegisterSelf(); - pNewScript = new Script; pNewScript->Name = "go_defias_cannon"; pNewScript->pGOUse = &GOUse_go_defias_cannon; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 8ed523358..925c7e302 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2320" + #define SD2_REVISION_NR "2321" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 8a4333d5e..db22342bd 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -868,8 +868,8 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen -- -1 036 000 DEADMINES INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES -(-1036000,'You there, check out that noise.',5775,6,7,0,'smite INST_SAY_ALARM1'), -(-1036001,'We\'re under attack! A vast, ye swabs! Repel the invaders!',5777,6,7,0,'smite INST_SAY_ALARM2'), +(-1036000,'You there! Check out that noise.',5775,6,7,0,'smite INST_SAY_ALARM1'), +(-1036001,'We\'re under attack! A vast, ye swabs! Repel the invaders!',5777,6,7,0,'smite INST_SAY_ALARM2'), (-1036002,'You land lubbers are tougher than I thought! I\'ll have to improvise!',5778,0,0,21,'smite SAY_PHASE_2'), (-1036003,'D\'ah! Now you\'re making me angry!',5779,0,0,15,'smite SAY_PHASE_3'); diff --git a/sql/updates/r2321_scriptdev2.sql b/sql/updates/r2321_scriptdev2.sql new file mode 100644 index 000000000..884319617 --- /dev/null +++ b/sql/updates/r2321_scriptdev2.sql @@ -0,0 +1,2 @@ +UPDATE script_texts SET content_default='You there! Check out that noise.' WHERE entry=-1036000; +UPDATE script_texts SET content_default='We\'re under attack! A vast, ye swabs! Repel the invaders!' WHERE entry=-1036001; diff --git a/system/ScriptLoader.cpp b/system/ScriptLoader.cpp index eb2ca2537..3d01a903a 100644 --- a/system/ScriptLoader.cpp +++ b/system/ScriptLoader.cpp @@ -63,7 +63,8 @@ extern void AddSC_boss_chromaggus(); extern void AddSC_boss_nefarian(); extern void AddSC_boss_victor_nefarius(); extern void AddSC_instance_blackwing_lair(); -extern void AddSC_deadmines(); // deadmines +extern void AddSC_boss_mr_smite(); // deadmines +extern void AddSC_deadmines(); extern void AddSC_instance_deadmines(); extern void AddSC_gnomeregan(); // gnomeregan extern void AddSC_boss_thermaplugg(); From f9f948f79fd7f4368bf305dc1a5be3fca2b04a34 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Fri, 4 Nov 2011 20:48:10 +0100 Subject: [PATCH 0305/1172] [2322] Fix last commit, thanks to Jethro for pointing --- sd2_revision_nr.h | 2 +- system/ScriptLoader.cpp | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 925c7e302..262efd169 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2321" + #define SD2_REVISION_NR "2322" #endif // __SD2_REVISION_NR_H__ diff --git a/system/ScriptLoader.cpp b/system/ScriptLoader.cpp index 3d01a903a..efe9ff08f 100644 --- a/system/ScriptLoader.cpp +++ b/system/ScriptLoader.cpp @@ -555,6 +555,7 @@ void AddScripts() AddSC_boss_victor_nefarius(); AddSC_instance_blackwing_lair(); AddSC_deadmines(); // deadmines + AddSC_boss_mr_smite(); AddSC_instance_deadmines(); AddSC_gnomeregan(); // gnomeregan AddSC_boss_thermaplugg(); From 9af1dccd89dfe8ca4ac92b0cf3d2dd935e8360ae Mon Sep 17 00:00:00 2001 From: PSZ Date: Fri, 4 Nov 2011 23:29:29 +0100 Subject: [PATCH 0306/1172] [2323] Remove support for quest Hidden Enemies - quest 5727 Signed-off-by: Schmoozerd --- scripts/kalimdor/orgrimmar.cpp | 43 +--------------------------------- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 - sql/updates/r2323_mangos.sql | 1 + 4 files changed, 3 insertions(+), 44 deletions(-) create mode 100644 sql/updates/r2323_mangos.sql diff --git a/scripts/kalimdor/orgrimmar.cpp b/scripts/kalimdor/orgrimmar.cpp index 6e56f9663..001e0a479 100644 --- a/scripts/kalimdor/orgrimmar.cpp +++ b/scripts/kalimdor/orgrimmar.cpp @@ -17,52 +17,17 @@ /* ScriptData SDName: Orgrimmar SD%Complete: 100 -SDComment: Quest support: 2460, 5727, 6566 +SDComment: Quest support: 2460, 6566 SDCategory: Orgrimmar EndScriptData */ /* ContentData -npc_neeru_fireblade npc_text + gossip options text missing npc_shenthul npc_thrall_warchief EndContentData */ #include "precompiled.h" -/*###### -## npc_neeru_fireblade -######*/ - -#define QUEST_5727 5727 - -bool GossipHello_npc_neeru_fireblade(Player* pPlayer, Creature* pCreature) -{ - if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); - - if (pPlayer->GetQuestStatus(QUEST_5727) == QUEST_STATUS_INCOMPLETE) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "You may speak frankly, Neeru...", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - - pPlayer->SEND_GOSSIP_MENU(4513, pCreature->GetObjectGuid()); - return true; -} - -bool GossipSelect_npc_neeru_fireblade(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) -{ - switch(uiAction) - { - case GOSSIP_ACTION_INFO_DEF+1: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "[PH] ...", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); - pPlayer->SEND_GOSSIP_MENU(4513, pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF+2: - pPlayer->CLOSE_GOSSIP_MENU(); - pPlayer->AreaExploredOrEventHappens(QUEST_5727); - break; - } - return true; -} - /*###### ## npc_shenthul ######*/ @@ -253,12 +218,6 @@ void AddSC_orgrimmar() { Script* pNewScript; - pNewScript = new Script; - pNewScript->Name = "npc_neeru_fireblade"; - pNewScript->pGossipHello = &GossipHello_npc_neeru_fireblade; - pNewScript->pGossipSelect = &GossipSelect_npc_neeru_fireblade; - pNewScript->RegisterSelf(); - pNewScript = new Script; pNewScript->Name = "npc_shenthul"; pNewScript->GetAI = &GetAI_npc_shenthul; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 262efd169..2818fc1e8 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2322" + #define SD2_REVISION_NR "2323" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 6613cf314..48b6e6f27 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -883,7 +883,6 @@ UPDATE instance_template SET ScriptName='instance_onyxias_lair' WHERE map=249; UPDATE creature_template SET ScriptName='boss_onyxia' WHERE entry=10184; /* ORGRIMMAR */ -UPDATE creature_template SET ScriptName='npc_neeru_fireblade' WHERE entry=3216; UPDATE creature_template SET ScriptName='npc_shenthul' WHERE entry=3401; UPDATE creature_template SET ScriptName='npc_thrall_warchief' WHERE entry=4949; diff --git a/sql/updates/r2323_mangos.sql b/sql/updates/r2323_mangos.sql new file mode 100644 index 000000000..0d69bab2a --- /dev/null +++ b/sql/updates/r2323_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='' WHERE entry=3216; From 9220806c6c35d44c1eebdc93b6fd37c78b782da0 Mon Sep 17 00:00:00 2001 From: NeatElves Date: Fri, 4 Nov 2011 23:39:09 +0100 Subject: [PATCH 0307/1172] [2324] Remove gossip script for Rathis Tomber Signed-off-by: Schmoozerd --- scripts/eastern_kingdoms/ghostlands.cpp | 36 +------------------------ sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 - sql/updates/r2324_mangos.sql | 1 + 4 files changed, 3 insertions(+), 37 deletions(-) create mode 100644 sql/updates/r2324_mangos.sql diff --git a/scripts/eastern_kingdoms/ghostlands.cpp b/scripts/eastern_kingdoms/ghostlands.cpp index d251c25bb..b128d3599 100644 --- a/scripts/eastern_kingdoms/ghostlands.cpp +++ b/scripts/eastern_kingdoms/ghostlands.cpp @@ -17,7 +17,7 @@ /* ScriptData SDName: Ghostlands SD%Complete: 100 -SDComment: Quest support: 9212, 9692. Obtain Budd's Guise of Zul'aman. Vendor Rathis Tomber +SDComment: Quest support: 9212, 9692. Obtain Budd's Guise of Zul'aman. SDCategory: Ghostlands EndScriptData */ @@ -25,7 +25,6 @@ EndScriptData */ npc_blood_knight_dawnstar npc_budd_nedreck npc_ranger_lilatha -npc_rathis_tomber EndContentData */ #include "precompiled.h" @@ -212,33 +211,6 @@ bool QuestAccept_npc_ranger_lilatha(Player* pPlayer, Creature* pCreature, const return true; } -/*###### -## npc_rathis_tomber -######*/ - -bool GossipHello_npc_rathis_tomber(Player* pPlayer, Creature* pCreature) -{ - if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); - - if (pCreature->isVendor() && pPlayer->GetQuestRewardStatus(9152)) - { - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_VENDOR, GOSSIP_TEXT_BROWSE_GOODS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE); - pPlayer->SEND_GOSSIP_MENU(8432, pCreature->GetObjectGuid()); - }else - pPlayer->SEND_GOSSIP_MENU(8431, pCreature->GetObjectGuid()); - - return true; -} - -bool GossipSelect_npc_rathis_tomber(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) -{ - if (uiAction == GOSSIP_ACTION_TRADE) - pPlayer->SEND_VENDORLIST(pCreature->GetObjectGuid()); - - return true; -} - void AddSC_ghostlands() { Script* pNewScript; @@ -260,10 +232,4 @@ void AddSC_ghostlands() pNewScript->GetAI = &GetAI_npc_ranger_lilathaAI; pNewScript->pQuestAcceptNPC = &QuestAccept_npc_ranger_lilatha; pNewScript->RegisterSelf(); - - pNewScript = new Script; - pNewScript->Name = "npc_rathis_tomber"; - pNewScript->pGossipHello = &GossipHello_npc_rathis_tomber; - pNewScript->pGossipSelect = &GossipSelect_npc_rathis_tomber; - pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 2818fc1e8..b4b00f4f0 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2323" + #define SD2_REVISION_NR "2324" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 48b6e6f27..0e301c75f 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -589,7 +589,6 @@ UPDATE creature_template SET ScriptName='npc_screecher_spirit' WHERE entry=8612; UPDATE creature_template SET ScriptName='npc_blood_knight_dawnstar' WHERE entry=17832; UPDATE creature_template SET ScriptName='npc_budd_nedreck' WHERE entry=23559; UPDATE creature_template SET ScriptName='npc_ranger_lilatha' WHERE entry=16295; -UPDATE creature_template SET ScriptName='npc_rathis_tomber' WHERE entry=16224; /* GNOMEREGAN */ UPDATE creature_template SET ScriptName='boss_thermaplugg' WHERE entry=7800; diff --git a/sql/updates/r2324_mangos.sql b/sql/updates/r2324_mangos.sql new file mode 100644 index 000000000..65077b088 --- /dev/null +++ b/sql/updates/r2324_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='' WHERE entry=16224; From 073e93a8776220c18ceea6a489d074ed0486b9b4 Mon Sep 17 00:00:00 2001 From: Klark20 Date: Sat, 22 Oct 2011 13:47:21 +0200 Subject: [PATCH 0308/1172] [2325] Remove script from Shaman Vekjik Signed-off-by: Klark20 --- scripts/northrend/sholazar_basin.cpp | 63 +--------------------------- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 - sql/scriptdev2_script_full.sql | 2 +- sql/updates/r2325_mangos.sql | 1 + sql/updates/r2325_scriptdev2.sql | 1 + 6 files changed, 5 insertions(+), 65 deletions(-) create mode 100644 sql/updates/r2325_mangos.sql create mode 100644 sql/updates/r2325_scriptdev2.sql diff --git a/scripts/northrend/sholazar_basin.cpp b/scripts/northrend/sholazar_basin.cpp index 26943f7a5..208ee70d3 100644 --- a/scripts/northrend/sholazar_basin.cpp +++ b/scripts/northrend/sholazar_basin.cpp @@ -17,7 +17,7 @@ /* ScriptData SDName: Sholazar_Basin SD%Complete: 100 -SDComment: Quest support: 12573, 12570, 12580, 12688 +SDComment: Quest support: 12570, 12580, 12688 SDCategory: Sholazar Basin EndScriptData */ @@ -25,7 +25,6 @@ EndScriptData */ npc_helice npc_injured_rainspeaker npc_mosswalker_victim -npc_vekjik - TODO, can be moved to database (already exist) EndContentData */ #include "precompiled.h" @@ -409,60 +408,6 @@ bool GossipSelect_npc_mosswalker_victim(Player* pPlayer, Creature* pCreature, ui return true; } -/*###### -## npc_vekjik - TODO, can be moved to database (already exist) -######*/ - -#define GOSSIP_VEKJIK_ITEM1 "Shaman Vekjik, I have spoken with the big-tongues and they desire peace. I have brought this offering on their behalf." -#define GOSSIP_VEKJIK_ITEM2 "No no... I had no intentions of betraying your people. I was only defending myself. it was all a misunderstanding." - -enum -{ - GOSSIP_TEXTID_VEKJIK1 = 13137, - GOSSIP_TEXTID_VEKJIK2 = 13138, - - SAY_TEXTID_VEKJIK1 = -1000208, - - SPELL_FREANZYHEARTS_FURY = 51469, - - QUEST_MAKING_PEACE = 12573 -}; - -bool GossipHello_npc_vekjik(Player* pPlayer, Creature* pCreature) -{ - if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); - - if (pPlayer->GetQuestStatus(QUEST_MAKING_PEACE) == QUEST_STATUS_INCOMPLETE) - { - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_VEKJIK_ITEM1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_VEKJIK1, pCreature->GetObjectGuid()); - return true; - } - - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); - return true; -} - -bool GossipSelect_npc_vekjik(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) -{ - switch(uiAction) - { - case GOSSIP_ACTION_INFO_DEF+1: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_VEKJIK_ITEM2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); - pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_VEKJIK2, pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF+2: - pPlayer->CLOSE_GOSSIP_MENU(); - DoScriptText(SAY_TEXTID_VEKJIK1, pCreature, pPlayer); - pPlayer->AreaExploredOrEventHappens(QUEST_MAKING_PEACE); - pCreature->CastSpell(pPlayer, SPELL_FREANZYHEARTS_FURY, false); - break; - } - - return true; -} - void AddSC_sholazar_basin() { Script* pNewScript; @@ -486,10 +431,4 @@ void AddSC_sholazar_basin() pNewScript->pGossipHello = &GossipHello_npc_mosswalker_victim; pNewScript->pGossipSelect = &GossipSelect_npc_mosswalker_victim; pNewScript->RegisterSelf(); - - pNewScript = new Script; - pNewScript->Name = "npc_vekjik"; - pNewScript->pGossipHello = &GossipHello_npc_vekjik; - pNewScript->pGossipSelect = &GossipSelect_npc_vekjik; - pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index b4b00f4f0..89b7c05e2 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2324" + #define SD2_REVISION_NR "2325" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 0e301c75f..0f41358c1 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -981,7 +981,6 @@ UPDATE creature_template SET ScriptName='npc_shattrathflaskvendors' WHERE entry UPDATE creature_template SET ScriptName='npc_helice' WHERE entry=28787; UPDATE creature_template SET ScriptName='npc_injured_rainspeaker' WHERE entry=28217; UPDATE creature_template SET ScriptName='npc_mosswalker_victim' WHERE entry=28113; -UPDATE creature_template SET ScriptName='npc_vekjik' WHERE entry=28315; /* SILITHUS */ UPDATE creature_template SET ScriptName='npc_highlord_demitrian' WHERE entry=14347; diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index db22342bd..8a3e766c9 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -178,7 +178,7 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1000207,'You have my blessing',0,0,0,0,'ashyen_and_keleth SAY_REWARD_BLESS'), -(-1000208,'Frenzyheart kill you if you come back. You no welcome here no more!',0,0,0,0,'vekjik SAY_TEXTID_VEKJIK1'), +(-1000208,'REUSE ME',0,0,0,0,'REUSE ME'), (-1000209,'Very well. Let\'s see what you have to show me, $N.',0,0,1,0,'anvilward SAY_ANVIL1'), (-1000210,'What manner of trick is this, $R? If you seek to ambush me, I warn you I will not go down quietly!',0,0,1,0,'anvilward SAY_ANVIL2'), diff --git a/sql/updates/r2325_mangos.sql b/sql/updates/r2325_mangos.sql new file mode 100644 index 000000000..58f305642 --- /dev/null +++ b/sql/updates/r2325_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='' WHERE entry=28315; diff --git a/sql/updates/r2325_scriptdev2.sql b/sql/updates/r2325_scriptdev2.sql new file mode 100644 index 000000000..3c2b7c79f --- /dev/null +++ b/sql/updates/r2325_scriptdev2.sql @@ -0,0 +1 @@ +UPDATE script_texts SET content_default='REUSE ME', comment='REUSE ME' WHERE entry=-1000208; From f33bddffce8aeac57441d864b80b8e080897183b Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Sat, 5 Nov 2011 21:37:07 +0100 Subject: [PATCH 0309/1172] [2325] Let's dance! Implement Heigan dance - Expects MaNGOS Rev [11839]. Also related achievement is now enabled --- scripts/northrend/naxxramas/boss_heigan.cpp | 36 ++++++++++++++----- .../naxxramas/instance_naxxramas.cpp | 32 +++++++++++++++-- scripts/northrend/naxxramas/naxxramas.h | 9 +++-- 3 files changed, 64 insertions(+), 13 deletions(-) diff --git a/scripts/northrend/naxxramas/boss_heigan.cpp b/scripts/northrend/naxxramas/boss_heigan.cpp index 9c59e6b7c..bb7176755 100644 --- a/scripts/northrend/naxxramas/boss_heigan.cpp +++ b/scripts/northrend/naxxramas/boss_heigan.cpp @@ -42,10 +42,8 @@ enum EMOTE_TELEPORT = -1533136, EMOTE_RETURN = -1533137, - SPELL_ERUPTION = 29371, //Spell used by floor pieces to cause damage to players - - //Spells by boss - SPELL_DECREPIT_FEVER_N = 29998, + // Spells by boss + SPELL_DECREPIT_FEVER = 29998, SPELL_DECREPIT_FEVER_H = 55011, SPELL_DISRUPTION = 29310, SPELL_TELEPORT = 30211, @@ -149,7 +147,7 @@ struct MANGOS_DLL_DECL boss_heiganAI : public ScriptedAI // Fever if (m_uiFeverTimer < uiDiff) { - DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_DECREPIT_FEVER_N : SPELL_DECREPIT_FEVER_H); + DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_DECREPIT_FEVER : SPELL_DECREPIT_FEVER_H); m_uiFeverTimer = 21000; } else @@ -164,9 +162,9 @@ struct MANGOS_DLL_DECL boss_heiganAI : public ScriptedAI else m_uiDisruptionTimer -= uiDiff; } - else //Platform Phase + else // Platform Phase { - if (m_uiPhaseTimer <= uiDiff) // return to fight + if (m_uiPhaseTimer < uiDiff) // Return to fight { m_creature->InterruptNonMeleeSpells(true); DoScriptText(EMOTE_RETURN, m_creature); @@ -181,7 +179,7 @@ struct MANGOS_DLL_DECL boss_heiganAI : public ScriptedAI if (m_uiStartChannelingTimer) { - if (m_uiStartChannelingTimer <=uiDiff) + if (m_uiStartChannelingTimer <= uiDiff) { DoScriptText(SAY_CHANNELING, m_creature); DoCastSpellIfCan(m_creature, SPELL_PLAGUE_CLOUD); @@ -208,6 +206,28 @@ struct MANGOS_DLL_DECL boss_heiganAI : public ScriptedAI m_uiTauntTimer -= uiDiff; DoMeleeAttackIfReady(); + + // Handling of the erruptions, this is not related to melee attack or spell-casting + if (!m_pInstance) + return; + + // Eruption + if (m_uiEruptionTimer < uiDiff) + { + for (uint8 uiArea = 0; uiArea < MAX_HEIGAN_TRAP_AREAS; ++uiArea) + { + // Actually this is correct :P + if (uiArea == (m_uiPhaseEruption % 6) || uiArea == 6 - (m_uiPhaseEruption % 6)) + continue; + + m_pInstance->DoTriggerHeiganTraps(m_creature, uiArea); + } + + m_uiEruptionTimer = m_uiPhase == PHASE_GROUND ? urand(8000, 12000) : urand(2000, 3000); + ++m_uiPhaseEruption; + } + else + m_uiEruptionTimer -= uiDiff; } }; diff --git a/scripts/northrend/naxxramas/instance_naxxramas.cpp b/scripts/northrend/naxxramas/instance_naxxramas.cpp index e85686d4e..75106cb78 100644 --- a/scripts/northrend/naxxramas/instance_naxxramas.cpp +++ b/scripts/northrend/naxxramas/instance_naxxramas.cpp @@ -198,6 +198,21 @@ void instance_naxxramas::OnObjectCreate(GameObject* pGo) break; default: + // Heigan Traps - many different entries which are only required for sorting + if (pGo->GetGoType() == GAMEOBJECT_TYPE_TRAP) + { + uint32 uiGoEntry = pGo->GetEntry(); + + if ((uiGoEntry >= 181517 && uiGoEntry <= 181524) || uiGoEntry == 181678) + m_alHeiganTrapGuids[0].push_back(pGo->GetObjectGuid()); + else if ((uiGoEntry >= 181510 && uiGoEntry <= 181516) || (uiGoEntry >= 181525 && uiGoEntry <= 181531) || uiGoEntry == 181533 || uiGoEntry == 181676) + m_alHeiganTrapGuids[1].push_back(pGo->GetObjectGuid()); + else if ((uiGoEntry >= 181534 && uiGoEntry <= 181544) || uiGoEntry == 181532 || uiGoEntry == 181677) + m_alHeiganTrapGuids[2].push_back(pGo->GetObjectGuid()); + else if ((uiGoEntry >= 181545 && uiGoEntry <= 181552) || uiGoEntry == 181695) + m_alHeiganTrapGuids[3].push_back(pGo->GetObjectGuid()); + } + return; } m_mGoEntryGuidStore[pGo->GetEntry()] = pGo->GetObjectGuid(); @@ -288,9 +303,8 @@ void instance_naxxramas::SetData(uint32 uiType, uint32 uiData) case TYPE_HEIGAN: m_auiEncounter[uiType] = uiData; DoUseDoorOrButton(GO_PLAG_HEIG_ENTRY_DOOR); - // uncomment when eruption is implemented - //if (uiData == IN_PROGRESS) - // SetSpecialAchievementCriteria(TYPE_ACHIEV_SAFETY_DANCE, true); + if (uiData == IN_PROGRESS) + SetSpecialAchievementCriteria(TYPE_ACHIEV_SAFETY_DANCE, true); if (uiData == DONE) DoUseDoorOrButton(GO_PLAG_HEIG_EXIT_DOOR); break; @@ -591,6 +605,18 @@ bool instance_naxxramas::IsInRightSideGothArea(Unit* pUnit) return true; } +void instance_naxxramas::DoTriggerHeiganTraps(Creature* pHeigan, uint32 uiAreaIndex) +{ + if (uiAreaIndex >= MAX_HEIGAN_TRAP_AREAS) + return; + + for (GUIDList::const_iterator itr = m_alHeiganTrapGuids[uiAreaIndex].begin(); itr != m_alHeiganTrapGuids[uiAreaIndex].end(); ++itr) + { + if (GameObject* pTrap = instance->GetGameObject(*itr)) + pTrap->Use(pHeigan); + } +} + void instance_naxxramas::SetChamberCenterCoords(float fX, float fY, float fZ) { m_fChamberCenterX = fX; diff --git a/scripts/northrend/naxxramas/naxxramas.h b/scripts/northrend/naxxramas/naxxramas.h index c21f8177f..44f11208a 100644 --- a/scripts/northrend/naxxramas/naxxramas.h +++ b/scripts/northrend/naxxramas/naxxramas.h @@ -57,6 +57,8 @@ enum TYPE_ACHIEV_SPORE_LOSER = 4, TYPE_ACHIEV_GET_ENOUGH = 5, + MAX_HEIGAN_TRAP_AREAS = 4, + NPC_ANUB_REKHAN = 15956, NPC_FAERLINA = 15953, @@ -213,6 +215,9 @@ class MANGOS_DLL_DECL instance_naxxramas : public ScriptedInstance void Update(uint32 uiDiff); + // Heigan + void DoTriggerHeiganTraps(Creature* pHeigan, uint32 uiAreaIndex); + // goth void SetGothTriggers(); Creature* GetClosestAnchorForGoth(Creature* pSource, bool bRightSide); @@ -233,11 +238,11 @@ class MANGOS_DLL_DECL instance_naxxramas : public ScriptedInstance std::string m_strInstData; GUIDList m_lThadTeslaCoilList; - GUIDList m_lFaerlinaAddGUIDs; - GUIDList m_lGothTriggerList; + UNORDERED_MAP m_mGothTriggerMap; + GUIDList m_alHeiganTrapGuids[MAX_HEIGAN_TRAP_AREAS]; float m_fChamberCenterX; float m_fChamberCenterY; From cabf23adc6784aeabf3874b133393815cb5bee52 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Sun, 6 Nov 2011 14:47:03 +0100 Subject: [PATCH 0310/1172] [2326] Remove gossip script for Kalaran Windblade (q3441) --- scripts/eastern_kingdoms/searing_gorge.cpp | 46 +--------------------- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 - sql/updates/r2326_mangos.sql | 1 + 4 files changed, 3 insertions(+), 47 deletions(-) create mode 100644 sql/updates/r2326_mangos.sql diff --git a/scripts/eastern_kingdoms/searing_gorge.cpp b/scripts/eastern_kingdoms/searing_gorge.cpp index e3ab9832b..dc2581c92 100644 --- a/scripts/eastern_kingdoms/searing_gorge.cpp +++ b/scripts/eastern_kingdoms/searing_gorge.cpp @@ -17,55 +17,17 @@ /* ScriptData SDName: Searing_Gorge SD%Complete: 80 -SDComment: Quest support: 3377, 3441 (More accurate info on Kalaran needed). Lothos Riftwaker teleport to Molten Core. +SDComment: Quest support: 3377. Lothos Riftwaker teleport to Molten Core. SDCategory: Searing Gorge EndScriptData */ /* ContentData -npc_kalaran_windblade npc_lothos_riftwaker npc_zamael_lunthistle EndContentData */ #include "precompiled.h" -/*###### -## npc_kalaran_windblade -######*/ - -bool GossipHello_npc_kalaran_windblade(Player* pPlayer, Creature* pCreature) -{ - if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); - - if (pPlayer->GetQuestStatus(3441) == QUEST_STATUS_INCOMPLETE) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Tell me what drives this vengance?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF); - - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); - - return true; -} - -bool GossipSelect_npc_kalaran_windblade(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) -{ - switch(uiAction) - { - case GOSSIP_ACTION_INFO_DEF: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Continue please", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); - pPlayer->SEND_GOSSIP_MENU(1954, pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF+1: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Let me confer with my colleagues", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); - pPlayer->SEND_GOSSIP_MENU(1955, pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF+2: - pPlayer->CLOSE_GOSSIP_MENU(); - pPlayer->AreaExploredOrEventHappens(3441); - break; - } - return true; -} - /*###### ## npc_lothos_riftwaker ######*/ @@ -139,12 +101,6 @@ void AddSC_searing_gorge() { Script* pNewScript; - pNewScript = new Script; - pNewScript->Name = "npc_kalaran_windblade"; - pNewScript->pGossipHello = &GossipHello_npc_kalaran_windblade; - pNewScript->pGossipSelect = &GossipSelect_npc_kalaran_windblade; - pNewScript->RegisterSelf(); - pNewScript = new Script; pNewScript->Name = "npc_lothos_riftwaker"; pNewScript->pGossipHello = &GossipHello_npc_lothos_riftwaker; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 89b7c05e2..33fb1a850 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2325" + #define SD2_REVISION_NR "2326" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 0f41358c1..db376a6dc 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -940,7 +940,6 @@ INSERT INTO scripted_event_id VALUES (5623,'event_spell_gandling_shadow_portal'); /* SEARING GORGE */ -UPDATE creature_template SET ScriptName='npc_kalaran_windblade' WHERE entry=8479; UPDATE creature_template SET ScriptName='npc_lothos_riftwaker' WHERE entry=14387; UPDATE creature_template SET ScriptName='npc_zamael_lunthistle' WHERE entry=8436; diff --git a/sql/updates/r2326_mangos.sql b/sql/updates/r2326_mangos.sql new file mode 100644 index 000000000..c4c4029d8 --- /dev/null +++ b/sql/updates/r2326_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='' WHERE entry=8479; From c384adc29ec744c811991f000626759385d7d66e Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Tue, 8 Nov 2011 00:25:59 +0100 Subject: [PATCH 0311/1172] [2327] Some improvements related to LoadCreatureAddon --- include/sc_creature.cpp | 1 - .../molten_core/boss_majordomo_executus.cpp | 1 - .../shadowfang_keep/shadowfang_keep.cpp | 4 ++-- .../caverns_of_time/hyjal/hyjalAI.cpp | 1 - scripts/kalimdor/moonglade.cpp | 2 +- scripts/northrend/naxxramas/boss_thaddius.cpp | 21 +++---------------- .../blood_furnace/boss_broggok.cpp | 2 +- sd2_revision_nr.h | 2 +- 8 files changed, 8 insertions(+), 26 deletions(-) diff --git a/include/sc_creature.cpp b/include/sc_creature.cpp index c625da773..cecf63f41 100644 --- a/include/sc_creature.cpp +++ b/include/sc_creature.cpp @@ -124,7 +124,6 @@ void ScriptedAI::EnterEvadeMode() m_creature->RemoveAllAuras(); m_creature->DeleteThreatList(); m_creature->CombatStop(true); - m_creature->LoadCreatureAddon(); if (m_creature->isAlive()) m_creature->GetMotionMaster()->MoveTargetedHome(); diff --git a/scripts/eastern_kingdoms/molten_core/boss_majordomo_executus.cpp b/scripts/eastern_kingdoms/molten_core/boss_majordomo_executus.cpp index 5e827a881..f4a445856 100644 --- a/scripts/eastern_kingdoms/molten_core/boss_majordomo_executus.cpp +++ b/scripts/eastern_kingdoms/molten_core/boss_majordomo_executus.cpp @@ -132,7 +132,6 @@ struct MANGOS_DLL_DECL boss_majordomoAI : public ScriptedAI m_creature->RemoveAllAuras(); m_creature->DeleteThreatList(); m_creature->CombatStop(true); - m_creature->LoadCreatureAddon(); m_creature->SetLootRecipient(NULL); // Set friendly diff --git a/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.cpp b/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.cpp index ee8ad69ea..27a36fc75 100644 --- a/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.cpp +++ b/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.cpp @@ -374,7 +374,7 @@ struct MANGOS_DLL_DECL mob_arugal_voidwalkerAI : public ScriptedAI m_creature->RemoveAllAuras(); m_creature->DeleteThreatList(); m_creature->CombatStop(true); - m_creature->LoadCreatureAddon(); + m_creature->LoadCreatureAddon(true); m_creature->SetLootRecipient(NULL); @@ -888,7 +888,7 @@ struct MANGOS_DLL_DECL npc_deathstalker_vincentAI : public ScriptedAI m_creature->RemoveAllAuras(); m_creature->DeleteThreatList(); m_creature->CombatStop(true); - m_creature->LoadCreatureAddon(); + m_creature->LoadCreatureAddon(true); m_creature->SetLootRecipient(NULL); Reset(); } diff --git a/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.cpp b/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.cpp index 302d924da..e75aaf065 100644 --- a/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.cpp +++ b/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.cpp @@ -138,7 +138,6 @@ void hyjalAI::EnterEvadeMode() m_creature->RemoveAllAuras(); m_creature->DeleteThreatList(); m_creature->CombatStop(true); - m_creature->LoadCreatureAddon(); if (m_creature->isAlive()) m_creature->GetMotionMaster()->MoveTargetedHome(); diff --git a/scripts/kalimdor/moonglade.cpp b/scripts/kalimdor/moonglade.cpp index 12f3413a7..ba1fde1ae 100644 --- a/scripts/kalimdor/moonglade.cpp +++ b/scripts/kalimdor/moonglade.cpp @@ -841,7 +841,7 @@ struct MANGOS_DLL_DECL boss_eranikusAI : public ScriptedAI m_creature->RemoveAllAuras(); m_creature->DeleteThreatList(); m_creature->CombatStop(true); - m_creature->LoadCreatureAddon(); + m_creature->LoadCreatureAddon(true); m_creature->SetLootRecipient(NULL); diff --git a/scripts/northrend/naxxramas/boss_thaddius.cpp b/scripts/northrend/naxxramas/boss_thaddius.cpp index 2ec1a316c..4f08913e9 100644 --- a/scripts/northrend/naxxramas/boss_thaddius.cpp +++ b/scripts/northrend/naxxramas/boss_thaddius.cpp @@ -118,6 +118,8 @@ struct MANGOS_DLL_DECL boss_thaddiusAI : public Scripted_NoMovementAI m_uiChainLightningTimer = 8*IN_MILLISECONDS; m_uiBallLightningTimer = 1*IN_MILLISECONDS; m_uiBerserkTimer = 6*MINUTE*IN_MILLISECONDS; + + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); } void Aggro(Unit* pWho) @@ -133,7 +135,7 @@ struct MANGOS_DLL_DECL boss_thaddiusAI : public Scripted_NoMovementAI m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); } - void EnterEvadeMode() + void JustReachedHome() { if (m_pInstance) { @@ -153,23 +155,6 @@ struct MANGOS_DLL_DECL boss_thaddiusAI : public Scripted_NoMovementAI pStalagg->Respawn(); } } - - // Reset - m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - - // Delay reloading of CreatureAddon until Reached home for proper handling - // Also note that m_creature->LoadCreatureAddon(); must _not_ be called before m_creature->GetMotionMaster()->MoveTargetedHome(); - // Done this way, because MoveTargetHome ensures proper positioning (orientation) - m_creature->RemoveAllAuras(); - m_creature->DeleteThreatList(); - m_creature->CombatStop(true); - - if (m_creature->isAlive()) - m_creature->GetMotionMaster()->MoveTargetedHome(); - - m_creature->SetLootRecipient(NULL); - - Reset(); } void KilledUnit(Unit* pVictim) diff --git a/scripts/outland/hellfire_citadel/blood_furnace/boss_broggok.cpp b/scripts/outland/hellfire_citadel/blood_furnace/boss_broggok.cpp index 096de3448..ddbdb8a0b 100644 --- a/scripts/outland/hellfire_citadel/blood_furnace/boss_broggok.cpp +++ b/scripts/outland/hellfire_citadel/blood_furnace/boss_broggok.cpp @@ -90,7 +90,7 @@ struct MANGOS_DLL_DECL boss_broggokAI : public ScriptedAI m_creature->RemoveAllAuras(); m_creature->DeleteThreatList(); m_creature->CombatStop(true); - m_creature->LoadCreatureAddon(); + m_creature->LoadCreatureAddon(true); m_creature->SetLootRecipient(NULL); diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 33fb1a850..e57894861 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2326" + #define SD2_REVISION_NR "2327" #endif // __SD2_REVISION_NR_H__ From 450ef99848687543b19e3536a264292d69f33f55 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Wed, 9 Nov 2011 21:05:26 +0200 Subject: [PATCH 0312/1172] [2328] Implement script for M'uru - Sunwell Plateau Thank you to everyone who contributed to this script, including the original version by ScrappyDoo --- .../sunwell_plateau/boss_muru.cpp | 446 +++++++++++++++++- .../instance_sunwell_plateau.cpp | 21 + .../sunwell_plateau/sunwell_plateau.h | 9 +- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 4 + sql/updates/r2328_mangos.sql | 4 + 6 files changed, 481 insertions(+), 5 deletions(-) create mode 100644 sql/updates/r2328_mangos.sql diff --git a/scripts/eastern_kingdoms/sunwell_plateau/boss_muru.cpp b/scripts/eastern_kingdoms/sunwell_plateau/boss_muru.cpp index 77950d313..9b4341dba 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/boss_muru.cpp +++ b/scripts/eastern_kingdoms/sunwell_plateau/boss_muru.cpp @@ -16,13 +16,455 @@ /* ScriptData SDName: boss_muru -SD%Complete: -SDComment: +SD%Complete: 80 +SDComment: Spell Negative Energy for Entropius needs core support; Summon humanoids spells have some core issues; Dark Fiend, Singularity and Darkness NPCs need eventAI support SDCategory: Sunwell Plateau EndScriptData */ #include "precompiled.h" +#include "sunwell_plateau.h" + +enum +{ + // muru spells + SPELL_NEGATIVE_ENERGY = 46009, + SPELL_DARKNESS = 45996, // big void zone; at 45 sec + SPELL_OPEN_PORTAL_PERIODIC = 45994, // periodic spell which opens a portal at 30 secs; triggers 45976 + SPELL_OPEN_PORTAL = 45976, // has muru portal as target + SPELL_SUMMON_BERSERKER_1 = 46037, // humanoids summoned at 15 secs (3 on each side) then after 60 secs + SPELL_SUMMON_BERSERKER_2 = 46040, // there are two spells. one for each side + SPELL_SUMMON_FURY_MAGE_1 = 46038, + SPELL_SUMMON_FURY_MAGE_2 = 46039, + + SPELL_SUMMON_DARK_FIEND_1 = 46000, // summons 8 dark fiends (25744); ToDo: script npc in eventAI + SPELL_SUMMON_DARK_FIEND_2 = 46001, + SPELL_SUMMON_DARK_FIEND_3 = 46002, + SPELL_SUMMON_DARK_FIEND_4 = 46003, + SPELL_SUMMON_DARK_FIEND_5 = 46004, + SPELL_SUMMON_DARK_FIEND_6 = 46005, + SPELL_SUMMON_DARK_FIEND_7 = 46006, + SPELL_SUMMON_DARK_FIEND_8 = 46007, + + // transition + SPELL_OPEN_ALL_PORTALS = 46177, // dummy spell which opens all the portals to begin the transition phase - has muru portal as target + SPELL_SUMMON_ENTROPIUS = 46217, + SPELL_ENTROPIUS_SPAWN = 46223, // visual effect after spawn + + // entropius spells + SPELL_NEGATIVE_ENERGY_ENT = 46284, // periodic aura spell; triggers 46289 which has script effect. Damage spell is 46285 but it needs core support + SPELL_SUMMON_BLACK_HOLE = 46282, // 15 sec cooldown; summons 25855 + SPELL_SUMMON_DARKNESS = 46269, // summons 25879 by missile + + // portal spells + SPELL_SENTINEL_SUMMONER_VISUAL = 45989, // hits the summoner, so it will summon the sentinel + SPELL_SUMMON_SENTINEL_SUMMONER = 45978, + SPELL_TRANSFORM_VISUAL_1 = 46178, // Visual - has Muru as script target + SPELL_TRANSFORM_VISUAL_2 = 46208, // Visual - has Muru as script target + + // Muru npcs + NPC_VOID_SENTINEL_SUMMONER = 25782, + NPC_VOID_SENTINEL = 25772, // scripted in Acid + + MAX_TRANSFORM_CASTS = 10 +}; + +struct MANGOS_DLL_DECL boss_muruAI : public Scripted_NoMovementAI +{ + boss_muruAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) + { + m_pInstance = ((instance_sunwell_plateau*)pCreature->GetInstanceData()); + Reset(); + } + + instance_sunwell_plateau* m_pInstance; + + uint32 m_uiDarknessTimer; + uint32 m_uiSummonHumanoidsTimer; + uint32 m_uiDarkFiendsTimer; + bool m_bIsTransition; + + void Reset() + { + m_uiDarknessTimer = 45000; + m_uiSummonHumanoidsTimer = 15000; + m_uiDarkFiendsTimer = 0; + m_bIsTransition = false; + } + + void Aggro(Unit* pWho) + { + if (m_pInstance) + m_pInstance->SetData(TYPE_MURU, IN_PROGRESS); + + DoCastSpellIfCan(m_creature, SPELL_NEGATIVE_ENERGY, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_OPEN_PORTAL_PERIODIC, CAST_TRIGGERED); + } + + void JustReachedHome() + { + if (m_pInstance) + m_pInstance->SetData(TYPE_MURU, FAIL); + } + + void DamageTaken(Unit* pDoneBy, uint32 &uiDamage) + { + if (uiDamage > m_creature->GetHealth()) + { + uiDamage = 0; + + if (!m_bIsTransition) + { + // Start transition + if (DoCastSpellIfCan(m_creature, SPELL_OPEN_ALL_PORTALS) == CAST_OK) + { + // remove the auras + m_creature->RemoveAurasDueToSpell(SPELL_NEGATIVE_ENERGY); + m_creature->RemoveAurasDueToSpell(SPELL_OPEN_PORTAL_PERIODIC); + m_bIsTransition = true; + } + } + } + } + + void JustSummoned(Creature* pSummoned) + { + switch (pSummoned->GetEntry()) + { + case NPC_ENTROPIUS: + // Cast the Entropius spawn effect and force despawn + pSummoned->CastSpell(pSummoned, SPELL_ENTROPIUS_SPAWN, true); + m_creature->ForcedDespawn(1000); + // no break here; All other summons should behave the same way + default: + pSummoned->AI()->AttackStart(m_creature->getVictim()); + break; + } + } + + // Wrapper for summoning the humanoids + void DoSummonHumanoids() + { + // summon 2 berserkers and 1 fury mage on each side + for (uint8 i = 0; i < 2; i++) + { + DoCastSpellIfCan(m_creature, SPELL_SUMMON_BERSERKER_1, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_SUMMON_BERSERKER_2, CAST_TRIGGERED); + } + + DoCastSpellIfCan(m_creature, SPELL_SUMMON_FURY_MAGE_1, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_SUMMON_FURY_MAGE_2, CAST_TRIGGERED); + } + + // Wrapper for summoning the dark fiends + void DoSummonDarkFiends() + { + DoCastSpellIfCan(m_creature, SPELL_SUMMON_DARK_FIEND_1, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_SUMMON_DARK_FIEND_2, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_SUMMON_DARK_FIEND_3, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_SUMMON_DARK_FIEND_4, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_SUMMON_DARK_FIEND_5, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_SUMMON_DARK_FIEND_6, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_SUMMON_DARK_FIEND_7, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_SUMMON_DARK_FIEND_8, CAST_TRIGGERED); + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + // Return if already in transition + if (m_bIsTransition) + return; + + if (m_uiDarknessTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_DARKNESS) == CAST_OK) + { + m_uiDarknessTimer = 45000; + m_uiDarkFiendsTimer = 4000; // in about 4 secs after darkness + } + } + else + m_uiDarknessTimer -= uiDiff; + + if (m_uiDarkFiendsTimer) + { + if (m_uiDarkFiendsTimer <= uiDiff) + { + DoSummonDarkFiends(); + m_uiDarkFiendsTimer = 0; + } + else + m_uiDarkFiendsTimer -= uiDiff; + } + + if (m_uiSummonHumanoidsTimer < uiDiff) + { + DoSummonHumanoids(); + m_uiSummonHumanoidsTimer = 1*MINUTE*IN_MILLISECONDS; + } + else + m_uiSummonHumanoidsTimer -= uiDiff; + } +}; + + +struct MANGOS_DLL_DECL boss_entropiusAI : public ScriptedAI +{ + boss_entropiusAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = ((instance_sunwell_plateau*)pCreature->GetInstanceData()); + Reset(); + } + + instance_sunwell_plateau* m_pInstance; + + uint32 m_uiBlackHoleTimer; + uint32 m_uiDarknessTimer; + + GUIDList m_lSummonedCreaturesList; + + void Reset() + { + m_uiBlackHoleTimer = 15000; + m_uiDarknessTimer = 20000; + } + + void Aggro(Unit* pWho) + { + DoCastSpellIfCan(m_creature, SPELL_NEGATIVE_ENERGY_ENT); + } + + void JustDied(Unit* pKiller) + { + if (m_pInstance) + m_pInstance->SetData(TYPE_MURU, DONE); + + // Despawn summoned creatures + DespawnSummonedCreatures(); + } + + void JustSummoned(Creature* pSummoned) + { + // Add the Darkness and Singularity into the list + m_lSummonedCreaturesList.push_back(pSummoned->GetObjectGuid()); + } + + // Wrapper to despawn the Singularities and Darkness on death or on evade + void DespawnSummonedCreatures() + { + for (GUIDList::const_iterator itr = m_lSummonedCreaturesList.begin(); itr != m_lSummonedCreaturesList.end(); ++itr) + { + if (Creature* pTemp = m_creature->GetMap()->GetCreature(*itr)) + pTemp->ForcedDespawn(); + } + } + + void JustReachedHome() + { + if (m_pInstance) + { + m_pInstance->SetData(TYPE_MURU, FAIL); + + // respawn muru + if (Creature* pMuru = m_pInstance->GetSingleCreatureFromStorage(NPC_MURU)) + pMuru->Respawn(); + } + + // despawn boss and summons for reset + DespawnSummonedCreatures(); + m_creature->ForcedDespawn(); + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_uiBlackHoleTimer < uiDiff) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, SPELL_SUMMON_BLACK_HOLE) == CAST_OK) + m_uiBlackHoleTimer = 15000; + } + } + else + m_uiBlackHoleTimer -= uiDiff; + + if (m_uiDarknessTimer < uiDiff) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, SPELL_SUMMON_DARKNESS) == CAST_OK) + m_uiDarknessTimer = urand(15000, 20000); + } + } + else + m_uiDarknessTimer -= uiDiff; + + DoMeleeAttackIfReady(); + } +}; + +struct MANGOS_DLL_DECL npc_portal_targetAI : public Scripted_NoMovementAI +{ + npc_portal_targetAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) + { + m_pInstance = ((instance_sunwell_plateau*)pCreature->GetInstanceData()); + Reset(); + } + + instance_sunwell_plateau* m_pInstance; + + uint8 m_uiTransformCount; + uint32 m_uiTransformTimer; + uint32 m_uiSentinelTimer; + + void Reset() + { + m_uiTransformCount = 0; + m_uiTransformTimer = 0; + m_uiSentinelTimer = 0; + } + + void JustSummoned(Creature* pSummoned) + { + // Cast a visual ball on the summoner + if (pSummoned->GetEntry() == NPC_VOID_SENTINEL_SUMMONER) + DoCastSpellIfCan(pSummoned, SPELL_SENTINEL_SUMMONER_VISUAL, CAST_TRIGGERED); + } + + void SpellHit(Unit* pCaster, const SpellEntry* pSpell) + { + // These spells are dummies, but are used only to init the timers + // They could use the EffectDummyCreature to handle this, but this makes code easier + switch (pSpell->Id) + { + // Init sentinel summon timer + case SPELL_OPEN_PORTAL: + m_uiSentinelTimer = 5000; + break; + // Start transition effect + case SPELL_OPEN_ALL_PORTALS: + m_uiTransformTimer = 2000; + break; + } + } + + void UpdateAI(const uint32 uiDiff) + { + if (m_uiSentinelTimer) + { + // Summon the sentinel on a short timer after the portal opens + if (m_uiSentinelTimer <= uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_SUMMON_SENTINEL_SUMMONER) == CAST_OK) + m_uiSentinelTimer = 0; + } + else + m_uiSentinelTimer -= uiDiff; + } + + if (m_uiTransformTimer) + { + if (m_uiTransformTimer <= uiDiff) + { + // Alternate the visuals + ++m_uiTransformCount; + DoCastSpellIfCan(m_creature, m_uiTransformCount % 2 ? SPELL_TRANSFORM_VISUAL_1 : SPELL_TRANSFORM_VISUAL_2, CAST_TRIGGERED); + + if (m_uiTransformCount < MAX_TRANSFORM_CASTS) + m_uiTransformTimer = 1000; + else + { + m_uiTransformTimer = 0; + m_uiTransformCount = 0; + } + + // Summon Entropius when reached half of the transition + if (m_uiTransformCount == MAX_TRANSFORM_CASTS/2) + { + if (Creature* pMuru = m_pInstance->GetSingleCreatureFromStorage(NPC_MURU)) + pMuru->CastSpell(pMuru, SPELL_SUMMON_ENTROPIUS, false); + } + } + else + m_uiTransformTimer -= uiDiff; + } + } +}; + +struct MANGOS_DLL_DECL npc_void_sentinel_summonerAI : public Scripted_NoMovementAI +{ + npc_void_sentinel_summonerAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) + { + m_pInstance = ((instance_sunwell_plateau*)pCreature->GetInstanceData()); + Reset(); + } + + instance_sunwell_plateau* m_pInstance; + + void Reset() { } + + void JustSummoned(Creature* pSummoned) + { + if (pSummoned->GetEntry() == NPC_VOID_SENTINEL) + { + // Attack Muru's target + if (Creature* pMuru = m_pInstance->GetSingleCreatureFromStorage(NPC_MURU)) + { + if (Unit* pTarget = pMuru->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + pSummoned->AI()->AttackStart(pTarget); + } + } + } + + void UpdateAI(const uint32 uiDiff) { } +}; + +CreatureAI* GetAI_boss_muru(Creature *pCreature) +{ + return new boss_muruAI(pCreature); +} + +CreatureAI* GetAI_boss_entropius(Creature *pCreature) +{ + return new boss_entropiusAI(pCreature); +} + +CreatureAI* GetAI_npc_portal_target(Creature *pCreature) +{ + return new npc_portal_targetAI(pCreature); +} + +CreatureAI* GetAI_npc_void_sentinel_summoner(Creature *pCreature) +{ + return new npc_void_sentinel_summonerAI(pCreature); +} void AddSC_boss_muru() { + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name="boss_muru"; + pNewScript->GetAI = &GetAI_boss_muru; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name="boss_entropius"; + pNewScript->GetAI = &GetAI_boss_entropius; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name="npc_portal_target"; + pNewScript->GetAI = &GetAI_npc_portal_target; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name="npc_void_sentinel_summoner"; + pNewScript->GetAI = &GetAI_npc_void_sentinel_summoner; + pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/sunwell_plateau/instance_sunwell_plateau.cpp b/scripts/eastern_kingdoms/sunwell_plateau/instance_sunwell_plateau.cpp index 2488b7948..01a8d1db0 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/instance_sunwell_plateau.cpp +++ b/scripts/eastern_kingdoms/sunwell_plateau/instance_sunwell_plateau.cpp @@ -34,6 +34,7 @@ EndScriptData */ */ instance_sunwell_plateau::instance_sunwell_plateau(Map* pMap) : ScriptedInstance(pMap), + m_uiMuruBerserkTimer(0), m_uiSpectralRealmTimer(5000) { Initialize(); @@ -64,6 +65,8 @@ void instance_sunwell_plateau::OnCreatureCreate(Creature* pCreature) case NPC_SATHROVARR: case NPC_ALYTHESS: case NPC_SACROLASH: + case NPC_MURU: + case NPC_ENTROPIUS: m_mNpcEntryGuidStore[pCreature->GetEntry()] = pCreature->GetObjectGuid(); break; } @@ -147,6 +150,8 @@ void instance_sunwell_plateau::SetData(uint32 uiType, uint32 uiData) DoUseDoorOrButton(GO_MURU_EXIT_GATE); DoUseDoorOrButton(GO_THIRD_GATE); } + else if (uiData == IN_PROGRESS) + m_uiMuruBerserkTimer = 10*MINUTE*IN_MILLISECONDS; break; case TYPE_KILJAEDEN: m_auiEncounter[uiType] = uiData; @@ -250,6 +255,22 @@ void instance_sunwell_plateau::Update(uint32 uiDiff) else m_uiSpectralRealmTimer -= uiDiff; } + + // Muru berserk timer; needs to be done here because it involves two distinct creatures + if (m_auiEncounter[TYPE_MURU] == IN_PROGRESS) + { + if (m_uiMuruBerserkTimer <= uiDiff) + { + if (Creature* pEntrpius = GetSingleCreatureFromStorage(NPC_ENTROPIUS, true)) + pEntrpius->CastSpell(pEntrpius, SPELL_MURU_BERSERK, true); + else if (Creature* pMuru = GetSingleCreatureFromStorage(NPC_MURU)) + pMuru->CastSpell(pMuru, SPELL_MURU_BERSERK, true); + + m_uiMuruBerserkTimer = 10*MINUTE*IN_MILLISECONDS; + } + else + m_uiMuruBerserkTimer -= uiDiff; + } } void instance_sunwell_plateau::Load(const char* in) diff --git a/scripts/eastern_kingdoms/sunwell_plateau/sunwell_plateau.h b/scripts/eastern_kingdoms/sunwell_plateau/sunwell_plateau.h index bfc2b8a34..91f52d508 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/sunwell_plateau.h +++ b/scripts/eastern_kingdoms/sunwell_plateau/sunwell_plateau.h @@ -26,7 +26,8 @@ enum // NPC_FELMYST = 25038, NPC_ALYTHESS = 25166, NPC_SACROLASH = 25165, - // NPC_MURU = 25741, + NPC_MURU = 25741, + NPC_ENTROPIUS = 25840, // NPC_KILJAEDEN = 25315, // NPC_KILJAEDEN_CONTROLLER = 25608, // kiljaeden event controller // NPC_ANVEENA = 26046, // related to kiljaeden event @@ -52,7 +53,10 @@ enum SPELL_TELEPORT_NORMAL_REALM = 46020, SPELL_TELEPORT_TO_SPECTRAL_REALM = 46019, SPELL_SPECTRAL_EXHAUSTION = 44867, - SPELL_SPECTRAL_REALM_FORCE_FACTION = 44852 + SPELL_SPECTRAL_REALM_FORCE_FACTION = 44852, + + // used by both muru and entropius + SPELL_MURU_BERSERK = 26662, }; class MANGOS_DLL_DECL instance_sunwell_plateau : public ScriptedInstance @@ -85,6 +89,7 @@ class MANGOS_DLL_DECL instance_sunwell_plateau : public ScriptedInstance // Misc uint32 m_uiSpectralRealmTimer; + uint32 m_uiMuruBerserkTimer; GUIDList SpectralRealmList; }; #endif diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index e57894861..f07f085f3 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2327" + #define SD2_REVISION_NR "2328" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index db376a6dc..db17ea9e1 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -1061,6 +1061,10 @@ INSERT INTO scripted_areatrigger VALUES (4853,'at_madrigosa'); UPDATE creature_template SET ScriptName='boss_alythess' WHERE entry=25166; UPDATE creature_template SET ScriptName='boss_sacrolash' WHERE entry=25165; UPDATE creature_template SET ScriptName='npc_shadow_image' WHERE entry=25214; +UPDATE creature_template SET ScriptName='boss_muru' WHERE entry=25741; +UPDATE creature_template SET ScriptName='boss_entropius' WHERE entry=25840; +UPDATE creature_template SET ScriptName='npc_portal_target' WHERE entry=25770; +UPDATE creature_template SET ScriptName='npc_void_sentinel_summoner' WHERE entry=25782; /* SWAMP OF SORROWS */ UPDATE creature_template SET ScriptName='npc_galen_goodward' WHERE entry=5391; diff --git a/sql/updates/r2328_mangos.sql b/sql/updates/r2328_mangos.sql new file mode 100644 index 000000000..c735e4cd8 --- /dev/null +++ b/sql/updates/r2328_mangos.sql @@ -0,0 +1,4 @@ +UPDATE creature_template SET ScriptName='boss_muru' WHERE entry=25741; +UPDATE creature_template SET ScriptName='boss_entropius' WHERE entry=25840; +UPDATE creature_template SET ScriptName='npc_portal_target' WHERE entry=25770; +UPDATE creature_template SET ScriptName='npc_void_sentinel_summoner' WHERE entry=25782; From 2b37eb84cdbf3e6dd7e532f95aa767197cc03ae6 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Thu, 10 Nov 2011 14:13:50 +0100 Subject: [PATCH 0313/1172] [2329] Fix summon type for executioner in Shattered halls, thanks to Infernos for pointing --- .../shattered_halls/instance_shattered_halls.cpp | 2 +- sd2_revision_nr.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/outland/hellfire_citadel/shattered_halls/instance_shattered_halls.cpp b/scripts/outland/hellfire_citadel/shattered_halls/instance_shattered_halls.cpp index 5c314e778..fa3eeb71d 100644 --- a/scripts/outland/hellfire_citadel/shattered_halls/instance_shattered_halls.cpp +++ b/scripts/outland/hellfire_citadel/shattered_halls/instance_shattered_halls.cpp @@ -124,7 +124,7 @@ void instance_shattered_halls::SetData(uint32 uiType, uint32 uiData) pPlayer->SummonCreature(m_uiTeam == ALLIANCE ? aSoldiersLocs[i].m_uiAllianceEntry : aSoldiersLocs[i].m_uiHordeEntry, aSoldiersLocs[i].m_fX, aSoldiersLocs[i].m_fY, aSoldiersLocs[i].m_fZ, aSoldiersLocs[i].m_fO, TEMPSUMMON_DEAD_DESPAWN, 0); // Summon the executioner for 80 min; ToDo: set the flags in DB - if (Creature* pExecutioner = pPlayer->SummonCreature(NPC_EXECUTIONER, afExecutionerLoc[0], afExecutionerLoc[1], afExecutionerLoc[2], afExecutionerLoc[3], TEMPSUMMON_TIMED_DESPAWN, 80*MINUTE*IN_MILLISECONDS, true)) + if (Creature* pExecutioner = pPlayer->SummonCreature(NPC_EXECUTIONER, afExecutionerLoc[0], afExecutionerLoc[1], afExecutionerLoc[2], afExecutionerLoc[3], TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 80*MINUTE*IN_MILLISECONDS, true)) pExecutioner->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_NON_ATTACKABLE); // cast the execution spell diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index f07f085f3..484f4ddde 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2328" + #define SD2_REVISION_NR "2329" #endif // __SD2_REVISION_NR_H__ From fbb554be1c700970db14432573c5175d090df0b1 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Thu, 10 Nov 2011 18:33:38 +0100 Subject: [PATCH 0314/1172] [2330] More improvements to Shattered Halls Executioner event, thanks to Infernos for feedback again --- .../shattered_halls/instance_shattered_halls.cpp | 4 ++-- sd2_revision_nr.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/outland/hellfire_citadel/shattered_halls/instance_shattered_halls.cpp b/scripts/outland/hellfire_citadel/shattered_halls/instance_shattered_halls.cpp index fa3eeb71d..2014c7b91 100644 --- a/scripts/outland/hellfire_citadel/shattered_halls/instance_shattered_halls.cpp +++ b/scripts/outland/hellfire_citadel/shattered_halls/instance_shattered_halls.cpp @@ -109,13 +109,13 @@ void instance_shattered_halls::SetData(uint32 uiType, uint32 uiData) if (uiData == DONE) { // Make executioner attackable only after the final boss is dead - if (Creature* pExecutioner = GetSingleCreatureFromStorage(NPC_EXECUTIONER)) + if (Creature* pExecutioner = GetSingleCreatureFromStorage(NPC_EXECUTIONER, true)) pExecutioner->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_NON_ATTACKABLE); } break; case TYPE_EXECUTION: m_auiEncounter[uiType] = uiData; - if (uiData == IN_PROGRESS) + if (uiData == IN_PROGRESS && !GetSingleCreatureFromStorage(NPC_EXECUTIONER, true)) { if (Player* pPlayer = GetPlayerInMap()) { diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 484f4ddde..a5b3f00b4 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2329" + #define SD2_REVISION_NR "2330" #endif // __SD2_REVISION_NR_H__ From bb9f611eff7a00d0e76a8e643afde31f54a7f710 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Fri, 11 Nov 2011 00:06:07 +0200 Subject: [PATCH 0315/1172] [2331] Some small cleanup for Brutallus Expects MaNGOS Rev. [11845] --- .../sunwell_plateau/boss_brutallus.cpp | 61 ++++++++----------- sd2_revision_nr.h | 2 +- 2 files changed, 25 insertions(+), 38 deletions(-) diff --git a/scripts/eastern_kingdoms/sunwell_plateau/boss_brutallus.cpp b/scripts/eastern_kingdoms/sunwell_plateau/boss_brutallus.cpp index dfc36e16c..f59450f80 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/boss_brutallus.cpp +++ b/scripts/eastern_kingdoms/sunwell_plateau/boss_brutallus.cpp @@ -50,7 +50,6 @@ enum Brutallus SPELL_METEOR_SLASH = 45150, SPELL_BURN = 45141, - SPELL_BURN_AURA_EFFECT = 46394, SPELL_STOMP = 45185, SPELL_BERSERK = 26662 }; @@ -73,15 +72,11 @@ struct MANGOS_DLL_DECL boss_brutallusAI : public ScriptedAI void Reset() { - m_uiSlashTimer = 11000; - m_uiStompTimer = 30000; - m_uiBurnTimer = 60000; - m_uiBerserkTimer = 360000; - m_uiLoveTimer = urand(10000, 17000); - - //TODO: correct me when pre-event implemented - if (m_pInstance) - m_pInstance->SetData(TYPE_BRUTALLUS, NOT_STARTED); + m_uiSlashTimer = 11000; + m_uiStompTimer = 30000; + m_uiBurnTimer = 20000; + m_uiBerserkTimer = 6*MINUTE*IN_MILLISECONDS; + m_uiLoveTimer = urand(10000, 17000); } void Aggro(Unit* pWho) @@ -110,10 +105,10 @@ struct MANGOS_DLL_DECL boss_brutallusAI : public ScriptedAI m_pInstance->SetData(TYPE_BRUTALLUS, DONE); } - void SpellHitTarget(Unit* pCaster, const SpellEntry* pSpell) + void JustReachedHome() { - if (pSpell->Id == SPELL_BURN) - pCaster->CastSpell(pCaster, SPELL_BURN_AURA_EFFECT, true, NULL, NULL, m_creature->GetObjectGuid()); + if (m_pInstance) + m_pInstance->SetData(TYPE_BRUTALLUS, FAIL); } void UpdateAI(const uint32 uiDiff) @@ -136,52 +131,44 @@ struct MANGOS_DLL_DECL boss_brutallusAI : public ScriptedAI if (m_uiSlashTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_METEOR_SLASH); - m_uiSlashTimer = 11000; + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_METEOR_SLASH) == CAST_OK) + m_uiSlashTimer = 11000; } else m_uiSlashTimer -= uiDiff; if (m_uiStompTimer < uiDiff) { - if (Unit* pTarget = m_creature->getVictim()) - { - DoCastSpellIfCan(pTarget,SPELL_STOMP); - - if (pTarget->HasAura(SPELL_BURN_AURA_EFFECT, EFFECT_INDEX_0)) - pTarget->RemoveAurasDueToSpell(SPELL_BURN_AURA_EFFECT); - } - - m_uiStompTimer = 30000; + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_STOMP) == CAST_OK) + m_uiStompTimer = 30000; } else m_uiStompTimer -= uiDiff; if (m_uiBurnTimer < uiDiff) { - //returns any unit - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0, SPELL_BURN, SELECT_FLAG_PLAYER)) { - //so we get owner, in case unit was pet/totem/etc - if (Player* pPlayer = pTarget->GetCharmerOrOwnerPlayerOrPlayerItself()) - DoCastSpellIfCan(pPlayer, SPELL_BURN); + if (DoCastSpellIfCan(pTarget, SPELL_BURN) == CAST_OK) + m_uiBurnTimer = 20000; } - - m_uiBurnTimer = 60000; } else m_uiBurnTimer -= uiDiff; - if (m_uiBerserkTimer < uiDiff) + if (m_uiBerserkTimer) { - if (DoCastSpellIfCan(m_creature,SPELL_BERSERK) == CAST_OK) + if (m_uiBerserkTimer <= uiDiff) { - DoScriptText(YELL_BERSERK, m_creature); - m_uiBerserkTimer = 20000; + if (DoCastSpellIfCan(m_creature, SPELL_BERSERK) == CAST_OK) + { + DoScriptText(YELL_BERSERK, m_creature); + m_uiBerserkTimer = 0; + } } + else + m_uiBerserkTimer -= uiDiff; } - else - m_uiBerserkTimer -= uiDiff; DoMeleeAttackIfReady(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index a5b3f00b4..670b5fbc6 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2330" + #define SD2_REVISION_NR "2331" #endif // __SD2_REVISION_NR_H__ From b8da4fc99df634cf321be4a1e29f654cbb08401f Mon Sep 17 00:00:00 2001 From: dufernst Date: Fri, 11 Nov 2011 18:14:12 +0100 Subject: [PATCH 0316/1172] [2332] Use advanced SelectAttackingTarget options, also minor cleanups Remark that there is some functional change to malacrass, this might not be entirely correct Signed-off-by: Schmoozerd --- .../blackwing_lair/boss_vaelastrasz.cpp | 21 +----- .../karazhan/boss_terestian_illhoof.cpp | 3 +- .../karazhan/bosses_opera.cpp | 3 +- .../scholomance/boss_darkmaster_gandling.cpp | 5 +- .../zulaman/boss_malacrass.cpp | 39 ++--------- .../temple_of_ahnqiraj/boss_fankriss.cpp | 70 ++++++------------- .../northrend/naxxramas/boss_kelthuzad.cpp | 4 +- .../auchenai_crypts/boss_exarch_maladaar.cpp | 20 ++---- .../shadow_labyrinth/boss_murmur.cpp | 16 ++--- scripts/outland/black_temple/boss_illidan.cpp | 16 ++--- .../black_temple/boss_warlord_najentus.cpp | 4 +- .../boss_morogrim_tidewalker.cpp | 6 +- scripts/outland/gruuls_lair/boss_gruul.cpp | 25 +------ .../tempest_keep/the_eye/boss_astromancer.cpp | 11 +-- sd2_revision_nr.h | 2 +- 15 files changed, 63 insertions(+), 182 deletions(-) diff --git a/scripts/eastern_kingdoms/blackwing_lair/boss_vaelastrasz.cpp b/scripts/eastern_kingdoms/blackwing_lair/boss_vaelastrasz.cpp index dd0f57002..8affed9a7 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/boss_vaelastrasz.cpp +++ b/scripts/eastern_kingdoms/blackwing_lair/boss_vaelastrasz.cpp @@ -271,26 +271,11 @@ struct MANGOS_DLL_DECL boss_vaelastraszAI : public ScriptedAI // Burning Adrenaline Caster Timer if (m_uiBurningAdrenalineCasterTimer < uiDiff) { - std::vector vManaPlayers; - - // Scan for mana targets in threat list - ThreatList const& tList = m_creature->getThreatManager().getThreatList(); - vManaPlayers.reserve(tList.size()); - for (ThreatList::const_iterator iter = tList.begin();iter != tList.end(); ++iter) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0, SPELL_BURNING_ADRENALINE, SELECT_FLAG_PLAYER | SELECT_FLAG_POWER_MANA)) { - Unit* pTempTarget = m_creature->GetMap()->GetUnit((*iter)->getUnitGuid()); - - if (pTempTarget && pTempTarget->getPowerType() == POWER_MANA && pTempTarget->GetTypeId() == TYPEID_PLAYER) - vManaPlayers.push_back(pTempTarget); + pTarget->CastSpell(pTarget, SPELL_BURNING_ADRENALINE, true, NULL, NULL, m_creature->GetObjectGuid()); + m_uiBurningAdrenalineCasterTimer = 15000; } - - if (vManaPlayers.empty()) - return; - - Unit* pTarget = vManaPlayers[urand(0, vManaPlayers.size() - 1)]; - pTarget->CastSpell(pTarget, SPELL_BURNING_ADRENALINE, true, NULL, NULL, m_creature->GetObjectGuid()); - - m_uiBurningAdrenalineCasterTimer = 15000; } else m_uiBurningAdrenalineCasterTimer -= uiDiff; diff --git a/scripts/eastern_kingdoms/karazhan/boss_terestian_illhoof.cpp b/scripts/eastern_kingdoms/karazhan/boss_terestian_illhoof.cpp index 620cf3029..aa7c1c6fd 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_terestian_illhoof.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_terestian_illhoof.cpp @@ -231,8 +231,7 @@ struct MANGOS_DLL_DECL boss_terestianAI : public ScriptedAI if (m_uiSacrifice_Timer < uiDiff) { - Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1); - if (pTarget && pTarget->isAlive() && pTarget->GetTypeId() == TYPEID_PLAYER) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1, SPELL_SACRIFICE, SELECT_FLAG_PLAYER)) { DoCastSpellIfCan(pTarget, SPELL_SACRIFICE, CAST_TRIGGERED); diff --git a/scripts/eastern_kingdoms/karazhan/bosses_opera.cpp b/scripts/eastern_kingdoms/karazhan/bosses_opera.cpp index 5457850df..2481f053c 100644 --- a/scripts/eastern_kingdoms/karazhan/bosses_opera.cpp +++ b/scripts/eastern_kingdoms/karazhan/bosses_opera.cpp @@ -806,8 +806,7 @@ struct MANGOS_DLL_DECL boss_bigbadwolfAI : public ScriptedAI { if (!IsChasing) { - Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0); - if (target && target->GetTypeId() == TYPEID_PLAYER) + if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0, SPELL_LITTLE_RED_RIDING_HOOD, SELECT_FLAG_PLAYER)) { DoScriptText(SAY_WOLF_HOOD, m_creature); DoCastSpellIfCan(target, SPELL_LITTLE_RED_RIDING_HOOD, CAST_TRIGGERED); diff --git a/scripts/eastern_kingdoms/scholomance/boss_darkmaster_gandling.cpp b/scripts/eastern_kingdoms/scholomance/boss_darkmaster_gandling.cpp index d45cf6cb2..910765be9 100644 --- a/scripts/eastern_kingdoms/scholomance/boss_darkmaster_gandling.cpp +++ b/scripts/eastern_kingdoms/scholomance/boss_darkmaster_gandling.cpp @@ -93,11 +93,8 @@ struct MANGOS_DLL_DECL boss_darkmaster_gandlingAI : public ScriptedAI { if (m_uiTeleportTimer < uiDiff) { - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0, SPELL_SHADOW_PORTAL, SELECT_FLAG_PLAYER)) { - if (pTarget->GetTypeId() != TYPEID_PLAYER) - return; - if (DoCastSpellIfCan(pTarget, SPELL_SHADOW_PORTAL) == CAST_OK) { // remove threat diff --git a/scripts/eastern_kingdoms/zulaman/boss_malacrass.cpp b/scripts/eastern_kingdoms/zulaman/boss_malacrass.cpp index 3ad0e2ff3..9221e908c 100644 --- a/scripts/eastern_kingdoms/zulaman/boss_malacrass.cpp +++ b/scripts/eastern_kingdoms/zulaman/boss_malacrass.cpp @@ -517,37 +517,6 @@ struct MANGOS_DLL_DECL boss_malacrass_addAI : public ScriptedAI } } } - - bool IsEnemyPlayerInRangeForSpell(uint32 uiSpellId) - { - SpellEntry const* pSpell = GetSpellStore()->LookupEntry(uiSpellId); - - //if spell not valid - if (!pSpell) - return false; - - //spell known, so lookup using rangeIndex - SpellRangeEntry const* pSpellRange = GetSpellRangeStore()->LookupEntry(pSpell->rangeIndex); - - //not valid, so return - if (!pSpellRange) - return false; - - ThreatList const& tList = m_creature->getThreatManager().getThreatList(); - for (ThreatList::const_iterator iter = tList.begin();iter != tList.end(); ++iter) - { - Unit* pTarget = m_creature->GetMap()->GetUnit((*iter)->getUnitGuid()); - - if (pTarget && pTarget->GetTypeId() == TYPEID_PLAYER) - { - //if target further away than maxrange or closer than minrange, statement is false - if (m_creature->IsInRange(pTarget, pSpellRange->minRange, pSpellRange->maxRange)) - return true; - } - } - - return false; - } }; enum @@ -652,7 +621,7 @@ struct MANGOS_DLL_DECL mob_alyson_antilleAI : public boss_malacrass_addAI if (m_uiArcaneTorrentTimer < uiDiff) { - if (IsEnemyPlayerInRangeForSpell(SPELL_ARCANE_TORRENT)) + if (m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0, uint32(0), SELECT_FLAG_PLAYER | SELECT_FLAG_IN_MELEE_RANGE)) { DoCastSpellIfCan(m_creature, SPELL_ARCANE_TORRENT); m_uiArcaneTorrentTimer = 60000; @@ -798,7 +767,7 @@ struct MANGOS_DLL_DECL mob_lord_raadanAI : public boss_malacrass_addAI if (m_uiThunderclapTimer < uiDiff) { - if (IsEnemyPlayerInRangeForSpell(SPELL_THUNDERCLAP)) + if (m_creature->SelectAttackingTarget(ATTACKING_TARGET_TOPAGGRO, 0, SPELL_THUNDERCLAP, SELECT_FLAG_PLAYER)) { DoCastSpellIfCan(m_creature->getVictim(), SPELL_THUNDERCLAP); m_uiThunderclapTimer = 12000; @@ -849,9 +818,9 @@ struct MANGOS_DLL_DECL mob_darkheartAI : public boss_malacrass_addAI if (m_uiPsychicWailTimer < uiDiff) { - if (IsEnemyPlayerInRangeForSpell(SPELL_PSYCHIC_WAIL)) + if (m_creature->SelectAttackingTarget(ATTACKING_TARGET_TOPAGGRO, 0, uint32(0), SELECT_FLAG_PLAYER | SELECT_FLAG_IN_MELEE_RANGE)) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_PSYCHIC_WAIL); + DoCastSpellIfCan(m_creature, SPELL_PSYCHIC_WAIL); m_uiPsychicWailTimer = 12000; } else diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_fankriss.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_fankriss.cpp index 54aed5f63..9350afeed 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/boss_fankriss.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_fankriss.cpp @@ -46,7 +46,6 @@ struct MANGOS_DLL_DECL boss_fankrissAI : public ScriptedAI int RandX; int RandY; - Creature* Hatchling; Creature* Spawn; void Reset() @@ -109,7 +108,9 @@ struct MANGOS_DLL_DECL boss_fankrissAI : public ScriptedAI break; } SpawnSpawns_Timer = urand(30000, 60000); - }else SpawnSpawns_Timer -= diff; + } + else + SpawnSpawns_Timer -= diff; // Teleporting Random Target to one of the three tunnels and spawn 4 hatchlings near the gamer. //We will only telport if fankriss has more than 3% of hp so teleported gamers can always loot. @@ -117,66 +118,39 @@ struct MANGOS_DLL_DECL boss_fankrissAI : public ScriptedAI { if (SpawnHatchlings_Timer< diff) { - Unit* target = NULL; - target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0); - if (target && target->GetTypeId() == TYPEID_PLAYER) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0, SPELL_ROOT, SELECT_FLAG_PLAYER)) { - DoCastSpellIfCan(target, SPELL_ROOT); + DoCastSpellIfCan(pTarget, SPELL_ROOT); - if (m_creature->getThreatManager().getThreat(target)) - m_creature->getThreatManager().modifyThreatPercent(target, -100); + if (m_creature->getThreatManager().getThreat(pTarget)) + m_creature->getThreatManager().modifyThreatPercent(pTarget, -100); switch(urand(0, 2)) { case 0: - DoTeleportPlayer(target, -8106.0142f, 1289.2900f, -74.419533f, 5.112f); - Hatchling = m_creature->SummonCreature(15962, target->GetPositionX()-3, target->GetPositionY()-3, target->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000); - if (Hatchling) - Hatchling->AI()->AttackStart(target); - Hatchling = m_creature->SummonCreature(15962, target->GetPositionX()-3, target->GetPositionY()+3, target->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000); - if (Hatchling) - Hatchling->AI()->AttackStart(target); - Hatchling = m_creature->SummonCreature(15962, target->GetPositionX()-5, target->GetPositionY()-5, target->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000); - if (Hatchling) - Hatchling->AI()->AttackStart(target); - Hatchling = m_creature->SummonCreature(15962, target->GetPositionX()-5, target->GetPositionY()+5, target->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000); - if (Hatchling) - Hatchling->AI()->AttackStart(target); + DoTeleportPlayer(pTarget, -8106.0142f, 1289.2900f, -74.419533f, 5.112f); break; case 1: - DoTeleportPlayer(target, -7990.135354f, 1155.1907f, -78.849319f, 2.608f); - Hatchling = m_creature->SummonCreature(15962, target->GetPositionX()-3, target->GetPositionY()-3, target->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000); - if (Hatchling) - Hatchling->AI()->AttackStart(target); - Hatchling = m_creature->SummonCreature(15962, target->GetPositionX()-3, target->GetPositionY()+3, target->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000); - if (Hatchling) - Hatchling->AI()->AttackStart(target); - Hatchling = m_creature->SummonCreature(15962, target->GetPositionX()-5, target->GetPositionY()-5, target->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000); - if (Hatchling) - Hatchling->AI()->AttackStart(target); - Hatchling = m_creature->SummonCreature(15962, target->GetPositionX()-5, target->GetPositionY()+5, target->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000); - if (Hatchling) - Hatchling->AI()->AttackStart(target); + DoTeleportPlayer(pTarget, -7990.135354f, 1155.1907f, -78.849319f, 2.608f); break; case 2: - DoTeleportPlayer(target, -8159.7753f, 1127.9064f, -76.868660f, 0.675f); - Hatchling = m_creature->SummonCreature(15962, target->GetPositionX()-3, target->GetPositionY()-3, target->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000); - if (Hatchling) - Hatchling->AI()->AttackStart(target); - Hatchling = m_creature->SummonCreature(15962, target->GetPositionX()-3, target->GetPositionY()+3, target->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000); - if (Hatchling) - Hatchling->AI()->AttackStart(target); - Hatchling = m_creature->SummonCreature(15962, target->GetPositionX()-5, target->GetPositionY()-5, target->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000); - if (Hatchling) - Hatchling->AI()->AttackStart(target); - Hatchling = m_creature->SummonCreature(15962, target->GetPositionX()-5, target->GetPositionY()+5, target->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000); - if (Hatchling) - Hatchling->AI()->AttackStart(target); + DoTeleportPlayer(pTarget, -8159.7753f, 1127.9064f, -76.868660f, 0.675f); break; } + Creature* pHatchling = NULL; + if (pHatchling = m_creature->SummonCreature(15962, pTarget->GetPositionX()-3, pTarget->GetPositionY()-3, pTarget->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000)) + pHatchling->AI()->AttackStart(pTarget); + if (pHatchling = m_creature->SummonCreature(15962, pTarget->GetPositionX()-3, pTarget->GetPositionY()+3, pTarget->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000)) + pHatchling->AI()->AttackStart(pTarget); + if (pHatchling = m_creature->SummonCreature(15962, pTarget->GetPositionX()-5, pTarget->GetPositionY()-5, pTarget->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000)) + pHatchling->AI()->AttackStart(pTarget); + if (pHatchling = m_creature->SummonCreature(15962, pTarget->GetPositionX()-5, pTarget->GetPositionY()+5, pTarget->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000)) + pHatchling->AI()->AttackStart(pTarget); } SpawnHatchlings_Timer = urand(45000, 60000); - }else SpawnHatchlings_Timer -= diff; + } + else + SpawnHatchlings_Timer -= diff; } DoMeleeAttackIfReady(); diff --git a/scripts/northrend/naxxramas/boss_kelthuzad.cpp b/scripts/northrend/naxxramas/boss_kelthuzad.cpp index 8b222dddf..0a0884204 100644 --- a/scripts/northrend/naxxramas/boss_kelthuzad.cpp +++ b/scripts/northrend/naxxramas/boss_kelthuzad.cpp @@ -465,9 +465,7 @@ struct MANGOS_DLL_DECL boss_kelthuzadAI : public ScriptedAI if (m_uiManaDetonationTimer < uiDiff) { - Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0); - - if (pTarget && pTarget->GetTypeId() == TYPEID_PLAYER && pTarget->getPowerType() == POWER_MANA) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0, SPELL_MANA_DETONATION, SELECT_FLAG_PLAYER | SELECT_FLAG_POWER_MANA)) { if (DoCastSpellIfCan(pTarget, SPELL_MANA_DETONATION) == CAST_OK) { diff --git a/scripts/outland/auchindoun/auchenai_crypts/boss_exarch_maladaar.cpp b/scripts/outland/auchindoun/auchenai_crypts/boss_exarch_maladaar.cpp index 87a181302..d8f99d675 100644 --- a/scripts/outland/auchindoun/auchenai_crypts/boss_exarch_maladaar.cpp +++ b/scripts/outland/auchindoun/auchenai_crypts/boss_exarch_maladaar.cpp @@ -251,24 +251,16 @@ struct MANGOS_DLL_DECL boss_exarch_maladaarAI : public ScriptedAI if (m_uiStolenSoulTimer < uiDiff) { - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0, SPELL_STOLEN_SOUL, SELECT_FLAG_PLAYER)) { - if (pTarget->GetTypeId() == TYPEID_PLAYER) - { - if (m_creature->IsNonMeleeSpellCasted(false)) - m_creature->InterruptNonMeleeSpells(true); + DoScriptText(urand(0, 1) ? SAY_ROAR : SAY_SOUL_CLEAVE, m_creature); - DoScriptText(urand(0, 1) ? SAY_ROAR : SAY_SOUL_CLEAVE, m_creature); + m_targetGuid = pTarget->GetObjectGuid(); - m_targetGuid = pTarget->GetObjectGuid(); + DoCastSpellIfCan(pTarget, SPELL_STOLEN_SOUL, CAST_INTERRUPT_PREVIOUS); + DoSpawnCreature(NPC_STOLEN_SOUL, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 10000); - DoCastSpellIfCan(pTarget, SPELL_STOLEN_SOUL); - DoSpawnCreature(NPC_STOLEN_SOUL, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 10000); - - m_uiStolenSoulTimer = urand(20000, 30000); - } - else - m_uiStolenSoulTimer = 1000; + m_uiStolenSoulTimer = urand(20000, 30000); } } else diff --git a/scripts/outland/auchindoun/shadow_labyrinth/boss_murmur.cpp b/scripts/outland/auchindoun/shadow_labyrinth/boss_murmur.cpp index 815ebdc07..ccf5df726 100644 --- a/scripts/outland/auchindoun/shadow_labyrinth/boss_murmur.cpp +++ b/scripts/outland/auchindoun/shadow_labyrinth/boss_murmur.cpp @@ -165,15 +165,11 @@ struct MANGOS_DLL_DECL boss_murmurAI : public ScriptedAI { if (!CanShockWave) { - if (Unit* temp = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) + if (Unit* pTemp = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0, SPELL_MAGNETIC_PULL, SELECT_FLAG_PLAYER)) { - if (temp->GetTypeId() == TYPEID_PLAYER) - { - DoCastSpellIfCan(temp, SPELL_MAGNETIC_PULL); - m_playerTargetGuid = temp->GetObjectGuid(); - CanShockWave = true; - } - MagneticPull_Timer = 2500; + DoCastSpellIfCan(pTemp, SPELL_MAGNETIC_PULL); + m_playerTargetGuid = pTemp->GetObjectGuid(); + CanShockWave = true; } } else @@ -185,7 +181,9 @@ struct MANGOS_DLL_DECL boss_murmurAI : public ScriptedAI CanShockWave = false; m_playerTargetGuid.Clear(); } - }else MagneticPull_Timer -= diff; + } + else + MagneticPull_Timer -= diff; //no meele if preparing for sonic boom if (!CanSonicBoom) diff --git a/scripts/outland/black_temple/boss_illidan.cpp b/scripts/outland/black_temple/boss_illidan.cpp index 1fc8953d0..a76f70239 100644 --- a/scripts/outland/black_temple/boss_illidan.cpp +++ b/scripts/outland/black_temple/boss_illidan.cpp @@ -1863,20 +1863,14 @@ struct MANGOS_DLL_DECL boss_illidan_stormrageAI : public ScriptedAI if (m_uiShadowDemonTimer < uiDiff) { m_creature->InterruptNonMeleeSpells(false); - Creature* ShadowDemon = NULL; - for(uint8 i = 0; i < 4; ++i) + for (uint8 i = 0; i < 4; ++i) { - Unit* target = NULL; - target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0); - - // only on players. - if (target && target->GetTypeId() == TYPEID_PLAYER) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0, uint32(0), SELECT_FLAG_PLAYER)) { - ShadowDemon = m_creature->SummonCreature(SHADOW_DEMON, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 25000); - if (ShadowDemon) + if (Creature* ShadowDemon = m_creature->SummonCreature(SHADOW_DEMON, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 25000)) { - ShadowDemon->AddThreat(target, 5000000.0f); - ShadowDemon->AI()->AttackStart(target); + ShadowDemon->AddThreat(pTarget, 5000000.0f); + ShadowDemon->AI()->AttackStart(pTarget); ShadowDemon->SetInCombatWithZone(); } } diff --git a/scripts/outland/black_temple/boss_warlord_najentus.cpp b/scripts/outland/black_temple/boss_warlord_najentus.cpp index 63c19886a..58a003a68 100644 --- a/scripts/outland/black_temple/boss_warlord_najentus.cpp +++ b/scripts/outland/black_temple/boss_warlord_najentus.cpp @@ -156,12 +156,12 @@ struct MANGOS_DLL_DECL boss_najentusAI : public ScriptedAI if (m_uiImpalingSpineTimer < uiDiff) { - Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1); + Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1, SPELL_IMPALING_SPINE, SELECT_FLAG_PLAYER); if (!pTarget) pTarget = m_creature->getVictim(); - if (pTarget && (pTarget->GetTypeId() == TYPEID_PLAYER)) + if (pTarget && pTarget->GetTypeId() == TYPEID_PLAYER) { DoCastSpellIfCan(pTarget, SPELL_IMPALING_SPINE); m_uiImpalingSpineTimer = 20000; diff --git a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_morogrim_tidewalker.cpp b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_morogrim_tidewalker.cpp index 6bb782656..473826acb 100644 --- a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_morogrim_tidewalker.cpp +++ b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_morogrim_tidewalker.cpp @@ -196,11 +196,11 @@ struct MANGOS_DLL_DECL boss_morogrim_tidewalkerAI : public ScriptedAI if (m_uiWateryGrave_Timer < uiDiff) { //Teleport 4 players under the waterfalls - for(uint8 i = 0; i < 4; ++i) + for (uint8 i = 0; i < 4; ++i) { - Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1); + Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1, SPELL_WATERY_GRAVE_1, SELECT_FLAG_PLAYER); - if (pTarget && pTarget->GetTypeId() == TYPEID_PLAYER && !pTarget->HasAuraType(SPELL_AURA_MOD_STUN) && pTarget->IsWithinDistInMap(m_creature, 45.0f)) + if (pTarget && !pTarget->HasAuraType(SPELL_AURA_MOD_STUN)) { switch(i) { diff --git a/scripts/outland/gruuls_lair/boss_gruul.cpp b/scripts/outland/gruuls_lair/boss_gruul.cpp index 33af4e558..0ab3e0678 100644 --- a/scripts/outland/gruuls_lair/boss_gruul.cpp +++ b/scripts/outland/gruuls_lair/boss_gruul.cpp @@ -196,29 +196,10 @@ struct MANGOS_DLL_DECL boss_gruulAI : public ScriptedAI // Hurtful Strike if (m_uiHurtfulStrike_Timer < uiDiff) { - // Find 2nd-aggro target within melee range. - Unit* pTarget = NULL; - ThreatList const& tList = m_creature->getThreatManager().getThreatList(); - ThreatList::const_iterator itr = tList.begin(); - std::advance(itr, 1); - for (;itr != tList.end(); ++itr) - { - pTarget = m_creature->GetMap()->GetUnit((*itr)->getUnitGuid()); - - // exclude pets, totems & player out of melee range - if (!pTarget || pTarget->GetTypeId() != TYPEID_PLAYER || !m_creature->CanReachWithMeleeAttack(pTarget)) - { - pTarget = NULL; - continue; - } - //we've found someone - break; - } - - if (pTarget) - DoCastSpellIfCan(pTarget,SPELL_HURTFUL_STRIKE); + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_TOPAGGRO, 1, SPELL_HURTFUL_STRIKE, SELECT_FLAG_PLAYER)) + DoCastSpellIfCan(pTarget, SPELL_HURTFUL_STRIKE); else - DoCastSpellIfCan(m_creature->getVictim(),SPELL_HURTFUL_STRIKE); + DoCastSpellIfCan(m_creature->getVictim(), SPELL_HURTFUL_STRIKE); m_uiHurtfulStrike_Timer = 8000; } diff --git a/scripts/outland/tempest_keep/the_eye/boss_astromancer.cpp b/scripts/outland/tempest_keep/the_eye/boss_astromancer.cpp index f6f3eeae4..b4fac9392 100644 --- a/scripts/outland/tempest_keep/the_eye/boss_astromancer.cpp +++ b/scripts/outland/tempest_keep/the_eye/boss_astromancer.cpp @@ -254,15 +254,10 @@ struct MANGOS_DLL_DECL boss_high_astromancer_solarianAI : public ScriptedAI if (m_uiWrathOfTheAstromancerTimer < uiDiff) { // Target the tank ? - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1)) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1, SPELL_WRATH_OF_THE_ASTROMANCER, SELECT_FLAG_PLAYER)) { - if (pTarget->GetTypeId() == TYPEID_PLAYER) - { - if (DoCastSpellIfCan(pTarget, SPELL_WRATH_OF_THE_ASTROMANCER, CAST_INTERRUPT_PREVIOUS) == CAST_OK) - m_uiWrathOfTheAstromancerTimer = 25000; - } - else - m_uiWrathOfTheAstromancerTimer = 1000; + if (DoCastSpellIfCan(pTarget, SPELL_WRATH_OF_THE_ASTROMANCER, CAST_INTERRUPT_PREVIOUS) == CAST_OK) + m_uiWrathOfTheAstromancerTimer = 25000; } else m_uiWrathOfTheAstromancerTimer = 10000; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 670b5fbc6..198490399 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2331" + #define SD2_REVISION_NR "2332" #endif // __SD2_REVISION_NR_H__ From 02405c4d589ff7c5918d09c133d9bc4e30f412a7 Mon Sep 17 00:00:00 2001 From: Cher0 Date: Mon, 14 Nov 2011 20:57:27 +0100 Subject: [PATCH 0317/1172] [2333] Remove unneeded break in escortAI. Signed-off-by: Schmoozerd --- base/escort_ai.cpp | 6 +----- sd2_revision_nr.h | 2 +- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/base/escort_ai.cpp b/base/escort_ai.cpp index ad29e7d4e..7e9fa65c3 100644 --- a/base/escort_ai.cpp +++ b/base/escort_ai.cpp @@ -246,15 +246,11 @@ bool npc_escortAI::IsPlayerOrGroupInRange() { if (Group* pGroup = pPlayer->GetGroup()) { - for(GroupReference* pRef = pGroup->GetFirstMember(); pRef != NULL; pRef = pRef->next()) + for (GroupReference* pRef = pGroup->GetFirstMember(); pRef != NULL; pRef = pRef->next()) { Player* pMember = pRef->getSource(); - if (pMember && m_creature->IsWithinDistInMap(pMember, MAX_PLAYER_DISTANCE)) - { return true; - break; - } } } else diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 198490399..60e35748d 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2332" + #define SD2_REVISION_NR "2333" #endif // __SD2_REVISION_NR_H__ From 6c54f78597fc83da21cf27b5b14b6d1d99ac4084 Mon Sep 17 00:00:00 2001 From: dufernst Date: Mon, 14 Nov 2011 01:24:48 +0100 Subject: [PATCH 0318/1172] [2334] Make more use of advanced SelectAttackingTarget options Also fix a small bug in targeting for ARCANE_EXPLOSION in grand_astromancer_capernian Signed-off-by: Schmoozerd --- .../eastern_kingdoms/karazhan/boss_moroes.cpp | 24 ++----------------- .../boss_priestess_delrissa.cpp | 17 +------------ .../molten_core/boss_ragnaros.cpp | 15 ++---------- .../boss_fathomlord_karathress.cpp | 9 +++---- .../serpent_shrine/boss_lady_vashj.cpp | 16 +------------ .../tempest_keep/the_eye/boss_kaelthas.cpp | 21 +++------------- sd2_revision_nr.h | 2 +- 7 files changed, 13 insertions(+), 91 deletions(-) diff --git a/scripts/eastern_kingdoms/karazhan/boss_moroes.cpp b/scripts/eastern_kingdoms/karazhan/boss_moroes.cpp index 69a0ba733..09cab10d4 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_moroes.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_moroes.cpp @@ -293,26 +293,7 @@ struct MANGOS_DLL_DECL boss_moroesAI : public ScriptedAI if (m_uiBlind_Timer < uiDiff) { - Unit* pTarget = NULL; - - ThreatList const& vThreatList = m_creature->getThreatManager().getThreatList(); - if (vThreatList.empty()) - return; - - std::vector vTargetList; - - for (ThreatList::const_iterator itr = vThreatList.begin();itr != vThreatList.end(); ++itr) - { - pTarget = m_creature->GetMap()->GetUnit((*itr)->getUnitGuid()); - - if (pTarget && m_creature->CanReachWithMeleeAttack(pTarget)) - vTargetList.push_back(pTarget); - } - - if (!vTargetList.empty()) - pTarget = *(vTargetList.begin()+rand()%vTargetList.size()); - - if (pTarget) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0, SPELL_BLIND, SELECT_FLAG_PLAYER)) DoCastSpellIfCan(pTarget, SPELL_BLIND); m_uiBlind_Timer = 40000; @@ -432,8 +413,7 @@ struct MANGOS_DLL_DECL boss_baroness_dorothea_millstipeAI : public boss_moroes_g if (m_uiManaBurn_Timer < uiDiff) { - Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0); - if (pTarget && pTarget->getPowerType() == POWER_MANA) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0, SPELL_MANABURN, SELECT_FLAG_POWER_MANA)) DoCastSpellIfCan(pTarget, SPELL_MANABURN); m_uiManaBurn_Timer = 5000; //3 sec cast diff --git a/scripts/eastern_kingdoms/magisters_terrace/boss_priestess_delrissa.cpp b/scripts/eastern_kingdoms/magisters_terrace/boss_priestess_delrissa.cpp index 8638caa05..0e526aea9 100644 --- a/scripts/eastern_kingdoms/magisters_terrace/boss_priestess_delrissa.cpp +++ b/scripts/eastern_kingdoms/magisters_terrace/boss_priestess_delrissa.cpp @@ -802,23 +802,8 @@ struct MANGOS_DLL_DECL boss_yazzaiAI : public boss_priestess_lackey_commonAI if (Blink_Timer < diff) { - bool InMeleeRange = false; - ThreatList const& tList = m_creature->getThreatManager().getThreatList(); - for (ThreatList::const_iterator itr = tList.begin();itr != tList.end(); ++itr) - { - if (Unit* pTarget = m_creature->GetMap()->GetUnit((*itr)->getUnitGuid())) - { - //if in melee range - if (m_creature->CanReachWithMeleeAttack(pTarget)) - { - InMeleeRange = true; - break; - } - } - } - //if anybody is in melee range than escape by blink - if (InMeleeRange) + if (m_creature->SelectAttackingTarget(ATTACKING_TARGET_TOPAGGRO, 0, uint32(0), SELECT_FLAG_IN_MELEE_RANGE)) DoCastSpellIfCan(m_creature, SPELL_BLINK); Blink_Timer = 8000; diff --git a/scripts/eastern_kingdoms/molten_core/boss_ragnaros.cpp b/scripts/eastern_kingdoms/molten_core/boss_ragnaros.cpp index 67d06cb8f..85199dc2f 100644 --- a/scripts/eastern_kingdoms/molten_core/boss_ragnaros.cpp +++ b/scripts/eastern_kingdoms/molten_core/boss_ragnaros.cpp @@ -244,20 +244,9 @@ struct MANGOS_DLL_DECL boss_ragnarosAI : public Scripted_NoMovementAI // Hammer of Ragnaros if (m_uiHammerTimer < uiDiff) { - // Select a target with mana-bar - std::vector vValidTargets; - ThreatList const& tList = m_creature->getThreatManager().getThreatList(); - vValidTargets.reserve(tList.size()); - for (ThreatList::const_iterator iter = tList.begin(); iter != tList.end(); ++iter) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0, SPELL_MIGHT_OF_RAGNAROS, SELECT_FLAG_POWER_MANA)) { - Unit* pTempTarget = m_creature->GetMap()->GetUnit((*iter)->getUnitGuid()); - if (pTempTarget && pTempTarget->getPowerType() == POWER_MANA) - vValidTargets.push_back(pTempTarget); - } - - if (!vValidTargets.empty()) - { - if (DoCastSpellIfCan(vValidTargets[urand(0, vValidTargets.size() -1)], SPELL_MIGHT_OF_RAGNAROS) == CAST_OK) + if (DoCastSpellIfCan(pTarget, SPELL_MIGHT_OF_RAGNAROS) == CAST_OK) { DoScriptText(SAY_HAMMER, m_creature); m_uiHammerTimer = 11000; diff --git a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_fathomlord_karathress.cpp b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_fathomlord_karathress.cpp index 59c4e92ce..77d8bb6e9 100644 --- a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_fathomlord_karathress.cpp +++ b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_fathomlord_karathress.cpp @@ -398,13 +398,10 @@ struct MANGOS_DLL_DECL boss_fathomguard_sharkkisAI : public Advisor_Base_AI //m_uiHurlTridentTimer if (m_uiHurlTridentTimer < uiDiff) { - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) - { - if (!m_creature->CanReachWithMeleeAttack(pTarget)) - DoCastSpellIfCan(pTarget, SPELL_HURL_TRIDENT); - } + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0, SPELL_HURL_TRIDENT, 0)) + DoCastSpellIfCan(pTarget, SPELL_HURL_TRIDENT); - m_uiHurlTridentTimer = 5000; + m_uiHurlTridentTimer = 5000; } else m_uiHurlTridentTimer -= uiDiff; diff --git a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_lady_vashj.cpp b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_lady_vashj.cpp index 326f71f28..9f8149377 100644 --- a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_lady_vashj.cpp +++ b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_lady_vashj.cpp @@ -370,22 +370,8 @@ struct MANGOS_DLL_DECL boss_lady_vashjAI : public ScriptedAI //m_uiCheck_Timer - used to check if somebody is in melee range if (m_uiCheck_Timer < uiDiff) { - bool bInMeleeRange = false; - ThreatList const& tList = m_creature->getThreatManager().getThreatList(); - for (ThreatList::const_iterator itr = tList.begin();itr != tList.end(); ++itr) - { - Unit* pTarget = m_creature->GetMap()->GetUnit((*itr)->getUnitGuid()); - - //if in melee range - if (pTarget && m_creature->CanReachWithMeleeAttack(pTarget)) - { - bInMeleeRange = true; - break; - } - } - //if nobody is in melee range - if (!bInMeleeRange) + if (!m_creature->SelectAttackingTarget(ATTACKING_TARGET_TOPAGGRO, 0, uint32(0), SELECT_FLAG_IN_MELEE_RANGE)) CastShootOrMultishot(); m_uiCheck_Timer = 1500; diff --git a/scripts/outland/tempest_keep/the_eye/boss_kaelthas.cpp b/scripts/outland/tempest_keep/the_eye/boss_kaelthas.cpp index 0db3f3faa..f67f80381 100644 --- a/scripts/outland/tempest_keep/the_eye/boss_kaelthas.cpp +++ b/scripts/outland/tempest_keep/the_eye/boss_kaelthas.cpp @@ -1264,24 +1264,9 @@ struct MANGOS_DLL_DECL boss_grand_astromancer_capernianAI : public advisorbase_a //m_uiArcaneExplosion_Timer if (m_uiArcaneExplosion_Timer < uiDiff) { - bool m_bInMeleeRange = false; - Unit* pTarget = NULL; - ThreatList const& tList = m_creature->getThreatManager().getThreatList(); - for (ThreatList::const_iterator i = tList.begin();i != tList.end(); ++i) - { - Unit* pUnit = m_creature->GetMap()->GetUnit((*i)->getUnitGuid()); - - //if in melee range - if (pUnit && m_creature->CanReachWithMeleeAttack(pUnit)) - { - m_bInMeleeRange = true; - pTarget = pUnit; - break; - } - } - - if (m_bInMeleeRange) - DoCastSpellIfCan(pTarget, SPELL_ARCANE_EXPLOSION); + // if enemy is in melee range + if (m_creature->SelectAttackingTarget(ATTACKING_TARGET_TOPAGGRO, 0, uint32(0), SELECT_FLAG_IN_MELEE_RANGE)) + DoCastSpellIfCan(m_creature, SPELL_ARCANE_EXPLOSION); m_uiArcaneExplosion_Timer = urand(4000, 6000); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 60e35748d..60b12a876 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2333" + #define SD2_REVISION_NR "2334" #endif // __SD2_REVISION_NR_H__ From aa9ea8eb61027a5e6b46bbe87da78be454118c4e Mon Sep 17 00:00:00 2001 From: Xfurry Date: Wed, 16 Nov 2011 00:44:25 +0200 Subject: [PATCH 0319/1172] [2335] Cleanup for Kalecgos Also removed some old unnecessary hacks --- .../sunwell_plateau/boss_brutallus.cpp | 2 +- .../sunwell_plateau/boss_kalecgos.cpp | 365 +++++++++--------- .../instance_sunwell_plateau.cpp | 52 +-- .../sunwell_plateau/sunwell_plateau.h | 6 +- sd2_revision_nr.h | 2 +- 5 files changed, 189 insertions(+), 238 deletions(-) diff --git a/scripts/eastern_kingdoms/sunwell_plateau/boss_brutallus.cpp b/scripts/eastern_kingdoms/sunwell_plateau/boss_brutallus.cpp index f59450f80..2677d5313 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/boss_brutallus.cpp +++ b/scripts/eastern_kingdoms/sunwell_plateau/boss_brutallus.cpp @@ -24,7 +24,7 @@ EndScriptData */ #include "precompiled.h" #include "sunwell_plateau.h" -enum Brutallus +enum { YELL_INTRO = -1580017, YELL_INTRO_BREAK_ICE = -1580018, diff --git a/scripts/eastern_kingdoms/sunwell_plateau/boss_kalecgos.cpp b/scripts/eastern_kingdoms/sunwell_plateau/boss_kalecgos.cpp index 5bc6b8c91..22c0f4748 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/boss_kalecgos.cpp +++ b/scripts/eastern_kingdoms/sunwell_plateau/boss_kalecgos.cpp @@ -24,41 +24,44 @@ EndScriptData */ #include "precompiled.h" #include "sunwell_plateau.h" -enum KalecgosEncounter +enum { //kalecgos dragon form SAY_EVIL_AGGRO = -1580000, - SAY_EVIL_SPELL1 = -1580001, - SAY_EVIL_SPELL2 = -1580002, - SAY_EVIL_SLAY1 = -1580003, - SAY_EVIL_SLAY2 = -1580004, + SAY_EVIL_SPELL_1 = -1580001, + SAY_EVIL_SPELL_2 = -1580002, + SAY_EVIL_SLAY_1 = -1580003, + SAY_EVIL_SLAY_2 = -1580004, SAY_EVIL_ENRAGE = -1580005, //kalecgos humanoid form SAY_GOOD_AGGRO = -1580006, - SAY_GOOD_NEAR_DEATH = -1580007, - SAY_GOOD_NEAR_DEATH2 = -1580008, + SAY_GOOD_NEAR_DEATH_20 = -1580007, + SAY_GOOD_NEAR_DEATH_10 = -1580008, SAY_GOOD_PLRWIN = -1580009, SAY_SATH_AGGRO = -1580010, SAY_SATH_DEATH = -1580011, - SAY_SATH_SPELL1 = -1580012, - SAY_SATH_SPELL2 = -1580013, - SAY_SATH_SLAY1 = -1580014, - SAY_SATH_SLAY2 = -1580015, + SAY_SATH_SPELL_1 = -1580012, + SAY_SATH_SPELL_2 = -1580013, + SAY_SATH_SLAY_1 = -1580014, + SAY_SATH_SLAY_2 = -1580015, SAY_SATH_ENRAGE = -1580016, //Kalecgos SPELL_SPECTRAL_BLAST_DUMMY = 44869, SPELL_SPECTRAL_BLAST = 44866, + SPELL_TELEPORT_SPECTRAL_REALM = 46019, SPELL_ARCANE_BUFFET = 45018, SPELL_FROST_BREATH = 44799, + SPELL_TAIL_LASH = 45122, + SPELL_CRAZED_RAGE = 44807, + SPELL_TRANSFORM = 44670, + + // Kalecgos human SPELL_HEROIC_STRIKE = 45026, SPELL_REVITALIZE = 45027, - SPELL_TAIL_LASH = 45122, - SPELL_TRANSFORM_KALEC = 45027, - SPELL_CRAZED_RAGE = 44806, // this should be 44807 instead //Sathrovarr SPELL_SPECTRAL_INVIS = 44801, @@ -70,9 +73,7 @@ enum KalecgosEncounter SPELL_BANISH = 44836 }; -uint32 WildMagic[]= { 44978, 45001, 45002, 45004, 45006, 45010 }; - -const float KALECGOS_ARENA[3] = { 1704.34f, 928.17f, 53.08f }; +static const uint32 aWildMagicSpells[]= {44978, 45001, 45002, 45004, 45006, 45010}; //#define NOTIFY_SPECTRALLY_EXHAUSTED "Your body is too exhausted to travel to the Spectral Realm." @@ -80,18 +81,11 @@ struct MANGOS_DLL_DECL boss_kalecgosAI : public ScriptedAI { boss_kalecgosAI(Creature* pCreature) : ScriptedAI(pCreature) { - m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - - /*if (pCreature->getFaction() != 14) - { - error_db_log("SD2: creature entry %u has faction %u but spellId %u requires different.", pCreature->GetEntry(), pCreature->getFaction(), SPELL_SPECTRAL_REALM_FORCE_FACTION); - pCreature->setFaction(14); - }*/ - + m_pInstance = (instance_sunwell_plateau*)pCreature->GetInstanceData(); Reset(); } - ScriptedInstance* m_pInstance; + instance_sunwell_plateau* m_pInstance; uint32 m_uiArcaneBuffetTimer; uint32 m_uiFrostBreathTimer; @@ -99,10 +93,10 @@ struct MANGOS_DLL_DECL boss_kalecgosAI : public ScriptedAI uint32 m_uiSpectralBlastTimer; uint32 m_uiExitTimer; - bool m_bUncorrupted; - bool m_bBanished; + bool m_bIsUncorrupted; + bool m_bIsBanished; bool m_bChecked; - bool m_bEnraged; + bool m_bIsEnraged; bool m_bHasSpectralTarget; void Reset() @@ -114,11 +108,11 @@ struct MANGOS_DLL_DECL boss_kalecgosAI : public ScriptedAI m_uiExitTimer = 0; - m_bUncorrupted = false; - m_bBanished = false; - m_bChecked = false; - m_bEnraged = false; - m_bHasSpectralTarget = false; + m_bIsUncorrupted = false; + m_bIsBanished = false; + m_bChecked = false; + m_bIsEnraged = false; + m_bHasSpectralTarget = false; } void JustReachedHome() @@ -132,11 +126,11 @@ struct MANGOS_DLL_DECL boss_kalecgosAI : public ScriptedAI pSath->AI()->EnterEvadeMode(); } - m_pInstance->SetData(TYPE_KALECGOS, NOT_STARTED); + m_pInstance->SetData(TYPE_KALECGOS, FAIL); } } - void Aggro(Unit* who) + void Aggro(Unit* pWho) { DoScriptText(SAY_EVIL_AGGRO, m_creature); @@ -144,20 +138,20 @@ struct MANGOS_DLL_DECL boss_kalecgosAI : public ScriptedAI m_pInstance->SetData(TYPE_KALECGOS, IN_PROGRESS); } - void DamageTaken(Unit* done_by, uint32 &damage) + void DamageTaken(Unit* pDoneBy, uint32 &uiDamage) { - if (damage >= m_creature->GetHealth() && done_by != m_creature) + if (uiDamage >= m_creature->GetHealth()) { - if (!m_bUncorrupted) + if (!m_bIsUncorrupted) { - damage = 0; - m_bBanished = true; - DoCastSpellIfCan(m_creature, SPELL_BANISH, true); + uiDamage = 0; + m_bIsBanished = true; + DoCastSpellIfCan(m_creature, SPELL_BANISH, CAST_TRIGGERED); m_creature->GetMotionMaster()->MoveIdle(); } else { - damage = 0; + uiDamage = 0; BeginOutro(); } } @@ -165,16 +159,14 @@ struct MANGOS_DLL_DECL boss_kalecgosAI : public ScriptedAI void KilledUnit(Unit* pVictim) { - DoScriptText(urand(0, 1) ? SAY_EVIL_SLAY1 : SAY_EVIL_SLAY2, m_creature); + DoScriptText(urand(0, 1) ? SAY_EVIL_SLAY_1 : SAY_EVIL_SLAY_2, m_creature); } void SendToInnerVeil(Unit* pTarget) { if (m_pInstance) { - //just a hack for not implemented spell effect 144 - ((Player*)pTarget)->TeleportTo(pTarget->GetMapId(), pTarget->GetPositionX(), pTarget->GetPositionY(), pTarget->GetPositionZ()-125.0f, pTarget->GetOrientation()); - + pTarget->CastSpell(pTarget, SPELL_TELEPORT_SPECTRAL_REALM, true); pTarget->CastSpell(pTarget, SPELL_SPECTRAL_REALM_FORCE_FACTION, true); pTarget->CastSpell(pTarget, SPELL_SPECTRAL_REALM, true); @@ -189,7 +181,7 @@ struct MANGOS_DLL_DECL boss_kalecgosAI : public ScriptedAI if (pTarget->GetTypeId() != TYPEID_PLAYER) return; - if (pTarget->HasAura(SPELL_SPECTRAL_EXHAUSTION, EFFECT_INDEX_0) || pTarget->HasAura(SPELL_SPECTRAL_REALM)) + if (pTarget->HasAura(SPELL_SPECTRAL_EXHAUSTION) || pTarget->HasAura(SPELL_SPECTRAL_REALM)) return; if (pTarget == m_creature->getVictim()) @@ -213,7 +205,7 @@ struct MANGOS_DLL_DECL boss_kalecgosAI : public ScriptedAI { if (pSathrovarr->isAlive()) { - pSathrovarr->NearTeleportTo(KALECGOS_ARENA[0], KALECGOS_ARENA[1], KALECGOS_ARENA[2], 0.0f); + pSathrovarr->CastSpell(pSathrovarr, SPELL_TELEPORT_NORMAL_REALM, true); pSathrovarr->DealDamage(pSathrovarr, pSathrovarr->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); } } @@ -230,12 +222,12 @@ struct MANGOS_DLL_DECL boss_kalecgosAI : public ScriptedAI m_uiExitTimer = 1000; } - void MovementInform(uint32 type, uint32 id) + void MovementInform(uint32 uiMotionType, uint32 uiPointId) { - if (type != POINT_MOTION_TYPE) + if (uiMotionType != POINT_MOTION_TYPE) return; - if (id) + if (uiPointId) { if (m_pInstance) m_pInstance->SetData(TYPE_KALECGOS, DONE); @@ -245,12 +237,15 @@ struct MANGOS_DLL_DECL boss_kalecgosAI : public ScriptedAI } } - void UpdateAI(const uint32 diff) + void UpdateAI(const uint32 uiDiff) { - if (!m_creature->getVictim() || !m_creature->SelectHostileTarget() || m_bBanished) + if (!m_creature->getVictim() || !m_creature->SelectHostileTarget()) return; - if (!m_bEnraged && m_creature->GetHealthPercent() < 10.0f) + if (m_bIsBanished) + return; + + if (!m_bIsEnraged && m_creature->GetHealthPercent() < 10.0f) { if (Creature* pSathrovarr = m_pInstance->GetSingleCreatureFromStorage(NPC_SATHROVARR)) { @@ -259,17 +254,17 @@ struct MANGOS_DLL_DECL boss_kalecgosAI : public ScriptedAI } m_creature->CastSpell(m_creature, SPELL_CRAZED_RAGE, true); - m_bEnraged = true; + m_bIsEnraged = true; } if (!m_bChecked && m_creature->GetHealthPercent() < 1.0f) { m_bChecked = true; - if (!m_bUncorrupted) + if (!m_bIsUncorrupted) { - m_bBanished = true; - DoCastSpellIfCan(m_creature, SPELL_BANISH, true); + m_bIsBanished = true; + DoCastSpellIfCan(m_creature, SPELL_BANISH, CAST_TRIGGERED); m_creature->GetMotionMaster()->MoveIdle(); } else @@ -278,7 +273,7 @@ struct MANGOS_DLL_DECL boss_kalecgosAI : public ScriptedAI if (m_uiExitTimer) { - if (m_uiExitTimer <= diff) + if (m_uiExitTimer <= uiDiff) { debug_log("SD2: KALEC: Exiting the arena"); @@ -289,56 +284,58 @@ struct MANGOS_DLL_DECL boss_kalecgosAI : public ScriptedAI m_creature->GetMotionMaster()->MovePoint(1, x, y, z); m_uiExitTimer = 0; - }else m_uiExitTimer -= diff; + } + else + m_uiExitTimer -= uiDiff; } - if (m_uiArcaneBuffetTimer < diff) + if (m_uiArcaneBuffetTimer < uiDiff) { if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_ARCANE_BUFFET) == CAST_OK) { if (!urand(0, 2)) - DoScriptText(SAY_EVIL_SPELL1, m_creature); + DoScriptText(SAY_EVIL_SPELL_1, m_creature); m_uiArcaneBuffetTimer = 20000; } } else - m_uiArcaneBuffetTimer -= diff; + m_uiArcaneBuffetTimer -= uiDiff; - if (m_uiFrostBreathTimer < diff) + if (m_uiFrostBreathTimer < uiDiff) { if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_FROST_BREATH) == CAST_OK) { if (!urand(0, 1)) - DoScriptText(SAY_EVIL_SPELL2, m_creature); + DoScriptText(SAY_EVIL_SPELL_2, m_creature); m_uiFrostBreathTimer = 25000; } } else - m_uiFrostBreathTimer -= diff; + m_uiFrostBreathTimer -= uiDiff; - if (m_uiWildMagicTimer < diff) + if (m_uiWildMagicTimer < uiDiff) { - if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) - DoCastSpellIfCan(target, WildMagic[rand()%6]); - - m_uiWildMagicTimer = 19000; + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, aWildMagicSpells[urand(0, 5)]) == CAST_OK) + m_uiWildMagicTimer = 19000; + } } else - m_uiWildMagicTimer -= diff; + m_uiWildMagicTimer -= uiDiff; - if (m_uiSpectralBlastTimer < diff) + if (m_uiSpectralBlastTimer < uiDiff) { m_bHasSpectralTarget = false; - m_creature->CastSpell(m_creature, SPELL_SPECTRAL_BLAST_DUMMY, false); + DoCastSpellIfCan(m_creature, SPELL_SPECTRAL_BLAST_DUMMY); m_uiSpectralBlastTimer = 30000; } else - m_uiSpectralBlastTimer -= diff; + m_uiSpectralBlastTimer -= uiDiff; - if (!m_bBanished) - DoMeleeAttackIfReady(); + DoMeleeAttackIfReady(); } }; @@ -346,52 +343,50 @@ struct MANGOS_DLL_DECL boss_sathrovarrAI : public ScriptedAI { boss_sathrovarrAI(Creature* pCreature) : ScriptedAI(pCreature) { - m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_pInstance = (instance_sunwell_plateau*)pCreature->GetInstanceData(); Reset(); } - ScriptedInstance* m_pInstance; + instance_sunwell_plateau* m_pInstance; - uint32 CorruptingStrikeTimer; - uint32 CurseOfBoundlessAgonyTimer; - uint32 ShadowBoltVolleyTimer; - bool m_bBanished; - bool m_bEnraged; + uint32 m_uiCorruptingStrikeTimer; + uint32 m_uiCurseOfBoundlessAgonyTimer; + uint32 m_uiShadowBoltVolleyTimer; + bool m_bIsBanished; + bool m_bIsEnraged; void Reset() { // FIXME: Timers - CorruptingStrikeTimer = 5000; - CurseOfBoundlessAgonyTimer = 15000; - ShadowBoltVolleyTimer = 10000; + m_uiCorruptingStrikeTimer = 5000; + m_uiCurseOfBoundlessAgonyTimer = 15000; + m_uiShadowBoltVolleyTimer = 10000; - m_bBanished = false; - m_bEnraged = false; + m_bIsBanished = false; + m_bIsEnraged = false; - m_creature->CastSpell(m_creature, SPELL_SPECTRAL_INVIS, true); + DoCastSpellIfCan(m_creature, SPELL_SPECTRAL_INVIS); } - void Aggro(Unit* who) + void Aggro(Unit* pWho) { DoScriptText(SAY_SATH_AGGRO, m_creature); if (!m_pInstance) return; + // Human Kalec starts to attack too if (Creature* pKalec = m_pInstance->GetSingleCreatureFromStorage(NPC_KALECGOS_HUMAN)) - { - m_creature->AddThreat(pKalec, 10000000.0f); - pKalec->AddThreat(m_creature, 10000000.0f); - } + pKalec->AI()->AttackStart(m_creature); } - void DamageTaken(Unit* done_by, uint32 &damage) + void DamageTaken(Unit* pDoneBy, uint32 &uiDamage) { - if (damage > m_creature->GetHealth()) + if (uiDamage > m_creature->GetHealth()) { - damage = 0; + uiDamage = 0; DoCastSpellIfCan(m_creature, SPELL_BANISH, CAST_TRIGGERED); - m_bBanished = true; + m_bIsBanished = true; DoScriptText(SAY_SATH_DEATH, m_creature); @@ -405,23 +400,26 @@ struct MANGOS_DLL_DECL boss_sathrovarrAI : public ScriptedAI if (boss_kalecgosAI* pKalecgosAI = dynamic_cast(pKalecgos->AI())) { pKalecgosAI->m_bChecked = false; - pKalecgosAI->m_bUncorrupted = true; + pKalecgosAI->m_bIsUncorrupted = true; } } } } - void KilledUnit(Unit* victim) + void KilledUnit(Unit* pVictim) { - DoScriptText(urand(0, 1) ? SAY_SATH_SLAY1 : SAY_SATH_SLAY2, m_creature); + DoScriptText(urand(0, 1) ? SAY_SATH_SLAY_1 : SAY_SATH_SLAY_2, m_creature); } - void UpdateAI(const uint32 diff) + void UpdateAI(const uint32 uiDiff) { - if (!m_creature->getVictim() || !m_creature->SelectHostileTarget() || m_bBanished) + if (!m_creature->getVictim() || !m_creature->SelectHostileTarget()) return; - if (!m_bEnraged && m_creature->GetHealthPercent() < 10.0f) + if (m_bIsBanished) + return; + + if (!m_bIsEnraged && m_creature->GetHealthPercent() < 10.0f) { if (Creature* pKalecgos = m_pInstance->GetSingleCreatureFromStorage(NPC_KALECGOS_DRAGON)) { @@ -430,34 +428,45 @@ struct MANGOS_DLL_DECL boss_sathrovarrAI : public ScriptedAI } m_creature->CastSpell(m_creature, SPELL_CRAZED_RAGE, true); - m_bEnraged = true; + m_bIsEnraged = true; } - if (CorruptingStrikeTimer < diff) + if (m_uiCorruptingStrikeTimer < uiDiff) { - if (!urand(0, 1)) - DoScriptText(SAY_SATH_SPELL2, m_creature); + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_CORRUPTING_STRIKE) == CAST_OK) + { + if (!urand(0, 1)) + DoScriptText(SAY_SATH_SPELL_2, m_creature); - DoCastSpellIfCan(m_creature->getVictim(), SPELL_CORRUPTING_STRIKE); - CorruptingStrikeTimer = 13000; - }else CorruptingStrikeTimer -= diff; + m_uiCorruptingStrikeTimer = 13000; + } + } + else + m_uiCorruptingStrikeTimer -= uiDiff; - if (CurseOfBoundlessAgonyTimer < diff) + if (m_uiCurseOfBoundlessAgonyTimer < uiDiff) { if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) - DoCastSpellIfCan(pTarget, SPELL_CURSE_OF_BOUNDLESS_AGONY); - - CurseOfBoundlessAgonyTimer = 35000; - }else CurseOfBoundlessAgonyTimer -= diff; + { + if (DoCastSpellIfCan(pTarget, SPELL_CURSE_OF_BOUNDLESS_AGONY) == CAST_OK) + m_uiCurseOfBoundlessAgonyTimer = 35000; + } + } + else + m_uiCurseOfBoundlessAgonyTimer -= uiDiff; - if (ShadowBoltVolleyTimer < diff) + if (m_uiShadowBoltVolleyTimer < uiDiff) { - if (!urand(0, 1)) - DoScriptText(SAY_SATH_SPELL1, m_creature); + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_SHADOW_BOLT_VOLLEY) == CAST_OK) + { + if (!urand(0, 1)) + DoScriptText(SAY_SATH_SPELL_1, m_creature); - DoCastSpellIfCan(m_creature->getVictim(), SPELL_SHADOW_BOLT_VOLLEY); - ShadowBoltVolleyTimer = 15000; - }else ShadowBoltVolleyTimer -= diff; + m_uiShadowBoltVolleyTimer = 15000; + } + } + else + m_uiShadowBoltVolleyTimer -= uiDiff; DoMeleeAttackIfReady(); } @@ -467,114 +476,90 @@ struct MANGOS_DLL_DECL boss_kalecgos_humanoidAI : public ScriptedAI { boss_kalecgos_humanoidAI(Creature* pCreature) : ScriptedAI(pCreature) { - m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_pInstance = (instance_sunwell_plateau*)pCreature->GetInstanceData(); Reset(); } - ScriptedInstance* m_pInstance; + instance_sunwell_plateau* m_pInstance; - uint32 RevitalizeTimer; - uint32 HeroicStrikeTimer; + uint32 m_uiRevitalizeTimer; + uint32 m_uiHeroicStrikeTimer; - bool HasYelled10Percent; - bool HasYelled20Percent; + bool m_bHasYelled10Percent; + bool m_bHasYelled20Percent; void Reset() { //TODO: Times! - RevitalizeTimer = 30000; - HeroicStrikeTimer = 8000; + m_uiRevitalizeTimer = 30000; + m_uiHeroicStrikeTimer = 8000; - HasYelled10Percent = false; - HasYelled20Percent = false; + m_bHasYelled10Percent = false; + m_bHasYelled20Percent = false; - m_creature->CastSpell(m_creature, SPELL_SPECTRAL_INVIS, true); + DoCastSpellIfCan(m_creature, SPELL_SPECTRAL_INVIS); } - void Aggro(Unit* who) + void Aggro(Unit* pWho) { DoScriptText(SAY_GOOD_AGGRO, m_creature); } - void JustDied(Unit* killer) + void JustDied(Unit* pKiller) { // Whatever happens when Kalec (Half-elf) dies } - void UpdateAI(const uint32 diff) + void UpdateAI(const uint32 uiDiff) { if (!m_creature->getVictim() || !m_creature->SelectHostileTarget()) return; - if (RevitalizeTimer < diff) + if (m_uiRevitalizeTimer < uiDiff) { - if (m_pInstance) - { - /*Player* pPlayer = m_creature->GetMap()->GetPlayer(m_pInstance->GetGuid(DATA_RANDOM_SPECTRAL_PLAYER)); - if (pPlayer) - DoCastSpellIfCan(pPlayer, SPELL_REVITALIZE);*/ - RevitalizeTimer = 30000; - } - }else RevitalizeTimer -= diff; + // Cast on self because spell has target "all friendly units around the caster" + if (DoCastSpellIfCan(m_creature, SPELL_REVITALIZE) == CAST_OK) + m_uiRevitalizeTimer = 30000; + } + else + m_uiRevitalizeTimer -= uiDiff; - if (HeroicStrikeTimer < diff) + if (m_uiHeroicStrikeTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_HEROIC_STRIKE); - HeroicStrikeTimer = 30000; - }else HeroicStrikeTimer -= diff; + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_HEROIC_STRIKE) == CAST_OK) + m_uiHeroicStrikeTimer = 30000; + } + else + m_uiHeroicStrikeTimer -= uiDiff; - if (m_creature->GetHealthPercent() < 20.0f && !HasYelled20Percent) + if (m_creature->GetHealthPercent() < 20.0f && !m_bHasYelled20Percent) { - DoScriptText(SAY_GOOD_NEAR_DEATH, m_creature); - HasYelled20Percent = true; + DoScriptText(SAY_GOOD_NEAR_DEATH_20, m_creature); + m_bHasYelled20Percent = true; } - if (m_creature->GetHealthPercent() < 10.0f && !HasYelled10Percent) + if (m_creature->GetHealthPercent() < 10.0f && !m_bHasYelled10Percent) { - DoScriptText(SAY_GOOD_NEAR_DEATH2, m_creature); - HasYelled10Percent = true; + DoScriptText(SAY_GOOD_NEAR_DEATH_10, m_creature); + m_bHasYelled10Percent = true; } + + DoMeleeAttackIfReady(); } }; bool GOUse_go_spectral_rift(Player* pPlayer, GameObject* pGo) { - if (pGo->GetGoType() != GAMEOBJECT_TYPE_GOOBER) - return true; - - if (ScriptedInstance* pInstance = (ScriptedInstance*)pPlayer->GetInstanceData()) + if (instance_sunwell_plateau* pInstance = (instance_sunwell_plateau*)pPlayer->GetInstanceData()) { - if (pPlayer->HasAura(SPELL_SPECTRAL_EXHAUSTION, EFFECT_INDEX_0)) + if (pPlayer->HasAura(SPELL_SPECTRAL_EXHAUSTION)) return true; // Make them able to see Sathrovarr (he's invisible for some reason). Also, when this buff wears off, they get teleported back to Normal Realm (this is handled by Instance Script) - pPlayer->CastSpell(pPlayer, SPELL_TELEPORT_TO_SPECTRAL_REALM, true); + pPlayer->CastSpell(pPlayer, SPELL_TELEPORT_SPECTRAL_REALM, true); pPlayer->CastSpell(pPlayer, SPELL_SPECTRAL_REALM_FORCE_FACTION, true); pPlayer->CastSpell(pPlayer, SPELL_SPECTRAL_REALM, true); - // Add player to pSath's threat list - /*if (Creature* pSath = pInstance->GetSingleCreatureFromStorage(NPC_KALECGOS_DRAGON)) ++ TODO might contain typos - { - if (pSath->isAlive()) - { - debug_log("SD2: Adding %s in pSath' threatlist", pPlayer->GetName()); - pSath->AddThreat(pPlayer); - } - } - - // Remove player from Sathrovarr's threat list - if (Creature* pKalecgos = pInstance->GetSingleCreatureFromStorage(NPC_SATHROVARR)) ++ TODO might contain typos - { - if (pKalecgos->isAlive()) - { - if (HostileReference* pRef = pKalecgos->getThreatManager().getOnlineContainer().getReferenceByTarget(pPlayer)) - { - pRef->removeReference(); - debug_log("SD2: Deleting %s from pKalecgos's threatlist", pPlayer->GetName()); - } - } - }*/ - pInstance->SetGuid(DATA_PLAYER_SPECTRAL_REALM, pPlayer->GetObjectGuid()); } @@ -601,22 +586,22 @@ void AddSC_boss_kalecgos() Script* pNewScript; pNewScript = new Script; - pNewScript->GetAI = &GetAI_boss_kalecgos; pNewScript->Name = "boss_kalecgos"; + pNewScript->GetAI = &GetAI_boss_kalecgos; pNewScript->RegisterSelf(); pNewScript = new Script; - pNewScript->GetAI = &GetAI_boss_sathrovarr; pNewScript->Name = "boss_sathrovarr"; + pNewScript->GetAI = &GetAI_boss_sathrovarr; pNewScript->RegisterSelf(); pNewScript = new Script; - pNewScript->GetAI = &GetAI_boss_kalecgos_humanoid; pNewScript->Name = "boss_kalecgos_humanoid"; + pNewScript->GetAI = &GetAI_boss_kalecgos_humanoid; pNewScript->RegisterSelf(); pNewScript = new Script; - pNewScript->pGOUse = &GOUse_go_spectral_rift; pNewScript->Name = "go_spectral_rift"; + pNewScript->pGOUse = &GOUse_go_spectral_rift; pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/sunwell_plateau/instance_sunwell_plateau.cpp b/scripts/eastern_kingdoms/sunwell_plateau/instance_sunwell_plateau.cpp index 01a8d1db0..d554c0996 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/instance_sunwell_plateau.cpp +++ b/scripts/eastern_kingdoms/sunwell_plateau/instance_sunwell_plateau.cpp @@ -121,7 +121,7 @@ void instance_sunwell_plateau::SetData(uint32 uiType, uint32 uiData) DoUseDoorOrButton(GO_BOSS_COLLISION_1); DoUseDoorOrButton(GO_BOSS_COLLISION_2); if (uiData == IN_PROGRESS) - SpectralRealmList.clear(); + m_lSpectralRealmList.clear(); break; case TYPE_BRUTALLUS: m_auiEncounter[uiType] = uiData; @@ -179,7 +179,7 @@ void instance_sunwell_plateau::SetData(uint32 uiType, uint32 uiData) void instance_sunwell_plateau::SetData64(uint32 uiType, uint64 uiData) { if (uiType == DATA_PLAYER_SPECTRAL_REALM) - SpectralRealmList.push_back(ObjectGuid(uiData)); + m_lSpectralRealmList.push_back(ObjectGuid(uiData)); } uint32 instance_sunwell_plateau::GetData(uint32 uiType) @@ -190,56 +190,24 @@ uint32 instance_sunwell_plateau::GetData(uint32 uiType) return 0; } -void instance_sunwell_plateau::EjectPlayer(Player* pPlayer) +void instance_sunwell_plateau::DoEjectSpectralRealmPlayers() { - debug_log("SD2: Ejecting Player %s from Spectral Realm", pPlayer->GetName()); - - // Put player back in Kalecgos(Dragon)'s threat list - /*if (Creature* pKalecgos = GetSingleCreatureFromStorage(NPC_KALECGOS_DRAGON)) - { - if (pKalecgos->isAlive()) - { - debug_log("SD2: Adding %s in Kalecgos' threatlist", pPlayer->GetName()); - pKalecgos->AddThreat(pPlayer); - } - } - - // Remove player from Sathrovarr's threat list - if (Creature* pSath = instance->GetCreature(NPC_SATHROVARR)) - { - if (pSath->isAlive()) - { - if (HostileReference* pRef = pSath->getThreatManager().getOnlineContainer().getReferenceByTarget(pPlayer)) - { - pRef->removeReference(); - debug_log("SD2: Deleting %s from Sathrovarr's threatlist", pPlayer->GetName()); - } - } - }*/ - - pPlayer->CastSpell(pPlayer, SPELL_SPECTRAL_EXHAUSTION, true); - pPlayer->CastSpell(pPlayer, SPELL_TELEPORT_NORMAL_REALM, true); -} - -void instance_sunwell_plateau::EjectPlayers() -{ - if (SpectralRealmList.empty()) + if (m_lSpectralRealmList.empty()) return; Map::PlayerList const& players = instance->GetPlayers(); for(Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr) { - Player* plr = itr->getSource(); + Player* pPlayer = itr->getSource(); - if (plr && !plr->HasAura(SPELL_SPECTRAL_REALM)) + if (pPlayer && !pPlayer->HasAura(SPELL_SPECTRAL_REALM)) { - SpectralRealmList.remove(plr->GetObjectGuid()); - EjectPlayer(plr); + m_lSpectralRealmList.remove(pPlayer->GetObjectGuid()); + pPlayer->CastSpell(pPlayer, SPELL_SPECTRAL_EXHAUSTION, true); + pPlayer->CastSpell(pPlayer, SPELL_TELEPORT_NORMAL_REALM, true); } } - - //SpectralRealmList.clear(); } void instance_sunwell_plateau::Update(uint32 uiDiff) @@ -249,7 +217,7 @@ void instance_sunwell_plateau::Update(uint32 uiDiff) { if (m_uiSpectralRealmTimer <= uiDiff) { - EjectPlayers(); + DoEjectSpectralRealmPlayers(); m_uiSpectralRealmTimer = 1000; } else diff --git a/scripts/eastern_kingdoms/sunwell_plateau/sunwell_plateau.h b/scripts/eastern_kingdoms/sunwell_plateau/sunwell_plateau.h index 91f52d508..80bc91e1e 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/sunwell_plateau.h +++ b/scripts/eastern_kingdoms/sunwell_plateau/sunwell_plateau.h @@ -51,7 +51,6 @@ enum // spells related to kalecgos event SPELL_SPECTRAL_REALM = 46021, SPELL_TELEPORT_NORMAL_REALM = 46020, - SPELL_TELEPORT_TO_SPECTRAL_REALM = 46019, SPELL_SPECTRAL_EXHAUSTION = 44867, SPELL_SPECTRAL_REALM_FORCE_FACTION = 44852, @@ -81,8 +80,7 @@ class MANGOS_DLL_DECL instance_sunwell_plateau : public ScriptedInstance void Load(const char* chrIn); protected: - void EjectPlayer(Player* pPlayer); - void EjectPlayers(); + void DoEjectSpectralRealmPlayers(); uint32 m_auiEncounter[MAX_ENCOUNTER]; std::string m_strInstData; @@ -90,6 +88,6 @@ class MANGOS_DLL_DECL instance_sunwell_plateau : public ScriptedInstance // Misc uint32 m_uiSpectralRealmTimer; uint32 m_uiMuruBerserkTimer; - GUIDList SpectralRealmList; + GUIDList m_lSpectralRealmList; }; #endif diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 60b12a876..790a99619 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2334" + #define SD2_REVISION_NR "2335" #endif // __SD2_REVISION_NR_H__ From c17ea91491c1dd2f6110db28827713b4cbff0cea Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Thu, 17 Nov 2011 18:39:28 +0100 Subject: [PATCH 0320/1172] [2336] Remove obsolete Add handling for Faerlina, thanks to Xfurry for pointing --- scripts/northrend/naxxramas/instance_naxxramas.cpp | 14 -------------- scripts/northrend/naxxramas/naxxramas.h | 5 ----- sd2_revision_nr.h | 2 +- 3 files changed, 1 insertion(+), 20 deletions(-) diff --git a/scripts/northrend/naxxramas/instance_naxxramas.cpp b/scripts/northrend/naxxramas/instance_naxxramas.cpp index 75106cb78..1be9d7d25 100644 --- a/scripts/northrend/naxxramas/instance_naxxramas.cpp +++ b/scripts/northrend/naxxramas/instance_naxxramas.cpp @@ -75,11 +75,6 @@ void instance_naxxramas::OnCreatureCreate(Creature* pCreature) case NPC_SUB_BOSS_TRIGGER: m_lGothTriggerList.push_back(pCreature->GetObjectGuid()); break; case NPC_TESLA_COIL: m_lThadTeslaCoilList.push_back(pCreature->GetObjectGuid()); break; - - case NPC_NAXXRAMAS_FOLLOWER: - case NPC_NAXXRAMAS_WORSHIPPER: - m_lFaerlinaAddGUIDs.push_back(pCreature->GetObjectGuid()); - break; } } @@ -270,15 +265,6 @@ void instance_naxxramas::SetData(uint32 uiType, uint32 uiData) DoUseDoorOrButton(GO_ARAC_FAER_DOOR); DoUseDoorOrButton(GO_ARAC_MAEX_OUTER_DOOR); } - if (uiData == FAIL) - { - for (GUIDList::const_iterator itr = m_lFaerlinaAddGUIDs.begin(); itr != m_lFaerlinaAddGUIDs.end(); ++itr) - { - Creature* pAdd = instance->GetCreature(*itr); - if (pAdd && !pAdd->isAlive()) - pAdd->Respawn(); - } - } m_auiEncounter[uiType] = uiData; break; case TYPE_MAEXXNA: diff --git a/scripts/northrend/naxxramas/naxxramas.h b/scripts/northrend/naxxramas/naxxramas.h index 44f11208a..d9eecc3ae 100644 --- a/scripts/northrend/naxxramas/naxxramas.h +++ b/scripts/northrend/naxxramas/naxxramas.h @@ -76,10 +76,6 @@ enum NPC_THE_LICHKING = 16980, NPC_MR_BIGGLESWORTH = 16998, - // Faerlina - NPC_NAXXRAMAS_FOLLOWER = 16505, - NPC_NAXXRAMAS_WORSHIPPER = 16506, - // Gothik NPC_GOTHIK = 16060, NPC_SUB_BOSS_TRIGGER = 16137, //summon locations @@ -238,7 +234,6 @@ class MANGOS_DLL_DECL instance_naxxramas : public ScriptedInstance std::string m_strInstData; GUIDList m_lThadTeslaCoilList; - GUIDList m_lFaerlinaAddGUIDs; GUIDList m_lGothTriggerList; UNORDERED_MAP m_mGothTriggerMap; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 790a99619..7338e5c18 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2335" + #define SD2_REVISION_NR "2336" #endif // __SD2_REVISION_NR_H__ From a0987e721347d7247f22e80dc78738618d88327e Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Sun, 20 Mar 2011 17:13:50 +0100 Subject: [PATCH 0321/1172] [2337] Fix Patchwerk's Hateful strike. Thanks to gzor for research --- .../northrend/naxxramas/boss_patchwerk.cpp | 35 ++++++++++++------- sd2_revision_nr.h | 2 +- 2 files changed, 23 insertions(+), 14 deletions(-) diff --git a/scripts/northrend/naxxramas/boss_patchwerk.cpp b/scripts/northrend/naxxramas/boss_patchwerk.cpp index 2d89dfb4b..95209b257 100644 --- a/scripts/northrend/naxxramas/boss_patchwerk.cpp +++ b/scripts/northrend/naxxramas/boss_patchwerk.cpp @@ -103,28 +103,37 @@ struct MANGOS_DLL_DECL boss_patchwerkAI : public ScriptedAI // The ability is used on highest HP target choosen of the top 2 (3 heroic) targets on threat list being in melee range Unit* pTarget = NULL; uint32 uiHighestHP = 0; - uint32 uiTargets = m_bIsRegularMode ? 2 : 3; + uint32 uiTargets = m_bIsRegularMode ? 1 : 2; ThreatList const& tList = m_creature->getThreatManager().getThreatList(); - for (ThreatList::const_iterator iter = tList.begin();iter != tList.end(); ++iter) + if (tList.size() > 1) // Check if more than two targets, and start loop with second-most aggro { - if (!uiTargets) - break; - - if (Unit* pTempTarget = m_creature->GetMap()->GetUnit((*iter)->getUnitGuid())) + ThreatList::const_iterator iter = tList.begin(); + std::advance(iter, 1); + for (; iter != tList.end(); ++iter) { - if (pTempTarget->GetHealth() > uiHighestHP && m_creature->CanReachWithMeleeAttack(pTempTarget)) + if (!uiTargets) + break; + + if (Unit* pTempTarget = m_creature->GetMap()->GetUnit((*iter)->getUnitGuid())) { - uiHighestHP = pTempTarget->GetHealth(); - pTarget = pTempTarget; + if (m_creature->CanReachWithMeleeAttack(pTempTarget)) + { + if (pTempTarget->GetHealth() > uiHighestHP) + { + uiHighestHP = pTempTarget->GetHealth(); + pTarget = pTempTarget; + } + --uiTargets; + } } } - - --uiTargets; } - if (pTarget) - DoCastSpellIfCan(pTarget, m_bIsRegularMode ? SPELL_HATEFULSTRIKE : SPELL_HATEFULSTRIKE_H); + if (!pTarget) + pTarget = m_creature->getVictim(); + + DoCastSpellIfCan(pTarget, m_bIsRegularMode ? SPELL_HATEFULSTRIKE : SPELL_HATEFULSTRIKE_H); } void UpdateAI(const uint32 uiDiff) diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 7338e5c18..9b4124aa3 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2336" + #define SD2_REVISION_NR "2337" #endif // __SD2_REVISION_NR_H__ From 8e9e9f23d0fef30c8a0f7fba219bee31e07626c5 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Thu, 17 Nov 2011 23:36:06 +0100 Subject: [PATCH 0322/1172] [2338] Implement basic script for Lord Jaraxxus Signed-off-by: Schmoozerd --- .../trial_of_the_crusader/boss_jaraxxus.cpp | 158 +++++++++++++++++- sd2_revision_nr.h | 2 +- 2 files changed, 158 insertions(+), 2 deletions(-) diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_jaraxxus.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_jaraxxus.cpp index 0b30df27c..3c6eb9614 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_jaraxxus.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_jaraxxus.cpp @@ -37,6 +37,23 @@ enum SAY_INCINERATE = -1649045, SAY_MISTRESS = -1649046, SAY_INFERNO = -1649047, + + // boss spells + SPELL_FEL_FIREBALL = 66532, + SPELL_FEL_LIGHTNING = 66528, + SPELL_INCINERATE_FLESH = 66237, + SPELL_BURNING_INFERNO = 66242, + SPELL_LEGION_FLAME = 66197, + SPELL_INFERNAL_ERUPTION = 66258, // summons a volcano + SPELL_NETHER_PORTAL_SUMMON = 66269, // summons a nether portal + SPELL_NETHER_PORTAL = 66263, // spell casted by the portal + SPELL_ERUPTION = 66252, // spell casted by the volcano + SPELL_NETHER_POWER = 67009, + SPELL_BERSERK = 26662, + + // npcs + NPC_INFERNAL_VOLCANO = 34813, + NPC_NETHER_PORTAL = 34825 }; struct MANGOS_DLL_DECL boss_jaraxxusAI : public ScriptedAI @@ -49,7 +66,28 @@ struct MANGOS_DLL_DECL boss_jaraxxusAI : public ScriptedAI ScriptedInstance* m_pInstance; - void Reset() {} + uint32 m_uiFelFireballTimer; + uint32 m_uiFelLightningTimer; + uint32 m_uiIncinerateFleshTimer; + uint32 m_uiBurningInfernoTimer; + uint32 m_uiLegionFlameTimer; + uint32 m_uiSummonTimer; + uint32 m_uiNetherPowerTimer; + uint32 m_uiBerserkTimer; + bool m_bVolcanoSummon; + + void Reset() + { + m_uiFelFireballTimer = urand(20000, 25000); // maybe too early, and too often! + m_uiFelLightningTimer = urand(5000, 8000); + m_uiIncinerateFleshTimer = 25000; + m_uiLegionFlameTimer = 10000; + m_uiSummonTimer = 20000; + m_uiNetherPowerTimer = urand(20000, 30000); + m_uiBerserkTimer = 10*MINUTE*IN_MILLISECONDS; + + m_bVolcanoSummon = true; + } void JustReachedHome() { @@ -65,17 +103,135 @@ struct MANGOS_DLL_DECL boss_jaraxxusAI : public ScriptedAI void Aggro(Unit* pWho) { + if (pWho->GetEntry() == NPC_FIZZLEBANG) + return; + if (m_pInstance) m_pInstance->SetData(TYPE_JARAXXUS, IN_PROGRESS); + DoCastSpellIfCan(m_creature, SPELL_NETHER_POWER); m_creature->SetInCombatWithZone(); } + void KilledUnit(Unit* pVictim) + { + if (pVictim->GetEntry() == NPC_FIZZLEBANG) + return; + + DoScriptText(urand(0, 1) ? SAY_SLAY_1 : SAY_SLAY_2, m_creature); + } + + void JustSummoned(Creature* pSummoned) + { + switch(pSummoned->GetEntry()) + { + case NPC_INFERNAL_VOLCANO: + pSummoned->CastSpell(pSummoned, SPELL_ERUPTION, true, NULL, NULL, m_creature->GetObjectGuid()); + break; + case NPC_NETHER_PORTAL: + pSummoned->CastSpell(pSummoned, SPELL_NETHER_PORTAL, true, NULL, NULL, m_creature->GetObjectGuid()); + break; + } + } + + void UpdateAI(const uint32 uiDiff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; + // Spells + if (m_uiIncinerateFleshTimer < uiDiff) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, SPELL_INCINERATE_FLESH) == CAST_OK) + m_uiIncinerateFleshTimer = 25000; + } + } + else + m_uiIncinerateFleshTimer -= uiDiff; + + if (m_uiFelFireballTimer < uiDiff) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_TOPAGGRO, 0)) + { + if (DoCastSpellIfCan(pTarget, SPELL_FEL_FIREBALL) == CAST_OK) + m_uiFelFireballTimer = urand(20000, 30000); + } + } + else + m_uiFelFireballTimer -= uiDiff; + + if (m_uiFelLightningTimer < uiDiff) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, SPELL_FEL_LIGHTNING) == CAST_OK) + m_uiFelLightningTimer = urand(10000, 18000); + } + } + else + m_uiFelLightningTimer -= uiDiff; + + if (m_uiSummonTimer < uiDiff) + { + if(m_bVolcanoSummon) + { + if (DoCastSpellIfCan(m_creature, SPELL_NETHER_PORTAL_SUMMON) == CAST_OK) + { + // TODO missing emote? + //DoScriptText(EMOTE_PORTAL, m_creature); + m_bVolcanoSummon = false; + m_uiSummonTimer = 60000; + } + } + // summon volcano + else + { + if (DoCastSpellIfCan(m_creature, SPELL_INFERNAL_ERUPTION) == CAST_OK) + { + // TODO missing emote? + //DoScriptText(EMOTE_VOLCANO, m_creature); + m_bVolcanoSummon = true; + m_uiSummonTimer = 60000; + } + } + } + else + m_uiSummonTimer -= uiDiff; + + if (m_uiLegionFlameTimer < uiDiff) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, SPELL_LEGION_FLAME) == CAST_OK) + m_uiLegionFlameTimer = 30000; + } + } + else + m_uiLegionFlameTimer -= uiDiff; + + if (m_uiNetherPowerTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_NETHER_POWER) == CAST_OK) + m_uiNetherPowerTimer = 42000; + } + else + m_uiNetherPowerTimer -= uiDiff; + + // berserk + if (m_uiBerserkTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_BERSERK) == CAST_OK) + { + DoScriptText(SAY_BERSERK, m_creature); + m_uiBerserkTimer = 60000; + } + } + else + m_uiBerserkTimer -= uiDiff; + DoMeleeAttackIfReady(); } }; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 9b4124aa3..ed6b1dd7d 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2337" + #define SD2_REVISION_NR "2338" #endif // __SD2_REVISION_NR_H__ From bf94c209db42922b7f75648531f9b592daa90c02 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Thu, 17 Nov 2011 23:32:50 +0100 Subject: [PATCH 0323/1172] [2339] Let Jaraxxus despawn on FAIL Attention: This is wrong - proper FAIL handling is marked as TODO (needs more dataz) --- .../trial_of_the_crusader/boss_jaraxxus.cpp | 6 ++++-- .../trial_of_the_crusader/boss_northrend_beasts.cpp | 2 +- sd2_revision_nr.h | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_jaraxxus.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_jaraxxus.cpp index 3c6eb9614..dded5f8ea 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_jaraxxus.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_jaraxxus.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: trial_of_the_crusader -SD%Complete: 0 -SDComment: +SD%Complete: 75 +SDComment: Evade handling must be fixed, this is currently totally wrong. Some issues with emotes and texts, generic improvements related to spells can be missing SDCategory: Crusader Coliseum EndScriptData */ @@ -93,6 +93,8 @@ struct MANGOS_DLL_DECL boss_jaraxxusAI : public ScriptedAI { if (m_pInstance) m_pInstance->SetData(TYPE_JARAXXUS, FAIL); + + m_creature->ForcedDespawn(); } void JustDied(Unit* pKiller) diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp index e32cfc463..82e7ffe71 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp @@ -77,7 +77,7 @@ struct MANGOS_DLL_DECL npc_beast_combat_stalkerAI : public Scripted_NoMovementAI uiDamage = 0; } - void JustReachedHome() + void EnterEvadeMode() { if (m_pInstance) m_pInstance->SetData(TYPE_NORTHREND_BEASTS, FAIL); diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index ed6b1dd7d..87a39038e 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2338" + #define SD2_REVISION_NR "2339" #endif // __SD2_REVISION_NR_H__ From 8ad15c0e117c30a80b65e0bb44e0c45a7d6b3241 Mon Sep 17 00:00:00 2001 From: kid 10 Date: Thu, 18 Aug 2011 00:38:13 +0200 Subject: [PATCH 0324/1172] [2340] Implement Lich King event in Trial of the Crusader Signed-off-by: Schmoozerd --- .../instance_trial_of_the_crusader.cpp | 49 +++++++++++++++++-- .../trial_of_the_crusader.h | 15 ++++++ sd2_revision_nr.h | 2 +- 3 files changed, 60 insertions(+), 6 deletions(-) diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp index d8da5a1ae..644e15319 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp @@ -104,7 +104,7 @@ static const DialogueEntryTwoSide aTocDialogues[] = {SAY_WILFRED_JARAXXUS_INTRO_3, NPC_FIZZLEBANG, 0, 0, 12000}, // Summon also Jaraxxus {SAY_JARAXXUS_JARAXXAS_INTRO_1, NPC_JARAXXUS, 0, 0, 5000}, {SAY_WILFRED_DEATH, NPC_FIZZLEBANG, 0, 0, 1000}, - {1, 0, 0, 0, 5000}, // Kill Fizzlebang // TODO Either skip this line, or use something better than '1' as entry + {EVENT_KILL_FIZZLEBANG, 0, 0, 0, 5000}, // Kill Fizzlebang {SAY_TIRION_JARAXXUS_INTRO_2, NPC_TIRION_A, 0, 0, 0}, // Jaruxxus (Outro) {SAY_JARAXXUS_DEATH, NPC_JARAXXUS, 0, 0, 6000}, // Jaraxxus Death @@ -131,9 +131,12 @@ static const DialogueEntryTwoSide aTocDialogues[] = {SAY_TIRION_TWINS_WIN, NPC_TIRION_A, 0, 0, 0}, // Anub'arak {TYPE_ANUBARAK, 0, 0, 0, 19000}, - {SAY_LKING_ANUB_INTRO_1, NPC_THE_LICHKING, 0, 0, 9000}, - {SAY_TIRION_ABUN_INTRO_1, NPC_TIRION_A, 0, 0, 6000}, - {SAY_LKING_ANUB_INTRO_2, NPC_THE_LICHKING, 0, 0, 19000}, + {SAY_LKING_ANUB_INTRO_1, NPC_THE_LICHKING, 0, 0, 4000}, + {EVENT_ARTHAS_PORTAL, 0, 0, 0, 2000}, + {EVENT_SUMMON_THE_LICHKING, 0, 0, 0, 3000}, + {SAY_TIRION_ABUN_INTRO_1, NPC_TIRION_A, 0, 0, 8000}, + {SAY_LKING_ANUB_INTRO_2, NPC_THE_LICHKING_VISUAL, 0, 0, 18500}, + {EVENT_DESTROY_FLOOR, 0, 0, 0, 2500}, {SAY_LKING_ANUB_INTRO_3, NPC_THE_LICHKING, 0, 0, 0}, {0, 0, 0, 0 ,0} }; @@ -171,14 +174,17 @@ void instance_trial_of_the_crusader::OnCreatureCreate(Creature* pCreature) case NPC_GARROSH: case NPC_FIZZLEBANG: case NPC_JARAXXUS: + case NPC_WORLD_TRIGGER_LARGE: case NPC_THE_LICHKING: + case NPC_THE_LICHKING_VISUAL: m_mNpcEntryGuidStore[pCreature->GetEntry()] = pCreature->GetObjectGuid(); } } void instance_trial_of_the_crusader::OnObjectCreate(GameObject* pGo) { - + if (pGo->GetEntry() == GO_COLISEUM_FLOOR) + m_mGoEntryGuidStore[pGo->GetEntry()] = pGo->GetObjectGuid(); } void instance_trial_of_the_crusader::OnPlayerEnter(Player* pPlayer) @@ -368,6 +374,39 @@ void instance_trial_of_the_crusader::JustDidDialogueStep(int32 iEntry) pPlayer->SummonCreature(NPC_EYDIS, aSpawnPositions[8][0], aSpawnPositions[8][1], aSpawnPositions[8][2], aSpawnPositions[8][3], TEMPSUMMON_DEAD_DESPAWN, 0); } break; + case SAY_LKING_ANUB_INTRO_1: + if (Player* pPlayer = GetPlayerInMap()) + pPlayer->SummonCreature(NPC_WORLD_TRIGGER_LARGE, aSpawnPositions[9][0], aSpawnPositions[9][1], aSpawnPositions[9][2], aSpawnPositions[9][3], TEMPSUMMON_DEAD_DESPAWN, 0); + break; + case EVENT_ARTHAS_PORTAL: + if (Creature* pWorldTriggerLarge = GetSingleCreatureFromStorage(NPC_WORLD_TRIGGER_LARGE)) + pWorldTriggerLarge->CastSpell(pWorldTriggerLarge, SPELL_ARTHAS_PORTAL, true); + break; + case EVENT_SUMMON_THE_LICHKING: + if (Player* pPlayer = GetPlayerInMap()) + pPlayer->SummonCreature(NPC_THE_LICHKING_VISUAL, aSpawnPositions[10][0], aSpawnPositions[10][1], aSpawnPositions[10][2], aSpawnPositions[10][3], TEMPSUMMON_DEAD_DESPAWN, 0); + break; + case EVENT_DESTROY_FLOOR: + if (GameObject* pColiseumFloor = GetSingleGameObjectFromStorage(GO_COLISEUM_FLOOR)) + { + pColiseumFloor->SetDisplayId(DISPLAYID_DESTROYED_FLOOR); + pColiseumFloor->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_UNK_10 | GO_FLAG_NODESPAWN); + pColiseumFloor->SetGoState(GO_STATE_ACTIVE); + } + + if (Creature* pLichKingVisual = GetSingleCreatureFromStorage(NPC_THE_LICHKING_VISUAL)) + { + pLichKingVisual->CastSpell(pLichKingVisual, SPELL_FROSTNOVA, true); + //pLichKingVisual->CastSpell(pLichKingVisual, SPELL_CORPSE_TELEPORT, true); // NYI + pLichKingVisual->ForcedDespawn(); + } + + if (Creature* pLichKing = GetSingleCreatureFromStorage(NPC_THE_LICHKING)) + pLichKing->CastSpell(pLichKing, SPELL_DESTROY_FLOOR_KNOCKUP, true); + + if (Creature* pWorldTriggerLarge = GetSingleCreatureFromStorage(NPC_WORLD_TRIGGER_LARGE)) + pWorldTriggerLarge->ForcedDespawn(); + break; } } diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h index 248ba42ea..e06e3cd30 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h @@ -31,7 +31,9 @@ enum NPC_VARIAN = 34990, NPC_GARROSH = 34995, NPC_FIZZLEBANG = 35458, + NPC_WORLD_TRIGGER_LARGE = 22517, // Used for Lich King summon event NPC_THE_LICHKING = 16980, + NPC_THE_LICHKING_VISUAL = 35877, NPC_RAMSEY_1 = 34816, NPC_RAMSEY_2 = 35035, NPC_RAMSEY_3 = 35766, @@ -40,6 +42,17 @@ enum NPC_RAMSEY_6 = 35895, // Unknown what these three NPCs are used for, maybe horde events? NPC_RAMSEY_7 = 35909, NPC_RAMSEY_8 = 35910, + + GO_COLISEUM_FLOOR = 195527, + + SPELL_ARTHAS_PORTAL = 51807, + SPELL_FROSTNOVA = 68198, + SPELL_CORPSE_TELEPORT = 69016, // NYI + SPELL_DESTROY_FLOOR_KNOCKUP = 68193, + + DISPLAYID_DESTROYED_FLOOR = 9060, + + EMOTE_DESTROY_FLOOR = 16, }; static const float aRamsayPositions[2][4] = @@ -59,6 +72,8 @@ static const float aSpawnPositions[][4] = {563.8264f, 140.6563f, 393.9861f, 4.694936f}, // Jaraxxus {571.684f, 204.9028f, 399.263f, 4.590216f}, // Fjola {555.4514f, 205.8889f, 399.2634f, 4.886922f}, // Eydis + {563.6996f, 175.9826f, 394.5042f, 4.694936f}, // World Trigger Large + {563.5712f, 174.8351f, 394.4954f, 4.712389f}, // Lich King }; static const float aMovePositions[][3] = diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 87a39038e..2f9d1b689 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2339" + #define SD2_REVISION_NR "2340" #endif // __SD2_REVISION_NR_H__ From 636b240c7bf3a8fa51d20d410148ee7b1513dd48 Mon Sep 17 00:00:00 2001 From: kid 10 Date: Sat, 3 Sep 2011 04:32:28 +0200 Subject: [PATCH 0325/1172] [2341] Implement Wilfred Fizzlebang event in Trial of the Crusader Signed-off-by: Schmoozerd --- .../trial_of_the_crusader/boss_jaraxxus.cpp | 20 +++++++ .../instance_trial_of_the_crusader.cpp | 55 +++++++++++++++---- .../trial_of_the_crusader.h | 21 ++++++- sd2_revision_nr.h | 2 +- 4 files changed, 85 insertions(+), 13 deletions(-) diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_jaraxxus.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_jaraxxus.cpp index dded5f8ea..25558ee0b 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_jaraxxus.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_jaraxxus.cpp @@ -39,6 +39,7 @@ enum SAY_INFERNO = -1649047, // boss spells + SPELL_JARAXXUS_HITTIN_YA = 66327, SPELL_FEL_FIREBALL = 66532, SPELL_FEL_LIGHTNING = 66528, SPELL_INCINERATE_FLESH = 66237, @@ -87,6 +88,8 @@ struct MANGOS_DLL_DECL boss_jaraxxusAI : public ScriptedAI m_uiBerserkTimer = 10*MINUTE*IN_MILLISECONDS; m_bVolcanoSummon = true; + + DoCastSpellIfCan(m_creature, SPELL_JARAXXUS_HITTIN_YA); } void JustReachedHome() @@ -115,6 +118,14 @@ struct MANGOS_DLL_DECL boss_jaraxxusAI : public ScriptedAI m_creature->SetInCombatWithZone(); } + void EnterEvadeMode() + { + if (m_pInstance && m_pInstance->GetData(TYPE_JARAXXUS) != IN_PROGRESS) + return; + + ScriptedAI::EnterEvadeMode(); + } + void KilledUnit(Unit* pVictim) { if (pVictim->GetEntry() == NPC_FIZZLEBANG) @@ -136,6 +147,15 @@ struct MANGOS_DLL_DECL boss_jaraxxusAI : public ScriptedAI } } + void MovementInform(uint32 uiMovementType, uint32 uiPointId) + { + if (uiMovementType != POINT_MOTION_TYPE) + return; + + if (m_pInstance && uiPointId == POINT_COMBAT_POSITION) + if (Creature* pFizzlebang = m_pInstance->GetSingleCreatureFromStorage(NPC_FIZZLEBANG)) + m_creature->SetFacingToObject(pFizzlebang); + } void UpdateAI(const uint32 uiDiff) { diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp index 644e15319..0b7d470d6 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp @@ -100,12 +100,14 @@ static const DialogueEntryTwoSide aTocDialogues[] = {SAY_TIRION_JARAXXUS_INTRO_1, NPC_TIRION_A, 0, 0, 6000}, {NPC_FIZZLEBANG, 0, 0, 0, 26000}, {SAY_WILFRED_JARAXXUS_INTRO_1, NPC_FIZZLEBANG, 0, 0, 10000}, - {SAY_WILFRED_JARAXXUS_INTRO_2, NPC_FIZZLEBANG, 0, 0, 12000}, + {SAY_WILFRED_JARAXXUS_INTRO_2, NPC_FIZZLEBANG, 0, 0, 7000}, + {EVENT_OPEN_PORTAL, 0, 0, 0, 5000}, {SAY_WILFRED_JARAXXUS_INTRO_3, NPC_FIZZLEBANG, 0, 0, 12000}, // Summon also Jaraxxus - {SAY_JARAXXUS_JARAXXAS_INTRO_1, NPC_JARAXXUS, 0, 0, 5000}, + {SAY_JARAXXUS_JARAXXAS_INTRO_1, NPC_JARAXXUS, 0, 0, 6000}, {SAY_WILFRED_DEATH, NPC_FIZZLEBANG, 0, 0, 1000}, {EVENT_KILL_FIZZLEBANG, 0, 0, 0, 5000}, // Kill Fizzlebang - {SAY_TIRION_JARAXXUS_INTRO_2, NPC_TIRION_A, 0, 0, 0}, + {SAY_TIRION_JARAXXUS_INTRO_2, NPC_TIRION_A, 0, 0, 6000}, + {EVENT_JARAXXUS_START_ATTACK, 0, 0, 0, 0}, // Jaruxxus (Outro) {SAY_JARAXXUS_DEATH, NPC_JARAXXUS, 0, 0, 6000}, // Jaraxxus Death {SAY_TIRION_JARAXXUS_EXIT_1, NPC_TIRION_A, 0, 0, 5000}, @@ -124,8 +126,8 @@ static const DialogueEntryTwoSide aTocDialogues[] = {NPC_RAMSEY_4, 0, 0, 0, 0}, // Twin Valkyrs {TYPE_TWIN_VALKYR, 0, 0, 0, 17000}, - {NPC_FJOLA, 0, 0, 0, 0}, // Summon Twins - {NPC_EYDIS, 0, 0, 0, 2000}, // Twins killed // TODO Find better entry + {EVENT_SUMMON_TWINS, 0, 0, 0, 0}, + {EVENT_TWINS_KILLED, 0, 0, 0, 2000}, {NPC_RAMSEY_5, 0, 0, 0, 4000}, {SAY_VARIAN_TWINS_A_WIN, NPC_VARIAN, SAY_GARROSH_TWINS_H_WIN, NPC_GARROSH, 1000}, {SAY_TIRION_TWINS_WIN, NPC_TIRION_A, 0, 0, 0}, @@ -168,17 +170,24 @@ void instance_trial_of_the_crusader::OnCreatureCreate(Creature* pCreature) { switch (pCreature->GetEntry()) { + case NPC_FIZZLEBANG: + DoUseDoorOrButton(GO_MAIN_GATE); case NPC_TIRION_A: case NPC_TIRION_B: case NPC_VARIAN: case NPC_GARROSH: - case NPC_FIZZLEBANG: case NPC_JARAXXUS: + case NPC_OPEN_PORTAL_TARGET: + case NPC_EYDIS: case NPC_WORLD_TRIGGER_LARGE: case NPC_THE_LICHKING: case NPC_THE_LICHKING_VISUAL: - m_mNpcEntryGuidStore[pCreature->GetEntry()] = pCreature->GetObjectGuid(); + break; + default: + return; } + + m_mNpcEntryGuidStore[pCreature->GetEntry()] = pCreature->GetObjectGuid(); } void instance_trial_of_the_crusader::OnObjectCreate(GameObject* pGo) @@ -259,7 +268,7 @@ void instance_trial_of_the_crusader::SetData(uint32 uiType, uint32 uiData) StartNextDialogueText(NPC_RAMSEY_4); } else if (uiData == DONE) - StartNextDialogueText(NPC_EYDIS); + StartNextDialogueText(EVENT_TWINS_KILLED); m_auiEncounter[uiType] = uiData; break; case TYPE_ANUBARAK: @@ -363,11 +372,37 @@ void instance_trial_of_the_crusader::JustDidDialogueStep(int32 iEntry) if (Player* pPlayer = GetPlayerInMap()) pPlayer->SummonCreature(NPC_FIZZLEBANG, aSpawnPositions[5][0], aSpawnPositions[5][1], aSpawnPositions[5][2], aSpawnPositions[5][3], TEMPSUMMON_DEAD_DESPAWN, 0); break; + case SAY_WILFRED_JARAXXUS_INTRO_1: + DoUseDoorOrButton(GO_MAIN_GATE); // Close main gate + break; + case SAY_WILFRED_JARAXXUS_INTRO_2: + if (Creature* pFizzlebang = GetSingleCreatureFromStorage(NPC_FIZZLEBANG)) + { + pFizzlebang->SummonCreature(NPC_PURPLE_RUNE, aSpawnPositions[11][0], aSpawnPositions[11][1], aSpawnPositions[11][2], aSpawnPositions[11][3], TEMPSUMMON_TIMED_DESPAWN, 15000); + pFizzlebang->CastSpell(pFizzlebang, SPELL_OPEN_PORTAL, false); + } + break; + case EVENT_OPEN_PORTAL: + if (Creature* pOpenPortalTarget = GetSingleCreatureFromStorage(NPC_OPEN_PORTAL_TARGET)) + { + pOpenPortalTarget->CastSpell(pOpenPortalTarget, SPELL_WILFRED_PORTAL, true); + pOpenPortalTarget->ForcedDespawn(9000); + } + break; case SAY_WILFRED_JARAXXUS_INTRO_3: if (Player* pPlayer = GetPlayerInMap()) - pPlayer->SummonCreature(NPC_JARAXXUS, aSpawnPositions[6][0], aSpawnPositions[6][1], aSpawnPositions[6][2], aSpawnPositions[6][3], TEMPSUMMON_DEAD_DESPAWN, 0); + if (Creature* pJaraxxus = pPlayer->SummonCreature(NPC_JARAXXUS, aSpawnPositions[6][0], aSpawnPositions[6][1], aSpawnPositions[6][2], aSpawnPositions[6][3], TEMPSUMMON_DEAD_DESPAWN, 0)) + pJaraxxus->GetMotionMaster()->MovePoint(POINT_COMBAT_POSITION, aMovePositions[3][0], aMovePositions[3][1], aMovePositions[3][2]); + break; + case EVENT_KILL_FIZZLEBANG: + if (Creature* pJaraxxus = GetSingleCreatureFromStorage(NPC_JARAXXUS)) + pJaraxxus->CastSpell(pJaraxxus, SPELL_FEL_LIGHTNING_KILL, true); + break; + case EVENT_JARAXXUS_START_ATTACK: + if (Creature* pJaraxxus = GetSingleCreatureFromStorage(NPC_JARAXXUS)) + pJaraxxus->SetInCombatWithZone(); break; - case NPC_FJOLA: + case EVENT_SUMMON_TWINS: if (Player* pPlayer = GetPlayerInMap()) { pPlayer->SummonCreature(NPC_FJOLA, aSpawnPositions[7][0], aSpawnPositions[7][1], aSpawnPositions[7][2], aSpawnPositions[7][3], TEMPSUMMON_DEAD_DESPAWN, 0); diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h index e06e3cd30..404c30282 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h @@ -16,6 +16,15 @@ enum TYPE_TWIN_VALKYR = 4, TYPE_ANUBARAK = 5, + EVENT_OPEN_PORTAL = 6, + EVENT_KILL_FIZZLEBANG = 7, + EVENT_JARAXXUS_START_ATTACK = 8, + EVENT_SUMMON_TWINS = 9, + EVENT_TWINS_KILLED = 10, + EVENT_ARTHAS_PORTAL = 11, + EVENT_SUMMON_THE_LICHKING = 12, + EVENT_DESTROY_FLOOR = 13, + NPC_BEAST_COMBAT_STALKER = 36549, NPC_GORMOK = 34796, NPC_ACIDMAW = 35144, @@ -31,6 +40,7 @@ enum NPC_VARIAN = 34990, NPC_GARROSH = 34995, NPC_FIZZLEBANG = 35458, + NPC_OPEN_PORTAL_TARGET = 17965, NPC_WORLD_TRIGGER_LARGE = 22517, // Used for Lich King summon event NPC_THE_LICHKING = 16980, NPC_THE_LICHKING_VISUAL = 35877, @@ -43,16 +53,21 @@ enum NPC_RAMSEY_7 = 35909, NPC_RAMSEY_8 = 35910, + NPC_PURPLE_RUNE = 35651, + + GO_MAIN_GATE = 195647, GO_COLISEUM_FLOOR = 195527, + SPELL_OPEN_PORTAL = 67864, + SPELL_FEL_LIGHTNING_KILL = 67888, + SPELL_WILFRED_PORTAL = 68424, SPELL_ARTHAS_PORTAL = 51807, SPELL_FROSTNOVA = 68198, SPELL_CORPSE_TELEPORT = 69016, // NYI SPELL_DESTROY_FLOOR_KNOCKUP = 68193, DISPLAYID_DESTROYED_FLOOR = 9060, - - EMOTE_DESTROY_FLOOR = 16, + POINT_COMBAT_POSITION = 10, }; static const float aRamsayPositions[2][4] = @@ -74,6 +89,7 @@ static const float aSpawnPositions[][4] = {555.4514f, 205.8889f, 399.2634f, 4.886922f}, // Eydis {563.6996f, 175.9826f, 394.5042f, 4.694936f}, // World Trigger Large {563.5712f, 174.8351f, 394.4954f, 4.712389f}, // Lich King + {563.6858f, 139.4323f, 393.9862f, 4.694936f}, // Purple Rune / Center Position }; static const float aMovePositions[][3] = @@ -81,6 +97,7 @@ static const float aMovePositions[][3] = {563.748f, 179.766f, 394.4862f}, // Gormok {576.5347f, 168.9514f, 394.7064f}, // Dreadscale {563.8577f, 176.5885f, 394.4417f}, // Icehowl + {563.7223f, 131.2344f, 393.9901f}, // Jaraxxus }; class MANGOS_DLL_DECL instance_trial_of_the_crusader : public ScriptedInstance, private DialogueHelper diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 2f9d1b689..91f7fbc9e 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2340" + #define SD2_REVISION_NR "2341" #endif // __SD2_REVISION_NR_H__ From 985d7693ec642c155ff879222c527516a8c11569 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Thu, 13 Oct 2011 22:55:18 +0200 Subject: [PATCH 0326/1172] [2342] Add Floor reload handling in Trial of the Crusader --- .../instance_trial_of_the_crusader.cpp | 18 ++++++++++++++++-- sd2_revision_nr.h | 2 +- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp index 0b7d470d6..5410798b0 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp @@ -192,8 +192,22 @@ void instance_trial_of_the_crusader::OnCreatureCreate(Creature* pCreature) void instance_trial_of_the_crusader::OnObjectCreate(GameObject* pGo) { - if (pGo->GetEntry() == GO_COLISEUM_FLOOR) - m_mGoEntryGuidStore[pGo->GetEntry()] = pGo->GetObjectGuid(); + switch (pGo->GetEntry()) + { + case GO_COLISEUM_FLOOR: + if (m_auiEncounter[TYPE_TWIN_VALKYR] == DONE) + { + pGo->SetDisplayId(DISPLAYID_DESTROYED_FLOOR); + pGo->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_UNK_10 | GO_FLAG_NODESPAWN); + pGo->SetGoState(GO_STATE_ACTIVE); + } + break; + case GO_MAIN_GATE: + break; + default: + return; + } + m_mGoEntryGuidStore[pGo->GetEntry()] = pGo->GetObjectGuid(); } void instance_trial_of_the_crusader::OnPlayerEnter(Player* pPlayer) diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 91f7fbc9e..0db0b8a77 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2341" + #define SD2_REVISION_NR "2342" #endif // __SD2_REVISION_NR_H__ From ce98ad5a138ee697cd8577108bc09a848f17c0c8 Mon Sep 17 00:00:00 2001 From: Bastii Date: Fri, 18 Nov 2011 22:59:02 +0200 Subject: [PATCH 0327/1172] [2343] Improvement for quest 9364 Signed-off-by: Xfurry --- scripts/kalimdor/azshara.cpp | 57 ++++++++++++++++++------------------ sd2_revision_nr.h | 2 +- 2 files changed, 30 insertions(+), 29 deletions(-) diff --git a/scripts/kalimdor/azshara.cpp b/scripts/kalimdor/azshara.cpp index a3a4e7874..f5bdc9c66 100644 --- a/scripts/kalimdor/azshara.cpp +++ b/scripts/kalimdor/azshara.cpp @@ -244,58 +244,59 @@ bool GOUse_go_southfury_moonstone(Player* pPlayer, GameObject* pGo) /*###### ## mobs_spitelashes ######*/ +enum +{ + // quest related + SPELL_POLYMORPH_BACKFIRE = 28406, // summons npc 16479 + QUEST_FRAGMENTED_MAGIC = 9364, +}; struct MANGOS_DLL_DECL mobs_spitelashesAI : public ScriptedAI { mobs_spitelashesAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} - uint32 morphtimer; - bool spellhit; + uint32 m_uiMorphTimer; void Reset() { - morphtimer = 0; - spellhit = false; + m_uiMorphTimer = 0; } - void SpellHit(Unit *Hitter, const SpellEntry *Spellkind) + void SpellHit(Unit* pCaster, const SpellEntry* pSpell) { - if (!spellhit && - Hitter->GetTypeId() == TYPEID_PLAYER && - ((Player*)Hitter)->GetQuestStatus(9364) == QUEST_STATUS_INCOMPLETE && - (Spellkind->Id==118 || Spellkind->Id== 12824 || Spellkind->Id== 12825 || Spellkind->Id== 12826)) - { - spellhit=true; - DoCastSpellIfCan(m_creature,29124); //become a sheep - } + // If already hit by the polymorph return + if (m_uiMorphTimer) + return; + + // Creature get polymorphed into a sheep and after 5 secs despawns + if (pCaster->GetTypeId() == TYPEID_PLAYER && ((Player*)pCaster)->GetQuestStatus(QUEST_FRAGMENTED_MAGIC) == QUEST_STATUS_INCOMPLETE && + (pSpell->Id==118 || pSpell->Id== 12824 || pSpell->Id== 12825 || pSpell->Id== 12826)) + m_uiMorphTimer = 5000; } - void UpdateAI(const uint32 diff) + void UpdateAI(const uint32 uiDiff) { - // we mustn't remove the creature in the same round in which we cast the summon spell, otherwise there will be no summons - if (spellhit && morphtimer>=5000) - { - m_creature->ForcedDespawn(); + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - } - // walk 5 seconds before summoning - if (spellhit && morphtimer<5000) + if (m_uiMorphTimer) { - morphtimer+=diff; - if (morphtimer>=5000) + if (m_uiMorphTimer <= uiDiff) { - DoCastSpellIfCan(m_creature,28406); //summon copies - DoCastSpellIfCan(m_creature,6924); //visual explosion + if (DoCastSpellIfCan(m_creature, SPELL_POLYMORPH_BACKFIRE, CAST_TRIGGERED) == CAST_OK) + { + m_uiMorphTimer = 0; + m_creature->ForcedDespawn(); + } } + else + m_uiMorphTimer -= uiDiff; } - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - //TODO: add abilities for the different creatures DoMeleeAttackIfReady(); } }; + CreatureAI* GetAI_mobs_spitelashes(Creature* pCreature) { return new mobs_spitelashesAI(pCreature); diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 0db0b8a77..bfa8e1d87 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2342" + #define SD2_REVISION_NR "2343" #endif // __SD2_REVISION_NR_H__ From 6554539f957fcda5b6730f50283439074c4e2477 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Fri, 18 Nov 2011 23:25:47 +0100 Subject: [PATCH 0328/1172] [2344] Improve Gothik --- scripts/northrend/naxxramas/boss_gothik.cpp | 373 +++++++++++------- .../naxxramas/instance_naxxramas.cpp | 1 + sd2_revision_nr.h | 2 +- 3 files changed, 242 insertions(+), 134 deletions(-) diff --git a/scripts/northrend/naxxramas/boss_gothik.cpp b/scripts/northrend/naxxramas/boss_gothik.cpp index 691a2d04b..cdd672417 100644 --- a/scripts/northrend/naxxramas/boss_gothik.cpp +++ b/scripts/northrend/naxxramas/boss_gothik.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: Boss_Gothik -SD%Complete: 60 -SDComment: Only base implemented. Todo: control adds at summon. Handle case of raid not splitted in two sides +SD%Complete: 95 +SDComment: Prevent Gothik from turning and "in combat state" while on balcony SDCategory: Naxxramas EndScriptData */ @@ -40,13 +40,13 @@ enum PHASE_SPEECH = 0, PHASE_BALCONY = 1, - PHASE_GROUND = 2, - PHASE_END = 3, + PHASE_STOP_SUMMONING = 2, + PHASE_TELEPORTING = 3, + PHASE_STOP_TELEPORTING = 4, - MAX_WAVES = 19, - - SPELL_TELEPORT_LEFT = 28025, // guesswork - SPELL_TELEPORT_RIGHT = 28026, // could be defined as dead or live side, left or right facing north + // Right is right side from gothik (eastern) + SPELL_TELEPORT_RIGHT = 28025, + SPELL_TELEPORT_LEFT = 28026, SPELL_HARVESTSOUL = 28679, SPELL_SHADOWBOLT = 29317, @@ -81,41 +81,81 @@ struct MANGOS_DLL_DECL boss_gothikAI : public ScriptedAI instance_naxxramas* m_pInstance; bool m_bIsRegularMode; - uint8 m_uiPhase; - - uint8 m_uiSpeechCount; - uint32 m_uiSpeechTimer; + GUIDList m_lSummonedAddGuids; + GUIDList m_lTraineeSummonPosGuids; + GUIDList m_lDeathKnightSummonPosGuids; + GUIDList m_lRiderSummonPosGuids; - uint8 m_uiSummonCount; - uint32 m_uiSummonTimer; + uint8 m_uiPhase; + uint8 m_uiSpeech; + uint32 m_uiTraineeTimer; + uint32 m_uiDeathKnightTimer; + uint32 m_uiRiderTimer; uint32 m_uiTeleportTimer; uint32 m_uiShadowboltTimer; + uint32 m_uiHarvestSoulTimer; + uint32 m_uiPhaseTimer; + uint32 m_uiControlZoneTimer; + uint32 m_uiSpeechTimer; void Reset() { - m_uiPhase = PHASE_SPEECH; + // Remove immunity + m_creature->ApplySpellImmune(0, IMMUNITY_DAMAGE, SPELL_SCHOOL_MASK_ALL, false); - m_uiSpeechCount = 0; - m_uiSpeechTimer = 5000; - - m_uiSummonCount = 0; - m_uiSummonTimer = 5000; + m_uiPhase = PHASE_SPEECH; + m_uiSpeech = 1; + + m_uiTraineeTimer = 24*IN_MILLISECONDS; + m_uiDeathKnightTimer = 74*IN_MILLISECONDS; + m_uiRiderTimer = 134*IN_MILLISECONDS; + m_uiTeleportTimer = 20*IN_MILLISECONDS; + m_uiShadowboltTimer = 2*IN_MILLISECONDS; + m_uiHarvestSoulTimer = 2500; + m_uiPhaseTimer = 4*MINUTE*IN_MILLISECONDS + 7*IN_MILLISECONDS; // last summon at 4:04, next would be 4:09 + m_uiControlZoneTimer = urand(120*IN_MILLISECONDS,150*IN_MILLISECONDS); + m_uiSpeechTimer = 1*IN_MILLISECONDS; + + // Despawn Adds + for (GUIDList::const_iterator itr = m_lSummonedAddGuids.begin(); itr != m_lSummonedAddGuids.end(); itr++) + { + if (Creature* pCreature = m_creature->GetMap()->GetCreature(*itr)) + pCreature->ForcedDespawn(); + } - m_uiTeleportTimer = 15000; - m_uiShadowboltTimer = 2500; + m_lSummonedAddGuids.clear(); + m_lTraineeSummonPosGuids.clear(); + m_lDeathKnightSummonPosGuids.clear(); + m_lRiderSummonPosGuids.clear(); } void Aggro(Unit* pWho) { - DoScriptText(SAY_SPEECH_1, m_creature); - if (!m_pInstance) return; m_pInstance->SetData(TYPE_GOTHIK, IN_PROGRESS); + // Make immune + m_creature->ApplySpellImmune(0, IMMUNITY_DAMAGE, SPELL_SCHOOL_MASK_ALL, true); + m_pInstance->SetGothTriggers(); + PrepareSummonPlaces(); + } + + bool IsCentralDoorClosed() + { + return m_pInstance && m_pInstance->GetData(TYPE_GOTHIK) != SPECIAL; + } + + void ProcessCentralDoor() + { + if (IsCentralDoorClosed()) + { + m_pInstance->SetData(TYPE_GOTHIK, SPECIAL); + DoScriptText(EMOTE_GATE, m_creature); + } } bool HasPlayersInLeftSide() @@ -129,7 +169,7 @@ struct MANGOS_DLL_DECL boss_gothikAI : public ScriptedAI { if (Player* pPlayer = itr->getSource()) { - if (!m_pInstance->IsInRightSideGothArea(pPlayer)) + if (!m_pInstance->IsInRightSideGothArea(pPlayer) && pPlayer->isAlive()) return true; } } @@ -157,46 +197,88 @@ struct MANGOS_DLL_DECL boss_gothikAI : public ScriptedAI m_pInstance->SetData(TYPE_GOTHIK, FAIL); } - void SummonAdds(bool bRightSide, uint32 uiSummonEntry) + void PrepareSummonPlaces() { std::list lSummonList; - m_pInstance->GetGothSummonPointCreatures(lSummonList, bRightSide); + m_pInstance->GetGothSummonPointCreatures(lSummonList, true); if (lSummonList.empty()) return; - uint8 uiCount = 2; + // Trainees and Rider + uint8 index = 0; + uint8 uiTraineeCount = m_bIsRegularMode ? 2 : 3; + lSummonList.sort(ObjectDistanceOrder(m_creature)); + for (std::list::iterator itr = lSummonList.begin(); itr != lSummonList.end(); ++itr) + { + if (*itr) + { + if (uiTraineeCount == 0) + break; + if (index == 1) + m_lRiderSummonPosGuids.push_back((*itr)->GetObjectGuid()); + else + { + m_lTraineeSummonPosGuids.push_back((*itr)->GetObjectGuid()); + --uiTraineeCount; + } + index++; + } + } - switch(uiSummonEntry) + // DeathKnights + uint8 uiDeathKnightCount = m_bIsRegularMode ? 1 : 2; + lSummonList.sort(ObjectDistanceOrderReversed(m_creature)); + for (std::list::iterator itr = lSummonList.begin(); itr != lSummonList.end(); ++itr) { - case NPC_UNREL_TRAINEE: - lSummonList.sort(ObjectDistanceOrder(m_creature)); - break; - case NPC_UNREL_DEATH_KNIGHT: - case NPC_UNREL_RIDER: - uiCount = 1; - lSummonList.sort(ObjectDistanceOrderReversed(m_creature)); - break; + if (*itr) + { + if (uiDeathKnightCount == 0) + break; + m_lDeathKnightSummonPosGuids.push_back((*itr)->GetObjectGuid()); + --uiDeathKnightCount; + } } + } - for(std::list::iterator itr = lSummonList.begin(); itr != lSummonList.end(); ++itr) + void SummonAdds(bool bRightSide, uint32 uiSummonEntry) + { + GUIDList* plSummonPosGuids; + switch(uiSummonEntry) { - if (uiCount == 0) - break; + case NPC_UNREL_TRAINEE: plSummonPosGuids = &m_lTraineeSummonPosGuids; break; + case NPC_UNREL_DEATH_KNIGHT: plSummonPosGuids = &m_lDeathKnightSummonPosGuids; break; + case NPC_UNREL_RIDER: plSummonPosGuids = &m_lRiderSummonPosGuids; break; + default: + return; + } + if (plSummonPosGuids->empty()) + return; - m_creature->SummonCreature(uiSummonEntry, (*itr)->GetPositionX(), (*itr)->GetPositionY(), (*itr)->GetPositionZ(), (*itr)->GetOrientation(), TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000); - --uiCount; + for (GUIDList::iterator itr = plSummonPosGuids->begin(); itr != plSummonPosGuids->end(); ++itr) + { + if (Creature* pPos = m_creature->GetMap()->GetCreature(*itr)) + m_creature->SummonCreature(uiSummonEntry, pPos->GetPositionX(), pPos->GetPositionY(), pPos->GetPositionZ(), pPos->GetOrientation(), TEMPSUMMON_DEAD_DESPAWN, 0); } } + void JustSummoned(Creature* pSummoned) + { + m_lSummonedAddGuids.push_back(pSummoned->GetObjectGuid()); + if (!IsCentralDoorClosed()) + pSummoned->SetInCombatWithZone(); + } + void SummonedCreatureJustDied(Creature* pSummoned) { + m_lSummonedAddGuids.remove(pSummoned->GetObjectGuid()); + if (!m_pInstance) return; if (Creature* pAnchor = m_pInstance->GetClosestAnchorForGoth(pSummoned, true)) { - switch(pSummoned->GetEntry()) + switch (pSummoned->GetEntry()) { // Wrong caster, it expected to be pSummoned. // Mangos deletes the spell event at caster death, so for delayed spell like this @@ -213,126 +295,151 @@ struct MANGOS_DLL_DECL boss_gothikAI : public ScriptedAI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - switch(m_uiPhase) + switch (m_uiPhase) { case PHASE_SPEECH: - { if (m_uiSpeechTimer < uiDiff) { - m_uiSpeechTimer = 5000; - ++m_uiSpeechCount; - - switch(m_uiSpeechCount) + switch(m_uiSpeech) { - case 1: DoScriptText(SAY_SPEECH_2, m_creature); break; - case 2: DoScriptText(SAY_SPEECH_3, m_creature); break; - case 3: DoScriptText(SAY_SPEECH_4, m_creature); break; - case 4: m_uiPhase = PHASE_BALCONY; break; + case 1: DoScriptText(SAY_SPEECH_1, m_creature); m_uiSpeechTimer = 4*IN_MILLISECONDS; break; + case 2: DoScriptText(SAY_SPEECH_2, m_creature); m_uiSpeechTimer = 6*IN_MILLISECONDS; break; + case 3: DoScriptText(SAY_SPEECH_3, m_creature); m_uiSpeechTimer = 5*IN_MILLISECONDS; break; + case 4: DoScriptText(SAY_SPEECH_4, m_creature); m_uiPhase = PHASE_BALCONY; break; } + m_uiSpeech++; } else m_uiSpeechTimer -= uiDiff; + // No break here + + case PHASE_BALCONY: // Do summoning + if (m_uiTraineeTimer < uiDiff) + { + SummonAdds(true, NPC_UNREL_TRAINEE); + m_uiTraineeTimer = 20*IN_MILLISECONDS; + } + else + m_uiTraineeTimer -= uiDiff; + if (m_uiDeathKnightTimer < uiDiff) + { + SummonAdds(true, NPC_UNREL_DEATH_KNIGHT); + m_uiDeathKnightTimer = 25*IN_MILLISECONDS; + } + else + m_uiDeathKnightTimer -= uiDiff; + if (m_uiRiderTimer < uiDiff) + { + SummonAdds(true, NPC_UNREL_RIDER); + m_uiRiderTimer = 30*IN_MILLISECONDS; + } + else + m_uiRiderTimer -= uiDiff; + + if (m_uiPhaseTimer < uiDiff) + { + m_uiPhase = PHASE_STOP_SUMMONING; + m_uiPhaseTimer = 27*IN_MILLISECONDS; + } + else + m_uiPhaseTimer -= uiDiff; + break; - } - case PHASE_BALCONY: - { - if (m_uiSummonTimer < uiDiff) + + case PHASE_STOP_SUMMONING: + if (m_uiPhaseTimer < uiDiff) { - if (m_uiSummonCount >= MAX_WAVES) + if (DoCastSpellIfCan(m_creature, SPELL_TELEPORT_RIGHT, CAST_TRIGGERED) == CAST_OK) { + m_uiPhase = m_pInstance ? PHASE_TELEPORTING : PHASE_STOP_TELEPORTING; + DoScriptText(SAY_TELEPORT, m_creature); DoScriptText(EMOTE_TO_FRAY, m_creature); - DoCastSpellIfCan(m_creature, SPELL_TELEPORT_RIGHT); - m_uiPhase = PHASE_GROUND; - return; - } - // npc, npc, npc, timer - static uint32 const auiSummonData[MAX_WAVES][4] = - { - {NPC_UNREL_TRAINEE, 0, 0, 20000}, - {NPC_UNREL_TRAINEE, 0, 0, 20000}, - {NPC_UNREL_TRAINEE, 0, 0, 10000}, - {NPC_UNREL_DEATH_KNIGHT, 0, 0, 10000}, - {NPC_UNREL_TRAINEE, 0, 0, 15000}, - {NPC_UNREL_DEATH_KNIGHT, 0, 0, 10000}, - {NPC_UNREL_TRAINEE, 0, 0, 15000}, - {NPC_UNREL_DEATH_KNIGHT, NPC_UNREL_TRAINEE, 0, 10000}, - {NPC_UNREL_RIDER, 0, 0, 10000}, - {NPC_UNREL_TRAINEE, 0, 0, 5000}, - {NPC_UNREL_DEATH_KNIGHT, 0, 0, 15000}, - {NPC_UNREL_TRAINEE, NPC_UNREL_RIDER, 0, 10000}, - {NPC_UNREL_DEATH_KNIGHT, NPC_UNREL_DEATH_KNIGHT, 0, 10000}, - {NPC_UNREL_TRAINEE, 0, 0, 10000}, - {NPC_UNREL_RIDER, 0, 0, 5000}, - {NPC_UNREL_DEATH_KNIGHT, 0, 0, 5000}, - {NPC_UNREL_TRAINEE, 0, 0, 20000}, - {NPC_UNREL_RIDER, NPC_UNREL_DEATH_KNIGHT, NPC_UNREL_TRAINEE, 15000}, - {NPC_UNREL_TRAINEE, 0, 0, 30000}, - }; - - SummonAdds(true, auiSummonData[m_uiSummonCount][0]); - - if (auiSummonData[m_uiSummonCount][1]) - SummonAdds(true, auiSummonData[m_uiSummonCount][1]); - - if (auiSummonData[m_uiSummonCount][2]) - SummonAdds(true, auiSummonData[m_uiSummonCount][2]); - - m_uiSummonTimer = auiSummonData[m_uiSummonCount][3]; - - ++m_uiSummonCount; + // Remove Immunity + m_creature->ApplySpellImmune(0, IMMUNITY_DAMAGE, SPELL_SCHOOL_MASK_ALL, false); + + DoResetThreat(); + m_creature->SetInCombatWithZone(); + } } else - m_uiSummonTimer -= uiDiff; + m_uiPhaseTimer -= uiDiff; break; - } - case PHASE_GROUND: - case PHASE_END: - { - if (m_uiPhase == PHASE_GROUND) + + case PHASE_TELEPORTING: // Phase is only reached if m_pInstance is valid + if (m_uiTeleportTimer < uiDiff) { - if (m_creature->GetHealthPercent() < 30.0f) + uint32 uiTeleportSpell = m_pInstance->IsInRightSideGothArea(m_creature) ? SPELL_TELEPORT_LEFT : SPELL_TELEPORT_RIGHT; + if (DoCastSpellIfCan(m_creature, uiTeleportSpell) == CAST_OK) { - if (m_pInstance->IsInRightSideGothArea(m_creature)) - { - DoScriptText(EMOTE_GATE, m_creature); - m_pInstance->SetData(TYPE_GOTHIK, SPECIAL); - m_uiPhase = PHASE_END; - m_uiShadowboltTimer = 2000; - return; - } + m_uiTeleportTimer = 20*IN_MILLISECONDS; + m_uiShadowboltTimer = 2*IN_MILLISECONDS; } + } + else + m_uiTeleportTimer -= uiDiff; - if (m_uiTeleportTimer < uiDiff) - { - uint32 uiTeleportSpell = m_pInstance->IsInRightSideGothArea(m_creature) ? SPELL_TELEPORT_LEFT : SPELL_TELEPORT_RIGHT; - - if (DoCastSpellIfCan(m_creature, uiTeleportSpell) == CAST_OK) - { - DoResetThreat(); - m_uiTeleportTimer = 15000; - m_uiShadowboltTimer = 2000; - return; - } - } - else - m_uiTeleportTimer -= uiDiff; + if (m_creature->GetHealthPercent() <= 30.0f) + { + m_uiPhase = PHASE_STOP_TELEPORTING; + ProcessCentralDoor(); + // as the doors now open, recheck whether mobs are standing around + m_uiControlZoneTimer = 1; } + // no break here - if (m_uiShadowboltTimer < uiDiff) + case PHASE_STOP_TELEPORTING: + if (m_uiHarvestSoulTimer < uiDiff) { - if (DoCastSpellIfCan(m_creature->getVictim(), m_bIsRegularMode ? SPELL_SHADOWBOLT: SPELL_SHADOWBOLT_H) == CAST_OK) - m_uiShadowboltTimer = 1500; + if (DoCastSpellIfCan(m_creature, SPELL_HARVESTSOUL) == CAST_OK) + m_uiHarvestSoulTimer = 15*IN_MILLISECONDS; } else - m_uiShadowboltTimer -= uiDiff; + m_uiHarvestSoulTimer -= uiDiff; + + if (m_uiShadowboltTimer) + { + if (m_uiShadowboltTimer <= uiDiff) + m_uiShadowboltTimer = 0; + else + m_uiShadowboltTimer -= uiDiff; + } + // Shadowbold cooldown finished, cast when ready + else if (!m_creature->IsNonMeleeSpellCasted(true)) + { + // Select valid target + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_TOPAGGRO, 0, SPELL_SHADOWBOLT, SELECT_FLAG_IN_LOS)) + DoCastSpellIfCan(pTarget, m_bIsRegularMode ? SPELL_SHADOWBOLT : SPELL_SHADOWBOLT_H); + } - DoMeleeAttackIfReady(); // possibly no melee at all break; + } + + // Control Check, if Death zone empty + if (m_uiControlZoneTimer) + { + if (m_uiControlZoneTimer <= uiDiff) + { + m_uiControlZoneTimer = 0; + + if (m_pInstance && !HasPlayersInLeftSide()) + { + ProcessCentralDoor(); + for (GUIDList::const_iterator itr = m_lSummonedAddGuids.begin(); itr != m_lSummonedAddGuids.end(); itr++) + { + if (Creature* pCreature = m_pInstance->instance->GetCreature(*itr)) + { + if (!pCreature->isInCombat()) + pCreature->SetInCombatWithZone(); + } + } + } } + else + m_uiControlZoneTimer -= uiDiff; } } }; @@ -412,10 +519,10 @@ bool EffectDummyCreature_spell_anchor(Unit* pCaster, uint32 uiSpellId, SpellEffe else if (uiSpellId == SPELL_C_TO_SKULL) uiNpcEntry = NPC_SPECT_RIDER; - pGoth->SummonCreature(uiNpcEntry, pCreatureTarget->GetPositionX(), pCreatureTarget->GetPositionY(), pCreatureTarget->GetPositionZ(), pCreatureTarget->GetOrientation(), TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 20000); + pGoth->SummonCreature(uiNpcEntry, pCreatureTarget->GetPositionX(), pCreatureTarget->GetPositionY(), pCreatureTarget->GetPositionZ(), pCreatureTarget->GetOrientation(), TEMPSUMMON_DEAD_DESPAWN, 0); if (uiNpcEntry == NPC_SPECT_RIDER) - pGoth->SummonCreature(NPC_SPECT_HORSE, pCreatureTarget->GetPositionX(), pCreatureTarget->GetPositionY(), pCreatureTarget->GetPositionZ(), pCreatureTarget->GetOrientation(), TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 20000); + pGoth->SummonCreature(NPC_SPECT_HORSE, pCreatureTarget->GetPositionX(), pCreatureTarget->GetPositionY(), pCreatureTarget->GetPositionZ(), pCreatureTarget->GetOrientation(), TEMPSUMMON_DEAD_DESPAWN, 0); } return true; } diff --git a/scripts/northrend/naxxramas/instance_naxxramas.cpp b/scripts/northrend/naxxramas/instance_naxxramas.cpp index 1be9d7d25..2c38e6f25 100644 --- a/scripts/northrend/naxxramas/instance_naxxramas.cpp +++ b/scripts/northrend/naxxramas/instance_naxxramas.cpp @@ -582,6 +582,7 @@ void instance_naxxramas::GetGothSummonPointCreatures(std::list &lList } } +// Right is right side from gothik (eastern) bool instance_naxxramas::IsInRightSideGothArea(Unit* pUnit) { if (GameObject* pCombatGate = GetSingleGameObjectFromStorage(GO_MILI_GOTH_COMBAT_GATE)) diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index bfa8e1d87..501d2c2a7 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2343" + #define SD2_REVISION_NR "2344" #endif // __SD2_REVISION_NR_H__ From b0fc1143e6efd4f5f415d15838ce4d8eeb219ec8 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sat, 19 Nov 2011 02:21:08 +0200 Subject: [PATCH 0329/1172] [2345] Add some more improvements to quest 9364 Note: npcs 7885, 7886, 12204, 12205 aren't related to the quest, so they were removed and will be scripted in ACID --- scripts/kalimdor/azshara.cpp | 100 ++++++++++++++++++++++++++++++++- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 2 +- sql/updates/r2345_mangos.sql | 1 + 4 files changed, 102 insertions(+), 3 deletions(-) create mode 100644 sql/updates/r2345_mangos.sql diff --git a/scripts/kalimdor/azshara.cpp b/scripts/kalimdor/azshara.cpp index f5bdc9c66..537afe525 100644 --- a/scripts/kalimdor/azshara.cpp +++ b/scripts/kalimdor/azshara.cpp @@ -249,17 +249,72 @@ enum // quest related SPELL_POLYMORPH_BACKFIRE = 28406, // summons npc 16479 QUEST_FRAGMENTED_MAGIC = 9364, + + + // npc spells + SPELL_DISARM = 6713, // warrior + SPELL_SCREECH = 3589, // screamer + SPELL_FROST_SHOCK = 12548, // serpent guard + SPELL_RENEW = 11640, // siren + SPELL_SHOOT = 6660, + SPELL_FROST_SHOT = 12551, + SPELL_FROST_NOVA = 11831, + SPELL_STRIKE = 11976, // myrmidon + + NPC_SPITELASH_WARRIOR = 6190, + NPC_SPITELASH_SCREAMER = 6193, + NPC_SPITELASH_GUARD = 6194, + NPC_SPITELASH_SIREN = 6195, + NPC_SPITELASH_MYRMIDON = 6196, + + TARGET_TYPE_RANDOM = 0, + TARGET_TYPE_VICTIM = 1, + TARGET_TYPE_SELF = 2, + TARGET_TYPE_FRIENDLY = 3, +}; + +struct SpitelashAbilityStruct +{ + uint32 m_uiCreatureEntry, m_uiSpellId; + uint8 m_uiTargetType; + uint32 m_uiInitialTimer, m_uiCooldown; +}; + +static SpitelashAbilityStruct m_aSpitelashAbility[8] = +{ + {NPC_SPITELASH_WARRIOR, SPELL_DISARM, TARGET_TYPE_VICTIM, 4000, 10000}, + {NPC_SPITELASH_SCREAMER, SPELL_SCREECH, TARGET_TYPE_SELF, 7000, 15000}, + {NPC_SPITELASH_GUARD, SPELL_FROST_SHOCK, TARGET_TYPE_VICTIM, 7000, 13000}, + {NPC_SPITELASH_SIREN, SPELL_RENEW, TARGET_TYPE_FRIENDLY, 4000, 7000}, + {NPC_SPITELASH_SIREN, SPELL_SHOOT, TARGET_TYPE_RANDOM, 3000, 9000}, + {NPC_SPITELASH_SIREN, SPELL_FROST_SHOT, TARGET_TYPE_RANDOM, 7000, 10000}, + {NPC_SPITELASH_SIREN, SPELL_FROST_NOVA, TARGET_TYPE_SELF, 10000, 15000}, + {NPC_SPITELASH_MYRMIDON, SPELL_STRIKE, TARGET_TYPE_VICTIM, 3000, 7000} }; struct MANGOS_DLL_DECL mobs_spitelashesAI : public ScriptedAI { - mobs_spitelashesAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + mobs_spitelashesAI(Creature* pCreature) : ScriptedAI(pCreature) + { + for (uint8 i = 0; i < sizeof(m_aSpitelashAbility); ++i) + { + if (m_aSpitelashAbility[i].m_uiCreatureEntry == m_creature->GetEntry()) + m_mSpellTimers[i] = m_aSpitelashAbility[i].m_uiInitialTimer; + } + + Reset(); + } uint32 m_uiMorphTimer; + UNORDERED_MAP m_mSpellTimers; + void Reset() { m_uiMorphTimer = 0; + + for (UNORDERED_MAP::iterator itr = m_mSpellTimers.begin(); itr != m_mSpellTimers.end(); ++itr) + itr->second = m_aSpitelashAbility[itr->first].m_uiInitialTimer; } void SpellHit(Unit* pCaster, const SpellEntry* pSpell) @@ -274,6 +329,35 @@ struct MANGOS_DLL_DECL mobs_spitelashesAI : public ScriptedAI m_uiMorphTimer = 5000; } + bool CanUseSpecialAbility(uint32 uiIndex) + { + Unit* pTarget = NULL; + + switch(m_aSpitelashAbility[uiIndex].m_uiTargetType) + { + case TARGET_TYPE_SELF: + pTarget = m_creature; + break; + case TARGET_TYPE_VICTIM: + pTarget = m_creature->getVictim(); + break; + case TARGET_TYPE_RANDOM: + pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0, m_aSpitelashAbility[uiIndex].m_uiSpellId, SELECT_FLAG_IN_LOS); + break; + case TARGET_TYPE_FRIENDLY: + pTarget = DoSelectLowestHpFriendly(10.0f); + break; + } + + if (pTarget) + { + if (DoCastSpellIfCan(pTarget, m_aSpitelashAbility[uiIndex].m_uiSpellId) == CAST_OK) + return true; + } + + return false; + } + void UpdateAI(const uint32 uiDiff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) @@ -293,6 +377,20 @@ struct MANGOS_DLL_DECL mobs_spitelashesAI : public ScriptedAI m_uiMorphTimer -= uiDiff; } + for (UNORDERED_MAP::iterator itr = m_mSpellTimers.begin(); itr != m_mSpellTimers.end(); ++itr) + { + if (itr->second < uiDiff) + { + if (CanUseSpecialAbility(itr->first)) + { + itr->second = m_aSpitelashAbility[itr->first].m_uiCooldown; + break; + } + } + else + itr->second -= uiDiff; + } + DoMeleeAttackIfReady(); } }; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 501d2c2a7..3c4c359a9 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2344" + #define SD2_REVISION_NR "2345" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index db17ea9e1..a6d67ae7b 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -238,7 +238,7 @@ UPDATE instance_template SET ScriptName='instance_azjol-nerub' WHERE map=601; UPDATE creature_template SET ScriptName='npc_rizzle_sprysprocket' WHERE entry=23002; UPDATE creature_template SET ScriptName='npc_depth_charge' WHERE entry=23025; UPDATE gameobject_template SET ScriptName='go_southfury_moonstone' WHERE entry=185566; -UPDATE creature_template SET ScriptName='mobs_spitelashes' WHERE entry IN (6190,6193,6194,6195,6196,7885,7886,12204,12205); +UPDATE creature_template SET ScriptName='mobs_spitelashes' WHERE entry IN (6190,6193,6194,6195,6196); UPDATE creature_template SET ScriptName='npc_loramus_thalipedes' WHERE entry=7783; /* AZUREMYST ISLE */ diff --git a/sql/updates/r2345_mangos.sql b/sql/updates/r2345_mangos.sql new file mode 100644 index 000000000..bc69bcb7e --- /dev/null +++ b/sql/updates/r2345_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='' WHERE entry IN (7885,7886,12204,12205); From a29918ab49249fa3f2a2bba6b32ce95df5d22fa5 Mon Sep 17 00:00:00 2001 From: Cher0 Date: Sat, 19 Nov 2011 13:10:20 +0100 Subject: [PATCH 0330/1172] [2346] Make First Aid Quest NPC's health loss tick-intervall independend Signed-off-by: Schmoozerd --- scripts/world/npcs_special.cpp | 7 ++++--- sd2_revision_nr.h | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/scripts/world/npcs_special.cpp b/scripts/world/npcs_special.cpp index 2bdae858c..d32cb45f4 100644 --- a/scripts/world/npcs_special.cpp +++ b/scripts/world/npcs_special.cpp @@ -604,12 +604,13 @@ struct MANGOS_DLL_DECL npc_injured_patientAI : public ScriptedAI void UpdateAI(const uint32 diff) { //lower HP on every world tick makes it a useful counter, not officlone though - if (m_creature->isAlive() && m_creature->GetHealth() > 6) + uint32 uiHPLose = uint32(0.05f * diff); + if (m_creature->isAlive() && m_creature->GetHealth() > 1 + uiHPLose) { - m_creature->SetHealth(uint32(m_creature->GetHealth()-5)); + m_creature->SetHealth(m_creature->GetHealth() - uiHPLose); } - if (m_creature->isAlive() && m_creature->GetHealth() <= 6) + if (m_creature->isAlive() && m_creature->GetHealth() <= 1 + uiHPLose) { m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IN_COMBAT); m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 3c4c359a9..c33d2edcf 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2345" + #define SD2_REVISION_NR "2346" #endif // __SD2_REVISION_NR_H__ From 118f3b1770cddbf66f5f74ab34109822eb301ca2 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Fri, 25 Nov 2011 00:55:55 +0200 Subject: [PATCH 0331/1172] [2347] Implement spawn support for Kil'jaeden Also fix some small things to Kalecgos --- .../sunwell_plateau/boss_kalecgos.cpp | 6 +- .../sunwell_plateau/boss_kiljaeden.cpp | 69 ++++++++++++++++++- .../instance_sunwell_plateau.cpp | 22 ++++++ .../sunwell_plateau/sunwell_plateau.h | 11 ++- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 + sql/updates/r2347_mangos.sql | 1 + 7 files changed, 103 insertions(+), 9 deletions(-) create mode 100644 sql/updates/r2347_mangos.sql diff --git a/scripts/eastern_kingdoms/sunwell_plateau/boss_kalecgos.cpp b/scripts/eastern_kingdoms/sunwell_plateau/boss_kalecgos.cpp index 22c0f4748..8c34496e2 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/boss_kalecgos.cpp +++ b/scripts/eastern_kingdoms/sunwell_plateau/boss_kalecgos.cpp @@ -239,7 +239,7 @@ struct MANGOS_DLL_DECL boss_kalecgosAI : public ScriptedAI void UpdateAI(const uint32 uiDiff) { - if (!m_creature->getVictim() || !m_creature->SelectHostileTarget()) + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; if (m_bIsBanished) @@ -413,7 +413,7 @@ struct MANGOS_DLL_DECL boss_sathrovarrAI : public ScriptedAI void UpdateAI(const uint32 uiDiff) { - if (!m_creature->getVictim() || !m_creature->SelectHostileTarget()) + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; if (m_bIsBanished) @@ -512,7 +512,7 @@ struct MANGOS_DLL_DECL boss_kalecgos_humanoidAI : public ScriptedAI void UpdateAI(const uint32 uiDiff) { - if (!m_creature->getVictim() || !m_creature->SelectHostileTarget()) + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; if (m_uiRevitalizeTimer < uiDiff) diff --git a/scripts/eastern_kingdoms/sunwell_plateau/boss_kiljaeden.cpp b/scripts/eastern_kingdoms/sunwell_plateau/boss_kiljaeden.cpp index d9db5bfb9..2f79d3ef2 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/boss_kiljaeden.cpp +++ b/scripts/eastern_kingdoms/sunwell_plateau/boss_kiljaeden.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: boss_kiljaeden -SD%Complete: -SDComment: +SD%Complete: 10 +SDComment: Only spawn support SDCategory: Sunwell Plateau EndScriptData */ @@ -57,8 +57,73 @@ enum SAY_KALECGOS_ORB_2 = -1580092, SAY_KALECGOS_ORB_3 = -1580093, SAY_KALECGOS_ORB_4 = -1580094, + + SPELL_BIRTH = 45464, // Kiljaeden spawn animation +}; + +struct MANGOS_DLL_DECL boss_kiljaedenAI : public Scripted_NoMovementAI +{ + boss_kiljaedenAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) + { + m_pInstance = ((instance_sunwell_plateau*)pCreature->GetInstanceData()); + Reset(); + } + + instance_sunwell_plateau* m_pInstance; + + void Reset() + { + } + + void Aggro(Unit* pWho) + { + if (m_pInstance) + m_pInstance->SetData(TYPE_KILJAEDEN, IN_PROGRESS); + + DoScriptText(SAY_EMERGE, m_creature); + DoCastSpellIfCan(m_creature, SPELL_BIRTH); + } + + void JustReachedHome() + { + if (m_pInstance) + m_pInstance->SetData(TYPE_KILJAEDEN, FAIL); + + // Despawn on wipe + m_creature->ForcedDespawn(); + } + + void KilledUnit(Unit* pVictim) + { + DoScriptText(urand(0, 1) ? SAY_SLAY_1 : SAY_SLAY_2, m_creature); + } + + void JustDied(Unit* pKiller) + { + if (m_pInstance) + m_pInstance->SetData(TYPE_KILJAEDEN, DONE); + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + DoMeleeAttackIfReady(); + } }; +CreatureAI* GetAI_boss_kiljaeden(Creature *pCreature) +{ + return new boss_kiljaedenAI(pCreature); +} + void AddSC_boss_kiljaeden() { + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name="boss_kiljaeden"; + pNewScript->GetAI = &GetAI_boss_kiljaeden; + pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/sunwell_plateau/instance_sunwell_plateau.cpp b/scripts/eastern_kingdoms/sunwell_plateau/instance_sunwell_plateau.cpp index d554c0996..615cbdb02 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/instance_sunwell_plateau.cpp +++ b/scripts/eastern_kingdoms/sunwell_plateau/instance_sunwell_plateau.cpp @@ -35,6 +35,7 @@ EndScriptData */ instance_sunwell_plateau::instance_sunwell_plateau(Map* pMap) : ScriptedInstance(pMap), m_uiMuruBerserkTimer(0), + m_uiDeceiversKilled(0), m_uiSpectralRealmTimer(5000) { Initialize(); @@ -67,11 +68,29 @@ void instance_sunwell_plateau::OnCreatureCreate(Creature* pCreature) case NPC_SACROLASH: case NPC_MURU: case NPC_ENTROPIUS: + case NPC_KILJAEDEN_CONTROLLER: m_mNpcEntryGuidStore[pCreature->GetEntry()] = pCreature->GetObjectGuid(); break; } } +void instance_sunwell_plateau::OnCreatureDeath(Creature* pCreature) +{ + if (pCreature->GetEntry() == NPC_DECEIVER) + { + ++m_uiDeceiversKilled; + // Spawn Kiljaeden when all deceivers are killed + if (m_uiDeceiversKilled == MAX_DECEIVERS) + { + if (Creature* pController = GetSingleCreatureFromStorage(NPC_KILJAEDEN_CONTROLLER)) + { + if (Creature* pKiljaeden = pController->SummonCreature(NPC_KILJAEDEN, pController->GetPositionX(), pController->GetPositionY(), pController->GetPositionZ(), pController->GetOrientation(), TEMPSUMMON_DEAD_DESPAWN, 0)) + pKiljaeden->SetInCombatWithZone(); + } + } + } +} + void instance_sunwell_plateau::OnObjectCreate(GameObject* pGo) { switch(pGo->GetEntry()) @@ -155,6 +174,9 @@ void instance_sunwell_plateau::SetData(uint32 uiType, uint32 uiData) break; case TYPE_KILJAEDEN: m_auiEncounter[uiType] = uiData; + // When event fails the deceivers are respawned so restart the counter + if (uiData == FAIL) + m_uiDeceiversKilled = 0; break; case DATA_SET_SPECTRAL_CHECK: m_uiSpectralRealmTimer = uiData; diff --git a/scripts/eastern_kingdoms/sunwell_plateau/sunwell_plateau.h b/scripts/eastern_kingdoms/sunwell_plateau/sunwell_plateau.h index 80bc91e1e..d36c668fc 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/sunwell_plateau.h +++ b/scripts/eastern_kingdoms/sunwell_plateau/sunwell_plateau.h @@ -28,8 +28,9 @@ enum NPC_SACROLASH = 25165, NPC_MURU = 25741, NPC_ENTROPIUS = 25840, - // NPC_KILJAEDEN = 25315, - // NPC_KILJAEDEN_CONTROLLER = 25608, // kiljaeden event controller + NPC_DECEIVER = 25588, + NPC_KILJAEDEN = 25315, + NPC_KILJAEDEN_CONTROLLER = 25608, // kiljaeden event controller // NPC_ANVEENA = 26046, // related to kiljaeden event // NPC_KALECGOS = 25319, // related to kiljaeden event @@ -55,7 +56,9 @@ enum SPELL_SPECTRAL_REALM_FORCE_FACTION = 44852, // used by both muru and entropius - SPELL_MURU_BERSERK = 26662, + SPELL_MURU_BERSERK = 26662, + + MAX_DECEIVERS = 3 }; class MANGOS_DLL_DECL instance_sunwell_plateau : public ScriptedInstance @@ -69,6 +72,7 @@ class MANGOS_DLL_DECL instance_sunwell_plateau : public ScriptedInstance void OnObjectCreate(GameObject* pGo); void OnCreatureCreate(Creature* pCreature); + void OnCreatureDeath(Creature* pCreature); void SetData(uint32 uiType, uint32 uiData); void SetData64(uint32 uiType, uint64 uiData); @@ -86,6 +90,7 @@ class MANGOS_DLL_DECL instance_sunwell_plateau : public ScriptedInstance std::string m_strInstData; // Misc + uint8 m_uiDeceiversKilled; uint32 m_uiSpectralRealmTimer; uint32 m_uiMuruBerserkTimer; GUIDList m_lSpectralRealmList; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index c33d2edcf..873a37b6a 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2346" + #define SD2_REVISION_NR "2347" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index a6d67ae7b..5e25417e8 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -1065,6 +1065,7 @@ UPDATE creature_template SET ScriptName='boss_muru' WHERE entry=25741; UPDATE creature_template SET ScriptName='boss_entropius' WHERE entry=25840; UPDATE creature_template SET ScriptName='npc_portal_target' WHERE entry=25770; UPDATE creature_template SET ScriptName='npc_void_sentinel_summoner' WHERE entry=25782; +UPDATE creature_template SET ScriptName='boss_kiljaeden' WHERE entry=25315; /* SWAMP OF SORROWS */ UPDATE creature_template SET ScriptName='npc_galen_goodward' WHERE entry=5391; diff --git a/sql/updates/r2347_mangos.sql b/sql/updates/r2347_mangos.sql new file mode 100644 index 000000000..564129a52 --- /dev/null +++ b/sql/updates/r2347_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='boss_kiljaeden' WHERE entry=25315; From dd2911a6153ab880217cb1f2fc6faa6226075c68 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Fri, 25 Nov 2011 21:58:27 +0200 Subject: [PATCH 0332/1172] [2348] Add texts for Kil'jaeden epilogue event --- .../sunwell_plateau/boss_kiljaeden.cpp | 22 +++++++++++++++++++ .../sunwell_plateau/sunwell_plateau.h | 2 ++ sd2_revision_nr.h | 2 +- sql/scriptdev2_script_full.sql | 15 ++++++++++++- sql/updates/r2348_scriptdev2.sql | 14 ++++++++++++ 5 files changed, 53 insertions(+), 2 deletions(-) create mode 100644 sql/updates/r2348_scriptdev2.sql diff --git a/scripts/eastern_kingdoms/sunwell_plateau/boss_kiljaeden.cpp b/scripts/eastern_kingdoms/sunwell_plateau/boss_kiljaeden.cpp index 2f79d3ef2..247be4682 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/boss_kiljaeden.cpp +++ b/scripts/eastern_kingdoms/sunwell_plateau/boss_kiljaeden.cpp @@ -58,7 +58,29 @@ enum SAY_KALECGOS_ORB_3 = -1580093, SAY_KALECGOS_ORB_4 = -1580094, + // outro + SAY_OUTRO_1 = -1580095, // Velen + SAY_OUTRO_2 = -1580096, + SAY_OUTRO_3 = -1580097, + SAY_OUTRO_4 = -1580098, + SAY_OUTRO_5 = -1580099, // Liadrin + SAY_OUTRO_6 = -1580100, // Velen + SAY_OUTRO_7 = -1580101, // Liadrin + SAY_OUTRO_8 = -1580102, // Velen + SAY_OUTRO_9 = -1580103, + SAY_OUTRO_10 = -1580104, // Liadrin + SAY_OUTRO_11 = -1580105, // Velen + SAY_OUTRO_12 = -1580106, + + // spells SPELL_BIRTH = 45464, // Kiljaeden spawn animation + + // outro + SPELL_ENTROPIUS_BODY = 46819, + SPELL_CALL_ENTROPIUS = 46818, + + NPC_VELEN_PORTAL = 24925, + NPC_CORE_ENTROPIUS = 26262, }; struct MANGOS_DLL_DECL boss_kiljaedenAI : public Scripted_NoMovementAI diff --git a/scripts/eastern_kingdoms/sunwell_plateau/sunwell_plateau.h b/scripts/eastern_kingdoms/sunwell_plateau/sunwell_plateau.h index d36c668fc..079376333 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/sunwell_plateau.h +++ b/scripts/eastern_kingdoms/sunwell_plateau/sunwell_plateau.h @@ -33,6 +33,8 @@ enum NPC_KILJAEDEN_CONTROLLER = 25608, // kiljaeden event controller // NPC_ANVEENA = 26046, // related to kiljaeden event // NPC_KALECGOS = 25319, // related to kiljaeden event + NPC_VELEN = 26246, + NPC_LIADRIN = 26247, GO_FORCEFIELD = 188421, // kalecgos door + collisions GO_BOSS_COLLISION_1 = 188523, diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 873a37b6a..01ec62b00 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2347" + #define SD2_REVISION_NR "2348" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 8a3e766c9..cbf923587 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -2686,7 +2686,20 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1580091,'I will channel my power into the orbs, be ready!',12440,1,0,0,'kalecgos SAY_KALECGOS_ORB_1'), (-1580092,'I have empowered another orb! Use it quickly!',12441,1,0,0,'kalecgos SAY_KALECGOS_ORB_2'), (-1580093,'Another orb is ready! Make haste!',12442,1,0,0,'kalecgos SAY_KALECGOS_ORB_3'), -(-1580094,'I have channeled all I can! The power is in your hands!',12443,1,0,0,'kalecgos SAY_KALECGOS_ORB_4'); +(-1580094,'I have channeled all I can! The power is in your hands!',12443,1,0,0,'kalecgos SAY_KALECGOS_ORB_4'), + +(-1580095,'Mortal heroes - your victory here today was foretold long ago. My brother\'s anguished cry of defeat will echo across the universe - bringing renewed hope to all those who still stand against the Burning Crusade.',12515,1,0,0,'velen SAY_OUTRO_1'), +(-1580096,'As the Legion\'s final defeat draws ever-nearer, stand proud in the knowledge that you have saved worlds without number from the flame.',12516,1,0,0,'velen SAY_OUTRO_2'), +(-1580097,'Just as this day marks an ending, so too does it herald a new beginning...',12517,1,0,0,'velen SAY_OUTRO_3'), +(-1580098,'The creature Entropius, whom you were forced to destroy, was once the noble naaru, M\'uru. In life, M\'uru channeled vast energies of LIGHT and HOPE. For a time, a misguided few sought to steal those energies...',12518,1,0,0,'velen SAY_OUTRO_4'), +(-1580099,'Our arrogance was unpardonable. We damned one of the most noble beings of all. We may never atone for this sin.',12524,1,0,0,'liadrin SAY_OUTRO_5'), +(-1580100,'Than fortunate it is, that I have reclaimed the noble naaru\'s spark from where it fell! Where faith dwells, hope is never lost, young blood elf.',12519,1,0,0,'velen SAY_OUTRO_6'), +(-1580101,'Can it be ?',12525,1,0,0,'liadrin SAY_OUTRO_7'), +(-1580102,'Gaz now, mortals - upon the HEART OF M\'URU! Umblemished. Bathed by the light of Creation - just as it was at the Dawn.',12520,1,0,0,'velen SAY_OUTRO_8'), +(-1580103,'In time, the light and hope held within - will rebirth more than this mere fount of power... Mayhap, they will rebirth the soul of a nation.',12521,1,0,0,'velen SAY_OUTRO_9'), +(-1580104,'Blessed ancestors! I feel it... so much love... so much grace... there are... no words... impossible to describe...',12526,1,0,0,'liadrin SAY_OUTRO_10'), +(-1580105,'Salvation, young one. It waits for us all.',12522,1,0,0,'velen SAY_OUTRO_11'), +(-1580106,'Farewell...!',12523,1,0,0,'velen SAY_OUTRO_12'); -- -1 585 000 MAGISTER'S TERRACE INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES diff --git a/sql/updates/r2348_scriptdev2.sql b/sql/updates/r2348_scriptdev2.sql new file mode 100644 index 000000000..5ab80f170 --- /dev/null +++ b/sql/updates/r2348_scriptdev2.sql @@ -0,0 +1,14 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1580106 AND -1580095; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1580095,'Mortal heroes - your victory here today was foretold long ago. My brother\'s anguished cry of defeat will echo across the universe - bringing renewed hope to all those who still stand against the Burning Crusade.',12515,1,0,0,'velen SAY_OUTRO_1'), +(-1580096,'As the Legion\'s final defeat draws ever-nearer, stand proud in the knowledge that you have saved worlds without number from the flame.',12516,1,0,0,'velen SAY_OUTRO_2'), +(-1580097,'Just as this day marks an ending, so too does it herald a new beginning...',12517,1,0,0,'velen SAY_OUTRO_3'), +(-1580098,'The creature Entropius, whom you were forced to destroy, was once the noble naaru, M\'uru. In life, M\'uru channeled vast energies of LIGHT and HOPE. For a time, a misguided few sought to steal those energies...',12518,1,0,0,'velen SAY_OUTRO_4'), +(-1580099,'Our arrogance was unpardonable. We damned one of the most noble beings of all. We may never atone for this sin.',12524,1,0,0,'liadrin SAY_OUTRO_5'), +(-1580100,'Than fortunate it is, that I have reclaimed the noble naaru\'s spark from where it fell! Where faith dwells, hope is never lost, young blood elf.',12519,1,0,0,'velen SAY_OUTRO_6'), +(-1580101,'Can it be ?',12525,1,0,0,'liadrin SAY_OUTRO_7'), +(-1580102,'Gaz now, mortals - upon the HEART OF M\'URU! Umblemished. Bathed by the light of Creation - just as it was at the Dawn.',12520,1,0,0,'velen SAY_OUTRO_8'), +(-1580103,'In time, the light and hope held within - will rebirth more than this mere fount of power... Mayhap, they will rebirth the soul of a nation.',12521,1,0,0,'velen SAY_OUTRO_9'), +(-1580104,'Blessed ancestors! I feel it... so much love... so much grace... there are... no words... impossible to describe...',12526,1,0,0,'liadrin SAY_OUTRO_10'), +(-1580105,'Salvation, young one. It waits for us all.',12522,1,0,0,'velen SAY_OUTRO_11'), +(-1580106,'Farewell...!',12523,1,0,0,'velen SAY_OUTRO_12'); From fef62b897dd35ee3c741fdc6a3ba98fc9b60f143 Mon Sep 17 00:00:00 2001 From: Cupcake Date: Mon, 28 Nov 2011 15:41:28 +0100 Subject: [PATCH 0333/1172] [2349] Fix respawn of eggs and add despawn on FAIL for Jan'alai Signed-off-by: Schmoozerd --- scripts/eastern_kingdoms/zulaman/boss_janalai.cpp | 10 +++++----- .../eastern_kingdoms/zulaman/instance_zulaman.cpp | 13 +++++-------- sd2_revision_nr.h | 2 +- 3 files changed, 11 insertions(+), 14 deletions(-) diff --git a/scripts/eastern_kingdoms/zulaman/boss_janalai.cpp b/scripts/eastern_kingdoms/zulaman/boss_janalai.cpp index b2659500a..a55f81056 100644 --- a/scripts/eastern_kingdoms/zulaman/boss_janalai.cpp +++ b/scripts/eastern_kingdoms/zulaman/boss_janalai.cpp @@ -729,13 +729,13 @@ struct MANGOS_DLL_DECL npc_hatchlingAI : public ScriptedAI if (!m_bIsStarted) { if (m_creature->GetPositionY() > 1150) - m_creature->GetMotionMaster()->MovePoint(0, hatcherway_l[3][0]+rand()%4-2,hatcherway_l[3][1]+rand()%4-2,hatcherway_l[3][2]); + m_creature->GetMotionMaster()->MovePoint(0, hatcherway_l[3][0] + rand()%4-2, hatcherway_l[3][1] + rand()%4-2, hatcherway_l[3][2]); else - m_creature->GetMotionMaster()->MovePoint(0,hatcherway_r[3][0]+rand()%4-2,hatcherway_r[3][1]+rand()%4-2,hatcherway_r[3][2]); + m_creature->GetMotionMaster()->MovePoint(0, hatcherway_r[3][0] + rand()%4-2, hatcherway_r[3][1] + rand()%4-2, hatcherway_r[3][2]); m_bIsStarted = true; } - if (m_pInstance && m_pInstance->GetData(TYPE_JANALAI) == NOT_STARTED) + if (m_pInstance && m_pInstance->GetData(TYPE_JANALAI) == FAIL) { m_creature->ForcedDespawn(); return; @@ -746,8 +746,8 @@ struct MANGOS_DLL_DECL npc_hatchlingAI : public ScriptedAI if (m_uiBufferTimer < uiDiff) { - if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) - DoCastSpellIfCan(target,SPELL_FLAMEBUFFED); + if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + DoCastSpellIfCan(target, SPELL_FLAMEBUFFED); m_uiBufferTimer = 7000; } diff --git a/scripts/eastern_kingdoms/zulaman/instance_zulaman.cpp b/scripts/eastern_kingdoms/zulaman/instance_zulaman.cpp index a6645af6e..aa7855854 100644 --- a/scripts/eastern_kingdoms/zulaman/instance_zulaman.cpp +++ b/scripts/eastern_kingdoms/zulaman/instance_zulaman.cpp @@ -187,20 +187,17 @@ void instance_zulaman::SetData(uint32 uiType, uint32 uiData) m_auiEncounter[2] = uiData; break; case TYPE_JANALAI: - if (uiData == NOT_STARTED) + if (uiData == FAIL) { m_uiEggsRemainingCount_Left = 20; m_uiEggsRemainingCount_Right = 20; - if (!m_lEggsGUIDList.empty()) + for(GUIDList::const_iterator itr = m_lEggsGUIDList.begin(); itr != m_lEggsGUIDList.end(); ++itr) { - for(GUIDList::const_iterator itr = m_lEggsGUIDList.begin(); itr != m_lEggsGUIDList.end(); ++itr) + if (Creature* pEgg = instance->GetCreature(*itr)) { - if (Creature* pEgg = instance->GetCreature(*itr)) - { - if (!pEgg->isAlive()) - pEgg->Respawn(); - } + if (!pEgg->isAlive()) + pEgg->Respawn(); } } } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 01ec62b00..18cab624b 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2348" + #define SD2_REVISION_NR "2349" #endif // __SD2_REVISION_NR_H__ From e04ba00a88e430f7f71a06441baafc606369d27b Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Mon, 28 Nov 2011 16:11:27 +0100 Subject: [PATCH 0334/1172] [2350] Reorder TYPE numbering in Zul'Aman --- .../zulaman/instance_zulaman.cpp | 99 ++++++++++--------- scripts/eastern_kingdoms/zulaman/zulaman.h | 21 ++-- sd2_revision_nr.h | 2 +- 3 files changed, 61 insertions(+), 61 deletions(-) diff --git a/scripts/eastern_kingdoms/zulaman/instance_zulaman.cpp b/scripts/eastern_kingdoms/zulaman/instance_zulaman.cpp index aa7855854..a38079a8e 100644 --- a/scripts/eastern_kingdoms/zulaman/instance_zulaman.cpp +++ b/scripts/eastern_kingdoms/zulaman/instance_zulaman.cpp @@ -74,7 +74,7 @@ void instance_zulaman::OnCreatureCreate(Creature* pCreature) case NPC_HARKOR: m_aEventNpcInfo[INDEX_AKILZON].npGuid = pCreature->GetObjectGuid(); break; case NPC_EGG: - if (m_auiEncounter[3] != DONE) + if (m_auiEncounter[TYPE_JANALAI] != DONE) m_lEggsGUIDList.push_back(pCreature->GetObjectGuid()); break; } @@ -87,7 +87,7 @@ void instance_zulaman::OnObjectCreate(GameObject* pGo) case GO_STRANGE_GONG: break; case GO_MASSIVE_GATE: - if (m_auiEncounter[0] == DONE || m_auiEncounter[0] == FAIL) + if (m_auiEncounter[TYPE_EVENT_RUN] == DONE || m_auiEncounter[TYPE_EVENT_RUN] == FAIL) pGo->SetGoState(GO_STATE_ACTIVE); break; case GO_WIND_DOOR: @@ -95,7 +95,7 @@ void instance_zulaman::OnObjectCreate(GameObject* pGo) case GO_LYNX_TEMPLE_ENTRANCE: break; case GO_LYNX_TEMPLE_EXIT: - if (m_auiEncounter[4] == DONE) + if (m_auiEncounter[TYPE_HALAZZI] == DONE) pGo->SetGoState(GO_STATE_ACTIVE); break; case GO_HEXLORD_ENTRANCE: @@ -103,7 +103,7 @@ void instance_zulaman::OnObjectCreate(GameObject* pGo) pGo->SetGoState(GO_STATE_ACTIVE); break; case GO_WOODEN_DOOR: - if (m_auiEncounter[5] == DONE) + if (m_auiEncounter[TYPE_MALACRASS] == DONE) pGo->SetGoState(GO_STATE_ACTIVE); break; case GO_FIRE_DOOR: @@ -119,22 +119,22 @@ void instance_zulaman::SetData(uint32 uiType, uint32 uiData) { debug_log("SD2: Instance Zulaman: SetData received for type %u with data %u",uiType,uiData); - switch(uiType) + switch (uiType) { case TYPE_EVENT_RUN: if (uiData == SPECIAL) { ++m_uiGongCount; if (m_uiGongCount == 5) - m_auiEncounter[0] = uiData; + m_auiEncounter[TYPE_EVENT_RUN] = uiData; return; } if (uiData == IN_PROGRESS) { DoTimeRunSay(RUN_START); DoUseDoorOrButton(GO_MASSIVE_GATE); - if (m_auiEncounter[7]) - SetData(TYPE_RUN_EVENT_TIME, m_auiEncounter[7]); + if (m_auiEncounter[TYPE_RUN_EVENT_TIME]) + SetData(TYPE_RUN_EVENT_TIME, m_auiEncounter[TYPE_RUN_EVENT_TIME]); else SetData(TYPE_RUN_EVENT_TIME, 20); // 20 Minutes as default time DoUpdateWorldState(WORLD_STATE_ID, 1); @@ -159,32 +159,32 @@ void instance_zulaman::SetData(uint32 uiType, uint32 uiData) DoTimeRunSay(RUN_DONE); DoUpdateWorldState(WORLD_STATE_ID, 0); } - m_auiEncounter[0] = uiData; + m_auiEncounter[uiType] = uiData; break; case TYPE_AKILZON: DoUseDoorOrButton(GO_WIND_DOOR); if (uiData == DONE) { - if (m_auiEncounter[0] == IN_PROGRESS) + if (m_auiEncounter[TYPE_EVENT_RUN] == IN_PROGRESS) { - m_auiEncounter[7] += 10; // Add 10 minutes - SetData(TYPE_RUN_EVENT_TIME, m_auiEncounter[7]); + m_auiEncounter[TYPE_RUN_EVENT_TIME] += 10; // Add 10 minutes + SetData(TYPE_RUN_EVENT_TIME, m_auiEncounter[TYPE_RUN_EVENT_TIME]); DoChestEvent(INDEX_AKILZON); } } - m_auiEncounter[1] = uiData; + m_auiEncounter[uiType] = uiData; break; case TYPE_NALORAKK: if (uiData == DONE) { - if (m_auiEncounter[0] == IN_PROGRESS) + if (m_auiEncounter[TYPE_EVENT_RUN] == IN_PROGRESS) { - m_auiEncounter[7] += 15; // Add 15 minutes - SetData(TYPE_RUN_EVENT_TIME, m_auiEncounter[7]); + m_auiEncounter[TYPE_RUN_EVENT_TIME] += 15; // Add 15 minutes + SetData(TYPE_RUN_EVENT_TIME, m_auiEncounter[TYPE_RUN_EVENT_TIME]); DoChestEvent(INDEX_NALORAKK); } } - m_auiEncounter[2] = uiData; + m_auiEncounter[uiType] = uiData; break; case TYPE_JANALAI: if (uiData == FAIL) @@ -205,31 +205,36 @@ void instance_zulaman::SetData(uint32 uiType, uint32 uiData) { m_lEggsGUIDList.clear(); - if (m_auiEncounter[0] == IN_PROGRESS) + if (m_auiEncounter[TYPE_EVENT_RUN] == IN_PROGRESS) DoChestEvent(INDEX_JANALAI); } - m_auiEncounter[3] = uiData; + m_auiEncounter[uiType] = uiData; break; case TYPE_HALAZZI: DoUseDoorOrButton(GO_LYNX_TEMPLE_ENTRANCE); if (uiData == DONE) { DoUseDoorOrButton(GO_LYNX_TEMPLE_EXIT); - if (m_auiEncounter[0] == IN_PROGRESS) + if (m_auiEncounter[TYPE_EVENT_RUN] == IN_PROGRESS) DoChestEvent(INDEX_HALAZZI); } - m_auiEncounter[4] = uiData; + m_auiEncounter[uiType] = uiData; break; case TYPE_MALACRASS: DoUseDoorOrButton(GO_HEXLORD_ENTRANCE); if (uiData == DONE) DoUseDoorOrButton(GO_WOODEN_DOOR); - m_auiEncounter[5] = uiData; + m_auiEncounter[uiType] = uiData; break; case TYPE_ZULJIN: DoUseDoorOrButton(GO_FIRE_DOOR); - m_auiEncounter[6] = uiData; + m_auiEncounter[uiType] = uiData; break; + case TYPE_RUN_EVENT_TIME: + m_auiEncounter[uiType] = uiData; + DoUpdateWorldState(WORLD_STATE_COUNTER, m_auiEncounter[uiType]); + break; + case TYPE_J_EGGS_RIGHT: --m_uiEggsRemainingCount_Right; break; @@ -243,20 +248,15 @@ void instance_zulaman::SetData(uint32 uiType, uint32 uiData) m_auiRandVendor[1] = uiData; break; - case TYPE_RUN_EVENT_TIME: - m_auiEncounter[7] = uiData; - DoUpdateWorldState(WORLD_STATE_COUNTER, m_auiEncounter[7]); - break; - default: - error_log("SD2: Instance Zulaman: ERROR SetData = %u for type %u does not exist/not implemented.",uiType,uiData); + error_log("SD2: Instance Zulaman: ERROR SetData = %u for type %u does not exist/not implemented.", uiType, uiData); return; } if (uiData == DONE && GetKilledPreBosses() == 4 && (uiType == TYPE_AKILZON || uiType == TYPE_NALORAKK || uiType == TYPE_JANALAI || uiType == TYPE_HALAZZI)) { DoUseDoorOrButton(GO_HEXLORD_ENTRANCE); - if (m_auiEncounter[0] == IN_PROGRESS) + if (m_auiEncounter[TYPE_EVENT_RUN] == IN_PROGRESS) SetData(TYPE_EVENT_RUN, DONE); } @@ -298,7 +298,7 @@ void instance_zulaman::Load(const char* chrIn) } // Restart TYPE_EVENT_RUN if was already started - if (m_auiEncounter[7] != 0 && m_auiEncounter[0] != DONE && m_auiEncounter[0] != FAIL) + if (m_auiEncounter[TYPE_RUN_EVENT_TIME] != 0 && m_auiEncounter[TYPE_EVENT_RUN] != DONE && m_auiEncounter[TYPE_EVENT_RUN] != FAIL) SetData(TYPE_EVENT_RUN, IN_PROGRESS); OUT_LOAD_INST_DATA_COMPLETE; @@ -306,20 +306,21 @@ void instance_zulaman::Load(const char* chrIn) uint32 instance_zulaman::GetData(uint32 uiType) { - switch(uiType) + switch (uiType) { - case TYPE_EVENT_RUN: return m_auiEncounter[0]; - case TYPE_AKILZON: return m_auiEncounter[1]; - case TYPE_NALORAKK: return m_auiEncounter[2]; - case TYPE_JANALAI: return m_auiEncounter[3]; - case TYPE_HALAZZI: return m_auiEncounter[4]; - case TYPE_ZULJIN: return m_auiEncounter[5]; - case TYPE_MALACRASS: return m_auiEncounter[6]; - case TYPE_J_EGGS_LEFT: return m_uiEggsRemainingCount_Left; - case TYPE_J_EGGS_RIGHT: return m_uiEggsRemainingCount_Right; + case TYPE_EVENT_RUN: + case TYPE_AKILZON: + case TYPE_NALORAKK: + case TYPE_JANALAI: + case TYPE_HALAZZI: + case TYPE_ZULJIN: + case TYPE_MALACRASS: + case TYPE_RUN_EVENT_TIME: + return m_auiEncounter[uiType]; case TYPE_RAND_VENDOR_1: return m_auiRandVendor[0]; case TYPE_RAND_VENDOR_2: return m_auiRandVendor[1]; - + case TYPE_J_EGGS_LEFT: return m_uiEggsRemainingCount_Left; + case TYPE_J_EGGS_RIGHT: return m_uiEggsRemainingCount_Right; default: return 0; } @@ -327,7 +328,7 @@ uint32 instance_zulaman::GetData(uint32 uiType) uint8 instance_zulaman::GetKilledPreBosses() { - return (GetData(TYPE_AKILZON) == DONE ? 1 : 0) + (GetData(TYPE_NALORAKK) == DONE ? 1 : 0) + (GetData(TYPE_JANALAI) == DONE ? 1 : 0) + (GetData(TYPE_HALAZZI) == DONE ? 1 : 0); + return (m_auiEncounter[TYPE_AKILZON] == DONE ? 1 : 0) + (m_auiEncounter[TYPE_NALORAKK] == DONE ? 1 : 0) + (m_auiEncounter[TYPE_JANALAI] == DONE ? 1 : 0) + (m_auiEncounter[TYPE_HALAZZI] == DONE ? 1 : 0); } void instance_zulaman::DoTimeRunSay(RunEventSteps uiData) @@ -372,23 +373,23 @@ void instance_zulaman::DoChestEvent(BossToChestIndex uiIndex) void instance_zulaman::Update(uint32 uiDiff) { - if (GetData(TYPE_EVENT_RUN) == IN_PROGRESS) + if (m_auiEncounter[TYPE_EVENT_RUN] == IN_PROGRESS) { if (m_uiEventTimer <= uiDiff) { - if (m_auiEncounter[7] == 5) // TODO, verify 5min for warning texts + if (m_auiEncounter[TYPE_RUN_EVENT_TIME] == 5) // TODO, verify 5min for warning texts DoTimeRunSay(RUN_FAIL_SOON); - if (m_auiEncounter[7] == 0) + if (m_auiEncounter[TYPE_RUN_EVENT_TIME] == 0) { debug_log("SD2: Instance Zulaman: event time reach end, event failed."); SetData(TYPE_EVENT_RUN, FAIL); return; } - --m_auiEncounter[7]; - SetData(TYPE_RUN_EVENT_TIME, m_auiEncounter[7]); - debug_log("SD2: Instance Zulaman: minute decrease to %u.", m_auiEncounter[7]); + --m_auiEncounter[TYPE_RUN_EVENT_TIME]; + SetData(TYPE_RUN_EVENT_TIME, m_auiEncounter[TYPE_RUN_EVENT_TIME]); + debug_log("SD2: Instance Zulaman: minute decrease to %u.", m_auiEncounter[TYPE_RUN_EVENT_TIME]); m_uiEventTimer = MINUTE*IN_MILLISECONDS; } diff --git a/scripts/eastern_kingdoms/zulaman/zulaman.h b/scripts/eastern_kingdoms/zulaman/zulaman.h index 68ce92acf..17e1bca3d 100644 --- a/scripts/eastern_kingdoms/zulaman/zulaman.h +++ b/scripts/eastern_kingdoms/zulaman/zulaman.h @@ -27,21 +27,20 @@ enum InstanceZA WORLD_STATE_ID = 3104, WORLD_STATE_COUNTER = 3106, - TYPE_EVENT_RUN = 1, - TYPE_AKILZON = 2, - TYPE_NALORAKK = 3, - TYPE_JANALAI = 4, - TYPE_HALAZZI = 5, - TYPE_MALACRASS = 6, - TYPE_ZULJIN = 7, + TYPE_EVENT_RUN = 0, + TYPE_AKILZON = 1, + TYPE_NALORAKK = 2, + TYPE_JANALAI = 3, + TYPE_HALAZZI = 4, + TYPE_MALACRASS = 5, + TYPE_ZULJIN = 6, + TYPE_RUN_EVENT_TIME = 7, // Must be MAX_ENCOUNTER -1 TYPE_RAND_VENDOR_1 = 8, TYPE_RAND_VENDOR_2 = 9, - TYPE_RUN_EVENT_TIME = 10, - - TYPE_J_EGGS_RIGHT = 11, - TYPE_J_EGGS_LEFT = 12, + TYPE_J_EGGS_RIGHT = 10, + TYPE_J_EGGS_LEFT = 11, NPC_AKILZON = 23574, // NPC_NALORAKK = 23576, diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 18cab624b..fe0d48065 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2349" + #define SD2_REVISION_NR "2350" #endif // __SD2_REVISION_NR_H__ From 172cc9c177a6259796065c86dc326ef166dc3c57 Mon Sep 17 00:00:00 2001 From: mns Date: Wed, 30 Nov 2011 14:06:52 +0100 Subject: [PATCH 0335/1172] [2351] Correct bad naming for Zul'Aman Signed-off-by: Schmoozerd --- scripts/eastern_kingdoms/zulaman/zulaman.cpp | 12 ++++++------ sd2_revision_nr.h | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/scripts/eastern_kingdoms/zulaman/zulaman.cpp b/scripts/eastern_kingdoms/zulaman/zulaman.cpp index ea2491716..828b72b9f 100644 --- a/scripts/eastern_kingdoms/zulaman/zulaman.cpp +++ b/scripts/eastern_kingdoms/zulaman/zulaman.cpp @@ -37,7 +37,7 @@ enum { SPELL_REMOVE_AMANI_CURSE = 43732, SPELL_PUSH_MOJO = 43923, - ENTRY_FOREST_FROG = 24396 + NPC_FOREST_FROG = 24396 }; struct MANGOS_DLL_DECL npc_forest_frogAI : public ScriptedAI @@ -93,7 +93,7 @@ struct MANGOS_DLL_DECL npc_forest_frogAI : public ScriptedAI void SpellHit(Unit *caster, const SpellEntry *spell) { - if (spell->Id == SPELL_REMOVE_AMANI_CURSE && caster->GetTypeId() == TYPEID_PLAYER && m_creature->GetEntry() == ENTRY_FOREST_FROG) + if (spell->Id == SPELL_REMOVE_AMANI_CURSE && caster->GetTypeId() == TYPEID_PLAYER && m_creature->GetEntry() == NPC_FOREST_FROG) { //increase or decrease chance of mojo? if (!urand(0, 49)) @@ -143,8 +143,8 @@ struct MANGOS_DLL_DECL npc_harrison_jones_zaAI : public npc_escortAI case 1: DoScriptText(SAY_AT_GONG, m_creature); - if (GameObject* pEntranceDoor = m_pInstance->GetSingleGameObjectFromStorage(GO_STRANGE_GONG)) - pEntranceDoor->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NO_INTERACT); + if (GameObject* pStrangeGong = m_pInstance->GetSingleGameObjectFromStorage(GO_STRANGE_GONG)) + pStrangeGong->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NO_INTERACT); //Start bang gong for 2min m_creature->CastSpell(m_creature, SPELL_BANGING_THE_GONG, false); @@ -153,8 +153,8 @@ struct MANGOS_DLL_DECL npc_harrison_jones_zaAI : public npc_escortAI case 3: DoScriptText(SAY_OPEN_ENTRANCE, m_creature); break; - case 4: - m_pInstance->SetData(TYPE_EVENT_RUN,IN_PROGRESS); + case 4: + m_pInstance->SetData(TYPE_EVENT_RUN, IN_PROGRESS); //TODO: Spawn group of Amani'shi Savage and make them run to entrance break; } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index fe0d48065..a349a5248 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2350" + #define SD2_REVISION_NR "2351" #endif // __SD2_REVISION_NR_H__ From 2ab1a4311561be213293a04e62d1643942dde421 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Wed, 30 Nov 2011 14:11:53 +0100 Subject: [PATCH 0336/1172] [2352] Fix Typo for ICC texts - thanks to Blumster for pointing --- .../icecrown_citadel/icecrown_citadel/blood_prince_council.cpp | 2 +- sd2_revision_nr.h | 2 +- sql/scriptdev2_script_full.sql | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/blood_prince_council.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/blood_prince_council.cpp index 57838d23c..d50f3eb04 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/blood_prince_council.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/blood_prince_council.cpp @@ -30,7 +30,7 @@ enum SAY_KELESETH_INVOCATION = -1631103, SAY_KELESETH_SPECIAL = -1631104, SAY_KELESETH_SLAY_1 = -1631105, - SAY_SKELESETH_SLAY_2 = -1631106, + SAY_KELESETH_SLAY_2 = -1631106, SAY_KELESETH_BERSERK = -1631107, SAY_KELESETH_DEATH = -1631108, SAY_TALDARAM_INVOCATION = -1631109, diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index a349a5248..4ee938b76 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2351" + #define SD2_REVISION_NR "2352" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index cbf923587..ba9de2fcb 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -3624,7 +3624,7 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1631103,'Such wondrous power! The Darkfallen Orb has made me INVINCIBLE!',16727,1,0,0,'keleseth SAY_KELESETH_INVOCATION'), (-1631104,'Blood will flow!',16728,1,0,0,'keleseth SAY_KELESETH_SPECIAL'), (-1631105,'Were you ever a threat?',16723,1,0,0,'keleseth SAY_KELESETH_SLAY_1'), -(-1631106,'Truth is found in death.',16724,1,0,0,'keleseth SAY_SKELESETH_SLAY_2'), +(-1631106,'Truth is found in death.',16724,1,0,0,'keleseth SAY_KELESETH_SLAY_2'), (-1631107,'%s cackles maniacally!',16726,2,0,0,'keleseth SAY_KELESETH_BERSERK'), -- TODO Can be wrong (-1631108,'My queen... they come...',16725,1,0,0,'keleseth SAY_KELESETH_DEATH'), From 010fb78ed066a3db68bf5e33114f14f922ed8e84 Mon Sep 17 00:00:00 2001 From: dufernst Date: Wed, 30 Nov 2011 00:50:14 +0100 Subject: [PATCH 0337/1172] [2353] Additional cleanup with advanced SelectAttackingTarget options. Signed-off-by: Schmoozerd --- .../karazhan/boss_midnight.cpp | 24 ++++----------- .../boss_priestess_delrissa.cpp | 29 ++++++------------- sd2_revision_nr.h | 2 +- 3 files changed, 15 insertions(+), 40 deletions(-) diff --git a/scripts/eastern_kingdoms/karazhan/boss_midnight.cpp b/scripts/eastern_kingdoms/karazhan/boss_midnight.cpp index 1b6fb3bff..c3e912611 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_midnight.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_midnight.cpp @@ -279,27 +279,13 @@ struct MANGOS_DLL_DECL boss_attumenAI : public ScriptedAI { if (m_uiChargeTimer < uiDiff) { - Unit *target = NULL; - std::vector target_list; - - ThreatList const& tList = m_creature->getThreatManager().getThreatList(); - for (ThreatList::const_iterator itr = tList.begin();itr != tList.end(); ++itr) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0, SPELL_BERSERKER_CHARGE, SELECT_FLAG_NOT_IN_MELEE_RANGE | SELECT_FLAG_IN_LOS)) { - target = m_creature->GetMap()->GetUnit((*itr)->getUnitGuid()); - - if (target && !m_creature->CanReachWithMeleeAttack(target)) - target_list.push_back(target); - - target = NULL; + if (DoCastSpellIfCan(pTarget, SPELL_BERSERKER_CHARGE) == CAST_OK) + m_uiChargeTimer = 20000; } - - if (target_list.size()) - { - if (target = *(target_list.begin()+rand()%target_list.size())) - DoCastSpellIfCan(target, SPELL_BERSERKER_CHARGE); - } - - m_uiChargeTimer = 20000; + else + m_uiChargeTimer = 2000; } else m_uiChargeTimer -= uiDiff; diff --git a/scripts/eastern_kingdoms/magisters_terrace/boss_priestess_delrissa.cpp b/scripts/eastern_kingdoms/magisters_terrace/boss_priestess_delrissa.cpp index 0e526aea9..b289e9dfd 100644 --- a/scripts/eastern_kingdoms/magisters_terrace/boss_priestess_delrissa.cpp +++ b/scripts/eastern_kingdoms/magisters_terrace/boss_priestess_delrissa.cpp @@ -867,30 +867,19 @@ struct MANGOS_DLL_DECL boss_warlord_salarisAI : public boss_priestess_lackey_com if (Intercept_Stun_Timer < diff) { - bool InMeleeRange = false; - ThreatList const& tList = m_creature->getThreatManager().getThreatList(); - for (ThreatList::const_iterator itr = tList.begin();itr != tList.end(); ++itr) + //if nobody is in melee range than try to use Intercept + if (!m_creature->SelectAttackingTarget(ATTACKING_TARGET_TOPAGGRO, 0, uint32(0), SELECT_FLAG_IN_MELEE_RANGE)) { - if (Unit* target = m_creature->GetMap()->GetUnit((*itr)->getUnitGuid())) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0, SPELL_INTERCEPT_STUN, SELECT_FLAG_IN_LOS)) { - //if in melee range - if (m_creature->CanReachWithMeleeAttack(target)) - { - InMeleeRange = true; - break; - } + if (DoCastSpellIfCan(pTarget, SPELL_INTERCEPT_STUN) == CAST_OK) + Intercept_Stun_Timer = 10000; } } - - //if nobody is in melee range than try to use Intercept - if (!InMeleeRange) - { - if (Unit* pUnit = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) - DoCastSpellIfCan(pUnit, SPELL_INTERCEPT_STUN); - } - - Intercept_Stun_Timer = 10000; - }else Intercept_Stun_Timer -= diff; + else + Intercept_Stun_Timer = 2000; + }else + Intercept_Stun_Timer -= diff; if (Disarm_Timer < diff) { diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 4ee938b76..4280b82b7 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2352" + #define SD2_REVISION_NR "2353" #endif // __SD2_REVISION_NR_H__ From 536de62ed5bcb7519b3631462e2dcecc4a945fc5 Mon Sep 17 00:00:00 2001 From: NeatElves Date: Thu, 1 Dec 2011 21:38:40 +0100 Subject: [PATCH 0338/1172] [2354] Make quest 9685 compatible independend from DB-data. Also cleanup related file Signed-off-by: Schmoozerd --- scripts/eastern_kingdoms/silvermoon_city.cpp | 43 +++++++++++--------- sd2_revision_nr.h | 2 +- 2 files changed, 24 insertions(+), 21 deletions(-) diff --git a/scripts/eastern_kingdoms/silvermoon_city.cpp b/scripts/eastern_kingdoms/silvermoon_city.cpp index 5c09906a7..7eaf3213f 100644 --- a/scripts/eastern_kingdoms/silvermoon_city.cpp +++ b/scripts/eastern_kingdoms/silvermoon_city.cpp @@ -31,52 +31,55 @@ EndContentData */ # npc_blood_knight_stillblade #######*/ -#define SAY_HEAL -1000193 +enum +{ + QUEST_REDEEMING_THE_DEAD = 9685, -#define QUEST_REDEEMING_THE_DEAD 9685 -#define SPELL_SHIMMERING_VESSEL 31225 -#define SPELL_REVIVE_SELF 32343 + SAY_HEAL = -1000193, + SPELL_SHIMMERING_VESSEL = 31225, + SPELL_REVIVE_SELF = 32343, +}; struct MANGOS_DLL_DECL npc_blood_knight_stillbladeAI : public ScriptedAI { - npc_blood_knight_stillbladeAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + npc_blood_knight_stillbladeAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } - uint32 lifeTimer; - bool spellHit; + uint32 m_uiLifeTimer; + bool m_bSpellHit; void Reset() { - lifeTimer = 120000; + m_uiLifeTimer = 120000; m_creature->SetUInt32Value(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_DEAD); m_creature->SetStandState(UNIT_STAND_STATE_DEAD); - spellHit = false; + m_bSpellHit = false; } - void MoveInLineOfSight(Unit *who) { } + void MoveInLineOfSight(Unit* pWho) {} - void UpdateAI(const uint32 diff) + void UpdateAI(const uint32 uiDiff) { if (m_creature->IsStandState()) { - if (lifeTimer < diff) + if (m_uiLifeTimer < uiDiff) m_creature->AI()->EnterEvadeMode(); else - lifeTimer -= diff; + m_uiLifeTimer -= uiDiff; } } - void SpellHit(Unit *Hitter, const SpellEntry *Spellkind) + void SpellHit(Unit* pCaster, const SpellEntry* pSpellInfo) { - if ((Spellkind->Id == SPELL_SHIMMERING_VESSEL) && !spellHit && - (Hitter->GetTypeId() == TYPEID_PLAYER) && (((Player*)Hitter)->IsActiveQuest(QUEST_REDEEMING_THE_DEAD))) + if ((pSpellInfo->Id == SPELL_SHIMMERING_VESSEL) && !m_bSpellHit && + (pCaster->GetTypeId() == TYPEID_PLAYER) && (((Player*)pCaster)->IsActiveQuest(QUEST_REDEEMING_THE_DEAD))) { - ((Player*)Hitter)->AreaExploredOrEventHappens(QUEST_REDEEMING_THE_DEAD); - DoCastSpellIfCan(m_creature,SPELL_REVIVE_SELF); + ((Player*)pCaster)->KilledMonsterCredit(m_creature->GetEntry(), m_creature->GetObjectGuid()); + DoCastSpellIfCan(m_creature, SPELL_REVIVE_SELF); m_creature->SetStandState(UNIT_STAND_STATE_STAND); m_creature->SetUInt32Value(UNIT_DYNAMIC_FLAGS, 0); //m_creature->RemoveAllAuras(); - DoScriptText(SAY_HEAL, m_creature, Hitter); - spellHit = true; + DoScriptText(SAY_HEAL, m_creature, pCaster); + m_bSpellHit = true; } } }; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 4280b82b7..7fdc2e320 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2353" + #define SD2_REVISION_NR "2354" #endif // __SD2_REVISION_NR_H__ From 2fdfb0f491f96112e8e5bd917310c2f9638e993b Mon Sep 17 00:00:00 2001 From: Xfurry Date: Mon, 5 Dec 2011 22:02:52 +0200 Subject: [PATCH 0339/1172] [2355] Improve script for Kalecgos Note: Crazed Rage spell and Spectral Realm aura removal need further core support --- .../sunwell_plateau/boss_kalecgos.cpp | 277 ++++++++---------- .../instance_sunwell_plateau.cpp | 57 ++-- .../sunwell_plateau/sunwell_plateau.h | 14 +- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 - sql/updates/r2355_mangos.sql | 1 + 6 files changed, 139 insertions(+), 213 deletions(-) create mode 100644 sql/updates/r2355_mangos.sql diff --git a/scripts/eastern_kingdoms/sunwell_plateau/boss_kalecgos.cpp b/scripts/eastern_kingdoms/sunwell_plateau/boss_kalecgos.cpp index 8c34496e2..f5dd47e76 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/boss_kalecgos.cpp +++ b/scripts/eastern_kingdoms/sunwell_plateau/boss_kalecgos.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: Boss_Kalecgos -SD%Complete: 40 -SDComment: Script must be considered not complete. +SD%Complete: 70 +SDComment: Timers; SDCategory: Sunwell Plateau EndScriptData */ @@ -49,33 +49,32 @@ enum SAY_SATH_ENRAGE = -1580016, //Kalecgos - SPELL_SPECTRAL_BLAST_DUMMY = 44869, - SPELL_SPECTRAL_BLAST = 44866, - SPELL_TELEPORT_SPECTRAL_REALM = 46019, - + SPELL_SPECTRAL_BLAST = 44869, + SPELL_SPECTRAL_REALM_EJECT = 44845, // pull the players ouside the spectral realm in case of wipe SPELL_ARCANE_BUFFET = 45018, SPELL_FROST_BREATH = 44799, SPELL_TAIL_LASH = 45122, SPELL_CRAZED_RAGE = 44807, - SPELL_TRANSFORM = 44670, // Kalecgos human SPELL_HEROIC_STRIKE = 45026, SPELL_REVITALIZE = 45027, //Sathrovarr - SPELL_SPECTRAL_INVIS = 44801, + SPELL_SPECTRAL_INVISIBILITY = 44801, SPELL_CORRUPTING_STRIKE = 45029, SPELL_CURSE_OF_BOUNDLESS_AGONY = 45032, SPELL_SHADOW_BOLT_VOLLEY = 45031, + SPELL_TELEPORT_NORMAL_REALM = 46020, + SPELL_SPECTRAL_REALM_AURA = 46021, + SPELL_SPECTRAL_EXHAUSTION = 44867, + //Misc SPELL_BANISH = 44836 }; -static const uint32 aWildMagicSpells[]= {44978, 45001, 45002, 45004, 45006, 45010}; - -//#define NOTIFY_SPECTRALLY_EXHAUSTED "Your body is too exhausted to travel to the Spectral Realm." +static const uint32 aWildMagicSpells[6]= {44978, 45001, 45002, 45004, 45006, 45010}; struct MANGOS_DLL_DECL boss_kalecgosAI : public ScriptedAI { @@ -91,43 +90,53 @@ struct MANGOS_DLL_DECL boss_kalecgosAI : public ScriptedAI uint32 m_uiFrostBreathTimer; uint32 m_uiWildMagicTimer; uint32 m_uiSpectralBlastTimer; + uint32 m_uiTailLashTimer; uint32 m_uiExitTimer; bool m_bIsUncorrupted; bool m_bIsBanished; - bool m_bChecked; bool m_bIsEnraged; - bool m_bHasSpectralTarget; void Reset() { m_uiArcaneBuffetTimer = 8000; + m_uiTailLashTimer = 5000; m_uiFrostBreathTimer = 24000; m_uiWildMagicTimer = 18000; m_uiSpectralBlastTimer = 30000; - - m_uiExitTimer = 0; + m_uiExitTimer = 0; m_bIsUncorrupted = false; m_bIsBanished = false; - m_bChecked = false; m_bIsEnraged = false; - m_bHasSpectralTarget = false; } void JustReachedHome() { - if (m_pInstance) - { - // Reset Sathrovarr too - if (Creature* pSath = m_pInstance->GetSingleCreatureFromStorage(NPC_SATHROVARR)) - { - if (pSath->isAlive() && pSath->getVictim()) - pSath->AI()->EnterEvadeMode(); - } + // Eject all players and set event to fail + DoCastSpellIfCan(m_creature, SPELL_SPECTRAL_REALM_EJECT, CAST_TRIGGERED); + if (m_pInstance) m_pInstance->SetData(TYPE_KALECGOS, FAIL); + } + + void EnterEvadeMode() + { + // Check if the boss is uncorrupted when evading + if (m_bIsUncorrupted) + { + m_creature->RemoveAllAuras(); + m_creature->DeleteThreatList(); + m_creature->CombatStop(true); + m_creature->LoadCreatureAddon(true); + + m_creature->SetLootRecipient(NULL); + m_creature->GetMotionMaster()->MoveIdle(); + m_creature->SetStandState(UNIT_STAND_STATE_STAND); + return; } + + ScriptedAI::EnterEvadeMode(); } void Aggro(Unit* pWho) @@ -140,20 +149,18 @@ struct MANGOS_DLL_DECL boss_kalecgosAI : public ScriptedAI void DamageTaken(Unit* pDoneBy, uint32 &uiDamage) { - if (uiDamage >= m_creature->GetHealth()) + if (uiDamage > m_creature->GetHealth()) { + uiDamage = 0; + + // If Sathrovarr is not banished yet, then banish the boss if (!m_bIsUncorrupted) { - uiDamage = 0; - m_bIsBanished = true; - DoCastSpellIfCan(m_creature, SPELL_BANISH, CAST_TRIGGERED); - m_creature->GetMotionMaster()->MoveIdle(); + if (DoCastSpellIfCan(m_creature, SPELL_BANISH, CAST_TRIGGERED) == CAST_OK) + m_bIsBanished = true; } else - { - uiDamage = 0; - BeginOutro(); - } + DoStartOutro(); } } @@ -162,64 +169,27 @@ struct MANGOS_DLL_DECL boss_kalecgosAI : public ScriptedAI DoScriptText(urand(0, 1) ? SAY_EVIL_SLAY_1 : SAY_EVIL_SLAY_2, m_creature); } - void SendToInnerVeil(Unit* pTarget) - { - if (m_pInstance) - { - pTarget->CastSpell(pTarget, SPELL_TELEPORT_SPECTRAL_REALM, true); - pTarget->CastSpell(pTarget, SPELL_SPECTRAL_REALM_FORCE_FACTION, true); - pTarget->CastSpell(pTarget, SPELL_SPECTRAL_REALM, true); - - m_pInstance->SetGuid(DATA_PLAYER_SPECTRAL_REALM, pTarget->GetObjectGuid()); - } - } - - void SpellHitTarget(Unit* pTarget, const SpellEntry* pSpell) + void DoStartOutro() { - if (pSpell->Id == SPELL_SPECTRAL_BLAST_DUMMY && !m_bHasSpectralTarget) - { - if (pTarget->GetTypeId() != TYPEID_PLAYER) - return; - - if (pTarget->HasAura(SPELL_SPECTRAL_EXHAUSTION) || pTarget->HasAura(SPELL_SPECTRAL_REALM)) - return; - - if (pTarget == m_creature->getVictim()) - return; - - m_bHasSpectralTarget = true; - pTarget->CastSpell(pTarget, SPELL_SPECTRAL_BLAST, true); - - SendToInnerVeil(pTarget); - } - } - - void BeginOutro() - { - debug_log("SD2: KALEC: Beginning Outro"); - if (!m_pInstance) return; + // Bring Sathrovarr in the normal realm and kill him if (Creature* pSathrovarr = m_pInstance->GetSingleCreatureFromStorage(NPC_SATHROVARR)) { - if (pSathrovarr->isAlive()) - { - pSathrovarr->CastSpell(pSathrovarr, SPELL_TELEPORT_NORMAL_REALM, true); - pSathrovarr->DealDamage(pSathrovarr, pSathrovarr->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); - } + // The teleport spell doesn't work right for this, so we need to teleport him manually + pSathrovarr->NearTeleportTo(1704.34f, 928.17f, 53.08f, 0); + pSathrovarr->DealDamage(pSathrovarr, pSathrovarr->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); } if (Creature* pKalec = m_pInstance->GetSingleCreatureFromStorage(NPC_KALECGOS_HUMAN)) - { - pKalec->DeleteThreatList(); - pKalec->SetVisibility(VISIBILITY_OFF); - } + pKalec->ForcedDespawn(); - m_creature->GetMotionMaster()->MoveIdle(); + EnterEvadeMode(); m_creature->setFaction(35); + m_creature->GetMotionMaster()->MoveIdle(); DoScriptText(SAY_GOOD_PLRWIN, m_creature); - m_uiExitTimer = 1000; + m_uiExitTimer = 10000; } void MovementInform(uint32 uiMotionType, uint32 uiPointId) @@ -232,61 +202,53 @@ struct MANGOS_DLL_DECL boss_kalecgosAI : public ScriptedAI if (m_pInstance) m_pInstance->SetData(TYPE_KALECGOS, DONE); - m_creature->SetVisibility(VISIBILITY_OFF); - m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + m_creature->ForcedDespawn(1000); } } void UpdateAI(const uint32 uiDiff) { - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - if (m_bIsBanished) - return; - - if (!m_bIsEnraged && m_creature->GetHealthPercent() < 10.0f) + if (m_uiExitTimer) { - if (Creature* pSathrovarr = m_pInstance->GetSingleCreatureFromStorage(NPC_SATHROVARR)) + if (m_uiExitTimer <= uiDiff) { - if (pSathrovarr->isAlive()) - pSathrovarr->CastSpell(pSathrovarr, SPELL_CRAZED_RAGE, true); - } + float fX, fY, fZ; + m_creature->GetRandomPoint(m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), 30.0f, fX, fY, fZ); + fZ = 70.0f; - m_creature->CastSpell(m_creature, SPELL_CRAZED_RAGE, true); - m_bIsEnraged = true; + m_creature->SetByteValue(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_UNK_2); + m_creature->SetLevitate(true); + m_creature->GetMotionMaster()->MovePoint(1, fX, fY, fZ); + m_uiExitTimer = 0; + } + else + m_uiExitTimer -= uiDiff; } - if (!m_bChecked && m_creature->GetHealthPercent() < 1.0f) + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_bIsBanished) { - m_bChecked = true; + // When Sathrovarr is banished then start outro + if (m_bIsUncorrupted) + DoStartOutro(); - if (!m_bIsUncorrupted) - { - m_bIsBanished = true; - DoCastSpellIfCan(m_creature, SPELL_BANISH, CAST_TRIGGERED); - m_creature->GetMotionMaster()->MoveIdle(); - } - else - BeginOutro(); + // return when banished + return; } - if (m_uiExitTimer) + if (!m_bIsEnraged && m_creature->GetHealthPercent() < 10.0f) { - if (m_uiExitTimer <= uiDiff) + // If the boss already has the aura, then mark the enraged as true + if (m_creature->HasAura(SPELL_CRAZED_RAGE)) + m_bIsEnraged = true; + else { - debug_log("SD2: KALEC: Exiting the arena"); - - float x, y, z; - m_creature->GetRandomPoint(m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), 30, x, y, z); - - z = 70.0f; - - m_creature->GetMotionMaster()->MovePoint(1, x, y, z); - m_uiExitTimer = 0; + // Spell is targeting both bosses + if (DoCastSpellIfCan(m_creature, SPELL_CRAZED_RAGE) == CAST_OK) + m_bIsEnraged = true; } - else - m_uiExitTimer -= uiDiff; } if (m_uiArcaneBuffetTimer < uiDiff) @@ -315,6 +277,14 @@ struct MANGOS_DLL_DECL boss_kalecgosAI : public ScriptedAI else m_uiFrostBreathTimer -= uiDiff; + if (m_uiTailLashTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_TAIL_LASH) == CAST_OK) + m_uiTailLashTimer = urand(10000, 20000); + } + else + m_uiTailLashTimer -= uiDiff; + if (m_uiWildMagicTimer < uiDiff) { if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) @@ -328,9 +298,8 @@ struct MANGOS_DLL_DECL boss_kalecgosAI : public ScriptedAI if (m_uiSpectralBlastTimer < uiDiff) { - m_bHasSpectralTarget = false; - DoCastSpellIfCan(m_creature, SPELL_SPECTRAL_BLAST_DUMMY); - m_uiSpectralBlastTimer = 30000; + if (DoCastSpellIfCan(m_creature, SPELL_SPECTRAL_BLAST) == CAST_OK) + m_uiSpectralBlastTimer = 25000; } else m_uiSpectralBlastTimer -= uiDiff; @@ -365,7 +334,7 @@ struct MANGOS_DLL_DECL boss_sathrovarrAI : public ScriptedAI m_bIsBanished = false; m_bIsEnraged = false; - DoCastSpellIfCan(m_creature, SPELL_SPECTRAL_INVIS); + DoCastSpellIfCan(m_creature, SPELL_SPECTRAL_INVISIBILITY); } void Aggro(Unit* pWho) @@ -385,23 +354,20 @@ struct MANGOS_DLL_DECL boss_sathrovarrAI : public ScriptedAI if (uiDamage > m_creature->GetHealth()) { uiDamage = 0; - DoCastSpellIfCan(m_creature, SPELL_BANISH, CAST_TRIGGERED); - m_bIsBanished = true; - DoScriptText(SAY_SATH_DEATH, m_creature); + if (DoCastSpellIfCan(m_creature, SPELL_BANISH, CAST_TRIGGERED) == CAST_OK) + m_bIsBanished = true; if (!m_pInstance) return; - m_pInstance->SetData(DATA_SET_SPECTRAL_CHECK, 5000); - if (Creature* pKalecgos = m_pInstance->GetSingleCreatureFromStorage(NPC_KALECGOS_DRAGON)) { + // Eject all players and set Kalec to uncorrupted + pKalecgos->CastSpell(pKalecgos, SPELL_SPECTRAL_REALM_EJECT, true); + if (boss_kalecgosAI* pKalecgosAI = dynamic_cast(pKalecgos->AI())) - { - pKalecgosAI->m_bChecked = false; pKalecgosAI->m_bIsUncorrupted = true; - } } } } @@ -411,6 +377,11 @@ struct MANGOS_DLL_DECL boss_sathrovarrAI : public ScriptedAI DoScriptText(urand(0, 1) ? SAY_SATH_SLAY_1 : SAY_SATH_SLAY_2, m_creature); } + void JustDied(Unit* pKiller) + { + DoScriptText(SAY_SATH_DEATH, m_creature); + } + void UpdateAI(const uint32 uiDiff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) @@ -421,14 +392,15 @@ struct MANGOS_DLL_DECL boss_sathrovarrAI : public ScriptedAI if (!m_bIsEnraged && m_creature->GetHealthPercent() < 10.0f) { - if (Creature* pKalecgos = m_pInstance->GetSingleCreatureFromStorage(NPC_KALECGOS_DRAGON)) + // If the boss already has the aura, then mark the enraged as true + if (m_creature->HasAura(SPELL_CRAZED_RAGE)) + m_bIsEnraged = true; + else { - if (pKalecgos->isAlive()) - pKalecgos->CastSpell(pKalecgos, SPELL_CRAZED_RAGE, true); + // Spell is targeting both bosses + if (DoCastSpellIfCan(m_creature, SPELL_CRAZED_RAGE) == CAST_OK) + m_bIsEnraged = true; } - - m_creature->CastSpell(m_creature, SPELL_CRAZED_RAGE, true); - m_bIsEnraged = true; } if (m_uiCorruptingStrikeTimer < uiDiff) @@ -497,7 +469,7 @@ struct MANGOS_DLL_DECL boss_kalecgos_humanoidAI : public ScriptedAI m_bHasYelled10Percent = false; m_bHasYelled20Percent = false; - DoCastSpellIfCan(m_creature, SPELL_SPECTRAL_INVIS); + DoCastSpellIfCan(m_creature, SPELL_SPECTRAL_INVISIBILITY); } void Aggro(Unit* pWho) @@ -507,7 +479,13 @@ struct MANGOS_DLL_DECL boss_kalecgos_humanoidAI : public ScriptedAI void JustDied(Unit* pKiller) { - // Whatever happens when Kalec (Half-elf) dies + if (m_pInstance) + { + if (Creature* pKalecgos = m_pInstance->GetSingleCreatureFromStorage(NPC_KALECGOS_DRAGON)) + pKalecgos->CastSpell(pKalecgos, SPELL_SPECTRAL_REALM_EJECT, true); + + m_pInstance->SetData(TYPE_KALECGOS, FAIL); + } } void UpdateAI(const uint32 uiDiff) @@ -548,24 +526,6 @@ struct MANGOS_DLL_DECL boss_kalecgos_humanoidAI : public ScriptedAI } }; -bool GOUse_go_spectral_rift(Player* pPlayer, GameObject* pGo) -{ - if (instance_sunwell_plateau* pInstance = (instance_sunwell_plateau*)pPlayer->GetInstanceData()) - { - if (pPlayer->HasAura(SPELL_SPECTRAL_EXHAUSTION)) - return true; - - // Make them able to see Sathrovarr (he's invisible for some reason). Also, when this buff wears off, they get teleported back to Normal Realm (this is handled by Instance Script) - pPlayer->CastSpell(pPlayer, SPELL_TELEPORT_SPECTRAL_REALM, true); - pPlayer->CastSpell(pPlayer, SPELL_SPECTRAL_REALM_FORCE_FACTION, true); - pPlayer->CastSpell(pPlayer, SPELL_SPECTRAL_REALM, true); - - pInstance->SetGuid(DATA_PLAYER_SPECTRAL_REALM, pPlayer->GetObjectGuid()); - } - - return true; -} - CreatureAI* GetAI_boss_kalecgos(Creature* pCreature) { return new boss_kalecgosAI(pCreature); @@ -599,9 +559,4 @@ void AddSC_boss_kalecgos() pNewScript->Name = "boss_kalecgos_humanoid"; pNewScript->GetAI = &GetAI_boss_kalecgos_humanoid; pNewScript->RegisterSelf(); - - pNewScript = new Script; - pNewScript->Name = "go_spectral_rift"; - pNewScript->pGOUse = &GOUse_go_spectral_rift; - pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/sunwell_plateau/instance_sunwell_plateau.cpp b/scripts/eastern_kingdoms/sunwell_plateau/instance_sunwell_plateau.cpp index 615cbdb02..112ac85e7 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/instance_sunwell_plateau.cpp +++ b/scripts/eastern_kingdoms/sunwell_plateau/instance_sunwell_plateau.cpp @@ -36,6 +36,7 @@ EndScriptData */ instance_sunwell_plateau::instance_sunwell_plateau(Map* pMap) : ScriptedInstance(pMap), m_uiMuruBerserkTimer(0), m_uiDeceiversKilled(0), + m_uiKalecRespawnTimer(0), m_uiSpectralRealmTimer(5000) { Initialize(); @@ -139,8 +140,17 @@ void instance_sunwell_plateau::SetData(uint32 uiType, uint32 uiData) DoUseDoorOrButton(GO_FORCEFIELD); DoUseDoorOrButton(GO_BOSS_COLLISION_1); DoUseDoorOrButton(GO_BOSS_COLLISION_2); - if (uiData == IN_PROGRESS) - m_lSpectralRealmList.clear(); + if (uiData == FAIL) + { + m_uiKalecRespawnTimer = 20000; + + if (Creature* pKalecDragon = GetSingleCreatureFromStorage(NPC_KALECGOS_DRAGON)) + pKalecDragon->ForcedDespawn(); + if (Creature* pKalecHuman = GetSingleCreatureFromStorage(NPC_KALECGOS_HUMAN)) + pKalecHuman->ForcedDespawn(); + if (Creature* pSathrovarr = GetSingleCreatureFromStorage(NPC_SATHROVARR)) + pSathrovarr->AI()->EnterEvadeMode(); + } break; case TYPE_BRUTALLUS: m_auiEncounter[uiType] = uiData; @@ -178,9 +188,6 @@ void instance_sunwell_plateau::SetData(uint32 uiType, uint32 uiData) if (uiData == FAIL) m_uiDeceiversKilled = 0; break; - case DATA_SET_SPECTRAL_CHECK: - m_uiSpectralRealmTimer = uiData; - break; } if (uiData == DONE) @@ -198,12 +205,6 @@ void instance_sunwell_plateau::SetData(uint32 uiType, uint32 uiData) } } -void instance_sunwell_plateau::SetData64(uint32 uiType, uint64 uiData) -{ - if (uiType == DATA_PLAYER_SPECTRAL_REALM) - m_lSpectralRealmList.push_back(ObjectGuid(uiData)); -} - uint32 instance_sunwell_plateau::GetData(uint32 uiType) { if (uiType < MAX_ENCOUNTER) @@ -212,38 +213,20 @@ uint32 instance_sunwell_plateau::GetData(uint32 uiType) return 0; } -void instance_sunwell_plateau::DoEjectSpectralRealmPlayers() -{ - if (m_lSpectralRealmList.empty()) - return; - - Map::PlayerList const& players = instance->GetPlayers(); - - for(Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr) - { - Player* pPlayer = itr->getSource(); - - if (pPlayer && !pPlayer->HasAura(SPELL_SPECTRAL_REALM)) - { - m_lSpectralRealmList.remove(pPlayer->GetObjectGuid()); - pPlayer->CastSpell(pPlayer, SPELL_SPECTRAL_EXHAUSTION, true); - pPlayer->CastSpell(pPlayer, SPELL_TELEPORT_NORMAL_REALM, true); - } - } -} - void instance_sunwell_plateau::Update(uint32 uiDiff) { - // Only check for Spectral Realm if Kalecgos Encounter is running - if (m_auiEncounter[TYPE_KALECGOS] == IN_PROGRESS) + if (m_uiKalecRespawnTimer) { - if (m_uiSpectralRealmTimer <= uiDiff) + if (m_uiKalecRespawnTimer <= uiDiff) { - DoEjectSpectralRealmPlayers(); - m_uiSpectralRealmTimer = 1000; + if (Creature* pKalecDragon = GetSingleCreatureFromStorage(NPC_KALECGOS_DRAGON)) + pKalecDragon->Respawn(); + if (Creature* pKalecHuman = GetSingleCreatureFromStorage(NPC_KALECGOS_HUMAN)) + pKalecHuman->Respawn(); + m_uiKalecRespawnTimer = 0; } else - m_uiSpectralRealmTimer -= uiDiff; + m_uiKalecRespawnTimer -= uiDiff; } // Muru berserk timer; needs to be done here because it involves two distinct creatures diff --git a/scripts/eastern_kingdoms/sunwell_plateau/sunwell_plateau.h b/scripts/eastern_kingdoms/sunwell_plateau/sunwell_plateau.h index 079376333..c52b7562d 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/sunwell_plateau.h +++ b/scripts/eastern_kingdoms/sunwell_plateau/sunwell_plateau.h @@ -16,9 +16,6 @@ enum TYPE_MURU = 4, TYPE_KILJAEDEN = 5, - DATA_PLAYER_SPECTRAL_REALM = 6, - DATA_SET_SPECTRAL_CHECK = 7, - NPC_KALECGOS_DRAGON = 24850, // kalecgos blue dragon hostile NPC_KALECGOS_HUMAN = 24891, // kalecgos human form in spectral realm NPC_SATHROVARR = 24892, @@ -51,12 +48,6 @@ enum AREATRIGGER_TWINS = 4937, - // spells related to kalecgos event - SPELL_SPECTRAL_REALM = 46021, - SPELL_TELEPORT_NORMAL_REALM = 46020, - SPELL_SPECTRAL_EXHAUSTION = 44867, - SPELL_SPECTRAL_REALM_FORCE_FACTION = 44852, - // used by both muru and entropius SPELL_MURU_BERSERK = 26662, @@ -77,7 +68,6 @@ class MANGOS_DLL_DECL instance_sunwell_plateau : public ScriptedInstance void OnCreatureDeath(Creature* pCreature); void SetData(uint32 uiType, uint32 uiData); - void SetData64(uint32 uiType, uint64 uiData); uint32 GetData(uint32 uiType); void Update(uint32 uiDiff); @@ -86,15 +76,13 @@ class MANGOS_DLL_DECL instance_sunwell_plateau : public ScriptedInstance void Load(const char* chrIn); protected: - void DoEjectSpectralRealmPlayers(); - uint32 m_auiEncounter[MAX_ENCOUNTER]; std::string m_strInstData; // Misc uint8 m_uiDeceiversKilled; uint32 m_uiSpectralRealmTimer; + uint32 m_uiKalecRespawnTimer; uint32 m_uiMuruBerserkTimer; - GUIDList m_lSpectralRealmList; }; #endif diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 7fdc2e320..9e8cfcd5a 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2354" + #define SD2_REVISION_NR "2355" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 5e25417e8..6674bc742 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -1055,7 +1055,6 @@ UPDATE creature_template SET ScriptName='boss_brutallus' WHERE entry=24882; UPDATE creature_template SET ScriptName='boss_kalecgos' WHERE entry=24850; UPDATE creature_template SET ScriptName='boss_kalecgos_humanoid' WHERE entry=24891; UPDATE creature_template SET ScriptName='boss_sathrovarr' WHERE entry=24892; -UPDATE gameobject_template SET ScriptName='go_spectral_rift' WHERE entry=187055; DELETE FROM scripted_areatrigger WHERE entry=4853; INSERT INTO scripted_areatrigger VALUES (4853,'at_madrigosa'); UPDATE creature_template SET ScriptName='boss_alythess' WHERE entry=25166; diff --git a/sql/updates/r2355_mangos.sql b/sql/updates/r2355_mangos.sql new file mode 100644 index 000000000..ee55c4d15 --- /dev/null +++ b/sql/updates/r2355_mangos.sql @@ -0,0 +1 @@ +UPDATE gameobject_template SET ScriptName='' WHERE entry=187055; From f51f91bfae3fb62e040a75084d4d44b59a25dd71 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Mon, 5 Dec 2011 22:21:31 +0200 Subject: [PATCH 0340/1172] [2356] Add a temporary workaround for Kalecgos This will keep the encounter in a working state until the spells get a proper fix on the core side --- .../sunwell_plateau/boss_kalecgos.cpp | 22 +++++++++++++++++++ sd2_revision_nr.h | 2 +- 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/scripts/eastern_kingdoms/sunwell_plateau/boss_kalecgos.cpp b/scripts/eastern_kingdoms/sunwell_plateau/boss_kalecgos.cpp index f5dd47e76..c6105e491 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/boss_kalecgos.cpp +++ b/scripts/eastern_kingdoms/sunwell_plateau/boss_kalecgos.cpp @@ -375,6 +375,28 @@ struct MANGOS_DLL_DECL boss_sathrovarrAI : public ScriptedAI void KilledUnit(Unit* pVictim) { DoScriptText(urand(0, 1) ? SAY_SATH_SLAY_1 : SAY_SATH_SLAY_2, m_creature); + + // !!! Workaround which ejects the players from the spectral realm on death !!! + if (pVictim->GetTypeId() == TYPEID_PLAYER) + { + pVictim->CastSpell(pVictim, SPELL_TELEPORT_NORMAL_REALM, true); + pVictim->CastSpell(pVictim, SPELL_SPECTRAL_EXHAUSTION, true); + } + } + + void MoveInLineOfSight(Unit* pWho) + { + // !!! Workaround which ejects the players from the spectral realm !!! + if (pWho->GetTypeId() == TYPEID_PLAYER && pWho->IsWithinLOSInMap(m_creature) && pWho->IsWithinDistInMap(m_creature, 75.0f)) + { + if (!pWho->HasAura(SPELL_SPECTRAL_REALM_AURA)) + { + pWho->CastSpell(pWho, SPELL_TELEPORT_NORMAL_REALM, true); + pWho->CastSpell(pWho, SPELL_SPECTRAL_EXHAUSTION, true); + } + } + + ScriptedAI::MoveInLineOfSight(pWho); } void JustDied(Unit* pKiller) diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 9e8cfcd5a..b82048ba7 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2355" + #define SD2_REVISION_NR "2356" #endif // __SD2_REVISION_NR_H__ From 0c57d7d061fa73e47bb269cd0476bd58b815e6e6 Mon Sep 17 00:00:00 2001 From: krofna Date: Thu, 1 Dec 2011 22:41:35 +0100 Subject: [PATCH 0341/1172] [2357] Implement basic script for boss Ossirian TODO is: * Weather handling * Proper crystal handling * Tornados Signed-off-by: Schmoozerd --- .../ruins_of_ahnqiraj/boss_ossirian.cpp | 238 +++++++++++++++++- .../instance_ruins_of_ahnqiraj.cpp | 13 +- .../ruins_of_ahnqiraj/ruins_of_ahnqiraj.h | 4 +- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 2 + sql/updates/r2357_mangos.sql | 2 + system/ScriptLoader.cpp | 2 + 7 files changed, 237 insertions(+), 26 deletions(-) create mode 100644 sql/updates/r2357_mangos.sql diff --git a/scripts/kalimdor/ruins_of_ahnqiraj/boss_ossirian.cpp b/scripts/kalimdor/ruins_of_ahnqiraj/boss_ossirian.cpp index 09bb8f184..726e2b67c 100644 --- a/scripts/kalimdor/ruins_of_ahnqiraj/boss_ossirian.cpp +++ b/scripts/kalimdor/ruins_of_ahnqiraj/boss_ossirian.cpp @@ -16,23 +16,237 @@ /* ScriptData SDName: Boss_Ossirian -SD%Complete: 0 -SDComment: Place holder +SD%Complete: 50% +SDComment: Tornados missing, Crystal handling missing, Weather missing SDCategory: Ruins of Ahn'Qiraj EndScriptData */ #include "precompiled.h" +#include "ruins_of_ahnqiraj.h" -#define SAY_SURPREME1 -1509018 -#define SAY_SURPREME2 -1509019 -#define SAY_SURPREME3 -1509020 +enum +{ + SAY_SUPREME_1 = -1509018, + SAY_SUPREME_2 = -1509019, + SAY_SUPREME_3 = -1509020, + SAY_RAND_INTRO_1 = -1509021, + SAY_RAND_INTRO_2 = -1509023, + SAY_RAND_INTRO_3 = -1509024, + SAY_AGGRO = -1509025, + SAY_SLAY = -1509026, + SAY_DEATH = -1509027, -#define SAY_RAND_INTRO1 -1509021 -#define SAY_RAND_INTRO2 -1509022 -#define SAY_RAND_INTRO3 -1509023 -#define SAY_RAND_INTRO4 -1509024 //possibly old? + SPELL_SILENCE = 25195, + SPELL_CYCLONE = 25189, + SPELL_STOMP = 25188, + SPELL_SUPREME = 25176, + SPELL_SUMMON = 20477, // TODO NYI -#define SAY_AGGRO -1509025 + MAX_CRYSTAL_POSITIONS = 1, // TODO -#define SAY_SLAY -1509026 -#define SAY_DEATH -1509027 + SPELL_WEAKNESS_FIRE = 25177, + SPELL_WEAKNESS_FROST = 25178, + SPELL_WEAKNESS_NATURE = 25180, + SPELL_WEAKNESS_ARCANE = 25181, + SPELL_WEAKNESS_SHADOW = 25183, +}; + +static const uint32 aWeaknessSpell[] = {SPELL_WEAKNESS_FIRE, SPELL_WEAKNESS_FROST, SPELL_WEAKNESS_NATURE, SPELL_WEAKNESS_ARCANE, SPELL_WEAKNESS_SHADOW}; + +struct MANGOS_DLL_DECL boss_ossirianAI : public ScriptedAI +{ + + boss_ossirianAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (instance_ruins_of_ahnqiraj*)m_creature->GetInstanceData(); + m_bSaidIntro = false; + Reset(); + } + + instance_ruins_of_ahnqiraj* m_pInstance; + + uint32 m_uiSupremeTimer; + uint32 m_uiCycloneTimer; + uint32 m_uiStompTimer; + uint32 m_uiSilenceTimer; + uint8 m_uiCrystalPosition; + + bool m_bSaidIntro; + + void Reset() + { + m_uiCrystalPosition = 0; + m_uiCycloneTimer = 20000; + m_uiStompTimer = 30000; + m_uiSilenceTimer = 30000; + m_uiSupremeTimer = 45000; + } + + void Aggro(Unit* pWho) + { + DoCastSpellIfCan(m_creature, SPELL_SUPREME, CAST_TRIGGERED); + DoScriptText(SAY_AGGRO, m_creature); + DoSpawnNextCrystal(); + } + + void JustDied(Unit* pKiller) + { + DoScriptText(SAY_DEATH, m_creature); + } + + void KilledUnit(Unit* pVictim) + { + DoScriptText(SAY_SLAY, m_creature); + } + + void DoSpawnNextCrystal() + { + if (!m_pInstance) + return; + + Creature* pOssirianTrigger = NULL; + if (m_uiCrystalPosition == 0) + { + // Respawn static spawned crystal trigger + pOssirianTrigger = m_pInstance->GetSingleCreatureFromStorage(NPC_OSSIRIAN_TRIGGER); + if (pOssirianTrigger && !pOssirianTrigger->isAlive()) + pOssirianTrigger->Respawn(); + } + else + { + // Summon a new crystal trigger at some position depending on m_uiCrystalPosition + } + if (!pOssirianTrigger) + return; + + // Respawn GO near crystal trigger + if (GameObject* pCrystal = GetClosestGameObjectWithEntry(pOssirianTrigger, GO_OSSIRIAN_CRYSTAL, 10.0f)) + m_pInstance->DoRespawnGameObject(pCrystal->GetObjectGuid(), 5*MINUTE); + + // Increase position + ++m_uiCrystalPosition %= MAX_CRYSTAL_POSITIONS; + } + + void SpellHit(Unit* pCaster, const SpellEntry* pSpell) + { + if (pCaster->GetTypeId() == TYPEID_UNIT && pCaster->GetEntry() == NPC_OSSIRIAN_TRIGGER) + { + // Check for proper spell id + bool bIsWeaknessSpell = false; + for (uint8 i = 0; i < sizeof(aWeaknessSpell); ++i) + { + if (pSpell->Id == aWeaknessSpell[i]) + { + bIsWeaknessSpell = true; + break; + } + } + if (!bIsWeaknessSpell) + return; + + m_creature->RemoveAurasDueToSpell(SPELL_SUPREME); + m_uiSupremeTimer = 45000; + + ((Creature*)pCaster)->ForcedDespawn(); + DoSpawnNextCrystal(); + } + } + + void MoveInLineOfSight(Unit* pWho) + { + // TODO: Range guesswork + if (!m_bSaidIntro && pWho->GetTypeId() == TYPEID_PLAYER && m_creature->IsWithinDistInMap(pWho, 75.0f, false)) + { + switch (urand(0, 2)) + { + case 0: DoScriptText(SAY_RAND_INTRO_1, m_creature); break; + case 1: DoScriptText(SAY_RAND_INTRO_2, m_creature); break; + case 2: DoScriptText(SAY_RAND_INTRO_3, m_creature); break; + } + m_bSaidIntro = true; + } + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + // Supreme + if (m_uiSupremeTimer <= uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_SUPREME, CAST_AURA_NOT_PRESENT) == CAST_OK) + { + switch (urand(0, 2)) + { + case 0: DoScriptText(SAY_SUPREME_1, m_creature); break; + case 1: DoScriptText(SAY_SUPREME_2, m_creature); break; + case 2: DoScriptText(SAY_SUPREME_3, m_creature); break; + } + m_uiSupremeTimer = 45000; + } + else + m_uiSupremeTimer = 5000; + } + else + m_uiSupremeTimer -= uiDiff; + + // Stomp + if (m_uiStompTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_STOMP) == CAST_OK) + m_uiStompTimer = 30000; + } + else + m_uiStompTimer -= uiDiff; + + // Cyclone + if (m_uiCycloneTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_CYCLONE) == CAST_OK) + m_uiCycloneTimer = 20000; + } + else + m_uiCycloneTimer -= uiDiff; + + // Silence + if (m_uiSilenceTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_SILENCE) == CAST_OK) + m_uiSilenceTimer = urand(20000, 30000); + } + else + m_uiSilenceTimer -= uiDiff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_ossirian(Creature* pCreature) +{ + return new boss_ossirianAI(pCreature); +} + +// This is actually a hack for a server-side spell +bool GOUse_go_ossirian_crystal(Player* pPlayer, GameObject* pGo) +{ + if (Creature* pOssirianTrigger = GetClosestCreatureWithEntry(pGo, NPC_OSSIRIAN_TRIGGER, 10.0f)) + pOssirianTrigger->CastSpell(pOssirianTrigger, aWeaknessSpell[urand(0, 4)], false); + + return true; +} + +void AddSC_boss_ossirian() +{ + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_ossirian"; + pNewScript->GetAI = &GetAI_boss_ossirian; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "go_ossirian_crystal"; + pNewScript->pGOUse = &GOUse_go_ossirian_crystal; + pNewScript->RegisterSelf(); +} diff --git a/scripts/kalimdor/ruins_of_ahnqiraj/instance_ruins_of_ahnqiraj.cpp b/scripts/kalimdor/ruins_of_ahnqiraj/instance_ruins_of_ahnqiraj.cpp index f2c4e852a..14edaf981 100644 --- a/scripts/kalimdor/ruins_of_ahnqiraj/instance_ruins_of_ahnqiraj.cpp +++ b/scripts/kalimdor/ruins_of_ahnqiraj/instance_ruins_of_ahnqiraj.cpp @@ -44,6 +44,8 @@ void instance_ruins_of_ahnqiraj::OnCreatureCreate(Creature* pCreature) { switch(pCreature->GetEntry()) { + case NPC_OSSIRIAN_TRIGGER: + // Only store static spawned (if this can be checked, else use a bool) case NPC_OSSIRIAN: case NPC_GENERAL_ANDOROV: m_mNpcEntryGuidStore[pCreature->GetEntry()] = pCreature->GetObjectGuid(); @@ -51,17 +53,6 @@ void instance_ruins_of_ahnqiraj::OnCreatureCreate(Creature* pCreature) } } -void instance_ruins_of_ahnqiraj::OnObjectCreate(GameObject* pGo) -{ - switch(pGo->GetEntry()) - { - case GO_OSSIRIAN_CRYSTAL: - // Make them unusable temporarily - pGo->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_INTERACT_COND); - break; - } -} - void instance_ruins_of_ahnqiraj::OnCreatureEnterCombat(Creature* pCreature) { switch (pCreature->GetEntry()) diff --git a/scripts/kalimdor/ruins_of_ahnqiraj/ruins_of_ahnqiraj.h b/scripts/kalimdor/ruins_of_ahnqiraj/ruins_of_ahnqiraj.h index 5840906e0..f5b1ec712 100644 --- a/scripts/kalimdor/ruins_of_ahnqiraj/ruins_of_ahnqiraj.h +++ b/scripts/kalimdor/ruins_of_ahnqiraj/ruins_of_ahnqiraj.h @@ -34,6 +34,7 @@ enum // NPC_CAPTAIN_QEEZ = 15391, GO_OSSIRIAN_CRYSTAL = 180619, // Used in the ossirian encounter + NPC_OSSIRIAN_TRIGGER = 15590, // Triggers ossirian weakness SAY_OSSIRIAN_INTRO = -1509022 // Yelled after Kurinnax dies }; @@ -44,7 +45,7 @@ struct SpawnLocation float m_fX, m_fY, m_fZ, m_fO; }; -static const SpawnLocation aAndorovSpawnLocs[MAX_HELPERS] = +static const SpawnLocation aAndorovSpawnLocs[MAX_HELPERS] = { {NPC_GENERAL_ANDOROV, -8660.4f, 1510.29f, 32.449f, 2.2184f}, {NPC_KALDOREI_ELITE, -8655.84f, 1509.78f, 32.462f, 2.33341f}, @@ -64,7 +65,6 @@ class MANGOS_DLL_DECL instance_ruins_of_ahnqiraj : public ScriptedInstance // bool IsEncounterInProgress() const; // not active in AQ20 void OnCreatureCreate(Creature* pCreature); - void OnObjectCreate(GameObject* pGo); void OnPlayerEnter(Player* pPlayer); void OnCreatureEnterCombat(Creature* pCreature); diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index b82048ba7..d72ed52bb 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2356" + #define SD2_REVISION_NR "2357" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 6674bc742..489aac041 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -906,6 +906,8 @@ UPDATE creature_template SET ScriptName='mob_anubisath_guardian' WHERE entry=153 UPDATE creature_template SET ScriptName='boss_kurinnaxx' WHERE entry=15348; UPDATE creature_template SET ScriptName='boss_ayamiss' WHERE entry=15369; UPDATE creature_template SET ScriptName='boss_moam' WHERE entry=15340; +UPDATE creature_template SET ScriptName='boss_ossirian' WHERE entry=15339; +UPDATE gameobject_template SET ScriptName='go_ossirian_crystal' WHERE entry=180619; /* SCARLET MONASTERY */ UPDATE instance_template SET ScriptName='instance_scarlet_monastery' WHERE map=189; diff --git a/sql/updates/r2357_mangos.sql b/sql/updates/r2357_mangos.sql new file mode 100644 index 000000000..daed40708 --- /dev/null +++ b/sql/updates/r2357_mangos.sql @@ -0,0 +1,2 @@ +UPDATE creature_template SET ScriptName='boss_ossirian' WHERE entry=15339; +UPDATE gameobject_template SET ScriptName='go_ossirian_crystal' WHERE entry=180619; diff --git a/system/ScriptLoader.cpp b/system/ScriptLoader.cpp index efe9ff08f..213c0ab12 100644 --- a/system/ScriptLoader.cpp +++ b/system/ScriptLoader.cpp @@ -228,6 +228,7 @@ extern void AddSC_instance_razorfen_kraul(); // razorfen_kraul extern void AddSC_razorfen_kraul(); extern void AddSC_boss_ayamiss(); // ruins_of_ahnqiraj extern void AddSC_boss_kurinnaxx(); +extern void AddSC_boss_ossirian(); extern void AddSC_boss_moam(); extern void AddSC_ruins_of_ahnqiraj(); extern void AddSC_instance_ruins_of_ahnqiraj(); @@ -719,6 +720,7 @@ void AddScripts() AddSC_razorfen_kraul(); AddSC_boss_ayamiss(); // ruins_of_ahnqiraj AddSC_boss_kurinnaxx(); + AddSC_boss_ossirian(); AddSC_boss_moam(); AddSC_ruins_of_ahnqiraj(); AddSC_instance_ruins_of_ahnqiraj(); From 6e371acaeb6309db1fd08f4ae2d5e417eba7177e Mon Sep 17 00:00:00 2001 From: mns Date: Wed, 7 Dec 2011 15:35:26 +0100 Subject: [PATCH 0342/1172] [2358] Fix possible glitch with Akama and Illidan handling Signed-off-by: Schmoozerd --- scripts/outland/black_temple/boss_illidan.cpp | 2 +- sd2_revision_nr.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/outland/black_temple/boss_illidan.cpp b/scripts/outland/black_temple/boss_illidan.cpp index a76f70239..a94015b6f 100644 --- a/scripts/outland/black_temple/boss_illidan.cpp +++ b/scripts/outland/black_temple/boss_illidan.cpp @@ -825,7 +825,7 @@ struct MANGOS_DLL_DECL npc_akama_illidanAI : public ScriptedAI if (m_illidanGuid) { Creature* Illidan = m_creature->GetMap()->GetCreature(m_illidanGuid); - if (!Illidan || Illidan->IsInEvadeMode()) + if (!Illidan || !Illidan->isInCombat()) { Reset(); EnterEvadeMode(); diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index d72ed52bb..3bfd085c7 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2357" + #define SD2_REVISION_NR "2358" #endif // __SD2_REVISION_NR_H__ From 9634ed742ceec1f52df34c9428e0ea7be36dff3b Mon Sep 17 00:00:00 2001 From: Xfurry Date: Thu, 8 Dec 2011 00:49:28 +0200 Subject: [PATCH 0343/1172] [2359] Implement epilogue event for Kil'jaeden Also fix the birth spell id - thanks Cupcake And fix some wrong text types and emotes --- .../sunwell_plateau/boss_kiljaeden.cpp | 234 +++++++++++++++++- .../instance_sunwell_plateau.cpp | 5 + .../sunwell_plateau/sunwell_plateau.h | 5 +- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 + sql/scriptdev2_script_full.sql | 26 +- sql/updates/r2359_mangos.sql | 1 + sql/updates/r2359_scriptdev2.sql | 2 + 8 files changed, 256 insertions(+), 20 deletions(-) create mode 100644 sql/updates/r2359_mangos.sql create mode 100644 sql/updates/r2359_scriptdev2.sql diff --git a/scripts/eastern_kingdoms/sunwell_plateau/boss_kiljaeden.cpp b/scripts/eastern_kingdoms/sunwell_plateau/boss_kiljaeden.cpp index 247be4682..42c87a371 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/boss_kiljaeden.cpp +++ b/scripts/eastern_kingdoms/sunwell_plateau/boss_kiljaeden.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: boss_kiljaeden -SD%Complete: 10 -SDComment: Only spawn support +SD%Complete: 20 +SDComment: Only spawn support and epilogue event SDCategory: Sunwell Plateau EndScriptData */ @@ -73,14 +73,214 @@ enum SAY_OUTRO_12 = -1580106, // spells - SPELL_BIRTH = 45464, // Kiljaeden spawn animation + SPELL_BIRTH = 37745, // Kiljaeden spawn animation // outro - SPELL_ENTROPIUS_BODY = 46819, + SPELL_TELEPORT_VISUAL = 41232, + SPELL_KALEC_TELEPORT = 46473, // teleports and transforms Kalec in human form SPELL_CALL_ENTROPIUS = 46818, + SPELL_ENTROPIUS_BODY = 46819, + SPELL_BLAZE_TO_LIGHT = 46821, + SPELL_SUNWELL_IGNITION = 46822, - NPC_VELEN_PORTAL = 24925, + NPC_BOSS_PORTAL = 24925, NPC_CORE_ENTROPIUS = 26262, + NPC_SOLDIER = 26259, // summoned in 2 waves before Velen. Should move into 2 circle formations + NPC_RIFTWALKER = 26289, + + POINT_SUMMON_SOLDIERS = 1, + POINT_MOVE_LIADRIN = 2, + POINT_EVENT_EXIT = 3, +}; + +static const DialogueEntry aOutroDialogue[] = +{ + {NPC_KALECGOS, 0, 15000}, + {SAY_KALECGOS_GOODBYE, NPC_KALECGOS, 40000}, + {NPC_BOSS_PORTAL, 0, 10000}, + {POINT_SUMMON_SOLDIERS, 0, 18000}, + {NPC_VELEN, 0, 1000}, + {NPC_LIADRIN, 0, 4000}, + {SAY_OUTRO_1, NPC_VELEN, 25000}, + {SAY_OUTRO_2, NPC_VELEN, 15000}, + {SAY_OUTRO_3, NPC_VELEN, 13000}, + {SPELL_CALL_ENTROPIUS, 0, 10000}, + {SAY_OUTRO_4, NPC_VELEN, 20000}, + {POINT_MOVE_LIADRIN, 0, 5000}, + {SAY_OUTRO_5, NPC_LIADRIN, 10000}, + {SAY_OUTRO_6, NPC_VELEN, 15000}, + {SAY_OUTRO_7, NPC_LIADRIN, 3000}, + {SAY_OUTRO_8, NPC_VELEN, 4000}, + {SPELL_BLAZE_TO_LIGHT, 0, 13000}, + {SAY_OUTRO_9, NPC_VELEN, 14000}, + {SAY_OUTRO_10, NPC_LIADRIN, 20000}, + {SAY_OUTRO_11, NPC_VELEN, 8000}, + {SAY_OUTRO_12, NPC_VELEN, 4000}, + {POINT_EVENT_EXIT, 0, 0}, + {0, 0, 0}, +}; + +struct EventLocations +{ + float m_fX, m_fY, m_fZ, m_fO; +}; + +static const EventLocations aOutroLocations[] = +{ + {1727.854f, 656.060f, 28.31f, 3.86f}, // portal summon loc + {1716.969f, 646.407f, 28.05f, 3.91f}, // velen summon loc + {1718.862f, 644.528f, 28.05f, 3.87f}, // liadrin summon loc + {1712.110f, 641.044f, 27.80f}, // velen move forward + {1711.537f, 637.600f, 27.34f} // liadrin move forward +}; + +struct MANGOS_DLL_DECL npc_kiljaeden_controllerAI : public Scripted_NoMovementAI, private DialogueHelper +{ + npc_kiljaeden_controllerAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature), + DialogueHelper(aOutroDialogue) + { + m_pInstance = ((instance_sunwell_plateau*)pCreature->GetInstanceData()); + InitializeDialogueHelper(m_pInstance); + Reset(); + } + + instance_sunwell_plateau* m_pInstance; + + ObjectGuid m_EntropiusGuid; + ObjectGuid m_PortalGuid; + + void Reset() + { + // Visual spell before the encounter starts + DoCastSpellIfCan(m_creature, SPELL_ANVEENA_DRAIN); + } + + // Wrapper to start the dialogue text from another AI + void DoStartDialogue(uint32 uiEntry) + { + StartNextDialogueText(uiEntry); + } + + void JustDidDialogueStep(int32 iEntry) + { + switch (iEntry) + { + case NPC_KALECGOS: + if (Creature* pKalec = m_pInstance->GetSingleCreatureFromStorage(NPC_KALECGOS)) + { + pKalec->CastSpell(pKalec, SPELL_KALEC_TELEPORT, true); + pKalec->SetLevitate(false); + } + m_creature->SummonCreature(NPC_CORE_ENTROPIUS, m_creature->GetPositionX(), m_creature->GetPositionY(), 85.0f, 0, TEMPSUMMON_CORPSE_DESPAWN, 0); + break; + case NPC_BOSS_PORTAL: + // ToDo: summon soldiers to the right + m_creature->SummonCreature(NPC_BOSS_PORTAL, aOutroLocations[0].m_fX, aOutroLocations[0].m_fY, aOutroLocations[0].m_fZ, aOutroLocations[0].m_fO, TEMPSUMMON_CORPSE_DESPAWN, 0); + break; + case POINT_SUMMON_SOLDIERS: + // ToDo: summon soldiers to the left + break; + case NPC_VELEN: + m_creature->SummonCreature(NPC_VELEN, aOutroLocations[1].m_fX, aOutroLocations[1].m_fY, aOutroLocations[1].m_fZ, aOutroLocations[1].m_fO, TEMPSUMMON_CORPSE_DESPAWN, 0); + break; + case NPC_LIADRIN: + m_creature->SummonCreature(NPC_LIADRIN, aOutroLocations[2].m_fX, aOutroLocations[2].m_fY, aOutroLocations[2].m_fZ, aOutroLocations[2].m_fO, TEMPSUMMON_TIMED_DESPAWN, 4*MINUTE*IN_MILLISECONDS); + break; + case SPELL_CALL_ENTROPIUS: + if (Creature* pVelen = m_pInstance->GetSingleCreatureFromStorage(NPC_VELEN)) + pVelen->CastSpell(pVelen, SPELL_CALL_ENTROPIUS, false); + // Set point id = 1 for movement event + if (Creature* pEntropius = m_creature->GetMap()->GetCreature(m_EntropiusGuid)) + { + pEntropius->SetWalk(false); + pEntropius->GetMotionMaster()->MovePoint(1, m_creature->GetPositionX(), m_creature->GetPositionY(), 35.0f); + } + break; + case POINT_MOVE_LIADRIN: + if (Creature* pLiadrin = m_pInstance->GetSingleCreatureFromStorage(NPC_LIADRIN)) + pLiadrin->GetMotionMaster()->MovePoint(0, aOutroLocations[4].m_fX, aOutroLocations[4].m_fY, aOutroLocations[4].m_fZ); + break; + case SPELL_BLAZE_TO_LIGHT: + if (Creature* pEntropius = m_creature->GetMap()->GetCreature(m_EntropiusGuid)) + { + pEntropius->CastSpell(pEntropius, SPELL_BLAZE_TO_LIGHT, true); + pEntropius->RemoveAurasDueToSpell(SPELL_ENTROPIUS_BODY); + pEntropius->SetWalk(true); + pEntropius->GetMotionMaster()->MovePoint(2, m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ()); + } + break; + case POINT_EVENT_EXIT: + // Set point id = 1 for the despawn event + if (Creature* pVelen = m_pInstance->GetSingleCreatureFromStorage(NPC_VELEN)) + pVelen->GetMotionMaster()->MovePoint(1, aOutroLocations[1].m_fX, aOutroLocations[1].m_fY, aOutroLocations[1].m_fZ); + break; + } + } + + void JustSummoned(Creature* pSummoned) + { + switch(pSummoned->GetEntry()) + { + case NPC_VELEN: + pSummoned->GetMotionMaster()->MovePoint(0, aOutroLocations[3].m_fX, aOutroLocations[3].m_fY, aOutroLocations[3].m_fZ); + // no break here + case NPC_LIADRIN: + pSummoned->CastSpell(pSummoned, SPELL_TELEPORT_VISUAL, true); + break; + case NPC_CORE_ENTROPIUS: + pSummoned->CastSpell(pSummoned, SPELL_ENTROPIUS_BODY, true); + pSummoned->SetLevitate(true); + m_EntropiusGuid = pSummoned->GetObjectGuid(); + break; + case NPC_BOSS_PORTAL: + m_PortalGuid = pSummoned->GetObjectGuid(); + break; + } + } + + void SummonedMovementInform(Creature* pSummoned, uint32 uiType, uint32 uiPointId) + { + if (uiType != POINT_MOTION_TYPE) + return; + + if (uiPointId == 1) + { + if (pSummoned->GetEntry() == NPC_CORE_ENTROPIUS) + { + // Interrupt Velen's casting when entropius has reached the ground + if (Creature* pVelen = m_pInstance->GetSingleCreatureFromStorage(NPC_VELEN)) + pVelen->InterruptNonMeleeSpells(false); + } + else if (pSummoned->GetEntry() == NPC_VELEN) + { + // Cast teleport and despawn Velen, the portal and Kalec; Liadrin will despawn on timer + pSummoned->CastSpell(pSummoned, SPELL_TELEPORT_VISUAL, true); + pSummoned->ForcedDespawn(1000); + + // Note: portal should despawn only after all the soldiers have reached this point and "teleported" outside + if (Creature* pPortal = m_creature->GetMap()->GetCreature(m_PortalGuid)) + pPortal->ForcedDespawn(5000); + + if (Creature* pKalec = m_pInstance->GetSingleCreatureFromStorage(NPC_KALECGOS)) + pKalec->ForcedDespawn(1000); + } + } + else if (uiPointId == 2 && pSummoned->GetEntry() == NPC_CORE_ENTROPIUS) + { + // When the purified Muru reaches the ground the sunwell ignites and Muru despawns + DoCastSpellIfCan(m_creature, SPELL_SUNWELL_IGNITION); + + if (Creature* pLiadrin = m_pInstance->GetSingleCreatureFromStorage(NPC_LIADRIN)) + pLiadrin->SetStandState(UNIT_STAND_STATE_KNEEL); + + pSummoned->ForcedDespawn(); + } + } + + void UpdateAI(const uint32 uiDiff) + { + DialogueUpdate(uiDiff); + } }; struct MANGOS_DLL_DECL boss_kiljaedenAI : public Scripted_NoMovementAI @@ -109,8 +309,13 @@ struct MANGOS_DLL_DECL boss_kiljaedenAI : public Scripted_NoMovementAI void JustReachedHome() { if (m_pInstance) + { m_pInstance->SetData(TYPE_KILJAEDEN, FAIL); + if (Creature* pKiljaedenController = m_pInstance->GetSingleCreatureFromStorage(NPC_KILJAEDEN_CONTROLLER)) + pKiljaedenController->CastSpell(pKiljaedenController, SPELL_ANVEENA_DRAIN, true); + } + // Despawn on wipe m_creature->ForcedDespawn(); } @@ -123,7 +328,16 @@ struct MANGOS_DLL_DECL boss_kiljaedenAI : public Scripted_NoMovementAI void JustDied(Unit* pKiller) { if (m_pInstance) + { m_pInstance->SetData(TYPE_KILJAEDEN, DONE); + + // Start the outro + if (Creature* pKiljaedenController = m_pInstance->GetSingleCreatureFromStorage(NPC_KILJAEDEN_CONTROLLER)) + { + if (npc_kiljaeden_controllerAI* pControllerAI = dynamic_cast(pKiljaedenController->AI())) + pControllerAI->DoStartDialogue(NPC_KALECGOS); + } + } } void UpdateAI(const uint32 uiDiff) @@ -140,6 +354,11 @@ CreatureAI* GetAI_boss_kiljaeden(Creature *pCreature) return new boss_kiljaedenAI(pCreature); } +CreatureAI* GetAI_npc_kiljaeden_controller(Creature *pCreature) +{ + return new npc_kiljaeden_controllerAI(pCreature); +} + void AddSC_boss_kiljaeden() { Script* pNewScript; @@ -148,4 +367,9 @@ void AddSC_boss_kiljaeden() pNewScript->Name="boss_kiljaeden"; pNewScript->GetAI = &GetAI_boss_kiljaeden; pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name="npc_kiljaeden_controller"; + pNewScript->GetAI = &GetAI_npc_kiljaeden_controller; + pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/sunwell_plateau/instance_sunwell_plateau.cpp b/scripts/eastern_kingdoms/sunwell_plateau/instance_sunwell_plateau.cpp index 112ac85e7..3e13bb207 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/instance_sunwell_plateau.cpp +++ b/scripts/eastern_kingdoms/sunwell_plateau/instance_sunwell_plateau.cpp @@ -70,6 +70,9 @@ void instance_sunwell_plateau::OnCreatureCreate(Creature* pCreature) case NPC_MURU: case NPC_ENTROPIUS: case NPC_KILJAEDEN_CONTROLLER: + case NPC_KALECGOS: + case NPC_VELEN: + case NPC_LIADRIN: m_mNpcEntryGuidStore[pCreature->GetEntry()] = pCreature->GetObjectGuid(); break; } @@ -87,6 +90,8 @@ void instance_sunwell_plateau::OnCreatureDeath(Creature* pCreature) { if (Creature* pKiljaeden = pController->SummonCreature(NPC_KILJAEDEN, pController->GetPositionX(), pController->GetPositionY(), pController->GetPositionZ(), pController->GetOrientation(), TEMPSUMMON_DEAD_DESPAWN, 0)) pKiljaeden->SetInCombatWithZone(); + + pController->RemoveAurasDueToSpell(SPELL_ANVEENA_DRAIN); } } } diff --git a/scripts/eastern_kingdoms/sunwell_plateau/sunwell_plateau.h b/scripts/eastern_kingdoms/sunwell_plateau/sunwell_plateau.h index c52b7562d..4f59d2de5 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/sunwell_plateau.h +++ b/scripts/eastern_kingdoms/sunwell_plateau/sunwell_plateau.h @@ -29,7 +29,7 @@ enum NPC_KILJAEDEN = 25315, NPC_KILJAEDEN_CONTROLLER = 25608, // kiljaeden event controller // NPC_ANVEENA = 26046, // related to kiljaeden event - // NPC_KALECGOS = 25319, // related to kiljaeden event + NPC_KALECGOS = 25319, // related to kiljaeden event NPC_VELEN = 26246, NPC_LIADRIN = 26247, @@ -50,6 +50,9 @@ enum // used by both muru and entropius SPELL_MURU_BERSERK = 26662, + // visuals for Kiljaeden encounter + SPELL_ANVEENA_PRISON = 46367, + SPELL_ANVEENA_DRAIN = 46410, MAX_DECEIVERS = 3 }; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 3bfd085c7..382ae0bad 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2358" + #define SD2_REVISION_NR "2359" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 489aac041..8d5d7dd28 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -1067,6 +1067,7 @@ UPDATE creature_template SET ScriptName='boss_entropius' WHERE entry=25840; UPDATE creature_template SET ScriptName='npc_portal_target' WHERE entry=25770; UPDATE creature_template SET ScriptName='npc_void_sentinel_summoner' WHERE entry=25782; UPDATE creature_template SET ScriptName='boss_kiljaeden' WHERE entry=25315; +UPDATE creature_template SET ScriptName='npc_kiljaeden_controller' WHERE entry=25608; /* SWAMP OF SORROWS */ UPDATE creature_template SET ScriptName='npc_galen_goodward' WHERE entry=5391; diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index ba9de2fcb..6c5c31bcd 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -2681,25 +2681,25 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1580086,'Kalec... Kalec?',12513,1,0,0,'anveena SAY_ANVEENA_AWAKE'), (-1580087,'Yes, Anveena! Let fate embrace you now!',12448,1,0,0,'kalecgos SAY_KALECGOS_AWAKE_5'), (-1580088,'The nightmare is over, the spell is broken! Goodbye, Kalec, my love!',12514,1,0,0,'anveena SAY_ANVEENA_SACRIFICE'), -(-1580089,'Goodbye, Anveena, my love. Few will remember your name, yet this day you change the course of destiny. What was once corrupt is now pure. Heroes, do not let her sacrifice be in vain.',12450,1,0,0,'kalecgos SAY_KALECGOS_GOODBYE'), +(-1580089,'Goodbye, Anveena, my love. Few will remember your name, yet this day you change the course of destiny. What was once corrupt is now pure. Heroes, do not let her sacrifice be in vain.',12450,0,0,0,'kalecgos SAY_KALECGOS_GOODBYE'), (-1580090,'Strike now, heroes, while he is weakened! Vanquish the Deceiver!',12449,1,0,0,'kalecgos SAY_KALECGOS_ENCOURAGE'), (-1580091,'I will channel my power into the orbs, be ready!',12440,1,0,0,'kalecgos SAY_KALECGOS_ORB_1'), (-1580092,'I have empowered another orb! Use it quickly!',12441,1,0,0,'kalecgos SAY_KALECGOS_ORB_2'), (-1580093,'Another orb is ready! Make haste!',12442,1,0,0,'kalecgos SAY_KALECGOS_ORB_3'), (-1580094,'I have channeled all I can! The power is in your hands!',12443,1,0,0,'kalecgos SAY_KALECGOS_ORB_4'), -(-1580095,'Mortal heroes - your victory here today was foretold long ago. My brother\'s anguished cry of defeat will echo across the universe - bringing renewed hope to all those who still stand against the Burning Crusade.',12515,1,0,0,'velen SAY_OUTRO_1'), -(-1580096,'As the Legion\'s final defeat draws ever-nearer, stand proud in the knowledge that you have saved worlds without number from the flame.',12516,1,0,0,'velen SAY_OUTRO_2'), -(-1580097,'Just as this day marks an ending, so too does it herald a new beginning...',12517,1,0,0,'velen SAY_OUTRO_3'), -(-1580098,'The creature Entropius, whom you were forced to destroy, was once the noble naaru, M\'uru. In life, M\'uru channeled vast energies of LIGHT and HOPE. For a time, a misguided few sought to steal those energies...',12518,1,0,0,'velen SAY_OUTRO_4'), -(-1580099,'Our arrogance was unpardonable. We damned one of the most noble beings of all. We may never atone for this sin.',12524,1,0,0,'liadrin SAY_OUTRO_5'), -(-1580100,'Than fortunate it is, that I have reclaimed the noble naaru\'s spark from where it fell! Where faith dwells, hope is never lost, young blood elf.',12519,1,0,0,'velen SAY_OUTRO_6'), -(-1580101,'Can it be ?',12525,1,0,0,'liadrin SAY_OUTRO_7'), -(-1580102,'Gaz now, mortals - upon the HEART OF M\'URU! Umblemished. Bathed by the light of Creation - just as it was at the Dawn.',12520,1,0,0,'velen SAY_OUTRO_8'), -(-1580103,'In time, the light and hope held within - will rebirth more than this mere fount of power... Mayhap, they will rebirth the soul of a nation.',12521,1,0,0,'velen SAY_OUTRO_9'), -(-1580104,'Blessed ancestors! I feel it... so much love... so much grace... there are... no words... impossible to describe...',12526,1,0,0,'liadrin SAY_OUTRO_10'), -(-1580105,'Salvation, young one. It waits for us all.',12522,1,0,0,'velen SAY_OUTRO_11'), -(-1580106,'Farewell...!',12523,1,0,0,'velen SAY_OUTRO_12'); +(-1580095,'Mortal heroes - your victory here today was foretold long ago. My brother\'s anguished cry of defeat will echo across the universe - bringing renewed hope to all those who still stand against the Burning Crusade.',12515,0,0,1,'velen SAY_OUTRO_1'), +(-1580096,'As the Legion\'s final defeat draws ever-nearer, stand proud in the knowledge that you have saved worlds without number from the flame.',12516,0,0,1,'velen SAY_OUTRO_2'), +(-1580097,'Just as this day marks an ending, so too does it herald a new beginning...',12517,0,0,1,'velen SAY_OUTRO_3'), +(-1580098,'The creature Entropius, whom you were forced to destroy, was once the noble naaru, M\'uru. In life, M\'uru channeled vast energies of LIGHT and HOPE. For a time, a misguided few sought to steal those energies...',12518,0,0,1,'velen SAY_OUTRO_4'), +(-1580099,'Our arrogance was unpardonable. We damned one of the most noble beings of all. We may never atone for this sin.',12524,0,0,1,'liadrin SAY_OUTRO_5'), +(-1580100,'Than fortunate it is, that I have reclaimed the noble naaru\'s spark from where it fell! Where faith dwells, hope is never lost, young blood elf.',12519,0,0,1,'velen SAY_OUTRO_6'), +(-1580101,'Can it be ?',12525,0,0,1,'liadrin SAY_OUTRO_7'), +(-1580102,'Gaz now, mortals - upon the HEART OF M\'URU! Umblemished. Bathed by the light of Creation - just as it was at the Dawn.',12520,0,0,1,'velen SAY_OUTRO_8'), +(-1580103,'In time, the light and hope held within - will rebirth more than this mere fount of power... Mayhap, they will rebirth the soul of a nation.',12521,0,0,1,'velen SAY_OUTRO_9'), +(-1580104,'Blessed ancestors! I feel it... so much love... so much grace... there are... no words... impossible to describe...',12526,0,0,1,'liadrin SAY_OUTRO_10'), +(-1580105,'Salvation, young one. It waits for us all.',12522,0,0,1,'velen SAY_OUTRO_11'), +(-1580106,'Farewell...!',12523,0,0,1,'velen SAY_OUTRO_12'); -- -1 585 000 MAGISTER'S TERRACE INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES diff --git a/sql/updates/r2359_mangos.sql b/sql/updates/r2359_mangos.sql new file mode 100644 index 000000000..d508f47be --- /dev/null +++ b/sql/updates/r2359_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_kiljaeden_controller' WHERE entry=25608; diff --git a/sql/updates/r2359_scriptdev2.sql b/sql/updates/r2359_scriptdev2.sql new file mode 100644 index 000000000..37fc3c3ff --- /dev/null +++ b/sql/updates/r2359_scriptdev2.sql @@ -0,0 +1,2 @@ +UPDATE script_texts SET emote=1, type=0 WHERE entry BETWEEN -1580106 AND -1580095; +UPDATE script_texts SET type=0 WHERE entry=-1580089; From c617dd7f6904530e2a8f7c45ff8f702cbaf702d5 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sat, 10 Dec 2011 23:19:04 +0200 Subject: [PATCH 0344/1172] [2360] Implement intro event for Brutallus - Sunwell Plateau Note: some spells may need additional fixes in core --- .../sunwell_plateau/boss_brutallus.cpp | 233 +++++++++++++++++- .../instance_sunwell_plateau.cpp | 5 + .../sunwell_plateau/sunwell_plateau.h | 6 +- sd2_revision_nr.h | 2 +- sql/scriptdev2_script_full.sql | 2 +- sql/updates/r2360_scriptdev2.sql | 1 + 6 files changed, 242 insertions(+), 7 deletions(-) create mode 100644 sql/updates/r2360_scriptdev2.sql diff --git a/scripts/eastern_kingdoms/sunwell_plateau/boss_brutallus.cpp b/scripts/eastern_kingdoms/sunwell_plateau/boss_brutallus.cpp index 2677d5313..95c9a540d 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/boss_brutallus.cpp +++ b/scripts/eastern_kingdoms/sunwell_plateau/boss_brutallus.cpp @@ -51,14 +51,53 @@ enum SPELL_METEOR_SLASH = 45150, SPELL_BURN = 45141, SPELL_STOMP = 45185, - SPELL_BERSERK = 26662 + SPELL_BERSERK = 26662, + + // spells used during the intro event + SPELL_FROST_BLAST = 45203, // Madrigosa's spells + SPELL_FREEZE = 46609, // Activates the ice barrier - script effect for 46610 + SPELL_FROSTBOLT = 44843, + SPELL_FROST_BREATH = 45065, + SPELL_ENCAPSULATE = 44883, + SPELL_FEL_FIREBALL = 44844, // Brutallus' spells + SPELL_FLAME_RING = 44873, // this spell should have a fire explosion when removed + SPELL_CHARGE = 44884, + SPELL_BREAK_ICE = 46637, // Break the ice, open the door - dummy spell for 46638 and 47030 + + POINT_MOVE_GROUND = 1, + POINT_MOVE_ICE_BLOCK = 2, }; -struct MANGOS_DLL_DECL boss_brutallusAI : public ScriptedAI +static const DialogueEntry aIntroDialogue[] = { - boss_brutallusAI(Creature* pCreature) : ScriptedAI(pCreature) + {NPC_MADRIGOSA, 0, 6000}, + {YELL_MADR_ICE_BARRIER, NPC_MADRIGOSA, 7000}, + {YELL_MADR_INTRO, NPC_MADRIGOSA, 7000}, + {YELL_INTRO, NPC_BRUTALLUS, 6000}, + {SPELL_FROST_BREATH, 0, 6000}, + {POINT_MOVE_ICE_BLOCK, 0, 5000}, + {YELL_MADR_ICE_BLOCK, NPC_MADRIGOSA, 5000}, + {SPELL_FLAME_RING, 0, 7000}, + {YELL_INTRO_BREAK_ICE, NPC_BRUTALLUS, 1000}, + {SPELL_FEL_FIREBALL, 0, 4000}, + {POINT_MOVE_GROUND, 0, 5000}, + {YELL_MADR_TRAP, NPC_MADRIGOSA, 14000}, + {YELL_INTRO_CHARGE, NPC_BRUTALLUS, 10000}, + {YELL_INTRO_KILL_MADRIGOSA, NPC_BRUTALLUS, 8000}, + {YELL_INTRO_TAUNT, NPC_BRUTALLUS, 0}, + {0, 0, 0}, +}; + +static const float aMadrigosaFlyLoc[3] = {1459.35f, 636.81f, 59.234f}; +static const float aMadrigosaGroundLoc[3] = {1459.35f, 636.81f, 19.94f}; + +struct MANGOS_DLL_DECL boss_brutallusAI : public ScriptedAI, private DialogueHelper +{ + boss_brutallusAI(Creature* pCreature) : ScriptedAI(pCreature), + DialogueHelper(aIntroDialogue) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + InitializeDialogueHelper(m_pInstance); Reset(); } @@ -70,6 +109,10 @@ struct MANGOS_DLL_DECL boss_brutallusAI : public ScriptedAI uint32 m_uiBerserkTimer; uint32 m_uiLoveTimer; + uint32 m_uiMadrigosaSpellTimer; + + bool m_bCanDoMeleeAttack; + void Reset() { m_uiSlashTimer = 11000; @@ -77,10 +120,18 @@ struct MANGOS_DLL_DECL boss_brutallusAI : public ScriptedAI m_uiBurnTimer = 20000; m_uiBerserkTimer = 6*MINUTE*IN_MILLISECONDS; m_uiLoveTimer = urand(10000, 17000); + + m_uiMadrigosaSpellTimer = 0; + + m_bCanDoMeleeAttack = true; } void Aggro(Unit* pWho) { + // Don't aggro when attacking Madrigosa + if (pWho->GetEntry() == NPC_MADRIGOSA) + return; + DoScriptText(YELL_AGGRO, m_creature); if (m_pInstance) @@ -89,6 +140,10 @@ struct MANGOS_DLL_DECL boss_brutallusAI : public ScriptedAI void KilledUnit(Unit* pVictim) { + // Don't yell for Madrigosa + if (pVictim->GetEntry() == NPC_MADRIGOSA) + return; + switch(urand(0, 2)) { case 0: DoScriptText(YELL_KILL1, m_creature); break; @@ -108,11 +163,174 @@ struct MANGOS_DLL_DECL boss_brutallusAI : public ScriptedAI void JustReachedHome() { if (m_pInstance) + { + // When evade from the fight with Madrigosa skip this + if (m_pInstance->GetData(TYPE_BRUTALLUS) == SPECIAL) + return; + m_pInstance->SetData(TYPE_BRUTALLUS, FAIL); + } + } + + void SummonedCreatureJustDied(Creature* pSummoned) + { + // Yell of Madrigosa on death + if (pSummoned->GetEntry() == NPC_MADRIGOSA) + DoScriptText(YELL_MADR_DEATH, pSummoned); + } + + void JustSummoned(Creature* pSummoned) + { + if (pSummoned->GetEntry() == NPC_MADRIGOSA) + { + pSummoned->SetWalk(false); + pSummoned->SetLevitate(true); + pSummoned->GetMotionMaster()->MovePoint(0, aMadrigosaFlyLoc[0], aMadrigosaFlyLoc[1], aMadrigosaFlyLoc[2]); + } + } + + void SummonedMovementInform(Creature* pSummoned, uint32 uiType, uint32 uiPointId) + { + if (uiType != POINT_MOTION_TYPE || pSummoned->GetEntry() != NPC_MADRIGOSA) + return; + + if (uiPointId == POINT_MOVE_GROUND) + pSummoned->SetLevitate(false); + } + + void SpellHitTarget(Unit* pTarget, const SpellEntry* pSpell) + { + // Kill Madrigosa when charged + if (pTarget->GetEntry() == NPC_MADRIGOSA && pSpell->Id == SPELL_CHARGE) + m_creature->DealDamage(pTarget, pTarget->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + } + + void JustDidDialogueStep(int32 iEntry) + { + if (!m_pInstance) + return; + + switch (iEntry) + { + case NPC_MADRIGOSA: + if (Creature* pTrigger = m_pInstance->GetSingleCreatureFromStorage(NPC_FLIGHT_TRIGGER_LEFT)) + m_creature->SummonCreature(NPC_MADRIGOSA, pTrigger->GetPositionX(), pTrigger->GetPositionY(), pTrigger->GetPositionZ(), 0, TEMPSUMMON_DEAD_DESPAWN, 0); + break; + case YELL_MADR_ICE_BARRIER: + if (Creature* pMadrigosa = m_pInstance->GetSingleCreatureFromStorage(NPC_MADRIGOSA)) + pMadrigosa->CastSpell(pMadrigosa, SPELL_FREEZE, true); + break; + case YELL_MADR_INTRO: + if (Creature* pMadrigosa = m_pInstance->GetSingleCreatureFromStorage(NPC_MADRIGOSA)) + pMadrigosa->GetMotionMaster()->MovePoint(POINT_MOVE_GROUND, aMadrigosaGroundLoc[0], aMadrigosaGroundLoc[1], aMadrigosaGroundLoc[2]); + break; + case YELL_INTRO: + if (Creature* pMadrigosa = m_pInstance->GetSingleCreatureFromStorage(NPC_MADRIGOSA)) + m_creature->AI()->AttackStart(pMadrigosa); + break; + case SPELL_FROST_BREATH: + if (Creature* pMadrigosa = m_pInstance->GetSingleCreatureFromStorage(NPC_MADRIGOSA)) + { + pMadrigosa->CastSpell(m_creature, SPELL_FROST_BREATH, true); + pMadrigosa->GetMotionMaster()->MoveIdle(); + } + break; + case POINT_MOVE_ICE_BLOCK: + m_bCanDoMeleeAttack = false; + if (Creature* pMadrigosa = m_pInstance->GetSingleCreatureFromStorage(NPC_MADRIGOSA)) + { + pMadrigosa->GetMotionMaster()->MovePoint(POINT_MOVE_ICE_BLOCK, aMadrigosaFlyLoc[0], aMadrigosaFlyLoc[1], aMadrigosaFlyLoc[2]); + pMadrigosa->SetLevitate(true); + } + // Temporary! This will make Brutallus not follow Madrigosa through the air until mmaps are implemented + m_creature->GetMotionMaster()->MoveIdle(); + break; + case YELL_MADR_ICE_BLOCK: + if (Creature* pMadrigosa = m_pInstance->GetSingleCreatureFromStorage(NPC_MADRIGOSA)) + pMadrigosa->CastSpell(m_creature, SPELL_FROST_BLAST, true); + m_uiMadrigosaSpellTimer = 2000; + break; + case SPELL_FLAME_RING: + DoCastSpellIfCan(m_creature, SPELL_FLAME_RING, CAST_TRIGGERED); + break; + case YELL_INTRO_BREAK_ICE: + m_creature->RemoveAurasDueToSpell(SPELL_FLAME_RING); + break; + case SPELL_FEL_FIREBALL: + // Spell has script target Madrigosa + DoCastSpellIfCan(m_creature, SPELL_FEL_FIREBALL); + break; + case POINT_MOVE_GROUND: + if (Creature* pMadrigosa = m_pInstance->GetSingleCreatureFromStorage(NPC_MADRIGOSA)) + pMadrigosa->GetMotionMaster()->MovePoint(POINT_MOVE_GROUND, aMadrigosaGroundLoc[0], aMadrigosaGroundLoc[1], aMadrigosaGroundLoc[2]); + m_uiMadrigosaSpellTimer = 0; + break; + case YELL_MADR_TRAP: + if (Creature* pMadrigosa = m_pInstance->GetSingleCreatureFromStorage(NPC_MADRIGOSA)) + { + pMadrigosa->CastSpell(m_creature, SPELL_ENCAPSULATE, true); + // Need to remove the fire aura after 4 sec so Madrigosa won't die so soon + pMadrigosa->RemoveAurasDueToSpell(SPELL_FEL_FIREBALL); + } + break; + case YELL_INTRO_CHARGE: + m_bCanDoMeleeAttack = true; + if (m_creature->getVictim()) + m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); + DoCastSpellIfCan(m_creature, SPELL_CHARGE); + break; + case YELL_INTRO_KILL_MADRIGOSA: + // Face the players + if (GameObject* pIceWall = m_pInstance->GetSingleGameObjectFromStorage(GO_ICE_BARRIER)) + m_creature->SetFacingToObject(pIceWall); + break; + case YELL_INTRO_TAUNT: + DoCastSpellIfCan(m_creature, SPELL_BREAK_ICE); + break; + } + } + + // Wrapper to start the dialogue text + void DoStartIntro() + { + StartNextDialogueText(NPC_MADRIGOSA); + } + + // Wrapper to keep all the intro event stuff together + void UpdateIntroEvent(const uint32 uiDiff) + { + // Dialogue updates outside of combat too + DialogueUpdate(uiDiff); + + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_uiMadrigosaSpellTimer) + { + if (m_uiMadrigosaSpellTimer <= uiDiff) + { + if (Creature* pMadrigosa = m_pInstance->GetSingleCreatureFromStorage(NPC_MADRIGOSA)) + pMadrigosa->CastSpell(m_creature, SPELL_FROSTBOLT, true); + m_uiMadrigosaSpellTimer = urand(1000, 2000); + } + else + m_uiMadrigosaSpellTimer -= uiDiff; + } + + // We need to limit the melee attacks for the intro event + if (m_bCanDoMeleeAttack) + DoMeleeAttackIfReady(); } void UpdateAI(const uint32 uiDiff) { + // Update only the intro related stuff + if (m_pInstance->GetData(TYPE_BRUTALLUS) == SPECIAL) + { + UpdateIntroEvent(uiDiff); + return; + } + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -186,7 +404,16 @@ bool AreaTrigger_at_madrigosa(Player* pPlayer, AreaTriggerEntry const* pAt) //this simply set encounter state, and trigger ice barrier become active //bosses can start pre-event based on this new state if (pInstance->GetData(TYPE_BRUTALLUS) == NOT_STARTED) + { pInstance->SetData(TYPE_BRUTALLUS, SPECIAL); + + // Start the intro event + if (Creature* pBrutallus = pInstance->GetSingleCreatureFromStorage(NPC_BRUTALLUS)) + { + if (boss_brutallusAI* pBossAI = dynamic_cast(pBrutallus->AI())) + pBossAI->DoStartIntro(); + } + } } return false; diff --git a/scripts/eastern_kingdoms/sunwell_plateau/instance_sunwell_plateau.cpp b/scripts/eastern_kingdoms/sunwell_plateau/instance_sunwell_plateau.cpp index 3e13bb207..817c7cc49 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/instance_sunwell_plateau.cpp +++ b/scripts/eastern_kingdoms/sunwell_plateau/instance_sunwell_plateau.cpp @@ -65,6 +65,9 @@ void instance_sunwell_plateau::OnCreatureCreate(Creature* pCreature) case NPC_KALECGOS_DRAGON: case NPC_KALECGOS_HUMAN: case NPC_SATHROVARR: + case NPC_FLIGHT_TRIGGER_LEFT: + case NPC_MADRIGOSA: + case NPC_BRUTALLUS: case NPC_ALYTHESS: case NPC_SACROLASH: case NPC_MURU: @@ -159,11 +162,13 @@ void instance_sunwell_plateau::SetData(uint32 uiType, uint32 uiData) break; case TYPE_BRUTALLUS: m_auiEncounter[uiType] = uiData; + // Temporary - until spells 46609 and 46637 are properly fixed if (uiData == SPECIAL) DoUseDoorOrButton(GO_ICE_BARRIER, MINUTE); break; case TYPE_FELMYST: m_auiEncounter[uiType] = uiData; + // Temporary - until spell 46650 is properly fixed if (uiData == DONE) DoUseDoorOrButton(GO_FIRE_BARRIER); break; diff --git a/scripts/eastern_kingdoms/sunwell_plateau/sunwell_plateau.h b/scripts/eastern_kingdoms/sunwell_plateau/sunwell_plateau.h index 4f59d2de5..3dfce9c6e 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/sunwell_plateau.h +++ b/scripts/eastern_kingdoms/sunwell_plateau/sunwell_plateau.h @@ -19,7 +19,9 @@ enum NPC_KALECGOS_DRAGON = 24850, // kalecgos blue dragon hostile NPC_KALECGOS_HUMAN = 24891, // kalecgos human form in spectral realm NPC_SATHROVARR = 24892, - // NPC_BRUTALLUS = 24882, + NPC_MADRIGOSA = 25160, + NPC_FLIGHT_TRIGGER_LEFT = 25357, // Related to Felmyst flight path. Also the anchor to summon Madrigosa + NPC_BRUTALLUS = 24882, // NPC_FELMYST = 25038, NPC_ALYTHESS = 25166, NPC_SACROLASH = 25165, @@ -36,7 +38,7 @@ enum GO_FORCEFIELD = 188421, // kalecgos door + collisions GO_BOSS_COLLISION_1 = 188523, GO_BOSS_COLLISION_2 = 188524, - GO_ICE_BARRIER = 188119, // use unk; related to brutallus intro + GO_ICE_BARRIER = 188119, // used to block the players path during the Brutallus intro event GO_FIRE_BARRIER = 188075, // door after felmyst GO_FIRST_GATE = 187766, // door between felmyst and eredar twins GO_SECOND_GATE = 187764, // door after eredar twins diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 382ae0bad..ed8b3a01b 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2359" + #define SD2_REVISION_NR "2360" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 6c5c31bcd..18f8be1bc 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -2607,7 +2607,7 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1580017,'Puny lizard! Death is the only answer you\'ll find here!',12458,1,0,0,'brutallus YELL_INTRO'), (-1580018,'Grah! Your magic is weak!',12459,1,0,0,'brutallus YELL_INTRO_BREAK_ICE'), (-1580019,'I will crush you!',12460,1,0,0,'brutallus YELL_INTRO_CHARGE'), -(-1580020,'That was fun.',12461,1,0,0,'brutallus YELL_INTRO_KILL_MADRIGOSA'), +(-1580020,'That was fun, but I still await a true challenge!',12461,1,0,0,'brutallus YELL_INTRO_KILL_MADRIGOSA'), (-1580021,'Come, try your luck!',12462,1,0,0,'brutallus YELL_INTRO_TAUNT'), (-1580022,'Ahh! More lambs to the slaughter!',12463,1,0,0,'brutallus YELL_AGGRO'), (-1580023,'Perish, insect!',12464,1,0,0,'brutallus YELL_KILL1'), diff --git a/sql/updates/r2360_scriptdev2.sql b/sql/updates/r2360_scriptdev2.sql new file mode 100644 index 000000000..06d65eb34 --- /dev/null +++ b/sql/updates/r2360_scriptdev2.sql @@ -0,0 +1 @@ +UPDATE script_texts SET content_default='That was fun, but I still await a true challenge!' WHERE entry=-1580020; From eb1370bfc4001eb549d72144778b461626cd753a Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sun, 11 Dec 2011 20:22:28 +0200 Subject: [PATCH 0345/1172] [2361] Implemente spawn support for Felmyst - Sunwell Plateau --- .../sunwell_plateau/boss_brutallus.cpp | 62 +++++++++++++-- .../sunwell_plateau/boss_felmyst.cpp | 78 ++++++++++++++++++- .../instance_sunwell_plateau.cpp | 15 ++++ .../sunwell_plateau/sunwell_plateau.h | 6 +- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 2 + sql/updates/r2361_mangos.sql | 2 + 7 files changed, 158 insertions(+), 9 deletions(-) create mode 100644 sql/updates/r2361_mangos.sql diff --git a/scripts/eastern_kingdoms/sunwell_plateau/boss_brutallus.cpp b/scripts/eastern_kingdoms/sunwell_plateau/boss_brutallus.cpp index 95c9a540d..d3615f102 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/boss_brutallus.cpp +++ b/scripts/eastern_kingdoms/sunwell_plateau/boss_brutallus.cpp @@ -52,6 +52,14 @@ enum SPELL_BURN = 45141, SPELL_STOMP = 45185, SPELL_BERSERK = 26662, + SPELL_SUMMON_DEATH_CLOUD = 45884, // Summoned on death + + // Epilogue spells + SPELL_BRUTALLUS_DEATH_CLOUD = 45212, + SPELL_FELBLAZE_PREVIZUAL = 44885, + SPELL_SUMMON_FELBLAZE = 45069, + + NPC_BRUTALLUS_DEATH_CLOUD = 25703, // spells used during the intro event SPELL_FROST_BLAST = 45203, // Madrigosa's spells @@ -89,7 +97,6 @@ static const DialogueEntry aIntroDialogue[] = }; static const float aMadrigosaFlyLoc[3] = {1459.35f, 636.81f, 59.234f}; -static const float aMadrigosaGroundLoc[3] = {1459.35f, 636.81f, 19.94f}; struct MANGOS_DLL_DECL boss_brutallusAI : public ScriptedAI, private DialogueHelper { @@ -155,6 +162,7 @@ struct MANGOS_DLL_DECL boss_brutallusAI : public ScriptedAI, private DialogueHel void JustDied(Unit* pKiller) { DoScriptText(YELL_DEATH, m_creature); + DoCastSpellIfCan(m_creature, SPELL_SUMMON_DEATH_CLOUD, CAST_TRIGGERED); if (m_pInstance) m_pInstance->SetData(TYPE_BRUTALLUS, DONE); @@ -172,11 +180,11 @@ struct MANGOS_DLL_DECL boss_brutallusAI : public ScriptedAI, private DialogueHel } } - void SummonedCreatureJustDied(Creature* pSummoned) + void SummonedCreatureDespawn(Creature* pSummoned) { // Yell of Madrigosa on death if (pSummoned->GetEntry() == NPC_MADRIGOSA) - DoScriptText(YELL_MADR_DEATH, pSummoned); + pSummoned->CastSpell(pSummoned, SPELL_SUMMON_FELBLAZE, true); } void JustSummoned(Creature* pSummoned) @@ -187,6 +195,8 @@ struct MANGOS_DLL_DECL boss_brutallusAI : public ScriptedAI, private DialogueHel pSummoned->SetLevitate(true); pSummoned->GetMotionMaster()->MovePoint(0, aMadrigosaFlyLoc[0], aMadrigosaFlyLoc[1], aMadrigosaFlyLoc[2]); } + else if (pSummoned->GetEntry() == NPC_BRUTALLUS_DEATH_CLOUD) + pSummoned->CastSpell(pSummoned, SPELL_BRUTALLUS_DEATH_CLOUD, true); } void SummonedMovementInform(Creature* pSummoned, uint32 uiType, uint32 uiPointId) @@ -200,9 +210,26 @@ struct MANGOS_DLL_DECL boss_brutallusAI : public ScriptedAI, private DialogueHel void SpellHitTarget(Unit* pTarget, const SpellEntry* pSpell) { - // Kill Madrigosa when charged + // Fake death Madrigosa when charged if (pTarget->GetEntry() == NPC_MADRIGOSA && pSpell->Id == SPELL_CHARGE) - m_creature->DealDamage(pTarget, pTarget->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + { + DoScriptText(YELL_MADR_DEATH, pTarget); + pTarget->InterruptNonMeleeSpells(true); + pTarget->SetHealth(0); + pTarget->StopMoving(); + pTarget->ClearComboPointHolders(); + pTarget->RemoveAllAurasOnDeath(); + pTarget->ModifyAuraState(AURA_STATE_HEALTHLESS_20_PERCENT, false); + pTarget->ModifyAuraState(AURA_STATE_HEALTHLESS_35_PERCENT, false); + pTarget->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + pTarget->ClearAllReactives(); + pTarget->GetMotionMaster()->Clear(); + pTarget->GetMotionMaster()->MoveIdle(); + pTarget->SetStandState(UNIT_STAND_STATE_DEAD); + + // Brutallus evades + EnterEvadeMode(); + } } void JustDidDialogueStep(int32 iEntry) @@ -397,6 +424,26 @@ CreatureAI* GetAI_boss_brutallus(Creature* pCreature) return new boss_brutallusAI(pCreature); } +bool EffectAuraDummy_spell_aura_dummy_npc_brutallus_cloud(const Aura* pAura, bool bApply) +{ + // On Aura removal start Felmyst summon visuals + if (pAura->GetId() == SPELL_BRUTALLUS_DEATH_CLOUD && pAura->GetEffIndex() == EFFECT_INDEX_0 && !bApply) + { + if (Creature* pTarget = (Creature*)pAura->GetTarget()) + { + if (ScriptedInstance* pInstance = (ScriptedInstance*)pTarget->GetInstanceData()) + { + if (Creature* pMadrigosa = pInstance->GetSingleCreatureFromStorage(NPC_MADRIGOSA)) + { + pMadrigosa->CastSpell(pMadrigosa, SPELL_FELBLAZE_PREVIZUAL, true); + pMadrigosa->ForcedDespawn(10000); + } + } + } + } + return true; +} + bool AreaTrigger_at_madrigosa(Player* pPlayer, AreaTriggerEntry const* pAt) { if (ScriptedInstance* pInstance = (ScriptedInstance*)pPlayer->GetInstanceData()) @@ -428,6 +475,11 @@ void AddSC_boss_brutallus() pNewScript->GetAI = &GetAI_boss_brutallus; pNewScript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "spell_dummy_npc_brutallus_cloud"; + pNewScript->pEffectAuraDummy = &EffectAuraDummy_spell_aura_dummy_npc_brutallus_cloud; + pNewScript->RegisterSelf(); + pNewScript = new Script; pNewScript->Name = "at_madrigosa"; pNewScript->pAreaTrigger = &AreaTrigger_at_madrigosa; diff --git a/scripts/eastern_kingdoms/sunwell_plateau/boss_felmyst.cpp b/scripts/eastern_kingdoms/sunwell_plateau/boss_felmyst.cpp index e7619db2a..a0a528052 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/boss_felmyst.cpp +++ b/scripts/eastern_kingdoms/sunwell_plateau/boss_felmyst.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: boss_felmyst -SD%Complete: -SDComment: +SD%Complete: 20% +SDComment: Spawn support only SDCategory: Sunwell Plateau EndScriptData */ @@ -34,8 +34,82 @@ enum SAY_BREATH = -1580039, SAY_BERSERK = -1580041, SAY_KALECGOS_OUTRO = -1580043, + + SPELL_FELBLAZE_VISUAL = 45068, // Visual transform aura + SPELL_OPEN_BACK_DOOR = 46650, // Opens the fire barrier - script effect for 46652 +}; + +struct MANGOS_DLL_DECL boss_felmystAI : public ScriptedAI +{ + boss_felmystAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (instance_sunwell_plateau*)pCreature->GetInstanceData(); + m_bHasTransformed = false; + Reset(); + } + + instance_sunwell_plateau* m_pInstance; + + bool m_bHasTransformed; + + void Reset() + { + // Transform into Felmyst dragon + if (!m_bHasTransformed) + { + if (DoCastSpellIfCan(m_creature, SPELL_FELBLAZE_VISUAL) == CAST_OK) + { + DoScriptText(SAY_INTRO, m_creature); + m_bHasTransformed = true; + } + } + } + + void Aggro(Unit* pWho) + { + if (m_pInstance) + m_pInstance->SetData(TYPE_FELMYST, IN_PROGRESS); + } + + void KilledUnit(Unit* pVictim) + { + DoScriptText(urand(0, 1) ? SAY_KILL_1 : SAY_KILL_2, m_creature); + } + + void JustDied(Unit* pKiller) + { + DoScriptText(SAY_DEATH, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_FELMYST, DONE); + } + + void JustReachedHome() + { + if (m_pInstance) + m_pInstance->SetData(TYPE_FELMYST, FAIL); + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + DoMeleeAttackIfReady(); + } }; +CreatureAI* GetAI_boss_felmyst(Creature* pCreature) +{ + return new boss_felmystAI(pCreature); +} + void AddSC_boss_felmyst() { + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_felmyst"; + pNewScript->GetAI = &GetAI_boss_felmyst; + pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/sunwell_plateau/instance_sunwell_plateau.cpp b/scripts/eastern_kingdoms/sunwell_plateau/instance_sunwell_plateau.cpp index 817c7cc49..624a93afe 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/instance_sunwell_plateau.cpp +++ b/scripts/eastern_kingdoms/sunwell_plateau/instance_sunwell_plateau.cpp @@ -58,6 +58,20 @@ bool instance_sunwell_plateau::IsEncounterInProgress() const return false; } +void instance_sunwell_plateau::OnPlayerEnter(Player* pPlayer) +{ + // Return if Felmyst already dead, or Brutallus alive + if (m_auiEncounter[TYPE_BRUTALLUS] != DONE || m_auiEncounter[TYPE_FELMYST] == DONE) + return; + + // Return if already summoned + if (GetSingleCreatureFromStorage(NPC_FELMYST, true)) + return; + + // Summon Felmyst in reload case + pPlayer->SummonCreature(NPC_FELMYST, aMadrigosaGroundLoc[0], aMadrigosaGroundLoc[1], aMadrigosaGroundLoc[2], aMadrigosaGroundLoc[3], TEMPSUMMON_DEAD_DESPAWN, 0); +} + void instance_sunwell_plateau::OnCreatureCreate(Creature* pCreature) { switch(pCreature->GetEntry()) @@ -68,6 +82,7 @@ void instance_sunwell_plateau::OnCreatureCreate(Creature* pCreature) case NPC_FLIGHT_TRIGGER_LEFT: case NPC_MADRIGOSA: case NPC_BRUTALLUS: + case NPC_FELMYST: case NPC_ALYTHESS: case NPC_SACROLASH: case NPC_MURU: diff --git a/scripts/eastern_kingdoms/sunwell_plateau/sunwell_plateau.h b/scripts/eastern_kingdoms/sunwell_plateau/sunwell_plateau.h index 3dfce9c6e..d7c40b5a1 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/sunwell_plateau.h +++ b/scripts/eastern_kingdoms/sunwell_plateau/sunwell_plateau.h @@ -22,7 +22,7 @@ enum NPC_MADRIGOSA = 25160, NPC_FLIGHT_TRIGGER_LEFT = 25357, // Related to Felmyst flight path. Also the anchor to summon Madrigosa NPC_BRUTALLUS = 24882, - // NPC_FELMYST = 25038, + NPC_FELMYST = 25038, NPC_ALYTHESS = 25166, NPC_SACROLASH = 25165, NPC_MURU = 25741, @@ -59,6 +59,9 @@ enum MAX_DECEIVERS = 3 }; +// Used to summon Felmyst in reload case. This is the place where Madrigosa is killed in the intro event +static const float aMadrigosaGroundLoc[4] = {1459.35f, 636.81f, 19.94f, 4.88f}; + class MANGOS_DLL_DECL instance_sunwell_plateau : public ScriptedInstance { public: @@ -68,6 +71,7 @@ class MANGOS_DLL_DECL instance_sunwell_plateau : public ScriptedInstance void Initialize(); bool IsEncounterInProgress() const; + void OnPlayerEnter(Player* pPlayer); void OnObjectCreate(GameObject* pGo); void OnCreatureCreate(Creature* pCreature); void OnCreatureDeath(Creature* pCreature); diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index ed8b3a01b..58620d368 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2360" + #define SD2_REVISION_NR "2361" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 8d5d7dd28..a930409f0 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -1068,6 +1068,8 @@ UPDATE creature_template SET ScriptName='npc_portal_target' WHERE entry=25770; UPDATE creature_template SET ScriptName='npc_void_sentinel_summoner' WHERE entry=25782; UPDATE creature_template SET ScriptName='boss_kiljaeden' WHERE entry=25315; UPDATE creature_template SET ScriptName='npc_kiljaeden_controller' WHERE entry=25608; +UPDATE creature_template SET ScriptName='spell_dummy_npc_brutallus_cloud' WHERE entry=25703; +UPDATE creature_template SET ScriptName='boss_felmyst' WHERE entry=25038; /* SWAMP OF SORROWS */ UPDATE creature_template SET ScriptName='npc_galen_goodward' WHERE entry=5391; diff --git a/sql/updates/r2361_mangos.sql b/sql/updates/r2361_mangos.sql new file mode 100644 index 000000000..f0a5ca951 --- /dev/null +++ b/sql/updates/r2361_mangos.sql @@ -0,0 +1,2 @@ +UPDATE creature_template SET ScriptName='spell_dummy_npc_brutallus_cloud' WHERE entry=25703; +UPDATE creature_template SET ScriptName='boss_felmyst' WHERE entry=25038; From 0732ea2b2e2ce9d920d2d308da57f294ceddd9f5 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sun, 11 Dec 2011 21:38:27 +0200 Subject: [PATCH 0346/1172] [2362] Implement outro event and improve evading method for Felmyst --- .../sunwell_plateau/boss_brutallus.cpp | 6 +-- .../sunwell_plateau/boss_felmyst.cpp | 28 +++++++++++-- .../instance_sunwell_plateau.cpp | 40 ++++++++++++++++++- .../sunwell_plateau/sunwell_plateau.h | 9 ++++- sd2_revision_nr.h | 2 +- 5 files changed, 74 insertions(+), 11 deletions(-) diff --git a/scripts/eastern_kingdoms/sunwell_plateau/boss_brutallus.cpp b/scripts/eastern_kingdoms/sunwell_plateau/boss_brutallus.cpp index d3615f102..2c1a61d21 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/boss_brutallus.cpp +++ b/scripts/eastern_kingdoms/sunwell_plateau/boss_brutallus.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: Boss_Brutallus -SD%Complete: 50 -SDComment: Intro not made. Script for Madrigosa to be added here. +SD%Complete: 90 +SDComment: Intro may need some adjustments SDCategory: Sunwell Plateau EndScriptData */ @@ -96,8 +96,6 @@ static const DialogueEntry aIntroDialogue[] = {0, 0, 0}, }; -static const float aMadrigosaFlyLoc[3] = {1459.35f, 636.81f, 59.234f}; - struct MANGOS_DLL_DECL boss_brutallusAI : public ScriptedAI, private DialogueHelper { boss_brutallusAI(Creature* pCreature) : ScriptedAI(pCreature), diff --git a/scripts/eastern_kingdoms/sunwell_plateau/boss_felmyst.cpp b/scripts/eastern_kingdoms/sunwell_plateau/boss_felmyst.cpp index a0a528052..4dbdf5248 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/boss_felmyst.cpp +++ b/scripts/eastern_kingdoms/sunwell_plateau/boss_felmyst.cpp @@ -33,10 +33,8 @@ enum SAY_TAKEOFF = -1580040, SAY_BREATH = -1580039, SAY_BERSERK = -1580041, - SAY_KALECGOS_OUTRO = -1580043, SPELL_FELBLAZE_VISUAL = 45068, // Visual transform aura - SPELL_OPEN_BACK_DOOR = 46650, // Opens the fire barrier - script effect for 46652 }; struct MANGOS_DLL_DECL boss_felmystAI : public ScriptedAI @@ -55,14 +53,38 @@ struct MANGOS_DLL_DECL boss_felmystAI : public ScriptedAI void Reset() { // Transform into Felmyst dragon + DoCastSpellIfCan(m_creature, SPELL_FELBLAZE_VISUAL); + } + + void MoveInLineOfSight(Unit* pWho) + { if (!m_bHasTransformed) { - if (DoCastSpellIfCan(m_creature, SPELL_FELBLAZE_VISUAL) == CAST_OK) + if (pWho->GetTypeId() == TYPEID_PLAYER && pWho->IsWithinLOSInMap(m_creature) && pWho->IsWithinDistInMap(m_creature, 100.0f)) { DoScriptText(SAY_INTRO, m_creature); m_bHasTransformed = true; } } + + ScriptedAI::MoveInLineOfSight(pWho); + } + + void EnterEvadeMode() + { + m_creature->RemoveAllAuras(); + m_creature->DeleteThreatList(); + m_creature->CombatStop(true); + + // Add the visual aura back when evading - workaround because there is no way to remove only the negative auras + DoCastSpellIfCan(m_creature, SPELL_FELBLAZE_VISUAL, CAST_TRIGGERED); + + if (m_creature->isAlive()) + m_creature->GetMotionMaster()->MoveTargetedHome(); + + m_creature->SetLootRecipient(NULL); + + Reset(); } void Aggro(Unit* pWho) diff --git a/scripts/eastern_kingdoms/sunwell_plateau/instance_sunwell_plateau.cpp b/scripts/eastern_kingdoms/sunwell_plateau/instance_sunwell_plateau.cpp index 624a93afe..e6c5467be 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/instance_sunwell_plateau.cpp +++ b/scripts/eastern_kingdoms/sunwell_plateau/instance_sunwell_plateau.cpp @@ -33,7 +33,15 @@ EndScriptData */ 5 - Kil'Jaeden */ -instance_sunwell_plateau::instance_sunwell_plateau(Map* pMap) : ScriptedInstance(pMap), +static const DialogueEntry aFelmystOutroDialogue[] = +{ + {NPC_KALECGOS, 0, 10000}, + {SAY_KALECGOS_OUTRO, NPC_KALECGOS, 10000}, + {SPELL_OPEN_BACK_DOOR, 0, 0}, + {0, 0, 0}, +}; + +instance_sunwell_plateau::instance_sunwell_plateau(Map* pMap) : ScriptedInstance(pMap), DialogueHelper(aFelmystOutroDialogue), m_uiMuruBerserkTimer(0), m_uiDeceiversKilled(0), m_uiKalecRespawnTimer(0), @@ -45,6 +53,7 @@ instance_sunwell_plateau::instance_sunwell_plateau(Map* pMap) : ScriptedInstance void instance_sunwell_plateau::Initialize() { memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); + InitializeDialogueHelper(this); } bool instance_sunwell_plateau::IsEncounterInProgress() const @@ -183,9 +192,12 @@ void instance_sunwell_plateau::SetData(uint32 uiType, uint32 uiData) break; case TYPE_FELMYST: m_auiEncounter[uiType] = uiData; - // Temporary - until spell 46650 is properly fixed if (uiData == DONE) + { + StartNextDialogueText(NPC_KALECGOS); + // Temporary - until spell 46650 is properly fixed DoUseDoorOrButton(GO_FIRE_BARRIER); + } break; case TYPE_EREDAR_TWINS: m_auiEncounter[uiType] = uiData; @@ -240,6 +252,8 @@ uint32 instance_sunwell_plateau::GetData(uint32 uiType) void instance_sunwell_plateau::Update(uint32 uiDiff) { + DialogueUpdate(uiDiff); + if (m_uiKalecRespawnTimer) { if (m_uiKalecRespawnTimer <= uiDiff) @@ -294,6 +308,28 @@ void instance_sunwell_plateau::Load(const char* in) OUT_LOAD_INST_DATA_COMPLETE; } +void instance_sunwell_plateau::JustDidDialogueStep(int32 iEntry) +{ + switch (iEntry) + { + case NPC_KALECGOS: + if (Creature* pTrigger = GetSingleCreatureFromStorage(NPC_FLIGHT_TRIGGER_LEFT)) + { + if (Creature* pKalec = pTrigger->SummonCreature(NPC_KALECGOS, pTrigger->GetPositionX(), pTrigger->GetPositionY(), pTrigger->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN, 1*MINUTE*IN_MILLISECONDS)) + { + pKalec->SetWalk(false); + pKalec->SetLevitate(true); + pKalec->GetMotionMaster()->MovePoint(0, aMadrigosaFlyLoc[0], aMadrigosaFlyLoc[1], aMadrigosaFlyLoc[2]); + } + } + break; + case SPELL_OPEN_BACK_DOOR: + if (Creature* pKalec = GetSingleCreatureFromStorage(NPC_KALECGOS)) + pKalec->CastSpell(pKalec, SPELL_OPEN_BACK_DOOR, true); + break; + } +} + InstanceData* GetInstanceData_instance_sunwell_plateau(Map* pMap) { return new instance_sunwell_plateau(pMap); diff --git a/scripts/eastern_kingdoms/sunwell_plateau/sunwell_plateau.h b/scripts/eastern_kingdoms/sunwell_plateau/sunwell_plateau.h index d7c40b5a1..c2aaef057 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/sunwell_plateau.h +++ b/scripts/eastern_kingdoms/sunwell_plateau/sunwell_plateau.h @@ -46,10 +46,13 @@ enum GO_MURU_EXIT_GATE = 188118, GO_THIRD_GATE = 187765, // door after muru; why another? + SAY_KALECGOS_OUTRO = -1580043, SAY_TWINS_INTRO = -1580044, AREATRIGGER_TWINS = 4937, + // Felmyst ouro spell + SPELL_OPEN_BACK_DOOR = 46650, // Opens the fire barrier - script effect for 46652 // used by both muru and entropius SPELL_MURU_BERSERK = 26662, // visuals for Kiljaeden encounter @@ -61,8 +64,10 @@ enum // Used to summon Felmyst in reload case. This is the place where Madrigosa is killed in the intro event static const float aMadrigosaGroundLoc[4] = {1459.35f, 636.81f, 19.94f, 4.88f}; +// Used as an anchor to move Madrigosa and Kalec during the cinematic +static const float aMadrigosaFlyLoc[3] = {1459.35f, 636.81f, 59.234f}; -class MANGOS_DLL_DECL instance_sunwell_plateau : public ScriptedInstance +class MANGOS_DLL_DECL instance_sunwell_plateau : public ScriptedInstance, private DialogueHelper { public: instance_sunwell_plateau(Map* pMap); @@ -85,6 +90,8 @@ class MANGOS_DLL_DECL instance_sunwell_plateau : public ScriptedInstance void Load(const char* chrIn); protected: + void JustDidDialogueStep(int32 iEntry); + uint32 m_auiEncounter[MAX_ENCOUNTER]; std::string m_strInstData; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 58620d368..d6c43d159 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2361" + #define SD2_REVISION_NR "2362" #endif // __SD2_REVISION_NR_H__ From b5c61f7cd12f472e7df340e25092d3b82e86bc3e Mon Sep 17 00:00:00 2001 From: Xfurry Date: Mon, 12 Dec 2011 22:28:10 +0200 Subject: [PATCH 0347/1172] [2363] Implement Felmyst ground phase abilities Note: the Encapsulate spell requires some stacking exception in core --- .../sunwell_plateau/boss_felmyst.cpp | 116 +++++++++++++++++- .../sunwell_plateau/sunwell_plateau.h | 1 + sd2_revision_nr.h | 2 +- 3 files changed, 114 insertions(+), 5 deletions(-) diff --git a/scripts/eastern_kingdoms/sunwell_plateau/boss_felmyst.cpp b/scripts/eastern_kingdoms/sunwell_plateau/boss_felmyst.cpp index 4dbdf5248..0e721fb96 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/boss_felmyst.cpp +++ b/scripts/eastern_kingdoms/sunwell_plateau/boss_felmyst.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: boss_felmyst -SD%Complete: 20% -SDComment: Spawn support only +SD%Complete: 50% +SDComment: Only ground phase spells SDCategory: Sunwell Plateau EndScriptData */ @@ -34,7 +34,34 @@ enum SAY_BREATH = -1580039, SAY_BERSERK = -1580041, - SPELL_FELBLAZE_VISUAL = 45068, // Visual transform aura + SPELL_FELBLAZE_VISUAL = 45068, // Visual transform aura + SPELL_NOXIOUS_FUMES = 47002, + SPELL_BERSERK = 26662, + + // ground phase + SPELL_CLEAVE = 19983, + SPELL_CORROSION = 45866, + SPELL_GAS_NOVA = 45855, + SPELL_ENCAPSULATE = 45665, + SPELL_ENCAPSULATE_CHANNEL = 45661, + + // flight phase + SPELL_DEMONIC_VAPOR = 45399, + SPELL_VAPOR_BEAM_VISUAL = 45389, + SPELL_FOG_CORRUPTION = 45582, + SPELL_SOUL_SEVER = 45918, // kills all charmed targets at wipe - script effect for 45917 + SPELL_SUMMON_VAPOR = 45391, + SPELL_SUMMON_VAPOR_TRIAL = 45410, + SPELL_SUMMON_BLAZING_DEAD = 45400, + + // npcs + NPC_UNYELDING_DEAD = 25268, // spawned during flight phase + NPC_DEMONIC_VAPOR = 25265, + NPC_DEMONIC_VAPOR_TRAIL = 25267, + + // phases + PHASE_GROUND = 1, + PHASE_AIR = 2, }; struct MANGOS_DLL_DECL boss_felmystAI : public ScriptedAI @@ -50,10 +77,30 @@ struct MANGOS_DLL_DECL boss_felmystAI : public ScriptedAI bool m_bHasTransformed; + uint8 m_uiPhase; + uint32 m_uiBerserkTimer; + + // Ground Phase timers + uint32 m_uiFlyPhaseTimer; + uint32 m_uiCorrosionTimer; + uint32 m_uiCleaveTimer; + uint32 m_uiEncapsulateTimer; + uint32 m_uiGasNovaTimer; + void Reset() { // Transform into Felmyst dragon DoCastSpellIfCan(m_creature, SPELL_FELBLAZE_VISUAL); + + m_uiPhase = PHASE_GROUND; + m_uiBerserkTimer = 10*MINUTE*IN_MILLISECONDS; + + // Ground Phase + m_uiCorrosionTimer = 30000; + m_uiCleaveTimer = urand(2000, 5000); + m_uiGasNovaTimer = 17000; + m_uiEncapsulateTimer = urand(30000, 40000); + m_uiFlyPhaseTimer = 60000; // flight phase after 1 min } void MoveInLineOfSight(Unit* pWho) @@ -89,6 +136,8 @@ struct MANGOS_DLL_DECL boss_felmystAI : public ScriptedAI void Aggro(Unit* pWho) { + DoCastSpellIfCan(m_creature, SPELL_NOXIOUS_FUMES); + if (m_pInstance) m_pInstance->SetData(TYPE_FELMYST, IN_PROGRESS); } @@ -112,12 +161,71 @@ struct MANGOS_DLL_DECL boss_felmystAI : public ScriptedAI m_pInstance->SetData(TYPE_FELMYST, FAIL); } + void SpellHitTarget(Unit* pTarget, const SpellEntry* pSpell) + { + if (pTarget->GetTypeId() == TYPEID_PLAYER && pSpell->Id == SPELL_ENCAPSULATE_CHANNEL) + pTarget->CastSpell(pTarget, SPELL_ENCAPSULATE, true, NULL, NULL, m_creature->GetObjectGuid()); + } + void UpdateAI(const uint32 uiDiff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - DoMeleeAttackIfReady(); + if (m_uiBerserkTimer) + { + if(m_uiBerserkTimer <= uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_BERSERK) == CAST_OK) + { + DoScriptText(SAY_BERSERK, m_creature); + m_uiBerserkTimer = 0; + } + } + else + m_uiBerserkTimer -= uiDiff; + } + + if (m_uiPhase == PHASE_GROUND) + { + if (m_uiCleaveTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_CLEAVE) == CAST_OK) + m_uiCleaveTimer = urand(2000, 5000); + } + else + m_uiCleaveTimer -= uiDiff; + + if (m_uiCorrosionTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_CORROSION) == CAST_OK) + m_uiCorrosionTimer = 30000; + } + else + m_uiCorrosionTimer -= uiDiff; + + if (m_uiGasNovaTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_GAS_NOVA) == CAST_OK) + m_uiGasNovaTimer = 23000; + } + else + m_uiGasNovaTimer -= uiDiff; + + if (m_uiEncapsulateTimer < uiDiff) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, SPELL_ENCAPSULATE_CHANNEL) == CAST_OK) + m_uiEncapsulateTimer = urand(30000, 40000); + } + } + else + m_uiEncapsulateTimer -= uiDiff; + + DoMeleeAttackIfReady(); + } + // ToDo: add flight phase here } }; diff --git a/scripts/eastern_kingdoms/sunwell_plateau/sunwell_plateau.h b/scripts/eastern_kingdoms/sunwell_plateau/sunwell_plateau.h index c2aaef057..fdbbae535 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/sunwell_plateau.h +++ b/scripts/eastern_kingdoms/sunwell_plateau/sunwell_plateau.h @@ -21,6 +21,7 @@ enum NPC_SATHROVARR = 24892, NPC_MADRIGOSA = 25160, NPC_FLIGHT_TRIGGER_LEFT = 25357, // Related to Felmyst flight path. Also the anchor to summon Madrigosa + // NPC_FLIGHT_TRIGGER_RIGHT = 25358, // related to Felmyst flight path NPC_BRUTALLUS = 24882, NPC_FELMYST = 25038, NPC_ALYTHESS = 25166, diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index d6c43d159..221d7aa53 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2362" + #define SD2_REVISION_NR "2363" #endif // __SD2_REVISION_NR_H__ From a94e028748af1737f08c79f5aa9ea1a7cf41f506 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sat, 17 Dec 2011 23:44:51 +0200 Subject: [PATCH 0348/1172] [2364] Implement Kil'jaeden encounter phases and related dialogues Note: spell 45892 needs core support and spell 46680 needs targeting corrections in core --- .../sunwell_plateau/boss_felmyst.cpp | 2 +- .../sunwell_plateau/boss_kiljaeden.cpp | 208 +++++++++++++++++- .../instance_sunwell_plateau.cpp | 2 + .../sunwell_plateau/sunwell_plateau.h | 3 +- sd2_revision_nr.h | 2 +- sql/scriptdev2_script_full.sql | 8 +- sql/updates/r2364_scriptdev2.sql | 1 + 7 files changed, 209 insertions(+), 17 deletions(-) create mode 100644 sql/updates/r2364_scriptdev2.sql diff --git a/scripts/eastern_kingdoms/sunwell_plateau/boss_felmyst.cpp b/scripts/eastern_kingdoms/sunwell_plateau/boss_felmyst.cpp index 0e721fb96..19aecf381 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/boss_felmyst.cpp +++ b/scripts/eastern_kingdoms/sunwell_plateau/boss_felmyst.cpp @@ -174,7 +174,7 @@ struct MANGOS_DLL_DECL boss_felmystAI : public ScriptedAI if (m_uiBerserkTimer) { - if(m_uiBerserkTimer <= uiDiff) + if (m_uiBerserkTimer <= uiDiff) { if (DoCastSpellIfCan(m_creature, SPELL_BERSERK) == CAST_OK) { diff --git a/scripts/eastern_kingdoms/sunwell_plateau/boss_kiljaeden.cpp b/scripts/eastern_kingdoms/sunwell_plateau/boss_kiljaeden.cpp index 42c87a371..510a3ebbe 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/boss_kiljaeden.cpp +++ b/scripts/eastern_kingdoms/sunwell_plateau/boss_kiljaeden.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: boss_kiljaeden -SD%Complete: 20 -SDComment: Only spawn support and epilogue event +SD%Complete: 30 +SDComment: Only spawn support, epilogue event and encounter phase transitions SDCategory: Sunwell Plateau EndScriptData */ @@ -72,9 +72,51 @@ enum SAY_OUTRO_11 = -1580105, // Velen SAY_OUTRO_12 = -1580106, - // spells + // generic spells SPELL_BIRTH = 37745, // Kiljaeden spawn animation + // transition spells + SPELL_DESTROY_DRAKES = 46707, + SPELL_SINISTER_REFLECTION = 45892, + SPELL_SHADOW_SPIKE = 46680, + + // phase 1 + SPELL_SOULFLY = 45442, + SPELL_LEGION_LIGHTING = 45664, + SPELL_FIREBLOOM = 45641, + + // phase 2 + SPELL_FLAMEDART = 45740, + SPELL_DARKNESS_OF_SOULS = 46605, + + // phase 3 + SPELL_ARMAGEDDON = 45921, // used from 50% hp - summons 25735 - related to the following spells: 45909, 45915, 45911, 45914 + + // Npc spells + SPELL_SHADOW_BOLT_AURA = 45679, // periodic aura on shield orbs + SPELL_RING_BLUE_FLAME = 45825, // cast by the orb targets when activated + SPELL_ANVEENA_PRISON = 46367, + SPELL_SACRIFICE_ANVEENA = 46474, + + // Npcs + NPC_SHIELD_ORB = 25502, + NPC_SINISTER_REFLECTION = 25708, + NPC_ARMAGEDON = 25735, + NPC_BLUE_ORB_TARGET = 25640, // dummy npc near gameobjects 187869, 188414, 188415, 188416 + + // phases + PHASE_INFERNO = 1, + PHASE_DARKNESS = 2, + PHASE_ARMAGEDDON = 3, + PHASE_SACRIFICE = 4, + PHASE_TRANSITION = 5, + + // dummy members, used in the phase switch event + EVENT_SWITCH_PHASE_2 = 6, + EVENT_SWITCH_PHASE_3 = 7, + EVENT_SWITCH_PHASE_4 = 8, + EVENT_DRAGON_ORB = 9, + // outro SPELL_TELEPORT_VISUAL = 41232, SPELL_KALEC_TELEPORT = 46473, // teleports and transforms Kalec in human form @@ -93,6 +135,34 @@ enum POINT_EVENT_EXIT = 3, }; +// Encounter phase dialogue +static const DialogueEntry aPhaseDialogue[] = +{ + {PHASE_DARKNESS, 0, 2000}, + {EVENT_SWITCH_PHASE_2, 0, 17000}, + {SAY_KALECGOS_AWAKE_1, NPC_KALECGOS, 6000}, + {SAY_ANVEENA_IMPRISONED, NPC_ANVEENA, 5000}, + {SAY_PHASE_3, NPC_KILJAEDEN, 6000}, + {SAY_KALECGOS_ORB_1, NPC_KALECGOS, 0}, // phase 2 transition end + {PHASE_ARMAGEDDON, 0, 2000}, + {EVENT_SWITCH_PHASE_3, 0, 14000}, + {SAY_KALECGOS_AWAKE_2, NPC_KALECGOS, 7000}, + {SAY_ANVEENA_LOST, NPC_ANVEENA, 7000}, + {SAY_PHASE_4, NPC_KILJAEDEN, 6000}, + {EVENT_DRAGON_ORB, 0, 0}, // phase 3 transition end + {PHASE_SACRIFICE, 0, 2000}, + {EVENT_SWITCH_PHASE_4, 0, 5000}, + {SAY_KALECGOS_AWAKE_4, NPC_KALECGOS, 10000}, + {SAY_ANVEENA_AWAKE, NPC_ANVEENA, 2000}, + {SAY_KALECGOS_AWAKE_5, NPC_KALECGOS, 6000}, + {SAY_ANVEENA_SACRIFICE, NPC_ANVEENA, 5000}, + {SAY_PHASE_5, NPC_KILJAEDEN, 13000}, + {SAY_KALECGOS_ORB_4, NPC_KALECGOS, 5000}, + {SAY_KALECGOS_ENCOURAGE, NPC_KALECGOS, 0}, // phase 4 transition end + {0, 0, 0}, +}; + +// Epilogue dialogue static const DialogueEntry aOutroDialogue[] = { {NPC_KALECGOS, 0, 15000}, @@ -156,13 +226,16 @@ struct MANGOS_DLL_DECL npc_kiljaeden_controllerAI : public Scripted_NoMovementAI } // Wrapper to start the dialogue text from another AI - void DoStartDialogue(uint32 uiEntry) + void DoStartOutroDialogue() { - StartNextDialogueText(uiEntry); + StartNextDialogueText(NPC_KALECGOS); } void JustDidDialogueStep(int32 iEntry) { + if (!m_pInstance) + return; + switch (iEntry) { case NPC_KALECGOS: @@ -283,18 +356,26 @@ struct MANGOS_DLL_DECL npc_kiljaeden_controllerAI : public Scripted_NoMovementAI } }; -struct MANGOS_DLL_DECL boss_kiljaedenAI : public Scripted_NoMovementAI +struct MANGOS_DLL_DECL boss_kiljaedenAI : public Scripted_NoMovementAI, private DialogueHelper { - boss_kiljaedenAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) + boss_kiljaedenAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature), + DialogueHelper(aPhaseDialogue) { m_pInstance = ((instance_sunwell_plateau*)pCreature->GetInstanceData()); + InitializeDialogueHelper(m_pInstance); Reset(); } instance_sunwell_plateau* m_pInstance; + uint8 m_uiPhase; + + uint32 m_uiKalecSummonTimer; + void Reset() { + m_uiPhase = PHASE_INFERNO; + m_uiKalecSummonTimer = 35000; } void Aggro(Unit* pWho) @@ -312,8 +393,16 @@ struct MANGOS_DLL_DECL boss_kiljaedenAI : public Scripted_NoMovementAI { m_pInstance->SetData(TYPE_KILJAEDEN, FAIL); + // Reset the corrupt Sunwell aura if (Creature* pKiljaedenController = m_pInstance->GetSingleCreatureFromStorage(NPC_KILJAEDEN_CONTROLLER)) pKiljaedenController->CastSpell(pKiljaedenController, SPELL_ANVEENA_DRAIN, true); + + // Respawn Anveena if necessary + if (Creature* pAnveena = m_pInstance->GetSingleCreatureFromStorage(NPC_ANVEENA)) + { + if (!pAnveena->isAlive()) + pAnveena->Respawn(); + } } // Despawn on wipe @@ -335,17 +424,118 @@ struct MANGOS_DLL_DECL boss_kiljaedenAI : public Scripted_NoMovementAI if (Creature* pKiljaedenController = m_pInstance->GetSingleCreatureFromStorage(NPC_KILJAEDEN_CONTROLLER)) { if (npc_kiljaeden_controllerAI* pControllerAI = dynamic_cast(pKiljaedenController->AI())) - pControllerAI->DoStartDialogue(NPC_KALECGOS); + pControllerAI->DoStartOutroDialogue(); } } } + void JustSummoned(Creature* pSummoned) + { + if (pSummoned->GetEntry() == NPC_KALECGOS) + { + DoScriptText(SAY_KALECGOS_INTRO, pSummoned); + pSummoned->SetLevitate(true); + } + } + + void JustDidDialogueStep(int32 iEntry) + { + if (!m_pInstance) + return; + + switch (iEntry) + { + case PHASE_DARKNESS: + case PHASE_ARMAGEDDON: + case PHASE_SACRIFICE: + if (DoCastSpellIfCan(m_creature, SPELL_SINISTER_REFLECTION, CAST_INTERRUPT_PREVIOUS) == CAST_OK) + { + DoScriptText(irand(0, 1) ? SAY_REFLECTION_1 : SAY_REFLECTION_2, m_creature); + m_uiPhase = PHASE_TRANSITION; + // ToDo: reset spell timers + } + break; + case EVENT_SWITCH_PHASE_2: + case EVENT_SWITCH_PHASE_3: + case EVENT_SWITCH_PHASE_4: + DoCastSpellIfCan(m_creature, SPELL_SHADOW_SPIKE); + break; + case EVENT_DRAGON_ORB: + if (Creature* pKalec = m_pInstance->GetSingleCreatureFromStorage(NPC_KALECGOS)) + DoScriptText(irand(0, 1) ? SAY_KALECGOS_ORB_2 : SAY_KALECGOS_ORB_3, pKalec); + // no break + case SAY_KALECGOS_ORB_1: + case SAY_KALECGOS_ORB_4: + // ToDo: activate the blue dragon orbs + break; + case SAY_PHASE_3: + m_uiPhase = PHASE_DARKNESS; + break; + case SAY_PHASE_4: + m_uiPhase = PHASE_ARMAGEDDON; + break; + case SAY_PHASE_5: + if (Creature* pAnveena = m_pInstance->GetSingleCreatureFromStorage(NPC_ANVEENA)) + { + pAnveena->RemoveAurasDueToSpell(SPELL_ANVEENA_PRISON); + pAnveena->CastSpell(pAnveena, SPELL_SACRIFICE_ANVEENA, true); + pAnveena->ForcedDespawn(1000); + } + m_uiPhase = PHASE_SACRIFICE; + break; + } + } + void UpdateAI(const uint32 uiDiff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - DoMeleeAttackIfReady(); + DialogueUpdate(uiDiff); + + switch (m_uiPhase) + { + case PHASE_TRANSITION: + // Transition phase is handled in the dialogue helper; however we don't want the spell timers to be decreased so we use a specific phase + break; + case PHASE_SACRIFICE: + // Final phase - use the same spells + // no break; + case PHASE_ARMAGEDDON: + + // Go to next phase and start transition dialogue + if (m_uiPhase == PHASE_ARMAGEDDON && m_creature->GetHealthPercent() < 25.0f) + StartNextDialogueText(PHASE_SACRIFICE); + + // no break - use the spells from the phases below; + case PHASE_DARKNESS: + + // Go to next phase and start transition dialogue + if (m_uiPhase == PHASE_DARKNESS && m_creature->GetHealthPercent() < 55.0f) + StartNextDialogueText(PHASE_ARMAGEDDON); + + // no break - use the spells from the phase below; + case PHASE_INFERNO: + + if (m_uiKalecSummonTimer) + { + if (m_uiKalecSummonTimer <= uiDiff) + { + m_creature->SummonCreature(NPC_KALECGOS, m_creature->GetPositionX(), m_creature->GetPositionY(), 85.0f, 3.80f, TEMPSUMMON_CORPSE_DESPAWN, 0); + m_uiKalecSummonTimer = 0; + } + else + m_uiKalecSummonTimer -= uiDiff; + } + + // Go to next phase and start transition dialogue + if (m_uiPhase == PHASE_INFERNO && m_creature->GetHealthPercent() < 85.0f) + StartNextDialogueText(PHASE_DARKNESS); + + DoMeleeAttackIfReady(); + + break; + } } }; diff --git a/scripts/eastern_kingdoms/sunwell_plateau/instance_sunwell_plateau.cpp b/scripts/eastern_kingdoms/sunwell_plateau/instance_sunwell_plateau.cpp index e6c5467be..0ec4aced9 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/instance_sunwell_plateau.cpp +++ b/scripts/eastern_kingdoms/sunwell_plateau/instance_sunwell_plateau.cpp @@ -97,7 +97,9 @@ void instance_sunwell_plateau::OnCreatureCreate(Creature* pCreature) case NPC_MURU: case NPC_ENTROPIUS: case NPC_KILJAEDEN_CONTROLLER: + case NPC_KILJAEDEN: case NPC_KALECGOS: + case NPC_ANVEENA: case NPC_VELEN: case NPC_LIADRIN: m_mNpcEntryGuidStore[pCreature->GetEntry()] = pCreature->GetObjectGuid(); diff --git a/scripts/eastern_kingdoms/sunwell_plateau/sunwell_plateau.h b/scripts/eastern_kingdoms/sunwell_plateau/sunwell_plateau.h index fdbbae535..46b04f5b1 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/sunwell_plateau.h +++ b/scripts/eastern_kingdoms/sunwell_plateau/sunwell_plateau.h @@ -31,7 +31,7 @@ enum NPC_DECEIVER = 25588, NPC_KILJAEDEN = 25315, NPC_KILJAEDEN_CONTROLLER = 25608, // kiljaeden event controller - // NPC_ANVEENA = 26046, // related to kiljaeden event + NPC_ANVEENA = 26046, // related to kiljaeden event NPC_KALECGOS = 25319, // related to kiljaeden event NPC_VELEN = 26246, NPC_LIADRIN = 26247, @@ -57,7 +57,6 @@ enum // used by both muru and entropius SPELL_MURU_BERSERK = 26662, // visuals for Kiljaeden encounter - SPELL_ANVEENA_PRISON = 46367, SPELL_ANVEENA_DRAIN = 46410, MAX_DECEIVERS = 3 diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 221d7aa53..633ba798d 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2363" + #define SD2_REVISION_NR "2364" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 18f8be1bc..88d6807f3 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -2674,13 +2674,13 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1580079,'Aggghh! The powers of the Sunwell... turn... against me! What have you done? What have you done???',12510,1,0,0,'kiljaeden SAY_PHASE_5'), (-1580080,'You are not alone. The Blue Dragonflight shall help you vanquish the Deceiver.',12438,1,0,0,'kalecgos SAY_KALECGOS_INTRO'), (-1580081,'Anveena, you must awaken, this world needs you!',12445,1,0,0,'kalecgos SAY_KALECGOS_AWAKE_1'), -(-1580082,'I serve only the Master now.',12511,1,0,0,'anveena SAY_ANVEENA_IMPRISONED'), +(-1580082,'I serve only the Master now.',12511,0,0,0,'anveena SAY_ANVEENA_IMPRISONED'), (-1580083,'You must let go! You must become what you were always meant to be! The time is now, Anveena!',12446,1,0,0,'kalecgos SAY_KALECGOS_AWAKE_2'), -(-1580084,'But I\'m... lost. I cannot find my way back.',12512,1,0,0,'anveena SAY_ANVEENA_LOST'), +(-1580084,'But I\'m... lost. I cannot find my way back.',12512,0,0,0,'anveena SAY_ANVEENA_LOST'), (-1580085,'Anveena, I love you! Focus on my voice, come back for me now! Only you can cleanse the Sunwell!',12447,1,0,0,'kalecgos SAY_KALECGOS_AWAKE_4'), -(-1580086,'Kalec... Kalec?',12513,1,0,0,'anveena SAY_ANVEENA_AWAKE'), +(-1580086,'Kalec... Kalec?',12513,0,0,0,'anveena SAY_ANVEENA_AWAKE'), (-1580087,'Yes, Anveena! Let fate embrace you now!',12448,1,0,0,'kalecgos SAY_KALECGOS_AWAKE_5'), -(-1580088,'The nightmare is over, the spell is broken! Goodbye, Kalec, my love!',12514,1,0,0,'anveena SAY_ANVEENA_SACRIFICE'), +(-1580088,'The nightmare is over, the spell is broken! Goodbye, Kalec, my love!',12514,0,0,0,'anveena SAY_ANVEENA_SACRIFICE'), (-1580089,'Goodbye, Anveena, my love. Few will remember your name, yet this day you change the course of destiny. What was once corrupt is now pure. Heroes, do not let her sacrifice be in vain.',12450,0,0,0,'kalecgos SAY_KALECGOS_GOODBYE'), (-1580090,'Strike now, heroes, while he is weakened! Vanquish the Deceiver!',12449,1,0,0,'kalecgos SAY_KALECGOS_ENCOURAGE'), (-1580091,'I will channel my power into the orbs, be ready!',12440,1,0,0,'kalecgos SAY_KALECGOS_ORB_1'), diff --git a/sql/updates/r2364_scriptdev2.sql b/sql/updates/r2364_scriptdev2.sql new file mode 100644 index 000000000..b1b8d38d2 --- /dev/null +++ b/sql/updates/r2364_scriptdev2.sql @@ -0,0 +1 @@ +UPDATE script_texts SET type=0 WHERE entry IN (-1580088, -1580086, -1580084, -1580082); From ccf6d9b6e7e3a384b716d973188556d44b77beae Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sun, 18 Dec 2011 23:51:32 +0200 Subject: [PATCH 0349/1172] [2365] Implement the basic spells for Kil'jaeden --- .../sunwell_plateau/boss_kiljaeden.cpp | 133 ++++++++++++++++-- sd2_revision_nr.h | 2 +- 2 files changed, 124 insertions(+), 11 deletions(-) diff --git a/scripts/eastern_kingdoms/sunwell_plateau/boss_kiljaeden.cpp b/scripts/eastern_kingdoms/sunwell_plateau/boss_kiljaeden.cpp index 510a3ebbe..116a99626 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/boss_kiljaeden.cpp +++ b/scripts/eastern_kingdoms/sunwell_plateau/boss_kiljaeden.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: boss_kiljaeden -SD%Complete: 30 -SDComment: Only spawn support, epilogue event and encounter phase transitions +SD%Complete: 50 +SDComment: Sinister Reflection need core and AI support; Orb of the Blue Fight activation NYI; Shield Orb summoning NYI; Armageddon NYI; Offcombat yells NYI; SDCategory: Sunwell Plateau EndScriptData */ @@ -81,16 +81,16 @@ enum SPELL_SHADOW_SPIKE = 46680, // phase 1 - SPELL_SOULFLY = 45442, + SPELL_SOUL_FLY = 45442, SPELL_LEGION_LIGHTING = 45664, - SPELL_FIREBLOOM = 45641, + SPELL_FIRE_BLOOM = 45641, // phase 2 - SPELL_FLAMEDART = 45740, + SPELL_FLAME_DART = 45740, SPELL_DARKNESS_OF_SOULS = 46605, // phase 3 - SPELL_ARMAGEDDON = 45921, // used from 50% hp - summons 25735 - related to the following spells: 45909, 45915, 45911, 45914 + SPELL_ARMAGEDDON = 45921, // used from 50% hp - summons 25735 on target location // Npc spells SPELL_SHADOW_BOLT_AURA = 45679, // periodic aura on shield orbs @@ -101,8 +101,8 @@ enum // Npcs NPC_SHIELD_ORB = 25502, NPC_SINISTER_REFLECTION = 25708, - NPC_ARMAGEDON = 25735, - NPC_BLUE_ORB_TARGET = 25640, // dummy npc near gameobjects 187869, 188414, 188415, 188416 + NPC_ARMAGEDDON = 25735, // uses spell 45914 followed by spell 45911, 45912, then by 45909 + NPC_BLUE_ORB_TARGET = 25640, // dummy npc near gameobjects 187869, 188114, 188115, 188116 // phases PHASE_INFERNO = 1, @@ -372,10 +372,30 @@ struct MANGOS_DLL_DECL boss_kiljaedenAI : public Scripted_NoMovementAI, private uint32 m_uiKalecSummonTimer; + uint32 m_uiSoulFlyTimer; + uint32 m_uiLegionLightingTimer; + uint32 m_uiFireBloomTimer; + uint32 m_uiShieldOrbTimer; + + uint32 m_uiFlameDartTimer; + uint32 m_uiDarknessOfSoulsTimer; + + uint32 m_uiArmageddonTimer; + void Reset() { m_uiPhase = PHASE_INFERNO; m_uiKalecSummonTimer = 35000; + + m_uiSoulFlyTimer = 10000; + m_uiLegionLightingTimer = urand(10000, 15000); + m_uiFireBloomTimer = urand(15000, 20000); + m_uiShieldOrbTimer = 30000; + + m_uiFlameDartTimer = urand(20000, 25000); + m_uiDarknessOfSoulsTimer = urand(45000, 50000); + + m_uiArmageddonTimer = 20000; } void Aggro(Unit* pWho) @@ -403,6 +423,10 @@ struct MANGOS_DLL_DECL boss_kiljaedenAI : public Scripted_NoMovementAI, private if (!pAnveena->isAlive()) pAnveena->Respawn(); } + + // Despawn Kalec if already summoned + if (Creature* pKalec = m_pInstance->GetSingleCreatureFromStorage(NPC_KALECGOS, true)) + pKalec->ForcedDespawn(); } // Despawn on wipe @@ -451,8 +475,14 @@ struct MANGOS_DLL_DECL boss_kiljaedenAI : public Scripted_NoMovementAI, private if (DoCastSpellIfCan(m_creature, SPELL_SINISTER_REFLECTION, CAST_INTERRUPT_PREVIOUS) == CAST_OK) { DoScriptText(irand(0, 1) ? SAY_REFLECTION_1 : SAY_REFLECTION_2, m_creature); + + // In the 2nd and 3rd transition kill all drakes + if (iEntry == PHASE_ARMAGEDDON || iEntry == PHASE_SACRIFICE) + DoCastSpellIfCan(m_creature, SPELL_DESTROY_DRAKES, CAST_TRIGGERED); + m_uiPhase = PHASE_TRANSITION; - // ToDo: reset spell timers + // Darkness of Souls needs the timer reseted + m_uiDarknessOfSoulsTimer = iEntry == PHASE_SACRIFICE ? 30000 : 45000; } break; case EVENT_SWITCH_PHASE_2: @@ -479,7 +509,7 @@ struct MANGOS_DLL_DECL boss_kiljaedenAI : public Scripted_NoMovementAI, private { pAnveena->RemoveAurasDueToSpell(SPELL_ANVEENA_PRISON); pAnveena->CastSpell(pAnveena, SPELL_SACRIFICE_ANVEENA, true); - pAnveena->ForcedDespawn(1000); + pAnveena->ForcedDespawn(3000); } m_uiPhase = PHASE_SACRIFICE; break; @@ -503,6 +533,15 @@ struct MANGOS_DLL_DECL boss_kiljaedenAI : public Scripted_NoMovementAI, private // no break; case PHASE_ARMAGEDDON: + // In the last phase he uses Armageddon continuously + if (m_uiArmageddonTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_ARMAGEDDON) == CAST_OK) + m_uiArmageddonTimer = m_uiPhase == PHASE_SACRIFICE ? 20000 : 30000; + } + else + m_uiArmageddonTimer -= uiDiff; + // Go to next phase and start transition dialogue if (m_uiPhase == PHASE_ARMAGEDDON && m_creature->GetHealthPercent() < 25.0f) StartNextDialogueText(PHASE_SACRIFICE); @@ -510,6 +549,25 @@ struct MANGOS_DLL_DECL boss_kiljaedenAI : public Scripted_NoMovementAI, private // no break - use the spells from the phases below; case PHASE_DARKNESS: + // In the last phase he uses this spell more often + /* ToDo: Uncomment this spell when the Blue Dragonfight Orbs are implemented + if (m_uiDarknessOfSoulsTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_DARKNESS_OF_SOULS) == CAST_OK) + m_uiDarknessOfSoulsTimer = m_uiPhase == PHASE_SACRIFICE ? 30000 : 45000; + } + else + m_uiDarknessOfSoulsTimer -= uiDiff; + */ + + if (m_uiFlameDartTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_FLAME_DART) == CAST_OK) + m_uiFlameDartTimer = urand(25000, 30000); + } + else + m_uiFlameDartTimer -= uiDiff; + // Go to next phase and start transition dialogue if (m_uiPhase == PHASE_DARKNESS && m_creature->GetHealthPercent() < 55.0f) StartNextDialogueText(PHASE_ARMAGEDDON); @@ -528,6 +586,33 @@ struct MANGOS_DLL_DECL boss_kiljaedenAI : public Scripted_NoMovementAI, private m_uiKalecSummonTimer -= uiDiff; } + if (m_uiLegionLightingTimer < uiDiff) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, SPELL_LEGION_LIGHTING) == CAST_OK) + m_uiLegionLightingTimer = urand(10000, 15000); + } + } + else + m_uiLegionLightingTimer -= uiDiff; + + if (m_uiFireBloomTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_FIRE_BLOOM) == CAST_OK) + m_uiFireBloomTimer = 20000; + } + else + m_uiFireBloomTimer -= uiDiff; + + if (m_uiSoulFlyTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_SOUL_FLY) == CAST_OK) + m_uiSoulFlyTimer = urand(3000, 10000); + } + else + m_uiSoulFlyTimer -= uiDiff; + // Go to next phase and start transition dialogue if (m_uiPhase == PHASE_INFERNO && m_creature->GetHealthPercent() < 85.0f) StartNextDialogueText(PHASE_DARKNESS); @@ -539,6 +624,33 @@ struct MANGOS_DLL_DECL boss_kiljaedenAI : public Scripted_NoMovementAI, private } }; +bool EffectAuraDummy_spell_aura_dummy_darkness_of_souls(const Aura* pAura, bool bApply) +{ + // On Aura removal cast the explosion and yell + // This is a special case when the dummy effect should be triggered at the end of the channeling + if (pAura->GetId() == SPELL_DARKNESS_OF_SOULS && pAura->GetEffIndex() == EFFECT_INDEX_0 && !bApply) + { + if (Creature* pTarget = (Creature*)pAura->GetTarget()) + { + pTarget->CastSpell(pTarget, pAura->GetSpellProto()->CalculateSimpleValue(EFFECT_INDEX_2), true); + + switch (irand(0, 2)) + { + case 0: + DoScriptText(SAY_DARKNESS_1, pTarget); + break; + case 1: + DoScriptText(SAY_DARKNESS_2, pTarget); + break; + case 3: + DoScriptText(SAY_DARKNESS_3, pTarget); + break; + } + } + } + return true; +} + CreatureAI* GetAI_boss_kiljaeden(Creature *pCreature) { return new boss_kiljaedenAI(pCreature); @@ -556,6 +668,7 @@ void AddSC_boss_kiljaeden() pNewScript = new Script; pNewScript->Name="boss_kiljaeden"; pNewScript->GetAI = &GetAI_boss_kiljaeden; + pNewScript->pEffectAuraDummy = &EffectAuraDummy_spell_aura_dummy_darkness_of_souls; pNewScript->RegisterSelf(); pNewScript = new Script; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 633ba798d..2324562e3 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2364" + #define SD2_REVISION_NR "2365" #endif // __SD2_REVISION_NR_H__ From 0af98097665a746589976ec58928af28c9f0292a Mon Sep 17 00:00:00 2001 From: Xfurry Date: Mon, 19 Dec 2011 00:51:12 +0200 Subject: [PATCH 0350/1172] [2366] Implement some debug info for Sunwell Plateau --- .../sunwell_plateau/boss_brutallus.cpp | 28 +++++++++++++++++++ .../sunwell_plateau/boss_kiljaeden.cpp | 5 ++++ sd2_revision_nr.h | 2 +- 3 files changed, 34 insertions(+), 1 deletion(-) diff --git a/scripts/eastern_kingdoms/sunwell_plateau/boss_brutallus.cpp b/scripts/eastern_kingdoms/sunwell_plateau/boss_brutallus.cpp index 2c1a61d21..b39fd3180 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/boss_brutallus.cpp +++ b/scripts/eastern_kingdoms/sunwell_plateau/boss_brutallus.cpp @@ -117,6 +117,7 @@ struct MANGOS_DLL_DECL boss_brutallusAI : public ScriptedAI, private DialogueHel uint32 m_uiMadrigosaSpellTimer; bool m_bCanDoMeleeAttack; + bool m_bIsIntroInProgress; void Reset() { @@ -129,6 +130,7 @@ struct MANGOS_DLL_DECL boss_brutallusAI : public ScriptedAI, private DialogueHel m_uiMadrigosaSpellTimer = 0; m_bCanDoMeleeAttack = true; + m_bIsIntroInProgress = false; } void Aggro(Unit* pWho) @@ -178,6 +180,30 @@ struct MANGOS_DLL_DECL boss_brutallusAI : public ScriptedAI, private DialogueHel } } + void GetAIInformation(ChatHandler& reader) + { + if (m_pInstance) + { + if (m_pInstance->GetData(TYPE_BRUTALLUS) == SPECIAL) + reader.PSendSysMessage("Brutallus intro event is currently %s", m_bIsIntroInProgress ? "in progress" : "completed"); + else + reader.PSendSysMessage("Brutallus intro event is currently %s", m_pInstance->GetData(TYPE_BRUTALLUS) == NOT_STARTED ? "not started" : "completed"); + + if (m_pInstance->GetData(TYPE_BRUTALLUS) != NOT_STARTED) + { + if (Creature* pMadrigosa = m_pInstance->GetSingleCreatureFromStorage(NPC_MADRIGOSA, true)) + reader.PSendSysMessage("Madrigosa guid is %s and has %u health.", pMadrigosa->GetObjectGuid().GetString().c_str(), pMadrigosa->GetHealth()); + } + } + } + + void SummonedCreatureJustDied(Creature* pSummoned) + { + // Error log if Madrigosa dies + if (pSummoned->GetEntry() == NPC_MADRIGOSA) + error_log("SD2: Npc %u, %s, died unexpectedly. Felmyst won't be summoned anymore.", pSummoned->GetEntry(), pSummoned->GetName()); + } + void SummonedCreatureDespawn(Creature* pSummoned) { // Yell of Madrigosa on death @@ -240,6 +266,7 @@ struct MANGOS_DLL_DECL boss_brutallusAI : public ScriptedAI, private DialogueHel case NPC_MADRIGOSA: if (Creature* pTrigger = m_pInstance->GetSingleCreatureFromStorage(NPC_FLIGHT_TRIGGER_LEFT)) m_creature->SummonCreature(NPC_MADRIGOSA, pTrigger->GetPositionX(), pTrigger->GetPositionY(), pTrigger->GetPositionZ(), 0, TEMPSUMMON_DEAD_DESPAWN, 0); + m_bIsIntroInProgress = true; break; case YELL_MADR_ICE_BARRIER: if (Creature* pMadrigosa = m_pInstance->GetSingleCreatureFromStorage(NPC_MADRIGOSA)) @@ -311,6 +338,7 @@ struct MANGOS_DLL_DECL boss_brutallusAI : public ScriptedAI, private DialogueHel break; case YELL_INTRO_TAUNT: DoCastSpellIfCan(m_creature, SPELL_BREAK_ICE); + m_bIsIntroInProgress = false; break; } } diff --git a/scripts/eastern_kingdoms/sunwell_plateau/boss_kiljaeden.cpp b/scripts/eastern_kingdoms/sunwell_plateau/boss_kiljaeden.cpp index 116a99626..28c33809b 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/boss_kiljaeden.cpp +++ b/scripts/eastern_kingdoms/sunwell_plateau/boss_kiljaeden.cpp @@ -462,6 +462,11 @@ struct MANGOS_DLL_DECL boss_kiljaedenAI : public Scripted_NoMovementAI, private } } + void GetAIInformation(ChatHandler& reader) + { + reader.PSendSysMessage("Kil'jaeden is currently in phase %u", m_uiPhase); + } + void JustDidDialogueStep(int32 iEntry) { if (!m_pInstance) diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 2324562e3..6ef32455b 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2365" + #define SD2_REVISION_NR "2366" #endif // __SD2_REVISION_NR_H__ From 13424a6981bf79ebc8f32f47c123d3d25ebbadc5 Mon Sep 17 00:00:00 2001 From: Radu Date: Mon, 19 Dec 2011 09:28:08 +0200 Subject: [PATCH 0351/1172] Fix typo in the recent commit via Github --- scripts/eastern_kingdoms/sunwell_plateau/boss_kiljaeden.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/eastern_kingdoms/sunwell_plateau/boss_kiljaeden.cpp b/scripts/eastern_kingdoms/sunwell_plateau/boss_kiljaeden.cpp index 28c33809b..8dbdab863 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/boss_kiljaeden.cpp +++ b/scripts/eastern_kingdoms/sunwell_plateau/boss_kiljaeden.cpp @@ -647,7 +647,7 @@ bool EffectAuraDummy_spell_aura_dummy_darkness_of_souls(const Aura* pAura, bool case 1: DoScriptText(SAY_DARKNESS_2, pTarget); break; - case 3: + case 2: DoScriptText(SAY_DARKNESS_3, pTarget); break; } From 878418e0df1bc63cf2f6624c045f2f7ffc9168c9 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Mon, 19 Dec 2011 21:04:11 +0200 Subject: [PATCH 0352/1172] [2367] Cleanup for Nalorakk - Zul'Aman --- .../zulaman/boss_nalorakk.cpp | 233 +++++++++--------- sd2_revision_nr.h | 2 +- 2 files changed, 115 insertions(+), 120 deletions(-) diff --git a/scripts/eastern_kingdoms/zulaman/boss_nalorakk.cpp b/scripts/eastern_kingdoms/zulaman/boss_nalorakk.cpp index 1a71544c1..904f743ed 100644 --- a/scripts/eastern_kingdoms/zulaman/boss_nalorakk.cpp +++ b/scripts/eastern_kingdoms/zulaman/boss_nalorakk.cpp @@ -45,16 +45,16 @@ enum SPELL_BERSERK = 45078, //unsure, this increases damage, size and speed - //Defines for Troll form - SPELL_BRUTALSWIPE = 42384, + // Defines for Troll form + SPELL_BRUTAL_SWIPE = 42384, SPELL_MANGLE = 42389, SPELL_SURGE = 42402, - SPELL_BEARFORM = 42377, + SPELL_BEAR_SHAPE = 42377, - //Defines for Bear form - SPELL_LACERATINGSLASH = 42395, - SPELL_RENDFLESH = 42397, - SPELL_DEAFENINGROAR = 42398 + // Defines for Bear form + SPELL_LACERATING_SLASH = 42395, + SPELL_REND_FLESH = 42397, + SPELL_DEAFENING_ROAR = 42398 }; struct MANGOS_DLL_DECL boss_nalorakkAI : public ScriptedAI @@ -67,38 +67,30 @@ struct MANGOS_DLL_DECL boss_nalorakkAI : public ScriptedAI ScriptedInstance* m_pInstance; - uint32 ChangeForm_Timer; - uint32 BrutalSwipe_Timer; - uint32 Mangle_Timer; - uint32 Surge_Timer; - uint32 LaceratingSlash_Timer; - uint32 RendFlesh_Timer; - uint32 DeafeningRoar_Timer; - uint32 ShapeShiftCheck_Timer; - uint32 Berserk_Timer; - bool inBearForm; - bool Berserking; - bool ChangedToBear; - bool ChangedToTroll; + uint32 m_uiChangeFormTimer; + uint32 m_uiBrutalSwipeTimer; + uint32 m_uiMangleTimer; + uint32 m_uiSurgeTimer; + uint32 m_uiLaceratingSlashTimer; + uint32 m_uiRendFleshTimer; + uint32 m_uiDeafeningRoarTimer; + uint32 m_uiBerserkTimer; + bool m_bIsInBearForm; void Reset() { - ChangeForm_Timer = 45000; - BrutalSwipe_Timer = 12000; - Mangle_Timer = 15000; - Surge_Timer = 20000; - LaceratingSlash_Timer = 6000; - RendFlesh_Timer = 6000; - DeafeningRoar_Timer = 20000; - ShapeShiftCheck_Timer = 40000; - Berserk_Timer = 600000; - inBearForm = false; - Berserking = false; - ChangedToBear = false; - ChangedToTroll = true; + m_uiChangeFormTimer = 45000; + m_uiBrutalSwipeTimer = 12000; + m_uiMangleTimer = 15000; + m_uiSurgeTimer = 20000; + m_uiLaceratingSlashTimer = 6000; + m_uiRendFleshTimer = 6000; + m_uiDeafeningRoarTimer = 20000; + m_uiBerserkTimer = 10*MINUTE*IN_MILLISECONDS; + m_bIsInBearForm = false; } - void Aggro(Unit *who) + void Aggro(Unit* pWho) { DoScriptText(SAY_AGGRO, m_creature); @@ -106,12 +98,12 @@ struct MANGOS_DLL_DECL boss_nalorakkAI : public ScriptedAI m_pInstance->SetData(TYPE_NALORAKK, IN_PROGRESS); } - void KilledUnit(Unit* victim) + void KilledUnit(Unit* pVictim) { DoScriptText(urand(0, 1) ? SAY_SLAY1 : SAY_SLAY2, m_creature); } - void JustDied(Unit* Killer) + void JustDied(Unit* pKiller) { DoScriptText(SAY_DEATH, m_creature); @@ -127,124 +119,127 @@ struct MANGOS_DLL_DECL boss_nalorakkAI : public ScriptedAI m_pInstance->SetData(TYPE_NALORAKK, FAIL); } - void UpdateAI(const uint32 diff) + void UpdateAI(const uint32 uiDiff) { - //Return since we have no target + // Return since we have no target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - //Berserking - if ((Berserk_Timer < diff) && (!Berserking)) + // Berserking + if (m_uiBerserkTimer) { - if (DoCastSpellIfCan(m_creature, SPELL_BERSERK) == CAST_OK) + if (m_uiBerserkTimer <= uiDiff) { - DoScriptText(SAY_BERSERK, m_creature); - Berserking = true; + if (DoCastSpellIfCan(m_creature, SPELL_BERSERK) == CAST_OK) + { + DoScriptText(SAY_BERSERK, m_creature); + m_uiBerserkTimer = 0; + } } - }else Berserk_Timer -= diff; - - //Don't check if we're shapeshifted every UpdateAI - if (ShapeShiftCheck_Timer < diff) - { - //This will return true if we have bearform aura - inBearForm = m_creature->HasAura(SPELL_BEARFORM, EFFECT_INDEX_0); - ShapeShiftCheck_Timer = 1000; - }else ShapeShiftCheck_Timer -= diff; + else + m_uiBerserkTimer -= uiDiff; + } //Spells for Troll Form (only to be casted if we NOT have bear phase aura) - if (!inBearForm) + if (!m_bIsInBearForm) { - //We just changed to troll form! - if (!ChangedToTroll) + // Brutal Swipe (some sources may say otherwise, but I've never seen this in Bear form) + if (m_uiBrutalSwipeTimer < uiDiff) { - DoScriptText(SAY_TOTROLL, m_creature); - - ChangedToTroll = true; - ChangedToBear = false; - //Reset spell timers - LaceratingSlash_Timer = urand(6000, 25000); - RendFlesh_Timer = urand(6000, 25000); - DeafeningRoar_Timer = urand(15000, 25000); - ShapeShiftCheck_Timer = 40000; + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_BRUTAL_SWIPE) == CAST_OK) + m_uiBrutalSwipeTimer = urand(7000, 15000); } + else + m_uiBrutalSwipeTimer -= uiDiff; - //Brutal Swipe (some sources may say otherwise, but I've never seen this in Bear form) - if (BrutalSwipe_Timer < diff) - { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_BRUTALSWIPE); - BrutalSwipe_Timer = urand(7000, 15000); - }else BrutalSwipe_Timer -= diff; - - //Mangle - if (Mangle_Timer < diff) + // Mangle + if (m_uiMangleTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_MANGLE); - Mangle_Timer = urand(3000, 15000); - }else Mangle_Timer -= diff; + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_MANGLE) == CAST_OK) + m_uiMangleTimer = urand(3000, 15000); + } + else + m_uiMangleTimer -= uiDiff; - //Surge - if (Surge_Timer < diff) + // Surge + if (m_uiSurgeTimer < uiDiff) { //select a random unit other than the main tank - Unit *target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1); + Unit* pTtarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1); //if there aren't other units, cast on the tank - if (!target) - target = m_creature->getVictim(); + if (!pTtarget) + pTtarget = m_creature->getVictim(); - if (DoCastSpellIfCan(target, SPELL_SURGE) == CAST_OK) + if (DoCastSpellIfCan(pTtarget, SPELL_SURGE) == CAST_OK) + { DoScriptText(SAY_SURGE, m_creature); + m_uiSurgeTimer = urand(15000, 32500); + } + } + else + m_uiSurgeTimer -= uiDiff; - Surge_Timer = urand(15000, 32500); - }else Surge_Timer -= diff; - - //Change to Bear Form if we're in Troll Form for 45sec - if (ChangeForm_Timer < diff) + // Change to Bear Form if we're in Troll Form for 45sec + if (m_uiChangeFormTimer < uiDiff) { - m_creature->InterruptSpell(CURRENT_CHANNELED_SPELL); - m_creature->InterruptSpell(CURRENT_GENERIC_SPELL); - DoCastSpellIfCan(m_creature, SPELL_BEARFORM); - //And 30sec (bear form) + 45sec (troll form) before we should cast this again - ChangeForm_Timer = 75000; - }else ChangeForm_Timer -= diff; + if (DoCastSpellIfCan(m_creature, SPELL_BEAR_SHAPE, CAST_INTERRUPT_PREVIOUS) == CAST_OK) + { + DoScriptText(SAY_TOBEAR, m_creature); + m_uiChangeFormTimer = 30000; + m_bIsInBearForm = true; + // Reset bear form timers + m_uiLaceratingSlashTimer = urand(6000, 25000); + m_uiRendFleshTimer = urand(6000, 25000); + m_uiDeafeningRoarTimer = urand(15000, 25000); + } + } + else + m_uiChangeFormTimer -= uiDiff; } //Spells for Bear Form (only to be casted if we have bear phase aura) else { - //We just changed to bear form! - if (!ChangedToBear) + // Timer to yell and reset spell timers when bear aura expires + if (m_uiChangeFormTimer < uiDiff) { - DoScriptText(SAY_TOBEAR, m_creature); - - ChangedToBear = true; - ChangedToTroll = false; - //Reset spell timers - Surge_Timer = urand(15000, 32000); - BrutalSwipe_Timer = urand(7000, 20000); - Mangle_Timer = urand(3000, 20000); - ShapeShiftCheck_Timer = 25000; + DoScriptText(SAY_TOTROLL, m_creature); + m_uiChangeFormTimer = 45000; + m_bIsInBearForm = false; + // Reset troll form timers + m_uiSurgeTimer = urand(15000, 32000); + m_uiBrutalSwipeTimer = urand(7000, 20000); + m_uiMangleTimer = urand(3000, 20000); } + else + m_uiChangeFormTimer -= uiDiff; - //Lacerating Slash - if (LaceratingSlash_Timer < diff) + // Lacerating Slash + if (m_uiLaceratingSlashTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_LACERATINGSLASH); - LaceratingSlash_Timer = urand(6000, 20000); - }else LaceratingSlash_Timer -= diff; + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_LACERATING_SLASH) == CAST_OK) + m_uiLaceratingSlashTimer = urand(6000, 20000); + } + else + m_uiLaceratingSlashTimer -= uiDiff; - //Rend Flesh - if (RendFlesh_Timer < diff) + // Rend Flesh + if (m_uiRendFleshTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_RENDFLESH); - RendFlesh_Timer = urand(6000, 20000); - }else RendFlesh_Timer -= diff; + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_REND_FLESH) == CAST_OK) + m_uiRendFleshTimer = urand(6000, 20000); + } + else + m_uiRendFleshTimer -= uiDiff; - //Deafening Roar - if (DeafeningRoar_Timer < diff) + // Deafening Roar + if (m_uiDeafeningRoarTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_DEAFENINGROAR); - DeafeningRoar_Timer = urand(15000, 25000); - }else DeafeningRoar_Timer -= diff; + if (DoCastSpellIfCan(m_creature, SPELL_DEAFENING_ROAR) == CAST_OK) + m_uiDeafeningRoarTimer = urand(15000, 25000); + } + else + m_uiDeafeningRoarTimer -= uiDiff; } DoMeleeAttackIfReady(); diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 6ef32455b..9b619effa 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2366" + #define SD2_REVISION_NR "2367" #endif // __SD2_REVISION_NR_H__ From 7ebdc76cfa3b949a0ca902890b56849425f25805 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Wed, 21 Dec 2011 13:59:27 +0100 Subject: [PATCH 0353/1172] [2368] Reorder types in violet hold --- .../violet_hold/instance_violet_hold.cpp | 70 +++++-------------- scripts/northrend/violet_hold/violet_hold.h | 22 +++--- sd2_revision_nr.h | 2 +- 3 files changed, 28 insertions(+), 66 deletions(-) diff --git a/scripts/northrend/violet_hold/instance_violet_hold.cpp b/scripts/northrend/violet_hold/instance_violet_hold.cpp index 7dfb72693..342d362fc 100644 --- a/scripts/northrend/violet_hold/instance_violet_hold.cpp +++ b/scripts/northrend/violet_hold/instance_violet_hold.cpp @@ -58,7 +58,7 @@ void instance_violet_hold::ResetAll() for (std::vector::const_iterator itr = m_vRandomBosses.begin(); itr != m_vRandomBosses.end(); ++itr) { const BossInformation* pData = GetBossInformation((*itr)->uiEntry); - if (pData && GetData(pData->uiType) == DONE) + if (pData && m_auiEncounter[pData->uiType] == DONE) { if (Creature* pGhostBoss = GetSingleCreatureFromStorage(pData->uiGhostEntry)) { @@ -181,7 +181,7 @@ void instance_violet_hold::UpdateWorldState(bool bEnable) void instance_violet_hold::OnPlayerEnter(Player* pPlayer) { - UpdateWorldState(m_auiEncounter[0] == IN_PROGRESS ? true : false); + UpdateWorldState(m_auiEncounter[TYPE_MAIN] == IN_PROGRESS ? true : false); if (m_vRandomBosses.empty()) { @@ -194,13 +194,13 @@ void instance_violet_hold::SetData(uint32 uiType, uint32 uiData) { debug_log("SD2: instance_violet_hold: SetData got type % u, data %u.", uiType, uiData); - switch(uiType) + switch (uiType) { case TYPE_MAIN: { - if (uiData == m_auiEncounter[0]) + if (uiData == m_auiEncounter[uiType]) return; - if (m_auiEncounter[0] == DONE) + if (m_auiEncounter[uiType] == DONE) return; switch(uiData) @@ -224,15 +224,15 @@ void instance_violet_hold::SetData(uint32 uiType, uint32 uiData) case SPECIAL: break; } - m_auiEncounter[0] = uiData; + m_auiEncounter[uiType] = uiData; break; } case TYPE_SEAL: - m_auiEncounter[1] = uiData; + m_auiEncounter[uiType] = uiData; break; case TYPE_PORTAL: { - switch(uiData) + switch (uiData) { case SPECIAL: // timer to next m_uiPortalTimer = 90000; @@ -241,50 +241,24 @@ void instance_violet_hold::SetData(uint32 uiType, uint32 uiData) m_uiPortalTimer = 5000; break; } - m_auiEncounter[2] = uiData; + m_auiEncounter[uiType] = uiData; break; } case TYPE_LAVANTHOR: - if (uiData == DONE) - m_uiPortalTimer = 35000; - if (m_auiEncounter[3] != DONE) // Keep the DONE-information stored - m_auiEncounter[3] = uiData; - break; case TYPE_MORAGG: - if (uiData == DONE) - m_uiPortalTimer = 35000; - if (m_auiEncounter[4] != DONE) // Keep the DONE-information stored - m_auiEncounter[4] = uiData; - break; case TYPE_EREKEM: - if (uiData == DONE) - m_uiPortalTimer = 35000; - if (m_auiEncounter[5] != DONE) // Keep the DONE-information stored - m_auiEncounter[5] = uiData; - break; case TYPE_ICHORON: - if (uiData == DONE) - m_uiPortalTimer = 35000; - if (m_auiEncounter[6] != DONE) // Keep the DONE-information stored - m_auiEncounter[6] = uiData; - break; case TYPE_XEVOZZ: - if (uiData == DONE) - m_uiPortalTimer = 35000; - if (m_auiEncounter[7] != DONE) // Keep the DONE-information stored - m_auiEncounter[7] = uiData; - break; case TYPE_ZURAMAT: if (uiData == DONE) m_uiPortalTimer = 35000; - if (m_auiEncounter[8] != DONE) // Keep the DONE-information stored - m_auiEncounter[8] = uiData; + if (m_auiEncounter[uiType] != DONE) // Keep the DONE-information stored + m_auiEncounter[uiType] = uiData; break; case TYPE_CYANIGOSA: - if (uiData == DONE) - m_auiEncounter[9] = uiData; if (uiData == DONE) SetData(TYPE_MAIN, DONE); + m_auiEncounter[uiType] = uiData; break; default: return; @@ -309,19 +283,9 @@ void instance_violet_hold::SetData(uint32 uiType, uint32 uiData) uint32 instance_violet_hold::GetData(uint32 uiType) { - switch (uiType) - { - case TYPE_MAIN: return m_auiEncounter[0]; - case TYPE_LAVANTHOR: return m_auiEncounter[3]; - case TYPE_MORAGG: return m_auiEncounter[4]; - case TYPE_EREKEM: return m_auiEncounter[5]; - case TYPE_ICHORON: return m_auiEncounter[6]; - case TYPE_XEVOZZ: return m_auiEncounter[7]; - case TYPE_ZURAMAT: return m_auiEncounter[8]; - case TYPE_CYANIGOSA: return m_auiEncounter[9]; - default: - return 0; - } + if (uiType < MAX_ENCOUNTER) + return m_auiEncounter[uiType]; + return 0; } void instance_violet_hold::Load(const char* chrIn) @@ -416,7 +380,7 @@ void instance_violet_hold::SetRandomBosses() if (m_vRandomBosses.empty()) for (uint8 i = 0; i < MAX_MINIBOSSES; ++i) { - if (GetData(aBossInformation[i].uiType) == DONE) + if (m_auiEncounter[aBossInformation[i].uiType] == DONE) m_vRandomBosses.push_back(CreateBossSpawnByEntry(aBossInformation[i].uiEntry)); } @@ -619,7 +583,7 @@ void instance_violet_hold::OnCreatureDeath(Creature* pCreature) void instance_violet_hold::Update(uint32 uiDiff) { - if (m_auiEncounter[0] != IN_PROGRESS) + if (m_auiEncounter[TYPE_MAIN] != IN_PROGRESS) return; if (m_uiPortalTimer) diff --git a/scripts/northrend/violet_hold/violet_hold.h b/scripts/northrend/violet_hold/violet_hold.h index bd1630d73..14b584fb6 100644 --- a/scripts/northrend/violet_hold/violet_hold.h +++ b/scripts/northrend/violet_hold/violet_hold.h @@ -10,18 +10,16 @@ enum MAX_ENCOUNTER = 10, MAX_MINIBOSSES = 6, - TYPE_MAIN = 1, - TYPE_SEAL = 2, - TYPE_PORTAL = 3, - // Sub Bosses - TYPE_LAVANTHOR = 4, - TYPE_MORAGG = 5, - TYPE_EREKEM = 6, - TYPE_ICHORON = 7, - TYPE_XEVOZZ = 8, - TYPE_ZURAMAT = 9, - - TYPE_CYANIGOSA = 10, + TYPE_MAIN = 0, + TYPE_SEAL = 1, + TYPE_PORTAL = 2, + TYPE_LAVANTHOR = 3, + TYPE_MORAGG = 4, + TYPE_EREKEM = 5, + TYPE_ICHORON = 6, + TYPE_XEVOZZ = 7, + TYPE_ZURAMAT = 8, + TYPE_CYANIGOSA = 9, WORLD_STATE_ID = 3816, WORLD_STATE_SEAL = 3815, diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 9b619effa..6fcda2cf6 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2367" + #define SD2_REVISION_NR "2368" #endif // __SD2_REVISION_NR_H__ From aa9eebe8ea43b60a08c5909d488f07730b911121 Mon Sep 17 00:00:00 2001 From: NeatElves Date: Wed, 21 Dec 2011 20:09:50 +0100 Subject: [PATCH 0354/1172] [2369] Remove script for Field Repair Bot 74A Signed-off-by: Schmoozerd --- scripts/world/go_scripts.cpp | 26 +------------------------- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 - sql/updates/r2369_mangos.sql | 1 + 4 files changed, 3 insertions(+), 27 deletions(-) create mode 100644 sql/updates/r2369_mangos.sql diff --git a/scripts/world/go_scripts.cpp b/scripts/world/go_scripts.cpp index a394784b9..4724af661 100644 --- a/scripts/world/go_scripts.cpp +++ b/scripts/world/go_scripts.cpp @@ -17,7 +17,7 @@ /* ScriptData SDName: GO_Scripts SD%Complete: 100 -SDComment: Quest support: 4296, 5088, 5097, 5098, 5381, 6481, 10990, 10991, 10992, 12557, 14092/14076. Field_Repair_Bot->Teaches spell 22704. Barov_journal->Teaches spell 26089 +SDComment: Quest support: 4296, 5088, 5097, 5098, 5381, 6481, 10990, 10991, 10992, 12557, 14092/14076. Barov_journal->Teaches spell 26089 SDCategory: Game Objects EndScriptData */ @@ -26,7 +26,6 @@ go_cat_figurine (the "trap" version of GO, two different exist) go_barov_journal go_ethereum_prison go_ethereum_stasis -go_field_repair_bot_74A go_mysterious_snow_mound go_orb_of_command go_resonite_cask @@ -160,24 +159,6 @@ bool GOUse_go_ethereum_stasis(Player* pPlayer, GameObject* pGo) return false; } -/*###### -## go_field_repair_bot_74A -######*/ - -enum -{ - SPELL_ENGINEER_FIELD_REPAIR_BOT_74A = 22704, - SPELL_LEARN_FIELD_REPAIR_BOT_74A = 22864 -}; - -bool GOUse_go_field_repair_bot_74A(Player* pPlayer, GameObject* pGo) -{ - if (pPlayer->HasSkill(SKILL_ENGINEERING) && pPlayer->GetBaseSkillValue(SKILL_ENGINEERING) >= 300 && !pPlayer->HasSpell(SPELL_ENGINEER_FIELD_REPAIR_BOT_74A)) - pPlayer->CastSpell(pPlayer, SPELL_LEARN_FIELD_REPAIR_BOT_74A, false); - - return true; -} - /*###### ## go_gilded_brazier ######*/ @@ -570,11 +551,6 @@ void AddSC_go_scripts() pNewScript->pGOUse = &GOUse_go_ethereum_stasis; pNewScript->RegisterSelf(); - pNewScript = new Script; - pNewScript->Name = "go_field_repair_bot_74A"; - pNewScript->pGOUse = &GOUse_go_field_repair_bot_74A; - pNewScript->RegisterSelf(); - pNewScript = new Script; pNewScript->Name = "go_gilded_brazier"; pNewScript->pGOUse = &GOUse_go_gilded_brazier; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 6fcda2cf6..bb725bae2 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2368" + #define SD2_REVISION_NR "2369" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index a930409f0..9b705952c 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -74,7 +74,6 @@ UPDATE gameobject_template SET ScriptName='go_ethereum_prison' WHERE entry BETWE UPDATE gameobject_template SET ScriptName='go_ethereum_stasis' WHERE entry BETWEEN 185465 AND 185467; UPDATE gameobject_template SET ScriptName='go_ethereum_stasis' WHERE entry=184595; UPDATE gameobject_template SET ScriptName='go_ethereum_stasis' WHERE entry BETWEEN 185461 AND 185464; -UPDATE gameobject_template SET ScriptName='go_field_repair_bot_74A' where entry=179552; UPDATE gameobject_template SET ScriptName='go_gilded_brazier' WHERE entry=181956; UPDATE gameobject_template SET ScriptName='go_jump_a_tron' WHERE entry=183146; UPDATE gameobject_template SET ScriptName='go_mysterious_snow_mound' WHERE entry=195308; diff --git a/sql/updates/r2369_mangos.sql b/sql/updates/r2369_mangos.sql new file mode 100644 index 000000000..65c1d52a5 --- /dev/null +++ b/sql/updates/r2369_mangos.sql @@ -0,0 +1 @@ +UPDATE gameobject_template SET ScriptName='' where entry=179552; From 5e47419c1ae40c9a411f26a3acdd906d159e88a3 Mon Sep 17 00:00:00 2001 From: NeatElves Date: Wed, 21 Dec 2011 20:22:45 +0100 Subject: [PATCH 0355/1172] [2370] Remove script for Orb of Command Signed-off-by: Schmoozerd --- scripts/world/go_scripts.cpp | 24 ------------------------ sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 - sql/updates/r2370_mangos.sql | 1 + 4 files changed, 2 insertions(+), 26 deletions(-) create mode 100644 sql/updates/r2370_mangos.sql diff --git a/scripts/world/go_scripts.cpp b/scripts/world/go_scripts.cpp index 4724af661..43232d463 100644 --- a/scripts/world/go_scripts.cpp +++ b/scripts/world/go_scripts.cpp @@ -27,7 +27,6 @@ go_barov_journal go_ethereum_prison go_ethereum_stasis go_mysterious_snow_mound -go_orb_of_command go_resonite_cask go_sacred_fire_of_life go_shrine_of_the_birds @@ -227,24 +226,6 @@ bool GOUse_go_mysterious_snow_mound(Player* pPlayer, GameObject* pGo) return true; } -/*###### -## go_orb_of_command -######*/ - -enum -{ - QUEST_BLACKHANDS_COMMAND = 7761, - SPELL_TELEPORT_TO_BWL = 23460 -}; - -bool GOUse_go_orb_of_command(Player* pPlayer, GameObject* pGo) -{ - if (pPlayer->GetQuestRewardStatus(QUEST_BLACKHANDS_COMMAND)) - pPlayer->CastSpell(pPlayer, SPELL_TELEPORT_TO_BWL, true); - - return true; -} - /*###### ## go_resonite_cask ######*/ @@ -566,11 +547,6 @@ void AddSC_go_scripts() pNewScript->pGOUse = &GOUse_go_mysterious_snow_mound; pNewScript->RegisterSelf(); - pNewScript = new Script; - pNewScript->Name = "go_orb_of_command"; - pNewScript->pGOUse = &GOUse_go_orb_of_command; - pNewScript->RegisterSelf(); - pNewScript = new Script; pNewScript->Name = "go_resonite_cask"; pNewScript->pGOUse = &GOUse_go_resonite_cask; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index bb725bae2..36ec6bc2e 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2369" + #define SD2_REVISION_NR "2370" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 9b705952c..7fcda07ab 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -77,7 +77,6 @@ UPDATE gameobject_template SET ScriptName='go_ethereum_stasis' WHERE entry BETWE UPDATE gameobject_template SET ScriptName='go_gilded_brazier' WHERE entry=181956; UPDATE gameobject_template SET ScriptName='go_jump_a_tron' WHERE entry=183146; UPDATE gameobject_template SET ScriptName='go_mysterious_snow_mound' WHERE entry=195308; -UPDATE gameobject_template SET ScriptName='go_orb_of_command' WHERE entry=179879; UPDATE gameobject_template SET ScriptName='go_resonite_cask' WHERE entry=178145; UPDATE gameobject_template SET ScriptName='go_sacred_fire_of_life' WHERE entry=175944; UPDATE gameobject_template SET ScriptName='go_shrine_of_the_birds' WHERE entry IN (185547,185553,185551); diff --git a/sql/updates/r2370_mangos.sql b/sql/updates/r2370_mangos.sql new file mode 100644 index 000000000..e9436f9b7 --- /dev/null +++ b/sql/updates/r2370_mangos.sql @@ -0,0 +1 @@ +UPDATE gameobject_template SET ScriptName='' WHERE entry=179879; From 5c2daf65ff8e8fb5bc6adefe32394898ecb9b8d4 Mon Sep 17 00:00:00 2001 From: NeatElves Date: Wed, 21 Dec 2011 20:58:54 +0100 Subject: [PATCH 0356/1172] [2371] Remove script for Lunaclaw Spirit Signed-off-by: Schmoozerd --- scripts/world/npcs_special.cpp | 41 ---------------------------------- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 - sql/updates/r2371_mangos.sql | 1 + 4 files changed, 2 insertions(+), 43 deletions(-) create mode 100644 sql/updates/r2371_mangos.sql diff --git a/scripts/world/npcs_special.cpp b/scripts/world/npcs_special.cpp index d32cb45f4..73188e030 100644 --- a/scripts/world/npcs_special.cpp +++ b/scripts/world/npcs_special.cpp @@ -36,7 +36,6 @@ npc_garments_of_quests 80% NPC's related to all Garments of-quests 5621, 56 npc_injured_patient 100% patients for triage-quests (6622 and 6624) npc_doctor 100% Gustaf Vanhowzen and Gregory Victor, quest 6622 and 6624 (Triage) npc_innkeeper 25% ScriptName not assigned. Innkeepers in general. -npc_lunaclaw_spirit 100% Appears at two different locations, quest 6001/6002 npc_mount_vendor 100% Regular mount vendors all over the world. Display gossip if player doesn't meet the requirements to buy npc_rogue_trainer 80% Scripted trainers, so they are able to offer item 17126 for class quest 6681 npc_sayge 100% Darkmoon event fortune teller, buff player based on answers given @@ -1099,40 +1098,6 @@ bool GossipSelect_npc_innkeeper(Player* pPlayer, Creature* pCreature, uint32 uiS return true; } -/*###### -## npc_lunaclaw_spirit -######*/ - -enum -{ - QUEST_BODY_HEART_A = 6001, - QUEST_BODY_HEART_H = 6002, - - TEXT_ID_DEFAULT = 4714, - TEXT_ID_PROGRESS = 4715 -}; - -#define GOSSIP_ITEM_GRANT "You have thought well, spirit. I ask you to grant me the strength of your body and the strength of your heart." - -bool GossipHello_npc_lunaclaw_spirit(Player* pPlayer, Creature* pCreature) -{ - if (pPlayer->GetQuestStatus(QUEST_BODY_HEART_A) == QUEST_STATUS_INCOMPLETE || pPlayer->GetQuestStatus(QUEST_BODY_HEART_H) == QUEST_STATUS_INCOMPLETE) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_GRANT, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - - pPlayer->SEND_GOSSIP_MENU(TEXT_ID_DEFAULT, pCreature->GetObjectGuid()); - return true; -} - -bool GossipSelect_npc_lunaclaw_spirit(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) -{ - if (uiAction == GOSSIP_ACTION_INFO_DEF+1) - { - pPlayer->SEND_GOSSIP_MENU(TEXT_ID_PROGRESS, pCreature->GetObjectGuid()); - pPlayer->AreaExploredOrEventHappens((pPlayer->GetTeam() == ALLIANCE) ? QUEST_BODY_HEART_A : QUEST_BODY_HEART_H); - } - return true; -} - /*###### ## npc_mount_vendor ######*/ @@ -1606,12 +1571,6 @@ void AddSC_npcs_special() pNewScript->pGossipSelect = &GossipSelect_npc_innkeeper; pNewScript->RegisterSelf(false); // script and error report disabled, but script can be used for custom needs, adding ScriptName - pNewScript = new Script; - pNewScript->Name = "npc_lunaclaw_spirit"; - pNewScript->pGossipHello = &GossipHello_npc_lunaclaw_spirit; - pNewScript->pGossipSelect = &GossipSelect_npc_lunaclaw_spirit; - pNewScript->RegisterSelf(); - pNewScript = new Script; pNewScript->Name = "npc_mount_vendor"; pNewScript->pGossipHello = &GossipHello_npc_mount_vendor; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 36ec6bc2e..7b0fe4806 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2370" + #define SD2_REVISION_NR "2371" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 7fcda07ab..b9589399f 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -127,7 +127,6 @@ UPDATE creature_template SET ScriptName='npc_chicken_cluck' WHERE entry=620; UPDATE creature_template SET ScriptName='npc_dancing_flames' WHERE entry=25305; UPDATE creature_template SET ScriptName='npc_garments_of_quests' WHERE entry IN (12429,12423,12427,12430,12428); UPDATE creature_template SET ScriptName='npc_guardian' WHERE entry=5764; -UPDATE creature_template SET ScriptName='npc_lunaclaw_spirit' WHERE entry=12144; UPDATE creature_template SET ScriptName='npc_mount_vendor' WHERE entry IN (384,1261,1460,2357,3362,3685,4730,4731,4885,7952,7955,16264,17584); UPDATE creature_template SET ScriptName='npc_doctor' WHERE entry IN (12939,12920); UPDATE creature_template SET ScriptName='npc_injured_patient' WHERE entry IN (12936,12937,12938,12923,12924,12925); diff --git a/sql/updates/r2371_mangos.sql b/sql/updates/r2371_mangos.sql new file mode 100644 index 000000000..4882654de --- /dev/null +++ b/sql/updates/r2371_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='' WHERE entry=12144; From db1cefdecd696d0f3628fe97c5182de567f01205 Mon Sep 17 00:00:00 2001 From: Klark20 Date: Fri, 6 May 2011 09:39:24 +0200 Subject: [PATCH 0357/1172] [2372] Lothos Riftwaker has created a smarter way to teleport players to Molten Core Signed-off-by: Klark20 Signed-off-by: Schmoozerd --- scripts/eastern_kingdoms/searing_gorge.cpp | 37 +--------------------- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 - sql/updates/r2372_mangos.sql | 1 + 4 files changed, 3 insertions(+), 38 deletions(-) create mode 100644 sql/updates/r2372_mangos.sql diff --git a/scripts/eastern_kingdoms/searing_gorge.cpp b/scripts/eastern_kingdoms/searing_gorge.cpp index dc2581c92..5065ee3c4 100644 --- a/scripts/eastern_kingdoms/searing_gorge.cpp +++ b/scripts/eastern_kingdoms/searing_gorge.cpp @@ -17,45 +17,16 @@ /* ScriptData SDName: Searing_Gorge SD%Complete: 80 -SDComment: Quest support: 3377. Lothos Riftwaker teleport to Molten Core. +SDComment: Quest support: 3377 SDCategory: Searing Gorge EndScriptData */ /* ContentData -npc_lothos_riftwaker npc_zamael_lunthistle EndContentData */ #include "precompiled.h" -/*###### -## npc_lothos_riftwaker -######*/ - -bool GossipHello_npc_lothos_riftwaker(Player* pPlayer, Creature* pCreature) -{ - if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); - - if (pPlayer->GetQuestRewardStatus(7487) || pPlayer->GetQuestRewardStatus(7848)) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Teleport me to the Molten Core", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); - - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); - - return true; -} - -bool GossipSelect_npc_lothos_riftwaker(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) -{ - if (uiAction == GOSSIP_ACTION_INFO_DEF + 1) - { - pPlayer->CLOSE_GOSSIP_MENU(); - pPlayer->TeleportTo(409, 1096.0f, -467.0f, -104.6f, 3.64f); - } - - return true; -} - /*###### ## npc_zamael_lunthistle ######*/ @@ -101,12 +72,6 @@ void AddSC_searing_gorge() { Script* pNewScript; - pNewScript = new Script; - pNewScript->Name = "npc_lothos_riftwaker"; - pNewScript->pGossipHello = &GossipHello_npc_lothos_riftwaker; - pNewScript->pGossipSelect = &GossipSelect_npc_lothos_riftwaker; - pNewScript->RegisterSelf(); - pNewScript = new Script; pNewScript->Name = "npc_zamael_lunthistle"; pNewScript->pGossipHello = &GossipHello_npc_zamael_lunthistle; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 7b0fe4806..a8d81880d 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2371" + #define SD2_REVISION_NR "2372" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index b9589399f..c851768ae 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -939,7 +939,6 @@ INSERT INTO scripted_event_id VALUES (5623,'event_spell_gandling_shadow_portal'); /* SEARING GORGE */ -UPDATE creature_template SET ScriptName='npc_lothos_riftwaker' WHERE entry=14387; UPDATE creature_template SET ScriptName='npc_zamael_lunthistle' WHERE entry=8436; /* SHADOWFANG KEEP */ diff --git a/sql/updates/r2372_mangos.sql b/sql/updates/r2372_mangos.sql new file mode 100644 index 000000000..0f3357fd1 --- /dev/null +++ b/sql/updates/r2372_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='' WHERE entry=14387; From 11f075066bc338db746e746c21dd53b5040537a8 Mon Sep 17 00:00:00 2001 From: NeatElves Date: Wed, 21 Dec 2011 22:01:16 +0100 Subject: [PATCH 0358/1172] [2373] Remove gossip script from rogue trainers Signed-off-by: Schmoozerd --- scripts/world/npcs_special.cpp | 51 ---------------------------------- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 - sql/updates/r2373_mangos.sql | 1 + 4 files changed, 2 insertions(+), 53 deletions(-) create mode 100644 sql/updates/r2373_mangos.sql diff --git a/scripts/world/npcs_special.cpp b/scripts/world/npcs_special.cpp index 73188e030..33f211798 100644 --- a/scripts/world/npcs_special.cpp +++ b/scripts/world/npcs_special.cpp @@ -37,7 +37,6 @@ npc_injured_patient 100% patients for triage-quests (6622 and 6624) npc_doctor 100% Gustaf Vanhowzen and Gregory Victor, quest 6622 and 6624 (Triage) npc_innkeeper 25% ScriptName not assigned. Innkeepers in general. npc_mount_vendor 100% Regular mount vendors all over the world. Display gossip if player doesn't meet the requirements to buy -npc_rogue_trainer 80% Scripted trainers, so they are able to offer item 17126 for class quest 6681 npc_sayge 100% Darkmoon event fortune teller, buff player based on answers given npc_tabard_vendor 50% allow recovering quest related tabards, achievement related ones need core support EndContentData */ @@ -1186,50 +1185,6 @@ bool GossipSelect_npc_mount_vendor(Player* pPlayer, Creature* pCreature, uint32 return true; } -/*###### -## npc_rogue_trainer -######*/ - -bool GossipHello_npc_rogue_trainer(Player* pPlayer, Creature* pCreature) -{ - if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); - - if (pCreature->isTrainer()) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_TRAINER, GOSSIP_TEXT_TRAIN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRAIN); - - if (pCreature->CanTrainAndResetTalentsOf(pPlayer)) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_TRAINER, "I wish to unlearn my talents", GOSSIP_SENDER_MAIN, GOSSIP_OPTION_UNLEARNTALENTS); - - if (pPlayer->getClass() == CLASS_ROGUE && pPlayer->getLevel() >= 24 && !pPlayer->HasItemCount(17126,1) && !pPlayer->GetQuestRewardStatus(6681)) - { - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - pPlayer->SEND_GOSSIP_MENU(5996, pCreature->GetObjectGuid()); - } else - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); - - return true; -} - -bool GossipSelect_npc_rogue_trainer(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) -{ - switch(uiAction) - { - case GOSSIP_ACTION_INFO_DEF+1: - pPlayer->CLOSE_GOSSIP_MENU(); - pPlayer->CastSpell(pPlayer,21100,false); - break; - case GOSSIP_ACTION_TRAIN: - pPlayer->SEND_TRAINERLIST(pCreature->GetObjectGuid()); - break; - case GOSSIP_OPTION_UNLEARNTALENTS: - pPlayer->CLOSE_GOSSIP_MENU(); - pPlayer->SendTalentWipeConfirm(pCreature->GetObjectGuid()); - break; - } - return true; -} - /*###### ## npc_sayge ######*/ @@ -1577,12 +1532,6 @@ void AddSC_npcs_special() pNewScript->pGossipSelect = &GossipSelect_npc_mount_vendor; pNewScript->RegisterSelf(); - pNewScript = new Script; - pNewScript->Name = "npc_rogue_trainer"; - pNewScript->pGossipHello = &GossipHello_npc_rogue_trainer; - pNewScript->pGossipSelect = &GossipSelect_npc_rogue_trainer; - pNewScript->RegisterSelf(); - pNewScript = new Script; pNewScript->Name = "npc_sayge"; pNewScript->pGossipHello = &GossipHello_npc_sayge; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index a8d81880d..37a7c712a 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2372" + #define SD2_REVISION_NR "2373" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index c851768ae..05f959fcc 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -134,7 +134,6 @@ UPDATE creature_template SET ScriptName='npc_prof_alchemy' WHERE entry IN (17909 UPDATE creature_template SET ScriptName='npc_prof_blacksmith' WHERE entry IN (5164,11145,11146,11176,11177,11178,11191,11192,11193); UPDATE creature_template SET ScriptName='npc_prof_leather' WHERE entry IN (7866,7867,7868,7869,7870,7871); UPDATE creature_template SET ScriptName='npc_prof_tailor' WHERE entry IN (22208,22212,22213); -UPDATE creature_template SET ScriptName='npc_rogue_trainer' WHERE entry IN (918,4163,3328,4583,5165,5167,13283,16684); UPDATE creature_template SET ScriptName='npc_sayge' WHERE entry=14822; UPDATE creature_template SET ScriptName='npc_tabard_vendor' WHERE entry=28776; -- disabled, but can be used for custom diff --git a/sql/updates/r2373_mangos.sql b/sql/updates/r2373_mangos.sql new file mode 100644 index 000000000..6f86f2ec5 --- /dev/null +++ b/sql/updates/r2373_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='' WHERE entry IN (918, 3328, 4163, 4583, 5165, 5167, 13283, 16684); From 24acb8c6b1bc425a07e12b86166ceefe29090962 Mon Sep 17 00:00:00 2001 From: Klark20 Date: Thu, 22 Dec 2011 00:28:58 +0200 Subject: [PATCH 0359/1172] [2374] Implement dummy effect for spell 43340 - quest 11314 Signed-off-by: Xfurry --- scripts/world/spell_scripts.cpp | 33 ++++++++++++++++++++++++++++++++ sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 2 +- sql/scriptdev2_script_full.sql | 6 +++++- sql/updates/r2374_mangos.sql | 1 + sql/updates/r2374_scriptdev2.sql | 5 +++++ 6 files changed, 46 insertions(+), 3 deletions(-) create mode 100644 sql/updates/r2374_mangos.sql create mode 100644 sql/updates/r2374_scriptdev2.sql diff --git a/scripts/world/spell_scripts.cpp b/scripts/world/spell_scripts.cpp index 70927568c..8812ac658 100644 --- a/scripts/world/spell_scripts.cpp +++ b/scripts/world/spell_scripts.cpp @@ -39,6 +39,7 @@ spell 52090 spell 51331 spell 51332 spell 51366 +spell 43340 EndContentData */ #include "precompiled.h" @@ -305,6 +306,15 @@ enum SAY_DROSTAN_GOT_LUCKY_2 = -1000649, SAY_DROSTAN_HIT_BIRD_1 = -1000650, SAY_DROSTAN_HIT_BIRD_2 = -1000651, + + // quest 11314, item 33606 + SPELL_LURIELLES_PENDANT = 43340, + NPC_CHILL_NYMPH = 23678, + NPC_LURIELLE = 24117, + FACTION_FRIENDLY = 35, + SAY_FREE_1 = -1000781, + SAY_FREE_2 = -1000782, + SAY_FREE_3 = -1000783, }; bool EffectAuraDummy_spell_aura_dummy_npc(const Aura* pAura, bool bApply) @@ -900,6 +910,29 @@ bool EffectDummyCreature_spell_dummy_npc(Unit* pCaster, uint32 uiSpellId, SpellE } return true; } + case SPELL_LURIELLES_PENDANT: + { + if (uiEffIndex == EFFECT_INDEX_0) + { + if (pCreatureTarget->GetEntry() != NPC_CHILL_NYMPH || pCaster->GetTypeId() != TYPEID_PLAYER) + return true; + + switch(urand(0, 2)) + { + case 0: DoScriptText(SAY_FREE_1, pCreatureTarget); break; + case 1: DoScriptText(SAY_FREE_2, pCreatureTarget); break; + case 2: DoScriptText(SAY_FREE_3, pCreatureTarget); break; + } + + ((Player*)pCaster)->KilledMonsterCredit(NPC_LURIELLE); + pCreatureTarget->SetFactionTemporary(FACTION_FRIENDLY, TEMPFACTION_RESTORE_RESPAWN); + pCreatureTarget->DeleteThreatList(); + pCreatureTarget->AttackStop(true); + pCreatureTarget->GetMotionMaster()->MoveFleeing(pCaster, 7); + pCreatureTarget->ForcedDespawn(7*IN_MILLISECONDS); + } + return true; + } } return false; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 37a7c712a..675df904e 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2373" + #define SD2_REVISION_NR "2374" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 05f959fcc..6275ec213 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -149,7 +149,7 @@ UPDATE creature_template SET ScriptName='spell_dummy_npc' WHERE entry IN ( -- outland 16880,16518,16847,17157,17326,17654,18879,22105,24918,25084,25085, -- northrend -25752,25753,25758,25792,25793,26268,26270,26421,26616,26643,26841,27122,27808,28053,28054,28068,28093,28465,28600,29319,29327,29329,29330,29338,30146,32149); +23678,25752,25753,25758,25792,25793,26268,26270,26421,26616,26643,26841,27122,27808,28053,28054,28068,28093,28465,28600,29319,29327,29329,29330,29338,30146,32149); UPDATE gameobject_template SET ScriptName='spell_dummy_go' WHERE entry IN (181616,186949); diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 88d6807f3..ae4864557 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -835,7 +835,11 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1000777,'These three again?',0,0,0,0,'Feero Ironhand SAY_FINAL_AMBUSH_START'), (-1000778,'Not quite so sure of yourself without the Purifier, hm?',0,0,0,0,'Balizar the Umbrage SAY_BALIZAR_FINAL_AMBUSH'), (-1000779,'I\'ll finish you off for good this time!',0,0,0,0,'Feero Ironhand SAY_FINAL_AMBUSH_ATTACK'), -(-1000780,'Well done! I should be fine on my own from here. Remember to talk to Delgren when you return to Maestra\'s Post in Ashenvale.',0,0,0,0,'Feero Ironhand SAY_QUEST_END'); +(-1000780,'Well done! I should be fine on my own from here. Remember to talk to Delgren when you return to Maestra\'s Post in Ashenvale.',0,0,0,0,'Feero Ironhand SAY_QUEST_END'), + +(-1000781,'I knew Lurielle would send help! Thank you, friend, and give Lurielle my thanls as well!',0,0,0,0,'Chill Nymph SAY_FREE_1'), +(-1000782,'Where am I? What happend to me? You... you freed me?',0,0,0,0,'Chill Nymph SAY_FREE_2'), +(-1000783,'Thank you. I thought I would die without seeing my sisters again!',0,0,0,0,'Chill Nymph SAY_FREE_3'); -- -1 033 000 SHADOWFANG KEEP INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES diff --git a/sql/updates/r2374_mangos.sql b/sql/updates/r2374_mangos.sql new file mode 100644 index 000000000..dff9de1d0 --- /dev/null +++ b/sql/updates/r2374_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='spell_dummy_npc' WHERE entry=23678; diff --git a/sql/updates/r2374_scriptdev2.sql b/sql/updates/r2374_scriptdev2.sql new file mode 100644 index 000000000..62b26b9b0 --- /dev/null +++ b/sql/updates/r2374_scriptdev2.sql @@ -0,0 +1,5 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1000783 AND -1000781; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1000781,'I knew Lurielle would send help! Thank you, friend, and give Lurielle my thanls as well!',0,0,0,0,'Chill Nymph SAY_FREE_1'), +(-1000782,'Where am I? What happend to me? You... you freed me?',0,0,0,0,'Chill Nymph SAY_FREE_2'), +(-1000783,'Thank you. I thought I would die without seeing my sisters again!',0,0,0,0,'Chill Nymph SAY_FREE_3'); From 8e3402046ce30c3964eba0f2c2f0cd0e8a6cfd2e Mon Sep 17 00:00:00 2001 From: NeatElves Date: Wed, 21 Dec 2011 23:47:28 +0100 Subject: [PATCH 0360/1172] [2375] Remove gossip for npc_zamael_lunthistle Signed-off-by: Schmoozerd --- scripts/eastern_kingdoms/searing_gorge.cpp | 49 +--------------------- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 - sql/updates/r2375_mangos.sql | 1 + 4 files changed, 4 insertions(+), 49 deletions(-) create mode 100644 sql/updates/r2375_mangos.sql diff --git a/scripts/eastern_kingdoms/searing_gorge.cpp b/scripts/eastern_kingdoms/searing_gorge.cpp index 5065ee3c4..b0ceffb75 100644 --- a/scripts/eastern_kingdoms/searing_gorge.cpp +++ b/scripts/eastern_kingdoms/searing_gorge.cpp @@ -16,65 +16,20 @@ /* ScriptData SDName: Searing_Gorge -SD%Complete: 80 -SDComment: Quest support: 3377 +SD%Complete: 0 +SDComment: Placeholder SDCategory: Searing Gorge EndScriptData */ /* ContentData -npc_zamael_lunthistle EndContentData */ #include "precompiled.h" -/*###### -## npc_zamael_lunthistle -######*/ - -bool GossipHello_npc_zamael_lunthistle(Player* pPlayer, Creature* pCreature) -{ - if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); - - if (pPlayer->GetQuestStatus(3377) == QUEST_STATUS_INCOMPLETE) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Tell me your story", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF); - - pPlayer->SEND_GOSSIP_MENU(1920, pCreature->GetObjectGuid()); - - return true; -} - -bool GossipSelect_npc_zamael_lunthistle(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) -{ - switch(uiAction) - { - case GOSSIP_ACTION_INFO_DEF: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Please continue...", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); - pPlayer->SEND_GOSSIP_MENU(1921, pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF+1: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Goodbye", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); - pPlayer->SEND_GOSSIP_MENU(1922, pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF+2: - pPlayer->CLOSE_GOSSIP_MENU(); - pPlayer->AreaExploredOrEventHappens(3377); - break; - } - return true; -} - /*###### ## ######*/ void AddSC_searing_gorge() { - Script* pNewScript; - - pNewScript = new Script; - pNewScript->Name = "npc_zamael_lunthistle"; - pNewScript->pGossipHello = &GossipHello_npc_zamael_lunthistle; - pNewScript->pGossipSelect = &GossipSelect_npc_zamael_lunthistle; - pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 675df904e..e580c82f6 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2374" + #define SD2_REVISION_NR "2375" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 6275ec213..bc6bdfe1b 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -938,7 +938,6 @@ INSERT INTO scripted_event_id VALUES (5623,'event_spell_gandling_shadow_portal'); /* SEARING GORGE */ -UPDATE creature_template SET ScriptName='npc_zamael_lunthistle' WHERE entry=8436; /* SHADOWFANG KEEP */ UPDATE instance_template SET ScriptName='instance_shadowfang_keep' WHERE map=33; diff --git a/sql/updates/r2375_mangos.sql b/sql/updates/r2375_mangos.sql new file mode 100644 index 000000000..316790f0d --- /dev/null +++ b/sql/updates/r2375_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='' WHERE entry=8436; From fef1147dc4ee98fa01358f435358c995c62732ef Mon Sep 17 00:00:00 2001 From: Xfurry Date: Wed, 4 Jan 2012 21:41:53 +0200 Subject: [PATCH 0361/1172] [2376] Happy New Year 2012 --- CMakeLists.txt | 2 +- ScriptMgr.cpp | 2 +- ScriptMgr.h | 2 +- base/escort_ai.cpp | 2 +- base/escort_ai.h | 2 +- base/follower_ai.cpp | 2 +- base/follower_ai.h | 2 +- base/guard_ai.cpp | 2 +- base/guard_ai.h | 2 +- base/pet_ai.cpp | 2 +- base/pet_ai.h | 2 +- config.h | 2 +- config.h.in | 2 +- include/precompiled.cpp | 2 +- include/precompiled.h | 2 +- include/sc_creature.cpp | 2 +- include/sc_creature.h | 2 +- include/sc_gossip.h | 2 +- include/sc_grid_searchers.cpp | 2 +- include/sc_grid_searchers.h | 2 +- include/sc_instance.cpp | 2 +- include/sc_instance.h | 2 +- scripts/battlegrounds/battleground.cpp | 4 ++-- scripts/eastern_kingdoms/alterac_mountains.cpp | 2 +- scripts/eastern_kingdoms/arathi_highlands.cpp | 2 +- .../eastern_kingdoms/blackrock_depths/blackrock_depths.cpp | 2 +- scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.h | 2 +- .../blackrock_depths/boss_ambassador_flamelash.cpp | 2 +- scripts/eastern_kingdoms/blackrock_depths/boss_anubshiah.cpp | 2 +- .../eastern_kingdoms/blackrock_depths/boss_coren_direbrew.cpp | 2 +- .../blackrock_depths/boss_emperor_dagran_thaurissan.cpp | 2 +- .../blackrock_depths/boss_general_angerforge.cpp | 2 +- .../blackrock_depths/boss_gorosh_the_dervish.cpp | 2 +- scripts/eastern_kingdoms/blackrock_depths/boss_grizzle.cpp | 2 +- .../blackrock_depths/boss_high_interrogator_gerstahn.cpp | 2 +- scripts/eastern_kingdoms/blackrock_depths/boss_magmus.cpp | 2 +- .../eastern_kingdoms/blackrock_depths/boss_tomb_of_seven.cpp | 2 +- .../blackrock_depths/instance_blackrock_depths.cpp | 2 +- scripts/eastern_kingdoms/blackrock_spire/blackrock_spire.h | 2 +- scripts/eastern_kingdoms/blackrock_spire/boss_drakkisath.cpp | 2 +- scripts/eastern_kingdoms/blackrock_spire/boss_gyth.cpp | 2 +- scripts/eastern_kingdoms/blackrock_spire/boss_halycon.cpp | 2 +- .../eastern_kingdoms/blackrock_spire/boss_highlord_omokk.cpp | 2 +- .../blackrock_spire/boss_mother_smolderweb.cpp | 2 +- .../blackrock_spire/boss_overlord_wyrmthalak.cpp | 2 +- .../blackrock_spire/boss_pyroguard_emberseer.cpp | 2 +- .../blackrock_spire/boss_quartermaster_zigris.cpp | 2 +- .../eastern_kingdoms/blackrock_spire/boss_rend_blackhand.cpp | 2 +- .../blackrock_spire/boss_shadow_hunter_voshgajin.cpp | 2 +- scripts/eastern_kingdoms/blackrock_spire/boss_the_beast.cpp | 2 +- .../eastern_kingdoms/blackrock_spire/boss_warmaster_voone.cpp | 2 +- .../blackrock_spire/instance_blackrock_spire.cpp | 2 +- scripts/eastern_kingdoms/blackwing_lair/blackwing_lair.h | 2 +- .../blackwing_lair/boss_broodlord_lashlayer.cpp | 2 +- scripts/eastern_kingdoms/blackwing_lair/boss_chromaggus.cpp | 2 +- scripts/eastern_kingdoms/blackwing_lair/boss_ebonroc.cpp | 2 +- scripts/eastern_kingdoms/blackwing_lair/boss_firemaw.cpp | 2 +- scripts/eastern_kingdoms/blackwing_lair/boss_flamegor.cpp | 2 +- scripts/eastern_kingdoms/blackwing_lair/boss_nefarian.cpp | 2 +- scripts/eastern_kingdoms/blackwing_lair/boss_razorgore.cpp | 2 +- scripts/eastern_kingdoms/blackwing_lair/boss_vaelastrasz.cpp | 2 +- .../eastern_kingdoms/blackwing_lair/boss_victor_nefarius.cpp | 2 +- .../blackwing_lair/instance_blackwing_lair.cpp | 2 +- scripts/eastern_kingdoms/blasted_lands.cpp | 2 +- scripts/eastern_kingdoms/boss_kruul.cpp | 2 +- scripts/eastern_kingdoms/burning_steppes.cpp | 2 +- scripts/eastern_kingdoms/deadmines/boss_mr_smite.cpp | 2 +- scripts/eastern_kingdoms/deadmines/deadmines.cpp | 2 +- scripts/eastern_kingdoms/deadmines/deadmines.h | 2 +- scripts/eastern_kingdoms/deadmines/instance_deadmines.cpp | 2 +- scripts/eastern_kingdoms/dun_morogh.cpp | 2 +- scripts/eastern_kingdoms/eastern_plaguelands.cpp | 2 +- scripts/eastern_kingdoms/elwynn_forest.cpp | 2 +- scripts/eastern_kingdoms/eversong_woods.cpp | 2 +- scripts/eastern_kingdoms/ghostlands.cpp | 2 +- scripts/eastern_kingdoms/gnomeregan/boss_thermaplugg.cpp | 2 +- scripts/eastern_kingdoms/gnomeregan/gnomeregan.cpp | 2 +- scripts/eastern_kingdoms/gnomeregan/gnomeregan.h | 2 +- scripts/eastern_kingdoms/gnomeregan/instance_gnomeregan.cpp | 2 +- scripts/eastern_kingdoms/hinterlands.cpp | 2 +- scripts/eastern_kingdoms/ironforge.cpp | 2 +- scripts/eastern_kingdoms/isle_of_queldanas.cpp | 2 +- scripts/eastern_kingdoms/karazhan/boss_curator.cpp | 2 +- scripts/eastern_kingdoms/karazhan/boss_maiden_of_virtue.cpp | 2 +- scripts/eastern_kingdoms/karazhan/boss_midnight.cpp | 2 +- scripts/eastern_kingdoms/karazhan/boss_moroes.cpp | 4 ++-- scripts/eastern_kingdoms/karazhan/boss_netherspite.cpp | 2 +- scripts/eastern_kingdoms/karazhan/boss_nightbane.cpp | 2 +- scripts/eastern_kingdoms/karazhan/boss_prince_malchezaar.cpp | 2 +- scripts/eastern_kingdoms/karazhan/boss_shade_of_aran.cpp | 2 +- scripts/eastern_kingdoms/karazhan/boss_terestian_illhoof.cpp | 2 +- scripts/eastern_kingdoms/karazhan/bosses_opera.cpp | 2 +- scripts/eastern_kingdoms/karazhan/chess_event.cpp | 2 +- scripts/eastern_kingdoms/karazhan/instance_karazhan.cpp | 2 +- scripts/eastern_kingdoms/karazhan/karazhan.cpp | 2 +- scripts/eastern_kingdoms/karazhan/karazhan.h | 2 +- scripts/eastern_kingdoms/loch_modan.cpp | 2 +- .../magisters_terrace/boss_felblood_kaelthas.cpp | 2 +- .../magisters_terrace/boss_priestess_delrissa.cpp | 2 +- .../magisters_terrace/boss_selin_fireheart.cpp | 2 +- scripts/eastern_kingdoms/magisters_terrace/boss_vexallus.cpp | 2 +- .../magisters_terrace/instance_magisters_terrace.cpp | 2 +- .../eastern_kingdoms/magisters_terrace/magisters_terrace.cpp | 2 +- .../eastern_kingdoms/magisters_terrace/magisters_terrace.h | 2 +- scripts/eastern_kingdoms/molten_core/boss_baron_geddon.cpp | 2 +- scripts/eastern_kingdoms/molten_core/boss_garr.cpp | 2 +- scripts/eastern_kingdoms/molten_core/boss_gehennas.cpp | 2 +- scripts/eastern_kingdoms/molten_core/boss_golemagg.cpp | 2 +- scripts/eastern_kingdoms/molten_core/boss_lucifron.cpp | 2 +- scripts/eastern_kingdoms/molten_core/boss_magmadar.cpp | 2 +- .../eastern_kingdoms/molten_core/boss_majordomo_executus.cpp | 2 +- scripts/eastern_kingdoms/molten_core/boss_ragnaros.cpp | 2 +- scripts/eastern_kingdoms/molten_core/boss_shazzrah.cpp | 2 +- .../eastern_kingdoms/molten_core/boss_sulfuron_harbinger.cpp | 2 +- scripts/eastern_kingdoms/molten_core/instance_molten_core.cpp | 2 +- scripts/eastern_kingdoms/molten_core/molten_core.cpp | 2 +- scripts/eastern_kingdoms/molten_core/molten_core.h | 2 +- scripts/eastern_kingdoms/redridge_mountains.cpp | 2 +- scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp | 2 +- .../eastern_kingdoms/scarlet_monastery/boss_arcanist_doan.cpp | 2 +- .../scarlet_monastery/boss_azshir_the_sleepless.cpp | 2 +- .../scarlet_monastery/boss_bloodmage_thalnos.cpp | 2 +- .../scarlet_monastery/boss_headless_horseman.cpp | 2 +- scripts/eastern_kingdoms/scarlet_monastery/boss_herod.cpp | 2 +- .../scarlet_monastery/boss_high_inquisitor_fairbanks.cpp | 2 +- .../scarlet_monastery/boss_houndmaster_loksey.cpp | 2 +- .../scarlet_monastery/boss_interrogator_vishas.cpp | 2 +- .../scarlet_monastery/boss_mograine_and_whitemane.cpp | 2 +- scripts/eastern_kingdoms/scarlet_monastery/boss_scorn.cpp | 2 +- .../scarlet_monastery/instance_scarlet_monastery.cpp | 2 +- .../eastern_kingdoms/scarlet_monastery/scarlet_monastery.h | 2 +- .../eastern_kingdoms/scholomance/boss_darkmaster_gandling.cpp | 2 +- .../scholomance/boss_death_knight_darkreaver.cpp | 2 +- scripts/eastern_kingdoms/scholomance/boss_jandice_barov.cpp | 2 +- scripts/eastern_kingdoms/scholomance/boss_kormok.cpp | 2 +- scripts/eastern_kingdoms/scholomance/boss_vectus.cpp | 2 +- scripts/eastern_kingdoms/scholomance/instance_scholomance.cpp | 2 +- scripts/eastern_kingdoms/scholomance/scholomance.h | 2 +- scripts/eastern_kingdoms/searing_gorge.cpp | 2 +- scripts/eastern_kingdoms/shadowfang_keep/boss_hummel.cpp | 2 +- .../shadowfang_keep/instance_shadowfang_keep.cpp | 2 +- scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.cpp | 2 +- scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.h | 2 +- scripts/eastern_kingdoms/silvermoon_city.cpp | 2 +- scripts/eastern_kingdoms/silverpine_forest.cpp | 2 +- scripts/eastern_kingdoms/stormwind_city.cpp | 2 +- scripts/eastern_kingdoms/stranglethorn_vale.cpp | 2 +- scripts/eastern_kingdoms/stratholme/boss_baron_rivendare.cpp | 2 +- .../eastern_kingdoms/stratholme/boss_baroness_anastari.cpp | 2 +- .../eastern_kingdoms/stratholme/boss_cannon_master_willey.cpp | 2 +- .../eastern_kingdoms/stratholme/boss_dathrohan_balnazzar.cpp | 2 +- .../eastern_kingdoms/stratholme/boss_magistrate_barthilas.cpp | 2 +- .../eastern_kingdoms/stratholme/boss_maleki_the_pallid.cpp | 2 +- scripts/eastern_kingdoms/stratholme/boss_nerubenkan.cpp | 2 +- .../eastern_kingdoms/stratholme/boss_order_of_silver_hand.cpp | 2 +- .../eastern_kingdoms/stratholme/boss_postmaster_malown.cpp | 2 +- .../eastern_kingdoms/stratholme/boss_ramstein_the_gorger.cpp | 2 +- scripts/eastern_kingdoms/stratholme/boss_timmy_the_cruel.cpp | 2 +- scripts/eastern_kingdoms/stratholme/instance_stratholme.cpp | 2 +- scripts/eastern_kingdoms/stratholme/stratholme.cpp | 2 +- scripts/eastern_kingdoms/stratholme/stratholme.h | 2 +- .../eastern_kingdoms/sunken_temple/instance_sunken_temple.cpp | 2 +- scripts/eastern_kingdoms/sunken_temple/sunken_temple.cpp | 2 +- scripts/eastern_kingdoms/sunken_temple/sunken_temple.h | 2 +- scripts/eastern_kingdoms/sunwell_plateau/boss_brutallus.cpp | 2 +- .../eastern_kingdoms/sunwell_plateau/boss_eredar_twins.cpp | 2 +- scripts/eastern_kingdoms/sunwell_plateau/boss_felmyst.cpp | 2 +- scripts/eastern_kingdoms/sunwell_plateau/boss_kalecgos.cpp | 2 +- scripts/eastern_kingdoms/sunwell_plateau/boss_kiljaeden.cpp | 2 +- scripts/eastern_kingdoms/sunwell_plateau/boss_muru.cpp | 2 +- .../sunwell_plateau/instance_sunwell_plateau.cpp | 2 +- scripts/eastern_kingdoms/sunwell_plateau/sunwell_plateau.h | 2 +- scripts/eastern_kingdoms/swamp_of_sorrows.cpp | 2 +- scripts/eastern_kingdoms/tirisfal_glades.cpp | 2 +- scripts/eastern_kingdoms/uldaman/boss_archaedas.cpp | 2 +- scripts/eastern_kingdoms/uldaman/instance_uldaman.cpp | 2 +- scripts/eastern_kingdoms/uldaman/uldaman.cpp | 2 +- scripts/eastern_kingdoms/uldaman/uldaman.h | 2 +- scripts/eastern_kingdoms/undercity.cpp | 2 +- scripts/eastern_kingdoms/western_plaguelands.cpp | 2 +- scripts/eastern_kingdoms/westfall.cpp | 2 +- scripts/eastern_kingdoms/wetlands.cpp | 2 +- scripts/eastern_kingdoms/zulaman/boss_akilzon.cpp | 2 +- scripts/eastern_kingdoms/zulaman/boss_halazzi.cpp | 2 +- scripts/eastern_kingdoms/zulaman/boss_janalai.cpp | 2 +- scripts/eastern_kingdoms/zulaman/boss_malacrass.cpp | 2 +- scripts/eastern_kingdoms/zulaman/boss_nalorakk.cpp | 2 +- scripts/eastern_kingdoms/zulaman/boss_zuljin.cpp | 2 +- scripts/eastern_kingdoms/zulaman/instance_zulaman.cpp | 2 +- scripts/eastern_kingdoms/zulaman/zulaman.cpp | 2 +- scripts/eastern_kingdoms/zulaman/zulaman.h | 2 +- scripts/eastern_kingdoms/zulgurub/boss_arlokk.cpp | 2 +- scripts/eastern_kingdoms/zulgurub/boss_gahzranka.cpp | 2 +- scripts/eastern_kingdoms/zulgurub/boss_grilek.cpp | 2 +- scripts/eastern_kingdoms/zulgurub/boss_hakkar.cpp | 2 +- scripts/eastern_kingdoms/zulgurub/boss_hazzarah.cpp | 2 +- scripts/eastern_kingdoms/zulgurub/boss_jeklik.cpp | 2 +- scripts/eastern_kingdoms/zulgurub/boss_jindo.cpp | 2 +- scripts/eastern_kingdoms/zulgurub/boss_mandokir.cpp | 2 +- scripts/eastern_kingdoms/zulgurub/boss_marli.cpp | 2 +- scripts/eastern_kingdoms/zulgurub/boss_renataki.cpp | 2 +- scripts/eastern_kingdoms/zulgurub/boss_thekal.cpp | 2 +- scripts/eastern_kingdoms/zulgurub/boss_venoxis.cpp | 2 +- scripts/eastern_kingdoms/zulgurub/boss_wushoolay.cpp | 2 +- scripts/eastern_kingdoms/zulgurub/instance_zulgurub.cpp | 2 +- scripts/eastern_kingdoms/zulgurub/zulgurub.h | 2 +- scripts/examples/example_creature.cpp | 2 +- scripts/examples/example_escort.cpp | 2 +- scripts/examples/example_gossip_codebox.cpp | 2 +- scripts/examples/example_misc.cpp | 2 +- scripts/kalimdor/ashenvale.cpp | 2 +- scripts/kalimdor/azshara.cpp | 2 +- scripts/kalimdor/azuremyst_isle.cpp | 2 +- scripts/kalimdor/blackfathom_deeps/blackfathom_deeps.h | 2 +- .../kalimdor/blackfathom_deeps/instance_blackfathom_deeps.cpp | 2 +- scripts/kalimdor/bloodmyst_isle.cpp | 2 +- scripts/kalimdor/boss_azuregos.cpp | 2 +- .../culling_of_stratholme/culling_of_stratholme.cpp | 2 +- .../culling_of_stratholme/culling_of_stratholme.h | 2 +- .../culling_of_stratholme/instance_culling_of_stratholme.cpp | 2 +- scripts/kalimdor/caverns_of_time/dark_portal/boss_aeonus.cpp | 2 +- .../caverns_of_time/dark_portal/boss_chrono_lord_deja.cpp | 2 +- .../kalimdor/caverns_of_time/dark_portal/boss_temporus.cpp | 2 +- scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.cpp | 2 +- scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.h | 2 +- .../caverns_of_time/dark_portal/instance_dark_portal.cpp | 2 +- scripts/kalimdor/caverns_of_time/hyjal/boss_archimonde.cpp | 2 +- scripts/kalimdor/caverns_of_time/hyjal/hyjal.cpp | 2 +- scripts/kalimdor/caverns_of_time/hyjal/hyjal.h | 2 +- scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.cpp | 2 +- scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.h | 2 +- scripts/kalimdor/caverns_of_time/hyjal/instance_hyjal.cpp | 2 +- .../caverns_of_time/old_hillsbrad/boss_captain_skarloc.cpp | 2 +- .../caverns_of_time/old_hillsbrad/boss_epoch_hunter.cpp | 2 +- .../caverns_of_time/old_hillsbrad/boss_leutenant_drake.cpp | 2 +- .../caverns_of_time/old_hillsbrad/instance_old_hillsbrad.cpp | 2 +- .../kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.cpp | 2 +- .../kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.h | 2 +- scripts/kalimdor/darkshore.cpp | 2 +- scripts/kalimdor/desolace.cpp | 2 +- scripts/kalimdor/dire_maul/dire_maul.cpp | 2 +- scripts/kalimdor/dire_maul/dire_maul.h | 2 +- scripts/kalimdor/dire_maul/instance_dire_maul.cpp | 2 +- scripts/kalimdor/dustwallow_marsh.cpp | 2 +- scripts/kalimdor/felwood.cpp | 2 +- scripts/kalimdor/feralas.cpp | 2 +- scripts/kalimdor/maraudon/boss_celebras_the_cursed.cpp | 2 +- scripts/kalimdor/maraudon/boss_landslide.cpp | 2 +- scripts/kalimdor/maraudon/boss_noxxion.cpp | 2 +- scripts/kalimdor/maraudon/boss_princess_theradras.cpp | 2 +- scripts/kalimdor/moonglade.cpp | 2 +- scripts/kalimdor/mulgore.cpp | 2 +- scripts/kalimdor/onyxias_lair/boss_onyxia.cpp | 2 +- scripts/kalimdor/onyxias_lair/instance_onyxias_lair.cpp | 2 +- scripts/kalimdor/onyxias_lair/onyxias_lair.h | 2 +- scripts/kalimdor/orgrimmar.cpp | 2 +- .../kalimdor/razorfen_downs/boss_amnennar_the_coldbringer.cpp | 2 +- scripts/kalimdor/razorfen_downs/razorfen_downs.cpp | 2 +- scripts/kalimdor/razorfen_kraul/instance_razorfen_kraul.cpp | 2 +- scripts/kalimdor/razorfen_kraul/razorfen_kraul.cpp | 2 +- scripts/kalimdor/razorfen_kraul/razorfen_kraul.h | 2 +- scripts/kalimdor/ruins_of_ahnqiraj/boss_ayamiss.cpp | 2 +- scripts/kalimdor/ruins_of_ahnqiraj/boss_buru.cpp | 2 +- scripts/kalimdor/ruins_of_ahnqiraj/boss_kurinnaxx.cpp | 2 +- scripts/kalimdor/ruins_of_ahnqiraj/boss_moam.cpp | 2 +- scripts/kalimdor/ruins_of_ahnqiraj/boss_ossirian.cpp | 2 +- scripts/kalimdor/ruins_of_ahnqiraj/boss_rajaxx.cpp | 2 +- .../kalimdor/ruins_of_ahnqiraj/instance_ruins_of_ahnqiraj.cpp | 2 +- scripts/kalimdor/ruins_of_ahnqiraj/ruins_of_ahnqiraj.cpp | 2 +- scripts/kalimdor/ruins_of_ahnqiraj/ruins_of_ahnqiraj.h | 2 +- scripts/kalimdor/silithus.cpp | 2 +- scripts/kalimdor/stonetalon_mountains.cpp | 2 +- scripts/kalimdor/tanaris.cpp | 2 +- scripts/kalimdor/teldrassil.cpp | 2 +- scripts/kalimdor/temple_of_ahnqiraj/boss_bug_trio.cpp | 2 +- scripts/kalimdor/temple_of_ahnqiraj/boss_cthun.cpp | 2 +- scripts/kalimdor/temple_of_ahnqiraj/boss_fankriss.cpp | 2 +- scripts/kalimdor/temple_of_ahnqiraj/boss_huhuran.cpp | 2 +- scripts/kalimdor/temple_of_ahnqiraj/boss_ouro.cpp | 2 +- scripts/kalimdor/temple_of_ahnqiraj/boss_sartura.cpp | 2 +- scripts/kalimdor/temple_of_ahnqiraj/boss_skeram.cpp | 2 +- scripts/kalimdor/temple_of_ahnqiraj/boss_twinemperors.cpp | 2 +- scripts/kalimdor/temple_of_ahnqiraj/boss_viscidus.cpp | 2 +- .../temple_of_ahnqiraj/instance_temple_of_ahnqiraj.cpp | 2 +- .../kalimdor/temple_of_ahnqiraj/mob_anubisath_sentinel.cpp | 2 +- scripts/kalimdor/temple_of_ahnqiraj/temple_of_ahnqiraj.h | 2 +- scripts/kalimdor/the_barrens.cpp | 2 +- scripts/kalimdor/thousand_needles.cpp | 4 ++-- scripts/kalimdor/thunder_bluff.cpp | 2 +- scripts/kalimdor/ungoro_crater.cpp | 2 +- scripts/kalimdor/wailing_caverns/instance_wailing_caverns.cpp | 2 +- scripts/kalimdor/wailing_caverns/wailing_caverns.cpp | 2 +- scripts/kalimdor/wailing_caverns/wailing_caverns.h | 2 +- scripts/kalimdor/winterspring.cpp | 2 +- scripts/kalimdor/zulfarrak/boss_zumrah.cpp | 2 +- scripts/kalimdor/zulfarrak/instance_zulfarrak.cpp | 2 +- scripts/kalimdor/zulfarrak/zulfarrak.cpp | 2 +- scripts/kalimdor/zulfarrak/zulfarrak.h | 2 +- scripts/northrend/azjol-nerub/ahnkahet/ahnkahet.h | 2 +- scripts/northrend/azjol-nerub/ahnkahet/boss_jedoga.cpp | 2 +- scripts/northrend/azjol-nerub/ahnkahet/boss_nadox.cpp | 2 +- scripts/northrend/azjol-nerub/ahnkahet/boss_taldaram.cpp | 2 +- scripts/northrend/azjol-nerub/ahnkahet/boss_volazj.cpp | 2 +- scripts/northrend/azjol-nerub/ahnkahet/instance_ahnkahet.cpp | 2 +- scripts/northrend/azjol-nerub/azjol-nerub/azjol-nerub.h | 2 +- scripts/northrend/azjol-nerub/azjol-nerub/boss_anubarak.cpp | 2 +- scripts/northrend/azjol-nerub/azjol-nerub/boss_hadronox.cpp | 2 +- scripts/northrend/azjol-nerub/azjol-nerub/boss_krikthir.cpp | 2 +- .../azjol-nerub/azjol-nerub/instance_azjol-nerub.cpp | 2 +- scripts/northrend/borean_tundra.cpp | 2 +- .../trial_of_the_champion/boss_grand_champions.cpp | 2 +- .../trial_of_the_champion/instance_trial_of_the_champion.cpp | 2 +- .../trial_of_the_champion/trial_of_the_champion.cpp | 2 +- .../trial_of_the_champion/trial_of_the_champion.h | 2 +- .../trial_of_the_crusader/boss_anubarak_trial.cpp | 2 +- .../trial_of_the_crusader/boss_faction_champions.cpp | 2 +- .../trial_of_the_crusader/boss_jaraxxus.cpp | 2 +- .../trial_of_the_crusader/boss_northrend_beasts.cpp | 2 +- .../trial_of_the_crusader/boss_twin_valkyr.cpp | 2 +- .../trial_of_the_crusader/instance_trial_of_the_crusader.cpp | 2 +- .../trial_of_the_crusader/trial_of_the_crusader.cpp | 2 +- .../trial_of_the_crusader/trial_of_the_crusader.h | 2 +- scripts/northrend/dalaran.cpp | 2 +- scripts/northrend/dragonblight.cpp | 2 +- scripts/northrend/draktharon_keep/boss_novos.cpp | 2 +- scripts/northrend/draktharon_keep/boss_tharonja.cpp | 2 +- scripts/northrend/draktharon_keep/boss_trollgore.cpp | 2 +- scripts/northrend/draktharon_keep/draktharon_keep.h | 2 +- .../northrend/draktharon_keep/instance_draktharon_keep.cpp | 2 +- scripts/northrend/grizzly_hills.cpp | 2 +- scripts/northrend/gundrak/boss_colossus.cpp | 2 +- scripts/northrend/gundrak/boss_eck.cpp | 2 +- scripts/northrend/gundrak/boss_galdarah.cpp | 2 +- scripts/northrend/gundrak/boss_moorabi.cpp | 2 +- scripts/northrend/gundrak/boss_sladran.cpp | 2 +- scripts/northrend/gundrak/gundrak.h | 2 +- scripts/northrend/gundrak/instance_gundrak.cpp | 2 +- scripts/northrend/howling_fjord.cpp | 2 +- scripts/northrend/icecrown.cpp | 2 +- .../frozen_halls/forge_of_souls/boss_bronjahm.cpp | 2 +- .../frozen_halls/forge_of_souls/boss_devourer_of_souls.cpp | 4 ++-- .../frozen_halls/forge_of_souls/forge_of_souls.h | 2 +- .../frozen_halls/forge_of_souls/instance_forge_of_souls.cpp | 2 +- .../frozen_halls/halls_of_reflection/boss_falric.cpp | 2 +- .../frozen_halls/halls_of_reflection/boss_lich_king.cpp | 2 +- .../frozen_halls/halls_of_reflection/boss_marwyn.cpp | 2 +- .../frozen_halls/halls_of_reflection/halls_of_reflection.cpp | 2 +- .../frozen_halls/halls_of_reflection/halls_of_reflection.h | 2 +- .../halls_of_reflection/instance_halls_of_reflection.cpp | 2 +- .../frozen_halls/pit_of_saron/boss_forgemaster_garfrost.cpp | 2 +- .../frozen_halls/pit_of_saron/boss_krick_and_ick.cpp | 2 +- .../frozen_halls/pit_of_saron/boss_scourgelord_tyrannus.cpp | 2 +- .../frozen_halls/pit_of_saron/instance_pit_of_saron.cpp | 2 +- .../frozen_halls/pit_of_saron/pit_of_saron.cpp | 2 +- .../icecrown_citadel/frozen_halls/pit_of_saron/pit_of_saron.h | 2 +- .../icecrown_citadel/blood_prince_council.cpp | 2 +- .../icecrown_citadel/boss_blood_queen_lanathel.cpp | 2 +- .../icecrown_citadel/boss_deathbringer_saurfang.cpp | 2 +- .../icecrown_citadel/icecrown_citadel/boss_festergut.cpp | 2 +- .../icecrown_citadel/boss_lady_deathwhisper.cpp | 2 +- .../icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp | 2 +- .../icecrown_citadel/boss_professor_putricide.cpp | 2 +- .../icecrown_citadel/icecrown_citadel/boss_rotface.cpp | 2 +- .../icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp | 2 +- .../icecrown_citadel/icecrown_citadel/boss_the_lich_king.cpp | 2 +- .../icecrown_citadel/boss_valithria_dreamwalker.cpp | 2 +- .../icecrown_citadel/icecrown_citadel/gunship_battle.cpp | 2 +- .../icecrown_citadel/icecrown_citadel/icecrown_citadel.h | 2 +- .../icecrown_citadel/instance_icecrown_citadel.cpp | 2 +- scripts/northrend/naxxramas/boss_anubrekhan.cpp | 2 +- scripts/northrend/naxxramas/boss_faerlina.cpp | 2 +- scripts/northrend/naxxramas/boss_four_horsemen.cpp | 2 +- scripts/northrend/naxxramas/boss_gluth.cpp | 2 +- scripts/northrend/naxxramas/boss_gothik.cpp | 2 +- scripts/northrend/naxxramas/boss_grobbulus.cpp | 2 +- scripts/northrend/naxxramas/boss_heigan.cpp | 2 +- scripts/northrend/naxxramas/boss_kelthuzad.cpp | 2 +- scripts/northrend/naxxramas/boss_loatheb.cpp | 2 +- scripts/northrend/naxxramas/boss_maexxna.cpp | 2 +- scripts/northrend/naxxramas/boss_noth.cpp | 2 +- scripts/northrend/naxxramas/boss_patchwerk.cpp | 2 +- scripts/northrend/naxxramas/boss_razuvious.cpp | 2 +- scripts/northrend/naxxramas/boss_sapphiron.cpp | 2 +- scripts/northrend/naxxramas/boss_thaddius.cpp | 2 +- scripts/northrend/naxxramas/instance_naxxramas.cpp | 2 +- scripts/northrend/naxxramas/naxxramas.h | 2 +- scripts/northrend/nexus/eye_of_eternity/boss_malygos.cpp | 2 +- scripts/northrend/nexus/nexus/boss_anomalus.cpp | 2 +- scripts/northrend/nexus/nexus/boss_keristrasza.cpp | 2 +- scripts/northrend/nexus/nexus/boss_ormorok.cpp | 2 +- scripts/northrend/nexus/nexus/boss_telestra.cpp | 2 +- scripts/northrend/nexus/nexus/instance_nexus.cpp | 2 +- scripts/northrend/nexus/nexus/nexus.h | 2 +- scripts/northrend/obsidian_sanctum/boss_sartharion.cpp | 2 +- .../northrend/obsidian_sanctum/instance_obsidian_sanctum.cpp | 2 +- scripts/northrend/obsidian_sanctum/obsidian_sanctum.h | 2 +- scripts/northrend/ruby_sanctum/boss_baltharus.cpp | 2 +- scripts/northrend/ruby_sanctum/boss_halion.cpp | 2 +- scripts/northrend/ruby_sanctum/boss_saviana.cpp | 2 +- scripts/northrend/ruby_sanctum/boss_zarithrian.cpp | 2 +- scripts/northrend/ruby_sanctum/instance_ruby_sanctum.cpp | 2 +- scripts/northrend/ruby_sanctum/ruby_sanctum.h | 2 +- scripts/northrend/sholazar_basin.cpp | 2 +- scripts/northrend/storm_peaks.cpp | 2 +- .../northrend/ulduar/halls_of_lightning/boss_bjarngrim.cpp | 2 +- scripts/northrend/ulduar/halls_of_lightning/boss_ionar.cpp | 4 ++-- scripts/northrend/ulduar/halls_of_lightning/boss_loken.cpp | 2 +- scripts/northrend/ulduar/halls_of_lightning/boss_volkhan.cpp | 2 +- .../northrend/ulduar/halls_of_lightning/halls_of_lightning.h | 2 +- .../ulduar/halls_of_lightning/instance_halls_of_lightning.cpp | 2 +- .../northrend/ulduar/halls_of_stone/boss_maiden_of_grief.cpp | 2 +- scripts/northrend/ulduar/halls_of_stone/boss_sjonnir.cpp | 2 +- scripts/northrend/ulduar/halls_of_stone/halls_of_stone.cpp | 2 +- scripts/northrend/ulduar/halls_of_stone/halls_of_stone.h | 2 +- .../ulduar/halls_of_stone/instance_halls_of_stone.cpp | 2 +- scripts/northrend/ulduar/ulduar/assembly_of_iron.cpp | 2 +- scripts/northrend/ulduar/ulduar/boss_algalon.cpp | 2 +- scripts/northrend/ulduar/ulduar/boss_auriaya.cpp | 2 +- scripts/northrend/ulduar/ulduar/boss_flame_leviathan.cpp | 2 +- scripts/northrend/ulduar/ulduar/boss_freya.cpp | 2 +- scripts/northrend/ulduar/ulduar/boss_general_vezax.cpp | 2 +- scripts/northrend/ulduar/ulduar/boss_hodir.cpp | 2 +- scripts/northrend/ulduar/ulduar/boss_ignis.cpp | 2 +- scripts/northrend/ulduar/ulduar/boss_kologarn.cpp | 2 +- scripts/northrend/ulduar/ulduar/boss_mimiron.cpp | 2 +- scripts/northrend/ulduar/ulduar/boss_razorscale.cpp | 2 +- scripts/northrend/ulduar/ulduar/boss_thorim.cpp | 2 +- scripts/northrend/ulduar/ulduar/boss_xt_002.cpp | 2 +- scripts/northrend/ulduar/ulduar/boss_yogg_saron.cpp | 2 +- scripts/northrend/ulduar/ulduar/instance_ulduar.cpp | 2 +- scripts/northrend/ulduar/ulduar/ulduar.cpp | 2 +- scripts/northrend/ulduar/ulduar/ulduar.h | 2 +- scripts/northrend/utgarde_keep/utgarde_keep/boss_ingvar.cpp | 2 +- scripts/northrend/utgarde_keep/utgarde_keep/boss_keleseth.cpp | 2 +- .../utgarde_keep/utgarde_keep/boss_skarvald_and_dalronn.cpp | 2 +- .../utgarde_keep/utgarde_keep/instance_utgarde_keep.cpp | 2 +- scripts/northrend/utgarde_keep/utgarde_keep/utgarde_keep.cpp | 2 +- scripts/northrend/utgarde_keep/utgarde_keep/utgarde_keep.h | 2 +- .../northrend/utgarde_keep/utgarde_pinnacle/boss_gortok.cpp | 2 +- .../northrend/utgarde_keep/utgarde_pinnacle/boss_skadi.cpp | 2 +- .../northrend/utgarde_keep/utgarde_pinnacle/boss_svala.cpp | 2 +- .../northrend/utgarde_keep/utgarde_pinnacle/boss_ymiron.cpp | 2 +- .../utgarde_pinnacle/instance_utgarde_pinnacle.cpp | 2 +- .../utgarde_keep/utgarde_pinnacle/utgarde_pinnacle.h | 2 +- scripts/northrend/vault_of_archavon/boss_archavon.cpp | 2 +- scripts/northrend/vault_of_archavon/boss_emalon.cpp | 2 +- scripts/northrend/vault_of_archavon/boss_koralon.cpp | 2 +- scripts/northrend/vault_of_archavon/boss_toravon.cpp | 2 +- .../vault_of_archavon/instance_vault_of_archavon.cpp | 2 +- scripts/northrend/vault_of_archavon/vault_of_archavon.h | 2 +- scripts/northrend/violet_hold/boss_erekem.cpp | 2 +- scripts/northrend/violet_hold/boss_ichoron.cpp | 2 +- scripts/northrend/violet_hold/instance_violet_hold.cpp | 2 +- scripts/northrend/violet_hold/violet_hold.cpp | 2 +- scripts/northrend/violet_hold/violet_hold.h | 2 +- scripts/northrend/zuldrak.cpp | 2 +- .../auchindoun/auchenai_crypts/boss_exarch_maladaar.cpp | 2 +- scripts/outland/auchindoun/auchenai_crypts/boss_shirrak.cpp | 2 +- .../auchindoun/mana_tombs/boss_nexusprince_shaffar.cpp | 2 +- scripts/outland/auchindoun/mana_tombs/boss_pandemonius.cpp | 2 +- scripts/outland/auchindoun/sethekk_halls/boss_anzu.cpp | 2 +- .../outland/auchindoun/sethekk_halls/boss_darkweaver_syth.cpp | 2 +- .../auchindoun/sethekk_halls/boss_talon_king_ikiss.cpp | 2 +- .../auchindoun/sethekk_halls/instance_sethekk_halls.cpp | 2 +- scripts/outland/auchindoun/sethekk_halls/sethekk_halls.h | 2 +- .../auchindoun/shadow_labyrinth/boss_ambassador_hellmaw.cpp | 2 +- .../shadow_labyrinth/boss_blackheart_the_inciter.cpp | 2 +- .../auchindoun/shadow_labyrinth/boss_grandmaster_vorpil.cpp | 2 +- scripts/outland/auchindoun/shadow_labyrinth/boss_murmur.cpp | 2 +- .../auchindoun/shadow_labyrinth/instance_shadow_labyrinth.cpp | 2 +- .../outland/auchindoun/shadow_labyrinth/shadow_labyrinth.h | 2 +- scripts/outland/black_temple/black_temple.cpp | 2 +- scripts/outland/black_temple/black_temple.h | 2 +- scripts/outland/black_temple/boss_bloodboil.cpp | 2 +- scripts/outland/black_temple/boss_illidan.cpp | 2 +- scripts/outland/black_temple/boss_mother_shahraz.cpp | 2 +- scripts/outland/black_temple/boss_reliquary_of_souls.cpp | 2 +- scripts/outland/black_temple/boss_shade_of_akama.cpp | 2 +- scripts/outland/black_temple/boss_supremus.cpp | 2 +- scripts/outland/black_temple/boss_teron_gorefiend.cpp | 2 +- scripts/outland/black_temple/boss_warlord_najentus.cpp | 2 +- scripts/outland/black_temple/illidari_council.cpp | 2 +- scripts/outland/black_temple/instance_black_temple.cpp | 2 +- scripts/outland/blades_edge_mountains.cpp | 2 +- scripts/outland/boss_doomlord_kazzak.cpp | 2 +- scripts/outland/boss_doomwalker.cpp | 2 +- .../serpent_shrine/boss_fathomlord_karathress.cpp | 2 +- .../serpent_shrine/boss_hydross_the_unstable.cpp | 2 +- .../coilfang_reservoir/serpent_shrine/boss_lady_vashj.cpp | 2 +- .../serpent_shrine/boss_leotheras_the_blind.cpp | 2 +- .../serpent_shrine/boss_morogrim_tidewalker.cpp | 2 +- .../serpent_shrine/boss_the_lurker_below.cpp | 2 +- .../serpent_shrine/instance_serpent_shrine.cpp | 2 +- .../coilfang_reservoir/serpent_shrine/serpent_shrine.h | 2 +- scripts/outland/coilfang_reservoir/slave_pens/boss_ahune.cpp | 2 +- .../steam_vault/boss_hydromancer_thespia.cpp | 2 +- .../steam_vault/boss_mekgineer_steamrigger.cpp | 2 +- .../steam_vault/boss_warlord_kalithresh.cpp | 2 +- .../coilfang_reservoir/steam_vault/instance_steam_vault.cpp | 2 +- scripts/outland/coilfang_reservoir/steam_vault/steam_vault.h | 2 +- .../outland/coilfang_reservoir/underbog/boss_hungarfen.cpp | 2 +- scripts/outland/gruuls_lair/boss_gruul.cpp | 2 +- scripts/outland/gruuls_lair/boss_high_king_maulgar.cpp | 2 +- scripts/outland/gruuls_lair/gruuls_lair.h | 2 +- scripts/outland/gruuls_lair/instance_gruuls_lair.cpp | 2 +- .../outland/hellfire_citadel/blood_furnace/blood_furnace.h | 2 +- .../outland/hellfire_citadel/blood_furnace/boss_broggok.cpp | 2 +- .../blood_furnace/boss_kelidan_the_breaker.cpp | 2 +- .../outland/hellfire_citadel/blood_furnace/boss_the_maker.cpp | 4 ++-- .../hellfire_citadel/blood_furnace/instance_blood_furnace.cpp | 2 +- .../hellfire_ramparts/boss_nazan_and_vazruden.cpp | 2 +- .../hellfire_ramparts/boss_omor_the_unscarred.cpp | 2 +- .../hellfire_ramparts/boss_watchkeeper_gargolmar.cpp | 2 +- .../hellfire_citadel/hellfire_ramparts/hellfire_ramparts.h | 2 +- .../hellfire_ramparts/instance_hellfire_ramparts.cpp | 2 +- .../hellfire_citadel/magtheridons_lair/boss_magtheridon.cpp | 2 +- .../magtheridons_lair/instance_magtheridons_lair.cpp | 2 +- .../hellfire_citadel/magtheridons_lair/magtheridons_lair.h | 2 +- .../hellfire_citadel/shattered_halls/boss_nethekurse.cpp | 2 +- .../shattered_halls/boss_warbringer_omrogg.cpp | 2 +- .../shattered_halls/boss_warchief_kargath_bladefist.cpp | 2 +- .../shattered_halls/instance_shattered_halls.cpp | 2 +- .../hellfire_citadel/shattered_halls/shattered_halls.h | 2 +- scripts/outland/hellfire_peninsula.cpp | 2 +- scripts/outland/nagrand.cpp | 2 +- scripts/outland/netherstorm.cpp | 2 +- scripts/outland/shadowmoon_valley.cpp | 2 +- scripts/outland/shattrath_city.cpp | 2 +- scripts/outland/tempest_keep/arcatraz/arcatraz.cpp | 4 ++-- scripts/outland/tempest_keep/arcatraz/arcatraz.h | 2 +- .../outland/tempest_keep/arcatraz/boss_harbinger_skyriss.cpp | 2 +- scripts/outland/tempest_keep/arcatraz/instance_arcatraz.cpp | 2 +- .../tempest_keep/botanica/boss_high_botanist_freywinn.cpp | 2 +- scripts/outland/tempest_keep/botanica/boss_laj.cpp | 2 +- scripts/outland/tempest_keep/botanica/boss_warp_splinter.cpp | 2 +- scripts/outland/tempest_keep/the_eye/boss_alar.cpp | 2 +- scripts/outland/tempest_keep/the_eye/boss_astromancer.cpp | 2 +- scripts/outland/tempest_keep/the_eye/boss_kaelthas.cpp | 2 +- scripts/outland/tempest_keep/the_eye/boss_void_reaver.cpp | 2 +- scripts/outland/tempest_keep/the_eye/instance_the_eye.cpp | 2 +- scripts/outland/tempest_keep/the_eye/the_eye.cpp | 2 +- scripts/outland/tempest_keep/the_eye/the_eye.h | 2 +- .../tempest_keep/the_mechanar/boss_gatewatcher_ironhand.cpp | 2 +- .../tempest_keep/the_mechanar/boss_nethermancer_sepethrea.cpp | 2 +- .../the_mechanar/boss_pathaleon_the_calculator.cpp | 2 +- .../outland/tempest_keep/the_mechanar/instance_mechanar.cpp | 2 +- scripts/outland/tempest_keep/the_mechanar/mechanar.h | 2 +- scripts/outland/terokkar_forest.cpp | 2 +- scripts/outland/zangarmarsh.cpp | 2 +- scripts/world/areatrigger_scripts.cpp | 2 +- scripts/world/bosses_emerald_dragons.cpp | 2 +- scripts/world/go_scripts.cpp | 2 +- scripts/world/guards.cpp | 2 +- scripts/world/item_scripts.cpp | 2 +- scripts/world/mob_generic_creature.cpp | 2 +- scripts/world/npc_professions.cpp | 2 +- scripts/world/npcs_special.cpp | 2 +- scripts/world/spell_scripts.cpp | 2 +- scripts/world/world_map_scripts.cpp | 2 +- sd2_revision_nr.h | 2 +- system/MangosdRev.cpp | 2 +- system/ScriptLoader.cpp | 2 +- system/ScriptLoader.h | 2 +- system/system.cpp | 2 +- system/system.h | 2 +- tool/git_id/git_id.cpp | 4 ++-- 566 files changed, 574 insertions(+), 574 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7f54011c8..0e96eba1f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,5 @@ # -# Copyright (C) 2005-2011 MaNGOS +# Copyright (C) 2005-2012 MaNGOS # # 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 diff --git a/ScriptMgr.cpp b/ScriptMgr.cpp index d12e8b2b1..bf09d6a38 100644 --- a/ScriptMgr.cpp +++ b/ScriptMgr.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/ScriptMgr.h b/ScriptMgr.h index 4ff458495..563d0a7ee 100644 --- a/ScriptMgr.h +++ b/ScriptMgr.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/base/escort_ai.cpp b/base/escort_ai.cpp index 7e9fa65c3..373a60aaa 100644 --- a/base/escort_ai.cpp +++ b/base/escort_ai.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/base/escort_ai.h b/base/escort_ai.h index e4b052750..564499ef1 100644 --- a/base/escort_ai.h +++ b/base/escort_ai.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/base/follower_ai.cpp b/base/follower_ai.cpp index 38aa46281..26cc67bee 100644 --- a/base/follower_ai.cpp +++ b/base/follower_ai.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/base/follower_ai.h b/base/follower_ai.h index 0e782d243..9533a7580 100644 --- a/base/follower_ai.h +++ b/base/follower_ai.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/base/guard_ai.cpp b/base/guard_ai.cpp index f3de45194..78d292d3d 100644 --- a/base/guard_ai.cpp +++ b/base/guard_ai.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/base/guard_ai.h b/base/guard_ai.h index e2587b5e1..c9470f8b4 100644 --- a/base/guard_ai.h +++ b/base/guard_ai.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/base/pet_ai.cpp b/base/pet_ai.cpp index a73a47a2f..8146b8688 100644 --- a/base/pet_ai.cpp +++ b/base/pet_ai.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/base/pet_ai.h b/base/pet_ai.h index d5f4d4567..a668db5ee 100644 --- a/base/pet_ai.h +++ b/base/pet_ai.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/config.h b/config.h index 775023642..e7d3411c5 100644 --- a/config.h +++ b/config.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2005-2011 MaNGOS + * Copyright (C) 2005-2012 MaNGOS * * 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 diff --git a/config.h.in b/config.h.in index 775023642..e7d3411c5 100644 --- a/config.h.in +++ b/config.h.in @@ -1,5 +1,5 @@ /* - * Copyright (C) 2005-2011 MaNGOS + * Copyright (C) 2005-2012 MaNGOS * * 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 diff --git a/include/precompiled.cpp b/include/precompiled.cpp index 120f738fe..082bcd937 100644 --- a/include/precompiled.cpp +++ b/include/precompiled.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/include/precompiled.h b/include/precompiled.h index 11b6b3112..85c5e2ec3 100644 --- a/include/precompiled.h +++ b/include/precompiled.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/include/sc_creature.cpp b/include/sc_creature.cpp index cecf63f41..95b4b6344 100644 --- a/include/sc_creature.cpp +++ b/include/sc_creature.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/include/sc_creature.h b/include/sc_creature.h index ad14bea2f..23c6e8606 100644 --- a/include/sc_creature.h +++ b/include/sc_creature.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/include/sc_gossip.h b/include/sc_gossip.h index 06217cb79..513cd7a1b 100644 --- a/include/sc_gossip.h +++ b/include/sc_gossip.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/include/sc_grid_searchers.cpp b/include/sc_grid_searchers.cpp index 42b662d5c..f61cebdd9 100644 --- a/include/sc_grid_searchers.cpp +++ b/include/sc_grid_searchers.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/include/sc_grid_searchers.h b/include/sc_grid_searchers.h index 258e270e8..b939eb599 100644 --- a/include/sc_grid_searchers.h +++ b/include/sc_grid_searchers.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/include/sc_instance.cpp b/include/sc_instance.cpp index 3f954c522..4be84b81b 100644 --- a/include/sc_instance.cpp +++ b/include/sc_instance.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/include/sc_instance.h b/include/sc_instance.h index f41f83d22..dca852b95 100644 --- a/include/sc_instance.h +++ b/include/sc_instance.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/battlegrounds/battleground.cpp b/scripts/battlegrounds/battleground.cpp index 1f020e5dc..efd0328dd 100644 --- a/scripts/battlegrounds/battleground.cpp +++ b/scripts/battlegrounds/battleground.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 @@ -37,7 +37,7 @@ EndScriptData */ enum { - SPELL_SPIRIT_HEAL_CHANNEL = 22011, // Spirit Heal Channel + SPELL_SPIRIT_HEAL_CHANNEL = 22012, // Spirit Heal Channel SPELL_SPIRIT_HEAL = 22012, // Spirit Heal SPELL_SPIRIT_HEAL_MANA = 44535, // in battlegrounds player get this no-mana-cost-buff diff --git a/scripts/eastern_kingdoms/alterac_mountains.cpp b/scripts/eastern_kingdoms/alterac_mountains.cpp index 0744f0c35..d2f182b11 100644 --- a/scripts/eastern_kingdoms/alterac_mountains.cpp +++ b/scripts/eastern_kingdoms/alterac_mountains.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/arathi_highlands.cpp b/scripts/eastern_kingdoms/arathi_highlands.cpp index 832d7a732..4bf7206fe 100644 --- a/scripts/eastern_kingdoms/arathi_highlands.cpp +++ b/scripts/eastern_kingdoms/arathi_highlands.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.cpp b/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.cpp index af53f227b..6332c0fdf 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.cpp +++ b/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.h b/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.h index 961430c4d..99c01f717 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.h +++ b/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/eastern_kingdoms/blackrock_depths/boss_ambassador_flamelash.cpp b/scripts/eastern_kingdoms/blackrock_depths/boss_ambassador_flamelash.cpp index 518e97902..d4a528890 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/boss_ambassador_flamelash.cpp +++ b/scripts/eastern_kingdoms/blackrock_depths/boss_ambassador_flamelash.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/blackrock_depths/boss_anubshiah.cpp b/scripts/eastern_kingdoms/blackrock_depths/boss_anubshiah.cpp index a411f3f68..90409335a 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/boss_anubshiah.cpp +++ b/scripts/eastern_kingdoms/blackrock_depths/boss_anubshiah.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/blackrock_depths/boss_coren_direbrew.cpp b/scripts/eastern_kingdoms/blackrock_depths/boss_coren_direbrew.cpp index 267f37bef..c7aaf79fb 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/boss_coren_direbrew.cpp +++ b/scripts/eastern_kingdoms/blackrock_depths/boss_coren_direbrew.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/blackrock_depths/boss_emperor_dagran_thaurissan.cpp b/scripts/eastern_kingdoms/blackrock_depths/boss_emperor_dagran_thaurissan.cpp index 31914ffba..0755cce51 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/boss_emperor_dagran_thaurissan.cpp +++ b/scripts/eastern_kingdoms/blackrock_depths/boss_emperor_dagran_thaurissan.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/blackrock_depths/boss_general_angerforge.cpp b/scripts/eastern_kingdoms/blackrock_depths/boss_general_angerforge.cpp index fc9a3e0cf..c1e1c4577 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/boss_general_angerforge.cpp +++ b/scripts/eastern_kingdoms/blackrock_depths/boss_general_angerforge.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/blackrock_depths/boss_gorosh_the_dervish.cpp b/scripts/eastern_kingdoms/blackrock_depths/boss_gorosh_the_dervish.cpp index 3605382ee..026e1211e 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/boss_gorosh_the_dervish.cpp +++ b/scripts/eastern_kingdoms/blackrock_depths/boss_gorosh_the_dervish.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/blackrock_depths/boss_grizzle.cpp b/scripts/eastern_kingdoms/blackrock_depths/boss_grizzle.cpp index 1eb569bc6..5b26a48c1 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/boss_grizzle.cpp +++ b/scripts/eastern_kingdoms/blackrock_depths/boss_grizzle.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/blackrock_depths/boss_high_interrogator_gerstahn.cpp b/scripts/eastern_kingdoms/blackrock_depths/boss_high_interrogator_gerstahn.cpp index 45de58dac..82139caa4 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/boss_high_interrogator_gerstahn.cpp +++ b/scripts/eastern_kingdoms/blackrock_depths/boss_high_interrogator_gerstahn.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/blackrock_depths/boss_magmus.cpp b/scripts/eastern_kingdoms/blackrock_depths/boss_magmus.cpp index 24007b335..0a091c8d4 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/boss_magmus.cpp +++ b/scripts/eastern_kingdoms/blackrock_depths/boss_magmus.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/blackrock_depths/boss_tomb_of_seven.cpp b/scripts/eastern_kingdoms/blackrock_depths/boss_tomb_of_seven.cpp index d681f2c20..c8096a9f3 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/boss_tomb_of_seven.cpp +++ b/scripts/eastern_kingdoms/blackrock_depths/boss_tomb_of_seven.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/blackrock_depths/instance_blackrock_depths.cpp b/scripts/eastern_kingdoms/blackrock_depths/instance_blackrock_depths.cpp index a7d191b29..690884554 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/instance_blackrock_depths.cpp +++ b/scripts/eastern_kingdoms/blackrock_depths/instance_blackrock_depths.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/blackrock_spire/blackrock_spire.h b/scripts/eastern_kingdoms/blackrock_spire/blackrock_spire.h index c2c3c29f3..248e54bdf 100644 --- a/scripts/eastern_kingdoms/blackrock_spire/blackrock_spire.h +++ b/scripts/eastern_kingdoms/blackrock_spire/blackrock_spire.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/eastern_kingdoms/blackrock_spire/boss_drakkisath.cpp b/scripts/eastern_kingdoms/blackrock_spire/boss_drakkisath.cpp index 8242d9b1f..6f8813738 100644 --- a/scripts/eastern_kingdoms/blackrock_spire/boss_drakkisath.cpp +++ b/scripts/eastern_kingdoms/blackrock_spire/boss_drakkisath.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/blackrock_spire/boss_gyth.cpp b/scripts/eastern_kingdoms/blackrock_spire/boss_gyth.cpp index 2b3f2b629..c5b0766fc 100644 --- a/scripts/eastern_kingdoms/blackrock_spire/boss_gyth.cpp +++ b/scripts/eastern_kingdoms/blackrock_spire/boss_gyth.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/blackrock_spire/boss_halycon.cpp b/scripts/eastern_kingdoms/blackrock_spire/boss_halycon.cpp index ec3a97a62..e40f2627c 100644 --- a/scripts/eastern_kingdoms/blackrock_spire/boss_halycon.cpp +++ b/scripts/eastern_kingdoms/blackrock_spire/boss_halycon.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/blackrock_spire/boss_highlord_omokk.cpp b/scripts/eastern_kingdoms/blackrock_spire/boss_highlord_omokk.cpp index 93e6aea76..57d65d297 100644 --- a/scripts/eastern_kingdoms/blackrock_spire/boss_highlord_omokk.cpp +++ b/scripts/eastern_kingdoms/blackrock_spire/boss_highlord_omokk.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/blackrock_spire/boss_mother_smolderweb.cpp b/scripts/eastern_kingdoms/blackrock_spire/boss_mother_smolderweb.cpp index d7332b8c0..25a1e66b1 100644 --- a/scripts/eastern_kingdoms/blackrock_spire/boss_mother_smolderweb.cpp +++ b/scripts/eastern_kingdoms/blackrock_spire/boss_mother_smolderweb.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/blackrock_spire/boss_overlord_wyrmthalak.cpp b/scripts/eastern_kingdoms/blackrock_spire/boss_overlord_wyrmthalak.cpp index b530eb04b..fa8256101 100644 --- a/scripts/eastern_kingdoms/blackrock_spire/boss_overlord_wyrmthalak.cpp +++ b/scripts/eastern_kingdoms/blackrock_spire/boss_overlord_wyrmthalak.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/blackrock_spire/boss_pyroguard_emberseer.cpp b/scripts/eastern_kingdoms/blackrock_spire/boss_pyroguard_emberseer.cpp index cf51b821c..fc0bd2bb6 100644 --- a/scripts/eastern_kingdoms/blackrock_spire/boss_pyroguard_emberseer.cpp +++ b/scripts/eastern_kingdoms/blackrock_spire/boss_pyroguard_emberseer.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/blackrock_spire/boss_quartermaster_zigris.cpp b/scripts/eastern_kingdoms/blackrock_spire/boss_quartermaster_zigris.cpp index 3ed964158..25c8be0d4 100644 --- a/scripts/eastern_kingdoms/blackrock_spire/boss_quartermaster_zigris.cpp +++ b/scripts/eastern_kingdoms/blackrock_spire/boss_quartermaster_zigris.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/blackrock_spire/boss_rend_blackhand.cpp b/scripts/eastern_kingdoms/blackrock_spire/boss_rend_blackhand.cpp index 9de579d36..be09d1955 100644 --- a/scripts/eastern_kingdoms/blackrock_spire/boss_rend_blackhand.cpp +++ b/scripts/eastern_kingdoms/blackrock_spire/boss_rend_blackhand.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/blackrock_spire/boss_shadow_hunter_voshgajin.cpp b/scripts/eastern_kingdoms/blackrock_spire/boss_shadow_hunter_voshgajin.cpp index b99471407..1a9cd75c9 100644 --- a/scripts/eastern_kingdoms/blackrock_spire/boss_shadow_hunter_voshgajin.cpp +++ b/scripts/eastern_kingdoms/blackrock_spire/boss_shadow_hunter_voshgajin.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/blackrock_spire/boss_the_beast.cpp b/scripts/eastern_kingdoms/blackrock_spire/boss_the_beast.cpp index 151e888f4..6329f878a 100644 --- a/scripts/eastern_kingdoms/blackrock_spire/boss_the_beast.cpp +++ b/scripts/eastern_kingdoms/blackrock_spire/boss_the_beast.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/blackrock_spire/boss_warmaster_voone.cpp b/scripts/eastern_kingdoms/blackrock_spire/boss_warmaster_voone.cpp index a277d49f9..a6728b67e 100644 --- a/scripts/eastern_kingdoms/blackrock_spire/boss_warmaster_voone.cpp +++ b/scripts/eastern_kingdoms/blackrock_spire/boss_warmaster_voone.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/blackrock_spire/instance_blackrock_spire.cpp b/scripts/eastern_kingdoms/blackrock_spire/instance_blackrock_spire.cpp index 826a7fedc..cef7661ef 100644 --- a/scripts/eastern_kingdoms/blackrock_spire/instance_blackrock_spire.cpp +++ b/scripts/eastern_kingdoms/blackrock_spire/instance_blackrock_spire.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/blackwing_lair/blackwing_lair.h b/scripts/eastern_kingdoms/blackwing_lair/blackwing_lair.h index b98841fee..f8b95abb5 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/blackwing_lair.h +++ b/scripts/eastern_kingdoms/blackwing_lair/blackwing_lair.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/eastern_kingdoms/blackwing_lair/boss_broodlord_lashlayer.cpp b/scripts/eastern_kingdoms/blackwing_lair/boss_broodlord_lashlayer.cpp index a644314de..29b704867 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/boss_broodlord_lashlayer.cpp +++ b/scripts/eastern_kingdoms/blackwing_lair/boss_broodlord_lashlayer.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/blackwing_lair/boss_chromaggus.cpp b/scripts/eastern_kingdoms/blackwing_lair/boss_chromaggus.cpp index a0298316b..d28654262 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/boss_chromaggus.cpp +++ b/scripts/eastern_kingdoms/blackwing_lair/boss_chromaggus.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/blackwing_lair/boss_ebonroc.cpp b/scripts/eastern_kingdoms/blackwing_lair/boss_ebonroc.cpp index d7782faee..b68dfc3e9 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/boss_ebonroc.cpp +++ b/scripts/eastern_kingdoms/blackwing_lair/boss_ebonroc.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/blackwing_lair/boss_firemaw.cpp b/scripts/eastern_kingdoms/blackwing_lair/boss_firemaw.cpp index 6057a78f4..0550af3ce 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/boss_firemaw.cpp +++ b/scripts/eastern_kingdoms/blackwing_lair/boss_firemaw.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/blackwing_lair/boss_flamegor.cpp b/scripts/eastern_kingdoms/blackwing_lair/boss_flamegor.cpp index fc7a2b5d7..efc1f5c04 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/boss_flamegor.cpp +++ b/scripts/eastern_kingdoms/blackwing_lair/boss_flamegor.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/blackwing_lair/boss_nefarian.cpp b/scripts/eastern_kingdoms/blackwing_lair/boss_nefarian.cpp index 798d51ff1..503e3e2fd 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/boss_nefarian.cpp +++ b/scripts/eastern_kingdoms/blackwing_lair/boss_nefarian.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/blackwing_lair/boss_razorgore.cpp b/scripts/eastern_kingdoms/blackwing_lair/boss_razorgore.cpp index a7b0f74da..986433fcc 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/boss_razorgore.cpp +++ b/scripts/eastern_kingdoms/blackwing_lair/boss_razorgore.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/blackwing_lair/boss_vaelastrasz.cpp b/scripts/eastern_kingdoms/blackwing_lair/boss_vaelastrasz.cpp index 8affed9a7..be088be44 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/boss_vaelastrasz.cpp +++ b/scripts/eastern_kingdoms/blackwing_lair/boss_vaelastrasz.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/blackwing_lair/boss_victor_nefarius.cpp b/scripts/eastern_kingdoms/blackwing_lair/boss_victor_nefarius.cpp index 5f530b77c..37b05b1a6 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/boss_victor_nefarius.cpp +++ b/scripts/eastern_kingdoms/blackwing_lair/boss_victor_nefarius.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/blackwing_lair/instance_blackwing_lair.cpp b/scripts/eastern_kingdoms/blackwing_lair/instance_blackwing_lair.cpp index 7493116c7..3a1889aa8 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/instance_blackwing_lair.cpp +++ b/scripts/eastern_kingdoms/blackwing_lair/instance_blackwing_lair.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/blasted_lands.cpp b/scripts/eastern_kingdoms/blasted_lands.cpp index b6b6057b7..38b133d49 100644 --- a/scripts/eastern_kingdoms/blasted_lands.cpp +++ b/scripts/eastern_kingdoms/blasted_lands.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/boss_kruul.cpp b/scripts/eastern_kingdoms/boss_kruul.cpp index 1bd65042d..34b385446 100644 --- a/scripts/eastern_kingdoms/boss_kruul.cpp +++ b/scripts/eastern_kingdoms/boss_kruul.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/burning_steppes.cpp b/scripts/eastern_kingdoms/burning_steppes.cpp index f1b07e52d..6a1fff548 100644 --- a/scripts/eastern_kingdoms/burning_steppes.cpp +++ b/scripts/eastern_kingdoms/burning_steppes.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/deadmines/boss_mr_smite.cpp b/scripts/eastern_kingdoms/deadmines/boss_mr_smite.cpp index 2b1aa23d9..3a7b0a0fe 100644 --- a/scripts/eastern_kingdoms/deadmines/boss_mr_smite.cpp +++ b/scripts/eastern_kingdoms/deadmines/boss_mr_smite.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/deadmines/deadmines.cpp b/scripts/eastern_kingdoms/deadmines/deadmines.cpp index 0664c2ca0..fbc959c81 100644 --- a/scripts/eastern_kingdoms/deadmines/deadmines.cpp +++ b/scripts/eastern_kingdoms/deadmines/deadmines.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/deadmines/deadmines.h b/scripts/eastern_kingdoms/deadmines/deadmines.h index b297dd114..f07d4299c 100644 --- a/scripts/eastern_kingdoms/deadmines/deadmines.h +++ b/scripts/eastern_kingdoms/deadmines/deadmines.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/eastern_kingdoms/deadmines/instance_deadmines.cpp b/scripts/eastern_kingdoms/deadmines/instance_deadmines.cpp index d269d8bc2..992a6e2c4 100644 --- a/scripts/eastern_kingdoms/deadmines/instance_deadmines.cpp +++ b/scripts/eastern_kingdoms/deadmines/instance_deadmines.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/dun_morogh.cpp b/scripts/eastern_kingdoms/dun_morogh.cpp index 9d9a63a10..af9864446 100644 --- a/scripts/eastern_kingdoms/dun_morogh.cpp +++ b/scripts/eastern_kingdoms/dun_morogh.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/eastern_plaguelands.cpp b/scripts/eastern_kingdoms/eastern_plaguelands.cpp index 5c28a3943..ebc83e32d 100644 --- a/scripts/eastern_kingdoms/eastern_plaguelands.cpp +++ b/scripts/eastern_kingdoms/eastern_plaguelands.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/elwynn_forest.cpp b/scripts/eastern_kingdoms/elwynn_forest.cpp index fad26c1f2..887c6eceb 100644 --- a/scripts/eastern_kingdoms/elwynn_forest.cpp +++ b/scripts/eastern_kingdoms/elwynn_forest.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/eversong_woods.cpp b/scripts/eastern_kingdoms/eversong_woods.cpp index b31fdfd7f..a96a06e74 100644 --- a/scripts/eastern_kingdoms/eversong_woods.cpp +++ b/scripts/eastern_kingdoms/eversong_woods.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/ghostlands.cpp b/scripts/eastern_kingdoms/ghostlands.cpp index b128d3599..bdd023535 100644 --- a/scripts/eastern_kingdoms/ghostlands.cpp +++ b/scripts/eastern_kingdoms/ghostlands.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/gnomeregan/boss_thermaplugg.cpp b/scripts/eastern_kingdoms/gnomeregan/boss_thermaplugg.cpp index 92bd191fb..30febcc13 100644 --- a/scripts/eastern_kingdoms/gnomeregan/boss_thermaplugg.cpp +++ b/scripts/eastern_kingdoms/gnomeregan/boss_thermaplugg.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/gnomeregan/gnomeregan.cpp b/scripts/eastern_kingdoms/gnomeregan/gnomeregan.cpp index 239ce3f03..82e209f04 100644 --- a/scripts/eastern_kingdoms/gnomeregan/gnomeregan.cpp +++ b/scripts/eastern_kingdoms/gnomeregan/gnomeregan.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/gnomeregan/gnomeregan.h b/scripts/eastern_kingdoms/gnomeregan/gnomeregan.h index 7077f66a8..cb5e5c781 100644 --- a/scripts/eastern_kingdoms/gnomeregan/gnomeregan.h +++ b/scripts/eastern_kingdoms/gnomeregan/gnomeregan.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/eastern_kingdoms/gnomeregan/instance_gnomeregan.cpp b/scripts/eastern_kingdoms/gnomeregan/instance_gnomeregan.cpp index 292db984f..639eeb37d 100644 --- a/scripts/eastern_kingdoms/gnomeregan/instance_gnomeregan.cpp +++ b/scripts/eastern_kingdoms/gnomeregan/instance_gnomeregan.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/hinterlands.cpp b/scripts/eastern_kingdoms/hinterlands.cpp index 39e6fe111..129b9f75d 100644 --- a/scripts/eastern_kingdoms/hinterlands.cpp +++ b/scripts/eastern_kingdoms/hinterlands.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/ironforge.cpp b/scripts/eastern_kingdoms/ironforge.cpp index cc157a72a..1a2e836b3 100644 --- a/scripts/eastern_kingdoms/ironforge.cpp +++ b/scripts/eastern_kingdoms/ironforge.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/isle_of_queldanas.cpp b/scripts/eastern_kingdoms/isle_of_queldanas.cpp index b1877807c..805ec970e 100644 --- a/scripts/eastern_kingdoms/isle_of_queldanas.cpp +++ b/scripts/eastern_kingdoms/isle_of_queldanas.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/karazhan/boss_curator.cpp b/scripts/eastern_kingdoms/karazhan/boss_curator.cpp index 4fbb1a2ea..90f39a888 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_curator.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_curator.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/karazhan/boss_maiden_of_virtue.cpp b/scripts/eastern_kingdoms/karazhan/boss_maiden_of_virtue.cpp index 9f27914a6..aaf9e5e33 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_maiden_of_virtue.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_maiden_of_virtue.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/karazhan/boss_midnight.cpp b/scripts/eastern_kingdoms/karazhan/boss_midnight.cpp index c3e912611..6cd022c52 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_midnight.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_midnight.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/karazhan/boss_moroes.cpp b/scripts/eastern_kingdoms/karazhan/boss_moroes.cpp index 09cab10d4..b9cb3e2d8 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_moroes.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_moroes.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 @@ -28,7 +28,7 @@ enum { MAX_GUESTS = 4, - SAY_AGGRO = -1532011, + SAY_AGGRO = -1532012, SAY_SPECIAL_1 = -1532012, SAY_SPECIAL_2 = -1532013, SAY_KILL_1 = -1532014, diff --git a/scripts/eastern_kingdoms/karazhan/boss_netherspite.cpp b/scripts/eastern_kingdoms/karazhan/boss_netherspite.cpp index cb15f8130..b0271fe9b 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_netherspite.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_netherspite.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/karazhan/boss_nightbane.cpp b/scripts/eastern_kingdoms/karazhan/boss_nightbane.cpp index 8d474e087..bd9117ee1 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_nightbane.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_nightbane.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/karazhan/boss_prince_malchezaar.cpp b/scripts/eastern_kingdoms/karazhan/boss_prince_malchezaar.cpp index ca4929c0c..89fb1e1c3 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_prince_malchezaar.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_prince_malchezaar.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/karazhan/boss_shade_of_aran.cpp b/scripts/eastern_kingdoms/karazhan/boss_shade_of_aran.cpp index e10e2c028..fdd5e01e6 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_shade_of_aran.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_shade_of_aran.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/karazhan/boss_terestian_illhoof.cpp b/scripts/eastern_kingdoms/karazhan/boss_terestian_illhoof.cpp index aa7c1c6fd..b78f58c4b 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_terestian_illhoof.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_terestian_illhoof.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/karazhan/bosses_opera.cpp b/scripts/eastern_kingdoms/karazhan/bosses_opera.cpp index 2481f053c..0003d4b36 100644 --- a/scripts/eastern_kingdoms/karazhan/bosses_opera.cpp +++ b/scripts/eastern_kingdoms/karazhan/bosses_opera.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/karazhan/chess_event.cpp b/scripts/eastern_kingdoms/karazhan/chess_event.cpp index 3e292bc6e..7f1373f99 100644 --- a/scripts/eastern_kingdoms/karazhan/chess_event.cpp +++ b/scripts/eastern_kingdoms/karazhan/chess_event.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/karazhan/instance_karazhan.cpp b/scripts/eastern_kingdoms/karazhan/instance_karazhan.cpp index ef564d142..21002acdb 100644 --- a/scripts/eastern_kingdoms/karazhan/instance_karazhan.cpp +++ b/scripts/eastern_kingdoms/karazhan/instance_karazhan.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/karazhan/karazhan.cpp b/scripts/eastern_kingdoms/karazhan/karazhan.cpp index 9505119fb..651f4432b 100644 --- a/scripts/eastern_kingdoms/karazhan/karazhan.cpp +++ b/scripts/eastern_kingdoms/karazhan/karazhan.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/karazhan/karazhan.h b/scripts/eastern_kingdoms/karazhan/karazhan.h index abf74f6dc..f070375d1 100644 --- a/scripts/eastern_kingdoms/karazhan/karazhan.h +++ b/scripts/eastern_kingdoms/karazhan/karazhan.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/eastern_kingdoms/loch_modan.cpp b/scripts/eastern_kingdoms/loch_modan.cpp index 1ea12bf04..0cf5d9161 100644 --- a/scripts/eastern_kingdoms/loch_modan.cpp +++ b/scripts/eastern_kingdoms/loch_modan.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/magisters_terrace/boss_felblood_kaelthas.cpp b/scripts/eastern_kingdoms/magisters_terrace/boss_felblood_kaelthas.cpp index 41a98a7be..26a0b53ad 100644 --- a/scripts/eastern_kingdoms/magisters_terrace/boss_felblood_kaelthas.cpp +++ b/scripts/eastern_kingdoms/magisters_terrace/boss_felblood_kaelthas.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/magisters_terrace/boss_priestess_delrissa.cpp b/scripts/eastern_kingdoms/magisters_terrace/boss_priestess_delrissa.cpp index b289e9dfd..7ff2dd39a 100644 --- a/scripts/eastern_kingdoms/magisters_terrace/boss_priestess_delrissa.cpp +++ b/scripts/eastern_kingdoms/magisters_terrace/boss_priestess_delrissa.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/magisters_terrace/boss_selin_fireheart.cpp b/scripts/eastern_kingdoms/magisters_terrace/boss_selin_fireheart.cpp index 4ed785f16..555453bee 100644 --- a/scripts/eastern_kingdoms/magisters_terrace/boss_selin_fireheart.cpp +++ b/scripts/eastern_kingdoms/magisters_terrace/boss_selin_fireheart.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/magisters_terrace/boss_vexallus.cpp b/scripts/eastern_kingdoms/magisters_terrace/boss_vexallus.cpp index 013612d53..3026d0098 100644 --- a/scripts/eastern_kingdoms/magisters_terrace/boss_vexallus.cpp +++ b/scripts/eastern_kingdoms/magisters_terrace/boss_vexallus.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/magisters_terrace/instance_magisters_terrace.cpp b/scripts/eastern_kingdoms/magisters_terrace/instance_magisters_terrace.cpp index 467bebf34..85b921e3f 100644 --- a/scripts/eastern_kingdoms/magisters_terrace/instance_magisters_terrace.cpp +++ b/scripts/eastern_kingdoms/magisters_terrace/instance_magisters_terrace.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.cpp b/scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.cpp index e012bdbb7..5edb126ff 100644 --- a/scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.cpp +++ b/scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.h b/scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.h index 204e02238..faebfa347 100644 --- a/scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.h +++ b/scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/eastern_kingdoms/molten_core/boss_baron_geddon.cpp b/scripts/eastern_kingdoms/molten_core/boss_baron_geddon.cpp index 0c51a8a8f..5e476b174 100644 --- a/scripts/eastern_kingdoms/molten_core/boss_baron_geddon.cpp +++ b/scripts/eastern_kingdoms/molten_core/boss_baron_geddon.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/molten_core/boss_garr.cpp b/scripts/eastern_kingdoms/molten_core/boss_garr.cpp index 1f68c70e7..3a23c617c 100644 --- a/scripts/eastern_kingdoms/molten_core/boss_garr.cpp +++ b/scripts/eastern_kingdoms/molten_core/boss_garr.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/molten_core/boss_gehennas.cpp b/scripts/eastern_kingdoms/molten_core/boss_gehennas.cpp index fa2cc23ac..25aa81b2b 100644 --- a/scripts/eastern_kingdoms/molten_core/boss_gehennas.cpp +++ b/scripts/eastern_kingdoms/molten_core/boss_gehennas.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/molten_core/boss_golemagg.cpp b/scripts/eastern_kingdoms/molten_core/boss_golemagg.cpp index ad5b2d4ac..8338571c6 100644 --- a/scripts/eastern_kingdoms/molten_core/boss_golemagg.cpp +++ b/scripts/eastern_kingdoms/molten_core/boss_golemagg.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/molten_core/boss_lucifron.cpp b/scripts/eastern_kingdoms/molten_core/boss_lucifron.cpp index 0a135700d..2f9322bc9 100644 --- a/scripts/eastern_kingdoms/molten_core/boss_lucifron.cpp +++ b/scripts/eastern_kingdoms/molten_core/boss_lucifron.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/molten_core/boss_magmadar.cpp b/scripts/eastern_kingdoms/molten_core/boss_magmadar.cpp index d73ee07ef..629bd394c 100644 --- a/scripts/eastern_kingdoms/molten_core/boss_magmadar.cpp +++ b/scripts/eastern_kingdoms/molten_core/boss_magmadar.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/molten_core/boss_majordomo_executus.cpp b/scripts/eastern_kingdoms/molten_core/boss_majordomo_executus.cpp index f4a445856..098ed9090 100644 --- a/scripts/eastern_kingdoms/molten_core/boss_majordomo_executus.cpp +++ b/scripts/eastern_kingdoms/molten_core/boss_majordomo_executus.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/molten_core/boss_ragnaros.cpp b/scripts/eastern_kingdoms/molten_core/boss_ragnaros.cpp index 85199dc2f..0fd7b609a 100644 --- a/scripts/eastern_kingdoms/molten_core/boss_ragnaros.cpp +++ b/scripts/eastern_kingdoms/molten_core/boss_ragnaros.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/molten_core/boss_shazzrah.cpp b/scripts/eastern_kingdoms/molten_core/boss_shazzrah.cpp index 7a83f4c7f..3429bbf17 100644 --- a/scripts/eastern_kingdoms/molten_core/boss_shazzrah.cpp +++ b/scripts/eastern_kingdoms/molten_core/boss_shazzrah.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/molten_core/boss_sulfuron_harbinger.cpp b/scripts/eastern_kingdoms/molten_core/boss_sulfuron_harbinger.cpp index 328f09484..107a81115 100644 --- a/scripts/eastern_kingdoms/molten_core/boss_sulfuron_harbinger.cpp +++ b/scripts/eastern_kingdoms/molten_core/boss_sulfuron_harbinger.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/molten_core/instance_molten_core.cpp b/scripts/eastern_kingdoms/molten_core/instance_molten_core.cpp index 7daafe74a..f6684abca 100644 --- a/scripts/eastern_kingdoms/molten_core/instance_molten_core.cpp +++ b/scripts/eastern_kingdoms/molten_core/instance_molten_core.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/molten_core/molten_core.cpp b/scripts/eastern_kingdoms/molten_core/molten_core.cpp index 864fc53d7..7145b2038 100644 --- a/scripts/eastern_kingdoms/molten_core/molten_core.cpp +++ b/scripts/eastern_kingdoms/molten_core/molten_core.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/molten_core/molten_core.h b/scripts/eastern_kingdoms/molten_core/molten_core.h index 2721adfae..d3cd6e408 100644 --- a/scripts/eastern_kingdoms/molten_core/molten_core.h +++ b/scripts/eastern_kingdoms/molten_core/molten_core.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/eastern_kingdoms/redridge_mountains.cpp b/scripts/eastern_kingdoms/redridge_mountains.cpp index 622575997..23b2bb86e 100644 --- a/scripts/eastern_kingdoms/redridge_mountains.cpp +++ b/scripts/eastern_kingdoms/redridge_mountains.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp b/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp index 514edd8a2..69d1b45cb 100644 --- a/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp +++ b/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/scarlet_monastery/boss_arcanist_doan.cpp b/scripts/eastern_kingdoms/scarlet_monastery/boss_arcanist_doan.cpp index 9adceba35..e08f8e4c3 100644 --- a/scripts/eastern_kingdoms/scarlet_monastery/boss_arcanist_doan.cpp +++ b/scripts/eastern_kingdoms/scarlet_monastery/boss_arcanist_doan.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/scarlet_monastery/boss_azshir_the_sleepless.cpp b/scripts/eastern_kingdoms/scarlet_monastery/boss_azshir_the_sleepless.cpp index eab9422c0..22b51f82e 100644 --- a/scripts/eastern_kingdoms/scarlet_monastery/boss_azshir_the_sleepless.cpp +++ b/scripts/eastern_kingdoms/scarlet_monastery/boss_azshir_the_sleepless.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/scarlet_monastery/boss_bloodmage_thalnos.cpp b/scripts/eastern_kingdoms/scarlet_monastery/boss_bloodmage_thalnos.cpp index feb77986d..ca9758243 100644 --- a/scripts/eastern_kingdoms/scarlet_monastery/boss_bloodmage_thalnos.cpp +++ b/scripts/eastern_kingdoms/scarlet_monastery/boss_bloodmage_thalnos.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/scarlet_monastery/boss_headless_horseman.cpp b/scripts/eastern_kingdoms/scarlet_monastery/boss_headless_horseman.cpp index 2a2445bab..a44b98924 100644 --- a/scripts/eastern_kingdoms/scarlet_monastery/boss_headless_horseman.cpp +++ b/scripts/eastern_kingdoms/scarlet_monastery/boss_headless_horseman.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/scarlet_monastery/boss_herod.cpp b/scripts/eastern_kingdoms/scarlet_monastery/boss_herod.cpp index 9e1477366..34d7cce90 100644 --- a/scripts/eastern_kingdoms/scarlet_monastery/boss_herod.cpp +++ b/scripts/eastern_kingdoms/scarlet_monastery/boss_herod.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/scarlet_monastery/boss_high_inquisitor_fairbanks.cpp b/scripts/eastern_kingdoms/scarlet_monastery/boss_high_inquisitor_fairbanks.cpp index a3d8b7bc0..f3573b1f2 100644 --- a/scripts/eastern_kingdoms/scarlet_monastery/boss_high_inquisitor_fairbanks.cpp +++ b/scripts/eastern_kingdoms/scarlet_monastery/boss_high_inquisitor_fairbanks.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/scarlet_monastery/boss_houndmaster_loksey.cpp b/scripts/eastern_kingdoms/scarlet_monastery/boss_houndmaster_loksey.cpp index d5156cd32..7f6a02beb 100644 --- a/scripts/eastern_kingdoms/scarlet_monastery/boss_houndmaster_loksey.cpp +++ b/scripts/eastern_kingdoms/scarlet_monastery/boss_houndmaster_loksey.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/scarlet_monastery/boss_interrogator_vishas.cpp b/scripts/eastern_kingdoms/scarlet_monastery/boss_interrogator_vishas.cpp index 1f874f7dc..aa8b44ee6 100644 --- a/scripts/eastern_kingdoms/scarlet_monastery/boss_interrogator_vishas.cpp +++ b/scripts/eastern_kingdoms/scarlet_monastery/boss_interrogator_vishas.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/scarlet_monastery/boss_mograine_and_whitemane.cpp b/scripts/eastern_kingdoms/scarlet_monastery/boss_mograine_and_whitemane.cpp index 8ce2ad560..29b86e412 100644 --- a/scripts/eastern_kingdoms/scarlet_monastery/boss_mograine_and_whitemane.cpp +++ b/scripts/eastern_kingdoms/scarlet_monastery/boss_mograine_and_whitemane.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/scarlet_monastery/boss_scorn.cpp b/scripts/eastern_kingdoms/scarlet_monastery/boss_scorn.cpp index 982a22d8f..4afda0bf0 100644 --- a/scripts/eastern_kingdoms/scarlet_monastery/boss_scorn.cpp +++ b/scripts/eastern_kingdoms/scarlet_monastery/boss_scorn.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/scarlet_monastery/instance_scarlet_monastery.cpp b/scripts/eastern_kingdoms/scarlet_monastery/instance_scarlet_monastery.cpp index 7592b1900..162f10e27 100644 --- a/scripts/eastern_kingdoms/scarlet_monastery/instance_scarlet_monastery.cpp +++ b/scripts/eastern_kingdoms/scarlet_monastery/instance_scarlet_monastery.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/scarlet_monastery/scarlet_monastery.h b/scripts/eastern_kingdoms/scarlet_monastery/scarlet_monastery.h index d19a793e1..9e4664898 100644 --- a/scripts/eastern_kingdoms/scarlet_monastery/scarlet_monastery.h +++ b/scripts/eastern_kingdoms/scarlet_monastery/scarlet_monastery.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/eastern_kingdoms/scholomance/boss_darkmaster_gandling.cpp b/scripts/eastern_kingdoms/scholomance/boss_darkmaster_gandling.cpp index 910765be9..65ba208cb 100644 --- a/scripts/eastern_kingdoms/scholomance/boss_darkmaster_gandling.cpp +++ b/scripts/eastern_kingdoms/scholomance/boss_darkmaster_gandling.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/scholomance/boss_death_knight_darkreaver.cpp b/scripts/eastern_kingdoms/scholomance/boss_death_knight_darkreaver.cpp index 6e8b82a58..6b70cd4fc 100644 --- a/scripts/eastern_kingdoms/scholomance/boss_death_knight_darkreaver.cpp +++ b/scripts/eastern_kingdoms/scholomance/boss_death_knight_darkreaver.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/scholomance/boss_jandice_barov.cpp b/scripts/eastern_kingdoms/scholomance/boss_jandice_barov.cpp index 43ac1ee4c..f1e622c5e 100644 --- a/scripts/eastern_kingdoms/scholomance/boss_jandice_barov.cpp +++ b/scripts/eastern_kingdoms/scholomance/boss_jandice_barov.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/scholomance/boss_kormok.cpp b/scripts/eastern_kingdoms/scholomance/boss_kormok.cpp index 443aca2ab..15506304b 100644 --- a/scripts/eastern_kingdoms/scholomance/boss_kormok.cpp +++ b/scripts/eastern_kingdoms/scholomance/boss_kormok.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/scholomance/boss_vectus.cpp b/scripts/eastern_kingdoms/scholomance/boss_vectus.cpp index 3ae9d2057..cd236d22f 100644 --- a/scripts/eastern_kingdoms/scholomance/boss_vectus.cpp +++ b/scripts/eastern_kingdoms/scholomance/boss_vectus.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/scholomance/instance_scholomance.cpp b/scripts/eastern_kingdoms/scholomance/instance_scholomance.cpp index fd0fcbb5c..155975a94 100644 --- a/scripts/eastern_kingdoms/scholomance/instance_scholomance.cpp +++ b/scripts/eastern_kingdoms/scholomance/instance_scholomance.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/scholomance/scholomance.h b/scripts/eastern_kingdoms/scholomance/scholomance.h index c9a7048fc..967d9f125 100644 --- a/scripts/eastern_kingdoms/scholomance/scholomance.h +++ b/scripts/eastern_kingdoms/scholomance/scholomance.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/eastern_kingdoms/searing_gorge.cpp b/scripts/eastern_kingdoms/searing_gorge.cpp index b0ceffb75..b723081ff 100644 --- a/scripts/eastern_kingdoms/searing_gorge.cpp +++ b/scripts/eastern_kingdoms/searing_gorge.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/shadowfang_keep/boss_hummel.cpp b/scripts/eastern_kingdoms/shadowfang_keep/boss_hummel.cpp index 957efaa13..b00956dcf 100644 --- a/scripts/eastern_kingdoms/shadowfang_keep/boss_hummel.cpp +++ b/scripts/eastern_kingdoms/shadowfang_keep/boss_hummel.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/shadowfang_keep/instance_shadowfang_keep.cpp b/scripts/eastern_kingdoms/shadowfang_keep/instance_shadowfang_keep.cpp index 22ff3a9dc..89c32c4a8 100644 --- a/scripts/eastern_kingdoms/shadowfang_keep/instance_shadowfang_keep.cpp +++ b/scripts/eastern_kingdoms/shadowfang_keep/instance_shadowfang_keep.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.cpp b/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.cpp index 27a36fc75..322fbe0e1 100644 --- a/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.cpp +++ b/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.h b/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.h index 4a40cab52..c9de1663e 100644 --- a/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.h +++ b/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/eastern_kingdoms/silvermoon_city.cpp b/scripts/eastern_kingdoms/silvermoon_city.cpp index 7eaf3213f..eb6284bac 100644 --- a/scripts/eastern_kingdoms/silvermoon_city.cpp +++ b/scripts/eastern_kingdoms/silvermoon_city.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/silverpine_forest.cpp b/scripts/eastern_kingdoms/silverpine_forest.cpp index 9b33c7893..361491d86 100644 --- a/scripts/eastern_kingdoms/silverpine_forest.cpp +++ b/scripts/eastern_kingdoms/silverpine_forest.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/stormwind_city.cpp b/scripts/eastern_kingdoms/stormwind_city.cpp index c1f5d9056..9fb6a47e1 100644 --- a/scripts/eastern_kingdoms/stormwind_city.cpp +++ b/scripts/eastern_kingdoms/stormwind_city.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/stranglethorn_vale.cpp b/scripts/eastern_kingdoms/stranglethorn_vale.cpp index 94438017a..e7bd3dce9 100644 --- a/scripts/eastern_kingdoms/stranglethorn_vale.cpp +++ b/scripts/eastern_kingdoms/stranglethorn_vale.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/stratholme/boss_baron_rivendare.cpp b/scripts/eastern_kingdoms/stratholme/boss_baron_rivendare.cpp index f326da4e7..553a93edc 100644 --- a/scripts/eastern_kingdoms/stratholme/boss_baron_rivendare.cpp +++ b/scripts/eastern_kingdoms/stratholme/boss_baron_rivendare.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/stratholme/boss_baroness_anastari.cpp b/scripts/eastern_kingdoms/stratholme/boss_baroness_anastari.cpp index 1ea146931..0f482bad1 100644 --- a/scripts/eastern_kingdoms/stratholme/boss_baroness_anastari.cpp +++ b/scripts/eastern_kingdoms/stratholme/boss_baroness_anastari.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/stratholme/boss_cannon_master_willey.cpp b/scripts/eastern_kingdoms/stratholme/boss_cannon_master_willey.cpp index 2d0d44697..172001c67 100644 --- a/scripts/eastern_kingdoms/stratholme/boss_cannon_master_willey.cpp +++ b/scripts/eastern_kingdoms/stratholme/boss_cannon_master_willey.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/stratholme/boss_dathrohan_balnazzar.cpp b/scripts/eastern_kingdoms/stratholme/boss_dathrohan_balnazzar.cpp index cd37ffd17..ad749dd9b 100644 --- a/scripts/eastern_kingdoms/stratholme/boss_dathrohan_balnazzar.cpp +++ b/scripts/eastern_kingdoms/stratholme/boss_dathrohan_balnazzar.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/stratholme/boss_magistrate_barthilas.cpp b/scripts/eastern_kingdoms/stratholme/boss_magistrate_barthilas.cpp index 216e353ba..0e8836dc7 100644 --- a/scripts/eastern_kingdoms/stratholme/boss_magistrate_barthilas.cpp +++ b/scripts/eastern_kingdoms/stratholme/boss_magistrate_barthilas.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/stratholme/boss_maleki_the_pallid.cpp b/scripts/eastern_kingdoms/stratholme/boss_maleki_the_pallid.cpp index c7744abf8..d009a80a6 100644 --- a/scripts/eastern_kingdoms/stratholme/boss_maleki_the_pallid.cpp +++ b/scripts/eastern_kingdoms/stratholme/boss_maleki_the_pallid.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/stratholme/boss_nerubenkan.cpp b/scripts/eastern_kingdoms/stratholme/boss_nerubenkan.cpp index 565bc6e92..963ff571e 100644 --- a/scripts/eastern_kingdoms/stratholme/boss_nerubenkan.cpp +++ b/scripts/eastern_kingdoms/stratholme/boss_nerubenkan.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/stratholme/boss_order_of_silver_hand.cpp b/scripts/eastern_kingdoms/stratholme/boss_order_of_silver_hand.cpp index 48bc446d0..4f4452d1f 100644 --- a/scripts/eastern_kingdoms/stratholme/boss_order_of_silver_hand.cpp +++ b/scripts/eastern_kingdoms/stratholme/boss_order_of_silver_hand.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/stratholme/boss_postmaster_malown.cpp b/scripts/eastern_kingdoms/stratholme/boss_postmaster_malown.cpp index 72b005831..f11809ab7 100644 --- a/scripts/eastern_kingdoms/stratholme/boss_postmaster_malown.cpp +++ b/scripts/eastern_kingdoms/stratholme/boss_postmaster_malown.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/stratholme/boss_ramstein_the_gorger.cpp b/scripts/eastern_kingdoms/stratholme/boss_ramstein_the_gorger.cpp index 433f33b86..ebdeac2bf 100644 --- a/scripts/eastern_kingdoms/stratholme/boss_ramstein_the_gorger.cpp +++ b/scripts/eastern_kingdoms/stratholme/boss_ramstein_the_gorger.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/stratholme/boss_timmy_the_cruel.cpp b/scripts/eastern_kingdoms/stratholme/boss_timmy_the_cruel.cpp index c9d2672f7..9a6fa8cca 100644 --- a/scripts/eastern_kingdoms/stratholme/boss_timmy_the_cruel.cpp +++ b/scripts/eastern_kingdoms/stratholme/boss_timmy_the_cruel.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/stratholme/instance_stratholme.cpp b/scripts/eastern_kingdoms/stratholme/instance_stratholme.cpp index 76de2ac4f..540912ada 100644 --- a/scripts/eastern_kingdoms/stratholme/instance_stratholme.cpp +++ b/scripts/eastern_kingdoms/stratholme/instance_stratholme.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/stratholme/stratholme.cpp b/scripts/eastern_kingdoms/stratholme/stratholme.cpp index 143c51f2e..e9502d62e 100644 --- a/scripts/eastern_kingdoms/stratholme/stratholme.cpp +++ b/scripts/eastern_kingdoms/stratholme/stratholme.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/stratholme/stratholme.h b/scripts/eastern_kingdoms/stratholme/stratholme.h index ca2e19650..4b0906c9b 100644 --- a/scripts/eastern_kingdoms/stratholme/stratholme.h +++ b/scripts/eastern_kingdoms/stratholme/stratholme.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/eastern_kingdoms/sunken_temple/instance_sunken_temple.cpp b/scripts/eastern_kingdoms/sunken_temple/instance_sunken_temple.cpp index 7c0903a3a..51b5e70cf 100644 --- a/scripts/eastern_kingdoms/sunken_temple/instance_sunken_temple.cpp +++ b/scripts/eastern_kingdoms/sunken_temple/instance_sunken_temple.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/sunken_temple/sunken_temple.cpp b/scripts/eastern_kingdoms/sunken_temple/sunken_temple.cpp index 16b5c5904..2784307b7 100644 --- a/scripts/eastern_kingdoms/sunken_temple/sunken_temple.cpp +++ b/scripts/eastern_kingdoms/sunken_temple/sunken_temple.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/sunken_temple/sunken_temple.h b/scripts/eastern_kingdoms/sunken_temple/sunken_temple.h index 9dc96ba69..a21a41fdc 100644 --- a/scripts/eastern_kingdoms/sunken_temple/sunken_temple.h +++ b/scripts/eastern_kingdoms/sunken_temple/sunken_temple.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/eastern_kingdoms/sunwell_plateau/boss_brutallus.cpp b/scripts/eastern_kingdoms/sunwell_plateau/boss_brutallus.cpp index b39fd3180..876995dac 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/boss_brutallus.cpp +++ b/scripts/eastern_kingdoms/sunwell_plateau/boss_brutallus.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/sunwell_plateau/boss_eredar_twins.cpp b/scripts/eastern_kingdoms/sunwell_plateau/boss_eredar_twins.cpp index 4240c2a77..5b5987f86 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/boss_eredar_twins.cpp +++ b/scripts/eastern_kingdoms/sunwell_plateau/boss_eredar_twins.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/sunwell_plateau/boss_felmyst.cpp b/scripts/eastern_kingdoms/sunwell_plateau/boss_felmyst.cpp index 19aecf381..b3ce4619b 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/boss_felmyst.cpp +++ b/scripts/eastern_kingdoms/sunwell_plateau/boss_felmyst.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/sunwell_plateau/boss_kalecgos.cpp b/scripts/eastern_kingdoms/sunwell_plateau/boss_kalecgos.cpp index c6105e491..9eaa506b2 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/boss_kalecgos.cpp +++ b/scripts/eastern_kingdoms/sunwell_plateau/boss_kalecgos.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/sunwell_plateau/boss_kiljaeden.cpp b/scripts/eastern_kingdoms/sunwell_plateau/boss_kiljaeden.cpp index 8dbdab863..f8fd05dcb 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/boss_kiljaeden.cpp +++ b/scripts/eastern_kingdoms/sunwell_plateau/boss_kiljaeden.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/sunwell_plateau/boss_muru.cpp b/scripts/eastern_kingdoms/sunwell_plateau/boss_muru.cpp index 9b4341dba..fba08ea08 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/boss_muru.cpp +++ b/scripts/eastern_kingdoms/sunwell_plateau/boss_muru.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/sunwell_plateau/instance_sunwell_plateau.cpp b/scripts/eastern_kingdoms/sunwell_plateau/instance_sunwell_plateau.cpp index 0ec4aced9..bb117f042 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/instance_sunwell_plateau.cpp +++ b/scripts/eastern_kingdoms/sunwell_plateau/instance_sunwell_plateau.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/sunwell_plateau/sunwell_plateau.h b/scripts/eastern_kingdoms/sunwell_plateau/sunwell_plateau.h index 46b04f5b1..3ba53dc15 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/sunwell_plateau.h +++ b/scripts/eastern_kingdoms/sunwell_plateau/sunwell_plateau.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/eastern_kingdoms/swamp_of_sorrows.cpp b/scripts/eastern_kingdoms/swamp_of_sorrows.cpp index 70930d39a..6c01a1e9a 100644 --- a/scripts/eastern_kingdoms/swamp_of_sorrows.cpp +++ b/scripts/eastern_kingdoms/swamp_of_sorrows.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/tirisfal_glades.cpp b/scripts/eastern_kingdoms/tirisfal_glades.cpp index 5639cac15..cff10fbd4 100644 --- a/scripts/eastern_kingdoms/tirisfal_glades.cpp +++ b/scripts/eastern_kingdoms/tirisfal_glades.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/uldaman/boss_archaedas.cpp b/scripts/eastern_kingdoms/uldaman/boss_archaedas.cpp index dd802b78f..e80356294 100644 --- a/scripts/eastern_kingdoms/uldaman/boss_archaedas.cpp +++ b/scripts/eastern_kingdoms/uldaman/boss_archaedas.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/uldaman/instance_uldaman.cpp b/scripts/eastern_kingdoms/uldaman/instance_uldaman.cpp index ea6d664dc..a7a39fc9a 100644 --- a/scripts/eastern_kingdoms/uldaman/instance_uldaman.cpp +++ b/scripts/eastern_kingdoms/uldaman/instance_uldaman.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/uldaman/uldaman.cpp b/scripts/eastern_kingdoms/uldaman/uldaman.cpp index 5bc3de711..851f0eb60 100644 --- a/scripts/eastern_kingdoms/uldaman/uldaman.cpp +++ b/scripts/eastern_kingdoms/uldaman/uldaman.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/uldaman/uldaman.h b/scripts/eastern_kingdoms/uldaman/uldaman.h index bbfa19ab7..c7977851b 100644 --- a/scripts/eastern_kingdoms/uldaman/uldaman.h +++ b/scripts/eastern_kingdoms/uldaman/uldaman.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/eastern_kingdoms/undercity.cpp b/scripts/eastern_kingdoms/undercity.cpp index 9dc93427c..4ff177886 100644 --- a/scripts/eastern_kingdoms/undercity.cpp +++ b/scripts/eastern_kingdoms/undercity.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/western_plaguelands.cpp b/scripts/eastern_kingdoms/western_plaguelands.cpp index 3e4e6b853..f8589b794 100644 --- a/scripts/eastern_kingdoms/western_plaguelands.cpp +++ b/scripts/eastern_kingdoms/western_plaguelands.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/westfall.cpp b/scripts/eastern_kingdoms/westfall.cpp index 06a40177c..17ecafd5c 100644 --- a/scripts/eastern_kingdoms/westfall.cpp +++ b/scripts/eastern_kingdoms/westfall.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/wetlands.cpp b/scripts/eastern_kingdoms/wetlands.cpp index 5193b1ba8..3a51a7d05 100644 --- a/scripts/eastern_kingdoms/wetlands.cpp +++ b/scripts/eastern_kingdoms/wetlands.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/zulaman/boss_akilzon.cpp b/scripts/eastern_kingdoms/zulaman/boss_akilzon.cpp index 222e849ad..e1e84c9f9 100644 --- a/scripts/eastern_kingdoms/zulaman/boss_akilzon.cpp +++ b/scripts/eastern_kingdoms/zulaman/boss_akilzon.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/zulaman/boss_halazzi.cpp b/scripts/eastern_kingdoms/zulaman/boss_halazzi.cpp index f38054618..7922a35c8 100644 --- a/scripts/eastern_kingdoms/zulaman/boss_halazzi.cpp +++ b/scripts/eastern_kingdoms/zulaman/boss_halazzi.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/zulaman/boss_janalai.cpp b/scripts/eastern_kingdoms/zulaman/boss_janalai.cpp index a55f81056..b7256e566 100644 --- a/scripts/eastern_kingdoms/zulaman/boss_janalai.cpp +++ b/scripts/eastern_kingdoms/zulaman/boss_janalai.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/zulaman/boss_malacrass.cpp b/scripts/eastern_kingdoms/zulaman/boss_malacrass.cpp index 9221e908c..5bcd66a79 100644 --- a/scripts/eastern_kingdoms/zulaman/boss_malacrass.cpp +++ b/scripts/eastern_kingdoms/zulaman/boss_malacrass.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/zulaman/boss_nalorakk.cpp b/scripts/eastern_kingdoms/zulaman/boss_nalorakk.cpp index 904f743ed..07925ef87 100644 --- a/scripts/eastern_kingdoms/zulaman/boss_nalorakk.cpp +++ b/scripts/eastern_kingdoms/zulaman/boss_nalorakk.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/zulaman/boss_zuljin.cpp b/scripts/eastern_kingdoms/zulaman/boss_zuljin.cpp index 771eea7ca..bd71104d4 100644 --- a/scripts/eastern_kingdoms/zulaman/boss_zuljin.cpp +++ b/scripts/eastern_kingdoms/zulaman/boss_zuljin.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/zulaman/instance_zulaman.cpp b/scripts/eastern_kingdoms/zulaman/instance_zulaman.cpp index a38079a8e..06c5203fc 100644 --- a/scripts/eastern_kingdoms/zulaman/instance_zulaman.cpp +++ b/scripts/eastern_kingdoms/zulaman/instance_zulaman.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/zulaman/zulaman.cpp b/scripts/eastern_kingdoms/zulaman/zulaman.cpp index 828b72b9f..aa19923c6 100644 --- a/scripts/eastern_kingdoms/zulaman/zulaman.cpp +++ b/scripts/eastern_kingdoms/zulaman/zulaman.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/zulaman/zulaman.h b/scripts/eastern_kingdoms/zulaman/zulaman.h index 17e1bca3d..4a5fd0d21 100644 --- a/scripts/eastern_kingdoms/zulaman/zulaman.h +++ b/scripts/eastern_kingdoms/zulaman/zulaman.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/eastern_kingdoms/zulgurub/boss_arlokk.cpp b/scripts/eastern_kingdoms/zulgurub/boss_arlokk.cpp index cf8dd70ad..75cbfbdda 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_arlokk.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_arlokk.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/zulgurub/boss_gahzranka.cpp b/scripts/eastern_kingdoms/zulgurub/boss_gahzranka.cpp index eff9a11eb..1fe1fc7f5 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_gahzranka.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_gahzranka.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/zulgurub/boss_grilek.cpp b/scripts/eastern_kingdoms/zulgurub/boss_grilek.cpp index 24dea6a3f..d861b60d5 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_grilek.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_grilek.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/zulgurub/boss_hakkar.cpp b/scripts/eastern_kingdoms/zulgurub/boss_hakkar.cpp index c7c473140..28637c8d9 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_hakkar.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_hakkar.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/zulgurub/boss_hazzarah.cpp b/scripts/eastern_kingdoms/zulgurub/boss_hazzarah.cpp index d1078a848..00fe13046 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_hazzarah.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_hazzarah.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/zulgurub/boss_jeklik.cpp b/scripts/eastern_kingdoms/zulgurub/boss_jeklik.cpp index 33cd8d990..4f3e10946 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_jeklik.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_jeklik.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/zulgurub/boss_jindo.cpp b/scripts/eastern_kingdoms/zulgurub/boss_jindo.cpp index 4f2a2e24e..8110af909 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_jindo.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_jindo.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/zulgurub/boss_mandokir.cpp b/scripts/eastern_kingdoms/zulgurub/boss_mandokir.cpp index b865d5dc1..7fbc43235 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_mandokir.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_mandokir.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/zulgurub/boss_marli.cpp b/scripts/eastern_kingdoms/zulgurub/boss_marli.cpp index 21e33cfb7..aaae7219e 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_marli.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_marli.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/zulgurub/boss_renataki.cpp b/scripts/eastern_kingdoms/zulgurub/boss_renataki.cpp index e47b8a012..8f737e234 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_renataki.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_renataki.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/zulgurub/boss_thekal.cpp b/scripts/eastern_kingdoms/zulgurub/boss_thekal.cpp index a41696ba3..0a673a966 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_thekal.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_thekal.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/zulgurub/boss_venoxis.cpp b/scripts/eastern_kingdoms/zulgurub/boss_venoxis.cpp index a283a6e17..0305e5386 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_venoxis.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_venoxis.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/zulgurub/boss_wushoolay.cpp b/scripts/eastern_kingdoms/zulgurub/boss_wushoolay.cpp index 08a82c561..4ffba6247 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_wushoolay.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_wushoolay.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/zulgurub/instance_zulgurub.cpp b/scripts/eastern_kingdoms/zulgurub/instance_zulgurub.cpp index 3d9e8b263..6ed13e8a2 100644 --- a/scripts/eastern_kingdoms/zulgurub/instance_zulgurub.cpp +++ b/scripts/eastern_kingdoms/zulgurub/instance_zulgurub.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/zulgurub/zulgurub.h b/scripts/eastern_kingdoms/zulgurub/zulgurub.h index f07897e3f..d63c7daf8 100644 --- a/scripts/eastern_kingdoms/zulgurub/zulgurub.h +++ b/scripts/eastern_kingdoms/zulgurub/zulgurub.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/examples/example_creature.cpp b/scripts/examples/example_creature.cpp index cb3a5ac51..7957535bc 100644 --- a/scripts/examples/example_creature.cpp +++ b/scripts/examples/example_creature.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/examples/example_escort.cpp b/scripts/examples/example_escort.cpp index 5cbc7db29..4153366e5 100644 --- a/scripts/examples/example_escort.cpp +++ b/scripts/examples/example_escort.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/examples/example_gossip_codebox.cpp b/scripts/examples/example_gossip_codebox.cpp index 70bc83852..5b6e55a93 100644 --- a/scripts/examples/example_gossip_codebox.cpp +++ b/scripts/examples/example_gossip_codebox.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/examples/example_misc.cpp b/scripts/examples/example_misc.cpp index 097dd0255..e9bd36723 100644 --- a/scripts/examples/example_misc.cpp +++ b/scripts/examples/example_misc.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/kalimdor/ashenvale.cpp b/scripts/kalimdor/ashenvale.cpp index 0df11c755..f0cbe4a13 100644 --- a/scripts/kalimdor/ashenvale.cpp +++ b/scripts/kalimdor/ashenvale.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/kalimdor/azshara.cpp b/scripts/kalimdor/azshara.cpp index 537afe525..72d8d2788 100644 --- a/scripts/kalimdor/azshara.cpp +++ b/scripts/kalimdor/azshara.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/kalimdor/azuremyst_isle.cpp b/scripts/kalimdor/azuremyst_isle.cpp index 576b38b0f..9e82fdfd6 100644 --- a/scripts/kalimdor/azuremyst_isle.cpp +++ b/scripts/kalimdor/azuremyst_isle.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/kalimdor/blackfathom_deeps/blackfathom_deeps.h b/scripts/kalimdor/blackfathom_deeps/blackfathom_deeps.h index 11c9e7343..e316c5812 100644 --- a/scripts/kalimdor/blackfathom_deeps/blackfathom_deeps.h +++ b/scripts/kalimdor/blackfathom_deeps/blackfathom_deeps.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/kalimdor/blackfathom_deeps/instance_blackfathom_deeps.cpp b/scripts/kalimdor/blackfathom_deeps/instance_blackfathom_deeps.cpp index c2aa3c564..d017e66fd 100644 --- a/scripts/kalimdor/blackfathom_deeps/instance_blackfathom_deeps.cpp +++ b/scripts/kalimdor/blackfathom_deeps/instance_blackfathom_deeps.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/kalimdor/bloodmyst_isle.cpp b/scripts/kalimdor/bloodmyst_isle.cpp index 898f401bc..0f7aa6e1d 100644 --- a/scripts/kalimdor/bloodmyst_isle.cpp +++ b/scripts/kalimdor/bloodmyst_isle.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/kalimdor/boss_azuregos.cpp b/scripts/kalimdor/boss_azuregos.cpp index f72d87352..a792c814a 100644 --- a/scripts/kalimdor/boss_azuregos.cpp +++ b/scripts/kalimdor/boss_azuregos.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.cpp b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.cpp index bb36c1de1..eba264466 100644 --- a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.cpp +++ b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.h b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.h index 18e69c5a6..2ae85651b 100644 --- a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.h +++ b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/instance_culling_of_stratholme.cpp b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/instance_culling_of_stratholme.cpp index 32e8fbda2..68694ec3c 100644 --- a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/instance_culling_of_stratholme.cpp +++ b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/instance_culling_of_stratholme.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/kalimdor/caverns_of_time/dark_portal/boss_aeonus.cpp b/scripts/kalimdor/caverns_of_time/dark_portal/boss_aeonus.cpp index 1292f7e33..2344df28a 100644 --- a/scripts/kalimdor/caverns_of_time/dark_portal/boss_aeonus.cpp +++ b/scripts/kalimdor/caverns_of_time/dark_portal/boss_aeonus.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/kalimdor/caverns_of_time/dark_portal/boss_chrono_lord_deja.cpp b/scripts/kalimdor/caverns_of_time/dark_portal/boss_chrono_lord_deja.cpp index dae68399b..7e0248a95 100644 --- a/scripts/kalimdor/caverns_of_time/dark_portal/boss_chrono_lord_deja.cpp +++ b/scripts/kalimdor/caverns_of_time/dark_portal/boss_chrono_lord_deja.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/kalimdor/caverns_of_time/dark_portal/boss_temporus.cpp b/scripts/kalimdor/caverns_of_time/dark_portal/boss_temporus.cpp index 1bba00fe6..84927d622 100644 --- a/scripts/kalimdor/caverns_of_time/dark_portal/boss_temporus.cpp +++ b/scripts/kalimdor/caverns_of_time/dark_portal/boss_temporus.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.cpp b/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.cpp index d5287ec35..1677639e7 100644 --- a/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.cpp +++ b/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.h b/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.h index 59dacc508..afcddd3f0 100644 --- a/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.h +++ b/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/kalimdor/caverns_of_time/dark_portal/instance_dark_portal.cpp b/scripts/kalimdor/caverns_of_time/dark_portal/instance_dark_portal.cpp index 9faa74d74..af0dbecdf 100644 --- a/scripts/kalimdor/caverns_of_time/dark_portal/instance_dark_portal.cpp +++ b/scripts/kalimdor/caverns_of_time/dark_portal/instance_dark_portal.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/kalimdor/caverns_of_time/hyjal/boss_archimonde.cpp b/scripts/kalimdor/caverns_of_time/hyjal/boss_archimonde.cpp index 2dcc76bfd..4d8257d4b 100644 --- a/scripts/kalimdor/caverns_of_time/hyjal/boss_archimonde.cpp +++ b/scripts/kalimdor/caverns_of_time/hyjal/boss_archimonde.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/kalimdor/caverns_of_time/hyjal/hyjal.cpp b/scripts/kalimdor/caverns_of_time/hyjal/hyjal.cpp index 29f6b7d7b..f65823a69 100644 --- a/scripts/kalimdor/caverns_of_time/hyjal/hyjal.cpp +++ b/scripts/kalimdor/caverns_of_time/hyjal/hyjal.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/kalimdor/caverns_of_time/hyjal/hyjal.h b/scripts/kalimdor/caverns_of_time/hyjal/hyjal.h index 9f4672fb0..dc6d933aa 100644 --- a/scripts/kalimdor/caverns_of_time/hyjal/hyjal.h +++ b/scripts/kalimdor/caverns_of_time/hyjal/hyjal.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.cpp b/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.cpp index e75aaf065..c43ea996c 100644 --- a/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.cpp +++ b/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.h b/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.h index 86f5172c4..538d033b3 100644 --- a/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.h +++ b/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/kalimdor/caverns_of_time/hyjal/instance_hyjal.cpp b/scripts/kalimdor/caverns_of_time/hyjal/instance_hyjal.cpp index acd64064c..45b976aef 100644 --- a/scripts/kalimdor/caverns_of_time/hyjal/instance_hyjal.cpp +++ b/scripts/kalimdor/caverns_of_time/hyjal/instance_hyjal.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/kalimdor/caverns_of_time/old_hillsbrad/boss_captain_skarloc.cpp b/scripts/kalimdor/caverns_of_time/old_hillsbrad/boss_captain_skarloc.cpp index 2d78c3604..cafed2178 100644 --- a/scripts/kalimdor/caverns_of_time/old_hillsbrad/boss_captain_skarloc.cpp +++ b/scripts/kalimdor/caverns_of_time/old_hillsbrad/boss_captain_skarloc.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/kalimdor/caverns_of_time/old_hillsbrad/boss_epoch_hunter.cpp b/scripts/kalimdor/caverns_of_time/old_hillsbrad/boss_epoch_hunter.cpp index 1c8714af9..b97cd6282 100644 --- a/scripts/kalimdor/caverns_of_time/old_hillsbrad/boss_epoch_hunter.cpp +++ b/scripts/kalimdor/caverns_of_time/old_hillsbrad/boss_epoch_hunter.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/kalimdor/caverns_of_time/old_hillsbrad/boss_leutenant_drake.cpp b/scripts/kalimdor/caverns_of_time/old_hillsbrad/boss_leutenant_drake.cpp index ef62d9df7..b0d78db4f 100644 --- a/scripts/kalimdor/caverns_of_time/old_hillsbrad/boss_leutenant_drake.cpp +++ b/scripts/kalimdor/caverns_of_time/old_hillsbrad/boss_leutenant_drake.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/kalimdor/caverns_of_time/old_hillsbrad/instance_old_hillsbrad.cpp b/scripts/kalimdor/caverns_of_time/old_hillsbrad/instance_old_hillsbrad.cpp index 9b3d02036..5a4d76207 100644 --- a/scripts/kalimdor/caverns_of_time/old_hillsbrad/instance_old_hillsbrad.cpp +++ b/scripts/kalimdor/caverns_of_time/old_hillsbrad/instance_old_hillsbrad.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.cpp b/scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.cpp index 9c1c7baf9..bb6be5ffd 100644 --- a/scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.cpp +++ b/scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.h b/scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.h index dbc2a27eb..59a3b2862 100644 --- a/scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.h +++ b/scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/kalimdor/darkshore.cpp b/scripts/kalimdor/darkshore.cpp index 7fe738853..ca6a33d09 100644 --- a/scripts/kalimdor/darkshore.cpp +++ b/scripts/kalimdor/darkshore.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/kalimdor/desolace.cpp b/scripts/kalimdor/desolace.cpp index e099e3a03..e151a0a67 100644 --- a/scripts/kalimdor/desolace.cpp +++ b/scripts/kalimdor/desolace.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/kalimdor/dire_maul/dire_maul.cpp b/scripts/kalimdor/dire_maul/dire_maul.cpp index da85cd70a..9f7a5b961 100644 --- a/scripts/kalimdor/dire_maul/dire_maul.cpp +++ b/scripts/kalimdor/dire_maul/dire_maul.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/kalimdor/dire_maul/dire_maul.h b/scripts/kalimdor/dire_maul/dire_maul.h index ae3ac41ec..82041d84f 100644 --- a/scripts/kalimdor/dire_maul/dire_maul.h +++ b/scripts/kalimdor/dire_maul/dire_maul.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/kalimdor/dire_maul/instance_dire_maul.cpp b/scripts/kalimdor/dire_maul/instance_dire_maul.cpp index 23e48cbbd..f46ec2993 100644 --- a/scripts/kalimdor/dire_maul/instance_dire_maul.cpp +++ b/scripts/kalimdor/dire_maul/instance_dire_maul.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/kalimdor/dustwallow_marsh.cpp b/scripts/kalimdor/dustwallow_marsh.cpp index aedc243c8..e1b986406 100644 --- a/scripts/kalimdor/dustwallow_marsh.cpp +++ b/scripts/kalimdor/dustwallow_marsh.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/kalimdor/felwood.cpp b/scripts/kalimdor/felwood.cpp index e6478217f..e4f9e7060 100644 --- a/scripts/kalimdor/felwood.cpp +++ b/scripts/kalimdor/felwood.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/kalimdor/feralas.cpp b/scripts/kalimdor/feralas.cpp index 98bf3a169..cf95c078c 100644 --- a/scripts/kalimdor/feralas.cpp +++ b/scripts/kalimdor/feralas.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/kalimdor/maraudon/boss_celebras_the_cursed.cpp b/scripts/kalimdor/maraudon/boss_celebras_the_cursed.cpp index e253779d9..b2238b811 100644 --- a/scripts/kalimdor/maraudon/boss_celebras_the_cursed.cpp +++ b/scripts/kalimdor/maraudon/boss_celebras_the_cursed.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/kalimdor/maraudon/boss_landslide.cpp b/scripts/kalimdor/maraudon/boss_landslide.cpp index 80e8f0ecb..47bf75dd8 100644 --- a/scripts/kalimdor/maraudon/boss_landslide.cpp +++ b/scripts/kalimdor/maraudon/boss_landslide.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/kalimdor/maraudon/boss_noxxion.cpp b/scripts/kalimdor/maraudon/boss_noxxion.cpp index 684ab546d..42e52fc3f 100644 --- a/scripts/kalimdor/maraudon/boss_noxxion.cpp +++ b/scripts/kalimdor/maraudon/boss_noxxion.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/kalimdor/maraudon/boss_princess_theradras.cpp b/scripts/kalimdor/maraudon/boss_princess_theradras.cpp index 2d75f5bac..3119cac74 100644 --- a/scripts/kalimdor/maraudon/boss_princess_theradras.cpp +++ b/scripts/kalimdor/maraudon/boss_princess_theradras.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/kalimdor/moonglade.cpp b/scripts/kalimdor/moonglade.cpp index ba1fde1ae..3ccf1e020 100644 --- a/scripts/kalimdor/moonglade.cpp +++ b/scripts/kalimdor/moonglade.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/kalimdor/mulgore.cpp b/scripts/kalimdor/mulgore.cpp index 7b436fbd3..5de540d54 100644 --- a/scripts/kalimdor/mulgore.cpp +++ b/scripts/kalimdor/mulgore.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/kalimdor/onyxias_lair/boss_onyxia.cpp b/scripts/kalimdor/onyxias_lair/boss_onyxia.cpp index 8a3673a85..a7f776738 100644 --- a/scripts/kalimdor/onyxias_lair/boss_onyxia.cpp +++ b/scripts/kalimdor/onyxias_lair/boss_onyxia.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/kalimdor/onyxias_lair/instance_onyxias_lair.cpp b/scripts/kalimdor/onyxias_lair/instance_onyxias_lair.cpp index cec7e972c..6772476b5 100644 --- a/scripts/kalimdor/onyxias_lair/instance_onyxias_lair.cpp +++ b/scripts/kalimdor/onyxias_lair/instance_onyxias_lair.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/kalimdor/onyxias_lair/onyxias_lair.h b/scripts/kalimdor/onyxias_lair/onyxias_lair.h index f869ca954..4ecbd7c91 100644 --- a/scripts/kalimdor/onyxias_lair/onyxias_lair.h +++ b/scripts/kalimdor/onyxias_lair/onyxias_lair.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/kalimdor/orgrimmar.cpp b/scripts/kalimdor/orgrimmar.cpp index 001e0a479..e87cb84cb 100644 --- a/scripts/kalimdor/orgrimmar.cpp +++ b/scripts/kalimdor/orgrimmar.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/kalimdor/razorfen_downs/boss_amnennar_the_coldbringer.cpp b/scripts/kalimdor/razorfen_downs/boss_amnennar_the_coldbringer.cpp index 2455bf240..2aef7d045 100644 --- a/scripts/kalimdor/razorfen_downs/boss_amnennar_the_coldbringer.cpp +++ b/scripts/kalimdor/razorfen_downs/boss_amnennar_the_coldbringer.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/kalimdor/razorfen_downs/razorfen_downs.cpp b/scripts/kalimdor/razorfen_downs/razorfen_downs.cpp index 7b7f17138..a96ce881d 100644 --- a/scripts/kalimdor/razorfen_downs/razorfen_downs.cpp +++ b/scripts/kalimdor/razorfen_downs/razorfen_downs.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/kalimdor/razorfen_kraul/instance_razorfen_kraul.cpp b/scripts/kalimdor/razorfen_kraul/instance_razorfen_kraul.cpp index db0f57797..7e6f4395c 100644 --- a/scripts/kalimdor/razorfen_kraul/instance_razorfen_kraul.cpp +++ b/scripts/kalimdor/razorfen_kraul/instance_razorfen_kraul.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/kalimdor/razorfen_kraul/razorfen_kraul.cpp b/scripts/kalimdor/razorfen_kraul/razorfen_kraul.cpp index ad53ab1ed..a1a634d6b 100644 --- a/scripts/kalimdor/razorfen_kraul/razorfen_kraul.cpp +++ b/scripts/kalimdor/razorfen_kraul/razorfen_kraul.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/kalimdor/razorfen_kraul/razorfen_kraul.h b/scripts/kalimdor/razorfen_kraul/razorfen_kraul.h index 10cd21fe7..613bb3258 100644 --- a/scripts/kalimdor/razorfen_kraul/razorfen_kraul.h +++ b/scripts/kalimdor/razorfen_kraul/razorfen_kraul.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/kalimdor/ruins_of_ahnqiraj/boss_ayamiss.cpp b/scripts/kalimdor/ruins_of_ahnqiraj/boss_ayamiss.cpp index 4988ee00b..4cd4a19ba 100644 --- a/scripts/kalimdor/ruins_of_ahnqiraj/boss_ayamiss.cpp +++ b/scripts/kalimdor/ruins_of_ahnqiraj/boss_ayamiss.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/kalimdor/ruins_of_ahnqiraj/boss_buru.cpp b/scripts/kalimdor/ruins_of_ahnqiraj/boss_buru.cpp index fc298990d..5e8f5ce3d 100644 --- a/scripts/kalimdor/ruins_of_ahnqiraj/boss_buru.cpp +++ b/scripts/kalimdor/ruins_of_ahnqiraj/boss_buru.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/kalimdor/ruins_of_ahnqiraj/boss_kurinnaxx.cpp b/scripts/kalimdor/ruins_of_ahnqiraj/boss_kurinnaxx.cpp index 084fc797a..336deb1ce 100644 --- a/scripts/kalimdor/ruins_of_ahnqiraj/boss_kurinnaxx.cpp +++ b/scripts/kalimdor/ruins_of_ahnqiraj/boss_kurinnaxx.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/kalimdor/ruins_of_ahnqiraj/boss_moam.cpp b/scripts/kalimdor/ruins_of_ahnqiraj/boss_moam.cpp index c50fc1ec7..858b332b3 100644 --- a/scripts/kalimdor/ruins_of_ahnqiraj/boss_moam.cpp +++ b/scripts/kalimdor/ruins_of_ahnqiraj/boss_moam.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/kalimdor/ruins_of_ahnqiraj/boss_ossirian.cpp b/scripts/kalimdor/ruins_of_ahnqiraj/boss_ossirian.cpp index 726e2b67c..d61e91d8e 100644 --- a/scripts/kalimdor/ruins_of_ahnqiraj/boss_ossirian.cpp +++ b/scripts/kalimdor/ruins_of_ahnqiraj/boss_ossirian.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/kalimdor/ruins_of_ahnqiraj/boss_rajaxx.cpp b/scripts/kalimdor/ruins_of_ahnqiraj/boss_rajaxx.cpp index 98ca3a0dd..a68ab798e 100644 --- a/scripts/kalimdor/ruins_of_ahnqiraj/boss_rajaxx.cpp +++ b/scripts/kalimdor/ruins_of_ahnqiraj/boss_rajaxx.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/kalimdor/ruins_of_ahnqiraj/instance_ruins_of_ahnqiraj.cpp b/scripts/kalimdor/ruins_of_ahnqiraj/instance_ruins_of_ahnqiraj.cpp index 14edaf981..6ff42daf2 100644 --- a/scripts/kalimdor/ruins_of_ahnqiraj/instance_ruins_of_ahnqiraj.cpp +++ b/scripts/kalimdor/ruins_of_ahnqiraj/instance_ruins_of_ahnqiraj.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/kalimdor/ruins_of_ahnqiraj/ruins_of_ahnqiraj.cpp b/scripts/kalimdor/ruins_of_ahnqiraj/ruins_of_ahnqiraj.cpp index 323f42331..9cb970517 100644 --- a/scripts/kalimdor/ruins_of_ahnqiraj/ruins_of_ahnqiraj.cpp +++ b/scripts/kalimdor/ruins_of_ahnqiraj/ruins_of_ahnqiraj.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/kalimdor/ruins_of_ahnqiraj/ruins_of_ahnqiraj.h b/scripts/kalimdor/ruins_of_ahnqiraj/ruins_of_ahnqiraj.h index f5b1ec712..fc7561ed7 100644 --- a/scripts/kalimdor/ruins_of_ahnqiraj/ruins_of_ahnqiraj.h +++ b/scripts/kalimdor/ruins_of_ahnqiraj/ruins_of_ahnqiraj.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/kalimdor/silithus.cpp b/scripts/kalimdor/silithus.cpp index 8df63629a..576e6dad1 100644 --- a/scripts/kalimdor/silithus.cpp +++ b/scripts/kalimdor/silithus.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/kalimdor/stonetalon_mountains.cpp b/scripts/kalimdor/stonetalon_mountains.cpp index 72bd1c962..a5411906c 100644 --- a/scripts/kalimdor/stonetalon_mountains.cpp +++ b/scripts/kalimdor/stonetalon_mountains.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/kalimdor/tanaris.cpp b/scripts/kalimdor/tanaris.cpp index 2ca63ec3e..943b0ab54 100644 --- a/scripts/kalimdor/tanaris.cpp +++ b/scripts/kalimdor/tanaris.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/kalimdor/teldrassil.cpp b/scripts/kalimdor/teldrassil.cpp index 1802e33a6..8d749a0ea 100644 --- a/scripts/kalimdor/teldrassil.cpp +++ b/scripts/kalimdor/teldrassil.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_bug_trio.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_bug_trio.cpp index 5b3977558..78ac9317f 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/boss_bug_trio.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_bug_trio.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_cthun.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_cthun.cpp index a7c6af4a5..c43285366 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/boss_cthun.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_cthun.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_fankriss.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_fankriss.cpp index 9350afeed..b5fa403bf 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/boss_fankriss.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_fankriss.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_huhuran.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_huhuran.cpp index df0ba7eec..acf93d93c 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/boss_huhuran.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_huhuran.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_ouro.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_ouro.cpp index 7d180577f..e47e2818a 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/boss_ouro.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_ouro.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_sartura.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_sartura.cpp index 5ee2b3e40..5db20677d 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/boss_sartura.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_sartura.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_skeram.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_skeram.cpp index 7afa5676f..924677068 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/boss_skeram.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_skeram.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_twinemperors.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_twinemperors.cpp index 4c285d271..f0c2a3167 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/boss_twinemperors.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_twinemperors.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_viscidus.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_viscidus.cpp index bf91125fb..70fded3c8 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/boss_viscidus.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_viscidus.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/kalimdor/temple_of_ahnqiraj/instance_temple_of_ahnqiraj.cpp b/scripts/kalimdor/temple_of_ahnqiraj/instance_temple_of_ahnqiraj.cpp index dc84eaf21..2e60bec95 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/instance_temple_of_ahnqiraj.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/instance_temple_of_ahnqiraj.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/kalimdor/temple_of_ahnqiraj/mob_anubisath_sentinel.cpp b/scripts/kalimdor/temple_of_ahnqiraj/mob_anubisath_sentinel.cpp index 400fba209..db5b570ee 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/mob_anubisath_sentinel.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/mob_anubisath_sentinel.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/kalimdor/temple_of_ahnqiraj/temple_of_ahnqiraj.h b/scripts/kalimdor/temple_of_ahnqiraj/temple_of_ahnqiraj.h index 577ed8dbd..c89b53b56 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/temple_of_ahnqiraj.h +++ b/scripts/kalimdor/temple_of_ahnqiraj/temple_of_ahnqiraj.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/kalimdor/the_barrens.cpp b/scripts/kalimdor/the_barrens.cpp index e2ff615c1..06b2ea169 100644 --- a/scripts/kalimdor/the_barrens.cpp +++ b/scripts/kalimdor/the_barrens.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/kalimdor/thousand_needles.cpp b/scripts/kalimdor/thousand_needles.cpp index 03045ed5e..fbec5d523 100644 --- a/scripts/kalimdor/thousand_needles.cpp +++ b/scripts/kalimdor/thousand_needles.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 @@ -119,7 +119,7 @@ enum float m_afBanditLoc[6][6]= { {-4905.479492f, -2062.732666f, 84.352f}, - {-4915.201172f, -2073.528320f, 84.733f}, + {-4915.201272f, -2073.528320f, 84.733f}, {-4878.883301f, -1986.947876f, 91.966f}, {-4877.503906f, -1966.113403f, 91.859f}, {-4767.985352f, -1873.169189f, 90.192f}, diff --git a/scripts/kalimdor/thunder_bluff.cpp b/scripts/kalimdor/thunder_bluff.cpp index baedbdacf..d23346963 100644 --- a/scripts/kalimdor/thunder_bluff.cpp +++ b/scripts/kalimdor/thunder_bluff.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/kalimdor/ungoro_crater.cpp b/scripts/kalimdor/ungoro_crater.cpp index c88f39fef..aeefe27d7 100644 --- a/scripts/kalimdor/ungoro_crater.cpp +++ b/scripts/kalimdor/ungoro_crater.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/kalimdor/wailing_caverns/instance_wailing_caverns.cpp b/scripts/kalimdor/wailing_caverns/instance_wailing_caverns.cpp index c81cc1451..32a42c871 100644 --- a/scripts/kalimdor/wailing_caverns/instance_wailing_caverns.cpp +++ b/scripts/kalimdor/wailing_caverns/instance_wailing_caverns.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/kalimdor/wailing_caverns/wailing_caverns.cpp b/scripts/kalimdor/wailing_caverns/wailing_caverns.cpp index abdbbf6b9..a75952e0d 100644 --- a/scripts/kalimdor/wailing_caverns/wailing_caverns.cpp +++ b/scripts/kalimdor/wailing_caverns/wailing_caverns.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/kalimdor/wailing_caverns/wailing_caverns.h b/scripts/kalimdor/wailing_caverns/wailing_caverns.h index 067ff0827..cba79b3ed 100644 --- a/scripts/kalimdor/wailing_caverns/wailing_caverns.h +++ b/scripts/kalimdor/wailing_caverns/wailing_caverns.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/kalimdor/winterspring.cpp b/scripts/kalimdor/winterspring.cpp index e4c35c769..f690d2d4a 100644 --- a/scripts/kalimdor/winterspring.cpp +++ b/scripts/kalimdor/winterspring.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/kalimdor/zulfarrak/boss_zumrah.cpp b/scripts/kalimdor/zulfarrak/boss_zumrah.cpp index 1fecb127d..57de52393 100644 --- a/scripts/kalimdor/zulfarrak/boss_zumrah.cpp +++ b/scripts/kalimdor/zulfarrak/boss_zumrah.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/kalimdor/zulfarrak/instance_zulfarrak.cpp b/scripts/kalimdor/zulfarrak/instance_zulfarrak.cpp index 84b9b2532..c6f5f0b7a 100644 --- a/scripts/kalimdor/zulfarrak/instance_zulfarrak.cpp +++ b/scripts/kalimdor/zulfarrak/instance_zulfarrak.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/kalimdor/zulfarrak/zulfarrak.cpp b/scripts/kalimdor/zulfarrak/zulfarrak.cpp index 7d0b43c65..8df718594 100644 --- a/scripts/kalimdor/zulfarrak/zulfarrak.cpp +++ b/scripts/kalimdor/zulfarrak/zulfarrak.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/kalimdor/zulfarrak/zulfarrak.h b/scripts/kalimdor/zulfarrak/zulfarrak.h index 30c29683a..16c3454b5 100644 --- a/scripts/kalimdor/zulfarrak/zulfarrak.h +++ b/scripts/kalimdor/zulfarrak/zulfarrak.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/northrend/azjol-nerub/ahnkahet/ahnkahet.h b/scripts/northrend/azjol-nerub/ahnkahet/ahnkahet.h index 114e5355a..38cdbcf3c 100644 --- a/scripts/northrend/azjol-nerub/ahnkahet/ahnkahet.h +++ b/scripts/northrend/azjol-nerub/ahnkahet/ahnkahet.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/northrend/azjol-nerub/ahnkahet/boss_jedoga.cpp b/scripts/northrend/azjol-nerub/ahnkahet/boss_jedoga.cpp index 1211b8924..b4326918d 100644 --- a/scripts/northrend/azjol-nerub/ahnkahet/boss_jedoga.cpp +++ b/scripts/northrend/azjol-nerub/ahnkahet/boss_jedoga.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/northrend/azjol-nerub/ahnkahet/boss_nadox.cpp b/scripts/northrend/azjol-nerub/ahnkahet/boss_nadox.cpp index f026b944d..23e518e01 100644 --- a/scripts/northrend/azjol-nerub/ahnkahet/boss_nadox.cpp +++ b/scripts/northrend/azjol-nerub/ahnkahet/boss_nadox.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/northrend/azjol-nerub/ahnkahet/boss_taldaram.cpp b/scripts/northrend/azjol-nerub/ahnkahet/boss_taldaram.cpp index 54f9a8004..49bb951b5 100644 --- a/scripts/northrend/azjol-nerub/ahnkahet/boss_taldaram.cpp +++ b/scripts/northrend/azjol-nerub/ahnkahet/boss_taldaram.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/northrend/azjol-nerub/ahnkahet/boss_volazj.cpp b/scripts/northrend/azjol-nerub/ahnkahet/boss_volazj.cpp index 8cb277320..2bfdb21a3 100644 --- a/scripts/northrend/azjol-nerub/ahnkahet/boss_volazj.cpp +++ b/scripts/northrend/azjol-nerub/ahnkahet/boss_volazj.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/northrend/azjol-nerub/ahnkahet/instance_ahnkahet.cpp b/scripts/northrend/azjol-nerub/ahnkahet/instance_ahnkahet.cpp index 803645577..d48139732 100644 --- a/scripts/northrend/azjol-nerub/ahnkahet/instance_ahnkahet.cpp +++ b/scripts/northrend/azjol-nerub/ahnkahet/instance_ahnkahet.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/northrend/azjol-nerub/azjol-nerub/azjol-nerub.h b/scripts/northrend/azjol-nerub/azjol-nerub/azjol-nerub.h index 7d75103b7..1fc94a164 100644 --- a/scripts/northrend/azjol-nerub/azjol-nerub/azjol-nerub.h +++ b/scripts/northrend/azjol-nerub/azjol-nerub/azjol-nerub.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/northrend/azjol-nerub/azjol-nerub/boss_anubarak.cpp b/scripts/northrend/azjol-nerub/azjol-nerub/boss_anubarak.cpp index 66f61ccb8..8c29d374b 100644 --- a/scripts/northrend/azjol-nerub/azjol-nerub/boss_anubarak.cpp +++ b/scripts/northrend/azjol-nerub/azjol-nerub/boss_anubarak.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/northrend/azjol-nerub/azjol-nerub/boss_hadronox.cpp b/scripts/northrend/azjol-nerub/azjol-nerub/boss_hadronox.cpp index 58dc81302..a6c84e805 100644 --- a/scripts/northrend/azjol-nerub/azjol-nerub/boss_hadronox.cpp +++ b/scripts/northrend/azjol-nerub/azjol-nerub/boss_hadronox.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/northrend/azjol-nerub/azjol-nerub/boss_krikthir.cpp b/scripts/northrend/azjol-nerub/azjol-nerub/boss_krikthir.cpp index 275cb9a30..ede114568 100644 --- a/scripts/northrend/azjol-nerub/azjol-nerub/boss_krikthir.cpp +++ b/scripts/northrend/azjol-nerub/azjol-nerub/boss_krikthir.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/northrend/azjol-nerub/azjol-nerub/instance_azjol-nerub.cpp b/scripts/northrend/azjol-nerub/azjol-nerub/instance_azjol-nerub.cpp index 80faf8118..fdc43f81d 100644 --- a/scripts/northrend/azjol-nerub/azjol-nerub/instance_azjol-nerub.cpp +++ b/scripts/northrend/azjol-nerub/azjol-nerub/instance_azjol-nerub.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/northrend/borean_tundra.cpp b/scripts/northrend/borean_tundra.cpp index b0ad9c75d..f47c41dbe 100644 --- a/scripts/northrend/borean_tundra.cpp +++ b/scripts/northrend/borean_tundra.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_grand_champions.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_grand_champions.cpp index ebdd93b66..bd491f587 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_grand_champions.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_grand_champions.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/instance_trial_of_the_champion.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/instance_trial_of_the_champion.cpp index 9ba8fc4bb..3f03695c5 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/instance_trial_of_the_champion.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/instance_trial_of_the_champion.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.cpp index 50b8372cf..4bfe346c8 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.h b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.h index c849f86f5..39b55659b 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.h +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp index 0f2e496da..9db9b9118 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_faction_champions.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_faction_champions.cpp index 63b46a7bc..67f9078e4 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_faction_champions.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_faction_champions.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_jaraxxus.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_jaraxxus.cpp index 25558ee0b..22943c4af 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_jaraxxus.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_jaraxxus.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp index 82e7ffe71..9ced6842e 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp index 59b703116..ae5837009 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp index 5410798b0..998a60fa1 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp index 512553951..d0c2e1ff3 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h index 404c30282..9c8165d4a 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/northrend/dalaran.cpp b/scripts/northrend/dalaran.cpp index 528bdc3f7..1eb3e31d5 100644 --- a/scripts/northrend/dalaran.cpp +++ b/scripts/northrend/dalaran.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/northrend/dragonblight.cpp b/scripts/northrend/dragonblight.cpp index cb64b6638..a745f6776 100644 --- a/scripts/northrend/dragonblight.cpp +++ b/scripts/northrend/dragonblight.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/northrend/draktharon_keep/boss_novos.cpp b/scripts/northrend/draktharon_keep/boss_novos.cpp index 8860edc2c..1975cf7e1 100644 --- a/scripts/northrend/draktharon_keep/boss_novos.cpp +++ b/scripts/northrend/draktharon_keep/boss_novos.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/northrend/draktharon_keep/boss_tharonja.cpp b/scripts/northrend/draktharon_keep/boss_tharonja.cpp index fdcc9928e..61d9fca43 100644 --- a/scripts/northrend/draktharon_keep/boss_tharonja.cpp +++ b/scripts/northrend/draktharon_keep/boss_tharonja.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/northrend/draktharon_keep/boss_trollgore.cpp b/scripts/northrend/draktharon_keep/boss_trollgore.cpp index a54692477..d54cb8c4f 100644 --- a/scripts/northrend/draktharon_keep/boss_trollgore.cpp +++ b/scripts/northrend/draktharon_keep/boss_trollgore.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/northrend/draktharon_keep/draktharon_keep.h b/scripts/northrend/draktharon_keep/draktharon_keep.h index 8e924e348..5d302f533 100644 --- a/scripts/northrend/draktharon_keep/draktharon_keep.h +++ b/scripts/northrend/draktharon_keep/draktharon_keep.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/northrend/draktharon_keep/instance_draktharon_keep.cpp b/scripts/northrend/draktharon_keep/instance_draktharon_keep.cpp index 6781270bd..74a66ea91 100644 --- a/scripts/northrend/draktharon_keep/instance_draktharon_keep.cpp +++ b/scripts/northrend/draktharon_keep/instance_draktharon_keep.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/northrend/grizzly_hills.cpp b/scripts/northrend/grizzly_hills.cpp index 40edf127d..3be7c5f52 100644 --- a/scripts/northrend/grizzly_hills.cpp +++ b/scripts/northrend/grizzly_hills.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/northrend/gundrak/boss_colossus.cpp b/scripts/northrend/gundrak/boss_colossus.cpp index d5c8967aa..e3f2a82e2 100644 --- a/scripts/northrend/gundrak/boss_colossus.cpp +++ b/scripts/northrend/gundrak/boss_colossus.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/northrend/gundrak/boss_eck.cpp b/scripts/northrend/gundrak/boss_eck.cpp index 24728b333..e35219296 100644 --- a/scripts/northrend/gundrak/boss_eck.cpp +++ b/scripts/northrend/gundrak/boss_eck.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/northrend/gundrak/boss_galdarah.cpp b/scripts/northrend/gundrak/boss_galdarah.cpp index 847650fde..53f913b37 100644 --- a/scripts/northrend/gundrak/boss_galdarah.cpp +++ b/scripts/northrend/gundrak/boss_galdarah.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/northrend/gundrak/boss_moorabi.cpp b/scripts/northrend/gundrak/boss_moorabi.cpp index 25b8e1f3c..a0c65b377 100644 --- a/scripts/northrend/gundrak/boss_moorabi.cpp +++ b/scripts/northrend/gundrak/boss_moorabi.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/northrend/gundrak/boss_sladran.cpp b/scripts/northrend/gundrak/boss_sladran.cpp index fcd109b4a..bf5dbeda5 100644 --- a/scripts/northrend/gundrak/boss_sladran.cpp +++ b/scripts/northrend/gundrak/boss_sladran.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/northrend/gundrak/gundrak.h b/scripts/northrend/gundrak/gundrak.h index 65d4d3a2d..b957c4f0f 100644 --- a/scripts/northrend/gundrak/gundrak.h +++ b/scripts/northrend/gundrak/gundrak.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/northrend/gundrak/instance_gundrak.cpp b/scripts/northrend/gundrak/instance_gundrak.cpp index 1f2e93d8a..6081b706b 100644 --- a/scripts/northrend/gundrak/instance_gundrak.cpp +++ b/scripts/northrend/gundrak/instance_gundrak.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/northrend/howling_fjord.cpp b/scripts/northrend/howling_fjord.cpp index 1ffc6a07b..bdf5c858b 100644 --- a/scripts/northrend/howling_fjord.cpp +++ b/scripts/northrend/howling_fjord.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/northrend/icecrown.cpp b/scripts/northrend/icecrown.cpp index e5e214d62..258ba7108 100644 --- a/scripts/northrend/icecrown.cpp +++ b/scripts/northrend/icecrown.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_bronjahm.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_bronjahm.cpp index 2e1c55ffb..f059e674e 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_bronjahm.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_bronjahm.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_devourer_of_souls.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_devourer_of_souls.cpp index be6838e71..24c0783e7 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_devourer_of_souls.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_devourer_of_souls.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 @@ -30,7 +30,7 @@ enum SAY_FEMALE_AGGRO = -1632008, SAY_MALE_1_SLAY_1 = -1632009, SAY_FEMALE_SLAY_1 = -1632010, - SAY_MALE_2_SLAY_1 = -1632011, + SAY_MALE_2_SLAY_1 = -1632012, SAY_MALE_1_SLAY_2 = -1632012, SAY_FEMALE_SLAY_2 = -1632013, SAY_MALE_2_SLAY_2 = -1632014, diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/forge_of_souls.h b/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/forge_of_souls.h index b3bada206..b2c309312 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/forge_of_souls.h +++ b/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/forge_of_souls.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/instance_forge_of_souls.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/instance_forge_of_souls.cpp index 2684e3d29..e49f1166c 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/instance_forge_of_souls.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/instance_forge_of_souls.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/boss_falric.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/boss_falric.cpp index fd465bf6f..396a7817b 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/boss_falric.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/boss_falric.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/boss_lich_king.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/boss_lich_king.cpp index b40e703ef..670f6ac9e 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/boss_lich_king.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/boss_lich_king.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/boss_marwyn.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/boss_marwyn.cpp index db7a8c5ee..b8d03004f 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/boss_marwyn.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/boss_marwyn.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/halls_of_reflection.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/halls_of_reflection.cpp index fba815521..0600b7873 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/halls_of_reflection.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/halls_of_reflection.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/halls_of_reflection.h b/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/halls_of_reflection.h index b254d65cd..5871a49a1 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/halls_of_reflection.h +++ b/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/halls_of_reflection.h @@ -1,3 +1,3 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/instance_halls_of_reflection.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/instance_halls_of_reflection.cpp index 59cfa0952..05e0621d5 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/instance_halls_of_reflection.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/instance_halls_of_reflection.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_forgemaster_garfrost.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_forgemaster_garfrost.cpp index 8ea59b4fd..c042caf2b 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_forgemaster_garfrost.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_forgemaster_garfrost.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_krick_and_ick.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_krick_and_ick.cpp index 390880623..0ef2ea4a1 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_krick_and_ick.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_krick_and_ick.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_scourgelord_tyrannus.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_scourgelord_tyrannus.cpp index 5f29eaacb..e83052f1e 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_scourgelord_tyrannus.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_scourgelord_tyrannus.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/instance_pit_of_saron.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/instance_pit_of_saron.cpp index 098455060..7a9ae4b48 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/instance_pit_of_saron.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/instance_pit_of_saron.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/pit_of_saron.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/pit_of_saron.cpp index 07a1e817f..ff1e719bc 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/pit_of_saron.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/pit_of_saron.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/pit_of_saron.h b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/pit_of_saron.h index 8ab87c3db..27d3f3ce0 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/pit_of_saron.h +++ b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/pit_of_saron.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/blood_prince_council.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/blood_prince_council.cpp index d50f3eb04..1101ffe18 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/blood_prince_council.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/blood_prince_council.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_blood_queen_lanathel.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_blood_queen_lanathel.cpp index 55cbaed7b..a6c2d52e0 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_blood_queen_lanathel.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_blood_queen_lanathel.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp index 004d9d7e0..0390debdb 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_festergut.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_festergut.cpp index d0ce13034..70ec76748 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_festergut.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_festergut.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lady_deathwhisper.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lady_deathwhisper.cpp index 848329f6b..3fab148fa 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lady_deathwhisper.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lady_deathwhisper.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp index 2624cc5b0..5fb503d98 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_professor_putricide.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_professor_putricide.cpp index a6a2adfa4..a225f0885 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_professor_putricide.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_professor_putricide.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_rotface.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_rotface.cpp index f2e51e5b5..bfab41b7d 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_rotface.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_rotface.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp index 4b68903fc..26cbded0e 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_the_lich_king.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_the_lich_king.cpp index 7a79d882f..a8a3a474e 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_the_lich_king.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_the_lich_king.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_valithria_dreamwalker.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_valithria_dreamwalker.cpp index d4cbef9c0..e7f734625 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_valithria_dreamwalker.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_valithria_dreamwalker.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/gunship_battle.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/gunship_battle.cpp index 575e43539..67a1ce34a 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/gunship_battle.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/gunship_battle.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_citadel.h b/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_citadel.h index b254d65cd..5871a49a1 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_citadel.h +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_citadel.h @@ -1,3 +1,3 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_citadel.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_citadel.cpp index dbdb66ef1..a17aa1dc4 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_citadel.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_citadel.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/northrend/naxxramas/boss_anubrekhan.cpp b/scripts/northrend/naxxramas/boss_anubrekhan.cpp index 7c2924985..552baf457 100644 --- a/scripts/northrend/naxxramas/boss_anubrekhan.cpp +++ b/scripts/northrend/naxxramas/boss_anubrekhan.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/northrend/naxxramas/boss_faerlina.cpp b/scripts/northrend/naxxramas/boss_faerlina.cpp index a2f948021..e0ab9a6f2 100644 --- a/scripts/northrend/naxxramas/boss_faerlina.cpp +++ b/scripts/northrend/naxxramas/boss_faerlina.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/northrend/naxxramas/boss_four_horsemen.cpp b/scripts/northrend/naxxramas/boss_four_horsemen.cpp index 6ece1b314..e87301195 100644 --- a/scripts/northrend/naxxramas/boss_four_horsemen.cpp +++ b/scripts/northrend/naxxramas/boss_four_horsemen.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/northrend/naxxramas/boss_gluth.cpp b/scripts/northrend/naxxramas/boss_gluth.cpp index 809b163f8..996867f71 100644 --- a/scripts/northrend/naxxramas/boss_gluth.cpp +++ b/scripts/northrend/naxxramas/boss_gluth.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/northrend/naxxramas/boss_gothik.cpp b/scripts/northrend/naxxramas/boss_gothik.cpp index cdd672417..16c723dde 100644 --- a/scripts/northrend/naxxramas/boss_gothik.cpp +++ b/scripts/northrend/naxxramas/boss_gothik.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/northrend/naxxramas/boss_grobbulus.cpp b/scripts/northrend/naxxramas/boss_grobbulus.cpp index e64ddd814..5a72245f3 100644 --- a/scripts/northrend/naxxramas/boss_grobbulus.cpp +++ b/scripts/northrend/naxxramas/boss_grobbulus.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/northrend/naxxramas/boss_heigan.cpp b/scripts/northrend/naxxramas/boss_heigan.cpp index bb7176755..bd288b747 100644 --- a/scripts/northrend/naxxramas/boss_heigan.cpp +++ b/scripts/northrend/naxxramas/boss_heigan.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/northrend/naxxramas/boss_kelthuzad.cpp b/scripts/northrend/naxxramas/boss_kelthuzad.cpp index 0a0884204..b12432357 100644 --- a/scripts/northrend/naxxramas/boss_kelthuzad.cpp +++ b/scripts/northrend/naxxramas/boss_kelthuzad.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/northrend/naxxramas/boss_loatheb.cpp b/scripts/northrend/naxxramas/boss_loatheb.cpp index 18369bfaa..74aceb4fd 100644 --- a/scripts/northrend/naxxramas/boss_loatheb.cpp +++ b/scripts/northrend/naxxramas/boss_loatheb.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/northrend/naxxramas/boss_maexxna.cpp b/scripts/northrend/naxxramas/boss_maexxna.cpp index e1a51a9e3..3da2fc82b 100644 --- a/scripts/northrend/naxxramas/boss_maexxna.cpp +++ b/scripts/northrend/naxxramas/boss_maexxna.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/northrend/naxxramas/boss_noth.cpp b/scripts/northrend/naxxramas/boss_noth.cpp index e91438121..ceab11a0e 100644 --- a/scripts/northrend/naxxramas/boss_noth.cpp +++ b/scripts/northrend/naxxramas/boss_noth.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/northrend/naxxramas/boss_patchwerk.cpp b/scripts/northrend/naxxramas/boss_patchwerk.cpp index 95209b257..e9e84aa59 100644 --- a/scripts/northrend/naxxramas/boss_patchwerk.cpp +++ b/scripts/northrend/naxxramas/boss_patchwerk.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/northrend/naxxramas/boss_razuvious.cpp b/scripts/northrend/naxxramas/boss_razuvious.cpp index 54380c3de..1f22dad2f 100644 --- a/scripts/northrend/naxxramas/boss_razuvious.cpp +++ b/scripts/northrend/naxxramas/boss_razuvious.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/northrend/naxxramas/boss_sapphiron.cpp b/scripts/northrend/naxxramas/boss_sapphiron.cpp index 4a617e95b..502e17150 100644 --- a/scripts/northrend/naxxramas/boss_sapphiron.cpp +++ b/scripts/northrend/naxxramas/boss_sapphiron.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/northrend/naxxramas/boss_thaddius.cpp b/scripts/northrend/naxxramas/boss_thaddius.cpp index 4f08913e9..7e6cbeba6 100644 --- a/scripts/northrend/naxxramas/boss_thaddius.cpp +++ b/scripts/northrend/naxxramas/boss_thaddius.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/northrend/naxxramas/instance_naxxramas.cpp b/scripts/northrend/naxxramas/instance_naxxramas.cpp index 2c38e6f25..784a53a32 100644 --- a/scripts/northrend/naxxramas/instance_naxxramas.cpp +++ b/scripts/northrend/naxxramas/instance_naxxramas.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/northrend/naxxramas/naxxramas.h b/scripts/northrend/naxxramas/naxxramas.h index d9eecc3ae..6f54581b4 100644 --- a/scripts/northrend/naxxramas/naxxramas.h +++ b/scripts/northrend/naxxramas/naxxramas.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/northrend/nexus/eye_of_eternity/boss_malygos.cpp b/scripts/northrend/nexus/eye_of_eternity/boss_malygos.cpp index 00790bf7a..3a11c4b41 100644 --- a/scripts/northrend/nexus/eye_of_eternity/boss_malygos.cpp +++ b/scripts/northrend/nexus/eye_of_eternity/boss_malygos.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/northrend/nexus/nexus/boss_anomalus.cpp b/scripts/northrend/nexus/nexus/boss_anomalus.cpp index 05a9e1707..78db41a5f 100644 --- a/scripts/northrend/nexus/nexus/boss_anomalus.cpp +++ b/scripts/northrend/nexus/nexus/boss_anomalus.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/northrend/nexus/nexus/boss_keristrasza.cpp b/scripts/northrend/nexus/nexus/boss_keristrasza.cpp index b96834a97..a00f5be25 100644 --- a/scripts/northrend/nexus/nexus/boss_keristrasza.cpp +++ b/scripts/northrend/nexus/nexus/boss_keristrasza.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/northrend/nexus/nexus/boss_ormorok.cpp b/scripts/northrend/nexus/nexus/boss_ormorok.cpp index 5466a47e7..bd7e5bb21 100644 --- a/scripts/northrend/nexus/nexus/boss_ormorok.cpp +++ b/scripts/northrend/nexus/nexus/boss_ormorok.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/northrend/nexus/nexus/boss_telestra.cpp b/scripts/northrend/nexus/nexus/boss_telestra.cpp index 930e9d36b..673803580 100644 --- a/scripts/northrend/nexus/nexus/boss_telestra.cpp +++ b/scripts/northrend/nexus/nexus/boss_telestra.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/northrend/nexus/nexus/instance_nexus.cpp b/scripts/northrend/nexus/nexus/instance_nexus.cpp index 914c4f930..5f5a9cfc4 100644 --- a/scripts/northrend/nexus/nexus/instance_nexus.cpp +++ b/scripts/northrend/nexus/nexus/instance_nexus.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/northrend/nexus/nexus/nexus.h b/scripts/northrend/nexus/nexus/nexus.h index e82712d8e..4c46d0489 100644 --- a/scripts/northrend/nexus/nexus/nexus.h +++ b/scripts/northrend/nexus/nexus/nexus.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/northrend/obsidian_sanctum/boss_sartharion.cpp b/scripts/northrend/obsidian_sanctum/boss_sartharion.cpp index a6717be87..3e1d14e53 100644 --- a/scripts/northrend/obsidian_sanctum/boss_sartharion.cpp +++ b/scripts/northrend/obsidian_sanctum/boss_sartharion.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/northrend/obsidian_sanctum/instance_obsidian_sanctum.cpp b/scripts/northrend/obsidian_sanctum/instance_obsidian_sanctum.cpp index f2a388285..1138bbe8d 100644 --- a/scripts/northrend/obsidian_sanctum/instance_obsidian_sanctum.cpp +++ b/scripts/northrend/obsidian_sanctum/instance_obsidian_sanctum.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/northrend/obsidian_sanctum/obsidian_sanctum.h b/scripts/northrend/obsidian_sanctum/obsidian_sanctum.h index 1e5527a28..1c740bfe1 100644 --- a/scripts/northrend/obsidian_sanctum/obsidian_sanctum.h +++ b/scripts/northrend/obsidian_sanctum/obsidian_sanctum.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/northrend/ruby_sanctum/boss_baltharus.cpp b/scripts/northrend/ruby_sanctum/boss_baltharus.cpp index 551ee2e35..eb3b2d85c 100644 --- a/scripts/northrend/ruby_sanctum/boss_baltharus.cpp +++ b/scripts/northrend/ruby_sanctum/boss_baltharus.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/northrend/ruby_sanctum/boss_halion.cpp b/scripts/northrend/ruby_sanctum/boss_halion.cpp index bd5c824c7..878d9e211 100644 --- a/scripts/northrend/ruby_sanctum/boss_halion.cpp +++ b/scripts/northrend/ruby_sanctum/boss_halion.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/northrend/ruby_sanctum/boss_saviana.cpp b/scripts/northrend/ruby_sanctum/boss_saviana.cpp index c6679e020..fad2b283d 100644 --- a/scripts/northrend/ruby_sanctum/boss_saviana.cpp +++ b/scripts/northrend/ruby_sanctum/boss_saviana.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/northrend/ruby_sanctum/boss_zarithrian.cpp b/scripts/northrend/ruby_sanctum/boss_zarithrian.cpp index d0f01293a..ab1156362 100644 --- a/scripts/northrend/ruby_sanctum/boss_zarithrian.cpp +++ b/scripts/northrend/ruby_sanctum/boss_zarithrian.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/northrend/ruby_sanctum/instance_ruby_sanctum.cpp b/scripts/northrend/ruby_sanctum/instance_ruby_sanctum.cpp index e629e5bb8..4b9274f55 100644 --- a/scripts/northrend/ruby_sanctum/instance_ruby_sanctum.cpp +++ b/scripts/northrend/ruby_sanctum/instance_ruby_sanctum.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/northrend/ruby_sanctum/ruby_sanctum.h b/scripts/northrend/ruby_sanctum/ruby_sanctum.h index b254d65cd..5871a49a1 100644 --- a/scripts/northrend/ruby_sanctum/ruby_sanctum.h +++ b/scripts/northrend/ruby_sanctum/ruby_sanctum.h @@ -1,3 +1,3 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/northrend/sholazar_basin.cpp b/scripts/northrend/sholazar_basin.cpp index 208ee70d3..493b9cf3b 100644 --- a/scripts/northrend/sholazar_basin.cpp +++ b/scripts/northrend/sholazar_basin.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/northrend/storm_peaks.cpp b/scripts/northrend/storm_peaks.cpp index b4a560bd5..6689a0ce2 100644 --- a/scripts/northrend/storm_peaks.cpp +++ b/scripts/northrend/storm_peaks.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/northrend/ulduar/halls_of_lightning/boss_bjarngrim.cpp b/scripts/northrend/ulduar/halls_of_lightning/boss_bjarngrim.cpp index 76b6a3435..355ee8c5d 100644 --- a/scripts/northrend/ulduar/halls_of_lightning/boss_bjarngrim.cpp +++ b/scripts/northrend/ulduar/halls_of_lightning/boss_bjarngrim.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/northrend/ulduar/halls_of_lightning/boss_ionar.cpp b/scripts/northrend/ulduar/halls_of_lightning/boss_ionar.cpp index d97140b31..45077e141 100644 --- a/scripts/northrend/ulduar/halls_of_lightning/boss_ionar.cpp +++ b/scripts/northrend/ulduar/halls_of_lightning/boss_ionar.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 @@ -26,7 +26,7 @@ EndScriptData */ enum { - SAY_AGGRO = -1602011, + SAY_AGGRO = -1602012, SAY_SLAY_1 = -1602012, SAY_SLAY_2 = -1602013, SAY_SLAY_3 = -1602014, diff --git a/scripts/northrend/ulduar/halls_of_lightning/boss_loken.cpp b/scripts/northrend/ulduar/halls_of_lightning/boss_loken.cpp index 885c09c22..6f1ec2077 100644 --- a/scripts/northrend/ulduar/halls_of_lightning/boss_loken.cpp +++ b/scripts/northrend/ulduar/halls_of_lightning/boss_loken.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/northrend/ulduar/halls_of_lightning/boss_volkhan.cpp b/scripts/northrend/ulduar/halls_of_lightning/boss_volkhan.cpp index e64725a83..430e95ece 100644 --- a/scripts/northrend/ulduar/halls_of_lightning/boss_volkhan.cpp +++ b/scripts/northrend/ulduar/halls_of_lightning/boss_volkhan.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/northrend/ulduar/halls_of_lightning/halls_of_lightning.h b/scripts/northrend/ulduar/halls_of_lightning/halls_of_lightning.h index ba0fe82b3..075b4bae9 100644 --- a/scripts/northrend/ulduar/halls_of_lightning/halls_of_lightning.h +++ b/scripts/northrend/ulduar/halls_of_lightning/halls_of_lightning.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/northrend/ulduar/halls_of_lightning/instance_halls_of_lightning.cpp b/scripts/northrend/ulduar/halls_of_lightning/instance_halls_of_lightning.cpp index 989eeb9b2..ce55efc9a 100644 --- a/scripts/northrend/ulduar/halls_of_lightning/instance_halls_of_lightning.cpp +++ b/scripts/northrend/ulduar/halls_of_lightning/instance_halls_of_lightning.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/northrend/ulduar/halls_of_stone/boss_maiden_of_grief.cpp b/scripts/northrend/ulduar/halls_of_stone/boss_maiden_of_grief.cpp index 9a4a96d63..2c4b0ebb7 100644 --- a/scripts/northrend/ulduar/halls_of_stone/boss_maiden_of_grief.cpp +++ b/scripts/northrend/ulduar/halls_of_stone/boss_maiden_of_grief.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/northrend/ulduar/halls_of_stone/boss_sjonnir.cpp b/scripts/northrend/ulduar/halls_of_stone/boss_sjonnir.cpp index 4c0623ea3..1e0938085 100644 --- a/scripts/northrend/ulduar/halls_of_stone/boss_sjonnir.cpp +++ b/scripts/northrend/ulduar/halls_of_stone/boss_sjonnir.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.cpp b/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.cpp index 868f95a5f..37408b405 100644 --- a/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.cpp +++ b/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.h b/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.h index e9c5af25b..9190287b8 100644 --- a/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.h +++ b/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/northrend/ulduar/halls_of_stone/instance_halls_of_stone.cpp b/scripts/northrend/ulduar/halls_of_stone/instance_halls_of_stone.cpp index 5e5262637..6efe40952 100644 --- a/scripts/northrend/ulduar/halls_of_stone/instance_halls_of_stone.cpp +++ b/scripts/northrend/ulduar/halls_of_stone/instance_halls_of_stone.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/northrend/ulduar/ulduar/assembly_of_iron.cpp b/scripts/northrend/ulduar/ulduar/assembly_of_iron.cpp index 4c7f4f437..4445722d2 100644 --- a/scripts/northrend/ulduar/ulduar/assembly_of_iron.cpp +++ b/scripts/northrend/ulduar/ulduar/assembly_of_iron.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/northrend/ulduar/ulduar/boss_algalon.cpp b/scripts/northrend/ulduar/ulduar/boss_algalon.cpp index 0114469bb..d1ccfd97f 100644 --- a/scripts/northrend/ulduar/ulduar/boss_algalon.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_algalon.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/northrend/ulduar/ulduar/boss_auriaya.cpp b/scripts/northrend/ulduar/ulduar/boss_auriaya.cpp index 3673333a0..7c85b613d 100644 --- a/scripts/northrend/ulduar/ulduar/boss_auriaya.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_auriaya.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/northrend/ulduar/ulduar/boss_flame_leviathan.cpp b/scripts/northrend/ulduar/ulduar/boss_flame_leviathan.cpp index 84f2de079..520d467cb 100644 --- a/scripts/northrend/ulduar/ulduar/boss_flame_leviathan.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_flame_leviathan.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/northrend/ulduar/ulduar/boss_freya.cpp b/scripts/northrend/ulduar/ulduar/boss_freya.cpp index 45e48cd0f..b9d05399b 100644 --- a/scripts/northrend/ulduar/ulduar/boss_freya.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_freya.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/northrend/ulduar/ulduar/boss_general_vezax.cpp b/scripts/northrend/ulduar/ulduar/boss_general_vezax.cpp index f55f9fca3..95cbf9615 100644 --- a/scripts/northrend/ulduar/ulduar/boss_general_vezax.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_general_vezax.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/northrend/ulduar/ulduar/boss_hodir.cpp b/scripts/northrend/ulduar/ulduar/boss_hodir.cpp index 6c757fc6a..fe826b053 100644 --- a/scripts/northrend/ulduar/ulduar/boss_hodir.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_hodir.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/northrend/ulduar/ulduar/boss_ignis.cpp b/scripts/northrend/ulduar/ulduar/boss_ignis.cpp index 333c0ca08..172239919 100644 --- a/scripts/northrend/ulduar/ulduar/boss_ignis.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_ignis.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/northrend/ulduar/ulduar/boss_kologarn.cpp b/scripts/northrend/ulduar/ulduar/boss_kologarn.cpp index 7217c9af9..3dd3c6ece 100644 --- a/scripts/northrend/ulduar/ulduar/boss_kologarn.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_kologarn.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/northrend/ulduar/ulduar/boss_mimiron.cpp b/scripts/northrend/ulduar/ulduar/boss_mimiron.cpp index 5a59c3d15..db78f3f07 100644 --- a/scripts/northrend/ulduar/ulduar/boss_mimiron.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_mimiron.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/northrend/ulduar/ulduar/boss_razorscale.cpp b/scripts/northrend/ulduar/ulduar/boss_razorscale.cpp index 213534066..3303f7d1c 100644 --- a/scripts/northrend/ulduar/ulduar/boss_razorscale.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_razorscale.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/northrend/ulduar/ulduar/boss_thorim.cpp b/scripts/northrend/ulduar/ulduar/boss_thorim.cpp index 7773f514e..9e101a02e 100644 --- a/scripts/northrend/ulduar/ulduar/boss_thorim.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_thorim.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/northrend/ulduar/ulduar/boss_xt_002.cpp b/scripts/northrend/ulduar/ulduar/boss_xt_002.cpp index e86f93963..79c23242b 100644 --- a/scripts/northrend/ulduar/ulduar/boss_xt_002.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_xt_002.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/northrend/ulduar/ulduar/boss_yogg_saron.cpp b/scripts/northrend/ulduar/ulduar/boss_yogg_saron.cpp index f1c25659e..07219a9e9 100644 --- a/scripts/northrend/ulduar/ulduar/boss_yogg_saron.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_yogg_saron.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp index bef2d152b..2da6ae8c7 100644 --- a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp +++ b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/northrend/ulduar/ulduar/ulduar.cpp b/scripts/northrend/ulduar/ulduar/ulduar.cpp index 40ffa4b5b..d21f3996e 100644 --- a/scripts/northrend/ulduar/ulduar/ulduar.cpp +++ b/scripts/northrend/ulduar/ulduar/ulduar.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/northrend/ulduar/ulduar/ulduar.h b/scripts/northrend/ulduar/ulduar/ulduar.h index b030761f8..623d83cc4 100644 --- a/scripts/northrend/ulduar/ulduar/ulduar.h +++ b/scripts/northrend/ulduar/ulduar/ulduar.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/northrend/utgarde_keep/utgarde_keep/boss_ingvar.cpp b/scripts/northrend/utgarde_keep/utgarde_keep/boss_ingvar.cpp index 951f216be..c3abd600a 100644 --- a/scripts/northrend/utgarde_keep/utgarde_keep/boss_ingvar.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_keep/boss_ingvar.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/northrend/utgarde_keep/utgarde_keep/boss_keleseth.cpp b/scripts/northrend/utgarde_keep/utgarde_keep/boss_keleseth.cpp index e4db26d98..cf0644e26 100644 --- a/scripts/northrend/utgarde_keep/utgarde_keep/boss_keleseth.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_keep/boss_keleseth.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/northrend/utgarde_keep/utgarde_keep/boss_skarvald_and_dalronn.cpp b/scripts/northrend/utgarde_keep/utgarde_keep/boss_skarvald_and_dalronn.cpp index c70130662..0e6d63ac6 100644 --- a/scripts/northrend/utgarde_keep/utgarde_keep/boss_skarvald_and_dalronn.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_keep/boss_skarvald_and_dalronn.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/northrend/utgarde_keep/utgarde_keep/instance_utgarde_keep.cpp b/scripts/northrend/utgarde_keep/utgarde_keep/instance_utgarde_keep.cpp index 72c14ace2..fb86065b7 100644 --- a/scripts/northrend/utgarde_keep/utgarde_keep/instance_utgarde_keep.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_keep/instance_utgarde_keep.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/northrend/utgarde_keep/utgarde_keep/utgarde_keep.cpp b/scripts/northrend/utgarde_keep/utgarde_keep/utgarde_keep.cpp index 45274cd9f..f8d0753f8 100644 --- a/scripts/northrend/utgarde_keep/utgarde_keep/utgarde_keep.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_keep/utgarde_keep.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/northrend/utgarde_keep/utgarde_keep/utgarde_keep.h b/scripts/northrend/utgarde_keep/utgarde_keep/utgarde_keep.h index 4401019c8..c84919007 100644 --- a/scripts/northrend/utgarde_keep/utgarde_keep/utgarde_keep.h +++ b/scripts/northrend/utgarde_keep/utgarde_keep/utgarde_keep.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_gortok.cpp b/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_gortok.cpp index e47b12e4c..b5a559ac6 100644 --- a/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_gortok.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_gortok.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_skadi.cpp b/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_skadi.cpp index 89e284e12..63bb59401 100644 --- a/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_skadi.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_skadi.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_svala.cpp b/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_svala.cpp index 17ce98b9e..62308b0b4 100644 --- a/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_svala.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_svala.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_ymiron.cpp b/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_ymiron.cpp index 518ff19d8..184ef396c 100644 --- a/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_ymiron.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_ymiron.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/northrend/utgarde_keep/utgarde_pinnacle/instance_utgarde_pinnacle.cpp b/scripts/northrend/utgarde_keep/utgarde_pinnacle/instance_utgarde_pinnacle.cpp index 03527f02b..2efeb0d25 100644 --- a/scripts/northrend/utgarde_keep/utgarde_pinnacle/instance_utgarde_pinnacle.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_pinnacle/instance_utgarde_pinnacle.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/northrend/utgarde_keep/utgarde_pinnacle/utgarde_pinnacle.h b/scripts/northrend/utgarde_keep/utgarde_pinnacle/utgarde_pinnacle.h index ae70c7b25..05b9e5284 100644 --- a/scripts/northrend/utgarde_keep/utgarde_pinnacle/utgarde_pinnacle.h +++ b/scripts/northrend/utgarde_keep/utgarde_pinnacle/utgarde_pinnacle.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/northrend/vault_of_archavon/boss_archavon.cpp b/scripts/northrend/vault_of_archavon/boss_archavon.cpp index c974d9be0..1981760a3 100644 --- a/scripts/northrend/vault_of_archavon/boss_archavon.cpp +++ b/scripts/northrend/vault_of_archavon/boss_archavon.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/northrend/vault_of_archavon/boss_emalon.cpp b/scripts/northrend/vault_of_archavon/boss_emalon.cpp index 69c78143e..b2256e7f8 100644 --- a/scripts/northrend/vault_of_archavon/boss_emalon.cpp +++ b/scripts/northrend/vault_of_archavon/boss_emalon.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/northrend/vault_of_archavon/boss_koralon.cpp b/scripts/northrend/vault_of_archavon/boss_koralon.cpp index d1e73e49c..bb85eaf7a 100644 --- a/scripts/northrend/vault_of_archavon/boss_koralon.cpp +++ b/scripts/northrend/vault_of_archavon/boss_koralon.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/northrend/vault_of_archavon/boss_toravon.cpp b/scripts/northrend/vault_of_archavon/boss_toravon.cpp index f19ecba1c..442df58f9 100644 --- a/scripts/northrend/vault_of_archavon/boss_toravon.cpp +++ b/scripts/northrend/vault_of_archavon/boss_toravon.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/northrend/vault_of_archavon/instance_vault_of_archavon.cpp b/scripts/northrend/vault_of_archavon/instance_vault_of_archavon.cpp index 35307a912..4aca719bf 100644 --- a/scripts/northrend/vault_of_archavon/instance_vault_of_archavon.cpp +++ b/scripts/northrend/vault_of_archavon/instance_vault_of_archavon.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/northrend/vault_of_archavon/vault_of_archavon.h b/scripts/northrend/vault_of_archavon/vault_of_archavon.h index b254d65cd..5871a49a1 100644 --- a/scripts/northrend/vault_of_archavon/vault_of_archavon.h +++ b/scripts/northrend/vault_of_archavon/vault_of_archavon.h @@ -1,3 +1,3 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/northrend/violet_hold/boss_erekem.cpp b/scripts/northrend/violet_hold/boss_erekem.cpp index e28f441de..d017f4e94 100644 --- a/scripts/northrend/violet_hold/boss_erekem.cpp +++ b/scripts/northrend/violet_hold/boss_erekem.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/northrend/violet_hold/boss_ichoron.cpp b/scripts/northrend/violet_hold/boss_ichoron.cpp index ffb0d94a6..2811509b3 100644 --- a/scripts/northrend/violet_hold/boss_ichoron.cpp +++ b/scripts/northrend/violet_hold/boss_ichoron.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/northrend/violet_hold/instance_violet_hold.cpp b/scripts/northrend/violet_hold/instance_violet_hold.cpp index 342d362fc..2d83a08aa 100644 --- a/scripts/northrend/violet_hold/instance_violet_hold.cpp +++ b/scripts/northrend/violet_hold/instance_violet_hold.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/northrend/violet_hold/violet_hold.cpp b/scripts/northrend/violet_hold/violet_hold.cpp index 94415e43c..913cd9ae8 100644 --- a/scripts/northrend/violet_hold/violet_hold.cpp +++ b/scripts/northrend/violet_hold/violet_hold.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/northrend/violet_hold/violet_hold.h b/scripts/northrend/violet_hold/violet_hold.h index 14b584fb6..f68cdd380 100644 --- a/scripts/northrend/violet_hold/violet_hold.h +++ b/scripts/northrend/violet_hold/violet_hold.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/northrend/zuldrak.cpp b/scripts/northrend/zuldrak.cpp index db603fbf4..3ca38d13c 100644 --- a/scripts/northrend/zuldrak.cpp +++ b/scripts/northrend/zuldrak.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/outland/auchindoun/auchenai_crypts/boss_exarch_maladaar.cpp b/scripts/outland/auchindoun/auchenai_crypts/boss_exarch_maladaar.cpp index d8f99d675..d4cdb0645 100644 --- a/scripts/outland/auchindoun/auchenai_crypts/boss_exarch_maladaar.cpp +++ b/scripts/outland/auchindoun/auchenai_crypts/boss_exarch_maladaar.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/outland/auchindoun/auchenai_crypts/boss_shirrak.cpp b/scripts/outland/auchindoun/auchenai_crypts/boss_shirrak.cpp index 9f1c9242d..d6fd8cddc 100644 --- a/scripts/outland/auchindoun/auchenai_crypts/boss_shirrak.cpp +++ b/scripts/outland/auchindoun/auchenai_crypts/boss_shirrak.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/outland/auchindoun/mana_tombs/boss_nexusprince_shaffar.cpp b/scripts/outland/auchindoun/mana_tombs/boss_nexusprince_shaffar.cpp index f7b105739..a61a46f8f 100644 --- a/scripts/outland/auchindoun/mana_tombs/boss_nexusprince_shaffar.cpp +++ b/scripts/outland/auchindoun/mana_tombs/boss_nexusprince_shaffar.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/outland/auchindoun/mana_tombs/boss_pandemonius.cpp b/scripts/outland/auchindoun/mana_tombs/boss_pandemonius.cpp index 4f1d5ec76..5b7a65e25 100644 --- a/scripts/outland/auchindoun/mana_tombs/boss_pandemonius.cpp +++ b/scripts/outland/auchindoun/mana_tombs/boss_pandemonius.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/outland/auchindoun/sethekk_halls/boss_anzu.cpp b/scripts/outland/auchindoun/sethekk_halls/boss_anzu.cpp index 617218506..83298feee 100644 --- a/scripts/outland/auchindoun/sethekk_halls/boss_anzu.cpp +++ b/scripts/outland/auchindoun/sethekk_halls/boss_anzu.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/outland/auchindoun/sethekk_halls/boss_darkweaver_syth.cpp b/scripts/outland/auchindoun/sethekk_halls/boss_darkweaver_syth.cpp index b4509040c..9dafe8661 100644 --- a/scripts/outland/auchindoun/sethekk_halls/boss_darkweaver_syth.cpp +++ b/scripts/outland/auchindoun/sethekk_halls/boss_darkweaver_syth.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/outland/auchindoun/sethekk_halls/boss_talon_king_ikiss.cpp b/scripts/outland/auchindoun/sethekk_halls/boss_talon_king_ikiss.cpp index 2625b4bb5..9f50518df 100644 --- a/scripts/outland/auchindoun/sethekk_halls/boss_talon_king_ikiss.cpp +++ b/scripts/outland/auchindoun/sethekk_halls/boss_talon_king_ikiss.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/outland/auchindoun/sethekk_halls/instance_sethekk_halls.cpp b/scripts/outland/auchindoun/sethekk_halls/instance_sethekk_halls.cpp index 95b632700..95046d6fc 100644 --- a/scripts/outland/auchindoun/sethekk_halls/instance_sethekk_halls.cpp +++ b/scripts/outland/auchindoun/sethekk_halls/instance_sethekk_halls.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/outland/auchindoun/sethekk_halls/sethekk_halls.h b/scripts/outland/auchindoun/sethekk_halls/sethekk_halls.h index 12072d408..adf569412 100644 --- a/scripts/outland/auchindoun/sethekk_halls/sethekk_halls.h +++ b/scripts/outland/auchindoun/sethekk_halls/sethekk_halls.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/outland/auchindoun/shadow_labyrinth/boss_ambassador_hellmaw.cpp b/scripts/outland/auchindoun/shadow_labyrinth/boss_ambassador_hellmaw.cpp index c6b0fa4b9..cb5e1da22 100644 --- a/scripts/outland/auchindoun/shadow_labyrinth/boss_ambassador_hellmaw.cpp +++ b/scripts/outland/auchindoun/shadow_labyrinth/boss_ambassador_hellmaw.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/outland/auchindoun/shadow_labyrinth/boss_blackheart_the_inciter.cpp b/scripts/outland/auchindoun/shadow_labyrinth/boss_blackheart_the_inciter.cpp index f354fe9b4..540295399 100644 --- a/scripts/outland/auchindoun/shadow_labyrinth/boss_blackheart_the_inciter.cpp +++ b/scripts/outland/auchindoun/shadow_labyrinth/boss_blackheart_the_inciter.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/outland/auchindoun/shadow_labyrinth/boss_grandmaster_vorpil.cpp b/scripts/outland/auchindoun/shadow_labyrinth/boss_grandmaster_vorpil.cpp index 0d17d0994..174d0db9d 100644 --- a/scripts/outland/auchindoun/shadow_labyrinth/boss_grandmaster_vorpil.cpp +++ b/scripts/outland/auchindoun/shadow_labyrinth/boss_grandmaster_vorpil.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/outland/auchindoun/shadow_labyrinth/boss_murmur.cpp b/scripts/outland/auchindoun/shadow_labyrinth/boss_murmur.cpp index ccf5df726..66dc2a4ed 100644 --- a/scripts/outland/auchindoun/shadow_labyrinth/boss_murmur.cpp +++ b/scripts/outland/auchindoun/shadow_labyrinth/boss_murmur.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/outland/auchindoun/shadow_labyrinth/instance_shadow_labyrinth.cpp b/scripts/outland/auchindoun/shadow_labyrinth/instance_shadow_labyrinth.cpp index 42ff53cb8..7b079ef26 100644 --- a/scripts/outland/auchindoun/shadow_labyrinth/instance_shadow_labyrinth.cpp +++ b/scripts/outland/auchindoun/shadow_labyrinth/instance_shadow_labyrinth.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/outland/auchindoun/shadow_labyrinth/shadow_labyrinth.h b/scripts/outland/auchindoun/shadow_labyrinth/shadow_labyrinth.h index df674af4c..435ee00f1 100644 --- a/scripts/outland/auchindoun/shadow_labyrinth/shadow_labyrinth.h +++ b/scripts/outland/auchindoun/shadow_labyrinth/shadow_labyrinth.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/outland/black_temple/black_temple.cpp b/scripts/outland/black_temple/black_temple.cpp index 0fc36b1e6..3ee252500 100644 --- a/scripts/outland/black_temple/black_temple.cpp +++ b/scripts/outland/black_temple/black_temple.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/outland/black_temple/black_temple.h b/scripts/outland/black_temple/black_temple.h index 3ad7fac2c..85d9d988d 100644 --- a/scripts/outland/black_temple/black_temple.h +++ b/scripts/outland/black_temple/black_temple.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/outland/black_temple/boss_bloodboil.cpp b/scripts/outland/black_temple/boss_bloodboil.cpp index 2d7f6387b..35d4b7ebb 100644 --- a/scripts/outland/black_temple/boss_bloodboil.cpp +++ b/scripts/outland/black_temple/boss_bloodboil.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/outland/black_temple/boss_illidan.cpp b/scripts/outland/black_temple/boss_illidan.cpp index a94015b6f..895c60050 100644 --- a/scripts/outland/black_temple/boss_illidan.cpp +++ b/scripts/outland/black_temple/boss_illidan.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/outland/black_temple/boss_mother_shahraz.cpp b/scripts/outland/black_temple/boss_mother_shahraz.cpp index 2a9d74f84..cb93a835b 100644 --- a/scripts/outland/black_temple/boss_mother_shahraz.cpp +++ b/scripts/outland/black_temple/boss_mother_shahraz.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/outland/black_temple/boss_reliquary_of_souls.cpp b/scripts/outland/black_temple/boss_reliquary_of_souls.cpp index 151508b35..396209101 100644 --- a/scripts/outland/black_temple/boss_reliquary_of_souls.cpp +++ b/scripts/outland/black_temple/boss_reliquary_of_souls.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/outland/black_temple/boss_shade_of_akama.cpp b/scripts/outland/black_temple/boss_shade_of_akama.cpp index c23ad9745..c396d8d1c 100644 --- a/scripts/outland/black_temple/boss_shade_of_akama.cpp +++ b/scripts/outland/black_temple/boss_shade_of_akama.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/outland/black_temple/boss_supremus.cpp b/scripts/outland/black_temple/boss_supremus.cpp index 255d45996..6a4f1d426 100644 --- a/scripts/outland/black_temple/boss_supremus.cpp +++ b/scripts/outland/black_temple/boss_supremus.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/outland/black_temple/boss_teron_gorefiend.cpp b/scripts/outland/black_temple/boss_teron_gorefiend.cpp index 55879ab2f..900ecc048 100644 --- a/scripts/outland/black_temple/boss_teron_gorefiend.cpp +++ b/scripts/outland/black_temple/boss_teron_gorefiend.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/outland/black_temple/boss_warlord_najentus.cpp b/scripts/outland/black_temple/boss_warlord_najentus.cpp index 58a003a68..7095625bc 100644 --- a/scripts/outland/black_temple/boss_warlord_najentus.cpp +++ b/scripts/outland/black_temple/boss_warlord_najentus.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/outland/black_temple/illidari_council.cpp b/scripts/outland/black_temple/illidari_council.cpp index 6bcad1cee..46fb541fb 100644 --- a/scripts/outland/black_temple/illidari_council.cpp +++ b/scripts/outland/black_temple/illidari_council.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/outland/black_temple/instance_black_temple.cpp b/scripts/outland/black_temple/instance_black_temple.cpp index 09b5e936d..0dadef8ea 100644 --- a/scripts/outland/black_temple/instance_black_temple.cpp +++ b/scripts/outland/black_temple/instance_black_temple.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/outland/blades_edge_mountains.cpp b/scripts/outland/blades_edge_mountains.cpp index 0cf3f07bd..12afa86e4 100644 --- a/scripts/outland/blades_edge_mountains.cpp +++ b/scripts/outland/blades_edge_mountains.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/outland/boss_doomlord_kazzak.cpp b/scripts/outland/boss_doomlord_kazzak.cpp index 6527b8444..71ed0c480 100644 --- a/scripts/outland/boss_doomlord_kazzak.cpp +++ b/scripts/outland/boss_doomlord_kazzak.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/outland/boss_doomwalker.cpp b/scripts/outland/boss_doomwalker.cpp index b72e65c62..652515623 100644 --- a/scripts/outland/boss_doomwalker.cpp +++ b/scripts/outland/boss_doomwalker.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_fathomlord_karathress.cpp b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_fathomlord_karathress.cpp index 77d8bb6e9..254af1976 100644 --- a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_fathomlord_karathress.cpp +++ b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_fathomlord_karathress.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_hydross_the_unstable.cpp b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_hydross_the_unstable.cpp index 13d658401..c02fb5ad3 100644 --- a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_hydross_the_unstable.cpp +++ b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_hydross_the_unstable.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_lady_vashj.cpp b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_lady_vashj.cpp index 9f8149377..4e74b5e8a 100644 --- a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_lady_vashj.cpp +++ b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_lady_vashj.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_leotheras_the_blind.cpp b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_leotheras_the_blind.cpp index a041c934b..e386b67f2 100644 --- a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_leotheras_the_blind.cpp +++ b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_leotheras_the_blind.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_morogrim_tidewalker.cpp b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_morogrim_tidewalker.cpp index 473826acb..582dea808 100644 --- a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_morogrim_tidewalker.cpp +++ b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_morogrim_tidewalker.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_the_lurker_below.cpp b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_the_lurker_below.cpp index de175eb65..ef8fc4afd 100644 --- a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_the_lurker_below.cpp +++ b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_the_lurker_below.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/outland/coilfang_reservoir/serpent_shrine/instance_serpent_shrine.cpp b/scripts/outland/coilfang_reservoir/serpent_shrine/instance_serpent_shrine.cpp index 29d982d24..ec8623157 100644 --- a/scripts/outland/coilfang_reservoir/serpent_shrine/instance_serpent_shrine.cpp +++ b/scripts/outland/coilfang_reservoir/serpent_shrine/instance_serpent_shrine.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/outland/coilfang_reservoir/serpent_shrine/serpent_shrine.h b/scripts/outland/coilfang_reservoir/serpent_shrine/serpent_shrine.h index 58a98cff3..cce375d52 100644 --- a/scripts/outland/coilfang_reservoir/serpent_shrine/serpent_shrine.h +++ b/scripts/outland/coilfang_reservoir/serpent_shrine/serpent_shrine.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/outland/coilfang_reservoir/slave_pens/boss_ahune.cpp b/scripts/outland/coilfang_reservoir/slave_pens/boss_ahune.cpp index a69e79396..708debcdd 100644 --- a/scripts/outland/coilfang_reservoir/slave_pens/boss_ahune.cpp +++ b/scripts/outland/coilfang_reservoir/slave_pens/boss_ahune.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/outland/coilfang_reservoir/steam_vault/boss_hydromancer_thespia.cpp b/scripts/outland/coilfang_reservoir/steam_vault/boss_hydromancer_thespia.cpp index 68f1f3ab4..d3c8ad993 100644 --- a/scripts/outland/coilfang_reservoir/steam_vault/boss_hydromancer_thespia.cpp +++ b/scripts/outland/coilfang_reservoir/steam_vault/boss_hydromancer_thespia.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/outland/coilfang_reservoir/steam_vault/boss_mekgineer_steamrigger.cpp b/scripts/outland/coilfang_reservoir/steam_vault/boss_mekgineer_steamrigger.cpp index a292b0687..c1fd82616 100644 --- a/scripts/outland/coilfang_reservoir/steam_vault/boss_mekgineer_steamrigger.cpp +++ b/scripts/outland/coilfang_reservoir/steam_vault/boss_mekgineer_steamrigger.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/outland/coilfang_reservoir/steam_vault/boss_warlord_kalithresh.cpp b/scripts/outland/coilfang_reservoir/steam_vault/boss_warlord_kalithresh.cpp index 633735d2c..5e8272801 100644 --- a/scripts/outland/coilfang_reservoir/steam_vault/boss_warlord_kalithresh.cpp +++ b/scripts/outland/coilfang_reservoir/steam_vault/boss_warlord_kalithresh.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/outland/coilfang_reservoir/steam_vault/instance_steam_vault.cpp b/scripts/outland/coilfang_reservoir/steam_vault/instance_steam_vault.cpp index 2e50852d4..e52dbea5f 100644 --- a/scripts/outland/coilfang_reservoir/steam_vault/instance_steam_vault.cpp +++ b/scripts/outland/coilfang_reservoir/steam_vault/instance_steam_vault.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/outland/coilfang_reservoir/steam_vault/steam_vault.h b/scripts/outland/coilfang_reservoir/steam_vault/steam_vault.h index 1f4baad0c..412270128 100644 --- a/scripts/outland/coilfang_reservoir/steam_vault/steam_vault.h +++ b/scripts/outland/coilfang_reservoir/steam_vault/steam_vault.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/outland/coilfang_reservoir/underbog/boss_hungarfen.cpp b/scripts/outland/coilfang_reservoir/underbog/boss_hungarfen.cpp index a803133f8..ffc3b0050 100644 --- a/scripts/outland/coilfang_reservoir/underbog/boss_hungarfen.cpp +++ b/scripts/outland/coilfang_reservoir/underbog/boss_hungarfen.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/outland/gruuls_lair/boss_gruul.cpp b/scripts/outland/gruuls_lair/boss_gruul.cpp index 0ab3e0678..63e00f4c3 100644 --- a/scripts/outland/gruuls_lair/boss_gruul.cpp +++ b/scripts/outland/gruuls_lair/boss_gruul.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/outland/gruuls_lair/boss_high_king_maulgar.cpp b/scripts/outland/gruuls_lair/boss_high_king_maulgar.cpp index 8acbc454c..31495586b 100644 --- a/scripts/outland/gruuls_lair/boss_high_king_maulgar.cpp +++ b/scripts/outland/gruuls_lair/boss_high_king_maulgar.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/outland/gruuls_lair/gruuls_lair.h b/scripts/outland/gruuls_lair/gruuls_lair.h index bbe35672f..53b7fb90c 100644 --- a/scripts/outland/gruuls_lair/gruuls_lair.h +++ b/scripts/outland/gruuls_lair/gruuls_lair.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/outland/gruuls_lair/instance_gruuls_lair.cpp b/scripts/outland/gruuls_lair/instance_gruuls_lair.cpp index 708fa12f0..cf0c2731f 100644 --- a/scripts/outland/gruuls_lair/instance_gruuls_lair.cpp +++ b/scripts/outland/gruuls_lair/instance_gruuls_lair.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/outland/hellfire_citadel/blood_furnace/blood_furnace.h b/scripts/outland/hellfire_citadel/blood_furnace/blood_furnace.h index b139f9739..effed3407 100644 --- a/scripts/outland/hellfire_citadel/blood_furnace/blood_furnace.h +++ b/scripts/outland/hellfire_citadel/blood_furnace/blood_furnace.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/outland/hellfire_citadel/blood_furnace/boss_broggok.cpp b/scripts/outland/hellfire_citadel/blood_furnace/boss_broggok.cpp index ddbdb8a0b..888bf39a0 100644 --- a/scripts/outland/hellfire_citadel/blood_furnace/boss_broggok.cpp +++ b/scripts/outland/hellfire_citadel/blood_furnace/boss_broggok.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/outland/hellfire_citadel/blood_furnace/boss_kelidan_the_breaker.cpp b/scripts/outland/hellfire_citadel/blood_furnace/boss_kelidan_the_breaker.cpp index cb6e4c943..aafd65140 100644 --- a/scripts/outland/hellfire_citadel/blood_furnace/boss_kelidan_the_breaker.cpp +++ b/scripts/outland/hellfire_citadel/blood_furnace/boss_kelidan_the_breaker.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/outland/hellfire_citadel/blood_furnace/boss_the_maker.cpp b/scripts/outland/hellfire_citadel/blood_furnace/boss_the_maker.cpp index d5fdf714f..6b5226177 100644 --- a/scripts/outland/hellfire_citadel/blood_furnace/boss_the_maker.cpp +++ b/scripts/outland/hellfire_citadel/blood_furnace/boss_the_maker.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 @@ -28,7 +28,7 @@ enum { SAY_AGGRO_1 = -1542009, SAY_AGGRO_2 = -1542010, - SAY_AGGRO_3 = -1542011, + SAY_AGGRO_3 = -1542012, SAY_KILL_1 = -1542012, SAY_KILL_2 = -1542013, SAY_DIE = -1542014, diff --git a/scripts/outland/hellfire_citadel/blood_furnace/instance_blood_furnace.cpp b/scripts/outland/hellfire_citadel/blood_furnace/instance_blood_furnace.cpp index c7a76e986..900762c9f 100644 --- a/scripts/outland/hellfire_citadel/blood_furnace/instance_blood_furnace.cpp +++ b/scripts/outland/hellfire_citadel/blood_furnace/instance_blood_furnace.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_nazan_and_vazruden.cpp b/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_nazan_and_vazruden.cpp index 9958cf06c..d3301bdfe 100644 --- a/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_nazan_and_vazruden.cpp +++ b/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_nazan_and_vazruden.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_omor_the_unscarred.cpp b/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_omor_the_unscarred.cpp index 9de8415f8..28598a245 100644 --- a/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_omor_the_unscarred.cpp +++ b/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_omor_the_unscarred.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_watchkeeper_gargolmar.cpp b/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_watchkeeper_gargolmar.cpp index abf65178b..07851384d 100644 --- a/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_watchkeeper_gargolmar.cpp +++ b/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_watchkeeper_gargolmar.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/outland/hellfire_citadel/hellfire_ramparts/hellfire_ramparts.h b/scripts/outland/hellfire_citadel/hellfire_ramparts/hellfire_ramparts.h index ffe9dade8..07dc17521 100644 --- a/scripts/outland/hellfire_citadel/hellfire_ramparts/hellfire_ramparts.h +++ b/scripts/outland/hellfire_citadel/hellfire_ramparts/hellfire_ramparts.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/outland/hellfire_citadel/hellfire_ramparts/instance_hellfire_ramparts.cpp b/scripts/outland/hellfire_citadel/hellfire_ramparts/instance_hellfire_ramparts.cpp index 28f1b6d76..ccb95bbd7 100644 --- a/scripts/outland/hellfire_citadel/hellfire_ramparts/instance_hellfire_ramparts.cpp +++ b/scripts/outland/hellfire_citadel/hellfire_ramparts/instance_hellfire_ramparts.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/outland/hellfire_citadel/magtheridons_lair/boss_magtheridon.cpp b/scripts/outland/hellfire_citadel/magtheridons_lair/boss_magtheridon.cpp index c3c331161..ce8f99442 100644 --- a/scripts/outland/hellfire_citadel/magtheridons_lair/boss_magtheridon.cpp +++ b/scripts/outland/hellfire_citadel/magtheridons_lair/boss_magtheridon.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/outland/hellfire_citadel/magtheridons_lair/instance_magtheridons_lair.cpp b/scripts/outland/hellfire_citadel/magtheridons_lair/instance_magtheridons_lair.cpp index 64df70c97..bb5a35056 100644 --- a/scripts/outland/hellfire_citadel/magtheridons_lair/instance_magtheridons_lair.cpp +++ b/scripts/outland/hellfire_citadel/magtheridons_lair/instance_magtheridons_lair.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/outland/hellfire_citadel/magtheridons_lair/magtheridons_lair.h b/scripts/outland/hellfire_citadel/magtheridons_lair/magtheridons_lair.h index b47645d89..2a7c8fe7f 100644 --- a/scripts/outland/hellfire_citadel/magtheridons_lair/magtheridons_lair.h +++ b/scripts/outland/hellfire_citadel/magtheridons_lair/magtheridons_lair.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/outland/hellfire_citadel/shattered_halls/boss_nethekurse.cpp b/scripts/outland/hellfire_citadel/shattered_halls/boss_nethekurse.cpp index 719e9192a..9762fa8ce 100644 --- a/scripts/outland/hellfire_citadel/shattered_halls/boss_nethekurse.cpp +++ b/scripts/outland/hellfire_citadel/shattered_halls/boss_nethekurse.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/outland/hellfire_citadel/shattered_halls/boss_warbringer_omrogg.cpp b/scripts/outland/hellfire_citadel/shattered_halls/boss_warbringer_omrogg.cpp index 667c5871a..bbee1ec9c 100644 --- a/scripts/outland/hellfire_citadel/shattered_halls/boss_warbringer_omrogg.cpp +++ b/scripts/outland/hellfire_citadel/shattered_halls/boss_warbringer_omrogg.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/outland/hellfire_citadel/shattered_halls/boss_warchief_kargath_bladefist.cpp b/scripts/outland/hellfire_citadel/shattered_halls/boss_warchief_kargath_bladefist.cpp index e0629da35..62acb0394 100644 --- a/scripts/outland/hellfire_citadel/shattered_halls/boss_warchief_kargath_bladefist.cpp +++ b/scripts/outland/hellfire_citadel/shattered_halls/boss_warchief_kargath_bladefist.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/outland/hellfire_citadel/shattered_halls/instance_shattered_halls.cpp b/scripts/outland/hellfire_citadel/shattered_halls/instance_shattered_halls.cpp index 2014c7b91..84acfe256 100644 --- a/scripts/outland/hellfire_citadel/shattered_halls/instance_shattered_halls.cpp +++ b/scripts/outland/hellfire_citadel/shattered_halls/instance_shattered_halls.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/outland/hellfire_citadel/shattered_halls/shattered_halls.h b/scripts/outland/hellfire_citadel/shattered_halls/shattered_halls.h index 5df350768..fc193b1b6 100644 --- a/scripts/outland/hellfire_citadel/shattered_halls/shattered_halls.h +++ b/scripts/outland/hellfire_citadel/shattered_halls/shattered_halls.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/outland/hellfire_peninsula.cpp b/scripts/outland/hellfire_peninsula.cpp index c8e4e755c..3bef663fd 100644 --- a/scripts/outland/hellfire_peninsula.cpp +++ b/scripts/outland/hellfire_peninsula.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/outland/nagrand.cpp b/scripts/outland/nagrand.cpp index bea5f974a..40c5ced22 100644 --- a/scripts/outland/nagrand.cpp +++ b/scripts/outland/nagrand.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/outland/netherstorm.cpp b/scripts/outland/netherstorm.cpp index 76f7239d2..13526d09f 100644 --- a/scripts/outland/netherstorm.cpp +++ b/scripts/outland/netherstorm.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/outland/shadowmoon_valley.cpp b/scripts/outland/shadowmoon_valley.cpp index 6ea007825..3e3df8a22 100644 --- a/scripts/outland/shadowmoon_valley.cpp +++ b/scripts/outland/shadowmoon_valley.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/outland/shattrath_city.cpp b/scripts/outland/shattrath_city.cpp index 05f7ee259..73bc27eda 100644 --- a/scripts/outland/shattrath_city.cpp +++ b/scripts/outland/shattrath_city.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/outland/tempest_keep/arcatraz/arcatraz.cpp b/scripts/outland/tempest_keep/arcatraz/arcatraz.cpp index e1624cc41..09db0fadd 100644 --- a/scripts/outland/tempest_keep/arcatraz/arcatraz.cpp +++ b/scripts/outland/tempest_keep/arcatraz/arcatraz.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 @@ -37,7 +37,7 @@ EndContentData */ enum { SAY_INTRO_1 = -1552010, - SAY_INTRO_2 = -1552011, + SAY_INTRO_2 = -1552012, SAY_WATER = -1552012, SAY_BUFFS = -1552013, SAY_DRINK = -1552014, diff --git a/scripts/outland/tempest_keep/arcatraz/arcatraz.h b/scripts/outland/tempest_keep/arcatraz/arcatraz.h index 0cffb1dd9..c781d1f88 100644 --- a/scripts/outland/tempest_keep/arcatraz/arcatraz.h +++ b/scripts/outland/tempest_keep/arcatraz/arcatraz.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/outland/tempest_keep/arcatraz/boss_harbinger_skyriss.cpp b/scripts/outland/tempest_keep/arcatraz/boss_harbinger_skyriss.cpp index 52af5cca4..1d3f71468 100644 --- a/scripts/outland/tempest_keep/arcatraz/boss_harbinger_skyriss.cpp +++ b/scripts/outland/tempest_keep/arcatraz/boss_harbinger_skyriss.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/outland/tempest_keep/arcatraz/instance_arcatraz.cpp b/scripts/outland/tempest_keep/arcatraz/instance_arcatraz.cpp index aca7824e6..ac48e1a71 100644 --- a/scripts/outland/tempest_keep/arcatraz/instance_arcatraz.cpp +++ b/scripts/outland/tempest_keep/arcatraz/instance_arcatraz.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/outland/tempest_keep/botanica/boss_high_botanist_freywinn.cpp b/scripts/outland/tempest_keep/botanica/boss_high_botanist_freywinn.cpp index 35069d885..c60419294 100644 --- a/scripts/outland/tempest_keep/botanica/boss_high_botanist_freywinn.cpp +++ b/scripts/outland/tempest_keep/botanica/boss_high_botanist_freywinn.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/outland/tempest_keep/botanica/boss_laj.cpp b/scripts/outland/tempest_keep/botanica/boss_laj.cpp index b9fba4b91..ddd921626 100644 --- a/scripts/outland/tempest_keep/botanica/boss_laj.cpp +++ b/scripts/outland/tempest_keep/botanica/boss_laj.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/outland/tempest_keep/botanica/boss_warp_splinter.cpp b/scripts/outland/tempest_keep/botanica/boss_warp_splinter.cpp index b3a06f3be..82a2832cc 100644 --- a/scripts/outland/tempest_keep/botanica/boss_warp_splinter.cpp +++ b/scripts/outland/tempest_keep/botanica/boss_warp_splinter.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/outland/tempest_keep/the_eye/boss_alar.cpp b/scripts/outland/tempest_keep/the_eye/boss_alar.cpp index d7b2e5f2c..d12f562e4 100644 --- a/scripts/outland/tempest_keep/the_eye/boss_alar.cpp +++ b/scripts/outland/tempest_keep/the_eye/boss_alar.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/outland/tempest_keep/the_eye/boss_astromancer.cpp b/scripts/outland/tempest_keep/the_eye/boss_astromancer.cpp index b4fac9392..6fe82e5ee 100644 --- a/scripts/outland/tempest_keep/the_eye/boss_astromancer.cpp +++ b/scripts/outland/tempest_keep/the_eye/boss_astromancer.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/outland/tempest_keep/the_eye/boss_kaelthas.cpp b/scripts/outland/tempest_keep/the_eye/boss_kaelthas.cpp index f67f80381..b4fb4a08f 100644 --- a/scripts/outland/tempest_keep/the_eye/boss_kaelthas.cpp +++ b/scripts/outland/tempest_keep/the_eye/boss_kaelthas.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/outland/tempest_keep/the_eye/boss_void_reaver.cpp b/scripts/outland/tempest_keep/the_eye/boss_void_reaver.cpp index 33e85ba6d..96817da4d 100644 --- a/scripts/outland/tempest_keep/the_eye/boss_void_reaver.cpp +++ b/scripts/outland/tempest_keep/the_eye/boss_void_reaver.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/outland/tempest_keep/the_eye/instance_the_eye.cpp b/scripts/outland/tempest_keep/the_eye/instance_the_eye.cpp index 57abce989..4942d6dd5 100644 --- a/scripts/outland/tempest_keep/the_eye/instance_the_eye.cpp +++ b/scripts/outland/tempest_keep/the_eye/instance_the_eye.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/outland/tempest_keep/the_eye/the_eye.cpp b/scripts/outland/tempest_keep/the_eye/the_eye.cpp index 72be6af1e..3fb1ed148 100644 --- a/scripts/outland/tempest_keep/the_eye/the_eye.cpp +++ b/scripts/outland/tempest_keep/the_eye/the_eye.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/outland/tempest_keep/the_eye/the_eye.h b/scripts/outland/tempest_keep/the_eye/the_eye.h index 5537cb471..1fd2bf0cd 100644 --- a/scripts/outland/tempest_keep/the_eye/the_eye.h +++ b/scripts/outland/tempest_keep/the_eye/the_eye.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/outland/tempest_keep/the_mechanar/boss_gatewatcher_ironhand.cpp b/scripts/outland/tempest_keep/the_mechanar/boss_gatewatcher_ironhand.cpp index 10f81e4b8..42a7a0e93 100644 --- a/scripts/outland/tempest_keep/the_mechanar/boss_gatewatcher_ironhand.cpp +++ b/scripts/outland/tempest_keep/the_mechanar/boss_gatewatcher_ironhand.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/outland/tempest_keep/the_mechanar/boss_nethermancer_sepethrea.cpp b/scripts/outland/tempest_keep/the_mechanar/boss_nethermancer_sepethrea.cpp index 9da442c6a..f1a5a4bf9 100644 --- a/scripts/outland/tempest_keep/the_mechanar/boss_nethermancer_sepethrea.cpp +++ b/scripts/outland/tempest_keep/the_mechanar/boss_nethermancer_sepethrea.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/outland/tempest_keep/the_mechanar/boss_pathaleon_the_calculator.cpp b/scripts/outland/tempest_keep/the_mechanar/boss_pathaleon_the_calculator.cpp index eea30dbc0..83970dc0b 100644 --- a/scripts/outland/tempest_keep/the_mechanar/boss_pathaleon_the_calculator.cpp +++ b/scripts/outland/tempest_keep/the_mechanar/boss_pathaleon_the_calculator.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/outland/tempest_keep/the_mechanar/instance_mechanar.cpp b/scripts/outland/tempest_keep/the_mechanar/instance_mechanar.cpp index 184da0527..37ec25031 100644 --- a/scripts/outland/tempest_keep/the_mechanar/instance_mechanar.cpp +++ b/scripts/outland/tempest_keep/the_mechanar/instance_mechanar.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/outland/tempest_keep/the_mechanar/mechanar.h b/scripts/outland/tempest_keep/the_mechanar/mechanar.h index d665af4bb..fe53e938b 100644 --- a/scripts/outland/tempest_keep/the_mechanar/mechanar.h +++ b/scripts/outland/tempest_keep/the_mechanar/mechanar.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/outland/terokkar_forest.cpp b/scripts/outland/terokkar_forest.cpp index 350c27688..443251460 100644 --- a/scripts/outland/terokkar_forest.cpp +++ b/scripts/outland/terokkar_forest.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/outland/zangarmarsh.cpp b/scripts/outland/zangarmarsh.cpp index 69caff32c..926134568 100644 --- a/scripts/outland/zangarmarsh.cpp +++ b/scripts/outland/zangarmarsh.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/world/areatrigger_scripts.cpp b/scripts/world/areatrigger_scripts.cpp index 7ed772bfd..4f19d4b29 100644 --- a/scripts/world/areatrigger_scripts.cpp +++ b/scripts/world/areatrigger_scripts.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/world/bosses_emerald_dragons.cpp b/scripts/world/bosses_emerald_dragons.cpp index 3f4608fed..5e0c3e0e6 100644 --- a/scripts/world/bosses_emerald_dragons.cpp +++ b/scripts/world/bosses_emerald_dragons.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/world/go_scripts.cpp b/scripts/world/go_scripts.cpp index 43232d463..2c3345ae3 100644 --- a/scripts/world/go_scripts.cpp +++ b/scripts/world/go_scripts.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/world/guards.cpp b/scripts/world/guards.cpp index 4892021bf..fa0fceec8 100644 --- a/scripts/world/guards.cpp +++ b/scripts/world/guards.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/world/item_scripts.cpp b/scripts/world/item_scripts.cpp index 02dadbe83..5371c6be1 100644 --- a/scripts/world/item_scripts.cpp +++ b/scripts/world/item_scripts.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/world/mob_generic_creature.cpp b/scripts/world/mob_generic_creature.cpp index 44adbf82a..025616de2 100644 --- a/scripts/world/mob_generic_creature.cpp +++ b/scripts/world/mob_generic_creature.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/world/npc_professions.cpp b/scripts/world/npc_professions.cpp index c376c447e..7f8409ee0 100644 --- a/scripts/world/npc_professions.cpp +++ b/scripts/world/npc_professions.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/world/npcs_special.cpp b/scripts/world/npcs_special.cpp index 33f211798..35ef3d784 100644 --- a/scripts/world/npcs_special.cpp +++ b/scripts/world/npcs_special.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/world/spell_scripts.cpp b/scripts/world/spell_scripts.cpp index 8812ac658..f51c4f1d7 100644 --- a/scripts/world/spell_scripts.cpp +++ b/scripts/world/spell_scripts.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/scripts/world/world_map_scripts.cpp b/scripts/world/world_map_scripts.cpp index 0d8169563..c1a4e5939 100644 --- a/scripts/world/world_map_scripts.cpp +++ b/scripts/world/world_map_scripts.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * 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 diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index e580c82f6..1d6e7aadc 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2375" + #define SD2_REVISION_NR "2376" #endif // __SD2_REVISION_NR_H__ diff --git a/system/MangosdRev.cpp b/system/MangosdRev.cpp index 430b2bbf2..62a73dc04 100644 --- a/system/MangosdRev.cpp +++ b/system/MangosdRev.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/system/ScriptLoader.cpp b/system/ScriptLoader.cpp index 213c0ab12..cd66c41c7 100644 --- a/system/ScriptLoader.cpp +++ b/system/ScriptLoader.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/system/ScriptLoader.h b/system/ScriptLoader.h index 2241d289c..8f27bae4f 100644 --- a/system/ScriptLoader.h +++ b/system/ScriptLoader.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/system/system.cpp b/system/system.cpp index 0a7bf9c21..baaa44a4e 100644 --- a/system/system.cpp +++ b/system/system.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/system/system.h b/system/system.h index 1480c742e..3c7547195 100644 --- a/system/system.h +++ b/system/system.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2012 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/tool/git_id/git_id.cpp b/tool/git_id/git_id.cpp index f8b43483f..9da1bee89 100644 --- a/tool/git_id/git_id.cpp +++ b/tool/git_id/git_id.cpp @@ -1,6 +1,6 @@ /* - * Copyright (C) 2005-2011 MaNGOS - * Copyright (C) 2005-2011 ScriptDev2 + * Copyright (C) 2005-2012 MaNGOS + * Copyright (C) 2005-2012 ScriptDev2 * * 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 From 5a17c84dacba6d45ca5098302be28d7f27eb709c Mon Sep 17 00:00:00 2001 From: Xfurry Date: Wed, 4 Jan 2012 21:56:04 +0200 Subject: [PATCH 0362/1172] [2377] Fix a few typos from previous commit --- scripts/battlegrounds/battleground.cpp | 2 +- scripts/eastern_kingdoms/karazhan/boss_moroes.cpp | 2 +- scripts/kalimdor/thousand_needles.cpp | 2 +- .../frozen_halls/forge_of_souls/boss_devourer_of_souls.cpp | 2 +- scripts/northrend/ulduar/halls_of_lightning/boss_ionar.cpp | 2 +- .../outland/hellfire_citadel/blood_furnace/boss_the_maker.cpp | 2 +- scripts/outland/tempest_keep/arcatraz/arcatraz.cpp | 2 +- sd2_revision_nr.h | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/scripts/battlegrounds/battleground.cpp b/scripts/battlegrounds/battleground.cpp index efd0328dd..eb95391a0 100644 --- a/scripts/battlegrounds/battleground.cpp +++ b/scripts/battlegrounds/battleground.cpp @@ -37,7 +37,7 @@ EndScriptData */ enum { - SPELL_SPIRIT_HEAL_CHANNEL = 22012, // Spirit Heal Channel + SPELL_SPIRIT_HEAL_CHANNEL = 22011, // Spirit Heal Channel SPELL_SPIRIT_HEAL = 22012, // Spirit Heal SPELL_SPIRIT_HEAL_MANA = 44535, // in battlegrounds player get this no-mana-cost-buff diff --git a/scripts/eastern_kingdoms/karazhan/boss_moroes.cpp b/scripts/eastern_kingdoms/karazhan/boss_moroes.cpp index b9cb3e2d8..8b1de57f8 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_moroes.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_moroes.cpp @@ -28,7 +28,7 @@ enum { MAX_GUESTS = 4, - SAY_AGGRO = -1532012, + SAY_AGGRO = -1532011, SAY_SPECIAL_1 = -1532012, SAY_SPECIAL_2 = -1532013, SAY_KILL_1 = -1532014, diff --git a/scripts/kalimdor/thousand_needles.cpp b/scripts/kalimdor/thousand_needles.cpp index fbec5d523..087fdd162 100644 --- a/scripts/kalimdor/thousand_needles.cpp +++ b/scripts/kalimdor/thousand_needles.cpp @@ -119,7 +119,7 @@ enum float m_afBanditLoc[6][6]= { {-4905.479492f, -2062.732666f, 84.352f}, - {-4915.201272f, -2073.528320f, 84.733f}, + {-4915.201172f, -2073.528320f, 84.733f}, {-4878.883301f, -1986.947876f, 91.966f}, {-4877.503906f, -1966.113403f, 91.859f}, {-4767.985352f, -1873.169189f, 90.192f}, diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_devourer_of_souls.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_devourer_of_souls.cpp index 24c0783e7..944a20736 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_devourer_of_souls.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_devourer_of_souls.cpp @@ -30,7 +30,7 @@ enum SAY_FEMALE_AGGRO = -1632008, SAY_MALE_1_SLAY_1 = -1632009, SAY_FEMALE_SLAY_1 = -1632010, - SAY_MALE_2_SLAY_1 = -1632012, + SAY_MALE_2_SLAY_1 = -1632011, SAY_MALE_1_SLAY_2 = -1632012, SAY_FEMALE_SLAY_2 = -1632013, SAY_MALE_2_SLAY_2 = -1632014, diff --git a/scripts/northrend/ulduar/halls_of_lightning/boss_ionar.cpp b/scripts/northrend/ulduar/halls_of_lightning/boss_ionar.cpp index 45077e141..0855d3f9f 100644 --- a/scripts/northrend/ulduar/halls_of_lightning/boss_ionar.cpp +++ b/scripts/northrend/ulduar/halls_of_lightning/boss_ionar.cpp @@ -26,7 +26,7 @@ EndScriptData */ enum { - SAY_AGGRO = -1602012, + SAY_AGGRO = -1602011, SAY_SLAY_1 = -1602012, SAY_SLAY_2 = -1602013, SAY_SLAY_3 = -1602014, diff --git a/scripts/outland/hellfire_citadel/blood_furnace/boss_the_maker.cpp b/scripts/outland/hellfire_citadel/blood_furnace/boss_the_maker.cpp index 6b5226177..4523aeebc 100644 --- a/scripts/outland/hellfire_citadel/blood_furnace/boss_the_maker.cpp +++ b/scripts/outland/hellfire_citadel/blood_furnace/boss_the_maker.cpp @@ -28,7 +28,7 @@ enum { SAY_AGGRO_1 = -1542009, SAY_AGGRO_2 = -1542010, - SAY_AGGRO_3 = -1542012, + SAY_AGGRO_3 = -1542011, SAY_KILL_1 = -1542012, SAY_KILL_2 = -1542013, SAY_DIE = -1542014, diff --git a/scripts/outland/tempest_keep/arcatraz/arcatraz.cpp b/scripts/outland/tempest_keep/arcatraz/arcatraz.cpp index 09db0fadd..d268f321d 100644 --- a/scripts/outland/tempest_keep/arcatraz/arcatraz.cpp +++ b/scripts/outland/tempest_keep/arcatraz/arcatraz.cpp @@ -37,7 +37,7 @@ EndContentData */ enum { SAY_INTRO_1 = -1552010, - SAY_INTRO_2 = -1552012, + SAY_INTRO_2 = -1552011, SAY_WATER = -1552012, SAY_BUFFS = -1552013, SAY_DRINK = -1552014, diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 1d6e7aadc..6c72de819 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2376" + #define SD2_REVISION_NR "2377" #endif // __SD2_REVISION_NR_H__ From 63bbdda2efd42efd1b8802ecf55fa9907b1edbd4 Mon Sep 17 00:00:00 2001 From: Radu Date: Wed, 4 Jan 2012 21:59:11 +0200 Subject: [PATCH 0363/1172] One more copyright update --- README | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README b/README index bba7c295d..eb4be34e7 100644 --- a/README +++ b/README @@ -1,6 +1,6 @@ == ScriptDev2 README == - Copyright (C) 2006 - 2011 ScriptDev2 + Copyright (C) 2006 - 2012 ScriptDev2 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 From b444d059b439a67c27bb13430d195fbe8b7e044e Mon Sep 17 00:00:00 2001 From: stfx Date: Fri, 6 Jan 2012 20:23:16 +0200 Subject: [PATCH 0364/1172] [2378] Fix typo in script texts Signed-off-by: Xfurry --- sd2_revision_nr.h | 2 +- sql/scriptdev2_script_full.sql | 2 +- sql/updates/r2374_scriptdev2.sql | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 6c72de819..168c82a4f 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2377" + #define SD2_REVISION_NR "2378" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index ae4864557..608ebf996 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -837,7 +837,7 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1000779,'I\'ll finish you off for good this time!',0,0,0,0,'Feero Ironhand SAY_FINAL_AMBUSH_ATTACK'), (-1000780,'Well done! I should be fine on my own from here. Remember to talk to Delgren when you return to Maestra\'s Post in Ashenvale.',0,0,0,0,'Feero Ironhand SAY_QUEST_END'), -(-1000781,'I knew Lurielle would send help! Thank you, friend, and give Lurielle my thanls as well!',0,0,0,0,'Chill Nymph SAY_FREE_1'), +(-1000781,'I knew Lurielle would send help! Thank you, friend, and give Lurielle my thanks as well!',0,0,0,0,'Chill Nymph SAY_FREE_1'), (-1000782,'Where am I? What happend to me? You... you freed me?',0,0,0,0,'Chill Nymph SAY_FREE_2'), (-1000783,'Thank you. I thought I would die without seeing my sisters again!',0,0,0,0,'Chill Nymph SAY_FREE_3'); diff --git a/sql/updates/r2374_scriptdev2.sql b/sql/updates/r2374_scriptdev2.sql index 62b26b9b0..68c333729 100644 --- a/sql/updates/r2374_scriptdev2.sql +++ b/sql/updates/r2374_scriptdev2.sql @@ -1,5 +1,5 @@ DELETE FROM script_texts WHERE entry BETWEEN -1000783 AND -1000781; INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES -(-1000781,'I knew Lurielle would send help! Thank you, friend, and give Lurielle my thanls as well!',0,0,0,0,'Chill Nymph SAY_FREE_1'), +(-1000781,'I knew Lurielle would send help! Thank you, friend, and give Lurielle my thanks as well!',0,0,0,0,'Chill Nymph SAY_FREE_1'), (-1000782,'Where am I? What happend to me? You... you freed me?',0,0,0,0,'Chill Nymph SAY_FREE_2'), (-1000783,'Thank you. I thought I would die without seeing my sisters again!',0,0,0,0,'Chill Nymph SAY_FREE_3'); From 60aefca67dbb7a5df1276ae91e5775ec35f80411 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Fri, 6 Jan 2012 21:35:00 +0200 Subject: [PATCH 0365/1172] [2379] Implement script support for quests 7938 and 7944 Thanks X-Savior for bringing this to the light --- scripts/eastern_kingdoms/deadmines/deadmines.h | 5 +++++ .../deadmines/instance_deadmines.cpp | 9 +++++++++ .../wailing_caverns/instance_wailing_caverns.cpp | 14 ++++++++++++++ scripts/kalimdor/wailing_caverns/wailing_caverns.h | 7 +++++++ sd2_revision_nr.h | 2 +- 5 files changed, 36 insertions(+), 1 deletion(-) diff --git a/scripts/eastern_kingdoms/deadmines/deadmines.h b/scripts/eastern_kingdoms/deadmines/deadmines.h index f07d4299c..96215e59f 100644 --- a/scripts/eastern_kingdoms/deadmines/deadmines.h +++ b/scripts/eastern_kingdoms/deadmines/deadmines.h @@ -25,6 +25,7 @@ enum GO_IRON_CLAD_DOOR = 16397, GO_DEFIAS_CANNON = 16398, GO_SMITE_CHEST = 144111, // use to get correct location of mr.smites equipment changes + GO_MYSTERIOUS_CHEST = 180024, // used for quest 7938; spawns in the instance only if one of the players has the quest NPC_RHAHKZOR = 644, NPC_SNEED = 643, @@ -32,6 +33,8 @@ enum NPC_MR_SMITE = 646, NPC_PIRATE = 657, NPC_SQUALLSHAPER = 1732, + + QUEST_FORTUNE_AWAITS = 7938, }; class MANGOS_DLL_DECL instance_deadmines : public ScriptedInstance @@ -41,6 +44,8 @@ class MANGOS_DLL_DECL instance_deadmines : public ScriptedInstance void Initialize(); + void OnPlayerEnter(Player* pPlayer); + void OnCreatureCreate(Creature* pCreature); void OnObjectCreate(GameObject* pGo); diff --git a/scripts/eastern_kingdoms/deadmines/instance_deadmines.cpp b/scripts/eastern_kingdoms/deadmines/instance_deadmines.cpp index 992a6e2c4..4dded539a 100644 --- a/scripts/eastern_kingdoms/deadmines/instance_deadmines.cpp +++ b/scripts/eastern_kingdoms/deadmines/instance_deadmines.cpp @@ -35,6 +35,14 @@ void instance_deadmines::Initialize() memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); } +void instance_deadmines::OnPlayerEnter(Player* pPlayer) +{ + // Respawn the Mysterious chest if one of the players who enter the instance has the quest in his log + if (pPlayer->GetQuestStatus(QUEST_FORTUNE_AWAITS) == QUEST_STATUS_COMPLETE && + !pPlayer->GetQuestRewardStatus(QUEST_FORTUNE_AWAITS)) + DoRespawnGameObject(GO_MYSTERIOUS_CHEST, HOUR); +} + void instance_deadmines::OnCreatureCreate(Creature* pCreature) { if (pCreature->GetEntry() == NPC_MR_SMITE) @@ -67,6 +75,7 @@ void instance_deadmines::OnObjectCreate(GameObject* pGo) break; case GO_DEFIAS_CANNON: case GO_SMITE_CHEST: + case GO_MYSTERIOUS_CHEST: break; default: diff --git a/scripts/kalimdor/wailing_caverns/instance_wailing_caverns.cpp b/scripts/kalimdor/wailing_caverns/instance_wailing_caverns.cpp index 32a42c871..60a8c8389 100644 --- a/scripts/kalimdor/wailing_caverns/instance_wailing_caverns.cpp +++ b/scripts/kalimdor/wailing_caverns/instance_wailing_caverns.cpp @@ -34,6 +34,14 @@ void instance_wailing_caverns::Initialize() memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); } +void instance_wailing_caverns::OnPlayerEnter(Player* pPlayer) +{ + // Respawn the Mysterious chest if one of the players who enter the instance has the quest in his log + if (pPlayer->GetQuestStatus(QUEST_FORTUNE_AWAITS) == QUEST_STATUS_COMPLETE && + !pPlayer->GetQuestRewardStatus(QUEST_FORTUNE_AWAITS)) + DoRespawnGameObject(GO_MYSTERIOUS_CHEST, HOUR); +} + void instance_wailing_caverns::OnCreatureCreate(Creature* pCreature) { switch (pCreature->GetEntry()) @@ -45,6 +53,12 @@ void instance_wailing_caverns::OnCreatureCreate(Creature* pCreature) } } +void instance_wailing_caverns::OnObjectCreate(GameObject* pGo) +{ + if (pGo->GetEntry() == GO_MYSTERIOUS_CHEST) + m_mGoEntryGuidStore[GO_MYSTERIOUS_CHEST] = pGo->GetObjectGuid(); +} + void instance_wailing_caverns::SetData(uint32 uiType, uint32 uiData) { switch(uiType) diff --git a/scripts/kalimdor/wailing_caverns/wailing_caverns.h b/scripts/kalimdor/wailing_caverns/wailing_caverns.h index cba79b3ed..7291ddf09 100644 --- a/scripts/kalimdor/wailing_caverns/wailing_caverns.h +++ b/scripts/kalimdor/wailing_caverns/wailing_caverns.h @@ -18,7 +18,12 @@ enum NPC_NARALEX = 3679, NPC_DISCIPLE = 3678, + SAY_INTRO = -1043000, // Say when the first 4 encounter are DONE + + GO_MYSTERIOUS_CHEST = 180055, // used for quest 7944; spawns in the instance only if one of the players has the quest + + QUEST_FORTUNE_AWAITS = 7944, }; class MANGOS_DLL_DECL instance_wailing_caverns : public ScriptedInstance @@ -29,7 +34,9 @@ class MANGOS_DLL_DECL instance_wailing_caverns : public ScriptedInstance void Initialize(); + void OnPlayerEnter(Player* pPlayer); void OnCreatureCreate(Creature* pCreature); + void OnObjectCreate(GameObject* pGo); void SetData(uint32 uiType, uint32 uiData); uint32 GetData(uint32 uiType); diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 168c82a4f..f69641a49 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2378" + #define SD2_REVISION_NR "2379" #endif // __SD2_REVISION_NR_H__ From b73cb2961d21a357773b3241aa44daf1661d22a4 Mon Sep 17 00:00:00 2001 From: Reamer Date: Fri, 6 Jan 2012 22:14:10 +0200 Subject: [PATCH 0366/1172] [2380] Add support for Talon King Ikiss chest Signed-off-by: Xfurry --- .../sethekk_halls/instance_sethekk_halls.cpp | 22 +++++++++++++++---- .../auchindoun/sethekk_halls/sethekk_halls.h | 1 + sd2_revision_nr.h | 2 +- 3 files changed, 20 insertions(+), 5 deletions(-) diff --git a/scripts/outland/auchindoun/sethekk_halls/instance_sethekk_halls.cpp b/scripts/outland/auchindoun/sethekk_halls/instance_sethekk_halls.cpp index 95046d6fc..a93b971ed 100644 --- a/scripts/outland/auchindoun/sethekk_halls/instance_sethekk_halls.cpp +++ b/scripts/outland/auchindoun/sethekk_halls/instance_sethekk_halls.cpp @@ -35,13 +35,22 @@ void instance_sethekk_halls::Initialize() void instance_sethekk_halls::OnObjectCreate(GameObject* pGo) { - if (pGo->GetEntry() == GO_IKISS_DOOR) + switch (pGo->GetEntry()) { - if (m_auiEncounter[TYPE_IKISS] == DONE) - pGo->SetGoState(GO_STATE_ACTIVE); + case GO_IKISS_DOOR: + if (m_auiEncounter[TYPE_IKISS] == DONE) + pGo->SetGoState(GO_STATE_ACTIVE); + break; + case GO_IKISS_CHEST: + if (m_auiEncounter[TYPE_IKISS] == DONE) + pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NO_INTERACT | GO_FLAG_INTERACT_COND); + break; - m_mGoEntryGuidStore[GO_IKISS_DOOR] = pGo->GetObjectGuid(); + default: + return; } + + m_mGoEntryGuidStore[pGo->GetEntry()] = pGo->GetObjectGuid(); } void instance_sethekk_halls::SetData(uint32 uiType, uint32 uiData) @@ -54,7 +63,12 @@ void instance_sethekk_halls::SetData(uint32 uiType, uint32 uiData) break; case TYPE_IKISS: if (uiData == DONE) + { DoUseDoorOrButton(GO_IKISS_DOOR, DAY); + + if(GameObject* pChest = GetSingleGameObjectFromStorage(GO_IKISS_CHEST)) + pChest->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NO_INTERACT | GO_FLAG_INTERACT_COND); + } m_auiEncounter[uiType] = uiData; break; default: diff --git a/scripts/outland/auchindoun/sethekk_halls/sethekk_halls.h b/scripts/outland/auchindoun/sethekk_halls/sethekk_halls.h index adf569412..6245bb11f 100644 --- a/scripts/outland/auchindoun/sethekk_halls/sethekk_halls.h +++ b/scripts/outland/auchindoun/sethekk_halls/sethekk_halls.h @@ -14,6 +14,7 @@ enum TYPE_IKISS = 2, GO_IKISS_DOOR = 177203, + GO_IKISS_CHEST = 187372, ACHIEV_CRITA_TURKEY_TIME = 11142, ITEM_PILGRIMS_HAT = 46723, diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index f69641a49..ea0a54cfc 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2379" + #define SD2_REVISION_NR "2380" #endif // __SD2_REVISION_NR_H__ From 1d33dfd3414b69e178176b47062fe9c12f1ebd8e Mon Sep 17 00:00:00 2001 From: Xfurry Date: Fri, 6 Jan 2012 23:21:12 +0200 Subject: [PATCH 0367/1172] [2381] Allow players to interact with the Tribunal chest --- .../ulduar/halls_of_stone/instance_halls_of_stone.cpp | 8 +++++--- sd2_revision_nr.h | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/scripts/northrend/ulduar/halls_of_stone/instance_halls_of_stone.cpp b/scripts/northrend/ulduar/halls_of_stone/instance_halls_of_stone.cpp index 6efe40952..d04a43758 100644 --- a/scripts/northrend/ulduar/halls_of_stone/instance_halls_of_stone.cpp +++ b/scripts/northrend/ulduar/halls_of_stone/instance_halls_of_stone.cpp @@ -74,9 +74,10 @@ void instance_halls_of_stone::OnObjectCreate(GameObject* pGo) { case GO_DOOR_SJONNIR: break; - case GO_DOOR_TRIBUNAL: case GO_TRIBUNAL_CHEST: case GO_TRIBUNAL_CHEST_H: + if (m_auiEncounter[TYPE_TRIBUNAL] == DONE) + pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NO_INTERACT); break; case GO_TRIBUNAL_HEAD_RIGHT: m_aFaces[FACE_MARNAK].m_goFaceGuid = pGo->GetObjectGuid(); @@ -87,6 +88,7 @@ void instance_halls_of_stone::OnObjectCreate(GameObject* pGo) case GO_TRIBUNAL_HEAD_LEFT: m_aFaces[FACE_KADDRAK].m_goFaceGuid = pGo->GetObjectGuid(); return; + case GO_DOOR_TRIBUNAL: case GO_TRIBUNAL_CONSOLE: case GO_TRIBUNAL_FLOOR: case GO_SJONNIR_CONSOLE: @@ -110,8 +112,8 @@ void instance_halls_of_stone::SetData(uint32 uiType, uint32 uiData) SortFaces(); break; case DONE: - // Actually, this one need to be changed faction or similar.. - DoRespawnGameObject(instance->IsRegularDifficulty() ? GO_TRIBUNAL_CHEST : GO_TRIBUNAL_CHEST_H); + if (GameObject* pChest = GetSingleGameObjectFromStorage(instance->IsRegularDifficulty() ? GO_TRIBUNAL_CHEST : GO_TRIBUNAL_CHEST_H)) + pChest->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NO_INTERACT); // Door workaround because of the missing Bran event DoUseDoorOrButton(GO_DOOR_SJONNIR); break; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index ea0a54cfc..bfdc0dc1f 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2380" + #define SD2_REVISION_NR "2381" #endif // __SD2_REVISION_NR_H__ From f30365814a6798a0c635f56add281c83f0094e20 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Thu, 12 Jan 2012 22:29:26 +0200 Subject: [PATCH 0368/1172] [2382] Add placeholder for Oculus --- VC100/100ScriptDev2.vcxproj | 4 +++ VC100/100ScriptDev2.vcxproj.filters | 12 ++++++++ VC80/80ScriptDev2.vcproj | 16 +++++++++++ VC90/90ScriptDev2.vcproj | 16 +++++++++++ .../northrend/nexus/oculus/boss_eregos.cpp | 28 +++++++++++++++++++ scripts/northrend/nexus/oculus/boss_urom.cpp | 28 +++++++++++++++++++ .../nexus/oculus/instance_oculus.cpp | 28 +++++++++++++++++++ scripts/northrend/nexus/oculus/oculus.h | 3 ++ sd2_revision_nr.h | 2 +- system/ScriptLoader.cpp | 6 ++++ 10 files changed, 142 insertions(+), 1 deletion(-) create mode 100644 scripts/northrend/nexus/oculus/boss_eregos.cpp create mode 100644 scripts/northrend/nexus/oculus/boss_urom.cpp create mode 100644 scripts/northrend/nexus/oculus/instance_oculus.cpp create mode 100644 scripts/northrend/nexus/oculus/oculus.h diff --git a/VC100/100ScriptDev2.vcxproj b/VC100/100ScriptDev2.vcxproj index 003dee807..cebfb83d5 100644 --- a/VC100/100ScriptDev2.vcxproj +++ b/VC100/100ScriptDev2.vcxproj @@ -546,6 +546,9 @@ + + + @@ -750,6 +753,7 @@ + diff --git a/VC100/100ScriptDev2.vcxproj.filters b/VC100/100ScriptDev2.vcxproj.filters index 400b891aa..41f594c92 100644 --- a/VC100/100ScriptDev2.vcxproj.filters +++ b/VC100/100ScriptDev2.vcxproj.filters @@ -1227,6 +1227,15 @@ scripts\northrend\nexus\nexus + + scripts\northrend\nexus\oculus + + + scripts\northrend\nexus\oculus + + + scripts\northrend\nexus\oculus + scripts\northrend\obsidian_sanctum @@ -1890,6 +1899,9 @@ scripts\northrend\nexus\nexus + + scripts\northrend\nexus\oculus + scripts\northrend\obsidian_sanctum diff --git a/VC80/80ScriptDev2.vcproj b/VC80/80ScriptDev2.vcproj index 11cffa20f..e0ace264c 100644 --- a/VC80/80ScriptDev2.vcproj +++ b/VC80/80ScriptDev2.vcproj @@ -2126,6 +2126,22 @@ + + + + + + + + + + + + + + + + + * 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_eregos +SD%Complete: 0 +SDComment: Placeholder +SDCategory: Oculus +EndScriptData */ + +#include "precompiled.h" + +void AddSC_boss_eregos() +{ +} diff --git a/scripts/northrend/nexus/oculus/boss_urom.cpp b/scripts/northrend/nexus/oculus/boss_urom.cpp new file mode 100644 index 000000000..9fdb91b75 --- /dev/null +++ b/scripts/northrend/nexus/oculus/boss_urom.cpp @@ -0,0 +1,28 @@ +/* Copyright (C) 2006 - 2012 ScriptDev2 + * 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_urom +SD%Complete: 0 +SDComment: Placeholder +SDCategory: Oculus +EndScriptData */ + +#include "precompiled.h" + +void AddSC_boss_urom() +{ +} diff --git a/scripts/northrend/nexus/oculus/instance_oculus.cpp b/scripts/northrend/nexus/oculus/instance_oculus.cpp new file mode 100644 index 000000000..e8659606e --- /dev/null +++ b/scripts/northrend/nexus/oculus/instance_oculus.cpp @@ -0,0 +1,28 @@ +/* Copyright (C) 2006 - 2012 ScriptDev2 + * 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: instance_oculus +SD%Complete: 0 +SDComment: Placeholder +SDCategory: Oculus +EndScriptData */ + +#include "precompiled.h" + +void AddSC_instance_oculus() +{ +} diff --git a/scripts/northrend/nexus/oculus/oculus.h b/scripts/northrend/nexus/oculus/oculus.h new file mode 100644 index 000000000..5871a49a1 --- /dev/null +++ b/scripts/northrend/nexus/oculus/oculus.h @@ -0,0 +1,3 @@ +/* Copyright (C) 2006 - 2012 ScriptDev2 + * This program is free software licensed under GPL version 2 + * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index bfdc0dc1f..eead8e294 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2381" + #define SD2_REVISION_NR "2382" #endif // __SD2_REVISION_NR_H__ diff --git a/system/ScriptLoader.cpp b/system/ScriptLoader.cpp index cd66c41c7..4ea6003d4 100644 --- a/system/ScriptLoader.cpp +++ b/system/ScriptLoader.cpp @@ -349,6 +349,9 @@ extern void AddSC_boss_keristrasza(); extern void AddSC_boss_ormorok(); extern void AddSC_boss_telestra(); extern void AddSC_instance_nexus(); +extern void AddSC_boss_eregos(); // nexus, oculus +extern void AddSC_boss_urom(); +extern void AddSC_instance_oculus(); extern void AddSC_boss_sartharion(); // obsidian_sanctum extern void AddSC_instance_obsidian_sanctum(); extern void AddSC_boss_baltharus(); // ruby_sanctum @@ -841,6 +844,9 @@ void AddScripts() AddSC_boss_ormorok(); AddSC_boss_telestra(); AddSC_instance_nexus(); + AddSC_boss_eregos(); // nexus, oculus + AddSC_boss_urom(); + AddSC_instance_oculus(); AddSC_boss_sartharion(); // obsidian_sanctum AddSC_instance_obsidian_sanctum(); AddSC_boss_baltharus(); // ruby_sanctum From e2ac8c4438c7e9b3a0c745695161cd51b98379c8 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Thu, 12 Jan 2012 23:13:58 +0200 Subject: [PATCH 0369/1172] [2383] Add yells for Oculus bosses --- .../northrend/nexus/oculus/boss_eregos.cpp | 18 +++++++++++++-- scripts/northrend/nexus/oculus/boss_urom.cpp | 18 +++++++++++++-- sd2_revision_nr.h | 2 +- sql/scriptdev2_script_full.sql | 22 ++++++++++++++++++ sql/updates/r2383_scriptdev2.sql | 23 +++++++++++++++++++ 5 files changed, 78 insertions(+), 5 deletions(-) create mode 100644 sql/updates/r2383_scriptdev2.sql diff --git a/scripts/northrend/nexus/oculus/boss_eregos.cpp b/scripts/northrend/nexus/oculus/boss_eregos.cpp index 47c879394..547d2a760 100644 --- a/scripts/northrend/nexus/oculus/boss_eregos.cpp +++ b/scripts/northrend/nexus/oculus/boss_eregos.cpp @@ -16,13 +16,27 @@ /* ScriptData SDName: boss_eregos -SD%Complete: 0 -SDComment: Placeholder +SD%Complete: 20 +SDComment: only yells SDCategory: Oculus EndScriptData */ #include "precompiled.h" +enum +{ + SAY_SPAWN = -1578010, + SAY_AGGRO = -1578011, + SAY_ARCANE_SHIELD = -1578012, + SAY_FIRE_SHIELD = -1578013, + SAY_NATURE_SHIELD = -1578014, + SAY_FRENZY = -1578015, + SAY_KILL_1 = -1578016, + SAY_KILL_2 = -1578017, + SAY_KILL_3 = -1578018, + SAY_DEATH = -1578019, +}; + void AddSC_boss_eregos() { } diff --git a/scripts/northrend/nexus/oculus/boss_urom.cpp b/scripts/northrend/nexus/oculus/boss_urom.cpp index 9fdb91b75..49fa87cff 100644 --- a/scripts/northrend/nexus/oculus/boss_urom.cpp +++ b/scripts/northrend/nexus/oculus/boss_urom.cpp @@ -16,13 +16,27 @@ /* ScriptData SDName: boss_urom -SD%Complete: 0 -SDComment: Placeholder +SD%Complete: 20 +SDComment: only yells SDCategory: Oculus EndScriptData */ #include "precompiled.h" +enum +{ + SAY_SUMMON_1 = -1578000, + SAY_SUMMON_2 = -1578001, + SAY_SUMMON_3 = -1578002, + SAY_AGGRO = -1578003, + SAY_EXPLOSION_1 = -1578004, + SAY_EXPLOSION_2 = -1578005, + SAY_KILL_1 = -1578006, + SAY_KILL_2 = -1578007, + SAY_KILL_3 = -1578008, + SAY_DEATH = -1578009, +}; + void AddSC_boss_urom() { } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index eead8e294..f758c53b1 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2382" + #define SD2_REVISION_NR "2383" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 608ebf996..20ae0b94b 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -2587,6 +2587,28 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1576022,'%s shields himself and divert his power to the rifts!',0,3,0,0,'anomalus EMOTE_SHIELD'); -- -1 578 000 OCULUS +INSERT INTO `script_texts` (`entry`,`content_default`,`sound`,`type`,`language`,`comment`) VALUES +(-1578000, 'What do we have here... those would defy the Spell-Weaver? Those without foresight or understanding. How could I make you see? Malygos is saving the world from itself! Bah! You are hardly worth my time!',13635,1,0,'urom SAY_SUMMON_1'), +(-1578001, 'Clearly my pets failed. Perhaps another demonstration is in order.',13636,1,0,'urom SAY_SUMMON_2'), +(-1578002, 'Still you fight. Still you cling to misguided principles. If you survive, you\'ll find me in the center ring.',13637,1,0,'urom SAY_SUMMON_3'), +(-1578003, 'Poor blind fools!',13638,1,0,'urom SAY_AGGRO'), +(-1578004, 'A taste... just a small taste... of the Spell-Weaver\'s power!',13639,1,0,'urom SAY_EXPLOSION_1'), +(-1578005, 'So much unstable energy... but worth the risk to destroy you!',13640,1,0,'urom SAY_EXPLOSION_2'), +(-1578006, 'If only you understood!',13641,1,0,'urom SAY_KILL_1'), +(-1578007, 'Now do you see? Do you?!',13642,1,0,'urom SAY_KILL_2'), +(-1578008, 'Unfortunate, but necessary.',13643,1,0,'urom SAY_KILL_3'), +(-1578009, 'Everything I\'ve done... has been for Azeroth...',13644,1,0,'urom SAY_DEATH'), + +(-1578010, 'Simpletons! You cannot comprehend the forces you have set in motion. The ley line conduit will not be disrupted! Your defeat shall be absolute!',13622,6,0,'eregos SAY_SPAWN'), +(-1578011, 'You brash interlopers are out of your element! I will ground you!',13623,1,0,'eregos SAY_AGGRO'), +(-1578012, 'We command the arcane! It shall not be used against us.',13626,1,0,'eregos SAY_ARCANE_SHIELD'), +(-1578013, 'It is trivial to extinguish your fire!',13627,1,0,'eregos SAY_FIRE_SHIELD'), +(-1578014, 'No magic of nature will help you now!',13625,1,0,'eregos SAY_NATURE_SHIELD'), +(-1578015, 'Such insolence... such arrogance... must be PUNISHED!',13624,1,0,'eregos SAY_FRENZY'), +(-1578016, 'It\'s a long way down...',13628,1,0,'eregos SAY_KILL_1'), +(-1578017, 'Back to the earth with you!',13629,1,0,'eregos SAY_KILL_2'), +(-1578018, 'Enjoy the fall!',13630,1,0,'eregos SAY_KILL_3'), +(-1578019, 'Savor this small victory, foolish little creatures. You and your dragon allies have won this battle. But we will win... the Nexus War.',13631,1,0,'eregos SAY_DEATH'); -- -1 580 000 SUNWELL PLATEAU INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES diff --git a/sql/updates/r2383_scriptdev2.sql b/sql/updates/r2383_scriptdev2.sql new file mode 100644 index 000000000..6093d5825 --- /dev/null +++ b/sql/updates/r2383_scriptdev2.sql @@ -0,0 +1,23 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1578019 AND -1578000; +INSERT INTO `script_texts` (`entry`,`content_default`,`sound`,`type`,`language`,`comment`) VALUES +(-1578000, 'What do we have here... those would defy the Spell-Weaver? Those without foresight or understanding. How could I make you see? Malygos is saving the world from itself! Bah! You are hardly worth my time!',13635,1,0,'urom SAY_SUMMON_1'), +(-1578001, 'Clearly my pets failed. Perhaps another demonstration is in order.',13636,1,0,'urom SAY_SUMMON_2'), +(-1578002, 'Still you fight. Still you cling to misguided principles. If you survive, you\'ll find me in the center ring.',13637,1,0,'urom SAY_SUMMON_3'), +(-1578003, 'Poor blind fools!',13638,1,0,'urom SAY_AGGRO'), +(-1578004, 'A taste... just a small taste... of the Spell-Weaver\'s power!',13639,1,0,'urom SAY_EXPLOSION_1'), +(-1578005, 'So much unstable energy... but worth the risk to destroy you!',13640,1,0,'urom SAY_EXPLOSION_2'), +(-1578006, 'If only you understood!',13641,1,0,'urom SAY_KILL_1'), +(-1578007, 'Now do you see? Do you?!',13642,1,0,'urom SAY_KILL_2'), +(-1578008, 'Unfortunate, but necessary.',13643,1,0,'urom SAY_KILL_3'), +(-1578009, 'Everything I\'ve done... has been for Azeroth...',13644,1,0,'urom SAY_DEATH'), + +(-1578010, 'Simpletons! You cannot comprehend the forces you have set in motion. The ley line conduit will not be disrupted! Your defeat shall be absolute!',13622,6,0,'eregos SAY_SPAWN'), +(-1578011, 'You brash interlopers are out of your element! I will ground you!',13623,1,0,'eregos SAY_AGGRO'), +(-1578012, 'We command the arcane! It shall not be used against us.',13626,1,0,'eregos SAY_ARCANE_SHIELD'), +(-1578013, 'It is trivial to extinguish your fire!',13627,1,0,'eregos SAY_FIRE_SHIELD'), +(-1578014, 'No magic of nature will help you now!',13625,1,0,'eregos SAY_NATURE_SHIELD'), +(-1578015, 'Such insolence... such arrogance... must be PUNISHED!',13624,1,0,'eregos SAY_FRENZY'), +(-1578016, 'It\'s a long way down...',13628,1,0,'eregos SAY_KILL_1'), +(-1578017, 'Back to the earth with you!',13629,1,0,'eregos SAY_KILL_2'), +(-1578018, 'Enjoy the fall!',13630,1,0,'eregos SAY_KILL_3'), +(-1578019, 'Savor this small victory, foolish little creatures. You and your dragon allies have won this battle. But we will win... the Nexus War.',13631,1,0,'eregos SAY_DEATH'); From bf339d5cd6c066232da7c37361e18066fa3f2c7f Mon Sep 17 00:00:00 2001 From: Xfurry Date: Thu, 12 Jan 2012 23:17:57 +0200 Subject: [PATCH 0370/1172] [2384] Remove the unnecessary white space from the previous commit --- sd2_revision_nr.h | 2 +- sql/scriptdev2_script_full.sql | 42 ++++++++++++++++---------------- sql/updates/r2383_scriptdev2.sql | 40 +++++++++++++++--------------- 3 files changed, 42 insertions(+), 42 deletions(-) diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index f758c53b1..a8bcd6c3e 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2383" + #define SD2_REVISION_NR "2384" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 20ae0b94b..b9602917d 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -2588,27 +2588,27 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen -- -1 578 000 OCULUS INSERT INTO `script_texts` (`entry`,`content_default`,`sound`,`type`,`language`,`comment`) VALUES -(-1578000, 'What do we have here... those would defy the Spell-Weaver? Those without foresight or understanding. How could I make you see? Malygos is saving the world from itself! Bah! You are hardly worth my time!',13635,1,0,'urom SAY_SUMMON_1'), -(-1578001, 'Clearly my pets failed. Perhaps another demonstration is in order.',13636,1,0,'urom SAY_SUMMON_2'), -(-1578002, 'Still you fight. Still you cling to misguided principles. If you survive, you\'ll find me in the center ring.',13637,1,0,'urom SAY_SUMMON_3'), -(-1578003, 'Poor blind fools!',13638,1,0,'urom SAY_AGGRO'), -(-1578004, 'A taste... just a small taste... of the Spell-Weaver\'s power!',13639,1,0,'urom SAY_EXPLOSION_1'), -(-1578005, 'So much unstable energy... but worth the risk to destroy you!',13640,1,0,'urom SAY_EXPLOSION_2'), -(-1578006, 'If only you understood!',13641,1,0,'urom SAY_KILL_1'), -(-1578007, 'Now do you see? Do you?!',13642,1,0,'urom SAY_KILL_2'), -(-1578008, 'Unfortunate, but necessary.',13643,1,0,'urom SAY_KILL_3'), -(-1578009, 'Everything I\'ve done... has been for Azeroth...',13644,1,0,'urom SAY_DEATH'), - -(-1578010, 'Simpletons! You cannot comprehend the forces you have set in motion. The ley line conduit will not be disrupted! Your defeat shall be absolute!',13622,6,0,'eregos SAY_SPAWN'), -(-1578011, 'You brash interlopers are out of your element! I will ground you!',13623,1,0,'eregos SAY_AGGRO'), -(-1578012, 'We command the arcane! It shall not be used against us.',13626,1,0,'eregos SAY_ARCANE_SHIELD'), -(-1578013, 'It is trivial to extinguish your fire!',13627,1,0,'eregos SAY_FIRE_SHIELD'), -(-1578014, 'No magic of nature will help you now!',13625,1,0,'eregos SAY_NATURE_SHIELD'), -(-1578015, 'Such insolence... such arrogance... must be PUNISHED!',13624,1,0,'eregos SAY_FRENZY'), -(-1578016, 'It\'s a long way down...',13628,1,0,'eregos SAY_KILL_1'), -(-1578017, 'Back to the earth with you!',13629,1,0,'eregos SAY_KILL_2'), -(-1578018, 'Enjoy the fall!',13630,1,0,'eregos SAY_KILL_3'), -(-1578019, 'Savor this small victory, foolish little creatures. You and your dragon allies have won this battle. But we will win... the Nexus War.',13631,1,0,'eregos SAY_DEATH'); +(-1578000,'What do we have here... those would defy the Spell-Weaver? Those without foresight or understanding. How could I make you see? Malygos is saving the world from itself! Bah! You are hardly worth my time!',13635,1,0,'urom SAY_SUMMON_1'), +(-1578001,'Clearly my pets failed. Perhaps another demonstration is in order.',13636,1,0,'urom SAY_SUMMON_2'), +(-1578002,'Still you fight. Still you cling to misguided principles. If you survive, you\'ll find me in the center ring.',13637,1,0,'urom SAY_SUMMON_3'), +(-1578003,'Poor blind fools!',13638,1,0,'urom SAY_AGGRO'), +(-1578004,'A taste... just a small taste... of the Spell-Weaver\'s power!',13639,1,0,'urom SAY_EXPLOSION_1'), +(-1578005,'So much unstable energy... but worth the risk to destroy you!',13640,1,0,'urom SAY_EXPLOSION_2'), +(-1578006,'If only you understood!',13641,1,0,'urom SAY_KILL_1'), +(-1578007,'Now do you see? Do you?!',13642,1,0,'urom SAY_KILL_2'), +(-1578008,'Unfortunate, but necessary.',13643,1,0,'urom SAY_KILL_3'), +(-1578009,'Everything I\'ve done... has been for Azeroth...',13644,1,0,'urom SAY_DEATH'), + +(-1578010,'Simpletons! You cannot comprehend the forces you have set in motion. The ley line conduit will not be disrupted! Your defeat shall be absolute!',13622,6,0,'eregos SAY_SPAWN'), +(-1578011,'You brash interlopers are out of your element! I will ground you!',13623,1,0,'eregos SAY_AGGRO'), +(-1578012,'We command the arcane! It shall not be used against us.',13626,1,0,'eregos SAY_ARCANE_SHIELD'), +(-1578013,'It is trivial to extinguish your fire!',13627,1,0,'eregos SAY_FIRE_SHIELD'), +(-1578014,'No magic of nature will help you now!',13625,1,0,'eregos SAY_NATURE_SHIELD'), +(-1578015,'Such insolence... such arrogance... must be PUNISHED!',13624,1,0,'eregos SAY_FRENZY'), +(-1578016,'It\'s a long way down...',13628,1,0,'eregos SAY_KILL_1'), +(-1578017,'Back to the earth with you!',13629,1,0,'eregos SAY_KILL_2'), +(-1578018,'Enjoy the fall!',13630,1,0,'eregos SAY_KILL_3'), +(-1578019,'Savor this small victory, foolish little creatures. You and your dragon allies have won this battle. But we will win... the Nexus War.',13631,1,0,'eregos SAY_DEATH'); -- -1 580 000 SUNWELL PLATEAU INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES diff --git a/sql/updates/r2383_scriptdev2.sql b/sql/updates/r2383_scriptdev2.sql index 6093d5825..3d1d22f0f 100644 --- a/sql/updates/r2383_scriptdev2.sql +++ b/sql/updates/r2383_scriptdev2.sql @@ -1,23 +1,23 @@ DELETE FROM script_texts WHERE entry BETWEEN -1578019 AND -1578000; INSERT INTO `script_texts` (`entry`,`content_default`,`sound`,`type`,`language`,`comment`) VALUES -(-1578000, 'What do we have here... those would defy the Spell-Weaver? Those without foresight or understanding. How could I make you see? Malygos is saving the world from itself! Bah! You are hardly worth my time!',13635,1,0,'urom SAY_SUMMON_1'), -(-1578001, 'Clearly my pets failed. Perhaps another demonstration is in order.',13636,1,0,'urom SAY_SUMMON_2'), -(-1578002, 'Still you fight. Still you cling to misguided principles. If you survive, you\'ll find me in the center ring.',13637,1,0,'urom SAY_SUMMON_3'), -(-1578003, 'Poor blind fools!',13638,1,0,'urom SAY_AGGRO'), -(-1578004, 'A taste... just a small taste... of the Spell-Weaver\'s power!',13639,1,0,'urom SAY_EXPLOSION_1'), -(-1578005, 'So much unstable energy... but worth the risk to destroy you!',13640,1,0,'urom SAY_EXPLOSION_2'), -(-1578006, 'If only you understood!',13641,1,0,'urom SAY_KILL_1'), -(-1578007, 'Now do you see? Do you?!',13642,1,0,'urom SAY_KILL_2'), -(-1578008, 'Unfortunate, but necessary.',13643,1,0,'urom SAY_KILL_3'), -(-1578009, 'Everything I\'ve done... has been for Azeroth...',13644,1,0,'urom SAY_DEATH'), +(-1578000,'What do we have here... those would defy the Spell-Weaver? Those without foresight or understanding. How could I make you see? Malygos is saving the world from itself! Bah! You are hardly worth my time!',13635,1,0,'urom SAY_SUMMON_1'), +(-1578001,'Clearly my pets failed. Perhaps another demonstration is in order.',13636,1,0,'urom SAY_SUMMON_2'), +(-1578002,'Still you fight. Still you cling to misguided principles. If you survive, you\'ll find me in the center ring.',13637,1,0,'urom SAY_SUMMON_3'), +(-1578003,'Poor blind fools!',13638,1,0,'urom SAY_AGGRO'), +(-1578004,'A taste... just a small taste... of the Spell-Weaver\'s power!',13639,1,0,'urom SAY_EXPLOSION_1'), +(-1578005,'So much unstable energy... but worth the risk to destroy you!',13640,1,0,'urom SAY_EXPLOSION_2'), +(-1578006,'If only you understood!',13641,1,0,'urom SAY_KILL_1'), +(-1578007,'Now do you see? Do you?!',13642,1,0,'urom SAY_KILL_2'), +(-1578008,'Unfortunate, but necessary.',13643,1,0,'urom SAY_KILL_3'), +(-1578009,'Everything I\'ve done... has been for Azeroth...',13644,1,0,'urom SAY_DEATH'), -(-1578010, 'Simpletons! You cannot comprehend the forces you have set in motion. The ley line conduit will not be disrupted! Your defeat shall be absolute!',13622,6,0,'eregos SAY_SPAWN'), -(-1578011, 'You brash interlopers are out of your element! I will ground you!',13623,1,0,'eregos SAY_AGGRO'), -(-1578012, 'We command the arcane! It shall not be used against us.',13626,1,0,'eregos SAY_ARCANE_SHIELD'), -(-1578013, 'It is trivial to extinguish your fire!',13627,1,0,'eregos SAY_FIRE_SHIELD'), -(-1578014, 'No magic of nature will help you now!',13625,1,0,'eregos SAY_NATURE_SHIELD'), -(-1578015, 'Such insolence... such arrogance... must be PUNISHED!',13624,1,0,'eregos SAY_FRENZY'), -(-1578016, 'It\'s a long way down...',13628,1,0,'eregos SAY_KILL_1'), -(-1578017, 'Back to the earth with you!',13629,1,0,'eregos SAY_KILL_2'), -(-1578018, 'Enjoy the fall!',13630,1,0,'eregos SAY_KILL_3'), -(-1578019, 'Savor this small victory, foolish little creatures. You and your dragon allies have won this battle. But we will win... the Nexus War.',13631,1,0,'eregos SAY_DEATH'); +(-1578010,'Simpletons! You cannot comprehend the forces you have set in motion. The ley line conduit will not be disrupted! Your defeat shall be absolute!',13622,6,0,'eregos SAY_SPAWN'), +(-1578011,'You brash interlopers are out of your element! I will ground you!',13623,1,0,'eregos SAY_AGGRO'), +(-1578012,'We command the arcane! It shall not be used against us.',13626,1,0,'eregos SAY_ARCANE_SHIELD'), +(-1578013,'It is trivial to extinguish your fire!',13627,1,0,'eregos SAY_FIRE_SHIELD'), +(-1578014,'No magic of nature will help you now!',13625,1,0,'eregos SAY_NATURE_SHIELD'), +(-1578015,'Such insolence... such arrogance... must be PUNISHED!',13624,1,0,'eregos SAY_FRENZY'), +(-1578016,'It\'s a long way down...',13628,1,0,'eregos SAY_KILL_1'), +(-1578017,'Back to the earth with you!',13629,1,0,'eregos SAY_KILL_2'), +(-1578018,'Enjoy the fall!',13630,1,0,'eregos SAY_KILL_3'), +(-1578019,'Savor this small victory, foolish little creatures. You and your dragon allies have won this battle. But we will win... the Nexus War.',13631,1,0,'eregos SAY_DEATH'); From 032edb97618f0386be0ef3400a7928252fcd2cc7 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sat, 14 Jan 2012 01:50:14 +0200 Subject: [PATCH 0371/1172] [2385] Add basic instance support for Oculus Also fixed codestyle from yesterday commit and slap the commiter for drinking too much while scripting :) --- .../nexus/oculus/instance_oculus.cpp | 116 +++++++++++++++++- scripts/northrend/nexus/oculus/oculus.h | 69 +++++++++++ sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 2 +- sql/scriptdev2_script_full.sql | 47 +++---- sql/updates/r2385_mangos.sql | 1 + sql/updates/r2385_scriptdev2.sql | 4 + 7 files changed, 215 insertions(+), 26 deletions(-) create mode 100644 sql/updates/r2385_mangos.sql create mode 100644 sql/updates/r2385_scriptdev2.sql diff --git a/scripts/northrend/nexus/oculus/instance_oculus.cpp b/scripts/northrend/nexus/oculus/instance_oculus.cpp index e8659606e..60e34de86 100644 --- a/scripts/northrend/nexus/oculus/instance_oculus.cpp +++ b/scripts/northrend/nexus/oculus/instance_oculus.cpp @@ -16,13 +16,125 @@ /* ScriptData SDName: instance_oculus -SD%Complete: 0 -SDComment: Placeholder +SD%Complete: 30 +SDComment: Only basic support SDCategory: Oculus EndScriptData */ #include "precompiled.h" +#include "oculus.h" + +instance_oculus::instance_oculus(Map* pMap) : ScriptedInstance(pMap) +{ + Initialize(); +} + +void instance_oculus::Initialize() +{ + memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); +} + +void instance_oculus::OnCreatureCreate(Creature* pCreature) +{ + switch (pCreature->GetEntry()) + { + case NPC_VAROS: + case NPC_UROM: + case NPC_EREGOS: + m_mNpcEntryGuidStore[pCreature->GetEntry()] = pCreature->GetObjectGuid(); + break; + } +} + +void instance_oculus::OnObjectCreate(GameObject* pGo) +{ + switch(pGo->GetEntry()) + { + case GO_CACHE_EREGOS: + case GO_CACHE_EREGOS_H: + m_mGoEntryGuidStore[pGo->GetEntry()] = pGo->GetObjectGuid(); + break; + } +} + +void instance_oculus::SetData(uint32 uiType, uint32 uiData) +{ + switch(uiType) + { + case TYPE_DRAKOS: + m_auiEncounter[TYPE_DRAKOS] = uiData; + break; + case TYPE_VAROS: + m_auiEncounter[TYPE_VAROS] = uiData; + break; + case TYPE_UROM: + m_auiEncounter[TYPE_UROM] = uiData; + break; + case TYPE_EREGOS: + m_auiEncounter[TYPE_EREGOS] = uiData; + if (uiData == DONE) + { + if (GameObject* pChest = GetSingleGameObjectFromStorage(instance->IsRegularDifficulty() ? GO_CACHE_EREGOS : GO_CACHE_EREGOS_H)) + pChest->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NO_INTERACT); + } + break; + } + + if (uiData == DONE) + { + OUT_SAVE_INST_DATA; + + std::ostringstream saveStream; + saveStream << m_auiEncounter[TYPE_DRAKOS] << " " << m_auiEncounter[TYPE_VAROS] << " " << m_auiEncounter[TYPE_UROM] << " " << m_auiEncounter[TYPE_EREGOS]; + + strInstData = saveStream.str(); + + SaveToDB(); + OUT_SAVE_INST_DATA_COMPLETE; + } +} + +uint32 instance_oculus::GetData(uint32 uiType) +{ + if (uiType < MAX_ENCOUNTER) + return m_auiEncounter[uiType]; + + return 0; +} + +void instance_oculus::Load(const char* chrIn) +{ + if (!chrIn) + { + OUT_LOAD_INST_DATA_FAIL; + return; + } + + OUT_LOAD_INST_DATA(chrIn); + + std::istringstream loadStream(chrIn); + loadStream >> m_auiEncounter[TYPE_DRAKOS] >> m_auiEncounter[TYPE_VAROS] >> m_auiEncounter[TYPE_UROM] >> m_auiEncounter[TYPE_EREGOS]; + + for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) + { + if (m_auiEncounter[i] == IN_PROGRESS) + m_auiEncounter[i] = NOT_STARTED; + } + + OUT_LOAD_INST_DATA_COMPLETE; +} + +InstanceData* GetInstanceData_instance_oculus(Map* pMap) +{ + return new instance_oculus(pMap); +} void AddSC_instance_oculus() { + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "instance_oculus"; + pNewScript->GetInstanceData = &GetInstanceData_instance_oculus; + pNewScript->RegisterSelf(); } diff --git a/scripts/northrend/nexus/oculus/oculus.h b/scripts/northrend/nexus/oculus/oculus.h index 5871a49a1..fd3bc781d 100644 --- a/scripts/northrend/nexus/oculus/oculus.h +++ b/scripts/northrend/nexus/oculus/oculus.h @@ -1,3 +1,72 @@ /* Copyright (C) 2006 - 2012 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ + +#ifndef DEF_OCULUS_H +#define DEF_OCULUS_H + +/* Encounters + * Drakos = 0 + * Varos = 1 + * Urom = 2 + * Eregos = 3 + */ + +enum +{ + MAX_ENCOUNTER = 4, + + TYPE_DRAKOS = 0, + TYPE_VAROS = 1, + TYPE_UROM = 2, + TYPE_EREGOS = 3, + + NPC_DRAKOS = 27654, + NPC_VAROS = 27447, + NPC_UROM = 27655, + NPC_EREGOS = 27656, + + NPC_ETERNOS = 27659, // bronze + NPC_VERDISA = 27657, // emerald + NPC_BELGARISTRASZ = 27658, // ruby + + // Cages in which the friendly dragons are hold + GO_DRAGON_CAGE_DOOR = 193995, + + // Loot + GO_CACHE_EREGOS = 191349, + GO_CACHE_EREGOS_H = 193603, + + // Yells after Drakos dies + SAY_VAROS_INTRO = -1578020, + SAY_BELGARISTRASZ_GREET = -1578021, + + // world states to show how many constructs are still alive + WORLD_STATE_CONSTRUCTS = 3524, + WORLD_STATE_CONSTRUCTS_COUNT = 3486, + + ACHIEV_START_EREGOS_ID = 18153, // eregos timed kill achiev +}; + +class MANGOS_DLL_DECL instance_oculus : public ScriptedInstance +{ + public: + instance_oculus(Map* pMap); + + void Initialize(); + + void OnCreatureCreate(Creature* pCreature); + void OnObjectCreate(GameObject* pGo); + + void SetData(uint32 uiType, uint32 uiData); + uint32 GetData(uint32 uiType); + + const char* Save() { return strInstData.c_str(); } + void Load(const char* chrIn); + + protected: + uint32 m_auiEncounter[MAX_ENCOUNTER]; + std::string strInstData; +}; + +#endif diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index a8bcd6c3e..1a4b5ce31 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2384" + #define SD2_REVISION_NR "2385" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index bc6bdfe1b..6c8f9344f 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -860,7 +860,7 @@ UPDATE gameobject_template SET ScriptName='go_containment_sphere' WHERE entry IN UPDATE instance_template SET ScriptName='instance_nexus' WHERE map=576; /* OCULUS */ - +UPDATE instance_template SET ScriptName='instance_oculus' WHERE map=578; /* OBSIDIAN SANCTUM */ UPDATE instance_template SET ScriptName='instance_obsidian_sanctum' WHERE map=615; diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index b9602917d..867a09c28 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -2587,28 +2587,31 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1576022,'%s shields himself and divert his power to the rifts!',0,3,0,0,'anomalus EMOTE_SHIELD'); -- -1 578 000 OCULUS -INSERT INTO `script_texts` (`entry`,`content_default`,`sound`,`type`,`language`,`comment`) VALUES -(-1578000,'What do we have here... those would defy the Spell-Weaver? Those without foresight or understanding. How could I make you see? Malygos is saving the world from itself! Bah! You are hardly worth my time!',13635,1,0,'urom SAY_SUMMON_1'), -(-1578001,'Clearly my pets failed. Perhaps another demonstration is in order.',13636,1,0,'urom SAY_SUMMON_2'), -(-1578002,'Still you fight. Still you cling to misguided principles. If you survive, you\'ll find me in the center ring.',13637,1,0,'urom SAY_SUMMON_3'), -(-1578003,'Poor blind fools!',13638,1,0,'urom SAY_AGGRO'), -(-1578004,'A taste... just a small taste... of the Spell-Weaver\'s power!',13639,1,0,'urom SAY_EXPLOSION_1'), -(-1578005,'So much unstable energy... but worth the risk to destroy you!',13640,1,0,'urom SAY_EXPLOSION_2'), -(-1578006,'If only you understood!',13641,1,0,'urom SAY_KILL_1'), -(-1578007,'Now do you see? Do you?!',13642,1,0,'urom SAY_KILL_2'), -(-1578008,'Unfortunate, but necessary.',13643,1,0,'urom SAY_KILL_3'), -(-1578009,'Everything I\'ve done... has been for Azeroth...',13644,1,0,'urom SAY_DEATH'), - -(-1578010,'Simpletons! You cannot comprehend the forces you have set in motion. The ley line conduit will not be disrupted! Your defeat shall be absolute!',13622,6,0,'eregos SAY_SPAWN'), -(-1578011,'You brash interlopers are out of your element! I will ground you!',13623,1,0,'eregos SAY_AGGRO'), -(-1578012,'We command the arcane! It shall not be used against us.',13626,1,0,'eregos SAY_ARCANE_SHIELD'), -(-1578013,'It is trivial to extinguish your fire!',13627,1,0,'eregos SAY_FIRE_SHIELD'), -(-1578014,'No magic of nature will help you now!',13625,1,0,'eregos SAY_NATURE_SHIELD'), -(-1578015,'Such insolence... such arrogance... must be PUNISHED!',13624,1,0,'eregos SAY_FRENZY'), -(-1578016,'It\'s a long way down...',13628,1,0,'eregos SAY_KILL_1'), -(-1578017,'Back to the earth with you!',13629,1,0,'eregos SAY_KILL_2'), -(-1578018,'Enjoy the fall!',13630,1,0,'eregos SAY_KILL_3'), -(-1578019,'Savor this small victory, foolish little creatures. You and your dragon allies have won this battle. But we will win... the Nexus War.',13631,1,0,'eregos SAY_DEATH'); +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1578000,'What do we have here... those would defy the Spell-Weaver? Those without foresight or understanding. How could I make you see? Malygos is saving the world from itself! Bah! You are hardly worth my time!',13635,1,0,0,'urom SAY_SUMMON_1'), +(-1578001,'Clearly my pets failed. Perhaps another demonstration is in order.',13636,1,0,0,'urom SAY_SUMMON_2'), +(-1578002,'Still you fight. Still you cling to misguided principles. If you survive, you\'ll find me in the center ring.',13637,1,0,0,'urom SAY_SUMMON_3'), +(-1578003,'Poor blind fools!',13638,1,0,0,'urom SAY_AGGRO'), +(-1578004,'A taste... just a small taste... of the Spell-Weaver\'s power!',13639,1,0,0,'urom SAY_EXPLOSION_1'), +(-1578005,'So much unstable energy... but worth the risk to destroy you!',13640,1,0,0,'urom SAY_EXPLOSION_2'), +(-1578006,'If only you understood!',13641,1,0,0,'urom SAY_KILL_1'), +(-1578007,'Now do you see? Do you?!',13642,1,0,0,'urom SAY_KILL_2'), +(-1578008,'Unfortunate, but necessary.',13643,1,0,0,'urom SAY_KILL_3'), +(-1578009,'Everything I\'ve done... has been for Azeroth...',13644,1,0,0,'urom SAY_DEATH'), + +(-1578010,'Simpletons! You cannot comprehend the forces you have set in motion. The ley line conduit will not be disrupted! Your defeat shall be absolute!',13622,6,0,0,'eregos SAY_SPAWN'), +(-1578011,'You brash interlopers are out of your element! I will ground you!',13623,1,0,0,'eregos SAY_AGGRO'), +(-1578012,'We command the arcane! It shall not be used against us.',13626,1,0,0,'eregos SAY_ARCANE_SHIELD'), +(-1578013,'It is trivial to extinguish your fire!',13627,1,0,0,'eregos SAY_FIRE_SHIELD'), +(-1578014,'No magic of nature will help you now!',13625,1,0,0,'eregos SAY_NATURE_SHIELD'), +(-1578015,'Such insolence... such arrogance... must be PUNISHED!',13624,1,0,0,'eregos SAY_FRENZY'), +(-1578016,'It\'s a long way down...',13628,1,0,0,'eregos SAY_KILL_1'), +(-1578017,'Back to the earth with you!',13629,1,0,0,'eregos SAY_KILL_2'), +(-1578018,'Enjoy the fall!',13630,1,0,0,'eregos SAY_KILL_3'), +(-1578019,'Savor this small victory, foolish little creatures. You and your dragon allies have won this battle. But we will win... the Nexus War.',13631,1,0,0,'eregos SAY_DEATH'), + +(-1578020,'Intruders, your victory will be short-lived. I am Commander Varos Cloudstrider. My drakes control the skies and protect this conduit. I will see to it personally that the Oculus does not fall into your hands!',13648,6,0,0,'varos SAY_VAROS_INTRO'), +(-1578021,'Thank you for freeing us, mortals. Beware, the Blue Flight is alerted to your presence. Even now, Malygos sends Varos Cloudstrider and his ring guardians to defend the Oculus. You will need our help to stand a chance.',0,0,0,1,'belgaristrasz SAY_BELGARISTRASZ_GREET'); -- -1 580 000 SUNWELL PLATEAU INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES diff --git a/sql/updates/r2385_mangos.sql b/sql/updates/r2385_mangos.sql new file mode 100644 index 000000000..cbb854df5 --- /dev/null +++ b/sql/updates/r2385_mangos.sql @@ -0,0 +1 @@ +UPDATE instance_template SET ScriptName='instance_oculus' WHERE map=578; diff --git a/sql/updates/r2385_scriptdev2.sql b/sql/updates/r2385_scriptdev2.sql new file mode 100644 index 000000000..5ee832659 --- /dev/null +++ b/sql/updates/r2385_scriptdev2.sql @@ -0,0 +1,4 @@ +DELETE FROM script_texts WHERE entry IN (-1578020, -1578021); +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1578020,'Intruders, your victory will be short-lived. I am Commander Varos Cloudstrider. My drakes control the skies and protect this conduit. I will see to it personally that the Oculus does not fall into your hands!',13648,6,0,0,'varos SAY_VAROS_INTRO'), +(-1578021,'Thank you for freeing us, mortals. Beware, the Blue Flight is alerted to your presence. Even now, Malygos sends Varos Cloudstrider and his ring guardians to defend the Oculus. You will need our help to stand a chance.',0,0,0,1,'belgaristrasz SAY_BELGARISTRASZ_GREET'); From c1e5be4f0e1b2b18396673377f46689244c3bb3f Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sat, 14 Jan 2012 02:01:01 +0200 Subject: [PATCH 0372/1172] [2386] Add Oculus instance data support for bosses already included in ACID 3.0.9 --- .../nexus/oculus/instance_oculus.cpp | 27 +++++++++++++++++++ scripts/northrend/nexus/oculus/oculus.h | 4 +++ sd2_revision_nr.h | 2 +- 3 files changed, 32 insertions(+), 1 deletion(-) diff --git a/scripts/northrend/nexus/oculus/instance_oculus.cpp b/scripts/northrend/nexus/oculus/instance_oculus.cpp index 60e34de86..5a5c4f7a8 100644 --- a/scripts/northrend/nexus/oculus/instance_oculus.cpp +++ b/scripts/northrend/nexus/oculus/instance_oculus.cpp @@ -102,6 +102,33 @@ uint32 instance_oculus::GetData(uint32 uiType) return 0; } +void instance_oculus::OnCreatureEnterCombat(Creature* pCreature) +{ + switch (pCreature->GetEntry()) + { + case NPC_DRAKOS: SetData(TYPE_DRAKOS, IN_PROGRESS); break; + case NPC_VAROS: SetData(TYPE_VAROS, IN_PROGRESS); break; + } +} + +void instance_oculus::OnCreatureEvade(Creature* pCreature) +{ + switch (pCreature->GetEntry()) + { + case NPC_DRAKOS: SetData(TYPE_DRAKOS, FAIL); break; + case NPC_VAROS: SetData(TYPE_VAROS, FAIL); break; + } +} + +void instance_oculus::OnCreatureDeath(Creature* pCreature) +{ + switch (pCreature->GetEntry()) + { + case NPC_DRAKOS: SetData(TYPE_DRAKOS, DONE); break; + case NPC_VAROS: SetData(TYPE_VAROS, DONE); break; + } +} + void instance_oculus::Load(const char* chrIn) { if (!chrIn) diff --git a/scripts/northrend/nexus/oculus/oculus.h b/scripts/northrend/nexus/oculus/oculus.h index fd3bc781d..41b036ec9 100644 --- a/scripts/northrend/nexus/oculus/oculus.h +++ b/scripts/northrend/nexus/oculus/oculus.h @@ -58,6 +58,10 @@ class MANGOS_DLL_DECL instance_oculus : public ScriptedInstance void OnCreatureCreate(Creature* pCreature); void OnObjectCreate(GameObject* pGo); + void OnCreatureEnterCombat(Creature* pCreature); + void OnCreatureEvade(Creature* pCreature); + void OnCreatureDeath(Creature* pCreature); + void SetData(uint32 uiType, uint32 uiData); uint32 GetData(uint32 uiType); diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 1a4b5ce31..9480c814b 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2385" + #define SD2_REVISION_NR "2386" #endif // __SD2_REVISION_NR_H__ From 182ce46c2460d34914e9bd193981c1c7b30dd9b5 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sat, 14 Jan 2012 02:13:23 +0200 Subject: [PATCH 0373/1172] [2387] Add basic script and instance data support for Oculus bosses - Urom and Eregos --- .../northrend/nexus/oculus/boss_eregos.cpp | 73 ++++++++++++++++++- scripts/northrend/nexus/oculus/boss_urom.cpp | 73 ++++++++++++++++++- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 2 + sql/updates/r2387_mangos.sql | 2 + 5 files changed, 147 insertions(+), 5 deletions(-) create mode 100644 sql/updates/r2387_mangos.sql diff --git a/scripts/northrend/nexus/oculus/boss_eregos.cpp b/scripts/northrend/nexus/oculus/boss_eregos.cpp index 547d2a760..0c28532c3 100644 --- a/scripts/northrend/nexus/oculus/boss_eregos.cpp +++ b/scripts/northrend/nexus/oculus/boss_eregos.cpp @@ -16,12 +16,13 @@ /* ScriptData SDName: boss_eregos -SD%Complete: 20 -SDComment: only yells +SD%Complete: 30 +SDComment: only yells and instance data support SDCategory: Oculus EndScriptData */ #include "precompiled.h" +#include "oculus.h" enum { @@ -37,6 +38,74 @@ enum SAY_DEATH = -1578019, }; +struct MANGOS_DLL_DECL boss_eregosAI : public ScriptedAI +{ + boss_eregosAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); + Reset(); + } + + ScriptedInstance* m_pInstance; + bool m_bIsRegularMode; + + void Reset() + { + } + + void Aggro(Unit* pWho) + { + DoScriptText(SAY_AGGRO, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_EREGOS, IN_PROGRESS); + } + + void KilledUnit(Unit* pVictim) + { + switch(urand(0, 2)) + { + case 0: DoScriptText(SAY_KILL_1, m_creature); break; + case 1: DoScriptText(SAY_KILL_2, m_creature); break; + case 2: DoScriptText(SAY_KILL_3, m_creature); break; + } + } + + void JustDied(Unit* pKiller) + { + DoScriptText(SAY_DEATH, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_EREGOS, DONE); + } + + void JustReachedHome() + { + if (m_pInstance) + m_pInstance->SetData(TYPE_EREGOS, FAIL); + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_eregos(Creature* pCreature) +{ + return new boss_eregosAI(pCreature); +} + void AddSC_boss_eregos() { + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_eregos"; + pNewScript->GetAI = &GetAI_boss_eregos; + pNewScript->RegisterSelf(); } diff --git a/scripts/northrend/nexus/oculus/boss_urom.cpp b/scripts/northrend/nexus/oculus/boss_urom.cpp index 49fa87cff..dec478926 100644 --- a/scripts/northrend/nexus/oculus/boss_urom.cpp +++ b/scripts/northrend/nexus/oculus/boss_urom.cpp @@ -16,12 +16,13 @@ /* ScriptData SDName: boss_urom -SD%Complete: 20 -SDComment: only yells +SD%Complete: 30 +SDComment: only yells and instance data support SDCategory: Oculus EndScriptData */ #include "precompiled.h" +#include "oculus.h" enum { @@ -37,6 +38,74 @@ enum SAY_DEATH = -1578009, }; +struct MANGOS_DLL_DECL boss_uromAI : public ScriptedAI +{ + boss_uromAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); + Reset(); + } + + ScriptedInstance* m_pInstance; + bool m_bIsRegularMode; + + void Reset() + { + } + + void Aggro(Unit* pWho) + { + DoScriptText(SAY_AGGRO, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_UROM, IN_PROGRESS); + } + + void KilledUnit(Unit* pVictim) + { + switch(urand(0, 2)) + { + case 0: DoScriptText(SAY_KILL_1, m_creature); break; + case 1: DoScriptText(SAY_KILL_2, m_creature); break; + case 2: DoScriptText(SAY_KILL_3, m_creature); break; + } + } + + void JustDied(Unit* pKiller) + { + DoScriptText(SAY_DEATH, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_UROM, DONE); + } + + void JustReachedHome() + { + if (m_pInstance) + m_pInstance->SetData(TYPE_UROM, FAIL); + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_urom(Creature* pCreature) +{ + return new boss_uromAI(pCreature); +} + void AddSC_boss_urom() { + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_urom"; + pNewScript->GetAI = &GetAI_boss_urom; + pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 9480c814b..b1bb7d9d9 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2386" + #define SD2_REVISION_NR "2387" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 6c8f9344f..914645d7b 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -861,6 +861,8 @@ UPDATE instance_template SET ScriptName='instance_nexus' WHERE map=576; /* OCULUS */ UPDATE instance_template SET ScriptName='instance_oculus' WHERE map=578; +UPDATE creature_template SET ScriptName='boss_eregos' WHERE entry=27656; +UPDATE creature_template SET ScriptName='boss_urom' WHERE entry=27655; /* OBSIDIAN SANCTUM */ UPDATE instance_template SET ScriptName='instance_obsidian_sanctum' WHERE map=615; diff --git a/sql/updates/r2387_mangos.sql b/sql/updates/r2387_mangos.sql new file mode 100644 index 000000000..95d3097c5 --- /dev/null +++ b/sql/updates/r2387_mangos.sql @@ -0,0 +1,2 @@ +UPDATE creature_template SET ScriptName='boss_eregos' WHERE entry=27656; +UPDATE creature_template SET ScriptName='boss_urom' WHERE entry=27655; From 3e68088ed3945021cbfb179e5426d6c8cc1c8706 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sat, 14 Jan 2012 04:14:15 +0200 Subject: [PATCH 0374/1172] [2388] Improve script for Anomalus - Nexus --- .../northrend/nexus/nexus/boss_anomalus.cpp | 117 ++++++++++-------- sd2_revision_nr.h | 2 +- 2 files changed, 68 insertions(+), 51 deletions(-) diff --git a/scripts/northrend/nexus/nexus/boss_anomalus.cpp b/scripts/northrend/nexus/nexus/boss_anomalus.cpp index 78db41a5f..08c7afc2b 100644 --- a/scripts/northrend/nexus/nexus/boss_anomalus.cpp +++ b/scripts/northrend/nexus/nexus/boss_anomalus.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: Boss_Anomalus -SD%Complete: 50% -SDComment: TODO: remove hacks, add support for rift charging +SD%Complete: 80% +SDComment: Achiev support NYI SDCategory: Nexus EndScriptData */ @@ -42,7 +42,6 @@ enum SPELL_SPARK = 47751, SPELL_SPARK_H = 57062, - SPELL_ARCANE_FORM = 48019, // Chaotic Rift SPELL_RIFT_AURA = 47687, SPELL_RIFT_SUMMON_AURA = 47732, @@ -51,7 +50,6 @@ enum SPELL_CHARGED_RIFT_AURA = 47733, SPELL_CHARGED_RIFT_SUMMON_AURA = 47742, - SPELL_SUMMON_CRAZED_MANA_WRAITH = 47692, NPC_CHAOTIC_RIFT = 26918, NPC_CRAZED_MANA_WRAITH = 26746 }; @@ -64,30 +62,33 @@ struct MANGOS_DLL_DECL boss_anomalusAI : public ScriptedAI { boss_anomalusAI(Creature* pCreature) : ScriptedAI(pCreature) { - m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_pInstance = (instance_nexus*)pCreature->GetInstanceData(); m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); Reset(); } - ScriptedInstance* m_pInstance; + instance_nexus* m_pInstance; bool m_bIsRegularMode; bool m_bChaoticRift; uint32 m_uiSparkTimer; uint32 m_uiCreateRiftTimer; - ObjectGuid m_chaoticRiftGuid; + uint8 m_uiChaoticRiftCount; void Reset() { m_bChaoticRift = false; m_uiSparkTimer = 5000; m_uiCreateRiftTimer = 25000; - m_chaoticRiftGuid.Clear(); + m_uiChaoticRiftCount = 0; } void Aggro(Unit* pWho) { DoScriptText(SAY_AGGRO, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_ANOMALUS, IN_PROGRESS); } void JustDied(Unit* pKiller) @@ -108,7 +109,7 @@ struct MANGOS_DLL_DECL boss_anomalusAI : public ScriptedAI { if (pSummoned->GetEntry() == NPC_CHAOTIC_RIFT) { - m_chaoticRiftGuid = pSummoned->GetObjectGuid(); + ++m_uiChaoticRiftCount; DoScriptText(SAY_RIFT, m_creature); @@ -117,27 +118,20 @@ struct MANGOS_DLL_DECL boss_anomalusAI : public ScriptedAI } } - void SummonedCreatureDespawn(Creature* pSummoned) + void SummonedCreatureJustDied(Creature* pSummoned) { - if (pSummoned->GetObjectGuid() == m_chaoticRiftGuid) + if (pSummoned->GetEntry() == NPC_CHAOTIC_RIFT) { - if (m_creature->HasAura(SPELL_RIFT_SHIELD)) - m_creature->RemoveAurasDueToSpell(SPELL_RIFT_SHIELD); + --m_uiChaoticRiftCount; - m_chaoticRiftGuid.Clear(); + if (!m_uiChaoticRiftCount) + { + if (m_creature->HasAura(SPELL_RIFT_SHIELD)) + m_creature->RemoveAurasDueToSpell(SPELL_RIFT_SHIELD); + } } } - void CreateRiftAtRandomPoint() - { - float fPosX, fPosY, fPosZ; - m_creature->GetPosition(fPosX, fPosY, fPosZ); - m_creature->GetRandomPoint(fPosX, fPosY, fPosZ, urand(15, 25), fPosX, fPosY, fPosZ); - - m_creature->SummonCreature(NPC_CHAOTIC_RIFT, fPosX, fPosY, fPosZ, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 10000); - DoScriptText(EMOTE_OPEN_RIFT, m_creature); - } - void UpdateAI(const uint32 uiDiff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim() || m_creature->HasAura(SPELL_RIFT_SHIELD)) @@ -146,19 +140,29 @@ struct MANGOS_DLL_DECL boss_anomalusAI : public ScriptedAI // Create additional Chaotic Rift at 50% HP if (!m_bChaoticRift && m_creature->GetHealthPercent() < 50.0f) { - DoScriptText(EMOTE_SHIELD, m_creature); - CreateRiftAtRandomPoint(); - - DoScriptText(SAY_SHIELD, m_creature); - DoCastSpellIfCan(m_creature, SPELL_RIFT_SHIELD); - m_bChaoticRift = true; + // create a rift then set shield up and finally charge rift + if (DoCastSpellIfCan(m_creature, SPELL_CREATE_RIFT, CAST_TRIGGERED) == CAST_OK) + { + // emotes are in this order + DoScriptText(EMOTE_SHIELD, m_creature); + DoScriptText(SAY_SHIELD, m_creature); + DoScriptText(EMOTE_OPEN_RIFT, m_creature); + + DoCastSpellIfCan(m_creature, SPELL_RIFT_SHIELD, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_CHARGE_RIFT, CAST_TRIGGERED); + m_bChaoticRift = true; + } return; } if (m_uiCreateRiftTimer < uiDiff) { - CreateRiftAtRandomPoint(); - m_uiCreateRiftTimer = 25000; + if (DoCastSpellIfCan(m_creature, SPELL_CREATE_RIFT) == CAST_OK) + { + DoScriptText(SAY_RIFT, m_creature); + DoScriptText(EMOTE_OPEN_RIFT, m_creature); + m_uiCreateRiftTimer = 25000; + } } else m_uiCreateRiftTimer -= uiDiff; @@ -184,20 +188,20 @@ CreatureAI* GetAI_boss_anomalus(Creature* pCreature) struct MANGOS_DLL_DECL mob_chaotic_riftAI : public Scripted_NoMovementAI { - mob_chaotic_riftAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) - { - m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - Reset(); - } + mob_chaotic_riftAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { Reset(); } - ScriptedInstance* m_pInstance; - uint32 m_uiSummonTimer; + uint32 m_uiChargedRemoveTimer; void Reset() { - m_uiSummonTimer = 16000; - DoCastSpellIfCan(m_creature, SPELL_RIFT_AURA); - //DoCastSpellIfCan(m_creature, SPELL_RIFT_SUMMON_AURA); + m_uiChargedRemoveTimer = 0; + } + + void Aggro(Unit* pWho) + { + // Auras are applied on aggro because there are many npcs with this entry in the instance + DoCastSpellIfCan(m_creature, SPELL_RIFT_AURA, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_RIFT_SUMMON_AURA, CAST_TRIGGERED); } void JustSummoned(Creature* pSummoned) @@ -209,21 +213,34 @@ struct MANGOS_DLL_DECL mob_chaotic_riftAI : public Scripted_NoMovementAI } } + void SpellHit(Unit* pCaster, const SpellEntry* pSpell) + { + // When hit with Charge Rift cast the Charged Rift spells + if (pSpell->Id == SPELL_CHARGE_RIFT) + { + DoCastSpellIfCan(m_creature, SPELL_CHARGED_RIFT_AURA, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_CHARGED_RIFT_SUMMON_AURA, CAST_TRIGGERED); + m_uiChargedRemoveTimer = 45000; + } + } + void UpdateAI(const uint32 uiDiff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - if (!m_creature->HasAura(SPELL_ARCANE_FORM)) - DoCastSpellIfCan(m_creature, SPELL_ARCANE_FORM); - - if (m_uiSummonTimer < uiDiff) + if (m_uiChargedRemoveTimer) { - DoCastSpellIfCan(m_creature, SPELL_SUMMON_CRAZED_MANA_WRAITH); - m_uiSummonTimer = 16000; + // The charged spells need to be removed by casting the normal ones in case the npc isn't killed + if (m_uiChargedRemoveTimer <= uiDiff) + { + DoCastSpellIfCan(m_creature, SPELL_RIFT_AURA, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_RIFT_SUMMON_AURA, CAST_TRIGGERED); + m_uiChargedRemoveTimer = 0; + } + else + m_uiChargedRemoveTimer -= uiDiff; } - else - m_uiSummonTimer -= uiDiff; } }; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index b1bb7d9d9..fe73027df 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2387" + #define SD2_REVISION_NR "2388" #endif // __SD2_REVISION_NR_H__ From abadf25686cdf5bc18f6ef983d973060e63c1e33 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sat, 14 Jan 2012 11:01:11 +0200 Subject: [PATCH 0375/1172] [2389] Implement support for Achievement 2037 - Chaos Theory --- .../northrend/nexus/nexus/boss_anomalus.cpp | 8 +++++-- .../northrend/nexus/nexus/instance_nexus.cpp | 23 +++++++++++++++++++ scripts/northrend/nexus/nexus/nexus.h | 10 ++++++++ sd2_revision_nr.h | 2 +- 4 files changed, 40 insertions(+), 3 deletions(-) diff --git a/scripts/northrend/nexus/nexus/boss_anomalus.cpp b/scripts/northrend/nexus/nexus/boss_anomalus.cpp index 08c7afc2b..2f431be28 100644 --- a/scripts/northrend/nexus/nexus/boss_anomalus.cpp +++ b/scripts/northrend/nexus/nexus/boss_anomalus.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: Boss_Anomalus -SD%Complete: 80% -SDComment: Achiev support NYI +SD%Complete: 90% +SDComment: Small adjustments required SDCategory: Nexus EndScriptData */ @@ -124,6 +124,10 @@ struct MANGOS_DLL_DECL boss_anomalusAI : public ScriptedAI { --m_uiChaoticRiftCount; + // If players kill the Chaotic Rifts then mark the achievement as false + if (m_pInstance) + m_pInstance->SetSpecialAchievementCriteria(TYPE_ACHIEV_CHAOS_THEORY, false); + if (!m_uiChaoticRiftCount) { if (m_creature->HasAura(SPELL_RIFT_SHIELD)) diff --git a/scripts/northrend/nexus/nexus/instance_nexus.cpp b/scripts/northrend/nexus/nexus/instance_nexus.cpp index 5f5a9cfc4..7172d3531 100644 --- a/scripts/northrend/nexus/nexus/instance_nexus.cpp +++ b/scripts/northrend/nexus/nexus/instance_nexus.cpp @@ -45,6 +45,9 @@ bool GOUse_go_containment_sphere(Player* pPlayer, GameObject* pGo) instance_nexus::instance_nexus(Map* pMap) : ScriptedInstance(pMap) { Initialize(); + + for (uint8 i = 0; i < MAX_SPECIAL_ACHIEV_CRITS; ++i) + m_abAchievCriteria[i] = false; } void instance_nexus::Initialize() @@ -103,6 +106,8 @@ void instance_nexus::SetData(uint32 uiType, uint32 uiData) break; case TYPE_ANOMALUS: m_auiEncounter[uiType] = uiData; + if (uiData == IN_PROGRESS) + SetSpecialAchievementCriteria(TYPE_ACHIEV_CHAOS_THEORY, true); if (uiData == DONE) { if (GameObject* pGo = GetSingleGameObjectFromStorage(GO_CONTAINMENT_SPHERE_ANOMALUS)) @@ -152,6 +157,24 @@ void instance_nexus::SetData(uint32 uiType, uint32 uiData) } } +void instance_nexus::SetSpecialAchievementCriteria(uint32 uiType, bool bIsMet) +{ + if (uiType < MAX_SPECIAL_ACHIEV_CRITS) + m_abAchievCriteria[uiType] = bIsMet; +} + +bool instance_nexus::CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/) +{ + switch (uiCriteriaId) + { + case ACHIEV_CRIT_CHAOS_THEORY: + return m_abAchievCriteria[TYPE_ACHIEV_CHAOS_THEORY]; + + default: + return false; + } +} + void instance_nexus::Load(const char* chrIn) { if (!chrIn) diff --git a/scripts/northrend/nexus/nexus/nexus.h b/scripts/northrend/nexus/nexus/nexus.h index 4c46d0489..1fdafb728 100644 --- a/scripts/northrend/nexus/nexus/nexus.h +++ b/scripts/northrend/nexus/nexus/nexus.h @@ -8,12 +8,15 @@ enum { MAX_ENCOUNTER = 4, + MAX_SPECIAL_ACHIEV_CRITS = 1, TYPE_TELESTRA = 0, TYPE_ANOMALUS = 1, TYPE_ORMOROK = 2, TYPE_KERISTRASZA = 3, + TYPE_ACHIEV_CHAOS_THEORY = 0, + NPC_TELESTRA = 26731, NPC_ANOMALUS = 26763, NPC_ORMOROK = 26794, @@ -24,6 +27,8 @@ enum GO_CONTAINMENT_SPHERE_ORMOROK = 188528, SPELL_FROZEN_PRISON = 47854, + + ACHIEV_CRIT_CHAOS_THEORY = 7316, // Anomalus, achiev 2037 }; class MANGOS_DLL_DECL instance_nexus : public ScriptedInstance @@ -39,6 +44,9 @@ class MANGOS_DLL_DECL instance_nexus : public ScriptedInstance uint32 GetData(uint32 uiType); void SetData(uint32 uiType, uint32 uiData); + void SetSpecialAchievementCriteria(uint32 uiType, bool bIsMet); + bool CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/); + const char* Save() { return m_strInstData.c_str(); } void Load(const char* chrIn); @@ -46,6 +54,8 @@ class MANGOS_DLL_DECL instance_nexus : public ScriptedInstance private: uint32 m_auiEncounter[MAX_ENCOUNTER]; std::string m_strInstData; + + bool m_abAchievCriteria[MAX_SPECIAL_ACHIEV_CRITS]; }; #endif diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index fe73027df..e12a9bee1 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2388" + #define SD2_REVISION_NR "2389" #endif // __SD2_REVISION_NR_H__ From a4af5f713aa839ee1e2de299d4dadf55f834dd8c Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sat, 14 Jan 2012 12:14:59 +0200 Subject: [PATCH 0376/1172] [2390] Implement support for Achievement 2150 - Split Personality --- .../northrend/nexus/nexus/boss_telestra.cpp | 31 +++++++++++++++++-- .../northrend/nexus/nexus/instance_nexus.cpp | 4 +++ scripts/northrend/nexus/nexus/nexus.h | 4 ++- sd2_revision_nr.h | 2 +- 4 files changed, 37 insertions(+), 4 deletions(-) diff --git a/scripts/northrend/nexus/nexus/boss_telestra.cpp b/scripts/northrend/nexus/nexus/boss_telestra.cpp index 673803580..267575359 100644 --- a/scripts/northrend/nexus/nexus/boss_telestra.cpp +++ b/scripts/northrend/nexus/nexus/boss_telestra.cpp @@ -75,29 +75,35 @@ struct MANGOS_DLL_DECL boss_telestraAI : public ScriptedAI { boss_telestraAI(Creature* pCreature) : ScriptedAI(pCreature) { - m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_pInstance = (instance_nexus*)pCreature->GetInstanceData(); m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); Reset(); } - ScriptedInstance* m_pInstance; + instance_nexus* m_pInstance; bool m_bIsRegularMode; uint8 m_uiPhase; uint8 m_uiCloneDeadCount; + uint32 m_uiPersonalityTimer; uint32 m_uiFirebombTimer; uint32 m_uiIceNovaTimer; uint32 m_uiGravityWellTimer; + bool m_bCanCheckAchiev; + void Reset() { m_uiPhase = PHASE_1; m_uiCloneDeadCount = 0; + m_uiPersonalityTimer = 0; m_uiFirebombTimer = urand(2000, 4000); m_uiIceNovaTimer = urand(8000, 12000); m_uiGravityWellTimer = urand(15000, 25000); + + m_bCanCheckAchiev = false; } void JustReachedHome() @@ -120,6 +126,9 @@ struct MANGOS_DLL_DECL boss_telestraAI : public ScriptedAI void Aggro(Unit* pWho) { DoScriptText(SAY_AGGRO, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_TELESTRA, IN_PROGRESS); } void JustDied(Unit* pKiller) @@ -147,6 +156,13 @@ struct MANGOS_DLL_DECL boss_telestraAI : public ScriptedAI { ++m_uiCloneDeadCount; + // After the first clone from each split phase is dead start the achiev timer + if (m_uiCloneDeadCount == 1 || m_uiCloneDeadCount == 4) + { + m_bCanCheckAchiev = true; + m_uiPersonalityTimer = 0; + } + if (m_uiCloneDeadCount == 3 || m_uiCloneDeadCount == 6) { m_creature->RemoveAurasDueToSpell(SPELL_SUMMON_CLONES); @@ -156,6 +172,14 @@ struct MANGOS_DLL_DECL boss_telestraAI : public ScriptedAI DoScriptText(SAY_MERGE, m_creature); + // Check if it took longer than 5 sec + if (m_uiPersonalityTimer > 5000) + { + if (m_pInstance) + m_pInstance->SetSpecialAchievementCriteria(TYPE_ACHIEV_SPLIT_PERSONALITY, false); + } + m_bCanCheckAchiev = false; + m_uiPhase = m_uiCloneDeadCount == 3 ? PHASE_3 : PHASE_4; } break; @@ -181,6 +205,9 @@ struct MANGOS_DLL_DECL boss_telestraAI : public ScriptedAI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; + if (m_bCanCheckAchiev) + m_uiPersonalityTimer += uiDiff; + switch(m_uiPhase) { case PHASE_1: diff --git a/scripts/northrend/nexus/nexus/instance_nexus.cpp b/scripts/northrend/nexus/nexus/instance_nexus.cpp index 7172d3531..f7fd46c61 100644 --- a/scripts/northrend/nexus/nexus/instance_nexus.cpp +++ b/scripts/northrend/nexus/nexus/instance_nexus.cpp @@ -98,6 +98,8 @@ void instance_nexus::SetData(uint32 uiType, uint32 uiData) { case TYPE_TELESTRA: m_auiEncounter[uiType] = uiData; + if (uiData == IN_PROGRESS) + SetSpecialAchievementCriteria(TYPE_ACHIEV_SPLIT_PERSONALITY, true); if (uiData == DONE) { if (GameObject* pGo = GetSingleGameObjectFromStorage(GO_CONTAINMENT_SPHERE_TELESTRA)) @@ -169,6 +171,8 @@ bool instance_nexus::CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player co { case ACHIEV_CRIT_CHAOS_THEORY: return m_abAchievCriteria[TYPE_ACHIEV_CHAOS_THEORY]; + case ACHIEV_CRIT_SPLIT_PERSONALITY: + return m_abAchievCriteria[TYPE_ACHIEV_SPLIT_PERSONALITY]; default: return false; diff --git a/scripts/northrend/nexus/nexus/nexus.h b/scripts/northrend/nexus/nexus/nexus.h index 1fdafb728..1e581c203 100644 --- a/scripts/northrend/nexus/nexus/nexus.h +++ b/scripts/northrend/nexus/nexus/nexus.h @@ -8,7 +8,7 @@ enum { MAX_ENCOUNTER = 4, - MAX_SPECIAL_ACHIEV_CRITS = 1, + MAX_SPECIAL_ACHIEV_CRITS = 2, TYPE_TELESTRA = 0, TYPE_ANOMALUS = 1, @@ -16,6 +16,7 @@ enum TYPE_KERISTRASZA = 3, TYPE_ACHIEV_CHAOS_THEORY = 0, + TYPE_ACHIEV_SPLIT_PERSONALITY = 1, NPC_TELESTRA = 26731, NPC_ANOMALUS = 26763, @@ -29,6 +30,7 @@ enum SPELL_FROZEN_PRISON = 47854, ACHIEV_CRIT_CHAOS_THEORY = 7316, // Anomalus, achiev 2037 + ACHIEV_CRIT_SPLIT_PERSONALITY = 7577, // Telestra, achiev 2150 }; class MANGOS_DLL_DECL instance_nexus : public ScriptedInstance diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index e12a9bee1..c7929b242 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2389" + #define SD2_REVISION_NR "2390" #endif // __SD2_REVISION_NR_H__ From 7c501d7c66dcf6149692cc610753856575ed7306 Mon Sep 17 00:00:00 2001 From: kolomati2 Date: Sat, 14 Jan 2012 13:37:07 +0200 Subject: [PATCH 0377/1172] [2391] Implement support for Achievement 2036 - Intense Cold Signed-off-by: Xfurry --- .../nexus/nexus/boss_keristrasza.cpp | 32 +++++++++++++++++++ .../northrend/nexus/nexus/instance_nexus.cpp | 10 ++++++ scripts/northrend/nexus/nexus/nexus.h | 4 +++ sd2_revision_nr.h | 2 +- 4 files changed, 47 insertions(+), 1 deletion(-) diff --git a/scripts/northrend/nexus/nexus/boss_keristrasza.cpp b/scripts/northrend/nexus/nexus/boss_keristrasza.cpp index a00f5be25..50e201fd1 100644 --- a/scripts/northrend/nexus/nexus/boss_keristrasza.cpp +++ b/scripts/northrend/nexus/nexus/boss_keristrasza.cpp @@ -32,7 +32,10 @@ enum SAY_KILL = -1576019, SAY_DEATH = -1576020, + MAX_INTENSE_COLD_STACK = 2, // the max allowed stacks for the achiev to pass + SPELL_INTENSE_COLD = 48094, + SPELL_INTENSE_COLD_AURA = 48095, // used for Intense cold achiev SPELL_CRYSTALFIRE_BREATH = 48096, SPELL_CRYSTALFIRE_BREATH_H = 57091, @@ -66,6 +69,7 @@ struct MANGOS_DLL_DECL boss_keristraszaAI : public ScriptedAI uint32 uiTailSweepTimer; uint32 uiCrystalfireBreathTimer; uint32 uiCrystallizeTimer; + uint32 uiCheckIntenseColdTimer; bool m_bIsEnraged; @@ -75,6 +79,7 @@ struct MANGOS_DLL_DECL boss_keristraszaAI : public ScriptedAI uiTailSweepTimer = urand(5000, 7500); uiCrystalfireBreathTimer = urand(10000, 20000); uiCrystallizeTimer = urand(20000, 30000); + uiCheckIntenseColdTimer = 2000; m_bIsEnraged = false; @@ -93,6 +98,9 @@ struct MANGOS_DLL_DECL boss_keristraszaAI : public ScriptedAI DoScriptText(SAY_AGGRO, m_creature); m_creature->CastSpell(m_creature, SPELL_INTENSE_COLD, true); + + if (m_pInstance) + m_pInstance->SetData(TYPE_KERISTRASZA, IN_PROGRESS); } void JustDied(Unit* pKiller) @@ -114,6 +122,30 @@ struct MANGOS_DLL_DECL boss_keristraszaAI : public ScriptedAI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; + if (uiCheckIntenseColdTimer < uiDiff) + { + ThreatList playerList = m_creature->getThreatManager().getThreatList(); + for (ThreatList::const_iterator itr = playerList.begin(); itr != playerList.end(); ++itr) + { + if (Player* pTarget = m_creature->GetMap()->GetPlayer((*itr)->getUnitGuid())) + { + Aura* pAuraIntenseCold = pTarget->GetAura(SPELL_INTENSE_COLD_AURA, EFFECT_INDEX_0); + + if (pAuraIntenseCold) + { + if (pAuraIntenseCold->GetStackAmount() > MAX_INTENSE_COLD_STACK) + { + if (m_pInstance) + m_pInstance->SetData(TYPE_INTENSE_COLD_FAILED, pTarget->GetGUIDLow()); + } + } + } + } + uiCheckIntenseColdTimer = 1000; + } + else + uiCheckIntenseColdTimer -= uiDiff; + if (!m_bIsEnraged && m_creature->GetHealthPercent() < 25.0f) { if (!m_creature->IsNonMeleeSpellCasted(false)) diff --git a/scripts/northrend/nexus/nexus/instance_nexus.cpp b/scripts/northrend/nexus/nexus/instance_nexus.cpp index f7fd46c61..ce3f9c3e4 100644 --- a/scripts/northrend/nexus/nexus/instance_nexus.cpp +++ b/scripts/northrend/nexus/nexus/instance_nexus.cpp @@ -126,6 +126,13 @@ void instance_nexus::SetData(uint32 uiType, uint32 uiData) break; case TYPE_KERISTRASZA: m_auiEncounter[uiType] = uiData; + if (uiData == IN_PROGRESS) + m_sIntenseColdFailPlayers.clear(); + break; + case TYPE_INTENSE_COLD_FAILED: + // Insert the players who fail the achiev and haven't been already inserted in the set + if (m_sIntenseColdFailPlayers.find(uiData) == m_sIntenseColdFailPlayers.end()) + m_sIntenseColdFailPlayers.insert(uiData); break; default: error_log("SD2: Instance Nexus: ERROR SetData = %u for type %u does not exist/not implemented.", uiType, uiData); @@ -173,6 +180,9 @@ bool instance_nexus::CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player co return m_abAchievCriteria[TYPE_ACHIEV_CHAOS_THEORY]; case ACHIEV_CRIT_SPLIT_PERSONALITY: return m_abAchievCriteria[TYPE_ACHIEV_SPLIT_PERSONALITY]; + case ACHIEV_CRIT_INTENSE_COLD: + // Return true if not found in the set + return m_sIntenseColdFailPlayers.find(pSource->GetGUIDLow()) == m_sIntenseColdFailPlayers.end(); default: return false; diff --git a/scripts/northrend/nexus/nexus/nexus.h b/scripts/northrend/nexus/nexus/nexus.h index 1e581c203..431de8acf 100644 --- a/scripts/northrend/nexus/nexus/nexus.h +++ b/scripts/northrend/nexus/nexus/nexus.h @@ -14,6 +14,7 @@ enum TYPE_ANOMALUS = 1, TYPE_ORMOROK = 2, TYPE_KERISTRASZA = 3, + TYPE_INTENSE_COLD_FAILED = 4, TYPE_ACHIEV_CHAOS_THEORY = 0, TYPE_ACHIEV_SPLIT_PERSONALITY = 1, @@ -30,6 +31,7 @@ enum SPELL_FROZEN_PRISON = 47854, ACHIEV_CRIT_CHAOS_THEORY = 7316, // Anomalus, achiev 2037 + ACHIEV_CRIT_INTENSE_COLD = 7315, // Keristrasza, achiev 2036 ACHIEV_CRIT_SPLIT_PERSONALITY = 7577, // Telestra, achiev 2150 }; @@ -58,6 +60,8 @@ class MANGOS_DLL_DECL instance_nexus : public ScriptedInstance std::string m_strInstData; bool m_abAchievCriteria[MAX_SPECIAL_ACHIEV_CRITS]; + + std::set m_sIntenseColdFailPlayers; }; #endif diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index c7929b242..423242dd5 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2390" + #define SD2_REVISION_NR "2391" #endif // __SD2_REVISION_NR_H__ From e43185785b614dd04c10e531a0d09f11b91da0ab Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sat, 14 Jan 2012 14:04:40 +0200 Subject: [PATCH 0378/1172] [2392] Remove Loken door from instance script - actually this door is never used --- .../ulduar/halls_of_lightning/halls_of_lightning.h | 2 +- .../halls_of_lightning/instance_halls_of_lightning.cpp | 6 ------ sd2_revision_nr.h | 2 +- 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/scripts/northrend/ulduar/halls_of_lightning/halls_of_lightning.h b/scripts/northrend/ulduar/halls_of_lightning/halls_of_lightning.h index 075b4bae9..72bd1263b 100644 --- a/scripts/northrend/ulduar/halls_of_lightning/halls_of_lightning.h +++ b/scripts/northrend/ulduar/halls_of_lightning/halls_of_lightning.h @@ -21,7 +21,7 @@ enum GO_VOLKHAN_DOOR = 191325, //_doors07 GO_IONAR_DOOR = 191326, //_doors05 - GO_LOKEN_DOOR = 191324, //_doors02 + //GO_LOKEN_DOOR = 191324, //_doors02 GO_LOKEN_THRONE = 192654, ACHIEV_START_LOKEN_ID = 20384, diff --git a/scripts/northrend/ulduar/halls_of_lightning/instance_halls_of_lightning.cpp b/scripts/northrend/ulduar/halls_of_lightning/instance_halls_of_lightning.cpp index ce55efc9a..582567b4a 100644 --- a/scripts/northrend/ulduar/halls_of_lightning/instance_halls_of_lightning.cpp +++ b/scripts/northrend/ulduar/halls_of_lightning/instance_halls_of_lightning.cpp @@ -64,10 +64,6 @@ void instance_halls_of_lightning::OnObjectCreate(GameObject* pGo) if (m_auiEncounter[TYPE_IONAR] == DONE) pGo->SetGoState(GO_STATE_ACTIVE); break; - case GO_LOKEN_DOOR: - if (m_auiEncounter[TYPE_LOKEN] == DONE) - pGo->SetGoState(GO_STATE_ACTIVE); - break; case GO_LOKEN_THRONE: break; @@ -99,8 +95,6 @@ void instance_halls_of_lightning::SetData(uint32 uiType, uint32 uiData) DoStartTimedAchievement(ACHIEVEMENT_CRITERIA_TYPE_KILL_CREATURE, ACHIEV_START_LOKEN_ID); if (uiData == DONE) { - DoUseDoorOrButton(GO_LOKEN_DOOR); - //Appears to be type 5 GO with animation. Need to figure out how this work, code below only placeholder if (GameObject* pGlobe = GetSingleGameObjectFromStorage(GO_LOKEN_THRONE)) pGlobe->SetGoState(GO_STATE_ACTIVE); diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 423242dd5..4dc6ff134 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2391" + #define SD2_REVISION_NR "2392" #endif // __SD2_REVISION_NR_H__ From 5f38e1cb77b555f450580e1d95f47f08f353a15d Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sat, 14 Jan 2012 18:34:54 +0200 Subject: [PATCH 0379/1172] [2393] Cleanup and improve script for Volkhan Note: the dummy spells may require more research and some of them should be handled in core --- .../halls_of_lightning/boss_volkhan.cpp | 273 +++++++----------- .../halls_of_lightning/halls_of_lightning.h | 1 + .../instance_halls_of_lightning.cpp | 1 + sd2_revision_nr.h | 2 +- 4 files changed, 112 insertions(+), 165 deletions(-) diff --git a/scripts/northrend/ulduar/halls_of_lightning/boss_volkhan.cpp b/scripts/northrend/ulduar/halls_of_lightning/boss_volkhan.cpp index 430e95ece..a594af568 100644 --- a/scripts/northrend/ulduar/halls_of_lightning/boss_volkhan.cpp +++ b/scripts/northrend/ulduar/halls_of_lightning/boss_volkhan.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: Boss Volkhan -SD%Complete: 60% -SDComment: Not considered complete. Some events may fail and need further development +SD%Complete: 70% +SDComment: The dummy spells need more research and should be handled in core; achiev NYI SDCategory: Halls of Lightning EndScriptData */ @@ -38,31 +38,28 @@ enum EMOTE_TO_ANVIL = -1602041, EMOTE_SHATTER = -1602042, - SPELL_HEAT_N = 52387, + SPELL_HEAT = 52387, SPELL_HEAT_H = 59528, - SPELL_SHATTERING_STOMP_N = 52237, + SPELL_SHATTERING_STOMP = 52237, SPELL_SHATTERING_STOMP_H = 59529, //unclear how "directions" of spells must be. Last, summoning GO, what is it for? Script depend on: SPELL_TEMPER = 52238, //TARGET_SCRIPT boss->anvil SPELL_TEMPER_DUMMY = 52654, //TARGET_SCRIPT anvil->boss - - //SPELL_TEMPER_VISUAL = 52661, //summons GO + //SPELL_TEMPER_VISUAL = 52661, //summons GO SPELL_SUMMON_MOLTEN_GOLEM = 52405, //Molten Golem SPELL_BLAST_WAVE = 23113, - SPELL_IMMOLATION_STRIKE_N = 52433, + SPELL_IMMOLATION_STRIKE = 52433, SPELL_IMMOLATION_STRIKE_H = 59530, - SPELL_SHATTER_N = 52429, + SPELL_SHATTER = 52429, SPELL_SHATTER_H = 59527, - NPC_VOLKHAN_ANVIL = 28823, NPC_MOLTEN_GOLEM = 28695, NPC_BRITTLE_GOLEM = 28681, - POINT_ID_ANVIL = 0, MAX_GOLEM = 2 }; @@ -84,33 +81,19 @@ struct MANGOS_DLL_DECL boss_volkhanAI : public ScriptedAI GUIDList m_lGolemGUIDList; bool m_bIsRegularMode; - bool m_bHasTemper; - bool m_bIsStriking; - bool m_bCanShatterGolem; bool m_bHasShattered; - uint32 m_uiPause_Timer; - uint32 m_uiShatter_Timer; - - uint32 m_uiHealthAmountModifier; + uint32 m_uiShatterTimer; + uint32 m_uiHeatTimer; + uint32 m_uiTemperTimer; void Reset() { - m_bIsStriking = false; - m_bHasTemper = false; - m_bCanShatterGolem = false; m_bHasShattered = false; - m_uiPause_Timer = 3500; - m_uiShatter_Timer = 5000; - - m_uiHealthAmountModifier = 1; - - DespawnGolem(); - m_lGolemGUIDList.clear(); - - if (m_pInstance) - m_pInstance->SetData(TYPE_VOLKHAN, NOT_STARTED); + m_uiShatterTimer = 3000; + m_uiHeatTimer = 30000; + m_uiTemperTimer = 10000; } void Aggro(Unit* pWho) @@ -121,26 +104,21 @@ struct MANGOS_DLL_DECL boss_volkhanAI : public ScriptedAI m_pInstance->SetData(TYPE_VOLKHAN, IN_PROGRESS); } - void AttackStart(Unit* pWho) + void JustDied(Unit* pKiller) { - if (m_creature->Attack(pWho, true)) - { - m_creature->AddThreat(pWho); - m_creature->SetInCombatWith(pWho); - pWho->SetInCombatWith(m_creature); + DoScriptText(SAY_DEATH, m_creature); + DespawnGolems(); - if (!m_bHasTemper) - m_creature->GetMotionMaster()->MoveChase(pWho); - } + if (m_pInstance) + m_pInstance->SetData(TYPE_VOLKHAN, DONE); } - void JustDied(Unit* pKiller) + void JustReachedHome() { - DoScriptText(SAY_DEATH, m_creature); - DespawnGolem(); + DespawnGolems(); if (m_pInstance) - m_pInstance->SetData(TYPE_VOLKHAN, DONE); + m_pInstance->SetData(TYPE_VOLKHAN, FAIL); } void KilledUnit(Unit* pVictim) @@ -153,7 +131,7 @@ struct MANGOS_DLL_DECL boss_volkhanAI : public ScriptedAI } } - void DespawnGolem() + void DespawnGolems() { if (m_lGolemGUIDList.empty()) return; @@ -166,11 +144,9 @@ struct MANGOS_DLL_DECL boss_volkhanAI : public ScriptedAI pTemp->ForcedDespawn(); } } - - m_lGolemGUIDList.clear(); } - void ShatterGolem() + void ShatterGolems() { if (m_lGolemGUIDList.empty()) return; @@ -180,18 +156,12 @@ struct MANGOS_DLL_DECL boss_volkhanAI : public ScriptedAI if (Creature* pTemp = m_creature->GetMap()->GetCreature(*itr)) { // only shatter brittle golems - if (pTemp->isAlive() && pTemp->GetEntry() == NPC_BRITTLE_GOLEM) - pTemp->CastSpell(pTemp, m_bIsRegularMode ? SPELL_SHATTER_N : SPELL_SHATTER_H, false); + if (pTemp->GetEntry() == NPC_BRITTLE_GOLEM) + pTemp->CastSpell(pTemp, m_bIsRegularMode ? SPELL_SHATTER : SPELL_SHATTER_H, true); } } } - void SpellHit(Unit* pCaster, const SpellEntry* pSpell) - { - if (pSpell->Id == SPELL_TEMPER_DUMMY) - m_bIsStriking = true; - } - void JustSummoned(Creature* pSummoned) { if (pSummoned->GetEntry() == NPC_MOLTEN_GOLEM) @@ -200,78 +170,82 @@ struct MANGOS_DLL_DECL boss_volkhanAI : public ScriptedAI if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) pSummoned->AI()->AttackStart(pTarget); - - //why healing when just summoned? - pSummoned->CastSpell(pSummoned, m_bIsRegularMode ? SPELL_HEAT_N : SPELL_HEAT_H, false, NULL, NULL, m_creature->GetObjectGuid()); } } + void MovementInform(uint32 uiMoveType, uint32 uiPointId) + { + if (uiMoveType != POINT_MOTION_TYPE || !uiPointId) + return; + + DoCastSpellIfCan(m_creature, SPELL_TEMPER); + SetCombatMovement(true); + } + void UpdateAI(const uint32 uiDiff) { //Return since we have no target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - if (m_bIsStriking) - { - if (m_uiPause_Timer < uiDiff) - { - if (m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() != CHASE_MOTION_TYPE) - { - if (m_creature->getVictim()) - m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); - } - - m_bHasTemper = false; - m_bIsStriking = false; - m_uiPause_Timer = 3500; - } - else - m_uiPause_Timer -= uiDiff; - - return; - } - - // he shatters only one time, at 20% - if (m_creature->GetHealthPercent() <= 20.0f && !m_bHasShattered) + // he shatters only one time, at 25% + if (m_creature->GetHealthPercent() <= 25.0f && !m_bHasShattered) { // should he stomp even if he has no brittle golem to shatter? <-yes! - if (DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_SHATTERING_STOMP_N : SPELL_SHATTERING_STOMP_H) == CAST_OK) + if (DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_SHATTERING_STOMP : SPELL_SHATTERING_STOMP_H) == CAST_OK) { DoScriptText(urand(0, 1) ? SAY_STOMP_1 : SAY_STOMP_2, m_creature); DoScriptText(EMOTE_SHATTER, m_creature); - m_bCanShatterGolem = true; + m_uiShatterTimer = 3000; m_bHasShattered = true; } } // Shatter Golems 3 seconds after Shattering Stomp - if (m_bCanShatterGolem) + if (m_uiShatterTimer) { - if (m_uiShatter_Timer < uiDiff) + if (m_uiShatterTimer <= uiDiff) { - ShatterGolem(); - m_uiShatter_Timer = 3000; - m_bCanShatterGolem = false; + ShatterGolems(); + m_uiShatterTimer = 0; } else - m_uiShatter_Timer -= uiDiff; + m_uiShatterTimer -= uiDiff; } - // Health check - if (!m_bCanShatterGolem && m_creature->GetHealthPercent() < float(100 - 20*m_uiHealthAmountModifier)) + // Summon Golems only when over 25% hp + if (m_creature->GetHealthPercent() > 25.0f) { - ++m_uiHealthAmountModifier; - - if (m_creature->IsNonMeleeSpellCasted(false)) - m_creature->InterruptNonMeleeSpells(false); - - DoScriptText(urand(0, 1) ? SAY_FORGE_1 : SAY_FORGE_2, m_creature); + if (m_uiTemperTimer < uiDiff) + { + DoScriptText(EMOTE_TO_ANVIL, m_creature); + DoScriptText(urand(0, 1) ? SAY_FORGE_1 : SAY_FORGE_2, m_creature); + SetCombatMovement(false); - m_bHasTemper = true; + if (m_pInstance) + { + if (Creature* pAnvil = m_pInstance->GetSingleCreatureFromStorage(NPC_VOLKHAN_ANVIL)) + { + float fX, fY, fZ; + pAnvil->GetContactPoint(m_creature, fX, fY, fZ, INTERACTION_DISTANCE); + m_creature->GetMotionMaster()->MovePoint(1, fX, fY, fZ); + } + else + error_log("SD2: Npc %u couldn't be found or something really bad happened.", NPC_VOLKHAN_ANVIL); + } + m_uiTemperTimer = 30000; + } + else + m_uiTemperTimer -= uiDiff; + } - m_creature->CastSpell(m_creature, SPELL_TEMPER, false); + if (m_uiHeatTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_HEAT : SPELL_HEAT_H) == CAST_OK) + m_uiHeatTimer = urand(10000, 15000); } + else + m_uiHeatTimer -= uiDiff; DoMeleeAttackIfReady(); } @@ -290,16 +264,9 @@ bool EffectDummyCreature_boss_volkhan(Unit* pCaster, uint32 uiSpellId, SpellEffe if (pCaster->GetEntry() != NPC_VOLKHAN_ANVIL || pCreatureTarget->GetEntry() != NPC_VOLKHAN) return true; - for(uint8 i = 0; i < MAX_GOLEM; ++i) - { + for (uint8 i = 0; i < MAX_GOLEM; ++i) pCreatureTarget->CastSpell(pCaster, SPELL_SUMMON_MOLTEN_GOLEM, true); - //TODO: remove this line of hack when summon effect implemented - pCreatureTarget->SummonCreature(NPC_MOLTEN_GOLEM, - pCaster->GetPositionX(), pCaster->GetPositionY(), pCaster->GetPositionZ(), 0.0f, - TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 10000); - } - //always return true when we are handling this spell and effect return true; } @@ -319,18 +286,14 @@ bool EffectDummyCreature_npc_volkhan_anvil(Unit* pCaster, uint32 uiSpellId, Spel if (pCaster->GetEntry() != NPC_VOLKHAN || pCreatureTarget->GetEntry() != NPC_VOLKHAN_ANVIL) return true; - DoScriptText(EMOTE_TO_ANVIL, pCaster); - - float fX, fY, fZ; - pCreatureTarget->GetContactPoint(pCaster, fX, fY, fZ, INTERACTION_DISTANCE); - - pCaster->AttackStop(); - - if (pCaster->GetMotionMaster()->GetCurrentMovementGeneratorType() == CHASE_MOTION_TYPE) - pCaster->GetMotionMaster()->MovementExpired(); - - pCaster->MonsterMoveWithSpeed(fX, fY, fZ, 28.f); pCreatureTarget->CastSpell(pCaster, SPELL_TEMPER_DUMMY, false); + // ToDo: research how the visual spell is used + + if (pCaster->getVictim()) + { + pCaster->GetMotionMaster()->Clear(); + pCaster->GetMotionMaster()->MoveChase(pCaster->getVictim()); + } //always return true when we are handling this spell and effect return true; @@ -355,94 +318,76 @@ struct MANGOS_DLL_DECL mob_molten_golemAI : public ScriptedAI ScriptedInstance* m_pInstance; bool m_bIsRegularMode; - bool m_bIsFrozen; - uint32 m_uiBlast_Timer; - uint32 m_uiDeathDelay_Timer; - uint32 m_uiImmolation_Timer; + uint32 m_uiBlastTimer; + uint32 m_uiImmolationTimer; void Reset() { - m_bIsFrozen = false; - - m_uiBlast_Timer = 20000; - m_uiDeathDelay_Timer = 0; - m_uiImmolation_Timer = 5000; + m_uiBlastTimer = 20000; + m_uiImmolationTimer = 5000; } - void AttackStart(Unit* pWho) + void EnterEvadeMode() { - if (m_creature->Attack(pWho, true)) - { - m_creature->AddThreat(pWho); - m_creature->SetInCombatWith(pWho); - pWho->SetInCombatWith(m_creature); + // Evade but keep the current location + m_creature->RemoveAllAuras(); + m_creature->DeleteThreatList(); + m_creature->CombatStop(true); + m_creature->LoadCreatureAddon(true); - if (!m_bIsFrozen) - m_creature->GetMotionMaster()->MoveChase(pWho); - } + m_creature->SetLootRecipient(NULL); + + // Update creature to Brittle Golem + // Note: the npc has the proper flags in DB and won't engate in combat anymore + m_creature->UpdateEntry(NPC_BRITTLE_GOLEM); } void DamageTaken(Unit* pDoneBy, uint32 &uiDamage) { - if (m_bIsFrozen) + // Transform intro Brittle when damaged to 0 HP + if (uiDamage >= m_creature->GetHealth()) { - //workaround for now, brittled should be immune to any kind of attacks uiDamage = 0; - return; - } - - if (uiDamage > m_creature->GetHealth()) - { - m_bIsFrozen = true; if (m_creature->IsNonMeleeSpellCasted(false)) m_creature->InterruptNonMeleeSpells(false); - m_creature->RemoveAllAuras(); - m_creature->AttackStop(); - - if (m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() == CHASE_MOTION_TYPE) - m_creature->GetMotionMaster()->MovementExpired(); - - uiDamage = m_creature->GetHealth()-1; - - m_creature->UpdateEntry(NPC_BRITTLE_GOLEM); - m_creature->SetHealth(1); + EnterEvadeMode(); } } void SpellHit(Unit* pCaster, const SpellEntry* pSpell) { - //this is the dummy effect of the spells - if (pSpell->Id == SPELL_SHATTER_N || pSpell->Id == SPELL_SHATTER_H) + // This is the dummy effect of the spells - Note: should be handled as a dummy effect in core + if (pSpell->Id == SPELL_SHATTER || pSpell->Id == SPELL_SHATTER_H) { if (m_creature->GetEntry() == NPC_BRITTLE_GOLEM) - m_creature->ForcedDespawn(); + m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); } } void UpdateAI(const uint32 uiDiff) { //Return since we have no target or if we are frozen - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim() || m_bIsFrozen) + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - if (m_uiBlast_Timer < uiDiff) + if (m_uiBlastTimer < uiDiff) { DoCastSpellIfCan(m_creature, SPELL_BLAST_WAVE); - m_uiBlast_Timer = 20000; + m_uiBlastTimer = 20000; } else - m_uiBlast_Timer -= uiDiff; + m_uiBlastTimer -= uiDiff; - if (m_uiImmolation_Timer < uiDiff) + if (m_uiImmolationTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), m_bIsRegularMode ? SPELL_IMMOLATION_STRIKE_N : SPELL_IMMOLATION_STRIKE_H); - m_uiImmolation_Timer = 5000; + DoCastSpellIfCan(m_creature->getVictim(), m_bIsRegularMode ? SPELL_IMMOLATION_STRIKE : SPELL_IMMOLATION_STRIKE_H); + m_uiImmolationTimer = 5000; } else - m_uiImmolation_Timer -= uiDiff; + m_uiImmolationTimer -= uiDiff; DoMeleeAttackIfReady(); } diff --git a/scripts/northrend/ulduar/halls_of_lightning/halls_of_lightning.h b/scripts/northrend/ulduar/halls_of_lightning/halls_of_lightning.h index 72bd1263b..764ef3f5a 100644 --- a/scripts/northrend/ulduar/halls_of_lightning/halls_of_lightning.h +++ b/scripts/northrend/ulduar/halls_of_lightning/halls_of_lightning.h @@ -18,6 +18,7 @@ enum NPC_VOLKHAN = 28587, NPC_IONAR = 28546, NPC_LOKEN = 28923, + NPC_VOLKHAN_ANVIL = 28823, GO_VOLKHAN_DOOR = 191325, //_doors07 GO_IONAR_DOOR = 191326, //_doors05 diff --git a/scripts/northrend/ulduar/halls_of_lightning/instance_halls_of_lightning.cpp b/scripts/northrend/ulduar/halls_of_lightning/instance_halls_of_lightning.cpp index 582567b4a..36ced6825 100644 --- a/scripts/northrend/ulduar/halls_of_lightning/instance_halls_of_lightning.cpp +++ b/scripts/northrend/ulduar/halls_of_lightning/instance_halls_of_lightning.cpp @@ -47,6 +47,7 @@ void instance_halls_of_lightning::OnCreatureCreate(Creature* pCreature) { case NPC_BJARNGRIM: case NPC_IONAR: + case NPC_VOLKHAN_ANVIL: m_mNpcEntryGuidStore[pCreature->GetEntry()] = pCreature->GetObjectGuid(); break; } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 4dc6ff134..56cce1b64 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2392" + #define SD2_REVISION_NR "2393" #endif // __SD2_REVISION_NR_H__ From 85e6f1939ce0418783abb621dfa5a660b5907cb0 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sat, 14 Jan 2012 19:02:06 +0200 Subject: [PATCH 0380/1172] [2394] Implement support for Achievement 2042 - Shatter Resistant --- .../ulduar/halls_of_lightning/boss_volkhan.cpp | 15 ++++++++++++++- .../halls_of_lightning/halls_of_lightning.h | 6 ++++++ .../instance_halls_of_lightning.cpp | 15 ++++++++++++++- sd2_revision_nr.h | 2 +- 4 files changed, 35 insertions(+), 3 deletions(-) diff --git a/scripts/northrend/ulduar/halls_of_lightning/boss_volkhan.cpp b/scripts/northrend/ulduar/halls_of_lightning/boss_volkhan.cpp index a594af568..59522ea90 100644 --- a/scripts/northrend/ulduar/halls_of_lightning/boss_volkhan.cpp +++ b/scripts/northrend/ulduar/halls_of_lightning/boss_volkhan.cpp @@ -60,7 +60,8 @@ enum NPC_MOLTEN_GOLEM = 28695, NPC_BRITTLE_GOLEM = 28681, - MAX_GOLEM = 2 + MAX_GOLEM = 2, + MAX_ACHIEV_GOLEMS = 4 }; /*###### @@ -151,15 +152,27 @@ struct MANGOS_DLL_DECL boss_volkhanAI : public ScriptedAI if (m_lGolemGUIDList.empty()) return; + uint8 m_uiBrittleGolemsCount = 0; + for(GUIDList::const_iterator itr = m_lGolemGUIDList.begin(); itr != m_lGolemGUIDList.end(); ++itr) { if (Creature* pTemp = m_creature->GetMap()->GetCreature(*itr)) { // only shatter brittle golems if (pTemp->GetEntry() == NPC_BRITTLE_GOLEM) + { pTemp->CastSpell(pTemp, m_bIsRegularMode ? SPELL_SHATTER : SPELL_SHATTER_H, true); + ++m_uiBrittleGolemsCount; + } } } + + // If shattered more than 4 golems mark achiev as failed + if (m_uiBrittleGolemsCount > MAX_ACHIEV_GOLEMS) + { + if (m_pInstance) + m_pInstance->SetData(TYPE_VOLKHAN, SPECIAL); + } } void JustSummoned(Creature* pSummoned) diff --git a/scripts/northrend/ulduar/halls_of_lightning/halls_of_lightning.h b/scripts/northrend/ulduar/halls_of_lightning/halls_of_lightning.h index 764ef3f5a..09b806d11 100644 --- a/scripts/northrend/ulduar/halls_of_lightning/halls_of_lightning.h +++ b/scripts/northrend/ulduar/halls_of_lightning/halls_of_lightning.h @@ -26,6 +26,8 @@ enum GO_LOKEN_THRONE = 192654, ACHIEV_START_LOKEN_ID = 20384, + + ACHIEV_CRIT_RESISTANT = 7321, // Volkhan, achiev 2042 }; class MANGOS_DLL_DECL instance_halls_of_lightning : public ScriptedInstance @@ -41,12 +43,16 @@ class MANGOS_DLL_DECL instance_halls_of_lightning : public ScriptedInstance void SetData(uint32 uiType, uint32 uiData); uint32 GetData(uint32 uiType); + bool CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/); + const char* Save() { return m_strInstData.c_str(); } void Load(const char* chrIn); private: uint32 m_auiEncounter[MAX_ENCOUNTER]; std::string m_strInstData; + + bool m_bIsShatterResistant; }; #endif diff --git a/scripts/northrend/ulduar/halls_of_lightning/instance_halls_of_lightning.cpp b/scripts/northrend/ulduar/halls_of_lightning/instance_halls_of_lightning.cpp index 36ced6825..ff84f1c48 100644 --- a/scripts/northrend/ulduar/halls_of_lightning/instance_halls_of_lightning.cpp +++ b/scripts/northrend/ulduar/halls_of_lightning/instance_halls_of_lightning.cpp @@ -31,7 +31,8 @@ EndScriptData */ 3 - Loken */ -instance_halls_of_lightning::instance_halls_of_lightning(Map* pMap) : ScriptedInstance(pMap) +instance_halls_of_lightning::instance_halls_of_lightning(Map* pMap) : ScriptedInstance(pMap), + m_bIsShatterResistant(false) { Initialize(); } @@ -84,6 +85,10 @@ void instance_halls_of_lightning::SetData(uint32 uiType, uint32 uiData) case TYPE_VOLKHAN: if (uiData == DONE) DoUseDoorOrButton(GO_VOLKHAN_DOOR); + if (uiData == IN_PROGRESS) + m_bIsShatterResistant = true; + if (uiData == SPECIAL) + m_bIsShatterResistant = false; m_auiEncounter[uiType] = uiData; break; case TYPE_IONAR: @@ -126,6 +131,14 @@ uint32 instance_halls_of_lightning::GetData(uint32 uiType) return 0; } +bool instance_halls_of_lightning::CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/) +{ + if (uiCriteriaId == ACHIEV_CRIT_RESISTANT) + return m_bIsShatterResistant; + + return false; +} + void instance_halls_of_lightning::Load(const char* chrIn) { if (!chrIn) diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 56cce1b64..59f5cd948 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2393" + #define SD2_REVISION_NR "2394" #endif // __SD2_REVISION_NR_H__ From a26f992e9972b164462e5669334c3c91647cd495 Mon Sep 17 00:00:00 2001 From: Radu Date: Sat, 14 Jan 2012 19:06:02 +0200 Subject: [PATCH 0381/1172] Update SD2 comment via Github --- scripts/northrend/ulduar/halls_of_lightning/boss_volkhan.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/northrend/ulduar/halls_of_lightning/boss_volkhan.cpp b/scripts/northrend/ulduar/halls_of_lightning/boss_volkhan.cpp index 59522ea90..bbb49d197 100644 --- a/scripts/northrend/ulduar/halls_of_lightning/boss_volkhan.cpp +++ b/scripts/northrend/ulduar/halls_of_lightning/boss_volkhan.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: Boss Volkhan -SD%Complete: 70% -SDComment: The dummy spells need more research and should be handled in core; achiev NYI +SD%Complete: 80% +SDComment: The dummy spells need more research and should be handled in core SDCategory: Halls of Lightning EndScriptData */ From c7d9ec6ad5344a2872f67e984e2a4646bb346ee6 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sat, 14 Jan 2012 20:37:45 +0200 Subject: [PATCH 0382/1172] [2395] Improve script for Elder Nadox Also added instance data support --- .../northrend/azjol-nerub/ahnkahet/ahnkahet.h | 8 +++ .../azjol-nerub/ahnkahet/boss_nadox.cpp | 61 ++++++++++--------- .../ahnkahet/instance_ahnkahet.cpp | 28 +++++++++ sd2_revision_nr.h | 2 +- 4 files changed, 69 insertions(+), 30 deletions(-) diff --git a/scripts/northrend/azjol-nerub/ahnkahet/ahnkahet.h b/scripts/northrend/azjol-nerub/ahnkahet/ahnkahet.h index 38cdbcf3c..947fba686 100644 --- a/scripts/northrend/azjol-nerub/ahnkahet/ahnkahet.h +++ b/scripts/northrend/azjol-nerub/ahnkahet/ahnkahet.h @@ -27,6 +27,8 @@ enum GO_VORTEX = 193564, NPC_ELDER_NADOX = 29309, + NPC_AHNKAHAR_GUARDIAN_EGG = 30173, + NPC_AHNKAHAR_SWARM_EGG = 30172, //NPC_JEDOGA_SHADOWSEEKER = 29310, ACHIEV_START_VOLAZJ_ID = 20382, @@ -45,6 +47,9 @@ class MANGOS_DLL_DECL instance_ahnkahet : public ScriptedInstance void SetData(uint32 uiType, uint32 uiData); uint32 GetData(uint32 uiType); + ObjectGuid SelectRandomGuardianEggGuid(); + ObjectGuid SelectRandomSwarmerEggGuid(); + const char* Save() { return m_strInstData.c_str(); } void Load(const char* chrIn); @@ -53,6 +58,9 @@ class MANGOS_DLL_DECL instance_ahnkahet : public ScriptedInstance std::string m_strInstData; uint8 m_uiDevicesActivated; + + GUIDList m_GuardianEggList; + GUIDList m_SwarmerEggList; }; #endif diff --git a/scripts/northrend/azjol-nerub/ahnkahet/boss_nadox.cpp b/scripts/northrend/azjol-nerub/ahnkahet/boss_nadox.cpp index 23e518e01..80bca0161 100644 --- a/scripts/northrend/azjol-nerub/ahnkahet/boss_nadox.cpp +++ b/scripts/northrend/azjol-nerub/ahnkahet/boss_nadox.cpp @@ -41,14 +41,11 @@ enum SPELL_BROOD_RAGE = 59465, SPELL_GUARDIAN_AURA = 56151, - SPELL_GUARDIAN_AURA_TRIGGERED = 56153, // JustSummoned is not called for spell summoned creatures SPELL_SUMMON_SWARM_GUARDIAN = 56120, SPELL_SUMMON_SWARMERS = 56119, - NPC_AHNKAHAR_GUARDIAN_EGG = 30173, - NPC_AHNKAHAR_SWARM_EGG = 30172, NPC_AHNKAHAR_GUARDIAN = 30176, NPC_AHNKAHAR_SWARMER = 30178 }; @@ -73,7 +70,10 @@ struct MANGOS_DLL_DECL mob_ahnkahar_eggAI : public ScriptedAI void JustSummoned(Creature* pSummoned) { if (pSummoned->GetEntry() == NPC_AHNKAHAR_GUARDIAN) + { + pSummoned->CastSpell(pSummoned, SPELL_GUARDIAN_AURA, true); DoScriptText(EMOTE_HATCH, m_creature); + } if (m_pInstance) { @@ -81,6 +81,7 @@ struct MANGOS_DLL_DECL mob_ahnkahar_eggAI : public ScriptedAI { float fPosX, fPosY, fPosZ; pElderNadox->GetPosition(fPosX, fPosY, fPosZ); + pSummoned->SetWalk(false); pSummoned->GetMotionMaster()->MovePoint(0, fPosX, fPosY, fPosZ); } } @@ -100,12 +101,12 @@ struct MANGOS_DLL_DECL boss_nadoxAI : public ScriptedAI { boss_nadoxAI(Creature* pCreature) : ScriptedAI(pCreature) { - m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_pInstance = (instance_ahnkahet*)pCreature->GetInstanceData(); m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); Reset(); } - ScriptedInstance* m_pInstance; + instance_ahnkahet* m_pInstance; bool m_bIsRegularMode; bool m_bBerserk; @@ -123,23 +124,18 @@ struct MANGOS_DLL_DECL boss_nadoxAI : public ScriptedAI m_uiBroodRageTimer = 20000; } - Creature* SelectRandomCreatureOfEntryInRange(uint32 uiEntry, float fRange) + void Aggro(Unit* pWho) { - std::list lCreatureList; - GetCreatureListWithEntryInGrid(lCreatureList, m_creature, uiEntry, fRange); - - if (lCreatureList.empty()) - return NULL; - - std::list::iterator iter = lCreatureList.begin(); - advance(iter, urand(0, lCreatureList.size()-1)); + DoScriptText(SAY_AGGRO, m_creature); - return *iter; + if (m_pInstance) + m_pInstance->SetData(TYPE_NADOX, IN_PROGRESS); } - void Aggro(Unit* pWho) + void JustReachedHome() { - DoScriptText(SAY_AGGRO, m_creature); + if (m_pInstance) + m_pInstance->SetData(TYPE_NADOX, FAIL); } void KilledUnit(Unit* pVictim) @@ -155,6 +151,9 @@ struct MANGOS_DLL_DECL boss_nadoxAI : public ScriptedAI void JustDied(Unit* pKiller) { DoScriptText(SAY_DEATH, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_NADOX, DONE); } void UpdateAI(const uint32 uiDiff) @@ -165,20 +164,26 @@ struct MANGOS_DLL_DECL boss_nadoxAI : public ScriptedAI if (!m_bGuardianSummoned && m_creature->GetHealthPercent() < 50.0f) { // guardian is summoned at 50% of boss HP - if (Creature* pGuardianEgg = SelectRandomCreatureOfEntryInRange(NPC_AHNKAHAR_GUARDIAN_EGG, 75.0f)) - pGuardianEgg->CastSpell(pGuardianEgg, SPELL_SUMMON_SWARM_GUARDIAN, false); + if (m_pInstance) + { + if (Creature* pGuardianEgg = m_creature->GetMap()->GetCreature(m_pInstance->SelectRandomGuardianEggGuid())) + pGuardianEgg->CastSpell(pGuardianEgg, SPELL_SUMMON_SWARM_GUARDIAN, false); - m_bGuardianSummoned = true; + m_bGuardianSummoned = true; + } } if (m_uiSummonTimer < uiDiff) { DoScriptText(urand(0, 1) ? SAY_SUMMON_EGG_1 : SAY_SUMMON_EGG_2, m_creature); - if (Creature* pSwarmerEgg = SelectRandomCreatureOfEntryInRange(NPC_AHNKAHAR_SWARM_EGG, 75.0)) - pSwarmerEgg->CastSpell(pSwarmerEgg, SPELL_SUMMON_SWARMERS, false); + if (m_pInstance) + { + if (Creature* pSwarmerEgg = m_creature->GetMap()->GetCreature(m_pInstance->SelectRandomSwarmerEggGuid())) + pSwarmerEgg->CastSpell(pSwarmerEgg, SPELL_SUMMON_SWARMERS, false); - m_uiSummonTimer = 10000; + m_uiSummonTimer = 10000; + } } else m_uiSummonTimer -= uiDiff; @@ -197,10 +202,8 @@ struct MANGOS_DLL_DECL boss_nadoxAI : public ScriptedAI { if (m_uiBroodRageTimer < uiDiff) { - if (Creature* pRageTarget = SelectRandomCreatureOfEntryInRange(NPC_AHNKAHAR_SWARMER, 50.0)) - DoCastSpellIfCan(pRageTarget, SPELL_BROOD_RAGE); - - m_uiBroodRageTimer = 20000; + if (DoCastSpellIfCan(m_creature, SPELL_BROOD_RAGE) == CAST_OK) + m_uiBroodRageTimer = 20000; } else m_uiBroodRageTimer -= uiDiff; @@ -208,8 +211,8 @@ struct MANGOS_DLL_DECL boss_nadoxAI : public ScriptedAI if (!m_bBerserk && m_creature->GetPositionZ() < 24.0) { - m_bBerserk = true; - DoCastSpellIfCan(m_creature, SPELL_BERSERK); + if (DoCastSpellIfCan(m_creature, SPELL_BERSERK) == CAST_OK) + m_bBerserk = true; } DoMeleeAttackIfReady(); diff --git a/scripts/northrend/azjol-nerub/ahnkahet/instance_ahnkahet.cpp b/scripts/northrend/azjol-nerub/ahnkahet/instance_ahnkahet.cpp index d48139732..d9e69bcd9 100644 --- a/scripts/northrend/azjol-nerub/ahnkahet/instance_ahnkahet.cpp +++ b/scripts/northrend/azjol-nerub/ahnkahet/instance_ahnkahet.cpp @@ -42,6 +42,12 @@ void instance_ahnkahet::OnCreatureCreate(Creature* pCreature) case NPC_ELDER_NADOX: m_mNpcEntryGuidStore[pCreature->GetEntry()] = pCreature->GetObjectGuid(); break; + case NPC_AHNKAHAR_GUARDIAN_EGG: + m_GuardianEggList.push_back(pCreature->GetObjectGuid()); + break; + case NPC_AHNKAHAR_SWARM_EGG: + m_SwarmerEggList.push_back(pCreature->GetObjectGuid()); + break; } } @@ -130,6 +136,28 @@ void instance_ahnkahet::SetData(uint32 uiType, uint32 uiData) } } +ObjectGuid instance_ahnkahet::SelectRandomGuardianEggGuid() +{ + if (m_GuardianEggList.empty()) + return ObjectGuid(); + + std::list::iterator iter = m_GuardianEggList.begin(); + advance(iter, urand(0, m_GuardianEggList.size()-1)); + + return *iter; +} + +ObjectGuid instance_ahnkahet::SelectRandomSwarmerEggGuid() +{ + if (m_SwarmerEggList.empty()) + return ObjectGuid(); + + std::list::iterator iter = m_SwarmerEggList.begin(); + advance(iter, urand(0, m_SwarmerEggList.size()-1)); + + return *iter; +} + void instance_ahnkahet::Load(const char* chrIn) { if (!chrIn) diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 59f5cd948..d930b0e6c 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2394" + #define SD2_REVISION_NR "2395" #endif // __SD2_REVISION_NR_H__ From 732c918727446fab155f955e9955e7d14b61eee0 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sat, 14 Jan 2012 21:58:13 +0200 Subject: [PATCH 0383/1172] [2396] Implement support for Achievement 2038 - Respect Your Elders Also adjust the timer for the Swarmer summon --- .../northrend/azjol-nerub/ahnkahet/ahnkahet.h | 6 +++++ .../azjol-nerub/ahnkahet/boss_nadox.cpp | 25 +++++++++++++++---- .../ahnkahet/instance_ahnkahet.cpp | 17 +++++++++++++ sd2_revision_nr.h | 2 +- 4 files changed, 44 insertions(+), 6 deletions(-) diff --git a/scripts/northrend/azjol-nerub/ahnkahet/ahnkahet.h b/scripts/northrend/azjol-nerub/ahnkahet/ahnkahet.h index 947fba686..5d950144d 100644 --- a/scripts/northrend/azjol-nerub/ahnkahet/ahnkahet.h +++ b/scripts/northrend/azjol-nerub/ahnkahet/ahnkahet.h @@ -32,6 +32,8 @@ enum //NPC_JEDOGA_SHADOWSEEKER = 29310, ACHIEV_START_VOLAZJ_ID = 20382, + + ACHIEV_CRIT_RESPECT_ELDERS = 7317, // Nadox, achiev 2038 }; class MANGOS_DLL_DECL instance_ahnkahet : public ScriptedInstance @@ -50,6 +52,8 @@ class MANGOS_DLL_DECL instance_ahnkahet : public ScriptedInstance ObjectGuid SelectRandomGuardianEggGuid(); ObjectGuid SelectRandomSwarmerEggGuid(); + bool CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/); + const char* Save() { return m_strInstData.c_str(); } void Load(const char* chrIn); @@ -57,6 +61,8 @@ class MANGOS_DLL_DECL instance_ahnkahet : public ScriptedInstance uint32 m_auiEncounter[MAX_ENCOUNTER]; std::string m_strInstData; + bool m_bRespectElders; + uint8 m_uiDevicesActivated; GUIDList m_GuardianEggList; diff --git a/scripts/northrend/azjol-nerub/ahnkahet/boss_nadox.cpp b/scripts/northrend/azjol-nerub/ahnkahet/boss_nadox.cpp index 80bca0161..9609528c8 100644 --- a/scripts/northrend/azjol-nerub/ahnkahet/boss_nadox.cpp +++ b/scripts/northrend/azjol-nerub/ahnkahet/boss_nadox.cpp @@ -17,7 +17,7 @@ /* ScriptData SDName: Boss_Nadox SD%Complete: 90% -SDComment: TODO: some more research on guardian aura needed, BroodRage needs core and db support +SDComment: Some adjustment may be required SDCategory: Ahn'kahet EndScriptData */ @@ -86,6 +86,16 @@ struct MANGOS_DLL_DECL mob_ahnkahar_eggAI : public ScriptedAI } } } + + void SummonedCreatureJustDied(Creature* pSummoned) + { + // If the Guardian is killed set the achiev criteria to false + if (pSummoned->GetEntry() == NPC_AHNKAHAR_GUARDIAN) + { + if (m_pInstance) + m_pInstance->SetData(TYPE_NADOX, SPECIAL); + } + } }; CreatureAI* GetAI_mob_ahnkahar_egg(Creature* pCreature) @@ -175,15 +185,20 @@ struct MANGOS_DLL_DECL boss_nadoxAI : public ScriptedAI if (m_uiSummonTimer < uiDiff) { - DoScriptText(urand(0, 1) ? SAY_SUMMON_EGG_1 : SAY_SUMMON_EGG_2, m_creature); + if (roll_chance_i(50)) + DoScriptText(urand(0, 1) ? SAY_SUMMON_EGG_1 : SAY_SUMMON_EGG_2, m_creature); if (m_pInstance) { + // There are 2 Swarmers summoned at a timer if (Creature* pSwarmerEgg = m_creature->GetMap()->GetCreature(m_pInstance->SelectRandomSwarmerEggGuid())) - pSwarmerEgg->CastSpell(pSwarmerEgg, SPELL_SUMMON_SWARMERS, false); - - m_uiSummonTimer = 10000; + { + for (uint8 i = 0; i < 2; ++i) + pSwarmerEgg->CastSpell(pSwarmerEgg, SPELL_SUMMON_SWARMERS, false); + } } + + m_uiSummonTimer = urand(5000, 10000); } else m_uiSummonTimer -= uiDiff; diff --git a/scripts/northrend/azjol-nerub/ahnkahet/instance_ahnkahet.cpp b/scripts/northrend/azjol-nerub/ahnkahet/instance_ahnkahet.cpp index d9e69bcd9..d900f497a 100644 --- a/scripts/northrend/azjol-nerub/ahnkahet/instance_ahnkahet.cpp +++ b/scripts/northrend/azjol-nerub/ahnkahet/instance_ahnkahet.cpp @@ -25,6 +25,7 @@ EndScriptData */ #include "ahnkahet.h" instance_ahnkahet::instance_ahnkahet(Map* pMap) : ScriptedInstance(pMap), + m_bRespectElders(false), m_uiDevicesActivated(0) { Initialize(); @@ -87,6 +88,10 @@ void instance_ahnkahet::SetData(uint32 uiType, uint32 uiData) { case TYPE_NADOX: m_auiEncounter[uiType] = uiData; + if (uiData == IN_PROGRESS) + m_bRespectElders = true; + if (uiData == SPECIAL) + m_bRespectElders = false; break; case TYPE_TALDARAM: if (uiData == SPECIAL) @@ -158,6 +163,18 @@ ObjectGuid instance_ahnkahet::SelectRandomSwarmerEggGuid() return *iter; } +bool instance_ahnkahet::CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/) +{ + switch (uiCriteriaId) + { + case ACHIEV_CRIT_RESPECT_ELDERS: + return m_bRespectElders; + + default: + return false; + } +} + void instance_ahnkahet::Load(const char* chrIn) { if (!chrIn) diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index d930b0e6c..24077efe7 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2395" + #define SD2_REVISION_NR "2396" #endif // __SD2_REVISION_NR_H__ From 929a44e5f1d032e7eb263794762c427a7e29c8cd Mon Sep 17 00:00:00 2001 From: Xfurry Date: Mon, 16 Jan 2012 22:26:01 +0200 Subject: [PATCH 0384/1172] [2397] Add some abilities and texts to Herald Volazj --- .../azjol-nerub/ahnkahet/boss_volazj.cpp | 76 +++++++++++++++++-- sd2_revision_nr.h | 2 +- sql/scriptdev2_script_full.sql | 10 +-- sql/updates/r2397_scriptdev2.sql | 6 ++ 4 files changed, 83 insertions(+), 11 deletions(-) create mode 100644 sql/updates/r2397_scriptdev2.sql diff --git a/scripts/northrend/azjol-nerub/ahnkahet/boss_volazj.cpp b/scripts/northrend/azjol-nerub/ahnkahet/boss_volazj.cpp index 2bfdb21a3..7d382617e 100644 --- a/scripts/northrend/azjol-nerub/ahnkahet/boss_volazj.cpp +++ b/scripts/northrend/azjol-nerub/ahnkahet/boss_volazj.cpp @@ -16,14 +16,13 @@ /* ScriptData SDName: Boss_Volazj -SD%Complete: 20% -SDComment: +SD%Complete: 50% +SDComment: Insanity NYI; Timers need adjustments SDCategory: Ahn'kahet EndScriptData */ #include "precompiled.h" -//TODO: fill in texts in database. Also need to add text for whisper. enum { SAY_AGGRO = -1619033, @@ -31,8 +30,31 @@ enum SAY_SLAY_1 = -1619035, SAY_SLAY_2 = -1619036, SAY_SLAY_3 = -1619037, - SAY_DEATH_1 = -1619038, - SAY_DEATH_2 = -1619039 + SAY_DEATH_1 = -1619038, // missing text + SAY_DEATH_2 = -1619039, + + SPELL_MIND_FLAY = 57941, + SPELL_MIND_FLAY_H = 59974, + SPELL_SHADOW_BOLT = 57942, + SPELL_SHADOW_BOLT_H = 59975, + SPELL_SHIVER = 57949, + SPELL_SHIVER_H = 59978, + + SPELL_INSANITY = 57496, // start insanity phasing + SPELL_INSANITY_CLEAR = 57558, // clear all insanity phasing + SPELL_WHISPER_INSANITY = 60292, // whisper insanity to players + + /* Some notes about the Insanity spell */ + /* + Related spells: + 57561 - visual effect + 57538 - switch insanity phase when a visage is killed + 57507 to 57512 - phasing spells for players + 59982 - summon twisted visage - script effect + 57500 to 57504 - summon twisted visage in each phase + 57506, 57507 - clone spells for the twisted visages + 57551, 57555 - visuals for twisted visages + */ }; /*###### @@ -51,8 +73,17 @@ struct MANGOS_DLL_DECL boss_volazjAI : public ScriptedAI ScriptedInstance* m_pInstance; bool m_bIsRegularMode; + uint8 m_uiCombatPhase; + uint32 m_uiMindFlayTimer; + uint32 m_uiShadowBoltTimer; + uint32 m_uiShiverTimer; + void Reset() { + m_uiCombatPhase = 1; + m_uiMindFlayTimer = 10000; + m_uiShadowBoltTimer = 5000; + m_uiShiverTimer = 18000; } void Aggro(Unit* pWho) @@ -80,6 +111,41 @@ struct MANGOS_DLL_DECL boss_volazjAI : public ScriptedAI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; + /* Note: Insanity is not yet implemented - this is just a placeholder + if (m_creature->GetHealthPercent() < 100 - m_uiCombatPhase*33) + { + if (DoCastSpellIfCan(m_creature, SPELL_INSANITY) == CAST_OK) + ++m_uiCombatPhase; + } + */ + + if (m_uiMindFlayTimer < uiDiff) + { + if (DoCastSpellIfCan (m_creature->getVictim(), m_bIsRegularMode ? SPELL_MIND_FLAY : SPELL_MIND_FLAY_H) == CAST_OK) + m_uiMindFlayTimer = urand(10000, 20000); + } + else + m_uiMindFlayTimer -= uiDiff; + + if (m_uiShadowBoltTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_SHADOW_BOLT : SPELL_SHADOW_BOLT_H) == CAST_OK) + m_uiShadowBoltTimer = urand(8000, 13000); + } + else + m_uiShadowBoltTimer -= uiDiff; + + if (m_uiShiverTimer < uiDiff) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, m_bIsRegularMode ? SPELL_SHIVER : SPELL_SHIVER_H) == CAST_OK) + m_uiShiverTimer = 30000; + } + } + else + m_uiShiverTimer -= uiDiff; + DoMeleeAttackIfReady(); } }; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 24077efe7..7cc9c1ea5 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2396" + #define SD2_REVISION_NR "2397" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 867a09c28..34c0c136b 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -3532,12 +3532,12 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1619032,'I give myself to the master!',0,1,0,0,'jedoga SAY_VOLUNTEER_2'), (-1619033,'Shgla\'yos plahf mh\'naus.',14043,1,0,0,'volazj SAY_AGGRO'), -(-1619034,' ',14044,1,0,0,'volazj SAY_INSANITY'), -(-1619035,' ',14045,1,0,0,'volazj SAY_SLAY_1'), -(-1619036,' ',14046,1,0,0,'volazj SAY_SLAY_2'), -(-1619037,' ',14047,1,0,0,'volazj SAY_SLAY_3'), +(-1619034,'Gul\'kafh an\'shel. Yoq\'al shn ky ywaq nuul.',14044,1,0,0,'volazj SAY_INSANITY'), +(-1619035,'Ywaq puul skshgn: on\'ma yeh\'glu zuq.',14045,1,0,0,'volazj SAY_SLAY_1'), +(-1619036,'Ywaq ma phgwa\'cul hnakf.',14046,1,0,0,'volazj SAY_SLAY_2'), +(-1619037,'Ywaq maq oou; ywaq maq ssaggh. Ywaq ma shg\'fhn.',14047,1,0,0,'volazj SAY_SLAY_3'), (-1619038,' ',14048,1,0,0,'volazj SAY_DEATH_1'), -(-1619039,' ',14049,1,0,0,'volazj SAY_DEATH_2'); +(-1619039,'Iilth vwah, uhn\'agth fhssh za.',14049,1,0,0,'volazj SAY_DEATH_2'); -- -1 631 000 ICC: ICECROWN CITADEL INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES diff --git a/sql/updates/r2397_scriptdev2.sql b/sql/updates/r2397_scriptdev2.sql new file mode 100644 index 000000000..c09c0a172 --- /dev/null +++ b/sql/updates/r2397_scriptdev2.sql @@ -0,0 +1,6 @@ +UPDATE script_texts SET content_default='Shgla\'yos plahf mh\'naus.' WHERE entry=-1619033; +UPDATE script_texts SET content_default='Gul\'kafh an\'shel. Yoq\'al shn ky ywaq nuul.' WHERE entry=-1619034; +UPDATE script_texts SET content_default='Ywaq puul skshgn: on\'ma yeh\'glu zuq.' WHERE entry=-1619035; +UPDATE script_texts SET content_default='Ywaq ma phgwa\'cul hnakf.' WHERE entry=-1619036; +UPDATE script_texts SET content_default='Ywaq maq oou; ywaq maq ssaggh. Ywaq ma shg\'fhn.' WHERE entry=-1619037; +UPDATE script_texts SET content_default='Iilth vwah, uhn\'agth fhssh za.' WHERE entry=-1619039; From ecbaf4638fac349310d6792e3b929f5d3ec602cd Mon Sep 17 00:00:00 2001 From: Xfurry Date: Mon, 16 Jan 2012 23:31:12 +0200 Subject: [PATCH 0385/1172] [2398] Implement support for Achievement 1296 - Watch Him Die --- .../northrend/azjol-nerub/azjol-nerub/azjol-nerub.h | 6 ++++++ .../azjol-nerub/azjol-nerub/instance_azjol-nerub.cpp | 12 ++++++++++++ sd2_revision_nr.h | 2 +- 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/scripts/northrend/azjol-nerub/azjol-nerub/azjol-nerub.h b/scripts/northrend/azjol-nerub/azjol-nerub/azjol-nerub.h index 1fc94a164..e131d9d69 100644 --- a/scripts/northrend/azjol-nerub/azjol-nerub/azjol-nerub.h +++ b/scripts/northrend/azjol-nerub/azjol-nerub/azjol-nerub.h @@ -29,6 +29,8 @@ enum GO_DOOR_ANUBARAK_3 = 192398, ACHIEV_START_ANUB_ID = 20381, + + ACHIEV_CRITERIA_WATCH_DIE = 4240, // Krikthir, achiev 1296 }; static const uint32 aWatchers[] = {NPC_GASHRA, NPC_NARJIL, NPC_SILTHIK}; @@ -49,6 +51,8 @@ class MANGOS_DLL_DECL instance_azjol_nerub : public ScriptedInstance void SetData(uint32 uiType, uint32 uiData); + bool CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/); + const char* Save() { return m_strInstData.c_str(); } void Load(const char* chrIn); @@ -63,5 +67,7 @@ class MANGOS_DLL_DECL instance_azjol_nerub : public ScriptedInstance ObjectGuid m_playerGuid; uint32 m_uiWatcherTimer; + + bool m_bWatchHimDie; }; #endif diff --git a/scripts/northrend/azjol-nerub/azjol-nerub/instance_azjol-nerub.cpp b/scripts/northrend/azjol-nerub/azjol-nerub/instance_azjol-nerub.cpp index fdc43f81d..eb1d1a95d 100644 --- a/scripts/northrend/azjol-nerub/azjol-nerub/instance_azjol-nerub.cpp +++ b/scripts/northrend/azjol-nerub/azjol-nerub/instance_azjol-nerub.cpp @@ -25,6 +25,7 @@ EndScriptData */ #include "azjol-nerub.h" instance_azjol_nerub::instance_azjol_nerub(Map* pMap) : ScriptedInstance(pMap), + m_bWatchHimDie(true), m_uiWatcherTimer(0) { Initialize(); @@ -83,6 +84,9 @@ void instance_azjol_nerub::OnCreatureDeath(Creature* pCreature) { if (m_auiEncounter[TYPE_KRIKTHIR] == NOT_STARTED) m_uiWatcherTimer = 5000; + + // Set achiev criteriat to false if one of the watchers dies + m_bWatchHimDie = false; } } @@ -196,6 +200,14 @@ void instance_azjol_nerub::SetData(uint32 uiType, uint32 uiData) } } +bool instance_azjol_nerub::CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/) +{ + if (uiCriteriaId == ACHIEV_CRITERIA_WATCH_DIE) + return m_bWatchHimDie; + + return false; +} + void instance_azjol_nerub::Load(const char* chrIn) { if (!chrIn) diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 7cc9c1ea5..c5c000865 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2397" + #define SD2_REVISION_NR "2398" #endif // __SD2_REVISION_NR_H__ From e3b896d65434cf132e91e140234a7aaf0e0bf21f Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Tue, 17 Jan 2012 00:25:07 +0100 Subject: [PATCH 0386/1172] [2399] Fix logic bug in Akama script Thanks to Reamer for pointing. Also move Gossip Item to database --- .../black_temple/boss_shade_of_akama.cpp | 128 ++++++++---------- sd2_revision_nr.h | 2 +- sql/scriptdev2_script_full.sql | 5 + sql/updates/r2399_scriptdev2.sql | 3 + 4 files changed, 66 insertions(+), 72 deletions(-) create mode 100644 sql/updates/r2399_scriptdev2.sql diff --git a/scripts/outland/black_temple/boss_shade_of_akama.cpp b/scripts/outland/black_temple/boss_shade_of_akama.cpp index c396d8d1c..b59c9cbf5 100644 --- a/scripts/outland/black_temple/boss_shade_of_akama.cpp +++ b/scripts/outland/black_temple/boss_shade_of_akama.cpp @@ -28,16 +28,17 @@ EndScriptData */ (2.2) Positioning of broken NPCs. (3) The channelers are casting their spell somestimes even if they are daed (move out of view distance and then move in - they are dead but they channel - maybe some clientspecific issue?). (4) Unbanish Shade of Akama if a ashtongue sorcerer is spawned but not reached Shade of Akama and channels his spell? +(5) Unsure: If sourcer channels the banish spell, shade should be banished again? */ #include "precompiled.h" #include "black_temple.h" -#define GOSSIP_ITEM "We are ready to fight alongside you, Akama" - -// Spells enum { + GOSSIP_ITEM_START_ENCOUNTER = -3564000, + TEXT_ID_AKAMA = 907, + SAY_DEATH = -1564013, SAY_LOW_HEALTH = -1564014, // Ending cinematic text @@ -66,39 +67,39 @@ enum //PHASE_ON_PLATFORM = 3 }; -const uint32 m_auiRandSpawnEntry[]= +static const uint32 auiRandSpawnEntry[]= { NPC_ASH_ELEMENTAL, NPC_ASH_ROGUE, NPC_ASH_SPIRITBIND }; -const float LOC_RAND_TO_CENTER_X = 482.793182f; -const float LOC_RAND_TO_CENTER_Y = 401.270172f; -const float LOC_RAND_TO_CENTER_Z = 112.783928f; +static const float LOC_RAND_TO_CENTER_X = 482.793182f; +static const float LOC_RAND_TO_CENTER_Y = 401.270172f; +static const float LOC_RAND_TO_CENTER_Z = 112.783928f; -const float LOC_PLATFORM_Z = 118.537f; -const float LOC_LOW_Z = 112.784f; +static const float LOC_PLATFORM_Z = 118.537f; +static const float LOC_LOW_Z = 112.784f; struct Location { float m_fX, m_fY, m_fZ, m_fO; }; -Location m_afSpawnLoc[]= +static const Location afSpawnLoc[]= { {498.652740f, 461.728119f, LOC_LOW_Z, 0.0f}, {498.505003f, 339.619324f, LOC_LOW_Z, 0.0f} }; -Location m_afAkamaWP[]= +static const Location afAkamaWP[]= { //{516.885193, 400.836060, LOC_LOW_Z_SPAWN, 0.0}, //not used yet, he moves to here before start channel {482.352448f, 401.162720f, LOC_LOW_Z, 0.0f}, {469.597443f, 402.264404f, LOC_PLATFORM_Z, 0.0f} }; -Location m_afBrokenSpawnLoc[]= +static const Location afBrokenSpawnLoc[]= { {541.375916f, 401.439575f, LOC_LOW_Z, M_PI_F}, // The place where Akama channels {534.130005f, 352.394531f, LOC_LOW_Z, 2.164150f}, // Behind a 'pillar' which is behind the east alcove @@ -106,7 +107,7 @@ Location m_afBrokenSpawnLoc[]= {499.151093f, 461.036438f, LOC_LOW_Z, 4.770888f} // West Alcove }; -Location m_afBrokenWP[]= +static const Location afBrokenWP[]= { {492.491638f, 400.744690f, LOC_LOW_Z, 3.122336f}, {494.335724f, 382.221771f, LOC_LOW_Z, 2.676230f}, @@ -127,8 +128,7 @@ struct MANGOS_DLL_DECL boss_shade_of_akamaAI : public ScriptedAI GUIDList m_lChannelersGUIDList; GUIDList m_lSorcerersGUIDList; - uint32 m_uiSorcererCount; - uint32 m_uiDeathCount; + uint32 m_uiDeathChannelerCount; uint32 m_uiReduceHealthTimer; uint32 m_uiSummonTimer; @@ -140,8 +140,7 @@ struct MANGOS_DLL_DECL boss_shade_of_akamaAI : public ScriptedAI void Reset() { - m_uiSorcererCount = 0; - m_uiDeathCount = 0; + m_uiDeathChannelerCount = 0; m_uiSummonTimer = 10000; m_uiReduceHealthTimer = 0; @@ -184,7 +183,7 @@ struct MANGOS_DLL_DECL boss_shade_of_akamaAI : public ScriptedAI void IncrementDeathCount(ObjectGuid uiGuid = ObjectGuid()) { debug_log("SD2: Increasing Death Count for Shade of Akama encounter"); - ++m_uiDeathCount; + ++m_uiDeathChannelerCount; if (uiGuid) { @@ -197,13 +196,13 @@ struct MANGOS_DLL_DECL boss_shade_of_akamaAI : public ScriptedAI void SummonCreature() { - uint32 uiRand = sizeof(m_afSpawnLoc)/sizeof(Location); + uint32 uiRand = urand(0, countof(afSpawnLoc) - 1); - // max of 6 sorcerers can be summoned - if (!urand(0, 2) && (m_uiDeathCount > 0) && (m_uiSorcererCount < 7)) + // max of 6 sorcerers can be summoned at one time! + if (!urand(0, 2) && (m_uiDeathChannelerCount > 0) && (m_lSorcerersGUIDList.size() < 7)) { if (Creature* pSorcerer = m_creature->SummonCreature(NPC_ASH_SORCERER, - m_afSpawnLoc[uiRand].m_fX, m_afSpawnLoc[uiRand].m_fY, m_afSpawnLoc[uiRand].m_fZ, m_afSpawnLoc[uiRand].m_fO, + afSpawnLoc[uiRand].m_fX, afSpawnLoc[uiRand].m_fY, afSpawnLoc[uiRand].m_fZ, afSpawnLoc[uiRand].m_fO, TEMPSUMMON_DEAD_DESPAWN, 0)) { pSorcerer->SetWalk(false); @@ -212,18 +211,15 @@ struct MANGOS_DLL_DECL boss_shade_of_akamaAI : public ScriptedAI m_lSorcerersGUIDList.push_back(pSorcerer->GetObjectGuid()); - --m_uiDeathCount; - ++m_uiSorcererCount; + --m_uiDeathChannelerCount; } } else { - int iSize = (sizeof(m_auiRandSpawnEntry) / sizeof(uint32)); - - for(uint8 i = 0; i < iSize; ++i) + for (uint8 i = 0; i < countof(auiRandSpawnEntry); ++i) { - if (Creature* pSpawn = m_creature->SummonCreature(m_auiRandSpawnEntry[i], - m_afSpawnLoc[uiRand].m_fX, m_afSpawnLoc[uiRand].m_fY, m_afSpawnLoc[uiRand].m_fZ, m_afSpawnLoc[uiRand].m_fO, + if (Creature* pSpawn = m_creature->SummonCreature(auiRandSpawnEntry[i], + afSpawnLoc[uiRand].m_fX, afSpawnLoc[uiRand].m_fY, afSpawnLoc[uiRand].m_fZ, afSpawnLoc[uiRand].m_fO, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 25000)) { pSpawn->SetWalk(false); @@ -235,36 +231,28 @@ struct MANGOS_DLL_DECL boss_shade_of_akamaAI : public ScriptedAI void DespawnSorceres() { - if (!m_lSorcerersGUIDList.empty() && m_pInstance) + for (GUIDList::const_iterator itr = m_lSorcerersGUIDList.begin(); itr != m_lSorcerersGUIDList.end(); ++itr) { - for(GUIDList::const_iterator itr = m_lSorcerersGUIDList.begin(); itr != m_lSorcerersGUIDList.end(); ++itr) + if (Creature* pSorcerer = m_creature->GetMap()->GetCreature(*itr)) { - if (Creature* pSorcerer = m_pInstance->instance->GetCreature(*itr)) - { - if (pSorcerer->isAlive()) - pSorcerer->ForcedDespawn(); - } + if (pSorcerer->isAlive()) + pSorcerer->ForcedDespawn(); } } } void RespawnChannelersIfDeadOrEvade() { - if (!m_lChannelersGUIDList.empty() && m_pInstance) + for (GUIDList::const_iterator itr = m_lChannelersGUIDList.begin(); itr != m_lChannelersGUIDList.end(); ++itr) { - for(GUIDList::const_iterator itr = m_lChannelersGUIDList.begin(); itr != m_lChannelersGUIDList.end(); ++itr) + if (Creature* pChanneler = m_creature->GetMap()->GetCreature(*itr)) { - if (Creature* pChanneler = m_pInstance->instance->GetCreature(*itr)) - { - if (!pChanneler->isAlive()) - pChanneler->Respawn(); - else - pChanneler->AI()->EnterEvadeMode(); - } + if (!pChanneler->isAlive()) + pChanneler->Respawn(); + else + pChanneler->AI()->EnterEvadeMode(); } } - else - error_log("SD2: boss_shade_of_akamaAI not able to respawn channelers, list is empty."); } void PrepareChannelers() @@ -277,10 +265,9 @@ struct MANGOS_DLL_DECL boss_shade_of_akamaAI : public ScriptedAI //clear this, we want a clean start m_lChannelersGUIDList.clear(); - for(std::list::iterator itr = lChannelerList.begin(); itr != lChannelerList.end(); ++itr) + for (std::list::iterator itr = lChannelerList.begin(); itr != lChannelerList.end(); ++itr) { m_lChannelersGUIDList.push_back((*itr)->GetObjectGuid()); - debug_log("SD2: boss_shade_of_akamaAI found channeler %s. Adding to list", (*itr)->GetObjectGuid().GetString().c_str()); (*itr)->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); } @@ -314,10 +301,10 @@ struct MANGOS_DLL_DECL boss_shade_of_akamaAI : public ScriptedAI if (m_uiDefenderTimer < uiDiff) { - uint32 uiRand = sizeof(m_afSpawnLoc)/sizeof(Location); + uint32 uiRand = urand(0, countof(afSpawnLoc) - 1); if (Creature* pDefender = m_creature->SummonCreature(NPC_ASH_DEFENDER, - m_afSpawnLoc[uiRand].m_fX, m_afSpawnLoc[uiRand].m_fY, m_afSpawnLoc[uiRand].m_fZ, m_afSpawnLoc[uiRand].m_fO, + afSpawnLoc[uiRand].m_fX, afSpawnLoc[uiRand].m_fY, afSpawnLoc[uiRand].m_fZ, afSpawnLoc[uiRand].m_fO, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 25000)) { if (Creature* pAkama = m_pInstance->GetSingleCreatureFromStorage(NPC_AKAMA_SHADE)) @@ -337,7 +324,7 @@ struct MANGOS_DLL_DECL boss_shade_of_akamaAI : public ScriptedAI else m_uiSummonTimer -= uiDiff; - if (m_uiDeathCount >= 6) + if (m_uiDeathChannelerCount >= 6) { if (Creature* pAkama = m_pInstance->GetSingleCreatureFromStorage(NPC_AKAMA_SHADE)) { @@ -539,7 +526,7 @@ struct MANGOS_DLL_DECL npc_akamaAI : public ScriptedAI if (m_bIsShadeDead && (m_uiWayPointId == 1)) { - m_creature->GetMotionMaster()->MovePoint(m_uiWayPointId, m_afAkamaWP[1].m_fX, m_afAkamaWP[1].m_fY, m_afAkamaWP[1].m_fZ); + m_creature->GetMotionMaster()->MovePoint(m_uiWayPointId, afAkamaWP[1].m_fX, afAkamaWP[1].m_fY, afAkamaWP[1].m_fZ); ++m_uiWayPointId; } @@ -554,7 +541,7 @@ struct MANGOS_DLL_DECL npc_akamaAI : public ScriptedAI m_bIsShadeDead = true; m_uiWayPointId = 0; m_creature->SetWalk(true); - m_creature->GetMotionMaster()->MovePoint(m_uiWayPointId, m_afAkamaWP[0].m_fX, m_afAkamaWP[0].m_fY, m_afAkamaWP[0].m_fZ); + m_creature->GetMotionMaster()->MovePoint(m_uiWayPointId, afAkamaWP[0].m_fX, afAkamaWP[0].m_fY, afAkamaWP[0].m_fZ); } } m_uiCheckTimer = 5000; @@ -563,22 +550,22 @@ struct MANGOS_DLL_DECL npc_akamaAI : public ScriptedAI m_uiCheckTimer -= uiDiff; } - if (m_uiSummonBrokenTimer && m_uiBrokenSummonIndex < 4) + if (m_uiSummonBrokenTimer && m_uiBrokenSummonIndex < countof(afBrokenSpawnLoc)) { if (m_uiSummonBrokenTimer <= uiDiff) { - for(uint8 i = 0; i < 4; ++i) + for (uint8 i = 0; i < 4; ++i) { - float x = m_afBrokenSpawnLoc[m_uiBrokenSummonIndex].m_fX + (i*5); - float y = m_afBrokenSpawnLoc[m_uiBrokenSummonIndex].m_fY + (1*5); - float z = m_afBrokenSpawnLoc[m_uiBrokenSummonIndex].m_fZ; - float o = m_afBrokenSpawnLoc[m_uiBrokenSummonIndex].m_fO; + float x = afBrokenSpawnLoc[m_uiBrokenSummonIndex].m_fX + (i*5); + float y = afBrokenSpawnLoc[m_uiBrokenSummonIndex].m_fY + (1*5); + float z = afBrokenSpawnLoc[m_uiBrokenSummonIndex].m_fZ; + float o = afBrokenSpawnLoc[m_uiBrokenSummonIndex].m_fO; if (Creature* pBroken = m_creature->SummonCreature(NPC_ASH_BROKEN, x, y, z, o, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 360000)) { - float wx = m_afBrokenWP[m_uiBrokenSummonIndex].m_fX + (i*5); - float wy = m_afBrokenWP[m_uiBrokenSummonIndex].m_fY + (i*5); - float wz = m_afBrokenWP[m_uiBrokenSummonIndex].m_fZ; + float wx = afBrokenWP[m_uiBrokenSummonIndex].m_fX + (i*5); + float wy = afBrokenWP[m_uiBrokenSummonIndex].m_fY + (i*5); + float wz = afBrokenWP[m_uiBrokenSummonIndex].m_fZ; pBroken->GetMotionMaster()->MovePoint(0, wx, wy, wz); pBroken->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); @@ -616,7 +603,7 @@ struct MANGOS_DLL_DECL npc_akamaAI : public ScriptedAI { bool bYelled = false; - for(GUIDList::const_iterator itr = m_lBrokenGUIDList.begin(); itr != m_lBrokenGUIDList.end(); ++itr) + for (GUIDList::const_iterator itr = m_lBrokenGUIDList.begin(); itr != m_lBrokenGUIDList.end(); ++itr) { if (Creature* pBroken = m_creature->GetMap()->GetCreature(*itr)) { @@ -634,7 +621,7 @@ struct MANGOS_DLL_DECL npc_akamaAI : public ScriptedAI m_uiSoulRetrieveTimer = 1500; break; case 3: - for(GUIDList::const_iterator itr = m_lBrokenGUIDList.begin(); itr != m_lBrokenGUIDList.end(); ++itr) + for (GUIDList::const_iterator itr = m_lBrokenGUIDList.begin(); itr != m_lBrokenGUIDList.end(); ++itr) { // This is the incorrect spell, but can't seem to find the right one. if (Creature* pBroken = m_creature->GetMap()->GetCreature(*itr)) @@ -644,7 +631,7 @@ struct MANGOS_DLL_DECL npc_akamaAI : public ScriptedAI m_uiSoulRetrieveTimer = 5000; break; case 4: - for(GUIDList::const_iterator itr = m_lBrokenGUIDList.begin(); itr != m_lBrokenGUIDList.end(); ++itr) + for (GUIDList::const_iterator itr = m_lBrokenGUIDList.begin(); itr != m_lBrokenGUIDList.end(); ++itr) { if (Creature* pBroken = m_creature->GetMap()->GetCreature(*itr)) DoScriptText(SAY_BROKEN_FREE_02, pBroken); @@ -696,10 +683,10 @@ bool GossipHello_npc_akama(Player* pPlayer, Creature* pCreature) if (ScriptedInstance* pInstance = (ScriptedInstance*)pCreature->GetInstanceData()) { if (pInstance->GetData(TYPE_SHADE) != DONE) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); + pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_START_ENCOUNTER, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); } - pPlayer->SEND_GOSSIP_MENU(907, pCreature->GetObjectGuid()); + pPlayer->SEND_GOSSIP_MENU(TEXT_ID_AKAMA, pCreature->GetObjectGuid()); return true; } @@ -827,9 +814,8 @@ struct MANGOS_DLL_DECL mob_ashtongue_sorcererAI : public ScriptedAI m_creature->GetMotionMaster()->Clear(false); m_creature->GetMotionMaster()->MoveIdle(); - DoCastSpellIfCan(pShade, SPELL_SHADE_SOUL_CHANNEL, CAST_TRIGGERED); - - m_bStartBanishing = true; + if (DoCastSpellIfCan(pShade, SPELL_SHADE_SOUL_CHANNEL) == CAST_OK) + m_bStartBanishing = true; } } m_uiCheckTimer = 2000; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index c5c000865..2324426ab 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2398" + #define SD2_REVISION_NR "2399" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 34c0c136b..d39fe27a4 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -4083,6 +4083,11 @@ INSERT INTO gossip_texts (entry,content_default,comment) VALUES (-3560005,'Strange wizard?','taretha GOSSIP_ITEM_EPOCH1'), (-3560006,'We\'ll get you out. Taretha. Don\'t worry. I doubt the wizard would wander too far away.','taretha GOSSIP_ITEM_EPOCH2'); +-- -3 564 000 BLACK TEMPLE +INSERT INTO gossip_texts (entry,content_default,comment) VALUES +(-3564000,'We are ready to fight alongside you, Akama','akama(shade) GOSSIP_ITEM_START_ENCOUNTER'); + + -- -3 595 000 CULLING OF STRATHOLME INSERT INTO gossip_texts (entry,content_default,comment) VALUES (-3595000,'What do you think they\'re up to?','chromie GOSSIP_ITEM_ENTRANCE_1'), diff --git a/sql/updates/r2399_scriptdev2.sql b/sql/updates/r2399_scriptdev2.sql new file mode 100644 index 000000000..a00e36dbc --- /dev/null +++ b/sql/updates/r2399_scriptdev2.sql @@ -0,0 +1,3 @@ +DELETE FROM gossip_texts WHERE entry=-3564000; +INSERT INTO gossip_texts (entry,content_default,comment) VALUES +(-3564000,'We are ready to fight alongside you, Akama','akama(shade) GOSSIP_ITEM_START_ENCOUNTER'); From 3fb8a1b92556d45e3afe47cf6ce623cb078fc6d2 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Tue, 17 Jan 2012 23:00:28 +0200 Subject: [PATCH 0387/1172] [2400] Implement abilities for Anub'arak Notes: * The summoned creatures require some movement support * Spell 53456 requires core fix --- .../azjol-nerub/azjol-nerub/azjol-nerub.h | 17 ++ .../azjol-nerub/azjol-nerub/boss_anubarak.cpp | 191 +++++++++++++++++- .../azjol-nerub/instance_azjol-nerub.cpp | 59 +++++- sd2_revision_nr.h | 2 +- sql/scriptdev2_script_full.sql | 8 +- sql/updates/r2400_scriptdev2.sql | 4 + 6 files changed, 262 insertions(+), 19 deletions(-) create mode 100644 sql/updates/r2400_scriptdev2.sql diff --git a/scripts/northrend/azjol-nerub/azjol-nerub/azjol-nerub.h b/scripts/northrend/azjol-nerub/azjol-nerub/azjol-nerub.h index e131d9d69..f9e1f6559 100644 --- a/scripts/northrend/azjol-nerub/azjol-nerub/azjol-nerub.h +++ b/scripts/northrend/azjol-nerub/azjol-nerub/azjol-nerub.h @@ -14,6 +14,7 @@ enum TYPE_ANUBARAK = 2, NPC_KRIKTHIR = 28684, + NPC_ANUBARAK = 29120, SAY_SEND_GROUP_1 = -1601004, SAY_SEND_GROUP_2 = -1601005, @@ -23,6 +24,8 @@ enum NPC_NARJIL = 28729, NPC_SILTHIK = 28731, + NPC_WORLD_TRIGGER = 22515, + GO_DOOR_KRIKTHIR = 192395, GO_DOOR_ANUBARAK_1 = 192396, GO_DOOR_ANUBARAK_2 = 192397, @@ -35,6 +38,9 @@ enum static const uint32 aWatchers[] = {NPC_GASHRA, NPC_NARJIL, NPC_SILTHIK}; +// Used to sort the summont triggers +static const int aSortDistance[4] = {-90, 10, 20, 30}; + class MANGOS_DLL_DECL instance_azjol_nerub : public ScriptedInstance { public: @@ -53,6 +59,11 @@ class MANGOS_DLL_DECL instance_azjol_nerub : public ScriptedInstance bool CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/); + ObjectGuid GetRandomAssassinTrigger(); + ObjectGuid GetGuardianTrigger() { return m_guardianSummonTarget; } + ObjectGuid GetDarterTrigger() { return m_darterSummonTarget; } + ObjectGuid GetAnubTrigger() { return m_anubSummonTarget; } + const char* Save() { return m_strInstData.c_str(); } void Load(const char* chrIn); @@ -60,11 +71,17 @@ class MANGOS_DLL_DECL instance_azjol_nerub : public ScriptedInstance private: void DoSendWatcherOrKrikthir(); + void DoSortWorldTriggers(); uint32 m_auiEncounter[MAX_ENCOUNTER]; std::string m_strInstData; ObjectGuid m_playerGuid; + ObjectGuid m_darterSummonTarget; + ObjectGuid m_guardianSummonTarget; + ObjectGuid m_anubSummonTarget; + GUIDVector m_vAssassinSummonTargetsVect; + GUIDList m_lTriggerGuids; uint32 m_uiWatcherTimer; diff --git a/scripts/northrend/azjol-nerub/azjol-nerub/boss_anubarak.cpp b/scripts/northrend/azjol-nerub/azjol-nerub/boss_anubarak.cpp index 8c29d374b..af7c985a1 100644 --- a/scripts/northrend/azjol-nerub/azjol-nerub/boss_anubarak.cpp +++ b/scripts/northrend/azjol-nerub/azjol-nerub/boss_anubarak.cpp @@ -16,9 +16,9 @@ /* ScriptData SDName: Boss_Anubarak -SD%Complete: 20% -SDComment: -SDCategory: Azjol'NerubstrInstData +SD%Complete: 70% +SDComment: Summoned creatures movement NYI; +SDCategory: Azjol'Nerub EndScriptData */ #include "precompiled.h" @@ -36,9 +36,33 @@ enum SAY_LOCUST_1 = -1601021, SAY_LOCUST_2 = -1601022, SAY_LOCUST_3 = -1601023, - SAY_DEATH = -1601024 + SAY_DEATH = -1601024, + + SPELL_CARRION_BEETLES = 53520, + SPELL_LEECHING_SWARM = 53467, + SPELL_LEECHING_SWARM_H = 59430, + SPELL_IMPALE_AURA = 53456, // ticks at each 10 secs - summons 29184 + SPELL_POUND = 53472, + SPELL_POUND_H = 59433, + SPELL_SUBMERGE = 53421, + SPELL_EMERGE = 53500, + + // NOTES: + // The Assassin and Guardian summon spell should be 53609 and 53613 + // They are currently not used because of the ignore LoS issue in core + SPELL_SUMMON_ASSASSIN = 53610, // summons 29214 + SPELL_SUMMON_GUARDIAN = 53614, // summons 29216 + SPELL_SUMMON_VENOMANCER = 53615, // summons 29217 + SPELL_SUMMON_DARTER = 53599, // summons 29213 + + //NPC_IMPALE_TARGET = 29184, // scripted in ACID + + PHASE_GROUND = 1, + PHASE_SUBMERGED = 2 }; + + /*###### ## boss_anubarak ######*/ @@ -49,14 +73,36 @@ struct MANGOS_DLL_DECL boss_anubarakAI : public ScriptedAI { m_pInstance = (instance_azjol_nerub*)pCreature->GetInstanceData(); m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); + m_bDoneIntro = false; Reset(); } instance_azjol_nerub* m_pInstance; bool m_bIsRegularMode; + uint8 m_uiPhase; + uint8 m_uiSubmergePhase; + + uint32 m_uiCarrionBeetlesTimer; + uint32 m_uiLeechingSwarmTimer; + uint32 m_uiPoundTimer; + uint32 m_uiEmergeTimer; + uint32 m_uiSummonTimer; + uint32 m_uiDarterTimer; + bool m_bIsFirstWave; + bool m_bDoneIntro; + void Reset() { + m_uiPhase = PHASE_GROUND; + m_uiSubmergePhase = 1; + + m_uiCarrionBeetlesTimer = 8000; + m_uiLeechingSwarmTimer = 20000; + m_uiPoundTimer = 15000; + m_uiDarterTimer = 5000; + + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE|UNIT_FLAG_NOT_SELECTABLE); } void Aggro(Unit* pWho) @@ -91,12 +137,147 @@ struct MANGOS_DLL_DECL boss_anubarakAI : public ScriptedAI m_pInstance->SetData(TYPE_ANUBARAK, NOT_STARTED); } + void MoveInLineOfSight(Unit* pWho) + { + if (!m_bDoneIntro && m_creature->IsWithinDistInMap(pWho, 60.0f)) + { + DoScriptText(SAY_INTRO, m_creature); + m_bDoneIntro = true; + } + + ScriptedAI::MoveInLineOfSight(pWho); + } + + void JustSummoned(Creature* pSummoned) + { + // Need to set the impale target in combat in order to be handled by acid + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + pSummoned->AI()->AttackStart(pTarget); + } + void UpdateAI(const uint32 uiDiff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - DoMeleeAttackIfReady(); + if (m_uiPhase == PHASE_GROUND) + { + if (m_uiLeechingSwarmTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_LEECHING_SWARM : SPELL_LEECHING_SWARM_H) == CAST_OK) + { + switch (urand(0, 2)) + { + case 0: DoScriptText(SAY_LOCUST_1, m_creature); break; + case 1: DoScriptText(SAY_LOCUST_2, m_creature); break; + case 2: DoScriptText(SAY_LOCUST_3, m_creature); break; + } + + m_uiLeechingSwarmTimer = 19000; + } + } + else + m_uiLeechingSwarmTimer -= uiDiff; + + if (m_uiCarrionBeetlesTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_CARRION_BEETLES) == CAST_OK) + m_uiCarrionBeetlesTimer = 25000; + } + else + m_uiCarrionBeetlesTimer -= uiDiff; + + if (m_uiPoundTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_POUND : SPELL_POUND_H) == CAST_OK) + m_uiPoundTimer = 16000; + } + else + m_uiPoundTimer -= uiDiff; + + if (m_creature->GetHealthPercent() < 100 - 25*m_uiSubmergePhase) + { + DoCastSpellIfCan(m_creature, SPELL_IMPALE_AURA, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_SUBMERGE, CAST_TRIGGERED); + DoScriptText(urand(0, 1) ? SAY_SUBMERGE_1 : SAY_SUBMERGE_2, m_creature); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE|UNIT_FLAG_NOT_SELECTABLE); + m_uiPhase = PHASE_SUBMERGED; + m_bIsFirstWave = true; + m_uiSummonTimer = 5000; + + // Emerge timers aren't the same. They depend on the submerge phase + switch (m_uiSubmergePhase) + { + case 1: + m_uiEmergeTimer = 20000; + break; + case 2: + m_uiEmergeTimer = 45000; + break; + case 3: + m_uiEmergeTimer = 50000; + break; + } + ++m_uiSubmergePhase; + } + + DoMeleeAttackIfReady(); + } + else if (m_uiPhase == PHASE_SUBMERGED) + { + if (m_uiSummonTimer < uiDiff) + { + if (!m_pInstance) + return; + + // Summon 2 Assassins + for (uint8 i = 0; i < 2; ++i) + { + if (Creature* pTrigger = m_creature->GetMap()->GetCreature(m_pInstance->GetRandomAssassinTrigger())) + pTrigger->CastSpell(pTrigger, SPELL_SUMMON_ASSASSIN, true, NULL, NULL, m_creature->GetObjectGuid()); + } + + // on the first wave summon a guardian; on the second wave summon a venonmancer + if (Creature* pTrigger = m_creature->GetMap()->GetCreature(m_pInstance->GetGuardianTrigger())) + { + pTrigger->CastSpell(pTrigger, m_bIsFirstWave ? SPELL_SUMMON_GUARDIAN : SPELL_SUMMON_VENOMANCER, true, NULL, NULL, m_creature->GetObjectGuid()); + m_bIsFirstWave = false; + } + + m_uiSummonTimer = 26000; + } + else + m_uiSummonTimer -= uiDiff; + + // only on the last submerge phase + if (m_uiSubmergePhase == 4) + { + if (m_uiDarterTimer < uiDiff) + { + if (!m_pInstance) + return; + + if (Creature* pTrigger = m_creature->GetMap()->GetCreature(m_pInstance->GetDarterTrigger())) + { + pTrigger->CastSpell(pTrigger, SPELL_SUMMON_DARTER, true, NULL, NULL, m_creature->GetObjectGuid()); + m_uiDarterTimer = urand(10000, 15000); + } + } + else + m_uiDarterTimer -= uiDiff; + } + + if (m_uiEmergeTimer < uiDiff) + { + DoCastSpellIfCan(m_creature, SPELL_EMERGE, CAST_INTERRUPT_PREVIOUS); + m_creature->RemoveAurasDueToSpell(SPELL_SUBMERGE); + m_creature->RemoveAurasDueToSpell(SPELL_IMPALE_AURA); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE|UNIT_FLAG_NOT_SELECTABLE); + m_uiPhase = PHASE_GROUND; + } + else + m_uiEmergeTimer -= uiDiff; + } } }; diff --git a/scripts/northrend/azjol-nerub/azjol-nerub/instance_azjol-nerub.cpp b/scripts/northrend/azjol-nerub/azjol-nerub/instance_azjol-nerub.cpp index eb1d1a95d..bdc655fa3 100644 --- a/scripts/northrend/azjol-nerub/azjol-nerub/instance_azjol-nerub.cpp +++ b/scripts/northrend/azjol-nerub/azjol-nerub/instance_azjol-nerub.cpp @@ -44,18 +44,9 @@ void instance_azjol_nerub::OnObjectCreate(GameObject* pGo) if (m_auiEncounter[TYPE_KRIKTHIR] == DONE) pGo->SetGoState(GO_STATE_ACTIVE); break; - // TODO - check if these (encounter) doors are really closed by default in the database case GO_DOOR_ANUBARAK_1: - if (m_auiEncounter[TYPE_ANUBARAK] == DONE || m_auiEncounter[TYPE_ANUBARAK] == NOT_STARTED) - pGo->SetGoState(GO_STATE_ACTIVE); - break; case GO_DOOR_ANUBARAK_2: - if (m_auiEncounter[TYPE_ANUBARAK] == DONE || m_auiEncounter[TYPE_ANUBARAK] == NOT_STARTED) - pGo->SetGoState(GO_STATE_ACTIVE); - break; case GO_DOOR_ANUBARAK_3: - if (m_auiEncounter[TYPE_ANUBARAK] == DONE || m_auiEncounter[TYPE_ANUBARAK] == NOT_STARTED) - pGo->SetGoState(GO_STATE_ACTIVE); break; default: @@ -72,8 +63,12 @@ void instance_azjol_nerub::OnCreatureCreate(Creature* pCreature) case NPC_GASHRA: case NPC_NARJIL: case NPC_SILTHIK: + case NPC_ANUBARAK: m_mNpcEntryGuidStore[pCreature->GetEntry()] = pCreature->GetObjectGuid(); break; + case NPC_WORLD_TRIGGER: + m_lTriggerGuids.push_back(pCreature->GetObjectGuid()); + break; } } @@ -164,6 +159,49 @@ void instance_azjol_nerub::DoSendWatcherOrKrikthir() } } +void instance_azjol_nerub::DoSortWorldTriggers() +{ + if (Creature* pAnub = GetSingleCreatureFromStorage(NPC_ANUBARAK)) + { + float fZ = pAnub->GetPositionZ(); + float fTriggZ = 0; + + for (GUIDList::const_iterator itr = m_lTriggerGuids.begin(); itr != m_lTriggerGuids.end(); ++itr) + { + if (Creature* pTrigg = instance->GetCreature(*itr)) + { + // Sort only triggers in a range of 100 + if (pTrigg->GetPositionY() < pAnub->GetPositionY() + 110) + { + fTriggZ = pTrigg->GetPositionZ(); + + // One npc below the platform + if (fTriggZ < fZ + aSortDistance[0]) + m_darterSummonTarget = pTrigg->GetObjectGuid(); + // One npc on the boss platform - used to handle the summoned movement + else if (fTriggZ < fZ + aSortDistance[1]) + m_anubSummonTarget = pTrigg->GetObjectGuid(); + // One npc on the upper pathway + else if (fTriggZ < fZ + aSortDistance[2]) + m_guardianSummonTarget = pTrigg->GetObjectGuid(); + // Eight npcs on the upper ledges + else if (fTriggZ < fZ + aSortDistance[3]) + m_vAssassinSummonTargetsVect.push_back(pTrigg->GetObjectGuid()); + } + } + } + } +} + +ObjectGuid instance_azjol_nerub::GetRandomAssassinTrigger() +{ + // Get a random summon target + if (m_vAssassinSummonTargetsVect.size() > 0) + return m_vAssassinSummonTargetsVect[urand(0, m_vAssassinSummonTargetsVect.size() -1)]; + else + return ObjectGuid(); +} + void instance_azjol_nerub::SetData(uint32 uiType, uint32 uiData) { switch(uiType) @@ -182,7 +220,10 @@ void instance_azjol_nerub::SetData(uint32 uiType, uint32 uiData) DoUseDoorOrButton(GO_DOOR_ANUBARAK_2); DoUseDoorOrButton(GO_DOOR_ANUBARAK_3); if (uiData == IN_PROGRESS) + { + DoSortWorldTriggers(); DoStartTimedAchievement(ACHIEVEMENT_CRITERIA_TYPE_KILL_CREATURE, ACHIEV_START_ANUB_ID); + } break; } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 2324426ab..4ae28c431 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2399" + #define SD2_REVISION_NR "2400" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index d39fe27a4..5a048692a 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -2894,11 +2894,11 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1601016,'You shall experience my torment, first-hand!',14055,1,0,0,'anubarak SAY_KILL_1'), (-1601017,'You have made your choice.',14056,1,0,0,'anubarak SAY_KILL_2'), (-1601018,'Soon, the Master\'s voice will call to you.',14057,1,0,0,'anubarak SAY_KILL_3'), -(-1601019,'Come forth, my brethren. Feast on their flesh!',14058,1,0,0,'anubarak SAY_SUBMERGE_1'), -(-1601020,'Auum na-l ak-k-k-k, isshhh.',14059,1,0,0,'anubarak SAY_SUBMERGE_2'), +(-1601019,'Come forth, my brethren. Feast on their flesh!',14059,1,0,0,'anubarak SAY_SUBMERGE_1'), +(-1601020,'Auum na-l ak-k-k-k, isshhh.',14058,1,0,0,'anubarak SAY_SUBMERGE_2'), (-1601021,'Your armor is useless against my locusts!',14060,1,0,0,'anubarak SAY_LOCUST_1'), -(-1601022,'The pestilence upon you!',14067,1,0,0,'anubarak SAY_LOCUST_2'), -(-1601023,'Uunak-hissss tik-k-k-k-k!',14068,1,0,0,'anubarak SAY_LOCUST_3'), +(-1601022,'The pestilence upon you!',14068,1,0,0,'anubarak SAY_LOCUST_2'), +(-1601023,'Uunak-hissss tik-k-k-k-k!',14067,1,0,0,'anubarak SAY_LOCUST_3'), (-1601024,'Ahhh... RAAAAAGH! Never thought... I would be free of him...',14069,1,0,0,'anubarak SAY_DEATH'); -- -1 602 000 HALLS OF LIGHTNING diff --git a/sql/updates/r2400_scriptdev2.sql b/sql/updates/r2400_scriptdev2.sql new file mode 100644 index 000000000..1cfa58264 --- /dev/null +++ b/sql/updates/r2400_scriptdev2.sql @@ -0,0 +1,4 @@ +UPDATE script_texts SET sound=14059 WHERE entry=-1601019; +UPDATE script_texts SET sound=14058 WHERE entry=-1601020; +UPDATE script_texts SET sound=14068 WHERE entry=-1601022; +UPDATE script_texts SET sound=14067 WHERE entry=-1601023; From 96ccbda95543e03a78396bce7b7742ad0449d9fe Mon Sep 17 00:00:00 2001 From: Reamer Date: Tue, 17 Jan 2012 02:05:29 +0100 Subject: [PATCH 0388/1172] [2401] Fix a few warnings in Hyjal Signed-off-by: Schmoozerd --- .../caverns_of_time/hyjal/hyjalAI.cpp | 101 ++++++++++++++---- .../kalimdor/caverns_of_time/hyjal/hyjalAI.h | 61 ----------- sd2_revision_nr.h | 2 +- 3 files changed, 81 insertions(+), 83 deletions(-) diff --git a/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.cpp b/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.cpp index c43ea996c..1895292ca 100644 --- a/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.cpp +++ b/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.cpp @@ -24,14 +24,15 @@ EndScriptData */ #include "precompiled.h" #include "hyjalAI.h" -struct sHyjalLocation +struct HyjalLocation { eBaseArea m_pBaseArea; float m_fX, m_fY, m_fZ; }; // Locations for summoning waves -sHyjalLocation m_aHyjalSpawnLoc[]= +// Must be even number +static const HyjalLocation aHyjalSpawnLoc[]= { {BASE_ALLY, 4979.010f, -1709.134f, 1339.674f}, {BASE_ALLY, 4969.123f, -1705.904f, 1341.363f}, @@ -44,20 +45,20 @@ sHyjalLocation m_aHyjalSpawnLoc[]= }; // used to inform the wave where to move -sHyjalLocation m_aHyjalWaveMoveTo[]= +static const HyjalLocation aHyjalWaveMoveTo[]= { {BASE_ALLY, 5018.654f, -1752.074f, 1322.203f}, {BASE_HORDE, 5504.569f, -2688.489f, 1479.991f} }; -struct sHyjalYells +struct HyjalYells { uint32 uiCreatureEntry; YellType m_pYellType; // Used to determine the type of yell (attack, rally, etc) int32 m_iTextId; // The text id to be yelled }; -sHyjalYells m_aHyjalYell[]= +static const HyjalYells aHyjalYell[]= { {NPC_JAINA, ATTACKED, -1534000}, {NPC_JAINA, ATTACKED, -1534001}, @@ -80,6 +81,67 @@ sHyjalYells m_aHyjalYell[]= {NPC_THRALL, DEATH, -1534017} }; +struct HyjalWave +{ + uint32 m_auiMobEntry[MAX_WAVE_MOB]; // Stores Creature Entries to be summoned in Waves + uint32 m_uiWaveTimer; // The timer before the next wave is summoned + bool m_bIsBoss; // Simply used to inform the wave summoner that the next wave contains a boss to halt all waves after that +}; + +// Waves that will be summoned in the Alliance Base +static const HyjalWave aHyjalWavesAlliance[]= +{ + // Rage Winterchill Wave 1-8 + {{NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, 0, 0, 0, 0, 0, 0, 0, 0}, 120000, false}, + {{NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_CRYPT, NPC_CRYPT, 0, 0, 0, 0, 0, 0}, 120000, false}, + {{NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, 0, 0, 0, 0, 0, 0}, 120000, false}, + {{NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_NECRO, NPC_NECRO, 0, 0, 0, 0, 0, 0}, 120000, false}, + {{NPC_GHOUL, NPC_GHOUL, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_NECRO, NPC_NECRO, NPC_NECRO, NPC_NECRO, 0, 0, 0, 0, 0, 0}, 120000, false}, + {{NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, 0, 0, 0, 0, 0}, 120000, false}, + {{NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_NECRO, NPC_NECRO, NPC_NECRO, NPC_NECRO, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, 0, 0, 0, 0, 0, 0}, 120000, false}, + {{NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_ABOMI, NPC_ABOMI, NPC_NECRO, NPC_NECRO, 0, 0, 0, 0}, 180000, false}, + // All 8 Waves are summoned, summon Rage Winterchill, next few waves are for Anetheron + {{NPC_WINTERCHILL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 0, true}, + // Anetheron Wave 1-8 + {{NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, 0, 0, 0, 0, 0, 0, 0, 0}, 120000, false}, + {{NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, 0, 0, 0, 0, 0, 0}, 120000, false}, + {{NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_NECRO, NPC_NECRO, NPC_NECRO, NPC_NECRO, 0, 0, 0, 0, 0, 0}, 120000, false}, + {{NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_BANSH, NPC_BANSH, NPC_BANSH, NPC_BANSH, 0, 0, 0, 0, 0, 0}, 120000, false}, + {{NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_NECRO, NPC_NECRO, NPC_BANSH, NPC_BANSH, NPC_BANSH, NPC_BANSH, 0, 0, 0, 0, 0, 0}, 120000, false}, + {{NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_ABOMI, NPC_ABOMI, NPC_NECRO, NPC_NECRO, NPC_NECRO, NPC_NECRO, 0, 0, 0, 0, 0, 0}, 120000, false}, + {{NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_BANSH, NPC_BANSH, NPC_BANSH, NPC_BANSH, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, 0, 0, 0, 0, 0, 0}, 120000, false}, + {{NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_BANSH, NPC_BANSH, NPC_NECRO, NPC_NECRO, 0, 0, 0, 0}, 180000, false}, + // All 8 Waves are summoned, summon Anatheron + {{NPC_ANETHERON, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 0, true} +}; + +// Waves that are summoned in the Horde base +static const HyjalWave aHyjalWavesHorde[]= +{ + // Kaz'Rogal Wave 1-8 + {{NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_BANSH, NPC_BANSH, NPC_NECRO, NPC_NECRO, 0, 0, 0, 0, 0, 0}, 120000, false}, + {{NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GARGO, NPC_GARGO, NPC_GARGO, NPC_GARGO, NPC_GARGO, NPC_GARGO, NPC_GARGO, NPC_GARGO, NPC_GARGO, NPC_GARGO, 0, 0, 0, 0}, 120000, false}, + {{NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_NECRO, NPC_NECRO, NPC_NECRO, NPC_NECRO, 0, 0, 0, 0}, 120000, false}, + {{NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_GARGO, NPC_GARGO, NPC_GARGO, NPC_GARGO, NPC_GARGO, NPC_GARGO, NPC_NECRO, NPC_NECRO, 0, 0, 0, 0}, 120000, false}, + {{NPC_GHOUL, NPC_GHOUL, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_NECRO, NPC_NECRO, NPC_NECRO, NPC_NECRO, 0, 0, 0, 0, 0, 0}, 120000, false}, + {{NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_NECRO, NPC_NECRO, NPC_NECRO, NPC_FROST, 0, 0}, 120000, false}, + {{NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_NECRO, NPC_NECRO, NPC_NECRO, NPC_FROST, 0, 0}, 120000, false}, + {{NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_CRYPT, NPC_CRYPT, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_NECRO, NPC_NECRO, NPC_BANSH, NPC_BANSH}, 180000, false}, + // All 8 Waves are summoned, summon Kaz'Rogal, next few waves are for Azgalor + {{NPC_KAZROGAL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 0, true}, + // Azgalor Wave 1-8 + {{NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_NECRO, NPC_NECRO, NPC_NECRO, NPC_NECRO, NPC_NECRO, NPC_NECRO, 0, 0, 0, 0, 0, 0}, 120000, false}, + {{NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_FROST, NPC_GARGO, NPC_GARGO, NPC_GARGO, NPC_GARGO, NPC_GARGO, NPC_GARGO, NPC_GARGO, NPC_GARGO, 0, 0, 0, 0}, 120000, false}, + {{NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GIANT, NPC_GIANT, NPC_GIANT, NPC_GIANT, NPC_GIANT, NPC_GIANT, NPC_GIANT, NPC_GIANT, 0, 0, 0, 0}, 120000, false}, + {{NPC_GIANT, NPC_GIANT, NPC_GIANT, NPC_GIANT, NPC_GIANT, NPC_GIANT, NPC_GIANT, NPC_GIANT, NPC_STALK, NPC_STALK, NPC_STALK, NPC_STALK, NPC_STALK, NPC_STALK, 0, 0, 0, 0}, 120000, false}, + {{NPC_STALK, NPC_STALK, NPC_STALK, NPC_STALK, NPC_STALK, NPC_STALK, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_NECRO, NPC_NECRO, NPC_NECRO, NPC_NECRO, 0, 0, 0, 0}, 120000, false}, + {{NPC_NECRO, NPC_NECRO, NPC_NECRO, NPC_NECRO, NPC_NECRO, NPC_NECRO, NPC_NECRO, NPC_NECRO, NPC_BANSH, NPC_BANSH, NPC_BANSH, NPC_BANSH, NPC_BANSH, NPC_BANSH, 0, 0, 0, 0}, 120000, false}, + {{NPC_GHOUL, NPC_GHOUL, NPC_CRYPT, NPC_CRYPT, NPC_STALK, NPC_STALK, NPC_GIANT, NPC_GIANT, NPC_GIANT, NPC_GIANT, NPC_GIANT, NPC_GIANT, 0, 0, 0, 0, 0, 0}, 120000, false}, + {{NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_STALK, NPC_STALK, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_BANSH, NPC_BANSH, NPC_BANSH, NPC_BANSH, NPC_NECRO, NPC_NECRO, 0, 0}, 180000, false}, + // All 8 Waves are summoned, summon Azgalor + {{NPC_AZGALOR, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 0, true} +}; + void hyjalAI::Reset() { // BossGuids @@ -165,23 +227,23 @@ void hyjalAI::Aggro(Unit *who) void hyjalAI::SpawnCreatureForWave(uint32 uiMobEntry) { - sHyjalLocation* pSpawn = NULL; + HyjalLocation const* pSpawn = NULL; - uint32 uiMaxCount = sizeof(m_aHyjalSpawnLoc)/sizeof(sHyjalLocation); + uint32 uiMaxCount = countof(aHyjalSpawnLoc); uint32 uiRandId = urand(1, uiMaxCount/2); //unsafe, if array becomes uneven. uint32 uiJ = 0; for (uint32 i = 0; i < uiMaxCount; ++i) { - if (m_aHyjalSpawnLoc[i].m_pBaseArea != (eBaseArea)m_uiBase) + if (aHyjalSpawnLoc[i].m_pBaseArea != (eBaseArea)m_uiBase) continue; ++uiJ; if (uiJ == uiRandId) { - pSpawn = &m_aHyjalSpawnLoc[i]; + pSpawn = &aHyjalSpawnLoc[i]; break; } } @@ -199,16 +261,14 @@ void hyjalAI::JustSummoned(Creature* pSummoned) // Increment Enemy Count to be used in World States and instance script ++m_uiEnemyCount; - sHyjalLocation* pMove = NULL; + HyjalLocation const* pMove = NULL; - uint32 uiMaxCount = sizeof(m_aHyjalWaveMoveTo)/sizeof(sHyjalLocation); - - for (uint32 i = 0; i < uiMaxCount; ++i) + for (uint32 i = 0; i < countof(aHyjalWaveMoveTo); ++i) { - if (m_aHyjalWaveMoveTo[i].m_pBaseArea != (eBaseArea)m_uiBase) + if (aHyjalWaveMoveTo[i].m_pBaseArea != (eBaseArea)m_uiBase) continue; - pMove = &m_aHyjalWaveMoveTo[i]; + pMove = &aHyjalWaveMoveTo[i]; break; } @@ -244,7 +304,7 @@ void hyjalAI::SummonNextWave() if (!m_pInstance) return; - sHyjalWave* pWaveData = m_uiBase ? &m_aHyjalWavesHorde[m_uiWaveCount] : &m_aHyjalWavesAlliance[m_uiWaveCount]; + HyjalWave const* pWaveData = m_uiBase ? &aHyjalWavesHorde[m_uiWaveCount] : &aHyjalWavesAlliance[m_uiWaveCount]; if (!pWaveData) { @@ -321,14 +381,13 @@ void hyjalAI::StartEvent() void hyjalAI::DoTalk(YellType pYellType) { - sHyjalYells* pYell = NULL; + HyjalYells const* pYell = NULL; - uint32 uiMaxCount = sizeof(m_aHyjalYell)/sizeof(sHyjalYells); bool bGetNext = false; - for (uint32 i = 0; i < uiMaxCount; ++i) + for (uint32 i = 0; i < countof(aHyjalYell); ++i) { - if (m_aHyjalYell[i].uiCreatureEntry == m_creature->GetEntry() && m_aHyjalYell[i].m_pYellType == pYellType) + if (aHyjalYell[i].uiCreatureEntry == m_creature->GetEntry() && aHyjalYell[i].m_pYellType == pYellType) { //this would not be safe unless we knew these had two entries in m_aYell if (pYellType == ATTACKED || pYellType== RALLY) @@ -340,7 +399,7 @@ void hyjalAI::DoTalk(YellType pYellType) } } - pYell = &m_aHyjalYell[i]; + pYell = &aHyjalYell[i]; break; } } diff --git a/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.h b/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.h index 538d033b3..3e13ad100 100644 --- a/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.h +++ b/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.h @@ -37,67 +37,6 @@ enum eSpell SPELL_FERAL_SPIRIT = 31331 }; -struct sHyjalWave -{ - uint32 m_auiMobEntry[MAX_WAVE_MOB]; // Stores Creature Entries to be summoned in Waves - uint32 m_uiWaveTimer; // The timer before the next wave is summoned - bool m_bIsBoss; // Simply used to inform the wave summoner that the next wave contains a boss to halt all waves after that -}; - -// Waves that will be summoned in the Alliance Base -static sHyjalWave m_aHyjalWavesAlliance[]= -{ - // Rage Winterchill Wave 1-8 - {NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, 0, 0, 0, 0, 0, 0, 0, 0, 120000, false}, - {NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_CRYPT, NPC_CRYPT, 0, 0, 0, 0, 0, 0, 120000, false}, - {NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, 0, 0, 0, 0, 0, 0, 120000, false}, - {NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_NECRO, NPC_NECRO, 0, 0, 0, 0, 0, 0, 120000, false}, - {NPC_GHOUL, NPC_GHOUL, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_NECRO, NPC_NECRO, NPC_NECRO, NPC_NECRO, 0, 0, 0, 0, 0, 0, 120000, false}, - {NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, 0, 0, 0, 0, 0, 120000, false}, - {NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_NECRO, NPC_NECRO, NPC_NECRO, NPC_NECRO, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, 0, 0, 0, 0, 0, 0, 120000, false}, - {NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_ABOMI, NPC_ABOMI, NPC_NECRO, NPC_NECRO, 0, 0, 0, 0, 180000, false}, - // All 8 Waves are summoned, summon Rage Winterchill, next few waves are for Anetheron - {NPC_WINTERCHILL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, true}, - // Anetheron Wave 1-8 - {NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, 0, 0, 0, 0, 0, 0, 0, 0, 120000, false}, - {NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, 0, 0, 0, 0, 0, 0, 120000, false}, - {NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_NECRO, NPC_NECRO, NPC_NECRO, NPC_NECRO, 0, 0, 0, 0, 0, 0, 120000, false}, - {NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_BANSH, NPC_BANSH, NPC_BANSH, NPC_BANSH, 0, 0, 0, 0, 0, 0, 120000, false}, - {NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_NECRO, NPC_NECRO, NPC_BANSH, NPC_BANSH, NPC_BANSH, NPC_BANSH, 0, 0, 0, 0, 0, 0, 120000, false}, - {NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_ABOMI, NPC_ABOMI, NPC_NECRO, NPC_NECRO, NPC_NECRO, NPC_NECRO, 0, 0, 0, 0, 0, 0, 120000, false}, - {NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_BANSH, NPC_BANSH, NPC_BANSH, NPC_BANSH, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, 0, 0, 0, 0, 0, 0, 120000, false}, - {NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_BANSH, NPC_BANSH, NPC_NECRO, NPC_NECRO, 0, 0, 0, 0, 180000, false}, - // All 8 Waves are summoned, summon Anatheron - {NPC_ANETHERON, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, true} -}; - -// Waves that are summoned in the Horde base -static sHyjalWave m_aHyjalWavesHorde[]= -{ - // Kaz'Rogal Wave 1-8 - {NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_BANSH, NPC_BANSH, NPC_NECRO, NPC_NECRO, 0, 0, 0, 0, 0, 0, 120000, false}, - {NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GARGO, NPC_GARGO, NPC_GARGO, NPC_GARGO, NPC_GARGO, NPC_GARGO, NPC_GARGO, NPC_GARGO, NPC_GARGO, NPC_GARGO, 0, 0, 0, 0, 120000, false}, - {NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_NECRO, NPC_NECRO, NPC_NECRO, NPC_NECRO, 0, 0, 0, 0, 120000, false}, - {NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_GARGO, NPC_GARGO, NPC_GARGO, NPC_GARGO, NPC_GARGO, NPC_GARGO, NPC_NECRO, NPC_NECRO, 0, 0, 0, 0, 120000, false}, - {NPC_GHOUL, NPC_GHOUL, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_NECRO, NPC_NECRO, NPC_NECRO, NPC_NECRO, 0, 0, 0, 0, 0, 0, 120000, false}, - {NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_NECRO, NPC_NECRO, NPC_NECRO, NPC_FROST, 0, 0, 120000, false}, - {NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_NECRO, NPC_NECRO, NPC_NECRO, NPC_FROST, 0, 0, 120000, false}, - {NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_CRYPT, NPC_CRYPT, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_NECRO, NPC_NECRO, NPC_BANSH, NPC_BANSH, 180000, false}, - // All 8 Waves are summoned, summon Kaz'Rogal, next few waves are for Azgalor - {NPC_KAZROGAL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, true}, - // Azgalor Wave 1-8 - {NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_NECRO, NPC_NECRO, NPC_NECRO, NPC_NECRO, NPC_NECRO, NPC_NECRO, 0, 0, 0, 0, 0, 0, 120000, false}, - {NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_FROST, NPC_GARGO, NPC_GARGO, NPC_GARGO, NPC_GARGO, NPC_GARGO, NPC_GARGO, NPC_GARGO, NPC_GARGO, 0, 0, 0, 0, 120000, false}, - {NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GIANT, NPC_GIANT, NPC_GIANT, NPC_GIANT, NPC_GIANT, NPC_GIANT, NPC_GIANT, NPC_GIANT, 0, 0, 0, 0, 120000, false}, - {NPC_GIANT, NPC_GIANT, NPC_GIANT, NPC_GIANT, NPC_GIANT, NPC_GIANT, NPC_GIANT, NPC_GIANT, NPC_STALK, NPC_STALK, NPC_STALK, NPC_STALK, NPC_STALK, NPC_STALK, 0, 0, 0, 0, 120000, false}, - {NPC_STALK, NPC_STALK, NPC_STALK, NPC_STALK, NPC_STALK, NPC_STALK, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_NECRO, NPC_NECRO, NPC_NECRO, NPC_NECRO, 0, 0, 0, 0, 120000, false}, - {NPC_NECRO, NPC_NECRO, NPC_NECRO, NPC_NECRO, NPC_NECRO, NPC_NECRO, NPC_NECRO, NPC_NECRO, NPC_BANSH, NPC_BANSH, NPC_BANSH, NPC_BANSH, NPC_BANSH, NPC_BANSH, 0, 0, 0, 0, 120000, false}, - {NPC_GHOUL, NPC_GHOUL, NPC_CRYPT, NPC_CRYPT, NPC_STALK, NPC_STALK, NPC_GIANT, NPC_GIANT, NPC_GIANT, NPC_GIANT, NPC_GIANT, NPC_GIANT, 0, 0, 0, 0, 0, 0, 120000, false}, - {NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_STALK, NPC_STALK, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_BANSH, NPC_BANSH, NPC_BANSH, NPC_BANSH, NPC_NECRO, NPC_NECRO, 0, 0, 180000, false}, - // All 8 Waves are summoned, summon Azgalor - {NPC_AZGALOR, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, true} -}; - enum TargetType // Used in the spell cast system for the AI { TARGETTYPE_SELF = 0, diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 4ae28c431..358bf9f18 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2400" + #define SD2_REVISION_NR "2401" #endif // __SD2_REVISION_NR_H__ From 1a1488603eecf2cca6ffea31c7dc2694bd132c9c Mon Sep 17 00:00:00 2001 From: Xfurry Date: Tue, 17 Jan 2012 23:39:42 +0200 Subject: [PATCH 0389/1172] [2402] Allow Anub'arak to evade if pulled out of combat area --- include/sc_creature.cpp | 5 +++++ scripts/northrend/azjol-nerub/azjol-nerub/boss_anubarak.cpp | 2 ++ sd2_revision_nr.h | 2 +- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/include/sc_creature.cpp b/include/sc_creature.cpp index 95b4b6344..edd63b0d3 100644 --- a/include/sc_creature.cpp +++ b/include/sc_creature.cpp @@ -506,6 +506,7 @@ enum NPC_SARTHARION = 28860, NPC_TALON_KING_IKISS = 18473, NPC_KARGATH_BLADEFIST = 16808, + NPC_ANUBARAK = 29120, }; bool ScriptedAI::EnterEvadeIfOutOfCombatArea(const uint32 uiDiff) @@ -555,6 +556,10 @@ bool ScriptedAI::EnterEvadeIfOutOfCombatArea(const uint32 uiDiff) if (fX < 255.0f && fX > 205.0f) return false; break; + case NPC_ANUBARAK: + if (fY < 281.0f && fY > 228.0f) + return false; + break; default: error_log("SD2: EnterEvadeIfOutOfCombatArea used for creature entry %u, but does not have any definition.", m_creature->GetEntry()); return false; diff --git a/scripts/northrend/azjol-nerub/azjol-nerub/boss_anubarak.cpp b/scripts/northrend/azjol-nerub/azjol-nerub/boss_anubarak.cpp index af7c985a1..26f497835 100644 --- a/scripts/northrend/azjol-nerub/azjol-nerub/boss_anubarak.cpp +++ b/scripts/northrend/azjol-nerub/azjol-nerub/boss_anubarak.cpp @@ -278,6 +278,8 @@ struct MANGOS_DLL_DECL boss_anubarakAI : public ScriptedAI else m_uiEmergeTimer -= uiDiff; } + + EnterEvadeIfOutOfCombatArea(uiDiff); } }; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 358bf9f18..37d995b13 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2401" + #define SD2_REVISION_NR "2402" #endif // __SD2_REVISION_NR_H__ From b4090a036cbf5c9a74f59aad6e1d42f48bd7249d Mon Sep 17 00:00:00 2001 From: stfx Date: Tue, 17 Jan 2012 22:24:59 +0100 Subject: [PATCH 0390/1172] [2403] Fix [2321]. * Remove evade check in PhaseEquipProcess as promised * Fix VC100 filters file Signed-off-by: Schmoozerd --- VC100/100ScriptDev2.vcxproj.filters | 3 +++ scripts/eastern_kingdoms/deadmines/boss_mr_smite.cpp | 8 -------- sd2_revision_nr.h | 2 +- 3 files changed, 4 insertions(+), 9 deletions(-) diff --git a/VC100/100ScriptDev2.vcxproj.filters b/VC100/100ScriptDev2.vcxproj.filters index 41f594c92..106317531 100644 --- a/VC100/100ScriptDev2.vcxproj.filters +++ b/VC100/100ScriptDev2.vcxproj.filters @@ -498,6 +498,9 @@ scripts\eastern_kingdoms\blackwing_lair + + scripts\eastern_kingdoms\deadmines + scripts\eastern_kingdoms\deadmines diff --git a/scripts/eastern_kingdoms/deadmines/boss_mr_smite.cpp b/scripts/eastern_kingdoms/deadmines/boss_mr_smite.cpp index 3a7b0a0fe..a9b477c52 100644 --- a/scripts/eastern_kingdoms/deadmines/boss_mr_smite.cpp +++ b/scripts/eastern_kingdoms/deadmines/boss_mr_smite.cpp @@ -142,14 +142,6 @@ struct MANGOS_DLL_DECL boss_mr_smiteAI : public ScriptedAI m_creature->SetStandState(UNIT_STAND_STATE_STAND); m_uiPhase = PHASE_EQUIP_END; m_uiEquipTimer = 1000; - - Unit* pVictim = m_creature->SelectAttackingTarget(ATTACKING_TARGET_TOPAGGRO, 0); - - if (!pVictim) - { - EnterEvadeMode(); - return; - } } void PhaseEquipEnd() diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 37d995b13..f9ac937f6 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2402" + #define SD2_REVISION_NR "2403" #endif // __SD2_REVISION_NR_H__ From ffcf70dd7e44e8566120c51dcf32915a37396e99 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Thu, 19 Jan 2012 23:49:46 +0200 Subject: [PATCH 0391/1172] [2404] Fix Anub'arak summoned creatures movement This expects MaNGOS [11879] --- .../azjol-nerub/azjol-nerub/boss_anubarak.cpp | 38 ++++++++++++++++--- sd2_revision_nr.h | 2 +- 2 files changed, 33 insertions(+), 7 deletions(-) diff --git a/scripts/northrend/azjol-nerub/azjol-nerub/boss_anubarak.cpp b/scripts/northrend/azjol-nerub/azjol-nerub/boss_anubarak.cpp index 26f497835..277296fc7 100644 --- a/scripts/northrend/azjol-nerub/azjol-nerub/boss_anubarak.cpp +++ b/scripts/northrend/azjol-nerub/azjol-nerub/boss_anubarak.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: Boss_Anubarak -SD%Complete: 70% -SDComment: Summoned creatures movement NYI; +SD%Complete: 80% +SDComment: Summoned creatures movement may need some adjustments - may be solved with movement maps SDCategory: Azjol'Nerub EndScriptData */ @@ -55,7 +55,11 @@ enum SPELL_SUMMON_VENOMANCER = 53615, // summons 29217 SPELL_SUMMON_DARTER = 53599, // summons 29213 - //NPC_IMPALE_TARGET = 29184, // scripted in ACID + NPC_ANUBAR_DARTER = 29213, + NPC_ANUBAR_ASSASSIN = 29214, + NPC_ANUBAR_GUARDIAN = 29216, + NPC_ANUBAR_VENOMANCER = 29217, + NPC_IMPALE_TARGET = 29184, PHASE_GROUND = 1, PHASE_SUBMERGED = 2 @@ -150,9 +154,31 @@ struct MANGOS_DLL_DECL boss_anubarakAI : public ScriptedAI void JustSummoned(Creature* pSummoned) { - // Need to set the impale target in combat in order to be handled by acid - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) - pSummoned->AI()->AttackStart(pTarget); + if (!m_pInstance) + return; + + switch (pSummoned->GetEntry()) + { + case NPC_ANUBAR_GUARDIAN: + case NPC_ANUBAR_VENOMANCER: + pSummoned->SetWalk(false); + if (Creature* pTrigger = m_creature->GetMap()->GetCreature(m_pInstance->GetAnubTrigger())) + pSummoned->GetMotionMaster()->MovePoint(0, pTrigger->GetPositionX(), pTrigger->GetPositionY(), pTrigger->GetPositionZ()); + break; + case NPC_ANUBAR_DARTER: + case NPC_ANUBAR_ASSASSIN: + float fX, fY, fZ; + if (Creature* pTrigger = m_creature->GetMap()->GetCreature(m_pInstance->GetAnubTrigger())) + m_creature->GetRandomPoint(pTrigger->GetPositionX(), pTrigger->GetPositionY(), pTrigger->GetPositionZ(), 15.0f, fX, fY, fZ); + + pSummoned->SetWalk(false); + pSummoned->GetMotionMaster()->MovePoint(0, fX, fY, fZ); + break; + case NPC_IMPALE_TARGET: + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + pSummoned->AI()->AttackStart(pTarget); + break; + } } void UpdateAI(const uint32 uiDiff) diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index f9ac937f6..94a0f2adc 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2403" + #define SD2_REVISION_NR "2404" #endif // __SD2_REVISION_NR_H__ From 8c0cd6dddc91e1dcd2b61415e1115b636f9519ce Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Mon, 23 Jan 2012 15:11:31 +0100 Subject: [PATCH 0392/1172] [2405] Fix possible not initialized variables (warning) --- .../northrend/azjol-nerub/azjol-nerub/boss_anubarak.cpp | 8 +++++--- sd2_revision_nr.h | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/scripts/northrend/azjol-nerub/azjol-nerub/boss_anubarak.cpp b/scripts/northrend/azjol-nerub/azjol-nerub/boss_anubarak.cpp index 277296fc7..36c715923 100644 --- a/scripts/northrend/azjol-nerub/azjol-nerub/boss_anubarak.cpp +++ b/scripts/northrend/azjol-nerub/azjol-nerub/boss_anubarak.cpp @@ -167,12 +167,14 @@ struct MANGOS_DLL_DECL boss_anubarakAI : public ScriptedAI break; case NPC_ANUBAR_DARTER: case NPC_ANUBAR_ASSASSIN: - float fX, fY, fZ; if (Creature* pTrigger = m_creature->GetMap()->GetCreature(m_pInstance->GetAnubTrigger())) + { + float fX, fY, fZ; m_creature->GetRandomPoint(pTrigger->GetPositionX(), pTrigger->GetPositionY(), pTrigger->GetPositionZ(), 15.0f, fX, fY, fZ); - pSummoned->SetWalk(false); - pSummoned->GetMotionMaster()->MovePoint(0, fX, fY, fZ); + pSummoned->SetWalk(false); + pSummoned->GetMotionMaster()->MovePoint(0, fX, fY, fZ); + } break; case NPC_IMPALE_TARGET: if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 94a0f2adc..0b774294e 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2404" + #define SD2_REVISION_NR "2405" #endif // __SD2_REVISION_NR_H__ From a767e64698df92b88c906d61ed775b3e6a248028 Mon Sep 17 00:00:00 2001 From: Cupcake Date: Mon, 23 Jan 2012 15:42:00 +0100 Subject: [PATCH 0393/1172] [2406] Fix Jan'alai Fire Bombs despawn on FAIL Signed-off-by: Schmoozerd --- scripts/eastern_kingdoms/zulaman/boss_janalai.cpp | 13 ++++++++----- sd2_revision_nr.h | 2 +- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/scripts/eastern_kingdoms/zulaman/boss_janalai.cpp b/scripts/eastern_kingdoms/zulaman/boss_janalai.cpp index b7256e566..7d85c1650 100644 --- a/scripts/eastern_kingdoms/zulaman/boss_janalai.cpp +++ b/scripts/eastern_kingdoms/zulaman/boss_janalai.cpp @@ -170,7 +170,6 @@ struct MANGOS_DLL_DECL boss_janalaiAI : public ScriptedAI void Reset() { - m_lBombsGUIDList.clear(); m_lEggsRemainingList.clear(); if (Creature* pHatcher = m_creature->GetMap()->GetCreature(m_hatcherOneGuid)) @@ -206,6 +205,13 @@ struct MANGOS_DLL_DECL boss_janalaiAI : public ScriptedAI void JustReachedHome() { + for (GUIDList::const_iterator itr = m_lBombsGUIDList.begin(); itr != m_lBombsGUIDList.end(); ++itr) + { + if (Creature* pBomb = m_creature->GetMap()->GetCreature(*itr)) + pBomb->ForcedDespawn(); + } + m_lBombsGUIDList.clear(); + if (m_pInstance) m_pInstance->SetData(TYPE_JANALAI, FAIL); } @@ -327,10 +333,7 @@ struct MANGOS_DLL_DECL boss_janalaiAI : public ScriptedAI void BlowUpBombs() { - if (m_lBombsGUIDList.empty()) - return; - - for(GUIDList::const_iterator itr = m_lBombsGUIDList.begin(); itr != m_lBombsGUIDList.end(); ++itr) + for (GUIDList::const_iterator itr = m_lBombsGUIDList.begin(); itr != m_lBombsGUIDList.end(); ++itr) { if (Creature* pBomb = m_creature->GetMap()->GetCreature(*itr)) { diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 0b774294e..f878236d7 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2405" + #define SD2_REVISION_NR "2406" #endif // __SD2_REVISION_NR_H__ From c3cf8d643139cd21434c44b2a29cf4546cc76011 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Mon, 23 Jan 2012 21:24:15 +0200 Subject: [PATCH 0394/1172] [2407] Implement abilities for Trollgore Note: Spell 49405 needs core support --- .../draktharon_keep/boss_trollgore.cpp | 127 +++++++++++++++++- .../draktharon_keep/draktharon_keep.h | 6 + .../instance_draktharon_keep.cpp | 6 + sd2_revision_nr.h | 2 +- 4 files changed, 135 insertions(+), 6 deletions(-) diff --git a/scripts/northrend/draktharon_keep/boss_trollgore.cpp b/scripts/northrend/draktharon_keep/boss_trollgore.cpp index d54cb8c4f..b7a6936c4 100644 --- a/scripts/northrend/draktharon_keep/boss_trollgore.cpp +++ b/scripts/northrend/draktharon_keep/boss_trollgore.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: Boss_Trollgore -SD%Complete: 20% -SDComment: +SD%Complete: 70% +SDComment: Achievement NYI; SDCategory: Drak'Tharon Keep EndScriptData */ @@ -30,7 +30,19 @@ enum SAY_CONSUME = -1600001, SAY_DEATH = -1600002, SAY_EXPLODE = -1600003, - SAY_KILL = -1600004 + SAY_KILL = -1600004, + + SPELL_CRUSH = 49639, + SPELL_INFECTED_WOUND = 49637, + SPELL_CORPSE_EXPLODE = 49555, + SPELL_CORPSE_EXPLODE_H = 59087, + SPELL_CONSUME = 49380, + SPELL_CONSUME_H = 59803, + + SPELL_SUMMON_INVADER_1 = 49456, // summon 27709 + SPELL_SUMMON_INVADER_2 = 49457, // summon 27753 + //SPELL_SUMMON_INVADER_3 = 49458, // summon 27754 + SPELL_INVADER_TAUNT = 49405, // triggers 49406 }; /*###### @@ -41,16 +53,29 @@ struct MANGOS_DLL_DECL boss_trollgoreAI : public ScriptedAI { boss_trollgoreAI(Creature* pCreature) : ScriptedAI(pCreature) { - m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_pInstance = (instance_draktharon_keep*)pCreature->GetInstanceData(); m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); Reset(); } - ScriptedInstance* m_pInstance; + instance_draktharon_keep* m_pInstance; bool m_bIsRegularMode; + uint32 m_uiConsumeTimer; + uint32 m_uiCrushTimer; + uint32 m_uiInfectedWoundTimer; + uint32 m_uiWaveTimer; + uint32 m_uiCorpseExplodeTimer; + + GUIDVector m_vTriggers; + void Reset() { + m_uiCorpseExplodeTimer = 20000; + m_uiConsumeTimer = 15000; + m_uiCrushTimer = 10000; + m_uiInfectedWoundTimer = 5000; + m_uiWaveTimer = 0; } void Aggro(Unit* pWho) @@ -58,7 +83,10 @@ struct MANGOS_DLL_DECL boss_trollgoreAI : public ScriptedAI DoScriptText(SAY_AGGRO, m_creature); if (m_pInstance) + { m_pInstance->SetData(TYPE_TROLLGORE, IN_PROGRESS); + m_pInstance->GetTrollgoreOutsideTriggers(m_vTriggers); + } } void KilledUnit(Unit* pVictim) @@ -81,11 +109,100 @@ struct MANGOS_DLL_DECL boss_trollgoreAI : public ScriptedAI m_pInstance->SetData(TYPE_TROLLGORE, FAIL); } + void JustSummoned(Creature* pSummoned) + { + // This spell taunts the boss and the boss taunts back + pSummoned->CastSpell(m_creature, SPELL_INVADER_TAUNT, true); + } + + // Wrapper to handle the drakkari invaders summon + void DoSummonDrakkariInvaders() + { + if (!m_pInstance) + return; + + // check if there are there are at least 2 triggers in the vector + if (m_vTriggers.size() < 2) + return; + + if (roll_chance_i(30)) + { + // Summon a troll in the corner and 2 trolls in the air + if (Creature* pTrigger = m_creature->GetMap()->GetCreature(m_pInstance->GetTrollgoreCornerTrigger())) + pTrigger->CastSpell(pTrigger, roll_chance_i(20) ? SPELL_SUMMON_INVADER_1 : SPELL_SUMMON_INVADER_2, true, NULL, NULL, m_creature->GetObjectGuid()); + + // get two random outside triggers + uint8 uiMaxTriggers = m_vTriggers.size(); + uint8 uiPos1 = urand(0, uiMaxTriggers - 1); + uint8 uiPos2 = (uiPos1 + urand(1, uiMaxTriggers - 1)) % uiMaxTriggers; + + if (Creature* pTrigger = m_creature->GetMap()->GetCreature(m_vTriggers[uiPos1])) + pTrigger->CastSpell(pTrigger, roll_chance_i(30) ? SPELL_SUMMON_INVADER_1 : SPELL_SUMMON_INVADER_2, true, NULL, NULL, m_creature->GetObjectGuid()); + if (Creature* pTrigger = m_creature->GetMap()->GetCreature(m_vTriggers[uiPos2])) + pTrigger->CastSpell(pTrigger, roll_chance_i(30) ? SPELL_SUMMON_INVADER_1 : SPELL_SUMMON_INVADER_2, true, NULL, NULL, m_creature->GetObjectGuid()); + } + else + { + // Summon 3 trolls in the air + for(uint8 i = 0; i < m_vTriggers.size(); ++i) + { + if (Creature* pTrigger = m_creature->GetMap()->GetCreature(m_vTriggers[i])) + pTrigger->CastSpell(pTrigger, roll_chance_i(30) ? SPELL_SUMMON_INVADER_1 : SPELL_SUMMON_INVADER_2, true, NULL, NULL, m_creature->GetObjectGuid()); + } + } + } + void UpdateAI(const uint32 uiDiff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; + if (m_uiCrushTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_CRUSH) == CAST_OK) + m_uiCrushTimer = 10000; + } + else + m_uiCrushTimer -= uiDiff; + + if (m_uiInfectedWoundTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_INFECTED_WOUND) == CAST_OK) + m_uiInfectedWoundTimer = urand(20000, 30000); + } + else + m_uiInfectedWoundTimer -= uiDiff; + + if (m_uiWaveTimer < uiDiff) + { + DoSummonDrakkariInvaders(); + m_uiWaveTimer = 30000; + } + else + m_uiWaveTimer -= uiDiff; + + if (m_uiConsumeTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_CONSUME : SPELL_CONSUME_H) == CAST_OK) + { + DoScriptText(SAY_CONSUME, m_creature); + m_uiConsumeTimer = 15000; + } + } + else + m_uiConsumeTimer -= uiDiff; + + if (m_uiCorpseExplodeTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_CORPSE_EXPLODE : SPELL_CORPSE_EXPLODE_H) == CAST_OK) + { + DoScriptText(SAY_EXPLODE, m_creature); + m_uiCorpseExplodeTimer = 10000; + } + } + else + m_uiCorpseExplodeTimer -= uiDiff; + DoMeleeAttackIfReady(); } }; diff --git a/scripts/northrend/draktharon_keep/draktharon_keep.h b/scripts/northrend/draktharon_keep/draktharon_keep.h index 5d302f533..c9bfd0069 100644 --- a/scripts/northrend/draktharon_keep/draktharon_keep.h +++ b/scripts/northrend/draktharon_keep/draktharon_keep.h @@ -20,6 +20,7 @@ enum // Adds of King Dred Encounter - deaths counted for achievement NPC_DRAKKARI_GUTRIPPER = 26641, NPC_DRAKKARI_SCYTHECLAW = 26628, + NPC_WORLD_TRIGGER = 22515, // Novos Encounter SPELL_BEAM_CHANNEL = 52106, @@ -69,6 +70,9 @@ class MANGOS_DLL_DECL instance_draktharon_keep : public ScriptedInstance void OnCreatureCreate(Creature* pCreature); void OnObjectCreate(GameObject* pGo); + void GetTrollgoreOutsideTriggers(GUIDVector& vTriggers) { vTriggers = m_vTriggerGuids; } + ObjectGuid GetTrollgoreCornerTrigger() { return m_trollgoreCornerTriggerGuid; } + bool CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/); const char* Save() { return m_strInstData.c_str(); } @@ -89,11 +93,13 @@ class MANGOS_DLL_DECL instance_draktharon_keep : public ScriptedInstance bool m_bTrollgoreConsume; ObjectGuid m_novosChannelGuid; + ObjectGuid m_trollgoreCornerTriggerGuid; NovosCrystalInfo m_aNovosCrystalInfo[MAX_CRYSTALS]; GUIDVector m_vSummonDummyGuids; GUIDList m_lNovosDummyGuids; + GUIDVector m_vTriggerGuids; }; #endif diff --git a/scripts/northrend/draktharon_keep/instance_draktharon_keep.cpp b/scripts/northrend/draktharon_keep/instance_draktharon_keep.cpp index 74a66ea91..2454ec803 100644 --- a/scripts/northrend/draktharon_keep/instance_draktharon_keep.cpp +++ b/scripts/northrend/draktharon_keep/instance_draktharon_keep.cpp @@ -68,6 +68,12 @@ void instance_draktharon_keep::OnCreatureCreate(Creature* pCreature) case NPC_CRYSTAL_CHANNEL_TARGET: m_lNovosDummyGuids.push_back(pCreature->GetObjectGuid()); break; + case NPC_WORLD_TRIGGER: + if (pCreature->GetPositionZ() > 30.0f) + m_vTriggerGuids.push_back(pCreature->GetObjectGuid()); + else + m_trollgoreCornerTriggerGuid = pCreature->GetObjectGuid(); + break; } } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index f878236d7..1851d4248 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2406" + #define SD2_REVISION_NR "2407" #endif // __SD2_REVISION_NR_H__ From 0d9018755852f504d181235ca935307811e85294 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Mon, 23 Jan 2012 22:04:37 +0200 Subject: [PATCH 0395/1172] [2408] Implement support for Achievement 2151 - Consumption Junction Also fix a typo from the previous commit --- .../draktharon_keep/boss_trollgore.cpp | 28 +++++++++++++++++-- sd2_revision_nr.h | 2 +- 2 files changed, 26 insertions(+), 4 deletions(-) diff --git a/scripts/northrend/draktharon_keep/boss_trollgore.cpp b/scripts/northrend/draktharon_keep/boss_trollgore.cpp index b7a6936c4..80522d4c9 100644 --- a/scripts/northrend/draktharon_keep/boss_trollgore.cpp +++ b/scripts/northrend/draktharon_keep/boss_trollgore.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: Boss_Trollgore -SD%Complete: 70% -SDComment: Achievement NYI; +SD%Complete: 80% +SDComment: Some details related to the summoned creatures need more adjustments SDCategory: Drak'Tharon Keep EndScriptData */ @@ -35,14 +35,18 @@ enum SPELL_CRUSH = 49639, SPELL_INFECTED_WOUND = 49637, SPELL_CORPSE_EXPLODE = 49555, - SPELL_CORPSE_EXPLODE_H = 59087, + SPELL_CORPSE_EXPLODE_H = 59807, SPELL_CONSUME = 49380, SPELL_CONSUME_H = 59803, + SPELL_CONSUME_BUFF = 49381, // used to measure the achiev + SPELL_CONSUME_BUFF_H = 59805, SPELL_SUMMON_INVADER_1 = 49456, // summon 27709 SPELL_SUMMON_INVADER_2 = 49457, // summon 27753 //SPELL_SUMMON_INVADER_3 = 49458, // summon 27754 SPELL_INVADER_TAUNT = 49405, // triggers 49406 + + MAX_CONSOME_STACKS = 10, }; /*###### @@ -61,6 +65,8 @@ struct MANGOS_DLL_DECL boss_trollgoreAI : public ScriptedAI instance_draktharon_keep* m_pInstance; bool m_bIsRegularMode; + uint8 m_uiConsumeStacks; + uint32 m_uiConsumeTimer; uint32 m_uiCrushTimer; uint32 m_uiInfectedWoundTimer; @@ -76,6 +82,7 @@ struct MANGOS_DLL_DECL boss_trollgoreAI : public ScriptedAI m_uiCrushTimer = 10000; m_uiInfectedWoundTimer = 5000; m_uiWaveTimer = 0; + m_uiConsumeStacks = 0; } void Aggro(Unit* pWho) @@ -109,6 +116,21 @@ struct MANGOS_DLL_DECL boss_trollgoreAI : public ScriptedAI m_pInstance->SetData(TYPE_TROLLGORE, FAIL); } + void SpellHit(Unit* pTarget, const SpellEntry* pSpell) + { + if (pSpell->Id == SPELL_CONSUME_BUFF || pSpell->Id == SPELL_CONSUME_BUFF_H) + { + ++m_uiConsumeStacks; + + // if the boss has 10 stacks then set the achiev to fail + if (m_uiConsumeStacks == MAX_CONSOME_STACKS) + { + if (m_pInstance) + m_pInstance->SetData(TYPE_TROLLGORE, SPECIAL); + } + } + } + void JustSummoned(Creature* pSummoned) { // This spell taunts the boss and the boss taunts back diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 1851d4248..63165fe37 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2407" + #define SD2_REVISION_NR "2408" #endif // __SD2_REVISION_NR_H__ From 8968f1e43240339f0ec7cabd49d375fabe3981ba Mon Sep 17 00:00:00 2001 From: Xfurry Date: Tue, 24 Jan 2012 21:55:20 +0200 Subject: [PATCH 0396/1172] [2409] Implement basic script support for Shirrak the Dead Watcher --- .../auchenai_crypts/boss_shirrak.cpp | 53 +++++++++++++++++-- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 + sql/scriptdev2_script_full.sql | 4 +- sql/updates/r2409_mangos.sql | 1 + sql/updates/r2409_scriptdev2.sql | 3 ++ 6 files changed, 59 insertions(+), 5 deletions(-) create mode 100644 sql/updates/r2409_mangos.sql create mode 100644 sql/updates/r2409_scriptdev2.sql diff --git a/scripts/outland/auchindoun/auchenai_crypts/boss_shirrak.cpp b/scripts/outland/auchindoun/auchenai_crypts/boss_shirrak.cpp index d6fd8cddc..c7fc344c4 100644 --- a/scripts/outland/auchindoun/auchenai_crypts/boss_shirrak.cpp +++ b/scripts/outland/auchindoun/auchenai_crypts/boss_shirrak.cpp @@ -16,13 +16,60 @@ /* ScriptData SDName: boss_shirrak -SD%Complete: 0 -SDComment: Placeholder +SD%Complete: 20 +SDComment: Basic script only SDCategory: Auchindoun, Auchenai Crypts EndScriptData */ #include "precompiled.h" +enum +{ + EMOTE_FOCUS = -1558010, + + SPELL_CARNIVOROUS_BITE = 36383, + SPELL_CARNIVOROUS_BITE_H = 39382, + SPELL_INHIBIT_MAGIC = 32264, + SPELL_ATTRACT_MAGIC = 32265, + + SPELL_FOCUS_TARGET_VISUAL = 32286, + NPC_FOCUS_FIRE = 18374 +}; + +struct MANGOS_DLL_DECL boss_shirrakAI : public ScriptedAI +{ + boss_shirrakAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); + Reset(); + } + + bool m_bIsRegularMode; + + void Reset() + { + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_shirrak(Creature* pCreature) +{ + return new boss_shirrakAI(pCreature); +} + void AddSC_boss_shirrak() { -} \ No newline at end of file + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_shirrak"; + pNewScript->GetAI = &GetAI_boss_shirrak; + pNewScript->RegisterSelf(); +} diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 63165fe37..8a47cf325 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2408" + #define SD2_REVISION_NR "2409" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 914645d7b..eec760ff3 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -194,6 +194,7 @@ UPDATE creature_template SET ScriptName='mob_ethereal_beacon' WHERE entry=18431; UPDATE creature_template SET ScriptName='boss_exarch_maladaar' WHERE entry=18373; UPDATE creature_template SET ScriptName='mob_avatar_of_martyred' WHERE entry=18478; UPDATE creature_template SET ScriptName='mob_stolen_soul' WHERE entry=18441; +UPDATE creature_template SET ScriptName='boss_shirrak' WHERE entry=18371; /* SETHEKK HALLS */ UPDATE instance_template SET ScriptName='instance_sethekk_halls' WHERE map=556; diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 5a048692a..cbdbc7342 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -2137,7 +2137,9 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1558006,'Stare into the darkness of your soul.',10511,1,0,0,'maladaar SAY_SOUL_CLEAVE'), (-1558007,'These walls will be your doom.',10516,1,0,0,'maladaar SAY_SLAY_1'), (-1558008,' Now, you\'ll stay for eternity!',10517,1,0,0,'maladaar SAY_SLAY_2'), -(-1558009,'This is... where.. I belong...',10518,1,0,0,'maladaar SAY_DEATH'); +(-1558009,'This is... where.. I belong...',10518,1,0,0,'maladaar SAY_DEATH'), + +(-1558010,'%s focuses on $N',0,3,0,0,'shirrak EMOTE_FOCUS'); -- -1 560 000 ESCAPE FROM DURNHOLDE (OLD HILLSBRAD) INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES diff --git a/sql/updates/r2409_mangos.sql b/sql/updates/r2409_mangos.sql new file mode 100644 index 000000000..6e231ae95 --- /dev/null +++ b/sql/updates/r2409_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='boss_shirrak' WHERE entry=18371; diff --git a/sql/updates/r2409_scriptdev2.sql b/sql/updates/r2409_scriptdev2.sql new file mode 100644 index 000000000..0f0e8e6d5 --- /dev/null +++ b/sql/updates/r2409_scriptdev2.sql @@ -0,0 +1,3 @@ +DELETE FROM script_texts WHERE entry=-1558010; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1558010,'%s focuses on $N',0,3,0,0,'shirrak EMOTE_FOCUS'); From d7a0a33bcdee085d1111fcc744a2948c339c55a9 Mon Sep 17 00:00:00 2001 From: Bugfix Date: Tue, 24 Jan 2012 22:15:43 +0200 Subject: [PATCH 0397/1172] [2410] Implement abilities for Shirrak the Dead Watcher Signed-off-by: Xfurry --- .../auchenai_crypts/boss_shirrak.cpp | 81 ++++++++++++++++++- sd2_revision_nr.h | 2 +- 2 files changed, 80 insertions(+), 3 deletions(-) diff --git a/scripts/outland/auchindoun/auchenai_crypts/boss_shirrak.cpp b/scripts/outland/auchindoun/auchenai_crypts/boss_shirrak.cpp index c7fc344c4..5f0fd6f68 100644 --- a/scripts/outland/auchindoun/auchenai_crypts/boss_shirrak.cpp +++ b/scripts/outland/auchindoun/auchenai_crypts/boss_shirrak.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: boss_shirrak -SD%Complete: 20 -SDComment: Basic script only +SD%Complete: 90 +SDComment: Timers may need small adjustments SDCategory: Auchindoun, Auchenai Crypts EndScriptData */ @@ -46,8 +46,29 @@ struct MANGOS_DLL_DECL boss_shirrakAI : public ScriptedAI bool m_bIsRegularMode; + uint32 m_uiCarnivorousBiteTimer; + uint32 m_uiFocusFireTimer; + uint32 m_uiAttractMagicTimer; + + uint8 m_uiFocusFireCount; + + ObjectGuid m_focusTargetGuid; + void Reset() { + m_uiCarnivorousBiteTimer = 10000; + m_uiFocusFireTimer = 15000; + m_uiAttractMagicTimer = 25000; + m_uiFocusFireCount = 0; + + DoCastSpellIfCan(m_creature, SPELL_INHIBIT_MAGIC); + } + + void JustSummoned(Creature* pSummoned) + { + // The focus fire creature casts the focus fire visual + if (pSummoned->GetEntry() == NPC_FOCUS_FIRE) + pSummoned->CastSpell(pSummoned, SPELL_FOCUS_TARGET_VISUAL, true); } void UpdateAI(const uint32 uiDiff) @@ -55,6 +76,62 @@ struct MANGOS_DLL_DECL boss_shirrakAI : public ScriptedAI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; + if (m_uiCarnivorousBiteTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_CARNIVOROUS_BITE : SPELL_CARNIVOROUS_BITE_H) == CAST_OK) + m_uiCarnivorousBiteTimer = urand(8000, 12000); + } + else + m_uiCarnivorousBiteTimer -= uiDiff; + + if (m_uiAttractMagicTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_ATTRACT_MAGIC) == CAST_OK) + m_uiAttractMagicTimer = urand(20000, 25000); + } + else + m_uiAttractMagicTimer -= uiDiff; + + if (m_uiFocusFireTimer < uiDiff) + { + ++m_uiFocusFireCount; + Unit* pTarget = NULL; + + switch (m_uiFocusFireCount) + { + case 1: + { + // engage the target + pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1, uint32(0), SELECT_FLAG_PLAYER); + + if (!pTarget) + pTarget = m_creature->getVictim(); + + DoScriptText(EMOTE_FOCUS, m_creature, pTarget); + m_focusTargetGuid = pTarget->GetObjectGuid(); + // no break; + } + case 2: + // we have a delay of 1 sec between the summons + m_uiFocusFireTimer = 1000; + break; + case 3: + // reset the timers and the summon count + m_uiFocusFireCount = 0; + m_uiFocusFireTimer = 15000; + break; + } + + if (!pTarget) + pTarget = m_creature->GetMap()->GetUnit(m_focusTargetGuid); + + // Summon focus fire at target location + if (pTarget) + m_creature->SummonCreature(NPC_FOCUS_FIRE, pTarget->GetPositionX(), pTarget->GetPositionY(), pTarget->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN, 10000); + } + else + m_uiFocusFireTimer -= uiDiff; + DoMeleeAttackIfReady(); } }; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 8a47cf325..8b24b7e32 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2409" + #define SD2_REVISION_NR "2410" #endif // __SD2_REVISION_NR_H__ From 941a945faa8bad774cfe71b8db6f7192e6e4c80c Mon Sep 17 00:00:00 2001 From: Xfurry Date: Tue, 24 Jan 2012 22:58:14 +0200 Subject: [PATCH 0398/1172] [2411] Cleanup for Pandemonius --- .../mana_tombs/boss_pandemonius.cpp | 100 ++++++++++-------- sd2_revision_nr.h | 2 +- 2 files changed, 55 insertions(+), 47 deletions(-) diff --git a/scripts/outland/auchindoun/mana_tombs/boss_pandemonius.cpp b/scripts/outland/auchindoun/mana_tombs/boss_pandemonius.cpp index 5b7a65e25..1ee196ef8 100644 --- a/scripts/outland/auchindoun/mana_tombs/boss_pandemonius.cpp +++ b/scripts/outland/auchindoun/mana_tombs/boss_pandemonius.cpp @@ -23,21 +23,23 @@ EndScriptData */ #include "precompiled.h" -#define SAY_AGGRO_1 -1557008 -#define SAY_AGGRO_2 -1557009 -#define SAY_AGGRO_3 -1557010 - -#define SAY_KILL_1 -1557011 -#define SAY_KILL_2 -1557012 - -#define SAY_DEATH -1557013 - -#define EMOTE_DARK_SHELL -1557014 - -#define SPELL_VOID_BLAST 32325 -#define SPELL_VOID_BLAST_H 38760 -#define SPELL_DARK_SHELL 32358 -#define SPELL_DARK_SHELL_H 38759 +enum +{ + SAY_AGGRO_1 = -1557008, + SAY_AGGRO_2 = -1557009, + SAY_AGGRO_3 = -1557010, + SAY_KILL_1 = -1557011, + SAY_KILL_2 = -1557012, + SAY_DEATH = -1557013, + EMOTE_DARK_SHELL = -1557014, + + SPELL_VOID_BLAST = 32325, + SPELL_VOID_BLAST_H = 38760, + SPELL_DARK_SHELL = 32358, + SPELL_DARK_SHELL_H = 38759, + + MAX_VOID_BLASTS = 5, +}; struct MANGOS_DLL_DECL boss_pandemoniusAI : public ScriptedAI { @@ -48,28 +50,29 @@ struct MANGOS_DLL_DECL boss_pandemoniusAI : public ScriptedAI } bool m_bIsRegularMode; - uint32 VoidBlast_Timer; - uint32 DarkShell_Timer; - uint32 VoidBlast_Counter; + + uint32 m_uiVoidBlastTimer; + uint32 m_uiDarkShellTimer; + uint8 m_uiVoidBlastCounter; void Reset() { - VoidBlast_Timer = urand(8000, 23000); - DarkShell_Timer = 20000; - VoidBlast_Counter = 0; + m_uiVoidBlastTimer = urand(8000, 23000); + m_uiDarkShellTimer = 20000; + m_uiVoidBlastCounter = 0; } - void JustDied(Unit* Killer) + void JustDied(Unit* pKiller) { DoScriptText(SAY_DEATH, m_creature); } - void KilledUnit(Unit* victim) + void KilledUnit(Unit* pVictim) { DoScriptText(urand(0, 1) ? SAY_KILL_1 : SAY_KILL_2, m_creature); } - void Aggro(Unit *who) + void Aggro(Unit* pWho) { switch(urand(0, 2)) { @@ -77,42 +80,47 @@ struct MANGOS_DLL_DECL boss_pandemoniusAI : public ScriptedAI case 1: DoScriptText(SAY_AGGRO_2, m_creature); break; case 2: DoScriptText(SAY_AGGRO_3, m_creature); break; } - } - void UpdateAI(const uint32 diff) + void UpdateAI(const uint32 uiDiff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - if (VoidBlast_Timer < diff) + if (m_uiVoidBlastTimer < uiDiff) { - if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + DoCastSpellIfCan(pTarget, m_bIsRegularMode ? SPELL_VOID_BLAST : SPELL_VOID_BLAST_H); + + // reset timer and counter when counter has reached the max limit + if (m_uiVoidBlastCounter == MAX_VOID_BLASTS) { - DoCastSpellIfCan(target, m_bIsRegularMode ? SPELL_VOID_BLAST : SPELL_VOID_BLAST_H); - VoidBlast_Timer = 500; - ++VoidBlast_Counter; + m_uiVoidBlastTimer = urand(15000, 25000); + m_uiVoidBlastCounter = 0; } - - if (VoidBlast_Counter == 5) + // cast the void blasts in a row until we reach the max limit + else { - VoidBlast_Timer = urand(15000, 25000); - VoidBlast_Counter = 0; + m_uiVoidBlastTimer = 500; + ++m_uiVoidBlastCounter; } - }else VoidBlast_Timer -= diff; + } + else + m_uiVoidBlastTimer -= uiDiff; - if (!VoidBlast_Counter) + // use the darkshell only when the boss isn't casting the void blasts + if (!m_uiVoidBlastCounter) { - if (DarkShell_Timer < diff) + if (m_uiDarkShellTimer < uiDiff) { - if (m_creature->IsNonMeleeSpellCasted(false)) - m_creature->InterruptNonMeleeSpells(true); - - DoScriptText(EMOTE_DARK_SHELL, m_creature); - - DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_DARK_SHELL : SPELL_DARK_SHELL_H); - DarkShell_Timer = 20000; - }else DarkShell_Timer -= diff; + if (DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_DARK_SHELL : SPELL_DARK_SHELL_H) == CAST_OK) + { + DoScriptText(EMOTE_DARK_SHELL, m_creature); + m_uiDarkShellTimer = 20000; + } + } + else + m_uiDarkShellTimer -= uiDiff; } DoMeleeAttackIfReady(); diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 8b24b7e32..c4a228a1c 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2410" + #define SD2_REVISION_NR "2411" #endif // __SD2_REVISION_NR_H__ From 4312a2034529e78eb2e43c0f376c5418b1ec2e7b Mon Sep 17 00:00:00 2001 From: Xfurry Date: Tue, 24 Jan 2012 23:42:45 +0200 Subject: [PATCH 0399/1172] [2412] Cleanup and slightly improve Nexus-Prince Shaffar --- .../mana_tombs/boss_nexusprince_shaffar.cpp | 131 +++++++++--------- sd2_revision_nr.h | 2 +- 2 files changed, 68 insertions(+), 65 deletions(-) diff --git a/scripts/outland/auchindoun/mana_tombs/boss_nexusprince_shaffar.cpp b/scripts/outland/auchindoun/mana_tombs/boss_nexusprince_shaffar.cpp index a61a46f8f..23dbc68bc 100644 --- a/scripts/outland/auchindoun/mana_tombs/boss_nexusprince_shaffar.cpp +++ b/scripts/outland/auchindoun/mana_tombs/boss_nexusprince_shaffar.cpp @@ -58,24 +58,21 @@ struct MANGOS_DLL_DECL boss_nexusprince_shaffarAI : public ScriptedAI Reset(); } - uint32 m_uiBlink_Timer; - uint32 m_uiBeacon_Timer; - uint32 m_uiFireBall_Timer; - uint32 m_uiFrostbolt_Timer; - uint32 m_uiFrostNova_Timer; + uint32 m_uiBlinkTimer; + uint32 m_uiBeaconTimer; + uint32 m_uiFireBallTimer; + uint32 m_uiFrostboltTimer; + uint32 m_uiFrostNovaTimer; bool m_bHasTaunted; - bool m_bCanBlink; void Reset() { - m_uiBlink_Timer = 1500; - m_uiBeacon_Timer = 10000; - m_uiFireBall_Timer = 8000; - m_uiFrostbolt_Timer = 4000; - m_uiFrostNova_Timer = 15000; - - m_bCanBlink = false; + m_uiBlinkTimer = 30000; + m_uiBeaconTimer = 10000; + m_uiFireBallTimer = 8000; + m_uiFrostboltTimer = 4000; + m_uiFrostNovaTimer = 15000; } void MoveInLineOfSight(Unit* pWho) @@ -103,7 +100,7 @@ struct MANGOS_DLL_DECL boss_nexusprince_shaffarAI : public ScriptedAI { if (pSummoned->GetEntry() == NPC_BEACON) { - pSummoned->CastSpell(pSummoned,SPELL_ETHEREAL_BEACON_VISUAL,false); + pSummoned->CastSpell(pSummoned, SPELL_ETHEREAL_BEACON_VISUAL, false); if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) pSummoned->AI()->AttackStart(pTarget); @@ -125,56 +122,57 @@ struct MANGOS_DLL_DECL boss_nexusprince_shaffarAI : public ScriptedAI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - if (m_uiFrostNova_Timer < uiDiff) + if (m_uiFrostNovaTimer < uiDiff) { - if (m_creature->IsNonMeleeSpellCasted(false)) - m_creature->InterruptNonMeleeSpells(true); - - DoCastSpellIfCan(m_creature,SPELL_FROSTNOVA); - m_uiFrostNova_Timer = urand(17500, 25000); - m_bCanBlink = true; - }else m_uiFrostNova_Timer -= uiDiff; + if (DoCastSpellIfCan(m_creature, SPELL_FROSTNOVA) == CAST_OK) + m_uiFrostNovaTimer = urand(17500, 25000); + } + else + m_uiFrostNovaTimer -= uiDiff; - if (m_uiFrostbolt_Timer < uiDiff) + if (m_uiFrostboltTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_FROSTBOLT); - m_uiFrostbolt_Timer = urand(4500, 6000); - }else m_uiFrostbolt_Timer -= uiDiff; + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_FROSTBOLT) == CAST_OK) + m_uiFrostboltTimer = urand(4500, 6000); + } + else + m_uiFrostboltTimer -= uiDiff; - if (m_uiFireBall_Timer < uiDiff) + if (m_uiFireBallTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_FIREBALL); - m_uiFireBall_Timer = urand(4500, 6000); - }else m_uiFireBall_Timer -= uiDiff; + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_FIREBALL) == CAST_OK) + m_uiFireBallTimer = urand(4500, 6000); + } + else + m_uiFireBallTimer -= uiDiff; - if (m_bCanBlink) + if (m_uiBlinkTimer <= uiDiff) { - if (m_uiBlink_Timer < uiDiff) + if (DoCastSpellIfCan(m_creature, SPELL_BLINK) == CAST_OK) { - if (m_creature->IsNonMeleeSpellCasted(false)) - m_creature->InterruptNonMeleeSpells(true); - //expire movement, will prevent from running right back to victim after cast //(but should MoveChase be used again at a certain time or should he not move?) if (m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() == CHASE_MOTION_TYPE) m_creature->GetMotionMaster()->MovementExpired(); - DoCastSpellIfCan(m_creature,SPELL_BLINK); - - m_uiBlink_Timer = urand(1000, 2500); - m_bCanBlink = false; - }else m_uiBlink_Timer -= uiDiff; + m_uiBlinkTimer = urand(25000, 30000); + } } + else + m_uiBlinkTimer -= uiDiff; - if (m_uiBeacon_Timer < uiDiff) + if (m_uiBeaconTimer < uiDiff) { - if (!urand(0,3)) - DoScriptText(SAY_SUMMON, m_creature); - - DoCastSpellIfCan(m_creature, SPELL_ETHEREAL_BEACON, CAST_TRIGGERED); + if (DoCastSpellIfCan(m_creature, SPELL_ETHEREAL_BEACON) == CAST_OK) + { + if (!urand(0,3)) + DoScriptText(SAY_SUMMON, m_creature); - m_uiBeacon_Timer = 10000; - }else m_uiBeacon_Timer -= uiDiff; + m_uiBeaconTimer = 10000; + } + } + else + m_uiBeaconTimer -= uiDiff; DoMeleeAttackIfReady(); } @@ -201,13 +199,13 @@ struct MANGOS_DLL_DECL mob_ethereal_beaconAI : public ScriptedAI bool m_bIsRegularMode; - uint32 m_uiApprentice_Timer; - uint32 m_uiArcaneBolt_Timer; + uint32 m_uiApprenticeTimer; + uint32 m_uiArcaneBoltTimer; void Reset() { - m_uiApprentice_Timer = m_bIsRegularMode ? 20000 : 10000; - m_uiArcaneBolt_Timer = 1000; + m_uiApprenticeTimer = m_bIsRegularMode ? 20000 : 10000; + m_uiArcaneBoltTimer = 1000; } void JustSummoned(Creature* pSummoned) @@ -221,23 +219,28 @@ struct MANGOS_DLL_DECL mob_ethereal_beaconAI : public ScriptedAI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - if (m_uiArcaneBolt_Timer < uiDiff) + if (m_uiArcaneBoltTimer < uiDiff) { DoCastSpellIfCan(m_creature->getVictim(), SPELL_ARCANE_BOLT); - m_uiArcaneBolt_Timer = urand(2000, 4500); - }else m_uiArcaneBolt_Timer -= uiDiff; + m_uiArcaneBoltTimer = urand(2000, 4500); + } + else + m_uiArcaneBoltTimer -= uiDiff; - if (m_uiApprentice_Timer < uiDiff) + if (m_uiApprenticeTimer) { - if (m_creature->IsNonMeleeSpellCasted(false)) - m_creature->InterruptNonMeleeSpells(true); - - m_creature->CastSpell(m_creature, SPELL_ETHEREAL_APPRENTICE, true); - - m_creature->ForcedDespawn(); - return; - - }else m_uiApprentice_Timer -= uiDiff; + if (m_uiApprenticeTimer <= uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_ETHEREAL_APPRENTICE) == CAST_OK) + { + // despawn in 2 sec because of the spell visual + m_creature->ForcedDespawn(2000); + m_uiApprenticeTimer = 0; + } + } + else + m_uiApprenticeTimer -= uiDiff; + } //should they do meele? DoMeleeAttackIfReady(); diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index c4a228a1c..e79a5602e 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2411" + #define SD2_REVISION_NR "2412" #endif // __SD2_REVISION_NR_H__ From c3e3939ea0cc51b71c4b1c337bd919be2851554b Mon Sep 17 00:00:00 2001 From: Xfurry Date: Wed, 25 Jan 2012 02:11:59 +0200 Subject: [PATCH 0400/1172] [2413] Cleanup for Grandmaster Vorpil --- .../boss_grandmaster_vorpil.cpp | 267 ++++++++++-------- sd2_revision_nr.h | 2 +- 2 files changed, 154 insertions(+), 115 deletions(-) diff --git a/scripts/outland/auchindoun/shadow_labyrinth/boss_grandmaster_vorpil.cpp b/scripts/outland/auchindoun/shadow_labyrinth/boss_grandmaster_vorpil.cpp index 174d0db9d..9d4707553 100644 --- a/scripts/outland/auchindoun/shadow_labyrinth/boss_grandmaster_vorpil.cpp +++ b/scripts/outland/auchindoun/shadow_labyrinth/boss_grandmaster_vorpil.cpp @@ -24,34 +24,56 @@ EndScriptData */ #include "precompiled.h" #include "shadow_labyrinth.h" -#define SAY_INTRO -1555028 -#define SAY_AGGRO1 -1555029 -#define SAY_AGGRO2 -1555030 -#define SAY_AGGRO3 -1555031 -#define SAY_HELP -1555032 -#define SAY_SLAY1 -1555033 -#define SAY_SLAY2 -1555034 -#define SAY_DEATH -1555035 - -#define SPELL_DRAW_SHADOWS 33563 -#define SPELL_VOID_PORTAL_A 33566 //spell only summon one unit, but we use it for the visual effect and summon the 4 other portals manual way(only one spell exist) -#define SPELL_VOID_PORTAL_VISUAL 33569 -#define SPELL_SHADOW_BOLT_VOLLEY 32963 -#define SPELL_SUMMON_VOIDWALKER_A 33582 -#define SPELL_SUMMON_VOIDWALKER_B 33583 -#define SPELL_SUMMON_VOIDWALKER_C 33584 -#define SPELL_SUMMON_VOIDWALKER_D 33585 -#define SPELL_SUMMON_VOIDWALKER_E 33586 -#define SPELL_RAIN_OF_FIRE 33617 -#define SPELL_RAIN_OF_FIRE_H 39363 -#define SPELL_BANISH_H 38791 - -#define ENTRY_VOID_PORTAL 19224 -#define ENTRY_VOID_TRAVELER 19226 - -#define LOCX -253.06f -#define LOCY -264.02f -#define LOCZ 17.08f +enum +{ + SAY_INTRO = -1555028, + SAY_AGGRO_1 = -1555029, + SAY_AGGRO_2 = -1555030, + SAY_AGGRO_3 = -1555031, + SAY_HELP = -1555032, + SAY_SLAY_1 = -1555033, + SAY_SLAY_2 = -1555034, + SAY_DEATH = -1555035, + + SPELL_DRAW_SHADOWS = 33563, // should trigger spell 33558 which is missing; so we need to hack the teleport + SPELL_VOID_PORTAL_A = 33566, // spell only summon one unit, but we use it for the visual effect and summon the 4 other portals manual way(only one spell exist) + SPELL_SHADOW_BOLT_VOLLEY = 32963, + SPELL_RAIN_OF_FIRE = 33617, + SPELL_RAIN_OF_FIRE_H = 39363, + SPELL_BANISH_H = 38791, + SPELL_SUMMON_VOIDWALKER_A = 33582, // the void travelers are summond at portal locations according to DB coords + SPELL_SUMMON_VOIDWALKER_B = 33583, + SPELL_SUMMON_VOIDWALKER_C = 33584, + SPELL_SUMMON_VOIDWALKER_D = 33585, + SPELL_SUMMON_VOIDWALKER_E = 33586, + + SPELL_VOID_PORTAL_VISUAL = 33569, + + SPELL_EMPOWERING_SHADOWS = 33783, + SPELL_EMPOWERING_SHADOWS_H = 39364, + SPELL_SHADOW_NOVA = 33846, + + NPC_VOID_PORTAL = 19224, + NPC_VOID_TRAVELER = 19226, + + MAX_PORTALS = 4 +}; + +struct SummonLocations +{ + float m_fX, m_fY, m_fZ; +}; + +// Summon locations for the void portals +static const SummonLocations aVorpilLocation[MAX_PORTALS] = +{ + {-262.40f, -229.57f, 17.08f}, + {-260.35f, -297.56f, 17.08f}, + {-292.05f, -270.37f, 12.68f}, + {-301.64f, -255.97f, 12.68f} +}; + +static const float aVorpilTeleportLoc[3] = {-253.06f, -264.02f, 17.08f}; struct MANGOS_DLL_DECL boss_grandmaster_vorpilAI : public ScriptedAI { @@ -59,80 +81,81 @@ struct MANGOS_DLL_DECL boss_grandmaster_vorpilAI : public ScriptedAI { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); - Intro = false; + m_bHasDoneIntro = false; Reset(); } ScriptedInstance* m_pInstance; bool m_bIsRegularMode; - uint32 ShadowBoltVolley_Timer; - uint32 DrawShadows_Timer; - uint32 Teleport_Timer; - uint32 VoidTraveler_Timer; - uint32 Banish_Timer; - bool Intro; - bool Teleport; + uint32 m_uiShadowBoltVolleyTimer; + uint32 m_uiDrawShadowsTimer; + uint32 m_uiRainOfFireTimer; + uint32 m_uiVoidTravelerTimer; + uint32 m_uiBanishTimer; + bool m_bHasDoneIntro; void Reset() { - ShadowBoltVolley_Timer = urand(7000, 14000); - DrawShadows_Timer = 40000; - Teleport_Timer = 1000; - VoidTraveler_Timer = 20000; - Banish_Timer = 25000; - Teleport = false; - - if (m_pInstance) - m_pInstance->SetData(TYPE_VORPIL, NOT_STARTED); + m_uiShadowBoltVolleyTimer = urand(7000, 14000); + m_uiDrawShadowsTimer = 40000; + m_uiRainOfFireTimer = 0; + m_uiVoidTravelerTimer = 20000; + m_uiBanishTimer = 25000; } - void MoveInLineOfSight(Unit *who) + void MoveInLineOfSight(Unit* pWho) { //not sure about right radius - if (!Intro && m_creature->IsWithinDistInMap(who, 50)) + if (!m_bHasDoneIntro && pWho->IsWithinDistInMap(m_creature, 50.0f) && pWho->IsWithinLOSInMap(m_creature)) { DoScriptText(SAY_INTRO, m_creature); - Intro = true; + m_bHasDoneIntro = true; } - ScriptedAI::MoveInLineOfSight(who); + ScriptedAI::MoveInLineOfSight(pWho); } - void Aggro(Unit *who) + void Aggro(Unit* pWho) { switch(urand(0, 2)) { - 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 0: DoScriptText(SAY_AGGRO_1, m_creature); break; + case 1: DoScriptText(SAY_AGGRO_2, m_creature); break; + case 2: DoScriptText(SAY_AGGRO_3, m_creature); break; } - DoCastSpellIfCan(m_creature, SPELL_VOID_PORTAL_A,true); - m_creature->SummonCreature(ENTRY_VOID_PORTAL, -262.40f, -229.57f, 17.08f, 0.0f, TEMPSUMMON_CORPSE_DESPAWN,0); - m_creature->SummonCreature(ENTRY_VOID_PORTAL, -260.35f, -297.56f, 17.08f, 0.0f, TEMPSUMMON_CORPSE_DESPAWN,0); - m_creature->SummonCreature(ENTRY_VOID_PORTAL, -292.05f, -270.37f, 12.68f, 0.0f, TEMPSUMMON_CORPSE_DESPAWN,0); - m_creature->SummonCreature(ENTRY_VOID_PORTAL, -301.64f, -255.97f, 12.68f, 0.0f, TEMPSUMMON_CORPSE_DESPAWN,0); + DoCastSpellIfCan(m_creature, SPELL_VOID_PORTAL_A); + + // summon the other 4 portals + for (uint8 i = 0; i < MAX_PORTALS; ++i) + m_creature->SummonCreature(NPC_VOID_PORTAL, aVorpilLocation[i].m_fX, aVorpilLocation[i].m_fY, aVorpilLocation[i].m_fZ, 0.0f, TEMPSUMMON_CORPSE_DESPAWN, 0); if (m_pInstance) m_pInstance->SetData(TYPE_VORPIL, IN_PROGRESS); } - void KilledUnit(Unit *victim) + void JustReachedHome() + { + if (m_pInstance) + m_pInstance->SetData(TYPE_VORPIL, FAIL); + } + + void KilledUnit(Unit* pVictim) { - DoScriptText(urand(0, 1) ? SAY_SLAY1 : SAY_SLAY2, m_creature); + DoScriptText(urand(0, 1) ? SAY_SLAY_1 : SAY_SLAY_2, m_creature); } - void JustSummoned(Creature *summoned) + void JustSummoned(Creature* pSummoned) { - if (summoned->GetEntry() == ENTRY_VOID_TRAVELER) - summoned->GetMotionMaster()->MoveFollow(m_creature, 1.0f, 0.0f); + if (pSummoned->GetEntry() == NPC_VOID_TRAVELER) + pSummoned->GetMotionMaster()->MoveFollow(m_creature, 0.0f, 0.0f); - if (summoned->GetEntry() == ENTRY_VOID_PORTAL) - summoned->CastSpell(summoned,SPELL_VOID_PORTAL_VISUAL,true); + if (pSummoned->GetEntry() == NPC_VOID_PORTAL) + pSummoned->CastSpell(pSummoned, SPELL_VOID_PORTAL_VISUAL, true); } - void JustDied(Unit *victim) + void JustDied(Unit* pKiller) { DoScriptText(SAY_DEATH, m_creature); @@ -140,79 +163,95 @@ struct MANGOS_DLL_DECL boss_grandmaster_vorpilAI : public ScriptedAI m_pInstance->SetData(TYPE_VORPIL, DONE); } - void UpdateAI(const uint32 diff) + // Wrapper to teleport all players to the platform - Workaround for missing spell + void DoTeleportToPlatform() + { + m_creature->NearTeleportTo(aVorpilTeleportLoc[0], aVorpilTeleportLoc[1], aVorpilTeleportLoc[2], 0.0f); + + float fX, fY, fZ; + + GUIDVector vGuids; + m_creature->FillGuidsListFromThreatList(vGuids); + for (GUIDVector::const_iterator itr = vGuids.begin();itr != vGuids.end(); ++itr) + { + Unit* pTarget = m_creature->GetMap()->GetUnit(*itr); + + if (pTarget && pTarget->GetTypeId() == TYPEID_PLAYER) + { + pTarget->GetRandomPoint(aVorpilTeleportLoc[0], aVorpilTeleportLoc[1], aVorpilTeleportLoc[2], 3.0f, fX, fY, fZ); + DoTeleportPlayer(pTarget, fX, fY, fZ, m_creature->GetAngle(m_creature->GetPositionX(), m_creature->GetPositionY())); + } + } + } + + void UpdateAI(const uint32 uiDiff) { //Return since we have no target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - if (Teleport) + if (m_uiRainOfFireTimer) { - if (Teleport_Timer <= diff) + if (m_uiRainOfFireTimer <= uiDiff) { - m_creature->NearTeleportTo(LOCX, LOCY, LOCZ, 0.0f); - - float ranX = LOCX; - float ranY = LOCY; - float ranZ = LOCZ; - - std::vector vGuids; - m_creature->FillGuidsListFromThreatList(vGuids); - for (std::vector::const_iterator itr = vGuids.begin();itr != vGuids.end(); ++itr) - { - Unit* target = m_creature->GetMap()->GetUnit(*itr); - - if (target && target->GetTypeId() == TYPEID_PLAYER) - { - target->GetRandomPoint(LOCX,LOCY,LOCZ,3.0f,ranX,ranY,ranZ); - DoTeleportPlayer(target,ranX,ranY,ranZ,m_creature->GetAngle(m_creature->GetPositionX(),m_creature->GetPositionY())); - } - } - Teleport = false; + DoTeleportToPlatform(); - DoCastSpellIfCan(m_creature->getVictim(), m_bIsRegularMode ? SPELL_RAIN_OF_FIRE : SPELL_RAIN_OF_FIRE_H); - - Teleport_Timer = 1000; - }else Teleport_Timer -= diff; + if (DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_RAIN_OF_FIRE : SPELL_RAIN_OF_FIRE_H) == CAST_OK) + m_uiRainOfFireTimer = 0; + } + else + m_uiRainOfFireTimer -= uiDiff; } - if (ShadowBoltVolley_Timer < diff) + if (m_uiShadowBoltVolleyTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_SHADOW_BOLT_VOLLEY); - ShadowBoltVolley_Timer = urand(15000, 30000); - }else ShadowBoltVolley_Timer -= diff; + if (DoCastSpellIfCan(m_creature, SPELL_SHADOW_BOLT_VOLLEY) == CAST_OK) + m_uiShadowBoltVolleyTimer = urand(15000, 30000); + } + else + m_uiShadowBoltVolleyTimer -= uiDiff; - if (DrawShadows_Timer < diff) + if (m_uiDrawShadowsTimer < uiDiff) { - DoCastSpellIfCan(m_creature,SPELL_DRAW_SHADOWS); - DrawShadows_Timer = 30000; - Teleport = true; - }else DrawShadows_Timer -= diff; + if (DoCastSpellIfCan(m_creature, SPELL_DRAW_SHADOWS) == CAST_OK) + { + m_uiDrawShadowsTimer = 37000; + m_uiRainOfFireTimer = 1000; + } + } + else + m_uiDrawShadowsTimer -= uiDiff; - if (VoidTraveler_Timer < diff) + if (m_uiVoidTravelerTimer < uiDiff) { DoScriptText(SAY_HELP, m_creature); switch(urand(0, 4)) { - case 0: DoCastSpellIfCan(m_creature, SPELL_SUMMON_VOIDWALKER_A, CAST_TRIGGERED); break; - case 1: DoCastSpellIfCan(m_creature, SPELL_SUMMON_VOIDWALKER_B, CAST_TRIGGERED); break; - case 2: DoCastSpellIfCan(m_creature, SPELL_SUMMON_VOIDWALKER_C, CAST_TRIGGERED); break; - case 3: DoCastSpellIfCan(m_creature, SPELL_SUMMON_VOIDWALKER_D, CAST_TRIGGERED); break; - case 4: DoCastSpellIfCan(m_creature, SPELL_SUMMON_VOIDWALKER_E, CAST_TRIGGERED); break; + case 0: DoCastSpellIfCan(m_creature, SPELL_SUMMON_VOIDWALKER_A); break; + case 1: DoCastSpellIfCan(m_creature, SPELL_SUMMON_VOIDWALKER_B); break; + case 2: DoCastSpellIfCan(m_creature, SPELL_SUMMON_VOIDWALKER_C); break; + case 3: DoCastSpellIfCan(m_creature, SPELL_SUMMON_VOIDWALKER_D); break; + case 4: DoCastSpellIfCan(m_creature, SPELL_SUMMON_VOIDWALKER_E); break; } //faster rate when below (X) health? - VoidTraveler_Timer = 35000; - }else VoidTraveler_Timer -= diff; + m_uiVoidTravelerTimer = 35000; + } + else + m_uiVoidTravelerTimer -= uiDiff; if (!m_bIsRegularMode) { - if (Banish_Timer < diff) + if (m_uiBanishTimer < uiDiff) { - if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1)) - DoCastSpellIfCan(target,SPELL_BANISH_H); - Banish_Timer = 35000; - }else Banish_Timer -= diff; + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1)) + { + if (DoCastSpellIfCan(pTarget, SPELL_BANISH_H) == CAST_OK) + m_uiBanishTimer = 35000; + } + } + else + m_uiBanishTimer -= uiDiff; } DoMeleeAttackIfReady(); diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index e79a5602e..057046de4 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2412" + #define SD2_REVISION_NR "2413" #endif // __SD2_REVISION_NR_H__ From 8696ac6616992c45cea52c9464dd410c538dacd0 Mon Sep 17 00:00:00 2001 From: FragFrog Date: Wed, 25 Jan 2012 13:01:30 +0100 Subject: [PATCH 0401/1172] [2414] Improve Hyjal Waves (Timer and mobs) Now wave timers as well as mobs of the waves should be in sync with wotlk-DBM Also fix a possible exploit by setting Jaina/Thrall to active while the event is in progress Signed-off-by: Schmoozerd --- .../caverns_of_time/hyjal/hyjalAI.cpp | 86 ++++++++++--------- sd2_revision_nr.h | 2 +- 2 files changed, 45 insertions(+), 43 deletions(-) diff --git a/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.cpp b/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.cpp index 1895292ca..d2b8f4008 100644 --- a/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.cpp +++ b/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.cpp @@ -92,25 +92,25 @@ struct HyjalWave static const HyjalWave aHyjalWavesAlliance[]= { // Rage Winterchill Wave 1-8 - {{NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, 0, 0, 0, 0, 0, 0, 0, 0}, 120000, false}, - {{NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_CRYPT, NPC_CRYPT, 0, 0, 0, 0, 0, 0}, 120000, false}, - {{NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, 0, 0, 0, 0, 0, 0}, 120000, false}, - {{NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_NECRO, NPC_NECRO, 0, 0, 0, 0, 0, 0}, 120000, false}, - {{NPC_GHOUL, NPC_GHOUL, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_NECRO, NPC_NECRO, NPC_NECRO, NPC_NECRO, 0, 0, 0, 0, 0, 0}, 120000, false}, - {{NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, 0, 0, 0, 0, 0}, 120000, false}, - {{NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_NECRO, NPC_NECRO, NPC_NECRO, NPC_NECRO, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, 0, 0, 0, 0, 0, 0}, 120000, false}, - {{NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_ABOMI, NPC_ABOMI, NPC_NECRO, NPC_NECRO, 0, 0, 0, 0}, 180000, false}, + {{NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, 0, 0, 0, 0, 0, 0, 0, 0}, 125000, false}, + {{NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_CRYPT, NPC_CRYPT, 0, 0, 0, 0, 0, 0}, 125000, false}, + {{NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, 0, 0, 0, 0, 0, 0}, 125000, false}, + {{NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_NECRO, NPC_NECRO, 0, 0, 0, 0, 0, 0}, 125000, false}, + {{NPC_GHOUL, NPC_GHOUL, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_NECRO, NPC_NECRO, NPC_NECRO, NPC_NECRO, 0, 0, 0, 0, 0, 0}, 125000, false}, + {{NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, 0, 0, 0, 0, 0, 0}, 125000, false}, + {{NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_NECRO, NPC_NECRO, NPC_NECRO, NPC_NECRO, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, 0, 0, 0, 0, 0, 0}, 125000, false}, + {{NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_ABOMI, NPC_ABOMI, NPC_NECRO, NPC_NECRO, 0, 0, 0, 0}, 140000, false}, // All 8 Waves are summoned, summon Rage Winterchill, next few waves are for Anetheron {{NPC_WINTERCHILL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 0, true}, // Anetheron Wave 1-8 - {{NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, 0, 0, 0, 0, 0, 0, 0, 0}, 120000, false}, - {{NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, 0, 0, 0, 0, 0, 0}, 120000, false}, - {{NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_NECRO, NPC_NECRO, NPC_NECRO, NPC_NECRO, 0, 0, 0, 0, 0, 0}, 120000, false}, - {{NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_BANSH, NPC_BANSH, NPC_BANSH, NPC_BANSH, 0, 0, 0, 0, 0, 0}, 120000, false}, - {{NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_NECRO, NPC_NECRO, NPC_BANSH, NPC_BANSH, NPC_BANSH, NPC_BANSH, 0, 0, 0, 0, 0, 0}, 120000, false}, - {{NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_ABOMI, NPC_ABOMI, NPC_NECRO, NPC_NECRO, NPC_NECRO, NPC_NECRO, 0, 0, 0, 0, 0, 0}, 120000, false}, - {{NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_BANSH, NPC_BANSH, NPC_BANSH, NPC_BANSH, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, 0, 0, 0, 0, 0, 0}, 120000, false}, - {{NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_BANSH, NPC_BANSH, NPC_NECRO, NPC_NECRO, 0, 0, 0, 0}, 180000, false}, + {{NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, 0, 0, 0, 0, 0, 0, 0, 0}, 125000, false}, + {{NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, 0, 0, 0, 0, 0, 0}, 125000, false}, + {{NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_NECRO, NPC_NECRO, NPC_NECRO, NPC_NECRO, 0, 0, 0, 0, 0, 0}, 125000, false}, + {{NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_NECRO, NPC_NECRO, NPC_NECRO, NPC_NECRO, NPC_BANSH, NPC_BANSH, 0, 0, 0, 0, 0, 0}, 125000, false}, + {{NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_BANSH, NPC_BANSH, NPC_BANSH, NPC_BANSH, NPC_NECRO, NPC_NECRO, 0, 0, 0, 0, 0, 0}, 125000, false}, + {{NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_ABOMI, NPC_ABOMI, NPC_NECRO, NPC_NECRO, NPC_NECRO, NPC_NECRO, 0, 0, 0, 0, 0, 0}, 125000, false}, + {{NPC_GHOUL, NPC_GHOUL, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_BANSH, NPC_BANSH, 0, 0, 0, 0, 0, 0}, 125000, false}, + {{NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_BANSH, NPC_BANSH, NPC_NECRO, NPC_NECRO, 0, 0, 0, 0}, 140000, false}, // All 8 Waves are summoned, summon Anatheron {{NPC_ANETHERON, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 0, true} }; @@ -119,25 +119,25 @@ static const HyjalWave aHyjalWavesAlliance[]= static const HyjalWave aHyjalWavesHorde[]= { // Kaz'Rogal Wave 1-8 - {{NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_BANSH, NPC_BANSH, NPC_NECRO, NPC_NECRO, 0, 0, 0, 0, 0, 0}, 120000, false}, - {{NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GARGO, NPC_GARGO, NPC_GARGO, NPC_GARGO, NPC_GARGO, NPC_GARGO, NPC_GARGO, NPC_GARGO, NPC_GARGO, NPC_GARGO, 0, 0, 0, 0}, 120000, false}, - {{NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_NECRO, NPC_NECRO, NPC_NECRO, NPC_NECRO, 0, 0, 0, 0}, 120000, false}, - {{NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_GARGO, NPC_GARGO, NPC_GARGO, NPC_GARGO, NPC_GARGO, NPC_GARGO, NPC_NECRO, NPC_NECRO, 0, 0, 0, 0}, 120000, false}, - {{NPC_GHOUL, NPC_GHOUL, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_NECRO, NPC_NECRO, NPC_NECRO, NPC_NECRO, 0, 0, 0, 0, 0, 0}, 120000, false}, - {{NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_NECRO, NPC_NECRO, NPC_NECRO, NPC_FROST, 0, 0}, 120000, false}, - {{NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_NECRO, NPC_NECRO, NPC_NECRO, NPC_FROST, 0, 0}, 120000, false}, - {{NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_CRYPT, NPC_CRYPT, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_NECRO, NPC_NECRO, NPC_BANSH, NPC_BANSH}, 180000, false}, + {{NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_BANSH, NPC_BANSH, NPC_NECRO, NPC_NECRO, 0, 0, 0, 0, 0, 0}, 135000, false}, + {{NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GARGO, NPC_GARGO, NPC_GARGO, NPC_GARGO, NPC_GARGO, NPC_GARGO, NPC_GARGO, NPC_GARGO, NPC_GARGO, NPC_GARGO, 0, 0, 0, 0}, 165000, false}, + {{NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_NECRO, NPC_NECRO, 0, 0, 0, 0}, 160000, false}, + {{NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_GARGO, NPC_GARGO, NPC_GARGO, NPC_GARGO, NPC_GARGO, NPC_GARGO, NPC_NECRO, NPC_NECRO, 0, 0, 0, 0}, 165000, false}, + {{NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_NECRO, NPC_NECRO, NPC_NECRO, NPC_NECRO, 0, 0, 0, 0}, 135000, false}, + {{NPC_GARGO, NPC_GARGO, NPC_GARGO, NPC_GARGO, NPC_GARGO, NPC_GARGO, NPC_GARGO, NPC_GARGO, NPC_FROST, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 135000, false}, + {{NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_FROST, 0, 0, 0, 0, 0, 0, 0}, 195000, false}, + {{NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_CRYPT, NPC_CRYPT, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_NECRO, NPC_NECRO, NPC_BANSH, NPC_BANSH, 0, 0}, 225000, false}, // All 8 Waves are summoned, summon Kaz'Rogal, next few waves are for Azgalor {{NPC_KAZROGAL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 0, true}, // Azgalor Wave 1-8 - {{NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_NECRO, NPC_NECRO, NPC_NECRO, NPC_NECRO, NPC_NECRO, NPC_NECRO, 0, 0, 0, 0, 0, 0}, 120000, false}, - {{NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_FROST, NPC_GARGO, NPC_GARGO, NPC_GARGO, NPC_GARGO, NPC_GARGO, NPC_GARGO, NPC_GARGO, NPC_GARGO, 0, 0, 0, 0}, 120000, false}, - {{NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GIANT, NPC_GIANT, NPC_GIANT, NPC_GIANT, NPC_GIANT, NPC_GIANT, NPC_GIANT, NPC_GIANT, 0, 0, 0, 0}, 120000, false}, - {{NPC_GIANT, NPC_GIANT, NPC_GIANT, NPC_GIANT, NPC_GIANT, NPC_GIANT, NPC_GIANT, NPC_GIANT, NPC_STALK, NPC_STALK, NPC_STALK, NPC_STALK, NPC_STALK, NPC_STALK, 0, 0, 0, 0}, 120000, false}, - {{NPC_STALK, NPC_STALK, NPC_STALK, NPC_STALK, NPC_STALK, NPC_STALK, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_NECRO, NPC_NECRO, NPC_NECRO, NPC_NECRO, 0, 0, 0, 0}, 120000, false}, - {{NPC_NECRO, NPC_NECRO, NPC_NECRO, NPC_NECRO, NPC_NECRO, NPC_NECRO, NPC_NECRO, NPC_NECRO, NPC_BANSH, NPC_BANSH, NPC_BANSH, NPC_BANSH, NPC_BANSH, NPC_BANSH, 0, 0, 0, 0}, 120000, false}, - {{NPC_GHOUL, NPC_GHOUL, NPC_CRYPT, NPC_CRYPT, NPC_STALK, NPC_STALK, NPC_GIANT, NPC_GIANT, NPC_GIANT, NPC_GIANT, NPC_GIANT, NPC_GIANT, 0, 0, 0, 0, 0, 0}, 120000, false}, - {{NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_STALK, NPC_STALK, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_BANSH, NPC_BANSH, NPC_BANSH, NPC_BANSH, NPC_NECRO, NPC_NECRO, 0, 0}, 180000, false}, + {{NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_NECRO, NPC_NECRO, NPC_NECRO, NPC_NECRO, NPC_NECRO, NPC_NECRO, 0, 0, 0, 0, 0, 0}, 135000, false}, + {{NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_FROST, NPC_GARGO, NPC_GARGO, NPC_GARGO, NPC_GARGO, NPC_GARGO, NPC_GARGO, NPC_GARGO, NPC_GARGO, 0, 0, 0, 0}, 165000, false}, + {{NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GIANT, NPC_GIANT, NPC_GIANT, NPC_GIANT, NPC_GIANT, NPC_GIANT, NPC_GIANT, NPC_GIANT, 0, 0, 0, 0, 0, 0}, 160000, false}, + {{NPC_GIANT, NPC_GIANT, NPC_GIANT, NPC_GIANT, NPC_GIANT, NPC_GIANT, NPC_STALK, NPC_STALK, NPC_STALK, NPC_STALK, NPC_STALK, NPC_STALK, NPC_STALK, NPC_STALK, 0, 0, 0, 0}, 165000, false}, + {{NPC_STALK, NPC_STALK, NPC_STALK, NPC_STALK, NPC_STALK, NPC_STALK, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_NECRO, NPC_NECRO, NPC_NECRO, NPC_NECRO, 0, 0, 0, 0}, 135000, false}, + {{NPC_NECRO, NPC_NECRO, NPC_NECRO, NPC_NECRO, NPC_NECRO, NPC_NECRO, NPC_BANSH, NPC_BANSH, NPC_BANSH, NPC_BANSH, NPC_BANSH, NPC_BANSH, 0, 0, 0, 0, 0, 0}, 135000, false}, + {{NPC_GHOUL, NPC_GHOUL, NPC_CRYPT, NPC_CRYPT, NPC_STALK, NPC_STALK, NPC_GIANT, NPC_GIANT, NPC_GIANT, NPC_GIANT, NPC_GIANT, NPC_GIANT, NPC_GIANT, NPC_GIANT, 0, 0, 0, 0}, 195000, false}, + {{NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_STALK, NPC_STALK, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_BANSH, NPC_BANSH, NPC_NECRO, NPC_NECRO, 0, 0, 0, 0}, 225000, false}, // All 8 Waves are summoned, summon Azgalor {{NPC_AZGALOR, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 0, true} }; @@ -377,6 +377,8 @@ void hyjalAI::StartEvent() m_pInstance->DoUpdateWorldState(WORLD_STATE_WAVES, 0); m_pInstance->DoUpdateWorldState(WORLD_STATE_ENEMY, 0); m_pInstance->DoUpdateWorldState(WORLD_STATE_ENEMYCOUNT, 0); + + m_creature->SetActiveObjectState(true); } void hyjalAI::DoTalk(YellType pYellType) @@ -431,6 +433,7 @@ void hyjalAI::Retreat() void hyjalAI::JustDied(Unit* pKiller) { DoTalk(DEATH); + m_creature->SetActiveObjectState(false); //TODO: in case they die during boss encounter, then what? despawn boss? } @@ -448,21 +451,18 @@ void hyjalAI::UpdateAI(const uint32 uiDiff) if (!m_pInstance->GetData(TYPE_TRASH_COUNT)) { lWaveMobGUIDList.clear(); - m_uiNextWaveTimer = 5000; + m_uiNextWaveTimer = std::min(m_uiNextWaveTimer, (uint32)5000); } - if (!lWaveMobGUIDList.empty()) + for (GUIDList::const_iterator itr = lWaveMobGUIDList.begin(); itr != lWaveMobGUIDList.end(); ++itr) { - for(GUIDList::const_iterator itr = lWaveMobGUIDList.begin(); itr != lWaveMobGUIDList.end(); ++itr) + if (Creature* pTemp = m_pInstance->instance->GetCreature(*itr)) { - if (Creature* pTemp = m_pInstance->instance->GetCreature(*itr)) - { - if (!pTemp->isAlive() || pTemp->getVictim()) - continue; + if (!pTemp->isAlive() || pTemp->getVictim()) + continue; - pTemp->SetWalk(false); - pTemp->GetMotionMaster()->MovePoint(1, m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ()); - } + pTemp->SetWalk(false); + pTemp->GetMotionMaster()->MovePoint(1, m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ()); } } m_uiWaveMoveTimer = 10000; @@ -506,6 +506,8 @@ void hyjalAI::UpdateAI(const uint32 uiDiff) // Reset world state for enemies to disable it m_pInstance->DoUpdateWorldState(WORLD_STATE_ENEMY, 0); + + m_creature->SetActiveObjectState(false); } } } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 057046de4..291113bce 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2413" + #define SD2_REVISION_NR "2414" #endif // __SD2_REVISION_NR_H__ From ecb3452d38a66ec5bf7b9b41a5b1547c0c4574da Mon Sep 17 00:00:00 2001 From: Xfurry Date: Fri, 15 Jul 2011 02:56:11 +0300 Subject: [PATCH 0402/1172] [2415] Improve Ingvar the plunderer script * Add rough support for throw axe ability * Add second phase * Add resurrection sequence. Spell 42912 requires core support for proper summon position --- .../utgarde_keep/utgarde_keep/boss_ingvar.cpp | 220 +++++++++++++++--- .../utgarde_keep/instance_utgarde_keep.cpp | 1 + .../utgarde_keep/utgarde_keep/utgarde_keep.h | 1 + sd2_revision_nr.h | 2 +- 4 files changed, 191 insertions(+), 33 deletions(-) diff --git a/scripts/northrend/utgarde_keep/utgarde_keep/boss_ingvar.cpp b/scripts/northrend/utgarde_keep/utgarde_keep/boss_ingvar.cpp index c3abd600a..dd1af1e20 100644 --- a/scripts/northrend/utgarde_keep/utgarde_keep/boss_ingvar.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_keep/boss_ingvar.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: Boss_Ingvar -SD%Complete: 35% -SDComment: TODO: correct timers. Create ressurection sequenze and phase 2. +SD%Complete: 70% +SDComment: TODO: correct timers, spell 42912 requires proper position fix in core SDCategory: Utgarde Keep EndScriptData */ @@ -36,8 +36,9 @@ enum SAY_ANNHYLDE_REZ = -1574023, NPC_ANNHYLDE = 24068, - NPC_THROW_TARGET = 23996, //the target, casting spell and target of moving dummy - NPC_THROW_DUMMY = 23997, //the axe, moving to target + NPC_THROW_TARGET = 23996, // the target, casting spell and target of moving dummy + NPC_THROW_DUMMY = 23997, // the axe, moving to target + NPC_GROUND_VISUAL = 24012, // has SPELL_SCOURGE_RES_BUBBLE aura //phase 1 SPELL_CLEAVE = 42724, @@ -61,16 +62,20 @@ enum SPELL_WOE_STRIKE_H = 59735, SPELL_SHADOW_AXE = 42748, - SPELL_SHADOW_AXE_PROC = 42751, - SPELL_SHADOW_AXE_PROC_H = 59720, + SPELL_SHADOW_AXE_PROC = 42750, // triggers 42751 + SPELL_SHADOW_AXE_PROC_H = 59719, // triggers 59720 //ressurection sequenze + SPELL_ASTRAL_TELEPORT = 34427, // aura cast by Annhylde on spawn + SPELL_SUMMON_BANSHEE = 42912, // summons Annhylde and sets a glow aura SPELL_FEIGN_DEATH = 42795, SPELL_TRANSFORM = 42796, - SPELL_SCOURGE_RES_SUMMON = 42863, //summones a dummy target - SPELL_SCOURGE_RES_HEAL = 42704, //heals max HP - SPELL_SCOURGE_RES_BUBBLE = 42862, //black bubble - SPELL_SCOURGE_RES_CHANNEL = 42857 //the whirl from annhylde + SPELL_SCOURGE_RES_SUMMON = 42863, // summones a dummy target + SPELL_SCOURGE_RES_HEAL = 42704, // heals max HP + SPELL_SCOURGE_RES_BUBBLE = 42862, // black bubble + SPELL_SCOURGE_RES_CHANNEL = 42857, // the whirl from annhylde + + POINT_ID_ANNHYLDE = 1 }; /*###### @@ -90,6 +95,7 @@ struct MANGOS_DLL_DECL boss_ingvarAI : public ScriptedAI bool m_bIsRegularMode; bool m_bIsResurrected; + bool m_bIsFakingDeath; uint32 m_uiCleaveTimer; uint32 m_uiSmashTimer; @@ -99,6 +105,7 @@ struct MANGOS_DLL_DECL boss_ingvarAI : public ScriptedAI void Reset() { m_bIsResurrected = false; + m_bIsFakingDeath = false; m_uiCleaveTimer = urand(5000, 7000); m_uiSmashTimer = urand(8000, 15000); @@ -108,27 +115,74 @@ struct MANGOS_DLL_DECL boss_ingvarAI : public ScriptedAI void Aggro(Unit* pWho) { - DoScriptText(m_bIsResurrected ? SAY_AGGRO_SECOND : SAY_AGGRO_FIRST, m_creature); + // don't yell for her + if (pWho->GetEntry() == NPC_ANNHYLDE) + return; + + // ToDo: it shouldn't yell this aggro text after removing the feign death aura + DoScriptText(SAY_AGGRO_FIRST, m_creature); } - //this need to be done when spell works - /*void DamageTaken(Unit* pDoneBy, uint32 &uiDamage) + void DamageTaken(Unit* pDealer, uint32& uiDamage) { if (m_bIsResurrected) return; - if (uiDamage >= m_creature->GetHealth()) + if (m_bIsFakingDeath) { - uiDamage = m_creature->GetHealth() -1; + uiDamage = 0; + return; + } - m_creature->GetMotionMaster()->Clear(false); - m_creature->GetMotionMaster()->MoveIdle(); + if (uiDamage >= m_creature->GetHealth()) + { + uiDamage = 0; DoScriptText(SAY_DEATH_FIRST, m_creature); - m_creature->CastSpell(m_creature, SPELL_FEIGN_DEATH, true); + DoCastSpellIfCan(m_creature, SPELL_SUMMON_BANSHEE, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_FEIGN_DEATH, CAST_TRIGGERED); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + + m_bIsFakingDeath = true; + } + } + + void SpellHit(Unit* pCaster, const SpellEntry* pSpell) + { + if (pSpell->Id == SPELL_TRANSFORM) + { + DoScriptText(SAY_AGGRO_SECOND, m_creature); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + m_creature->UpdateEntry(pSpell->EffectMiscValue[EFFECT_INDEX_0]); + m_bIsResurrected = true; + m_bIsFakingDeath = false; + } + } + + void JustSummoned(Creature* pSummoned) + { + switch (pSummoned->GetEntry()) + { + case NPC_THROW_DUMMY: + // ToDo: should this move to the target? + pSummoned->CastSpell(pSummoned, m_bIsRegularMode ? SPELL_SHADOW_AXE_PROC : SPELL_SHADOW_AXE_PROC_H, true); + break; + + case NPC_ANNHYLDE: + // This is not blizzlike - npc should be summoned above the boss and should move slower + pSummoned->CastSpell(pSummoned, SPELL_ASTRAL_TELEPORT, false); + pSummoned->SetLevitate(true); + pSummoned->GetMotionMaster()->MovePoint(POINT_ID_ANNHYLDE, pSummoned->GetPositionX(), pSummoned->GetPositionY(), pSummoned->GetPositionZ() + 15.0f); + break; + + case NPC_GROUND_VISUAL: + pSummoned->CastSpell(pSummoned, SPELL_SCOURGE_RES_BUBBLE, false); + // npc doesn't despawn on time + pSummoned->ForcedDespawn(8000); + break; } - }*/ + } void JustDied(Unit* pKiller) { @@ -143,40 +197,79 @@ struct MANGOS_DLL_DECL boss_ingvarAI : public ScriptedAI void UpdateAI(const uint32 uiDiff) { - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim() || m_bIsFakingDeath) return; - if (!m_bIsResurrected) + if (!m_bIsResurrected) // First phase { if (m_uiCleaveTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_CLEAVE); - m_uiCleaveTimer = urand(2500, 7000); + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_CLEAVE) == CAST_OK) + m_uiCleaveTimer = urand(2500, 7000); } else m_uiCleaveTimer -= uiDiff; if (m_uiSmashTimer < uiDiff) { - DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_SMASH : SPELL_SMASH_H); - m_uiSmashTimer = urand(8000, 15000); + if (DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_SMASH : SPELL_SMASH_H) == CAST_OK) + m_uiSmashTimer = urand(8000, 15000); } else m_uiSmashTimer -= uiDiff; if (m_uiStaggeringRoarTimer < uiDiff) { - DoScriptText(EMOTE_ROAR, m_creature); - DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_STAGGERING_ROAR : SPELL_STAGGERING_ROAR_H); - m_uiStaggeringRoarTimer = urand(15000, 30000); + if (DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_STAGGERING_ROAR : SPELL_STAGGERING_ROAR_H) == CAST_OK) + { + DoScriptText(EMOTE_ROAR, m_creature); + m_uiStaggeringRoarTimer = urand(15000, 30000); + } } else m_uiStaggeringRoarTimer -= uiDiff; if (m_uiEnrageTimer < uiDiff) { - DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_ENRAGE : SPELL_ENRAGE_H); - m_uiEnrageTimer = urand(10000, 20000); + if (DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_ENRAGE : SPELL_ENRAGE_H) == CAST_OK) + m_uiEnrageTimer = urand(10000, 20000); + } + else + m_uiEnrageTimer -= uiDiff; + } + else // Second phase + { + if (m_uiCleaveTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), m_bIsRegularMode? SPELL_WOE_STRIKE : SPELL_WOE_STRIKE_H) == CAST_OK) + m_uiCleaveTimer = urand(2500, 7000); + } + else + m_uiCleaveTimer -= uiDiff; + + if (m_uiSmashTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_DARK_SMASH_H) == CAST_OK) + m_uiSmashTimer = urand(8000, 15000); + } + else + m_uiSmashTimer -= uiDiff; + + if (m_uiStaggeringRoarTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_DREADFUL_ROAR : SPELL_DREADFUL_ROAR_H) == CAST_OK) + { + DoScriptText(EMOTE_ROAR, m_creature); + m_uiStaggeringRoarTimer = urand(15000, 30000); + } + } + else + m_uiStaggeringRoarTimer -= uiDiff; + + if (m_uiEnrageTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_SHADOW_AXE) == CAST_OK) + m_uiEnrageTimer = urand(10000, 20000); } else m_uiEnrageTimer -= uiDiff; @@ -200,19 +293,82 @@ struct MANGOS_DLL_DECL npc_annhyldeAI : public ScriptedAI npc_annhyldeAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); Reset(); } ScriptedInstance* m_pInstance; - bool m_bIsRegularMode; + + uint32 m_uiResurrectTimer; + uint8 m_uiResurrectPhase; void Reset() { + m_uiResurrectTimer = 0; + m_uiResurrectPhase = 0; + } + + // No attacking + void MoveInLineOfSight(Unit*) {} + void AttackStart(Unit*) {} + + void MovementInform(uint32 uiMotionType, uint32 uiPointId) + { + if (uiMotionType != POINT_MOTION_TYPE || uiPointId != POINT_ID_ANNHYLDE) + return; + + DoScriptText(SAY_ANNHYLDE_REZ, m_creature); + m_uiResurrectTimer = 3000; } void UpdateAI(const uint32 uiDiff) { + if (m_uiResurrectTimer) + { + if (m_uiResurrectTimer <= uiDiff) + { + if (!m_pInstance) + return; + + switch (m_uiResurrectPhase) + { + case 0: + DoCastSpellIfCan(m_creature, SPELL_SCOURGE_RES_CHANNEL); + if (Creature* pIngvar = m_pInstance->GetSingleCreatureFromStorage(NPC_INGVAR)) + { + if (pIngvar->HasAura(SPELL_SUMMON_BANSHEE)) + pIngvar->RemoveAurasDueToSpell(SPELL_SUMMON_BANSHEE); + } + m_uiResurrectTimer = 3000; + break; + case 1: + if (Creature* pIngvar = m_pInstance->GetSingleCreatureFromStorage(NPC_INGVAR)) + { + pIngvar->CastSpell(pIngvar, SPELL_SCOURGE_RES_SUMMON, true); + // Workaround - set Feign death again because it's removed by the previous casted spell + pIngvar->CastSpell(pIngvar, SPELL_FEIGN_DEATH, true); + } + m_uiResurrectTimer = 5000; + break; + case 2: + if (Creature* pIngvar = m_pInstance->GetSingleCreatureFromStorage(NPC_INGVAR)) + pIngvar->CastSpell(pIngvar, SPELL_SCOURGE_RES_HEAL, false); + m_uiResurrectTimer = 3000; + break; + case 3: + if (Creature* pIngvar = m_pInstance->GetSingleCreatureFromStorage(NPC_INGVAR)) + pIngvar->CastSpell(pIngvar, SPELL_TRANSFORM, false); + // despawn the creature + m_creature->GetMotionMaster()->MovePoint(2, m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ() + 50); + m_creature->ForcedDespawn(5000); + m_uiResurrectTimer = 0; + break; + } + + ++m_uiResurrectPhase; + } + else + m_uiResurrectTimer -= uiDiff; + } } }; diff --git a/scripts/northrend/utgarde_keep/utgarde_keep/instance_utgarde_keep.cpp b/scripts/northrend/utgarde_keep/utgarde_keep/instance_utgarde_keep.cpp index fb86065b7..62ad27f5b 100644 --- a/scripts/northrend/utgarde_keep/utgarde_keep/instance_utgarde_keep.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_keep/instance_utgarde_keep.cpp @@ -42,6 +42,7 @@ void instance_utgarde_keep::OnCreatureCreate(Creature* pCreature) case NPC_KELESETH: case NPC_SKARVALD: case NPC_DALRONN: + case NPC_INGVAR: m_mNpcEntryGuidStore[pCreature->GetEntry()] = pCreature->GetObjectGuid(); break; } diff --git a/scripts/northrend/utgarde_keep/utgarde_keep/utgarde_keep.h b/scripts/northrend/utgarde_keep/utgarde_keep/utgarde_keep.h index c84919007..29a909eef 100644 --- a/scripts/northrend/utgarde_keep/utgarde_keep/utgarde_keep.h +++ b/scripts/northrend/utgarde_keep/utgarde_keep/utgarde_keep.h @@ -19,6 +19,7 @@ enum NPC_KELESETH = 23953, NPC_SKARVALD = 24200, NPC_DALRONN = 24201, + NPC_INGVAR = 23954, NPC_FROST_TOMB = 23965, diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 291113bce..c556d6523 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2414" + #define SD2_REVISION_NR "2415" #endif // __SD2_REVISION_NR_H__ From df6ad9ad1bd74b87822db046845503b7b72c0344 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Thu, 26 Jan 2012 02:06:42 +0200 Subject: [PATCH 0403/1172] [2416] Implement Void Traveler script for Grandmaster Vorpil Note: the movement speed of the void needs further research --- .../boss_grandmaster_vorpil.cpp | 82 ++++++++++++++++--- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 + sql/updates/r2416_mangos.sql | 1 + 4 files changed, 72 insertions(+), 14 deletions(-) create mode 100644 sql/updates/r2416_mangos.sql diff --git a/scripts/outland/auchindoun/shadow_labyrinth/boss_grandmaster_vorpil.cpp b/scripts/outland/auchindoun/shadow_labyrinth/boss_grandmaster_vorpil.cpp index 9d4707553..d811598da 100644 --- a/scripts/outland/auchindoun/shadow_labyrinth/boss_grandmaster_vorpil.cpp +++ b/scripts/outland/auchindoun/shadow_labyrinth/boss_grandmaster_vorpil.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: Boss_Grandmaster_Vorpil -SD%Complete: 75 -SDComment: Despawn all summoned on death not implemented. Void Traveler effects not implemented. +SD%Complete: 90 +SDComment: Timers may need adjustments SDCategory: Auchindoun, Shadow Labyrinth EndScriptData */ @@ -75,6 +75,8 @@ static const SummonLocations aVorpilLocation[MAX_PORTALS] = static const float aVorpilTeleportLoc[3] = {-253.06f, -264.02f, 17.08f}; +static const uint32 aTravelerSummonSpells[5] = {SPELL_SUMMON_VOIDWALKER_A, SPELL_SUMMON_VOIDWALKER_B, SPELL_SUMMON_VOIDWALKER_C, SPELL_SUMMON_VOIDWALKER_D, SPELL_SUMMON_VOIDWALKER_E}; + struct MANGOS_DLL_DECL boss_grandmaster_vorpilAI : public ScriptedAI { boss_grandmaster_vorpilAI(Creature* pCreature) : ScriptedAI(pCreature) @@ -100,7 +102,7 @@ struct MANGOS_DLL_DECL boss_grandmaster_vorpilAI : public ScriptedAI m_uiShadowBoltVolleyTimer = urand(7000, 14000); m_uiDrawShadowsTimer = 40000; m_uiRainOfFireTimer = 0; - m_uiVoidTravelerTimer = 20000; + m_uiVoidTravelerTimer = 5000; m_uiBanishTimer = 25000; } @@ -224,18 +226,11 @@ struct MANGOS_DLL_DECL boss_grandmaster_vorpilAI : public ScriptedAI if (m_uiVoidTravelerTimer < uiDiff) { - DoScriptText(SAY_HELP, m_creature); - - switch(urand(0, 4)) + if (DoCastSpellIfCan(m_creature, aTravelerSummonSpells[urand(0, 4)]) == CAST_OK) { - case 0: DoCastSpellIfCan(m_creature, SPELL_SUMMON_VOIDWALKER_A); break; - case 1: DoCastSpellIfCan(m_creature, SPELL_SUMMON_VOIDWALKER_B); break; - case 2: DoCastSpellIfCan(m_creature, SPELL_SUMMON_VOIDWALKER_C); break; - case 3: DoCastSpellIfCan(m_creature, SPELL_SUMMON_VOIDWALKER_D); break; - case 4: DoCastSpellIfCan(m_creature, SPELL_SUMMON_VOIDWALKER_E); break; + DoScriptText(SAY_HELP, m_creature); + m_uiVoidTravelerTimer = urand(10000, 15000); } - //faster rate when below (X) health? - m_uiVoidTravelerTimer = 35000; } else m_uiVoidTravelerTimer -= uiDiff; @@ -263,6 +258,62 @@ CreatureAI* GetAI_boss_grandmaster_vorpil(Creature* pCreature) return new boss_grandmaster_vorpilAI(pCreature); } +struct MANGOS_DLL_DECL npc_void_travelerAI : public ScriptedAI +{ + npc_void_travelerAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); + Reset(); + } + + bool m_bIsRegularMode; + bool m_bHasExploded; + + uint32 m_uiDeathTimer; + + void Reset() + { + m_uiDeathTimer = 0; + m_bHasExploded = false; + } + + void MoveInLineOfSight(Unit* pWho) + { + if (!m_bHasExploded && pWho->GetEntry() == NPC_VORPIL && pWho->IsWithinDistInMap(m_creature, 3.0f)) + { + if (DoCastSpellIfCan(m_creature, SPELL_SHADOW_NOVA) == CAST_OK) + { + m_bHasExploded = true; + m_uiDeathTimer = 1000; + } + } + } + + void AttackStart(Unit* pWho) { } + + void UpdateAI(const uint32 uiDiff) + { + if (m_uiDeathTimer) + { + if (m_uiDeathTimer <= uiDiff) + { + if (DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_EMPOWERING_SHADOWS : SPELL_EMPOWERING_SHADOWS_H, CAST_TRIGGERED) == CAST_OK) + { + m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + m_uiDeathTimer = 0; + } + } + else + m_uiDeathTimer -= uiDiff; + } + } +}; + +CreatureAI* GetAI_npc_void_traveler(Creature* pCreature) +{ + return new npc_void_travelerAI(pCreature); +} + void AddSC_boss_grandmaster_vorpil() { Script* pNewScript; @@ -271,4 +322,9 @@ void AddSC_boss_grandmaster_vorpil() pNewScript->Name = "boss_grandmaster_vorpil"; pNewScript->GetAI = &GetAI_boss_grandmaster_vorpil; pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_void_traveler"; + pNewScript->GetAI = &GetAI_npc_void_traveler; + pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index c556d6523..ac827f9eb 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2415" + #define SD2_REVISION_NR "2416" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index eec760ff3..3db575f20 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -211,6 +211,7 @@ UPDATE creature_template SET ScriptName='boss_murmur' WHERE entry=18708; UPDATE creature_template SET ScriptName='boss_grandmaster_vorpil' WHERE entry=18732; UPDATE creature_template SET ScriptName='boss_blackheart_the_inciter' WHERE entry=18667; UPDATE creature_template SET ScriptName='boss_ambassador_hellmaw' WHERE entry=18731; +UPDATE creature_template SET ScriptName='npc_void_traveler' WHERE entry=19226; /* */ /* AZJOL-NERUB */ diff --git a/sql/updates/r2416_mangos.sql b/sql/updates/r2416_mangos.sql new file mode 100644 index 000000000..565caf993 --- /dev/null +++ b/sql/updates/r2416_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_void_traveler' WHERE entry=19226; From 68f701bae3f6014b529460c17ca9112a1ed7e4b4 Mon Sep 17 00:00:00 2001 From: mns Date: Sun, 29 Jan 2012 17:36:42 +0100 Subject: [PATCH 0404/1172] [2417] Improve Illidan script Fix Maiev handling in case of wipe Move FAIL handling to proper place (JustReachedHome) Signed-off-by: Schmoozerd --- scripts/outland/black_temple/boss_illidan.cpp | 70 +++++++++++-------- sd2_revision_nr.h | 2 +- 2 files changed, 40 insertions(+), 32 deletions(-) diff --git a/scripts/outland/black_temple/boss_illidan.cpp b/scripts/outland/black_temple/boss_illidan.cpp index 895c60050..5035749f0 100644 --- a/scripts/outland/black_temple/boss_illidan.cpp +++ b/scripts/outland/black_temple/boss_illidan.cpp @@ -913,34 +913,6 @@ struct MANGOS_DLL_DECL boss_illidan_stormrageAI : public ScriptedAI { m_uiPhase = PHASE_NORMAL; - // Check if any flames/glaives are alive/existing. Kill if alive and set GUIDs to 0 - for(uint8 i = 0; i < 2; ++i) - { - if (Creature* pFlame = m_creature->GetMap()->GetCreature(m_flameGuids[i])) - { - if (pFlame->isAlive()) - pFlame->SetDeathState(JUST_DIED); - - m_flameGuids[i].Clear(); - } - - if (Creature* pGlaive = m_creature->GetMap()->GetCreature(m_glaiveGuids[i])) - { - if (pGlaive->isAlive()) - pGlaive->SetDeathState(JUST_DIED); - - m_glaiveGuids[i].Clear(); - } - } - - if (Creature* pAkama = m_creature->GetMap()->GetCreature(m_akamaGuid)) - { - if (!pAkama->isAlive()) - pAkama->Respawn(); - - pAkama->AI()->EnterEvadeMode(); - } - m_bRefaceVictim = false; m_bHasSummoned = false; @@ -992,9 +964,6 @@ struct MANGOS_DLL_DECL boss_illidan_stormrageAI : public ScriptedAI m_uiTalkCount = 0; m_uiTalkTimer = 0; - - if (m_pInstance) - m_pInstance->SetData(TYPE_ILLIDAN, NOT_STARTED); } void GetAIInformation(ChatHandler& reader) @@ -1004,6 +973,45 @@ struct MANGOS_DLL_DECL boss_illidan_stormrageAI : public ScriptedAI reader.PSendSysMessage("Guids: Akama is %s, Maiev is %s", m_akamaGuid.GetString().c_str(), m_maievGuid.GetString().c_str()); } + void JustReachedHome() + { + // Check if Maiev are alive/existing. Despawn and clear Guid + if (Creature* Maiev = m_creature->GetMap()->GetCreature(m_maievGuid)) + Maiev->ForcedDespawn(); + m_maievGuid.Clear(); + + // Check if any flames/glaives are alive/existing. Kill if alive and clear Guids + for (uint8 i = 0; i < 2; ++i) + { + if (Creature* pFlame = m_creature->GetMap()->GetCreature(m_flameGuids[i])) + { + if (pFlame->isAlive()) + pFlame->SetDeathState(JUST_DIED); + + m_flameGuids[i].Clear(); + } + + if (Creature* pGlaive = m_creature->GetMap()->GetCreature(m_glaiveGuids[i])) + { + if (pGlaive->isAlive()) + pGlaive->SetDeathState(JUST_DIED); + + m_glaiveGuids[i].Clear(); + } + } + + if (Creature* pAkama = m_creature->GetMap()->GetCreature(m_akamaGuid)) + { + if (!pAkama->isAlive()) + pAkama->Respawn(); + + pAkama->AI()->EnterEvadeMode(); + } + + if (m_pInstance) + m_pInstance->SetData(TYPE_ILLIDAN, FAIL); + } + void AttackStart(Unit* pWho) { if (!pWho || m_bIsTalking || m_uiPhase == PHASE_FLIGHT || m_uiPhase == PHASE_DEMON || m_uiPhase == PHASE_DEMON_SEQUENCE || m_creature->HasAura(SPELL_KNEEL, EFFECT_INDEX_0)) diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index ac827f9eb..0104bf056 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2416" + #define SD2_REVISION_NR "2417" #endif // __SD2_REVISION_NR_H__ From 0cd825e01eb9df60c2a2ca8b8cc4087671b8868b Mon Sep 17 00:00:00 2001 From: mns Date: Sun, 29 Jan 2012 17:46:46 +0100 Subject: [PATCH 0405/1172] [2418] Fix logic bugs for Illidan Signed-off-by: Schmoozerd --- scripts/outland/black_temple/boss_illidan.cpp | 13 ++++++------- sd2_revision_nr.h | 2 +- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/scripts/outland/black_temple/boss_illidan.cpp b/scripts/outland/black_temple/boss_illidan.cpp index 5035749f0..488f5497f 100644 --- a/scripts/outland/black_temple/boss_illidan.cpp +++ b/scripts/outland/black_temple/boss_illidan.cpp @@ -1410,7 +1410,7 @@ struct MANGOS_DLL_DECL boss_illidan_stormrageAI : public ScriptedAI void InitializeDeath() { m_creature->RemoveAllAuras(); - DoCastSpellIfCan(m_creature, SPELL_DEATH); // Animate his kneeling + stun him + DoCastSpellIfCan(m_creature, SPELL_DEATH); // Animate his kneeling + stun him // Don't let the players interrupt our talk! m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); m_creature->GetMotionMaster()->Clear(false); // No moving! @@ -1535,11 +1535,10 @@ struct MANGOS_DLL_DECL boss_illidan_stormrageAI : public ScriptedAI } else m_uiTalkTimer -= uiDiff; - } - // No further action while talking - if (m_bIsTalking) + // No further action while talking return; + } // If we don't have a target, return. if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) @@ -1585,15 +1584,15 @@ struct MANGOS_DLL_DECL boss_illidan_stormrageAI : public ScriptedAI return; } - /** Signal to summon Maiev **/ - if (m_creature->GetHealthPercent() < 30.0f && !m_maievGuid && (m_uiPhase != PHASE_DEMON || m_uiPhase != PHASE_DEMON_SEQUENCE)) + /** Signal to summon Maiev at 30% health**/ + if (!m_maievGuid && !(m_uiPhase == PHASE_DEMON || m_uiPhase == PHASE_DEMON_SEQUENCE) && m_creature->GetHealthPercent() < 30.0f) { SummonMaiev(); return; } /** Time for the death speech **/ - if (m_creature->GetHealthPercent() < 1.0f && (m_uiPhase != PHASE_DEMON || m_uiPhase != PHASE_DEMON_SEQUENCE)) + if (!(m_uiPhase == PHASE_DEMON || m_uiPhase == PHASE_DEMON_SEQUENCE) && m_creature->GetHealthPercent() < 1.0f) { InitializeDeath(); return; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 0104bf056..31632bf03 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2417" + #define SD2_REVISION_NR "2418" #endif // __SD2_REVISION_NR_H__ From 277a922304628d97b79c152b45a9fc71dad95429 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Sun, 29 Jan 2012 20:10:14 +0100 Subject: [PATCH 0406/1172] [2419] Improve Illidan, fix Akama reset in FAIL case --- scripts/outland/black_temple/boss_illidan.cpp | 38 ++++++++++--------- sd2_revision_nr.h | 2 +- 2 files changed, 21 insertions(+), 19 deletions(-) diff --git a/scripts/outland/black_temple/boss_illidan.cpp b/scripts/outland/black_temple/boss_illidan.cpp index 488f5497f..30590bc65 100644 --- a/scripts/outland/black_temple/boss_illidan.cpp +++ b/scripts/outland/black_temple/boss_illidan.cpp @@ -428,7 +428,7 @@ struct MANGOS_DLL_DECL npc_akama_illidanAI : public ScriptedAI if (pGate && !pGate->GetGoState()) pGate->SetGoState(GO_STATE_READY); - for(uint32 i = GO_ILLIDAN_DOOR_R; i < GO_ILLIDAN_DOOR_L + 1; ++i) + for(uint32 i = GO_ILLIDAN_DOOR_R; i <= GO_ILLIDAN_DOOR_L; ++i) { if (GameObject* pDoor = m_pInstance->GetSingleGameObjectFromStorage(i)) pDoor->SetGoState(GO_STATE_ACTIVE); @@ -644,13 +644,13 @@ struct MANGOS_DLL_DECL npc_akama_illidanAI : public ScriptedAI void UpdateAI(const uint32 diff) { + if (!m_pInstance) + return; + if (m_illidanGuid) { if (Creature* Illidan = m_creature->GetMap()->GetCreature(m_illidanGuid)) { - if (Illidan->IsInEvadeMode() && !m_creature->IsInEvadeMode()) - EnterEvadeMode(); - if (Illidan->GetHealthPercent() < 85.0f && m_creature->isInCombat() && !m_bFightMinions) { if (m_uiTalkTimer < diff) @@ -692,10 +692,23 @@ struct MANGOS_DLL_DECL npc_akama_illidanAI : public ScriptedAI if (Illidan->GetHealthPercent() < 4.0f && !m_bIsReturningToIllidan) ReturnToIllidan(); } - }else + } + else + m_illidanGuid = m_pInstance->GetGuid(NPC_ILLIDAN_STORMRAGE); + + // Reset Encounter + if (m_pInstance->GetData(TYPE_ILLIDAN) == FAIL) { - if (m_pInstance) - m_illidanGuid = m_pInstance->GetGuid(NPC_ILLIDAN_STORMRAGE); + m_pInstance->SetData(TYPE_ILLIDAN, NOT_STARTED); + + m_creature->GetMotionMaster()->Clear(false); + Reset(); + // Get Akama Home + float fX, fY, fZ, fO; + m_creature->GetRespawnCoord(fX, fY, fZ, &fO); + m_creature->NearTeleportTo(fX, fY, fZ, fO); + + return; } if (m_bIsWalking && m_uiWalkTimer) @@ -822,17 +835,6 @@ struct MANGOS_DLL_DECL npc_akama_illidanAI : public ScriptedAI { if (m_uiSummonMinionTimer < diff) { - if (m_illidanGuid) - { - Creature* Illidan = m_creature->GetMap()->GetCreature(m_illidanGuid); - if (!Illidan || !Illidan->isInCombat()) - { - Reset(); - EnterEvadeMode(); - return; - } - } - float x,y,z; m_creature->GetPosition(x,y,z); Creature* Elite = m_creature->SummonCreature(ILLIDARI_ELITE, x+rand()%10, y+rand()%10, z, 0, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 30000); diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 31632bf03..ab4c207d2 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2418" + #define SD2_REVISION_NR "2419" #endif // __SD2_REVISION_NR_H__ From 39a66e30c478768d9e5978b7292f4cd4a4061d04 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Sun, 29 Jan 2012 20:12:58 +0100 Subject: [PATCH 0407/1172] [2420] Improve Illidan, this fixes a logic bug in some rare cases. Thanks go to mns for catching this hard to find bug :) --- scripts/outland/black_temple/boss_illidan.cpp | 30 +++++++------------ sd2_revision_nr.h | 2 +- 2 files changed, 12 insertions(+), 20 deletions(-) diff --git a/scripts/outland/black_temple/boss_illidan.cpp b/scripts/outland/black_temple/boss_illidan.cpp index 30590bc65..4c6f17da6 100644 --- a/scripts/outland/black_temple/boss_illidan.cpp +++ b/scripts/outland/black_temple/boss_illidan.cpp @@ -966,6 +966,8 @@ struct MANGOS_DLL_DECL boss_illidan_stormrageAI : public ScriptedAI m_uiTalkCount = 0; m_uiTalkTimer = 0; + + SetCombatMovement(false); // Start idle } void GetAIInformation(ChatHandler& reader) @@ -1014,24 +1016,6 @@ struct MANGOS_DLL_DECL boss_illidan_stormrageAI : public ScriptedAI m_pInstance->SetData(TYPE_ILLIDAN, FAIL); } - void AttackStart(Unit* pWho) - { - if (!pWho || m_bIsTalking || m_uiPhase == PHASE_FLIGHT || m_uiPhase == PHASE_DEMON || m_uiPhase == PHASE_DEMON_SEQUENCE || m_creature->HasAura(SPELL_KNEEL, EFFECT_INDEX_0)) - return; - - if (pWho == m_creature) - return; - - if (m_creature->Attack(pWho, true)) - { - m_creature->AddThreat(pWho); - m_creature->SetInCombatWith(pWho); - pWho->SetInCombatWith(m_creature); - - DoStartMovement(pWho); - } - } - void MoveInLineOfSight(Unit* pWho) { if (!pWho || m_creature->getVictim() || m_bIsTalking || m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE)) @@ -1255,6 +1239,7 @@ struct MANGOS_DLL_DECL boss_illidan_stormrageAI : public ScriptedAI else { // Refollow and attack our old victim + SetCombatMovement(true); m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); // Depending on whether we summoned Maiev, we switch to either uiPhase 5 or 3 @@ -1295,7 +1280,8 @@ struct MANGOS_DLL_DECL boss_illidan_stormrageAI : public ScriptedAI // We now hover! m_creature->SetLevitate(true); - + SetCombatMovement(false); + m_creature->GetMotionMaster()->Clear(false); m_creature->GetMotionMaster()->MovePoint(0, CENTER_X, CENTER_Y, CENTER_Z); for(uint8 i = 0; i < 2; ++i) { @@ -1390,6 +1376,7 @@ struct MANGOS_DLL_DECL boss_illidan_stormrageAI : public ScriptedAI Maiev = m_creature->SummonCreature(MAIEV_SHADOWSONG, m_creature->GetPositionX() + 10, m_creature->GetPositionY() + 5, m_creature->GetPositionZ()+2, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 45000); if (Maiev) { + SetCombatMovement(false); m_creature->GetMotionMaster()->Clear(false); // Stop moving, it's rude to walk and talk! m_creature->GetMotionMaster()->MoveIdle(); // Just in case someone is unaffected by Shadow Prison @@ -1415,6 +1402,7 @@ struct MANGOS_DLL_DECL boss_illidan_stormrageAI : public ScriptedAI DoCastSpellIfCan(m_creature, SPELL_DEATH); // Animate his kneeling + stun him // Don't let the players interrupt our talk! m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + SetCombatMovement(false); m_creature->GetMotionMaster()->Clear(false); // No moving! m_creature->GetMotionMaster()->MoveIdle(); @@ -1460,6 +1448,7 @@ struct MANGOS_DLL_DECL boss_illidan_stormrageAI : public ScriptedAI m_creature->setFaction(14); break; case 9: + SetCombatMovement(true); if (m_akamaGuid) { if (Creature* pAkama = m_creature->GetMap()->GetCreature(m_akamaGuid)) @@ -1509,6 +1498,7 @@ struct MANGOS_DLL_DECL boss_illidan_stormrageAI : public ScriptedAI pMaiev->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); } m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + SetCombatMovement(true); m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); m_bIsTalking = false; m_uiFaceVictimTimer = 2000; @@ -1770,6 +1760,7 @@ struct MANGOS_DLL_DECL boss_illidan_stormrageAI : public ScriptedAI m_creature->SetTargetGuid(m_creature->getVictim()->GetObjectGuid()); // Chase our victim! + SetCombatMovement(true); m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); } else @@ -1846,6 +1837,7 @@ struct MANGOS_DLL_DECL boss_illidan_stormrageAI : public ScriptedAI m_uiTransformTimer = 60000; m_uiFlameBurstTimer = 10000; m_uiShadowDemonTimer = 30000; + SetCombatMovement(false); m_creature->GetMotionMaster()->Clear(false);// Stop moving } else diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index ab4c207d2..ee83860bf 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2419" + #define SD2_REVISION_NR "2420" #endif // __SD2_REVISION_NR_H__ From f44dbffcc13a51c0c4e51938c44b98fd1e218691 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sun, 29 Jan 2012 22:13:17 +0200 Subject: [PATCH 0408/1172] [2421] Add spell defines for the Assembly of Iron - Ulduar --- .../ulduar/ulduar/assembly_of_iron.cpp | 49 +++++++++++++++++++ sd2_revision_nr.h | 2 +- 2 files changed, 50 insertions(+), 1 deletion(-) diff --git a/scripts/northrend/ulduar/ulduar/assembly_of_iron.cpp b/scripts/northrend/ulduar/ulduar/assembly_of_iron.cpp index 4445722d2..5600f970a 100644 --- a/scripts/northrend/ulduar/ulduar/assembly_of_iron.cpp +++ b/scripts/northrend/ulduar/ulduar/assembly_of_iron.cpp @@ -51,6 +51,55 @@ enum SAY_STEEL_SLAY_2 = -1603076, SAY_STEEL_OVERWHELM = -1603077, SAY_STEEL_BERSERK = -1603078, + + // Common spells + SPELL_BERSERK = 62535, // triggers 47008 after 15 min + SPELL_SUPERCHARGE = 61920, + SPELL_LIGHTNING_CHANNEL_PREFIGHT = 61942, // cast by Brundir on Steelbreaker + SPELL_RUNE_OF_POWER_PREFIGHT = 61975, // cast by Molgeim on Stellbreaker + //SPELL_COUNCIL_KILL_CREDIT = 65195, // currently missing from DBC + + // Steelbreaker + SPELL_HIGH_VOLTAGE = 61890, // phase 1 spells + SPELL_HIGH_VOLTAGE_H = 63498, // probably related to 61892 - couldn't find any info regarding this one + SPELL_FUSION_PUNCH = 61903, + SPELL_FUSION_PUNCH_H = 63493, + SPELL_STATIC_DISRUPTION = 61911, // phase 2 spells + SPELL_STATIC_DISRUPTION_H = 63495, // should be triggered by 64641 + SPELL_OVERWHELMING_POWER = 61888, // phase 3 spells + SPELL_OVERWHELMING_POWER_H = 64637, + SPELL_ELECTRICAL_CHARGE = 61900, // triggers 61901 when target dies + + // Runemaster Molgeim + SPELL_SHIELD = 62274, // phase 1 spells + SPELL_SHIELD_H = 63489, + SPELL_RUNE_OF_POWER = 61973, + SPELL_RUNE_OF_DEATH = 62269, // phase 2 spells + SPELL_RUNE_OF_DEATH_H = 63490, + SPELL_RUNE_OF_SUMMONING = 62273, // phase 3 spells + + // Stormcaller Brundir + SPELL_CHAIN_LIGHTNING = 61879, // phase 1 spells + SPELL_CHAIN_LIGHTNING_H = 63479, + SPELL_OVERLOAD = 61869, + SPELL_LIGHTNING_WHIRL = 61915, // phase 2 spells + SPELL_LIGHTNING_WHIRL_H = 63483, + SPELL_LIGHTNING_WHIRL_DAMAGE = 61916, // used to check achiev criterias + SPELL_LIGHTNING_WHIRL_DAMAGE_H = 63482, + SPELL_STORMSHIELD = 64187, // phase 3 spells + SPELL_LIGHTNING_TENDRILS = 61887, + SPELL_LIGHTNING_TENDRILS_H = 63486, + SPELL_TENDRILS_VISUAL = 61883, + + // Summoned spells + SPELL_OVERLOAD_AURA = 61877, + SPELL_RUNE_OF_POWER_AURA = 61974, + SPELL_RUNE_OF_SUMMONING_AURA = 62019, // triggers 62020 which summons 32958 + + // summoned npcs + NPC_OVERLOAD_VISUAL = 32866, + NPC_RUNE_OF_POWER = 33705, + NPC_RUNE_OF_SUMMONING = 33051, }; void AddSC_boss_assembly_of_iron() diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index ee83860bf..2a189c93e 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2420" + #define SD2_REVISION_NR "2421" #endif // __SD2_REVISION_NR_H__ From 44ba59119d4d34000e42a159dd5a0874632290d2 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sun, 29 Jan 2012 22:23:57 +0200 Subject: [PATCH 0409/1172] [2422] Add basic boss scripts for the Assembly of Iron - Ulduar --- .../ulduar/ulduar/assembly_of_iron.cpp | 150 ++++++++++++++++++ sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 3 + sql/updates/r2422_mangos.sql | 3 + 4 files changed, 157 insertions(+), 1 deletion(-) create mode 100644 sql/updates/r2422_mangos.sql diff --git a/scripts/northrend/ulduar/ulduar/assembly_of_iron.cpp b/scripts/northrend/ulduar/ulduar/assembly_of_iron.cpp index 5600f970a..ea04f1ac4 100644 --- a/scripts/northrend/ulduar/ulduar/assembly_of_iron.cpp +++ b/scripts/northrend/ulduar/ulduar/assembly_of_iron.cpp @@ -102,7 +102,157 @@ enum NPC_RUNE_OF_SUMMONING = 33051, }; +struct MANGOS_DLL_DECL boss_brundirAI : public ScriptedAI +{ + boss_brundirAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (instance_ulduar*)pCreature->GetInstanceData(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); + Reset(); + } + + instance_ulduar* m_pInstance; + bool m_bIsRegularMode; + + void Reset() + { + } + + void JustDied(Unit* pKiller) + { + DoScriptText(urand(0, 1) ? SAY_BRUNDIR_DEATH_1 : SAY_BRUNDIR_DEATH_2, m_creature); + } + + void Aggro(Unit* pWho) + { + DoScriptText(SAY_BRUNDIR_AGGRO, m_creature); + } + + void KilledUnit(Unit* pVictim) + { + DoScriptText(urand(0, 1) ? SAY_BRUNDIR_SLAY_1 : SAY_BRUNDIR_SLAY_2, m_creature); + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_brundir(Creature* pCreature) +{ + return new boss_brundirAI(pCreature); +} + +struct MANGOS_DLL_DECL boss_molgeimAI : public ScriptedAI +{ + boss_molgeimAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (instance_ulduar*)pCreature->GetInstanceData(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); + Reset(); + } + + instance_ulduar* m_pInstance; + bool m_bIsRegularMode; + + void Reset() + { + } + + void JustDied(Unit* pKiller) + { + DoScriptText(urand(0, 1) ? SAY_MOLGEIM_DEATH_1 : SAY_MOLGEIM_DEATH_2, m_creature); + } + + void Aggro(Unit* pWho) + { + DoScriptText(SAY_MOLGEIM_AGGRO, m_creature); + } + + void KilledUnit(Unit* pVictim) + { + DoScriptText(urand(0, 1) ? SAY_MOLGEIM_SLAY_1 : SAY_MOLGEIM_SLAY_2, m_creature); + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_molgeim(Creature* pCreature) +{ + return new boss_molgeimAI(pCreature); +} + +struct MANGOS_DLL_DECL boss_steelbreakerAI : public ScriptedAI +{ + boss_steelbreakerAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (instance_ulduar*)pCreature->GetInstanceData(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); + Reset(); + } + + instance_ulduar* m_pInstance; + bool m_bIsRegularMode; + + void Reset() + { + } + + void JustDied(Unit* pKiller) + { + DoScriptText(urand(0, 1) ? SAY_STEEL_DEATH_1 : SAY_STEEL_DEATH_2, m_creature); + } + + void Aggro(Unit* pWho) + { + DoScriptText(SAY_STEEL_AGGRO, m_creature); + } + + void KilledUnit(Unit* pVictim) + { + DoScriptText(urand(0, 1) ? SAY_STEEL_SLAY_1 : SAY_STEEL_SLAY_2, m_creature); + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_steelbreaker(Creature* pCreature) +{ + return new boss_steelbreakerAI(pCreature); +} + void AddSC_boss_assembly_of_iron() { + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_brundir"; + pNewScript->GetAI = GetAI_boss_brundir; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "boss_molgeim"; + pNewScript->GetAI = GetAI_boss_molgeim; + pNewScript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "boss_steelbreaker"; + pNewScript->GetAI = GetAI_boss_steelbreaker; + pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 2a189c93e..557aaffe4 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2421" + #define SD2_REVISION_NR "2422" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 3db575f20..58a091a4e 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -1217,6 +1217,9 @@ UPDATE instance_template SET ScriptName='instance_ulduar' WHERE map=603; UPDATE creature_template SET ScriptName='boss_general_vezax' WHERE entry=33271; UPDATE creature_template SET ScriptName='boss_auriaya' WHERE entry=33515; UPDATE creature_template SET ScriptName='boss_feral_defender' WHERE entry=34035; +UPDATE creature_template SET ScriptName='boss_brundir' WHERE entry=32857; +UPDATE creature_template SET ScriptName='boss_molgeim' WHERE entry=32927; +UPDATE creature_template SET ScriptName='boss_steelbreaker' WHERE entry=32867; DELETE FROM scripted_event_id WHERE id=9735; INSERT INTO scripted_event_id VALUES (9735,'event_spell_saronite_barrier'); diff --git a/sql/updates/r2422_mangos.sql b/sql/updates/r2422_mangos.sql new file mode 100644 index 000000000..050af636b --- /dev/null +++ b/sql/updates/r2422_mangos.sql @@ -0,0 +1,3 @@ +UPDATE creature_template SET ScriptName='boss_brundir' WHERE entry=32857; +UPDATE creature_template SET ScriptName='boss_molgeim' WHERE entry=32927; +UPDATE creature_template SET ScriptName='boss_steelbreaker' WHERE entry=32867; From 0654c886400e46c99b6934e4ba1af79f77fa5f5a Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sun, 29 Jan 2012 22:35:55 +0200 Subject: [PATCH 0410/1172] [2423] Add instance data support for the Assembly of Iron * define encounter phases * on death cast Supercharge and remove lootable flag --- .../ulduar/ulduar/assembly_of_iron.cpp | 70 +++++++++++++++++++ .../ulduar/ulduar/instance_ulduar.cpp | 3 + sd2_revision_nr.h | 2 +- 3 files changed, 74 insertions(+), 1 deletion(-) diff --git a/scripts/northrend/ulduar/ulduar/assembly_of_iron.cpp b/scripts/northrend/ulduar/ulduar/assembly_of_iron.cpp index ea04f1ac4..0d4c15602 100644 --- a/scripts/northrend/ulduar/ulduar/assembly_of_iron.cpp +++ b/scripts/northrend/ulduar/ulduar/assembly_of_iron.cpp @@ -100,6 +100,10 @@ enum NPC_OVERLOAD_VISUAL = 32866, NPC_RUNE_OF_POWER = 33705, NPC_RUNE_OF_SUMMONING = 33051, + + PHASE_NO_CHARGE = 0, + PHASE_CHARGE_ONE = 1, + PHASE_CHARGE_TWO = 2, }; struct MANGOS_DLL_DECL boss_brundirAI : public ScriptedAI @@ -114,18 +118,36 @@ struct MANGOS_DLL_DECL boss_brundirAI : public ScriptedAI instance_ulduar* m_pInstance; bool m_bIsRegularMode; + uint8 m_uiPhase; + void Reset() { + m_uiPhase = PHASE_NO_CHARGE; } void JustDied(Unit* pKiller) { + if (!m_pInstance) + return; + + // If we are not on the last phase then cast Supercharge and set as unlootable + if (m_uiPhase != PHASE_CHARGE_TWO) + { + m_creature->RemoveFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE); + DoCastSpellIfCan(m_creature, SPELL_SUPERCHARGE, CAST_TRIGGERED); + } + else + m_pInstance->SetData(TYPE_ASSEMBLY, DONE); + DoScriptText(urand(0, 1) ? SAY_BRUNDIR_DEATH_1 : SAY_BRUNDIR_DEATH_2, m_creature); } void Aggro(Unit* pWho) { DoScriptText(SAY_BRUNDIR_AGGRO, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_ASSEMBLY, IN_PROGRESS); } void KilledUnit(Unit* pVictim) @@ -133,6 +155,12 @@ struct MANGOS_DLL_DECL boss_brundirAI : public ScriptedAI DoScriptText(urand(0, 1) ? SAY_BRUNDIR_SLAY_1 : SAY_BRUNDIR_SLAY_2, m_creature); } + void JustReachedHome() + { + if (m_pInstance) + m_pInstance->SetData(TYPE_ASSEMBLY, FAIL); + } + void UpdateAI(const uint32 uiDiff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) @@ -159,18 +187,33 @@ struct MANGOS_DLL_DECL boss_molgeimAI : public ScriptedAI instance_ulduar* m_pInstance; bool m_bIsRegularMode; + uint8 m_uiPhase; + void Reset() { + m_uiPhase = PHASE_NO_CHARGE; } void JustDied(Unit* pKiller) { + // If we are not on the last phase then cast Supercharge and set as unlootable + if (m_uiPhase != PHASE_CHARGE_TWO) + { + m_creature->RemoveFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE); + DoCastSpellIfCan(m_creature, SPELL_SUPERCHARGE, CAST_TRIGGERED); + } + else + m_pInstance->SetData(TYPE_ASSEMBLY, DONE); + DoScriptText(urand(0, 1) ? SAY_MOLGEIM_DEATH_1 : SAY_MOLGEIM_DEATH_2, m_creature); } void Aggro(Unit* pWho) { DoScriptText(SAY_MOLGEIM_AGGRO, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_ASSEMBLY, IN_PROGRESS); } void KilledUnit(Unit* pVictim) @@ -178,6 +221,12 @@ struct MANGOS_DLL_DECL boss_molgeimAI : public ScriptedAI DoScriptText(urand(0, 1) ? SAY_MOLGEIM_SLAY_1 : SAY_MOLGEIM_SLAY_2, m_creature); } + void JustReachedHome() + { + if (m_pInstance) + m_pInstance->SetData(TYPE_ASSEMBLY, FAIL); + } + void UpdateAI(const uint32 uiDiff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) @@ -204,18 +253,33 @@ struct MANGOS_DLL_DECL boss_steelbreakerAI : public ScriptedAI instance_ulduar* m_pInstance; bool m_bIsRegularMode; + uint8 m_uiPhase; + void Reset() { + m_uiPhase = PHASE_NO_CHARGE; } void JustDied(Unit* pKiller) { + // If we are not on the last phase then cast Supercharge and set as unlootable + if (m_uiPhase != PHASE_CHARGE_TWO) + { + m_creature->RemoveFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE); + DoCastSpellIfCan(m_creature, SPELL_SUPERCHARGE, CAST_TRIGGERED); + } + else + m_pInstance->SetData(TYPE_ASSEMBLY, DONE); + DoScriptText(urand(0, 1) ? SAY_STEEL_DEATH_1 : SAY_STEEL_DEATH_2, m_creature); } void Aggro(Unit* pWho) { DoScriptText(SAY_STEEL_AGGRO, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_ASSEMBLY, IN_PROGRESS); } void KilledUnit(Unit* pVictim) @@ -223,6 +287,12 @@ struct MANGOS_DLL_DECL boss_steelbreakerAI : public ScriptedAI DoScriptText(urand(0, 1) ? SAY_STEEL_SLAY_1 : SAY_STEEL_SLAY_2, m_creature); } + void JustReachedHome() + { + if (m_pInstance) + m_pInstance->SetData(TYPE_ASSEMBLY, FAIL); + } + void UpdateAI(const uint32 uiDiff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) diff --git a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp index 2da6ae8c7..19bafaa07 100644 --- a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp +++ b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp @@ -287,6 +287,9 @@ void instance_ulduar::SetData(uint32 uiType, uint32 uiData) DoUseDoorOrButton(GO_XT002_GATE); break; case TYPE_ASSEMBLY: + // Don't set the same encounter data twice + if (uiData == m_auiEncounter[uiType]) + return; m_auiEncounter[uiType] = uiData; DoUseDoorOrButton(GO_IRON_ENTRANCE_DOOR); if (uiData == DONE) diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 557aaffe4..198028dbe 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2422" + #define SD2_REVISION_NR "2423" #endif // __SD2_REVISION_NR_H__ From 06a9269c88a321e006a3cd9f358a29d7aa48b51f Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sun, 29 Jan 2012 22:53:50 +0200 Subject: [PATCH 0411/1172] [2424] Allow the Assembly of Iron to switch phases on spell hit * also cast Berserk aura on aggro * allow Steelbreaker to cast Electrical Charge in phase II and High Voltage on aggro * allow Brundir to cast Stormshield in phase II --- .../ulduar/ulduar/assembly_of_iron.cpp | 52 +++++++++++++++++++ sd2_revision_nr.h | 2 +- 2 files changed, 53 insertions(+), 1 deletion(-) diff --git a/scripts/northrend/ulduar/ulduar/assembly_of_iron.cpp b/scripts/northrend/ulduar/ulduar/assembly_of_iron.cpp index 0d4c15602..acc6f9df9 100644 --- a/scripts/northrend/ulduar/ulduar/assembly_of_iron.cpp +++ b/scripts/northrend/ulduar/ulduar/assembly_of_iron.cpp @@ -148,6 +148,8 @@ struct MANGOS_DLL_DECL boss_brundirAI : public ScriptedAI if (m_pInstance) m_pInstance->SetData(TYPE_ASSEMBLY, IN_PROGRESS); + + DoCastSpellIfCan(m_creature, SPELL_BERSERK, CAST_TRIGGERED); } void KilledUnit(Unit* pVictim) @@ -161,6 +163,23 @@ struct MANGOS_DLL_DECL boss_brundirAI : public ScriptedAI m_pInstance->SetData(TYPE_ASSEMBLY, FAIL); } + void SpellHit(Unit* pCaster, const SpellEntry* pSpell) + { + // Increase the phase when hit with the supercharge spell by his brothers + if (pSpell->Id == SPELL_SUPERCHARGE) + { + // Not sure if there is a spell for this, so we are doing it here + m_creature->SetHealth(m_creature->GetMaxHealth()); + ++m_uiPhase; + } + + if (m_uiPhase == PHASE_CHARGE_TWO) + { + // Cast stormshield in the last phase + DoCastSpellIfCan(m_creature, SPELL_STORMSHIELD, CAST_TRIGGERED); + } + } + void UpdateAI(const uint32 uiDiff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) @@ -214,6 +233,8 @@ struct MANGOS_DLL_DECL boss_molgeimAI : public ScriptedAI if (m_pInstance) m_pInstance->SetData(TYPE_ASSEMBLY, IN_PROGRESS); + + DoCastSpellIfCan(m_creature, SPELL_BERSERK, CAST_TRIGGERED); } void KilledUnit(Unit* pVictim) @@ -227,6 +248,17 @@ struct MANGOS_DLL_DECL boss_molgeimAI : public ScriptedAI m_pInstance->SetData(TYPE_ASSEMBLY, FAIL); } + void SpellHit(Unit* pCaster, const SpellEntry* pSpell) + { + // Increase the phase when hit with the supercharge spell by his brothers + if (pSpell->Id == SPELL_SUPERCHARGE) + { + // Not sure if there is a spell for this, so we are doing it here + m_creature->SetHealth(m_creature->GetMaxHealth()); + ++m_uiPhase; + } + } + void UpdateAI(const uint32 uiDiff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) @@ -280,6 +312,9 @@ struct MANGOS_DLL_DECL boss_steelbreakerAI : public ScriptedAI if (m_pInstance) m_pInstance->SetData(TYPE_ASSEMBLY, IN_PROGRESS); + + DoCastSpellIfCan(m_creature, SPELL_BERSERK, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_HIGH_VOLTAGE : SPELL_HIGH_VOLTAGE_H, CAST_TRIGGERED); } void KilledUnit(Unit* pVictim) @@ -293,6 +328,23 @@ struct MANGOS_DLL_DECL boss_steelbreakerAI : public ScriptedAI m_pInstance->SetData(TYPE_ASSEMBLY, FAIL); } + void SpellHit(Unit* pCaster, const SpellEntry* pSpell) + { + // Increase the phase when hit with the supercharge spell by his brothers + if (pSpell->Id == SPELL_SUPERCHARGE) + { + // Not sure if there is a spell for this, so we are doing it here + m_creature->SetHealth(m_creature->GetMaxHealth()); + ++m_uiPhase; + } + + if (m_uiPhase == PHASE_CHARGE_TWO) + { + // Cast electrical charge aura on all players - this will proc when player dies + DoCastSpellIfCan(m_creature, SPELL_ELECTRICAL_CHARGE, CAST_TRIGGERED); + } + } + void UpdateAI(const uint32 uiDiff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 198028dbe..875994f33 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2423" + #define SD2_REVISION_NR "2424" #endif // __SD2_REVISION_NR_H__ From a6249612184c12e0454004cfffe4de5d0d97f942 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sun, 29 Jan 2012 23:01:21 +0200 Subject: [PATCH 0412/1172] [2425] Allow Brundir and Molgeim to cast pre-fight visuals on out of combat timer --- .../ulduar/ulduar/assembly_of_iron.cpp | 30 +++++++++++++++++++ sd2_revision_nr.h | 2 +- 2 files changed, 31 insertions(+), 1 deletion(-) diff --git a/scripts/northrend/ulduar/ulduar/assembly_of_iron.cpp b/scripts/northrend/ulduar/ulduar/assembly_of_iron.cpp index acc6f9df9..fec570a58 100644 --- a/scripts/northrend/ulduar/ulduar/assembly_of_iron.cpp +++ b/scripts/northrend/ulduar/ulduar/assembly_of_iron.cpp @@ -119,10 +119,12 @@ struct MANGOS_DLL_DECL boss_brundirAI : public ScriptedAI bool m_bIsRegularMode; uint8 m_uiPhase; + uint32 m_uiVisualTimer; void Reset() { m_uiPhase = PHASE_NO_CHARGE; + m_uiVisualTimer = 5000; } void JustDied(Unit* pKiller) @@ -149,6 +151,7 @@ struct MANGOS_DLL_DECL boss_brundirAI : public ScriptedAI if (m_pInstance) m_pInstance->SetData(TYPE_ASSEMBLY, IN_PROGRESS); + m_creature->InterruptNonMeleeSpells(false); DoCastSpellIfCan(m_creature, SPELL_BERSERK, CAST_TRIGGERED); } @@ -182,6 +185,18 @@ struct MANGOS_DLL_DECL boss_brundirAI : public ScriptedAI void UpdateAI(const uint32 uiDiff) { + // Pre fight visual spell + if (m_uiVisualTimer) + { + if (m_uiVisualTimer <= uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_LIGHTNING_CHANNEL_PREFIGHT) == CAST_OK) + m_uiVisualTimer = 0; + } + else + m_uiVisualTimer -= uiDiff; + } + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -207,10 +222,12 @@ struct MANGOS_DLL_DECL boss_molgeimAI : public ScriptedAI bool m_bIsRegularMode; uint8 m_uiPhase; + uint32 m_uiVisualTimer; void Reset() { m_uiPhase = PHASE_NO_CHARGE; + m_uiVisualTimer = 5000; } void JustDied(Unit* pKiller) @@ -234,6 +251,7 @@ struct MANGOS_DLL_DECL boss_molgeimAI : public ScriptedAI if (m_pInstance) m_pInstance->SetData(TYPE_ASSEMBLY, IN_PROGRESS); + m_creature->InterruptNonMeleeSpells(false); DoCastSpellIfCan(m_creature, SPELL_BERSERK, CAST_TRIGGERED); } @@ -261,6 +279,18 @@ struct MANGOS_DLL_DECL boss_molgeimAI : public ScriptedAI void UpdateAI(const uint32 uiDiff) { + // Pre fight visual spell + if (m_uiVisualTimer) + { + if (m_uiVisualTimer <= uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_RUNE_OF_POWER_PREFIGHT) == CAST_OK) + m_uiVisualTimer = 0; + } + else + m_uiVisualTimer -= uiDiff; + } + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 875994f33..1f44b12d5 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2424" + #define SD2_REVISION_NR "2425" #endif // __SD2_REVISION_NR_H__ From 469faee314f62799b7a610e587270bddb2016ae0 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sun, 29 Jan 2012 23:10:46 +0200 Subject: [PATCH 0413/1172] [2426] Add combat abilities for Steelbreaker Be advised that during phases II and III the boss uses all the spells learned in the previous encounter phases * Note: spell 64641 should be used when a proper targeting system is implemented in core --- .../ulduar/ulduar/assembly_of_iron.cpp | 53 +++++++++++++++++++ sd2_revision_nr.h | 2 +- 2 files changed, 54 insertions(+), 1 deletion(-) diff --git a/scripts/northrend/ulduar/ulduar/assembly_of_iron.cpp b/scripts/northrend/ulduar/ulduar/assembly_of_iron.cpp index fec570a58..8957791bc 100644 --- a/scripts/northrend/ulduar/ulduar/assembly_of_iron.cpp +++ b/scripts/northrend/ulduar/ulduar/assembly_of_iron.cpp @@ -316,10 +316,16 @@ struct MANGOS_DLL_DECL boss_steelbreakerAI : public ScriptedAI bool m_bIsRegularMode; uint8 m_uiPhase; + uint32 m_uiFusionPunchTimer; + uint32 m_uiDisruptionTimer; + uint32 m_uiPowerTimer; void Reset() { m_uiPhase = PHASE_NO_CHARGE; + m_uiFusionPunchTimer = 15000; + m_uiDisruptionTimer = 15000; + m_uiPowerTimer = 10000; } void JustDied(Unit* pKiller) @@ -380,6 +386,53 @@ struct MANGOS_DLL_DECL boss_steelbreakerAI : public ScriptedAI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; + switch (m_uiPhase) + { + case PHASE_CHARGE_TWO: + + if (m_uiPowerTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), m_bIsRegularMode ? SPELL_OVERWHELMING_POWER : SPELL_OVERWHELMING_POWER_H) == CAST_OK) + { + DoScriptText(SAY_STEEL_OVERWHELM, m_creature); + m_uiPowerTimer = m_bIsRegularMode ? 60000 : 35000; + } + } + else + m_uiPowerTimer -= uiDiff; + + // no break here; he uses the other spells as well + case PHASE_CHARGE_ONE: + + if (m_uiDisruptionTimer < uiDiff) + { + // NOTE: This spell is not cast right: Normally it should be triggered by 64641 in core + // Because of the poor target selection in core we'll implement it here with select flag targeting + Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1, uint32(0), SELECT_FLAG_NOT_IN_MELEE_RANGE); + + if (!pTarget) + pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0); + + if (DoCastSpellIfCan(pTarget, m_bIsRegularMode ? SPELL_STATIC_DISRUPTION : SPELL_STATIC_DISRUPTION_H) == CAST_OK) + m_uiDisruptionTimer = urand(10000, 15000); + } + else + m_uiDisruptionTimer -= uiDiff; + + // no break here; he uses the other spells as well + case PHASE_NO_CHARGE: + + if (m_uiFusionPunchTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), m_bIsRegularMode ? SPELL_FUSION_PUNCH : SPELL_FUSION_PUNCH_H) == CAST_OK) + m_uiFusionPunchTimer = 15000; + } + else + m_uiFusionPunchTimer -= uiDiff; + + break; + } + DoMeleeAttackIfReady(); } }; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 1f44b12d5..52e22a1ba 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2425" + #define SD2_REVISION_NR "2426" #endif // __SD2_REVISION_NR_H__ From eac2a01aed810028edc7f8988df82ae7058e2ba6 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sun, 29 Jan 2012 23:27:20 +0200 Subject: [PATCH 0414/1172] [2427] Implement combat abilities for Brundir and Molgeim Lightning Tendrils will be skipped for the moment --- .../ulduar/ulduar/assembly_of_iron.cpp | 117 +++++++++++++++++- sd2_revision_nr.h | 2 +- 2 files changed, 115 insertions(+), 4 deletions(-) diff --git a/scripts/northrend/ulduar/ulduar/assembly_of_iron.cpp b/scripts/northrend/ulduar/ulduar/assembly_of_iron.cpp index 8957791bc..6d74dc868 100644 --- a/scripts/northrend/ulduar/ulduar/assembly_of_iron.cpp +++ b/scripts/northrend/ulduar/ulduar/assembly_of_iron.cpp @@ -120,11 +120,17 @@ struct MANGOS_DLL_DECL boss_brundirAI : public ScriptedAI uint8 m_uiPhase; uint32 m_uiVisualTimer; + uint32 m_uiChainLightningTimer; + uint32 m_uiOverloadTimer; + uint32 m_uiWhirlTimer; void Reset() { m_uiPhase = PHASE_NO_CHARGE; m_uiVisualTimer = 5000; + m_uiChainLightningTimer = 0; + m_uiOverloadTimer = 35000; + m_uiWhirlTimer = 10000; } void JustDied(Unit* pKiller) @@ -200,6 +206,49 @@ struct MANGOS_DLL_DECL boss_brundirAI : public ScriptedAI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; + switch(m_uiPhase) + { + case PHASE_CHARGE_TWO: + + // no break here; he uses the other spells as well + case PHASE_CHARGE_ONE: + + if (m_uiWhirlTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_LIGHTNING_WHIRL : SPELL_LIGHTNING_WHIRL_H) == CAST_OK) + { + DoScriptText(SAY_BRUNDIR_WHIRL, m_creature); + m_uiWhirlTimer = 30000; + } + } + else + m_uiWhirlTimer -= uiDiff; + + // no break here; he uses the other spells as well + case PHASE_NO_CHARGE: + + if (m_uiChainLightningTimer < uiDiff) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, m_bIsRegularMode ? SPELL_CHAIN_LIGHTNING : SPELL_CHAIN_LIGHTNING_H) == CAST_OK) + m_uiChainLightningTimer = 2000; + } + } + else + m_uiChainLightningTimer -= uiDiff; + + if (m_uiOverloadTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_OVERLOAD) == CAST_OK) + m_uiOverloadTimer = 80000; + } + else + m_uiOverloadTimer -= uiDiff; + + break; + } + DoMeleeAttackIfReady(); } }; @@ -223,11 +272,19 @@ struct MANGOS_DLL_DECL boss_molgeimAI : public ScriptedAI uint8 m_uiPhase; uint32 m_uiVisualTimer; + uint32 m_uiShieldTimer; + uint32 m_uiRunePowerTimer; + uint32 m_uiRuneDeathTimer; + uint32 m_uiRuneSummonTimer; void Reset() { m_uiPhase = PHASE_NO_CHARGE; m_uiVisualTimer = 5000; + m_uiShieldTimer = 25000; + m_uiRunePowerTimer = 15000; + m_uiRuneSummonTimer = 10000; + m_uiRuneDeathTimer = 30000; } void JustDied(Unit* pKiller) @@ -294,6 +351,60 @@ struct MANGOS_DLL_DECL boss_molgeimAI : public ScriptedAI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; + switch (m_uiPhase) + { + case PHASE_CHARGE_TWO: + + if (m_uiRuneSummonTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_RUNE_OF_SUMMONING) == CAST_OK) + { + DoScriptText(SAY_MOLGEIM_SURGE, m_creature); + m_uiRuneSummonTimer = 30000; + } + } + else + m_uiRuneSummonTimer -= uiDiff; + + // no break here; he uses the other spells as well + case PHASE_CHARGE_ONE: + + if (m_uiRuneDeathTimer < uiDiff) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, m_bIsRegularMode ? SPELL_RUNE_OF_DEATH : SPELL_RUNE_OF_DEATH_H) == CAST_OK) + { + DoScriptText(SAY_MOLGEIM_DEATH_RUNE, m_creature); + m_uiRuneDeathTimer = 30000; + } + } + } + else + m_uiRuneDeathTimer -= uiDiff; + + // no break here; he uses the other spells as well + case PHASE_NO_CHARGE: + + if (m_uiShieldTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_SHIELD : SPELL_SHIELD_H) == CAST_OK) + m_uiShieldTimer = 40000; + } + else + m_uiShieldTimer -= uiDiff; + + if (m_uiRunePowerTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_RUNE_OF_POWER) == CAST_OK) + m_uiRunePowerTimer = 45000; + } + else + m_uiRunePowerTimer -= uiDiff; + + break; + } + DoMeleeAttackIfReady(); } }; @@ -323,9 +434,9 @@ struct MANGOS_DLL_DECL boss_steelbreakerAI : public ScriptedAI void Reset() { m_uiPhase = PHASE_NO_CHARGE; - m_uiFusionPunchTimer = 15000; - m_uiDisruptionTimer = 15000; - m_uiPowerTimer = 10000; + m_uiFusionPunchTimer = 15000; + m_uiDisruptionTimer = 15000; + m_uiPowerTimer = 10000; } void JustDied(Unit* pKiller) diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 52e22a1ba..62b2a9ccf 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2426" + #define SD2_REVISION_NR "2427" #endif // __SD2_REVISION_NR_H__ From 6f28df8753518739b6e5bca3a94f1b4d15ad26f3 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sun, 29 Jan 2012 23:32:13 +0200 Subject: [PATCH 0415/1172] [2428] Implement abilities for the creatures summoned by Brundir and Molgeim --- .../ulduar/ulduar/assembly_of_iron.cpp | 19 +++++++++++++++++++ sd2_revision_nr.h | 2 +- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/scripts/northrend/ulduar/ulduar/assembly_of_iron.cpp b/scripts/northrend/ulduar/ulduar/assembly_of_iron.cpp index 6d74dc868..39387ae8c 100644 --- a/scripts/northrend/ulduar/ulduar/assembly_of_iron.cpp +++ b/scripts/northrend/ulduar/ulduar/assembly_of_iron.cpp @@ -172,6 +172,17 @@ struct MANGOS_DLL_DECL boss_brundirAI : public ScriptedAI m_pInstance->SetData(TYPE_ASSEMBLY, FAIL); } + void JustSummoned(Creature* pSummoned) + { + if (pSummoned->GetEntry() == NPC_OVERLOAD_VISUAL) + { + pSummoned->CastSpell(pSummoned, SPELL_OVERLOAD_AURA, true); + // Visual npc- shouldn't move and should despawn in 6 sec + pSummoned->GetMotionMaster()->MoveIdle(); + pSummoned->ForcedDespawn(6000); + } + } + void SpellHit(Unit* pCaster, const SpellEntry* pSpell) { // Increase the phase when hit with the supercharge spell by his brothers @@ -323,6 +334,14 @@ struct MANGOS_DLL_DECL boss_molgeimAI : public ScriptedAI m_pInstance->SetData(TYPE_ASSEMBLY, FAIL); } + void JustSummoned(Creature* pSummoned) + { + if (pSummoned->GetEntry() == NPC_RUNE_OF_SUMMONING) + pSummoned->CastSpell(pSummoned, SPELL_RUNE_OF_SUMMONING_AURA, true); + else if (pSummoned->GetEntry() == NPC_RUNE_OF_POWER) + pSummoned->CastSpell(pSummoned, SPELL_RUNE_OF_POWER_AURA, true); + } + void SpellHit(Unit* pCaster, const SpellEntry* pSpell) { // Increase the phase when hit with the supercharge spell by his brothers diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 62b2a9ccf..92fe15557 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2427" + #define SD2_REVISION_NR "2428" #endif // __SD2_REVISION_NR_H__ From deff81788115ac5e6ad10a0aec9d207640ed6b27 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sun, 29 Jan 2012 23:48:26 +0200 Subject: [PATCH 0416/1172] [2429] Implement support for Assembly of Iron achievements "I choose you " Instance data is set to SPECIAL because the CheckAchievementCriteriaMeet function is called before JustDied Only the boss which remains alive in encounter phase III will set the instance data to SPECIAL --- .../ulduar/ulduar/assembly_of_iron.cpp | 24 +++++++++++++++++++ .../ulduar/ulduar/instance_ulduar.cpp | 21 ++++++++++++++++ scripts/northrend/ulduar/ulduar/ulduar.h | 18 +++++++++++++- sd2_revision_nr.h | 2 +- 4 files changed, 63 insertions(+), 2 deletions(-) diff --git a/scripts/northrend/ulduar/ulduar/assembly_of_iron.cpp b/scripts/northrend/ulduar/ulduar/assembly_of_iron.cpp index 39387ae8c..a6bacae4e 100644 --- a/scripts/northrend/ulduar/ulduar/assembly_of_iron.cpp +++ b/scripts/northrend/ulduar/ulduar/assembly_of_iron.cpp @@ -143,6 +143,7 @@ struct MANGOS_DLL_DECL boss_brundirAI : public ScriptedAI { m_creature->RemoveFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE); DoCastSpellIfCan(m_creature, SPELL_SUPERCHARGE, CAST_TRIGGERED); + m_pInstance->SetSpecialAchievementCriteria(TYPE_ACHIEV_BRUNDIR, false); } else m_pInstance->SetData(TYPE_ASSEMBLY, DONE); @@ -197,6 +198,10 @@ struct MANGOS_DLL_DECL boss_brundirAI : public ScriptedAI { // Cast stormshield in the last phase DoCastSpellIfCan(m_creature, SPELL_STORMSHIELD, CAST_TRIGGERED); + + // set the instace data to special in order to mark the last phase - this is used to check the achiev criteria + if (m_pInstance) + m_pInstance->SetData(TYPE_ASSEMBLY, SPECIAL); } } @@ -300,11 +305,15 @@ struct MANGOS_DLL_DECL boss_molgeimAI : public ScriptedAI void JustDied(Unit* pKiller) { + if (!m_pInstance) + return; + // If we are not on the last phase then cast Supercharge and set as unlootable if (m_uiPhase != PHASE_CHARGE_TWO) { m_creature->RemoveFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE); DoCastSpellIfCan(m_creature, SPELL_SUPERCHARGE, CAST_TRIGGERED); + m_pInstance->SetSpecialAchievementCriteria(TYPE_ACHIEV_MOLGEIM, false); } else m_pInstance->SetData(TYPE_ASSEMBLY, DONE); @@ -351,6 +360,13 @@ struct MANGOS_DLL_DECL boss_molgeimAI : public ScriptedAI m_creature->SetHealth(m_creature->GetMaxHealth()); ++m_uiPhase; } + + if (m_uiPhase == PHASE_CHARGE_TWO) + { + // set the instace data to special in order to mark the last phase - this is used to check the achiev criteria + if (m_pInstance) + m_pInstance->SetData(TYPE_ASSEMBLY, SPECIAL); + } } void UpdateAI(const uint32 uiDiff) @@ -460,11 +476,15 @@ struct MANGOS_DLL_DECL boss_steelbreakerAI : public ScriptedAI void JustDied(Unit* pKiller) { + if (!m_pInstance) + return; + // If we are not on the last phase then cast Supercharge and set as unlootable if (m_uiPhase != PHASE_CHARGE_TWO) { m_creature->RemoveFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE); DoCastSpellIfCan(m_creature, SPELL_SUPERCHARGE, CAST_TRIGGERED); + m_pInstance->SetSpecialAchievementCriteria(TYPE_ACHIEV_STEELBREAKER, false); } else m_pInstance->SetData(TYPE_ASSEMBLY, DONE); @@ -508,6 +528,10 @@ struct MANGOS_DLL_DECL boss_steelbreakerAI : public ScriptedAI { // Cast electrical charge aura on all players - this will proc when player dies DoCastSpellIfCan(m_creature, SPELL_ELECTRICAL_CHARGE, CAST_TRIGGERED); + + // set the instace data to special in order to mark the last phase - this is used to check the achiev criteria + if (m_pInstance) + m_pInstance->SetData(TYPE_ASSEMBLY, SPECIAL); } } diff --git a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp index 19bafaa07..1ffe67158 100644 --- a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp +++ b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp @@ -291,9 +291,18 @@ void instance_ulduar::SetData(uint32 uiType, uint32 uiData) if (uiData == m_auiEncounter[uiType]) return; m_auiEncounter[uiType] = uiData; + // don't continue for encounter = special + if (uiData == SPECIAL) + return; DoUseDoorOrButton(GO_IRON_ENTRANCE_DOOR); if (uiData == DONE) DoUseDoorOrButton(GO_ARCHIVUM_DOOR); + else if (uiData == IN_PROGRESS) + { + SetSpecialAchievementCriteria(TYPE_ACHIEV_BRUNDIR, true); + SetSpecialAchievementCriteria(TYPE_ACHIEV_MOLGEIM, true); + SetSpecialAchievementCriteria(TYPE_ACHIEV_STEELBREAKER, true); + } break; case TYPE_KOLOGARN: m_auiEncounter[uiType] = uiData; @@ -592,6 +601,18 @@ bool instance_ulduar::CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player c case ACHIEV_CRIT_NINE_LIVES_N: case ACHIEV_CRIT_NINE_LIVES_H: return m_abAchievCriteria[TYPE_ACHIEV_NINE_LIVES]; + case ACHIEV_CRIT_BRUNDIR_N: + case ACHIEV_CRIT_BRUNDIR_H: + if (GetData(TYPE_ASSEMBLY) == SPECIAL) + return m_abAchievCriteria[TYPE_ACHIEV_BRUNDIR]; + case ACHIEV_CRIT_MOLGEIM_N: + case ACHIEV_CRIT_MOLGEIM_H: + if (GetData(TYPE_ASSEMBLY) == SPECIAL) + return m_abAchievCriteria[TYPE_ACHIEV_MOLGEIM]; + case ACHIEV_CRIT_STEELBREAKER_N: + case ACHIEV_CRIT_STEELBREAKER_H: + if (GetData(TYPE_ASSEMBLY) == SPECIAL) + return m_abAchievCriteria[TYPE_ACHIEV_STEELBREAKER]; default: return false; diff --git a/scripts/northrend/ulduar/ulduar/ulduar.h b/scripts/northrend/ulduar/ulduar/ulduar.h index 623d83cc4..493e5abb8 100644 --- a/scripts/northrend/ulduar/ulduar/ulduar.h +++ b/scripts/northrend/ulduar/ulduar/ulduar.h @@ -101,10 +101,14 @@ enum NPC_KEEPER_MIMIRON = 33244, NPC_KEEPER_THORIM = 33242, - MAX_SPECIAL_ACHIEV_CRITS = 2, + MAX_SPECIAL_ACHIEV_CRITS = 6, TYPE_ACHIEV_CAT_LADY = 0, TYPE_ACHIEV_NINE_LIVES = 1, + TYPE_ACHIEV_STEELBREAKER = 2, + TYPE_ACHIEV_BRUNDIR = 3, + TYPE_ACHIEV_MOLGEIM = 4, + TYPE_ACHIEV_STUNNED = 5, // Loot chests // Kologarn @@ -202,6 +206,18 @@ enum ACHIEV_CRIT_CAT_LADY_H = 10184, ACHIEV_CRIT_NINE_LIVES_N = 10399, // Auriaya, achievs 3076, 3077 ACHIEV_CRIT_NINE_LIVES_H = 10243, + ACHIEV_CRIT_STEELBREAKER_N = 10084, // Iron council, achievs 2941, 2944 + ACHIEV_CRIT_STEELBREAKER_H = 10087, + ACHIEV_CRIT_MOLGEIM_N = 10082, // Iron council, achievs 2939, 2942 + ACHIEV_CRIT_MOLGEIM_H = 10085, + ACHIEV_CRIT_BRUNDIR_N = 10083, // Iron council, achievs 2940, 2943 + ACHIEV_CRIT_BRUNDIR_H = 10086, + ACHIEV_CRIT_STUNNED_BRUND_N = 10090, // Iron council, achiev 2947 + ACHIEV_CRIT_STUNNED_STEEL_N = 10422, + ACHIEV_CRIT_STUNNED_MOLG_N = 10423, + ACHIEV_CRIT_STUNNED_BRUND_H = 10091, // Iron council, achiev 2948 + ACHIEV_CRIT_STUNNED_STEEL_H = 10424, + ACHIEV_CRIT_STUNNED_MOLG_H = 10425, }; class MANGOS_DLL_DECL instance_ulduar : public ScriptedInstance diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 92fe15557..26709268d 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2428" + #define SD2_REVISION_NR "2429" #endif // __SD2_REVISION_NR_H__ From 584111d8fd8fc5cab7882733bca58ee59a4ecd8c Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sun, 29 Jan 2012 23:53:11 +0200 Subject: [PATCH 0417/1172] [2430] Implement support for Assembly of Iron achievement - Can't do that while Stunned --- .../ulduar/ulduar/assembly_of_iron.cpp | 20 +++++++++++++++++++ .../ulduar/ulduar/instance_ulduar.cpp | 9 +++++++++ sd2_revision_nr.h | 2 +- 3 files changed, 30 insertions(+), 1 deletion(-) diff --git a/scripts/northrend/ulduar/ulduar/assembly_of_iron.cpp b/scripts/northrend/ulduar/ulduar/assembly_of_iron.cpp index a6bacae4e..ffc17803a 100644 --- a/scripts/northrend/ulduar/ulduar/assembly_of_iron.cpp +++ b/scripts/northrend/ulduar/ulduar/assembly_of_iron.cpp @@ -205,6 +205,26 @@ struct MANGOS_DLL_DECL boss_brundirAI : public ScriptedAI } } + void SpellHitTarget(Unit* pTarget, const SpellEntry* pSpell) + { + if (pTarget->GetTypeId() != TYPEID_PLAYER) + return; + + if (!m_pInstance) + return; + + // Check achiev criterias + switch (pSpell->Id) + { + case SPELL_CHAIN_LIGHTNING: + case SPELL_CHAIN_LIGHTNING_H: + case SPELL_LIGHTNING_WHIRL_DAMAGE: + case SPELL_LIGHTNING_WHIRL_DAMAGE_H: + m_pInstance->SetSpecialAchievementCriteria(TYPE_ACHIEV_STUNNED, false); + break; + } + } + void UpdateAI(const uint32 uiDiff) { // Pre fight visual spell diff --git a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp index 1ffe67158..0c6f982cd 100644 --- a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp +++ b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp @@ -302,6 +302,7 @@ void instance_ulduar::SetData(uint32 uiType, uint32 uiData) SetSpecialAchievementCriteria(TYPE_ACHIEV_BRUNDIR, true); SetSpecialAchievementCriteria(TYPE_ACHIEV_MOLGEIM, true); SetSpecialAchievementCriteria(TYPE_ACHIEV_STEELBREAKER, true); + SetSpecialAchievementCriteria(TYPE_ACHIEV_STUNNED, true); } break; case TYPE_KOLOGARN: @@ -613,6 +614,14 @@ bool instance_ulduar::CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player c case ACHIEV_CRIT_STEELBREAKER_H: if (GetData(TYPE_ASSEMBLY) == SPECIAL) return m_abAchievCriteria[TYPE_ACHIEV_STEELBREAKER]; + case ACHIEV_CRIT_STUNNED_BRUND_N: + case ACHIEV_CRIT_STUNNED_STEEL_N: + case ACHIEV_CRIT_STUNNED_MOLG_N: + case ACHIEV_CRIT_STUNNED_BRUND_H: + case ACHIEV_CRIT_STUNNED_STEEL_H: + case ACHIEV_CRIT_STUNNED_MOLG_H: + if (GetData(TYPE_ASSEMBLY) == SPECIAL) + return m_abAchievCriteria[TYPE_ACHIEV_STUNNED]; default: return false; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 26709268d..3bf9f9ade 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2429" + #define SD2_REVISION_NR "2430" #endif // __SD2_REVISION_NR_H__ From 5ef198471830465d51403f47d7c8e67dff3925c8 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Mon, 30 Jan 2012 00:06:12 +0200 Subject: [PATCH 0418/1172] [2431] Implement Lightning Tendrils for Stormcaller Brundir Be advised that the current implementation with MovePoint() is wrong. The boss should use MoveFollow(target) but currently this is not possible without changing the follower's Z position. --- .../ulduar/ulduar/assembly_of_iron.cpp | 100 ++++++++++++++++++ sd2_revision_nr.h | 2 +- 2 files changed, 101 insertions(+), 1 deletion(-) diff --git a/scripts/northrend/ulduar/ulduar/assembly_of_iron.cpp b/scripts/northrend/ulduar/ulduar/assembly_of_iron.cpp index ffc17803a..6151a6e90 100644 --- a/scripts/northrend/ulduar/ulduar/assembly_of_iron.cpp +++ b/scripts/northrend/ulduar/ulduar/assembly_of_iron.cpp @@ -104,6 +104,9 @@ enum PHASE_NO_CHARGE = 0, PHASE_CHARGE_ONE = 1, PHASE_CHARGE_TWO = 2, + + POINT_ID_LIFT_OFF = 1, + POINT_ID_LAND = 2, }; struct MANGOS_DLL_DECL boss_brundirAI : public ScriptedAI @@ -123,6 +126,9 @@ struct MANGOS_DLL_DECL boss_brundirAI : public ScriptedAI uint32 m_uiChainLightningTimer; uint32 m_uiOverloadTimer; uint32 m_uiWhirlTimer; + uint32 m_uiTendrilsTimer; + uint32 m_uiTendrilsTargetTimer; + uint32 m_uiTendrilsEndTimer; void Reset() { @@ -131,6 +137,11 @@ struct MANGOS_DLL_DECL boss_brundirAI : public ScriptedAI m_uiChainLightningTimer = 0; m_uiOverloadTimer = 35000; m_uiWhirlTimer = 10000; + m_uiTendrilsTimer = 60000; + m_uiTendrilsEndTimer = 0; + m_uiTendrilsTargetTimer = 0; + + m_creature->SetLevitate(false); } void JustDied(Unit* pKiller) @@ -225,6 +236,44 @@ struct MANGOS_DLL_DECL boss_brundirAI : public ScriptedAI } } + void MovementInform(uint32 uiMoveType, uint32 uiPointId) + { + if (uiMoveType != POINT_MOTION_TYPE || !uiPointId) + return; + + switch (uiPointId) + { + // After lift up follow a target and set the target change timer + case POINT_ID_LIFT_OFF: + // TODO: the boss should follow without changing his Z position - missing core feature + // Current implementation with move point is wrong + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0, uint32(0), SELECT_FLAG_PLAYER | SELECT_FLAG_NOT_IN_MELEE_RANGE)) + DoMoveToTarget(pTarget); + m_uiTendrilsTargetTimer = 5000; + break; + // After reached the land remove all the auras and resume basic combat + case POINT_ID_LAND: + m_creature->SetLevitate(false); + SetCombatMovement(true); + if (m_creature->getVictim()) + m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); + + m_creature->RemoveAurasDueToSpell(SPELL_TENDRILS_VISUAL); + m_creature->RemoveAurasDueToSpell(m_bIsRegularMode ? SPELL_LIGHTNING_TENDRILS : SPELL_LIGHTNING_TENDRILS_H); + break; + } + } + + // Wrapper for target movement + void DoMoveToTarget(Unit* pTarget) + { + if (pTarget) + { + m_creature->GetMotionMaster()->Clear(); + m_creature->GetMotionMaster()->MovePoint(0, pTarget->GetPositionX(), pTarget->GetPositionY(), m_creature->GetPositionZ()); + } + } + void UpdateAI(const uint32 uiDiff) { // Pre fight visual spell @@ -246,6 +295,57 @@ struct MANGOS_DLL_DECL boss_brundirAI : public ScriptedAI { case PHASE_CHARGE_TWO: + if (m_uiTendrilsTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_LIGHTNING_TENDRILS : SPELL_LIGHTNING_TENDRILS_H) == CAST_OK) + { + DoCastSpellIfCan(m_creature, SPELL_TENDRILS_VISUAL, CAST_TRIGGERED); + DoScriptText(SAY_BRUNDIR_FLY, m_creature); + SetCombatMovement(false); + m_creature->SetLevitate(true); + m_creature->GetMotionMaster()->MovePoint(POINT_ID_LIFT_OFF, m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ() + 15.0f); + m_uiTendrilsTimer = 90000; + m_uiTendrilsEndTimer = 25000; + } + } + else + m_uiTendrilsTimer -= uiDiff; + + if (m_uiTendrilsEndTimer) + { + if (m_uiTendrilsEndTimer <= uiDiff) + { + // Get proper Z position and land + float fZ = m_creature->GetTerrain()->GetWaterOrGroundLevel(m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ()); + m_creature->GetMotionMaster()->MovePoint(POINT_ID_LAND, m_creature->GetPositionX(), m_creature->GetPositionY(), fZ); + m_uiOverloadTimer = 40000; + m_uiWhirlTimer = 15000; + m_uiChainLightningTimer = 3000; + m_uiTendrilsEndTimer = 0; + m_uiTendrilsTargetTimer = 0; + } + else + m_uiTendrilsEndTimer -= uiDiff; + + // Change follow target every 5 seconds + if (m_uiTendrilsTargetTimer) + { + if (m_uiTendrilsTargetTimer <= uiDiff) + { + // TODO: the boss should follow without changing his Z position - missing core feature + // Current implementation with move point is wrong + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0, uint32(0), SELECT_FLAG_PLAYER | SELECT_FLAG_NOT_IN_MELEE_RANGE)) + DoMoveToTarget(pTarget); + m_uiTendrilsTargetTimer = 5000; + } + else + m_uiTendrilsTargetTimer -= uiDiff; + } + + // no other spells during tendrils + return; + } + // no break here; he uses the other spells as well case PHASE_CHARGE_ONE: diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 3bf9f9ade..3b930fae0 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2430" + #define SD2_REVISION_NR "2431" #endif // __SD2_REVISION_NR_H__ From 9bbd36224528bb4a45f5fced1b467b8b661eaf09 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Mon, 30 Jan 2012 00:13:03 +0200 Subject: [PATCH 0419/1172] [2432] Allow Stormcaller Brundir to update the target point following more often This is a temporary workaround until the core will have a proper following function for flying creatures --- .../ulduar/ulduar/assembly_of_iron.cpp | 22 +++++++++++++++++++ sd2_revision_nr.h | 2 +- 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/scripts/northrend/ulduar/ulduar/assembly_of_iron.cpp b/scripts/northrend/ulduar/ulduar/assembly_of_iron.cpp index 6151a6e90..b4def1051 100644 --- a/scripts/northrend/ulduar/ulduar/assembly_of_iron.cpp +++ b/scripts/northrend/ulduar/ulduar/assembly_of_iron.cpp @@ -129,6 +129,9 @@ struct MANGOS_DLL_DECL boss_brundirAI : public ScriptedAI uint32 m_uiTendrilsTimer; uint32 m_uiTendrilsTargetTimer; uint32 m_uiTendrilsEndTimer; + uint32 m_uiTendrilsFollowTimer; + + ObjectGuid m_followTargetGuid; void Reset() { @@ -140,6 +143,7 @@ struct MANGOS_DLL_DECL boss_brundirAI : public ScriptedAI m_uiTendrilsTimer = 60000; m_uiTendrilsEndTimer = 0; m_uiTendrilsTargetTimer = 0; + m_uiTendrilsFollowTimer = 500; m_creature->SetLevitate(false); } @@ -248,8 +252,12 @@ struct MANGOS_DLL_DECL boss_brundirAI : public ScriptedAI // TODO: the boss should follow without changing his Z position - missing core feature // Current implementation with move point is wrong if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0, uint32(0), SELECT_FLAG_PLAYER | SELECT_FLAG_NOT_IN_MELEE_RANGE)) + { DoMoveToTarget(pTarget); + m_followTargetGuid = pTarget->GetObjectGuid(); + } m_uiTendrilsTargetTimer = 5000; + m_uiTendrilsFollowTimer = 500; break; // After reached the land remove all the auras and resume basic combat case POINT_ID_LAND: @@ -335,11 +343,25 @@ struct MANGOS_DLL_DECL boss_brundirAI : public ScriptedAI // TODO: the boss should follow without changing his Z position - missing core feature // Current implementation with move point is wrong if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0, uint32(0), SELECT_FLAG_PLAYER | SELECT_FLAG_NOT_IN_MELEE_RANGE)) + { DoMoveToTarget(pTarget); + m_followTargetGuid = pTarget->GetObjectGuid(); + } m_uiTendrilsTargetTimer = 5000; + m_uiTendrilsFollowTimer = 500; } else m_uiTendrilsTargetTimer -= uiDiff; + + // Workaround to follow the target + if (m_uiTendrilsFollowTimer < uiDiff) + { + if (Unit* pTarget = m_creature->GetMap()->GetUnit(m_followTargetGuid)) + DoMoveToTarget(pTarget); + m_uiTendrilsFollowTimer = 500; + } + else + m_uiTendrilsFollowTimer -= uiDiff; } // no other spells during tendrils diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 3b930fae0..0e6f5e099 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2431" + #define SD2_REVISION_NR "2432" #endif // __SD2_REVISION_NR_H__ From 0b79c09a70383615893c31fd783eed265106f973 Mon Sep 17 00:00:00 2001 From: Radu Date: Mon, 30 Jan 2012 00:35:03 +0200 Subject: [PATCH 0420/1172] Edit Assembly of Iron SD2 comment via Github --- scripts/northrend/ulduar/ulduar/assembly_of_iron.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/northrend/ulduar/ulduar/assembly_of_iron.cpp b/scripts/northrend/ulduar/ulduar/assembly_of_iron.cpp index b4def1051..1f80c764b 100644 --- a/scripts/northrend/ulduar/ulduar/assembly_of_iron.cpp +++ b/scripts/northrend/ulduar/ulduar/assembly_of_iron.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: assembly_of_iron -SD%Complete: 0% -SDComment: +SD%Complete: 90% +SDComment: Lightning Tendrils target following could use some love from the core side SDCategory: Ulduar EndScriptData */ From 09c4720ec871c18b041d87a7d6b1208c84bb4e08 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Mon, 30 Jan 2012 09:41:40 +0200 Subject: [PATCH 0421/1172] [2433] Add support for Runemaster Molgeim's Lightning Elementals Note: the Lightning Elemental Passive spell may have some issues because of the missing vanilla spell "3617 Quiet Suicide" --- scripts/northrend/ulduar/ulduar/assembly_of_iron.cpp | 12 +++++++++++- sd2_revision_nr.h | 2 +- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/scripts/northrend/ulduar/ulduar/assembly_of_iron.cpp b/scripts/northrend/ulduar/ulduar/assembly_of_iron.cpp index 1f80c764b..c8066b012 100644 --- a/scripts/northrend/ulduar/ulduar/assembly_of_iron.cpp +++ b/scripts/northrend/ulduar/ulduar/assembly_of_iron.cpp @@ -95,11 +95,14 @@ enum SPELL_OVERLOAD_AURA = 61877, SPELL_RUNE_OF_POWER_AURA = 61974, SPELL_RUNE_OF_SUMMONING_AURA = 62019, // triggers 62020 which summons 32958 + SPELL_LIGHTNING_ELEMENTAL_PASSIVE = 62052, + SPELL_LIGHTNING_ELEMENTAL_PASSIVE_H = 63492, // summoned npcs NPC_OVERLOAD_VISUAL = 32866, NPC_RUNE_OF_POWER = 33705, NPC_RUNE_OF_SUMMONING = 33051, + NPC_LIGHTNING_ELEMENTAL = 32958, PHASE_NO_CHARGE = 0, PHASE_CHARGE_ONE = 1, @@ -488,9 +491,16 @@ struct MANGOS_DLL_DECL boss_molgeimAI : public ScriptedAI void JustSummoned(Creature* pSummoned) { if (pSummoned->GetEntry() == NPC_RUNE_OF_SUMMONING) - pSummoned->CastSpell(pSummoned, SPELL_RUNE_OF_SUMMONING_AURA, true); + pSummoned->CastSpell(pSummoned, SPELL_RUNE_OF_SUMMONING_AURA, true, NULL, NULL, m_creature->GetObjectGuid()); else if (pSummoned->GetEntry() == NPC_RUNE_OF_POWER) pSummoned->CastSpell(pSummoned, SPELL_RUNE_OF_POWER_AURA, true); + else if (pSummoned->GetEntry() == NPC_LIGHTNING_ELEMENTAL) + { + pSummoned->CastSpell(pSummoned, m_bIsRegularMode ? SPELL_LIGHTNING_ELEMENTAL_PASSIVE : SPELL_LIGHTNING_ELEMENTAL_PASSIVE_H, true); + + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + pSummoned->AI()->AttackStart(pTarget); + } } void SpellHit(Unit* pCaster, const SpellEntry* pSpell) diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 0e6f5e099..d143142af 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2432" + #define SD2_REVISION_NR "2433" #endif // __SD2_REVISION_NR_H__ From dd3a35b0d7953fae7e144aaa98ae4c95ade81851 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Thu, 2 Feb 2012 01:06:29 +0100 Subject: [PATCH 0422/1172] [2434] Improve coding style for Ambassador Flamelash Also add some ideas for abilities of summoned adds This script requires some major re-research of what should happen --- .../boss_ambassador_flamelash.cpp | 99 +++++++++++-------- sd2_revision_nr.h | 2 +- 2 files changed, 59 insertions(+), 42 deletions(-) diff --git a/scripts/eastern_kingdoms/blackrock_depths/boss_ambassador_flamelash.cpp b/scripts/eastern_kingdoms/blackrock_depths/boss_ambassador_flamelash.cpp index d4a528890..b071ad1fd 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/boss_ambassador_flamelash.cpp +++ b/scripts/eastern_kingdoms/blackrock_depths/boss_ambassador_flamelash.cpp @@ -16,79 +16,95 @@ /* ScriptData SDName: Boss_Ambassador_Flamelash -SD%Complete: 100 -SDComment: +SD%Complete: 80 +SDComment: Texts missing, Add handling rather guesswork, Add spell Burning Spirit likely won't work SDCategory: Blackrock Depths EndScriptData */ #include "precompiled.h" -#define SPELL_FIREBLAST 15573 +enum +{ + SPELL_FIREBLAST = 15573, + SPELL_BURNING_SPIRIT = 13489, + SPELL_BURNING_SPIRIT_BUFF = 14744, + + NPC_BURNING_SPIRIT = 9178, +}; struct MANGOS_DLL_DECL boss_ambassador_flamelashAI : public ScriptedAI { boss_ambassador_flamelashAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} - uint32 FireBlast_Timer; - uint32 Spirit_Timer; + uint32 m_uiSpiritTimer; int Rand; int RandX; int RandY; - Creature* Summoned; void Reset() { - FireBlast_Timer = 2000; - Spirit_Timer = 24000; + m_uiSpiritTimer = 12000; } - void SummonSpirits(Unit* victim) + void SummonSpirits() { - Rand = rand()%10; - switch(urand(0, 1)) - { - case 0: RandX -= Rand; break; - case 1: RandX += Rand; break; - } - Rand = 0; - Rand = rand()%10; - switch(urand(0, 1)) - { - case 0: RandY -= Rand; break; - case 1: RandY += Rand; break; - } - Summoned = DoSpawnCreature(9178, RandX, RandY, 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 60000); - if (Summoned) - Summoned->AI()->AttackStart(victim); + float fX, fY, fZ; + m_creature->GetRandomPoint(m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), 30.0f, fX, fY, fZ); + m_creature->SummonCreature(NPC_BURNING_SPIRIT, fX, fY, fZ, m_creature->GetAngle(fX, fY)+M_PI_F, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 60000); + } + + void Aggro(Unit* pWho) + { + DoCastSpellIfCan(m_creature, SPELL_FIREBLAST); + } + + void JustSummoned(Creature* pSummoned) + { + pSummoned->GetMotionMaster()->MovePoint(1, m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ()); + } + + void SummonedMovementInform(Creature* pSummoned, uint32 uiMotionType, uint32 uiPointId) + { + if (uiPointId != 1) + return; + + pSummoned->CastSpell(m_creature, SPELL_BURNING_SPIRIT, true); } - void UpdateAI(const uint32 diff) + void UpdateAI(const uint32 uiDiff) { //Return since we have no target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - //FireBlast_Timer - if (FireBlast_Timer < diff) + //m_uiSpiritTimer + if (m_uiSpiritTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_FIREBLAST); - FireBlast_Timer = 7000; - }else FireBlast_Timer -= diff; + SummonSpirits(); + SummonSpirits(); + SummonSpirits(); + SummonSpirits(); - //Spirit_Timer - if (Spirit_Timer < diff) - { - SummonSpirits(m_creature->getVictim()); - SummonSpirits(m_creature->getVictim()); - SummonSpirits(m_creature->getVictim()); - SummonSpirits(m_creature->getVictim()); - - Spirit_Timer = 30000; - }else Spirit_Timer -= diff; + m_uiSpiritTimer = 20000; + } + else + m_uiSpiritTimer -= uiDiff; DoMeleeAttackIfReady(); } }; + +bool EffectDummyCreature_spell_boss_ambassador_flamelash(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) +{ + if (uiSpellId == SPELL_BURNING_SPIRIT && uiEffIndex == EFFECT_INDEX_1) + { + pCreatureTarget->CastSpell(pCreatureTarget, SPELL_BURNING_SPIRIT_BUFF, true); + return true; + } + + return false; +} + CreatureAI* GetAI_boss_ambassador_flamelash(Creature* pCreature) { return new boss_ambassador_flamelashAI(pCreature); @@ -101,5 +117,6 @@ void AddSC_boss_ambassador_flamelash() pNewScript = new Script; pNewScript->Name = "boss_ambassador_flamelash"; pNewScript->GetAI = &GetAI_boss_ambassador_flamelash; + pNewScript->pEffectDummyNPC = &EffectDummyCreature_spell_boss_ambassador_flamelash; pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index d143142af..995b77c59 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2433" + #define SD2_REVISION_NR "2434" #endif // __SD2_REVISION_NR_H__ From 8b2e03d51fb0f4e91b555fda4179caddf2e12ddb Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Thu, 2 Feb 2012 01:14:44 +0100 Subject: [PATCH 0423/1172] [2435] Improve coding style for boss Anubshiah --- .../blackrock_depths/boss_anubshiah.cpp | 94 +++++++++++-------- sd2_revision_nr.h | 2 +- 2 files changed, 54 insertions(+), 42 deletions(-) diff --git a/scripts/eastern_kingdoms/blackrock_depths/boss_anubshiah.cpp b/scripts/eastern_kingdoms/blackrock_depths/boss_anubshiah.cpp index 90409335a..870d20f5c 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/boss_anubshiah.cpp +++ b/scripts/eastern_kingdoms/blackrock_depths/boss_anubshiah.cpp @@ -23,79 +23,91 @@ EndScriptData */ #include "precompiled.h" -#define SPELL_SHADOWBOLT 17228 -#define SPELL_CURSEOFTONGUES 15470 -#define SPELL_CURSEOFWEAKNESS 17227 -#define SPELL_DEMONARMOR 11735 -#define SPELL_ENVELOPINGWEB 15471 +enum +{ + SPELL_SHADOWBOLT = 17228, + SPELL_CURSEOFTONGUES = 15470, + SPELL_CURSEOFWEAKNESS = 17227, + SPELL_DEMONARMOR = 11735, + SPELL_ENVELOPINGWEB = 15471 +}; struct MANGOS_DLL_DECL boss_anubshiahAI : public ScriptedAI { - boss_anubshiahAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + boss_anubshiahAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } - uint32 ShadowBolt_Timer; - uint32 CurseOfTongues_Timer; - uint32 CurseOfWeakness_Timer; - uint32 DemonArmor_Timer; - uint32 EnvelopingWeb_Timer; + uint32 m_uiShadowBoltTimer; + uint32 m_uiCurseOfTonguesTimer; + uint32 m_uiCurseOfWeaknessTimer; + uint32 m_uiDemonArmorTimer; + uint32 m_uiEnvelopingWebTimer; void Reset() { - ShadowBolt_Timer = 7000; - CurseOfTongues_Timer = 24000; - CurseOfWeakness_Timer = 12000; - DemonArmor_Timer = 3000; - EnvelopingWeb_Timer = 16000; + m_uiShadowBoltTimer = 7000; + m_uiCurseOfTonguesTimer = 24000; + m_uiCurseOfWeaknessTimer = 12000; + m_uiDemonArmorTimer = 3000; + m_uiEnvelopingWebTimer = 16000; } - void UpdateAI(const uint32 diff) + void UpdateAI(const uint32 uiDiff) { //Return since we have no target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; //ShadowBolt_Timer - if (ShadowBolt_Timer < diff) + if (m_uiShadowBoltTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_SHADOWBOLT); - ShadowBolt_Timer = 7000; - }else ShadowBolt_Timer -= diff; + DoCastSpellIfCan(m_creature->getVictim(), SPELL_SHADOWBOLT); + m_uiShadowBoltTimer = 7000; + } + else + m_uiShadowBoltTimer -= uiDiff; //CurseOfTongues_Timer - if (CurseOfTongues_Timer < diff) + if (m_uiCurseOfTonguesTimer < uiDiff) { - Unit* target = NULL; - target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0); - if (target) DoCastSpellIfCan(target,SPELL_CURSEOFTONGUES); - CurseOfTongues_Timer = 18000; - }else CurseOfTongues_Timer -= diff; + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + DoCastSpellIfCan(pTarget, SPELL_CURSEOFTONGUES); + m_uiCurseOfTonguesTimer = 18000; + } + else + m_uiCurseOfTonguesTimer -= uiDiff; //CurseOfWeakness_Timer - if (CurseOfWeakness_Timer < diff) + if (m_uiCurseOfWeaknessTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_CURSEOFWEAKNESS); - CurseOfWeakness_Timer = 45000; - }else CurseOfWeakness_Timer -= diff; + DoCastSpellIfCan(m_creature->getVictim(), SPELL_CURSEOFWEAKNESS); + m_uiCurseOfWeaknessTimer = 45000; + } + else + m_uiCurseOfWeaknessTimer -= uiDiff; //DemonArmor_Timer - if (DemonArmor_Timer < diff) + if (m_uiDemonArmorTimer < uiDiff) { - DoCastSpellIfCan(m_creature,SPELL_DEMONARMOR); - DemonArmor_Timer = 300000; - }else DemonArmor_Timer -= diff; + DoCastSpellIfCan(m_creature, SPELL_DEMONARMOR); + m_uiDemonArmorTimer = 300000; + } + else + m_uiDemonArmorTimer -= uiDiff; //EnvelopingWeb_Timer - if (EnvelopingWeb_Timer < diff) + if (m_uiEnvelopingWebTimer < uiDiff) { - Unit* target = NULL; - target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0); - if (target) DoCastSpellIfCan(target,SPELL_ENVELOPINGWEB); - EnvelopingWeb_Timer = 12000; - }else EnvelopingWeb_Timer -= diff; + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + DoCastSpellIfCan(pTarget, SPELL_ENVELOPINGWEB); + m_uiEnvelopingWebTimer = 12000; + } + else + m_uiEnvelopingWebTimer -= uiDiff; DoMeleeAttackIfReady(); } }; + CreatureAI* GetAI_boss_anubshiah(Creature* pCreature) { return new boss_anubshiahAI(pCreature); diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 995b77c59..7291658a8 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2434" + #define SD2_REVISION_NR "2435" #endif // __SD2_REVISION_NR_H__ From ce268cc13ccbfdb16e27885e2a84c2cc0875d919 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Thu, 2 Feb 2012 01:26:42 +0100 Subject: [PATCH 0424/1172] [2436] Cleanup script for General Angerforge --- .../boss_general_angerforge.cpp | 144 ++++++++---------- sd2_revision_nr.h | 2 +- 2 files changed, 62 insertions(+), 84 deletions(-) diff --git a/scripts/eastern_kingdoms/blackrock_depths/boss_general_angerforge.cpp b/scripts/eastern_kingdoms/blackrock_depths/boss_general_angerforge.cpp index c1e1c4577..2c20c7120 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/boss_general_angerforge.cpp +++ b/scripts/eastern_kingdoms/blackrock_depths/boss_general_angerforge.cpp @@ -23,131 +23,109 @@ EndScriptData */ #include "precompiled.h" -#define SPELL_MIGHTYBLOW 14099 -#define SPELL_HAMSTRING 9080 -#define SPELL_CLEAVE 20691 +enum +{ + SPELL_MIGHTYBLOW = 14099, + SPELL_HAMSTRING = 9080, + SPELL_CLEAVE = 20691, + + NPC_ANVILRAGE_RESERVIST = 8901, + NPC_ANVILRAGE_MEDIC = 8894, +}; struct MANGOS_DLL_DECL boss_general_angerforgeAI : public ScriptedAI { - boss_general_angerforgeAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} - - uint32 MightyBlow_Timer; - uint32 HamString_Timer; - uint32 Cleave_Timer; - uint32 Adds_Timer; - bool Medics; - int Rand1; - int Rand1X; - int Rand1Y; - int Rand2; - int Rand2X; - int Rand2Y; - Creature* SummonedAdds; - Creature* SummonedMedics; + boss_general_angerforgeAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } + + uint32 m_uiMightyBlowTimer; + uint32 m_uiHamStringTimer; + uint32 m_uiCleaveTimer; + uint32 m_uiAddsTimer; + bool m_bSummonedMedics; void Reset() { - MightyBlow_Timer = 8000; - HamString_Timer = 12000; - Cleave_Timer = 16000; - Adds_Timer = 0; - Medics = false; + m_uiMightyBlowTimer = 8000; + m_uiHamStringTimer = 12000; + m_uiCleaveTimer = 16000; + m_uiAddsTimer = 0; + m_bSummonedMedics = false; } - void SummonAdds(Unit* victim) + void SummonAdd(uint32 uiEntry) { - Rand1 = rand()%15; - switch(urand(0, 1)) - { - case 0: Rand1X = 0 - Rand1; break; - case 1: Rand1X = 0 + Rand1; break; - } - Rand1 = 0; - Rand1 = rand()%15; - switch(urand(0, 1)) - { - case 0: Rand1Y = 0 - Rand1; break; - case 1: Rand1Y = 0 + Rand1; break; - } - Rand1 = 0; - SummonedAdds = DoSpawnCreature(8901, Rand1X, Rand1Y, 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 120000); - if (SummonedAdds) - SummonedAdds->AI()->AttackStart(victim); + float fX, fY, fZ; + m_creature->GetRandomPoint(m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), 20.0f, fX, fY, fZ); + m_creature->SummonCreature(uiEntry, fX, fY, fZ, 0.0f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 60000); } - void SummonMedics(Unit* victim) + void JustSummoned(Creature* pSummoned) { - Rand2 = rand()%10; - switch(urand(0, 1)) - { - case 0: Rand2X = 0 - Rand2; break; - case 1: Rand2X = 0 + Rand2; break; - } - Rand2 = 0; - Rand2 = rand()%10; - switch(urand(0, 1)) - { - case 0: Rand2Y = 0 - Rand2; break; - case 1: Rand2Y = 0 + Rand2; break; - } - Rand2 = 0; - SummonedMedics = DoSpawnCreature(8894, Rand2X, Rand2Y, 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 120000); - if (SummonedMedics) - SummonedMedics->AI()->AttackStart(victim); + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + pSummoned->AI()->AttackStart(pTarget); } - void UpdateAI(const uint32 diff) + void UpdateAI(const uint32 uiDiff) { //Return since we have no target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; //MightyBlow_Timer - if (MightyBlow_Timer < diff) + if (m_uiMightyBlowTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_MIGHTYBLOW); - MightyBlow_Timer = 18000; - }else MightyBlow_Timer -= diff; + DoCastSpellIfCan(m_creature->getVictim(), SPELL_MIGHTYBLOW); + m_uiMightyBlowTimer = 18000; + } + else + m_uiMightyBlowTimer -= uiDiff; //HamString_Timer - if (HamString_Timer < diff) + if (m_uiHamStringTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_HAMSTRING); - HamString_Timer = 15000; - }else HamString_Timer -= diff; + DoCastSpellIfCan(m_creature->getVictim(), SPELL_HAMSTRING); + m_uiHamStringTimer = 15000; + } + else + m_uiHamStringTimer -= uiDiff; //Cleave_Timer - if (Cleave_Timer < diff) + if (m_uiCleaveTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_CLEAVE); - Cleave_Timer = 9000; - }else Cleave_Timer -= diff; + DoCastSpellIfCan(m_creature->getVictim(), SPELL_CLEAVE); + m_uiCleaveTimer = 9000; + } + else + m_uiCleaveTimer -= uiDiff; //Adds_Timer if (m_creature->GetHealthPercent() < 21.0f) { - if (Adds_Timer < diff) + if (m_uiAddsTimer < uiDiff) { // summon 3 Adds every 25s - SummonAdds(m_creature->getVictim()); - SummonAdds(m_creature->getVictim()); - SummonAdds(m_creature->getVictim()); - - Adds_Timer = 25000; - } else Adds_Timer -= diff; + SummonAdd(NPC_ANVILRAGE_RESERVIST); + SummonAdd(NPC_ANVILRAGE_RESERVIST); + SummonAdd(NPC_ANVILRAGE_RESERVIST); + + m_uiAddsTimer = 25000; + } + else + m_uiAddsTimer -= uiDiff; } //Summon Medics - if (!Medics && m_creature->GetHealthPercent() < 21.0f) + if (!m_bSummonedMedics && m_creature->GetHealthPercent() < 21.0f) { - SummonMedics(m_creature->getVictim()); - SummonMedics(m_creature->getVictim()); - Medics = true; + SummonAdd(NPC_ANVILRAGE_MEDIC); + SummonAdd(NPC_ANVILRAGE_MEDIC); + m_bSummonedMedics = true; } DoMeleeAttackIfReady(); } }; + CreatureAI* GetAI_boss_general_angerforge(Creature* pCreature) { return new boss_general_angerforgeAI(pCreature); diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 7291658a8..4f9fe05a9 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2435" + #define SD2_REVISION_NR "2436" #endif // __SD2_REVISION_NR_H__ From 33ef662bbcee7a07f9e246ed8267e78947daac51 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Thu, 2 Feb 2012 01:29:41 +0100 Subject: [PATCH 0425/1172] [2437] Cleanup script for Gorosh the Dervish --- .../boss_gorosh_the_dervish.cpp | 38 +++++++++++-------- sd2_revision_nr.h | 2 +- 2 files changed, 24 insertions(+), 16 deletions(-) diff --git a/scripts/eastern_kingdoms/blackrock_depths/boss_gorosh_the_dervish.cpp b/scripts/eastern_kingdoms/blackrock_depths/boss_gorosh_the_dervish.cpp index 026e1211e..df22713fd 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/boss_gorosh_the_dervish.cpp +++ b/scripts/eastern_kingdoms/blackrock_depths/boss_gorosh_the_dervish.cpp @@ -23,45 +23,53 @@ EndScriptData */ #include "precompiled.h" -#define SPELL_WHIRLWIND 15589 -#define SPELL_MORTALSTRIKE 24573 +enum +{ + SPELL_WHIRLWIND = 15589, + SPELL_MORTALSTRIKE = 24573, +}; struct MANGOS_DLL_DECL boss_gorosh_the_dervishAI : public ScriptedAI { boss_gorosh_the_dervishAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} - uint32 WhirlWind_Timer; - uint32 MortalStrike_Timer; + uint32 m_uiWhirlWindTimer; + uint32 m_uiMortalStrikeTimer; void Reset() { - WhirlWind_Timer = 12000; - MortalStrike_Timer = 22000; + m_uiWhirlWindTimer = 12000; + m_uiMortalStrikeTimer = 22000; } - void UpdateAI(const uint32 diff) + void UpdateAI(const uint32 uiDiff) { //Return since we have no target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; //WhirlWind_Timer - if (WhirlWind_Timer < diff) + if (m_uiWhirlWindTimer < uiDiff) { - DoCastSpellIfCan(m_creature,SPELL_WHIRLWIND); - WhirlWind_Timer = 15000; - }else WhirlWind_Timer -= diff; + DoCastSpellIfCan(m_creature, SPELL_WHIRLWIND); + m_uiWhirlWindTimer = 15000; + } + else + m_uiWhirlWindTimer -= uiDiff; //MortalStrike_Timer - if (MortalStrike_Timer < diff) + if (m_uiMortalStrikeTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_MORTALSTRIKE); - MortalStrike_Timer = 15000; - }else MortalStrike_Timer -= diff; + DoCastSpellIfCan(m_creature->getVictim(), SPELL_MORTALSTRIKE); + m_uiMortalStrikeTimer = 15000; + } + else + m_uiMortalStrikeTimer -= uiDiff; DoMeleeAttackIfReady(); } }; + CreatureAI* GetAI_boss_gorosh_the_dervish(Creature* pCreature) { return new boss_gorosh_the_dervishAI(pCreature); diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 4f9fe05a9..5c15ee0aa 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2436" + #define SD2_REVISION_NR "2437" #endif // __SD2_REVISION_NR_H__ From b3ef479519f24400da81e60b4613d3703963882c Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Thu, 2 Feb 2012 01:32:34 +0100 Subject: [PATCH 0426/1172] [2438] Improve and cleanup script for Grizzle --- .../blackrock_depths/boss_grizzle.cpp | 40 +++++++++++-------- sd2_revision_nr.h | 2 +- 2 files changed, 25 insertions(+), 17 deletions(-) diff --git a/scripts/eastern_kingdoms/blackrock_depths/boss_grizzle.cpp b/scripts/eastern_kingdoms/blackrock_depths/boss_grizzle.cpp index 5b26a48c1..d89545bea 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/boss_grizzle.cpp +++ b/scripts/eastern_kingdoms/blackrock_depths/boss_grizzle.cpp @@ -23,53 +23,61 @@ EndScriptData */ #include "precompiled.h" -#define EMOTE_GENERIC_FRENZY_KILL -1000001 +enum +{ + EMOTE_GENERIC_FRENZY_KILL = -1000001, -#define SPELL_GROUNDTREMOR 6524 -#define SPELL_FRENZY 28371 + SPELL_GROUNDTREMOR = 6524, + SPELL_FRENZY = 28371, +}; struct MANGOS_DLL_DECL boss_grizzleAI : public ScriptedAI { - boss_grizzleAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + boss_grizzleAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } - uint32 GroundTremor_Timer; - uint32 Frenzy_Timer; + uint32 m_uiGroundTremorTimer; + uint32 m_uiFrenzyTimer; void Reset() { - GroundTremor_Timer = 12000; - Frenzy_Timer =0; + m_uiGroundTremorTimer = 12000; + m_uiFrenzyTimer = 0; } - void UpdateAI(const uint32 diff) + void UpdateAI(const uint32 uiDiff) { //Return since we have no target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; //GroundTremor_Timer - if (GroundTremor_Timer < diff) + if (m_uiGroundTremorTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_GROUNDTREMOR); - GroundTremor_Timer = 8000; - }else GroundTremor_Timer -= diff; + DoCastSpellIfCan(m_creature, SPELL_GROUNDTREMOR); + m_uiGroundTremorTimer = 8000; + } + else + m_uiGroundTremorTimer -= uiDiff; //Frenzy_Timer if (m_creature->GetHealthPercent() < 51.0f) { - if (Frenzy_Timer < diff) + if (m_uiFrenzyTimer < uiDiff) { if (DoCastSpellIfCan(m_creature, SPELL_FRENZY) == CAST_OK) { DoScriptText(EMOTE_GENERIC_FRENZY_KILL, m_creature); - Frenzy_Timer = 15000; + m_uiFrenzyTimer = 15000; } - }else Frenzy_Timer -= diff; + } + else + m_uiFrenzyTimer -= uiDiff; } DoMeleeAttackIfReady(); } }; + CreatureAI* GetAI_boss_grizzle(Creature* pCreature) { return new boss_grizzleAI(pCreature); diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 5c15ee0aa..434761dd2 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2437" + #define SD2_REVISION_NR "2438" #endif // __SD2_REVISION_NR_H__ From b4544273d9e17bd9e48305558ec34f8b5fec8940 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Thu, 2 Feb 2012 01:36:18 +0100 Subject: [PATCH 0427/1172] [2439] Improve and cleanup script for Interrogator Gerstahn --- .../boss_high_interrogator_gerstahn.cpp | 46 +++++++++---------- sd2_revision_nr.h | 2 +- 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/scripts/eastern_kingdoms/blackrock_depths/boss_high_interrogator_gerstahn.cpp b/scripts/eastern_kingdoms/blackrock_depths/boss_high_interrogator_gerstahn.cpp index 82139caa4..ca649875e 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/boss_high_interrogator_gerstahn.cpp +++ b/scripts/eastern_kingdoms/blackrock_depths/boss_high_interrogator_gerstahn.cpp @@ -35,17 +35,17 @@ struct MANGOS_DLL_DECL boss_high_interrogator_gerstahnAI : public ScriptedAI { boss_high_interrogator_gerstahnAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} - uint32 m_uiShadowWordPain_Timer; - uint32 m_uiManaBurn_Timer; - uint32 m_uiPsychicScream_Timer; - uint32 m_uiShadowShield_Timer; + uint32 m_uiShadowWordPainTimer; + uint32 m_uiManaBurnTimer; + uint32 m_uiPsychicScreamTimer; + uint32 m_uiShadowShieldTimer; void Reset() { - m_uiShadowWordPain_Timer = 4000; - m_uiManaBurn_Timer = 14000; - m_uiPsychicScream_Timer = 32000; - m_uiShadowShield_Timer = 8000; + m_uiShadowWordPainTimer = 4000; + m_uiManaBurnTimer = 14000; + m_uiPsychicScreamTimer = 32000; + m_uiShadowShieldTimer = 8000; } void UpdateAI(const uint32 uiDiff) @@ -55,44 +55,44 @@ struct MANGOS_DLL_DECL boss_high_interrogator_gerstahnAI : public ScriptedAI return; //ShadowWordPain_Timer - if (m_uiShadowWordPain_Timer < uiDiff) + if (m_uiShadowWordPainTimer < uiDiff) { - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) DoCastSpellIfCan(pTarget, SPELL_SHADOWWORDPAIN); - m_uiShadowWordPain_Timer = 7000; + m_uiShadowWordPainTimer = 7000; } else - m_uiShadowWordPain_Timer -= uiDiff; + m_uiShadowWordPainTimer -= uiDiff; //ManaBurn_Timer - if (m_uiManaBurn_Timer < uiDiff) + if (m_uiManaBurnTimer < uiDiff) { - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0, SPELL_MANABURN, SELECT_FLAG_POWER_MANA)) DoCastSpellIfCan(pTarget, SPELL_MANABURN); - m_uiManaBurn_Timer = 10000; + m_uiManaBurnTimer = 10000; } else - m_uiManaBurn_Timer -= uiDiff; + m_uiManaBurnTimer -= uiDiff; //PsychicScream_Timer - if (m_uiPsychicScream_Timer < uiDiff) + if (m_uiPsychicScreamTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_PSYCHICSCREAM); - m_uiPsychicScream_Timer = 30000; + DoCastSpellIfCan(m_creature, SPELL_PSYCHICSCREAM); + m_uiPsychicScreamTimer = 30000; } else - m_uiPsychicScream_Timer -= uiDiff; + m_uiPsychicScreamTimer -= uiDiff; //ShadowShield_Timer - if (m_uiShadowShield_Timer < uiDiff) + if (m_uiShadowShieldTimer < uiDiff) { DoCastSpellIfCan(m_creature, SPELL_SHADOWSHIELD); - m_uiShadowShield_Timer = 25000; + m_uiShadowShieldTimer = 25000; } else - m_uiShadowShield_Timer -= uiDiff; + m_uiShadowShieldTimer -= uiDiff; DoMeleeAttackIfReady(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 434761dd2..a04b6b040 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2438" + #define SD2_REVISION_NR "2439" #endif // __SD2_REVISION_NR_H__ From 31e2e645cb882822f3f3565bb7244fe12aab4f44 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Thu, 2 Feb 2012 01:38:12 +0100 Subject: [PATCH 0428/1172] [2440] Improve and cleanup script for Magmus --- .../blackrock_depths/boss_magmus.cpp | 24 +++++++++---------- sd2_revision_nr.h | 2 +- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/scripts/eastern_kingdoms/blackrock_depths/boss_magmus.cpp b/scripts/eastern_kingdoms/blackrock_depths/boss_magmus.cpp index 0a091c8d4..25dc1a2ca 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/boss_magmus.cpp +++ b/scripts/eastern_kingdoms/blackrock_depths/boss_magmus.cpp @@ -40,13 +40,13 @@ struct MANGOS_DLL_DECL boss_magmusAI : public ScriptedAI ScriptedInstance* m_pInstance; - uint32 m_uiFieryBurst_Timer; - uint32 m_uiWarStomp_Timer; + uint32 m_uiFieryBurstTimer; + uint32 m_uiWarStompTimer; void Reset() { - m_uiFieryBurst_Timer = 5000; - m_uiWarStomp_Timer = 0; + m_uiFieryBurstTimer = 5000; + m_uiWarStompTimer = 0; } void Aggro(Unit* pWho) @@ -74,24 +74,24 @@ struct MANGOS_DLL_DECL boss_magmusAI : public ScriptedAI return; //FieryBurst_Timer - if (m_uiFieryBurst_Timer < uiDiff) + if (m_uiFieryBurstTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_FIERYBURST); - m_uiFieryBurst_Timer = 6000; + DoCastSpellIfCan(m_creature->getVictim(), SPELL_FIERYBURST); + m_uiFieryBurstTimer = 6000; } else - m_uiFieryBurst_Timer -= uiDiff; + m_uiFieryBurstTimer -= uiDiff; //WarStomp_Timer if (m_creature->GetHealthPercent() < 51.0f) { - if (m_uiWarStomp_Timer < uiDiff) + if (m_uiWarStompTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_WARSTOMP); - m_uiWarStomp_Timer = 8000; + DoCastSpellIfCan(m_creature, SPELL_WARSTOMP); + m_uiWarStompTimer = 8000; } else - m_uiWarStomp_Timer -= uiDiff; + m_uiWarStompTimer -= uiDiff; } DoMeleeAttackIfReady(); diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index a04b6b040..bd507e35e 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2439" + #define SD2_REVISION_NR "2440" #endif // __SD2_REVISION_NR_H__ From 427fde3dc27dbf5f224b47f0902ebf07ad50fbf5 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Fri, 3 Feb 2012 01:00:35 +0200 Subject: [PATCH 0429/1172] [2441] Cleanup and improve Noxxion --- scripts/kalimdor/maraudon/boss_noxxion.cpp | 134 +++++++++------------ sd2_revision_nr.h | 2 +- 2 files changed, 55 insertions(+), 81 deletions(-) diff --git a/scripts/kalimdor/maraudon/boss_noxxion.cpp b/scripts/kalimdor/maraudon/boss_noxxion.cpp index 42e52fc3f..238744f14 100644 --- a/scripts/kalimdor/maraudon/boss_noxxion.cpp +++ b/scripts/kalimdor/maraudon/boss_noxxion.cpp @@ -23,118 +23,91 @@ EndScriptData */ #include "precompiled.h" -#define SPELL_TOXICVOLLEY 21687 -#define SPELL_UPPERCUT 22916 +enum +{ + SPELL_TOXICVOLLEY = 21687, + SPELL_UPPERCUT = 22916, + SPELL_NOXXION_SPAWNS_AURA = 21708, + SPELL_NOXXION_SPAWNS_SUMMON = 21707, +}; struct MANGOS_DLL_DECL boss_noxxionAI : public ScriptedAI { boss_noxxionAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} - uint32 ToxicVolley_Timer; - uint32 Uppercut_Timer; - uint32 Adds_Timer; - uint32 Invisible_Timer; - bool Invisible; - int Rand; - int RandX; - int RandY; - Creature* Summoned; + uint32 m_uiToxicVolleyTimer; + uint32 m_uiUppercutTimer; + uint32 m_uiSummonTimer; void Reset() { - ToxicVolley_Timer = 7000; - Uppercut_Timer = 16000; - Adds_Timer = 19000; - Invisible_Timer = 15000; //Too much too low? - Invisible = false; + m_uiToxicVolleyTimer = 7000; + m_uiUppercutTimer = 16000; + m_uiSummonTimer = 19000; } - void SummonAdds(Unit* victim) + void JustSummoned(Creature* pSummoned) { - Rand = rand()%8; - switch(urand(0, 1)) - { - case 0: RandX = 0 - Rand; break; - case 1: RandX = 0 + Rand; break; - } - Rand = 0; - Rand = rand()%8; - switch(urand(0, 1)) - { - case 0: RandY = 0 - Rand; break; - case 1: RandY = 0 + Rand; break; - } - Rand = 0; - Summoned = DoSpawnCreature(13456, RandX, RandY, 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 90000); - if (Summoned) - Summoned->AI()->AttackStart(victim); + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + pSummoned->AI()->AttackStart(pTarget); } void UpdateAI(const uint32 diff) { - if (Invisible && Invisible_Timer < diff) - { - //Become visible again - m_creature->setFaction(14); - m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - //Noxxion model - m_creature->SetDisplayId(11172); - Invisible = false; - //m_creature->m_canMove = true; - } else if (Invisible) - { - Invisible_Timer -= diff; - //Do nothing while invisible - return; - } - - //Return since we have no target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - //ToxicVolley_Timer - if (ToxicVolley_Timer < diff) + if (m_uiToxicVolleyTimer < diff) { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_TOXICVOLLEY); - ToxicVolley_Timer = 9000; - }else ToxicVolley_Timer -= diff; + if (DoCastSpellIfCan(m_creature, SPELL_TOXICVOLLEY) == CAST_OK) + m_uiToxicVolleyTimer = 9000; + } + else + m_uiToxicVolleyTimer -= diff; - //Uppercut_Timer - if (Uppercut_Timer < diff) + if (m_uiUppercutTimer < diff) { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_UPPERCUT); - Uppercut_Timer = 12000; - }else Uppercut_Timer -= diff; + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_UPPERCUT) == CAST_OK) + m_uiUppercutTimer = 12000; + } + else + m_uiUppercutTimer -= diff; - //Adds_Timer - if (!Invisible && Adds_Timer < diff) + if (m_uiSummonTimer < diff) { - //Inturrupt any spell casting - //m_creature->m_canMove = true; - m_creature->InterruptNonMeleeSpells(false); - m_creature->setFaction(35); - m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - // Invisible Model - m_creature->SetDisplayId(11686); - SummonAdds(m_creature->getVictim()); - SummonAdds(m_creature->getVictim()); - SummonAdds(m_creature->getVictim()); - SummonAdds(m_creature->getVictim()); - SummonAdds(m_creature->getVictim()); - Invisible = true; - Invisible_Timer = 15000; - - Adds_Timer = 40000; - }else Adds_Timer -= diff; + if (DoCastSpellIfCan(m_creature, SPELL_NOXXION_SPAWNS_AURA) == CAST_OK) + m_uiSummonTimer = 40000; + } + else + m_uiSummonTimer -= diff; DoMeleeAttackIfReady(); } }; + CreatureAI* GetAI_boss_noxxion(Creature* pCreature) { return new boss_noxxionAI(pCreature); } +bool EffectAuraDummy_spell_aura_dummy_noxxion_spawns(const Aura* pAura, bool bApply) +{ + if (pAura->GetId() == SPELL_NOXXION_SPAWNS_AURA && pAura->GetEffIndex() == EFFECT_INDEX_0) + { + if (Creature* pTarget = (Creature*)pAura->GetTarget()) + { + if (bApply) + { + pTarget->CastSpell(pTarget, SPELL_NOXXION_SPAWNS_SUMMON, true); + pTarget->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + } + else + pTarget->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + } + } + return true; +} + void AddSC_boss_noxxion() { Script* pNewScript; @@ -142,5 +115,6 @@ void AddSC_boss_noxxion() pNewScript = new Script; pNewScript->Name = "boss_noxxion"; pNewScript->GetAI = &GetAI_boss_noxxion; + pNewScript->pEffectAuraDummy = &EffectAuraDummy_spell_aura_dummy_noxxion_spawns; pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index bd507e35e..6f91c6858 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2440" + #define SD2_REVISION_NR "2441" #endif // __SD2_REVISION_NR_H__ From 995b7f94d62f508c0bdee3a895bf3f33f68e3a25 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Fri, 3 Feb 2012 01:18:07 +0200 Subject: [PATCH 0430/1172] [2442] Use the advanced target selection for Moam --- .../kalimdor/ruins_of_ahnqiraj/boss_moam.cpp | 67 +++++++------------ sd2_revision_nr.h | 2 +- 2 files changed, 26 insertions(+), 43 deletions(-) diff --git a/scripts/kalimdor/ruins_of_ahnqiraj/boss_moam.cpp b/scripts/kalimdor/ruins_of_ahnqiraj/boss_moam.cpp index 858b332b3..f97f6bee4 100644 --- a/scripts/kalimdor/ruins_of_ahnqiraj/boss_moam.cpp +++ b/scripts/kalimdor/ruins_of_ahnqiraj/boss_moam.cpp @@ -47,17 +47,17 @@ struct MANGOS_DLL_DECL boss_moamAI : public ScriptedAI uint8 m_uiPhase; - uint32 m_uiTrample_Timer; - uint32 m_uiManaDrain_Timer; - uint32 m_uiCheckoutMana_Timer; - uint32 m_uiSummonManaFiends_Timer; + uint32 m_uiTrampleTimer; + uint32 m_uiManaDrainTimer; + uint32 m_uiCheckoutManaTimer; + uint32 m_uiSummonManaFiendsTimer; void Reset() { - m_uiTrample_Timer = 9000; - m_uiManaDrain_Timer = 3000; - m_uiSummonManaFiends_Timer = 90000; - m_uiCheckoutMana_Timer = 1500; + m_uiTrampleTimer = 9000; + m_uiManaDrainTimer = 3000; + m_uiSummonManaFiendsTimer = 90000; + m_uiCheckoutManaTimer = 1500; m_uiPhase = PHASE_ATTACKING; m_creature->SetPower(POWER_MANA, 0); m_creature->SetMaxPower(POWER_MANA, 0); @@ -77,9 +77,9 @@ struct MANGOS_DLL_DECL boss_moamAI : public ScriptedAI switch(m_uiPhase) { case PHASE_ATTACKING: - if (m_uiCheckoutMana_Timer <= uiDiff) + if (m_uiCheckoutManaTimer <= uiDiff) { - m_uiCheckoutMana_Timer = 1500; + m_uiCheckoutManaTimer = 1500; if (m_creature->GetPower(POWER_MANA) * 100 / m_creature->GetMaxPower(POWER_MANA) > 75.0f) { DoCastSpellIfCan(m_creature, SPELL_ENERGIZE); @@ -89,60 +89,43 @@ struct MANGOS_DLL_DECL boss_moamAI : public ScriptedAI } } else - m_uiCheckoutMana_Timer -= uiDiff; + m_uiCheckoutManaTimer -= uiDiff; - if (m_uiSummonManaFiends_Timer <= uiDiff) + if (m_uiSummonManaFiendsTimer <= uiDiff) { DoCastSpellIfCan(m_creature->getVictim(), SPELL_SUMMON_MANAFIEND_1, CAST_TRIGGERED); DoCastSpellIfCan(m_creature->getVictim(), SPELL_SUMMON_MANAFIEND_2, CAST_TRIGGERED); DoCastSpellIfCan(m_creature->getVictim(), SPELL_SUMMON_MANAFIEND_3, CAST_TRIGGERED); - m_uiSummonManaFiends_Timer = 90000; + m_uiSummonManaFiendsTimer = 90000; } else - m_uiSummonManaFiends_Timer -= uiDiff; + m_uiSummonManaFiendsTimer -= uiDiff; - if (m_uiManaDrain_Timer <= uiDiff) + if (m_uiManaDrainTimer <= uiDiff) { - m_uiManaDrain_Timer = urand(2000, 6000); - // choose random target with mana - std::list lTargets; - ThreatList const& threatlist = m_creature->getThreatManager().getThreatList(); - if (threatlist.empty()) - return; - - for (ThreatList::const_iterator itr = threatlist.begin(); itr != threatlist.end(); ++itr) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0, SPELL_DRAIN_MANA, SELECT_FLAG_POWER_MANA)) { - Unit* pUnit = m_creature->GetMap()->GetUnit((*itr)->getUnitGuid()); - - if (pUnit && pUnit->isAlive() && pUnit->GetPower(POWER_MANA)) - lTargets.push_back(pUnit); + if (DoCastSpellIfCan(pTarget, SPELL_DRAIN_MANA) == CAST_OK) + m_uiManaDrainTimer = urand(2000, 6000); } - - if (lTargets.empty()) - return; - - std::list::iterator itr = lTargets.begin(); - std::advance(itr, urand(0, lTargets.size()-1)); - - DoCastSpellIfCan(*itr, SPELL_DRAIN_MANA); } else - m_uiManaDrain_Timer -= uiDiff; + m_uiManaDrainTimer -= uiDiff; - if (m_uiTrample_Timer <= uiDiff) + if (m_uiTrampleTimer <= uiDiff) { DoCastSpellIfCan(m_creature->getVictim(), SPELL_TRAMPLE); - m_uiTrample_Timer = 15000; + m_uiTrampleTimer = 15000; } else - m_uiTrample_Timer -= uiDiff; + m_uiTrampleTimer -= uiDiff; DoMeleeAttackIfReady(); break; case PHASE_ENERGIZING: - if (m_uiCheckoutMana_Timer <= uiDiff) + if (m_uiCheckoutManaTimer <= uiDiff) { - m_uiCheckoutMana_Timer = 1500; + m_uiCheckoutManaTimer = 1500; if (m_creature->GetPower(POWER_MANA) == m_creature->GetMaxPower(POWER_MANA)) { m_creature->RemoveAurasDueToSpell(SPELL_ENERGIZE); @@ -153,7 +136,7 @@ struct MANGOS_DLL_DECL boss_moamAI : public ScriptedAI } } else - m_uiCheckoutMana_Timer -= uiDiff; + m_uiCheckoutManaTimer -= uiDiff; break; } } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 6f91c6858..1a5991629 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2441" + #define SD2_REVISION_NR "2442" #endif // __SD2_REVISION_NR_H__ From f7ae9b51e50abaa6cf6c9963c9dcd50bdac4e77d Mon Sep 17 00:00:00 2001 From: Xfurry Date: Fri, 3 Feb 2012 02:23:56 +0200 Subject: [PATCH 0431/1172] [2443] Improve script for Kurinnaxx --- .../ruins_of_ahnqiraj/boss_kurinnaxx.cpp | 57 ++++++++++++++----- sd2_revision_nr.h | 2 +- 2 files changed, 43 insertions(+), 16 deletions(-) diff --git a/scripts/kalimdor/ruins_of_ahnqiraj/boss_kurinnaxx.cpp b/scripts/kalimdor/ruins_of_ahnqiraj/boss_kurinnaxx.cpp index 336deb1ce..7382b4d3e 100644 --- a/scripts/kalimdor/ruins_of_ahnqiraj/boss_kurinnaxx.cpp +++ b/scripts/kalimdor/ruins_of_ahnqiraj/boss_kurinnaxx.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: Boss_Kurinnaxx -SD%Complete: 100 -SDComment: VERIFY SCRIPT AND SQL +SD%Complete: 80 +SDComment: Summon Player ability NYI; Sand trap trigger NYI SDCategory: Ruins of Ahn'Qiraj EndScriptData */ @@ -25,11 +25,12 @@ EndScriptData */ enum { - SPELL_TRASH = 3391, - SPELL_WIDE_SLASH = 25814, - SPELL_MORTAL_WOUND = 25646, - SPELL_SANDTRAP = 25656, - SPELL_ENRAGE = 28798 + SPELL_TRASH = 3391, + SPELL_WIDE_SLASH = 25814, + SPELL_MORTAL_WOUND = 25646, + SPELL_SANDTRAP = 25648, // summons gameobject 180647 + SPELL_ENRAGE = 26527, + SPELL_SUMMON_PLAYER = 26446, }; struct MANGOS_DLL_DECL boss_kurinnaxxAI : public ScriptedAI @@ -38,14 +39,18 @@ struct MANGOS_DLL_DECL boss_kurinnaxxAI : public ScriptedAI uint32 m_uiMortalWoundTimer; uint32 m_uiSandTrapTimer; + uint32 m_uiTrashTimer; + uint32 m_uiWideSlashTimer; bool m_bEnraged; void Reset() { m_bEnraged = false; - m_uiMortalWoundTimer = 30000; - m_uiSandTrapTimer = 30000; + m_uiMortalWoundTimer = urand(8000, 10000); + m_uiSandTrapTimer = urand(5000, 10000); + m_uiTrashTimer = urand(1000, 5000); + m_uiWideSlashTimer = urand(10000, 15000); } void UpdateAI(const uint32 uiDiff) @@ -56,15 +61,15 @@ struct MANGOS_DLL_DECL boss_kurinnaxxAI : public ScriptedAI // If we are belowe 30% HP cast enrage if (!m_bEnraged && m_creature->GetHealthPercent() <= 30.0f) { - m_bEnraged = true; - DoCastSpellIfCan(m_creature->getVictim(), SPELL_ENRAGE); + if (DoCastSpellIfCan(m_creature, SPELL_ENRAGE) == CAST_OK) + m_bEnraged = true; } // Mortal Wound if (m_uiMortalWoundTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_MORTAL_WOUND); - m_uiMortalWoundTimer = 30000; + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_MORTAL_WOUND) == CAST_OK) + m_uiMortalWoundTimer = urand(8000, 10000); } else m_uiMortalWoundTimer -= uiDiff; @@ -72,12 +77,34 @@ struct MANGOS_DLL_DECL boss_kurinnaxxAI : public ScriptedAI // Sand Trap if (m_uiSandTrapTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_SANDTRAP); - m_uiSandTrapTimer = 30000; + Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1); + if (!pTarget) + pTarget = m_creature->getVictim(); + + pTarget->CastSpell(pTarget, SPELL_SANDTRAP, true, NULL, NULL, m_creature->GetObjectGuid()); + m_uiSandTrapTimer = urand(10000, 15000); } else m_uiSandTrapTimer -= uiDiff; + // Wide Slash + if (m_uiWideSlashTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_WIDE_SLASH) == CAST_OK) + m_uiWideSlashTimer = urand(12000, 15000); + } + else + m_uiWideSlashTimer -= uiDiff; + + // Trash + if (m_uiTrashTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_TRASH) == CAST_OK) + m_uiTrashTimer = urand(12000, 17000); + } + else + m_uiTrashTimer -= uiDiff; + DoMeleeAttackIfReady(); } }; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 1a5991629..064d40087 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2442" + #define SD2_REVISION_NR "2443" #endif // __SD2_REVISION_NR_H__ From 95250cd76130f6df8ff04547b695b8ddb8c3a1ea Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sat, 4 Feb 2012 01:58:45 +0200 Subject: [PATCH 0432/1172] [2444] Allow Kurinnaxx to trigger the Sand Traps after they are summoned --- .../ruins_of_ahnqiraj/boss_kurinnaxx.cpp | 32 +++++++++++++++++-- sd2_revision_nr.h | 2 +- 2 files changed, 31 insertions(+), 3 deletions(-) diff --git a/scripts/kalimdor/ruins_of_ahnqiraj/boss_kurinnaxx.cpp b/scripts/kalimdor/ruins_of_ahnqiraj/boss_kurinnaxx.cpp index 7382b4d3e..c3ed80cd6 100644 --- a/scripts/kalimdor/ruins_of_ahnqiraj/boss_kurinnaxx.cpp +++ b/scripts/kalimdor/ruins_of_ahnqiraj/boss_kurinnaxx.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: Boss_Kurinnaxx -SD%Complete: 80 -SDComment: Summon Player ability NYI; Sand trap trigger NYI +SD%Complete: 90 +SDComment: Summon Player ability NYI SDCategory: Ruins of Ahn'Qiraj EndScriptData */ @@ -31,6 +31,8 @@ enum SPELL_SANDTRAP = 25648, // summons gameobject 180647 SPELL_ENRAGE = 26527, SPELL_SUMMON_PLAYER = 26446, + + GO_SAND_TRAP = 180647, }; struct MANGOS_DLL_DECL boss_kurinnaxxAI : public ScriptedAI @@ -41,8 +43,11 @@ struct MANGOS_DLL_DECL boss_kurinnaxxAI : public ScriptedAI uint32 m_uiSandTrapTimer; uint32 m_uiTrashTimer; uint32 m_uiWideSlashTimer; + uint32 m_uiTrapTriggerTimer; bool m_bEnraged; + ObjectGuid m_sandtrapGuid; + void Reset() { m_bEnraged = false; @@ -51,6 +56,16 @@ struct MANGOS_DLL_DECL boss_kurinnaxxAI : public ScriptedAI m_uiSandTrapTimer = urand(5000, 10000); m_uiTrashTimer = urand(1000, 5000); m_uiWideSlashTimer = urand(10000, 15000); + m_uiTrapTriggerTimer = 0; + } + + void JustSummoned(GameObject* pGo) + { + if (pGo->GetEntry() == GO_SAND_TRAP) + { + m_uiTrapTriggerTimer = 3000; + m_sandtrapGuid = pGo->GetObjectGuid(); + } } void UpdateAI(const uint32 uiDiff) @@ -87,6 +102,19 @@ struct MANGOS_DLL_DECL boss_kurinnaxxAI : public ScriptedAI else m_uiSandTrapTimer -= uiDiff; + // Trigger the sand trap in 3 secs after spawn + if (m_uiTrapTriggerTimer) + { + if (m_uiTrapTriggerTimer <= uiDiff) + { + if (GameObject* pTrap = m_creature->GetMap()->GetGameObject(m_sandtrapGuid)) + pTrap->Use(m_creature); + m_uiTrapTriggerTimer = 0; + } + else + m_uiTrapTriggerTimer -= uiDiff; + } + // Wide Slash if (m_uiWideSlashTimer < uiDiff) { diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 064d40087..f18ed6e8b 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2443" + #define SD2_REVISION_NR "2444" #endif // __SD2_REVISION_NR_H__ From 5207a5678cb762b6e78b6a84e8f66b7e7f955a60 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sat, 4 Feb 2012 02:35:01 +0200 Subject: [PATCH 0433/1172] [2445] Improve script for Ayamiss Note: Timers and summon coords may need further adjustments --- .../ruins_of_ahnqiraj/boss_ayamiss.cpp | 258 ++++++++++++++++-- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 + sql/updates/r2445_mangos.sql | 1 + 4 files changed, 236 insertions(+), 26 deletions(-) create mode 100644 sql/updates/r2445_mangos.sql diff --git a/scripts/kalimdor/ruins_of_ahnqiraj/boss_ayamiss.cpp b/scripts/kalimdor/ruins_of_ahnqiraj/boss_ayamiss.cpp index 4cd4a19ba..939c36c68 100644 --- a/scripts/kalimdor/ruins_of_ahnqiraj/boss_ayamiss.cpp +++ b/scripts/kalimdor/ruins_of_ahnqiraj/boss_ayamiss.cpp @@ -16,27 +16,48 @@ /* ScriptData SDName: Boss_Ayamiss -SD%Complete: 50 -SDComment: VERIFY SCRIPT +SD%Complete: 80 +SDComment: Timers and summon coords need adjustments SDCategory: Ruins of Ahn'Qiraj EndScriptData */ #include "precompiled.h" - -/* -To do: -make him fly from 70-100% -*/ +#include "ruins_of_ahnqiraj.h" enum { - SPELL_STINGERSPRAY = 25749, - SPELL_POISONSTINGER = 25748, //only used in phase1 - SPELL_SUMMONSWARMER = 25844, //might be 25708 - //SPELL_PARALYZE 23414 doesnt work correct (core) + EMOTE_GENERIC_FRENZY = -1000002, + + SPELL_STINGER_SPRAY = 25749, + SPELL_POISON_STINGER = 25748, //only used in phase1 + //SPELL_SUMMON_SWARMER = 25844, //might be 25708 - spells were removed since 2.0.1 + SPELL_PARALYZE = 25725, + SPELL_LASH = 25852, + SPELL_FRENZY = 8269, + SPELL_TRASH = 3391, + + SPELL_FEED = 25721, // cast by the Larva when reaches the player on the altar + + NPC_LARVA = 15555, + NPC_SWARMER = 15546, + NPC_HORNET = 15934, + + PHASE_AIR = 0, + PHASE_GROUND = 1 +}; + +struct SummonLocation +{ + float m_fX, m_fY, m_fZ; +}; - PHASE_AIR = 0, - PHASE_GROUND = 1 +// Spawn locations +static const SummonLocation aAyamissSpawnLocs[] = +{ + {-9674.4707f, 1528.4133f, 22.457f}, // larva + {-9701.6005f, 1566.9993f, 24.118f}, // larva + {-9647.352f, 1578.062f, 55.32f}, // anchor point for swarmers + {-9717.18f, 1517.72f, 27.4677f}, // teleport location - need to be hardcoded because the player is teleported after the larva is summoned }; struct MANGOS_DLL_DECL boss_ayamissAI : public ScriptedAI @@ -46,15 +67,65 @@ struct MANGOS_DLL_DECL boss_ayamissAI : public ScriptedAI uint32 m_uiStingerSprayTimer; uint32 m_uiPoisonStingerTimer; uint32 m_uiSummonSwarmerTimer; + uint32 m_uiSwarmerAttackTimer; + uint32 m_uiParalyzeTimer; + uint32 m_uiLashTimer; + uint32 m_uiTrashTimer; uint8 m_uiPhase; + bool m_bHasFrenzy; + + ObjectGuid m_paralyzeTarget; + GUIDList m_lSwarmersGuidList; + void Reset() { - m_uiStingerSprayTimer = 30000; - m_uiPoisonStingerTimer = 30000; - m_uiSummonSwarmerTimer = 60000; + m_uiStingerSprayTimer = urand(20000, 30000); + m_uiPoisonStingerTimer = 5000; + m_uiSummonSwarmerTimer = 5000; + m_uiSwarmerAttackTimer = 60000; + m_uiParalyzeTimer = 15000; + m_uiLashTimer = urand(5000, 8000); + m_uiTrashTimer = urand(3000, 6000); + + m_bHasFrenzy = false; m_uiPhase = PHASE_AIR; + SetCombatMovement(false); + } + + void Aggro(Unit* pWho) + { + m_creature->SetLevitate(true); + m_creature->GetMotionMaster()->MovePoint(0, m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ() + 15.0f); + } + + void JustSummoned(Creature* pSummoned) + { + // store the swarmers for a future attack + if (pSummoned->GetEntry() == NPC_SWARMER) + m_lSwarmersGuidList.push_back(pSummoned->GetObjectGuid()); + // move the larva to paralyze target position + else if (pSummoned->GetEntry() == NPC_LARVA) + { + pSummoned->SetWalk(false); + pSummoned->GetMotionMaster()->MovePoint(1, aAyamissSpawnLocs[3].m_fX, aAyamissSpawnLocs[3].m_fY, aAyamissSpawnLocs[3].m_fZ); + } + else if (pSummoned->GetEntry() == NPC_HORNET) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + pSummoned->AI()->AttackStart(pTarget); + } + } + + void SummonedMovementInform(Creature* pSummoned, uint32 uiMotionType, uint32 uiPointId) + { + if (uiPointId != 1 || pSummoned->GetEntry() != NPC_LARVA) + return; + + // Cast feed on target + if (Unit* pTarget = m_creature->GetMap()->GetUnit(m_paralyzeTarget)) + pSummoned->CastSpell(pTarget, SPELL_FEED, true, NULL, NULL, m_creature->GetObjectGuid()); } void UpdateAI(const uint32 uiDiff) @@ -62,53 +133,185 @@ struct MANGOS_DLL_DECL boss_ayamissAI : public ScriptedAI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; + if (!m_bHasFrenzy && m_creature->GetHealthPercent() < 20.0f) + { + if (DoCastSpellIfCan(m_creature, SPELL_FRENZY) == CAST_OK) + { + DoScriptText(EMOTE_GENERIC_FRENZY, m_creature); + m_bHasFrenzy = true; + } + } + // Stinger Spray if (m_uiStingerSprayTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_STINGERSPRAY); - m_uiStingerSprayTimer = 30000; + if (DoCastSpellIfCan(m_creature, SPELL_STINGER_SPRAY) == CAST_OK) + m_uiStingerSprayTimer = urand(15000, 20000); } else m_uiStingerSprayTimer -= uiDiff; + // Paralyze + if (m_uiParalyzeTimer < uiDiff) + { + Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1, SPELL_PARALYZE, SELECT_FLAG_PLAYER); + if (!pTarget) + pTarget = m_creature->getVictim(); + + if (DoCastSpellIfCan(pTarget, SPELL_PARALYZE) == CAST_OK) + { + m_paralyzeTarget = pTarget->GetObjectGuid(); + m_uiParalyzeTimer = 15000; + + // Summon a larva + uint8 uiLoc = urand(0, 1); + m_creature->SummonCreature(NPC_LARVA, aAyamissSpawnLocs[uiLoc].m_fX, aAyamissSpawnLocs[uiLoc].m_fY, aAyamissSpawnLocs[uiLoc].m_fZ, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 30000); + } + } + else + m_uiParalyzeTimer -= uiDiff; + + // Summon Swarmer + if (m_uiSummonSwarmerTimer < uiDiff) + { + // The spell which summons these guys was removed in 2.0.1 -> therefore we need to summon them manually at a random location around the area + // The summon locations is guesswork - the real location is supposed to be handled by world triggers + // There should be about 24 swarmers per min + float fX, fY, fZ; + for (uint8 i = 0; i < 2; ++i) + { + m_creature->GetRandomPoint(aAyamissSpawnLocs[2].m_fX, aAyamissSpawnLocs[2].m_fY, aAyamissSpawnLocs[2].m_fZ, 80.0f, fX, fY, fZ); + m_creature->SummonCreature(NPC_SWARMER, fX, fY, aAyamissSpawnLocs[2].m_fZ, 0.0f, TEMPSUMMON_CORPSE_DESPAWN, 0); + } + m_uiSummonSwarmerTimer = 5000; + } + else + m_uiSummonSwarmerTimer -= uiDiff; + + // All the swarmers attack at a certain period of time + if (m_uiSwarmerAttackTimer < uiDiff) + { + for (GUIDList::const_iterator itr = m_lSwarmersGuidList.begin(); itr != m_lSwarmersGuidList.end(); ++itr) + { + if (Creature* pTemp = m_creature->GetMap()->GetCreature(*itr)) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + pTemp->AI()->AttackStart(pTarget); + } + } + m_lSwarmersGuidList.clear(); + m_uiSwarmerAttackTimer = 60000; + } + else + m_uiSwarmerAttackTimer -= uiDiff; + if (m_uiPhase == PHASE_AIR) { // Start ground phase at 70% of HP if (m_creature->GetHealthPercent() <= 70.0f) { m_uiPhase = PHASE_GROUND; + SetCombatMovement(true); + m_creature->SetLevitate(false); DoResetThreat(); + + if (m_creature->getVictim()) + m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); } // Poison Stinger if (m_uiPoisonStingerTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_POISONSTINGER); - m_uiPoisonStingerTimer = 30000; + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_POISON_STINGER) == CAST_OK) + m_uiPoisonStingerTimer = urand(2000, 3000); } else m_uiPoisonStingerTimer -= uiDiff; } else { - //m_uiSummonSwarmerTimer - if (m_uiSummonSwarmerTimer < uiDiff) + if (m_uiLashTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_LASH) == CAST_OK) + m_uiLashTimer = urand(8000, 15000); + } + else + m_uiLashTimer -= uiDiff; + + if (m_uiTrashTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_SUMMONSWARMER); - m_uiSummonSwarmerTimer = 60000; + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_TRASH) == CAST_OK) + m_uiTrashTimer = urand(5000, 7000); } else - m_uiSummonSwarmerTimer -= uiDiff; + m_uiTrashTimer -= uiDiff; DoMeleeAttackIfReady(); } } }; + CreatureAI* GetAI_boss_ayamiss(Creature* pCreature) { return new boss_ayamissAI(pCreature); } +struct MANGOS_DLL_DECL npc_hive_zara_larvaAI : public ScriptedAI +{ + npc_hive_zara_larvaAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (instance_ruins_of_ahnqiraj*)m_creature->GetInstanceData(); + Reset(); + } + + instance_ruins_of_ahnqiraj* m_pInstance; + + void Reset() { } + + void AttackStart(Unit* pWho) + { + // don't attack anything during the Ayamiss encounter + if (m_pInstance) + { + if (m_pInstance->GetData(TYPE_AYAMISS) == IN_PROGRESS) + return; + } + + ScriptedAI::AttackStart(pWho); + } + + void MoveInLineOfSight(Unit* pWho) + { + // don't attack anything during the Ayamiss encounter + if (m_pInstance) + { + if (m_pInstance->GetData(TYPE_AYAMISS) == IN_PROGRESS) + return; + } + + ScriptedAI::MoveInLineOfSight(pWho); + } + + void UpdateAI(const uint32 uiDiff) + { + if (m_pInstance) + { + if (m_pInstance->GetData(TYPE_AYAMISS) == IN_PROGRESS) + return; + } + + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_npc_hive_zara_larva(Creature* pCreature) +{ + return new npc_hive_zara_larvaAI(pCreature); +} + void AddSC_boss_ayamiss() { Script* pNewScript; @@ -117,4 +320,9 @@ void AddSC_boss_ayamiss() pNewScript->Name = "boss_ayamiss"; pNewScript->GetAI = &GetAI_boss_ayamiss; pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_hive_zara_larva"; + pNewScript->GetAI = &GetAI_npc_hive_zara_larva; + pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index f18ed6e8b..89d339fe2 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2444" + #define SD2_REVISION_NR "2445" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 58a091a4e..38e4da452 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -908,6 +908,7 @@ UPDATE creature_template SET ScriptName='boss_ayamiss' WHERE entry=15369; UPDATE creature_template SET ScriptName='boss_moam' WHERE entry=15340; UPDATE creature_template SET ScriptName='boss_ossirian' WHERE entry=15339; UPDATE gameobject_template SET ScriptName='go_ossirian_crystal' WHERE entry=180619; +UPDATE creature_template SET ScriptName='npc_hive_zara_larva' WHERE entry=15555; /* SCARLET MONASTERY */ UPDATE instance_template SET ScriptName='instance_scarlet_monastery' WHERE map=189; diff --git a/sql/updates/r2445_mangos.sql b/sql/updates/r2445_mangos.sql new file mode 100644 index 000000000..bc9bd2f1a --- /dev/null +++ b/sql/updates/r2445_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_hive_zara_larva' WHERE entry=15555; From f023194c0feb569613cad63e1c912e3eb499da5b Mon Sep 17 00:00:00 2001 From: Alexluana Date: Sat, 4 Feb 2012 12:05:27 +0200 Subject: [PATCH 0434/1172] [2446] Implement encounter script for Buru the Gorger Based on the work of Nitka Notes: Egg explosion and hatch eggs on transform require further research Fixate target for phase 1 requires core support Signed-off-by: Xfurry --- .../kalimdor/ruins_of_ahnqiraj/boss_buru.cpp | 225 +++++++++++++++++- .../instance_ruins_of_ahnqiraj.cpp | 1 + sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 2 + sql/updates/r2446_mangos.sql | 2 + system/ScriptLoader.cpp | 2 + 6 files changed, 230 insertions(+), 4 deletions(-) create mode 100644 sql/updates/r2446_mangos.sql diff --git a/scripts/kalimdor/ruins_of_ahnqiraj/boss_buru.cpp b/scripts/kalimdor/ruins_of_ahnqiraj/boss_buru.cpp index 5e8f5ce3d..8118174c9 100644 --- a/scripts/kalimdor/ruins_of_ahnqiraj/boss_buru.cpp +++ b/scripts/kalimdor/ruins_of_ahnqiraj/boss_buru.cpp @@ -16,11 +16,230 @@ /* ScriptData SDName: Boss_Buru -SD%Complete: 0 -SDComment: Place Holder +SD%Complete: 50 +SDComment: Timers; Fixate for phase I target NYI; Kill eggs on transform NYI; Egg explode damage and Buru stun are missing SDCategory: Ruins of Ahn'Qiraj EndScriptData */ #include "precompiled.h" +#include "ruins_of_ahnqiraj.h" -#define EMOTE_TARGET -1509002 +enum +{ + EMOTE_TARGET = -1509002, + + // boss spells + SPELL_CREEPING_PLAGUE = 20512, + SPELL_DISMEMBER = 96, + SPELL_GATHERING_SPEED = 1834, + SPELL_FULL_SPEED = 1557, + SPELL_THORNS = 25640, + SPELL_BURU_TRANSFORM = 24721, + + // egg spells + SPELL_SUMMON_HATCHLING = 1881, + SPELL_EXPLODE = 19593, + SPELL_BURU_EGG_TRIGGER = 26646, + + // npcs + NPC_BURU_EGG_TRIGGER = 15964, + NPC_BURU_EGG = 15514, + NPC_HATCHLING = 15521, + + PHASE_EGG = 1, + PHASE_TRANSFORM = 2, +}; + +struct MANGOS_DLL_DECL boss_buruAI : public ScriptedAI +{ + boss_buruAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } + + uint8 m_uiPhase; + uint32 m_uiDismemberTimer; + uint32 m_uiCreepingPlagueTimer; + uint32 m_uiGatheringSpeedTimer; + uint32 m_uiFullSpeedTimer; + + void Reset() + { + m_uiDismemberTimer = 5000; + m_uiGatheringSpeedTimer = 9000; + m_uiCreepingPlagueTimer = 0; + m_uiFullSpeedTimer = 60000; + m_uiPhase = PHASE_EGG; + } + + void Aggro(Unit* pWho) + { + DoScriptText(EMOTE_TARGET, m_creature, pWho); + DoCastSpellIfCan(m_creature, SPELL_THORNS); + } + + void KilledUnit(Unit* pVictim) + { + // Attack a new random target when a player is killed + if (pVictim->GetTypeId() == TYPEID_PLAYER) + DoAttackNewTarget(); + } + + // Wrapper to attack a new target and remove the speed gathering buff + void DoAttackNewTarget() + { + if (m_uiPhase == PHASE_TRANSFORM) + return; + + m_creature->RemoveAurasDueToSpell(SPELL_FULL_SPEED); + m_creature->RemoveAurasDueToSpell(SPELL_GATHERING_SPEED); + + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0, uint32(0), SELECT_FLAG_PLAYER)) + { + DoResetThreat(); + m_creature->AI()->AttackStart(pTarget); + DoScriptText(EMOTE_TARGET, m_creature, pTarget); + } + + m_uiFullSpeedTimer = 60000; + m_uiGatheringSpeedTimer = 9000; + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + switch (m_uiPhase) + { + case PHASE_EGG: + + if (m_uiDismemberTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_DISMEMBER) == CAST_OK) + m_uiDismemberTimer = 5000; + } + else + m_uiDismemberTimer -= uiDiff; + + if (m_uiFullSpeedTimer) + { + if (m_uiGatheringSpeedTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_GATHERING_SPEED) == CAST_OK) + m_uiGatheringSpeedTimer = 9000; + } + else + m_uiGatheringSpeedTimer -= uiDiff; + + if (m_uiFullSpeedTimer <= uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_FULL_SPEED) == CAST_OK) + m_uiFullSpeedTimer = 0; + } + else + m_uiFullSpeedTimer -= uiDiff; + } + + if (m_creature->GetHealthPercent() < 20.0f) + { + if (DoCastSpellIfCan(m_creature, SPELL_BURU_TRANSFORM) == CAST_OK) + { + // Not sure of this but the boss should gain full speed in phase II + DoCastSpellIfCan(m_creature, SPELL_FULL_SPEED, CAST_TRIGGERED); + m_creature->RemoveAurasDueToSpell(SPELL_THORNS); + m_uiPhase = PHASE_TRANSFORM; + } + } + + break; + case PHASE_TRANSFORM: + + if (m_uiCreepingPlagueTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_CREEPING_PLAGUE) == CAST_OK) + m_uiCreepingPlagueTimer = 6000; + } + else + m_uiCreepingPlagueTimer -= uiDiff; + + break; + } + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_buru(Creature* pCreature) +{ + return new boss_buruAI(pCreature); +} + +struct MANGOS_DLL_DECL npc_buru_eggAI : public Scripted_NoMovementAI +{ + npc_buru_eggAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; + + void Reset() + { } + + void JustSummoned(Creature* pSummoned) + { + // The purpose of this is unk for the moment + if (pSummoned->GetEntry() == NPC_BURU_EGG_TRIGGER) + pSummoned->CastSpell(pSummoned, SPELL_BURU_EGG_TRIGGER, true); + // The Hatchling should attack a random target + else if (pSummoned->GetEntry() == NPC_HATCHLING) + { + if (m_pInstance) + { + if (Creature* pBuru = m_pInstance->GetSingleCreatureFromStorage(NPC_BURU)) + { + if (Unit* pTarget = pBuru->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + pSummoned->AI()->AttackStart(pTarget); + } + } + } + } + + void JustDied(Unit* pKiller) + { + // Explode and Summon hatchling + DoCastSpellIfCan(m_creature, SPELL_EXPLODE, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_SUMMON_HATCHLING, CAST_TRIGGERED, m_creature->GetObjectGuid()); + + // Reset Buru's target - this might have been done by spell, but currently this is unk to us + if (m_pInstance) + { + if (Creature* pBuru = m_pInstance->GetSingleCreatureFromStorage(NPC_BURU)) + { + if (boss_buruAI* pBuruAI = dynamic_cast(pBuru->AI())) + pBuruAI->DoAttackNewTarget(); + } + } + } + + void UpdateAI(const uint32 uiDiff) { } +}; + +CreatureAI* GetAI_npc_buru_egg(Creature* pCreature) +{ + return new npc_buru_eggAI(pCreature); +} + +void AddSC_boss_buru() +{ + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_buru"; + pNewScript->GetAI = &GetAI_boss_buru; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_buru_egg"; + pNewScript->GetAI = &GetAI_npc_buru_egg; + pNewScript->RegisterSelf(); +} diff --git a/scripts/kalimdor/ruins_of_ahnqiraj/instance_ruins_of_ahnqiraj.cpp b/scripts/kalimdor/ruins_of_ahnqiraj/instance_ruins_of_ahnqiraj.cpp index 6ff42daf2..728f567c4 100644 --- a/scripts/kalimdor/ruins_of_ahnqiraj/instance_ruins_of_ahnqiraj.cpp +++ b/scripts/kalimdor/ruins_of_ahnqiraj/instance_ruins_of_ahnqiraj.cpp @@ -46,6 +46,7 @@ void instance_ruins_of_ahnqiraj::OnCreatureCreate(Creature* pCreature) { case NPC_OSSIRIAN_TRIGGER: // Only store static spawned (if this can be checked, else use a bool) + case NPC_BURU: case NPC_OSSIRIAN: case NPC_GENERAL_ANDOROV: m_mNpcEntryGuidStore[pCreature->GetEntry()] = pCreature->GetObjectGuid(); diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 89d339fe2..20c489850 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2445" + #define SD2_REVISION_NR "2446" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 38e4da452..0f0bb14de 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -909,6 +909,8 @@ UPDATE creature_template SET ScriptName='boss_moam' WHERE entry=15340; UPDATE creature_template SET ScriptName='boss_ossirian' WHERE entry=15339; UPDATE gameobject_template SET ScriptName='go_ossirian_crystal' WHERE entry=180619; UPDATE creature_template SET ScriptName='npc_hive_zara_larva' WHERE entry=15555; +UPDATE creature_template SET ScriptName='boss_buru' WHERE entry=15370; +UPDATE creature_template SET ScriptName='npc_buru_egg' WHERE entry=15514; /* SCARLET MONASTERY */ UPDATE instance_template SET ScriptName='instance_scarlet_monastery' WHERE map=189; diff --git a/sql/updates/r2446_mangos.sql b/sql/updates/r2446_mangos.sql new file mode 100644 index 000000000..6eb930eec --- /dev/null +++ b/sql/updates/r2446_mangos.sql @@ -0,0 +1,2 @@ +UPDATE creature_template SET ScriptName='boss_buru' WHERE entry=15370; +UPDATE creature_template SET ScriptName='npc_buru_egg' WHERE entry=15514; diff --git a/system/ScriptLoader.cpp b/system/ScriptLoader.cpp index 4ea6003d4..6fefb7c13 100644 --- a/system/ScriptLoader.cpp +++ b/system/ScriptLoader.cpp @@ -227,6 +227,7 @@ extern void AddSC_razorfen_downs(); extern void AddSC_instance_razorfen_kraul(); // razorfen_kraul extern void AddSC_razorfen_kraul(); extern void AddSC_boss_ayamiss(); // ruins_of_ahnqiraj +extern void AddSC_boss_buru(); extern void AddSC_boss_kurinnaxx(); extern void AddSC_boss_ossirian(); extern void AddSC_boss_moam(); @@ -722,6 +723,7 @@ void AddScripts() AddSC_instance_razorfen_kraul(); // razorfen_kraul AddSC_razorfen_kraul(); AddSC_boss_ayamiss(); // ruins_of_ahnqiraj + AddSC_boss_buru(); AddSC_boss_kurinnaxx(); AddSC_boss_ossirian(); AddSC_boss_moam(); From b93ccbfbefcad91dd3c67073beeb5903a9fcd124 Mon Sep 17 00:00:00 2001 From: Chero Date: Sat, 4 Feb 2012 20:35:48 +0200 Subject: [PATCH 0435/1172] [2447] Implement support for quest 6132 Signed-off-by: Xfurry --- scripts/kalimdor/desolace.cpp | 188 ++++++++++++++++++++++++++++++- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 + sql/scriptdev2_script_full.sql | 35 +++++- sql/updates/r2447_mangos.sql | 1 + sql/updates/r2447_scriptdev2.sql | 34 ++++++ 6 files changed, 258 insertions(+), 3 deletions(-) create mode 100644 sql/updates/r2447_mangos.sql create mode 100644 sql/updates/r2447_scriptdev2.sql diff --git a/scripts/kalimdor/desolace.cpp b/scripts/kalimdor/desolace.cpp index e151a0a67..f7d0f77d4 100644 --- a/scripts/kalimdor/desolace.cpp +++ b/scripts/kalimdor/desolace.cpp @@ -17,13 +17,14 @@ /* ScriptData SDName: Desolace SD%Complete: 100 -SDComment: Quest support: 5561, 1440 +SDComment: Quest support: 1440, 5561, 6132 SDCategory: Desolace EndScriptData */ /* ContentData npc_aged_dying_ancient_kodo npc_dalinda_malem +npc_melizza_brimbuzzle EndContentData */ #include "precompiled.h" @@ -216,6 +217,185 @@ bool QuestAccept_npc_dalinda_malem(Player* pPlayer, Creature* pCreature, const Q return true; } +/*###### +## npc_melizza_brimbuzzle +######*/ + +enum +{ + QUEST_GET_ME_OUT_OF_HERE = 6132, + + GO_MELIZZAS_CAGE = 177706, + + SAY_MELIZZA_START = -1000784, + SAY_MELIZZA_FINISH = -1000785, + SAY_MELIZZA_1 = -1000786, + SAY_MELIZZA_2 = -1000787, + SAY_MELIZZA_3 = -1000788, + + NPC_MARAUDINE_MARAUDER = 4659, + NPC_MARAUDINE_BONEPAW = 4660, + NPC_MARAUDINE_WRANGLER = 4655, + + NPC_MELIZZA = 12277, + + POINT_ID_QUEST_COMPLETE = 1, + POINT_ID_EVENT_COMPLETE = 2, + + MAX_MARAUDERS = 2, + MAX_WRANGLERS = 3, +}; + +static const DialogueEntry aIntroDialogue[] = +{ + {POINT_ID_QUEST_COMPLETE, 0, 1000}, + {QUEST_GET_ME_OUT_OF_HERE, NPC_MELIZZA, 0}, + {POINT_ID_EVENT_COMPLETE, 0, 2000}, + {SAY_MELIZZA_1, NPC_MELIZZA, 4000}, + {SAY_MELIZZA_2, NPC_MELIZZA, 5000}, + {SAY_MELIZZA_3, NPC_MELIZZA, 4000}, + {NPC_MELIZZA, 0, 0}, + {0, 0, 0}, +}; + +struct SummonLocation +{ + float m_fX, m_fY, m_fZ; +}; + +static const SummonLocation aMarauderSpawn[] = +{ + {-1291.492f, 2644.650f, 111.556f}, + {-1306.730f, 2675.163f, 111.561f}, +}; + +static const SummonLocation aWranglerSpawn[] = {-1393.194f, 2429.465f, 88.689f}; + +struct MANGOS_DLL_DECL npc_melizza_brimbuzzleAI : public npc_escortAI, private DialogueHelper +{ + npc_melizza_brimbuzzleAI(Creature* m_creature) : npc_escortAI(m_creature), + DialogueHelper(aIntroDialogue) + { + m_uiNormalFaction = m_creature->getFaction(); + Reset(); + } + + uint32 m_uiNormalFaction; + + void Reset() {} + + void JustStartedEscort() + { + if (GameObject* pCage = GetClosestGameObjectWithEntry(m_creature, GO_MELIZZAS_CAGE, INTERACTION_DISTANCE)) + pCage->UseDoorOrButton(); + } + + Creature* GetSpeakerByEntry(uint32 uiEntry) + { + if (uiEntry == NPC_MELIZZA) + return m_creature; + + return NULL; + } + + void WaypointReached(uint32 uiPointId) + { + switch(uiPointId) + { + case 1: + if (Player* pPlayer = GetPlayerForEscort()) + DoScriptText(SAY_MELIZZA_START, m_creature, pPlayer); + + m_creature->setFaction(FACTION_ESCORT_N_NEUTRAL_PASSIVE); + break; + case 4: + for (uint8 i = 0; i < MAX_MARAUDERS; ++i) + { + for (uint8 j = 0; j < MAX_MARAUDERS; ++j) + { + // Summon 2 Marauders on each point + float fX, fY, fZ; + m_creature->GetRandomPoint(aMarauderSpawn[i].m_fX, aMarauderSpawn[i].m_fY, aMarauderSpawn[i].m_fZ, 7.0f, fX, fY, fZ); + m_creature->SummonCreature(NPC_MARAUDINE_MARAUDER, fX, fY, fZ, 0.0f, TEMPSUMMON_DEAD_DESPAWN, 0); + } + } + break; + case 9: + for (uint8 i = 0; i < MAX_WRANGLERS; ++i) + { + float fX, fY, fZ; + m_creature->GetRandomPoint(aWranglerSpawn[0].m_fX, aWranglerSpawn[0].m_fY, aWranglerSpawn[0].m_fZ, 10.0f, fX, fY, fZ); + m_creature->SummonCreature(NPC_MARAUDINE_BONEPAW, fX, fY, fZ, 0.0f, TEMPSUMMON_DEAD_DESPAWN, 0); + + m_creature->GetRandomPoint(aWranglerSpawn[0].m_fX, aWranglerSpawn[0].m_fY, aWranglerSpawn[0].m_fZ, 10.0f, fX, fY, fZ); + m_creature->SummonCreature(NPC_MARAUDINE_WRANGLER, fX, fY, fZ, 0.0f, TEMPSUMMON_DEAD_DESPAWN, 0); + } + break; + case 12: + StartNextDialogueText(POINT_ID_QUEST_COMPLETE); + break; + case 19: + StartNextDialogueText(POINT_ID_EVENT_COMPLETE); + break; + } + + } + + void JustDidDialogueStep(int32 iEntry) + { + switch (iEntry) + { + case POINT_ID_QUEST_COMPLETE: + SetEscortPaused(true); + break; + case QUEST_GET_ME_OUT_OF_HERE: + if (Player* pPlayer = GetPlayerForEscort()) + { + DoScriptText(SAY_MELIZZA_FINISH, m_creature, pPlayer); + pPlayer->GroupEventHappens(QUEST_GET_ME_OUT_OF_HERE, m_creature); + } + + m_creature->setFaction(m_uiNormalFaction); + SetRun(true); + SetEscortPaused(false); + break; + case POINT_ID_EVENT_COMPLETE: + SetEscortPaused(true); + m_creature->SetFacingTo(4.71f); + break; + case NPC_MELIZZA: + SetEscortPaused(false); + break; + } + } + + void UpdateEscortAI(const uint32 uiDiff) + { + DialogueUpdate(uiDiff); + + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_npc_melizza_brimbuzzle(Creature* pCreature) +{ + return new npc_melizza_brimbuzzleAI(pCreature); +} + +bool QuestAccept_npc_melizza_brimbuzzle(Player* pPlayer, Creature* pCreature, const Quest* pQuest) +{ + if (pQuest->GetQuestId() == QUEST_GET_ME_OUT_OF_HERE) + { + if (npc_melizza_brimbuzzleAI* pEscortAI = dynamic_cast(pCreature->AI())) + pEscortAI->Start(false, pPlayer, pQuest); + } + + return true; +} + void AddSC_desolace() { Script* pNewScript; @@ -232,4 +412,10 @@ void AddSC_desolace() pNewScript->GetAI = &GetAI_npc_dalinda_malem; pNewScript->pQuestAcceptNPC = &QuestAccept_npc_dalinda_malem; pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_melizza_brimbuzzle"; + pNewScript->GetAI = &GetAI_npc_melizza_brimbuzzle; + pNewScript->pQuestAcceptNPC = &QuestAccept_npc_melizza_brimbuzzle; + pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 20c489850..be9d775d5 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2446" + #define SD2_REVISION_NR "2447" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 0f0bb14de..9bb09f609 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -504,6 +504,7 @@ UPDATE gameobject_template SET ScriptName='go_defias_cannon' WHERE entry=16398; /* DESOLACE */ UPDATE creature_template SET ScriptName='npc_aged_dying_ancient_kodo' WHERE entry IN (4700, 4701, 4702, 11627); UPDATE creature_template SET ScriptName='npc_dalinda_malem' WHERE entry=5644; +UPDATE creature_template SET ScriptName='npc_melizza_brimbuzzle' WHERE entry=12277; /* DIRE MAUL */ UPDATE instance_template SET ScriptName='instance_dire_maul' WHERE map=429; diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index cbdbc7342..b95635006 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -839,7 +839,13 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1000781,'I knew Lurielle would send help! Thank you, friend, and give Lurielle my thanks as well!',0,0,0,0,'Chill Nymph SAY_FREE_1'), (-1000782,'Where am I? What happend to me? You... you freed me?',0,0,0,0,'Chill Nymph SAY_FREE_2'), -(-1000783,'Thank you. I thought I would die without seeing my sisters again!',0,0,0,0,'Chill Nymph SAY_FREE_3'); +(-1000783,'Thank you. I thought I would die without seeing my sisters again!',0,0,0,0,'Chill Nymph SAY_FREE_3'), + +(-1000784,'Thanks $N. Now let\'s get out of here!',0,0,0,0,'melizza SAY_MELIZZA_START'), +(-1000785,'We made it! Thanks again! I\'m going to run ahead!',0,0,0,0,'melizza SAY_MELIZZA_FINISH'), +(-1000786,'Hey Hornizz! I\'m back! And there are some people behind me who helped me out of a jam.',0,0,0,1,'melizza SAY_MELIZZA_1'), +(-1000787,'We\'re going to have to scratch the Maraudines off our list. Too hard to work with...',0,0,0,1,'melizza SAY_MELIZZA_2'), +(-1000788,'Well, I\'m off to the Gelkis. They\'re not as dumb as the Maraudines, but they\'re more reasonable.',0,0,0,3,'melizza SAY_MELIZZA_3'); -- -1 033 000 SHADOWFANG KEEP INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES @@ -6317,4 +6323,31 @@ INSERT INTO script_waypoint VALUES (4484, 31, 4243.45, 117.44, 38.83, 0, ''), (4484, 32, 4264.18, 134.22, 42.96, 0, ''); +DELETE FROM script_waypoint WHERE entry=12277; +INSERT INTO script_waypoint VALUES +(12277, 1, -1154.87, 2708.16, 111.123, 1000, 'SAY_MELIZZA_START'), +(12277, 2, -1162.62, 2712.86, 111.549, 0, ''), +(12277, 3, -1183.37, 2709.45, 111.601, 0, ''), +(12277, 4, -1245.09, 2676.43, 111.572, 0, ''), +(12277, 5, -1260.54, 2672.48, 111.55, 0, ''), +(12277, 6, -1272.71, 2666.38, 111.555, 0, ''), +(12277, 7, -1342.95, 2580.82, 111.557, 0, ''), +(12277, 8, -1362.24, 2561.74, 110.848, 0, ''), +(12277, 9, -1376.56, 2514.06, 95.6146, 0, ''), +(12277, 10, -1379.06, 2510.88, 93.3256, 0, ''), +(12277, 11, -1383.14, 2489.17, 89.009, 0, ''), +(12277, 12, -1395.34, 2426.15, 88.6607, 0, 'SAY_MELIZZA_FINISH'), +(12277, 13, -1366.23, 2317.17, 91.8086, 0, ''), +(12277, 14, -1353.81, 2213.52, 90.726, 0, ''), +(12277, 15, -1354.19, 2208.28, 88.7386, 0, ''), +(12277, 16, -1354.59, 2193.77, 77.6702, 0, ''), +(12277, 17, -1367.62, 2160.64, 67.1482, 0, ''), +(12277, 18, -1379.44, 2132.77, 64.1326, 0, ''), +(12277, 19, -1404.81, 2088.68, 61.8162, 0, 'SAY_MELIZZA_1'), +(12277, 20, -1417.15, 2082.65, 62.4112, 0, ''), +(12277, 21, -1423.28, 2074.19, 62.2046, 0, ''), +(12277, 22, -1432.99, 2070.56, 61.7811, 0, ''), +(12277, 23, -1469.27, 2078.68, 63.1141, 0, ''), +(12277, 24, -1507.21, 2115.12, 62.3578, 0, ''); + -- EOF diff --git a/sql/updates/r2447_mangos.sql b/sql/updates/r2447_mangos.sql new file mode 100644 index 000000000..ce9957418 --- /dev/null +++ b/sql/updates/r2447_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_melizza_brimbuzzle' WHERE entry=12277; diff --git a/sql/updates/r2447_scriptdev2.sql b/sql/updates/r2447_scriptdev2.sql new file mode 100644 index 000000000..60aa03861 --- /dev/null +++ b/sql/updates/r2447_scriptdev2.sql @@ -0,0 +1,34 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1000788 AND -1000784; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1000784,'Thanks $N. Now let\'s get out of here!',0,0,0,0,'melizza SAY_MELIZZA_START'), +(-1000785,'We made it! Thanks again! I\'m going to run ahead!',0,0,0,0,'melizza SAY_MELIZZA_FINISH'), +(-1000786,'Hey Hornizz! I\'m back! And there are some people behind me who helped me out of a jam.',0,0,0,1,'melizza SAY_MELIZZA_1'), +(-1000787,'We\'re going to have to scratch the Maraudines off our list. Too hard to work with...',0,0,0,1,'melizza SAY_MELIZZA_2'), +(-1000788,'Well, I\'m off to the Gelkis. They\'re not as dumb as the Maraudines, but they\'re more reasonable.',0,0,0,3,'melizza SAY_MELIZZA_3'); + +DELETE FROM script_waypoint WHERE entry=12277; +INSERT INTO script_waypoint VALUES +(12277, 1, -1154.87, 2708.16, 111.123, 1000, 'SAY_MELIZZA_START'), +(12277, 2, -1162.62, 2712.86, 111.549, 0, ''), +(12277, 3, -1183.37, 2709.45, 111.601, 0, ''), +(12277, 4, -1245.09, 2676.43, 111.572, 0, ''), +(12277, 5, -1260.54, 2672.48, 111.55, 0, ''), +(12277, 6, -1272.71, 2666.38, 111.555, 0, ''), +(12277, 7, -1342.95, 2580.82, 111.557, 0, ''), +(12277, 8, -1362.24, 2561.74, 110.848, 0, ''), +(12277, 9, -1376.56, 2514.06, 95.6146, 0, ''), +(12277, 10, -1379.06, 2510.88, 93.3256, 0, ''), +(12277, 11, -1383.14, 2489.17, 89.009, 0, ''), +(12277, 12, -1395.34, 2426.15, 88.6607, 0, 'SAY_MELIZZA_FINISH'), +(12277, 13, -1366.23, 2317.17, 91.8086, 0, ''), +(12277, 14, -1353.81, 2213.52, 90.726, 0, ''), +(12277, 15, -1354.19, 2208.28, 88.7386, 0, ''), +(12277, 16, -1354.59, 2193.77, 77.6702, 0, ''), +(12277, 17, -1367.62, 2160.64, 67.1482, 0, ''), +(12277, 18, -1379.44, 2132.77, 64.1326, 0, ''), +(12277, 19, -1404.81, 2088.68, 61.8162, 0, 'SAY_MELIZZA_1'), +(12277, 20, -1417.15, 2082.65, 62.4112, 0, ''), +(12277, 21, -1423.28, 2074.19, 62.2046, 0, ''), +(12277, 22, -1432.99, 2070.56, 61.7811, 0, ''), +(12277, 23, -1469.27, 2078.68, 63.1141, 0, ''), +(12277, 24, -1507.21, 2115.12, 62.3578, 0, ''); From 1ff2a04102d36cbdad6e8ae6feecde7822caa66c Mon Sep 17 00:00:00 2001 From: Klark20 Date: Tue, 7 Feb 2012 15:59:00 +0100 Subject: [PATCH 0436/1172] [2448] Fix one text Signed-off-by: Schmoozerd --- sd2_revision_nr.h | 2 +- sql/scriptdev2_script_full.sql | 2 +- sql/updates/r2448_scriptdev2.sql | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 sql/updates/r2448_scriptdev2.sql diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index be9d775d5..5b7cf0c1f 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2447" + #define SD2_REVISION_NR "2448" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index b95635006..8a3efadb0 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -649,7 +649,7 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1000610,'The mosswalker victim groans in pain.',0,2,0,0,'mosswalker victim EMOTE_PAIN'), (-1000611,'Maybe you make weather better too?',0,0,0,0,'mosswalker victim SAY_RESCUE_1'), -(-1000612,'We saved. You nice, $N.',0,0,0,0,'mosswalker victim SAY_RESCUE_2'), +(-1000612,'We saved. You nice, dryskin.',0,0,0,0,'mosswalker victim SAY_RESCUE_2'), (-1000613,'You save us! Yay for you!',0,0,0,0,'mosswalker victim SAY_RESCUE_3'), (-1000614,'Thank you! You good!',0,0,0,0,'mosswalker victim SAY_RESCUE_4'), diff --git a/sql/updates/r2448_scriptdev2.sql b/sql/updates/r2448_scriptdev2.sql new file mode 100644 index 000000000..b08f269d0 --- /dev/null +++ b/sql/updates/r2448_scriptdev2.sql @@ -0,0 +1 @@ +UPDATE script_texts SET content_default='We saved. You nice, dryskin.' WHERE entry=-1000612; From 0d0dfbae1b3a865ff9f76c0ed3cf1a9dd85f544c Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Wed, 8 Feb 2012 14:02:31 +0100 Subject: [PATCH 0437/1172] [2449] Add support for door after Tendris Warpwood in DireMaul --- scripts/kalimdor/dire_maul/dire_maul.h | 12 ++++++----- .../kalimdor/dire_maul/instance_dire_maul.cpp | 20 ++++++++++++++----- sd2_revision_nr.h | 2 +- 3 files changed, 23 insertions(+), 11 deletions(-) diff --git a/scripts/kalimdor/dire_maul/dire_maul.h b/scripts/kalimdor/dire_maul/dire_maul.h index 82041d84f..793a26c9f 100644 --- a/scripts/kalimdor/dire_maul/dire_maul.h +++ b/scripts/kalimdor/dire_maul/dire_maul.h @@ -7,7 +7,7 @@ enum { - MAX_ENCOUNTER = 11, + MAX_ENCOUNTER = 12, MAX_GENERATORS = 5, // East @@ -16,16 +16,17 @@ enum TYPE_IRONBARK = 2, // West - TYPE_IMMOLTHAR = 3, - TYPE_PRINCE = 4, - TYPE_PYLON_1 = 5, + TYPE_WARPWOOD = 3, + TYPE_IMMOLTHAR = 4, + TYPE_PRINCE = 5, + TYPE_PYLON_1 = 6, TYPE_PYLON_2 = TYPE_PYLON_1 + 1, TYPE_PYLON_3 = TYPE_PYLON_1 + 2, TYPE_PYLON_4 = TYPE_PYLON_1 + 3, TYPE_PYLON_5 = TYPE_PYLON_1 + 4, // North - TYPE_KING_GORDOK = 10, + TYPE_KING_GORDOK = 11, // East GO_CRUMBLE_WALL = 177220, @@ -38,6 +39,7 @@ enum NPC_IRONBARK_REDEEMED = 14241, // West + NPC_TENDRIS_WARPWOOD = 11489, NPC_PRINCE_TORTHELDRIN = 11486, NPC_IMMOLTHAR = 11496, NPC_ARCANE_ABERRATION = 11480, diff --git a/scripts/kalimdor/dire_maul/instance_dire_maul.cpp b/scripts/kalimdor/dire_maul/instance_dire_maul.cpp index f46ec2993..b08fa3656 100644 --- a/scripts/kalimdor/dire_maul/instance_dire_maul.cpp +++ b/scripts/kalimdor/dire_maul/instance_dire_maul.cpp @@ -123,7 +123,10 @@ void instance_dire_maul::OnObjectCreate(GameObject* pGo) break; case GO_PRINCES_CHEST_AURA: break; - + case GO_WARPWOOD_DOOR: + if (m_auiEncounter[TYPE_WARPWOOD] == DONE) + pGo->SetGoState(GO_STATE_ACTIVE); + break; default: return; } @@ -176,6 +179,11 @@ void instance_dire_maul::SetData(uint32 uiType, uint32 uiData) break; // West + case TYPE_WARPWOOD: + if (uiData == DONE) + DoUseDoorOrButton(GO_WARPWOOD_DOOR); + m_auiEncounter[uiType] = uiData; + break; case TYPE_IMMOLTHAR: if (uiData == DONE) { @@ -231,7 +239,7 @@ void instance_dire_maul::SetData(uint32 uiType, uint32 uiData) saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2] << " " << m_auiEncounter[3] << " " << m_auiEncounter[4] << " " << m_auiEncounter[5] << " " << m_auiEncounter[6] << " " << m_auiEncounter[7] << " " << m_auiEncounter[8] << " " - << m_auiEncounter[9] << " " << m_auiEncounter[10]; + << m_auiEncounter[9] << " " << m_auiEncounter[10] << " " << m_auiEncounter[11]; m_strInstData = saveStream.str(); @@ -283,9 +291,11 @@ void instance_dire_maul::OnCreatureDeath(Creature* pCreature) case NPC_ARCANE_ABERRATION: case NPC_MANA_REMNANT: PylonGuardJustDied(pCreature); - break; - // - Set InstData for ImmolThar + // - InstData settings + case NPC_TENDRIS_WARPWOOD: + SetData(TYPE_WARPWOOD, DONE); + break; case NPC_IMMOLTHAR: SetData(TYPE_IMMOLTHAR, DONE); break; @@ -312,7 +322,7 @@ void instance_dire_maul::Load(const char* chrIn) loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3] >> m_auiEncounter[4] >> m_auiEncounter[5] >> m_auiEncounter[6] >> m_auiEncounter[7] >> m_auiEncounter[8] >> - m_auiEncounter[9] >> m_auiEncounter[10]; + m_auiEncounter[9] >> m_auiEncounter[10] >> m_auiEncounter[11]; if (m_auiEncounter[TYPE_ALZZIN] >= DONE) m_bWallDestroyed = true; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 5b7cf0c1f..b46049fb9 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2448" + #define SD2_REVISION_NR "2449" #endif // __SD2_REVISION_NR_H__ From 38bb8af1d3528949b670f155307e57e7a2662640 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Wed, 8 Feb 2012 23:44:20 +0200 Subject: [PATCH 0438/1172] [2450] Implement event support for the Apothecary trio --- .../shadowfang_keep/boss_hummel.cpp | 249 +++++++++++++++++- .../instance_shadowfang_keep.cpp | 65 ++++- .../shadowfang_keep/shadowfang_keep.h | 21 +- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 2 + sql/scriptdev2_script_full.sql | 9 +- sql/updates/r2450_mangos.sql | 2 + sql/updates/r2450_scriptdev2.sql | 8 + 8 files changed, 350 insertions(+), 8 deletions(-) create mode 100644 sql/updates/r2450_mangos.sql create mode 100644 sql/updates/r2450_scriptdev2.sql diff --git a/scripts/eastern_kingdoms/shadowfang_keep/boss_hummel.cpp b/scripts/eastern_kingdoms/shadowfang_keep/boss_hummel.cpp index b00956dcf..d06459181 100644 --- a/scripts/eastern_kingdoms/shadowfang_keep/boss_hummel.cpp +++ b/scripts/eastern_kingdoms/shadowfang_keep/boss_hummel.cpp @@ -16,13 +16,258 @@ /* ScriptData SDName: boss_hummel -SD%Complete: 0 -SDComment: Placeholder +SD%Complete: 50 +SDComment: The bosses are handled in eventAI; The event needs more research; only the basics are implemented; Check crazed apothecary timer SDCategory: Shadowfang Keep EndScriptData */ #include "precompiled.h" +#include "shadowfang_keep.h" + +enum +{ + SAY_INTRO_1 = -1033020, + SAY_INTRO_2 = -1033021, + SAY_INTRO_3 = -1033022, + SAY_CALL_BAXTER = -1033023, + SAY_CALL_FRYE = -1033024, + + SPELL_SUMMON_VALENTINE_ADD = 68610, // summons the crazy apothecary + + // It's unk who is handling the summoning of the crazed apothecary. This may get the following npcs involved: 36212 + NCP_CRAZED_APOTHECARY = 36568, // casts spell 68957 on range check + + QUEST_BEEN_SERVED = 14488, + + FACTION_HOSTILE = 14, +}; + +static const DialogueEntry aIntroDialogue[] = +{ + {QUEST_BEEN_SERVED, 0, 1000}, + {SAY_INTRO_1, NPC_HUMMEL, 4000}, + {SAY_INTRO_2, NPC_HUMMEL, 4000}, + {SAY_INTRO_3, NPC_HUMMEL, 3000}, + {NPC_HUMMEL, 0, 8000}, + {NPC_BAXTER, 0, 8000}, + {NPC_FRYE, 0, 0}, + {0, 0, 0}, +}; + +struct MANGOS_DLL_DECL npc_valentine_boss_managerAI : public ScriptedAI, private DialogueHelper +{ + npc_valentine_boss_managerAI(Creature* pCreature) : ScriptedAI(pCreature), + DialogueHelper(aIntroDialogue) + { + m_pInstance = (instance_shadowfang_keep*)pCreature->GetInstanceData(); + InitializeDialogueHelper(m_pInstance); + Reset(); + } + + instance_shadowfang_keep* m_pInstance; + + uint32 m_uiCrazedApothecaryTimer; + + ObjectGuid m_EventStarterGuid; + + void Reset() + { + m_uiCrazedApothecaryTimer = 30000; + } + + void JustDidDialogueStep(int32 iEntry) + { + if (!m_pInstance) + return; + + switch (iEntry) + { + case NPC_HUMMEL: + { + if (Creature* pHummel = m_pInstance->GetSingleCreatureFromStorage(NPC_HUMMEL)) + { + // WARNING: workaround -> faction should be set on event start + pHummel->SetFactionTemporary(FACTION_HOSTILE, TEMPFACTION_RESTORE_REACH_HOME | TEMPFACTION_RESTORE_RESPAWN); + pHummel->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PASSIVE | UNIT_FLAG_NON_ATTACKABLE); + + if (Player* pPlayer = m_creature->GetMap()->GetPlayer(m_EventStarterGuid)) + pHummel->AI()->AttackStart(pPlayer); + } + + m_pInstance->SetData(TYPE_APOTHECARY, IN_PROGRESS); + break; + } + case NPC_BAXTER: + { + Creature* pHummel = m_pInstance->GetSingleCreatureFromStorage(NPC_HUMMEL); + if (!pHummel) + return; + + if (Creature* pBaxter = m_pInstance->GetSingleCreatureFromStorage(NPC_BAXTER)) + { + DoScriptText(SAY_CALL_BAXTER, pHummel); + + // WARNING: workaround -> faction should be set on event start + pBaxter->SetFactionTemporary(FACTION_HOSTILE, TEMPFACTION_RESTORE_REACH_HOME | TEMPFACTION_RESTORE_RESPAWN); + pBaxter->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PASSIVE | UNIT_FLAG_NON_ATTACKABLE); + if (pHummel->getVictim()) + pBaxter->AI()->AttackStart(pHummel->getVictim()); + } + break; + } + case NPC_FRYE: + { + Creature* pHummel = m_pInstance->GetSingleCreatureFromStorage(NPC_HUMMEL); + if (!pHummel) + return; + + if (Creature* pFrye = m_pInstance->GetSingleCreatureFromStorage(NPC_FRYE)) + { + DoScriptText(SAY_CALL_FRYE, pHummel); + + // WARNING: workaround -> faction should be set on event start + pFrye->SetFactionTemporary(FACTION_HOSTILE, TEMPFACTION_RESTORE_REACH_HOME | TEMPFACTION_RESTORE_RESPAWN); + pFrye->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PASSIVE | UNIT_FLAG_NON_ATTACKABLE); + if (pHummel->getVictim()) + pFrye->AI()->AttackStart(pHummel->getVictim()); + } + break; + } + } + } + + void JustSummoned(Creature* pSummoned) + { + if (pSummoned->GetEntry() == NCP_CRAZED_APOTHECARY) + { + if (!m_pInstance) + return; + + // Make it attack a random Target + Creature* pBoss = m_pInstance->GetSingleCreatureFromStorage(NPC_HUMMEL); + if (!pBoss || !pBoss->isAlive()) + pBoss = m_pInstance->GetSingleCreatureFromStorage(NPC_BAXTER); + if (!pBoss || !pBoss->isAlive()) + pBoss = m_pInstance->GetSingleCreatureFromStorage(NPC_FRYE); + if (!pBoss || !pBoss->isAlive()) + return; + + // Attack a random target + if (Unit* pTarget = pBoss->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + pSummoned->AI()->AttackStart(pTarget); + } + } + + // Wrapper to get the event started + void DoStartValentineEvent(ObjectGuid starterGuid) + { + if (!m_pInstance) + return; + + m_EventStarterGuid = starterGuid; + + if (Creature* pHummel = m_pInstance->GetSingleCreatureFromStorage(NPC_HUMMEL)) + { + // I'm not sure if this unit flag should be used, but it's clear that the NPC shouldn't be attacked until the dialogue is finished + pHummel->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + // WARNING: workaround -> faction should be set here - FIX THIS after the aura bug in core is fixed + //pHummel->SetFactionTemporary(FACTION_HOSTILE, TEMPFACTION_RESTORE_REACH_HOME | TEMPFACTION_RESTORE_RESPAWN); + } + + StartNextDialogueText(QUEST_BEEN_SERVED); + + // Move Baxter to position + if (Creature* pBaxter = m_pInstance->GetSingleCreatureFromStorage(NPC_BAXTER)) + { + pBaxter->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + // WARNING: workaround -> faction should be set here - FIX THIS after the aura bug in core is fixed + //pBaxter->SetFactionTemporary(FACTION_HOSTILE, TEMPFACTION_RESTORE_REACH_HOME | TEMPFACTION_RESTORE_RESPAWN); + + if (GameObject* pVials = m_pInstance->GetSingleGameObjectFromStorage(GO_APOTHECARE_VIALS)) + { + float fX, fY, fZ; + pVials->GetContactPoint(pBaxter, fX, fY, fZ, CONTACT_DISTANCE); + pBaxter->SetWalk(false); + pBaxter->GetMotionMaster()->MovePoint(1, fX, fY, fZ); + } + else + error_log("SD2: Gameobject %u couldn't be found or something really bad happened.", GO_APOTHECARE_VIALS); + } + + // Move Frye to position + if (Creature* pFrye = m_pInstance->GetSingleCreatureFromStorage(NPC_FRYE)) + { + pFrye->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + // WARNING: workaround -> faction should be set here - FIX THIS after the aura bug in core is fixed + //pFrye->SetFactionTemporary(FACTION_HOSTILE, TEMPFACTION_RESTORE_REACH_HOME | TEMPFACTION_RESTORE_RESPAWN); + + if (GameObject* pChemistry = m_pInstance->GetSingleGameObjectFromStorage(GO_CHEMISTRY_SET)) + { + float fX, fY, fZ; + pChemistry->GetContactPoint(pFrye, fX, fY, fZ, CONTACT_DISTANCE); + pFrye->SetWalk(false); + pFrye->GetMotionMaster()->MovePoint(1, fX, fY, fZ); + } + else + error_log("SD2: Gameobject %u couldn't be found or something really bad happened.", GO_CHEMISTRY_SET); + } + } + + void UpdateAI(const uint32 uiDiff) + { + DialogueUpdate(uiDiff); + + if (!m_pInstance) + return; + + if (m_pInstance->GetData(TYPE_APOTHECARY) != IN_PROGRESS) + return; + + if (m_uiCrazedApothecaryTimer < uiDiff) + { + if (Creature* pGenerator = m_pInstance->GetSingleCreatureFromStorage(NPC_APOTHECARY_GENERATOR)) + pGenerator->CastSpell(pGenerator, SPELL_SUMMON_VALENTINE_ADD, true, NULL, NULL, m_creature->GetObjectGuid()); + + m_uiCrazedApothecaryTimer = 30000; + } + else + m_uiCrazedApothecaryTimer -= uiDiff; + } +}; + +CreatureAI* GetAI_npc_valentine_boss_manager(Creature* pCreature) +{ + return new npc_valentine_boss_managerAI(pCreature); +} + +bool QuestRewarded_npc_apothecary_hummel(Player* pPlayer, Creature* pCreature, Quest const* pQuest) +{ + if (pQuest->GetQuestId() == QUEST_BEEN_SERVED) + { + if (instance_shadowfang_keep* pInstance = (instance_shadowfang_keep*)pCreature->GetInstanceData()) + { + if (Creature* pValentineMgr = pInstance->GetSingleCreatureFromStorage(NPC_VALENTINE_BOSS_MGR)) + { + if (npc_valentine_boss_managerAI* pManagerAI = dynamic_cast(pValentineMgr->AI())) + pManagerAI->DoStartValentineEvent(pPlayer->GetObjectGuid()); + } + } + } + + return true; +} void AddSC_boss_hummel() { + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "npc_valentine_boss_manager"; + pNewScript->GetAI = GetAI_npc_valentine_boss_manager; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_apothecary_hummel"; + pNewScript->pQuestRewardedNPC = &QuestRewarded_npc_apothecary_hummel; + pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/shadowfang_keep/instance_shadowfang_keep.cpp b/scripts/eastern_kingdoms/shadowfang_keep/instance_shadowfang_keep.cpp index 89c32c4a8..ff9d81524 100644 --- a/scripts/eastern_kingdoms/shadowfang_keep/instance_shadowfang_keep.cpp +++ b/scripts/eastern_kingdoms/shadowfang_keep/instance_shadowfang_keep.cpp @@ -24,7 +24,8 @@ EndScriptData */ #include "precompiled.h" #include "shadowfang_keep.h" -instance_shadowfang_keep::instance_shadowfang_keep(Map* pMap) : ScriptedInstance(pMap) +instance_shadowfang_keep::instance_shadowfang_keep(Map* pMap) : ScriptedInstance(pMap), + m_uiApothecaryDead(0) { Initialize(); } @@ -41,6 +42,11 @@ void instance_shadowfang_keep::OnCreatureCreate(Creature* pCreature) case NPC_ASH: case NPC_ADA: case NPC_FENRUS: + case NPC_HUMMEL: + case NPC_FRYE: + case NPC_BAXTER: + case NPC_APOTHECARY_GENERATOR: + case NPC_VALENTINE_BOSS_MGR: break; case NPC_VINCENT: // If Arugal has done the intro, make Vincent dead! @@ -73,6 +79,8 @@ void instance_shadowfang_keep::OnObjectCreate(GameObject* pGo) pGo->SetGoState(GO_STATE_ACTIVE); break; case GO_ARUGAL_FOCUS: + case GO_APOTHECARE_VIALS: + case GO_CHEMISTRY_SET: break; default: @@ -81,6 +89,35 @@ void instance_shadowfang_keep::OnObjectCreate(GameObject* pGo) m_mGoEntryGuidStore[pGo->GetEntry()] = pGo->GetObjectGuid(); } +void instance_shadowfang_keep::OnCreatureDeath(Creature* pCreature) +{ + switch(pCreature->GetEntry()) + { + // Remove lootable flag from Hummel + // Instance data is set to SPECIAL because the encounter depends on multiple bosses + case NPC_HUMMEL: + pCreature->RemoveFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE); + DoScriptText(SAY_HUMMEL_DEATH, pCreature); + // no break; + case NPC_FRYE: + case NPC_BAXTER: + SetData(TYPE_APOTHECARY, SPECIAL); + break; + } +} + +void instance_shadowfang_keep::OnCreatureEvade(Creature* pCreature) +{ + switch(pCreature->GetEntry()) + { + case NPC_HUMMEL: + case NPC_FRYE: + case NPC_BAXTER: + SetData(TYPE_APOTHECARY, FAIL); + break; + } +} + void instance_shadowfang_keep::DoSpeech() { Creature* pAda = GetSingleCreatureFromStorage(NPC_ADA); @@ -131,6 +168,27 @@ void instance_shadowfang_keep::SetData(uint32 uiType, uint32 uiData) DoUseDoorOrButton(GO_SORCERER_DOOR); } break; + case TYPE_APOTHECARY: + // Reset apothecary counter on fail + if (uiData == IN_PROGRESS) + m_uiApothecaryDead = 0; + if (uiData == SPECIAL) + { + ++m_uiApothecaryDead; + + // Set Hummel as lootable only when the others are dead + if (m_uiApothecaryDead == MAX_APOTHECARY) + { + if (Creature* pHummel = GetSingleCreatureFromStorage(NPC_HUMMEL)) + pHummel->SetFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE); + + SetData(TYPE_APOTHECARY, DONE); + } + } + // We don't want to store the SPECIAL data + else + m_auiEncounter[6] = uiData; + break; } if (uiData == DONE) @@ -139,7 +197,7 @@ void instance_shadowfang_keep::SetData(uint32 uiType, uint32 uiData) std::ostringstream saveStream; saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2] << " " << m_auiEncounter[3] - << " " << m_auiEncounter[4] << " " << m_auiEncounter[5]; + << " " << m_auiEncounter[4] << " " << m_auiEncounter[5] << " " << m_auiEncounter[6]; m_strInstData = saveStream.str(); @@ -157,6 +215,7 @@ uint32 instance_shadowfang_keep::GetData(uint32 uiType) case TYPE_FENRUS: return m_auiEncounter[2]; case TYPE_NANDOS: return m_auiEncounter[3]; case TYPE_INTRO: return m_auiEncounter[4]; + case TYPE_APOTHECARY: return m_auiEncounter[6]; default: return 0; @@ -175,7 +234,7 @@ void instance_shadowfang_keep::Load(const char* chrIn) std::istringstream loadStream(chrIn); loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3] - >> m_auiEncounter[4] >> m_auiEncounter[5]; + >> m_auiEncounter[4] >> m_auiEncounter[5] >> m_auiEncounter[6]; for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) { diff --git a/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.h b/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.h index c9de1663e..6acda8f2e 100644 --- a/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.h +++ b/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.h @@ -7,7 +7,7 @@ enum { - MAX_ENCOUNTER = 6, + MAX_ENCOUNTER = 7, TYPE_FREE_NPC = 1, TYPE_RETHILGORE = 2, @@ -15,6 +15,7 @@ enum TYPE_NANDOS = 4, TYPE_INTRO = 5, TYPE_VOIDWALKER = 6, + TYPE_APOTHECARY = 7, SAY_BOSS_DIE_AD = -1033007, SAY_BOSS_DIE_AS = -1033008, @@ -26,10 +27,23 @@ enum NPC_FENRUS = 4274, //used to summon Arugal in Fenrus event NPC_VINCENT = 4444, //Vincent should be "dead" is Arugal is done the intro already + NPC_HUMMEL = 36296, // Love is in the Air event + NPC_FRYE = 36272, + NPC_BAXTER = 36565, + NPC_VALENTINE_BOSS_MGR = 36643, // controller npc for the apothecary event + NPC_APOTHECARY_GENERATOR= 36212, // the npc which summons the crazed apothecary + GO_COURTYARD_DOOR = 18895, //door to open when talking to NPC's GO_SORCERER_DOOR = 18972, //door to open when Fenrus the Devourer GO_ARUGAL_DOOR = 18971, //door to open when Wolf Master Nandos GO_ARUGAL_FOCUS = 18973, //this generates the lightning visual in the Fenrus event + + GO_APOTHECARE_VIALS = 190678, // move position for Baxter + GO_CHEMISTRY_SET = 200335, // move position for Frye + + SAY_HUMMEL_DEATH = -1033025, + + MAX_APOTHECARY = 3, }; class MANGOS_DLL_DECL instance_shadowfang_keep : public ScriptedInstance @@ -43,6 +57,9 @@ class MANGOS_DLL_DECL instance_shadowfang_keep : public ScriptedInstance void OnObjectCreate(GameObject* pGo); void DoSpeech(); + void OnCreatureDeath(Creature* pCreature); + void OnCreatureEvade(Creature* pCreature); + void SetData(uint32 uiType, uint32 uiData); uint32 GetData(uint32 uiType); @@ -52,6 +69,8 @@ class MANGOS_DLL_DECL instance_shadowfang_keep : public ScriptedInstance private: uint32 m_auiEncounter[MAX_ENCOUNTER]; std::string m_strInstData; + + uint8 m_uiApothecaryDead; }; #endif diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index b46049fb9..8af153b78 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2449" + #define SD2_REVISION_NR "2450" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 9bb09f609..40aa834b6 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -954,6 +954,8 @@ UPDATE creature_template SET ScriptName='npc_arugal' WHERE entry=10000; UPDATE creature_template SET ScriptName='npc_deathstalker_vincent' WHERE entry=4444; UPDATE creature_template SET ScriptName='mob_arugal_voidwalker' WHERE entry=4627; UPDATE creature_template SET ScriptName='boss_arugal' WHERE entry=4275; +UPDATE creature_template SET ScriptName='npc_apothecary_hummel' WHERE entry=36296; +UPDATE creature_template SET ScriptName='npc_valentine_boss_manager' WHERE entry=36643; /* SHADOWMOON VALLEY */ UPDATE creature_template SET ScriptName='boss_doomwalker' WHERE entry=17711; diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 8a3efadb0..613cde4a1 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -872,7 +872,14 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1033016,'Arrrgh!',0,0,0,0,'deathstalker vincent SAY_VINCENT_DIE'), (-1033017,'You, too, shall serve!',5793,1,0,0,'boss_arugal YELL_AGGRO'), (-1033018,'Another Falls!',5795,1,0,0,'boss_arugal YELL_KILLED_PLAYER'), -(-1033019,'Release your rage!',5797,1,0,0,'boss_arugal YELL_COMBAT'); +(-1033019,'Release your rage!',5797,1,0,0,'boss_arugal YELL_COMBAT'), + +(-1033020,'Did they bother to tell you who I am and why I am doing this?',0,0,0,0,'hummel SAY_INTRO_1'), +(-1033021,'...or are they just using you like they do everybody else?',0,0,0,0,'hummel SAY_INTRO_2'), +(-1033022,'But what does it matter. It is time for this to end.',0,0,0,0,'hummel SAY_INTRO_3'), +(-1033023,'Baxter! Get in there and help! NOW!',0,0,0,0,'hummel SAY_CALL_BAXTER'), +(-1033024,'It is time, Frye! Attack!',0,0,0,0,'hummel SAY_CALL_FRYE'), +(-1033025,'...please don\'t think less of me.',0,0,0,0,'hummel SAY_DEATH'); -- -1 034 000 STOCKADES diff --git a/sql/updates/r2450_mangos.sql b/sql/updates/r2450_mangos.sql new file mode 100644 index 000000000..21de8f0f8 --- /dev/null +++ b/sql/updates/r2450_mangos.sql @@ -0,0 +1,2 @@ +UPDATE creature_template SET ScriptName='npc_apothecary_hummel' WHERE entry=36296; +UPDATE creature_template SET ScriptName='npc_valentine_boss_manager' WHERE entry=36643; diff --git a/sql/updates/r2450_scriptdev2.sql b/sql/updates/r2450_scriptdev2.sql new file mode 100644 index 000000000..1dcb3169e --- /dev/null +++ b/sql/updates/r2450_scriptdev2.sql @@ -0,0 +1,8 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1033025 AND -1033020; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1033020,'Did they bother to tell you who I am and why I am doing this?',0,0,0,0,'hummel SAY_INTRO_1'), +(-1033021,'...or are they just using you like they do everybody else?',0,0,0,0,'hummel SAY_INTRO_2'), +(-1033022,'But what does it matter. It is time for this to end.',0,0,0,0,'hummel SAY_INTRO_3'), +(-1033023,'Baxter! Get in there and help! NOW!',0,0,0,0,'hummel SAY_CALL_BAXTER'), +(-1033024,'It is time, Frye! Attack!',0,0,0,0,'hummel SAY_CALL_FRYE'), +(-1033025,'...please don\'t think less of me.',0,0,0,0,'hummel SAY_DEATH'); From 5bda230e8eeff66a15d41cd1b005e5b9faec9011 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Wed, 8 Feb 2012 23:30:10 +0100 Subject: [PATCH 0439/1172] [2451] Decrease Heigan timers to better values.. --- scripts/northrend/naxxramas/boss_heigan.cpp | 4 ++-- sd2_revision_nr.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/northrend/naxxramas/boss_heigan.cpp b/scripts/northrend/naxxramas/boss_heigan.cpp index bd288b747..4c11fedea 100644 --- a/scripts/northrend/naxxramas/boss_heigan.cpp +++ b/scripts/northrend/naxxramas/boss_heigan.cpp @@ -76,7 +76,7 @@ struct MANGOS_DLL_DECL boss_heiganAI : public ScriptedAI { m_uiPhaseEruption = 0; m_uiFeverTimer = 4000; - m_uiEruptionTimer = m_uiPhase == PHASE_GROUND ? urand(8000, 12000) : urand(2000, 3000); + m_uiEruptionTimer = m_uiPhase == PHASE_GROUND ? 15000 : 7500; m_uiDisruptionTimer = 5000; m_uiStartChannelingTimer = 1000; m_uiPhaseTimer = m_uiPhase == PHASE_GROUND ? 90000 : 45000; @@ -223,7 +223,7 @@ struct MANGOS_DLL_DECL boss_heiganAI : public ScriptedAI m_pInstance->DoTriggerHeiganTraps(m_creature, uiArea); } - m_uiEruptionTimer = m_uiPhase == PHASE_GROUND ? urand(8000, 12000) : urand(2000, 3000); + m_uiEruptionTimer = m_uiPhase == PHASE_GROUND ? 10000 : 3000; ++m_uiPhaseEruption; } else diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 8af153b78..3da48f2ca 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2450" + #define SD2_REVISION_NR "2451" #endif // __SD2_REVISION_NR_H__ From 66b226e8ef55602673bc9e7e55cb3baff715ed4b Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sat, 11 Feb 2012 00:56:53 +0200 Subject: [PATCH 0440/1172] [2452] Cleanup and improvement for Kormok - Scholomance --- .../scholomance/boss_kormok.cpp | 148 ++++++++---------- sd2_revision_nr.h | 2 +- 2 files changed, 67 insertions(+), 83 deletions(-) diff --git a/scripts/eastern_kingdoms/scholomance/boss_kormok.cpp b/scripts/eastern_kingdoms/scholomance/boss_kormok.cpp index 15506304b..342d5969d 100644 --- a/scripts/eastern_kingdoms/scholomance/boss_kormok.cpp +++ b/scripts/eastern_kingdoms/scholomance/boss_kormok.cpp @@ -23,121 +23,105 @@ EndScriptData */ #include "precompiled.h" -#define SPELL_SHADOWBOLTVOLLEY 20741 -#define SPELL_BONESHIELD 27688 +enum +{ + EMOTE_GENERIC_FRENZY = -1000002, + + SPELL_SHADOWBOLT_VOLLEY = 20741, + SPELL_BONE_SHIELD = 27688, + SPELL_BLOODLUST = 27689, + SPELL_SUMMON_BONE_MAGES = 27695, // triggers 27696, 27697, 27698, 27699 + SPELL_SUMMON_BONE_MINIONS = 27687, // triggers 27690, 27691, 27692, 27693 (spells were removed after vanilla) + SPELL_FRENZY = 8269, +}; struct MANGOS_DLL_DECL boss_kormokAI : public ScriptedAI { boss_kormokAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} - uint32 ShadowVolley_Timer; - uint32 BoneShield_Timer; - uint32 Minion_Timer; - uint32 Mage_Timer; - bool Mages; - int Rand1; - int Rand1X; - int Rand1Y; - int Rand2; - int Rand2X; - int Rand2Y; - Creature* SummonedMinions; - Creature* SummonedMages; + uint32 m_uiShadowVolleyTimer; + uint32 m_uiBoneShieldTimer; + uint32 m_uiMinionTimer; + uint32 m_uiBloodlustTimer; + bool m_bHasMages; + bool m_bIsFrenzy; void Reset() { - ShadowVolley_Timer = 10000; - BoneShield_Timer = 2000; - Minion_Timer = 15000; - Mage_Timer = 0; - Mages = false; + m_uiShadowVolleyTimer = urand(10000, 12000); + m_uiMinionTimer = 15000; + m_uiBloodlustTimer = urand(20000, 25000); + m_bHasMages = false; + m_bIsFrenzy = false; + + // the boss casts this on spawn because he is summoned + DoCastSpellIfCan(m_creature, SPELL_BONE_SHIELD); } - void SummonMinion(Unit* victim) + void Aggro(Unit* pWho) { - Rand1 = rand()%8; - switch(urand(0, 1)) - { - case 0: Rand1X = 0 - Rand1; break; - case 1: Rand1X = 0 + Rand1; break; - } - Rand1 = 0; - Rand1 = rand()%8; - switch(urand(0, 1)) - { - case 0: Rand1Y = 0 - Rand1; break; - case 1: Rand1Y = 0 + Rand1; break; - } - Rand1 = 0; - SummonedMinions = DoSpawnCreature(16119, Rand1X, Rand1Y, 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 120000); - if (SummonedMinions) - SummonedMinions->AI()->AttackStart(victim); + DoCastSpellIfCan(m_creature, SPELL_BONE_SHIELD, CAST_AURA_NOT_PRESENT); } - void SummonMages(Unit* victim) + void JustSummoned(Creature* pSummoned) { - Rand2 = rand()%10; - switch(urand(0, 1)) - { - case 0: Rand2X = 0 - Rand2; break; - case 1: Rand2X = 0 + Rand2; break; - } - Rand2 = 0; - Rand2 = rand()%10; - switch(urand(0, 1)) - { - case 0: Rand2Y = 0 - Rand2; break; - case 1: Rand2Y = 0 + Rand2; break; - } - Rand2 = 0; - SummonedMages = DoSpawnCreature(16120, Rand2X, Rand2Y, 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 120000); - if (SummonedMages) - SummonedMages->AI()->AttackStart(victim); + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + pSummoned->AI()->AttackStart(pTarget); } - void UpdateAI(const uint32 diff) + void UpdateAI(const uint32 uiDiff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - //ShadowVolley_Timer - if (ShadowVolley_Timer < diff) + // ShadowVolley_Timer + if (m_uiShadowVolleyTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_SHADOWBOLTVOLLEY); - ShadowVolley_Timer = 15000; - }else ShadowVolley_Timer -= diff; + if (DoCastSpellIfCan(m_creature, SPELL_SHADOWBOLT_VOLLEY) == CAST_OK) + m_uiShadowVolleyTimer = 15000; + } + else + m_uiShadowVolleyTimer -= uiDiff; - //BoneShield_Timer - if (BoneShield_Timer < diff) + // Minion_Timer + if (m_uiMinionTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_BONESHIELD); - BoneShield_Timer = 45000; - }else BoneShield_Timer -= diff; + if (DoCastSpellIfCan(m_creature, SPELL_SUMMON_BONE_MINIONS) == CAST_OK) + m_uiMinionTimer = urand(12000, 15000); + } + else + m_uiMinionTimer -= uiDiff; - //Minion_Timer - if (Minion_Timer < diff) + // Bloodlust + if (m_uiBloodlustTimer < uiDiff) { - //Cast - SummonMinion(m_creature->getVictim()); - SummonMinion(m_creature->getVictim()); - SummonMinion(m_creature->getVictim()); - SummonMinion(m_creature->getVictim()); + if (DoCastSpellIfCan(m_creature, SPELL_BLOODLUST) == CAST_OK) + m_uiBloodlustTimer = urand(25000, 30000); + } + else + m_uiBloodlustTimer -= uiDiff; - Minion_Timer = 12000; - }else Minion_Timer -= diff; + // Summon Bone Mages + if (!m_bHasMages && m_creature->GetHealthPercent() < 26.0f) + { + if (DoCastSpellIfCan(m_creature, SPELL_SUMMON_BONE_MAGES) == CAST_OK) + m_bHasMages = true; + } - //Summon 2 Bone Mages - if (!Mages && m_creature->GetHealthPercent() < 26.0f) + // Frenzy + if (!m_bIsFrenzy && m_creature->GetHealthPercent() < 20.0f) { - //Cast - SummonMages(m_creature->getVictim()); - SummonMages(m_creature->getVictim()); - Mages = true; + if (DoCastSpellIfCan(m_creature, SPELL_FRENZY) == CAST_OK) + { + DoScriptText(EMOTE_GENERIC_FRENZY, m_creature); + m_bIsFrenzy = true; + } } DoMeleeAttackIfReady(); } }; + CreatureAI* GetAI_boss_kormok(Creature* pCreature) { return new boss_kormokAI(pCreature); diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 3da48f2ca..780d98df2 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2451" + #define SD2_REVISION_NR "2452" #endif // __SD2_REVISION_NR_H__ From 0a87ee8e27e1c0446dbb90928b85e18f94412e02 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sat, 11 Feb 2012 01:44:12 +0200 Subject: [PATCH 0441/1172] [2453] Cleanup and improve Jandice Barov - Scholomance --- .../scholomance/boss_jandice_barov.cpp | 160 ++++++------------ sd2_revision_nr.h | 2 +- 2 files changed, 56 insertions(+), 106 deletions(-) diff --git a/scripts/eastern_kingdoms/scholomance/boss_jandice_barov.cpp b/scripts/eastern_kingdoms/scholomance/boss_jandice_barov.cpp index f1e622c5e..e0d19b395 100644 --- a/scripts/eastern_kingdoms/scholomance/boss_jandice_barov.cpp +++ b/scripts/eastern_kingdoms/scholomance/boss_jandice_barov.cpp @@ -23,154 +23,104 @@ EndScriptData */ #include "precompiled.h" -#define SPELL_CURSEOFBLOOD 24673 -//#define SPELL_ILLUSION 17773 +enum +{ + SPELL_CURSE_OF_BLOOD = 16098, + SPELL_SUMMON_ILLUSIONS = 17773, + SPELL_BANISH = 8994, -//Spells of Illusion of Jandice Barov -#define SPELL_CLEAVE 15584 + //Spells of Illusion of Jandice Barov + SPELL_CLEAVE = 15584, +}; struct MANGOS_DLL_DECL boss_jandicebarovAI : public ScriptedAI { boss_jandicebarovAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} - uint32 CurseOfBlood_Timer; - uint32 Illusion_Timer; - //uint32 Illusioncounter; - uint32 Invisible_Timer; - bool Invisible; - int Rand; - int RandX; - int RandY; - Creature* Summoned; + uint32 m_uiCurseOfBloodTimer; + uint32 m_uiIllusionTimer; + uint32 m_uiBanishTimer; void Reset() { - CurseOfBlood_Timer = 15000; - Illusion_Timer = 30000; - Invisible_Timer = 3000; //Too much too low? - Invisible = false; + m_uiCurseOfBloodTimer = 5000; + m_uiIllusionTimer = 15000; + m_uiBanishTimer = urand(9000, 13000); } - void SummonIllusions(Unit* victim) + void JustSummoned(Creature* pSummoned) { - Rand = rand()%10; - switch(urand(0, 1)) - { - case 0: RandX = 0 - Rand; break; - case 1: RandX = 0 + Rand; break; - } - Rand = 0; - Rand = rand()%10; - switch(urand(0, 1)) - { - case 0: RandY = 0 - Rand; break; - case 1: RandY = 0 + Rand; break; - } - Rand = 0; - Summoned = DoSpawnCreature(11439, RandX, RandY, 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 60000); - if (Summoned) - Summoned->AI()->AttackStart(victim); + pSummoned->ApplySpellImmune(0, IMMUNITY_DAMAGE, SPELL_SCHOOL_MASK_MAGIC, true); + + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + pSummoned->AI()->AttackStart(pTarget); } - void UpdateAI(const uint32 diff) + void UpdateAI(const uint32 uiDiff) { - if (Invisible && Invisible_Timer < diff) - { - //Become visible again - m_creature->setFaction(14); - m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - m_creature->SetDisplayId(11073); //Jandice Model - Invisible = false; - } else if (Invisible) - { - Invisible_Timer -= diff; - //Do nothing while invisible - return; - } - - //Return since we have no target + // Return since we have no target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - //CurseOfBlood_Timer - if (CurseOfBlood_Timer < diff) + // CurseOfBlood_Timer + if (m_uiCurseOfBloodTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_CURSEOFBLOOD); - CurseOfBlood_Timer = 30000; - }else CurseOfBlood_Timer -= diff; + if (DoCastSpellIfCan(m_creature, SPELL_CURSE_OF_BLOOD) == CAST_OK) + m_uiCurseOfBloodTimer = urand(30000, 35000); + } + else + m_uiCurseOfBloodTimer -= uiDiff; - //Illusion_Timer - if (!Invisible && Illusion_Timer < diff) + // Banish + if (m_uiBanishTimer < uiDiff) { - //Inturrupt any spell casting - m_creature->InterruptNonMeleeSpells(false); - m_creature->setFaction(35); - m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - m_creature->SetDisplayId(11686); // Invisible Model - m_creature->getThreatManager().modifyThreatPercent(m_creature->getVictim(),-99); - - //Summon 10 Illusions attacking random gamers - Unit* target = NULL; - for(int i = 0; i < 10; ++i) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1)) { - target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0); - SummonIllusions(target); + if (DoCastSpellIfCan(pTarget, SPELL_BANISH) == CAST_OK) + m_uiBanishTimer = urand(17000, 21000); } - Invisible = true; - Invisible_Timer = 3000; - - //25 seconds until we should cast this agian - Illusion_Timer = 25000; - }else Illusion_Timer -= diff; - - // //Illusion_Timer - // if (Illusion_Timer < diff) - // { - // //Cast - // DoCastSpellIfCan(m_creature->getVictim(),SPELL_ILLUSION); - // //3 Illusion will be summoned - // if (Illusioncounter < 3) - // { - // Illusion_Timer = 500; - // ++Illusioncounter; - // } - // else { - // //15 seconds until we should cast this again - // Illusion_Timer = 15000; - // Illusioncounter=0; - // } - // }else Illusion_Timer -= diff; + } + else + m_uiBanishTimer -= uiDiff; + + // Illusion_Timer + if (m_uiIllusionTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_SUMMON_ILLUSIONS) == CAST_OK) + m_uiIllusionTimer = 25000; + } + else + m_uiIllusionTimer -= uiDiff; DoMeleeAttackIfReady(); } }; -// Illusion of Jandice Barov Script - struct MANGOS_DLL_DECL mob_illusionofjandicebarovAI : public ScriptedAI { mob_illusionofjandicebarovAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} - uint32 Cleave_Timer; + uint32 m_uiCleaveTimer; void Reset() { - Cleave_Timer = urand(2000, 8000); - m_creature->ApplySpellImmune(0, IMMUNITY_DAMAGE, SPELL_SCHOOL_MASK_MAGIC, true); + m_uiCleaveTimer = urand(2000, 8000); } void UpdateAI(const uint32 diff) { - //Return since we have no target + // Return since we have no target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - //Cleave_Timer - if (Cleave_Timer < diff) + // Cleave_Timer + if (m_uiCleaveTimer < diff) { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_CLEAVE); - Cleave_Timer = urand(5000, 8000); - }else Cleave_Timer -= diff; + DoCastSpellIfCan(m_creature->getVictim(), SPELL_CLEAVE); + m_uiCleaveTimer = urand(5000, 8000); + } + else + m_uiCleaveTimer -= diff; DoMeleeAttackIfReady(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 780d98df2..cd3b5a665 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2452" + #define SD2_REVISION_NR "2453" #endif // __SD2_REVISION_NR_H__ From 2d1206b79945215853b37e33cb0ebdb0ded039bb Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sun, 12 Feb 2012 14:48:34 +0200 Subject: [PATCH 0442/1172] [2454] Cleanup and improvement for Nerub'enkan - Stratholme --- .../stratholme/boss_nerubenkan.cpp | 121 ++++++++---------- sd2_revision_nr.h | 2 +- 2 files changed, 53 insertions(+), 70 deletions(-) diff --git a/scripts/eastern_kingdoms/stratholme/boss_nerubenkan.cpp b/scripts/eastern_kingdoms/stratholme/boss_nerubenkan.cpp index 963ff571e..8687f598c 100644 --- a/scripts/eastern_kingdoms/stratholme/boss_nerubenkan.cpp +++ b/scripts/eastern_kingdoms/stratholme/boss_nerubenkan.cpp @@ -22,100 +22,83 @@ SDCategory: Stratholme EndScriptData */ #include "precompiled.h" -#include "stratholme.h" -#define SPELL_ENCASINGWEBS 4962 -#define SPELL_PIERCEARMOR 6016 -#define SPELL_CRYPT_SCARABS 31602 -#define SPELL_RAISEUNDEADSCARAB 17235 +enum +{ + SPELL_ENCASING_WEBS = 4962, + SPELL_PIERCE_ARMOR = 6016, + SPELL_CRYPT_SCARABS = 31602, + SPELL_RAISE_UNDEAD_SCARAB = 17235 +}; struct MANGOS_DLL_DECL boss_nerubenkanAI : public ScriptedAI { - boss_nerubenkanAI(Creature* pCreature) : ScriptedAI(pCreature) - { - m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - Reset(); - } - - ScriptedInstance* m_pInstance; + boss_nerubenkanAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } - uint32 EncasingWebs_Timer; - uint32 PierceArmor_Timer; - uint32 CryptScarabs_Timer; - uint32 RaiseUndeadScarab_Timer; - - int Rand; - int RandX; - int RandY; - Creature* Summoned; + uint32 m_uiEncasingWebsTimer; + uint32 m_uiPierceArmorTimer; + uint32 m_uiCryptScarabsTimer; + uint32 m_uiRaiseUndeadScarabTimer; void Reset() { - CryptScarabs_Timer = 3000; - EncasingWebs_Timer = 7000; - PierceArmor_Timer = 19000; - RaiseUndeadScarab_Timer = 3000; + m_uiCryptScarabsTimer = 3000; + m_uiEncasingWebsTimer = 7000; + m_uiPierceArmorTimer = 19000; + m_uiRaiseUndeadScarabTimer = 3000; } - void RaiseUndeadScarab(Unit* victim) - { - Rand = rand()%10; - switch(urand(0, 1)) - { - case 0: RandX = 0 - Rand; break; - case 1: RandX = 0 + Rand; break; - } - Rand = 0; - Rand = rand()%10; - switch(urand(0, 1)) - { - case 0: RandY = 0 - Rand; break; - case 1: RandY = 0 + Rand; break; - } - Rand = 0; - Summoned = DoSpawnCreature(10876, RandX, RandY, 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 180000); - if (Summoned) - Summoned->AI()->AttackStart(victim); - } - - void UpdateAI(const uint32 diff) + void UpdateAI(const uint32 uiDiff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - //EncasingWebs - if (EncasingWebs_Timer < diff) + // EncasingWebs + if (m_uiEncasingWebsTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_ENCASINGWEBS); - EncasingWebs_Timer = 30000; - }else EncasingWebs_Timer -= diff; + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1)) + { + if (DoCastSpellIfCan(pTarget, SPELL_ENCASING_WEBS) == CAST_OK) + m_uiEncasingWebsTimer = 30000; + } + } + else + m_uiEncasingWebsTimer -= uiDiff; - //PierceArmor - if (PierceArmor_Timer < diff) + // PierceArmor + if (m_uiPierceArmorTimer < uiDiff) { - if (rand()%100 < 75) - DoCastSpellIfCan(m_creature->getVictim(),SPELL_PIERCEARMOR); - - PierceArmor_Timer = 35000; - }else PierceArmor_Timer -= diff; + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_PIERCE_ARMOR) == CAST_OK) + m_uiPierceArmorTimer = 35000; + } + else + m_uiPierceArmorTimer -= uiDiff; - //CryptScarabs - if (CryptScarabs_Timer < diff) + // CryptScarabs + if (m_uiCryptScarabsTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_CRYPT_SCARABS); - CryptScarabs_Timer = 16000; - }else CryptScarabs_Timer -= diff; + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, SPELL_CRYPT_SCARABS) == CAST_OK) + m_uiCryptScarabsTimer = 16000; + } + } + else + m_uiCryptScarabsTimer -= uiDiff; - //RaiseUndeadScarab - if (RaiseUndeadScarab_Timer < diff) + // RaiseUndeadScarab + if (m_uiRaiseUndeadScarabTimer < uiDiff) { - RaiseUndeadScarab(m_creature->getVictim()); - RaiseUndeadScarab_Timer = 18000; - }else RaiseUndeadScarab_Timer -= diff; + if (DoCastSpellIfCan(m_creature, SPELL_RAISE_UNDEAD_SCARAB) == CAST_OK) + m_uiRaiseUndeadScarabTimer = 18000; + } + else + m_uiRaiseUndeadScarabTimer -= uiDiff; DoMeleeAttackIfReady(); } }; + CreatureAI* GetAI_boss_nerubenkan(Creature* pCreature) { return new boss_nerubenkanAI(pCreature); diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index cd3b5a665..f96d4370f 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2453" + #define SD2_REVISION_NR "2454" #endif // __SD2_REVISION_NR_H__ From bb3c9d65e2f6bde9c5644718bca23c538f19778d Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sun, 12 Feb 2012 15:01:00 +0200 Subject: [PATCH 0443/1172] [2455] Cleanup and improvement for Magistrate Barthilas --- .../stratholme/boss_magistrate_barthilas.cpp | 101 +++++++----------- sd2_revision_nr.h | 2 +- 2 files changed, 42 insertions(+), 61 deletions(-) diff --git a/scripts/eastern_kingdoms/stratholme/boss_magistrate_barthilas.cpp b/scripts/eastern_kingdoms/stratholme/boss_magistrate_barthilas.cpp index 0e8836dc7..81335ccd2 100644 --- a/scripts/eastern_kingdoms/stratholme/boss_magistrate_barthilas.cpp +++ b/scripts/eastern_kingdoms/stratholme/boss_magistrate_barthilas.cpp @@ -22,97 +22,78 @@ SDCategory: Stratholme EndScriptData */ #include "precompiled.h" -#include "stratholme.h" -#define SPELL_DRAININGBLOW 16793 -#define SPELL_CROWDPUMMEL 10887 -#define SPELL_MIGHTYBLOW 14099 -#define SPELL_FURIOUS_ANGER 16791 +enum +{ + SPELL_DRAINING_BLOW = 16793, + SPELL_CROWD_PUMMEL = 10887, + SPELL_MIGHTY_BLOW = 14099, + SPELL_FURIOUS_ANGER = 16792, -#define MODEL_NORMAL 10433 -#define MODEL_HUMAN 3637 + MODEL_HUMAN = 3637 +}; struct MANGOS_DLL_DECL boss_magistrate_barthilasAI : public ScriptedAI { - boss_magistrate_barthilasAI(Creature* pCreature) : ScriptedAI(pCreature) - { - m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - Reset(); - } + boss_magistrate_barthilasAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } - ScriptedInstance* m_pInstance; - - uint32 DrainingBlow_Timer; - uint32 CrowdPummel_Timer; - uint32 MightyBlow_Timer; - uint32 FuriousAnger_Timer; - uint32 AngerCount; + uint32 m_uiDrainingBlowTimer; + uint32 m_uiCrowdPummelTimer; + uint32 m_uiMightyBlowTimer; void Reset() { - DrainingBlow_Timer = 20000; - CrowdPummel_Timer = 15000; - MightyBlow_Timer = 10000; - FuriousAnger_Timer = 5000; - AngerCount = 0; - - if (m_creature->isAlive()) - m_creature->SetDisplayId(MODEL_NORMAL); - else - m_creature->SetDisplayId(MODEL_HUMAN); + m_uiDrainingBlowTimer = 20000; + m_uiCrowdPummelTimer = 15000; + m_uiMightyBlowTimer = 10000; } - void MoveInLineOfSight(Unit *who) + void Aggro(Unit* pWho) { - //nothing to see here yet - - ScriptedAI::MoveInLineOfSight(who); + DoCastSpellIfCan(m_creature, SPELL_FURIOUS_ANGER); } - void JustDied(Unit* Killer) + void JustDied(Unit* pKiller) { m_creature->SetDisplayId(MODEL_HUMAN); } - void UpdateAI(const uint32 diff) + void UpdateAI(const uint32 uiDiff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - if (FuriousAnger_Timer < diff) + // DrainingBlow + if (m_uiDrainingBlowTimer < uiDiff) { - FuriousAnger_Timer = 4000; - if (AngerCount > 25) - return; - - ++AngerCount; - m_creature->CastSpell(m_creature,SPELL_FURIOUS_ANGER,false); - }else FuriousAnger_Timer -= diff; - - //DrainingBlow - if (DrainingBlow_Timer < diff) - { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_DRAININGBLOW); - DrainingBlow_Timer = 15000; - }else DrainingBlow_Timer -= diff; + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_DRAINING_BLOW) == CAST_OK) + m_uiDrainingBlowTimer = 15000; + } + else + m_uiDrainingBlowTimer -= uiDiff; - //CrowdPummel - if (CrowdPummel_Timer < diff) + // CrowdPummel + if (m_uiCrowdPummelTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_CROWDPUMMEL); - CrowdPummel_Timer = 15000; - }else CrowdPummel_Timer -= diff; + if (DoCastSpellIfCan(m_creature, SPELL_CROWD_PUMMEL) == CAST_OK) + m_uiCrowdPummelTimer = 15000; + } + else + m_uiCrowdPummelTimer -= uiDiff; - //MightyBlow - if (MightyBlow_Timer < diff) + // MightyBlow + if (m_uiMightyBlowTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_MIGHTYBLOW); - MightyBlow_Timer = 20000; - }else MightyBlow_Timer -= diff; + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_MIGHTY_BLOW) == CAST_OK) + m_uiMightyBlowTimer = 20000; + } + else + m_uiMightyBlowTimer -= uiDiff; DoMeleeAttackIfReady(); } }; + CreatureAI* GetAI_boss_magistrate_barthilas(Creature* pCreature) { return new boss_magistrate_barthilasAI(pCreature); diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index f96d4370f..cc81e58d3 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2454" + #define SD2_REVISION_NR "2455" #endif // __SD2_REVISION_NR_H__ From 43e3a5619eaa121cb10f033c4991fdb35d927bd6 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sun, 12 Feb 2012 15:54:15 +0200 Subject: [PATCH 0444/1172] [2456] Cleanup and improvement for Baroness Anastari --- .../stratholme/boss_baroness_anastari.cpp | 112 ++++++++++-------- sd2_revision_nr.h | 2 +- 2 files changed, 62 insertions(+), 52 deletions(-) diff --git a/scripts/eastern_kingdoms/stratholme/boss_baroness_anastari.cpp b/scripts/eastern_kingdoms/stratholme/boss_baroness_anastari.cpp index 0f482bad1..b396245d9 100644 --- a/scripts/eastern_kingdoms/stratholme/boss_baroness_anastari.cpp +++ b/scripts/eastern_kingdoms/stratholme/boss_baroness_anastari.cpp @@ -16,87 +16,97 @@ /* ScriptData SDName: Boss_Baroness_Anastari -SD%Complete: 90 -SDComment: MC disabled +SD%Complete: 75 +SDComment: Possess event NYI SDCategory: Stratholme EndScriptData */ #include "precompiled.h" -#include "stratholme.h" -#define SPELL_BANSHEEWAIL 16565 -#define SPELL_BANSHEECURSE 16867 -#define SPELL_SILENCE 18327 -//#define SPELL_POSSESS 17244 +enum +{ + SPELL_BANSHEE_WAIL = 16565, + SPELL_BANSHEE_CURSE = 16867, + SPELL_SILENCE = 18327, + SPELL_POSSESS = 17244, + SPELL_POSSESS_INV = 17250, // baroness becomes invisible while possessing a target +}; struct MANGOS_DLL_DECL boss_baroness_anastariAI : public ScriptedAI { - boss_baroness_anastariAI(Creature* pCreature) : ScriptedAI(pCreature) - { - m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - Reset(); - } - - ScriptedInstance* m_pInstance; + boss_baroness_anastariAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } - uint32 BansheeWail_Timer; - uint32 BansheeCurse_Timer; - uint32 Silence_Timer; - //uint32 Possess_Timer; + uint32 m_uiBansheeWailTimer; + uint32 m_uiBansheeCurseTimer; + uint32 m_uiSilenceTimer; + uint32 m_uiPossessTimer; void Reset() { - BansheeWail_Timer = 1000; - BansheeCurse_Timer = 11000; - Silence_Timer = 13000; - //Possess_Timer = 35000; + m_uiBansheeWailTimer = 0; + m_uiBansheeCurseTimer = 10000; + m_uiSilenceTimer = 25000; + m_uiPossessTimer = 15000; } - void UpdateAI(const uint32 diff) + void UpdateAI(const uint32 uiDiff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - //BansheeWail - if (BansheeWail_Timer < diff) + // BansheeWail + if (m_uiBansheeWailTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_BANSHEEWAIL); - BansheeWail_Timer = 4000; - }else BansheeWail_Timer -= diff; + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, SPELL_BANSHEE_WAIL) == CAST_OK) + m_uiBansheeWailTimer = urand(2000, 3000); + } + } + else + m_uiBansheeWailTimer -= uiDiff; - //BansheeCurse - if (BansheeCurse_Timer < diff) + // BansheeCurse + if (m_uiBansheeCurseTimer < uiDiff) { - if (!urand(0, 3)) - DoCastSpellIfCan(m_creature->getVictim(),SPELL_BANSHEECURSE); - - BansheeCurse_Timer = 18000; - }else BansheeCurse_Timer -= diff; + if (DoCastSpellIfCan(m_creature, SPELL_BANSHEE_CURSE) == CAST_OK) + m_uiBansheeCurseTimer = 20000; + } + else + m_uiBansheeCurseTimer -= uiDiff; - //Silence - if (Silence_Timer < diff) + // Silence + if (m_uiSilenceTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_SILENCE); - Silence_Timer = 13000; - }else Silence_Timer -= diff; + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, SPELL_SILENCE) == CAST_OK) + m_uiSilenceTimer = 25000; + } + } + else + m_uiSilenceTimer -= uiDiff; - //Possess - /* if (Possess_Timer < diff) + // Possess + // ToDo: uncomment this when the event is properly implemented + /*if (m_uiPossessTimer < uiDiff) { - //Cast - if (rand()%100 < 65) - { - Unit* target = NULL; - target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0); - if (target)DoCastSpellIfCan(target,SPELL_POSSESS); + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1)) + { + if (DoCastSpellIfCan(pTarget, SPELL_POSSESS) == CAST_OK) + { + DoCastSpellIfCan(m_creature, SPELL_POSSESS_INV, CAST_TRIGGERED); + m_uiPossessTimer = 30000; + } + } } - Possess_Timer = 50000; - }else Possess_Timer -= diff; - */ + else + m_uiPossessTimer -= uiDiff;*/ DoMeleeAttackIfReady(); } }; + CreatureAI* GetAI_boss_baroness_anastari(Creature* pCreature) { return new boss_baroness_anastariAI(pCreature); diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index cc81e58d3..770c05bca 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2455" + #define SD2_REVISION_NR "2456" #endif // __SD2_REVISION_NR_H__ From 98acc6dfaa9028ca4fab1b9eab68644d7f2b1715 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sun, 12 Feb 2012 16:13:09 +0200 Subject: [PATCH 0445/1172] [2457] Cleanup and improvement for Maleki the Pallid --- .../stratholme/boss_maleki_the_pallid.cpp | 108 ++++++++++-------- sd2_revision_nr.h | 2 +- 2 files changed, 64 insertions(+), 46 deletions(-) diff --git a/scripts/eastern_kingdoms/stratholme/boss_maleki_the_pallid.cpp b/scripts/eastern_kingdoms/stratholme/boss_maleki_the_pallid.cpp index d009a80a6..c53fdade4 100644 --- a/scripts/eastern_kingdoms/stratholme/boss_maleki_the_pallid.cpp +++ b/scripts/eastern_kingdoms/stratholme/boss_maleki_the_pallid.cpp @@ -16,77 +16,95 @@ /* ScriptData SDName: Boss_Maleki_the_Pallid -SD%Complete: 70 +SD%Complete: 100 SDComment: SDCategory: Stratholme EndScriptData */ #include "precompiled.h" -#include "stratholme.h" -#define SPELL_FROSTBOLT 17503 -#define SPELL_DRAIN_LIFE 17238 -#define SPELL_DRAIN_MANA 17243 -#define SPELL_ICETOMB 16869 +enum +{ + SPELL_FROSTBOLT = 17503, + SPELL_DRAIN_LIFE = 17238, + SPELL_DRAIN_MANA = 17243, + SPELL_ICE_TOMB = 16869 +}; struct MANGOS_DLL_DECL boss_maleki_the_pallidAI : public ScriptedAI { - boss_maleki_the_pallidAI(Creature* pCreature) : ScriptedAI(pCreature) - { - m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - Reset(); - } - - ScriptedInstance* m_pInstance; + boss_maleki_the_pallidAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } - uint32 FrostNova_Timer; - uint32 Frostbolt_Timer; - uint32 IceTomb_Timer; - uint32 DrainLife_Timer; + uint32 m_uiDrainManaTimer; + uint32 m_uiFrostboltTimer; + uint32 m_uiIceTombTimer; + uint32 m_uiDrainLifeTimer; void Reset() { - FrostNova_Timer = 11000; - Frostbolt_Timer = 1000; - IceTomb_Timer = 16000; - DrainLife_Timer = 31000; + m_uiDrainManaTimer = 30000; + m_uiFrostboltTimer = 0; + m_uiIceTombTimer = 15000; + m_uiDrainLifeTimer = 20000; } - void UpdateAI(const uint32 diff) + void UpdateAI(const uint32 uiDiff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - //Frostbolt - if (Frostbolt_Timer < diff) + // Frostbolt + if (m_uiFrostboltTimer < uiDiff) { - if (rand()%100 < 90) - DoCastSpellIfCan(m_creature->getVictim(),SPELL_FROSTBOLT); - - Frostbolt_Timer = 3500; - }else Frostbolt_Timer -= diff; - - //IceTomb - if (IceTomb_Timer < diff) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, SPELL_FROSTBOLT) == CAST_OK) + m_uiFrostboltTimer = urand(3000, 4000); + } + } + else + m_uiFrostboltTimer -= uiDiff; + + // IceTomb + if (m_uiIceTombTimer < uiDiff) { - if (rand()%100 < 65) - DoCastSpellIfCan(m_creature->getVictim(),SPELL_ICETOMB); - - IceTomb_Timer = 28000; - }else IceTomb_Timer -= diff; - - //DrainLife - if (DrainLife_Timer < diff) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1)) + { + if (DoCastSpellIfCan(pTarget, SPELL_ICE_TOMB) == CAST_OK) + m_uiIceTombTimer = urand(15000, 20000); + } + } + else + m_uiIceTombTimer -= uiDiff; + + // Drain Life + if (m_uiDrainLifeTimer < uiDiff) { - if (rand()%100 < 55) - DoCastSpellIfCan(m_creature->getVictim(),SPELL_DRAIN_LIFE); - - DrainLife_Timer = 31000; - }else DrainLife_Timer -= diff; + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, SPELL_DRAIN_LIFE) == CAST_OK) + m_uiDrainLifeTimer = urand(15000, 20000); + } + } + else + m_uiDrainLifeTimer -= uiDiff; + + // Drain mana + if (m_uiDrainManaTimer < uiDiff) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0, SPELL_DRAIN_MANA, SELECT_FLAG_POWER_MANA)) + { + if (DoCastSpellIfCan(pTarget, SPELL_DRAIN_MANA) == CAST_OK) + m_uiDrainManaTimer = urand(20000, 30000); + } + } + else + m_uiDrainManaTimer -= uiDiff; DoMeleeAttackIfReady(); } }; + CreatureAI* GetAI_boss_maleki_the_pallid(Creature* pCreature) { return new boss_maleki_the_pallidAI(pCreature); diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 770c05bca..809caa70d 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2456" + #define SD2_REVISION_NR "2457" #endif // __SD2_REVISION_NR_H__ From 64a8ffad3d8d6af3f88c771966f94a897a9d4a49 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sun, 12 Feb 2012 17:22:11 +0200 Subject: [PATCH 0446/1172] [2458] Cleanup and improvement for Cannon Master Willey Note: spell 17279 requires script target --- .../stratholme/boss_cannon_master_willey.cpp | 203 +++++------------- sd2_revision_nr.h | 2 +- 2 files changed, 54 insertions(+), 151 deletions(-) diff --git a/scripts/eastern_kingdoms/stratholme/boss_cannon_master_willey.cpp b/scripts/eastern_kingdoms/stratholme/boss_cannon_master_willey.cpp index 172001c67..2e610cc9a 100644 --- a/scripts/eastern_kingdoms/stratholme/boss_cannon_master_willey.cpp +++ b/scripts/eastern_kingdoms/stratholme/boss_cannon_master_willey.cpp @@ -23,183 +23,86 @@ EndScriptData */ #include "precompiled.h" -//front, left -#define ADD_1X 3553.851807f -#define ADD_1Y -2945.885986f -#define ADD_1Z 125.001015f -#define ADD_1O 0.592007f -//front, right -#define ADD_2X 3559.206299f -#define ADD_2Y -2952.929932f -#define ADD_2Z 125.001015f -#define ADD_2O 0.592007f -//mid, left -#define ADD_3X 3552.417480f -#define ADD_3Y -2948.667236f -#define ADD_3Z 125.001015f -#define ADD_3O 0.592007f -//mid, right -#define ADD_4X 3555.651855f -#define ADD_4Y -2953.519043f -#define ADD_4Z 125.001015f -#define ADD_4O 0.592007f -//back, left -#define ADD_5X 3547.927246f -#define ADD_5Y -2950.977295f -#define ADD_5Z 125.001015f -#define ADD_5O 0.592007f -//back, mid -#define ADD_6X 3553.094697f -#define ADD_6Y -2952.123291f -#define ADD_6Z 125.001015f -#define ADD_6O 0.592007f -//back, right -#define ADD_7X 3552.727539f -#define ADD_7Y -2957.776123f -#define ADD_7Z 125.001015f -#define ADD_7O 0.592007f -//behind, left -#define ADD_8X 3547.156250f -#define ADD_8Y -2953.162354f -#define ADD_8Z 125.001015f -#define ADD_8O 0.592007f -//behind, right -#define ADD_9X 3550.202148f -#define ADD_9Y -2957.437744f -#define ADD_9Z 125.001015f -#define ADD_9O 0.592007f - -#define SPELL_KNOCKAWAY 10101 -#define SPELL_PUMMEL 15615 -#define SPELL_SHOOT 20463 -//#define SPELL_SUMMONCRIMSONRIFLEMAN 17279 +enum +{ + SPELL_KNOCK_AWAY = 10101, + SPELL_PUMMEL = 15615, + SPELL_SHOOT = 16496, + SPELL_SUMMON_RIFLEMAN = 17279, // spell needs script target +}; struct MANGOS_DLL_DECL boss_cannon_master_willeyAI : public ScriptedAI { - boss_cannon_master_willeyAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + boss_cannon_master_willeyAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } - uint32 KnockAway_Timer; - uint32 Pummel_Timer; - uint32 Shoot_Timer; - uint32 SummonRifleman_Timer; + uint32 m_uiKnockAwayTimer; + uint32 m_uiPummelTimer; + uint32 m_uiShootTimer; + uint32 m_uiSummonRiflemanTimer; void Reset() { - Shoot_Timer = 1000; - Pummel_Timer = 7000; - KnockAway_Timer = 11000; - SummonRifleman_Timer = 15000; + m_uiShootTimer = 1000; + m_uiPummelTimer = 7000; + m_uiKnockAwayTimer = 11000; + m_uiSummonRiflemanTimer = 15000; } - void JustDied(Unit* Victim) + void JustSummoned(Creature* pSummoned) { - m_creature->SummonCreature(11054,ADD_1X,ADD_1Y,ADD_1Z,ADD_1O,TEMPSUMMON_TIMED_DESPAWN,240000); - m_creature->SummonCreature(11054,ADD_2X,ADD_2Y,ADD_2Z,ADD_2O,TEMPSUMMON_TIMED_DESPAWN,240000); - m_creature->SummonCreature(11054,ADD_3X,ADD_3Y,ADD_3Z,ADD_3O,TEMPSUMMON_TIMED_DESPAWN,240000); - m_creature->SummonCreature(11054,ADD_4X,ADD_4Y,ADD_4Z,ADD_4O,TEMPSUMMON_TIMED_DESPAWN,240000); - m_creature->SummonCreature(11054,ADD_5X,ADD_5Y,ADD_5Z,ADD_5O,TEMPSUMMON_TIMED_DESPAWN,240000); - m_creature->SummonCreature(11054,ADD_7X,ADD_7Y,ADD_7Z,ADD_7O,TEMPSUMMON_TIMED_DESPAWN,240000); - m_creature->SummonCreature(11054,ADD_9X,ADD_9Y,ADD_9Z,ADD_9O,TEMPSUMMON_TIMED_DESPAWN,240000); + if (m_creature->getVictim()) + pSummoned->AI()->AttackStart(m_creature->getVictim()); } - void UpdateAI(const uint32 diff) + void UpdateAI(const uint32 uiDiff) { //Return since we have no target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - //Pummel - if (Pummel_Timer < diff) + // Pummel + if (m_uiPummelTimer < uiDiff) { - //Cast - if (rand()%100 < 90) //90% chance to cast - { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_PUMMEL); - } - //12 seconds until we should cast this again - Pummel_Timer = 12000; - }else Pummel_Timer -= diff; - - //KnockAway - if (KnockAway_Timer < diff) + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_PUMMEL) == CAST_OK) + m_uiPummelTimer = 12000; + } + else + m_uiPummelTimer -= uiDiff; + + // KnockAway + if (m_uiKnockAwayTimer < uiDiff) { - //Cast - if (rand()%100 < 80) //80% chance to cast + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_KNOCK_AWAY) == CAST_OK) + m_uiKnockAwayTimer = 14000; + } + else + m_uiKnockAwayTimer -= uiDiff; + + // Shoot + if (m_uiShootTimer < uiDiff) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0, SPELL_SHOOT, SELECT_FLAG_NOT_IN_MELEE_RANGE)) { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_KNOCKAWAY); + if (DoCastSpellIfCan(pTarget, SPELL_SHOOT) == CAST_OK) + m_uiShootTimer = urand(3000, 4000); } - //14 seconds until we should cast this again - KnockAway_Timer = 14000; - }else KnockAway_Timer -= diff; + } + else + m_uiShootTimer -= uiDiff; - //Shoot - if (Shoot_Timer < diff) - { - //Cast - DoCastSpellIfCan(m_creature->getVictim(),SPELL_SHOOT); - //1 seconds until we should cast this again - Shoot_Timer = 1000; - }else Shoot_Timer -= diff; - - //SummonRifleman - if (SummonRifleman_Timer < diff) + // SummonRifleman + if (m_uiSummonRiflemanTimer < uiDiff) { - //Cast - switch(urand(0, 8)) - { - case 0: - m_creature->SummonCreature(11054,ADD_1X,ADD_1Y,ADD_1Z,ADD_1O,TEMPSUMMON_TIMED_DESPAWN,240000); - m_creature->SummonCreature(11054,ADD_2X,ADD_2Y,ADD_2Z,ADD_2O,TEMPSUMMON_TIMED_DESPAWN,240000); - m_creature->SummonCreature(11054,ADD_4X,ADD_4Y,ADD_4Z,ADD_4O,TEMPSUMMON_TIMED_DESPAWN,240000); - break; - case 1: - m_creature->SummonCreature(11054,ADD_2X,ADD_2Y,ADD_2Z,ADD_2O,TEMPSUMMON_TIMED_DESPAWN,240000); - m_creature->SummonCreature(11054,ADD_3X,ADD_3Y,ADD_3Z,ADD_3O,TEMPSUMMON_TIMED_DESPAWN,240000); - m_creature->SummonCreature(11054,ADD_5X,ADD_5Y,ADD_5Z,ADD_5O,TEMPSUMMON_TIMED_DESPAWN,240000); - break; - case 2: - m_creature->SummonCreature(11054,ADD_3X,ADD_3Y,ADD_3Z,ADD_3O,TEMPSUMMON_TIMED_DESPAWN,240000); - m_creature->SummonCreature(11054,ADD_4X,ADD_4Y,ADD_4Z,ADD_4O,TEMPSUMMON_TIMED_DESPAWN,240000); - m_creature->SummonCreature(11054,ADD_6X,ADD_6Y,ADD_6Z,ADD_6O,TEMPSUMMON_TIMED_DESPAWN,240000); - break; - case 3: - m_creature->SummonCreature(11054,ADD_4X,ADD_4Y,ADD_4Z,ADD_4O,TEMPSUMMON_TIMED_DESPAWN,240000); - m_creature->SummonCreature(11054,ADD_5X,ADD_5Y,ADD_5Z,ADD_5O,TEMPSUMMON_TIMED_DESPAWN,240000); - m_creature->SummonCreature(11054,ADD_7X,ADD_7Y,ADD_7Z,ADD_7O,TEMPSUMMON_TIMED_DESPAWN,240000); - break; - case 4: - m_creature->SummonCreature(11054,ADD_5X,ADD_5Y,ADD_5Z,ADD_5O,TEMPSUMMON_TIMED_DESPAWN,240000); - m_creature->SummonCreature(11054,ADD_6X,ADD_6Y,ADD_6Z,ADD_6O,TEMPSUMMON_TIMED_DESPAWN,240000); - m_creature->SummonCreature(11054,ADD_8X,ADD_8Y,ADD_8Z,ADD_8O,TEMPSUMMON_TIMED_DESPAWN,240000); - break; - case 5: - m_creature->SummonCreature(11054,ADD_6X,ADD_6Y,ADD_6Z,ADD_6O,TEMPSUMMON_TIMED_DESPAWN,240000); - m_creature->SummonCreature(11054,ADD_7X,ADD_7Y,ADD_7Z,ADD_7O,TEMPSUMMON_TIMED_DESPAWN,240000); - m_creature->SummonCreature(11054,ADD_9X,ADD_9Y,ADD_9Z,ADD_9O,TEMPSUMMON_TIMED_DESPAWN,240000); - break; - case 6: - m_creature->SummonCreature(11054,ADD_7X,ADD_7Y,ADD_7Z,ADD_7O,TEMPSUMMON_TIMED_DESPAWN,240000); - m_creature->SummonCreature(11054,ADD_8X,ADD_8Y,ADD_8Z,ADD_8O,TEMPSUMMON_TIMED_DESPAWN,240000); - m_creature->SummonCreature(11054,ADD_1X,ADD_1Y,ADD_1Z,ADD_1O,TEMPSUMMON_TIMED_DESPAWN,240000); - break; - case 7: - m_creature->SummonCreature(11054,ADD_8X,ADD_8Y,ADD_8Z,ADD_8O,TEMPSUMMON_TIMED_DESPAWN,240000); - m_creature->SummonCreature(11054,ADD_9X,ADD_9Y,ADD_9Z,ADD_9O,TEMPSUMMON_TIMED_DESPAWN,240000); - m_creature->SummonCreature(11054,ADD_2X,ADD_2Y,ADD_2Z,ADD_2O,TEMPSUMMON_TIMED_DESPAWN,240000); - break; - case 8: - m_creature->SummonCreature(11054,ADD_9X,ADD_9Y,ADD_9Z,ADD_9O,TEMPSUMMON_TIMED_DESPAWN,240000); - m_creature->SummonCreature(11054,ADD_1X,ADD_1Y,ADD_1Z,ADD_1O,TEMPSUMMON_TIMED_DESPAWN,240000); - m_creature->SummonCreature(11054,ADD_3X,ADD_3Y,ADD_3Z,ADD_3O,TEMPSUMMON_TIMED_DESPAWN,240000); - break; - } - //30 seconds until we should cast this again - SummonRifleman_Timer = 30000; - }else SummonRifleman_Timer -= diff; + if (DoCastSpellIfCan(m_creature, SPELL_SUMMON_RIFLEMAN) == CAST_OK) + m_uiSummonRiflemanTimer = 30000; + } + else + m_uiSummonRiflemanTimer -= uiDiff; DoMeleeAttackIfReady(); } }; + CreatureAI* GetAI_boss_cannon_master_willey(Creature* pCreature) { return new boss_cannon_master_willeyAI(pCreature); diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 809caa70d..2e5ecf386 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2457" + #define SD2_REVISION_NR "2458" #endif // __SD2_REVISION_NR_H__ From de021dca0caeaef8ccb5ab22d2fd602c4d9e40d0 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sun, 12 Feb 2012 18:38:06 +0200 Subject: [PATCH 0447/1172] [2459] Implement spawn support for Postmaster Malown --- .../stratholme/instance_stratholme.cpp | 16 +++++++- .../stratholme/stratholme.cpp | 41 +++++++++++++++++++ .../eastern_kingdoms/stratholme/stratholme.h | 6 ++- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 + sql/updates/r2459_mangos.sql | 1 + 6 files changed, 64 insertions(+), 3 deletions(-) create mode 100644 sql/updates/r2459_mangos.sql diff --git a/scripts/eastern_kingdoms/stratholme/instance_stratholme.cpp b/scripts/eastern_kingdoms/stratholme/instance_stratholme.cpp index 540912ada..c5c5d9ae3 100644 --- a/scripts/eastern_kingdoms/stratholme/instance_stratholme.cpp +++ b/scripts/eastern_kingdoms/stratholme/instance_stratholme.cpp @@ -30,7 +30,8 @@ instance_stratholme::instance_stratholme(Map* pMap) : ScriptedInstance(pMap), m_uiMindlessSummonTimer(0), m_uiSlaugtherSquareTimer(0), m_uiYellCounter(0), - m_uiMindlessCount(0) + m_uiMindlessCount(0), + m_uiPostboxesUsed(0) { Initialize(); } @@ -360,6 +361,18 @@ void instance_stratholme::SetData(uint32 uiType, uint32 uiData) // No need to save anything here, so return return; + case TYPE_POSTMASTER: + m_auiEncounter[uiType] = uiData; + if (uiData == IN_PROGRESS) + { + ++m_uiPostboxesUsed; + + // After the second post box prepare to spawn the Post Master + if (m_uiPostboxesUsed == 2) + SetData(TYPE_POSTMASTER, SPECIAL); + } + // No need to save anything here, so return + return; case TYPE_SH_AELMAR: m_bIsSilverHandDead[0] = (uiData) ? true : false; @@ -439,6 +452,7 @@ uint32 instance_stratholme::GetData(uint32 uiType) case TYPE_RAMSTEIN: case TYPE_BARON: case TYPE_BARTHILAS_RUN: + case TYPE_POSTMASTER: return m_auiEncounter[uiType]; default: return 0; diff --git a/scripts/eastern_kingdoms/stratholme/stratholme.cpp b/scripts/eastern_kingdoms/stratholme/stratholme.cpp index e9502d62e..d98345f53 100644 --- a/scripts/eastern_kingdoms/stratholme/stratholme.cpp +++ b/scripts/eastern_kingdoms/stratholme/stratholme.cpp @@ -22,7 +22,9 @@ SDCategory: Stratholme EndScriptData */ /* ContentData +go_service_gate go_gauntlet_gate +go_stratholme_postbox mob_freed_soul mob_restless_soul mobs_spectral_ghostly_citizen @@ -86,6 +88,40 @@ bool GOUse_go_gauntlet_gate(Player* pPlayer, GameObject* pGo) return false; } +/*###### +## go_stratholme_postbox +######*/ + +bool GOUse_go_stratholme_postbox(Player* pPlayer, GameObject* pGo) +{ + ScriptedInstance* pInstance = (ScriptedInstance*)pGo->GetInstanceData(); + + if (!pInstance) + return false; + + if (pInstance->GetData(TYPE_POSTMASTER) == DONE) + return false; + + // When the data is Special, spawn the postmaster + if (pInstance->GetData(TYPE_POSTMASTER) == SPECIAL) + { + pPlayer->CastSpell(pPlayer, SPELL_SUMMON_POSTMASTER, true); + pInstance->SetData(TYPE_POSTMASTER, DONE); + } + else + pInstance->SetData(TYPE_POSTMASTER, IN_PROGRESS); + + // Summon 3 postmen for each postbox + float fX, fY, fZ; + for (uint8 i = 0; i < 3; ++i) + { + pPlayer->GetRandomPoint(pPlayer->GetPositionX(), pPlayer->GetPositionY(), pPlayer->GetPositionZ(), 3.0f, fX, fY, fZ); + pPlayer->SummonCreature(NPC_UNDEAD_POSTMAN, fX, fY, fZ, 0.0f, TEMPSUMMON_DEAD_DESPAWN, 0); + } + + return false; +} + /*###### ## mob_freed_soul ######*/ @@ -303,6 +339,11 @@ void AddSC_stratholme() pNewScript->pGOUse = &GOUse_go_gauntlet_gate; pNewScript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "go_stratholme_postbox"; + pNewScript->pGOUse = &GOUse_go_stratholme_postbox; + pNewScript->RegisterSelf(); + pNewScript = new Script; pNewScript->Name = "mob_freed_soul"; pNewScript->GetAI = &GetAI_mob_freed_soul; diff --git a/scripts/eastern_kingdoms/stratholme/stratholme.h b/scripts/eastern_kingdoms/stratholme/stratholme.h index 4b0906c9b..b7476001f 100644 --- a/scripts/eastern_kingdoms/stratholme/stratholme.h +++ b/scripts/eastern_kingdoms/stratholme/stratholme.h @@ -7,7 +7,7 @@ enum { - MAX_ENCOUNTER = 8, + MAX_ENCOUNTER = 9, MAX_SILVERHAND = 5, MAX_ZIGGURATS = 3, @@ -19,6 +19,7 @@ enum TYPE_BARON = 5, TYPE_BARTHILAS_RUN = 6, TYPE_BLACK_GUARDS = 7, + TYPE_POSTMASTER = 8, TYPE_SH_QUEST = 20, TYPE_SH_CATHELA = 21, @@ -46,6 +47,7 @@ enum NPC_CRIMSON_GALLANT = 10424, NPC_CRIMSON_GUARDSMAN = 10418, NPC_CRIMSON_CONJURER = 10419, + NPC_UNDEAD_POSTMAN = 11142, GO_SERVICE_ENTRANCE = 175368, GO_GAUNTLET_GATE1 = 175357, @@ -62,6 +64,7 @@ enum QUEST_DEAD_MAN_PLEA = 8945, SPELL_BARON_ULTIMATUM = 27861, + SPELL_SUMMON_POSTMASTER = 24627, SAY_ANNOUNCE_ZIGGURAT_1 = -1329004, SAY_ANNOUNCE_ZIGGURAT_2 = -1329005, @@ -147,6 +150,7 @@ class MANGOS_DLL_DECL instance_stratholme : public ScriptedInstance uint32 m_uiYellCounter; uint32 m_uiMindlessCount; + uint8 m_uiPostboxesUsed; ZigguratStore m_zigguratStorage[MAX_ZIGGURATS]; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 2e5ecf386..6bf64382a 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2458" + #define SD2_REVISION_NR "2459" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 40aa834b6..5f204f4d5 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -1035,6 +1035,7 @@ UPDATE creature_template SET ScriptName='mob_restless_soul' WHERE entry=11122; UPDATE creature_template SET ScriptName='mob_freed_soul' WHERE entry=11136; UPDATE gameobject_template SET ScriptName='go_gauntlet_gate' WHERE entry=175357; UPDATE gameobject_template SET ScriptName='go_service_gate' WHERE entry=175368; +UPDATE gameobject_template SET ScriptName='go_stratholme_postbox' WHERE entry IN (176346,176349,176350,176351,176352,176353); /* SUNKEN TEMPLE */ UPDATE instance_template SET ScriptName='instance_sunken_temple' WHERE map=109; diff --git a/sql/updates/r2459_mangos.sql b/sql/updates/r2459_mangos.sql new file mode 100644 index 000000000..89de25071 --- /dev/null +++ b/sql/updates/r2459_mangos.sql @@ -0,0 +1 @@ +UPDATE gameobject_template SET ScriptName='go_stratholme_postbox' WHERE entry IN (176346,176349,176350,176351,176352,176353); From 2784781e8eaeaf44d699dadd3ccf9bc628387c50 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sun, 12 Feb 2012 21:12:51 +0200 Subject: [PATCH 0448/1172] [2460] Cleanup and improve script support for quest 9737 --- .../stratholme/boss_order_of_silver_hand.cpp | 167 ++++++++++-------- .../stratholme/instance_stratholme.cpp | 36 ++-- .../eastern_kingdoms/stratholme/stratholme.h | 18 +- sd2_revision_nr.h | 2 +- 4 files changed, 123 insertions(+), 100 deletions(-) diff --git a/scripts/eastern_kingdoms/stratholme/boss_order_of_silver_hand.cpp b/scripts/eastern_kingdoms/stratholme/boss_order_of_silver_hand.cpp index 4f4452d1f..9c2b51eb1 100644 --- a/scripts/eastern_kingdoms/stratholme/boss_order_of_silver_hand.cpp +++ b/scripts/eastern_kingdoms/stratholme/boss_order_of_silver_hand.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: Boss_Silver_Hand_Bosses -SD%Complete: 40 -SDComment: Basic script to have support for Horde paladin epic mount (quest 9737). All 5 members of Order of the Silver Hand running this script (least for now) +SD%Complete: 80 +SDComment: Timers; Not sure if we need to respawn dead npcs on evade; May need additional adjustments / research SDCategory: Stratholme EndScriptData */ @@ -31,112 +31,141 @@ EndScriptData */ # Once Aurius is defeated, he should be the one summoning the ghosts. #####*/ -#define SH_GREGOR 17910 -#define SH_CATHELA 17911 -#define SH_NEMAS 17912 -#define SH_AELMAR 17913 -#define SH_VICAR 17914 -#define SH_QUEST_CREDIT 17915 +enum +{ + // Gregor + SPELL_HAMMER_JUSTICE = 13005, + SPELL_HAMMER_WRATH = 32772, + SPELL_HOLY_SHOCK = 32771, + // Cathela + SPELL_HOLY_SHIELD = 32777, + SPELL_REDOUBT = 32776, + // Aelmar + SPELL_JUDGEMENT = 32778, + // Vicar + SPELL_BLESSING = 32770, + SPELL_HOLY_LIGHT = 32769, + + TARGET_TYPE_RANDOM = 0, + TARGET_TYPE_VICTIM = 1, + TARGET_TYPE_SELF = 2, + TARGET_TYPE_FRIENDLY = 3, +}; -#define SPELL_HOLY_LIGHT 25263 -#define SPELL_DIVINE_SHIELD 13874 +struct SilverHandAbilityStruct +{ + uint32 m_uiCreatureEntry, m_uiSpellId; + uint8 m_uiTargetType; + uint32 m_uiInitialTimer, m_uiCooldown; +}; +static SilverHandAbilityStruct m_aSilverHandAbility[8] = +{ + {NPC_GREGOR_THE_JUSTICIAR, SPELL_HAMMER_JUSTICE, TARGET_TYPE_RANDOM, 2000, 15000}, + {NPC_GREGOR_THE_JUSTICIAR, SPELL_HAMMER_WRATH, TARGET_TYPE_RANDOM, 10000, 15000}, + {NPC_GREGOR_THE_JUSTICIAR, SPELL_HOLY_SHOCK, TARGET_TYPE_RANDOM, 4000, 7000}, + {NPC_CATHELA_THE_SEEKER, SPELL_HOLY_SHIELD, TARGET_TYPE_SELF, 1000, 60000}, + {NPC_CATHELA_THE_SEEKER, SPELL_REDOUBT, TARGET_TYPE_SELF, 5000, 15000}, + {NPC_AELMAR_THE_VANQUISHER, SPELL_JUDGEMENT, TARGET_TYPE_VICTIM, 4000, 9000}, + {NPC_VICAR_HYERONIMUS, SPELL_BLESSING, TARGET_TYPE_FRIENDLY, 2000, 13000}, + {NPC_VICAR_HYERONIMUS, SPELL_HOLY_LIGHT, TARGET_TYPE_FRIENDLY, 5000, 9000}, +}; struct MANGOS_DLL_DECL boss_silver_hand_bossesAI : public ScriptedAI { boss_silver_hand_bossesAI(Creature* pCreature) : ScriptedAI(pCreature) { - m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_pInstance = (instance_stratholme*)pCreature->GetInstanceData(); + for (uint8 i = 0; i < sizeof(m_aSilverHandAbility); ++i) + { + if (m_aSilverHandAbility[i].m_uiCreatureEntry == m_creature->GetEntry()) + m_mSpellTimers[i] = m_aSilverHandAbility[i].m_uiInitialTimer; + } Reset(); } - ScriptedInstance* m_pInstance; + instance_stratholme* m_pInstance; - uint32 HolyLight_Timer; - uint32 DivineShield_Timer; + UNORDERED_MAP m_mSpellTimers; void Reset() { - HolyLight_Timer = 20000; - DivineShield_Timer = 20000; + for (UNORDERED_MAP::iterator itr = m_mSpellTimers.begin(); itr != m_mSpellTimers.end(); ++itr) + itr->second = m_aSilverHandAbility[itr->first].m_uiInitialTimer; + } + void JustDied(Unit* pKiller) + { if (m_pInstance) { - switch(m_creature->GetEntry()) + // Set data to special when each paladin dies + m_pInstance->SetData(TYPE_TRUE_MASTERS, SPECIAL); + + // For the last one which dies, give the quest credit + if (m_pInstance->GetData(TYPE_TRUE_MASTERS) == DONE) { - case SH_AELMAR: - m_pInstance->SetData(TYPE_SH_AELMAR, 0); - break; - case SH_CATHELA: - m_pInstance->SetData(TYPE_SH_CATHELA, 0); - break; - case SH_GREGOR: - m_pInstance->SetData(TYPE_SH_GREGOR, 0); - break; - case SH_NEMAS: - m_pInstance->SetData(TYPE_SH_NEMAS, 0); - break; - case SH_VICAR: - m_pInstance->SetData(TYPE_SH_VICAR, 0); - break; + if (pKiller->GetTypeId() == TYPEID_PLAYER) + { + if (Creature* pCredit = m_pInstance->GetSingleCreatureFromStorage(NPC_PALADIN_QUEST_CREDIT)) + ((Player*)pKiller)->KilledMonsterCredit(NPC_PALADIN_QUEST_CREDIT, pCredit->GetObjectGuid()); + } } } } - void JustDied(Unit* Killer) + bool CanUseSpecialAbility(uint32 uiIndex) { - if (m_pInstance) + Unit* pTarget = NULL; + + switch(m_aSilverHandAbility[uiIndex].m_uiTargetType) { - switch(m_creature->GetEntry()) - { - case SH_AELMAR: - m_pInstance->SetData(TYPE_SH_AELMAR, 2); - break; - case SH_CATHELA: - m_pInstance->SetData(TYPE_SH_CATHELA, 2); - break; - case SH_GREGOR: - m_pInstance->SetData(TYPE_SH_GREGOR, 2); - break; - case SH_NEMAS: - m_pInstance->SetData(TYPE_SH_NEMAS, 2); - break; - case SH_VICAR: - m_pInstance->SetData(TYPE_SH_VICAR, 2); - break; - } - if (m_pInstance->GetData(TYPE_SH_QUEST) && Killer->GetTypeId() == TYPEID_PLAYER) - ((Player*)Killer)->KilledMonsterCredit(SH_QUEST_CREDIT, m_creature->GetObjectGuid()); + case TARGET_TYPE_SELF: + pTarget = m_creature; + break; + case TARGET_TYPE_VICTIM: + pTarget = m_creature->getVictim(); + break; + case TARGET_TYPE_RANDOM: + pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0, m_aSilverHandAbility[uiIndex].m_uiSpellId, SELECT_FLAG_IN_LOS); + break; + case TARGET_TYPE_FRIENDLY: + pTarget = DoSelectLowestHpFriendly(10.0f); + break; + } + + if (pTarget) + { + if (DoCastSpellIfCan(pTarget, m_aSilverHandAbility[uiIndex].m_uiSpellId) == CAST_OK) + return true; } + + return false; } - void UpdateAI(const uint32 diff) + void UpdateAI(const uint32 uiDiff) { //Return since we have no target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - if (HolyLight_Timer < diff) + for (UNORDERED_MAP::iterator itr = m_mSpellTimers.begin(); itr != m_mSpellTimers.end(); ++itr) { - if (m_creature->GetHealthPercent() < 20.0f) + if (itr->second < uiDiff) { - DoCastSpellIfCan(m_creature, SPELL_HOLY_LIGHT); - HolyLight_Timer = 20000; - } - }else HolyLight_Timer -= diff; - - if (DivineShield_Timer < diff) - { - if (m_creature->GetHealthPercent() < 5.0f) - { - DoCastSpellIfCan(m_creature, SPELL_DIVINE_SHIELD); - DivineShield_Timer = 40000; + if (CanUseSpecialAbility(itr->first)) + { + itr->second = m_aSilverHandAbility[itr->first].m_uiCooldown; + break; + } } - }else DivineShield_Timer -= diff; + else + itr->second -= uiDiff; + } DoMeleeAttackIfReady(); } }; + CreatureAI* GetAI_boss_silver_hand_bossesAI(Creature* pCreature) { return new boss_silver_hand_bossesAI(pCreature); diff --git a/scripts/eastern_kingdoms/stratholme/instance_stratholme.cpp b/scripts/eastern_kingdoms/stratholme/instance_stratholme.cpp index c5c5d9ae3..14552b452 100644 --- a/scripts/eastern_kingdoms/stratholme/instance_stratholme.cpp +++ b/scripts/eastern_kingdoms/stratholme/instance_stratholme.cpp @@ -31,7 +31,8 @@ instance_stratholme::instance_stratholme(Map* pMap) : ScriptedInstance(pMap), m_uiSlaugtherSquareTimer(0), m_uiYellCounter(0), m_uiMindlessCount(0), - m_uiPostboxesUsed(0) + m_uiPostboxesUsed(0), + m_uiSilverHandKilled(0) { Initialize(); } @@ -39,7 +40,6 @@ instance_stratholme::instance_stratholme(Map* pMap) : ScriptedInstance(pMap), void instance_stratholme::Initialize() { memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); - memset(&m_bIsSilverHandDead, false, sizeof(m_bIsSilverHandDead)); } bool instance_stratholme::StartSlaugtherSquare() @@ -66,6 +66,7 @@ void instance_stratholme::OnCreatureCreate(Creature* pCreature) case NPC_BARON: case NPC_YSIDA_TRIGGER: case NPC_BARTHILAS: + case NPC_PALADIN_QUEST_CREDIT: m_mNpcEntryGuidStore[pCreature->GetEntry()] = pCreature->GetObjectGuid(); break; @@ -373,22 +374,18 @@ void instance_stratholme::SetData(uint32 uiType, uint32 uiData) } // No need to save anything here, so return return; + case TYPE_TRUE_MASTERS: + m_auiEncounter[uiType] = uiData; + if (uiData == SPECIAL) + { + ++m_uiSilverHandKilled; - case TYPE_SH_AELMAR: - m_bIsSilverHandDead[0] = (uiData) ? true : false; - break; - case TYPE_SH_CATHELA: - m_bIsSilverHandDead[1] = (uiData) ? true : false; - break; - case TYPE_SH_GREGOR: - m_bIsSilverHandDead[2] = (uiData) ? true : false; - break; - case TYPE_SH_NEMAS: - m_bIsSilverHandDead[3] = (uiData) ? true : false; - break; - case TYPE_SH_VICAR: - m_bIsSilverHandDead[4] = (uiData) ? true : false; - break; + // When the 5th paladin is killed set data to DONE in order to give the quest credit for the last paladin + if (m_uiSilverHandKilled == MAX_SILVERHAND) + SetData(TYPE_TRUE_MASTERS, DONE); + } + // No need to save anything here, so return + return; } if (uiData == DONE) @@ -441,10 +438,6 @@ uint32 instance_stratholme::GetData(uint32 uiType) { switch(uiType) { - case TYPE_SH_QUEST: - if (m_bIsSilverHandDead[0] && m_bIsSilverHandDead[1] && m_bIsSilverHandDead[2] && m_bIsSilverHandDead[3] && m_bIsSilverHandDead[4]) - return 1; - return 0; case TYPE_BARON_RUN: case TYPE_BARONESS: case TYPE_NERUB: @@ -453,6 +446,7 @@ uint32 instance_stratholme::GetData(uint32 uiType) case TYPE_BARON: case TYPE_BARTHILAS_RUN: case TYPE_POSTMASTER: + case TYPE_TRUE_MASTERS: return m_auiEncounter[uiType]; default: return 0; diff --git a/scripts/eastern_kingdoms/stratholme/stratholme.h b/scripts/eastern_kingdoms/stratholme/stratholme.h index b7476001f..ab0443d21 100644 --- a/scripts/eastern_kingdoms/stratholme/stratholme.h +++ b/scripts/eastern_kingdoms/stratholme/stratholme.h @@ -7,7 +7,7 @@ enum { - MAX_ENCOUNTER = 9, + MAX_ENCOUNTER = 10, MAX_SILVERHAND = 5, MAX_ZIGGURATS = 3, @@ -20,13 +20,7 @@ enum TYPE_BARTHILAS_RUN = 6, TYPE_BLACK_GUARDS = 7, TYPE_POSTMASTER = 8, - - TYPE_SH_QUEST = 20, - TYPE_SH_CATHELA = 21, - TYPE_SH_GREGOR = 22, - TYPE_SH_NEMAS = 23, - TYPE_SH_VICAR = 24, - TYPE_SH_AELMAR = 25, + TYPE_TRUE_MASTERS = 9, NPC_TIMMY_THE_CRUEL = 10808, NPC_BARTHILAS = 10435, @@ -48,6 +42,12 @@ enum NPC_CRIMSON_GUARDSMAN = 10418, NPC_CRIMSON_CONJURER = 10419, NPC_UNDEAD_POSTMAN = 11142, + NPC_GREGOR_THE_JUSTICIAR = 17910, // related to quest "True Masters of the Light" + NPC_CATHELA_THE_SEEKER = 17911, + NPC_NEMAS_THE_ARBITER = 17912, + NPC_AELMAR_THE_VANQUISHER = 17913, + NPC_VICAR_HYERONIMUS = 17914, + NPC_PALADIN_QUEST_CREDIT = 17915, GO_SERVICE_ENTRANCE = 175368, GO_GAUNTLET_GATE1 = 175357, @@ -140,7 +140,6 @@ class MANGOS_DLL_DECL instance_stratholme : public ScriptedInstance void ThazudinAcolyteJustDied( Creature* pCreature ); uint32 m_auiEncounter[MAX_ENCOUNTER]; - bool m_bIsSilverHandDead[MAX_SILVERHAND]; std::string m_strInstData; uint32 m_uiBaronRunTimer; @@ -151,6 +150,7 @@ class MANGOS_DLL_DECL instance_stratholme : public ScriptedInstance uint32 m_uiYellCounter; uint32 m_uiMindlessCount; uint8 m_uiPostboxesUsed; + uint8 m_uiSilverHandKilled; ZigguratStore m_zigguratStorage[MAX_ZIGGURATS]; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 6bf64382a..f70337405 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2459" + #define SD2_REVISION_NR "2460" #endif // __SD2_REVISION_NR_H__ From 42866429009d9efde6b03662ddc1288ed9e9b29a Mon Sep 17 00:00:00 2001 From: Xfurry Date: Mon, 13 Feb 2012 21:39:21 +0200 Subject: [PATCH 0449/1172] [2461] Implement doors for General Drakkisath - Blackrock Spire Also add some texts and spells for a future improvement of the stadium event --- .../blackrock_spire/blackrock_spire.h | 11 +++++- .../blackrock_spire/boss_gyth.cpp | 14 +++---- .../instance_blackrock_spire.cpp | 39 +++++++++++++++++-- sd2_revision_nr.h | 2 +- sql/scriptdev2_script_full.sql | 18 ++++++++- sql/updates/r2461_scriptdev2.sql | 17 ++++++++ 6 files changed, 85 insertions(+), 16 deletions(-) create mode 100644 sql/updates/r2461_scriptdev2.sql diff --git a/scripts/eastern_kingdoms/blackrock_spire/blackrock_spire.h b/scripts/eastern_kingdoms/blackrock_spire/blackrock_spire.h index 248e54bdf..73c9e4750 100644 --- a/scripts/eastern_kingdoms/blackrock_spire/blackrock_spire.h +++ b/scripts/eastern_kingdoms/blackrock_spire/blackrock_spire.h @@ -13,7 +13,7 @@ enum TYPE_ROOM_EVENT = 1, TYPE_EMBERSEER = 2, TYPE_FLAMEWREATH = 3, // Only summon once per instance - TYPE_GYTH = 4, + TYPE_STADIUM = 4, TYPE_VALTHALAK = 5, // Only summon once per instance NPC_SCARSHIELD_INFILTRATOR = 10299, @@ -22,7 +22,13 @@ enum NPC_PYROGUARD_EMBERSEER = 9816, NPC_BLACKHAND_INCANCERATOR = 10316, NPC_LORD_VICTOR_NEFARIUS = 10162, + NPC_REND_BLACKHAND = 10429, NPC_GYTH = 10339, + NPC_DRAKKISATH = 10363, + NPC_FIRE_TONGUE = 10372, // related to Gyth arena event + NPC_CHROMATIC_WHELP = 10442, + NPC_CHROMATIC_DRAGON = 10447, + NPC_BLACKHAND_ELITE = 10317, // Doors GO_EMBERSEER_IN = 175244, @@ -31,6 +37,8 @@ enum GO_GYTH_ENTRY_DOOR = 164726, GO_GYTH_COMBAT_DOOR = 175185, // control in boss_script, because will auto-close after each wave GO_GYTH_EXIT_DOOR = 175186, + GO_DRAKKISATH_DOOR_1 = 175946, + GO_DRAKKISATH_DOOR_2 = 175947, GO_ROOM_7_RUNE = 175194, GO_ROOM_3_RUNE = 175195, @@ -53,6 +61,7 @@ class MANGOS_DLL_DECL instance_blackrock_spire : public ScriptedInstance void OnObjectCreate(GameObject* pGo); void OnCreatureCreate(Creature* pCreature); + void OnCreatureDeath(Creature* pCreature); void SetData(uint32 uiType, uint32 uiData); void SetData64(uint32 uiType, uint64 uiData); diff --git a/scripts/eastern_kingdoms/blackrock_spire/boss_gyth.cpp b/scripts/eastern_kingdoms/blackrock_spire/boss_gyth.cpp index c5b0766fc..695355f67 100644 --- a/scripts/eastern_kingdoms/blackrock_spire/boss_gyth.cpp +++ b/scripts/eastern_kingdoms/blackrock_spire/boss_gyth.cpp @@ -26,6 +26,8 @@ EndScriptData */ enum { + SPELL_REND_MOUNTS = 16167, + SPELL_SUMMON_REND = 16328, SPELL_CORROSIVEACID = 20667, SPELL_FREEZE = 16350, // ID was wrong! SPELL_FLAMEBREATH = 20712, @@ -34,12 +36,6 @@ enum MODEL_ID_INVISIBLE = 11686, MODEL_ID_GYTH_MOUNTED = 9723, MODEL_ID_GYTH = 9806, - - NPC_FIRE_TONGUE = 10372, - NPC_CHROMATIC_WHELP = 10442, - NPC_CHROMATIC_DRAGON = 10447, - NPC_BLACKHAND_ELITE = 10317, - NPC_REND_BLACKHAND = 10429 }; struct MANGOS_DLL_DECL boss_gythAI : public ScriptedAI @@ -89,19 +85,19 @@ struct MANGOS_DLL_DECL boss_gythAI : public ScriptedAI void Aggro(Unit* pWho) { if (m_pInstance) - m_pInstance->SetData(TYPE_GYTH, IN_PROGRESS); + m_pInstance->SetData(TYPE_STADIUM, IN_PROGRESS); } void JustDied(Unit* pKiller) { if (m_pInstance) - m_pInstance->SetData(TYPE_GYTH, DONE); + m_pInstance->SetData(TYPE_STADIUM, DONE); } void JustReachedHome() { if (m_pInstance) - m_pInstance->SetData(TYPE_GYTH, FAIL); + m_pInstance->SetData(TYPE_STADIUM, FAIL); } void SummonCreatureWithRandomTarget(uint32 uiCreatureId) diff --git a/scripts/eastern_kingdoms/blackrock_spire/instance_blackrock_spire.cpp b/scripts/eastern_kingdoms/blackrock_spire/instance_blackrock_spire.cpp index cef7661ef..a63a6ba58 100644 --- a/scripts/eastern_kingdoms/blackrock_spire/instance_blackrock_spire.cpp +++ b/scripts/eastern_kingdoms/blackrock_spire/instance_blackrock_spire.cpp @@ -27,7 +27,24 @@ EndScriptData */ enum { AREATRIGGER_ENTER_UBRS = 2046, - AREATRIGGER_STADIUM = 2026 + AREATRIGGER_STADIUM = 2026, + + // Arena event dialogue - handled by instance + SAY_NEFARIUS_INTRO_1 = -1229004, + SAY_NEFARIUS_INTRO_2 = -1229005, + SAY_NEFARIUS_ATTACK_1 = -1229006, + SAY_REND_JOIN = -1229007, + SAY_NEFARIUS_ATTACK_2 = -1229008, + SAY_NEFARIUS_ATTACK_3 = -1229009, + SAY_NEFARIUS_ATTACK_4 = -1229010, + SAY_REND_LOSE_1 = -1229011, + SAY_REND_LOSE_2 = -1229012, + SAY_NEFARIUS_LOSE_3 = -1229013, + SAY_NEFARIUS_LOSE_4 = -1229014, + SAY_REND_ATTACK = -1229015, + SAY_NEFARIUS_WARCHIEF = -1229016, + SAY_NEFARIUS_BUFF_GYTH = -1229017, + SAY_NEFARIUS_VICTORY = -1229018, }; /* Areatrigger @@ -71,9 +88,11 @@ void instance_blackrock_spire::OnObjectCreate(GameObject* pGo) break; case GO_GYTH_ENTRY_DOOR: case GO_GYTH_COMBAT_DOOR: + case GO_DRAKKISATH_DOOR_1: + case GO_DRAKKISATH_DOOR_2: break; case GO_GYTH_EXIT_DOOR: - if (GetData(TYPE_GYTH) == DONE) + if (GetData(TYPE_STADIUM) == DONE) pGo->SetGoState(GO_STATE_ACTIVE); break; @@ -132,7 +151,7 @@ void instance_blackrock_spire::SetData(uint32 uiType, uint32 uiData) case TYPE_FLAMEWREATH: m_auiEncounter[2] = uiData; break; - case TYPE_GYTH: + case TYPE_STADIUM: if (uiData == IN_PROGRESS || uiData == FAIL) DoUseDoorOrButton(GO_GYTH_ENTRY_DOOR); else if (uiData == DONE) @@ -214,7 +233,7 @@ uint32 instance_blackrock_spire::GetData(uint32 uiType) case TYPE_ROOM_EVENT: return m_auiEncounter[0]; case TYPE_EMBERSEER: return m_auiEncounter[1]; case TYPE_FLAMEWREATH: return m_auiEncounter[2]; - case TYPE_GYTH: return m_auiEncounter[3]; + case TYPE_STADIUM: return m_auiEncounter[3]; case TYPE_VALTHALAK: return m_auiEncounter[4]; } return 0; @@ -241,6 +260,18 @@ void instance_blackrock_spire::DoSortRoomEventMobs() SetData(TYPE_ROOM_EVENT, IN_PROGRESS); } +void instance_blackrock_spire::OnCreatureDeath(Creature* pCreature) +{ + switch (pCreature->GetEntry()) + { + case NPC_DRAKKISATH: + // Just open the doors, don't save anything because it's the last boss + DoUseDoorOrButton(GO_DRAKKISATH_DOOR_1); + DoUseDoorOrButton(GO_DRAKKISATH_DOOR_2); + break; + } +} + InstanceData* GetInstanceData_instance_blackrock_spire(Map* pMap) { return new instance_blackrock_spire(pMap); diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index f70337405..1951e066d 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2460" + #define SD2_REVISION_NR "2461" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 613cde4a1..1f6cfdfe6 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -1061,7 +1061,23 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1229000,'%s begins to regain its strength!',0,2,0,0,'pyroguard EMOTE_BEGIN'), (-1229001,'%s is nearly at full strength!',0,2,0,0,'pyroguard EMOTE_NEAR'), (-1229002,'%s regains its power and breaks free of its bonds!',0,2,0,0,'pyroguard EMOTE_FULL'), -(-1229003,'Ha! Ha! Ha! Thank you for freeing me, fools. Now let me repay you by charring the flesh from your bones.',0,1,0,0,'pyroguard SAY_FREE'); +(-1229003,'Ha! Ha! Ha! Thank you for freeing me, fools. Now let me repay you by charring the flesh from your bones.',0,1,0,0,'pyroguard SAY_FREE'), + +(-1229004,'Excellent... it would appear as if the meddlesome insects have arrived just in time to feed my legion. Welcome, mortals!',0,1,0,0,'nefarius SAY_INTRO_1'), +(-1229005,'Let not even a drop of their blood remain upon the arena floor, my children. Feast on their souls!',0,1,0,0,'nefarius SAY_INTRO_2'), +(-1229006,'Foolsss...Kill the one in the dress!',0,1,0,0,'nefarius SAY_ATTACK_1'), +(-1229007,'Sire, let me join the fray! I shall tear their spines out with my bare hands!',0,1,0,0,'rend SAY_REND_JOIN'), +(-1229008,'Concentrate your attacks upon the healer!',0,1,0,0,'nefarius SAY_ATTACK_2'), +(-1229009,'Inconceivable!',0,1,0,0,'nefarius SAY_ATTACK_3'), +(-1229010,'Do not force my hand, children! I shall use your hides to line my boots.',0,1,0,0,'nefarius SAY_ATTACK_4'), +(-1229011,'Defilers!',0,1,0,0,'rend SAY_LOSE_1'), +(-1229012,'Impossible!',0,1,0,0,'rend SAY_LOSE_2'), +(-1229013,'Your efforts will prove fruitless. None shall stand in our way!',0,1,0,0,'nefarius SAY_LOSE_3'), +(-1229014,'THIS CANNOT BE!!! Rend, deal with these insects.',0,1,0,0,'nefarius SAY_LOSE_4'), +(-1229015,'With pleasure...',0,1,0,0,'rend SAY_REND_ATTACK'), +(-1229016,'The Warchief shall make quick work of you, mortals. Prepare yourselves!',0,1,0,0,'nefarius SAY_WARCHIEF'), +(-1229017,'Taste in my power!',0,1,0,0,'nefarius SAY_BUFF_GYTH'), +(-1229018,'Your victory shall be short lived. The days of both the Alliance and Horde are coming to an end. The next time we meet shall be the last.',0,1,0,0,'nefarius SAY_VICTORY'); -- -1 230 000 BLACKROCK DEPTHS INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES diff --git a/sql/updates/r2461_scriptdev2.sql b/sql/updates/r2461_scriptdev2.sql new file mode 100644 index 000000000..3b732bf90 --- /dev/null +++ b/sql/updates/r2461_scriptdev2.sql @@ -0,0 +1,17 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1229018 AND -1229004; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1229004,'Excellent... it would appear as if the meddlesome insects have arrived just in time to feed my legion. Welcome, mortals!',0,1,0,0,'nefarius SAY_INTRO_1'), +(-1229005,'Let not even a drop of their blood remain upon the arena floor, my children. Feast on their souls!',0,1,0,0,'nefarius SAY_INTRO_2'), +(-1229006,'Foolsss...Kill the one in the dress!',0,1,0,0,'nefarius SAY_ATTACK_1'), +(-1229007,'Sire, let me join the fray! I shall tear their spines out with my bare hands!',0,1,0,0,'rend SAY_REND_JOIN'), +(-1229008,'Concentrate your attacks upon the healer!',0,1,0,0,'nefarius SAY_ATTACK_2'), +(-1229009,'Inconceivable!',0,1,0,0,'nefarius SAY_ATTACK_3'), +(-1229010,'Do not force my hand, children! I shall use your hides to line my boots.',0,1,0,0,'nefarius SAY_ATTACK_4'), +(-1229011,'Defilers!',0,1,0,0,'rend SAY_LOSE_1'), +(-1229012,'Impossible!',0,1,0,0,'rend SAY_LOSE_2'), +(-1229013,'Your efforts will prove fruitless. None shall stand in our way!',0,1,0,0,'nefarius SAY_LOSE_3'), +(-1229014,'THIS CANNOT BE!!! Rend, deal with these insects.',0,1,0,0,'nefarius SAY_LOSE_4'), +(-1229015,'With pleasure...',0,1,0,0,'rend SAY_REND_ATTACK'), +(-1229016,'The Warchief shall make quick work of you, mortals. Prepare yourselves!',0,1,0,0,'nefarius SAY_WARCHIEF'), +(-1229017,'Taste in my power!',0,1,0,0,'nefarius SAY_BUFF_GYTH'), +(-1229018,'Your victory shall be short lived. The days of both the Alliance and Horde are coming to an end. The next time we meet shall be the last.',0,1,0,0,'nefarius SAY_VICTORY'); From e72c25d7418f6c7a80d88920478011c7bd257398 Mon Sep 17 00:00:00 2001 From: grz3s Date: Tue, 14 Feb 2012 01:04:01 +0200 Subject: [PATCH 0450/1172] [2462] Implement support for quest 994 Signed-off-by: Xfurry --- scripts/kalimdor/darkshore.cpp | 114 ++++++++++++++++++++++++++++++- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 + sql/scriptdev2_script_full.sql | 26 ++++++- sql/updates/r2462_mangos.sql | 1 + sql/updates/r2462_scriptdev2.sql | 25 +++++++ 6 files changed, 166 insertions(+), 3 deletions(-) create mode 100644 sql/updates/r2462_mangos.sql create mode 100644 sql/updates/r2462_scriptdev2.sql diff --git a/scripts/kalimdor/darkshore.cpp b/scripts/kalimdor/darkshore.cpp index ca6a33d09..d9b9bf7c7 100644 --- a/scripts/kalimdor/darkshore.cpp +++ b/scripts/kalimdor/darkshore.cpp @@ -17,7 +17,7 @@ /* ScriptData SDName: Darkshore SD%Complete: 100 -SDComment: Quest support: 731, 2078, 5321 +SDComment: Quest support: 731, 994, 2078, 5321 SDCategory: Darkshore EndScriptData */ @@ -25,6 +25,7 @@ EndScriptData */ npc_kerlonian npc_prospector_remtravel npc_threshwackonator +npc_volcor EndContentData */ #include "precompiled.h" @@ -380,6 +381,111 @@ bool GossipSelect_npc_threshwackonator(Player* pPlayer, Creature* pCreature, uin return true; } +/*###### ++# npc_volcor ++######*/ + +enum +{ + SAY_START = -1000789, + SAY_END = -1000790, + SAY_FIRST_AMBUSH = -1000791, + SAY_AGGRO_1 = -1000792, + SAY_AGGRO_2 = -1000793, + SAY_AGGRO_3 = -1000794, + + NPC_BLACKWOOD_SHAMAN = 2171, + NPC_BLACKWOOD_URSA = 2170, + + QUEST_ESCAPE_THROUGH_FORCE = 994 +}; + +struct SummonLocation +{ + float m_fX, m_fY, m_fZ, m_fO; +}; + +// Spawn locations +static const SummonLocation aVolcorSpawnLocs[] = +{ + {4630.2f, 22.6f, 70.1f, 2.4f}, + {4603.8f, 53.5f, 70.4f, 5.4f}, + {4627.5f, 100.4f, 62.7f, 5.8f}, + {4692.8f, 75.8f, 56.7f, 3.1f}, + {4747.8f, 152.8f, 54.6f, 2.4f}, + {4711.7f, 109.1f, 53.5f, 2.4f}, +}; + +struct MANGOS_DLL_DECL npc_volcorAI : public npc_escortAI +{ + npc_volcorAI(Creature* pCreature) : npc_escortAI(pCreature) { Reset(); } + + void Reset() { } + + void Aggro(Unit* pWho) + { + // shouldn't always use text on agro + switch(urand(0, 4)) + { + case 0: DoScriptText(SAY_AGGRO_1, m_creature); break; + case 1: DoScriptText(SAY_AGGRO_2, m_creature); break; + case 2: DoScriptText(SAY_AGGRO_3, m_creature); break; + } + } + + void JustSummoned(Creature* pSummoned) + { + pSummoned->AI()->AttackStart(m_creature); + } + + void WaypointReached(uint32 uiPointId) + { + switch (uiPointId) + { + case 4: + m_creature->SummonCreature(NPC_BLACKWOOD_SHAMAN, aVolcorSpawnLocs[0].m_fX, aVolcorSpawnLocs[0].m_fY, aVolcorSpawnLocs[0].m_fZ, aVolcorSpawnLocs[0].m_fO, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,20000); + m_creature->SummonCreature(NPC_BLACKWOOD_URSA, aVolcorSpawnLocs[1].m_fX, aVolcorSpawnLocs[1].m_fY, aVolcorSpawnLocs[1].m_fZ, aVolcorSpawnLocs[1].m_fO, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,20000); + break; + case 5: + DoScriptText(SAY_FIRST_AMBUSH, m_creature); + break; + case 10: + m_creature->SummonCreature(NPC_BLACKWOOD_SHAMAN, aVolcorSpawnLocs[2].m_fX, aVolcorSpawnLocs[2].m_fY, aVolcorSpawnLocs[2].m_fZ, aVolcorSpawnLocs[2].m_fO, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,20000); + m_creature->SummonCreature(NPC_BLACKWOOD_URSA, aVolcorSpawnLocs[3].m_fX, aVolcorSpawnLocs[3].m_fY, aVolcorSpawnLocs[3].m_fZ, aVolcorSpawnLocs[3].m_fO, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,20000); + case 12: + m_creature->SummonCreature(NPC_BLACKWOOD_URSA, aVolcorSpawnLocs[4].m_fX, aVolcorSpawnLocs[4].m_fY, aVolcorSpawnLocs[4].m_fZ, aVolcorSpawnLocs[4].m_fO, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 20000); + m_creature->SummonCreature(NPC_BLACKWOOD_URSA, aVolcorSpawnLocs[5].m_fX, aVolcorSpawnLocs[5].m_fY, aVolcorSpawnLocs[5].m_fZ, aVolcorSpawnLocs[5].m_fO, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 20000); + break; + case 14: + DoScriptText(SAY_END, m_creature); + if (Player* pPlayer = GetPlayerForEscort()) + pPlayer->GroupEventHappens(QUEST_ESCAPE_THROUGH_FORCE, m_creature); + break; + } + } +}; + +CreatureAI* GetAI_npc_volcor(Creature* pCreature) +{ + return new npc_volcorAI(pCreature); +} + +bool QuestAccept_npc_volcor(Player* pPlayer, Creature* pCreature, const Quest* pQuest) +{ + if (pQuest->GetQuestId() == QUEST_ESCAPE_THROUGH_FORCE) + { + pCreature->SetFactionTemporary(FACTION_ESCORT_A_NEUTRAL_ACTIVE, TEMPFACTION_RESTORE_RESPAWN); + pCreature->SetStandState(UNIT_STAND_STATE_STAND); + + DoScriptText(SAY_START, pCreature); + + if (npc_volcorAI* pEscortAI = dynamic_cast(pCreature->AI())) + pEscortAI->Start(false, pPlayer, pQuest); + } + + return true; +} + void AddSC_darkshore() { Script* pNewScript; @@ -402,4 +508,10 @@ void AddSC_darkshore() pNewScript->pGossipHello = &GossipHello_npc_threshwackonator; pNewScript->pGossipSelect = &GossipSelect_npc_threshwackonator; pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_volcor"; + pNewScript->GetAI = &GetAI_npc_volcor; + pNewScript->pQuestAcceptNPC = &QuestAccept_npc_volcor; + pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 1951e066d..029b469a8 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2461" + #define SD2_REVISION_NR "2462" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 5f204f4d5..13162a3fe 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -489,6 +489,7 @@ UPDATE creature_template SET ScriptName='npc_dalaran_guardian_mage' WHERE entry UPDATE creature_template SET ScriptName='npc_kerlonian' WHERE entry=11218; UPDATE creature_template SET ScriptName='npc_prospector_remtravel' WHERE entry=2917; UPDATE creature_template SET ScriptName='npc_threshwackonator' WHERE entry=6669; +UPDATE creature_template SET ScriptName='npc_volcor' WHERE entry=3692; /* DARNASSUS */ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 1f6cfdfe6..bb621b56e 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -845,7 +845,14 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1000785,'We made it! Thanks again! I\'m going to run ahead!',0,0,0,0,'melizza SAY_MELIZZA_FINISH'), (-1000786,'Hey Hornizz! I\'m back! And there are some people behind me who helped me out of a jam.',0,0,0,1,'melizza SAY_MELIZZA_1'), (-1000787,'We\'re going to have to scratch the Maraudines off our list. Too hard to work with...',0,0,0,1,'melizza SAY_MELIZZA_2'), -(-1000788,'Well, I\'m off to the Gelkis. They\'re not as dumb as the Maraudines, but they\'re more reasonable.',0,0,0,3,'melizza SAY_MELIZZA_3'); +(-1000788,'Well, I\'m off to the Gelkis. They\'re not as dumb as the Maraudines, but they\'re more reasonable.',0,0,0,3,'melizza SAY_MELIZZA_3'), + +(-1000789,'Well, now or never I suppose. Remember, once we get to the road safety, return to Terenthis to let him know we escaped.',0,0,0,0,'volcor SAY_START'), +(-1000790,'We made it, My friend. Remember to find Terenthis and let him know we\'re safe. Thank you again.',0,0,0,0,'volcor SAY_END'), +(-1000791,'Here they come.',0,0,0,0,'volcor SAY_FIRST_AMBUSH'), +(-1000792,'We can overcome these foul creatures.',0,0,0,0,'volcor SAY_AGGRO_1'), +(-1000793,'We shall earn our deaths at the very least!',0,0,0,0,'volcor SAY_AGGRO_2'), +(-1000794,'Don\'t give up! Fight, to the death!',0,0,0,0,'volcor SAY_AGGRO_3'); -- -1 033 000 SHADOWFANG KEEP INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES @@ -6373,4 +6380,21 @@ INSERT INTO script_waypoint VALUES (12277, 23, -1469.27, 2078.68, 63.1141, 0, ''), (12277, 24, -1507.21, 2115.12, 62.3578, 0, ''); +DELETE FROM script_waypoint WHERE entry=3692; +INSERT INTO script_waypoint VALUES +(3692, 1, 4608.54, -6.47, 69.69, 4000, 'SAY_START'), +(3692, 2, 4604.54, -5.17, 69.51, 0, ''), +(3692, 3, 4604.26, -2.02, 69.42, 0, ''), +(3692, 4, 4607.75, 3.79, 70.13, 1000, 'first ambush'), +(3692, 5, 4607.75, 3.79, 70.13, 0, 'SAY_FIRST_AMBUSH'), +(3692, 6, 4619.77, 27.47, 70.40, 0, ''), +(3692, 7, 4626.28, 42.46, 68.75, 0, ''), +(3692, 8, 4633.13, 51.17, 67.40, 0, ''), +(3692, 9, 4639.67, 79.03, 61.74, 0, ''), +(3692, 10, 4647.54, 94.25, 59.92, 0, 'second ambush'), +(3692, 11, 4682.08, 113.47, 54.83, 0, ''), +(3692, 12, 4705.28, 137.81, 53.36, 0, 'last ambush'), +(3692, 13, 4730.30, 158.76, 52.33, 0, ''), +(3692, 14, 4756.47, 195.65, 53.61, 10000, 'SAY_END'); + -- EOF diff --git a/sql/updates/r2462_mangos.sql b/sql/updates/r2462_mangos.sql new file mode 100644 index 000000000..982a3ac9a --- /dev/null +++ b/sql/updates/r2462_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_volcor' WHERE entry=3692; diff --git a/sql/updates/r2462_scriptdev2.sql b/sql/updates/r2462_scriptdev2.sql new file mode 100644 index 000000000..13857ce61 --- /dev/null +++ b/sql/updates/r2462_scriptdev2.sql @@ -0,0 +1,25 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1000794 AND -1000789; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1000789,'Well, now or never I suppose. Remember, once we get to the road safety, return to Terenthis to let him know we escaped.',0,0,0,0,'volcor SAY_START'), +(-1000790,'We made it, My friend. Remember to find Terenthis and let him know we\'re safe. Thank you again.',0,0,0,0,'volcor SAY_END'), +(-1000791,'Here they come.',0,0,0,0,'volcor SAY_FIRST_AMBUSH'), +(-1000792,'We can overcome these foul creatures.',0,0,0,0,'volcor SAY_AGGRO_1'), +(-1000793,'We shall earn our deaths at the very least!',0,0,0,0,'volcor SAY_AGGRO_2'), +(-1000794,'Don\'t give up! Fight, to the death!',0,0,0,0,'volcor SAY_AGGRO_3'); + +DELETE FROM script_waypoint WHERE entry=3692; +INSERT INTO script_waypoint VALUES +(3692, 1, 4608.54, -6.47, 69.69, 4000, 'SAY_START'), +(3692, 2, 4604.54, -5.17, 69.51, 0, ''), +(3692, 3, 4604.26, -2.02, 69.42, 0, ''), +(3692, 4, 4607.75, 3.79, 70.13, 1000, 'first ambush'), +(3692, 5, 4607.75, 3.79, 70.13, 0, 'SAY_FIRST_AMBUSH'), +(3692, 6, 4619.77, 27.47, 70.40, 0, ''), +(3692, 7, 4626.28, 42.46, 68.75, 0, ''), +(3692, 8, 4633.13, 51.17, 67.40, 0, ''), +(3692, 9, 4639.67, 79.03, 61.74, 0, ''), +(3692, 10, 4647.54, 94.25, 59.92, 0, 'second ambush'), +(3692, 11, 4682.08, 113.47, 54.83, 0, ''), +(3692, 12, 4705.28, 137.81, 53.36, 0, 'last ambush'), +(3692, 13, 4730.30, 158.76, 52.33, 0, ''), +(3692, 14, 4756.47, 195.65, 53.61, 10000, 'SAY_END'); From 04c93d005dcd23ec7c3a015ab4163e4ed98ea1c9 Mon Sep 17 00:00:00 2001 From: NeatElves Date: Tue, 14 Feb 2012 01:12:32 +0200 Subject: [PATCH 0451/1172] [2463] Remove obsolete script for quest 4296 Signed-off-by: Xfurry --- scripts/world/go_scripts.cpp | 24 +----------------------- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 - sql/updates/r2463_mangos.sql | 1 + 4 files changed, 3 insertions(+), 25 deletions(-) create mode 100644 sql/updates/r2463_mangos.sql diff --git a/scripts/world/go_scripts.cpp b/scripts/world/go_scripts.cpp index 2c3345ae3..cb153da18 100644 --- a/scripts/world/go_scripts.cpp +++ b/scripts/world/go_scripts.cpp @@ -17,7 +17,7 @@ /* ScriptData SDName: GO_Scripts SD%Complete: 100 -SDComment: Quest support: 4296, 5088, 5097, 5098, 5381, 6481, 10990, 10991, 10992, 12557, 14092/14076. Barov_journal->Teaches spell 26089 +SDComment: Quest support: 5088, 5097, 5098, 5381, 6481, 10990, 10991, 10992, 12557, 14092/14076. Barov_journal->Teaches spell 26089 SDCategory: Game Objects EndScriptData */ @@ -31,7 +31,6 @@ go_resonite_cask go_sacred_fire_of_life go_shrine_of_the_birds go_tablet_of_madness -go_tablet_of_the_seven go_tele_to_dalaran_crystal go_tele_to_violet_stand go_andorhal_tower @@ -318,22 +317,6 @@ bool GOUse_go_tablet_of_madness(Player* pPlayer, GameObject* pGo) return true; } -/*###### -## go_tablet_of_the_seven - OBSOLETE -######*/ - -//TODO: use gossip option ("Transcript the Tablet") instead, if Mangos adds support. -bool GOUse_go_tablet_of_the_seven(Player* pPlayer, GameObject* pGo) -{ - if (pGo->GetGoType() != GAMEOBJECT_TYPE_QUESTGIVER) - return true; - - if (pPlayer->GetQuestStatus(4296) == QUEST_STATUS_INCOMPLETE) - pPlayer->CastSpell(pPlayer, 15065, false); - - return true; -} - /*###### ## go_tele_to_dalaran_crystal ######*/ @@ -567,11 +550,6 @@ void AddSC_go_scripts() pNewScript->pGOUse = &GOUse_go_tablet_of_madness; pNewScript->RegisterSelf(); - pNewScript = new Script; - pNewScript->Name = "go_tablet_of_the_seven"; - pNewScript->pGOUse = &GOUse_go_tablet_of_the_seven; - pNewScript->RegisterSelf(); - pNewScript = new Script; pNewScript->Name = "go_tele_to_dalaran_crystal"; pNewScript->pGOUse = &GOUse_go_tele_to_dalaran_crystal; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 029b469a8..edbc21e42 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2462" + #define SD2_REVISION_NR "2463" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 13162a3fe..a39efa85e 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -81,7 +81,6 @@ UPDATE gameobject_template SET ScriptName='go_resonite_cask' WHERE entry=178145; UPDATE gameobject_template SET ScriptName='go_sacred_fire_of_life' WHERE entry=175944; UPDATE gameobject_template SET ScriptName='go_shrine_of_the_birds' WHERE entry IN (185547,185553,185551); UPDATE gameobject_template SET ScriptName='go_tablet_of_madness' WHERE entry=180368; -UPDATE gameobject_template SET ScriptName='go_tablet_of_the_seven' WHERE entry=169294; UPDATE gameobject_template SET ScriptName='go_tele_to_dalaran_crystal' WHERE entry=191230; UPDATE gameobject_template SET ScriptName='go_tele_to_violet_stand' WHERE entry=191229; UPDATE gameobject_template SET ScriptName='go_blood_filled_orb' WHERE entry=182024; diff --git a/sql/updates/r2463_mangos.sql b/sql/updates/r2463_mangos.sql new file mode 100644 index 000000000..e222535bd --- /dev/null +++ b/sql/updates/r2463_mangos.sql @@ -0,0 +1 @@ +UPDATE gameobject_template SET ScriptName='' WHERE entry=169294; From 8eb056026c30e8ea1bad1fc437b48c37f303c3b5 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Wed, 15 Feb 2012 01:27:09 +0200 Subject: [PATCH 0452/1172] [2464] Cleanup and improvement for Arcanist Doan - Scarlet Monastery --- .../scarlet_monastery/boss_arcanist_doan.cpp | 101 ++++++++++-------- sd2_revision_nr.h | 2 +- 2 files changed, 58 insertions(+), 45 deletions(-) diff --git a/scripts/eastern_kingdoms/scarlet_monastery/boss_arcanist_doan.cpp b/scripts/eastern_kingdoms/scarlet_monastery/boss_arcanist_doan.cpp index e08f8e4c3..a34091dc7 100644 --- a/scripts/eastern_kingdoms/scarlet_monastery/boss_arcanist_doan.cpp +++ b/scripts/eastern_kingdoms/scarlet_monastery/boss_arcanist_doan.cpp @@ -29,89 +29,102 @@ enum SAY_SPECIALAE = -1189020, SPELL_POLYMORPH = 13323, - SPELL_AOESILENCE = 8988, - SPELL_ARCANEEXPLOSION = 9433, - SPELL_FIREAOE = 9435, - SPELL_ARCANEBUBBLE = 9438, + SPELL_SILENCE = 8988, + SPELL_ARCANE_EXPLOSION = 9433, + SPELL_DETONATION = 9435, + SPELL_ARCANE_BUBBLE = 9438, }; struct MANGOS_DLL_DECL boss_arcanist_doanAI : public ScriptedAI { boss_arcanist_doanAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} - uint32 Polymorph_Timer; - uint32 AoESilence_Timer; - uint32 ArcaneExplosion_Timer; - bool bCanDetonate; + uint32 m_uiPolymorphTimer; + uint32 m_uiSilenceTimer; + uint32 m_uiArcaneExplosionTimer; + uint32 m_uiDetonationTimer; bool bShielded; void Reset() { - Polymorph_Timer = 20000; - AoESilence_Timer = 15000; - ArcaneExplosion_Timer = 3000; - bCanDetonate = false; + m_uiPolymorphTimer = 15000; + m_uiSilenceTimer = 18000; + m_uiArcaneExplosionTimer = 3000; + m_uiDetonationTimer = 0; bShielded = false; } - void Aggro(Unit *who) + void Aggro(Unit* pWho) { DoScriptText(SAY_AGGRO, m_creature); } - void UpdateAI(const uint32 diff) + void UpdateAI(const uint32 uiDiff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - if (bShielded && bCanDetonate) + if (m_uiDetonationTimer) { - DoCastSpellIfCan(m_creature,SPELL_FIREAOE); - bCanDetonate = false; + if (m_uiDetonationTimer <= uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_DETONATION) == CAST_OK) + { + DoScriptText(SAY_SPECIALAE, m_creature); + m_uiDetonationTimer = 0; + } + } + else + m_uiDetonationTimer -= uiDiff; } - if (m_creature->HasAura(SPELL_ARCANEBUBBLE)) + // Do not attack while having the bubble active + if (m_creature->HasAura(SPELL_ARCANE_BUBBLE)) return; - //If we are <50% hp cast Arcane Bubble + // If we are <50% hp cast Arcane Bubble if (!bShielded && m_creature->GetHealthPercent() <= 50.0f) { - //wait if we already casting - if (m_creature->IsNonMeleeSpellCasted(false)) - return; - - DoScriptText(SAY_SPECIALAE, m_creature); - DoCastSpellIfCan(m_creature,SPELL_ARCANEBUBBLE); - - bCanDetonate = true; - bShielded = true; + if (DoCastSpellIfCan(m_creature, SPELL_ARCANE_BUBBLE) == CAST_OK) + { + m_uiDetonationTimer = 1000; + bShielded = true; + } } - if (Polymorph_Timer < diff) + if (m_uiPolymorphTimer < uiDiff) { - if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,1)) - DoCastSpellIfCan(target,SPELL_POLYMORPH); - - Polymorph_Timer = 20000; - }else Polymorph_Timer -= diff; + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1)) + { + if (DoCastSpellIfCan(pTarget, SPELL_POLYMORPH) == CAST_OK) + m_uiPolymorphTimer = 20000; + } + } + else + m_uiPolymorphTimer -= uiDiff; - //AoESilence_Timer - if (AoESilence_Timer < diff) + // Silence_Timer + if (m_uiSilenceTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_AOESILENCE); - AoESilence_Timer = urand(15000, 20000); - }else AoESilence_Timer -= diff; + if (DoCastSpellIfCan(m_creature, SPELL_SILENCE) == CAST_OK) + m_uiSilenceTimer = urand(15000, 20000); + } + else + m_uiSilenceTimer -= uiDiff; - //ArcaneExplosion_Timer - if (ArcaneExplosion_Timer < diff) + // ArcaneExplosion_Timer + if (m_uiArcaneExplosionTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_ARCANEEXPLOSION); - ArcaneExplosion_Timer = 8000; - }else ArcaneExplosion_Timer -= diff; + if (DoCastSpellIfCan(m_creature, SPELL_ARCANE_EXPLOSION) == CAST_OK) + m_uiArcaneExplosionTimer = 8000; + } + else + m_uiArcaneExplosionTimer -= uiDiff; DoMeleeAttackIfReady(); } }; + CreatureAI* GetAI_boss_arcanist_doan(Creature* pCreature) { return new boss_arcanist_doanAI(pCreature); diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index edbc21e42..ea8896901 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2463" + #define SD2_REVISION_NR "2464" #endif // __SD2_REVISION_NR_H__ From 0299a070961eb071d09fe80cbf27e2f6933e1341 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Wed, 15 Feb 2012 01:51:57 +0200 Subject: [PATCH 0453/1172] [2465] Handle Interrogator Vishas' death in instance script This change is required because the boss script should be moved to eventAI --- .../scarlet_monastery/instance_scarlet_monastery.cpp | 10 ++++++++++ .../scarlet_monastery/scarlet_monastery.h | 4 ++++ sd2_revision_nr.h | 2 +- 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/scripts/eastern_kingdoms/scarlet_monastery/instance_scarlet_monastery.cpp b/scripts/eastern_kingdoms/scarlet_monastery/instance_scarlet_monastery.cpp index 162f10e27..21de1d1a3 100644 --- a/scripts/eastern_kingdoms/scarlet_monastery/instance_scarlet_monastery.cpp +++ b/scripts/eastern_kingdoms/scarlet_monastery/instance_scarlet_monastery.cpp @@ -46,6 +46,16 @@ void instance_scarlet_monastery::OnCreatureCreate(Creature* pCreature) } } +void instance_scarlet_monastery::OnCreatureDeath(Creature* pCreature) +{ + if (pCreature->GetEntry() == NPC_INTERROGATOR_VISHAS) + { + // Any other actions to do with Vorrel? setStandState? + if (Creature* pVorrel = GetSingleCreatureFromStorage(NPC_VORREL)) + DoScriptText(SAY_TRIGGER_VORREL, pVorrel); + } +} + void instance_scarlet_monastery::OnObjectCreate(GameObject* pGo) { if (pGo->GetEntry() == GO_WHITEMANE_DOOR) diff --git a/scripts/eastern_kingdoms/scarlet_monastery/scarlet_monastery.h b/scripts/eastern_kingdoms/scarlet_monastery/scarlet_monastery.h index 9e4664898..f13806402 100644 --- a/scripts/eastern_kingdoms/scarlet_monastery/scarlet_monastery.h +++ b/scripts/eastern_kingdoms/scarlet_monastery/scarlet_monastery.h @@ -14,8 +14,11 @@ enum NPC_MOGRAINE = 3976, NPC_WHITEMANE = 3977, NPC_VORREL = 3981, + NPC_INTERROGATOR_VISHAS = 3983, GO_WHITEMANE_DOOR = 104600, + + SAY_TRIGGER_VORREL = -1189015, }; class MANGOS_DLL_DECL instance_scarlet_monastery : public ScriptedInstance @@ -26,6 +29,7 @@ class MANGOS_DLL_DECL instance_scarlet_monastery : public ScriptedInstance void Initialize(); void OnCreatureCreate(Creature* pCreature); + void OnCreatureDeath(Creature* pCreature); void OnObjectCreate(GameObject* pGo); void SetData(uint32 uiType, uint32 uiData); diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index ea8896901..beab0e703 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2464" + #define SD2_REVISION_NR "2465" #endif // __SD2_REVISION_NR_H__ From bad03e24c5a1b71b244b035abeadc185979c35f6 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Wed, 15 Feb 2012 02:04:08 +0200 Subject: [PATCH 0454/1172] [2466] Forgot the second half of the previous commit --- .../boss_interrogator_vishas.cpp | 19 +------------------ sd2_revision_nr.h | 2 +- 2 files changed, 2 insertions(+), 19 deletions(-) diff --git a/scripts/eastern_kingdoms/scarlet_monastery/boss_interrogator_vishas.cpp b/scripts/eastern_kingdoms/scarlet_monastery/boss_interrogator_vishas.cpp index aa8b44ee6..68eae58cf 100644 --- a/scripts/eastern_kingdoms/scarlet_monastery/boss_interrogator_vishas.cpp +++ b/scripts/eastern_kingdoms/scarlet_monastery/boss_interrogator_vishas.cpp @@ -30,20 +30,13 @@ enum SAY_HEALTH1 = -1189012, SAY_HEALTH2 = -1189013, SAY_KILL = -1189014, - SAY_TRIGGER_VORREL = -1189015, SPELL_SHADOWWORDPAIN = 2767, }; struct MANGOS_DLL_DECL boss_interrogator_vishasAI : public ScriptedAI { - boss_interrogator_vishasAI(Creature* pCreature) : ScriptedAI(pCreature) - { - m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - Reset(); - } - - ScriptedInstance* m_pInstance; + boss_interrogator_vishasAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } bool Yell30; bool Yell60; @@ -66,16 +59,6 @@ struct MANGOS_DLL_DECL boss_interrogator_vishasAI : public ScriptedAI DoScriptText(SAY_KILL, m_creature); } - void JustDied(Unit* Killer) - { - if (!m_pInstance) - return; - - //Any other actions to do with vorrel? setStandState? - if (Creature *vorrel = m_pInstance->GetSingleCreatureFromStorage(NPC_VORREL)) - DoScriptText(SAY_TRIGGER_VORREL, vorrel); - } - void UpdateAI(const uint32 diff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index beab0e703..eac831bb0 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2465" + #define SD2_REVISION_NR "2466" #endif // __SD2_REVISION_NR_H__ From 8a81be9bce2cb4a149444ff9c084596d468019f7 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Fri, 17 Feb 2012 00:59:23 +0200 Subject: [PATCH 0455/1172] [2467] Cleanup for Darkweaver Syth - Sethekk Halls Note: the adds script were not cleaned because they will be moved to acid --- .../sethekk_halls/boss_darkweaver_syth.cpp | 170 +++++++++++------- sd2_revision_nr.h | 2 +- 2 files changed, 103 insertions(+), 69 deletions(-) diff --git a/scripts/outland/auchindoun/sethekk_halls/boss_darkweaver_syth.cpp b/scripts/outland/auchindoun/sethekk_halls/boss_darkweaver_syth.cpp index 9dafe8661..4f85aca94 100644 --- a/scripts/outland/auchindoun/sethekk_halls/boss_darkweaver_syth.cpp +++ b/scripts/outland/auchindoun/sethekk_halls/boss_darkweaver_syth.cpp @@ -46,6 +46,12 @@ enum SPELL_SUMMON_SYTH_FROST = 33539, // Spawns 19204 SPELL_SUMMON_SYTH_SHADOW = 33540, // Spawns 19206 + // Npc entries + NPC_FIRE_ELEMENTAL = 19203, + NPC_FROST_ELEMENTAL = 19204, + NPC_ARCANE_ELEMENTAL = 19205, + NPC_SHADOW_ELEMENTAL = 19206, + SPELL_FLAME_BUFFET = 33526, SPELL_FLAME_BUFFET_H = 38141, SPELL_ARCANE_BUFFET = 33527, @@ -65,30 +71,30 @@ struct MANGOS_DLL_DECL boss_darkweaver_sythAI : public ScriptedAI } bool m_bIsRegularMode; - uint32 flameshock_timer; - uint32 arcaneshock_timer; - uint32 frostshock_timer; - uint32 shadowshock_timer; - uint32 chainlightning_timer; + uint32 m_uiFlameshockTimer; + uint32 m_uiArcaneshockTimer; + uint32 m_uiFrostshockTimer; + uint32 m_uiShadowshockTimer; + uint32 m_uiChainlightningTimer; - bool summon90; - bool summon50; - bool summon10; + bool m_bCanSummon90; + bool m_bCanSummon50; + bool m_bCanSummon10; void Reset() { - flameshock_timer = 2000; - arcaneshock_timer = 4000; - frostshock_timer = 6000; - shadowshock_timer = 8000; - chainlightning_timer = 15000; - - summon90 = false; - summon50 = false; - summon10 = false; + m_uiFlameshockTimer = 2000; + m_uiArcaneshockTimer = 4000; + m_uiFrostshockTimer = 6000; + m_uiShadowshockTimer = 8000; + m_uiChainlightningTimer = 15000; + + m_bCanSummon90 = false; + m_bCanSummon50 = false; + m_bCanSummon10 = false; } - void Aggro(Unit *who) + void Aggro(Unit* pWho) { switch(urand(0, 2)) { @@ -98,12 +104,12 @@ struct MANGOS_DLL_DECL boss_darkweaver_sythAI : public ScriptedAI } } - void JustDied(Unit* Killer) + void JustDied(Unit* pKiller) { DoScriptText(SAY_DEATH, m_creature); } - void KilledUnit(Unit* victim) + void KilledUnit(Unit* pVictim) { if (urand(0, 1)) return; @@ -111,12 +117,29 @@ struct MANGOS_DLL_DECL boss_darkweaver_sythAI : public ScriptedAI DoScriptText(urand(0, 1) ? SAY_SLAY_1 : SAY_SLAY_2, m_creature); } - void JustSummoned(Creature *summoned) + void JustSummoned(Creature* pSummoned) { - if (Unit *target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) - summoned->AI()->AttackStart(target); + switch (pSummoned->GetEntry()) + { + case NPC_FIRE_ELEMENTAL: + pSummoned->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_FIRE, true); + break; + case NPC_FROST_ELEMENTAL: + pSummoned->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_FROST, true); + break; + case NPC_ARCANE_ELEMENTAL: + pSummoned->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_ARCANE, true); + break; + case NPC_SHADOW_ELEMENTAL: + pSummoned->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_SHADOW, true); + break; + } + + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + pSummoned->AI()->AttackStart(pTarget); } + // Wrapper to handle the elementals summon void SythSummoning() { DoScriptText(SAY_SUMMON, m_creature); @@ -124,74 +147,89 @@ struct MANGOS_DLL_DECL boss_darkweaver_sythAI : public ScriptedAI if (m_creature->IsNonMeleeSpellCasted(false)) m_creature->InterruptNonMeleeSpells(false); - DoCastSpellIfCan(m_creature, SPELL_SUMMON_SYTH_ARCANE, CAST_TRIGGERED);//front - DoCastSpellIfCan(m_creature, SPELL_SUMMON_SYTH_FIRE, CAST_TRIGGERED);//back - DoCastSpellIfCan(m_creature, SPELL_SUMMON_SYTH_FROST, CAST_TRIGGERED);//left - DoCastSpellIfCan(m_creature, SPELL_SUMMON_SYTH_SHADOW, CAST_TRIGGERED);//right + DoCastSpellIfCan(m_creature, SPELL_SUMMON_SYTH_ARCANE, CAST_TRIGGERED); //front + DoCastSpellIfCan(m_creature, SPELL_SUMMON_SYTH_FIRE, CAST_TRIGGERED); //back + DoCastSpellIfCan(m_creature, SPELL_SUMMON_SYTH_FROST, CAST_TRIGGERED); //left + DoCastSpellIfCan(m_creature, SPELL_SUMMON_SYTH_SHADOW, CAST_TRIGGERED); //right } - void UpdateAI(const uint32 diff) + void UpdateAI(const uint32 uiDiff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - if (m_creature->GetHealthPercent() < 90.0f && !summon90) + if (m_creature->GetHealthPercent() < 90.0f && !m_bCanSummon90) { SythSummoning(); - summon90 = true; + m_bCanSummon90 = true; } - if (m_creature->GetHealthPercent() < 50.0f && !summon50) + if (m_creature->GetHealthPercent() < 50.0f && !m_bCanSummon50) { SythSummoning(); - summon50 = true; + m_bCanSummon50 = true; } - if (m_creature->GetHealthPercent() < 10.0f && !summon10) + if (m_creature->GetHealthPercent() < 10.0f && !m_bCanSummon10) { SythSummoning(); - summon10 = true; + m_bCanSummon10 = true; } - if (flameshock_timer < diff) + if (m_uiFlameshockTimer < uiDiff) { - if (Unit *target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) - DoCastSpellIfCan(target, SPELL_FLAME_SHOCK); - - flameshock_timer = urand(10000, 15000); - } else flameshock_timer -= diff; + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, SPELL_FLAME_SHOCK) == CAST_OK) + m_uiFlameshockTimer = urand(10000, 15000); + } + } + else + m_uiFlameshockTimer -= uiDiff; - if (arcaneshock_timer < diff) + if (m_uiArcaneshockTimer < uiDiff) { - if (Unit *target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) - DoCastSpellIfCan(target,SPELL_ARCANE_SHOCK); - - arcaneshock_timer = urand(10000, 15000); - } else arcaneshock_timer -= diff; + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, SPELL_ARCANE_SHOCK) == CAST_OK) + m_uiArcaneshockTimer = urand(10000, 15000); + } + } + else + m_uiArcaneshockTimer -= uiDiff; - if (frostshock_timer < diff) + if (m_uiFrostshockTimer < uiDiff) { - if (Unit *target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) - DoCastSpellIfCan(target,SPELL_FROST_SHOCK); - - frostshock_timer = urand(10000, 15000); - } else frostshock_timer -= diff; + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, SPELL_FROST_SHOCK) == CAST_OK) + m_uiFrostshockTimer = urand(10000, 15000); + } + } + else + m_uiFrostshockTimer -= uiDiff; - if (shadowshock_timer < diff) + if (m_uiShadowshockTimer < uiDiff) { - if (Unit *target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) - DoCastSpellIfCan(target,SPELL_SHADOW_SHOCK); - - shadowshock_timer = urand(10000, 15000); - } else shadowshock_timer -= diff; + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, SPELL_SHADOW_SHOCK) == CAST_OK) + m_uiShadowshockTimer = urand(10000, 15000); + } + } + else + m_uiShadowshockTimer -= uiDiff; - if (chainlightning_timer < diff) + if (m_uiChainlightningTimer < uiDiff) { - if (Unit *target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) - DoCastSpellIfCan(target,SPELL_CHAIN_LIGHTNING); - - chainlightning_timer = 25000; - } else chainlightning_timer -= diff; + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, SPELL_CHAIN_LIGHTNING) == CAST_OK) + m_uiChainlightningTimer = 25000; + } + } + else + m_uiChainlightningTimer -= uiDiff; DoMeleeAttackIfReady(); } @@ -218,7 +256,6 @@ struct MANGOS_DLL_DECL mob_syth_fireAI : public ScriptedAI void Reset() { - m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_FIRE, true); flameshock_timer = 2500; flamebuffet_timer = 5000; } @@ -268,7 +305,6 @@ struct MANGOS_DLL_DECL mob_syth_arcaneAI : public ScriptedAI void Reset() { - m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_ARCANE, true); arcaneshock_timer = 2500; arcanebuffet_timer = 5000; } @@ -317,7 +353,6 @@ struct MANGOS_DLL_DECL mob_syth_frostAI : public ScriptedAI void Reset() { - m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_FROST, true); frostshock_timer = 2500; frostbuffet_timer = 5000; } @@ -366,7 +401,6 @@ struct MANGOS_DLL_DECL mob_syth_shadowAI : public ScriptedAI void Reset() { - m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_SHADOW, true); shadowshock_timer = 2500; shadowbuffet_timer = 5000; } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index eac831bb0..dfc94b25d 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2466" + #define SD2_REVISION_NR "2467" #endif // __SD2_REVISION_NR_H__ From acf3fa0c8ee685bd997f2a7e1e679617dedd8a2c Mon Sep 17 00:00:00 2001 From: Xfurry Date: Fri, 17 Feb 2012 01:39:00 +0200 Subject: [PATCH 0456/1172] [2468] Cleanup and slightly improve script for Doom Lord Kazzak --- scripts/outland/boss_doomlord_kazzak.cpp | 158 +++++++++++++---------- sd2_revision_nr.h | 2 +- 2 files changed, 90 insertions(+), 70 deletions(-) diff --git a/scripts/outland/boss_doomlord_kazzak.cpp b/scripts/outland/boss_doomlord_kazzak.cpp index 71ed0c480..edd787d6c 100644 --- a/scripts/outland/boss_doomlord_kazzak.cpp +++ b/scripts/outland/boss_doomlord_kazzak.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: Boss_Doomlord_Kazzak -SD%Complete: 70 -SDComment: Using incorrect spell for Mark of Kazzak +SD%Complete: 80 +SDComment: Timers; Hard enrage NYI SDCategory: Hellfire Peninsula EndScriptData */ @@ -38,37 +38,38 @@ enum SAY_RAND1 = -1000157, SAY_RAND2 = -1000158, - SPELL_SHADOWVOLLEY = 32963, + SPELL_SHADOW_VOLLEY = 32963, SPELL_CLEAVE = 31779, SPELL_THUNDERCLAP = 36706, - SPELL_VOIDBOLT = 39329, - SPELL_MARKOFKAZZAK = 32960, - SPELL_ENRAGE = 32964, - SPELL_CAPTURESOUL = 32966, - SPELL_TWISTEDREFLECTION = 21063 + SPELL_VOID_BOLT = 39329, + SPELL_MARK_OF_KAZZAK = 32960, + SPELL_FRENZY = 32964, // triggers 32963 + SPELL_CAPTURE_SOUL = 48473, // procs 32966 on player kill + SPELL_TWISTED_REFLECTION = 21063, + SPELL_BERSERK = 32965, // triggers 32963 }; struct MANGOS_DLL_DECL boss_doomlordkazzakAI : public ScriptedAI { - boss_doomlordkazzakAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + boss_doomlordkazzakAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } - uint32 ShadowVolley_Timer; - uint32 Cleave_Timer; - uint32 ThunderClap_Timer; - uint32 VoidBolt_Timer; - uint32 MarkOfKazzak_Timer; - uint32 Enrage_Timer; - uint32 Twisted_Reflection_Timer; + uint32 m_uiShadowVolleyTimer; + uint32 m_uiCleaveTimer; + uint32 m_uiThunderClapTimer; + uint32 m_uiVoidBoltTimer; + uint32 m_uiMarkOfKazzakTimer; + uint32 m_uiEnrageTimer; + uint32 m_uiTwistedReflectionTimer; void Reset() { - ShadowVolley_Timer = urand(6000, 10000); - Cleave_Timer = 7000; - ThunderClap_Timer = urand(14000, 18000); - VoidBolt_Timer = 30000; - MarkOfKazzak_Timer = 25000; - Enrage_Timer = 60000; - Twisted_Reflection_Timer = 33000; // Timer may be incorrect + m_uiShadowVolleyTimer = urand(6000, 10000); + m_uiCleaveTimer = 7000; + m_uiThunderClapTimer = urand(14000, 18000); + m_uiVoidBoltTimer = 30000; + m_uiMarkOfKazzakTimer = 25000; + m_uiEnrageTimer = 60000; + m_uiTwistedReflectionTimer = 33000; // Timer may be incorrect } void JustRespawned() @@ -76,19 +77,18 @@ struct MANGOS_DLL_DECL boss_doomlordkazzakAI : public ScriptedAI DoScriptText(SAY_INTRO, m_creature); } - void Aggro(Unit *who) + void Aggro(Unit* pWho) { DoScriptText(urand(0, 1) ? SAY_AGGRO1 : SAY_AGGRO2, m_creature); + DoCastSpellIfCan(m_creature, SPELL_CAPTURE_SOUL, CAST_AURA_NOT_PRESENT); } - void KilledUnit(Unit* victim) + void KilledUnit(Unit* pVictim) { // When Kazzak kills a player (not pets/totems), he regens some health - if (victim->GetTypeId() != TYPEID_PLAYER) + if (pVictim->GetTypeId() != TYPEID_PLAYER) return; - DoCastSpellIfCan(m_creature,SPELL_CAPTURESOUL); - switch(urand(0, 2)) { case 0: DoScriptText(SAY_KILL1, m_creature); break; @@ -97,71 +97,91 @@ struct MANGOS_DLL_DECL boss_doomlordkazzakAI : public ScriptedAI } } - void JustDied(Unit *victim) + void JustDied(Unit* pKiller) { DoScriptText(SAY_DEATH, m_creature); } - void UpdateAI(const uint32 diff) + void UpdateAI(const uint32 uiDiff) { - //Return since we have no target + // Return since we have no target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - //ShadowVolley_Timer - if (ShadowVolley_Timer < diff) + // ShadowVolley_Timer + if (m_uiShadowVolleyTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_SHADOWVOLLEY); - ShadowVolley_Timer = urand(4000, 6000); - }else ShadowVolley_Timer -= diff; + if (DoCastSpellIfCan(m_creature, SPELL_SHADOW_VOLLEY) == CAST_OK) + m_uiShadowVolleyTimer = urand(10000, 30000); + } + else + m_uiShadowVolleyTimer -= uiDiff; - //Cleave_Timer - if (Cleave_Timer < diff) + // Cleave_Timer + if (m_uiCleaveTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_CLEAVE); - Cleave_Timer = urand(8000, 12000); - }else Cleave_Timer -= diff; + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_CLEAVE) == CAST_OK) + m_uiCleaveTimer = urand(8000, 12000); + } + else + m_uiCleaveTimer -= uiDiff; - //ThunderClap_Timer - if (ThunderClap_Timer < diff) + // ThunderClap_Timer + if (m_uiThunderClapTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_THUNDERCLAP); - ThunderClap_Timer = urand(10000, 14000); - }else ThunderClap_Timer -= diff; + if (DoCastSpellIfCan(m_creature, SPELL_THUNDERCLAP) == CAST_OK) + m_uiThunderClapTimer = urand(10000, 14000); + } + else + m_uiThunderClapTimer -= uiDiff; - //VoidBolt_Timer - if (VoidBolt_Timer < diff) + // VoidBolt_Timer + if (m_uiVoidBoltTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_VOIDBOLT); - VoidBolt_Timer = urand(15000, 18000); - }else VoidBolt_Timer -= diff; + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, SPELL_VOID_BOLT) == CAST_OK) + m_uiVoidBoltTimer = urand(15000, 18000); + } + } + else + m_uiVoidBoltTimer -= uiDiff; - //MarkOfKazzak_Timer - if (MarkOfKazzak_Timer < diff) + // MarkOfKazzak_Timer + if (m_uiMarkOfKazzakTimer < uiDiff) { - Unit* victim = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0); - if (victim->GetPower(POWER_MANA)) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0, SPELL_MARK_OF_KAZZAK, SELECT_FLAG_POWER_MANA)) { - DoCastSpellIfCan(victim, SPELL_MARKOFKAZZAK); - MarkOfKazzak_Timer = 20000; + if (DoCastSpellIfCan(pTarget, SPELL_MARK_OF_KAZZAK) == CAST_OK) + m_uiMarkOfKazzakTimer = 20000; } - }else MarkOfKazzak_Timer -= diff; + } + else + m_uiMarkOfKazzakTimer -= uiDiff; - //Enrage_Timer - if (Enrage_Timer < diff) + // Enrage_Timer + if (m_uiEnrageTimer < uiDiff) { - DoScriptText(EMOTE_GENERIC_FRENZY, m_creature); - DoCastSpellIfCan(m_creature,SPELL_ENRAGE); - Enrage_Timer = 30000; - }else Enrage_Timer -= diff; + if (DoCastSpellIfCan(m_creature, SPELL_FRENZY) == CAST_OK) + { + DoScriptText(EMOTE_GENERIC_FRENZY, m_creature); + m_uiEnrageTimer = 60000; + } + } + else + m_uiEnrageTimer -= uiDiff; - if (Twisted_Reflection_Timer < diff) + // Twisted Reflection + if (m_uiTwistedReflectionTimer < uiDiff) { if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) - DoCastSpellIfCan(pTarget, SPELL_TWISTEDREFLECTION); - - Twisted_Reflection_Timer = 15000; - }else Twisted_Reflection_Timer -= diff; + { + if (DoCastSpellIfCan(pTarget, SPELL_TWISTED_REFLECTION) == CAST_OK) + m_uiTwistedReflectionTimer = 15000; + } + } + else + m_uiTwistedReflectionTimer -= uiDiff; DoMeleeAttackIfReady(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index dfc94b25d..dd88e8659 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2467" + #define SD2_REVISION_NR "2468" #endif // __SD2_REVISION_NR_H__ From d65f47df888bc1376cb17e717a69a3ae831506a0 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Fri, 17 Feb 2012 02:22:30 +0200 Subject: [PATCH 0457/1172] [2469] Cleanup and improve the Doomwalker Also fix previous commit mistake with cast flags --- scripts/outland/boss_doomlord_kazzak.cpp | 2 +- scripts/outland/boss_doomwalker.cpp | 176 +++++++++++------------ sd2_revision_nr.h | 2 +- 3 files changed, 86 insertions(+), 94 deletions(-) diff --git a/scripts/outland/boss_doomlord_kazzak.cpp b/scripts/outland/boss_doomlord_kazzak.cpp index edd787d6c..05dde4340 100644 --- a/scripts/outland/boss_doomlord_kazzak.cpp +++ b/scripts/outland/boss_doomlord_kazzak.cpp @@ -80,7 +80,7 @@ struct MANGOS_DLL_DECL boss_doomlordkazzakAI : public ScriptedAI void Aggro(Unit* pWho) { DoScriptText(urand(0, 1) ? SAY_AGGRO1 : SAY_AGGRO2, m_creature); - DoCastSpellIfCan(m_creature, SPELL_CAPTURE_SOUL, CAST_AURA_NOT_PRESENT); + DoCastSpellIfCan(m_creature, SPELL_CAPTURE_SOUL, CAST_TRIGGERED); } void KilledUnit(Unit* pVictim) diff --git a/scripts/outland/boss_doomwalker.cpp b/scripts/outland/boss_doomwalker.cpp index 652515623..5b39a3daf 100644 --- a/scripts/outland/boss_doomwalker.cpp +++ b/scripts/outland/boss_doomwalker.cpp @@ -23,56 +23,59 @@ EndScriptData */ #include "precompiled.h" -#define SAY_AGGRO -1000159 -#define SAY_EARTHQUAKE_1 -1000160 -#define SAY_EARTHQUAKE_2 -1000161 -#define SAY_OVERRUN_1 -1000162 -#define SAY_OVERRUN_2 -1000163 -#define SAY_SLAY_1 -1000164 -#define SAY_SLAY_2 -1000165 -#define SAY_SLAY_3 -1000166 -#define SAY_DEATH -1000167 - -#define SPELL_EARTHQUAKE 32686 -#define SPELL_SUNDER_ARMOR 33661 -#define SPELL_CHAIN_LIGHTNING 33665 -#define SPELL_OVERRUN 32636 -#define SPELL_ENRAGE 33653 -#define SPELL_MARK_DEATH 37128 -#define SPELL_AURA_DEATH 37131 +enum +{ + SAY_AGGRO = -1000159, + SAY_EARTHQUAKE_1 = -1000160, + SAY_EARTHQUAKE_2 = -1000161, + SAY_OVERRUN_1 = -1000162, + SAY_OVERRUN_2 = -1000163, + SAY_SLAY_1 = -1000164, + SAY_SLAY_2 = -1000165, + SAY_SLAY_3 = -1000166, + SAY_DEATH = -1000167, + + SPELL_EARTHQUAKE = 32686, + SPELL_CRUSH_ARMOR = 33661, + SPELL_LIGHTNING_WRATH = 33665, + SPELL_OVERRUN = 32636, + SPELL_ENRAGE = 33653, + SPELL_MARK_OF_DEATH_PLAYER = 37128, + SPELL_MARK_OF_DEATH_AURA = 37125, // triggers 37131 on target if it has aura 37128 +}; struct MANGOS_DLL_DECL boss_doomwalkerAI : public ScriptedAI { - boss_doomwalkerAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + boss_doomwalkerAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } - uint32 Chain_Timer; - uint32 Enrage_Timer; - uint32 Overrun_Timer; - uint32 Quake_Timer; - uint32 Armor_Timer; + uint32 m_uiChainTimer; + uint32 m_uiOverrunTimer; + uint32 m_uiQuakeTimer; + uint32 m_uiArmorTimer; - bool InEnrage; + bool m_bHasEnrage; void Reset() { - Enrage_Timer = 0; - Armor_Timer = urand(5000, 13000); - Chain_Timer = urand(10000, 30000); - Quake_Timer = urand(25000, 35000); - Overrun_Timer = urand(30000, 45000); + m_uiArmorTimer = urand(5000, 13000); + m_uiChainTimer = urand(10000, 30000); + m_uiQuakeTimer = urand(25000, 35000); + m_uiOverrunTimer = urand(30000, 45000); - InEnrage = false; + m_bHasEnrage = false; } - void KilledUnit(Unit* Victim) + void KilledUnit(Unit* pVictim) { + if (pVictim->GetTypeId() != TYPEID_PLAYER) + return; - Victim->CastSpell(Victim, SPELL_MARK_DEATH, true); + pVictim->CastSpell(pVictim, SPELL_MARK_OF_DEATH_PLAYER, true, NULL, NULL, m_creature->GetObjectGuid()); if (urand(0, 4)) return; - switch(urand(0, 2)) + switch (urand(0, 2)) { case 0: DoScriptText(SAY_SLAY_1, m_creature); break; case 1: DoScriptText(SAY_SLAY_2, m_creature); break; @@ -81,88 +84,77 @@ struct MANGOS_DLL_DECL boss_doomwalkerAI : public ScriptedAI } - void JustDied(Unit* Killer) + void JustDied(Unit* pKiller) { DoScriptText(SAY_DEATH, m_creature); } - void Aggro(Unit *who) + void Aggro(Unit* pWho) { + DoCastSpellIfCan(m_creature, SPELL_MARK_OF_DEATH_AURA, CAST_TRIGGERED); DoScriptText(SAY_AGGRO, m_creature); } - void MoveInLineOfSight(Unit *who) - { - if (who && who->GetTypeId() == TYPEID_PLAYER && m_creature->IsHostileTo(who)) - { - if (who->HasAura(SPELL_MARK_DEATH, EFFECT_INDEX_0)) - { - who->CastSpell(who,SPELL_AURA_DEATH,true); - } - } - } - - void UpdateAI(const uint32 diff) + void UpdateAI(const uint32 uiDiff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - //Spell Enrage, when hp <= 20% gain enrage - if (m_creature->GetHealthPercent() <= 20.0f) + // Spell Enrage, when hp <= 20% gain enrage + if (m_creature->GetHealthPercent() <= 20.0f && !m_bHasEnrage) { - if (Enrage_Timer < diff) - { - DoCastSpellIfCan(m_creature,SPELL_ENRAGE); - Enrage_Timer = 6000; - InEnrage = true; - }else Enrage_Timer -= diff; + if (DoCastSpellIfCan(m_creature, SPELL_ENRAGE) == CAST_OK) + m_bHasEnrage = true; } - //Spell Overrun - if (Overrun_Timer < diff) + // Spell Overrun + if (m_uiOverrunTimer < uiDiff) { - DoScriptText(urand(0, 1) ? SAY_OVERRUN_1 : SAY_OVERRUN_2, m_creature); - DoCastSpellIfCan(m_creature->getVictim(),SPELL_OVERRUN); - Overrun_Timer = urand(25000, 40000); - }else Overrun_Timer -= diff; + if (DoCastSpellIfCan(m_creature, SPELL_OVERRUN) == CAST_OK) + { + DoScriptText(urand(0, 1) ? SAY_OVERRUN_1 : SAY_OVERRUN_2, m_creature); + m_uiOverrunTimer = urand(25000, 40000); + } + } + else + m_uiOverrunTimer -= uiDiff; - //Spell Earthquake - if (Quake_Timer < diff) + // Spell Earthquake + if (m_uiQuakeTimer < uiDiff) { - if (urand(0, 1)) - return; - - DoScriptText(urand(0, 1) ? SAY_EARTHQUAKE_1 : SAY_EARTHQUAKE_2, m_creature); - - //remove enrage before casting earthquake because enrage + earthquake = 16000dmg over 8sec and all dead - if (InEnrage) - m_creature->RemoveAurasDueToSpell(SPELL_ENRAGE); - - DoCastSpellIfCan(m_creature,SPELL_EARTHQUAKE); - Quake_Timer = urand(30000, 55000); - }else Quake_Timer -= diff; + if (DoCastSpellIfCan(m_creature, SPELL_EARTHQUAKE) == CAST_OK) + { + DoScriptText(urand(0, 1) ? SAY_EARTHQUAKE_1 : SAY_EARTHQUAKE_2, m_creature); + m_uiQuakeTimer = urand(30000, 55000); + } + } + else + m_uiQuakeTimer -= uiDiff; - //Spell Chain Lightning - if (Chain_Timer < diff) + // Spell Chain Lightning + if (m_uiChainTimer < uiDiff) { - Unit* target = NULL; - target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,1); + Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1); + if (!pTarget) + pTarget = m_creature->getVictim(); - if (!target) - target = m_creature->getVictim(); - - if (target) - DoCastSpellIfCan(target,SPELL_CHAIN_LIGHTNING); - - Chain_Timer = urand(7000, 27000); - }else Chain_Timer -= diff; + if (pTarget) + { + if (DoCastSpellIfCan(pTarget, SPELL_LIGHTNING_WRATH) == CAST_OK) + m_uiChainTimer = urand(7000, 27000); + } + } + else + m_uiChainTimer -= uiDiff; - //Spell Sunder Armor - if (Armor_Timer < diff) + // Spell Sunder Armor + if (m_uiArmorTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_SUNDER_ARMOR); - Armor_Timer = urand(10000, 25000); - }else Armor_Timer -= diff; + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_CRUSH_ARMOR) == CAST_OK) + m_uiArmorTimer = urand(10000, 25000); + } + else + m_uiArmorTimer -= uiDiff; DoMeleeAttackIfReady(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index dd88e8659..788a7edb8 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2468" + #define SD2_REVISION_NR "2469" #endif // __SD2_REVISION_NR_H__ From 9bf50041b0777f40fe725909514bf0c4923d53f4 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Fri, 17 Feb 2012 23:42:16 +0200 Subject: [PATCH 0458/1172] [2470] Cleanup for The Maker - Blood Furnace Also improve the summon phases for Darkweaver Syth --- .../sethekk_halls/boss_darkweaver_syth.cpp | 25 ++---- .../blood_furnace/boss_the_maker.cpp | 83 ++++++++++--------- sd2_revision_nr.h | 2 +- 3 files changed, 52 insertions(+), 58 deletions(-) diff --git a/scripts/outland/auchindoun/sethekk_halls/boss_darkweaver_syth.cpp b/scripts/outland/auchindoun/sethekk_halls/boss_darkweaver_syth.cpp index 4f85aca94..8f6a72d0b 100644 --- a/scripts/outland/auchindoun/sethekk_halls/boss_darkweaver_syth.cpp +++ b/scripts/outland/auchindoun/sethekk_halls/boss_darkweaver_syth.cpp @@ -77,9 +77,7 @@ struct MANGOS_DLL_DECL boss_darkweaver_sythAI : public ScriptedAI uint32 m_uiShadowshockTimer; uint32 m_uiChainlightningTimer; - bool m_bCanSummon90; - bool m_bCanSummon50; - bool m_bCanSummon10; + float m_fHpCheck; void Reset() { @@ -89,9 +87,7 @@ struct MANGOS_DLL_DECL boss_darkweaver_sythAI : public ScriptedAI m_uiShadowshockTimer = 8000; m_uiChainlightningTimer = 15000; - m_bCanSummon90 = false; - m_bCanSummon50 = false; - m_bCanSummon10 = false; + m_fHpCheck = 90.0f; } void Aggro(Unit* pWho) @@ -158,22 +154,11 @@ struct MANGOS_DLL_DECL boss_darkweaver_sythAI : public ScriptedAI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - if (m_creature->GetHealthPercent() < 90.0f && !m_bCanSummon90) + // Summon elementals at 90%, 50% and 10% health + if (m_creature->GetHealthPercent() < m_fHpCheck) { SythSummoning(); - m_bCanSummon90 = true; - } - - if (m_creature->GetHealthPercent() < 50.0f && !m_bCanSummon50) - { - SythSummoning(); - m_bCanSummon50 = true; - } - - if (m_creature->GetHealthPercent() < 10.0f && !m_bCanSummon10) - { - SythSummoning(); - m_bCanSummon10 = true; + m_fHpCheck -= 40.0f; } if (m_uiFlameshockTimer < uiDiff) diff --git a/scripts/outland/hellfire_citadel/blood_furnace/boss_the_maker.cpp b/scripts/outland/hellfire_citadel/blood_furnace/boss_the_maker.cpp index 4523aeebc..f4c599af4 100644 --- a/scripts/outland/hellfire_citadel/blood_furnace/boss_the_maker.cpp +++ b/scripts/outland/hellfire_citadel/blood_furnace/boss_the_maker.cpp @@ -52,22 +52,22 @@ struct MANGOS_DLL_DECL boss_the_makerAI : public ScriptedAI ScriptedInstance* m_pInstance; bool m_bIsRegularMode; - uint32 AcidSpray_Timer; - uint32 ExplodingBreaker_Timer; - uint32 Domination_Timer; - uint32 Knockdown_Timer; + uint32 m_uiAcidSprayTimer; + uint32 m_uiExplodingBreakerTimer; + uint32 m_uiDominationTimer; + uint32 m_uiKnockdownTimer; void Reset() { - AcidSpray_Timer = 15000; - ExplodingBreaker_Timer = 6000; - Domination_Timer = 20000; - Knockdown_Timer = 10000; + m_uiAcidSprayTimer = 15000; + m_uiExplodingBreakerTimer = 6000; + m_uiDominationTimer = 20000; + m_uiKnockdownTimer = 10000; } - void Aggro(Unit *who) + void Aggro(Unit* pWho) { - switch(urand(0, 2)) + switch (urand(0, 2)) { case 0: DoScriptText(SAY_AGGRO_1, m_creature); break; case 1: DoScriptText(SAY_AGGRO_2, m_creature); break; @@ -75,61 +75,70 @@ struct MANGOS_DLL_DECL boss_the_makerAI : public ScriptedAI } if (m_pInstance) - m_pInstance->SetData(TYPE_THE_MAKER_EVENT,IN_PROGRESS); + m_pInstance->SetData(TYPE_THE_MAKER_EVENT, IN_PROGRESS); } void JustReachedHome() { if (m_pInstance) - m_pInstance->SetData(TYPE_THE_MAKER_EVENT,FAIL); + m_pInstance->SetData(TYPE_THE_MAKER_EVENT, FAIL); } - void KilledUnit(Unit* victim) + void KilledUnit(Unit* pVictim) { DoScriptText(urand(0, 1) ? SAY_KILL_1 : SAY_KILL_2, m_creature); } - void JustDied(Unit* Killer) + void JustDied(Unit* pKiller) { DoScriptText(SAY_DIE, m_creature); if (m_pInstance) - m_pInstance->SetData(TYPE_THE_MAKER_EVENT,DONE); + m_pInstance->SetData(TYPE_THE_MAKER_EVENT, DONE); } - void UpdateAI(const uint32 diff) + void UpdateAI(const uint32 uiDiff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - if (AcidSpray_Timer < diff) + if (m_uiAcidSprayTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_ACID_SPRAY); - AcidSpray_Timer = urand(15000, 23000); - }else AcidSpray_Timer -=diff; + if (DoCastSpellIfCan(m_creature, SPELL_ACID_SPRAY) == CAST_OK) + m_uiAcidSprayTimer = urand(15000, 23000); + } + else + m_uiAcidSprayTimer -= uiDiff; - if (ExplodingBreaker_Timer < diff) + if (m_uiExplodingBreakerTimer < uiDiff) { - if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) - DoCastSpellIfCan(target, m_bIsRegularMode ? SPELL_EXPLODING_BREAKER : SPELL_EXPLODING_BREAKER_H); - ExplodingBreaker_Timer = urand(4000, 12000); - }else ExplodingBreaker_Timer -=diff; + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, m_bIsRegularMode ? SPELL_EXPLODING_BREAKER : SPELL_EXPLODING_BREAKER_H) == CAST_OK) + m_uiExplodingBreakerTimer = urand(4000, 12000); + } + } + else + m_uiExplodingBreakerTimer -= uiDiff; - if (Domination_Timer < diff) + if (m_uiDominationTimer < uiDiff) { - Unit* target; - target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0); - - DoCastSpellIfCan(target,SPELL_DOMINATION); - - Domination_Timer = 15000+rand()%10000; - }else Domination_Timer -=diff; + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1)) + { + if (DoCastSpellIfCan(pTarget, SPELL_DOMINATION) == CAST_OK) + m_uiDominationTimer = urand(15000, 25000); + } + } + else + m_uiDominationTimer -= uiDiff; - if (Knockdown_Timer < diff) + if (m_uiKnockdownTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_KNOCKDOWN); - Knockdown_Timer = urand(4000, 12000); - }else Knockdown_Timer -=diff; + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_KNOCKDOWN) == CAST_OK) + m_uiKnockdownTimer = urand(4000, 12000); + } + else + m_uiKnockdownTimer -= uiDiff; DoMeleeAttackIfReady(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 788a7edb8..a7d12dde6 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2469" + #define SD2_REVISION_NR "2470" #endif // __SD2_REVISION_NR_H__ From 1ac560e06f7ce7a85620ea6c6156127711a621d1 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sat, 18 Feb 2012 01:31:44 +0200 Subject: [PATCH 0459/1172] [2471] Cleanup and improvement for Hungarfen - Underbog Note: the Underbog Mushroom may need some further research and work on the DB side (flags, scale, ...) --- .../underbog/boss_hungarfen.cpp | 150 +++++++++++------- sd2_revision_nr.h | 2 +- 2 files changed, 96 insertions(+), 56 deletions(-) diff --git a/scripts/outland/coilfang_reservoir/underbog/boss_hungarfen.cpp b/scripts/outland/coilfang_reservoir/underbog/boss_hungarfen.cpp index ffc3b0050..1a3db2d02 100644 --- a/scripts/outland/coilfang_reservoir/underbog/boss_hungarfen.cpp +++ b/scripts/outland/coilfang_reservoir/underbog/boss_hungarfen.cpp @@ -16,15 +16,26 @@ /* ScriptData SDName: Boss_Hungarfen -SD%Complete: 95 -SDComment: Need confirmation if spell data are same in both modes. Summons should have faster rate in heroic +SD%Complete: 80 +SDComment: Need confirmation if spell data are same in both modes; The Underbog Mushroom may need some more research SDCategory: Coilfang Resevoir, Underbog EndScriptData */ #include "precompiled.h" -#define SPELL_FOUL_SPORES 31673 -#define SPELL_ACID_GEYSER 38739 +enum +{ + SPELL_FOUL_SPORES = 31673, + SPELL_ACID_GEYSER = 38739, + SPELL_DESPAWN_MUSHROOMS = 34874, + + // Mushroom spells + SPELL_SPORE_CLOUD = 34168, + SPELL_PUTRID_MUSHROOM = 31690, + SPELL_GROW = 31698, + + NPC_UNDERBOG_MUSHROOM = 17990, +}; struct MANGOS_DLL_DECL boss_hungarfenAI : public ScriptedAI { @@ -35,100 +46,129 @@ struct MANGOS_DLL_DECL boss_hungarfenAI : public ScriptedAI } bool m_bIsRegularMode; - bool Root; - uint32 Mushroom_Timer; - uint32 AcidGeyser_Timer; + bool m_bHasSpores; + uint32 m_uiMushroomTimer; + uint32 m_uiAcidGeyserTimer; void Reset() { - Root = false; - Mushroom_Timer = 5000; // 1 mushroom after 5s, then one per 10s. This should be different in heroic mode - AcidGeyser_Timer = 10000; + m_bHasSpores = false; + m_uiMushroomTimer = 5000; // 1 mushroom after 5s, then one per 10s. This should be different in heroic mode + m_uiAcidGeyserTimer = 10000; + } + + void JustDied(Unit* pKiller) + { + DoCastSpellIfCan(m_creature, SPELL_DESPAWN_MUSHROOMS, CAST_TRIGGERED); + } + + void JustReachedHome() + { + DoCastSpellIfCan(m_creature, SPELL_DESPAWN_MUSHROOMS, CAST_TRIGGERED); } - void UpdateAI(const uint32 diff) + void UpdateAI(const uint32 uiDiff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - if (m_creature->GetHealthPercent() <= 20.0f) + if (m_creature->GetHealthPercent() <= 20.0f && !m_bHasSpores) { - if (!Root) - { - DoCastSpellIfCan(m_creature,SPELL_FOUL_SPORES); - Root = true; - } + if (DoCastSpellIfCan(m_creature, SPELL_FOUL_SPORES) == CAST_OK) + m_bHasSpores = true; } - if (Mushroom_Timer < diff) + if (m_uiMushroomTimer < uiDiff) { - if (Unit *target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) - m_creature->SummonCreature(17990, target->GetPositionX()+(rand()%8), target->GetPositionY()+(rand()%8), target->GetPositionZ(), (rand()%5), TEMPSUMMON_TIMED_DESPAWN, 22000); - else - m_creature->SummonCreature(17990, m_creature->GetPositionX()+(rand()%8), m_creature->GetPositionY()+(rand()%8), m_creature->GetPositionZ(), (rand()%5), TEMPSUMMON_TIMED_DESPAWN, 22000); + // Summon a mushroom exactly on target position + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + m_creature->SummonCreature(NPC_UNDERBOG_MUSHROOM, pTarget->GetPositionX(), pTarget->GetPositionY(), pTarget->GetPositionZ(), 0, TEMPSUMMON_CORPSE_DESPAWN, 0); - Mushroom_Timer = 10000; - }else Mushroom_Timer -= diff; + m_uiMushroomTimer = m_bIsRegularMode ? 10000 : 5000; + } + else + m_uiMushroomTimer -= uiDiff; - if (AcidGeyser_Timer < diff) + if (m_uiAcidGeyserTimer < uiDiff) { - if (Unit *target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) - DoCastSpellIfCan(target,SPELL_ACID_GEYSER); - AcidGeyser_Timer = urand(10000, 17500); - }else AcidGeyser_Timer -= diff; + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, SPELL_ACID_GEYSER) == CAST_OK) + m_uiAcidGeyserTimer = urand(10000, 17500); + } + } + else + m_uiAcidGeyserTimer -= uiDiff; DoMeleeAttackIfReady(); } }; + CreatureAI* GetAI_boss_hungarfen(Creature* pCreature) { return new boss_hungarfenAI(pCreature); } -#define SPELL_SPORE_CLOUD 34168 -#define SPELL_PUTRID_MUSHROOM 31690 -#define SPELL_GROW 31698 - struct MANGOS_DLL_DECL mob_underbog_mushroomAI : public ScriptedAI { mob_underbog_mushroomAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } - bool Stop; - uint32 Grow_Timer; - uint32 Shrink_Timer; + uint32 m_uiGrowTimer; + uint32 m_uiShrinkTimer; + uint32 m_uiSporeTimer; void Reset() { - Stop = false; - Grow_Timer = 0; - Shrink_Timer = 20000; + m_uiGrowTimer = 1000; + m_uiSporeTimer = 15000; + m_uiShrinkTimer = 20000; - DoCastSpellIfCan(m_creature, SPELL_PUTRID_MUSHROOM, CAST_TRIGGERED); - DoCastSpellIfCan(m_creature, SPELL_SPORE_CLOUD, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_PUTRID_MUSHROOM); } - void MoveInLineOfSight(Unit *who) { return; } - - void AttackStart(Unit* who) { return; } + void MoveInLineOfSight(Unit* pWho) { return; } + void AttackStart(Unit* pWho) { return; } - void UpdateAI(const uint32 diff) + void UpdateAI(const uint32 uiDiff) { - if (Stop) - return; + if (m_uiSporeTimer) + { + if (m_uiSporeTimer <= uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_SPORE_CLOUD) == CAST_OK) + { + m_uiGrowTimer = 0; + m_uiSporeTimer = 0; + } + } + else + m_uiSporeTimer -= uiDiff; + } - if (Grow_Timer <= diff) + if (m_uiGrowTimer) { - DoCastSpellIfCan(m_creature,SPELL_GROW); - Grow_Timer = 3000; - }else Grow_Timer -= diff; + if (m_uiGrowTimer <= uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_GROW) == CAST_OK) + m_uiGrowTimer = 3000; + } + else + m_uiGrowTimer -= uiDiff; + } - if (Shrink_Timer <= diff) + if (m_uiShrinkTimer) { - m_creature->RemoveAurasDueToSpell(SPELL_GROW); - Stop = true; - }else Shrink_Timer -= diff; + if (m_uiShrinkTimer <= uiDiff) + { + m_creature->RemoveAurasDueToSpell(SPELL_GROW); + m_uiShrinkTimer = 0; + } + else + m_uiShrinkTimer -= uiDiff; + } } }; + CreatureAI* GetAI_mob_underbog_mushroom(Creature* pCreature) { return new mob_underbog_mushroomAI(pCreature); diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index a7d12dde6..d0ce4d1fb 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2470" + #define SD2_REVISION_NR "2471" #endif // __SD2_REVISION_NR_H__ From 9d40a625f7642cb12613f0d6fdccb0fcdc80feb6 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sat, 18 Feb 2012 02:48:08 +0200 Subject: [PATCH 0460/1172] [2472] Cleanup and improvement for Hydromancer Thespia - The Steamvault Notes: The Water Elementals summoning needs further research The Water Elements script was not cleaned because it will be moved to acid --- .../steam_vault/boss_hydromancer_thespia.cpp | 125 ++++++++++-------- sd2_revision_nr.h | 2 +- sql/scriptdev2_script_full.sql | 4 +- sql/updates/r2472_scriptdev2.sql | 3 + 4 files changed, 78 insertions(+), 56 deletions(-) create mode 100644 sql/updates/r2472_scriptdev2.sql diff --git a/scripts/outland/coilfang_reservoir/steam_vault/boss_hydromancer_thespia.cpp b/scripts/outland/coilfang_reservoir/steam_vault/boss_hydromancer_thespia.cpp index d3c8ad993..77a246397 100644 --- a/scripts/outland/coilfang_reservoir/steam_vault/boss_hydromancer_thespia.cpp +++ b/scripts/outland/coilfang_reservoir/steam_vault/boss_hydromancer_thespia.cpp @@ -17,7 +17,7 @@ /* ScriptData SDName: Boss_Hydromancer_Thespia SD%Complete: 80 -SDComment: Needs additional adjustments (when instance script is adjusted) +SDComment: Timers may need small adjustments; Elementals summon needs further research SDCategory: Coilfang Resevoir, The Steamvault EndScriptData */ @@ -29,17 +29,26 @@ EndContentData */ #include "precompiled.h" #include "steam_vault.h" -#define SAY_SUMMON -1545000 -#define SAY_AGGRO_1 -1545001 -#define SAY_AGGRO_2 -1545002 -#define SAY_AGGRO_3 -1545003 -#define SAY_SLAY_1 -1545004 -#define SAY_SLAY_2 -1545005 -#define SAY_DEAD -1545006 - -#define SPELL_LIGHTNING_CLOUD 25033 -#define SPELL_LUNG_BURST 31481 -#define SPELL_ENVELOPING_WINDS 31718 +enum +{ + SAY_SUMMON = -1545000, + SAY_CLOUD = -1545024, + SAY_AGGRO_1 = -1545001, + SAY_AGGRO_2 = -1545002, + SAY_AGGRO_3 = -1545003, + SAY_SLAY_1 = -1545004, + SAY_SLAY_2 = -1545005, + SAY_DEAD = -1545006, + + SPELL_LIGHTNING_CLOUD = 25033, + SPELL_LUNG_BURST = 31481, + SPELL_ENVELOPING_WINDS = 31718, + SPELL_SUMMON_ELEMENTALS = 31476, // not sure where to use this + + // Water elemental spells + SPELL_WATER_BOLT_VOLLEY = 34449, + SPELL_WATER_BOLT_VOLLEY_H = 37924, +}; struct MANGOS_DLL_DECL boss_thespiaAI : public ScriptedAI { @@ -53,21 +62,24 @@ struct MANGOS_DLL_DECL boss_thespiaAI : public ScriptedAI ScriptedInstance* m_pInstance; bool m_bIsRegularMode; - uint32 LightningCloud_Timer; - uint32 LungBurst_Timer; - uint32 EnvelopingWinds_Timer; + uint32 m_uiLightningCloudTimer; + uint32 m_uiLungBurstTimer; + uint32 m_uiEnvelopingWindsTimer; void Reset() { - LightningCloud_Timer = 15000; - LungBurst_Timer = 7000; - EnvelopingWinds_Timer = 9000; + m_uiLightningCloudTimer = 15000; + m_uiLungBurstTimer = urand(15000, 18000); + m_uiEnvelopingWindsTimer = urand(20000, 25000); + } - if (m_pInstance && m_creature->isAlive()) - m_pInstance->SetData(TYPE_HYDROMANCER_THESPIA,NOT_STARTED); + void JustReachedHome() + { + if (m_pInstance) + m_pInstance->SetData(TYPE_HYDROMANCER_THESPIA, FAIL); } - void JustDied(Unit* Killer) + void JustDied(Unit* pKiller) { DoScriptText(SAY_DEAD, m_creature); @@ -75,12 +87,12 @@ struct MANGOS_DLL_DECL boss_thespiaAI : public ScriptedAI m_pInstance->SetData(TYPE_HYDROMANCER_THESPIA, DONE); } - void KilledUnit(Unit* victim) + void KilledUnit(Unit* pVictim) { DoScriptText(urand(0, 1) ? SAY_SLAY_1 : SAY_SLAY_2, m_creature); } - void Aggro(Unit *who) + void Aggro(Unit* pWho) { switch(urand(0, 2)) { @@ -93,50 +105,55 @@ struct MANGOS_DLL_DECL boss_thespiaAI : public ScriptedAI m_pInstance->SetData(TYPE_HYDROMANCER_THESPIA, IN_PROGRESS); } - void UpdateAI(const uint32 diff) + void UpdateAI(const uint32 uiDiff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - //LightningCloud_Timer - if (LightningCloud_Timer < diff) + // LightningCloud_Timer + if (m_uiLightningCloudTimer < uiDiff) { - //cast twice in Heroic mode - if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) - DoCastSpellIfCan(target, SPELL_LIGHTNING_CLOUD); - if (!m_bIsRegularMode) - if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) - DoCastSpellIfCan(target, SPELL_LIGHTNING_CLOUD); - LightningCloud_Timer = urand(15000, 25000); - }else LightningCloud_Timer -=diff; - - //LungBurst_Timer - if (LungBurst_Timer < diff) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, SPELL_LIGHTNING_CLOUD) == CAST_OK) + { + if (urand(0, 1)) + DoScriptText(SAY_CLOUD, m_creature); + m_uiLightningCloudTimer = m_bIsRegularMode ? 30000 : 10000; + } + } + } + else + m_uiLightningCloudTimer -= uiDiff; + + // LungBurst_Timer + if (m_uiLungBurstTimer < uiDiff) { - if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) - DoCastSpellIfCan(target, SPELL_LUNG_BURST); - LungBurst_Timer = urand(7000, 12000); - }else LungBurst_Timer -=diff; + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, SPELL_LUNG_BURST) == CAST_OK) + m_uiLungBurstTimer = urand(7000, 12000); + } + } + else + m_uiLungBurstTimer -= uiDiff; - //EnvelopingWinds_Timer - if (EnvelopingWinds_Timer < diff) + // EnvelopingWinds_Timer + if (m_uiEnvelopingWindsTimer < uiDiff) { - //cast twice in Heroic mode - if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) - DoCastSpellIfCan(target, SPELL_ENVELOPING_WINDS); - if (!m_bIsRegularMode) - if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) - DoCastSpellIfCan(target, SPELL_ENVELOPING_WINDS); - EnvelopingWinds_Timer = urand(10000, 15000); - }else EnvelopingWinds_Timer -=diff; + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, SPELL_ENVELOPING_WINDS) == CAST_OK) + m_uiEnvelopingWindsTimer = m_bIsRegularMode ? 10000 : 15000; + } + } + else + m_uiEnvelopingWindsTimer -= uiDiff; DoMeleeAttackIfReady(); } }; -#define SPELL_WATER_BOLT_VOLLEY 34449 -#define SPELL_WATER_BOLT_VOLLEY_H 37924 - struct MANGOS_DLL_DECL mob_coilfang_waterelementalAI : public ScriptedAI { mob_coilfang_waterelementalAI(Creature* pCreature) : ScriptedAI(pCreature) diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index d0ce4d1fb..7784fa78d 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2471" + #define SD2_REVISION_NR "2472" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index bb621b56e..a8c17d737 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -1870,7 +1870,9 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1545020,'Ba\'ahntha sol\'dorei!',10394,1,0,0,'kalithresh SAY_AGGRO3'), (-1545021,'Scram, surface filth!',10395,1,0,0,'kalithresh SAY_SLAY1'), (-1545022,'Ah ha ha ha ha ha ha!',10396,1,0,0,'kalithresh SAY_SLAY2'), -(-1545023,'For her Excellency... for... Vashj!',10397,1,0,0,'kalithresh SAY_DEATH'); +(-1545023,'For her Excellency... for... Vashj!',10397,1,0,0,'kalithresh SAY_DEATH'), + +(-1545024,'Enjoy the storm, warm bloods!',0,1,0,0,'thespia SAY_CLOUD'); -- -1 546 000 THE UNDERBOG diff --git a/sql/updates/r2472_scriptdev2.sql b/sql/updates/r2472_scriptdev2.sql new file mode 100644 index 000000000..5926422d2 --- /dev/null +++ b/sql/updates/r2472_scriptdev2.sql @@ -0,0 +1,3 @@ +DELETE FROM script_texts WHERE entry=-1545024; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1545024,'Enjoy the storm, warm bloods!',0,1,0,0,'thespia SAY_CLOUD'); From ca85e912b059589385411d75f3accada77707982 Mon Sep 17 00:00:00 2001 From: Hundekuchen Date: Tue, 28 Feb 2012 23:29:23 +0200 Subject: [PATCH 0461/1172] [2473] Implement Berserk spell for Doomlord Kazzak Signed-off-by: Xfurry --- scripts/outland/boss_doomlord_kazzak.cpp | 18 ++++++++++++++++-- sd2_revision_nr.h | 2 +- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/scripts/outland/boss_doomlord_kazzak.cpp b/scripts/outland/boss_doomlord_kazzak.cpp index 05dde4340..4054ef2aa 100644 --- a/scripts/outland/boss_doomlord_kazzak.cpp +++ b/scripts/outland/boss_doomlord_kazzak.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: Boss_Doomlord_Kazzak -SD%Complete: 80 -SDComment: Timers; Hard enrage NYI +SD%Complete: 90 +SDComment: Timers SDCategory: Hellfire Peninsula EndScriptData */ @@ -59,6 +59,7 @@ struct MANGOS_DLL_DECL boss_doomlordkazzakAI : public ScriptedAI uint32 m_uiVoidBoltTimer; uint32 m_uiMarkOfKazzakTimer; uint32 m_uiEnrageTimer; + uint32 m_uiGreatEnrageTimer; uint32 m_uiTwistedReflectionTimer; void Reset() @@ -69,6 +70,7 @@ struct MANGOS_DLL_DECL boss_doomlordkazzakAI : public ScriptedAI m_uiVoidBoltTimer = 30000; m_uiMarkOfKazzakTimer = 25000; m_uiEnrageTimer = 60000; + m_uiGreatEnrageTimer = 3*MINUTE*IN_MILLISECONDS; m_uiTwistedReflectionTimer = 33000; // Timer may be incorrect } @@ -171,6 +173,18 @@ struct MANGOS_DLL_DECL boss_doomlordkazzakAI : public ScriptedAI else m_uiEnrageTimer -= uiDiff; + // Great_Enrage_Timer + if (m_uiGreatEnrageTimer) + { + if (m_uiGreatEnrageTimer <= uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_BERSERK) == CAST_OK) + m_uiGreatEnrageTimer = 0; + } + else + m_uiGreatEnrageTimer -= uiDiff; + } + // Twisted Reflection if (m_uiTwistedReflectionTimer < uiDiff) { diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 7784fa78d..7f24032aa 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2472" + #define SD2_REVISION_NR "2473" #endif // __SD2_REVISION_NR_H__ From e0ea709fc0caaa5f2a771ef5955560660bfc65eb Mon Sep 17 00:00:00 2001 From: Xfurry Date: Tue, 28 Feb 2012 23:34:33 +0200 Subject: [PATCH 0462/1172] [2474] Cleanup and improvement for Warlord Kalithresh - Steam Vault Note: The Naga Distiller unit flags may need further adjustments --- .../steam_vault/boss_warlord_kalithresh.cpp | 277 +++++++++++------- .../steam_vault/instance_steam_vault.cpp | 17 +- .../steam_vault/steam_vault.h | 8 +- sd2_revision_nr.h | 2 +- 4 files changed, 185 insertions(+), 119 deletions(-) diff --git a/scripts/outland/coilfang_reservoir/steam_vault/boss_warlord_kalithresh.cpp b/scripts/outland/coilfang_reservoir/steam_vault/boss_warlord_kalithresh.cpp index 5e8272801..d18d66fd8 100644 --- a/scripts/outland/coilfang_reservoir/steam_vault/boss_warlord_kalithresh.cpp +++ b/scripts/outland/coilfang_reservoir/steam_vault/boss_warlord_kalithresh.cpp @@ -16,102 +16,67 @@ /* ScriptData SDName: Boss_Warlord_Kalithres -SD%Complete: 65 -SDComment: Contains workarounds regarding warlord's rage spells not acting as expected. Both scripts here require review and fine tuning. +SD%Complete: 90 +SDComment: Timers may need some fine adjustments SDCategory: Coilfang Resevoir, The Steamvault EndScriptData */ #include "precompiled.h" #include "steam_vault.h" -#define SAY_INTRO -1545016 -#define SAY_REGEN -1545017 -#define SAY_AGGRO1 -1545018 -#define SAY_AGGRO2 -1545019 -#define SAY_AGGRO3 -1545020 -#define SAY_SLAY1 -1545021 -#define SAY_SLAY2 -1545022 -#define SAY_DEATH -1545023 - -#define SPELL_SPELL_REFLECTION 31534 -#define SPELL_IMPALE 39061 -#define SPELL_WARLORDS_RAGE 37081 -#define SPELL_WARLORDS_RAGE_NAGA 31543 - -#define SPELL_WARLORDS_RAGE_PROC 36453 - -struct MANGOS_DLL_DECL mob_naga_distillerAI : public ScriptedAI +enum { - mob_naga_distillerAI(Creature* pCreature) : ScriptedAI(pCreature) - { - m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - Reset(); - } - - ScriptedInstance* m_pInstance; - - void Reset() - { - m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - - //hack, due to really weird spell behaviour :( - if (m_pInstance) - { - if (m_pInstance->GetData(TYPE_DISTILLER) == IN_PROGRESS) - { - m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - } - } - } - - void StartRageGen(Unit *caster) - { - m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - - DoCastSpellIfCan(m_creature, SPELL_WARLORDS_RAGE_NAGA, CAST_TRIGGERED); - - if (m_pInstance) - m_pInstance->SetData(TYPE_DISTILLER,IN_PROGRESS); - } - - void DamageTaken(Unit *done_by, uint32 &damage) - { - if (m_creature->GetHealth() <= damage) - if (m_pInstance) - m_pInstance->SetData(TYPE_DISTILLER,DONE); - } + SAY_INTRO = -1545016, + SAY_REGEN = -1545017, + SAY_AGGRO1 = -1545018, + SAY_AGGRO2 = -1545019, + SAY_AGGRO3 = -1545020, + SAY_SLAY1 = -1545021, + SAY_SLAY2 = -1545022, + SAY_DEATH = -1545023, + + SPELL_SPELL_REFLECTION = 31534, + SPELL_IMPALE = 39061, + SPELL_WARLORDS_RAGE = 37081, // triggers 36453 + SPELL_WARLORDS_RAGE_NAGA = 31543, // triggers 37076 + SPELL_WARLORDS_RAGE_AURA = 36453, }; struct MANGOS_DLL_DECL boss_warlord_kalithreshAI : public ScriptedAI { boss_warlord_kalithreshAI(Creature* pCreature) : ScriptedAI(pCreature) { - m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_pInstance = (instance_steam_vault*)pCreature->GetInstanceData(); + m_bHasTaunted = false; Reset(); } - ScriptedInstance* m_pInstance; + instance_steam_vault* m_pInstance; - uint32 Reflection_Timer; - uint32 Impale_Timer; - uint32 Rage_Timer; - bool CanRage; + uint32 m_uiReflectionTimer; + uint32 m_uiImpaleTimer; + uint32 m_uiRageTimer; + uint32 m_uiRageCastTimer; + + ObjectGuid m_distillerGuid; + + bool m_bHasTaunted; void Reset() { - Reflection_Timer = 10000; - Impale_Timer = urand(7000, 14000); - Rage_Timer = 45000; - CanRage = false; + m_uiReflectionTimer = 15000; + m_uiImpaleTimer = urand(7000, 14000); + m_uiRageTimer = urand(15000, 20000); + m_uiRageCastTimer = 0; + } + void JustReachedHome() + { if (m_pInstance) - m_pInstance->SetData(TYPE_WARLORD_KALITHRESH, NOT_STARTED); + m_pInstance->SetData(TYPE_WARLORD_KALITHRESH, FAIL); } - void Aggro(Unit *who) + void Aggro(Unit* pWho) { switch(urand(0, 2)) { @@ -124,21 +89,12 @@ struct MANGOS_DLL_DECL boss_warlord_kalithreshAI : public ScriptedAI m_pInstance->SetData(TYPE_WARLORD_KALITHRESH, IN_PROGRESS); } - void KilledUnit(Unit* victim) + void KilledUnit(Unit* pVictim) { DoScriptText(urand(0, 1) ? SAY_SLAY1 : SAY_SLAY2, m_creature); } - void SpellHit(Unit *caster, const SpellEntry *spell) - { - //hack :( - if (spell->Id == SPELL_WARLORDS_RAGE_PROC) - if (m_pInstance) - if (m_pInstance->GetData(TYPE_DISTILLER) == DONE) - m_creature->RemoveAurasDueToSpell(SPELL_WARLORDS_RAGE_PROC); - } - - void JustDied(Unit* Killer) + void JustDied(Unit* pKiller) { DoScriptText(SAY_DEATH, m_creature); @@ -146,65 +102,166 @@ struct MANGOS_DLL_DECL boss_warlord_kalithreshAI : public ScriptedAI m_pInstance->SetData(TYPE_WARLORD_KALITHRESH, DONE); } - void UpdateAI(const uint32 diff) + void MoveInLineOfSight(Unit* pWho) + { + if (!m_bHasTaunted && m_creature->IsWithinDistInMap(pWho, 40.0f)) + { + DoScriptText(SAY_INTRO, m_creature); + m_bHasTaunted = true; + } + + ScriptedAI::MoveInLineOfSight(pWho); + } + + void MovementInform(uint32 uiMoveType, uint32 uiPointId) + { + if (uiMoveType != POINT_MOTION_TYPE || !uiPointId) + return; + + // There is a small delay between the point reach and the channeling start + m_uiRageCastTimer = 1000; + } + + void UpdateAI(const uint32 uiDiff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - if (Rage_Timer < diff) + if (m_uiRageCastTimer) { - if (Creature* pDistiller = GetClosestCreatureWithEntry(m_creature, 17954, 100.0f)) + if (m_uiRageCastTimer <= uiDiff) { - DoScriptText(SAY_REGEN, m_creature); - DoCastSpellIfCan(m_creature,SPELL_WARLORDS_RAGE); - - if (mob_naga_distillerAI* pDistillerAI = dynamic_cast(pDistiller->AI())) - pDistillerAI->StartRageGen(m_creature); + if (DoCastSpellIfCan(m_creature, SPELL_WARLORDS_RAGE) == CAST_OK) + { + DoScriptText(SAY_REGEN, m_creature); + SetCombatMovement(true); + m_uiRageCastTimer = 0; + + // Also make the distiller cast + if (Creature* pDistiller = m_creature->GetMap()->GetCreature(m_distillerGuid)) + { + pDistiller->CastSpell(pDistiller, SPELL_WARLORDS_RAGE_NAGA, true); + // ToDo: check with DB if this is really needed + pDistiller->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + pDistiller->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + } + } } - Rage_Timer = urand(3000, 18000); - }else Rage_Timer -= diff; + else + m_uiRageCastTimer -= uiDiff; + } - //Reflection_Timer - if (Reflection_Timer < diff) + // Move to closest distiller + if (m_uiRageTimer) { - DoCastSpellIfCan(m_creature, SPELL_SPELL_REFLECTION); - Reflection_Timer = urand(15000, 25000); - }else Reflection_Timer -= diff; + if (m_uiRageTimer <= uiDiff) + { + // If the boss already has the rage aura we don't have to do this again + if (m_creature->HasAura(SPELL_WARLORDS_RAGE_AURA)) + { + m_uiRageTimer = 0; + return; + } + + if (Creature* pDistiller = GetClosestCreatureWithEntry(m_creature, NPC_NAGA_DISTILLER, 100.0f)) + { + float fX, fY, fZ; + pDistiller->GetContactPoint(m_creature, fX, fY, fZ, INTERACTION_DISTANCE); + m_creature->GetMotionMaster()->MovePoint(1, fX, fY, fZ); + SetCombatMovement(false); + m_distillerGuid = pDistiller->GetObjectGuid(); + } + + m_uiRageTimer = urand(35000, 45000); + } + else + m_uiRageTimer -= uiDiff; + } - //Impale_Timer - if (Impale_Timer < diff) + // Reflection_Timer + if (m_uiReflectionTimer < uiDiff) { - if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) - DoCastSpellIfCan(target,SPELL_IMPALE); + if (DoCastSpellIfCan(m_creature, SPELL_SPELL_REFLECTION) == CAST_OK) + m_uiReflectionTimer = 30000; + } + else + m_uiReflectionTimer -= uiDiff; - Impale_Timer = urand(7500, 12500); - }else Impale_Timer -= diff; + // Impale_Timer + if (m_uiImpaleTimer < uiDiff) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, SPELL_IMPALE) == CAST_OK) + m_uiImpaleTimer = urand(7500, 12500); + } + } + else + m_uiImpaleTimer -= uiDiff; DoMeleeAttackIfReady(); } }; -CreatureAI* GetAI_mob_naga_distiller(Creature* pCreature) +bool EffectAuraDummy_spell_aura_dummy_warlord_rage(const Aura* pAura, bool bApply) { - return new mob_naga_distillerAI(pCreature); + if (pAura->GetId() == SPELL_WARLORDS_RAGE && pAura->GetEffIndex() == EFFECT_INDEX_0) + { + if (Creature* pTarget = (Creature*)pAura->GetTarget()) + { + // Resume combat when the cast is finished or interrupted + if (!bApply) + { + if (pTarget->getVictim()) + { + pTarget->GetMotionMaster()->MovementExpired(); + pTarget->GetMotionMaster()->MoveChase(pTarget->getVictim()); + } + } + } + } + + return true; } +struct MANGOS_DLL_DECL mob_naga_distillerAI : public Scripted_NoMovementAI +{ + mob_naga_distillerAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { Reset(); } + + void Reset() + { + // ToDo - move to DB + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + } + + void MoveInLineOfSight(Unit* pWho) { } + void AttackStart(Unit* pWho) { } + void UpdateAI(const uint32 uiDiff) { } +}; + CreatureAI* GetAI_boss_warlord_kalithresh(Creature* pCreature) { return new boss_warlord_kalithreshAI(pCreature); } +CreatureAI* GetAI_mob_naga_distiller(Creature* pCreature) +{ + return new mob_naga_distillerAI(pCreature); +} + void AddSC_boss_warlord_kalithresh() { Script* pNewScript; pNewScript = new Script; - pNewScript->Name = "mob_naga_distiller"; - pNewScript->GetAI = &GetAI_mob_naga_distiller; + pNewScript->Name = "boss_warlord_kalithresh"; + pNewScript->GetAI = &GetAI_boss_warlord_kalithresh; + pNewScript->pEffectAuraDummy = &EffectAuraDummy_spell_aura_dummy_warlord_rage; pNewScript->RegisterSelf(); pNewScript = new Script; - pNewScript->Name = "boss_warlord_kalithresh"; - pNewScript->GetAI = &GetAI_boss_warlord_kalithresh; + pNewScript->Name = "mob_naga_distiller"; + pNewScript->GetAI = &GetAI_mob_naga_distiller; pNewScript->RegisterSelf(); } diff --git a/scripts/outland/coilfang_reservoir/steam_vault/instance_steam_vault.cpp b/scripts/outland/coilfang_reservoir/steam_vault/instance_steam_vault.cpp index e52dbea5f..d0394f8c9 100644 --- a/scripts/outland/coilfang_reservoir/steam_vault/instance_steam_vault.cpp +++ b/scripts/outland/coilfang_reservoir/steam_vault/instance_steam_vault.cpp @@ -61,7 +61,8 @@ void instance_steam_vault::OnCreatureCreate(Creature* pCreature) switch(pCreature->GetEntry()) { case NPC_STEAMRIGGER: - m_mNpcEntryGuidStore[NPC_STEAMRIGGER] = pCreature->GetObjectGuid(); + case NPC_KALITHRESH: + m_mNpcEntryGuidStore[pCreature->GetEntry()] = pCreature->GetObjectGuid(); break; } } @@ -78,6 +79,16 @@ void instance_steam_vault::OnObjectCreate(GameObject* pGo) } } +void instance_steam_vault::OnCreatureDeath(Creature* pCreature) +{ + // Break the Warlord spell on the Distiller death + if (pCreature->GetEntry() == NPC_NAGA_DISTILLER) + { + if (Creature* pWarlord = GetSingleCreatureFromStorage(NPC_KALITHRESH)) + pWarlord->InterruptNonMeleeSpells(false); + } +} + void instance_steam_vault::SetData(uint32 uiType, uint32 uiData) { switch (uiType) @@ -109,9 +120,6 @@ void instance_steam_vault::SetData(uint32 uiType, uint32 uiData) case TYPE_WARLORD_KALITHRESH: m_auiEncounter[2] = uiData; break; - case TYPE_DISTILLER: - m_auiEncounter[3] = uiData; - break; } } @@ -122,7 +130,6 @@ uint32 instance_steam_vault::GetData(uint32 uiType) case TYPE_HYDROMANCER_THESPIA: return m_auiEncounter[0]; case TYPE_MEKGINEER_STEAMRIGGER: return m_auiEncounter[1]; case TYPE_WARLORD_KALITHRESH: return m_auiEncounter[2]; - case TYPE_DISTILLER: return m_auiEncounter[3]; default: return 0; diff --git a/scripts/outland/coilfang_reservoir/steam_vault/steam_vault.h b/scripts/outland/coilfang_reservoir/steam_vault/steam_vault.h index 412270128..d228c401c 100644 --- a/scripts/outland/coilfang_reservoir/steam_vault/steam_vault.h +++ b/scripts/outland/coilfang_reservoir/steam_vault/steam_vault.h @@ -7,15 +7,15 @@ enum { - MAX_ENCOUNTER = 4, + MAX_ENCOUNTER = 3, TYPE_HYDROMANCER_THESPIA = 1, TYPE_MEKGINEER_STEAMRIGGER = 2, TYPE_WARLORD_KALITHRESH = 3, - TYPE_DISTILLER = 4, + NPC_NAGA_DISTILLER = 17954, NPC_STEAMRIGGER = 17796, - //NPC_KALITRESH = 17798, + NPC_KALITHRESH = 17798, //NPC_THESPIA = 17797, GO_MAIN_CHAMBERS_DOOR = 183049, @@ -33,6 +33,8 @@ class MANGOS_DLL_DECL instance_steam_vault : public ScriptedInstance void OnCreatureCreate(Creature* pCreature); void OnObjectCreate(GameObject* pGo); + void OnCreatureDeath(Creature* pCreature); + void SetData(uint32 uiType, uint32 uiData); uint32 GetData(uint32 uiType); diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 7f24032aa..3297f60f1 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2473" + #define SD2_REVISION_NR "2474" #endif // __SD2_REVISION_NR_H__ From b05c6812b6426dbcc86cdcd4c28c18ecdd6da86e Mon Sep 17 00:00:00 2001 From: Xfurry Date: Tue, 28 Feb 2012 23:36:34 +0200 Subject: [PATCH 0463/1172] [2475] Cleanup and improvement for High Botanist Freywinn - Botanica --- .../botanica/boss_high_botanist_freywinn.cpp | 208 ++++++++++-------- sd2_revision_nr.h | 2 +- 2 files changed, 115 insertions(+), 95 deletions(-) diff --git a/scripts/outland/tempest_keep/botanica/boss_high_botanist_freywinn.cpp b/scripts/outland/tempest_keep/botanica/boss_high_botanist_freywinn.cpp index c60419294..33f28452e 100644 --- a/scripts/outland/tempest_keep/botanica/boss_high_botanist_freywinn.cpp +++ b/scripts/outland/tempest_keep/botanica/boss_high_botanist_freywinn.cpp @@ -17,155 +17,175 @@ /* ScriptData SDName: Boss_High_Botanist_Freywinn SD%Complete: 90 -SDComment: some strange visual related to tree form(if aura lost before normal duration end). possible make summon&transform -process smoother(transform after delay) +SDComment: Timers may need some fine adjustments SDCategory: Tempest Keep, The Botanica EndScriptData */ #include "precompiled.h" -#define SAY_AGGRO -1553000 -#define SAY_KILL_1 -1553001 -#define SAY_KILL_2 -1553002 -#define SAY_TREE_1 -1553003 -#define SAY_TREE_2 -1553004 -#define SAY_DEATH -1553005 - -#define SPELL_TRANQUILITY 34550 -#define SPELL_TREE_FORM 34551 - -#define SPELL_SUMMON_FRAYER 34557 -#define ENTRY_FRAYER 19953 - -#define SPELL_PLANT_WHITE 34759 -#define SPELL_PLANT_GREEN 34761 -#define SPELL_PLANT_BLUE 34762 -#define SPELL_PLANT_RED 34763 +enum +{ + SAY_AGGRO = -1553000, + SAY_KILL_1 = -1553001, + SAY_KILL_2 = -1553002, + SAY_TREE_1 = -1553003, + SAY_TREE_2 = -1553004, + SAY_DEATH = -1553005, + + SPELL_TRANQUILITY = 34550, + SPELL_TREE_FORM = 34551, + SPELL_SUMMON_FRAYER = 34557, + SPELL_PLANT_WHITE = 34759, + SPELL_PLANT_GREEN = 34761, + SPELL_PLANT_BLUE = 34762, + SPELL_PLANT_RED = 34763, + + NPC_FRAYER_PROTECTOR = 19953, +}; struct MANGOS_DLL_DECL boss_high_botanist_freywinnAI : public ScriptedAI { boss_high_botanist_freywinnAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } - GUIDList Adds_List; - - uint32 SummonSeedling_Timer; - uint32 TreeForm_Timer; - uint32 MoveCheck_Timer; - uint32 DeadAddsCount; - bool MoveFree; + uint32 m_uiSummonSeedlingTimer; + uint32 m_uiTreeFormTimer; + uint32 m_uiFrayerTimer; + uint32 m_uiTreeFormEndTimer; + uint8 m_uiFrayerAddsCount; + bool m_bCanMoveFree; void Reset() { - Adds_List.clear(); - - SummonSeedling_Timer = 6000; - TreeForm_Timer = 30000; - MoveCheck_Timer = 1000; - DeadAddsCount = 0; - MoveFree = true; + m_uiSummonSeedlingTimer = 6000; + m_uiTreeFormTimer = 30000; + m_uiTreeFormEndTimer = 0; + m_uiFrayerAddsCount = 0; + m_uiFrayerTimer = 0; + m_bCanMoveFree = true; } - void Aggro(Unit *who) + void Aggro(Unit* pWho) { DoScriptText(SAY_AGGRO, m_creature); } - void JustSummoned(Creature *summoned) + void JustSummoned(Creature* pSummoned) { - if (summoned->GetEntry() == ENTRY_FRAYER) - Adds_List.push_back(summoned->GetObjectGuid()); + if (pSummoned->GetEntry() == NPC_FRAYER_PROTECTOR) + ++m_uiFrayerAddsCount; + + // Attack players + if (m_creature->getVictim()) + pSummoned->AI()->AttackStart(m_creature->getVictim()); + } + + void SummonedCreatureJustDied(Creature* pSummoned) + { + if (pSummoned->GetEntry() == NPC_FRAYER_PROTECTOR) + { + --m_uiFrayerAddsCount; + + // When all 3 Frayers are killed stop the tree form action (if not done this already) + if (!m_uiFrayerAddsCount && !m_bCanMoveFree) + { + m_uiTreeFormEndTimer = 0; + + if (m_creature->getVictim()) + m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); + + // Interrupt all spells and remove auras + m_creature->InterruptNonMeleeSpells(true); + m_creature->RemoveAllAuras(); + m_bCanMoveFree = true; + } + } } + // Wrapper to summon one seedling void DoSummonSeedling() { switch(urand(0, 3)) { - case 0: DoCastSpellIfCan(m_creature,SPELL_PLANT_WHITE); break; - case 1: DoCastSpellIfCan(m_creature,SPELL_PLANT_GREEN); break; - case 2: DoCastSpellIfCan(m_creature,SPELL_PLANT_BLUE); break; - case 3: DoCastSpellIfCan(m_creature,SPELL_PLANT_RED); break; + case 0: DoCastSpellIfCan(m_creature, SPELL_PLANT_WHITE); break; + case 1: DoCastSpellIfCan(m_creature, SPELL_PLANT_GREEN); break; + case 2: DoCastSpellIfCan(m_creature, SPELL_PLANT_BLUE); break; + case 3: DoCastSpellIfCan(m_creature, SPELL_PLANT_RED); break; } } - void KilledUnit(Unit* victim) + void KilledUnit(Unit* pVictim) { DoScriptText(urand(0, 1) ? SAY_KILL_1 : SAY_KILL_2, m_creature); } - void JustDied(Unit* Killer) + void JustDied(Unit* pKiller) { DoScriptText(SAY_DEATH, m_creature); } - void UpdateAI(const uint32 diff) + void UpdateAI(const uint32 uiDiff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - if (TreeForm_Timer < diff) + if (m_uiTreeFormTimer < uiDiff) { - DoScriptText(urand(0, 1) ? SAY_TREE_1 : SAY_TREE_2, m_creature); - - if (m_creature->IsNonMeleeSpellCasted(false)) - m_creature->InterruptNonMeleeSpells(true); - - m_creature->RemoveAllAuras(); + if (DoCastSpellIfCan(m_creature, SPELL_TRANQUILITY) == CAST_OK) + { + // Note: This should remove only negative auras + m_creature->RemoveAllAuras(); - DoCastSpellIfCan(m_creature, SPELL_SUMMON_FRAYER, CAST_TRIGGERED); - DoCastSpellIfCan(m_creature, SPELL_TRANQUILITY, CAST_TRIGGERED); - DoCastSpellIfCan(m_creature, SPELL_TREE_FORM, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_TREE_FORM, CAST_TRIGGERED); + DoScriptText(urand(0, 1) ? SAY_TREE_1 : SAY_TREE_2, m_creature); - m_creature->GetMotionMaster()->MoveIdle(); - MoveFree = false; + m_creature->GetMotionMaster()->MoveIdle(); + m_bCanMoveFree = false; + m_uiFrayerTimer = 1000; + m_uiTreeFormEndTimer = 45000; + m_uiTreeFormTimer = 75000; + } + } + else + m_uiTreeFormTimer -= uiDiff; - TreeForm_Timer = 75000; - }else TreeForm_Timer -= diff; + // The Frayer is summoned after one second in the tree phase + if (m_uiFrayerTimer) + { + if (m_uiFrayerTimer <= uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_SUMMON_FRAYER, CAST_TRIGGERED) == CAST_OK) + m_uiFrayerTimer = 0; + } + else + m_uiFrayerTimer -= uiDiff; + } - if (!MoveFree) + // Tree phase will be removed when the timer expires; + if (m_uiTreeFormEndTimer) { - if (MoveCheck_Timer < diff) + if (m_uiTreeFormEndTimer <= uiDiff) { - for(GUIDList::iterator itr = Adds_List.begin(); itr != Adds_List.end(); ++itr) - { - if (Creature* pTemp = m_creature->GetMap()->GetCreature(*itr)) - { - if (!pTemp->isAlive()) - { - Adds_List.erase(itr); - ++DeadAddsCount; - break; - } - } - } - - if (DeadAddsCount < 3 && TreeForm_Timer-30000 < diff) - DeadAddsCount = 3; - - if (DeadAddsCount >= 3) - { - Adds_List.clear(); - DeadAddsCount = 0; - - m_creature->InterruptNonMeleeSpells(true); - m_creature->RemoveAllAuras(); + if (m_creature->getVictim()) m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); - MoveFree = true; - } - MoveCheck_Timer = 500; + m_bCanMoveFree = true; + m_uiTreeFormEndTimer = 0; } - else MoveCheck_Timer -= diff; - - return; + else + m_uiTreeFormEndTimer -= uiDiff; } - /*if (m_creature->HasAura(SPELL_TREE_FORM, EFFECT_INDEX_0) || m_creature->HasAura(SPELL_TRANQUILITY, EFFECT_INDEX_0)) - return;*/ + // Don't do any other actions during tree form + if (!m_bCanMoveFree) + return; - //one random seedling every 5 secs, but not in tree form - if (SummonSeedling_Timer < diff) + // one random seedling every 5 secs, but not in tree form + if (m_uiSummonSeedlingTimer < uiDiff) { DoSummonSeedling(); - SummonSeedling_Timer = 6000; - }else SummonSeedling_Timer -= diff; + m_uiSummonSeedlingTimer = 6000; + } + else + m_uiSummonSeedlingTimer -= uiDiff; DoMeleeAttackIfReady(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 3297f60f1..28b115de7 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2474" + #define SD2_REVISION_NR "2475" #endif // __SD2_REVISION_NR_H__ From 1dcdfa10c64c609a8e5ea64414ef93dbac399b20 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Tue, 28 Feb 2012 23:39:30 +0200 Subject: [PATCH 0464/1172] [2476] Cleanup and improvement for Warp Splinter - Botanica Note: The summon spells require proper DB coordinates and the Saplings health may need to be revised --- .../botanica/boss_warp_splinter.cpp | 237 +++++++----------- sd2_revision_nr.h | 2 +- 2 files changed, 95 insertions(+), 144 deletions(-) diff --git a/scripts/outland/tempest_keep/botanica/boss_warp_splinter.cpp b/scripts/outland/tempest_keep/botanica/boss_warp_splinter.cpp index 82a2832cc..5fdc733d5 100644 --- a/scripts/outland/tempest_keep/botanica/boss_warp_splinter.cpp +++ b/scripts/outland/tempest_keep/botanica/boss_warp_splinter.cpp @@ -16,200 +16,151 @@ /* ScriptData SDName: Boss_Warp_Splinter -SD%Complete: 80 -SDComment: Includes Sapling (need some better control with these). Spells for boss possibly need some rework. +SD%Complete: 90 +SDComment: Timers may need adjustments SDCategory: Tempest Keep, The Botanica EndScriptData */ #include "precompiled.h" -/*##### -# mob_treant (Sapling) -#####*/ - -struct MANGOS_DLL_DECL mob_treantAI : public ScriptedAI -{ - mob_treantAI (Creature* pCreature) : ScriptedAI(pCreature) - { - Reset(); - } - - ObjectGuid m_warpGuid; - - void Reset() - { - m_creature->SetSpeedRate(MOVE_RUN, 0.5f); - } - - void MoveInLineOfSight(Unit *who) { } - - void UpdateAI(const uint32 diff) - { - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - if (m_creature->getVictim()->GetObjectGuid() != m_warpGuid) - DoMeleeAttackIfReady(); - } -}; - /*##### # boss_warp_splinter #####*/ -#define SAY_AGGRO -1553007 -#define SAY_SLAY_1 -1553008 -#define SAY_SLAY_2 -1553009 -#define SAY_SUMMON_1 -1553010 -#define SAY_SUMMON_2 -1553011 -#define SAY_DEATH -1553012 - -#define WAR_STOMP 34716 -#define SUMMON_TREANTS 34727 // DBC: 34727, 34731, 34733, 34734, 34736, 34739, 34741 (with Ancestral Life spell 34742) // won't work (guardian summon) -#define ARCANE_VOLLEY 36705 //37078, 34785 //must additional script them (because Splinter eats them after 20 sec ^) -#define SPELL_HEAL_FATHER 6262 - -#define CREATURE_TREANT 19949 -#define TREANT_SPAWN_DIST 50 //50 yards from Warp Splinter's spawn point - -float treant_pos[6][3] = +enum { - {24.301233f, 427.221100f, -27.060635f}, - {16.795492f, 359.678802f, -27.355425f}, - {53.493484f, 345.381470f, -26.196192f}, - {61.867096f, 439.362732f, -25.921030f}, - {109.86187f, 423.201630f, -27.356019f}, - {106.78015f, 355.582580f, -27.593357f} + SAY_AGGRO = -1553007, + SAY_SLAY_1 = -1553008, + SAY_SLAY_2 = -1553009, + SAY_SUMMON_1 = -1553010, + SAY_SUMMON_2 = -1553011, + SAY_DEATH = -1553012, + + SPELL_WAR_STOMP = 34716, + SPELL_SUMMON_SAPLINGS = 34741, // this will leech the health from all saplings + SPELL_ARCANE_VOLLEY = 36705, + SPELL_ARCANE_VOLLEY_H = 39133, + + NPC_SAPLING = 19949, }; +// Summon Saplings spells (too many to declare them above) +static const uint32 aSaplingsSummonSpells[10] = {34727,34730,34731,34732,34733,34734,34735,34736,34737,34739}; + struct MANGOS_DLL_DECL boss_warp_splinterAI : public ScriptedAI { boss_warp_splinterAI(Creature* pCreature) : ScriptedAI(pCreature) { - Treant_Spawn_Pos_X = pCreature->GetPositionX(); - Treant_Spawn_Pos_Y = pCreature->GetPositionY(); + // Add the summon spells to a vector for better handling + for (uint8 i = 0; i < 10; ++i) + m_vSummonSpells.push_back(aSaplingsSummonSpells[i]); + + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); Reset(); } - uint32 War_Stomp_Timer; - uint32 Summon_Treants_Timer; - uint32 Arcane_Volley_Timer; - uint32 CheckTreantLOS_Timer; - uint32 TreantLife_Timer; - ObjectGuid m_aTreantGuid[6]; + bool m_bIsRegularMode; - float Treant_Spawn_Pos_X; - float Treant_Spawn_Pos_Y; + uint32 m_uiWarStompTimer; + uint32 m_uiSummonTreantsTimer; + uint32 m_uiArcaneVolleyTimer; + + std::vector m_vSummonSpells; void Reset() { - War_Stomp_Timer = urand(25000, 40000); - Summon_Treants_Timer = 45000; - Arcane_Volley_Timer = urand(8000, 20000); - CheckTreantLOS_Timer = 1000; - TreantLife_Timer = 999999; - - for(int i = 0; i < 6; ++i) - m_aTreantGuid[i].Clear(); - - m_creature->SetSpeedRate(MOVE_RUN, 0.7f); + m_uiWarStompTimer = 20000; + m_uiSummonTreantsTimer = 15000; + m_uiArcaneVolleyTimer = urand(20000, 25000); } - void Aggro(Unit *who) + void Aggro(Unit* pWho) { DoScriptText(SAY_AGGRO, m_creature); } - void KilledUnit(Unit* victim) + void KilledUnit(Unit* pVictim) { DoScriptText(urand(0, 1) ? SAY_SLAY_1 : SAY_SLAY_2, m_creature); } - void JustDied(Unit* Killer) + void JustDied(Unit* pKiller) { DoScriptText(SAY_DEATH, m_creature); } - void SummonTreants() + void JustSummoned(Creature* pSummoned) { - for(int i = 0; i < 6; ++i) - { - float angle = (M_PI / 3) * i; - - float X = Treant_Spawn_Pos_X + TREANT_SPAWN_DIST * cos(angle); - float Y = Treant_Spawn_Pos_Y + TREANT_SPAWN_DIST * sin(angle); - //float Z = m_creature->GetMap()->GetHeight(X,Y, m_creature->GetPositionZ()); - //float Z = m_creature->GetPositionZ(); - float O = - m_creature->GetAngle(X,Y); - - if (Creature* pTreant = m_creature->SummonCreature(CREATURE_TREANT,treant_pos[i][0],treant_pos[i][1],treant_pos[i][2],O,TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN,40000)) - { - //pTreant->GetMotionMaster()->Mutate(new TargetedMovementGenerator(*m_creature)); - pTreant->AddThreat(m_creature); - m_aTreantGuid[i] = pTreant->GetObjectGuid(); - - if (mob_treantAI* pTreantAI = dynamic_cast(pTreant->AI())) - pTreantAI->m_warpGuid = m_creature->GetObjectGuid(); - } - } - - DoScriptText(urand(0, 1) ? SAY_SUMMON_1 : SAY_SUMMON_2, m_creature); + if (pSummoned->GetEntry() == NPC_SAPLING) + pSummoned->GetMotionMaster()->MoveFollow(m_creature, 0, 0); } - // Warp Splinter eat treants if they are near him - void EatTreant() + // Wrapper to summon all Saplings + void SummonTreants() { - for(int i=0; i<6; ++i) - { - Creature* pTreant = m_creature->GetMap()->GetCreature(m_aTreantGuid[i]); - - if (pTreant) - { - if (m_creature->IsWithinDistInMap(pTreant, 5)) - { - // 2) Heal Warp Splinter - int32 CurrentHP_Treant = (int32)pTreant->GetHealth(); - m_creature->CastCustomSpell(m_creature, SPELL_HEAL_FATHER, &CurrentHP_Treant, 0, 0, true, 0 ,0, m_creature->GetObjectGuid()); - - // 3) Kill Treant - pTreant->DealDamage(pTreant, pTreant->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); - } - } - } + // Choose 6 random spells out of 10 + std::random_shuffle(m_vSummonSpells.begin(), m_vSummonSpells.end()); + for (uint8 i = 0; i < 6; ++i) + DoCastSpellIfCan(m_creature, m_vSummonSpells[i], CAST_TRIGGERED); + + DoCastSpellIfCan(m_creature, SPELL_SUMMON_SAPLINGS, CAST_TRIGGERED); + DoScriptText(urand(0, 1) ? SAY_SUMMON_1 : SAY_SUMMON_2, m_creature); } - void UpdateAI(const uint32 diff) + void UpdateAI(const uint32 uiDiff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - //Check for War Stomp - if (War_Stomp_Timer < diff) + // War Stomp + if (m_uiWarStompTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(),WAR_STOMP); - War_Stomp_Timer = urand(25000, 40000); - } else War_Stomp_Timer -= diff; + if (DoCastSpellIfCan(m_creature, SPELL_WAR_STOMP) == CAST_OK) + m_uiWarStompTimer = urand(25000, 30000); + } + else + m_uiWarStompTimer -= uiDiff; - //Check for Arcane Volley - if (Arcane_Volley_Timer < diff) + // Arcane Volley + if (m_uiArcaneVolleyTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(),ARCANE_VOLLEY); - Arcane_Volley_Timer = urand(20000, 35000); - } else Arcane_Volley_Timer -= diff; + if (DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_ARCANE_VOLLEY : SPELL_ARCANE_VOLLEY_H) == CAST_OK) + m_uiArcaneVolleyTimer = urand(20000, 35000); + } + else + m_uiArcaneVolleyTimer -= uiDiff; - //Check for Summon Treants - if (Summon_Treants_Timer < diff) + // Summon Treants + if (m_uiSummonTreantsTimer < uiDiff) { SummonTreants(); - Summon_Treants_Timer = 45000; - } else Summon_Treants_Timer -= diff; + m_uiSummonTreantsTimer = 45000; + } + else + m_uiSummonTreantsTimer -= uiDiff; - // I check if there is a Treant in Warp Splinter's LOS, so he can eat them - if (CheckTreantLOS_Timer < diff) - { - EatTreant(); - CheckTreantLOS_Timer = 1000; - } else CheckTreantLOS_Timer -= diff; + DoMeleeAttackIfReady(); + } +}; + +/*##### +# mob_treant (Sapling) +#####*/ +struct MANGOS_DLL_DECL npc_saplingAI : public ScriptedAI +{ + npc_saplingAI (Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } + + void Reset() + { + // ToDo: This one may need further reserch + //m_creature->SetSpeedRate(MOVE_RUN, 0.5f); + } + + void MoveInLineOfSight(Unit* pWho) { } + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; DoMeleeAttackIfReady(); } @@ -220,9 +171,9 @@ CreatureAI* GetAI_boss_warp_splinter(Creature* pCreature) return new boss_warp_splinterAI(pCreature); } -CreatureAI* GetAI_mob_treant(Creature* pCreature) +CreatureAI* GetAI_npc_sapling(Creature* pCreature) { - return new mob_treantAI(pCreature); + return new npc_saplingAI(pCreature); } void AddSC_boss_warp_splinter() @@ -236,6 +187,6 @@ void AddSC_boss_warp_splinter() pNewScript = new Script; pNewScript->Name = "mob_warp_splinter_treant"; - pNewScript->GetAI = &GetAI_mob_treant; + pNewScript->GetAI = &GetAI_npc_sapling; pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 28b115de7..31de4867e 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2475" + #define SD2_REVISION_NR "2476" #endif // __SD2_REVISION_NR_H__ From 1fb98f9bc583226d32b8ae9741e9517c68fd10de Mon Sep 17 00:00:00 2001 From: Xfurry Date: Tue, 28 Feb 2012 23:42:13 +0200 Subject: [PATCH 0465/1172] [2477] Cleanup and improvement for Nethermancer Sepethrea - The Mechanar Note: The Raging Flames were not cleaned because they will be moved to eventAI. Also the speed and unit flags of these npcs need to be revised --- .../boss_nethermancer_sepethrea.cpp | 202 +++++++++--------- sd2_revision_nr.h | 2 +- 2 files changed, 99 insertions(+), 105 deletions(-) diff --git a/scripts/outland/tempest_keep/the_mechanar/boss_nethermancer_sepethrea.cpp b/scripts/outland/tempest_keep/the_mechanar/boss_nethermancer_sepethrea.cpp index f1a5a4bf9..70cb2a847 100644 --- a/scripts/outland/tempest_keep/the_mechanar/boss_nethermancer_sepethrea.cpp +++ b/scripts/outland/tempest_keep/the_mechanar/boss_nethermancer_sepethrea.cpp @@ -17,28 +17,37 @@ /* ScriptData SDName: Boss_Nethermancer_Sepethrea SD%Complete: 90 -SDComment: Need adjustments to initial summons +SDComment: May need some small adjustments SDCategory: Tempest Keep, The Mechanar EndScriptData */ #include "precompiled.h" #include "mechanar.h" -#define SAY_AGGRO -1554013 -#define SAY_SUMMON -1554014 -#define SAY_DRAGONS_BREATH_1 -1554015 -#define SAY_DRAGONS_BREATH_2 -1554016 -#define SAY_SLAY1 -1554017 -#define SAY_SLAY2 -1554018 -#define SAY_DEATH -1554019 - -#define SPELL_SUMMON_RAGIN_FLAMES 35275 - -#define SPELL_FROST_ATTACK 35263 -#define SPELL_ARCANE_BLAST 35314 -#define SPELL_DRAGONS_BREATH 35250 -#define SPELL_KNOCKBACK 37317 -#define SPELL_SOLARBURN 35267 +enum +{ + SAY_AGGRO = -1554013, + SAY_SUMMON = -1554014, + SAY_DRAGONS_BREATH_1 = -1554015, + SAY_DRAGONS_BREATH_2 = -1554016, + SAY_SLAY1 = -1554017, + SAY_SLAY2 = -1554018, + SAY_DEATH = -1554019, + + SPELL_SUMMON_RAGIN_FLAMES = 35275, + SPELL_FROST_ATTACK = 35263, + SPELL_ARCANE_BLAST = 35314, + SPELL_DRAGONS_BREATH = 35250, + SPELL_KNOCKBACK = 37317, + SPELL_SOLARBURN = 35267, + + NPC_RAGING_FLAMES = 20481, + + // Summons spells + SPELL_INFERNO = 35268, + SPELL_INFERNO_H = 39346, + SPELL_FIRE_TAIL = 35278, +}; struct MANGOS_DLL_DECL boss_nethermancer_sepethreaAI : public ScriptedAI { @@ -52,41 +61,33 @@ struct MANGOS_DLL_DECL boss_nethermancer_sepethreaAI : public ScriptedAI ScriptedInstance* m_pInstance; bool m_bIsRegularMode; - uint32 frost_attack_Timer; - uint32 arcane_blast_Timer; - uint32 dragons_breath_Timer; - uint32 knockback_Timer; - uint32 solarburn_Timer; + uint32 m_uiFrostAttackTimer; + uint32 m_uiArcaneBlastTimer; + uint32 m_uiDragonsBreathTimer; + uint32 m_uiKnockbackTimer; + uint32 m_uiSolarburnTimer; void Reset() { - frost_attack_Timer = urand(7000, 10000); - arcane_blast_Timer = urand(12000, 18000); - dragons_breath_Timer = urand(18000, 22000); - knockback_Timer = urand(22000, 28000); - solarburn_Timer = 30000; + m_uiFrostAttackTimer = urand(7000, 10000); + m_uiArcaneBlastTimer = urand(12000, 18000); + m_uiDragonsBreathTimer = urand(18000, 22000); + m_uiKnockbackTimer = urand(22000, 28000); + m_uiSolarburnTimer = 30000; } - void Aggro(Unit *who) + void Aggro(Unit* pWho) { DoScriptText(SAY_AGGRO, m_creature); - - //Summon two guards, three in heroic - uint8 am = (m_bIsRegularMode ? 2 : 1); - for(int i = 0; i < am; ++i) - { - DoCastSpellIfCan(who,SPELL_SUMMON_RAGIN_FLAMES); - } - - DoScriptText(SAY_SUMMON, m_creature); + DoCastSpellIfCan(m_creature, SPELL_SUMMON_RAGIN_FLAMES); } - void KilledUnit(Unit* victim) + void KilledUnit(Unit* pVictim) { DoScriptText(urand(0, 1) ? SAY_SLAY1 : SAY_SLAY2, m_creature); } - void JustDied(Unit* Killer) + void JustDied(Unit* pKiller) { DoScriptText(SAY_DEATH, m_creature); @@ -94,50 +95,77 @@ struct MANGOS_DLL_DECL boss_nethermancer_sepethreaAI : public ScriptedAI m_pInstance->SetData(TYPE_SEPETHREA, DONE); } - void UpdateAI(const uint32 diff) + void JustSummoned(Creature* pSummoned) { - //Return since we have no target + if (pSummoned->GetEntry() == NPC_RAGING_FLAMES) + { + pSummoned->ApplySpellImmune(0, IMMUNITY_DAMAGE, SPELL_SCHOOL_MASK_MAGIC, true); + pSummoned->ApplySpellImmune(0, IMMUNITY_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, true); + + // ToDo: need to fixate target and make them walk! + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + pSummoned->GetMotionMaster()->MoveChase(pTarget); + } + } + + void UpdateAI(const uint32 uiDiff) + { + // Return since we have no target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - //Frost Attack - if (frost_attack_Timer < diff) + // Frost Attack + if (m_uiFrostAttackTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_FROST_ATTACK); - frost_attack_Timer = urand(7000, 10000); - }else frost_attack_Timer -= diff; + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_FROST_ATTACK) == CAST_OK) + m_uiFrostAttackTimer = urand(7000, 10000); + } + else + m_uiFrostAttackTimer -= uiDiff; - //Arcane Blast - if (arcane_blast_Timer < diff) + // Arcane Blast + if (m_uiArcaneBlastTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_ARCANE_BLAST); - arcane_blast_Timer = 15000; - }else arcane_blast_Timer -= diff; + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_ARCANE_BLAST) == CAST_OK) + m_uiArcaneBlastTimer = 15000; + } + else + m_uiArcaneBlastTimer -= uiDiff; - //Dragons Breath - if (dragons_breath_Timer < diff) + // Dragons Breath + if (m_uiDragonsBreathTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_DRAGONS_BREATH); - - if (urand(0, 1)) - DoScriptText(urand(0, 1) ? SAY_DRAGONS_BREATH_1 : SAY_DRAGONS_BREATH_2, m_creature); + if (DoCastSpellIfCan(m_creature, SPELL_DRAGONS_BREATH) == CAST_OK) + { + if (urand(0, 1)) + DoScriptText(urand(0, 1) ? SAY_DRAGONS_BREATH_1 : SAY_DRAGONS_BREATH_2, m_creature); - dragons_breath_Timer = urand(12000, 22000); - }else dragons_breath_Timer -= diff; + m_uiDragonsBreathTimer = urand(12000, 22000); + } + } + else + m_uiDragonsBreathTimer -= uiDiff; - //Check for Knockback - if (knockback_Timer < diff) + // Knockback + if (m_uiKnockbackTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_KNOCKBACK); - knockback_Timer = urand(15000, 25000); - }else knockback_Timer -= diff; + if (DoCastSpellIfCan(m_creature, SPELL_KNOCKBACK) == CAST_OK) + m_uiKnockbackTimer = urand(15000, 25000); + } + else + m_uiKnockbackTimer -= uiDiff; - //Check for Solarburn - if (solarburn_Timer < diff) + // Solarburn + if (m_uiSolarburnTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_SOLARBURN); - solarburn_Timer = 30000; - }else solarburn_Timer -= diff; + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1)) + { + if (DoCastSpellIfCan(pTarget, SPELL_SOLARBURN) == CAST_OK) + m_uiSolarburnTimer = 30000; + } + } + else + m_uiSolarburnTimer -= uiDiff; DoMeleeAttackIfReady(); } @@ -148,10 +176,6 @@ CreatureAI* GetAI_boss_nethermancer_sepethrea(Creature* pCreature) return new boss_nethermancer_sepethreaAI(pCreature); } -#define SPELL_INFERNO 35268 -#define SPELL_INFERNO_H 39346 -#define SPELL_FIRE_TAIL 35278 - struct MANGOS_DLL_DECL mob_ragin_flamesAI : public ScriptedAI { mob_ragin_flamesAI(Creature* pCreature) : ScriptedAI(pCreature) @@ -166,18 +190,11 @@ struct MANGOS_DLL_DECL mob_ragin_flamesAI : public ScriptedAI uint32 inferno_Timer; uint32 flame_timer; - uint32 Check_Timer; - - bool onlyonce; void Reset() { inferno_Timer = 10000; flame_timer = 500; - Check_Timer = 2000; - onlyonce = false; - m_creature->ApplySpellImmune(0, IMMUNITY_DAMAGE, SPELL_SCHOOL_MASK_MAGIC, true); - m_creature->ApplySpellImmune(0, IMMUNITY_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, true); } void UpdateAI(const uint32 diff) @@ -185,13 +202,6 @@ struct MANGOS_DLL_DECL mob_ragin_flamesAI : public ScriptedAI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - if (!onlyonce) - { - if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) - m_creature->GetMotionMaster()->MoveChase(target); - onlyonce = true; - } - if (inferno_Timer < diff) { DoCastSpellIfCan(m_creature->getVictim(), m_bIsRegularMode ? SPELL_INFERNO : SPELL_INFERNO_H); @@ -207,31 +217,15 @@ struct MANGOS_DLL_DECL mob_ragin_flamesAI : public ScriptedAI flame_timer = 500; }else flame_timer -=diff; - //Check_Timer - if (Check_Timer < diff) - { - if (m_pInstance) - { - if (m_pInstance->GetData(TYPE_SEPETHREA) == DONE) - { - //remove - m_creature->SetDeathState(JUST_DIED); - m_creature->RemoveCorpse(); - return; - } - } - - Check_Timer = 1000; - }else Check_Timer -= diff; - DoMeleeAttackIfReady(); } - }; + CreatureAI* GetAI_mob_ragin_flames(Creature* pCreature) { return new mob_ragin_flamesAI(pCreature); } + void AddSC_boss_nethermancer_sepethrea() { Script* pNewScript; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 31de4867e..22b4183be 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2476" + #define SD2_REVISION_NR "2477" #endif // __SD2_REVISION_NR_H__ From 4cf86fe523a38610caa69da4347258601b3da7a8 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Tue, 28 Feb 2012 23:44:17 +0200 Subject: [PATCH 0466/1172] [2478] Cleanup and improvement ofr Pathaleon the Calculator - The Mechanar Note: The Nether Wraiths handling isn't correct - will need further research. --- .../boss_pathaleon_the_calculator.cpp | 254 ++++++++++-------- sd2_revision_nr.h | 2 +- 2 files changed, 140 insertions(+), 116 deletions(-) diff --git a/scripts/outland/tempest_keep/the_mechanar/boss_pathaleon_the_calculator.cpp b/scripts/outland/tempest_keep/the_mechanar/boss_pathaleon_the_calculator.cpp index 83970dc0b..c602a7b3c 100644 --- a/scripts/outland/tempest_keep/the_mechanar/boss_pathaleon_the_calculator.cpp +++ b/scripts/outland/tempest_keep/the_mechanar/boss_pathaleon_the_calculator.cpp @@ -16,209 +16,233 @@ /* ScriptData SDName: Boss Pathaleon the Calculator -SD%Complete: 50 -SDComment: Event missing. Script for himself 99% blizzlike. +SD%Complete: 40 +SDComment: Pathway event NYI; The Nether Wraith script is wrong - needs research and update SDCategory: Tempest Keep, The Mechanar EndScriptData */ #include "precompiled.h" -#define SAY_AGGRO -1554020 -#define SAY_DOMINATION_1 -1554021 -#define SAY_DOMINATION_2 -1554022 -#define SAY_SUMMON -1554023 -#define SAY_ENRAGE -1554024 -#define SAY_SLAY_1 -1554025 -#define SAY_SLAY_2 -1554026 -#define SAY_DEATH -1554027 - -// Spells to be casted -#define SPELL_MANA_TAP 36021 -#define SPELL_ARCANE_TORRENT 36022 -#define SPELL_DOMINATION 35280 -#define SPELL_ARCANE_EXPLOSION_H 15453 -#define SPELL_FRENZY 36992 - -#define SPELL_SUMMON_NETHER_WRAITH_1 35285 //Spells work, but not implemented -#define SPELL_SUMMON_NETHER_WRAITH_2 35286 -#define SPELL_SUMMON_NETHER_WRAITH_3 35287 -#define SPELL_SUMMON_NETHER_WRAITH_4 35288 - -// Add Spells -#define SPELL_DETONATION 35058 -#define SPELL_ARCANE_MISSILES 35034 +enum +{ + SAY_AGGRO = -1554020, + SAY_DOMINATION_1 = -1554021, + SAY_DOMINATION_2 = -1554022, + SAY_SUMMON = -1554023, + SAY_ENRAGE = -1554024, + SAY_SLAY_1 = -1554025, + SAY_SLAY_2 = -1554026, + SAY_DEATH = -1554027, + + // Spells to be casted + SPELL_MANA_TAP = 36021, + SPELL_ARCANE_TORRENT = 36022, + SPELL_DOMINATION = 35280, + SPELL_ARCANE_EXPLOSION_H = 15453, + SPELL_FRENZY = 36992, + SPELL_DISGRUNTLED_ANGER = 35289, // research where to use this - possible to be used by Nether Wraits when boss is at 20% HP + + SPELL_SUMMON_NETHER_WRAITH_1 = 35285, + SPELL_SUMMON_NETHER_WRAITH_2 = 35286, + SPELL_SUMMON_NETHER_WRAITH_3 = 35287, + SPELL_SUMMON_NETHER_WRAITH_4 = 35288, + + // Add Spells + SPELL_DETONATION = 35058, + SPELL_ARCANE_BOLT = 20720, +}; + +static const uint32 aWraithSummonSpells[4] = {SPELL_SUMMON_NETHER_WRAITH_1, SPELL_SUMMON_NETHER_WRAITH_2, SPELL_SUMMON_NETHER_WRAITH_3, SPELL_SUMMON_NETHER_WRAITH_4}; struct MANGOS_DLL_DECL boss_pathaleon_the_calculatorAI : public ScriptedAI { boss_pathaleon_the_calculatorAI(Creature* pCreature) : ScriptedAI(pCreature) { + // Add the summon spells to a vector for better handling + for (uint8 i = 0; i < 4; ++i) + m_vSummonSpells.push_back(aWraithSummonSpells[i]); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); Reset(); } bool m_bIsRegularMode; - uint32 Summon_Timer; - uint32 ManaTap_Timer; - uint32 ArcaneTorrent_Timer; - uint32 Domination_Timer; - uint32 ArcaneExplosion_Timer; - bool Enraged; + uint32 m_uiSummonTimer; + uint32 m_uiManaTapTimer; + uint32 m_uiArcaneTorrentTimer; + uint32 m_uiDominationTimer; + uint32 m_uiArcaneExplosionTimer; + bool m_bIsEnraged; - uint32 Counter; + std::vector m_vSummonSpells; void Reset() { - Summon_Timer = 30000; - ManaTap_Timer = urand(12000, 20000); - ArcaneTorrent_Timer = urand(16000, 25000); - Domination_Timer = urand(25000, 40000); - ArcaneExplosion_Timer = urand(8000, 13000); - - Enraged = false; - Counter = 0; + m_uiSummonTimer = 30000; + m_uiManaTapTimer = urand(12000, 20000); + m_uiArcaneTorrentTimer = urand(16000, 25000); + m_uiDominationTimer = urand(25000, 40000); + m_uiArcaneExplosionTimer = urand(8000, 13000); + m_bIsEnraged = false; } - void Aggro(Unit *who) + void Aggro(Unit* pWho) { DoScriptText(SAY_AGGRO, m_creature); } - void KilledUnit(Unit* victim) + void KilledUnit(Unit* pVictim) { DoScriptText(urand(0, 1) ? SAY_SLAY_1 : SAY_SLAY_2, m_creature); } - void JustDied(Unit* Killer) + void JustDied(Unit* pKiller) { DoScriptText(SAY_DEATH, m_creature); } - void UpdateAI(const uint32 diff) + void JustSummoned(Creature* pSummoned) + { + if (m_creature->getVictim()) + pSummoned->AI()->AttackStart(m_creature->getVictim()); + } + + void UpdateAI(const uint32 uiDiff) { //Return since we have no target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - if (Summon_Timer < diff) + if (m_uiSummonTimer < uiDiff) { - for(int i = 0; i < 3; ++i) - { - Unit* target = NULL; - target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0); - Creature* Wraith = m_creature->SummonCreature(21062,m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(),0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000); - if (target && Wraith) - Wraith->AI()->AttackStart(target); - } + // Choose 3 random spells out of 4 + std::random_shuffle(m_vSummonSpells.begin(), m_vSummonSpells.end()); + for (uint8 i = 0; i < 3; ++i) + DoCastSpellIfCan(m_creature, m_vSummonSpells[i], CAST_TRIGGERED); DoScriptText(SAY_SUMMON, m_creature); + m_uiSummonTimer = urand(30000, 45000); + } + else + m_uiSummonTimer -= uiDiff; - Summon_Timer = urand(30000, 45000); - }else Summon_Timer -= diff; - - if (ManaTap_Timer < diff) + if (m_uiManaTapTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_MANA_TAP); - ManaTap_Timer = urand(14000, 22000); - }else ManaTap_Timer -= diff; + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0, SPELL_MANA_TAP, SELECT_FLAG_POWER_MANA)) + { + if (DoCastSpellIfCan(pTarget, SPELL_MANA_TAP) == CAST_OK) + m_uiManaTapTimer = urand(14000, 22000); + } + } + else + m_uiManaTapTimer -= uiDiff; - if (ArcaneTorrent_Timer < diff) + if (m_uiArcaneTorrentTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_ARCANE_TORRENT); - ArcaneTorrent_Timer = urand(12000, 18000); - }else ArcaneTorrent_Timer -= diff; + if (DoCastSpellIfCan(m_creature, SPELL_ARCANE_TORRENT) == CAST_OK) + m_uiArcaneTorrentTimer = urand(12000, 18000); + } + else + m_uiArcaneTorrentTimer -= uiDiff; - if (Domination_Timer < diff) + if (m_uiDominationTimer < uiDiff) { - if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,1)) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1)) { - DoScriptText(urand(0, 1) ? SAY_DOMINATION_1 : SAY_DOMINATION_2, m_creature); - DoCastSpellIfCan(target,SPELL_DOMINATION); + if (DoCastSpellIfCan(pTarget, SPELL_DOMINATION) == CAST_OK) + { + DoScriptText(urand(0, 1) ? SAY_DOMINATION_1 : SAY_DOMINATION_2, m_creature); + m_uiDominationTimer = urand(25000, 30000); + } } + } + else + m_uiDominationTimer -= uiDiff; - Domination_Timer = urand(25000, 30000); - }else Domination_Timer -= diff; - - //Only casting if Heroic Mode is used + // Only casting if Heroic Mode is used if (!m_bIsRegularMode) { - if (ArcaneExplosion_Timer < diff) + if (m_uiArcaneExplosionTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_ARCANE_EXPLOSION_H); - ArcaneExplosion_Timer = urand(10000, 14000); - }else ArcaneExplosion_Timer -= diff; + if (DoCastSpellIfCan(m_creature, SPELL_ARCANE_EXPLOSION_H) == CAST_OK) + m_uiArcaneExplosionTimer = urand(10000, 14000); + } + else + m_uiArcaneExplosionTimer -= uiDiff; } - if (!Enraged && m_creature->GetHealthPercent() < 21.0f) + if (!m_bIsEnraged && m_creature->GetHealthPercent() < 21.0f) { - DoCastSpellIfCan(m_creature, SPELL_FRENZY); - DoScriptText(SAY_ENRAGE, m_creature); - Enraged = true; + if (DoCastSpellIfCan(m_creature, SPELL_FRENZY) == CAST_OK) + { + // ToDo: despawn nether wraiths here + DoScriptText(SAY_ENRAGE, m_creature); + m_bIsEnraged = true; + } } DoMeleeAttackIfReady(); } }; -CreatureAI* GetAI_boss_pathaleon_the_calculator(Creature* pCreature) -{ - return new boss_pathaleon_the_calculatorAI(pCreature); -} struct MANGOS_DLL_DECL mob_nether_wraithAI : public ScriptedAI { mob_nether_wraithAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} - ScriptedInstance* m_pInstance; - - uint32 ArcaneMissiles_Timer; - uint32 Detonation_Timer; - uint32 Die_Timer; - bool Detonation; + uint32 m_uiArcaneMissilesTimer; + uint32 m_uiDetonationTimer; void Reset() { - ArcaneMissiles_Timer = urand(1000, 4000); - Detonation_Timer = 20000; - Die_Timer = 2200; - Detonation = false; + m_uiArcaneMissilesTimer = urand(1000, 4000); + m_uiDetonationTimer = 20000; } - void UpdateAI(const uint32 diff) + void UpdateAI(const uint32 uiDiff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - if (ArcaneMissiles_Timer < diff) + if (m_uiArcaneMissilesTimer < uiDiff) { - if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,1)) - DoCastSpellIfCan(target,SPELL_ARCANE_MISSILES); - else - DoCastSpellIfCan(m_creature->getVictim(),SPELL_ARCANE_MISSILES); + Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1); + if (!pTarget) + pTarget = m_creature->getVictim(); - ArcaneMissiles_Timer = urand(5000, 10000); - }else ArcaneMissiles_Timer -=diff; - - if (!Detonation) - { - if (Detonation_Timer < diff) + if (pTarget) { - DoCastSpellIfCan(m_creature,SPELL_DETONATION); - Detonation = true; - }else Detonation_Timer -= diff; + if (DoCastSpellIfCan(pTarget, SPELL_ARCANE_BOLT) == CAST_OK) + m_uiArcaneMissilesTimer = urand(5000, 10000); + } } + else + m_uiArcaneMissilesTimer -=uiDiff; - if (Detonation) + if (m_uiDetonationTimer) { - if (Die_Timer < diff) + if (m_uiDetonationTimer <= uiDiff) { - m_creature->SetDeathState(JUST_DIED); - m_creature->RemoveCorpse(); - }else Die_Timer -= diff; + if (DoCastSpellIfCan(m_creature, SPELL_DETONATION) == CAST_OK) + { + // Not sure if this one needs to be despawned here. Needs further research + //m_creature->ForcedDespawn(2200); + m_uiDetonationTimer = 0; + } + } + else + m_uiDetonationTimer -= uiDiff; } DoMeleeAttackIfReady(); } }; + +CreatureAI* GetAI_boss_pathaleon_the_calculator(Creature* pCreature) +{ + return new boss_pathaleon_the_calculatorAI(pCreature); +} + CreatureAI* GetAI_mob_nether_wraith(Creature* pCreature) { return new mob_nether_wraithAI(pCreature); diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 22b4183be..6790d105f 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2477" + #define SD2_REVISION_NR "2478" #endif // __SD2_REVISION_NR_H__ From 17a19b28ff091932e69ed7b722ca8a757108fc42 Mon Sep 17 00:00:00 2001 From: NeatElves Date: Fri, 23 Mar 2012 20:59:39 +0200 Subject: [PATCH 0467/1172] [2479] Remove script for npc 10307 Signed-off-by: Xfurry --- scripts/kalimdor/winterspring.cpp | 39 +------------------------------ sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 - sql/updates/r2479_mangos.sql | 1 + 4 files changed, 3 insertions(+), 40 deletions(-) create mode 100644 sql/updates/r2479_mangos.sql diff --git a/scripts/kalimdor/winterspring.cpp b/scripts/kalimdor/winterspring.cpp index f690d2d4a..6d41eb9fe 100644 --- a/scripts/kalimdor/winterspring.cpp +++ b/scripts/kalimdor/winterspring.cpp @@ -17,14 +17,13 @@ /* ScriptData SDName: Winterspring SD%Complete: 90 -SDComment: Quest support: 4901, 5126 (Loraxs' tale missing proper gossip items text). Vendor Rivern Frostwind. Obtain Cache of Mau'ari +SDComment: Quest support: 4901, 5126 (Loraxs' tale missing proper gossip items text). Vendor Rivern Frostwind. SDCategory: Winterspring EndScriptData */ /* ContentData npc_lorax npc_rivern_frostwind -npc_witch_doctor_mauari npc_ranshalla EndContentData */ @@ -105,36 +104,6 @@ bool GossipSelect_npc_rivern_frostwind(Player* pPlayer, Creature* pCreature, uin return true; } -/*###### -## npc_witch_doctor_mauari -######*/ - -bool GossipHello_npc_witch_doctor_mauari(Player* pPlayer, Creature* pCreature) -{ - if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); - - if (pPlayer->GetQuestRewardStatus(975)) - { - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "I'd like you to make me a new Cache of Mau'ari please.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - pPlayer->SEND_GOSSIP_MENU(3377, pCreature->GetObjectGuid()); - }else - pPlayer->SEND_GOSSIP_MENU(3375, pCreature->GetObjectGuid()); - - return true; -} - -bool GossipSelect_npc_witch_doctor_mauari(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) -{ - if (uiAction==GOSSIP_ACTION_INFO_DEF+1) - { - pPlayer->CLOSE_GOSSIP_MENU(); - pCreature->CastSpell(pPlayer, 16351, false); - } - - return true; -} - /*#### # npc_ranshalla ####*/ @@ -580,12 +549,6 @@ void AddSC_winterspring() pNewScript->pGossipSelect = &GossipSelect_npc_rivern_frostwind; pNewScript->RegisterSelf(); - pNewScript = new Script; - pNewScript->Name = "npc_witch_doctor_mauari"; - pNewScript->pGossipHello = &GossipHello_npc_witch_doctor_mauari; - pNewScript->pGossipSelect = &GossipSelect_npc_witch_doctor_mauari; - pNewScript->RegisterSelf(); - pNewScript = new Script; pNewScript->Name = "npc_ranshalla"; pNewScript->GetAI = &GetAI_npc_ranshalla; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 6790d105f..0cbd732cb 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2478" + #define SD2_REVISION_NR "2479" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index a39efa85e..26e7863d3 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -1297,7 +1297,6 @@ UPDATE creature_template SET ScriptName='npc_mikhail' WHERE entry=4963; /* WINTERSPRING */ UPDATE creature_template SET ScriptName='npc_lorax' WHERE entry=10918; UPDATE creature_template SET ScriptName='npc_rivern_frostwind' WHERE entry=10618; -UPDATE creature_template SET ScriptName='npc_witch_doctor_mauari' WHERE entry=10307; UPDATE creature_template SET ScriptName='npc_ranshalla' WHERE entry=10300; UPDATE gameobject_template SET ScriptName='go_elune_fire' WHERE entry IN (177417, 177404); diff --git a/sql/updates/r2479_mangos.sql b/sql/updates/r2479_mangos.sql new file mode 100644 index 000000000..10d40a9bf --- /dev/null +++ b/sql/updates/r2479_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='' WHERE entry=10307; From 2896d506379eab3b3ae49d085e20aa6d52775dde Mon Sep 17 00:00:00 2001 From: NeatElves Date: Fri, 23 Mar 2012 21:11:15 +0200 Subject: [PATCH 0468/1172] [2480] Remove script for npc 17435 Signed-off-by: Xfurry --- scripts/kalimdor/azuremyst_isle.cpp | 50 +---------------------------- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 - sql/updates/r2480_mangos.sql | 1 + 4 files changed, 3 insertions(+), 51 deletions(-) create mode 100644 sql/updates/r2480_mangos.sql diff --git a/scripts/kalimdor/azuremyst_isle.cpp b/scripts/kalimdor/azuremyst_isle.cpp index 9e82fdfd6..87caf51d2 100644 --- a/scripts/kalimdor/azuremyst_isle.cpp +++ b/scripts/kalimdor/azuremyst_isle.cpp @@ -17,7 +17,7 @@ /* ScriptData SDName: Azuremyst_Isle SD%Complete: 75 -SDComment: Quest support: 9283, 9528, 9537, 9554(special flight path, proper model for mount missing). Injured Draenei cosmetic only +SDComment: Quest support: 9283, 9528, 9537, Injured Draenei cosmetic only SDCategory: Azuremyst Isle EndScriptData */ @@ -26,7 +26,6 @@ npc_draenei_survivor npc_engineer_spark_overgrind npc_injured_draenei npc_magwin -npc_susurrus EndContentData */ #include "precompiled.h" @@ -388,47 +387,6 @@ CreatureAI* GetAI_npc_magwinAI(Creature* pCreature) return new npc_magwinAI(pCreature); } -/*###### -## npc_susurrus -######*/ - -enum -{ - ITEM_WHORL_OF_AIR = 23843, - SPELL_BUFFETING_WINDS = 32474, - TAXI_PATH_ID = 506 -}; - -#define GOSSIP_ITEM_READY "I am ready." - -bool GossipHello_npc_susurrus(Player* pPlayer, Creature* pCreature) -{ - if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); - - if (pPlayer->HasItemCount(ITEM_WHORL_OF_AIR,1,true)) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_READY, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF); - - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); - - return true; -} - -bool GossipSelect_npc_susurrus(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) -{ - if (uiAction == GOSSIP_ACTION_INFO_DEF) - { - //spellId is correct, however it gives flight a somewhat funny effect - pPlayer->CLOSE_GOSSIP_MENU(); - pPlayer->CastSpell(pPlayer,SPELL_BUFFETING_WINDS,true); - } - return true; -} - -/*###### -## -######*/ - void AddSC_azuremyst_isle() { Script* pNewScript; @@ -455,10 +413,4 @@ void AddSC_azuremyst_isle() pNewScript->GetAI = &GetAI_npc_magwinAI; pNewScript->pQuestAcceptNPC = &QuestAccept_npc_magwin; pNewScript->RegisterSelf(); - - pNewScript = new Script; - pNewScript->Name = "npc_susurrus"; - pNewScript->pGossipHello = &GossipHello_npc_susurrus; - pNewScript->pGossipSelect = &GossipSelect_npc_susurrus; - pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 0cbd732cb..f0b3629ae 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2479" + #define SD2_REVISION_NR "2480" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 26e7863d3..4fbfbe21c 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -243,7 +243,6 @@ UPDATE creature_template SET ScriptName='npc_draenei_survivor' WHERE entry=16483 UPDATE creature_template SET ScriptName='npc_engineer_spark_overgrind' WHERE entry=17243; UPDATE creature_template SET ScriptName='npc_injured_draenei' WHERE entry=16971; UPDATE creature_template SET ScriptName='npc_magwin' WHERE entry=17312; -UPDATE creature_template SET ScriptName='npc_susurrus' WHERE entry=17435; /* BADLANDS */ diff --git a/sql/updates/r2480_mangos.sql b/sql/updates/r2480_mangos.sql new file mode 100644 index 000000000..db3c585f1 --- /dev/null +++ b/sql/updates/r2480_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='' WHERE entry=17435; From 56c7bd3189e16f719612abd53025e0c2fe70d1c0 Mon Sep 17 00:00:00 2001 From: NeatElves Date: Fri, 23 Mar 2012 21:18:02 +0200 Subject: [PATCH 0469/1172] [2481] Remove script for npc 17824 Signed-off-by: Xfurry --- scripts/kalimdor/bloodmyst_isle.cpp | 61 +---------------------------- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 - sql/updates/r2481_mangos.sql | 1 + 4 files changed, 4 insertions(+), 61 deletions(-) create mode 100644 sql/updates/r2481_mangos.sql diff --git a/scripts/kalimdor/bloodmyst_isle.cpp b/scripts/kalimdor/bloodmyst_isle.cpp index 0f7aa6e1d..74cee8ef0 100644 --- a/scripts/kalimdor/bloodmyst_isle.cpp +++ b/scripts/kalimdor/bloodmyst_isle.cpp @@ -17,13 +17,12 @@ /* ScriptData SDName: Bloodmyst_Isle SD%Complete: 80 -SDComment: Quest support: 9670, 9756(gossip items text needed). +SDComment: Quest support: 9670 SDCategory: Bloodmyst Isle EndScriptData */ /* ContentData mob_webbed_creature -npc_captured_sunhawk_agent EndContentData */ #include "precompiled.h" @@ -64,62 +63,12 @@ struct MANGOS_DLL_DECL mob_webbed_creatureAI : public ScriptedAI m_creature->SummonCreature(spawnCreatureID, 0.0f, 0.0f, 0.0f, m_creature->GetOrientation(), TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000); } }; + CreatureAI* GetAI_mob_webbed_creature(Creature* pCreature) { return new mob_webbed_creatureAI(pCreature); } -/*###### -## npc_captured_sunhawk_agent -######*/ - -#define C_SUNHAWK_TRIGGER 17974 - -bool GossipHello_npc_captured_sunhawk_agent(Player* pPlayer, Creature* pCreature) -{ - if (pPlayer->HasAura(31609, EFFECT_INDEX_1) && pPlayer->GetQuestStatus(9756) == QUEST_STATUS_INCOMPLETE) - { - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "[PH] ", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - pPlayer->SEND_GOSSIP_MENU(9136, pCreature->GetObjectGuid()); - } - else - pPlayer->SEND_GOSSIP_MENU(9134, pCreature->GetObjectGuid()); - - return true; -} - -bool GossipSelect_npc_captured_sunhawk_agent(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) -{ - switch(uiAction) - { - case GOSSIP_ACTION_INFO_DEF+1: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "[PH] ", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); - pPlayer->SEND_GOSSIP_MENU(9137, pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF+2: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "[PH] ", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3); - pPlayer->SEND_GOSSIP_MENU(9138, pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF+3: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "[PH] ", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+4); - pPlayer->SEND_GOSSIP_MENU(9139, pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF+4: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "[PH] ", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+5); - pPlayer->SEND_GOSSIP_MENU(9140, pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF+5: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "[PH] ", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+6); - pPlayer->SEND_GOSSIP_MENU(9141, pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF+6: - pPlayer->CLOSE_GOSSIP_MENU(); - pPlayer->TalkedToCreature(C_SUNHAWK_TRIGGER, pCreature->GetObjectGuid()); - break; - } - return true; -} - void AddSC_bloodmyst_isle() { Script* pNewScript; @@ -128,10 +77,4 @@ void AddSC_bloodmyst_isle() pNewScript->Name = "mob_webbed_creature"; pNewScript->GetAI = &GetAI_mob_webbed_creature; pNewScript->RegisterSelf(); - - pNewScript = new Script; - pNewScript->Name = "npc_captured_sunhawk_agent"; - pNewScript->pGossipHello = &GossipHello_npc_captured_sunhawk_agent; - pNewScript->pGossipSelect = &GossipSelect_npc_captured_sunhawk_agent; - pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index f0b3629ae..781fc5b5e 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2480" + #define SD2_REVISION_NR "2481" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 4fbfbe21c..ed3914547 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -364,7 +364,6 @@ UPDATE creature_template SET ScriptName='npc_fallen_hero_of_horde' WHERE entry=7 /* BLOODMYST ISLE */ UPDATE creature_template SET ScriptName='mob_webbed_creature' WHERE entry=17680; -UPDATE creature_template SET ScriptName='npc_captured_sunhawk_agent' WHERE entry=17824; /* BOREAN TUNDRA */ UPDATE creature_template SET ScriptName='npc_nesingwary_trapper' WHERE entry=25835; diff --git a/sql/updates/r2481_mangos.sql b/sql/updates/r2481_mangos.sql new file mode 100644 index 000000000..32fe361bc --- /dev/null +++ b/sql/updates/r2481_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='' WHERE entry=17824; From 2237aaf426f46d5660ec58fe825765d96d8fe2d3 Mon Sep 17 00:00:00 2001 From: NeatElves Date: Fri, 23 Mar 2012 21:43:09 +0200 Subject: [PATCH 0470/1172] [2482] Implement script support for dummy spell 48218 Signed-off-by: Xfurry --- scripts/world/spell_scripts.cpp | 15 +++++++++++++++ sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 2 +- sql/updates/r2482_mangos.sql | 1 + 4 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 sql/updates/r2482_mangos.sql diff --git a/scripts/world/spell_scripts.cpp b/scripts/world/spell_scripts.cpp index f51c4f1d7..b8b4ab6dd 100644 --- a/scripts/world/spell_scripts.cpp +++ b/scripts/world/spell_scripts.cpp @@ -40,6 +40,7 @@ spell 51331 spell 51332 spell 51366 spell 43340 +spell 48218 EndContentData */ #include "precompiled.h" @@ -315,6 +316,9 @@ enum SAY_FREE_1 = -1000781, SAY_FREE_2 = -1000782, SAY_FREE_3 = -1000783, + + // quest 12213, 12220, item 37173 + SPELL_SAMPLING_ENERGY = 48218, }; bool EffectAuraDummy_spell_aura_dummy_npc(const Aura* pAura, bool bApply) @@ -933,6 +937,17 @@ bool EffectDummyCreature_spell_dummy_npc(Unit* pCaster, uint32 uiSpellId, SpellE } return true; } + case SPELL_SAMPLING_ENERGY: + { + if (uiEffIndex == EFFECT_INDEX_0) + { + if (pCaster->GetTypeId() != TYPEID_PLAYER) + return true; + + ((Player*)pCaster)->KilledMonsterCredit(pCreatureTarget->GetEntry()); + } + return true; + } } return false; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 781fc5b5e..08d624ec5 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2481" + #define SD2_REVISION_NR "2482" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index ed3914547..3ff16918d 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -148,7 +148,7 @@ UPDATE creature_template SET ScriptName='spell_dummy_npc' WHERE entry IN ( -- outland 16880,16518,16847,17157,17326,17654,18879,22105,24918,25084,25085, -- northrend -23678,25752,25753,25758,25792,25793,26268,26270,26421,26616,26643,26841,27122,27808,28053,28054,28068,28093,28465,28600,29319,29327,29329,29330,29338,30146,32149); +23678,25752,25753,25758,25792,25793,26268,26270,26421,26616,26643,26841,27122,27263,27264,27265,27808,28053,28054,28068,28093,28465,28600,29319,29327,29329,29330,29338,30146,32149); UPDATE gameobject_template SET ScriptName='spell_dummy_go' WHERE entry IN (181616,186949); diff --git a/sql/updates/r2482_mangos.sql b/sql/updates/r2482_mangos.sql new file mode 100644 index 000000000..39d62f7eb --- /dev/null +++ b/sql/updates/r2482_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='spell_dummy_npc' WHERE entry IN (27263,27264,27265); From 2a3f308469220119488abf7a1bcb61d3f8c18315 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sat, 24 Mar 2012 00:52:47 +0200 Subject: [PATCH 0471/1172] [2483] Add placeholder for Durotar --- VC100/100ScriptDev2.vcxproj | 1 + VC100/100ScriptDev2.vcxproj.filters | 3 +++ VC80/80ScriptDev2.vcproj | 4 ++++ VC90/90ScriptDev2.vcproj | 4 ++++ scripts/kalimdor/durotar.cpp | 31 +++++++++++++++++++++++++++++ sd2_revision_nr.h | 2 +- system/ScriptLoader.cpp | 2 ++ 7 files changed, 46 insertions(+), 1 deletion(-) create mode 100644 scripts/kalimdor/durotar.cpp diff --git a/VC100/100ScriptDev2.vcxproj b/VC100/100ScriptDev2.vcxproj index cebfb83d5..952dd856d 100644 --- a/VC100/100ScriptDev2.vcxproj +++ b/VC100/100ScriptDev2.vcxproj @@ -392,6 +392,7 @@ + diff --git a/VC100/100ScriptDev2.vcxproj.filters b/VC100/100ScriptDev2.vcxproj.filters index 106317531..394de55a0 100644 --- a/VC100/100ScriptDev2.vcxproj.filters +++ b/VC100/100ScriptDev2.vcxproj.filters @@ -846,6 +846,9 @@ scripts\kalimdor + + scripts\kalimdor + scripts\kalimdor diff --git a/VC80/80ScriptDev2.vcproj b/VC80/80ScriptDev2.vcproj index e0ace264c..4e4eb30b7 100644 --- a/VC80/80ScriptDev2.vcproj +++ b/VC80/80ScriptDev2.vcproj @@ -1268,6 +1268,10 @@ RelativePath="..\scripts\kalimdor\desolace.cpp" > + + diff --git a/VC90/90ScriptDev2.vcproj b/VC90/90ScriptDev2.vcproj index 4a9f1b258..8cebf4c81 100644 --- a/VC90/90ScriptDev2.vcproj +++ b/VC90/90ScriptDev2.vcproj @@ -1267,6 +1267,10 @@ RelativePath="..\scripts\kalimdor\desolace.cpp" > + + diff --git a/scripts/kalimdor/durotar.cpp b/scripts/kalimdor/durotar.cpp new file mode 100644 index 000000000..c4acf02ba --- /dev/null +++ b/scripts/kalimdor/durotar.cpp @@ -0,0 +1,31 @@ +/* Copyright (C) 2006 - 2012 ScriptDev2 + * 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: Durotar +SD%Complete: 0 +SDComment: Placeholder +SDCategory: Durotar +EndScriptData */ + +/* ContentData +EndContentData */ + +#include "precompiled.h" + +void AddSC_durotar() +{ +} diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 08d624ec5..0bc55299c 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2482" + #define SD2_REVISION_NR "2483" #endif // __SD2_REVISION_NR_H__ diff --git a/system/ScriptLoader.cpp b/system/ScriptLoader.cpp index 6fefb7c13..1cb195bfc 100644 --- a/system/ScriptLoader.cpp +++ b/system/ScriptLoader.cpp @@ -256,6 +256,7 @@ extern void AddSC_bloodmyst_isle(); extern void AddSC_boss_azuregos(); extern void AddSC_darkshore(); extern void AddSC_desolace(); +extern void AddSC_durotar(); extern void AddSC_dustwallow_marsh(); extern void AddSC_felwood(); extern void AddSC_feralas(); @@ -752,6 +753,7 @@ void AddScripts() AddSC_boss_azuregos(); AddSC_darkshore(); AddSC_desolace(); + AddSC_durotar(); AddSC_dustwallow_marsh(); AddSC_felwood(); AddSC_feralas(); From 1518687c14c6bf054cd7c9d3f248dd6ca48e8584 Mon Sep 17 00:00:00 2001 From: Alexluana Date: Sat, 24 Mar 2012 01:03:50 +0200 Subject: [PATCH 0472/1172] [2484] Implement script support for quest 5441 Signed-off-by: Xfurry --- scripts/kalimdor/durotar.cpp | 99 +++++++++++++++++++++++++++++++- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 + sql/scriptdev2_script_full.sql | 5 +- sql/updates/r2484_mangos.sql | 1 + sql/updates/r2484_scriptdev2.sql | 4 ++ 6 files changed, 108 insertions(+), 4 deletions(-) create mode 100644 sql/updates/r2484_mangos.sql create mode 100644 sql/updates/r2484_scriptdev2.sql diff --git a/scripts/kalimdor/durotar.cpp b/scripts/kalimdor/durotar.cpp index c4acf02ba..496ff4f25 100644 --- a/scripts/kalimdor/durotar.cpp +++ b/scripts/kalimdor/durotar.cpp @@ -16,16 +16,111 @@ /* ScriptData SDName: Durotar -SD%Complete: 0 -SDComment: Placeholder +SD%Complete: 100 +SDComment: Quest support: 5441 SDCategory: Durotar EndScriptData */ /* ContentData +npc_lazy_peon EndContentData */ #include "precompiled.h" +/*###### +## npc_lazy_peon +######*/ + +enum +{ + SAY_PEON_AWAKE_1 = -1000795, + SAY_PEON_AWAKE_2 = -1000796, + + SPELL_PEON_SLEEP = 17743, + SPELL_AWAKEN_PEON = 19938, + + NPC_SLEEPING_PEON = 10556, + GO_LUMBERPILE = 175784, +}; + +struct MANGOS_DLL_DECL npc_lazy_peonAI : public ScriptedAI +{ + npc_lazy_peonAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset (); } + + uint32 m_uiResetSleepTimer; + + void Reset() + { + m_uiResetSleepTimer = 0; + } + + void MovementInform(uint32 uiMotionType, uint32 uiPointId) + { + if (uiMotionType != POINT_MOTION_TYPE || !uiPointId) + return; + + // ToDo: check the reset timer + m_creature->HandleEmote(EMOTE_STATE_WORK_CHOPWOOD); + m_uiResetSleepTimer = 1*MINUTE*IN_MILLISECONDS; + } + + void UpdateAI(const uint32 uiDiff) + { + if (m_uiResetSleepTimer) + { + if (m_uiResetSleepTimer <= uiDiff) + { + m_creature->HandleEmote(EMOTE_STATE_NONE); + EnterEvadeMode(); + m_uiResetSleepTimer = 0; + } + else + m_uiResetSleepTimer -= uiDiff; + } + } +}; + +CreatureAI* GetAI_npc_lazy_peon(Creature* pCreature) +{ + return new npc_lazy_peonAI(pCreature); +} + +bool EffectDummyCreature_lazy_peon_awake(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) +{ + //always check spellid and effectindex + if (uiSpellId == SPELL_AWAKEN_PEON && uiEffIndex == EFFECT_INDEX_0) + { + if (!pCreatureTarget->HasAura(SPELL_PEON_SLEEP) || pCaster->GetTypeId() != TYPEID_PLAYER || pCreatureTarget->GetEntry() != NPC_SLEEPING_PEON) + return true; + + if (GameObject* pLumber = GetClosestGameObjectWithEntry(pCreatureTarget, GO_LUMBERPILE, 15.0f)) + { + pCreatureTarget->RemoveAurasDueToSpell(SPELL_PEON_SLEEP); + DoScriptText(urand(0, 1) ? SAY_PEON_AWAKE_1 : SAY_PEON_AWAKE_2, pCreatureTarget); + ((Player*)pCaster)->KilledMonsterCredit(pCreatureTarget->GetEntry()); + + float fX, fY, fZ; + pCreatureTarget->SetWalk(false); + pLumber->GetContactPoint(pCreatureTarget, fX, fY, fZ, CONTACT_DISTANCE); + pCreatureTarget->GetMotionMaster()->MovePoint(1, fX, fY, fZ); + } + else + error_log("SD2: No GameObject of entry %u was found in range or something really bad happened.", GO_LUMBERPILE); + + //always return true when we are handling this spell and effect + return true; + } + + return false; +} + void AddSC_durotar() { + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "npc_lazy_peon"; + pNewScript->GetAI = &GetAI_npc_lazy_peon; + pNewScript->pEffectDummyNPC = &EffectDummyCreature_lazy_peon_awake; + pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 0bc55299c..28228f562 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2483" + #define SD2_REVISION_NR "2484" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 3ff16918d..614109d05 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -525,6 +525,7 @@ UPDATE creature_template SET ScriptName='npc_narm_faulk' WHERE entry=6177; /* DUROTAR */ +UPDATE creature_template SET ScriptName='npc_lazy_peon' WHERE entry=10556; /* DUSKWOOD */ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index a8c17d737..5b0a712ba 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -852,7 +852,10 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1000791,'Here they come.',0,0,0,0,'volcor SAY_FIRST_AMBUSH'), (-1000792,'We can overcome these foul creatures.',0,0,0,0,'volcor SAY_AGGRO_1'), (-1000793,'We shall earn our deaths at the very least!',0,0,0,0,'volcor SAY_AGGRO_2'), -(-1000794,'Don\'t give up! Fight, to the death!',0,0,0,0,'volcor SAY_AGGRO_3'); +(-1000794,'Don\'t give up! Fight, to the death!',0,0,0,0,'volcor SAY_AGGRO_3'), + +(-1000795,'OK boss, I get back to tree hitting.',0,0,0,0,'lazy peon SAY_AWAKE_1'), +(-1000796,'Sleepy... so sleepy...',0,0,0,0,'lazy peon SAY_AWAKE_2'); -- -1 033 000 SHADOWFANG KEEP INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES diff --git a/sql/updates/r2484_mangos.sql b/sql/updates/r2484_mangos.sql new file mode 100644 index 000000000..ed2ea8977 --- /dev/null +++ b/sql/updates/r2484_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_lazy_peon' WHERE entry=10556; diff --git a/sql/updates/r2484_scriptdev2.sql b/sql/updates/r2484_scriptdev2.sql new file mode 100644 index 000000000..5482093d5 --- /dev/null +++ b/sql/updates/r2484_scriptdev2.sql @@ -0,0 +1,4 @@ +DELETE FROM script_texts WHERE entry IN (-1000795,-1000796); +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1000795,'OK boss, I get back to tree hitting.',0,0,0,0,'lazy peon SAY_AWAKE_1'), +(-1000796,'Sleepy... so sleepy...',0,0,0,0,'lazy peon SAY_AWAKE_2'); From 3444e0db7b83f4851867e884c83219ade0b687e6 Mon Sep 17 00:00:00 2001 From: Reamer Date: Wed, 28 Mar 2012 20:32:06 +0200 Subject: [PATCH 0473/1172] [2485] Improve HoS, Maiden of Grief Signed-off-by: Schmoozerd --- .../halls_of_stone/boss_maiden_of_grief.cpp | 31 ++++++++++++++++--- sd2_revision_nr.h | 2 +- 2 files changed, 28 insertions(+), 5 deletions(-) diff --git a/scripts/northrend/ulduar/halls_of_stone/boss_maiden_of_grief.cpp b/scripts/northrend/ulduar/halls_of_stone/boss_maiden_of_grief.cpp index 2c4b0ebb7..80c6f86d5 100644 --- a/scripts/northrend/ulduar/halls_of_stone/boss_maiden_of_grief.cpp +++ b/scripts/northrend/ulduar/halls_of_stone/boss_maiden_of_grief.cpp @@ -54,28 +54,39 @@ struct MANGOS_DLL_DECL boss_maiden_of_griefAI : public ScriptedAI { boss_maiden_of_griefAI(Creature* pCreature) : ScriptedAI(pCreature) { - m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_pInstance = (instance_halls_of_stone*)pCreature->GetInstanceData(); m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); Reset(); } - ScriptedInstance* m_pInstance; + instance_halls_of_stone* m_pInstance; bool m_bIsRegularMode; uint32 m_uiStormTimer; uint32 m_uiShockTimer; uint32 m_uiPillarTimer; + uint32 m_uiPartingSorrowTimer; void Reset() { m_uiStormTimer = 5000; m_uiShockTimer = 10000; m_uiPillarTimer = 15000; + m_uiPartingSorrowTimer = 12000; } void Aggro(Unit* pWho) { DoScriptText(SAY_AGGRO, m_creature); + + if(m_pInstance) + m_pInstance->SetData(TYPE_MAIDEN, IN_PROGRESS); + } + + void JustReachedHome() + { + if(m_pInstance) + m_pInstance->SetData(TYPE_MAIDEN, FAIL); } void KilledUnit(Unit* pVictim) @@ -102,6 +113,18 @@ struct MANGOS_DLL_DECL boss_maiden_of_griefAI : public ScriptedAI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; + if (m_uiPartingSorrowTimer < uiDiff) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0, SPELL_PARTING_SORROW, SELECT_FLAG_PLAYER | SELECT_FLAG_POWER_MANA)) + { + if (DoCastSpellIfCan(pTarget, SPELL_PARTING_SORROW) == CAST_OK) + m_uiPartingSorrowTimer = 12000 + rand()%5000; + } + } + else + m_uiPartingSorrowTimer -= uiDiff; + + if (m_uiStormTimer < uiDiff) { if (DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_STORM_OF_GRIEF : SPELL_STORM_OF_GRIEF_H) == CAST_OK) @@ -112,7 +135,7 @@ struct MANGOS_DLL_DECL boss_maiden_of_griefAI : public ScriptedAI if (m_uiPillarTimer < uiDiff) { - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0, m_bIsRegularMode ? SPELL_PILLAR_OF_WOE_H : SPELL_PILLAR_OF_WOE, SELECT_FLAG_PLAYER)) { if (DoCastSpellIfCan(pTarget, m_bIsRegularMode ? SPELL_PILLAR_OF_WOE : SPELL_PILLAR_OF_WOE_H) == CAST_OK) m_uiPillarTimer = 10000; @@ -123,7 +146,7 @@ struct MANGOS_DLL_DECL boss_maiden_of_griefAI : public ScriptedAI if (m_uiShockTimer < uiDiff) { - if (DoCastSpellIfCan(m_creature->getVictim(), m_bIsRegularMode ? SPELL_SHOCK_OF_SORROW : SPELL_SHOCK_OF_SORROW_H) == CAST_OK) + if (DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_SHOCK_OF_SORROW : SPELL_SHOCK_OF_SORROW_H) == CAST_OK) { DoScriptText(SAY_STUN, m_creature); m_uiShockTimer = 35000; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 28228f562..0acbb1819 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2484" + #define SD2_REVISION_NR "2485" #endif // __SD2_REVISION_NR_H__ From a7dc15479fa55b719cda827ff98c0ec5ec8541ad Mon Sep 17 00:00:00 2001 From: Reamer Date: Wed, 28 Mar 2012 20:41:09 +0200 Subject: [PATCH 0474/1172] [2486] Improve HoS Instance Handling Signed-off-by: Schmoozerd --- .../ulduar/halls_of_stone/halls_of_stone.h | 4 +- .../instance_halls_of_stone.cpp | 37 +++++++++---------- sd2_revision_nr.h | 2 +- 3 files changed, 21 insertions(+), 22 deletions(-) diff --git a/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.h b/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.h index 9190287b8..6d856527d 100644 --- a/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.h +++ b/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.h @@ -23,8 +23,10 @@ enum NPC_WORLDTRIGGER = 22515, NPC_SJONNIR = 27978, - GO_DOOR_SJONNIR = 191296, + GO_DOOR_MAIDEN = 191292, GO_DOOR_TRIBUNAL = 191294, // possibly closed during event? + GO_DOOR_TO_TRIBUNAL = 191295, + GO_DOOR_SJONNIR = 191296, GO_TRIBUNAL_CHEST = 190586, GO_TRIBUNAL_CHEST_H = 193996, diff --git a/scripts/northrend/ulduar/halls_of_stone/instance_halls_of_stone.cpp b/scripts/northrend/ulduar/halls_of_stone/instance_halls_of_stone.cpp index d04a43758..21cdf5464 100644 --- a/scripts/northrend/ulduar/halls_of_stone/instance_halls_of_stone.cpp +++ b/scripts/northrend/ulduar/halls_of_stone/instance_halls_of_stone.cpp @@ -72,8 +72,6 @@ void instance_halls_of_stone::OnObjectCreate(GameObject* pGo) { switch(pGo->GetEntry()) { - case GO_DOOR_SJONNIR: - break; case GO_TRIBUNAL_CHEST: case GO_TRIBUNAL_CHEST_H: if (m_auiEncounter[TYPE_TRIBUNAL] == DONE) @@ -88,6 +86,9 @@ void instance_halls_of_stone::OnObjectCreate(GameObject* pGo) case GO_TRIBUNAL_HEAD_LEFT: m_aFaces[FACE_KADDRAK].m_goFaceGuid = pGo->GetObjectGuid(); return; + case GO_DOOR_TO_TRIBUNAL: + case GO_DOOR_MAIDEN: + case GO_DOOR_SJONNIR: case GO_DOOR_TRIBUNAL: case GO_TRIBUNAL_CONSOLE: case GO_TRIBUNAL_FLOOR: @@ -102,10 +103,10 @@ void instance_halls_of_stone::OnObjectCreate(GameObject* pGo) void instance_halls_of_stone::SetData(uint32 uiType, uint32 uiData) { - switch(uiType) + switch (uiType) { case TYPE_TRIBUNAL: - m_auiEncounter[0] = uiData; + m_auiEncounter[uiType] = uiData; switch (uiData) { case IN_PROGRESS: @@ -139,15 +140,15 @@ void instance_halls_of_stone::SetData(uint32 uiType, uint32 uiData) } break; case TYPE_MAIDEN: - m_auiEncounter[1] = uiData; + m_auiEncounter[uiType] = uiData; if (uiData == IN_PROGRESS) DoStartTimedAchievement(ACHIEVEMENT_CRITERIA_TYPE_KILL_CREATURE, ACHIEV_START_MAIDEN_ID); break; case TYPE_KRYSTALLUS: - m_auiEncounter[2] = uiData; + m_auiEncounter[uiType] = uiData; break; case TYPE_SJONNIR: - m_auiEncounter[3] = uiData; + m_auiEncounter[uiType] = uiData; DoUseDoorOrButton(GO_DOOR_SJONNIR); break; } @@ -168,15 +169,10 @@ void instance_halls_of_stone::SetData(uint32 uiType, uint32 uiData) uint32 instance_halls_of_stone::GetData(uint32 uiType) { - switch(uiType) - { - case TYPE_TRIBUNAL: return m_auiEncounter[0]; - case TYPE_MAIDEN: return m_auiEncounter[1]; - case TYPE_KRYSTALLUS: return m_auiEncounter[2]; - case TYPE_SJONNIR: return m_auiEncounter[3]; - default: - return 0; - } + if (uiType < MAX_ENCOUNTER) + return m_auiEncounter[uiType]; + + return 0; } struct SortHelper @@ -288,7 +284,8 @@ void instance_halls_of_stone::ActivateFace(uint8 uiFace, bool bAfterEvent) DoUseDoorOrButton(m_aFaces[uiFace].m_goFaceGuid); else { - DoUseDoorOrButton(m_aFaces[uiFace].m_goFaceGuid, 0, true); + // TODO: How to get them red? + DoUseDoorOrButton(m_aFaces[uiFace].m_goFaceGuid); m_aFaces[uiFace].m_bIsActive = true; } } @@ -350,7 +347,7 @@ void instance_halls_of_stone::ProcessFace(uint8 uiFace) if (Creature* pEye = instance->GetCreature(m_aFaces[uiFace].m_leftEyeGuid)) pEye->CastSpell(pEye, instance->IsRegularDifficulty() ? SPELL_GLARE_OF_THE_TRIBUNAL : SPELL_GLARE_OF_THE_TRIBUNAL_H, true); if (Creature* pEye = instance->GetCreature(m_aFaces[uiFace].m_rightEyeGuid)) - pEye->CastSpell(pEye, instance->IsRegularDifficulty() ? SPELL_GLARE_OF_THE_TRIBUNAL : SPELL_GLARE_OF_THE_TRIBUNAL_H, true); + pEye->CastSpell(pEye, instance->IsRegularDifficulty() ? SPELL_GLARE_OF_THE_TRIBUNAL : SPELL_GLARE_OF_THE_TRIBUNAL_H, true, NULL, NULL, m_aFaces[uiFace].m_leftEyeGuid); m_aFaces[uiFace].m_uiTimer = 1500; // TODO, verify break; case FACE_MARNAK: @@ -359,7 +356,7 @@ void instance_halls_of_stone::ProcessFace(uint8 uiFace) // One should be enough.. //if (Creature* pEye = instance->GetCreature(m_aFaces[uiFace].m_rightEyeGuid)) // pEye->CastSpell(pEye, SPELL_SUMMON_DARK_MATTER_TARGET, true); - m_aFaces[uiFace].m_uiTimer = 6000; // TODO, verify, was 3s+0..1s + m_aFaces[uiFace].m_uiTimer = 21000; // TODO, verify, was 3s+0..1s break; case FACE_ABEDNEUM: if (Creature* pEye = instance->GetCreature(m_aFaces[uiFace].m_leftEyeGuid)) @@ -367,7 +364,7 @@ void instance_halls_of_stone::ProcessFace(uint8 uiFace) // One should be enough.. //if (Creature* pEye = instance->GetCreature(m_aFaces[uiFace].m_rightEyeGuid)) // pEye->CastSpell(pEye, SPELL_SUMMON_SEARING_GAZE_TARGET, true); - m_aFaces[uiFace].m_uiTimer = 6000; // TODO, verify, was 3s+0..2s + m_aFaces[uiFace].m_uiTimer = 21000; // TODO, verify, was 3s+0..2s break; default: return; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 0acbb1819..a78b127e7 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2485" + #define SD2_REVISION_NR "2486" #endif // __SD2_REVISION_NR_H__ From f835f27c29864e94f8eaa97ea2d293b39d71d6dd Mon Sep 17 00:00:00 2001 From: raynar Date: Thu, 29 Mar 2012 05:07:21 +0200 Subject: [PATCH 0475/1172] [2487] Prevent displaying password in log files Signed-off-by: Schmoozerd --- ScriptMgr.cpp | 2 +- sd2_revision_nr.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ScriptMgr.cpp b/ScriptMgr.cpp index bf09d6a38..303a3f674 100644 --- a/ScriptMgr.cpp +++ b/ScriptMgr.cpp @@ -34,7 +34,7 @@ void LoadDatabase() // Initialize connection to DB if (SD2Database.Initialize(strSD2DBinfo.c_str())) { - outstring_log("SD2: ScriptDev2 database at %s initialized.", strSD2DBinfo.c_str()); + outstring_log("SD2: ScriptDev2 database initialized."); outstring_log(""); pSystemMgr.LoadVersion(); diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index a78b127e7..a6d40a269 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2486" + #define SD2_REVISION_NR "2487" #endif // __SD2_REVISION_NR_H__ From 3557bd5876552db088aca3be01c7ea0114343c42 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Fri, 30 Mar 2012 17:40:23 +0200 Subject: [PATCH 0476/1172] [2488] Fix text for Defias traitor, thanks to alexluana for pointing --- scripts/eastern_kingdoms/westfall.cpp | 2 +- sd2_revision_nr.h | 2 +- sql/scriptdev2_script_full.sql | 2 +- sql/updates/r2488_scriptdev2.sql | 1 + 4 files changed, 4 insertions(+), 3 deletions(-) create mode 100644 sql/updates/r2488_scriptdev2.sql diff --git a/scripts/eastern_kingdoms/westfall.cpp b/scripts/eastern_kingdoms/westfall.cpp index 17ecafd5c..fe0d3cb9c 100644 --- a/scripts/eastern_kingdoms/westfall.cpp +++ b/scripts/eastern_kingdoms/westfall.cpp @@ -224,7 +224,7 @@ struct MANGOS_DLL_DECL npc_defias_traitorAI : public npc_escortAI void Aggro(Unit* pWho) { - DoScriptText(urand(0, 1) ? SAY_AGGRO_1 : SAY_AGGRO_2, m_creature); + DoScriptText(urand(0, 1) ? SAY_AGGRO_1 : SAY_AGGRO_2, m_creature, pWho); } void Reset() { } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index a6d40a269..d10efcd96 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2487" + #define SD2_REVISION_NR "2488" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 5b0a712ba..867075d0c 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -47,7 +47,7 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1000101,'Follow me, $N. I\'ll take you to the Defias hideout. But you better protect me or I am as good as dead',0,0,7,0,'defias traitor SAY_START'), (-1000102,'The entrance is hidden here in Moonbrook. Keep your eyes peeled for thieves. They want me dead.',0,0,7,0,'defias traitor SAY_PROGRESS'), (-1000103,'You can go tell Stoutmantle this is where the Defias Gang is holed up, $N.',0,0,7,0,'defias traitor SAY_END'), -(-1000104,'%s coming in fast! Prepare to fight!',0,0,7,0,'defias traitor SAY_AGGRO_1'), +(-1000104,'$N coming in fast! Prepare to fight!',0,0,7,0,'defias traitor SAY_AGGRO_1'), (-1000105,'Help!',0,0,7,0,'defias traitor SAY_AGGRO_2'), (-1000106,'Everyone ready?',0,0,1,0,'torek SAY_READY'), diff --git a/sql/updates/r2488_scriptdev2.sql b/sql/updates/r2488_scriptdev2.sql new file mode 100644 index 000000000..49da29202 --- /dev/null +++ b/sql/updates/r2488_scriptdev2.sql @@ -0,0 +1 @@ +UPDATE script_texts SET content_default='$N coming in fast! Prepare to fight!' WHERE entry=-1000104; From 8d866791a5145a5eff973be1bb66cbc9f84f4852 Mon Sep 17 00:00:00 2001 From: Nighoo Date: Fri, 30 Mar 2012 16:07:45 +0200 Subject: [PATCH 0477/1172] [2489] Add git_id (*nix version) to .gitignore Signed-off-by: Schmoozerd --- sd2_revision_nr.h | 2 +- tool/git_id/.gitignore | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index d10efcd96..cfff6b88a 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2488" + #define SD2_REVISION_NR "2489" #endif // __SD2_REVISION_NR_H__ diff --git a/tool/git_id/.gitignore b/tool/git_id/.gitignore index a088f5bb5..02c4c5aa0 100644 --- a/tool/git_id/.gitignore +++ b/tool/git_id/.gitignore @@ -18,3 +18,4 @@ *.user Debug Release +git_id From 8e1cf2b345e5e75944ef13b466311f4fe7bcce48 Mon Sep 17 00:00:00 2001 From: fr1ge Date: Sun, 1 Apr 2012 00:15:47 +0300 Subject: [PATCH 0478/1172] [2490] Implement script support for quest 10898 Based on the work of przemratajczak Waypoints updated by Xfurry Signed-off-by: Xfurry --- scripts/outland/terokkar_forest.cpp | 95 ++++++++++++++++++++++++++++- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 + sql/scriptdev2_script_full.sql | 94 +++++++++++++++++++++++++++- sql/updates/r2490_mangos.sql | 1 + sql/updates/r2490_scriptdev2.sql | 93 ++++++++++++++++++++++++++++ 6 files changed, 283 insertions(+), 3 deletions(-) create mode 100644 sql/updates/r2490_mangos.sql create mode 100644 sql/updates/r2490_scriptdev2.sql diff --git a/scripts/outland/terokkar_forest.cpp b/scripts/outland/terokkar_forest.cpp index 443251460..e15a1a3b5 100644 --- a/scripts/outland/terokkar_forest.cpp +++ b/scripts/outland/terokkar_forest.cpp @@ -17,7 +17,7 @@ /* ScriptData SDName: Terokkar_Forest SD%Complete: 80 -SDComment: Quest support: 9889, 10009, 10873, 10896, 10446/10447, 10852, 10887, 10922, 11096, 11093, 10051, 10052. +SDComment: Quest support: 9889, 10009, 10873, 10896, 10446/10447, 10852, 10887, 10922, 11096, 11093, 10051, 10052, 10898. SDCategory: Terokkar Forest EndScriptData */ @@ -36,6 +36,7 @@ npc_slim go_veil_skith_cage npc_captive_child npc_isla_starmane +npc_skywing EndContentData */ #include "precompiled.h" @@ -1076,6 +1077,92 @@ CreatureAI* GetAI_npc_isla_starmane(Creature* pCreature) return new npc_isla_starmaneAI(pCreature); } +/*###### +## npc_skywing +######*/ + +enum +{ + SAY_SKYWING_START = -1000797, + SAY_SKYWING_TREE_DOWN = -1000798, + SAY_SKYWING_TREE_UP = -1000799, + SAY_SKYWING_JUMP = -1000800, + SAY_SKYWING_SUMMON = -1000801, + SAY_SKYWING_END = -1000802, + + //SPELL_TRANSFORM = ?????, // ToDo: research the transform spell id + + NPC_LUANGA_THE_IMPRISONER = 18533, + + QUEST_SKYWING = 10898 +}; + +static const float aLuangaSpawnCoords[3] = {-3507.203f, 4084.619f, 92.947f}; + +struct MANGOS_DLL_DECL npc_skywingAI : public npc_escortAI +{ + npc_skywingAI(Creature* pCreature) : npc_escortAI(pCreature) { Reset(); } + + void Reset() {} + + void WaypointReached(uint32 uiPointId) + { + switch (uiPointId) + { + case 6: + DoScriptText(SAY_SKYWING_TREE_DOWN ,m_creature); + break; + case 36: + DoScriptText(SAY_SKYWING_TREE_UP, m_creature); + break; + case 60: + DoScriptText(SAY_SKYWING_JUMP, m_creature); + m_creature->SetLevitate(true); + break; + case 61: + m_creature->SetLevitate(false); + break; + case 80: + DoScriptText(SAY_SKYWING_SUMMON, m_creature); + m_creature->SummonCreature(NPC_LUANGA_THE_IMPRISONER, aLuangaSpawnCoords[0], aLuangaSpawnCoords[1], aLuangaSpawnCoords[2], 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); + break; + case 81: + // ToDo: implement transform spell here + break; + case 82: + DoScriptText(SAY_SKYWING_END, m_creature); + + if (Player* pPlayer = GetPlayerForEscort()) + pPlayer->GroupEventHappens(QUEST_SKYWING, m_creature); + } + } + + void JustSummoned(Creature* pSummoned) + { + pSummoned->AI()->AttackStart(m_creature); + } +}; + +bool QuestAccept_npc_skywing(Player* pPlayer, Creature* pCreature, const Quest* pQuest) +{ + if (pQuest->GetQuestId() == QUEST_SKYWING) + { + if (npc_skywingAI* pEscortAI = dynamic_cast(pCreature->AI())) + { + pCreature->SetFactionTemporary(FACTION_ESCORT_N_NEUTRAL_PASSIVE, TEMPFACTION_RESTORE_RESPAWN); + DoScriptText(SAY_SKYWING_START, pCreature); + + pEscortAI->Start(false, pPlayer, pQuest); + } + } + return true; +} + +CreatureAI* GetAI_npc_skywing(Creature* pCreature) +{ + return new npc_skywingAI(pCreature); +} + void AddSC_terokkar_forest() { Script* pNewScript; @@ -1153,4 +1240,10 @@ void AddSC_terokkar_forest() pNewScript->GetAI = &GetAI_npc_isla_starmane; pNewScript->pQuestAcceptNPC = &QuestAccept_npc_isla_starmane; pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_skywing"; + pNewScript->GetAI = &GetAI_npc_skywing; + pNewScript->pQuestAcceptNPC = &QuestAccept_npc_skywing; + pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index cfff6b88a..74d6dea08 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2489" + #define SD2_REVISION_NR "2490" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 614109d05..f095bc4f7 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -1173,6 +1173,7 @@ UPDATE gameobject_template SET ScriptName='go_mana_bomb' WHERE entry=184725; UPDATE creature_template SET ScriptName='npc_slim' WHERE entry=19679; UPDATE creature_template SET ScriptName='npc_captive_child' WHERE entry=22314; UPDATE creature_template SET ScriptName='npc_isla_starmane' WHERE entry=18760; +UPDATE creature_template SET ScriptName="npc_skywing" WHERE entry=22424; /* THOUSAND NEEDLES */ UPDATE creature_template SET ScriptName='npc_kanati' WHERE entry=10638; diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 867075d0c..7095fd9a8 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -855,7 +855,14 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1000794,'Don\'t give up! Fight, to the death!',0,0,0,0,'volcor SAY_AGGRO_3'), (-1000795,'OK boss, I get back to tree hitting.',0,0,0,0,'lazy peon SAY_AWAKE_1'), -(-1000796,'Sleepy... so sleepy...',0,0,0,0,'lazy peon SAY_AWAKE_2'); +(-1000796,'Sleepy... so sleepy...',0,0,0,0,'lazy peon SAY_AWAKE_2'), + +(-1000797,'%s squawks and heads toward Veil Shalas. Hurry and follow!',0,2,0,0,'skywing SAY_SKYWING_START'), +(-1000798,'%s pauses briefly before the tree and then heads inside.',0,2,0,0,'skywing SAY_SKYWING_TREE_DOWN'), +(-1000799,'%s seems to be looking for something. He wants you to follow.',0,2,0,0,'skywing SAY_SKYWING_TREE_UP'), +(-1000800,'%s flies to the platform below! You\'d better jump if you want to keep up. Hurry!',0,2,0,0,'skywing SAY_SKYWING_JUMP'), +(-1000801,'%s bellows a loud squawk!',0,2,0,0,'skywing SAY_SKYWING_SUMMON'), +(-1000802,'Free at last from that horrible curse! Thank you! Please send word to Rilak the Redeemed that I am okay. My mission lies in Skettis. Terokk must be defeated!',0,0,0,0,'skywing SAY_SKYWING_END'); -- -1 033 000 SHADOWFANG KEEP INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES @@ -6402,4 +6409,89 @@ INSERT INTO script_waypoint VALUES (3692, 13, 4730.30, 158.76, 52.33, 0, ''), (3692, 14, 4756.47, 195.65, 53.61, 10000, 'SAY_END'); +DELETE FROM script_waypoint WHERE entry=22424; +INSERT INTO script_waypoint VALUES +(22424, 1, -3620.54, 4164.57, 1.81, 0, 'SKYWING_START'), +(22424, 2, -3624.78, 4149.65, 7.44, 0, ''), +(22424, 3, -3630.30, 4124.84, 21.28, 0, ''), +(22424, 4, -3629.14, 4093.65, 44.35, 0, ''), +(22424, 5, -3626.34, 4080.29, 52.39, 0, ''), +(22424, 6, -3619.35, 4063.86, 60.86, 3000, 'SAY_SKYWING_TREE_DOWN'), +(22424, 7, -3615.09, 4054.17, 62.46, 0, ''), +(22424, 8, -3611.39, 4046.60, 65.07, 0, ''), +(22424, 9, -3606.68, 4040.50, 66.00, 0, ''), +(22424, 10, -3600.88, 4038.69, 67.14, 0, ''), +(22424, 11, -3597.88, 4033.84, 68.53, 0, ''), +(22424, 12, -3602.19, 4027.89, 69.36, 0, ''), +(22424, 13, -3609.85, 4028.37, 70.78, 0, ''), +(22424, 14, -3613.01, 4031.10, 72.14, 0, ''), +(22424, 15, -3613.18, 4035.63, 73.52, 0, ''), +(22424, 16, -3609.84, 4039.73, 75.25, 0, ''), +(22424, 17, -3604.55, 4040.12, 77.01, 0, ''), +(22424, 18, -3600.61, 4036.03, 78.84, 0, ''), +(22424, 19, -3602.63, 4029.99, 81.01, 0, ''), +(22424, 20, -3608.87, 4028.64, 83.27, 0, ''), +(22424, 21, -3612.53, 4032.74, 85.24, 0, ''), +(22424, 22, -3611.08, 4038.13, 87.31, 0, ''), +(22424, 23, -3605.09, 4039.35, 89.55, 0, ''), +(22424, 24, -3601.87, 4035.44, 91.64, 0, ''), +(22424, 25, -3603.08, 4030.58, 93.66, 0, ''), +(22424, 26, -3608.47, 4029.23, 95.91, 0, ''), +(22424, 27, -3611.68, 4033.35, 98.09, 0, ''), +(22424, 28, -3609.51, 4038.25, 100.45, 0, ''), +(22424, 29, -3604.54, 4038.01, 102.72, 0, ''), +(22424, 30, -3602.40, 4033.48, 105.12, 0, ''), +(22424, 31, -3606.17, 4029.69, 107.63, 0, ''), +(22424, 32, -3609.93, 4031.26, 109.53, 0, ''), +(22424, 33, -3609.38, 4035.86, 110.67, 0, ''), +(22424, 34, -3603.58, 4043.03, 112.89, 0, ''), +(22424, 35, -3600.99, 4046.49, 111.81, 0, ''), +(22424, 36, -3602.32, 4051.77, 111.81, 3000, 'SAY_SKYWING_TREE_UP'), +(22424, 37, -3609.55, 4055.95, 112.00, 0, ''), +(22424, 38, -3620.93, 4043.77, 111.99, 0, ''), +(22424, 39, -3622.44, 4038.95, 111.99, 0, ''), +(22424, 40, -3621.64, 4025.39, 111.99, 0, ''), +(22424, 41, -3609.62, 4015.20, 111.99, 0, ''), +(22424, 42, -3598.37, 4017.72, 111.99, 0, ''), +(22424, 43, -3590.21, 4026.62, 111.99, 0, ''), +(22424, 44, -3586.55, 4034.13, 112.00, 0, ''), +(22424, 45, -3580.39, 4033.46, 112.00, 0, ''), +(22424, 46, -3568.83, 4032.53, 107.16, 0, ''), +(22424, 47, -3554.81, 4031.23, 105.31, 0, ''), +(22424, 48, -3544.39, 4030.10, 106.58, 0, ''), +(22424, 49, -3531.91, 4029.25, 111.70, 0, ''), +(22424, 50, -3523.50, 4030.24, 112.47, 0, ''), +(22424, 51, -3517.48, 4037.42, 112.66, 0, ''), +(22424, 52, -3510.40, 4040.77, 112.92, 0, ''), +(22424, 53, -3503.83, 4041.35, 113.17, 0, ''), +(22424, 54, -3498.31, 4040.65, 113.11, 0, ''), +(22424, 55, -3494.05, 4031.67, 113.11, 0, ''), +(22424, 56, -3487.71, 4025.58, 113.12, 0, ''), +(22424, 57, -3500.42, 4012.93, 113.11, 0, ''), +(22424, 58, -3510.86, 4010.15, 113.10, 0, ''), +(22424, 59, -3518.07, 4008.62, 112.97, 0, ''), +(22424, 60, -3524.74, 4014.55, 112.41, 2000, 'SAY_SKYWING_JUMP'), +(22424, 61, -3537.81, 4008.59, 92.53, 0, ''), +(22424, 62, -3546.25, 4008.81, 92.79, 0, ''), +(22424, 63, -3552.07, 4006.48, 92.84, 0, ''), +(22424, 64, -3556.29, 4000.14, 92.92, 0, ''), +(22424, 65, -3556.16, 3991.24, 92.92, 0, ''), +(22424, 66, -3551.48, 3984.28, 92.91, 0, ''), +(22424, 67, -3542.90, 3981.64, 92.91, 0, ''), +(22424, 68, -3534.82, 3983.98, 92.92, 0, ''), +(22424, 69, -3530.58, 3989.91, 92.85, 0, ''), +(22424, 70, -3529.85, 3998.77, 92.59, 0, ''), +(22424, 71, -3534.15, 4008.45, 92.34, 0, ''), +(22424, 72, -3532.87, 4012.97, 91.64, 0, ''), +(22424, 73, -3530.57, 4023.42, 86.82, 0, ''), +(22424, 74, -3528.24, 4033.91, 85.69, 0, ''), +(22424, 75, -3526.22, 4043.75, 87.26, 0, ''), +(22424, 76, -3523.84, 4054.29, 92.42, 0, ''), +(22424, 77, -3522.44, 4059.06, 92.92, 0, ''), +(22424, 78, -3514.26, 4060.72, 92.92, 0, ''), +(22424, 79, -3507.76, 4065.21, 92.92, 0, ''), +(22424, 80, -3503.24, 4076.63, 92.92, 0, 'SAY_SKYWING_SUMMON'), +(22424, 81, -3504.23, 4080.47, 92.92, 7000, 'SPELL_TRANSFORM'), +(22424, 82, -3504.23, 4080.47, 92.92, 20000, 'SAY_SKYWING_END'); + -- EOF diff --git a/sql/updates/r2490_mangos.sql b/sql/updates/r2490_mangos.sql new file mode 100644 index 000000000..ee51ec2f0 --- /dev/null +++ b/sql/updates/r2490_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName="npc_skywing" WHERE entry=22424; diff --git a/sql/updates/r2490_scriptdev2.sql b/sql/updates/r2490_scriptdev2.sql new file mode 100644 index 000000000..33f8e47ba --- /dev/null +++ b/sql/updates/r2490_scriptdev2.sql @@ -0,0 +1,93 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1000802 AND -1000797; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1000797,'%s squawks and heads toward Veil Shalas. Hurry and follow!',0,2,0,0,'skywing SAY_SKYWING_START'), +(-1000798,'%s pauses briefly before the tree and then heads inside.',0,2,0,0,'skywing SAY_SKYWING_TREE_DOWN'), +(-1000799,'%s seems to be looking for something. He wants you to follow.',0,2,0,0,'skywing SAY_SKYWING_TREE_UP'), +(-1000800,'%s flies to the platform below! You\'d better jump if you want to keep up. Hurry!',0,2,0,0,'skywing SAY_SKYWING_JUMP'), +(-1000801,'%s bellows a loud squawk!',0,2,0,0,'skywing SAY_SKYWING_SUMMON'), +(-1000802,'Free at last from that horrible curse! Thank you! Please send word to Rilak the Redeemed that I am okay. My mission lies in Skettis. Terokk must be defeated!',0,0,0,0,'skywing SAY_SKYWING_END'); + +DELETE FROM script_waypoint WHERE entry=22424; +INSERT INTO script_waypoint VALUES +(22424, 1, -3620.54, 4164.57, 1.81, 0, 'SKYWING_START'), +(22424, 2, -3624.78, 4149.65, 7.44, 0, ''), +(22424, 3, -3630.30, 4124.84, 21.28, 0, ''), +(22424, 4, -3629.14, 4093.65, 44.35, 0, ''), +(22424, 5, -3626.34, 4080.29, 52.39, 0, ''), +(22424, 6, -3619.35, 4063.86, 60.86, 3000, 'SAY_SKYWING_TREE_DOWN'), +(22424, 7, -3615.09, 4054.17, 62.46, 0, ''), +(22424, 8, -3611.39, 4046.60, 65.07, 0, ''), +(22424, 9, -3606.68, 4040.50, 66.00, 0, ''), +(22424, 10, -3600.88, 4038.69, 67.14, 0, ''), +(22424, 11, -3597.88, 4033.84, 68.53, 0, ''), +(22424, 12, -3602.19, 4027.89, 69.36, 0, ''), +(22424, 13, -3609.85, 4028.37, 70.78, 0, ''), +(22424, 14, -3613.01, 4031.10, 72.14, 0, ''), +(22424, 15, -3613.18, 4035.63, 73.52, 0, ''), +(22424, 16, -3609.84, 4039.73, 75.25, 0, ''), +(22424, 17, -3604.55, 4040.12, 77.01, 0, ''), +(22424, 18, -3600.61, 4036.03, 78.84, 0, ''), +(22424, 19, -3602.63, 4029.99, 81.01, 0, ''), +(22424, 20, -3608.87, 4028.64, 83.27, 0, ''), +(22424, 21, -3612.53, 4032.74, 85.24, 0, ''), +(22424, 22, -3611.08, 4038.13, 87.31, 0, ''), +(22424, 23, -3605.09, 4039.35, 89.55, 0, ''), +(22424, 24, -3601.87, 4035.44, 91.64, 0, ''), +(22424, 25, -3603.08, 4030.58, 93.66, 0, ''), +(22424, 26, -3608.47, 4029.23, 95.91, 0, ''), +(22424, 27, -3611.68, 4033.35, 98.09, 0, ''), +(22424, 28, -3609.51, 4038.25, 100.45, 0, ''), +(22424, 29, -3604.54, 4038.01, 102.72, 0, ''), +(22424, 30, -3602.40, 4033.48, 105.12, 0, ''), +(22424, 31, -3606.17, 4029.69, 107.63, 0, ''), +(22424, 32, -3609.93, 4031.26, 109.53, 0, ''), +(22424, 33, -3609.38, 4035.86, 110.67, 0, ''), +(22424, 34, -3603.58, 4043.03, 112.89, 0, ''), +(22424, 35, -3600.99, 4046.49, 111.81, 0, ''), +(22424, 36, -3602.32, 4051.77, 111.81, 3000, 'SAY_SKYWING_TREE_UP'), +(22424, 37, -3609.55, 4055.95, 112.00, 0, ''), +(22424, 38, -3620.93, 4043.77, 111.99, 0, ''), +(22424, 39, -3622.44, 4038.95, 111.99, 0, ''), +(22424, 40, -3621.64, 4025.39, 111.99, 0, ''), +(22424, 41, -3609.62, 4015.20, 111.99, 0, ''), +(22424, 42, -3598.37, 4017.72, 111.99, 0, ''), +(22424, 43, -3590.21, 4026.62, 111.99, 0, ''), +(22424, 44, -3586.55, 4034.13, 112.00, 0, ''), +(22424, 45, -3580.39, 4033.46, 112.00, 0, ''), +(22424, 46, -3568.83, 4032.53, 107.16, 0, ''), +(22424, 47, -3554.81, 4031.23, 105.31, 0, ''), +(22424, 48, -3544.39, 4030.10, 106.58, 0, ''), +(22424, 49, -3531.91, 4029.25, 111.70, 0, ''), +(22424, 50, -3523.50, 4030.24, 112.47, 0, ''), +(22424, 51, -3517.48, 4037.42, 112.66, 0, ''), +(22424, 52, -3510.40, 4040.77, 112.92, 0, ''), +(22424, 53, -3503.83, 4041.35, 113.17, 0, ''), +(22424, 54, -3498.31, 4040.65, 113.11, 0, ''), +(22424, 55, -3494.05, 4031.67, 113.11, 0, ''), +(22424, 56, -3487.71, 4025.58, 113.12, 0, ''), +(22424, 57, -3500.42, 4012.93, 113.11, 0, ''), +(22424, 58, -3510.86, 4010.15, 113.10, 0, ''), +(22424, 59, -3518.07, 4008.62, 112.97, 0, ''), +(22424, 60, -3524.74, 4014.55, 112.41, 2000, 'SAY_SKYWING_JUMP'), +(22424, 61, -3537.81, 4008.59, 92.53, 0, ''), +(22424, 62, -3546.25, 4008.81, 92.79, 0, ''), +(22424, 63, -3552.07, 4006.48, 92.84, 0, ''), +(22424, 64, -3556.29, 4000.14, 92.92, 0, ''), +(22424, 65, -3556.16, 3991.24, 92.92, 0, ''), +(22424, 66, -3551.48, 3984.28, 92.91, 0, ''), +(22424, 67, -3542.90, 3981.64, 92.91, 0, ''), +(22424, 68, -3534.82, 3983.98, 92.92, 0, ''), +(22424, 69, -3530.58, 3989.91, 92.85, 0, ''), +(22424, 70, -3529.85, 3998.77, 92.59, 0, ''), +(22424, 71, -3534.15, 4008.45, 92.34, 0, ''), +(22424, 72, -3532.87, 4012.97, 91.64, 0, ''), +(22424, 73, -3530.57, 4023.42, 86.82, 0, ''), +(22424, 74, -3528.24, 4033.91, 85.69, 0, ''), +(22424, 75, -3526.22, 4043.75, 87.26, 0, ''), +(22424, 76, -3523.84, 4054.29, 92.42, 0, ''), +(22424, 77, -3522.44, 4059.06, 92.92, 0, ''), +(22424, 78, -3514.26, 4060.72, 92.92, 0, ''), +(22424, 79, -3507.76, 4065.21, 92.92, 0, ''), +(22424, 80, -3503.24, 4076.63, 92.92, 0, 'SAY_SKYWING_SUMMON'), +(22424, 81, -3504.23, 4080.47, 92.92, 7000, 'SPELL_TRANSFORM'), +(22424, 82, -3504.23, 4080.47, 92.92, 20000, 'SAY_SKYWING_END'); From 775e8d181ef932579a6c3c90267c4e326e3b69fd Mon Sep 17 00:00:00 2001 From: bastii Date: Thu, 5 Apr 2012 21:39:20 +0300 Subject: [PATCH 0479/1172] [2491] Implement script support for quest 10588 Patch updated by Xfurry Signed-off-by: Xfurry --- scripts/outland/shadowmoon_valley.cpp | 353 +++++++++++++++++++++++++- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 + sql/scriptdev2_script_full.sql | 18 +- sql/updates/r2491_mangos.sql | 1 + sql/updates/r2491_scriptdev2.sql | 18 ++ 6 files changed, 389 insertions(+), 4 deletions(-) create mode 100644 sql/updates/r2491_mangos.sql create mode 100644 sql/updates/r2491_scriptdev2.sql diff --git a/scripts/outland/shadowmoon_valley.cpp b/scripts/outland/shadowmoon_valley.cpp index 3e3df8a22..57c836a09 100644 --- a/scripts/outland/shadowmoon_valley.cpp +++ b/scripts/outland/shadowmoon_valley.cpp @@ -17,7 +17,7 @@ /* ScriptData SDName: Shadowmoon_Valley SD%Complete: 100 -SDComment: Quest support: 10781, 10804, 10854, 10458, 10480, 10481, 11020. Vendor Drake Dealer Hurlunk. +SDComment: Quest support: 10781, 10804, 10854, 10458, 10480, 10481, 10588, 11020. Vendor Drake Dealer Hurlunk. SDCategory: Shadowmoon Valley EndScriptData */ @@ -33,6 +33,7 @@ npc_lord_illidan_stormrage npc_totem_of_spirits event_spell_soul_captured_credit go_crystal_prison +npc_spawned_oronok_tornheart EndContentData */ #include "precompiled.h" @@ -1333,6 +1334,349 @@ bool ProcessEventId_event_spell_soul_captured_credit(uint32 uiEventId, Object* p return false; } +/*##### +#npc_spawned_oronok_tornheart +#####*/ + +enum +{ + // texts + SAY_ORONOK_TOGETHER = -1000803, + SAY_ORONOK_READY = -1000804, + SAY_ORONOK_ELEMENTS = -1000805, + SAY_ORONOK_EPILOGUE_1 = -1000806, + SAY_TORLOK_EPILOGUE_2 = -1000807, + SAY_ORONOK_EPILOGUE_3 = -1000808, + SAY_EARTH_EPILOGUE_4 = -1000809, + SAY_FIRE_EPILOGUE_5 = -1000810, + SAY_EARTH_EPILOGUE_6 = -1000811, + SAY_ORONOK_EPILOGUE_7 = -1000812, + EMOTE_GIVE_WEAPONS = -1000813, + SAY_ORONOK_EPILOGUE_8 = -1000814, + + GOSSIP_ITEM_FIGHT = -3000109, + GOSSIP_TEXT_ID_ORONOK = 10421, + + // spells - some are already defined above + //SPELL_CHAIN_LIGHTNING = 16006, + SPELL_EARTHBIND_TOTEM = 15786, + //SPELL_FROST_SHOCK = 12548, + //SPELL_HEALING_WAVE = 12491, + + // npcs + NPC_ORONOK_TORN_HEART = 21685, + NPC_GROMTOR_SON_OF_ORONOK = 21687, + NPC_BORAK_SON_OF_ORONOK = 21686, + NPC_CYRUKH_THE_FIRELORD = 21181, + //NPC_EARTH_SPIRIT = 21050, + NPC_REDEEMED_SPIRIT_OF_EARTH = 21739, + NPC_REDEEMED_SPIRIT_OF_FIRE = 21740, + NPC_REDEEMED_SPIRIT_OF_AIR = 21738, + NPC_REDEEMED_SPIRIT_OF_WATER = 21741, + NPC_EARTHMENDER_TORLOK = 21024, + + GO_MARK_OF_KAELTHAS = 185170, + + QUEST_CIPHER_OF_DAMNATION = 10588, + + POINT_ID_ATTACK_READY = 1, + POINT_ID_ELEMENTS = 2, + POINT_ID_EPILOGUE = 3, +}; + +static const DialogueEntry aOutroDialogue[] = +{ + {QUEST_CIPHER_OF_DAMNATION, 0, 1000}, + {NPC_CYRUKH_THE_FIRELORD, 0, 0}, + {NPC_EARTHMENDER_TORLOK, 0, 1000}, + {SAY_ORONOK_EPILOGUE_1, NPC_ORONOK_TORN_HEART, 5000}, + {SAY_TORLOK_EPILOGUE_2, NPC_EARTHMENDER_TORLOK, 5000}, + {NPC_REDEEMED_SPIRIT_OF_EARTH, 0, 5000}, + {SAY_ORONOK_EPILOGUE_3, NPC_ORONOK_TORN_HEART, 5000}, + {SAY_EARTH_EPILOGUE_4, NPC_REDEEMED_SPIRIT_OF_EARTH, 5000}, + {SAY_FIRE_EPILOGUE_5, NPC_REDEEMED_SPIRIT_OF_FIRE, 14000}, + {SAY_EARTH_EPILOGUE_6, NPC_REDEEMED_SPIRIT_OF_EARTH, 6000}, + {SAY_ORONOK_EPILOGUE_7, NPC_ORONOK_TORN_HEART, 6000}, + {EMOTE_GIVE_WEAPONS, NPC_ORONOK_TORN_HEART, 6000}, + {SAY_ORONOK_EPILOGUE_8, NPC_ORONOK_TORN_HEART, 10000}, + {NPC_ORONOK_TORN_HEART, 0, 0}, + {0, 0, 0}, +}; + +struct EventLocations +{ + float m_fX, m_fY, m_fZ, m_fO; +}; + +const static EventLocations aDamnationLocations[] = +{ + {-3605.09f, 1885.47f, 47.24f, 1.81f}, // 0 fire spirit summon loc + {-3600.68f, 1886.58f, 47.24f, 1.81f}, // 1 earth spirit summon loc + {-3597.19f, 1887.46f, 47.24f, 1.77f}, // 2 water spirit summon loc + {-3593.18f, 1888.27f, 47.24f, 1.77f}, // 3 air spirit summon loc + {-3595.36f, 1869.78f, 47.24f}, // 4 fight ready move loc + {-3635.90f, 1860.94f, 52.93f}, // 5 elementals move loc + {-3599.71f, 1897.94f, 47.24f} // 6 epilogue move loc +}; + +struct MANGOS_DLL_DECL npc_spawned_oronok_tornheartAI : public ScriptedAI, private DialogueHelper +{ + npc_spawned_oronok_tornheartAI(Creature* pCreature) : ScriptedAI(pCreature), + DialogueHelper(aOutroDialogue) + { + Reset(); + StartNextDialogueText(QUEST_CIPHER_OF_DAMNATION); + } + + uint32 m_uiLightningTimer; + uint32 m_uiTotemTimer; + uint32 m_uiFrostTimer; + uint32 m_uiHealTimer; + + ObjectGuid m_torlokGuid; + ObjectGuid m_fireSpiritGuid; + ObjectGuid m_earthSpiritGuid; + ObjectGuid m_borakGuid; + ObjectGuid m_gromtorGuid; + ObjectGuid m_cyrukhGuid; + + bool m_bHasAttackStart; + + void Reset() + { + m_uiLightningTimer = 15000; + m_uiTotemTimer = 10000; + m_uiFrostTimer = 20000; + m_uiHealTimer = 8000; + + m_bHasAttackStart = false; + } + + void JustDidDialogueStep(int32 iEntry) + { + switch(iEntry) + { + case NPC_CYRUKH_THE_FIRELORD: + // Set them in motion + m_creature->SetWalk(false); + m_creature->GetMotionMaster()->MovePoint(POINT_ID_ATTACK_READY, aDamnationLocations[4].m_fX, aDamnationLocations[4].m_fY, aDamnationLocations[4].m_fZ); + if (Creature* pBorak = GetClosestCreatureWithEntry(m_creature, NPC_BORAK_SON_OF_ORONOK, 10.0f)) + { + m_borakGuid = pBorak->GetObjectGuid(); + pBorak->GetMotionMaster()->MoveFollow(m_creature, 5.0f, -M_PI_F/2); + } + if (Creature* pGromtor = GetClosestCreatureWithEntry(m_creature, NPC_GROMTOR_SON_OF_ORONOK, 10.0f)) + { + m_gromtorGuid = pGromtor->GetObjectGuid(); + pGromtor->GetMotionMaster()->MoveFollow(m_creature, 5.0f, M_PI_F/2); + } + break; + case NPC_EARTHMENDER_TORLOK: + if (Creature* pTorlok = GetClosestCreatureWithEntry(m_creature, NPC_EARTHMENDER_TORLOK, 25.0f)) + { + m_torlokGuid = pTorlok->GetObjectGuid(); + m_creature->SetFacingToObject(pTorlok); + } + break; + case NPC_REDEEMED_SPIRIT_OF_EARTH: + m_creature->SetFacingTo(4.9f); + m_creature->SummonCreature(NPC_REDEEMED_SPIRIT_OF_FIRE, aDamnationLocations[0].m_fX, aDamnationLocations[0].m_fY, aDamnationLocations[0].m_fZ, aDamnationLocations[0].m_fO, TEMPSUMMON_TIMED_DESPAWN, 32000); + m_creature->SummonCreature(NPC_REDEEMED_SPIRIT_OF_EARTH, aDamnationLocations[1].m_fX, aDamnationLocations[1].m_fY, aDamnationLocations[1].m_fZ, aDamnationLocations[1].m_fO, TEMPSUMMON_TIMED_DESPAWN, 32000); + m_creature->SummonCreature(NPC_REDEEMED_SPIRIT_OF_WATER, aDamnationLocations[2].m_fX, aDamnationLocations[2].m_fY, aDamnationLocations[2].m_fZ, aDamnationLocations[2].m_fO, TEMPSUMMON_TIMED_DESPAWN, 32000); + m_creature->SummonCreature(NPC_REDEEMED_SPIRIT_OF_AIR, aDamnationLocations[3].m_fX, aDamnationLocations[3].m_fY, aDamnationLocations[3].m_fZ, aDamnationLocations[3].m_fO, TEMPSUMMON_TIMED_DESPAWN, 32000); + break; + case SAY_ORONOK_EPILOGUE_7: + if (Creature* pTorlok = m_creature->GetMap()->GetCreature(m_torlokGuid)) + m_creature->SetFacingToObject(pTorlok); + break; + case NPC_ORONOK_TORN_HEART: + if (GameObject* pMark = GetClosestGameObjectWithEntry(m_creature, GO_MARK_OF_KAELTHAS, 30.0f)) + { + pMark->SetRespawnTime(5*MINUTE); + pMark->Refresh(); + } + if (Creature* pBorak = m_creature->GetMap()->GetCreature(m_borakGuid)) + pBorak->ForcedDespawn(); + if (Creature* pGromtor = m_creature->GetMap()->GetCreature(m_gromtorGuid)) + pGromtor->ForcedDespawn(); + m_creature->ForcedDespawn(); + break; + } + } + + Creature* GetSpeakerByEntry(uint32 uiEntry) + { + switch (uiEntry) + { + case NPC_ORONOK_TORN_HEART: return m_creature; + case NPC_EARTHMENDER_TORLOK: return m_creature->GetMap()->GetCreature(m_torlokGuid); + case NPC_REDEEMED_SPIRIT_OF_EARTH: return m_creature->GetMap()->GetCreature(m_earthSpiritGuid); + case NPC_REDEEMED_SPIRIT_OF_FIRE: return m_creature->GetMap()->GetCreature(m_fireSpiritGuid); + + default: + return NULL; + } + } + + void Aggro(Unit* pWho) + { + if (!m_bHasAttackStart && pWho->GetEntry() == NPC_EARTH_SPIRIT) + { + // Cyrukh starts to attack + if (Creature* pCyrukh = m_creature->GetMap()->GetCreature(m_cyrukhGuid)) + { + pCyrukh->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PASSIVE); + pCyrukh->AI()->AttackStart(m_creature); + AttackStart(pCyrukh); + m_bHasAttackStart = true; + } + } + } + + void JustSummoned(Creature* pSummoned) + { + switch (pSummoned->GetEntry()) + { + case NPC_REDEEMED_SPIRIT_OF_FIRE: + m_fireSpiritGuid = pSummoned->GetObjectGuid(); + break; + case NPC_REDEEMED_SPIRIT_OF_EARTH: + m_earthSpiritGuid = pSummoned->GetObjectGuid(); + break; + } + } + + void EnterEvadeMode() + { + m_creature->RemoveAllAuras(); + m_creature->DeleteThreatList(); + m_creature->CombatStop(true); + m_creature->LoadCreatureAddon(true); + + m_creature->SetLootRecipient(NULL); + + Reset(); + + if (!m_creature->isAlive()) + return; + + if (Creature* pCyrukh = m_creature->GetMap()->GetCreature(m_cyrukhGuid)) + { + if (!pCyrukh->isAlive()) + m_creature->GetMotionMaster()->MovePoint(POINT_ID_EPILOGUE, aDamnationLocations[6].m_fX, aDamnationLocations[6].m_fY, aDamnationLocations[6].m_fZ); + } + else + { + error_log("SD2: Npc %u couldn't be found or something really bad happened. Epilogue event for quest %u will stop.", NPC_CYRUKH_THE_FIRELORD, QUEST_CIPHER_OF_DAMNATION); + m_creature->GetMotionMaster()->MoveTargetedHome(); + } + } + + void MovementInform(uint32 uiMotionType, uint32 uiPointId) + { + if (uiMotionType != POINT_MOTION_TYPE) + return; + + switch (uiPointId) + { + case POINT_ID_ATTACK_READY: + // Get Cyrukh guid now, because we are at a closer distance + if (Creature* pCyrukh = GetClosestCreatureWithEntry(m_creature, NPC_CYRUKH_THE_FIRELORD, 70.0f)) + m_cyrukhGuid = pCyrukh->GetObjectGuid(); + + m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); + DoScriptText(SAY_ORONOK_READY, m_creature); + break; + case POINT_ID_ELEMENTS: + // Attack the closest earth element + if (Creature* pElement = GetClosestCreatureWithEntry(m_creature, NPC_EARTH_SPIRIT, 50.0f)) + AttackStart(pElement); + break; + case POINT_ID_EPILOGUE: + StartNextDialogueText(NPC_EARTHMENDER_TORLOK); + break; + } + } + + void UpdateAI(const uint32 uiDiff) + { + DialogueUpdate(uiDiff); + + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_uiLightningTimer < uiDiff) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, SPELL_CHAIN_LIGHTNING) == CAST_OK) + m_uiLightningTimer = urand(9000, 15000); + } + } + else + m_uiLightningTimer -= uiDiff; + + if (m_uiTotemTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_EARTHBIND_TOTEM) == CAST_OK) + m_uiTotemTimer = urand(40000, 60000); + } + else + m_uiTotemTimer -= uiDiff; + + if (m_uiFrostTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_FROST_SHOCK) == CAST_OK) + m_uiFrostTimer = urand(14000, 18000); + } + else + m_uiFrostTimer -= uiDiff; + + if (m_uiHealTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_HEALING_WAVE) == CAST_OK) + m_uiHealTimer = urand(6000, 10000); + } + else + m_uiHealTimer -= uiDiff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_npc_spawned_oronok_tornheart(Creature* pCreature) +{ + return new npc_spawned_oronok_tornheartAI(pCreature); +} + +bool GossipHello_npc_spawned_oronok_tornheart(Player* pPlayer, Creature* pCreature) +{ + if (pPlayer->GetQuestStatus(QUEST_CIPHER_OF_DAMNATION) == QUEST_STATUS_INCOMPLETE) + { + pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_FIGHT, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXT_ID_ORONOK, pCreature->GetObjectGuid()); + } + else + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); + + return true; +} + +bool GossipSelect_npc_spawned_oronok_tornheart(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + if (uiAction == GOSSIP_ACTION_INFO_DEF+1) + { + // Note: this movement expects MMaps. + DoScriptText(SAY_ORONOK_ELEMENTS, pCreature); + pCreature->GetMotionMaster()->MovePoint(POINT_ID_ELEMENTS, aDamnationLocations[5].m_fX, aDamnationLocations[5].m_fY, aDamnationLocations[5].m_fZ); + pCreature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); + + pPlayer->CLOSE_GOSSIP_MENU(); + } + + return true; +} + void AddSC_shadowmoon_valley() { Script* pNewScript; @@ -1396,4 +1740,11 @@ void AddSC_shadowmoon_valley() pNewScript->Name = "go_crystal_prison"; pNewScript->pQuestAcceptGO = &GOQuestAccept_GO_crystal_prison; pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_spawned_oronok_tornheart"; + pNewScript->GetAI = &GetAI_npc_spawned_oronok_tornheart; + pNewScript->pGossipHello = &GossipHello_npc_spawned_oronok_tornheart; + pNewScript->pGossipSelect = &GossipSelect_npc_spawned_oronok_tornheart; + pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 74d6dea08..840a8a198 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2490" + #define SD2_REVISION_NR "2491" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index f095bc4f7..af7d1c18a 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -974,6 +974,7 @@ INSERT INTO scripted_event_id VALUES (13516,'event_spell_soul_captured_credit'); UPDATE creature_template SET ScriptName='npc_lord_illidan_stormrage' WHERE entry=22083; UPDATE gameobject_template SET ScriptName='go_crystal_prison' WHERE entry=185126; +UPDATE creature_template SET ScriptName='npc_spawned_oronok_tornheart' WHERE entry=21685; /* SHATTRATH */ UPDATE creature_template SET ScriptName='npc_dirty_larry' WHERE entry=19720; diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 7095fd9a8..8c76f0bc8 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -862,7 +862,20 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1000799,'%s seems to be looking for something. He wants you to follow.',0,2,0,0,'skywing SAY_SKYWING_TREE_UP'), (-1000800,'%s flies to the platform below! You\'d better jump if you want to keep up. Hurry!',0,2,0,0,'skywing SAY_SKYWING_JUMP'), (-1000801,'%s bellows a loud squawk!',0,2,0,0,'skywing SAY_SKYWING_SUMMON'), -(-1000802,'Free at last from that horrible curse! Thank you! Please send word to Rilak the Redeemed that I am okay. My mission lies in Skettis. Terokk must be defeated!',0,0,0,0,'skywing SAY_SKYWING_END'); +(-1000802,'Free at last from that horrible curse! Thank you! Please send word to Rilak the Redeemed that I am okay. My mission lies in Skettis. Terokk must be defeated!',0,0,0,0,'skywing SAY_SKYWING_END'), + +(-1000803,'You do not fight alone, %n! Together, we will banish this spawn of hellfire!',0,1,0,0,'Oronok SAY_ORONOK_TOGETHER'), +(-1000804,'We will fight when you are ready.',0,0,0,0, 'Oronok SAY_ORONOK_READY'), +(-1000805,'We will set the elements free of your grasp by force!',0,1,0,0,'Oronok SAY_ORONOK_ELEMENTS'), +(-1000806,'What say the elements, Torlok? I only hear silence.',0,0,0,1,'Oronok SAY_ORONOK_EPILOGUE_1'), +(-1000807,'I hear what you hear, brother. Look behind you...',0,0,0,1,'Torlok SAY_TORLOK_EPILOGUE_2'), +(-1000808,'They are redeemed! Then we have won?',0,0,0,1,'Oronok SAY_ORONOK_EPILOGUE_3'), +(-1000809,'It is now as it should be, shaman. You have done well.',0,0,0,0,'Spirit of Earth SAY_EARTH_EPILOGUE_4'), +(-1000810,'Yes... Well enough for the elements that are here, but the cipher is known to another... The spirits of fire are in turmoil... If this force is not stopped, the world where these mortals came from will cease.',0,0,0,0,'Spirit of Fire SAY_FIRE_EPILOGUE_5'), +(-1000811,'Farewell, mortals... The earthmender knows what fire feels...',0,0,0,0, 'Spirit of Earth SAY_EARTH_EPILOGUE_6'), +(-1000812,'We leave, Torlok. I have only one request...',0,0,0,1,'Oronok SAY_ORONOK_EPILOGUE_7'), +(-1000813,'The Torn-heart men give their weapons to Earthmender Torlok.',0,2,0,0,'Torlok EMOTE_GIVE_WEAPONS'), +(-1000814,'Give these to the heroes that made this possible.',0,0,0,1,'Oronok SAY_ORONOK_EPILOGUE_8'); -- -1 033 000 SHADOWFANG KEEP INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES @@ -4094,7 +4107,8 @@ INSERT INTO gossip_texts (entry,content_default,comment) VALUES (-3000105,'Ezekiel said that you might have a certain book...','dirty larry GOSSIP_ITEM_BOOK'), (-3000106,'Show me where I can fly.','greer orehammer GOSSIP_ITEM_TAXI'), (-3000107,'[PH] Get Presicion Bombs','greer orehammer GOSSIP_ITEM_GET_BOMBS'), -(-3000108,'[PH] Start bombing mission','greer orehammer GOSSIP_ITEM_FLIGHT'); +(-3000108,'[PH] Start bombing mission','greer orehammer GOSSIP_ITEM_FLIGHT'), +(-3000109,'I am ready, Oronok. Let us destroy Cyrukh and free the elements!','oronok torn-heart GOSSIP_ITEM_FIGHT'); -- -3 033 000 SHADOWFANG KEEP INSERT INTO gossip_texts (entry,content_default,comment) VALUES diff --git a/sql/updates/r2491_mangos.sql b/sql/updates/r2491_mangos.sql new file mode 100644 index 000000000..e41c277b1 --- /dev/null +++ b/sql/updates/r2491_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_spawned_oronok_tornheart' WHERE entry=21685; diff --git a/sql/updates/r2491_scriptdev2.sql b/sql/updates/r2491_scriptdev2.sql new file mode 100644 index 000000000..e0beb8322 --- /dev/null +++ b/sql/updates/r2491_scriptdev2.sql @@ -0,0 +1,18 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1000814 AND -1000803; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1000803,'You do not fight alone, %n! Together, we will banish this spawn of hellfire!',0,1,0,0,'Oronok SAY_ORONOK_TOGETHER'), +(-1000804,'We will fight when you are ready.',0,0,0,0, 'Oronok SAY_ORONOK_READY'), +(-1000805,'We will set the elements free of your grasp by force!',0,1,0,0,'Oronok SAY_ORONOK_ELEMENTS'), +(-1000806,'What say the elements, Torlok? I only hear silence.',0,0,0,1,'Oronok SAY_ORONOK_EPILOGUE_1'), +(-1000807,'I hear what you hear, brother. Look behind you...',0,0,0,1,'Torlok SAY_TORLOK_EPILOGUE_2'), +(-1000808,'They are redeemed! Then we have won?',0,0,0,1,'Oronok SAY_ORONOK_EPILOGUE_3'), +(-1000809,'It is now as it should be, shaman. You have done well.',0,0,0,0,'Spirit of Earth SAY_EARTH_EPILOGUE_4'), +(-1000810,'Yes... Well enough for the elements that are here, but the cipher is known to another... The spirits of fire are in turmoil... If this force is not stopped, the world where these mortals came from will cease.',0,0,0,0,'Spirit of Fire SAY_FIRE_EPILOGUE_5'), +(-1000811,'Farewell, mortals... The earthmender knows what fire feels...',0,0,0,0, 'Spirit of Earth SAY_EARTH_EPILOGUE_6'), +(-1000812,'We leave, Torlok. I have only one request...',0,0,0,1,'Oronok SAY_ORONOK_EPILOGUE_7'), +(-1000813,'The Torn-heart men give their weapons to Earthmender Torlok.',0,2,0,0,'Torlok EMOTE_GIVE_WEAPONS'), +(-1000814,'Give these to the heroes that made this possible.',0,0,0,1,'Oronok SAY_ORONOK_EPILOGUE_8'); + +DELETE FROM gossip_texts WHERE entry=-3000109; +INSERT INTO gossip_texts (entry,content_default,comment) VALUES +(-3000109,'I am ready, Oronok. Let us destroy Cyrukh and free the elements!','oronok torn-heart GOSSIP_ITEM_FIGHT'); From 9fb6e8035693428d4c00dc2abfa71d6165d9a287 Mon Sep 17 00:00:00 2001 From: NeatElves Date: Thu, 5 Apr 2012 22:44:37 +0300 Subject: [PATCH 0480/1172] [2492] Remove script for npc 12919. Will be handled by DB Signed-off-by: Xfurry --- scripts/kalimdor/dustwallow_marsh.cpp | 41 +-------------------------- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 - sql/updates/r2492_mangos.sql | 1 + 4 files changed, 3 insertions(+), 42 deletions(-) create mode 100644 sql/updates/r2492_mangos.sql diff --git a/scripts/kalimdor/dustwallow_marsh.cpp b/scripts/kalimdor/dustwallow_marsh.cpp index e1b986406..f0dcfd22c 100644 --- a/scripts/kalimdor/dustwallow_marsh.cpp +++ b/scripts/kalimdor/dustwallow_marsh.cpp @@ -17,7 +17,7 @@ /* ScriptData SDName: Dustwallow_Marsh SD%Complete: 95 -SDComment: Quest support: 558, 1173, 1273, 1324, 11209, 11126, 11180. Vendor Nat Pagle +SDComment: Quest support: 558, 1173, 1273, 1324, 11209, 11126, 11180. SDCategory: Dustwallow Marsh EndScriptData */ @@ -27,7 +27,6 @@ npc_restless_apparition npc_deserter_agitator npc_lady_jaina_proudmoore npc_morokk -npc_nat_pagle npc_ogron npc_private_hendel EndContentData */ @@ -369,38 +368,6 @@ bool QuestAccept_npc_morokk(Player* pPlayer, Creature* pCreature, const Quest* p return false; } -/*###### -## npc_nat_pagle -######*/ - -enum -{ - QUEST_NATS_MEASURING_TAPE = 8227 -}; - -bool GossipHello_npc_nat_pagle(Player* pPlayer, Creature* pCreature) -{ - if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); - - if (pCreature->isVendor() && pPlayer->GetQuestRewardStatus(QUEST_NATS_MEASURING_TAPE)) - { - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_VENDOR, GOSSIP_TEXT_BROWSE_GOODS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE); - pPlayer->SEND_GOSSIP_MENU(7640, pCreature->GetObjectGuid()); - } - else - pPlayer->SEND_GOSSIP_MENU(7638, pCreature->GetObjectGuid()); - - return true; -} - -bool GossipSelect_npc_nat_pagle(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) -{ - if (uiAction == GOSSIP_ACTION_TRADE) - pPlayer->SEND_VENDORLIST(pCreature->GetObjectGuid()); - - return true; -} /*###### ## npc_ogron @@ -833,12 +800,6 @@ void AddSC_dustwallow_marsh() pNewScript->pQuestAcceptNPC = &QuestAccept_npc_morokk; pNewScript->RegisterSelf(); - pNewScript = new Script; - pNewScript->Name = "npc_nat_pagle"; - pNewScript->pGossipHello = &GossipHello_npc_nat_pagle; - pNewScript->pGossipSelect = &GossipSelect_npc_nat_pagle; - pNewScript->RegisterSelf(); - pNewScript = new Script; pNewScript->Name = "npc_ogron"; pNewScript->GetAI = &GetAI_npc_ogron; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 840a8a198..99a104319 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2491" + #define SD2_REVISION_NR "2492" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index af7d1c18a..e50bd7d33 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -537,7 +537,6 @@ UPDATE creature_template SET ScriptName='npc_deserter_agitator' WHERE entry=2360 UPDATE creature_template SET ScriptName='npc_lady_jaina_proudmoore' WHERE entry=4968; UPDATE creature_template SET ScriptName='npc_ogron' WHERE entry=4983; UPDATE creature_template SET ScriptName='npc_morokk' WHERE entry=4500; -UPDATE creature_template SET ScriptName='npc_nat_pagle' WHERE entry=12919; UPDATE creature_template SET ScriptName='npc_restless_apparition' WHERE entry=23861; UPDATE creature_template SET ScriptName='npc_private_hendel' WHERE entry=4966; DELETE FROM scripted_areatrigger WHERE entry=4752; diff --git a/sql/updates/r2492_mangos.sql b/sql/updates/r2492_mangos.sql new file mode 100644 index 000000000..8adc65fc1 --- /dev/null +++ b/sql/updates/r2492_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='' WHERE entry=12919; From 319be5feab2aa9f8d30dc177f1b52ff444f1c8b1 Mon Sep 17 00:00:00 2001 From: NeatElves Date: Thu, 5 Apr 2012 23:09:00 +0300 Subject: [PATCH 0481/1172] [2493] Remove script for npc 23620. Will be handled by DB Signed-off-by: Xfurry --- scripts/kalimdor/dustwallow_marsh.cpp | 47 +-------------------------- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 - sql/updates/r2493_mangos.sql | 1 + 4 files changed, 3 insertions(+), 48 deletions(-) create mode 100644 sql/updates/r2493_mangos.sql diff --git a/scripts/kalimdor/dustwallow_marsh.cpp b/scripts/kalimdor/dustwallow_marsh.cpp index f0dcfd22c..92ab86b84 100644 --- a/scripts/kalimdor/dustwallow_marsh.cpp +++ b/scripts/kalimdor/dustwallow_marsh.cpp @@ -17,14 +17,13 @@ /* ScriptData SDName: Dustwallow_Marsh SD%Complete: 95 -SDComment: Quest support: 558, 1173, 1273, 1324, 11209, 11126, 11180. +SDComment: Quest support: 558, 1173, 1273, 1324, 11209, 11180. SDCategory: Dustwallow Marsh EndScriptData */ /* ContentData mobs_risen_husk_spirit npc_restless_apparition -npc_deserter_agitator npc_lady_jaina_proudmoore npc_morokk npc_ogron @@ -178,44 +177,6 @@ CreatureAI* GetAI_npc_restless_apparition(Creature* pCreature) return new npc_restless_apparitionAI(pCreature); } -/*###### -## npc_deserter_agitator -######*/ - -enum -{ - QUEST_TRAITORS_AMONG_US = 11126, - FACTION_THER_DESERTER = 1883 -}; - -struct MANGOS_DLL_DECL npc_deserter_agitatorAI : public ScriptedAI -{ - npc_deserter_agitatorAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} - - void Reset() - { - m_creature->setFaction(m_creature->GetCreatureInfo()->faction_A); - } -}; - -CreatureAI* GetAI_npc_deserter_agitator(Creature* pCreature) -{ - return new npc_deserter_agitatorAI(pCreature); -} - -bool GossipHello_npc_deserter_agitator(Player* pPlayer, Creature* pCreature) -{ - if (pPlayer->GetQuestStatus(QUEST_TRAITORS_AMONG_US) == QUEST_STATUS_INCOMPLETE) - { - pCreature->setFaction(FACTION_THER_DESERTER); - pPlayer->TalkedToCreature(pCreature->GetEntry(), pCreature->GetObjectGuid()); - } - else - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); - - return true; -} - /*###### ## npc_lady_jaina_proudmoore ######*/ @@ -782,12 +743,6 @@ void AddSC_dustwallow_marsh() pNewScript->GetAI = &GetAI_npc_restless_apparition; pNewScript->RegisterSelf(); - pNewScript = new Script; - pNewScript->Name = "npc_deserter_agitator"; - pNewScript->GetAI = &GetAI_npc_deserter_agitator; - pNewScript->pGossipHello = &GossipHello_npc_deserter_agitator; - pNewScript->RegisterSelf(); - pNewScript = new Script; pNewScript->Name = "npc_lady_jaina_proudmoore"; pNewScript->pGossipHello = &GossipHello_npc_lady_jaina_proudmoore; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 99a104319..ffe0dbd4a 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2492" + #define SD2_REVISION_NR "2493" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index e50bd7d33..36336d5d0 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -533,7 +533,6 @@ UPDATE creature_template SET ScriptName='npc_lazy_peon' WHERE entry=10556; /* DUSTWALLOW MARSH */ UPDATE creature_template SET ScriptName='mobs_risen_husk_spirit' WHERE entry IN (23554,23555); -UPDATE creature_template SET ScriptName='npc_deserter_agitator' WHERE entry=23602; UPDATE creature_template SET ScriptName='npc_lady_jaina_proudmoore' WHERE entry=4968; UPDATE creature_template SET ScriptName='npc_ogron' WHERE entry=4983; UPDATE creature_template SET ScriptName='npc_morokk' WHERE entry=4500; diff --git a/sql/updates/r2493_mangos.sql b/sql/updates/r2493_mangos.sql new file mode 100644 index 000000000..7c741f766 --- /dev/null +++ b/sql/updates/r2493_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='' WHERE entry=23602; From 024b9c156af54833d91134085f9ed652e66d0ca4 Mon Sep 17 00:00:00 2001 From: NeatElves Date: Thu, 5 Apr 2012 23:15:17 +0300 Subject: [PATCH 0482/1172] [2494] Remove script for GO 180386. Will be handled by DB Signed-off-by: Xfurry --- scripts/world/go_scripts.cpp | 24 ------------------------ sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 - sql/updates/r2494_mangos.sql | 1 + 4 files changed, 2 insertions(+), 26 deletions(-) create mode 100644 sql/updates/r2494_mangos.sql diff --git a/scripts/world/go_scripts.cpp b/scripts/world/go_scripts.cpp index cb153da18..a294a8e1a 100644 --- a/scripts/world/go_scripts.cpp +++ b/scripts/world/go_scripts.cpp @@ -30,7 +30,6 @@ go_mysterious_snow_mound go_resonite_cask go_sacred_fire_of_life go_shrine_of_the_birds -go_tablet_of_madness go_tele_to_dalaran_crystal go_tele_to_violet_stand go_andorhal_tower @@ -299,24 +298,6 @@ bool GOUse_go_shrine_of_the_birds(Player* pPlayer, GameObject* pGo) return false; } -/*###### -## go_tablet_of_madness -######*/ - -enum -{ - SPELL_ALCHEMY_GURUBASHI_MOJO_MADNESS = 24266, - SPELL_LEARN_GURUBASHI_MOJO_MADNESS = 24267 -}; - -bool GOUse_go_tablet_of_madness(Player* pPlayer, GameObject* pGo) -{ - if (pPlayer->HasSkill(SKILL_ALCHEMY) && pPlayer->GetSkillValue(SKILL_ALCHEMY) >= 300 && !pPlayer->HasSpell(SPELL_ALCHEMY_GURUBASHI_MOJO_MADNESS)) - pPlayer->CastSpell(pPlayer, SPELL_LEARN_GURUBASHI_MOJO_MADNESS, false); - - return true; -} - /*###### ## go_tele_to_dalaran_crystal ######*/ @@ -545,11 +526,6 @@ void AddSC_go_scripts() pNewScript->pGOUse = &GOUse_go_shrine_of_the_birds; pNewScript->RegisterSelf(); - pNewScript = new Script; - pNewScript->Name = "go_tablet_of_madness"; - pNewScript->pGOUse = &GOUse_go_tablet_of_madness; - pNewScript->RegisterSelf(); - pNewScript = new Script; pNewScript->Name = "go_tele_to_dalaran_crystal"; pNewScript->pGOUse = &GOUse_go_tele_to_dalaran_crystal; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index ffe0dbd4a..08c65f41f 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2493" + #define SD2_REVISION_NR "2494" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 36336d5d0..4fd12790d 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -80,7 +80,6 @@ UPDATE gameobject_template SET ScriptName='go_mysterious_snow_mound' WHERE entry UPDATE gameobject_template SET ScriptName='go_resonite_cask' WHERE entry=178145; UPDATE gameobject_template SET ScriptName='go_sacred_fire_of_life' WHERE entry=175944; UPDATE gameobject_template SET ScriptName='go_shrine_of_the_birds' WHERE entry IN (185547,185553,185551); -UPDATE gameobject_template SET ScriptName='go_tablet_of_madness' WHERE entry=180368; UPDATE gameobject_template SET ScriptName='go_tele_to_dalaran_crystal' WHERE entry=191230; UPDATE gameobject_template SET ScriptName='go_tele_to_violet_stand' WHERE entry=191229; UPDATE gameobject_template SET ScriptName='go_blood_filled_orb' WHERE entry=182024; diff --git a/sql/updates/r2494_mangos.sql b/sql/updates/r2494_mangos.sql new file mode 100644 index 000000000..c23e56e99 --- /dev/null +++ b/sql/updates/r2494_mangos.sql @@ -0,0 +1 @@ +UPDATE gameobject_template SET ScriptName='' WHERE entry=180368; From cba08c8e7f3740b0ee19886afdcb8c7fab563bab Mon Sep 17 00:00:00 2001 From: NeatElves Date: Thu, 5 Apr 2012 23:21:58 +0300 Subject: [PATCH 0483/1172] [2495] Remove script for npc 8816. Will be handled by DB Signed-off-by: Xfurry --- scripts/eastern_kingdoms/blasted_lands.cpp | 40 +--------------------- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 - sql/updates/r2495_mangos.sql | 1 + 4 files changed, 3 insertions(+), 41 deletions(-) create mode 100644 sql/updates/r2495_mangos.sql diff --git a/scripts/eastern_kingdoms/blasted_lands.cpp b/scripts/eastern_kingdoms/blasted_lands.cpp index 38b133d49..a2a77027e 100644 --- a/scripts/eastern_kingdoms/blasted_lands.cpp +++ b/scripts/eastern_kingdoms/blasted_lands.cpp @@ -17,48 +17,16 @@ /* ScriptData SDName: Blasted_Lands SD%Complete: 90 -SDComment: Quest support: 2784, 2801, 3628. Missing some texts for Fallen Hero. Teleporter to Rise of the Defiler missing group support. +SDComment: Quest support: 2784, 2801. Missing some texts for Fallen Hero. Teleporter to Rise of the Defiler missing group support. SDCategory: Blasted Lands EndScriptData */ /* ContentData -npc_deathly_usher npc_fallen_hero_of_horde EndContentData */ #include "precompiled.h" -/*###### -## npc_deathly_usher -######*/ - -#define GOSSIP_ITEM_USHER "I wish to to visit the Rise of the Defiler." - -#define SPELL_TELEPORT_SINGLE 12885 -#define SPELL_TELEPORT_SINGLE_IN_GROUP 13142 -#define SPELL_TELEPORT_GROUP 27686 - -bool GossipHello_npc_deathly_usher(Player* pPlayer, Creature* pCreature) -{ - if (pPlayer->GetQuestStatus(3628) == QUEST_STATUS_INCOMPLETE && pPlayer->HasItemCount(10757, 1)) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_USHER, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF); - - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); - - return true; -} - -bool GossipSelect_npc_deathly_usher(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) -{ - if (uiAction == GOSSIP_ACTION_INFO_DEF) - { - pPlayer->CLOSE_GOSSIP_MENU(); - pCreature->CastSpell(pPlayer, SPELL_TELEPORT_SINGLE, true); - } - - return true; -} - /*###### ## npc_fallen_hero_of_horde ######*/ @@ -145,12 +113,6 @@ void AddSC_blasted_lands() { Script* pNewScript; - pNewScript = new Script; - pNewScript->Name = "npc_deathly_usher"; - pNewScript->pGossipHello = &GossipHello_npc_deathly_usher; - pNewScript->pGossipSelect = &GossipSelect_npc_deathly_usher; - pNewScript->RegisterSelf(); - pNewScript = new Script; pNewScript->Name = "npc_fallen_hero_of_horde"; pNewScript->pGossipHello = &GossipHello_npc_fallen_hero_of_horde; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 08c65f41f..eb1e0996f 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2494" + #define SD2_REVISION_NR "2495" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 4fd12790d..23a575aa5 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -358,7 +358,6 @@ UPDATE creature_template SET ScriptName='mobs_nether_drake' WHERE entry IN (2002 UPDATE creature_template SET ScriptName='npc_daranelle' WHERE entry=21469; /* BLASTED LANDS */ -UPDATE creature_template SET ScriptName='npc_deathly_usher' WHERE entry=8816; UPDATE creature_template SET ScriptName='npc_fallen_hero_of_horde' WHERE entry=7572; /* BLOODMYST ISLE */ diff --git a/sql/updates/r2495_mangos.sql b/sql/updates/r2495_mangos.sql new file mode 100644 index 000000000..da84e2034 --- /dev/null +++ b/sql/updates/r2495_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='' WHERE entry=8816; From e9cc45ea94e26fdf88544179ae58ef22bc3f75f9 Mon Sep 17 00:00:00 2001 From: NeatElves Date: Thu, 5 Apr 2012 23:28:17 +0300 Subject: [PATCH 0484/1172] [2496] Remove script for npc 12384. Will be handled by DB Signed-off-by: Xfurry --- .../eastern_kingdoms/eastern_plaguelands.cpp | 32 +------------------ sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 - sql/updates/r2496_mangos.sql | 1 + 4 files changed, 3 insertions(+), 33 deletions(-) create mode 100644 sql/updates/r2496_mangos.sql diff --git a/scripts/eastern_kingdoms/eastern_plaguelands.cpp b/scripts/eastern_kingdoms/eastern_plaguelands.cpp index ebc83e32d..7829c79d1 100644 --- a/scripts/eastern_kingdoms/eastern_plaguelands.cpp +++ b/scripts/eastern_kingdoms/eastern_plaguelands.cpp @@ -17,13 +17,12 @@ /* ScriptData SDName: Eastern_Plaguelands SD%Complete: 100 -SDComment: Quest support: 5211, 5742. Special vendor Augustus the Touched +SDComment: Quest support: 5211, 5742. SDCategory: Eastern Plaguelands EndScriptData */ /* ContentData mobs_ghoul_flayer -npc_augustus_the_touched npc_darrowshire_spirit npc_tirion_fordring EndContentData */ @@ -53,29 +52,6 @@ CreatureAI* GetAI_mobs_ghoul_flayer(Creature* pCreature) return new mobs_ghoul_flayerAI(pCreature); } -/*###### -## npc_augustus_the_touched -######*/ - -bool GossipHello_npc_augustus_the_touched(Player* pPlayer, Creature* pCreature) -{ - if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); - - if (pCreature->isVendor() && pPlayer->GetQuestRewardStatus(6164)) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_VENDOR, GOSSIP_TEXT_BROWSE_GOODS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE); - - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); - return true; -} - -bool GossipSelect_npc_augustus_the_touched(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) -{ - if (uiAction == GOSSIP_ACTION_TRADE) - pPlayer->SEND_VENDORLIST(pCreature->GetObjectGuid()); - return true; -} - /*###### ## npc_darrowshire_spirit ######*/ @@ -156,12 +132,6 @@ void AddSC_eastern_plaguelands() pNewScript->GetAI = &GetAI_mobs_ghoul_flayer; pNewScript->RegisterSelf(); - pNewScript = new Script; - pNewScript->Name = "npc_augustus_the_touched"; - pNewScript->pGossipHello = &GossipHello_npc_augustus_the_touched; - pNewScript->pGossipSelect = &GossipSelect_npc_augustus_the_touched; - pNewScript->RegisterSelf(); - pNewScript = new Script; pNewScript->Name = "npc_darrowshire_spirit"; pNewScript->GetAI = &GetAI_npc_darrowshire_spirit; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index eb1e0996f..2da5e658b 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2495" + #define SD2_REVISION_NR "2496" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 23a575aa5..67d67f037 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -542,7 +542,6 @@ INSERT INTO scripted_areatrigger VALUES /* EASTERN PLAGUELANDS */ UPDATE creature_template SET ScriptName='mobs_ghoul_flayer' WHERE entry IN (8530,8531,8532); -UPDATE creature_template SET ScriptName='npc_augustus_the_touched' WHERE entry=12384; UPDATE creature_template SET ScriptName='npc_darrowshire_spirit' WHERE entry=11064; UPDATE creature_template SET ScriptName='npc_tirion_fordring' WHERE entry=1855; diff --git a/sql/updates/r2496_mangos.sql b/sql/updates/r2496_mangos.sql new file mode 100644 index 000000000..b27bcb90b --- /dev/null +++ b/sql/updates/r2496_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='' WHERE entry=12384; From 4294b2ef80960582345604b82c53f91d5122a7ba Mon Sep 17 00:00:00 2001 From: NeatElves Date: Thu, 5 Apr 2012 23:33:34 +0300 Subject: [PATCH 0485/1172] [2497] Remove script for npc 17832. This is already handled in DB Signed-off-by: Xfurry --- scripts/eastern_kingdoms/ghostlands.cpp | 37 +------------------------ sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 - sql/updates/r2497_mangos.sql | 1 + 4 files changed, 3 insertions(+), 38 deletions(-) create mode 100644 sql/updates/r2497_mangos.sql diff --git a/scripts/eastern_kingdoms/ghostlands.cpp b/scripts/eastern_kingdoms/ghostlands.cpp index bdd023535..7629d7c4c 100644 --- a/scripts/eastern_kingdoms/ghostlands.cpp +++ b/scripts/eastern_kingdoms/ghostlands.cpp @@ -17,12 +17,11 @@ /* ScriptData SDName: Ghostlands SD%Complete: 100 -SDComment: Quest support: 9212, 9692. Obtain Budd's Guise of Zul'aman. +SDComment: Quest support: 9212. Obtain Budd's Guise of Zul'aman. SDCategory: Ghostlands EndScriptData */ /* ContentData -npc_blood_knight_dawnstar npc_budd_nedreck npc_ranger_lilatha EndContentData */ @@ -30,34 +29,6 @@ EndContentData */ #include "precompiled.h" #include "escort_ai.h" -/*###### -## npc_blood_knight_dawnstar -######*/ - -#define GOSSIP_ITEM_INSIGNIA "Take Blood Knight Insignia" - -bool GossipHello_npc_blood_knight_dawnstar(Player* pPlayer, Creature* pCreature) -{ - if (pPlayer->GetQuestStatus(9692) == QUEST_STATUS_INCOMPLETE && !pPlayer->HasItemCount(24226,1,true)) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT,GOSSIP_ITEM_INSIGNIA,GOSSIP_SENDER_MAIN,GOSSIP_ACTION_INFO_DEF+1); - - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); - - return true; -} - -bool GossipSelect_npc_blood_knight_dawnstar(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) -{ - if (uiAction == GOSSIP_ACTION_INFO_DEF+1) - { - if (Item* pItem = pPlayer->StoreNewItemInInventorySlot(24226, 1)) - pPlayer->SendNewItem(pItem, 1, true, false); - - pPlayer->CLOSE_GOSSIP_MENU(); - } - return true; -} - /*###### ## npc_budd_nedreck ######*/ @@ -215,12 +186,6 @@ void AddSC_ghostlands() { Script* pNewScript; - pNewScript = new Script; - pNewScript->Name = "npc_blood_knight_dawnstar"; - pNewScript->pGossipHello = &GossipHello_npc_blood_knight_dawnstar; - pNewScript->pGossipSelect = &GossipSelect_npc_blood_knight_dawnstar; - pNewScript->RegisterSelf(); - pNewScript = new Script; pNewScript->Name = "npc_budd_nedreck"; pNewScript->pGossipHello = &GossipHello_npc_budd_nedreck; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 2da5e658b..b7a86ce69 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2496" + #define SD2_REVISION_NR "2497" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 67d67f037..4cfcc4b8a 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -579,7 +579,6 @@ UPDATE creature_template SET ScriptName='npc_oox22fe' WHERE entry=7807; UPDATE creature_template SET ScriptName='npc_screecher_spirit' WHERE entry=8612; /* GHOSTLANDS */ -UPDATE creature_template SET ScriptName='npc_blood_knight_dawnstar' WHERE entry=17832; UPDATE creature_template SET ScriptName='npc_budd_nedreck' WHERE entry=23559; UPDATE creature_template SET ScriptName='npc_ranger_lilatha' WHERE entry=16295; diff --git a/sql/updates/r2497_mangos.sql b/sql/updates/r2497_mangos.sql new file mode 100644 index 000000000..11dac671e --- /dev/null +++ b/sql/updates/r2497_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='' WHERE entry=17832; From 36762abf52752015d09adfe9cb195dec9ae256b1 Mon Sep 17 00:00:00 2001 From: NeatElves Date: Thu, 5 Apr 2012 23:38:58 +0300 Subject: [PATCH 0486/1172] [2498] Remove script for npc 23559. Will be handled in DB Signed-off-by: Xfurry --- scripts/eastern_kingdoms/ghostlands.cpp | 37 +------------------------ sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 - sql/updates/r2498_mangos.sql | 1 + 4 files changed, 3 insertions(+), 38 deletions(-) create mode 100644 sql/updates/r2498_mangos.sql diff --git a/scripts/eastern_kingdoms/ghostlands.cpp b/scripts/eastern_kingdoms/ghostlands.cpp index 7629d7c4c..3bc51bc1b 100644 --- a/scripts/eastern_kingdoms/ghostlands.cpp +++ b/scripts/eastern_kingdoms/ghostlands.cpp @@ -17,46 +17,17 @@ /* ScriptData SDName: Ghostlands SD%Complete: 100 -SDComment: Quest support: 9212. Obtain Budd's Guise of Zul'aman. +SDComment: Quest support: 9212. SDCategory: Ghostlands EndScriptData */ /* ContentData -npc_budd_nedreck npc_ranger_lilatha EndContentData */ #include "precompiled.h" #include "escort_ai.h" -/*###### -## npc_budd_nedreck -######*/ - -#define GOSSIP_ITEM_DISGUISE "You gave the crew disguises?" - -bool GossipHello_npc_budd_nedreck(Player* pPlayer, Creature* pCreature) -{ - if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); - - if (pPlayer->GetQuestStatus(11166) == QUEST_STATUS_INCOMPLETE) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT,GOSSIP_ITEM_DISGUISE,GOSSIP_SENDER_MAIN,GOSSIP_ACTION_INFO_DEF); - - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); - return true; -} - -bool GossipSelect_npc_budd_nedreck(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) -{ - if (uiAction==GOSSIP_ACTION_INFO_DEF) - { - pPlayer->CLOSE_GOSSIP_MENU(); - pCreature->CastSpell(pPlayer, 42540, false); - } - return true; -} - /*###### ## npc_ranger_lilatha ######*/ @@ -186,12 +157,6 @@ void AddSC_ghostlands() { Script* pNewScript; - pNewScript = new Script; - pNewScript->Name = "npc_budd_nedreck"; - pNewScript->pGossipHello = &GossipHello_npc_budd_nedreck; - pNewScript->pGossipSelect = &GossipSelect_npc_budd_nedreck; - pNewScript->RegisterSelf(); - pNewScript = new Script; pNewScript->Name = "npc_ranger_lilatha"; pNewScript->GetAI = &GetAI_npc_ranger_lilathaAI; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index b7a86ce69..87b5f5279 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2497" + #define SD2_REVISION_NR "2498" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 4cfcc4b8a..2f3577582 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -579,7 +579,6 @@ UPDATE creature_template SET ScriptName='npc_oox22fe' WHERE entry=7807; UPDATE creature_template SET ScriptName='npc_screecher_spirit' WHERE entry=8612; /* GHOSTLANDS */ -UPDATE creature_template SET ScriptName='npc_budd_nedreck' WHERE entry=23559; UPDATE creature_template SET ScriptName='npc_ranger_lilatha' WHERE entry=16295; /* GNOMEREGAN */ diff --git a/sql/updates/r2498_mangos.sql b/sql/updates/r2498_mangos.sql new file mode 100644 index 000000000..ae2446dfb --- /dev/null +++ b/sql/updates/r2498_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='' WHERE entry=23559; From 9f6c1abb023a7a868cb5f9ddb5806993c9fa4e7e Mon Sep 17 00:00:00 2001 From: NeatElves Date: Thu, 5 Apr 2012 23:45:32 +0300 Subject: [PATCH 0487/1172] [2499] Remove script for npc 8696. Should be already handled in DB Signed-off-by: Xfurry --- .../razorfen_downs/razorfen_downs.cpp | 55 +------------------ sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 - sql/updates/r2499_mangos.sql | 1 + 4 files changed, 3 insertions(+), 56 deletions(-) create mode 100644 sql/updates/r2499_mangos.sql diff --git a/scripts/kalimdor/razorfen_downs/razorfen_downs.cpp b/scripts/kalimdor/razorfen_downs/razorfen_downs.cpp index a96ce881d..87393c94a 100644 --- a/scripts/kalimdor/razorfen_downs/razorfen_downs.cpp +++ b/scripts/kalimdor/razorfen_downs/razorfen_downs.cpp @@ -17,64 +17,17 @@ /* ScriptData SDName: Razorfen_Downs SD%Complete: 100 -SDComment: Support for Henry Stern(2 recipes), Quest 3525 +SDComment: Quest 3525 SDCategory: Razorfen Downs EndScriptData */ /* ContentData -npc_henry_stern npc_belnistrasz EndContentData */ #include "precompiled.h" #include "escort_ai.h" -/*### -# npc_henry_stern -####*/ - -enum -{ - SPELL_GOLDTHORN_TEA = 13028, - SPELL_TEACHING_GOLDTHORN_TEA = 13029, - SPELL_MIGHT_TROLLS_BLOOD_POTION = 3451, - SPELL_TEACHING_MIGHTY_TROLLS_BLOOD_POTION = 13030, - GOSSIP_TEXT_TEA_ANSWER = 2114, - GOSSIP_TEXT_POTION_ANSWER = 2115, -}; - -#define GOSSIP_ITEM_TEA "Teach me the cooking recipe" -#define GOSSIP_ITEM_POTION "Teach me the alchemy recipe" - -bool GossipHello_npc_henry_stern (Player* pPlayer, Creature* pCreature) -{ - if (pPlayer->GetBaseSkillValue(SKILL_COOKING) >= 175 && !pPlayer->HasSpell(SPELL_GOLDTHORN_TEA)) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_TEA, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); - - if (pPlayer->GetBaseSkillValue(SKILL_ALCHEMY) >= 180 && !pPlayer->HasSpell(SPELL_MIGHT_TROLLS_BLOOD_POTION)) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_POTION, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); - - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); - return true; -} - -bool GossipSelect_npc_henry_stern (Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) -{ - if (uiAction == GOSSIP_ACTION_INFO_DEF + 1) - { - pCreature->CastSpell(pPlayer, SPELL_TEACHING_GOLDTHORN_TEA, true); - pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXT_TEA_ANSWER, pCreature->GetObjectGuid()); - } - - if (uiAction == GOSSIP_ACTION_INFO_DEF + 2) - { - pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXT_POTION_ANSWER, pCreature->GetObjectGuid()); - pCreature->CastSpell(pPlayer, SPELL_TEACHING_MIGHTY_TROLLS_BLOOD_POTION, true); - } - - return true; -} - /*### # npc_belnistrasz ####*/ @@ -338,12 +291,6 @@ void AddSC_razorfen_downs() { Script* pNewScript; - pNewScript = new Script; - pNewScript->Name = "npc_henry_stern"; - pNewScript->pGossipHello = &GossipHello_npc_henry_stern; - pNewScript->pGossipSelect = &GossipSelect_npc_henry_stern; - pNewScript->RegisterSelf(); - pNewScript = new Script; pNewScript->Name = "npc_belnistrasz"; pNewScript->GetAI = &GetAI_npc_belnistrasz; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 87b5f5279..fca14098c 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2498" + #define SD2_REVISION_NR "2499" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 2f3577582..ae481a0f3 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -883,7 +883,6 @@ UPDATE creature_template SET ScriptName='npc_thrall_warchief' WHERE entry=4949; /* RAZORFEN DOWNS */ UPDATE creature_template SET ScriptName='boss_amnennar_the_coldbringer' WHERE entry=7358; -UPDATE creature_template SET ScriptName='npc_henry_stern' WHERE entry=8696; UPDATE creature_template SET ScriptName='npc_belnistrasz' WHERE entry=8516; /* RAZORFEN KRAUL */ diff --git a/sql/updates/r2499_mangos.sql b/sql/updates/r2499_mangos.sql new file mode 100644 index 000000000..e0278d63d --- /dev/null +++ b/sql/updates/r2499_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='' WHERE entry=8696; From 73a65480e117ae937a81c8cc79692b92c3a27f40 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Thu, 5 Apr 2012 23:48:42 +0300 Subject: [PATCH 0488/1172] [2500] Fix some white spaces. --- scripts/kalimdor/temple_of_ahnqiraj/boss_sartura.cpp | 4 ++-- sd2_revision_nr.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_sartura.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_sartura.cpp index 5db20677d..f9933e1b7 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/boss_sartura.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_sartura.cpp @@ -159,8 +159,8 @@ struct MANGOS_DLL_DECL boss_sarturaAI : public ScriptedAI // If she is 20% enrage if (!m_bIsEnraged && m_creature->GetHealthPercent() <= 20.0f) - { - if (DoCastSpellIfCan(m_creature, SPELL_ENRAGE, m_bIsWhirlWind ? CAST_TRIGGERED : 0) == CAST_OK) + { + if (DoCastSpellIfCan(m_creature, SPELL_ENRAGE, m_bIsWhirlWind ? CAST_TRIGGERED : 0) == CAST_OK) m_bIsEnraged = true; } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index fca14098c..8211fdf24 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2499" + #define SD2_REVISION_NR "2500" #endif // __SD2_REVISION_NR_H__ From ca1553ee33b81ece1b356262aba53d8e50a3427e Mon Sep 17 00:00:00 2001 From: NeatElves Date: Thu, 5 Apr 2012 23:53:14 +0300 Subject: [PATCH 0489/1172] [2501] Remove script for npc 10618. Will be handled by DB Signed-off-by: Xfurry --- scripts/kalimdor/winterspring.cpp | 34 +------------------------------ sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 - sql/updates/r2501_mangos.sql | 1 + 4 files changed, 3 insertions(+), 35 deletions(-) create mode 100644 sql/updates/r2501_mangos.sql diff --git a/scripts/kalimdor/winterspring.cpp b/scripts/kalimdor/winterspring.cpp index 6d41eb9fe..37c18b0f2 100644 --- a/scripts/kalimdor/winterspring.cpp +++ b/scripts/kalimdor/winterspring.cpp @@ -17,13 +17,12 @@ /* ScriptData SDName: Winterspring SD%Complete: 90 -SDComment: Quest support: 4901, 5126 (Loraxs' tale missing proper gossip items text). Vendor Rivern Frostwind. +SDComment: Quest support: 4901, 5126 (Loraxs' tale missing proper gossip items text). SDCategory: Winterspring EndScriptData */ /* ContentData npc_lorax -npc_rivern_frostwind npc_ranshalla EndContentData */ @@ -79,31 +78,6 @@ bool GossipSelect_npc_lorax(Player* pPlayer, Creature* pCreature, uint32 uiSende return true; } -/*###### -## npc_rivern_frostwind -######*/ - -bool GossipHello_npc_rivern_frostwind(Player* pPlayer, Creature* pCreature) -{ - if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); - - if (pCreature->isVendor() && pPlayer->GetReputationRank(589) == REP_EXALTED) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_VENDOR, GOSSIP_TEXT_BROWSE_GOODS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE); - - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); - - return true; -} - -bool GossipSelect_npc_rivern_frostwind(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) -{ - if (uiAction == GOSSIP_ACTION_TRADE) - pPlayer->SEND_VENDORLIST(pCreature->GetObjectGuid()); - - return true; -} - /*#### # npc_ranshalla ####*/ @@ -543,12 +517,6 @@ void AddSC_winterspring() pNewScript->pGossipSelect = &GossipSelect_npc_lorax; pNewScript->RegisterSelf(); - pNewScript = new Script; - pNewScript->Name = "npc_rivern_frostwind"; - pNewScript->pGossipHello = &GossipHello_npc_rivern_frostwind; - pNewScript->pGossipSelect = &GossipSelect_npc_rivern_frostwind; - pNewScript->RegisterSelf(); - pNewScript = new Script; pNewScript->Name = "npc_ranshalla"; pNewScript->GetAI = &GetAI_npc_ranshalla; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 8211fdf24..2481e8549 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2500" + #define SD2_REVISION_NR "2501" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index ae481a0f3..ea8dd243e 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -1289,7 +1289,6 @@ UPDATE creature_template SET ScriptName='npc_mikhail' WHERE entry=4963; /* WINTERSPRING */ UPDATE creature_template SET ScriptName='npc_lorax' WHERE entry=10918; -UPDATE creature_template SET ScriptName='npc_rivern_frostwind' WHERE entry=10618; UPDATE creature_template SET ScriptName='npc_ranshalla' WHERE entry=10300; UPDATE gameobject_template SET ScriptName='go_elune_fire' WHERE entry IN (177417, 177404); diff --git a/sql/updates/r2501_mangos.sql b/sql/updates/r2501_mangos.sql new file mode 100644 index 000000000..1f00382cc --- /dev/null +++ b/sql/updates/r2501_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='' WHERE entry=10618; From ccf6901c77616ab724c14a142fe04fb804113f85 Mon Sep 17 00:00:00 2001 From: NeatElves Date: Thu, 5 Apr 2012 23:58:26 +0300 Subject: [PATCH 0490/1172] [2502] Remove script for npc 4968. Will be handled by DB Signed-off-by: Xfurry --- scripts/kalimdor/dustwallow_marsh.cpp | 44 +-------------------------- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 - sql/updates/r2502_mangos.sql | 1 + 4 files changed, 3 insertions(+), 45 deletions(-) create mode 100644 sql/updates/r2502_mangos.sql diff --git a/scripts/kalimdor/dustwallow_marsh.cpp b/scripts/kalimdor/dustwallow_marsh.cpp index 92ab86b84..044be6d3d 100644 --- a/scripts/kalimdor/dustwallow_marsh.cpp +++ b/scripts/kalimdor/dustwallow_marsh.cpp @@ -17,14 +17,13 @@ /* ScriptData SDName: Dustwallow_Marsh SD%Complete: 95 -SDComment: Quest support: 558, 1173, 1273, 1324, 11209, 11180. +SDComment: Quest support: 1173, 1273, 1324, 11209, 11180. SDCategory: Dustwallow Marsh EndScriptData */ /* ContentData mobs_risen_husk_spirit npc_restless_apparition -npc_lady_jaina_proudmoore npc_morokk npc_ogron npc_private_hendel @@ -177,41 +176,6 @@ CreatureAI* GetAI_npc_restless_apparition(Creature* pCreature) return new npc_restless_apparitionAI(pCreature); } -/*###### -## npc_lady_jaina_proudmoore -######*/ - -enum -{ - QUEST_JAINAS_AUTOGRAPH = 558, - SPELL_JAINAS_AUTOGRAPH = 23122 -}; - -#define GOSSIP_ITEM_JAINA "I know this is rather silly but i have a young ward who is a bit shy and would like your autograph." - -bool GossipHello_npc_lady_jaina_proudmoore(Player* pPlayer, Creature* pCreature) -{ - if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); - - if (pPlayer->GetQuestStatus(QUEST_JAINAS_AUTOGRAPH) == QUEST_STATUS_INCOMPLETE) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_JAINA, GOSSIP_SENDER_MAIN, GOSSIP_SENDER_INFO); - - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); - - return true; -} - -bool GossipSelect_npc_lady_jaina_proudmoore(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) -{ - if (uiAction == GOSSIP_SENDER_INFO) - { - pPlayer->SEND_GOSSIP_MENU(7012, pCreature->GetObjectGuid()); - pPlayer->CastSpell(pPlayer, SPELL_JAINAS_AUTOGRAPH, false); - } - return true; -} - /*###### ## npc_morokk ######*/ @@ -743,12 +707,6 @@ void AddSC_dustwallow_marsh() pNewScript->GetAI = &GetAI_npc_restless_apparition; pNewScript->RegisterSelf(); - pNewScript = new Script; - pNewScript->Name = "npc_lady_jaina_proudmoore"; - pNewScript->pGossipHello = &GossipHello_npc_lady_jaina_proudmoore; - pNewScript->pGossipSelect = &GossipSelect_npc_lady_jaina_proudmoore; - pNewScript->RegisterSelf(); - pNewScript = new Script; pNewScript->Name = "npc_morokk"; pNewScript->GetAI = &GetAI_npc_morokk; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 2481e8549..1cba67cb6 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2501" + #define SD2_REVISION_NR "2502" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index ea8dd243e..4b2f2c0e3 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -531,7 +531,6 @@ UPDATE creature_template SET ScriptName='npc_lazy_peon' WHERE entry=10556; /* DUSTWALLOW MARSH */ UPDATE creature_template SET ScriptName='mobs_risen_husk_spirit' WHERE entry IN (23554,23555); -UPDATE creature_template SET ScriptName='npc_lady_jaina_proudmoore' WHERE entry=4968; UPDATE creature_template SET ScriptName='npc_ogron' WHERE entry=4983; UPDATE creature_template SET ScriptName='npc_morokk' WHERE entry=4500; UPDATE creature_template SET ScriptName='npc_restless_apparition' WHERE entry=23861; diff --git a/sql/updates/r2502_mangos.sql b/sql/updates/r2502_mangos.sql new file mode 100644 index 000000000..0a992e815 --- /dev/null +++ b/sql/updates/r2502_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='' WHERE entry=4968; From af2c044903c44221d309b6184f0a2b6fd7882845 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Fri, 6 Apr 2012 22:07:23 +0200 Subject: [PATCH 0491/1172] [2503] Add params to GetClosesCreatureWithEntry to also select corpse or alive/corpse creatures. Requires MaNGOS 11942 --- include/sc_grid_searchers.cpp | 4 ++-- include/sc_grid_searchers.h | 2 +- sd2_revision_nr.h | 2 +- sql/scriptdev2_script_full.sql | 2 +- sql/updates/r2503_scriptdev2.sql | 1 + 5 files changed, 6 insertions(+), 5 deletions(-) create mode 100644 sql/updates/r2503_scriptdev2.sql diff --git a/include/sc_grid_searchers.cpp b/include/sc_grid_searchers.cpp index f61cebdd9..6202e78ae 100644 --- a/include/sc_grid_searchers.cpp +++ b/include/sc_grid_searchers.cpp @@ -18,11 +18,11 @@ GameObject* GetClosestGameObjectWithEntry(WorldObject* pSource, uint32 uiEntry, } //return closest creature alive in grid, with range from pSource -Creature* GetClosestCreatureWithEntry(WorldObject* pSource, uint32 uiEntry, float fMaxSearchRange) +Creature* GetClosestCreatureWithEntry(WorldObject* pSource, uint32 uiEntry, float fMaxSearchRange, bool bOnlyAlive/*=true*/, bool bOnlyDead/*=false*/) { Creature* pCreature = NULL; - MaNGOS::NearestCreatureEntryWithLiveStateInObjectRangeCheck creature_check(*pSource, uiEntry, true, fMaxSearchRange); + MaNGOS::NearestCreatureEntryWithLiveStateInObjectRangeCheck creature_check(*pSource, uiEntry, bOnlyAlive, bOnlyDead, fMaxSearchRange); MaNGOS::CreatureLastSearcher searcher(pCreature, creature_check); Cell::VisitGridObjects(pSource, searcher, fMaxSearchRange); diff --git a/include/sc_grid_searchers.h b/include/sc_grid_searchers.h index b939eb599..94f0b01b1 100644 --- a/include/sc_grid_searchers.h +++ b/include/sc_grid_searchers.h @@ -38,7 +38,7 @@ struct ObjectDistanceOrderReversed : public std::binary_function& lList , WorldObject* pSource, uint32 uiEntry, float fMaxSearchRange); void GetCreatureListWithEntryInGrid(std::list& lList, WorldObject* pSource, uint32 uiEntry, float fMaxSearchRange); diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 1cba67cb6..4b3015a7b 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2502" + #define SD2_REVISION_NR "2503" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 8c76f0bc8..3c90ad33d 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -3,7 +3,7 @@ -- DELETE FROM sd2_db_version; -INSERT INTO sd2_db_version (version) VALUES ('ScriptDev2 (for MaNGOS 11812+) '); +INSERT INTO sd2_db_version (version) VALUES ('ScriptDev2 (for MaNGOS 11942+) '); -- -- Below contains data for table `script_texts` mainly used in C++ parts. diff --git a/sql/updates/r2503_scriptdev2.sql b/sql/updates/r2503_scriptdev2.sql new file mode 100644 index 000000000..ed90bdc98 --- /dev/null +++ b/sql/updates/r2503_scriptdev2.sql @@ -0,0 +1 @@ +UPDATE sd2_db_version SET version='ScriptDev2 (for MaNGOS 11942+) '; From 307e0aa1efff92a1eb9e4983e3bf650bd40d27d3 Mon Sep 17 00:00:00 2001 From: Chero Date: Sat, 7 Apr 2012 01:26:13 +0300 Subject: [PATCH 0492/1172] [2504] Implement script support for quest 4291 Script is based on some old patches Signed-off-by: Xfurry --- scripts/world/areatrigger_scripts.cpp | 29 +++++++++++++- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 57 +++++++++++++++++---------- sql/updates/r2504_mangos.sql | 17 ++++++++ 4 files changed, 83 insertions(+), 22 deletions(-) create mode 100644 sql/updates/r2504_mangos.sql diff --git a/scripts/world/areatrigger_scripts.cpp b/scripts/world/areatrigger_scripts.cpp index 4f19d4b29..f38aa8d55 100644 --- a/scripts/world/areatrigger_scripts.cpp +++ b/scripts/world/areatrigger_scripts.cpp @@ -17,7 +17,7 @@ /* ScriptData SDName: Areatrigger_Scripts SD%Complete: 100 -SDComment: Quest support: 6681, 11686, 10589/10604, 12741, 12548, 13315/13351, 12575 +SDComment: Quest support: 4291, 6681, 11686, 10589/10604, 12741, 12548, 13315/13351, 12575 SDCategory: Areatrigger EndScriptData */ @@ -30,6 +30,7 @@ at_spearborn_encampment 5030 at_warsong_farms at_stormwright_shelf 5108 at_childrens_week_spot 3546,3547,3548,3552,3549,3550 +at_scent_larkorwi 1726,1727,1728,1729,1730,1731,1732,1733,1734,1735,1736,1737,1738,1739,1740 EndContentData */ #include "precompiled.h" @@ -259,6 +260,27 @@ bool AreaTrigger_at_stormwright_shelf(Player* pPlayer, AreaTriggerEntry const* p return true; } +/*###### +## at_scent_larkorwi +######*/ + +enum +{ + QUEST_SCENT_OF_LARKORWI = 4291, + NPC_LARKORWI_MATE = 9683 +}; + +bool AreaTrigger_at_scent_larkorwi(Player* pPlayer, AreaTriggerEntry const* pAt) +{ + if (pPlayer->isAlive() && !pPlayer->isGameMaster() && pPlayer->GetQuestStatus(QUEST_SCENT_OF_LARKORWI) == QUEST_STATUS_INCOMPLETE) + { + if (!GetClosestCreatureWithEntry(pPlayer, NPC_LARKORWI_MATE, 25.0f, false, false)) + pPlayer->SummonCreature(NPC_LARKORWI_MATE, pAt->x, pAt->y, pAt->z, 3.3f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 2*MINUTE*IN_MILLISECONDS); + } + + return false; +} + void AddSC_areatrigger_scripts() { Script* pNewScript; @@ -307,4 +329,9 @@ void AddSC_areatrigger_scripts() pNewScript->Name = "at_stormwright_shelf"; pNewScript->pAreaTrigger = &AreaTrigger_at_stormwright_shelf; pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "at_scent_larkorwi"; + pNewScript->pAreaTrigger = &AreaTrigger_at_scent_larkorwi; + pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 4b3015a7b..3a0ffc66a 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2503" + #define SD2_REVISION_NR "2504" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 4b2f2c0e3..53cfd9bf2 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -7,51 +7,68 @@ DELETE FROM scripted_areatrigger WHERE entry=4560; INSERT INTO scripted_areatrigger VALUES (4560,'at_legion_teleporter'); DELETE FROM scripted_areatrigger WHERE entry=3066; INSERT INTO scripted_areatrigger VALUES (3066,'at_ravenholdt'); -DELETE FROM scripted_areatrigger WHERE entry IN (4871, 4872, 4873); +DELETE FROM scripted_areatrigger WHERE entry IN (4871,4872,4873); INSERT INTO scripted_areatrigger VALUES (4871,'at_warsong_farms'), (4872,'at_warsong_farms'), (4873,'at_warsong_farms'); -DELETE FROM scripted_areatrigger WHERE entry IN (5046, 5047); +DELETE FROM scripted_areatrigger WHERE entry IN (5046,5047); INSERT INTO scripted_areatrigger VALUES -(5046, 'at_waygate'), -(5047, 'at_waygate'); +(5046,'at_waygate'), +(5047,'at_waygate'); DELETE FROM scripted_areatrigger WHERE entry BETWEEN 5284 AND 5287; INSERT INTO scripted_areatrigger VALUES (5284,'at_aldurthar_gate'), (5285,'at_aldurthar_gate'), (5286,'at_aldurthar_gate'), (5287,'at_aldurthar_gate'); -DELETE FROM scripted_areatrigger WHERE entry IN (4112, 4113); +DELETE FROM scripted_areatrigger WHERE entry IN (4112,4113); INSERT INTO scripted_areatrigger VALUES (4112,'at_naxxramas'), (4113,'at_naxxramas'); DELETE FROM scripted_areatrigger WHERE entry=5108; INSERT INTO scripted_areatrigger VALUES (5108,'at_stormwright_shelf'); -DELETE FROM scripted_areatrigger WHERE entry IN (3546, 3547, 3548, 3549, 3550, 3552); +DELETE FROM scripted_areatrigger WHERE entry IN (3546,3547,3548,3549,3550,3552); INSERT INTO scripted_areatrigger VALUES -(3546, 'at_childrens_week_spot'), -- Darnassian bank -(3547, 'at_childrens_week_spot'), -- Undercity - thone room -(3548, 'at_childrens_week_spot'), -- Stonewrought Dam -(3549, 'at_childrens_week_spot'), -- The Mor'shan Rampart -(3550, 'at_childrens_week_spot'), -- Ratchet Docks -(3552, 'at_childrens_week_spot'); -- Westfall Lighthouse -DELETE FROM scripted_areatrigger WHERE entry IN (2026, 2046); +(3546,'at_childrens_week_spot'), -- Darnassian bank +(3547,'at_childrens_week_spot'), -- Undercity - thone room +(3548,'at_childrens_week_spot'), -- Stonewrought Dam +(3549,'at_childrens_week_spot'), -- The Mor'shan Rampart +(3550,'at_childrens_week_spot'), -- Ratchet Docks +(3552,'at_childrens_week_spot'); -- Westfall Lighthouse +DELETE FROM scripted_areatrigger WHERE entry IN (2026,2046); INSERT INTO scripted_areatrigger VALUES -(2026, 'at_blackrock_spire'), -(2046, 'at_blackrock_spire'); +(2026,'at_blackrock_spire'), +(2046,'at_blackrock_spire'); DELETE FROM scripted_areatrigger WHERE entry=5030; INSERT INTO scripted_areatrigger VALUES (5030,'at_spearborn_encampment'); -DELETE FROM scripted_areatrigger WHERE entry IN (3958, 3960); +DELETE FROM scripted_areatrigger WHERE entry IN (3958,3960); INSERT INTO scripted_areatrigger VALUES -(3958, 'at_zulgurub'), -(3960, 'at_zulgurub'); +(3958,'at_zulgurub'), +(3960,'at_zulgurub'); DELETE FROM scripted_areatrigger WHERE entry=3626; -INSERT INTO scripted_areatrigger VALUES (3626, 'at_vaelastrasz'); +INSERT INTO scripted_areatrigger VALUES (3626,'at_vaelastrasz'); DELETE FROM scripted_areatrigger WHERE entry=4937; -INSERT INTO scripted_areatrigger VALUES (4937, 'at_sunwell_plateau'); +INSERT INTO scripted_areatrigger VALUES (4937,'at_sunwell_plateau'); DELETE FROM scripted_areatrigger WHERE entry=4524; INSERT INTO scripted_areatrigger VALUES (4524,'at_shattered_halls'); +DELETE FROM scripted_areatrigger WHERE entry BETWEEN 1726 AND 1740; +INSERT INTO scripted_areatrigger VALUES +(1726,'at_scent_larkorwi'), +(1727,'at_scent_larkorwi'), +(1728,'at_scent_larkorwi'), +(1729,'at_scent_larkorwi'), +(1730,'at_scent_larkorwi'), +(1731,'at_scent_larkorwi'), +(1732,'at_scent_larkorwi'), +(1733,'at_scent_larkorwi'), +(1734,'at_scent_larkorwi'), +(1735,'at_scent_larkorwi'), +(1736,'at_scent_larkorwi'), +(1737,'at_scent_larkorwi'), +(1738,'at_scent_larkorwi'), +(1739,'at_scent_larkorwi'), +(1740,'at_scent_larkorwi'); /* BATTLEGROUNDS */ diff --git a/sql/updates/r2504_mangos.sql b/sql/updates/r2504_mangos.sql new file mode 100644 index 000000000..606aeb105 --- /dev/null +++ b/sql/updates/r2504_mangos.sql @@ -0,0 +1,17 @@ +DELETE FROM scripted_areatrigger WHERE entry BETWEEN 1726 AND 1740; +INSERT INTO scripted_areatrigger VALUES +(1726,'at_scent_larkorwi'), +(1727,'at_scent_larkorwi'), +(1728,'at_scent_larkorwi'), +(1729,'at_scent_larkorwi'), +(1730,'at_scent_larkorwi'), +(1731,'at_scent_larkorwi'), +(1732,'at_scent_larkorwi'), +(1733,'at_scent_larkorwi'), +(1734,'at_scent_larkorwi'), +(1735,'at_scent_larkorwi'), +(1736,'at_scent_larkorwi'), +(1737,'at_scent_larkorwi'), +(1738,'at_scent_larkorwi'), +(1739,'at_scent_larkorwi'), +(1740,'at_scent_larkorwi'); From e45ee0690ff12697cab815f3c37b8fd5e38e6474 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sat, 7 Apr 2012 01:43:18 +0300 Subject: [PATCH 0493/1172] [2505] Remove broken hack from Blackheart the Inciter Note: spell 33676 needs core support and more research --- .../boss_blackheart_the_inciter.cpp | 56 ++++--------------- sd2_revision_nr.h | 2 +- 2 files changed, 11 insertions(+), 47 deletions(-) diff --git a/scripts/outland/auchindoun/shadow_labyrinth/boss_blackheart_the_inciter.cpp b/scripts/outland/auchindoun/shadow_labyrinth/boss_blackheart_the_inciter.cpp index 540295399..f1c2a779e 100644 --- a/scripts/outland/auchindoun/shadow_labyrinth/boss_blackheart_the_inciter.cpp +++ b/scripts/outland/auchindoun/shadow_labyrinth/boss_blackheart_the_inciter.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: Boss_Blackheart_the_Inciter -SD%Complete: 75 -SDComment: Incite Chaos not functional since core lacks Mind Control support +SD%Complete: 60 +SDComment: Incite Chaos needs further research and core support SDCategory: Auchindoun, Shadow Labyrinth EndScriptData */ @@ -26,8 +26,7 @@ EndScriptData */ enum { - SPELL_INCITE_CHAOS = 33676, - SPELL_INCITE_CHAOS_B = 33684, // Debuff applied to each member of party + SPELL_INCITE_CHAOS = 33676, // triggers 33684 on party members - needs core support SPELL_CHARGE = 33709, SPELL_WAR_STOMP = 33707, @@ -64,20 +63,15 @@ struct MANGOS_DLL_DECL boss_blackheart_the_inciterAI : public ScriptedAI ScriptedInstance* m_pInstance; - bool m_bInciteChaos; uint32 m_uiInciteChaosTimer; - uint32 m_uiInciteChaosWaitTimer; uint32 m_uiChargeTimer; uint32 m_uiKnockbackTimer; void Reset() { - m_bInciteChaos = false; - m_uiInciteChaosTimer = 20000; - m_uiInciteChaosWaitTimer = 15000; - m_uiChargeTimer = 5000; - m_uiKnockbackTimer = 15000; - SetCombatMovement(true); + m_uiInciteChaosTimer = 15000; + m_uiChargeTimer = 5000; + m_uiKnockbackTimer = 15000; } void KilledUnit(Unit* pVictim) @@ -119,45 +113,14 @@ struct MANGOS_DLL_DECL boss_blackheart_the_inciterAI : public ScriptedAI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - if (m_bInciteChaos) - { - if (m_uiInciteChaosWaitTimer < uiDiff) - { - m_bInciteChaos = false; - m_uiInciteChaosWaitTimer = 15000; - SetCombatMovement(true); - m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); - } - else - m_uiInciteChaosWaitTimer -= uiDiff; - - return; - } - - if (m_uiInciteChaosTimer < uiDiff) + // ToDo: this needs future core and script support + /*if (m_uiInciteChaosTimer < uiDiff) { if (DoCastSpellIfCan(m_creature, SPELL_INCITE_CHAOS) == CAST_OK) - { - std::vector vGuids; - m_creature->FillGuidsListFromThreatList(vGuids); - for (std::vector::const_iterator itr = vGuids.begin();itr != vGuids.end(); ++itr) - { - Unit* pTarget = m_creature->GetMap()->GetUnit(*itr); - - if (pTarget && pTarget->GetTypeId() == TYPEID_PLAYER) - pTarget->CastSpell(pTarget, SPELL_INCITE_CHAOS_B, true, NULL, NULL, m_creature->GetObjectGuid()); - } - - DoResetThreat(); - m_bInciteChaos = true; m_uiInciteChaosTimer = 40000; - SetCombatMovement(false); - m_creature->StopMoving(); - return; - } } else - m_uiInciteChaosTimer -= uiDiff; + m_uiInciteChaosTimer -= uiDiff;*/ // Charge Timer if (m_uiChargeTimer < uiDiff) @@ -181,6 +144,7 @@ struct MANGOS_DLL_DECL boss_blackheart_the_inciterAI : public ScriptedAI DoMeleeAttackIfReady(); } }; + CreatureAI* GetAI_boss_blackheart_the_inciter(Creature* pCreature) { return new boss_blackheart_the_inciterAI(pCreature); diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 3a0ffc66a..a9fa9e260 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2504" + #define SD2_REVISION_NR "2505" #endif // __SD2_REVISION_NR_H__ From 25a0fd6ad4213691bd6811c75934ecddb32e2a4b Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sat, 7 Apr 2012 21:16:15 +0300 Subject: [PATCH 0494/1172] [2506] Add some defines and visuals for Razorgore - phase I Note: more of this event will be added when the proper core support for spell 19869 will be implemented --- .../blackwing_lair/blackwing_lair.h | 8 +++++ .../blackwing_lair/boss_razorgore.cpp | 31 ++++++++++++++++--- .../instance_blackwing_lair.cpp | 30 +++++++++++++++++- sd2_revision_nr.h | 2 +- 4 files changed, 65 insertions(+), 6 deletions(-) diff --git a/scripts/eastern_kingdoms/blackwing_lair/blackwing_lair.h b/scripts/eastern_kingdoms/blackwing_lair/blackwing_lair.h index f8b95abb5..ec1e26d72 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/blackwing_lair.h +++ b/scripts/eastern_kingdoms/blackwing_lair/blackwing_lair.h @@ -28,6 +28,9 @@ enum NPC_NEFARIAN = 11583, NPC_LORD_NEFARIAN = 10162, NPC_BLACKWING_TECHNICIAN = 13996, // Flees at Vael intro event + NPC_GRETHOK_CONTROLLER = 12557, + NPC_BLACKWING_ORB_TRIGGER = 14449, + NPC_MONSTER_GENERATOR = 12434, GO_DOOR_RAZORGORE_ENTER = 176964, GO_DOOR_RAZORGORE_EXIT = 176965, @@ -37,6 +40,8 @@ enum GO_DOOR_CHROMAGGUS_EXIT = 179117, GO_DOOR_VAELASTRASZ = 179364, GO_DOOR_LASHLAYER = 179365, + GO_ORB_OF_DOMINATION = 177808, // trigger 19832 on Razorgore + GO_BLACK_DRAGON_EGG = 177807, }; // Coords used to spawn Nefarius at the throne @@ -53,6 +58,7 @@ class MANGOS_DLL_DECL instance_blackwing_lair : public ScriptedInstance void OnCreatureCreate(Creature* pCreature); void OnObjectCreate(GameObject* pGo); + void OnCreatureDeath(Creature* pCreature); void SetData(uint32 uiType, uint32 uiData); uint32 GetData(uint32 uiType); @@ -65,6 +71,8 @@ class MANGOS_DLL_DECL instance_blackwing_lair : public ScriptedInstance uint32 m_auiEncounter[MAX_ENCOUNTER]; GUIDList m_lTechnicianGuids; + GUIDList m_lGeneratorGuids; + GUIDList m_lDragonEggGuids; }; #endif diff --git a/scripts/eastern_kingdoms/blackwing_lair/boss_razorgore.cpp b/scripts/eastern_kingdoms/blackwing_lair/boss_razorgore.cpp index 986433fcc..58862b24b 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/boss_razorgore.cpp +++ b/scripts/eastern_kingdoms/blackwing_lair/boss_razorgore.cpp @@ -24,7 +24,6 @@ EndScriptData */ #include "precompiled.h" #include "blackwing_lair.h" -// Razorgore Phase 2 Script enum { SAY_EGGS_BROKEN_1 = -1469022, @@ -34,22 +33,32 @@ enum EMOTE_TROOPS_FLEE = -1469033, // emote by Nefarian's Troops npc + // phase I event spells + SPELL_POSSESS = 23014, // visual effect and increase the damage taken + SPELL_EXPLODE_ORB = 20037, // used if attacked without destroying the eggs - related to 20038 + SPELL_CLEAVE = 19632, SPELL_WARSTOMP = 24375, SPELL_FIREBALL_VOLLEY = 22425, SPELL_CONFLAGRATION = 23023, + + // npcs used in phase I + NPC_BLACKWING_LEGIONNAIRE = 12416, + NPC_BLACKWING_MAGE = 12420, + NPC_DRAGONSPAWN = 12422, }; struct MANGOS_DLL_DECL boss_razorgoreAI : public ScriptedAI { boss_razorgoreAI(Creature* pCreature) : ScriptedAI(pCreature) { - m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_pInstance = (instance_blackwing_lair*)pCreature->GetInstanceData(); Reset(); } - ScriptedInstance* m_pInstance; + instance_blackwing_lair* m_pInstance; + uint32 m_uiIntroVisualTimer; uint32 m_uiCleaveTimer; uint32 m_uiWarStompTimer; uint32 m_uiFireballVolleyTimer; @@ -57,11 +66,12 @@ struct MANGOS_DLL_DECL boss_razorgoreAI : public ScriptedAI void Reset() { + m_uiIntroVisualTimer = 5000; + m_uiCleaveTimer = 15000; // These times are probably wrong m_uiWarStompTimer = 35000; m_uiConflagrationTimer = 12000; m_uiFireballVolleyTimer = 7000; - } void Aggro(Unit* pWho) @@ -87,6 +97,19 @@ struct MANGOS_DLL_DECL boss_razorgoreAI : public ScriptedAI void UpdateAI(const uint32 uiDiff) { + // Set visual on OOC timer + if (m_uiIntroVisualTimer) + { + if (m_uiIntroVisualTimer <= uiDiff) + { + if (Creature* pOrbTrigger = m_pInstance->GetSingleCreatureFromStorage(NPC_BLACKWING_ORB_TRIGGER)) + pOrbTrigger->CastSpell(m_creature, SPELL_POSSESS, false); + m_uiIntroVisualTimer = 0; + } + else + m_uiIntroVisualTimer -= uiDiff; + } + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/eastern_kingdoms/blackwing_lair/instance_blackwing_lair.cpp b/scripts/eastern_kingdoms/blackwing_lair/instance_blackwing_lair.cpp index 3a1889aa8..641b9717b 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/instance_blackwing_lair.cpp +++ b/scripts/eastern_kingdoms/blackwing_lair/instance_blackwing_lair.cpp @@ -53,8 +53,12 @@ void instance_blackwing_lair::OnCreatureCreate(Creature* pCreature) if (pCreature->IsWithinDist2d(aNefariusSpawnLoc[0], aNefariusSpawnLoc[1], 50.0f)) m_lTechnicianGuids.push_back(pCreature->GetObjectGuid()); break; + case NPC_MONSTER_GENERATOR: + m_lGeneratorGuids.push_back(pCreature->GetObjectGuid()); + break; + case NPC_BLACKWING_ORB_TRIGGER: case NPC_VAELASTRASZ: - m_mNpcEntryGuidStore[NPC_VAELASTRASZ] = pCreature->GetObjectGuid(); + m_mNpcEntryGuidStore[pCreature->GetEntry()] = pCreature->GetObjectGuid(); break; } } @@ -64,6 +68,7 @@ void instance_blackwing_lair::OnObjectCreate(GameObject* pGo) switch(pGo->GetEntry()) { case GO_DOOR_RAZORGORE_ENTER: + case GO_ORB_OF_DOMINATION: break; case GO_DOOR_RAZORGORE_EXIT: if (m_auiEncounter[TYPE_RAZORGORE] == DONE) @@ -85,6 +90,9 @@ void instance_blackwing_lair::OnObjectCreate(GameObject* pGo) if (m_auiEncounter[TYPE_LASHLAYER] == DONE) pGo->SetGoState(GO_STATE_ACTIVE); break; + case GO_BLACK_DRAGON_EGG: + m_lDragonEggGuids.push_back(pGo->GetObjectGuid()); + return; default: return; @@ -101,6 +109,14 @@ void instance_blackwing_lair::SetData(uint32 uiType, uint32 uiData) DoUseDoorOrButton(GO_DOOR_RAZORGORE_ENTER); if (uiData == DONE) DoUseDoorOrButton(GO_DOOR_RAZORGORE_EXIT); + else if (uiData == FAIL) + { + // Reset the Orb of Domination and the eggs + if (GameObject* pOrb = GetSingleGameObjectFromStorage(GO_ORB_OF_DOMINATION)) + pOrb->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NO_INTERACT); + + // ToDo: reset the Dragon Eggs + } break; case TYPE_VAELASTRASZ: m_auiEncounter[uiType] = uiData; @@ -179,6 +195,18 @@ uint32 instance_blackwing_lair::GetData(uint32 uiType) return 0; } +void instance_blackwing_lair::OnCreatureDeath(Creature* pCreature) +{ + if (pCreature->GetEntry() == NPC_GRETHOK_CONTROLLER) + { + if (GameObject* pOrb = GetSingleGameObjectFromStorage(GO_ORB_OF_DOMINATION)) + pOrb->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NO_INTERACT); + + if (Creature* pOrbTrigger = GetSingleCreatureFromStorage(NPC_BLACKWING_ORB_TRIGGER)) + pOrbTrigger->InterruptNonMeleeSpells(false); + } +} + InstanceData* GetInstanceData_instance_blackwing_lair(Map* pMap) { return new instance_blackwing_lair(pMap); diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index a9fa9e260..c0441682e 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2505" + #define SD2_REVISION_NR "2506" #endif // __SD2_REVISION_NR_H__ From 77512dcedef79d2736b6e4bfe18e7bcdcc1e20f1 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Wed, 11 Apr 2012 14:33:09 +0200 Subject: [PATCH 0495/1172] [2507] Cleanup scripts for Dark Portal instance --- .../dark_portal/boss_aeonus.cpp | 93 +++++++------ .../dark_portal/boss_chrono_lord_deja.cpp | 125 ++++++++++-------- .../dark_portal/boss_temporus.cpp | 120 +++++++++-------- .../caverns_of_time/dark_portal/dark_portal.h | 1 + sd2_revision_nr.h | 2 +- 5 files changed, 191 insertions(+), 150 deletions(-) diff --git a/scripts/kalimdor/caverns_of_time/dark_portal/boss_aeonus.cpp b/scripts/kalimdor/caverns_of_time/dark_portal/boss_aeonus.cpp index 2344df28a..1672289ea 100644 --- a/scripts/kalimdor/caverns_of_time/dark_portal/boss_aeonus.cpp +++ b/scripts/kalimdor/caverns_of_time/dark_portal/boss_aeonus.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: Boss_Aeonus -SD%Complete: 80 -SDComment: Some spells not implemented +SD%Complete: 90 +SDComment: Small adjustments; Timers SDCategory: Caverns of Time, The Dark Portal EndScriptData */ @@ -53,77 +53,96 @@ struct MANGOS_DLL_DECL boss_aeonusAI : public ScriptedAI ScriptedInstance* m_pInstance; bool m_bIsRegularMode; - uint32 SandBreath_Timer; - uint32 TimeStop_Timer; - uint32 Frenzy_Timer; + uint32 m_uiSandBreathTimer; + uint32 m_uiTimeStopTimer; + uint32 m_uiFrenzyTimer; + uint32 m_uiCleaveTimer; void Reset() { - SandBreath_Timer = urand(15000, 30000); - TimeStop_Timer = urand(10000, 15000); - Frenzy_Timer = urand(30000, 45000); + m_uiSandBreathTimer = urand(15000, 30000); + m_uiTimeStopTimer = urand(10000, 15000); + m_uiFrenzyTimer = urand(30000, 45000); + m_uiCleaveTimer = urand(5000, 9000); } - void Aggro(Unit *who) + void Aggro(Unit* pWho) { DoScriptText(SAY_AGGRO, m_creature); } - void MoveInLineOfSight(Unit *who) + void MoveInLineOfSight(Unit* pWho) { - //Despawn Time Keeper - if (who->GetTypeId() == TYPEID_UNIT && who->GetEntry() == NPC_TIME_KEEPER) + // Despawn Time Keeper + if (pWho->GetTypeId() == TYPEID_UNIT && pWho->GetEntry() == NPC_TIME_KEEPER) { - if (m_creature->IsWithinDistInMap(who,20.0f)) + if (m_creature->IsWithinDistInMap(pWho, 20.0f)) { - DoScriptText(SAY_BANISH, m_creature); - m_creature->DealDamage(who, who->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + if (DoCastSpellIfCan(pWho, SPELL_BANISH_HELPER) == CAST_OK) + DoScriptText(SAY_BANISH, m_creature); } } - ScriptedAI::MoveInLineOfSight(who); + ScriptedAI::MoveInLineOfSight(pWho); } - void JustDied(Unit *victim) + void JustDied(Unit* pKiller) { DoScriptText(SAY_DEATH, m_creature); if (m_pInstance) - m_pInstance->SetData(TYPE_RIFT,DONE); + m_pInstance->SetData(TYPE_RIFT, DONE); } - void KilledUnit(Unit *victim) + void KilledUnit(Unit* pVictim) { DoScriptText(urand(0, 1) ? SAY_SLAY1 : SAY_SLAY2, m_creature); } - void UpdateAI(const uint32 diff) + void UpdateAI(const uint32 uiDiff) { - //Return since we have no target + // Return since we have no target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - //Sand Breath - if (SandBreath_Timer < diff) + // Sand Breath + if (m_uiSandBreathTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), m_bIsRegularMode ? SPELL_SAND_BREATH : SPELL_SAND_BREATH_H); - SandBreath_Timer = urand(15000, 25000); - }else SandBreath_Timer -= diff; + if (DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_SAND_BREATH : SPELL_SAND_BREATH_H) == CAST_OK) + m_uiSandBreathTimer = urand(15000, 25000); + } + else + m_uiSandBreathTimer -= uiDiff; + + // Time Stop + if (m_uiTimeStopTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_TIME_STOP) == CAST_OK) + m_uiTimeStopTimer = urand(20000, 35000); + } + else + m_uiTimeStopTimer -= uiDiff; - //Time Stop - if (TimeStop_Timer < diff) + // Cleave + if (m_uiCleaveTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_TIME_STOP); - TimeStop_Timer = urand(20000, 35000); - }else TimeStop_Timer -= diff; + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_CLEAVE) == CAST_OK) + m_uiCleaveTimer = urand(7000, 12000); + } + else + m_uiCleaveTimer -= uiDiff; - //Frenzy - if (Frenzy_Timer < diff) + // Frenzy + if (m_uiFrenzyTimer < uiDiff) { - DoScriptText(EMOTE_GENERIC_FRENZY, m_creature); - DoCastSpellIfCan(m_creature, SPELL_ENRAGE); - Frenzy_Timer = urand(20000, 35000); - }else Frenzy_Timer -= diff; + if (DoCastSpellIfCan(m_creature, SPELL_ENRAGE) == CAST_OK) + { + DoScriptText(EMOTE_GENERIC_FRENZY, m_creature); + m_uiFrenzyTimer = urand(20000, 35000); + } + } + else + m_uiFrenzyTimer -= uiDiff; DoMeleeAttackIfReady(); } diff --git a/scripts/kalimdor/caverns_of_time/dark_portal/boss_chrono_lord_deja.cpp b/scripts/kalimdor/caverns_of_time/dark_portal/boss_chrono_lord_deja.cpp index 7e0248a95..7014e9d69 100644 --- a/scripts/kalimdor/caverns_of_time/dark_portal/boss_chrono_lord_deja.cpp +++ b/scripts/kalimdor/caverns_of_time/dark_portal/boss_chrono_lord_deja.cpp @@ -16,27 +16,30 @@ /* ScriptData SDName: Boss_Chrono_Lord_Deja -SD%Complete: 65 -SDComment: All abilities not implemented +SD%Complete: 90 +SDComment: Small adjustments; Timers SDCategory: Caverns of Time, The Dark Portal EndScriptData */ #include "precompiled.h" #include "dark_portal.h" -#define SAY_ENTER -1269006 -#define SAY_AGGRO -1269007 -#define SAY_BANISH -1269008 -#define SAY_SLAY1 -1269009 -#define SAY_SLAY2 -1269010 -#define SAY_DEATH -1269011 - -#define SPELL_ARCANE_BLAST 31457 -#define SPELL_ARCANE_BLAST_H 38538 -#define SPELL_ARCANE_DISCHARGE 31472 -#define SPELL_ARCANE_DISCHARGE_H 38539 -#define SPELL_TIME_LAPSE 31467 -#define SPELL_ATTRACTION 38540 //Not Implemented (Heroic mode) +enum +{ + SAY_ENTER = -1269006, + SAY_AGGRO = -1269007, + SAY_BANISH = -1269008, + SAY_SLAY1 = -1269009, + SAY_SLAY2 = -1269010, + SAY_DEATH = -1269011, + + SPELL_ARCANE_BLAST = 31457, + SPELL_ARCANE_BLAST_H = 38538, + SPELL_ARCANE_DISCHARGE = 31472, + SPELL_ARCANE_DISCHARGE_H = 38539, + SPELL_TIME_LAPSE = 31467, + SPELL_ATTRACTION = 38540 +}; struct MANGOS_DLL_DECL boss_chrono_lord_dejaAI : public ScriptedAI { @@ -50,89 +53,95 @@ struct MANGOS_DLL_DECL boss_chrono_lord_dejaAI : public ScriptedAI ScriptedInstance* m_pInstance; bool m_bIsRegularMode; - uint32 ArcaneBlast_Timer; - uint32 TimeLapse_Timer; - uint32 Attraction_Timer; - uint32 ArcaneDischarge_Timer; + uint32 m_uiArcaneBlastTimer; + uint32 m_uiTimeLapseTimer; + uint32 m_uiAttractionTimer; + uint32 m_uiArcaneDischargeTimer; void Reset() { - ArcaneBlast_Timer = urand(18000, 23000); - TimeLapse_Timer = urand(10000, 15000); - ArcaneDischarge_Timer = urand(20000, 30000); - Attraction_Timer = urand(25000, 35000); + m_uiArcaneBlastTimer = urand(18000, 23000); + m_uiTimeLapseTimer = urand(10000, 15000); + m_uiArcaneDischargeTimer = urand(20000, 30000); + m_uiAttractionTimer = urand(25000, 35000); } - void Aggro(Unit *who) + void Aggro(Unit* pWho) { DoScriptText(SAY_AGGRO, m_creature); } - void MoveInLineOfSight(Unit *who) + void MoveInLineOfSight(Unit* pWho) { - //Despawn Time Keeper - if (who->GetTypeId() == TYPEID_UNIT && who->GetEntry() == NPC_TIME_KEEPER) + // Despawn Time Keeper + if (pWho->GetTypeId() == TYPEID_UNIT && pWho->GetEntry() == NPC_TIME_KEEPER) { - if (m_creature->IsWithinDistInMap(who,20.0f)) + if (m_creature->IsWithinDistInMap(pWho, 20.0f)) { - DoScriptText(SAY_BANISH, m_creature); - m_creature->DealDamage(who, who->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + if (DoCastSpellIfCan(pWho, SPELL_BANISH_HELPER) == CAST_OK) + DoScriptText(SAY_BANISH, m_creature); } } - ScriptedAI::MoveInLineOfSight(who); + ScriptedAI::MoveInLineOfSight(pWho); } - void KilledUnit(Unit *victim) + void KilledUnit(Unit* pVictim) { DoScriptText(urand(0, 1) ? SAY_SLAY1 : SAY_SLAY2, m_creature); } - void JustDied(Unit *victim) + void JustDied(Unit* pVictim) { DoScriptText(SAY_DEATH, m_creature); if (m_pInstance) - m_pInstance->SetData(TYPE_RIFT,SPECIAL); + m_pInstance->SetData(TYPE_RIFT, SPECIAL); } - void UpdateAI(const uint32 diff) + void UpdateAI(const uint32 uiDiff) { - //Return since we have no target + // Return since we have no target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - //Arcane Blast - if (ArcaneBlast_Timer < diff) + // Arcane Blast + if (m_uiArcaneBlastTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), m_bIsRegularMode ? SPELL_ARCANE_BLAST : SPELL_ARCANE_BLAST_H); - ArcaneBlast_Timer = urand(15000, 25000); - }else ArcaneBlast_Timer -= diff; + if (DoCastSpellIfCan(m_creature->getVictim(), m_bIsRegularMode ? SPELL_ARCANE_BLAST : SPELL_ARCANE_BLAST_H) == CAST_OK) + m_uiArcaneBlastTimer = urand(15000, 25000); + } + else + m_uiArcaneBlastTimer -= uiDiff; - //Arcane Discharge - if (ArcaneDischarge_Timer < diff) + // Arcane Discharge + if (m_uiArcaneDischargeTimer < uiDiff) { - if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) - DoCastSpellIfCan(target, m_bIsRegularMode ? SPELL_ARCANE_DISCHARGE : SPELL_ARCANE_DISCHARGE_H); - - ArcaneDischarge_Timer = urand(20000, 30000); - }else ArcaneDischarge_Timer -= diff; + if (DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_ARCANE_DISCHARGE : SPELL_ARCANE_DISCHARGE_H) == CAST_OK) + m_uiArcaneDischargeTimer = urand(20000, 30000); + } + else + m_uiArcaneDischargeTimer -= uiDiff; - //Time Lapse - if (TimeLapse_Timer < diff) + // Time Lapse + if (m_uiTimeLapseTimer < uiDiff) { - DoScriptText(SAY_BANISH, m_creature); - DoCastSpellIfCan(m_creature, SPELL_TIME_LAPSE); - TimeLapse_Timer = urand(15000, 25000); - }else TimeLapse_Timer -= diff; + if (DoCastSpellIfCan(m_creature, SPELL_TIME_LAPSE) == CAST_OK) + m_uiTimeLapseTimer = urand(15000, 25000); + } + else + m_uiTimeLapseTimer -= uiDiff; + // Attraction if (!m_bIsRegularMode) { - if (Attraction_Timer < diff) + if (m_uiAttractionTimer < uiDiff) { - DoCastSpellIfCan(m_creature,SPELL_ATTRACTION); - Attraction_Timer = urand(25000, 35000); - }else Attraction_Timer -= diff; + if (DoCastSpellIfCan(m_creature, SPELL_ATTRACTION) == CAST_OK) + m_uiAttractionTimer = urand(25000, 35000); + } + else + m_uiAttractionTimer -= uiDiff; } DoMeleeAttackIfReady(); diff --git a/scripts/kalimdor/caverns_of_time/dark_portal/boss_temporus.cpp b/scripts/kalimdor/caverns_of_time/dark_portal/boss_temporus.cpp index 84927d622..2ee135973 100644 --- a/scripts/kalimdor/caverns_of_time/dark_portal/boss_temporus.cpp +++ b/scripts/kalimdor/caverns_of_time/dark_portal/boss_temporus.cpp @@ -16,26 +16,29 @@ /* ScriptData SDName: Boss_Temporus -SD%Complete: 75 -SDComment: More abilities need to be implemented +SD%Complete: 90 +SDComment: Small adjustments; Timers SDCategory: Caverns of Time, The Dark Portal EndScriptData */ #include "precompiled.h" #include "dark_portal.h" -#define SAY_ENTER -1269000 -#define SAY_AGGRO -1269001 -#define SAY_BANISH -1269002 -#define SAY_SLAY1 -1269003 -#define SAY_SLAY2 -1269004 -#define SAY_DEATH -1269005 - -#define SPELL_HASTE 31458 -#define SPELL_MORTAL_WOUND 31464 -#define SPELL_WING_BUFFET 31475 -#define SPELL_WING_BUFFET_H 38593 -#define SPELL_REFLECT 38592 //Not Implemented (Heroic mod) +enum +{ + SAY_ENTER = -1269000, + SAY_AGGRO = -1269001, + SAY_BANISH = -1269002, + SAY_SLAY1 = -1269003, + SAY_SLAY2 = -1269004, + SAY_DEATH = -1269005, + + SPELL_HASTE = 31458, + SPELL_MORTAL_WOUND = 31464, + SPELL_WING_BUFFET = 31475, + SPELL_WING_BUFFET_H = 38593, + SPELL_REFLECT = 38592 +}; struct MANGOS_DLL_DECL boss_temporusAI : public ScriptedAI { @@ -49,86 +52,95 @@ struct MANGOS_DLL_DECL boss_temporusAI : public ScriptedAI ScriptedInstance* m_pInstance; bool m_bIsRegularMode; - uint32 Haste_Timer; - uint32 SpellReflection_Timer; - uint32 MortalWound_Timer; - uint32 WingBuffet_Timer; + uint32 m_uiHasteTimer; + uint32 m_uiSpellReflectionTimer; + uint32 m_uiMortalWoundTimer; + uint32 m_uiWingBuffetTimer; void Reset() { - Haste_Timer = urand(15000, 23000); - SpellReflection_Timer = 30000; - MortalWound_Timer = 8000; - WingBuffet_Timer = urand(25000, 35000); + m_uiHasteTimer = urand(15000, 23000); + m_uiSpellReflectionTimer = 30000; + m_uiMortalWoundTimer = 8000; + m_uiWingBuffetTimer = urand(25000, 35000); } - void Aggro(Unit *who) + void Aggro(Unit* pWho) { DoScriptText(SAY_AGGRO, m_creature); } - void KilledUnit(Unit *victim) + void KilledUnit(Unit* pVictim) { DoScriptText(urand(0, 1) ? SAY_SLAY1 : SAY_SLAY2, m_creature); } - void JustDied(Unit *victim) + void JustDied(Unit* pKiller) { DoScriptText(SAY_DEATH, m_creature); if (m_pInstance) - m_pInstance->SetData(TYPE_RIFT,SPECIAL); + m_pInstance->SetData(TYPE_RIFT, SPECIAL); } - void MoveInLineOfSight(Unit *who) + void MoveInLineOfSight(Unit* pWho) { - //Despawn Time Keeper - if (who->GetTypeId() == TYPEID_UNIT && who->GetEntry() == NPC_TIME_KEEPER) + // Despawn Time Keeper + if (pWho->GetTypeId() == TYPEID_UNIT && pWho->GetEntry() == NPC_TIME_KEEPER) { - if (m_creature->IsWithinDistInMap(who,20.0f)) + if (m_creature->IsWithinDistInMap(pWho,20.0f)) { - DoScriptText(SAY_BANISH, m_creature); - m_creature->DealDamage(who, who->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + if (DoCastSpellIfCan(pWho, SPELL_BANISH_HELPER) == CAST_OK) + DoScriptText(SAY_BANISH, m_creature); } } - ScriptedAI::MoveInLineOfSight(who); + ScriptedAI::MoveInLineOfSight(pWho); } - void UpdateAI(const uint32 diff) + void UpdateAI(const uint32 uiDiff) { - //Return since we have no target + // Return since we have no target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - //Attack Haste - if (Haste_Timer < diff) + // Attack Haste + if (m_uiHasteTimer < uiDiff) { - DoCastSpellIfCan(m_creature, SPELL_HASTE); - Haste_Timer = urand(20000, 25000); - }else Haste_Timer -= diff; + if (DoCastSpellIfCan(m_creature, SPELL_HASTE) == CAST_OK) + m_uiHasteTimer = urand(20000, 25000); + } + else + m_uiHasteTimer -= uiDiff; - //MortalWound_Timer - if (MortalWound_Timer < diff) + // MortalWound_Timer + if (m_uiMortalWoundTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_MORTAL_WOUND); - MortalWound_Timer = urand(10000, 20000); - }else MortalWound_Timer -= diff; + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_MORTAL_WOUND) == CAST_OK) + m_uiMortalWoundTimer = urand(10000, 20000); + } + else + m_uiMortalWoundTimer -= uiDiff; - //Wing ruffet - if (WingBuffet_Timer < diff) + // Wing ruffet + if (m_uiWingBuffetTimer < uiDiff) { - DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_WING_BUFFET : SPELL_WING_BUFFET_H); - WingBuffet_Timer = urand(20000, 30000); - }else WingBuffet_Timer -= diff; + if (DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_WING_BUFFET : SPELL_WING_BUFFET_H) == CAST_OK) + m_uiWingBuffetTimer = urand(20000, 30000); + } + else + m_uiWingBuffetTimer -= uiDiff; + // Spell reflection if (!m_bIsRegularMode) { - if (SpellReflection_Timer < diff) + if (m_uiSpellReflectionTimer < uiDiff) { - DoCastSpellIfCan(m_creature, SPELL_REFLECT); - SpellReflection_Timer = urand(25000, 35000); - }else SpellReflection_Timer -= diff; + if (DoCastSpellIfCan(m_creature, SPELL_REFLECT) == CAST_OK) + m_uiSpellReflectionTimer = urand(25000, 35000); + } + else + m_uiSpellReflectionTimer -= uiDiff; } DoMeleeAttackIfReady(); diff --git a/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.h b/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.h index afcddd3f0..7c29fdb97 100644 --- a/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.h +++ b/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.h @@ -37,6 +37,7 @@ enum NPC_TIME_RIFT = 17838, SPELL_RIFT_CHANNEL = 31387, + SPELL_BANISH_HELPER = 31550, RIFT_BOSS = 1 }; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index c0441682e..30c4b1ea3 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2506" + #define SD2_REVISION_NR "2507" #endif // __SD2_REVISION_NR_H__ From c39fb0c55b9f563a6fbf971bc84132efbf77e6d6 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Thu, 12 Apr 2012 21:49:15 +0300 Subject: [PATCH 0496/1172] [2508] Remove combat door for Chromaggus - this is not used --- scripts/eastern_kingdoms/blackwing_lair/blackwing_lair.h | 4 ++-- .../blackwing_lair/instance_blackwing_lair.cpp | 6 +----- sd2_revision_nr.h | 2 +- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/scripts/eastern_kingdoms/blackwing_lair/blackwing_lair.h b/scripts/eastern_kingdoms/blackwing_lair/blackwing_lair.h index ec1e26d72..da6e46dbd 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/blackwing_lair.h +++ b/scripts/eastern_kingdoms/blackwing_lair/blackwing_lair.h @@ -35,8 +35,8 @@ enum GO_DOOR_RAZORGORE_ENTER = 176964, GO_DOOR_RAZORGORE_EXIT = 176965, GO_DOOR_NEFARIAN = 176966, - GO_DOOR_CHROMAGGUS_ENTER = 179115, - GO_DOOR_CHROMAGGUS_SIDE = 179116, + //GO_DOOR_CHROMAGGUS_ENTER = 179115, + //GO_DOOR_CHROMAGGUS_SIDE = 179116, GO_DOOR_CHROMAGGUS_EXIT = 179117, GO_DOOR_VAELASTRASZ = 179364, GO_DOOR_LASHLAYER = 179365, diff --git a/scripts/eastern_kingdoms/blackwing_lair/instance_blackwing_lair.cpp b/scripts/eastern_kingdoms/blackwing_lair/instance_blackwing_lair.cpp index 641b9717b..20b0e20ea 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/instance_blackwing_lair.cpp +++ b/scripts/eastern_kingdoms/blackwing_lair/instance_blackwing_lair.cpp @@ -69,15 +69,12 @@ void instance_blackwing_lair::OnObjectCreate(GameObject* pGo) { case GO_DOOR_RAZORGORE_ENTER: case GO_ORB_OF_DOMINATION: + case GO_DOOR_NEFARIAN: break; case GO_DOOR_RAZORGORE_EXIT: if (m_auiEncounter[TYPE_RAZORGORE] == DONE) pGo->SetGoState(GO_STATE_ACTIVE); break; - case GO_DOOR_NEFARIAN: - case GO_DOOR_CHROMAGGUS_ENTER: - case GO_DOOR_CHROMAGGUS_SIDE: - break; case GO_DOOR_CHROMAGGUS_EXIT: if (m_auiEncounter[TYPE_CHROMAGGUS] == DONE) pGo->SetGoState(GO_STATE_ACTIVE); @@ -138,7 +135,6 @@ void instance_blackwing_lair::SetData(uint32 uiType, uint32 uiData) break; case TYPE_CHROMAGGUS: m_auiEncounter[uiType] = uiData; - DoUseDoorOrButton(GO_DOOR_CHROMAGGUS_ENTER); if (uiData == DONE) DoUseDoorOrButton(GO_DOOR_CHROMAGGUS_EXIT); break; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 30c4b1ea3..1ba362180 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2507" + #define SD2_REVISION_NR "2508" #endif // __SD2_REVISION_NR_H__ From c2b1630db0dc50bff23c0b1b1bf756dd799fedb6 Mon Sep 17 00:00:00 2001 From: NeatElves Date: Thu, 12 Apr 2012 21:59:59 +0300 Subject: [PATCH 0497/1172] [2509] Remove script for npc 2708. Will be handled by DB Signed-off-by: Xfurry --- scripts/eastern_kingdoms/stormwind_city.cpp | 39 +-------------------- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 - sql/updates/r2509_mangos.sql | 1 + 4 files changed, 3 insertions(+), 40 deletions(-) create mode 100644 sql/updates/r2509_mangos.sql diff --git a/scripts/eastern_kingdoms/stormwind_city.cpp b/scripts/eastern_kingdoms/stormwind_city.cpp index 9fb6a47e1..02f9407bf 100644 --- a/scripts/eastern_kingdoms/stormwind_city.cpp +++ b/scripts/eastern_kingdoms/stormwind_city.cpp @@ -17,12 +17,11 @@ /* ScriptData SDName: Stormwind_City SD%Complete: 100 -SDComment: Quest support: 1640, 1447, 4185, 11223 (DB support required for spell 42711) +SDComment: Quest support: 1640, 1447, 4185 SDCategory: Stormwind City EndScriptData */ /* ContentData -npc_archmage_malin npc_bartleby npc_dashel_stonefist npc_lady_katrana_prestor @@ -30,36 +29,6 @@ EndContentData */ #include "precompiled.h" -/*###### -## npc_archmage_malin -######*/ - -#define GOSSIP_ITEM_MALIN "Can you send me to Theramore? I have an urgent message for Lady Jaina from Highlord Bolvar." - -bool GossipHello_npc_archmage_malin(Player* pPlayer, Creature* pCreature) -{ - if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); - - if (pPlayer->GetQuestStatus(11223) == QUEST_STATUS_COMPLETE && !pPlayer->GetQuestRewardStatus(11223)) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_MALIN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF); - - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); - - return true; -} - -bool GossipSelect_npc_archmage_malin(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) -{ - if (uiAction == GOSSIP_ACTION_INFO_DEF) - { - pPlayer->CLOSE_GOSSIP_MENU(); - pCreature->CastSpell(pPlayer, 42711, true); - } - - return true; -} - /*###### ## npc_bartleby ######*/ @@ -242,12 +211,6 @@ void AddSC_stormwind_city() { Script* pNewScript; - pNewScript = new Script; - pNewScript->Name = "npc_archmage_malin"; - pNewScript->pGossipHello = &GossipHello_npc_archmage_malin; - pNewScript->pGossipSelect = &GossipSelect_npc_archmage_malin; - pNewScript->RegisterSelf(); - pNewScript = new Script; pNewScript->Name = "npc_bartleby"; pNewScript->GetAI = &GetAI_npc_bartleby; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 1ba362180..78f7ca172 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2508" + #define SD2_REVISION_NR "2509" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 53cfd9bf2..a466eb47a 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -1017,7 +1017,6 @@ UPDATE creature_template SET ScriptName='npc_kaya' WHERE entry=11856; /* STORM PEAKS */ /* STORMWIND CITY */ -UPDATE creature_template SET ScriptName='npc_archmage_malin' WHERE entry=2708; UPDATE creature_template SET ScriptName='npc_bartleby' WHERE entry=6090; UPDATE creature_template SET ScriptName='npc_dashel_stonefist' WHERE entry=4961; UPDATE creature_template SET ScriptName='npc_lady_katrana_prestor' WHERE entry=1749; diff --git a/sql/updates/r2509_mangos.sql b/sql/updates/r2509_mangos.sql new file mode 100644 index 000000000..7a6b3b86b --- /dev/null +++ b/sql/updates/r2509_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='' WHERE entry=2708; From 467b9f22b240222db713a842c8c4f6a31b06cb23 Mon Sep 17 00:00:00 2001 From: NeatElves Date: Thu, 12 Apr 2012 22:06:21 +0300 Subject: [PATCH 0498/1172] [2510] Remove script for npc 4488. Will be handled by DB Signed-off-by: Xfurry --- scripts/eastern_kingdoms/undercity.cpp | 54 ++------------------------ sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 - sql/updates/r2510_mangos.sql | 1 + 4 files changed, 5 insertions(+), 53 deletions(-) create mode 100644 sql/updates/r2510_mangos.sql diff --git a/scripts/eastern_kingdoms/undercity.cpp b/scripts/eastern_kingdoms/undercity.cpp index 4ff177886..e34f1051d 100644 --- a/scripts/eastern_kingdoms/undercity.cpp +++ b/scripts/eastern_kingdoms/undercity.cpp @@ -17,14 +17,13 @@ /* ScriptData SDName: Undercity SD%Complete: 95 -SDComment: Quest support: 6628(Parqual Fintallas questions/'answers' might have more to it, need more info), 9180(post-event). +SDComment: Quest support: 9180(post-event). SDCategory: Undercity EndScriptData */ /* ContentData npc_lady_sylvanas_windrunner npc_highborne_lamenter -npc_parqual_fintallas EndContentData */ #include "precompiled.h" @@ -120,6 +119,7 @@ struct MANGOS_DLL_DECL npc_lady_sylvanas_windrunnerAI : public ScriptedAI DoMeleeAttackIfReady(); } }; + CreatureAI* GetAI_npc_lady_sylvanas_windrunner(Creature* pCreature) { return new npc_lady_sylvanas_windrunnerAI(pCreature); @@ -186,54 +186,12 @@ struct MANGOS_DLL_DECL npc_highborne_lamenterAI : public ScriptedAI } } }; + CreatureAI* GetAI_npc_highborne_lamenter(Creature* pCreature) { return new npc_highborne_lamenterAI(pCreature); } -/*###### -## npc_parqual_fintallas -######*/ - -#define SPELL_MARK_OF_SHAME 6767 - -bool GossipHello_npc_parqual_fintallas(Player* pPlayer, Creature* pCreature) -{ - if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); - - if (pPlayer->GetQuestStatus(6628) == QUEST_STATUS_INCOMPLETE && !pPlayer->HasAura(SPELL_MARK_OF_SHAME, EFFECT_INDEX_0)) - { - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Gul'dan", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Kel'Thuzad", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Ner'zhul", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); - pPlayer->SEND_GOSSIP_MENU(5822, pCreature->GetObjectGuid()); - } - else - pPlayer->SEND_GOSSIP_MENU(5821, pCreature->GetObjectGuid()); - - return true; -} - -bool GossipSelect_npc_parqual_fintallas(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) -{ - if (uiAction == GOSSIP_ACTION_INFO_DEF+1) - { - pPlayer->CLOSE_GOSSIP_MENU(); - pCreature->CastSpell(pPlayer,SPELL_MARK_OF_SHAME,false); - } - if (uiAction == GOSSIP_ACTION_INFO_DEF+2) - { - pPlayer->CLOSE_GOSSIP_MENU(); - pPlayer->AreaExploredOrEventHappens(6628); - } - return true; -} - -/*###### -## AddSC -######*/ - void AddSC_undercity() { Script* pNewScript; @@ -248,10 +206,4 @@ void AddSC_undercity() pNewScript->Name = "npc_highborne_lamenter"; pNewScript->GetAI = &GetAI_npc_highborne_lamenter; pNewScript->RegisterSelf(); - - pNewScript = new Script; - pNewScript->Name = "npc_parqual_fintallas"; - pNewScript->pGossipHello = &GossipHello_npc_parqual_fintallas; - pNewScript->pGossipSelect = &GossipSelect_npc_parqual_fintallas; - pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 78f7ca172..64e69603e 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2509" + #define SD2_REVISION_NR "2510" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index a466eb47a..7c6e51509 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -1246,7 +1246,6 @@ UPDATE creature_template SET ScriptName='npc_ringo' WHERE entry=9999; /* UNDERCITY */ UPDATE creature_template SET ScriptName='npc_lady_sylvanas_windrunner' WHERE entry=10181; UPDATE creature_template SET ScriptName='npc_highborne_lamenter' WHERE entry=21628; -UPDATE creature_template SET ScriptName='npc_parqual_fintallas' WHERE entry=4488; /* */ /* UTGARDE KEEP */ diff --git a/sql/updates/r2510_mangos.sql b/sql/updates/r2510_mangos.sql new file mode 100644 index 000000000..a52002af0 --- /dev/null +++ b/sql/updates/r2510_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='' WHERE entry=4488; From d2f2e1bcd2a8988348fc80a3c366c174c1c81268 Mon Sep 17 00:00:00 2001 From: NeatElves Date: Thu, 12 Apr 2012 22:12:28 +0300 Subject: [PATCH 0499/1172] [2511] Remove script for npcs 11056 and 11057. Will be handled by DB Signed-off-by: Xfurry --- .../eastern_kingdoms/western_plaguelands.cpp | 65 +------------------ sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 - sql/updates/r2511_mangos.sql | 1 + 4 files changed, 4 insertions(+), 65 deletions(-) create mode 100644 sql/updates/r2511_mangos.sql diff --git a/scripts/eastern_kingdoms/western_plaguelands.cpp b/scripts/eastern_kingdoms/western_plaguelands.cpp index f8589b794..7a70b3b26 100644 --- a/scripts/eastern_kingdoms/western_plaguelands.cpp +++ b/scripts/eastern_kingdoms/western_plaguelands.cpp @@ -17,73 +17,17 @@ /* ScriptData SDName: Western_Plaguelands SD%Complete: 90 -SDComment: Quest support: 5216,5219,5222,5225,5229,5231,5233,5235. To obtain Vitreous Focuser (could use more spesifics about gossip items) +SDComment: Quest support: 5216,5219,5222,5225,5229,5231,5233,5235. SDCategory: Western Plaguelands EndScriptData */ /* ContentData -npcs_dithers_and_arbington npc_myranda_hag npc_the_scourge_cauldron EndContentData */ #include "precompiled.h" -/*###### -## npcs_dithers_and_arbington -######*/ - -bool GossipHello_npcs_dithers_and_arbington(Player* pPlayer, Creature* pCreature) -{ - if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); - if (pCreature->isVendor()) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_VENDOR, GOSSIP_TEXT_BROWSE_GOODS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE); - - if (pPlayer->GetQuestRewardStatus(5237) || pPlayer->GetQuestRewardStatus(5238)) - { - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "What does the Felstone Field Cauldron need?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "What does the Dalson's Tears Cauldron need?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "What does the Writhing Haunt Cauldron need?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3); - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "What does the Gahrron's Withering Cauldron need?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+4); - pPlayer->SEND_GOSSIP_MENU(3985, pCreature->GetObjectGuid()); - }else - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); - - return true; -} - -bool GossipSelect_npcs_dithers_and_arbington(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) -{ - switch(uiAction) - { - case GOSSIP_ACTION_TRADE: - pPlayer->SEND_VENDORLIST(pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF+1: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Thanks, i need a Vitreous Focuser", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+5); - pPlayer->SEND_GOSSIP_MENU(3980, pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF+2: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Thanks, i need a Vitreous Focuser", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+5); - pPlayer->SEND_GOSSIP_MENU(3981, pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF+3: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Thanks, i need a Vitreous Focuser", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+5); - pPlayer->SEND_GOSSIP_MENU(3982, pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF+4: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Thanks, i need a Vitreous Focuser", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+5); - pPlayer->SEND_GOSSIP_MENU(3983, pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF+5: - pPlayer->CLOSE_GOSSIP_MENU(); - pCreature->CastSpell(pPlayer, 17529, false); - break; - } - return true; -} - /*###### ## npc_myranda_the_hag ######*/ @@ -190,6 +134,7 @@ struct MANGOS_DLL_DECL npc_the_scourge_cauldronAI : public ScriptedAI } } }; + CreatureAI* GetAI_npc_the_scourge_cauldron(Creature* pCreature) { return new npc_the_scourge_cauldronAI(pCreature); @@ -203,12 +148,6 @@ void AddSC_western_plaguelands() { Script* pNewScript; - pNewScript = new Script; - pNewScript->Name = "npcs_dithers_and_arbington"; - pNewScript->pGossipHello = &GossipHello_npcs_dithers_and_arbington; - pNewScript->pGossipSelect = &GossipSelect_npcs_dithers_and_arbington; - pNewScript->RegisterSelf(); - pNewScript = new Script; pNewScript->Name = "npc_myranda_the_hag"; pNewScript->pGossipHello = &GossipHello_npc_myranda_the_hag; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 64e69603e..75ea4615e 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2510" + #define SD2_REVISION_NR "2511" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 7c6e51509..cc405db6c 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -1289,7 +1289,6 @@ UPDATE instance_template SET ScriptName='instance_wailing_caverns' WHERE map=43; UPDATE creature_template SET ScriptName='npc_disciple_of_naralex' WHERE entry=3678; /* WESTERN PLAGUELANDS */ -UPDATE creature_template SET ScriptName='npcs_dithers_and_arbington' WHERE entry IN (11056,11057); UPDATE creature_template SET ScriptName='npc_myranda_the_hag' WHERE entry=11872; UPDATE creature_template SET ScriptName='npc_the_scourge_cauldron' WHERE entry=11152; diff --git a/sql/updates/r2511_mangos.sql b/sql/updates/r2511_mangos.sql new file mode 100644 index 000000000..03506fef7 --- /dev/null +++ b/sql/updates/r2511_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='' WHERE entry IN (11056,11057); From 264d605e10f2ad51ce96a06029e592dd3470ae48 Mon Sep 17 00:00:00 2001 From: NeatElves Date: Thu, 12 Apr 2012 22:17:58 +0300 Subject: [PATCH 0500/1172] [2512] Remove script for npc 20201. Will be handled by DB Signed-off-by: Xfurry --- .../dark_portal/dark_portal.cpp | 45 ------------------- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 - sql/updates/r2512_mangos.sql | 1 + 4 files changed, 2 insertions(+), 47 deletions(-) create mode 100644 sql/updates/r2512_mangos.sql diff --git a/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.cpp b/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.cpp index 1677639e7..5fc50ecbe 100644 --- a/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.cpp +++ b/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.cpp @@ -24,7 +24,6 @@ EndScriptData */ /* ContentData npc_medivh_bm npc_time_rift -npc_saat EndContentData */ #include "precompiled.h" @@ -356,44 +355,6 @@ CreatureAI* GetAI_npc_time_rift(Creature* pCreature) return new npc_time_riftAI(pCreature); } -#define SAY_SAAT_WELCOME -1269019 - -#define GOSSIP_ITEM_OBTAIN "[PH] Obtain Chrono-Beacon" -#define SPELL_CHRONO_BEACON 34975 -#define ITEM_CHRONO_BEACON 24289 - -bool GossipHello_npc_saat(Player* pPlayer, Creature* pCreature) -{ - if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); - - if (pPlayer->GetQuestStatus(QUEST_OPENING_PORTAL) == QUEST_STATUS_INCOMPLETE && !pPlayer->HasItemCount(ITEM_CHRONO_BEACON,1)) - { - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_OBTAIN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - pPlayer->SEND_GOSSIP_MENU(10000, pCreature->GetObjectGuid()); - return true; - } - else if (pPlayer->GetQuestRewardStatus(QUEST_OPENING_PORTAL) && !pPlayer->HasItemCount(ITEM_CHRONO_BEACON,1)) - { - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_OBTAIN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - pPlayer->SEND_GOSSIP_MENU(10001, pCreature->GetObjectGuid()); - return true; - } - - pPlayer->SEND_GOSSIP_MENU(10002, pCreature->GetObjectGuid()); - return true; -} - -bool GossipSelect_npc_saat(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) -{ - if (uiAction == GOSSIP_ACTION_INFO_DEF+1) - { - pPlayer->CLOSE_GOSSIP_MENU(); - pCreature->CastSpell(pPlayer,SPELL_CHRONO_BEACON,false); - } - return true; -} - void AddSC_dark_portal() { Script* pNewScript; @@ -407,10 +368,4 @@ void AddSC_dark_portal() pNewScript->Name = "npc_time_rift"; pNewScript->GetAI = &GetAI_npc_time_rift; pNewScript->RegisterSelf(); - - pNewScript = new Script; - pNewScript->Name = "npc_saat"; - pNewScript->pGossipHello = &GossipHello_npc_saat; - pNewScript->pGossipSelect = &GossipSelect_npc_saat; - pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 75ea4615e..9adbccf36 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2511" + #define SD2_REVISION_NR "2512" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index cc405db6c..555ff1c7a 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -427,7 +427,6 @@ UPDATE creature_template SET ScriptName='boss_temporus' WHERE entry=17880; UPDATE instance_template SET ScriptName='instance_dark_portal' WHERE map=269; UPDATE creature_template SET ScriptName='npc_medivh_bm' WHERE entry=15608; UPDATE creature_template SET ScriptName='npc_time_rift' WHERE entry=17838; -UPDATE creature_template SET ScriptName='npc_saat' WHERE entry=20201; /* */ /* COILFANG RESERVOIR */ diff --git a/sql/updates/r2512_mangos.sql b/sql/updates/r2512_mangos.sql new file mode 100644 index 000000000..95ad7a3d1 --- /dev/null +++ b/sql/updates/r2512_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='' WHERE entry=20201; From 031473d2bce3bd7a8e841ccc6ef849b8393bad56 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Thu, 12 Apr 2012 23:43:04 +0300 Subject: [PATCH 0501/1172] [2513] Cleanup and improve script for the Bug Trio --- .../temple_of_ahnqiraj/boss_bug_trio.cpp | 306 ++++++++---------- .../instance_temple_of_ahnqiraj.cpp | 34 +- .../temple_of_ahnqiraj/temple_of_ahnqiraj.h | 11 +- sd2_revision_nr.h | 2 +- 4 files changed, 161 insertions(+), 192 deletions(-) diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_bug_trio.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_bug_trio.cpp index 78ac9317f..491827c2b 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/boss_bug_trio.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_bug_trio.cpp @@ -15,25 +15,33 @@ */ /* ScriptData -SDName: boss_kri, boss_yauj, boss_vem : The Bug Trio -SD%Complete: 100 -SDComment: +SDName: bug_trio +SD%Complete: 75 +SDComment: Summon Player spell NYI; Poison Cloud damage spell NYI; Timers need adjustments SDCategory: Temple of Ahn'Qiraj EndScriptData */ #include "precompiled.h" #include "temple_of_ahnqiraj.h" -#define SPELL_CLEAVE 26350 -#define SPELL_TOXIC_VOLLEY 25812 -#define SPELL_POISON_CLOUD 38718 //Only Spell with right dmg. -#define SPELL_ENRAGE 34624 //Changed cause 25790 is casted on gamers too. Same prob with old explosion of twin emperors. +enum +{ + // kri + SPELL_CLEAVE = 26350, + SPELL_TOXIC_VOLLEY = 25812, + SPELL_SUMMON_CLOUD = 26590, // summons 15933 + + // vem + SPELL_CHARGE = 26561, + SPELL_VENGEANCE = 25790, + SPELL_KNOCKBACK = 26027, -#define SPELL_CHARGE 26561 -#define SPELL_KNOCKBACK 26027 + // yauj + SPELL_HEAL = 25807, + SPELL_FEAR = 26580, -#define SPELL_HEAL 25807 -#define SPELL_FEAR 19408 + NPC_YAUJ_BROOD = 15621 +}; struct MANGOS_DLL_DECL boss_kriAI : public ScriptedAI { @@ -45,73 +53,60 @@ struct MANGOS_DLL_DECL boss_kriAI : public ScriptedAI ScriptedInstance* m_pInstance; - uint32 Cleave_Timer; - uint32 ToxicVolley_Timer; - uint32 Check_Timer; - - bool VemDead; - bool Death; + uint32 m_uiCleaveTimer; + uint32 m_uiToxicVolleyTimer; void Reset() { - Cleave_Timer = urand(4000, 8000); - ToxicVolley_Timer = urand(6000, 12000); - Check_Timer = 2000; - - VemDead = false; - Death = false; + m_uiCleaveTimer = urand(4000, 8000); + m_uiToxicVolleyTimer = urand(6000, 12000); } - void JustDied(Unit* killer) + void JustDied(Unit* pKiller) { - if (m_pInstance) - { - if (m_pInstance->GetData(DATA_BUG_TRIO_DEATH) < 2) - // Unlootable if death - m_creature->RemoveFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE); + // poison cloud on death + DoCastSpellIfCan(m_creature, SPELL_SUMMON_CLOUD, CAST_TRIGGERED); - m_pInstance->SetData(DATA_BUG_TRIO_DEATH, 1); + if (!m_pInstance) + return; + + // If the other 2 bugs are still alive, make unlootable + if (m_pInstance->GetData(TYPE_BUG_TRIO) != DONE) + { + m_creature->RemoveFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE); + m_pInstance->SetData(TYPE_BUG_TRIO, SPECIAL); } } - void UpdateAI(const uint32 diff) + + void JustReachedHome() + { + if (m_pInstance) + m_pInstance->SetData(TYPE_BUG_TRIO, FAIL); + } + + void UpdateAI(const uint32 uiDiff) { - //Return since we have no target + // Return since we have no target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - //Cleave_Timer - if (Cleave_Timer < diff) - { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_CLEAVE); - Cleave_Timer = urand(5000, 12000); - }else Cleave_Timer -= diff; - - //ToxicVolley_Timer - if (ToxicVolley_Timer < diff) + // Cleave_Timer + if (m_uiCleaveTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_TOXIC_VOLLEY); - ToxicVolley_Timer = urand(10000, 15000); - }else ToxicVolley_Timer -= diff; - - if (m_creature->GetHealthPercent() < 5.0f && !Death) - { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_POISON_CLOUD); - Death = true; + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_CLEAVE) == CAST_OK) + m_uiCleaveTimer = urand(5000, 12000); } + else + m_uiCleaveTimer -= uiDiff; - if (!VemDead) + // ToxicVolley_Timer + if (m_uiToxicVolleyTimer < uiDiff) { - //Checking if Vem is dead. If yes we will enrage. - if (Check_Timer < diff) - { - if (m_pInstance && m_pInstance->GetData(TYPE_VEM) == DONE) - { - DoCastSpellIfCan(m_creature, SPELL_ENRAGE); - VemDead = true; - } - Check_Timer = 2000; - }else Check_Timer -=diff; + if (DoCastSpellIfCan(m_creature, SPELL_TOXIC_VOLLEY) == CAST_OK) + m_uiToxicVolleyTimer = urand(10000, 15000); } + else + m_uiToxicVolleyTimer -= uiDiff; DoMeleeAttackIfReady(); } @@ -127,65 +122,68 @@ struct MANGOS_DLL_DECL boss_vemAI : public ScriptedAI ScriptedInstance* m_pInstance; - uint32 Charge_Timer; - uint32 KnockBack_Timer; - uint32 Enrage_Timer; - - bool Enraged; + uint32 m_uiChargeTimer; + uint32 m_uiKnockBackTimer; void Reset() { - Charge_Timer = urand(15000, 27000); - KnockBack_Timer = urand(8000, 20000); - Enrage_Timer = 120000; - - Enraged = false; + m_uiChargeTimer = urand(15000, 27000); + m_uiKnockBackTimer = urand(8000, 20000); } - void JustDied(Unit* Killer) + void JustDied(Unit* pKiller) { - if (m_pInstance) - { - m_pInstance->SetData(TYPE_VEM, DONE); + // Enrage the other bugs + DoCastSpellIfCan(m_creature, SPELL_VENGEANCE, CAST_TRIGGERED); - // Unlootable if death - if (m_pInstance->GetData(DATA_BUG_TRIO_DEATH) < 2) - m_creature->RemoveFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE); + if (!m_pInstance) + return; - m_pInstance->SetData(DATA_BUG_TRIO_DEATH, 1); + // If the other 2 bugs are still alive, make unlootable + if (m_pInstance->GetData(TYPE_BUG_TRIO) != DONE) + { + m_creature->RemoveFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE); + m_pInstance->SetData(TYPE_BUG_TRIO, SPECIAL); } } - void UpdateAI(const uint32 diff) + void JustReachedHome() + { + if (m_pInstance) + m_pInstance->SetData(TYPE_BUG_TRIO, FAIL); + } + + void UpdateAI(const uint32 uiDiff) { - //Return since we have no target + // Return since we have no target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - //Charge_Timer - if (Charge_Timer < diff) + // Charge_Timer + if (m_uiChargeTimer < uiDiff) { - if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) - DoCastSpellIfCan(target, SPELL_CHARGE); - - Charge_Timer = urand(8000, 16000); - }else Charge_Timer -= diff; + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, SPELL_CHARGE) == CAST_OK) + m_uiChargeTimer = urand(8000, 16000); + } + } + else + m_uiChargeTimer -= uiDiff; - //KnockBack_Timer - if (KnockBack_Timer < diff) + // KnockBack_Timer + if (m_uiKnockBackTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_KNOCKBACK); - if (m_creature->getThreatManager().getThreat(m_creature->getVictim())) - m_creature->getThreatManager().modifyThreatPercent(m_creature->getVictim(),-80); - KnockBack_Timer = urand(15000, 25000); - }else KnockBack_Timer -= diff; - - //Enrage_Timer - if (!Enraged && Enrage_Timer < diff) - { - DoCastSpellIfCan(m_creature,SPELL_ENRAGE); - Enraged = true; - }else Charge_Timer -= diff; + if (DoCastSpellIfCan(m_creature, SPELL_KNOCKBACK) == CAST_OK) + { + if (m_creature->getThreatManager().getThreat(m_creature->getVictim())) + m_creature->getThreatManager().modifyThreatPercent(m_creature->getVictim(), -80); + + m_uiKnockBackTimer = urand(15000, 25000); + } + } + else + m_uiKnockBackTimer -= uiDiff; DoMeleeAttackIfReady(); } @@ -201,97 +199,71 @@ struct MANGOS_DLL_DECL boss_yaujAI : public ScriptedAI ScriptedInstance* m_pInstance; - uint32 Heal_Timer; - uint32 Fear_Timer; - uint32 Check_Timer; - - bool VemDead; + uint32 m_uiHealTimer; + uint32 m_uiFearTimer; void Reset() { - Heal_Timer = urand(25000, 40000); - Fear_Timer = urand(12000, 24000); - Check_Timer = 2000; - - VemDead = false; + m_uiHealTimer = urand(25000, 40000); + m_uiFearTimer = urand(12000, 24000); } void JustDied(Unit* Killer) { - if (m_pInstance) + // Spawn 10 yauj brood on death + float fX, fY, fZ; + for(int i = 0; i < 10; ++i) { - if (m_pInstance->GetData(DATA_BUG_TRIO_DEATH) < 2) - // Unlootable if death - m_creature->RemoveFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE); - m_pInstance->SetData(DATA_BUG_TRIO_DEATH, 1); + m_creature->GetRandomPoint(m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), 10.0f, fX, fY, fZ); + m_creature->SummonCreature(NPC_YAUJ_BROOD, fX, fY, fZ, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); } - for(int i = 0; i < 10; ++i) + if (!m_pInstance) + return; + + // If the other 2 bugs are still alive, make unlootable + if (m_pInstance->GetData(TYPE_BUG_TRIO) != DONE) { - Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0); - Creature* Summoned = m_creature->SummonCreature(15621,m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(),0,TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN,90000); - if (Summoned && target) - Summoned->AI()->AttackStart(target); + m_creature->RemoveFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE); + m_pInstance->SetData(TYPE_BUG_TRIO, SPECIAL); } } - void UpdateAI(const uint32 diff) + void JustReachedHome() + { + if (m_pInstance) + m_pInstance->SetData(TYPE_BUG_TRIO, FAIL); + } + + void UpdateAI(const uint32 uiDiff) { - //Return since we have no target + // Return since we have no target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - //Fear_Timer - if (Fear_Timer < diff) - { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_FEAR); - DoResetThreat(); - Fear_Timer = 20000; - }else Fear_Timer -= diff; - - //Casting Heal to other twins or herself. - if (Heal_Timer < diff) + // Fear_Timer + if (m_uiFearTimer < uiDiff) { - if (m_pInstance) + if (DoCastSpellIfCan(m_creature, SPELL_FEAR) == CAST_OK) { - Creature* pKri = m_pInstance->GetSingleCreatureFromStorage(NPC_KRI); - Creature* pVem = m_pInstance->GetSingleCreatureFromStorage(NPC_VEM); - - switch(urand(0, 2)) - { - case 0: - if (pKri) - DoCastSpellIfCan(pKri, SPELL_HEAL); - break; - case 1: - if (pVem) - DoCastSpellIfCan(pVem, SPELL_HEAL); - break; - case 2: - DoCastSpellIfCan(m_creature, SPELL_HEAL); - break; - } + DoResetThreat(); + m_uiFearTimer = 20000; } + } + else + m_uiFearTimer -= uiDiff; - Heal_Timer = urand(15000, 30000); - }else Heal_Timer -= diff; - - //Checking if Vem is dead. If yes we will enrage. - if (Check_Timer < diff) + // Heal + if (m_uiHealTimer < uiDiff) { - if (!VemDead) + if (Unit* pTarget = DoSelectLowestHpFriendly(100.0f)) { - if (m_pInstance) - { - if (m_pInstance->GetData(TYPE_VEM) == DONE) - { - DoCastSpellIfCan(m_creature, SPELL_ENRAGE); - VemDead = true; - } - } + if (DoCastSpellIfCan(pTarget, SPELL_HEAL) == CAST_OK) + m_uiHealTimer = urand(15000, 30000); } - Check_Timer = 2000; - }else Check_Timer -= diff; + } + else + m_uiHealTimer -= uiDiff; DoMeleeAttackIfReady(); } diff --git a/scripts/kalimdor/temple_of_ahnqiraj/instance_temple_of_ahnqiraj.cpp b/scripts/kalimdor/temple_of_ahnqiraj/instance_temple_of_ahnqiraj.cpp index 2e60bec95..17e75d66e 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/instance_temple_of_ahnqiraj.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/instance_temple_of_ahnqiraj.cpp @@ -39,8 +39,6 @@ void instance_temple_of_ahnqiraj::OnCreatureCreate (Creature* pCreature) { switch (pCreature->GetEntry()) { - case NPC_VEM: - case NPC_KRI: case NPC_VEKLOR: case NPC_VEKNILASH: case NPC_CTHUN: @@ -86,7 +84,18 @@ void instance_temple_of_ahnqiraj::SetData(uint32 uiType, uint32 uiData) if (uiData == DONE) DoUseDoorOrButton(GO_SKERAM_GATE); break; - case TYPE_VEM: + case TYPE_BUG_TRIO: + if (uiData == SPECIAL) + { + ++m_uiBugTrioDeathCount; + if (m_uiBugTrioDeathCount == 2) + SetData(TYPE_BUG_TRIO, DONE); + + // don't store any special data + break; + } + if (uiData == FAIL) + m_uiBugTrioDeathCount = 0; m_auiEncounter[uiType] = uiData; break; case TYPE_TWINS: @@ -102,11 +111,6 @@ void instance_temple_of_ahnqiraj::SetData(uint32 uiType, uint32 uiData) case TYPE_CTHUN_PHASE: m_auiEncounter[uiType] = uiData; break; - - // The following temporarily datas are not to be saved - case DATA_BUG_TRIO_DEATH: - ++m_uiBugTrioDeathCount; - return; } if (uiData == DONE) @@ -147,18 +151,10 @@ void instance_temple_of_ahnqiraj::Load(const char* chrIn) uint32 instance_temple_of_ahnqiraj::GetData(uint32 uiType) { - switch(uiType) - { - case TYPE_VEM: - return m_auiEncounter[1]; - case TYPE_CTHUN_PHASE: - return m_auiEncounter[3];; + if (uiType < MAX_ENCOUNTER) + return m_auiEncounter[uiType]; - case DATA_BUG_TRIO_DEATH: - return m_uiBugTrioDeathCount; - default: - return 0; - } + return 0; } InstanceData* GetInstanceData_instance_temple_of_ahnqiraj(Map* pMap) diff --git a/scripts/kalimdor/temple_of_ahnqiraj/temple_of_ahnqiraj.h b/scripts/kalimdor/temple_of_ahnqiraj/temple_of_ahnqiraj.h index c89b53b56..8a83155ee 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/temple_of_ahnqiraj.h +++ b/scripts/kalimdor/temple_of_ahnqiraj/temple_of_ahnqiraj.h @@ -10,13 +10,14 @@ enum MAX_ENCOUNTER = 4, TYPE_SKERAM = 0, - TYPE_VEM = 1, + TYPE_BUG_TRIO = 1, TYPE_TWINS = 2, TYPE_CTHUN_PHASE = 3, // NPC_SKERAM = 15263, - NPC_KRI = 15511, - NPC_VEM = 15544, + //NPC_KRI = 15511, + //NPC_VEM = 15544, + //NPC_YAUJ = 15543, NPC_VEKLOR = 15276, NPC_VEKNILASH = 15275, NPC_CTHUN = 15727, @@ -25,7 +26,7 @@ enum GO_TWINS_ENTER_DOOR = 180634, GO_TWINS_EXIT_DOOR = 180635, - DATA_BUG_TRIO_DEATH = 10, + SPELL_SUMMON_PLAYER = 20477, }; enum CThunPhase @@ -61,7 +62,7 @@ class MANGOS_DLL_DECL instance_temple_of_ahnqiraj : public ScriptedInstance uint32 m_auiEncounter[MAX_ENCOUNTER]; std::string m_strInstData; - uint32 m_uiBugTrioDeathCount; + uint8 m_uiBugTrioDeathCount; }; #endif diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 9adbccf36..015469d91 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2512" + #define SD2_REVISION_NR "2513" #endif // __SD2_REVISION_NR_H__ From 0d23d645c634403a4e177b16ba5cc01c1a80903f Mon Sep 17 00:00:00 2001 From: Xfurry Date: Fri, 13 Apr 2012 00:43:50 +0300 Subject: [PATCH 0502/1172] [2514] Implement script for Pyroguard Emberseer --- .../blackrock_spire/blackrock_spire.h | 20 ++- .../boss_pyroguard_emberseer.cpp | 111 +++++++++++--- .../instance_blackrock_spire.cpp | 135 +++++++++++++++++- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 3 + sql/updates/r2514_mangos.sql | 3 + 6 files changed, 247 insertions(+), 27 deletions(-) create mode 100644 sql/updates/r2514_mangos.sql diff --git a/scripts/eastern_kingdoms/blackrock_spire/blackrock_spire.h b/scripts/eastern_kingdoms/blackrock_spire/blackrock_spire.h index 73c9e4750..790439738 100644 --- a/scripts/eastern_kingdoms/blackrock_spire/blackrock_spire.h +++ b/scripts/eastern_kingdoms/blackrock_spire/blackrock_spire.h @@ -20,7 +20,7 @@ enum NPC_BLACKHAND_SUMMONER = 9818, NPC_BLACKHAND_VETERAN = 9819, NPC_PYROGUARD_EMBERSEER = 9816, - NPC_BLACKHAND_INCANCERATOR = 10316, + NPC_BLACKHAND_INCARCERATOR = 10316, NPC_LORD_VICTOR_NEFARIUS = 10162, NPC_REND_BLACKHAND = 10429, NPC_GYTH = 10339, @@ -49,6 +49,14 @@ enum GO_ROOM_4_RUNE = 175200, GO_ROOKERY_EGG = 175124, + + GO_EMBERSEER_RUNE_1 = 175266, + GO_EMBERSEER_RUNE_2 = 175267, + GO_EMBERSEER_RUNE_3 = 175268, + GO_EMBERSEER_RUNE_4 = 175269, + GO_EMBERSEER_RUNE_5 = 175270, + GO_EMBERSEER_RUNE_6 = 175271, + GO_EMBERSEER_RUNE_7 = 175272, }; class MANGOS_DLL_DECL instance_blackrock_spire : public ScriptedInstance @@ -62,6 +70,8 @@ class MANGOS_DLL_DECL instance_blackrock_spire : public ScriptedInstance void OnObjectCreate(GameObject* pGo); void OnCreatureCreate(Creature* pCreature); void OnCreatureDeath(Creature* pCreature); + void OnCreatureEvade(Creature* pCreature); + void OnCreatureEnterCombat(Creature* pCreature); void SetData(uint32 uiType, uint32 uiData); void SetData64(uint32 uiType, uint64 uiData); @@ -70,8 +80,11 @@ class MANGOS_DLL_DECL instance_blackrock_spire : public ScriptedInstance const char* Save() { return m_strInstData.c_str(); } void Load(const char* chrIn); + void DoUseEmberseerRunes(bool bReset = false); + void DoProcessEmberseerEvent(); + void DoSortRoomEventMobs(); - void GetIncanceratorGUIDList(GUIDList &lList) { lList = m_lIncanceratorGUIDList; } + void GetIncarceratorGUIDList(GUIDList &lList) { lList = m_lIncarceratorGUIDList; } void GetRookeryEggGUIDList(GUIDList &lList) { lList = m_lRookeryEggGUIDList; } protected: @@ -81,8 +94,9 @@ class MANGOS_DLL_DECL instance_blackrock_spire : public ScriptedInstance ObjectGuid m_aRoomRuneGuid[MAX_ROOMS]; GUIDList m_alRoomEventMobGUIDSorted[MAX_ROOMS]; GUIDList m_lRoomEventMobGUIDList; - GUIDList m_lIncanceratorGUIDList; + GUIDList m_lIncarceratorGUIDList; GUIDList m_lRookeryEggGUIDList; + GUIDList m_lEmberseerRunesGUIDList; }; #endif diff --git a/scripts/eastern_kingdoms/blackrock_spire/boss_pyroguard_emberseer.cpp b/scripts/eastern_kingdoms/blackrock_spire/boss_pyroguard_emberseer.cpp index fc0bd2bb6..9c46e5e1b 100644 --- a/scripts/eastern_kingdoms/blackrock_spire/boss_pyroguard_emberseer.cpp +++ b/scripts/eastern_kingdoms/blackrock_spire/boss_pyroguard_emberseer.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: Boss_Pyroguard_Emberseer -SD%Complete: 50 -SDComment: Event to activate Emberseer NYI - 'aggro'-text missing +SD%Complete: 90 +SDComment: Dummy spells used during the transformation may need further research SDCategory: Blackrock Spire EndScriptData */ @@ -27,16 +27,24 @@ EndScriptData */ enum { // Intro emote/say - EMOTE_BEGIN = -1229000, EMOTE_NEAR = -1229001, EMOTE_FULL = -1229002, SAY_FREE = -1229003, + MAX_GROWING_STACKS = 20, + // Intro spells - SPELL_FREEZE_ANIM = 16245, - SPELL_EMBERSEER_GROWING = 16048, + SPELL_ENCAGE_EMBERSEER = 15281, // cast by Blackhand Incarcerator + + SPELL_FIRE_SHIELD = 13376, // not sure what's the purpose of this + SPELL_DESPAWN_EMBERSEER = 16078, // not sure what's the purpose of this + SPELL_FREEZE_ANIM = 16245, // not sure what's the purpose of this SPELL_FULL_STRENGHT = 16047, + SPELL_GROWING = 16049, // stacking aura + SPELL_BONUS_DAMAGE = 16534, // triggered on full grow + SPELL_TRANSFORM = 16052, + // Combat spells SPELL_FIRENOVA = 23462, SPELL_FLAMEBUFFET = 23341, SPELL_PYROBLAST = 20228 // guesswork, but best fitting in spells-area, was 17274 (has mana cost) @@ -51,21 +59,22 @@ struct MANGOS_DLL_DECL boss_pyroguard_emberseerAI : public ScriptedAI } instance_blackrock_spire* m_pInstance; + + uint32 m_uiEncageTimer; uint32 m_uiFireNovaTimer; uint32 m_uiFlameBuffetTimer; uint32 m_uiPyroBlastTimer; + uint8 m_uiGrowingStacks; void Reset() { - m_uiFireNovaTimer = 6000; - m_uiFlameBuffetTimer = 3000; - m_uiPyroBlastTimer = 14000; - } + m_uiEncageTimer = 10000; + m_uiFireNovaTimer = 6000; + m_uiFlameBuffetTimer = 3000; + m_uiPyroBlastTimer = 14000; + m_uiGrowingStacks = 0; - void Aggro(Unit* pWho) - { - if (m_pInstance) - m_pInstance->SetData(TYPE_EMBERSEER, IN_PROGRESS); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); } void JustDied(Unit* pKiller) @@ -80,8 +89,57 @@ struct MANGOS_DLL_DECL boss_pyroguard_emberseerAI : public ScriptedAI m_pInstance->SetData(TYPE_EMBERSEER, FAIL); } + // Wrapper to handle the transformation + void DoHandleEmberseerGrowing() + { + ++m_uiGrowingStacks; + + if (m_uiGrowingStacks == MAX_GROWING_STACKS*0.5f) + DoScriptText(EMOTE_NEAR, m_creature); + else if (m_uiGrowingStacks == MAX_GROWING_STACKS) + { + DoScriptText(EMOTE_FULL, m_creature); + DoScriptText(SAY_FREE, m_creature); + + // Note: the spell order needs further research + DoCastSpellIfCan(m_creature, SPELL_FULL_STRENGHT, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_BONUS_DAMAGE, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_TRANSFORM, CAST_TRIGGERED); + + // activate all runes + if (m_pInstance) + { + m_pInstance->DoUseEmberseerRunes(); + // Redundant check: if for some reason the event isn't set in progress until this point - avoid using the altar again when the boss is fully grown + m_pInstance->SetData(TYPE_EMBERSEER, IN_PROGRESS); + } + + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + } + } + void UpdateAI(const uint32 uiDiff) { + // Cast Encage spell on OOC timer + if (m_uiEncageTimer) + { + if (m_uiEncageTimer <= uiDiff) + { + GUIDList m_lIncarceratorsGuid; + m_pInstance->GetIncarceratorGUIDList(m_lIncarceratorsGuid); + + for (GUIDList::const_iterator itr = m_lIncarceratorsGuid.begin(); itr != m_lIncarceratorsGuid.end(); ++itr) + { + if (Creature* pIncarcerator = m_creature->GetMap()->GetCreature(*itr)) + pIncarcerator->CastSpell(m_creature, SPELL_ENCAGE_EMBERSEER, false); + } + + m_uiEncageTimer = 0; + } + else + m_uiEncageTimer -= uiDiff; + } + // Return since we have no target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -89,8 +147,8 @@ struct MANGOS_DLL_DECL boss_pyroguard_emberseerAI : public ScriptedAI // FireNova Timer if (m_uiFireNovaTimer < uiDiff) { - DoCastSpellIfCan(m_creature, SPELL_FIRENOVA); - m_uiFireNovaTimer = 6000; + if (DoCastSpellIfCan(m_creature, SPELL_FIRENOVA) == CAST_OK) + m_uiFireNovaTimer = 6000; } else m_uiFireNovaTimer -= uiDiff; @@ -98,8 +156,8 @@ struct MANGOS_DLL_DECL boss_pyroguard_emberseerAI : public ScriptedAI // FlameBuffet Timer if (m_uiFlameBuffetTimer < uiDiff) { - DoCastSpellIfCan(m_creature, SPELL_FLAMEBUFFET); - m_uiFlameBuffetTimer = 14000; + if (DoCastSpellIfCan(m_creature, SPELL_FLAMEBUFFET) == CAST_OK) + m_uiFlameBuffetTimer = 14000; } else m_uiFlameBuffetTimer -= uiDiff; @@ -108,8 +166,10 @@ struct MANGOS_DLL_DECL boss_pyroguard_emberseerAI : public ScriptedAI if (m_uiPyroBlastTimer < uiDiff) { if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) - DoCastSpellIfCan(pTarget, SPELL_PYROBLAST); - m_uiPyroBlastTimer = 15000; + { + if (DoCastSpellIfCan(pTarget, SPELL_PYROBLAST) == CAST_OK) + m_uiPyroBlastTimer = 15000; + } } else m_uiPyroBlastTimer -= uiDiff; @@ -123,6 +183,18 @@ CreatureAI* GetAI_boss_pyroguard_emberseer(Creature* pCreature) return new boss_pyroguard_emberseerAI(pCreature); } +bool EffectDummyCreature_pyroguard_emberseer(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) +{ + //always check spellid and effectindex + if (uiSpellId == SPELL_GROWING && uiEffIndex == EFFECT_INDEX_0) + { + if (boss_pyroguard_emberseerAI* pEmberseerAI = dynamic_cast(pCreatureTarget->AI())) + pEmberseerAI->DoHandleEmberseerGrowing(); + } + + return false; +} + void AddSC_boss_pyroguard_emberseer() { Script* pNewScript; @@ -130,5 +202,6 @@ void AddSC_boss_pyroguard_emberseer() pNewScript = new Script; pNewScript->Name = "boss_pyroguard_emberseer"; pNewScript->GetAI = &GetAI_boss_pyroguard_emberseer; + pNewScript->pEffectDummyNPC = &EffectDummyCreature_pyroguard_emberseer; pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/blackrock_spire/instance_blackrock_spire.cpp b/scripts/eastern_kingdoms/blackrock_spire/instance_blackrock_spire.cpp index a63a6ba58..16deb6f18 100644 --- a/scripts/eastern_kingdoms/blackrock_spire/instance_blackrock_spire.cpp +++ b/scripts/eastern_kingdoms/blackrock_spire/instance_blackrock_spire.cpp @@ -45,6 +45,11 @@ enum SAY_NEFARIUS_WARCHIEF = -1229016, SAY_NEFARIUS_BUFF_GYTH = -1229017, SAY_NEFARIUS_VICTORY = -1229018, + + // Emberseer event + EMOTE_BEGIN = -1229000, + + SPELL_EMBERSEER_GROWING = 16048, }; /* Areatrigger @@ -106,6 +111,16 @@ void instance_blackrock_spire::OnObjectCreate(GameObject* pGo) case GO_ROOKERY_EGG: m_lRookeryEggGUIDList.push_back(pGo->GetObjectGuid()); return; + case GO_EMBERSEER_RUNE_1: + case GO_EMBERSEER_RUNE_2: + case GO_EMBERSEER_RUNE_3: + case GO_EMBERSEER_RUNE_4: + case GO_EMBERSEER_RUNE_5: + case GO_EMBERSEER_RUNE_6: + case GO_EMBERSEER_RUNE_7: + m_lEmberseerRunesGUIDList.push_back(pGo->GetObjectGuid()); + return; + default: return; } @@ -125,7 +140,7 @@ void instance_blackrock_spire::OnCreatureCreate(Creature* pCreature) case NPC_BLACKHAND_SUMMONER: case NPC_BLACKHAND_VETERAN: m_lRoomEventMobGUIDList.push_back(pCreature->GetObjectGuid()); break; - case NPC_BLACKHAND_INCANCERATOR: m_lIncanceratorGUIDList.push_back(pCreature->GetObjectGuid()); break; + case NPC_BLACKHAND_INCARCERATOR: m_lIncarceratorGUIDList.push_back(pCreature->GetObjectGuid()); break; } } @@ -139,11 +154,29 @@ void instance_blackrock_spire::SetData(uint32 uiType, uint32 uiData) m_auiEncounter[0] = uiData; break; case TYPE_EMBERSEER: - if (uiData == IN_PROGRESS || uiData == FAIL) - DoUseDoorOrButton(GO_DOORS); + // Don't set the same data twice + if (m_auiEncounter[1] == uiData) + break; + // Combat door + DoUseDoorOrButton(GO_DOORS); + // Respawn all incarcerators and reset the runes on FAIL + if (uiData == FAIL) + { + for (GUIDList::const_iterator itr = m_lIncarceratorGUIDList.begin(); itr != m_lIncarceratorGUIDList.end(); ++itr) + { + if (Creature* pIncarcerator = instance->GetCreature(*itr)) + { + if (!pIncarcerator->isAlive()) + pIncarcerator->Respawn(); + pIncarcerator->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PASSIVE); + } + } + + DoUseEmberseerRunes(true); + } else if (uiData == DONE) { - DoUseDoorOrButton(GO_DOORS); + DoUseEmberseerRunes(); DoUseDoorOrButton(GO_EMBERSEER_OUT); } m_auiEncounter[1] = uiData; @@ -272,6 +305,82 @@ void instance_blackrock_spire::OnCreatureDeath(Creature* pCreature) } } +void instance_blackrock_spire::OnCreatureEvade(Creature* pCreature) +{ + switch (pCreature->GetEntry()) + { + // Emberseer should evade if the incarcerators evade + case NPC_BLACKHAND_INCARCERATOR: + if (Creature* pEmberseer = GetSingleCreatureFromStorage(NPC_PYROGUARD_EMBERSEER)) + pEmberseer->AI()->EnterEvadeMode(); + break; + } +} + +void instance_blackrock_spire::OnCreatureEnterCombat(Creature* pCreature) +{ + switch (pCreature->GetEntry()) + { + // Once one of the Incarcerators gets Aggro, the door should close + case NPC_BLACKHAND_INCARCERATOR: + SetData(TYPE_EMBERSEER, IN_PROGRESS); + break; + } +} + +void instance_blackrock_spire::DoProcessEmberseerEvent() +{ + if (GetData(TYPE_EMBERSEER) == DONE || GetData(TYPE_EMBERSEER) == IN_PROGRESS) + return; + + if (m_lIncarceratorGUIDList.empty()) + { + error_log("SD2: Npc %u couldn't be found. Please check your DB content!", NPC_BLACKHAND_INCARCERATOR); + return; + } + + // start to grow + if (Creature* pEmberseer = GetSingleCreatureFromStorage(NPC_PYROGUARD_EMBERSEER)) + { + // If already casting, return + if (pEmberseer->HasAura(SPELL_EMBERSEER_GROWING)) + return; + + DoScriptText(EMOTE_BEGIN, pEmberseer); + pEmberseer->CastSpell(pEmberseer, SPELL_EMBERSEER_GROWING, true); + } + + // remove the incarcerators flags and stop casting + for (GUIDList::const_iterator itr = m_lIncarceratorGUIDList.begin(); itr != m_lIncarceratorGUIDList.end(); ++itr) + { + if (Creature* pCreature = instance->GetCreature(*itr)) + { + if (pCreature->isAlive()) + { + pCreature->InterruptNonMeleeSpells(false); + pCreature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PASSIVE); + } + } + } +} + +void instance_blackrock_spire::DoUseEmberseerRunes(bool bReset) +{ + if (m_lEmberseerRunesGUIDList.empty()) + return; + + for (GUIDList::const_iterator itr = m_lEmberseerRunesGUIDList.begin(); itr != m_lEmberseerRunesGUIDList.end(); itr++) + { + if (bReset) + { + if (GameObject* pRune = instance->GetGameObject(*itr)) + pRune->ResetDoorOrButton(); + } + else + DoUseDoorOrButton(*itr); + } +} + InstanceData* GetInstanceData_instance_blackrock_spire(Map* pMap) { return new instance_blackrock_spire(pMap); @@ -298,6 +407,19 @@ bool AreaTrigger_at_blackrock_spire(Player* pPlayer, AreaTriggerEntry const* pAt return false; } +bool ProcessEventId_event_spell_altar_emberseer(uint32 uiEventId, Object* pSource, Object* pTarget, bool bIsStart) +{ + if (bIsStart && pSource->GetTypeId() == TYPEID_PLAYER) + { + if (instance_blackrock_spire* pInstance = (instance_blackrock_spire*)((Player*)pSource)->GetInstanceData()) + { + pInstance->DoProcessEmberseerEvent(); + return true; + } + } + return false; +} + void AddSC_instance_blackrock_spire() { Script* pNewScript; @@ -311,4 +433,9 @@ void AddSC_instance_blackrock_spire() pNewScript->Name = "at_blackrock_spire"; pNewScript->pAreaTrigger = &AreaTrigger_at_blackrock_spire; pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "event_spell_altar_emberseer"; + pNewScript->pProcessEventId = &ProcessEventId_event_spell_altar_emberseer; + pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 015469d91..62ed225a9 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2513" + #define SD2_REVISION_NR "2514" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 555ff1c7a..5d7bad3e1 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -356,6 +356,9 @@ UPDATE creature_template SET ScriptName='boss_drakkisath' WHERE entry=10363; UPDATE creature_template SET ScriptName='boss_gyth' WHERE entry=10339; UPDATE creature_template SET ScriptName='boss_rend_blackhand' WHERE entry=10429; UPDATE creature_template SET ScriptName='boss_pyroguard_emberseer' WHERE entry=9816; +DELETE FROM scripted_event_id WHERE id=4884; +INSERT INTO scripted_event_id VALUES +(4884,'event_spell_altar_emberseer'); /* BLACKWING LAIR */ UPDATE instance_template SET ScriptName='instance_blackwing_lair' WHERE map=469; diff --git a/sql/updates/r2514_mangos.sql b/sql/updates/r2514_mangos.sql new file mode 100644 index 000000000..24d1b06c4 --- /dev/null +++ b/sql/updates/r2514_mangos.sql @@ -0,0 +1,3 @@ +DELETE FROM scripted_event_id WHERE id=4884; +INSERT INTO scripted_event_id VALUES +(4884,'event_spell_altar_emberseer'); From 172f9d9a15de41af0feb4daaaffa54eacc1bb08a Mon Sep 17 00:00:00 2001 From: Xfurry Date: Fri, 13 Apr 2012 13:59:02 +0200 Subject: [PATCH 0503/1172] [2515] Cleanup boss Huhuran (AQ40) --- .../temple_of_ahnqiraj/boss_huhuran.cpp | 142 +++++++++--------- sd2_revision_nr.h | 2 +- 2 files changed, 68 insertions(+), 76 deletions(-) diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_huhuran.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_huhuran.cpp index acf93d93c..9ab086b12 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/boss_huhuran.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_huhuran.cpp @@ -16,112 +16,104 @@ /* ScriptData SDName: Boss_Huhuran -SD%Complete: 100 -SDComment: +SD%Complete: 90 +SDComment: Timed enrage NYI; Timers SDCategory: Temple of Ahn'Qiraj EndScriptData */ #include "precompiled.h" -#define EMOTE_GENERIC_FRENZY_KILL -1000001 -#define EMOTE_GENERIC_BERSERK -1000004 - -#define SPELL_FRENZY 26051 -#define SPELL_BERSERK 26068 -#define SPELL_POISONBOLT 26052 -#define SPELL_NOXIOUSPOISON 26053 -#define SPELL_WYVERNSTING 26180 -#define SPELL_ACIDSPIT 26050 +enum +{ + EMOTE_GENERIC_FRENZY_KILL = -1000001, + EMOTE_GENERIC_BERSERK = -1000004, + + SPELL_ENRAGE = 26051, // triggers 26052 + SPELL_BERSERK = 26068, // triggers 26052 + SPELL_NOXIOUS_POISON = 26053, + SPELL_WYVERN_STING = 26180, + SPELL_ACID_SPIT = 26050 +}; struct MANGOS_DLL_DECL boss_huhuranAI : public ScriptedAI { boss_huhuranAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} - uint32 Frenzy_Timer; - uint32 Wyvern_Timer; - uint32 Spit_Timer; - uint32 PoisonBolt_Timer; - uint32 NoxiousPoison_Timer; - uint32 FrenzyBack_Timer; + uint32 m_uiFrenzyTimer; + uint32 m_uiWyvernTimer; + uint32 m_uiSpitTimer; + uint32 m_uiNoxiousPoisonTimer; - bool Frenzy; - bool Berserk; + bool m_bIsBerserk; void Reset() { - Frenzy_Timer = urand(25000, 35000); - Wyvern_Timer = urand(18000, 28000); - Spit_Timer = 8000; - PoisonBolt_Timer = 4000; - NoxiousPoison_Timer = urand(10000, 20000); - FrenzyBack_Timer = 15000; - - Frenzy = false; - Berserk = false; + m_uiFrenzyTimer = urand(25000, 35000); + m_uiWyvernTimer = urand(18000, 28000); + m_uiSpitTimer = 8000; + m_uiNoxiousPoisonTimer = urand(10000, 20000); + m_bIsBerserk = false; } - void UpdateAI(const uint32 diff) + void UpdateAI(const uint32 uiDiff) { - //Return since we have no target + // Return since we have no target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - //Frenzy_Timer - if (!Frenzy && Frenzy_Timer < diff) + // Frenzy_Timer + if (!m_bIsBerserk) { - DoCastSpellIfCan(m_creature, SPELL_FRENZY); - DoScriptText(EMOTE_GENERIC_FRENZY_KILL, m_creature); - Frenzy = true; - PoisonBolt_Timer = 3000; - Frenzy_Timer = urand(25000, 35000); - }else Frenzy_Timer -= diff; + if (m_uiFrenzyTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_ENRAGE) == CAST_OK) + { + DoScriptText(EMOTE_GENERIC_FRENZY_KILL, m_creature); + m_uiFrenzyTimer = urand(25000, 35000); + } + } + else + m_uiFrenzyTimer -= uiDiff; + } // Wyvern Timer - if (Wyvern_Timer < diff) - { - if (Unit *target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) - DoCastSpellIfCan(target,SPELL_WYVERNSTING); - Wyvern_Timer = urand(15000, 32000); - }else Wyvern_Timer -= diff; - - //Spit Timer - if (Spit_Timer < diff) + if (m_uiWyvernTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_ACIDSPIT); - Spit_Timer = urand(5000, 10000); - }else Spit_Timer -= diff; - - //NoxiousPoison_Timer - if (NoxiousPoison_Timer < diff) - { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_NOXIOUSPOISON); - NoxiousPoison_Timer = urand(12000, 24000); - }else NoxiousPoison_Timer -= diff; + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, SPELL_WYVERN_STING) == CAST_OK) + m_uiWyvernTimer = urand(15000, 32000); + } + } + else + m_uiWyvernTimer -= uiDiff; - //PoisonBolt only if frenzy or berserk - if (Frenzy || Berserk) + // Spit Timer + if (m_uiSpitTimer < uiDiff) { - if (PoisonBolt_Timer < diff) - { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_POISONBOLT); - PoisonBolt_Timer = 3000; - }else PoisonBolt_Timer -= diff; + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_ACID_SPIT) == CAST_OK) + m_uiSpitTimer = urand(5000, 10000); } + else + m_uiSpitTimer -= uiDiff; - //FrenzyBack_Timer - if (Frenzy && FrenzyBack_Timer < diff) + // NoxiousPoison_Timer + if (m_uiNoxiousPoisonTimer < uiDiff) { - m_creature->InterruptNonMeleeSpells(false); - Frenzy = false; - FrenzyBack_Timer = 15000; - }else FrenzyBack_Timer -= diff; + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_NOXIOUS_POISON) == CAST_OK) + m_uiNoxiousPoisonTimer = urand(12000, 24000); + } + else + m_uiNoxiousPoisonTimer -= uiDiff; - if (!Berserk && m_creature->GetHealthPercent() < 31.0f) + // Berserk + if (!m_bIsBerserk && m_creature->GetHealthPercent() < 30.0f) { - m_creature->InterruptNonMeleeSpells(false); - DoScriptText(EMOTE_GENERIC_BERSERK, m_creature); - DoCastSpellIfCan(m_creature, SPELL_BERSERK); - Berserk = true; + if (DoCastSpellIfCan(m_creature, SPELL_BERSERK) == CAST_OK) + { + DoScriptText(EMOTE_GENERIC_BERSERK, m_creature); + m_bIsBerserk = true; + } } DoMeleeAttackIfReady(); diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 62ed225a9..48a02f7ad 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2514" + #define SD2_REVISION_NR "2515" #endif // __SD2_REVISION_NR_H__ From 686a6e8fc22e537a3c8dd8ef63af750910e9c755 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Fri, 13 Apr 2012 17:29:36 +0200 Subject: [PATCH 0504/1172] [2516] Add support for npcs that should be only interactable while dead --- scripts/world/spell_scripts.cpp | 22 ++++++++++++++++++++++ sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 6 +++--- sql/updates/r2516_mangos.sql | 1 + 4 files changed, 27 insertions(+), 4 deletions(-) create mode 100644 sql/updates/r2516_mangos.sql diff --git a/scripts/world/spell_scripts.cpp b/scripts/world/spell_scripts.cpp index b8b4ab6dd..5be62beec 100644 --- a/scripts/world/spell_scripts.cpp +++ b/scripts/world/spell_scripts.cpp @@ -319,6 +319,13 @@ enum // quest 12213, 12220, item 37173 SPELL_SAMPLING_ENERGY = 48218, + + // npcs that are only interactable while dead + SPELL_SHROUD_OF_DEATH = 10848, + SPELL_SPIRIT_PARTICLES = 17327, + NPC_FRANCLORN_FORGEWRIGHT = 8888, + NPC_GAERIYAN = 9299, + NPC_GANJO = 26924, }; bool EffectAuraDummy_spell_aura_dummy_npc(const Aura* pAura, bool bApply) @@ -465,6 +472,21 @@ bool EffectAuraDummy_spell_aura_dummy_npc(const Aura* pAura, bool bApply) return true; } + return false; + } + case SPELL_SHROUD_OF_DEATH: + case SPELL_SPIRIT_PARTICLES: + { + Creature* pCreature = (Creature*)pAura->GetTarget(); + + if (!pCreature || (pCreature->GetEntry() != NPC_FRANCLORN_FORGEWRIGHT && pCreature->GetEntry() != NPC_GAERIYAN && pCreature->GetEntry() != NPC_GANJO)) + return false; + + if (bApply) + pCreature->m_AuraFlags |= UNIT_AURAFLAG_ALIVE_INVISIBLE; + else + pCreature->m_AuraFlags |= ~UNIT_AURAFLAG_ALIVE_INVISIBLE; + return false; } } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 48a02f7ad..f43decdb0 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2515" + #define SD2_REVISION_NR "2516" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 5d7bad3e1..6cdc22fce 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -158,13 +158,13 @@ UPDATE creature_template SET ScriptName='npc_tabard_vendor' WHERE entry=28776; /* SPELL */ UPDATE creature_template SET ScriptName='spell_dummy_npc' WHERE entry IN ( -- eastern kingdoms -1200, +1200,8888, -- kalimdor -12296,12298, +9299,12296,12298, -- outland 16880,16518,16847,17157,17326,17654,18879,22105,24918,25084,25085, -- northrend -23678,25752,25753,25758,25792,25793,26268,26270,26421,26616,26643,26841,27122,27263,27264,27265,27808,28053,28054,28068,28093,28465,28600,29319,29327,29329,29330,29338,30146,32149); +23678,25752,25753,25758,25792,25793,26268,26270,26421,26616,26643,26841,26924,27122,27263,27264,27265,27808,28053,28054,28068,28093,28465,28600,29319,29327,29329,29330,29338,30146,32149); UPDATE gameobject_template SET ScriptName='spell_dummy_go' WHERE entry IN (181616,186949); diff --git a/sql/updates/r2516_mangos.sql b/sql/updates/r2516_mangos.sql new file mode 100644 index 000000000..1ffde492f --- /dev/null +++ b/sql/updates/r2516_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='spell_dummy_npc' WHERE entry IN (8888,9299,26924); From 17382dc9d32333b1c80cdb59df386767dff6e444 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Fri, 13 Apr 2012 22:21:21 +0300 Subject: [PATCH 0505/1172] [2517] Improve script for Arlokk Note: triggered spell 24211 needs to be implemented in core, because it's missing from DBC ToDo: Add reset code for the Gong when the core will support this properly --- .../eastern_kingdoms/zulgurub/boss_arlokk.cpp | 305 +++++++++--------- .../zulgurub/instance_zulgurub.cpp | 42 +++ scripts/eastern_kingdoms/zulgurub/zulgurub.h | 10 + sd2_revision_nr.h | 2 +- 4 files changed, 208 insertions(+), 151 deletions(-) diff --git a/scripts/eastern_kingdoms/zulgurub/boss_arlokk.cpp b/scripts/eastern_kingdoms/zulgurub/boss_arlokk.cpp index 75cbfbdda..d8273677c 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_arlokk.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_arlokk.cpp @@ -16,43 +16,28 @@ /* ScriptData SDName: Boss_Arlokk -SD%Complete: 95 -SDComment: Wrong cleave and red aura is missing. +SD%Complete: 80 +SDComment: Vanish spell is replaced by workaround; Timers SDCategory: Zul'Gurub EndScriptData */ #include "precompiled.h" #include "zulgurub.h" -bool GOUse_go_gong_of_bethekk(Player* pPlayer, GameObject* pGo) -{ - if (ScriptedInstance* pInstance = (ScriptedInstance*)pGo->GetInstanceData()) - { - if (pInstance->GetData(TYPE_ARLOKK) == DONE || pInstance->GetData(TYPE_ARLOKK) == IN_PROGRESS) - return true; - - pInstance->SetData(TYPE_ARLOKK, IN_PROGRESS); - } - - return false; -} - enum { SAY_AGGRO = -1309011, SAY_FEAST_PANTHER = -1309012, SAY_DEATH = -1309013, - SPELL_SHADOWWORDPAIN = 23952, + SPELL_SHADOW_WORD_PAIN = 23952, SPELL_GOUGE = 24698, - SPELL_MARK = 24210, - SPELL_CLEAVE = 26350, //Perhaps not right. Not a red aura... + SPELL_MARK_ARLOKK = 24210, + SPELL_RAVAGE = 24213, + SPELL_TRASH = 3391, + SPELL_WHIRLWIND = 24236, SPELL_PANTHER_TRANSFORM = 24190, - MODEL_ID_NORMAL = 15218, - MODEL_ID_PANTHER = 15215, - MODEL_ID_BLANK = 11686, - NPC_ZULIAN_PROWLER = 15101 }; @@ -60,46 +45,39 @@ struct MANGOS_DLL_DECL boss_arlokkAI : public ScriptedAI { boss_arlokkAI(Creature* pCreature) : ScriptedAI(pCreature) { - m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_pInstance = (instance_zulgurub*)pCreature->GetInstanceData(); Reset(); } - ScriptedInstance* m_pInstance; + instance_zulgurub* m_pInstance; - uint32 m_uiShadowWordPain_Timer; - uint32 m_uiGouge_Timer; - uint32 m_uiMark_Timer; - uint32 m_uiCleave_Timer; - uint32 m_uiVanish_Timer; - uint32 m_uiVisible_Timer; - - uint32 m_uiSummon_Timer; - uint32 m_uiSummonCount; - - ObjectGuid m_markedGuid; + uint32 m_uiShadowWordPainTimer; + uint32 m_uiGougeTimer; + uint32 m_uiMarkTimer; + uint32 m_uiRavageTimer; + uint32 m_uiTrashTimer; + uint32 m_uiWhirlwindTimer; + uint32 m_uiVanishTimer; + uint32 m_uiVisibleTimer; + uint32 m_uiTransformTimer; + uint32 m_uiSummonTimer; bool m_bIsPhaseTwo; - bool m_bIsVanished; void Reset() { - m_uiShadowWordPain_Timer = 8000; - m_uiGouge_Timer = 14000; - m_uiMark_Timer = 35000; - m_uiCleave_Timer = 4000; - m_uiVanish_Timer = 60000; - m_uiVisible_Timer = 6000; - - m_uiSummon_Timer = 5000; - m_uiSummonCount = 0; + m_uiShadowWordPainTimer = 8000; + m_uiGougeTimer = 14000; + m_uiMarkTimer = 5000; + m_uiRavageTimer = 12000; + m_uiTrashTimer = 20000; + m_uiWhirlwindTimer = 15000; + m_uiTransformTimer = 30000; + m_uiVanishTimer = 5000; + m_uiVisibleTimer = 0; + m_uiSummonTimer = 5000; m_bIsPhaseTwo = false; - m_bIsVanished = false; - - m_markedGuid.Clear(); - - m_creature->SetDisplayId(MODEL_ID_NORMAL); - m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); } void Aggro(Unit* pWho) @@ -110,7 +88,7 @@ struct MANGOS_DLL_DECL boss_arlokkAI : public ScriptedAI void JustReachedHome() { if (m_pInstance) - m_pInstance->SetData(TYPE_ARLOKK, NOT_STARTED); + m_pInstance->SetData(TYPE_ARLOKK, FAIL); //we should be summoned, so despawn m_creature->ForcedDespawn(); @@ -119,150 +97,164 @@ struct MANGOS_DLL_DECL boss_arlokkAI : public ScriptedAI void JustDied(Unit* pKiller) { DoScriptText(SAY_DEATH, m_creature); - - m_creature->SetDisplayId(MODEL_ID_NORMAL); - m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + // Restore visibility in case of killed by dots + m_creature->SetVisibility(VISIBILITY_ON); if (m_pInstance) m_pInstance->SetData(TYPE_ARLOKK, DONE); } - void DoSummonPhanters() + void JustSummoned(Creature* pSummoned) { - if (Player* pPlayer = m_creature->GetMap()->GetPlayer(m_markedGuid)) - { - if (pPlayer->isAlive()) - DoScriptText(SAY_FEAST_PANTHER, m_creature, pPlayer); - } - - m_creature->SummonCreature(NPC_ZULIAN_PROWLER, -11532.7998f, -1649.6734f, 41.4800f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000); - m_creature->SummonCreature(NPC_ZULIAN_PROWLER, -11532.9970f, -1606.4840f, 41.2979f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000); + // Just attack a random target. The Marked player will attract them automatically + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + pSummoned->AI()->AttackStart(pTarget); } - void JustSummoned(Creature* pSummoned) + void UpdateAI(const uint32 uiDiff) { - if (Player* pPlayer = m_creature->GetMap()->GetPlayer(m_markedGuid)) + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + // Summon panters every 5 seconds + if (m_uiSummonTimer < uiDiff) { - if (pPlayer->isAlive()) - pSummoned->AI()->AttackStart(pPlayer); + if (m_pInstance) + { + if (Creature* pTrigger = m_pInstance->SelectRandomPantherTrigger(true)) + m_creature->SummonCreature(NPC_ZULIAN_PROWLER, pTrigger->GetPositionX(), pTrigger->GetPositionY(), pTrigger->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); + if (Creature* pTrigger = m_pInstance->SelectRandomPantherTrigger(false)) + m_creature->SummonCreature(NPC_ZULIAN_PROWLER, pTrigger->GetPositionX(), pTrigger->GetPositionY(), pTrigger->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); + } + + m_uiSummonTimer = 5000; } + else + m_uiSummonTimer -= uiDiff; - ++m_uiSummonCount; - } + if (m_uiVisibleTimer) + { + if (m_uiVisibleTimer <= uiDiff) + { + // Restore visibility + m_creature->SetVisibility(VISIBILITY_ON); - void UpdateAI(const uint32 uiDiff) - { - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + AttackStart(pTarget); + + m_uiVisibleTimer = 0; + } + else + m_uiVisibleTimer -= uiDiff; + + // Do nothing while vanished return; + } + // Troll phase if (!m_bIsPhaseTwo) { - if (m_uiShadowWordPain_Timer < uiDiff) + if (m_uiShadowWordPainTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_SHADOWWORDPAIN); - m_uiShadowWordPain_Timer = 15000; + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, SPELL_SHADOW_WORD_PAIN) == CAST_OK) + m_uiShadowWordPainTimer = 15000; + } } else - m_uiShadowWordPain_Timer -= uiDiff; + m_uiShadowWordPainTimer -= uiDiff; - if (m_uiMark_Timer < uiDiff) + if (m_uiMarkTimer < uiDiff) { - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0, SPELL_MARK_ARLOKK, SELECT_FLAG_PLAYER)) { - if (Player* pMark = pTarget->GetCharmerOrOwnerPlayerOrPlayerItself()) + if (DoCastSpellIfCan(pTarget, SPELL_MARK_ARLOKK) == CAST_OK) { - DoCastSpellIfCan(pMark, SPELL_MARK); - m_markedGuid = pMark->GetObjectGuid(); - } - else - { - m_markedGuid.Clear(); - error_log("SD2: boss_arlokk could not accuire a new target to mark."); + DoScriptText(SAY_FEAST_PANTHER, m_creature, pTarget); + m_uiMarkTimer = 30000; } } + } + else + m_uiMarkTimer -= uiDiff; + + if (m_uiGougeTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_GOUGE) == CAST_OK) + { + if (m_creature->getThreatManager().getThreat(m_creature->getVictim())) + m_creature->getThreatManager().modifyThreatPercent(m_creature->getVictim(),-80); - m_uiMark_Timer = 15000; + m_uiGougeTimer = urand(17000, 27000); + } } else - m_uiMark_Timer -= uiDiff; + m_uiGougeTimer -= uiDiff; + + // Transform to Panther + if (m_uiTransformTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_PANTHER_TRANSFORM) == CAST_OK) + { + m_uiTransformTimer = 80000; + m_bIsPhaseTwo = true; + } + } + else + m_uiTransformTimer -= uiDiff; } + // Panther phase else { - //Cleave_Timer - if (m_uiCleave_Timer < uiDiff) + if (m_uiRavageTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_CLEAVE); - m_uiCleave_Timer = 16000; + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_RAVAGE) == CAST_OK) + m_uiRavageTimer = urand(10000, 15000); } else - m_uiCleave_Timer -= uiDiff; + m_uiRavageTimer -= uiDiff; - //Gouge_Timer - if (m_uiGouge_Timer < uiDiff) + if (m_uiTrashTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_GOUGE); - - if (m_creature->getThreatManager().getThreat(m_creature->getVictim())) - m_creature->getThreatManager().modifyThreatPercent(m_creature->getVictim(),-80); - - m_uiGouge_Timer = urand(17000, 27000); + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_TRASH) == CAST_OK) + m_uiTrashTimer = urand(13000, 15000); } else - m_uiGouge_Timer -= uiDiff; - } + m_uiTrashTimer -= uiDiff; - if (m_uiSummonCount <= 30) - { - if (m_uiSummon_Timer < uiDiff) + if (m_uiWhirlwindTimer < uiDiff) { - DoSummonPhanters(); - m_uiSummon_Timer = 5000; + if (DoCastSpellIfCan(m_creature, SPELL_WHIRLWIND) == CAST_OK) + m_uiWhirlwindTimer = 15000; } else - m_uiSummon_Timer -= uiDiff; - } - - if (m_uiVanish_Timer < uiDiff) - { - //Invisble Model - m_creature->SetDisplayId(MODEL_ID_BLANK); - m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - - m_creature->AttackStop(); - DoResetThreat(); - - m_bIsVanished = true; + m_uiWhirlwindTimer -= uiDiff; - m_uiVanish_Timer = 45000; - m_uiVisible_Timer = 6000; - } - else - m_uiVanish_Timer -= uiDiff; - - if (m_bIsVanished) - { - if (m_uiVisible_Timer < uiDiff) + if (m_uiVanishTimer < uiDiff) { - //The Panther Model - m_creature->SetDisplayId(MODEL_ID_PANTHER); - m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - - const CreatureInfo *cinfo = m_creature->GetCreatureInfo(); - m_creature->SetBaseWeaponDamage(BASE_ATTACK, MINDAMAGE, (cinfo->mindmg +((cinfo->mindmg/100) * 35))); - m_creature->SetBaseWeaponDamage(BASE_ATTACK, MAXDAMAGE, (cinfo->maxdmg +((cinfo->maxdmg/100) * 35))); - m_creature->UpdateDamagePhysical(BASE_ATTACK); + // Note: this is a workaround because we do not know the real vanish spell + m_creature->SetVisibility(VISIBILITY_OFF); + DoResetThreat(); - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) - AttackStart(pTarget); + m_uiVanishTimer = 85000; + m_uiVisibleTimer = 45000; + } + else + m_uiVanishTimer -= uiDiff; - m_bIsPhaseTwo = true; - m_bIsVanished = false; + // Transform back + if (m_uiTransformTimer < uiDiff) + { + m_creature->RemoveAurasDueToSpell(SPELL_PANTHER_TRANSFORM); + m_uiTransformTimer = 30000; + m_bIsPhaseTwo = false; } else - m_uiVisible_Timer -= uiDiff; + m_uiTransformTimer -= uiDiff; } - else - DoMeleeAttackIfReady(); + + DoMeleeAttackIfReady(); } }; @@ -271,17 +263,30 @@ CreatureAI* GetAI_boss_arlokk(Creature* pCreature) return new boss_arlokkAI(pCreature); } +bool GOUse_go_gong_of_bethekk(Player* pPlayer, GameObject* pGo) +{ + if (ScriptedInstance* pInstance = (ScriptedInstance*)pGo->GetInstanceData()) + { + if (pInstance->GetData(TYPE_ARLOKK) == DONE || pInstance->GetData(TYPE_ARLOKK) == IN_PROGRESS) + return true; + + pInstance->SetData(TYPE_ARLOKK, IN_PROGRESS); + } + + return false; +} + void AddSC_boss_arlokk() { Script* pNewScript; pNewScript = new Script; - pNewScript->Name = "go_gong_of_bethekk"; - pNewScript->pGOUse = &GOUse_go_gong_of_bethekk; + pNewScript->Name = "boss_arlokk"; + pNewScript->GetAI = &GetAI_boss_arlokk; pNewScript->RegisterSelf(); pNewScript = new Script; - pNewScript->Name = "boss_arlokk"; - pNewScript->GetAI = &GetAI_boss_arlokk; + pNewScript->Name = "go_gong_of_bethekk"; + pNewScript->pGOUse = &GOUse_go_gong_of_bethekk; pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/zulgurub/instance_zulgurub.cpp b/scripts/eastern_kingdoms/zulgurub/instance_zulgurub.cpp index 6ed13e8a2..bc2e0d5f9 100644 --- a/scripts/eastern_kingdoms/zulgurub/instance_zulgurub.cpp +++ b/scripts/eastern_kingdoms/zulgurub/instance_zulgurub.cpp @@ -61,7 +61,25 @@ void instance_zulgurub::OnCreatureCreate(Creature* pCreature) case NPC_HAKKAR: m_mNpcEntryGuidStore[pCreature->GetEntry()] = pCreature->GetObjectGuid(); break; + case NPC_PANTHER_TRIGGER: + if (pCreature->GetPositionY() < -1626) + m_lLeftPantherTriggerGUIDList.push_back(pCreature->GetObjectGuid()); + else + m_lRightPantherTirggerGUIDList.push_back(pCreature->GetObjectGuid()); + break; + } +} + +void instance_zulgurub::OnObjectCreate(GameObject* pGo) +{ + switch (pGo->GetEntry()) + { + case GO_GONG_OF_BETHEKK: + case GO_FORCEFIELD: + break; } + + m_mGoEntryGuidStore[pGo->GetEntry()] = pGo->GetObjectGuid(); } void instance_zulgurub::SetData(uint32 uiType, uint32 uiData) @@ -72,10 +90,16 @@ void instance_zulgurub::SetData(uint32 uiType, uint32 uiData) case TYPE_VENOXIS: case TYPE_MARLI: case TYPE_THEKAL: + m_auiEncounter[uiType] = uiData; + if (uiData == DONE) + DoLowerHakkarHitPoints(); + break; case TYPE_ARLOKK: m_auiEncounter[uiType] = uiData; + DoUseDoorOrButton(GO_FORCEFIELD); if (uiData == DONE) DoLowerHakkarHitPoints(); + // ToDo: Reset the Gong on FAIL break; case TYPE_OHGAN: case TYPE_LORKHAN: @@ -144,6 +168,24 @@ uint32 instance_zulgurub::GetData(uint32 uiType) return 0; } +Creature* instance_zulgurub::SelectRandomPantherTrigger(bool bIsLeft) +{ + GUIDList* plTempList = bIsLeft ? &m_lLeftPantherTriggerGUIDList : &m_lRightPantherTirggerGUIDList; + std::vector vTriggers; + vTriggers.reserve(plTempList->size()); + + for (GUIDList::const_iterator itr = plTempList->begin(); itr != plTempList->end(); ++itr) + { + if (Creature* pTemp = instance->GetCreature(*itr)) + vTriggers.push_back(pTemp); + } + + if (vTriggers.empty()) + return NULL; + + return vTriggers[urand(0, vTriggers.size()-1)]; +} + InstanceData* GetInstanceData_instance_zulgurub(Map* pMap) { return new instance_zulgurub(pMap); diff --git a/scripts/eastern_kingdoms/zulgurub/zulgurub.h b/scripts/eastern_kingdoms/zulgurub/zulgurub.h index d63c7daf8..6b473cff5 100644 --- a/scripts/eastern_kingdoms/zulgurub/zulgurub.h +++ b/scripts/eastern_kingdoms/zulgurub/zulgurub.h @@ -24,6 +24,10 @@ enum NPC_THEKAL = 14509, NPC_JINDO = 11380, NPC_HAKKAR = 14834, + NPC_PANTHER_TRIGGER = 15091, + + GO_GONG_OF_BETHEKK = 180526, + GO_FORCEFIELD = 180497, SAY_MINION_DESTROY = -1309022, SAY_HAKKAR_PROTECT = -1309023, @@ -44,6 +48,7 @@ class MANGOS_DLL_DECL instance_zulgurub : public ScriptedInstance // IsEncounterInProgress() const { return false; } // not active in Zul'Gurub void OnCreatureCreate(Creature* pCreature); + void OnObjectCreate(GameObject* pGo); void SetData(uint32 uiType, uint32 uiData); uint32 GetData(uint32 uiType); @@ -53,12 +58,17 @@ class MANGOS_DLL_DECL instance_zulgurub : public ScriptedInstance void DoYellAtTriggerIfCan(uint32 uiTriggerId); + Creature* SelectRandomPantherTrigger(bool bIsLeft); + protected: void DoLowerHakkarHitPoints(); uint32 m_auiEncounter[MAX_ENCOUNTER]; std::string m_strInstData; + GUIDList m_lRightPantherTirggerGUIDList; + GUIDList m_lLeftPantherTriggerGUIDList; + bool m_bHasIntroYelled; bool m_bHasAltarYelled; }; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index f43decdb0..d34ffaeab 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2516" + #define SD2_REVISION_NR "2517" #endif // __SD2_REVISION_NR_H__ From 02a24cf938389a0ad9e05d0c704fa34d9d75623b Mon Sep 17 00:00:00 2001 From: Xfurry Date: Fri, 13 Apr 2012 23:08:06 +0300 Subject: [PATCH 0506/1172] [2518] Add missing supprt for Lethon's Spirit Shades Based on the previous work of Schmoozerd --- scripts/world/bosses_emerald_dragons.cpp | 64 ++++++++++++++++++++++++ sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 + sql/updates/r2518_mangos.sql | 1 + 4 files changed, 67 insertions(+), 1 deletion(-) create mode 100644 sql/updates/r2518_mangos.sql diff --git a/scripts/world/bosses_emerald_dragons.cpp b/scripts/world/bosses_emerald_dragons.cpp index 5e0c3e0e6..84b4222b5 100644 --- a/scripts/world/bosses_emerald_dragons.cpp +++ b/scripts/world/bosses_emerald_dragons.cpp @@ -24,6 +24,8 @@ EndScriptData */ /* ContentData boss_emerald_dragon -- Superclass for the four dragons boss_emeriss +boss_lethon +npc_spirit_shade boss_taerar boss_shade_of_taerar -- TODO move to Acid boss_ysondre @@ -230,6 +232,7 @@ enum SPELL_DRAW_SPIRIT = 24811, SPELL_SUMMON_SPIRIT_SHADE = 24810, // Summon spell was removed, was SPELL_EFFECT_SUMMON_DEMON + NPC_LETHON = 14888, NPC_SPIRIT_SHADE = 15261, // Add summoned by Lethon SPELL_DARK_OFFERING = 24804, SPELL_SPIRIT_SHAPE_VISUAL = 24809, @@ -257,6 +260,57 @@ struct MANGOS_DLL_DECL boss_lethonAI : public boss_emerald_dragonAI return false; } + + // Need this code here, as SPELL_DRAW_SPIRIT has no Script- or Dummyeffect + void SpellHitTarget(Unit* pTarget, const SpellEntry* pSpell) + { + // Summon a shade for each player hit + if (pTarget->GetTypeId() == TYPEID_PLAYER && pSpell->Id == SPELL_DRAW_SPIRIT) + { + // Summon this way, to be able to cast the shade visual spell with player as original caster + // This might not be supported currently by core, but this spell's visual should be dependend on the player + // Also possible that this was no problem due to the special way these NPCs had been summoned in classic times + if (Creature* pSummoned = pTarget->SummonCreature(NPC_SPIRIT_SHADE, 0.0f, 0.0f, 0.0f, pTarget->GetOrientation(), TEMPSUMMON_DEAD_DESPAWN, 0)) + pSummoned->CastSpell(pSummoned, SPELL_SPIRIT_SHAPE_VISUAL, true, NULL, NULL, pTarget->GetObjectGuid()); + } + } + + void JustSummoned(Creature* pSummoned) + { + // Move the shade to lethon + if (pSummoned->GetEntry() == NPC_SPIRIT_SHADE) + pSummoned->GetMotionMaster()->MoveFollow(m_creature, 0.0f, 0.0f); + else + boss_emerald_dragonAI::JustSummoned(pSummoned); + } +}; + +struct MANGOS_DLL_DECL npc_spirit_shadeAI : public ScriptedAI +{ + npc_spirit_shadeAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } + + bool m_bHasHealed; + + void Reset() + { + m_bHasHealed = false; + } + + void MoveInLineOfSight(Unit* pWho) + { + if (!m_bHasHealed && pWho->GetEntry() == NPC_LETHON && pWho->IsWithinDistInMap(m_creature, 3.0f)) + { + if (DoCastSpellIfCan(pWho, SPELL_DARK_OFFERING) == CAST_OK) + { + m_bHasHealed = true; + m_creature->ForcedDespawn(1000); + } + } + } + + void AttackStart(Unit* pWho) { } + + void UpdateAI(const uint32 uiDiff) { } }; CreatureAI* GetAI_boss_lethon(Creature* pCreature) @@ -264,6 +318,11 @@ CreatureAI* GetAI_boss_lethon(Creature* pCreature) return new boss_lethonAI(pCreature); } +CreatureAI* GetAI_npc_spirit_shade(Creature* pCreature) +{ + return new npc_spirit_shadeAI(pCreature); +} + /*###### ## boss_taerar ######*/ @@ -561,6 +620,11 @@ void AddSC_bosses_emerald_dragons() pNewScript->GetAI = &GetAI_boss_lethon; pNewScript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "npc_spirit_shade"; + pNewScript->GetAI = &GetAI_npc_spirit_shade; + pNewScript->RegisterSelf(); + pNewScript = new Script; pNewScript->Name = "boss_taerar"; pNewScript->GetAI = &GetAI_boss_taerar; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index d34ffaeab..9d9a1dd73 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2517" + #define SD2_REVISION_NR "2518" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 6cdc22fce..570ad41a7 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -83,6 +83,7 @@ UPDATE creature_template SET ScriptName='boss_kruul' WHERE entry=18338; UPDATE creature_template SET ScriptName='boss_azuregos' WHERE entry=6109; UPDATE creature_template SET ScriptName='mob_dementeddruids' WHERE entry=15260; UPDATE creature_template SET ScriptName='boss_lethon' WHERE entry=14888; +UPDATE creature_template SET ScriptName='npc_spirit_shade' WHERE entry=15261; /* GO */ UPDATE gameobject_template SET ScriptName='go_cat_figurine' WHERE entry=13873; diff --git a/sql/updates/r2518_mangos.sql b/sql/updates/r2518_mangos.sql new file mode 100644 index 000000000..4583c0e9d --- /dev/null +++ b/sql/updates/r2518_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_spirit_shade' WHERE entry=15261; From 8d9a82cdd3a91ab5d5a21cbebef6aee92102d274 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Sun, 15 Apr 2012 02:22:13 +0200 Subject: [PATCH 0507/1172] [2519] Take new MaNGOS GridSearchers for scripting use. Requires MaNGOS 11962 --- include/precompiled.h | 6 ++++ include/sc_creature.cpp | 4 +++ include/sc_creature.h | 2 -- include/sc_grid_searchers.cpp | 14 +++++++--- include/sc_grid_searchers.h | 48 ++------------------------------ sd2_revision_nr.h | 2 +- sql/scriptdev2_script_full.sql | 2 +- sql/updates/r2519_scriptdev2.sql | 1 + 8 files changed, 26 insertions(+), 53 deletions(-) create mode 100644 sql/updates/r2519_scriptdev2.sql diff --git a/include/precompiled.h b/include/precompiled.h index 85c5e2ec3..c401b4072 100644 --- a/include/precompiled.h +++ b/include/precompiled.h @@ -6,10 +6,16 @@ #define SC_PRECOMPILED_H #include "../ScriptMgr.h" +#include "Object.h" +#include "Unit.h" +#include "Creature.h" +#include "CreatureAI.h" +#include "GameObject.h" #include "sc_creature.h" #include "sc_gossip.h" #include "sc_grid_searchers.h" #include "sc_instance.h" +#include "SpellAuras.h" #ifdef WIN32 # include diff --git a/include/sc_creature.cpp b/include/sc_creature.cpp index edd63b0d3..4db83aac4 100644 --- a/include/sc_creature.cpp +++ b/include/sc_creature.cpp @@ -7,6 +7,10 @@ #include "Spell.h" #include "WorldPacket.h" #include "ObjectMgr.h" +#include "Cell.h" +#include "CellImpl.h" +#include "GridNotifiers.h" +#include "GridNotifiersImpl.h" // Spell summary for ScriptedAI::SelectSpell struct TSpellSummary diff --git a/include/sc_creature.h b/include/sc_creature.h index 23c6e8606..e5eb5075e 100644 --- a/include/sc_creature.h +++ b/include/sc_creature.h @@ -5,8 +5,6 @@ #ifndef SC_CREATURE_H #define SC_CREATURE_H -#include "CreatureAI.h" -#include "Creature.h" #include "Chat.h" //Spell targets used by SelectSpell diff --git a/include/sc_grid_searchers.cpp b/include/sc_grid_searchers.cpp index 6202e78ae..733aa8202 100644 --- a/include/sc_grid_searchers.cpp +++ b/include/sc_grid_searchers.cpp @@ -4,6 +4,12 @@ #include "precompiled.h" +#include "Cell.h" +#include "CellImpl.h" +#include "GridNotifiers.h" +#include "GridNotifiersImpl.h" + + //return closest GO in grid, with range from pSource GameObject* GetClosestGameObjectWithEntry(WorldObject* pSource, uint32 uiEntry, float fMaxSearchRange) { @@ -32,16 +38,16 @@ Creature* GetClosestCreatureWithEntry(WorldObject* pSource, uint32 uiEntry, floa void GetGameObjectListWithEntryInGrid(std::list& lList , WorldObject* pSource, uint32 uiEntry, float fMaxSearchRange) { - AllGameObjectsWithEntryInRangeCheck check(pSource, uiEntry, fMaxSearchRange); - MaNGOS::GameObjectListSearcher searcher(lList, check); + MaNGOS::GameObjectEntryInPosRangeCheck check(*pSource, uiEntry, pSource->GetPositionX(), pSource->GetPositionY(), pSource->GetPositionZ(), fMaxSearchRange); + MaNGOS::GameObjectListSearcher searcher(lList, check); Cell::VisitGridObjects(pSource, searcher, fMaxSearchRange); } void GetCreatureListWithEntryInGrid(std::list& lList, WorldObject* pSource, uint32 uiEntry, float fMaxSearchRange) { - AllCreaturesOfEntryInRangeCheck check(pSource, uiEntry, fMaxSearchRange); - MaNGOS::CreatureListSearcher searcher(lList, check); + MaNGOS::AllCreaturesOfEntryInRangeCheck check(pSource, uiEntry, fMaxSearchRange); + MaNGOS::CreatureListSearcher searcher(lList, check); Cell::VisitGridObjects(pSource, searcher, fMaxSearchRange); } diff --git a/include/sc_grid_searchers.h b/include/sc_grid_searchers.h index 94f0b01b1..9290acced 100644 --- a/include/sc_grid_searchers.h +++ b/include/sc_grid_searchers.h @@ -5,13 +5,9 @@ #ifndef SC_GRIDSEARCH_H #define SC_GRIDSEARCH_H -#include "Unit.h" -#include "GameObject.h" - -#include "Cell.h" -#include "CellImpl.h" -#include "GridNotifiers.h" -#include "GridNotifiersImpl.h" +#include "Object.h" +class GameObject; +class Creature; struct ObjectDistanceOrder : public std::binary_function { @@ -43,44 +39,6 @@ Creature* GetClosestCreatureWithEntry(WorldObject* pSource, uint32 uiEntry, floa void GetGameObjectListWithEntryInGrid(std::list& lList , WorldObject* pSource, uint32 uiEntry, float fMaxSearchRange); void GetCreatureListWithEntryInGrid(std::list& lList, WorldObject* pSource, uint32 uiEntry, float fMaxSearchRange); -class AllGameObjectsWithEntryInRangeCheck -{ - public: - AllGameObjectsWithEntryInRangeCheck(const WorldObject* pObject, uint32 uiEntry, float fMaxRange) : m_pObject(pObject), m_uiEntry(uiEntry), m_fRange(fMaxRange) {} - WorldObject const& GetFocusObject() const { return *m_pObject; } - bool operator() (GameObject* pGo) - { - if (pGo->GetEntry() == m_uiEntry && m_pObject->IsWithinDist(pGo,m_fRange,false)) - return true; - - return false; - } - - private: - const WorldObject* m_pObject; - uint32 m_uiEntry; - float m_fRange; -}; - -class AllCreaturesOfEntryInRangeCheck -{ - public: - AllCreaturesOfEntryInRangeCheck(const WorldObject* pObject, uint32 uiEntry, float fMaxRange) : m_pObject(pObject), m_uiEntry(uiEntry), m_fRange(fMaxRange) {} - WorldObject const& GetFocusObject() const { return *m_pObject; } - bool operator() (Unit* pUnit) - { - if (pUnit->GetEntry() == m_uiEntry && m_pObject->IsWithinDist(pUnit,m_fRange,false)) - return true; - - return false; - } - - private: - const WorldObject* m_pObject; - uint32 m_uiEntry; - float m_fRange; -}; - //Used in: hyjalAI.cpp /* class AllFriendlyCreaturesInGrid diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 9d9a1dd73..b7f80a290 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2518" + #define SD2_REVISION_NR "2519" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 3c90ad33d..90578163c 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -3,7 +3,7 @@ -- DELETE FROM sd2_db_version; -INSERT INTO sd2_db_version (version) VALUES ('ScriptDev2 (for MaNGOS 11942+) '); +INSERT INTO sd2_db_version (version) VALUES ('ScriptDev2 (for MaNGOS 11962+) '); -- -- Below contains data for table `script_texts` mainly used in C++ parts. diff --git a/sql/updates/r2519_scriptdev2.sql b/sql/updates/r2519_scriptdev2.sql new file mode 100644 index 000000000..fc48f40a9 --- /dev/null +++ b/sql/updates/r2519_scriptdev2.sql @@ -0,0 +1 @@ +UPDATE sd2_db_version SET version='ScriptDev2 (for MaNGOS 11962+) '; From 303e7d74d069334c12f6c8f679a6635bb15342b6 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Sun, 15 Apr 2012 02:43:31 +0200 Subject: [PATCH 0508/1172] [2520] Add new wrapper functions to toggle GameObject flags --- include/sc_instance.cpp | 33 +++++++++++++++++++++++++++++++++ include/sc_instance.h | 4 ++++ sd2_revision_nr.h | 2 +- 3 files changed, 38 insertions(+), 1 deletion(-) diff --git a/include/sc_instance.cpp b/include/sc_instance.cpp index 4be84b81b..cd56815b9 100644 --- a/include/sc_instance.cpp +++ b/include/sc_instance.cpp @@ -67,6 +67,39 @@ void ScriptedInstance::DoRespawnGameObject(ObjectGuid guid, uint32 uiTimeToDespa } } +/// Function that uses a door or button that is stored in m_mGoEntryGuidStore +void ScriptedInstance::DoToggleGameObjectFlags(uint32 uiEntry, uint32 uiGOflags, bool bApply) +{ + EntryGuidMap::iterator find = m_mGoEntryGuidStore.find(uiEntry); + if (find != m_mGoEntryGuidStore.end()) + ToggleGameObjectFlags(find->second, uiGOflags, bApply); + else + // Output log, possible reason is not added GO to storage, or not yet loaded + debug_log("SD2: Script call ToogleTameObjectFlags (by Entry), but no gameobject of entry %u was created yet, or it was not stored by script for map %u.", uiEntry, instance->GetId()); +} + +/** + Function that toggles the GO-flags of a GameObject + + @param guid The ObjectGuid of the GO that will be respawned + @param uiGOflags Which GO-flags to toggle + @param bApply should the GO-flags be applied or removed? + */ +void ScriptedInstance::DoToggleGameObjectFlags(ObjectGuid guid, uint32 uiGOflags, bool bApply) +{ + if (!guid) + return; + + if (GameObject* pGo = instance->GetGameObject(guid)) + { + if (bApply) + pGo->SetFlag(GAMEOBJECT_FLAGS, uiGOflags); + else + pGo->RemoveFlag(GAMEOBJECT_FLAGS, uiGOflags); + } +} + + /// Function that respawns a despawned GO that is stored in m_mGoEntryGuidStore void ScriptedInstance::DoRespawnGameObject(uint32 uiEntry, uint32 uiTimeToDespawn) { diff --git a/include/sc_instance.h b/include/sc_instance.h index dca852b95..e1469e5d0 100644 --- a/include/sc_instance.h +++ b/include/sc_instance.h @@ -41,6 +41,10 @@ class MANGOS_DLL_DECL ScriptedInstance : public InstanceData void DoRespawnGameObject(ObjectGuid guid, uint32 uiTimeToDespawn = MINUTE); void DoRespawnGameObject(uint32 uiEntry, uint32 uiTimeToDespawn = MINUTE); + // Toggle the flags of a GO + void DoToggleGameObjectFlags(ObjectGuid guid, uint32 uiGOflags, bool bApply); + void DoToggleGameObjectFlags(uint32 uiEntry, uint32 uiGOflags, bool bApply); + // Sends world state update to all players in instance void DoUpdateWorldState(uint32 uiStateId, uint32 uiStateData); diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index b7f80a290..4c38e855e 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2519" + #define SD2_REVISION_NR "2520" #endif // __SD2_REVISION_NR_H__ From bbead0203022dcf1f0aa59fa93c1038fff995809 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Sun, 15 Apr 2012 03:07:13 +0200 Subject: [PATCH 0509/1172] [2521] Use previously added wrapper --- include/sc_instance.cpp | 2 +- .../blackwing_lair/instance_blackwing_lair.cpp | 6 ++---- .../karazhan/instance_karazhan.cpp | 3 +-- .../sunken_temple/instance_sunken_temple.cpp | 11 +---------- scripts/eastern_kingdoms/zulaman/zulaman.cpp | 3 +-- scripts/northrend/nexus/nexus/instance_nexus.cpp | 15 +++------------ .../northrend/nexus/oculus/instance_oculus.cpp | 5 +---- .../halls_of_stone/instance_halls_of_stone.cpp | 3 +-- .../sethekk_halls/instance_sethekk_halls.cpp | 4 +--- sd2_revision_nr.h | 2 +- 10 files changed, 13 insertions(+), 41 deletions(-) diff --git a/include/sc_instance.cpp b/include/sc_instance.cpp index cd56815b9..c7939126d 100644 --- a/include/sc_instance.cpp +++ b/include/sc_instance.cpp @@ -72,7 +72,7 @@ void ScriptedInstance::DoToggleGameObjectFlags(uint32 uiEntry, uint32 uiGOflags, { EntryGuidMap::iterator find = m_mGoEntryGuidStore.find(uiEntry); if (find != m_mGoEntryGuidStore.end()) - ToggleGameObjectFlags(find->second, uiGOflags, bApply); + DoToggleGameObjectFlags(find->second, uiGOflags, bApply); else // Output log, possible reason is not added GO to storage, or not yet loaded debug_log("SD2: Script call ToogleTameObjectFlags (by Entry), but no gameobject of entry %u was created yet, or it was not stored by script for map %u.", uiEntry, instance->GetId()); diff --git a/scripts/eastern_kingdoms/blackwing_lair/instance_blackwing_lair.cpp b/scripts/eastern_kingdoms/blackwing_lair/instance_blackwing_lair.cpp index 20b0e20ea..0ce50b361 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/instance_blackwing_lair.cpp +++ b/scripts/eastern_kingdoms/blackwing_lair/instance_blackwing_lair.cpp @@ -109,8 +109,7 @@ void instance_blackwing_lair::SetData(uint32 uiType, uint32 uiData) else if (uiData == FAIL) { // Reset the Orb of Domination and the eggs - if (GameObject* pOrb = GetSingleGameObjectFromStorage(GO_ORB_OF_DOMINATION)) - pOrb->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NO_INTERACT); + DoToggleGameObjectFlags(GO_ORB_OF_DOMINATION, GO_FLAG_NO_INTERACT, true); // ToDo: reset the Dragon Eggs } @@ -195,8 +194,7 @@ void instance_blackwing_lair::OnCreatureDeath(Creature* pCreature) { if (pCreature->GetEntry() == NPC_GRETHOK_CONTROLLER) { - if (GameObject* pOrb = GetSingleGameObjectFromStorage(GO_ORB_OF_DOMINATION)) - pOrb->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NO_INTERACT); + DoToggleGameObjectFlags(GO_ORB_OF_DOMINATION, GO_FLAG_NO_INTERACT, false); if (Creature* pOrbTrigger = GetSingleCreatureFromStorage(NPC_BLACKWING_ORB_TRIGGER)) pOrbTrigger->InterruptNonMeleeSpells(false); diff --git a/scripts/eastern_kingdoms/karazhan/instance_karazhan.cpp b/scripts/eastern_kingdoms/karazhan/instance_karazhan.cpp index 21002acdb..124e0aa9c 100644 --- a/scripts/eastern_kingdoms/karazhan/instance_karazhan.cpp +++ b/scripts/eastern_kingdoms/karazhan/instance_karazhan.cpp @@ -146,8 +146,7 @@ void instance_karazhan::SetData(uint32 uiType, uint32 uiData) { DoUseDoorOrButton(GO_STAGE_DOOR_LEFT); DoUseDoorOrButton(GO_STAGE_DOOR_RIGHT); - if (GameObject* pSideEntrance = GetSingleGameObjectFromStorage(GO_SIDE_ENTRANCE_DOOR)) - pSideEntrance->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_LOCKED); + DoToggleGameObjectFlags(GO_SIDE_ENTRANCE_DOOR, GO_FLAG_LOCKED, false); } break; case TYPE_CURATOR: diff --git a/scripts/eastern_kingdoms/sunken_temple/instance_sunken_temple.cpp b/scripts/eastern_kingdoms/sunken_temple/instance_sunken_temple.cpp index 51b5e70cf..f77708088 100644 --- a/scripts/eastern_kingdoms/sunken_temple/instance_sunken_temple.cpp +++ b/scripts/eastern_kingdoms/sunken_temple/instance_sunken_temple.cpp @@ -304,16 +304,7 @@ bool instance_sunken_temple::ProcessStatueEvent(uint32 uiEventId) void instance_sunken_temple::DoUpdateFlamesFlags(bool bRestore) { for (GUIDList::const_iterator itr = m_luiFlameGUIDs.begin(); itr != m_luiFlameGUIDs.end(); ++itr) - { - if (GameObject* pFlame = instance->GetGameObject(*itr)) - { - // Remove the flags of the flames for Hakkar event - if (!bRestore) - pFlame->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NO_INTERACT); - else - pFlame->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NO_INTERACT); - } - } + DoToggleGameObjectFlags(*itr, GO_FLAG_NO_INTERACT, bRestore); } void instance_sunken_temple::Load(const char* chrIn) diff --git a/scripts/eastern_kingdoms/zulaman/zulaman.cpp b/scripts/eastern_kingdoms/zulaman/zulaman.cpp index aa19923c6..d8305a5ea 100644 --- a/scripts/eastern_kingdoms/zulaman/zulaman.cpp +++ b/scripts/eastern_kingdoms/zulaman/zulaman.cpp @@ -143,8 +143,7 @@ struct MANGOS_DLL_DECL npc_harrison_jones_zaAI : public npc_escortAI case 1: DoScriptText(SAY_AT_GONG, m_creature); - if (GameObject* pStrangeGong = m_pInstance->GetSingleGameObjectFromStorage(GO_STRANGE_GONG)) - pStrangeGong->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NO_INTERACT); + m_pInstance->DoToggleGameObjectFlags(GO_STRANGE_GONG, GO_FLAG_NO_INTERACT, false); //Start bang gong for 2min m_creature->CastSpell(m_creature, SPELL_BANGING_THE_GONG, false); diff --git a/scripts/northrend/nexus/nexus/instance_nexus.cpp b/scripts/northrend/nexus/nexus/instance_nexus.cpp index ce3f9c3e4..7a11840a4 100644 --- a/scripts/northrend/nexus/nexus/instance_nexus.cpp +++ b/scripts/northrend/nexus/nexus/instance_nexus.cpp @@ -101,28 +101,19 @@ void instance_nexus::SetData(uint32 uiType, uint32 uiData) if (uiData == IN_PROGRESS) SetSpecialAchievementCriteria(TYPE_ACHIEV_SPLIT_PERSONALITY, true); if (uiData == DONE) - { - if (GameObject* pGo = GetSingleGameObjectFromStorage(GO_CONTAINMENT_SPHERE_TELESTRA)) - pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NO_INTERACT); - } + DoToggleGameObjectFlags(GO_CONTAINMENT_SPHERE_TELESTRA, GO_FLAG_NO_INTERACT, false); break; case TYPE_ANOMALUS: m_auiEncounter[uiType] = uiData; if (uiData == IN_PROGRESS) SetSpecialAchievementCriteria(TYPE_ACHIEV_CHAOS_THEORY, true); if (uiData == DONE) - { - if (GameObject* pGo = GetSingleGameObjectFromStorage(GO_CONTAINMENT_SPHERE_ANOMALUS)) - pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NO_INTERACT); - } + DoToggleGameObjectFlags(GO_CONTAINMENT_SPHERE_ANOMALUS, GO_FLAG_NO_INTERACT, false); break; case TYPE_ORMOROK: m_auiEncounter[uiType] = uiData; if (uiData == DONE) - { - if (GameObject* pGo = GetSingleGameObjectFromStorage(GO_CONTAINMENT_SPHERE_ORMOROK)) - pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NO_INTERACT); - } + DoToggleGameObjectFlags(GO_CONTAINMENT_SPHERE_ORMOROK, GO_FLAG_NO_INTERACT, false); break; case TYPE_KERISTRASZA: m_auiEncounter[uiType] = uiData; diff --git a/scripts/northrend/nexus/oculus/instance_oculus.cpp b/scripts/northrend/nexus/oculus/instance_oculus.cpp index 5a5c4f7a8..6574e31c3 100644 --- a/scripts/northrend/nexus/oculus/instance_oculus.cpp +++ b/scripts/northrend/nexus/oculus/instance_oculus.cpp @@ -73,10 +73,7 @@ void instance_oculus::SetData(uint32 uiType, uint32 uiData) case TYPE_EREGOS: m_auiEncounter[TYPE_EREGOS] = uiData; if (uiData == DONE) - { - if (GameObject* pChest = GetSingleGameObjectFromStorage(instance->IsRegularDifficulty() ? GO_CACHE_EREGOS : GO_CACHE_EREGOS_H)) - pChest->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NO_INTERACT); - } + DoToggleGameObjectFlags(instance->IsRegularDifficulty() ? GO_CACHE_EREGOS : GO_CACHE_EREGOS_H, GO_FLAG_NO_INTERACT, false); break; } diff --git a/scripts/northrend/ulduar/halls_of_stone/instance_halls_of_stone.cpp b/scripts/northrend/ulduar/halls_of_stone/instance_halls_of_stone.cpp index 21cdf5464..dca0cea13 100644 --- a/scripts/northrend/ulduar/halls_of_stone/instance_halls_of_stone.cpp +++ b/scripts/northrend/ulduar/halls_of_stone/instance_halls_of_stone.cpp @@ -113,8 +113,7 @@ void instance_halls_of_stone::SetData(uint32 uiType, uint32 uiData) SortFaces(); break; case DONE: - if (GameObject* pChest = GetSingleGameObjectFromStorage(instance->IsRegularDifficulty() ? GO_TRIBUNAL_CHEST : GO_TRIBUNAL_CHEST_H)) - pChest->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NO_INTERACT); + DoToggleGameObjectFlags(instance->IsRegularDifficulty() ? GO_TRIBUNAL_CHEST : GO_TRIBUNAL_CHEST_H, GO_FLAG_NO_INTERACT, false); // Door workaround because of the missing Bran event DoUseDoorOrButton(GO_DOOR_SJONNIR); break; diff --git a/scripts/outland/auchindoun/sethekk_halls/instance_sethekk_halls.cpp b/scripts/outland/auchindoun/sethekk_halls/instance_sethekk_halls.cpp index a93b971ed..05e43c163 100644 --- a/scripts/outland/auchindoun/sethekk_halls/instance_sethekk_halls.cpp +++ b/scripts/outland/auchindoun/sethekk_halls/instance_sethekk_halls.cpp @@ -65,9 +65,7 @@ void instance_sethekk_halls::SetData(uint32 uiType, uint32 uiData) if (uiData == DONE) { DoUseDoorOrButton(GO_IKISS_DOOR, DAY); - - if(GameObject* pChest = GetSingleGameObjectFromStorage(GO_IKISS_CHEST)) - pChest->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NO_INTERACT | GO_FLAG_INTERACT_COND); + DoToggleGameObjectFlags(GO_IKISS_CHEST, GO_FLAG_NO_INTERACT | GO_FLAG_INTERACT_COND, false); } m_auiEncounter[uiType] = uiData; break; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 4c38e855e..616813124 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2520" + #define SD2_REVISION_NR "2521" #endif // __SD2_REVISION_NR_H__ From c5139c1791a6c7ada010774a09646b1a8d877c23 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Sun, 15 Apr 2012 03:09:34 +0200 Subject: [PATCH 0510/1172] [2522] Make chest in Hellfire Ramparts accessable. Thanks to X-Saviour for research --- .../hellfire_ramparts/instance_hellfire_ramparts.cpp | 3 +++ sd2_revision_nr.h | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/outland/hellfire_citadel/hellfire_ramparts/instance_hellfire_ramparts.cpp b/scripts/outland/hellfire_citadel/hellfire_ramparts/instance_hellfire_ramparts.cpp index ccb95bbd7..01ef20c25 100644 --- a/scripts/outland/hellfire_citadel/hellfire_ramparts/instance_hellfire_ramparts.cpp +++ b/scripts/outland/hellfire_citadel/hellfire_ramparts/instance_hellfire_ramparts.cpp @@ -84,7 +84,10 @@ void instance_ramparts::SetData(uint32 uiType, uint32 uiData) return; } if (uiData == DONE && m_auiEncounter[0] == DONE) + { DoRespawnGameObject(instance->IsRegularDifficulty() ? GO_FEL_IRON_CHEST : GO_FEL_IRON_CHEST_H, HOUR); + DoToggleGameObjectFlags(instance->IsRegularDifficulty() ? GO_FEL_IRON_CHEST : GO_FEL_IRON_CHEST_H, GO_FLAG_NO_INTERACT, false); + } if (uiData == FAIL && m_auiEncounter[1] != FAIL) DoFailVazruden(); diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 616813124..e4c06508c 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2521" + #define SD2_REVISION_NR "2522" #endif // __SD2_REVISION_NR_H__ From 1388a2722272c68e583d867258d560e18489c2ee Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sun, 15 Apr 2012 12:11:49 +0300 Subject: [PATCH 0511/1172] [2523] Add visibility check for Arlokk and fix typo from [2517] --- scripts/eastern_kingdoms/zulgurub/boss_arlokk.cpp | 7 ++++++- scripts/eastern_kingdoms/zulgurub/instance_zulgurub.cpp | 2 +- scripts/eastern_kingdoms/zulgurub/zulgurub.h | 2 +- sd2_revision_nr.h | 2 +- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/scripts/eastern_kingdoms/zulgurub/boss_arlokk.cpp b/scripts/eastern_kingdoms/zulgurub/boss_arlokk.cpp index d8273677c..70341fba9 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_arlokk.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_arlokk.cpp @@ -78,6 +78,10 @@ struct MANGOS_DLL_DECL boss_arlokkAI : public ScriptedAI m_uiSummonTimer = 5000; m_bIsPhaseTwo = false; + + // Restore visibility + if (m_creature->GetVisibility() != VISIBILITY_ON) + m_creature->SetVisibility(VISIBILITY_ON); } void Aggro(Unit* pWho) @@ -98,7 +102,8 @@ struct MANGOS_DLL_DECL boss_arlokkAI : public ScriptedAI { DoScriptText(SAY_DEATH, m_creature); // Restore visibility in case of killed by dots - m_creature->SetVisibility(VISIBILITY_ON); + if (m_creature->GetVisibility() != VISIBILITY_ON) + m_creature->SetVisibility(VISIBILITY_ON); if (m_pInstance) m_pInstance->SetData(TYPE_ARLOKK, DONE); diff --git a/scripts/eastern_kingdoms/zulgurub/instance_zulgurub.cpp b/scripts/eastern_kingdoms/zulgurub/instance_zulgurub.cpp index bc2e0d5f9..fb76f3ccd 100644 --- a/scripts/eastern_kingdoms/zulgurub/instance_zulgurub.cpp +++ b/scripts/eastern_kingdoms/zulgurub/instance_zulgurub.cpp @@ -170,7 +170,7 @@ uint32 instance_zulgurub::GetData(uint32 uiType) Creature* instance_zulgurub::SelectRandomPantherTrigger(bool bIsLeft) { - GUIDList* plTempList = bIsLeft ? &m_lLeftPantherTriggerGUIDList : &m_lRightPantherTirggerGUIDList; + GUIDList* plTempList = bIsLeft ? &m_lLeftPantherTriggerGUIDList : &m_lRightPantherTriggerGUIDList; std::vector vTriggers; vTriggers.reserve(plTempList->size()); diff --git a/scripts/eastern_kingdoms/zulgurub/zulgurub.h b/scripts/eastern_kingdoms/zulgurub/zulgurub.h index 6b473cff5..b37eab7eb 100644 --- a/scripts/eastern_kingdoms/zulgurub/zulgurub.h +++ b/scripts/eastern_kingdoms/zulgurub/zulgurub.h @@ -66,7 +66,7 @@ class MANGOS_DLL_DECL instance_zulgurub : public ScriptedInstance uint32 m_auiEncounter[MAX_ENCOUNTER]; std::string m_strInstData; - GUIDList m_lRightPantherTirggerGUIDList; + GUIDList m_lRightPantherTriggerGUIDList; GUIDList m_lLeftPantherTriggerGUIDList; bool m_bHasIntroYelled; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index e4c06508c..ace82e85b 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2522" + #define SD2_REVISION_NR "2523" #endif // __SD2_REVISION_NR_H__ From 5bc7e0ec36400e2a2a7d25a5050a116fb0d3d459 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Sun, 15 Apr 2012 11:57:43 +0200 Subject: [PATCH 0512/1172] [2524] Fix typo, thanks to NeatElves for pointing --- scripts/eastern_kingdoms/zulgurub/instance_zulgurub.cpp | 2 +- sd2_revision_nr.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/eastern_kingdoms/zulgurub/instance_zulgurub.cpp b/scripts/eastern_kingdoms/zulgurub/instance_zulgurub.cpp index fb76f3ccd..62de98485 100644 --- a/scripts/eastern_kingdoms/zulgurub/instance_zulgurub.cpp +++ b/scripts/eastern_kingdoms/zulgurub/instance_zulgurub.cpp @@ -65,7 +65,7 @@ void instance_zulgurub::OnCreatureCreate(Creature* pCreature) if (pCreature->GetPositionY() < -1626) m_lLeftPantherTriggerGUIDList.push_back(pCreature->GetObjectGuid()); else - m_lRightPantherTirggerGUIDList.push_back(pCreature->GetObjectGuid()); + m_lRightPantherTriggerGUIDList.push_back(pCreature->GetObjectGuid()); break; } } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index ace82e85b..4272a5a55 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2523" + #define SD2_REVISION_NR "2524" #endif // __SD2_REVISION_NR_H__ From 1c0b731f4b83ac3af45f0310261a6c7be937ada5 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Mon, 16 Apr 2012 20:20:57 +0200 Subject: [PATCH 0513/1172] [2525] Implement script skeleton for noblegarden bunnies --- scripts/world/npcs_special.cpp | 187 +++++++++++++++++++++++++++++++++ sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 + sql/updates/r2525_mangos.sql | 1 + 4 files changed, 190 insertions(+), 1 deletion(-) create mode 100644 sql/updates/r2525_mangos.sql diff --git a/scripts/world/npcs_special.cpp b/scripts/world/npcs_special.cpp index 35ef3d784..6b799a5bd 100644 --- a/scripts/world/npcs_special.cpp +++ b/scripts/world/npcs_special.cpp @@ -24,6 +24,7 @@ EndScriptData #include "precompiled.h" #include "escort_ai.h" +#include "pet_ai.h" #include "ObjectMgr.h" #include "GameEventMgr.h" @@ -39,6 +40,7 @@ npc_innkeeper 25% ScriptName not assigned. Innkeepers in general. npc_mount_vendor 100% Regular mount vendors all over the world. Display gossip if player doesn't meet the requirements to buy npc_sayge 100% Darkmoon event fortune teller, buff player based on answers given npc_tabard_vendor 50% allow recovering quest related tabards, achievement related ones need core support +npc_spring_rabbit 1% Used for pet "Spring Rabbit" of Noblegarden EndContentData */ /*######## @@ -1478,6 +1480,186 @@ bool GossipSelect_npc_tabard_vendor(Player* pPlayer, Creature* pCreature, uint32 return true; } +/*###### +## npc_spring_rabbit +## ATTENTION: This is actually a "fun" script, entirely done without proper source! +######*/ + +enum +{ + NPC_SPRING_RABBIT = 32791, + + SPELL_SPRING_RABBIT_JUMP = 61724, + SPELL_SPRING_RABBIT_WANDER = 61726, + SEPLL_SUMMON_BABY_BUNNY = 61727, + SPELL_SPRING_RABBIT_IN_LOVE = 61728, + SPELL_SPRING_FLING = 61875, +}; + +static const float DIST_START_EVENT = 15.0f; // Guesswork + +struct MANGOS_DLL_DECL npc_spring_rabbitAI : public ScriptedPetAI +{ + npc_spring_rabbitAI(Creature* pCreature) : ScriptedPetAI(pCreature) { Reset(); } + + ObjectGuid m_partnerGuid; + uint32 m_uiStep; + uint32 m_uiStepTimer; + float m_fMoveAngle; + + void Reset() + { + m_uiStep = 0; + m_uiStepTimer = 0; + m_partnerGuid.Clear(); + m_fMoveAngle = 0.0f; + } + + bool CanStartWhatRabbitsDo() { return !m_partnerGuid && !m_uiStepTimer; } + + void StartWhatRabbitsDo(Creature* pPartner) + { + m_partnerGuid = pPartner->GetObjectGuid(); + m_uiStep = 1; + m_uiStepTimer = 30000; + // Calculate meeting position + float m_fMoveAngle = m_creature->GetAngle(pPartner); + float fDist = m_creature->GetDistance(pPartner); + float fX, fY, fZ; + m_creature->GetNearPoint(m_creature, fX, fY, fZ, m_creature->GetObjectBoundingRadius(), fDist * 0.5f - m_creature->GetObjectBoundingRadius(), m_fMoveAngle); + + m_creature->GetMotionMaster()->Clear(); + m_creature->GetMotionMaster()->MovePoint(1, fX, fY, fZ); + } + + // Helper to get the Other Bunnies AI + npc_spring_rabbitAI* GetPartnerAI(Creature* pBunny = NULL) + { + if (!pBunny) + pBunny = m_creature->GetMap()->GetAnyTypeCreature(m_partnerGuid); + + if (!pBunny) + return NULL; + + return dynamic_cast(pBunny->AI()); + } + + // Event Starts when two rabbits see each other + void MoveInLineOfSight(Unit* pWho) + { + if (m_creature->getVictim()) + return; + + if (pWho->GetTypeId() == TYPEID_UNIT && pWho->GetEntry() == NPC_SPRING_RABBIT && CanStartWhatRabbitsDo() && m_creature->IsFriendlyTo(pWho) && m_creature->IsWithinDistInMap(pWho, DIST_START_EVENT, true)) + { + if (npc_spring_rabbitAI* pOtherBunnyAI = GetPartnerAI((Creature*)pWho)) + { + if (pOtherBunnyAI->CanStartWhatRabbitsDo()) + { + StartWhatRabbitsDo((Creature*)pWho); + pOtherBunnyAI->StartWhatRabbitsDo(m_creature); + } + } + return; + } + + ScriptedPetAI::MoveInLineOfSight(pWho); + } + + bool ReachedMeetingPlace() + { + if (m_uiStep == 3) // Already there + { + m_uiStepTimer = 3000; + m_uiStep = 2; + return true; + } + else + return false; + } + + void MovementInform(uint32 uiMovementType, uint32 uiData) + { + if (uiMovementType != POINT_MOTION_TYPE || uiData != 1) + return; + + if (!m_partnerGuid) + return; + + m_uiStep = 3; + if (npc_spring_rabbitAI* pOtherBunnyAI = GetPartnerAI()) + { + if (pOtherBunnyAI->ReachedMeetingPlace()) + { + m_creature->SetFacingTo(pOtherBunnyAI->m_creature->GetOrientation()); + m_uiStepTimer = 3000; + } + else + m_creature->SetFacingTo(m_fMoveAngle + M_PI_F * 0.5f); + } + + //m_creature->GetMotionMaster()->MoveRandom(); // does not move around current position, hence not usefull right now + m_creature->GetMotionMaster()->MoveIdle(); + } + + // Overwrite ScriptedPetAI::UpdateAI, to prevent re-following while the event is active! + void UpdateAI(const uint32 uiDiff) + { + if (!m_partnerGuid || !m_uiStepTimer) + { + ScriptedPetAI::UpdateAI(uiDiff); + return; + } + + if (m_uiStep == 6) + ScriptedPetAI::UpdateAI(uiDiff); // Event nearly finished, do normal following + + if (m_uiStepTimer <= uiDiff) + { + switch (m_uiStep) + { + case 1: // Timer expired, before reached meeting point. Reset. + Reset(); + break; + + case 2: // Called for the rabbit first reached meeting point + if (Creature* pBunny = m_creature->GetMap()->GetAnyTypeCreature(m_partnerGuid)) + pBunny->CastSpell(pBunny, SPELL_SPRING_RABBIT_IN_LOVE, false); + + DoCastSpellIfCan(m_creature, SPELL_SPRING_RABBIT_IN_LOVE); + // no break here + case 3: + m_uiStepTimer = 5000; + m_uiStep += 2; + break; + + case 4: // Called for the rabbit first reached meeting point + DoCastSpellIfCan(m_creature, SEPLL_SUMMON_BABY_BUNNY); + // no break here + case 5: + // Let owner cast achievement related spell + if (Unit* pOwner = m_creature->GetCharmerOrOwner()) + pOwner->CastSpell(pOwner, SPELL_SPRING_FLING, true); + + m_uiStep = 6; + m_uiStepTimer = 30000; + break; + case 6: + m_creature->RemoveAurasDueToSpell(SPELL_SPRING_RABBIT_IN_LOVE); + Reset(); + break; + } + } + else + m_uiStepTimer -= uiDiff; + } +}; + +CreatureAI* GetAI_npc_spring_rabbit(Creature* pCreature) +{ + return new npc_spring_rabbitAI(pCreature); +} + void AddSC_npcs_special() { Script* pNewScript; @@ -1543,4 +1725,9 @@ void AddSC_npcs_special() pNewScript->pGossipHello = &GossipHello_npc_tabard_vendor; pNewScript->pGossipSelect = &GossipSelect_npc_tabard_vendor; pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_spring_rabbit"; + pNewScript->GetAI = &GetAI_npc_spring_rabbit; + pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 4272a5a55..7bbf2a040 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2524" + #define SD2_REVISION_NR "2525" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 570ad41a7..a863fb37e 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -155,6 +155,7 @@ UPDATE creature_template SET ScriptName='npc_tabard_vendor' WHERE entry=28776; -- disabled, but can be used for custom -- UPDATE creature_template SET ScriptName='' WHERE npcflag!=npcflag|65536 AND ScriptName='npc_innkeeper'; -- UPDATE creature_template SET ScriptName='npc_innkeeper' WHERE npcflag=npcflag|65536; +UPDATE creature_template SET ScriptName='npc_spring_rabbit' WHERE entry=32791; /* SPELL */ UPDATE creature_template SET ScriptName='spell_dummy_npc' WHERE entry IN ( diff --git a/sql/updates/r2525_mangos.sql b/sql/updates/r2525_mangos.sql new file mode 100644 index 000000000..959fe860e --- /dev/null +++ b/sql/updates/r2525_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_spring_rabbit' WHERE entry=32791; From b96901a9b04cfdca1fe9cc9f6a9cb70fc5955ff4 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Wed, 18 Apr 2012 16:42:08 +0300 Subject: [PATCH 0514/1172] [2526] Improve script for Lord Victor Nefarius Add Map Id check, because he is also used in scripted events in other instances Implemented some missing spells and intro dialogue Removed some old hacks Note: spells 22664 and 22681 need core support --- .../blackwing_lair/blackwing_lair.h | 2 +- .../blackwing_lair/boss_nefarian.cpp | 7 +- .../blackwing_lair/boss_vaelastrasz.cpp | 4 +- .../blackwing_lair/boss_victor_nefarius.cpp | 192 +++++++++++++----- .../instance_blackwing_lair.cpp | 1 + sd2_revision_nr.h | 2 +- 6 files changed, 152 insertions(+), 56 deletions(-) diff --git a/scripts/eastern_kingdoms/blackwing_lair/blackwing_lair.h b/scripts/eastern_kingdoms/blackwing_lair/blackwing_lair.h index da6e46dbd..bf7a31aa4 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/blackwing_lair.h +++ b/scripts/eastern_kingdoms/blackwing_lair/blackwing_lair.h @@ -26,7 +26,7 @@ enum NPC_FLAMEGOR = 11981, NPC_CHROMAGGUS = 14020, NPC_NEFARIAN = 11583, - NPC_LORD_NEFARIAN = 10162, + NPC_LORD_VICTOR_NEFARIUS = 10162, NPC_BLACKWING_TECHNICIAN = 13996, // Flees at Vael intro event NPC_GRETHOK_CONTROLLER = 12557, NPC_BLACKWING_ORB_TRIGGER = 14449, diff --git a/scripts/eastern_kingdoms/blackwing_lair/boss_nefarian.cpp b/scripts/eastern_kingdoms/blackwing_lair/boss_nefarian.cpp index 503e3e2fd..1396274d4 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/boss_nefarian.cpp +++ b/scripts/eastern_kingdoms/blackwing_lair/boss_nefarian.cpp @@ -27,9 +27,8 @@ EndScriptData */ enum { - SAY_AGGRO = -1469007, SAY_XHEALTH = -1469008, // at 5% hp - SAY_SHADOWFLAME = -1469009, + SAY_AGGRO = -1469009, SAY_RAISE_SKELETONS = -1469010, SAY_SLAY = -1469011, SAY_DEATH = -1469012, @@ -153,11 +152,7 @@ struct MANGOS_DLL_DECL boss_nefarianAI : public ScriptedAI if (m_uiShadowFlameTimer < uiDiff) { if (DoCastSpellIfCan(m_creature, SPELL_SHADOWFLAME) == CAST_OK) - { - // ToDo: check if he yells at every cast - DoScriptText(SAY_SHADOWFLAME, m_creature); m_uiShadowFlameTimer = 12000; - } } else m_uiShadowFlameTimer -= uiDiff; diff --git a/scripts/eastern_kingdoms/blackwing_lair/boss_vaelastrasz.cpp b/scripts/eastern_kingdoms/blackwing_lair/boss_vaelastrasz.cpp index be088be44..bb8581bbd 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/boss_vaelastrasz.cpp +++ b/scripts/eastern_kingdoms/blackwing_lair/boss_vaelastrasz.cpp @@ -160,7 +160,7 @@ struct MANGOS_DLL_DECL boss_vaelastraszAI : public ScriptedAI void JustSummoned(Creature* pSummoned) { - if (pSummoned->GetEntry() == NPC_LORD_NEFARIAN) + if (pSummoned->GetEntry() == NPC_LORD_VICTOR_NEFARIUS) { // Set not selectable, so players won't interact with it pSummoned->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); @@ -177,7 +177,7 @@ struct MANGOS_DLL_DECL boss_vaelastraszAI : public ScriptedAI switch (m_uiIntroPhase) { case 0: - m_creature->SummonCreature(NPC_LORD_NEFARIAN, aNefariusSpawnLoc[0], aNefariusSpawnLoc[1], aNefariusSpawnLoc[2], aNefariusSpawnLoc[3], TEMPSUMMON_TIMED_DESPAWN, 25000); + m_creature->SummonCreature(NPC_LORD_VICTOR_NEFARIUS, aNefariusSpawnLoc[0], aNefariusSpawnLoc[1], aNefariusSpawnLoc[2], aNefariusSpawnLoc[3], TEMPSUMMON_TIMED_DESPAWN, 25000); m_uiIntroTimer = 1000; break; case 1: diff --git a/scripts/eastern_kingdoms/blackwing_lair/boss_victor_nefarius.cpp b/scripts/eastern_kingdoms/blackwing_lair/boss_victor_nefarius.cpp index 37b05b1a6..1f7715a1e 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/boss_victor_nefarius.cpp +++ b/scripts/eastern_kingdoms/blackwing_lair/boss_victor_nefarius.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: Boss_Victor_Nefarius -SD%Complete: 75 -SDComment: Missing some text, Vael beginning event, and spawns Nef in wrong place +SD%Complete: 90 +SDComment: Small adjustments needed; Timers SDCategory: Blackwing Lair EndScriptData */ @@ -28,6 +28,7 @@ enum { SAY_GAMESBEGIN_1 = -1469004, SAY_GAMESBEGIN_2 = -1469005, + SAY_NEFARIAN_INTRO = -1469007, GOSSIP_ITEM_NEFARIUS_1 = -3469000, GOSSIP_ITEM_NEFARIUS_2 = -3469001, @@ -46,15 +47,25 @@ enum NPC_CHROMATIC_DRAKANOID = 14302, SPELL_NEFARIUS_BARRIER = 22663, // immunity in phase 1 - SPELL_SHADOWBOLT = 21077, - SPELL_FEAR = 26070, // shouldn't this be 22678? - // shadowbolt vollye = 22665 - // silence = 22666 -> silence a player - // shadow command = 22667 -> charm a player - // shadowblink = 22664, 22681 -> teleport around the room, possibly random - - FACTION_BLACK_DRAGON = 103, - FACTION_FRIENDLY = 35 + SPELL_SHADOWBLINK_INTRO = 22664, + SPELL_SHADOWBOLT_VOLLEY = 22665, + SPELL_SILENCE = 22666, + SPELL_SHADOW_COMMAND = 22667, + SPELL_SHADOWBOLT = 22677, + SPELL_FEAR = 22678, + SPELL_SHADOWBLINK = 22681, // triggers a random from spells (22668 - 22676) + + MAP_ID_BWL = 469, + + FACTION_BLACK_DRAGON = 103 +}; + +static const DialogueEntry aIntroDialogue[] = +{ + {SAY_GAMESBEGIN_1, NPC_LORD_VICTOR_NEFARIUS, 4000}, + {SAY_GAMESBEGIN_2, NPC_LORD_VICTOR_NEFARIUS, 5000}, + {SPELL_SHADOWBLINK, 0, 0}, + {0, 0, 0}, }; struct SpawnLocation @@ -62,12 +73,11 @@ struct SpawnLocation float m_fX, m_fY, m_fZ; }; -static const SpawnLocation aNefarianLocs[5] = +static const SpawnLocation aNefarianLocs[4] = { {-7599.32f, -1191.72f, 475.545f}, // opening where red/blue/black darknid spawner appear (ori 3.05433) {-7526.27f, -1135.04f, 473.445f}, // same as above, closest to door (ori 5.75959) {-7498.177f, -1273.277f, 481.649f}, // nefarian spawn location (ori 1.798) - {-7592.0f, -1264.0f, 481.0f}, // hide pos (useless; remove this) {-7502.002f, -1256.503f, 476.758f}, // nefarian fly to this position }; @@ -84,9 +94,10 @@ static const uint32 aPossibleDrake[MAX_DRAKES] = {NPC_BRONZE_DRAKANOID, NPC_BLUE // Dev note: Lord Victor Nefarius should despawn completely, then ~5 seconds later Nefarian should appear. -struct MANGOS_DLL_DECL boss_victor_nefariusAI : public ScriptedAI +struct MANGOS_DLL_DECL boss_victor_nefariusAI : public ScriptedAI, private DialogueHelper { - boss_victor_nefariusAI(Creature* pCreature) : ScriptedAI(pCreature) + boss_victor_nefariusAI(Creature* pCreature) : ScriptedAI(pCreature), + DialogueHelper(aIntroDialogue) { // Select the 2 different drakes that we are going to use until despawned // 5 possiblities for the first drake, 4 for the second, 20 total possiblites @@ -99,6 +110,7 @@ struct MANGOS_DLL_DECL boss_victor_nefariusAI : public ScriptedAI m_uiDrakeTypeTwo = aPossibleDrake[uiPos2]; m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + InitializeDialogueHelper(m_pInstance); Reset(); } @@ -108,18 +120,27 @@ struct MANGOS_DLL_DECL boss_victor_nefariusAI : public ScriptedAI uint32 m_uiAddSpawnTimer; uint32 m_uiShadowBoltTimer; uint32 m_uiFearTimer; - uint32 m_uiMindControlTimer; - uint32 m_uiResetTimer; uint32 m_uiDrakeTypeOne; uint32 m_uiDrakeTypeTwo; + uint32 m_uiShadowboltVolleyTimer; + uint32 m_uiSilenceTimer; + uint32 m_uiShadowCommandTimer; + uint32 m_uiShadowBlinkTimer; void Reset() { - m_uiSpawnedAdds = 0; - m_uiAddSpawnTimer = 10000; - m_uiShadowBoltTimer = 5000; - m_uiFearTimer = 8000; - m_uiResetTimer = 15 * MINUTE * IN_MILLISECONDS; + // Check the map id because the same creature entry is involved in other scripted event in other instance + if (m_creature->GetMapId() != MAP_ID_BWL) + return; + + m_uiSpawnedAdds = 0; + m_uiAddSpawnTimer = 10000; + m_uiShadowBoltTimer = 3000; + m_uiFearTimer = 8000; + m_uiShadowboltVolleyTimer = 13000; + m_uiSilenceTimer = 23000; + m_uiShadowCommandTimer = 30000; + m_uiShadowBlinkTimer = 40000; // set gossip flag to begin the event m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); @@ -137,15 +158,28 @@ struct MANGOS_DLL_DECL boss_victor_nefariusAI : public ScriptedAI void JustReachedHome() { - m_creature->setFaction(FACTION_FRIENDLY); - m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - if (m_pInstance) m_pInstance->SetData(TYPE_NEFARIAN, FAIL); } + void AttackStart(Unit* pWho) + { + if (m_creature->Attack(pWho, false)) + { + m_creature->AddThreat(pWho); + m_creature->SetInCombatWith(pWho); + pWho->SetInCombatWith(m_creature); + + // Only range attack - ToDo: research the distance + m_creature->GetMotionMaster()->MoveChase(pWho, 30.0f); + } + } + void JustSummoned(Creature* pSummoned) { + if (m_creature->GetMapId() != MAP_ID_BWL) + return; + if (pSummoned->GetEntry() == NPC_NEFARIAN) { pSummoned->SetWalk(false); @@ -155,7 +189,8 @@ struct MANGOS_DLL_DECL boss_victor_nefariusAI : public ScriptedAI pSummoned->SetLevitate(true); // Let Nefarian fly towards combat area - pSummoned->GetMotionMaster()->MovePoint(1, aNefarianLocs[4].m_fX, aNefarianLocs[4].m_fY, aNefarianLocs[4].m_fZ); + pSummoned->GetMotionMaster()->MovePoint(1, aNefarianLocs[3].m_fX, aNefarianLocs[3].m_fY, aNefarianLocs[3].m_fZ); + DoScriptText(SAY_NEFARIAN_INTRO, pSummoned); } else { @@ -170,6 +205,9 @@ struct MANGOS_DLL_DECL boss_victor_nefariusAI : public ScriptedAI void SummonedMovementInform(Creature* pSummoned, uint32 uiMotionType, uint32 uiPointId) { + if (m_creature->GetMapId() != MAP_ID_BWL) + return; + // If Nefarian has reached combat area, let him attack if (pSummoned->GetEntry() == NPC_NEFARIAN && uiMotionType == POINT_MOTION_TYPE && uiPointId == 1) { @@ -180,13 +218,39 @@ struct MANGOS_DLL_DECL boss_victor_nefariusAI : public ScriptedAI void SummonedCreatureJustDied(Creature* pSummoned) { + if (m_creature->GetMapId() != MAP_ID_BWL) + return; + // Despawn self when Nefarian is killed if (pSummoned->GetEntry() == NPC_NEFARIAN) m_creature->ForcedDespawn(); } + void JustDidDialogueStep(int32 iEntry) + { + // Start combat after the dialogue is finished + if (iEntry == SPELL_SHADOWBLINK) + { + m_creature->SetStandState(UNIT_STAND_STATE_STAND); + m_creature->SetFactionTemporary(FACTION_BLACK_DRAGON, TEMPFACTION_RESTORE_REACH_HOME); + DoCastSpellIfCan(m_creature, SPELL_NEFARIUS_BARRIER, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_SHADOWBLINK_INTRO, CAST_TRIGGERED); + m_creature->SetInCombatWithZone(); + } + } + + void DoStartIntro() + { + StartNextDialogueText(SAY_GAMESBEGIN_1); + } + void UpdateAI(const uint32 uiDiff) { + if (m_creature->GetMapId() != MAP_ID_BWL) + return; + + DialogueUpdate(uiDiff); + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -199,7 +263,7 @@ struct MANGOS_DLL_DECL boss_victor_nefariusAI : public ScriptedAI if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) { if (DoCastSpellIfCan(pTarget, SPELL_SHADOWBOLT) == CAST_OK) - m_uiShadowBoltTimer = urand(3000, 10000); + m_uiShadowBoltTimer = urand(2000, 4000); } } else @@ -208,7 +272,7 @@ struct MANGOS_DLL_DECL boss_victor_nefariusAI : public ScriptedAI // Fear Timer if (m_uiFearTimer < uiDiff) { - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1)) { if (DoCastSpellIfCan(pTarget, SPELL_FEAR) == CAST_OK) m_uiFearTimer = urand(10000, 20000); @@ -217,6 +281,48 @@ struct MANGOS_DLL_DECL boss_victor_nefariusAI : public ScriptedAI else m_uiFearTimer -= uiDiff; + // Shadowbolt Volley + if (m_uiShadowboltVolleyTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_SHADOWBOLT_VOLLEY) == CAST_OK) + m_uiShadowboltVolleyTimer = urand(19000, 28000); + } + else + m_uiShadowboltVolleyTimer -= uiDiff; + + // Silence + if (m_uiSilenceTimer < uiDiff) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, SPELL_SILENCE) == CAST_OK) + m_uiSilenceTimer = urand(14000, 23000); + } + } + else + m_uiSilenceTimer -= uiDiff; + + // Shadow Command + if (m_uiShadowCommandTimer < uiDiff) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1)) + { + if (DoCastSpellIfCan(pTarget, SPELL_SHADOW_COMMAND) == CAST_OK) + m_uiShadowCommandTimer = urand(24000, 30000); + } + } + else + m_uiShadowCommandTimer -= uiDiff; + + // ShadowBlink + if (m_uiShadowBlinkTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_SHADOWBLINK) == CAST_OK) + m_uiShadowBlinkTimer = urand(30000, 40000); + } + else + m_uiShadowBlinkTimer -= uiDiff; + // Add spawning mechanism if (m_uiAddSpawnTimer < uiDiff) { @@ -234,23 +340,13 @@ struct MANGOS_DLL_DECL boss_victor_nefariusAI : public ScriptedAI //Begin phase 2 by spawning Nefarian if (m_uiSpawnedAdds >= MAX_DRAKE_SUMMONS) { - //Teleport Victor Nefarius way out of the map - //MapManager::Instance().GetMap(m_creature->GetMapId(), m_creature)->CreatureRelocation(m_creature,0,0,-5000,0); - //Inturrupt any spell casting m_creature->InterruptNonMeleeSpells(false); - //Root self - DoCastSpellIfCan(m_creature, 33356, CAST_TRIGGERED); - //Make super invis if (m_creature->GetVisibility() != VISIBILITY_OFF) m_creature->SetVisibility(VISIBILITY_OFF); - // Do not teleport him away, this is not needed (invisible and rooted) - //Teleport self to a hiding spot - //m_creature->NearTeleportTo(aNefarianLocs[3].m_fX, aNefarianLocs[3].m_fY, aNefarianLocs[3].m_fZ, 0.0f); - // Spawn Nefarian // Summon as active, to be able to work proper! m_creature->SummonCreature(NPC_NEFARIAN, aNefarianLocs[2].m_fX, aNefarianLocs[2].m_fY, aNefarianLocs[2].m_fZ, 0, TEMPSUMMON_DEAD_DESPAWN, 0, true); @@ -271,6 +367,9 @@ CreatureAI* GetAI_boss_victor_nefarius(Creature* pCreature) bool GossipHello_boss_victor_nefarius(Player* pPlayer, Creature* pCreature) { + if (pCreature->GetMapId() != MAP_ID_BWL) + return true; + pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_NEFARIUS_1 , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXT_NEFARIUS_1, pCreature->GetObjectGuid()); return true; @@ -278,26 +377,27 @@ bool GossipHello_boss_victor_nefarius(Player* pPlayer, Creature* pCreature) bool GossipSelect_boss_victor_nefarius(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) { + if (pCreature->GetMapId() != MAP_ID_BWL) + return true; + switch(uiAction) { case GOSSIP_ACTION_INFO_DEF+1: + pCreature->HandleEmote(EMOTE_ONESHOT_TALK); pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_NEFARIUS_2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXT_NEFARIUS_2, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+2: + pCreature->HandleEmote(EMOTE_ONESHOT_TALK); pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_NEFARIUS_3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3); pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXT_NEFARIUS_3, pCreature->GetObjectGuid()); - DoScriptText(SAY_GAMESBEGIN_1, pCreature); break; case GOSSIP_ACTION_INFO_DEF+3: - pPlayer->CLOSE_GOSSIP_MENU(); - DoScriptText(SAY_GAMESBEGIN_2, pCreature); - // remove gossip, set hostile and attack pCreature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); - pCreature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - pCreature->setFaction(FACTION_BLACK_DRAGON); - pCreature->CastSpell(pCreature, SPELL_NEFARIUS_BARRIER, false); - pCreature->AI()->AttackStart(pPlayer); + pPlayer->CLOSE_GOSSIP_MENU(); + // Start the intro event + if (boss_victor_nefariusAI* pBossAI = dynamic_cast(pCreature->AI())) + pBossAI->DoStartIntro(); break; } return true; diff --git a/scripts/eastern_kingdoms/blackwing_lair/instance_blackwing_lair.cpp b/scripts/eastern_kingdoms/blackwing_lair/instance_blackwing_lair.cpp index 0ce50b361..b4d4debcd 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/instance_blackwing_lair.cpp +++ b/scripts/eastern_kingdoms/blackwing_lair/instance_blackwing_lair.cpp @@ -58,6 +58,7 @@ void instance_blackwing_lair::OnCreatureCreate(Creature* pCreature) break; case NPC_BLACKWING_ORB_TRIGGER: case NPC_VAELASTRASZ: + case NPC_LORD_VICTOR_NEFARIUS: m_mNpcEntryGuidStore[pCreature->GetEntry()] = pCreature->GetObjectGuid(); break; } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 7bbf2a040..fe407942d 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2525" + #define SD2_REVISION_NR "2526" #endif // __SD2_REVISION_NR_H__ From 30899d7b7ecf02855c9e7771650a4ad6656b5f0f Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Thu, 19 Apr 2012 18:56:21 +0200 Subject: [PATCH 0515/1172] [2527] Fix typo in doc section, thanks to Venugh for pointing --- docs/How to install.txt | 2 +- sd2_revision_nr.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/How to install.txt b/docs/How to install.txt index ef7fdecab..e8e3578cd 100644 --- a/docs/How to install.txt +++ b/docs/How to install.txt @@ -42,4 +42,4 @@ a) apply only the changes that were made during that revision by looking in the b) reapply "mangos_scriptname_full.sql" to your MaNGOS database. - WARNING this will NOT include removed script names! You can view the ScriptDev2 Change Log at: -https://github.com/scriptdev/scriptdev2/commits/master +https://github.com/scriptdev2/scriptdev2/commits/master diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index fe407942d..f5ffae94f 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2526" + #define SD2_REVISION_NR "2527" #endif // __SD2_REVISION_NR_H__ From 9d30b1aa2309246a0a4ede317d8f08d36392a239 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Fri, 20 Apr 2012 23:28:12 +0300 Subject: [PATCH 0516/1172] [2528] Rewrite and improve script for the Stadium event - Upper Blackrock Spire --- .../blackrock_spire/blackrock_spire.h | 53 ++++- .../blackrock_spire/boss_gyth.cpp | 197 +++++------------ .../instance_blackrock_spire.cpp | 202 ++++++++++++++++-- sd2_revision_nr.h | 2 +- sql/scriptdev2_script_full.sql | 14 +- sql/updates/r2528_scriptdev2.sql | 5 + 6 files changed, 303 insertions(+), 170 deletions(-) create mode 100644 sql/updates/r2528_scriptdev2.sql diff --git a/scripts/eastern_kingdoms/blackrock_spire/blackrock_spire.h b/scripts/eastern_kingdoms/blackrock_spire/blackrock_spire.h index 790439738..145dab9db 100644 --- a/scripts/eastern_kingdoms/blackrock_spire/blackrock_spire.h +++ b/scripts/eastern_kingdoms/blackrock_spire/blackrock_spire.h @@ -25,17 +25,16 @@ enum NPC_REND_BLACKHAND = 10429, NPC_GYTH = 10339, NPC_DRAKKISATH = 10363, - NPC_FIRE_TONGUE = 10372, // related to Gyth arena event - NPC_CHROMATIC_WHELP = 10442, + NPC_CHROMATIC_WHELP = 10442, // related to Gyth arena event NPC_CHROMATIC_DRAGON = 10447, - NPC_BLACKHAND_ELITE = 10317, + NPC_BLACKHAND_HANDLER = 10742, // Doors GO_EMBERSEER_IN = 175244, GO_DOORS = 175705, GO_EMBERSEER_OUT = 175153, GO_GYTH_ENTRY_DOOR = 164726, - GO_GYTH_COMBAT_DOOR = 175185, // control in boss_script, because will auto-close after each wave + GO_GYTH_COMBAT_DOOR = 175185, GO_GYTH_EXIT_DOOR = 175186, GO_DRAKKISATH_DOOR_1 = 175946, GO_DRAKKISATH_DOOR_2 = 175947, @@ -57,9 +56,42 @@ enum GO_EMBERSEER_RUNE_5 = 175270, GO_EMBERSEER_RUNE_6 = 175271, GO_EMBERSEER_RUNE_7 = 175272, + + MAX_STADIUM_WAVES = 7, + MAX_STADIUM_MOBS_PER_WAVE = 5, + + FACTION_BLACK_DRAGON = 103 +}; + +struct SpawnLocation +{ + float m_fX, m_fY, m_fZ, m_fO; +}; + +static const SpawnLocation aStadiumLocs[7] = +{ + {210.00f, -420.30f, 110.94f, 3.14f}, // dragons summon location + {210.14f, -397.54f, 111.1f}, // Gyth summon location + {163.62f, -420.33f, 110.47f}, // center of the stadium location (for movement) + {164.63f, -444.04f, 121.97f, 3.22f}, // Lord Nefarius summon position + {161.01f, -443.73f, 121.97f, 6.26f}, // Rend summon position + {164.64f, -443.30f, 121.97f, 1.61f}, // Nefarius move position + {165.74f, -466.46f, 116.80f}, // Rend move position +}; + +// Stadium event description +static const uint32 aStadiumEventNpcs[MAX_STADIUM_WAVES][5] = +{ + {NPC_CHROMATIC_WHELP, NPC_CHROMATIC_WHELP, NPC_CHROMATIC_WHELP, NPC_CHROMATIC_DRAGON, 0}, + {NPC_CHROMATIC_WHELP, NPC_CHROMATIC_WHELP, NPC_CHROMATIC_WHELP, NPC_CHROMATIC_DRAGON, 0}, + {NPC_CHROMATIC_WHELP, NPC_CHROMATIC_WHELP, NPC_CHROMATIC_DRAGON, NPC_BLACKHAND_HANDLER, 0}, + {NPC_CHROMATIC_WHELP, NPC_CHROMATIC_WHELP, NPC_CHROMATIC_DRAGON, NPC_BLACKHAND_HANDLER, 0}, + {NPC_CHROMATIC_WHELP, NPC_CHROMATIC_WHELP, NPC_CHROMATIC_WHELP, NPC_CHROMATIC_DRAGON, NPC_BLACKHAND_HANDLER}, + {NPC_CHROMATIC_WHELP, NPC_CHROMATIC_WHELP, NPC_CHROMATIC_DRAGON, NPC_CHROMATIC_DRAGON, NPC_BLACKHAND_HANDLER}, + {NPC_CHROMATIC_WHELP, NPC_CHROMATIC_WHELP, NPC_CHROMATIC_DRAGON, NPC_CHROMATIC_DRAGON, NPC_BLACKHAND_HANDLER}, }; -class MANGOS_DLL_DECL instance_blackrock_spire : public ScriptedInstance +class MANGOS_DLL_DECL instance_blackrock_spire : public ScriptedInstance, private DialogueHelper { public: instance_blackrock_spire(Map* pMap); @@ -87,10 +119,19 @@ class MANGOS_DLL_DECL instance_blackrock_spire : public ScriptedInstance void GetIncarceratorGUIDList(GUIDList &lList) { lList = m_lIncarceratorGUIDList; } void GetRookeryEggGUIDList(GUIDList &lList) { lList = m_lRookeryEggGUIDList; } - protected: + void Update(uint32 uiDiff); + + private: + void JustDidDialogueStep(int32 iEntry); + void DoSendNextStadiumWave(); + uint32 m_auiEncounter[MAX_ENCOUNTER]; std::string m_strInstData; + uint32 m_uiStadiumEventTimer; + uint8 m_uiStadiumWaves; + uint8 m_uiStadiumMobsAlive; + ObjectGuid m_aRoomRuneGuid[MAX_ROOMS]; GUIDList m_alRoomEventMobGUIDSorted[MAX_ROOMS]; GUIDList m_lRoomEventMobGUIDList; diff --git a/scripts/eastern_kingdoms/blackrock_spire/boss_gyth.cpp b/scripts/eastern_kingdoms/blackrock_spire/boss_gyth.cpp index 695355f67..7e7c4ec0c 100644 --- a/scripts/eastern_kingdoms/blackrock_spire/boss_gyth.cpp +++ b/scripts/eastern_kingdoms/blackrock_spire/boss_gyth.cpp @@ -17,7 +17,7 @@ /* ScriptData SDName: Boss_Gyth SD%Complete: 100 -SDComment: Whole Event needs some rewrite +SDComment: Timers may need adjustments SDCategory: Blackrock Spire EndScriptData */ @@ -26,16 +26,16 @@ EndScriptData */ enum { + SAY_NEFARIUS_BUFF_GYTH = -1229017, + EMOTE_KNOCKED_OFF = -1229019, + + SPELL_CHROMATIC_CHAOS = 16337, // casted by Nefarius at 50% SPELL_REND_MOUNTS = 16167, SPELL_SUMMON_REND = 16328, - SPELL_CORROSIVEACID = 20667, - SPELL_FREEZE = 16350, // ID was wrong! - SPELL_FLAMEBREATH = 20712, - SPELL_ROOT_SELF = 33356, - - MODEL_ID_INVISIBLE = 11686, - MODEL_ID_GYTH_MOUNTED = 9723, - MODEL_ID_GYTH = 9806, + SPELL_CORROSIVE_ACID = 16359, + SPELL_FREEZE = 16350, + SPELL_FLAME_BREATH = 16390, + SPELL_KNOCK_AWAY = 10101, }; struct MANGOS_DLL_DECL boss_gythAI : public ScriptedAI @@ -47,67 +47,28 @@ struct MANGOS_DLL_DECL boss_gythAI : public ScriptedAI } instance_blackrock_spire* m_pInstance; - uint32 uiAggroTimer; - uint32 uiDragonsTimer; - uint32 uiOrcTimer; + uint32 uiCorrosiveAcidTimer; uint32 uiFreezeTimer; uint32 uiFlamebreathTimer; - uint32 uiLine1Count; - uint32 uiLine2Count; bool m_bSummonedRend; - bool m_bAggro; - bool m_bRootSelf; + bool m_bHasChromaticChaos; void Reset() { - uiDragonsTimer = 3000; - uiOrcTimer = 60000; - uiAggroTimer = 60000; uiCorrosiveAcidTimer = 8000; - uiFreezeTimer = 11000; - uiFlamebreathTimer = 4000; - m_bSummonedRend = false; - m_bAggro = false; - m_bRootSelf = false; - - // how many times should the two lines of summoned creatures be spawned - // min 2 x 2, max 7 lines of attack in total - uiLine1Count = urand(2, 5); - uiLine2Count = urand(2, 7 - uiLine1Count); - - // Invisible for event start - m_creature->SetDisplayId(MODEL_ID_INVISIBLE); - m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - } - - void Aggro(Unit* pWho) - { - if (m_pInstance) - m_pInstance->SetData(TYPE_STADIUM, IN_PROGRESS); - } - - void JustDied(Unit* pKiller) - { - if (m_pInstance) - m_pInstance->SetData(TYPE_STADIUM, DONE); - } + uiFreezeTimer = 11000; + uiFlamebreathTimer = 4000; + m_bSummonedRend = false; + m_bHasChromaticChaos = false; - void JustReachedHome() - { - if (m_pInstance) - m_pInstance->SetData(TYPE_STADIUM, FAIL); + DoCastSpellIfCan(m_creature, SPELL_REND_MOUNTS); } - void SummonCreatureWithRandomTarget(uint32 uiCreatureId) + void JustSummoned(Creature* pSummoned) { - float fX, fY, fZ; - m_creature->GetRandomPoint(m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), 2*INTERACTION_DISTANCE, fX, fY, fZ); - fX = std::min(m_creature->GetPositionX(), fX); // Halfcircle - suits better the rectangular form - if (Creature* pSummoned = m_creature->SummonCreature(uiCreatureId, fX, fY, fZ, 0, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 240000)) - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) - pSummoned->AI()->AttackStart(pTarget); + DoScriptText(EMOTE_KNOCKED_OFF, pSummoned); } void UpdateAI(const uint32 uiDiff) @@ -116,112 +77,58 @@ struct MANGOS_DLL_DECL boss_gythAI : public ScriptedAI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - if (!m_bRootSelf) - { - DoCastSpellIfCan(m_creature, SPELL_ROOT_SELF); - m_bRootSelf = true; - } - - if (!m_bAggro && uiLine1Count == 0 && uiLine2Count == 0) + // Chromatic Chaos at 50% + if (!m_bHasChromaticChaos && m_creature->GetHealthPercent() < 50.0f) { - if (uiAggroTimer < uiDiff) + if (m_pInstance) { - m_bAggro = true; - // Visible now! - m_creature->SetDisplayId(MODEL_ID_GYTH_MOUNTED); - m_creature->setFaction(14); - m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - m_creature->RemoveAurasDueToSpell(SPELL_ROOT_SELF); - if (m_pInstance) - m_pInstance->DoUseDoorOrButton(GO_GYTH_COMBAT_DOOR); - + if (Creature* pNefarius = m_pInstance->GetSingleCreatureFromStorage(NPC_LORD_VICTOR_NEFARIUS)) + { + pNefarius->CastSpell(m_creature, SPELL_CHROMATIC_CHAOS, true); + DoScriptText(SAY_NEFARIUS_BUFF_GYTH, pNefarius); + m_bHasChromaticChaos = true; + } } - else - uiAggroTimer -= uiDiff; } - // Summon Dragon pack. 2 Dragons and 3 Whelps - if (!m_bAggro && !m_bSummonedRend && uiLine1Count > 0) + // CorrosiveAcid_Timer + if (uiCorrosiveAcidTimer < uiDiff) { - if (uiDragonsTimer < uiDiff) - { - SummonCreatureWithRandomTarget(NPC_FIRE_TONGUE); - SummonCreatureWithRandomTarget(NPC_FIRE_TONGUE); - SummonCreatureWithRandomTarget(NPC_CHROMATIC_WHELP); - SummonCreatureWithRandomTarget(NPC_CHROMATIC_WHELP); - SummonCreatureWithRandomTarget(NPC_CHROMATIC_WHELP); - --uiLine1Count; - if (m_pInstance) - m_pInstance->DoUseDoorOrButton(GO_GYTH_COMBAT_DOOR); - uiDragonsTimer = 60000; - } - else - uiDragonsTimer -= uiDiff; + if (DoCastSpellIfCan(m_creature, SPELL_CORROSIVE_ACID) == CAST_OK) + uiCorrosiveAcidTimer = 7000; } + else + uiCorrosiveAcidTimer -= uiDiff; - //Summon Orc pack. 1 Orc Handler 1 Elite Dragonkin and 3 Whelps - if (!m_bAggro && !m_bSummonedRend && uiLine1Count == 0 && uiLine2Count > 0) + // Freeze_Timer + if (uiFreezeTimer < uiDiff) { - if (uiOrcTimer < uiDiff) - { - SummonCreatureWithRandomTarget(NPC_CHROMATIC_DRAGON); - SummonCreatureWithRandomTarget(NPC_BLACKHAND_ELITE); - SummonCreatureWithRandomTarget(NPC_CHROMATIC_WHELP); - SummonCreatureWithRandomTarget(NPC_CHROMATIC_WHELP); - SummonCreatureWithRandomTarget(NPC_CHROMATIC_WHELP); - if (m_pInstance) - m_pInstance->DoUseDoorOrButton(GO_GYTH_COMBAT_DOOR); - --uiLine2Count; - uiOrcTimer = 60000; - } - else - uiOrcTimer -= uiDiff; + if (DoCastSpellIfCan(m_creature, SPELL_FREEZE) == CAST_OK) + uiFreezeTimer = 16000; } + else + uiFreezeTimer -= uiDiff; - // we take part in the fight - if (m_bAggro) + // Flamebreath_Timer + if (uiFlamebreathTimer < uiDiff) { - // CorrosiveAcid_Timer - if (uiCorrosiveAcidTimer < uiDiff) - { - DoCastSpellIfCan(m_creature, SPELL_CORROSIVEACID); - uiCorrosiveAcidTimer = 7000; - } - else - uiCorrosiveAcidTimer -= uiDiff; - - // Freeze_Timer - if (uiFreezeTimer < uiDiff) - { - if (DoCastSpellIfCan(m_creature, SPELL_FREEZE) == CAST_OK) - uiFreezeTimer = 16000; - } - else - uiFreezeTimer -= uiDiff; - - // Flamebreath_Timer - if (uiFlamebreathTimer < uiDiff) - { - DoCastSpellIfCan(m_creature, SPELL_FLAMEBREATH); + if (DoCastSpellIfCan(m_creature, SPELL_FLAME_BREATH) == CAST_OK) uiFlamebreathTimer = 10500; - } - else - uiFlamebreathTimer -= uiDiff; + } + else + uiFlamebreathTimer -= uiDiff; - //Summon Rend - if (!m_bSummonedRend && m_creature->GetHealthPercent() < 11.0f) + // Summon Rend + if (!m_bSummonedRend && m_creature->GetHealthPercent() < 11.0f) + { + if (DoCastSpellIfCan(m_creature, SPELL_SUMMON_REND) == CAST_OK) { - // summon Rend and Change model to normal Gyth - // Inturrupt any spell casting - m_creature->InterruptNonMeleeSpells(false); - // Gyth model - m_creature->SetDisplayId(MODEL_ID_GYTH); - m_creature->SummonCreature(NPC_REND_BLACKHAND, m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), 0, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 900000); + m_creature->RemoveAurasDueToSpell(SPELL_REND_MOUNTS); m_bSummonedRend = true; } + } - DoMeleeAttackIfReady(); - } // end if Aggro + DoMeleeAttackIfReady(); } }; diff --git a/scripts/eastern_kingdoms/blackrock_spire/instance_blackrock_spire.cpp b/scripts/eastern_kingdoms/blackrock_spire/instance_blackrock_spire.cpp index 16deb6f18..095eff522 100644 --- a/scripts/eastern_kingdoms/blackrock_spire/instance_blackrock_spire.cpp +++ b/scripts/eastern_kingdoms/blackrock_spire/instance_blackrock_spire.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: instance_blackrock_spire -SD%Complete: 50 -SDComment: To really get this instance working, many encounters will need more love - and also the DB content is surely not yet perfect. +SD%Complete: 75 +SDComment: The Stadium event is missing some yells. Seal of Ascension related event NYI SDCategory: Blackrock Spire EndScriptData */ @@ -43,7 +43,6 @@ enum SAY_NEFARIUS_LOSE_4 = -1229014, SAY_REND_ATTACK = -1229015, SAY_NEFARIUS_WARCHIEF = -1229016, - SAY_NEFARIUS_BUFF_GYTH = -1229017, SAY_NEFARIUS_VICTORY = -1229018, // Emberseer event @@ -66,7 +65,24 @@ enum 3726 UBRS, entrance to BWL */ -instance_blackrock_spire::instance_blackrock_spire(Map* pMap) : ScriptedInstance(pMap) +static const DialogueEntry aStadiumDialogue[] = +{ + {NPC_LORD_VICTOR_NEFARIUS, 0, 1000}, + {SAY_NEFARIUS_INTRO_1, NPC_LORD_VICTOR_NEFARIUS, 7000}, + {SAY_NEFARIUS_INTRO_2, NPC_LORD_VICTOR_NEFARIUS, 5000}, + {NPC_BLACKHAND_HANDLER, 0, 0}, + {SAY_NEFARIUS_LOSE_4, NPC_LORD_VICTOR_NEFARIUS, 3000}, + {SAY_REND_ATTACK, NPC_REND_BLACKHAND, 2000}, + {SAY_NEFARIUS_WARCHIEF, NPC_LORD_VICTOR_NEFARIUS, 0}, + {SAY_NEFARIUS_VICTORY, NPC_LORD_VICTOR_NEFARIUS, 5000}, + {NPC_REND_BLACKHAND, 0, 0}, + {0, 0, 0}, +}; + +instance_blackrock_spire::instance_blackrock_spire(Map* pMap) : ScriptedInstance(pMap), DialogueHelper(aStadiumDialogue), + m_uiStadiumEventTimer(0), + m_uiStadiumMobsAlive(0), + m_uiStadiumWaves(0) { Initialize(); } @@ -75,6 +91,7 @@ void instance_blackrock_spire::Initialize() { memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); memset(&m_aRoomRuneGuid, 0, sizeof(m_aRoomRuneGuid)); + InitializeDialogueHelper(this); } void instance_blackrock_spire::OnObjectCreate(GameObject* pGo) @@ -134,6 +151,7 @@ void instance_blackrock_spire::OnCreatureCreate(Creature* pCreature) case NPC_PYROGUARD_EMBERSEER: case NPC_LORD_VICTOR_NEFARIUS: case NPC_GYTH: + case NPC_REND_BLACKHAND: case NPC_SCARSHIELD_INFILTRATOR: m_mNpcEntryGuidStore[pCreature->GetEntry()] = pCreature->GetObjectGuid(); break; @@ -185,12 +203,29 @@ void instance_blackrock_spire::SetData(uint32 uiType, uint32 uiData) m_auiEncounter[2] = uiData; break; case TYPE_STADIUM: - if (uiData == IN_PROGRESS || uiData == FAIL) - DoUseDoorOrButton(GO_GYTH_ENTRY_DOOR); + // Don't set the same data twice + if (m_auiEncounter[3] == uiData) + break; + // Combat door + DoUseDoorOrButton(GO_GYTH_ENTRY_DOOR); + // Start event + if (uiData == IN_PROGRESS) + StartNextDialogueText(SAY_NEFARIUS_INTRO_1); else if (uiData == DONE) - { - DoUseDoorOrButton(GO_GYTH_ENTRY_DOOR); DoUseDoorOrButton(GO_GYTH_EXIT_DOOR); + else if (uiData == FAIL) + { + // Despawn Nefarius and Rend on fail (the others are despawned OnCreatureEvade()) + if (Creature* pNefarius = GetSingleCreatureFromStorage(NPC_LORD_VICTOR_NEFARIUS)) + pNefarius->ForcedDespawn(); + if (Creature* pRend = GetSingleCreatureFromStorage(NPC_REND_BLACKHAND)) + pRend->ForcedDespawn(); + if (Creature* pGyth = GetSingleCreatureFromStorage(NPC_GYTH)) + pGyth->ForcedDespawn(); + + m_uiStadiumEventTimer = 0; + m_uiStadiumMobsAlive = 0; + m_uiStadiumWaves = 0; } m_auiEncounter[3] = uiData; break; @@ -302,6 +337,22 @@ void instance_blackrock_spire::OnCreatureDeath(Creature* pCreature) DoUseDoorOrButton(GO_DRAKKISATH_DOOR_1); DoUseDoorOrButton(GO_DRAKKISATH_DOOR_2); break; + case NPC_CHROMATIC_WHELP: + case NPC_CHROMATIC_DRAGON: + case NPC_BLACKHAND_HANDLER: + // check if it's summoned - some npcs with the same entry are already spawned in the instance + if (!pCreature->IsTemporarySummon()) + break; + --m_uiStadiumMobsAlive; + if (m_uiStadiumMobsAlive == 0) + DoSendNextStadiumWave(); + break; + case NPC_GYTH: + case NPC_REND_BLACKHAND: + --m_uiStadiumMobsAlive; + if (m_uiStadiumMobsAlive == 0) + StartNextDialogueText(SAY_NEFARIUS_VICTORY); + break; } } @@ -314,6 +365,17 @@ void instance_blackrock_spire::OnCreatureEvade(Creature* pCreature) if (Creature* pEmberseer = GetSingleCreatureFromStorage(NPC_PYROGUARD_EMBERSEER)) pEmberseer->AI()->EnterEvadeMode(); break; + case NPC_CHROMATIC_WHELP: + case NPC_CHROMATIC_DRAGON: + case NPC_BLACKHAND_HANDLER: + case NPC_GYTH: + case NPC_REND_BLACKHAND: + // check if it's summoned - some npcs with the same entry are already spawned in the instance + if (!pCreature->IsTemporarySummon()) + break; + SetData(TYPE_STADIUM, FAIL); + pCreature->ForcedDespawn(); + break; } } @@ -381,6 +443,112 @@ void instance_blackrock_spire::DoUseEmberseerRunes(bool bReset) } } +void instance_blackrock_spire::JustDidDialogueStep(int32 iEntry) +{ + switch (iEntry) + { + case NPC_BLACKHAND_HANDLER: + m_uiStadiumEventTimer = 1000; + // Move the two near the balcony + if (Creature* pRend = GetSingleCreatureFromStorage(NPC_REND_BLACKHAND)) + pRend->SetFacingTo(aStadiumLocs[5].m_fO); + if (Creature* pNefarius = GetSingleCreatureFromStorage(NPC_LORD_VICTOR_NEFARIUS)) + pNefarius->GetMotionMaster()->MovePoint(0, aStadiumLocs[5].m_fX, aStadiumLocs[5].m_fY, aStadiumLocs[5].m_fZ); + break; + case SAY_NEFARIUS_WARCHIEF: + // Prepare for Gyth - note: Nefarius should be moving around the balcony + if (Creature* pRend = GetSingleCreatureFromStorage(NPC_REND_BLACKHAND)) + { + pRend->ForcedDespawn(5000); + pRend->SetWalk(false); + pRend->GetMotionMaster()->MovePoint(0, aStadiumLocs[6].m_fX, aStadiumLocs[6].m_fY, aStadiumLocs[6].m_fZ); + } + m_uiStadiumEventTimer = 30000; + break; + case SAY_NEFARIUS_VICTORY: + SetData(TYPE_STADIUM, DONE); + break; + case NPC_REND_BLACKHAND: + // Despawn Nefarius + if (Creature* pNefarius = GetSingleCreatureFromStorage(NPC_LORD_VICTOR_NEFARIUS)) + { + pNefarius->ForcedDespawn(5000); + pNefarius->GetMotionMaster()->MovePoint(0, aStadiumLocs[6].m_fX, aStadiumLocs[6].m_fY, aStadiumLocs[6].m_fZ); + } + break; + + } +} + +void instance_blackrock_spire::DoSendNextStadiumWave() +{ + if (m_uiStadiumWaves < MAX_STADIUM_WAVES) + { + // Send current wave mobs + if (Creature* pNefarius = GetSingleCreatureFromStorage(NPC_LORD_VICTOR_NEFARIUS)) + { + float fX, fY, fZ; + for (uint8 i = 0; i < MAX_STADIUM_MOBS_PER_WAVE; ++i) + { + if (aStadiumEventNpcs[m_uiStadiumWaves][i] == 0) + continue; + + pNefarius->GetRandomPoint(aStadiumLocs[0].m_fX, aStadiumLocs[0].m_fY, aStadiumLocs[0].m_fZ, 7.0f, fX, fY, fZ); + fX = std::min(aStadiumLocs[0].m_fX, fX); // Halfcircle - suits better the rectangular form + if (Creature* pTemp = pNefarius->SummonCreature(aStadiumEventNpcs[m_uiStadiumWaves][i], fX, fY, fZ, 0.0f, TEMPSUMMON_DEAD_DESPAWN, 0)) + { + // Get some point in the center of the stadium + pTemp->GetRandomPoint(aStadiumLocs[2].m_fX, aStadiumLocs[2].m_fY, aStadiumLocs[2].m_fZ, 5.0f, fX, fY, fZ); + fX = std::min(aStadiumLocs[2].m_fX, fX); // Halfcircle - suits better the rectangular form + + pTemp->GetMotionMaster()->MovePoint(0, fX, fY, fZ); + ++m_uiStadiumMobsAlive; + } + } + } + + DoUseDoorOrButton(GO_GYTH_COMBAT_DOOR); + } + // All waves are cleared - start Gyth intro + else if (m_uiStadiumWaves == MAX_STADIUM_WAVES) + StartNextDialogueText(SAY_NEFARIUS_LOSE_4); + else + { + // Send Gyth + if (Creature* pNefarius = GetSingleCreatureFromStorage(NPC_LORD_VICTOR_NEFARIUS)) + { + if (Creature* pTemp = pNefarius->SummonCreature(NPC_GYTH, aStadiumLocs[1].m_fX, aStadiumLocs[1].m_fY, aStadiumLocs[1].m_fZ, 0.0f, TEMPSUMMON_DEAD_DESPAWN, 0)) + pTemp->GetMotionMaster()->MovePoint(0, aStadiumLocs[2].m_fX, aStadiumLocs[2].m_fY, aStadiumLocs[2].m_fZ); + } + + // Set this to 2, because Rend will be summoned later during the fight + m_uiStadiumMobsAlive = 2; + + DoUseDoorOrButton(GO_GYTH_COMBAT_DOOR); + } + + ++m_uiStadiumWaves; + + // Stop the timer when all the waves have been sent + if (m_uiStadiumWaves >= MAX_STADIUM_WAVES) + m_uiStadiumEventTimer = 0; + else + m_uiStadiumEventTimer = 60000; +} + +void instance_blackrock_spire::Update(uint32 uiDiff) +{ + DialogueUpdate(uiDiff); + + if (m_uiStadiumEventTimer) + { + if (m_uiStadiumEventTimer <= uiDiff) + DoSendNextStadiumWave(); + else + m_uiStadiumEventTimer -= uiDiff; + } +} + InstanceData* GetInstanceData_instance_blackrock_spire(Map* pMap) { return new instance_blackrock_spire(pMap); @@ -388,7 +556,7 @@ InstanceData* GetInstanceData_instance_blackrock_spire(Map* pMap) bool AreaTrigger_at_blackrock_spire(Player* pPlayer, AreaTriggerEntry const* pAt) { - if (pPlayer->isDead()) + if (!pPlayer->isAlive() || pPlayer->isGameMaster()) return false; switch (pAt->id) @@ -399,9 +567,19 @@ bool AreaTrigger_at_blackrock_spire(Player* pPlayer, AreaTriggerEntry const* pAt break; case AREATRIGGER_STADIUM: if (instance_blackrock_spire* pInstance = (instance_blackrock_spire*) pPlayer->GetInstanceData()) - if (Creature* pGyth = pInstance->GetSingleCreatureFromStorage(NPC_GYTH)) - if (pGyth->isAlive() && !pGyth->isInCombat()) - pGyth->AI()->AttackStart(pPlayer); + { + if (pInstance->GetData(TYPE_STADIUM) == IN_PROGRESS || pInstance->GetData(TYPE_STADIUM) == DONE) + return false; + + // Summon Nefarius and Rend for the dialogue event + // Note: Nefarius and Rend need to be hostile and not attackable + if (Creature* pNefarius = pPlayer->SummonCreature(NPC_LORD_VICTOR_NEFARIUS, aStadiumLocs[3].m_fX, aStadiumLocs[3].m_fY, aStadiumLocs[3].m_fZ, aStadiumLocs[3].m_fO, TEMPSUMMON_CORPSE_DESPAWN, 0)) + pNefarius->setFaction(FACTION_BLACK_DRAGON); + if (Creature* pRend = pPlayer->SummonCreature(NPC_REND_BLACKHAND, aStadiumLocs[4].m_fX, aStadiumLocs[4].m_fY, aStadiumLocs[4].m_fZ, aStadiumLocs[4].m_fO, TEMPSUMMON_CORPSE_DESPAWN, 0)) + pRend->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE); + + pInstance->SetData(TYPE_STADIUM, IN_PROGRESS); + } break; } return false; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index f5ffae94f..5d49b1195 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2527" + #define SD2_REVISION_NR "2528" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 90578163c..cccf31c91 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -1093,21 +1093,23 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1229002,'%s regains its power and breaks free of its bonds!',0,2,0,0,'pyroguard EMOTE_FULL'), (-1229003,'Ha! Ha! Ha! Thank you for freeing me, fools. Now let me repay you by charring the flesh from your bones.',0,1,0,0,'pyroguard SAY_FREE'), -(-1229004,'Excellent... it would appear as if the meddlesome insects have arrived just in time to feed my legion. Welcome, mortals!',0,1,0,0,'nefarius SAY_INTRO_1'), -(-1229005,'Let not even a drop of their blood remain upon the arena floor, my children. Feast on their souls!',0,1,0,0,'nefarius SAY_INTRO_2'), +(-1229004,'Excellent... it would appear as if the meddlesome insects have arrived just in time to feed my legion. Welcome, mortals!',0,1,0,1,'nefarius SAY_INTRO_1'), +(-1229005,'Let not even a drop of their blood remain upon the arena floor, my children. Feast on their souls!',0,1,0,1,'nefarius SAY_INTRO_2'), (-1229006,'Foolsss...Kill the one in the dress!',0,1,0,0,'nefarius SAY_ATTACK_1'), -(-1229007,'Sire, let me join the fray! I shall tear their spines out with my bare hands!',0,1,0,0,'rend SAY_REND_JOIN'), +(-1229007,'Sire, let me join the fray! I shall tear their spines out with my bare hands!',0,1,0,1,'rend SAY_REND_JOIN'), (-1229008,'Concentrate your attacks upon the healer!',0,1,0,0,'nefarius SAY_ATTACK_2'), (-1229009,'Inconceivable!',0,1,0,0,'nefarius SAY_ATTACK_3'), (-1229010,'Do not force my hand, children! I shall use your hides to line my boots.',0,1,0,0,'nefarius SAY_ATTACK_4'), (-1229011,'Defilers!',0,1,0,0,'rend SAY_LOSE_1'), (-1229012,'Impossible!',0,1,0,0,'rend SAY_LOSE_2'), (-1229013,'Your efforts will prove fruitless. None shall stand in our way!',0,1,0,0,'nefarius SAY_LOSE_3'), -(-1229014,'THIS CANNOT BE!!! Rend, deal with these insects.',0,1,0,0,'nefarius SAY_LOSE_4'), +(-1229014,'THIS CANNOT BE!!! Rend, deal with these insects.',0,1,0,1,'nefarius SAY_LOSE_4'), (-1229015,'With pleasure...',0,1,0,0,'rend SAY_REND_ATTACK'), -(-1229016,'The Warchief shall make quick work of you, mortals. Prepare yourselves!',0,1,0,0,'nefarius SAY_WARCHIEF'), +(-1229016,'The Warchief shall make quick work of you, mortals. Prepare yourselves!',0,1,0,25,'nefarius SAY_WARCHIEF'), (-1229017,'Taste in my power!',0,1,0,0,'nefarius SAY_BUFF_GYTH'), -(-1229018,'Your victory shall be short lived. The days of both the Alliance and Horde are coming to an end. The next time we meet shall be the last.',0,1,0,0,'nefarius SAY_VICTORY'); +(-1229018,'Your victory shall be short lived. The days of both the Alliance and Horde are coming to an end. The next time we meet shall be the last.',0,1,0,1,'nefarius SAY_VICTORY'), + +(-1229019,'%s is knocked off his drake!',0,2,0,0,'rend EMOTE_KNOCKED_OFF'); -- -1 230 000 BLACKROCK DEPTHS INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES diff --git a/sql/updates/r2528_scriptdev2.sql b/sql/updates/r2528_scriptdev2.sql new file mode 100644 index 000000000..20edaa999 --- /dev/null +++ b/sql/updates/r2528_scriptdev2.sql @@ -0,0 +1,5 @@ +DELETE FROM script_texts WHERE entry=-1229019; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1229019,'%s is knocked off his drake!',0,2,0,0,'rend EMOTE_KNOCKED_OFF'); +UPDATE script_texts SET emote=1 WHERE entry IN (-1229004,-1229005,-1229007,-1229014,-1229018); +UPDATE script_texts SET emote=25 WHERE entry IN (-1229016); From d4abed968a484df29484acde1f0757b6ee632534 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sat, 21 Apr 2012 00:37:45 +0300 Subject: [PATCH 0517/1172] [2529] Cleanup and improve script for Hazzarah and Renataki - Zul'Gurub --- .../zulgurub/boss_hazzarah.cpp | 99 ++++++++----- .../zulgurub/boss_renataki.cpp | 140 ++++++++---------- sd2_revision_nr.h | 2 +- 3 files changed, 128 insertions(+), 113 deletions(-) diff --git a/scripts/eastern_kingdoms/zulgurub/boss_hazzarah.cpp b/scripts/eastern_kingdoms/zulgurub/boss_hazzarah.cpp index 00fe13046..b3f72e2c4 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_hazzarah.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_hazzarah.cpp @@ -22,65 +22,94 @@ SDCategory: Zul'Gurub EndScriptData */ #include "precompiled.h" -#include "zulgurub.h" -#define SPELL_MANABURN 26046 -#define SPELL_SLEEP 24664 +enum +{ + SPELL_CHAIN_BURN = 24684, + SPELL_SLEEP = 24664, + SPELL_EARTH_SHOCK = 24685, + SPELL_SUMMON_ILLUSION_1 = 24681, + SPELL_SUMMON_ILLUSION_2 = 24728, + SPELL_SUMMON_ILLUSION_3 = 24729, +}; struct MANGOS_DLL_DECL boss_hazzarahAI : public ScriptedAI { - boss_hazzarahAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + boss_hazzarahAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } - uint32 ManaBurn_Timer; - uint32 Sleep_Timer; - uint32 Illusions_Timer; + uint32 m_uiManaBurnTimer; + uint32 m_uiSleepTimer; + uint32 m_uiEarthShockTimer; + uint32 m_uiIllusionsTimer; void Reset() { - ManaBurn_Timer = urand(4000, 10000); - Sleep_Timer = urand(10000, 18000); - Illusions_Timer = urand(10000, 18000); + m_uiManaBurnTimer = urand(4000, 10000); + m_uiSleepTimer = urand(10000, 18000); + m_uiEarthShockTimer = urand(7000, 14000); + m_uiIllusionsTimer = urand(10000, 18000); } - void UpdateAI(const uint32 diff) + void JustSummoned(Creature* pSummoned) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + pSummoned->AI()->AttackStart(pTarget); + } + + void UpdateAI(const uint32 uiDiff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - //ManaBurn_Timer - if (ManaBurn_Timer < diff) - { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_MANABURN); - ManaBurn_Timer = urand(8000, 16000); - }else ManaBurn_Timer -= diff; - - //Sleep_Timer - if (Sleep_Timer < diff) + // ManaBurn_Timer + if (m_uiManaBurnTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_SLEEP); - Sleep_Timer = urand(12000, 20000); - }else Sleep_Timer -= diff; + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0, SPELL_CHAIN_BURN, SELECT_FLAG_POWER_MANA)) + { + if (DoCastSpellIfCan(pTarget, SPELL_CHAIN_BURN) == CAST_OK) + m_uiManaBurnTimer = urand(8000, 16000); + } + } + else + m_uiManaBurnTimer -= uiDiff; - //Illusions_Timer - if (Illusions_Timer < diff) + // Sleep_Timer + if (m_uiSleepTimer < uiDiff) { - //We will summon 3 illusions that will spawn on a random gamer and attack this gamer - //We will just use one model for the beginning - for(int i = 0; i < 3; ++i) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) { - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) - { - if (Creature* pIllusion = m_creature->SummonCreature(15163, pTarget->GetPositionX(), pTarget->GetPositionY(), pTarget->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 30000)) - pIllusion->AI()->AttackStart(pTarget); - } + if (DoCastSpellIfCan(pTarget, SPELL_SLEEP) == CAST_OK) + m_uiSleepTimer = urand(12000, 20000); } + } + else + m_uiSleepTimer -= uiDiff; - Illusions_Timer = urand(15000, 25000); - }else Illusions_Timer -= diff; + // Earthshock + if (m_uiEarthShockTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_EARTH_SHOCK) == CAST_OK) + m_uiEarthShockTimer = urand(9000, 16000); + } + else + m_uiEarthShockTimer -= uiDiff; + + // Illusions_Timer + if (m_uiIllusionsTimer < uiDiff) + { + DoCastSpellIfCan(m_creature, SPELL_SUMMON_ILLUSION_1, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_SUMMON_ILLUSION_2, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_SUMMON_ILLUSION_3, CAST_TRIGGERED); + + m_uiIllusionsTimer = urand(15000, 25000); + } + else + m_uiIllusionsTimer -= uiDiff; DoMeleeAttackIfReady(); } }; + CreatureAI* GetAI_boss_hazzarah(Creature* pCreature) { return new boss_hazzarahAI(pCreature); diff --git a/scripts/eastern_kingdoms/zulgurub/boss_renataki.cpp b/scripts/eastern_kingdoms/zulgurub/boss_renataki.cpp index 8f737e234..1bd4063c8 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_renataki.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_renataki.cpp @@ -22,114 +22,100 @@ SDCategory: Zul'Gurub EndScriptData */ #include "precompiled.h" -#include "zulgurub.h" -#define SPELL_AMBUSH 24337 -#define SPELL_THOUSANDBLADES 24649 - -#define EQUIP_ID_MAIN_HAND 0 //was item display id 31818, but this id does not exist +enum +{ + SPELL_THOUSAND_BLADES = 24649, + SPELL_VANISH = 24699, + SPELL_GOUGE = 24698, + SPELL_TRASH = 3391 +}; struct MANGOS_DLL_DECL boss_renatakiAI : public ScriptedAI { - boss_renatakiAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + boss_renatakiAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } - uint32 Invisible_Timer; - uint32 Ambush_Timer; - uint32 Visible_Timer; - uint32 Aggro_Timer; - uint32 ThousandBlades_Timer; - - bool Invisible; - bool Ambushed; + uint32 m_uiVanishTimer; + uint32 m_uiAmbushTimer; + uint32 m_uiGougeTimer; + uint32 m_uiThousandBladesTimer; void Reset() { - Invisible_Timer = urand(8000, 18000); - Ambush_Timer = 3000; - Visible_Timer = 4000; - Aggro_Timer = urand(15000, 25000); - ThousandBlades_Timer = urand(4000, 8000); - - Invisible = false; - Ambushed = false; + m_uiVanishTimer = urand(25000, 30000); + m_uiAmbushTimer = 0; + m_uiGougeTimer = urand(15000, 25000); + m_uiThousandBladesTimer = urand(4000, 8000); } - void UpdateAI(const uint32 diff) + void EnterEvadeMode() { - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + // If is vanished, don't evade + if (m_uiAmbushTimer) return; - //Invisible_Timer - if (Invisible_Timer < diff) - { - m_creature->InterruptSpell(CURRENT_GENERIC_SPELL); - - SetEquipmentSlots(false, EQUIP_UNEQUIP, EQUIP_NO_CHANGE, EQUIP_NO_CHANGE); - m_creature->SetDisplayId(11686); - - m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - Invisible = true; + ScriptedAI::EnterEvadeMode(); + } - Invisible_Timer = urand(15000, 30000); - }else Invisible_Timer -= diff; + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; - if (Invisible) + // Note: because the Vanish spell adds invisibility effect on the target, the timers won't be decreased during the vanish phase + if (m_uiAmbushTimer) { - if (Ambush_Timer < diff) + if (m_uiAmbushTimer <= uiDiff) { - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) - { - m_creature->NearTeleportTo(pTarget->GetPositionX(), pTarget->GetPositionY(), pTarget->GetPositionZ(), 0.0f); - DoCastSpellIfCan(pTarget, SPELL_AMBUSH); - } - - Ambushed = true; - Ambush_Timer = 3000; - }else Ambush_Timer -= diff; + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_TRASH) == CAST_OK) + m_uiAmbushTimer = 0; + } + else + m_uiAmbushTimer -= uiDiff; + + // don't do anything else while vanished + return; } - if (Ambushed) + // Invisible_Timer + if (m_uiVanishTimer < uiDiff) { - if (Visible_Timer < diff) + if (DoCastSpellIfCan(m_creature, SPELL_VANISH) == CAST_OK) { - m_creature->InterruptSpell(CURRENT_GENERIC_SPELL); - - m_creature->SetDisplayId(15268); - SetEquipmentSlots(false, EQUIP_ID_MAIN_HAND, EQUIP_NO_CHANGE, EQUIP_NO_CHANGE); - - m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - Invisible = false; - - Visible_Timer = 4000; - }else Visible_Timer -= diff; + m_uiVanishTimer = urand(25000, 40000); + m_uiAmbushTimer = 2000; + } } + else + m_uiVanishTimer -= uiDiff; - //Resetting some aggro so he attacks other gamers - if (!Invisible) - if (Aggro_Timer < diff) + // Resetting some aggro so he attacks other gamers + if (m_uiGougeTimer < uiDiff) { - Unit* target = NULL; - target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,1); - - if (m_creature->getThreatManager().getThreat(m_creature->getVictim())) - m_creature->getThreatManager().modifyThreatPercent(m_creature->getVictim(),-50); - - if (target) - AttackStart(target); + if (DoCastSpellIfCan(m_creature, SPELL_GOUGE) == CAST_OK) + { + if (m_creature->getThreatManager().getThreat(m_creature->getVictim())) + m_creature->getThreatManager().modifyThreatPercent(m_creature->getVictim(),-50); - Aggro_Timer = urand(7000, 20000); - }else Aggro_Timer -= diff; + m_uiGougeTimer = urand(7000, 20000); + } + } + else + m_uiGougeTimer -= uiDiff; - if (!Invisible) - if (ThousandBlades_Timer < diff) + // Thausand Blades + if (m_uiThousandBladesTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_THOUSANDBLADES); - ThousandBlades_Timer = urand(7000, 12000); - }else ThousandBlades_Timer -= diff; + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_THOUSAND_BLADES) == CAST_OK) + m_uiThousandBladesTimer = urand(7000, 12000); + } + else + m_uiThousandBladesTimer -= uiDiff; DoMeleeAttackIfReady(); } }; + CreatureAI* GetAI_boss_renataki(Creature* pCreature) { return new boss_renatakiAI(pCreature); diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 5d49b1195..60e9317aa 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2528" + #define SD2_REVISION_NR "2529" #endif // __SD2_REVISION_NR_H__ From 9f66a008a9d0453745983214c72a92330bfaac81 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sat, 21 Apr 2012 02:44:49 +0300 Subject: [PATCH 0518/1172] [2530] Cleanup and improve script for Prophet Skeram - AQ40 --- .../temple_of_ahnqiraj/boss_skeram.cpp | 359 ++++++++---------- .../instance_temple_of_ahnqiraj.cpp | 4 + .../temple_of_ahnqiraj/temple_of_ahnqiraj.h | 2 +- sd2_revision_nr.h | 2 +- 4 files changed, 169 insertions(+), 198 deletions(-) diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_skeram.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_skeram.cpp index 924677068..939d54d8f 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/boss_skeram.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_skeram.cpp @@ -16,37 +16,33 @@ /* ScriptData SDName: Boss_Skeram -SD%Complete: 75 -SDComment: Mind Control buggy. +SD%Complete: 90 +SDComment: Timers SDCategory: Temple of Ahn'Qiraj EndScriptData */ #include "precompiled.h" #include "temple_of_ahnqiraj.h" -#include "Group.h" - -#define SAY_AGGRO1 -1531000 -#define SAY_AGGRO2 -1531001 -#define SAY_AGGRO3 -1531002 -#define SAY_SLAY1 -1531003 -#define SAY_SLAY2 -1531004 -#define SAY_SLAY3 -1531005 -#define SAY_SPLIT -1531006 -#define SAY_DEATH -1531007 - -#define SPELL_ARCANE_EXPLOSION 25679 -#define SPELL_EARTH_SHOCK 26194 -#define SPELL_TRUE_FULFILLMENT4 26526 -#define SPELL_BLINK 28391 - -class ov_mycoordinates + +enum { - public: - float x,y,z,r; - ov_mycoordinates(float cx, float cy, float cz, float cr) - { - x = cx; y = cy; z = cz; r = cr; - } + SAY_AGGRO1 = -1531000, + SAY_AGGRO2 = -1531001, + SAY_AGGRO3 = -1531002, + SAY_SLAY1 = -1531003, + SAY_SLAY2 = -1531004, + SAY_SLAY3 = -1531005, + SAY_SPLIT = -1531006, + SAY_DEATH = -1531007, + + SPELL_ARCANE_EXPLOSION = 26192, + SPELL_EARTH_SHOCK = 26194, + SPELL_TRUE_FULFILLMENT = 785, + SPELL_TELEPORT_1 = 4801, + SPELL_TELEPORT_2 = 8195, + SPELL_TELEPORT_3 = 20449, + SPELL_INITIALIZE_IMAGE = 3730, + SPELL_SUMMON_IMAGES = 747, }; struct MANGOS_DLL_DECL boss_skeramAI : public ScriptedAI @@ -54,47 +50,40 @@ struct MANGOS_DLL_DECL boss_skeramAI : public ScriptedAI boss_skeramAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - IsImage = false; Reset(); + + // Check this for images, because the Initialize spell hits the target only after aggro + if (m_creature->IsTemporarySummon()) + m_bIsImage = true; + else + m_bIsImage = false; } ScriptedInstance* m_pInstance; - uint32 ArcaneExplosion_Timer; - uint32 EarthShock_Timer; - uint32 FullFillment_Timer; - uint32 Blink_Timer; - uint32 Invisible_Timer; + uint32 m_uiArcaneExplosionTimer; + uint32 m_uiEarthShockTimer; + uint32 m_uiFullFillmentTimer; + uint32 m_uiBlinkTimer; - Creature *Image1, *Image2; + float m_fHpCheck; - bool Images75; - bool Images50; - bool Images25; - bool IsImage; - bool Invisible; + bool m_bIsImage; void Reset() { - ArcaneExplosion_Timer = urand(6000, 12000); - EarthShock_Timer = 2000; - FullFillment_Timer = 15000; - Blink_Timer = urand(8000, 20000); - Invisible_Timer = 500; - - Images75 = false; - Images50 = false; - Images25 = false; - Invisible = false; - - m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - m_creature->SetVisibility(VISIBILITY_ON); - - if (IsImage) - m_creature->SetDeathState(JUST_DIED); + m_uiArcaneExplosionTimer = urand(6000, 12000); + m_uiEarthShockTimer = 2000; + m_uiFullFillmentTimer = 15000; + m_uiBlinkTimer = urand(30000, 45000); + + m_fHpCheck = 75.0f; + + if (m_creature->GetVisibility() != VISIBILITY_ON) + m_creature->SetVisibility(VISIBILITY_ON); } - void KilledUnit(Unit* victim) + void KilledUnit(Unit* pVictim) { switch(urand(0, 2)) { @@ -104,20 +93,23 @@ struct MANGOS_DLL_DECL boss_skeramAI : public ScriptedAI } } - void JustDied(Unit* Killer) + void JustDied(Unit* pKiller) { - if (!IsImage) + if (!m_bIsImage) { DoScriptText(SAY_DEATH, m_creature); if (m_pInstance) m_pInstance->SetData(TYPE_SKERAM, DONE); } + // Else despawn to avoid looting + else + m_creature->ForcedDespawn(); } - void Aggro(Unit *who) + void Aggro(Unit* pWho) { - if (IsImage || Images75) + if (m_bIsImage) return; switch(urand(0, 2)) @@ -135,173 +127,125 @@ struct MANGOS_DLL_DECL boss_skeramAI : public ScriptedAI { if (m_pInstance) m_pInstance->SetData(TYPE_SKERAM, FAIL); + + if (m_bIsImage) + m_creature->ForcedDespawn(); } - void UpdateAI(const uint32 diff) + void JustSummoned(Creature* pSummoned) { - //Return since we have no target + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + pSummoned->AI()->AttackStart(pTarget); + + DoCastSpellIfCan(pSummoned, SPELL_INITIALIZE_IMAGE, CAST_TRIGGERED); + } + + // Wrapper to handle the image version initialize + void DoInitializeImage() + { + if (!m_pInstance) + return; + + // Initialize the health of the clone + if (Creature* pProphet = m_pInstance->GetSingleCreatureFromStorage(NPC_SKERAM)) + { + float fHealthPct = pProphet->GetHealthPercent(); + float fMaxHealthPct = 0; + + // The max health depends on the split phase. It's percent * original boss health + if (fHealthPct < 25.0f) + fMaxHealthPct = 0.50f; + else if (fHealthPct < 50.0f) + fMaxHealthPct = 0.20f; + else + fMaxHealthPct = 0.10f; + + // Set the same health percent as the original boss + m_creature->SetMaxHealth(m_creature->GetMaxHealth()*fMaxHealthPct); + m_creature->SetHealthPercent(fHealthPct); + } + } + + void UpdateAI(const uint32 uiDiff) + { + // Return since we have no target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - //ArcaneExplosion_Timer - if (ArcaneExplosion_Timer < diff) + // ArcaneExplosion_Timer + if (m_uiArcaneExplosionTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_ARCANE_EXPLOSION); - ArcaneExplosion_Timer = urand(8000, 18000); - }else ArcaneExplosion_Timer -= diff; + if (DoCastSpellIfCan(m_creature, SPELL_ARCANE_EXPLOSION) == CAST_OK) + m_uiArcaneExplosionTimer = urand(8000, 18000); + } + else + m_uiArcaneExplosionTimer -= uiDiff; - //If we are within range melee the target - if (m_creature->CanReachWithMeleeAttack(m_creature->getVictim())) + // True Fullfilment + if (m_uiFullFillmentTimer < uiDiff) { - //Make sure our attack is ready and we arn't currently casting - if (m_creature->isAttackReady() && !m_creature->IsNonMeleeSpellCasted(false)) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1)) { - m_creature->AttackerStateUpdate(m_creature->getVictim()); - m_creature->resetAttackTimer(); + if (DoCastSpellIfCan(pTarget, SPELL_TRUE_FULFILLMENT) == CAST_OK) + m_uiFullFillmentTimer = urand(20000, 30000); } - }else - { - //EarthShock_Timer - if (EarthShock_Timer < diff) - { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_EARTH_SHOCK); - EarthShock_Timer = 1000; - }else EarthShock_Timer -= diff; } + else + m_uiFullFillmentTimer -= uiDiff; - //Blink_Timer - if (Blink_Timer < diff) + // Blink_Timer + if (m_uiBlinkTimer < uiDiff) { - //DoCastSpellIfCan(m_creature, SPELL_BLINK); switch(urand(0, 2)) { - case 0: - m_creature->GetMap()->CreatureRelocation(m_creature, -8340.782227f, 2083.814453f, 125.648788f, 0.0f); - DoResetThreat(); - break; - case 1: - m_creature->GetMap()->CreatureRelocation(m_creature, -8341.546875f, 2118.504639f, 133.058151f, 0.0f); - DoResetThreat(); - break; - case 2: - m_creature->GetMap()->CreatureRelocation(m_creature, -8318.822266f, 2058.231201f, 133.058151f, 0.0f); - DoResetThreat(); - break; + case 0: DoCastSpellIfCan(m_creature, SPELL_TELEPORT_1); break; + case 1: DoCastSpellIfCan(m_creature, SPELL_TELEPORT_2); break; + case 2: DoCastSpellIfCan(m_creature, SPELL_TELEPORT_3); break; } - DoStopAttack(); - - Blink_Timer = urand(20000, 40000); - }else Blink_Timer -= diff; - - float procent = m_creature->GetHealthPercent(); - - //Summoning 2 Images and teleporting to a random position on 75% health - if (!Images75 && !IsImage && procent <= 75.0f && procent > 70.0f) - DoSplit(75); - //Summoning 2 Images and teleporting to a random position on 50% health - if (!Images50 && !IsImage && procent <= 50.0f && procent > 45.0f) - DoSplit(50); - - //Summoning 2 Images and teleporting to a random position on 25% health - if (!Images25 && !IsImage && procent <= 25.0f && procent > 20.0f) - DoSplit(25); - - //Invisible_Timer - if (Invisible) - { - if (Invisible_Timer < diff) - { - //Making Skeram visible after telporting + DoResetThreat(); + if (m_creature->GetVisibility() != VISIBILITY_ON) m_creature->SetVisibility(VISIBILITY_ON); - m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - Invisible_Timer = 2500; - Invisible = false; - }else Invisible_Timer -= diff; + m_uiBlinkTimer = urand(10000, 30000); } + else + m_uiBlinkTimer -= uiDiff; - DoMeleeAttackIfReady(); - } - - void DoSplit(int atPercent /* 75 50 25 */) - { - DoScriptText(SAY_SPLIT, m_creature); - - ov_mycoordinates *place1 = new ov_mycoordinates(-8340.782227f, 2083.814453f, 125.648788f, 0.0f); - ov_mycoordinates *place2 = new ov_mycoordinates(-8341.546875f, 2118.504639f, 133.058151f, 0.0f); - ov_mycoordinates *place3 = new ov_mycoordinates(-8318.822266f, 2058.231201f, 133.058151f, 0.0f); - - ov_mycoordinates *bossc=place1, *i1=place2, *i2=place3; - - switch(urand(0, 2)) - { - case 0: - bossc = place1; - i1 = place2; - i2 = place3; - break; - case 1: - bossc = place2; - i1 = place1; - i2 = place3; - break; - case 2: - bossc = place3; - i1 = place1; - i2 = place2; - break; - } - - m_creature->RemoveAllAuras(); - m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - m_creature->SetVisibility(VISIBILITY_OFF); - - m_creature->GetMap()->CreatureRelocation(m_creature, bossc->x, bossc->y, bossc->z, bossc->r); - - Invisible = true; - DoResetThreat(); - DoStopAttack(); - - switch (atPercent) + // Summon images at 75%, 50% and 25% + if (!m_bIsImage && m_creature->GetHealthPercent() < m_fHpCheck) { - case 75: Images75 = true; break; - case 50: Images50 = true; break; - case 25: Images25 = true; break; + if (DoCastSpellIfCan(m_creature, SPELL_SUMMON_IMAGES) == CAST_OK) + { + DoScriptText(SAY_SPLIT, m_creature); + m_fHpCheck -= 25.0f; + // Teleport shortly after the images are summoned and set invisible to clear the selection (Workaround alert!!!) + m_creature->SetVisibility(VISIBILITY_OFF); + m_uiBlinkTimer = 2000; + } } - Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0); - - Image1 = m_creature->SummonCreature(15263, i1->x, i1->y, i1->z, i1->r, TEMPSUMMON_CORPSE_DESPAWN, 30000); - if (Image1) + // If we are within range melee the target + if (m_creature->CanReachWithMeleeAttack(m_creature->getVictim())) { - Image1->SetMaxHealth(m_creature->GetMaxHealth() / 5); - Image1->SetHealth(m_creature->GetHealth() / 5); - - if (boss_skeramAI* pImageAI = dynamic_cast(Image1->AI())) - pImageAI->IsImage = true; - - if (target) - Image1->AI()->AttackStart(target); + //Make sure our attack is ready and we arn't currently casting + if (m_creature->isAttackReady() && !m_creature->IsNonMeleeSpellCasted(false)) + { + m_creature->AttackerStateUpdate(m_creature->getVictim()); + m_creature->resetAttackTimer(); + } } - - Image2 = m_creature->SummonCreature(15263,i2->x, i2->y, i2->z, i2->r, TEMPSUMMON_CORPSE_DESPAWN, 30000); - if (Image2) + else { - Image2->SetMaxHealth(m_creature->GetMaxHealth() / 5); - Image2->SetHealth(m_creature->GetHealth() / 5); - - if (boss_skeramAI* pImageAI = dynamic_cast(Image2->AI())) - pImageAI->IsImage = true; - - if (target) - Image2->AI()->AttackStart(target); + // EarthShock_Timer + if (m_uiEarthShockTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_EARTH_SHOCK) == CAST_OK) + m_uiEarthShockTimer = 1000; + } + else + m_uiEarthShockTimer -= uiDiff; } - - Invisible = true; - delete place1; - delete place2; - delete place3; } }; @@ -310,6 +254,28 @@ CreatureAI* GetAI_boss_skeram(Creature* pCreature) return new boss_skeramAI(pCreature); } +bool EffectDummyCreature_prophet_skeram(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) +{ + //always check spellid and effectindex + if (uiSpellId == SPELL_INITIALIZE_IMAGE && uiEffIndex == EFFECT_INDEX_0) + { + // check for target == caster first + if (instance_temple_of_ahnqiraj* pInstance = (instance_temple_of_ahnqiraj*)pCreatureTarget->GetInstanceData()) + { + if (Creature* pProphet = pInstance->GetSingleCreatureFromStorage(NPC_SKERAM)) + { + if (pProphet == pCreatureTarget) + return false; + } + } + + if (boss_skeramAI* pSkeramAI = dynamic_cast(pCreatureTarget->AI())) + pSkeramAI->DoInitializeImage(); + } + + return false; +} + void AddSC_boss_skeram() { Script* pNewScript; @@ -317,5 +283,6 @@ void AddSC_boss_skeram() pNewScript = new Script; pNewScript->Name = "boss_skeram"; pNewScript->GetAI = &GetAI_boss_skeram; + pNewScript->pEffectDummyNPC = &EffectDummyCreature_prophet_skeram; pNewScript->RegisterSelf(); } diff --git a/scripts/kalimdor/temple_of_ahnqiraj/instance_temple_of_ahnqiraj.cpp b/scripts/kalimdor/temple_of_ahnqiraj/instance_temple_of_ahnqiraj.cpp index 17e75d66e..f96c26e47 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/instance_temple_of_ahnqiraj.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/instance_temple_of_ahnqiraj.cpp @@ -39,6 +39,10 @@ void instance_temple_of_ahnqiraj::OnCreatureCreate (Creature* pCreature) { switch (pCreature->GetEntry()) { + case NPC_SKERAM: + // Don't store the summoned images guid + if (GetData(TYPE_SKERAM) == IN_PROGRESS) + break; case NPC_VEKLOR: case NPC_VEKNILASH: case NPC_CTHUN: diff --git a/scripts/kalimdor/temple_of_ahnqiraj/temple_of_ahnqiraj.h b/scripts/kalimdor/temple_of_ahnqiraj/temple_of_ahnqiraj.h index 8a83155ee..d484cb6b0 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/temple_of_ahnqiraj.h +++ b/scripts/kalimdor/temple_of_ahnqiraj/temple_of_ahnqiraj.h @@ -14,7 +14,7 @@ enum TYPE_TWINS = 2, TYPE_CTHUN_PHASE = 3, - // NPC_SKERAM = 15263, + NPC_SKERAM = 15263, //NPC_KRI = 15511, //NPC_VEM = 15544, //NPC_YAUJ = 15543, diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 60e9317aa..f3b510beb 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2529" + #define SD2_REVISION_NR "2530" #endif // __SD2_REVISION_NR_H__ From f8d2745971a7dd600572ebf7d76864a5586930b5 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sat, 21 Apr 2012 11:38:19 +0300 Subject: [PATCH 0519/1172] [2531] Slightly improve script for Bloodlord Mandokir - Zul'Gurub --- .../zulgurub/boss_mandokir.cpp | 199 ++++++++---------- .../zulgurub/instance_zulgurub.cpp | 12 ++ scripts/eastern_kingdoms/zulgurub/zulgurub.h | 3 + sd2_revision_nr.h | 2 +- 4 files changed, 99 insertions(+), 117 deletions(-) diff --git a/scripts/eastern_kingdoms/zulgurub/boss_mandokir.cpp b/scripts/eastern_kingdoms/zulgurub/boss_mandokir.cpp index 7fbc43235..78fff199e 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_mandokir.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_mandokir.cpp @@ -84,8 +84,6 @@ static SpawnLocations aSpirits[]= {-12266.1f, -1940.72f, 132.606f, 0.70910f} }; -static SpawnLocations aMandokirDownstairsPos = {-12196.30f, -1948.37f, 130.31f, 3.77f}; - struct MANGOS_DLL_DECL boss_mandokirAI : public ScriptedAI { boss_mandokirAI(Creature* pCreature) : ScriptedAI(pCreature) @@ -96,62 +94,77 @@ struct MANGOS_DLL_DECL boss_mandokirAI : public ScriptedAI ScriptedInstance* m_pInstance; - uint32 m_uiWatch_Timer; - uint32 m_uiCleave_Timer; - uint32 m_uiWhirlwind_Timer; - uint32 m_uiFear_Timer; - uint32 m_uiMortalStrike_Timer; - uint32 m_uiCheck_Timer; + uint32 m_uiWatchTimer; + uint32 m_uiCleaveTimer; + uint32 m_uiWhirlwindTimer; + uint32 m_uiFearTimer; + uint32 m_uiMortalStrikeTimer; + uint32 m_uiCheckTimer; uint8 m_uiKillCount; - bool m_bRaptorDead; - bool m_bMandokirDownstairs; - float m_fTargetThreat; ObjectGuid m_watchTargetGuid; - ObjectGuid m_ohganGuid; void Reset() { - m_uiWatch_Timer = 33000; - m_uiCleave_Timer = 7000; - m_uiWhirlwind_Timer = 20000; - m_uiFear_Timer = 1000; - m_uiMortalStrike_Timer = 1000; - m_uiCheck_Timer = 1000; + m_uiWatchTimer = 33000; + m_uiCleaveTimer = 7000; + m_uiWhirlwindTimer = 20000; + m_uiFearTimer = 1000; + m_uiMortalStrikeTimer = 1000; + m_uiCheckTimer = 1000; + + m_uiKillCount = 0; + + m_fTargetThreat = 0.0f; + } + + void Aggro(Unit* pWho) + { + DoScriptText(SAY_AGGRO, m_creature); - m_uiKillCount = 0; + uint32 uiCount = sizeof(aSpirits)/sizeof(SpawnLocations); - m_bRaptorDead = false; - m_bMandokirDownstairs = false; + for(uint8 i = 0; i < uiCount; ++i) + m_creature->SummonCreature(NPC_CHAINED_SPIRIT, aSpirits[i].fX, aSpirits[i].fY, aSpirits[i].fZ, aSpirits[i].fAng, TEMPSUMMON_CORPSE_DESPAWN, 0); - m_fTargetThreat = 0.0f; - m_watchTargetGuid.Clear(); + //At combat start Mandokir is mounted so we must unmount it first + m_creature->Unmount(); - if (Creature* pOhgan = m_creature->GetMap()->GetCreature(m_ohganGuid)) - pOhgan->ForcedDespawn(); + //And summon his raptor + m_creature->SummonCreature(NPC_OHGAN, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 35000); + + if (m_pInstance) + m_pInstance->SetData(TYPE_OHGAN, IN_PROGRESS); } - // should evade to bottom of the stairs when raid fail void JustReachedHome() { if (m_pInstance) m_pInstance->SetData(TYPE_OHGAN, FAIL); + } - std::list lSpirits; //despawn spirits - GetCreatureListWithEntryInGrid(lSpirits, m_creature, NPC_CHAINED_SPIRIT, DEFAULT_VISIBILITY_INSTANCE); + void JustDied(Unit* pKiller) + { + if (m_pInstance) + m_pInstance->SetData(TYPE_OHGAN, DONE); + } - if (!lSpirits.empty()) - { - for(std::list::iterator iter = lSpirits.begin(); iter != lSpirits.end(); ++iter) - { - if ((*iter) && (*iter)->isAlive()) - (*iter)->ForcedDespawn(); - } - } + void EnterEvadeMode() + { + m_creature->RemoveAllAuras(); + m_creature->DeleteThreatList(); + m_creature->CombatStop(true); + m_creature->LoadCreatureAddon(true); + + // should evade to bottom of the stairs when raid fail + if (m_creature->isAlive()) + m_creature->GetMotionMaster()->MovePoint(0, aMandokirDownstairsPos[0], aMandokirDownstairsPos[1], aMandokirDownstairsPos[2]); - m_bMandokirDownstairs = false; + m_creature->SetLootRecipient(NULL); + + Reset(); } void KilledUnit(Unit* pVictim) @@ -174,7 +187,6 @@ struct MANGOS_DLL_DECL boss_mandokirAI : public ScriptedAI } DoCastSpellIfCan(m_creature, SPELL_LEVEL_UP, CAST_TRIGGERED); - m_creature->SetLevel(m_creature->getLevel() + 1); m_uiKillCount = 0; } @@ -186,37 +198,22 @@ struct MANGOS_DLL_DECL boss_mandokirAI : public ScriptedAI } } - void Aggro(Unit* pWho) - { - DoScriptText(SAY_AGGRO, m_creature); - - uint32 uiCount = sizeof(aSpirits)/sizeof(SpawnLocations); - - for(uint8 i = 0; i < uiCount; ++i) - m_creature->SummonCreature(NPC_CHAINED_SPIRIT, aSpirits[i].fX, aSpirits[i].fY, aSpirits[i].fZ, aSpirits[i].fAng, TEMPSUMMON_CORPSE_DESPAWN, 0); - - //At combat start Mandokir is mounted so we must unmount it first - m_creature->Unmount(); - - //And summon his raptor - m_creature->SummonCreature(NPC_OHGAN, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 35000); - } - void JustSummoned(Creature* pSummoned) { if (pSummoned->GetEntry() == NPC_OHGAN) { - m_ohganGuid = pSummoned->GetObjectGuid(); - if (m_creature->getVictim()) pSummoned->AI()->AttackStart(m_creature->getVictim()); } } - void SummonedCreatureDespawn(Creature* pSummoned) + void SummonedCreatureJustDied(Creature* pSummoned) { if (pSummoned->GetEntry() == NPC_OHGAN) - m_ohganGuid.Clear(); + { + DoCastSpellIfCan(m_creature, SPELL_ENRAGE, CAST_TRIGGERED); + DoScriptText(EMOTE_RAGE, m_creature); + } } void SpellHitTarget(Unit* pTarget, const SpellEntry* pSpell) @@ -228,7 +225,7 @@ struct MANGOS_DLL_DECL boss_mandokirAI : public ScriptedAI m_watchTargetGuid = pTarget->GetObjectGuid(); m_fTargetThreat = m_creature->getThreatManager().getThreat(pTarget); - m_uiWatch_Timer = 6000; + m_uiWatchTimer = 6000; //Could use this instead of hard coded timer for the above (but no script access), //but would still a hack since we should better use the dummy, at aura removal @@ -243,27 +240,17 @@ struct MANGOS_DLL_DECL boss_mandokirAI : public ScriptedAI if (uiPointId == POINT_DOWNSTAIRS) { - // evaded at least once, and then attackable - if (m_pInstance->GetData(TYPE_OHGAN) == FAIL) - m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE); - else - m_creature->SetInCombatWithZone(); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PASSIVE); + m_creature->SetInCombatWithZone(); } } void UpdateAI(const uint32 uiDiff) { - if (!m_bMandokirDownstairs && m_pInstance && (m_pInstance->GetData(TYPE_OHGAN) == SPECIAL || m_pInstance->GetData(TYPE_OHGAN) == FAIL)) - { - m_bMandokirDownstairs = true; - m_creature->SetWalk(false); - m_creature->GetMotionMaster()->MovePoint(POINT_DOWNSTAIRS, aMandokirDownstairsPos.fX, aMandokirDownstairsPos.fY, aMandokirDownstairsPos.fZ); - } - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - if (m_uiWatch_Timer < uiDiff) + if (m_uiWatchTimer < uiDiff) { //If someone is watched if (m_watchTargetGuid) @@ -290,33 +277,33 @@ struct MANGOS_DLL_DECL boss_mandokirAI : public ScriptedAI } } - m_uiWatch_Timer = 20000; + m_uiWatchTimer = 20000; } else - m_uiWatch_Timer -= uiDiff; + m_uiWatchTimer -= uiDiff; if (!m_watchTargetGuid) { //Cleave - if (m_uiCleave_Timer < uiDiff) + if (m_uiCleaveTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_CLEAVE); - m_uiCleave_Timer = 7000; + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_CLEAVE) == CAST_OK) + m_uiCleaveTimer = 7000; } else - m_uiCleave_Timer -= uiDiff; + m_uiCleaveTimer -= uiDiff; //Whirlwind - if (m_uiWhirlwind_Timer < uiDiff) + if (m_uiWhirlwindTimer < uiDiff) { - DoCastSpellIfCan(m_creature, SPELL_WHIRLWIND); - m_uiWhirlwind_Timer = 18000; + if (DoCastSpellIfCan(m_creature, SPELL_WHIRLWIND) == CAST_OK) + m_uiWhirlwindTimer = 18000; } else - m_uiWhirlwind_Timer -= uiDiff; + m_uiWhirlwindTimer -= uiDiff; //If more then 3 targets in melee range mandokir will cast fear - if (m_uiFear_Timer < uiDiff) + if (m_uiFearTimer < uiDiff) { uint8 uiTargetInRangeCount = 0; @@ -332,32 +319,24 @@ struct MANGOS_DLL_DECL boss_mandokirAI : public ScriptedAI if (uiTargetInRangeCount > 3) DoCastSpellIfCan(m_creature->getVictim(), SPELL_FEAR); - m_uiFear_Timer = 4000; + m_uiFearTimer = 4000; } else - m_uiFear_Timer -= uiDiff; + m_uiFearTimer -= uiDiff; //Mortal Strike if target below 50% hp if (m_creature->getVictim()->GetHealthPercent() < 50.0f) { - if (m_uiMortalStrike_Timer < uiDiff) + if (m_uiMortalStrikeTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_MORTAL_STRIKE); - m_uiMortalStrike_Timer = 15000; + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_MORTAL_STRIKE) == CAST_OK) + m_uiMortalStrikeTimer = 15000; } else - m_uiMortalStrike_Timer -= uiDiff; + m_uiMortalStrikeTimer -= uiDiff; } } - //Checking if Ohgan is dead. If yes Mandokir will enrage. - if (!m_bRaptorDead && m_pInstance && m_pInstance->GetData(TYPE_OHGAN) == DONE) - { - DoCastSpellIfCan(m_creature, SPELL_ENRAGE); - DoScriptText(EMOTE_RAGE, m_creature); - m_bRaptorDead = true; - } - DoMeleeAttackIfReady(); } }; @@ -365,25 +344,13 @@ struct MANGOS_DLL_DECL boss_mandokirAI : public ScriptedAI //Ohgan struct MANGOS_DLL_DECL mob_ohganAI : public ScriptedAI { - mob_ohganAI(Creature* pCreature) : ScriptedAI(pCreature) - { - m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - Reset(); - } - - ScriptedInstance* m_pInstance; + mob_ohganAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } - uint32 m_uiSunderArmor_Timer; + uint32 m_uiSunderArmorTimer; void Reset() { - m_uiSunderArmor_Timer = 5000; - } - - void JustDied(Unit* pKiller) - { - if (m_pInstance) - m_pInstance->SetData(TYPE_OHGAN, DONE); + m_uiSunderArmorTimer = 5000; } void KilledUnit(Unit* pVictim) @@ -404,13 +371,13 @@ struct MANGOS_DLL_DECL mob_ohganAI : public ScriptedAI return; // SunderArmor - if (m_uiSunderArmor_Timer < uiDiff) + if (m_uiSunderArmorTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_SUNDERARMOR); - m_uiSunderArmor_Timer = urand(10000, 15000); + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_SUNDERARMOR) == CAST_OK) + m_uiSunderArmorTimer = urand(10000, 15000); } else - m_uiSunderArmor_Timer -= uiDiff; + m_uiSunderArmorTimer -= uiDiff; DoMeleeAttackIfReady(); } diff --git a/scripts/eastern_kingdoms/zulgurub/instance_zulgurub.cpp b/scripts/eastern_kingdoms/zulgurub/instance_zulgurub.cpp index 62de98485..d5eb0f540 100644 --- a/scripts/eastern_kingdoms/zulgurub/instance_zulgurub.cpp +++ b/scripts/eastern_kingdoms/zulgurub/instance_zulgurub.cpp @@ -59,6 +59,7 @@ void instance_zulgurub::OnCreatureCreate(Creature* pCreature) case NPC_THEKAL: case NPC_JINDO: case NPC_HAKKAR: + case NPC_BLOODLORD_MANDOKIR: m_mNpcEntryGuidStore[pCreature->GetEntry()] = pCreature->GetObjectGuid(); break; case NPC_PANTHER_TRIGGER: @@ -102,6 +103,17 @@ void instance_zulgurub::SetData(uint32 uiType, uint32 uiData) // ToDo: Reset the Gong on FAIL break; case TYPE_OHGAN: + // Note: SPECIAL instance data is set via ACID! + if (uiData == SPECIAL) + { + if (Creature* pMandokir = GetSingleCreatureFromStorage(NPC_BLOODLORD_MANDOKIR)) + { + pMandokir->SetWalk(false); + pMandokir->GetMotionMaster()->MovePoint(1, aMandokirDownstairsPos[0], aMandokirDownstairsPos[1], aMandokirDownstairsPos[2]); + } + } + m_auiEncounter[uiType] = uiData; + break; case TYPE_LORKHAN: case TYPE_ZATH: m_auiEncounter[uiType] = uiData; diff --git a/scripts/eastern_kingdoms/zulgurub/zulgurub.h b/scripts/eastern_kingdoms/zulgurub/zulgurub.h index b37eab7eb..4d64ee42c 100644 --- a/scripts/eastern_kingdoms/zulgurub/zulgurub.h +++ b/scripts/eastern_kingdoms/zulgurub/zulgurub.h @@ -25,6 +25,7 @@ enum NPC_JINDO = 11380, NPC_HAKKAR = 14834, NPC_PANTHER_TRIGGER = 15091, + NPC_BLOODLORD_MANDOKIR = 11382, GO_GONG_OF_BETHEKK = 180526, GO_FORCEFIELD = 180497, @@ -38,6 +39,8 @@ enum AREATRIGGER_ALTAR = 3960, }; +static const float aMandokirDownstairsPos[3] = {-12196.30f, -1948.37f, 130.31f}; + class MANGOS_DLL_DECL instance_zulgurub : public ScriptedInstance { public: diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index f3b510beb..f8195aa7a 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2530" + #define SD2_REVISION_NR "2531" #endif // __SD2_REVISION_NR_H__ From 876af5d60c0d7ce4a784709b1aeaccc0d6189fc7 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sat, 21 Apr 2012 13:36:15 +0300 Subject: [PATCH 0520/1172] [2532] Unify and update script for the paladin Redemption spell quests Expects MaNGOS [11972] --- scripts/eastern_kingdoms/dun_morogh.cpp | 64 +---------- scripts/eastern_kingdoms/elwynn_forest.cpp | 64 +---------- scripts/eastern_kingdoms/silvermoon_city.cpp | 73 +----------- scripts/world/npcs_special.cpp | 110 +++++++++++++++++++ sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 4 +- sql/updates/r2532_mangos.sql | 1 + 7 files changed, 119 insertions(+), 199 deletions(-) create mode 100644 sql/updates/r2532_mangos.sql diff --git a/scripts/eastern_kingdoms/dun_morogh.cpp b/scripts/eastern_kingdoms/dun_morogh.cpp index af9864446..c1059fe40 100644 --- a/scripts/eastern_kingdoms/dun_morogh.cpp +++ b/scripts/eastern_kingdoms/dun_morogh.cpp @@ -16,76 +16,16 @@ /* ScriptData SDName: Dun_Morogh -SD%Complete: 50 -SDComment: Quest support: 1783 +SD%Complete: 0 +SDComment: Placeholder SDCategory: Dun Morogh EndScriptData */ /* ContentData -npc_narm_faulk EndContentData */ #include "precompiled.h" -/*###### -## npc_narm_faulk -######*/ - -#define SAY_HEAL -1000187 - -struct MANGOS_DLL_DECL npc_narm_faulkAI : public ScriptedAI -{ - uint32 lifeTimer; - bool spellHit; - - npc_narm_faulkAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} - - void Reset() - { - lifeTimer = 120000; - m_creature->SetUInt32Value(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_DEAD); - m_creature->SetStandState(UNIT_STAND_STATE_DEAD); - spellHit = false; - } - - void MoveInLineOfSight(Unit *who) { } - - void UpdateAI(const uint32 diff) - { - if (m_creature->IsStandState()) - { - if (lifeTimer < diff) - m_creature->AI()->EnterEvadeMode(); - else - lifeTimer -= diff; - } - } - - void SpellHit(Unit *Hitter, const SpellEntry *Spellkind) - { - if (Spellkind->Id == 8593 && !spellHit) - { - DoCastSpellIfCan(m_creature,32343); - m_creature->SetStandState(UNIT_STAND_STATE_STAND); - m_creature->SetUInt32Value(UNIT_DYNAMIC_FLAGS, 0); - //m_creature->RemoveAllAuras(); - DoScriptText(SAY_HEAL, m_creature, Hitter); - spellHit = true; - } - } - -}; -CreatureAI* GetAI_npc_narm_faulk(Creature* pCreature) -{ - return new npc_narm_faulkAI(pCreature); -} - void AddSC_dun_morogh() { - Script* pNewScript; - - pNewScript = new Script; - pNewScript->Name = "npc_narm_faulk"; - pNewScript->GetAI = &GetAI_npc_narm_faulk; - pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/elwynn_forest.cpp b/scripts/eastern_kingdoms/elwynn_forest.cpp index 887c6eceb..c503ce467 100644 --- a/scripts/eastern_kingdoms/elwynn_forest.cpp +++ b/scripts/eastern_kingdoms/elwynn_forest.cpp @@ -16,76 +16,16 @@ /* ScriptData SDName: Elwynn_Forest -SD%Complete: 50 -SDComment: Quest support: 1786 +SD%Complete: 0 +SDComment: Placeholder SDCategory: Elwynn Forest EndScriptData */ /* ContentData -npc_henze_faulk EndContentData */ #include "precompiled.h" -/*###### -## npc_henze_faulk -######*/ - -#define SAY_HEAL -1000187 - -struct MANGOS_DLL_DECL npc_henze_faulkAI : public ScriptedAI -{ - uint32 lifeTimer; - bool spellHit; - - npc_henze_faulkAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} - - void Reset() - { - lifeTimer = 120000; - m_creature->SetUInt32Value(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_DEAD); - m_creature->SetStandState(UNIT_STAND_STATE_DEAD); // lay down - spellHit = false; - } - - void MoveInLineOfSight(Unit *who) { } - - void UpdateAI(const uint32 diff) - { - if (m_creature->IsStandState()) - { - if (lifeTimer < diff) - m_creature->AI()->EnterEvadeMode(); - else - lifeTimer -= diff; - } - } - - void SpellHit(Unit *Hitter, const SpellEntry *Spellkind) - { - if (Spellkind->Id == 8593 && !spellHit) - { - DoCastSpellIfCan(m_creature,32343); - m_creature->SetStandState(UNIT_STAND_STATE_STAND); - m_creature->SetUInt32Value(UNIT_DYNAMIC_FLAGS, 0); - //m_creature->RemoveAllAuras(); - DoScriptText(SAY_HEAL, m_creature, Hitter); - spellHit = true; - } - } - -}; -CreatureAI* GetAI_npc_henze_faulk(Creature* pCreature) -{ - return new npc_henze_faulkAI(pCreature); -} - void AddSC_elwynn_forest() { - Script* pNewScript; - - pNewScript = new Script; - pNewScript->Name = "npc_henze_faulk"; - pNewScript->GetAI = &GetAI_npc_henze_faulk; - pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/silvermoon_city.cpp b/scripts/eastern_kingdoms/silvermoon_city.cpp index eb6284bac..d35c86413 100644 --- a/scripts/eastern_kingdoms/silvermoon_city.cpp +++ b/scripts/eastern_kingdoms/silvermoon_city.cpp @@ -16,85 +16,16 @@ /* ScriptData SDName: Silvermoon_City -SD%Complete: 100 -SDComment: Quest support: 9685 +SD%Complete: 0 +SDComment: Placeholder SDCategory: Silvermoon City EndScriptData */ /* ContentData -npc_blood_knight_stillblade EndContentData */ #include "precompiled.h" -/*####### -# npc_blood_knight_stillblade -#######*/ - -enum -{ - QUEST_REDEEMING_THE_DEAD = 9685, - - SAY_HEAL = -1000193, - SPELL_SHIMMERING_VESSEL = 31225, - SPELL_REVIVE_SELF = 32343, -}; - -struct MANGOS_DLL_DECL npc_blood_knight_stillbladeAI : public ScriptedAI -{ - npc_blood_knight_stillbladeAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } - - uint32 m_uiLifeTimer; - bool m_bSpellHit; - - void Reset() - { - m_uiLifeTimer = 120000; - m_creature->SetUInt32Value(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_DEAD); - m_creature->SetStandState(UNIT_STAND_STATE_DEAD); - m_bSpellHit = false; - } - - void MoveInLineOfSight(Unit* pWho) {} - - void UpdateAI(const uint32 uiDiff) - { - if (m_creature->IsStandState()) - { - if (m_uiLifeTimer < uiDiff) - m_creature->AI()->EnterEvadeMode(); - else - m_uiLifeTimer -= uiDiff; - } - } - - void SpellHit(Unit* pCaster, const SpellEntry* pSpellInfo) - { - if ((pSpellInfo->Id == SPELL_SHIMMERING_VESSEL) && !m_bSpellHit && - (pCaster->GetTypeId() == TYPEID_PLAYER) && (((Player*)pCaster)->IsActiveQuest(QUEST_REDEEMING_THE_DEAD))) - { - ((Player*)pCaster)->KilledMonsterCredit(m_creature->GetEntry(), m_creature->GetObjectGuid()); - DoCastSpellIfCan(m_creature, SPELL_REVIVE_SELF); - m_creature->SetStandState(UNIT_STAND_STATE_STAND); - m_creature->SetUInt32Value(UNIT_DYNAMIC_FLAGS, 0); - //m_creature->RemoveAllAuras(); - DoScriptText(SAY_HEAL, m_creature, pCaster); - m_bSpellHit = true; - } - } -}; - -CreatureAI* GetAI_npc_blood_knight_stillblade(Creature* pCreature) -{ - return new npc_blood_knight_stillbladeAI(pCreature); -} - void AddSC_silvermoon_city() { - Script* pNewScript; - - pNewScript = new Script; - pNewScript->Name = "npc_blood_knight_stillblade"; - pNewScript->GetAI = &GetAI_npc_blood_knight_stillblade; - pNewScript->RegisterSelf(); } diff --git a/scripts/world/npcs_special.cpp b/scripts/world/npcs_special.cpp index 6b799a5bd..0f6a5cb8d 100644 --- a/scripts/world/npcs_special.cpp +++ b/scripts/world/npcs_special.cpp @@ -41,6 +41,7 @@ npc_mount_vendor 100% Regular mount vendors all over the world. Displa npc_sayge 100% Darkmoon event fortune teller, buff player based on answers given npc_tabard_vendor 50% allow recovering quest related tabards, achievement related ones need core support npc_spring_rabbit 1% Used for pet "Spring Rabbit" of Noblegarden +npc_redemption_target 100% Used for the paladin quests: 1779,1781,9600,9685 EndContentData */ /*######## @@ -1660,6 +1661,109 @@ CreatureAI* GetAI_npc_spring_rabbit(Creature* pCreature) return new npc_spring_rabbitAI(pCreature); } +/*###### +## npc_redemption_target +######*/ + +enum +{ + SAY_HEAL = -1000187, + + SPELL_SYMBOL_OF_LIFE = 8593, + SPELL_SHIMMERING_VESSEL = 31225, + SPELL_REVIVE_SELF = 32343, + + NPC_FURBOLG_SHAMAN = 17542, // draenei side + NPC_BLOOD_KNIGHT = 17768, // blood elf side +}; + +struct MANGOS_DLL_DECL npc_redemption_targetAI : public ScriptedAI +{ + npc_redemption_targetAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } + + uint32 m_uiEvadeTimer; + uint32 m_uiHealTimer; + + ObjectGuid m_playerGuid; + + void Reset() + { + m_uiEvadeTimer = 0; + m_uiHealTimer = 0; + + m_creature->SetFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_DEAD); + m_creature->SetStandState(UNIT_STAND_STATE_DEAD); + } + + void DoReviveSelf(ObjectGuid m_guid) + { + // Wait until he resets again + if (m_uiEvadeTimer) + return; + + DoCastSpellIfCan(m_creature, SPELL_REVIVE_SELF); + m_creature->SetDeathState(JUST_ALIVED); + m_playerGuid = m_guid; + m_uiHealTimer = 2000; + } + + void UpdateAI(const uint32 uiDiff) + { + if (m_uiHealTimer) + { + if (m_uiHealTimer <= uiDiff) + { + if (Player* pPlayer = m_creature->GetMap()->GetPlayer(m_playerGuid)) + { + DoScriptText(SAY_HEAL, m_creature, pPlayer); + + // Quests 9600 and 9685 requires kill credit + if (m_creature->GetEntry() == NPC_FURBOLG_SHAMAN || m_creature->GetEntry() == NPC_BLOOD_KNIGHT) + pPlayer->KilledMonsterCredit(m_creature->GetEntry(), m_creature->GetObjectGuid()); + } + + m_creature->RemoveFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_DEAD); + m_creature->SetStandState(UNIT_STAND_STATE_STAND); + m_uiHealTimer = 0; + m_uiEvadeTimer = 2*MINUTE*IN_MILLISECONDS; + } + else + m_uiHealTimer -= uiDiff; + } + + if (m_uiEvadeTimer) + { + if (m_uiEvadeTimer <= uiDiff) + { + EnterEvadeMode(); + m_uiEvadeTimer = 0; + } + else + m_uiEvadeTimer -= uiDiff; + } + } +}; + +CreatureAI* GetAI_npc_redemption_target(Creature* pCreature) +{ + return new npc_redemption_targetAI(pCreature); +} + +bool EffectDummyCreature_npc_redemption_target(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) +{ + //always check spellid and effectindex + if ((uiSpellId == SPELL_SYMBOL_OF_LIFE || uiSpellId == SPELL_SHIMMERING_VESSEL) && uiEffIndex == EFFECT_INDEX_0) + { + if (npc_redemption_targetAI* pTargetAI = dynamic_cast(pCreatureTarget->AI())) + pTargetAI->DoReviveSelf(pCaster->GetObjectGuid()); + + //always return true when we are handling this spell and effect + return true; + } + + return false; +} + void AddSC_npcs_special() { Script* pNewScript; @@ -1730,4 +1834,10 @@ void AddSC_npcs_special() pNewScript->Name = "npc_spring_rabbit"; pNewScript->GetAI = &GetAI_npc_spring_rabbit; pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_redemption_target"; + pNewScript->GetAI = &GetAI_npc_redemption_target; + pNewScript->pEffectDummyNPC = &EffectDummyCreature_npc_redemption_target; + pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index f8195aa7a..be7fe2549 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2531" + #define SD2_REVISION_NR "2532" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index a863fb37e..548e7bb8a 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -156,6 +156,7 @@ UPDATE creature_template SET ScriptName='npc_tabard_vendor' WHERE entry=28776; -- UPDATE creature_template SET ScriptName='' WHERE npcflag!=npcflag|65536 AND ScriptName='npc_innkeeper'; -- UPDATE creature_template SET ScriptName='npc_innkeeper' WHERE npcflag=npcflag|65536; UPDATE creature_template SET ScriptName='npc_spring_rabbit' WHERE entry=32791; +UPDATE creature_template SET ScriptName='npc_redemption_target' WHERE entry IN (6172,6177,17542,17768); /* SPELL */ UPDATE creature_template SET ScriptName='spell_dummy_npc' WHERE entry IN ( @@ -540,7 +541,6 @@ UPDATE creature_template SET ScriptName='boss_trollgore' WHERE entry=26630; UPDATE instance_template SET ScriptName='instance_draktharon_keep' WHERE map=600; /* DUN MOROGH */ -UPDATE creature_template SET ScriptName='npc_narm_faulk' WHERE entry=6177; /* DUROTAR */ @@ -574,7 +574,6 @@ UPDATE creature_template SET ScriptName='npc_a_special_surprise' WHERE entry IN UPDATE creature_template SET ScriptName='npc_koltira_deathweaver' WHERE entry=28912; /* ELWYNN FOREST */ -UPDATE creature_template SET ScriptName='npc_henze_faulk' WHERE entry=6172; /* EVERSONG WOODS */ UPDATE creature_template SET ScriptName='npc_kelerun_bloodmourn' WHERE entry=17807; @@ -1006,7 +1005,6 @@ UPDATE creature_template SET ScriptName='npc_anachronos_the_ancient' WHERE entry UPDATE gameobject_template SET ScriptName='go_crystalline_tear' WHERE entry=180633; /* SILVERMOON */ -UPDATE creature_template SET ScriptName='npc_blood_knight_stillblade' WHERE entry=17768; /* SILVERPINE FOREST */ UPDATE creature_template SET ScriptName='npc_deathstalker_erland' WHERE entry=1978; diff --git a/sql/updates/r2532_mangos.sql b/sql/updates/r2532_mangos.sql new file mode 100644 index 000000000..30389eda6 --- /dev/null +++ b/sql/updates/r2532_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_redemption_target' WHERE entry IN (6172,6177,17542,17768); From bf53d7d0960eb28c7ebe218e9888aca4e4bcce7e Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sat, 21 Apr 2012 16:43:57 +0300 Subject: [PATCH 0521/1172] [2533] Cleanup and improve Venoxis - Zul'Gurub Also fix a spell target for Mandokir Note: Creature linking for npc 11373 is already included in DB --- .../zulgurub/boss_mandokir.cpp | 2 +- .../zulgurub/boss_venoxis.cpp | 243 ++++++++---------- sd2_revision_nr.h | 2 +- 3 files changed, 104 insertions(+), 143 deletions(-) diff --git a/scripts/eastern_kingdoms/zulgurub/boss_mandokir.cpp b/scripts/eastern_kingdoms/zulgurub/boss_mandokir.cpp index 78fff199e..c0556bcb4 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_mandokir.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_mandokir.cpp @@ -317,7 +317,7 @@ struct MANGOS_DLL_DECL boss_mandokirAI : public ScriptedAI } if (uiTargetInRangeCount > 3) - DoCastSpellIfCan(m_creature->getVictim(), SPELL_FEAR); + DoCastSpellIfCan(m_creature, SPELL_FEAR); m_uiFearTimer = 4000; } diff --git a/scripts/eastern_kingdoms/zulgurub/boss_venoxis.cpp b/scripts/eastern_kingdoms/zulgurub/boss_venoxis.cpp index 0305e5386..1a803261e 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_venoxis.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_venoxis.cpp @@ -26,22 +26,25 @@ EndScriptData */ enum { - NPC_RAZZASHI_COBRA = 11373, - - SAY_TRANSFORM = -1309000, - SAY_DEATH = -1309001, - - SPELL_HOLY_FIRE = 23860, - SPELL_HOLY_WRATH = 23979, - SPELL_VENOMSPIT = 23862, - SPELL_HOLY_NOVA = 23858, - SPELL_POISON_CLOUD = 23861, - SPELL_SNAKE_FORM = 23849, - SPELL_RENEW = 23895, - SPELL_BERSERK = 23537, - SPELL_DISPELL = 23859, - SPELL_PARASITIC = 23865, - SPELL_TRASH = 3391 + SAY_TRANSFORM = -1309000, + SAY_DEATH = -1309001, + + // troll spells + SPELL_HOLY_FIRE = 23860, + SPELL_HOLY_WRATH = 23979, + SPELL_HOLY_NOVA = 23858, + SPELL_DISPELL = 23859, + SPELL_RENEW = 23895, + + // serpent spells + SPELL_VENOMSPIT = 23862, + SPELL_POISON_CLOUD = 23861, + SPELL_PARASITIC_SERPENT = 23867, + + // common spells + SPELL_SNAKE_FORM = 23849, + SPELL_FRENZY = 23537, + SPELL_TRASH = 3391 }; struct MANGOS_DLL_DECL boss_venoxisAI : public ScriptedAI @@ -49,64 +52,40 @@ struct MANGOS_DLL_DECL boss_venoxisAI : public ScriptedAI boss_venoxisAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_fDefaultSize = m_creature->GetFloatValue(OBJECT_FIELD_SCALE_X); Reset(); } ScriptedInstance* m_pInstance; - uint32 m_uiHolyFire_Timer; - uint32 m_uiHolyWrath_Timer; - uint32 m_uiVenomSpit_Timer; - uint32 m_uiRenew_Timer; - uint32 m_uiPoisonCloud_Timer; - uint32 m_uiHolyNova_Timer; - uint32 m_uiDispell_Timer; - uint32 m_uiParasitic_Timer; - uint32 m_uiTrash_Timer; - - uint8 m_uiTargetsInRangeCount; + uint32 m_uiHolyWrathTimer; + uint32 m_uiVenomSpitTimer; + uint32 m_uiRenewTimer; + uint32 m_uiPoisonCloudTimer; + uint32 m_uiHolySpellTimer; + uint32 m_uiDispellTimer; + uint32 m_uiTrashTimer; bool m_bPhaseTwo; bool m_bInBerserk; - float m_fDefaultSize; - void Reset() { - m_uiHolyFire_Timer = 10000; - m_uiHolyWrath_Timer = 60500; - m_uiVenomSpit_Timer = 5500; - m_uiRenew_Timer = 30500; - m_uiPoisonCloud_Timer = 2000; - m_uiHolyNova_Timer = 5000; - m_uiDispell_Timer = 35000; - m_uiParasitic_Timer = 10000; - m_uiTrash_Timer = 5000; - - m_uiTargetsInRangeCount = 0; - - m_creature->SetFloatValue(OBJECT_FIELD_SCALE_X, m_fDefaultSize); - - m_bPhaseTwo = false; - m_bInBerserk = false; + m_uiHolyWrathTimer = 40000; + m_uiVenomSpitTimer = 5500; + m_uiRenewTimer = 30000; + m_uiPoisonCloudTimer = 2000; + m_uiHolySpellTimer = 10000; + m_uiDispellTimer = 35000; + m_uiTrashTimer = 5000; + + m_bPhaseTwo = false; + m_bInBerserk = false; } void JustReachedHome() { - std::list m_lCobras; - GetCreatureListWithEntryInGrid(m_lCobras, m_creature, NPC_RAZZASHI_COBRA, DEFAULT_VISIBILITY_INSTANCE); - - if (m_lCobras.empty()) - debug_log("SD2: boss_venoxis, no Cobras with the entry %u were found", NPC_RAZZASHI_COBRA); - else - { - for(std::list::iterator iter = m_lCobras.begin(); iter != m_lCobras.end(); ++iter) - { - if ((*iter) && !(*iter)->isAlive()) - (*iter)->Respawn(); - } - } + if (m_pInstance) + m_pInstance->SetData(TYPE_VENOXIS, FAIL); } void JustDied(Unit* pKiller) @@ -117,134 +96,116 @@ struct MANGOS_DLL_DECL boss_venoxisAI : public ScriptedAI m_pInstance->SetData(TYPE_VENOXIS, DONE); } - void DamageTaken(Unit* pDoneBy, uint32 &uiDamage) - { - if (!m_bPhaseTwo && (m_creature->GetHealth()+uiDamage)*100 / m_creature->GetMaxHealth() < 50) - { - DoScriptText(SAY_TRANSFORM, m_creature); - - m_creature->InterruptNonMeleeSpells(false); - DoCastSpellIfCan(m_creature,SPELL_SNAKE_FORM); - - m_creature->SetFloatValue(OBJECT_FIELD_SCALE_X, m_fDefaultSize*2); - const CreatureInfo *cinfo = m_creature->GetCreatureInfo(); - m_creature->SetBaseWeaponDamage(BASE_ATTACK, MINDAMAGE, (cinfo->mindmg +((cinfo->mindmg/100) * 25))); - m_creature->SetBaseWeaponDamage(BASE_ATTACK, MAXDAMAGE, (cinfo->maxdmg +((cinfo->maxdmg/100) * 25))); - m_creature->UpdateDamagePhysical(BASE_ATTACK); - DoResetThreat(); - m_bPhaseTwo = true; - } - - if (m_bPhaseTwo && !m_bInBerserk && (m_creature->GetHealth()+uiDamage)*100 / m_creature->GetMaxHealth() < 11) - { - m_creature->InterruptNonMeleeSpells(false); - DoCastSpellIfCan(m_creature, SPELL_BERSERK); - m_bInBerserk = true; - } - } - void UpdateAI(const uint32 uiDiff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; + // Troll phase if (!m_bPhaseTwo) { - if (m_uiDispell_Timer < uiDiff) + if (m_uiDispellTimer < uiDiff) { - DoCastSpellIfCan(m_creature, SPELL_DISPELL); - m_uiDispell_Timer = urand(15000, 30000); + if (DoCastSpellIfCan(m_creature, SPELL_DISPELL) == CAST_OK) + m_uiDispellTimer = urand(15000, 30000); } else - m_uiDispell_Timer -= uiDiff; + m_uiDispellTimer -= uiDiff; - if (m_uiRenew_Timer < uiDiff) + if (m_uiRenewTimer < uiDiff) { - DoCastSpellIfCan(m_creature, SPELL_RENEW); - m_uiRenew_Timer = urand(20000, 30000); + if (DoCastSpellIfCan(m_creature, SPELL_RENEW) == CAST_OK) + m_uiRenewTimer = urand(20000, 30000); } else - m_uiRenew_Timer -= uiDiff; + m_uiRenewTimer -= uiDiff; - if (m_uiHolyWrath_Timer < uiDiff) + if (m_uiHolyWrathTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_HOLY_WRATH); - m_uiHolyWrath_Timer = urand(15000, 25000); + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_HOLY_WRATH) == CAST_OK) + m_uiHolyWrathTimer = urand(15000, 25000); } else - m_uiHolyWrath_Timer -= uiDiff; + m_uiHolyWrathTimer -= uiDiff; - if (m_uiHolyNova_Timer < uiDiff) + if (m_uiHolySpellTimer < uiDiff) { - m_uiTargetsInRangeCount = 0; - for(uint8 i = 0; i < 10; ++i) - { - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_TOPAGGRO,i)) - if (m_creature->CanReachWithMeleeAttack(pTarget)) - ++m_uiTargetsInRangeCount; - } + uint8 uiTargetsInRange = 0; - if (m_uiTargetsInRangeCount > 1) + // See how many targets are in melee range + ThreatList const& tList = m_creature->getThreatManager().getThreatList(); + for (ThreatList::const_iterator iter = tList.begin(); iter != tList.end(); ++iter) { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_HOLY_NOVA); - m_uiHolyNova_Timer = 1000; + if (Unit* pTempTarget = m_creature->GetMap()->GetUnit((*iter)->getUnitGuid())) + { + if (pTempTarget->GetTypeId() == TYPEID_PLAYER && m_creature->CanReachWithMeleeAttack(pTempTarget)) + ++uiTargetsInRange; + } } + + // If there are more targets in melee range cast holy nova, else holy fire + // not sure which is the minimum targets for holy nova + if (uiTargetsInRange > 3) + DoCastSpellIfCan(m_creature, SPELL_HOLY_NOVA); else { - m_uiHolyNova_Timer = 2000; + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + DoCastSpellIfCan(pTarget, SPELL_HOLY_FIRE); } + + m_uiHolySpellTimer = urand(4000, 8000); } else - m_uiHolyNova_Timer -= uiDiff; + m_uiHolySpellTimer -= uiDiff; - if (m_uiHolyFire_Timer < uiDiff && m_uiTargetsInRangeCount < 3) + // Transform at 50% hp + if (m_creature->GetHealthPercent() < 50.0f) { - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) - DoCastSpellIfCan(pTarget, SPELL_HOLY_FIRE); - - m_uiHolyFire_Timer = 8000; + if (DoCastSpellIfCan(m_creature, SPELL_SNAKE_FORM, CAST_INTERRUPT_PREVIOUS) == CAST_OK) + { + DoCastSpellIfCan(m_creature, SPELL_PARASITIC_SERPENT, CAST_TRIGGERED); + DoScriptText(SAY_TRANSFORM, m_creature); + DoResetThreat(); + m_bPhaseTwo = true; + } } - else - m_uiHolyFire_Timer -= uiDiff; } + // Snake phase else { - if (m_uiPoisonCloud_Timer < uiDiff) + if (m_uiPoisonCloudTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_POISON_CLOUD); - m_uiPoisonCloud_Timer = 15000; + if (DoCastSpellIfCan(m_creature, SPELL_POISON_CLOUD) == CAST_OK) + m_uiPoisonCloudTimer = 15000; } else - m_uiPoisonCloud_Timer -= uiDiff; + m_uiPoisonCloudTimer -= uiDiff; - if (m_uiVenomSpit_Timer < uiDiff) + if (m_uiVenomSpitTimer < uiDiff) { - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) - DoCastSpellIfCan(pTarget, SPELL_VENOMSPIT); - - m_uiVenomSpit_Timer = urand(15000, 20000); - } - else - m_uiVenomSpit_Timer -= uiDiff; - - if (m_uiParasitic_Timer < uiDiff) - { - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) - DoCastSpellIfCan(pTarget, SPELL_PARASITIC); - - m_uiParasitic_Timer = 10000; + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, SPELL_VENOMSPIT) == CAST_OK) + m_uiVenomSpitTimer = urand(15000, 20000); + } } else - m_uiParasitic_Timer -= uiDiff; + m_uiVenomSpitTimer -= uiDiff; } - if (m_uiTrash_Timer < uiDiff) + if (m_uiTrashTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_TRASH); - m_uiTrash_Timer = urand(10000, 20000); + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_TRASH) == CAST_OK) + m_uiTrashTimer = urand(10000, 20000); } else - m_uiTrash_Timer -= uiDiff; + m_uiTrashTimer -= uiDiff; + + if (!m_bInBerserk && m_creature->GetHealthPercent() < 11.0f) + { + if (DoCastSpellIfCan(m_creature, SPELL_FRENZY) == CAST_OK) + m_bInBerserk = true; + } DoMeleeAttackIfReady(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index be7fe2549..066979656 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2532" + #define SD2_REVISION_NR "2533" #endif // __SD2_REVISION_NR_H__ From 0311458e0662121e66fdbdaaf5b23abf98c704b1 Mon Sep 17 00:00:00 2001 From: NeatElves Date: Sat, 21 Apr 2012 17:06:31 +0300 Subject: [PATCH 0522/1172] [2534] Fix script text typo from previous commit Signed-off-by: Xfurry --- sd2_revision_nr.h | 2 +- sql/scriptdev2_script_full.sql | 4 ++-- sql/updates/r2534_scriptdev2.sql | 4 ++++ 3 files changed, 7 insertions(+), 3 deletions(-) create mode 100644 sql/updates/r2534_scriptdev2.sql diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 066979656..d62062d83 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2533" + #define SD2_REVISION_NR "2534" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index cccf31c91..b6d73d653 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -146,7 +146,7 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1000185,'%s puts the shell to his ear.',0,2,7,0,'engineer_spark EMOTE_SHELL'), (-1000186,'Now I cut you!',0,1,7,0,'engineer_spark SAY_ATTACK'), -(-1000187,'Thank you, dear $C, you just saved my life.',0,0,7,0,'faulk SAY_HEAL'), +(-1000187,'Thank you, dear $C, you just saved my life.',0,0,0,0,'npc_redemption_target SAY_HEAL'), (-1000188,'Deployment sucessful. Trespassers will be neutralized.',0,0,0,0,'converted_sentry SAY_CONVERTED_1'), (-1000189,'Objective acquired. Initiating security routines.',0,0,0,0,'converted_sentry SAY_CONVERTED_2'), @@ -155,7 +155,7 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1000191,'You taste good with maybe a little salt and pepper.',0,0,0,0,' SAY_LUMP_1'), (-1000192,'OK, OK! Lump give up!',0,0,0,0,' SAY_LUMP_DEFEAT'), -(-1000193,'Thank you, dear $C, you just saved my life.',0,0,1,0,'stillblade SAY_HEAL'), +(-1000193,'REUSE ME',0,0,0,0,'REUSE ME'), (-1000194,'I give up! Please don\'t kill me!',0,0,0,0,'unkor SAY_SUBMIT'), diff --git a/sql/updates/r2534_scriptdev2.sql b/sql/updates/r2534_scriptdev2.sql new file mode 100644 index 000000000..252155b51 --- /dev/null +++ b/sql/updates/r2534_scriptdev2.sql @@ -0,0 +1,4 @@ +DELETE FROM script_texts WHERE entry=-1000193; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1000193,'REUSE ME',0,0,0,0,'REUSE ME'); +UPDATE script_texts SET language=0, comment='npc_redemption_target SAY_HEAL' WHERE entry IN (-1000187); From 1ef89cf5121d35bb3b7e97cc9a7df2173c702cc7 Mon Sep 17 00:00:00 2001 From: Reamer Date: Tue, 24 Apr 2012 22:01:56 +0200 Subject: [PATCH 0523/1172] [2535] Fix Searing Flames timer for General Vezax, and let them only be cast while not in hard-mode Signed-off-by: Schmoozerd --- .../ulduar/ulduar/boss_general_vezax.cpp | 16 ++++++++-------- sd2_revision_nr.h | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/scripts/northrend/ulduar/ulduar/boss_general_vezax.cpp b/scripts/northrend/ulduar/ulduar/boss_general_vezax.cpp index 95cbf9615..57aab30bd 100644 --- a/scripts/northrend/ulduar/ulduar/boss_general_vezax.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_general_vezax.cpp @@ -208,7 +208,7 @@ struct MANGOS_DLL_DECL boss_general_vezaxAI : public ScriptedAI m_uiSaroniteBarrierTimer -= uiDiff; } - // summon saronite vapors before the hard mode + // summon saronite vapors and searing flamesbefore the hard mode if (m_pInstance && m_pInstance->GetData(TYPE_VEZAX_HARD) == NOT_STARTED) { if (m_uiSaroniteVaporTimer < uiDiff) @@ -221,15 +221,15 @@ struct MANGOS_DLL_DECL boss_general_vezaxAI : public ScriptedAI } else m_uiSaroniteVaporTimer -= uiDiff; - } - if (m_uiFlamesTimer < uiDiff) - { - if (DoCastSpellIfCan(m_creature, SPELL_SEARING_FLAMES) == CAST_OK) - m_uiFlamesTimer = urand(5000, 10000); + if (m_uiFlamesTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_SEARING_FLAMES) == CAST_OK) + m_uiFlamesTimer = urand(9000, 16000); + } + else + m_uiFlamesTimer -= uiDiff; } - else - m_uiFlamesTimer -= uiDiff; if (m_uiSurgeTimer < uiDiff) { diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index d62062d83..55c322064 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2534" + #define SD2_REVISION_NR "2535" #endif // __SD2_REVISION_NR_H__ From 4570d7e79184a335dbeb4b5d3f187f0007bf2886 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Wed, 25 Apr 2012 14:48:54 +0200 Subject: [PATCH 0524/1172] [2536] Really fix Searing flames. Thanks to Reamer for ongoing research --- scripts/northrend/ulduar/ulduar/boss_general_vezax.cpp | 6 +++++- sd2_revision_nr.h | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/scripts/northrend/ulduar/ulduar/boss_general_vezax.cpp b/scripts/northrend/ulduar/ulduar/boss_general_vezax.cpp index 57aab30bd..b55279afc 100644 --- a/scripts/northrend/ulduar/ulduar/boss_general_vezax.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_general_vezax.cpp @@ -208,7 +208,7 @@ struct MANGOS_DLL_DECL boss_general_vezaxAI : public ScriptedAI m_uiSaroniteBarrierTimer -= uiDiff; } - // summon saronite vapors and searing flamesbefore the hard mode + // summon saronite vapors before the hard mode if (m_pInstance && m_pInstance->GetData(TYPE_VEZAX_HARD) == NOT_STARTED) { if (m_uiSaroniteVaporTimer < uiDiff) @@ -221,7 +221,11 @@ struct MANGOS_DLL_DECL boss_general_vezaxAI : public ScriptedAI } else m_uiSaroniteVaporTimer -= uiDiff; + } + // Searing flames only while animus is not around + if (m_pInstance && m_pInstance->GetData(TYPE_VEZAX_HARD) != IN_PROGRESS) + { if (m_uiFlamesTimer < uiDiff) { if (DoCastSpellIfCan(m_creature, SPELL_SEARING_FLAMES) == CAST_OK) diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 55c322064..1b7ae57ad 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2535" + #define SD2_REVISION_NR "2536" #endif // __SD2_REVISION_NR_H__ From bb69b8038b1e6f1219cb903a0c6a508953bd1c31 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Wed, 2 May 2012 23:50:25 +0300 Subject: [PATCH 0525/1172] [2537] Add script support for quest 995 Thanks grz3s for the script documentation --- scripts/kalimdor/darkshore.cpp | 105 ++++++++++++++++++++++++------- sd2_revision_nr.h | 2 +- sql/scriptdev2_script_full.sql | 40 +++++++----- sql/updates/r2537_scriptdev2.sql | 29 +++++++++ 4 files changed, 137 insertions(+), 39 deletions(-) create mode 100644 sql/updates/r2537_scriptdev2.sql diff --git a/scripts/kalimdor/darkshore.cpp b/scripts/kalimdor/darkshore.cpp index d9b9bf7c7..99e7856f4 100644 --- a/scripts/kalimdor/darkshore.cpp +++ b/scripts/kalimdor/darkshore.cpp @@ -17,7 +17,7 @@ /* ScriptData SDName: Darkshore SD%Complete: 100 -SDComment: Quest support: 731, 994, 2078, 5321 +SDComment: Quest support: 731, 994, 995, 2078, 5321 SDCategory: Darkshore EndScriptData */ @@ -387,17 +387,25 @@ bool GossipSelect_npc_threshwackonator(Player* pPlayer, Creature* pCreature, uin enum { - SAY_START = -1000789, - SAY_END = -1000790, - SAY_FIRST_AMBUSH = -1000791, - SAY_AGGRO_1 = -1000792, - SAY_AGGRO_2 = -1000793, - SAY_AGGRO_3 = -1000794, + SAY_START = -1000789, + SAY_END = -1000790, + SAY_FIRST_AMBUSH = -1000791, + SAY_AGGRO_1 = -1000792, + SAY_AGGRO_2 = -1000793, + SAY_AGGRO_3 = -1000794, - NPC_BLACKWOOD_SHAMAN = 2171, - NPC_BLACKWOOD_URSA = 2170, + SAY_ESCAPE = -1000195, - QUEST_ESCAPE_THROUGH_FORCE = 994 + NPC_BLACKWOOD_SHAMAN = 2171, + NPC_BLACKWOOD_URSA = 2170, + + SPELL_MOONSTALKER_FORM = 10849, + + WAYPOINT_ID_QUEST_STEALTH = 16, + FACTION_FRIENDLY = 35, + + QUEST_ESCAPE_THROUGH_FORCE = 994, + QUEST_ESCAPE_THROUGH_STEALTH = 995, }; struct SummonLocation @@ -420,7 +428,13 @@ struct MANGOS_DLL_DECL npc_volcorAI : public npc_escortAI { npc_volcorAI(Creature* pCreature) : npc_escortAI(pCreature) { Reset(); } - void Reset() { } + uint32 m_uiQuestId; + + void Reset() + { + if (!HasEscortState(STATE_ESCORT_ESCORTING)) + m_uiQuestId = 0; + } void Aggro(Unit* pWho) { @@ -433,33 +447,83 @@ struct MANGOS_DLL_DECL npc_volcorAI : public npc_escortAI } } + void MoveInLineOfSight(Unit* pWho) + { + // No combat for this quest + if (m_uiQuestId == QUEST_ESCAPE_THROUGH_STEALTH) + return; + + npc_escortAI::MoveInLineOfSight(pWho); + } + void JustSummoned(Creature* pSummoned) { pSummoned->AI()->AttackStart(m_creature); } + // Wrapper to handle start function for both quests + void StartEscort(Player* pPlayer, const Quest* pQuest) + { + m_creature->SetStandState(UNIT_STAND_STATE_STAND); + m_creature->SetFacingToObject(pPlayer); + m_uiQuestId = pQuest->GetQuestId(); + + if (pQuest->GetQuestId() == QUEST_ESCAPE_THROUGH_STEALTH) + { + // Note: faction may not be correct, but only this way works fine + m_creature->SetFactionTemporary(FACTION_FRIENDLY, TEMPFACTION_RESTORE_RESPAWN); + + Start(true, pPlayer, pQuest); + SetEscortPaused(true); + SetCurrentWaypoint(WAYPOINT_ID_QUEST_STEALTH); + SetEscortPaused(false); + } + else + Start(false, pPlayer, pQuest); + } + void WaypointReached(uint32 uiPointId) { switch (uiPointId) { - case 4: + case 2: + DoScriptText(SAY_START, m_creature); + break; + case 5: m_creature->SummonCreature(NPC_BLACKWOOD_SHAMAN, aVolcorSpawnLocs[0].m_fX, aVolcorSpawnLocs[0].m_fY, aVolcorSpawnLocs[0].m_fZ, aVolcorSpawnLocs[0].m_fO, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,20000); m_creature->SummonCreature(NPC_BLACKWOOD_URSA, aVolcorSpawnLocs[1].m_fX, aVolcorSpawnLocs[1].m_fY, aVolcorSpawnLocs[1].m_fZ, aVolcorSpawnLocs[1].m_fO, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,20000); break; - case 5: + case 6: DoScriptText(SAY_FIRST_AMBUSH, m_creature); break; - case 10: + case 11: m_creature->SummonCreature(NPC_BLACKWOOD_SHAMAN, aVolcorSpawnLocs[2].m_fX, aVolcorSpawnLocs[2].m_fY, aVolcorSpawnLocs[2].m_fZ, aVolcorSpawnLocs[2].m_fO, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,20000); m_creature->SummonCreature(NPC_BLACKWOOD_URSA, aVolcorSpawnLocs[3].m_fX, aVolcorSpawnLocs[3].m_fY, aVolcorSpawnLocs[3].m_fZ, aVolcorSpawnLocs[3].m_fO, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,20000); - case 12: + case 13: m_creature->SummonCreature(NPC_BLACKWOOD_URSA, aVolcorSpawnLocs[4].m_fX, aVolcorSpawnLocs[4].m_fY, aVolcorSpawnLocs[4].m_fZ, aVolcorSpawnLocs[4].m_fO, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 20000); m_creature->SummonCreature(NPC_BLACKWOOD_URSA, aVolcorSpawnLocs[5].m_fX, aVolcorSpawnLocs[5].m_fY, aVolcorSpawnLocs[5].m_fZ, aVolcorSpawnLocs[5].m_fO, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 20000); break; - case 14: + case 15: DoScriptText(SAY_END, m_creature); if (Player* pPlayer = GetPlayerForEscort()) pPlayer->GroupEventHappens(QUEST_ESCAPE_THROUGH_FORCE, m_creature); + SetEscortPaused(true); + m_creature->ForcedDespawn(10000); + break; + // Quest 995 waypoints + case 16: + m_creature->HandleEmote(EMOTE_ONESHOT_BOW); + break; + case 17: + if (Player* pPlayer = GetPlayerForEscort()) + DoScriptText(SAY_ESCAPE, m_creature, pPlayer); + break; + case 18: + DoCastSpellIfCan(m_creature, SPELL_MOONSTALKER_FORM); + break; + case 24: + if (Player* pPlayer = GetPlayerForEscort()) + pPlayer->GroupEventHappens(QUEST_ESCAPE_THROUGH_STEALTH, m_creature); break; } } @@ -472,15 +536,10 @@ CreatureAI* GetAI_npc_volcor(Creature* pCreature) bool QuestAccept_npc_volcor(Player* pPlayer, Creature* pCreature, const Quest* pQuest) { - if (pQuest->GetQuestId() == QUEST_ESCAPE_THROUGH_FORCE) + if (pQuest->GetQuestId() == QUEST_ESCAPE_THROUGH_FORCE || pQuest->GetQuestId() == QUEST_ESCAPE_THROUGH_STEALTH) { - pCreature->SetFactionTemporary(FACTION_ESCORT_A_NEUTRAL_ACTIVE, TEMPFACTION_RESTORE_RESPAWN); - pCreature->SetStandState(UNIT_STAND_STATE_STAND); - - DoScriptText(SAY_START, pCreature); - if (npc_volcorAI* pEscortAI = dynamic_cast(pCreature->AI())) - pEscortAI->Start(false, pPlayer, pQuest); + pEscortAI->StartEscort(pPlayer, pQuest); } return true; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 1b7ae57ad..a4afd0b1d 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2536" + #define SD2_REVISION_NR "2537" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index b6d73d653..9f8bff49f 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -159,7 +159,7 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1000194,'I give up! Please don\'t kill me!',0,0,0,0,'unkor SAY_SUBMIT'), -(-1000195,'REUSE ME',0,0,0,0,'REUSE ME'), +(-1000195,'Thank you again, $N. I\'ll make my way to the road now. When you can, find Terenthis and let him know we escaped.',0,0,0,1,'volcor SAY_ESCAPE'), (-1000196,'Belore...',0,0,1,0,'lady_sylvanas SAY_LAMENT_END'), (-1000197,'%s kneels down and pick up the amulet.',0,2,1,0,'lady_sylvanas EMOTE_LAMENT_END'), @@ -6410,20 +6410,30 @@ INSERT INTO script_waypoint VALUES DELETE FROM script_waypoint WHERE entry=3692; INSERT INTO script_waypoint VALUES -(3692, 1, 4608.54, -6.47, 69.69, 4000, 'SAY_START'), -(3692, 2, 4604.54, -5.17, 69.51, 0, ''), -(3692, 3, 4604.26, -2.02, 69.42, 0, ''), -(3692, 4, 4607.75, 3.79, 70.13, 1000, 'first ambush'), -(3692, 5, 4607.75, 3.79, 70.13, 0, 'SAY_FIRST_AMBUSH'), -(3692, 6, 4619.77, 27.47, 70.40, 0, ''), -(3692, 7, 4626.28, 42.46, 68.75, 0, ''), -(3692, 8, 4633.13, 51.17, 67.40, 0, ''), -(3692, 9, 4639.67, 79.03, 61.74, 0, ''), -(3692, 10, 4647.54, 94.25, 59.92, 0, 'second ambush'), -(3692, 11, 4682.08, 113.47, 54.83, 0, ''), -(3692, 12, 4705.28, 137.81, 53.36, 0, 'last ambush'), -(3692, 13, 4730.30, 158.76, 52.33, 0, ''), -(3692, 14, 4756.47, 195.65, 53.61, 10000, 'SAY_END'); +(3692, 1, 4608.43, -6.32, 69.74, 1000, 'stand up'), +(3692, 2, 4608.43, -6.32, 69.74, 4000, 'SAY_START'), +(3692, 3, 4604.54, -5.17, 69.51, 0, ''), +(3692, 4, 4604.26, -2.02, 69.42, 0, ''), +(3692, 5, 4607.75, 3.79, 70.13, 1000, 'first ambush'), +(3692, 6, 4607.75, 3.79, 70.13, 0, 'SAY_FIRST_AMBUSH'), +(3692, 7, 4619.77, 27.47, 70.40, 0, ''), +(3692, 8, 4626.28, 42.46, 68.75, 0, ''), +(3692, 9, 4633.13, 51.17, 67.40, 0, ''), +(3692, 10, 4639.67, 79.03, 61.74, 0, ''), +(3692, 11, 4647.54, 94.25, 59.92, 0, 'second ambush'), +(3692, 12, 4682.08, 113.47, 54.83, 0, ''), +(3692, 13, 4705.28, 137.81, 53.36, 0, 'last ambush'), +(3692, 14, 4730.30, 158.76, 52.33, 0, ''), +(3692, 15, 4756.47, 195.65, 53.61, 10000, 'SAY_END'), +(3692, 16, 4608.43, -6.32, 69.74, 1000, 'bow'), +(3692, 17, 4608.43, -6.32, 69.74, 4000, 'SAY_ESCAPE'), +(3692, 18, 4608.43, -6.32, 69.74, 4000, 'SPELL_MOONSTALKER_FORM'), +(3692, 19, 4604.54, -5.17, 69.51, 0, ''), +(3692, 20, 4604.26, -2.02, 69.42, 0, ''), +(3692, 21, 4607.75, 3.79, 70.13, 0, ''), +(3692, 22, 4607.75, 3.79, 70.13, 0, ''), +(3692, 23, 4619.77, 27.47, 70.40, 0, ''), +(3692, 24, 4640.33, 33.74, 68.22, 0, 'quest complete'); DELETE FROM script_waypoint WHERE entry=22424; INSERT INTO script_waypoint VALUES diff --git a/sql/updates/r2537_scriptdev2.sql b/sql/updates/r2537_scriptdev2.sql new file mode 100644 index 000000000..6c58d1938 --- /dev/null +++ b/sql/updates/r2537_scriptdev2.sql @@ -0,0 +1,29 @@ +DELETE FROM script_texts WHERE entry=-1000195; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1000195,'Thank you again, $N. I\'ll make my way to the road now. When you can, find Terenthis and let him know we escaped.',0,0,0,1,'volcor SAY_ESCAPE'); +DELETE FROM script_waypoint WHERE entry=3692; +INSERT INTO script_waypoint VALUES +(3692, 1, 4608.43, -6.32, 69.74, 1000, 'stand up'), +(3692, 2, 4608.43, -6.32, 69.74, 4000, 'SAY_START'), +(3692, 3, 4604.54, -5.17, 69.51, 0, ''), +(3692, 4, 4604.26, -2.02, 69.42, 0, ''), +(3692, 5, 4607.75, 3.79, 70.13, 1000, 'first ambush'), +(3692, 6, 4607.75, 3.79, 70.13, 0, 'SAY_FIRST_AMBUSH'), +(3692, 7, 4619.77, 27.47, 70.40, 0, ''), +(3692, 8, 4626.28, 42.46, 68.75, 0, ''), +(3692, 9, 4633.13, 51.17, 67.40, 0, ''), +(3692, 10, 4639.67, 79.03, 61.74, 0, ''), +(3692, 11, 4647.54, 94.25, 59.92, 0, 'second ambush'), +(3692, 12, 4682.08, 113.47, 54.83, 0, ''), +(3692, 13, 4705.28, 137.81, 53.36, 0, 'last ambush'), +(3692, 14, 4730.30, 158.76, 52.33, 0, ''), +(3692, 15, 4756.47, 195.65, 53.61, 10000, 'SAY_END'), +(3692, 16, 4608.43, -6.32, 69.74, 1000, 'bow'), +(3692, 17, 4608.43, -6.32, 69.74, 4000, 'SAY_ESCAPE'), +(3692, 18, 4608.43, -6.32, 69.74, 4000, 'SPELL_MOONSTALKER_FORM'), +(3692, 19, 4604.54, -5.17, 69.51, 0, ''), +(3692, 20, 4604.26, -2.02, 69.42, 0, ''), +(3692, 21, 4607.75, 3.79, 70.13, 0, ''), +(3692, 22, 4607.75, 3.79, 70.13, 0, ''), +(3692, 23, 4619.77, 27.47, 70.40, 0, ''), +(3692, 24, 4640.33, 33.74, 68.22, 0, 'quest complete'); From 1d599773f6a67d677250b77989b5709f192604f0 Mon Sep 17 00:00:00 2001 From: Michalpolko Date: Thu, 3 May 2012 22:42:02 +0300 Subject: [PATCH 0526/1172] [2538] Implement basic instance script for Icecrown Citadel Signed-off-by: Xfurry --- .../icecrown_citadel/icecrown_citadel.h | 194 +++++++++ .../instance_icecrown_citadel.cpp | 380 +++++++++++++++++- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 7 + sql/updates/r2538_mangos.sql | 5 + 5 files changed, 585 insertions(+), 3 deletions(-) create mode 100644 sql/updates/r2538_mangos.sql diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_citadel.h b/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_citadel.h index 5871a49a1..c621ff430 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_citadel.h +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_citadel.h @@ -1,3 +1,197 @@ /* Copyright (C) 2006 - 2012 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ + +#ifndef DEF_ICECROWN_CITADEL_H +#define DEF_ICECROWN_CITADEL_H + +enum +{ + MAX_ENCOUNTER = 12, + + TYPE_MARROWGAR = 0, + TYPE_LADY_DEATHWHISPER = 1, + TYPE_GUNSHIP_BATTLE = 2, + TYPE_DEATHBRINGER_SAURFANG = 3, + TYPE_FESTERGUT = 4, + TYPE_ROTFACE = 5, + TYPE_PROFESSOR_PUTRICIDE = 6, + TYPE_BLOOD_PRINCE_COUNCIL = 7, + TYPE_QUEEN_LANATHEL = 8, + TYPE_VALITHRIA = 9, + TYPE_SINDRAGOSA = 10, + TYPE_LICH_KING = 11, + + // NPC entries + NPC_LORD_MARROWGAR = 36612, + NPC_LADY_DEATHWHISPER = 36855, + NPC_DEATHBRINGER_SAURFANG = 37813, + NPC_FESTERGUT = 36626, + NPC_ROTFACE = 36627, + NPC_PROFESSOR_PUTRICIDE = 36678, + NPC_TALDARAM = 37973, + NPC_VALANAR = 37970, + NPC_KELESETH = 37972, + NPC_QUEEN_LANATHEL = 37955, + NPC_VALITHRIA = 36789, + NPC_SINDRAGOSA = 36853, + NPC_LICH_KING = 36597, + + // boss-related and other NPCs + NPC_DEATHWHISPER_SPAWN_STALKER = 37947, + NPC_OVERLORD_SAURFANG = 37187, + NPC_KORKRON_REAVER = 37920, + NPC_MURADIN_BRONZEBEARD = 37200, // Saurfang's encounter and at the instance entrance + NPC_SKYBREAKER_MARINE = 37380, + NPC_ALLIANCE_MARINE = 37830, + NPC_BLOOD_ORB_CONTROL = 38008, + NPC_LANATHEL_INTRO = 38004, + NPC_VALITHRIA_QUEST = 38589, + NPC_VALITHRIA_COMBAT_TRIGGER = 38752, + NPC_MURADIN = 36948, // Gunship Battle's encounter(?) + NPC_TIRION = 38995, + NPC_MENETHIL = 38579, + NPC_FROSTMOURNE_TRIGGER = 38584, + NPC_FROSTMOURNE_HOLDER = 27880, + NPC_STINKY = 37025, + NPC_PRECIOUS = 37217, + NPC_PUDDLE_STALKER = 37013, // related to Festergut and Rotface + NPC_RIMEFANG = 37533, + NPC_SPINESTALKER = 37534, + + // GameObjects entries + GO_ICEWALL_1 = 201911, + GO_ICEWALL_2 = 201910, + GO_MARROWGAR_DOOR = 201857, // Marrowgar combat door + + GO_ORATORY_DOOR = 201563, + GO_DEATHWHISPER_ELEVATOR = 202220, + + GO_SAURFANG_DOOR = 201825, + + GO_GREEN_PLAGUE = 201370, // Rotface combat door + GO_ORANGE_PLAGUE = 201371, // Festergut combat door + GO_SCIENTIST_DOOR = 201372, // Putricide combat door + GO_SCIENTIST_DOOR_COLLISION = 201612, // Putricide pathway doors + GO_SCIENTIST_DOOR_ORANGE = 201613, + GO_SCIENTIST_DOOR_GREEN = 201614, + GO_GREEN_VALVE = 201615, // Valves used to release the Gas / Oozes in order to open the pathway to Putricide - triggers event 23426 + GO_ORANGE_VALVE = 201616, // triggers event 23438 + GO_ORANGE_TUBE = 201617, + GO_GREEN_TUBE = 201618, + + //GO_BLOODWING_DOOR = 201920, // not used + GO_CRIMSON_HALL_DOOR = 201376, // Council combat door + GO_COUNCIL_DOOR_1 = 201377, + GO_COUNCIL_DOOR_2 = 201378, + GO_BLOODPRINCE_DOOR = 201746, // Lanathel combat door + GO_ICECROWN_GRATE = 201755, // Lanathel trap door + + //GO_FROSTWING_DOOR = 201919, // not used + GO_GREEN_DRAGON_ENTRANCE = 201375, // Valithria combat door + GO_GREEN_DRAGON_EXIT = 201374, + GO_VALITHRIA_DOOR_1 = 201381, // Valithria event doors + GO_VALITHRIA_DOOR_2 = 201382, + GO_VALITHRIA_DOOR_3 = 201383, + GO_VALITHRIA_DOOR_4 = 201380, + GO_SINDRAGOSA_SHORTCUT_ENTRANCE = 201369, // Shortcut doors are opened only after the trash before Sindragosa is cleared + GO_SINDRAGOSA_SHORTCUT_EXIT = 201379, + GO_SINDRAGOSA_ENTRANCE = 201373, + + GO_FROZENTRONE_TRANSPORTER = 202223, + GO_ICESHARD_1 = 202142, + GO_ICESHARD_2 = 202141, + GO_ICESHARD_3 = 202143, + GO_ICESHARD_4 = 202144, + GO_FROSTY_WIND = 202188, + GO_FROSTY_EDGE = 202189, + GO_SNOW_EDGE = 202190, + GO_ARTHAS_PLATFORM = 202161, + GO_ARTHAS_PRECIPICE = 202078, + + GO_PLAGUE_SIGIL = 202182, // Possible used after each wing is cleared + GO_FROSTWING_SIGIL = 202181, + GO_BLOODWING_SIGIL = 202183, + + // Loot chests + GO_SAURFANG_CACHE = 202239, + GO_SAURFANG_CACHE_25 = 202240, + GO_SAURFANG_CACHE_10_H = 202238, + GO_SAURFANG_CACHE_25_H = 202241, + + GO_GUNSHIP_ARMORY_A = 201872, + GO_GUNSHIP_ARMORY_A_25 = 201873, + GO_GUNSHIP_ARMORY_A_10H = 201874, + GO_GUNSHIP_ARMORY_A_25H = 201875, + + GO_GUNSHIP_ARMORY_H = 202177, + GO_GUNSHIP_ARMORY_H_25 = 202178, + GO_GUNSHIP_ARMORY_H_10H = 202179, + GO_GUNSHIP_ARMORY_H_25H = 202180, + + GO_DREAMWALKER_CACHE = 201959, + GO_DREAMWALKER_CACHE_25 = 202339, + GO_DREAMWALKER_CACHE_10_H = 202338, + GO_DREAMWALKER_CACHE_25_H = 202340, + + // Achievement criterias + ACHIEV_CRIT_BONED_10N = 12775, // Lord Marrowgar, achievs 4534, 4610 + ACHIEV_CRIT_BONED_25N = 12962, + ACHIEV_CRIT_BONED_10H = 13393, + ACHIEV_CRIT_BONED_25H = 13394, + + ACHIEV_CRIT_DANCES_WITH_OOZES_10N = 12984, // Rotface, achievs 4538, 4614 + ACHIEV_CRIT_DANCES_WITH_OOZES_25N = 12966, + ACHIEV_CRIT_DANCES_WITH_OOZES_10H = 12985, + ACHIEV_CRIT_DANCES_WITH_OOZES_25H = 12983, + + ACHIEV_CRIT_NAUSEA_10N = 12987, // Professor Putricide, achievs 4578, 4616 + ACHIEV_CRIT_NAUSEA_25N = 12968, + ACHIEV_CRIT_NAUSEA_10H = 12988, + ACHIEV_CRIT_NAUSEA_25H = 12981, + + ACHIEV_CRIT_ORB_WHISPERER_10N = 13033, // Blood Prince Council, achievs 4582, 4617 + ACHIEV_CRIT_ORB_WHISPERER_25N = 12969, + ACHIEV_CRIT_ORB_WHISPERER_10H = 13034, + ACHIEV_CRIT_ORB_WHISPERER_25H = 13032, + + ACHIEV_CRIT_ONCE_BITTEN_TWICE_SHY_10N = 12780, // Blood-Queen Lana'thel, achievs 4539, 4618 + ACHIEV_CRIT_ONCE_BITTEN_TWICE_SHY_25N = 13012, + ACHIEV_CRIT_ONCE_BITTEN_TWICE_SHY_10V = 13011, + ACHIEV_CRIT_ONCE_BITTEN_TWICE_SHY_25V = 13013, +}; + +class MANGOS_DLL_DECL instance_icecrown_citadel : public ScriptedInstance +{ + public: + instance_icecrown_citadel(Map *pMap); + + void Initialize(); + bool IsEncounterInProgress() const; + + void OnPlayerEnter(Player* pPlayer); + void OnCreatureCreate(Creature* pCreature); + void OnObjectCreate(GameObject* pGo); + + void SetData(uint32 uiType, uint32 uiData); + uint32 GetData(uint32 uiType); + + const char* Save() { return m_strInstData.c_str(); } + void Load(const char* strIn); + + // Open Putricide door in a few seconds + void DoPreparePutricideDoor() { m_uiPutricideValveTimer = 15000; } + + bool CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget = NULL, uint32 uiMiscvalue1 = 0); + + void Update(uint32 uiDiff); + + private: + std::string m_strInstData; + uint32 m_auiEncounter[MAX_ENCOUNTER]; + + uint32 m_uiTeam; // Team of first entered player, used on the Gunship event + uint32 m_uiPutricideValveTimer; +}; + +#endif diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_citadel.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_citadel.cpp index a17aa1dc4..b5e12404e 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_citadel.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_citadel.cpp @@ -16,13 +16,389 @@ /* ScriptData SDName: instance_icecrown_citadel -SD%Complete: 0 -SDComment: Placeholder +SD%Complete: 20 +SDComment: Just basic stuff SDCategory: Icecrown Citadel EndScriptData */ #include "precompiled.h" +#include "icecrown_citadel.h" + +instance_icecrown_citadel::instance_icecrown_citadel(Map *pMap) : ScriptedInstance(pMap), + m_uiTeam(0), + m_uiPutricideValveTimer(0) +{ + Initialize(); +} + +void instance_icecrown_citadel::Initialize() +{ + memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); +} + +bool instance_icecrown_citadel::IsEncounterInProgress() const +{ + for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) + { + if (m_auiEncounter[i] == IN_PROGRESS) + return true; + } + + return false; +} + +void instance_icecrown_citadel::OnPlayerEnter(Player* pPlayer) +{ + if (!m_uiTeam) // very first player to enter + m_uiTeam = pPlayer->GetTeam(); +} + +void instance_icecrown_citadel::OnCreatureCreate(Creature *pCreature) +{ + switch(pCreature->GetEntry()) + { + case NPC_LORD_MARROWGAR: + case NPC_LADY_DEATHWHISPER: + case NPC_DEATHBRINGER_SAURFANG: + case NPC_FESTERGUT: + case NPC_ROTFACE: + case NPC_PROFESSOR_PUTRICIDE: + case NPC_TALDARAM: + case NPC_VALANAR: + case NPC_KELESETH: + case NPC_QUEEN_LANATHEL: + case NPC_LANATHEL_INTRO: + case NPC_VALITHRIA: + case NPC_SINDRAGOSA: + case NPC_LICH_KING: + case NPC_TIRION: + case NPC_RIMEFANG: + case NPC_SPINESTALKER: + case NPC_STINKY: + case NPC_PRECIOUS: + case NPC_VALITHRIA_COMBAT_TRIGGER: + case NPC_BLOOD_ORB_CONTROL: + m_mNpcEntryGuidStore[pCreature->GetEntry()] = pCreature->GetObjectGuid(); + break; + } +} + +void instance_icecrown_citadel::OnObjectCreate(GameObject *pGo) +{ + switch(pGo->GetEntry()) + { + case GO_ICEWALL_1: + case GO_ICEWALL_2: + case GO_ORATORY_DOOR: + if (m_auiEncounter[TYPE_MARROWGAR] == DONE) + pGo->SetGoState(GO_STATE_ACTIVE); + break; + case GO_DEATHWHISPER_ELEVATOR: + // ToDo: set in motion when TYPE_LADY_DEATHWHISPER == DONE + break; + case GO_SAURFANG_DOOR: + case GO_SCIENTIST_DOOR: + case GO_CRIMSON_HALL_DOOR: + case GO_GREEN_DRAGON_ENTRANCE: + if (m_auiEncounter[TYPE_DEATHBRINGER_SAURFANG] == DONE) + pGo->SetGoState(GO_STATE_ACTIVE); + break; + case GO_ORANGE_TUBE: + if (m_auiEncounter[TYPE_FESTERGUT] == DONE) + pGo->SetGoState(GO_STATE_ACTIVE); + break; + case GO_GREEN_TUBE: + if (m_auiEncounter[TYPE_ROTFACE] == DONE) + pGo->SetGoState(GO_STATE_ACTIVE); + break; + case GO_SCIENTIST_DOOR_GREEN: + // If both Festergut and Rotface are DONE, set as ACTIVE_ALTERNATIVE + if (m_auiEncounter[TYPE_FESTERGUT] == DONE && m_auiEncounter[TYPE_ROTFACE] == DONE) + pGo->SetGoState(GO_STATE_ACTIVE_ALTERNATIVE); + else if (m_auiEncounter[TYPE_ROTFACE] == DONE) + pGo->SetGoState(GO_STATE_READY); + break; + case GO_SCIENTIST_DOOR_ORANGE: + // If both Festergut and Rotface are DONE, set as ACTIVE_ALTERNATIVE + if (m_auiEncounter[TYPE_FESTERGUT] == DONE && m_auiEncounter[TYPE_ROTFACE] == DONE) + pGo->SetGoState(GO_STATE_ACTIVE_ALTERNATIVE); + else if (m_auiEncounter[TYPE_FESTERGUT] == DONE) + pGo->SetGoState(GO_STATE_READY); + break; + case GO_SCIENTIST_DOOR_COLLISION: + if (m_auiEncounter[TYPE_FESTERGUT] == DONE && m_auiEncounter[TYPE_ROTFACE] == DONE) + pGo->SetGoState(GO_STATE_ACTIVE); + break; + case GO_COUNCIL_DOOR_1: + case GO_COUNCIL_DOOR_2: + if (m_auiEncounter[TYPE_BLOOD_PRINCE_COUNCIL] == DONE) + pGo->SetGoState(GO_STATE_ACTIVE); + break; + case GO_GREEN_DRAGON_EXIT: + if (m_auiEncounter[TYPE_VALITHRIA] == DONE) + pGo->SetGoState(GO_STATE_ACTIVE); + break; + case GO_SAURFANG_CACHE: + case GO_SAURFANG_CACHE_25: + case GO_SAURFANG_CACHE_10_H: + case GO_SAURFANG_CACHE_25_H: + m_mGoEntryGuidStore[GO_SAURFANG_CACHE] = pGo->GetObjectGuid(); + return; + case GO_GUNSHIP_ARMORY_A: + case GO_GUNSHIP_ARMORY_A_25: + case GO_GUNSHIP_ARMORY_A_10H: + case GO_GUNSHIP_ARMORY_A_25H: + m_mGoEntryGuidStore[GO_GUNSHIP_ARMORY_A] = pGo->GetObjectGuid(); + return; + case GO_GUNSHIP_ARMORY_H: + case GO_GUNSHIP_ARMORY_H_25: + case GO_GUNSHIP_ARMORY_H_10H: + case GO_GUNSHIP_ARMORY_H_25H: + m_mGoEntryGuidStore[GO_GUNSHIP_ARMORY_H] = pGo->GetObjectGuid(); + return; + case GO_DREAMWALKER_CACHE: + case GO_DREAMWALKER_CACHE_25: + case GO_DREAMWALKER_CACHE_10_H: + case GO_DREAMWALKER_CACHE_25_H: + m_mGoEntryGuidStore[GO_DREAMWALKER_CACHE] = pGo->GetObjectGuid(); + return; + case GO_ICESHARD_1: + case GO_ICESHARD_2: + case GO_ICESHARD_3: + case GO_ICESHARD_4: + case GO_FROSTY_WIND: + case GO_FROSTY_EDGE: + case GO_SNOW_EDGE: + case GO_ARTHAS_PLATFORM: + case GO_ARTHAS_PRECIPICE: + case GO_MARROWGAR_DOOR: + case GO_BLOODPRINCE_DOOR: + case GO_SINDRAGOSA_ENTRANCE: + case GO_VALITHRIA_DOOR_1: + case GO_VALITHRIA_DOOR_2: + case GO_VALITHRIA_DOOR_3: + case GO_VALITHRIA_DOOR_4: + case GO_ICECROWN_GRATE: + case GO_SINDRAGOSA_SHORTCUT_ENTRANCE: + case GO_SINDRAGOSA_SHORTCUT_EXIT: + case GO_ORANGE_PLAGUE: + case GO_GREEN_PLAGUE: + case GO_ORANGE_VALVE: + case GO_GREEN_VALVE: + break; + } + m_mGoEntryGuidStore[pGo->GetEntry()] = pGo->GetObjectGuid(); +} + +void instance_icecrown_citadel::SetData(uint32 uiType, uint32 uiData) +{ + switch(uiType) + { + case TYPE_MARROWGAR: + m_auiEncounter[uiType] = uiData; + DoUseDoorOrButton(GO_MARROWGAR_DOOR); + if (uiData == DONE) + { + DoUseDoorOrButton(GO_ICEWALL_1); + DoUseDoorOrButton(GO_ICEWALL_2); + + // Note: this door use may not be correct. In theory the door should be already opened + DoUseDoorOrButton(GO_ORATORY_DOOR); + } + break; + case TYPE_LADY_DEATHWHISPER: + m_auiEncounter[uiType] = uiData; + DoUseDoorOrButton(GO_ORATORY_DOOR); + // ToDo: set the elevateor in motion when TYPE_LADY_DEATHWHISPER == DONE + break; + case TYPE_GUNSHIP_BATTLE: + m_auiEncounter[uiType] = uiData; + if (uiData == DONE) + DoRespawnGameObject(m_uiTeam == ALLIANCE ? GO_GUNSHIP_ARMORY_A : GO_GUNSHIP_ARMORY_H, 60*MINUTE); + break; + case TYPE_DEATHBRINGER_SAURFANG: + m_auiEncounter[uiType] = uiData; + if (uiData == DONE) + { + DoUseDoorOrButton(GO_SAURFANG_DOOR); + DoRespawnGameObject(GO_SAURFANG_CACHE, 60*MINUTE); + + // Note: these doors may not be correct. In theory the doors should be already opened + DoUseDoorOrButton(GO_SCIENTIST_DOOR); + DoUseDoorOrButton(GO_CRIMSON_HALL_DOOR); + DoUseDoorOrButton(GO_GREEN_DRAGON_ENTRANCE); + } + break; + case TYPE_FESTERGUT: + m_auiEncounter[uiType] = uiData; + DoUseDoorOrButton(GO_ORANGE_PLAGUE); + if (uiData == DONE) + DoToggleGameObjectFlags(GO_ORANGE_VALVE, GO_FLAG_NO_INTERACT, false); + break; + case TYPE_ROTFACE: + m_auiEncounter[uiType] = uiData; + DoUseDoorOrButton(GO_GREEN_PLAGUE); + if (uiData == DONE) + DoToggleGameObjectFlags(GO_GREEN_VALVE, GO_FLAG_NO_INTERACT, false); + break; + case TYPE_PROFESSOR_PUTRICIDE: + m_auiEncounter[uiType] = uiData; + DoUseDoorOrButton(GO_SCIENTIST_DOOR); + break; + case TYPE_BLOOD_PRINCE_COUNCIL: + m_auiEncounter[uiType] = uiData; + DoUseDoorOrButton(GO_CRIMSON_HALL_DOOR); + if (uiData == DONE) + { + DoUseDoorOrButton(GO_COUNCIL_DOOR_1); + DoUseDoorOrButton(GO_COUNCIL_DOOR_2); + } + break; + case TYPE_QUEEN_LANATHEL: + m_auiEncounter[uiType] = uiData; + DoUseDoorOrButton(GO_BLOODPRINCE_DOOR); + if (uiData == DONE) + DoUseDoorOrButton(GO_ICECROWN_GRATE); + break; + case TYPE_VALITHRIA: + m_auiEncounter[uiType] = uiData; + DoUseDoorOrButton(GO_GREEN_DRAGON_ENTRANCE); + // Side doors + DoUseDoorOrButton(GO_VALITHRIA_DOOR_1); + DoUseDoorOrButton(GO_VALITHRIA_DOOR_2); + // Some doors are used only in 25 man mode + if (instance->GetDifficulty() == RAID_DIFFICULTY_25MAN_NORMAL || instance->GetDifficulty() == RAID_DIFFICULTY_25MAN_HEROIC) + { + DoUseDoorOrButton(GO_VALITHRIA_DOOR_3); + DoUseDoorOrButton(GO_VALITHRIA_DOOR_4); + } + if (uiData == DONE) + { + DoUseDoorOrButton(GO_GREEN_DRAGON_EXIT); + DoUseDoorOrButton(GO_SINDRAGOSA_ENTRANCE); + DoRespawnGameObject(GO_DREAMWALKER_CACHE, 60*MINUTE); + } + break; + case TYPE_SINDRAGOSA: + m_auiEncounter[uiType] = uiData; + DoUseDoorOrButton(GO_SINDRAGOSA_ENTRANCE); + break; + case TYPE_LICH_KING: + m_auiEncounter[uiType] = uiData; + break; + default: + error_log("SD2: Instance Icecrown Citadel: ERROR SetData = %u for type %u does not exist/not implemented.", uiType, uiData); + return; + } + + if (uiData == DONE) + { + OUT_SAVE_INST_DATA; + + std::ostringstream saveStream; + + saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2] << " " + << m_auiEncounter[3] << " " << m_auiEncounter[4] << " " << m_auiEncounter[5] << " " + << m_auiEncounter[6] << " " << m_auiEncounter[7] << " " << m_auiEncounter[8] << " " + << m_auiEncounter[9] << " " << m_auiEncounter[10] << " " << m_auiEncounter[11]; + + m_strInstData = saveStream.str(); + + SaveToDB(); + OUT_SAVE_INST_DATA_COMPLETE; + } +} + +uint32 instance_icecrown_citadel::GetData(uint32 uiType) +{ + if (uiType < MAX_ENCOUNTER) + return m_auiEncounter[uiType]; + + return 0; +} + +bool instance_icecrown_citadel::CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscvalue1) +{ + // ToDo: + return false; +} + +void instance_icecrown_citadel::Load(const char *strIn) +{ + if (!strIn) + { + OUT_LOAD_INST_DATA_FAIL; + return; + } + + OUT_LOAD_INST_DATA(strIn); + + std::istringstream loadStream(strIn); + loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3] + >> m_auiEncounter[4] >> m_auiEncounter[5] >> m_auiEncounter[6] >> m_auiEncounter[7] >> m_auiEncounter[8] + >> m_auiEncounter[9] >> m_auiEncounter[10] >> m_auiEncounter[11]; + + for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) + { + if (m_auiEncounter[i] == IN_PROGRESS) + m_auiEncounter[i] = NOT_STARTED; + } + + OUT_LOAD_INST_DATA_COMPLETE; +} + +void instance_icecrown_citadel::Update(uint32 uiDiff) +{ + if (m_uiPutricideValveTimer) + { + if (m_uiPutricideValveTimer <= uiDiff) + { + // Open the pathway to Putricide when the timer expires + DoUseDoorOrButton(GO_SCIENTIST_DOOR_COLLISION); + if (GameObject* pDoor = GetSingleGameObjectFromStorage(GO_SCIENTIST_DOOR_GREEN)) + pDoor->SetGoState(GO_STATE_ACTIVE_ALTERNATIVE); + if (GameObject* pDoor = GetSingleGameObjectFromStorage(GO_SCIENTIST_DOOR_ORANGE)) + pDoor->SetGoState(GO_STATE_ACTIVE_ALTERNATIVE); + + m_uiPutricideValveTimer = 0; + } + else + m_uiPutricideValveTimer -= uiDiff; + } +} + +InstanceData* GetInstanceData_instance_icecrown_citadel(Map* pMap) +{ + return new instance_icecrown_citadel(pMap); +} + +bool ProcessEventId_event_gameobject_citadel_valve(uint32 uiEventId, Object* pSource, Object* pTarget, bool bIsStart) +{ + if (bIsStart && pSource->GetTypeId() == TYPEID_PLAYER) + { + if (instance_icecrown_citadel* pInstance = (instance_icecrown_citadel*)((Player*)pSource)->GetInstanceData()) + { + // Note: the Tubes and doors are activated by DB script + if (pInstance->GetData(TYPE_FESTERGUT) == DONE && pInstance->GetData(TYPE_ROTFACE) == DONE) + pInstance->DoPreparePutricideDoor(); + + return false; + } + } + return false; +} void AddSC_instance_icecrown_citadel() { + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "instance_icecrown_citadel"; + pNewScript->GetInstanceData = &GetInstanceData_instance_icecrown_citadel; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "event_gameobject_citadel_valve"; + pNewScript->pProcessEventId = &ProcessEventId_event_gameobject_citadel_valve; + pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index a4afd0b1d..8406d3eaa 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2537" + #define SD2_REVISION_NR "2538" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 548e7bb8a..f86f7a929 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -697,6 +697,13 @@ UPDATE creature_template SET ScriptName='npc_silvermoon_harry' WHERE entry=24539 /* ICECROWN CITADEL */ /* */ +/* ICECROWN CITADEL */ +UPDATE instance_template SET ScriptName='instance_icecrown_citadel' WHERE map=631; +DELETE FROM scripted_event_id WHERE id IN (23426,23438); +INSERT INTO scripted_event_id VALUES +(23426,'event_gameobject_citadel_valve'), +(23438,'event_gameobject_citadel_valve'); + /* FORGE OF SOULS */ UPDATE creature_template SET ScriptName='boss_bronjahm' WHERE entry=36497; UPDATE creature_template SET ScriptName='npc_corrupted_soul_fragment' WHERE entry=36535; diff --git a/sql/updates/r2538_mangos.sql b/sql/updates/r2538_mangos.sql new file mode 100644 index 000000000..bfddcec62 --- /dev/null +++ b/sql/updates/r2538_mangos.sql @@ -0,0 +1,5 @@ +UPDATE instance_template SET ScriptName='instance_icecrown_citadel' WHERE map=631; +DELETE FROM scripted_event_id WHERE id IN (23426,23438); +INSERT INTO scripted_event_id VALUES +(23426,'event_gameobject_citadel_valve'), +(23438,'event_gameobject_citadel_valve'); From e025e92660947b438cf377cc31854c63b5ef06a7 Mon Sep 17 00:00:00 2001 From: Michalpolko Date: Fri, 4 May 2012 11:58:19 +0200 Subject: [PATCH 0527/1172] [2539] Add placeholders for a few ICC bosses --- .../boss_deathbringer_saurfang.cpp | 70 ++++++++++++++++++- .../boss_lady_deathwhisper.cpp | 70 ++++++++++++++++++- .../icecrown_citadel/boss_lord_marrowgar.cpp | 70 ++++++++++++++++++- .../icecrown_citadel/icecrown_citadel.h | 4 ++ .../instance_icecrown_citadel.cpp | 2 +- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 3 + sql/updates/r2539_mangos.sql | 3 + 8 files changed, 216 insertions(+), 8 deletions(-) create mode 100644 sql/updates/r2539_mangos.sql diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp index 0390debdb..80ff76641 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp @@ -16,12 +16,13 @@ /* ScriptData SDName: boss_deathbringer_saurfang -SD%Complete: 0% -SDComment: +SD%Complete: 20% +SDComment: Basic script SDCategory: Icecrown Citadel EndScriptData */ #include "precompiled.h" +#include "icecrown_citadel.h" enum { @@ -69,6 +70,71 @@ enum SAY_OUTRO_HORDE_4 = -1631069, }; +struct MANGOS_DLL_DECL boss_deathbringer_saurfangAI : public ScriptedAI +{ + boss_deathbringer_saurfangAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (instance_icecrown_citadel*)pCreature->GetInstanceData(); + Reset(); + } + + instance_icecrown_citadel* m_pInstance; + + void Reset() + { + } + + void Aggro(Unit* pWho) + { + DoScriptText(SAY_AGGRO, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_DEATHBRINGER_SAURFANG, IN_PROGRESS); + } + + void KilledUnit(Unit* pVictim) + { + if (pVictim->GetTypeId() != TYPEID_PLAYER) + return; + + if (urand(0, 1)) + DoScriptText(urand(0, 1) ? SAY_SLAY_1 : SAY_SLAY_2, m_creature); + } + + void JustDied(Unit* pKiller) + { + DoScriptText(SAY_DEATH, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_DEATHBRINGER_SAURFANG, DONE); + } + + void JustReachedHome() + { + if (m_pInstance) + m_pInstance->SetData(TYPE_DEATHBRINGER_SAURFANG, FAIL); + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_deathbringer_saurfang(Creature* pCreature) +{ + return new boss_deathbringer_saurfangAI(pCreature); +} + void AddSC_boss_deathbringer_saurfang() { + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_deathbringer_saurfang"; + pNewScript->GetAI = &GetAI_boss_deathbringer_saurfang; + pNewScript->RegisterSelf(); } diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lady_deathwhisper.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lady_deathwhisper.cpp index 3fab148fa..ab1b362e5 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lady_deathwhisper.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lady_deathwhisper.cpp @@ -16,12 +16,13 @@ /* ScriptData SDName: boss_lady_deathwhisper -SD%Complete: 0% -SDComment: +SD%Complete: 20% +SDComment: Basic script SDCategory: Icecrown Citadel EndScriptData */ #include "precompiled.h" +#include "icecrown_citadel.h" enum { @@ -44,6 +45,71 @@ enum SAY_SLAY_2 = -1631027, }; +struct MANGOS_DLL_DECL boss_lady_deathwhisperAI : public ScriptedAI +{ + boss_lady_deathwhisperAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (instance_icecrown_citadel*)pCreature->GetInstanceData(); + Reset(); + } + + instance_icecrown_citadel* m_pInstance; + + void Reset() + { + } + + void Aggro(Unit* pWho) + { + DoScriptText(SAY_AGGRO, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_LADY_DEATHWHISPER, IN_PROGRESS); + } + + void KilledUnit(Unit* pVictim) + { + if (pVictim->GetTypeId() != TYPEID_PLAYER) + return; + + if (urand(0, 1)) + DoScriptText(urand(0, 1) ? SAY_SLAY_1 : SAY_SLAY_2, m_creature); + } + + void JustDied(Unit* pKiller) + { + DoScriptText(SAY_DEATH, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_LADY_DEATHWHISPER, DONE); + } + + void JustReachedHome() + { + if (m_pInstance) + m_pInstance->SetData(TYPE_LADY_DEATHWHISPER, FAIL); + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_lady_deathwhisper(Creature* pCreature) +{ + return new boss_lady_deathwhisperAI(pCreature); +} + void AddSC_boss_lady_deathwhisper() { + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_lady_deathwhisper"; + pNewScript->GetAI = &GetAI_boss_lady_deathwhisper; + pNewScript->RegisterSelf(); } diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp index 5fb503d98..1fb8f9938 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp @@ -16,12 +16,13 @@ /* ScriptData SDName: boss_lord_marrowgar -SD%Complete: 0% -SDComment: +SD%Complete: 20% +SDComment: Basic script SDCategory: Icecrown Citadel EndScriptData */ #include "precompiled.h" +#include "icecrown_citadel.h" enum { @@ -37,6 +38,71 @@ enum SAY_BERSERK = -1631010, }; +struct MANGOS_DLL_DECL boss_lord_marrowgarAI : public ScriptedAI +{ + boss_lord_marrowgarAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (instance_icecrown_citadel*)pCreature->GetInstanceData(); + Reset(); + } + + instance_icecrown_citadel* m_pInstance; + + void Reset() + { + } + + void Aggro(Unit* pWho) + { + DoScriptText(SAY_AGGRO, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_MARROWGAR, IN_PROGRESS); + } + + void KilledUnit(Unit* pVictim) + { + if (pVictim->GetTypeId() != TYPEID_PLAYER) + return; + + if (urand(0, 1)) + DoScriptText(urand(0, 1) ? SAY_SLAY_1 : SAY_SLAY_2, m_creature); + } + + void JustDied(Unit* pKiller) + { + DoScriptText(SAY_DEATH, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_MARROWGAR, DONE); + } + + void JustReachedHome() + { + if (m_pInstance) + m_pInstance->SetData(TYPE_MARROWGAR, FAIL); + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_lord_marrowgar(Creature* pCreature) +{ + return new boss_lord_marrowgarAI(pCreature); +} + void AddSC_boss_lord_marrowgar() { + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_lord_marrowgar"; + pNewScript->GetAI = &GetAI_boss_lord_marrowgar; + pNewScript->RegisterSelf(); } diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_citadel.h b/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_citadel.h index c621ff430..c70e95f9a 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_citadel.h +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_citadel.h @@ -179,6 +179,10 @@ class MANGOS_DLL_DECL instance_icecrown_citadel : public ScriptedInstance const char* Save() { return m_strInstData.c_str(); } void Load(const char* strIn); + // Difficulty wrappers + bool IsHeroicDifficulty() { return instance->GetDifficulty() > RAID_DIFFICULTY_25MAN_NORMAL; } + bool Is25ManDifficulty() { return instance->GetDifficulty() == RAID_DIFFICULTY_25MAN_NORMAL || instance->GetDifficulty() == RAID_DIFFICULTY_25MAN_HEROIC; } + // Open Putricide door in a few seconds void DoPreparePutricideDoor() { m_uiPutricideValveTimer = 15000; } diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_citadel.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_citadel.cpp index b5e12404e..e28d53efe 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_citadel.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_citadel.cpp @@ -16,7 +16,7 @@ /* ScriptData SDName: instance_icecrown_citadel -SD%Complete: 20 +SD%Complete: 20% SDComment: Just basic stuff SDCategory: Icecrown Citadel EndScriptData */ diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 8406d3eaa..bfbbd88d6 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2538" + #define SD2_REVISION_NR "2539" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index f86f7a929..df85ef34c 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -699,6 +699,9 @@ UPDATE creature_template SET ScriptName='npc_silvermoon_harry' WHERE entry=24539 /* ICECROWN CITADEL */ UPDATE instance_template SET ScriptName='instance_icecrown_citadel' WHERE map=631; +UPDATE creature_template SET ScriptName='boss_lord_marrowgar' WHERE entry=36612; +UPDATE creature_template SET ScriptName='boss_lady_deathwhisper' WHERE entry=36855; +UPDATE creature_template SET ScriptName='boss_deathbringer_saurfang' WHERE entry=37813; DELETE FROM scripted_event_id WHERE id IN (23426,23438); INSERT INTO scripted_event_id VALUES (23426,'event_gameobject_citadel_valve'), diff --git a/sql/updates/r2539_mangos.sql b/sql/updates/r2539_mangos.sql new file mode 100644 index 000000000..b9c066073 --- /dev/null +++ b/sql/updates/r2539_mangos.sql @@ -0,0 +1,3 @@ +UPDATE creature_template SET ScriptName='boss_lord_marrowgar' WHERE entry=36612; +UPDATE creature_template SET ScriptName='boss_lady_deathwhisper' WHERE entry=36855; +UPDATE creature_template SET ScriptName='boss_deathbringer_saurfang' WHERE entry=37813; From 442843d2902e35d7d30e78e9a12ac231e348b19f Mon Sep 17 00:00:00 2001 From: michalpolko Date: Sat, 5 May 2012 01:10:32 +0300 Subject: [PATCH 0528/1172] [2540] Implement script for Lord Marrowgar Based on the work of RSA and MangosR2 team Notes: Bone Spike Graveyard spells need core and vehicle support Coldflame spells require core support and proper targeting position Signed-off-by: Xfurry --- .../icecrown_citadel/boss_lord_marrowgar.cpp | 226 +++++++++++++++++- sd2_revision_nr.h | 2 +- 2 files changed, 224 insertions(+), 4 deletions(-) diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp index 1fb8f9938..c30715958 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: boss_lord_marrowgar -SD%Complete: 20% -SDComment: Basic script +SD%Complete: 75% +SDComment: Bone Spike Spell requires vehicle support SDCategory: Icecrown Citadel EndScriptData */ @@ -36,6 +36,32 @@ enum SAY_SLAY_2 = -1631008, SAY_DEATH = -1631009, SAY_BERSERK = -1631010, + + // spells + SPELL_BERSERK = 47008, + SPELL_BONE_SLICE = 69055, + SPELL_BONE_STORM = 69076, + SPELL_COLDFLAME = 69138, // Note: The spell used should be 69140, but we won't use it because of some targeting issues + SPELL_COLDFLAME_STORM = 72705, + SPELL_BONE_SPIKE = 69057, + SPELL_BONE_SPIKE_STORM = 73142, + + // summoned spells + SPELL_COLDFLAME_AURA = 69145, + SPELL_IMPALED = 69065, + + // npcs + NPC_BONE_SPIKE = 38711, + NPC_COLDFLAME = 36672, + + // phases and max cold flame charges + PHASE_NORMAL = 1, + PHASE_BONE_STORM_CHARGE = 2, + PHASE_BONE_STORM_CHARGING = 3, + PHASE_BONE_STORM_COLDFLAME = 4, + + MAX_CHARGES_NORMAL = 4, + MAX_CHARGES_HEROIC = 5, }; struct MANGOS_DLL_DECL boss_lord_marrowgarAI : public ScriptedAI @@ -43,13 +69,39 @@ struct MANGOS_DLL_DECL boss_lord_marrowgarAI : public ScriptedAI boss_lord_marrowgarAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (instance_icecrown_citadel*)pCreature->GetInstanceData(); + // on heroic, there is 1 more Bone Storm charge + m_uiMaxCharges = m_pInstance && m_pInstance->IsHeroicDifficulty() ? MAX_CHARGES_HEROIC : MAX_CHARGES_NORMAL; + m_bSaidIntro = false; Reset(); } instance_icecrown_citadel* m_pInstance; + bool m_bSaidIntro; + uint8 m_uiPhase; + uint8 m_uiChargesCount; + uint8 m_uiMaxCharges; + uint32 m_uiBerserkTimer; + uint32 m_uiBoneSliceTimer; + uint32 m_uiColdflameTimer; + uint32 m_uiBoneSpikeTimer; + uint32 m_uiBoneStormTimer; + uint32 m_uiBoneStormChargeTimer; + uint32 m_uiBoneStormColdflameTimer; + void Reset() { + SetCombatMovement(true); + + m_uiPhase = PHASE_NORMAL; + m_uiChargesCount = 0; + m_uiBerserkTimer = 10*MINUTE*IN_MILLISECONDS; + m_uiBoneSliceTimer = 1000; + m_uiColdflameTimer = 5000; + m_uiBoneSpikeTimer = 15000; + m_uiBoneStormTimer = 45000; + m_uiBoneStormChargeTimer = 3000; + m_uiBoneStormColdflameTimer = 1000; } void Aggro(Unit* pWho) @@ -60,6 +112,17 @@ struct MANGOS_DLL_DECL boss_lord_marrowgarAI : public ScriptedAI m_pInstance->SetData(TYPE_MARROWGAR, IN_PROGRESS); } + void MoveInLineOfSight(Unit* pWho) + { + if (!m_bSaidIntro && pWho->GetTypeId() == TYPEID_PLAYER && !((Player*)pWho)->isGameMaster()) + { + DoScriptText(SAY_INTRO, m_creature); + m_bSaidIntro = true; + } + + ScriptedAI::MoveInLineOfSight(pWho); + } + void KilledUnit(Unit* pVictim) { if (pVictim->GetTypeId() != TYPEID_PLAYER) @@ -83,12 +146,169 @@ struct MANGOS_DLL_DECL boss_lord_marrowgarAI : public ScriptedAI m_pInstance->SetData(TYPE_MARROWGAR, FAIL); } + void MovementInform(uint32 uiType, uint32 uiPointId) + { + if (uiType != POINT_MOTION_TYPE) + return; + + if (uiPointId) + { + m_uiPhase = PHASE_BONE_STORM_COLDFLAME; + ++m_uiChargesCount; + } + } + + void JustSummoned(Creature* pSummoned) + { + if (pSummoned->GetEntry() == NPC_COLDFLAME) + { + pSummoned->CastSpell(pSummoned, SPELL_COLDFLAME_AURA, true); + + float fX, fY; + float fZ = pSummoned->GetPositionZ(); + // Note: the NearPoint2D function may not be correct here, because we may use a wrong Z value + m_creature->GetNearPoint2D(fX, fY, 80.0f, m_creature->GetAngle(pSummoned)); + pSummoned->GetMotionMaster()->MovePoint(0, fX, fY, fZ, false); + } + } + void UpdateAI(const uint32 uiDiff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - DoMeleeAttackIfReady(); + switch (m_uiPhase) + { + case PHASE_NORMAL: + + // Coldflame + if (m_uiColdflameTimer < uiDiff) + { + // NOTE: This spell is not cast right: Normally it should be triggered by 69140 in core + // Because of the poor target selection in core we'll implement the targeting here + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0, SPELL_COLDFLAME, SELECT_FLAG_IN_MELEE_RANGE)) + { + if (DoCastSpellIfCan(pTarget, SPELL_COLDFLAME) == CAST_OK) + m_uiColdflameTimer = 5000; + } + } + else + m_uiColdflameTimer -= uiDiff; + + // Bone Storm + if (m_uiBoneStormTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_BONE_STORM) == CAST_OK) + { + // ToDo: research if we need to increase the speed here + DoScriptText(SAY_BONE_STORM, m_creature); + m_uiPhase = PHASE_BONE_STORM_CHARGE; + SetCombatMovement(false); + m_creature->GetMotionMaster()->MoveIdle(); + m_uiBoneStormTimer = 90000; + } + } + else + m_uiBoneStormTimer -= uiDiff; + + // Bone Slice + if (m_uiBoneSliceTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_BONE_SLICE) == CAST_OK) + m_uiBoneSliceTimer = 1000; + } + else + m_uiBoneSliceTimer -= uiDiff; + + DoMeleeAttackIfReady(); + + break; + case PHASE_BONE_STORM_CHARGE: + + // next charge to random enemy + if (m_uiBoneStormChargeTimer < uiDiff) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0, uint32(0), SELECT_FLAG_PLAYER)) + { + float fX, fY, fZ; + pTarget->GetPosition(fX, fY, fZ); + m_creature->GetMotionMaster()->Clear(); + m_creature->GetMotionMaster()->MovePoint(1, fX, fY, fZ); + m_uiBoneStormChargeTimer = 3000; + m_uiPhase = PHASE_BONE_STORM_CHARGING; + } + } + else + m_uiBoneStormChargeTimer -= uiDiff; + + break; + case PHASE_BONE_STORM_CHARGING: + // waiting to arrive at target position + break; + case PHASE_BONE_STORM_COLDFLAME: + + if (m_uiBoneStormColdflameTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_COLDFLAME_STORM) == CAST_OK) + { + // When the max cold flame charges are reached, remove Bone storm aura + if (m_uiChargesCount == m_uiMaxCharges) + { + m_creature->RemoveAurasDueToSpell(SPELL_BONE_STORM); + m_uiBoneStormTimer = 60000; + m_uiBoneSliceTimer = 10000; + SetCombatMovement(true); + m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); + m_uiChargesCount = 0; + m_uiPhase = PHASE_NORMAL; + } + else + m_uiPhase = PHASE_BONE_STORM_CHARGE; + + m_uiBoneStormColdflameTimer = 1000; + } + } + else + m_uiBoneStormColdflameTimer -= uiDiff; + + break; + } + + // Bone spike - different spells for the normal phase or storm phase + // ToDo: uncommnet this when vehicles and the Bone spike spells are properly supported by core + /*if (m_pInstance && (m_pInstance->IsHeroicDifficulty() || m_uiPhase == PHASE_NORMAL)) + { + if (m_uiBoneSpikeTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, m_uiPhase == PHASE_NORMAL ? SPELL_BONE_SPIKE_STORM : SPELL_BONE_SPIKE_STORM) == CAST_OK) + { + switch (urand(0, 2)) + { + case 0: DoScriptText(SAY_BONE_SPIKE_1, m_creature); break; + case 1: DoScriptText(SAY_BONE_SPIKE_2, m_creature); break; + case 2: DoScriptText(SAY_BONE_SPIKE_3, m_creature); break; + } + m_uiBoneSpikeTimer = 18000; + } + } + else + m_uiBoneSpikeTimer -= uiDiff; + }*/ + + // Berserk + if (m_uiBerserkTimer) + { + if (m_uiBerserkTimer <= uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_BERSERK)) + { + DoScriptText(SAY_BERSERK, m_creature); + m_uiBerserkTimer = 0; + } + } + else + m_uiBerserkTimer -= uiDiff; + } } }; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index bfbbd88d6..621104c04 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2539" + #define SD2_REVISION_NR "2540" #endif // __SD2_REVISION_NR_H__ From 8dd714a8fa649a3ec3acced439479541d33fa055 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Wed, 9 May 2012 00:51:44 +0300 Subject: [PATCH 0529/1172] [2541] Improve script for Jeklik - Zul'Gurub Notes: Bat riders require additional research in therms of summoning and movement Spell 23969 requires core support --- .../eastern_kingdoms/zulgurub/boss_jeklik.cpp | 249 ++++++++++++------ sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 2 +- sql/scriptdev2_script_full.sql | 7 +- sql/updates/r2541_mangos.sql | 2 + sql/updates/r2541_scriptdev2.sql | 5 + 6 files changed, 182 insertions(+), 85 deletions(-) create mode 100644 sql/updates/r2541_mangos.sql create mode 100644 sql/updates/r2541_scriptdev2.sql diff --git a/scripts/eastern_kingdoms/zulgurub/boss_jeklik.cpp b/scripts/eastern_kingdoms/zulgurub/boss_jeklik.cpp index 4f3e10946..4f1b3ef71 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_jeklik.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_jeklik.cpp @@ -17,7 +17,7 @@ /* ScriptData SDName: Boss_Jeklik SD%Complete: 85 -SDComment: Problem in finding the right flying batriders for spawning and making them fly. +SDComment: Some minor improvements are required; Bat rider movement not implemented SDCategory: Zul'Gurub EndScriptData */ @@ -28,22 +28,38 @@ enum { SAY_AGGRO = -1309002, SAY_RAIN_FIRE = -1309003, + SAY_SHRIEK = -1309026, + SAY_HEAL = -1309027, SAY_DEATH = -1309004, + // Bat spells SPELL_CHARGE = 22911, - SPELL_SONICBURST = 23918, - SPELL_SCREECH = 6605, + SPELL_SONIC_BURST = 23918, + //SPELL_PSYHIC_SCREAM = 22884, // spell not confirmed - needs research + SPELL_SWOOP = 23919, + SPELL_SUMMON_FRENZIED_BATS = 23974, + + // Troll form spells SPELL_SHADOW_WORD_PAIN = 23952, SPELL_MIND_FLAY = 23953, - SPELL_CHAIN_MIND_FLAY = 26044, // Right ID unknown. So disabled + SPELL_BLOOD_LEECH = 22644, SPELL_GREATERHEAL = 23954, + + // Common spells + SPELL_GREEN_CHANNELING = 13540, // visual for idle mode SPELL_BAT_FORM = 23966, // Batriders Spell - SPELL_BOMB = 40332, // Wrong ID but Magmadars bomb is not working... - - NPC_BLOODSEEKER_BAT = 11368, + SPELL_LIQUID_FIRE = 23968, // script effect - triggers 23971, + SPELL_UNSTABLE_CONCOCTION = 24024, + SPELL_TRASH = 8876, + SPELL_DEMORALIZING_SHOUT = 23511, + SPELL_BATTLE_COMMAND = 5115, + SPELL_INFECTED_BITE = 16128, + + // npcs NPC_FRENZIED_BAT = 14965, + NPC_BAT_RIDER = 14750, }; struct MANGOS_DLL_DECL boss_jeklikAI : public ScriptedAI @@ -57,50 +73,89 @@ struct MANGOS_DLL_DECL boss_jeklikAI : public ScriptedAI ScriptedInstance* m_pInstance; uint32 m_uiChargeTimer; + uint32 m_uiSwoopTimer; uint32 m_uiSonicBurstTimer; - uint32 m_uiScreechTimer; uint32 m_uiSpawnBatsTimer; uint32 m_uiShadowWordPainTimer; uint32 m_uiMindFlayTimer; uint32 m_uiChainMindFlayTimer; uint32 m_uiGreaterHealTimer; - uint32 m_uiSpawnFlyingBatsTimer; + uint32 m_uiFlyingBatsTimer; bool m_bIsPhaseOne; + GUIDList m_lBombRiderGuidsList; + void Reset() { - m_uiChargeTimer = 20000; - m_uiSonicBurstTimer = 8000; - m_uiScreechTimer = 13000; - m_uiSpawnBatsTimer = 60000; + m_uiChargeTimer = 20000; + m_uiSwoopTimer = 5000; + m_uiSonicBurstTimer = 8000; + m_uiSpawnBatsTimer = 50000; m_uiShadowWordPainTimer = 6000; - m_uiMindFlayTimer = 11000; - m_uiChainMindFlayTimer = 26000; - m_uiGreaterHealTimer = 50000; - m_uiSpawnFlyingBatsTimer = 10000; + m_uiMindFlayTimer = 11000; + m_uiChainMindFlayTimer = 26000; + m_uiGreaterHealTimer = 20000; + m_uiFlyingBatsTimer = 30000; + + m_bIsPhaseOne = true; - m_bIsPhaseOne = true; + DoCastSpellIfCan(m_creature, SPELL_GREEN_CHANNELING); } void Aggro(Unit* pWho) { DoScriptText(SAY_AGGRO, m_creature); - DoCastSpellIfCan(m_creature, SPELL_BAT_FORM); + + // Note: on aggro the bats from the cave behind the boss should fly outside! + if (DoCastSpellIfCan(m_creature, SPELL_BAT_FORM) == CAST_OK) + m_creature->SetLevitate(true); } void JustDied(Unit* pKiller) { DoScriptText(SAY_DEATH, m_creature); + DoDespawnBombRiders(); if (m_pInstance) m_pInstance->SetData(TYPE_JEKLIK, DONE); } + void JustReachedHome() + { + DoDespawnBombRiders(); + + if (m_pInstance) + m_pInstance->SetData(TYPE_JEKLIK, FAIL); + } + void JustSummoned(Creature* pSummoned) { - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) - pSummoned->AI()->AttackStart(pTarget); + if (pSummoned->GetEntry() == NPC_FRENZIED_BAT) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + pSummoned->AI()->AttackStart(pTarget); + } + else if (pSummoned->GetEntry() == NPC_BAT_RIDER) + { + pSummoned->CastSpell(pSummoned, SPELL_LIQUID_FIRE, true); + m_lBombRiderGuidsList.push_back(pSummoned->GetObjectGuid()); + } + + pSummoned->SetLevitate(true); + } + + // Wrapper to despawn the bomb riders on evade / death + void DoDespawnBombRiders() + { + if (m_lBombRiderGuidsList.empty()) + return; + + for (GUIDList::const_iterator itr = m_lBombRiderGuidsList.begin(); itr != m_lBombRiderGuidsList.end(); ++itr) + { + if (Creature* pRider = m_creature->GetMap()->GetCreature(*itr)) + pRider->ForcedDespawn(); + } } void UpdateAI(const uint32 uiDiff) @@ -108,12 +163,14 @@ struct MANGOS_DLL_DECL boss_jeklikAI : public ScriptedAI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; + // Bat phase if (m_bIsPhaseOne) { // Phase Switch at 50% if (m_creature->GetHealthPercent() < 50.0f) { m_creature->RemoveAurasDueToSpell(SPELL_BAT_FORM); + m_creature->SetLevitate(false); DoResetThreat(); m_bIsPhaseOne = false; return; @@ -122,46 +179,43 @@ struct MANGOS_DLL_DECL boss_jeklikAI : public ScriptedAI if (m_uiChargeTimer < uiDiff) { if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { if (DoCastSpellIfCan(pTarget, SPELL_CHARGE) == CAST_OK) m_uiChargeTimer = urand(15000, 30000); + } } else m_uiChargeTimer -= uiDiff; - if (m_uiSonicBurstTimer < uiDiff) + if (m_uiSwoopTimer < uiDiff) { - if (DoCastSpellIfCan(m_creature, SPELL_SONICBURST) == CAST_OK) - m_uiSonicBurstTimer = urand(8000, 13000); + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_SWOOP) == CAST_OK) + m_uiSwoopTimer = urand(4000, 9000); } else - m_uiSonicBurstTimer -= uiDiff; + m_uiSwoopTimer -= uiDiff; - if (m_uiScreechTimer < uiDiff) + if (m_uiSonicBurstTimer < uiDiff) { - if (DoCastSpellIfCan(m_creature, SPELL_SCREECH) == CAST_OK) - m_uiScreechTimer = urand(18000, 26000); + if (DoCastSpellIfCan(m_creature, SPELL_SONIC_BURST) == CAST_OK) + m_uiSonicBurstTimer = urand(8000, 13000); } else - m_uiScreechTimer -= uiDiff; + m_uiSonicBurstTimer -= uiDiff; if (m_uiSpawnBatsTimer < uiDiff) { - // TODO There are some bats in the cave behind the boss, perhaps they should be called - float fX, fY, fZ, fO, fNewX, fNewY, fNewZ; - m_creature->GetRespawnCoord(fX, fY, fZ, &fO); - for (uint8 i = 0; i < 6; ++i) + if (DoCastSpellIfCan(m_creature, SPELL_SUMMON_FRENZIED_BATS) == CAST_OK) { - // Get a point a little bit behind Jeklik respawn pos - m_creature->GetRandomPoint(fX - 5.0f, fY + 5.0f, fZ, 5.0f, fNewX, fNewY, fNewZ); - m_creature->SummonCreature(NPC_BLOODSEEKER_BAT, fNewX, fNewY, fNewZ, fO, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000); + DoScriptText(SAY_SHRIEK, m_creature); + m_uiSpawnBatsTimer = 60000; } - - m_uiSpawnBatsTimer = 60000; } else m_uiSpawnBatsTimer -= uiDiff; } - else // Phase Two + // Troll phase + else { if (m_uiShadowWordPainTimer < uiDiff) { @@ -184,7 +238,7 @@ struct MANGOS_DLL_DECL boss_jeklikAI : public ScriptedAI if (m_uiChainMindFlayTimer < uiDiff) { - if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_CHAIN_MIND_FLAY) == CAST_OK) + if (DoCastSpellIfCan(m_creature, SPELL_BLOOD_LEECH) == CAST_OK) m_uiChainMindFlayTimer = urand(15000, 30000); } else @@ -193,46 +247,84 @@ struct MANGOS_DLL_DECL boss_jeklikAI : public ScriptedAI if (m_uiGreaterHealTimer < uiDiff) { if (DoCastSpellIfCan(m_creature, SPELL_GREATERHEAL, CAST_INTERRUPT_PREVIOUS) == CAST_OK) + { + DoScriptText(SAY_HEAL, m_creature); m_uiGreaterHealTimer = urand(25000, 35000); + } } else m_uiGreaterHealTimer -= uiDiff; - if (m_uiSpawnFlyingBatsTimer < uiDiff) + if (m_uiFlyingBatsTimer) { - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) - m_creature->SummonCreature(NPC_FRENZIED_BAT, pTarget->GetPositionX(), pTarget->GetPositionY(), pTarget->GetPositionZ() + 15.0f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000); - - m_uiSpawnFlyingBatsTimer = urand(10000, 15000); + if (m_uiFlyingBatsTimer <= uiDiff) + { + // Note: the bat riders summoning and movement may need additional research + for (uint8 i = 0; i < 3; ++i) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + m_creature->SummonCreature(NPC_BAT_RIDER, pTarget->GetPositionX(), pTarget->GetPositionY(), pTarget->GetPositionZ() + 15.0f, 0, TEMPSUMMON_DEAD_DESPAWN, 0); + } + DoScriptText(SAY_RAIN_FIRE, m_creature); + + m_uiFlyingBatsTimer = 0; + } + else + m_uiFlyingBatsTimer -= uiDiff; } - else - m_uiSpawnFlyingBatsTimer -= uiDiff; } DoMeleeAttackIfReady(); } }; -// Flying Bat -struct MANGOS_DLL_DECL mob_batriderAI : public ScriptedAI +struct MANGOS_DLL_DECL npc_gurubashi_bat_riderAI : public ScriptedAI { - mob_batriderAI(Creature* pCreature) : ScriptedAI(pCreature) + npc_gurubashi_bat_riderAI(Creature* pCreature) : ScriptedAI(pCreature) { - m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsSummon = m_creature->IsTemporarySummon(); Reset(); } - ScriptedInstance* m_pInstance; + bool m_bIsSummon; + bool m_bHasDoneConcoction; - uint32 m_uiBombTimer; - uint32 m_uiCheckTimer; + uint32 m_uiInfectedBiteTimer; + uint32 m_uiBattleCommandTimer; void Reset() { - m_uiBombTimer = 2000; - m_uiCheckTimer = 1000; + m_uiInfectedBiteTimer = 6500; + m_uiBattleCommandTimer = 8000; + + m_bHasDoneConcoction = false; + + DoCastSpellIfCan(m_creature, SPELL_TRASH); + } + + void Aggro(Unit* pWho) + { + DoCastSpellIfCan(m_creature, SPELL_DEMORALIZING_SHOUT); + // For normal mobs flag needs to be removed + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + } + + void AttackStart(Unit* pWho) + { + // Don't attack if is summoned by Jeklik + if (m_bIsSummon) + return; - m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + ScriptedAI::AttackStart(pWho); + } + + void MoveInLineOfSight(Unit* pWho) + { + // Don't attack if is summoned by Jeklik + if (m_bIsSummon) + return; + + ScriptedAI::MoveInLineOfSight(pWho); } void UpdateAI (const uint32 uiDiff) @@ -240,34 +332,27 @@ struct MANGOS_DLL_DECL mob_batriderAI : public ScriptedAI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - // Bomb Timer - if (m_uiBombTimer < uiDiff) + if (!m_bHasDoneConcoction && m_creature->GetHealthPercent() < 50.0f) { - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) - { - DoCastSpellIfCan(pTarget, SPELL_BOMB); - m_uiBombTimer = 5000; - } + if (DoCastSpellIfCan(m_creature, SPELL_UNSTABLE_CONCOCTION) == CAST_OK) + m_bHasDoneConcoction = true; + } + + if (m_uiInfectedBiteTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_INFECTED_BITE) == CAST_OK) + m_uiInfectedBiteTimer = 6500; } else - m_uiBombTimer -= uiDiff; + m_uiInfectedBiteTimer -= uiDiff; - // Check Timer - if (m_uiCheckTimer < uiDiff) + if (m_uiBattleCommandTimer < uiDiff) { - if (m_pInstance) - { - if (m_pInstance->GetData(TYPE_JEKLIK) == DONE) - { - m_creature->SetDeathState(JUST_DIED); - m_creature->RemoveCorpse(); - return; - } - } - m_uiCheckTimer = 1000; + if (DoCastSpellIfCan(m_creature, SPELL_BATTLE_COMMAND) == CAST_OK) + m_uiBattleCommandTimer = 25000; } else - m_uiCheckTimer -= uiDiff; + m_uiBattleCommandTimer -= uiDiff; DoMeleeAttackIfReady(); } @@ -278,9 +363,9 @@ CreatureAI* GetAI_boss_jeklik(Creature* pCreature) return new boss_jeklikAI(pCreature); } -CreatureAI* GetAI_mob_batrider(Creature* pCreature) +CreatureAI* GetAI_npc_gurubashi_bat_rider(Creature* pCreature) { - return new mob_batriderAI(pCreature); + return new npc_gurubashi_bat_riderAI(pCreature); } void AddSC_boss_jeklik() @@ -293,7 +378,7 @@ void AddSC_boss_jeklik() pNewScript->RegisterSelf(); pNewScript = new Script; - pNewScript->Name = "mob_batrider"; - pNewScript->GetAI = &GetAI_mob_batrider; + pNewScript->Name = "npc_gurubashi_bat_rider"; + pNewScript->GetAI = &GetAI_npc_gurubashi_bat_rider; pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 621104c04..5ff0ce596 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2540" + #define SD2_REVISION_NR "2541" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index df85ef34c..0b8039400 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -1383,7 +1383,7 @@ UPDATE creature_template SET ScriptName='mob_zealot_lorkhan' WHERE entry=11347; UPDATE creature_template SET ScriptName='mob_zealot_zath' WHERE entry=11348; UPDATE creature_template SET ScriptName='mob_healing_ward' WHERE entry=14987; UPDATE creature_template SET ScriptName='mob_spawn_of_marli' WHERE entry=15041; -UPDATE creature_template SET ScriptName='mob_batrider' WHERE entry=14965; +UPDATE creature_template SET ScriptName='npc_gurubashi_bat_rider' WHERE entry=14750; UPDATE creature_template SET ScriptName='mob_shade_of_jindo' WHERE entry=14986; /* EOF */ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 9f8bff49f..969ebbfb8 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -1207,7 +1207,12 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1309022,'You dare set foot upon Hakkari holy ground? Minions of Hakkar, destroy the infidels!',0,6,0,0,'hakkar SAY_MINION_DESTROY'), (-1309023,'Minions of Hakkar, hear your God. The sanctity of this temple has been compromised. Invaders encroach upon holy ground! The Altar of Blood must be protected. Kill them all!',0,6,0,0,'hakkar SAY_PROTECT_ALTAR'), -(-1309024,'%s goes into a rage after seeing his raptor fall in battle!',0,2,0,0,'mandokir EMOTE_RAGE'); +(-1309024,'%s goes into a rage after seeing his raptor fall in battle!',0,2,0,0,'mandokir EMOTE_RAGE'), + +(-1309025,'The brood shall not fall!',0,1,0,0,'marli SAY_TRANSFORM_BACK'), + +(-1309026,'%s emits a deafening shriek!',0,2,0,0,'jeklik SAY_SHRIEK'), +(-1309027,'%s begins to cast a Great Heal!',0,2,0,0,'jeklik SAY_HEAL'); -- -1 329 000 STRATHOLME INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES diff --git a/sql/updates/r2541_mangos.sql b/sql/updates/r2541_mangos.sql new file mode 100644 index 000000000..0d093b0e2 --- /dev/null +++ b/sql/updates/r2541_mangos.sql @@ -0,0 +1,2 @@ +UPDATE creature_template SET ScriptName='' WHERE entry=14965; +UPDATE creature_template SET ScriptName='npc_gurubashi_bat_rider' WHERE entry=14750; diff --git a/sql/updates/r2541_scriptdev2.sql b/sql/updates/r2541_scriptdev2.sql new file mode 100644 index 000000000..91b4800ea --- /dev/null +++ b/sql/updates/r2541_scriptdev2.sql @@ -0,0 +1,5 @@ +DELETE FROM script_texts WHERE entry IN (-1309025,-1309026,-1309027); +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1309025,'The brood shall not fall!',0,1,0,0,'marli SAY_TRANSFORM_BACK'), +(-1309026,'%s emits a deafening shriek',0,2,0,0,'jeklik SAY_SHRIEK'), +(-1309027,'%s begins to cast a Great Heal!',0,2,0,0,'jeklik SAY_HEAL'); From dfdac785423615dae810aaa7ac5e2a9dc633bf94 Mon Sep 17 00:00:00 2001 From: Michalpolko Date: Wed, 9 May 2012 02:21:37 +0300 Subject: [PATCH 0530/1172] [2542] Add more defines to Icecrown Citadel and make use of the area triggers Signed-off-by: Xfurry --- .../icecrown_citadel/boss_lord_marrowgar.cpp | 16 +----- .../icecrown_citadel/icecrown_citadel.h | 50 +++++++++++++++++++ .../instance_icecrown_citadel.cpp | 38 +++++++++++++- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 3 ++ sql/updates/r2542_mangos.sql | 3 ++ 6 files changed, 95 insertions(+), 17 deletions(-) create mode 100644 sql/updates/r2542_mangos.sql diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp index c30715958..d4d4f2c70 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp @@ -26,7 +26,6 @@ EndScriptData */ enum { - SAY_INTRO = -1631001, SAY_AGGRO = -1631002, SAY_BONE_STORM = -1631003, SAY_BONE_SPIKE_1 = -1631004, @@ -71,13 +70,11 @@ struct MANGOS_DLL_DECL boss_lord_marrowgarAI : public ScriptedAI m_pInstance = (instance_icecrown_citadel*)pCreature->GetInstanceData(); // on heroic, there is 1 more Bone Storm charge m_uiMaxCharges = m_pInstance && m_pInstance->IsHeroicDifficulty() ? MAX_CHARGES_HEROIC : MAX_CHARGES_NORMAL; - m_bSaidIntro = false; Reset(); } instance_icecrown_citadel* m_pInstance; - bool m_bSaidIntro; uint8 m_uiPhase; uint8 m_uiChargesCount; uint8 m_uiMaxCharges; @@ -112,17 +109,6 @@ struct MANGOS_DLL_DECL boss_lord_marrowgarAI : public ScriptedAI m_pInstance->SetData(TYPE_MARROWGAR, IN_PROGRESS); } - void MoveInLineOfSight(Unit* pWho) - { - if (!m_bSaidIntro && pWho->GetTypeId() == TYPEID_PLAYER && !((Player*)pWho)->isGameMaster()) - { - DoScriptText(SAY_INTRO, m_creature); - m_bSaidIntro = true; - } - - ScriptedAI::MoveInLineOfSight(pWho); - } - void KilledUnit(Unit* pVictim) { if (pVictim->GetTypeId() != TYPEID_PLAYER) @@ -280,7 +266,7 @@ struct MANGOS_DLL_DECL boss_lord_marrowgarAI : public ScriptedAI { if (m_uiBoneSpikeTimer < uiDiff) { - if (DoCastSpellIfCan(m_creature, m_uiPhase == PHASE_NORMAL ? SPELL_BONE_SPIKE_STORM : SPELL_BONE_SPIKE_STORM) == CAST_OK) + if (DoCastSpellIfCan(m_creature, m_uiPhase == PHASE_NORMAL ? SPELL_BONE_SPIKE : SPELL_BONE_SPIKE_STORM) == CAST_OK) { switch (urand(0, 2)) { diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_citadel.h b/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_citadel.h index c70e95f9a..6b4a0409a 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_citadel.h +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_citadel.h @@ -39,6 +39,7 @@ enum // boss-related and other NPCs NPC_DEATHWHISPER_SPAWN_STALKER = 37947, + NPC_DEATHWHISPER_CONTROLLER = 37948, NPC_OVERLORD_SAURFANG = 37187, NPC_KORKRON_REAVER = 37920, NPC_MURADIN_BRONZEBEARD = 37200, // Saurfang's encounter and at the instance entrance @@ -134,12 +135,38 @@ enum GO_DREAMWALKER_CACHE_10_H = 202338, GO_DREAMWALKER_CACHE_25_H = 202340, + // Area triggers + AREATRIGGER_MARROWGAR_INTRO = 5732, + + // Yells + SAY_MARROWGAR_INTRO = -1631001, + // Achievement criterias ACHIEV_CRIT_BONED_10N = 12775, // Lord Marrowgar, achievs 4534, 4610 ACHIEV_CRIT_BONED_25N = 12962, ACHIEV_CRIT_BONED_10H = 13393, ACHIEV_CRIT_BONED_25H = 13394, + ACHIEV_CRIT_HOUSE_10N = 12776, // Lady Deathwhisper, achievs 4535, 4611 + ACHIEV_CRIT_HOUSE_25N = 12997, + ACHIEV_CRIT_HOUSE_10H = 12995, + ACHIEV_CRIT_HOUSE_25H = 12998, + + ACHIEV_CRIT_IM_ON_A_BOAT_10N = 12777, // Gunship Battle, achievs 4536, 4612 + ACHIEV_CRIT_IM_ON_A_BOAT_25N = 13080, + ACHIEV_CRIT_IM_ON_A_BOAT_10H = 13079, + ACHIEV_CRIT_IM_ON_A_BOAT_25H = 13081, + + ACHIEV_CRIT_MADE_A_MESS_10N = 12778, // Deathbringer Saurfang, achievs 4537, 4613 + ACHIEV_CRIT_MADE_A_MESS_25N = 13036, + ACHIEV_CRIT_MADE_A_MESS_10H = 13035, + ACHIEV_CRIT_MADE_A_MESS_25H = 13037, + + ACHIEV_CRIT_FLU_SHOT_SHORTAGE_10N = 12977, // Festergut, achievs 4615, 4577 + ACHIEV_CRIT_FLU_SHOT_SHORTAGE_25N = 12982, + ACHIEV_CRIT_FLU_SHOT_SHORTAGE_10H = 12986, + ACHIEV_CRIT_FLU_SHOT_SHORTAGE_25H = 12967, + ACHIEV_CRIT_DANCES_WITH_OOZES_10N = 12984, // Rotface, achievs 4538, 4614 ACHIEV_CRIT_DANCES_WITH_OOZES_25N = 12966, ACHIEV_CRIT_DANCES_WITH_OOZES_10H = 12985, @@ -159,6 +186,21 @@ enum ACHIEV_CRIT_ONCE_BITTEN_TWICE_SHY_25N = 13012, ACHIEV_CRIT_ONCE_BITTEN_TWICE_SHY_10V = 13011, ACHIEV_CRIT_ONCE_BITTEN_TWICE_SHY_25V = 13013, + + ACHIEV_CRIT_PORTAL_JOCKEY_10N = 12978, // Valithria, achievs 4579, 4619 + ACHIEV_CRIT_PORTAL_JOCKEY_25N = 12971, + ACHIEV_CRIT_PORTAL_JOCKEY_10H = 12979, + ACHIEV_CRIT_PORTAL_JOCKEY_25H = 12980, + + ACHIEV_CRIT_ALL_YOU_CAN_EAT_10N = 12822, // Sindragosa, achievs 4580, 4620 + ACHIEV_CRIT_ALL_YOU_CAN_EAT_25N = 12972, + ACHIEV_CRIT_ALL_YOU_CAN_EAT_10V = 12996, + ACHIEV_CRIT_ALL_YOU_CAN_EAT_25V = 12989, + + ACHIEV_CRIT_WAITING_A_LONG_TIME_10N = 13246, // Lich King, achievs 4601, 4621 + ACHIEV_CRIT_WAITING_A_LONG_TIME_25N = 13244, + ACHIEV_CRIT_WAITING_A_LONG_TIME_10H = 13247, + ACHIEV_CRIT_WAITING_A_LONG_TIME_25H = 13245, }; class MANGOS_DLL_DECL instance_icecrown_citadel : public ScriptedInstance @@ -179,10 +221,14 @@ class MANGOS_DLL_DECL instance_icecrown_citadel : public ScriptedInstance const char* Save() { return m_strInstData.c_str(); } void Load(const char* strIn); + void DoHandleCitadelAreaTrigger(uint32 uiTriggerId); + // Difficulty wrappers bool IsHeroicDifficulty() { return instance->GetDifficulty() > RAID_DIFFICULTY_25MAN_NORMAL; } bool Is25ManDifficulty() { return instance->GetDifficulty() == RAID_DIFFICULTY_25MAN_NORMAL || instance->GetDifficulty() == RAID_DIFFICULTY_25MAN_HEROIC; } + void GetDeathwhisperStalkersList(GUIDList &lList) { lList = m_lDeathwhisperStalkersGuids; } + // Open Putricide door in a few seconds void DoPreparePutricideDoor() { m_uiPutricideValveTimer = 15000; } @@ -196,6 +242,10 @@ class MANGOS_DLL_DECL instance_icecrown_citadel : public ScriptedInstance uint32 m_uiTeam; // Team of first entered player, used on the Gunship event uint32 m_uiPutricideValveTimer; + + bool m_bHasMarrowgarIntroYelled; + + GUIDList m_lDeathwhisperStalkersGuids; }; #endif diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_citadel.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_citadel.cpp index e28d53efe..99049cff3 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_citadel.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_citadel.cpp @@ -26,7 +26,8 @@ EndScriptData */ instance_icecrown_citadel::instance_icecrown_citadel(Map *pMap) : ScriptedInstance(pMap), m_uiTeam(0), - m_uiPutricideValveTimer(0) + m_uiPutricideValveTimer(0), + m_bHasMarrowgarIntroYelled(false) { Initialize(); } @@ -47,6 +48,18 @@ bool instance_icecrown_citadel::IsEncounterInProgress() const return false; } +void instance_icecrown_citadel::DoHandleCitadelAreaTrigger(uint32 uiTriggerId) +{ + if (uiTriggerId == AREATRIGGER_MARROWGAR_INTRO && !m_bHasMarrowgarIntroYelled) + { + if (Creature* pMarrowgar = GetSingleCreatureFromStorage(NPC_LORD_MARROWGAR)) + { + DoScriptText(SAY_MARROWGAR_INTRO, pMarrowgar); + m_bHasMarrowgarIntroYelled = true; + } + } +} + void instance_icecrown_citadel::OnPlayerEnter(Player* pPlayer) { if (!m_uiTeam) // very first player to enter @@ -80,6 +93,9 @@ void instance_icecrown_citadel::OnCreatureCreate(Creature *pCreature) case NPC_BLOOD_ORB_CONTROL: m_mNpcEntryGuidStore[pCreature->GetEntry()] = pCreature->GetObjectGuid(); break; + case NPC_DEATHWHISPER_SPAWN_STALKER: + m_lDeathwhisperStalkersGuids.push_back(pCreature->GetObjectGuid()); + return; } } @@ -372,6 +388,21 @@ InstanceData* GetInstanceData_instance_icecrown_citadel(Map* pMap) return new instance_icecrown_citadel(pMap); } +bool AreaTrigger_at_icecrown_citadel(Player* pPlayer, AreaTriggerEntry const* pAt) +{ + if (pAt->id == AREATRIGGER_MARROWGAR_INTRO) + { + if (pPlayer->isGameMaster() || pPlayer->isDead()) + return false; + + if (instance_icecrown_citadel* pInstance = (instance_icecrown_citadel*)pPlayer->GetInstanceData()) + pInstance->DoHandleCitadelAreaTrigger(pAt->id); + } + + return false; +} + + bool ProcessEventId_event_gameobject_citadel_valve(uint32 uiEventId, Object* pSource, Object* pTarget, bool bIsStart) { if (bIsStart && pSource->GetTypeId() == TYPEID_PLAYER) @@ -397,6 +428,11 @@ void AddSC_instance_icecrown_citadel() pNewScript->GetInstanceData = &GetInstanceData_instance_icecrown_citadel; pNewScript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "at_icecrown_citadel"; + pNewScript->pAreaTrigger = &AreaTrigger_at_icecrown_citadel; + pNewScript->RegisterSelf(); + pNewScript = new Script; pNewScript->Name = "event_gameobject_citadel_valve"; pNewScript->pProcessEventId = &ProcessEventId_event_gameobject_citadel_valve; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 5ff0ce596..af25aa01a 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2541" + #define SD2_REVISION_NR "2542" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 0b8039400..80fd1f030 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -69,6 +69,9 @@ INSERT INTO scripted_areatrigger VALUES (1738,'at_scent_larkorwi'), (1739,'at_scent_larkorwi'), (1740,'at_scent_larkorwi'); +DELETE FROM scripted_areatrigger WHERE entry=5732; +INSERT INTO scripted_areatrigger VALUES +(5732,'at_icecrown_citadel'); /* BATTLEGROUNDS */ diff --git a/sql/updates/r2542_mangos.sql b/sql/updates/r2542_mangos.sql new file mode 100644 index 000000000..29549be4b --- /dev/null +++ b/sql/updates/r2542_mangos.sql @@ -0,0 +1,3 @@ +DELETE FROM scripted_areatrigger WHERE entry IN (5732); +INSERT INTO scripted_areatrigger VALUES +(5732,'at_icecrown_citadel'); From 588602d4657a26acb7aa5fcc7a6b6a7a28a9c204 Mon Sep 17 00:00:00 2001 From: Michalpolko Date: Wed, 9 May 2012 10:19:34 +0300 Subject: [PATCH 0531/1172] [2543] Implement support for Lady Deathwhisper intro dialogue Signed-off-by: Xfurry --- .../boss_lady_deathwhisper.cpp | 7 ---- .../icecrown_citadel/icecrown_citadel.h | 7 ++-- .../instance_icecrown_citadel.cpp | 42 +++++++++++++++++-- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 3 +- sql/updates/r2543_mangos.sql | 3 ++ 6 files changed, 48 insertions(+), 16 deletions(-) create mode 100644 sql/updates/r2543_mangos.sql diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lady_deathwhisper.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lady_deathwhisper.cpp index ab1b362e5..30a3f52b6 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lady_deathwhisper.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lady_deathwhisper.cpp @@ -26,13 +26,6 @@ EndScriptData */ enum { - SAY_SPEECH_1 = -1631011, - SAY_SPEECH_2 = -1631012, - SAY_SPEECH_3 = -1631013, - SAY_SPEECH_4 = -1631014, - SAY_SPEECH_5 = -1631015, - SAY_SPEECH_6 = -1631016, - SAY_SPEECH_7 = -1631017, SAY_AGGRO = -1631018, SAY_PHASE_TWO = -1631019, SAY_DARK_EMPOWERMENT = -1631020, diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_citadel.h b/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_citadel.h index 6b4a0409a..1a2091f42 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_citadel.h +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_citadel.h @@ -137,9 +137,7 @@ enum // Area triggers AREATRIGGER_MARROWGAR_INTRO = 5732, - - // Yells - SAY_MARROWGAR_INTRO = -1631001, + AREATRIGGER_DEATHWHISPER_INTRO = 5709, // Achievement criterias ACHIEV_CRIT_BONED_10N = 12775, // Lord Marrowgar, achievs 4534, 4610 @@ -203,7 +201,7 @@ enum ACHIEV_CRIT_WAITING_A_LONG_TIME_25H = 13245, }; -class MANGOS_DLL_DECL instance_icecrown_citadel : public ScriptedInstance +class MANGOS_DLL_DECL instance_icecrown_citadel : public ScriptedInstance, private DialogueHelper { public: instance_icecrown_citadel(Map *pMap); @@ -244,6 +242,7 @@ class MANGOS_DLL_DECL instance_icecrown_citadel : public ScriptedInstance uint32 m_uiPutricideValveTimer; bool m_bHasMarrowgarIntroYelled; + bool m_bHasDeathwhisperIntroYelled; GUIDList m_lDeathwhisperStalkersGuids; }; diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_citadel.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_citadel.cpp index 99049cff3..8977ae1de 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_citadel.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_citadel.cpp @@ -24,16 +24,45 @@ EndScriptData */ #include "precompiled.h" #include "icecrown_citadel.h" -instance_icecrown_citadel::instance_icecrown_citadel(Map *pMap) : ScriptedInstance(pMap), +enum +{ + // Marrowgar + SAY_MARROWGAR_INTRO = -1631001, + + // Deathwhisper + SAY_DEATHWHISPER_SPEECH_1 = -1631011, + SAY_DEATHWHISPER_SPEECH_2 = -1631012, + SAY_DEATHWHISPER_SPEECH_3 = -1631013, + SAY_DEATHWHISPER_SPEECH_4 = -1631014, + SAY_DEATHWHISPER_SPEECH_5 = -1631015, + SAY_DEATHWHISPER_SPEECH_6 = -1631016, + SAY_DEATHWHISPER_SPEECH_7 = -1631017, +}; + +static const DialogueEntry aCitadelDialogue[] = +{ + {SAY_DEATHWHISPER_SPEECH_1, NPC_LADY_DEATHWHISPER, 12000}, + {SAY_DEATHWHISPER_SPEECH_2, NPC_LADY_DEATHWHISPER, 11000}, + {SAY_DEATHWHISPER_SPEECH_3, NPC_LADY_DEATHWHISPER, 10000}, + {SAY_DEATHWHISPER_SPEECH_4, NPC_LADY_DEATHWHISPER, 9000}, + {SAY_DEATHWHISPER_SPEECH_5, NPC_LADY_DEATHWHISPER, 10000}, + {SAY_DEATHWHISPER_SPEECH_6, NPC_LADY_DEATHWHISPER, 10000}, + {SAY_DEATHWHISPER_SPEECH_7, NPC_LADY_DEATHWHISPER, 0}, + {0, 0, 0}, +}; + +instance_icecrown_citadel::instance_icecrown_citadel(Map *pMap) : ScriptedInstance(pMap), DialogueHelper(aCitadelDialogue), m_uiTeam(0), m_uiPutricideValveTimer(0), - m_bHasMarrowgarIntroYelled(false) + m_bHasMarrowgarIntroYelled(false), + m_bHasDeathwhisperIntroYelled(false) { Initialize(); } void instance_icecrown_citadel::Initialize() { + InitializeDialogueHelper(this); memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); } @@ -58,6 +87,11 @@ void instance_icecrown_citadel::DoHandleCitadelAreaTrigger(uint32 uiTriggerId) m_bHasMarrowgarIntroYelled = true; } } + else if (uiTriggerId == AREATRIGGER_DEATHWHISPER_INTRO && !m_bHasDeathwhisperIntroYelled) + { + StartNextDialogueText(SAY_DEATHWHISPER_SPEECH_1); + m_bHasDeathwhisperIntroYelled = true; + } } void instance_icecrown_citadel::OnPlayerEnter(Player* pPlayer) @@ -365,6 +399,8 @@ void instance_icecrown_citadel::Load(const char *strIn) void instance_icecrown_citadel::Update(uint32 uiDiff) { + DialogueUpdate(uiDiff); + if (m_uiPutricideValveTimer) { if (m_uiPutricideValveTimer <= uiDiff) @@ -390,7 +426,7 @@ InstanceData* GetInstanceData_instance_icecrown_citadel(Map* pMap) bool AreaTrigger_at_icecrown_citadel(Player* pPlayer, AreaTriggerEntry const* pAt) { - if (pAt->id == AREATRIGGER_MARROWGAR_INTRO) + if (pAt->id == AREATRIGGER_MARROWGAR_INTRO || pAt->id == AREATRIGGER_DEATHWHISPER_INTRO) { if (pPlayer->isGameMaster() || pPlayer->isDead()) return false; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index af25aa01a..2ad3cec7a 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2542" + #define SD2_REVISION_NR "2543" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 80fd1f030..6668dd0e8 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -69,8 +69,9 @@ INSERT INTO scripted_areatrigger VALUES (1738,'at_scent_larkorwi'), (1739,'at_scent_larkorwi'), (1740,'at_scent_larkorwi'); -DELETE FROM scripted_areatrigger WHERE entry=5732; +DELETE FROM scripted_areatrigger WHERE entry IN (5709,5732); INSERT INTO scripted_areatrigger VALUES +(5709,'at_icecrown_citadel'), (5732,'at_icecrown_citadel'); diff --git a/sql/updates/r2543_mangos.sql b/sql/updates/r2543_mangos.sql new file mode 100644 index 000000000..79fe6bce6 --- /dev/null +++ b/sql/updates/r2543_mangos.sql @@ -0,0 +1,3 @@ +DELETE FROM scripted_areatrigger WHERE entry IN (5709); +INSERT INTO scripted_areatrigger VALUES +(5709,'at_icecrown_citadel'); From 3a6baa472c9c948c96926b85ba810d6ca921c65f Mon Sep 17 00:00:00 2001 From: Xfurry Date: Wed, 9 May 2012 23:54:49 +0300 Subject: [PATCH 0532/1172] [2544] Improve script for Marli - Zul'Gurub Also fixed the aggro of the Gurubashi Bat Riders and added proper respawn support for the Spider Eggs and the Gong of Bethekk Note: Spell 24083 requires core targeting support Script for npc 15041 was removed because it was wrong --- .../eastern_kingdoms/zulgurub/boss_jeklik.cpp | 4 + .../eastern_kingdoms/zulgurub/boss_marli.cpp | 340 ++++++------------ .../zulgurub/instance_zulgurub.cpp | 32 +- scripts/eastern_kingdoms/zulgurub/zulgurub.h | 3 + sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 - sql/updates/r2544_mangos.sql | 1 + 7 files changed, 151 insertions(+), 232 deletions(-) create mode 100644 sql/updates/r2544_mangos.sql diff --git a/scripts/eastern_kingdoms/zulgurub/boss_jeklik.cpp b/scripts/eastern_kingdoms/zulgurub/boss_jeklik.cpp index 4f1b3ef71..e9a82829f 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_jeklik.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_jeklik.cpp @@ -304,6 +304,10 @@ struct MANGOS_DLL_DECL npc_gurubashi_bat_riderAI : public ScriptedAI void Aggro(Unit* pWho) { + // Don't attack if is summoned by Jeklik - the npc gets aggro because of the Liquid Fire + if (m_bIsSummon) + return; + DoCastSpellIfCan(m_creature, SPELL_DEMORALIZING_SHOUT); // For normal mobs flag needs to be removed m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); diff --git a/scripts/eastern_kingdoms/zulgurub/boss_marli.cpp b/scripts/eastern_kingdoms/zulgurub/boss_marli.cpp index aaae7219e..db5d90de4 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_marli.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_marli.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: Boss_Marli -SD%Complete: 100 -SDComment: Vilebranch Speaker respawned when wipe? +SD%Complete: 90 +SDComment: Enlarge for small spiders NYI SDCategory: Zul'Gurub EndScriptData */ @@ -26,29 +26,29 @@ EndScriptData */ enum { - GO_EGG = 179985, - - // the spider - NPC_SPAWN_OF_MARLI = 15041, - SAY_AGGRO = -1309005, SAY_TRANSFORM = -1309006, - SAY_TRANSFORMBACK = -1309024, + SAY_TRANSFORM_BACK = -1309025, SAY_SPIDER_SPAWN = -1309007, SAY_DEATH = -1309008, + // Spider form spells + SPELL_CORROSIVE_POISON = 24111, SPELL_CHARGE = 22911, - SPELL_ENVELOPINGWEBS = 24110, - SPELL_POISONVOLLEY = 24099, - SPELL_SPIDER_FORM = 24084, + SPELL_ENVELOPING_WEBS = 24110, + SPELL_POISON_SHOCK = 24112, // purpose of this spell is unk + + // Troll form spells + SPELL_POISON_VOLLEY = 24099, SPELL_DRAIN_LIFE = 24300, - SPELL_CORROSIVE_POISON = 24111, + SPELL_ENLARGE = 24109, // purpose of this spell is unk + SPELL_SPIDER_EGG = 24082, // removed from DBC - should trigger 24081 which summons 15041 + + // common spells + SPELL_SPIDER_FORM = 24084, SPELL_TRANSFORM_BACK = 24085, SPELL_TRASH = 3391, - SPELL_HATCH = 24083, //visual - - //The Spider Spells - SPELL_LEVELUP = 24312 //visual + SPELL_HATCH_EGGS = 24083, // note this should only target 4 eggs! }; struct MANGOS_DLL_DECL boss_marliAI : public ScriptedAI @@ -56,106 +56,40 @@ struct MANGOS_DLL_DECL boss_marliAI : public ScriptedAI boss_marliAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_uiDefaultModel = m_creature->GetDisplayId(); Reset(); } ScriptedInstance* m_pInstance; - uint32 m_uiPoisonVolley_Timer; - uint32 m_uiSpawnSpider_Timer; - uint32 m_uiCharge_Timer; - uint32 m_uiAspect_Timer; - uint32 m_uiTransform_Timer; - uint32 m_uiTransformBack_Timer; - uint32 m_uiDrainLife_Timer; - uint32 m_uiCorrosivePoison_Timer; - uint32 m_uiWebs_Timer; - uint32 m_uiTrash_Timer; + uint32 m_uiPoisonVolleyTimer; + uint32 m_uiSpawnSpiderTimer; + uint32 m_uiChargeTimer; + uint32 m_uiTransformTimer; + uint32 m_uiDrainLifeTimer; + uint32 m_uiCorrosivePoisonTimer; + uint32 m_uiWebsTimer; + uint32 m_uiTrashTimer; - bool m_bFirstSpidersAreSpawned; bool m_bIsInPhaseTwo; - bool m_bHasWebbed; - - uint32 m_uiDefaultModel; void Reset() { - m_uiPoisonVolley_Timer = 15000; - m_uiSpawnSpider_Timer = 20000; - m_uiAspect_Timer = 12000; - m_uiTransform_Timer = 60000; - m_uiTransformBack_Timer = 60000; - m_uiDrainLife_Timer = 30000; - m_uiCorrosivePoison_Timer = 1000; - m_uiWebs_Timer = 5000; - m_uiTrash_Timer = 5000; - - m_bFirstSpidersAreSpawned = false; - m_bIsInPhaseTwo = false; - m_bHasWebbed = false; - - std::list lSpiderEggs; - GetGameObjectListWithEntryInGrid(lSpiderEggs, m_creature, GO_EGG, DEFAULT_VISIBILITY_INSTANCE); - if (lSpiderEggs.empty()) - debug_log("SD2: boss_marli, no Eggs with the entry %u were found", GO_EGG); - else - { - for(std::list::iterator iter = lSpiderEggs.begin(); iter != lSpiderEggs.end(); ++iter) - { - if ((*iter)->GetGoState() == GO_STATE_ACTIVE) - (*iter)->SetGoState(GO_STATE_READY); - } - } + m_uiPoisonVolleyTimer = 15000; + m_uiSpawnSpiderTimer = 55000; + m_uiTransformTimer = 60000; + m_uiDrainLifeTimer = 30000; + m_uiCorrosivePoisonTimer = 1000; + m_uiWebsTimer = 5000; + m_uiTrashTimer = 5000; + + m_bIsInPhaseTwo = false; } void Aggro(Unit* pWho) { DoScriptText(SAY_AGGRO, m_creature); - if (!m_bFirstSpidersAreSpawned) - { - DoScriptText(SAY_SPIDER_SPAWN, m_creature); - DoCastSpellIfCan(m_creature, SPELL_HATCH); - - for(uint8 i = 0; i < 4 ; ++i) - { - if (GameObject *pEgg = SelectNextEgg()) - { - pEgg->SetGoState(GO_STATE_ACTIVE); - m_creature->SummonCreature(NPC_SPAWN_OF_MARLI, pEgg->GetPositionX(), pEgg->GetPositionY(), pEgg->GetPositionZ(),0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000); - } - } - - m_bFirstSpidersAreSpawned = true; - } - } - - GameObject* SelectNextEgg() - { - std::list lEggs; - GetGameObjectListWithEntryInGrid(lEggs, m_creature, GO_EGG, DEFAULT_VISIBILITY_INSTANCE); - if (lEggs.empty()) - debug_log("SD2: boss_marli, no Eggs with the entry %i were found", GO_EGG); - else - { - lEggs.sort(ObjectDistanceOrder(m_creature)); - for(std::list::iterator iter = lEggs.begin(); iter != lEggs.end(); ++iter) - { - if ((*iter)->GetGoState() == (GO_STATE_READY)) - return (*iter); - } - } - return NULL; - } - - void JustSummoned(Creature* pSummoned) - { - if (pSummoned->GetEntry() == NPC_SPAWN_OF_MARLI) - { - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) - pSummoned->AI()->AttackStart(pTarget); - } + DoCastSpellIfCan(m_creature, SPELL_HATCH_EGGS); } void JustDied(Unit* pKiller) @@ -166,176 +100,136 @@ struct MANGOS_DLL_DECL boss_marliAI : public ScriptedAI m_pInstance->SetData(TYPE_MARLI, DONE); } + void JustReachedHome() + { + if (m_pInstance) + m_pInstance->SetData(TYPE_MARLI, FAIL); + } + void UpdateAI(const uint32 uiDiff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; + // Troll phase if (!m_bIsInPhaseTwo) { - if (m_uiPoisonVolley_Timer < uiDiff) + if (m_uiPoisonVolleyTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_POISONVOLLEY); - m_uiPoisonVolley_Timer = urand(10000, 20000); + if (DoCastSpellIfCan(m_creature, SPELL_POISON_VOLLEY) == CAST_OK) + m_uiPoisonVolleyTimer = urand(10000, 20000); } else - m_uiPoisonVolley_Timer -= uiDiff; + m_uiPoisonVolleyTimer -= uiDiff; - if (m_uiDrainLife_Timer < uiDiff) + if (m_uiDrainLifeTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_DRAIN_LIFE); - m_uiDrainLife_Timer = urand(20000, 50000); + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, SPELL_DRAIN_LIFE) == CAST_OK) + m_uiDrainLifeTimer = urand(20000, 50000); + } } else - m_uiDrainLife_Timer -= uiDiff; + m_uiDrainLifeTimer -= uiDiff; - if (m_uiSpawnSpider_Timer < uiDiff) + if (m_uiSpawnSpiderTimer < uiDiff) { - if (GameObject *pEgg = SelectNextEgg()) + // Workaround for missing spell 24082 - creature always selects the closest egg for hatch + if (m_pInstance) { - pEgg->SetGoState(GO_STATE_ACTIVE); - m_creature->SummonCreature(NPC_SPAWN_OF_MARLI, pEgg->GetPositionX(), pEgg->GetPositionY(), pEgg->GetPositionZ(),0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000); + if (GameObject* pEgg = GetClosestGameObjectWithEntry(m_creature, GO_SPIDER_EGG, 30.0f)) + { + if (urand(0, 1)) + DoScriptText(SAY_SPIDER_SPAWN, m_creature); + + pEgg->Use(m_creature); + m_uiSpawnSpiderTimer = 60000; + } } - m_uiSpawnSpider_Timer = urand(20000, 30000); } else - m_uiSpawnSpider_Timer -= uiDiff; + m_uiSpawnSpiderTimer -= uiDiff; } + // Spider phase else { - if (!m_bHasWebbed && m_uiWebs_Timer < uiDiff) + if (m_uiWebsTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_ENVELOPINGWEBS); - m_uiWebs_Timer = urand(10000, 15000); - m_uiCharge_Timer = 1000; - m_bHasWebbed = true; + if (DoCastSpellIfCan(m_creature, SPELL_ENVELOPING_WEBS) == CAST_OK) + { + m_uiWebsTimer = urand(15000, 20000); + m_uiChargeTimer = 1000; + } } else - m_uiWebs_Timer -= uiDiff; + m_uiWebsTimer -= uiDiff; - if (m_bHasWebbed && m_uiCharge_Timer < uiDiff) + if (m_uiChargeTimer) { - //Shouldn't be random target but highestaggro not Webbed player - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) + if (m_uiChargeTimer < uiDiff) { - DoCastSpellIfCan(pTarget, SPELL_CHARGE); - DoResetThreat(); - AttackStart(pTarget); - m_bHasWebbed = false; - /* - DoResetThreat(); - Unit* pTarget = NULL; - uint8 i = 0 ; - while (i < 5) // max 3 tries to get a random target with power_mana + // ToDo: research if the selected target shouldn't have the enveloping webs aura + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0, SPELL_CHARGE, SELECT_FLAG_NOT_IN_MELEE_RANGE)) + { + if (DoCastSpellIfCan(pTarget, SPELL_CHARGE) == CAST_OK) { - ++i; //not aggro leader - pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0); - if (pTarget && pTarget->getPowerType() == POWER_MANA) - i=5; + DoResetThreat(); + m_uiChargeTimer = 0; } - */ + } } - m_uiWebs_Timer = urand(10000, 20000); + else + m_uiChargeTimer -= uiDiff; } - else - m_uiCharge_Timer -= uiDiff; - if (m_uiCorrosivePoison_Timer < uiDiff) + if (m_uiCorrosivePoisonTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_CORROSIVE_POISON); - m_uiCorrosivePoison_Timer = urand(25000, 35000); + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, SPELL_CORROSIVE_POISON) == CAST_OK) + m_uiCorrosivePoisonTimer = urand(25000, 35000); + } } else - m_uiCorrosivePoison_Timer -= uiDiff; + m_uiCorrosivePoisonTimer -= uiDiff; } - if (m_uiTransformBack_Timer < uiDiff) + // Transform from Troll to Spider and back + if (m_uiTransformTimer < uiDiff) { if (!m_bIsInPhaseTwo) { - if (m_creature->IsNonMeleeSpellCasted(false)) - m_creature->InterruptNonMeleeSpells(false); - - DoScriptText(SAY_TRANSFORM, m_creature); - DoCastSpellIfCan(m_creature,SPELL_SPIDER_FORM); - - const CreatureInfo *cinfo = m_creature->GetCreatureInfo(); - m_creature->SetBaseWeaponDamage(BASE_ATTACK, MINDAMAGE, (cinfo->mindmg +((cinfo->mindmg/100) * 35))); - m_creature->SetBaseWeaponDamage(BASE_ATTACK, MAXDAMAGE, (cinfo->maxdmg +((cinfo->maxdmg/100) * 35))); - m_creature->UpdateDamagePhysical(BASE_ATTACK); - - DoResetThreat(); - - m_bIsInPhaseTwo = true; + if (DoCastSpellIfCan(m_creature, SPELL_SPIDER_FORM) == CAST_OK) + { + DoScriptText(SAY_TRANSFORM, m_creature); + DoResetThreat(); + m_uiTransformTimer = 60000; + m_uiWebsTimer = 5000; + m_bIsInPhaseTwo = true; + } } else { - if (m_creature->IsNonMeleeSpellCasted(false)) - m_creature->InterruptNonMeleeSpells(false); - - DoScriptText(SAY_TRANSFORMBACK, m_creature); - DoCastSpellIfCan(m_creature,SPELL_TRANSFORM_BACK); - - m_creature->SetDisplayId(m_uiDefaultModel); - - const CreatureInfo *cinfo = m_creature->GetCreatureInfo(); - m_creature->SetBaseWeaponDamage(BASE_ATTACK, MINDAMAGE, (cinfo->mindmg +((cinfo->mindmg/100) * 1))); - m_creature->SetBaseWeaponDamage(BASE_ATTACK, MAXDAMAGE, (cinfo->maxdmg +((cinfo->maxdmg/100) * 1))); - m_creature->UpdateDamagePhysical(BASE_ATTACK); - - m_bIsInPhaseTwo = false; + if (DoCastSpellIfCan(m_creature, SPELL_TRANSFORM_BACK) == CAST_OK) + { + DoScriptText(SAY_TRANSFORM_BACK, m_creature); + m_creature->RemoveAurasDueToSpell(SPELL_SPIDER_FORM); + m_bIsInPhaseTwo = false; + m_uiTransformTimer = 60000; + } } - - m_uiTransformBack_Timer = urand(55000, 70000); - } - else - m_uiTransformBack_Timer -= uiDiff; - - if (m_uiTrash_Timer < uiDiff) - { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_TRASH); - m_uiTrash_Timer = urand(10000, 20000); } else - m_uiTrash_Timer -= uiDiff; - - DoMeleeAttackIfReady(); - } -}; + m_uiTransformTimer -= uiDiff; -//Spawn of Marli -struct MANGOS_DLL_DECL mob_spawn_of_marliAI : public ScriptedAI -{ - mob_spawn_of_marliAI(Creature* pCreature) : ScriptedAI(pCreature) - { - Reset(); - m_pInstance = (ScriptedInstance*)m_creature->GetInstanceData(); - } - - ScriptedInstance* m_pInstance; - uint32 m_uiLevelUp_Timer; - - void Reset() - { - m_uiLevelUp_Timer = 3000; - } - - void UpdateAI(const uint32 uiDiff) - { - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - if (m_uiLevelUp_Timer < uiDiff) + if (m_uiTrashTimer < uiDiff) { - if (m_pInstance && m_pInstance->GetData(TYPE_MARLI) != DONE) - { - DoCastSpellIfCan(m_creature,SPELL_LEVELUP); - m_creature->SetLevel(m_creature->getLevel() + 1); - } - m_uiLevelUp_Timer = 3000; + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_TRASH) == CAST_OK) + m_uiTrashTimer = urand(10000, 20000); } else - m_uiLevelUp_Timer -= uiDiff; + m_uiTrashTimer -= uiDiff; DoMeleeAttackIfReady(); } @@ -346,11 +240,6 @@ CreatureAI* GetAI_boss_marli(Creature* pCreature) return new boss_marliAI(pCreature); } -CreatureAI* GetAI_mob_spawn_of_marli(Creature* pCreature) -{ - return new mob_spawn_of_marliAI(pCreature); -} - void AddSC_boss_marli() { Script* pNewScript; @@ -359,9 +248,4 @@ void AddSC_boss_marli() pNewScript->Name = "boss_marli"; pNewScript->GetAI = &GetAI_boss_marli; pNewScript->RegisterSelf(); - - pNewScript = new Script; - pNewScript->Name = "mob_spawn_of_marli"; - pNewScript->GetAI = &GetAI_mob_spawn_of_marli; - pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/zulgurub/instance_zulgurub.cpp b/scripts/eastern_kingdoms/zulgurub/instance_zulgurub.cpp index d5eb0f540..5e155a86e 100644 --- a/scripts/eastern_kingdoms/zulgurub/instance_zulgurub.cpp +++ b/scripts/eastern_kingdoms/zulgurub/instance_zulgurub.cpp @@ -60,6 +60,7 @@ void instance_zulgurub::OnCreatureCreate(Creature* pCreature) case NPC_JINDO: case NPC_HAKKAR: case NPC_BLOODLORD_MANDOKIR: + case NPC_MARLI: m_mNpcEntryGuidStore[pCreature->GetEntry()] = pCreature->GetObjectGuid(); break; case NPC_PANTHER_TRIGGER: @@ -78,6 +79,9 @@ void instance_zulgurub::OnObjectCreate(GameObject* pGo) case GO_GONG_OF_BETHEKK: case GO_FORCEFIELD: break; + case GO_SPIDER_EGG: + m_lSpiderEggGUIDList.push_back(pGo->GetObjectGuid()); + return; } m_mGoEntryGuidStore[pGo->GetEntry()] = pGo->GetObjectGuid(); @@ -89,18 +93,42 @@ void instance_zulgurub::SetData(uint32 uiType, uint32 uiData) { case TYPE_JEKLIK: case TYPE_VENOXIS: - case TYPE_MARLI: case TYPE_THEKAL: m_auiEncounter[uiType] = uiData; if (uiData == DONE) DoLowerHakkarHitPoints(); break; + case TYPE_MARLI: + m_auiEncounter[uiType] = uiData; + if (uiData == DONE) + DoLowerHakkarHitPoints(); + if (uiData == FAIL) + { + for (GUIDList::const_iterator itr = m_lSpiderEggGUIDList.begin(); itr != m_lSpiderEggGUIDList.end(); ++itr) + { + if (GameObject* pEgg = instance->GetGameObject(*itr)) + { + // Note: this type of Gameobject needs to be respawned manually + pEgg->SetRespawnTime(2*DAY); + pEgg->Respawn(); + } + } + } + break; case TYPE_ARLOKK: m_auiEncounter[uiType] = uiData; DoUseDoorOrButton(GO_FORCEFIELD); if (uiData == DONE) DoLowerHakkarHitPoints(); - // ToDo: Reset the Gong on FAIL + if (uiData == FAIL) + { + // Note: this gameobject should change flags - currently it despawns which isn't correct + if (GameObject* pGong = GetSingleGameObjectFromStorage(GO_GONG_OF_BETHEKK)) + { + pGong->SetRespawnTime(2*DAY); + pGong->Respawn(); + } + } break; case TYPE_OHGAN: // Note: SPECIAL instance data is set via ACID! diff --git a/scripts/eastern_kingdoms/zulgurub/zulgurub.h b/scripts/eastern_kingdoms/zulgurub/zulgurub.h index 4d64ee42c..eb07bea0d 100644 --- a/scripts/eastern_kingdoms/zulgurub/zulgurub.h +++ b/scripts/eastern_kingdoms/zulgurub/zulgurub.h @@ -26,7 +26,9 @@ enum NPC_HAKKAR = 14834, NPC_PANTHER_TRIGGER = 15091, NPC_BLOODLORD_MANDOKIR = 11382, + NPC_MARLI = 14510, + GO_SPIDER_EGG = 179985, GO_GONG_OF_BETHEKK = 180526, GO_FORCEFIELD = 180497, @@ -71,6 +73,7 @@ class MANGOS_DLL_DECL instance_zulgurub : public ScriptedInstance GUIDList m_lRightPantherTriggerGUIDList; GUIDList m_lLeftPantherTriggerGUIDList; + GUIDList m_lSpiderEggGUIDList; bool m_bHasIntroYelled; bool m_bHasAltarYelled; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 2ad3cec7a..22de94cba 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2543" + #define SD2_REVISION_NR "2544" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 6668dd0e8..2d72c6bd5 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -1386,7 +1386,6 @@ UPDATE creature_template SET ScriptName='boss_wushoolay' WHERE entry=15085; UPDATE creature_template SET ScriptName='mob_zealot_lorkhan' WHERE entry=11347; UPDATE creature_template SET ScriptName='mob_zealot_zath' WHERE entry=11348; UPDATE creature_template SET ScriptName='mob_healing_ward' WHERE entry=14987; -UPDATE creature_template SET ScriptName='mob_spawn_of_marli' WHERE entry=15041; UPDATE creature_template SET ScriptName='npc_gurubashi_bat_rider' WHERE entry=14750; UPDATE creature_template SET ScriptName='mob_shade_of_jindo' WHERE entry=14986; diff --git a/sql/updates/r2544_mangos.sql b/sql/updates/r2544_mangos.sql new file mode 100644 index 000000000..422155843 --- /dev/null +++ b/sql/updates/r2544_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='' WHERE entry=15041; From 48b51ad4d3571ab29453efa52b8578cde545978a Mon Sep 17 00:00:00 2001 From: Xfurry Date: Thu, 10 May 2012 01:13:51 +0300 Subject: [PATCH 0533/1172] [2545] Remove workaround for Marrowgar's ColdFlame spell - currently handled in core --- .../icecrown_citadel/boss_lord_marrowgar.cpp | 11 +++-------- sd2_revision_nr.h | 2 +- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp index d4d4f2c70..6a87672a9 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp @@ -40,7 +40,7 @@ enum SPELL_BERSERK = 47008, SPELL_BONE_SLICE = 69055, SPELL_BONE_STORM = 69076, - SPELL_COLDFLAME = 69138, // Note: The spell used should be 69140, but we won't use it because of some targeting issues + SPELL_COLDFLAME = 69140, SPELL_COLDFLAME_STORM = 72705, SPELL_BONE_SPIKE = 69057, SPELL_BONE_SPIKE_STORM = 73142, @@ -170,13 +170,8 @@ struct MANGOS_DLL_DECL boss_lord_marrowgarAI : public ScriptedAI // Coldflame if (m_uiColdflameTimer < uiDiff) { - // NOTE: This spell is not cast right: Normally it should be triggered by 69140 in core - // Because of the poor target selection in core we'll implement the targeting here - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0, SPELL_COLDFLAME, SELECT_FLAG_IN_MELEE_RANGE)) - { - if (DoCastSpellIfCan(pTarget, SPELL_COLDFLAME) == CAST_OK) - m_uiColdflameTimer = 5000; - } + if (DoCastSpellIfCan(m_creature, SPELL_COLDFLAME) == CAST_OK) + m_uiColdflameTimer = 5000; } else m_uiColdflameTimer -= uiDiff; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 22de94cba..deef6426d 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2544" + #define SD2_REVISION_NR "2545" #endif // __SD2_REVISION_NR_H__ From 2653949fee150f6f02a0a760c610b8ae58abc1d9 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Thu, 10 May 2012 14:39:25 +0200 Subject: [PATCH 0534/1172] [2546] More documentation! * Add Git guides from forum to docs section * Convert to nice shiny html output Signed-off-by: Schmoozerd --- docs/GIT_guide_1_easy_use.html | 801 +++++++++++ docs/GIT_guide_1_easy_use.txt | 32 + docs/GIT_guide_2_normal_use.html | 827 ++++++++++++ docs/GIT_guide_2_normal_use.txt | 86 ++ docs/GIT_guide_3_advanced_use.html | 1179 +++++++++++++++++ docs/GIT_guide_3_advanced_use.txt | 211 +++ docs/How to install.txt | 45 - docs/How_to_install.html | 854 ++++++++++++ docs/How_to_install.txt | 67 + docs/{Script Layout.txt => Script_Layout.txt} | 0 docs/aaa_Overview.html | 792 +++++++++++ docs/aaa_Overview.txt | 30 + sd2_revision_nr.h | 2 +- 13 files changed, 4880 insertions(+), 46 deletions(-) create mode 100644 docs/GIT_guide_1_easy_use.html create mode 100644 docs/GIT_guide_1_easy_use.txt create mode 100644 docs/GIT_guide_2_normal_use.html create mode 100644 docs/GIT_guide_2_normal_use.txt create mode 100644 docs/GIT_guide_3_advanced_use.html create mode 100644 docs/GIT_guide_3_advanced_use.txt delete mode 100644 docs/How to install.txt create mode 100644 docs/How_to_install.html create mode 100644 docs/How_to_install.txt rename docs/{Script Layout.txt => Script_Layout.txt} (100%) create mode 100644 docs/aaa_Overview.html create mode 100644 docs/aaa_Overview.txt diff --git a/docs/GIT_guide_1_easy_use.html b/docs/GIT_guide_1_easy_use.html new file mode 100644 index 000000000..84a2de4ee --- /dev/null +++ b/docs/GIT_guide_1_easy_use.html @@ -0,0 +1,801 @@ + + + + + +[Git GUIDE] Easy use + + + + + +
+
+
+

This assumes you have already cloned the SD2-repository.

+

If not, please follow the installation instructions how to do so:

+ +
+
+
+

1. Graphical user Interfaces for Windows

+
+
+
+
+
+

2. Updateting

+
+

The word to look for is "Pull", both GUIs have this option.

+

For Command-line fans, simple right-click ScriptDev2-directory, choose "Git Bash here" and then type
+$ git pull
+to Update

+
+
+
+

3. Restoring

+
+

In case you polluted something in your working directory open the Git bash, and type
+$ git reset --hard origin/master

+

Warning: This will remove every custom changes

+
+
+
+

+ + + diff --git a/docs/GIT_guide_1_easy_use.txt b/docs/GIT_guide_1_easy_use.txt new file mode 100644 index 000000000..6cf316717 --- /dev/null +++ b/docs/GIT_guide_1_easy_use.txt @@ -0,0 +1,32 @@ +[Git GUIDE] Easy use +==================== + +This assumes you have already cloned the SD2-repository. + +If not, please follow the _installation instructions_ how to do so: + +* link:How_to_install.html[Installation instructions] +* http://www.scriptdev2.com/showthread.php?t=4[Installation instructions on SD2 Forum] + +Graphical user Interfaces for Windows +------------------------------------- + +* http://code.google.com/p/tortoisegit[TortoiseGIT] - Similar to TortoiseSVN Shell-Extention based GUI +* http://www.syntevo.com/smartgit/index.html[SmartGit] + +Updateting +---------- + +The word to look for is "Pull", both GUIs have this option. + +For Command-line fans, simple right-click ScriptDev2-directory, choose "Git Bash here" and then type + +`$ git pull` + +to Update + +Restoring +--------- + +In case you polluted something in your working directory open the Git bash, and type + +`$ git reset --hard origin/master` + +Warning: This will remove *every* custom changes diff --git a/docs/GIT_guide_2_normal_use.html b/docs/GIT_guide_2_normal_use.html new file mode 100644 index 000000000..bbab3f663 --- /dev/null +++ b/docs/GIT_guide_2_normal_use.html @@ -0,0 +1,827 @@ + + + + + +[Git GUIDE] Normal use + + + + + +
+
+
+

This topic is for people who want to do a little work with SD2.

+

In this topic I assume that you are familar with basic use of Git and also that you are familiar with your GUI (if you use any).

+

If you are not, maybe you should start with the Easy use guide, see:

+ +

In this topic I will describe the needed steps to test other people’s patches, and how to create some own patches. However based on the Command-line tool.

+

For Windows users you can start the command line with right-clicking the ScriptDev2 directory and selecting "Git Bash Here".

+
+
+
+

1. Basic concepts in Git

+
+

Git has a working directory, these are the actual files you edit, compile and work with.

+

Git has a "index" which is the history information.+

+

By default the working directory is clean related to the index.

+

For this topic I assume that your working-tree is clean.

+

You can check this with $ git status .

+

Clean results in nothing to commit (working directory clean) .

+

If your working directory is not clean, you can either commit your changes (if they were good) with $ git commit -a .

+

or remove your changes with $ git reset --hard ,

+

or reset your working dir to default state with $ git reset -hard origin/master .

+
+
+
+

2. Testing ("applying") patches from other people

+
+

You can apply a git patch (located in fileName.patch) with
+$ git apply fileName.patch
+or
+$ git am fileName.patch

+

The second expects a patch that includes history information, so if this fails, the first way must work (or it is no proper patch)

+
+
+
+

3. Creating own patches

+
+

You have spotted a bug, fixed it, and now you wonder how you can share this fix with other people.

+

The recommanded way is, to commit your change locally and create a patch file from your commit

+

To commit your patch locally, you simple need to
+$ git commit -a -m "Make Illidan more powerfull"

+

Then you can create a patch with
+$ git format-patch HEAD^ --stdout > IllidanFix.patch
+which will create a patch for the top-most commit into the file IllidanFix.patch

+

You can also create a patch with
+$ git format-patch HEAD~n --stdout > IllidanFix.patch
+HEAD^ == HEAD~1 and is the previous commit, HEAD~n is the n-th commit before the current

+

A very usefull way to create a patch is based on clean ScriptDev2, with
+$ git format-patch origin/master --stdout > IllidanFix.patch

+
+
+
+

4. Branching projects, and tests

+
+

This is actually the part, where Git has its power. If you don’t use branches, you prevent yourself from using the best within Git!

+

The main idea is to test patches, to create patches always into special branches, and this way they won’t interfere with the main-branch.

+

Assuming you are on clean master, you create and checkout into a new branch with
+$ git checkout -b IlllidanFixes
+(the -b is for "create", whereas the normal checkout means switching between branches)
+so, you can edit, commit, apply patches as often as you want in your branch.

+

To compare what actually happend in this branch relative to ie your master branch, simply do
+$ git diff master
+and to create a patch do
+$ git format-patch master --stdout > IllidanFix.patch

+

And the best thing: You can create as many branches as you wish - which makes separating different projects, tests and so on a piece of cake :)

+
+
+
+

+ + + diff --git a/docs/GIT_guide_2_normal_use.txt b/docs/GIT_guide_2_normal_use.txt new file mode 100644 index 000000000..0078281d3 --- /dev/null +++ b/docs/GIT_guide_2_normal_use.txt @@ -0,0 +1,86 @@ +[Git GUIDE] Normal use +====================== + +This topic is for people who want to do a little work with SD2. + +In this topic I assume that you are familar with basic use of Git and also that you are familiar with your GUI (if you use any). + +If you are not, maybe you should start with the _Easy use_ guide, see: + +* link:GIT_guide_1_easy_use.html[Git GUIDE - Easy use] +* http://www.scriptdev2.com/showthread.php?t=5637[Git GUIDE - Easy use on SD2 Forums] + +In this topic I will describe the needed steps to test other people's patches, and how to create some own patches. However based on the Command-line tool. + +For Windows users you can start the command line with right-clicking the ScriptDev2 directory and selecting "Git Bash Here". + +Basic concepts in Git +--------------------- + +Git has a working directory, these are the actual files you edit, compile and work with. + +Git has a "index" which is the history information.+ + +By default the working directory is clean related to the index. + +For this topic I assume that your working-tree is clean. + +You can check this with `$ git status` . + +Clean results in `nothing to commit (working directory clean)` . + +If your working directory is not clean, you can either commit your changes (if they were good) with `$ git commit -a` . + +or remove your changes with `$ git reset --hard` , + +or reset your working dir to default state with `$ git reset -hard origin/master` . + +Testing ("applying") patches from other people +---------------------------------------------- + +You can apply a git patch (located in fileName.patch) with + +`$ git apply fileName.patch` + +or + +`$ git am fileName.patch` + +The second expects a patch that includes history information, so if this fails, the first way must work (or it is no proper patch) + +Creating own patches +-------------------- + +You have spotted a bug, fixed it, and now you wonder how you can share this fix with other people. + +The recommanded way is, to commit your change locally and create a patch file from your commit + +To commit your patch locally, you simple need to + +`$ git commit -a -m "Make Illidan more powerfull"` + +Then you can create a patch with + +`$ git format-patch HEAD^ --stdout > IllidanFix.patch` + +which will create a patch for the top-most commit into the file IllidanFix.patch + +You can also create a patch with + +`$ git format-patch HEAD~n --stdout > IllidanFix.patch` + +`HEAD^ == HEAD~1` and is the previous commit, `HEAD~n` is the n-th commit before the current + +A very usefull way to create a patch is based on clean ScriptDev2, with + +`$ git format-patch origin/master --stdout > IllidanFix.patch` + +Branching projects, and tests +----------------------------- + +This is actually the part, where Git has its power. If you don't use branches, you prevent yourself from using the best within Git! + +The main idea is to test patches, to create patches always into special branches, and this way they won't interfere with the main-branch. + +Assuming you are on clean master, you create and checkout into a new branch with + +`$ git checkout -b IlllidanFixes` + +(the -b is for "create", whereas the normal checkout means switching between branches) + +so, you can edit, commit, apply patches as often as you want in your branch. + +To compare what actually happend in this branch relative to ie your master branch, simply do + +`$ git diff master` + +and to create a patch do + +`$ git format-patch master --stdout > IllidanFix.patch` + +And the best thing: You can create as many branches as you wish - which makes separating different projects, tests and so on a piece of cake :) diff --git a/docs/GIT_guide_3_advanced_use.html b/docs/GIT_guide_3_advanced_use.html new file mode 100644 index 000000000..96c942eac --- /dev/null +++ b/docs/GIT_guide_3_advanced_use.html @@ -0,0 +1,1179 @@ + + + + + +[Git GUIDE] Advanced use + + + + + +
+
+
+

This guide is meant to help and provide information for those who want dig into the Git depths and explore its mysteries!

+

It is likely very much possible, that many of these things can be done with GUIs, but this topic expects that the command line interfact (Git Bash) is used!

+

Have phun with Git :)

+
+
+
+

1. Setup Git for ScriptDev2

+
+
+

1.1. "Copy" the offical branch to your system

+

Execute this within your <MaNGOS>/src/bindings directory

+

$ git clone git://github.com/scriptdev2/scriptdev2.git ScriptDev2
+and $ cd into it.

+
+
+

1.2. Setup some individual configuration

+
+

1.2.1. Username and Email

+

$ git config --global user.name "Your (Nick)Name"
+$ git config --global user.email "some@email.adress"

+
+
+

1.2.2. Make life more colorful

+

$ git config --global color.ui "auto"

+
+
+

1.2.3. Change the default editor

+

Thanks to DasBlub and Zor for help with this. This is just an example for notepad++, so you might need to adapt to your needs (especially the path)

+

$ git config --global core.editor "'C:/Program Files/Notepad++/notepad++.exe' -multiInst -notabbar -nosession -noPlugin"

+
+
+

1.2.4. Lineendings-configuration

+

This is actually fairly dependend from own wishes - if you feel uneasy, stay with default values

+
+
Windows
+

$ git config core.autocrlf true
+$ git config core.eol native

+
+
+
*nix
+

$ git config core.autocrlf input
+$ git config core.eol native

+
+
+
+

1.2.5. Whitespace pre-commit hook

+

This is really nice to force you to not commit code with corrupt whitespace (Needs to be set-up for every repository individually)

+

$ cp .git/hooks/pre-commit.sample .git/hooks/pre-commit
+This activates the default pre-commit hook, if the file doesn’t exist, update your git-version (and after your repo)

+
+
+
+

1.3. Use an external merge-tool

+ +
+

1.3.1. KDiff3 (not kdiff or kdiff2)

+

Reasons why to use KDiff3:

+
    +
  • +

    +has a fairly good visual interface and works on both windows and linux +

    +
  • +
  • +

    +you can get it from TODO +

    +
  • +
  • +

    +to make sure git can find it, for example on windows if you installed it to c:/Program Files/KDiff3
    +$ git config mergetool.kdiff3.path "c:/Program Files/KDiff3/kdiff3.exe" ← either that or you could add c:/Program Files/KDiff3 to your path +

    +
  • +
  • +

    +make it the default mergetool:
    +$ git config merge.tool kdiff3 +

    +
  • +
+
+
+

1.3.2. Tortoise(Git) Merge

+

Reasons why to use TortoiseGit:

+
    +
  • +

    +similar to well known TortoiseSVN software (a nice GUI tool for Git anyways) +

    +
  • +
  • +

    +does not require any further configuration to work as default merge tool (provided no other is installed) +

    +
  • +
+
+
+

1.3.3. Tortoise Merge

+

Reasons why to use TortoiseMerge

+
    +
  • +

    +Good visual interface, only works on windows +

    +
  • +
  • +

    +Download and install TortoiseSVN +

    +
  • +
  • +

    +In C:\Program Files\TortoiseSVN\bin create a file named TortMer.bat and add the following: +

    +
    +
    +
    @ECHO OFF
    +TortoiseMerge.exe /base:"%PWD%/%1" /theirs:"%PWD%/%2" /mine:"%PWD%/%3" /merged:"%PWD%/%4"
    +
    +
  • +
  • +

    +add a custom merge tool to git that runs this batch file
    +$ git config mergetool.tortoise.cmd ' "cmd.exe" "/CTortMer.bat" "$BASE" "$REMOTE" "$LOCAL" "$MERGED" ' +

    +
  • +
  • +

    +make it the default mergetool
    +$ git config merge.tool tortoise +

    +
  • +
+
+
+
+
+
+ +
+

http://git-scm.com/ - Contains nearly everything one might want :)

+
+

2.1. Obtaining Git

+

For *nix you should get Git from your distribution software repository.

+

For Windows yout can get mysysgit - you would probably want Git-w.x.y.z.previewYYYYMMDD.exe

+
+
+

2.2. Some Graphical User-Interfaces

+

(Not recommanded, but might make you happy)

+

TortoiseGit - Similar to TortoiseSVN Shell-Extention based GUI

+

SmartGit - More classical GUI, looks nice

+
+
+ + +

http://git-scm.com/course/svn.html - SVN Crash Course, especially for *nix user

+

http://book.git-scm.com/ - Very nice, including flash videos about most topics

+

http://progit.org/book/ - A bit more detailed

+ +
+ +
+
+
+

3. Most important Git-commands

+
+

Based on Freghar's Thread

+

Remark that all these commands display a very exhaustive help page with ` --help`

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+$ git clone +
+
+

+downloads a fresh repo. +

+
+$ git pull +
+
+

+is a shortcut for fetch and merge. +

+
+$ git log +
+
+

+displays the history +

+
+$ git show +
+
+

+shows the most recent commit +

+
+$ git commit +
+
+

+commits your changes (always local) +

+
+$ git checkout +
+
+

+switches the source to a specific version (local branch or commit) +

+
+$ git merge +
+
+

+merges changes from one point into current branch +

+
+$ git reset +
+
+

+leaves you on the current branch but changes what the branch "points to". +

+
+
+
+
+

4. Workflow with Git

+
+

Commit early, commit often

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+$ git pull +
+
+

+to be on recent version +

+
+$ git checkout -b <NewBranchName> +
+
+

+create a new branch for the work +

+
+Suggestion +
+
+

+Create for every project an own branch, this makes maintaining way easier! +

+
+<edit some files> +
+
+
+$ git diff +
+
+

+see what is done since last commit +

+
+$ git commit -a -m "Some Commit Message" +
+
+

+this is only locally +

+
+<edit and commit more> +
+
+
+$ git diff master +
+
+

+see what is done compared to master branch +

+
+$ git checkout master +
+
+

+change to master branch +

+
+$ git pull +
+
+

+there was an update in master, now we pulled this, tested it, and now we want to get our working branch up-to-date +

+
+$ git checkout <BranchName> +
+
+

+switch back to our working branch +

+
+$ git rebase master +
+
+

+set to state of master and rebase the own commits on top +

+
+$ git format-patch master --stdout > fileName.patch +
+
+

+Creates a nice formated patch into file "fileName.patch" +

+
+
+
+
+

5. Create and apply patches

+
+
+

5.1. Create patches

+

$ git format-patch master - creates a patchfile for every commit that diffs from master (includes author information)

+

$ git format-patch master --std.out > someFilename.patch - creates an incremental patchfile, containing information of each individual commit

+
+
+

5.2. Apply patches

+

$ patch -X -d. < someFilename.patch - applies a patch in Git(X = 1) or SVN (X = 0) format to current workspace

+

$ git apply someFilename.patch - applies a Git-patch to current workspace

+

$ git am someFilename.patch - applies and commits a Git-patch with commit information (created by format-patch)

+
+
+
+
+

+ + + diff --git a/docs/GIT_guide_3_advanced_use.txt b/docs/GIT_guide_3_advanced_use.txt new file mode 100644 index 000000000..a783c9bcc --- /dev/null +++ b/docs/GIT_guide_3_advanced_use.txt @@ -0,0 +1,211 @@ +[Git GUIDE] Advanced use +======================== + +This guide is meant to help and provide information for those who want dig into the Git depths and explore its mysteries! + +It is likely very much possible, that many of these things can be done with GUIs, but this topic expects that the command line interfact (Git Bash) is used! + +Have phun with Git :) + +Setup Git for ScriptDev2 +------------------------ + +"Copy" the offical branch to your system +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Execute this within your /src/bindings directory + +`$ git clone git://github.com/scriptdev2/scriptdev2.git ScriptDev2` + +and `$ cd` into it. + +Setup some individual configuration +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Username and Email +^^^^^^^^^^^^^^^^^^ + +`$ git config --global user.name "Your (Nick)Name"` + +`$ git config --global user.email "some@email.adress"` + +Make life more colorful +^^^^^^^^^^^^^^^^^^^^^^^ + +`$ git config --global color.ui "auto"` + +Change the default editor +^^^^^^^^^^^^^^^^^^^^^^^^^ + +Thanks to DasBlub and Zor for help with this. This is just an example for notepad++, so you might need to adapt to your needs (especially the path) + +`$ git config --global core.editor "'C:/Program Files/Notepad++/notepad++.exe' -multiInst -notabbar -nosession -noPlugin"` + +Lineendings-configuration +^^^^^^^^^^^^^^^^^^^^^^^^^ + +This is actually fairly dependend from own wishes - if you feel uneasy, stay with default values + +Windows ++++++++ + +`$ git config core.autocrlf true` + +`$ git config core.eol native` + +*nix +++++ + +`$ git config core.autocrlf input` + +`$ git config core.eol native` + +Whitespace pre-commit hook +^^^^^^^^^^^^^^^^^^^^^^^^^^ + +This is really nice to force you to not commit code with corrupt whitespace (Needs to be set-up for every repository individually) + +`$ cp .git/hooks/pre-commit.sample .git/hooks/pre-commit` + +This activates the default pre-commit hook, if the file doesn't exist, update your git-version (and after your repo) + +Use an external merge-tool +~~~~~~~~~~~~~~~~~~~~~~~~~~ + +see http://getmangos.com/community/forum/27/source-code-management/TODOTODO[_Freghar_'s Thread] + +KDiff3 (not kdiff or kdiff2) +^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Reasons why to use http://kdiff3.sourceforge.net/doc/merging.html[KDiff3]: + +- has a fairly good visual interface and works on both windows and linux +- you can get it from http://sourceforge.net/project/showf...ease_id=501369[TODO] +- to make sure git can find it, for example on windows if you installed it to `c:/Program Files/KDiff3` + +`$ git config mergetool.kdiff3.path "c:/Program Files/KDiff3/kdiff3.exe"` <- either that or you could add `c:/Program Files/KDiff3` to your path +- make it the default mergetool: + +`$ git config merge.tool kdiff3` + +Tortoise(Git) Merge +^^^^^^^^^^^^^^^^^^^ + +Reasons why to use http://code.google.com/p/tortoisegit/[TortoiseGit]: + +- similar to well known TortoiseSVN software (a nice GUI tool for Git anyways) +- does not require any further configuration to work as default merge tool (provided no other is installed) + +Tortoise Merge +^^^^^^^^^^^^^^ + +Reasons why to use http://tortoisesvn.tigris.org/TortoiseMerge.html[TortoiseMerge] + +- Good visual interface, only works on windows +- Download and install http://tortoisesvn.net/downloads[TortoiseSVN] +- In `C:\Program Files\TortoiseSVN\bin` create a file named TortMer.bat and add the following: ++ +---- +@ECHO OFF +TortoiseMerge.exe /base:"%PWD%/%1" /theirs:"%PWD%/%2" /mine:"%PWD%/%3" /merged:"%PWD%/%4" +---- ++ +- add a custom merge tool to git that runs this batch file + +`$ git config mergetool.tortoise.cmd ' "cmd.exe" "/CTortMer.bat" "$BASE" "$REMOTE" "$LOCAL" "$MERGED" '` +- make it the default mergetool + +`$ git config merge.tool tortoise` + +Some Links +---------- + +http://git-scm.com/ - Contains nearly everything one might want :) + +Obtaining Git +~~~~~~~~~~~~~ + +For *nix you should get Git from your distribution software repository. + +For Windows yout can get http://code.google.com/p/msysgit/downloads/list[mysysgit] - you would probably want Git-w.x.y.z.previewYYYYMMDD.exe + +Some Graphical User-Interfaces +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +(Not recommanded, but might make you happy) + +http://code.google.com/p/tortoisegit/[TortoiseGit] - Similar to TortoiseSVN Shell-Extention based GUI + +http://www.syntevo.com/smartgit/index.html[SmartGit] - More classical GUI, looks nice + +Documentation-Links +~~~~~~~~~~~~~~~~~~~ + +http://www.kernel.org/pub/software/scm/git/docs/everyday.html - Small overview of common commands + +http://git-scm.com/course/svn.html - SVN Crash Course, especially for *nix user + +http://book.git-scm.com/ - Very nice, including flash videos about most topics + +http://progit.org/book/ - A bit more detailed + + +http://getmangos.com/community/forum/27/source-code-management/ - Collection of various topics on MaNGOS + +What is this Git about? +~~~~~~~~~~~~~~~~~~~~~~ + +http://www.youtube.com/watch?v=4XpnKHJAok8[Google TechTalk by _L. Torvalds_] + +http://www.youtube.com/watch?v=8dhZ9BXQgc4[Google TechTalk by _R. Schwartz_] + +https://git.wiki.kernel.org/index.php/GitSvnComparison[Compate Git vs. SVN] + +Most important Git-commands +--------------------------- + +Based on _Freghar_'s Thread + +Remark that all these commands display a very exhaustive help page with ` --help` + +[horizontal] +`$ git clone` :: downloads a fresh repo. +`$ git pull` :: is a shortcut for fetch and merge. +`$ git log` :: displays the history +`$ git show` :: shows the most recent commit +`$ git commit` :: commits your changes (always local) +`$ git checkout` :: switches the source to a specific version (local branch or commit) +`$ git merge` :: merges changes from one point into current branch +`$ git reset` :: leaves you on the current branch but changes what the branch "points to". + +Workflow with Git +----------------- + +*Commit early, commit often* + +[horizontal] +`$ git pull` :: to be on recent version +`$ git checkout -b ` :: create a new branch for the work +Suggestion:: Create for _every_ project an own branch, this makes maintaining way easier! + :: ++ +`$ git diff` :: see what is done since last commit +`$ git commit -a -m "Some Commit Message"` :: this is only locally + :: ++ +`$ git diff master` :: see what is done compared to master branch +`$ git checkout master` :: change to master branch +`$ git pull` :: there was an update in master, now we pulled this, tested it, and now we want to get our working branch up-to-date +`$ git checkout ` :: switch back to our working branch +`$ git rebase master` :: set to state of master and rebase the own commits on top +`$ git format-patch master --stdout > fileName.patch` :: Creates a nice formated patch into file "fileName.patch" + +Create and apply patches +------------------------ + +Create patches +~~~~~~~~~~~~~~ + +`$ git format-patch master` - creates a patchfile for every commit that diffs from master (includes author information) + +`$ git format-patch master --std.out > someFilename.patch` - creates an incremental patchfile, containing information of each individual commit + +Apply patches +~~~~~~~~~~~~~ + +`$ patch -X -d. < someFilename.patch` - applies a patch in Git(X = 1) or SVN (X = 0) format to current workspace + +`$ git apply someFilename.patch` - applies a Git-patch to current workspace + +`$ git am someFilename.patch` - applies and commits a Git-patch with commit information (created by format-patch) diff --git a/docs/How to install.txt b/docs/How to install.txt deleted file mode 100644 index e8e3578cd..000000000 --- a/docs/How to install.txt +++ /dev/null @@ -1,45 +0,0 @@ - ---- How to install ScriptDev2 --- - -1) Download MaNGOS (using git clone) -See their forum/ wiki for more details - -2) Do the source stuff: -- Clone ScriptDev2 "git clone git://github.com/scriptdev2/scriptdev2.git ScriptDev2" - execute from within src/bindings directory - -MS Windows: -- Compile ScriptDev2 using the scriptVC80, scriptVC90 or scriptVC100 Solution within the ScriptDev2 folder (this will overwrite the Mangoscript dll in the output directory) - -GNU/Linux or CMake: -- Apply the Git patch to Mangos - "git am src/bindings/ScriptDev2/patches/MaNGOS-XXXX-ScriptDev2.patch" -- Compile MaNGOS (ScriptDev2 will automatically be built when compiling Mangos from here on) - - -3) Create the default ScriptDev2 database using - "sql\scriptdev2_create_database.sql", then execute - "sql\scriptdev2_create_structure.sql" on that database. - -4) Execute the following on your ScriptDev2 database. -- sql\scriptdev2_script_full.sql - -5) Execute the following file on your MaNGOS database. -- sql\mangos_scriptname_full.sql - -6) Place the included "scriptdev2.conf" file within the directory containing your "mangosd.conf" and "realmd.conf" files. You may need to change this file to match the database you created and any custom settings you wish to use. Note this file will be different created for Unix based systems. - -7) Run mangosd from your output directory - - -To update ScriptDev2: -- Enter src/bindings/ScriptDev2 directory (with git-bash) -- Update ScriptDev2 - "git pull" - -MS Windows: -- You must still compile MaNGOS before ScriptDev2 when on the Windows platform. - -To update your Database with new Scriptdev2 SQL changes you can either: -a) apply only the changes that were made during that revision by looking in the sql\update folder or (files named rXXX_scriptdev2.sql should be executed on the scriptdev2 db while rXXX_mangos.sql should be executed on your mangos db) -b) reapply "mangos_scriptname_full.sql" to your MaNGOS database. - WARNING this will NOT include removed script names! - -You can view the ScriptDev2 Change Log at: -https://github.com/scriptdev2/scriptdev2/commits/master diff --git a/docs/How_to_install.html b/docs/How_to_install.html new file mode 100644 index 000000000..1526b4eb6 --- /dev/null +++ b/docs/How_to_install.html @@ -0,0 +1,854 @@ + + + + + +Installation Instructions + + + + + +
+
+

1. Clean install of ScriptDev2

+
+
+

1.1. Download MaNGOS (using git clone)

+

See their forum or wiki for more details

+
+
+

1.2. Get the sources

+

Clone ScriptDev2 git clone git://github.com/scriptdev2/scriptdev2.git ScriptDev2 - execute from within src/bindings directory

+

MS Windows:
+Compile ScriptDev2 using the scriptVC80, scriptVC90 or scriptVC100 Solution within the ScriptDev2 folder (this will overwrite the Mangoscript dll in the output directory)

+

GNU/Linux or CMake:
+Apply the Git patch to Mangos - git am src/bindings/ScriptDev2/patches/MaNGOS-11167-ScriptDev2.patch
+Compile MaNGOS (ScriptDev2 will automatically be built when compiling Mangos from here on)

+
+
+

1.3. Handle the databases

+
+
+Create ScriptDev2-Database +
+
+

+Execute sql\scriptdev2_create_database.sql , then execute
+sql\scriptdev2_create_structure.sql on that database. +

+
+
+Add content to ScriptDev2-Database +
+
+

+Execute sql\scriptdev2_script_full.sql on scriptdev2 databse +

+
+
+Update ScriptNames +
+
+

+Execute sql\mangos_scriptname_full.sql on your MaNGOS world Database +

+
+
+
+
+

1.4. Configuration files

+

Place the included "scriptdev2.conf" file within the directory containing your "mangosd.conf" and "realmd.conf" files.

+

You may need to change this file to match the database you created and any custom settings you wish to use.

+

Note this file will be differently created for Unix based systems.

+
+
+

1.5. Run mangosd

+

Run mangosd from your output directory. If you use another directory to run mangos, you need (on windows) copy the mangosscript.dll to that directory before starting mangosd.

+
+
+
+
+

2. How to Update ScriptDev2

+
+
    +
  1. +

    +Enter src/bindings/ScriptDev2 directory (with git-bash) +

    +
  2. +
  3. +

    +Update ScriptDev2 with git pull +

    +
  4. +
  5. +

    +Compile ScriptDev2
    + On windows you must still compile MaNGOS before ScriptDev2 +

    +
  6. +
  7. +

    +Update your Database with new Scriptdev2 SQL changes. For this you can either: +

    +
      +
    • +

      +apply only the changes that were made during that revision by looking in the sql\update folder or (files named rXXX_scriptdev2.sql should be executed on the scriptdev2 db while rXXX_mangos.sql should be executed on your mangos db) +

      +
    • +
    • +

      +reapply "mangos_scriptname_full.sql" to your MaNGOS database. - WARNING this will NOT include removed script names! +

      +
    • +
    +
  8. +
+
+
+
+

3. ScriptDev2 Change Log

+
+

You can view the ScriptDev2 change log on the ScriptDev2 Github Repository.

+

Or of course locally with your Git GUI tools or with git log (Note that it should be up to date before looking into your local log)

+
+
+
+

+ + + diff --git a/docs/How_to_install.txt b/docs/How_to_install.txt new file mode 100644 index 000000000..54adc380b --- /dev/null +++ b/docs/How_to_install.txt @@ -0,0 +1,67 @@ +Installation Instructions +========================= + +Clean install of ScriptDev2 +--------------------------- + +Download MaNGOS (using git clone) +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +See their http://getmangos.com/community[forum] or http://getmangos.com/wiki[wiki] for more details + +Get the sources +~~~~~~~~~~~~~~~ + +Clone ScriptDev2 `git clone git://github.com/scriptdev2/scriptdev2.git ScriptDev2` - execute from within src/bindings directory + +*MS Windows:* + +Compile ScriptDev2 using the scriptVC80, scriptVC90 or scriptVC100 Solution within the ScriptDev2 folder (this will overwrite the Mangoscript dll in the output directory) + +*GNU/Linux or CMake:* + +Apply the Git patch to Mangos - `git am src/bindings/ScriptDev2/patches/MaNGOS-11167-ScriptDev2.patch` + +Compile MaNGOS (ScriptDev2 will automatically be built when compiling Mangos from here on) + + +Handle the databases +~~~~~~~~~~~~~~~~~~~~ + +Create ScriptDev2-Database:: +Execute `sql\scriptdev2_create_database.sql` , then execute + +`sql\scriptdev2_create_structure.sql` on that database. +Add content to ScriptDev2-Database:: +Execute `sql\scriptdev2_script_full.sql` on scriptdev2 databse +Update ScriptNames:: +Execute `sql\mangos_scriptname_full.sql` on your MaNGOS world Database + +Configuration files +~~~~~~~~~~~~~~~~~~~ + +Place the included "scriptdev2.conf" file within the directory containing your "mangosd.conf" and "realmd.conf" files. + +You may need to change this file to match the database you created and any custom settings you wish to use. + +Note this file will be differently created for Unix based systems. + +Run mangosd +~~~~~~~~~~~ + +Run mangosd from your output directory. If you use another directory to run mangos, you need (on windows) copy the mangosscript.dll to that directory before starting mangosd. + + +How to Update ScriptDev2 +------------------------ + +. Enter src/bindings/ScriptDev2 directory (with git-bash) +. Update ScriptDev2 with `git pull` +. Compile ScriptDev2 + + On _windows_ you must still compile MaNGOS before ScriptDev2 +. Update your Database with new Scriptdev2 SQL changes. For this you can either: + * apply only the changes that were made during that revision by looking in the sql\update folder or (files named rXXX_scriptdev2.sql should be executed on the scriptdev2 db while rXXX_mangos.sql should be executed on your mangos db) + * reapply "mangos_scriptname_full.sql" to your MaNGOS database. - WARNING this will NOT include removed script names! + +ScriptDev2 Change Log +--------------------- + +You can view the ScriptDev2 change log on the https://github.com/scriptdev2/scriptdev2/commits/master[ScriptDev2 Github Repository]. + +Or of course locally with your Git GUI tools or with `git log` (Note that it should be up to date before looking into your local log) diff --git a/docs/Script Layout.txt b/docs/Script_Layout.txt similarity index 100% rename from docs/Script Layout.txt rename to docs/Script_Layout.txt diff --git a/docs/aaa_Overview.html b/docs/aaa_Overview.html new file mode 100644 index 000000000..41169a948 --- /dev/null +++ b/docs/aaa_Overview.html @@ -0,0 +1,792 @@ + + + + + +Overview of ScriptDev2 Documentation Section + + + + + +
+
+

1. License

+
+

ScriptDev2 is GPL Software, you can find the GNU General Public License here.

+
+
+
+

2. Basic Installation instructions

+
+

See How to install for basic instructions

+
+
+
+ +
+

Easy use of Git - Look here if you are new to Git

+

Normal use of Git - Look here if you want to do basic work with Git

+

Advanced use of Git - Look here if you want to dig deeper into Git, this also contains some configuration settings for Git

+
+
+
+

4. Old documentation files

+
+
+
+Script_Layout.txt +
+
+

+Information about the subfolders of the scripts directory +

+
+
+Text-tables.txt +
+
+

+Documentation of the layout of the tables script_texts and custom_texts +

+
+
+
+
+
+

+ + + diff --git a/docs/aaa_Overview.txt b/docs/aaa_Overview.txt new file mode 100644 index 000000000..007e0fd34 --- /dev/null +++ b/docs/aaa_Overview.txt @@ -0,0 +1,30 @@ +Overview of ScriptDev2 Documentation Section +============================================ + +License +------- + +ScriptDev2 is GPL Software, you can find the link:LICENSE.txt[GNU General Public License] here. + + +Basic Installation instructions +------------------------------- + +See link:How_to_install.html[How to install] for basic instructions + + +Various Guides related to Git +----------------------------- + +link:GIT_guide_1_easy_use.html[Easy use of Git] - Look here if you are new to Git + +link:GIT_guide_2_normal_use.html[Normal use of Git] - Look here if you want to do basic work with Git + +link:GIT_guide_3_advanced_use.html[Advanced use of Git] - Look here if you want to dig deeper into Git, this also contains some configuration settings for Git + +Old documentation files +----------------------- + +link:Script_Layout.txt[] :: Information about the subfolders of the `scripts` directory + +link:Text-tables.txt[] :: Documentation of the layout of the tables script_texts and custom_texts diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index deef6426d..2c384074a 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2545" + #define SD2_REVISION_NR "2546" #endif // __SD2_REVISION_NR_H__ From 5f6a20cc1e83d268a903cfd761f55d9accb52e54 Mon Sep 17 00:00:00 2001 From: NeatElves Date: Fri, 11 May 2012 00:36:40 +0300 Subject: [PATCH 0535/1172] [2547] Remove some taxi scripts - will be handled by database Signed-off-by: Xfurry --- .../old_hillsbrad/old_hillsbrad.cpp | 47 +----- scripts/northrend/dragonblight.cpp | 145 +----------------- scripts/outland/netherstorm.cpp | 41 ----- scripts/outland/shadowmoon_valley.cpp | 24 --- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 6 - sql/updates/r2547_mangos.sql | 6 + 7 files changed, 11 insertions(+), 260 deletions(-) create mode 100644 sql/updates/r2547_mangos.sql diff --git a/scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.cpp b/scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.cpp index bb6be5ffd..c25099f03 100644 --- a/scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.cpp +++ b/scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.cpp @@ -22,7 +22,6 @@ SDCategory: Caverns of Time, Old Hillsbrad Foothills EndScriptData */ /* ContentData -npc_brazen npc_erozion npc_thrall_old_hillsbrad npc_taretha @@ -47,43 +46,6 @@ struct MANGOS_DLL_DECL npc_tarethaAI : public npc_escortAI void UpdateEscortAI(const uint32 uiDiff); }; -/*###### -## npc_brazen -######*/ - -enum -{ - GOSSIP_ID_UNKNOWN_TEXT = -1000000, - GOSSIP_ITEM_READY = -3560000, - - TEXT_ID_HAS_BOMBS = 9780, - ITEM_ENTRY_BOMBS = 25853, - - TAXI_PATH_ID = 534 -}; - -bool GossipHello_npc_brazen(Player* pPlayer, Creature* pCreature) -{ - pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_READY, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); - return true; -} - -bool GossipSelect_npc_brazen(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) -{ - if (uiAction == GOSSIP_ACTION_INFO_DEF+1) - { - if (!pPlayer->HasItemCount(ITEM_ENTRY_BOMBS, 1)) - pPlayer->SEND_GOSSIP_MENU(TEXT_ID_HAS_BOMBS, pCreature->GetObjectGuid()); - else - { - pPlayer->CLOSE_GOSSIP_MENU(); - pPlayer->ActivateTaxiPathTo(TAXI_PATH_ID); - } - } - return true; -} - /*###### ## npc_erozion ######*/ @@ -93,6 +55,9 @@ enum GOSSIP_ITEM_NEED_BOMBS = -3560001, TEXT_ID_DEFAULT = 9778, TEXT_ID_GOT_ITEM = 9515, + + GOSSIP_ID_UNKNOWN_TEXT = -1000000, + ITEM_ENTRY_BOMBS = 25853, }; bool GossipHello_npc_erozion(Player* pPlayer, Creature* pCreature) @@ -864,12 +829,6 @@ void AddSC_old_hillsbrad() { Script* pNewScript; - pNewScript = new Script; - pNewScript->Name = "npc_brazen"; - pNewScript->pGossipHello = &GossipHello_npc_brazen; - pNewScript->pGossipSelect = &GossipSelect_npc_brazen; - pNewScript->RegisterSelf(); - pNewScript = new Script; pNewScript->Name = "npc_erozion"; pNewScript->pGossipHello = &GossipHello_npc_erozion; diff --git a/scripts/northrend/dragonblight.cpp b/scripts/northrend/dragonblight.cpp index a745f6776..a7760675f 100644 --- a/scripts/northrend/dragonblight.cpp +++ b/scripts/northrend/dragonblight.cpp @@ -17,60 +17,17 @@ /* ScriptData SDName: Dragonblight SD%Complete: 100 -SDComment: Quest support: 12166, 12261. Taxi paths Wyrmrest temple. +SDComment: Quest support: 12166, 12261. SDCategory: Dragonblight EndScriptData */ /* ContentData -npc_afrasastrasz npc_destructive_ward -npc_tariolstrasz -npc_torastrasza EndContentData */ #include "precompiled.h" /*###### -## npc_afrasastrasz -######*/ - -enum -{ - TAXI_PATH_ID_MIDDLE_DOWN = 882, - TAXI_PATH_ID_MIDDLE_TOP = 881 -}; - -#define GOSSIP_ITEM_TAXI_MIDDLE_DOWN "I would like to take a flight to the ground, Lord Of Afrasastrasz." -#define GOSSIP_ITEM_TAXI_MIDDLE_TOP "My Lord, I must go to the upper floor of the temple." - -bool GossipHello_npc_afrasastrasz(Player* pPlayer, Creature* pCreature) -{ - if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); - - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_TAXI_MIDDLE_DOWN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_TAXI_MIDDLE_TOP, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); - - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); - return true; -} - -bool GossipSelect_npc_afrasastrasz(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) -{ - if (uiAction == GOSSIP_ACTION_INFO_DEF+1) - { - pPlayer->CLOSE_GOSSIP_MENU(); - pPlayer->ActivateTaxiPathTo(TAXI_PATH_ID_MIDDLE_DOWN); - } - if (uiAction == GOSSIP_ACTION_INFO_DEF+2) - { - pPlayer->CLOSE_GOSSIP_MENU(); - pPlayer->ActivateTaxiPathTo(TAXI_PATH_ID_MIDDLE_TOP); - } - return true; -} - -/*##### # npc_destructive_ward #####*/ @@ -207,112 +164,12 @@ CreatureAI* GetAI_npc_destructive_ward(Creature* pCreature) return new npc_destructive_wardAI(pCreature); } -/*###### -## npc_tariolstrasz -######*/ - -enum -{ - QUEST_INFORM_QUEEN_A = 12123, //need to check if quests are required before gossip available - QUEST_INFORM_QUEEN_H = 12124, - TAXI_PATH_ID_BOTTOM_TOP = 878, - TAXI_PATH_ID_BOTTOM_MIDDLE = 883 -}; - -#define GOSSIP_ITEM_TAXI_BOTTOM_TOP "My Lord, I must go to the upper floor of the temple." -#define GOSSIP_ITEM_TAXI_BOTTOM_MIDDLE "Can you spare a drake to travel to Lord Of Afrasastrasz, in the middle of the temple?" - -bool GossipHello_npc_tariolstrasz(Player* pPlayer, Creature* pCreature) -{ - if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); - - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_TAXI_BOTTOM_TOP, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_TAXI_BOTTOM_MIDDLE, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); - - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); - return true; -} - -bool GossipSelect_npc_tariolstrasz(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) -{ - if (uiAction == GOSSIP_ACTION_INFO_DEF+1) - { - pPlayer->CLOSE_GOSSIP_MENU(); - pPlayer->ActivateTaxiPathTo(TAXI_PATH_ID_BOTTOM_TOP); - } - if (uiAction == GOSSIP_ACTION_INFO_DEF+2) - { - pPlayer->CLOSE_GOSSIP_MENU(); - pPlayer->ActivateTaxiPathTo(TAXI_PATH_ID_BOTTOM_MIDDLE); - } - return true; -} - -/*###### -## npc_torastrasza -######*/ - -enum -{ - TAXI_PATH_ID_TOP_MIDDLE = 880, - TAXI_PATH_ID_TOP_BOTTOM = 879 -}; - -#define GOSSIP_ITEM_TAXI_TOP_MIDDLE "I would like to see Lord Of Afrasastrasz, in the middle of the temple." -#define GOSSIP_ITEM_TAXI_TOP_BOTTOM "Yes, Please. I would like to return to the ground floor of the temple." - -bool GossipHello_npc_torastrasza(Player* pPlayer, Creature* pCreature) -{ - if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); - - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_TAXI_TOP_MIDDLE, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_TAXI_TOP_BOTTOM, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); - - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); - return true; -} - -bool GossipSelect_npc_torastrasza(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) -{ - if (uiAction == GOSSIP_ACTION_INFO_DEF+1) - { - pPlayer->CLOSE_GOSSIP_MENU(); - pPlayer->ActivateTaxiPathTo(TAXI_PATH_ID_TOP_MIDDLE); - } - if (uiAction == GOSSIP_ACTION_INFO_DEF+2) - { - pPlayer->CLOSE_GOSSIP_MENU(); - pPlayer->ActivateTaxiPathTo(TAXI_PATH_ID_TOP_BOTTOM); - } - return true; -} - void AddSC_dragonblight() { Script* pNewScript; - pNewScript = new Script; - pNewScript->Name = "npc_afrasastrasz"; - pNewScript->pGossipHello = &GossipHello_npc_afrasastrasz; - pNewScript->pGossipSelect = &GossipSelect_npc_afrasastrasz; - pNewScript->RegisterSelf(); - pNewScript = new Script; pNewScript->Name = "npc_destructive_ward"; pNewScript->GetAI = &GetAI_npc_destructive_ward; pNewScript->RegisterSelf(); - - pNewScript = new Script; - pNewScript->Name = "npc_tariolstrasz"; - pNewScript->pGossipHello = &GossipHello_npc_tariolstrasz; - pNewScript->pGossipSelect = &GossipSelect_npc_tariolstrasz; - pNewScript->RegisterSelf(); - - pNewScript = new Script; - pNewScript->Name = "npc_torastrasza"; - pNewScript->pGossipHello = &GossipHello_npc_torastrasza; - pNewScript->pGossipSelect = &GossipSelect_npc_torastrasza; - pNewScript->RegisterSelf(); } diff --git a/scripts/outland/netherstorm.cpp b/scripts/outland/netherstorm.cpp index 13526d09f..b6456485c 100644 --- a/scripts/outland/netherstorm.cpp +++ b/scripts/outland/netherstorm.cpp @@ -25,7 +25,6 @@ EndScriptData */ npc_manaforge_control_console go_manaforge_control_console npc_commander_dawnforge -npc_protectorate_nether_drake npc_bessy npc_maxx_a_million EndContentData */ @@ -618,39 +617,6 @@ bool AreaTrigger_at_commander_dawnforge(Player* pPlayer, AreaTriggerEntry const* return false; } -/*###### -## npc_protectorate_nether_drake -######*/ - -enum -{ - QUEST_NETHER_WINGS = 10438, - ITEM_PH_DISRUPTOR = 29778, - TAXI_PATH_ID = 627 //(possibly 627+628(152->153->154->155)) -}; - -#define GOSSIP_ITEM_FLY_ULTRIS "Fly me to Ultris" - -bool GossipHello_npc_protectorate_nether_drake(Player* pPlayer, Creature* pCreature) -{ - // On Nethery Wings - if (pPlayer->GetQuestStatus(QUEST_NETHER_WINGS) == QUEST_STATUS_INCOMPLETE && pPlayer->HasItemCount(ITEM_PH_DISRUPTOR, 1)) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_FLY_ULTRIS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); - return true; -} - -bool GossipSelect_npc_protectorate_nether_drake(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) -{ - if (uiAction == GOSSIP_ACTION_INFO_DEF+1) - { - pPlayer->CLOSE_GOSSIP_MENU(); - pPlayer->ActivateTaxiPathTo(TAXI_PATH_ID); - } - return true; -} - /*###### ## npc_bessy ######*/ @@ -938,13 +904,6 @@ void AddSC_netherstorm() pNewScript->pAreaTrigger = &AreaTrigger_at_commander_dawnforge; pNewScript->RegisterSelf(); - pNewScript = new Script; - pNewScript->Name = "npc_protectorate_nether_drake"; - pNewScript->pGossipHello = &GossipHello_npc_protectorate_nether_drake; - pNewScript->pGossipSelect = &GossipSelect_npc_protectorate_nether_drake; - pNewScript->RegisterSelf(); - - pNewScript = new Script; pNewScript->Name = "npc_bessy"; pNewScript->GetAI = &GetAI_npc_bessy; diff --git a/scripts/outland/shadowmoon_valley.cpp b/scripts/outland/shadowmoon_valley.cpp index 57c836a09..c5f94fb66 100644 --- a/scripts/outland/shadowmoon_valley.cpp +++ b/scripts/outland/shadowmoon_valley.cpp @@ -26,7 +26,6 @@ mob_mature_netherwing_drake mob_enslaved_netherwing_drake npc_dragonmaw_peon npc_drake_dealer_hurlunk -npc_karynaku npc_wilda mob_torloth npc_lord_illidan_stormrage @@ -470,24 +469,6 @@ bool GossipSelect_npc_drake_dealer_hurlunk(Player* pPlayer, Creature* pCreature, } /*#### -# npc_karynaku -####*/ - -enum -{ - QUEST_ALLY_OF_NETHER = 10870, - TAXI_PATH_ID = 649 -}; - -bool QuestAccept_npc_karynaku(Player* pPlayer, Creature* pCreature, const Quest* pQuest) -{ - if (pQuest->GetQuestId() == QUEST_ALLY_OF_NETHER) - pPlayer->ActivateTaxiPathTo(TAXI_PATH_ID); - - return true; -} - -/*###### # npc_wilda ######*/ @@ -1703,11 +1684,6 @@ void AddSC_shadowmoon_valley() pNewScript->pGossipSelect = &GossipSelect_npc_drake_dealer_hurlunk; pNewScript->RegisterSelf(); - pNewScript = new Script; - pNewScript->Name = "npc_karynaku"; - pNewScript->pQuestAcceptNPC = &QuestAccept_npc_karynaku; - pNewScript->RegisterSelf(); - pNewScript = new Script; pNewScript->Name = "npc_wilda"; pNewScript->GetAI = &GetAI_npc_wilda; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 2c384074a..5d58b4f52 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2546" + #define SD2_REVISION_NR "2547" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 2d72c6bd5..9861fa075 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -420,7 +420,6 @@ UPDATE creature_template SET ScriptName='boss_lieutenant_drake' WHERE entry=1784 UPDATE creature_template SET ScriptName='boss_epoch_hunter' WHERE entry=18096; UPDATE creature_template SET ScriptName='boss_captain_skarloc' WHERE entry=17862; UPDATE gameobject_template SET ScriptName='go_barrel_old_hillsbrad' WHERE entry=182589; -UPDATE creature_template SET ScriptName='npc_brazen' WHERE entry=18725; UPDATE creature_template SET ScriptName='npc_erozion' WHERE entry=18723; UPDATE creature_template SET ScriptName='npc_taretha' WHERE entry=18887; UPDATE creature_template SET ScriptName='npc_thrall_old_hillsbrad' WHERE entry=17876; @@ -532,10 +531,7 @@ UPDATE creature_template SET ScriptName='npc_melizza_brimbuzzle' WHERE entry=122 UPDATE instance_template SET ScriptName='instance_dire_maul' WHERE map=429; /* DRAGONBLIGHT */ -UPDATE creature_template SET ScriptName='npc_afrasastrasz' WHERE entry=27575; UPDATE creature_template SET ScriptName='npc_destructive_ward' WHERE entry=27430; -UPDATE creature_template SET ScriptName='npc_tariolstrasz' WHERE entry=26443; -UPDATE creature_template SET ScriptName='npc_torastrasza' WHERE entry=26949; /* DRAK'THARON KEEP */ UPDATE creature_template SET ScriptName='boss_novos' WHERE entry=26631; @@ -867,7 +863,6 @@ INSERT INTO scripted_areatrigger VALUES (4497,'at_commander_dawnforge'); UPDATE gameobject_template SET ScriptName='go_manaforge_control_console' WHERE entry IN (183770,183956,184311,184312); UPDATE creature_template SET ScriptName='npc_manaforge_control_console' WHERE entry IN (20209,20417,20418,20440); UPDATE creature_template SET ScriptName='npc_commander_dawnforge' WHERE entry=19831; -UPDATE creature_template SET ScriptName='npc_protectorate_nether_drake' WHERE entry=20903; UPDATE creature_template SET ScriptName='npc_bessy' WHERE entry=20415; UPDATE creature_template SET ScriptName='npc_maxx_a_million' WHERE entry=19589; UPDATE creature_template SET ScriptName='npc_zeppit' WHERE entry=22484; @@ -987,7 +982,6 @@ UPDATE creature_template SET ScriptName='npc_drake_dealer_hurlunk' WHERE entry=2 UPDATE creature_template SET ScriptName='npc_dragonmaw_peon' WHERE entry=22252; UPDATE creature_template SET ScriptName='mob_mature_netherwing_drake' WHERE entry=21648; UPDATE creature_template SET ScriptName='mob_enslaved_netherwing_drake' WHERE entry=21722; -UPDATE creature_template SET ScriptName='npc_karynaku' WHERE entry=22112; UPDATE creature_template SET ScriptName='npc_wilda' WHERE entry=21027; UPDATE creature_template SET ScriptName='mob_torloth' WHERE entry=22076; UPDATE creature_template SET ScriptName='npc_totem_of_spirits' WHERE entry=21071; diff --git a/sql/updates/r2547_mangos.sql b/sql/updates/r2547_mangos.sql new file mode 100644 index 000000000..a0a0922fb --- /dev/null +++ b/sql/updates/r2547_mangos.sql @@ -0,0 +1,6 @@ +UPDATE creature_template SET ScriptName='' WHERE entry=18725; +UPDATE creature_template SET ScriptName='' WHERE entry=26443; +UPDATE creature_template SET ScriptName='' WHERE entry=26949; +UPDATE creature_template SET ScriptName='' WHERE entry=27575; +UPDATE creature_template SET ScriptName='' WHERE entry=20903; +UPDATE creature_template SET ScriptName='' WHERE entry=22112; From ff7d3fea62cc078a398acc2d784a2f925f9d7a8f Mon Sep 17 00:00:00 2001 From: NeatElves Date: Sun, 13 May 2012 12:18:17 +0300 Subject: [PATCH 0536/1172] [2548] Remove obsolete gossip item from database Signed-off-by: Xfurry --- sd2_revision_nr.h | 2 +- sql/scriptdev2_script_full.sql | 1 - sql/updates/r2548_scriptdev2.sql | 1 + 3 files changed, 2 insertions(+), 2 deletions(-) create mode 100644 sql/updates/r2548_scriptdev2.sql diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 5d58b4f52..ce4ec0070 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2547" + #define SD2_REVISION_NR "2548" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 969ebbfb8..2a8839e70 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -4146,7 +4146,6 @@ INSERT INTO gossip_texts (entry,content_default,comment) VALUES -- -3 560 000 ESCAPE FROM DURNHOLDE (OLD HILLSBRAD) INSERT INTO gossip_texts (entry,content_default,comment) VALUES -(-3560000,'I am ready to go to Durnholde Keep.','brazen GOSSIP_ITEM_READY'), (-3560001,'I need a pack of Incendiary Bombs.','erozion GOSSIP_ITEM_NEED_BOMBS'), (-3560002,'Taretha cannot see you, Thrall.','thrall GOSSIP_ITEM_SKARLOC1'), (-3560003,'The situation is rather complicated, Thrall. It would be best for you to head into the mountains now, before more of Blackmoore\'s men show up. We\'ll make sure Taretha is safe.','thrall GOSSIP_ITEM_SKARLOC2'), diff --git a/sql/updates/r2548_scriptdev2.sql b/sql/updates/r2548_scriptdev2.sql new file mode 100644 index 000000000..415fe1380 --- /dev/null +++ b/sql/updates/r2548_scriptdev2.sql @@ -0,0 +1 @@ +DELETE FROM gossip_texts WHERE entry=-3560000; From c72330b415c9a94ecbd0ab420477c8dc9af37fe8 Mon Sep 17 00:00:00 2001 From: miebaik Date: Mon, 14 May 2012 21:20:55 +0300 Subject: [PATCH 0537/1172] [2549] Implement trash waves event for Nalorakk -Zul'Aman Based on the work of Rowman Signed-off-by: Xfurry --- .../zulaman/boss_nalorakk.cpp | 77 ++++++++++++---- .../zulaman/instance_zulaman.cpp | 90 +++++++++++++++++++ scripts/eastern_kingdoms/zulaman/zulaman.h | 45 +++++++++- sd2_revision_nr.h | 2 +- 4 files changed, 197 insertions(+), 17 deletions(-) diff --git a/scripts/eastern_kingdoms/zulaman/boss_nalorakk.cpp b/scripts/eastern_kingdoms/zulaman/boss_nalorakk.cpp index 07925ef87..44e68ac9a 100644 --- a/scripts/eastern_kingdoms/zulaman/boss_nalorakk.cpp +++ b/scripts/eastern_kingdoms/zulaman/boss_nalorakk.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: Boss_Nalorakk -SD%Complete: 80 -SDComment: Todo: Trash Waves +SD%Complete: 95 +SDComment: Small adjustments may be required SDCategory: Zul'Aman EndScriptData */ @@ -26,11 +26,6 @@ EndScriptData */ enum { - SAY_WAVE1_AGGRO = -1568010, - SAY_WAVE2_STAIR1 = -1568011, - SAY_WAVE3_STAIR2 = -1568012, - SAY_WAVE4_PLATFORM = -1568013, - SAY_EVENT1_SACRIFICE = -1568014, SAY_EVENT2_SACRIFICE = -1568015, @@ -61,11 +56,12 @@ struct MANGOS_DLL_DECL boss_nalorakkAI : public ScriptedAI { boss_nalorakkAI(Creature* pCreature) : ScriptedAI(pCreature) { - m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_pInstance = (instance_zulaman*)pCreature->GetInstanceData(); + m_uiCurrentWave = 0; Reset(); } - ScriptedInstance* m_pInstance; + instance_zulaman* m_pInstance; uint32 m_uiChangeFormTimer; uint32 m_uiBrutalSwipeTimer; @@ -75,6 +71,7 @@ struct MANGOS_DLL_DECL boss_nalorakkAI : public ScriptedAI uint32 m_uiRendFleshTimer; uint32 m_uiDeafeningRoarTimer; uint32 m_uiBerserkTimer; + uint8 m_uiCurrentWave; bool m_bIsInBearForm; void Reset() @@ -90,6 +87,62 @@ struct MANGOS_DLL_DECL boss_nalorakkAI : public ScriptedAI m_bIsInBearForm = false; } + void MoveInLineOfSight(Unit* pWho) + { + ScriptedAI::MoveInLineOfSight(pWho); + + if (m_pInstance && m_pInstance->IsBearPhaseInProgress()) + return; + + if (pWho->GetTypeId() == TYPEID_PLAYER && !((Player*)pWho)->isGameMaster() && m_creature->IsWithinDistInMap(pWho, aBearEventInfo[m_uiCurrentWave].fAggroDist)) + { + DoScriptText(aBearEventInfo[m_uiCurrentWave].iYellId, m_creature); + if (m_pInstance) + m_pInstance->SendNextBearWave(pWho); + } + } + + void MovementInform(uint32 uiMotionType, uint32 uiPointId) + { + if (uiMotionType != POINT_MOTION_TYPE) + return; + + if (uiPointId) + { + m_creature->SetFacingTo(aBearEventInfo[m_uiCurrentWave].fO); + + if (m_uiCurrentWave < MAX_BEAR_WAVES - 1) + { + if (m_pInstance) + m_pInstance->SetBearEventProgress(false); + ++m_uiCurrentWave; + } + else + { + // Set the instance data to fail on movement inform because we are not moving the boss to home position + if (m_pInstance) + m_pInstance->SetData(TYPE_NALORAKK, FAIL); + } + } + } + + // Nalorakk evades only after the trash waves are finished + void EnterEvadeMode() + { + m_creature->RemoveAllAuras(); + m_creature->DeleteThreatList(); + m_creature->CombatStop(true); + m_creature->LoadCreatureAddon(true); + + // Boss should evade on the top of the platform + if (m_creature->isAlive()) + m_creature->GetMotionMaster()->MovePoint(1, aBearEventInfo[m_uiCurrentWave].fX, aBearEventInfo[m_uiCurrentWave].fY, aBearEventInfo[m_uiCurrentWave].fZ); + + m_creature->SetLootRecipient(NULL); + + Reset(); + } + void Aggro(Unit* pWho) { DoScriptText(SAY_AGGRO, m_creature); @@ -113,12 +166,6 @@ struct MANGOS_DLL_DECL boss_nalorakkAI : public ScriptedAI m_pInstance->SetData(TYPE_NALORAKK, DONE); } - void JustReachedHome() - { - if (m_pInstance) - m_pInstance->SetData(TYPE_NALORAKK, FAIL); - } - void UpdateAI(const uint32 uiDiff) { // Return since we have no target diff --git a/scripts/eastern_kingdoms/zulaman/instance_zulaman.cpp b/scripts/eastern_kingdoms/zulaman/instance_zulaman.cpp index 06c5203fc..c6720d191 100644 --- a/scripts/eastern_kingdoms/zulaman/instance_zulaman.cpp +++ b/scripts/eastern_kingdoms/zulaman/instance_zulaman.cpp @@ -27,6 +27,8 @@ EndScriptData */ instance_zulaman::instance_zulaman(Map* pMap) : ScriptedInstance(pMap), m_uiEventTimer(MINUTE*IN_MILLISECONDS), m_uiGongCount(0), + m_uiBearEventPhase(0), + m_bIsBearPhaseInProgress(false), m_uiEggsRemainingCount_Left(20), m_uiEggsRemainingCount_Right(20) @@ -58,6 +60,7 @@ void instance_zulaman::OnCreatureCreate(Creature* pCreature) { case NPC_AKILZON: case NPC_HALAZZI: + case NPC_NALORAKK: case NPC_MALACRASS: case NPC_HARRISON: case NPC_SPIRIT_LYNX: @@ -77,6 +80,70 @@ void instance_zulaman::OnCreatureCreate(Creature* pCreature) if (m_auiEncounter[TYPE_JANALAI] != DONE) m_lEggsGUIDList.push_back(pCreature->GetObjectGuid()); break; + + case NPC_MEDICINE_MAN: + case NPC_TRIBES_MAN: + case NPC_WARBRINGER: + case NPC_AXETHROWER: + if (pCreature->GetPositionZ() > 10.0f && pCreature->GetPositionZ() < 15.0f) + m_aNalorakkEvent[0].sBearTrashGuidSet.insert(pCreature->GetObjectGuid()); + else if (pCreature->GetPositionZ() > 25.0f && pCreature->GetPositionZ() < 30.0f) + m_aNalorakkEvent[1].sBearTrashGuidSet.insert(pCreature->GetObjectGuid()); + else if (pCreature->GetPositionZ() > 40.0f && pCreature->GetPositionZ() < 41.0f) + m_aNalorakkEvent[2].sBearTrashGuidSet.insert(pCreature->GetObjectGuid()); + else if (pCreature->GetPositionZ() > 41.0f) + m_aNalorakkEvent[3].sBearTrashGuidSet.insert(pCreature->GetObjectGuid()); + break; + } +} + +void instance_zulaman::OnCreatureDeath(Creature* pCreature) +{ + switch(pCreature->GetEntry()) + { + case NPC_MEDICINE_MAN: + case NPC_TRIBES_MAN: + case NPC_WARBRINGER: + case NPC_AXETHROWER: + if (m_aNalorakkEvent[m_uiBearEventPhase].sBearTrashGuidSet.find(pCreature->GetObjectGuid()) != m_aNalorakkEvent[m_uiBearEventPhase].sBearTrashGuidSet.end()) + { + ++m_aNalorakkEvent[m_uiBearEventPhase].uiTrashKilled; + if (m_aNalorakkEvent[m_uiBearEventPhase].uiTrashKilled == m_aNalorakkEvent[m_uiBearEventPhase].sBearTrashGuidSet.size()) + { + if (Creature* pNalorakk = GetSingleCreatureFromStorage(NPC_NALORAKK)) + { + ++m_uiBearEventPhase; + if (m_uiBearEventPhase == MAX_BEAR_WAVES) + pNalorakk->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PASSIVE); + else + { + pNalorakk->SetWalk(false); + pNalorakk->GetMotionMaster()->MovePoint(1, aBearEventInfo[m_uiBearEventPhase].fX, aBearEventInfo[m_uiBearEventPhase].fY, aBearEventInfo[m_uiBearEventPhase].fZ); + } + } + } + } + break; + } +} + +void instance_zulaman::OnCreatureEvade(Creature* pCreature) +{ + switch(pCreature->GetEntry()) + { + case NPC_MEDICINE_MAN: + case NPC_TRIBES_MAN: + case NPC_WARBRINGER: + case NPC_AXETHROWER: + for (GUIDSet::const_iterator itr = m_aNalorakkEvent[m_uiBearEventPhase].sBearTrashGuidSet.begin(); itr != m_aNalorakkEvent[m_uiBearEventPhase].sBearTrashGuidSet.end(); ++itr) + { + Creature* pTemp = instance->GetCreature(*itr); + if (pTemp && !pTemp->isAlive()) + pTemp->Respawn(); + } + m_aNalorakkEvent[m_uiBearEventPhase].uiTrashKilled = 0; + m_bIsBearPhaseInProgress = false; + break; } } @@ -326,6 +393,29 @@ uint32 instance_zulaman::GetData(uint32 uiType) } } +void instance_zulaman::SendNextBearWave(Unit* pTarget) +{ + for (GUIDSet::const_iterator itr = m_aNalorakkEvent[m_uiBearEventPhase].sBearTrashGuidSet.begin(); itr != m_aNalorakkEvent[m_uiBearEventPhase].sBearTrashGuidSet.end(); ++itr) + { + Creature* pTemp = instance->GetCreature(*itr); + if (pTemp && pTemp->isAlive()) + { + pTemp->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PASSIVE); + pTemp->AI()->AttackStart(pTarget); + + // For the first wave we need to make them jump to the ground before attacking + if (!m_uiBearEventPhase) + { + float fX, fY, fZ; + pTemp->GetRandomPoint(35.31f, 1412.24f, 2.04f, 3.0f, fX, fY, fZ); + pTemp->GetMotionMaster()->MoveJump(fX, fY, fZ, pTemp->GetSpeed(MOVE_RUN)*2, 5.0f); + } + } + } + + m_bIsBearPhaseInProgress = true; +} + uint8 instance_zulaman::GetKilledPreBosses() { return (m_auiEncounter[TYPE_AKILZON] == DONE ? 1 : 0) + (m_auiEncounter[TYPE_NALORAKK] == DONE ? 1 : 0) + (m_auiEncounter[TYPE_JANALAI] == DONE ? 1 : 0) + (m_auiEncounter[TYPE_HALAZZI] == DONE ? 1 : 0); diff --git a/scripts/eastern_kingdoms/zulaman/zulaman.h b/scripts/eastern_kingdoms/zulaman/zulaman.h index 4a5fd0d21..22f856999 100644 --- a/scripts/eastern_kingdoms/zulaman/zulaman.h +++ b/scripts/eastern_kingdoms/zulaman/zulaman.h @@ -10,6 +10,7 @@ enum InstanceZA MAX_ENCOUNTER = 8, MAX_VENDOR = 2, MAX_CHESTS = 4, + MAX_BEAR_WAVES = 4, SAY_INST_RELEASE = -1568067, // TODO Event NYI SAY_INST_BEGIN = -1568068, @@ -24,6 +25,12 @@ enum InstanceZA SAY_INST_SACRIF2 = -1568077, SAY_INST_COMPLETE = -1568078, + // Bear event yells + SAY_WAVE1_AGGRO = -1568010, + SAY_WAVE2_STAIR1 = -1568011, + SAY_WAVE3_STAIR2 = -1568012, + SAY_WAVE4_PLATFORM = -1568013, + WORLD_STATE_ID = 3104, WORLD_STATE_COUNTER = 3106, @@ -43,12 +50,18 @@ enum InstanceZA TYPE_J_EGGS_LEFT = 11, NPC_AKILZON = 23574, - // NPC_NALORAKK = 23576, + NPC_NALORAKK = 23576, // NPC_JANALAI = 23578, NPC_HALAZZI = 23577, NPC_MALACRASS = 24239, // NPC_ZULJIN = 23863, + // Narolakk event npcs + NPC_MEDICINE_MAN = 23581, + NPC_TRIBES_MAN = 23582, + NPC_AXETHROWER = 23542, + NPC_WARBRINGER = 23580, + NPC_EGG = 23817, NPC_SPIRIT_LYNX = 24143, @@ -110,6 +123,26 @@ struct TimeEventNpcInfo ObjectGuid npGuid; }; +struct NalorakkBearEventInfo +{ + int iYellId; + float fX, fY, fZ, fO, fAggroDist; +}; + +static const NalorakkBearEventInfo aBearEventInfo[MAX_BEAR_WAVES] = +{ + {SAY_WAVE1_AGGRO, 0, 0, 0, 0, 45.0f}, + {SAY_WAVE2_STAIR1, -54.948f, 1419.772f, 27.303f, 0.03f, 37.0f}, + {SAY_WAVE3_STAIR2, -80.303f, 1372.622f, 40.764f, 1.67f, 35.0f}, + {SAY_WAVE4_PLATFORM, -77.495f, 1294.760f, 48.487f, 1.66f, 60.0f} +}; + +struct NalorakkTrashInfo +{ + GUIDSet sBearTrashGuidSet; + uint8 uiTrashKilled; +}; + class MANGOS_DLL_DECL instance_zulaman : public ScriptedInstance { public: @@ -120,6 +153,8 @@ class MANGOS_DLL_DECL instance_zulaman : public ScriptedInstance void OnCreatureCreate(Creature* pCreature); void OnObjectCreate(GameObject* pGo); + void OnCreatureDeath(Creature* pCreature); + void OnCreatureEvade(Creature* pCreature); void SetData(uint32 uiType, uint32 uiData); uint32 GetData(uint32 uiType); @@ -127,6 +162,10 @@ class MANGOS_DLL_DECL instance_zulaman : public ScriptedInstance const char* Save() { return m_strInstData.c_str(); } void Load(const char* chrIn); + bool IsBearPhaseInProgress() { return m_bIsBearPhaseInProgress; } + void SetBearEventProgress(bool bIsInProgress) { m_bIsBearPhaseInProgress = bIsInProgress; } + void SendNextBearWave(Unit* pTarget); + void Update(uint32 uiDiff); private: @@ -142,6 +181,10 @@ class MANGOS_DLL_DECL instance_zulaman : public ScriptedInstance uint32 m_uiEventTimer; uint32 m_uiGongCount; + NalorakkTrashInfo m_aNalorakkEvent[MAX_BEAR_WAVES]; + uint8 m_uiBearEventPhase; + bool m_bIsBearPhaseInProgress; + GUIDList m_lEggsGUIDList; uint32 m_uiEggsRemainingCount_Left; uint32 m_uiEggsRemainingCount_Right; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index ce4ec0070..d58047bc6 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2548" + #define SD2_REVISION_NR "2549" #endif // __SD2_REVISION_NR_H__ From 35dce5ce439f89927357898b36526622f5851725 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Mon, 14 May 2012 23:57:16 +0300 Subject: [PATCH 0538/1172] [2550] Improve script for Steamvault Allow instance to save the encounters Proper handle gameobjects Proper reset the Naga Distillers on event FAIL --- .../steam_vault/boss_warlord_kalithresh.cpp | 4 - .../steam_vault/instance_steam_vault.cpp | 97 ++++++++++++++----- .../steam_vault/steam_vault.h | 12 ++- sd2_revision_nr.h | 2 +- 4 files changed, 84 insertions(+), 31 deletions(-) diff --git a/scripts/outland/coilfang_reservoir/steam_vault/boss_warlord_kalithresh.cpp b/scripts/outland/coilfang_reservoir/steam_vault/boss_warlord_kalithresh.cpp index d18d66fd8..59f056856 100644 --- a/scripts/outland/coilfang_reservoir/steam_vault/boss_warlord_kalithresh.cpp +++ b/scripts/outland/coilfang_reservoir/steam_vault/boss_warlord_kalithresh.cpp @@ -141,9 +141,7 @@ struct MANGOS_DLL_DECL boss_warlord_kalithreshAI : public ScriptedAI if (Creature* pDistiller = m_creature->GetMap()->GetCreature(m_distillerGuid)) { pDistiller->CastSpell(pDistiller, SPELL_WARLORDS_RAGE_NAGA, true); - // ToDo: check with DB if this is really needed pDistiller->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - pDistiller->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); } } } @@ -230,9 +228,7 @@ struct MANGOS_DLL_DECL mob_naga_distillerAI : public Scripted_NoMovementAI void Reset() { - // ToDo - move to DB m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); } void MoveInLineOfSight(Unit* pWho) { } diff --git a/scripts/outland/coilfang_reservoir/steam_vault/instance_steam_vault.cpp b/scripts/outland/coilfang_reservoir/steam_vault/instance_steam_vault.cpp index d0394f8c9..eb95de98e 100644 --- a/scripts/outland/coilfang_reservoir/steam_vault/instance_steam_vault.cpp +++ b/scripts/outland/coilfang_reservoir/steam_vault/instance_steam_vault.cpp @@ -35,15 +35,14 @@ bool GOUse_go_main_chambers_access_panel(Player* pPlayer, GameObject* pGo) ScriptedInstance* pInstance = (ScriptedInstance*)pGo->GetInstanceData(); if (!pInstance) - return false; + return true; - if (pGo->GetEntry() == GO_ACCESS_PANEL_HYDRO && pInstance->GetData(TYPE_HYDROMANCER_THESPIA) == DONE) + if (pGo->GetEntry() == GO_ACCESS_PANEL_HYDRO) pInstance->SetData(TYPE_HYDROMANCER_THESPIA, SPECIAL); - - if (pGo->GetEntry() == GO_ACCESS_PANEL_MEK && pInstance->GetData(TYPE_MEKGINEER_STEAMRIGGER) == DONE) + else if (pGo->GetEntry() == GO_ACCESS_PANEL_MEK) pInstance->SetData(TYPE_MEKGINEER_STEAMRIGGER, SPECIAL); - return true; + return false; } instance_steam_vault::instance_steam_vault(Map* pMap) : ScriptedInstance(pMap) @@ -64,6 +63,9 @@ void instance_steam_vault::OnCreatureCreate(Creature* pCreature) case NPC_KALITHRESH: m_mNpcEntryGuidStore[pCreature->GetEntry()] = pCreature->GetObjectGuid(); break; + case NPC_NAGA_DISTILLER: + m_lNagaDistillerGuidList.push_back(pCreature->GetObjectGuid()); + break; } } @@ -72,11 +74,21 @@ void instance_steam_vault::OnObjectCreate(GameObject* pGo) switch(pGo->GetEntry()) { case GO_MAIN_CHAMBERS_DOOR: + if (m_auiEncounter[TYPE_HYDROMANCER_THESPIA] == SPECIAL && m_auiEncounter[TYPE_MEKGINEER_STEAMRIGGER] == SPECIAL) + pGo->SetGoState(GO_STATE_ACTIVE); + break; case GO_ACCESS_PANEL_HYDRO: + if (m_auiEncounter[TYPE_HYDROMANCER_THESPIA] == DONE) + pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NO_INTERACT); + break; case GO_ACCESS_PANEL_MEK: - m_mGoEntryGuidStore[pGo->GetEntry()] = pGo->GetObjectGuid(); + if (m_auiEncounter[TYPE_MEKGINEER_STEAMRIGGER] == DONE) + pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NO_INTERACT); break; + default: + return; } + m_mGoEntryGuidStore[pGo->GetEntry()] = pGo->GetObjectGuid(); } void instance_steam_vault::OnCreatureDeath(Creature* pCreature) @@ -94,46 +106,85 @@ void instance_steam_vault::SetData(uint32 uiType, uint32 uiData) switch (uiType) { case TYPE_HYDROMANCER_THESPIA: + if (uiData == DONE) + DoToggleGameObjectFlags(GO_ACCESS_PANEL_HYDRO, GO_FLAG_NO_INTERACT, false); if (uiData == SPECIAL) { - DoUseDoorOrButton(GO_ACCESS_PANEL_HYDRO); - if (GetData(TYPE_MEKGINEER_STEAMRIGGER) == SPECIAL) DoUseDoorOrButton(GO_MAIN_CHAMBERS_DOOR); - - debug_log("SD2: Instance Steamvault: Access panel used."); } - m_auiEncounter[0] = uiData; + m_auiEncounter[uiType] = uiData; break; case TYPE_MEKGINEER_STEAMRIGGER: + if (uiData == DONE) + DoToggleGameObjectFlags(GO_ACCESS_PANEL_MEK, GO_FLAG_NO_INTERACT, false); if (uiData == SPECIAL) { - DoUseDoorOrButton(GO_ACCESS_PANEL_MEK); - if (GetData(TYPE_HYDROMANCER_THESPIA) == SPECIAL) DoUseDoorOrButton(GO_MAIN_CHAMBERS_DOOR); - - debug_log("SD2: Instance Steamvault: Access panel used."); } - m_auiEncounter[1] = uiData; + m_auiEncounter[uiType] = uiData; break; case TYPE_WARLORD_KALITHRESH: - m_auiEncounter[2] = uiData; + DoUseDoorOrButton(GO_MAIN_CHAMBERS_DOOR); + if (uiData == FAIL) + { + // Reset Distiller flags - respawn is handled by DB + for (GUIDList::const_iterator itr = m_lNagaDistillerGuidList.begin(); itr != m_lNagaDistillerGuidList.end(); ++itr) + { + if (Creature* pDistiller = instance->GetCreature(*itr)) + { + if (!pDistiller->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE)) + pDistiller->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + } + } + } + m_auiEncounter[uiType] = uiData; break; } + + if (uiData == DONE || uiData == SPECIAL) + { + OUT_SAVE_INST_DATA; + + std::ostringstream saveStream; + saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2]; + + m_strInstData = saveStream.str(); + + SaveToDB(); + OUT_SAVE_INST_DATA_COMPLETE; + } } uint32 instance_steam_vault::GetData(uint32 uiType) { - switch(uiType) + if (uiType < MAX_ENCOUNTER) + return m_auiEncounter[uiType]; + + return 0; +} + +void instance_steam_vault::Load(const char* chrIn) +{ + if (!chrIn) { - case TYPE_HYDROMANCER_THESPIA: return m_auiEncounter[0]; - case TYPE_MEKGINEER_STEAMRIGGER: return m_auiEncounter[1]; - case TYPE_WARLORD_KALITHRESH: return m_auiEncounter[2]; + OUT_LOAD_INST_DATA_FAIL; + return; + } - default: - return 0; + OUT_LOAD_INST_DATA(chrIn); + + std::istringstream loadStream(chrIn); + loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2]; + + for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) + { + if (m_auiEncounter[i] == IN_PROGRESS) + m_auiEncounter[i] = NOT_STARTED; } + + OUT_LOAD_INST_DATA_COMPLETE; } InstanceData* GetInstanceData_instance_steam_vault(Map* pMap) diff --git a/scripts/outland/coilfang_reservoir/steam_vault/steam_vault.h b/scripts/outland/coilfang_reservoir/steam_vault/steam_vault.h index d228c401c..d06bb904a 100644 --- a/scripts/outland/coilfang_reservoir/steam_vault/steam_vault.h +++ b/scripts/outland/coilfang_reservoir/steam_vault/steam_vault.h @@ -9,9 +9,9 @@ enum { MAX_ENCOUNTER = 3, - TYPE_HYDROMANCER_THESPIA = 1, - TYPE_MEKGINEER_STEAMRIGGER = 2, - TYPE_WARLORD_KALITHRESH = 3, + TYPE_HYDROMANCER_THESPIA = 0, + TYPE_MEKGINEER_STEAMRIGGER = 1, + TYPE_WARLORD_KALITHRESH = 2, NPC_NAGA_DISTILLER = 17954, NPC_STEAMRIGGER = 17796, @@ -38,8 +38,14 @@ class MANGOS_DLL_DECL instance_steam_vault : public ScriptedInstance void SetData(uint32 uiType, uint32 uiData); uint32 GetData(uint32 uiType); + const char* Save() { return m_strInstData.c_str(); } + void Load(const char* chrIn); + private: uint32 m_auiEncounter[MAX_ENCOUNTER]; + std::string m_strInstData; + + GUIDList m_lNagaDistillerGuidList; }; #endif diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index d58047bc6..5f18cb08c 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2549" + #define SD2_REVISION_NR "2550" #endif // __SD2_REVISION_NR_H__ From 8d12f00efdb9b955a6ed10247cb2ea5eb09c673f Mon Sep 17 00:00:00 2001 From: Xfurry Date: Tue, 15 May 2012 00:47:38 +0300 Subject: [PATCH 0539/1172] [2551] Cleanup and improve script for Mekgineer Steamrigger Also fix a reset timer for quest 5441 --- scripts/kalimdor/durotar.cpp | 3 +- .../boss_mekgineer_steamrigger.cpp | 238 +++++++++--------- sd2_revision_nr.h | 2 +- 3 files changed, 127 insertions(+), 116 deletions(-) diff --git a/scripts/kalimdor/durotar.cpp b/scripts/kalimdor/durotar.cpp index 496ff4f25..2dc16ad3d 100644 --- a/scripts/kalimdor/durotar.cpp +++ b/scripts/kalimdor/durotar.cpp @@ -59,9 +59,8 @@ struct MANGOS_DLL_DECL npc_lazy_peonAI : public ScriptedAI if (uiMotionType != POINT_MOTION_TYPE || !uiPointId) return; - // ToDo: check the reset timer m_creature->HandleEmote(EMOTE_STATE_WORK_CHOPWOOD); - m_uiResetSleepTimer = 1*MINUTE*IN_MILLISECONDS; + m_uiResetSleepTimer = 80000; } void UpdateAI(const uint32 uiDiff) diff --git a/scripts/outland/coilfang_reservoir/steam_vault/boss_mekgineer_steamrigger.cpp b/scripts/outland/coilfang_reservoir/steam_vault/boss_mekgineer_steamrigger.cpp index c1fd82616..891d93c57 100644 --- a/scripts/outland/coilfang_reservoir/steam_vault/boss_mekgineer_steamrigger.cpp +++ b/scripts/outland/coilfang_reservoir/steam_vault/boss_mekgineer_steamrigger.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: Boss_Mekgineer_Steamrigger -SD%Complete: 60 -SDComment: Mechanics' interrrupt heal doesn't work very well, also a proper movement needs to be implemented -> summon further away and move towards target to repair. +SD%Complete: 80 +SDComment: Enrage on heroic NYI SDCategory: Coilfang Resevoir, The Steamvault EndScriptData */ @@ -29,22 +29,43 @@ EndContentData */ #include "precompiled.h" #include "steam_vault.h" -#define SAY_MECHANICS -1545007 -#define SAY_AGGRO_1 -1545008 -#define SAY_AGGRO_2 -1545009 -#define SAY_AGGRO_3 -1545010 -#define SAY_AGGRO_4 -1545011 -#define SAY_SLAY_1 -1545012 -#define SAY_SLAY_2 -1545013 -#define SAY_SLAY_3 -1545014 -#define SAY_DEATH -1545015 +enum +{ + SAY_MECHANICS = -1545007, + SAY_AGGRO_1 = -1545008, + SAY_AGGRO_2 = -1545009, + SAY_AGGRO_3 = -1545010, + SAY_AGGRO_4 = -1545011, + SAY_SLAY_1 = -1545012, + SAY_SLAY_2 = -1545013, + SAY_SLAY_3 = -1545014, + SAY_DEATH = -1545015, + + SPELL_SUPER_SHRINK_RAY = 31485, + SPELL_SAW_BLADE = 31486, + SPELL_ELECTRIFIED_NET = 35107, + //SPELL_ENRAGE_H = 1, //current enrage spell not known + + NPC_STEAMRIGGER_MECHANIC = 17951, + + // Mechanic spells + SPELL_DISPEL_MAGIC = 17201, + SPELL_REPAIR = 31532, + SPELL_REPAIR_H = 37936, +}; -#define SPELL_SUPER_SHRINK_RAY 31485 -#define SPELL_SAW_BLADE 31486 -#define SPELL_ELECTRIFIED_NET 35107 -#define SPELL_ENRAGE_H 1 //corrent enrage spell not known +struct SummonLocation +{ + float m_fX, m_fY, m_fZ; +}; -#define ENTRY_STREAMRIGGER_MECHANIC 17951 +// Spawn locations +static const SummonLocation aSteamriggerSpawnLocs[] = +{ + {-316.101f, -166.444f, -7.66f}, + {-348.497f, -161.718f, -7.66f}, + {-331.161f, -112.212f, -7.66f}, +}; struct MANGOS_DLL_DECL boss_mekgineer_steamriggerAI : public ScriptedAI { @@ -58,28 +79,28 @@ struct MANGOS_DLL_DECL boss_mekgineer_steamriggerAI : public ScriptedAI ScriptedInstance* m_pInstance; bool m_bIsRegularMode; - uint32 Shrink_Timer; - uint32 Saw_Blade_Timer; - uint32 Electrified_Net_Timer; - bool Summon75; - bool Summon50; - bool Summon25; + uint32 m_uiShrinkTimer; + uint32 m_uiSawBladeTimer; + uint32 m_uiElectrifiedNetTimer; + uint32 m_uiMechanicTimer; + uint8 m_uiMechanicPhaseCount; void Reset() { - Shrink_Timer = 20000; - Saw_Blade_Timer = 15000; - Electrified_Net_Timer = 10000; - - Summon75 = false; - Summon50 = false; - Summon25 = false; + m_uiShrinkTimer = 20000; + m_uiSawBladeTimer = 15000; + m_uiElectrifiedNetTimer = 10000; + m_uiMechanicTimer = 20000; + m_uiMechanicPhaseCount = 1; + } - if (m_pInstance && m_creature->isAlive()) - m_pInstance->SetData(TYPE_MEKGINEER_STEAMRIGGER,NOT_STARTED); + void JustReachedHome() + { + if (m_pInstance) + m_pInstance->SetData(TYPE_MEKGINEER_STEAMRIGGER, FAIL); } - void JustDied(Unit* Killer) + void JustDied(Unit* pKiller) { DoScriptText(SAY_DEATH, m_creature); @@ -87,7 +108,7 @@ struct MANGOS_DLL_DECL boss_mekgineer_steamriggerAI : public ScriptedAI m_pInstance->SetData(TYPE_MEKGINEER_STEAMRIGGER, DONE); } - void KilledUnit(Unit* victim) + void KilledUnit(Unit* pVictim) { switch(urand(0, 2)) { @@ -97,7 +118,7 @@ struct MANGOS_DLL_DECL boss_mekgineer_steamriggerAI : public ScriptedAI } } - void Aggro(Unit *who) + void Aggro(Unit* pWho) { switch(urand(0, 2)) { @@ -110,75 +131,76 @@ struct MANGOS_DLL_DECL boss_mekgineer_steamriggerAI : public ScriptedAI m_pInstance->SetData(TYPE_MEKGINEER_STEAMRIGGER, IN_PROGRESS); } - //no known summon spells exist + void JustSummoned(Creature* pSummoned) + { + if (pSummoned->GetEntry() == NPC_STEAMRIGGER_MECHANIC) + pSummoned->GetMotionMaster()->MoveFollow(m_creature, 0, 0); + } + + // Wrapper to summon three Mechanics void SummonMechanichs() { DoScriptText(SAY_MECHANICS, m_creature); - DoSpawnCreature(ENTRY_STREAMRIGGER_MECHANIC,5,5,0,0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 240000); - DoSpawnCreature(ENTRY_STREAMRIGGER_MECHANIC,-5,5,0,0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 240000); - DoSpawnCreature(ENTRY_STREAMRIGGER_MECHANIC,-5,-5,0,0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 240000); - - if (urand(0, 1)) - DoSpawnCreature(ENTRY_STREAMRIGGER_MECHANIC,5,-7,0,0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 240000); - - if (urand(0, 1)) - DoSpawnCreature(ENTRY_STREAMRIGGER_MECHANIC,7,-5,0,0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 240000); + for (uint8 i = 0; i < 3; ++i) + m_creature->SummonCreature(NPC_STEAMRIGGER_MECHANIC, aSteamriggerSpawnLocs[i].m_fX, aSteamriggerSpawnLocs[i].m_fY, aSteamriggerSpawnLocs[i].m_fZ, 0, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 240000); } - void UpdateAI(const uint32 diff) + void UpdateAI(const uint32 uiDiff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - if (Shrink_Timer < diff) + if (m_uiShrinkTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_SUPER_SHRINK_RAY); - Shrink_Timer = 20000; - }else Shrink_Timer -= diff; + if (DoCastSpellIfCan(m_creature, SPELL_SUPER_SHRINK_RAY) == CAST_OK) + m_uiShrinkTimer = 20000; + } + else + m_uiShrinkTimer -= uiDiff; - if (Saw_Blade_Timer < diff) + if (m_uiSawBladeTimer < uiDiff) { - if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,1)) - DoCastSpellIfCan(target,SPELL_SAW_BLADE); - else - DoCastSpellIfCan(m_creature->getVictim(),SPELL_SAW_BLADE); + Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1); + if (!pTarget) + pTarget = m_creature->getVictim(); - Saw_Blade_Timer = 15000; - } else Saw_Blade_Timer -= diff; - - if (Electrified_Net_Timer < diff) - { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_ELECTRIFIED_NET); - Electrified_Net_Timer = 10000; + if (pTarget) + { + if (DoCastSpellIfCan(pTarget, SPELL_SAW_BLADE) == CAST_OK) + m_uiSawBladeTimer = 15000; + } } - else Electrified_Net_Timer -= diff; + else + m_uiSawBladeTimer -= uiDiff; - if (!Summon75) + if (m_uiElectrifiedNetTimer < uiDiff) { - if (m_creature->GetHealthPercent() < 75.0f) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) { - SummonMechanichs(); - Summon75 = true; + if (DoCastSpellIfCan(pTarget, SPELL_ELECTRIFIED_NET) == CAST_OK) + m_uiElectrifiedNetTimer = 10000; } } + else + m_uiElectrifiedNetTimer -= uiDiff; - if (!Summon50) + // On Heroic mode summon a mechanic at each 20 secs + if (!m_bIsRegularMode) { - if (m_creature->GetHealthPercent() < 50.0f) + if (m_uiMechanicTimer < uiDiff) { - SummonMechanichs(); - Summon50 = true; + m_creature->SummonCreature(NPC_STEAMRIGGER_MECHANIC, aSteamriggerSpawnLocs[2].m_fX, aSteamriggerSpawnLocs[2].m_fY, aSteamriggerSpawnLocs[2].m_fZ, 0, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 240000); + m_uiMechanicTimer = 20000; } + else + m_uiMechanicTimer -= uiDiff; } - if (!Summon25) + if (m_creature->GetHealthPercent() < (100 - 25*m_uiMechanicPhaseCount)) { - if (m_creature->GetHealthPercent() < 25.0f) - { - SummonMechanichs(); - Summon25 = true; - } + SummonMechanichs(); + ++m_uiMechanicPhaseCount; } DoMeleeAttackIfReady(); @@ -190,13 +212,6 @@ CreatureAI* GetAI_boss_mekgineer_steamrigger(Creature* pCreature) return new boss_mekgineer_steamriggerAI(pCreature); } -#define SPELL_DISPEL_MAGIC 17201 -#define SPELL_REPAIR 31532 -#define SPELL_REPAIR_H 37936 - -#define MAX_REPAIR_RANGE (13.0f) //we should be at least at this range for repair -#define MIN_REPAIR_RANGE (7.0f) //we can stop movement at this range to repair but not required - struct MANGOS_DLL_DECL mob_steamrigger_mechanicAI : public ScriptedAI { mob_steamrigger_mechanicAI(Creature* pCreature) : ScriptedAI(pCreature) @@ -209,48 +224,45 @@ struct MANGOS_DLL_DECL mob_steamrigger_mechanicAI : public ScriptedAI ScriptedInstance* m_pInstance; bool m_bIsRegularMode; - uint32 Repair_Timer; + bool m_bCanStartAttack; void Reset() { - Repair_Timer = 2000; + m_bCanStartAttack = false; } - void MoveInLineOfSight(Unit* who) + void AttackStart(Unit* pWho) { - //react only if attacked - return; + // Trigger attack only for players + if (pWho->GetTypeId() != TYPEID_PLAYER) + return; + + m_creature->InterruptNonMeleeSpells(false); + ScriptedAI::AttackStart(pWho); + m_bCanStartAttack = true; } - void UpdateAI(const uint32 diff) + void MoveInLineOfSight(Unit* pWho) { - if (Repair_Timer < diff) + // Return if already in combat + if (m_bCanStartAttack) + return; + + // Don't attack players unless attacked + if (pWho->GetEntry() == NPC_STEAMRIGGER) { - if (m_pInstance && m_pInstance->GetData(TYPE_MEKGINEER_STEAMRIGGER) == IN_PROGRESS) + if (m_pInstance->GetData(TYPE_MEKGINEER_STEAMRIGGER) == IN_PROGRESS) { - if (Creature* pMekgineer = m_pInstance->GetSingleCreatureFromStorage(NPC_STEAMRIGGER)) - { - if (m_creature->IsWithinDistInMap(pMekgineer, MAX_REPAIR_RANGE)) - { - //are we already channeling? Doesn't work very well, find better check? - if (!m_creature->GetUInt32Value(UNIT_CHANNEL_SPELL)) - { - //m_creature->GetMotionMaster()->MovementExpired(); - //m_creature->GetMotionMaster()->MoveIdle(); - - DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_REPAIR : SPELL_REPAIR_H, CAST_TRIGGERED); - } - Repair_Timer = 5000; - } - else - { - //m_creature->GetMotionMaster()->MovementExpired(); - //m_creature->GetMotionMaster()->MoveFollow(pMekgineer,0,0); - } - } - }else Repair_Timer = 5000; - }else Repair_Timer -= diff; + // Channel the repair spell on Steamrigger + // This will also stop creature movement and will allow them to continue to follow the boss after channeling is finished or the boss is out of range + if (m_creature->IsWithinDistInMap(pWho, 2*INTERACTION_DISTANCE)) + DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_REPAIR : SPELL_REPAIR_H); + } + } + } + void UpdateAI(const uint32 uiDiff) + { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 5f18cb08c..1e34e54df 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2550" + #define SD2_REVISION_NR "2551" #endif // __SD2_REVISION_NR_H__ From 6866bc506c55b4adb8bb95759b27469a0100c106 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Tue, 15 May 2012 21:26:54 +0300 Subject: [PATCH 0540/1172] [2552] Implement some script content for Ruby Sanctum Inspired from the work of rsa This contains basic instance script Halion spawn support Basic script for minibosses --- .../northrend/ruby_sanctum/boss_baltharus.cpp | 96 +++++++- .../northrend/ruby_sanctum/boss_halion.cpp | 1 - .../northrend/ruby_sanctum/boss_saviana.cpp | 66 ++++++ .../ruby_sanctum/boss_zarithrian.cpp | 66 ++++++ .../ruby_sanctum/instance_ruby_sanctum.cpp | 222 +++++++++++++++++- scripts/northrend/ruby_sanctum/ruby_sanctum.h | 84 +++++++ sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 6 + sql/updates/r2552_mangos.sql | 4 + 9 files changed, 542 insertions(+), 5 deletions(-) create mode 100644 sql/updates/r2552_mangos.sql diff --git a/scripts/northrend/ruby_sanctum/boss_baltharus.cpp b/scripts/northrend/ruby_sanctum/boss_baltharus.cpp index eb3b2d85c..a1431721a 100644 --- a/scripts/northrend/ruby_sanctum/boss_baltharus.cpp +++ b/scripts/northrend/ruby_sanctum/boss_baltharus.cpp @@ -22,11 +22,14 @@ SDCategory: Ruby Sanctum EndScriptData */ #include "precompiled.h" +#include "ruby_sanctum.h" enum { // Xerestrasza intro and outro texts SAY_HELP = -1724000, + SAY_INTRO = -1724001, + SAY_THANKS = -1724002, SAY_OUTRO_1 = -1724003, SAY_OUTRO_2 = -1724004, @@ -37,14 +40,105 @@ enum SAY_OUTRO_7 = -1724009, // Baltharus texts - SAY_INTRO = -1724001, SAY_AGGRO = -1724010, SAY_SLAY_1 = -1724011, SAY_SLAY_2 = -1724012, SAY_DEATH = -1724013, SAY_SPLIT = -1724014, + + SPELL_BARRIER_CHANNEL = 76221, // channeled on the tree }; +static const DialogueEntry aIntroDialogue[] = +{ + {SAY_HELP, NPC_XERESTRASZA, 7000}, + {SAY_INTRO, NPC_BALTHARUS, 0}, + {0, 0, 0}, +}; + +struct MANGOS_DLL_DECL boss_baltharusAI : public ScriptedAI, private DialogueHelper +{ + boss_baltharusAI(Creature* pCreature) : ScriptedAI(pCreature), + DialogueHelper(aIntroDialogue) + { + m_pInstance = (instance_ruby_sanctum*)pCreature->GetInstanceData(); + InitializeDialogueHelper(m_pInstance); + m_bHasDoneIntro = false; + Reset(); + } + + instance_ruby_sanctum* m_pInstance; + + bool m_bHasDoneIntro; + + void Reset() + { + } + + void Aggro(Unit* pWho) + { + DoScriptText(SAY_AGGRO, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_BALTHARUS, IN_PROGRESS); + } + + void MoveInLineOfSight(Unit* pWho) + { + if (!m_bHasDoneIntro && pWho->GetTypeId() == TYPEID_PLAYER && !((Player*)pWho)->isGameMaster()) + { + StartNextDialogueText(SAY_HELP); + m_bHasDoneIntro = true; + } + + ScriptedAI::MoveInLineOfSight(pWho); + } + + void KilledUnit(Unit* pVictim) + { + if (pVictim->GetTypeId() != TYPEID_PLAYER) + return; + + if (urand(0, 1)) + DoScriptText(urand(0, 1) ? SAY_SLAY_1 : SAY_SLAY_2, m_creature); + } + + void JustDied(Unit* pKiller) + { + DoScriptText(SAY_DEATH, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_BALTHARUS, DONE); + } + + void JustReachedHome() + { + if (m_pInstance) + m_pInstance->SetData(TYPE_BALTHARUS, FAIL); + } + + void UpdateAI(const uint32 uiDiff) + { + DialogueUpdate(uiDiff); + + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_baltharus(Creature* pCreature) +{ + return new boss_baltharusAI(pCreature); +} + void AddSC_boss_baltharus() { + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_baltharus"; + pNewScript->GetAI = &GetAI_boss_baltharus; + pNewScript->RegisterSelf(); } diff --git a/scripts/northrend/ruby_sanctum/boss_halion.cpp b/scripts/northrend/ruby_sanctum/boss_halion.cpp index 878d9e211..3ebc8295f 100644 --- a/scripts/northrend/ruby_sanctum/boss_halion.cpp +++ b/scripts/northrend/ruby_sanctum/boss_halion.cpp @@ -25,7 +25,6 @@ EndScriptData */ enum { - SAY_SPAWN = -1724024, SAY_AGGRO = -1724025, SAY_SLAY = -1724026, // There is an additonal sound entry related to SLAY: 17502 SAY_DEATH = -1724027, diff --git a/scripts/northrend/ruby_sanctum/boss_saviana.cpp b/scripts/northrend/ruby_sanctum/boss_saviana.cpp index fad2b283d..cd72b996d 100644 --- a/scripts/northrend/ruby_sanctum/boss_saviana.cpp +++ b/scripts/northrend/ruby_sanctum/boss_saviana.cpp @@ -22,6 +22,7 @@ SDCategory: Ruby Sanctum EndScriptData */ #include "precompiled.h" +#include "ruby_sanctum.h" enum { @@ -32,6 +33,71 @@ enum SOUND_DEATH = 17531, // On death it has only a screaming sound }; +struct MANGOS_DLL_DECL boss_savianaAI : public ScriptedAI +{ + boss_savianaAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (instance_ruby_sanctum*)pCreature->GetInstanceData(); + Reset(); + } + + instance_ruby_sanctum* m_pInstance; + + void Reset() + { + } + + void Aggro(Unit* pWho) + { + DoScriptText(SAY_AGGRO, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_SAVIANA, IN_PROGRESS); + } + + void KilledUnit(Unit* pVictim) + { + if (pVictim->GetTypeId() != TYPEID_PLAYER) + return; + + if (urand(0, 1)) + DoScriptText(urand(0, 1) ? SAY_SLAY_1 : SAY_SLAY_2, m_creature); + } + + void JustDied(Unit* pKiller) + { + DoPlaySoundToSet(m_creature, SOUND_DEATH); + + if (m_pInstance) + m_pInstance->SetData(TYPE_SAVIANA, DONE); + } + + void JustReachedHome() + { + if (m_pInstance) + m_pInstance->SetData(TYPE_SAVIANA, FAIL); + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_saviana(Creature* pCreature) +{ + return new boss_savianaAI(pCreature); +} + void AddSC_boss_saviana() { + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_saviana"; + pNewScript->GetAI = &GetAI_boss_saviana; + pNewScript->RegisterSelf(); } diff --git a/scripts/northrend/ruby_sanctum/boss_zarithrian.cpp b/scripts/northrend/ruby_sanctum/boss_zarithrian.cpp index ab1156362..5e18c9fbc 100644 --- a/scripts/northrend/ruby_sanctum/boss_zarithrian.cpp +++ b/scripts/northrend/ruby_sanctum/boss_zarithrian.cpp @@ -22,6 +22,7 @@ SDCategory: Ruby Sanctum EndScriptData */ #include "precompiled.h" +#include "ruby_sanctum.h" enum { @@ -32,6 +33,71 @@ enum SAY_SUMMON = -1724023, }; +struct MANGOS_DLL_DECL boss_zarithrianAI : public ScriptedAI +{ + boss_zarithrianAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (instance_ruby_sanctum*)pCreature->GetInstanceData(); + Reset(); + } + + instance_ruby_sanctum* m_pInstance; + + void Reset() + { + } + + void Aggro(Unit* pWho) + { + DoScriptText(SAY_AGGRO, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_ZARITHRIAN, IN_PROGRESS); + } + + void KilledUnit(Unit* pVictim) + { + if (pVictim->GetTypeId() != TYPEID_PLAYER) + return; + + if (urand(0, 1)) + DoScriptText(urand(0, 1) ? SAY_SLAY_1 : SAY_SLAY_2, m_creature); + } + + void JustDied(Unit* pKiller) + { + DoScriptText(SAY_DEATH, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_ZARITHRIAN, DONE); + } + + void JustReachedHome() + { + if (m_pInstance) + m_pInstance->SetData(TYPE_ZARITHRIAN, FAIL); + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_zarithrian(Creature* pCreature) +{ + return new boss_zarithrianAI(pCreature); +} + void AddSC_boss_zarithrian() { + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_zarithrian"; + pNewScript->GetAI = &GetAI_boss_zarithrian; + pNewScript->RegisterSelf(); } diff --git a/scripts/northrend/ruby_sanctum/instance_ruby_sanctum.cpp b/scripts/northrend/ruby_sanctum/instance_ruby_sanctum.cpp index 4b9274f55..c741e4306 100644 --- a/scripts/northrend/ruby_sanctum/instance_ruby_sanctum.cpp +++ b/scripts/northrend/ruby_sanctum/instance_ruby_sanctum.cpp @@ -16,13 +16,231 @@ /* ScriptData SDName: instance_ruby_sanctum -SD%Complete: 0 -SDComment: Placeholder +SD%Complete: 30% +SDComment: Basic instance script SDCategory: Ruby Sanctum EndScriptData */ #include "precompiled.h" +#include "ruby_sanctum.h" + + +instance_ruby_sanctum::instance_ruby_sanctum(Map* pMap) : ScriptedInstance(pMap), + m_uiHalionSummonTimer(0), + m_uiHalionSummonStage(0) +{ + Initialize(); +} + +void instance_ruby_sanctum::Initialize() +{ + memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); +} + +bool instance_ruby_sanctum::IsEncounterInProgress() const +{ + for (uint8 i = 1; i < MAX_ENCOUNTER ; ++i) + { + if (m_auiEncounter[i] == IN_PROGRESS) + return true; + } + + return false; +} + +void instance_ruby_sanctum::OnPlayerEnter(Player* pPlayer) +{ + // Return if Halion already dead, or Zarithrian alive + if (m_auiEncounter[TYPE_ZARITHRIAN] != DONE || m_auiEncounter[TYPE_HALION] == DONE) + return; + + // Return if already summoned + if (GetSingleCreatureFromStorage(NPC_HALION_REAL, true)) + return; + + if (Creature* pSummoner = GetSingleCreatureFromStorage(NPC_HALION_CONTROLLER)) + pSummoner->SummonCreature(NPC_HALION_REAL, pSummoner->GetPositionX(), pSummoner->GetPositionY(), pSummoner->GetPositionZ(), pSummoner->GetOrientation(), TEMPSUMMON_DEAD_DESPAWN, 0); +} + +void instance_ruby_sanctum::OnCreatureCreate(Creature* pCreature) +{ + switch (pCreature->GetEntry()) + { + case NPC_BALTHARUS: + case NPC_XERESTRASZA: + case NPC_HALION_CONTROLLER: + m_mNpcEntryGuidStore[pCreature->GetEntry()] = pCreature->GetObjectGuid(); + break; + } +} + +void instance_ruby_sanctum::OnObjectCreate(GameObject* pGo) +{ + switch (pGo->GetEntry()) + { + case GO_FLAME_WALLS: + if(m_auiEncounter[TYPE_SAVIANA] == DONE && m_auiEncounter[TYPE_BALTHARUS] == DONE) + pGo->SetGoState(GO_STATE_ACTIVE); + break; + case GO_FIRE_FIELD: + if(m_auiEncounter[TYPE_BALTHARUS] == DONE) + pGo->SetGoState(GO_STATE_ACTIVE); + break; + case GO_FLAME_RING: + break; + case GO_BURNING_TREE_1: + case GO_BURNING_TREE_2: + case GO_BURNING_TREE_3: + case GO_BURNING_TREE_4: + if (m_auiEncounter[TYPE_ZARITHRIAN] == DONE) + pGo->SetGoState(GO_STATE_ACTIVE); + break; + default: + return; + } + m_mGoEntryGuidStore[pGo->GetEntry()] = pGo->GetObjectGuid(); +} + +// Wrapper to unlock the flame wall in from of Zarithrian +void instance_ruby_sanctum::DoHandleZarithrianDoor() +{ + if(m_auiEncounter[TYPE_SAVIANA] == DONE && m_auiEncounter[TYPE_BALTHARUS] == DONE) + DoUseDoorOrButton(GO_FLAME_WALLS); +} + +void instance_ruby_sanctum::SetData(uint32 uiType, uint32 uiData) +{ + switch(uiType) + { + case TYPE_SAVIANA: + m_auiEncounter[uiType] = uiData; + if (uiData == DONE) + DoHandleZarithrianDoor(); + break; + case TYPE_BALTHARUS: + m_auiEncounter[uiType] = uiData; + if (uiData == DONE) + { + DoHandleZarithrianDoor(); + DoUseDoorOrButton(GO_FIRE_FIELD); + } + break; + case TYPE_ZARITHRIAN: + m_auiEncounter[uiType] = uiData; + DoUseDoorOrButton(GO_FLAME_WALLS); + if (uiData == DONE) + { + // Start Halion summoning process + if (Creature* pSummoner = GetSingleCreatureFromStorage(NPC_HALION_CONTROLLER)) + { + pSummoner->CastSpell(pSummoner, SPELL_FIRE_PILLAR, false); + m_uiHalionSummonTimer = 5000; + } + } + break; + case TYPE_HALION: + m_auiEncounter[uiType] = uiData; + DoUseDoorOrButton(GO_FLAME_RING); + break; + } + + if (uiData == DONE) + { + OUT_SAVE_INST_DATA; + + std::ostringstream saveStream; + saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2] << " " << m_auiEncounter[3]; + + strInstData = saveStream.str(); + + SaveToDB(); + OUT_SAVE_INST_DATA_COMPLETE; + } +} + +uint32 instance_ruby_sanctum::GetData(uint32 uiType) +{ + if (uiType < MAX_ENCOUNTER) + return m_auiEncounter[uiType]; + + return 0; +} + +void instance_ruby_sanctum::Update(uint32 uiDiff) +{ + if (m_uiHalionSummonTimer) + { + if (m_uiHalionSummonTimer <= uiDiff) + { + switch (m_uiHalionSummonStage) + { + case 0: + // Burn the first line of trees + DoUseDoorOrButton(GO_BURNING_TREE_1); + DoUseDoorOrButton(GO_BURNING_TREE_2); + m_uiHalionSummonTimer = 5000; + break; + case 1: + // Burn the second line of trees + DoUseDoorOrButton(GO_BURNING_TREE_3); + DoUseDoorOrButton(GO_BURNING_TREE_4); + m_uiHalionSummonTimer = 4000; + break; + case 2: + // Cast Fiery explosion + if (Creature* pSummoner = GetSingleCreatureFromStorage(NPC_HALION_CONTROLLER)) + pSummoner->CastSpell(pSummoner, SPELL_FIERY_EXPLOSION, true); + m_uiHalionSummonTimer = 2000; + case 3: + // Spawn Halion + if (Creature* pSummoner = GetSingleCreatureFromStorage(NPC_HALION_CONTROLLER)) + { + if (Creature* pHalion = pSummoner->SummonCreature(NPC_HALION_REAL, pSummoner->GetPositionX(), pSummoner->GetPositionY(), pSummoner->GetPositionZ(), pSummoner->GetOrientation(), TEMPSUMMON_DEAD_DESPAWN, 0)) + DoScriptText(SAY_HALION_SPAWN, pHalion); + } + m_uiHalionSummonTimer = 0; + break; + } + ++m_uiHalionSummonStage; + } + else + m_uiHalionSummonTimer -= uiDiff; + } +} + +void instance_ruby_sanctum::Load(const char* chrIn) +{ + if (!chrIn) + { + OUT_LOAD_INST_DATA_FAIL; + return; + } + + OUT_LOAD_INST_DATA(chrIn); + + std::istringstream loadStream(chrIn); + loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3]; + + for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) + { + if (m_auiEncounter[i] == IN_PROGRESS) + m_auiEncounter[i] = NOT_STARTED; + } + + OUT_LOAD_INST_DATA_COMPLETE; +} + +InstanceData* GetInstanceData_instance_ruby_sanctum(Map* pMap) +{ + return new instance_ruby_sanctum(pMap); +} void AddSC_instance_ruby_sanctum() { + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "instance_ruby_sanctum"; + pNewScript->GetInstanceData = &GetInstanceData_instance_ruby_sanctum; + pNewScript->RegisterSelf(); } diff --git a/scripts/northrend/ruby_sanctum/ruby_sanctum.h b/scripts/northrend/ruby_sanctum/ruby_sanctum.h index 5871a49a1..f2bf46229 100644 --- a/scripts/northrend/ruby_sanctum/ruby_sanctum.h +++ b/scripts/northrend/ruby_sanctum/ruby_sanctum.h @@ -1,3 +1,87 @@ /* Copyright (C) 2006 - 2012 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ + +#ifndef DEF_RUBY_SANCTUM_H +#define DEF_RUBY_SANCTUM_H + +enum +{ + MAX_ENCOUNTER = 4, + + TYPE_SAVIANA = 0, + TYPE_BALTHARUS = 1, + TYPE_ZARITHRIAN = 2, + TYPE_HALION = 3, + + NPC_HALION_REAL = 39863, // Halion - Physical Realm NPC + NPC_HALION_TWILIGHT = 40142, // Halion - Twilight Realm NPC + NPC_HALION_CONTROLLER = 40146, + + //NPC_SHADOW_PULSAR_N = 40083, // Halion event - Shadow orb + //NPC_SHADOW_PULSAR_S = 40100, + //NPC_ORB_CARRIER = 40081, + //NPC_ORB_ROTATION_FOCUS = 40091, + + NPC_SAVIANA = 39747, // minibosses + NPC_BALTHARUS = 39751, + NPC_ZARITHRIAN = 39746, + + NPC_XERESTRASZA = 40429, // friendly npc, used for some cinematic and quest + NPC_ZARITHRIAN_SPAWN_STALKER = 39794, + + //GO_HALION_PORTAL_1 = 202794, // Portals used in the Halion encounter + //GO_HALION_PORTAL_2 = 202795, + //GO_HALION_PORTAL_3 = 202796, + + GO_FIRE_FIELD = 203005, // Xerestrasza flame door + GO_FLAME_WALLS = 203006, // Zarithrian flame walls + GO_FLAME_RING = 203007, // Halion flame ring + + GO_BURNING_TREE_1 = 203036, // Trees which burn when Halion appears + GO_BURNING_TREE_2 = 203037, + GO_BURNING_TREE_3 = 203035, + GO_BURNING_TREE_4 = 203034, + + // Spells used to summon Halion + SPELL_FIRE_PILLAR = 76006, + SPELL_FIERY_EXPLOSION = 76010, + + SAY_HALION_SPAWN = -1724024, + + // world state to show corporeality in Halion encounter - phase 3 + UPDATE_STATE_UI_SHOW = 5049, + UPDATE_STATE_UI_COUNT = 5050, +}; + +class MANGOS_DLL_DECL instance_ruby_sanctum : public ScriptedInstance +{ + public: + instance_ruby_sanctum(Map* pMap); + + void Initialize(); + bool IsEncounterInProgress() const; + + void OnPlayerEnter(Player* pPlayer); + void OnCreatureCreate(Creature* pCreature); + void OnObjectCreate(GameObject* pGo); + + void SetData(uint32 uiType, uint32 uiData); + uint32 GetData(uint32 uiType); + + void Update(uint32 uiDiff); + + const char* Save() { return strInstData.c_str(); } + void Load(const char* chrIn); + + protected: + void DoHandleZarithrianDoor(); + + std::string strInstData; + uint32 m_auiEncounter[MAX_ENCOUNTER]; + + uint32 m_uiHalionSummonTimer; + uint32 m_uiHalionSummonStage; +}; + +#endif diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 1e34e54df..5bc6e00d0 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2551" + #define SD2_REVISION_NR "2552" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 9861fa075..e97105b4d 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -920,6 +920,12 @@ UPDATE creature_template SET ScriptName='npc_willix_the_importer' WHERE entry=45 /* REDRIDGE MOUNTAINS */ UPDATE creature_template SET ScriptName='npc_corporal_keeshan' WHERE entry=349; +/* RUBY SANCTUM */ +UPDATE instance_template SET ScriptName='instance_ruby_sanctum' WHERE map=724; +UPDATE creature_template SET ScriptName='boss_baltharus' WHERE entry=39751; +UPDATE creature_template SET ScriptName='boss_saviana' WHERE entry=39747; +UPDATE creature_template SET ScriptName='boss_zarithrian' WHERE entry=39746; + /* RUINS OF AHN'QIRAJ */ UPDATE instance_template SET ScriptName='instance_ruins_of_ahnqiraj' WHERE map=509; UPDATE creature_template SET ScriptName='mob_anubisath_guardian' WHERE entry=15355; diff --git a/sql/updates/r2552_mangos.sql b/sql/updates/r2552_mangos.sql new file mode 100644 index 000000000..e89bb224a --- /dev/null +++ b/sql/updates/r2552_mangos.sql @@ -0,0 +1,4 @@ +UPDATE instance_template SET ScriptName='instance_ruby_sanctum' WHERE map=724; +UPDATE creature_template SET ScriptName='boss_baltharus' WHERE entry=39751; +UPDATE creature_template SET ScriptName='boss_saviana' WHERE entry=39747; +UPDATE creature_template SET ScriptName='boss_zarithrian' WHERE entry=39746; From 6912c6373bf220684544d5356c25896f18b04387 Mon Sep 17 00:00:00 2001 From: NeatElves Date: Wed, 16 May 2012 00:23:02 +0300 Subject: [PATCH 0541/1172] [2553] Remove script for quest 11221 - will be handled by DB Signed-off-by: Xfurry --- scripts/northrend/howling_fjord.cpp | 165 +--------------------------- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 3 - sql/scriptdev2_script_full.sql | 7 +- sql/updates/r2553_mangos.sql | 3 + sql/updates/r2553_scriptdev2.sql | 6 + 6 files changed, 15 insertions(+), 171 deletions(-) create mode 100644 sql/updates/r2553_mangos.sql create mode 100644 sql/updates/r2553_scriptdev2.sql diff --git a/scripts/northrend/howling_fjord.cpp b/scripts/northrend/howling_fjord.cpp index bdf5c858b..3a9c994d0 100644 --- a/scripts/northrend/howling_fjord.cpp +++ b/scripts/northrend/howling_fjord.cpp @@ -17,7 +17,7 @@ /* ScriptData SDName: Howling_Fjord SD%Complete: ? -SDComment: Quest support: 11221, 11300, 11464, 11343 +SDComment: Quest support: 11300, 11464, 11343 SDCategory: Howling Fjord EndScriptData */ @@ -25,8 +25,6 @@ EndScriptData */ npc_ancient_male_vrykul at_ancient_male_vrykul npc_daegarn -npc_deathstalker_razael - TODO, can be moved to database -npc_dark_ranger_lyana - TODO, can be moved to database npc_silvermoon_harry EndContentData */ @@ -254,149 +252,6 @@ CreatureAI* GetAI_npc_daegarn(Creature* pCreature) return new npc_daegarnAI(pCreature); } -/*###### -## npc_deathstalker_razael - TODO, can be moved to database -######*/ - -#define GOSSIP_ITEM_DEATHSTALKER_RAZAEL "High Executor Anselm requests your report." - -enum -{ - QUEST_REPORTS_FROM_THE_FIELD = 11221, - SPELL_RAZAEL_KILL_CREDIT = 42756, - GOSSIP_TEXTID_DEATHSTALKER_RAZAEL1 = 11562, - GOSSIP_TEXTID_DEATHSTALKER_RAZAEL2 = 11564 -}; - -bool GossipHello_npc_deathstalker_razael(Player* pPlayer, Creature* pCreature) -{ - if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); - - if (pPlayer->GetQuestStatus(QUEST_REPORTS_FROM_THE_FIELD) == QUEST_STATUS_INCOMPLETE) - { - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_DEATHSTALKER_RAZAEL, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_DEATHSTALKER_RAZAEL1, pCreature->GetObjectGuid()); - } - else - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); - - return true; -} - -bool GossipSelect_npc_deathstalker_razael(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) -{ - switch(uiAction) - { - case GOSSIP_ACTION_INFO_DEF+1: - pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_DEATHSTALKER_RAZAEL2, pCreature->GetObjectGuid()); - pCreature->CastSpell(pPlayer, SPELL_RAZAEL_KILL_CREDIT, true); - break; - } - - return true; -} - -/*###### -## npc_dark_ranger_lyana - TODO, can be moved to database -######*/ - -#define GOSSIP_ITEM_DARK_RANGER_LYANA "High Executor Anselm requests your report." - -enum -{ - GOSSIP_TEXTID_DARK_RANGER_LYANA1 = 11586, - GOSSIP_TEXTID_DARK_RANGER_LYANA2 = 11588, - SPELL_DARK_RANGER_LYANA_KILL_CREDIT = 42799 -}; - -bool GossipHello_npc_dark_ranger_lyana(Player* pPlayer, Creature* pCreature) -{ - if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); - - if (pPlayer->GetQuestStatus(QUEST_REPORTS_FROM_THE_FIELD) == QUEST_STATUS_INCOMPLETE) - { - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_DARK_RANGER_LYANA, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_DARK_RANGER_LYANA1, pCreature->GetObjectGuid()); - } - else - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); - - return true; -} - -bool GossipSelect_npc_dark_ranger_lyana(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) -{ - switch(uiAction) - { - case GOSSIP_ACTION_INFO_DEF+1: - pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_DARK_RANGER_LYANA2, pCreature->GetObjectGuid()); - pCreature->CastSpell(pPlayer, SPELL_DARK_RANGER_LYANA_KILL_CREDIT, true); - break; - } - - return true; -} - -/*###### -## npc_greer_orehammer -######*/ - -enum -{ - GOSSIP_ITEM_TAXI = -3000106, - GOSSIP_ITEM_GET_BOMBS = -3000107, - GOSSIP_ITEM_FLIGHT = -3000108, - - QUEST_MISSION_PLAGUE_THIS = 11332, - ITEM_PRECISION_BOMBS = 33634, - TAXI_PATH_PLAGUE_THIS = 745, -}; - -bool GossipHello_npc_greer_orehammer(Player* pPlayer, Creature* pCreature) -{ - if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); - - if (pPlayer->GetQuestStatus(QUEST_MISSION_PLAGUE_THIS) == QUEST_STATUS_INCOMPLETE) - { - if (!pPlayer->HasItemCount(ITEM_PRECISION_BOMBS, 1, true)) - pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_GET_BOMBS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); - - pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_FLIGHT, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); - } - - if (pCreature->isTaxi()) - pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_TAXI, GOSSIP_ITEM_TAXI, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); - - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); - - return true; -} - -bool GossipSelect_npc_greer_orehammer(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) -{ - switch(uiAction) - { - case GOSSIP_ACTION_INFO_DEF + 1: - if (Item* pItem = pPlayer->StoreNewItemInInventorySlot(ITEM_PRECISION_BOMBS, 10)) - pPlayer->SendNewItem(pItem, 10, true, false); - - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF + 2: - pPlayer->CLOSE_GOSSIP_MENU(); - pPlayer->ActivateTaxiPathTo(TAXI_PATH_PLAGUE_THIS); - break; - case GOSSIP_ACTION_INFO_DEF + 3: - pPlayer->GetSession()->SendTaxiMenu(pCreature); - break; - } - - return true; -} - /*###### ## npc_silvermoon_harry ######*/ @@ -591,24 +446,6 @@ void AddSC_howling_fjord() pNewScript->pQuestAcceptNPC = &QuestAccept_npc_daegarn; pNewScript->RegisterSelf(); - pNewScript = new Script; - pNewScript->Name = "npc_deathstalker_razael"; - pNewScript->pGossipHello = &GossipHello_npc_deathstalker_razael; - pNewScript->pGossipSelect = &GossipSelect_npc_deathstalker_razael; - pNewScript->RegisterSelf(); - - pNewScript = new Script; - pNewScript->Name = "npc_dark_ranger_lyana"; - pNewScript->pGossipHello = &GossipHello_npc_dark_ranger_lyana; - pNewScript->pGossipSelect = &GossipSelect_npc_dark_ranger_lyana; - pNewScript->RegisterSelf(); - - pNewScript = new Script; - pNewScript->Name = "npc_greer_orehammer"; - pNewScript->pGossipHello = &GossipHello_npc_greer_orehammer; - pNewScript->pGossipSelect = &GossipSelect_npc_greer_orehammer; - pNewScript->RegisterSelf(); - pNewScript = new Script; pNewScript->Name = "npc_silvermoon_harry"; pNewScript->GetAI = &GetAI_npc_silvermoon_harry; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 5bc6e00d0..6fe594c72 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2552" + #define SD2_REVISION_NR "2553" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index e97105b4d..8e2dd1c7d 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -688,9 +688,6 @@ DELETE FROM scripted_areatrigger WHERE entry=4778; INSERT INTO scripted_areatrigger VALUES (4778,'at_ancient_male_vrykul'); UPDATE creature_template SET ScriptName='npc_ancient_male_vrykul' WHERE entry=24314; UPDATE creature_template SET ScriptName='npc_daegarn' WHERE entry=24151; -UPDATE creature_template SET ScriptName='npc_deathstalker_razael' WHERE entry=23998; -UPDATE creature_template SET ScriptName='npc_dark_ranger_lyana' WHERE entry=23778; -UPDATE creature_template SET ScriptName='npc_greer_orehammer' WHERE entry=23859; UPDATE creature_template SET ScriptName='npc_silvermoon_harry' WHERE entry=24539; /* */ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 2a8839e70..a2e395674 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -4112,9 +4112,9 @@ INSERT INTO gossip_texts (entry,content_default,comment) VALUES (-3000103,'I am ready to travel to you village now.','rainspeaker GOSSIP_ITEM_READY'), (-3000104,'','mosswalker victim GOSSIP_ITEM_PULSE'), (-3000105,'Ezekiel said that you might have a certain book...','dirty larry GOSSIP_ITEM_BOOK'), -(-3000106,'Show me where I can fly.','greer orehammer GOSSIP_ITEM_TAXI'), -(-3000107,'[PH] Get Presicion Bombs','greer orehammer GOSSIP_ITEM_GET_BOMBS'), -(-3000108,'[PH] Start bombing mission','greer orehammer GOSSIP_ITEM_FLIGHT'), +(-3000106,'REUSE ME','REUSE ME'), +(-3000107,'REUSE ME','REUSE ME'), +(-3000108,'REUSE ME','REUSE ME'), (-3000109,'I am ready, Oronok. Let us destroy Cyrukh and free the elements!','oronok torn-heart GOSSIP_ITEM_FIGHT'); -- -3 033 000 SHADOWFANG KEEP @@ -4146,6 +4146,7 @@ INSERT INTO gossip_texts (entry,content_default,comment) VALUES -- -3 560 000 ESCAPE FROM DURNHOLDE (OLD HILLSBRAD) INSERT INTO gossip_texts (entry,content_default,comment) VALUES +(-3560000,'REUSE ME','REUSE ME'), (-3560001,'I need a pack of Incendiary Bombs.','erozion GOSSIP_ITEM_NEED_BOMBS'), (-3560002,'Taretha cannot see you, Thrall.','thrall GOSSIP_ITEM_SKARLOC1'), (-3560003,'The situation is rather complicated, Thrall. It would be best for you to head into the mountains now, before more of Blackmoore\'s men show up. We\'ll make sure Taretha is safe.','thrall GOSSIP_ITEM_SKARLOC2'), diff --git a/sql/updates/r2553_mangos.sql b/sql/updates/r2553_mangos.sql new file mode 100644 index 000000000..4e0713274 --- /dev/null +++ b/sql/updates/r2553_mangos.sql @@ -0,0 +1,3 @@ +UPDATE creature_template SET ScriptName='' WHERE entry=23998; +UPDATE creature_template SET ScriptName='' WHERE entry=23778; +UPDATE creature_template SET ScriptName='' WHERE entry=23859; diff --git a/sql/updates/r2553_scriptdev2.sql b/sql/updates/r2553_scriptdev2.sql new file mode 100644 index 000000000..a1d04e707 --- /dev/null +++ b/sql/updates/r2553_scriptdev2.sql @@ -0,0 +1,6 @@ +DELETE FROM gossip_texts WHERE entry IN (-3000106,-3000107,-3000108,-3560000); +INSERT INTO gossip_texts (entry,content_default,comment) VALUES +(-3000106,'REUSE ME','REUSE ME'), +(-3000107,'REUSE ME','REUSE ME'), +(-3000108,'REUSE ME','REUSE ME'), +(-3560000,'REUSE ME','REUSE ME'); From 5b0998cf37cead3a42f0193030719f3f7cdf4ea0 Mon Sep 17 00:00:00 2001 From: michalpolko Date: Thu, 17 May 2012 01:23:10 +0300 Subject: [PATCH 0542/1172] [2554] Implement script for Lady Deathwhisper - Icecrown Citadel Notes: summoned adds will be handled by eventAI spells 70895, 70896, 70897 require core support spell 71363 requires core targeting support Signed-off-by: Xfurry --- .../boss_lady_deathwhisper.cpp | 407 +++++++++++++++++- sd2_revision_nr.h | 2 +- 2 files changed, 405 insertions(+), 4 deletions(-) diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lady_deathwhisper.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lady_deathwhisper.cpp index 30a3f52b6..1d41ccca5 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lady_deathwhisper.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lady_deathwhisper.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: boss_lady_deathwhisper -SD%Complete: 20% -SDComment: Basic script +SD%Complete: 95% +SDComment: Minor adjustments may be required SDCategory: Icecrown Citadel EndScriptData */ @@ -26,6 +26,7 @@ EndScriptData */ enum { + // yells SAY_AGGRO = -1631018, SAY_PHASE_TWO = -1631019, SAY_DARK_EMPOWERMENT = -1631020, @@ -36,8 +37,37 @@ enum SAY_DEATH = -1631025, SAY_SLAY_1 = -1631026, SAY_SLAY_2 = -1631027, + + // spells - phase 1 + SPELL_SHADOW_CHANNELING = 43897, + SPELL_MANA_BARRIER = 70842, + SPELL_SHADOW_BOLT = 71254, + + // phase 2 + SPELL_INSIGNIFICANCE = 71204, + SPELL_FROSTBOLT = 71420, + SPELL_FROSTBOLT_VOLLEY = 72905, + SPELL_SUMMON_SPIRIT = 71363, // triggers 71426 + + // common + SPELL_BERSERK = 26662, + SPELL_DOMINATE_MIND = 71289, + SPELL_DEATH_AND_DECAY = 71001, + SPELL_DARK_EMPOWERMENT = 70896, // dummy - triggers 70901 - only on Adherents - transforms target into 38136 + SPELL_DARK_TRANSFORMATION = 70895, // dummy - triggers 70900 - only on Fanatics - transforms target into 38135 + SPELL_DARK_MARTYRDOM = 70897, // dummy - triggers 70903 on Adherents or 71236 on Fanatics + //SPELL_SUMMON_ADHERENT = 70820, // cast by the stalkers - only server side + //SPELL_SUMMON_FANATIC = 70819, // cast by the stalkers - only server side + + // npcs + NPC_CULT_ADHERENT = 37949, + NPC_CULT_FANATIC = 37890, + NPC_VENGEFUL_SHADE = 38222, // has aura 71494 }; +static const uint32 aLeftSummonedCultists[3] = {NPC_CULT_ADHERENT, NPC_CULT_FANATIC, NPC_CULT_ADHERENT}; +static const uint32 aRightSummonedCultists[3] = {NPC_CULT_FANATIC, NPC_CULT_ADHERENT, NPC_CULT_FANATIC}; + struct MANGOS_DLL_DECL boss_lady_deathwhisperAI : public ScriptedAI { boss_lady_deathwhisperAI(Creature* pCreature) : ScriptedAI(pCreature) @@ -48,16 +78,72 @@ struct MANGOS_DLL_DECL boss_lady_deathwhisperAI : public ScriptedAI instance_icecrown_citadel* m_pInstance; + bool m_bIsPhaseOne; + bool m_bIsLeftSideSummon; + + uint32 m_uiBerserkTimer; + uint32 m_uiSummonWaveTimer; + uint32 m_uiCultistBuffTimer; + uint32 m_uiDarkMartyrdomTimer; + uint32 m_uiTouchOfInsignificanceTimer; + uint32 m_uiShadowBoltTimer; + uint32 m_uiDeathAndDecayTimer; + uint32 m_uiFrostboltTimer; + uint32 m_uiFrostboltVolleyTimer; + uint32 m_uiDominateMindTimer; + uint32 m_uiVengefulShadeTimer; + + uint8 m_uiMindControlCount; + + GUIDList m_lCultistSpawnedGuidList; + GUIDVector m_vRightStalkersGuidVector; + GUIDVector m_vLeftStalkersGuidVector; + ObjectGuid m_middleStalkerGuid; + void Reset() { + m_bIsPhaseOne = true; + m_bIsLeftSideSummon = roll_chance_i(50) ? true : false; + m_uiBerserkTimer = 10*MINUTE*IN_MILLISECONDS; + m_uiSummonWaveTimer = 10000; + m_uiCultistBuffTimer = 0; + m_uiDarkMartyrdomTimer = 30000; + m_uiTouchOfInsignificanceTimer = 7000; + m_uiShadowBoltTimer = 2000; + m_uiDeathAndDecayTimer = urand(10000, 15000); + m_uiFrostboltTimer = urand(5000, 10000); + m_uiFrostboltVolleyTimer = 5000; + m_uiDominateMindTimer = urand(30000, 45000); + m_uiVengefulShadeTimer = 10000; + m_uiMindControlCount = 0; + + SetCombatMovement(false); + DoCastSpellIfCan(m_creature, SPELL_SHADOW_CHANNELING); + + // Set the max allowed mind control targets + if (m_pInstance) + { + if (m_pInstance->Is25ManDifficulty()) + m_uiMindControlCount = m_pInstance->IsHeroicDifficulty() ? 3 : 1; + else + m_uiMindControlCount = m_pInstance->IsHeroicDifficulty() ? 1 : 0; + } } void Aggro(Unit* pWho) { DoScriptText(SAY_AGGRO, m_creature); + DoCastSpellIfCan(m_creature, SPELL_MANA_BARRIER, CAST_TRIGGERED); if (m_pInstance) + { m_pInstance->SetData(TYPE_LADY_DEATHWHISPER, IN_PROGRESS); + + // Sort the summoning stalkers + GUIDList lStalkersGuidList; + m_pInstance->GetDeathwhisperStalkersList(lStalkersGuidList); + DoSortSummoningStalkers(lStalkersGuidList); + } } void KilledUnit(Unit* pVictim) @@ -83,12 +169,298 @@ struct MANGOS_DLL_DECL boss_lady_deathwhisperAI : public ScriptedAI m_pInstance->SetData(TYPE_LADY_DEATHWHISPER, FAIL); } + void JustSummoned(Creature* pSummoned) + { + switch (pSummoned->GetEntry()) + { + case NPC_CULT_ADHERENT: + case NPC_CULT_FANATIC: + m_lCultistSpawnedGuidList.push_back(pSummoned->GetObjectGuid()); + break; + } + + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + pSummoned->AI()->AttackStart(pTarget); + } + + void SummonedCreatureJustDied(Creature* pSummoned) + { + if (pSummoned->GetEntry() != NPC_VENGEFUL_SHADE) + m_lCultistSpawnedGuidList.remove(pSummoned->GetObjectGuid()); + } + + // Wrapper to help sort the summoning stalkers + void DoSortSummoningStalkers(GUIDList &lDeathwhisperStalkers) + { + std::list lRightStalkers; + std::list lLeftStalkers; + + if (!lDeathwhisperStalkers.empty()) + { + for (GUIDList::const_iterator itr = lDeathwhisperStalkers.begin(); itr != lDeathwhisperStalkers.end(); ++itr) + { + if (Creature* pStalker = m_creature->GetMap()->GetCreature(*itr)) + { + if (pStalker->GetPositionZ() > 60.0f) + m_middleStalkerGuid = pStalker->GetObjectGuid(); + else if (pStalker->GetPositionY() < 2215.0f) + lLeftStalkers.push_back(pStalker); + else + lRightStalkers.push_back(pStalker); + } + } + + lLeftStalkers.sort(sortFromNorthToSouth); + lRightStalkers.sort(sortFromNorthToSouth); + + // Store the sorted stalkers in a vector for each side + for (std::list::const_iterator itr = lLeftStalkers.begin(); itr != lLeftStalkers.end(); ++itr) + m_vLeftStalkersGuidVector.push_back((*itr)->GetObjectGuid()); + for (std::list::const_iterator itr = lRightStalkers.begin(); itr != lRightStalkers.end(); ++itr) + m_vRightStalkersGuidVector.push_back((*itr)->GetObjectGuid()); + } + } + + static bool sortFromNorthToSouth(Creature* pFirst, Creature* pSecond) + { + return pFirst && pSecond && pFirst->GetPositionX() < pSecond->GetPositionX(); + } + + // Wrapper to select a random cultist + Creature* DoSelectRandomCultist(uint32 uiEntry = 0) + { + std::vector vCultists; + vCultists.reserve(m_lCultistSpawnedGuidList.size()); + + for (GUIDList::const_iterator itr = m_lCultistSpawnedGuidList.begin(); itr != m_lCultistSpawnedGuidList.end(); ++itr) + { + if (Creature* pCultist = m_creature->GetMap()->GetCreature(*itr)) + { + // Allow to be sorted them by entry + if (!uiEntry) + vCultists.push_back(pCultist); + else if (pCultist->GetEntry() == uiEntry) + vCultists.push_back(pCultist); + } + } + + if (vCultists.empty()) + return NULL; + + return vCultists[urand(0, vCultists.size()-1)]; + } + + // Wrapper to handle the adds summmoning + void DoSummonCultistWave() + { + if (!m_pInstance) + return; + + // On 25 man mode we need to summon on all points + if (m_pInstance->Is25ManDifficulty()) + { + for (uint8 i = 0; i < 3; ++i) + { + if (Creature* pStalker = m_creature->GetMap()->GetCreature(m_vLeftStalkersGuidVector[i])) + m_creature->SummonCreature(aLeftSummonedCultists[i], pStalker->GetPositionX(), pStalker->GetPositionY(), pStalker->GetPositionZ(), 0, TEMPSUMMON_DEAD_DESPAWN, 0); + if (Creature* pStalker = m_creature->GetMap()->GetCreature(m_vRightStalkersGuidVector[i])) + m_creature->SummonCreature(aRightSummonedCultists[i], pStalker->GetPositionX(), pStalker->GetPositionY(), pStalker->GetPositionZ(), 0, TEMPSUMMON_DEAD_DESPAWN, 0); + } + + if (Creature* pStalker = m_creature->GetMap()->GetCreature(m_middleStalkerGuid)) + m_creature->SummonCreature(roll_chance_i(50) ? NPC_CULT_FANATIC : NPC_CULT_ADHERENT, pStalker->GetPositionX(), pStalker->GetPositionY(), pStalker->GetPositionZ(), 0.0f, TEMPSUMMON_CORPSE_DESPAWN, 0); + } + // On 10 man mode we summon on the left or on the right + else + { + // Summon just 1 add in phase 2 heroic + if (m_pInstance->IsHeroicDifficulty() && !m_bIsPhaseOne) + { + if (Creature* pStalker = m_creature->GetMap()->GetCreature(m_middleStalkerGuid)) + m_creature->SummonCreature(roll_chance_i(50) ? NPC_CULT_FANATIC : NPC_CULT_ADHERENT, pStalker->GetPositionX(), pStalker->GetPositionY(), pStalker->GetPositionZ(), 0.0f, TEMPSUMMON_CORPSE_DESPAWN, 0); + } + else + { + GUIDVector vTempVector = m_bIsLeftSideSummon ? m_vLeftStalkersGuidVector : m_vRightStalkersGuidVector; + for (uint8 i = 0; i < 3; ++i) + { + if (Creature* pStalker = m_creature->GetMap()->GetCreature(vTempVector[i])) + m_creature->SummonCreature(m_bIsLeftSideSummon ? aLeftSummonedCultists[i] : aRightSummonedCultists[i], pStalker->GetPositionX(), pStalker->GetPositionY(), pStalker->GetPositionZ(), 0, TEMPSUMMON_DEAD_DESPAWN, 0); + } + + // change sides for next summoning + m_bIsLeftSideSummon = !m_bIsLeftSideSummon; + } + } + } + + // Wrapper to handle the second phase start + void DoStartSecondPhase() + { + DoScriptText(SAY_PHASE_TWO, m_creature); + SetCombatMovement(true); + m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); + m_bIsPhaseOne = false; + } + void UpdateAI(const uint32 uiDiff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - DoMeleeAttackIfReady(); + if (m_uiBerserkTimer) + { + if (m_uiBerserkTimer <= uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_BERSERK) == CAST_OK) + { + DoScriptText(SAY_BERSERK, m_creature); + m_uiBerserkTimer = 0; + } + } + else + m_uiBerserkTimer -= uiDiff; + } + + if (m_uiDeathAndDecayTimer < uiDiff) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1)) + { + if (DoCastSpellIfCan(pTarget, SPELL_DEATH_AND_DECAY) == CAST_OK) + m_uiDeathAndDecayTimer = 20000; + } + } + else + m_uiDeathAndDecayTimer -= uiDiff; + + if (m_uiMindControlCount) + { + if (m_uiDominateMindTimer < uiDiff) + { + for (uint8 i = 0; i < m_uiMindControlCount; ++i) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1, SPELL_DOMINATE_MIND, SELECT_FLAG_PLAYER)) + DoCastSpellIfCan(pTarget, SPELL_DOMINATE_MIND, CAST_TRIGGERED); + } + + DoScriptText(SAY_DOMINATE_MIND, m_creature); + m_uiDominateMindTimer = 40000; + } + else + m_uiDominateMindTimer -= uiDiff; + } + + // Summon waves - in phase 1 or on heroic + if (m_pInstance && (m_pInstance->IsHeroicDifficulty() || m_bIsPhaseOne)) + { + if (m_uiSummonWaveTimer < uiDiff) + { + DoSummonCultistWave(); + m_uiCultistBuffTimer = 10000; + m_uiDarkMartyrdomTimer = 40000; + m_uiSummonWaveTimer = m_pInstance->IsHeroicDifficulty() ? 45000: 60000; + } + else + m_uiSummonWaveTimer -= uiDiff; + + if (m_uiCultistBuffTimer) + { + if (m_uiCultistBuffTimer <= uiDiff) + { + // Choose a random of Fanatic or Adherent + bool bIsFanatic = roll_chance_i(50) ? true : false; + uint32 uiNpcEntry = bIsFanatic ? NPC_CULT_FANATIC : NPC_CULT_ADHERENT; + uint32 uiSpellEntry = bIsFanatic ? SPELL_DARK_TRANSFORMATION : SPELL_DARK_EMPOWERMENT; + int32 iTextEntry = bIsFanatic ? SAY_DARK_TRANSFORMATION : SAY_DARK_EMPOWERMENT; + + Creature* pTarget = DoSelectRandomCultist(uiNpcEntry); + if (pTarget && DoCastSpellIfCan(pTarget, uiSpellEntry) == CAST_OK) + { + // Remove the selected cultist from the list because we don't want it selected twice + m_lCultistSpawnedGuidList.remove(pTarget->GetObjectGuid()); + DoScriptText(iTextEntry, m_creature); + m_uiCultistBuffTimer = 0; + } + } + else + m_uiCultistBuffTimer -= uiDiff; + } + + if (m_uiDarkMartyrdomTimer) + { + if (m_uiDarkMartyrdomTimer <= uiDiff) + { + // Try to get a target on which to cast Martyrdom + if (Creature* pTarget = DoSelectRandomCultist()) + { + if (DoCastSpellIfCan(pTarget, SPELL_DARK_MARTYRDOM) == CAST_OK) + { + DoScriptText(SAY_ANIMATE_DEAD, m_creature); + m_uiDarkMartyrdomTimer = 0; + } + } + else + m_uiDarkMartyrdomTimer = 0; + } + else + m_uiDarkMartyrdomTimer -= uiDiff; + } + } + + // Phase 1 specific spells + if (m_bIsPhaseOne) + { + if (m_uiShadowBoltTimer < uiDiff) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, SPELL_SHADOW_BOLT) == CAST_OK) + m_uiShadowBoltTimer = 2000; + } + } + else + m_uiShadowBoltTimer -= uiDiff; + } + // Phase 2 specific spells + else + { + if (m_uiTouchOfInsignificanceTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_INSIGNIFICANCE) == CAST_OK) + m_uiTouchOfInsignificanceTimer = 7000; + } + else + m_uiTouchOfInsignificanceTimer -= uiDiff; + + if (m_uiFrostboltTimer < uiDiff) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, SPELL_FROSTBOLT) == CAST_OK) + m_uiFrostboltTimer = urand(2000, 4000); + } + } + else + m_uiFrostboltTimer -= uiDiff; + + if (m_uiFrostboltVolleyTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_FROSTBOLT_VOLLEY) == CAST_OK) + m_uiFrostboltVolleyTimer = urand(15000, 20000); + } + else + m_uiFrostboltVolleyTimer -= uiDiff; + + if (m_uiVengefulShadeTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_SUMMON_SPIRIT) == CAST_OK) + m_uiVengefulShadeTimer = 10000; + } + else + m_uiVengefulShadeTimer -= uiDiff; + + DoMeleeAttackIfReady(); + } } }; @@ -97,6 +469,34 @@ CreatureAI* GetAI_boss_lady_deathwhisper(Creature* pCreature) return new boss_lady_deathwhisperAI(pCreature); } +bool EffectDummyCreature_spell_mana_barrier(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) +{ + //always check spellid and effectindex + if (uiSpellId == SPELL_MANA_BARRIER && uiEffIndex == EFFECT_INDEX_0) + { + uint32 uiDamage = pCreatureTarget->GetMaxHealth() - pCreatureTarget->GetHealth(); + if (!uiDamage) + return true; + + if (pCreatureTarget->GetPower(POWER_MANA) < uiDamage) + { + uiDamage = pCreatureTarget->GetPower(POWER_MANA); + pCreatureTarget->RemoveAurasDueToSpell(SPELL_MANA_BARRIER); + + if (boss_lady_deathwhisperAI* pBossAI = dynamic_cast(pCreatureTarget->AI())) + pBossAI->DoStartSecondPhase(); + } + + pCreatureTarget->DealHeal(pCreatureTarget, uiDamage, GetSpellStore()->LookupEntry(SPELL_MANA_BARRIER)); + pCreatureTarget->ModifyPower(POWER_MANA, -int32(uiDamage)); + + //always return true when we are handling this spell and effect + return true; + } + + return false; +} + void AddSC_boss_lady_deathwhisper() { Script* pNewScript; @@ -104,5 +504,6 @@ void AddSC_boss_lady_deathwhisper() pNewScript = new Script; pNewScript->Name = "boss_lady_deathwhisper"; pNewScript->GetAI = &GetAI_boss_lady_deathwhisper; + pNewScript->pEffectDummyNPC = &EffectDummyCreature_spell_mana_barrier; pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 6fe594c72..8ed2a849e 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2553" + #define SD2_REVISION_NR "2554" #endif // __SD2_REVISION_NR_H__ From 2d2af47f04883be015213696c4fed156115e00e6 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Thu, 17 May 2012 10:41:18 +0300 Subject: [PATCH 0543/1172] [2555] Cleanup and improve script for Fankriss - AQ40 Notes: spells 720, 1121, 518, 25831, 25832 required database support --- .../temple_of_ahnqiraj/boss_fankriss.cpp | 165 ++++++++---------- sd2_revision_nr.h | 2 +- 2 files changed, 76 insertions(+), 91 deletions(-) diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_fankriss.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_fankriss.cpp index b5fa403bf..e61912c82 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/boss_fankriss.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_fankriss.cpp @@ -23,134 +23,119 @@ EndScriptData */ #include "precompiled.h" -#define SOUND_SENTENCE_YOU 8588 -#define SOUND_SERVE_TO 8589 -#define SOUND_LAWS 8590 -#define SOUND_TRESPASS 8591 -#define SOUND_WILL_BE 8592 - -#define SPELL_MORTAL_WOUND 28467 -#define SPELL_ROOT 28858 +enum +{ + SOUND_SENTENCE_YOU = 8588, + SOUND_SERVE_TO = 8589, + SOUND_LAWS = 8590, + SOUND_TRESPASS = 8591, + SOUND_WILL_BE = 8592, + + SPELL_MORTAL_WOUND = 25646, + SPELL_ENTANGLE_1 = 720, + SPELL_ENTANGLE_2 = 731, + SPELL_ENTANGLE_3 = 1121, + SPELL_SUMMON_WORM_1 = 518, + SPELL_SUMMON_WORM_2 = 25831, + SPELL_SUMMON_WORM_3 = 25832, + + NPC_SPAWN_FANKRISS = 15630, + NPC_VEKNISS_HATCHLING = 15962, +}; -// Enrage for his spawns -#define SPELL_ENRAGE 28798 +static const uint32 aSummonWormSpells[3] = {SPELL_SUMMON_WORM_1, SPELL_SUMMON_WORM_2, SPELL_SUMMON_WORM_3}; +static const uint32 aEntangleSpells[3] = {SPELL_ENTANGLE_1, SPELL_ENTANGLE_2, SPELL_ENTANGLE_3}; struct MANGOS_DLL_DECL boss_fankrissAI : public ScriptedAI { - boss_fankrissAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + boss_fankrissAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } - uint32 MortalWound_Timer; - uint32 SpawnHatchlings_Timer; - uint32 SpawnSpawns_Timer; - int Rand; - int RandX; - int RandY; + uint32 m_uiMortalWoundTimer; + uint32 m_uiSummonWormTimer; + uint32 m_uiEntangleTimer; + uint32 m_uiEntangleSummonTimer; - Creature* Spawn; + ObjectGuid m_EntangleTargetGuid; void Reset() { - MortalWound_Timer = urand(10000, 15000); - SpawnHatchlings_Timer = urand(6000, 12000); - SpawnSpawns_Timer = urand(15000, 45000); + m_uiMortalWoundTimer = urand(10000, 15000); + m_uiSummonWormTimer = urand(30000, 50000); + m_uiEntangleTimer = urand(25000, 40000); + m_uiEntangleSummonTimer = 0; } - void SummonSpawn(Unit* pVictim) + void JustSummoned(Creature* pSummoned) { - Rand = 10 + (rand()%10); - switch(urand(0, 1)) + if (pSummoned->GetEntry() == NPC_SPAWN_FANKRISS) { - case 0: RandX = 0 - Rand; break; - case 1: RandX = 0 + Rand; break; + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + pSummoned->AI()->AttackStart(pTarget); } - Rand = 0; - Rand = 10 + (rand()%10); - switch(urand(0, 1)) + else if (pSummoned->GetEntry() == NPC_VEKNISS_HATCHLING) { - case 0: RandY = 0 - Rand; break; - case 1: RandY = 0 + Rand; break; + if (Player* pTarget = m_creature->GetMap()->GetPlayer(m_EntangleTargetGuid)) + pSummoned->AI()->AttackStart(pTarget); } - Rand = 0; - Spawn = DoSpawnCreature(15630, RandX, RandY, 0, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); - if (Spawn && pVictim) - Spawn->AI()->AttackStart(pVictim); } - void UpdateAI(const uint32 diff) + void UpdateAI(const uint32 uiDiff) { - //Return since we have no target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - //MortalWound_Timer - if (MortalWound_Timer < diff) + if (m_uiMortalWoundTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_MORTAL_WOUND); - MortalWound_Timer = urand(10000, 20000); - }else MortalWound_Timer -= diff; + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_MORTAL_WOUND) == CAST_OK) + m_uiMortalWoundTimer = urand(7000, 14000); + } + else + m_uiMortalWoundTimer -= uiDiff; - //Summon 1-3 Spawns of Fankriss at random time. - if (SpawnSpawns_Timer < diff) + if (m_uiSummonWormTimer < uiDiff) { - switch(urand(0, 2)) - { - case 0: - SummonSpawn(m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)); - break; - case 1: - SummonSpawn(m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)); - SummonSpawn(m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)); - break; - case 2: - SummonSpawn(m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)); - SummonSpawn(m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)); - SummonSpawn(m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)); - break; - } - SpawnSpawns_Timer = urand(30000, 60000); + uint8 uiSpawnIndex = urand(0, 2); + if (DoCastSpellIfCan(m_creature, aSummonWormSpells[uiSpawnIndex]) == CAST_OK) + m_uiSummonWormTimer = urand(15000, 40000); } else - SpawnSpawns_Timer -= diff; + m_uiSummonWormTimer -= uiDiff; // Teleporting Random Target to one of the three tunnels and spawn 4 hatchlings near the gamer. - //We will only telport if fankriss has more than 3% of hp so teleported gamers can always loot. - if (m_creature->GetHealthPercent() > 3.0f) + if (m_uiEntangleTimer < uiDiff) { - if (SpawnHatchlings_Timer< diff) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0, uint32(0), SELECT_FLAG_PLAYER)) { - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0, SPELL_ROOT, SELECT_FLAG_PLAYER)) + uint8 uiEntangleIndex = urand(0, 2); + if (DoCastSpellIfCan(pTarget, aEntangleSpells[uiEntangleIndex]) == CAST_OK) { - DoCastSpellIfCan(pTarget, SPELL_ROOT); - - if (m_creature->getThreatManager().getThreat(pTarget)) - m_creature->getThreatManager().modifyThreatPercent(pTarget, -100); + m_EntangleTargetGuid = pTarget->GetObjectGuid(); + m_uiEntangleSummonTimer = 1000; + m_uiEntangleTimer = urand(40000, 70000); + } + } + } + else + m_uiEntangleTimer -= uiDiff; - switch(urand(0, 2)) + // Summon 4 Hatchlings around the target + if (m_uiEntangleSummonTimer) + { + if (m_uiEntangleSummonTimer <= uiDiff) + { + if (Player* pTarget = m_creature->GetMap()->GetPlayer(m_EntangleTargetGuid)) + { + float fX, fY, fZ; + for (uint8 i = 0; i < 4; ++i) { - case 0: - DoTeleportPlayer(pTarget, -8106.0142f, 1289.2900f, -74.419533f, 5.112f); - break; - case 1: - DoTeleportPlayer(pTarget, -7990.135354f, 1155.1907f, -78.849319f, 2.608f); - break; - case 2: - DoTeleportPlayer(pTarget, -8159.7753f, 1127.9064f, -76.868660f, 0.675f); - break; + m_creature->GetRandomPoint(pTarget->GetPositionX(), pTarget->GetPositionY(), pTarget->GetPositionZ(), 3.0f, fX, fY, fZ); + m_creature->SummonCreature(NPC_VEKNISS_HATCHLING, fX, fY, fZ, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 10000); } - Creature* pHatchling = NULL; - if (pHatchling = m_creature->SummonCreature(15962, pTarget->GetPositionX()-3, pTarget->GetPositionY()-3, pTarget->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000)) - pHatchling->AI()->AttackStart(pTarget); - if (pHatchling = m_creature->SummonCreature(15962, pTarget->GetPositionX()-3, pTarget->GetPositionY()+3, pTarget->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000)) - pHatchling->AI()->AttackStart(pTarget); - if (pHatchling = m_creature->SummonCreature(15962, pTarget->GetPositionX()-5, pTarget->GetPositionY()-5, pTarget->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000)) - pHatchling->AI()->AttackStart(pTarget); - if (pHatchling = m_creature->SummonCreature(15962, pTarget->GetPositionX()-5, pTarget->GetPositionY()+5, pTarget->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000)) - pHatchling->AI()->AttackStart(pTarget); + m_uiEntangleSummonTimer = 0; } - SpawnHatchlings_Timer = urand(45000, 60000); } else - SpawnHatchlings_Timer -= diff; + m_uiEntangleSummonTimer -= uiDiff; } DoMeleeAttackIfReady(); diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 8ed2a849e..b47cd4ae2 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2554" + #define SD2_REVISION_NR "2555" #endif // __SD2_REVISION_NR_H__ From 1727757bad05a10c166175abd2e5ada2bb9e5ecd Mon Sep 17 00:00:00 2001 From: Xfurry Date: Thu, 17 May 2012 11:39:02 +0300 Subject: [PATCH 0544/1172] [2556] Implement a very basic script and add some more documentation for Viscidus - AQ40 --- .../temple_of_ahnqiraj/boss_viscidus.cpp | 74 +++++++++++++++++-- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 2 +- sql/updates/r2556_mangos.sql | 1 + 4 files changed, 71 insertions(+), 8 deletions(-) create mode 100644 sql/updates/r2556_mangos.sql diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_viscidus.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_viscidus.cpp index 70fded3c8..0d6d393d5 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/boss_viscidus.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_viscidus.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: Boss_Viscidus -SD%Complete: 0 -SDComment: place holder +SD%Complete: 40 +SDComment: Only basic spells - freeze and explode events require more research SDCategory: Temple of Ahn'Qiraj EndScriptData */ @@ -28,8 +28,7 @@ enum // Timer spells SPELL_POISON_SHOCK = 25993, SPELL_POISONBOLT_VOLLEY = 25991, - SPELL_TOXIN = 26575, // Triggers toxin cloud - SPELL_TOXIN_CLOUD = 25989, + SPELL_TOXIN = 26575, // Triggers toxin cloud - 25989 // Debuffs gained by the boss on frost damage SPELL_VISCIDUS_SLOWED = 26034, @@ -38,12 +37,75 @@ enum // When frost damage exceeds a certain limit, then boss explodes SPELL_REJOIN_VISCIDUS = 25896, - SPELL_VISCIDUS_EXPLODE = 25938, // Casts a lot of spells in the same time: 25865 to 25884; All spells have target coords - SPELL_VISCIDUS_SUICIDE = 26003, + SPELL_VISCIDUS_EXPLODE = 25938, + SPELL_VISCIDUS_SUICIDE = 26003, // cast when boss explodes and is below 5% Hp - should trigger 26002 + + //SPELL_MEMBRANE_VISCIDUS = 25994, // damage reduction spell - removed from DBC + //SPELL_VISCIDUS_WEAKNESS = 25926, // aura which procs at damage - should trigger the slow spells - removed from DBC + //SPELL_VISCIDUS_SHRINKS = 25893, // removed from DBC + //SPELL_VISCIDUS_SHRINKS_2 = 27934, // removed from DBC + //SPELL_VISCIDUS_GROWS = 25897, // removed from DBC + //SPELL_SUMMON_GLOBS = 25885, // summons npc 15667 using spells from 25865 to 25884; All spells have target coords - removed from DBC + //SPELL_VISCIDUS_TELEPORT = 25904, // removed from DBC + //SPELL_SUMMONT_TRIGGER = 26564, // summons 15992 - removed from DBC NPC_GLOB_OF_VISCIDUS = 15667 }; +struct MANGOS_DLL_DECL boss_viscidusAI : public ScriptedAI +{ + boss_viscidusAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } + + uint32 m_uiPoisonShockTimer; + uint32 m_uiPoisonBoltVolleyTimer; + + void Reset() + { + m_uiPoisonShockTimer = urand(7000, 12000); + m_uiPoisonBoltVolleyTimer = urand(10000, 15000); + } + + void Aggro(Unit* pWho) + { + DoCastSpellIfCan(m_creature, SPELL_TOXIN); + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_uiPoisonShockTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_POISON_SHOCK) == CAST_OK) + m_uiPoisonShockTimer = urand(7000, 12000); + } + else + m_uiPoisonShockTimer -= uiDiff; + + if (m_uiPoisonBoltVolleyTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_POISONBOLT_VOLLEY) == CAST_OK) + m_uiPoisonBoltVolleyTimer = urand(10000, 15000); + } + else + m_uiPoisonBoltVolleyTimer -= uiDiff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_viscidus(Creature* pCreature) +{ + return new boss_viscidusAI(pCreature); +} + void AddSC_boss_viscidus() { + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_viscidus"; + pNewScript->GetAI = &GetAI_boss_viscidus; + pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index b47cd4ae2..69e2657fa 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2555" + #define SD2_REVISION_NR "2556" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 8e2dd1c7d..f06093794 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -1165,7 +1165,7 @@ UPDATE creature_template SET ScriptName='boss_yauj' WHERE entry=15543; UPDATE creature_template SET ScriptName='boss_kri' WHERE entry=15511; UPDATE creature_template SET ScriptName='boss_sartura' WHERE entry=15516; UPDATE creature_template SET ScriptName='boss_fankriss' WHERE entry=15510; --- UPDATE creature_template SET ScriptName='boss_viscidus' WHERE entry=15299; +UPDATE creature_template SET ScriptName='boss_viscidus' WHERE entry=15299; -- UPDATE creature_template SET ScriptName='boss_glob_of_viscidus' WHERE entry=15667; UPDATE creature_template SET ScriptName='boss_huhuran' WHERE entry=15509; UPDATE creature_template SET ScriptName='boss_veklor' WHERE entry=15276; diff --git a/sql/updates/r2556_mangos.sql b/sql/updates/r2556_mangos.sql new file mode 100644 index 000000000..fa9a05fc3 --- /dev/null +++ b/sql/updates/r2556_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='boss_viscidus' WHERE entry=15299; From 23b18b862ddd925147f95111380b5c3b82b2ddbb Mon Sep 17 00:00:00 2001 From: Xfurry Date: Fri, 18 May 2012 23:49:16 +0300 Subject: [PATCH 0545/1172] [2557] Major cleanup and rewrite of the Dark Portal instance script Notes: Removed all major hacks and workarounds - currently we are using dummy effect spells for event control Allow instance data to be saved Replace the first two bosses with non loot bossed, on heroic, in case the event resets and they were already killed once Move the instance cleanup in case of wipe to database and creature linking Proper handle the Corrupt Medivh spells using creature movement, rather than MoveInLineOfSight ToDo: some trash mobs eventAI scripts may need adjustments event epilogue and the portal opening visuals are not implemented Thanks to X-Savior for providing the proper research data and to NeatElves for helping us with the gossip script --- .../dark_portal/boss_aeonus.cpp | 4 - .../dark_portal/boss_chrono_lord_deja.cpp | 21 +- .../dark_portal/boss_temporus.cpp | 21 +- .../dark_portal/dark_portal.cpp | 471 +++++++++--------- .../caverns_of_time/dark_portal/dark_portal.h | 136 +++-- .../dark_portal/instance_dark_portal.cpp | 434 ++++++++++------ sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 7 +- sql/updates/r2557_mangos.sql | 6 + 9 files changed, 649 insertions(+), 453 deletions(-) create mode 100644 sql/updates/r2557_mangos.sql diff --git a/scripts/kalimdor/caverns_of_time/dark_portal/boss_aeonus.cpp b/scripts/kalimdor/caverns_of_time/dark_portal/boss_aeonus.cpp index 1672289ea..91aeaa949 100644 --- a/scripts/kalimdor/caverns_of_time/dark_portal/boss_aeonus.cpp +++ b/scripts/kalimdor/caverns_of_time/dark_portal/boss_aeonus.cpp @@ -26,7 +26,6 @@ EndScriptData */ enum { - SAY_ENTER = -1269012, SAY_AGGRO = -1269013, SAY_BANISH = -1269014, SAY_SLAY1 = -1269015, @@ -89,9 +88,6 @@ struct MANGOS_DLL_DECL boss_aeonusAI : public ScriptedAI void JustDied(Unit* pKiller) { DoScriptText(SAY_DEATH, m_creature); - - if (m_pInstance) - m_pInstance->SetData(TYPE_RIFT, DONE); } void KilledUnit(Unit* pVictim) diff --git a/scripts/kalimdor/caverns_of_time/dark_portal/boss_chrono_lord_deja.cpp b/scripts/kalimdor/caverns_of_time/dark_portal/boss_chrono_lord_deja.cpp index 7014e9d69..6b630aa3f 100644 --- a/scripts/kalimdor/caverns_of_time/dark_portal/boss_chrono_lord_deja.cpp +++ b/scripts/kalimdor/caverns_of_time/dark_portal/boss_chrono_lord_deja.cpp @@ -26,7 +26,6 @@ EndScriptData */ enum { - SAY_ENTER = -1269006, SAY_AGGRO = -1269007, SAY_BANISH = -1269008, SAY_SLAY1 = -1269009, @@ -94,9 +93,6 @@ struct MANGOS_DLL_DECL boss_chrono_lord_dejaAI : public ScriptedAI void JustDied(Unit* pVictim) { DoScriptText(SAY_DEATH, m_creature); - - if (m_pInstance) - m_pInstance->SetData(TYPE_RIFT, SPECIAL); } void UpdateAI(const uint32 uiDiff) @@ -153,6 +149,22 @@ CreatureAI* GetAI_boss_chrono_lord_deja(Creature* pCreature) return new boss_chrono_lord_dejaAI(pCreature); } +bool EffectAuraDummy_boss_chrono_lord_deja(const Aura* pAura, bool bApply) +{ + // Despawn the Time Rift when the aura is canceled + if (pAura->GetId() == SPELL_RIFT_CHANNEL && pAura->GetEffIndex() == EFFECT_INDEX_0 && !bApply) + { + if (Creature* pCaster = (Creature*)pAura->GetCaster()) + { + if (ScriptedInstance* pInstance = (ScriptedInstance*)pCaster->GetInstanceData()) + pInstance->SetData(TYPE_TIME_RIFT, DONE); + + pCaster->ForcedDespawn(3000); + } + } + return true; +} + void AddSC_boss_chrono_lord_deja() { Script* pNewScript; @@ -160,5 +172,6 @@ void AddSC_boss_chrono_lord_deja() pNewScript = new Script; pNewScript->Name = "boss_chrono_lord_deja"; pNewScript->GetAI = &GetAI_boss_chrono_lord_deja; + pNewScript->pEffectAuraDummy = &EffectAuraDummy_boss_chrono_lord_deja; pNewScript->RegisterSelf(); } diff --git a/scripts/kalimdor/caverns_of_time/dark_portal/boss_temporus.cpp b/scripts/kalimdor/caverns_of_time/dark_portal/boss_temporus.cpp index 2ee135973..e01f7e45f 100644 --- a/scripts/kalimdor/caverns_of_time/dark_portal/boss_temporus.cpp +++ b/scripts/kalimdor/caverns_of_time/dark_portal/boss_temporus.cpp @@ -26,7 +26,6 @@ EndScriptData */ enum { - SAY_ENTER = -1269000, SAY_AGGRO = -1269001, SAY_BANISH = -1269002, SAY_SLAY1 = -1269003, @@ -78,9 +77,6 @@ struct MANGOS_DLL_DECL boss_temporusAI : public ScriptedAI void JustDied(Unit* pKiller) { DoScriptText(SAY_DEATH, m_creature); - - if (m_pInstance) - m_pInstance->SetData(TYPE_RIFT, SPECIAL); } void MoveInLineOfSight(Unit* pWho) @@ -152,6 +148,22 @@ CreatureAI* GetAI_boss_temporus(Creature* pCreature) return new boss_temporusAI(pCreature); } +bool EffectAuraDummy_boss_temporus(const Aura* pAura, bool bApply) +{ + // Despawn the Time Rift when the aura is canceled + if (pAura->GetId() == SPELL_RIFT_CHANNEL && pAura->GetEffIndex() == EFFECT_INDEX_0 && !bApply) + { + if (Creature* pCaster = (Creature*)pAura->GetCaster()) + { + if (ScriptedInstance* pInstance = (ScriptedInstance*)pCaster->GetInstanceData()) + pInstance->SetData(TYPE_TIME_RIFT, DONE); + + pCaster->ForcedDespawn(3000); + } + } + return true; +} + void AddSC_boss_temporus() { Script* pNewScript; @@ -159,5 +171,6 @@ void AddSC_boss_temporus() pNewScript = new Script; pNewScript->Name = "boss_temporus"; pNewScript->GetAI = &GetAI_boss_temporus; + pNewScript->pEffectAuraDummy = &EffectAuraDummy_boss_temporus; pNewScript->RegisterSelf(); } diff --git a/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.cpp b/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.cpp index 5fc50ecbe..280725e9a 100644 --- a/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.cpp +++ b/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: Dark_Portal -SD%Complete: 30 -SDComment: Misc NPC's and mobs for instance. Most here far from complete. +SD%Complete: 80 +SDComment: Some things may be still missing from here SDCategory: Caverns of Time, The Dark Portal EndScriptData */ @@ -29,33 +29,20 @@ EndContentData */ #include "precompiled.h" #include "dark_portal.h" -#define SAY_ENTER -1269020 //where does this belong? -#define SAY_INTRO -1269021 -#define SAY_WEAK75 -1269022 -#define SAY_WEAK50 -1269023 -#define SAY_WEAK25 -1269024 -#define SAY_DEATH -1269025 -#define SAY_WIN -1269026 -#define SAY_ORCS_ENTER -1269027 -#define SAY_ORCS_ANSWER -1269028 +/*###### +## npc_medivh_black_morass +######*/ -#define SPELL_CHANNEL 31556 -#define SPELL_PORTAL_RUNE 32570 //aura(portal on ground effect) - -#define SPELL_BLACK_CRYSTAL 32563 //aura -#define SPELL_PORTAL_CRYSTAL 32564 //summon - -#define SPELL_BANISH_PURPLE 32566 //aura -#define SPELL_BANISH_GREEN 32567 //aura - -#define SPELL_CORRUPT 31326 -#define SPELL_CORRUPT_AEONUS 37853 +enum +{ + SAY_DEATH = -1269025, -#define C_COUNCIL_ENFORCER 17023 + SPELL_CORRUPT = 31326, +}; -struct MANGOS_DLL_DECL npc_medivh_bmAI : public ScriptedAI +struct MANGOS_DLL_DECL npc_medivh_black_morassAI : public ScriptedAI { - npc_medivh_bmAI(Creature* pCreature) : ScriptedAI(pCreature) + npc_medivh_black_morassAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); Reset(); @@ -63,291 +50,249 @@ struct MANGOS_DLL_DECL npc_medivh_bmAI : public ScriptedAI ScriptedInstance* m_pInstance; - uint32 SpellCorrupt_Timer; - uint32 Check_Timer; + void Reset() { } - bool Life75; - bool Life50; - bool Life25; + void AttackStart(Unit* pWho) { } - void Reset() + void JustSummoned(Creature* pSummoned) { - SpellCorrupt_Timer = 0; - Check_Timer = 0; - - Life75 = true; - Life50 = true; - Life25 = true; - - if (!m_pInstance) - return; - - if (m_pInstance->GetData(TYPE_MEDIVH) == IN_PROGRESS) - m_creature->CastSpell(m_creature, SPELL_CHANNEL, true); - else if (m_creature->HasAura(SPELL_CHANNEL, EFFECT_INDEX_0)) - m_creature->RemoveAurasDueToSpell(SPELL_CHANNEL); - - m_creature->CastSpell(m_creature, SPELL_PORTAL_RUNE, true); - } - - void MoveInLineOfSight(Unit *who) - { - if (!m_pInstance) - return; - - if (who->GetTypeId() == TYPEID_PLAYER && m_creature->IsWithinDistInMap(who, 10.0f)) + // The rift trash mobs are summoned by Medivh, so we can control the movement + if (pSummoned->GetEntry() != NPC_TIME_RIFT && pSummoned->GetEntry() != NPC_COUNCIL_ENFORCER) { - if (m_pInstance->GetData(TYPE_MEDIVH) == IN_PROGRESS || m_pInstance->GetData(TYPE_MEDIVH) == DONE) - return; - - DoScriptText(SAY_INTRO, m_creature); - m_pInstance->SetData(TYPE_MEDIVH, IN_PROGRESS); - m_creature->CastSpell(m_creature, SPELL_CHANNEL, false); - Check_Timer = 5000; + float fX, fY, fZ; + m_creature->GetNearPoint(m_creature, fX, fY, fZ, 0, 20.0f, m_creature->GetAngle(pSummoned)); + pSummoned->SetWalk(false); + pSummoned->GetMotionMaster()->MovePoint(1, fX, fY, fZ); } - else if (who->GetTypeId() == TYPEID_UNIT && m_creature->IsWithinDistInMap(who, 15.0f)) - { - if (m_pInstance->GetData(TYPE_MEDIVH) != IN_PROGRESS) - return; - - uint32 entry = who->GetEntry(); - if (entry == NPC_ASSAS || entry == NPC_WHELP || entry == NPC_CHRON || entry == NPC_EXECU || entry == NPC_VANQU) - { - who->StopMoving(); - who->CastSpell(m_creature, SPELL_CORRUPT, false); - } - else if (entry == NPC_AEONUS) - { - who->StopMoving(); - who->CastSpell(m_creature, SPELL_CORRUPT_AEONUS, false); - } - } - } - - void AttackStart(Unit *who) - { - //if (m_pInstance && m_pInstance->GetData(TYPE_MEDIVH) == IN_PROGRESS) - //return; - - //ScriptedAI::AttackStart(who); } - void SpellHit(Unit* caster, const SpellEntry* spell) + void SummonedMovementInform(Creature* pSummoned, uint32 uiMotionType, uint32 uiPointId) { - if (SpellCorrupt_Timer) + if (uiMotionType != POINT_MOTION_TYPE || !uiPointId) return; - if (spell->Id == SPELL_CORRUPT_AEONUS) - SpellCorrupt_Timer = 1000; - - if (spell->Id == SPELL_CORRUPT) - SpellCorrupt_Timer = 3000; + pSummoned->CastSpell(m_creature, SPELL_CORRUPT, false); } - void JustDied(Unit* Killer) + void JustDied(Unit* pKiller) { - if (Killer->GetEntry() == m_creature->GetEntry()) - return; + if (m_pInstance) + m_pInstance->SetData(TYPE_MEDIVH, FAIL); DoScriptText(SAY_DEATH, m_creature); } - void UpdateAI(const uint32 diff) - { - if (!m_pInstance) - return; - - if (SpellCorrupt_Timer) - { - if (SpellCorrupt_Timer <= diff) - { - m_pInstance->SetData(TYPE_MEDIVH, SPECIAL); - - if (m_creature->HasAura(SPELL_CORRUPT_AEONUS, EFFECT_INDEX_0)) - SpellCorrupt_Timer = 1000; - else if (m_creature->HasAura(SPELL_CORRUPT, EFFECT_INDEX_0)) - SpellCorrupt_Timer = 3000; - else - SpellCorrupt_Timer = 0; - } - else - SpellCorrupt_Timer -= diff; - } - - if (Check_Timer) - { - if (Check_Timer <= diff) - { - uint32 pct = m_pInstance->GetData(DATA_SHIELD); - - Check_Timer = 5000; + void UpdateAI(const uint32 uiDiff) { } +}; - if (Life25 && pct <= 25) - { - DoScriptText(SAY_WEAK25, m_creature); - Life25 = false; - } - else if (Life50 && pct <= 50) - { - DoScriptText(SAY_WEAK50, m_creature); - Life50 = false; - } - else if (Life75 && pct <= 75) - { - DoScriptText(SAY_WEAK75, m_creature); - Life75 = false; - } +CreatureAI* GetAI_npc_medivh_black_morass(Creature* pCreature) +{ + return new npc_medivh_black_morassAI(pCreature); +} - //if we reach this it means event was running but at some point reset. - if (m_pInstance->GetData(TYPE_MEDIVH) == NOT_STARTED) - { - m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); - m_creature->RemoveCorpse(); - m_creature->Respawn(); - return; - } +bool EffectDummyCreature_npc_medivh_black_morass(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) +{ + //always check spellid and effectindex + if ((uiSpellId == SPELL_CORRUPT && uiEffIndex == EFFECT_INDEX_0) || (uiSpellId == SPELL_CORRUPT_AEONUS && uiEffIndex == EFFECT_INDEX_0)) + { + if (instance_dark_portal* pInstance = (instance_dark_portal*)pCreatureTarget->GetInstanceData()) + pInstance->SetData(TYPE_SHIELD, SPECIAL); - if (m_pInstance->GetData(TYPE_RIFT) == DONE) - { - DoScriptText(SAY_WIN, m_creature); - Check_Timer = 0; + //always return true when we are handling this spell and effect + return true; + } - if (m_creature->HasAura(SPELL_CHANNEL, EFFECT_INDEX_0)) - m_creature->RemoveAurasDueToSpell(SPELL_CHANNEL); + return false; +} - //TODO: start the post-event here - m_pInstance->SetData(TYPE_MEDIVH,DONE); - } - } - else - Check_Timer -= diff; - } +/*###### +## npc_time_rift +######*/ - //if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - //return; +enum +{ + SPELL_RIFT_PERIODIC = 31320, // should trigger 31388 - //DoMeleeAttackIfReady(); - } + // Boss spawn yells + SAY_CHRONO_LORD_ENTER = -1269006, + SAY_TEMPORUS_ENTER = -1269000, + SAY_AEONUS_ENTER = -1269012, }; -CreatureAI* GetAI_npc_medivh_bm(Creature* pCreature) -{ - return new npc_medivh_bmAI(pCreature); -} - -struct Wave +struct RiftWaveData { - uint32 PortalMob[4]; //spawns for portal waves (in order) + uint32 uiPortalMob[4]; // spawns for portal waves (in order) }; -static Wave PortalWaves[]= +static const RiftWaveData aPortalWaves[]= { - {NPC_ASSAS, NPC_WHELP, NPC_CHRON, 0}, - {NPC_EXECU, NPC_CHRON, NPC_WHELP, NPC_ASSAS}, - {NPC_EXECU, NPC_VANQU, NPC_CHRON, NPC_ASSAS} + {NPC_ASSASSIN, NPC_WHELP, NPC_CHRONOMANCER, 0}, + {NPC_EXECUTIONER, NPC_CHRONOMANCER, NPC_WHELP, NPC_ASSASSIN}, + {NPC_EXECUTIONER, NPC_VANQUISHER, NPC_CHRONOMANCER, NPC_ASSASSIN} }; struct MANGOS_DLL_DECL npc_time_riftAI : public ScriptedAI { npc_time_riftAI(Creature* pCreature) : ScriptedAI(pCreature) { - m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_pInstance = (instance_dark_portal*)pCreature->GetInstanceData(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); + m_bIsFirstSummon = true; + m_uiRiftNumber = 0; + m_uiRiftWaveId = 0; Reset(); } - ScriptedInstance* m_pInstance; + instance_dark_portal* m_pInstance; - uint32 TimeRiftWave_Timer; - uint8 mRiftWaveCount; - uint8 mPortalCount; - uint8 mWaveId; + bool m_bIsRegularMode; + bool m_bIsFirstSummon; + + uint8 m_uiRiftWaveCount; + uint8 m_uiRiftNumber; + uint8 m_uiRiftWaveId; void Reset() { - TimeRiftWave_Timer = 15000; - mRiftWaveCount = 0; + DoCastSpellIfCan(m_creature, SPELL_RIFT_PERIODIC); - if (!m_pInstance) - return; - - mPortalCount = m_pInstance->GetData(DATA_PORTAL_COUNT); + m_uiRiftWaveCount = 0; - if (mPortalCount < 6) - mWaveId = 0; - else if (mPortalCount > 12) - mWaveId = 2; - else - mWaveId = 1; + if (m_pInstance) + { + m_uiRiftNumber = m_pInstance->GetCurrentRiftId(); + if (m_uiRiftNumber < 6) + m_uiRiftWaveId = 0; + else if (m_uiRiftNumber > 12) + m_uiRiftWaveId = 2; + else + m_uiRiftWaveId = 1; + } } - void DoSummonAtRift(uint32 creature_entry) + void DoSummonCreatureAtRift(uint32 uiCreatureEntry, Creature* pSummoner) { - if (!creature_entry) + if (!uiCreatureEntry) return; - if (m_pInstance->GetData(TYPE_MEDIVH) != IN_PROGRESS) - { - m_creature->InterruptNonMeleeSpells(true); - m_creature->RemoveAllAuras(); + float fX, fY, fZ; + m_creature->GetRandomPoint(m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), 10.0f, fX, fY, fZ); + pSummoner->SummonCreature(uiCreatureEntry, fX, fY, fZ, m_creature->GetOrientation(), TEMPSUMMON_DEAD_DESPAWN, 0); + } + + void DoSummon() + { + if (!m_pInstance) return; - } - float x, y, z; - m_creature->GetRandomPoint(m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), 10.0f, x, y, z); - // uncomment the following if something doesn't work correctly, otherwise just delete - // m_creature->UpdateAllowedPositionZ(x, y, z); + uint32 uiSummonEntry = 0; - if (Unit* pSummon = m_creature->SummonCreature(creature_entry, x, y, z, m_creature->GetOrientation(), TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000)) + if (m_bIsFirstSummon) { - if (Creature* pMedivh = m_pInstance->GetSingleCreatureFromStorage(NPC_MEDIVH)) - pSummon->AddThreat(pMedivh); - } - } + // Select portal keeper / boss to summon + // On Heroic Mode if Chrono Lord and Temporus are already killed, we need to summon the replacement + switch (m_uiRiftNumber) + { + case 6: + uiSummonEntry = (m_pInstance->GetData(TYPE_CHRONO_LORD) == DONE && !m_bIsRegularMode) ? NPC_CHRONO_LORD : NPC_CHRONO_LORD_DEJA; + break; + case 12: + uiSummonEntry = (m_pInstance->GetData(TYPE_TEMPORUS) == DONE && !m_bIsRegularMode) ? NPC_TIMEREAVER : NPC_TEMPORUS; + break; + case 18: + uiSummonEntry = NPC_AEONUS; + break; + default: + uiSummonEntry = urand(0, 1) ? NPC_RIFT_KEEPER : NPC_RIFT_LORD; + break; + } - void DoSelectSummon() - { - uint32 entry = 0; + // Set the next rift delay + if (uiSummonEntry != NPC_AEONUS) + m_pInstance->SetData(TYPE_TIME_RIFT, SPECIAL); - if ((mRiftWaveCount > 2 && mWaveId < 1) || mRiftWaveCount > 3) - mRiftWaveCount = 0; + DoSummonCreatureAtRift(uiSummonEntry, m_creature); + m_bIsFirstSummon = false; + } + else + { + // Some creatures are summoned by Medivh, because we can better handle the movement this way + Creature* pMedivh = m_pInstance->GetSingleCreatureFromStorage(NPC_MEDIVH); + if (!pMedivh) + return; - entry = PortalWaves[mWaveId].PortalMob[mRiftWaveCount]; - debug_log("SD2: npc_time_rift: summoning wave creature (Wave %u, Entry %u).", mRiftWaveCount, entry); + // Reset the RiftWaveCount if we reached the maximum number of the currentRiftWave is 0 + if ((m_uiRiftWaveCount > 2 && !m_uiRiftWaveId) || m_uiRiftWaveCount > 3) + m_uiRiftWaveCount = 0; - ++mRiftWaveCount; + uiSummonEntry = aPortalWaves[m_uiRiftWaveId].uiPortalMob[m_uiRiftWaveCount]; + ++m_uiRiftWaveCount; - if (entry == NPC_WHELP) - { - for(uint8 i = 0; i < 3; ++i) - DoSummonAtRift(entry); + // Summon the trash waves by Medivh, so we can better handle the movement + // For Whelps we need to summon them in packs of 3 + if (uiSummonEntry == NPC_WHELP) + { + for (uint8 i = 0; i < 3; ++i) + DoSummonCreatureAtRift(uiSummonEntry, pMedivh); + } + else + DoSummonCreatureAtRift(uiSummonEntry, pMedivh); } - else - DoSummonAtRift(entry); } - void UpdateAI(const uint32 diff) + void JustSummoned(Creature* pSummoned) { - if (!m_pInstance) - return; - - if (TimeRiftWave_Timer < diff) + switch (pSummoned->GetEntry()) { - DoSelectSummon(); - TimeRiftWave_Timer = 15000; + case NPC_CHRONO_LORD_DEJA: + DoCastSpellIfCan(pSummoned, SPELL_RIFT_CHANNEL); + DoScriptText(SAY_CHRONO_LORD_ENTER, pSummoned); + break; + case NPC_TEMPORUS: + DoCastSpellIfCan(pSummoned, SPELL_RIFT_CHANNEL); + DoScriptText(SAY_TEMPORUS_ENTER, pSummoned); + break; + case NPC_CHRONO_LORD: + case NPC_TIMEREAVER: + case NPC_RIFT_KEEPER: + case NPC_RIFT_LORD: + DoCastSpellIfCan(pSummoned, SPELL_RIFT_CHANNEL); + break; + case NPC_AEONUS: + DoScriptText(SAY_AEONUS_ENTER, pSummoned); + // Remove Time Rift aura so it won't spawn other mobs + m_creature->RemoveAurasDueToSpell(SPELL_RIFT_PERIODIC); + // Move to Medivh and cast Corrupt on him + pSummoned->SetWalk(false); + if (m_pInstance) + { + if (Creature* pMedivh = m_pInstance->GetSingleCreatureFromStorage(NPC_MEDIVH)) + { + float fX, fY, fZ; + pMedivh->GetNearPoint(pMedivh, fX, fY, fZ, 0, 20.0f, pMedivh->GetAngle(pSummoned)); + pSummoned->GetMotionMaster()->MovePoint(1, fX, fY, fZ); + } + } + break; } - else - TimeRiftWave_Timer -= diff; + } - if (m_creature->IsNonMeleeSpellCasted(false)) - return; + void SummonedCreatureJustDied(Creature* pSummoned) + { + if (pSummoned->GetEntry() == NPC_AEONUS) + m_creature->ForcedDespawn(); + } - debug_log("SD2: npc_time_rift: not casting anylonger, i need to die."); - m_creature->SetDeathState(JUST_DIED); + void SummonedMovementInform(Creature* pSummoned, uint32 uiMotionType, uint32 uiPointId) + { + if (uiMotionType != POINT_MOTION_TYPE || !uiPointId || pSummoned->GetEntry() != NPC_AEONUS) + return; - if (m_pInstance->GetData(TYPE_RIFT) == IN_PROGRESS) - m_pInstance->SetData(TYPE_RIFT, SPECIAL); + pSummoned->CastSpell(pSummoned, SPELL_CORRUPT_AEONUS, false); } + + void UpdateAI(const uint32 uiDiff) { } }; CreatureAI* GetAI_npc_time_rift(Creature* pCreature) @@ -355,17 +300,59 @@ CreatureAI* GetAI_npc_time_rift(Creature* pCreature) return new npc_time_riftAI(pCreature); } +bool EffectDummyCreature_npc_time_rift_channel(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) +{ + //always check spellid and effectindex + if (uiSpellId == SPELL_RIFT_PERIODIC && uiEffIndex == EFFECT_INDEX_0) + { + if (npc_time_riftAI* pTimeRiftAI = dynamic_cast(pCreatureTarget->AI())) + pTimeRiftAI->DoSummon(); + + //always return true when we are handling this spell and effect + return true; + } + + return false; +} + +/*###### +## npc_time_rift_channeler +######*/ + +bool EffectAuraDummy_npc_time_rift_channeler(const Aura* pAura, bool bApply) +{ + // Despawn the Time Rift when the aura is canceled + if (pAura->GetId() == SPELL_RIFT_CHANNEL && pAura->GetEffIndex() == EFFECT_INDEX_0 && !bApply) + { + if (Creature* pCaster = (Creature*)pAura->GetCaster()) + { + if (ScriptedInstance* pInstance = (ScriptedInstance*)pCaster->GetInstanceData()) + pInstance->SetData(TYPE_TIME_RIFT, DONE); + + pCaster->ForcedDespawn(3000); + } + } + return true; +} + void AddSC_dark_portal() { Script* pNewScript; pNewScript = new Script; - pNewScript->Name = "npc_medivh_bm"; - pNewScript->GetAI = &GetAI_npc_medivh_bm; + pNewScript->Name = "npc_medivh_black_morass"; + pNewScript->GetAI = &GetAI_npc_medivh_black_morass; + pNewScript->pEffectDummyNPC = &EffectDummyCreature_npc_medivh_black_morass; pNewScript->RegisterSelf(); pNewScript = new Script; pNewScript->Name = "npc_time_rift"; pNewScript->GetAI = &GetAI_npc_time_rift; + pNewScript->pEffectDummyNPC = &EffectDummyCreature_npc_time_rift_channel; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_time_rift_channeler"; + pNewScript->pEffectAuraDummy = &EffectAuraDummy_npc_time_rift_channeler; pNewScript->RegisterSelf(); } diff --git a/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.h b/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.h index 7c29fdb97..913810ef6 100644 --- a/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.h +++ b/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.h @@ -7,72 +7,142 @@ enum { - MAX_ENCOUNTER = 2, + MAX_ENCOUNTER = 6, - TYPE_MEDIVH = 1, - TYPE_RIFT = 2, + TYPE_MEDIVH = 0, + TYPE_SHIELD = 1, + TYPE_TIME_RIFT = 2, + TYPE_CHRONO_LORD = 3, + TYPE_TEMPORUS = 4, + TYPE_AEONUS = 5, - DATA_PORTAL_COUNT = 11, - DATA_SHIELD = 12, - - WORLD_STATE_BM = 2541, - WORLD_STATE_BM_SHIELD = 2540, - WORLD_STATE_BM_RIFT = 2784, + WORLD_STATE_ID = 2541, + WORLD_STATE_SHIELD = 2540, + WORLD_STATE_RIFT = 2784, QUEST_OPENING_PORTAL = 10297, QUEST_MASTER_TOUCH = 9836, - NPC_TIME_KEEPER = 17918, - NPC_RKEEP = 21104, - NPC_RLORD = 17839, - NPC_DEJA = 17879, - NPC_TEMPO = 17880, + // event controlers + NPC_TIME_RIFT = 17838, + NPC_MEDIVH = 15608, + + // main bosses + NPC_CHRONO_LORD_DEJA = 17879, + NPC_TEMPORUS = 17880, NPC_AEONUS = 17881, - NPC_ASSAS = 17835, + + // boss replacements for heroic + NPC_CHRONO_LORD = 21697, + NPC_TIMEREAVER = 21698, + + // portal guardians + NPC_RIFT_KEEPER = 21104, + NPC_RIFT_LORD = 17839, + + // portal summons + NPC_ASSASSIN = 17835, NPC_WHELP = 21818, - NPC_CHRON = 17892, - NPC_EXECU = 18994, - NPC_VANQU = 18995, - NPC_MEDIVH = 15608, - NPC_TIME_RIFT = 17838, + NPC_CHRONOMANCER = 17892, + NPC_EXECUTIONER = 18994, + NPC_VANQUISHER = 18995, - SPELL_RIFT_CHANNEL = 31387, - SPELL_BANISH_HELPER = 31550, + // additional npcs + NPC_COUNCIL_ENFORCER = 17023, + NPC_TIME_KEEPER = 17918, + NPC_SAAT = 20201, + NPC_DARK_PORTAL_DUMMY = 18625, // cast spell 32564 on coordinates + NPC_DARK_PORTAL_BEAM = 18555, // purple beams which travel from Medivh to the Dark Portal + + // event spells + SPELL_RIFT_CHANNEL = 31387, // Aura channeled by the Time Rifts on the Rift Keepers + + SPELL_BANISH_HELPER = 31550, // used by the main bosses to banish the time keeprs + SPELL_CORRUPT_AEONUS = 37853, // used by Aeonus to corrupt Medivh + + // cosmetic spells + SPELL_PORTAL_CRYSTAL = 32564, // summons 18553 - Dark Portal Crystal stalker + SPELL_BANISH_GREEN = 32567, + + // yells during the event + SAY_SAAT_WELCOME = -1269019, + + SAY_MEDIVH_INTRO = -1269021, + SAY_MEDIVH_ENTER = -1269020, + SAY_MEDIVH_WIN = -1269026, + SAY_MEDIVH_WEAK75 = -1269022, + SAY_MEDIVH_WEAK50 = -1269023, + SAY_MEDIVH_WEAK25 = -1269024, + SAY_ORCS_ENTER = -1269027, + SAY_ORCS_ANSWER = -1269028, + + AREATRIGGER_MEDIVH = 4288, + AREATRIGGER_ENTER = 4485, +}; - RIFT_BOSS = 1 +struct PortalData +{ + float fX, fY, fZ, fOrient; }; +static const PortalData afPortalLocation[]= +{ + {-2030.832f, 7024.944f, 23.07182f, 3.141593f}, + {-1961.734f, 7029.528f, 21.8114f, 2.129302f}, + {-1887.695f, 7106.557f, 22.0495f, 4.956735f}, + {-1930.911f, 7183.597f, 23.00764f, 3.595378f} +}; + +// Dark Crystal summon location +static const float fDarkPortalCrystalLoc[3] = {-2024.31f, 7127.75f, 22.65419f}; + +static const int32 uiMedivhWeakYell[3] = {SAY_MEDIVH_WEAK75, SAY_MEDIVH_WEAK50, SAY_MEDIVH_WEAK25}; + class MANGOS_DLL_DECL instance_dark_portal : public ScriptedInstance { public: instance_dark_portal(Map* pMap); void Initialize(); + void OnPlayerEnter(Player* pPlayer); void OnCreatureCreate(Creature* pCreature); + void OnCreatureEnterCombat(Creature* pCreature); + void OnCreatureEvade(Creature* pCreature); + void OnCreatureDeath(Creature* pCreature); + void SetData(uint32 uiType, uint32 uiData); uint32 GetData(uint32 uiType); + const char* Save() { return m_strInstData.c_str(); } + void Load(const char* chrIn); + + void DoHandleAreaTrigger(uint32 uiTriggerId); + + uint32 GetCurrentRiftId() { return m_uiWorldStateRiftCount; } + void Update(uint32 uiDiff); private: - Creature* SummonedPortalBoss(Creature* pSource); - void DoSpawnPortal(); - bool CanProgressEvent(); - uint8 GetRiftWaveId(); - void Clear(); - void InitWorldState(bool bEnable = true); + bool IsBossTimeRift() { return m_uiWorldStateRiftCount == 6 || m_uiWorldStateRiftCount == 12; } + void UpdateWorldState(bool bEnable = true); + void DoSpawnNextPortal(); + void DoResetEvent(); uint32 m_auiEncounter[MAX_ENCOUNTER]; + std::string m_strInstData; + + uint32 m_uiWorldState; + uint32 m_uiWorldStateRiftCount; + uint32 m_uiWorldStateShieldCount; - uint32 m_uiRiftPortalCount; - uint32 m_uiShieldPercent; - uint8 m_uiRiftWaveCount; - uint8 m_uiRiftWaveId; + bool m_bHasIntroYelled; uint32 m_uiNextPortalTimer; uint8 m_uiCurrentRiftId; + + uint32 m_uiMedivhYellCount; }; #endif diff --git a/scripts/kalimdor/caverns_of_time/dark_portal/instance_dark_portal.cpp b/scripts/kalimdor/caverns_of_time/dark_portal/instance_dark_portal.cpp index af0dbecdf..6789cabc8 100644 --- a/scripts/kalimdor/caverns_of_time/dark_portal/instance_dark_portal.cpp +++ b/scripts/kalimdor/caverns_of_time/dark_portal/instance_dark_portal.cpp @@ -16,108 +16,91 @@ /* ScriptData SDName: Instance_Dark_Portal -SD%Complete: 50 -SDComment: Quest support: 9836, 10297. Currently in progress. +SD%Complete: 75 +SDComment: Quest support: 9836, 10297. Some visuals for the event are missing; Event epilogue NYI. SDCategory: Caverns of Time, The Dark Portal EndScriptData */ #include "precompiled.h" #include "dark_portal.h" -inline uint32 RandRiftBoss() { return (urand(0, 1) ? NPC_RKEEP : NPC_RLORD); } +instance_dark_portal::instance_dark_portal(Map* pMap) : ScriptedInstance(pMap), + m_uiWorldState(0), + m_uiWorldStateRiftCount(0), + m_uiWorldStateShieldCount(100), -float PortalLocation[4][4]= -{ - {-2041.06f, 7042.08f, 29.99f, 1.30f}, - {-1968.18f, 7042.11f, 21.93f, 2.12f}, - {-1885.82f, 7107.36f, 22.32f, 3.07f}, - {-1928.11f, 7175.95f, 22.11f, 3.44f} -}; - -struct Wave -{ - uint32 PortalBoss; // protector of current portal - uint32 NextPortalTime; // time to next portal, or 0 if portal boss need to be killed -}; + m_uiMedivhYellCount(1), + m_uiNextPortalTimer(0), + m_uiCurrentRiftId(0), -static Wave RiftWaves[]= -{ - {RIFT_BOSS, 0}, - {NPC_DEJA, 0}, - {RIFT_BOSS, 120000}, - {NPC_TEMPO, 140000}, - {RIFT_BOSS, 120000}, - {NPC_AEONUS, 0} -}; - -instance_dark_portal::instance_dark_portal(Map* pMap) : ScriptedInstance(pMap) + m_bHasIntroYelled(false) { Initialize(); } void instance_dark_portal::Initialize() { - Clear(); + memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); } -void instance_dark_portal::Clear() +void instance_dark_portal::DoResetEvent() { - memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); + UpdateWorldState(false); - m_uiRiftPortalCount = 0; - m_uiShieldPercent = 100; - m_uiRiftWaveCount = 0; - m_uiRiftWaveId = 0; + m_uiWorldStateShieldCount = 100; + m_uiWorldStateRiftCount = 0; m_uiCurrentRiftId = 0; - - m_uiNextPortalTimer = 0; + m_uiNextPortalTimer = 0; + m_uiMedivhYellCount = 1; } -void instance_dark_portal::InitWorldState(bool bEnable /*= true*/) +void instance_dark_portal::UpdateWorldState(bool bEnable) { - DoUpdateWorldState(WORLD_STATE_BM, bEnable ? 1 : 0); - DoUpdateWorldState(WORLD_STATE_BM_SHIELD, 100); - DoUpdateWorldState(WORLD_STATE_BM_RIFT, 0); -} + m_uiWorldState = bEnable ? 1 : 0; -void instance_dark_portal::OnPlayerEnter(Player* pPlayer) -{ - if (m_auiEncounter[0] == IN_PROGRESS) - return; - - pPlayer->SendUpdateWorldState(WORLD_STATE_BM, 0); + DoUpdateWorldState(WORLD_STATE_ID, m_uiWorldState); + DoUpdateWorldState(WORLD_STATE_SHIELD, m_uiWorldStateShieldCount); + DoUpdateWorldState(WORLD_STATE_RIFT, m_uiWorldStateRiftCount); } -void instance_dark_portal::OnCreatureCreate(Creature* pCreature) +void instance_dark_portal::OnPlayerEnter(Player* pPlayer) { - if (pCreature->GetEntry() == NPC_MEDIVH) - m_mNpcEntryGuidStore[NPC_MEDIVH] = pCreature->GetObjectGuid(); + UpdateWorldState(m_auiEncounter[TYPE_MEDIVH] == IN_PROGRESS ? true : false); } -// what other conditions to check? -bool instance_dark_portal::CanProgressEvent() +void instance_dark_portal::DoHandleAreaTrigger(uint32 uiTriggerId) { - if (instance->GetPlayers().isEmpty()) - return false; - - return true; + if (uiTriggerId == AREATRIGGER_ENTER) + { + // Yell at instance entrance + if (!m_bHasIntroYelled) + { + if (Creature* pSaat = GetSingleCreatureFromStorage(NPC_SAAT)) + DoScriptText(SAY_SAAT_WELCOME, pSaat); + m_bHasIntroYelled = true; + } + } + else if (uiTriggerId == AREATRIGGER_MEDIVH) + { + // Start Dark Portal event + if (GetData(TYPE_MEDIVH) == NOT_STARTED || GetData(TYPE_MEDIVH) == FAIL) + SetData(TYPE_MEDIVH, IN_PROGRESS); + // Start Epilogue + else if (GetData(TYPE_AEONUS) == DONE && GetData(TYPE_MEDIVH) != DONE) + SetData(TYPE_MEDIVH, DONE); + } } -uint8 instance_dark_portal::GetRiftWaveId() +void instance_dark_portal::OnCreatureCreate(Creature* pCreature) { - switch(m_uiRiftPortalCount) + switch (pCreature->GetEntry()) { - case 6: - m_uiRiftWaveId = 2; - return 1; - case 12: - m_uiRiftWaveId = 4; - return 3; - case 18: - return 5; - default: - return m_uiRiftWaveId; + case NPC_MEDIVH: + case NPC_SAAT: + case NPC_DARK_PORTAL_DUMMY: + m_mNpcEntryGuidStore[pCreature->GetEntry()] = pCreature->GetObjectGuid(); + break; } } @@ -126,162 +109,266 @@ void instance_dark_portal::SetData(uint32 uiType, uint32 uiData) switch(uiType) { case TYPE_MEDIVH: - if (uiData == SPECIAL && m_auiEncounter[0] == IN_PROGRESS) + { + if (uiData == IN_PROGRESS) { - --m_uiShieldPercent; + if (Creature* pMedivh = GetSingleCreatureFromStorage(NPC_MEDIVH)) + { + if (pMedivh->isAlive()) + DoScriptText(SAY_MEDIVH_ENTER, pMedivh); + // If Medivh is not available the do not store the uiData; + else + return; + } - DoUpdateWorldState(WORLD_STATE_BM_SHIELD, m_uiShieldPercent); + // ToDo: + // Start the Portal Crystal casting - by the Dark Portal Dumm Npc + // Also Start summoning the Dark Portal Beams - if (!m_uiShieldPercent) + UpdateWorldState(); + m_uiNextPortalTimer = 3000; + } + if (uiData == DONE) + { + // Yell for event finished + if (Creature* pMedivh = GetSingleCreatureFromStorage(NPC_MEDIVH)) { - if (Creature* pMedivh = GetSingleCreatureFromStorage(NPC_MEDIVH)) + DoScriptText(SAY_MEDIVH_WIN, pMedivh); + pMedivh->SetFacingTo(6.15f); + pMedivh->InterruptNonMeleeSpells(false); + pMedivh->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER); + } + + // this may be completed further out in the post-event + Map::PlayerList const& players = instance->GetPlayers(); + + if (!players.isEmpty()) + { + for(Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr) { - if (pMedivh->isAlive()) + if (Player* pPlayer = itr->getSource()) { - pMedivh->DealDamage(pMedivh, pMedivh->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); - m_auiEncounter[0] = FAIL; - m_auiEncounter[1] = NOT_STARTED; + if (pPlayer->GetQuestStatus(QUEST_OPENING_PORTAL) == QUEST_STATUS_INCOMPLETE) + pPlayer->AreaExploredOrEventHappens(QUEST_OPENING_PORTAL); + + if (pPlayer->GetQuestStatus(QUEST_MASTER_TOUCH) == QUEST_STATUS_INCOMPLETE) + pPlayer->AreaExploredOrEventHappens(QUEST_MASTER_TOUCH); } } } } - else + if (uiData == FAIL) + DoResetEvent(); + m_auiEncounter[uiType] = uiData; + break; + } + case TYPE_SHIELD: + if (uiData == SPECIAL) { - if (uiData == IN_PROGRESS) + --m_uiWorldStateShieldCount; + DoUpdateWorldState(WORLD_STATE_SHIELD, m_uiWorldStateShieldCount); + + // Yell at 75%, 50% and 25% shield + if (m_uiWorldStateShieldCount < 100-25*m_uiMedivhYellCount) { - debug_log("SD2: Instance Dark Portal: Starting event."); - InitWorldState(); - m_auiEncounter[1] = IN_PROGRESS; - m_uiNextPortalTimer = 15000; + if (Creature* pMedivh = GetSingleCreatureFromStorage(NPC_MEDIVH)) + { + DoScriptText(uiMedivhWeakYell[m_uiMedivhYellCount-1], pMedivh); + ++m_uiMedivhYellCount; + } } - if (uiData == DONE) + // Kill the npc when the shield is broken + if (!m_uiWorldStateShieldCount) { - // this may be completed further out in the post-event - debug_log("SD2: Instance Dark Portal: Event completed."); - - Map::PlayerList const& players = instance->GetPlayers(); - - if (!players.isEmpty()) + if (Creature* pMedivh = GetSingleCreatureFromStorage(NPC_MEDIVH)) { - for(Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr) - { - if (Player* pPlayer = itr->getSource()) - { - if (pPlayer->GetQuestStatus(QUEST_OPENING_PORTAL) == QUEST_STATUS_INCOMPLETE) - pPlayer->AreaExploredOrEventHappens(QUEST_OPENING_PORTAL); - - if (pPlayer->GetQuestStatus(QUEST_MASTER_TOUCH) == QUEST_STATUS_INCOMPLETE) - pPlayer->AreaExploredOrEventHappens(QUEST_MASTER_TOUCH); - } - } + if (pMedivh->isAlive()) + pMedivh->DealDamage(pMedivh, pMedivh->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); } } - - m_auiEncounter[0] = uiData; } + m_auiEncounter[uiType] = uiData; + return; + case TYPE_TIME_RIFT: + { + // Set the delay to the next time rift from the point the rift despawns + if (uiData == DONE) + m_uiNextPortalTimer = IsBossTimeRift() ? 125000 : 3000; + // Set the delay to the next time rift from the point the rift summons it's guardian + // ToDo: research if these timers are correct + else if (uiData == SPECIAL) + m_uiNextPortalTimer = IsBossTimeRift() ? 0 : m_uiWorldStateRiftCount > 12 ? 90000 : 2*MINUTE*IN_MILLISECONDS; + + m_auiEncounter[uiType] = uiData; + return; + } + case TYPE_CHRONO_LORD: + case TYPE_TEMPORUS: + if (m_auiEncounter[uiType] != DONE) // Keep the DONE-information stored + m_auiEncounter[uiType] = uiData; break; - case TYPE_RIFT: - if (uiData == SPECIAL) - { - if (m_uiRiftPortalCount < 7) - m_uiNextPortalTimer = 5000; - } - else - m_auiEncounter[1] = uiData; + case TYPE_AEONUS: + if (uiData == DONE) + UpdateWorldState(false); + m_auiEncounter[uiType] = uiData; break; + default: + return; + } + + if (uiData == DONE) + { + OUT_SAVE_INST_DATA; + + std::ostringstream saveStream; + saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2] << " " + << m_auiEncounter[3] << " " << m_auiEncounter[4] << " " << m_auiEncounter[5]; + + m_strInstData = saveStream.str(); + + SaveToDB(); + OUT_SAVE_INST_DATA_COMPLETE; } } uint32 instance_dark_portal::GetData(uint32 uiType) { - switch(uiType) - { - case TYPE_MEDIVH: return m_auiEncounter[0]; - case TYPE_RIFT: return m_auiEncounter[1]; - case DATA_PORTAL_COUNT: return m_uiRiftPortalCount; - case DATA_SHIELD: return m_uiShieldPercent; + if (uiType < MAX_ENCOUNTER) + return m_auiEncounter[uiType]; - default: - return 0; - } + return 0; } -Creature* instance_dark_portal::SummonedPortalBoss(Creature* pSource) +void instance_dark_portal::Load(const char* chrIn) { - uint32 uiEntry = RiftWaves[GetRiftWaveId()].PortalBoss; + if (!chrIn) + { + OUT_LOAD_INST_DATA_FAIL; + return; + } + + OUT_LOAD_INST_DATA(chrIn); - if (uiEntry == RIFT_BOSS) - uiEntry = RandRiftBoss(); + std::istringstream loadStream(chrIn); + loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3] + >> m_auiEncounter[4] >> m_auiEncounter[5]; + + for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) + { + if (m_auiEncounter[i] == IN_PROGRESS) + m_auiEncounter[i] = NOT_STARTED; + } - float x, y, z; - pSource->GetRandomPoint(pSource->GetPositionX(), pSource->GetPositionY(), pSource->GetPositionZ(), 10.0f, x, y, z); - // uncomment the following if something doesn't work correctly, otherwise just delete - // pSource->UpdateAllowedPositionZ(x, y, z); + OUT_LOAD_INST_DATA_COMPLETE; +} - debug_log("SD2: Instance Dark Portal: Summoning rift boss uiEntry %u.", uiEntry); +void instance_dark_portal::OnCreatureEnterCombat(Creature* pCreature) +{ + switch (pCreature->GetEntry()) + { + case NPC_CHRONO_LORD_DEJA: + case NPC_CHRONO_LORD: + SetData(TYPE_CHRONO_LORD, IN_PROGRESS); + break; + case NPC_TEMPORUS: + case NPC_TIMEREAVER: + SetData(TYPE_TEMPORUS, IN_PROGRESS); + break; + case NPC_AEONUS: + SetData(TYPE_AEONUS, IN_PROGRESS); + // no break + case NPC_ASSASSIN: + case NPC_WHELP: + case NPC_CHRONOMANCER: + case NPC_EXECUTIONER: + case NPC_VANQUISHER: + pCreature->InterruptNonMeleeSpells(false); + break; + } +} - if (Creature* pSummoned = pSource->SummonCreature(uiEntry, x, y, z, pSource->GetOrientation(), TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 600000)) - return pSummoned; +void instance_dark_portal::OnCreatureEvade(Creature* pCreature) +{ + switch (pCreature->GetEntry()) + { + case NPC_CHRONO_LORD_DEJA: + case NPC_CHRONO_LORD: + SetData(TYPE_CHRONO_LORD, FAIL); + break; + case NPC_TEMPORUS: + case NPC_TIMEREAVER: + SetData(TYPE_TEMPORUS, FAIL); + break; + case NPC_AEONUS: + SetData(TYPE_AEONUS, FAIL); + // no break; + // Allow these guys to go and finish off Medivh + case NPC_ASSASSIN: + case NPC_WHELP: + case NPC_CHRONOMANCER: + case NPC_EXECUTIONER: + case NPC_VANQUISHER: + if (Creature* pMedivh = GetSingleCreatureFromStorage(NPC_MEDIVH)) + { + float fX, fY, fZ; + pMedivh->GetNearPoint(pMedivh, fX, fY, fZ, 0, 20.0f, pMedivh->GetAngle(pCreature)); + pCreature->GetMotionMaster()->MovePoint(1, fX, fY, fZ); + } + break; + } +} - debug_log("SD2: Instance Dark Portal: what just happened there? No boss, no loot, no fun..."); - return NULL; +void instance_dark_portal::OnCreatureDeath(Creature* pCreature) +{ + switch (pCreature->GetEntry()) + { + case NPC_CHRONO_LORD_DEJA: + case NPC_CHRONO_LORD: + SetData(TYPE_CHRONO_LORD, DONE); + break; + case NPC_TEMPORUS: + case NPC_TIMEREAVER: + SetData(TYPE_TEMPORUS, DONE); + break; + case NPC_AEONUS: + SetData(TYPE_AEONUS, DONE); + break; + } } -void instance_dark_portal::DoSpawnPortal() +void instance_dark_portal::DoSpawnNextPortal() { if (Creature* pMedivh = GetSingleCreatureFromStorage(NPC_MEDIVH)) { + // Randomize portal locations uint8 uiTmp = urand(0, 2); if (uiTmp >= m_uiCurrentRiftId) ++uiTmp; - debug_log("SD2: Instance Dark Portal: Creating Time Rift at locationId %i (old locationId was %u).", uiTmp, m_uiCurrentRiftId); + debug_log("SD2: instance_dark_portal: SetRiftId %u, old was id %u.", uiTmp, m_uiCurrentRiftId); m_uiCurrentRiftId = uiTmp; - if (Creature* pTemp = pMedivh->SummonCreature(NPC_TIME_RIFT, PortalLocation[uiTmp][0], PortalLocation[uiTmp][1], PortalLocation[uiTmp][2], PortalLocation[uiTmp][3], TEMPSUMMON_CORPSE_DESPAWN, 0)) - { - pTemp->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - pTemp->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - - if (Creature* pBoss = SummonedPortalBoss(pTemp)) - { - if (pBoss->GetEntry() == NPC_AEONUS) - pBoss->AddThreat(pMedivh); - else - { - pBoss->AddThreat(pTemp); - pTemp->CastSpell(pBoss, SPELL_RIFT_CHANNEL, false); - } - } - } + // Summon next portal + pMedivh->SummonCreature(NPC_TIME_RIFT, afPortalLocation[uiTmp].fX, afPortalLocation[uiTmp].fY, afPortalLocation[uiTmp].fZ, afPortalLocation[uiTmp].fOrient, TEMPSUMMON_CORPSE_DESPAWN, 0); } } void instance_dark_portal::Update(uint32 uiDiff) { - if (m_auiEncounter[1] != IN_PROGRESS) + if (GetData(TYPE_MEDIVH) != IN_PROGRESS) return; - //add delay timer? - if (!CanProgressEvent()) - { - Clear(); - return; - } - if (m_uiNextPortalTimer) { if (m_uiNextPortalTimer <= uiDiff) { - ++m_uiRiftPortalCount; + DoUpdateWorldState(WORLD_STATE_RIFT, ++m_uiWorldStateRiftCount); - DoUpdateWorldState(WORLD_STATE_BM_RIFT, m_uiRiftPortalCount); - - DoSpawnPortal(); - m_uiNextPortalTimer = RiftWaves[GetRiftWaveId()].NextPortalTime; + DoSpawnNextPortal(); + m_uiNextPortalTimer = 0; } else m_uiNextPortalTimer -= uiDiff; @@ -293,6 +380,20 @@ InstanceData* GetInstanceData_instance_dark_portal(Map* pMap) return new instance_dark_portal(pMap); } +bool AreaTrigger_at_dark_portal(Player* pPlayer, AreaTriggerEntry const* pAt) +{ + if (pAt->id == AREATRIGGER_MEDIVH || pAt->id == AREATRIGGER_ENTER) + { + if (pPlayer->isGameMaster() || pPlayer->isDead()) + return false; + + if (instance_dark_portal* pInstance = (instance_dark_portal*)pPlayer->GetInstanceData()) + pInstance->DoHandleAreaTrigger(pAt->id); + } + + return false; +} + void AddSC_instance_dark_portal() { Script* pNewScript; @@ -301,4 +402,9 @@ void AddSC_instance_dark_portal() pNewScript->Name = "instance_dark_portal"; pNewScript->GetInstanceData = &GetInstanceData_instance_dark_portal; pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "at_dark_portal"; + pNewScript->pAreaTrigger = &AreaTrigger_at_dark_portal; + pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 69e2657fa..fb5363333 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2556" + #define SD2_REVISION_NR "2557" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index f06093794..4ec935b9e 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -73,6 +73,10 @@ DELETE FROM scripted_areatrigger WHERE entry IN (5709,5732); INSERT INTO scripted_areatrigger VALUES (5709,'at_icecrown_citadel'), (5732,'at_icecrown_citadel'); +DELETE FROM scripted_areatrigger WHERE entry in (4288,4485); +INSERT INTO scripted_areatrigger VALUES +(4288,'at_dark_portal'), +(4485,'at_dark_portal'); /* BATTLEGROUNDS */ @@ -434,8 +438,9 @@ UPDATE creature_template SET ScriptName='boss_chrono_lord_deja' WHERE entry=1787 UPDATE creature_template SET ScriptName='boss_aeonus' WHERE entry=17881; UPDATE creature_template SET ScriptName='boss_temporus' WHERE entry=17880; UPDATE instance_template SET ScriptName='instance_dark_portal' WHERE map=269; -UPDATE creature_template SET ScriptName='npc_medivh_bm' WHERE entry=15608; +UPDATE creature_template SET ScriptName='npc_medivh_black_morass' WHERE entry=15608; UPDATE creature_template SET ScriptName='npc_time_rift' WHERE entry=17838; +UPDATE creature_template SET ScriptName='npc_time_rift_channeler' WHERE entry IN (21104,17839,21697,21698); /* */ /* COILFANG RESERVOIR */ diff --git a/sql/updates/r2557_mangos.sql b/sql/updates/r2557_mangos.sql new file mode 100644 index 000000000..1de67a0e5 --- /dev/null +++ b/sql/updates/r2557_mangos.sql @@ -0,0 +1,6 @@ +DELETE FROM scripted_areatrigger WHERE entry in (4288,4485); +INSERT INTO scripted_areatrigger VALUES +(4288,'at_dark_portal'), +(4485,'at_dark_portal'); +UPDATE creature_template SET ScriptName='npc_medivh_black_morass' WHERE entry=15608; +UPDATE creature_template SET ScriptName='npc_time_rift_channeler' WHERE entry IN (21104,17839,21697,21698); From 6854cc358e77b0b2370e9e1ffba56664a4a31a3e Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sat, 19 May 2012 11:02:59 +0300 Subject: [PATCH 0546/1172] [2558] Basic cleanup for Laj - Botanica --- .../tempest_keep/botanica/boss_laj.cpp | 141 +++++++++++------- sd2_revision_nr.h | 2 +- 2 files changed, 88 insertions(+), 55 deletions(-) diff --git a/scripts/outland/tempest_keep/botanica/boss_laj.cpp b/scripts/outland/tempest_keep/botanica/boss_laj.cpp index ddd921626..69e80d665 100644 --- a/scripts/outland/tempest_keep/botanica/boss_laj.cpp +++ b/scripts/outland/tempest_keep/botanica/boss_laj.cpp @@ -23,58 +23,63 @@ EndScriptData */ #include "precompiled.h" -#define EMOTE_SUMMON -1553006 - -#define SPELL_ALLERGIC_REACTION 34697 -#define SPELL_TELEPORT_SELF 34673 - -#define SPELL_SUMMON_LASHER_1 34681 -#define SPELL_SUMMON_FLAYER_1 34682 -#define SPELL_SUMMON_LASHER_2 34684 -#define SPELL_SUMMON_FLAYER_2 34685 -#define SPELL_SUMMON_LASHER_3 34686 -#define SPELL_SUMMON_FLAYER_4 34687 -#define SPELL_SUMMON_LASHER_4 34688 -#define SPELL_SUMMON_FLAYER_3 34690 - -#define MODEL_DEFAULT 13109 -#define MODEL_ARCANE 14213 -#define MODEL_FIRE 13110 -#define MODEL_FROST 14112 -#define MODEL_NATURE 14214 +enum +{ + EMOTE_SUMMON = -1553006, + + SPELL_ALLERGIC_REACTION = 34697, + SPELL_TELEPORT_SELF = 34673, + SPELL_TRASH = 3391, + + SPELL_SUMMON_LASHER_1 = 34681, + SPELL_SUMMON_FLAYER_1 = 34682, + SPELL_SUMMON_LASHER_2 = 34684, + SPELL_SUMMON_FLAYER_2 = 34685, + SPELL_SUMMON_LASHER_3 = 34686, + SPELL_SUMMON_FLAYER_4 = 34687, + SPELL_SUMMON_LASHER_4 = 34688, + SPELL_SUMMON_FLAYER_3 = 34690, + + MODEL_ID_DEFAULT = 13109, + MODEL_ID_ARCANE = 14213, + MODEL_ID_FIRE = 13110, + MODEL_ID_FROST = 14112, + MODEL_ID_NATURE = 14214, +}; struct MANGOS_DLL_DECL boss_lajAI : public ScriptedAI { boss_lajAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } - bool CanSummon; - uint32 Teleport_Timer; - uint32 Summon_Timer; - uint32 Transform_Timer; - uint32 Allergic_Timer; + uint32 m_uiTeleportTimer; + uint32 m_uiSummonTimer; + uint32 m_uiTransformTimer; + uint32 m_uiAllergicTimer; + uint32 m_uiTrashTimer; void Reset() { - m_creature->SetDisplayId(MODEL_DEFAULT); + m_creature->SetDisplayId(MODEL_ID_DEFAULT); m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_SHADOW, true); m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_ARCANE, false); m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_FIRE, false); m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_FROST, false); m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_NATURE, false); - CanSummon = false; - Teleport_Timer = 20000; - Summon_Timer = 2500; - Transform_Timer = 30000; - Allergic_Timer = 5000; + m_uiTeleportTimer = 15000; + m_uiSummonTimer = 0; + m_uiTransformTimer = 30000; + m_uiAllergicTimer = 5000; + m_uiTrashTimer = urand(4000, 7000); } void DoTransform() { + // Random transform into a different form switch(urand(0, 4)) { case 0: - m_creature->SetDisplayId(MODEL_DEFAULT); + m_creature->SetDisplayId(MODEL_ID_DEFAULT); m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_SHADOW, true); m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_ARCANE, false); m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_FIRE, false); @@ -82,7 +87,7 @@ struct MANGOS_DLL_DECL boss_lajAI : public ScriptedAI m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_NATURE, false); break; case 1: - m_creature->SetDisplayId(MODEL_ARCANE); + m_creature->SetDisplayId(MODEL_ID_ARCANE); m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_SHADOW, false); m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_ARCANE, true); m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_FIRE, false); @@ -90,7 +95,7 @@ struct MANGOS_DLL_DECL boss_lajAI : public ScriptedAI m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_NATURE, false); break; case 2: - m_creature->SetDisplayId(MODEL_FIRE); + m_creature->SetDisplayId(MODEL_ID_FIRE); m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_SHADOW, false); m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_ARCANE, false); m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_FIRE, true); @@ -98,7 +103,7 @@ struct MANGOS_DLL_DECL boss_lajAI : public ScriptedAI m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_NATURE, false); break; case 3: - m_creature->SetDisplayId(MODEL_FROST); + m_creature->SetDisplayId(MODEL_ID_FROST); m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_SHADOW, false); m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_ARCANE, false); m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_FIRE, false); @@ -106,7 +111,7 @@ struct MANGOS_DLL_DECL boss_lajAI : public ScriptedAI m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_NATURE, false); break; case 4: - m_creature->SetDisplayId(MODEL_NATURE); + m_creature->SetDisplayId(MODEL_ID_NATURE); m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_SHADOW, false); m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_ARCANE, false); m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_FIRE, false); @@ -137,42 +142,70 @@ struct MANGOS_DLL_DECL boss_lajAI : public ScriptedAI DoCastSpellIfCan(m_creature, SPELL_SUMMON_FLAYER_4, CAST_TRIGGERED); break; } - CanSummon = false; } - void UpdateAI(const uint32 diff) + void JustSummoned(Creature* pSummoned) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + pSummoned->AI()->AttackStart(pTarget); + } + + void UpdateAI(const uint32 uiDiff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - if (CanSummon) + if (m_uiSummonTimer) { - if (Summon_Timer < diff) + if (m_uiSummonTimer <= uiDiff) { - DoScriptText(EMOTE_SUMMON, m_creature); + // Summon adds and restart chasing the victim DoSummons(); - Summon_Timer = 2500; - }else Summon_Timer -= diff; + DoScriptText(EMOTE_SUMMON, m_creature); + + if (m_creature->getVictim()) + m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); + m_uiSummonTimer = 0; + } + else + m_uiSummonTimer -= uiDiff; } - if (Allergic_Timer < diff) + if (m_uiAllergicTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_ALLERGIC_REACTION); - Allergic_Timer = urand(25000, 40000); - }else Allergic_Timer -= diff; + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_ALLERGIC_REACTION) == CAST_OK) + m_uiAllergicTimer = urand(25000, 40000); + } + else + m_uiAllergicTimer -= uiDiff; - if (Teleport_Timer < diff) + if (m_uiTeleportTimer < uiDiff) { - DoCastSpellIfCan(m_creature,SPELL_TELEPORT_SELF); - Teleport_Timer = urand(30000, 40000); - CanSummon = true; - }else Teleport_Timer -= diff; + if (DoCastSpellIfCan(m_creature, SPELL_TELEPORT_SELF) == CAST_OK) + { + m_creature->GetMotionMaster()->MoveIdle(); + m_uiTeleportTimer = urand(30000, 40000); + m_uiSummonTimer = 4000; + } + } + else + m_uiTeleportTimer -= uiDiff; - if (Transform_Timer < diff) + if (m_uiTransformTimer < uiDiff) { DoTransform(); - Transform_Timer = urand(25000, 40000); - }else Transform_Timer -= diff; + m_uiTransformTimer = urand(25000, 40000); + } + else + m_uiTransformTimer -= uiDiff; + + if (m_uiTrashTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_TRASH) == CAST_OK) + m_uiTrashTimer = urand(4000, 9000); + } + else + m_uiTrashTimer -= uiDiff; DoMeleeAttackIfReady(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index fb5363333..f4a572335 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2557" + #define SD2_REVISION_NR "2558" #endif // __SD2_REVISION_NR_H__ From e899b29be1b89434b540f0ec870d5b21a71078dc Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sat, 19 May 2012 14:51:41 +0300 Subject: [PATCH 0547/1172] [2559] Improve instance script for The Mechanar Added basic support for the Factory Elevator Allow encounter states to be saved Implemented bridge trash waves event script ToDo: Allow the elevator to start based on the instance script - requires core support for GO type 11 --- .../boss_pathaleon_the_calculator.cpp | 23 +-- .../the_mechanar/instance_mechanar.cpp | 195 +++++++++++++++++- .../tempest_keep/the_mechanar/mechanar.h | 76 ++++++- sd2_revision_nr.h | 2 +- sql/scriptdev2_script_full.sql | 3 +- sql/updates/r2559_scriptdev2.sql | 3 + 6 files changed, 280 insertions(+), 22 deletions(-) create mode 100644 sql/updates/r2559_scriptdev2.sql diff --git a/scripts/outland/tempest_keep/the_mechanar/boss_pathaleon_the_calculator.cpp b/scripts/outland/tempest_keep/the_mechanar/boss_pathaleon_the_calculator.cpp index c602a7b3c..b9d522da9 100644 --- a/scripts/outland/tempest_keep/the_mechanar/boss_pathaleon_the_calculator.cpp +++ b/scripts/outland/tempest_keep/the_mechanar/boss_pathaleon_the_calculator.cpp @@ -16,12 +16,13 @@ /* ScriptData SDName: Boss Pathaleon the Calculator -SD%Complete: 40 -SDComment: Pathway event NYI; The Nether Wraith script is wrong - needs research and update +SD%Complete: 85 +SDComment: The Nether Wraith script needs additional research and update SDCategory: Tempest Keep, The Mechanar EndScriptData */ #include "precompiled.h" +#include "mechanar.h" enum { @@ -58,14 +59,12 @@ struct MANGOS_DLL_DECL boss_pathaleon_the_calculatorAI : public ScriptedAI { boss_pathaleon_the_calculatorAI(Creature* pCreature) : ScriptedAI(pCreature) { - // Add the summon spells to a vector for better handling - for (uint8 i = 0; i < 4; ++i) - m_vSummonSpells.push_back(aWraithSummonSpells[i]); - + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); Reset(); } + ScriptedInstance* m_pInstance; bool m_bIsRegularMode; uint32 m_uiSummonTimer; @@ -75,8 +74,6 @@ struct MANGOS_DLL_DECL boss_pathaleon_the_calculatorAI : public ScriptedAI uint32 m_uiArcaneExplosionTimer; bool m_bIsEnraged; - std::vector m_vSummonSpells; - void Reset() { m_uiSummonTimer = 30000; @@ -100,6 +97,9 @@ struct MANGOS_DLL_DECL boss_pathaleon_the_calculatorAI : public ScriptedAI void JustDied(Unit* pKiller) { DoScriptText(SAY_DEATH, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_PATHALEON, DONE); } void JustSummoned(Creature* pSummoned) @@ -116,10 +116,9 @@ struct MANGOS_DLL_DECL boss_pathaleon_the_calculatorAI : public ScriptedAI if (m_uiSummonTimer < uiDiff) { - // Choose 3 random spells out of 4 - std::random_shuffle(m_vSummonSpells.begin(), m_vSummonSpells.end()); - for (uint8 i = 0; i < 3; ++i) - DoCastSpellIfCan(m_creature, m_vSummonSpells[i], CAST_TRIGGERED); + uint8 uiMaxWraith = urand(3, 4); + for (uint8 i = 0; i < uiMaxWraith; ++i) + DoCastSpellIfCan(m_creature, aWraithSummonSpells[i], CAST_TRIGGERED); DoScriptText(SAY_SUMMON, m_creature); m_uiSummonTimer = urand(30000, 45000); diff --git a/scripts/outland/tempest_keep/the_mechanar/instance_mechanar.cpp b/scripts/outland/tempest_keep/the_mechanar/instance_mechanar.cpp index 37ec25031..dd85b087d 100644 --- a/scripts/outland/tempest_keep/the_mechanar/instance_mechanar.cpp +++ b/scripts/outland/tempest_keep/the_mechanar/instance_mechanar.cpp @@ -16,39 +16,222 @@ /* ScriptData SDName: Instance_Mechanar -SD%Complete: 20 -SDComment: +SD%Complete: 70 +SDComment: Elevator needs core support SDCategory: Mechanar EndScriptData */ #include "precompiled.h" #include "mechanar.h" -instance_mechanar::instance_mechanar(Map* pMap) : ScriptedInstance(pMap) { Initialize(); } +instance_mechanar::instance_mechanar(Map* pMap) : ScriptedInstance(pMap), + m_uiBridgeEventTimer(0), + m_uiBridgeEventPhase(0) +{ + Initialize(); +} void instance_mechanar::Initialize() { memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); } +void instance_mechanar::OnPlayerEnter(Player* pPlayer) +{ + // Check encounter states + if (GetData(TYPE_SEPETHREA) != DONE || GetData(TYPE_PATHALEON) == DONE) + return; + + // Check if already summoned + if (GetSingleCreatureFromStorage(NPC_PATHALEON, true)) + return; + + pPlayer->SummonCreature(NPC_PATHALEON, aBridgeLocs[6].m_fX, aBridgeLocs[6].m_fY, aBridgeLocs[6].m_fZ, aBridgeLocs[6].m_fO, TEMPSUMMON_DEAD_DESPAWN, 0); +} + +void instance_mechanar::OnCreatureCreate(Creature* pCreature) +{ + switch (pCreature->GetEntry()) + { + case NPC_PATHALEON: + m_mNpcEntryGuidStore[pCreature->GetEntry()] = pCreature->GetObjectGuid(); + break; + case NPC_ASTROMAGE: + case NPC_PHYSICIAN: + case NPC_CENTURION: + case NPC_ENGINEER: + case NPC_NETHERBINDER: + case NPC_FORGE_DESTROYER: + if (pCreature->IsTemporarySummon()) + m_sBridgeTrashGuidSet.insert(pCreature->GetObjectGuid()); + break; + } +} + +void instance_mechanar::OnObjectCreate(GameObject* pGo) +{ + if (pGo->GetEntry() == GO_FACTORY_ELEVATOR) + { + // ToDo: activate elevator if TYPE_GYRO_KILL && TYPE_IRON_HAND && TYPE_CAPACITUS are DONE + m_mGoEntryGuidStore[GO_FACTORY_ELEVATOR] = pGo->GetObjectGuid(); + } +} + void instance_mechanar::SetData(uint32 uiType, uint32 uiData) { switch(uiType) { + case TYPE_GYRO_KILL: + case TYPE_IRON_HAND: + case TYPE_CAPACITUS: + m_auiEncounter[uiType] = uiData; + // ToDo: Activate the Elevator when all these 3 are done + break; case TYPE_SEPETHREA: - m_auiEncounter[0] = uiData; + m_auiEncounter[uiType] = uiData; + if (uiData == DONE) + m_uiBridgeEventTimer = 10000; + break; + case TYPE_PATHALEON: + m_auiEncounter[uiType] = uiData; break; } + + if (uiData == DONE) + { + OUT_SAVE_INST_DATA; + + std::ostringstream saveStream; + + saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2] << " " + << m_auiEncounter[3] << " " << m_auiEncounter[4]; + + m_strInstData = saveStream.str(); + + SaveToDB(); + OUT_SAVE_INST_DATA_COMPLETE; + } } uint32 instance_mechanar::GetData(uint32 uiType) { - if (uiType == TYPE_SEPETHREA) - return m_auiEncounter[0]; + if (uiType < MAX_ENCOUNTER) + return m_auiEncounter[uiType]; return 0; } +void instance_mechanar::Load(const char* chrIn) +{ + if (!chrIn) + { + OUT_LOAD_INST_DATA_FAIL; + return; + } + + OUT_LOAD_INST_DATA(chrIn); + + std::istringstream loadStream(chrIn); + loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3] + >> m_auiEncounter[4]; + + for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) + { + if (m_auiEncounter[i] == IN_PROGRESS) + m_auiEncounter[i] = NOT_STARTED; + } + + OUT_LOAD_INST_DATA_COMPLETE; +} + +void instance_mechanar::OnCreatureDeath(Creature* pCreature) +{ + switch (pCreature->GetEntry()) + { + case NPC_GYRO_KILL: SetData(TYPE_GYRO_KILL, DONE); break; + case NPC_IRON_HAND: SetData(TYPE_IRON_HAND, DONE); break; + case NPC_LORD_CAPACITUS: SetData(TYPE_CAPACITUS, DONE); break; + + case NPC_ASTROMAGE: + case NPC_PHYSICIAN: + case NPC_CENTURION: + case NPC_ENGINEER: + case NPC_NETHERBINDER: + case NPC_FORGE_DESTROYER: + if (m_sBridgeTrashGuidSet.find(pCreature->GetObjectGuid()) != m_sBridgeTrashGuidSet.end()) + { + m_sBridgeTrashGuidSet.erase(pCreature->GetObjectGuid()); + + if (m_sBridgeTrashGuidSet.empty()) + { + // After the 3rd wave wait 10 seconds + if (m_uiBridgeEventPhase == 3) + m_uiBridgeEventTimer = 10000; + else + DoSpawnBridgeWave(); + } + } + break; + } +} + +void instance_mechanar::DoSpawnBridgeWave() +{ + if (Player* pPlayer = GetPlayerInMap(true, false)) + { + // For these wave ids summon only 1 npc + if (m_uiBridgeEventPhase == 6 || m_uiBridgeEventPhase == 4 || m_uiBridgeEventPhase == 1) + { + if (Creature* pTemp = pPlayer->SummonCreature(aBridgeEventNpcs[m_uiBridgeEventPhase][0], aBridgeLocs[m_uiBridgeEventPhase].m_fX, aBridgeLocs[m_uiBridgeEventPhase].m_fY, aBridgeLocs[m_uiBridgeEventPhase].m_fZ, aBridgeLocs[m_uiBridgeEventPhase].m_fO, TEMPSUMMON_DEAD_DESPAWN, 0)) + { + pTemp->CastSpell(pTemp, SPELL_SIMPLE_TELEPORT, false); + + // Yell intro when Pathaleon is summoned + if (m_uiBridgeEventPhase == 6) + DoScriptText(SAY_PATHALEON_INTRO, pTemp); + // The Forge Destroyers need to attack the player + else + pTemp->AI()->AttackStart(pPlayer); + } + } + else + { + float fX, fY, fZ; + for (uint8 i = 0; i < MAX_BRIDGE_TRASH; ++i) + { + if (!aBridgeEventNpcs[m_uiBridgeEventPhase][i]) + continue; + + // Choose a random point to summon the npcs + pPlayer->GetRandomPoint(aBridgeLocs[m_uiBridgeEventPhase].m_fX, aBridgeLocs[m_uiBridgeEventPhase].m_fY, aBridgeLocs[m_uiBridgeEventPhase].m_fZ, 5.0f, fX, fY, fZ); + if (Creature* pTemp = pPlayer->SummonCreature(aBridgeEventNpcs[m_uiBridgeEventPhase][i], fX, fY, fZ, aBridgeLocs[m_uiBridgeEventPhase].m_fO, TEMPSUMMON_DEAD_DESPAWN, 0)) + { + pTemp->CastSpell(pTemp, SPELL_SIMPLE_TELEPORT, false); + + // They start attacking the players, except for the ones from phase 0 and 3 + if (m_uiBridgeEventPhase != 0 && m_uiBridgeEventPhase != 3) + pTemp->AI()->AttackStart(pPlayer); + } + } + } + } + ++m_uiBridgeEventPhase; +} + +void instance_mechanar::Update(uint32 uiDiff) +{ + if (m_uiBridgeEventTimer) + { + if (m_uiBridgeEventTimer <= uiDiff) + { + DoSpawnBridgeWave(); + m_uiBridgeEventTimer = 0; + } + else + m_uiBridgeEventTimer -= uiDiff; + } +} + InstanceData* GetInstanceData_instance_mechanar(Map* pMap) { return new instance_mechanar(pMap); diff --git a/scripts/outland/tempest_keep/the_mechanar/mechanar.h b/scripts/outland/tempest_keep/the_mechanar/mechanar.h index fe53e938b..538e108ab 100644 --- a/scripts/outland/tempest_keep/the_mechanar/mechanar.h +++ b/scripts/outland/tempest_keep/the_mechanar/mechanar.h @@ -7,9 +7,62 @@ enum { - MAX_ENCOUNTER = 1, + MAX_ENCOUNTER = 5, + MAX_BRIDGE_LOCATIONS = 7, + MAX_BRIDGE_TRASH = 4, - TYPE_SEPETHREA = 1 + TYPE_GYRO_KILL = 0, + TYPE_IRON_HAND = 1, + TYPE_CAPACITUS = 2, + TYPE_SEPETHREA = 3, + TYPE_PATHALEON = 4, + + NPC_GYRO_KILL = 19218, + NPC_IRON_HAND = 19710, + NPC_LORD_CAPACITUS = 19219, + //NPC_SEPETHREA = 19221, + NPC_PATHALEON = 19220, + + // bridge event related + NPC_ASTROMAGE = 19168, + NPC_PHYSICIAN = 20990, + NPC_CENTURION = 19510, + NPC_ENGINEER = 20988, + NPC_NETHERBINDER = 20059, + NPC_FORGE_DESTROYER = 19735, + + GO_FACTORY_ELEVATOR = 183788, + + SPELL_SIMPLE_TELEPORT = 12980, + + SAY_PATHALEON_INTRO = -1554028, +}; + +struct SpawnLocation +{ + float m_fX, m_fY, m_fZ, m_fO; +}; + +static const SpawnLocation aBridgeLocs[MAX_BRIDGE_LOCATIONS] = +{ + {246.29f, -22.41f, 26.32f, 0}, + {207.52f, -23.13f, 24.87f, 0}, + {181.58f, -23.01f, 24.87f, 0}, + {137.87f, 28.67f, 24.87f, 4.65f}, + {137.95f, 52.72f, 24.87f, 4.65f}, + {138.25f, 93.51f, 26.37f, 4.65f}, + {138.44f, 150.28f, 25.57f, 4.63f} // Pathaleon summon location +}; + +static const uint32 aBridgeEventNpcs[MAX_BRIDGE_LOCATIONS][MAX_BRIDGE_TRASH] = +{ + {NPC_ASTROMAGE, NPC_ASTROMAGE, NPC_PHYSICIAN, NPC_CENTURION}, + {NPC_FORGE_DESTROYER, 0, 0, 0}, + {NPC_ENGINEER, NPC_PHYSICIAN, NPC_ENGINEER, 0}, + {NPC_ASTROMAGE, NPC_PHYSICIAN, NPC_ENGINEER, 0}, + {NPC_FORGE_DESTROYER, 0, 0, 0}, + {NPC_PHYSICIAN, NPC_ASTROMAGE, NPC_ENGINEER, NPC_NETHERBINDER}, + {NPC_PATHALEON, 0, 0, 0} }; class MANGOS_DLL_DECL instance_mechanar : public ScriptedInstance @@ -19,11 +72,30 @@ class MANGOS_DLL_DECL instance_mechanar : public ScriptedInstance void Initialize(); + void OnPlayerEnter(Player* pPlayer); + void OnObjectCreate(GameObject* pGo); + void OnCreatureCreate(Creature* pCreature); + + void OnCreatureDeath(Creature* pCreature); + void SetData(uint32 uiType, uint32 uiData); uint32 GetData(uint32 uiType); + const char* Save() { return m_strInstData.c_str(); } + void Load(const char* chrIn); + + void Update(uint32 uiDiff); + private: + void DoSpawnBridgeWave(); + uint32 m_auiEncounter[MAX_ENCOUNTER]; + std::string m_strInstData; + + uint32 m_uiBridgeEventTimer; + uint8 m_uiBridgeEventPhase; + + GUIDSet m_sBridgeTrashGuidSet; }; #endif diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index f4a572335..44ac90f4b 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2558" + #define SD2_REVISION_NR "2559" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index a2e395674..23f020384 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -2110,7 +2110,8 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1554024,'I prefeer to be hands-on...',11199,1,0,0,'pathaleon SAY_ENRAGE'), (-1554025,'A minor inconvenience.',11194,1,0,0,'pathaleon SAY_SLAY_1'), (-1554026,'Looks like you lose.',11195,1,0,0,'pathaleon SAY_SLAY_2'), -(-1554027,'The project will... continue.',11200,1,0,0,'pathaleon SAY_DEATH'); +(-1554027,'The project will... continue.',11200,1,0,0,'pathaleon SAY_DEATH'), +(-1554028,'I have been waiting for you!',0,1,0,0,'pathaleon SAY_INTRO'); -- -1 555 000 SHADOW LABYRINTH INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES diff --git a/sql/updates/r2559_scriptdev2.sql b/sql/updates/r2559_scriptdev2.sql new file mode 100644 index 000000000..1e11253c1 --- /dev/null +++ b/sql/updates/r2559_scriptdev2.sql @@ -0,0 +1,3 @@ +DELETE FROM script_texts WHERE entry=-1554028; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1554028,'I have been waiting for you!',0,1,0,0,'pathaleon SAY_INTRO'); From a7ab26f4d1e17fdd966c8b3fe433749332528ea5 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sat, 19 May 2012 20:31:08 +0300 Subject: [PATCH 0548/1172] [2560] Cleanup for Murmur - Shadow Labyrinth Note: Spells 33923, 38796, 33711 and 38794 require additional research and core support --- .../shadow_labyrinth/boss_murmur.cpp | 195 +++++++----------- sd2_revision_nr.h | 2 +- 2 files changed, 77 insertions(+), 120 deletions(-) diff --git a/scripts/outland/auchindoun/shadow_labyrinth/boss_murmur.cpp b/scripts/outland/auchindoun/shadow_labyrinth/boss_murmur.cpp index 66dc2a4ed..b3f991d3d 100644 --- a/scripts/outland/auchindoun/shadow_labyrinth/boss_murmur.cpp +++ b/scripts/outland/auchindoun/shadow_labyrinth/boss_murmur.cpp @@ -17,30 +17,32 @@ /* ScriptData SDName: Boss_Murmur SD%Complete: 75 -SDComment: Database should have `RegenHealth`=0 to prevent regen. Also, his shockwave triggered after magnetic pull may be incorrect. Murmur's Touch does not work properly. +SDComment: Sonic Boom and Murmur's Touch require additional research and core support SDCategory: Auchindoun, Shadow Labyrinth EndScriptData */ #include "precompiled.h" #include "shadow_labyrinth.h" -#define EMOTE_SONIC_BOOM -1555036 +enum +{ + EMOTE_SONIC_BOOM = -1555036, -#define SPELL_MAGNETIC_PULL 33689 -#define SPELL_SONIC_BOOM_PRE 33923 -#define SPELL_SONIC_BOOM_CAST 38795 -#define SPELL_MURMURS_TOUCH 33711 -#define SPELL_RESONANCE 33657 -#define SPELL_SHOCKWAVE 33686 + SPELL_MAGNETIC_PULL = 33689, + SPELL_SONIC_BOOM = 33923, // dummy spell - triggers 33666 + SPELL_SONIC_BOOM_H = 38796, // dummy spell - triggers 38795 + SPELL_MURMURS_TOUCH = 33711, // on expire silences the party members using shockwave - 33686 - also related to spell 33760 + SPELL_MURMURS_TOUCH_H = 38794, + SPELL_RESONANCE = 33657, -#define SPELL_SONIC_SHOCK 38797 //Heroic Spell -#define SPELL_THUNDERING_STORM 39365 //Heroic Spell + SPELL_SONIC_SHOCK = 38797, // Heroic Spell + SPELL_THUNDERING_STORM = 39365, // Heroic Spell +}; -struct MANGOS_DLL_DECL boss_murmurAI : public ScriptedAI +struct MANGOS_DLL_DECL boss_murmurAI : public Scripted_NoMovementAI { - boss_murmurAI(Creature* pCreature) : ScriptedAI(pCreature) + boss_murmurAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { - SetCombatMovement(false); m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); Reset(); @@ -49,145 +51,100 @@ struct MANGOS_DLL_DECL boss_murmurAI : public ScriptedAI ScriptedInstance* m_pInstance; bool m_bIsRegularMode; - uint32 SonicBoom_Timer; - uint32 MurmursTouch_Timer; - uint32 Resonance_Timer; - uint32 MagneticPull_Timer; - uint32 SonicShock_Timer; - uint32 ThunderingStorm_Timer; - bool CanSonicBoom; - bool CanShockWave; - ObjectGuid m_playerTargetGuid; + uint32 m_uiSonicBoomTimer; + uint32 m_uiMurmursTouchTimer; + uint32 m_uiResonanceTimer; + uint32 m_uiMagneticPullTimer; + uint32 m_uiSonicShockTimer; + uint32 m_uiThunderingStormTimer; void Reset() { - SonicBoom_Timer = 30000; - MurmursTouch_Timer = urand(8000, 20000); - Resonance_Timer = 5000; - MagneticPull_Timer = urand(15000, 30000); - SonicShock_Timer = urand(4000, 10000); - ThunderingStorm_Timer = 12000; //Casting directly after Sonic Boom. - CanSonicBoom = false; - CanShockWave = false; - m_playerTargetGuid.Clear(); - - //database should have `RegenHealth`=0 to prevent regen - uint32 hp = (m_creature->GetMaxHealth()*40)/100; - if (hp) - m_creature->SetHealth(hp); - } - - void SonicBoomEffect() - { - std::vector vGuids; - m_creature->FillGuidsListFromThreatList(vGuids); - for (std::vector::const_iterator itr = vGuids.begin();itr != vGuids.end(); ++itr) - { - Unit* target = m_creature->GetMap()->GetUnit(*itr); - - if (target && target->GetTypeId() == TYPEID_PLAYER) - { - //Not do anything without aura, spell can be resisted! - if (target->HasAura(SPELL_SONIC_BOOM_CAST, EFFECT_INDEX_1) && m_creature->IsWithinDistInMap(target, 34.0f)) - { - //This will be wrong calculation. Also, comments suggest it must deal damage - target->SetHealth(uint32(target->GetMaxHealth() - target->GetMaxHealth() * 0.8)); - } - } - } + m_uiSonicBoomTimer = 30000; + m_uiMurmursTouchTimer = urand(8000, 20000); + m_uiResonanceTimer = 5000; + m_uiMagneticPullTimer = urand(15000, 30000); + m_uiSonicShockTimer = urand(4000, 10000); + m_uiThunderingStormTimer = 12000; // Casting directly after Sonic Boom. + + // Boss has only 0.4 of max health + m_creature->SetHealth(uint32(m_creature->GetMaxHealth()*.4)); } - void UpdateAI(const uint32 diff) + void UpdateAI(const uint32 uiDiff) { - //Return since we have no target + // Return since we have no target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - //SonicBoom_Timer - if (SonicBoom_Timer < diff) + // SonicBoom_Timer + if (m_uiSonicBoomTimer < uiDiff) { - if (CanSonicBoom) - { - DoCastSpellIfCan(m_creature, SPELL_SONIC_BOOM_CAST, CAST_TRIGGERED); - SonicBoomEffect(); - - CanSonicBoom = false; - SonicBoom_Timer = 30000; - } - else + if (DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_SONIC_BOOM : SPELL_SONIC_BOOM_H) == CAST_OK) { DoScriptText(EMOTE_SONIC_BOOM, m_creature); - DoCastSpellIfCan(m_creature,SPELL_SONIC_BOOM_PRE); - CanSonicBoom = true; - SonicBoom_Timer = 5000; + m_uiSonicBoomTimer = 30000; } - }else SonicBoom_Timer -= diff; + } + else + m_uiSonicBoomTimer -= uiDiff; - //MurmursTouch_Timer - if (MurmursTouch_Timer < diff) - { - /*Unit* target = NULL; - target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0); - if (target) - DoCastSpellIfCan(target, SPELL_MURMURS_TOUCH);*/ - DoCastSpellIfCan(m_creature, SPELL_MURMURS_TOUCH); - MurmursTouch_Timer = urand(25000, 35000); - }else MurmursTouch_Timer -= diff; - - //Resonance_Timer - if (!CanSonicBoom && !m_creature->CanReachWithMeleeAttack(m_creature->getVictim())) + // MurmursTouch_Timer + if (m_uiMurmursTouchTimer < uiDiff) { - if (Resonance_Timer < diff) - { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_RESONANCE); - Resonance_Timer = m_bIsRegularMode ? 5000 : 3000; - }else Resonance_Timer -= diff; + if (DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_MURMURS_TOUCH : SPELL_MURMURS_TOUCH_H) == CAST_OK) + m_uiMurmursTouchTimer = urand(25000, 35000); } + else + m_uiMurmursTouchTimer -= uiDiff; - if (!m_bIsRegularMode) + // Resonance_Timer - cast if no target is in range + if (!m_creature->CanReachWithMeleeAttack(m_creature->getVictim())) { - if (SonicShock_Timer < diff) + if (m_uiResonanceTimer < uiDiff) { - if (Unit *target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) - DoCastSpellIfCan(target, SPELL_SONIC_SHOCK); - SonicShock_Timer = urand(8000, 12000); - }else SonicShock_Timer -= diff; + if (DoCastSpellIfCan(m_creature, SPELL_RESONANCE) == CAST_OK) + m_uiResonanceTimer = 5000; + } + else + m_uiResonanceTimer -= uiDiff; + } - if (ThunderingStorm_Timer < diff) + // MagneticPull_Timer + if (m_uiMagneticPullTimer < uiDiff) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0, SPELL_MAGNETIC_PULL, SELECT_FLAG_PLAYER)) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_THUNDERING_STORM); - ThunderingStorm_Timer = 12000; - }else ThunderingStorm_Timer -= diff; + if (DoCastSpellIfCan(pTarget, SPELL_MAGNETIC_PULL) == CAST_OK) + m_uiMagneticPullTimer = urand(15000, 30000); + } } + else + m_uiMagneticPullTimer -= uiDiff; - //MagneticPull_Timer - if (MagneticPull_Timer < diff) + if (!m_bIsRegularMode) { - if (!CanShockWave) + if (m_uiSonicShockTimer < uiDiff) { - if (Unit* pTemp = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0, SPELL_MAGNETIC_PULL, SELECT_FLAG_PLAYER)) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0, SPELL_SONIC_SHOCK, SELECT_FLAG_IN_MELEE_RANGE)) { - DoCastSpellIfCan(pTemp, SPELL_MAGNETIC_PULL); - m_playerTargetGuid = pTemp->GetObjectGuid(); - CanShockWave = true; + if (DoCastSpellIfCan(pTarget, SPELL_SONIC_SHOCK) == CAST_OK) + m_uiSonicShockTimer = urand(8000, 12000); } } else - { - if (Player* pPlayer = m_creature->GetMap()->GetPlayer(m_playerTargetGuid)) - pPlayer->CastSpell(pPlayer, SPELL_SHOCKWAVE, true); + m_uiSonicShockTimer -= uiDiff; - MagneticPull_Timer = urand(15000, 30000); - CanShockWave = false; - m_playerTargetGuid.Clear(); + if (m_uiThunderingStormTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_THUNDERING_STORM) == CAST_OK) + m_uiThunderingStormTimer = 12000; } + else + m_uiThunderingStormTimer -= uiDiff; } - else - MagneticPull_Timer -= diff; - //no meele if preparing for sonic boom - if (!CanSonicBoom) - DoMeleeAttackIfReady(); + DoMeleeAttackIfReady(); } }; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 44ac90f4b..43a75f280 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2559" + #define SD2_REVISION_NR "2560" #endif // __SD2_REVISION_NR_H__ From ec59d1e75ae73759cec50fb818083701c064ee92 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sat, 19 May 2012 21:42:58 +0300 Subject: [PATCH 0549/1172] [2561] Small cleanup for Magister's Terrace Removed gossip for Kalecgos - this is already handled by database Add script event check in order to prevent the summoning of Kalecgos multiple times --- .../instance_magisters_terrace.cpp | 1 + .../magisters_terrace/magisters_terrace.cpp | 114 +++++------------- .../magisters_terrace/magisters_terrace.h | 1 + sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 5 +- sql/updates/r2561_mangos.sql | 4 + 6 files changed, 44 insertions(+), 83 deletions(-) create mode 100644 sql/updates/r2561_mangos.sql diff --git a/scripts/eastern_kingdoms/magisters_terrace/instance_magisters_terrace.cpp b/scripts/eastern_kingdoms/magisters_terrace/instance_magisters_terrace.cpp index 85b921e3f..0aa8241d4 100644 --- a/scripts/eastern_kingdoms/magisters_terrace/instance_magisters_terrace.cpp +++ b/scripts/eastern_kingdoms/magisters_terrace/instance_magisters_terrace.cpp @@ -48,6 +48,7 @@ void instance_magisters_terrace::OnCreatureCreate(Creature* pCreature) { case NPC_SELIN_FIREHEART: case NPC_DELRISSA: + case NPC_KALECGOS_DRAGON: m_mNpcEntryGuidStore[pCreature->GetEntry()] = pCreature->GetObjectGuid(); break; case NPC_FEL_CRYSTAL: diff --git a/scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.cpp b/scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.cpp index 5edb126ff..6b60d387d 100644 --- a/scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.cpp +++ b/scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.cpp @@ -26,6 +26,7 @@ npc_kalecgos EndContentData */ #include "precompiled.h" +#include "magisters_terrace.h" /*###### ## npc_kalecgos @@ -35,17 +36,10 @@ enum { SPELL_TRANSFORM_TO_KAEL = 44670, SPELL_ORB_KILL_CREDIT = 46307, - NPC_KAEL = 24848, //human form entry - POINT_ID_LAND = 1 + NPC_KALECGOS = 24848, // human form entry }; -const float afKaelLandPoint[] = {225.045f, -276.236f, -5.434f}; - -#define GOSSIP_ITEM_KAEL_1 "Who are you?" -#define GOSSIP_ITEM_KAEL_2 "What can we do to assist you?" -#define GOSSIP_ITEM_KAEL_3 "What brings you to the Sunwell?" -#define GOSSIP_ITEM_KAEL_4 "You're not alone here?" -#define GOSSIP_ITEM_KAEL_5 "What would Kil'jaeden want with a mortal woman?" +static const float afKaelLandPoint[4] = {200.36f, -270.77f, -8.73f, 0.01f}; // This is friendly keal that appear after used Orb. // If we assume DB handle summon, summon appear somewhere outside the platform where Orb is @@ -59,9 +53,8 @@ struct MANGOS_DLL_DECL npc_kalecgosAI : public ScriptedAI { m_uiTransformTimer = 0; - // we must assume he appear as dragon somewhere outside the platform of orb, and then move directly to here - if (m_creature->GetEntry() != NPC_KAEL) - m_creature->GetMotionMaster()->MovePoint(POINT_ID_LAND, afKaelLandPoint[0], afKaelLandPoint[1], afKaelLandPoint[2]); + // Move the dragon to landing point + m_creature->GetMotionMaster()->MovePoint(1, afKaelLandPoint[0], afKaelLandPoint[1], afKaelLandPoint[2]); } void MovementInform(uint32 uiType, uint32 uiPointId) @@ -69,32 +62,11 @@ struct MANGOS_DLL_DECL npc_kalecgosAI : public ScriptedAI if (uiType != POINT_MOTION_TYPE) return; - if (uiPointId == POINT_ID_LAND) - m_uiTransformTimer = MINUTE*IN_MILLISECONDS; - } - - // some targeting issues with the spell, so use this workaround as temporary solution - void DoWorkaroundForQuestCredit() - { - Map* pMap = m_creature->GetMap(); - - if (!pMap || !pMap->IsRegularDifficulty()) - return; - - Map::PlayerList const &lList = pMap->GetPlayers(); - - if (lList.isEmpty()) - return; - - SpellEntry const* pSpell = GetSpellStore()->LookupEntry(SPELL_ORB_KILL_CREDIT); - - for(Map::PlayerList::const_iterator i = lList.begin(); i != lList.end(); ++i) + if (uiPointId) { - if (Player* pPlayer = i->getSource()) - { - if (pSpell && pSpell->EffectMiscValue[0]) - pPlayer->KilledMonsterCredit(pSpell->EffectMiscValue[0]); - } + m_creature->SetLevitate(false); + m_creature->SetFacingTo(afKaelLandPoint[4]); + m_uiTransformTimer = MINUTE*IN_MILLISECONDS; } } @@ -102,17 +74,19 @@ struct MANGOS_DLL_DECL npc_kalecgosAI : public ScriptedAI { if (m_uiTransformTimer) { - if (m_uiTransformTimer < uiDiff) + if (m_uiTransformTimer <= uiDiff) { - m_creature->CastSpell(m_creature,SPELL_ORB_KILL_CREDIT,false); - DoWorkaroundForQuestCredit(); - // Transform and update entry, now ready for quest/read gossip - m_creature->CastSpell(m_creature,SPELL_TRANSFORM_TO_KAEL,false); - m_creature->UpdateEntry(NPC_KAEL); + if (DoCastSpellIfCan(m_creature, SPELL_TRANSFORM_TO_KAEL) == CAST_OK) + { + DoCastSpellIfCan(m_creature, SPELL_ORB_KILL_CREDIT, CAST_TRIGGERED); + m_creature->UpdateEntry(NPC_KALECGOS); - m_uiTransformTimer = 0; - }else m_uiTransformTimer -= uiDiff; + m_uiTransformTimer = 0; + } + } + else + m_uiTransformTimer -= uiDiff; } } }; @@ -122,43 +96,18 @@ CreatureAI* GetAI_npc_kalecgos(Creature* pCreature) return new npc_kalecgosAI(pCreature); } -bool GossipHello_npc_kalecgos(Player* pPlayer, Creature* pCreature) -{ - if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); - - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KAEL_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF); - pPlayer->SEND_GOSSIP_MENU(12498, pCreature->GetObjectGuid()); - - return true; -} - -bool GossipSelect_npc_kalecgos(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +bool ProcessEventId_event_go_scrying_orb(uint32 uiEventId, Object* pSource, Object* pTarget, bool bIsStart) { - switch(uiAction) + if (bIsStart && pSource->GetTypeId() == TYPEID_PLAYER) { - case GOSSIP_ACTION_INFO_DEF: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KAEL_2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); - pPlayer->SEND_GOSSIP_MENU(12500, pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF+1: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KAEL_3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); - pPlayer->SEND_GOSSIP_MENU(12502, pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF+2: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KAEL_4, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); - pPlayer->SEND_GOSSIP_MENU(12606, pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF+3: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KAEL_5, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4); - pPlayer->SEND_GOSSIP_MENU(12607, pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF+4: - pPlayer->SEND_GOSSIP_MENU(12608, pCreature->GetObjectGuid()); - break; + if (instance_magisters_terrace* pInstance = (instance_magisters_terrace*)((Player*)pSource)->GetInstanceData()) + { + // Check if the Dragon is already spawned and don't allow it to spawn it multiple times + if (pInstance->GetSingleCreatureFromStorage(NPC_KALECGOS_DRAGON, true)) + return true; + } } - - return true; + return false; } void AddSC_magisters_terrace() @@ -168,7 +117,10 @@ void AddSC_magisters_terrace() pNewScript = new Script; pNewScript->Name = "npc_kalecgos"; pNewScript->GetAI = &GetAI_npc_kalecgos; - pNewScript->pGossipHello = &GossipHello_npc_kalecgos; - pNewScript->pGossipSelect = &GossipSelect_npc_kalecgos; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "event_go_scrying_orb"; + pNewScript->pProcessEventId = &ProcessEventId_event_go_scrying_orb; pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.h b/scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.h index faebfa347..5bae7df07 100644 --- a/scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.h +++ b/scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.h @@ -19,6 +19,7 @@ enum NPC_SELIN_FIREHEART = 24723, NPC_DELRISSA = 24560, NPC_FEL_CRYSTAL = 24722, + NPC_KALECGOS_DRAGON = 24844, GO_VEXALLUS_DOOR = 187896, GO_SELIN_DOOR = 187979, // SunwellRaid Gate 02 diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 43a75f280..c6e84e2c0 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2560" + #define SD2_REVISION_NR "2561" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 4ec935b9e..8b26b6c61 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -790,7 +790,10 @@ UPDATE creature_template SET ScriptName='boss_felblood_kaelthas' WHERE entry=246 UPDATE creature_template SET ScriptName='mob_arcane_sphere' WHERE entry=24708; UPDATE creature_template SET ScriptName='mob_felkael_phoenix' WHERE entry=24674; UPDATE creature_template SET ScriptName='mob_felkael_phoenix_egg' WHERE entry=24675; -UPDATE creature_template SET ScriptName='npc_kalecgos' WHERE entry IN (24844, 24848); +UPDATE creature_template SET ScriptName='npc_kalecgos' WHERE entry=24844; +DELETE FROM scripted_event_id WHERE id=16547; +INSERT INTO scripted_event_id VALUES +(16547,'event_go_scrying_orb'); /* MARAUDON */ UPDATE creature_template SET ScriptName='boss_princess_theradras' WHERE entry=12201; diff --git a/sql/updates/r2561_mangos.sql b/sql/updates/r2561_mangos.sql new file mode 100644 index 000000000..a2d40acc0 --- /dev/null +++ b/sql/updates/r2561_mangos.sql @@ -0,0 +1,4 @@ +UPDATE creature_template SET ScriptName='' WHERE entry IN (24848); +DELETE FROM scripted_event_id WHERE id=16547; +INSERT INTO scripted_event_id VALUES +(16547,'event_go_scrying_orb'); From 8fd91b0f9a028a94bd829d3689347de775c73750 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sun, 20 May 2012 02:16:39 +0300 Subject: [PATCH 0550/1172] [2562] Improve script for The Arcatraz Allow instance data to be saved Handle Harbinger Skyriss event using the dialogue helper for better control --- .../tempest_keep/arcatraz/arcatraz.cpp | 413 ++++++------------ .../outland/tempest_keep/arcatraz/arcatraz.h | 45 +- .../arcatraz/boss_harbinger_skyriss.cpp | 158 ++----- .../arcatraz/instance_arcatraz.cpp | 256 ++++++++++- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 - sql/updates/r2562_mangos.sql | 1 + 7 files changed, 461 insertions(+), 415 deletions(-) create mode 100644 sql/updates/r2562_mangos.sql diff --git a/scripts/outland/tempest_keep/arcatraz/arcatraz.cpp b/scripts/outland/tempest_keep/arcatraz/arcatraz.cpp index d268f321d..065e17dc0 100644 --- a/scripts/outland/tempest_keep/arcatraz/arcatraz.cpp +++ b/scripts/outland/tempest_keep/arcatraz/arcatraz.cpp @@ -48,7 +48,6 @@ enum SAY_ICEBLOCK = -1552019, SAY_LOWHP = -1552020, SAY_DEATH = -1552021, - SAY_COMPLETE = -1552022, SPELL_CONJURE_WATER = 36879, SPELL_ARCANE_INTELLECT = 36880, @@ -60,44 +59,58 @@ enum SPELL_FIREBALL = 14034, SPELL_FROSTBOLT = 15497, SPELL_PYROBLAST = 33975, + SPELL_ICE_BLOCK = 36911, + + POINT_ID_CENTER = 1, }; -struct MANGOS_DLL_DECL npc_millhouse_manastormAI : public ScriptedAI +static const DialogueEntry aIntroDialogue[] = +{ + {NPC_MILLHOUSE, 0, 2000}, + {SAY_INTRO_1, NPC_MILLHOUSE, 10000}, + {TYPE_WARDEN_2, 0, 10000}, + {SAY_INTRO_2, NPC_MILLHOUSE, 18000}, + {SAY_WATER, NPC_MILLHOUSE, 7000}, + {SAY_BUFFS, NPC_MILLHOUSE, 7000}, + {SAY_DRINK, NPC_MILLHOUSE, 7000}, + {SAY_READY, NPC_MILLHOUSE, 6000}, + {POINT_ID_CENTER, 0, 0}, + {0, 0, 0}, +}; + +static const float fRoomCenterCoords[3] = {445.92f, -158.37f, 43.06f}; + +struct MANGOS_DLL_DECL npc_millhouse_manastormAI : public ScriptedAI, private DialogueHelper { - npc_millhouse_manastormAI(Creature* pCreature) : ScriptedAI(pCreature) + npc_millhouse_manastormAI(Creature* pCreature) : ScriptedAI(pCreature), + DialogueHelper(aIntroDialogue) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + InitializeDialogueHelper(m_pInstance); Reset(); } ScriptedInstance* m_pInstance; - uint32 m_uiEventProgressTimer; - uint32 m_uiPhase; - bool m_bInitFinished; bool m_bHasLowHp; - uint32 m_uiPyroblastTimer; uint32 m_uiFireballTimer; + uint32 m_uiFrostBoltTimer; + uint32 m_uiFireBlastTimer; + uint32 m_uiConeColtTimer; + uint32 m_uiArcaneMissileTimer; void Reset() { - m_uiEventProgressTimer = 2000; - m_bHasLowHp = false; - m_bInitFinished = false; - m_uiPhase = 1; - - m_uiPyroblastTimer = 1000; - m_uiFireballTimer = 2500; - - if (m_pInstance) - { - if (m_pInstance->GetData(TYPE_WARDEN_2) == DONE) - m_bInitFinished = true; - - if (m_pInstance->GetData(TYPE_HARBINGERSKYRISS) == DONE) - DoScriptText(SAY_COMPLETE, m_creature); - } + m_bHasLowHp = false; + m_uiPyroblastTimer = urand(6000, 9000); + m_uiFireballTimer = urand(2500, 4000); + m_uiFrostBoltTimer = urand(3000, 5000); + m_uiFireBlastTimer = urand(6000, 14000); + m_uiConeColtTimer = urand(7000, 12000); + m_uiArcaneMissileTimer = urand(5000, 8000); + + StartNextDialogueText(NPC_MILLHOUSE); } void AttackStart(Unit* pWho) @@ -107,8 +120,7 @@ struct MANGOS_DLL_DECL npc_millhouse_manastormAI : public ScriptedAI m_creature->AddThreat(pWho); m_creature->SetInCombatWith(pWho); pWho->SetInCombatWith(m_creature); - - m_creature->GetMotionMaster()->MoveChase(pWho, 25.0f); + DoStartMovement(pWho, 25.0f); } } @@ -126,55 +138,49 @@ struct MANGOS_DLL_DECL npc_millhouse_manastormAI : public ScriptedAI ->FailQuest();*/ } - void UpdateAI(const uint32 uiDiff) + void EnterEvadeMode() + { + m_creature->RemoveAllAuras(); + m_creature->DeleteThreatList(); + m_creature->CombatStop(true); + m_creature->LoadCreatureAddon(true); + + // Boss should evade in the center of the room + if (m_creature->isAlive()) + m_creature->GetMotionMaster()->MovePoint(1, fRoomCenterCoords[0], fRoomCenterCoords[1], fRoomCenterCoords[2]); + + m_creature->SetLootRecipient(NULL); + + Reset(); + } + + void JustDidDialogueStep(int32 iEntry) { - if (!m_bInitFinished) + switch (iEntry) { - if (m_uiEventProgressTimer < uiDiff) - { - if (m_uiPhase < 8) - { - switch(m_uiPhase) - { - case 1: - DoScriptText(SAY_INTRO_1, m_creature); - m_uiEventProgressTimer = 18000; - break; - case 2: - DoScriptText(SAY_INTRO_2, m_creature); - m_uiEventProgressTimer = 18000; - break; - case 3: - DoScriptText(SAY_WATER, m_creature); - DoCastSpellIfCan(m_creature, SPELL_CONJURE_WATER); - m_uiEventProgressTimer = 7000; - break; - case 4: - DoScriptText(SAY_BUFFS, m_creature); - DoCastSpellIfCan(m_creature, SPELL_ICE_ARMOR); - m_uiEventProgressTimer = 7000; - break; - case 5: - DoScriptText(SAY_DRINK, m_creature); - DoCastSpellIfCan(m_creature, SPELL_ARCANE_INTELLECT); - m_uiEventProgressTimer = 7000; - break; - case 6: - DoScriptText(SAY_READY, m_creature); - m_uiEventProgressTimer = 6000; - break; - case 7: - if (m_pInstance) - m_pInstance->SetData(TYPE_WARDEN_2, DONE); - m_bInitFinished = true; - break; - } - ++m_uiPhase; - } - } - else - m_uiEventProgressTimer -= uiDiff; + case TYPE_WARDEN_2: + if (m_pInstance) + m_pInstance->SetData(TYPE_WARDEN_2, DONE); + break; + case SAY_WATER: + DoCastSpellIfCan(m_creature, SPELL_CONJURE_WATER); + break; + case SAY_BUFFS: + DoCastSpellIfCan(m_creature, SPELL_ICE_ARMOR); + break; + case SAY_DRINK: + DoCastSpellIfCan(m_creature, SPELL_ARCANE_INTELLECT); + break; + case POINT_ID_CENTER: + m_creature->SetWalk(false); + m_creature->GetMotionMaster()->MovePoint(1, fRoomCenterCoords[0], fRoomCenterCoords[1], fRoomCenterCoords[2]); + break; } + } + + void UpdateAI(const uint32 uiDiff) + { + DialogueUpdate(uiDiff); if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -204,6 +210,38 @@ struct MANGOS_DLL_DECL npc_millhouse_manastormAI : public ScriptedAI else m_uiFireballTimer -=uiDiff; + if (m_uiFrostBoltTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_FROSTBOLT) == CAST_OK) + m_uiFrostBoltTimer = urand(4000, 6000); + } + else + m_uiFrostBoltTimer -= uiDiff; + + if (m_uiConeColtTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_CONE_OF_COLD) == CAST_OK) + m_uiConeColtTimer = urand(7000, 12000); + } + else + m_uiConeColtTimer -= uiDiff; + + if (m_uiFireBlastTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_FIRE_BLAST) == CAST_OK) + m_uiFireBlastTimer = urand(5000, 16000); + } + else + m_uiFireBlastTimer -= uiDiff; + + if (m_uiArcaneMissileTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_ARCANE_MISSILES) == CAST_OK) + m_uiArcaneMissileTimer = urand(5000, 8000); + } + else + m_uiArcaneMissileTimer -= uiDiff; + DoMeleeAttackIfReady(); } }; @@ -219,44 +257,8 @@ CreatureAI* GetAI_npc_millhouse_manastorm(Creature* pCreature) enum { - YELL_INTRO1 = -1552023, - YELL_INTRO2 = -1552024, - YELL_RELEASE1 = -1552025, - YELL_RELEASE2A = -1552026, - YELL_RELEASE2B = -1552027, - YELL_RELEASE3 = -1552028, - YELL_RELEASE4 = -1552029, - YELL_WELCOME = -1552030, - - // phase 2(acid mobs) - ENTRY_TRICKSTER = 20905, - ENTRY_PH_HUNTER = 20906, - // phase 3 - ENTRY_MILLHOUSE = 20977, - // phase 4(acid mobs) - ENTRY_AKKIRIS = 20908, - ENTRY_SULFURON = 20909, - // phase 5(acid mobs) - ENTRY_TW_DRAK = 20910, - ENTRY_BL_DRAK = 20911, - // phase 6 - ENTRY_SKYRISS = 20912, - - SPELL_TARGET_ALPHA = 36856, - SPELL_TARGET_BETA = 36854, - SPELL_TARGET_DELTA = 36857, - SPELL_TARGET_GAMMA = 36858, - SPELL_TARGET_OMEGA = 36852, SPELL_BUBBLE_VISUAL = 36849, -}; - -static const float aSummonPosition[5][4] = -{ - {478.326f, -148.505f, 42.56f, 3.19f}, // Trickster or Phase Hunter - {413.292f, -148.378f, 42.56f, 6.27f}, // Millhouse - {420.179f, -174.396f, 42.58f, 0.02f}, // Akkiris or Sulfuron - {471.795f, -174.58f, 42.58f, 3.06f}, // Twilight or Blackwing Drakonaar - {445.763f, -191.639f, 44.64f, 1.60f} // Skyriss + SPELL_SIMPLE_TELEPORT = 12980, }; struct MANGOS_DLL_DECL npc_warden_mellicharAI : public ScriptedAI @@ -269,207 +271,68 @@ struct MANGOS_DLL_DECL npc_warden_mellicharAI : public ScriptedAI ScriptedInstance* m_pInstance; - bool m_bIsEventRunning; - bool m_bCanSpawnNextWave; - - uint32 m_uiEventProgressTimer; - uint32 m_uiPhase; + uint32 m_uiIntroTimer; + ObjectGuid m_targetPlayerGuid; void Reset() { - m_bIsEventRunning = false; - m_bCanSpawnNextWave = false; - - m_uiEventProgressTimer = 22000; - m_uiPhase = 1; - - m_creature->SetFlag(UNIT_FIELD_FLAGS,UNIT_FLAG_NON_ATTACKABLE); - DoCastSpellIfCan(m_creature,SPELL_TARGET_OMEGA); - - if (m_pInstance) - m_pInstance->SetData(TYPE_HARBINGERSKYRISS,NOT_STARTED); + m_uiIntroTimer = 5000; + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); } void AttackStart(Unit* pWho) {} - void MoveInLineOfSight(Unit* pWho) - { - if (m_bIsEventRunning) - return; - - if (pWho->GetTypeId() != TYPEID_PLAYER) - return; - - if (!m_creature->getVictim() && pWho->isTargetableForAttack() && (m_creature->IsHostileTo(pWho)) && pWho->isInAccessablePlaceFor(m_creature)) - { - if (!m_creature->CanFly() && m_creature->GetDistanceZ(pWho) > CREATURE_Z_ATTACK_RANGE) - return; - - float attackRadius = m_creature->GetAttackDistance(pWho)/10; - if (m_creature->IsWithinDistInMap(pWho, attackRadius) && m_creature->IsWithinLOSInMap(pWho)) - Aggro(pWho); - } - } - void Aggro(Unit* pWho) { - DoScriptText(YELL_INTRO1, m_creature); + m_creature->InterruptNonMeleeSpells(false); + m_creature->SetFacingToObject(pWho); + m_targetPlayerGuid = pWho->GetObjectGuid(); + DoCastSpellIfCan(m_creature, SPELL_BUBBLE_VISUAL); + // In theory the Seal Sphere should protect the npc from being attacked, but because LoS isn't enabled for Gameobjects we have to use this workaround + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + if (m_pInstance) - { m_pInstance->SetData(TYPE_HARBINGERSKYRISS, IN_PROGRESS); - - if (GameObject* pSphere = m_pInstance->GetSingleGameObjectFromStorage(GO_SEAL_SPHERE)) - pSphere->SetGoState(GO_STATE_READY); - - m_bIsEventRunning = true; - } } - bool CanProgress() + void JustSummoned(Creature* pSummoned) { - if (m_pInstance) + pSummoned->CastSpell(pSummoned, SPELL_SIMPLE_TELEPORT, false); + + if (pSummoned->GetEntry() != NPC_MILLHOUSE && pSummoned->GetEntry() != NPC_SKYRISS) { - if (m_uiPhase == 7 && m_pInstance->GetData(TYPE_WARDEN_4) == DONE) - return true; - if (m_uiPhase == 6 && m_pInstance->GetData(TYPE_WARDEN_3) == DONE) - return true; - if (m_uiPhase == 5 && m_pInstance->GetData(TYPE_WARDEN_2) == DONE) - return true; - if (m_uiPhase == 4) - return true; - if (m_uiPhase == 3 && m_pInstance->GetData(TYPE_WARDEN_1) == DONE) - return true; - if (m_uiPhase == 2 && m_pInstance->GetData(TYPE_HARBINGERSKYRISS) == IN_PROGRESS) - return true; - if (m_uiPhase == 1 && m_pInstance->GetData(TYPE_HARBINGERSKYRISS) == IN_PROGRESS) - return true; - - return false; + if (Unit* pTarget = m_creature->GetMap()->GetUnit(m_targetPlayerGuid)) + pSummoned->AI()->AttackStart(pTarget); } - return false; } - void DoPrepareForPhase() + void JustDied(Unit* pKiller) { if (m_pInstance) { - m_creature->InterruptNonMeleeSpells(true); - m_creature->RemoveSpellsCausingAura(SPELL_AURA_DUMMY); - - switch(m_uiPhase) + if (Creature* pSkyriss = m_pInstance->GetSingleCreatureFromStorage(NPC_SKYRISS)) { - case 2: - DoCastSpellIfCan(m_creature, SPELL_TARGET_ALPHA); - m_pInstance->SetData(TYPE_WARDEN_1, IN_PROGRESS); - break; - case 3: - DoCastSpellIfCan(m_creature, SPELL_TARGET_BETA); - m_pInstance->SetData(TYPE_WARDEN_2, IN_PROGRESS); - break; - case 5: - DoCastSpellIfCan(m_creature, SPELL_TARGET_DELTA); - m_pInstance->SetData(TYPE_WARDEN_3, IN_PROGRESS); - break; - case 6: - DoCastSpellIfCan(m_creature, SPELL_TARGET_GAMMA); - m_pInstance->SetData(TYPE_WARDEN_4, IN_PROGRESS); - break; - case 7: - m_pInstance->SetData(TYPE_WARDEN_5, IN_PROGRESS); - break; + if (Unit* pTarget = m_creature->GetMap()->GetUnit(m_targetPlayerGuid)) + pSkyriss->AI()->AttackStart(pTarget); } - m_bCanSpawnNextWave = true; } } void UpdateAI(const uint32 uiDiff) { - if (!m_bIsEventRunning) - return; - - if (m_uiEventProgressTimer < uiDiff) + // Set the visual intro on OOC timer + if (m_uiIntroTimer) { - if (m_pInstance) - { - if (m_pInstance->GetData(TYPE_HARBINGERSKYRISS) == FAIL) - Reset(); - } - - if (m_bCanSpawnNextWave) - { - //continue beam omega pod, unless we are about to summon skyriss - if (m_uiPhase != 7) - DoCastSpellIfCan(m_creature, SPELL_TARGET_OMEGA); - - switch (m_uiPhase) - { - case 2: - m_creature->SummonCreature(urand(0, 1) ? ENTRY_TRICKSTER : ENTRY_PH_HUNTER, aSummonPosition[0][0], aSummonPosition[0][1], aSummonPosition[0][2], aSummonPosition[0][3], TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 600000); - break; - case 3: - m_creature->SummonCreature(ENTRY_MILLHOUSE, aSummonPosition[1][0], aSummonPosition[1][1], aSummonPosition[1][2], aSummonPosition[1][3], TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 600000); - break; - case 4: - DoScriptText(YELL_RELEASE2B, m_creature); - break; - case 5: - m_creature->SummonCreature(urand(0, 1) ? ENTRY_AKKIRIS : ENTRY_SULFURON, aSummonPosition[2][0], aSummonPosition[2][1], aSummonPosition[2][2], aSummonPosition[2][3], TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 600000); - break; - case 6: - m_creature->SummonCreature(urand(0, 1) ? ENTRY_TW_DRAK : ENTRY_BL_DRAK, aSummonPosition[3][0], aSummonPosition[3][1], aSummonPosition[3][2], aSummonPosition[3][3], TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 600000); - break; - case 7: - m_creature->SummonCreature(ENTRY_SKYRISS, aSummonPosition[4][0], aSummonPosition[4][1], aSummonPosition[4][2], aSummonPosition[4][3], TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 600000); - DoScriptText(YELL_WELCOME, m_creature); - break; - } - m_bCanSpawnNextWave = false; - ++m_uiPhase; - } - if (CanProgress()) + if (m_uiIntroTimer <= uiDiff) { - switch(m_uiPhase) - { - case 1: - DoScriptText(YELL_INTRO2, m_creature); - m_uiEventProgressTimer = 10000; - ++m_uiPhase; - break; - case 2: - DoScriptText(YELL_RELEASE1, m_creature); - DoPrepareForPhase(); - m_uiEventProgressTimer = 7000; - break; - case 3: - DoScriptText(YELL_RELEASE2A, m_creature); - DoPrepareForPhase(); - m_uiEventProgressTimer = 10000; - break; - case 4: - DoPrepareForPhase(); - m_uiEventProgressTimer = 15000; - break; - case 5: - DoScriptText(YELL_RELEASE3, m_creature); - DoPrepareForPhase(); - m_uiEventProgressTimer = 15000; - break; - case 6: - DoScriptText(YELL_RELEASE4, m_creature); - DoPrepareForPhase(); - m_uiEventProgressTimer = 15000; - break; - case 7: - DoPrepareForPhase(); - m_uiEventProgressTimer = 15000; - break; - } + DoCastSpellIfCan(m_creature, SPELL_TARGET_OMEGA); + m_uiIntroTimer = 0; } + else + m_uiIntroTimer -= uiDiff; } - else - m_uiEventProgressTimer -= uiDiff; } }; diff --git a/scripts/outland/tempest_keep/arcatraz/arcatraz.h b/scripts/outland/tempest_keep/arcatraz/arcatraz.h index c781d1f88..22f8b08f8 100644 --- a/scripts/outland/tempest_keep/arcatraz/arcatraz.h +++ b/scripts/outland/tempest_keep/arcatraz/arcatraz.h @@ -20,6 +20,21 @@ enum TYPE_WARDEN_5 = 9, NPC_MELLICHAR = 20904, // Skyriss will kill this unit + NPC_PRISON_APHPA_POD = 21436, + NPC_PRISON_BETA_POD = 21437, + NPC_PRISON_DELTA_POD = 21438, + NPC_PRISON_GAMMA_POD = 21439, + NPC_PRISON_BOSS_POD = 21440, + + // Harbinger Skyriss event related (trash mobs are scripted in ACID) + NPC_BLAZING_TRICKSTER = 20905, // phase 1 + NPC_PHASE_HUNTER = 20906, + NPC_MILLHOUSE = 20977, // phase 2 + NPC_AKKIRIS = 20908, // phase 3 + NPC_SULFURON = 20909, + NPC_TW_DRAKONAAR = 20910, // phase 4 + NPC_BL_DRAKONAAR = 20911, + NPC_SKYRISS = 20912, // phase 5 GO_CORE_SECURITY_FIELD_ALPHA = 184318, // Door opened when Wrath-Scryer Soccothrates dies GO_CORE_SECURITY_FIELD_BETA = 184319, // Door opened when Dalliah the Doomsayer dies @@ -29,9 +44,25 @@ enum GO_POD_DELTA = 183964, // Pod third boss wave GO_POD_GAMMA = 183962, // Pod fourth boss wave GO_POD_OMEGA = 183965, // Pod fifth boss wave + + SPELL_TARGET_OMEGA = 36852, // Visual spell used by Mellichar }; -class MANGOS_DLL_DECL instance_arcatraz : public ScriptedInstance +struct SpawnLocation +{ + float m_fX, m_fY, m_fZ, m_fO; +}; + +static const SpawnLocation aSummonPosition[5] = +{ + {478.326f, -148.505f, 42.56f, 3.19f}, // Trickster or Phase Hunter + {413.292f, -148.378f, 42.56f, 6.27f}, // Millhouse + {420.179f, -174.396f, 42.58f, 0.02f}, // Akkiris or Sulfuron + {471.795f, -174.58f, 42.58f, 3.06f}, // Twilight or Blackwing Drakonaar + {445.763f, -191.639f, 44.64f, 1.60f} // Skyriss +}; + +class MANGOS_DLL_DECL instance_arcatraz : public ScriptedInstance, private DialogueHelper { public: instance_arcatraz(Map* pMap); @@ -44,8 +75,20 @@ class MANGOS_DLL_DECL instance_arcatraz : public ScriptedInstance void SetData(uint32 uiType, uint32 uiData); uint32 GetData(uint32 uiType); + const char* Save() { return m_strInstData.c_str(); } + void Load(const char* chrIn); + + void Update(uint32 uiDiff); + private: + void JustDidDialogueStep(int32 iEntry); + uint32 m_auiEncounter[MAX_ENCOUNTER]; + std::string m_strInstData; + + uint32 m_uiResetDelayTimer; + + GUIDList m_lSkyrissEventMobsGuidList; }; #endif diff --git a/scripts/outland/tempest_keep/arcatraz/boss_harbinger_skyriss.cpp b/scripts/outland/tempest_keep/arcatraz/boss_harbinger_skyriss.cpp index 1d3f71468..fb3f1843e 100644 --- a/scripts/outland/tempest_keep/arcatraz/boss_harbinger_skyriss.cpp +++ b/scripts/outland/tempest_keep/arcatraz/boss_harbinger_skyriss.cpp @@ -16,23 +16,16 @@ /* ScriptData SDName: Boss_Harbinger_Skyriss -SD%Complete: 45 -SDComment: CombatAI not fully implemented. Timers will need adjustments. On wipe despawn all, and let warden_mellichar respawn after ~1min +SD%Complete: 95 +SDComment: Timers will need adjustments. SDCategory: Tempest Keep, The Arcatraz EndScriptData */ -/* ContentData -boss_harbinger_skyriss -boss_harbinger_skyriss_illusion -- TODO implement or move to ACID -EndContentData */ - #include "precompiled.h" #include "arcatraz.h" enum { - SAY_INTRO = -1552000, - SAY_AGGRO = -1552001, SAY_KILL_1 = -1552002, SAY_KILL_2 = -1552003, SAY_MIND_1 = -1552004, @@ -58,19 +51,13 @@ struct MANGOS_DLL_DECL boss_harbinger_skyrissAI : public ScriptedAI { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); - m_bIntroFinished = false; Reset(); } ScriptedInstance* m_pInstance; bool m_bIsRegularMode; - bool m_bIntroFinished; - bool m_bDidSplitImage33; - bool m_bDidSplitImage66; - - uint32 m_uiIntroPhase; - uint32 m_uiIntroTimer; + uint8 m_uiSplitPhase; uint32 m_uiMindRendTimer; uint32 m_uiFearTimer; uint32 m_uiDominationTimer; @@ -78,31 +65,11 @@ struct MANGOS_DLL_DECL boss_harbinger_skyrissAI : public ScriptedAI void Reset() { - m_bDidSplitImage33 = false; - m_bDidSplitImage66 = false; - - m_uiIntroPhase = 1; - m_uiIntroTimer = 5000; - m_uiMindRendTimer = 3000; - m_uiFearTimer = 15000; + m_uiSplitPhase = 1; + m_uiMindRendTimer = 3000; + m_uiFearTimer = 15000; m_uiDominationTimer = 30000; - m_uiManaBurnTimer = 25000; - } - - void MoveInLineOfSight(Unit* pWho) - { - if (!m_bIntroFinished) - return; - - ScriptedAI::MoveInLineOfSight(pWho); - } - - void AttackStart(Unit* pWho) - { - if (!m_bIntroFinished) - return; - - ScriptedAI::AttackStart(pWho); + m_uiManaBurnTimer = 25000; } void JustDied(Unit* pKiller) @@ -113,6 +80,12 @@ struct MANGOS_DLL_DECL boss_harbinger_skyrissAI : public ScriptedAI m_pInstance->SetData(TYPE_HARBINGERSKYRISS, DONE); } + void JustReachedHome() + { + if (m_pInstance) + m_pInstance->SetData(TYPE_HARBINGERSKYRISS, FAIL); + } + void KilledUnit(Unit* pVictim) { //won't yell killing pet/other unit @@ -124,68 +97,21 @@ struct MANGOS_DLL_DECL boss_harbinger_skyrissAI : public ScriptedAI void JustSummoned(Creature* pSummoned) { - pSummoned->AI()->AttackStart(m_creature->getVictim()); - } - - void DoSplit() - { - DoScriptText(SAY_IMAGE, m_creature); - - DoCastSpellIfCan(m_creature, m_bDidSplitImage33 ? SPELL_33_ILLUSION : SPELL_66_ILLUSION, CAST_INTERRUPT_PREVIOUS); + if (m_creature->getVictim()) + pSummoned->AI()->AttackStart(m_creature->getVictim()); } void UpdateAI(const uint32 uiDiff) { - if (!m_bIntroFinished && !m_creature->isInCombat()) - { - if (!m_pInstance) - return; - - if (m_uiIntroTimer < uiDiff) - { - switch(m_uiIntroPhase) - { - case 1: - DoScriptText(SAY_INTRO, m_creature); - if (GameObject* pSphere = m_pInstance->GetSingleGameObjectFromStorage(GO_SEAL_SPHERE)) - pSphere->SetGoState(GO_STATE_ACTIVE); - ++m_uiIntroPhase; - m_uiIntroTimer = 25000; - break; - case 2: - DoScriptText(SAY_AGGRO, m_creature); - if (Creature* pMellic = m_pInstance->GetSingleCreatureFromStorage(NPC_MELLICHAR)) - { - // should have a better way to do this. possibly spell exist. - pMellic->SetDeathState(JUST_DIED); - pMellic->SetHealth(0); - } - ++m_uiIntroPhase; - m_uiIntroTimer = 3000; - break; - case 3: - m_bIntroFinished = true; - // TODO - Let Attack here, or change Unit_flag - break; - } - } - else - m_uiIntroTimer -=uiDiff; - } - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - if (!m_bDidSplitImage66 && m_creature->GetHealthPercent() <= 66.0f) + // Check if creature is below 66% or 33%; Also don't allow it to split the third time + if (m_creature->GetHealthPercent() < 100-33*m_uiSplitPhase && m_creature->GetHealthPercent() > 5.0f) { - m_bDidSplitImage66 = true; - DoSplit(); - } - - if (!m_bDidSplitImage33 && m_creature->GetHealthPercent() <= 33.0f) - { - m_bDidSplitImage33 = true; - DoSplit(); + DoCastSpellIfCan(m_creature, m_uiSplitPhase == 1 ? SPELL_66_ILLUSION : SPELL_33_ILLUSION, CAST_INTERRUPT_PREVIOUS); + DoScriptText(SAY_IMAGE, m_creature); + ++m_uiSplitPhase; } if (m_uiMindRendTimer < uiDiff) @@ -217,14 +143,13 @@ struct MANGOS_DLL_DECL boss_harbinger_skyrissAI : public ScriptedAI if (m_uiDominationTimer < uiDiff) { - Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1); - if (!pTarget) - pTarget = m_creature->getVictim(); - - if (DoCastSpellIfCan(pTarget, m_bIsRegularMode ? SPELL_DOMINATION : SPELL_DOMINATION_H) == CAST_OK) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1, uint32(0), SELECT_FLAG_PLAYER)) { - DoScriptText(urand(0, 1) ? SAY_MIND_1 : SAY_MIND_2, m_creature); - m_uiDominationTimer = urand(16000, 32000); + if (DoCastSpellIfCan(pTarget, m_bIsRegularMode ? SPELL_DOMINATION : SPELL_DOMINATION_H) == CAST_OK) + { + DoScriptText(urand(0, 1) ? SAY_MIND_1 : SAY_MIND_2, m_creature); + m_uiDominationTimer = urand(16000, 32000); + } } } else @@ -254,32 +179,6 @@ CreatureAI* GetAI_boss_harbinger_skyriss(Creature* pCreature) return new boss_harbinger_skyrissAI(pCreature); } -enum -{ - SPELL_MIND_REND_IMAGE = 36929, - SPELL_MIND_REND_IMAGE_H = 39021, -}; - -struct MANGOS_DLL_DECL boss_harbinger_skyriss_illusionAI : public ScriptedAI -{ - boss_harbinger_skyriss_illusionAI(Creature* pCreature) : ScriptedAI(pCreature) - { - m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); - Reset(); - } - - ScriptedInstance* m_pInstance; - bool m_bIsRegularMode; - - void Reset() { } -}; - -CreatureAI* GetAI_boss_harbinger_skyriss_illusion(Creature* pCreature) -{ - return new boss_harbinger_skyriss_illusionAI(pCreature); -} - void AddSC_boss_harbinger_skyriss() { Script* pNewScript; @@ -288,9 +187,4 @@ void AddSC_boss_harbinger_skyriss() pNewScript->Name = "boss_harbinger_skyriss"; pNewScript->GetAI = &GetAI_boss_harbinger_skyriss; pNewScript->RegisterSelf(); - - pNewScript = new Script; - pNewScript->Name = "boss_harbinger_skyriss_illusion"; - pNewScript->GetAI = &GetAI_boss_harbinger_skyriss_illusion; - pNewScript->RegisterSelf(); } diff --git a/scripts/outland/tempest_keep/arcatraz/instance_arcatraz.cpp b/scripts/outland/tempest_keep/arcatraz/instance_arcatraz.cpp index ac48e1a71..6f5ccbc34 100644 --- a/scripts/outland/tempest_keep/arcatraz/instance_arcatraz.cpp +++ b/scripts/outland/tempest_keep/arcatraz/instance_arcatraz.cpp @@ -31,11 +31,60 @@ EndScriptData */ 4 - Harbinger Skyriss event, 5 sub-events */ -instance_arcatraz::instance_arcatraz(Map* pMap) : ScriptedInstance(pMap) { Initialize(); } +enum +{ + YELL_MELLICHAR_INTRO1 = -1552023, + YELL_MELLICHAR_INTRO2 = -1552024, + YELL_MELLICHAR_RELEASE1 = -1552025, + YELL_MELLICHAR_RELEASE2 = -1552026, + YELL_MELLICHAR_RELEASE3 = -1552027, + YELL_MELLICHAR_RELEASE4 = -1552028, + YELL_MELLICHAR_RELEASE5 = -1552029, + YELL_MELLICAR_WELCOME = -1552030, + SAY_SKYRISS_INTRO = -1552000, + SAY_SKYRISS_AGGRO = -1552001, + SAY_MILLHOUSE_COMPLETE = -1552022, + + // Spells used by Mellichar during the dialogue + SPELL_TARGET_BETA = 36854, + SPELL_TARGET_ALPHA = 36856, + SPELL_TARGET_DELTA = 36857, + SPELL_TARGET_GAMMA = 36858, +}; + +static const DialogueEntry aArcatrazDialogue[] = +{ + {YELL_MELLICHAR_INTRO1, NPC_MELLICHAR, 22000}, + {YELL_MELLICHAR_INTRO2, NPC_MELLICHAR, 7000}, + {SPELL_TARGET_ALPHA, 0, 7000}, + {TYPE_WARDEN_1, 0, 0}, + {YELL_MELLICHAR_RELEASE2, NPC_MELLICHAR, 7000}, + {SPELL_TARGET_BETA, 0, 7000}, + {TYPE_WARDEN_2, 0, 0}, + {YELL_MELLICHAR_RELEASE3, NPC_MELLICHAR, 7000}, + {SPELL_TARGET_DELTA, 0, 7000}, + {TYPE_WARDEN_3, 0, 0}, + {YELL_MELLICHAR_RELEASE4, NPC_MELLICHAR, 7000}, + {SPELL_TARGET_GAMMA, 0, 7000}, + {TYPE_WARDEN_4, 0, 0}, + {YELL_MELLICHAR_RELEASE5, NPC_MELLICHAR, 8000}, + {TYPE_WARDEN_5, 0, 5000}, + {SAY_SKYRISS_INTRO, NPC_SKYRISS, 25000}, + {YELL_MELLICAR_WELCOME, NPC_MELLICHAR, 5000}, + {SAY_SKYRISS_AGGRO, NPC_SKYRISS, 0}, + {0, 0, 0}, +}; + +instance_arcatraz::instance_arcatraz(Map* pMap) : ScriptedInstance(pMap), DialogueHelper(aArcatrazDialogue), + m_uiResetDelayTimer(0) +{ + Initialize(); +} void instance_arcatraz::Initialize() { memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); + InitializeDialogueHelper(this); } void instance_arcatraz::OnObjectCreate(GameObject* pGo) @@ -43,22 +92,51 @@ void instance_arcatraz::OnObjectCreate(GameObject* pGo) switch(pGo->GetEntry()) { case GO_CORE_SECURITY_FIELD_ALPHA: + if (m_auiEncounter[2] == DONE) + pGo->SetGoState(GO_STATE_ACTIVE); + break; case GO_CORE_SECURITY_FIELD_BETA: + if (m_auiEncounter[1] == DONE) + pGo->SetGoState(GO_STATE_ACTIVE); + break; case GO_SEAL_SPHERE: case GO_POD_ALPHA: case GO_POD_BETA: case GO_POD_DELTA: case GO_POD_GAMMA: case GO_POD_OMEGA: - m_mGoEntryGuidStore[pGo->GetEntry()] = pGo->GetObjectGuid(); break; + default: + return; } + m_mGoEntryGuidStore[pGo->GetEntry()] = pGo->GetObjectGuid(); } void instance_arcatraz::OnCreatureCreate(Creature* pCreature) { - if (pCreature->GetEntry() == NPC_MELLICHAR) - m_mNpcEntryGuidStore[NPC_MELLICHAR] = pCreature->GetObjectGuid(); + switch (pCreature->GetEntry()) + { + case NPC_SKYRISS: + case NPC_MILLHOUSE: + m_lSkyrissEventMobsGuidList.push_back(pCreature->GetObjectGuid()); + // no break here because we want them in both lists + case NPC_PRISON_APHPA_POD: + case NPC_PRISON_BETA_POD: + case NPC_PRISON_DELTA_POD: + case NPC_PRISON_GAMMA_POD: + case NPC_PRISON_BOSS_POD: + case NPC_MELLICHAR: + m_mNpcEntryGuidStore[pCreature->GetEntry()] = pCreature->GetObjectGuid(); + break; + case NPC_BLAZING_TRICKSTER: + case NPC_PHASE_HUNTER: + case NPC_AKKIRIS: + case NPC_SULFURON: + case NPC_TW_DRAKONAAR: + case NPC_BL_DRAKONAAR: + m_lSkyrissEventMobsGuidList.push_back(pCreature->GetObjectGuid()); + break; + } } void instance_arcatraz::SetData(uint32 uiType, uint32 uiData) @@ -82,13 +160,43 @@ void instance_arcatraz::SetData(uint32 uiType, uint32 uiData) break; case TYPE_HARBINGERSKYRISS: - if (uiData == NOT_STARTED || uiData == FAIL) + if (uiData == FAIL) { m_auiEncounter[4] = NOT_STARTED; m_auiEncounter[5] = NOT_STARTED; m_auiEncounter[6] = NOT_STARTED; m_auiEncounter[7] = NOT_STARTED; m_auiEncounter[8] = NOT_STARTED; + + // Reset event in 1 min + if (Creature* pMellichar = GetSingleCreatureFromStorage(NPC_MELLICHAR)) + pMellichar->ForcedDespawn(); + m_uiResetDelayTimer = 60000; + + // Despawn all the summons manually + for (GUIDList::const_iterator itr = m_lSkyrissEventMobsGuidList.begin(); itr != m_lSkyrissEventMobsGuidList.end(); ++itr) + { + if (Creature* pTemp = instance->GetCreature(*itr)) + pTemp->ForcedDespawn(); + } + + // Reset these objects, because they doesn't reset automatically + if (GameObject* pGo = GetSingleGameObjectFromStorage(GO_POD_BETA)) + pGo->ResetDoorOrButton(); + if (GameObject* pGo = GetSingleGameObjectFromStorage(GO_POD_OMEGA)) + pGo->ResetDoorOrButton(); + if (GameObject* pGo = GetSingleGameObjectFromStorage(GO_SEAL_SPHERE)) + pGo->ResetDoorOrButton(); + } + if (uiData == IN_PROGRESS) + { + StartNextDialogueText(YELL_MELLICHAR_INTRO1); + DoUseDoorOrButton(GO_SEAL_SPHERE); + } + if (uiData == DONE) + { + if (Creature* pMillhouse = GetSingleCreatureFromStorage(NPC_MILLHOUSE)) + DoScriptText(SAY_MILLHOUSE_COMPLETE, pMillhouse); } m_auiEncounter[3] = uiData; break; @@ -96,24 +204,32 @@ void instance_arcatraz::SetData(uint32 uiType, uint32 uiData) case TYPE_WARDEN_1: if (uiData == IN_PROGRESS) DoUseDoorOrButton(GO_POD_ALPHA); + if (uiData == DONE) + StartNextDialogueText(YELL_MELLICHAR_RELEASE2); m_auiEncounter[4] = uiData; break; case TYPE_WARDEN_2: if (uiData == IN_PROGRESS) DoUseDoorOrButton(GO_POD_BETA); + if (uiData == DONE) + StartNextDialogueText(YELL_MELLICHAR_RELEASE3); m_auiEncounter[5] = uiData; break; case TYPE_WARDEN_3: if (uiData == IN_PROGRESS) DoUseDoorOrButton(GO_POD_DELTA); + if (uiData == DONE) + StartNextDialogueText(YELL_MELLICHAR_RELEASE4); m_auiEncounter[6] = uiData; break; case TYPE_WARDEN_4: if (uiData == IN_PROGRESS) DoUseDoorOrButton(GO_POD_GAMMA); + if (uiData == DONE) + StartNextDialogueText(YELL_MELLICHAR_RELEASE5); m_auiEncounter[7] = uiData; break; @@ -123,6 +239,21 @@ void instance_arcatraz::SetData(uint32 uiType, uint32 uiData) m_auiEncounter[8] = uiData; break; } + + if (uiData == DONE) + { + OUT_SAVE_INST_DATA; + + std::ostringstream saveStream; + + saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2] << " " + << m_auiEncounter[3]; + + m_strInstData = saveStream.str(); + + SaveToDB(); + OUT_SAVE_INST_DATA_COMPLETE; + } } uint32 instance_arcatraz::GetData(uint32 uiType) @@ -141,6 +272,121 @@ uint32 instance_arcatraz::GetData(uint32 uiType) } } +void instance_arcatraz::Load(const char* chrIn) +{ + if (!chrIn) + { + OUT_LOAD_INST_DATA_FAIL; + return; + } + + OUT_LOAD_INST_DATA(chrIn); + + std::istringstream loadStream(chrIn); + loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3]; + + for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) + { + if (m_auiEncounter[i] == IN_PROGRESS) + m_auiEncounter[i] = NOT_STARTED; + } + + OUT_LOAD_INST_DATA_COMPLETE; +} + +void instance_arcatraz::JustDidDialogueStep(int32 iEntry) +{ + Creature* pMellichar = GetSingleCreatureFromStorage(NPC_MELLICHAR); + if (!pMellichar) + return; + + switch (iEntry) + { + case SPELL_TARGET_ALPHA: + pMellichar->CastSpell(pMellichar, SPELL_TARGET_ALPHA, false); + if (Creature* pTarget = GetSingleCreatureFromStorage(NPC_PRISON_APHPA_POD)) + pMellichar->SetFacingToObject(pTarget); + SetData(TYPE_WARDEN_1, IN_PROGRESS); + break; + case TYPE_WARDEN_1: + pMellichar->SummonCreature(urand(0, 1) ? NPC_BLAZING_TRICKSTER : NPC_PHASE_HUNTER, aSummonPosition[0].m_fX, aSummonPosition[0].m_fY, aSummonPosition[0].m_fZ, aSummonPosition[0].m_fO, TEMPSUMMON_DEAD_DESPAWN, 0); + break; + case YELL_MELLICHAR_RELEASE2: + if (Creature* pTarget = GetSingleCreatureFromStorage(NPC_PRISON_BETA_POD)) + pMellichar->SetFacingToObject(pTarget); + break; + case SPELL_TARGET_BETA: + pMellichar->CastSpell(pMellichar, SPELL_TARGET_BETA, false); + SetData(TYPE_WARDEN_2, IN_PROGRESS); + break; + case TYPE_WARDEN_2: + pMellichar->SummonCreature(NPC_MILLHOUSE, aSummonPosition[1].m_fX, aSummonPosition[1].m_fY, aSummonPosition[1].m_fZ, aSummonPosition[1].m_fO, TEMPSUMMON_DEAD_DESPAWN, 0); + break; + case SPELL_TARGET_DELTA: + pMellichar->CastSpell(pMellichar, SPELL_TARGET_DELTA, false); + if (Creature* pTarget = GetSingleCreatureFromStorage(NPC_PRISON_DELTA_POD)) + pMellichar->SetFacingToObject(pTarget); + SetData(TYPE_WARDEN_3, IN_PROGRESS); + break; + case TYPE_WARDEN_3: + pMellichar->SummonCreature(urand(0, 1) ? NPC_AKKIRIS : NPC_SULFURON, aSummonPosition[2].m_fX, aSummonPosition[2].m_fY, aSummonPosition[2].m_fZ, aSummonPosition[2].m_fO, TEMPSUMMON_DEAD_DESPAWN, 0); + pMellichar->CastSpell(pMellichar, SPELL_TARGET_OMEGA, false); + if (Creature* pTarget = GetSingleCreatureFromStorage(NPC_PRISON_BOSS_POD)) + pMellichar->SetFacingToObject(pTarget); + break; + case YELL_MELLICHAR_RELEASE4: + pMellichar->InterruptNonMeleeSpells(false); + if (Creature* pTarget = GetSingleCreatureFromStorage(NPC_PRISON_GAMMA_POD)) + pMellichar->SetFacingToObject(pTarget); + break; + case SPELL_TARGET_GAMMA: + pMellichar->CastSpell(pMellichar, SPELL_TARGET_GAMMA, false); + if (Creature* pTarget = GetSingleCreatureFromStorage(NPC_PRISON_GAMMA_POD)) + pMellichar->SetFacingToObject(pTarget); + SetData(TYPE_WARDEN_4, IN_PROGRESS); + break; + case TYPE_WARDEN_4: + pMellichar->SummonCreature(urand(0, 1) ? NPC_TW_DRAKONAAR : NPC_BL_DRAKONAAR, aSummonPosition[3].m_fX, aSummonPosition[3].m_fY, aSummonPosition[3].m_fZ, aSummonPosition[3].m_fO, TEMPSUMMON_DEAD_DESPAWN, 0); + pMellichar->CastSpell(pMellichar, SPELL_TARGET_OMEGA, false); + if (Creature* pTarget = GetSingleCreatureFromStorage(NPC_PRISON_BOSS_POD)) + pMellichar->SetFacingToObject(pTarget); + break; + case YELL_MELLICHAR_RELEASE5: + pMellichar->InterruptNonMeleeSpells(false); + SetData(TYPE_WARDEN_5, IN_PROGRESS); + break; + case TYPE_WARDEN_5: + pMellichar->SummonCreature(NPC_SKYRISS, aSummonPosition[4].m_fX, aSummonPosition[4].m_fY, aSummonPosition[4].m_fZ, aSummonPosition[4].m_fO, TEMPSUMMON_DEAD_DESPAWN, 0); + break; + case SAY_SKYRISS_AGGRO: + // Kill Mellichar and start combat + if (Creature* pSkyriss = GetSingleCreatureFromStorage(NPC_SKYRISS)) + { + pSkyriss->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PASSIVE); + pMellichar->DealDamage(pMellichar, pMellichar->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + } + DoUseDoorOrButton(GO_SEAL_SPHERE); + break; + } +} + +void instance_arcatraz::Update(uint32 uiDiff) +{ + DialogueUpdate(uiDiff); + + if (m_uiResetDelayTimer) + { + if (m_uiResetDelayTimer <= uiDiff) + { + if (Creature* pMellichar = GetSingleCreatureFromStorage(NPC_MELLICHAR)) + pMellichar->Respawn(); + m_uiResetDelayTimer = 0; + } + else + m_uiResetDelayTimer -= uiDiff; + } +} + InstanceData* GetInstanceData_instance_arcatraz(Map* pMap) { return new instance_arcatraz(pMap); diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index c6e84e2c0..747a25923 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2561" + #define SD2_REVISION_NR "2562" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 8b26b6c61..80c23d906 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -1140,7 +1140,6 @@ UPDATE creature_template SET ScriptName='mob_warp_splinter_treant' WHERE entry=1 UPDATE instance_template SET ScriptName='instance_arcatraz' WHERE map=552; UPDATE creature_template SET ScriptName='mob_zerekethvoidzone' WHERE entry=21101; UPDATE creature_template SET ScriptName='boss_harbinger_skyriss' WHERE entry=20912; -UPDATE creature_template SET ScriptName='boss_harbinger_skyriss_illusion' WHERE entry IN (21466,21467); UPDATE creature_template SET ScriptName='npc_warden_mellichar' WHERE entry=20904; UPDATE creature_template SET ScriptName='npc_millhouse_manastorm' WHERE entry=20977; diff --git a/sql/updates/r2562_mangos.sql b/sql/updates/r2562_mangos.sql new file mode 100644 index 000000000..a520c4342 --- /dev/null +++ b/sql/updates/r2562_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='' WHERE entry IN (21466,21467); From 132c1025aa35634ef31f9daa0e2f0b32f9f1a664 Mon Sep 17 00:00:00 2001 From: NeatElves Date: Sun, 20 May 2012 13:11:35 +0300 Subject: [PATCH 0551/1172] [2563] Remove some vendor gossips - will be handled by database Signed-off-by: Xfurry --- scripts/outland/shadowmoon_valley.cpp | 31 +------------- scripts/outland/shattrath_city.cpp | 61 +-------------------------- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 2 - sql/updates/r2563_mangos.sql | 2 + 5 files changed, 5 insertions(+), 93 deletions(-) create mode 100644 sql/updates/r2563_mangos.sql diff --git a/scripts/outland/shadowmoon_valley.cpp b/scripts/outland/shadowmoon_valley.cpp index c5f94fb66..ab94119e3 100644 --- a/scripts/outland/shadowmoon_valley.cpp +++ b/scripts/outland/shadowmoon_valley.cpp @@ -17,7 +17,7 @@ /* ScriptData SDName: Shadowmoon_Valley SD%Complete: 100 -SDComment: Quest support: 10781, 10804, 10854, 10458, 10480, 10481, 10588, 11020. Vendor Drake Dealer Hurlunk. +SDComment: Quest support: 10781, 10804, 10854, 10458, 10480, 10481, 10588, 11020. SDCategory: Shadowmoon Valley EndScriptData */ @@ -25,7 +25,6 @@ EndScriptData */ mob_mature_netherwing_drake mob_enslaved_netherwing_drake npc_dragonmaw_peon -npc_drake_dealer_hurlunk npc_wilda mob_torloth npc_lord_illidan_stormrage @@ -447,28 +446,6 @@ bool EffectDummyCreature_npc_dragonmaw_peon(Unit* pCaster, uint32 uiSpellId, Spe } /*###### -## npc_drake_dealer_hurlunk -######*/ - -bool GossipHello_npc_drake_dealer_hurlunk(Player* pPlayer, Creature* pCreature) -{ - if (pCreature->isVendor() && pPlayer->GetReputationRank(1015) == REP_EXALTED) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_VENDOR, GOSSIP_TEXT_BROWSE_GOODS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE); - - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); - - return true; -} - -bool GossipSelect_npc_drake_dealer_hurlunk(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) -{ - if (uiAction == GOSSIP_ACTION_TRADE) - pPlayer->SEND_VENDORLIST(pCreature->GetObjectGuid()); - - return true; -} - -/*#### # npc_wilda ######*/ @@ -1678,12 +1655,6 @@ void AddSC_shadowmoon_valley() pNewScript->pEffectDummyNPC = &EffectDummyCreature_npc_dragonmaw_peon; pNewScript->RegisterSelf(); - pNewScript = new Script; - pNewScript->Name = "npc_drake_dealer_hurlunk"; - pNewScript->pGossipHello = &GossipHello_npc_drake_dealer_hurlunk; - pNewScript->pGossipSelect = &GossipSelect_npc_drake_dealer_hurlunk; - pNewScript->RegisterSelf(); - pNewScript = new Script; pNewScript->Name = "npc_wilda"; pNewScript->GetAI = &GetAI_npc_wilda; diff --git a/scripts/outland/shattrath_city.cpp b/scripts/outland/shattrath_city.cpp index 73bc27eda..e1dbc7c6a 100644 --- a/scripts/outland/shattrath_city.cpp +++ b/scripts/outland/shattrath_city.cpp @@ -17,7 +17,7 @@ /* ScriptData SDName: Shattrath_City SD%Complete: 100 -SDComment: Quest support: 10004, 10231. Flask vendors +SDComment: Quest support: 10004, 10231. SDCategory: Shattrath City EndScriptData */ @@ -26,7 +26,6 @@ npc_dirty_larry npc_ishanah npc_khadgars_servant npc_salsalabim -npc_shattrathflaskvendors EndContentData */ #include "precompiled.h" @@ -614,58 +613,6 @@ bool GossipHello_npc_salsalabim(Player* pPlayer, Creature* pCreature) return true; } -/* -################################################## -Shattrath City Flask Vendors provides flasks to people exalted with 3 factions: -Haldor the Compulsive -Arcanist Xorith -Both sell special flasks for use in Outlands 25man raids only, -purchasable for one Mark of Illidari each -Purchase requires exalted reputation with Scryers/Aldor, Cenarion Expedition and The Sha'tar -################################################## -*/ - -bool GossipHello_npc_shattrathflaskvendors(Player* pPlayer, Creature* pCreature) -{ - if (pCreature->GetEntry() == 23484) - { - // Aldor vendor - if (pCreature->isVendor() && (pPlayer->GetReputationRank(932) == REP_EXALTED) && (pPlayer->GetReputationRank(935) == REP_EXALTED) && (pPlayer->GetReputationRank(942) == REP_EXALTED)) - { - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_VENDOR, GOSSIP_TEXT_BROWSE_GOODS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE); - pPlayer->SEND_GOSSIP_MENU(11085, pCreature->GetObjectGuid()); - } - else - { - pPlayer->SEND_GOSSIP_MENU(11083, pCreature->GetObjectGuid()); - } - } - - if (pCreature->GetEntry() == 23483) - { - // Scryers vendor - if (pCreature->isVendor() && (pPlayer->GetReputationRank(934) == REP_EXALTED) && (pPlayer->GetReputationRank(935) == REP_EXALTED) && (pPlayer->GetReputationRank(942) == REP_EXALTED)) - { - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_VENDOR, GOSSIP_TEXT_BROWSE_GOODS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE); - pPlayer->SEND_GOSSIP_MENU(11085, pCreature->GetObjectGuid()); - } - else - { - pPlayer->SEND_GOSSIP_MENU(11084, pCreature->GetObjectGuid()); - } - } - - return true; -} - -bool GossipSelect_npc_shattrathflaskvendors(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) -{ - if (uiAction == GOSSIP_ACTION_TRADE) - pPlayer->SEND_VENDORLIST(pCreature->GetObjectGuid()); - - return true; -} - void AddSC_shattrath_city() { Script* pNewScript; @@ -687,10 +634,4 @@ void AddSC_shattrath_city() pNewScript->GetAI = &GetAI_npc_salsalabim; pNewScript->pGossipHello = &GossipHello_npc_salsalabim; pNewScript->RegisterSelf(); - - pNewScript = new Script; - pNewScript->Name = "npc_shattrathflaskvendors"; - pNewScript->pGossipHello = &GossipHello_npc_shattrathflaskvendors; - pNewScript->pGossipSelect = &GossipSelect_npc_shattrathflaskvendors; - pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 747a25923..6e0054838 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2562" + #define SD2_REVISION_NR "2563" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 80c23d906..a82061cf2 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -989,7 +989,6 @@ UPDATE creature_template SET ScriptName='npc_valentine_boss_manager' WHERE entry /* SHADOWMOON VALLEY */ UPDATE creature_template SET ScriptName='boss_doomwalker' WHERE entry=17711; -UPDATE creature_template SET ScriptName='npc_drake_dealer_hurlunk' WHERE entry=23489; UPDATE creature_template SET ScriptName='npc_dragonmaw_peon' WHERE entry=22252; UPDATE creature_template SET ScriptName='mob_mature_netherwing_drake' WHERE entry=21648; UPDATE creature_template SET ScriptName='mob_enslaved_netherwing_drake' WHERE entry=21722; @@ -1010,7 +1009,6 @@ UPDATE creature_template SET ScriptName='npc_spawned_oronok_tornheart' WHERE ent UPDATE creature_template SET ScriptName='npc_dirty_larry' WHERE entry=19720; UPDATE creature_template SET ScriptName='npc_khadgars_servant' WHERE entry=19685; UPDATE creature_template SET ScriptName='npc_salsalabim' WHERE entry=18584; -UPDATE creature_template SET ScriptName='npc_shattrathflaskvendors' WHERE entry IN (23483,23484); /* SHOLAZAR BASIN */ UPDATE creature_template SET ScriptName='npc_helice' WHERE entry=28787; diff --git a/sql/updates/r2563_mangos.sql b/sql/updates/r2563_mangos.sql new file mode 100644 index 000000000..102260379 --- /dev/null +++ b/sql/updates/r2563_mangos.sql @@ -0,0 +1,2 @@ +UPDATE creature_template SET ScriptName='' WHERE entry=23489; +UPDATE creature_template SET ScriptName='' WHERE entry IN (23483,23484); From 797e587ca646a5adc3ecb67828afb1813fdef254 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sun, 20 May 2012 14:00:35 +0300 Subject: [PATCH 0552/1172] [2564] Basic cleanup for the Void Reaver - The Eye --- .../tempest_keep/the_eye/boss_void_reaver.cpp | 167 ++++++++++-------- sd2_revision_nr.h | 2 +- 2 files changed, 94 insertions(+), 75 deletions(-) diff --git a/scripts/outland/tempest_keep/the_eye/boss_void_reaver.cpp b/scripts/outland/tempest_keep/the_eye/boss_void_reaver.cpp index 96817da4d..4f67c4564 100644 --- a/scripts/outland/tempest_keep/the_eye/boss_void_reaver.cpp +++ b/scripts/outland/tempest_keep/the_eye/boss_void_reaver.cpp @@ -16,29 +16,31 @@ /* ScriptData SDName: Boss_Void_Reaver -SD%Complete: 90 -SDComment: Should reset if raid are out of room. +SD%Complete: 95 +SDComment: Small adjustments may be required SDCategory: Tempest Keep, The Eye EndScriptData */ #include "precompiled.h" #include "the_eye.h" -#define SAY_AGGRO -1550000 -#define SAY_SLAY1 -1550001 -#define SAY_SLAY2 -1550002 -#define SAY_SLAY3 -1550003 -#define SAY_DEATH -1550004 -#define SAY_POUNDING1 -1550005 -#define SAY_POUNDING2 -1550006 - -#define SPELL_POUNDING 34162 -#define SPELL_ARCANE_ORB_MISSILE 34172 -#define SPELL_KNOCK_AWAY 25778 -#define SPELL_BERSERK 26662 - -//Unknown function. If target not found, this will be created and used as dummy target instead? -//#define CREATURE_ORB_TARGET 19577 +enum +{ + SAY_AGGRO = -1550000, + SAY_SLAY1 = -1550001, + SAY_SLAY2 = -1550002, + SAY_SLAY3 = -1550003, + SAY_DEATH = -1550004, + SAY_POUNDING1 = -1550005, + SAY_POUNDING2 = -1550006, + + SPELL_POUNDING = 34162, + SPELL_ARCANE_ORB_MISSILE = 34172, + SPELL_KNOCK_AWAY = 25778, + SPELL_BERSERK = 26662, + + NPC_ARCANE_ORB_TARGET = 19577, +}; struct MANGOS_DLL_DECL boss_void_reaverAI : public ScriptedAI { @@ -50,24 +52,24 @@ struct MANGOS_DLL_DECL boss_void_reaverAI : public ScriptedAI ScriptedInstance* m_pInstance; - uint32 Pounding_Timer; - uint32 ArcaneOrb_Timer; - uint32 KnockAway_Timer; - uint32 Berserk_Timer; + uint32 m_uiPoundingTimer; + uint32 m_uiArcaneOrbTimer; + uint32 m_uiKnockAwayTimer; + uint32 m_uiBerserkTimer; void Reset() { - Pounding_Timer = 15000; - ArcaneOrb_Timer = 3000; - KnockAway_Timer = 30000; - Berserk_Timer = 600000; - - if (m_pInstance && m_creature->isAlive()) - m_pInstance->SetData(TYPE_VOIDREAVER, NOT_STARTED); + m_uiPoundingTimer = 13000; + m_uiArcaneOrbTimer = 3000; + m_uiKnockAwayTimer = 30000; + m_uiBerserkTimer = 10*MINUTE*IN_MILLISECONDS; } - void KilledUnit(Unit *victim) + void KilledUnit(Unit* pVictim) { + if (pVictim->GetTypeId() != TYPEID_PLAYER) + return; + switch(urand(0, 2)) { case 0: DoScriptText(SAY_SLAY1, m_creature); break; @@ -76,7 +78,7 @@ struct MANGOS_DLL_DECL boss_void_reaverAI : public ScriptedAI } } - void JustDied(Unit *victim) + void JustDied(Unit* pKiller) { DoScriptText(SAY_DEATH, m_creature); @@ -92,74 +94,91 @@ struct MANGOS_DLL_DECL boss_void_reaverAI : public ScriptedAI m_pInstance->SetData(TYPE_VOIDREAVER, IN_PROGRESS); } - void UpdateAI(const uint32 diff) + void JustReachedHome() + { + if (m_pInstance) + m_pInstance->SetData(TYPE_VOIDREAVER, NOT_STARTED); + } + + void JustSummoned(Creature* pSummoned) + { + // Cast the Arcane Orb missile on the npc, not on player + DoCastSpellIfCan(pSummoned, SPELL_ARCANE_ORB_MISSILE, CAST_TRIGGERED); + } + + void UpdateAI(const uint32 uiDiff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; // Pounding - if (Pounding_Timer < diff) + if (m_uiPoundingTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_POUNDING); - DoScriptText(urand(0, 1) ? SAY_POUNDING1 : SAY_POUNDING2, m_creature); - - Pounding_Timer = 15000; //cast time(3000) + cooldown time(12000) - }else Pounding_Timer -= diff; + if (DoCastSpellIfCan(m_creature, SPELL_POUNDING) == CAST_OK) + { + DoScriptText(urand(0, 1) ? SAY_POUNDING1 : SAY_POUNDING2, m_creature); + m_uiPoundingTimer = 14000; + } + } + else + m_uiPoundingTimer -= uiDiff; // Arcane Orb - if (ArcaneOrb_Timer < diff) + if (m_uiArcaneOrbTimer < uiDiff) { - Unit *target = NULL; - std::vector target_list; + // Search only for players which are not within 18 yards of the boss + std::vector suitableTargets; + ThreatList const& threatList = m_creature->getThreatManager().getThreatList(); + ThreatList::const_iterator itr = threatList.begin(); - ThreatList const& tList = m_creature->getThreatManager().getThreatList(); - for (ThreatList::const_iterator itr = tList.begin();itr != tList.end(); ++itr) + for (itr; itr != threatList.end(); ++itr) { - target = m_creature->GetMap()->GetUnit((*itr)->getUnitGuid()); - - // exclude pets & totems - if (!target || target->GetTypeId() != TYPEID_PLAYER) - continue; - - //18 yard radius minimum - if (target->IsWithinDist(m_creature, 18.0f, false)) - continue; - - target_list.push_back(target); + if (Unit* pTarget = m_creature->GetMap()->GetUnit((*itr)->getUnitGuid())) + { + if (pTarget->GetTypeId() == TYPEID_PLAYER && !pTarget->IsWithinDist(m_creature, 18)) + suitableTargets.push_back(pTarget); + } } - if (target_list.size()) - target = *(target_list.begin()+rand()%target_list.size()); + if (suitableTargets.empty()) + m_uiArcaneOrbTimer = 3000; else - target = m_creature->getVictim(); + { + Unit* pTarget = suitableTargets[urand(0, suitableTargets.size() - 1)]; - if (target) - DoCastSpellIfCan(target, SPELL_ARCANE_ORB_MISSILE); + if (pTarget) + m_creature->SummonCreature(NPC_ARCANE_ORB_TARGET, pTarget->GetPositionX(), pTarget->GetPositionY(), pTarget->GetPositionZ(), 0, TEMPSUMMON_CORPSE_DESPAWN, 0); - ArcaneOrb_Timer = 3000; - }else ArcaneOrb_Timer -= diff; + m_uiArcaneOrbTimer = 3000; + } + } + else + m_uiArcaneOrbTimer -= uiDiff; // Single Target knock back, reduces aggro - if (KnockAway_Timer < diff) + if (m_uiKnockAwayTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_KNOCK_AWAY); - - KnockAway_Timer = 30000; - }else KnockAway_Timer -= diff; + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_KNOCK_AWAY) == CAST_OK) + m_uiKnockAwayTimer = 30000; + } + else + m_uiKnockAwayTimer -= uiDiff; - //Berserk - if (Berserk_Timer < diff) + // Berserk + if (m_uiBerserkTimer) { - if (m_creature->IsNonMeleeSpellCasted(false)) - m_creature->InterruptNonMeleeSpells(false); - - DoCastSpellIfCan(m_creature,SPELL_BERSERK); - Berserk_Timer = 600000; - }else Berserk_Timer -= diff; + if (m_uiBerserkTimer <= uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_BERSERK) == CAST_OK) + m_uiBerserkTimer = 0; + } + else + m_uiBerserkTimer -= uiDiff; + } DoMeleeAttackIfReady(); - EnterEvadeIfOutOfCombatArea(diff); + EnterEvadeIfOutOfCombatArea(uiDiff); } }; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 6e0054838..327bb03b7 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2563" + #define SD2_REVISION_NR "2564" #endif // __SD2_REVISION_NR_H__ From 6c0e941ca10f908ff99b7fd45e986ef5738c839e Mon Sep 17 00:00:00 2001 From: Xfurry Date: Mon, 21 May 2012 20:27:07 +0300 Subject: [PATCH 0553/1172] [2565] Cleanup and improve script for Astromancer Solarian Proper handle the spotlight summoning based on the 2.4.3 spells Replaced transformation hack with proper spell Added enrage spell --- .../tempest_keep/the_eye/boss_astromancer.cpp | 381 ++++++++---------- .../tempest_keep/the_eye/boss_void_reaver.cpp | 2 +- .../tempest_keep/the_eye/instance_the_eye.cpp | 1 - .../outland/tempest_keep/the_eye/the_eye.h | 2 +- sd2_revision_nr.h | 2 +- 5 files changed, 182 insertions(+), 206 deletions(-) diff --git a/scripts/outland/tempest_keep/the_eye/boss_astromancer.cpp b/scripts/outland/tempest_keep/the_eye/boss_astromancer.cpp index 6fe82e5ee..9ff3e91fb 100644 --- a/scripts/outland/tempest_keep/the_eye/boss_astromancer.cpp +++ b/scripts/outland/tempest_keep/the_eye/boss_astromancer.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: Boss_Astromancer -SD%Complete: 80 -SDComment: +SD%Complete: 90 +SDComment: Check if the split phase has some spells involved SDCategory: Tempest Keep, The Eye EndScriptData */ @@ -39,39 +39,44 @@ enum SPELL_ARCANE_MISSILES = 33031, SPELL_WRATH_OF_THE_ASTROMANCER = 42783, SPELL_BLINDING_LIGHT = 33009, - SPELL_FEAR = 34322, + SPELL_PSYHIC_SCREAM = 34322, + SPELL_SOLARIAN_TRANSFORM = 39117, SPELL_VOID_BOLT = 39329, + SPELL_MARK_OF_SOLARIAN = 33023, // acts as an enrage spell + //SPELL_ROTATE_ASTROMANCER = 33283, // purpose unk - SPELL_SPOTLIGHT = 25824, - NPC_ASTROMANCER_SOLARIAN_SPOTLIGHT = 18928, - + // summoned creatures NPC_SOLARIUM_AGENT = 18925, NPC_SOLARIUM_PRIEST = 18806, + NPC_ASTROMANCER_SOLARIAN_SPOTLIGHT = 18928, + //NPC_ASTROMANCER_TRIGGER = 18932, // purpose unk - MODEL_HUMAN = 18239, - MODEL_VOIDWALKER = 18988, + // summoned spells + SPELL_SPOTLIGHT = 25824, // visual aura on the spotlights SPELL_SOLARIUM_GREAT_HEAL = 33387, SPELL_SOLARIUM_HOLY_SMITE = 25054, SPELL_SOLARIUM_ARCANE_TORRENT = 33390, - WV_ARMOR = 31000 + WV_ARMOR = 31000, // ToDo: this value need to be checked + + MAX_SPOTLIGHTS = 3, + MAX_AGENTS = 4, }; -const float CENTER_X = 432.909f; -const float CENTER_Y = -373.424f; -const float CENTER_Z = 17.9608f; -const float CENTER_O = 1.06421f; -const float SMALL_PORTAL_RADIUS = 12.6f; -const float LARGE_PORTAL_RADIUS = 26.0f; -const float PORTAL_Z = 17.005f; +// Spells used to summon the Spotlights on 2.4.3 - Astromancer Split +// The boss had to choose 2 large radius split spells and 1 small radius split +// Large radius spotlight: 33189,33281,33282,33347,33348,33349,33350,33351 +// Small radius spotlight: 33352,33353,33354,33355 + +static const float fRoomCenter[4] = {432.909f, -373.424f, 17.9608f, 1.06421f}; +static const float fSpotlightRadius[2] = {13.0f, 25.0f}; enum Phases { - PHASE_NORMAL = 1, - PHASE_SUMMON_AGENTS = 2, - PHASE_SUMMON_PRIESTS = 3, - PHASE_VOID = 4, + PHASE_NORMAL = 1, + PHASE_SPLIT = 2, + PHASE_VOID = 3, }; struct MANGOS_DLL_DECL boss_high_astromancer_solarianAI : public ScriptedAI @@ -79,9 +84,7 @@ struct MANGOS_DLL_DECL boss_high_astromancer_solarianAI : public ScriptedAI boss_high_astromancer_solarianAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_uiDefaultArmor = m_creature->GetArmor(); - m_fDefaultSize = m_creature->GetFloatValue(OBJECT_FIELD_SCALE_X); Reset(); } @@ -92,48 +95,44 @@ struct MANGOS_DLL_DECL boss_high_astromancer_solarianAI : public ScriptedAI uint32 m_uiBlindingLightTimer; uint32 m_uiFearTimer; uint32 m_uiVoidBoltTimer; - uint32 m_uiPhaseOneTimer; - uint32 m_uiPhaseTwoTimer; - uint32 m_uiPhaseThreeTimer; - uint32 m_uiAppearDelayTimer; + uint32 m_uiSplitTimer; + uint32 m_uiSummonAgentsTimer; + uint32 m_uiSummonPriestsTimer; + uint32 m_uiDelayTimer; uint32 m_uiDefaultArmor; - float m_fDefaultSize; - - bool m_bIsAppearDelay; - Phases m_Phase; - float m_aPortals[3][3]; + GUIDVector m_vSpotLightsGuidVector; void Reset() { - m_uiArcaneMissilesTimer = 2000; - m_uiWrathOfTheAstromancerTimer = 15000; - m_uiBlindingLightTimer = 41000; - m_uiFearTimer = 20000; - m_uiVoidBoltTimer = 10000; - m_uiPhaseOneTimer = 50000; - m_uiPhaseTwoTimer = 8000; - m_uiPhaseThreeTimer = 15000; - m_uiAppearDelayTimer = 2000; - m_bIsAppearDelay = false; - m_Phase = PHASE_NORMAL; - - if (m_pInstance) - m_pInstance->SetData(TYPE_SOLARIAN, NOT_STARTED); + m_uiArcaneMissilesTimer = 0; + m_uiWrathOfTheAstromancerTimer = urand(15000, 25000); + m_uiBlindingLightTimer = 35000; + m_uiFearTimer = 20000; + m_uiVoidBoltTimer = 10000; + m_uiSplitTimer = 50000; + m_uiSummonAgentsTimer = 0; + m_uiSummonPriestsTimer = 0; + m_uiDelayTimer = 0; + m_Phase = PHASE_NORMAL; + + // The vector will store the summoned spotlights + m_vSpotLightsGuidVector.reserve(MAX_SPOTLIGHTS); m_creature->SetArmor(m_uiDefaultArmor); - m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - m_creature->SetVisibility(VISIBILITY_ON); - m_creature->SetFloatValue(OBJECT_FIELD_SCALE_X, m_fDefaultSize); - m_creature->SetDisplayId(MODEL_HUMAN); + if (m_creature->GetVisibility() != VISIBILITY_ON) + m_creature->SetVisibility(VISIBILITY_ON); SetCombatMovement(true); } void KilledUnit(Unit* pVictim) { + if (pVictim->GetTypeId() != TYPEID_PLAYER) + return; + switch(urand(0, 2)) { case 0: DoScriptText(SAY_KILL1, m_creature); break; @@ -144,9 +143,6 @@ struct MANGOS_DLL_DECL boss_high_astromancer_solarianAI : public ScriptedAI void JustDied(Unit* pKiller) { - m_creature->SetFloatValue(OBJECT_FIELD_SCALE_X, m_fDefaultSize); - m_creature->SetDisplayId(MODEL_HUMAN); - DoScriptText(SAY_DEATH, m_creature); if (m_pInstance) @@ -161,13 +157,21 @@ struct MANGOS_DLL_DECL boss_high_astromancer_solarianAI : public ScriptedAI m_pInstance->SetData(TYPE_SOLARIAN, IN_PROGRESS); } + void JustReachedHome() + { + if (m_pInstance) + m_pInstance->SetData(TYPE_SOLARIAN, FAIL); + } + void JustSummoned(Creature* pSummoned) { switch (pSummoned->GetEntry()) { case NPC_ASTROMANCER_SOLARIAN_SPOTLIGHT: + // Note: this should be moved to database pSummoned->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); pSummoned->CastSpell(pSummoned, SPELL_SPOTLIGHT, false); + m_vSpotLightsGuidVector.push_back(pSummoned->GetObjectGuid()); break; case NPC_SOLARIUM_AGENT: case NPC_SOLARIUM_PRIEST: @@ -177,19 +181,11 @@ struct MANGOS_DLL_DECL boss_high_astromancer_solarianAI : public ScriptedAI } } - float Portal_X(float fRadius) + void DoSummonSpotlight(float fRadius, float fAngle, uint8 uiRandPoint) { - if (urand(0, 1)) - fRadius = -fRadius; - - return (fRadius * (float)(rand()%100)/100.0f + CENTER_X); - } - - float Portal_Y(float fX, float fRadius) - { - float fZ = urand(0, 1) ? 1.0f : -1.0f; - - return (fZ * sqrt(fRadius*fRadius - (fX - CENTER_X)*(fX - CENTER_X)) + CENTER_Y); + float fX, fY, fZ; + m_creature->GetNearPoint(m_creature, fX, fY, fZ, 0, fRadius, fAngle*uiRandPoint); + m_creature->SummonCreature(NPC_ASTROMANCER_SOLARIAN_SPOTLIGHT, fX, fY, fZ, 0, TEMPSUMMON_TIMED_DESPAWN, 30000); } void UpdateAI(const uint32 uiDiff) @@ -200,48 +196,58 @@ struct MANGOS_DLL_DECL boss_high_astromancer_solarianAI : public ScriptedAI // When Solarian reaches 20% she will transform into a huge void walker. if (m_Phase != PHASE_VOID && m_creature->GetHealthPercent() < 20.0f) { - m_Phase = PHASE_VOID; - - // To make sure she behaves like expected - m_bIsAppearDelay = false; - if (!IsCombatMovement()) + if (DoCastSpellIfCan(m_creature, SPELL_SOLARIAN_TRANSFORM) == CAST_OK) { - SetCombatMovement(true); - m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); - } - m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - m_creature->SetVisibility(VISIBILITY_ON); + DoScriptText(SAY_VOIDA, m_creature); + m_uiDelayTimer = 2000; - DoScriptText(SAY_VOIDA, m_creature); - DoScriptText(SAY_VOIDB, m_creature); + m_creature->SetArmor(WV_ARMOR); + m_Phase = PHASE_VOID; - m_creature->SetArmor(WV_ARMOR); - m_creature->SetDisplayId(MODEL_VOIDWALKER); - m_creature->SetFloatValue(OBJECT_FIELD_SCALE_X, m_fDefaultSize*2.5f); + if (m_creature->GetVisibility() != VISIBILITY_ON) + m_creature->SetVisibility(VISIBILITY_ON); + + // Stop the combat for a small delay + SetCombatMovement(false); + m_creature->GetMotionMaster()->MoveIdle(); + } } - if (m_bIsAppearDelay) + // Handle delays between combat phases + if (m_uiDelayTimer) { - if (m_uiAppearDelayTimer < uiDiff) + if (m_uiDelayTimer <= uiDiff) { - m_bIsAppearDelay = false; - - if (m_Phase == PHASE_SUMMON_AGENTS) + if (m_Phase == PHASE_SPLIT) { - m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + // select two different numbers between 0 and 7 so we will get different spawn points for the spotlights + uint8 uiPos1 = urand(0, 7); + uint8 uiPos2 = (uiPos1 + urand(1, 7)) % 8; + + // summon 3 spotlights + m_vSpotLightsGuidVector.clear(); + DoSummonSpotlight(fSpotlightRadius[0], M_PI_F/2, urand(0, 3)); + DoSummonSpotlight(fSpotlightRadius[1], M_PI_F/4, uiPos1); + DoSummonSpotlight(fSpotlightRadius[1], M_PI_F/4, uiPos2); + m_creature->SetVisibility(VISIBILITY_OFF); + + DoScriptText(urand(0, 1) ? SAY_SUMMON1 : SAY_SUMMON2, m_creature); + m_uiSummonAgentsTimer = 6000; } - // Let move and attack again - else if (!IsCombatMovement()) + else if (m_Phase == PHASE_VOID) { + DoScriptText(SAY_VOIDB, m_creature); + SetCombatMovement(true); + m_creature->GetMotionMaster()->Clear(); m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); } - m_uiAppearDelayTimer = 2000; + m_uiDelayTimer = 0; } else - m_uiAppearDelayTimer -= uiDiff; + m_uiDelayTimer -= uiDiff; // Combat is still on hold return; @@ -256,8 +262,8 @@ struct MANGOS_DLL_DECL boss_high_astromancer_solarianAI : public ScriptedAI // Target the tank ? if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1, SPELL_WRATH_OF_THE_ASTROMANCER, SELECT_FLAG_PLAYER)) { - if (DoCastSpellIfCan(pTarget, SPELL_WRATH_OF_THE_ASTROMANCER, CAST_INTERRUPT_PREVIOUS) == CAST_OK) - m_uiWrathOfTheAstromancerTimer = 25000; + if (DoCastSpellIfCan(pTarget, SPELL_WRATH_OF_THE_ASTROMANCER) == CAST_OK) + m_uiWrathOfTheAstromancerTimer = urand(15000, 25000); } else m_uiWrathOfTheAstromancerTimer = 10000; @@ -269,13 +275,13 @@ struct MANGOS_DLL_DECL boss_high_astromancer_solarianAI : public ScriptedAI if (m_uiBlindingLightTimer < uiDiff) { // She casts this spell every 45 seconds. It is a kind of Moonfire spell, which she strikes down on the whole raid simultaneously. It hits everyone in the raid for 2280 to 2520 arcane damage. - if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_BLINDING_LIGHT) == CAST_OK) + if (DoCastSpellIfCan(m_creature, SPELL_BLINDING_LIGHT) == CAST_OK) m_uiBlindingLightTimer = 45000; } else m_uiBlindingLightTimer -= uiDiff; - // Arcane Missiles Timer - TODO - check timer, if this spell is cast always, CombatMovement should be disabled here + // Arcane Missiles Timer if (m_uiArcaneMissilesTimer < uiDiff) { // Solarian casts Arcane Missiles on on random targets in the raid. @@ -288,112 +294,88 @@ struct MANGOS_DLL_DECL boss_high_astromancer_solarianAI : public ScriptedAI DoCastSpellIfCan(pTarget, SPELL_ARCANE_MISSILES); } - m_uiArcaneMissilesTimer = 5000; + m_uiArcaneMissilesTimer = urand(3000, 4000); } else m_uiArcaneMissilesTimer -= uiDiff; // Phase 1 Timer - if (m_uiPhaseOneTimer < uiDiff) + if (m_uiSplitTimer < uiDiff) { - m_Phase = PHASE_SUMMON_AGENTS; + // ToDo: the timer of this ability is around 45-50 seconds. Please check if this is correct! + DoCastSpellIfCan(m_creature, SPELL_MARK_OF_SOLARIAN, CAST_INTERRUPT_PREVIOUS); + m_Phase = PHASE_SPLIT; // After these 50 seconds she portals to the middle of the room and disappears, leaving 3 light portals behind. - m_creature->GetMotionMaster()->Clear(); - m_creature->StopMoving(); - m_creature->AttackStop(); - + // ToDo: check if there are some spells involved in this event! + m_creature->GetMotionMaster()->MoveIdle(); SetCombatMovement(false); + m_creature->NearTeleportTo(fRoomCenter[0], fRoomCenter[1], fRoomCenter[2], fRoomCenter[3], true); - m_creature->NearTeleportTo(CENTER_X, CENTER_Y, CENTER_Z, CENTER_O, true); - - for(int i = 0; i <= 2; ++i) - { - if (!i) - { - m_aPortals[i][0] = Portal_X(SMALL_PORTAL_RADIUS); - m_aPortals[i][1] = Portal_Y(m_aPortals[i][0], SMALL_PORTAL_RADIUS); - m_aPortals[i][2] = CENTER_Z; - } - else - { - m_aPortals[i][0] = Portal_X(LARGE_PORTAL_RADIUS); - m_aPortals[i][1] = Portal_Y(m_aPortals[i][0], LARGE_PORTAL_RADIUS); - m_aPortals[i][2] = PORTAL_Z; - } - } - - if ((abs(int(m_aPortals[2][0]) - int(m_aPortals[1][0])) < 7) && (abs(int(m_aPortals[2][1]) - int(m_aPortals[1][1])) < 7)) - { - int i = 1; - if (abs(int(CENTER_X) + int(26.0f) - int(m_aPortals[2][0])) < 7) - i = -1; - - m_aPortals[2][0] = m_aPortals[2][0]+7*i; - m_aPortals[2][1] = Portal_Y(m_aPortals[2][0], LARGE_PORTAL_RADIUS); - } - - for (int i = 0; i <= 2; ++i) - m_creature->SummonCreature(NPC_ASTROMANCER_SOLARIAN_SPOTLIGHT, m_aPortals[i][0], m_aPortals[i][1], m_aPortals[i][2], CENTER_O, TEMPSUMMON_TIMED_DESPAWN, m_uiPhaseTwoTimer+m_uiPhaseThreeTimer+m_uiAppearDelayTimer+1700); - - m_bIsAppearDelay = true; - m_uiPhaseOneTimer = 48000; // 2s for appearDelay - + m_uiDelayTimer = 1000; + m_uiSplitTimer = 50000; // Do nothing more, if phase switched return; } else - m_uiPhaseOneTimer -= uiDiff; + m_uiSplitTimer -= uiDiff; DoMeleeAttackIfReady(); break; - case PHASE_SUMMON_AGENTS: - // Check Phase 2 Timer - if (m_uiPhaseTwoTimer < uiDiff) + case PHASE_SPLIT: + + // Summon 4 Agents on each portal + if (m_uiSummonAgentsTimer) { - //10 seconds after Solarian disappears, 12 mobs spawn out of the three portals. - m_Phase = PHASE_SUMMON_PRIESTS; - for (int i = 0; i <= 2; ++i) + if (m_uiSummonAgentsTimer <= uiDiff) { - for (int j = 1; j <= 4; ++j) - m_creature->SummonCreature(NPC_SOLARIUM_AGENT, m_aPortals[i][0], m_aPortals[i][1], m_aPortals[i][2], 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); + for (uint8 i = 0; i < MAX_SPOTLIGHTS; ++i) + { + if (Creature* pSpotlight = m_creature->GetMap()->GetCreature(m_vSpotLightsGuidVector[i])) + { + for (uint8 j = 0; j < MAX_AGENTS; ++j) + m_creature->SummonCreature(NPC_SOLARIUM_AGENT, pSpotlight->GetPositionX(), pSpotlight->GetPositionY(), pSpotlight->GetPositionZ(), 0, TEMPSUMMON_DEAD_DESPAWN, 0); + } + } + m_uiSummonAgentsTimer = 0; + m_uiSummonPriestsTimer = 15000; } - - DoScriptText(SAY_SUMMON1, m_creature); - - m_uiPhaseTwoTimer = 8000; // 2s for appearDelay + else + m_uiSummonAgentsTimer -= uiDiff; } - else - m_uiPhaseTwoTimer -= uiDiff; - - break; - case PHASE_SUMMON_PRIESTS: - // Check Phase 3 Timer - if (m_uiPhaseThreeTimer < uiDiff) + if (m_uiSummonPriestsTimer) { - m_Phase = PHASE_NORMAL; - - // 15 seconds later Solarian reappears out of one of the 3 portals. Simultaneously, 2 healers appear in the two other portals. - int i = irand(0, 2); - m_creature->GetMotionMaster()->Clear(); - m_creature->GetMap()->CreatureRelocation(m_creature, m_aPortals[i][0], m_aPortals[i][1], m_aPortals[i][2], CENTER_O); - - for (int j = 0; j <= 2; ++j) - if (j != i) - m_creature->SummonCreature(NPC_SOLARIUM_PRIEST, m_aPortals[j][0], m_aPortals[j][1], m_aPortals[j][2], 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); - - m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - m_creature->SetVisibility(VISIBILITY_ON); - - DoScriptText(SAY_SUMMON2, m_creature); - - m_bIsAppearDelay = true; - m_uiPhaseThreeTimer = 15000; + if (m_uiSummonPriestsTimer < uiDiff) + { + m_Phase = PHASE_NORMAL; + // Randomize the portals + std::random_shuffle(m_vSpotLightsGuidVector.begin(), m_vSpotLightsGuidVector.end()); + // Summon 2 priests + for (uint8 i = 0; i < 2; ++i) + { + if (Creature* pSpotlight = m_creature->GetMap()->GetCreature(m_vSpotLightsGuidVector[i])) + m_creature->SummonCreature(NPC_SOLARIUM_PRIEST, pSpotlight->GetPositionX(), pSpotlight->GetPositionY(), pSpotlight->GetPositionZ(), 0, TEMPSUMMON_DEAD_DESPAWN, 0); + } + // Teleport the boss at the last portal + if (Creature* pSpotlight = m_creature->GetMap()->GetCreature(m_vSpotLightsGuidVector[2])) + m_creature->NearTeleportTo(pSpotlight->GetPositionX(), pSpotlight->GetPositionY(), pSpotlight->GetPositionZ(), pSpotlight->GetOrientation(), true); + + SetCombatMovement(true); + m_creature->GetMotionMaster()->Clear(); + m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); + + // Set as visible and reset spells timers + m_creature->SetVisibility(VISIBILITY_ON); + m_uiArcaneMissilesTimer = 0; + m_uiSummonPriestsTimer = 0; + m_uiBlindingLightTimer = 35000; + m_uiWrathOfTheAstromancerTimer = urand(15000, 25000); + } + else + m_uiSummonPriestsTimer -= uiDiff; } - else - m_uiPhaseThreeTimer -= uiDiff; break; @@ -401,7 +383,7 @@ struct MANGOS_DLL_DECL boss_high_astromancer_solarianAI : public ScriptedAI // Fear Timer if (m_uiFearTimer < uiDiff) { - if (DoCastSpellIfCan(m_creature, SPELL_FEAR) == CAST_OK) + if (DoCastSpellIfCan(m_creature, SPELL_PSYHIC_SCREAM) == CAST_OK) m_uiFearTimer = 20000; } else @@ -424,13 +406,7 @@ struct MANGOS_DLL_DECL boss_high_astromancer_solarianAI : public ScriptedAI struct MANGOS_DLL_DECL mob_solarium_priestAI : public ScriptedAI { - mob_solarium_priestAI(Creature* pCreature) : ScriptedAI(pCreature) - { - m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - Reset(); - } - - ScriptedInstance* m_pInstance; + mob_solarium_priestAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } uint32 m_uiHealTimer; uint32 m_uiHolySmiteTimer; @@ -443,6 +419,17 @@ struct MANGOS_DLL_DECL mob_solarium_priestAI : public ScriptedAI m_uiAoESilenceTimer = 15000; } + void AttackStart(Unit* pWho) + { + if (m_creature->Attack(pWho, true)) + { + m_creature->AddThreat(pWho); + m_creature->SetInCombatWith(pWho); + pWho->SetInCombatWith(m_creature); + DoStartMovement(pWho, 25.0f); + } + } + void UpdateAI(const uint32 uiDiff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) @@ -450,23 +437,10 @@ struct MANGOS_DLL_DECL mob_solarium_priestAI : public ScriptedAI if (m_uiHealTimer < uiDiff) { - Creature* pTarget = NULL; - - switch(urand(0, 1)) + if (Unit* pTarget = DoSelectLowestHpFriendly(50.0f)) { - case 0: - if (m_pInstance) - pTarget = m_pInstance->GetSingleCreatureFromStorage(NPC_ASTROMANCER); - break; - case 1: - pTarget = m_creature; - break; - } - - if (pTarget) - { - DoCastSpellIfCan(pTarget, SPELL_SOLARIUM_GREAT_HEAL); - m_uiHealTimer = 9000; + if (DoCastSpellIfCan(pTarget, SPELL_SOLARIUM_GREAT_HEAL) == CAST_OK) + m_uiHealTimer = 9000; } } else @@ -474,16 +448,19 @@ struct MANGOS_DLL_DECL mob_solarium_priestAI : public ScriptedAI if (m_uiHolySmiteTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_SOLARIUM_HOLY_SMITE); - m_uiHolySmiteTimer = 4000; + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, SPELL_SOLARIUM_HOLY_SMITE) == CAST_OK) + m_uiHolySmiteTimer = 4000; + } } else m_uiHolySmiteTimer -= uiDiff; if (m_uiAoESilenceTimer < uiDiff) { - DoCastSpellIfCan(m_creature, SPELL_SOLARIUM_ARCANE_TORRENT); - m_uiAoESilenceTimer = 13000; + if (DoCastSpellIfCan(m_creature, SPELL_SOLARIUM_ARCANE_TORRENT) == CAST_OK) + m_uiAoESilenceTimer = 13000; } else m_uiAoESilenceTimer -= uiDiff; diff --git a/scripts/outland/tempest_keep/the_eye/boss_void_reaver.cpp b/scripts/outland/tempest_keep/the_eye/boss_void_reaver.cpp index 4f67c4564..1b48f7c68 100644 --- a/scripts/outland/tempest_keep/the_eye/boss_void_reaver.cpp +++ b/scripts/outland/tempest_keep/the_eye/boss_void_reaver.cpp @@ -135,7 +135,7 @@ struct MANGOS_DLL_DECL boss_void_reaverAI : public ScriptedAI { if (Unit* pTarget = m_creature->GetMap()->GetUnit((*itr)->getUnitGuid())) { - if (pTarget->GetTypeId() == TYPEID_PLAYER && !pTarget->IsWithinDist(m_creature, 18)) + if (pTarget->GetTypeId() == TYPEID_PLAYER && !pTarget->IsWithinDist(m_creature, 18.0f)) suitableTargets.push_back(pTarget); } } diff --git a/scripts/outland/tempest_keep/the_eye/instance_the_eye.cpp b/scripts/outland/tempest_keep/the_eye/instance_the_eye.cpp index 4942d6dd5..97995da26 100644 --- a/scripts/outland/tempest_keep/the_eye/instance_the_eye.cpp +++ b/scripts/outland/tempest_keep/the_eye/instance_the_eye.cpp @@ -58,7 +58,6 @@ void instance_the_eye::OnCreatureCreate(Creature* pCreature) case NPC_CAPERNIAN: case NPC_SANGUINAR: case NPC_KAELTHAS: - case NPC_ASTROMANCER: m_mNpcEntryGuidStore[pCreature->GetEntry()] = pCreature->GetObjectGuid(); break; } diff --git a/scripts/outland/tempest_keep/the_eye/the_eye.h b/scripts/outland/tempest_keep/the_eye/the_eye.h index 1fd2bf0cd..4ec424936 100644 --- a/scripts/outland/tempest_keep/the_eye/the_eye.h +++ b/scripts/outland/tempest_keep/the_eye/the_eye.h @@ -15,7 +15,7 @@ enum TYPE_KAELTHAS_PHASE = 3, // not regular encounter, contains phase instead - NPC_ASTROMANCER = 18805, + //NPC_ASTROMANCER = 18805, NPC_KAELTHAS = 19622, NPC_CAPERNIAN = 20062, diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 327bb03b7..fc53e8335 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2564" + #define SD2_REVISION_NR "2565" #endif // __SD2_REVISION_NR_H__ From ae122c9b34ef47e4add8e21823311b46a8870fd0 Mon Sep 17 00:00:00 2001 From: michalpolko Date: Tue, 22 May 2012 23:51:37 +0300 Subject: [PATCH 0554/1172] [2566] Implement script for Deathbringer Saurfang Notes: Intro and outro events are not yet implemented Blood Power and all the related spells require core support Signed-off-by: Xfurry --- .../boss_deathbringer_saurfang.cpp | 268 +++++++++++++++++- sd2_revision_nr.h | 2 +- sql/scriptdev2_script_full.sql | 5 +- sql/updates/r2566_scriptdev2.sql | 4 + 4 files changed, 275 insertions(+), 4 deletions(-) create mode 100644 sql/updates/r2566_scriptdev2.sql diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp index 80ff76641..09be435a8 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: boss_deathbringer_saurfang -SD%Complete: 20% -SDComment: Basic script +SD%Complete: 60% +SDComment: Blood Power and all the related spells require core support; Intro and Outro event NYI. SDCategory: Icecrown Citadel EndScriptData */ @@ -33,6 +33,9 @@ enum SAY_SLAY_2 = -1631032, SAY_BERSERK = -1631033, SAY_DEATH = -1631034, + EMOTE_FRENZY = -1631193, + EMOTE_SCENT = -1631194, + SAY_INTRO_ALLY_0 = -1631035, SAY_INTRO_ALLY_1 = -1631036, SAY_INTRO_ALLY_2 = -1631037, @@ -68,30 +71,111 @@ enum SAY_OUTRO_HORDE_2 = -1631067, SAY_OUTRO_HORDE_3 = -1631068, SAY_OUTRO_HORDE_4 = -1631069, + + // intro event related + //SPELL_GRIP_OF_AGONY = 70572, + //SPELL_VEHICLE_HARDCODED = 46598, + + // combat spells + SPELL_BLOOD_POWER = 72371, + //SPELL_BLOOD_POWER_SCALE = 72370, // included in creature_template_addon + //SPELL_ZERO_POWER = 72242, // included in creature_template_addon + + //SPELL_MARK_FALLEN_DAMAGE = 72256, // procs on Saurfang melee attack - 72255 - included in creature_template_addon + SPELL_MARK_FALLEN_CHAMPION = 72293, // procs on target death - 72260 + SPELL_REMOVE_MARKS = 72257, + + //SPELL_RUNE_OF_BLOOD_PROC = 72408, // procs on Saurfang mele attack - 72409 - included in creature_template_addon + SPELL_RUNE_OF_BLOOD = 72410, + + SPELL_BLOOD_NOVA = 72378, + SPELL_BOILING_BLOOD = 72385, + + SPELL_CALL_BLOOD_BEAST_1 = 72172, // summons 38508 + SPELL_CALL_BLOOD_BEAST_2 = 72173, + SPELL_CALL_BLOOD_BEAST_3 = 72356, + SPELL_CALL_BLOOD_BEAST_4 = 72357, + SPELL_CALL_BLOOD_BEAST_5 = 72358, + SPELL_SCENT_OF_BLOOD = 72769, // triggers 72771 on the blood beasts + + SPELL_BERSERK = 26662, + SPELL_FRENZY = 72737, + + // Summoned spells + SPELL_RESISTANT_SKIN = 72723, + SPELL_BLOOD_LINK_BEAST = 72176, + + FACTION_ID_UNDEAD = 974, + + POINT_ID_INTRO = 1, + POINT_ID_EVADE = 2, }; +static const float fIntroPosition[4] = {-491.30f, 2211.35f, 541.11f, 3.16f}; + struct MANGOS_DLL_DECL boss_deathbringer_saurfangAI : public ScriptedAI { boss_deathbringer_saurfangAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (instance_icecrown_citadel*)pCreature->GetInstanceData(); + m_powerBloodPower = m_creature->getPowerType(); + m_bIsIntroDone = false; Reset(); } instance_icecrown_citadel* m_pInstance; + uint32 m_uiRuneOfBloodTimer; + uint32 m_uiBoilingBloodTimer; + uint32 m_uiBloodNovaTimer; + uint32 m_uiBloodBeastsTimer; + uint32 m_uiScentOfBloodTimer; + uint32 m_uiBerserkTimer; + + bool m_bIsFrenzied; + bool m_bIsIntroDone; + + Powers m_powerBloodPower; + void Reset() { + m_uiRuneOfBloodTimer = 25000; + m_uiBoilingBloodTimer = 19000; + m_uiBloodNovaTimer = 20000; + m_uiBloodBeastsTimer = 40000; + m_uiScentOfBloodTimer = 47000; + m_uiBerserkTimer = 8*MINUTE*IN_MILLISECONDS; + + if (m_pInstance && m_pInstance->IsHeroicDifficulty()) + m_uiBerserkTimer = 6*MINUTE*IN_MILLISECONDS; + + m_bIsFrenzied = false; + + m_creature->SetPower(m_powerBloodPower, 0); } void Aggro(Unit* pWho) { DoScriptText(SAY_AGGRO, m_creature); + DoCastSpellIfCan(m_creature, SPELL_BLOOD_POWER, CAST_TRIGGERED); if (m_pInstance) m_pInstance->SetData(TYPE_DEATHBRINGER_SAURFANG, IN_PROGRESS); } + void MoveInLineOfSight(Unit *pWho) + { + if (!m_bIsIntroDone && pWho->GetTypeId() == TYPEID_PLAYER && !((Player*)pWho)->isGameMaster() && m_creature->GetDistance2d(pWho) < 50.0f) + { + m_creature->GetMotionMaster()->MovePoint(POINT_ID_INTRO, fIntroPosition[0], fIntroPosition[1], fIntroPosition[2]); + if (m_pInstance) + m_pInstance->DoUseDoorOrButton(GO_SAURFANG_DOOR); + m_bIsIntroDone = true; + } + + ScriptedAI::MoveInLineOfSight(pWho); + } + void KilledUnit(Unit* pVictim) { if (pVictim->GetTypeId() != TYPEID_PLAYER) @@ -104,6 +188,7 @@ struct MANGOS_DLL_DECL boss_deathbringer_saurfangAI : public ScriptedAI void JustDied(Unit* pKiller) { DoScriptText(SAY_DEATH, m_creature); + DoCastSpellIfCan(m_creature, SPELL_REMOVE_MARKS, CAST_TRIGGERED); if (m_pInstance) m_pInstance->SetData(TYPE_DEATHBRINGER_SAURFANG, DONE); @@ -115,11 +200,190 @@ struct MANGOS_DLL_DECL boss_deathbringer_saurfangAI : public ScriptedAI m_pInstance->SetData(TYPE_DEATHBRINGER_SAURFANG, FAIL); } + void EnterEvadeMode() + { + m_creature->RemoveAllAuras(); + m_creature->DeleteThreatList(); + m_creature->CombatStop(true); + + // Boss needs to evade to the point in front of the door + if (m_creature->isAlive()) + m_creature->GetMotionMaster()->MovePoint(POINT_ID_EVADE, fIntroPosition[0], fIntroPosition[1], fIntroPosition[2]); + + m_creature->SetLootRecipient(NULL); + + Reset(); + } + + void MovementInform(uint32 uiMoveType, uint32 uiPointId) + { + if (uiMoveType != POINT_MOTION_TYPE) + return; + + if (uiPointId == POINT_ID_EVADE) + { + m_creature->SetFacingTo(fIntroPosition[3]); + + if (m_pInstance) + m_pInstance->SetData(TYPE_DEATHBRINGER_SAURFANG, FAIL); + } + else if (uiPointId == POINT_ID_INTRO) + { + if (m_pInstance) + m_pInstance->DoUseDoorOrButton(GO_SAURFANG_DOOR); + + // Note: this should be done only after the intro event is finished + // ToDo: move this to the proper place after the intro will be implemented + // Also the faction needs to be checked if it should be handled in database + m_creature->setFaction(FACTION_ID_UNDEAD); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_PASSIVE); + m_creature->SetInCombatWithZone(); + } + } + + void JustSummoned(Creature* pSummoned) + { + pSummoned->CastSpell(pSummoned, SPELL_RESISTANT_SKIN, true); + pSummoned->CastSpell(pSummoned, SPELL_BLOOD_LINK_BEAST, true); + + // Note: the summoned should be activated only after 2-3 seconds after summon - can be done in eventAI + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + pSummoned->AI()->AttackStart(pTarget); + } + + // Wrapper to help get a random player for the Mark of the Fallen Champion + Unit* SelectRandomPlayerForMark() + { + // Search only for players which are not within 18 yards of the boss + std::vector suitableTargets; + ThreatList const& threatList = m_creature->getThreatManager().getThreatList(); + ThreatList::const_iterator itr = threatList.begin(); + + for (itr; itr != threatList.end(); ++itr) + { + if (Unit* pTarget = m_creature->GetMap()->GetUnit((*itr)->getUnitGuid())) + { + if (pTarget->GetTypeId() == TYPEID_PLAYER && pTarget != m_creature->getVictim() && !pTarget->HasAura(SPELL_MARK_FALLEN_CHAMPION)) + suitableTargets.push_back(pTarget); + } + } + + if (suitableTargets.empty()) + return m_creature->getVictim(); + else + return suitableTargets[urand(0, suitableTargets.size() - 1)]; + } + void UpdateAI(const uint32 uiDiff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; + // Mark of the Fallen Champion + // ToDo: enable this when blood power is fully supported by the core + /*if (m_creature->GetPower(m_powerBloodPower) >= 100) + { + if (Unit* pTarget = SelectRandomPlayerForMark()) + { + if (DoCastSpellIfCan(pTarget, SPELL_MARK_FALLEN_CHAMPION) == CAST_OK) + { + DoScriptText(SAY_FALLENCHAMPION, m_creature); + m_creature->SetPower(m_powerBloodPower, 0); + } + } + }*/ + + // Frenzy (soft enrage) + if (!m_bIsFrenzied) + { + if (m_creature->GetHealthPercent() <= 30.0f) + { + if (DoCastSpellIfCan(m_creature, SPELL_FRENZY) == CAST_OK) + { + DoScriptText(EMOTE_FRENZY, m_creature); + m_bIsFrenzied = true; + } + } + } + + // Berserk (hard enrage) + if (m_uiBerserkTimer) + { + if (m_uiBerserkTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_BERSERK) == CAST_OK) + { + DoScriptText(SAY_BERSERK, m_creature); + m_uiBerserkTimer = 0; + } + } + else + m_uiBerserkTimer -= uiDiff; + } + + // Rune of Blood + if (m_uiRuneOfBloodTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_RUNE_OF_BLOOD) == CAST_OK) + m_uiRuneOfBloodTimer = 25000; + } + else + m_uiRuneOfBloodTimer -= uiDiff; + + // Boiling Blood + if (m_uiBoilingBloodTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_BOILING_BLOOD) == CAST_OK) + m_uiBoilingBloodTimer = 15000; + } + else + m_uiBoilingBloodTimer -= uiDiff; + + // Blood Nova + if (m_uiBloodNovaTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_BLOOD_NOVA) == CAST_OK) + m_uiBloodNovaTimer = 20000; + } + else + m_uiBloodNovaTimer -= uiDiff; + + // Call Blood Beasts + if (m_uiBloodBeastsTimer < uiDiff) + { + DoScriptText(SAY_BLOODBEASTS, m_creature); + + DoCastSpellIfCan(m_creature, SPELL_CALL_BLOOD_BEAST_1, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_CALL_BLOOD_BEAST_2, CAST_TRIGGERED); + + if (m_pInstance && m_pInstance->Is25ManDifficulty()) + { + DoCastSpellIfCan(m_creature, SPELL_CALL_BLOOD_BEAST_3, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_CALL_BLOOD_BEAST_4, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_CALL_BLOOD_BEAST_5, CAST_TRIGGERED); + } + + m_uiBloodBeastsTimer = 40000; + m_uiScentOfBloodTimer = 7000; + } + else + m_uiBloodBeastsTimer -= uiDiff; + + // Scent of Blood + if (m_pInstance && m_pInstance->IsHeroicDifficulty()) + { + if (m_uiScentOfBloodTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_SCENT_OF_BLOOD) == CAST_OK) + { + DoScriptText(EMOTE_SCENT, m_creature); + m_uiScentOfBloodTimer = 40000; + } + } + else + m_uiScentOfBloodTimer -= uiDiff; + } + DoMeleeAttackIfReady(); } }; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index fc53e8335..5a34ce08d 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2565" + #define SD2_REVISION_NR "2566" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 23f020384..6fdc45cdb 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -3817,7 +3817,10 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1631189,'THE LICH KING...MUST...FALL!',17389,1,0,0,'tirion SAY_OUTRO_11'), (-1631190,'Now I stand, the lion before the lambs... and they do not fear.',17361,1,0,0,'lich_king SAY_OUTRO_12'), (-1631191,'They cannot fear.',17362,1,0,0,'lich_king SAY_OUTRO_13'), -(-1631192,'%s dies',17374,2,0,0,'lich_king SAY_OUTRO_14'); -- TODO Can be wrong +(-1631192,'%s dies',17374,2,0,0,'lich_king SAY_OUTRO_14'), -- TODO Can be wrong + +(-1631193,'%s goes into a frenzy!',0,3,0,0,'saurfang EMOTE_FRENZY'), +(-1631194,'%s\'s Blood Beasts gain the scent of blood!',0,3,0,0,'saurfang EMOTE_SCENT'); -- -1 632 000 ICC: FORGE OF SOULS INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES diff --git a/sql/updates/r2566_scriptdev2.sql b/sql/updates/r2566_scriptdev2.sql new file mode 100644 index 000000000..0266f5783 --- /dev/null +++ b/sql/updates/r2566_scriptdev2.sql @@ -0,0 +1,4 @@ +DELETE FROM script_texts WHERE entry IN (-1631193,-1631194); +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1631193,'%s goes into a frenzy!',0,3,0,0,'saurfang EMOTE_FRENZY'), +(-1631194,'%s\'s Blood Beasts gain the scent of blood!',0,3,0,0,'saurfang EMOTE_SCENT'); From 77913895d13a25e6fa3215ed32074db75b3139f6 Mon Sep 17 00:00:00 2001 From: NeatElves Date: Mon, 28 May 2012 21:20:00 +0300 Subject: [PATCH 0555/1172] [2567] Move more gossip scripts to database Signed-off-by: Xfurry --- scripts/northrend/icecrown.cpp | 35 ++----------- scripts/outland/zangarmarsh.cpp | 87 +------------------------------- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 2 - sql/scriptdev2_script_full.sql | 2 +- sql/updates/r2567_mangos.sql | 2 + sql/updates/r2567_scriptdev2.sql | 2 + 7 files changed, 10 insertions(+), 122 deletions(-) create mode 100644 sql/updates/r2567_mangos.sql create mode 100644 sql/updates/r2567_scriptdev2.sql diff --git a/scripts/northrend/icecrown.cpp b/scripts/northrend/icecrown.cpp index 258ba7108..9250f03a0 100644 --- a/scripts/northrend/icecrown.cpp +++ b/scripts/northrend/icecrown.cpp @@ -16,49 +16,20 @@ /* ScriptData SDName: Icecrown -SD%Complete: 100 -SDComment: Vendor support: 34885 +SD%Complete: 0 +SDComment: Placeholder SDCategory: Icecrown EndScriptData */ /* ContentData -npc_dame_evniki_kapsalis EndContentData */ #include "precompiled.h" /*###### -## npc_dame_evniki_kapsalis +## ######*/ -enum -{ - TITLE_CRUSADER = 123 -}; - -bool GossipHello_npc_dame_evniki_kapsalis(Player* pPlayer, Creature* pCreature) -{ - if (pPlayer->HasTitle(TITLE_CRUSADER)) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_VENDOR, GOSSIP_TEXT_BROWSE_GOODS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE); - - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); - return true; -} - -bool GossipSelect_npc_dame_evniki_kapsalis(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) -{ - if (uiAction == GOSSIP_ACTION_TRADE) - pPlayer->SEND_VENDORLIST(pCreature->GetObjectGuid()); - return true; -} - void AddSC_icecrown() { - Script* pNewScript; - - pNewScript = new Script; - pNewScript->Name = "npc_dame_evniki_kapsalis"; - pNewScript->pGossipHello = &GossipHello_npc_dame_evniki_kapsalis; - pNewScript->pGossipSelect = &GossipSelect_npc_dame_evniki_kapsalis; - pNewScript->RegisterSelf(); } diff --git a/scripts/outland/zangarmarsh.cpp b/scripts/outland/zangarmarsh.cpp index 926134568..0d30e7695 100644 --- a/scripts/outland/zangarmarsh.cpp +++ b/scripts/outland/zangarmarsh.cpp @@ -17,12 +17,11 @@ /* ScriptData SDName: Zangarmarsh SD%Complete: 100 -SDComment: Quest support: 9752, 9785, 10009. Mark Of ... buffs. +SDComment: Quest support: 9752, 9785, 10009. SDCategory: Zangarmarsh EndScriptData */ /* ContentData -npcs_ashyen_and_keleth npc_cooshcoosh npc_kayra_longmane event_stormcrow @@ -31,84 +30,6 @@ EndContentData */ #include "precompiled.h" #include "escort_ai.h" -/*###### -## npcs_ashyen_and_keleth -######*/ - -#define SAY_REWARD_BLESS -1000207 - -#define GOSSIP_ITEM_BLESS_ASH "Grant me your mark, wise ancient." -#define GOSSIP_ITEM_BLESS_KEL "Grant me your mark, mighty ancient." - -//#define TEXT_BLESSINGS "" - -bool GossipHello_npcs_ashyen_and_keleth(Player* pPlayer, Creature* pCreature) -{ - if (pPlayer->GetReputationRank(942) > REP_NEUTRAL) - { - if (pCreature->GetEntry() == 17900) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_BLESS_ASH, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - if (pCreature->GetEntry() == 17901) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_BLESS_KEL, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - } - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); - - return true; -} - -bool GossipSelect_npcs_ashyen_and_keleth(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) -{ - if (uiAction == GOSSIP_ACTION_INFO_DEF+1) - { - pCreature->setPowerType(POWER_MANA); - pCreature->SetMaxPower(POWER_MANA,200); //set a "fake" mana value, we can't depend on database doing it in this case - pCreature->SetPower(POWER_MANA,200); - - if (pCreature->GetEntry() == 17900) //check which creature we are dealing with - { - switch (pPlayer->GetReputationRank(942)) - { //mark of lore - case REP_FRIENDLY: - pCreature->CastSpell(pPlayer, 31808, true); - break; - case REP_HONORED: - pCreature->CastSpell(pPlayer, 31810, true); - break; - case REP_REVERED: - pCreature->CastSpell(pPlayer, 31811, true); - break; - case REP_EXALTED: - pCreature->CastSpell(pPlayer, 31815, true); - break; - } - } - - if (pCreature->GetEntry() == 17901) - { - switch (pPlayer->GetReputationRank(942)) //mark of war - { - case REP_FRIENDLY: - pCreature->CastSpell(pPlayer, 31807, true); - break; - case REP_HONORED: - pCreature->CastSpell(pPlayer, 31812, true); - break; - case REP_REVERED: - pCreature->CastSpell(pPlayer, 31813, true); - break; - case REP_EXALTED: - pCreature->CastSpell(pPlayer, 31814, true); - break; - } - } - - DoScriptText(SAY_REWARD_BLESS, pCreature, pPlayer); - pPlayer->CLOSE_GOSSIP_MENU(); - pPlayer->TalkedToCreature(pCreature->GetEntry(), pCreature->GetObjectGuid()); - } - return true; -} - /*###### ## npc_cooshcoosh ######*/ @@ -254,12 +175,6 @@ void AddSC_zangarmarsh() { Script* pNewScript; - pNewScript = new Script; - pNewScript->Name = "npcs_ashyen_and_keleth"; - pNewScript->pGossipHello = &GossipHello_npcs_ashyen_and_keleth; - pNewScript->pGossipSelect = &GossipSelect_npcs_ashyen_and_keleth; - pNewScript->RegisterSelf(); - pNewScript = new Script; pNewScript->Name = "npc_cooshcoosh"; pNewScript->GetAI = &GetAI_npc_cooshcoosh; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 5a34ce08d..f0ba5c72d 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2566" + #define SD2_REVISION_NR "2567" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index a82061cf2..4b1976c3f 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -722,7 +722,6 @@ UPDATE instance_template SET ScriptName='instance_pit_of_saron' WHERE map=658; UPDATE creature_template SET ScriptName='boss_forgemaster_garfrost' WHERE entry=36494; /* ICECROWN */ -UPDATE creature_template SET ScriptName='npc_dame_evniki_kapsalis' WHERE entry=34885; /* IRONFORGE */ UPDATE creature_template SET ScriptName='npc_royal_historian_archesonus' WHERE entry=8879; @@ -1326,7 +1325,6 @@ UPDATE gameobject_template SET ScriptName='go_elune_fire' WHERE entry IN (177417 /* ZANGARMARSH */ DELETE FROM scripted_event_id WHERE id=11225; INSERT INTO scripted_event_id VALUES (11225,'event_taxi_stormcrow'); -UPDATE creature_template SET ScriptName='npcs_ashyen_and_keleth' WHERE entry IN (17900,17901); UPDATE creature_template SET ScriptName='npc_cooshcoosh' WHERE entry=18586; UPDATE creature_template SET ScriptName='npc_kayra_longmane' WHERE entry=17969; diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 6fdc45cdb..e0932bea6 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -176,7 +176,7 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1000205,'%s looks at you unexpectadly.',0,2,0,0,'cluck EMOTE_H_HELLO'), (-1000206,'%s starts pecking at the feed.',0,2,0,0,'cluck EMOTE_CLUCK_TEXT2'), -(-1000207,'You have my blessing',0,0,0,0,'ashyen_and_keleth SAY_REWARD_BLESS'), +(-1000207,'REUSE ME',0,0,0,0,'REUSE ME'), (-1000208,'REUSE ME',0,0,0,0,'REUSE ME'), diff --git a/sql/updates/r2567_mangos.sql b/sql/updates/r2567_mangos.sql new file mode 100644 index 000000000..1d0fbafe1 --- /dev/null +++ b/sql/updates/r2567_mangos.sql @@ -0,0 +1,2 @@ +UPDATE creature_template SET ScriptName='' WHERE entry IN (17900,17901); +UPDATE creature_template SET ScriptName='' WHERE entry=34885; diff --git a/sql/updates/r2567_scriptdev2.sql b/sql/updates/r2567_scriptdev2.sql new file mode 100644 index 000000000..8cc415215 --- /dev/null +++ b/sql/updates/r2567_scriptdev2.sql @@ -0,0 +1,2 @@ +DELETE FROM script_texts WHERE entry IN (-1000207); +INSERT INTO script_texts (entry,content_default,comment) VALUES (-1000207,'REUSE ME','REUSE ME'); From df49cc8f6a5c21bdfa02605a8a9a98d248538de0 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Tue, 29 May 2012 22:19:26 +0300 Subject: [PATCH 0556/1172] [2568] Implement script support for King Ymiron - Utgarde Pinnacle This also includes support for achievement 2157 Notes: Spells 48385 and 48590 require core support Spells 48307 and 48316 should allow LoS casting (core issue) Also the spirit transform spells and 56864 require aura stacking exception --- .../utgarde_pinnacle/boss_ymiron.cpp | 346 +++++++++++++++++- .../instance_utgarde_pinnacle.cpp | 39 +- .../utgarde_pinnacle/utgarde_pinnacle.h | 20 +- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 3 + sql/updates/r2568_mangos.sql | 3 + 6 files changed, 407 insertions(+), 6 deletions(-) create mode 100644 sql/updates/r2568_mangos.sql diff --git a/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_ymiron.cpp b/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_ymiron.cpp index 184ef396c..da65f48eb 100644 --- a/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_ymiron.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_ymiron.cpp @@ -16,12 +16,13 @@ /* ScriptData SDName: Boss_Ymiron -SD%Complete: 20% -SDComment: +SD%Complete: 90% +SDComment: Timers SDCategory: Utgarde Pinnacle EndScriptData */ #include "precompiled.h" +#include "utgarde_pinnacle.h" enum { @@ -34,7 +35,66 @@ enum SAY_SLAY_2 = -1575037, SAY_SLAY_3 = -1575038, SAY_SLAY_4 = -1575039, - SAY_DEATH = -1575040 + SAY_DEATH = -1575040, + + SPELL_BANE = 48294, // sends script event 20651 when target is hit - set achiev to false + SPELL_BANE_H = 59301, + SPELL_DARK_SLASH = 48292, + SPELL_FETID_ROT = 48291, + SPELL_FETID_ROT_H = 59300, + SPELL_SCREAMS_OF_THE_DEAD = 51750, // knockback players to summon boat + //SPELL_CHOOSE_SPIRIT = 48306, // boss chooses spirit + + // blessings + SPELL_SPIRIT_BURST = 48529, // by Ranulf + SPELL_SPIRIT_BURST_H = 59305, + SPELL_SPIRIT_STRIKE = 48423, // by Haldor + SPELL_SPIRIT_STRIKE_H = 59304, + SPELL_SUMMON_SPIRIT_FOUNT = 48386, // by Bjorn + SPELL_SPIRIT_FOUNT_BEAM = 48385, // channeled beam on the spirit fount - triggers 48380 : 59320 on aura expire + SPELL_AVENGING_SPIRITS = 48590, // by Torgyn - has script effect - 48592 + + // visuals + SPELL_CHANNEL_YMIRON_SPIRIT = 48307, + SPELL_CHANNEL_SPIRIT_YMIRON = 48316, + SPELL_EMERGE_STATE = 56864, + SPELL_SPIRIT_DIES = 48596, // cast by a boat spirit + + // by summoned creatures + SPELL_SPIRIT_VISUAL = 48593, // avenging spirit summon visual + SPELL_WITHER_TRIGG = 48584, // aura for avenging spirits - triggers 48585 on melee + + // spirit transforms + SPELL_BJORN_TRANSFORM = 48308, + SPELL_HALDOR_TRANSFORM = 48311, + SPELL_RANULF_TRANSFORM = 48312, + SPELL_TORGYN_TRANSFORM = 48313, + + NPC_SPIRIT_FOUNT = 27339, + NPC_AVENGING_SPIRIT = 27386, + + MAX_BOATS = 4, + + PHASE_NO_BOAT = 0, + PHASE_BJORN = 1, + PHASE_HALDOR = 2, + PHASE_RANULF = 3, + PHASE_TORGYN = 4 +}; + +struct BoatSpirits +{ + uint32 uiSpiritSpell, uiSpiritTarget; + int32 iYellId; + uint8 uiBoatPhase; +}; + +static const BoatSpirits aYmironBoatsSpirits[MAX_BOATS] = +{ + {SPELL_BJORN_TRANSFORM, NPC_BJORN, SAY_SUMMON_BJORN, PHASE_BJORN}, + {SPELL_HALDOR_TRANSFORM, NPC_HALDOR, SAY_SUMMON_HALDOR, PHASE_HALDOR}, + {SPELL_RANULF_TRANSFORM, NPC_RANULF, SAY_SUMMON_RANULF, PHASE_RANULF}, + {SPELL_TORGYN_TRANSFORM, NPC_TORGYN, SAY_SUMMON_TORGYN, PHASE_TORGYN} }; /*###### @@ -47,19 +107,66 @@ struct MANGOS_DLL_DECL boss_ymironAI : public ScriptedAI { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); + + for (uint8 i = 0; i < MAX_BOATS; ++i) + m_vuiBoatPhases.push_back(i); + Reset(); } ScriptedInstance* m_pInstance; bool m_bIsRegularMode; + uint32 m_uiFetidRotTimer; + uint32 m_uiBaneTimer; + uint32 m_uiDarkSlashTimer; + uint32 m_uiSpiritTransformTimer; + uint32 m_uiCombatResumeTimer; + uint8 m_uiPhase; + uint8 m_uiBoats; + float m_fHealthCheck; + + uint32 m_uiSpiritBurstTimer; + uint32 m_uiSpiritStrikeTimer; + uint32 m_uiSpiritFountTimer; + uint32 m_uiAvengingSpiritsTimer; + + bool m_bIsChannelingSpirit; + + ObjectGuid m_uiCurrentSpiritGuid; + + std::vector m_vuiBoatPhases; + void Reset() { + m_uiFetidRotTimer = urand(8000, 13000); + m_uiBaneTimer = urand(18000, 23000); + m_uiDarkSlashTimer = urand(28000, 33000); + m_uiSpiritTransformTimer = 0; + m_uiCombatResumeTimer = 0; + m_uiPhase = PHASE_NO_BOAT; + m_uiBoats = 0; + m_fHealthCheck = m_bIsRegularMode ? 33.3f : 20.0f; + + m_uiSpiritBurstTimer = 10000; + m_uiSpiritStrikeTimer = 10000; + m_uiSpiritFountTimer = 10000; + m_uiAvengingSpiritsTimer = 10000; + + m_bIsChannelingSpirit = false; + + m_uiCurrentSpiritGuid.Clear(); + + // Randomize spirit order + std::random_shuffle(m_vuiBoatPhases.begin(), m_vuiBoatPhases.end()); } void Aggro(Unit* pWho) { DoScriptText(SAY_AGGRO, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_YMIRON, IN_PROGRESS); } void KilledUnit(Unit* pVictim) @@ -76,6 +183,85 @@ struct MANGOS_DLL_DECL boss_ymironAI : public ScriptedAI void JustDied(Unit* pKiller) { DoScriptText(SAY_DEATH, m_creature); + + // Burn the last spirit + if (Creature* pSpirit = m_creature->GetMap()->GetCreature(m_uiCurrentSpiritGuid)) + { + pSpirit->InterruptNonMeleeSpells(false); + pSpirit->CastSpell(pSpirit, SPELL_SPIRIT_DIES, false); + } + + if (m_pInstance) + m_pInstance->SetData(TYPE_YMIRON, DONE); + } + + void JustReachedHome() + { + DoResetSpirits(); + + if (m_pInstance) + m_pInstance->SetData(TYPE_YMIRON, FAIL); + } + + // Wrapper which handles the spirits reset + void DoResetSpirits() + { + if (!m_pInstance) + return; + + for (uint8 i = 0; i < MAX_BOATS; ++i) + { + if (Creature* pSpirit = m_pInstance->GetSingleCreatureFromStorage(aYmironBoatsSpirits[i].uiSpiritTarget)) + pSpirit->AI()->EnterEvadeMode(); + } + } + + void DoChannelSpiritYmiron() + { + if (Creature* pSpirit = m_creature->GetMap()->GetCreature(m_uiCurrentSpiritGuid)) + pSpirit->CastSpell(m_creature, SPELL_CHANNEL_SPIRIT_YMIRON, false); + + // Channeling is finished - resume combat + if (m_creature->getVictim()) + { + m_creature->GetMotionMaster()->Clear(); + m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); + } + + SetCombatMovement(true); + m_bIsChannelingSpirit = false; + + m_uiPhase = aYmironBoatsSpirits[m_vuiBoatPhases[m_uiBoats]].uiBoatPhase; + ++m_uiBoats; + } + + void JustSummoned(Creature* pSummoned) + { + switch(pSummoned->GetEntry()) + { + case NPC_SPIRIT_FOUNT: + DoCastSpellIfCan(pSummoned, SPELL_SPIRIT_FOUNT_BEAM, CAST_INTERRUPT_PREVIOUS); + break; + // ToDo: This needs further research and core support + //case NPC_AVENGING_SPIRIT: + // pSummoned->CastSpell(pSummoned, SPELL_SPIRIT_VISUAL, true); + // pSummoned->CastSpell(pSummoned, SPELL_WITHER_TRIGG, true); + // break; + } + } + + void MovementInform(uint32 uiMotionType, uint32 uiPointId) + { + if (uiMotionType != POINT_MOTION_TYPE || !uiPointId) + return; + + if (Creature* pSpirit = m_creature->GetMap()->GetCreature(m_uiCurrentSpiritGuid)) + { + DoCastSpellIfCan(pSpirit, SPELL_CHANNEL_YMIRON_SPIRIT); + DoScriptText(aYmironBoatsSpirits[m_vuiBoatPhases[m_uiBoats]].iYellId, m_creature); + m_uiSpiritTransformTimer = 3000; + m_uiCombatResumeTimer = 6000; + } } void UpdateAI(const uint32 uiDiff) @@ -83,6 +269,142 @@ struct MANGOS_DLL_DECL boss_ymironAI : public ScriptedAI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; + if (m_uiSpiritTransformTimer) + { + if (m_uiSpiritTransformTimer <= uiDiff) + { + if (Creature* pSpirit = m_creature->GetMap()->GetCreature(m_uiCurrentSpiritGuid)) + { + pSpirit->CastSpell(pSpirit, aYmironBoatsSpirits[m_vuiBoatPhases[m_uiBoats]].uiSpiritSpell, true); + pSpirit->CastSpell(pSpirit, SPELL_EMERGE_STATE, true); + } + m_uiSpiritTransformTimer = 0; + } + else + m_uiSpiritTransformTimer -= uiDiff; + } + + if (m_uiCombatResumeTimer) + { + // This should be done on aura 48307 remove, but because of lack of core support, we'll handle it on normal timer + if (m_uiCombatResumeTimer <= uiDiff) + { + DoChannelSpiritYmiron(); + m_uiCombatResumeTimer = 0; + } + else + m_uiCombatResumeTimer -= uiDiff; + } + + // Don't attack while channeling on the boats + if (m_bIsChannelingSpirit) + return; + + if (m_uiBaneTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_BANE : SPELL_BANE_H) == CAST_OK) + m_uiBaneTimer = urand(20000, 25000); + } + else + m_uiBaneTimer -= uiDiff; + + if (m_uiFetidRotTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), m_bIsRegularMode ? SPELL_FETID_ROT : SPELL_FETID_ROT_H) == CAST_OK) + m_uiFetidRotTimer = urand(10000, 15000); + } + else + m_uiFetidRotTimer -= uiDiff; + + if (m_uiDarkSlashTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_DARK_SLASH) == CAST_OK) + m_uiDarkSlashTimer = urand(30000, 35000); + } + else + m_uiDarkSlashTimer -= uiDiff; + + // Check the spirit phases (also don't allow him to change phase if below 1%) + if (m_creature->GetHealthPercent() < 100 - m_fHealthCheck && m_creature->GetHealthPercent() > 1.0f) + { + // change phase + DoCastSpellIfCan(m_creature, SPELL_SCREAMS_OF_THE_DEAD, CAST_INTERRUPT_PREVIOUS); + + // make the current spirit die (burn) + if (Creature* pSpirit = m_creature->GetMap()->GetCreature(m_uiCurrentSpiritGuid)) + { + pSpirit->InterruptNonMeleeSpells(false); + pSpirit->CastSpell(pSpirit, SPELL_SPIRIT_DIES, false); + } + + // Get a close point to the spirits and move near them + if (m_pInstance) + { + if (Creature* pSpirit = m_pInstance->GetSingleCreatureFromStorage(aYmironBoatsSpirits[m_vuiBoatPhases[m_uiBoats]].uiSpiritTarget)) + { + float fX, fY, fZ; + m_uiCurrentSpiritGuid = pSpirit->GetObjectGuid(); + pSpirit->GetContactPoint(m_creature, fX, fY, fZ, INTERACTION_DISTANCE); + m_creature->GetMotionMaster()->MovePoint(1, fX, fY, fZ); + } + } + + SetCombatMovement(false); + m_bIsChannelingSpirit = true; + m_fHealthCheck += m_bIsRegularMode ? 33.3f : 20.0f; + } + + switch (m_uiPhase) + { + case PHASE_BJORN: + + if (m_uiSpiritFountTimer) + { + if (m_uiSpiritFountTimer <= uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_SUMMON_SPIRIT_FOUNT) == CAST_OK) + m_uiSpiritFountTimer = 0; + } + else + m_uiSpiritFountTimer -= uiDiff; + } + + break; + case PHASE_HALDOR: + + if (m_uiSpiritStrikeTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), m_bIsRegularMode ? SPELL_SPIRIT_STRIKE : SPELL_SPIRIT_STRIKE_H) == CAST_OK) + m_uiSpiritStrikeTimer = 5000; + } + else + m_uiSpiritStrikeTimer -= uiDiff; + + break; + case PHASE_RANULF: + + if (m_uiSpiritBurstTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_SPIRIT_BURST : SPELL_SPIRIT_BURST_H) == CAST_OK) + m_uiSpiritBurstTimer = 10000; + } + else + m_uiSpiritBurstTimer -= uiDiff; + + break; + case PHASE_TORGYN: + + if (m_uiAvengingSpiritsTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_AVENGING_SPIRITS) == CAST_OK) + m_uiAvengingSpiritsTimer = 15000; + } + else + m_uiAvengingSpiritsTimer -= uiDiff; + + break; + } + DoMeleeAttackIfReady(); } }; @@ -92,6 +414,19 @@ CreatureAI* GetAI_boss_ymiron(Creature* pCreature) return new boss_ymironAI(pCreature); } +bool ProcessEventId_event_achiev_kings_bane(uint32 uiEventId, Object* pSource, Object* pTarget, bool bIsStart) +{ + if (instance_pinnacle* pInstance = (instance_pinnacle*)((Creature*)pSource)->GetInstanceData()) + { + if (pInstance->GetData(TYPE_YMIRON) != IN_PROGRESS) + return false; + + pInstance->SetData(TYPE_YMIRON, SPECIAL); + return true; + } + return false; +} + void AddSC_boss_ymiron() { Script* pNewScript; @@ -100,4 +435,9 @@ void AddSC_boss_ymiron() pNewScript->Name = "boss_ymiron"; pNewScript->GetAI = &GetAI_boss_ymiron; pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "event_achiev_kings_bane"; + pNewScript->pProcessEventId = &ProcessEventId_event_achiev_kings_bane; + pNewScript->RegisterSelf(); } diff --git a/scripts/northrend/utgarde_keep/utgarde_pinnacle/instance_utgarde_pinnacle.cpp b/scripts/northrend/utgarde_keep/utgarde_pinnacle/instance_utgarde_pinnacle.cpp index 2efeb0d25..0012f7b2c 100644 --- a/scripts/northrend/utgarde_keep/utgarde_pinnacle/instance_utgarde_pinnacle.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_pinnacle/instance_utgarde_pinnacle.cpp @@ -34,6 +34,19 @@ void instance_pinnacle::Initialize() memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); } +void instance_pinnacle::OnCreatureCreate(Creature* pCreature) +{ + switch(pCreature->GetEntry()) + { + case NPC_BJORN: + case NPC_HALDOR: + case NPC_RANULF: + case NPC_TORGYN: + m_mNpcEntryGuidStore[pCreature->GetEntry()] = pCreature->GetObjectGuid(); + break; + } +} + void instance_pinnacle::OnObjectCreate(GameObject* pGo) { switch(pGo->GetEntry()) @@ -41,9 +54,15 @@ void instance_pinnacle::OnObjectCreate(GameObject* pGo) case GO_DOOR_SKADI: if (m_auiEncounter[TYPE_SKADI] == DONE) pGo->SetGoState(GO_STATE_ACTIVE); - m_mGoEntryGuidStore[GO_DOOR_SKADI] = pGo->GetObjectGuid(); break; + case GO_DOOR_YMIRON: + if (m_auiEncounter[TYPE_YMIRON] == DONE) + pGo->SetGoState(GO_STATE_ACTIVE); + break; + default: + return; } + m_mGoEntryGuidStore[pGo->GetEntry()] = pGo->GetObjectGuid(); } void instance_pinnacle::SetData(uint32 uiType, uint32 uiData) @@ -63,6 +82,12 @@ void instance_pinnacle::SetData(uint32 uiType, uint32 uiData) m_auiEncounter[uiType] = uiData; break; case TYPE_YMIRON: + if (uiData == DONE) + DoUseDoorOrButton(GO_DOOR_YMIRON); + if (uiData == IN_PROGRESS) + m_bIsKingBane = true; + if (uiData == SPECIAL) + m_bIsKingBane = false; m_auiEncounter[uiType] = uiData; break; default: @@ -115,6 +140,18 @@ void instance_pinnacle::Load(const char* chrIn) OUT_LOAD_INST_DATA_COMPLETE; } +bool instance_pinnacle::CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/) +{ + switch (uiCriteriaId) + { + case ACHIEV_CRIT_KINGS_BANE: + return m_bIsKingBane; + + default: + return false; + } +} + InstanceData* GetInstanceData_instance_pinnacle(Map* pMap) { return new instance_pinnacle(pMap); diff --git a/scripts/northrend/utgarde_keep/utgarde_pinnacle/utgarde_pinnacle.h b/scripts/northrend/utgarde_keep/utgarde_pinnacle/utgarde_pinnacle.h index 05b9e5284..c5533b039 100644 --- a/scripts/northrend/utgarde_keep/utgarde_pinnacle/utgarde_pinnacle.h +++ b/scripts/northrend/utgarde_keep/utgarde_pinnacle/utgarde_pinnacle.h @@ -16,11 +16,24 @@ enum GO_STASIS_GENERATOR = 188593, GO_DOOR_SKADI = 192173, + GO_DOOR_YMIRON = 192174, NPC_FURBOLG = 26684, NPC_WORGEN = 26683, NPC_JORMUNGAR = 26685, - NPC_RHINO = 26686 + NPC_RHINO = 26686, + + // Ymiron spirits + NPC_BJORN = 27303, // front right + NPC_HALDOR = 27307, // front left + NPC_RANULF = 27308, // back left + NPC_TORGYN = 27309, // back right + + ACHIEV_CRIT_INCREDIBLE_HULK = 7322, // Svala, achiev - 2043 + ACHIEV_CRIT_GIRL_LOVES_SKADI = 7595, // Skadi, achiev - 2156 + ACHIEV_CRIT_KINGS_BANE = 7598, // Ymiron, achiev - 2157 + + ACHIEV_START_SKADI_ID = 17726, // Starts Skadi timed achiev - 1873 }; class MANGOS_DLL_DECL instance_pinnacle : public ScriptedInstance @@ -30,17 +43,22 @@ class MANGOS_DLL_DECL instance_pinnacle : public ScriptedInstance void Initialize(); + void OnCreatureCreate(Creature* pCreature); void OnObjectCreate(GameObject* pGo); void SetData(uint32 uiType, uint32 uiData); uint32 GetData(uint32 uiType); + bool CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/); + const char* Save() { return m_strInstData.c_str(); } void Load(const char* chrIn); private: uint32 m_auiEncounter[MAX_ENCOUNTER]; std::string m_strInstData; + + bool m_bIsKingBane; }; #endif diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index f0ba5c72d..d3692847a 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2567" + #define SD2_REVISION_NR "2568" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 4b1976c3f..5d738cfd2 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -1288,6 +1288,9 @@ DELETE FROM scripted_areatrigger WHERE entry=5140; INSERT INTO scripted_areatrigger VALUES (5140,'at_svala_intro'); UPDATE creature_template SET ScriptName='boss_ymiron' WHERE entry=26861; UPDATE instance_template SET ScriptName='instance_pinnacle' WHERE map=575; +DELETE FROM scripted_event_id WHERE id=20651; +INSERT INTO scripted_event_id VALUES +(20651,'event_achiev_kings_bane'); /* VAULT OF ARCHAVON */ diff --git a/sql/updates/r2568_mangos.sql b/sql/updates/r2568_mangos.sql new file mode 100644 index 000000000..9707d0274 --- /dev/null +++ b/sql/updates/r2568_mangos.sql @@ -0,0 +1,3 @@ +DELETE FROM scripted_event_id WHERE id=20651; +INSERT INTO scripted_event_id VALUES +(20651,'event_achiev_kings_bane'); From de57c8168badc68f93c01c406f4c336db4d910e9 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Tue, 29 May 2012 23:01:08 +0300 Subject: [PATCH 0557/1172] [2569] Implement combat abilities for Skadi the Ruthless - Utgarde Pinnacle --- .../utgarde_pinnacle/boss_skadi.cpp | 38 ++++++++++++++++++- sd2_revision_nr.h | 2 +- 2 files changed, 37 insertions(+), 3 deletions(-) diff --git a/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_skadi.cpp b/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_skadi.cpp index 63bb59401..6808d0f26 100644 --- a/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_skadi.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_skadi.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: Boss_Skadi -SD%Complete: 20% -SDComment: starts at trigger 4991 +SD%Complete: 30% +SDComment: Only combat abilities are implemented; Starts at trigger 4991 SDCategory: Utgarde Pinnacle EndScriptData */ @@ -74,8 +74,15 @@ struct MANGOS_DLL_DECL boss_skadiAI : public ScriptedAI ScriptedInstance* m_pInstance; bool m_bIsRegularMode; + uint32 m_uiCrush; + uint32 m_uiWhirlwind; + uint32 m_uiPoisonedSpear; + void Reset() { + m_uiCrush = 15000; + m_uiWhirlwind = 23000; + m_uiPoisonedSpear = 10000; } void JustReachedHome() @@ -112,6 +119,33 @@ struct MANGOS_DLL_DECL boss_skadiAI : public ScriptedAI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; + if (m_uiCrush < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), m_bIsRegularMode ? SPELL_CRUSH : SPELL_CRUSH_H) == CAST_OK) + m_uiCrush = urand(10000, 15000); + } + else + m_uiCrush -= uiDiff; + + if (m_uiWhirlwind < uiDiff) + { + if (DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_WHIRLWIND : SPELL_WHIRLWIND_H) == CAST_OK) + m_uiWhirlwind = 23000; + } + else + m_uiWhirlwind -= uiDiff; + + if (m_uiPoisonedSpear < uiDiff) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, m_bIsRegularMode ? SPELL_POISONED_SPEAR : SPELL_POISONED_SPEAR_H) == CAST_OK) + m_uiPoisonedSpear = urand(10000, 15000); + } + } + else + m_uiPoisonedSpear -= uiDiff; + DoMeleeAttackIfReady(); } }; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index d3692847a..72dc1c78c 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2568" + #define SD2_REVISION_NR "2569" #endif // __SD2_REVISION_NR_H__ From fc1be4a2da2a04e4c1b37af1b9676ad716449480 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Wed, 30 May 2012 21:11:46 +0300 Subject: [PATCH 0558/1172] [2570] Implement combat abilities for Svala Sorrowgrave - Utgarde Pinnacle Note: Spells 48258 and 48331 require additional research --- .../utgarde_pinnacle/boss_svala.cpp | 121 ++++++++++++++++-- .../instance_utgarde_pinnacle.cpp | 21 ++- .../utgarde_pinnacle/utgarde_pinnacle.h | 9 +- sd2_revision_nr.h | 2 +- 4 files changed, 135 insertions(+), 18 deletions(-) diff --git a/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_svala.cpp b/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_svala.cpp index 62308b0b4..0a8ba7a6b 100644 --- a/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_svala.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_svala.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: Boss_Svala -SD%Complete: 30% -SDComment: TODO: abilities. The way spells for intro works could use more research. +SD%Complete: 80% +SDComment: The way spells for intro work could use more research. SDCategory: Utgarde Pinnacle EndScriptData */ @@ -45,18 +45,29 @@ enum NPC_SVALA_SORROW = 26668, NPC_ARTHAS_IMAGE = 29280, + NPC_CHANNELER = 27281, + NPC_SCOURGE_HULK = 26555, // used to check the achiev SPELL_ARTHAS_VISUAL = 54134, - // don't know how these should work in relation to each other - SPELL_TRANSFORMING = 54205, - SPELL_TRANSFORMING_FLOATING = 54140, + SPELL_TRANSFORMING = 54205, // should also remove aura 54140 (script effect) + SPELL_TRANSFORMING_FLOATING = 54140, // triggers 54142 SPELL_TRANSFORMING_CHANNEL = 54142, - SPELL_RITUAL_OF_SWORD = 48276, - SPELL_CALL_FLAMES = 48258, + SPELL_RITUAL_OF_SWORD = 48276, // teleports the boss + SPELL_RITUAL_STRIKE = 48331, + SPELL_RITUAL_DISARM = 54159, + SPELL_CALL_FLAMES = 48258, // sends event 17841 - this makes npc 27273 cast 48246 SPELL_SINISTER_STRIKE = 15667, - SPELL_SINISTER_STRIKE_H = 59409 + SPELL_SINISTER_STRIKE_H = 59409, + + SPELL_SUMMON_CHANNELER_1 = 48271, + SPELL_SUMMON_CHANNELER_2 = 48274, + SPELL_SUMMON_CHANNELER_3 = 48275, + + // spells used by channelers + SPELL_PARALIZE = 48278, // should apply effect 48267 on target + SPELL_SHADOWS_IN_THE_DARK = 59407, }; /*###### @@ -67,13 +78,13 @@ struct MANGOS_DLL_DECL boss_svalaAI : public ScriptedAI { boss_svalaAI(Creature* pCreature) : ScriptedAI(pCreature) { - m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_pInstance = (instance_pinnacle*)pCreature->GetInstanceData(); m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); m_bIsIntroDone = false; Reset(); } - ScriptedInstance* m_pInstance; + instance_pinnacle* m_pInstance; bool m_bIsRegularMode; Creature* pArthas; @@ -82,6 +93,13 @@ struct MANGOS_DLL_DECL boss_svalaAI : public ScriptedAI uint32 m_uiIntroTimer; uint32 m_uiIntroCount; + uint32 m_uiSinisterStrikeTimer; + uint32 m_uiCallFlamesTimer; + uint32 m_uiRitualStrikeTimer; + bool m_bHasDoneRitual; + + ObjectGuid m_ritualTargetGuid; + void Reset() { pArthas = NULL; @@ -89,6 +107,11 @@ struct MANGOS_DLL_DECL boss_svalaAI : public ScriptedAI m_uiIntroTimer = 2500; m_uiIntroCount = 0; + m_uiSinisterStrikeTimer = 10000; + m_uiCallFlamesTimer = urand(10000, 20000); + m_uiRitualStrikeTimer = 0; + m_bHasDoneRitual = false; + if (m_creature->isAlive() && m_pInstance && m_pInstance->GetData(TYPE_SVALA) > IN_PROGRESS) { if (m_creature->GetEntry() != NPC_SVALA_SORROW) @@ -103,6 +126,9 @@ struct MANGOS_DLL_DECL boss_svalaAI : public ScriptedAI void JustReachedHome() { DoMoveToPosition(); + + if (m_pInstance) + m_pInstance->SetData(TYPE_SVALA, FAIL); } void MoveInLineOfSight(Unit* pWho) @@ -140,6 +166,14 @@ struct MANGOS_DLL_DECL boss_svalaAI : public ScriptedAI pArthas = pSummoned; pSummoned->SetFacingToObject(m_creature); } + else if (pSummoned->GetEntry() == NPC_CHANNELER) + { + if (!m_bIsRegularMode) + pSummoned->CastSpell(pSummoned, SPELL_SHADOWS_IN_THE_DARK, true); + + if (Unit* pTarget = m_creature->GetMap()->GetUnit(m_ritualTargetGuid)) + pSummoned->CastSpell(pTarget, SPELL_PARALIZE, true); + } } void SummonedCreatureDespawn(Creature* pDespawned) @@ -155,12 +189,17 @@ struct MANGOS_DLL_DECL boss_svalaAI : public ScriptedAI if (pArthas) pArthas->InterruptNonMeleeSpells(true); + m_creature->RemoveAurasDueToSpell(SPELL_TRANSFORMING_FLOATING); m_creature->UpdateEntry(NPC_SVALA_SORROW); } } void KilledUnit(Unit* pVictim) { + // set achiev to true if boss kills a hulk + if (pVictim->GetEntry() == NPC_SCOURGE_HULK && m_pInstance) + m_pInstance->SetSpecialAchievementCriteria(TYPE_ACHIEV_INCREDIBLE_HULK, true); + switch(urand(0, 2)) { case 0: DoScriptText(SAY_SLAY_1, m_creature); break; @@ -208,12 +247,12 @@ struct MANGOS_DLL_DECL boss_svalaAI : public ScriptedAI DoScriptText(SAY_INTRO_2_ARTHAS, pArthas); break; case 2: + DoCastSpellIfCan(m_creature, SPELL_TRANSFORMING_FLOATING); pArthas->CastSpell(m_creature, SPELL_TRANSFORMING_CHANNEL, false); - m_creature->CastSpell(m_creature, SPELL_TRANSFORMING_FLOATING, false); DoMoveToPosition(); break; case 3: - m_creature->CastSpell(m_creature, SPELL_TRANSFORMING, false); + DoCastSpellIfCan(m_creature, SPELL_TRANSFORMING); DoScriptText(SAY_INTRO_3, m_creature); break; case 4: @@ -221,6 +260,8 @@ struct MANGOS_DLL_DECL boss_svalaAI : public ScriptedAI break; case 5: DoScriptText(SAY_INTRO_5, m_creature); + break; + case 6: m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); m_bIsIntroDone = true; break; @@ -235,6 +276,62 @@ struct MANGOS_DLL_DECL boss_svalaAI : public ScriptedAI return; } + if (m_uiSinisterStrikeTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), m_bIsRegularMode ? SPELL_SINISTER_STRIKE : SPELL_SINISTER_STRIKE_H) == CAST_OK) + m_uiSinisterStrikeTimer = 10000; + } + else + m_uiSinisterStrikeTimer -= uiDiff; + + if (m_uiCallFlamesTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_CALL_FLAMES) == CAST_OK) + m_uiCallFlamesTimer = urand(10000, 20000); + } + else + m_uiCallFlamesTimer -= uiDiff; + + if (m_uiRitualStrikeTimer) + { + if (m_uiRitualStrikeTimer <= uiDiff) + { + DoCastSpellIfCan(m_creature, SPELL_RITUAL_STRIKE, CAST_INTERRUPT_PREVIOUS); + DoCastSpellIfCan(m_creature, SPELL_RITUAL_DISARM, CAST_TRIGGERED); + m_uiRitualStrikeTimer = 0; + } + else + m_uiRitualStrikeTimer -= uiDiff; + } + + // As from patch notes: Svala Sorrowgrave now casts Ritual of the Sword 1 time during the encounter, down from 3. + if (m_creature->GetHealthPercent() < 50.0f && !m_bHasDoneRitual) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0, SPELL_RITUAL_OF_SWORD, SELECT_FLAG_PLAYER)) + { + if (DoCastSpellIfCan(pTarget, SPELL_RITUAL_OF_SWORD) == CAST_OK) + { + m_ritualTargetGuid = pTarget->GetObjectGuid(); + + // summon channelers + DoCastSpellIfCan(m_creature, SPELL_SUMMON_CHANNELER_1, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_SUMMON_CHANNELER_2, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_SUMMON_CHANNELER_3, CAST_TRIGGERED); + + switch (urand(0, 3)) + { + case 0: DoScriptText(SAY_SACRIFICE_1, m_creature); break; + case 1: DoScriptText(SAY_SACRIFICE_2, m_creature); break; + case 2: DoScriptText(SAY_SACRIFICE_3, m_creature); break; + case 3: DoScriptText(SAY_SACRIFICE_4, m_creature); break; + } + + m_uiRitualStrikeTimer = 1000; + m_bHasDoneRitual = true; + } + } + } + DoMeleeAttackIfReady(); } }; diff --git a/scripts/northrend/utgarde_keep/utgarde_pinnacle/instance_utgarde_pinnacle.cpp b/scripts/northrend/utgarde_keep/utgarde_pinnacle/instance_utgarde_pinnacle.cpp index 0012f7b2c..0817a5b5e 100644 --- a/scripts/northrend/utgarde_keep/utgarde_pinnacle/instance_utgarde_pinnacle.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_pinnacle/instance_utgarde_pinnacle.cpp @@ -32,6 +32,9 @@ instance_pinnacle::instance_pinnacle(Map* pMap) : ScriptedInstance(pMap) void instance_pinnacle::Initialize() { memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); + + for (uint8 i = 0; i < MAX_SPECIAL_ACHIEV_CRITS; ++i) + m_abAchievCriteria[i] = false; } void instance_pinnacle::OnCreatureCreate(Creature* pCreature) @@ -70,6 +73,8 @@ void instance_pinnacle::SetData(uint32 uiType, uint32 uiData) switch (uiType) { case TYPE_SVALA: + if (uiData == IN_PROGRESS || uiData == FAIL) + SetSpecialAchievementCriteria(TYPE_ACHIEV_INCREDIBLE_HULK, false); m_auiEncounter[uiType] = uiData; break; case TYPE_GORTOK: @@ -85,9 +90,9 @@ void instance_pinnacle::SetData(uint32 uiType, uint32 uiData) if (uiData == DONE) DoUseDoorOrButton(GO_DOOR_YMIRON); if (uiData == IN_PROGRESS) - m_bIsKingBane = true; + SetSpecialAchievementCriteria(TYPE_ACHIEV_KINGS_BANE, true); if (uiData == SPECIAL) - m_bIsKingBane = false; + SetSpecialAchievementCriteria(TYPE_ACHIEV_KINGS_BANE, false); m_auiEncounter[uiType] = uiData; break; default: @@ -140,12 +145,22 @@ void instance_pinnacle::Load(const char* chrIn) OUT_LOAD_INST_DATA_COMPLETE; } +void instance_pinnacle::SetSpecialAchievementCriteria(uint32 uiType, bool bIsMet) +{ + if (uiType < MAX_SPECIAL_ACHIEV_CRITS) + m_abAchievCriteria[uiType] = bIsMet; +} + bool instance_pinnacle::CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/) { switch (uiCriteriaId) { + case ACHIEV_CRIT_INCREDIBLE_HULK: + return m_abAchievCriteria[TYPE_ACHIEV_INCREDIBLE_HULK]; + case ACHIEV_CRIT_GIRL_LOVES_SKADI: + return m_abAchievCriteria[TYPE_ACHIEV_LOVE_SKADI]; case ACHIEV_CRIT_KINGS_BANE: - return m_bIsKingBane; + return m_abAchievCriteria[TYPE_ACHIEV_KINGS_BANE]; default: return false; diff --git a/scripts/northrend/utgarde_keep/utgarde_pinnacle/utgarde_pinnacle.h b/scripts/northrend/utgarde_keep/utgarde_pinnacle/utgarde_pinnacle.h index c5533b039..fbf0bb1ce 100644 --- a/scripts/northrend/utgarde_keep/utgarde_pinnacle/utgarde_pinnacle.h +++ b/scripts/northrend/utgarde_keep/utgarde_pinnacle/utgarde_pinnacle.h @@ -8,12 +8,17 @@ enum { MAX_ENCOUNTER = 4, + MAX_SPECIAL_ACHIEV_CRITS = 3, TYPE_SVALA = 0, TYPE_GORTOK = 1, TYPE_SKADI = 2, TYPE_YMIRON = 3, + TYPE_ACHIEV_INCREDIBLE_HULK = 0, + TYPE_ACHIEV_LOVE_SKADI = 1, + TYPE_ACHIEV_KINGS_BANE = 2, + GO_STASIS_GENERATOR = 188593, GO_DOOR_SKADI = 192173, GO_DOOR_YMIRON = 192174, @@ -49,6 +54,7 @@ class MANGOS_DLL_DECL instance_pinnacle : public ScriptedInstance void SetData(uint32 uiType, uint32 uiData); uint32 GetData(uint32 uiType); + void SetSpecialAchievementCriteria(uint32 uiType, bool bIsMet); bool CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/); const char* Save() { return m_strInstData.c_str(); } @@ -56,9 +62,8 @@ class MANGOS_DLL_DECL instance_pinnacle : public ScriptedInstance private: uint32 m_auiEncounter[MAX_ENCOUNTER]; + bool m_abAchievCriteria[MAX_SPECIAL_ACHIEV_CRITS]; std::string m_strInstData; - - bool m_bIsKingBane; }; #endif diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 72dc1c78c..4575fdb70 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2569" + #define SD2_REVISION_NR "2570" #endif // __SD2_REVISION_NR_H__ From eeb82d9b2b5374974704f91cb49766f2940cdcbb Mon Sep 17 00:00:00 2001 From: Xfurry Date: Thu, 31 May 2012 00:50:14 +0300 Subject: [PATCH 0559/1172] [2571] Implement script for Gortok Palehoof event - Utgarde Pinnacle Note: Spell 47669 needs core fix - it must be positive and should have only 1 target --- .../utgarde_pinnacle/boss_gortok.cpp | 115 +++++++++++++++++- .../instance_utgarde_pinnacle.cpp | 114 ++++++++++++++++- .../utgarde_pinnacle/utgarde_pinnacle.h | 29 +++++ sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 12 +- sql/updates/r2571_mangos.sql | 4 + 6 files changed, 266 insertions(+), 10 deletions(-) create mode 100644 sql/updates/r2571_mangos.sql diff --git a/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_gortok.cpp b/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_gortok.cpp index b5a559ac6..3e4fbb5c7 100644 --- a/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_gortok.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_gortok.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: Boss_Gortok -SD%Complete: 20% -SDComment: +SD%Complete: 90% +SDComment: Timers; The subbosses and Gortok should be activated on aura remove SDCategory: Utgarde Pinnacle EndScriptData */ @@ -58,8 +58,18 @@ struct MANGOS_DLL_DECL boss_gortokAI : public ScriptedAI ScriptedInstance* m_pInstance; bool m_bIsRegularMode; + uint32 m_uiRoarTimer; + uint32 m_uiImpaleTimer; + uint32 m_uiArcingSmashTimer; + void Reset() { + m_uiRoarTimer = 10000; + m_uiImpaleTimer = 15000; + m_uiArcingSmashTimer = urand(5000, 8000); + + // This needs to be reset in case the event fails + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); } void Aggro(Unit* pWho) @@ -80,11 +90,44 @@ struct MANGOS_DLL_DECL boss_gortokAI : public ScriptedAI m_pInstance->SetData(TYPE_GORTOK, DONE); } + void JustReachedHome() + { + if (m_pInstance) + m_pInstance->SetData(TYPE_GORTOK, FAIL); + } + void UpdateAI(const uint32 uiDiff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; + if (m_uiRoarTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_WITHERING_ROAR : SPELL_WITHERING_ROAR_H) == CAST_OK) + m_uiRoarTimer = 10000; + } + else + m_uiRoarTimer -= uiDiff; + + if (m_uiImpaleTimer < uiDiff) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, m_bIsRegularMode ? SPELL_IMPALE : SPELL_IMPALE_H) == CAST_OK) + m_uiImpaleTimer = urand(8000, 15000); + } + } + else + m_uiImpaleTimer -= uiDiff; + + if (m_uiArcingSmashTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_ARCING_SMASH) == CAST_OK) + m_uiArcingSmashTimer = urand(5000, 13000); + } + else + m_uiArcingSmashTimer -= uiDiff; + DoMeleeAttackIfReady(); } }; @@ -94,6 +137,63 @@ CreatureAI* GetAI_boss_gortok(Creature* pCreature) return new boss_gortokAI(pCreature); } +bool EffectDummyCreature_spell_awaken_gortok(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) +{ + //always check spellid and effectindex + if (uiSpellId == SPELL_AWAKEN_GORTOK && uiEffIndex == EFFECT_INDEX_0) + { + pCreatureTarget->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + pCreatureTarget->RemoveAurasDueToSpell(SPELL_FREEZE_ANIM); + + // Start attacking the players + if (instance_pinnacle* pInstance = (instance_pinnacle*)pCreatureTarget->GetInstanceData()) + { + if (Unit* pStarter = pCreatureTarget->GetMap()->GetUnit(pInstance->GetGortokEventStarter())) + pCreatureTarget->AI()->AttackStart(pStarter); + } + + //always return true when we are handling this spell and effect + return true; + } + + return false; +} + +bool EffectAuraDummy_spell_aura_dummy_awaken_subboss(const Aura* pAura, bool bApply) +{ + // Note: this should be handled on aura remove, but this can't be done because there are some core issues with areaeffect spells + if (pAura->GetId() == SPELL_AWAKEN_SUBBOSS && pAura->GetEffIndex() == EFFECT_INDEX_0 && bApply) + { + if (Creature* pTarget = (Creature*)pAura->GetTarget()) + { + pTarget->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + pTarget->RemoveAurasDueToSpell(SPELL_FREEZE_ANIM); + + // Start attacking the players + if (instance_pinnacle* pInstance = (instance_pinnacle*)pTarget->GetInstanceData()) + { + if (Unit* pStarter = pTarget->GetMap()->GetUnit(pInstance->GetGortokEventStarter())) + pTarget->AI()->AttackStart(pStarter); + } + } + } + return true; +} + +bool ProcessEventId_event_spell_gortok_event(uint32 uiEventId, Object* pSource, Object* pTarget, bool bIsStart) +{ + if (instance_pinnacle* pInstance = (instance_pinnacle*)((Creature*)pSource)->GetInstanceData()) + { + if (pInstance->GetData(TYPE_GORTOK) == IN_PROGRESS || pInstance->GetData(TYPE_GORTOK) == DONE) + return false; + + pInstance->SetData(TYPE_GORTOK, IN_PROGRESS); + pInstance->SetGortokEventStarter(pSource->GetObjectGuid()); + return true; + } + return false; +} + void AddSC_boss_gortok() { Script* pNewScript; @@ -101,5 +201,16 @@ void AddSC_boss_gortok() pNewScript = new Script; pNewScript->Name = "boss_gortok"; pNewScript->GetAI = &GetAI_boss_gortok; + pNewScript->pEffectDummyNPC = &EffectDummyCreature_spell_awaken_gortok; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name="npc_gortok_subboss"; + pNewScript->pEffectAuraDummy = &EffectAuraDummy_spell_aura_dummy_awaken_subboss; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "event_spell_gortok_event"; + pNewScript->pProcessEventId = &ProcessEventId_event_spell_gortok_event; pNewScript->RegisterSelf(); } diff --git a/scripts/northrend/utgarde_keep/utgarde_pinnacle/instance_utgarde_pinnacle.cpp b/scripts/northrend/utgarde_keep/utgarde_pinnacle/instance_utgarde_pinnacle.cpp index 0817a5b5e..68635de01 100644 --- a/scripts/northrend/utgarde_keep/utgarde_pinnacle/instance_utgarde_pinnacle.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_pinnacle/instance_utgarde_pinnacle.cpp @@ -16,7 +16,7 @@ /* ScriptData SDName: instance_pinnacle -SD%Complete: 25% +SD%Complete: 75% SDComment: SDCategory: Utgarde Pinnacle EndScriptData */ @@ -24,7 +24,9 @@ EndScriptData */ #include "precompiled.h" #include "utgarde_pinnacle.h" -instance_pinnacle::instance_pinnacle(Map* pMap) : ScriptedInstance(pMap) +instance_pinnacle::instance_pinnacle(Map* pMap) : ScriptedInstance(pMap), + m_uiGortokOrbTimer(0), + m_uiGortokOrbPhase(0) { Initialize(); } @@ -41,12 +43,20 @@ void instance_pinnacle::OnCreatureCreate(Creature* pCreature) { switch(pCreature->GetEntry()) { + case NPC_FURBOLG: + case NPC_WORGEN: + case NPC_JORMUNGAR: + case NPC_RHINO: case NPC_BJORN: case NPC_HALDOR: case NPC_RANULF: case NPC_TORGYN: m_mNpcEntryGuidStore[pCreature->GetEntry()] = pCreature->GetObjectGuid(); break; + case NPC_WORLD_TRIGGER: + if (pCreature->GetPositionX() < 250.0f) + m_gortokEventTriggerGuid = pCreature->GetObjectGuid(); + break; } } @@ -78,6 +88,44 @@ void instance_pinnacle::SetData(uint32 uiType, uint32 uiData) m_auiEncounter[uiType] = uiData; break; case TYPE_GORTOK: + if (uiData == IN_PROGRESS) + { + if (Creature* pOrb = instance->GetCreature(m_gortokEventTriggerGuid)) + { + pOrb->SetLevitate(true); + pOrb->CastSpell(pOrb, SPELL_ORB_VISUAL, true); + pOrb->GetMotionMaster()->MovePoint(0, aOrbPositions[0][0], aOrbPositions[0][1], aOrbPositions[0][2]); + + m_uiGortokOrbTimer = 2000; + } + } + if (uiData == FAIL) + { + if (Creature* pOrb = instance->GetCreature(m_gortokEventTriggerGuid)) + { + if (!pOrb->isAlive()) + pOrb->Respawn(); + else + pOrb->RemoveAllAuras(); + + // For some reasone the Orb doesn't evade automatically + pOrb->GetMotionMaster()->MoveTargetedHome(); + } + + for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) + { + // Reset each miniboss + if (Creature* pTemp = GetSingleCreatureFromStorage(aGortokMiniBosses[i])) + { + if (!pTemp->isAlive()) + pTemp->Respawn(); + + pTemp->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + } + } + + m_uiGortokOrbPhase = 0; + } m_auiEncounter[uiType] = uiData; break; case TYPE_SKADI: @@ -167,6 +215,68 @@ bool instance_pinnacle::CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player } } +void instance_pinnacle::OnCreatureEvade(Creature* pCreature) +{ + switch(pCreature->GetEntry()) + { + case NPC_FURBOLG: + case NPC_WORGEN: + case NPC_JORMUNGAR: + case NPC_RHINO: + SetData(TYPE_GORTOK, FAIL); + break; + } +} + +void instance_pinnacle::OnCreatureDeath(Creature* pCreature) +{ + switch(pCreature->GetEntry()) + { + case NPC_FURBOLG: + case NPC_WORGEN: + case NPC_JORMUNGAR: + case NPC_RHINO: + m_uiGortokOrbTimer = 3000; + break; + } +} + +void instance_pinnacle::Update(uint32 const uiDiff) +{ + if (m_uiGortokOrbTimer) + { + if (m_uiGortokOrbTimer <= uiDiff) + { + if (!m_uiGortokOrbPhase) + { + if (Creature* pOrb = instance->GetCreature(m_gortokEventTriggerGuid)) + pOrb->GetMotionMaster()->MovePoint(0, aOrbPositions[1][0], aOrbPositions[1][1], aOrbPositions[1][2]); + + m_uiGortokOrbTimer = 18000; + } + // Awaken Gortok if this is the last phase + else + { + uint8 uiMaxOrbPhase = instance->IsRegularDifficulty() ? 3 : 5; + uint32 uiSpellId = m_uiGortokOrbPhase == uiMaxOrbPhase ? SPELL_AWAKEN_GORTOK : SPELL_AWAKEN_SUBBOSS; + + if (Creature* pOrb = instance->GetCreature(m_gortokEventTriggerGuid)) + { + pOrb->CastSpell(pOrb, uiSpellId, false); + + if (m_uiGortokOrbPhase == uiMaxOrbPhase) + pOrb->ForcedDespawn(10000); + } + + m_uiGortokOrbTimer = 0; + } + ++m_uiGortokOrbPhase; + } + else + m_uiGortokOrbTimer -= uiDiff; + } +} + InstanceData* GetInstanceData_instance_pinnacle(Map* pMap) { return new instance_pinnacle(pMap); diff --git a/scripts/northrend/utgarde_keep/utgarde_pinnacle/utgarde_pinnacle.h b/scripts/northrend/utgarde_keep/utgarde_pinnacle/utgarde_pinnacle.h index fbf0bb1ce..a16f154ad 100644 --- a/scripts/northrend/utgarde_keep/utgarde_pinnacle/utgarde_pinnacle.h +++ b/scripts/northrend/utgarde_keep/utgarde_pinnacle/utgarde_pinnacle.h @@ -23,6 +23,8 @@ enum GO_DOOR_SKADI = 192173, GO_DOOR_YMIRON = 192174, + NPC_WORLD_TRIGGER = 22515, + NPC_FURBOLG = 26684, NPC_WORGEN = 26683, NPC_JORMUNGAR = 26685, @@ -39,8 +41,21 @@ enum ACHIEV_CRIT_KINGS_BANE = 7598, // Ymiron, achiev - 2157 ACHIEV_START_SKADI_ID = 17726, // Starts Skadi timed achiev - 1873 + + // Gortok event spells + SPELL_ORB_VISUAL = 48044, + SPELL_AWAKEN_SUBBOSS = 47669, + SPELL_AWAKEN_GORTOK = 47670, +}; + +static const float aOrbPositions[2][3] = +{ + {238.6077f, -460.7103f, 112.5671f}, // Orb lift up + {279.26f, -452.1f, 110.0f}, // Orb center stop }; +static const uint32 aGortokMiniBosses[MAX_ENCOUNTER] = {NPC_WORGEN, NPC_FURBOLG, NPC_JORMUNGAR, NPC_RHINO}; + class MANGOS_DLL_DECL instance_pinnacle : public ScriptedInstance { public: @@ -51,19 +66,33 @@ class MANGOS_DLL_DECL instance_pinnacle : public ScriptedInstance void OnCreatureCreate(Creature* pCreature); void OnObjectCreate(GameObject* pGo); + void OnCreatureEvade(Creature* pCreature); + void OnCreatureDeath(Creature* pCreature); + void SetData(uint32 uiType, uint32 uiData); uint32 GetData(uint32 uiType); void SetSpecialAchievementCriteria(uint32 uiType, bool bIsMet); bool CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/); + void SetGortokEventStarter(ObjectGuid playerGuid) { m_gortokEventStarterGuid = playerGuid; } + ObjectGuid GetGortokEventStarter() { return m_gortokEventStarterGuid; } + const char* Save() { return m_strInstData.c_str(); } void Load(const char* chrIn); + void Update(uint32 uiDiff); + private: uint32 m_auiEncounter[MAX_ENCOUNTER]; bool m_abAchievCriteria[MAX_SPECIAL_ACHIEV_CRITS]; std::string m_strInstData; + + uint32 m_uiGortokOrbTimer; + uint8 m_uiGortokOrbPhase; + + ObjectGuid m_gortokEventTriggerGuid; + ObjectGuid m_gortokEventStarterGuid; }; #endif diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 4575fdb70..6a1fa2bfd 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2570" + #define SD2_REVISION_NR "2571" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 5d738cfd2..1ef773b21 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -1280,16 +1280,18 @@ UPDATE creature_template SET ScriptName='mob_vrykul_skeleton' WHERE entry=23970; /* UTGARDE PINNACLE */ UPDATE creature_template SET ScriptName='boss_gortok' WHERE entry=26687; -DELETE FROM scripted_areatrigger WHERE entry=4991; -INSERT INTO scripted_areatrigger VALUES (4991,'at_skadi'); +UPDATE creature_template SET ScriptName='npc_gortok_subboss' WHERE entry IN (26683,26684,26685,26686); UPDATE creature_template SET ScriptName='boss_skadi' WHERE entry=26693; UPDATE creature_template SET ScriptName='boss_svala' WHERE entry=29281; -DELETE FROM scripted_areatrigger WHERE entry=5140; -INSERT INTO scripted_areatrigger VALUES (5140,'at_svala_intro'); UPDATE creature_template SET ScriptName='boss_ymiron' WHERE entry=26861; UPDATE instance_template SET ScriptName='instance_pinnacle' WHERE map=575; -DELETE FROM scripted_event_id WHERE id=20651; +DELETE FROM scripted_areatrigger WHERE entry IN (4991,5140); +INSERT INTO scripted_areatrigger VALUES +(4991,'at_skadi'), +(5140,'at_svala_intro'); +DELETE FROM scripted_event_id WHERE id IN (17728,20651); INSERT INTO scripted_event_id VALUES +(17728,'event_spell_gortok_event'), (20651,'event_achiev_kings_bane'); /* VAULT OF ARCHAVON */ diff --git a/sql/updates/r2571_mangos.sql b/sql/updates/r2571_mangos.sql new file mode 100644 index 000000000..81c929143 --- /dev/null +++ b/sql/updates/r2571_mangos.sql @@ -0,0 +1,4 @@ +UPDATE creature_template SET ScriptName='npc_gortok_subboss' WHERE entry IN (26683,26684,26685,26686); +DELETE FROM scripted_event_id WHERE id IN (17728); +INSERT INTO scripted_event_id VALUES +(17728,'event_spell_gortok_event'); From 4ba72eb1dae0cb16ff5b766c897d76b980ec1159 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Thu, 31 May 2012 01:58:19 +0300 Subject: [PATCH 0560/1172] [2572] Implement script support for Achievements 2040 and 2152 - Gundrak --- scripts/northrend/gundrak/boss_galdarah.cpp | 11 +++--- scripts/northrend/gundrak/boss_moorabi.cpp | 4 +++ scripts/northrend/gundrak/gundrak.h | 17 ++++++++++ .../northrend/gundrak/instance_gundrak.cpp | 34 ++++++++++++++++++- sd2_revision_nr.h | 2 +- 5 files changed, 62 insertions(+), 6 deletions(-) diff --git a/scripts/northrend/gundrak/boss_galdarah.cpp b/scripts/northrend/gundrak/boss_galdarah.cpp index 53f913b37..7d521560e 100644 --- a/scripts/northrend/gundrak/boss_galdarah.cpp +++ b/scripts/northrend/gundrak/boss_galdarah.cpp @@ -39,9 +39,6 @@ enum EMOTE_IMPALED = -1604030, - ACHIEVEMENT_WHAT_THE_ECK = 1864, - ACHIEVEMENT_SHARE_THE_LOVE = 2152, - NPC_RHINO_SPIRIT = 29791, SPELL_STAMPEDE_RHINO = 55220, SPELL_STAMPEDE_RHINO_H = 59823, @@ -136,8 +133,14 @@ struct MANGOS_DLL_DECL boss_galdarahAI : public ScriptedAI { if (pSummoned->GetEntry() == NPC_RHINO_SPIRIT) { - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1)) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1, m_bIsRegularMode ? SPELL_STAMPEDE_RHINO : SPELL_STAMPEDE_RHINO_H, SELECT_FLAG_PLAYER)) + { pSummoned->CastSpell(pTarget, m_bIsRegularMode ? SPELL_STAMPEDE_RHINO : SPELL_STAMPEDE_RHINO_H, false, NULL, NULL, m_creature->GetObjectGuid()); + + // Store the player guid in order to count it for the achievement + if (m_pInstance) + m_pInstance->SetData(TYPE_ACHIEV_SHARE_LOVE, pTarget->GetGUIDLow()); + } } } diff --git a/scripts/northrend/gundrak/boss_moorabi.cpp b/scripts/northrend/gundrak/boss_moorabi.cpp index a0c65b377..339a3d1bd 100644 --- a/scripts/northrend/gundrak/boss_moorabi.cpp +++ b/scripts/northrend/gundrak/boss_moorabi.cpp @@ -121,6 +121,10 @@ struct MANGOS_DLL_DECL boss_moorabiAI : public ScriptedAI { DoScriptText(EMOTE_TRANSFORMED, m_creature); m_bMammothPhase = true; + + // Set the achievement to failed + if (m_pInstance) + m_pInstance->SetLessRabiAchievementCriteria(false); } if (m_uiRoarTimer < uiDiff) diff --git a/scripts/northrend/gundrak/gundrak.h b/scripts/northrend/gundrak/gundrak.h index b957c4f0f..e0810874a 100644 --- a/scripts/northrend/gundrak/gundrak.h +++ b/scripts/northrend/gundrak/gundrak.h @@ -14,6 +14,7 @@ enum { MAX_ENCOUNTER = 5, + MIN_LOVE_SHARE_PLAYERS = 5, TYPE_SLADRAN = 0, TYPE_MOORABI = 1, @@ -21,6 +22,10 @@ enum TYPE_GALDARAH = 3, TYPE_ECK = 4, + // Used to handle achievements + TYPE_ACHIEV_WHY_SNAKES = 5, + TYPE_ACHIEV_SHARE_LOVE = 6, + NPC_SLADRAN = 29304, NPC_MOORABI = 29305, NPC_COLOSSUS = 29307, @@ -55,6 +60,10 @@ enum TIMER_VISUAL_ALTAR = 3000, TIMER_VISUAL_BEAM = 2500, TIMER_VISUAL_KEY = 2000, + + ACHIEV_CRIT_LESS_RABI = 7319, // Moorabi achiev 2040 + ACHIEV_CRIT_WHY_SNAKES = 7363, // Sladran achiev 2058 + ACHIEV_CRIT_SHARE_LOVE = 7583, // Galdarah achiev 2152 }; typedef std::map TypeTimerMap; @@ -77,6 +86,9 @@ class MANGOS_DLL_DECL instance_gundrak : public ScriptedInstance const char* Save() { return m_strInstData.c_str(); } void Load(const char* chrIn); + void SetLessRabiAchievementCriteria(bool bIsMet) { m_bLessRabi = bIsMet; } + bool CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/); + void Update(uint32 uiDiff); protected: @@ -91,6 +103,11 @@ class MANGOS_DLL_DECL instance_gundrak : public ScriptedInstance GUIDList m_luiStalkerGUIDs; GUIDVector m_vStalkerCasterGuids; GUIDVector m_vStalkerTargetGuids; + + bool m_bLessRabi; + + std::set m_uisShareLoveAchievPlayers; + std::set m_uisWhySnakesAchievPlayers; }; #endif diff --git a/scripts/northrend/gundrak/instance_gundrak.cpp b/scripts/northrend/gundrak/instance_gundrak.cpp index 6081b706b..5b621486e 100644 --- a/scripts/northrend/gundrak/instance_gundrak.cpp +++ b/scripts/northrend/gundrak/instance_gundrak.cpp @@ -42,7 +42,8 @@ bool GOUse_go_gundrak_altar(Player* pPlayer, GameObject* pGo) return true; } -instance_gundrak::instance_gundrak(Map* pMap) : ScriptedInstance(pMap) +instance_gundrak::instance_gundrak(Map* pMap) : ScriptedInstance(pMap), + m_bLessRabi(false) { Initialize(); } @@ -182,6 +183,8 @@ void instance_gundrak::SetData(uint32 uiType, uint32 uiData) if (GameObject* pGo = GetSingleGameObjectFromStorage(GO_ALTAR_OF_MOORABI)) pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NO_INTERACT); } + if (uiData == IN_PROGRESS) + SetLessRabiAchievementCriteria(true); if (uiData == SPECIAL) m_mAltarInProgress.insert(TypeTimerPair(TYPE_MOORABI, TIMER_VISUAL_ALTAR)); break; @@ -207,6 +210,16 @@ void instance_gundrak::SetData(uint32 uiType, uint32 uiData) if (uiData == DONE) DoUseDoorOrButton(GO_ECK_UNDERWATER_DOOR); break; + case TYPE_ACHIEV_WHY_SNAKES: + // insert the players who failed the achiev and haven't been already inserted in the set + if (m_uisWhySnakesAchievPlayers.find(uiData) == m_uisWhySnakesAchievPlayers.end()) + m_uisWhySnakesAchievPlayers.insert(uiData); + break; + case TYPE_ACHIEV_SHARE_LOVE: + // insert players who got stampeled and haven't been already inserted in the set + if (m_uisShareLoveAchievPlayers.find(uiData) == m_uisShareLoveAchievPlayers.end()) + m_uisShareLoveAchievPlayers.insert(uiData); + break; default: error_log("SD2: Instance Gundrak: ERROR SetData = %u for type %u does not exist/not implemented.", uiType, uiData); return; @@ -235,6 +248,25 @@ uint32 instance_gundrak::GetData(uint32 uiType) return 0; } +bool instance_gundrak::CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/) +{ + switch (uiCriteriaId) + { + case ACHIEV_CRIT_LESS_RABI: + return m_bLessRabi; + case ACHIEV_CRIT_SHARE_LOVE: + // Return true if all the players in the group got stampeled + return m_uisShareLoveAchievPlayers.size() == MIN_LOVE_SHARE_PLAYERS; + // ToDo: enable this criteria when the script will be implemented + //case ACHIEV_CRIT_WHY_SNAKES: + // // Return true if not found in the set + // return m_uisWhySnakesAchievPlayers.find(pSource->GetGUIDLow()) == m_uisWhySnakesAchievPlayers.end(); + + default: + return false; + } +} + static bool sortFromEastToWest(Creature* pFirst, Creature* pSecond) { return pFirst && pSecond && pFirst->GetPositionY() < pSecond->GetPositionY(); diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 6a1fa2bfd..61d2d666e 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2571" + #define SD2_REVISION_NR "2572" #endif // __SD2_REVISION_NR_H__ From a41e7fdb933353676b6929f42cdab9c6293c14a4 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Thu, 31 May 2012 22:17:28 +0300 Subject: [PATCH 0561/1172] [2573] Implement script support for Drakari Colossus - Gundrak --- scripts/northrend/gundrak/boss_colossus.cpp | 321 ++++++++++++++++-- scripts/northrend/gundrak/boss_galdarah.cpp | 2 +- scripts/northrend/gundrak/boss_sladran.cpp | 6 + scripts/northrend/gundrak/gundrak.h | 3 + .../northrend/gundrak/instance_gundrak.cpp | 38 +++ sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 4 +- sql/updates/r2573_mangos.sql | 3 + 8 files changed, 353 insertions(+), 26 deletions(-) create mode 100644 sql/updates/r2573_mangos.sql diff --git a/scripts/northrend/gundrak/boss_colossus.cpp b/scripts/northrend/gundrak/boss_colossus.cpp index e3f2a82e2..a50b38831 100644 --- a/scripts/northrend/gundrak/boss_colossus.cpp +++ b/scripts/northrend/gundrak/boss_colossus.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: Boss_Colossus -SD%Complete: 20% -SDComment: +SD%Complete: 95% +SDComment: Timers; May need small adjustments SDCategory: Gundrak EndScriptData */ @@ -31,6 +31,7 @@ enum EMOTE_GLOW = -1604010, // collosus' abilities + SPELL_FREEZE_ANIM = 16245, // Colossus stun aura SPELL_EMERGE = 54850, SPELL_MIGHTY_BLOW = 54719, SPELL_MORTAL_STRIKES = 54715, @@ -40,16 +41,119 @@ enum SPELL_MERGE = 54878, SPELL_SURGE = 54801, SPELL_MOJO_VOLLEY = 59453, - SPELL_MOJO_VOLLEY_H = 54849 + SPELL_MOJO_VOLLEY_H = 54849, + + // Living Mojo spells + SPELL_MOJO_WAVE = 55626, + SPELL_MOJO_WAVE_H = 58993, + SPELL_MOJO_PUDDLE = 55627, + SPELL_MOJO_PUDDLE_H = 58994, + + MAX_COLOSSUS_MOJOS = 5, +}; + +/*###### +## boss_drakkari_elemental +######*/ + +struct MANGOS_DLL_DECL boss_drakkari_elementalAI : public ScriptedAI +{ + boss_drakkari_elementalAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (instance_gundrak*)pCreature->GetInstanceData(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); + Reset(); + } + + instance_gundrak* m_pInstance; + bool m_bIsRegularMode; + bool m_bIsFirstEmerge; + + uint32 m_uiSurgeTimer; + + void Reset() + { + m_bIsFirstEmerge = true; + m_uiSurgeTimer = urand(9000, 13000); + } + + void Aggro(Unit* pWho) + { + DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_MOJO_VOLLEY : SPELL_MOJO_VOLLEY_H); + } + + void DamageTaken(Unit* pDoneBy, uint32& uiDamage) + { + if (!m_bIsFirstEmerge) + return; + + if (m_creature->GetHealthPercent() < 50.0f) + { + DoCastSpellIfCan(m_creature, SPELL_MERGE, CAST_INTERRUPT_PREVIOUS); + m_bIsFirstEmerge = false; + } + } + + void JustReachedHome() + { + if (m_pInstance) + { + if (Creature* pColossus = m_pInstance->GetSingleCreatureFromStorage(NPC_COLOSSUS)) + pColossus->AI()->EnterEvadeMode(); + } + + m_creature->ForcedDespawn(); + } + + void JustDied(Unit* pKiller) + { + if (m_pInstance) + { + // kill colossus on death - this will finish the encounter + if (Creature* pColossus = m_pInstance->GetSingleCreatureFromStorage(NPC_COLOSSUS)) + pColossus->DealDamage(pColossus, pColossus->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + } + } + + // Set the second emerge of the Elemental + void DoPrepareSecondEmerge() + { + m_bIsFirstEmerge = false; + m_creature->SetHealth(m_creature->GetMaxHealth()*.5); + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_uiSurgeTimer < uiDiff) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, SPELL_SURGE) == CAST_OK) + m_uiSurgeTimer = urand(12000, 17000); + } + } + else + m_uiSurgeTimer -= uiDiff; + + DoMeleeAttackIfReady(); + } }; +CreatureAI* GetAI_boss_drakkari_elemental(Creature* pCreature) +{ + return new boss_drakkari_elementalAI(pCreature); +} + /*###### -## boss_colossus +## boss_drakkari_colossus ######*/ -struct MANGOS_DLL_DECL boss_colossusAI : public ScriptedAI +struct MANGOS_DLL_DECL boss_drakkari_colossusAI : public ScriptedAI { - boss_colossusAI(Creature* pCreature) : ScriptedAI(pCreature) + boss_drakkari_colossusAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (instance_gundrak*)pCreature->GetInstanceData(); m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); @@ -61,14 +165,23 @@ struct MANGOS_DLL_DECL boss_colossusAI : public ScriptedAI bool m_bFirstEmerge; uint32 m_uiMightyBlowTimer; + uint32 m_uiColossusStartTimer; + uint8 m_uiMojosGathered; void Reset() { - m_bFirstEmerge = false; + m_bFirstEmerge = true; m_uiMightyBlowTimer = 10000; + m_uiColossusStartTimer = 0; + m_uiMojosGathered = 0; + + // Reset unit flags + SetCombatMovement(true); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PASSIVE); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); } - void Agrro() + void Aggro(Unit* pWho) { DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_MORTAL_STRIKES : SPELL_MORTAL_STRIKES_H); @@ -82,11 +195,24 @@ struct MANGOS_DLL_DECL boss_colossusAI : public ScriptedAI m_pInstance->SetData(TYPE_COLOSSUS, DONE); } + void JustReachedHome() + { + if (m_pInstance) + m_pInstance->SetData(TYPE_COLOSSUS, FAIL); + } + void SpellHit(Unit* pCaster, const SpellEntry* pSpell) { if (pSpell->Id == SPELL_MERGE) { // re-activate colossus here + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + m_creature->RemoveAurasDueToSpell(SPELL_FREEZE_ANIM); + + SetCombatMovement(true); + m_creature->GetMotionMaster()->Clear(); + m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); + ((Creature*)pCaster)->ForcedDespawn(); } } @@ -94,30 +220,68 @@ struct MANGOS_DLL_DECL boss_colossusAI : public ScriptedAI { if (pSummoned->GetEntry() == NPC_ELEMENTAL) { - // handle elemental stuff + // If this is the second summon, then set the health to half + if (!m_bFirstEmerge) + { + if (boss_drakkari_elementalAI* pBossAI = dynamic_cast(pSummoned->AI())) + pBossAI->DoPrepareSecondEmerge(); + } + + m_bFirstEmerge = false; + if (m_creature->getVictim()) + pSummoned->AI()->AttackStart(m_creature->getVictim()); } } void DamageTaken(Unit* pDoneBy, uint32& uiDamage) { - if (!m_bFirstEmerge && m_creature->GetHealthPercent() < 50.0f) + if (m_bFirstEmerge && m_creature->GetHealthPercent() < 50.0f) + DoEmergeElemental(); + else if (uiDamage >= m_creature->GetHealth()) { - m_bFirstEmerge = true; - DoCastSpellIfCan(m_creature, SPELL_EMERGE); + uiDamage = 0; + DoEmergeElemental(); } - else if (m_creature->GetHealth() - uiDamage <= 0) + } + + void DoEmergeElemental() + { + // Avoid casting the merge spell twice + if (m_creature->HasAura(SPELL_FREEZE_ANIM)) + return; + + if (DoCastSpellIfCan(m_creature, SPELL_EMERGE, CAST_INTERRUPT_PREVIOUS) == CAST_OK) { - // prevent boss from dying if players deal the final blow - if (pDoneBy->GetCharmerOrOwnerPlayerOrPlayerItself()) - { - uiDamage = 0; - DoCastSpellIfCan(m_creature, SPELL_EMERGE); - } + SetCombatMovement(false); + m_creature->GetMotionMaster()->MoveIdle(); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + DoCastSpellIfCan(m_creature, SPELL_FREEZE_ANIM, CAST_TRIGGERED); } } + // Wrapper to prepare the Colossus + void DoPrepareColossus() + { + ++m_uiMojosGathered; + + if (m_uiMojosGathered == MAX_COLOSSUS_MOJOS) + m_uiColossusStartTimer = 1000; + } + void UpdateAI(const uint32 uiDiff) { + if (m_uiColossusStartTimer) + { + if (m_uiColossusStartTimer <= uiDiff) + { + m_creature->RemoveAurasDueToSpell(SPELL_FREEZE_ANIM); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PASSIVE); + m_uiColossusStartTimer = 0; + } + else + m_uiColossusStartTimer -= uiDiff; + } + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -133,17 +297,128 @@ struct MANGOS_DLL_DECL boss_colossusAI : public ScriptedAI } }; -CreatureAI* GetAI_boss_colossus(Creature* pCreature) +CreatureAI* GetAI_boss_drakkari_colossus(Creature* pCreature) { - return new boss_colossusAI(pCreature); + return new boss_drakkari_colossusAI(pCreature); } +/*###### +## npc_living_mojo +######*/ + +struct MANGOS_DLL_DECL npc_living_mojoAI : public ScriptedAI +{ + npc_living_mojoAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); + m_pInstance = (instance_gundrak*)pCreature->GetInstanceData(); + m_bIsPartOfColossus = pCreature->GetPositionX() > 1650.0f ? true : false; + Reset(); + } + + instance_gundrak* m_pInstance; + bool m_bIsRegularMode; + bool m_bIsPartOfColossus; + + uint32 m_uiMojoWaveTimer; + + void Reset() + { + m_uiMojoWaveTimer = urand(10000, 13000); + } + + void AttackStart(Unit* pWho) + { + // Don't attack if is part of the Colossus event + if (m_bIsPartOfColossus) + return; + + ScriptedAI::AttackStart(pWho); + } + + void MovementInform(uint32 uiType, uint32 uiPointId) + { + if (uiType != POINT_MOTION_TYPE) + return; + + if (uiPointId) + { + m_creature->ForcedDespawn(1000); + + if (m_pInstance) + { + // Prepare to set the Colossus in combat + if (Creature* pColossus = m_pInstance->GetSingleCreatureFromStorage(NPC_COLOSSUS)) + { + if (boss_drakkari_colossusAI* pBossAI = dynamic_cast(pColossus->AI())) + pBossAI->DoPrepareColossus(); + } + } + } + } + + void EnterEvadeMode() + { + if (!m_bIsPartOfColossus) + ScriptedAI::EnterEvadeMode(); + // Force the Mojo to move to the Colossus position + else + { + if (m_pInstance) + { + float fX, fY, fZ; + if (Creature* pColossus = m_pInstance->GetSingleCreatureFromStorage(NPC_COLOSSUS)) + pColossus->GetPosition(fX, fY, fZ); + + m_creature->SetWalk(false); + m_creature->GetMotionMaster()->MovePoint(1, fX, fY, fZ); + } + } + } + + void JustDied(Unit* pKiller) + { + DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_MOJO_PUDDLE : SPELL_MOJO_PUDDLE_H, CAST_TRIGGERED); + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_uiMojoWaveTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_MOJO_WAVE : SPELL_MOJO_WAVE_H) == CAST_OK) + m_uiMojoWaveTimer = urand(15000, 18000); + } + else + m_uiMojoWaveTimer -= uiDiff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_npc_living_mojo(Creature* pCreature) +{ + return new npc_living_mojoAI(pCreature); +}; + void AddSC_boss_colossus() { Script* pNewScript; pNewScript = new Script; - pNewScript->Name = "boss_colossus"; - pNewScript->GetAI = &GetAI_boss_colossus; + pNewScript->Name = "boss_drakkari_colossus"; + pNewScript->GetAI = &GetAI_boss_drakkari_colossus; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "boss_drakkari_elemental"; + pNewScript->GetAI = &GetAI_boss_drakkari_elemental; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_living_mojo"; + pNewScript->GetAI = &GetAI_npc_living_mojo; pNewScript->RegisterSelf(); } diff --git a/scripts/northrend/gundrak/boss_galdarah.cpp b/scripts/northrend/gundrak/boss_galdarah.cpp index 7d521560e..5469df424 100644 --- a/scripts/northrend/gundrak/boss_galdarah.cpp +++ b/scripts/northrend/gundrak/boss_galdarah.cpp @@ -118,7 +118,7 @@ struct MANGOS_DLL_DECL boss_galdarahAI : public ScriptedAI void JustReachedHome() { if (m_pInstance) - m_pInstance->SetData(TYPE_GALDARAH, NOT_STARTED); + m_pInstance->SetData(TYPE_GALDARAH, FAIL); } void JustDied(Unit* pKiller) diff --git a/scripts/northrend/gundrak/boss_sladran.cpp b/scripts/northrend/gundrak/boss_sladran.cpp index bf5dbeda5..41d06b5b2 100644 --- a/scripts/northrend/gundrak/boss_sladran.cpp +++ b/scripts/northrend/gundrak/boss_sladran.cpp @@ -148,6 +148,12 @@ struct MANGOS_DLL_DECL boss_sladranAI : public ScriptedAI m_pInstance->SetData(TYPE_SLADRAN, DONE); } + void JustReachedHome() + { + if (m_pInstance) + m_pInstance->SetData(TYPE_SLADRAN, FAIL); + } + Creature* SelectRandomCreatureOfEntryInRange(uint32 uiEntry, float fRange) { std::list lCreatureList; diff --git a/scripts/northrend/gundrak/gundrak.h b/scripts/northrend/gundrak/gundrak.h index e0810874a..1bf3a02b1 100644 --- a/scripts/northrend/gundrak/gundrak.h +++ b/scripts/northrend/gundrak/gundrak.h @@ -80,6 +80,8 @@ class MANGOS_DLL_DECL instance_gundrak : public ScriptedInstance void OnCreatureCreate(Creature* pCreature); void OnObjectCreate(GameObject* pGo); + void OnCreatureEnterCombat(Creature* pCreature); + void SetData(uint32 uiType, uint32 uiData); uint32 GetData(uint32 uiType); @@ -103,6 +105,7 @@ class MANGOS_DLL_DECL instance_gundrak : public ScriptedInstance GUIDList m_luiStalkerGUIDs; GUIDVector m_vStalkerCasterGuids; GUIDVector m_vStalkerTargetGuids; + GUIDSet m_sColossusMojosGuids; bool m_bLessRabi; diff --git a/scripts/northrend/gundrak/instance_gundrak.cpp b/scripts/northrend/gundrak/instance_gundrak.cpp index 5b621486e..137242191 100644 --- a/scripts/northrend/gundrak/instance_gundrak.cpp +++ b/scripts/northrend/gundrak/instance_gundrak.cpp @@ -69,6 +69,12 @@ void instance_gundrak::OnCreatureCreate(Creature* pCreature) case NPC_INVISIBLE_STALKER: m_luiStalkerGUIDs.push_back(pCreature->GetObjectGuid()); break; + + case NPC_LIVIN_MOJO: + // Store only the Mojos used to activate the Colossus + if (pCreature->GetPositionX() > 1650.0f) + m_sColossusMojosGuids.insert(pCreature->GetObjectGuid()); + break; } } @@ -171,6 +177,8 @@ void instance_gundrak::SetData(uint32 uiType, uint32 uiData) if (uiData == DONE) if (GameObject* pGo = GetSingleGameObjectFromStorage(GO_ALTAR_OF_SLADRAN)) pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NO_INTERACT); + if (uiData == FAIL) + m_uisWhySnakesAchievPlayers.clear(); if (uiData == SPECIAL) m_mAltarInProgress.insert(TypeTimerPair(TYPE_SLADRAN, TIMER_VISUAL_ALTAR)); break; @@ -193,6 +201,17 @@ void instance_gundrak::SetData(uint32 uiType, uint32 uiData) if (uiData == DONE) if (GameObject* pGo = GetSingleGameObjectFromStorage(GO_ALTAR_OF_COLOSSUS)) pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NO_INTERACT); + if (uiData == FAIL) + { + for (GUIDSet::const_iterator itr = m_sColossusMojosGuids.begin(); itr != m_sColossusMojosGuids.end(); ++itr) + { + if (Creature* pMojo = instance->GetCreature(*itr)) + { + pMojo->Respawn(); + pMojo->GetMotionMaster()->MoveTargetedHome(); + } + } + } if (uiData == SPECIAL) m_mAltarInProgress.insert(TypeTimerPair(TYPE_COLOSSUS, TIMER_VISUAL_ALTAR)); break; @@ -204,6 +223,8 @@ void instance_gundrak::SetData(uint32 uiType, uint32 uiData) DoUseDoorOrButton(GO_EXIT_DOOR_L); DoUseDoorOrButton(GO_EXIT_DOOR_R); } + if (uiData == FAIL) + m_uisShareLoveAchievPlayers.clear(); break; case TYPE_ECK: m_auiEncounter[TYPE_ECK] = uiData; @@ -267,6 +288,23 @@ bool instance_gundrak::CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player } } +void instance_gundrak::OnCreatureEnterCombat(Creature* pCreature) +{ + if (pCreature->GetEntry() == NPC_LIVIN_MOJO) + { + // If not found in the set, or the event is already started, return + if (m_sColossusMojosGuids.find(pCreature->GetObjectGuid()) == m_sColossusMojosGuids.end()) + return; + + // Move all 4 Mojos to evade and move to the Colossus position + for (GUIDSet::const_iterator itr = m_sColossusMojosGuids.begin(); itr != m_sColossusMojosGuids.end(); ++itr) + { + if (Creature* pMojo = instance->GetCreature(*itr)) + pMojo->AI()->EnterEvadeMode(); + } + } +} + static bool sortFromEastToWest(Creature* pFirst, Creature* pSecond) { return pFirst && pSecond && pFirst->GetPositionY() < pSecond->GetPositionY(); diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 61d2d666e..81e15e3c3 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2572" + #define SD2_REVISION_NR "2573" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 1ef773b21..5f31d2e42 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -625,7 +625,9 @@ UPDATE creature_template SET ScriptName='boss_olm_the_summoner' WHERE entry=1883 UPDATE creature_template SET ScriptName='boss_krosh_firehand' WHERE entry=18832; /* GUNDRAK */ -UPDATE creature_template SET ScriptName='boss_colossus' WHERE entry=29307; +UPDATE creature_template SET ScriptName='boss_drakkari_colossus' WHERE entry=29307; +UPDATE creature_template SET ScriptName='boss_drakkari_elemental' WHERE entry=29573; +UPDATE creature_template SET ScriptName='npc_living_mojo' WHERE entry=29830; UPDATE creature_template SET ScriptName='boss_eck' WHERE entry=29932; UPDATE creature_template SET ScriptName='boss_galdarah' WHERE entry=29306; UPDATE creature_template SET ScriptName='boss_moorabi' WHERE entry=29305; diff --git a/sql/updates/r2573_mangos.sql b/sql/updates/r2573_mangos.sql new file mode 100644 index 000000000..836dd3d38 --- /dev/null +++ b/sql/updates/r2573_mangos.sql @@ -0,0 +1,3 @@ +UPDATE creature_template SET ScriptName='boss_drakkari_colossus' WHERE entry=29307; +UPDATE creature_template SET ScriptName='boss_drakkari_elemental' WHERE entry=29573; +UPDATE creature_template SET ScriptName='npc_living_mojo' WHERE entry=29830; From f822c58061bfb521de1ad4b7a205db36f97179af Mon Sep 17 00:00:00 2001 From: Xfurry Date: Fri, 1 Jun 2012 00:16:55 +0300 Subject: [PATCH 0562/1172] [2574] Add more content to the Oculus instance --- .../northrend/nexus/oculus/boss_eregos.cpp | 1 - .../nexus/oculus/instance_oculus.cpp | 76 ++++++++++++++++++- scripts/northrend/nexus/oculus/oculus.h | 29 +++++-- sd2_revision_nr.h | 2 +- sql/scriptdev2_script_full.sql | 4 +- sql/updates/r2574_scriptdev2.sql | 2 + 6 files changed, 103 insertions(+), 11 deletions(-) create mode 100644 sql/updates/r2574_scriptdev2.sql diff --git a/scripts/northrend/nexus/oculus/boss_eregos.cpp b/scripts/northrend/nexus/oculus/boss_eregos.cpp index 0c28532c3..6b63fbcac 100644 --- a/scripts/northrend/nexus/oculus/boss_eregos.cpp +++ b/scripts/northrend/nexus/oculus/boss_eregos.cpp @@ -26,7 +26,6 @@ EndScriptData */ enum { - SAY_SPAWN = -1578010, SAY_AGGRO = -1578011, SAY_ARCANE_SHIELD = -1578012, SAY_FIRE_SHIELD = -1578013, diff --git a/scripts/northrend/nexus/oculus/instance_oculus.cpp b/scripts/northrend/nexus/oculus/instance_oculus.cpp index 6574e31c3..4b50098f5 100644 --- a/scripts/northrend/nexus/oculus/instance_oculus.cpp +++ b/scripts/northrend/nexus/oculus/instance_oculus.cpp @@ -16,15 +16,16 @@ /* ScriptData SDName: instance_oculus -SD%Complete: 30 -SDComment: Only basic support +SD%Complete: 50 +SDComment: Spawn instance bosses and handle Varos pre event; Dialogue NYI SDCategory: Oculus EndScriptData */ #include "precompiled.h" #include "oculus.h" -instance_oculus::instance_oculus(Map* pMap) : ScriptedInstance(pMap) +instance_oculus::instance_oculus(Map* pMap) : ScriptedInstance(pMap), + m_uiConstructsDead(0) { Initialize(); } @@ -34,6 +35,11 @@ void instance_oculus::Initialize() memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); } +void instance_oculus::OnPlayerEnter(Player *pPlayer) +{ + DoSpawnNextBossIfCan(); +} + void instance_oculus::OnCreatureCreate(Creature* pCreature) { switch (pCreature->GetEntry()) @@ -54,6 +60,11 @@ void instance_oculus::OnObjectCreate(GameObject* pGo) case GO_CACHE_EREGOS_H: m_mGoEntryGuidStore[pGo->GetEntry()] = pGo->GetObjectGuid(); break; + case GO_DRAGON_CAGE_DOOR: + m_lCageDoorGUIDs.push_back(pGo->GetObjectGuid()); + if (m_auiEncounter[TYPE_DRAKOS] == DONE) + pGo->SetGoState(GO_STATE_ACTIVE); + break; } } @@ -63,15 +74,40 @@ void instance_oculus::SetData(uint32 uiType, uint32 uiData) { case TYPE_DRAKOS: m_auiEncounter[TYPE_DRAKOS] = uiData; + if (uiData == DONE) + { + // Open all cages + for (GUIDList::const_iterator itr = m_lCageDoorGUIDs.begin(); itr != m_lCageDoorGUIDs.end(); ++itr) + DoUseDoorOrButton(*itr); + + // Notes: There should also be a small dialogue here involving Belgaristrasz and Varos + // Also the Centrifuge Constructs and the related npcs should be summoned + + // Activate the world state + DoUpdateWorldState(WORLD_STATE_CONSTRUCTS, 1); + DoUpdateWorldState(WORLD_STATE_CONSTRUCTS_COUNT, MAX_CONSTRUCTS); + + DoStartTimedAchievement(ACHIEVEMENT_CRITERIA_TYPE_KILL_CREATURE, ACHIEV_START_EREGOS_ID); + } break; case TYPE_VAROS: m_auiEncounter[TYPE_VAROS] = uiData; + if (uiData == DONE) + { + // Note: Image of Belgaristrasz teleports here after the boss is dead and does some dialogue + DoSpawnNextBossIfCan(); + DoUpdateWorldState(WORLD_STATE_CONSTRUCTS, 0); + } break; case TYPE_UROM: m_auiEncounter[TYPE_UROM] = uiData; + // Note: Image of Belgaristrasz teleports to this boss after it's killed and does some dialogue; Right after this, Eregos appears + if (uiData == DONE) + DoSpawnNextBossIfCan(); break; case TYPE_EREGOS: m_auiEncounter[TYPE_EREGOS] = uiData; + // Note: Image of Belgaristrasz teleports to the Cache location and does more dialogue if (uiData == DONE) DoToggleGameObjectFlags(instance->IsRegularDifficulty() ? GO_CACHE_EREGOS : GO_CACHE_EREGOS_H, GO_FLAG_NO_INTERACT, false); break; @@ -123,9 +159,43 @@ void instance_oculus::OnCreatureDeath(Creature* pCreature) { case NPC_DRAKOS: SetData(TYPE_DRAKOS, DONE); break; case NPC_VAROS: SetData(TYPE_VAROS, DONE); break; + case NPC_CENTRIFUGE_CONSTRUCT: + ++m_uiConstructsDead; + DoUpdateWorldState(WORLD_STATE_CONSTRUCTS_COUNT, MAX_CONSTRUCTS - m_uiConstructsDead); + + if (m_uiConstructsDead == MAX_CONSTRUCTS) + { + if (Creature* pVaros = GetSingleCreatureFromStorage(NPC_VAROS)) + pVaros->InterruptNonMeleeSpells(false); + } + break; } } +void instance_oculus::DoSpawnNextBossIfCan() +{ + Player* pPlayer = GetPlayerInMap(); + if (!pPlayer) + return; + + if (GetData(TYPE_UROM) == DONE) + { + // return if already summoned + if (GetSingleCreatureFromStorage(NPC_EREGOS, true)) + return; + + pPlayer->SummonCreature(NPC_EREGOS, aOculusBossSpawnLocs[1][0], aOculusBossSpawnLocs[1][1], aOculusBossSpawnLocs[1][2], aOculusBossSpawnLocs[1][3], TEMPSUMMON_DEAD_DESPAWN, 0); + } + else if (GetData(TYPE_VAROS) == DONE) + { + // return if already summoned + if (GetSingleCreatureFromStorage(NPC_UROM, true)) + return; + + pPlayer->SummonCreature(NPC_UROM, aOculusBossSpawnLocs[0][0], aOculusBossSpawnLocs[0][1], aOculusBossSpawnLocs[0][2], aOculusBossSpawnLocs[0][3], TEMPSUMMON_DEAD_DESPAWN, 0); + } +} + void instance_oculus::Load(const char* chrIn) { if (!chrIn) diff --git a/scripts/northrend/nexus/oculus/oculus.h b/scripts/northrend/nexus/oculus/oculus.h index 41b036ec9..be71a373e 100644 --- a/scripts/northrend/nexus/oculus/oculus.h +++ b/scripts/northrend/nexus/oculus/oculus.h @@ -15,6 +15,7 @@ enum { MAX_ENCOUNTER = 4, + MAX_CONSTRUCTS = 10, TYPE_DRAKOS = 0, TYPE_VAROS = 1, @@ -25,10 +26,12 @@ enum NPC_VAROS = 27447, NPC_UROM = 27655, NPC_EREGOS = 27656, + NPC_CENTRIFUGE_CONSTRUCT = 27641, - NPC_ETERNOS = 27659, // bronze - NPC_VERDISA = 27657, // emerald - NPC_BELGARISTRASZ = 27658, // ruby + NPC_ETERNOS = 27659, // bronze + NPC_VERDISA = 27657, // emerald + NPC_BELGARISTRASZ = 27658, // ruby + NPC_IMAGE_OF_BELGARISTRASZ = 28012, // Cages in which the friendly dragons are hold GO_DRAGON_CAGE_DOOR = 193995, @@ -37,9 +40,12 @@ enum GO_CACHE_EREGOS = 191349, GO_CACHE_EREGOS_H = 193603, - // Yells after Drakos dies - SAY_VAROS_INTRO = -1578020, + // Instance event yells SAY_BELGARISTRASZ_GREET = -1578021, + SAY_VAROS_INTRO = -1578020, + SAY_BELGARISTRASZ_UROM = -1578022, + SAY_BELGARISTRASZ_EREGOS = -1578023, + SAY_EREGOS_SPAWN = -1578010, // world states to show how many constructs are still alive WORLD_STATE_CONSTRUCTS = 3524, @@ -48,6 +54,12 @@ enum ACHIEV_START_EREGOS_ID = 18153, // eregos timed kill achiev }; +static const float aOculusBossSpawnLocs[2][4] = +{ + {1177.47f, 937.722f, 527.405f, 2.21657f}, // Urom + {1077.04f, 1086.21f, 655.497f, 4.18879f} // Eregos +}; + class MANGOS_DLL_DECL instance_oculus : public ScriptedInstance { public: @@ -55,6 +67,7 @@ class MANGOS_DLL_DECL instance_oculus : public ScriptedInstance void Initialize(); + void OnPlayerEnter(Player* pPlayer); void OnCreatureCreate(Creature* pCreature); void OnObjectCreate(GameObject* pGo); @@ -69,8 +82,14 @@ class MANGOS_DLL_DECL instance_oculus : public ScriptedInstance void Load(const char* chrIn); protected: + void DoSpawnNextBossIfCan(); + uint32 m_auiEncounter[MAX_ENCOUNTER]; std::string strInstData; + + uint8 m_uiConstructsDead; + + GUIDList m_lCageDoorGUIDs; }; #endif diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 81e15e3c3..ae080cd8a 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2573" + #define SD2_REVISION_NR "2574" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index e0932bea6..5845def27 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -2682,7 +2682,9 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1578019,'Savor this small victory, foolish little creatures. You and your dragon allies have won this battle. But we will win... the Nexus War.',13631,1,0,0,'eregos SAY_DEATH'), (-1578020,'Intruders, your victory will be short-lived. I am Commander Varos Cloudstrider. My drakes control the skies and protect this conduit. I will see to it personally that the Oculus does not fall into your hands!',13648,6,0,0,'varos SAY_VAROS_INTRO'), -(-1578021,'Thank you for freeing us, mortals. Beware, the Blue Flight is alerted to your presence. Even now, Malygos sends Varos Cloudstrider and his ring guardians to defend the Oculus. You will need our help to stand a chance.',0,0,0,1,'belgaristrasz SAY_BELGARISTRASZ_GREET'); +(-1578021,'Thank you for freeing us, mortals. Beware, the Blue Flight is alerted to your presence. Even now, Malygos sends Varos Cloudstrider and his ring guardians to defend the Oculus. You will need our help to stand a chance.',0,0,0,1,'belgaristrasz SAY_BELGARISTRASZ_GREET'), +(-1578022,'The trickster Mage-Lord Urom protects the third ring. He will appear alone and defenseless, but do not be fooled by appearances! Urom is a powerful conjurer who commands a menagerie of Phantasmal creatures. Seek him out above.',0,0,0,1,'belgaristrasz SAY_BELGARISTRASZ_UROM'), +(-1578023,'Your greatest challenge lies ahead. Ley-Guardian Eregos is a Blue dragon of immense power. You will find him flying above the uppermost ring.',0,0,0,1,'belgaristrasz SAY_BELGARISTRASZ_EREGOS'); -- -1 580 000 SUNWELL PLATEAU INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES diff --git a/sql/updates/r2574_scriptdev2.sql b/sql/updates/r2574_scriptdev2.sql new file mode 100644 index 000000000..4dcd608aa --- /dev/null +++ b/sql/updates/r2574_scriptdev2.sql @@ -0,0 +1,2 @@ +(-1578022,'The trickster Mage-Lord Urom protects the third ring. He will appear alone and defenseless, but do not be fooled by appearances! Urom is a powerful conjurer who commands a menagerie of Phantasmal creatures. Seek him out above.',0,0,0,1,'belgaristrasz SAY_BELGARISTRASZ_UROM'), +(-1578023,'Your greatest challenge lies ahead. Ley-Guardian Eregos is a Blue dragon of immense power. You will find him flying above the uppermost ring.',0,0,0,1,'belgaristrasz SAY_BELGARISTRASZ_EREGOS'); From 67078dec49d64e99c95bd9ef0fab77bb92ad317b Mon Sep 17 00:00:00 2001 From: Xfurry Date: Fri, 1 Jun 2012 01:21:14 +0300 Subject: [PATCH 0563/1172] [2575] Implement combat abilities for Ley-Guardian Eregos - Oculus Also fix the previous SQL file mistake --- .../northrend/nexus/oculus/boss_eregos.cpp | 130 +++++++++++++++++- sd2_revision_nr.h | 2 +- sql/scriptdev2_script_full.sql | 4 +- sql/updates/r2574_scriptdev2.sql | 2 + sql/updates/r2575_scriptdev2.sql | 3 + 5 files changed, 136 insertions(+), 5 deletions(-) create mode 100644 sql/updates/r2575_scriptdev2.sql diff --git a/scripts/northrend/nexus/oculus/boss_eregos.cpp b/scripts/northrend/nexus/oculus/boss_eregos.cpp index 6b63fbcac..be09a3720 100644 --- a/scripts/northrend/nexus/oculus/boss_eregos.cpp +++ b/scripts/northrend/nexus/oculus/boss_eregos.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: boss_eregos -SD%Complete: 30 -SDComment: only yells and instance data support +SD%Complete: 80 +SDComment: Planar anomalies might require additional script SDCategory: Oculus EndScriptData */ @@ -35,6 +35,22 @@ enum SAY_KILL_2 = -1578017, SAY_KILL_3 = -1578018, SAY_DEATH = -1578019, + EMOTE_ASTRAL_PLANE = -1578024, + + SPELL_ARCANE_BARRAGE = 50804, + SPELL_ARCANE_BARRAGE_H = 59381, + SPELL_ARCANE_VOLLEY = 51153, + SPELL_ARCANE_VOLLEY_H = 59382, + SPELL_ENRAGED_ASSAULT = 51170, + SPELL_PLANAR_ANOMALIES = 57959, + SPELL_SUMMON_LEY_WHELP = 51175, + SPELL_PLANAR_SHIFT = 51162, + + SPELL_PLANAR_ANOMALY_AGGRO = 57971, + SPELL_PLANAR_BLAST = 57976, + + NPC_PLANAR_ANOMALY = 30879, // should cast 57976 on target range check + NPC_GREATER_LEY_WHELP = 28276, }; struct MANGOS_DLL_DECL boss_eregosAI : public ScriptedAI @@ -49,8 +65,19 @@ struct MANGOS_DLL_DECL boss_eregosAI : public ScriptedAI ScriptedInstance* m_pInstance; bool m_bIsRegularMode; + uint32 m_uiArcaneBarrageTimer; + uint32 m_uiArcaneVolleyTimer; + uint32 m_uiEnrageTimer; + uint32 m_uiSummonWhelpsTimer; + float m_fHpPercent; + void Reset() { + m_uiArcaneBarrageTimer = 0; + m_uiArcaneVolleyTimer = 20000; + m_uiEnrageTimer = 35000; + m_uiSummonWhelpsTimer = urand(15000, 20000); + m_fHpPercent = 60.0f; } void Aggro(Unit* pWho) @@ -61,6 +88,17 @@ struct MANGOS_DLL_DECL boss_eregosAI : public ScriptedAI m_pInstance->SetData(TYPE_EREGOS, IN_PROGRESS); } + void AttackStart(Unit* pWho) + { + if (m_creature->Attack(pWho, false)) + { + m_creature->AddThreat(pWho); + m_creature->SetInCombatWith(pWho); + pWho->SetInCombatWith(m_creature); + DoStartMovement(pWho, 20.0f); + } + } + void KilledUnit(Unit* pVictim) { switch(urand(0, 2)) @@ -85,12 +123,98 @@ struct MANGOS_DLL_DECL boss_eregosAI : public ScriptedAI m_pInstance->SetData(TYPE_EREGOS, FAIL); } + void JustSummoned(Creature* pSummoned) + { + if (pSummoned->GetEntry() == NPC_PLANAR_ANOMALY) + { + pSummoned->CastSpell(pSummoned, SPELL_PLANAR_ANOMALY_AGGRO, false); + + // Note: This is wrong. Each summoned anomaly should follow an individual target + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + pSummoned->GetMotionMaster()->MoveFollow(pTarget, 0, 0); + } + else if (pSummoned->GetEntry() == NPC_GREATER_LEY_WHELP) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + pSummoned->AI()->AttackStart(pTarget); + } + } + + void SummonedCreatureDespawn(Creature* pSummoned) + { + if (pSummoned->GetEntry() == NPC_PLANAR_ANOMALY) + pSummoned->CastSpell(pSummoned, SPELL_PLANAR_BLAST, true); + } + void UpdateAI(const uint32 uiDiff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - DoMeleeAttackIfReady(); + if (m_creature->HasAura(SPELL_PLANAR_SHIFT)) + return; + + if (m_creature->GetHealthPercent() < m_fHpPercent) + { + if (DoCastSpellIfCan(m_creature, SPELL_PLANAR_SHIFT) == CAST_OK) + { + // This will summon an anomaly on each player coordinates + DoCastSpellIfCan(m_creature, SPELL_PLANAR_ANOMALIES, CAST_TRIGGERED); + + switch(urand(0, 2)) + { + case 0: DoScriptText(SAY_ARCANE_SHIELD, m_creature); break; + case 1: DoScriptText(SAY_FIRE_SHIELD, m_creature); break; + case 2: DoScriptText(SAY_NATURE_SHIELD, m_creature); break; + } + DoScriptText(EMOTE_ASTRAL_PLANE, m_creature); + + // set next phase to 20% + m_fHpPercent -= 40; + } + } + + if (m_uiArcaneBarrageTimer < uiDiff) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, m_bIsRegularMode ? SPELL_ARCANE_BARRAGE : SPELL_ARCANE_BARRAGE_H) == CAST_OK) + m_uiArcaneBarrageTimer = urand(2000, 3000); + } + } + else + m_uiArcaneBarrageTimer -= uiDiff; + + if (m_uiSummonWhelpsTimer < uiDiff) + { + // ToDo: the number of whelps summoned may be different based on difficulty. Needs research! + for (uint8 i = 0; i < 4; i++) + { + if (DoCastSpellIfCan(m_creature, SPELL_SUMMON_LEY_WHELP, CAST_TRIGGERED) == CAST_OK) + m_uiSummonWhelpsTimer = 20000; + } + } + else + m_uiSummonWhelpsTimer -= uiDiff; + + if (m_uiArcaneVolleyTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_ARCANE_VOLLEY : SPELL_ARCANE_VOLLEY_H) == CAST_OK) + m_uiArcaneVolleyTimer = urand(10000, 15000); + } + else + m_uiArcaneVolleyTimer -= uiDiff; + + if (m_uiEnrageTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_ENRAGED_ASSAULT) == CAST_OK) + { + DoScriptText(SAY_FRENZY, m_creature); + m_uiEnrageTimer = urand(40000, 50000); + } + } + else + m_uiEnrageTimer -= uiDiff; } }; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index ae080cd8a..840b1e433 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2574" + #define SD2_REVISION_NR "2575" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 5845def27..0a9f3fcfa 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -2684,7 +2684,9 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1578020,'Intruders, your victory will be short-lived. I am Commander Varos Cloudstrider. My drakes control the skies and protect this conduit. I will see to it personally that the Oculus does not fall into your hands!',13648,6,0,0,'varos SAY_VAROS_INTRO'), (-1578021,'Thank you for freeing us, mortals. Beware, the Blue Flight is alerted to your presence. Even now, Malygos sends Varos Cloudstrider and his ring guardians to defend the Oculus. You will need our help to stand a chance.',0,0,0,1,'belgaristrasz SAY_BELGARISTRASZ_GREET'), (-1578022,'The trickster Mage-Lord Urom protects the third ring. He will appear alone and defenseless, but do not be fooled by appearances! Urom is a powerful conjurer who commands a menagerie of Phantasmal creatures. Seek him out above.',0,0,0,1,'belgaristrasz SAY_BELGARISTRASZ_UROM'), -(-1578023,'Your greatest challenge lies ahead. Ley-Guardian Eregos is a Blue dragon of immense power. You will find him flying above the uppermost ring.',0,0,0,1,'belgaristrasz SAY_BELGARISTRASZ_EREGOS'); +(-1578023,'Your greatest challenge lies ahead. Ley-Guardian Eregos is a Blue dragon of immense power. You will find him flying above the uppermost ring.',0,0,0,1,'belgaristrasz SAY_BELGARISTRASZ_EREGOS'), + +(-1578024,'Anomalies form as %s shifts into the Astral Plane!',0,3,0,0,'eregos EMOTE_ASTRAL_PLANE'); -- -1 580 000 SUNWELL PLATEAU INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES diff --git a/sql/updates/r2574_scriptdev2.sql b/sql/updates/r2574_scriptdev2.sql index 4dcd608aa..a3aac9996 100644 --- a/sql/updates/r2574_scriptdev2.sql +++ b/sql/updates/r2574_scriptdev2.sql @@ -1,2 +1,4 @@ +DELETE FROM script_texts WHERE entry IN (-1578022,-1578023); +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES (-1578022,'The trickster Mage-Lord Urom protects the third ring. He will appear alone and defenseless, but do not be fooled by appearances! Urom is a powerful conjurer who commands a menagerie of Phantasmal creatures. Seek him out above.',0,0,0,1,'belgaristrasz SAY_BELGARISTRASZ_UROM'), (-1578023,'Your greatest challenge lies ahead. Ley-Guardian Eregos is a Blue dragon of immense power. You will find him flying above the uppermost ring.',0,0,0,1,'belgaristrasz SAY_BELGARISTRASZ_EREGOS'); diff --git a/sql/updates/r2575_scriptdev2.sql b/sql/updates/r2575_scriptdev2.sql new file mode 100644 index 000000000..d76b80625 --- /dev/null +++ b/sql/updates/r2575_scriptdev2.sql @@ -0,0 +1,3 @@ +DELETE FROM script_texts WHERE entry=-1578024; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1578024,'Anomalies form as %s shifts into the Astral Plane!',0,3,0,0,'eregos EMOTE_ASTRAL_PLANE'); From 80a24342f08ecab545b5aba93f234d48fa37911d Mon Sep 17 00:00:00 2001 From: Xfurry Date: Fri, 1 Jun 2012 21:30:18 +0300 Subject: [PATCH 0564/1172] [2576] Implement script support for Mage-Lord Urom - Oculus --- .../northrend/nexus/oculus/boss_eregos.cpp | 2 +- scripts/northrend/nexus/oculus/boss_urom.cpp | 265 +++++++++++++++++- sd2_revision_nr.h | 2 +- sql/scriptdev2_script_full.sql | 3 +- sql/updates/r2576_scriptdev2.sql | 3 + 5 files changed, 268 insertions(+), 7 deletions(-) create mode 100644 sql/updates/r2576_scriptdev2.sql diff --git a/scripts/northrend/nexus/oculus/boss_eregos.cpp b/scripts/northrend/nexus/oculus/boss_eregos.cpp index be09a3720..830bcd038 100644 --- a/scripts/northrend/nexus/oculus/boss_eregos.cpp +++ b/scripts/northrend/nexus/oculus/boss_eregos.cpp @@ -188,7 +188,7 @@ struct MANGOS_DLL_DECL boss_eregosAI : public ScriptedAI if (m_uiSummonWhelpsTimer < uiDiff) { // ToDo: the number of whelps summoned may be different based on difficulty. Needs research! - for (uint8 i = 0; i < 4; i++) + for (uint8 i = 0; i < 4; ++i) { if (DoCastSpellIfCan(m_creature, SPELL_SUMMON_LEY_WHELP, CAST_TRIGGERED) == CAST_OK) m_uiSummonWhelpsTimer = 20000; diff --git a/scripts/northrend/nexus/oculus/boss_urom.cpp b/scripts/northrend/nexus/oculus/boss_urom.cpp index dec478926..355b21fb9 100644 --- a/scripts/northrend/nexus/oculus/boss_urom.cpp +++ b/scripts/northrend/nexus/oculus/boss_urom.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: boss_urom -SD%Complete: 30 -SDComment: only yells and instance data support +SD%Complete: 90 +SDComment: Small adjustments may be required. SDCategory: Oculus EndScriptData */ @@ -36,6 +36,41 @@ enum SAY_KILL_2 = -1578007, SAY_KILL_3 = -1578008, SAY_DEATH = -1578009, + EMOTE_EXPLOSION = -1578025, + + // spells + SPELL_ARCANE_SHIELD = 53813, // This spell id may be wrong. Needs research! + SPELL_ARCANE_EXPLOSION = 51110, + SPELL_ARCANE_EXPLOSION_H = 59377, + SPELL_FROSTBOMB = 51103, + SPELL_TIME_BOMB = 51121, + SPELL_TIME_BOMB_H = 59376, + SPELL_SUMMON_MENAGERIE_1 = 50476, + SPELL_SUMMON_MENAGERIE_2 = 50495, + SPELL_SUMMON_MENAGERIE_3 = 50496, + SPELL_TELEPORT = 51112, + + // npcs + NPC_PHANTASMAL_CLOUDSCRAPER = 27645, + NPC_PHANTASMAL_MAMMOTH = 27642, + NPC_PHANTASMAL_WOLF = 27644, + + NPC_PHANTASMAL_AIR = 27650, + NPC_PHANTASMAL_FIRE = 27651, + NPC_PHANTASMAL_WATER = 27653, + + NPC_PHANTASMAL_MURLOC = 27649, + NPC_PHANTASMAL_NAGAL = 27648, + NPC_PHANTASMAL_OGRE = 27647, + + MAX_PLATFORMS = 3, +}; + +static uint32 uiTrashPacks[MAX_PLATFORMS][MAX_PLATFORMS]= +{ + {NPC_PHANTASMAL_CLOUDSCRAPER, NPC_PHANTASMAL_MAMMOTH, NPC_PHANTASMAL_WOLF}, + {NPC_PHANTASMAL_AIR, NPC_PHANTASMAL_FIRE, NPC_PHANTASMAL_WATER}, + {NPC_PHANTASMAL_MURLOC, NPC_PHANTASMAL_NAGAL, NPC_PHANTASMAL_OGRE}, }; struct MANGOS_DLL_DECL boss_uromAI : public ScriptedAI @@ -44,24 +79,101 @@ struct MANGOS_DLL_DECL boss_uromAI : public ScriptedAI { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); + + // Randomize the trash mobs packs + for (uint8 i = 0; i < MAX_PLATFORMS; ++i) + m_vuiTrashPacksIds.push_back(i); + Reset(); } ScriptedInstance* m_pInstance; bool m_bIsRegularMode; + bool m_bIsTeleporting; + bool m_bIsPlatformPhase; + uint8 m_uiPlatformPhase; + uint32 m_uiExplosionExpireTimer; + uint32 m_uiArcaneShieldTimer; + uint32 m_uiExplosionTimer; + uint32 m_uiTeleportTimer; + uint32 m_uiFrostBombTimer; + uint32 m_uiTimeBombTimer; + + float m_fX, m_fY, m_fZ; + + ObjectGuid m_attackTarget; + + std::vector m_vuiTrashPacksIds; + void Reset() { + m_bIsPlatformPhase = true; + m_uiPlatformPhase = 0; + m_uiExplosionTimer = 0; + m_uiExplosionExpireTimer = 0; + m_uiTeleportTimer = 20000; + m_uiFrostBombTimer = 5000; + m_uiTimeBombTimer = urand(10000, 15000); + + ResetPlatformVariables(); + + std::random_shuffle(m_vuiTrashPacksIds.begin(), m_vuiTrashPacksIds.end()); + } + + void ResetPlatformVariables() + { + m_bIsTeleporting = false; + m_uiArcaneShieldTimer = 1000; } void Aggro(Unit* pWho) { - DoScriptText(SAY_AGGRO, m_creature); - if (m_pInstance) m_pInstance->SetData(TYPE_UROM, IN_PROGRESS); } + void AttackStart(Unit* pWho) + { + if (m_uiPlatformPhase < MAX_PLATFORMS) + { + if (m_bIsTeleporting) + return; + + // Summon the trash mobs pack + m_bIsTeleporting = true; + m_attackTarget = pWho->GetObjectGuid(); + m_creature->InterruptNonMeleeSpells(false); + DoSpawnTrashPack(); + + // teleport to next platform and spawn adds + switch (m_uiPlatformPhase) + { + case 0: + if (DoCastSpellIfCan(m_creature, SPELL_SUMMON_MENAGERIE_1) == CAST_OK) + DoScriptText(SAY_SUMMON_1, m_creature); + break; + case 1: + if (DoCastSpellIfCan(m_creature, SPELL_SUMMON_MENAGERIE_2) == CAST_OK) + DoScriptText(SAY_SUMMON_2, m_creature); + break; + case 2: + if (DoCastSpellIfCan(m_creature, SPELL_SUMMON_MENAGERIE_3) == CAST_OK) + DoScriptText(SAY_SUMMON_3, m_creature); + break; + } + } + // Boss has teleported in the central ring - start normal combat + else if (m_bIsPlatformPhase) + { + DoScriptText(SAY_AGGRO, m_creature); + m_creature->InterruptNonMeleeSpells(false); + m_bIsPlatformPhase = false; + + ScriptedAI::AttackStart(pWho); + } + } + void KilledUnit(Unit* pVictim) { switch(urand(0, 2)) @@ -86,11 +198,156 @@ struct MANGOS_DLL_DECL boss_uromAI : public ScriptedAI m_pInstance->SetData(TYPE_UROM, FAIL); } + void EnterEvadeMode() + { + // Don't evade while casting explosion + if (m_uiExplosionExpireTimer) + return; + + if (m_bIsPlatformPhase) + { + m_creature->RemoveAllAuras(); + m_creature->DeleteThreatList(); + m_creature->CombatStop(true); + + m_creature->SetLootRecipient(NULL); + + ResetPlatformVariables(); + } + else + ScriptedAI::EnterEvadeMode(); + } + + void JustSummoned(Creature* pSummon) + { + if (Unit* pTarget = m_creature->GetMap()->GetUnit(m_attackTarget)) + pSummon->AI()->AttackStart(pTarget); + } + + void DoSpawnTrashPack() + { + float fX, fY, fZ; + + // Summon the 3 mobs contained in the pack + for (uint8 i = 0; i < MAX_PLATFORMS; ++i) + { + m_creature->GetNearPoint(m_creature, fX, fY, fZ, 0, 10.0f, M_PI_F/2 * i); + m_creature->SummonCreature(uiTrashPacks[m_vuiTrashPacksIds[m_uiPlatformPhase]][i], fX, fY, fZ, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); + } + + // Summon a fourth mob, which can be random + uint32 uiEntry = uiTrashPacks[m_vuiTrashPacksIds[m_uiPlatformPhase]][urand(0,2)]; + m_creature->GetNearPoint(m_creature, fX, fY, fZ, 0, 10.0f, M_PI_F/2 * 3); + m_creature->SummonCreature(uiEntry, fX, fY, fZ, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); + } + + void SpellHit(Unit* pCaster, const SpellEntry* pSpell) + { + switch (pSpell->Id) + { + case SPELL_SUMMON_MENAGERIE_3: + case SPELL_SUMMON_MENAGERIE_2: + case SPELL_SUMMON_MENAGERIE_1: + EnterEvadeMode(); + ++m_uiPlatformPhase; + break; + } + } + void UpdateAI(const uint32 uiDiff) { + // Set the Arcane Shield on out of combat timer + if (m_uiArcaneShieldTimer) + { + if (m_uiArcaneShieldTimer <= uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_ARCANE_SHIELD) == CAST_OK) + m_uiArcaneShieldTimer = 0; + } + else + m_uiArcaneShieldTimer -= uiDiff; + } + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; + // Don't use any combat abilities during the platform transition + if (m_bIsPlatformPhase) + return; + + if (m_uiExplosionTimer) + { + if (m_uiExplosionTimer <= uiDiff) + { + if (DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_ARCANE_EXPLOSION : SPELL_ARCANE_EXPLOSION_H) == CAST_OK) + { + DoScriptText(EMOTE_EXPLOSION, m_creature); + m_uiExplosionTimer = 0; + } + } + else + m_uiExplosionTimer -= uiDiff; + } + + if (m_uiExplosionExpireTimer) + { + if (m_uiExplosionExpireTimer <= uiDiff) + { + // Teleport to the original location + m_creature->NearTeleportTo(m_fX, m_fY, m_fZ, 0); + + // Resume combat movement + SetCombatMovement(true); + m_creature->GetMotionMaster()->Clear(); + m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); + m_uiExplosionExpireTimer = 0; + } + else + m_uiExplosionExpireTimer -= uiDiff; + + // Don't decrease timers during the explosion event + return; + } + + if (m_uiTeleportTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_TELEPORT) == CAST_OK) + { + DoScriptText(urand(0, 1) ? SAY_EXPLOSION_1 : SAY_EXPLOSION_2, m_creature); + + // Store the original position - boss needs to be teleported back + m_creature->GetPosition(m_fX, m_fY, m_fZ); + + // Stop movement until he casts the arcane explosion + SetCombatMovement(false); + m_creature->GetMotionMaster()->MoveIdle(); + m_uiTeleportTimer = 20000; + m_uiExplosionExpireTimer = m_bIsRegularMode ? 9500 : 7500; + m_uiExplosionTimer = 1000; + } + } + else + m_uiTeleportTimer -= uiDiff; + + if (m_uiFrostBombTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_FROSTBOMB) == CAST_OK) + m_uiFrostBombTimer = urand(4000, 6000); + } + else + m_uiFrostBombTimer -= uiDiff; + + if (m_uiTimeBombTimer < uiDiff) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, m_bIsRegularMode ? SPELL_TIME_BOMB : SPELL_TIME_BOMB_H) == CAST_OK) + m_uiTimeBombTimer = urand(10000, 15000); + } + } + else + m_uiTimeBombTimer -= uiDiff; + DoMeleeAttackIfReady(); } }; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 840b1e433..d48bae3c7 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2575" + #define SD2_REVISION_NR "2576" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 0a9f3fcfa..377d3ab3b 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -2686,7 +2686,8 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1578022,'The trickster Mage-Lord Urom protects the third ring. He will appear alone and defenseless, but do not be fooled by appearances! Urom is a powerful conjurer who commands a menagerie of Phantasmal creatures. Seek him out above.',0,0,0,1,'belgaristrasz SAY_BELGARISTRASZ_UROM'), (-1578023,'Your greatest challenge lies ahead. Ley-Guardian Eregos is a Blue dragon of immense power. You will find him flying above the uppermost ring.',0,0,0,1,'belgaristrasz SAY_BELGARISTRASZ_EREGOS'), -(-1578024,'Anomalies form as %s shifts into the Astral Plane!',0,3,0,0,'eregos EMOTE_ASTRAL_PLANE'); +(-1578024,'Anomalies form as %s shifts into the Astral Plane!',0,3,0,0,'eregos EMOTE_ASTRAL_PLANE'), +(-1578025,'%s begins to cast Empowered Arcane Explosion!',0,3,0,0,'urom EMOTE_EXPLOSION'); -- -1 580 000 SUNWELL PLATEAU INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES diff --git a/sql/updates/r2576_scriptdev2.sql b/sql/updates/r2576_scriptdev2.sql new file mode 100644 index 000000000..244fd9cf9 --- /dev/null +++ b/sql/updates/r2576_scriptdev2.sql @@ -0,0 +1,3 @@ +DELETE FROM script_texts WHERE entry=-1578025; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1578025,'%s begins to cast Empowered Arcane Explosion!',0,3,0,0,'urom EMOTE_EXPLOSION'); From c288a2c09007e2595a265418afd786d273b24191 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Fri, 1 Jun 2012 21:50:10 +0300 Subject: [PATCH 0565/1172] [2577] Add placeholder for Amanitar - Ahn'kahet --- VC100/100ScriptDev2.vcxproj | 1 + VC100/100ScriptDev2.vcxproj.filters | 3 ++ VC80/80ScriptDev2.vcproj | 12 +++++--- VC90/90ScriptDev2.vcproj | 4 +++ .../azjol-nerub/ahnkahet/boss_amanitar.cpp | 28 +++++++++++++++++++ sd2_revision_nr.h | 2 +- system/ScriptLoader.cpp | 6 ++-- 7 files changed, 49 insertions(+), 7 deletions(-) create mode 100644 scripts/northrend/azjol-nerub/ahnkahet/boss_amanitar.cpp diff --git a/VC100/100ScriptDev2.vcxproj b/VC100/100ScriptDev2.vcxproj index 952dd856d..c79df32e1 100644 --- a/VC100/100ScriptDev2.vcxproj +++ b/VC100/100ScriptDev2.vcxproj @@ -470,6 +470,7 @@ + diff --git a/VC100/100ScriptDev2.vcxproj.filters b/VC100/100ScriptDev2.vcxproj.filters index 394de55a0..57233bb03 100644 --- a/VC100/100ScriptDev2.vcxproj.filters +++ b/VC100/100ScriptDev2.vcxproj.filters @@ -1080,6 +1080,9 @@ scripts\northrend + + scripts\northrend\azjol-nerub\ahnkahet + scripts\northrend\azjol-nerub\ahnkahet diff --git a/VC80/80ScriptDev2.vcproj b/VC80/80ScriptDev2.vcproj index 4e4eb30b7..6b06193e7 100644 --- a/VC80/80ScriptDev2.vcproj +++ b/VC80/80ScriptDev2.vcproj @@ -1706,6 +1706,14 @@ + + + + @@ -1722,10 +1730,6 @@ RelativePath="..\scripts\northrend\azjol-nerub\ahnkahet\boss_volazj.cpp" > - - diff --git a/VC90/90ScriptDev2.vcproj b/VC90/90ScriptDev2.vcproj index 8cebf4c81..17ca6d99a 100644 --- a/VC90/90ScriptDev2.vcproj +++ b/VC90/90ScriptDev2.vcproj @@ -1709,6 +1709,10 @@ RelativePath="..\scripts\northrend\azjol-nerub\ahnkahet\ahnkahet.h" > + + diff --git a/scripts/northrend/azjol-nerub/ahnkahet/boss_amanitar.cpp b/scripts/northrend/azjol-nerub/ahnkahet/boss_amanitar.cpp new file mode 100644 index 000000000..dd1d83156 --- /dev/null +++ b/scripts/northrend/azjol-nerub/ahnkahet/boss_amanitar.cpp @@ -0,0 +1,28 @@ +/* Copyright (C) 2006 - 2012 ScriptDev2 + * 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_Amanitar +SD%Complete: 0 +SDComment: +SDCategory: Ahn'kahet +EndScriptData */ + +#include "precompiled.h" + +void AddSC_boss_amanitar() +{ +} diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index d48bae3c7..7461728fb 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2576" + #define SD2_REVISION_NR "2577" #endif // __SD2_REVISION_NR_H__ diff --git a/system/ScriptLoader.cpp b/system/ScriptLoader.cpp index 1cb195bfc..e9ac10d54 100644 --- a/system/ScriptLoader.cpp +++ b/system/ScriptLoader.cpp @@ -274,7 +274,8 @@ extern void AddSC_ungoro_crater(); extern void AddSC_winterspring(); // northrend -extern void AddSC_boss_jedoga(); // azjol-nerub, ahnkahet +extern void AddSC_boss_amanitar(); // azjol-nerub, ahnkahet +extern void AddSC_boss_jedoga(); extern void AddSC_boss_nadox(); extern void AddSC_boss_taldaram(); extern void AddSC_boss_volazj(); @@ -771,7 +772,8 @@ void AddScripts() AddSC_winterspring(); // northrend - AddSC_boss_jedoga(); // azjol-nerub, ahnkahet + AddSC_boss_amanitar(); // azjol-nerub, ahnkahet + AddSC_boss_jedoga(); AddSC_boss_nadox(); AddSC_boss_taldaram(); AddSC_boss_volazj(); From 0f7beacfcb599034c702ef6c2e701241d4066fff Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sat, 2 Jun 2012 00:03:20 +0300 Subject: [PATCH 0566/1172] [2578] Implement script for Amanitar - Ahn'kahet Based on the work of Tasssadar Notes: Mushrooms summoning may not be 100% correct - requires further research Spells 57055 and 56648 require some core stacking additions --- .../azjol-nerub/ahnkahet/boss_amanitar.cpp | 203 +++++++++++++++++- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 2 + sql/updates/r2578_mangos.sql | 2 + 4 files changed, 206 insertions(+), 3 deletions(-) create mode 100644 sql/updates/r2578_mangos.sql diff --git a/scripts/northrend/azjol-nerub/ahnkahet/boss_amanitar.cpp b/scripts/northrend/azjol-nerub/ahnkahet/boss_amanitar.cpp index dd1d83156..ecb28eee9 100644 --- a/scripts/northrend/azjol-nerub/ahnkahet/boss_amanitar.cpp +++ b/scripts/northrend/azjol-nerub/ahnkahet/boss_amanitar.cpp @@ -16,13 +16,212 @@ /* ScriptData SDName: Boss_Amanitar -SD%Complete: 0 -SDComment: +SD%Complete: 80 +SDComment: Mushrooms summoning may need improvements; SDCategory: Ahn'kahet EndScriptData */ #include "precompiled.h" +#include "ahnkahet.h" + +enum +{ + SPELL_BASH = 57094, + SPELL_VENOM_BOLT_VOLLEY = 57088, + SPELL_ENTANGLING_ROOTS = 57095, + SPELL_MINI = 57055, + SPELL_REMOVE_MUSHROOM_POWER = 57283, // purpose unk - this spell may remove the Mini aura from all players + + // Mushroom entries + NPC_HEALTHY_MUSHROOM = 30391, + NPC_POISONOUS_MUSHROOM = 30435, + + // Mushroom spells + SPELL_POISON_CLOUD = 57061, + SPELL_POTENT_FUNGUS = 56648, + SPELL_POISON_MUSHROOM_VISUAL = 56741, + SPELL_POWER_MUSHROOM_VISUAL = 56740, + SPELL_MUSHROOM_FORM = 31690, +}; + +static const float aMushroomPos[3] = {362.8f, -869.16f, -75.03f}; + +/*###### +## boss_amanitar +######*/ + +struct MANGOS_DLL_DECL boss_amanitarAI : public ScriptedAI +{ + boss_amanitarAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; + + uint32 m_uiBashTimer; + uint32 m_uiVenomBoltTimer; + uint32 m_uiRootsTimer; + uint32 m_uiMiniTimer; + uint32 m_uiMushroomTimer; + + void Reset() + { + m_uiBashTimer = urand(7000, 10000); + m_uiVenomBoltTimer = urand(10000, 15000); + m_uiRootsTimer = 20000; + m_uiMiniTimer = urand(20000, 25000); + m_uiMushroomTimer = urand(10000, 20000); + } + + void Aggro(Unit* pWho) + { + DoSummonMushrooms(true); + + if (m_pInstance) + m_pInstance->SetData(TYPE_AMANITAR, IN_PROGRESS); + } + + void JustDied(Unit* pKiller) + { + if (m_pInstance) + m_pInstance->SetData(TYPE_AMANITAR, DONE); + } + + void JustReachedHome() + { + if (m_pInstance) + m_pInstance->SetData(TYPE_AMANITAR, FAIL); + } + + void JustSummoned(Creature* pSummoned) + { + if (pSummoned->GetEntry() == NPC_POISONOUS_MUSHROOM) + pSummoned->CastSpell(pSummoned, SPELL_POISON_MUSHROOM_VISUAL, true); + else if (pSummoned->GetEntry() == NPC_HEALTHY_MUSHROOM) + pSummoned->CastSpell(pSummoned, SPELL_POWER_MUSHROOM_VISUAL, true); + + // ToDo: research if the mushrooms should have a grow effect! + pSummoned->CastSpell(pSummoned, SPELL_MUSHROOM_FORM, true); + } + + void SummonedCreatureJustDied(Creature* pSummoned) + { + if (pSummoned->GetEntry() == NPC_POISONOUS_MUSHROOM) + pSummoned->CastSpell(pSummoned, SPELL_POISON_CLOUD, true); + else if (pSummoned->GetEntry() == NPC_HEALTHY_MUSHROOM) + pSummoned->CastSpell(pSummoned, SPELL_POTENT_FUNGUS, true); + } + + void DoSummonMushrooms(bool bIsFirstSummon) + { + // This implementation may not be 100% accurate; + // On aggro boss summons about 20 mushrooms; On timer it summons about 5 mushrooms per turn + // There is a 33% chance that the mushroom will be healthy + // The summon position is based on the center of the area coords + + float fX, fY, fZ; + uint32 uiMaxMushrooms = bIsFirstSummon ? 20 : 5; + + for (uint8 i = 0; i < uiMaxMushrooms; ++i) + { + uint32 uiMushroomEntry = roll_chance_i(33) ? NPC_HEALTHY_MUSHROOM : NPC_POISONOUS_MUSHROOM; + m_creature->GetRandomPoint(aMushroomPos[0], aMushroomPos[1], aMushroomPos[2], 30.0f, fX, fY, fZ); + m_creature->SummonCreature(uiMushroomEntry, fX, fY, fZ, 0.0f, TEMPSUMMON_DEAD_DESPAWN, 0); + } + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_uiBashTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_BASH) == CAST_OK) + m_uiBashTimer = urand(8000, 13000); + } + else + m_uiBashTimer -= uiDiff; + + if (m_uiVenomBoltTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_VENOM_BOLT_VOLLEY) == CAST_OK) + m_uiVenomBoltTimer = urand(15000, 20000); + } + else + m_uiVenomBoltTimer -= uiDiff; + + if (m_uiRootsTimer < uiDiff) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, SPELL_ENTANGLING_ROOTS) == CAST_OK) + m_uiRootsTimer = urand(20000, 25000); + } + } + else + m_uiRootsTimer -= uiDiff; + + if (m_uiMiniTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_MINI) == CAST_OK) + m_uiMiniTimer = 30000; + } + else + m_uiMiniTimer -= uiDiff; + + if (m_uiMushroomTimer < uiDiff) + { + DoSummonMushrooms(false); + m_uiMushroomTimer = urand(10000, 20000); + } + else + m_uiMushroomTimer -= uiDiff; + + // ToDo: Research if he requires out of combat area evade check + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_amanitar(Creature* pCreature) +{ + return new boss_amanitarAI(pCreature); +} + +/*###### +## npc_amanitar_mushroom +######*/ + +struct MANGOS_DLL_DECL npc_amanitar_mushroomAI : public Scripted_NoMovementAI +{ + npc_amanitar_mushroomAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { Reset(); } + + void Reset() { } + + void AttackStart(Unit* pWho) { } + void MoveInLineOfSight(Unit* pWho) { } + void UpdateAI(const uint32 uiDiff) { } +}; + +CreatureAI* GetAI_npc_amanitar_mushroom(Creature* pCreature) +{ + return new npc_amanitar_mushroomAI(pCreature); +} void AddSC_boss_amanitar() { + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_amanitar"; + pNewScript->GetAI = &GetAI_boss_amanitar; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_amanitar_mushroom"; + pNewScript->GetAI = &GetAI_npc_amanitar_mushroom; + pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 7461728fb..087457b30 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2577" + #define SD2_REVISION_NR "2578" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 5f31d2e42..d41841940 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -244,6 +244,8 @@ UPDATE creature_template SET ScriptName='npc_void_traveler' WHERE entry=19226; /* */ /* AHN'KAHET */ +UPDATE creature_template SET ScriptName='boss_amanitar' WHERE entry=30258; +UPDATE creature_template SET ScriptName='npc_amanitar_mushroom' WHERE entry IN (30391,30435); UPDATE creature_template SET ScriptName='boss_jedoga' WHERE entry=29310; UPDATE creature_template SET ScriptName='boss_nadox' WHERE entry=29309; UPDATE creature_template SET ScriptName='mob_ahnkahar_egg' WHERE entry IN (30172,30173); diff --git a/sql/updates/r2578_mangos.sql b/sql/updates/r2578_mangos.sql new file mode 100644 index 000000000..20ec0ac80 --- /dev/null +++ b/sql/updates/r2578_mangos.sql @@ -0,0 +1,2 @@ +UPDATE creature_template SET ScriptName='boss_amanitar' WHERE entry=30258; +UPDATE creature_template SET ScriptName='npc_amanitar_mushroom' WHERE entry IN (30391,30435); From c4732bb104fb289809ef44b222e284dd4ab2bade Mon Sep 17 00:00:00 2001 From: Xfurry Date: Tue, 5 Jun 2012 22:43:14 +0300 Subject: [PATCH 0567/1172] [2579] Implement script for Prince Taldaram - Ahn'kahet --- .../northrend/azjol-nerub/ahnkahet/ahnkahet.h | 10 +- .../azjol-nerub/ahnkahet/boss_jedoga.cpp | 2 +- .../azjol-nerub/ahnkahet/boss_taldaram.cpp | 234 +++++++++++++++++- .../ahnkahet/instance_ahnkahet.cpp | 37 ++- sd2_revision_nr.h | 2 +- 5 files changed, 266 insertions(+), 19 deletions(-) diff --git a/scripts/northrend/azjol-nerub/ahnkahet/ahnkahet.h b/scripts/northrend/azjol-nerub/ahnkahet/ahnkahet.h index 5d950144d..85e1af5ca 100644 --- a/scripts/northrend/azjol-nerub/ahnkahet/ahnkahet.h +++ b/scripts/northrend/azjol-nerub/ahnkahet/ahnkahet.h @@ -27,15 +27,20 @@ enum GO_VORTEX = 193564, NPC_ELDER_NADOX = 29309, + NPC_TALDARAM = 29308, + //NPC_JEDOGA_SHADOWSEEKER = 29310, NPC_AHNKAHAR_GUARDIAN_EGG = 30173, NPC_AHNKAHAR_SWARM_EGG = 30172, - //NPC_JEDOGA_SHADOWSEEKER = 29310, + NPC_JEDOGA_CONTROLLER = 30181, ACHIEV_START_VOLAZJ_ID = 20382, ACHIEV_CRIT_RESPECT_ELDERS = 7317, // Nadox, achiev 2038 + ACHIEV_CRIT_VOLUNTEER_WORK = 7359, // Jedoga, achiev 2056 }; +static const float aTaldaramLandingLoc[4] = {528.734f, -845.998f, 11.54f, 0.68f}; + class MANGOS_DLL_DECL instance_ahnkahet : public ScriptedInstance { public: @@ -52,6 +57,8 @@ class MANGOS_DLL_DECL instance_ahnkahet : public ScriptedInstance ObjectGuid SelectRandomGuardianEggGuid(); ObjectGuid SelectRandomSwarmerEggGuid(); + void GetJedogaControllersList(GUIDList &lList) { lList = m_lJedogaControllersGuidList; } + bool CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/); const char* Save() { return m_strInstData.c_str(); } @@ -67,6 +74,7 @@ class MANGOS_DLL_DECL instance_ahnkahet : public ScriptedInstance GUIDList m_GuardianEggList; GUIDList m_SwarmerEggList; + GUIDList m_lJedogaControllersGuidList; }; #endif diff --git a/scripts/northrend/azjol-nerub/ahnkahet/boss_jedoga.cpp b/scripts/northrend/azjol-nerub/ahnkahet/boss_jedoga.cpp index b4326918d..092799d30 100644 --- a/scripts/northrend/azjol-nerub/ahnkahet/boss_jedoga.cpp +++ b/scripts/northrend/azjol-nerub/ahnkahet/boss_jedoga.cpp @@ -46,6 +46,7 @@ enum SAY_VOLUNTEER_CHOOSEN = -1619031, // I have been choosen! SAY_VOLUNTEER_SACRIFICED = -1619032, // I give myself to the master! + SPELL_BEAM_VISUAL = 56312, SPELL_CYCLONE_STRIKE = 56855, SPELL_CYCLONE_STRIKE_H = 60030, SPELL_LIGHTNING_BOLT = 56891, @@ -57,7 +58,6 @@ enum SPELL_SACRIFICE_VISUAL = 56133, SPELL_SACRIFICE_BEAM = 56150, - NPC_JEDOGA_CONTROLLER = 30181, NPC_TWILIGHT_INITIATE = 30114, NPC_TWILIGHT_VOLUNTEER = 30385 }; diff --git a/scripts/northrend/azjol-nerub/ahnkahet/boss_taldaram.cpp b/scripts/northrend/azjol-nerub/ahnkahet/boss_taldaram.cpp index 49bb951b5..87bd2bb61 100644 --- a/scripts/northrend/azjol-nerub/ahnkahet/boss_taldaram.cpp +++ b/scripts/northrend/azjol-nerub/ahnkahet/boss_taldaram.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: Boss_Taldaram -SD%Complete: 20% -SDComment: +SD%Complete: 90% +SDComment: Timers; SDCategory: Ahn'kahet EndScriptData */ @@ -34,7 +34,24 @@ enum SAY_SLAY_1 = -1619013, SAY_SLAY_2 = -1619014, SAY_SLAY_3 = -1619015, - SAY_DEATH = -1619016 + SAY_DEATH = -1619016, + + SPELL_BEAM_VISUAL = 60342, // Visual spell, used before Taltaram is lowered to the ground + SPELL_CONJURE_FLAME_SPHERE = 55931, + SPELL_FLAME_ORB_SUMMON = 57752, // summons 30702 + SPELL_BLOODTHIRST = 55968, + SPELL_VANISH = 55964, + SPELL_EMBRACE_OF_THE_VAMPYR = 55959, + SPELL_EMBRACE_OF_THE_VAMPYR_H = 59513, + + // Spells used by the Flame Orb + SPELL_FLAME_ORB = 57750, + SPELL_FLAME_ORB_H = 58937, + SPELL_FLAME_SPHERE_SPAWN_EFFECT = 55891, + SPELL_FLAME_SPHERE_VISUAL = 55928, + SPELL_FLAME_SPHERE_DEATH_EFFECT = 55947, + + MAX_FLAME_ORBS = 3, }; /*###### @@ -45,21 +62,48 @@ struct MANGOS_DLL_DECL boss_taldaramAI : public ScriptedAI { boss_taldaramAI(Creature* pCreature) : ScriptedAI(pCreature) { - m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_pInstance = (instance_ahnkahet*)pCreature->GetInstanceData(); m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); + // Don't set the visual timers if the devices are already activated (reload case) + m_uiVisualTimer = m_pInstance->GetData(TYPE_TALDARAM) == SPECIAL ? 0 : 1000; Reset(); } - ScriptedInstance* m_pInstance; + instance_ahnkahet* m_pInstance; bool m_bIsRegularMode; + bool m_bIsFirstAggro; + uint32 m_uiVisualTimer; + uint32 m_uiBloodthirstTimer; + uint32 m_uiFlameOrbTimer; + uint32 m_uiVanishTimer; + uint32 m_uiVanishExpireTimer; + uint32 m_uiEmbraceTimer; + + GUIDList m_lFlameOrbsGuidList; + void Reset() { + // Timers seem to be very random... + m_uiBloodthirstTimer = urand(20000, 25000); + m_uiFlameOrbTimer = urand(15000, 20000); + m_uiVanishTimer = 0; + m_uiEmbraceTimer = 0; + m_uiVanishExpireTimer = 0; + m_bIsFirstAggro = false; } void Aggro(Unit* pWho) { + // Aggro is called after the boss vanish expires. There is no need to call this multiple times + if (m_bIsFirstAggro) + return; + DoScriptText(SAY_AGGRO, m_creature); + m_bIsFirstAggro = true; + + if (m_pInstance) + m_pInstance->SetData(TYPE_TALDARAM, IN_PROGRESS); } void KilledUnit(Unit* pVictim) @@ -80,11 +124,170 @@ struct MANGOS_DLL_DECL boss_taldaramAI : public ScriptedAI m_pInstance->SetData(TYPE_TALDARAM, DONE); } + void JustReachedHome() + { + if (m_pInstance) + m_pInstance->SetData(TYPE_TALDARAM, FAIL); + } + + void EnterEvadeMode() + { + // Don't allow him to evade during vanish + if (m_uiVanishExpireTimer) + return; + + m_creature->RemoveAllAuras(); + m_creature->DeleteThreatList(); + m_creature->CombatStop(true); + m_creature->LoadCreatureAddon(true); + + // should evade on the ground + if (m_creature->isAlive()) + m_creature->GetMotionMaster()->MovePoint(1, aTaldaramLandingLoc[0], aTaldaramLandingLoc[1], aTaldaramLandingLoc[2]); + + m_creature->SetLootRecipient(NULL); + + Reset(); + } + + void MovementInform(uint32 uiMoveType, uint32 uiPointId) + { + if (uiMoveType != POINT_MOTION_TYPE) + return; + + // Adjust orientation + if (uiPointId) + { + m_creature->SetLevitate(false); + m_creature->SetFacingTo(aTaldaramLandingLoc[3]); + } + } + + void JustSummoned(Creature* pSummoned) + { + pSummoned->CastSpell(pSummoned, SPELL_FLAME_SPHERE_SPAWN_EFFECT, true); + pSummoned->CastSpell(pSummoned, SPELL_FLAME_SPHERE_VISUAL, true); + + m_lFlameOrbsGuidList.push_back(pSummoned->GetObjectGuid()); + } + + void SummonedCreatureDespawn(Creature* pSummoned) + { + pSummoned->CastSpell(pSummoned, SPELL_FLAME_SPHERE_DEATH_EFFECT, true); + } + + // Wrapper which sends each orb in a different direction + void DoSetOrbsInMotion() + { + float fX, fY; + for (GUIDList::const_iterator itr = m_lFlameOrbsGuidList.begin(); itr != m_lFlameOrbsGuidList.end(); ++itr) + { + if (Creature* pOrb = m_creature->GetMap()->GetCreature(*itr)) + { + pOrb->CastSpell(pOrb, m_bIsRegularMode ? SPELL_FLAME_ORB : SPELL_FLAME_ORB_H, true); + + pOrb->GetNearPoint2D(fX, fY, 70.0f, (2*M_PI_F/3)*(*itr).GetCounter()); + pOrb->GetMotionMaster()->MovePoint(0, fX, fY, pOrb->GetPositionZ()); + } + } + } + void UpdateAI(const uint32 uiDiff) { + if (m_uiVisualTimer) + { + if (m_uiVisualTimer <= uiDiff) + { + GUIDList lControllersList; + if (m_pInstance) + m_pInstance->GetJedogaControllersList(lControllersList); + + for (GUIDList::const_iterator itr = lControllersList.begin(); itr != lControllersList.end(); ++itr) + { + if (Creature* pTemp = m_creature->GetMap()->GetCreature(*itr)) + pTemp->CastSpell(m_creature, SPELL_BEAM_VISUAL, false); + } + m_uiVisualTimer = 0; + } + else + m_uiVisualTimer -= uiDiff; + } + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; + if (m_uiVanishExpireTimer) + { + if (m_uiVanishExpireTimer <= uiDiff) + { + m_uiEmbraceTimer = 1000; + m_uiVanishExpireTimer = 0; + } + else + m_uiVanishExpireTimer -= uiDiff; + + // do not use other abilities during vanish + return; + } + + if (m_uiVanishTimer) + { + if (m_uiVanishTimer <= uiDiff) + { + if (DoCastSpellIfCan (m_creature, SPELL_VANISH) == CAST_OK) + { + DoScriptText(urand(0, 1) ? SAY_VANISH_1 : SAY_VANISH_2, m_creature); + m_uiVanishTimer = 0; + m_uiVanishExpireTimer = 2500; + } + } + else + m_uiVanishTimer -= uiDiff; + } + + // Cast Embrace of the Vampyr after Vanish expires + if (m_uiEmbraceTimer) + { + if (m_uiEmbraceTimer <= uiDiff) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, m_bIsRegularMode ? SPELL_EMBRACE_OF_THE_VAMPYR : SPELL_EMBRACE_OF_THE_VAMPYR_H) == CAST_OK) + { + DoScriptText(urand(0, 1) ? SAY_FEED_1 : SAY_FEED_2, m_creature); + m_uiEmbraceTimer = 0; + } + } + } + else + m_uiEmbraceTimer -= uiDiff; + } + + if (m_uiBloodthirstTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_BLOODTHIRST) == CAST_OK) + m_uiBloodthirstTimer = urand(20000, 25000); + } + else + m_uiBloodthirstTimer -= uiDiff; + + if (m_uiFlameOrbTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_CONJURE_FLAME_SPHERE) == CAST_OK) + { + m_lFlameOrbsGuidList.clear(); + + // Flame orbs are summoned above the boss + for (uint8 i = 0; i < MAX_FLAME_ORBS; ++i) + m_creature->CastSpell(m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ() + 5.0f, SPELL_FLAME_ORB_SUMMON, true); + + m_uiFlameOrbTimer = urand(50000, 60000); + m_uiVanishTimer = 12000; + } + } + else + m_uiFlameOrbTimer -= uiDiff; + DoMeleeAttackIfReady(); } }; @@ -94,6 +297,21 @@ CreatureAI* GetAI_boss_taldaram(Creature* pCreature) return new boss_taldaramAI(pCreature); } +bool EffectDummyCreature_spell_conjure_flame_orbs(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) +{ + //always check spellid and effectindex + if (uiSpellId == SPELL_CONJURE_FLAME_SPHERE && uiEffIndex == EFFECT_INDEX_0) + { + if (boss_taldaramAI* pBossAI = dynamic_cast(pCreatureTarget->AI())) + pBossAI->DoSetOrbsInMotion(); + + //always return true when we are handling this spell and effect + return true; + } + + return false; +} + /*###### ## go_nerubian_device ######*/ @@ -105,8 +323,11 @@ bool GOUse_go_nerubian_device(Player* pPlayer, GameObject* pGo) if (!pInstance) return false; + // Don't allow players to use the devices if encounter is already finished or in progress (reload case) + if (pInstance->GetData(TYPE_TALDARAM) == SPECIAL || pInstance->GetData(TYPE_TALDARAM) == DONE) + return false; + pInstance->SetData(TYPE_TALDARAM, SPECIAL); - pGo->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NO_INTERACT); return false; } @@ -117,6 +338,7 @@ void AddSC_boss_taldaram() pNewScript = new Script; pNewScript->Name = "boss_taldaram"; pNewScript->GetAI = &GetAI_boss_taldaram; + pNewScript->pEffectDummyNPC = &EffectDummyCreature_spell_conjure_flame_orbs; pNewScript->RegisterSelf(); pNewScript = new Script; diff --git a/scripts/northrend/azjol-nerub/ahnkahet/instance_ahnkahet.cpp b/scripts/northrend/azjol-nerub/ahnkahet/instance_ahnkahet.cpp index d900f497a..5a3253e5b 100644 --- a/scripts/northrend/azjol-nerub/ahnkahet/instance_ahnkahet.cpp +++ b/scripts/northrend/azjol-nerub/ahnkahet/instance_ahnkahet.cpp @@ -16,7 +16,7 @@ /* ScriptData SDName: instance_ahnkahet -SD%Complete: 0 +SD%Complete: 50 SDComment: SDCategory: Ahn'kahet EndScriptData */ @@ -41,6 +41,7 @@ void instance_ahnkahet::OnCreatureCreate(Creature* pCreature) switch(pCreature->GetEntry()) { case NPC_ELDER_NADOX: + case NPC_TALDARAM: m_mNpcEntryGuidStore[pCreature->GetEntry()] = pCreature->GetObjectGuid(); break; case NPC_AHNKAHAR_GUARDIAN_EGG: @@ -49,6 +50,9 @@ void instance_ahnkahet::OnCreatureCreate(Creature* pCreature) case NPC_AHNKAHAR_SWARM_EGG: m_SwarmerEggList.push_back(pCreature->GetObjectGuid()); break; + case NPC_JEDOGA_CONTROLLER: + m_lJedogaControllersGuidList.push_back(pCreature->GetObjectGuid()); + break; } } @@ -61,18 +65,15 @@ void instance_ahnkahet::OnObjectCreate(GameObject* pGo) pGo->SetGoState(GO_STATE_ACTIVE); break; case GO_VORTEX: - if (m_auiEncounter[TYPE_TALDARAM] != NOT_STARTED) + if (m_auiEncounter[TYPE_TALDARAM] == SPECIAL) pGo->SetGoState(GO_STATE_ACTIVE); break; case GO_ANCIENT_DEVICE_L: - if (m_auiEncounter[TYPE_TALDARAM] == NOT_STARTED) - pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NO_INTERACT); - return; case GO_ANCIENT_DEVICE_R: - if (m_auiEncounter[TYPE_TALDARAM] == NOT_STARTED) + if (m_auiEncounter[TYPE_NADOX] == DONE) pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NO_INTERACT); - return; + break; default: return; @@ -92,17 +93,32 @@ void instance_ahnkahet::SetData(uint32 uiType, uint32 uiData) m_bRespectElders = true; if (uiData == SPECIAL) m_bRespectElders = false; + if (uiData == DONE) + { + DoToggleGameObjectFlags(GO_ANCIENT_DEVICE_L, GO_FLAG_NO_INTERACT, false); + DoToggleGameObjectFlags(GO_ANCIENT_DEVICE_R, GO_FLAG_NO_INTERACT, false); + } break; case TYPE_TALDARAM: if (uiData == SPECIAL) { - if (m_uiDevicesActivated < 2) - ++m_uiDevicesActivated; + ++m_uiDevicesActivated; if (m_uiDevicesActivated == 2) { m_auiEncounter[uiType] = uiData; DoUseDoorOrButton(GO_VORTEX); + + // Lower Taldaram + if (Creature* pTaldaram = GetSingleCreatureFromStorage(NPC_TALDARAM)) + pTaldaram->GetMotionMaster()->MovePoint(1, aTaldaramLandingLoc[0], aTaldaramLandingLoc[1], aTaldaramLandingLoc[2]); + + // Interrupt the channeling + for (GUIDList::const_iterator itr = m_lJedogaControllersGuidList.begin(); itr != m_lJedogaControllersGuidList.end(); ++itr) + { + if (Creature* pTemp = instance->GetCreature(*itr)) + pTemp->InterruptNonMeleeSpells(false); + } } } if (uiData == DONE) @@ -126,7 +142,8 @@ void instance_ahnkahet::SetData(uint32 uiType, uint32 uiData) break; } - if (uiData == DONE) + // For some encounters Special data needs to be saved + if (uiData == DONE || uiData == SPECIAL) { OUT_SAVE_INST_DATA; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 087457b30..126946093 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2578" + #define SD2_REVISION_NR "2579" #endif // __SD2_REVISION_NR_H__ From 5cb9e81025b7eba8499dddfc4a4224807bc5bbf8 Mon Sep 17 00:00:00 2001 From: NeatElves Date: Tue, 5 Jun 2012 22:52:56 +0300 Subject: [PATCH 0568/1172] [2580] Remove more gossips which can now be handled by database Signed-off-by: Xfurry --- .../eastern_kingdoms/eastern_plaguelands.cpp | 50 +------------- scripts/eastern_kingdoms/ironforge.cpp | 66 +------------------ sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 2 - sql/updates/r2580_mangos.sql | 2 + 5 files changed, 6 insertions(+), 116 deletions(-) create mode 100644 sql/updates/r2580_mangos.sql diff --git a/scripts/eastern_kingdoms/eastern_plaguelands.cpp b/scripts/eastern_kingdoms/eastern_plaguelands.cpp index 7829c79d1..f5754aa8a 100644 --- a/scripts/eastern_kingdoms/eastern_plaguelands.cpp +++ b/scripts/eastern_kingdoms/eastern_plaguelands.cpp @@ -17,14 +17,13 @@ /* ScriptData SDName: Eastern_Plaguelands SD%Complete: 100 -SDComment: Quest support: 5211, 5742. +SDComment: Quest support: 5211. SDCategory: Eastern Plaguelands EndScriptData */ /* ContentData mobs_ghoul_flayer npc_darrowshire_spirit -npc_tirion_fordring EndContentData */ #include "precompiled.h" @@ -82,47 +81,6 @@ bool GossipHello_npc_darrowshire_spirit(Player* pPlayer, Creature* pCreature) return true; } -/*###### -## npc_tirion_fordring -######*/ - -bool GossipHello_npc_tirion_fordring(Player* pPlayer, Creature* pCreature) -{ - if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); - - if (pPlayer->GetQuestStatus(5742) == QUEST_STATUS_INCOMPLETE && pPlayer->getStandState() == UNIT_STAND_STATE_SIT) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "I am ready to hear your tale, Tirion.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); - - return true; -} - -bool GossipSelect_npc_tirion_fordring(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) -{ - switch(uiAction) - { - case GOSSIP_ACTION_INFO_DEF+1: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Thank you, Tirion. What of your identity?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); - pPlayer->SEND_GOSSIP_MENU(4493, pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF+2: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "That is terrible.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); - pPlayer->SEND_GOSSIP_MENU(4494, pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF+3: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "I will, Tirion.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4); - pPlayer->SEND_GOSSIP_MENU(4495, pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF+4: - pPlayer->CLOSE_GOSSIP_MENU(); - pPlayer->AreaExploredOrEventHappens(5742); - break; - } - return true; -} - void AddSC_eastern_plaguelands() { Script* pNewScript; @@ -137,10 +95,4 @@ void AddSC_eastern_plaguelands() pNewScript->GetAI = &GetAI_npc_darrowshire_spirit; pNewScript->pGossipHello = &GossipHello_npc_darrowshire_spirit; pNewScript->RegisterSelf(); - - pNewScript = new Script; - pNewScript->Name = "npc_tirion_fordring"; - pNewScript->pGossipHello = &GossipHello_npc_tirion_fordring; - pNewScript->pGossipSelect = &GossipSelect_npc_tirion_fordring; - pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/ironforge.cpp b/scripts/eastern_kingdoms/ironforge.cpp index 1a2e836b3..00da241ca 100644 --- a/scripts/eastern_kingdoms/ironforge.cpp +++ b/scripts/eastern_kingdoms/ironforge.cpp @@ -16,78 +16,16 @@ /* ScriptData SDName: Ironforge -SD%Complete: 100 -SDComment: Quest support: 3702 +SD%Complete: 0 +SDComment: Placeholder SDCategory: Ironforge EndScriptData */ /* ContentData -npc_royal_historian_archesonus EndContentData */ #include "precompiled.h" -/*###### -## npc_royal_historian_archesonus -######*/ - -#define GOSSIP_ITEM_ROYAL "I am ready to listen" -#define GOSSIP_ITEM_ROYAL_1 "That is tragic. How did this happen?" -#define GOSSIP_ITEM_ROYAL_2 "Interesting, continue please." -#define GOSSIP_ITEM_ROYAL_3 "Unbelievable! How dare they??" -#define GOSSIP_ITEM_ROYAL_4 "Of course I will help!" - -bool GossipHello_npc_royal_historian_archesonus(Player* pPlayer, Creature* pCreature) -{ - if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); - - if (pPlayer->GetQuestStatus(3702) == QUEST_STATUS_INCOMPLETE) - { - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_ROYAL, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF); - pPlayer->SEND_GOSSIP_MENU(2235, pCreature->GetObjectGuid()); - } - else - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); - - return true; -} - -bool GossipSelect_npc_royal_historian_archesonus(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) -{ - switch(uiAction) - { - case GOSSIP_ACTION_INFO_DEF: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_ROYAL_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); - pPlayer->SEND_GOSSIP_MENU(2236, pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF+1: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_ROYAL_2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); - pPlayer->SEND_GOSSIP_MENU(2237, pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF+2: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_ROYAL_3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); - pPlayer->SEND_GOSSIP_MENU(2238, pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF+3: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_ROYAL_4, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4); - pPlayer->SEND_GOSSIP_MENU(2239, pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF+4: - pPlayer->CLOSE_GOSSIP_MENU(); - pPlayer->AreaExploredOrEventHappens(3702); - break; - } - return true; -} - void AddSC_ironforge() { - Script* pNewScript; - - pNewScript = new Script; - pNewScript->Name = "npc_royal_historian_archesonus"; - pNewScript->pGossipHello = &GossipHello_npc_royal_historian_archesonus; - pNewScript->pGossipSelect = &GossipSelect_npc_royal_historian_archesonus; - pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 126946093..eacc39aab 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2579" + #define SD2_REVISION_NR "2580" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index d41841940..0127048b2 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -570,7 +570,6 @@ INSERT INTO scripted_areatrigger VALUES /* EASTERN PLAGUELANDS */ UPDATE creature_template SET ScriptName='mobs_ghoul_flayer' WHERE entry IN (8530,8531,8532); UPDATE creature_template SET ScriptName='npc_darrowshire_spirit' WHERE entry=11064; -UPDATE creature_template SET ScriptName='npc_tirion_fordring' WHERE entry=1855; /* EBON HOLD */ UPDATE creature_template SET ScriptName='npc_death_knight_initiate' WHERE entry=28406; @@ -728,7 +727,6 @@ UPDATE creature_template SET ScriptName='boss_forgemaster_garfrost' WHERE entry= /* ICECROWN */ /* IRONFORGE */ -UPDATE creature_template SET ScriptName='npc_royal_historian_archesonus' WHERE entry=8879; /* ISLE OF QUEL'DANAS */ UPDATE creature_template SET ScriptName='npc_converted_sentry' WHERE entry=24981; diff --git a/sql/updates/r2580_mangos.sql b/sql/updates/r2580_mangos.sql new file mode 100644 index 000000000..cb2069445 --- /dev/null +++ b/sql/updates/r2580_mangos.sql @@ -0,0 +1,2 @@ +UPDATE creature_template SET ScriptName='' WHERE entry=8879; +UPDATE creature_template SET ScriptName='' WHERE entry=1855; From 59c624b64f83c8a278b1fcee92d42df27415b042 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Thu, 7 Jun 2012 23:17:01 +0300 Subject: [PATCH 0569/1172] [2581] Implement script for Jedoga Shadowseeker - Ahn'kahet This will also add support for achievement 2056 --- .../northrend/azjol-nerub/ahnkahet/ahnkahet.h | 14 +- .../azjol-nerub/ahnkahet/boss_jedoga.cpp | 316 +++++++++++++++++- .../ahnkahet/instance_ahnkahet.cpp | 47 ++- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 + sql/updates/r2581_mangos.sql | 1 + 6 files changed, 361 insertions(+), 20 deletions(-) create mode 100644 sql/updates/r2581_mangos.sql diff --git a/scripts/northrend/azjol-nerub/ahnkahet/ahnkahet.h b/scripts/northrend/azjol-nerub/ahnkahet/ahnkahet.h index 85e1af5ca..6d8e71d95 100644 --- a/scripts/northrend/azjol-nerub/ahnkahet/ahnkahet.h +++ b/scripts/northrend/azjol-nerub/ahnkahet/ahnkahet.h @@ -14,6 +14,7 @@ enum { MAX_ENCOUNTER = 5, + MAX_INITIATES = 15, TYPE_NADOX = 0, TYPE_TALDARAM = 1, @@ -28,10 +29,11 @@ enum NPC_ELDER_NADOX = 29309, NPC_TALDARAM = 29308, - //NPC_JEDOGA_SHADOWSEEKER = 29310, + NPC_JEDOGA_SHADOWSEEKER = 29310, NPC_AHNKAHAR_GUARDIAN_EGG = 30173, NPC_AHNKAHAR_SWARM_EGG = 30172, NPC_JEDOGA_CONTROLLER = 30181, + NPC_TWILIGHT_INITIATE = 30114, ACHIEV_START_VOLAZJ_ID = 20382, @@ -40,6 +42,7 @@ enum }; static const float aTaldaramLandingLoc[4] = {528.734f, -845.998f, 11.54f, 0.68f}; +static const float aJedogaLandingLoc[4] = {375.4977f, -707.3635f, -16.094f, 5.42f}; class MANGOS_DLL_DECL instance_ahnkahet : public ScriptedInstance { @@ -51,13 +54,17 @@ class MANGOS_DLL_DECL instance_ahnkahet : public ScriptedInstance void OnCreatureCreate(Creature* pCreature); void OnObjectCreate(GameObject* pGo); + void OnCreatureDeath(Creature* pCreature); + void SetData(uint32 uiType, uint32 uiData); uint32 GetData(uint32 uiType); ObjectGuid SelectRandomGuardianEggGuid(); ObjectGuid SelectRandomSwarmerEggGuid(); + ObjectGuid SelectJedogaSacrificeControllerGuid() { return m_jedogaSacrificeController; } void GetJedogaControllersList(GUIDList &lList) { lList = m_lJedogaControllersGuidList; } + void GetJedogaEventControllersList(GUIDList &lList) {lList = m_lJedogaEventControllersGuidList; } bool CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/); @@ -69,12 +76,17 @@ class MANGOS_DLL_DECL instance_ahnkahet : public ScriptedInstance std::string m_strInstData; bool m_bRespectElders; + bool m_bVolunteerWork; uint8 m_uiDevicesActivated; + uint8 m_uiInitiatesKilled; + + ObjectGuid m_jedogaSacrificeController; GUIDList m_GuardianEggList; GUIDList m_SwarmerEggList; GUIDList m_lJedogaControllersGuidList; + GUIDList m_lJedogaEventControllersGuidList; }; #endif diff --git a/scripts/northrend/azjol-nerub/ahnkahet/boss_jedoga.cpp b/scripts/northrend/azjol-nerub/ahnkahet/boss_jedoga.cpp index 092799d30..9f6081e78 100644 --- a/scripts/northrend/azjol-nerub/ahnkahet/boss_jedoga.cpp +++ b/scripts/northrend/azjol-nerub/ahnkahet/boss_jedoga.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: Boss_Jedoga -SD%Complete: 40 -SDComment: +SD%Complete: 90 +SDComment: The movement points for the volunteers are not 100% blizzlike. On retail they use hardcoded points SDCategory: Ahn'kahet EndScriptData */ @@ -47,19 +47,36 @@ enum SAY_VOLUNTEER_SACRIFICED = -1619032, // I give myself to the master! SPELL_BEAM_VISUAL = 56312, + SPELL_SPHERE_VISUAL = 56075, // already included in creature_template_addon + SPELL_LIGHTNING_VISUAL = 56327, + SPELL_CYCLONE_STRIKE = 56855, SPELL_CYCLONE_STRIKE_H = 60030, SPELL_LIGHTNING_BOLT = 56891, SPELL_LIGHTNING_BOLT_H = 60032, SPELL_THUNDERSHOCK = 56926, SPELL_THUNDERSHOCK_H = 60029, - SPELL_GIFT_OF_THE_HERALD = 56219, + SPELL_HOVER_FALL = 56100, SPELL_SACRIFICE_VISUAL = 56133, SPELL_SACRIFICE_BEAM = 56150, + SPELL_VOLUNTEER_SPHERE = 56102, + SPELL_PILLAR_LIGHTNING = 56868, + + NPC_TWILIGHT_VOLUNTEER = 30385, - NPC_TWILIGHT_INITIATE = 30114, - NPC_TWILIGHT_VOLUNTEER = 30385 + MAX_VOLUNTEERS_PER_SIDE = 13, + + POINT_ID_PREPARE = 1, + POINT_ID_SACRIFICE = 2, + POINT_ID_LEVITATE = 3, + POINT_ID_COMBAT = 4, +}; + +static const float aVolunteerPosition[2][3] = +{ + {456.09f, -724.34f, -31.58f}, + {410.11f, -785.46f, -31.58f}, }; /*###### @@ -70,38 +87,48 @@ struct MANGOS_DLL_DECL boss_jedogaAI : public ScriptedAI { boss_jedogaAI(Creature* pCreature) : ScriptedAI(pCreature) { - m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_pInstance = (instance_ahnkahet*)pCreature->GetInstanceData(); m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); + m_bHasDoneIntro = false; Reset(); } - ScriptedInstance* m_pInstance; + instance_ahnkahet* m_pInstance; bool m_bIsRegularMode; + uint32 m_uiVisualTimer; uint32 m_uiThundershockTimer; uint32 m_uiCycloneStrikeTimer; uint32 m_uiLightningBoltTimer; uint8 m_uiSacrificeCount; bool m_bSacrifice; + bool m_bIsSacrificing; + bool m_bHasDoneIntro; + + GUIDList m_lVolunteerGuidList; void Reset() { m_uiThundershockTimer = 40000; m_uiCycloneStrikeTimer = 15000; m_uiLightningBoltTimer = 7000; + m_uiVisualTimer = 5000; m_bSacrifice = false; + m_bIsSacrificing = false; + + m_lVolunteerGuidList.clear(); + + SetCombatMovement(true); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); } - Creature* SelectRandomCreatureOfEntryInRange(uint32 uiEntry, float fRange) + ObjectGuid SelectRandomVolunteer() { - std::list lCreatureList; - GetCreatureListWithEntryInGrid(lCreatureList, m_creature, uiEntry, fRange); + if (m_lVolunteerGuidList.empty()) + return ObjectGuid(); - if (lCreatureList.empty()) - return NULL; - - std::list::iterator iter = lCreatureList.begin(); - advance(iter, urand(0, lCreatureList.size()-1)); + std::list::iterator iter = m_lVolunteerGuidList.begin(); + advance(iter, urand(0, m_lVolunteerGuidList.size()-1)); return *iter; } @@ -109,6 +136,10 @@ struct MANGOS_DLL_DECL boss_jedogaAI : public ScriptedAI void Aggro(Unit* pWho) { DoScriptText(SAY_AGGRO, m_creature); + DoCallVolunteers(); + + if (m_pInstance) + m_pInstance->SetData(TYPE_JEDOGA, IN_PROGRESS); } void KilledUnit(Unit* pVictim) @@ -124,17 +155,212 @@ struct MANGOS_DLL_DECL boss_jedogaAI : public ScriptedAI void JustDied(Unit* pKiller) { DoScriptText(SAY_DEATH, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_JEDOGA, DONE); + } + + void JustReachedHome() + { + if (m_pInstance) + m_pInstance->SetData(TYPE_JEDOGA, FAIL); + } + + void MoveInLineOfSight(Unit* pWho) + { + if (!m_bHasDoneIntro && pWho->GetTypeId() == TYPEID_PLAYER && m_creature->IsWithinLOSInMap(pWho)) + { + switch(urand(0, 4)) + { + case 0: DoScriptText(SAY_PREACHING1, m_creature); break; + case 1: DoScriptText(SAY_PREACHING2, m_creature); break; + case 2: DoScriptText(SAY_PREACHING3, m_creature); break; + case 3: DoScriptText(SAY_PREACHING4, m_creature); break; + case 4: DoScriptText(SAY_PREACHING5, m_creature); break; + } + m_bHasDoneIntro = true; + } + + ScriptedAI::MoveInLineOfSight(pWho); + } + + // Helper function which summons all the Volunteers + void DoCallVolunteers() + { + // The volunteers should be summoned on the bottom of each stair in 2 lines - 7 in the front line and 6 in the back line + // However, because this would involve too many hardcoded coordinates we'll summon this on random point near the stairs + + float fX, fY, fZ; + for (uint8 j = 0; j < 2; ++j) + { + for (uint8 i = 0; i < MAX_VOLUNTEERS_PER_SIDE; ++i) + { + // In order to get a good movement position we need to handle the coordinates calculation here, inside the iteration. + m_creature->GetRandomPoint(aVolunteerPosition[j][0], aVolunteerPosition[j][1], aVolunteerPosition[j][2], 10.0f, fX, fY, fZ); + if (Creature* pVolunteer = m_creature->SummonCreature(NPC_TWILIGHT_VOLUNTEER, fX, fY, fZ, 0, TEMPSUMMON_DEAD_DESPAWN, 0)) + { + // Adjust coordinates based on the wave number and side + float fDist = i < 7 ? 20.0f : 30.0f; + float fAngle = 0; + if (!j) + fAngle = i < 7 ? (i-2)*(3*M_PI_F/35) : (i-6)*(M_PI_F/16); + else + fAngle = i < 7 ? (i-10)*(3*M_PI_F/35) : 3*M_PI_F/2 - (i-6)*(M_PI_F/16); + + m_creature->GetNearPoint(m_creature, fX, fY, fZ, 0, fDist, fAngle); + pVolunteer->GetMotionMaster()->MovePoint(POINT_ID_PREPARE, fX, fY, fZ); + } + } + } + + // Summon one more Volunteer for the center position + m_creature->GetRandomPoint(aVolunteerPosition[0][0], aVolunteerPosition[0][1], aVolunteerPosition[0][2], 10.0f, fX, fY, fZ); + if (Creature* pVolunteer = m_creature->SummonCreature(NPC_TWILIGHT_VOLUNTEER, fX, fY, fZ, 0, TEMPSUMMON_DEAD_DESPAWN, 0)) + { + m_creature->GetNearPoint(m_creature, fX, fY, fZ, 0, 20.0f, 7*M_PI_F/4); + pVolunteer->GetMotionMaster()->MovePoint(POINT_ID_PREPARE, fX, fY, fZ); + } + } + + void JustSummoned(Creature* pSummoned) + { + if (pSummoned->GetEntry() == NPC_TWILIGHT_VOLUNTEER) + { + pSummoned->SetWalk(false); + pSummoned->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_UNK_6); + m_lVolunteerGuidList.push_back(pSummoned->GetObjectGuid()); + } + } + + void SummonedCreatureJustDied(Creature* pSummoned) + { + if (pSummoned->GetEntry() == NPC_TWILIGHT_VOLUNTEER) + { + m_lVolunteerGuidList.remove(pSummoned->GetObjectGuid()); + + if (m_pInstance) + { + if (Creature* pTemp = m_creature->GetMap()->GetCreature(m_pInstance->SelectJedogaSacrificeControllerGuid())) + pTemp->RemoveAurasDueToSpell(SPELL_SACRIFICE_VISUAL); + } + + m_creature->GetMotionMaster()->MovePoint(POINT_ID_COMBAT, aJedogaLandingLoc[0], aJedogaLandingLoc[1], aJedogaLandingLoc[2]); + } + } + + void SummonedMovementInform(Creature* pSummoned, uint32 uiType, uint32 uiPointId) + { + if (uiType != POINT_MOTION_TYPE || pSummoned->GetEntry() != NPC_TWILIGHT_VOLUNTEER) + return; + + if (uiPointId == POINT_ID_PREPARE) + { + pSummoned->CastSpell(pSummoned, SPELL_VOLUNTEER_SPHERE, true); + pSummoned->SetFacingToObject(m_creature); + pSummoned->SetStandState(UNIT_STAND_STATE_KNEEL); + } + else if (uiPointId == POINT_ID_SACRIFICE) + DoCastSpellIfCan(pSummoned, SPELL_SACRIFICE_BEAM); + } + + void MovementInform(uint32 uiMoveType, uint32 uiPointId) + { + if (uiMoveType != POINT_MOTION_TYPE) + return; + + switch (uiPointId) + { + // Prepare for combat + case POINT_ID_PREPARE: + + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + m_creature->RemoveAurasDueToSpell(SPELL_LIGHTNING_VISUAL); + m_creature->RemoveAurasDueToSpell(SPELL_SPHERE_VISUAL); + m_creature->SetLevitate(false); + break; + + // Prepare for sacrifice lift off + case POINT_ID_SACRIFICE: + DoCastSpellIfCan(m_creature, SPELL_HOVER_FALL); + m_creature->SetLevitate(true); + m_creature->GetMotionMaster()->MovePoint(POINT_ID_LEVITATE, m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ() + 10.0f); + break; + + // Call a volunteer to sacrifice + case POINT_ID_LEVITATE: + if (Creature* pVolunteer = m_creature->GetMap()->GetCreature(SelectRandomVolunteer())) + { + DoScriptText(urand(0, 1) ? SAY_CALL_SACRIFICE1 : SAY_CALL_SACRIFICE2, m_creature); + DoScriptText(SAY_VOLUNTEER_CHOOSEN, pVolunteer); + + pVolunteer->RemoveAurasDueToSpell(SPELL_VOLUNTEER_SPHERE); + pVolunteer->SetStandState(UNIT_STAND_STATE_STAND); + pVolunteer->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + pVolunteer->CastSpell(pVolunteer, SPELL_PILLAR_LIGHTNING, false); + pVolunteer->SetWalk(true); + pVolunteer->GetMotionMaster()->MovePoint(POINT_ID_SACRIFICE, aJedogaLandingLoc[0], aJedogaLandingLoc[1], aJedogaLandingLoc[2]); + } + + // Set visual aura + if (m_pInstance) + { + if (Creature* pTemp = m_creature->GetMap()->GetCreature(m_pInstance->SelectJedogaSacrificeControllerGuid())) + pTemp->CastSpell(pTemp, SPELL_SACRIFICE_VISUAL, false); + } + break; + + // Resume combat + case POINT_ID_COMBAT: + m_creature->RemoveAurasDueToSpell(SPELL_HOVER_FALL); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + + m_bIsSacrificing = false; + SetCombatMovement(true); + m_creature->SetLevitate(false); + if (m_creature->getVictim()) + m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); + break; + } } void UpdateAI(const uint32 uiDiff) { + if (m_uiVisualTimer) + { + if (m_uiVisualTimer <= uiDiff) + { + GUIDList lControllersList; + if (m_pInstance) + m_pInstance->GetJedogaEventControllersList(lControllersList); + + for (GUIDList::const_iterator itr = lControllersList.begin(); itr != lControllersList.end(); ++itr) + { + if (Creature* pTemp = m_creature->GetMap()->GetCreature(*itr)) + pTemp->CastSpell(m_creature, SPELL_BEAM_VISUAL, false); + } + + if (DoCastSpellIfCan(m_creature, SPELL_LIGHTNING_VISUAL) == CAST_OK) + m_uiVisualTimer = 0; + } + else + m_uiVisualTimer -= uiDiff; + } + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; + // Don't use abilities while sacrificing + if (m_bIsSacrificing) + return; + + // Note: this was changed in 3.3.2 and now it does this only once if (m_creature->GetHealthPercent() < 50.0f && !m_bSacrifice) { - // start sacrifice here + SetCombatMovement(false); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + m_creature->GetMotionMaster()->MovePoint(POINT_ID_SACRIFICE, aJedogaLandingLoc[0], aJedogaLandingLoc[1], aJedogaLandingLoc[2]); m_bSacrifice = true; + m_bIsSacrificing = true; } if (m_uiThundershockTimer < uiDiff) @@ -174,6 +400,58 @@ CreatureAI* GetAI_boss_jedoga(Creature* pCreature) return new boss_jedogaAI(pCreature); } +/*###### +## npc_twilight_volunteer +######*/ + +struct MANGOS_DLL_DECL npc_twilight_volunteerAI : public Scripted_NoMovementAI +{ + npc_twilight_volunteerAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; + + void Reset() { } + + void JustDied(Unit* pKiller) + { + // If it's not killed by Jedoga then set the achiev to fail + if (pKiller->GetEntry() == NPC_JEDOGA_SHADOWSEEKER) + return; + + if (m_pInstance) + m_pInstance->SetData(TYPE_JEDOGA, SPECIAL); + } + + void AttackStart(Unit* pWho) { } + void MoveInLineOfSight(Unit* pWho) { } + void UpdateAI(const uint32 uiDiff) { } +}; + +CreatureAI* GetAI_npc_twilight_volunteer(Creature* pCreature) +{ + return new npc_twilight_volunteerAI(pCreature); +} + +bool EffectAuraDummy_spell_aura_dummy_sacrifice_beam(const Aura* pAura, bool bApply) +{ + if (pAura->GetId() == SPELL_SACRIFICE_BEAM && pAura->GetEffIndex() == EFFECT_INDEX_0 && !bApply) + { + if (Creature* pTarget = (Creature*)pAura->GetTarget()) + { + if (ScriptedInstance* pInstance = (ScriptedInstance*)pTarget->GetInstanceData()) + { + if (Creature* pJedoga = pInstance->GetSingleCreatureFromStorage(NPC_JEDOGA_SHADOWSEEKER)) + pJedoga->DealDamage(pTarget, pTarget->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + } + } + } + return true; +} + void AddSC_boss_jedoga() { Script* pNewScript; @@ -182,4 +460,10 @@ void AddSC_boss_jedoga() pNewScript->Name = "boss_jedoga"; pNewScript->GetAI = &GetAI_boss_jedoga; pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_twilight_volunteer"; + pNewScript->GetAI = &GetAI_npc_twilight_volunteer; + pNewScript->pEffectAuraDummy = &EffectAuraDummy_spell_aura_dummy_sacrifice_beam; + pNewScript->RegisterSelf(); } diff --git a/scripts/northrend/azjol-nerub/ahnkahet/instance_ahnkahet.cpp b/scripts/northrend/azjol-nerub/ahnkahet/instance_ahnkahet.cpp index 5a3253e5b..ee3fab35b 100644 --- a/scripts/northrend/azjol-nerub/ahnkahet/instance_ahnkahet.cpp +++ b/scripts/northrend/azjol-nerub/ahnkahet/instance_ahnkahet.cpp @@ -16,7 +16,7 @@ /* ScriptData SDName: instance_ahnkahet -SD%Complete: 50 +SD%Complete: 75 SDComment: SDCategory: Ahn'kahet EndScriptData */ @@ -26,6 +26,8 @@ EndScriptData */ instance_ahnkahet::instance_ahnkahet(Map* pMap) : ScriptedInstance(pMap), m_bRespectElders(false), + m_bVolunteerWork(false), + m_uiInitiatesKilled(0), m_uiDevicesActivated(0) { Initialize(); @@ -42,6 +44,7 @@ void instance_ahnkahet::OnCreatureCreate(Creature* pCreature) { case NPC_ELDER_NADOX: case NPC_TALDARAM: + case NPC_JEDOGA_SHADOWSEEKER: m_mNpcEntryGuidStore[pCreature->GetEntry()] = pCreature->GetObjectGuid(); break; case NPC_AHNKAHAR_GUARDIAN_EGG: @@ -51,7 +54,16 @@ void instance_ahnkahet::OnCreatureCreate(Creature* pCreature) m_SwarmerEggList.push_back(pCreature->GetObjectGuid()); break; case NPC_JEDOGA_CONTROLLER: - m_lJedogaControllersGuidList.push_back(pCreature->GetObjectGuid()); + // Sort the controllers based on their purpose + if (pCreature->GetPositionZ() > 30.0f) + // Used for Taldaram visual + m_lJedogaControllersGuidList.push_back(pCreature->GetObjectGuid()); + else if (pCreature->GetPositionZ() > 20.0f) + // Used for Jedoga visual + m_lJedogaEventControllersGuidList.push_back(pCreature->GetObjectGuid()); + else if (pCreature->GetPositionZ() < -16.0f) + // Used for Jedoga sacrifice + m_jedogaSacrificeController = pCreature->GetObjectGuid(); break; } } @@ -128,6 +140,14 @@ void instance_ahnkahet::SetData(uint32 uiType, uint32 uiData) } break; case TYPE_JEDOGA: + m_auiEncounter[uiType] = uiData; + if (uiData == IN_PROGRESS) + m_bVolunteerWork = true; + if (uiData == SPECIAL) + m_bVolunteerWork = false; + if (uiData == FAIL) + m_uiInitiatesKilled = 0; + break; case TYPE_AMANITAR: m_auiEncounter[uiType] = uiData; break; @@ -158,6 +178,27 @@ void instance_ahnkahet::SetData(uint32 uiType, uint32 uiData) } } +void instance_ahnkahet::OnCreatureDeath(Creature* pCreature) +{ + if (pCreature->GetEntry() == NPC_TWILIGHT_INITIATE) + { + ++m_uiInitiatesKilled; + + // If all initiates are killed, then land Jedoga and stop the channeling + if (m_uiInitiatesKilled == MAX_INITIATES) + { + if (Creature* pJedoga = GetSingleCreatureFromStorage(NPC_JEDOGA_SHADOWSEEKER)) + pJedoga->GetMotionMaster()->MovePoint(1, aJedogaLandingLoc[0], aJedogaLandingLoc[1], aJedogaLandingLoc[2]); + + for (GUIDList::const_iterator itr = m_lJedogaEventControllersGuidList.begin(); itr != m_lJedogaEventControllersGuidList.end(); ++itr) + { + if (Creature* pTemp = instance->GetCreature(*itr)) + pTemp->InterruptNonMeleeSpells(false); + } + } + } +} + ObjectGuid instance_ahnkahet::SelectRandomGuardianEggGuid() { if (m_GuardianEggList.empty()) @@ -186,6 +227,8 @@ bool instance_ahnkahet::CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player { case ACHIEV_CRIT_RESPECT_ELDERS: return m_bRespectElders; + case ACHIEV_CRIT_VOLUNTEER_WORK: + return m_bVolunteerWork; default: return false; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index eacc39aab..fc1ef083d 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2580" + #define SD2_REVISION_NR "2581" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 0127048b2..ea5ecbd92 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -247,6 +247,7 @@ UPDATE creature_template SET ScriptName='npc_void_traveler' WHERE entry=19226; UPDATE creature_template SET ScriptName='boss_amanitar' WHERE entry=30258; UPDATE creature_template SET ScriptName='npc_amanitar_mushroom' WHERE entry IN (30391,30435); UPDATE creature_template SET ScriptName='boss_jedoga' WHERE entry=29310; +UPDATE creature_template SET ScriptName='npc_twilight_volunteer' WHERE entry=30385; UPDATE creature_template SET ScriptName='boss_nadox' WHERE entry=29309; UPDATE creature_template SET ScriptName='mob_ahnkahar_egg' WHERE entry IN (30172,30173); UPDATE creature_template SET ScriptName='boss_taldaram' WHERE entry=29308; diff --git a/sql/updates/r2581_mangos.sql b/sql/updates/r2581_mangos.sql new file mode 100644 index 000000000..c5ca2ac71 --- /dev/null +++ b/sql/updates/r2581_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_twilight_volunteer' WHERE entry=30385; From 15e245641df02d19af81619853d8b530d01ff484 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Fri, 8 Jun 2012 20:22:36 +0300 Subject: [PATCH 0570/1172] [2582] Fix a bug in Dark Portal instance This won't allow a new Time Rift to spawn when there are more than one rifts active and the oldest rift is killed This will also drop the Dummy Aura implementation and use SummonedJustDied in order to have a better script control Finally added some missing yells for the previous commit --- .../dark_portal/boss_chrono_lord_deja.cpp | 17 ------- .../dark_portal/boss_temporus.cpp | 17 ------- .../dark_portal/dark_portal.cpp | 45 ++++++++----------- .../azjol-nerub/ahnkahet/boss_jedoga.cpp | 3 ++ sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 - sql/updates/r2582_mangos.sql | 1 + 7 files changed, 23 insertions(+), 63 deletions(-) create mode 100644 sql/updates/r2582_mangos.sql diff --git a/scripts/kalimdor/caverns_of_time/dark_portal/boss_chrono_lord_deja.cpp b/scripts/kalimdor/caverns_of_time/dark_portal/boss_chrono_lord_deja.cpp index 6b630aa3f..bc30c19fe 100644 --- a/scripts/kalimdor/caverns_of_time/dark_portal/boss_chrono_lord_deja.cpp +++ b/scripts/kalimdor/caverns_of_time/dark_portal/boss_chrono_lord_deja.cpp @@ -149,22 +149,6 @@ CreatureAI* GetAI_boss_chrono_lord_deja(Creature* pCreature) return new boss_chrono_lord_dejaAI(pCreature); } -bool EffectAuraDummy_boss_chrono_lord_deja(const Aura* pAura, bool bApply) -{ - // Despawn the Time Rift when the aura is canceled - if (pAura->GetId() == SPELL_RIFT_CHANNEL && pAura->GetEffIndex() == EFFECT_INDEX_0 && !bApply) - { - if (Creature* pCaster = (Creature*)pAura->GetCaster()) - { - if (ScriptedInstance* pInstance = (ScriptedInstance*)pCaster->GetInstanceData()) - pInstance->SetData(TYPE_TIME_RIFT, DONE); - - pCaster->ForcedDespawn(3000); - } - } - return true; -} - void AddSC_boss_chrono_lord_deja() { Script* pNewScript; @@ -172,6 +156,5 @@ void AddSC_boss_chrono_lord_deja() pNewScript = new Script; pNewScript->Name = "boss_chrono_lord_deja"; pNewScript->GetAI = &GetAI_boss_chrono_lord_deja; - pNewScript->pEffectAuraDummy = &EffectAuraDummy_boss_chrono_lord_deja; pNewScript->RegisterSelf(); } diff --git a/scripts/kalimdor/caverns_of_time/dark_portal/boss_temporus.cpp b/scripts/kalimdor/caverns_of_time/dark_portal/boss_temporus.cpp index e01f7e45f..cc385ec52 100644 --- a/scripts/kalimdor/caverns_of_time/dark_portal/boss_temporus.cpp +++ b/scripts/kalimdor/caverns_of_time/dark_portal/boss_temporus.cpp @@ -148,22 +148,6 @@ CreatureAI* GetAI_boss_temporus(Creature* pCreature) return new boss_temporusAI(pCreature); } -bool EffectAuraDummy_boss_temporus(const Aura* pAura, bool bApply) -{ - // Despawn the Time Rift when the aura is canceled - if (pAura->GetId() == SPELL_RIFT_CHANNEL && pAura->GetEffIndex() == EFFECT_INDEX_0 && !bApply) - { - if (Creature* pCaster = (Creature*)pAura->GetCaster()) - { - if (ScriptedInstance* pInstance = (ScriptedInstance*)pCaster->GetInstanceData()) - pInstance->SetData(TYPE_TIME_RIFT, DONE); - - pCaster->ForcedDespawn(3000); - } - } - return true; -} - void AddSC_boss_temporus() { Script* pNewScript; @@ -171,6 +155,5 @@ void AddSC_boss_temporus() pNewScript = new Script; pNewScript->Name = "boss_temporus"; pNewScript->GetAI = &GetAI_boss_temporus; - pNewScript->pEffectAuraDummy = &EffectAuraDummy_boss_temporus; pNewScript->RegisterSelf(); } diff --git a/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.cpp b/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.cpp index 280725e9a..fabf439a9 100644 --- a/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.cpp +++ b/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.cpp @@ -157,6 +157,7 @@ struct MANGOS_DLL_DECL npc_time_riftAI : public ScriptedAI DoCastSpellIfCan(m_creature, SPELL_RIFT_PERIODIC); m_uiRiftWaveCount = 0; + m_uiRiftNumber = 0; if (m_pInstance) { @@ -280,8 +281,23 @@ struct MANGOS_DLL_DECL npc_time_riftAI : public ScriptedAI void SummonedCreatureJustDied(Creature* pSummoned) { - if (pSummoned->GetEntry() == NPC_AEONUS) - m_creature->ForcedDespawn(); + switch (pSummoned->GetEntry()) + { + case NPC_AEONUS: + m_creature->ForcedDespawn(); + break; + case NPC_CHRONO_LORD_DEJA: + case NPC_TEMPORUS: + case NPC_CHRONO_LORD: + case NPC_TIMEREAVER: + case NPC_RIFT_KEEPER: + case NPC_RIFT_LORD: + m_creature->ForcedDespawn(3000); + // No need to set the data to DONE if there is a new portal spawned already + if (m_pInstance && m_uiRiftNumber == m_pInstance->GetCurrentRiftId()) + m_pInstance->SetData(TYPE_TIME_RIFT, DONE); + break; + } } void SummonedMovementInform(Creature* pSummoned, uint32 uiMotionType, uint32 uiPointId) @@ -315,26 +331,6 @@ bool EffectDummyCreature_npc_time_rift_channel(Unit* pCaster, uint32 uiSpellId, return false; } -/*###### -## npc_time_rift_channeler -######*/ - -bool EffectAuraDummy_npc_time_rift_channeler(const Aura* pAura, bool bApply) -{ - // Despawn the Time Rift when the aura is canceled - if (pAura->GetId() == SPELL_RIFT_CHANNEL && pAura->GetEffIndex() == EFFECT_INDEX_0 && !bApply) - { - if (Creature* pCaster = (Creature*)pAura->GetCaster()) - { - if (ScriptedInstance* pInstance = (ScriptedInstance*)pCaster->GetInstanceData()) - pInstance->SetData(TYPE_TIME_RIFT, DONE); - - pCaster->ForcedDespawn(3000); - } - } - return true; -} - void AddSC_dark_portal() { Script* pNewScript; @@ -350,9 +346,4 @@ void AddSC_dark_portal() pNewScript->GetAI = &GetAI_npc_time_rift; pNewScript->pEffectDummyNPC = &EffectDummyCreature_npc_time_rift_channel; pNewScript->RegisterSelf(); - - pNewScript = new Script; - pNewScript->Name = "npc_time_rift_channeler"; - pNewScript->pEffectAuraDummy = &EffectAuraDummy_npc_time_rift_channeler; - pNewScript->RegisterSelf(); } diff --git a/scripts/northrend/azjol-nerub/ahnkahet/boss_jedoga.cpp b/scripts/northrend/azjol-nerub/ahnkahet/boss_jedoga.cpp index 9f6081e78..41110861d 100644 --- a/scripts/northrend/azjol-nerub/ahnkahet/boss_jedoga.cpp +++ b/scripts/northrend/azjol-nerub/ahnkahet/boss_jedoga.cpp @@ -260,7 +260,10 @@ struct MANGOS_DLL_DECL boss_jedogaAI : public ScriptedAI pSummoned->SetStandState(UNIT_STAND_STATE_KNEEL); } else if (uiPointId == POINT_ID_SACRIFICE) + { DoCastSpellIfCan(pSummoned, SPELL_SACRIFICE_BEAM); + DoScriptText(urand(0, 1) ? SAY_SACRIFICE1 : SAY_SACRIFICE2, m_creature); + } } void MovementInform(uint32 uiMoveType, uint32 uiPointId) diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index fc1ef083d..dde4aa0b6 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2581" + #define SD2_REVISION_NR "2582" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index ea5ecbd92..ec7980466 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -443,7 +443,6 @@ UPDATE creature_template SET ScriptName='boss_temporus' WHERE entry=17880; UPDATE instance_template SET ScriptName='instance_dark_portal' WHERE map=269; UPDATE creature_template SET ScriptName='npc_medivh_black_morass' WHERE entry=15608; UPDATE creature_template SET ScriptName='npc_time_rift' WHERE entry=17838; -UPDATE creature_template SET ScriptName='npc_time_rift_channeler' WHERE entry IN (21104,17839,21697,21698); /* */ /* COILFANG RESERVOIR */ diff --git a/sql/updates/r2582_mangos.sql b/sql/updates/r2582_mangos.sql new file mode 100644 index 000000000..e3d5fb5e3 --- /dev/null +++ b/sql/updates/r2582_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='' WHERE entry IN (21104,17839,21697,21698); From 46519a8cfbbe2f259d80b8821b5f641325809d27 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Sat, 9 Jun 2012 15:37:25 +0200 Subject: [PATCH 0571/1172] [2583] Add SQL-Guide to docs, fix a warning --- docs/SQL_guide.txt | 257 ++++++++++++++++++++ docs/Text-tables.txt | 5 +- docs/aaa_Overview.html | 13 +- docs/aaa_Overview.txt | 9 +- scripts/northrend/gundrak/boss_colossus.cpp | 2 + sd2_revision_nr.h | 2 +- 6 files changed, 282 insertions(+), 6 deletions(-) create mode 100644 docs/SQL_guide.txt diff --git a/docs/SQL_guide.txt b/docs/SQL_guide.txt new file mode 100644 index 000000000..3e27507e5 --- /dev/null +++ b/docs/SQL_guide.txt @@ -0,0 +1,257 @@ +[GUIDE] Introduction to Database content for SD2 +================================================ + +This guide is intended to help people + +* to understand which information of the database is used with SD2 +* who want to contribute their patches as complete as possible + +All sql-related files are located in the ScriptDev2/sql and subsequent directories. + +SQL-Files +--------- + +Files that contain full SD2-Database content +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +For a script we usually have to take care of these files: + +* mangos_scriptname_full.sql ++ +This file is applied to the world database (default: mangos), and contains the ScriptNames ++ +* scriptdev2_script_full.sql ++ +This file is applied to the sd2 database (default: scriptdev2), and contains texts, gossip-items and waypoints + +Patchfiles for incremental Updates +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Patches for the databases are stored in the files: + +* Updates/rXXXX_mangos.sql ++ +This file contains the changes that should be done with the patch to the world-databse ++ +* Updates/rXXXX_scriptdev2.sql ++ +This file contains the changes that should be done with the patch to the scriptdev2-database + +World-Database +-------------- + +ScriptNames of NPCs: +~~~~~~~~~~~~~~~~~~~~ + +If we need to assign a ScriptName to a NPC (GameObject-Scripts are similar) the statement is: + +----------- +UPDATE creature_template SET ScriptName='npc_and_his_name' WHERE entry=XYZ; +----------- +or +----------- +UPDATE creature_template SET ScriptName='npc_something_identifying' WHERE entry IN (XYZ, ZYX); +----------- + +'Remark:' For creatures with many difficulty entries, only the one for normal difficulty needs the ScriptName. + +ScriptNames for scripted_areatrigger: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +For Areatriggers (or scripted_event_id) we usally cannot use UPDATE, hence we need to DELETE possible old entries first: + +----------- +DELETE FROM scripted_areatrigger WHERE entry=XYZ; +INSERT INTO scripted_areatrigger VALUES (XYZ, at_some_place); +----------- + +ScriptDev2-Database +------------------- + +entry-Format for texts and for gossip-texts: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The to be used entry is a combination of the number depending on the map and a counter. + +* This is for texts: -1 +* For gossip-texts: -3 ++ +where is the ID of the map for instances, or 000 for all other maps. + +Example: Text on WorldMap +^^^^^^^^^^^^^^^^^^^^^^^^^ + +Let's say we want to add a new text to a NPC on Kalimdor (no instance), +then we need to look which is the last text entry of the format -1000XYZ +(this one can be found in scriptdev2_script_full.sql). + +On the moment where I write this guide this is: + +---------- +(-1000589,'Kroshius live? Kroshius crush!',0,1,0,0,'SAY_KROSHIUS_REVIVE'); +---------- + +so our first text entry will be -1000590. + +Example: Gossip-Item in Instance +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Let's say we want to add a new gossip item to a NPC in Culling of Stratholme, this map has the ID 595. +At this moment there is already some gossip_text, and the last one is + +------------ +(-3595005,'So how does the Infinite Dragonflight plan to interfere?','chromie GOSSIP_ITEM_INN_3'); +------------ + +so our first gossip-text entry will be -3595006. + +Format for texts +~~~~~~~~~~~~~~~~ + +The format is `(entry,content_default,sound,type,language,emote,comment)` with these meanings: + +entry:: should now be clear ;) +content_default:: is the text (in english) enclosed with '. + + There are a few placeholders that can be used: + + +[horizontal] +%s;; self, is the name of the Unit saying the text + +The $-placeholders work only if you use DoScriptText with a 'target'. +$N, $n;; the [N, n]ame of the target +$C, $c;; the [C, c]lass of the target +$R, $r;; the [R, r]ace of the target +$GA:B; ;; if the target is male then A else B is displayed, Example: ++ +-------------------------------- +'Time to teach you a lesson in manners, little $Gboy:girl;!' +-------------------------------- ++ +Remember to escape [red]#\'# with [red]#\'#, Example: ++ +-------------------------------- +'That \'s my favourite chocolate bar'. +-------------------------------- +sound:: is the sound ID that shall be played on saying, they are stored in SoundEntries.dbc ++ +[quote, Ntsc] +_____________________________ +Sound Ids are stored within the SoundEntries.dbc file. Within that dbc file you will find a reference to the actual file that is played. We cannot help you with reading these files so please do not ask how. +_____________________________ ++ +type:: is the type of the text, there are these possibilities: ++ +------------- +0 CHAT_TYPE_SAY - 'white' text +1 CHAT_TYPE_YELL - 'red' text +2 CHAT_TYPE_TEXT_EMOTE - 'yellow' emote-text (no ... ) +3 CHAT_TYPE_BOSS_EMOTE - 'big yellow' emote-text displayed in the center of the screen +4 CHAT_TYPE_WHISPER - whisper, needs a target +5 CHAT_TYPE_BOSS_WHISPER - whipser, needs a target +6 CHAT_TYPE_ZONE_YELL - 'red' text, displayed to everyone in the zone +-------------- ++ +language:: is the language of the text (like LANG_GNOMISH), see +enum Language+ in `game/SharedDefines.h` -- usually zero (LANG_UNIVERSAL) +emote:: is the emote the npc shall perform on saying the text, can be found in +enum Emote+ in `game/SharedDefines.h` +comment:: is a comment to this text, usually the used enum of the script, like SAY_KROSHIUS_REVIVE, if this enum is not identifying the npc, then the name of the npc is put before. + +Format for gossip-texts +~~~~~~~~~~~~~~~~~~~~~~~ + +The format for gossip texts is `(entry,content_default,comment)` + +The fields have the same meaning as for script-texts. + +Format for waypoints +~~~~~~~~~~~~~~~~~~~~ + +The format for waypoints is `(entry,pointid,location_x,location_y,location_z,waittime,point_comment)` with these meanings: + +entry:: is the entry of the scripted NPC +pointid:: is the ID of the point, usally starting with 01, and increasing +location_*:: describes the position of the waypoint +waittime:: is the time, the mob will wait after reaching _this_ waypoint, before he continues to go to the next +point_comment:: is used to note if something special is happening at this point, like quest credit + + +Creating the Patch +------------------ + +There are different ways to get to a patch, I prefer this workflow: + +For the scriptdev2 database (patch files): +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Open scriptdev2_script_full.txt + +scroll to the right place for the needed SQL-statements, to note the entry. + +(for texts depending on mapId, and to the last counter, for waypoints behind the last inserted waypoint) + +Example for normal world text: +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Assume the last entry in your map (here world-map) was: + +-------------- +(-1000589,'Kroshius live? Kroshius crush!',0,1,0,0,'SAY_KROSHIUS_REVIVE'); +-------------- + +Now create a new file: Updates/r0000_scriptdev2.sql +Add there: + +----------- +DELETE FROM script_texts WHERE entry=-1000590; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1000590,'My fancy aggro-text',0,1,0,0,'boss_hogger SAY_AGGRO'); +----------- +or +----------- +DELETE FROM script_texts WHERE entry BETWEEN -1000592 AND -1000590; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1000590,'My fancy aggro-text1',0,1,0,0,'boss_hogger SAY_AGGRO1'), +(-1000591,'My fancy aggro-text2',0,1,0,0,'boss_hogger SAY_AGGRO2'), +(-1000592,'My fancy aggro-text3',0,1,0,0,'boss_hogger SAY_AGGRO3'); +----------- + +Hint: the INSERT statements can also be copied from the scriptdev2_script_full.sql + +Example for waypoints: +^^^^^^^^^^^^^^^^^^^^^^ + +The required SQL code to add a waypoint is: + +---------- +DELETE FROM script_waypoint WHERE entry=; +INSERT INTO script_waypoint VALUES +(, 1, 4013.51,6390.33, 29.970, 0, ' - start escort'), +(, 2, 4060.51,6400.33, 20.970, 0, ' - finish escort'); +---------- + +When the Update file is done, append an additional empty line + +And test these lines for correctness! + +For the scriptdev2 database (full files): +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +If everything works alright, and you finally intend to prepare the full-patch, copy the SQL-Code that is needed to the proper place in scriptdev2_script_full.sql, +(for a new npc add an empty line), and change the semicolon to a comma: + +Example for world text: +^^^^^^^^^^^^^^^^^^^^^^ + +----------- +(-1000589,'Kroshius live? Kroshius crush!',0,1,0,0,'SAY_KROSHIUS_REVIVE'), + +(-1000590,'My fancy aggro-text',0,1,0,0,'boss_hogger SAY_AGGRO'); +----------- + +The waypoints are added behind the last waypoint, after an empty line. + +For the world database: +~~~~~~~~~~~~~~~~~~~~~~~ + +Create a new file: Updates/r0000_mangos.sql + +In this file put the needed statements for your ScriptNames, append an empty line, convert lineendings to Unix, and then test it for correctness. + +If everything is alright, open mangos_scriptname_full.sql and go to the right place (this is usally sorted alphabetically by zone). + +Insert the needed statement where it fits (usally again ordered alphabetically) + +After this is done, Create a patch including the (untracked) files in Update/ + +then you have all information in the created patch, and anyone who wants to test your patch just needs to apply the created files from Updates/ diff --git a/docs/Text-tables.txt b/docs/Text-tables.txt index 11c419720..75188ecbf 100644 --- a/docs/Text-tables.txt +++ b/docs/Text-tables.txt @@ -12,11 +12,12 @@ The different tables has ranges of entries allowed for that table. Reserved EventAI in Mangos entry -1 -> -999999 script_texts: entry -1000000 -> -1999999 custom_texts: entry -2000000 -> -2999999 +gossip_texts: entry -3000000 -> -3999999 Any entry out of range for that table will display a start-up error. ========================================= -Basic Structure of script_texts and custom_texts +Basic Structure of script_texts, custom_texts and gossip_texts ========================================= Below is a the list of current fields within the texts tables. @@ -38,8 +39,10 @@ sound This value is the Sound ID that corresponds to the actual type Variables used to define type of text (Say/Yell/Textemote/Whisper). language This value is the Language that the text is native in (Defined in Languages.dbc). emote Value from enum Emote (defined in Emotes.dbc). Only source of text will play this emote (not target, if target are defined in DoScriptText) + comment This is a comment regarding the text entry (For ACID, accepted format is to use Creature ID of NPC using it). +Note: sound, type, language and emote exist only in tables script_texts and custom_texts Note: Fields `content_loc1` to `content_loc8` are NULL values by default and are handled by separate localization projects. diff --git a/docs/aaa_Overview.html b/docs/aaa_Overview.html index 41169a948..65bf61b37 100644 --- a/docs/aaa_Overview.html +++ b/docs/aaa_Overview.html @@ -759,7 +759,14 @@
-

4. Old documentation files

+

4. Database content used with SD2

+
+

Guide for SD2 SQL-Files - Look here for an overview how to manipulate the database content in SD2

+

Text-tables.txt - Manual like documentation for the tables `script_texts` and `custom_texts`

+
+
+
+

5. Old documentation files

@@ -775,7 +782,7 @@

4. Old documentation files

-Documentation of the layout of the tables script_texts and custom_texts +Documentation of the layout of the tables `script_texts`, `custom_texts` and `gossip_texts`

@@ -785,7 +792,7 @@

4. Old documentation files


diff --git a/docs/aaa_Overview.txt b/docs/aaa_Overview.txt index 007e0fd34..f7a5e1c2d 100644 --- a/docs/aaa_Overview.txt +++ b/docs/aaa_Overview.txt @@ -22,9 +22,16 @@ link:GIT_guide_2_normal_use.html[Normal use of Git] - Look here if you want to d link:GIT_guide_3_advanced_use.html[Advanced use of Git] - Look here if you want to dig deeper into Git, this also contains some configuration settings for Git +Database content used with SD2 +------------------------------ + +link:SQL_guide.html[Guide for SD2 SQL-Files] - Look here for an overview how to manipulate the database content in SD2 + +link:Text-tables.txt[] - Manual like documentation for the tables \`script_texts` and \`custom_texts` + Old documentation files ----------------------- link:Script_Layout.txt[] :: Information about the subfolders of the `scripts` directory -link:Text-tables.txt[] :: Documentation of the layout of the tables script_texts and custom_texts +link:Text-tables.txt[] :: Documentation of the layout of the tables \`script_texts`, \`custom_texts` and \`gossip_texts` diff --git a/scripts/northrend/gundrak/boss_colossus.cpp b/scripts/northrend/gundrak/boss_colossus.cpp index a50b38831..0922960d6 100644 --- a/scripts/northrend/gundrak/boss_colossus.cpp +++ b/scripts/northrend/gundrak/boss_colossus.cpp @@ -367,6 +367,8 @@ struct MANGOS_DLL_DECL npc_living_mojoAI : public ScriptedAI if (m_pInstance) { float fX, fY, fZ; + m_creature->GetPosition(fX, fY, fZ); + if (Creature* pColossus = m_pInstance->GetSingleCreatureFromStorage(NPC_COLOSSUS)) pColossus->GetPosition(fX, fY, fZ); diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index dde4aa0b6..185e2847c 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2582" + #define SD2_REVISION_NR "2583" #endif // __SD2_REVISION_NR_H__ From 61bbe08eec97a329b8cc758ca8c6930d4df5c7e6 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Mon, 11 Jun 2012 22:52:18 +0300 Subject: [PATCH 0572/1172] [2584] Instance script update for the Violet Hold This will implement the following: * Prison door seal support * Trash mobs movement and behavior * Proper event reset and cleanup * Support for Zuramat achievement 2153 ToDo: * Intro portals and the prison defense system spells require additional research * This will also require some changes in the trash mobs eventAI scripts Additional content: * Add one more update to the Dark Portal instance in order to proper reset the event * Update some codestyle in Prince Taldaram script --- .../dark_portal/dark_portal.cpp | 17 + .../azjol-nerub/ahnkahet/boss_taldaram.cpp | 4 +- .../violet_hold/instance_violet_hold.cpp | 182 +++++-- scripts/northrend/violet_hold/violet_hold.cpp | 461 +++++++++++++----- scripts/northrend/violet_hold/violet_hold.h | 72 ++- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 + sql/scriptdev2_script_full.sql | 18 +- sql/updates/r2584_mangos.sql | 1 + sql/updates/r2584_scriptdev2.sql | 16 + 10 files changed, 587 insertions(+), 187 deletions(-) create mode 100644 sql/updates/r2584_mangos.sql create mode 100644 sql/updates/r2584_scriptdev2.sql diff --git a/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.cpp b/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.cpp index fabf439a9..6b2411eac 100644 --- a/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.cpp +++ b/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.cpp @@ -300,6 +300,23 @@ struct MANGOS_DLL_DECL npc_time_riftAI : public ScriptedAI } } + void SummonedCreatureDespawn(Creature* pSummoned) + { + switch (pSummoned->GetEntry()) + { + case NPC_AEONUS: + case NPC_CHRONO_LORD_DEJA: + case NPC_TEMPORUS: + case NPC_CHRONO_LORD: + case NPC_TIMEREAVER: + case NPC_RIFT_KEEPER: + case NPC_RIFT_LORD: + // Despawn in case of event reset + m_creature->ForcedDespawn(); + break; + } + } + void SummonedMovementInform(Creature* pSummoned, uint32 uiMotionType, uint32 uiPointId) { if (uiMotionType != POINT_MOTION_TYPE || !uiPointId || pSummoned->GetEntry() != NPC_AEONUS) diff --git a/scripts/northrend/azjol-nerub/ahnkahet/boss_taldaram.cpp b/scripts/northrend/azjol-nerub/ahnkahet/boss_taldaram.cpp index 87bd2bb61..e8b8fa481 100644 --- a/scripts/northrend/azjol-nerub/ahnkahet/boss_taldaram.cpp +++ b/scripts/northrend/azjol-nerub/ahnkahet/boss_taldaram.cpp @@ -180,15 +180,17 @@ struct MANGOS_DLL_DECL boss_taldaramAI : public ScriptedAI void DoSetOrbsInMotion() { float fX, fY; + uint8 uiIndex = 0; for (GUIDList::const_iterator itr = m_lFlameOrbsGuidList.begin(); itr != m_lFlameOrbsGuidList.end(); ++itr) { if (Creature* pOrb = m_creature->GetMap()->GetCreature(*itr)) { pOrb->CastSpell(pOrb, m_bIsRegularMode ? SPELL_FLAME_ORB : SPELL_FLAME_ORB_H, true); - pOrb->GetNearPoint2D(fX, fY, 70.0f, (2*M_PI_F/3)*(*itr).GetCounter()); + pOrb->GetNearPoint2D(fX, fY, 70.0f, (2*M_PI_F/3)*uiIndex); pOrb->GetMotionMaster()->MovePoint(0, fX, fY, pOrb->GetPositionZ()); } + ++uiIndex; } } diff --git a/scripts/northrend/violet_hold/instance_violet_hold.cpp b/scripts/northrend/violet_hold/instance_violet_hold.cpp index 2d83a08aa..cba474e0d 100644 --- a/scripts/northrend/violet_hold/instance_violet_hold.cpp +++ b/scripts/northrend/violet_hold/instance_violet_hold.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: Instance_Violet_Hold -SD%Complete: 50 -SDComment: "experimental" use of header/source object +SD%Complete: 75 +SDComment: Prison defense system requires more research SDCategory: Violet Hold EndScriptData */ @@ -29,6 +29,13 @@ instance_violet_hold::instance_violet_hold(Map* pMap) : ScriptedInstance(pMap), m_uiWorldStateSealCount(100), m_uiWorldStatePortalCount(0), + m_bIsVoidDance(false), + m_bIsDefenseless(false), + m_bIsDehydratation(false), + + m_uiSealYellCount(0), + m_uiEventResetTimer(0), + m_uiPortalId(0), m_uiPortalTimer(0), m_uiMaxCountPortalLoc(0) @@ -46,6 +53,7 @@ void instance_violet_hold::ResetVariables() { m_uiWorldStateSealCount = 100; m_uiWorldStatePortalCount = 0; + m_uiSealYellCount = 0; } void instance_violet_hold::ResetAll() @@ -54,6 +62,10 @@ void instance_violet_hold::ResetAll() UpdateWorldState(false); CallGuards(true); SetIntroPortals(false); + // ToDo: reset the activation crystals when implemented + + // open instance door + DoUseDoorOrButton(GO_PRISON_SEAL_DOOR); for (std::vector::const_iterator itr = m_vRandomBosses.begin(); itr != m_vRandomBosses.end(); ++itr) { @@ -64,13 +76,30 @@ void instance_violet_hold::ResetAll() { if (!pGhostBoss->isAlive()) pGhostBoss->Respawn(); + + // Reset passive flags + pGhostBoss->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PASSIVE); } else if (Creature* pSummoner = GetSingleCreatureFromStorage(NPC_SINCLARI_ALT)) pSummoner->SummonCreature(pData->uiGhostEntry, (*itr)->fX, (*itr)->fY, (*itr)->fZ, (*itr)->fO, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 600*IN_MILLISECONDS); - // Close Door if still open - UpdateCellForBoss(pData->uiEntry, true); + // Respawn Erekem guards + if (pData->uiType == TYPE_EREKEM) + { + for (GUIDList::const_iterator itr = m_lErekemGuardList.begin(); itr != m_lErekemGuardList.end(); ++itr) + { + if (Creature* pGuard = instance->GetCreature(*itr)) + { + pGuard->Respawn(); + pGuard->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PASSIVE); + } + } + } } + + // Close Door if still open + if (pData && (m_auiEncounter[pData->uiType] == DONE || m_auiEncounter[pData->uiType] == FAIL)) + UpdateCellForBoss(pData->uiEntry, true); } } @@ -81,6 +110,7 @@ void instance_violet_hold::OnCreatureCreate(Creature* pCreature) case NPC_SINCLARI: case NPC_SINCLARI_ALT: case NPC_DOOR_SEAL: + case NPC_EVENT_CONTROLLER: break; case NPC_EREKEM: @@ -98,6 +128,9 @@ void instance_violet_hold::OnCreatureCreate(Creature* pCreature) case NPC_HOLD_GUARD: m_lGuardsList.push_back(pCreature->GetObjectGuid()); return; + case NPC_EREKEM_GUARD: + m_lErekemGuardList.push_back(pCreature->GetObjectGuid()); + return; case NPC_ARAKKOA: case NPC_VOID_LORD: @@ -164,7 +197,7 @@ void instance_violet_hold::UpdateCellForBoss(uint32 uiBossEntry, bool bForceClos else { GameObject* pGo = instance->GetGameObject(itr->second); - if (pGo && pGo->GetGoType() == GAMEOBJECT_TYPE_DOOR && pGo->getLootState() == GO_ACTIVATED) + if (pGo && pGo->GetGoType() == GAMEOBJECT_TYPE_DOOR && pGo->GetGoState() == GO_STATE_ACTIVE) pGo->ResetDoorOrButton(); } } @@ -205,20 +238,25 @@ void instance_violet_hold::SetData(uint32 uiType, uint32 uiData) switch(uiData) { - case NOT_STARTED: - ResetAll(); - break; case IN_PROGRESS: + // ToDo: enable the prison defense system when implemented DoUseDoorOrButton(GO_PRISON_SEAL_DOOR); UpdateWorldState(); + m_bIsDefenseless = true; m_uiPortalId = urand(0, 2); m_uiPortalTimer = 15000; break; case FAIL: if (Creature* pSinclari = GetSingleCreatureFromStorage(NPC_SINCLARI)) - pSinclari->Respawn(); + pSinclari->DealDamage(pSinclari, pSinclari->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + if (Creature* pController = GetSingleCreatureFromStorage(NPC_EVENT_CONTROLLER)) + pController->AI()->EnterEvadeMode(); + // Reset the event (creature cleanup is handled in creature_linking) + ResetAll(); + m_uiEventResetTimer = 20000; // Timer may not be correct - 20 sec is default reset timer for blizz break; case DONE: + DoUseDoorOrButton(GO_PRISON_SEAL_DOOR); UpdateWorldState(false); break; case SPECIAL: @@ -229,6 +267,32 @@ void instance_violet_hold::SetData(uint32 uiType, uint32 uiData) } case TYPE_SEAL: m_auiEncounter[uiType] = uiData; + if (uiData == SPECIAL) + { + --m_uiWorldStateSealCount; + DoUpdateWorldState(WORLD_STATE_SEAL, m_uiWorldStateSealCount); + + // Yell at 75%, 50% and 25% shield + if (m_uiWorldStateSealCount < 100-25*m_uiSealYellCount) + { + if (Creature* pSinclari = GetSingleCreatureFromStorage(NPC_SINCLARI_ALT)) + { + // ToDo: I'm not sure if the last yell should be at 25% or at 5%. Needs research + DoScriptText(aSealWeakYell[m_uiSealYellCount-1], pSinclari); + ++m_uiSealYellCount; + } + } + + // set achiev to failed + if (m_bIsDefenseless) + m_bIsDefenseless = false; + + if (!m_uiWorldStateSealCount) + { + SetData(TYPE_MAIN, FAIL); + SetData(TYPE_SEAL, NOT_STARTED); + } + } break; case TYPE_PORTAL: { @@ -238,7 +302,7 @@ void instance_violet_hold::SetData(uint32 uiType, uint32 uiData) m_uiPortalTimer = 90000; break; case DONE: // portal done, set timer to 5 secs - m_uiPortalTimer = 5000; + m_uiPortalTimer = 3000; break; } m_auiEncounter[uiType] = uiData; @@ -254,10 +318,24 @@ void instance_violet_hold::SetData(uint32 uiType, uint32 uiData) m_uiPortalTimer = 35000; if (m_auiEncounter[uiType] != DONE) // Keep the DONE-information stored m_auiEncounter[uiType] = uiData; + // Handle achievements if necessary + if (uiData == IN_PROGRESS) + { + if (uiType == TYPE_ZURAMAT) + m_bIsVoidDance = true; + else if (uiType == TYPE_ICHORON) + m_bIsDehydratation = true; + } + if (uiData == SPECIAL && uiType == TYPE_ICHORON) + m_bIsDehydratation = false; + if (uiData == FAIL) + SetData(TYPE_MAIN, FAIL); break; case TYPE_CYANIGOSA: if (uiData == DONE) SetData(TYPE_MAIN, DONE); + if (uiData == FAIL) + SetData(TYPE_MAIN, FAIL); m_auiEncounter[uiType] = uiData; break; default: @@ -431,15 +509,13 @@ void instance_violet_hold::CallGuards(bool bRespawn) if (bRespawn) { pGuard->Respawn(); + pGuard->GetMotionMaster()->MoveTargetedHome(); } else if (pGuard->isAlive()) { - pGuard->AI()->EnterEvadeMode(); - - if (Creature* pSinclari = GetSingleCreatureFromStorage(NPC_SINCLARI)) - pGuard->GetMotionMaster()->MoveFollow(pSinclari, 0.0f, 0.0f); - - pGuard->ForcedDespawn(20000); + pGuard->SetWalk(false); + pGuard->GetMotionMaster()->MovePoint(0, fGuardExitLoc[0], fGuardExitLoc[1], fGuardExitLoc[2]); + pGuard->ForcedDespawn(6000); } } } @@ -461,21 +537,20 @@ void instance_violet_hold::ProcessActivationCrystal(Unit* pUser, bool bIsIntro) // else, kill (and despawn?) certain trash mobs. Also boss affected, but not killed. } -uint32 instance_violet_hold::GetRandomPortalEliteEntry() -{ - return (urand(0, 1) ? NPC_PORTAL_GUARDIAN : NPC_PORTAL_KEEPER); -} - -uint32 instance_violet_hold::GetRandomMobForNormalPortal() +bool instance_violet_hold::CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/) { - switch(urand(1, 4)) + switch (uiCriteriaId) { - case 1: return NPC_AZURE_INVADER; - case 2: return NPC_MAGE_HUNTER; - case 3: return NPC_AZURE_SPELLBREAKER; - case 4: return NPC_AZURE_BINDER; + // ToDo: uncomment these when they are implemented + //case ACHIEV_CRIT_DEFENSELES: + // return m_bIsDefenseless; + //case ACHIEV_CRIT_DEHYDRATATION: + // return m_bIsDehydratation; + case ACHIEV_CRIT_VOID_DANCE: + return m_bIsVoidDance; + default: - return 0; + return false; } } @@ -510,6 +585,18 @@ void instance_violet_hold::OnCreatureEnterCombat(Creature* pCreature) case NPC_CYANIGOSA: SetData(TYPE_CYANIGOSA, IN_PROGRESS); break; + case NPC_AZURE_CAPTAIN: + case NPC_AZURE_RAIDER: + case NPC_AZURE_SORCEROR: + case NPC_AZURE_STALKER: + case NPC_AZURE_INVADER: + case NPC_MAGE_HUNTER: + case NPC_AZURE_SPELLBREAKER: + case NPC_AZURE_BINDER: + case NPC_AZURE_MAGE_SLAYER: + // Interrupt door seal casting (if necessary) + pCreature->InterruptNonMeleeSpells(false); + break; } } @@ -520,30 +607,52 @@ void instance_violet_hold::OnCreatureEvade(Creature* pCreature) case NPC_ZURAMAT: case NPC_VOID_LORD: SetData(TYPE_ZURAMAT, FAIL); + pCreature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PASSIVE); break; case NPC_XEVOZZ: case NPC_ETHERAL: SetData(TYPE_XEVOZZ, FAIL); + pCreature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PASSIVE); break; case NPC_LAVANTHOR: case NPC_LAVA_HOUND: SetData(TYPE_LAVANTHOR, FAIL); + pCreature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PASSIVE); break; case NPC_MORAGG: case NPC_WATCHER: SetData(TYPE_MORAGG, FAIL); + pCreature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PASSIVE); break; case NPC_EREKEM: case NPC_ARAKKOA: SetData(TYPE_EREKEM, FAIL); + pCreature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PASSIVE); + break; + case NPC_EREKEM_GUARD: + pCreature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PASSIVE); break; case NPC_ICHORON: case NPC_SWIRLING: SetData(TYPE_ICHORON, FAIL); + pCreature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PASSIVE); break; case NPC_CYANIGOSA: SetData(TYPE_CYANIGOSA, FAIL); break; + case NPC_AZURE_CAPTAIN: + case NPC_AZURE_RAIDER: + case NPC_AZURE_SORCEROR: + case NPC_AZURE_STALKER: + case NPC_AZURE_INVADER: + case NPC_MAGE_HUNTER: + case NPC_AZURE_SPELLBREAKER: + case NPC_AZURE_BINDER: + case NPC_AZURE_MAGE_SLAYER: + // Allow them to finish off the door seal + pCreature->SetWalk(false); + pCreature->GetMotionMaster()->MovePoint(1, fSealAttackLoc[0], fSealAttackLoc[1], fSealAttackLoc[2]); + break; } } @@ -578,11 +687,28 @@ void instance_violet_hold::OnCreatureDeath(Creature* pCreature) case NPC_CYANIGOSA: SetData(TYPE_CYANIGOSA, DONE); break; + case NPC_VOID_SENTRY: + if (GetData(TYPE_ZURAMAT) == IN_PROGRESS) + m_bIsVoidDance = false; + break; } } void instance_violet_hold::Update(uint32 uiDiff) { + if (m_uiEventResetTimer) + { + if (m_uiEventResetTimer <= uiDiff) + { + if (Creature* pSinclari = GetSingleCreatureFromStorage(NPC_SINCLARI)) + pSinclari->Respawn(); + + m_uiEventResetTimer = 0; + } + else + m_uiEventResetTimer -= uiDiff; + } + if (m_auiEncounter[TYPE_MAIN] != IN_PROGRESS) return; diff --git a/scripts/northrend/violet_hold/violet_hold.cpp b/scripts/northrend/violet_hold/violet_hold.cpp index 913cd9ae8..c475697fc 100644 --- a/scripts/northrend/violet_hold/violet_hold.cpp +++ b/scripts/northrend/violet_hold/violet_hold.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: Violet_Hold -SD%Complete: 40 -SDComment: +SD%Complete: 80 +SDComment: Intro event required more research and core support. SDCategory: Violet Hold EndScriptData */ @@ -25,6 +25,7 @@ EndScriptData */ go_activation_crystal npc_door_seal npc_sinclari +npc_prison_event_controller npc_teleportation_portal EndContentData */ @@ -71,12 +72,16 @@ enum { SAY_BEGIN = -1608000, SAY_LOCK_DOOR = -1608001, + SAY_VICTORY = -1608027, GOSSIP_ITEM_INTRO = -3608000, GOSSIP_ITEM_START = -3608001, + GOSSIP_ITEM_TELEPORT = -3608002, GOSSIP_TEXT_ID_INTRO = 13853, GOSSIP_TEXT_ID_START = 13854, + + SPELL_TELEPORT_INSIDE = 62138, // script effect - should trigger 62139 }; struct MANGOS_DLL_DECL npc_sinclariAI : public npc_escortAI @@ -89,8 +94,11 @@ struct MANGOS_DLL_DECL npc_sinclariAI : public npc_escortAI instance_violet_hold* m_pInstance; + bool m_bIsEpilogue; + void Reset() { + m_bIsEpilogue = false; } void WaypointReached(uint32 uiPointId) @@ -110,8 +118,20 @@ struct MANGOS_DLL_DECL npc_sinclariAI : public npc_escortAI break; case 2: DoScriptText(SAY_LOCK_DOOR, m_creature); + m_creature->SetFacingTo(0.05f); + break; + case 3: m_pInstance->SetData(TYPE_MAIN, IN_PROGRESS); break; + case 4: + m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); + SetEscortPaused(true); + break; + case 5: + m_creature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); + DoScriptText(SAY_VICTORY, m_creature); + SetEscortPaused(true); + break; } } @@ -122,6 +142,16 @@ struct MANGOS_DLL_DECL npc_sinclariAI : public npc_escortAI npc_escortAI::JustRespawned(); // Needed, to reset escort state, waypoints, etc } + + void UpdateEscortAI(const uint32 uiDiff) + { + // Say outro after event is finished + if (m_pInstance && m_pInstance->GetData(TYPE_MAIN) == DONE && !m_bIsEpilogue) + { + SetEscortPaused(false); + m_bIsEpilogue = true; + } + } }; CreatureAI* GetAI_npc_sinclari(Creature* pCreature) @@ -131,7 +161,14 @@ CreatureAI* GetAI_npc_sinclari(Creature* pCreature) bool GossipHello_npc_sinclari(Player* pPlayer, Creature* pCreature) { - pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_INTRO, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + if (instance_violet_hold* pInstance = (instance_violet_hold*)pCreature->GetInstanceData()) + { + if (pInstance->GetData(TYPE_MAIN) != IN_PROGRESS) + pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_INTRO, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + else + pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_TELEPORT, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3); + } + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXT_ID_INTRO, pCreature->GetObjectGuid()); return true; } @@ -170,216 +207,373 @@ bool GossipSelect_npc_sinclari(Player* pPlayer, Creature* pCreature, uint32 uiSe pPlayer->CLOSE_GOSSIP_MENU(); } + if (uiAction == GOSSIP_ACTION_INFO_DEF+3) + { + pCreature->CastSpell(pPlayer, SPELL_TELEPORT_INSIDE, true); + pPlayer->CLOSE_GOSSIP_MENU(); + } + return true; } /*###### -## npc_teleportation_portal +## npc_prison_event_controller ######*/ -struct MANGOS_DLL_DECL npc_teleportation_portalAI : public ScriptedAI +struct MANGOS_DLL_DECL npc_prison_event_controllerAI : public ScriptedAI { - npc_teleportation_portalAI(Creature* pCreature) : ScriptedAI(pCreature) + npc_prison_event_controllerAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (instance_violet_hold*)pCreature->GetInstanceData(); - m_uiMyPortalNumber = 0; Reset(); } instance_violet_hold* m_pInstance; - GUIDSet m_lMobSet; + GUIDSet m_sTrashPackSet; - bool m_bNeedInvisible; - bool m_bIntro; - uint32 m_uiIntroTimer; - uint32 m_uiMyPortalNumber; + uint32 m_uiSaboteurTimer; + uint8 m_uiSaboteurPhase; + uint8 m_uiCurrentTrashPortalId; + + ObjectGuid m_currentSaboteurGuid; void Reset() { - m_bNeedInvisible = false; - m_bIntro = false; - m_uiIntroTimer = 10000; + m_uiCurrentTrashPortalId = 0; + m_uiSaboteurPhase = 0; + m_uiSaboteurTimer = 0; - if (m_pInstance) - m_uiMyPortalNumber = m_pInstance->GetCurrentPortalNumber(); + m_currentSaboteurGuid.Clear(); + m_sTrashPackSet.clear(); } - void DoSummon() - { - if (m_creature->GetEntry() == NPC_PORTAL_INTRO) - { - //not made yet - return; - } - else if (m_creature->GetEntry() == NPC_PORTAL) - { - if (m_pInstance && m_pInstance->GetCurrentPortalNumber() == 18) - { - m_creature->SummonCreature(NPC_CYANIGOSA, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 600*IN_MILLISECONDS); - } - else - { - m_creature->SummonCreature(m_pInstance->GetRandomPortalEliteEntry(), 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 600*IN_MILLISECONDS); - m_creature->CastSpell(m_creature, SPELL_PORTAL_PERIODIC, true); - } - } - else if (m_pInstance->IsCurrentPortalForTrash()) - { - for(uint8 i = 0; i < 4; ++i) - { - uint32 uiSummonId = 0; - - switch(i) - { - case 0: uiSummonId = NPC_AZURE_CAPTAIN; break; - case 1: uiSummonId = NPC_AZURE_RAIDER; break; - case 2: uiSummonId = NPC_AZURE_SORCEROR; break; - case 3: uiSummonId = NPC_AZURE_STALKER; break; - } - - m_creature->SummonCreature(uiSummonId, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 600*IN_MILLISECONDS); - } - - m_bNeedInvisible = true; - } - else - { - m_creature->SummonCreature(NPC_AZURE_SABOTEUR, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 600*IN_MILLISECONDS); - m_bNeedInvisible = true; - } - } + void DoSetCurrentTrashPortal(uint8 uiPortalId) { m_uiCurrentTrashPortalId = uiPortalId; } void JustSummoned(Creature* pSummoned) { switch(pSummoned->GetEntry()) { - case NPC_PORTAL_GUARDIAN: - DoScriptText(EMOTE_GUARDIAN_PORTAL, pSummoned); - m_creature->CastSpell(pSummoned, SPELL_PORTAL_CHANNEL, false); - break; - case NPC_PORTAL_KEEPER: - DoScriptText(EMOTE_KEEPER_PORTAL, pSummoned); - m_creature->CastSpell(pSummoned, SPELL_PORTAL_CHANNEL, false); - break; case NPC_AZURE_CAPTAIN: DoScriptText(EMOTE_DRAGONFLIGHT_PORTAL, pSummoned); - m_lMobSet.insert(pSummoned->GetObjectGuid()); - break; + // no break case NPC_AZURE_RAIDER: case NPC_AZURE_SORCEROR: case NPC_AZURE_STALKER: - m_lMobSet.insert(pSummoned->GetObjectGuid()); - return; + m_sTrashPackSet.insert(pSummoned->GetObjectGuid()); + // no break + case NPC_AZURE_INVADER: + case NPC_MAGE_HUNTER: + case NPC_AZURE_SPELLBREAKER: + case NPC_AZURE_BINDER: + case NPC_AZURE_MAGE_SLAYER: + pSummoned->SetWalk(false); + pSummoned->GetMotionMaster()->MovePoint(1, fSealAttackLoc[0], fSealAttackLoc[1], fSealAttackLoc[2]); + break; case NPC_AZURE_SABOTEUR: { if (!m_pInstance) return; const BossInformation* pData = m_pInstance->GetBossInformation(); if (pData) + { + pSummoned->SetWalk(false); pSummoned->GetMotionMaster()->MovePoint(pData->uiWayPointId, pData->fX, pData->fY, pData->fZ); - return; + } + m_currentSaboteurGuid = pSummoned->GetObjectGuid(); + break; } - default: - return; } - - if (m_pInstance) - m_pInstance->SetData(TYPE_PORTAL, SPECIAL); } void SummonedMovementInform(Creature* pSummoned, uint32 uiMotionType, uint32 uiPointId) { - if (uiMotionType != POINT_MOTION_TYPE && pSummoned->GetEntry() != NPC_AZURE_SABOTEUR) + if (uiMotionType != POINT_MOTION_TYPE && !uiPointId) return; - if (uiPointId == 1) + if (pSummoned->GetEntry() == NPC_AZURE_SABOTEUR) { + // Prepare to release the boss + m_uiSaboteurPhase = 0; + m_uiSaboteurTimer = 1000; pSummoned->CastSpell(pSummoned, SPELL_SHIELD_DISRUPTION, false); - if (m_pInstance) - { - if (const BossInformation* pData = m_pInstance->GetBossInformation()) - { - if (Creature* pBoss = m_pInstance->GetSingleCreatureFromStorage(m_pInstance->GetData(pData->uiType) != DONE ? pData->uiEntry : pData->uiGhostEntry)) - { - m_pInstance->UpdateCellForBoss(pData->uiEntry); - if (pData->iSayEntry) - DoScriptText(pData->iSayEntry, pBoss); - - // TODO, adds for Erekem? Opening their Cells? Reset flags on FAIL? - pBoss->GetMotionMaster()->MovePoint(1, pData->fX, pData->fY, pData->fZ); - pBoss->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PASSIVE); - } - } - } } + // For other summons, cast destroy seal when they reach the door + else + pSummoned->CastSpell(pSummoned, SPELL_DESTROY_DOOR_SEAL, false); } void SummonedCreatureJustDied(Creature* pSummoned) { - switch(pSummoned->GetEntry()) + switch (pSummoned->GetEntry()) { - case NPC_PORTAL_GUARDIAN: - case NPC_PORTAL_KEEPER: - break; case NPC_AZURE_CAPTAIN: case NPC_AZURE_RAIDER: case NPC_AZURE_SORCEROR: case NPC_AZURE_STALKER: { - m_lMobSet.erase(pSummoned->GetObjectGuid()); - - if (!m_lMobSet.empty()) - return; + if (m_sTrashPackSet.find(pSummoned->GetObjectGuid()) != m_sTrashPackSet.end()) + m_sTrashPackSet.erase(pSummoned->GetObjectGuid()); + if (m_sTrashPackSet.empty()) + { + // no need if a new portal was made while this was in progress + if (m_uiCurrentTrashPortalId == m_pInstance->GetCurrentPortalNumber()) + m_pInstance->SetData(TYPE_PORTAL, DONE); + } break; } - default: - return; } + } - if (m_pInstance) + // Release a boss from a prison cell + void DoReleaseBoss() + { + if (!m_pInstance) + return; + + if (const BossInformation* pData = m_pInstance->GetBossInformation()) { - // no need if a new portal was made while this was in progress - if (m_uiMyPortalNumber == m_pInstance->GetCurrentPortalNumber()) - m_pInstance->SetData(TYPE_PORTAL, DONE); - } + if (Creature* pBoss = m_pInstance->GetSingleCreatureFromStorage(m_pInstance->GetData(pData->uiType) != DONE ? pData->uiEntry : pData->uiGhostEntry)) + { + m_pInstance->UpdateCellForBoss(pData->uiEntry); + if (pData->iSayEntry) + DoScriptText(pData->iSayEntry, pBoss); + + pBoss->GetMotionMaster()->MovePoint(1, pData->fX, pData->fY, pData->fZ); + pBoss->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PASSIVE); - m_creature->ForcedDespawn(); + // Handle Erekem guards + if (pData->uiType == TYPE_EREKEM) + { + GUIDList lAddGuids; + if (m_pInstance) + m_pInstance->GetErekemGuardList(lAddGuids); + + float fMoveX; + for (GUIDList::const_iterator itr = lAddGuids.begin(); itr != lAddGuids.end(); ++itr) + { + if (Creature* pAdd = m_pInstance->instance->GetCreature(*itr)) + { + fMoveX = (pData->fX - pAdd->GetPositionX())*.25; + pAdd->GetMotionMaster()->MovePoint(0, pData->fX - fMoveX, pData->fY, pData->fZ); + pAdd->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PASSIVE); + } + } + } + } + } } void UpdateAI(const uint32 uiDiff) { - if (m_uiIntroTimer) + if (m_uiSaboteurTimer) { - if (m_uiIntroTimer <= uiDiff) + if (m_uiSaboteurTimer <= uiDiff) { - if (!m_pInstance) - { - m_creature->ForcedDespawn(); + Creature* pSaboteur = m_creature->GetMap()->GetCreature(m_currentSaboteurGuid); + if (!pSaboteur) return; - } - m_uiIntroTimer = 0; + switch (m_uiSaboteurPhase) + { + case 0: + pSaboteur->CastSpell(pSaboteur, SPELL_SHIELD_DISRUPTION, false); + m_uiSaboteurTimer = 1000; + break; + case 1: + pSaboteur->CastSpell(pSaboteur, SPELL_SHIELD_DISRUPTION, false); + m_uiSaboteurTimer = 1000; + break; + case 2: + DoReleaseBoss(); + pSaboteur->CastSpell(pSaboteur, SPELL_SIMPLE_TELEPORT, false); + pSaboteur->ForcedDespawn(1000); + m_uiSaboteurTimer = 0; + break; + } + ++m_uiSaboteurPhase; } else + m_uiSaboteurTimer -= uiDiff; + } + } +}; + +CreatureAI* GetAI_npc_prison_event_controller(Creature* pCreature) +{ + return new npc_prison_event_controllerAI(pCreature); +} + +/*###### +## npc_teleportation_portal +######*/ + +static const uint32 aTrashPortalNpcs[4] = {NPC_AZURE_CAPTAIN, NPC_AZURE_RAIDER, NPC_AZURE_SORCEROR, NPC_AZURE_STALKER}; + +struct MANGOS_DLL_DECL npc_teleportation_portalAI : public ScriptedAI +{ + npc_teleportation_portalAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (instance_violet_hold*)pCreature->GetInstanceData(); + m_uiMyPortalNumber = 0; + Reset(); + } + + instance_violet_hold* m_pInstance; + + bool m_bIntro; + uint32 m_uiMyPortalNumber; + uint32 m_uiCyanigosaMoveTimer; + + ObjectGuid m_cyanigosaGuid; + + void Reset() + { + DoCastSpellIfCan(m_creature, SPELL_PORTAL_PERIODIC); + + m_bIntro = true; + m_uiCyanigosaMoveTimer = 0; + + if (m_pInstance) + m_uiMyPortalNumber = m_pInstance->GetCurrentPortalNumber(); + } + + void DoSummon() + { + if (!m_pInstance) + return; + + // Portal event used for intro + if (m_creature->GetEntry() == NPC_PORTAL_INTRO) + { + // ToDo: uncomment this when the information and DB data is confirmed. Right now the mobs may overrun the guards after a few min of fightning + //m_creature->SummonCreature(m_pInstance->GetRandomMobForIntroPortal(), 0, 0, 0, 0, TEMPSUMMON_DEAD_DESPAWN, 0); + return; + } + + // First summon tick + if (m_bIntro) + { + if (m_creature->GetEntry() == NPC_PORTAL) { - m_uiIntroTimer -= uiDiff; - return; + // Summon a guardian keeper or Cyanigosa + if (m_uiMyPortalNumber == 18) + m_creature->SummonCreature(NPC_CYANIGOSA, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 600*IN_MILLISECONDS); + else + m_creature->SummonCreature(m_pInstance->GetRandomPortalEliteEntry(), 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 600*IN_MILLISECONDS); } + else if (m_creature->GetEntry() == NPC_PORTAL_ELITE) + { + // Allow the event controller to summon the mobs, for better movement handling + Creature* pController = m_pInstance->GetSingleCreatureFromStorage(NPC_EVENT_CONTROLLER); + if (!pController) + return; + + // Summon a squad or a saboteur + if (m_pInstance->IsCurrentPortalForTrash()) + { + float fX, fY, fZ; + for (uint8 i = 0; i < 4; ++i) + { + uint32 uiSummonId = aTrashPortalNpcs[i]; + + // Summon the trash pack around the portal + m_creature->GetNearPoint(m_creature, fX, fY, fZ, 0, 3.0f, M_PI_F/2*i); + pController->SummonCreature(uiSummonId, fX, fY, fZ, m_creature->GetOrientation(), TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 600*IN_MILLISECONDS); + } + + // If this is a trash portal, set the current number in the + if (npc_prison_event_controllerAI* pControllerAI = dynamic_cast(pController->AI())) + pControllerAI->DoSetCurrentTrashPortal(m_uiMyPortalNumber); + } + else + pController->SummonCreature(NPC_AZURE_SABOTEUR, m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), m_creature->GetOrientation(), TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 600*IN_MILLISECONDS); + + m_creature->ForcedDespawn(5000); + } + + // Set special data for all the portals, except the last one + if (m_pInstance && m_uiMyPortalNumber != 18) + m_pInstance->SetData(TYPE_PORTAL, SPECIAL); + + m_bIntro = false; + } + else + { + // Allow the normal mobs to be summoned by the event controller + if (Creature* pController = m_pInstance->GetSingleCreatureFromStorage(NPC_EVENT_CONTROLLER)) + pController->SummonCreature(m_pInstance->GetRandomMobForNormalPortal(), m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), m_creature->GetOrientation(), TEMPSUMMON_DEAD_DESPAWN, 0); + } + } + + void JustSummoned(Creature* pSummoned) + { + switch (pSummoned->GetEntry()) + { + case NPC_CYANIGOSA: + m_cyanigosaGuid = pSummoned->GetObjectGuid(); + m_uiCyanigosaMoveTimer = 5000; + m_creature->ForcedDespawn(5000); + break; + case NPC_PORTAL_GUARDIAN: + DoScriptText(EMOTE_GUARDIAN_PORTAL, pSummoned); + DoCastSpellIfCan(pSummoned, SPELL_PORTAL_CHANNEL); + break; + case NPC_PORTAL_KEEPER: + DoScriptText(EMOTE_KEEPER_PORTAL, pSummoned); + DoCastSpellIfCan(pSummoned, SPELL_PORTAL_CHANNEL); + break; + case NPC_AZURE_BINDER_INTRO: + case NPC_AZURE_INVADER_INTRO: + case NPC_AZURE_SPELLBREAKER_INTRO: + case NPC_AZURE_MAGE_SLAYER_INTRO: + // Move them to the entrance. They will attack the guards automatically + pSummoned->SetWalk(false); + pSummoned->GetMotionMaster()->MovePoint(1, fSealAttackLoc[0], fSealAttackLoc[1], fSealAttackLoc[2]); + break; } + } - if (!m_bIntro) + void SummonedCreatureJustDied(Creature* pSummoned) + { + switch (pSummoned->GetEntry()) { - DoSummon(); - m_bIntro = true; + case NPC_PORTAL_GUARDIAN: + case NPC_PORTAL_KEEPER: + m_creature->ForcedDespawn(3000); + // no need if a new portal was made while this was in progress + if (m_pInstance && m_uiMyPortalNumber == m_pInstance->GetCurrentPortalNumber()) + m_pInstance->SetData(TYPE_PORTAL, DONE); + break; } + } - if (m_bNeedInvisible) + void SummonedCreatureDespawn(Creature* pSummoned) + { + switch (pSummoned->GetEntry()) { - // hack; find a better way - m_creature->SetVisibility(VISIBILITY_OFF); - m_bNeedInvisible = false; + case NPC_PORTAL_GUARDIAN: + case NPC_PORTAL_KEEPER: + // Despawn in case of event reset + m_creature->ForcedDespawn(); + break; + } + } + + void UpdateAI(const uint32 uiDiff) + { + if (m_uiCyanigosaMoveTimer) + { + if (m_uiCyanigosaMoveTimer <= uiDiff) + { + if (Creature* pCyanigosa = m_creature->GetMap()->GetCreature(m_cyanigosaGuid)) + pCyanigosa->GetMotionMaster()->MoveJump(afPortalLocation[8].fX, afPortalLocation[8].fY, afPortalLocation[8].fZ, pCyanigosa->GetSpeed(MOVE_RUN)*2, 10.0f); + + m_uiCyanigosaMoveTimer = 0; + } + else + m_uiCyanigosaMoveTimer -= uiDiff; } } }; @@ -394,8 +588,8 @@ bool EffectDummyCreature_npc_teleportation_portal(Unit* pCaster, uint32 uiSpellI //always check spellid and effectindex if (uiSpellId == SPELL_PORTAL_PERIODIC && uiEffIndex == EFFECT_INDEX_0) { - if (instance_violet_hold* pInstance = (instance_violet_hold*)pCreatureTarget->GetInstanceData()) - pCreatureTarget->SummonCreature(pInstance->GetRandomMobForNormalPortal(), 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 600*IN_MILLISECONDS); + if (npc_teleportation_portalAI* pPortalAI = dynamic_cast(pCreatureTarget->AI())) + pPortalAI->DoSummon(); //always return true when we are handling this spell and effect return true; @@ -425,6 +619,11 @@ void AddSC_violet_hold() pNewScript->pGossipSelect = &GossipSelect_npc_sinclari; pNewScript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "npc_prison_event_controller"; + pNewScript->GetAI = &GetAI_npc_prison_event_controller; + pNewScript->RegisterSelf(); + pNewScript = new Script; pNewScript->Name = "npc_teleportation_portal"; pNewScript->GetAI = &GetAI_npc_teleportation_portal; diff --git a/scripts/northrend/violet_hold/violet_hold.h b/scripts/northrend/violet_hold/violet_hold.h index f68cdd380..63983044a 100644 --- a/scripts/northrend/violet_hold/violet_hold.h +++ b/scripts/northrend/violet_hold/violet_hold.h @@ -26,6 +26,7 @@ enum WORLD_STATE_PORTALS = 3810, GO_INTRO_CRYSTAL = 193615, + GO_PRISON_CRYSTAL = 193611, GO_PRISON_SEAL_DOOR = 191723, GO_CELL_LAVANTHOR = 191566, @@ -69,6 +70,9 @@ enum NPC_AZURE_RAIDER = 30668, NPC_AZURE_STALKER = 32191, + NPC_VOID_SENTRY = 29364, // Npc checked for Zuramat achiev + NPC_ICHORON_SUMMON_TARGET = 29326, // Npc which summons the Ichoron globules + // used for intro NPC_AZURE_BINDER_INTRO = 31007, NPC_AZURE_INVADER_INTRO = 31008, @@ -90,11 +94,14 @@ enum SPELL_DEFENSE_SYSTEM_VISUAL = 57887, SPELL_DEFENSE_SYSTEM_SPAWN = 57886, + SPELL_LIGHTNING_INTRO = 60038, // intro kill spells, also related to spell 58152 + SPELL_ARCANE_LIGHTNING = 57930, // damage spells, related to spell 57912 SPELL_DESTROY_DOOR_SEAL = 58040, // spell periodic cast by misc SPELL_TELEPORTATION_PORTAL = 57687, // visual aura, but possibly not used? creature_template model for portals are same SPELL_SHIELD_DISRUPTION = 58291, // dummy when opening a cell + SPELL_SIMPLE_TELEPORT = 12980, // used after a cell has been opened - not sure if the id is correct SPELL_PORTAL_PERIODIC = 58008, // most likely the tick for each summon (tick each 15 seconds) SPELL_PORTAL_CHANNEL = 58012, // the blue "stream" between portal and guardian/keeper @@ -116,10 +123,21 @@ enum EMOTE_DRAGONFLIGHT_PORTAL = -1608006, EMOTE_KEEPER_PORTAL = -1608007, - MAX_NORMAL_PORTAL = 8 + MAX_NORMAL_PORTAL = 8, + + ACHIEV_CRIT_DEFENSELES = 6803, // event achiev - 1816 + ACHIEV_CRIT_DEHYDRATATION = 7320, // Ichoron achiev - 2041 + ACHIEV_CRIT_VOID_DANCE = 7587, // Zuramat achiev - 2153 }; static const float fDefenseSystemLoc[4] = {1888.146f, 803.382f, 58.604f, 3.072f}; +static const float fGuardExitLoc[3] = {1806.955f, 803.851f, 44.36f}; +static const float fSealAttackLoc[3] = {1858.027f, 804.11f, 44.008f}; + +static const uint32 aRandomPortalNpcs[5] = {NPC_AZURE_INVADER, NPC_MAGE_HUNTER, NPC_AZURE_SPELLBREAKER, NPC_AZURE_BINDER, NPC_AZURE_MAGE_SLAYER}; +static const uint32 aRandomIntroNpcs[4] = {NPC_AZURE_BINDER_INTRO, NPC_AZURE_INVADER_INTRO, NPC_AZURE_SPELLBREAKER_INTRO, NPC_AZURE_MAGE_SLAYER_INTRO}; + +static const int32 aSealWeakYell[3] = {SAY_SEAL_75, SAY_SEAL_50, SAY_SEAL_5}; enum ePortalType { @@ -177,28 +195,22 @@ class MANGOS_DLL_DECL instance_violet_hold : public ScriptedInstance ~instance_violet_hold(); // Destructor used to free m_vRandomBosses void Initialize(); - void ResetAll(); - void ResetVariables(); void OnCreatureCreate(Creature* pCreature); void OnObjectCreate(GameObject* pGo); void UpdateCellForBoss(uint32 uiBossEntry, bool bForceClosing = false); - void UpdateWorldState(bool bEnable = true); void SetIntroPortals(bool bDeactivate); - void SpawnPortal(); - - void SetPortalId(); void CallGuards(bool bRespawn); - uint32 GetRandomPortalEliteEntry(); - uint32 GetRandomMobForNormalPortal(); + uint32 GetRandomPortalEliteEntry() { return (urand(0, 1) ? NPC_PORTAL_GUARDIAN : NPC_PORTAL_KEEPER); } + uint32 GetRandomMobForNormalPortal() { return aRandomPortalNpcs[urand(0, 4)]; } + uint32 GetRandomMobForIntroPortal() { return aRandomIntroNpcs[urand(0, 3)]; } uint32 GetCurrentPortalNumber() { return m_uiWorldStatePortalCount; } - PortalData const* GetPortalData() { return &afPortalLocation[m_uiPortalId]; } BossInformation const* GetBossInformation(uint32 uiEntry = 0); bool IsCurrentPortalForTrash() @@ -209,17 +221,9 @@ class MANGOS_DLL_DECL instance_violet_hold : public ScriptedInstance return false; } - bool IsNextPortalForTrash() - { - if ((m_uiWorldStatePortalCount+1) % MAX_MINIBOSSES) - return true; - - return false; - } - void ProcessActivationCrystal(Unit* pUser, bool bIsIntro = false); - void SetRandomBosses(); + void GetErekemGuardList(GUIDList& lList) { lList = m_lErekemGuardList; } void OnPlayerEnter(Player* pPlayer); @@ -230,6 +234,8 @@ class MANGOS_DLL_DECL instance_violet_hold : public ScriptedInstance void SetData(uint32 uiType, uint32 uiData); uint32 GetData(uint32 uiType); + bool CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/); + const char* Save() { return m_strInstData.c_str(); } void Load(const char* chrIn); @@ -238,6 +244,26 @@ class MANGOS_DLL_DECL instance_violet_hold : public ScriptedInstance typedef std::multimap BossToCellMap; protected: + PortalData const* GetPortalData() { return &afPortalLocation[m_uiPortalId]; } + + void UpdateWorldState(bool bEnable = true); + + void SetRandomBosses(); + + void SpawnPortal(); + void SetPortalId(); + + void ResetAll(); + void ResetVariables(); + + bool IsNextPortalForTrash() + { + if ((m_uiWorldStatePortalCount+1) % MAX_MINIBOSSES) + return true; + + return false; + } + BossSpawn* CreateBossSpawnByEntry(uint32 uiEntry); uint32 m_auiEncounter[MAX_ENCOUNTER]; std::string m_strInstData; @@ -250,10 +276,18 @@ class MANGOS_DLL_DECL instance_violet_hold : public ScriptedInstance uint32 m_uiPortalTimer; uint32 m_uiMaxCountPortalLoc; + uint32 m_uiSealYellCount; + uint32 m_uiEventResetTimer; + + bool m_bIsVoidDance; + bool m_bIsDehydratation; + bool m_bIsDefenseless; + BossToCellMap m_mBossToCellMap; GUIDList m_lIntroPortalList; GUIDList m_lGuardsList; + GUIDList m_lErekemGuardList; std::list m_lRandomBossList; std::vector m_vRandomBosses; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 185e2847c..470f35d91 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2583" + #define SD2_REVISION_NR "2584" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index ec7980466..b72748000 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -1304,6 +1304,7 @@ UPDATE instance_template SET ScriptName='instance_violet_hold' WHERE map=608; UPDATE gameobject_template SET ScriptName='go_activation_crystal' WHERE entry=193611; UPDATE creature_template SET ScriptName='npc_door_seal' WHERE entry=30896; UPDATE creature_template SET ScriptName='npc_sinclari' WHERE entry=30658; +UPDATE creature_template SET ScriptName='npc_prison_event_controller' WHERE entry=30883; UPDATE creature_template SET ScriptName='npc_teleportation_portal' WHERE entry IN (31011,30679,32174); UPDATE creature_template SET ScriptName='boss_ichoron' WHERE entry IN (29313,32234); UPDATE creature_template SET ScriptName='boss_erekem' WHERE entry IN (29315,32226); diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 377d3ab3b..3b9683e58 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -3346,8 +3346,8 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen -- -1 608 000 VIOLET HOLD INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES -(-1608000,'Prison guards, we are leaving! These adventurers are taking over! Go, go, go!',0,1,0,0,'sinclair SAY_BEGIN'), -(-1608001,'I\'m locking the door. Good luck, and thank you for doing this.',0,0,0,0,'sinclair SAY_LOCK_DOOR'), +(-1608000,'Prison guards, we are leaving! These adventurers are taking over! Go, go, go!',0,1,0,0,'sinclari SAY_BEGIN'), +(-1608001,'I\'m locking the door. Good luck, and thank you for doing this.',0,0,0,1,'sinclari SAY_LOCK_DOOR'), (-1608002,'Adventurers, the door is beinning to weaken!',0,1,0,0,'sinclair SAY_SEAL_75'), (-1608003,'Only half of the door seal\'s strength remains! You must fight on!',0,1,0,0,'sinclair SAY_SEAL_50'), @@ -3374,7 +3374,9 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1608023,'I shall pass!',14235,1,0,0,'ichoron SAY_SLAY_2'), (-1608024,'You can not stop the tide!',14236,1,0,0,'ichoron SAY_SLAY_3'), (-1608025,'I shall consume,decimate, devastate,and destroy! Yield now to the wrath of the pounding sea!',14231,1,0,0,'ichoron SAY_ENRAGE'), -(-1608026,'I... recede.',14237,1,0,0,'ichoron SAY_DEATH'); +(-1608026,'I... recede.',14237,1,0,0,'ichoron SAY_DEATH'), + +(-1608027,'You did it! You held the Blue Dragonflight back and defeated their commander. Amazing work!',0,0,0,1,'sinclari SAY_VICTORY'); -- -1 609 000 EBON HOLD (DK START) INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES @@ -4192,7 +4194,8 @@ INSERT INTO gossip_texts (entry,content_default,comment) VALUES -- -3 608 000 VIOLET HOLD INSERT INTO gossip_texts (entry,content_default,comment) VALUES (-3608000,'Activate the crystals when we get in trouble, right?','sinclari GOSSIP_ITEM_INTRO'), -(-3608001,'Get your people to safety, we\'ll keep the Blue Dragonflight\'s forces at bay.','sinclari GOSSIP_ITEM_START'); +(-3608001,'Get your people to safety, we\'ll keep the Blue Dragonflight\'s forces at bay.','sinclari GOSSIP_ITEM_START'), +(-3608002,'I\'m not fighting, so send me in now!','sinclari GOSSIP_ITEM_TELEPORT'); -- -3 649 000 TRIAL OF CRUSADER INSERT INTO gossip_texts (entry,content_default,comment) VALUES @@ -5935,9 +5938,10 @@ DELETE FROM script_waypoint WHERE entry=30658; INSERT INTO script_waypoint VALUES (30658, 0, 1830.504517, 799.356506, 44.341801, 5000, 'use activation'), (30658, 1, 1832.461792, 800.431396, 44.311745, 10000, 'SAY_BEGIN call back guards'), -(30658, 2, 1824.786987, 803.828369, 44.363434, 0, 'SAY_LOCK_DOOR close door'), -(30658, 3, 1807.245483, 803.904114, 44.363434, 0, ''), -(30658, 4, 1785.160400, 803.856873, 44.364830, 30000, ''); +(30658, 2, 1824.786987, 803.828369, 44.363434, 3000, 'SAY_LOCK_DOOR'), +(30658, 3, 1824.786987, 803.828369, 44.363434, 0, 'close door'), +(30658, 4, 1817.315674, 804.060608, 44.363998, 0, 'escort paused - allow teleport inside'), +(30658, 5, 1826.889648, 803.929993, 44.363239, 30000, 'SAY_VICTORY'); DELETE FROM script_waypoint WHERE entry = 349; INSERT INTO script_waypoint VALUES diff --git a/sql/updates/r2584_mangos.sql b/sql/updates/r2584_mangos.sql new file mode 100644 index 000000000..e0655415d --- /dev/null +++ b/sql/updates/r2584_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_prison_event_controller' WHERE entry=30883; diff --git a/sql/updates/r2584_scriptdev2.sql b/sql/updates/r2584_scriptdev2.sql new file mode 100644 index 000000000..0a96c906e --- /dev/null +++ b/sql/updates/r2584_scriptdev2.sql @@ -0,0 +1,16 @@ +DELETE FROM script_texts WHERE entry IN (-1608000,-1608001,-1608027); +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1608000,'Prison guards, we are leaving! These adventurers are taking over! Go, go, go!',0,1,0,0,'sinclari SAY_BEGIN'), +(-1608001,'I\'m locking the door. Good luck, and thank you for doing this.',0,0,0,1,'sinclari SAY_LOCK_DOOR'), +(-1608027,'You did it! You held the Blue Dragonflight back and defeated their commander. Amazing work!',0,0,0,1,'sinclari SAY_VICTORY'); +DELETE FROM gossip_texts WHERE entry IN (-3608002); +INSERT INTO gossip_texts (entry,content_default,comment) VALUES +(-3608002,'I\'m not fighting, so send me in now!','sinclari GOSSIP_ITEM_TELEPORT'); +DELETE FROM script_waypoint WHERE entry=30658; +INSERT INTO script_waypoint VALUES +(30658, 0, 1830.504517, 799.356506, 44.341801, 5000, 'use activation'), +(30658, 1, 1832.461792, 800.431396, 44.311745, 10000, 'SAY_BEGIN call back guards'), +(30658, 2, 1824.786987, 803.828369, 44.363434, 3000, 'SAY_LOCK_DOOR'), +(30658, 3, 1824.786987, 803.828369, 44.363434, 0, 'close door'), +(30658, 4, 1817.315674, 804.060608, 44.363998, 0, 'escort paused - allow teleport inside'), +(30658, 5, 1826.889648, 803.929993, 44.363239, 30000, 'SAY_VICTORY'); From ed6b13ad67d23b92a6ce06ef3c11758abfe2b037 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Mon, 11 Jun 2012 23:55:49 +0300 Subject: [PATCH 0573/1172] [2585] Implement script for Erekem and his guards - Violet Hold --- scripts/northrend/violet_hold/boss_erekem.cpp | 172 +++++++++++++++++- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 + sql/updates/r2585_mangos.sql | 1 + 4 files changed, 168 insertions(+), 8 deletions(-) create mode 100644 sql/updates/r2585_mangos.sql diff --git a/scripts/northrend/violet_hold/boss_erekem.cpp b/scripts/northrend/violet_hold/boss_erekem.cpp index d017f4e94..bc6986cbb 100644 --- a/scripts/northrend/violet_hold/boss_erekem.cpp +++ b/scripts/northrend/violet_hold/boss_erekem.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: boss_erekem -SD%Complete: 0 -SDComment: Placeholder +SD%Complete: 90 +SDComment: Timers may need adjustments SDCategory: Violet Hold EndScriptData */ @@ -30,11 +30,10 @@ enum SAY_ADD_DIE_1 = -1608013, SAY_ADD_DIE_2 = -1608014, SAY_DEATH = -1608018, - /* A few Sound IDs on SLAY, if there _is_ text related, fields -1608015 to -1608017 are free - ** 14222 - ** 14223 - ** 14224 - */ + // A few Sound IDs on SLAY, if there _is_ text related, fields -1608015 to -1608017 are free + SOUND_ID_SLAY_1 = 14222, + SOUND_ID_SLAY_2 = 14223, + SOUND_ID_SLAY_3 = 14224, SPELL_BLOODLUST = 54516, SPELL_BREAK_BONDS_H = 59463, @@ -65,8 +64,21 @@ struct MANGOS_DLL_DECL boss_erekemAI : public ScriptedAI instance_violet_hold* m_pInstance; bool m_bIsRegularMode; + uint32 m_uiBreakBondsTimer; + uint32 m_uiChainHealTimer; + uint32 m_uiEarthShieldTimer; + uint32 m_uiEarthShockTimer; + uint32 m_uiSpecialSpellTimer; + uint8 m_uiGuardiansDead; + void Reset() { + m_uiSpecialSpellTimer = 0; + m_uiEarthShieldTimer = urand(2000, 3000); + m_uiEarthShockTimer = urand(4000, 9000); + m_uiChainHealTimer = urand(5000, 15000); + m_uiBreakBondsTimer = urand(25000, 30000); + m_uiGuardiansDead = 0; } void Aggro(Unit* pWho) @@ -79,11 +91,79 @@ struct MANGOS_DLL_DECL boss_erekemAI : public ScriptedAI DoScriptText(SAY_DEATH, m_creature); } + void KilledUnit(Unit* pVictim) + { + switch (urand(0, 2)) + { + case 0: DoPlaySoundToSet(m_creature, SOUND_ID_SLAY_1); break; + case 1: DoPlaySoundToSet(m_creature, SOUND_ID_SLAY_2); break; + case 2: DoPlaySoundToSet(m_creature, SOUND_ID_SLAY_3); break; + } + } + + void GuardianJustDied() + { + DoScriptText(!m_uiGuardiansDead ? SAY_ADD_DIE_1 : SAY_ADD_DIE_2, m_creature); + ++m_uiGuardiansDead; + + // cast bloodlust if both guards are dead + if (m_uiGuardiansDead == 2) + DoCastSpellIfCan(m_creature, SPELL_BLOODLUST, CAST_INTERRUPT_PREVIOUS); + } + void UpdateAI(const uint32 uiDiff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; + if (m_uiEarthShieldTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_EARTH_SHIELD : SPELL_EARTH_SHIELD_H, CAST_AURA_NOT_PRESENT) == CAST_OK) + m_uiEarthShieldTimer = urand(25000, 30000); + } + else + m_uiEarthShieldTimer -= uiDiff; + + if (m_uiEarthShockTimer < uiDiff) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, SPELL_EARTH_SHOCK) == CAST_OK) + m_uiEarthShockTimer = urand(8000, 13000); + } + } + else + m_uiEarthShockTimer -= uiDiff; + + if (m_uiChainHealTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_CHAIN_HEAL : SPELL_CHAIN_HEAL_H) == CAST_OK) + m_uiChainHealTimer = urand(15000, 25000); + } + else + m_uiChainHealTimer -= uiDiff; + + // Cast Stormstrike only if both guards are down + if (m_uiSpecialSpellTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), m_uiGuardiansDead == 2 ? SPELL_STORMSTRIKE : SPELL_LIGHTNING_BOLT) == CAST_OK) + m_uiSpecialSpellTimer = urand(2000, 3000); + } + else + m_uiSpecialSpellTimer -= uiDiff; + + // Break bonds only on heroic + if (!m_bIsRegularMode) + { + if (m_uiBreakBondsTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_BREAK_BONDS_H) == CAST_OK) + m_uiBreakBondsTimer = urand(25000, 30000); + } + else + m_uiBreakBondsTimer -= uiDiff; + } + DoMeleeAttackIfReady(); } }; @@ -93,6 +173,79 @@ CreatureAI* GetAI_boss_erekem(Creature* pCreature) return new boss_erekemAI(pCreature); } +struct MANGOS_DLL_DECL npc_erekem_guardAI : public ScriptedAI +{ + npc_erekem_guardAI(Creature *pCreature) : ScriptedAI(pCreature) + { + m_pInstance = ((instance_violet_hold*)pCreature->GetInstanceData()); + Reset(); + } + + instance_violet_hold* m_pInstance; + + uint32 m_uiGushingWoundTimer; + uint32 m_uiHowlingScreechTimer; + uint32 m_uiStrikeTimer; + + void Reset() + { + m_uiGushingWoundTimer = urand(9000, 14000); + m_uiHowlingScreechTimer = urand(8000, 12000); + m_uiStrikeTimer = urand(5000, 7000); + } + + void JustDied(Unit* pKiller) + { + if (!m_pInstance) + return; + + if (Creature* pBoss = m_pInstance->GetSingleCreatureFromStorage(m_pInstance->GetData(TYPE_EREKEM) != DONE ? NPC_EREKEM : NPC_ARAKKOA)) + { + if (!pBoss->isAlive()) + return; + + ((boss_erekemAI*)pBoss->AI())->GuardianJustDied(); + } + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_uiGushingWoundTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_GUSHING_WOUND) == CAST_OK) + m_uiGushingWoundTimer = urand(25000, 30000); + } + else + m_uiGushingWoundTimer -= uiDiff; + + if (m_uiHowlingScreechTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_HOWLING_SCREECH) == CAST_OK) + m_uiHowlingScreechTimer = urand(10000, 16000); + } + else + m_uiHowlingScreechTimer -= uiDiff; + + if (m_uiStrikeTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_STRIKE) == CAST_OK) + m_uiStrikeTimer = urand(5000, 7000); + } + else + m_uiStrikeTimer -= uiDiff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_npc_erekem_guard(Creature* pCreature) +{ + return new npc_erekem_guardAI (pCreature); +} + void AddSC_boss_erekem() { Script* pNewScript; @@ -101,4 +254,9 @@ void AddSC_boss_erekem() pNewScript->Name = "boss_erekem"; pNewScript->GetAI = &GetAI_boss_erekem; pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_erekem_guard"; + pNewScript->GetAI = &GetAI_npc_erekem_guard; + pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 470f35d91..6e78bbb53 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2584" + #define SD2_REVISION_NR "2585" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index b72748000..45c0a0c24 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -1308,6 +1308,7 @@ UPDATE creature_template SET ScriptName='npc_prison_event_controller' WHERE entr UPDATE creature_template SET ScriptName='npc_teleportation_portal' WHERE entry IN (31011,30679,32174); UPDATE creature_template SET ScriptName='boss_ichoron' WHERE entry IN (29313,32234); UPDATE creature_template SET ScriptName='boss_erekem' WHERE entry IN (29315,32226); +UPDATE creature_template SET ScriptName='npc_erekem_guard' WHERE entry=29395; /* WAILING CAVERNS */ UPDATE instance_template SET ScriptName='instance_wailing_caverns' WHERE map=43; diff --git a/sql/updates/r2585_mangos.sql b/sql/updates/r2585_mangos.sql new file mode 100644 index 000000000..b1140712e --- /dev/null +++ b/sql/updates/r2585_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_erekem_guard' WHERE entry=29395; From 8ebc2a9847cda5606a45b424d6cf6d51b7f908ed Mon Sep 17 00:00:00 2001 From: Xfurry Date: Tue, 12 Jun 2012 01:08:27 +0300 Subject: [PATCH 0574/1172] [2586] Implement combat abilities for Ichoron - Violet Hold Note: Water Globule event requires additional research --- .../northrend/violet_hold/boss_ichoron.cpp | 64 ++++++++++++++++++- .../violet_hold/instance_violet_hold.cpp | 3 + scripts/northrend/violet_hold/violet_hold.h | 2 + sd2_revision_nr.h | 2 +- sql/scriptdev2_script_full.sql | 4 +- sql/updates/r2586_scriptdev2.sql | 3 + 6 files changed, 74 insertions(+), 4 deletions(-) create mode 100644 sql/updates/r2586_scriptdev2.sql diff --git a/scripts/northrend/violet_hold/boss_ichoron.cpp b/scripts/northrend/violet_hold/boss_ichoron.cpp index 2811509b3..b0fc22a1c 100644 --- a/scripts/northrend/violet_hold/boss_ichoron.cpp +++ b/scripts/northrend/violet_hold/boss_ichoron.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: boss_ichoron -SD%Complete: 0 -SDComment: Placeholder +SD%Complete: 50 +SDComment: Water Globule event NYI SDCategory: Violet Hold EndScriptData */ @@ -34,8 +34,31 @@ enum SAY_SLAY_3 = -1608024, SAY_ENRAGE = -1608025, SAY_DEATH = -1608026, + EMOTE_BUBBLE = -1608028, + + SPELL_SPLASH = 59516, + SPELL_DRAINED = 59820, + SPELL_FRENZY = 54312, + SPELL_FRENZY_H = 59522, + SPELL_PROTECTIVE_BUBBLE = 54306, + SPELL_WATER_BLAST = 54237, + SPELL_WATER_BLAST_H = 59520, + SPELL_WATER_BOLT_VOLLEY = 54241, + SPELL_WATER_BOLT_VOLLEY_H = 59521, + SPELL_WATER_GLOBULE = 54260, + + SPELL_WATER_GLOBULE_SPAWN_1 = 54258, + SPELL_WATER_GLOBULE_SPAWN_2 = 54264, + SPELL_WATER_GLOBULE_SPAWN_3 = 54265, + SPELL_WATER_GLOBULE_SPAWN_4 = 54266, + SPELL_WATER_GLOBULE_SPAWN_5 = 54267, + + SPELL_MERGE = 54269, // used by globules + SPELL_WATER_GLOBULE_TRANS = 54268, }; +static const uint32 aWaterGlobuleSpells[5] = {SPELL_WATER_GLOBULE_SPAWN_1, SPELL_WATER_GLOBULE_SPAWN_2, SPELL_WATER_GLOBULE_SPAWN_3, SPELL_WATER_GLOBULE_SPAWN_4, SPELL_WATER_GLOBULE_SPAWN_5}; + struct MANGOS_DLL_DECL boss_ichoronAI : public ScriptedAI { boss_ichoronAI(Creature* pCreature) : ScriptedAI(pCreature) @@ -49,13 +72,22 @@ struct MANGOS_DLL_DECL boss_ichoronAI : public ScriptedAI instance_violet_hold* m_pInstance; bool m_bIsRegularMode; + uint32 m_uiWaterBoltVolleyTimer; + uint32 m_uiWaterBlastTimer; + bool m_bIsFrenzy; + void Reset() { + m_uiWaterBoltVolleyTimer = urand(10000, 12000); + m_uiWaterBlastTimer = 10000; + m_bIsFrenzy = false; } void Aggro(Unit* pWho) { DoScriptText(SAY_AGGRO, m_creature); + + DoCastSpellIfCan(m_creature, SPELL_PROTECTIVE_BUBBLE); } void JustDied(Unit* pKiller) @@ -81,6 +113,34 @@ struct MANGOS_DLL_DECL boss_ichoronAI : public ScriptedAI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; + if (m_uiWaterBlastTimer < uiDiff) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, m_bIsRegularMode ? SPELL_WATER_BLAST : SPELL_WATER_BLAST_H) == CAST_OK) + m_uiWaterBlastTimer = urand(8000, 14000); + } + } + else + m_uiWaterBlastTimer -= uiDiff; + + if (m_uiWaterBoltVolleyTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_WATER_BOLT_VOLLEY : SPELL_WATER_BOLT_VOLLEY_H) == CAST_OK) + m_uiWaterBoltVolleyTimer = urand(7000, 12000); + } + else + m_uiWaterBoltVolleyTimer -= uiDiff; + + if (!m_bIsFrenzy && m_creature->GetHealthPercent() < 25.0f) + { + if (DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_FRENZY : SPELL_FRENZY_H) == CAST_OK) + { + DoScriptText(SAY_ENRAGE, m_creature); + m_bIsFrenzy = true; + } + } + DoMeleeAttackIfReady(); } }; diff --git a/scripts/northrend/violet_hold/instance_violet_hold.cpp b/scripts/northrend/violet_hold/instance_violet_hold.cpp index cba474e0d..cc3c9d593 100644 --- a/scripts/northrend/violet_hold/instance_violet_hold.cpp +++ b/scripts/northrend/violet_hold/instance_violet_hold.cpp @@ -131,6 +131,9 @@ void instance_violet_hold::OnCreatureCreate(Creature* pCreature) case NPC_EREKEM_GUARD: m_lErekemGuardList.push_back(pCreature->GetObjectGuid()); return; + case NPC_ICHORON_SUMMON_TARGET: + m_lIchoronTargetsList.push_back(pCreature->GetObjectGuid()); + return; case NPC_ARAKKOA: case NPC_VOID_LORD: diff --git a/scripts/northrend/violet_hold/violet_hold.h b/scripts/northrend/violet_hold/violet_hold.h index 63983044a..559d042bc 100644 --- a/scripts/northrend/violet_hold/violet_hold.h +++ b/scripts/northrend/violet_hold/violet_hold.h @@ -224,6 +224,7 @@ class MANGOS_DLL_DECL instance_violet_hold : public ScriptedInstance void ProcessActivationCrystal(Unit* pUser, bool bIsIntro = false); void GetErekemGuardList(GUIDList& lList) { lList = m_lErekemGuardList; } + void GetIchoronTriggerList(GUIDList& lList) { lList = m_lIchoronTargetsList; } void OnPlayerEnter(Player* pPlayer); @@ -288,6 +289,7 @@ class MANGOS_DLL_DECL instance_violet_hold : public ScriptedInstance GUIDList m_lIntroPortalList; GUIDList m_lGuardsList; GUIDList m_lErekemGuardList; + GUIDList m_lIchoronTargetsList; std::list m_lRandomBossList; std::vector m_vRandomBosses; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 6e78bbb53..dda3a4b16 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2585" + #define SD2_REVISION_NR "2586" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 3b9683e58..a4bd44085 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -3376,7 +3376,9 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1608025,'I shall consume,decimate, devastate,and destroy! Yield now to the wrath of the pounding sea!',14231,1,0,0,'ichoron SAY_ENRAGE'), (-1608026,'I... recede.',14237,1,0,0,'ichoron SAY_DEATH'), -(-1608027,'You did it! You held the Blue Dragonflight back and defeated their commander. Amazing work!',0,0,0,1,'sinclari SAY_VICTORY'); +(-1608027,'You did it! You held the Blue Dragonflight back and defeated their commander. Amazing work!',0,0,0,1,'sinclari SAY_VICTORY'), + +(-1608028,'%s\'s Protective Bubble shatters!',0,3,0,0,'ichoron EMOTE_BUBBLE'); -- -1 609 000 EBON HOLD (DK START) INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES diff --git a/sql/updates/r2586_scriptdev2.sql b/sql/updates/r2586_scriptdev2.sql new file mode 100644 index 000000000..0a53a4dc9 --- /dev/null +++ b/sql/updates/r2586_scriptdev2.sql @@ -0,0 +1,3 @@ +DELETE FROM script_texts WHERE entry IN (-1608028); +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1608028,'%s\'s Protective Bubble shatters!',0,3,0,0,'ichoron EMOTE_BUBBLE'); From 05655d0ba4aaeca640ad19666d5d737e78729893 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Fri, 15 Jun 2012 00:07:36 +0300 Subject: [PATCH 0575/1172] [2587] Make some small adjustments and comments to Ymiron's script --- .../utgarde_pinnacle/boss_ymiron.cpp | 22 ++++++------------- sd2_revision_nr.h | 2 +- 2 files changed, 8 insertions(+), 16 deletions(-) diff --git a/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_ymiron.cpp b/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_ymiron.cpp index da65f48eb..4a58fe3b3 100644 --- a/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_ymiron.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_ymiron.cpp @@ -52,7 +52,7 @@ enum SPELL_SPIRIT_STRIKE_H = 59304, SPELL_SUMMON_SPIRIT_FOUNT = 48386, // by Bjorn SPELL_SPIRIT_FOUNT_BEAM = 48385, // channeled beam on the spirit fount - triggers 48380 : 59320 on aura expire - SPELL_AVENGING_SPIRITS = 48590, // by Torgyn - has script effect - 48592 + SPELL_AVENGING_SPIRITS = 48590, // by Torgyn // visuals SPELL_CHANNEL_YMIRON_SPIRIT = 48307, @@ -61,8 +61,8 @@ enum SPELL_SPIRIT_DIES = 48596, // cast by a boat spirit // by summoned creatures - SPELL_SPIRIT_VISUAL = 48593, // avenging spirit summon visual - SPELL_WITHER_TRIGG = 48584, // aura for avenging spirits - triggers 48585 on melee + //SPELL_SPIRIT_VISUAL = 48593, // avenging spirit summon visual - handled in eventAI + //SPELL_WITHER_TRIGG = 48584, // aura for avenging spirits - triggers 48585 on melee - handled in eventAI // spirit transforms SPELL_BJORN_TRANSFORM = 48308, @@ -71,7 +71,8 @@ enum SPELL_TORGYN_TRANSFORM = 48313, NPC_SPIRIT_FOUNT = 27339, - NPC_AVENGING_SPIRIT = 27386, + //NPC_AVENGING_SPIRIT = 27386, + //NPC_SPIRIT_SUMMONER = 27392, // summoned around the boss - triggers 48592 MAX_BOATS = 4, @@ -237,17 +238,8 @@ struct MANGOS_DLL_DECL boss_ymironAI : public ScriptedAI void JustSummoned(Creature* pSummoned) { - switch(pSummoned->GetEntry()) - { - case NPC_SPIRIT_FOUNT: - DoCastSpellIfCan(pSummoned, SPELL_SPIRIT_FOUNT_BEAM, CAST_INTERRUPT_PREVIOUS); - break; - // ToDo: This needs further research and core support - //case NPC_AVENGING_SPIRIT: - // pSummoned->CastSpell(pSummoned, SPELL_SPIRIT_VISUAL, true); - // pSummoned->CastSpell(pSummoned, SPELL_WITHER_TRIGG, true); - // break; - } + if (pSummoned->GetEntry() == NPC_SPIRIT_FOUNT) + DoCastSpellIfCan(pSummoned, SPELL_SPIRIT_FOUNT_BEAM, CAST_INTERRUPT_PREVIOUS); } void MovementInform(uint32 uiMotionType, uint32 uiPointId) diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index dda3a4b16..c02ba40d1 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2586" + #define SD2_REVISION_NR "2587" #endif // __SD2_REVISION_NR_H__ From bee0a196edbc316849ccd885c528192290f3c674 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Fri, 15 Jun 2012 00:15:13 +0300 Subject: [PATCH 0576/1172] [2588] Improve script for Anub'Rekhan based on the work of mns Notes: * this will add a workaround for the summon Crypt Guard spell and related timers and emotes * and will also fix the intro dialogue Additionally add proper distance check to Jedoga and Faerlina intro --- .../azjol-nerub/ahnkahet/boss_jedoga.cpp | 2 +- .../northrend/naxxramas/boss_anubrekhan.cpp | 98 +++++++++++++------ scripts/northrend/naxxramas/boss_faerlina.cpp | 2 +- sd2_revision_nr.h | 2 +- 4 files changed, 73 insertions(+), 31 deletions(-) diff --git a/scripts/northrend/azjol-nerub/ahnkahet/boss_jedoga.cpp b/scripts/northrend/azjol-nerub/ahnkahet/boss_jedoga.cpp index 41110861d..6c0faa171 100644 --- a/scripts/northrend/azjol-nerub/ahnkahet/boss_jedoga.cpp +++ b/scripts/northrend/azjol-nerub/ahnkahet/boss_jedoga.cpp @@ -168,7 +168,7 @@ struct MANGOS_DLL_DECL boss_jedogaAI : public ScriptedAI void MoveInLineOfSight(Unit* pWho) { - if (!m_bHasDoneIntro && pWho->GetTypeId() == TYPEID_PLAYER && m_creature->IsWithinLOSInMap(pWho)) + if (!m_bHasDoneIntro && pWho->GetTypeId() == TYPEID_PLAYER && m_creature->IsWithinDistInMap(pWho, 110.0f) && m_creature->IsWithinLOSInMap(pWho)) { switch(urand(0, 4)) { diff --git a/scripts/northrend/naxxramas/boss_anubrekhan.cpp b/scripts/northrend/naxxramas/boss_anubrekhan.cpp index 552baf457..5f15d2f17 100644 --- a/scripts/northrend/naxxramas/boss_anubrekhan.cpp +++ b/scripts/northrend/naxxramas/boss_anubrekhan.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: Boss_Anubrekhan -SD%Complete: 70 -SDComment: +SD%Complete: 95 +SDComment: Intro text usage is not very clear. Requires additional research. SDCategory: Naxxramas EndScriptData */ @@ -36,9 +36,9 @@ enum SAY_TAUNT4 = -1533007, SAY_SLAY = -1533008, - EMOTE_CRYPT_GUARD = -1533153, // NYI - EMOTE_INSECT_SWARM = -1533154, // NYI - EMOTE_CORPSE_SCARABS = -1533155, // NYI + EMOTE_CRYPT_GUARD = -1533153, + EMOTE_INSECT_SWARM = -1533154, + EMOTE_CORPSE_SCARABS = -1533155, SPELL_IMPALE = 28783, //May be wrong spell id. Causes more dmg than I expect SPELL_IMPALE_H = 56090, @@ -46,7 +46,7 @@ enum SPELL_LOCUSTSWARM_H = 54021, //spellId invalid - SPELL_SUMMONGUARD = 29508, //Summons 1 crypt guard at targeted location + //SPELL_SUMMONGUARD = 29508, //Summons 1 crypt guard at targeted location - spell doesn't exist in 3.x.x SPELL_SELF_SPAWN_5 = 29105, //This spawns 5 corpse scarabs ontop of us (most likely the pPlayer casts this on death) SPELL_SELF_SPAWN_10 = 28864, //This is used by the crypt guards when they die @@ -54,17 +54,32 @@ enum NPC_CRYPT_GUARD = 16573 }; +static const DialogueEntry aIntroDialogue[] = +{ + {SAY_GREET, NPC_ANUB_REKHAN, 7000}, + {SAY_TAUNT1, NPC_ANUB_REKHAN, 13000}, + {SAY_TAUNT2, NPC_ANUB_REKHAN, 11000}, + {SAY_TAUNT3, NPC_ANUB_REKHAN, 10000}, + {SAY_TAUNT4, NPC_ANUB_REKHAN, 0}, + {0,0,0} +}; + +static const float aCryptGuardLoc[4] = {3333.5f, -3475.9f, 287.1f, 3.17f}; + struct MANGOS_DLL_DECL boss_anubrekhanAI : public ScriptedAI { - boss_anubrekhanAI(Creature* pCreature) : ScriptedAI(pCreature) + boss_anubrekhanAI(Creature* pCreature) : ScriptedAI(pCreature), + m_introDialogue(aIntroDialogue) { m_pInstance = (instance_naxxramas*)pCreature->GetInstanceData(); m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); + m_introDialogue.InitializeDialogueHelper(m_pInstance); m_bHasTaunted = false; Reset(); } instance_naxxramas* m_pInstance; + DialogueHelper m_introDialogue; bool m_bIsRegularMode; uint32 m_uiImpaleTimer; @@ -74,16 +89,16 @@ struct MANGOS_DLL_DECL boss_anubrekhanAI : public ScriptedAI void Reset() { - m_uiImpaleTimer = 15000; // 15 seconds - m_uiLocustSwarmTimer = urand(80000, 120000); // Random time between 80 seconds and 2 minutes for initial cast - m_uiSummonTimer = m_uiLocustSwarmTimer + 45000; // 45 seconds after initial locust swarm + m_uiImpaleTimer = 15000; + m_uiLocustSwarmTimer = 90000; + m_uiSummonTimer = m_bIsRegularMode ? 20000 : 0; // spawn a guardian only after 20 seconds in normal mode; in heroic there are already 2 Guards spawned } void KilledUnit(Unit* pVictim) { - //Force the player to spawn corpse scarabs via spell + // Force the player to spawn corpse scarabs via spell if (pVictim->GetTypeId() == TYPEID_PLAYER) - pVictim->CastSpell(pVictim, SPELL_SELF_SPAWN_5, true); + pVictim->CastSpell(pVictim, SPELL_SELF_SPAWN_5, true, NULL, NULL, m_creature->GetObjectGuid()); if (urand(0, 4)) return; @@ -118,24 +133,41 @@ struct MANGOS_DLL_DECL boss_anubrekhanAI : public ScriptedAI void MoveInLineOfSight(Unit* pWho) { - if (!m_bHasTaunted && m_creature->IsWithinDistInMap(pWho, 60.0f)) + if (!m_bHasTaunted && pWho->GetTypeId() == TYPEID_PLAYER && m_creature->IsWithinDistInMap(pWho, 110.0f) && m_creature->IsWithinLOSInMap(pWho)) { - switch(urand(0, 4)) - { - 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; - } + m_introDialogue.StartNextDialogueText(SAY_GREET); m_bHasTaunted = true; } ScriptedAI::MoveInLineOfSight(pWho); } + void JustSummoned(Creature* pSummoned) + { + if (pSummoned->GetEntry() == NPC_CRYPT_GUARD) + DoScriptText(EMOTE_CRYPT_GUARD, pSummoned); + + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + pSummoned->AI()->AttackStart(pTarget); + } + + void SummonedCreatureDespawn(Creature* pSummoned) + { + // If creature despawns on out of combat, skip this + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (pSummoned->GetEntry() == NPC_CRYPT_GUARD) + { + pSummoned->CastSpell(pSummoned, SPELL_SELF_SPAWN_10, true, NULL, NULL, m_creature->GetObjectGuid()); + DoScriptText(EMOTE_CORPSE_SCARABS, pSummoned); + } + } + void UpdateAI(const uint32 uiDiff) { + m_introDialogue.DialogueUpdate(uiDiff); + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -158,20 +190,30 @@ struct MANGOS_DLL_DECL boss_anubrekhanAI : public ScriptedAI // Locust Swarm if (m_uiLocustSwarmTimer < uiDiff) { - DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_LOCUSTSWARM :SPELL_LOCUSTSWARM_H); - m_uiLocustSwarmTimer = 90000; + if (DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_LOCUSTSWARM :SPELL_LOCUSTSWARM_H) == CAST_OK) + { + DoScriptText(EMOTE_INSECT_SWARM, m_creature); + + // Summon a crypt guard + m_uiSummonTimer = 3000; + m_uiLocustSwarmTimer = 100000; + } } else m_uiLocustSwarmTimer -= uiDiff; // Summon - /*if (m_uiSummonTimer < uiDiff) + if (m_uiSummonTimer) { - DoCastSpellIfCan(m_creature, SPELL_SUMMONGUARD); - Summon_Timer = 45000; + if (m_uiSummonTimer <= uiDiff) + { + // Workaround for the not existing spell + m_creature->SummonCreature(NPC_CRYPT_GUARD, aCryptGuardLoc[0], aCryptGuardLoc[1], aCryptGuardLoc[2], aCryptGuardLoc[3], TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 30000); + m_uiSummonTimer = 0; + } + else + m_uiSummonTimer -= uiDiff; } - else - m_uiSummonTimer -= uiDiff;*/ DoMeleeAttackIfReady(); } diff --git a/scripts/northrend/naxxramas/boss_faerlina.cpp b/scripts/northrend/naxxramas/boss_faerlina.cpp index e0ab9a6f2..4c4b4591d 100644 --- a/scripts/northrend/naxxramas/boss_faerlina.cpp +++ b/scripts/northrend/naxxramas/boss_faerlina.cpp @@ -90,7 +90,7 @@ struct MANGOS_DLL_DECL boss_faerlinaAI : public ScriptedAI void MoveInLineOfSight(Unit* pWho) { - if (!m_bHasTaunted && m_creature->IsWithinDistInMap(pWho, 60.0f)) + if (!m_bHasTaunted && pWho->GetTypeId() == TYPEID_PLAYER && m_creature->IsWithinDistInMap(pWho, 80.0f) && m_creature->IsWithinLOSInMap(pWho)) { DoScriptText(SAY_GREET, m_creature); m_bHasTaunted = true; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index c02ba40d1..24a8f4e73 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2587" + #define SD2_REVISION_NR "2588" #endif // __SD2_REVISION_NR_H__ From 7966ea5cc0438db4ff36679277abce76ef8c8aa5 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sat, 16 Jun 2012 10:08:59 +0300 Subject: [PATCH 0577/1172] [2589] Improve timers and codestyle for Auchenai Crypts bosses Thanks to X-Savior for providing the proper data --- .../auchenai_crypts/boss_exarch_maladaar.cpp | 70 +++++++++++-------- .../auchenai_crypts/boss_shirrak.cpp | 12 ++-- sd2_revision_nr.h | 2 +- 3 files changed, 49 insertions(+), 35 deletions(-) diff --git a/scripts/outland/auchindoun/auchenai_crypts/boss_exarch_maladaar.cpp b/scripts/outland/auchindoun/auchenai_crypts/boss_exarch_maladaar.cpp index d4cdb0645..81b9c20d2 100644 --- a/scripts/outland/auchindoun/auchenai_crypts/boss_exarch_maladaar.cpp +++ b/scripts/outland/auchindoun/auchenai_crypts/boss_exarch_maladaar.cpp @@ -17,7 +17,7 @@ /* ScriptData SDName: Boss_Exarch_Maladaar SD%Complete: 95 -SDComment: Most of event implemented, some adjustments to timers remain and possibly make some better code for switching his dark side in to better "images" of player. +SDComment: Most of event implemented, possibly make some better code for switching his dark side in to better "images" of player. SDCategory: Auchindoun, Auchenai Crypts EndScriptData */ @@ -31,6 +31,8 @@ EndContentData */ enum { + SPELL_STOLEN_SOUL_DISPEL= 33326, + SPELL_MOONFIRE = 37328, SPELL_FIREBALL = 37329, SPELL_MIND_FLAY = 37330, @@ -50,6 +52,8 @@ struct MANGOS_DLL_DECL mob_stolen_soulAI : public ScriptedAI uint8 m_uiStolenClass; uint32 m_uiSpellTimer; + ObjectGuid m_targetGuid; + void Reset() { m_uiSpellTimer = 1000; @@ -58,8 +62,14 @@ struct MANGOS_DLL_DECL mob_stolen_soulAI : public ScriptedAI void SetSoulInfo(Unit* pTarget) { m_uiStolenClass = pTarget->getClass(); + m_targetGuid = pTarget->GetObjectGuid(); m_creature->SetDisplayId(pTarget->GetDisplayId()); + } + void JustDied(Unit* pKiller) + { + if (Unit* pTarget = m_creature->GetMap()->GetUnit(m_targetGuid)) + DoCastSpellIfCan(pTarget, SPELL_STOLEN_SOUL_DISPEL, CAST_TRIGGERED); } void UpdateAI(const uint32 uiDiff) @@ -169,16 +179,16 @@ struct MANGOS_DLL_DECL boss_exarch_maladaarAI : public ScriptedAI { m_targetGuid.Clear(); - m_uiFearTimer = urand(15000, 20000); - m_uiRibbonOfSoulsTimer = 5000; - m_uiStolenSoulTimer = urand(25000, 35000); + m_uiFearTimer = urand(11000, 29000); + m_uiRibbonOfSoulsTimer = urand(4000, 8000); + m_uiStolenSoulTimer = urand(19000, 31000); m_bHasSummonedAvatar = false; } void MoveInLineOfSight(Unit* pWho) { - if (!m_bHasTaunted && m_creature->IsWithinDistInMap(pWho, 150.0)) + if (!m_bHasTaunted && pWho->GetTypeId() == TYPEID_PLAYER && m_creature->IsWithinDistInMap(pWho, 150.0f) && m_creature->IsWithinLOSInMap(pWho)) { DoScriptText(SAY_INTRO, m_creature); m_bHasTaunted = true; @@ -203,15 +213,13 @@ struct MANGOS_DLL_DECL boss_exarch_maladaarAI : public ScriptedAI { //SPELL_STOLEN_SOUL_VISUAL has shapeshift effect, but not implemented feature in mangos for this spell. pSummoned->CastSpell(pSummoned, SPELL_STOLEN_SOUL_VISUAL, false); - pSummoned->setFaction(m_creature->getFaction()); if (Player* pTarget = m_creature->GetMap()->GetPlayer(m_targetGuid)) { if (mob_stolen_soulAI* pSoulAI = dynamic_cast(pSummoned->AI())) - { pSoulAI->SetSoulInfo(pTarget); - pSoulAI->AttackStart(pTarget); - } + + pSummoned->AI()->AttackStart(pTarget); } } } @@ -232,6 +240,12 @@ struct MANGOS_DLL_DECL boss_exarch_maladaarAI : public ScriptedAI DoSpawnCreature(NPC_DORE, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN, 600000); } + void SpellHitTarget(Unit* pTarget, const SpellEntry* pSpell) + { + if (pSpell->Id == SPELL_STOLEN_SOUL && pTarget->GetTypeId() == TYPEID_PLAYER) + DoSpawnCreature(NPC_STOLEN_SOUL, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 10000); + } + void UpdateAI(const uint32 uiDiff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) @@ -239,28 +253,27 @@ struct MANGOS_DLL_DECL boss_exarch_maladaarAI : public ScriptedAI if (!m_bHasSummonedAvatar && m_creature->GetHealthPercent() < 25.0f) { - if (m_creature->IsNonMeleeSpellCasted(false)) - m_creature->InterruptNonMeleeSpells(true); - - DoScriptText(SAY_SUMMON, m_creature); - - DoCastSpellIfCan(m_creature, SPELL_SUMMON_AVATAR); - m_bHasSummonedAvatar = true; - m_uiStolenSoulTimer = urand(15000, 30000); + if (DoCastSpellIfCan(m_creature, SPELL_SUMMON_AVATAR) == CAST_OK) + { + DoScriptText(SAY_SUMMON, m_creature); + m_bHasSummonedAvatar = true; + m_uiStolenSoulTimer = urand(15000, 30000); + } } if (m_uiStolenSoulTimer < uiDiff) { if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0, SPELL_STOLEN_SOUL, SELECT_FLAG_PLAYER)) { - DoScriptText(urand(0, 1) ? SAY_ROAR : SAY_SOUL_CLEAVE, m_creature); - - m_targetGuid = pTarget->GetObjectGuid(); + if (DoCastSpellIfCan(pTarget, SPELL_STOLEN_SOUL) == CAST_OK) + { + if (urand(0, 1)) + DoScriptText(urand(0, 1) ? SAY_ROAR : SAY_SOUL_CLEAVE, m_creature); - DoCastSpellIfCan(pTarget, SPELL_STOLEN_SOUL, CAST_INTERRUPT_PREVIOUS); - DoSpawnCreature(NPC_STOLEN_SOUL, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 10000); + m_targetGuid = pTarget->GetObjectGuid(); - m_uiStolenSoulTimer = urand(20000, 30000); + m_uiStolenSoulTimer = urand(35000, 67000); + } } } else @@ -269,17 +282,18 @@ struct MANGOS_DLL_DECL boss_exarch_maladaarAI : public ScriptedAI if (m_uiRibbonOfSoulsTimer < uiDiff) { if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) - DoCastSpellIfCan(pTarget, SPELL_RIBBON_OF_SOULS); - - m_uiRibbonOfSoulsTimer = urand(5000, 25000); + { + if (DoCastSpellIfCan(pTarget, SPELL_RIBBON_OF_SOULS) == CAST_OK) + m_uiRibbonOfSoulsTimer = urand(4000, 18000); + } } else m_uiRibbonOfSoulsTimer -= uiDiff; if (m_uiFearTimer < uiDiff) { - DoCastSpellIfCan(m_creature, SPELL_SOUL_SCREAM); - m_uiFearTimer = urand(15000, 30000); + if (DoCastSpellIfCan(m_creature, SPELL_SOUL_SCREAM) == CAST_OK) + m_uiFearTimer = urand(13000, 30000); } else m_uiFearTimer -= uiDiff; diff --git a/scripts/outland/auchindoun/auchenai_crypts/boss_shirrak.cpp b/scripts/outland/auchindoun/auchenai_crypts/boss_shirrak.cpp index 5f0fd6f68..1d41cf733 100644 --- a/scripts/outland/auchindoun/auchenai_crypts/boss_shirrak.cpp +++ b/scripts/outland/auchindoun/auchenai_crypts/boss_shirrak.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: boss_shirrak -SD%Complete: 90 -SDComment: Timers may need small adjustments +SD%Complete: 100 +SDComment: SDCategory: Auchindoun, Auchenai Crypts EndScriptData */ @@ -56,9 +56,9 @@ struct MANGOS_DLL_DECL boss_shirrakAI : public ScriptedAI void Reset() { - m_uiCarnivorousBiteTimer = 10000; + m_uiCarnivorousBiteTimer = urand(4000, 7000); m_uiFocusFireTimer = 15000; - m_uiAttractMagicTimer = 25000; + m_uiAttractMagicTimer = urand(20000, 24000); m_uiFocusFireCount = 0; DoCastSpellIfCan(m_creature, SPELL_INHIBIT_MAGIC); @@ -79,7 +79,7 @@ struct MANGOS_DLL_DECL boss_shirrakAI : public ScriptedAI if (m_uiCarnivorousBiteTimer < uiDiff) { if (DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_CARNIVOROUS_BITE : SPELL_CARNIVOROUS_BITE_H) == CAST_OK) - m_uiCarnivorousBiteTimer = urand(8000, 12000); + m_uiCarnivorousBiteTimer = urand(4000, 10000); } else m_uiCarnivorousBiteTimer -= uiDiff; @@ -87,7 +87,7 @@ struct MANGOS_DLL_DECL boss_shirrakAI : public ScriptedAI if (m_uiAttractMagicTimer < uiDiff) { if (DoCastSpellIfCan(m_creature, SPELL_ATTRACT_MAGIC) == CAST_OK) - m_uiAttractMagicTimer = urand(20000, 25000); + m_uiAttractMagicTimer = urand(25000, 38000); } else m_uiAttractMagicTimer -= uiDiff; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 24a8f4e73..60b33d180 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2588" + #define SD2_REVISION_NR "2589" #endif // __SD2_REVISION_NR_H__ From 63b6f39e6cf1eb743660e9d71dc8203ff1c3a020 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sat, 16 Jun 2012 13:13:57 +0300 Subject: [PATCH 0578/1172] [2590] Improve script for the Four Horsemen - Naxxramas This will also implement the horsemen intro dialogue and will fix some instance gameobjects --- .../naxxramas/boss_four_horsemen.cpp | 479 ++++++++++++------ .../naxxramas/instance_naxxramas.cpp | 57 ++- scripts/northrend/naxxramas/naxxramas.h | 19 + sd2_revision_nr.h | 2 +- sql/scriptdev2_script_full.sql | 24 +- sql/updates/r2590_scriptdev2.sql | 1 + 6 files changed, 411 insertions(+), 171 deletions(-) create mode 100644 sql/updates/r2590_scriptdev2.sql diff --git a/scripts/northrend/naxxramas/boss_four_horsemen.cpp b/scripts/northrend/naxxramas/boss_four_horsemen.cpp index e87301195..c96bd40c9 100644 --- a/scripts/northrend/naxxramas/boss_four_horsemen.cpp +++ b/scripts/northrend/naxxramas/boss_four_horsemen.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: Boss_Four_Horsemen -SD%Complete: 75 -SDComment: Lady Blaumeux, Thane Korthazz, Sir Zeliek, Baron Rivendare +SD%Complete: 90 +SDComment: Lady Blaumeux, Thane Korthazz, Sir Zeliek, Baron Rivendare; Berserk NYI; Achievements NYI. SDCategory: Naxxramas EndScriptData */ @@ -26,110 +26,149 @@ EndScriptData */ enum { - //all horsemen - SPELL_SHIELDWALL = 29061, - SPELL_BESERK = 26662, - - //lady blaumeux + // ***** Yells ***** + // lady blaumeux SAY_BLAU_AGGRO = -1533044, - SAY_BLAU_TAUNT1 = -1533045, - SAY_BLAU_TAUNT2 = -1533046, - SAY_BLAU_TAUNT3 = -1533047, SAY_BLAU_SPECIAL = -1533048, SAY_BLAU_SLAY = -1533049, SAY_BLAU_DEATH = -1533050, + EMOTE_UNYIELDING_PAIN = -1533156, - EMOTE_UNYIELDING_PAIN = -1533156, // NYI - - SPELL_MARK_OF_BLAUMEUX = 28833, - SPELL_UNYILDING_PAIN = 57381, - SPELL_VOIDZONE = 28863, - SPELL_VOIDZONE_H = 57463, - SPELL_SHADOW_BOLT = 57374, - SPELL_SHADOW_BOLT_H = 57464, - - //baron rivendare + // baron rivendare SAY_RIVE_AGGRO1 = -1533065, SAY_RIVE_AGGRO2 = -1533066, SAY_RIVE_AGGRO3 = -1533067, SAY_RIVE_SLAY1 = -1533068, SAY_RIVE_SLAY2 = -1533069, SAY_RIVE_SPECIAL = -1533070, - SAY_RIVE_TAUNT1 = -1533071, - SAY_RIVE_TAUNT2 = -1533072, - SAY_RIVE_TAUNT3 = -1533073, SAY_RIVE_DEATH = -1533074, - SPELL_MARK_OF_RIVENDARE = 28834, - SPELL_UNHOLY_SHADOW = 28882, - SPELL_UNHOLY_SHADOW_H = 57369, - - //thane korthazz + // thane korthazz SAY_KORT_AGGRO = -1533051, - SAY_KORT_TAUNT1 = -1533052, - SAY_KORT_TAUNT2 = -1533053, - SAY_KORT_TAUNT3 = -1533054, SAY_KORT_SPECIAL = -1533055, SAY_KORT_SLAY = -1533056, SAY_KORT_DEATH = -1533057, - SPELL_MARK_OF_KORTHAZZ = 28832, - SPELL_METEOR = 26558, // m_creature->getVictim() auto-area spell but with a core problem - - //sir zeliek + // sir zeliek SAY_ZELI_AGGRO = -1533058, - SAY_ZELI_TAUNT1 = -1533059, - SAY_ZELI_TAUNT2 = -1533060, - SAY_ZELI_TAUNT3 = -1533061, SAY_ZELI_SPECIAL = -1533062, SAY_ZELI_SLAY = -1533063, SAY_ZELI_DEATH = -1533064, + EMOTE_CONDEMATION = -1533157, + + // ***** Spells ***** + // all horsemen + //SPELL_SHIELDWALL = 29061, // not used in 3.x.x + SPELL_BESERK = 26662, + // Note: Berserk should be applied once 100 marks are casted. + // Also spell 59450, which is missing from DBC, is required for the achiev - EMOTE_CONDEMATION = -1533157, // NYI + // lady blaumeux + SPELL_MARK_OF_BLAUMEUX = 28833, + SPELL_VOID_ZONE = 28863, + SPELL_VOID_ZONE_H = 57463, + SPELL_SHADOW_BOLT = 57374, + SPELL_SHADOW_BOLT_H = 57464, + SPELL_UNYILDING_PAIN = 57381, + // baron rivendare + SPELL_MARK_OF_RIVENDARE = 28834, + SPELL_UNHOLY_SHADOW = 28882, + SPELL_UNHOLY_SHADOW_H = 57369, + + // thane korthazz + SPELL_MARK_OF_KORTHAZZ = 28832, + SPELL_METEOR = 28884, + SPELL_METEOR_H = 57467, + + // sir zeliek SPELL_MARK_OF_ZELIEK = 28835, SPELL_HOLY_WRATH = 28883, SPELL_HOLY_WRATH_H = 57466, SPELL_HOLY_BOLT = 57376, SPELL_HOLY_BOLT_H = 57465, + SPELL_CONDEMNATION = 57377, - // horseman spirits - NPC_SPIRIT_OF_BLAUMEUX = 16776, - NPC_SPIRIT_OF_RIVENDARE = 0, //creature entry not known yet - NPC_SPIRIT_OF_KORTHAZZ = 16778, - NPC_SPIRIT_OF_ZELIREK = 16777 + // horseman spirits (not used in 3.x.x) + //NPC_SPIRIT_OF_BLAUMEUX = 16776, + //NPC_SPIRIT_OF_MOGRAINE = 16775, + //NPC_SPIRIT_OF_KORTHAZZ = 16778, + //NPC_SPIRIT_OF_ZELIREK = 16777 +}; + +static const float aHorseMenMoveCoords[4][3] = +{ + {2469.4f, -2947.6f, 241.28f}, // lady blaumeux + {2583.9f, -2971.67f, 241.35f}, // baron rivendare + {2542.9f, -3015.0f, 241.35f}, // thane korthazz + {2517.8f, -2896.6f, 241.28f}, // sir zeliek }; struct MANGOS_DLL_DECL boss_lady_blaumeuxAI : public ScriptedAI { - boss_lady_blaumeuxAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + boss_lady_blaumeuxAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; + bool m_bIsRegularMode; - uint32 Mark_Timer; - uint32 VoidZone_Timer; - bool ShieldWall1; - bool ShieldWall2; + bool m_bIsCornerMovement; + uint32 m_uiMarkTimer; + uint32 m_uiVoidZoneTimer; + uint32 m_uiShadowBoltTimer; void Reset() { - Mark_Timer = 20000; // First Horsemen Mark is applied at 20 sec. - VoidZone_Timer = 12000; // right - ShieldWall1 = true; - ShieldWall2 = true; + m_uiMarkTimer = 20000; + m_uiVoidZoneTimer = 15000; + m_uiShadowBoltTimer = 10000; + m_bIsCornerMovement = true; } - void Aggro(Unit *who) + void Aggro(Unit* pWho) { DoScriptText(SAY_BLAU_AGGRO, m_creature); + + SetCombatMovement(false); + m_creature->SetWalk(false); + m_creature->GetMotionMaster()->MovePoint(1, aHorseMenMoveCoords[0][0], aHorseMenMoveCoords[0][1], aHorseMenMoveCoords[0][2]); + + if (m_pInstance) + m_pInstance->SetData(TYPE_FOUR_HORSEMEN, IN_PROGRESS); } - void KilledUnit(Unit* Victim) + void KilledUnit(Unit* pVictim) { DoScriptText(SAY_BLAU_SLAY, m_creature); } - void JustDied(Unit* Killer) + void JustDied(Unit* pKiller) { DoScriptText(SAY_BLAU_DEATH, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_FOUR_HORSEMEN, SPECIAL); + } + + void JustReachedHome() + { + if (m_pInstance) + m_pInstance->SetData(TYPE_FOUR_HORSEMEN, FAIL); + } + + void MovementInform(uint32 uiMotionType, uint32 uiPointId) + { + if (uiMotionType != POINT_MOTION_TYPE || !uiPointId) + return; + + // Stop moving when it reaches the corner + m_bIsCornerMovement = false; + m_creature->GetMotionMaster()->Clear(); + m_creature->GetMotionMaster()->MoveIdle(); } void UpdateAI(const uint32 uiDiff) @@ -137,37 +176,40 @@ struct MANGOS_DLL_DECL boss_lady_blaumeuxAI : public ScriptedAI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - // Mark of Blaumeux - if (Mark_Timer < uiDiff) + // Don't attack while moving + if (m_bIsCornerMovement) + return; + + if (m_uiMarkTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_MARK_OF_BLAUMEUX); - Mark_Timer = 12000; - }else Mark_Timer -= uiDiff; + if (DoCastSpellIfCan(m_creature, SPELL_MARK_OF_BLAUMEUX) == CAST_OK) + m_uiMarkTimer = 12000; + } + else + m_uiMarkTimer -= uiDiff; - // Shield Wall - All 4 horsemen will shield wall at 50% hp and 20% hp for 20 seconds - if (ShieldWall1 && m_creature->GetHealthPercent() < 50.0f) + if (m_uiVoidZoneTimer < uiDiff) { - if (ShieldWall1) - { - DoCastSpellIfCan(m_creature,SPELL_SHIELDWALL); - ShieldWall1 = false; - } + if (DoCastSpellIfCan(m_creature->getVictim(), m_bIsRegularMode ? SPELL_VOID_ZONE : SPELL_VOID_ZONE_H) == CAST_OK) + m_uiVoidZoneTimer = 15000; } - if (ShieldWall2 && m_creature->GetHealthPercent() < 20.0f) + else + m_uiVoidZoneTimer -= uiDiff; + + if (m_uiShadowBoltTimer < uiDiff) { - if (ShieldWall2) + // If we can find a target in range of 45.0f, then cast Shadowbolt + if (m_creature->IsWithinDist(m_creature->getVictim(), 45.0f)) + DoCastSpellIfCan(m_creature->getVictim(), m_bIsRegularMode ? SPELL_SHADOW_BOLT : SPELL_SHADOW_BOLT_H); + else { - DoCastSpellIfCan(m_creature,SPELL_SHIELDWALL); - ShieldWall2 = false; + DoCastSpellIfCan(m_creature, SPELL_UNYILDING_PAIN); + DoScriptText(EMOTE_UNYIELDING_PAIN, m_creature); } + m_uiShadowBoltTimer = urand(2000, 3000); } - - // Void Zone - if (VoidZone_Timer < uiDiff) - { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_VOIDZONE); - VoidZone_Timer = 12000; - }else VoidZone_Timer -= uiDiff; + else + m_uiShadowBoltTimer -= uiDiff; DoMeleeAttackIfReady(); } @@ -180,13 +222,28 @@ CreatureAI* GetAI_boss_lady_blaumeux(Creature* pCreature) struct MANGOS_DLL_DECL boss_rivendare_naxxAI : public ScriptedAI { - boss_rivendare_naxxAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + boss_rivendare_naxxAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; + bool m_bIsRegularMode; + + bool m_bIsCornerMovement; + uint32 m_uiMarkTimer; + uint32 m_uiUnholyShadowTimer; void Reset() { + m_uiMarkTimer = 20000; + m_uiUnholyShadowTimer = 15000; + m_bIsCornerMovement = true; } - void Aggro(Unit *who) + void Aggro(Unit* pWho) { switch(urand(0, 2)) { @@ -194,16 +251,45 @@ struct MANGOS_DLL_DECL boss_rivendare_naxxAI : public ScriptedAI case 1: DoScriptText(SAY_RIVE_AGGRO2, m_creature); break; case 2: DoScriptText(SAY_RIVE_AGGRO3, m_creature); break; } + + SetCombatMovement(false); + m_creature->SetWalk(false); + m_creature->GetMotionMaster()->MovePoint(1, aHorseMenMoveCoords[1][0], aHorseMenMoveCoords[1][1], aHorseMenMoveCoords[1][2]); + + if (m_pInstance) + m_pInstance->SetData(TYPE_FOUR_HORSEMEN, IN_PROGRESS); } - void KilledUnit(Unit* Victim) + void KilledUnit(Unit* pVictim) { DoScriptText(urand(0, 1) ? SAY_RIVE_SLAY1 : SAY_RIVE_SLAY2, m_creature); } - void JustDied(Unit* Killer) + void JustDied(Unit* pKiller) { DoScriptText(SAY_RIVE_DEATH, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_FOUR_HORSEMEN, SPECIAL); + } + + void JustReachedHome() + { + if (m_pInstance) + m_pInstance->SetData(TYPE_FOUR_HORSEMEN, FAIL); + } + + void MovementInform(uint32 uiMotionType, uint32 uiPointId) + { + if (uiMotionType != POINT_MOTION_TYPE || !uiPointId) + return; + + // Start moving when it reaches the corner + SetCombatMovement(true); + m_bIsCornerMovement = false; + m_creature->GetMotionMaster()->Clear(); + if (m_creature->getVictim()) + m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); } void UpdateAI(const uint32 uiDiff) @@ -211,6 +297,26 @@ struct MANGOS_DLL_DECL boss_rivendare_naxxAI : public ScriptedAI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; + // Don't attack while moving + if (m_bIsCornerMovement) + return; + + if (m_uiMarkTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_MARK_OF_RIVENDARE) == CAST_OK) + m_uiMarkTimer = 12000; + } + else + m_uiMarkTimer -= uiDiff; + + if (m_uiUnholyShadowTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), m_bIsRegularMode ? SPELL_UNHOLY_SHADOW : SPELL_UNHOLY_SHADOW_H) == CAST_OK) + m_uiUnholyShadowTimer = 15000; + } + else + m_uiUnholyShadowTimer -= uiDiff; + DoMeleeAttackIfReady(); } }; @@ -222,34 +328,69 @@ CreatureAI* GetAI_boss_rivendare_naxx(Creature* pCreature) struct MANGOS_DLL_DECL boss_thane_korthazzAI : public ScriptedAI { - boss_thane_korthazzAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + boss_thane_korthazzAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } - uint32 Mark_Timer; - uint32 Meteor_Timer; - bool ShieldWall1; - bool ShieldWall2; + ScriptedInstance* m_pInstance; + bool m_bIsRegularMode; + + bool m_bIsCornerMovement; + uint32 m_uiMarkTimer; + uint32 m_uiMeteorTimer; void Reset() { - Mark_Timer = 20000; // First Horsemen Mark is applied at 20 sec. - Meteor_Timer = 30000; // wrong - ShieldWall1 = true; - ShieldWall2 = true; + m_uiMarkTimer = 20000; + m_uiMeteorTimer = 30000; + m_bIsCornerMovement = true; } - void Aggro(Unit *who) + void Aggro(Unit* pWho) { DoScriptText(SAY_KORT_AGGRO, m_creature); + + SetCombatMovement(false); + m_creature->SetWalk(false); + m_creature->GetMotionMaster()->MovePoint(1, aHorseMenMoveCoords[2][0], aHorseMenMoveCoords[2][1], aHorseMenMoveCoords[2][2]); + + if (m_pInstance) + m_pInstance->SetData(TYPE_FOUR_HORSEMEN, IN_PROGRESS); } - void KilledUnit(Unit* Victim) + void KilledUnit(Unit* pVictim) { DoScriptText(SAY_KORT_SLAY, m_creature); } - void JustDied(Unit* Killer) + void JustDied(Unit* pKiller) { DoScriptText(SAY_KORT_DEATH, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_FOUR_HORSEMEN, SPECIAL); + } + + void JustReachedHome() + { + if (m_pInstance) + m_pInstance->SetData(TYPE_FOUR_HORSEMEN, FAIL); + } + + void MovementInform(uint32 uiMotionType, uint32 uiPointId) + { + if (uiMotionType != POINT_MOTION_TYPE || !uiPointId) + return; + + // Start moving when it reaches the corner + SetCombatMovement(true); + m_bIsCornerMovement = false; + m_creature->GetMotionMaster()->Clear(); + if (m_creature->getVictim()) + m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); } void UpdateAI(const uint32 uiDiff) @@ -257,37 +398,25 @@ struct MANGOS_DLL_DECL boss_thane_korthazzAI : public ScriptedAI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - // Mark of Korthazz - if (Mark_Timer < uiDiff) - { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_MARK_OF_KORTHAZZ); - Mark_Timer = 12000; - }else Mark_Timer -= uiDiff; + // Don't attack while moving + if (m_bIsCornerMovement) + return; - // Shield Wall - All 4 horsemen will shield wall at 50% hp and 20% hp for 20 seconds - if (ShieldWall1 && m_creature->GetHealthPercent() < 50.0f) - { - if (ShieldWall1) - { - DoCastSpellIfCan(m_creature,SPELL_SHIELDWALL); - ShieldWall1 = false; - } - } - if (ShieldWall2 && m_creature->GetHealthPercent() < 20.0f) + if (m_uiMarkTimer < uiDiff) { - if (ShieldWall2) - { - DoCastSpellIfCan(m_creature,SPELL_SHIELDWALL); - ShieldWall2 = false; - } + if (DoCastSpellIfCan(m_creature, SPELL_MARK_OF_KORTHAZZ) == CAST_OK) + m_uiMarkTimer = 12000; } + else + m_uiMarkTimer -= uiDiff; - // Meteor - if (Meteor_Timer < uiDiff) + if (m_uiMeteorTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_METEOR); - Meteor_Timer = 20000; // wrong - }else Meteor_Timer -= uiDiff; + if (DoCastSpellIfCan(m_creature->getVictim(), m_bIsRegularMode ? SPELL_METEOR : SPELL_METEOR_H) == CAST_OK) + m_uiMeteorTimer = 20000; + } + else + m_uiMeteorTimer -= uiDiff; DoMeleeAttackIfReady(); } @@ -300,73 +429,113 @@ CreatureAI* GetAI_boss_thane_korthazz(Creature* pCreature) struct MANGOS_DLL_DECL boss_sir_zeliekAI : public ScriptedAI { - boss_sir_zeliekAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + boss_sir_zeliekAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; + bool m_bIsRegularMode; - uint32 Mark_Timer; - uint32 HolyWrath_Timer; - bool ShieldWall1; - bool ShieldWall2; + bool m_bIsCornerMovement; + uint32 m_uiMarkTimer; + uint32 m_uiHolyWrathTimer; + uint32 m_uiHolyBoltTimer; void Reset() { - Mark_Timer = 20000; // First Horsemen Mark is applied at 20 sec. - HolyWrath_Timer = 12000; // right - ShieldWall1 = true; - ShieldWall2 = true; + m_uiMarkTimer = 20000; + m_uiHolyWrathTimer = 12000; + m_uiHolyBoltTimer = 10000; + m_bIsCornerMovement = true; } - void Aggro(Unit *who) + void Aggro(Unit* pWho) { DoScriptText(SAY_ZELI_AGGRO, m_creature); + + SetCombatMovement(false); + m_creature->SetWalk(false); + m_creature->GetMotionMaster()->MovePoint(1, aHorseMenMoveCoords[3][0], aHorseMenMoveCoords[3][1], aHorseMenMoveCoords[3][2]); + + if (m_pInstance) + m_pInstance->SetData(TYPE_FOUR_HORSEMEN, IN_PROGRESS); } - void KilledUnit(Unit* Victim) + void KilledUnit(Unit* pVictim) { DoScriptText(SAY_ZELI_SLAY, m_creature); } - void JustDied(Unit* Killer) + void JustDied(Unit* pKiller) { DoScriptText(SAY_ZELI_DEATH, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_FOUR_HORSEMEN, SPECIAL); + } + + void JustReachedHome() + { + if (m_pInstance) + m_pInstance->SetData(TYPE_FOUR_HORSEMEN, FAIL); + } + + void MovementInform(uint32 uiMotionType, uint32 uiPointId) + { + if (uiMotionType != POINT_MOTION_TYPE || !uiPointId) + return; + + // Stop moving when it reaches the corner + m_bIsCornerMovement = false; + m_creature->GetMotionMaster()->Clear(); + m_creature->GetMotionMaster()->MoveIdle(); } void UpdateAI(const uint32 uiDiff) { - //Return since we have no target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - // Mark of Zeliek - if (Mark_Timer < uiDiff) + // Don't attack while moving + if (m_bIsCornerMovement) + return; + + if (m_uiMarkTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_MARK_OF_ZELIEK); - Mark_Timer = 12000; - }else Mark_Timer -= uiDiff; + if (DoCastSpellIfCan(m_creature, SPELL_MARK_OF_ZELIEK) == CAST_OK) + m_uiMarkTimer = 12000; + } + else + m_uiMarkTimer -= uiDiff; - // Shield Wall - All 4 horsemen will shield wall at 50% hp and 20% hp for 20 seconds - if (ShieldWall1 && m_creature->GetHealthPercent() < 50.0f) + if (m_uiHolyWrathTimer < uiDiff) { - if (ShieldWall1) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) { - DoCastSpellIfCan(m_creature,SPELL_SHIELDWALL); - ShieldWall1 = false; + if (DoCastSpellIfCan(pTarget, SPELL_HOLY_WRATH) == CAST_OK) + m_uiHolyWrathTimer = 15000; } } - if (ShieldWall2 && m_creature->GetHealthPercent() < 20.0f) + else + m_uiHolyWrathTimer -= uiDiff; + + if (m_uiHolyBoltTimer < uiDiff) { - if (ShieldWall2) + // If we can find a target in range of 45.0f, then cast Holy Bolt + if (m_creature->IsWithinDist(m_creature->getVictim(), 45.0f)) + DoCastSpellIfCan(m_creature->getVictim(), m_bIsRegularMode ? SPELL_HOLY_BOLT : SPELL_HOLY_BOLT_H); + else { - DoCastSpellIfCan(m_creature,SPELL_SHIELDWALL); - ShieldWall2 = false; + DoCastSpellIfCan(m_creature, SPELL_CONDEMNATION); + DoScriptText(EMOTE_CONDEMATION, m_creature); } + m_uiHolyBoltTimer = urand(2000, 3000); } - - // Holy Wrath - if (HolyWrath_Timer < uiDiff) - { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_HOLY_WRATH); - HolyWrath_Timer = 12000; - }else HolyWrath_Timer -= uiDiff; + else + m_uiHolyBoltTimer -= uiDiff; DoMeleeAttackIfReady(); } diff --git a/scripts/northrend/naxxramas/instance_naxxramas.cpp b/scripts/northrend/naxxramas/instance_naxxramas.cpp index 784a53a32..0cf560545 100644 --- a/scripts/northrend/naxxramas/instance_naxxramas.cpp +++ b/scripts/northrend/naxxramas/instance_naxxramas.cpp @@ -26,16 +26,27 @@ EndScriptData */ static const DialogueEntry aNaxxDialogue[] = { - {SAY_SAPP_DIALOG1, NPC_KELTHUZAD, 6000}, - {SAY_SAPP_DIALOG2_LICH, NPC_THE_LICHKING, 6000}, + {NPC_KELTHUZAD, 0, 10000}, + {SAY_SAPP_DIALOG1, NPC_KELTHUZAD, 8000}, + {SAY_SAPP_DIALOG2_LICH, NPC_THE_LICHKING, 14000}, {SAY_SAPP_DIALOG3, NPC_KELTHUZAD, 10000}, {SAY_SAPP_DIALOG4_LICH, NPC_THE_LICHKING, 12000}, {SAY_SAPP_DIALOG5, NPC_KELTHUZAD, 0}, + {NPC_THANE, 0, 10000}, + {SAY_KORT_TAUNT1, NPC_THANE, 5000}, + {SAY_ZELI_TAUNT1, NPC_ZELIEK, 6000}, + {SAY_BLAU_TAUNT1, NPC_BLAUMEUX, 6000}, + {SAY_RIVE_TAUNT1, NPC_RIVENDARE, 6000}, + {SAY_BLAU_TAUNT2, NPC_BLAUMEUX, 6000}, + {SAY_ZELI_TAUNT2, NPC_ZELIEK, 5000}, + {SAY_KORT_TAUNT2, NPC_THANE, 7000}, + {SAY_RIVE_TAUNT2, NPC_RIVENDARE, 0}, {0,0,0} }; instance_naxxramas::instance_naxxramas(Map* pMap) : ScriptedInstance(pMap), m_uiTauntTimer(0), + m_uiHorseMenKilled(0), m_dialogueHelper(aNaxxDialogue), m_fChamberCenterX(0.0f), m_fChamberCenterY(0.0f), @@ -169,27 +180,42 @@ void instance_naxxramas::OnObjectCreate(GameObject* pGo) // Eyes case GO_ARAC_EYE_RAMP: + case GO_ARAC_EYE_BOSS: if (m_auiEncounter[TYPE_MAEXXNA] == DONE) pGo->SetGoState(GO_STATE_ACTIVE); break; case GO_PLAG_EYE_RAMP: + case GO_PLAG_EYE_BOSS: if (m_auiEncounter[TYPE_LOATHEB] == DONE) pGo->SetGoState(GO_STATE_ACTIVE); break; case GO_MILI_EYE_RAMP: + case GO_MILI_EYE_BOSS: if (m_auiEncounter[TYPE_FOUR_HORSEMEN] == DONE) pGo->SetGoState(GO_STATE_ACTIVE); break; case GO_CONS_EYE_RAMP: + case GO_CONS_EYE_BOSS: if (m_auiEncounter[TYPE_THADDIUS] == DONE) pGo->SetGoState(GO_STATE_ACTIVE); break; // Portals case GO_ARAC_PORTAL: + if (m_auiEncounter[TYPE_MAEXXNA] == DONE) + pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NO_INTERACT); + break; case GO_PLAG_PORTAL: + if (m_auiEncounter[TYPE_LOATHEB] == DONE) + pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NO_INTERACT); + break; case GO_MILI_PORTAL: + if (m_auiEncounter[TYPE_FOUR_HORSEMEN] == DONE) + pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NO_INTERACT); + break; case GO_CONS_PORTAL: + if (m_auiEncounter[TYPE_THADDIUS] == DONE) + pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NO_INTERACT); break; default: @@ -273,7 +299,9 @@ void instance_naxxramas::SetData(uint32 uiType, uint32 uiData) if (uiData == DONE) { DoUseDoorOrButton(GO_ARAC_EYE_RAMP); + DoUseDoorOrButton(GO_ARAC_EYE_BOSS); DoRespawnGameObject(GO_ARAC_PORTAL, 30*MINUTE); + DoToggleGameObjectFlags(GO_ARAC_PORTAL, GO_FLAG_NO_INTERACT, false); m_uiTauntTimer = 5000; } break; @@ -302,7 +330,9 @@ void instance_naxxramas::SetData(uint32 uiType, uint32 uiData) if (uiData == DONE) { DoUseDoorOrButton(GO_PLAG_EYE_RAMP); + DoUseDoorOrButton(GO_PLAG_EYE_BOSS); DoRespawnGameObject(GO_PLAG_PORTAL, 30*MINUTE); + DoToggleGameObjectFlags(GO_PLAG_PORTAL, GO_FLAG_NO_INTERACT, false); m_uiTauntTimer = 5000; } break; @@ -329,17 +359,36 @@ void instance_naxxramas::SetData(uint32 uiType, uint32 uiData) DoUseDoorOrButton(GO_MILI_GOTH_ENTRY_GATE); DoUseDoorOrButton(GO_MILI_GOTH_EXIT_GATE); DoUseDoorOrButton(GO_MILI_HORSEMEN_DOOR); + + m_dialogueHelper.StartNextDialogueText(NPC_THANE); break; } m_auiEncounter[uiType] = uiData; break; case TYPE_FOUR_HORSEMEN: + // Skip if already set + if (m_auiEncounter[uiType] == uiData) + return; + if (uiData == SPECIAL) + { + ++m_uiHorseMenKilled; + + if (m_uiHorseMenKilled == 4) + SetData(TYPE_FOUR_HORSEMEN, DONE); + + // Don't store special data + break; + } + if (uiData == FAIL) + m_uiHorseMenKilled = 0; m_auiEncounter[uiType] = uiData; DoUseDoorOrButton(GO_MILI_HORSEMEN_DOOR); if (uiData == DONE) { DoUseDoorOrButton(GO_MILI_EYE_RAMP); + DoUseDoorOrButton(GO_MILI_EYE_BOSS); DoRespawnGameObject(GO_MILI_PORTAL, 30*MINUTE); + DoToggleGameObjectFlags(GO_MILI_PORTAL, GO_FLAG_NO_INTERACT, false); DoRespawnGameObject(instance->IsRegularDifficulty() ? GO_CHEST_HORSEMEN_NORM : GO_CHEST_HORSEMEN_HERO, 30*MINUTE); m_uiTauntTimer = 5000; } @@ -376,7 +425,9 @@ void instance_naxxramas::SetData(uint32 uiType, uint32 uiData) if (uiData == DONE) { DoUseDoorOrButton(GO_CONS_EYE_RAMP); + DoUseDoorOrButton(GO_CONS_EYE_BOSS); DoRespawnGameObject(GO_CONS_PORTAL, 30*MINUTE); + DoToggleGameObjectFlags(GO_CONS_PORTAL, GO_FLAG_NO_INTERACT, false); m_uiTauntTimer = 5000; } break; @@ -388,7 +439,7 @@ void instance_naxxramas::SetData(uint32 uiType, uint32 uiData) if (uiData == DONE) { DoUseDoorOrButton(GO_KELTHUZAD_WATERFALL_DOOR); - m_dialogueHelper.StartNextDialogueText(SAY_SAPP_DIALOG1); + m_dialogueHelper.StartNextDialogueText(NPC_KELTHUZAD); } break; case TYPE_KELTHUZAD: diff --git a/scripts/northrend/naxxramas/naxxramas.h b/scripts/northrend/naxxramas/naxxramas.h index 6f54581b4..d036017ef 100644 --- a/scripts/northrend/naxxramas/naxxramas.h +++ b/scripts/northrend/naxxramas/naxxramas.h @@ -25,6 +25,19 @@ enum SAY_SAPP_DIALOG3 = -1533086, SAY_SAPP_DIALOG4_LICH = -1533087, SAY_SAPP_DIALOG5 = -1533088, + // Horsemen dialogue texts + SAY_BLAU_TAUNT1 = -1533045, + SAY_BLAU_TAUNT2 = -1533046, + SAY_BLAU_TAUNT3 = -1533047, // NYI - requires additiona research + SAY_RIVE_TAUNT1 = -1533071, + SAY_RIVE_TAUNT2 = -1533072, + SAY_RIVE_TAUNT3 = -1533073, // NYI - requires additiona research + SAY_KORT_TAUNT1 = -1533052, + SAY_KORT_TAUNT2 = -1533053, + SAY_KORT_TAUNT3 = -1533054, // NYI - requires additiona research + SAY_ZELI_TAUNT1 = -1533059, + SAY_ZELI_TAUNT2 = -1533060, + SAY_ZELI_TAUNT3 = -1533061, // NYI - requires additiona research TYPE_ANUB_REKHAN = 0, TYPE_FAERLINA = 1, @@ -136,6 +149,11 @@ enum GO_MILI_EYE_RAMP = 181210, GO_CONS_EYE_RAMP = 181213, + GO_ARAC_EYE_BOSS = 181233, + GO_PLAG_EYE_BOSS = 181231, + GO_MILI_EYE_BOSS = 181230, + GO_CONS_EYE_BOSS = 181232, + // Portals GO_ARAC_PORTAL = 181575, GO_PLAG_PORTAL = 181577, @@ -244,6 +262,7 @@ class MANGOS_DLL_DECL instance_naxxramas : public ScriptedInstance float m_fChamberCenterZ; uint32 m_uiTauntTimer; + uint8 m_uiHorseMenKilled; DialogueHelper m_dialogueHelper; }; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 60b33d180..39fc135ce 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2589" + #define SD2_REVISION_NR "2590" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index a4bd44085..55f1b223d 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -1571,25 +1571,25 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1533043,'I have waited long enough! Now, you face the harvester of souls!',8808,1,0,0,'gothik SAY_TELEPORT'), (-1533044,'Defend youself!',8892,1,0,0,'blaumeux SAY_BLAU_AGGRO'), -(-1533045,'Come, Zeliek, do not drive them out. Not before we\'ve had our fun.',8896,1,0,0,'blaumeux SAY_BLAU_TAUNT1'), -(-1533046,'I do hope they stay alive long enough for me to... introduce myself.',8897,1,0,0,'blaumeux SAY_BLAU_TAUNT2'), -(-1533047,'The first kill goes to me! Anyone care to wager?',8898,1,0,0,'blaumeux SAY_BLAU_TAUNT3'), +(-1533045,'Come, Zeliek, do not drive them out. Not before we\'ve had our fun.',8896,6,0,0,'blaumeux SAY_BLAU_TAUNT1'), +(-1533046,'I do hope they stay alive long enough for me to... introduce myself.',8897,6,0,0,'blaumeux SAY_BLAU_TAUNT2'), +(-1533047,'The first kill goes to me! Anyone care to wager?',8898,6,0,0,'blaumeux SAY_BLAU_TAUNT3'), (-1533048,'Your life is mine!',8895,1,0,0,'blaumeux SAY_BLAU_SPECIAL'), (-1533049,'Who\'s next?',8894,1,0,0,'blaumeux SAY_BLAU_SLAY'), (-1533050,'Tou... che!',8893,1,0,0,'blaumeux SAY_BLAU_DEATH'), (-1533051,'Come out and fight, ye wee ninny!',8899,1,0,0,'korthazz SAY_KORT_AGGRO'), -(-1533052,'To arms, ye roustabouts! We\'ve got company!',8903,1,0,0,'korthazz SAY_KORT_TAUNT1'), -(-1533053,'I heard about enough of yer sniveling. Shut yer fly trap \'afore I shut it for ye!',8904,1,0,0,'korthazz SAY_KORT_TAUNT2'), -(-1533054,'I\'m gonna enjoy killin\' these slack-jawed daffodils!',8905,1,0,0,'korthazz SAY_KORT_TAUNT3'), +(-1533052,'To arms, ye roustabouts! We\'ve got company!',8903,6,0,0,'korthazz SAY_KORT_TAUNT1'), +(-1533053,'I heard about enough of yer sniveling. Shut yer fly trap \'afore I shut it for ye!',8904,6,0,0,'korthazz SAY_KORT_TAUNT2'), +(-1533054,'I\'m gonna enjoy killin\' these slack-jawed daffodils!',8905,6,0,0,'korthazz SAY_KORT_TAUNT3'), (-1533055,'I like my meat extra crispy!',8902,1,0,0,'korthazz SAY_KORT_SPECIAl'), (-1533056,'Next time, bring more friends!',8901,1,0,0,'korthazz SAY_KORT_SLAY'), (-1533057,'What a bloody waste this is!',8900,1,0,0,'korthazz SAY_KORT_DEATH'), (-1533058,'Flee, before it\'s too late!',8913,1,0,0,'zeliek SAY_ZELI_AGGRO'), -(-1533059,'Invaders, cease this foolish venture at once! Turn away while you still can!',8917,1,0,0,'zeliek SAY_ZELI_TAUNT1'), -(-1533060,'Perhaps they will come to their senses, and run away as fast as they can!',8918,1,0,0,'zeliek SAY_ZELI_TAUNT2'), -(-1533061,'Do not continue! Turn back while there\'s still time!',8919,1,0,0,'zeliek SAY_ZELI_TAUNT3'), +(-1533059,'Invaders, cease this foolish venture at once! Turn away while you still can!',8917,6,0,0,'zeliek SAY_ZELI_TAUNT1'), +(-1533060,'Perhaps they will come to their senses, and run away as fast as they can!',8918,6,0,0,'zeliek SAY_ZELI_TAUNT2'), +(-1533061,'Do not continue! Turn back while there\'s still time!',8919,6,0,0,'zeliek SAY_ZELI_TAUNT3'), (-1533062,'I- I have no choice but to obey!',8916,1,0,0,'zeliek SAY_ZELI_SPECIAL'), (-1533063,'Forgive me!',8915,1,0,0,'zeliek SAY_ZELI_SLAY'), (-1533064,'It is... as it should be.',8914,1,0,0,'zeliek SAY_ZELI_DEATH'), @@ -1600,9 +1600,9 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1533068,'You will find no peace in death.',14574,1,0,0,'rivendare_naxx SAY_RIVE_SLAY1'), (-1533069,'The master\'s will is done.',14575,1,0,0,'rivendare_naxx SAY_RIVE_SLAY2'), (-1533070,'Bow to the might of the scourge!',14576,1,0,0,'rivendare_naxx SAY_RIVE_SPECIAL'), -(-1533071,'Enough prattling. Let them come! We shall grind their bones to dust.',14577,1,0,0,'rivendare_naxx SAY_RIVE_TAUNT1'), -(-1533072,'Conserve your anger! Harness your rage! You will all have outlets for your frustration soon enough.',14578,1,0,0,'rivendare_naxx SAY_RIVE_TAUNT2'), -(-1533073,'Life is meaningless. It is in death that we are truly tested.',14579,1,0,0,'rivendare_naxx SAY_RIVE_TAUNT3'), +(-1533071,'Enough prattling. Let them come! We shall grind their bones to dust.',14577,6,0,0,'rivendare_naxx SAY_RIVE_TAUNT1'), +(-1533072,'Conserve your anger! Harness your rage! You will all have outlets for your frustration soon enough.',14578,6,0,0,'rivendare_naxx SAY_RIVE_TAUNT2'), +(-1533073,'Life is meaningless. It is in death that we are truly tested.',14579,6,0,0,'rivendare_naxx SAY_RIVE_TAUNT3'), (-1533074,'Death... will not stop me...',14580,1,0,0,'rivendare_naxx SAY_RIVE_DEATH'), (-1533075,'Glory to the master!',8845,1,0,0,'noth SAY_AGGRO1'), diff --git a/sql/updates/r2590_scriptdev2.sql b/sql/updates/r2590_scriptdev2.sql new file mode 100644 index 000000000..f4592d2d7 --- /dev/null +++ b/sql/updates/r2590_scriptdev2.sql @@ -0,0 +1 @@ +UPDATE script_texts SET type=6 WHERE entry IN (-1533045,-1533046,-1533047,-1533052,-1533053,-1533054,-1533059,-1533060,-1533061,-1533071,-1533072,-1533073); From 5d791e628f9c01140e36c9c431764899b236b101 Mon Sep 17 00:00:00 2001 From: NeatElves Date: Sat, 16 Jun 2012 13:37:29 +0300 Subject: [PATCH 0579/1172] [2591] Handle more gossip scripts in the database Signed-off-by: Xfurry --- scripts/kalimdor/feralas.cpp | 54 +----------------------- scripts/kalimdor/mulgore.cpp | 34 +-------------- scripts/kalimdor/thunder_bluff.cpp | 27 +----------- scripts/kalimdor/winterspring.cpp | 58 +------------------------- scripts/outland/hellfire_peninsula.cpp | 55 ------------------------ scripts/outland/terokkar_forest.cpp | 37 ---------------- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 6 --- sql/updates/r2591_mangos.sql | 6 +++ 9 files changed, 11 insertions(+), 268 deletions(-) create mode 100644 sql/updates/r2591_mangos.sql diff --git a/scripts/kalimdor/feralas.cpp b/scripts/kalimdor/feralas.cpp index cf95c078c..04960e3ce 100644 --- a/scripts/kalimdor/feralas.cpp +++ b/scripts/kalimdor/feralas.cpp @@ -17,41 +17,13 @@ /* ScriptData SDName: Feralas SD%Complete: 100 -SDComment: Quest support: 3520, 2767. Special vendor Gregan Brewspewer +SDComment: Quest support: 2767. SDCategory: Feralas EndScriptData */ #include "precompiled.h" #include "escort_ai.h" -/*###### -## npc_gregan_brewspewer -######*/ - -bool GossipHello_npc_gregan_brewspewer(Player* pPlayer, Creature* pCreature) -{ - if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); - - if (pCreature->isVendor() && pPlayer->GetQuestStatus(3909) == QUEST_STATUS_INCOMPLETE) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Buy somethin', will ya?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - - pPlayer->SEND_GOSSIP_MENU(2433, pCreature->GetObjectGuid()); - return true; -} - -bool GossipSelect_npc_gregan_brewspewer(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) -{ - if (uiAction == GOSSIP_ACTION_INFO_DEF+1) - { - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_VENDOR, GOSSIP_TEXT_BROWSE_GOODS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE); - pPlayer->SEND_GOSSIP_MENU(2434, pCreature->GetObjectGuid()); - } - if (uiAction == GOSSIP_ACTION_TRADE) - pPlayer->SEND_VENDORLIST(pCreature->GetObjectGuid()); - return true; -} - /*###### ## npc_oox22fe ######*/ @@ -160,19 +132,6 @@ bool QuestAccept_npc_oox22fe(Player* pPlayer, Creature* pCreature, const Quest* return true; } -/*###### -## npc_screecher_spirit -######*/ - -bool GossipHello_npc_screecher_spirit(Player* pPlayer, Creature* pCreature) -{ - pPlayer->SEND_GOSSIP_MENU(2039, pCreature->GetObjectGuid()); - pPlayer->TalkedToCreature(pCreature->GetEntry(), pCreature->GetObjectGuid()); - pCreature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - - return true; -} - /*###### ## AddSC ######*/ @@ -181,20 +140,9 @@ void AddSC_feralas() { Script* pNewScript; - pNewScript = new Script; - pNewScript->Name = "npc_gregan_brewspewer"; - pNewScript->pGossipHello = &GossipHello_npc_gregan_brewspewer; - pNewScript->pGossipSelect = &GossipSelect_npc_gregan_brewspewer; - pNewScript->RegisterSelf(); - pNewScript = new Script; pNewScript->Name = "npc_oox22fe"; pNewScript->GetAI = &GetAI_npc_oox22fe; pNewScript->pQuestAcceptNPC = &QuestAccept_npc_oox22fe; pNewScript->RegisterSelf(); - - pNewScript = new Script; - pNewScript->Name = "npc_screecher_spirit"; - pNewScript->pGossipHello = &GossipHello_npc_screecher_spirit; - pNewScript->RegisterSelf(); } diff --git a/scripts/kalimdor/mulgore.cpp b/scripts/kalimdor/mulgore.cpp index 5de540d54..b9901ca69 100644 --- a/scripts/kalimdor/mulgore.cpp +++ b/scripts/kalimdor/mulgore.cpp @@ -17,13 +17,12 @@ /* ScriptData SDName: Mulgore SD%Complete: 100 -SDComment: Quest support: 11129. Skorn Whitecloud: Just a story if not rewarded for quest +SDComment: Quest support: 11129. SDCategory: Mulgore EndScriptData */ /* ContentData npc_kyle_the_frenzied -npc_skorn_whitecloud EndContentData */ #include "precompiled.h" @@ -168,31 +167,6 @@ CreatureAI* GetAI_npc_kyle_the_frenzied(Creature* pCreature) return new npc_kyle_the_frenziedAI(pCreature); } -/*###### -# npc_skorn_whitecloud -######*/ - -bool GossipHello_npc_skorn_whitecloud(Player* pPlayer, Creature* pCreature) -{ - if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); - - if (!pPlayer->GetQuestRewardStatus(770)) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Tell me a story, Skorn.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF); - - pPlayer->SEND_GOSSIP_MENU(522, pCreature->GetObjectGuid()); - - return true; -} - -bool GossipSelect_npc_skorn_whitecloud(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) -{ - if (uiAction == GOSSIP_ACTION_INFO_DEF) - pPlayer->SEND_GOSSIP_MENU(523, pCreature->GetObjectGuid()); - - return true; -} - void AddSC_mulgore() { Script* pNewScript; @@ -201,10 +175,4 @@ void AddSC_mulgore() pNewScript->Name = "npc_kyle_the_frenzied"; pNewScript->GetAI = &GetAI_npc_kyle_the_frenzied; pNewScript->RegisterSelf(); - - pNewScript = new Script; - pNewScript->Name = "npc_skorn_whitecloud"; - pNewScript->pGossipHello = &GossipHello_npc_skorn_whitecloud; - pNewScript->pGossipSelect = &GossipSelect_npc_skorn_whitecloud; - pNewScript->RegisterSelf(); } diff --git a/scripts/kalimdor/thunder_bluff.cpp b/scripts/kalimdor/thunder_bluff.cpp index d23346963..6eb49b24b 100644 --- a/scripts/kalimdor/thunder_bluff.cpp +++ b/scripts/kalimdor/thunder_bluff.cpp @@ -17,7 +17,7 @@ /* ScriptData SDName: Thunder_Bluff SD%Complete: 100 -SDComment: Quest support: 925 +SDComment: ToDo: Cairne BloodHoof can be moved to eventAI SDCategory: Thunder Bluff EndScriptData */ @@ -98,29 +98,6 @@ CreatureAI* GetAI_npc_cairne_bloodhoof(Creature* pCreature) return new npc_cairne_bloodhoofAI(pCreature); } -bool GossipHello_npc_cairne_bloodhoof(Player* pPlayer, Creature* pCreature) -{ - if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); - - if (pPlayer->GetQuestStatus(925) == QUEST_STATUS_INCOMPLETE) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "I know this is rather silly but a young ward who is a bit shy would like your hoofprint.", GOSSIP_SENDER_MAIN, GOSSIP_SENDER_INFO); - - pPlayer->SEND_GOSSIP_MENU(7013, pCreature->GetObjectGuid()); - - return true; -} - -bool GossipSelect_npc_cairne_bloodhoof(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) -{ - if (uiAction == GOSSIP_SENDER_INFO) - { - pPlayer->CastSpell(pPlayer, 23123, false); - pPlayer->SEND_GOSSIP_MENU(7014, pCreature->GetObjectGuid()); - } - return true; -} - void AddSC_thunder_bluff() { Script* pNewScript; @@ -128,7 +105,5 @@ void AddSC_thunder_bluff() pNewScript = new Script; pNewScript->Name = "npc_cairne_bloodhoof"; pNewScript->GetAI = &GetAI_npc_cairne_bloodhoof; - pNewScript->pGossipHello = &GossipHello_npc_cairne_bloodhoof; - pNewScript->pGossipSelect = &GossipSelect_npc_cairne_bloodhoof; pNewScript->RegisterSelf(); } diff --git a/scripts/kalimdor/winterspring.cpp b/scripts/kalimdor/winterspring.cpp index 37c18b0f2..3662095d0 100644 --- a/scripts/kalimdor/winterspring.cpp +++ b/scripts/kalimdor/winterspring.cpp @@ -17,12 +17,11 @@ /* ScriptData SDName: Winterspring SD%Complete: 90 -SDComment: Quest support: 4901, 5126 (Loraxs' tale missing proper gossip items text). +SDComment: Quest support: 4901. SDCategory: Winterspring EndScriptData */ /* ContentData -npc_lorax npc_ranshalla EndContentData */ @@ -30,55 +29,6 @@ EndContentData */ #include "escort_ai.h" /*###### -## npc_lorax -######*/ - -bool GossipHello_npc_lorax(Player* pPlayer, Creature* pCreature) -{ - if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); - - if (pPlayer->GetQuestStatus(5126) == QUEST_STATUS_INCOMPLETE) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Talk to me", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF); - - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); - - return true; -} - -bool GossipSelect_npc_lorax(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) -{ - switch(uiAction) - { - case GOSSIP_ACTION_INFO_DEF: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "What do you do here?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); - pPlayer->SEND_GOSSIP_MENU(3759, pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF+1: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "I can help you", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); - pPlayer->SEND_GOSSIP_MENU(3760, pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF+2: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "What deal?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); - pPlayer->SEND_GOSSIP_MENU(3761, pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF+3: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Then what happened?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4); - pPlayer->SEND_GOSSIP_MENU(3762, pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF+4: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "He is not safe, i'll make sure of that.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 5); - pPlayer->SEND_GOSSIP_MENU(3763, pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF+5: - pPlayer->CLOSE_GOSSIP_MENU(); - pPlayer->AreaExploredOrEventHappens(5126); - break; - } - return true; -} - -/*#### # npc_ranshalla ####*/ @@ -511,12 +461,6 @@ void AddSC_winterspring() { Script* pNewScript; - pNewScript = new Script; - pNewScript->Name = "npc_lorax"; - pNewScript->pGossipHello = &GossipHello_npc_lorax; - pNewScript->pGossipSelect = &GossipSelect_npc_lorax; - pNewScript->RegisterSelf(); - pNewScript = new Script; pNewScript->Name = "npc_ranshalla"; pNewScript->GetAI = &GetAI_npc_ranshalla; diff --git a/scripts/outland/hellfire_peninsula.cpp b/scripts/outland/hellfire_peninsula.cpp index 3bef663fd..4221c6d85 100644 --- a/scripts/outland/hellfire_peninsula.cpp +++ b/scripts/outland/hellfire_peninsula.cpp @@ -25,7 +25,6 @@ EndScriptData */ npc_aeranas npc_ancestral_wolf npc_demoniac_scryer -npc_tracy_proudwell npc_wounded_blood_elf EndContentData */ @@ -341,54 +340,6 @@ bool GossipSelect_npc_demoniac_scryer(Player* pPlayer, Creature* pCreature, uint return true; } -/*###### -## npc_tracy_proudwell -######*/ - -#define GOSSIP_TEXT_REDEEM_MARKS "I have marks to redeem!" -#define GOSSIP_TRACY_PROUDWELL_ITEM1 "I heard that your dog Fei Fei took Klatu's prayer beads..." -#define GOSSIP_TRACY_PROUDWELL_ITEM2 "" - -enum -{ - GOSSIP_TEXTID_TRACY_PROUDWELL1 = 10689, - QUEST_DIGGING_FOR_PRAYER_BEADS = 10916 -}; - -bool GossipHello_npc_tracy_proudwell(Player* pPlayer, Creature* pCreature) -{ - if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); - - if (pCreature->isVendor()) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_VENDOR, GOSSIP_TEXT_REDEEM_MARKS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE); - - if (pPlayer->GetQuestStatus(QUEST_DIGGING_FOR_PRAYER_BEADS) == QUEST_STATUS_INCOMPLETE) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TRACY_PROUDWELL_ITEM1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); - - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); - return true; -} - -bool GossipSelect_npc_tracy_proudwell(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) -{ - switch(uiAction) - { - case GOSSIP_ACTION_INFO_DEF+1: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TRACY_PROUDWELL_ITEM2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); - pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_TRACY_PROUDWELL1, pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF+2: - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_TRADE: - pPlayer->SEND_VENDORLIST(pCreature->GetObjectGuid()); - break; - } - - return true; -} - /*###### ## npc_wounded_blood_elf ######*/ @@ -495,12 +446,6 @@ void AddSC_hellfire_peninsula() pNewScript->pGossipSelect = &GossipSelect_npc_demoniac_scryer; pNewScript->RegisterSelf(); - pNewScript = new Script; - pNewScript->Name = "npc_tracy_proudwell"; - pNewScript->pGossipHello = &GossipHello_npc_tracy_proudwell; - pNewScript->pGossipSelect = &GossipSelect_npc_tracy_proudwell; - pNewScript->RegisterSelf(); - pNewScript = new Script; pNewScript->Name = "npc_wounded_blood_elf"; pNewScript->GetAI = &GetAI_npc_wounded_blood_elf; diff --git a/scripts/outland/terokkar_forest.cpp b/scripts/outland/terokkar_forest.cpp index e15a1a3b5..e8938441d 100644 --- a/scripts/outland/terokkar_forest.cpp +++ b/scripts/outland/terokkar_forest.cpp @@ -32,7 +32,6 @@ npc_hungry_nether_ray npc_letoll npc_mana_bomb_exp_trigger go_mana_bomb -npc_slim go_veil_skith_cage npc_captive_child npc_isla_starmane @@ -840,36 +839,6 @@ bool GOUse_go_mana_bomb(Player* pPlayer, GameObject* pGo) } /*###### -## npc_slim -######*/ - -enum -{ - FACTION_CONSORTIUM = 933 -}; - -bool GossipHello_npc_slim(Player* pPlayer, Creature* pCreature) -{ - if (pCreature->isVendor() && pPlayer->GetReputationRank(FACTION_CONSORTIUM) >= REP_FRIENDLY) - { - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_VENDOR, GOSSIP_TEXT_BROWSE_GOODS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE); - pPlayer->SEND_GOSSIP_MENU(9896, pCreature->GetObjectGuid()); - } - else - pPlayer->SEND_GOSSIP_MENU(9895, pCreature->GetObjectGuid()); - - return true; -} - -bool GossipSelect_npc_slim(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) -{ - if (uiAction == GOSSIP_ACTION_TRADE) - pPlayer->SEND_VENDORLIST(pCreature->GetObjectGuid()); - - return true; -} - -/*##### ## go_veil_skith_cage & npc_captive_child #####*/ @@ -1219,12 +1188,6 @@ void AddSC_terokkar_forest() pNewScript->pGOUse = &GOUse_go_mana_bomb; pNewScript->RegisterSelf(); - pNewScript = new Script; - pNewScript->Name = "npc_slim"; - pNewScript->pGossipHello = &GossipHello_npc_slim; - pNewScript->pGossipSelect = &GossipSelect_npc_slim; - pNewScript->RegisterSelf(); - pNewScript = new Script; pNewScript->Name = "go_veil_skith_cage"; pNewScript->pGOUse = &GOUse_go_veil_skith_cage; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 39fc135ce..6edb7670e 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2590" + #define SD2_REVISION_NR "2591" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 45c0a0c24..4c4c2318b 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -599,9 +599,7 @@ UPDATE creature_template SET ScriptName='npc_niby_the_almighty' WHERE entry=1446 UPDATE creature_template SET ScriptName='npc_kroshius' WHERE entry=14467; /* FERALAS */ -UPDATE creature_template SET ScriptName='npc_gregan_brewspewer' WHERE entry=7775; UPDATE creature_template SET ScriptName='npc_oox22fe' WHERE entry=7807; -UPDATE creature_template SET ScriptName='npc_screecher_spirit' WHERE entry=8612; /* GHOSTLANDS */ UPDATE creature_template SET ScriptName='npc_ranger_lilatha' WHERE entry=16295; @@ -681,7 +679,6 @@ UPDATE creature_template SET ScriptName='boss_doomlord_kazzak' WHERE entry=18728 UPDATE creature_template SET ScriptName='npc_aeranas' WHERE entry=17085; UPDATE creature_template SET ScriptName='npc_ancestral_wolf' WHERE entry=17077; UPDATE creature_template SET ScriptName='npc_demoniac_scryer' WHERE entry=22258; -UPDATE creature_template SET ScriptName='npc_tracy_proudwell' WHERE entry=18266; UPDATE creature_template SET ScriptName='npc_wounded_blood_elf' WHERE entry=16993; /* HILLSBRAD FOOTHILLS */ @@ -828,7 +825,6 @@ UPDATE creature_template SET ScriptName='boss_eranikus' WHERE entry=15491; /* MULGORE */ UPDATE creature_template SET ScriptName='npc_kyle_the_frenzied' WHERE entry=23616; -UPDATE creature_template SET ScriptName='npc_skorn_whitecloud' WHERE entry=3052; /* NAGRAND */ UPDATE creature_template SET ScriptName='mob_lump' WHERE entry=18351; @@ -1197,7 +1193,6 @@ UPDATE creature_template SET ScriptName='npc_hungry_nether_ray' WHERE entry=2343 UPDATE creature_template SET ScriptName='npc_letoll' WHERE entry=22458; UPDATE creature_template SET ScriptName='npc_mana_bomb_exp_trigger' WHERE entry=20767; UPDATE gameobject_template SET ScriptName='go_mana_bomb' WHERE entry=184725; -UPDATE creature_template SET ScriptName='npc_slim' WHERE entry=19679; UPDATE creature_template SET ScriptName='npc_captive_child' WHERE entry=22314; UPDATE creature_template SET ScriptName='npc_isla_starmane' WHERE entry=18760; UPDATE creature_template SET ScriptName="npc_skywing" WHERE entry=22424; @@ -1327,7 +1322,6 @@ UPDATE creature_template SET ScriptName='npc_tapoke_slim_jahn' WHERE entry=4962; UPDATE creature_template SET ScriptName='npc_mikhail' WHERE entry=4963; /* WINTERSPRING */ -UPDATE creature_template SET ScriptName='npc_lorax' WHERE entry=10918; UPDATE creature_template SET ScriptName='npc_ranshalla' WHERE entry=10300; UPDATE gameobject_template SET ScriptName='go_elune_fire' WHERE entry IN (177417, 177404); diff --git a/sql/updates/r2591_mangos.sql b/sql/updates/r2591_mangos.sql new file mode 100644 index 000000000..f6c9e9fa1 --- /dev/null +++ b/sql/updates/r2591_mangos.sql @@ -0,0 +1,6 @@ +UPDATE creature_template SET ScriptName='' WHERE entry=10918; +UPDATE creature_template SET ScriptName='' WHERE entry=7775; +UPDATE creature_template SET ScriptName='' WHERE entry=8612; +UPDATE creature_template SET ScriptName='' WHERE entry=3052; +UPDATE creature_template SET ScriptName='' WHERE entry=19679; +UPDATE creature_template SET ScriptName='' WHERE entry=18266; From 0d63583369316da59b510ffba8776b91f3644607 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sat, 16 Jun 2012 15:40:38 +0300 Subject: [PATCH 0580/1172] [2592] Improve script for Gluth - Naxxramas --- scripts/northrend/naxxramas/boss_gluth.cpp | 167 +++++++++++++-------- sd2_revision_nr.h | 2 +- 2 files changed, 104 insertions(+), 65 deletions(-) diff --git a/scripts/northrend/naxxramas/boss_gluth.cpp b/scripts/northrend/naxxramas/boss_gluth.cpp index 996867f71..a5e809bfd 100644 --- a/scripts/northrend/naxxramas/boss_gluth.cpp +++ b/scripts/northrend/naxxramas/boss_gluth.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: Boss_Gluth -SD%Complete: 70 -SDComment: +SD%Complete: 95 +SDComment: Gluth should turn around to face the victim when he devours a Zombie SDCategory: Naxxramas EndScriptData */ @@ -27,53 +27,31 @@ EndScriptData */ enum { EMOTE_ZOMBIE = -1533119, - EMOTE_BOSS_GENERIC_ENRAGED = -1000006, // NYI - EMOTE_DECIMATE = -1533152, // NYI + EMOTE_BOSS_GENERIC_ENRAGED = -1000006, + EMOTE_DECIMATE = -1533152, - SPELL_MORTALWOUND = 25646, + SPELL_MORTALWOUND = 54378, // old vanilla spell was 25646, SPELL_DECIMATE = 28374, + SPELL_DECIMATE_H = 54426, SPELL_ENRAGE = 28371, SPELL_ENRAGE_H = 54427, SPELL_BERSERK = 26662, + //SPELL_TERRIFYING_ROAR = 29685, // no longer used in 3.x.x + //SPELL_SUMMON_ZOMBIE_CHOW = 28216, // removed from dbc: triggers 28217 every 6 secs + //SPELL_CALL_ALL_ZOMBIE_CHOW = 29681, // removed from dbc: triggers 29682 + //SPELL_ZOMBIE_CHOW_SEARCH = 28235, // removed from dbc: triggers 28236 every 3 secs - NPC_ZOMBIE_CHOW = 16360 -}; - -#define ADD_1X 3269.590f -#define ADD_1Y -3161.287f -#define ADD_1Z 297.423f - -#define ADD_2X 3277.797f -#define ADD_2Y -3170.352f -#define ADD_2Z 297.423f - -#define ADD_3X 3267.049f -#define ADD_3Y -3172.820f -#define ADD_3Z 297.423f - -#define ADD_4X 3252.157f -#define ADD_4Y -3132.135f -#define ADD_4Z 297.423f - -#define ADD_5X 3259.990f -#define ADD_5Y -3126.590f -#define ADD_5Z 297.423f + NPC_ZOMBIE_CHOW = 16360, // old vanilla summoning spell 28217 -#define ADD_6X 3259.815f -#define ADD_6Y -3137.576f -#define ADD_6Z 297.423f - -#define ADD_7X 3308.030f -#define ADD_7Y -3132.135f -#define ADD_7Z 297.423f - -#define ADD_8X 3303.046f -#define ADD_8Y -3180.682f -#define ADD_8Z 297.423f + MAX_ZOMBIE_LOCATIONS = 3, +}; -#define ADD_9X 3313.283f -#define ADD_9Y -3180.766f -#define ADD_9Z 297.423f +static const float aZombieSummonLoc[MAX_ZOMBIE_LOCATIONS][3] = +{ + {3267.9f, -3172.1f, 297.42f}, + {3253.2f, -3132.3f, 297.42f}, + {3308.3f, -3185.8f, 297.42f}, +}; struct MANGOS_DLL_DECL boss_gluthAI : public ScriptedAI { @@ -91,17 +69,21 @@ struct MANGOS_DLL_DECL boss_gluthAI : public ScriptedAI uint32 m_uiDecimateTimer; uint32 m_uiEnrageTimer; uint32 m_uiSummonTimer; + uint32 m_uiZombieSearchTimer; uint32 m_uiBerserkTimer; + GUIDList m_lZombieChowGuidList; + void Reset() { - m_uiMortalWoundTimer = 8000; - m_uiDecimateTimer = 100000; - m_uiEnrageTimer = 60000; - m_uiSummonTimer = 10000; + m_uiMortalWoundTimer = 10000; + m_uiDecimateTimer = 110000; + m_uiEnrageTimer = 25000; + m_uiSummonTimer = 15000; + m_uiZombieSearchTimer = 3000; - m_uiBerserkTimer = MINUTE*8*IN_MILLISECONDS; + m_uiBerserkTimer = MINUTE*8*IN_MILLISECONDS; } void JustDied(Unit* pKiller) @@ -116,22 +98,78 @@ struct MANGOS_DLL_DECL boss_gluthAI : public ScriptedAI m_pInstance->SetData(TYPE_GLUTH, IN_PROGRESS); } + void KilledUnit(Unit* pVictim) + { + // Restore 5% hp when killing a zombie + if (pVictim->GetEntry() == NPC_ZOMBIE_CHOW) + { + DoScriptText(EMOTE_ZOMBIE, m_creature); + m_creature->SetHealth(m_creature->GetHealth() + m_creature->GetMaxHealth()*0.05f); + } + } + void JustReachedHome() { if (m_pInstance) m_pInstance->SetData(TYPE_GLUTH, FAIL); } + void JustSummoned(Creature* pSummoned) + { + pSummoned->GetMotionMaster()->MoveFollow(m_creature, ATTACK_DISTANCE, 0); + m_lZombieChowGuidList.push_back(pSummoned->GetObjectGuid()); + } + + void SummonedCreatureDespawn(Creature* pSummoned) + { + m_lZombieChowGuidList.remove(pSummoned->GetObjectGuid()); + } + + // Replaces missing spell 29682 + void DoCallAllZombieChow() + { + for (GUIDList::const_iterator itr = m_lZombieChowGuidList.begin(); itr != m_lZombieChowGuidList.end(); ++itr) + { + if (Creature* pZombie = m_creature->GetMap()->GetCreature(*itr)) + pZombie->GetMotionMaster()->MoveFollow(m_creature, ATTACK_DISTANCE, 0); + } + } + + // Replaces missing spell 28236 + void DoSearchZombieChow() + { + for (GUIDList::const_iterator itr = m_lZombieChowGuidList.begin(); itr != m_lZombieChowGuidList.end(); ++itr) + { + if (Creature* pZombie = m_creature->GetMap()->GetCreature(*itr)) + { + if (!pZombie->isAlive()) + continue; + + // Devour a Zombie + if (pZombie->IsWithinDistInMap(m_creature, 15.0f)) + m_creature->DealDamage(pZombie, pZombie->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + } + } + } + void UpdateAI(const uint32 uiDiff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; + if (m_uiZombieSearchTimer < uiDiff) + { + DoSearchZombieChow(); + m_uiZombieSearchTimer = 3000; + } + else + m_uiZombieSearchTimer -= uiDiff; + // Mortal Wound if (m_uiMortalWoundTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_MORTALWOUND); - m_uiMortalWoundTimer = 10000; + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_MORTALWOUND) == CAST_OK) + m_uiMortalWoundTimer = 10000; } else m_uiMortalWoundTimer -= uiDiff; @@ -139,8 +177,12 @@ struct MANGOS_DLL_DECL boss_gluthAI : public ScriptedAI // Decimate if (m_uiDecimateTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_DECIMATE); - m_uiDecimateTimer = 100000; + if (DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_DECIMATE : SPELL_DECIMATE_H) == CAST_OK) + { + DoScriptText(EMOTE_DECIMATE, m_creature); + DoCallAllZombieChow(); + m_uiDecimateTimer = 100000; + } } else m_uiDecimateTimer -= uiDiff; @@ -148,8 +190,11 @@ struct MANGOS_DLL_DECL boss_gluthAI : public ScriptedAI // Enrage if (m_uiEnrageTimer < uiDiff) { - DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_ENRAGE : SPELL_ENRAGE_H); - m_uiEnrageTimer = 60000; + if (DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_ENRAGE : SPELL_ENRAGE_H) == CAST_OK) + { + DoScriptText(EMOTE_BOSS_GENERIC_ENRAGED, m_creature); + m_uiEnrageTimer = urand(20000, 30000); + } } else m_uiEnrageTimer -= uiDiff; @@ -157,19 +202,13 @@ struct MANGOS_DLL_DECL boss_gluthAI : public ScriptedAI // Summon if (m_uiSummonTimer < uiDiff) { - if (Creature* pZombie = m_creature->SummonCreature(NPC_ZOMBIE_CHOW, ADD_1X, ADD_1Y, ADD_1Z, 0.0f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 80000)) - { - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) - pZombie->AddThreat(pTarget); - } + uint8 uiPos1 = urand(0, MAX_ZOMBIE_LOCATIONS - 1); + m_creature->SummonCreature(NPC_ZOMBIE_CHOW, aZombieSummonLoc[uiPos1][0], aZombieSummonLoc[uiPos1][1], aZombieSummonLoc[uiPos1][2], 0.0f, TEMPSUMMON_DEAD_DESPAWN, 0); if (!m_bIsRegularMode) { - if (Creature* pZombie = m_creature->SummonCreature(NPC_ZOMBIE_CHOW, ADD_1X, ADD_1Y, ADD_1Z, 0.0f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 80000)) - { - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) - pZombie->AddThreat(pTarget); - } + uint8 uiPos2 = (uiPos1 + urand(1, MAX_ZOMBIE_LOCATIONS - 1)) % MAX_ZOMBIE_LOCATIONS; + m_creature->SummonCreature(NPC_ZOMBIE_CHOW, aZombieSummonLoc[uiPos2][0], aZombieSummonLoc[uiPos2][1], aZombieSummonLoc[uiPos2][2], 0.0f, TEMPSUMMON_DEAD_DESPAWN, 0); } m_uiSummonTimer = 10000; @@ -180,8 +219,8 @@ struct MANGOS_DLL_DECL boss_gluthAI : public ScriptedAI // Berserk if (m_uiBerserkTimer < uiDiff) { - DoCastSpellIfCan(m_creature, SPELL_BERSERK, CAST_TRIGGERED); - m_uiBerserkTimer = MINUTE*5*IN_MILLISECONDS; + if (DoCastSpellIfCan(m_creature, SPELL_BERSERK) == CAST_OK) + m_uiBerserkTimer = MINUTE*5*IN_MILLISECONDS; } else m_uiBerserkTimer -= uiDiff; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 6edb7670e..f28d5e9f2 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2591" + #define SD2_REVISION_NR "2592" #endif // __SD2_REVISION_NR_H__ From 678e3e441087eb68bef9b410a569c8eb0aba6624 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sun, 17 Jun 2012 14:43:07 +0300 Subject: [PATCH 0581/1172] [2593] Improve script for Maexxna - Naxxramas Note: Web wrap ability may still need additional research and adjustments --- scripts/northrend/naxxramas/boss_maexxna.cpp | 182 ++++++++++--------- sd2_revision_nr.h | 2 +- 2 files changed, 100 insertions(+), 84 deletions(-) diff --git a/scripts/northrend/naxxramas/boss_maexxna.cpp b/scripts/northrend/naxxramas/boss_maexxna.cpp index 3da2fc82b..8cae53408 100644 --- a/scripts/northrend/naxxramas/boss_maexxna.cpp +++ b/scripts/northrend/naxxramas/boss_maexxna.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: Boss_Maexxna -SD%Complete: 70 -SDComment: Need to correct web wrap ability +SD%Complete: 90 +SDComment: Web wrap effect still needs more love and research. SDCategory: Naxxramas EndScriptData */ @@ -46,29 +46,35 @@ enum SPELL_FRENZY = 54123, SPELL_FRENZY_H = 54124, - NPC_WEB_WRAP = 16486, - NPC_SPIDERLING = 17055 -}; + //SPELL_SUMMON_SPIDERLING_1 = 29434, // removed from dbc. Summons 10 spiderlings + //SPELL_SUMMON_SPIDERLING_2 = 30076, // removed from dbc. Summons 3 spiderlings + //SPELL_SUMMON_WEB_WRAP = 28627, // removed from dbc. Summons one web wrap and transforms it into creature 17286 -#define LOC_X1 3546.796f -#define LOC_Y1 -3869.082f -#define LOC_Z1 296.450f + NPC_WEB_WRAP = 16486, + NPC_SPIDERLING = 17055, -#define LOC_X2 3531.271f -#define LOC_Y2 -3847.424f -#define LOC_Z2 299.450f + MAX_SPIDERLINGS = 8, + MAX_WEB_WRAP_POSITIONS = 3, +}; -#define LOC_X3 3497.067f -#define LOC_Y3 -3843.384f -#define LOC_Z3 302.384f +static const float aWebWrapLoc[MAX_WEB_WRAP_POSITIONS][3] = +{ + {3546.796f, -3869.082f, 296.450f}, + {3531.271f, -3847.424f, 299.450f}, + {3497.067f, -3843.384f, 302.384f} +}; struct MANGOS_DLL_DECL npc_web_wrapAI : public ScriptedAI { npc_web_wrapAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } ObjectGuid m_victimGuid; + uint32 m_uiWebWrapTimer; - void Reset() {} + void Reset() + { + m_uiWebWrapTimer = 0; + } void MoveInLineOfSight(Unit* pWho) {} void AttackStart(Unit* pWho) {} @@ -77,9 +83,30 @@ struct MANGOS_DLL_DECL npc_web_wrapAI : public ScriptedAI { if (pVictim) { - DoTeleportPlayer(pVictim, m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), pVictim->GetOrientation()); + // Vanilla spell 28618, 28619, 28620, 28621 had effect SPELL_EFFECT_PLAYER_PULL with EffectMiscValue = 200, 300, 400 and 500 + // All these spells trigger 28622 after 1 or 2 seconds + // the EffectMiscValue may have been based on the distance between the victim and the target + + // NOTE: This implementation may not be 100% correct, but it gets very close to the expected result + + float fDist = m_creature->GetDistance2d(pVictim); + // Switch the speed multiplier based on the distance from the web wrap + uint32 uiEffectMiscValue = 500; + if (fDist < 25.0f) + uiEffectMiscValue = 200; + else if (fDist < 50.0f) + uiEffectMiscValue = 300; + else if (fDist < 75.0f) + uiEffectMiscValue = 400; + + // Note: normally we should use the Knockback effect to handle this, but because this doesn't behave as expected we'll just use Jump Movement + //pVictim->KnockBackFrom(m_creature, -fDist, uiEffectMiscValue * 0.1f); + + float fSpeed = fDist * (uiEffectMiscValue * 0.01f); + pVictim->GetMotionMaster()->MoveJump(m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), fSpeed, 0.0f); + m_victimGuid = pVictim->GetObjectGuid(); - pVictim->CastSpell(pVictim, SPELL_WEBWRAP, true); + m_uiWebWrapTimer = uiEffectMiscValue == 200 ? 1000 : 2000; } } @@ -94,6 +121,23 @@ struct MANGOS_DLL_DECL npc_web_wrapAI : public ScriptedAI } } } + + void UpdateAI(const uint32 uiDiff) + { + if (m_uiWebWrapTimer) + { + // Finally the player gets web wrapped and he should change the display id until the creature is killed + if (m_uiWebWrapTimer <= uiDiff) + { + if (Player* pVictim = m_creature->GetMap()->GetPlayer(m_victimGuid)) + pVictim->CastSpell(pVictim, SPELL_WEBWRAP, true, NULL, NULL, m_creature->GetObjectGuid()); + + m_uiWebWrapTimer = 0; + } + else + m_uiWebWrapTimer -= uiDiff; + } + } }; struct MANGOS_DLL_DECL boss_maexxnaAI : public ScriptedAI @@ -117,12 +161,12 @@ struct MANGOS_DLL_DECL boss_maexxnaAI : public ScriptedAI void Reset() { - m_uiWebWrapTimer = 20000; // 20 sec init, 40 sec normal - m_uiWebSprayTimer = 40000; // 40 seconds - m_uiPoisonShockTimer = 20000; // 20 seconds - m_uiNecroticPoisonTimer = 30000; // 30 seconds - m_uiSummonSpiderlingTimer = 30000; // 30 sec init, 40 sec normal - m_bEnraged = false; + m_uiWebWrapTimer = 15000; + m_uiWebSprayTimer = 40000; + m_uiPoisonShockTimer = urand(10000, 20000); + m_uiNecroticPoisonTimer = urand(20000, 30000); + m_uiSummonSpiderlingTimer = 30000; + m_bEnraged = false; } void Aggro(Unit* pWho) @@ -143,75 +187,46 @@ struct MANGOS_DLL_DECL boss_maexxnaAI : public ScriptedAI m_pInstance->SetData(TYPE_MAEXXNA, FAIL); } - bool DoCastWebWrap() + void JustSummoned(Creature* pSummoned) { - ThreatList const& tList = m_creature->getThreatManager().getThreatList(); - std::vector vTargets; - - // This spell doesn't work if we only have 1 player on threat list - if (tList.size() < 2) - return false; - - // begin + 1 , so we don't target the one with the highest threat - ThreatList::const_iterator itr = tList.begin(); - std::advance(itr, 1); - - // store the threat list in a different container - for (;itr != tList.end(); ++itr) + if (pSummoned->GetEntry() == NPC_WEB_WRAP) { - Unit* pTarget = m_creature->GetMap()->GetUnit((*itr)->getUnitGuid()); - - // only on alive players - if (pTarget && pTarget->isAlive() && pTarget->GetTypeId() == TYPEID_PLAYER) - vTargets.push_back(pTarget); + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1, SPELL_WEBWRAP, SELECT_FLAG_PLAYER)) + { + if (npc_web_wrapAI* pWebAI = dynamic_cast(pSummoned->AI())) + pWebAI->SetVictim(pTarget); + } + } + else if (pSummoned->GetEntry() == NPC_SPIDERLING) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + pSummoned->AI()->AttackStart(pTarget); } + } - if (vTargets.empty()) + bool DoCastWebWrap() + { + // If we can't select a player for web wrap then skip the summoning + if (!m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1, SPELL_WEBWRAP, SELECT_FLAG_PLAYER)) return false; - // cut down to size if we have more than 1/2 targets (10m/25m) (was 3 in 40m) - uint8 uiMaxTargets = m_bIsRegularMode ? 1 : 2; - while(vTargets.size() > uiMaxTargets) - vTargets.erase(vTargets.begin() + urand(0, vTargets.size() - 1)); - - int i = 0; + uint8 uiPos1 = urand(0, MAX_WEB_WRAP_POSITIONS - 1); + m_creature->SummonCreature(NPC_WEB_WRAP, aWebWrapLoc[uiPos1][0], aWebWrapLoc[uiPos1][1], aWebWrapLoc[uiPos1][2], 0, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 60000); - // TODO check locations for 10m/25m - for(std::vector::const_iterator iter = vTargets.begin(); iter != vTargets.end(); ++iter, ++i) + // Summon a second web wrap on heroic + if (!m_bIsRegularMode) { - // Teleport the targets to a location on the wall and summon a Web Wrap on them - switch(i) - { - case 0: - if (Creature* pWrap = m_creature->SummonCreature(NPC_WEB_WRAP, LOC_X1, LOC_Y1, LOC_Z1, 0.0f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 60000)) - { - if (npc_web_wrapAI* pWebAI = dynamic_cast(pWrap->AI())) - pWebAI->SetVictim(*iter); - } - break; - case 1: - if (Creature* pWrap = m_creature->SummonCreature(NPC_WEB_WRAP, LOC_X2, LOC_Y2, LOC_Z2, 0.0f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 60000)) - { - if (npc_web_wrapAI* pWebAI = dynamic_cast(pWrap->AI())) - pWebAI->SetVictim(*iter); - } - break; - case 2: - if (Creature* pWrap = m_creature->SummonCreature(NPC_WEB_WRAP, LOC_X3, LOC_Y3, LOC_Z3, 0.0f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 60000)) - { - if (npc_web_wrapAI* pWebAI = dynamic_cast(pWrap->AI())) - pWebAI->SetVictim(*iter); - } - break; - } + uint8 uiPos2 = (uiPos1 + urand(1, MAX_WEB_WRAP_POSITIONS - 1)) % MAX_WEB_WRAP_POSITIONS; + m_creature->SummonCreature(NPC_WEB_WRAP, aWebWrapLoc[uiPos2][0], aWebWrapLoc[uiPos2][1], aWebWrapLoc[uiPos2][2], 0, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 60000); } return true; } + // Summons spiderlings around the boss void SummonSpiderlings() { - for(uint8 i = 0; i < 8; ++i) + for (uint8 i = 0; i < MAX_SPIDERLINGS; ++i) m_creature->SummonCreature(NPC_SPIDERLING, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 60000); } @@ -225,6 +240,7 @@ struct MANGOS_DLL_DECL boss_maexxnaAI : public ScriptedAI { if (DoCastWebWrap()) DoScriptText(EMOTE_SPIN_WEB, m_creature); + m_uiWebWrapTimer = 40000; } else @@ -233,7 +249,7 @@ struct MANGOS_DLL_DECL boss_maexxnaAI : public ScriptedAI // Web Spray if (m_uiWebSprayTimer < uiDiff) { - if (DoCastSpellIfCan(m_creature->getVictim(), m_bIsRegularMode ? SPELL_WEBSPRAY : SPELL_WEBSPRAY_H) == CAST_OK) + if (DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_WEBSPRAY : SPELL_WEBSPRAY_H) == CAST_OK) { DoScriptText(EMOTE_SPRAY, m_creature); m_uiWebSprayTimer = 40000; @@ -245,8 +261,8 @@ struct MANGOS_DLL_DECL boss_maexxnaAI : public ScriptedAI // Poison Shock if (m_uiPoisonShockTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), m_bIsRegularMode ? SPELL_POISONSHOCK : SPELL_POISONSHOCK_H); - m_uiPoisonShockTimer = 20000; + if (DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_POISONSHOCK : SPELL_POISONSHOCK_H) == CAST_OK) + m_uiPoisonShockTimer = urand(10000, 20000); } else m_uiPoisonShockTimer -= uiDiff; @@ -254,8 +270,8 @@ struct MANGOS_DLL_DECL boss_maexxnaAI : public ScriptedAI // Necrotic Poison if (m_uiNecroticPoisonTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), m_bIsRegularMode ? SPELL_NECROTICPOISON : SPELL_NECROTICPOISON_H); - m_uiNecroticPoisonTimer = 30000; + if (DoCastSpellIfCan(m_creature->getVictim(), m_bIsRegularMode ? SPELL_NECROTICPOISON : SPELL_NECROTICPOISON_H) == CAST_OK) + m_uiNecroticPoisonTimer = urand(20000, 30000); } else m_uiNecroticPoisonTimer -= uiDiff; @@ -265,7 +281,7 @@ struct MANGOS_DLL_DECL boss_maexxnaAI : public ScriptedAI { SummonSpiderlings(); DoScriptText(EMOTE_SPIDERLING, m_creature); - m_uiSummonSpiderlingTimer = 40000; + m_uiSummonSpiderlingTimer = 30000; } else m_uiSummonSpiderlingTimer -= uiDiff; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index f28d5e9f2..b1aa83879 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2592" + #define SD2_REVISION_NR "2593" #endif // __SD2_REVISION_NR_H__ From 202a413a10d01c24c13fc30c8e27f5f9d4d4d77b Mon Sep 17 00:00:00 2001 From: Xfurry Date: Thu, 21 Jun 2012 11:09:52 +0300 Subject: [PATCH 0582/1172] [2594] Improve timers for Mana Tombs bosses Thanks to X-Savior for providing the proper data --- .../mana_tombs/boss_nexusprince_shaffar.cpp | 41 ++++++++----------- .../mana_tombs/boss_pandemonius.cpp | 12 +++--- sd2_revision_nr.h | 2 +- 3 files changed, 24 insertions(+), 31 deletions(-) diff --git a/scripts/outland/auchindoun/mana_tombs/boss_nexusprince_shaffar.cpp b/scripts/outland/auchindoun/mana_tombs/boss_nexusprince_shaffar.cpp index 23dbc68bc..b2bb02a4c 100644 --- a/scripts/outland/auchindoun/mana_tombs/boss_nexusprince_shaffar.cpp +++ b/scripts/outland/auchindoun/mana_tombs/boss_nexusprince_shaffar.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: Boss_NexusPrince_Shaffar -SD%Complete: 80 -SDComment: Need more tuning of spell timers, it should not be as linear fight as current. Also should possibly find a better way to deal with his three initial beacons to make sure all aggro. +SD%Complete: 100 +SDComment: ToDo: move the Ethereal Beacon script to eventAI SDCategory: Auchindoun, Mana Tombs EndScriptData */ @@ -44,10 +44,8 @@ enum SPELL_FIREBALL = 32363, SPELL_FROSTNOVA = 32365, - SPELL_ETHEREAL_BEACON = 32371, // Summons NPC_BEACON - SPELL_ETHEREAL_BEACON_VISUAL = 32368, - - NPC_BEACON = 18431 + SPELL_ETHEREAL_BEACON = 32371, // Summons 18431 + //SPELL_ETHEREAL_BEACON_VISUAL = 32368, // included in creature_template_addon }; struct MANGOS_DLL_DECL boss_nexusprince_shaffarAI : public ScriptedAI @@ -69,15 +67,15 @@ struct MANGOS_DLL_DECL boss_nexusprince_shaffarAI : public ScriptedAI void Reset() { m_uiBlinkTimer = 30000; - m_uiBeaconTimer = 10000; - m_uiFireBallTimer = 8000; - m_uiFrostboltTimer = 4000; - m_uiFrostNovaTimer = 15000; + m_uiBeaconTimer = urand(12000, 15000); + m_uiFireBallTimer = urand(2000, 12000); + m_uiFrostboltTimer = urand(1000, 14000); + m_uiFrostNovaTimer = urand(18000, 25000); } void MoveInLineOfSight(Unit* pWho) { - if (!m_bHasTaunted && pWho->GetTypeId() == TYPEID_PLAYER && m_creature->IsWithinDistInMap(pWho, 100.0f)) + if (!m_bHasTaunted && pWho->GetTypeId() == TYPEID_PLAYER && m_creature->IsWithinDistInMap(pWho, 100.0f) && m_creature->IsWithinLOSInMap(pWho)) { DoScriptText(SAY_INTRO, m_creature); m_bHasTaunted = true; @@ -98,13 +96,8 @@ struct MANGOS_DLL_DECL boss_nexusprince_shaffarAI : public ScriptedAI void JustSummoned(Creature* pSummoned) { - if (pSummoned->GetEntry() == NPC_BEACON) - { - pSummoned->CastSpell(pSummoned, SPELL_ETHEREAL_BEACON_VISUAL, false); - - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) - pSummoned->AI()->AttackStart(pTarget); - } + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) + pSummoned->AI()->AttackStart(pTarget); } void KilledUnit(Unit* pVictim) @@ -125,7 +118,7 @@ struct MANGOS_DLL_DECL boss_nexusprince_shaffarAI : public ScriptedAI if (m_uiFrostNovaTimer < uiDiff) { if (DoCastSpellIfCan(m_creature, SPELL_FROSTNOVA) == CAST_OK) - m_uiFrostNovaTimer = urand(17500, 25000); + m_uiFrostNovaTimer = urand(10000, 20000); } else m_uiFrostNovaTimer -= uiDiff; @@ -133,7 +126,7 @@ struct MANGOS_DLL_DECL boss_nexusprince_shaffarAI : public ScriptedAI if (m_uiFrostboltTimer < uiDiff) { if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_FROSTBOLT) == CAST_OK) - m_uiFrostboltTimer = urand(4500, 6000); + m_uiFrostboltTimer = urand(3000, 8000); } else m_uiFrostboltTimer -= uiDiff; @@ -141,7 +134,7 @@ struct MANGOS_DLL_DECL boss_nexusprince_shaffarAI : public ScriptedAI if (m_uiFireBallTimer < uiDiff) { if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_FIREBALL) == CAST_OK) - m_uiFireBallTimer = urand(4500, 6000); + m_uiFireBallTimer = urand(3000, 8000); } else m_uiFireBallTimer -= uiDiff; @@ -168,7 +161,7 @@ struct MANGOS_DLL_DECL boss_nexusprince_shaffarAI : public ScriptedAI if (!urand(0,3)) DoScriptText(SAY_SUMMON, m_creature); - m_uiBeaconTimer = 10000; + m_uiBeaconTimer = urand(45000, 75000); } } else @@ -205,7 +198,7 @@ struct MANGOS_DLL_DECL mob_ethereal_beaconAI : public ScriptedAI void Reset() { m_uiApprenticeTimer = m_bIsRegularMode ? 20000 : 10000; - m_uiArcaneBoltTimer = 1000; + m_uiArcaneBoltTimer = 0; } void JustSummoned(Creature* pSummoned) @@ -222,7 +215,7 @@ struct MANGOS_DLL_DECL mob_ethereal_beaconAI : public ScriptedAI if (m_uiArcaneBoltTimer < uiDiff) { DoCastSpellIfCan(m_creature->getVictim(), SPELL_ARCANE_BOLT); - m_uiArcaneBoltTimer = urand(2000, 4500); + m_uiArcaneBoltTimer = urand(3000, 8000); } else m_uiArcaneBoltTimer -= uiDiff; diff --git a/scripts/outland/auchindoun/mana_tombs/boss_pandemonius.cpp b/scripts/outland/auchindoun/mana_tombs/boss_pandemonius.cpp index 1ee196ef8..9bbb9d951 100644 --- a/scripts/outland/auchindoun/mana_tombs/boss_pandemonius.cpp +++ b/scripts/outland/auchindoun/mana_tombs/boss_pandemonius.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: Boss_Pandemonius -SD%Complete: 75 -SDComment: Not known how void blast is done (amount of rapid cast seems to be related to players in party). All mobs remaining in surrounding area should aggro when engaged. +SD%Complete: 80 +SDComment: Not known how void blast is done (amount of rapid cast seems to be related to players in party). SDCategory: Auchindoun, Mana Tombs EndScriptData */ @@ -57,8 +57,8 @@ struct MANGOS_DLL_DECL boss_pandemoniusAI : public ScriptedAI void Reset() { - m_uiVoidBlastTimer = urand(8000, 23000); - m_uiDarkShellTimer = 20000; + m_uiVoidBlastTimer = urand(15000, 20000); + m_uiDarkShellTimer = 15000; m_uiVoidBlastCounter = 0; } @@ -95,7 +95,7 @@ struct MANGOS_DLL_DECL boss_pandemoniusAI : public ScriptedAI // reset timer and counter when counter has reached the max limit if (m_uiVoidBlastCounter == MAX_VOID_BLASTS) { - m_uiVoidBlastTimer = urand(15000, 25000); + m_uiVoidBlastTimer = urand(25000, 30000); m_uiVoidBlastCounter = 0; } // cast the void blasts in a row until we reach the max limit @@ -116,7 +116,7 @@ struct MANGOS_DLL_DECL boss_pandemoniusAI : public ScriptedAI if (DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_DARK_SHELL : SPELL_DARK_SHELL_H) == CAST_OK) { DoScriptText(EMOTE_DARK_SHELL, m_creature); - m_uiDarkShellTimer = 20000; + m_uiDarkShellTimer = urand(25000, 30000); } } else diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index b1aa83879..1eb83ebbf 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2593" + #define SD2_REVISION_NR "2594" #endif // __SD2_REVISION_NR_H__ From 7b5118513702125eeea134f4d57e4bda4942336e Mon Sep 17 00:00:00 2001 From: Xfurry Date: Fri, 22 Jun 2012 00:48:03 +0300 Subject: [PATCH 0583/1172] [2595] Implement basic script support for Anzu - Sethekk Halls --- .../auchindoun/sethekk_halls/boss_anzu.cpp | 67 ++++++++++++++++++- .../sethekk_halls/instance_sethekk_halls.cpp | 21 ++++++ sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 4 ++ sql/updates/r2595_mangos.sql | 4 ++ 5 files changed, 95 insertions(+), 3 deletions(-) create mode 100644 sql/updates/r2595_mangos.sql diff --git a/scripts/outland/auchindoun/sethekk_halls/boss_anzu.cpp b/scripts/outland/auchindoun/sethekk_halls/boss_anzu.cpp index 83298feee..58a17c51d 100644 --- a/scripts/outland/auchindoun/sethekk_halls/boss_anzu.cpp +++ b/scripts/outland/auchindoun/sethekk_halls/boss_anzu.cpp @@ -16,13 +16,76 @@ /* ScriptData SDName: boss_anzu -SD%Complete: 0 -SDComment: Placeholder +SD%Complete: 10 +SDComment: Basic script SDCategory: Auchindoun, Sethekk Halls EndScriptData */ #include "precompiled.h" +#include "sethekk_halls.h" + +enum +{ + SPELL_SCREECH = 40184, + SPELL_SPELL_BOMB = 40303, + SPELL_CYCLONE = 40321, + SPELL_BANISH_SELF = 42354, + + NPC_BROOD_OF_ANZU = 23132, +}; + +struct MANGOS_DLL_DECL boss_anzuAI : public ScriptedAI +{ + boss_anzuAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (instance_sethekk_halls*)pCreature->GetInstanceData(); + Reset(); + } + + instance_sethekk_halls* m_pInstance; + + void Reset() + { + } + + void Aggro(Unit* pWho) + { + if (m_pInstance) + m_pInstance->SetData(TYPE_ANZU, IN_PROGRESS); + } + + void JustDied(Unit* pKiller) + { + if (m_pInstance) + m_pInstance->SetData(TYPE_ANZU, DONE); + } + + void JustReachedHome() + { + if (m_pInstance) + m_pInstance->SetData(TYPE_ANZU, FAIL); + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_anzu(Creature* pCreature) +{ + return new boss_anzuAI(pCreature); +} void AddSC_boss_anzu() { + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_anzu"; + pNewScript->GetAI = &GetAI_boss_anzu; + pNewScript->RegisterSelf(); } diff --git a/scripts/outland/auchindoun/sethekk_halls/instance_sethekk_halls.cpp b/scripts/outland/auchindoun/sethekk_halls/instance_sethekk_halls.cpp index 05e43c163..70b088409 100644 --- a/scripts/outland/auchindoun/sethekk_halls/instance_sethekk_halls.cpp +++ b/scripts/outland/auchindoun/sethekk_halls/instance_sethekk_halls.cpp @@ -134,6 +134,22 @@ InstanceData* GetInstanceData_instance_sethekk_halls(Map* pMap) return new instance_sethekk_halls(pMap); } +bool ProcessEventId_event_spell_summon_raven_god(uint32 uiEventId, Object* pSource, Object* pTarget, bool bIsStart) +{ + if (bIsStart && pSource->GetTypeId() == TYPEID_PLAYER) + { + if (instance_sethekk_halls* pInstance = (instance_sethekk_halls*)((Player*)pSource)->GetInstanceData()) + { + // This should be checked by despawning the Raven Claw Go; However it's better to double check the condition + if (pInstance->GetData(TYPE_ANZU) == DONE || pInstance->GetData(TYPE_ANZU) == IN_PROGRESS) + return true; + + // ToDo: add more code here to handle the summoning event. For the moment it's handled in DB because of the missing info + } + } + return false; +} + void AddSC_instance_sethekk_halls() { Script* pNewScript; @@ -142,4 +158,9 @@ void AddSC_instance_sethekk_halls() pNewScript->Name = "instance_sethekk_halls"; pNewScript->GetInstanceData = &GetInstanceData_instance_sethekk_halls; pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "event_spell_summon_raven_god"; + pNewScript->pProcessEventId = &ProcessEventId_event_spell_summon_raven_god; + pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 1eb83ebbf..3fbecdef0 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2594" + #define SD2_REVISION_NR "2595" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 4c4c2318b..bf6bd8887 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -230,6 +230,10 @@ UPDATE creature_template SET ScriptName='mob_syth_frost' WHERE entry=19204; UPDATE creature_template SET ScriptName='mob_syth_shadow' WHERE entry=19206; UPDATE creature_template SET ScriptName='boss_talon_king_ikiss' WHERE entry=18473; UPDATE creature_template SET ScriptName='boss_darkweaver_syth' WHERE entry=18472; +UPDATE creature_template SET ScriptName='boss_anzu' WHERE entry=23035; +DELETE FROM scripted_event_id WHERE id=14797; +INSERT INTO scripted_event_id VALUES +(14797,'event_spell_summon_raven_god'); /* SHADOW LABYRINTH */ UPDATE instance_template SET ScriptName='instance_shadow_labyrinth' WHERE map=555; diff --git a/sql/updates/r2595_mangos.sql b/sql/updates/r2595_mangos.sql new file mode 100644 index 000000000..a44ff675e --- /dev/null +++ b/sql/updates/r2595_mangos.sql @@ -0,0 +1,4 @@ +UPDATE creature_template SET ScriptName='boss_anzu' WHERE entry=23035; +DELETE FROM scripted_event_id WHERE id=14797; +INSERT INTO scripted_event_id VALUES +(14797,'event_spell_summon_raven_god'); From 1348124ea6b3f3e633cde82716568ed72630819e Mon Sep 17 00:00:00 2001 From: Xfurry Date: Fri, 22 Jun 2012 01:54:32 +0300 Subject: [PATCH 0584/1172] [2596] Implement support for Nefarian - combat phase 3 Also add missing Melt Weapon spell for Ragnaros This expects Mangos [12012] --- .../blackwing_lair/blackwing_lair.h | 2 ++ .../blackwing_lair/boss_nefarian.cpp | 5 +-- .../blackwing_lair/boss_victor_nefarius.cpp | 10 +++--- .../instance_blackwing_lair.cpp | 33 +++++++++++++++++++ .../molten_core/boss_ragnaros.cpp | 9 ++--- sd2_revision_nr.h | 2 +- 6 files changed, 50 insertions(+), 11 deletions(-) diff --git a/scripts/eastern_kingdoms/blackwing_lair/blackwing_lair.h b/scripts/eastern_kingdoms/blackwing_lair/blackwing_lair.h index bf7a31aa4..632ddbe8c 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/blackwing_lair.h +++ b/scripts/eastern_kingdoms/blackwing_lair/blackwing_lair.h @@ -42,6 +42,7 @@ enum GO_DOOR_LASHLAYER = 179365, GO_ORB_OF_DOMINATION = 177808, // trigger 19832 on Razorgore GO_BLACK_DRAGON_EGG = 177807, + GO_DRAKONID_BONES = 179804, }; // Coords used to spawn Nefarius at the throne @@ -73,6 +74,7 @@ class MANGOS_DLL_DECL instance_blackwing_lair : public ScriptedInstance GUIDList m_lTechnicianGuids; GUIDList m_lGeneratorGuids; GUIDList m_lDragonEggGuids; + GUIDList m_lDrakonidBonesGuids; }; #endif diff --git a/scripts/eastern_kingdoms/blackwing_lair/boss_nefarian.cpp b/scripts/eastern_kingdoms/blackwing_lair/boss_nefarian.cpp index 1396274d4..2b00d67c9 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/boss_nefarian.cpp +++ b/scripts/eastern_kingdoms/blackwing_lair/boss_nefarian.cpp @@ -50,7 +50,7 @@ enum SPELL_VEIL_OF_SHADOW = 22687, // old spell id 7068 -> wrong SPELL_CLEAVE = 20691, SPELL_TAIL_LASH = 23364, - SPELL_BONE_CONTRUST = 23363, //23362, 23361 Missing from DBC! + //SPELL_BONE_CONTRUST = 23363, //23362, 23361 Missing from DBC! SPELL_MAGE = 23410, // wild magic SPELL_WARRIOR = 23397, // beserk @@ -248,7 +248,8 @@ struct MANGOS_DLL_DECL boss_nefarianAI : public ScriptedAI // Phase3 begins when we are below X health if (!m_bPhase3 && m_creature->GetHealthPercent() < 20.0f) { - // todo revive all dead dragos as 14605 + if (m_pInstance) + m_pInstance->SetData(TYPE_NEFARIAN, SPECIAL); m_bPhase3 = true; DoScriptText(SAY_RAISE_SKELETONS, m_creature); } diff --git a/scripts/eastern_kingdoms/blackwing_lair/boss_victor_nefarius.cpp b/scripts/eastern_kingdoms/blackwing_lair/boss_victor_nefarius.cpp index 1f7715a1e..f914803ce 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/boss_victor_nefarius.cpp +++ b/scripts/eastern_kingdoms/blackwing_lair/boss_victor_nefarius.cpp @@ -55,6 +55,8 @@ enum SPELL_FEAR = 22678, SPELL_SHADOWBLINK = 22681, // triggers a random from spells (22668 - 22676) + SPELL_SUMMON_DRAKONID_BONES = 23363, + MAP_ID_BWL = 469, FACTION_BLACK_DRAGON = 103 @@ -199,8 +201,6 @@ struct MANGOS_DLL_DECL boss_victor_nefariusAI : public ScriptedAI, private Dialo if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) pSummoned->AI()->AttackStart(pTarget); } - - pSummoned->SetRespawnDelay(7*DAY); } void SummonedMovementInform(Creature* pSummoned, uint32 uiMotionType, uint32 uiPointId) @@ -224,6 +224,8 @@ struct MANGOS_DLL_DECL boss_victor_nefariusAI : public ScriptedAI, private Dialo // Despawn self when Nefarian is killed if (pSummoned->GetEntry() == NPC_NEFARIAN) m_creature->ForcedDespawn(); + else + pSummoned->CastSpell(pSummoned, SPELL_SUMMON_DRAKONID_BONES, true); } void JustDidDialogueStep(int32 iEntry) @@ -331,11 +333,11 @@ struct MANGOS_DLL_DECL boss_victor_nefariusAI : public ScriptedAI, private Dialo // 1 in 3 chance it will be a chromatic uiCreatureId = urand(0, 2) ? m_uiDrakeTypeOne : NPC_CHROMATIC_DRAKANOID; - m_creature->SummonCreature(uiCreatureId, aNefarianLocs[0].m_fX, aNefarianLocs[0].m_fY, aNefarianLocs[0].m_fZ, 5.000f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 30*MINUTE*IN_MILLISECONDS); + m_creature->SummonCreature(uiCreatureId, aNefarianLocs[0].m_fX, aNefarianLocs[0].m_fY, aNefarianLocs[0].m_fZ, 5.000f, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 30000); // 1 in 3 chance it will be a chromatic uiCreatureId = urand(0, 2) ? m_uiDrakeTypeTwo : NPC_CHROMATIC_DRAKANOID; - m_creature->SummonCreature(uiCreatureId, aNefarianLocs[1].m_fX, aNefarianLocs[1].m_fY, aNefarianLocs[1].m_fZ, 5.000, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 30*MINUTE*IN_MILLISECONDS); + m_creature->SummonCreature(uiCreatureId, aNefarianLocs[1].m_fX, aNefarianLocs[1].m_fY, aNefarianLocs[1].m_fZ, 5.000, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 30000); //Begin phase 2 by spawning Nefarian if (m_uiSpawnedAdds >= MAX_DRAKE_SUMMONS) diff --git a/scripts/eastern_kingdoms/blackwing_lair/instance_blackwing_lair.cpp b/scripts/eastern_kingdoms/blackwing_lair/instance_blackwing_lair.cpp index b4d4debcd..dfc985d45 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/instance_blackwing_lair.cpp +++ b/scripts/eastern_kingdoms/blackwing_lair/instance_blackwing_lair.cpp @@ -91,6 +91,9 @@ void instance_blackwing_lair::OnObjectCreate(GameObject* pGo) case GO_BLACK_DRAGON_EGG: m_lDragonEggGuids.push_back(pGo->GetObjectGuid()); return; + case GO_DRAKONID_BONES: + m_lDrakonidBonesGuids.push_back(pGo->GetObjectGuid()); + return; default: return; @@ -139,8 +142,38 @@ void instance_blackwing_lair::SetData(uint32 uiType, uint32 uiData) DoUseDoorOrButton(GO_DOOR_CHROMAGGUS_EXIT); break; case TYPE_NEFARIAN: + // Don't store the same thing twice + if (m_auiEncounter[uiType] == uiData) + break; + if (uiData == SPECIAL) + { + //handle missing spell 23362 + Creature* pNefarius = GetSingleCreatureFromStorage(NPC_LORD_VICTOR_NEFARIUS); + if (!pNefarius) + break; + + for (GUIDList::const_iterator itr = m_lDrakonidBonesGuids.begin(); itr != m_lDrakonidBonesGuids.end(); ++itr) + { + // The Go script will handle the missing spell 23361 + if (GameObject* pGo = instance->GetGameObject(*itr)) + pGo->Use(pNefarius); + } + // Don't store special data + break; + } m_auiEncounter[uiType] = uiData; DoUseDoorOrButton(GO_DOOR_NEFARIAN); + // Cleanup the drakonid bones + if (uiData == FAIL) + { + for (GUIDList::const_iterator itr = m_lDrakonidBonesGuids.begin(); itr != m_lDrakonidBonesGuids.end(); ++itr) + { + if (GameObject* pGo = instance->GetGameObject(*itr)) + pGo->SetLootState(GO_JUST_DEACTIVATED); + } + + m_lDrakonidBonesGuids.clear(); + } break; } diff --git a/scripts/eastern_kingdoms/molten_core/boss_ragnaros.cpp b/scripts/eastern_kingdoms/molten_core/boss_ragnaros.cpp index 0fd7b609a..459235cf8 100644 --- a/scripts/eastern_kingdoms/molten_core/boss_ragnaros.cpp +++ b/scripts/eastern_kingdoms/molten_core/boss_ragnaros.cpp @@ -16,7 +16,7 @@ /* ScriptData SDName: Boss_Ragnaros -SD%Complete: 60 +SD%Complete: 70 SDComment: Melee/ Range Combat behavior is not correct(any enemy in melee range, not only getVictim), Some abilities are missing SDCategory: Molten Core EndScriptData */ @@ -26,8 +26,7 @@ EndScriptData */ /* There have been quite some bugs about his spells, keep this as reference untill all finished * Missing features (based on wowwiki) - * Lava Splash - Localized Damage - * Melt Weapon - Proc Aura missing in DBC, or hack missing + * Lava Burst - this spell is handled by Go 178088 which is summoned by spells 21886, 21900 - 21907 */ enum @@ -43,7 +42,7 @@ enum SPELL_WRATH_OF_RAGNAROS = 20566, SPELL_ELEMENTAL_FIRE = 20564, SPELL_MAGMA_BLAST = 20565, // Ranged attack if nobody is in melee range - SPELL_MELT_WEAPON = 21388, // Passive aura was spell 21387, TODO need some hack.. + SPELL_MELT_WEAPON = 21387, SPELL_RAGNA_SUBMERGE = 21107, // Stealth aura SPELL_RAGNA_EMERGE = 20568, // Emerge from lava SPELL_ELEMENTAL_FIRE_KILL = 19773, @@ -118,6 +117,8 @@ struct MANGOS_DLL_DECL boss_ragnarosAI : public Scripted_NoMovementAI if (pWho->GetTypeId() == TYPEID_UNIT && pWho->GetEntry() == NPC_MAJORDOMO) return; + DoCastSpellIfCan(m_creature, SPELL_MELT_WEAPON); + if (m_pInstance) m_pInstance->SetData(TYPE_RAGNAROS, IN_PROGRESS); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 3fbecdef0..90b563843 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2595" + #define SD2_REVISION_NR "2596" #endif // __SD2_REVISION_NR_H__ From c1edd03e2ce49abced98bf19df56aad57fd4cfec Mon Sep 17 00:00:00 2001 From: Chero Date: Sat, 23 Jun 2012 12:34:53 +0300 Subject: [PATCH 0585/1172] [2597] Implement script support for quest 7622 Signed-off-by: Xfurry --- .../eastern_kingdoms/eastern_plaguelands.cpp | 291 +++++++++++++++++- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 + sql/scriptdev2_script_full.sql | 10 +- sql/updates/r2597_mangos.sql | 1 + sql/updates/r2597_scriptdev2.sql | 9 + 6 files changed, 311 insertions(+), 3 deletions(-) create mode 100644 sql/updates/r2597_mangos.sql create mode 100644 sql/updates/r2597_scriptdev2.sql diff --git a/scripts/eastern_kingdoms/eastern_plaguelands.cpp b/scripts/eastern_kingdoms/eastern_plaguelands.cpp index f5754aa8a..b34ef891a 100644 --- a/scripts/eastern_kingdoms/eastern_plaguelands.cpp +++ b/scripts/eastern_kingdoms/eastern_plaguelands.cpp @@ -17,13 +17,14 @@ /* ScriptData SDName: Eastern_Plaguelands SD%Complete: 100 -SDComment: Quest support: 5211. +SDComment: Quest support: 5211, 7622. SDCategory: Eastern Plaguelands EndScriptData */ /* ContentData mobs_ghoul_flayer npc_darrowshire_spirit +npc_eris_havenfire EndContentData */ #include "precompiled.h" @@ -81,6 +82,288 @@ bool GossipHello_npc_darrowshire_spirit(Player* pPlayer, Creature* pCreature) return true; } +/*###### +## npc_eris_havenfire +######*/ + +enum +{ + SAY_PHASE_HEAL = -1000815, + SAY_EVENT_END = -1000816, + SAY_EVENT_FAIL_1 = -1000817, + SAY_EVENT_FAIL_2 = -1000818, + SAY_PEASANT_APPEAR_1 = -1000819, + SAY_PEASANT_APPEAR_2 = -1000820, + SAY_PEASANT_APPEAR_3 = -1000821, + + //SPELL_DEATHS_DOOR = 23127, // damage spells cast on the peasants + //SPELL_SEETHING_PLAGUE = 23072, + SPELL_ENTER_THE_LIGHT_DND = 23107, + SPELL_BLESSING_OF_NORDRASSIL = 23108, + + NPC_INJURED_PEASANT = 14484, + NPC_PLAGUED_PEASANT = 14485, + NPC_SCOURGE_ARCHER = 14489, + NPC_SCOURGE_FOOTSOLDIER = 14486, + NPC_THE_CLEANER = 14503, // can be summoned if the priest has more players in the party for help. requires further research + + QUEST_BALANCE_OF_LIGHT_AND_SHADOW = 7622, + + MAX_PEASANTS = 12, + MAX_ARCHERS = 8, +}; + +static const float aArcherSpawn[8][4] = +{ + {3327.42f, -3021.11f, 170.57f, 6.01f}, + {3335.4f, -3054.3f, 173.63f, 0.49f}, + {3351.3f, -3079.08f, 178.67f, 1.15f}, + {3358.93f, -3076.1f, 174.87f, 1.57f}, + {3371.58f, -3069.24f, 175.20f, 1.99f}, + {3369.46f, -3023.11f, 171.83f, 3.69f}, + {3383.25f, -3057.01f, 181.53f, 2.21f}, + {3380.03f, -3062.73f, 181.90f, 2.31f}, +}; + +static const float aPeasantSpawnLoc[3] = {3360.12f, -3047.79f, 165.26f}; +static const float aPeasantMoveLoc[3] = {3335.0f, -2994.04f, 161.14f}; + +static const int32 aPeasantSpawnYells[3] = {SAY_PEASANT_APPEAR_1, SAY_PEASANT_APPEAR_2, SAY_PEASANT_APPEAR_3}; + +struct MANGOS_DLL_DECL npc_eris_havenfireAI : public ScriptedAI +{ + npc_eris_havenfireAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } + + uint32 m_uiEventTimer; + uint32 m_uiSadEndTimer; + uint8 m_uiPhase; + uint8 m_uiCurrentWave; + uint8 m_uiKillCounter; + uint8 m_uiSaveCounter; + + ObjectGuid m_playerGuid; + GUIDList m_lSummonedGuidList; + + void Reset() + { + m_uiEventTimer = 0; + m_uiSadEndTimer = 0; + m_uiPhase = 0; + m_uiCurrentWave = 0; + m_uiKillCounter = 0; + m_uiSaveCounter = 0; + + m_playerGuid.Clear(); + m_lSummonedGuidList.clear(); + m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER); + } + + void JustSummoned(Creature* pSummoned) + { + switch (pSummoned->GetEntry()) + { + case NPC_INJURED_PEASANT: + case NPC_PLAGUED_PEASANT: + float fX, fY, fZ; + pSummoned->GetRandomPoint(aPeasantMoveLoc[0], aPeasantMoveLoc[1], aPeasantMoveLoc[2], 10.0f, fX, fY, fZ); + pSummoned->GetMotionMaster()->MovePoint(1, fX, fY, fZ); + m_lSummonedGuidList.push_back(pSummoned->GetObjectGuid()); + break; + case NPC_SCOURGE_FOOTSOLDIER: + case NPC_THE_CLEANER: + if (Player* pPlayer = m_creature->GetMap()->GetPlayer(m_playerGuid)) + pSummoned->AI()->AttackStart(pPlayer); + break; + case NPC_SCOURGE_ARCHER: + // ToDo: make these ones attack the peasants + break; + } + + m_lSummonedGuidList.push_back(pSummoned->GetObjectGuid()); + } + + void SummonedMovementInform(Creature* pSummoned, uint32 uiMotionType, uint32 uiPointId) + { + if (uiMotionType != POINT_MOTION_TYPE || !uiPointId) + return; + + if (uiPointId) + { + ++m_uiSaveCounter; + pSummoned->GetMotionMaster()->Clear(); + + pSummoned->RemoveAllAuras(); + pSummoned->CastSpell(pSummoned, SPELL_ENTER_THE_LIGHT_DND, false); + pSummoned->ForcedDespawn(10000); + + // Event ended + if (m_uiSaveCounter >= 50 && m_uiCurrentWave == 5) + DoBalanceEventEnd(); + // Phase ended + else if (m_uiSaveCounter + m_uiKillCounter == m_uiCurrentWave*MAX_PEASANTS) + DoHandlePhaseEnd(); + } + } + + void SummonedCreatureJustDied(Creature* pSummoned) + { + if (pSummoned->GetEntry() == NPC_INJURED_PEASANT || pSummoned->GetEntry() == NPC_PLAGUED_PEASANT) + { + ++m_uiKillCounter; + + // If more than 15 peasants have died, then fail the quest + if (m_uiKillCounter == MAX_PEASANTS) + { + if (Player* pPlayer = m_creature->GetMap()->GetPlayer(m_playerGuid)) + pPlayer->FailQuest(QUEST_BALANCE_OF_LIGHT_AND_SHADOW); + + DoScriptText(SAY_EVENT_FAIL_1, m_creature); + m_uiSadEndTimer = 4000; + } + else if (m_uiSaveCounter + m_uiKillCounter == m_uiCurrentWave*MAX_PEASANTS) + DoHandlePhaseEnd(); + } + } + + void DoSummonWave(uint32 uiSummonId = 0) + { + float fX, fY, fZ; + + if (!uiSummonId) + { + for (uint8 i = 0; i < MAX_PEASANTS; ++i) + { + uint32 uiSummonEntry = roll_chance_i(70) ? NPC_INJURED_PEASANT : NPC_PLAGUED_PEASANT; + m_creature->GetRandomPoint(aPeasantSpawnLoc[0], aPeasantSpawnLoc[1], aPeasantSpawnLoc[2], 10.0f, fX, fY, fZ); + if (Creature* pTemp = m_creature->SummonCreature(uiSummonEntry, fX, fY, fZ, 0, TEMPSUMMON_DEAD_DESPAWN, 0)) + { + // Only the first mob needs to yell + if (!i) + DoScriptText(aPeasantSpawnYells[urand(0, 2)], pTemp); + } + } + + ++m_uiCurrentWave; + } + else if (uiSummonId == NPC_SCOURGE_FOOTSOLDIER) + { + uint8 uiRand = urand(2, 3); + for (uint8 i = 0; i < uiRand; ++i) + { + m_creature->GetRandomPoint(aPeasantSpawnLoc[0], aPeasantSpawnLoc[1], aPeasantSpawnLoc[2], 15.0f, fX, fY, fZ); + m_creature->SummonCreature(NPC_SCOURGE_FOOTSOLDIER, fX, fY, fZ, 0, TEMPSUMMON_DEAD_DESPAWN, 0); + } + } + else if (uiSummonId == NPC_SCOURGE_ARCHER) + { + for (uint8 i = 0; i < MAX_ARCHERS; ++i) + m_creature->SummonCreature(NPC_SCOURGE_ARCHER, aArcherSpawn[i][0], aArcherSpawn[i][1], aArcherSpawn[i][2], aArcherSpawn[i][3], TEMPSUMMON_DEAD_DESPAWN, 0); + } + } + + void DoHandlePhaseEnd() + { + if (Player* pPlayer = m_creature->GetMap()->GetPlayer(m_playerGuid)) + pPlayer->CastSpell(pPlayer, SPELL_BLESSING_OF_NORDRASSIL, true); + + DoScriptText(SAY_PHASE_HEAL, m_creature); + + // Send next wave + if (m_uiCurrentWave < 5) + DoSummonWave(); + } + + void DoStartBalanceEvent(Player* pPlayer) + { + m_creature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER); + m_playerGuid = pPlayer->GetObjectGuid(); + m_uiEventTimer = 5000; + } + + void DoBalanceEventEnd() + { + if (Player* pPlayer = m_creature->GetMap()->GetPlayer(m_playerGuid)) + pPlayer->AreaExploredOrEventHappens(QUEST_BALANCE_OF_LIGHT_AND_SHADOW); + + DoScriptText(SAY_EVENT_END, m_creature); + DoDespawnSummons(true); + EnterEvadeMode(); + } + + void DoDespawnSummons(bool bIsEventEnd = false) + { + for (GUIDList::const_iterator itr = m_lSummonedGuidList.begin(); itr != m_lSummonedGuidList.end(); ++itr) + { + if (Creature* pTemp = m_creature->GetMap()->GetCreature(*itr)) + { + if (bIsEventEnd && (pTemp->GetEntry() == NPC_INJURED_PEASANT || pTemp->GetEntry() == NPC_PLAGUED_PEASANT)) + continue; + + pTemp->ForcedDespawn(); + } + } + } + + void UpdateAI(const uint32 uiDiff) + { + if (m_uiEventTimer) + { + if (m_uiEventTimer <= uiDiff) + { + switch(m_uiPhase) + { + case 0: + DoSummonWave(NPC_SCOURGE_ARCHER); + m_uiEventTimer = 5000; + break; + case 1: + DoSummonWave(); + m_uiEventTimer = urand(60000, 80000); + break; + default: + // The summoning timer of the soldiers isn't very clear + DoSummonWave(NPC_SCOURGE_FOOTSOLDIER); + m_uiEventTimer = urand(5000, 30000); + break; + } + ++m_uiPhase; + } + else + m_uiEventTimer -= uiDiff; + } + + // Handle event end in case of fail + if (m_uiSadEndTimer) + { + if (m_uiSadEndTimer <= uiDiff) + { + DoScriptText(SAY_EVENT_FAIL_2, m_creature); + m_creature->ForcedDespawn(5000); + DoDespawnSummons(); + m_uiSadEndTimer = 0; + } + else + m_uiSadEndTimer -= uiDiff; + } + } +}; + +CreatureAI* GetAI_npc_eris_havenfire(Creature* pCreature) +{ + return new npc_eris_havenfireAI(pCreature); +} + +bool QuestAccept_npc_eris_havenfire(Player* pPlayer, Creature* pCreature, const Quest* pQuest) +{ + if (pQuest->GetQuestId() == QUEST_BALANCE_OF_LIGHT_AND_SHADOW) + { + if (npc_eris_havenfireAI* pErisAI = dynamic_cast(pCreature->AI())) + pErisAI->DoStartBalanceEvent(pPlayer); + } + + return true; +} + void AddSC_eastern_plaguelands() { Script* pNewScript; @@ -95,4 +378,10 @@ void AddSC_eastern_plaguelands() pNewScript->GetAI = &GetAI_npc_darrowshire_spirit; pNewScript->pGossipHello = &GossipHello_npc_darrowshire_spirit; pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_eris_havenfire"; + pNewScript->GetAI = &GetAI_npc_eris_havenfire; + pNewScript->pQuestAcceptNPC = &QuestAccept_npc_eris_havenfire; + pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 90b563843..0254fbd2b 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2596" + #define SD2_REVISION_NR "2597" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index bf6bd8887..cdb55d381 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -574,6 +574,7 @@ INSERT INTO scripted_areatrigger VALUES /* EASTERN PLAGUELANDS */ UPDATE creature_template SET ScriptName='mobs_ghoul_flayer' WHERE entry IN (8530,8531,8532); UPDATE creature_template SET ScriptName='npc_darrowshire_spirit' WHERE entry=11064; +UPDATE creature_template SET ScriptName='npc_eris_havenfire' WHERE entry=14494; /* EBON HOLD */ UPDATE creature_template SET ScriptName='npc_death_knight_initiate' WHERE entry=28406; diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 55f1b223d..3e00f4b09 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -875,7 +875,15 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1000811,'Farewell, mortals... The earthmender knows what fire feels...',0,0,0,0, 'Spirit of Earth SAY_EARTH_EPILOGUE_6'), (-1000812,'We leave, Torlok. I have only one request...',0,0,0,1,'Oronok SAY_ORONOK_EPILOGUE_7'), (-1000813,'The Torn-heart men give their weapons to Earthmender Torlok.',0,2,0,0,'Torlok EMOTE_GIVE_WEAPONS'), -(-1000814,'Give these to the heroes that made this possible.',0,0,0,1,'Oronok SAY_ORONOK_EPILOGUE_8'); +(-1000814,'Give these to the heroes that made this possible.',0,0,0,1,'Oronok SAY_ORONOK_EPILOGUE_8'), + +(-1000815,'Be healed!',0,1,0,0,'Eris Havenfire SAY_PHASE_HEAL'), +(-1000816,'We are saved! The peasants have escaped the Scourge!',0,1,0,0,'Eris Havenfire SAY_EVENT_END'), +(-1000817,'I have failed once more...',0,1,0,0,'Eris Havenfire SAY_EVENT_FAIL_1'), +(-1000818,'I now return to whence I came, only to find myself here once more to relive the same epic tragedy.',0,0,0,0,'Eris Havenfire SAY_EVENT_FAIL_2'), +(-1000819,'The Scourge are upon us! Run! Run for your lives!',0,1,0,0,'Peasant SAY_PEASANT_APPEAR_1'), +(-1000820,'Please help us! The Prince has gone mad!',0,1,0,0,'Peasant SAY_PEASANT_APPEAR_2'), +(-1000821,'Seek sanctuary in Hearthglen! It is our only hope!',0,1,0,0,'Peasant SAY_PEASANT_APPEAR_3'); -- -1 033 000 SHADOWFANG KEEP INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES diff --git a/sql/updates/r2597_mangos.sql b/sql/updates/r2597_mangos.sql new file mode 100644 index 000000000..cc3043bb4 --- /dev/null +++ b/sql/updates/r2597_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_eris_havenfire' WHERE entry=14494; diff --git a/sql/updates/r2597_scriptdev2.sql b/sql/updates/r2597_scriptdev2.sql new file mode 100644 index 000000000..11bae9151 --- /dev/null +++ b/sql/updates/r2597_scriptdev2.sql @@ -0,0 +1,9 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1000821 AND -1000815; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1000815,'Be healed!',0,1,0,0,'Eris Havenfire SAY_PHASE_HEAL'), +(-1000816,'We are saved! The peasants have escaped the Scourge!',0,1,0,0,'Eris Havenfire SAY_EVENT_END'), +(-1000817,'I have failed once more...',0,1,0,0,'Eris Havenfire SAY_EVENT_FAIL_1'), +(-1000818,'I now return to whence I came, only to find myself here once more to relive the same epic tragedy.',0,0,0,0,'Eris Havenfire SAY_EVENT_FAIL_2'), +(-1000819,'The Scourge are upon us! Run! Run for your lives!',0,1,0,0,'Peasant SAY_PEASANT_APPEAR_1'), +(-1000820,'Please help us! The Prince has gone mad!',0,1,0,0,'Peasant SAY_PEASANT_APPEAR_2'), +(-1000821,'Seek sanctuary in Hearthglen! It is our only hope!',0,1,0,0,'Peasant SAY_PEASANT_APPEAR_3'); From 1a89786f0feea36f0c3e719b2e6fdb84e3b31262 Mon Sep 17 00:00:00 2001 From: Nighoo Date: Sat, 23 Jun 2012 16:13:14 +0300 Subject: [PATCH 0586/1172] [2598] Implement combat abilities for Anzu - Sethekk Halls Signed-off-by: Xfurry --- .../auchindoun/sethekk_halls/boss_anzu.cpp | 142 +++++++++++++++++- .../sethekk_halls/instance_sethekk_halls.cpp | 24 ++- .../auchindoun/sethekk_halls/sethekk_halls.h | 8 + sd2_revision_nr.h | 2 +- sql/scriptdev2_script_full.sql | 8 +- sql/updates/r2598_scriptdev2.sql | 7 + 6 files changed, 185 insertions(+), 6 deletions(-) create mode 100644 sql/updates/r2598_scriptdev2.sql diff --git a/scripts/outland/auchindoun/sethekk_halls/boss_anzu.cpp b/scripts/outland/auchindoun/sethekk_halls/boss_anzu.cpp index 58a17c51d..711b788c8 100644 --- a/scripts/outland/auchindoun/sethekk_halls/boss_anzu.cpp +++ b/scripts/outland/auchindoun/sethekk_halls/boss_anzu.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: boss_anzu -SD%Complete: 10 -SDComment: Basic script +SD%Complete: 70 +SDComment: Timers need improvement; Intro event NYI. SDCategory: Auchindoun, Sethekk Halls EndScriptData */ @@ -26,14 +26,28 @@ EndScriptData */ enum { + SAY_BANISH = -1556018, + SAY_WHISPER_MAGIC = -1556019, + EMOTE_BIRD_STONE = -1556020, + + SPELL_FLESH_RIP = 40199, SPELL_SCREECH = 40184, SPELL_SPELL_BOMB = 40303, SPELL_CYCLONE = 40321, SPELL_BANISH_SELF = 42354, NPC_BROOD_OF_ANZU = 23132, + + // Helper birds + NPC_HAWK_SPIRIT = 23134, // casts 40237 + NPC_FALCON_SPIRIT = 23135, // casts 40241 + NPC_EAGLE_SPIRIT = 23136, // casts 40240 + + MAX_BROODS = 5, }; +static const uint32 aSpiritsEntries[3] = {NPC_FALCON_SPIRIT, NPC_HAWK_SPIRIT, NPC_EAGLE_SPIRIT}; + struct MANGOS_DLL_DECL boss_anzuAI : public ScriptedAI { boss_anzuAI(Creature* pCreature) : ScriptedAI(pCreature) @@ -44,33 +58,157 @@ struct MANGOS_DLL_DECL boss_anzuAI : public ScriptedAI instance_sethekk_halls* m_pInstance; + uint32 m_uiFleshRipTimer; + uint32 m_uiScreechTimer; + uint32 m_uiSpellBombTimer; + uint32 m_uiCycloneTimer; + uint8 m_uiBanishPhase; + + GUIDList m_lBirdsGuidList; + void Reset() { + m_uiFleshRipTimer = urand(9000, 13000); + m_uiScreechTimer = 30000; + m_uiSpellBombTimer = 22000; + m_uiCycloneTimer = 5000; + m_uiBanishPhase = 2; } void Aggro(Unit* pWho) { + // Note: this should be moved to the intro event when implemented! + DoSummonBirdHelpers(); + if (m_pInstance) m_pInstance->SetData(TYPE_ANZU, IN_PROGRESS); } void JustDied(Unit* pKiller) { + DespawnBirdHelpers(); + if (m_pInstance) m_pInstance->SetData(TYPE_ANZU, DONE); } void JustReachedHome() { + DespawnBirdHelpers(); + m_creature->ForcedDespawn(); + if (m_pInstance) m_pInstance->SetData(TYPE_ANZU, FAIL); } + void JustSummoned(Creature* pSummoned) + { + if (pSummoned->GetEntry() == NPC_BROOD_OF_ANZU) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + pSummoned->AI()->AttackStart(pTarget); + } + else + { + DoScriptText(EMOTE_BIRD_STONE, pSummoned); + m_lBirdsGuidList.push_back(pSummoned->GetObjectGuid()); + } + } + + void DoSummonBroodsOfAnzu() + { + if (!m_pInstance) + return; + + // Note: the birds should fly around the room for about 10 seconds before starting to attack the players + float fX, fY, fZ; + if (GameObject* pClaw = m_pInstance->GetSingleGameObjectFromStorage(GO_RAVENS_CLAW)) + { + for (uint8 i = 0; i < MAX_BROODS; ++i) + { + m_creature->GetRandomPoint(pClaw->GetPositionX(), pClaw->GetPositionY(), pClaw->GetPositionZ(), 7.0f, fX, fY, fZ); + m_creature->SummonCreature(NPC_BROOD_OF_ANZU, fX, fY, fZ, 0, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 30000); + } + } + } + + void DoSummonBirdHelpers() + { + float fX, fY, fZ, fAng; + for (uint8 i = 0; i < 3; ++i) + { + fAng = 2*M_PI_F/3*i; + m_creature->GetNearPoint(m_creature, fX, fY, fZ, 0, 15.0f, fAng); + m_creature->SummonCreature(aSpiritsEntries[i], fX, fY, fZ, fAng + M_PI_F, TEMPSUMMON_CORPSE_DESPAWN, 0); + } + } + + void DespawnBirdHelpers() + { + for (GUIDList::const_iterator itr = m_lBirdsGuidList.begin(); itr != m_lBirdsGuidList.end(); ++itr) + { + if (Creature* pTemp = m_creature->GetMap()->GetCreature(*itr)) + pTemp->ForcedDespawn(); + } + } + void UpdateAI(const uint32 uiDiff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; + // Banish at 66% and 33%; Boss can still use spells while banished + if (m_creature->GetHealthPercent() < 33.3f * m_uiBanishPhase) + { + if (DoCastSpellIfCan(m_creature, SPELL_BANISH_SELF) == CAST_OK) + { + DoScriptText(SAY_BANISH, m_creature); + DoSummonBroodsOfAnzu(); + --m_uiBanishPhase; + } + } + + if (m_uiFleshRipTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_FLESH_RIP) == CAST_OK) + m_uiFleshRipTimer = urand(17000, 21000); + } + else + m_uiFleshRipTimer -= uiDiff; + + if (m_uiScreechTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_SCREECH) == CAST_OK) + m_uiScreechTimer = 30000; + } + else + m_uiScreechTimer -= uiDiff; + + if (m_uiSpellBombTimer < uiDiff) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, SPELL_SPELL_BOMB) == CAST_OK) + { + DoScriptText(SAY_WHISPER_MAGIC, m_creature, pTarget); + m_uiSpellBombTimer = urand(25000, 30000); + } + } + } + else + m_uiSpellBombTimer -= uiDiff; + + if (m_uiCycloneTimer < uiDiff) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, SPELL_CYCLONE) == CAST_OK) + m_uiCycloneTimer = 21000; + } + } + else + m_uiCycloneTimer -= uiDiff; + DoMeleeAttackIfReady(); } }; diff --git a/scripts/outland/auchindoun/sethekk_halls/instance_sethekk_halls.cpp b/scripts/outland/auchindoun/sethekk_halls/instance_sethekk_halls.cpp index 70b088409..1da01c816 100644 --- a/scripts/outland/auchindoun/sethekk_halls/instance_sethekk_halls.cpp +++ b/scripts/outland/auchindoun/sethekk_halls/instance_sethekk_halls.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: Instance - Sethekk Halls -SD%Complete: 50 -SDComment: Instance Data for Sethekk Halls instance +SD%Complete: 60 +SDComment: Summoning event for Anzu NYI SDCategory: Auchindoun, Sethekk Halls EndScriptData */ @@ -33,6 +33,12 @@ void instance_sethekk_halls::Initialize() memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); } +void instance_sethekk_halls::OnCreatureCreate(Creature* pCreature) +{ + if (pCreature->GetEntry() == NPC_ANZU) + m_mNpcEntryGuidStore[NPC_ANZU] = pCreature->GetObjectGuid(); +} + void instance_sethekk_halls::OnObjectCreate(GameObject* pGo) { switch (pGo->GetEntry()) @@ -45,6 +51,8 @@ void instance_sethekk_halls::OnObjectCreate(GameObject* pGo) if (m_auiEncounter[TYPE_IKISS] == DONE) pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NO_INTERACT | GO_FLAG_INTERACT_COND); break; + case GO_RAVENS_CLAW: + break; default: return; @@ -58,8 +66,16 @@ void instance_sethekk_halls::SetData(uint32 uiType, uint32 uiData) switch(uiType) { case TYPE_SYTH: + m_auiEncounter[uiType] = uiData; + break; case TYPE_ANZU: m_auiEncounter[uiType] = uiData; + // Respawn the Raven's Claw if event fails + if (uiData == FAIL) + { + if (GameObject* pClaw = GetSingleGameObjectFromStorage(GO_RAVENS_CLAW)) + pClaw->Respawn(); + } break; case TYPE_IKISS: if (uiData == DONE) @@ -144,6 +160,10 @@ bool ProcessEventId_event_spell_summon_raven_god(uint32 uiEventId, Object* pSour if (pInstance->GetData(TYPE_ANZU) == DONE || pInstance->GetData(TYPE_ANZU) == IN_PROGRESS) return true; + // Don't summon him twice + if (pInstance->GetSingleCreatureFromStorage(NPC_ANZU, true)) + return true; + // ToDo: add more code here to handle the summoning event. For the moment it's handled in DB because of the missing info } } diff --git a/scripts/outland/auchindoun/sethekk_halls/sethekk_halls.h b/scripts/outland/auchindoun/sethekk_halls/sethekk_halls.h index 6245bb11f..a53202c1b 100644 --- a/scripts/outland/auchindoun/sethekk_halls/sethekk_halls.h +++ b/scripts/outland/auchindoun/sethekk_halls/sethekk_halls.h @@ -13,8 +13,14 @@ enum TYPE_ANZU = 1, TYPE_IKISS = 2, + NPC_ANZU = 23035, + GO_IKISS_DOOR = 177203, GO_IKISS_CHEST = 187372, + GO_RAVENS_CLAW = 185554, + + SAY_ANZU_INTRO_1 = -1556016, + SAY_ANZU_INTRO_2 = -1556017, ACHIEV_CRITA_TURKEY_TIME = 11142, ITEM_PILGRIMS_HAT = 46723, @@ -30,6 +36,8 @@ class MANGOS_DLL_DECL instance_sethekk_halls : public ScriptedInstance ~instance_sethekk_halls() {} void Initialize(); + + void OnCreatureCreate(Creature* pCreature); void OnObjectCreate(GameObject* pGo); void SetData(uint32 uiType, uint32 uiData); diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 0254fbd2b..6057716af 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2597" + #define SD2_REVISION_NR "2598" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 3e00f4b09..83f1200ba 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -2182,7 +2182,13 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1556011,'You die....stay away from Trinkets',10558,1,0,0,'ikiss SAY_SLAY_1'), (-1556012,'',10559,1,0,0,'ikiss SAY_SLAY_2'), (-1556013,'Ikiss will not....die',10560,1,0,0,'ikiss SAY_DEATH'), -(-1556015,'%s begins to channel arcane energy...',0,3,0,0,'ikiss EMOTE_ARCANE_EXP'); +(-1556015,'%s begins to channel arcane energy...',0,3,0,0,'ikiss EMOTE_ARCANE_EXP'), + +(-1556016,'No! How can this be?',0,1,0,0,'anzu SAY_INTRO_1'), +(-1556017,'Pain will be the price for your insolence! You cannot stop me from claiming the Emerald Dream as my own!',0,1,0,0,'anzu SAY_INTRO_2'), +(-1556018,'Awaken, my children and assist your master!',0,1,0,0,'anzu SAY_BANISH'), +(-1556019,'Your magics shall be your undoing... ak-a-ak...',0,4,0,0,'anzu SAY_WHISPER_MAGIC'), +(-1556020,'%s returns to stone.',0,2,0,0,'anzu EMOTE_BIRD_STONE'); -- -1 557 000 MANA TOMBS INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES diff --git a/sql/updates/r2598_scriptdev2.sql b/sql/updates/r2598_scriptdev2.sql new file mode 100644 index 000000000..19bdd36cc --- /dev/null +++ b/sql/updates/r2598_scriptdev2.sql @@ -0,0 +1,7 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1556020 AND -1556016; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1556016,'No! How can this be?',0,1,0,0,'anzu SAY_INTRO_1'), +(-1556017,'Pain will be the price for your insolence! You cannot stop me from claiming the Emerald Dream as my own!',0,1,0,0,'anzu SAY_INTRO_2'), +(-1556018,'Awaken, my children and assist your master!',0,1,0,0,'anzu SAY_BANISH'), +(-1556019,'Your magics shall be your undoing... ak-a-ak...',0,4,0,0,'anzu SAY_WHISPER_MAGIC'), +(-1556020,'%s returns to stone.',0,2,0,0,'anzu EMOTE_BIRD_STONE'); From 2cc07b9789003465ee0e2d13d247edf602e2c57a Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Sun, 24 Jun 2012 19:42:50 +0200 Subject: [PATCH 0587/1172] [2599] Remove hacks for spell 51519. Expects MaNGOS [12018] --- .../scarlet_enclave/ebon_hold.cpp | 64 ++----------------- sd2_revision_nr.h | 2 +- 2 files changed, 7 insertions(+), 59 deletions(-) diff --git a/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp b/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp index 69d1b45cb..d2a977fed 100644 --- a/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp +++ b/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp @@ -847,36 +847,6 @@ enum PHASE_ACTIVATE = 2 }; -struct DisplayToSpell -{ - uint32 m_uiDisplayId; - uint32 m_uiSpellToNewDisplay; -}; - -DisplayToSpell m_aDisplayToSpell[] = -{ - {25354, 51520}, // human M - {25355, 51534}, // human F - {25356, 51538}, // dwarf M - {25357, 51541}, // draenei M - {25358, 51535}, // nelf M - {25359, 51539}, // gnome M - {25360, 51536}, // nelf F - {25361, 51537}, // dwarf F - {25362, 51540}, // gnome F - {25363, 51542}, // draenei F - {25364, 51543}, // orc M - {25365, 51546}, // troll M - {25366, 51547}, // tauren M - {25367, 51549}, // forsaken M - {25368, 51544}, // orc F - {25369, 51552}, // belf F - {25370, 51545}, // troll F - {25371, 51548}, // tauren F - {25372, 51550}, // forsaken F - {25373, 51551} // belf M -}; - /*###### ## npc_unworthy_initiate_anchor ######*/ @@ -927,26 +897,10 @@ struct MANGOS_DLL_DECL npc_unworthy_initiateAI : public ScriptedAI { npc_unworthy_initiateAI(Creature* pCreature) : ScriptedAI(pCreature) { - m_pToTransform = NULL; - - uint32 uiDisplayCount = sizeof(m_aDisplayToSpell)/sizeof(DisplayToSpell); - - for (uint8 i=0; iGetDisplayId()) - { - m_pToTransform = &m_aDisplayToSpell[i]; - break; - } - } - m_uiNormFaction = pCreature->getFaction(); Reset(); } - DisplayToSpell* m_pToTransform; - ObjectGuid m_myAnchorGuid; uint32 m_uiNormFaction; uint32 m_uiAnchorCheckTimer; @@ -995,7 +949,7 @@ struct MANGOS_DLL_DECL npc_unworthy_initiateAI : public ScriptedAI int32 GetTextId() { - return m_uiPhase == PHASE_DRESSUP ? SAY_START-rand()%8 : SAY_AGGRO-rand()%8; + return m_uiPhase == PHASE_DRESSUP ? SAY_START - urand(0, 7) : SAY_AGGRO - urand(0, 7); } Creature* GetAnchor() @@ -1054,7 +1008,7 @@ struct MANGOS_DLL_DECL npc_unworthy_initiateAI : public ScriptedAI if (m_uiBloodStrike_Timer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_BLOOD_STRIKE); + DoCastSpellIfCan(m_creature->getVictim(), SPELL_BLOOD_STRIKE); m_uiBloodStrike_Timer = 9000; } else @@ -1062,7 +1016,7 @@ struct MANGOS_DLL_DECL npc_unworthy_initiateAI : public ScriptedAI if (m_uiDeathCoil_Timer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_DEATH_COIL); + DoCastSpellIfCan(m_creature->getVictim(), SPELL_DEATH_COIL); m_uiDeathCoil_Timer = 8000; } else @@ -1070,7 +1024,7 @@ struct MANGOS_DLL_DECL npc_unworthy_initiateAI : public ScriptedAI if (m_uiIcyTouch_Timer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_ICY_TOUCH); + DoCastSpellIfCan(m_creature->getVictim(), SPELL_ICY_TOUCH); m_uiIcyTouch_Timer = 8000; } else @@ -1078,7 +1032,7 @@ struct MANGOS_DLL_DECL npc_unworthy_initiateAI : public ScriptedAI if (m_uiPlagueStrike_Timer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_PLAGUE_STRIKE); + DoCastSpellIfCan(m_creature->getVictim(), SPELL_PLAGUE_STRIKE); m_uiPlagueStrike_Timer = 8000; } else @@ -1092,13 +1046,7 @@ struct MANGOS_DLL_DECL npc_unworthy_initiateAI : public ScriptedAI { if (m_uiPhase == PHASE_DRESSUP) { - if (m_pToTransform) - { - m_creature->CastSpell(m_creature, m_pToTransform->m_uiSpellToNewDisplay, true); - m_creature->CastSpell(m_creature, SPELL_INITIATE_VISUAL, false); - } - else - error_log("SD2: npc_unworthy_initiate does not have any spell associated with model"); + m_creature->CastSpell(m_creature, SPELL_INITIATE_VISUAL, false); m_uiPhase = PHASE_ACTIVATE; } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 6057716af..f940f6260 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2598" + #define SD2_REVISION_NR "2599" #endif // __SD2_REVISION_NR_H__ From 68cf55711eb3c4f6909507c1da52ad45a975a371 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sun, 24 Jun 2012 21:33:12 +0300 Subject: [PATCH 0588/1172] [2600] Some various fixes This inclues: * whitespaces fix * some defines for Anzu summoning event * start waypoint movement, for Ambasador Hellmaw * intro unit type id check, for Grandmaster Vorpil --- scripts/northrend/naxxramas/boss_razuvious.cpp | 1 + scripts/outland/auchindoun/sethekk_halls/sethekk_halls.h | 6 ++++++ .../auchindoun/shadow_labyrinth/boss_ambassador_hellmaw.cpp | 2 ++ .../shadow_labyrinth/boss_blackheart_the_inciter.cpp | 1 - .../auchindoun/shadow_labyrinth/boss_grandmaster_vorpil.cpp | 2 +- .../shadow_labyrinth/instance_shadow_labyrinth.cpp | 1 + sd2_revision_nr.h | 2 +- 7 files changed, 12 insertions(+), 3 deletions(-) diff --git a/scripts/northrend/naxxramas/boss_razuvious.cpp b/scripts/northrend/naxxramas/boss_razuvious.cpp index 1f22dad2f..4875e84e5 100644 --- a/scripts/northrend/naxxramas/boss_razuvious.cpp +++ b/scripts/northrend/naxxramas/boss_razuvious.cpp @@ -164,6 +164,7 @@ struct MANGOS_DLL_DECL boss_razuviousAI : public ScriptedAI DoMeleeAttackIfReady(); } }; + CreatureAI* GetAI_boss_razuvious(Creature* pCreature) { return new boss_razuviousAI(pCreature); diff --git a/scripts/outland/auchindoun/sethekk_halls/sethekk_halls.h b/scripts/outland/auchindoun/sethekk_halls/sethekk_halls.h index a53202c1b..6ffa5aed9 100644 --- a/scripts/outland/auchindoun/sethekk_halls/sethekk_halls.h +++ b/scripts/outland/auchindoun/sethekk_halls/sethekk_halls.h @@ -14,6 +14,7 @@ enum TYPE_IKISS = 2, NPC_ANZU = 23035, + NPC_RAVEN_GOD_TARGET = 23057, GO_IKISS_DOOR = 177203, GO_IKISS_CHEST = 187372, @@ -22,6 +23,11 @@ enum SAY_ANZU_INTRO_1 = -1556016, SAY_ANZU_INTRO_2 = -1556017, + // possible spells used for Anzu summoning event + SPELL_PORTAL = 39952, + SPELL_SUMMONING_BEAMS = 39978, + SPELL_RED_LIGHTNING = 39990, + ACHIEV_CRITA_TURKEY_TIME = 11142, ITEM_PILGRIMS_HAT = 46723, ITEM_PILGRIMS_DRESS = 44785, diff --git a/scripts/outland/auchindoun/shadow_labyrinth/boss_ambassador_hellmaw.cpp b/scripts/outland/auchindoun/shadow_labyrinth/boss_ambassador_hellmaw.cpp index cb5e1da22..d942feca1 100644 --- a/scripts/outland/auchindoun/shadow_labyrinth/boss_ambassador_hellmaw.cpp +++ b/scripts/outland/auchindoun/shadow_labyrinth/boss_ambassador_hellmaw.cpp @@ -51,6 +51,8 @@ struct MANGOS_DLL_DECL boss_ambassador_hellmawAI : public ScriptedAI { if (m_pInstance->GetData(TYPE_OVERSEER) != DONE) DoCastSpellIfCan(m_creature, SPELL_BANISH, CAST_TRIGGERED); + else + m_creature->GetMotionMaster()->MoveWaypoint(); } } diff --git a/scripts/outland/auchindoun/shadow_labyrinth/boss_blackheart_the_inciter.cpp b/scripts/outland/auchindoun/shadow_labyrinth/boss_blackheart_the_inciter.cpp index f1c2a779e..00d147d22 100644 --- a/scripts/outland/auchindoun/shadow_labyrinth/boss_blackheart_the_inciter.cpp +++ b/scripts/outland/auchindoun/shadow_labyrinth/boss_blackheart_the_inciter.cpp @@ -102,7 +102,6 @@ struct MANGOS_DLL_DECL boss_blackheart_the_inciterAI : public ScriptedAI void JustReachedHome() { - if (m_pInstance) m_pInstance->SetData(TYPE_INCITER, FAIL); } diff --git a/scripts/outland/auchindoun/shadow_labyrinth/boss_grandmaster_vorpil.cpp b/scripts/outland/auchindoun/shadow_labyrinth/boss_grandmaster_vorpil.cpp index d811598da..2889da3ec 100644 --- a/scripts/outland/auchindoun/shadow_labyrinth/boss_grandmaster_vorpil.cpp +++ b/scripts/outland/auchindoun/shadow_labyrinth/boss_grandmaster_vorpil.cpp @@ -109,7 +109,7 @@ struct MANGOS_DLL_DECL boss_grandmaster_vorpilAI : public ScriptedAI void MoveInLineOfSight(Unit* pWho) { //not sure about right radius - if (!m_bHasDoneIntro && pWho->IsWithinDistInMap(m_creature, 50.0f) && pWho->IsWithinLOSInMap(m_creature)) + if (!m_bHasDoneIntro && pWho->GetTypeId() == TYPEID_PLAYER && pWho->IsWithinDistInMap(m_creature, 50.0f) && pWho->IsWithinLOSInMap(m_creature)) { DoScriptText(SAY_INTRO, m_creature); m_bHasDoneIntro = true; diff --git a/scripts/outland/auchindoun/shadow_labyrinth/instance_shadow_labyrinth.cpp b/scripts/outland/auchindoun/shadow_labyrinth/instance_shadow_labyrinth.cpp index 7b079ef26..db2b6f515 100644 --- a/scripts/outland/auchindoun/shadow_labyrinth/instance_shadow_labyrinth.cpp +++ b/scripts/outland/auchindoun/shadow_labyrinth/instance_shadow_labyrinth.cpp @@ -108,6 +108,7 @@ void instance_shadow_labyrinth::SetData(uint32 uiType, uint32 uiData) { // yell intro and remove banish aura DoScriptText(SAY_HELLMAW_INTRO, pHellmaw); + pHellmaw->GetMotionMaster()->MoveWaypoint(); if (pHellmaw->HasAura(SPELL_BANISH)) pHellmaw->RemoveAurasDueToSpell(SPELL_BANISH); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index f940f6260..7cf2540d3 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2599" + #define SD2_REVISION_NR "2600" #endif // __SD2_REVISION_NR_H__ From 65ec024fc3c5a2baa464b98128d3a7c212ae030e Mon Sep 17 00:00:00 2001 From: Chero Date: Sun, 24 Jun 2012 22:20:52 +0300 Subject: [PATCH 0589/1172] [2601] Implement script support for quest 6402 Signed-off-by: Xfurry --- scripts/eastern_kingdoms/stormwind_city.cpp | 221 +++++++++++++++++++- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 + sql/scriptdev2_script_full.sql | 19 +- sql/updates/r2601_mangos.sql | 1 + sql/updates/r2601_scriptdev2.sql | 17 ++ 6 files changed, 256 insertions(+), 5 deletions(-) create mode 100644 sql/updates/r2601_mangos.sql create mode 100644 sql/updates/r2601_scriptdev2.sql diff --git a/scripts/eastern_kingdoms/stormwind_city.cpp b/scripts/eastern_kingdoms/stormwind_city.cpp index 02f9407bf..2dfd79ffd 100644 --- a/scripts/eastern_kingdoms/stormwind_city.cpp +++ b/scripts/eastern_kingdoms/stormwind_city.cpp @@ -17,7 +17,7 @@ /* ScriptData SDName: Stormwind_City SD%Complete: 100 -SDComment: Quest support: 1640, 1447, 4185 +SDComment: Quest support: 1640, 1447, 4185, 6402. SDCategory: Stormwind City EndScriptData */ @@ -25,9 +25,11 @@ EndScriptData */ npc_bartleby npc_dashel_stonefist npc_lady_katrana_prestor +npc_squire_rowe EndContentData */ #include "precompiled.h" +#include "escort_ai.h" /*###### ## npc_bartleby @@ -207,6 +209,216 @@ bool GossipSelect_npc_lady_katrana_prestor(Player* pPlayer, Creature* pCreature, return true; } +/*###### +## npc_squire_rowe +######*/ + +enum +{ + SAY_SIGNAL_SENT = -1000822, + SAY_DISMOUNT = -1000823, + SAY_WELCOME = -1000824, + + GOSSIP_ITEM_WINDSOR = -3000106, + + GOSSIP_TEXT_ID_DEFAULT = 9063, + GOSSIP_TEXT_ID_PROGRESS = 9064, + GOSSIP_TEXT_ID_START = 9065, + + NPC_WINDSOR = 12580, + NPC_WINDSOR_MOUNT = 12581, + + QUEST_STORMWIND_RENDEZVOUS = 6402, + QUEST_THE_GREAT_MASQUERADE = 6403, +}; + +static const DialogueEntry aIntroDialogue[] = +{ + {NPC_WINDSOR, 0, 3000}, // wait + {NPC_WINDSOR_MOUNT, 0, 1000}, // summon horse + {SAY_DISMOUNT, NPC_WINDSOR, 2000}, + {QUEST_STORMWIND_RENDEZVOUS, 0, 2000}, // face player + {QUEST_THE_GREAT_MASQUERADE, 0, 0}, // say intro to player + {0, 0, 0}, +}; + +static const float aWindsorSpawnLoc[3] = {-9145.68f, 373.79f, 90.64f}; +static const float aWindsorMoveLoc[3] = {-9050.39f, 443.55f, 93.05f}; + +struct MANGOS_DLL_DECL npc_squire_roweAI : public npc_escortAI, private DialogueHelper +{ + npc_squire_roweAI(Creature* m_creature) : npc_escortAI(m_creature), + DialogueHelper(aIntroDialogue) + { + m_bIsEventInProgress = false; + Reset(); + } + + bool m_bIsEventInProgress; + + ObjectGuid m_windsorGuid; + ObjectGuid m_horseGuid; + + void Reset() { } + + void JustSummoned(Creature* pSummoned) + { + if (pSummoned->GetEntry() == NPC_WINDSOR) + { + pSummoned->SetWalk(false); + pSummoned->GetMotionMaster()->MovePoint(1, aWindsorMoveLoc[0], aWindsorMoveLoc[1], aWindsorMoveLoc[2]); + + m_windsorGuid = pSummoned->GetObjectGuid(); + m_bIsEventInProgress = true; + } + else if (pSummoned->GetEntry() == NPC_WINDSOR_MOUNT) + m_horseGuid = pSummoned->GetObjectGuid(); + } + + void SummonedCreatureDespawn(Creature* pSummoned) + { + if (pSummoned->GetEntry() == NPC_WINDSOR) + { + m_windsorGuid.Clear(); + m_bIsEventInProgress = false; + } + } + + void SummonedMovementInform(Creature* pSummoned, uint32 uiMotionType, uint32 uiPointId) + { + if (uiMotionType != POINT_MOTION_TYPE || !uiPointId || pSummoned->GetEntry() != NPC_WINDSOR) + return; + + if (uiPointId) + StartNextDialogueText(NPC_WINDSOR); + } + + void WaypointReached(uint32 uiPointId) + { + switch(uiPointId) + { + case 2: + m_creature->SetStandState(UNIT_STAND_STATE_KNEEL); + break; + case 3: + m_creature->SetStandState(UNIT_STAND_STATE_STAND); + m_creature->SummonCreature(NPC_WINDSOR, aWindsorSpawnLoc[0], aWindsorSpawnLoc[1], aWindsorSpawnLoc[2], 0, TEMPSUMMON_DEAD_DESPAWN, 0); + break; + case 6: + DoScriptText(SAY_SIGNAL_SENT, m_creature); + m_creature->SetFacingTo(2.15f); + SetEscortPaused(true); + break; + } + } + + void JustDidDialogueStep(int32 iEntry) + { + switch(iEntry) + { + case NPC_WINDSOR_MOUNT: + { + if (Creature* pWindsor = m_creature->GetMap()->GetCreature(m_windsorGuid)) + { + pWindsor->Unmount(); + m_creature->SummonCreature(NPC_WINDSOR_MOUNT, pWindsor->GetPositionX() - 1.0f, pWindsor->GetPositionY() + 1.0f, pWindsor->GetPositionZ(), pWindsor->GetOrientation(), TEMPSUMMON_TIMED_DESPAWN, 30000); + } + break; + } + case SAY_DISMOUNT: + { + if (Creature* pHorse = m_creature->GetMap()->GetCreature(m_horseGuid)) + { + pHorse->SetWalk(false); + pHorse->GetMotionMaster()->MovePoint(1, aWindsorSpawnLoc[0], aWindsorSpawnLoc[1], aWindsorSpawnLoc[2]); + } + break; + } + case QUEST_STORMWIND_RENDEZVOUS: + { + Creature* pWindsor = m_creature->GetMap()->GetCreature(m_windsorGuid); + Player* pPlayer = GetPlayerForEscort(); + if (!pWindsor || !pPlayer) + break; + + pWindsor->SetFacingToObject(pPlayer); + break; + } + case QUEST_THE_GREAT_MASQUERADE: + { + Creature* pWindsor = m_creature->GetMap()->GetCreature(m_windsorGuid); + Player* pPlayer = GetPlayerForEscort(); + if (!pWindsor || !pPlayer) + break; + + DoScriptText(SAY_WELCOME, pWindsor, pPlayer); + // Allow players to finish quest and also finish the escort + pWindsor->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER); + SetEscortPaused(false); + break; + } + } + } + + Creature* GetSpeakerByEntry(uint32 uiEntry) + { + if (uiEntry == NPC_WINDSOR) + return m_creature->GetMap()->GetCreature(m_windsorGuid); + + return NULL; + } + + // Check if the event is already running + bool IsStormwindQuestActive() { return m_bIsEventInProgress; } + + void UpdateEscortAI(const uint32 uiDiff) { DialogueUpdate(uiDiff); } +}; + +CreatureAI* GetAI_npc_squire_rowe(Creature* pCreature) +{ + return new npc_squire_roweAI(pCreature); +} + +bool GossipHello_npc_squire_rowe(Player* pPlayer, Creature* pCreature) +{ + // Allow gossip if quest 6402 is completed but not yet rewarded or 6402 is rewarded but 6403 isn't yet completed + if ((pPlayer->GetQuestStatus(QUEST_STORMWIND_RENDEZVOUS) == QUEST_STATUS_COMPLETE && !pPlayer->GetQuestRewardStatus(QUEST_STORMWIND_RENDEZVOUS)) || + (pPlayer->GetQuestRewardStatus(QUEST_STORMWIND_RENDEZVOUS) && pPlayer->GetQuestStatus(QUEST_THE_GREAT_MASQUERADE) != QUEST_STATUS_COMPLETE)) + { + bool bIsEventInProgress = true; + + // Check if event is already in progress + if (npc_squire_roweAI* pRoweAI = dynamic_cast(pCreature->AI())) + bIsEventInProgress = pRoweAI->IsStormwindQuestActive(); + + // If event is already in progress, then inform the player to wait + if (bIsEventInProgress) + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXT_ID_PROGRESS, pCreature->GetObjectGuid()); + else + { + pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_WINDSOR, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXT_ID_START, pCreature->GetObjectGuid()); + } + } + else + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXT_ID_DEFAULT, pCreature->GetObjectGuid()); + + return true; + } + +bool GossipSelect_npc_squire_rowe(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + if (uiAction == GOSSIP_ACTION_INFO_DEF+1) + { + if (npc_squire_roweAI* pRoweAI = dynamic_cast(pCreature->AI())) + pRoweAI->Start(true, pPlayer, 0, true, false); + + pPlayer->CLOSE_GOSSIP_MENU(); + } + + return true; +} + void AddSC_stormwind_city() { Script* pNewScript; @@ -228,4 +440,11 @@ void AddSC_stormwind_city() pNewScript->pGossipHello = &GossipHello_npc_lady_katrana_prestor; pNewScript->pGossipSelect = &GossipSelect_npc_lady_katrana_prestor; pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_squire_rowe"; + pNewScript->GetAI = &GetAI_npc_squire_rowe; + pNewScript->pGossipHello = &GossipHello_npc_squire_rowe; + pNewScript->pGossipSelect = &GossipSelect_npc_squire_rowe; + pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 7cf2540d3..b7aded96e 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2600" + #define SD2_REVISION_NR "2601" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index cdb55d381..c3c76ef8b 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -1041,6 +1041,7 @@ UPDATE creature_template SET ScriptName='npc_kaya' WHERE entry=11856; UPDATE creature_template SET ScriptName='npc_bartleby' WHERE entry=6090; UPDATE creature_template SET ScriptName='npc_dashel_stonefist' WHERE entry=4961; UPDATE creature_template SET ScriptName='npc_lady_katrana_prestor' WHERE entry=1749; +UPDATE creature_template SET ScriptName='npc_squire_rowe' WHERE entry=17804; /* STRANGLETHORN VALE */ UPDATE creature_template SET ScriptName='mob_yenniku' WHERE entry=2530; diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 83f1200ba..ad7506541 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -883,7 +883,11 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1000818,'I now return to whence I came, only to find myself here once more to relive the same epic tragedy.',0,0,0,0,'Eris Havenfire SAY_EVENT_FAIL_2'), (-1000819,'The Scourge are upon us! Run! Run for your lives!',0,1,0,0,'Peasant SAY_PEASANT_APPEAR_1'), (-1000820,'Please help us! The Prince has gone mad!',0,1,0,0,'Peasant SAY_PEASANT_APPEAR_2'), -(-1000821,'Seek sanctuary in Hearthglen! It is our only hope!',0,1,0,0,'Peasant SAY_PEASANT_APPEAR_3'); +(-1000821,'Seek sanctuary in Hearthglen! It is our only hope!',0,1,0,0,'Peasant SAY_PEASANT_APPEAR_3'), + +(-1000822,'The signal has been sent. He should be arriving shortly.',0,0,0,1,'squire rowe SAY_SIGNAL_SENT'), +(-1000823,'Yawww!',0,0,0,35,'reginald windsor SAY_DISMOUNT'), +(-1000824,'I knew you would come, $N. It is good to see you again, friend.',0,0,0,1,'reginald windsor SAY_WELCOME'); -- -1 033 000 SHADOWFANG KEEP INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES @@ -4139,7 +4143,7 @@ INSERT INTO gossip_texts (entry,content_default,comment) VALUES (-3000103,'I am ready to travel to you village now.','rainspeaker GOSSIP_ITEM_READY'), (-3000104,'','mosswalker victim GOSSIP_ITEM_PULSE'), (-3000105,'Ezekiel said that you might have a certain book...','dirty larry GOSSIP_ITEM_BOOK'), -(-3000106,'REUSE ME','REUSE ME'), +(-3000106,'Let Marshal Windsor know that I am ready.','squire rowe GOSSIP_ITEM_WINDSOR'), (-3000107,'REUSE ME','REUSE ME'), (-3000108,'REUSE ME','REUSE ME'), (-3000109,'I am ready, Oronok. Let us destroy Cyrukh and free the elements!','oronok torn-heart GOSSIP_ITEM_FIGHT'); @@ -4185,7 +4189,6 @@ INSERT INTO gossip_texts (entry,content_default,comment) VALUES INSERT INTO gossip_texts (entry,content_default,comment) VALUES (-3564000,'We are ready to fight alongside you, Akama','akama(shade) GOSSIP_ITEM_START_ENCOUNTER'); - -- -3 595 000 CULLING OF STRATHOLME INSERT INTO gossip_texts (entry,content_default,comment) VALUES (-3595000,'What do you think they\'re up to?','chromie GOSSIP_ITEM_ENTRANCE_1'), @@ -6554,4 +6557,14 @@ INSERT INTO script_waypoint VALUES (22424, 81, -3504.23, 4080.47, 92.92, 7000, 'SPELL_TRANSFORM'), (22424, 82, -3504.23, 4080.47, 92.92, 20000, 'SAY_SKYWING_END'); +DELETE FROM script_waypoint WHERE entry=17804; +INSERT INTO script_waypoint VALUES +(17804, 0, -9054.86, 443.58, 93.05, 0, ''), +(17804, 1, -9079.33, 424.49, 92.52, 0, ''), +(17804, 2, -9086.21, 419.02, 92.32, 3000, ''), +(17804, 3, -9086.21, 419.02, 92.32, 1000, ''), +(17804, 4, -9079.33, 424.49, 92.52, 0, ''), +(17804, 5, -9054.38, 436.30, 93.05, 0, ''), +(17804, 6, -9042.23, 434.24, 93.37, 5000, 'SAY_SIGNAL_SENT'); + -- EOF diff --git a/sql/updates/r2601_mangos.sql b/sql/updates/r2601_mangos.sql new file mode 100644 index 000000000..f6f99233e --- /dev/null +++ b/sql/updates/r2601_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_squire_rowe' WHERE entry=17804; diff --git a/sql/updates/r2601_scriptdev2.sql b/sql/updates/r2601_scriptdev2.sql new file mode 100644 index 000000000..ab8d87891 --- /dev/null +++ b/sql/updates/r2601_scriptdev2.sql @@ -0,0 +1,17 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1000824 AND -1000822; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1000822,'The signal has been sent. He should be arriving shortly.',0,0,0,1,'squire rowe SAY_SIGNAL_SENT'), +(-1000823,'Yawww!',0,0,0,35,'reginald windsor SAY_DISMOUNT'), +(-1000824,'I knew you would come, $N. It is good to see you again, friend.',0,0,0,1,'reginald windsor SAY_WELCOME'); +DELETE FROM gossip_texts WHERE entry=-3000106; +INSERT INTO gossip_texts (entry,content_default,comment) VALUES +(-3000106,'Let Marshal Windsor know that I am ready.','squire rowe GOSSIP_ITEM_WINDSOR'); +DELETE FROM script_waypoint WHERE entry=17804; +INSERT INTO script_waypoint VALUES +(17804, 0, -9054.86, 443.58, 93.05, 0, ''), +(17804, 1, -9079.33, 424.49, 92.52, 0, ''), +(17804, 2, -9086.21, 419.02, 92.32, 3000, ''), +(17804, 3, -9086.21, 419.02, 92.32, 1000, ''), +(17804, 4, -9079.33, 424.49, 92.52, 0, ''), +(17804, 5, -9054.38, 436.30, 93.05, 0, ''), +(17804, 6, -9042.23, 434.24, 93.37, 5000, 'SAY_SIGNAL_SENT'); From 734b62e6f3fe2bbef41d1865533448e80e7fb5eb Mon Sep 17 00:00:00 2001 From: Xfurry Date: Wed, 27 Jun 2012 20:03:33 +0300 Subject: [PATCH 0590/1172] [2602] Add World Map includes placeholder Also fix a small typo --- VC100/100ScriptDev2.vcxproj | 1 + VC100/100ScriptDev2.vcxproj.filters | 3 +++ VC80/80ScriptDev2.vcproj | 4 ++++ VC90/90ScriptDev2.vcproj | 4 ++++ scripts/kalimdor/darkshore.cpp | 4 ++-- scripts/world/world_map_scripts.cpp | 1 + scripts/world/world_map_scripts.h | 8 ++++++++ sd2_revision_nr.h | 2 +- 8 files changed, 24 insertions(+), 3 deletions(-) create mode 100644 scripts/world/world_map_scripts.h diff --git a/VC100/100ScriptDev2.vcxproj b/VC100/100ScriptDev2.vcxproj index c79df32e1..0f93f12ab 100644 --- a/VC100/100ScriptDev2.vcxproj +++ b/VC100/100ScriptDev2.vcxproj @@ -778,6 +778,7 @@ + diff --git a/VC100/100ScriptDev2.vcxproj.filters b/VC100/100ScriptDev2.vcxproj.filters index 57233bb03..4f94d490a 100644 --- a/VC100/100ScriptDev2.vcxproj.filters +++ b/VC100/100ScriptDev2.vcxproj.filters @@ -1977,6 +1977,9 @@ scripts\outland\tempest_keep\the_mechanar + + scripts\world + include diff --git a/VC80/80ScriptDev2.vcproj b/VC80/80ScriptDev2.vcproj index 6b06193e7..6b19e41f6 100644 --- a/VC80/80ScriptDev2.vcproj +++ b/VC80/80ScriptDev2.vcproj @@ -2945,6 +2945,10 @@ RelativePath="..\scripts\world\world_map_scripts.cpp" > + + + + + * This program is free software licensed under GPL version 2 + * Please see the included DOCS/LICENSE.TXT for more information */ + +#ifndef DEF_WORLD_MAP_SCRIPTS_H +#define DEF_WORLD_MAP_SCRIPTS_H + +#endif diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index b7aded96e..fa4908a6f 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2601" + #define SD2_REVISION_NR "2602" #endif // __SD2_REVISION_NR_H__ From 46d42375e2b1c708a911fe5ebdf907a2fb1631d9 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Wed, 27 Jun 2012 22:18:30 +0300 Subject: [PATCH 0591/1172] [2603] Implement spawn support for quest 4740 Based on Schmoozerd's research --- scripts/world/areatrigger_scripts.cpp | 47 ++++++++++++++ scripts/world/world_map_scripts.cpp | 91 ++++++++++++++++++++++----- scripts/world/world_map_scripts.h | 30 +++++++++ sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 2 + sql/updates/r2603_mangos.sql | 2 + 6 files changed, 156 insertions(+), 18 deletions(-) create mode 100644 sql/updates/r2603_mangos.sql diff --git a/scripts/world/areatrigger_scripts.cpp b/scripts/world/areatrigger_scripts.cpp index f38aa8d55..8de5010e6 100644 --- a/scripts/world/areatrigger_scripts.cpp +++ b/scripts/world/areatrigger_scripts.cpp @@ -31,9 +31,11 @@ at_warsong_farms at_stormwright_shelf 5108 at_childrens_week_spot 3546,3547,3548,3552,3549,3550 at_scent_larkorwi 1726,1727,1728,1729,1730,1731,1732,1733,1734,1735,1736,1737,1738,1739,1740 +at_murkdeep 1966 EndContentData */ #include "precompiled.h" +#include "world_map_scripts.h" static uint32 TriggerOrphanSpell[6][3] = { @@ -281,6 +283,46 @@ bool AreaTrigger_at_scent_larkorwi(Player* pPlayer, AreaTriggerEntry const* pAt) return false; } +/*###### +## at_murkdeep +######*/ + +bool AreaTrigger_at_murkdeep(Player* pPlayer, AreaTriggerEntry const* pAt) +{ + // Handle Murkdeep event start + // The area trigger summons 3 Greymist Coastrunners; The rest of the event is handled by world map scripts + if (pPlayer->isAlive() && !pPlayer->isGameMaster() && pPlayer->GetQuestStatus(QUEST_WANTED_MURKDEEP) == QUEST_STATUS_INCOMPLETE) + { + ScriptedMap* pScriptedMap = (ScriptedMap*)pPlayer->GetInstanceData(); + if (!pScriptedMap) + return false; + + // If Murkdeep is already spawned, skip the rest + if (pScriptedMap->GetSingleCreatureFromStorage(NPC_MURKDEEP, true)) + return true; + + // Check if there are already coastrunners (dead or alive) around the area + if (GetClosestCreatureWithEntry(pPlayer, NPC_GREYMIST_COASTRUNNNER, 60.0f, false, false)) + return true; + + float fX, fY, fZ; + for (uint8 i = 0; i < 3; ++i) + { + // Spawn locations are defined in World Maps Scripts.h + pPlayer->GetRandomPoint(aSpawnLocations[POS_IDX_MURKDEEP_SPAWN][0], aSpawnLocations[POS_IDX_MURKDEEP_SPAWN][1], aSpawnLocations[POS_IDX_MURKDEEP_SPAWN][2], 5.0f, fX, fY, fZ); + + if (Creature* pTemp = pPlayer->SummonCreature(NPC_GREYMIST_COASTRUNNNER, fX, fY, fZ, aSpawnLocations[POS_IDX_MURKDEEP_SPAWN][3], TEMPSUMMON_DEAD_DESPAWN, 0)) + { + pTemp->SetWalk(false); + pTemp->GetRandomPoint(aSpawnLocations[POS_IDX_MURKDEEP_MOVE][0], aSpawnLocations[POS_IDX_MURKDEEP_MOVE][1], aSpawnLocations[POS_IDX_MURKDEEP_MOVE][2], 5.0f, fX, fY, fZ); + pTemp->GetMotionMaster()->MovePoint(0, fX, fY, fZ); + } + } + } + + return false; +} + void AddSC_areatrigger_scripts() { Script* pNewScript; @@ -334,4 +376,9 @@ void AddSC_areatrigger_scripts() pNewScript->Name = "at_scent_larkorwi"; pNewScript->pAreaTrigger = &AreaTrigger_at_scent_larkorwi; pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "at_murkdeep"; + pNewScript->pAreaTrigger = &AreaTrigger_at_murkdeep; + pNewScript->RegisterSelf(); } diff --git a/scripts/world/world_map_scripts.cpp b/scripts/world/world_map_scripts.cpp index ea4be31b0..eb25a75a2 100644 --- a/scripts/world/world_map_scripts.cpp +++ b/scripts/world/world_map_scripts.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: world_map_scripts -SD%Complete: 0 -SDComment: Quest support: 11538 +SD%Complete: 100 +SDComment: Quest support: 4740, 11538 SDCategory: World Map Scripts EndScriptData */ @@ -44,7 +44,77 @@ InstanceData* GetInstanceData_world_map_eastern_kingdoms(Map* pMap) */ struct MANGOS_DLL_DECL world_map_kalimdor : public ScriptedMap { - world_map_kalimdor(Map* pMap) : ScriptedMap(pMap) {} + world_map_kalimdor(Map* pMap) : ScriptedMap(pMap) { Initialize(); } + + uint8 m_uiMurkdeepAdds_KilledAddCount; + + void Initialize() + { + m_uiMurkdeepAdds_KilledAddCount = 0; + } + + void OnCreatureCreate(Creature* pCreature) + { + if (pCreature->GetEntry() == NPC_MURKDEEP) + m_mNpcEntryGuidStore[NPC_MURKDEEP] = pCreature->GetObjectGuid(); + } + + void OnCreatureDeath(Creature* pCreature) + { + switch (pCreature->GetEntry()) + { + case NPC_GREYMIST_COASTRUNNNER: + if (pCreature->IsTemporarySummon()) // Only count the ones summoned for Murkdeep quest + { + ++m_uiMurkdeepAdds_KilledAddCount; + + // If all 3 coastrunners are killed, summon 2 warriors + if (m_uiMurkdeepAdds_KilledAddCount == 3) + { + float fX, fY, fZ; + for (uint8 i = 0; i < 2; ++i) + { + pCreature->GetRandomPoint(aSpawnLocations[POS_IDX_MURKDEEP_SPAWN][0], aSpawnLocations[POS_IDX_MURKDEEP_SPAWN][1], aSpawnLocations[POS_IDX_MURKDEEP_SPAWN][2], 5.0f, fX, fY, fZ); + + if (Creature* pTemp = pCreature->SummonCreature(NPC_GREYMIST_WARRIOR, fX, fY, fZ, aSpawnLocations[POS_IDX_MURKDEEP_SPAWN][3], TEMPSUMMON_DEAD_DESPAWN, 0)) + { + pTemp->SetWalk(false); + pTemp->GetRandomPoint(aSpawnLocations[POS_IDX_MURKDEEP_MOVE][0], aSpawnLocations[POS_IDX_MURKDEEP_MOVE][1], aSpawnLocations[POS_IDX_MURKDEEP_MOVE][2], 5.0f, fX, fY, fZ); + pTemp->GetMotionMaster()->MovePoint(0, fX, fY, fZ); + } + } + + m_uiMurkdeepAdds_KilledAddCount = 0; + } + } + break; + case NPC_GREYMIST_WARRIOR: + if (pCreature->IsTemporarySummon()) // Only count the ones summoned for Murkdeep quest + { + ++m_uiMurkdeepAdds_KilledAddCount; + + // After the 2 warriors are killed, Murkdeep spawns, along with a hunter + if (m_uiMurkdeepAdds_KilledAddCount == 2) + { + float fX, fY, fZ; + for (uint8 i = 0; i < 2; ++i) + { + pCreature->GetRandomPoint(aSpawnLocations[POS_IDX_MURKDEEP_SPAWN][0], aSpawnLocations[POS_IDX_MURKDEEP_SPAWN][1], aSpawnLocations[POS_IDX_MURKDEEP_SPAWN][2], 5.0f, fX, fY, fZ); + + if (Creature* pTemp = pCreature->SummonCreature(!i ? NPC_MURKDEEP : NPC_GREYMIST_HUNTER, fX, fY, fZ, aSpawnLocations[POS_IDX_MURKDEEP_SPAWN][3], TEMPSUMMON_DEAD_DESPAWN, 0)) + { + pTemp->SetWalk(false); + pTemp->GetRandomPoint(aSpawnLocations[POS_IDX_MURKDEEP_MOVE][0], aSpawnLocations[POS_IDX_MURKDEEP_MOVE][1], aSpawnLocations[POS_IDX_MURKDEEP_MOVE][2], 5.0f, fX, fY, fZ); + pTemp->GetMotionMaster()->MovePoint(0, fX, fY, fZ); + } + } + + m_uiMurkdeepAdds_KilledAddCount = 0; + } + } + break; + } + } void SetData(uint32 uiType, uint32 uiData) {} }; @@ -57,19 +127,6 @@ InstanceData* GetInstanceData_world_map_kalimdor(Map* pMap) /* ********************************************************* * OUTLAND */ - -enum -{ - NPC_EMISSARY_OF_HATE = 25003, - NPC_IRESPEAKER = 24999, - NPC_UNLEASHED_HELLION = 25002, -}; - -static const float aSpawnLocations[1][4] = -{ - {12583.019531f, -6916.194336f, 4.601806f, 6.182446f} // Emissary of Hate, guesswork -}; - struct MANGOS_DLL_DECL world_map_outland : public ScriptedMap { world_map_outland(Map* pMap) : ScriptedMap(pMap) { Initialize(); } @@ -98,7 +155,7 @@ struct MANGOS_DLL_DECL world_map_outland : public ScriptedMap ++m_uiEmissaryOfHate_KilledAddCount; if (m_uiEmissaryOfHate_KilledAddCount == 6) { - pCreature->SummonCreature(NPC_EMISSARY_OF_HATE, aSpawnLocations[0][0], aSpawnLocations[0][1], aSpawnLocations[0][2], aSpawnLocations[0][3], TEMPSUMMON_DEAD_DESPAWN, 0); + pCreature->SummonCreature(NPC_EMISSARY_OF_HATE, aSpawnLocations[POS_IDX_EMISSARY_SPAWN][0], aSpawnLocations[POS_IDX_EMISSARY_SPAWN][1], aSpawnLocations[POS_IDX_EMISSARY_SPAWN][2], aSpawnLocations[POS_IDX_EMISSARY_SPAWN][3], TEMPSUMMON_DEAD_DESPAWN, 0); m_uiEmissaryOfHate_KilledAddCount = 0; } } diff --git a/scripts/world/world_map_scripts.h b/scripts/world/world_map_scripts.h index 5d052af8c..6b480679c 100644 --- a/scripts/world/world_map_scripts.h +++ b/scripts/world/world_map_scripts.h @@ -5,4 +5,34 @@ #ifndef DEF_WORLD_MAP_SCRIPTS_H #define DEF_WORLD_MAP_SCRIPTS_H +enum +{ + // Quest 4740 + NPC_GREYMIST_COASTRUNNNER = 2202, + NPC_GREYMIST_WARRIOR = 2205, + NPC_GREYMIST_HUNTER = 2206, + NPC_MURKDEEP = 10323, + QUEST_WANTED_MURKDEEP = 4740, + + // Quest 11538 + NPC_EMISSARY_OF_HATE = 25003, + NPC_IRESPEAKER = 24999, + NPC_UNLEASHED_HELLION = 25002, +}; + +enum SpawnIndexes +{ + POS_IDX_EMISSARY_SPAWN = 0, + POS_IDX_MURKDEEP_SPAWN = 1, + POS_IDX_MURKDEEP_MOVE = 2, + POS_IDX_MAX = 3 +}; + +static const float aSpawnLocations[POS_IDX_MAX][4] = +{ + {12583.019f, -6916.194f, 4.601f, 6.18f}, // Emissary of Hate, guesswork + {4981.031f, 597.955f, -1.361f, 4.82f}, // Murkdeep spawn, guesswork + {4988.970f, 547.002f, 5.379f, 0.0f}, // Murkdeep move, guesswork +}; + #endif diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index fa4908a6f..c9f7f202d 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2602" + #define SD2_REVISION_NR "2603" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index c3c76ef8b..abe4c554a 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -77,6 +77,8 @@ DELETE FROM scripted_areatrigger WHERE entry in (4288,4485); INSERT INTO scripted_areatrigger VALUES (4288,'at_dark_portal'), (4485,'at_dark_portal'); +DELETE FROM scripted_areatrigger WHERE entry=1966; +INSERT INTO scripted_areatrigger VALUES (1966,'at_murkdeep'); /* BATTLEGROUNDS */ diff --git a/sql/updates/r2603_mangos.sql b/sql/updates/r2603_mangos.sql new file mode 100644 index 000000000..8aa1f5b89 --- /dev/null +++ b/sql/updates/r2603_mangos.sql @@ -0,0 +1,2 @@ +DELETE FROM scripted_areatrigger WHERE entry=1966; +INSERT INTO scripted_areatrigger VALUES (1966,'at_murkdeep'); From 8cb5e93ae28ef5932ed6a5209911ad010a1e1de9 Mon Sep 17 00:00:00 2001 From: Chero Date: Wed, 27 Jun 2012 23:24:30 +0300 Subject: [PATCH 0592/1172] [2604] Implement script support for quest 6403 Signed-off-by: Xfurry --- scripts/eastern_kingdoms/stormwind_city.cpp | 624 +++++++++++++++++++- scripts/world/world_map_scripts.cpp | 13 + scripts/world/world_map_scripts.h | 7 + sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 + sql/scriptdev2_script_full.sql | 83 ++- sql/updates/r2604_mangos.sql | 1 + sql/updates/r2604_scriptdev2.sql | 82 +++ 8 files changed, 805 insertions(+), 8 deletions(-) create mode 100644 sql/updates/r2604_mangos.sql create mode 100644 sql/updates/r2604_scriptdev2.sql diff --git a/scripts/eastern_kingdoms/stormwind_city.cpp b/scripts/eastern_kingdoms/stormwind_city.cpp index 2dfd79ffd..80a5ffffa 100644 --- a/scripts/eastern_kingdoms/stormwind_city.cpp +++ b/scripts/eastern_kingdoms/stormwind_city.cpp @@ -17,7 +17,7 @@ /* ScriptData SDName: Stormwind_City SD%Complete: 100 -SDComment: Quest support: 1640, 1447, 4185, 6402. +SDComment: Quest support: 1640, 1447, 4185, 6402, 6403. SDCategory: Stormwind City EndScriptData */ @@ -26,9 +26,11 @@ npc_bartleby npc_dashel_stonefist npc_lady_katrana_prestor npc_squire_rowe +npc_reginald_windsor EndContentData */ #include "precompiled.h" +#include "../world/world_map_scripts.h" #include "escort_ai.h" /*###### @@ -225,7 +227,6 @@ enum GOSSIP_TEXT_ID_PROGRESS = 9064, GOSSIP_TEXT_ID_START = 9065, - NPC_WINDSOR = 12580, NPC_WINDSOR_MOUNT = 12581, QUEST_STORMWIND_RENDEZVOUS = 6402, @@ -289,7 +290,8 @@ struct MANGOS_DLL_DECL npc_squire_roweAI : public npc_escortAI, private Dialogue if (uiMotionType != POINT_MOTION_TYPE || !uiPointId || pSummoned->GetEntry() != NPC_WINDSOR) return; - if (uiPointId) + // Summoned npc has escort and this can trigger twice if escort state is not checked + if (uiPointId && HasEscortState(STATE_ESCORT_PAUSED)) StartNextDialogueText(NPC_WINDSOR); } @@ -302,7 +304,7 @@ struct MANGOS_DLL_DECL npc_squire_roweAI : public npc_escortAI, private Dialogue break; case 3: m_creature->SetStandState(UNIT_STAND_STATE_STAND); - m_creature->SummonCreature(NPC_WINDSOR, aWindsorSpawnLoc[0], aWindsorSpawnLoc[1], aWindsorSpawnLoc[2], 0, TEMPSUMMON_DEAD_DESPAWN, 0); + m_creature->SummonCreature(NPC_WINDSOR, aWindsorSpawnLoc[0], aWindsorSpawnLoc[1], aWindsorSpawnLoc[2], 0, TEMPSUMMON_CORPSE_DESPAWN, 0); break; case 6: DoScriptText(SAY_SIGNAL_SENT, m_creature); @@ -419,6 +421,610 @@ bool GossipSelect_npc_squire_rowe(Player* pPlayer, Creature* pCreature, uint32 u return true; } +/*###### +## npc_reginald_windsor +######*/ + +enum +{ + SAY_WINDSOR_QUEST_ACCEPT = -1000825, + SAY_WINDSOR_GET_READY = -1000826, + SAY_PRESTOR_SIEZE = -1000827, + + SAY_JON_DIALOGUE_1 = -1000828, + SAY_WINDSOR_DIALOGUE_2 = -1000829, + SAY_WINDSOR_DIALOGUE_3 = -1000830, + SAY_JON_DIALOGUE_4 = -1000832, + SAY_JON_DIALOGUE_5 = -1000833, + SAY_WINDSOR_DIALOGUE_6 = -1000834, + SAY_WINDSOR_DIALOGUE_7 = -1000835, + SAY_JON_DIALOGUE_8 = -1000836, + SAY_JON_DIALOGUE_9 = -1000837, + SAY_JON_DIALOGUE_10 = -1000838, + SAY_JON_DIALOGUE_11 = -1000839, + SAY_WINDSOR_DIALOGUE_12 = -1000840, + SAY_WINDSOR_DIALOGUE_13 = -1000841, + + SAY_WINDSOR_BEFORE_KEEP = -1000849, + SAY_WINDSOR_TO_KEEP = -1000850, + + SAY_WINDSOR_KEEP_1 = -1000851, + SAY_BOLVAR_KEEP_2 = -1000852, + SAY_WINDSOR_KEEP_3 = -1000853, + SAY_PRESTOR_KEEP_4 = -1000855, + SAY_PRESTOR_KEEP_5 = -1000856, + SAY_WINDSOR_KEEP_6 = -1000857, + SAY_WINDSOR_KEEP_7 = -1000859, + SAY_WINDSOR_KEEP_8 = -1000860, + SAY_PRESTOR_KEEP_9 = -1000863, + SAY_BOLVAR_KEEP_10 = -1000864, + SAY_PRESTOR_KEEP_11 = -1000865, + SAY_WINDSOR_KEEP_12 = -1000866, + SAY_PRESTOR_KEEP_13 = -1000867, + SAY_PRESTOR_KEEP_14 = -1000868, + SAY_BOLVAR_KEEP_15 = -1000869, + SAY_WINDSOR_KEEP_16 = -1000870, + + EMOTE_CONTEMPLATION = -1000831, + EMOTE_PRESTOR_LAUGH = -1000854, + EMOTE_WINDSOR_TABLETS = -1000858, + EMOTE_WINDSOR_READ = -1000861, + EMOTE_BOLVAR_GASP = -1000862, + EMOTE_WINDSOR_DIE = -1000871, + EMOTE_GUARD_TRANSFORM = -1000872, + + GOSSIP_ITEM_REGINALD = -3000107, + + GOSSIP_TEXT_ID_MASQUERADE = 5633, + + //SPELL_ONYXIA_TRANSFORM = 20409, // removed from DBC + SPELL_WINDSOR_READ = 20358, + SPELL_WINDSOR_DEATH = 20465, + SPELL_ONYXIA_DESPAWN = 20466, + + NPC_GUARD_ROYAL = 1756, + NPC_GUARD_CITY = 68, + NPC_GUARD_PATROLLER = 1976, + NPC_GUARD_ONYXIA = 12739, + NPC_LADY_ONYXIA = 12756, + + MAX_ROYAL_GUARDS = 6, + MAX_GUARD_SALUTES = 7, +}; + +static const float aGuardLocations[MAX_ROYAL_GUARDS][4] = +{ + {-8968.510f, 512.556f, 96.352f, 3.849f}, // guard right - left + {-8969.780f, 515.012f, 96.593f, 3.955f}, // guard right - middle + {-8972.410f, 518.228f, 96.594f, 4.281f}, // guard right - right + {-8965.170f, 508.565f, 96.352f, 3.825f}, // guard left - right + {-8962.960f, 506.583f, 96.593f, 3.802f}, // guard left - middle + {-8961.080f, 503.828f, 96.593f, 3.465f}, // guard left - left +}; + +static const float aMoveLocations[10][3] = + { + {-8967.960f, 510.008f, 96.351f}, // Jonathan move + {-8959.440f, 505.424f, 96.595f}, // Guard Left - Middle kneel + {-8957.670f, 507.056f, 96.595f}, // Guard Left - Right kneel + {-8970.680f, 519.252f, 96.595f}, // Guard Right - Middle kneel + {-8969.100f, 520.395f, 96.595f}, // Guard Right - Left kneel + {-8974.590f, 516.213f, 96.590f}, // Jonathan kneel + {-8505.770f, 338.312f, 120.886f}, // Wrynn safe + {-8448.690f, 337.074f, 121.330f}, // Bolvar help + {-8448.279f, 338.398f, 121.329f} // Bolvar kneel +}; + +static const DialogueEntry aMasqueradeDialogue[] = +{ + {SAY_WINDSOR_QUEST_ACCEPT, NPC_WINDSOR, 7000}, + {SAY_WINDSOR_GET_READY, NPC_WINDSOR, 6000}, + {SAY_PRESTOR_SIEZE, NPC_PRESTOR, 0}, + + {SAY_JON_DIALOGUE_1, NPC_JONATHAN, 5000}, + {SAY_WINDSOR_DIALOGUE_2, NPC_WINDSOR, 6000}, + {SAY_WINDSOR_DIALOGUE_3, NPC_WINDSOR, 5000}, + {EMOTE_CONTEMPLATION, NPC_JONATHAN, 3000}, + {SAY_JON_DIALOGUE_4, NPC_JONATHAN, 6000}, + {SAY_JON_DIALOGUE_5, NPC_JONATHAN, 7000}, + {SAY_WINDSOR_DIALOGUE_6, NPC_WINDSOR, 8000}, + {SAY_WINDSOR_DIALOGUE_7, NPC_WINDSOR, 6000}, + {SAY_JON_DIALOGUE_8, NPC_JONATHAN, 7000}, + {SAY_JON_DIALOGUE_9, NPC_JONATHAN, 6000}, + {SAY_JON_DIALOGUE_10, NPC_JONATHAN, 5000}, + {EMOTE_ONESHOT_SALUTE, 0, 4000}, + {SAY_JON_DIALOGUE_11, NPC_JONATHAN, 3000}, + {NPC_JONATHAN, 0, 2000}, + {EMOTE_ONESHOT_KNEEL, 0, 3000}, + {SAY_WINDSOR_DIALOGUE_12, NPC_WINDSOR, 5000}, + {SAY_WINDSOR_DIALOGUE_13, NPC_WINDSOR, 3000}, + {EMOTE_ONESHOT_POINT, 0, 3000}, + {NPC_WINDSOR, 0, 0}, + + {NPC_GUARD_ROYAL, 0, 3000}, + {SAY_WINDSOR_BEFORE_KEEP, NPC_WINDSOR, 0}, + {SAY_WINDSOR_TO_KEEP, NPC_WINDSOR, 4000}, + {NPC_GUARD_CITY, 0, 0}, + + {NPC_WRYNN, 0, 3000}, + {SAY_WINDSOR_KEEP_1, NPC_WINDSOR, 3000}, + {SAY_BOLVAR_KEEP_2, NPC_BOLVAR, 2000}, + {SAY_WINDSOR_KEEP_3, NPC_WINDSOR, 4000}, + {EMOTE_PRESTOR_LAUGH, NPC_PRESTOR, 4000}, + {SAY_PRESTOR_KEEP_4, NPC_PRESTOR, 9000}, + {SAY_PRESTOR_KEEP_5, NPC_PRESTOR, 7000}, + {SAY_WINDSOR_KEEP_6, NPC_WINDSOR, 6000}, + {EMOTE_WINDSOR_TABLETS, NPC_WINDSOR, 6000}, + {SAY_WINDSOR_KEEP_7, NPC_WINDSOR, 4000}, + {SAY_WINDSOR_KEEP_8, NPC_WINDSOR, 5000}, + {EMOTE_WINDSOR_READ, NPC_WINDSOR, 3000}, + {SPELL_WINDSOR_READ, 0, 10000}, + {EMOTE_BOLVAR_GASP, NPC_BOLVAR, 3000}, + {SAY_PRESTOR_KEEP_9, NPC_PRESTOR, 4000}, + {SAY_BOLVAR_KEEP_10, NPC_BOLVAR, 3000}, + {SAY_PRESTOR_KEEP_11, NPC_PRESTOR, 2000}, + {SPELL_WINDSOR_DEATH, 0, 1500}, + {SAY_WINDSOR_KEEP_12, NPC_WINDSOR, 4000}, + {SAY_PRESTOR_KEEP_14, NPC_PRESTOR, 0}, + + {NPC_GUARD_ONYXIA, 0, 14000}, + {NPC_BOLVAR, 0, 2000}, + {SAY_BOLVAR_KEEP_15, NPC_BOLVAR, 8000}, + {NPC_GUARD_PATROLLER, 0, 0}, + {0, 0, 0}, +}; + +static const int32 aGuardSalute[MAX_GUARD_SALUTES] = {-1000842, -1000843, -1000844, -1000845, -1000846, -1000847, -1000848}; + +struct MANGOS_DLL_DECL npc_reginald_windsorAI : public npc_escortAI, private DialogueHelper +{ + npc_reginald_windsorAI(Creature* m_creature) : npc_escortAI(m_creature), + DialogueHelper(aMasqueradeDialogue) + { + m_pScriptedMap = (ScriptedMap*)m_creature->GetInstanceData(); + InitializeDialogueHelper(m_pScriptedMap); + Reset(); + } + + ScriptedMap* m_pScriptedMap; + + uint32 m_uiGuardCheckTimer; + uint8 m_uiOnyxiaGuardCount; + + bool m_bIsKeepReady; + bool m_bCanGuardSalute; + + ObjectGuid m_playerGuid; + ObjectGuid m_guardsGuid[MAX_ROYAL_GUARDS]; + + GUIDList m_lRoyalGuardsGuidList; + GUIDSet m_sGuardsSalutedGuidSet; + + void Reset() + { + m_uiGuardCheckTimer = 0; + m_bIsKeepReady = false; + m_bCanGuardSalute = false; + } + + void MoveInLineOfSight(Unit* pWho) + { + // Note: this implementation is not the best; It should be better handled by the guard script + if (m_bCanGuardSalute && (pWho->GetEntry() == NPC_GUARD_CITY || pWho->GetEntry() == NPC_GUARD_ROYAL || + pWho->GetEntry() == NPC_GUARD_PATROLLER) && pWho->IsWithinDistInMap(m_creature, 15.0f) && + m_sGuardsSalutedGuidSet.find(pWho->GetObjectGuid()) == m_sGuardsSalutedGuidSet.end() && pWho->IsWithinLOSInMap(m_creature)) + { + DoScriptText(aGuardSalute[urand(0, MAX_GUARD_SALUTES - 1)], pWho); + m_sGuardsSalutedGuidSet.insert(pWho->GetObjectGuid()); + } + } + + void WaypointReached(uint32 uiPointId) + { + switch (uiPointId) + { + case 0: + if (!m_pScriptedMap) + break; + // Prepare Jonathan for the first event + if (Creature* pJonathan = m_pScriptedMap->GetSingleCreatureFromStorage(NPC_JONATHAN)) + { + // Summon 3 guards on each side and move Jonathan in the middle + for (uint8 i = 0; i < MAX_ROYAL_GUARDS; ++i) + { + if (Creature* pTemp = m_creature->SummonCreature(NPC_GUARD_ROYAL, aGuardLocations[i][0], aGuardLocations[i][1], aGuardLocations[i][2], aGuardLocations[i][3], TEMPSUMMON_TIMED_DESPAWN, 180000)) + m_guardsGuid[i] = pTemp->GetObjectGuid(); + } + + pJonathan->SetWalk(false); + pJonathan->Unmount(); + pJonathan->GetMotionMaster()->MovePoint(0, aMoveLocations[0][0], aMoveLocations[0][1], aMoveLocations[0][2]); + } + break; + case 1: + StartNextDialogueText(SAY_JON_DIALOGUE_1); + SetEscortPaused(true); + break; + case 3: + m_bCanGuardSalute = true; + break; + case 11: + if (!m_pScriptedMap) + break; + // We can reset Jonathan now + if (Creature* pJonathan = m_pScriptedMap->GetSingleCreatureFromStorage(NPC_JONATHAN)) + { + pJonathan->SetWalk(true); + pJonathan->SetStandState(UNIT_STAND_STATE_STAND); + pJonathan->GetMotionMaster()->MoveTargetedHome(); + } + break; + case 22: + SetEscortPaused(true); + m_creature->SetFacingTo(5.41f); + StartNextDialogueText(NPC_GUARD_ROYAL); + break; + case 24: + m_bCanGuardSalute = false; + break; + case 25: + StartNextDialogueText(NPC_WRYNN); + SetEscortPaused(true); + m_bCanGuardSalute = false; + break; + } + } + + void SummonedMovementInform(Creature* pSummoned, uint32 uiMotionType, uint32 uiPointId) + { + if (uiMotionType != POINT_MOTION_TYPE || !uiPointId || pSummoned->GetEntry() != NPC_GUARD_ROYAL) + return; + + // Handle city gates royal guards + switch (uiPointId) + { + case 1: + case 2: + pSummoned->SetFacingTo(2.234f); + pSummoned->SetStandState(UNIT_STAND_STATE_KNEEL); + break; + case 3: + case 4: + pSummoned->SetFacingTo(5.375f); + pSummoned->SetStandState(UNIT_STAND_STATE_KNEEL); + break; + } + } + + void JustDidDialogueStep(int32 iEntry) + { + if (!m_pScriptedMap) + return; + + switch(iEntry) + { + // Set orientation and prepare the npcs for the next event + case SAY_WINDSOR_GET_READY: + m_creature->SetFacingTo(0.6f); + break; + case SAY_PRESTOR_SIEZE: + if (Player* pPlayer = m_creature->GetMap()->GetPlayer(m_playerGuid)) + Start(false, pPlayer); + break; + case SAY_JON_DIALOGUE_8: + // Turn left and move the guards + if (Creature* pJonathan = m_pScriptedMap->GetSingleCreatureFromStorage(NPC_JONATHAN)) + pJonathan->SetFacingTo(5.375f); + if (Creature* pGuard = m_creature->GetMap()->GetCreature(m_guardsGuid[5])) + { + pGuard->SetFacingTo(2.234f); + pGuard->SetStandState(UNIT_STAND_STATE_KNEEL); + } + if (Creature* pGuard = m_creature->GetMap()->GetCreature(m_guardsGuid[4])) + pGuard->GetMotionMaster()->MovePoint(1, aMoveLocations[1][0], aMoveLocations[1][1], aMoveLocations[1][2]); + if (Creature* pGuard = m_creature->GetMap()->GetCreature(m_guardsGuid[3])) + pGuard->GetMotionMaster()->MovePoint(2, aMoveLocations[2][0], aMoveLocations[2][1], aMoveLocations[2][2]); + break; + case SAY_JON_DIALOGUE_9: + // Turn right and move the guards + if (Creature* pJonathan = m_pScriptedMap->GetSingleCreatureFromStorage(NPC_JONATHAN)) + pJonathan->SetFacingTo(2.234f); + if (Creature* pGuard = m_creature->GetMap()->GetCreature(m_guardsGuid[2])) + { + pGuard->SetFacingTo(5.375f); + pGuard->SetStandState(UNIT_STAND_STATE_KNEEL); + } + if (Creature* pGuard = m_creature->GetMap()->GetCreature(m_guardsGuid[1])) + pGuard->GetMotionMaster()->MovePoint(3, aMoveLocations[3][0], aMoveLocations[3][1], aMoveLocations[3][2]); + if (Creature* pGuard = m_creature->GetMap()->GetCreature(m_guardsGuid[0])) + pGuard->GetMotionMaster()->MovePoint(4, aMoveLocations[4][0], aMoveLocations[4][1], aMoveLocations[4][2]); + break; + case SAY_JON_DIALOGUE_10: + if (Creature* pJonathan = m_pScriptedMap->GetSingleCreatureFromStorage(NPC_JONATHAN)) + pJonathan->SetFacingToObject(m_creature); + break; + case EMOTE_ONESHOT_SALUTE: + if (Creature* pJonathan = m_pScriptedMap->GetSingleCreatureFromStorage(NPC_JONATHAN)) + pJonathan->HandleEmote(EMOTE_ONESHOT_SALUTE); + break; + case NPC_JONATHAN: + if (Creature* pJonathan = m_pScriptedMap->GetSingleCreatureFromStorage(NPC_JONATHAN)) + { + pJonathan->SetWalk(true); + pJonathan->GetMotionMaster()->MovePoint(0, aMoveLocations[5][0], aMoveLocations[5][1], aMoveLocations[5][2]); + } + break; + case EMOTE_ONESHOT_KNEEL: + if (Creature* pJonathan = m_pScriptedMap->GetSingleCreatureFromStorage(NPC_JONATHAN)) + { + pJonathan->SetFacingToObject(m_creature); + pJonathan->SetStandState(UNIT_STAND_STATE_KNEEL); + } + break; + case SAY_WINDSOR_DIALOGUE_12: + if (Creature* pJonathan = m_pScriptedMap->GetSingleCreatureFromStorage(NPC_JONATHAN)) + m_creature->SetFacingToObject(pJonathan); + break; + case SAY_WINDSOR_DIALOGUE_13: + m_creature->SetFacingTo(0.6f); + break; + case EMOTE_ONESHOT_POINT: + m_creature->HandleEmote(EMOTE_ONESHOT_POINT); + break; + case NPC_WINDSOR: + SetEscortPaused(false); + break; + case SAY_WINDSOR_BEFORE_KEEP: + m_bIsKeepReady = true; + m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); + break; + case NPC_GUARD_CITY: + SetEscortPaused(false); + break; + case NPC_WRYNN: + // Remove npc flags during the event + if (Creature* pOnyxia = m_pScriptedMap->GetSingleCreatureFromStorage(NPC_PRESTOR)) + pOnyxia->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP | UNIT_NPC_FLAG_QUESTGIVER); + if (Creature* pWrynn = m_pScriptedMap->GetSingleCreatureFromStorage(NPC_WRYNN)) + pWrynn->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER); + if (Creature* pBolvar = m_pScriptedMap->GetSingleCreatureFromStorage(NPC_BOLVAR)) + pBolvar->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER); + break; + case SAY_BOLVAR_KEEP_2: + if (Creature* pWrynn = m_pScriptedMap->GetSingleCreatureFromStorage(NPC_WRYNN)) + { + pWrynn->SetWalk(false); + pWrynn->ForcedDespawn(15000); + pWrynn->GetMotionMaster()->MovePoint(0, aMoveLocations[6][0], aMoveLocations[6][1], aMoveLocations[6][2]); + + // Store all the nearby guards, in order to transform them into Onyxia guards + std::list lGuardsList; + GetCreatureListWithEntryInGrid(lGuardsList, pWrynn, NPC_GUARD_ROYAL, 25.0f); + + for (std::list::const_iterator itr = lGuardsList.begin(); itr != lGuardsList.end(); ++itr) + m_lRoyalGuardsGuidList.push_back((*itr)->GetObjectGuid()); + } + break; + case SPELL_WINDSOR_READ: + DoCastSpellIfCan(m_creature, SPELL_WINDSOR_READ); + break; + case EMOTE_BOLVAR_GASP: + if (Creature* pOnyxia = m_pScriptedMap->GetSingleCreatureFromStorage(NPC_PRESTOR)) + { + pOnyxia->UpdateEntry(NPC_LADY_ONYXIA); + + if (Creature* pBolvar = m_pScriptedMap->GetSingleCreatureFromStorage(NPC_BOLVAR)) + pBolvar->SetFacingToObject(pOnyxia); + } + break; + case SAY_PRESTOR_KEEP_9: + if (Creature* pBolvar = m_pScriptedMap->GetSingleCreatureFromStorage(NPC_BOLVAR)) + { + pBolvar->SetWalk(false); + pBolvar->GetMotionMaster()->MovePoint(0, aMoveLocations[7][0], aMoveLocations[7][1], aMoveLocations[7][2]); + } + break; + case SAY_BOLVAR_KEEP_10: + if (Creature* pBolvar = m_pScriptedMap->GetSingleCreatureFromStorage(NPC_BOLVAR)) + { + if (Creature* pOnyxia = m_pScriptedMap->GetSingleCreatureFromStorage(NPC_PRESTOR)) + { + pBolvar->SetFacingToObject(pOnyxia); + DoScriptText(EMOTE_PRESTOR_LAUGH, pOnyxia); + } + } + break; + case SAY_PRESTOR_KEEP_11: + for (GUIDList::const_iterator itr = m_lRoyalGuardsGuidList.begin(); itr != m_lRoyalGuardsGuidList.end(); ++itr) + { + if (Creature* pGuard = m_creature->GetMap()->GetCreature(*itr)) + { + if (!pGuard->isAlive()) + continue; + + pGuard->UpdateEntry(NPC_GUARD_ONYXIA); + DoScriptText(EMOTE_GUARD_TRANSFORM, pGuard); + + if (Creature* pBolvar = m_pScriptedMap->GetSingleCreatureFromStorage(NPC_BOLVAR)) + pGuard->AI()->AttackStart(pBolvar); + } + } + m_uiGuardCheckTimer = 1000; + break; + case SPELL_WINDSOR_DEATH: + if (Creature* pOnyxia = m_pScriptedMap->GetSingleCreatureFromStorage(NPC_PRESTOR)) + pOnyxia->CastSpell(m_creature, SPELL_WINDSOR_DEATH, false); + break; + case SAY_WINDSOR_KEEP_12: + if (Creature* pOnyxia = m_pScriptedMap->GetSingleCreatureFromStorage(NPC_PRESTOR)) + DoScriptText(SAY_PRESTOR_KEEP_13, pOnyxia); + + // Fake death + m_creature->InterruptNonMeleeSpells(true); + m_creature->SetHealth(0); + m_creature->StopMoving(); + m_creature->ClearComboPointHolders(); + m_creature->RemoveAllAurasOnDeath(); + m_creature->ModifyAuraState(AURA_STATE_HEALTHLESS_20_PERCENT, false); + m_creature->ModifyAuraState(AURA_STATE_HEALTHLESS_35_PERCENT, false); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + m_creature->ClearAllReactives(); + m_creature->GetMotionMaster()->Clear(); + m_creature->GetMotionMaster()->MoveIdle(); + m_creature->SetStandState(UNIT_STAND_STATE_DEAD); + break; + case SAY_PRESTOR_KEEP_14: + if (Creature* pOnyxia = m_pScriptedMap->GetSingleCreatureFromStorage(NPC_PRESTOR)) + { + pOnyxia->ForcedDespawn(1000); + pOnyxia->HandleEmote(EMOTE_ONESHOT_LIFTOFF); + pOnyxia->CastSpell(pOnyxia, SPELL_ONYXIA_DESPAWN, false); + } + break; + case NPC_GUARD_ONYXIA: + if (Creature* pBolvar = m_pScriptedMap->GetSingleCreatureFromStorage(NPC_BOLVAR)) + pBolvar->GetMotionMaster()->MovePoint(0, aMoveLocations[7][0], aMoveLocations[7][1], aMoveLocations[7][2]); + break; + case NPC_BOLVAR: + if (Creature* pBolvar = m_pScriptedMap->GetSingleCreatureFromStorage(NPC_BOLVAR)) + { + pBolvar->SetWalk(true); + pBolvar->GetMotionMaster()->MovePoint(0, aMoveLocations[8][0], aMoveLocations[8][1], aMoveLocations[8][2]); + } + break; + case SAY_BOLVAR_KEEP_15: + if (Creature* pBolvar = m_pScriptedMap->GetSingleCreatureFromStorage(NPC_BOLVAR)) + pBolvar->SetStandState(UNIT_STAND_STATE_KNEEL); + + DoScriptText(SAY_WINDSOR_KEEP_16, m_creature); + DoScriptText(EMOTE_WINDSOR_DIE, m_creature); + + if (Player* pPlayer = m_creature->GetMap()->GetPlayer(m_playerGuid)) + pPlayer->GroupEventHappens(QUEST_THE_GREAT_MASQUERADE, m_creature); + break; + case NPC_GUARD_PATROLLER: + // Reset Bolvar and Wrynn + if (Creature* pBolvar = m_pScriptedMap->GetSingleCreatureFromStorage(NPC_BOLVAR)) + { + pBolvar->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER); + pBolvar->SetStandState(UNIT_STAND_STATE_STAND); + pBolvar->GetMotionMaster()->MoveTargetedHome(); + } + if (Creature* pWrynn = m_pScriptedMap->GetSingleCreatureFromStorage(NPC_WRYNN)) + { + pWrynn->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER); + pWrynn->Respawn(); + pWrynn->SetWalk(true); + pWrynn->GetMotionMaster()->MoveTargetedHome(); + } + // Onyxia will respawn by herself in about 30 min, so just reset flags + if (Creature* pOnyxia = m_pScriptedMap->GetSingleCreatureFromStorage(NPC_PRESTOR)) + pOnyxia->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP | UNIT_NPC_FLAG_QUESTGIVER); + // Allow creature to despawn + SetEscortPaused(false); + break; + } + } + + void DoStartKeepEvent() + { + StartNextDialogueText(SAY_WINDSOR_TO_KEEP); + m_creature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); + } + + void DoStartEscort(Player* pPlayer) + { + StartNextDialogueText(SAY_WINDSOR_QUEST_ACCEPT); + m_playerGuid = pPlayer->GetObjectGuid(); + } + + bool IsKeepEventReady() { return m_bIsKeepReady; } + + void UpdateEscortAI(const uint32 uiDiff) + { + DialogueUpdate(uiDiff); + + // Check if all Onyxia guards are dead + if (m_uiGuardCheckTimer) + { + if (m_uiGuardCheckTimer <= uiDiff) + { + uint8 uiDeadGuardsCount = 0; + for (GUIDList::const_iterator itr = m_lRoyalGuardsGuidList.begin(); itr != m_lRoyalGuardsGuidList.end(); ++itr) + { + if (Creature* pGuard = m_creature->GetMap()->GetCreature(*itr)) + { + if (!pGuard->isAlive() && pGuard->GetEntry() == NPC_GUARD_ONYXIA) + ++uiDeadGuardsCount; + } + } + if (uiDeadGuardsCount == m_lRoyalGuardsGuidList.size()) + { + StartNextDialogueText(NPC_GUARD_ONYXIA); + m_uiGuardCheckTimer = 0; + } + else + m_uiGuardCheckTimer = 1000; + } + else + m_uiGuardCheckTimer -= uiDiff; + } + } +}; + +CreatureAI* GetAI_npc_reginald_windsor(Creature* pCreature) +{ + return new npc_reginald_windsorAI(pCreature); +} + +bool QuestAccept_npc_reginald_windsor(Player* pPlayer, Creature* pCreature, const Quest* pQuest) +{ + if (pQuest->GetQuestId() == QUEST_THE_GREAT_MASQUERADE) + { + if (npc_reginald_windsorAI* pReginaldAI = dynamic_cast(pCreature->AI())) + pReginaldAI->DoStartEscort(pPlayer); + } + + return true; +} + +bool GossipHello_npc_reginald_windsor(Player* pPlayer, Creature* pCreature) +{ + bool bIsEventReady = false; + + if (npc_reginald_windsorAI* pReginaldAI = dynamic_cast(pCreature->AI())) + bIsEventReady = pReginaldAI->IsKeepEventReady(); + + // Check if event is possible and also check the status of the quests + if (bIsEventReady && pPlayer->GetQuestStatus(QUEST_THE_GREAT_MASQUERADE) != QUEST_STATUS_COMPLETE && pPlayer->GetQuestRewardStatus(QUEST_STORMWIND_RENDEZVOUS)) + { + pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_REGINALD, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXT_ID_MASQUERADE, pCreature->GetObjectGuid()); + } + else + { + if (pCreature->isQuestGiver()) + pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); + + pPlayer->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE, pCreature->GetObjectGuid()); + } + + return true; +} + +bool GossipSelect_npc_reginald_windsor(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + if (uiAction == GOSSIP_ACTION_INFO_DEF+1) + { + if (npc_reginald_windsorAI* pReginaldAI = dynamic_cast(pCreature->AI())) + pReginaldAI->DoStartKeepEvent(); + + pPlayer->CLOSE_GOSSIP_MENU(); + } + + return true; +} + void AddSC_stormwind_city() { Script* pNewScript; @@ -444,7 +1050,15 @@ void AddSC_stormwind_city() pNewScript = new Script; pNewScript->Name = "npc_squire_rowe"; pNewScript->GetAI = &GetAI_npc_squire_rowe; - pNewScript->pGossipHello = &GossipHello_npc_squire_rowe; + pNewScript->pGossipHello = &GossipHello_npc_squire_rowe; pNewScript->pGossipSelect = &GossipSelect_npc_squire_rowe; pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_reginald_windsor"; + pNewScript->GetAI = &GetAI_npc_reginald_windsor; + pNewScript->pQuestAcceptNPC = &QuestAccept_npc_reginald_windsor; + pNewScript->pGossipHello = &GossipHello_npc_reginald_windsor; + pNewScript->pGossipSelect = &GossipSelect_npc_reginald_windsor; + pNewScript->RegisterSelf(); } diff --git a/scripts/world/world_map_scripts.cpp b/scripts/world/world_map_scripts.cpp index eb25a75a2..8dd8a9929 100644 --- a/scripts/world/world_map_scripts.cpp +++ b/scripts/world/world_map_scripts.cpp @@ -31,6 +31,19 @@ struct MANGOS_DLL_DECL world_map_eastern_kingdoms : public ScriptedMap { world_map_eastern_kingdoms(Map* pMap) : ScriptedMap(pMap) {} + void OnCreatureCreate(Creature* pCreature) + { + switch (pCreature->GetEntry()) + { + case NPC_JONATHAN: + case NPC_WRYNN: + case NPC_BOLVAR: + case NPC_PRESTOR: + case NPC_WINDSOR: + m_mNpcEntryGuidStore[pCreature->GetEntry()] = pCreature->GetObjectGuid(); + } + } + void SetData(uint32 uiType, uint32 uiData) {} }; diff --git a/scripts/world/world_map_scripts.h b/scripts/world/world_map_scripts.h index 6b480679c..71bf4ecd5 100644 --- a/scripts/world/world_map_scripts.h +++ b/scripts/world/world_map_scripts.h @@ -14,6 +14,13 @@ enum NPC_MURKDEEP = 10323, QUEST_WANTED_MURKDEEP = 4740, + // Quest 6403 + NPC_JONATHAN = 466, + NPC_WRYNN = 1747, + NPC_BOLVAR = 1748, + NPC_PRESTOR = 1749, + NPC_WINDSOR = 12580, + // Quest 11538 NPC_EMISSARY_OF_HATE = 25003, NPC_IRESPEAKER = 24999, diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index c9f7f202d..ae855d259 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2603" + #define SD2_REVISION_NR "2604" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index abe4c554a..d1ebb6a20 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -1044,6 +1044,7 @@ UPDATE creature_template SET ScriptName='npc_bartleby' WHERE entry=6090; UPDATE creature_template SET ScriptName='npc_dashel_stonefist' WHERE entry=4961; UPDATE creature_template SET ScriptName='npc_lady_katrana_prestor' WHERE entry=1749; UPDATE creature_template SET ScriptName='npc_squire_rowe' WHERE entry=17804; +UPDATE creature_template SET ScriptName='npc_reginald_windsor' WHERE entry =12580; /* STRANGLETHORN VALE */ UPDATE creature_template SET ScriptName='mob_yenniku' WHERE entry=2530; diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index ad7506541..4b5d32caa 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -887,7 +887,56 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1000822,'The signal has been sent. He should be arriving shortly.',0,0,0,1,'squire rowe SAY_SIGNAL_SENT'), (-1000823,'Yawww!',0,0,0,35,'reginald windsor SAY_DISMOUNT'), -(-1000824,'I knew you would come, $N. It is good to see you again, friend.',0,0,0,1,'reginald windsor SAY_WELCOME'); +(-1000824,'I knew you would come, $N. It is good to see you again, friend.',0,0,0,1,'reginald windsor SAY_WELCOME'), + +(-1000825,'On guard, friend. The lady dragon will not give in without a fight.',0,0,0,1,'reginald windsor SAY_QUEST_ACCEPT'), +(-1000826,'As was fated a lifetime ago in Karazhan, monster - I come - and with me I bring justice.',0,6,0,22,'reginald windsor SAY_GET_READY'), +(-1000827,'Seize him! Seize the worthless criminal and his allies!',0,6,0,0,'prestor SAY_GONNA_DIE'), +(-1000828,'Reginald, you know that I cannot let you pass.',0,0,0,1,'jonathan SAY_DIALOG_1'), +(-1000829,'You must do what you think is right, Marcus. We served together under Turalyon. He made us both the men that we are today. Did he err with me? Do you truly believe my intent is to cause harm to our alliance? Would I shame our heroes?',0,0,0,1,'reginald windsor SAY_DIALOG_2'), +(-1000830,'Holding me here is not the right decision, Marcus.',0,0,0,1,'reginald windsor SAY_DIALOG_3'), +(-1000831,'%s appears lost in contemplation.',0,2,0,0,'jonathan EMOTE_CONTEMPLATION'), +(-1000832,'I am ashamed, old friend. I know not what I do anymore. It is not you that would dare bring shame to the heroes of legend - it is I. It is I and the rest of these corrupt politicians. They fill our lives with empty promises, unending lies.',0,0,0,1,'jonathan SAY_DIALOG_4'), +(-1000833,'We shame our ancestors. We shame those lost to us... forgive me, Reginald.',0,0,0,1,'jonathan SAY_DIALOG_5'), +(-1000834,'Dear friend, you honor them with your vigilant watch. You are steadfast in your allegiance. I do not doubt for a moment that you would not give as great a sacrifice for your people as any of the heroes you stand under.',0,0,0,1,'reginald windsor SAY_DIALOG_6'), +(-1000835,'Now, it is time to bring her reign to an end, Marcus. Stand down, friend.',0,0,0,1,'reginald windsor SAY_DIALOG_7'), +(-1000836,'Stand down! Can you not see that heroes walk among us?',0,0,0,5,'jonathan SAY_DIALOG_8'), +(-1000837,'Move aside! Let them pass!',0,0,0,5,'jonathan SAY_DIALOG_9'), +(-1000838,'Reginald Windsor is not to be harmed! He shall pass through untouched!',0,1,0,22,'jonathan SAY_DIALOG_10'), +(-1000839,'Go, Reginald. May the light guide your hand.',0,0,0,1,'jonathan SAY_DIALOG_11'), +(-1000840,'Thank you, old friend. You have done the right thing.',0,0,0,1,'reginald windsor SAY_DIALOG_12'), +(-1000841,'Follow me, friends. To Stormwind Keep!',0,0,0,0,'reginald windsor SAY_DIALOG_13'), +(-1000842,'Light be with you, sir.',0,0,0,66,'guard SAY_1'), +(-1000843,'We are but dirt beneath your feet, sir.',0,0,0,66,'guard SAY_2'), +(-1000844,'...nerves of thorium.',0,0,0,66,'guard SAY_3'), +(-1000845,'Make way!',0,0,0,66,'guard SAY_4'), +(-1000846,'A living legend...',0,0,0,66,'guard SAY_5'), +(-1000847,'A moment I shall remember for always.',0,0,0,66,'guard SAY_6'), +(-1000848,'You are an inspiration to us all, sir.',0,0,0,66,'guard SAY_7'), +(-1000849,'Be brave, friends. The reptile will thrash wildly. It is an act of desperation. When you are ready, give me the word.',0,0,0,25,'reginald windsor SAY_BEFORE_KEEP'), +(-1000850,'Onward!',0,0,0,5,'reginald windsor SAY_GO_TO_KEEP'), +(-1000851,'Majesty, run while you still can. She is not what you think her to be...',0,0,0,1,'reginald windsor SAY_IN_KEEP_1'), +(-1000852,'To the safe hall, your majesty.',0,0,0,1,'bolvar SAY_IN_KEEP_2'), +(-1000853,'The masquerade is over, Lady Prestor. Or should I call you by your true name... Onyxia...',0,0,0,25,'reginald windsor SAY_IN_KEEP_3'), +(-1000854,'%s laughs.',0,2,0,11,'prestor EMOTE_IN_KEEP_LAUGH'), +(-1000855,'You will be incarcerated and tried for treason, Windsor. I shall watch with glee as they hand down a guilty verdict and sentence you to death by hanging...',0,0,0,1,'prestor SAY_IN_KEEP_4'), +(-1000856,'And as your limp body dangles from the rafters, I shall take pleasure in knowing that a mad man has been put to death. After all, what proof do you have? Did you expect to come in here and point your fingers at royalty and leave unscathed?',0,0,0,6,'prestor SAY_IN_KEEP_5'), +(-1000857,'You will not escape your fate, Onyxia. It has been prophesied - a vision resonating from the great halls of Karazhan. It ends now...',0,0,0,1,'reginald windsor SAY_IN_KEEP_6'), +(-1000858,'%s reaches into his pack and pulls out the encoded tablets...',0,2,0,0,'reginald windsor EMOTE_IN_KEEP_REACH'), +(-1000859,'The Dark Irons thought these tablets to be encoded. This is not any form of coding, it is the tongue of ancient dragon.',0,0,0,1,'reginald windsor SAY_IN_KEEP_7'), +(-1000860,'Listen, dragon. Let the truth resonate throughout these halls.',0,0,0,1,'reginald windsor SAY_IN_KEEP_8'), +(-1000861,'%s reads from the tablets. Unknown, unheard sounds flow through your consciousness',0,2,0,0,'reginald windsor EMOTE_IN_KEEP_READ'), +(-1000862,'%s gasps.',0,2,0,0,'bolvar EMOTE_IN_KEEP_GASP'), +(-1000863,'Curious... Windsor, in this vision, did you survive? I only ask because one thing that I can and will assure is your death. Here and now.',0,0,0,1,'onyxia SAY_IN_KEEP_9'), +(-1000864,'Dragon filth! Guards! Guards! Seize this monster!',0,1,0,22,'bolvar SAY_IN_KEEP_1'), +(-1000865,'Yesss... Guards, come to your lord\'s aid!',0,0,0,1,'onyxia SAY_IN_KEEP_10'), +(-1000866,'DO NOT LET HER ESCAPE!',0,0,0,1,'reginald windsor SAY_IN_KEEP_11'), +(-1000867,'Was this fabled, Windsor? If it was death that you came for then the prophecy has been fulfilled. May your consciousness rot in the Twisting Nether. Finish the rest of these meddlesome insects, children. Bolvar, you have been a pleasureable puppet.',0,0,0,0,'onyxia SAY_IN_KEEP_12'), +(-1000868,'You have failed him, mortalsss... Farewell!',0,1,0,0,'onyxia SAY_IN_KEEP_12'), +(-1000869,'Reginald... I... I am sorry.',0,0,0,0,'bolvar SAY_IN_KEEP_13'), +(-1000870,'Bol... Bolvar... the medallion... use...',0,0,0,0,'reginald windsor SAY_IN_KEEP_14'), +(-1000871,'%s dies.',0,2,0,0,'reginald windsor EMOTE_IN_KEEP_DIE'), +(-1000872,'%s hisses',0,2,0,0,'reginald windsor EMOTE_GUARD_TRANSFORM'); -- -1 033 000 SHADOWFANG KEEP INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES @@ -4144,7 +4193,7 @@ INSERT INTO gossip_texts (entry,content_default,comment) VALUES (-3000104,'','mosswalker victim GOSSIP_ITEM_PULSE'), (-3000105,'Ezekiel said that you might have a certain book...','dirty larry GOSSIP_ITEM_BOOK'), (-3000106,'Let Marshal Windsor know that I am ready.','squire rowe GOSSIP_ITEM_WINDSOR'), -(-3000107,'REUSE ME','REUSE ME'), +(-3000107,'I am ready, as are my forces. Let us end this masquerade!','reginald windsor GOSSIP_ITEM_START'), (-3000108,'REUSE ME','REUSE ME'), (-3000109,'I am ready, Oronok. Let us destroy Cyrukh and free the elements!','oronok torn-heart GOSSIP_ITEM_FIGHT'); @@ -6567,4 +6616,34 @@ INSERT INTO script_waypoint VALUES (17804, 5, -9054.38, 436.30, 93.05, 0, ''), (17804, 6, -9042.23, 434.24, 93.37, 5000, 'SAY_SIGNAL_SENT'); +DELETE FROM script_waypoint WHERE entry=12580; +INSERT INTO script_waypoint VALUES +(12580, 0, -8997.63, 486.402, 96.622, 0, ''), +(12580, 1, -8971.08, 507.541, 96.349, 0, 'SAY_DIALOG_1'), +(12580, 2, -8953.17, 518.537, 96.355, 0, ''), +(12580, 3, -8936.33, 501.777, 94.066, 0, ''), +(12580, 4, -8922.52, 498.45, 93.869, 0, ''), +(12580, 5, -8907.64, 509.941, 93.840, 0, ''), +(12580, 6, -8925.26, 542.51, 94.274, 0, ''), +(12580, 7, -8832.28, 622.285, 93.686, 0, ''), +(12580, 8, -8824.8, 621.713, 94.084, 0, ''), +(12580, 9, -8796.46, 590.922, 97.466, 0, ''), +(12580, 10, -8769.85, 607.883, 97.118, 0, ''), +(12580, 11, -8737.14, 574.741, 97.398, 0, 'reset jonathan'), +(12580, 12, -8746.27, 563.446, 97.399, 0, ''), +(12580, 13, -8745.5, 557.877, 97.704, 0, ''), +(12580, 14, -8730.95, 541.477, 101.12, 0, ''), +(12580, 15, -8713.16, 520.692, 97.227, 0, ''), +(12580, 16, -8677.09, 549.614, 97.438, 0, ''), +(12580, 17, -8655.72, 552.732, 96.941, 0, ''), +(12580, 18, -8641.68, 540.516, 98.972, 0, ''), +(12580, 19, -8620.08, 520.120, 102.812, 0, ''), +(12580, 20, -8591.09, 492.553, 104.032, 0, ''), +(12580, 21, -8562.45, 463.583, 104.517, 0, ''), +(12580, 22, -8548.63, 467.38, 104.517, 0, 'SAY_WINDSOR_BEFORE_KEEP'), +(12580, 23, -8487.77, 391.44, 108.386, 0, ''), +(12580, 24, -8455.95, 351.225, 120.88, 0, ''), +(12580, 25, -8446.87, 339.904, 121.33, 0, 'SAY_WINDSOR_KEEP_1'), +(12580, 26, -8446.87, 339.904, 121.33, 10000, ''); + -- EOF diff --git a/sql/updates/r2604_mangos.sql b/sql/updates/r2604_mangos.sql new file mode 100644 index 000000000..8a830c20d --- /dev/null +++ b/sql/updates/r2604_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_reginald_windsor' WHERE entry =12580; diff --git a/sql/updates/r2604_scriptdev2.sql b/sql/updates/r2604_scriptdev2.sql new file mode 100644 index 000000000..396b8d435 --- /dev/null +++ b/sql/updates/r2604_scriptdev2.sql @@ -0,0 +1,82 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1000872 AND -1000825; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1000825,'On guard, friend. The lady dragon will not give in without a fight.',0,0,0,1,'reginald windsor SAY_QUEST_ACCEPT'), +(-1000826,'As was fated a lifetime ago in Karazhan, monster - I come - and with me I bring justice.',0,6,0,22,'reginald windsor SAY_GET_READY'), +(-1000827,'Seize him! Seize the worthless criminal and his allies!',0,6,0,0,'prestor SAY_GONNA_DIE'), +(-1000828,'Reginald, you know that I cannot let you pass.',0,0,0,1,'jonathan SAY_DIALOG_1'), +(-1000829,'You must do what you think is right, Marcus. We served together under Turalyon. He made us both the men that we are today. Did he err with me? Do you truly believe my intent is to cause harm to our alliance? Would I shame our heroes?',0,0,0,1,'reginald windsor SAY_DIALOG_2'), +(-1000830,'Holding me here is not the right decision, Marcus.',0,0,0,1,'reginald windsor SAY_DIALOG_3'), +(-1000831,'%s appears lost in contemplation.',0,2,0,0,'jonathan EMOTE_CONTEMPLATION'), +(-1000832,'I am ashamed, old friend. I know not what I do anymore. It is not you that would dare bring shame to the heroes of legend - it is I. It is I and the rest of these corrupt politicians. They fill our lives with empty promises, unending lies.',0,0,0,1,'jonathan SAY_DIALOG_4'), +(-1000833,'We shame our ancestors. We shame those lost to us... forgive me, Reginald.',0,0,0,1,'jonathan SAY_DIALOG_5'), +(-1000834,'Dear friend, you honor them with your vigilant watch. You are steadfast in your allegiance. I do not doubt for a moment that you would not give as great a sacrifice for your people as any of the heroes you stand under.',0,0,0,1,'reginald windsor SAY_DIALOG_6'), +(-1000835,'Now, it is time to bring her reign to an end, Marcus. Stand down, friend.',0,0,0,1,'reginald windsor SAY_DIALOG_7'), +(-1000836,'Stand down! Can you not see that heroes walk among us?',0,0,0,5,'jonathan SAY_DIALOG_8'), +(-1000837,'Move aside! Let them pass!',0,0,0,5,'jonathan SAY_DIALOG_9'), +(-1000838,'Reginald Windsor is not to be harmed! He shall pass through untouched!',0,1,0,22,'jonathan SAY_DIALOG_10'), +(-1000839,'Go, Reginald. May the light guide your hand.',0,0,0,1,'jonathan SAY_DIALOG_11'), +(-1000840,'Thank you, old friend. You have done the right thing.',0,0,0,1,'reginald windsor SAY_DIALOG_12'), +(-1000841,'Follow me, friends. To Stormwind Keep!',0,0,0,0,'reginald windsor SAY_DIALOG_13'), +(-1000842,'Light be with you, sir.',0,0,0,66,'guard SAY_1'), +(-1000843,'We are but dirt beneath your feet, sir.',0,0,0,66,'guard SAY_2'), +(-1000844,'...nerves of thorium.',0,0,0,66,'guard SAY_3'), +(-1000845,'Make way!',0,0,0,66,'guard SAY_4'), +(-1000846,'A living legend...',0,0,0,66,'guard SAY_5'), +(-1000847,'A moment I shall remember for always.',0,0,0,66,'guard SAY_6'), +(-1000848,'You are an inspiration to us all, sir.',0,0,0,66,'guard SAY_7'), +(-1000849,'Be brave, friends. The reptile will thrash wildly. It is an act of desperation. When you are ready, give me the word.',0,0,0,25,'reginald windsor SAY_BEFORE_KEEP'), +(-1000850,'Onward!',0,0,0,5,'reginald windsor SAY_GO_TO_KEEP'), +(-1000851,'Majesty, run while you still can. She is not what you think her to be...',0,0,0,1,'reginald windsor SAY_IN_KEEP_1'), +(-1000852,'To the safe hall, your majesty.',0,0,0,1,'bolvar SAY_IN_KEEP_2'), +(-1000853,'The masquerade is over, Lady Prestor. Or should I call you by your true name... Onyxia...',0,0,0,25,'reginald windsor SAY_IN_KEEP_3'), +(-1000854,'%s laughs.',0,2,0,11,'prestor EMOTE_IN_KEEP_LAUGH'), +(-1000855,'You will be incarcerated and tried for treason, Windsor. I shall watch with glee as they hand down a guilty verdict and sentence you to death by hanging...',0,0,0,1,'prestor SAY_IN_KEEP_4'), +(-1000856,'And as your limp body dangles from the rafters, I shall take pleasure in knowing that a mad man has been put to death. After all, what proof do you have? Did you expect to come in here and point your fingers at royalty and leave unscathed?',0,0,0,6,'prestor SAY_IN_KEEP_5'), +(-1000857,'You will not escape your fate, Onyxia. It has been prophesied - a vision resonating from the great halls of Karazhan. It ends now...',0,0,0,1,'reginald windsor SAY_IN_KEEP_6'), +(-1000858,'%s reaches into his pack and pulls out the encoded tablets...',0,2,0,0,'reginald windsor EMOTE_IN_KEEP_REACH'), +(-1000859,'The Dark Irons thought these tablets to be encoded. This is not any form of coding, it is the tongue of ancient dragon.',0,0,0,1,'reginald windsor SAY_IN_KEEP_7'), +(-1000860,'Listen, dragon. Let the truth resonate throughout these halls.',0,0,0,1,'reginald windsor SAY_IN_KEEP_8'), +(-1000861,'%s reads from the tablets. Unknown, unheard sounds flow through your consciousness',0,2,0,0,'reginald windsor EMOTE_IN_KEEP_READ'), +(-1000862,'%s gasps.',0,2,0,0,'bolvar EMOTE_IN_KEEP_GASP'), +(-1000863,'Curious... Windsor, in this vision, did you survive? I only ask because one thing that I can and will assure is your death. Here and now.',0,0,0,1,'onyxia SAY_IN_KEEP_9'), +(-1000864,'Dragon filth! Guards! Guards! Seize this monster!',0,1,0,22,'bolvar SAY_IN_KEEP_1'), +(-1000865,'Yesss... Guards, come to your lord\'s aid!',0,0,0,1,'onyxia SAY_IN_KEEP_10'), +(-1000866,'DO NOT LET HER ESCAPE!',0,0,0,1,'reginald windsor SAY_IN_KEEP_11'), +(-1000867,'Was this fabled, Windsor? If it was death that you came for then the prophecy has been fulfilled. May your consciousness rot in the Twisting Nether. Finish the rest of these meddlesome insects, children. Bolvar, you have been a pleasureable puppet.',0,0,0,0,'onyxia SAY_IN_KEEP_12'), +(-1000868,'You have failed him, mortalsss... Farewell!',0,1,0,0,'onyxia SAY_IN_KEEP_12'), +(-1000869,'Reginald... I... I am sorry.',0,0,0,0,'bolvar SAY_IN_KEEP_13'), +(-1000870,'Bol... Bolvar... the medallion... use...',0,0,0,0,'reginald windsor SAY_IN_KEEP_14'), +(-1000871,'%s dies.',0,2,0,0,'reginald windsor EMOTE_IN_KEEP_DIE'), +(-1000872,'%s hisses',0,2,0,0,'reginald windsor EMOTE_GUARD_TRANSFORM'); +DELETE FROM gossip_texts WHERE entry=-3000107; +INSERT INTO gossip_texts (entry,content_default,comment) VALUES +(-3000107,'I am ready, as are my forces. Let us end this masquerade!','reginald windsor GOSSIP_ITEM_START'); +DELETE FROM script_waypoint WHERE entry=12580; +INSERT INTO script_waypoint VALUES +(12580, 0, -8997.63, 486.402, 96.622, 0, ''), +(12580, 1, -8971.08, 507.541, 96.349, 0, 'SAY_DIALOG_1'), +(12580, 2, -8953.17, 518.537, 96.355, 0, ''), +(12580, 3, -8936.33, 501.777, 94.066, 0, ''), +(12580, 4, -8922.52, 498.45, 93.869, 0, ''), +(12580, 5, -8907.64, 509.941, 93.840, 0, ''), +(12580, 6, -8925.26, 542.51, 94.274, 0, ''), +(12580, 7, -8832.28, 622.285, 93.686, 0, ''), +(12580, 8, -8824.8, 621.713, 94.084, 0, ''), +(12580, 9, -8796.46, 590.922, 97.466, 0, ''), +(12580, 10, -8769.85, 607.883, 97.118, 0, ''), +(12580, 11, -8737.14, 574.741, 97.398, 0, 'reset jonathan'), +(12580, 12, -8746.27, 563.446, 97.399, 0, ''), +(12580, 13, -8745.5, 557.877, 97.704, 0, ''), +(12580, 14, -8730.95, 541.477, 101.12, 0, ''), +(12580, 15, -8713.16, 520.692, 97.227, 0, ''), +(12580, 16, -8677.09, 549.614, 97.438, 0, ''), +(12580, 17, -8655.72, 552.732, 96.941, 0, ''), +(12580, 18, -8641.68, 540.516, 98.972, 0, ''), +(12580, 19, -8620.08, 520.120, 102.812, 0, ''), +(12580, 20, -8591.09, 492.553, 104.032, 0, ''), +(12580, 21, -8562.45, 463.583, 104.517, 0, ''), +(12580, 22, -8548.63, 467.38, 104.517, 0, 'SAY_WINDSOR_BEFORE_KEEP'), +(12580, 23, -8487.77, 391.44, 108.386, 0, ''), +(12580, 24, -8455.95, 351.225, 120.88, 0, ''), +(12580, 25, -8446.87, 339.904, 121.33, 0, 'SAY_WINDSOR_KEEP_1'), +(12580, 26, -8446.87, 339.904, 121.33, 10000, ''); From 404b8a8f2b0abe7549de0c6cf7639a9d56cb7793 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Thu, 28 Jun 2012 23:54:05 +0300 Subject: [PATCH 0593/1172] [2605] Allow Ossirian to summon Crystals during the encounter Expects Mangos [12012] --- .../ruins_of_ahnqiraj/boss_ossirian.cpp | 19 +++++++++++++++++-- .../instance_ruins_of_ahnqiraj.cpp | 4 +++- sd2_revision_nr.h | 2 +- 3 files changed, 21 insertions(+), 4 deletions(-) diff --git a/scripts/kalimdor/ruins_of_ahnqiraj/boss_ossirian.cpp b/scripts/kalimdor/ruins_of_ahnqiraj/boss_ossirian.cpp index d61e91d8e..e23309949 100644 --- a/scripts/kalimdor/ruins_of_ahnqiraj/boss_ossirian.cpp +++ b/scripts/kalimdor/ruins_of_ahnqiraj/boss_ossirian.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: Boss_Ossirian -SD%Complete: 50% -SDComment: Tornados missing, Crystal handling missing, Weather missing +SD%Complete: 70% +SDComment: Tornados missing, Weather missing SDCategory: Ruins of Ahn'Qiraj EndScriptData */ @@ -40,6 +40,8 @@ enum SPELL_CYCLONE = 25189, SPELL_STOMP = 25188, SPELL_SUPREME = 25176, + SPELL_SUMMON_CRYSTAL = 25192, + SPELL_SAND_STORM = 25160, // tornado spell SPELL_SUMMON = 20477, // TODO NYI MAX_CRYSTAL_POSITIONS = 1, // TODO @@ -49,8 +51,11 @@ enum SPELL_WEAKNESS_NATURE = 25180, SPELL_WEAKNESS_ARCANE = 25181, SPELL_WEAKNESS_SHADOW = 25183, + + NPC_SAND_VORTEX = 15428, // tornado npc }; +static const float aCrystalSpawnPos[3] = {-9355.75f, 1905.43f, 85.55f}; static const uint32 aWeaknessSpell[] = {SPELL_WEAKNESS_FIRE, SPELL_WEAKNESS_FROST, SPELL_WEAKNESS_NATURE, SPELL_WEAKNESS_ARCANE, SPELL_WEAKNESS_SHADOW}; struct MANGOS_DLL_DECL boss_ossirianAI : public ScriptedAI @@ -115,6 +120,10 @@ struct MANGOS_DLL_DECL boss_ossirianAI : public ScriptedAI else { // Summon a new crystal trigger at some position depending on m_uiCrystalPosition + // Note: the summon points seem to be very random; requires additional research + float fX, fY, fZ; + m_creature->GetRandomPoint(aCrystalSpawnPos[0], aCrystalSpawnPos[1], aCrystalSpawnPos[2], 100.0f, fX, fY, fZ); + m_creature->SummonCreature(NPC_OSSIRIAN_TRIGGER, fX, fY, fZ, 0, TEMPSUMMON_CORPSE_DESPAWN, 0); } if (!pOssirianTrigger) return; @@ -127,6 +136,12 @@ struct MANGOS_DLL_DECL boss_ossirianAI : public ScriptedAI ++m_uiCrystalPosition %= MAX_CRYSTAL_POSITIONS; } + void JustSummoned(Creature* pSummoned) + { + if (pSummoned->GetEntry() == NPC_OSSIRIAN_TRIGGER) + pSummoned->CastSpell(pSummoned, SPELL_SUMMON_CRYSTAL, true); + } + void SpellHit(Unit* pCaster, const SpellEntry* pSpell) { if (pCaster->GetTypeId() == TYPEID_UNIT && pCaster->GetEntry() == NPC_OSSIRIAN_TRIGGER) diff --git a/scripts/kalimdor/ruins_of_ahnqiraj/instance_ruins_of_ahnqiraj.cpp b/scripts/kalimdor/ruins_of_ahnqiraj/instance_ruins_of_ahnqiraj.cpp index 728f567c4..c665ce4e3 100644 --- a/scripts/kalimdor/ruins_of_ahnqiraj/instance_ruins_of_ahnqiraj.cpp +++ b/scripts/kalimdor/ruins_of_ahnqiraj/instance_ruins_of_ahnqiraj.cpp @@ -45,7 +45,9 @@ void instance_ruins_of_ahnqiraj::OnCreatureCreate(Creature* pCreature) switch(pCreature->GetEntry()) { case NPC_OSSIRIAN_TRIGGER: - // Only store static spawned (if this can be checked, else use a bool) + // Only store static spawned + if (pCreature->IsTemporarySummon()) + break; case NPC_BURU: case NPC_OSSIRIAN: case NPC_GENERAL_ANDOROV: diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index ae855d259..02b9a26ce 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2604" + #define SD2_REVISION_NR "2605" #endif // __SD2_REVISION_NR_H__ From 30f07e5c1b2b06d961b76dfb32b5837eacfb3fb5 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Fri, 29 Jun 2012 10:38:58 +0300 Subject: [PATCH 0594/1172] [2606] Major cleanup and improvement for the Twin Emperors - AQ40 This will also implement yells and intro dialogue --- .../temple_of_ahnqiraj/boss_twinemperors.cpp | 722 ++++++------------ .../instance_temple_of_ahnqiraj.cpp | 48 ++ .../temple_of_ahnqiraj/temple_of_ahnqiraj.h | 19 + sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 2 + sql/scriptdev2_script_full.sql | 26 +- sql/updates/r2606_mangos.sql | 2 + sql/updates/r2606_scriptdev2.sql | 25 + 8 files changed, 365 insertions(+), 481 deletions(-) create mode 100644 sql/updates/r2606_mangos.sql create mode 100644 sql/updates/r2606_scriptdev2.sql diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_twinemperors.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_twinemperors.cpp index f0c2a3167..a817a5627 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/boss_twinemperors.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_twinemperors.cpp @@ -17,621 +17,385 @@ /* ScriptData SDName: Boss_Twinemperors SD%Complete: 95 -SDComment: +SDComment: Timers SDCategory: Temple of Ahn'Qiraj EndScriptData */ #include "precompiled.h" #include "temple_of_ahnqiraj.h" -#include "WorldPacket.h" -#include "Item.h" -#include "Spell.h" - -#define SPELL_HEAL_BROTHER 7393 -#define SPELL_TWIN_TELEPORT 800 // CTRA watches for this spell to start its teleport timer -#define SPELL_TWIN_TELEPORT_VISUAL 26638 // visual - -#define SPELL_EXPLODEBUG 804 -#define SPELL_MUTATE_BUG 802 - -#define SOUND_VN_DEATH 8660 //8660 - Death - Feel -#define SOUND_VN_AGGRO 8661 //8661 - Aggro - Let none -#define SOUND_VN_KILL 8662 //8661 - Kill - your fate - -#define SOUND_VL_AGGRO 8657 //8657 - Aggro - To Late -#define SOUND_VL_KILL 8658 //8658 - Kill - You will not -#define SOUND_VL_DEATH 8659 //8659 - Death - -#define PULL_RANGE 50 -#define ABUSE_BUG_RANGE 20 -#define SPELL_BERSERK 26662 -#define TELEPORTTIME 30000 - -#define SPELL_UPPERCUT 26007 -#define SPELL_UNBALANCING_STRIKE 26613 - -#define VEKLOR_DIST 20 // VL will not come to melee when attacking - -#define SPELL_SHADOWBOLT 26006 -#define SPELL_BLIZZARD 26607 -#define SPELL_ARCANEBURST 568 +enum +{ + // yells + SAY_VEKLOR_AGGRO_1 = -1531019, + SAY_VEKLOR_AGGRO_2 = -1531020, + SAY_VEKLOR_AGGRO_3 = -1531021, + SAY_VEKLOR_AGGRO_4 = -1531022, + SAY_VEKLOR_SLAY = -1531023, + SAY_VEKLOR_DEATH = -1531024, + SAY_VEKLOR_SPECIAL = -1531025, + + SAY_VEKNILASH_AGGRO_1 = -1531026, + SAY_VEKNILASH_AGGRO_2 = -1531027, + SAY_VEKNILASH_AGGRO_3 = -1531028, + SAY_VEKNILASH_AGGRO_4 = -1531029, + SAY_VEKNILASH_SLAY = -1531030, + SAY_VEKNILASH_DEATH = -1531031, + SAY_VEKNILASH_SPECIAL = -1531032, + + // common spells + SPELL_TWIN_TELEPORT = 799, + SPELL_TWIN_TELEPORT_STUN = 800, + SPELL_HEAL_BROTHER = 7393, + SPELL_TWIN_TELEPORT_VISUAL = 26638, + + // veklor spells + SPELL_ARCANE_BURST = 568, + SPELL_EXPLODE_BUG = 804, // targets 15316 or 15317 + SPELL_SHADOW_BOLT = 26006, + SPELL_BLIZZARD = 26607, + SPELL_FRENZY = 27897, + + // veknilash spells + SPELL_MUTATE_BUG = 802, // targets 15316 or 15317 + SPELL_UPPERCUT = 26007, + SPELL_UNBALANCING_STRIKE = 26613, + SPELL_BERSERK = 27680, +}; -struct MANGOS_DLL_DECL boss_twinemperorsAI : public ScriptedAI +struct MANGOS_DLL_DECL boss_twin_emperorsAI : public ScriptedAI { - ScriptedInstance* m_pInstance; - uint32 Heal_Timer; - uint32 Teleport_Timer; - bool AfterTeleport; - uint32 AfterTeleportTimer; - bool DontYellWhenDead; - uint32 Abuse_Bug_Timer, BugsTimer; - bool tspellcasted; - uint32 EnrageTimer; - - virtual bool IAmVeklor() = 0; - virtual void Reset() = 0; - virtual void CastSpellOnBug(Creature *target) = 0; - - boss_twinemperorsAI(Creature* pCreature) : ScriptedAI(pCreature) + boss_twin_emperorsAI(Creature* pCreature) : ScriptedAI(pCreature) { - m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_pInstance = (instance_temple_of_ahnqiraj*)pCreature->GetInstanceData(); + Reset(); } - void TwinReset() - { - Heal_Timer = 0; // first heal immediately when they get close together - Teleport_Timer = TELEPORTTIME; - AfterTeleport = false; - tspellcasted = false; - AfterTeleportTimer = 0; - Abuse_Bug_Timer = urand(10000, 17000); - BugsTimer = 2000; - m_creature->clearUnitState(UNIT_STAT_STUNNED); - DontYellWhenDead = false; - EnrageTimer = 15*60000; - } + instance_temple_of_ahnqiraj* m_pInstance; + + uint32 m_uiBerserkTimer; + uint32 m_uiBugAbilityTimer; + uint32 m_uiTeleportTimer; - Creature* GetOtherBoss() + void Reset() { - if (m_pInstance) - { - return m_pInstance->GetSingleCreatureFromStorage(IAmVeklor() ? NPC_VEKNILASH : NPC_VEKLOR); - } - else - { - return NULL; - } + m_uiTeleportTimer = 35000; + m_uiBugAbilityTimer = urand(7000, 14000); + m_uiBerserkTimer = 15*MINUTE*IN_MILLISECONDS; } - void DamageTaken(Unit *done_by, uint32 &damage) + // Workaround for the shared health pool + void DamageTaken(Unit* pDoneBy, uint32 &uiDamage) { - Creature *pOtherBoss = GetOtherBoss(); - if (pOtherBoss) + if (!m_pInstance) + return; + + if (Creature* pTwin = m_pInstance->GetSingleCreatureFromStorage(m_creature->GetEntry() == NPC_VEKLOR ? NPC_VEKLOR : NPC_VEKNILASH)) { - float dPercent = ((float)damage) / ((float)m_creature->GetMaxHealth()); - int odmg = (int)(dPercent * ((float)pOtherBoss->GetMaxHealth())); - int ohealth = pOtherBoss->GetHealth()-odmg; - pOtherBoss->SetHealth(ohealth > 0 ? ohealth : 0); - if (ohealth <= 0) + float fDamPercent = ((float)uiDamage) / ((float)m_creature->GetMaxHealth()); + uint32 uiTwinDamage = (uint32)(fDamPercent * ((float)pTwin->GetMaxHealth())); + uint32 uiTwinHealth = pTwin->GetHealth() - uiTwinDamage; + pTwin->SetHealth(uiTwinHealth > 0 ? uiTwinHealth : 0); + + if (!uiTwinHealth) { - pOtherBoss->SetDeathState(JUST_DIED); - pOtherBoss->SetUInt32Value(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE); + pTwin->SetDeathState(JUST_DIED); + pTwin->RemoveFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE); } } } - void JustDied(Unit* Killer) + void Aggro(Unit* pWho) { - if (Creature* pOtherBoss = GetOtherBoss()) - { - pOtherBoss->SetHealth(0); - pOtherBoss->SetDeathState(JUST_DIED); - pOtherBoss->SetUInt32Value(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE); - - if (boss_twinemperorsAI* pOtherAI = dynamic_cast(pOtherBoss->AI())) - pOtherAI->DontYellWhenDead = true; - } - - if (!DontYellWhenDead) // I hope AI is not threaded - DoPlaySoundToSet(m_creature, IAmVeklor() ? SOUND_VL_DEATH : SOUND_VN_DEATH); + if (m_pInstance) + m_pInstance->SetData(TYPE_TWINS, IN_PROGRESS); + } + void JustDied(Unit* pKiller) + { if (m_pInstance) m_pInstance->SetData(TYPE_TWINS, DONE); } - void KilledUnit(Unit* victim) + void JustReachedHome() { - DoPlaySoundToSet(m_creature, IAmVeklor() ? SOUND_VL_KILL : SOUND_VN_KILL); + if (m_pInstance) + m_pInstance->SetData(TYPE_TWINS, FAIL); } - void Aggro(Unit* pWho) + void SpellHit(Unit* pCaster, const SpellEntry* pSpell) { - Creature *pOtherBoss = GetOtherBoss(); - if (pOtherBoss) + if (pSpell->Id == SPELL_TWIN_TELEPORT) { - // TODO: we should activate the other boss location so he can start attackning even if nobody - // is near I dont know how to do that - if (!pOtherBoss->isInCombat()) - { - DoPlaySoundToSet(m_creature, IAmVeklor() ? SOUND_VL_AGGRO : SOUND_VN_AGGRO); - pOtherBoss->AI()->AttackStart(pWho); - } + DoTeleportAbility(); + DoResetThreat(); + DoCastSpellIfCan(m_creature, SPELL_TWIN_TELEPORT_STUN, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_TWIN_TELEPORT_VISUAL, CAST_TRIGGERED); } - - if (m_pInstance) - m_pInstance->SetData(TYPE_TWINS, IN_PROGRESS); } - void JustReachedHome() - { - if (m_pInstance) - m_pInstance->SetData(TYPE_TWINS, DONE); - } + // Return true, if succeeded + virtual void DoTeleportAbility() {} + virtual bool DoHandleBugAbility() = 0; + virtual bool DoHandleBerserk() = 0; + + // Return true to handle shared timers and MeleeAttack + virtual bool UpdateEmperorAI(const uint32 uiDiff) { return true; } - void SpellHit(Unit *caster, const SpellEntry *entry) + void UpdateAI(const uint32 uiDiff) { - if (caster == m_creature) + // Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - Creature *pOtherBoss = GetOtherBoss(); - if (entry->Id != SPELL_HEAL_BROTHER || !pOtherBoss) + // Call emperor specific virtual function + if (!UpdateEmperorAI(uiDiff)) return; - // add health so we keep same percentage for both brothers - uint32 mytotal = m_creature->GetMaxHealth(), histotal = pOtherBoss->GetMaxHealth(); - float mult = ((float)mytotal) / ((float)histotal); - if (mult < 1) - mult = 1.0f/mult; - #define HEAL_BROTHER_AMOUNT 30000.0f - uint32 largerAmount = (uint32)((HEAL_BROTHER_AMOUNT * mult) - HEAL_BROTHER_AMOUNT); - - if (mytotal > histotal) + if (m_uiTeleportTimer < uiDiff) { - uint32 h = m_creature->GetHealth()+largerAmount; - m_creature->SetHealth(std::min(mytotal, h)); + if (DoCastSpellIfCan(m_creature, SPELL_TWIN_TELEPORT) == CAST_OK) + m_uiTeleportTimer = 35000; } else + m_uiTeleportTimer -= uiDiff; + + if (m_uiBugAbilityTimer < uiDiff) { - uint32 h = pOtherBoss->GetHealth()+largerAmount; - pOtherBoss->SetHealth(std::min(histotal, h)); + if (DoHandleBugAbility()) + m_uiBugAbilityTimer = urand(10000, 17000); } - } - - void TryHealBrother(uint32 diff) - { - if (IAmVeklor()) // this spell heals caster and the other brother so let VN cast it - return; + else + m_uiBugAbilityTimer-= uiDiff; - if (Heal_Timer < diff) + if (m_uiBerserkTimer) { - Unit *pOtherBoss = GetOtherBoss(); - if (pOtherBoss && pOtherBoss->IsWithinDist(m_creature, 60.0f)) + if (m_uiBerserkTimer <= uiDiff) { - DoCastSpellIfCan(pOtherBoss, SPELL_HEAL_BROTHER); - Heal_Timer = 1000; + if (DoHandleBerserk()) + m_uiBerserkTimer = 0; } - } else Heal_Timer -= diff; + else + m_uiBerserkTimer -= uiDiff; + } } +}; - Unit *GetAnyoneCloseEnough(float dist, bool totallyRandom) - { - int cnt = 0; - std::list candidates; +struct MANGOS_DLL_DECL boss_veknilashAI : public boss_twin_emperorsAI +{ + boss_veknilashAI(Creature* pCreature) : boss_twin_emperorsAI(pCreature) { Reset(); } - ThreatList const& tList = m_creature->getThreatManager().getThreatList(); - for (ThreatList::const_iterator i = tList.begin();i != tList.end(); ++i) - { - Unit* pUnit = m_creature->GetMap()->GetUnit((*i)->getUnitGuid()); + uint32 m_uiUppercutTimer; + uint32 m_uiUnbalancingStrikeTimer; - if (m_creature->GetCombatDistance(pUnit) < dist) - { - if (!totallyRandom) - return pUnit; - candidates.push_back((*i)); - ++cnt; - } - } - if (!cnt) - return NULL; - for (int randomi = rand() % cnt; randomi > 0; randomi --) - candidates.pop_front(); - - Unit *ret = m_creature->GetMap()->GetUnit(candidates.front()->getUnitGuid()); - candidates.clear(); - return ret; - } - - Unit *PickNearestPlayer() + void Reset() { - Unit *nearp = NULL; - float neardist = 0.0f; - ThreatList const& tList = m_creature->getThreatManager().getThreatList(); - for (ThreatList::const_iterator i = tList.begin();i != tList.end(); ++i) - { - Unit* pUnit = m_creature->GetMap()->GetUnit((*i)->getUnitGuid()); - - if (!pUnit) - continue; + boss_twin_emperorsAI::Reset(); - float pudist = pUnit->GetDistance((const Creature *)m_creature); - if (!nearp || (neardist > pudist)) - { - nearp = pUnit; - neardist = pudist; - } - } - return nearp; + m_uiUppercutTimer = urand(14000, 29000); + m_uiUnbalancingStrikeTimer = urand(8000, 18000); } - void TeleportToMyBrother() + void MoveInLineOfSight(Unit* pWho) { - if (!m_pInstance) - return; + if (m_pInstance && m_pInstance->GetData(TYPE_TWINS) == IN_PROGRESS && pWho->GetEntry() == NPC_VEKLOR && pWho->IsWithinDistInMap(m_creature, 60.0f)) + DoCastSpellIfCan(pWho, SPELL_HEAL_BROTHER); - Teleport_Timer = TELEPORTTIME; + ScriptedAI::MoveInLineOfSight(pWho); + } - if (IAmVeklor()) - return; // mechanics handled by veknilash so they teleport exactly at the same time and to correct coordinates + void Aggro(Unit* pWho) + { + boss_twin_emperorsAI::Aggro(pWho); - Creature *pOtherBoss = GetOtherBoss(); - if (pOtherBoss) + switch(urand(0, 3)) { - //m_creature->MonsterYell("Teleporting ...", LANG_UNIVERSAL); - float other_x = pOtherBoss->GetPositionX(); - float other_y = pOtherBoss->GetPositionY(); - float other_z = pOtherBoss->GetPositionZ(); - float other_o = pOtherBoss->GetOrientation(); - - Map *thismap = m_creature->GetMap(); - thismap->CreatureRelocation(pOtherBoss, m_creature->GetPositionX(), - m_creature->GetPositionY(), m_creature->GetPositionZ(), m_creature->GetOrientation()); - thismap->CreatureRelocation(m_creature, other_x, other_y, other_z, other_o); - - SetAfterTeleport(); - - if (boss_twinemperorsAI* pOtherAI = dynamic_cast(pOtherBoss->AI())) - pOtherAI->SetAfterTeleport(); + case 0: DoScriptText(SAY_VEKNILASH_AGGRO_1, m_creature); break; + case 1: DoScriptText(SAY_VEKNILASH_AGGRO_2, m_creature); break; + case 2: DoScriptText(SAY_VEKNILASH_AGGRO_3, m_creature); break; + case 3: DoScriptText(SAY_VEKNILASH_AGGRO_4, m_creature); break; } } - void SetAfterTeleport() + void KilledUnit(Unit* pVictim) { - m_creature->InterruptNonMeleeSpells(false); - DoStopAttack(); - DoResetThreat(); - DoCastSpellIfCan(m_creature, SPELL_TWIN_TELEPORT_VISUAL); - m_creature->addUnitState(UNIT_STAT_STUNNED); - AfterTeleport = true; - AfterTeleportTimer = 2000; - tspellcasted = false; + DoScriptText(SAY_VEKNILASH_SLAY, m_creature); } - bool TryActivateAfterTTelep(uint32 diff) + void JustDied(Unit* pKiller) { - if (AfterTeleport) - { - if (!tspellcasted) - { - m_creature->clearUnitState(UNIT_STAT_STUNNED); - DoCastSpellIfCan(m_creature, SPELL_TWIN_TELEPORT); - m_creature->addUnitState(UNIT_STAT_STUNNED); - } - - tspellcasted = true; + boss_twin_emperorsAI::JustDied(pKiller); - if (AfterTeleportTimer < diff) - { - AfterTeleport = false; - m_creature->clearUnitState(UNIT_STAT_STUNNED); - Unit *nearu = PickNearestPlayer(); - //DoYell(nearu->GetName(), LANG_UNIVERSAL, 0); - AttackStart(nearu); - m_creature->getThreatManager().addThreat(nearu, 10000); - return true; - } - else - { - AfterTeleportTimer -= diff; - // update important timers which would otherwise get skipped - if (EnrageTimer > diff) - EnrageTimer -= diff; - else - EnrageTimer = 0; - if (Teleport_Timer > diff) - Teleport_Timer -= diff; - else - Teleport_Timer = 0; - return false; - } - } - else - { - return true; - } + DoScriptText(SAY_VEKNILASH_DEATH, m_creature); } - void MoveInLineOfSight(Unit *who) + bool DoHandleBugAbility() { - if (!who || m_creature->getVictim()) - return; + if (DoCastSpellIfCan(m_creature, SPELL_MUTATE_BUG) == CAST_OK) + return true; - if (who->isTargetableForAttack() && who->isInAccessablePlaceFor(m_creature) && m_creature->IsHostileTo(who)) - { - float attackRadius = m_creature->GetAttackDistance(who); - if (attackRadius < PULL_RANGE) - attackRadius = PULL_RANGE; - if (m_creature->IsWithinDistInMap(who, attackRadius) && m_creature->GetDistanceZ(who) <= /*CREATURE_Z_ATTACK_RANGE*/7 /*there are stairs*/) - { - if (who->HasStealthAura()) - who->RemoveSpellsCausingAura(SPELL_AURA_MOD_STEALTH); - AttackStart(who); - } - } + return false; } - Creature *RespawnNearbyBugsAndGetOne() + bool DoHandleBerserk() { - std::list lUnitList; - GetCreatureListWithEntryInGrid(lUnitList,m_creature,15316,150.0f); - GetCreatureListWithEntryInGrid(lUnitList,m_creature,15317,150.0f); + if (DoCastSpellIfCan(m_creature, SPELL_BERSERK) == CAST_OK) + return true; - if (lUnitList.empty()) - return NULL; + return false; + } - Creature *nearb = NULL; + // Only Vek'nilash handles the teleport for both of them + void DoTeleportAbility() + { + if (!m_pInstance) + return; - for(std::list::iterator iter = lUnitList.begin(); iter != lUnitList.end(); ++iter) + if (Creature* pVeklor = m_pInstance->GetSingleCreatureFromStorage(NPC_VEKLOR)) { - Creature *c = (Creature *)(*iter); - if (c->isDead()) - { - c->Respawn(); - c->setFaction(7); - c->RemoveAllAuras(); - } - if (c->IsWithinDistInMap(m_creature, ABUSE_BUG_RANGE)) - { - if (!nearb || !urand(0, 3)) - nearb = c; - } + float fTargetX, fTargetY, fTargetZ, fTargetOrient; + pVeklor->GetPosition(fTargetX, fTargetY, fTargetZ); + fTargetOrient = pVeklor->GetOrientation(); + + pVeklor->NearTeleportTo(m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), m_creature->GetOrientation(), true); + m_creature->NearTeleportTo(fTargetX, fTargetY, fTargetZ, fTargetOrient, true); } - return nearb; } - void HandleBugs(uint32 diff) + bool UpdateEmperorAI(const uint32 uiDiff) { - if (BugsTimer < diff || Abuse_Bug_Timer < diff) + if (m_uiUnbalancingStrikeTimer < uiDiff) { - Creature *c = RespawnNearbyBugsAndGetOne(); - if (Abuse_Bug_Timer < diff) - { - if (c) - { - CastSpellOnBug(c); - Abuse_Bug_Timer = urand(10000, 17000); - } - else - { - Abuse_Bug_Timer = 1000; - } - } - else - { - Abuse_Bug_Timer -= diff; - } - BugsTimer = 2000; + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_UNBALANCING_STRIKE) == CAST_OK) + m_uiUnbalancingStrikeTimer = urand(8000, 20000); } else - { - BugsTimer -= diff; - Abuse_Bug_Timer -= diff; - } - } + m_uiUnbalancingStrikeTimer -= uiDiff; - void CheckEnrage(uint32 diff) - { - if (EnrageTimer < diff) + if (m_uiUppercutTimer < uiDiff) { - if (!m_creature->IsNonMeleeSpellCasted(true)) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0, SPELL_UPPERCUT, SELECT_FLAG_IN_MELEE_RANGE)) { - DoCastSpellIfCan(m_creature, SPELL_BERSERK); - EnrageTimer = 60*60000; - } else EnrageTimer = 0; - } else EnrageTimer-=diff; + if (DoCastSpellIfCan(pTarget, SPELL_UPPERCUT) == CAST_OK) + m_uiUppercutTimer = urand(15000, 30000); + } + } + else + m_uiUppercutTimer -= uiDiff; + + DoMeleeAttackIfReady(); + + return true; } }; -struct MANGOS_DLL_DECL boss_veknilashAI : public boss_twinemperorsAI +struct MANGOS_DLL_DECL boss_veklorAI : public boss_twin_emperorsAI { - bool IAmVeklor() {return false;} - boss_veknilashAI(Creature* pCreature) : boss_twinemperorsAI(pCreature) - { - Reset(); - } - - uint32 UpperCut_Timer; - uint32 UnbalancingStrike_Timer; - uint32 Scarabs_Timer; - int Rand; - int RandX; - int RandY; + boss_veklorAI(Creature* pCreature) : boss_twin_emperorsAI(pCreature) { Reset(); } - Creature* Summoned; + uint32 m_uiShadowBoltTimer; + uint32 m_uiBlizzardTimer; + uint32 m_uiArcaneBurstTimer; void Reset() { - TwinReset(); - UpperCut_Timer = urand(14000, 29000); - UnbalancingStrike_Timer = urand(8000, 18000); - Scarabs_Timer = urand(7000, 14000); + boss_twin_emperorsAI::Reset(); - //Added. Can be removed if its included in DB. - m_creature->ApplySpellImmune(0, IMMUNITY_DAMAGE, SPELL_SCHOOL_MASK_MAGIC, true); + m_uiShadowBoltTimer = 1000; + m_uiBlizzardTimer = urand(15000, 20000); + m_uiArcaneBurstTimer = 1000; } - void CastSpellOnBug(Creature *target) + void MoveInLineOfSight(Unit* pWho) { - target->setFaction(14); + if (m_pInstance && m_pInstance->GetData(TYPE_TWINS) == IN_PROGRESS && pWho->GetEntry() == NPC_VEKNILASH && pWho->IsWithinDistInMap(m_creature, 60.0f)) + DoCastSpellIfCan(pWho, SPELL_HEAL_BROTHER); - DoCastSpellIfCan(target, SPELL_MUTATE_BUG, CAST_TRIGGERED); + ScriptedAI::MoveInLineOfSight(pWho); } - void UpdateAI(const uint32 diff) + void Aggro(Unit* pWho) { - //Return since we have no target - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - if (!TryActivateAfterTTelep(diff)) - return; + boss_twin_emperorsAI::Aggro(pWho); - //UnbalancingStrike_Timer - if (UnbalancingStrike_Timer < diff) + switch(urand(0, 3)) { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_UNBALANCING_STRIKE); - UnbalancingStrike_Timer = urand(8000, 20000); - }else UnbalancingStrike_Timer -= diff; - - if (UpperCut_Timer < diff) - { - Unit* randomMelee = GetAnyoneCloseEnough(2*ATTACK_DISTANCE, true); - if (randomMelee) - DoCastSpellIfCan(randomMelee,SPELL_UPPERCUT); - UpperCut_Timer = urand(15000, 30000); - }else UpperCut_Timer -= diff; - - HandleBugs(diff); - - //Heal brother when 60yrds close - TryHealBrother(diff); - - //Teleporting to brother - if (Teleport_Timer < diff) - { - TeleportToMyBrother(); - }else Teleport_Timer -= diff; - - CheckEnrage(diff); - - DoMeleeAttackIfReady(); + case 0: DoScriptText(SAY_VEKLOR_AGGRO_1, m_creature); break; + case 1: DoScriptText(SAY_VEKLOR_AGGRO_2, m_creature); break; + case 2: DoScriptText(SAY_VEKLOR_AGGRO_3, m_creature); break; + case 3: DoScriptText(SAY_VEKLOR_AGGRO_4, m_creature); break; + } } -}; -struct MANGOS_DLL_DECL boss_veklorAI : public boss_twinemperorsAI -{ - bool IAmVeklor() {return true;} - boss_veklorAI(Creature* pCreature) : boss_twinemperorsAI(pCreature) + void KilledUnit(Unit* pVictim) { - Reset(); + DoScriptText(SAY_VEKLOR_SLAY, m_creature); } - uint32 ShadowBolt_Timer; - uint32 Blizzard_Timer; - uint32 ArcaneBurst_Timer; - uint32 Scorpions_Timer; - int Rand; - int RandX; - int RandY; + void JustDied(Unit* pKiller) + { + boss_twin_emperorsAI::JustDied(pKiller); - Creature* Summoned; + DoScriptText(SAY_VEKLOR_DEATH, m_creature); + } - void Reset() + void AttackStart(Unit* pWho) { - TwinReset(); - ShadowBolt_Timer = 0; - Blizzard_Timer = urand(15000, 20000); - ArcaneBurst_Timer = 1000; - Scorpions_Timer = urand(7000, 14000); - - //Added. Can be removed if its included in DB. - m_creature->ApplySpellImmune(0, IMMUNITY_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, true); - m_creature->SetBaseWeaponDamage(BASE_ATTACK, MINDAMAGE, 0); - m_creature->SetBaseWeaponDamage(BASE_ATTACK, MAXDAMAGE, 0); + if (m_creature->Attack(pWho, false)) + { + m_creature->AddThreat(pWho); + m_creature->SetInCombatWith(pWho); + pWho->SetInCombatWith(m_creature); + m_creature->GetMotionMaster()->MoveChase(pWho, 20.0f); + } } - void CastSpellOnBug(Creature *target) + bool DoHandleBugAbility() { - target->setFaction(14); + if (DoCastSpellIfCan(m_creature, SPELL_EXPLODE_BUG) == CAST_OK) + return true; - DoCastSpellIfCan(target, SPELL_EXPLODEBUG, CAST_TRIGGERED); + return false; } - void UpdateAI(const uint32 diff) + bool DoHandleBerserk() { - //Return since we have no target - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; + if (DoCastSpellIfCan(m_creature, SPELL_FRENZY) == CAST_OK) + return true; - // reset arcane burst after teleport - we need to do this because - // when VL jumps to VN's location there will be a warrior who will get only 2s to run away - // which is almost impossible - if (AfterTeleport) - ArcaneBurst_Timer = 5000; - if (!TryActivateAfterTTelep(diff)) - return; + return false; + } - //ShadowBolt_Timer - if (ShadowBolt_Timer < diff) + bool UpdateEmperorAI(const uint32 uiDiff) + { + if (m_uiShadowBoltTimer < uiDiff) { - if (!m_creature->IsWithinDist(m_creature->getVictim(), 45.0f)) - m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim(), VEKLOR_DIST, 0); - else - DoCastSpellIfCan(m_creature->getVictim(),SPELL_SHADOWBOLT); - ShadowBolt_Timer = 2000; - }else ShadowBolt_Timer -= diff; + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_SHADOW_BOLT) == CAST_OK) + m_uiShadowBoltTimer = 2000; + } + else + m_uiShadowBoltTimer -= uiDiff; - //Blizzard_Timer - if (Blizzard_Timer < diff) + if (m_uiBlizzardTimer < uiDiff) { - Unit* target = NULL; - target = GetAnyoneCloseEnough(45, true); - if (target) - DoCastSpellIfCan(target,SPELL_BLIZZARD); - Blizzard_Timer = urand(15000, 30000); - }else Blizzard_Timer -= diff; - - if (ArcaneBurst_Timer < diff) - { - Unit *mvic; - if ((mvic=GetAnyoneCloseEnough(2*ATTACK_DISTANCE, false))!=NULL) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) { - DoCastSpellIfCan(mvic,SPELL_ARCANEBURST); - ArcaneBurst_Timer = 5000; + if (DoCastSpellIfCan(pTarget, SPELL_BLIZZARD) == CAST_OK) + m_uiBlizzardTimer = urand(15000, 30000); } - }else ArcaneBurst_Timer -= diff; - - HandleBugs(diff); - - //Heal brother when 60yrds close - TryHealBrother(diff); - - //Teleporting to brother - if (Teleport_Timer < diff) - { - TeleportToMyBrother(); - }else Teleport_Timer -= diff; - - CheckEnrage(diff); - - //VL doesn't melee - //DoMeleeAttackIfReady(); - } - - void AttackStart(Unit* who) - { - if (!who) - return; + } + else + m_uiBlizzardTimer -= uiDiff; - // VL doesn't melee - if (m_creature->Attack(who, false)) + if (m_uiArcaneBurstTimer < uiDiff) { - m_creature->AddThreat(who); - m_creature->SetInCombatWith(who); - who->SetInCombatWith(m_creature); - - m_creature->GetMotionMaster()->MoveChase(who, VEKLOR_DIST, 0); + if (DoCastSpellIfCan(m_creature, SPELL_ARCANE_BURST) == CAST_OK) + m_uiArcaneBurstTimer = 5000; } + else + m_uiArcaneBurstTimer -= uiDiff; + + return true; } }; diff --git a/scripts/kalimdor/temple_of_ahnqiraj/instance_temple_of_ahnqiraj.cpp b/scripts/kalimdor/temple_of_ahnqiraj/instance_temple_of_ahnqiraj.cpp index f96c26e47..4a4140afe 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/instance_temple_of_ahnqiraj.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/instance_temple_of_ahnqiraj.cpp @@ -24,7 +24,21 @@ EndScriptData */ #include "precompiled.h" #include "temple_of_ahnqiraj.h" +static const DialogueEntry aIntroDialogue[] = +{ + {EMOTE_EYE_INTRO, NPC_MASTERS_EYE, 7000}, + {SAY_EMPERORS_INTRO_1, NPC_VEKLOR, 6000}, + {SAY_EMPERORS_INTRO_2, NPC_VEKNILASH, 8000}, + {SAY_EMPERORS_INTRO_3, NPC_VEKLOR, 3000}, + {SAY_EMPERORS_INTRO_4, NPC_VEKNILASH, 3000}, + {SAY_EMPERORS_INTRO_5, NPC_VEKLOR, 3000}, + {SAY_EMPERORS_INTRO_6, NPC_VEKNILASH, 0}, + {0,0,0} +}; + instance_temple_of_ahnqiraj::instance_temple_of_ahnqiraj(Map* pMap) : ScriptedInstance(pMap), + m_dialogueHelper(aIntroDialogue), + m_bIsEmperorsIntroDone(false), m_uiBugTrioDeathCount(0) { Initialize(); @@ -33,6 +47,20 @@ instance_temple_of_ahnqiraj::instance_temple_of_ahnqiraj(Map* pMap) : ScriptedIn void instance_temple_of_ahnqiraj::Initialize() { memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); + + m_dialogueHelper.InitializeDialogueHelper(this); +} + +void instance_temple_of_ahnqiraj::DoHandleTempleAreaTrigger(uint32 uiTriggerId) +{ + if (uiTriggerId == AREATRIGGER_TWIN_EMPERORS && !m_bIsEmperorsIntroDone) + { + m_dialogueHelper.StartNextDialogueText(EMOTE_EYE_INTRO); + // Note: there may be more related to this; The emperors should kneel before the Eye and they stand up after it despawns + if (Creature* pEye = GetSingleCreatureFromStorage(NPC_MASTERS_EYE)) + pEye->ForcedDespawn(1000); + m_bIsEmperorsIntroDone = true; + } } void instance_temple_of_ahnqiraj::OnCreatureCreate (Creature* pCreature) @@ -45,6 +73,7 @@ void instance_temple_of_ahnqiraj::OnCreatureCreate (Creature* pCreature) break; case NPC_VEKLOR: case NPC_VEKNILASH: + case NPC_MASTERS_EYE: case NPC_CTHUN: m_mNpcEntryGuidStore[pCreature->GetEntry()] = pCreature->GetObjectGuid(); break; @@ -166,6 +195,20 @@ InstanceData* GetInstanceData_instance_temple_of_ahnqiraj(Map* pMap) return new instance_temple_of_ahnqiraj(pMap); } +bool AreaTrigger_at_temple_ahnqiraj(Player* pPlayer, AreaTriggerEntry const* pAt) +{ + if (pAt->id == AREATRIGGER_TWIN_EMPERORS) + { + if (pPlayer->isGameMaster() || pPlayer->isDead()) + return false; + + if (instance_temple_of_ahnqiraj* pInstance = (instance_temple_of_ahnqiraj*)pPlayer->GetInstanceData()) + pInstance->DoHandleTempleAreaTrigger(pAt->id); + } + + return false; +} + void AddSC_instance_temple_of_ahnqiraj() { Script* pNewScript; @@ -174,4 +217,9 @@ void AddSC_instance_temple_of_ahnqiraj() pNewScript->Name = "instance_temple_of_ahnqiraj"; pNewScript->GetInstanceData = &GetInstanceData_instance_temple_of_ahnqiraj; pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "at_temple_ahnqiraj"; + pNewScript->pAreaTrigger = &AreaTrigger_at_temple_ahnqiraj; + pNewScript->RegisterSelf(); } diff --git a/scripts/kalimdor/temple_of_ahnqiraj/temple_of_ahnqiraj.h b/scripts/kalimdor/temple_of_ahnqiraj/temple_of_ahnqiraj.h index d484cb6b0..9f45a8c66 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/temple_of_ahnqiraj.h +++ b/scripts/kalimdor/temple_of_ahnqiraj/temple_of_ahnqiraj.h @@ -20,12 +20,23 @@ enum //NPC_YAUJ = 15543, NPC_VEKLOR = 15276, NPC_VEKNILASH = 15275, + NPC_MASTERS_EYE = 15963, NPC_CTHUN = 15727, GO_SKERAM_GATE = 180636, GO_TWINS_ENTER_DOOR = 180634, GO_TWINS_EXIT_DOOR = 180635, + EMOTE_EYE_INTRO = -1531012, + SAY_EMPERORS_INTRO_1 = -1531013, + SAY_EMPERORS_INTRO_2 = -1531014, + SAY_EMPERORS_INTRO_3 = -1531015, + SAY_EMPERORS_INTRO_4 = -1531016, + SAY_EMPERORS_INTRO_5 = -1531017, + SAY_EMPERORS_INTRO_6 = -1531018, + + AREATRIGGER_TWIN_EMPERORS = 4047, + SPELL_SUMMON_PLAYER = 20477, }; @@ -55,14 +66,22 @@ class MANGOS_DLL_DECL instance_temple_of_ahnqiraj : public ScriptedInstance void SetData(uint32 uiType, uint32 uiData); uint32 GetData(uint32 uiType); + void DoHandleTempleAreaTrigger(uint32 uiTriggerId); + const char* Save() { return m_strInstData.c_str(); } void Load(const char* chrIn); + void Update(uint32 uiDiff) { m_dialogueHelper.DialogueUpdate(uiDiff); } + private: uint32 m_auiEncounter[MAX_ENCOUNTER]; std::string m_strInstData; uint8 m_uiBugTrioDeathCount; + + bool m_bIsEmperorsIntroDone; + + DialogueHelper m_dialogueHelper; }; #endif diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 02b9a26ce..b6332bb29 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2605" + #define SD2_REVISION_NR "2606" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index d1ebb6a20..c15c8d8be 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -79,6 +79,8 @@ INSERT INTO scripted_areatrigger VALUES (4485,'at_dark_portal'); DELETE FROM scripted_areatrigger WHERE entry=1966; INSERT INTO scripted_areatrigger VALUES (1966,'at_murkdeep'); +DELETE FROM scripted_areatrigger WHERE entry=4047; +INSERT INTO scripted_areatrigger VALUES (4047,'at_temple_ahnqiraj'); /* BATTLEGROUNDS */ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 4b5d32caa..d57c83b09 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -1441,7 +1441,31 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1531009,'I sentence you to death!',8647,1,0,0,'sartura SAY_SLAY'), (-1531010,'I serve to the last!',8648,1,0,0,'sartura SAY_DEATH'), -(-1531011,'%s is weakened!',0,2,0,0,'cthun EMOTE_WEAKENED'); +(-1531011,'%s is weakened!',0,2,0,0,'cthun EMOTE_WEAKENED'), + +(-1531012,'The massive floating eyeball in the center of the chamber turns its gaze upon you. You stand before a god.',0,2,0,0,'eye cthun EMOTE_INTRO'), +(-1531013,'Only flesh and bone. Mortals are such easy prey...',0,1,0,0,'veklor SAY_INTRO_1'), +(-1531014,'Where are your manners, brother. Let us properly welcome our guests.',0,1,0,0,'veknilash SAY_INTRO_2'), +(-1531015,'There will be pain...',0,1,0,0,'veklor SAY_INTRO_3'), +(-1531016,'Oh so much pain...',0,1,0,0,'veknilash SAY_INTRO_4'), +(-1531017,'Come, little ones.',0,1,0,0,'veklor SAY_INTRO_5'), +(-1531018,'The feast of souls begin now...',0,1,0,0,'veknilash SAY_INTRO_6'), + +(-1531019,'It\'s too late to turn away.',8623,1,0,0,'veklor SAY_AGGRO_1'), +(-1531020,'Prepare to embrace oblivion!',8626,1,0,0,'veklor SAY_AGGRO_2'), +(-1531021,'Like a fly in a web.',8624,1,0,0,'veklor SAY_AGGRO_3'), +(-1531022,'Your brash arrogance!',8628,1,0,0,'veklor SAY_AGGRO_4'), +(-1531023,'You will not escape death!',8629,1,0,0,'veklor SAY_SLAY'), +(-1531024,'My brother...NO!',8625,1,0,0,'veklor SAY_DEATH'), +(-1531025,'To decorate our halls!',8627,1,0,0,'veklor SAY_SPECIAL'), + +(-1531026,'Ah, lambs to the slaughter!',8630,1,0,0,'veknilash SAY_AGGRO_1'), +(-1531027,'Let none survive!',8632,1,0,0,'veknilash SAY_AGGRO_2'), +(-1531028,'Join me brother, there is blood to be shed!',8631,1,0,0,'veknilash SAY_AGGRO_3'), +(-1531029,'Look brother, fresh blood!',8633,1,0,0,'veknilash SAY_AGGRO_4'), +(-1531030,'Your fate is sealed!',8635,1,0,0,'veknilash SAY_SLAY'), +(-1531031,'Vek\'lor, I feel your pain!',8636,1,0,0,'veknilash SAY_DEATH'), +(-1531032,'Shall be your undoing!',8634,1,0,0,'veknilash SAY_SPECIAL'); -- -1 532 000 KARAZHAN INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES diff --git a/sql/updates/r2606_mangos.sql b/sql/updates/r2606_mangos.sql new file mode 100644 index 000000000..5e5c9baab --- /dev/null +++ b/sql/updates/r2606_mangos.sql @@ -0,0 +1,2 @@ +DELETE FROM scripted_areatrigger WHERE entry=4047; +INSERT INTO scripted_areatrigger VALUES (4047,'at_temple_ahnqiraj'); diff --git a/sql/updates/r2606_scriptdev2.sql b/sql/updates/r2606_scriptdev2.sql new file mode 100644 index 000000000..df879be3e --- /dev/null +++ b/sql/updates/r2606_scriptdev2.sql @@ -0,0 +1,25 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1531032 AND -1531012; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1531012,'The massive floating eyeball in the center of the chamber turns its gaze upon you. You stand before a god.',0,2,0,0,'eye cthun EMOTE_INTRO'), +(-1531013,'Only flesh and bone. Mortals are such easy prey...',0,1,0,0,'veklor SAY_INTRO_1'), +(-1531014,'Where are your manners, brother. Let us properly welcome our guests.',0,1,0,0,'veknilash SAY_INTRO_2'), +(-1531015,'There will be pain...',0,1,0,0,'veklor SAY_INTRO_3'), +(-1531016,'Oh so much pain...',0,1,0,0,'veknilash SAY_INTRO_4'), +(-1531017,'Come, little ones.',0,1,0,0,'veklor SAY_INTRO_5'), +(-1531018,'The feast of souls begin now...',0,1,0,0,'veknilash SAY_INTRO_6'), + +(-1531019,'It\'s too late to turn away.',8623,1,0,0,'veklor SAY_AGGRO_1'), +(-1531020,'Prepare to embrace oblivion!',8626,1,0,0,'veklor SAY_AGGRO_2'), +(-1531021,'Like a fly in a web.',8624,1,0,0,'veklor SAY_AGGRO_3'), +(-1531022,'Your brash arrogance!',8628,1,0,0,'veklor SAY_AGGRO_4'), +(-1531023,'You will not escape death!',8629,1,0,0,'veklor SAY_SLAY'), +(-1531024,'My brother...NO!',8625,1,0,0,'veklor SAY_DEATH'), +(-1531025,'To decorate our halls!',8627,1,0,0,'veklor SAY_SPECIAL'), + +(-1531026,'Ah, lambs to the slaughter!',8630,1,0,0,'veknilash SAY_AGGRO_1'), +(-1531027,'Let none survive!',8632,1,0,0,'veknilash SAY_AGGRO_2'), +(-1531028,'Join me brother, there is blood to be shed!',8631,1,0,0,'veknilash SAY_AGGRO_3'), +(-1531029,'Look brother, fresh blood!',8633,1,0,0,'veknilash SAY_AGGRO_4'), +(-1531030,'Your fate is sealed!',8635,1,0,0,'veknilash SAY_SLAY'), +(-1531031,'Vek\'lor, I feel your pain!',8636,1,0,0,'veknilash SAY_DEATH'), +(-1531032,'Shall be your undoing!',8634,1,0,0,'veknilash SAY_SPECIAL'); From 63f4678614eba03c08418cc347e95a4892417037 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Mon, 2 Jul 2012 00:11:34 +0200 Subject: [PATCH 0595/1172] [2607] Use countof macro instead of manual division with sizeof This should fix bugs in: stratholme - boss_silver_hand_bossesAI azshare - mobs_spitelashesAI aq20 - boss_ossirianAI violet hold - Fix a rare bug with a Trash portal appearing in the middle of the room (there should be only boss portals) Thanks to Chero for pointing --- .../blackrock_depths/instance_blackrock_depths.cpp | 2 +- .../magisters_terrace/boss_priestess_delrissa.cpp | 2 +- .../eastern_kingdoms/scarlet_enclave/ebon_hold.cpp | 3 +-- .../stratholme/boss_dathrohan_balnazzar.cpp | 4 +--- .../stratholme/boss_order_of_silver_hand.cpp | 2 +- scripts/eastern_kingdoms/zulaman/boss_janalai.cpp | 13 +++---------- .../eastern_kingdoms/zulgurub/boss_mandokir.cpp | 4 +--- scripts/kalimdor/azshara.cpp | 2 +- .../instance_blackfathom_deeps.cpp | 2 +- scripts/kalimdor/onyxias_lair/boss_onyxia.cpp | 2 +- .../kalimdor/ruins_of_ahnqiraj/boss_ossirian.cpp | 2 +- .../forge_of_souls/instance_forge_of_souls.cpp | 6 +++--- .../northrend/obsidian_sanctum/boss_sartharion.cpp | 5 +---- .../northrend/violet_hold/instance_violet_hold.cpp | 14 +++++++------- .../outland/tempest_keep/the_eye/boss_kaelthas.cpp | 4 +--- scripts/world/go_scripts.cpp | 4 ++-- scripts/world/npcs_special.cpp | 4 +--- sd2_revision_nr.h | 2 +- 18 files changed, 29 insertions(+), 48 deletions(-) diff --git a/scripts/eastern_kingdoms/blackrock_depths/instance_blackrock_depths.cpp b/scripts/eastern_kingdoms/blackrock_depths/instance_blackrock_depths.cpp index 690884554..952cdb2bc 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/instance_blackrock_depths.cpp +++ b/scripts/eastern_kingdoms/blackrock_depths/instance_blackrock_depths.cpp @@ -260,7 +260,7 @@ void instance_blackrock_depths::OnCreatureEvade(Creature* pCreature) { if (GetData(TYPE_RING_OF_LAW) == IN_PROGRESS || GetData(TYPE_RING_OF_LAW) == SPECIAL) { - for (uint8 i = 0; i < sizeof(aArenaNPCs)/sizeof(uint32); ++i) + for (uint8 i = 0; i < countof(aArenaNPCs); ++i) { if (pCreature->GetEntry() == aArenaNPCs[i]) { diff --git a/scripts/eastern_kingdoms/magisters_terrace/boss_priestess_delrissa.cpp b/scripts/eastern_kingdoms/magisters_terrace/boss_priestess_delrissa.cpp index 7ff2dd39a..b4526d5ef 100644 --- a/scripts/eastern_kingdoms/magisters_terrace/boss_priestess_delrissa.cpp +++ b/scripts/eastern_kingdoms/magisters_terrace/boss_priestess_delrissa.cpp @@ -161,7 +161,7 @@ struct MANGOS_DLL_DECL boss_priestess_delrissaAI : public ScriptedAI if (LackeyEntryList.empty()) { //pre-allocate size for speed - LackeyEntryList.resize((sizeof(m_auiAddEntries) / sizeof(uint32))); + LackeyEntryList.resize(countof(m_auiAddEntries)); //fill vector array with entries from creature array for(uint8 i = 0; i < LackeyEntryList.size(); ++i) diff --git a/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp b/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp index d2a977fed..77a9a3cbe 100644 --- a/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp +++ b/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp @@ -628,8 +628,7 @@ bool GossipSelect_npc_death_knight_initiate(Player* pPlayer, Creature* pCreature pCreature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_UNK_15); - int32 uiSayId = rand()% (sizeof(m_auiRandomSay)/sizeof(int32)); - DoScriptText(m_auiRandomSay[uiSayId], pCreature, pPlayer); + DoScriptText(m_auiRandomSay[urand(0, countof(m_auiRandomSay) - 1)], pCreature, pPlayer); pCreature->CastSpell(pPlayer, SPELL_DUEL, false); pCreature->CastSpell(pPlayer, SPELL_DUEL_FLAG, true); diff --git a/scripts/eastern_kingdoms/stratholme/boss_dathrohan_balnazzar.cpp b/scripts/eastern_kingdoms/stratholme/boss_dathrohan_balnazzar.cpp index ad749dd9b..19c803495 100644 --- a/scripts/eastern_kingdoms/stratholme/boss_dathrohan_balnazzar.cpp +++ b/scripts/eastern_kingdoms/stratholme/boss_dathrohan_balnazzar.cpp @@ -113,9 +113,7 @@ struct MANGOS_DLL_DECL boss_dathrohan_balnazzarAI : public ScriptedAI { DoScriptText(SAY_DEATH, m_creature); - static uint32 uiCount = sizeof(m_aSummonPoint)/sizeof(SummonDef); - - for (uint32 i = 0; i < uiCount; ++i) + for (uint32 i = 0; i < countof(m_aSummonPoint); ++i) m_creature->SummonCreature(m_aSummonPoint[i].m_uiEntry, m_aSummonPoint[i].m_fX, m_aSummonPoint[i].m_fY, m_aSummonPoint[i].m_fZ, m_aSummonPoint[i].m_fOrient, TEMPSUMMON_TIMED_DESPAWN, HOUR*IN_MILLISECONDS); diff --git a/scripts/eastern_kingdoms/stratholme/boss_order_of_silver_hand.cpp b/scripts/eastern_kingdoms/stratholme/boss_order_of_silver_hand.cpp index 9c2b51eb1..154287656 100644 --- a/scripts/eastern_kingdoms/stratholme/boss_order_of_silver_hand.cpp +++ b/scripts/eastern_kingdoms/stratholme/boss_order_of_silver_hand.cpp @@ -75,7 +75,7 @@ struct MANGOS_DLL_DECL boss_silver_hand_bossesAI : public ScriptedAI boss_silver_hand_bossesAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (instance_stratholme*)pCreature->GetInstanceData(); - for (uint8 i = 0; i < sizeof(m_aSilverHandAbility); ++i) + for (uint8 i = 0; i < countof(m_aSilverHandAbility); ++i) { if (m_aSilverHandAbility[i].m_uiCreatureEntry == m_creature->GetEntry()) m_mSpellTimers[i] = m_aSilverHandAbility[i].m_uiInitialTimer; diff --git a/scripts/eastern_kingdoms/zulaman/boss_janalai.cpp b/scripts/eastern_kingdoms/zulaman/boss_janalai.cpp index 7d85c1650..10a062fad 100644 --- a/scripts/eastern_kingdoms/zulaman/boss_janalai.cpp +++ b/scripts/eastern_kingdoms/zulaman/boss_janalai.cpp @@ -299,13 +299,7 @@ struct MANGOS_DLL_DECL boss_janalaiAI : public ScriptedAI void Throw5Bombs() { - //all available spells (each spell has different radius for summon location) - uint8 uiMaxBombs = sizeof(m_auiSpellFireBombSummon)/sizeof(uint32); - - //float fX, fY, fZ; - //float fRadius = 5.0f; - - for(uint8 i = 0; i < uiMaxBombs; ++i) + for(uint8 i = 0; i < countof(m_auiSpellFireBombSummon); ++i) { m_creature->CastSpell(m_creature, m_auiSpellFireBombSummon[i], true); @@ -629,10 +623,9 @@ struct MANGOS_DLL_DECL npc_amanishi_hatcherAI : public ScriptedAI if (uiType != POINT_MOTION_TYPE || m_bWaypointEnd) return; - uint32 uiCount = (m_creature->GetEntry() == NPC_AMANI_HATCHER_1) ? - (sizeof(m_aHatcherRight)/sizeof(WaypointDef)) : (sizeof(m_aHatcherLeft)/sizeof(WaypointDef)); + uint32 uiCount = m_creature->GetEntry() == NPC_AMANI_HATCHER_1 ? countof(m_aHatcherRight) : countof(m_aHatcherLeft); - m_uiWaypoint = uiPointId+1; + m_uiWaypoint = uiPointId + 1; if (uiCount == m_uiWaypoint) m_bWaypointEnd = true; diff --git a/scripts/eastern_kingdoms/zulgurub/boss_mandokir.cpp b/scripts/eastern_kingdoms/zulgurub/boss_mandokir.cpp index c0556bcb4..4c18c55c8 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_mandokir.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_mandokir.cpp @@ -124,9 +124,7 @@ struct MANGOS_DLL_DECL boss_mandokirAI : public ScriptedAI { DoScriptText(SAY_AGGRO, m_creature); - uint32 uiCount = sizeof(aSpirits)/sizeof(SpawnLocations); - - for(uint8 i = 0; i < uiCount; ++i) + for(uint8 i = 0; i < countof(aSpirits); ++i) m_creature->SummonCreature(NPC_CHAINED_SPIRIT, aSpirits[i].fX, aSpirits[i].fY, aSpirits[i].fZ, aSpirits[i].fAng, TEMPSUMMON_CORPSE_DESPAWN, 0); //At combat start Mandokir is mounted so we must unmount it first diff --git a/scripts/kalimdor/azshara.cpp b/scripts/kalimdor/azshara.cpp index 72d8d2788..6ea899305 100644 --- a/scripts/kalimdor/azshara.cpp +++ b/scripts/kalimdor/azshara.cpp @@ -296,7 +296,7 @@ struct MANGOS_DLL_DECL mobs_spitelashesAI : public ScriptedAI { mobs_spitelashesAI(Creature* pCreature) : ScriptedAI(pCreature) { - for (uint8 i = 0; i < sizeof(m_aSpitelashAbility); ++i) + for (uint8 i = 0; i < countof(m_aSpitelashAbility); ++i) { if (m_aSpitelashAbility[i].m_uiCreatureEntry == m_creature->GetEntry()) m_mSpellTimers[i] = m_aSpitelashAbility[i].m_uiInitialTimer; diff --git a/scripts/kalimdor/blackfathom_deeps/instance_blackfathom_deeps.cpp b/scripts/kalimdor/blackfathom_deeps/instance_blackfathom_deeps.cpp index d017e66fd..dc082cab7 100644 --- a/scripts/kalimdor/blackfathom_deeps/instance_blackfathom_deeps.cpp +++ b/scripts/kalimdor/blackfathom_deeps/instance_blackfathom_deeps.cpp @@ -77,7 +77,7 @@ void instance_blackfathom_deeps::DoSpawnMobs(uint8 uiWaveIndex) pKelris->GetRespawnCoord(fX_resp, fY_resp, fZ_resp); - for (uint8 i = 0; i < sizeof(aWaveSummonInformation) / sizeof(SummonInformation); ++i) + for (uint8 i = 0; i < countof(aWaveSummonInformation); ++i) { if (aWaveSummonInformation[i].m_uiWaveIndex != uiWaveIndex) continue; diff --git a/scripts/kalimdor/onyxias_lair/boss_onyxia.cpp b/scripts/kalimdor/onyxias_lair/boss_onyxia.cpp index a7f776738..d4f9cbed9 100644 --- a/scripts/kalimdor/onyxias_lair/boss_onyxia.cpp +++ b/scripts/kalimdor/onyxias_lair/boss_onyxia.cpp @@ -108,7 +108,7 @@ struct MANGOS_DLL_DECL boss_onyxiaAI : public ScriptedAI { m_pInstance = (instance_onyxias_lair*)pCreature->GetInstanceData(); m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); - m_uiMaxBreathPositions = sizeof(aMoveData)/sizeof(OnyxiaMove); + m_uiMaxBreathPositions = countof(aMoveData); Reset(); } diff --git a/scripts/kalimdor/ruins_of_ahnqiraj/boss_ossirian.cpp b/scripts/kalimdor/ruins_of_ahnqiraj/boss_ossirian.cpp index e23309949..13c80b040 100644 --- a/scripts/kalimdor/ruins_of_ahnqiraj/boss_ossirian.cpp +++ b/scripts/kalimdor/ruins_of_ahnqiraj/boss_ossirian.cpp @@ -148,7 +148,7 @@ struct MANGOS_DLL_DECL boss_ossirianAI : public ScriptedAI { // Check for proper spell id bool bIsWeaknessSpell = false; - for (uint8 i = 0; i < sizeof(aWeaknessSpell); ++i) + for (uint8 i = 0; i < countof(aWeaknessSpell); ++i) { if (pSpell->Id == aWeaknessSpell[i]) { diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/instance_forge_of_souls.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/instance_forge_of_souls.cpp index e49f1166c..9dae4cc77 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/instance_forge_of_souls.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/instance_forge_of_souls.cpp @@ -67,7 +67,7 @@ void instance_forge_of_souls::ProcessEventNpcs(Player* pPlayer, bool bChanged) if (m_auiEncounter[0] != DONE || m_auiEncounter[1] != DONE) { // Spawn Begin Mobs - for (uint8 i = 0; i < sizeof(aEventBeginLocations)/sizeof(sIntoEventNpcSpawnLocations); ++i) + for (uint8 i = 0; i < countof(aEventBeginLocations); ++i) { if (Creature* pSummon = pPlayer->SummonCreature(m_uiTeam == HORDE ? aEventBeginLocations[i].uiEntryHorde : aEventBeginLocations[i].uiEntryAlliance, aEventBeginLocations[i].fSpawnX, aEventBeginLocations[i].fSpawnY, aEventBeginLocations[i].fSpawnZ, aEventBeginLocations[i].fSpawnO, TEMPSUMMON_DEAD_DESPAWN, 24*HOUR*IN_MILLISECONDS)) @@ -85,7 +85,7 @@ void instance_forge_of_souls::ProcessEventNpcs(Player* pPlayer, bool bChanged) pSummoned->ForcedDespawn(); } - for (uint8 i = 0; i < sizeof(aEventEndLocations)/sizeof(sExtroEventNpcLocations); ++i) + for (uint8 i = 0; i < countof(aEventEndLocations); ++i) { pPlayer->SummonCreature(m_uiTeam == HORDE ? aEventEndLocations[i].uiEntryHorde : aEventEndLocations[i].uiEntryAlliance, aEventEndLocations[i].fSpawnX, aEventEndLocations[i].fSpawnY, aEventEndLocations[i].fSpawnZ, aEventEndLocations[i].fStartO, TEMPSUMMON_DEAD_DESPAWN, 24*HOUR*IN_MILLISECONDS); @@ -95,7 +95,7 @@ void instance_forge_of_souls::ProcessEventNpcs(Player* pPlayer, bool bChanged) } else { // Summon at end, without event - for (uint8 i = 0; i < sizeof(aEventEndLocations)/sizeof(sExtroEventNpcLocations); ++i) + for (uint8 i = 0; i < countof(aEventEndLocations); ++i) { pPlayer->SummonCreature(m_uiTeam == HORDE ? aEventEndLocations[i].uiEntryHorde : aEventEndLocations[i].uiEntryAlliance, aEventEndLocations[i].fEndX, aEventEndLocations[i].fEndY, aEventEndLocations[i].fEndZ, aEventEndLocations[i].fEndO, TEMPSUMMON_DEAD_DESPAWN, 24*HOUR*IN_MILLISECONDS); diff --git a/scripts/northrend/obsidian_sanctum/boss_sartharion.cpp b/scripts/northrend/obsidian_sanctum/boss_sartharion.cpp index 3e1d14e53..a412c1935 100644 --- a/scripts/northrend/obsidian_sanctum/boss_sartharion.cpp +++ b/scripts/northrend/obsidian_sanctum/boss_sartharion.cpp @@ -565,14 +565,11 @@ struct MANGOS_DLL_DECL dummy_dragonAI : public ScriptedAI return; } - //get amount of common points - uint32 uiCommonWPCount = sizeof(m_aDragonCommon)/sizeof(Waypoint); - //increase m_uiWaypointId = uiPointId+1; //if we have reached a point bigger or equal to count, it mean we must reset to point 0 - if (m_uiWaypointId >= uiCommonWPCount) + if (m_uiWaypointId >= countof(m_aDragonCommon)) { if (!m_bCanMoveFree) m_bCanMoveFree = true; diff --git a/scripts/northrend/violet_hold/instance_violet_hold.cpp b/scripts/northrend/violet_hold/instance_violet_hold.cpp index cc3c9d593..1e41474f5 100644 --- a/scripts/northrend/violet_hold/instance_violet_hold.cpp +++ b/scripts/northrend/violet_hold/instance_violet_hold.cpp @@ -46,7 +46,7 @@ instance_violet_hold::instance_violet_hold(Map* pMap) : ScriptedInstance(pMap), void instance_violet_hold::Initialize() { memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); - m_uiMaxCountPortalLoc = (sizeof(afPortalLocation)/sizeof(PortalData)) - 1; + m_uiMaxCountPortalLoc = countof(afPortalLocation) - 1; } void instance_violet_hold::ResetVariables() @@ -424,14 +424,14 @@ void instance_violet_hold::SetPortalId() { if (IsCurrentPortalForTrash()) { - int iTemp = rand()%(m_uiMaxCountPortalLoc - 1); + // Find another Trash portal position + uint8 uiTemp = m_uiPortalId + urand(1, m_uiMaxCountPortalLoc - 1); + // Decrease m_uiMaxCountPortalLoc so that the center position is skipped + uiTemp %= m_uiMaxCountPortalLoc - 1; - if (iTemp >= m_uiPortalId) - ++iTemp; + debug_log("SD2: instance_violet_hold: SetPortalId %u, old was id %u.", uiTemp, m_uiPortalId); - debug_log("SD2: instance_violet_hold: SetPortalId %i, old was id %u.", iTemp, m_uiPortalId); - - m_uiPortalId = iTemp; + m_uiPortalId = uiTemp; } else if (GetCurrentPortalNumber() == 18) { diff --git a/scripts/outland/tempest_keep/the_eye/boss_kaelthas.cpp b/scripts/outland/tempest_keep/the_eye/boss_kaelthas.cpp index b4fb4a08f..51e71519c 100644 --- a/scripts/outland/tempest_keep/the_eye/boss_kaelthas.cpp +++ b/scripts/outland/tempest_keep/the_eye/boss_kaelthas.cpp @@ -695,9 +695,7 @@ struct MANGOS_DLL_DECL boss_kaelthasAI : public ScriptedAI { m_creature->CastSpell(m_creature, SPELL_SUMMON_WEAPONS, false); - uint8 uiMaxWeapon = sizeof(m_auiSpellSummonWeapon)/sizeof(uint32); - - for (uint32 i = 0; i < uiMaxWeapon; ++i) + for (uint32 i = 0; i < countof(m_auiSpellSummonWeapon); ++i) m_creature->CastSpell(m_creature,m_auiSpellSummonWeapon[i],true); m_uiPhaseSubphase = 2; diff --git a/scripts/world/go_scripts.cpp b/scripts/world/go_scripts.cpp index a294a8e1a..9689dc12b 100644 --- a/scripts/world/go_scripts.cpp +++ b/scripts/world/go_scripts.cpp @@ -103,7 +103,7 @@ const uint32 uiNpcPrisonEntry[] = bool GOUse_go_ethereum_prison(Player* pPlayer, GameObject* pGo) { - uint8 uiRandom = urand(0, (sizeof(uiNpcPrisonEntry) / sizeof(uint32)) -1); + uint8 uiRandom = urand(0, countof(uiNpcPrisonEntry) - 1); if (Creature* pCreature = pPlayer->SummonCreature(uiNpcPrisonEntry[uiRandom], pGo->GetPositionX(), pGo->GetPositionY(), pGo->GetPositionZ(), pGo->GetAngle(pPlayer), @@ -147,7 +147,7 @@ const uint32 uiNpcStasisEntry[] = bool GOUse_go_ethereum_stasis(Player* pPlayer, GameObject* pGo) { - uint8 uiRandom = urand(0, (sizeof(uiNpcStasisEntry) / sizeof(uint32)) -1); + uint8 uiRandom = urand(0, countof(uiNpcStasisEntry) - 1); pPlayer->SummonCreature(uiNpcStasisEntry[uiRandom], pGo->GetPositionX(), pGo->GetPositionY(), pGo->GetPositionZ(), pGo->GetAngle(pPlayer), diff --git a/scripts/world/npcs_special.cpp b/scripts/world/npcs_special.cpp index 0f6a5cb8d..17e503003 100644 --- a/scripts/world/npcs_special.cpp +++ b/scripts/world/npcs_special.cpp @@ -108,9 +108,7 @@ struct MANGOS_DLL_DECL npc_air_force_botsAI : public ScriptedAI m_pSpawnAssoc = NULL; // find the correct spawnhandling - static uint32 uiEntryCount = sizeof(m_aSpawnAssociations)/sizeof(SpawnAssociation); - - for (uint8 i=0; iGetEntry()) { diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index b6332bb29..be8c18dea 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2606" + #define SD2_REVISION_NR "2607" #endif // __SD2_REVISION_NR_H__ From 5a47be87697165496c42853d3ebf154ab1df50bf Mon Sep 17 00:00:00 2001 From: Xfurry Date: Mon, 2 Jul 2012 22:40:06 +0300 Subject: [PATCH 0596/1172] [2608] Cleanup and improve some Eastern Kingdoms scripts --- .../eastern_kingdoms/stranglethorn_vale.cpp | 78 ++++---- scripts/eastern_kingdoms/undercity.cpp | 179 +++++++----------- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 - sql/scriptdev2_script_full.sql | 4 +- sql/updates/r2608_mangos.sql | 1 + sql/updates/r2608_scriptdev2.sql | 4 + 7 files changed, 119 insertions(+), 150 deletions(-) create mode 100644 sql/updates/r2608_mangos.sql create mode 100644 sql/updates/r2608_scriptdev2.sql diff --git a/scripts/eastern_kingdoms/stranglethorn_vale.cpp b/scripts/eastern_kingdoms/stranglethorn_vale.cpp index e7bd3dce9..a66eeaba2 100644 --- a/scripts/eastern_kingdoms/stranglethorn_vale.cpp +++ b/scripts/eastern_kingdoms/stranglethorn_vale.cpp @@ -31,62 +31,74 @@ EndContentData */ ## mob_yenniku ######*/ +enum +{ + SPELL_YENNIKUS_RELEASE = 3607, + + QUEST_ID_SAVING_YENNIKU = 592, + + FACTION_ID_HORDE_GENERIC = 83, // Note: faction may not be correct! +}; + struct MANGOS_DLL_DECL mob_yennikuAI : public ScriptedAI { - mob_yennikuAI(Creature *c) : ScriptedAI(c) - { - bReset = false; - Reset(); - } + mob_yennikuAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } - uint32 Reset_Timer; - bool bReset; + uint32 m_uiResetTimer; - void Reset() - { - Reset_Timer = 0; - m_creature->HandleEmote(EMOTE_STATE_NONE); - } + void Reset() { m_uiResetTimer = 0; } - void SpellHit(Unit *caster, const SpellEntry *spell) + void SpellHit(Unit* pCaster, const SpellEntry* pSpell) { - if (caster->GetTypeId() == TYPEID_PLAYER) + if (pSpell->Id == SPELL_YENNIKUS_RELEASE && pCaster->GetTypeId() == TYPEID_PLAYER) { - //Yenniku's Release - if (!bReset && ((Player*)caster)->GetQuestStatus(592) == QUEST_STATUS_INCOMPLETE && spell->Id == 3607) + if (!m_uiResetTimer && ((Player*)pCaster)->GetQuestStatus(QUEST_ID_SAVING_YENNIKU) == QUEST_STATUS_INCOMPLETE) { - m_creature->HandleEmote(EMOTE_STATE_STUN); - m_creature->CombatStop(); //stop combat - m_creature->DeleteThreatList(); //unsure of this - m_creature->setFaction(83); //horde generic - - bReset = true; - Reset_Timer = 60000; + m_uiResetTimer = 60000; + EnterEvadeMode(); } } - return; } - void Aggro(Unit *who) {} + void EnterEvadeMode() + { + if (m_uiResetTimer) + { + m_creature->RemoveAllAuras(); + m_creature->DeleteThreatList(); + m_creature->CombatStop(true); + m_creature->LoadCreatureAddon(true); + + m_creature->SetLootRecipient(NULL); - void UpdateAI(const uint32 diff) + m_creature->HandleEmote(EMOTE_STATE_STUN); + m_creature->SetFactionTemporary(FACTION_ID_HORDE_GENERIC, TEMPFACTION_RESTORE_REACH_HOME); + } + else + ScriptedAI::EnterEvadeMode(); + } + + void UpdateAI(const uint32 uiDiff) { - if (bReset) - if (Reset_Timer < diff) + if (m_uiResetTimer) { - EnterEvadeMode(); - bReset = false; - m_creature->setFaction(28); //troll, bloodscalp + if (m_uiResetTimer <= uiDiff) + { + m_creature->HandleEmote(EMOTE_STATE_NONE); + m_uiResetTimer = 0; + EnterEvadeMode(); + } + else + m_uiResetTimer -= uiDiff; } - else Reset_Timer -= diff; - //Return since we have no target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; DoMeleeAttackIfReady(); } }; + CreatureAI* GetAI_mob_yenniku(Creature *_Creature) { return new mob_yennikuAI (_Creature); diff --git a/scripts/eastern_kingdoms/undercity.cpp b/scripts/eastern_kingdoms/undercity.cpp index e34f1051d..8a5c5a803 100644 --- a/scripts/eastern_kingdoms/undercity.cpp +++ b/scripts/eastern_kingdoms/undercity.cpp @@ -23,7 +23,6 @@ EndScriptData */ /* ContentData npc_lady_sylvanas_windrunner -npc_highborne_lamenter EndContentData */ #include "precompiled.h" @@ -32,85 +31,100 @@ EndContentData */ ## npc_lady_sylvanas_windrunner ######*/ -#define SAY_LAMENT_END -1000196 -#define EMOTE_LAMENT_END -1000197 +enum +{ + EMOTE_LAMENT_START = -1000193, + SAY_LAMENT_END = -1000196, + EMOTE_LAMENT_END = -1000197, + + SPELL_HIGHBORNE_AURA = 37090, + SPELL_SYLVANAS_CAST = 36568, + SPELL_RIBBON_OF_SOULS = 37099, + + NPC_HIGHBORNE_LAMENTER = 21628, + NPC_HIGHBORNE_BUNNY = 21641, -#define SOUND_CREDIT 10896 -#define ENTRY_HIGHBORNE_LAMENTER 21628 -#define ENTRY_HIGHBORNE_BUNNY 21641 + QUEST_ID_JOURNEY_UNDERCITY = 9180, -#define SPELL_HIGHBORNE_AURA 37090 -#define SPELL_SYLVANAS_CAST 36568 -#define SPELL_RIBBON_OF_SOULS 34432 //the real one to use might be 37099 + MAX_LAMENTERS = 4, +}; -float HighborneLoc[4][3]= +static const float aHighborneLoc[MAX_LAMENTERS][4]= { - {1285.41f, 312.47f, 0.51f}, - {1286.96f, 310.40f, 1.00f}, - {1289.66f, 309.66f, 1.52f}, - {1292.51f, 310.50f, 1.99f}, + {1285.41f, 312.47f, -61.0f, 0.51f}, + {1286.96f, 310.40f, -61.0f, 1.00f}, + {1289.66f, 309.66f, -61.0f, 1.52f}, + {1292.51f, 310.50f, -61.0f, 1.99f}, }; -#define HIGHBORNE_LOC_Y -61.00f -#define HIGHBORNE_LOC_Y_NEW -55.50f struct MANGOS_DLL_DECL npc_lady_sylvanas_windrunnerAI : public ScriptedAI { npc_lady_sylvanas_windrunnerAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } - uint32 LamentEvent_Timer; - bool LamentEvent; - ObjectGuid m_targetGuid; - - float myX; - float myY; - float myZ; + uint32 m_uiLamentEventTimer; + uint32 m_uiSummonTimer; void Reset() { - myX = m_creature->GetPositionX(); - myY = m_creature->GetPositionY(); - myZ = m_creature->GetPositionZ(); - - LamentEvent_Timer = 5000; - LamentEvent = false; - m_targetGuid.Clear(); + m_uiLamentEventTimer = 0; + m_uiSummonTimer = 0; } - void JustSummoned(Creature *summoned) + void JustSummoned(Creature* pSummoned) { - if (summoned->GetEntry() == ENTRY_HIGHBORNE_BUNNY) + if (pSummoned->GetEntry() == NPC_HIGHBORNE_BUNNY) + pSummoned->CastSpell(pSummoned, SPELL_RIBBON_OF_SOULS, false); + else if (pSummoned->GetEntry() == NPC_HIGHBORNE_LAMENTER) { - if (Creature* pBunny = m_creature->GetMap()->GetCreature(m_targetGuid)) - { - pBunny->NearTeleportTo(pBunny->GetPositionX(), pBunny->GetPositionY(), myZ+15.0f, 0.0f); - summoned->CastSpell(pBunny,SPELL_RIBBON_OF_SOULS,false); - } + pSummoned->CastSpell(pSummoned, SPELL_HIGHBORNE_AURA, false); - m_targetGuid = summoned->GetObjectGuid(); + pSummoned->SetLevitate(true); + pSummoned->GetMotionMaster()->MovePoint(0, pSummoned->GetPositionX(), pSummoned->GetPositionY(), pSummoned->GetPositionZ() + 5.0f); } } - void UpdateAI(const uint32 diff) + void DoStartLamentEvent() + { + DoScriptText(EMOTE_LAMENT_START, m_creature); + DoCastSpellIfCan(m_creature, SPELL_SYLVANAS_CAST); + m_uiSummonTimer = 13000; + } + + void UpdateAI(const uint32 uiDiff) { - if (LamentEvent) + if (m_uiLamentEventTimer) { - if (LamentEvent_Timer < diff) + if (m_uiLamentEventTimer <= uiDiff) { - float raX = myX; - float raY = myY; - float raZ = myZ; + float fX, fY, fZ; + m_creature->GetRandomPoint(m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), 20.0f, fX, fY, fZ); + m_creature->SummonCreature(NPC_HIGHBORNE_BUNNY, fX, fY, fZ + 15.0f, 0, TEMPSUMMON_TIMED_DESPAWN, 3000); - m_creature->GetRandomPoint(myX,myY,myZ,20.0,raX,raY,raZ); - m_creature->SummonCreature(ENTRY_HIGHBORNE_BUNNY,raX,raY,myZ,0,TEMPSUMMON_TIMED_DESPAWN,3000); + m_uiLamentEventTimer = 2000; - LamentEvent_Timer = 2000; - if (!m_creature->HasAura(SPELL_SYLVANAS_CAST, EFFECT_INDEX_0)) + if (!m_creature->HasAura(SPELL_SYLVANAS_CAST)) { DoScriptText(SAY_LAMENT_END, m_creature); DoScriptText(EMOTE_LAMENT_END, m_creature); - LamentEvent = false; + m_uiLamentEventTimer = 0; } - }else LamentEvent_Timer -= diff; + } + else + m_uiLamentEventTimer -= uiDiff; + } + + if (m_uiSummonTimer) + { + if (m_uiSummonTimer <= uiDiff) + { + for (uint8 i = 0; i < MAX_LAMENTERS; ++i) + m_creature->SummonCreature(NPC_HIGHBORNE_LAMENTER, aHighborneLoc[i][0], aHighborneLoc[i][1], aHighborneLoc[i][2], aHighborneLoc[i][3], TEMPSUMMON_TIMED_DESPAWN, 160000); + + m_uiLamentEventTimer = 2000; + m_uiSummonTimer = 0; + } + else + m_uiSummonTimer -= uiDiff; } if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) @@ -127,71 +141,15 @@ CreatureAI* GetAI_npc_lady_sylvanas_windrunner(Creature* pCreature) bool QuestRewarded_npc_lady_sylvanas_windrunner(Player* pPlayer, Creature* pCreature, Quest const* pQuest) { - if (pQuest->GetQuestId() == 9180) + if (pQuest->GetQuestId() == QUEST_ID_JOURNEY_UNDERCITY) { if (npc_lady_sylvanas_windrunnerAI* pSylvanAI = dynamic_cast(pCreature->AI())) - { - pSylvanAI->LamentEvent = true; - pSylvanAI->DoPlaySoundToSet(pCreature, SOUND_CREDIT); - } - - pCreature->CastSpell(pCreature,SPELL_SYLVANAS_CAST,false); - - for(uint8 i = 0; i < 4; ++i) - pCreature->SummonCreature(ENTRY_HIGHBORNE_LAMENTER, HighborneLoc[i][0], HighborneLoc[i][1], HIGHBORNE_LOC_Y, HighborneLoc[i][2], TEMPSUMMON_TIMED_DESPAWN, 160000); + pSylvanAI->DoStartLamentEvent(); } return true; } -/*###### -## npc_highborne_lamenter -######*/ - -struct MANGOS_DLL_DECL npc_highborne_lamenterAI : public ScriptedAI -{ - npc_highborne_lamenterAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } - - uint32 EventMove_Timer; - uint32 EventCast_Timer; - bool EventMove; - bool EventCast; - - void Reset() - { - EventMove_Timer = 10000; - EventCast_Timer = 17500; - EventMove = true; - EventCast = true; - } - - void UpdateAI(const uint32 diff) - { - if (EventMove) - { - if (EventMove_Timer < diff) - { - m_creature->SetLevitate(true); - m_creature->MonsterMoveWithSpeed(m_creature->GetPositionX(),m_creature->GetPositionY(),HIGHBORNE_LOC_Y_NEW,3.f); - EventMove = false; - }else EventMove_Timer -= diff; - } - if (EventCast) - { - if (EventCast_Timer < diff) - { - DoCastSpellIfCan(m_creature,SPELL_HIGHBORNE_AURA); - EventCast = false; - }else EventCast_Timer -= diff; - } - } -}; - -CreatureAI* GetAI_npc_highborne_lamenter(Creature* pCreature) -{ - return new npc_highborne_lamenterAI(pCreature); -} - void AddSC_undercity() { Script* pNewScript; @@ -201,9 +159,4 @@ void AddSC_undercity() pNewScript->GetAI = &GetAI_npc_lady_sylvanas_windrunner; pNewScript->pQuestRewardedNPC = &QuestRewarded_npc_lady_sylvanas_windrunner; pNewScript->RegisterSelf(); - - pNewScript = new Script; - pNewScript->Name = "npc_highborne_lamenter"; - pNewScript->GetAI = &GetAI_npc_highborne_lamenter; - pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index be8c18dea..4575ec5f6 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2607" + #define SD2_REVISION_NR "2608" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index c15c8d8be..27b0b5755 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -1270,7 +1270,6 @@ UPDATE creature_template SET ScriptName='npc_ringo' WHERE entry=9999; /* UNDERCITY */ UPDATE creature_template SET ScriptName='npc_lady_sylvanas_windrunner' WHERE entry=10181; -UPDATE creature_template SET ScriptName='npc_highborne_lamenter' WHERE entry=21628; /* */ /* UTGARDE KEEP */ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index d57c83b09..5d442909b 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -155,14 +155,14 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1000191,'You taste good with maybe a little salt and pepper.',0,0,0,0,' SAY_LUMP_1'), (-1000192,'OK, OK! Lump give up!',0,0,0,0,' SAY_LUMP_DEFEAT'), -(-1000193,'REUSE ME',0,0,0,0,'REUSE ME'), +(-1000193,'%s looks down at the discarded necklace. In her sadness, the lady incants a glamour, which beckons forth Highborne spirits. The chamber resonates with their ancient song about the Sin\'dorei...',10896,2,1,0,'lady_sylvanas EMOTE_LAMENT_START'), (-1000194,'I give up! Please don\'t kill me!',0,0,0,0,'unkor SAY_SUBMIT'), (-1000195,'Thank you again, $N. I\'ll make my way to the road now. When you can, find Terenthis and let him know we escaped.',0,0,0,1,'volcor SAY_ESCAPE'), (-1000196,'Belore...',0,0,1,0,'lady_sylvanas SAY_LAMENT_END'), -(-1000197,'%s kneels down and pick up the amulet.',0,2,1,0,'lady_sylvanas EMOTE_LAMENT_END'), +(-1000197,'%s kneels down and pick up the amulet.',0,2,1,16,'lady_sylvanas EMOTE_LAMENT_END'), (-1000198,'Taste blade, mongrel!',0,0,0,0,'SAY_GUARD_SIL_AGGRO1'), (-1000199,'Please tell me that you didn\'t just do what I think you just did. Please tell me that I\'m not going to have to hurt you...',0,0,0,0,'SAY_GUARD_SIL_AGGRO2'), diff --git a/sql/updates/r2608_mangos.sql b/sql/updates/r2608_mangos.sql new file mode 100644 index 000000000..36b8701f2 --- /dev/null +++ b/sql/updates/r2608_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='' WHERE entry=21628; diff --git a/sql/updates/r2608_scriptdev2.sql b/sql/updates/r2608_scriptdev2.sql new file mode 100644 index 000000000..c510c9cff --- /dev/null +++ b/sql/updates/r2608_scriptdev2.sql @@ -0,0 +1,4 @@ +DELETE FROM script_texts WHERE entry=-1000193; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1000193,'%s looks down at the discarded necklace. In her sadness, the lady incants a glamour, which beckons forth Highborne spirits. The chamber resonates with their ancient song about the Sin\'dorei...',10896,2,1,0,'lady_sylvanas EMOTE_LAMENT_START'); +UPDATE script_texts SET emote=16 WHERE entry=-1000197; From 0f675057bd9bb43a6f7c0bf272d0a4d3e5879fbd Mon Sep 17 00:00:00 2001 From: Xfurry Date: Tue, 3 Jul 2012 11:02:32 +0300 Subject: [PATCH 0597/1172] [2609] Cleanup and improve some Kalimdor scripts --- scripts/kalimdor/azuremyst_isle.cpp | 41 ++-- scripts/kalimdor/bloodmyst_isle.cpp | 29 +-- scripts/kalimdor/orgrimmar.cpp | 63 +++--- scripts/kalimdor/tanaris.cpp | 149 +++++++------- scripts/kalimdor/the_barrens.cpp | 298 ++++++++++++++-------------- sd2_revision_nr.h | 2 +- 6 files changed, 301 insertions(+), 281 deletions(-) diff --git a/scripts/kalimdor/azuremyst_isle.cpp b/scripts/kalimdor/azuremyst_isle.cpp index 87caf51d2..351158076 100644 --- a/scripts/kalimdor/azuremyst_isle.cpp +++ b/scripts/kalimdor/azuremyst_isle.cpp @@ -303,17 +303,11 @@ struct MANGOS_DLL_DECL npc_injured_draeneiAI : public ScriptedAI } } - void MoveInLineOfSight(Unit *who) - { - return; //ignore everyone around them (won't aggro anything) - } - - void UpdateAI(const uint32 diff) - { - return; - } + void MoveInLineOfSight(Unit* pWho) { } // ignore everyone around them (won't aggro anything) + void UpdateAI(const uint32 uiDiff) { } }; + CreatureAI* GetAI_npc_injured_draenei(Creature* pCreature) { return new npc_injured_draeneiAI(pCreature); @@ -323,27 +317,30 @@ CreatureAI* GetAI_npc_injured_draenei(Creature* pCreature) ## npc_magwin ######*/ -#define SAY_START -1000111 -#define SAY_AGGRO -1000112 -#define SAY_PROGRESS -1000113 -#define SAY_END1 -1000114 -#define SAY_END2 -1000115 -#define EMOTE_HUG -1000116 - -#define QUEST_A_CRY_FOR_HELP 9528 +enum +{ + SAY_START = -1000111, + SAY_AGGRO = -1000112, + SAY_PROGRESS = -1000113, + SAY_END1 = -1000114, + SAY_END2 = -1000115, + EMOTE_HUG = -1000116, + + QUEST_A_CRY_FOR_HELP = 9528 +}; struct MANGOS_DLL_DECL npc_magwinAI : public npc_escortAI { - npc_magwinAI(Creature* pCreature) : npc_escortAI(pCreature) {Reset();} + npc_magwinAI(Creature* pCreature) : npc_escortAI(pCreature) { Reset(); } - void WaypointReached(uint32 i) + void WaypointReached(uint32 uiPointId) { Player* pPlayer = GetPlayerForEscort(); if (!pPlayer) return; - switch(i) + switch(uiPointId) { case 0: DoScriptText(SAY_START, m_creature, pPlayer); @@ -362,9 +359,9 @@ struct MANGOS_DLL_DECL npc_magwinAI : public npc_escortAI } } - void Aggro(Unit* who) + void Aggro(Unit* pWho) { - DoScriptText(SAY_AGGRO, m_creature, who); + DoScriptText(SAY_AGGRO, m_creature, pWho); } void Reset() { } diff --git a/scripts/kalimdor/bloodmyst_isle.cpp b/scripts/kalimdor/bloodmyst_isle.cpp index 74cee8ef0..33eb8749c 100644 --- a/scripts/kalimdor/bloodmyst_isle.cpp +++ b/scripts/kalimdor/bloodmyst_isle.cpp @@ -31,36 +31,39 @@ EndContentData */ ## mob_webbed_creature ######*/ -//possible creatures to be spawned +enum +{ + NPC_EXPEDITION_RESEARCHER = 17681, +}; + +// possible creatures to be spawned (too many to be added to enum) const uint32 possibleSpawns[31] = {17322, 17661, 17496, 17522, 17340, 17352, 17333, 17524, 17654, 17348, 17339, 17345, 17359, 17353, 17336, 17550, 17330, 17701, 17321, 17325, 17320, 17683, 17342, 17715, 17334, 17341, 17338, 17337, 17346, 17344, 17327}; struct MANGOS_DLL_DECL mob_webbed_creatureAI : public ScriptedAI { - mob_webbed_creatureAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + mob_webbed_creatureAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } - void Reset() - { - } + void Reset() { } - void JustDied(Unit* Killer) + void JustDied(Unit* pKiller) { - uint32 spawnCreatureID = 0; + uint32 uiSpawnCreatureEntry = 0; switch(urand(0, 2)) { case 0: - spawnCreatureID = 17681; - if (Killer->GetTypeId() == TYPEID_PLAYER) - ((Player*)Killer)->KilledMonsterCredit(spawnCreatureID, m_creature->GetObjectGuid()); + uiSpawnCreatureEntry = NPC_EXPEDITION_RESEARCHER; + if (pKiller->GetTypeId() == TYPEID_PLAYER) + ((Player*)pKiller)->KilledMonsterCredit(uiSpawnCreatureEntry, m_creature->GetObjectGuid()); break; case 1: case 2: - spawnCreatureID = possibleSpawns[urand(0, 30)]; + uiSpawnCreatureEntry = possibleSpawns[urand(0, 30)]; break; } - if (spawnCreatureID) - m_creature->SummonCreature(spawnCreatureID, 0.0f, 0.0f, 0.0f, m_creature->GetOrientation(), TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000); + if (uiSpawnCreatureEntry) + m_creature->SummonCreature(uiSpawnCreatureEntry, 0.0f, 0.0f, 0.0f, m_creature->GetOrientation(), TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000); } }; diff --git a/scripts/kalimdor/orgrimmar.cpp b/scripts/kalimdor/orgrimmar.cpp index e87cb84cb..79f23980d 100644 --- a/scripts/kalimdor/orgrimmar.cpp +++ b/scripts/kalimdor/orgrimmar.cpp @@ -41,56 +41,63 @@ struct MANGOS_DLL_DECL npc_shenthulAI : public ScriptedAI { npc_shenthulAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } - bool CanTalk; - bool CanEmote; - uint32 Salute_Timer; - uint32 Reset_Timer; + uint32 m_uiSaluteTimer; + uint32 m_uiResetTimer; + ObjectGuid m_playerGuid; void Reset() { - CanTalk = false; - CanEmote = false; - Salute_Timer = 6000; - Reset_Timer = 0; + m_uiSaluteTimer = 0; + m_uiResetTimer = 0; + m_playerGuid.Clear(); } - void ReceiveEmote(Player* pPlayer, uint32 emote) + void ReceiveEmote(Player* pPlayer, uint32 uiTextEmote) { - if (emote == TEXTEMOTE_SALUTE && pPlayer->GetQuestStatus(QUEST_SHATTERED_SALUTE) == QUEST_STATUS_INCOMPLETE) + if (m_uiResetTimer && uiTextEmote == TEXTEMOTE_SALUTE && pPlayer->GetQuestStatus(QUEST_SHATTERED_SALUTE) == QUEST_STATUS_INCOMPLETE) { - if (CanEmote) - { - pPlayer->AreaExploredOrEventHappens(QUEST_SHATTERED_SALUTE); - Reset(); - } + pPlayer->AreaExploredOrEventHappens(QUEST_SHATTERED_SALUTE); + EnterEvadeMode(); } } - void UpdateAI(const uint32 diff) + void DoStartQuestEvent(Player* pPlayer) + { + m_playerGuid = pPlayer->GetObjectGuid(); + m_uiSaluteTimer = 6000; + } + + void UpdateAI(const uint32 uiDiff) { - if (CanEmote) + if (m_uiResetTimer) { - if (Reset_Timer < diff) + if (m_uiResetTimer <= uiDiff) { if (Player* pPlayer = m_creature->GetMap()->GetPlayer(m_playerGuid)) { if (pPlayer->GetTypeId() == TYPEID_PLAYER && pPlayer->GetQuestStatus(QUEST_SHATTERED_SALUTE) == QUEST_STATUS_INCOMPLETE) pPlayer->FailQuest(QUEST_SHATTERED_SALUTE); } - Reset(); - } else Reset_Timer -= diff; + + m_uiResetTimer = 0; + EnterEvadeMode(); + } + else + m_uiResetTimer -= uiDiff; } - if (CanTalk && !CanEmote) + if (m_uiSaluteTimer) { - if (Salute_Timer < diff) + if (m_uiSaluteTimer <= uiDiff) { m_creature->HandleEmote(EMOTE_ONESHOT_SALUTE); - CanEmote = true; - Reset_Timer = 60000; - } else Salute_Timer -= diff; + m_uiResetTimer = 60000; + m_uiSaluteTimer = 0; + } + else + m_uiSaluteTimer -= uiDiff; } if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) @@ -110,11 +117,9 @@ bool QuestAccept_npc_shenthul(Player* pPlayer, Creature* pCreature, const Quest* if (pQuest->GetQuestId() == QUEST_SHATTERED_SALUTE) { if (npc_shenthulAI* pShenAI = dynamic_cast(pCreature->AI())) - { - pShenAI->CanTalk = true; - pShenAI->m_playerGuid = pPlayer->GetObjectGuid(); - } + pShenAI->DoStartQuestEvent(pPlayer); } + return true; } diff --git a/scripts/kalimdor/tanaris.cpp b/scripts/kalimdor/tanaris.cpp index 943b0ab54..6de0a4f8d 100644 --- a/scripts/kalimdor/tanaris.cpp +++ b/scripts/kalimdor/tanaris.cpp @@ -38,89 +38,92 @@ EndContentData */ ## mob_aquementas ######*/ -#define AGGRO_YELL_AQUE -1000168 +enum +{ + AGGRO_YELL_AQUE = -1000168, + + SPELL_AQUA_JET = 13586, + SPELL_FROST_SHOCK = 15089, -#define SPELL_AQUA_JET 13586 -#define SPELL_FROST_SHOCK 15089 + ITEM_SILVER_TOTEM = 11522, + ITEM_BOOK_AQUOR = 11169, + ITEM_SILVERY_CLAWS = 11172, + ITEM_IRONTREE_HEART = 11173, + + FACTION_FRIENDLY = 35, + FACTION_ELEMENTAL = 91, +}; struct MANGOS_DLL_DECL mob_aquementasAI : public ScriptedAI { - mob_aquementasAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + mob_aquementasAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } - uint32 SendItem_Timer; - uint32 SwitchFaction_Timer; - bool isFriendly; - - uint32 FrostShock_Timer; - uint32 AquaJet_Timer; + uint32 m_uiSwitchFactionTimer; + uint32 m_uiFrostShockTimer; + uint32 m_uiAquaJetTimer; void Reset() { - SendItem_Timer = 0; - SwitchFaction_Timer = 10000; - m_creature->setFaction(35); - isFriendly = true; + m_uiSwitchFactionTimer = 10000; + m_uiAquaJetTimer = 5000; + m_uiFrostShockTimer = 1000; - AquaJet_Timer = 5000; - FrostShock_Timer = 1000; + m_creature->setFaction(FACTION_FRIENDLY); } - void SendItem(Unit* receiver) + void SendItem(Unit* pReceiver) { - if (((Player*)receiver)->HasItemCount(11169,1,false) && - ((Player*)receiver)->HasItemCount(11172,11,false) && - ((Player*)receiver)->HasItemCount(11173,1,false) && - !((Player*)receiver)->HasItemCount(11522,1,true)) + if (((Player*)pReceiver)->HasItemCount(ITEM_BOOK_AQUOR, 1) && + ((Player*)pReceiver)->HasItemCount(ITEM_SILVERY_CLAWS, 11) && + ((Player*)pReceiver)->HasItemCount(ITEM_IRONTREE_HEART, 1)) { - if (Item* pItem = ((Player*)receiver)->StoreNewItemInInventorySlot(11522, 1)) - ((Player*)receiver)->SendNewItem(pItem, 1, true, false); + if (Item* pItem = ((Player*)pReceiver)->StoreNewItemInInventorySlot(ITEM_SILVER_TOTEM, 1)) + ((Player*)pReceiver)->SendNewItem(pItem, 1, true, false); } } - void Aggro(Unit* who) + void Aggro(Unit* pWho) { - DoScriptText(AGGRO_YELL_AQUE, m_creature, who); + DoScriptText(AGGRO_YELL_AQUE, m_creature, pWho); + SendItem(pWho); } - void UpdateAI(const uint32 diff) + void UpdateAI(const uint32 uiDiff) { - if (isFriendly) + if (m_uiSwitchFactionTimer) { - if (SwitchFaction_Timer < diff) + if (m_uiSwitchFactionTimer <= uiDiff) { - m_creature->setFaction(91); - isFriendly = false; - }else SwitchFaction_Timer -= diff; + m_creature->setFaction(FACTION_ELEMENTAL); + m_uiSwitchFactionTimer = 0; + } + else + m_uiSwitchFactionTimer -= uiDiff; } if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - if (!isFriendly) + if (m_uiFrostShockTimer < uiDiff) { - if (SendItem_Timer < diff) - { - if (m_creature->getVictim()->GetTypeId() == TYPEID_PLAYER) - SendItem(m_creature->getVictim()); - SendItem_Timer = 5000; - }else SendItem_Timer -= diff; + DoCastSpellIfCan(m_creature->getVictim(), SPELL_FROST_SHOCK); + m_uiFrostShockTimer = 15000; } + else + m_uiFrostShockTimer -= uiDiff; - if (FrostShock_Timer < diff) + if (m_uiAquaJetTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_FROST_SHOCK); - FrostShock_Timer = 15000; - }else FrostShock_Timer -= diff; - - if (AquaJet_Timer < diff) - { - DoCastSpellIfCan(m_creature,SPELL_AQUA_JET); - AquaJet_Timer = 15000; - }else AquaJet_Timer -= diff; + DoCastSpellIfCan(m_creature, SPELL_AQUA_JET); + m_uiAquaJetTimer = 15000; + } + else + m_uiAquaJetTimer -= uiDiff; DoMeleeAttackIfReady(); } }; + CreatureAI* GetAI_mob_aquementas(Creature* pCreature) { return new mob_aquementasAI(pCreature); @@ -130,33 +133,41 @@ CreatureAI* GetAI_mob_aquementas(Creature* pCreature) ## npc_custodian_of_time ######*/ -#define WHISPER_CUSTODIAN_1 -1000217 -#define WHISPER_CUSTODIAN_2 -1000218 -#define WHISPER_CUSTODIAN_3 -1000219 -#define WHISPER_CUSTODIAN_4 -1000220 -#define WHISPER_CUSTODIAN_5 -1000221 -#define WHISPER_CUSTODIAN_6 -1000222 -#define WHISPER_CUSTODIAN_7 -1000223 -#define WHISPER_CUSTODIAN_8 -1000224 -#define WHISPER_CUSTODIAN_9 -1000225 -#define WHISPER_CUSTODIAN_10 -1000226 -#define WHISPER_CUSTODIAN_11 -1000227 -#define WHISPER_CUSTODIAN_12 -1000228 -#define WHISPER_CUSTODIAN_13 -1000229 -#define WHISPER_CUSTODIAN_14 -1000230 +enum +{ + WHISPER_CUSTODIAN_1 = -1000217, + WHISPER_CUSTODIAN_2 = -1000218, + WHISPER_CUSTODIAN_3 = -1000219, + WHISPER_CUSTODIAN_4 = -1000220, + WHISPER_CUSTODIAN_5 = -1000221, + WHISPER_CUSTODIAN_6 = -1000222, + WHISPER_CUSTODIAN_7 = -1000223, + WHISPER_CUSTODIAN_8 = -1000224, + WHISPER_CUSTODIAN_9 = -1000225, + WHISPER_CUSTODIAN_10 = -1000226, + WHISPER_CUSTODIAN_11 = -1000227, + WHISPER_CUSTODIAN_12 = -1000228, + WHISPER_CUSTODIAN_13 = -1000229, + WHISPER_CUSTODIAN_14 = -1000230, + + SPELL_CUSTODIAN_OF_TIME = 34877, + SPELL_QID_10277 = 34883, + + QUEST_ID_CAVERNS_OF_TIME = 10277, +}; struct MANGOS_DLL_DECL npc_custodian_of_timeAI : public npc_escortAI { npc_custodian_of_timeAI(Creature* pCreature) : npc_escortAI(pCreature) { Reset(); } - void WaypointReached(uint32 i) + void WaypointReached(uint32 uiPointId) { Player* pPlayer = GetPlayerForEscort(); if (!pPlayer) return; - switch(i) + switch(uiPointId) { case 0: DoScriptText(WHISPER_CUSTODIAN_1, m_creature, pPlayer); break; case 1: DoScriptText(WHISPER_CUSTODIAN_2, m_creature, pPlayer); break; @@ -177,9 +188,7 @@ struct MANGOS_DLL_DECL npc_custodian_of_timeAI : public npc_escortAI case 23: DoScriptText(WHISPER_CUSTODIAN_4, m_creature, pPlayer); break; case 24: DoScriptText(WHISPER_CUSTODIAN_14, m_creature, pPlayer); - DoCastSpellIfCan(pPlayer, 34883); - //below here is temporary workaround, to be removed when spell works properly - pPlayer->AreaExploredOrEventHappens(10277); + DoCastSpellIfCan(pPlayer, SPELL_QID_10277); break; } } @@ -191,11 +200,11 @@ struct MANGOS_DLL_DECL npc_custodian_of_timeAI : public npc_escortAI if (pWho->GetTypeId() == TYPEID_PLAYER) { - if (pWho->HasAura(34877, EFFECT_INDEX_1) && ((Player*)pWho)->GetQuestStatus(10277) == QUEST_STATUS_INCOMPLETE) + if (pWho->HasAura(SPELL_CUSTODIAN_OF_TIME) && ((Player*)pWho)->GetQuestStatus(QUEST_ID_CAVERNS_OF_TIME) == QUEST_STATUS_INCOMPLETE) { - float Radius = 10.0; + float fRadius = 10.0f; - if (m_creature->IsWithinDistInMap(pWho, Radius)) + if (m_creature->IsWithinDistInMap(pWho, fRadius)) Start(false, (Player*)pWho); } } diff --git a/scripts/kalimdor/the_barrens.cpp b/scripts/kalimdor/the_barrens.cpp index 06b2ea169..9ee589db7 100644 --- a/scripts/kalimdor/the_barrens.cpp +++ b/scripts/kalimdor/the_barrens.cpp @@ -202,57 +202,57 @@ enum struct MANGOS_DLL_DECL npc_taskmaster_fizzuleAI : public ScriptedAI { - npc_taskmaster_fizzuleAI(Creature* pCreature) : ScriptedAI(pCreature) - { - factionNorm = pCreature->getFaction(); - Reset(); - } + npc_taskmaster_fizzuleAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } - uint32 factionNorm; - bool IsFriend; - uint32 Reset_Timer; - uint8 FlareCount; + uint32 m_uiResetTimer; + uint8 m_uiFlareCount; void Reset() { - IsFriend = false; - Reset_Timer = 120000; - FlareCount = 0; - m_creature->setFaction(factionNorm); + m_uiResetTimer = 0; + m_uiFlareCount = 0; } - void DoFriend() + void EnterEvadeMode() { - m_creature->RemoveAllAuras(); - m_creature->DeleteThreatList(); - m_creature->CombatStop(true); + if (m_uiResetTimer) + { + m_creature->RemoveAllAuras(); + m_creature->DeleteThreatList(); + m_creature->CombatStop(true); + m_creature->LoadCreatureAddon(true); - m_creature->StopMoving(); - m_creature->GetMotionMaster()->MoveIdle(); + m_creature->SetLootRecipient(NULL); - m_creature->setFaction(FACTION_FRIENDLY_F); - m_creature->HandleEmote(EMOTE_ONESHOT_SALUTE); + m_creature->SetFactionTemporary(FACTION_FRIENDLY_F, TEMPFACTION_RESTORE_REACH_HOME); + m_creature->HandleEmote(EMOTE_ONESHOT_SALUTE); + } + else + ScriptedAI::EnterEvadeMode(); } - void SpellHit(Unit *caster, const SpellEntry *spell) + void SpellHit(Unit* pCaster, const SpellEntry* pSpell) { - if (spell->Id == SPELL_FLARE || spell->Id == SPELL_FOLLY) + if (pCaster->GetTypeId() == TYPEID_PLAYER && (pSpell->Id == SPELL_FLARE || pSpell->Id == SPELL_FOLLY)) { - ++FlareCount; + ++m_uiFlareCount; - if (FlareCount >= 2) - IsFriend = true; + if (m_uiFlareCount >= 2 && m_creature->getFaction() != FACTION_FRIENDLY_F) + m_uiResetTimer = 120000; } } - void UpdateAI(const uint32 diff) + void UpdateAI(const uint32 uiDiff) { - if (IsFriend) + if (m_uiResetTimer) { - if (Reset_Timer < diff) + if (m_uiResetTimer <= uiDiff) { + m_uiResetTimer = 0; EnterEvadeMode(); - } else Reset_Timer -= diff; + } + else + m_uiResetTimer -= uiDiff; } if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) @@ -261,17 +261,12 @@ struct MANGOS_DLL_DECL npc_taskmaster_fizzuleAI : public ScriptedAI DoMeleeAttackIfReady(); } - void ReceiveEmote(Player* pPlayer, uint32 emote) + void ReceiveEmote(Player* pPlayer, uint32 uiTextEmote) { - if (emote == TEXTEMOTE_SALUTE) + if (uiTextEmote == TEXTEMOTE_SALUTE) { - if (FlareCount >= 2) - { - if (m_creature->getFaction() == FACTION_FRIENDLY_F) - return; - - DoFriend(); - } + if (m_uiFlareCount >= 2 && m_creature->getFaction() != FACTION_FRIENDLY_F) + EnterEvadeMode(); } } }; @@ -285,65 +280,74 @@ CreatureAI* GetAI_npc_taskmaster_fizzule(Creature* pCreature) ## npc_twiggy_flathead #####*/ -#define SAY_BIG_WILL_READY -1000123 -#define SAY_TWIGGY_BEGIN -1000124 -#define SAY_TWIGGY_FRAY -1000125 -#define SAY_TWIGGY_DOWN -1000126 -#define SAY_TWIGGY_OVER -1000127 +enum +{ + SAY_BIG_WILL_READY = -1000123, + SAY_TWIGGY_BEGIN = -1000124, + SAY_TWIGGY_FRAY = -1000125, + SAY_TWIGGY_DOWN = -1000126, + SAY_TWIGGY_OVER = -1000127, + + NPC_TWIGGY = 6248, + NPC_BIG_WILL = 6238, + NPC_AFFRAY_CHALLENGER = 6240, + + QUEST_AFFRAY = 1719, + + FACTION_FRIENDLY = 35, + FACTION_HOSTILE_WILL = 32, + FACTION_HOSTILE_CHALLENGER = 14, -#define NPC_TWIGGY 6248 -#define NPC_BIG_WILL 6238 -#define NPC_AFFRAY_CHALLENGER 6240 -#define QUEST_AFFRAY 1719 + MAX_CHALLENGERS = 6, +}; -float AffrayChallengerLoc[6][4]= +static const float aAffrayChallengerLoc[8][4]= { {-1683.0f, -4326.0f, 2.79f, 0.00f}, {-1682.0f, -4329.0f, 2.79f, 0.00f}, {-1683.0f, -4330.0f, 2.79f, 0.00f}, {-1680.0f, -4334.0f, 2.79f, 1.49f}, {-1674.0f, -4326.0f, 2.79f, 3.49f}, - {-1677.0f, -4334.0f, 2.79f, 1.66f} + {-1677.0f, -4334.0f, 2.79f, 1.66f}, + {-1713.79f, -4342.09f, 6.05f, 6.15f}, // Big Will spawn loc + {-1682.31f, -4329.68f, 2.78f, 0.0f}, // Big Will move loc }; struct MANGOS_DLL_DECL npc_twiggy_flatheadAI : public ScriptedAI { - npc_twiggy_flatheadAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + npc_twiggy_flatheadAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } - bool EventInProgress; + bool m_bIsEventInProgress; - uint32 Event_Timer; - uint32 Step; - uint32 Challenger_Count; - uint32 ChallengerDeath_Timer; + uint32 m_uiEventTimer; + uint32 m_uiChallengerCount; + uint8 m_uiStep; ObjectGuid m_playerGuid; ObjectGuid m_bigWillGuid; - ObjectGuid m_aAffrayChallengerGuids[6]; + GUIDVector m_vAffrayChallengerGuidsVector; void Reset() { - EventInProgress = false; + m_bIsEventInProgress = false; - Event_Timer = 2000; - Step = 0; - Challenger_Count = 0; - ChallengerDeath_Timer = 0; + m_uiEventTimer = 1000; + m_uiChallengerCount = 0; + m_uiStep = 0; m_playerGuid.Clear(); m_bigWillGuid.Clear(); - - for(uint8 i = 0; i < 6; ++i) - m_aAffrayChallengerGuids[i].Clear(); + m_vAffrayChallengerGuidsVector.clear(); } bool CanStartEvent(Player* pPlayer) { - if (!EventInProgress) + if (!m_bIsEventInProgress) { - EventInProgress = true; - m_playerGuid = pPlayer->GetObjectGuid(); DoScriptText(SAY_TWIGGY_BEGIN, m_creature, pPlayer); + m_playerGuid = pPlayer->GetObjectGuid(); + m_bIsEventInProgress = true; + return true; } @@ -353,110 +357,113 @@ struct MANGOS_DLL_DECL npc_twiggy_flatheadAI : public ScriptedAI void SetChallengers() { - for(uint8 i = 0; i < 6; ++i) - { - Creature* pCreature = m_creature->SummonCreature(NPC_AFFRAY_CHALLENGER, AffrayChallengerLoc[i][0], AffrayChallengerLoc[i][1], AffrayChallengerLoc[i][2], AffrayChallengerLoc[i][3], TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 600000); - if (!pCreature) - { - debug_log("SD2: npc_twiggy_flathead event cannot summon challenger as expected."); - continue; - } + m_vAffrayChallengerGuidsVector.reserve(MAX_CHALLENGERS); - pCreature->setFaction(35); - pCreature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - pCreature->HandleEmote(EMOTE_ONESHOT_ROAR); - m_aAffrayChallengerGuids[i] = pCreature->GetObjectGuid(); - } + for (uint8 i = 0; i < MAX_CHALLENGERS; ++i) + m_creature->SummonCreature(NPC_AFFRAY_CHALLENGER, aAffrayChallengerLoc[i][0], aAffrayChallengerLoc[i][1], aAffrayChallengerLoc[i][2], aAffrayChallengerLoc[i][3], TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 600000); } - void SetChallengerReady(Unit *pUnit) + void SetChallengerReady(Creature* pChallenger) { - pUnit->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - pUnit->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - pUnit->HandleEmote(EMOTE_ONESHOT_ROAR); - pUnit->setFaction(14); + pChallenger->setFaction(FACTION_HOSTILE_CHALLENGER); + pChallenger->HandleEmote(EMOTE_ONESHOT_ROAR); + ++m_uiChallengerCount; + + if (Player* pPlayer = m_creature->GetMap()->GetPlayer(m_playerGuid)) + pChallenger->AI()->AttackStart(pPlayer); + } + + void JustSummoned(Creature* pSummoned) + { + if (pSummoned->GetEntry() == NPC_BIG_WILL) + { + m_bigWillGuid = pSummoned->GetObjectGuid(); + pSummoned->setFaction(FACTION_FRIENDLY); + pSummoned->SetWalk(false); + pSummoned->GetMotionMaster()->MovePoint(1, aAffrayChallengerLoc[7][0], aAffrayChallengerLoc[7][1], aAffrayChallengerLoc[7][2]); + } + else + { + pSummoned->setFaction(FACTION_FRIENDLY); + pSummoned->HandleEmote(EMOTE_ONESHOT_ROAR); + m_vAffrayChallengerGuidsVector.push_back(pSummoned->GetObjectGuid()); + } } - void UpdateAI(const uint32 diff) + void SummonedMovementInform(Creature* pSummoned, uint32 uiMoveType, uint32 uiPointId) { - if (!EventInProgress) + if (uiMoveType != POINT_MOTION_TYPE || !uiPointId || pSummoned->GetEntry() != NPC_BIG_WILL) return; - if (ChallengerDeath_Timer) + pSummoned->setFaction(FACTION_HOSTILE_WILL); + + if (Player* pPlayer = m_creature->GetMap()->GetPlayer(m_playerGuid)) { - if (ChallengerDeath_Timer <= diff) - { - for(uint8 i = 0; i < 6; ++i) - { - Creature *challenger = m_creature->GetMap()->GetCreature(m_aAffrayChallengerGuids[i]); - if (challenger && !challenger->isAlive() && challenger->isDead()) - { - DoScriptText(SAY_TWIGGY_DOWN, m_creature); - challenger->RemoveCorpse(); - m_aAffrayChallengerGuids[i].Clear(); - continue; - } - } - ChallengerDeath_Timer = 2500; - } else ChallengerDeath_Timer -= diff; + DoScriptText(SAY_BIG_WILL_READY, pSummoned, pPlayer); + pSummoned->SetFacingToObject(pPlayer); + } + } + + void SummonedCreatureJustDied(Creature* pSummoned) + { + if (pSummoned->GetEntry() == NPC_BIG_WILL) + { + DoScriptText(SAY_TWIGGY_OVER, m_creature); + EnterEvadeMode(); + } + else + { + DoScriptText(SAY_TWIGGY_DOWN, m_creature); + m_uiEventTimer = 15000; } + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_bIsEventInProgress) + return; - if (Event_Timer < diff) + if (m_uiEventTimer < uiDiff) { Player* pPlayer = m_creature->GetMap()->GetPlayer(m_playerGuid); - if (!pPlayer || pPlayer->isDead()) - Reset(); + if (!pPlayer || !pPlayer->isAlive()) + EnterEvadeMode(); - switch(Step) + switch (m_uiStep) { case 0: SetChallengers(); - ChallengerDeath_Timer = 2500; - Event_Timer = 5000; - ++Step; + m_uiEventTimer = 5000; + ++m_uiStep; break; case 1: DoScriptText(SAY_TWIGGY_FRAY, m_creature); - if (Creature *challenger = m_creature->GetMap()->GetCreature(m_aAffrayChallengerGuids[Challenger_Count])) - SetChallengerReady(challenger); - else Reset(); - ++Challenger_Count; - Event_Timer = 25000; - if (Challenger_Count == 6) - ++Step; - break; - case 2: - if (Unit *temp = m_creature->SummonCreature(NPC_BIG_WILL, -1713.79f, -4342.09f, 6.05f, 6.15f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,300000)) + if (Creature* pChallenger = m_creature->GetMap()->GetCreature(m_vAffrayChallengerGuidsVector[m_uiChallengerCount])) + SetChallengerReady(pChallenger); + else + EnterEvadeMode(); + + if (m_uiChallengerCount == MAX_CHALLENGERS) { - m_bigWillGuid = temp->GetObjectGuid(); - temp->setFaction(35); - temp->GetMotionMaster()->MovePoint(0, -1682.31f, -4329.68f, 2.78f); + ++m_uiStep; + m_uiEventTimer = 5000; } - Event_Timer = 15000; - ++Step; + else + m_uiEventTimer = 25000; break; - case 3: - if (Creature *will = m_creature->GetMap()->GetCreature(m_bigWillGuid)) - { - will->setFaction(32); - DoScriptText(SAY_BIG_WILL_READY, will, pPlayer); - } - Event_Timer = 5000; - ++Step; + case 2: + m_creature->SummonCreature(NPC_BIG_WILL, aAffrayChallengerLoc[6][0], aAffrayChallengerLoc[6][1], aAffrayChallengerLoc[6][2], aAffrayChallengerLoc[6][3], TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 300000); + m_uiEventTimer = 15000; + ++m_uiStep; break; - case 4: - Creature *will = m_creature->GetMap()->GetCreature(m_bigWillGuid); - if (will && will->isDead()) - { - DoScriptText(SAY_TWIGGY_OVER, m_creature); - Reset(); - } else if (!will) - Reset(); - Event_Timer = 5000; + default: + m_uiEventTimer = 5000; break; } - } else Event_Timer -= diff; + } + else + m_uiEventTimer -= uiDiff; } }; @@ -467,10 +474,9 @@ CreatureAI* GetAI_npc_twiggy_flathead(Creature* pCreature) bool AreaTrigger_at_twiggy_flathead(Player* pPlayer, AreaTriggerEntry const* pAt) { - if (!pPlayer->isDead() && pPlayer->GetQuestStatus(QUEST_AFFRAY) == QUEST_STATUS_INCOMPLETE) + if (pPlayer->isAlive() && !pPlayer->isGameMaster() && pPlayer->GetQuestStatus(QUEST_AFFRAY) == QUEST_STATUS_INCOMPLETE) { Creature* pCreature = GetClosestCreatureWithEntry(pPlayer, NPC_TWIGGY, 30.0f); - if (!pCreature) return true; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 4575ec5f6..fbc1c2b38 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2608" + #define SD2_REVISION_NR "2609" #endif // __SD2_REVISION_NR_H__ From a17e8660fc551c09c35a6fd011221857f7ee4fb8 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Wed, 4 Jul 2012 01:44:10 +0200 Subject: [PATCH 0598/1172] [2610] Use Guid-container typedefs from MaNGOS. Requires [12026] Signed-off-by: Schmoozerd --- ScriptMgr.h | 6 ------ include/sc_instance.h | 1 + .../blackrock_depths/blackrock_depths.cpp | 4 ++-- .../blackrock_depths/blackrock_depths.h | 2 +- .../instance_blackrock_depths.cpp | 2 +- .../blackrock_spire/blackrock_spire.h | 14 +++++++------- .../blackrock_spire/boss_pyroguard_emberseer.cpp | 4 ++-- .../blackrock_spire/instance_blackrock_spire.cpp | 8 ++++---- .../blackwing_lair/blackwing_lair.h | 8 ++++---- .../blackwing_lair/instance_blackwing_lair.cpp | 4 ++-- scripts/eastern_kingdoms/eastern_plaguelands.cpp | 4 ++-- .../gnomeregan/boss_thermaplugg.cpp | 8 ++++---- .../eastern_kingdoms/gnomeregan/gnomeregan.cpp | 4 ++-- scripts/eastern_kingdoms/gnomeregan/gnomeregan.h | 6 +++--- .../gnomeregan/instance_gnomeregan.cpp | 6 +++--- .../karazhan/boss_prince_malchezaar.cpp | 6 +++--- .../magisters_terrace/boss_selin_fireheart.cpp | 10 +++++----- .../instance_magisters_terrace.cpp | 2 +- .../magisters_terrace/magisters_terrace.h | 4 ++-- .../molten_core/boss_majordomo_executus.cpp | 4 ++-- scripts/eastern_kingdoms/stormwind_city.cpp | 8 ++++---- .../stratholme/instance_stratholme.cpp | 12 ++++++------ scripts/eastern_kingdoms/stratholme/stratholme.h | 12 ++++++------ .../sunken_temple/instance_sunken_temple.cpp | 8 ++++---- .../sunken_temple/sunken_temple.h | 6 +++--- .../sunwell_plateau/boss_muru.cpp | 4 ++-- .../uldaman/instance_uldaman.cpp | 6 +++--- scripts/eastern_kingdoms/uldaman/uldaman.h | 2 +- .../eastern_kingdoms/zulaman/boss_janalai.cpp | 6 +++--- scripts/eastern_kingdoms/zulaman/boss_zuljin.cpp | 4 ++-- .../zulaman/instance_zulaman.cpp | 6 +++--- scripts/eastern_kingdoms/zulaman/zulaman.h | 4 ++-- .../eastern_kingdoms/zulgurub/boss_jeklik.cpp | 4 ++-- .../zulgurub/instance_zulgurub.cpp | 6 +++--- scripts/eastern_kingdoms/zulgurub/zulgurub.h | 6 +++--- .../culling_of_stratholme.h | 14 +++++++------- .../instance_culling_of_stratholme.cpp | 6 +++--- scripts/kalimdor/caverns_of_time/hyjal/hyjal.h | 2 +- .../kalimdor/caverns_of_time/hyjal/hyjalAI.cpp | 2 +- scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.h | 2 +- .../caverns_of_time/hyjal/instance_hyjal.cpp | 2 +- scripts/kalimdor/dire_maul/dire_maul.h | 6 +++--- .../kalimdor/dire_maul/instance_dire_maul.cpp | 6 +++--- scripts/kalimdor/moonglade.cpp | 4 ++-- .../kalimdor/ruins_of_ahnqiraj/boss_ayamiss.cpp | 4 ++-- scripts/kalimdor/silithus.cpp | 4 ++-- .../mob_anubisath_sentinel.cpp | 8 ++++---- scripts/kalimdor/the_barrens.cpp | 2 +- .../northrend/azjol-nerub/ahnkahet/ahnkahet.h | 12 ++++++------ .../azjol-nerub/ahnkahet/boss_jedoga.cpp | 6 +++--- .../azjol-nerub/ahnkahet/boss_taldaram.cpp | 8 ++++---- .../azjol-nerub/ahnkahet/instance_ahnkahet.cpp | 4 ++-- .../azjol-nerub/azjol-nerub/azjol-nerub.h | 4 ++-- .../azjol-nerub/instance_azjol-nerub.cpp | 2 +- .../northrend/draktharon_keep/boss_trollgore.cpp | 2 +- .../northrend/draktharon_keep/draktharon_keep.h | 8 ++++---- .../draktharon_keep/instance_draktharon_keep.cpp | 6 +++--- scripts/northrend/gundrak/gundrak.h | 8 ++++---- scripts/northrend/gundrak/instance_gundrak.cpp | 6 +++--- .../forge_of_souls/boss_devourer_of_souls.cpp | 6 +++--- .../frozen_halls/forge_of_souls/forge_of_souls.h | 4 ++-- .../forge_of_souls/instance_forge_of_souls.cpp | 4 ++-- .../icecrown_citadel/boss_lady_deathwhisper.cpp | 16 ++++++++-------- .../icecrown_citadel/icecrown_citadel.h | 4 ++-- scripts/northrend/naxxramas/boss_gluth.cpp | 6 +++--- scripts/northrend/naxxramas/boss_gothik.cpp | 16 ++++++++-------- scripts/northrend/naxxramas/boss_kelthuzad.cpp | 8 ++++---- scripts/northrend/naxxramas/boss_thaddius.cpp | 8 ++++---- .../northrend/naxxramas/instance_naxxramas.cpp | 4 ++-- scripts/northrend/naxxramas/naxxramas.h | 8 ++++---- .../northrend/nexus/oculus/instance_oculus.cpp | 2 +- scripts/northrend/nexus/oculus/oculus.h | 2 +- .../ulduar/halls_of_lightning/boss_ionar.cpp | 6 +++--- .../ulduar/halls_of_lightning/boss_volkhan.cpp | 6 +++--- .../ulduar/halls_of_stone/halls_of_stone.cpp | 4 ++-- .../ulduar/halls_of_stone/halls_of_stone.h | 10 +++++----- .../halls_of_stone/instance_halls_of_stone.cpp | 4 ++-- .../ulduar/ulduar/boss_general_vezax.cpp | 6 +++--- .../utgarde_keep/utgarde_keep/boss_keleseth.cpp | 4 ++-- .../violet_hold/instance_violet_hold.cpp | 6 +++--- scripts/northrend/violet_hold/violet_hold.cpp | 6 +++--- scripts/northrend/violet_hold/violet_hold.h | 12 ++++++------ .../auchindoun/sethekk_halls/boss_anzu.cpp | 4 ++-- .../shadow_labyrinth/boss_grandmaster_vorpil.cpp | 4 ++-- .../outland/black_temple/boss_shade_of_akama.cpp | 16 ++++++++-------- scripts/outland/black_temple/boss_supremus.cpp | 4 ++-- .../steam_vault/instance_steam_vault.cpp | 2 +- .../coilfang_reservoir/steam_vault/steam_vault.h | 2 +- .../blood_furnace/blood_furnace.h | 8 ++++---- .../blood_furnace/boss_kelidan_the_breaker.cpp | 10 +++++----- .../blood_furnace/instance_blood_furnace.cpp | 6 +++--- .../hellfire_ramparts/hellfire_ramparts.h | 2 +- .../instance_hellfire_ramparts.cpp | 2 +- .../instance_magtheridons_lair.cpp | 10 +++++----- .../magtheridons_lair/magtheridons_lair.h | 4 ++-- .../boss_warchief_kargath_bladefist.cpp | 8 ++++---- scripts/outland/tempest_keep/arcatraz/arcatraz.h | 2 +- .../tempest_keep/arcatraz/instance_arcatraz.cpp | 2 +- .../tempest_keep/the_eye/boss_astromancer.cpp | 2 +- .../outland/tempest_keep/the_mechanar/mechanar.h | 2 +- scripts/world/npcs_special.cpp | 4 ++-- sd2_revision_nr.h | 2 +- sql/scriptdev2_script_full.sql | 2 +- sql/updates/r2610_scriptdev2.sql | 1 + 104 files changed, 288 insertions(+), 292 deletions(-) create mode 100644 sql/updates/r2610_scriptdev2.sql diff --git a/ScriptMgr.h b/ScriptMgr.h index 563d0a7ee..63f29bbd2 100644 --- a/ScriptMgr.h +++ b/ScriptMgr.h @@ -30,12 +30,6 @@ class ObjectGuid; #define VISIBLE_RANGE (166.0f) // MAX visible range (size of grid) #define DEFAULT_TEXT "" -// Some typedefs for storing Guids -typedef std::list GUIDList; -typedef std::set GUIDSet; -typedef std::vector GUIDVector; -typedef std::map EntryGuidMap; - /* Escort Factions * TODO: find better namings and definitions. * N=Neutral, A=Alliance, H=Horde. diff --git a/include/sc_instance.h b/include/sc_instance.h index e1469e5d0..752ecfca5 100644 --- a/include/sc_instance.h +++ b/include/sc_instance.h @@ -63,6 +63,7 @@ class MANGOS_DLL_DECL ScriptedInstance : public InstanceData protected: // Storage for GO-Guids and NPC-Guids + typedef std::map EntryGuidMap; EntryGuidMap m_mGoEntryGuidStore; ///< Store unique GO-Guids by entry EntryGuidMap m_mNpcEntryGuidStore; ///< Store unique NPC-Guids by entry }; diff --git a/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.cpp b/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.cpp index 6332c0fdf..60e01df5e 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.cpp +++ b/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.cpp @@ -188,7 +188,7 @@ struct MANGOS_DLL_DECL npc_grimstoneAI : public npc_escortAI uint32 m_uiGladiatorId[MAX_THELDREN_ADDS]; - GUIDList m_lSummonedGUIDList; + GuidList m_lSummonedGUIDList; void Reset() { @@ -323,7 +323,7 @@ struct MANGOS_DLL_DECL npc_grimstoneAI : public npc_escortAI } // Despawn Summoned Mobs - for (GUIDList::const_iterator itr = m_lSummonedGUIDList.begin(); itr != m_lSummonedGUIDList.end(); ++itr) + for (GuidList::const_iterator itr = m_lSummonedGUIDList.begin(); itr != m_lSummonedGUIDList.end(); ++itr) { if (Creature* pSummoned = m_creature->GetMap()->GetCreature(*itr)) pSummoned->ForcedDespawn(); diff --git a/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.h b/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.h index 99c01f717..14696ada6 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.h +++ b/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.h @@ -130,7 +130,7 @@ class MANGOS_DLL_DECL instance_blackrock_depths : public ScriptedInstance float m_fArenaCenterX, m_fArenaCenterY, m_fArenaCenterZ; - GUIDSet m_sVaultNpcGuids; + GuidSet m_sVaultNpcGuids; }; #endif diff --git a/scripts/eastern_kingdoms/blackrock_depths/instance_blackrock_depths.cpp b/scripts/eastern_kingdoms/blackrock_depths/instance_blackrock_depths.cpp index 952cdb2bc..7474eed3c 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/instance_blackrock_depths.cpp +++ b/scripts/eastern_kingdoms/blackrock_depths/instance_blackrock_depths.cpp @@ -124,7 +124,7 @@ void instance_blackrock_depths::SetData(uint32 uiType, uint32 uiData) Creature* pConstruct = NULL; // Activate vault constructs - for (GUIDSet::const_iterator itr = m_sVaultNpcGuids.begin(); itr != m_sVaultNpcGuids.end(); ++itr) + for (GuidSet::const_iterator itr = m_sVaultNpcGuids.begin(); itr != m_sVaultNpcGuids.end(); ++itr) { if (pConstruct = instance->GetCreature(*itr)) pConstruct->RemoveAurasDueToSpell(SPELL_STONED); diff --git a/scripts/eastern_kingdoms/blackrock_spire/blackrock_spire.h b/scripts/eastern_kingdoms/blackrock_spire/blackrock_spire.h index 145dab9db..5fce5558c 100644 --- a/scripts/eastern_kingdoms/blackrock_spire/blackrock_spire.h +++ b/scripts/eastern_kingdoms/blackrock_spire/blackrock_spire.h @@ -116,8 +116,8 @@ class MANGOS_DLL_DECL instance_blackrock_spire : public ScriptedInstance, privat void DoProcessEmberseerEvent(); void DoSortRoomEventMobs(); - void GetIncarceratorGUIDList(GUIDList &lList) { lList = m_lIncarceratorGUIDList; } - void GetRookeryEggGUIDList(GUIDList &lList) { lList = m_lRookeryEggGUIDList; } + void GetIncarceratorGUIDList(GuidList &lList) { lList = m_lIncarceratorGUIDList; } + void GetRookeryEggGUIDList(GuidList &lList) { lList = m_lRookeryEggGUIDList; } void Update(uint32 uiDiff); @@ -133,11 +133,11 @@ class MANGOS_DLL_DECL instance_blackrock_spire : public ScriptedInstance, privat uint8 m_uiStadiumMobsAlive; ObjectGuid m_aRoomRuneGuid[MAX_ROOMS]; - GUIDList m_alRoomEventMobGUIDSorted[MAX_ROOMS]; - GUIDList m_lRoomEventMobGUIDList; - GUIDList m_lIncarceratorGUIDList; - GUIDList m_lRookeryEggGUIDList; - GUIDList m_lEmberseerRunesGUIDList; + GuidList m_alRoomEventMobGUIDSorted[MAX_ROOMS]; + GuidList m_lRoomEventMobGUIDList; + GuidList m_lIncarceratorGUIDList; + GuidList m_lRookeryEggGUIDList; + GuidList m_lEmberseerRunesGUIDList; }; #endif diff --git a/scripts/eastern_kingdoms/blackrock_spire/boss_pyroguard_emberseer.cpp b/scripts/eastern_kingdoms/blackrock_spire/boss_pyroguard_emberseer.cpp index 9c46e5e1b..8c78aefce 100644 --- a/scripts/eastern_kingdoms/blackrock_spire/boss_pyroguard_emberseer.cpp +++ b/scripts/eastern_kingdoms/blackrock_spire/boss_pyroguard_emberseer.cpp @@ -125,10 +125,10 @@ struct MANGOS_DLL_DECL boss_pyroguard_emberseerAI : public ScriptedAI { if (m_uiEncageTimer <= uiDiff) { - GUIDList m_lIncarceratorsGuid; + GuidList m_lIncarceratorsGuid; m_pInstance->GetIncarceratorGUIDList(m_lIncarceratorsGuid); - for (GUIDList::const_iterator itr = m_lIncarceratorsGuid.begin(); itr != m_lIncarceratorsGuid.end(); ++itr) + for (GuidList::const_iterator itr = m_lIncarceratorsGuid.begin(); itr != m_lIncarceratorsGuid.end(); ++itr) { if (Creature* pIncarcerator = m_creature->GetMap()->GetCreature(*itr)) pIncarcerator->CastSpell(m_creature, SPELL_ENCAGE_EMBERSEER, false); diff --git a/scripts/eastern_kingdoms/blackrock_spire/instance_blackrock_spire.cpp b/scripts/eastern_kingdoms/blackrock_spire/instance_blackrock_spire.cpp index 095eff522..96db4888d 100644 --- a/scripts/eastern_kingdoms/blackrock_spire/instance_blackrock_spire.cpp +++ b/scripts/eastern_kingdoms/blackrock_spire/instance_blackrock_spire.cpp @@ -180,7 +180,7 @@ void instance_blackrock_spire::SetData(uint32 uiType, uint32 uiData) // Respawn all incarcerators and reset the runes on FAIL if (uiData == FAIL) { - for (GUIDList::const_iterator itr = m_lIncarceratorGUIDList.begin(); itr != m_lIncarceratorGUIDList.end(); ++itr) + for (GuidList::const_iterator itr = m_lIncarceratorGUIDList.begin(); itr != m_lIncarceratorGUIDList.end(); ++itr) { if (Creature* pIncarcerator = instance->GetCreature(*itr)) { @@ -316,7 +316,7 @@ void instance_blackrock_spire::DoSortRoomEventMobs() { if (GameObject* pRune = instance->GetGameObject(m_aRoomRuneGuid[i])) { - for (GUIDList::const_iterator itr = m_lRoomEventMobGUIDList.begin(); itr != m_lRoomEventMobGUIDList.end(); ++itr) + for (GuidList::const_iterator itr = m_lRoomEventMobGUIDList.begin(); itr != m_lRoomEventMobGUIDList.end(); ++itr) { Creature* pCreature = instance->GetCreature(*itr); if (pCreature && pCreature->isAlive() && pCreature->GetDistance(pRune) < 10.0f) @@ -413,7 +413,7 @@ void instance_blackrock_spire::DoProcessEmberseerEvent() } // remove the incarcerators flags and stop casting - for (GUIDList::const_iterator itr = m_lIncarceratorGUIDList.begin(); itr != m_lIncarceratorGUIDList.end(); ++itr) + for (GuidList::const_iterator itr = m_lIncarceratorGUIDList.begin(); itr != m_lIncarceratorGUIDList.end(); ++itr) { if (Creature* pCreature = instance->GetCreature(*itr)) { @@ -431,7 +431,7 @@ void instance_blackrock_spire::DoUseEmberseerRunes(bool bReset) if (m_lEmberseerRunesGUIDList.empty()) return; - for (GUIDList::const_iterator itr = m_lEmberseerRunesGUIDList.begin(); itr != m_lEmberseerRunesGUIDList.end(); itr++) + for (GuidList::const_iterator itr = m_lEmberseerRunesGUIDList.begin(); itr != m_lEmberseerRunesGUIDList.end(); itr++) { if (bReset) { diff --git a/scripts/eastern_kingdoms/blackwing_lair/blackwing_lair.h b/scripts/eastern_kingdoms/blackwing_lair/blackwing_lair.h index 632ddbe8c..0730b2f01 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/blackwing_lair.h +++ b/scripts/eastern_kingdoms/blackwing_lair/blackwing_lair.h @@ -71,10 +71,10 @@ class MANGOS_DLL_DECL instance_blackwing_lair : public ScriptedInstance std::string m_strInstData; uint32 m_auiEncounter[MAX_ENCOUNTER]; - GUIDList m_lTechnicianGuids; - GUIDList m_lGeneratorGuids; - GUIDList m_lDragonEggGuids; - GUIDList m_lDrakonidBonesGuids; + GuidList m_lTechnicianGuids; + GuidList m_lGeneratorGuids; + GuidList m_lDragonEggGuids; + GuidList m_lDrakonidBonesGuids; }; #endif diff --git a/scripts/eastern_kingdoms/blackwing_lair/instance_blackwing_lair.cpp b/scripts/eastern_kingdoms/blackwing_lair/instance_blackwing_lair.cpp index dfc985d45..008e7d9e9 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/instance_blackwing_lair.cpp +++ b/scripts/eastern_kingdoms/blackwing_lair/instance_blackwing_lair.cpp @@ -152,7 +152,7 @@ void instance_blackwing_lair::SetData(uint32 uiType, uint32 uiData) if (!pNefarius) break; - for (GUIDList::const_iterator itr = m_lDrakonidBonesGuids.begin(); itr != m_lDrakonidBonesGuids.end(); ++itr) + for (GuidList::const_iterator itr = m_lDrakonidBonesGuids.begin(); itr != m_lDrakonidBonesGuids.end(); ++itr) { // The Go script will handle the missing spell 23361 if (GameObject* pGo = instance->GetGameObject(*itr)) @@ -166,7 +166,7 @@ void instance_blackwing_lair::SetData(uint32 uiType, uint32 uiData) // Cleanup the drakonid bones if (uiData == FAIL) { - for (GUIDList::const_iterator itr = m_lDrakonidBonesGuids.begin(); itr != m_lDrakonidBonesGuids.end(); ++itr) + for (GuidList::const_iterator itr = m_lDrakonidBonesGuids.begin(); itr != m_lDrakonidBonesGuids.end(); ++itr) { if (GameObject* pGo = instance->GetGameObject(*itr)) pGo->SetLootState(GO_JUST_DEACTIVATED); diff --git a/scripts/eastern_kingdoms/eastern_plaguelands.cpp b/scripts/eastern_kingdoms/eastern_plaguelands.cpp index b34ef891a..45f8cd3f4 100644 --- a/scripts/eastern_kingdoms/eastern_plaguelands.cpp +++ b/scripts/eastern_kingdoms/eastern_plaguelands.cpp @@ -142,7 +142,7 @@ struct MANGOS_DLL_DECL npc_eris_havenfireAI : public ScriptedAI uint8 m_uiSaveCounter; ObjectGuid m_playerGuid; - GUIDList m_lSummonedGuidList; + GuidList m_lSummonedGuidList; void Reset() { @@ -292,7 +292,7 @@ struct MANGOS_DLL_DECL npc_eris_havenfireAI : public ScriptedAI void DoDespawnSummons(bool bIsEventEnd = false) { - for (GUIDList::const_iterator itr = m_lSummonedGuidList.begin(); itr != m_lSummonedGuidList.end(); ++itr) + for (GuidList::const_iterator itr = m_lSummonedGuidList.begin(); itr != m_lSummonedGuidList.end(); ++itr) { if (Creature* pTemp = m_creature->GetMap()->GetCreature(*itr)) { diff --git a/scripts/eastern_kingdoms/gnomeregan/boss_thermaplugg.cpp b/scripts/eastern_kingdoms/gnomeregan/boss_thermaplugg.cpp index 30febcc13..31b754eaa 100644 --- a/scripts/eastern_kingdoms/gnomeregan/boss_thermaplugg.cpp +++ b/scripts/eastern_kingdoms/gnomeregan/boss_thermaplugg.cpp @@ -59,8 +59,8 @@ struct MANGOS_DLL_DECL boss_thermapluggAI : public ScriptedAI sBombFace* m_asBombFaces; float m_afSpawnPos[3]; - GUIDList m_lSummonedBombGUIDs; - GUIDList m_lLandedBombGUIDs; + GuidList m_lSummonedBombGUIDs; + GuidList m_lLandedBombGUIDs; void Reset() { @@ -118,7 +118,7 @@ struct MANGOS_DLL_DECL boss_thermapluggAI : public ScriptedAI m_pInstance->SetData(TYPE_THERMAPLUGG, FAIL); // Remove remaining bombs - for (GUIDList::const_iterator itr = m_lSummonedBombGUIDs.begin(); itr != m_lSummonedBombGUIDs.end(); ++itr) + for (GuidList::const_iterator itr = m_lSummonedBombGUIDs.begin(); itr != m_lSummonedBombGUIDs.end(); ++itr) { if (Creature* pBomb = m_creature->GetMap()->GetCreature(*itr)) pBomb->ForcedDespawn(); @@ -158,7 +158,7 @@ struct MANGOS_DLL_DECL boss_thermapluggAI : public ScriptedAI // Movement of Summoned mobs if (!m_lLandedBombGUIDs.empty()) { - for (GUIDList::const_iterator itr = m_lLandedBombGUIDs.begin(); itr != m_lLandedBombGUIDs.end(); ++itr) + for (GuidList::const_iterator itr = m_lLandedBombGUIDs.begin(); itr != m_lLandedBombGUIDs.end(); ++itr) { if (Creature* pBomb = m_creature->GetMap()->GetCreature(*itr)) pBomb->GetMotionMaster()->MoveFollow(m_creature, 0.0f, 0.0f); diff --git a/scripts/eastern_kingdoms/gnomeregan/gnomeregan.cpp b/scripts/eastern_kingdoms/gnomeregan/gnomeregan.cpp index 82e209f04..07e4994ce 100644 --- a/scripts/eastern_kingdoms/gnomeregan/gnomeregan.cpp +++ b/scripts/eastern_kingdoms/gnomeregan/gnomeregan.cpp @@ -143,7 +143,7 @@ struct MANGOS_DLL_DECL npc_blastmaster_emi_shortfuseAI : public npc_escortAI uint32 m_uiPhaseTimer; ObjectGuid m_playerGuid; bool m_bDidAggroText, m_bSouthernCaveInOpened, m_bNorthernCaveInOpened; - GUIDList m_luiSummonedMobGUIDs; + GuidList m_luiSummonedMobGUIDs; void Reset() { @@ -251,7 +251,7 @@ struct MANGOS_DLL_DECL npc_blastmaster_emi_shortfuseAI : public npc_escortAI if (m_bNorthernCaveInOpened) // close northern cave-in door m_pInstance->DoUseDoorOrButton(GO_CAVE_IN_NORTH); - for (GUIDList::const_iterator itr = m_luiSummonedMobGUIDs.begin(); itr != m_luiSummonedMobGUIDs.end(); ++itr) + for (GuidList::const_iterator itr = m_luiSummonedMobGUIDs.begin(); itr != m_luiSummonedMobGUIDs.end(); ++itr) { if (Creature* pSummoned = m_creature->GetMap()->GetCreature(*itr)) pSummoned->ForcedDespawn(); diff --git a/scripts/eastern_kingdoms/gnomeregan/gnomeregan.h b/scripts/eastern_kingdoms/gnomeregan/gnomeregan.h index cb5e5c781..e224e2df4 100644 --- a/scripts/eastern_kingdoms/gnomeregan/gnomeregan.h +++ b/scripts/eastern_kingdoms/gnomeregan/gnomeregan.h @@ -79,9 +79,9 @@ class MANGOS_DLL_DECL instance_gnomeregan : public ScriptedInstance sBombFace m_asBombFaces[MAX_GNOME_FACES]; ObjectGuid m_aExplosiveSortedGuids[2][MAX_EXPLOSIVES_PER_SIDE]; - GUIDList m_luiExplosiveChargeGUIDs; - GUIDList m_luiSpawnedExplosiveChargeGUIDs; - GUIDList m_lRedRocketGUIDs; + GuidList m_luiExplosiveChargeGUIDs; + GuidList m_luiSpawnedExplosiveChargeGUIDs; + GuidList m_lRedRocketGUIDs; }; #endif diff --git a/scripts/eastern_kingdoms/gnomeregan/instance_gnomeregan.cpp b/scripts/eastern_kingdoms/gnomeregan/instance_gnomeregan.cpp index 639eeb37d..89f9179f3 100644 --- a/scripts/eastern_kingdoms/gnomeregan/instance_gnomeregan.cpp +++ b/scripts/eastern_kingdoms/gnomeregan/instance_gnomeregan.cpp @@ -85,7 +85,7 @@ void instance_gnomeregan::SetData(uint32 uiType, uint32 uiData) if (!m_luiExplosiveChargeGUIDs.empty()) { std::list lExplosiveCharges; - for (GUIDList::const_iterator itr = m_luiExplosiveChargeGUIDs.begin(); itr != m_luiExplosiveChargeGUIDs.end(); ++itr) + for (GuidList::const_iterator itr = m_luiExplosiveChargeGUIDs.begin(); itr != m_luiExplosiveChargeGUIDs.end(); ++itr) { if (GameObject* pCharge = instance->GetGameObject(*itr)) lExplosiveCharges.push_back(pCharge); @@ -125,7 +125,7 @@ void instance_gnomeregan::SetData(uint32 uiType, uint32 uiData) } if (uiData == DONE) { - for (GUIDList::const_iterator itr = m_lRedRocketGUIDs.begin(); itr != m_lRedRocketGUIDs.end(); ++itr) + for (GuidList::const_iterator itr = m_lRedRocketGUIDs.begin(); itr != m_lRedRocketGUIDs.end(); ++itr) DoRespawnGameObject(*itr, HOUR); } break; @@ -152,7 +152,7 @@ void instance_gnomeregan::SetData(uint32 uiType, uint32 uiData) Creature* pBlastmaster = GetSingleCreatureFromStorage(NPC_BLASTMASTER_SHORTFUSE); if (!pBlastmaster) break; - for (GUIDList::const_iterator itr = m_luiSpawnedExplosiveChargeGUIDs.begin(); itr != m_luiSpawnedExplosiveChargeGUIDs.end(); ++itr) + for (GuidList::const_iterator itr = m_luiSpawnedExplosiveChargeGUIDs.begin(); itr != m_luiSpawnedExplosiveChargeGUIDs.end(); ++itr) { if (GameObject* pExplosive = instance->GetGameObject(*itr)) pExplosive->Use(pBlastmaster); diff --git a/scripts/eastern_kingdoms/karazhan/boss_prince_malchezaar.cpp b/scripts/eastern_kingdoms/karazhan/boss_prince_malchezaar.cpp index 89fb1e1c3..4744eccda 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_prince_malchezaar.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_prince_malchezaar.cpp @@ -186,7 +186,7 @@ struct MANGOS_DLL_DECL boss_malchezaarAI : public ScriptedAI uint32 m_uiAxesTargetSwitchTimer; uint32 m_uiInfernalCleanupTimer; - GUIDVector m_vInfernalGuids; + GuidVector m_vInfernalGuids; std::vector m_positions; ObjectGuid m_aAxeGuid[2]; @@ -255,7 +255,7 @@ struct MANGOS_DLL_DECL boss_malchezaarAI : public ScriptedAI void InfernalCleanup() { // Infernal Cleanup - for(GUIDVector::const_iterator itr = m_vInfernalGuids.begin(); itr!= m_vInfernalGuids.end(); ++itr) + for(GuidVector::const_iterator itr = m_vInfernalGuids.begin(); itr!= m_vInfernalGuids.end(); ++itr) { Creature *pInfernal = m_creature->GetMap()->GetCreature(*itr); if (pInfernal && pInfernal->isAlive()) @@ -627,7 +627,7 @@ struct MANGOS_DLL_DECL boss_malchezaarAI : public ScriptedAI void Cleanup(Creature *infernal, InfernalPoint *point) { - for(GUIDVector::iterator itr = m_vInfernalGuids.begin(); itr!= m_vInfernalGuids.end(); ++itr) + for(GuidVector::iterator itr = m_vInfernalGuids.begin(); itr!= m_vInfernalGuids.end(); ++itr) if (*itr == infernal->GetObjectGuid()) { m_vInfernalGuids.erase(itr); diff --git a/scripts/eastern_kingdoms/magisters_terrace/boss_selin_fireheart.cpp b/scripts/eastern_kingdoms/magisters_terrace/boss_selin_fireheart.cpp index 555453bee..849c016f7 100644 --- a/scripts/eastern_kingdoms/magisters_terrace/boss_selin_fireheart.cpp +++ b/scripts/eastern_kingdoms/magisters_terrace/boss_selin_fireheart.cpp @@ -59,7 +59,7 @@ struct MANGOS_DLL_DECL boss_selin_fireheartAI : public ScriptedAI instance_magisters_terrace* m_pInstance; bool m_bIsRegularMode; - GUIDList m_lCrystalGuids; + GuidList m_lCrystalGuids; uint32 m_uiDrainLifeTimer; uint32 m_uiDrainManaTimer; @@ -95,7 +95,7 @@ struct MANGOS_DLL_DECL boss_selin_fireheartAI : public ScriptedAI Creature* pCrystal = NULL; Creature* pCrystalChosen = NULL; - for (GUIDList::const_iterator itr = m_lCrystalGuids.begin(); itr != m_lCrystalGuids.end(); ++itr) + for (GuidList::const_iterator itr = m_lCrystalGuids.begin(); itr != m_lCrystalGuids.end(); ++itr) { pCrystal = m_creature->GetMap()->GetCreature(*itr); @@ -130,7 +130,7 @@ struct MANGOS_DLL_DECL boss_selin_fireheartAI : public ScriptedAI if (m_lCrystalGuids.empty()) return; - for (GUIDList::const_iterator itr = m_lCrystalGuids.begin(); itr != m_lCrystalGuids.end(); ++itr) + for (GuidList::const_iterator itr = m_lCrystalGuids.begin(); itr != m_lCrystalGuids.end(); ++itr) { //Creature* pCrystal = m_creature->GetMap()->GetCreature(FelCrystals[i]); Creature* pCrystal = m_creature->GetMap()->GetCreature(*itr); @@ -152,7 +152,7 @@ struct MANGOS_DLL_DECL boss_selin_fireheartAI : public ScriptedAI { // Get and output crystals m_pInstance->GetFelCrystalList(m_lCrystalGuids); - for (GUIDList::const_iterator itr = m_lCrystalGuids.begin(); itr != m_lCrystalGuids.end(); ++itr) + for (GuidList::const_iterator itr = m_lCrystalGuids.begin(); itr != m_lCrystalGuids.end(); ++itr) debug_log("SD2: Selin: Added Fel Crystal %s to list", ObjectGuid(*itr).GetString().c_str()); } } @@ -164,7 +164,7 @@ struct MANGOS_DLL_DECL boss_selin_fireheartAI : public ScriptedAI { m_pInstance->SetData(TYPE_SELIN, FAIL); - for (GUIDList::const_iterator itr = m_lCrystalGuids.begin(); itr != m_lCrystalGuids.end(); ++itr) + for (GuidList::const_iterator itr = m_lCrystalGuids.begin(); itr != m_lCrystalGuids.end(); ++itr) { if (Creature* pCrystal = m_creature->GetMap()->GetCreature(*itr)) { diff --git a/scripts/eastern_kingdoms/magisters_terrace/instance_magisters_terrace.cpp b/scripts/eastern_kingdoms/magisters_terrace/instance_magisters_terrace.cpp index 0aa8241d4..b39ba398e 100644 --- a/scripts/eastern_kingdoms/magisters_terrace/instance_magisters_terrace.cpp +++ b/scripts/eastern_kingdoms/magisters_terrace/instance_magisters_terrace.cpp @@ -170,7 +170,7 @@ uint32 instance_magisters_terrace::GetData(uint32 uiType) } } -void instance_magisters_terrace::GetFelCrystalList(GUIDList& lList) +void instance_magisters_terrace::GetFelCrystalList(GuidList& lList) { if (m_lFelCrystalGuid.empty()) error_log("SD2: Magisters Terrace: No Fel Crystals loaded in Inst Data"); diff --git a/scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.h b/scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.h index 5bae7df07..91072f643 100644 --- a/scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.h +++ b/scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.h @@ -47,7 +47,7 @@ class MANGOS_DLL_DECL instance_magisters_terrace : public ScriptedInstance uint32 GetData(uint32 uiType); void SetData(uint32 uiType, uint32 uiData); - void GetFelCrystalList(GUIDList& lList); + void GetFelCrystalList(GuidList& lList); const char* Save() { return m_strInstData.c_str(); } void Load(const char* chrIn); @@ -58,7 +58,7 @@ class MANGOS_DLL_DECL instance_magisters_terrace : public ScriptedInstance uint32 m_uiDelrissaDeathCount; - GUIDList m_lFelCrystalGuid; + GuidList m_lFelCrystalGuid; }; #endif diff --git a/scripts/eastern_kingdoms/molten_core/boss_majordomo_executus.cpp b/scripts/eastern_kingdoms/molten_core/boss_majordomo_executus.cpp index 098ed9090..7c7f3071f 100644 --- a/scripts/eastern_kingdoms/molten_core/boss_majordomo_executus.cpp +++ b/scripts/eastern_kingdoms/molten_core/boss_majordomo_executus.cpp @@ -85,7 +85,7 @@ struct MANGOS_DLL_DECL boss_majordomoAI : public ScriptedAI bool m_bHasEncounterFinished; uint8 m_uiAddsKilled; uint8 m_uiSpeech; - GUIDList m_luiMajordomoAddsGUIDs; + GuidList m_luiMajordomoAddsGUIDs; void Reset() { @@ -232,7 +232,7 @@ struct MANGOS_DLL_DECL boss_majordomoAI : public ScriptedAI // Unsummon Majordomo adds void UnsummonMajordomoAdds() { - for (GUIDList::const_iterator itr = m_luiMajordomoAddsGUIDs.begin(); itr != m_luiMajordomoAddsGUIDs.end(); ++itr) + for (GuidList::const_iterator itr = m_luiMajordomoAddsGUIDs.begin(); itr != m_luiMajordomoAddsGUIDs.end(); ++itr) { if (Creature* pAdd = m_creature->GetMap()->GetCreature(*itr)) if (pAdd->IsTemporarySummon()) diff --git a/scripts/eastern_kingdoms/stormwind_city.cpp b/scripts/eastern_kingdoms/stormwind_city.cpp index 80a5ffffa..4d61fe41a 100644 --- a/scripts/eastern_kingdoms/stormwind_city.cpp +++ b/scripts/eastern_kingdoms/stormwind_city.cpp @@ -597,8 +597,8 @@ struct MANGOS_DLL_DECL npc_reginald_windsorAI : public npc_escortAI, private Dia ObjectGuid m_playerGuid; ObjectGuid m_guardsGuid[MAX_ROYAL_GUARDS]; - GUIDList m_lRoyalGuardsGuidList; - GUIDSet m_sGuardsSalutedGuidSet; + GuidList m_lRoyalGuardsGuidList; + GuidSet m_sGuardsSalutedGuidSet; void Reset() { @@ -835,7 +835,7 @@ struct MANGOS_DLL_DECL npc_reginald_windsorAI : public npc_escortAI, private Dia } break; case SAY_PRESTOR_KEEP_11: - for (GUIDList::const_iterator itr = m_lRoyalGuardsGuidList.begin(); itr != m_lRoyalGuardsGuidList.end(); ++itr) + for (GuidList::const_iterator itr = m_lRoyalGuardsGuidList.begin(); itr != m_lRoyalGuardsGuidList.end(); ++itr) { if (Creature* pGuard = m_creature->GetMap()->GetCreature(*itr)) { @@ -950,7 +950,7 @@ struct MANGOS_DLL_DECL npc_reginald_windsorAI : public npc_escortAI, private Dia if (m_uiGuardCheckTimer <= uiDiff) { uint8 uiDeadGuardsCount = 0; - for (GUIDList::const_iterator itr = m_lRoyalGuardsGuidList.begin(); itr != m_lRoyalGuardsGuidList.end(); ++itr) + for (GuidList::const_iterator itr = m_lRoyalGuardsGuidList.begin(); itr != m_lRoyalGuardsGuidList.end(); ++itr) { if (Creature* pGuard = m_creature->GetMap()->GetCreature(*itr)) { diff --git a/scripts/eastern_kingdoms/stratholme/instance_stratholme.cpp b/scripts/eastern_kingdoms/stratholme/instance_stratholme.cpp index 14552b452..62a18285f 100644 --- a/scripts/eastern_kingdoms/stratholme/instance_stratholme.cpp +++ b/scripts/eastern_kingdoms/stratholme/instance_stratholme.cpp @@ -197,7 +197,7 @@ void instance_stratholme::SetData(uint32 uiType, uint32 uiData) } uint32 uiCount = m_sAbomnationGUID.size(); - for(GUIDSet::iterator itr = m_sAbomnationGUID.begin(); itr != m_sAbomnationGUID.end();) + for(GuidSet::iterator itr = m_sAbomnationGUID.begin(); itr != m_sAbomnationGUID.end();) { if (Creature* pAbom = instance->GetCreature(*itr)) { @@ -267,7 +267,7 @@ void instance_stratholme::SetData(uint32 uiType, uint32 uiData) m_uiSlaugtherSquareTimer = 0; // Let already moving Abomnations stop - for (GUIDSet::const_iterator itr = m_sAbomnationGUID.begin(); itr != m_sAbomnationGUID.end(); ++itr) + for (GuidSet::const_iterator itr = m_sAbomnationGUID.begin(); itr != m_sAbomnationGUID.end(); ++itr) { Creature* pAbom = instance->GetCreature(*itr); if (pAbom && pAbom->GetMotionMaster()->GetCurrentMovementGeneratorType() == POINT_MOTION_TYPE) @@ -464,7 +464,7 @@ void instance_stratholme::DoSortZiggurats() return; std::list lAcolytes; // Valid pointers, only used locally - for (GUIDList::const_iterator itr = m_luiAcolyteGUIDs.begin(); itr != m_luiAcolyteGUIDs.end(); ++itr) + for (GuidList::const_iterator itr = m_luiAcolyteGUIDs.begin(); itr != m_luiAcolyteGUIDs.end(); ++itr) { if (Creature* pAcolyte = instance->GetCreature(*itr)) lAcolytes.push_back(pAcolyte); @@ -509,7 +509,7 @@ void instance_stratholme::DoSortZiggurats() m_luiAcolyteGUIDs.push_back((*itr)->GetObjectGuid()); // Sort Crystal - for (GUIDList::iterator itr = m_luiCrystalGUIDs.begin(); itr != m_luiCrystalGUIDs.end(); ) + for (GuidList::iterator itr = m_luiCrystalGUIDs.begin(); itr != m_luiCrystalGUIDs.end(); ) { Creature* pCrystal = instance->GetCreature(*itr); if (!pCrystal) @@ -610,7 +610,7 @@ void instance_stratholme::OnCreatureDeath(Creature* pCreature) if (m_luiUndeadGUIDs.empty()) { // Let the black Guards move out of the citadel - for (GUIDList::const_iterator itr = m_luiGuardGUIDs.begin(); itr != m_luiGuardGUIDs.end(); ++itr) + for (GuidList::const_iterator itr = m_luiGuardGUIDs.begin(); itr != m_luiGuardGUIDs.end(); ++itr) { Creature* pGuard = instance->GetCreature(*itr); if (pGuard && pGuard->isAlive() && !pGuard->isInCombat()) @@ -749,7 +749,7 @@ void instance_stratholme::Update(uint32 uiDiff) if (m_uiSlaugtherSquareTimer <= uiDiff) { // Call next Abomnations - for (GUIDSet::const_iterator itr = m_sAbomnationGUID.begin(); itr != m_sAbomnationGUID.end(); ++itr) + for (GuidSet::const_iterator itr = m_sAbomnationGUID.begin(); itr != m_sAbomnationGUID.end(); ++itr) { Creature* pAbom = instance->GetCreature(*itr); // Skip killed and already walking Abomnations diff --git a/scripts/eastern_kingdoms/stratholme/stratholme.h b/scripts/eastern_kingdoms/stratholme/stratholme.h index ab0443d21..edf38f348 100644 --- a/scripts/eastern_kingdoms/stratholme/stratholme.h +++ b/scripts/eastern_kingdoms/stratholme/stratholme.h @@ -108,7 +108,7 @@ struct ZigguratStore { ObjectGuid m_doorGuid; ObjectGuid m_crystalGuid; - GUIDList m_lZigguratAcolyteGuid; + GuidList m_lZigguratAcolyteGuid; }; class MANGOS_DLL_DECL instance_stratholme : public ScriptedInstance @@ -155,11 +155,11 @@ class MANGOS_DLL_DECL instance_stratholme : public ScriptedInstance ZigguratStore m_zigguratStorage[MAX_ZIGGURATS]; std::set m_suiCrimsonLowGuids; - GUIDList m_luiCrystalGUIDs; - GUIDSet m_sAbomnationGUID; - GUIDList m_luiAcolyteGUIDs; - GUIDList m_luiUndeadGUIDs; - GUIDList m_luiGuardGUIDs; + GuidList m_luiCrystalGUIDs; + GuidSet m_sAbomnationGUID; + GuidList m_luiAcolyteGUIDs; + GuidList m_luiUndeadGUIDs; + GuidList m_luiGuardGUIDs; }; #endif diff --git a/scripts/eastern_kingdoms/sunken_temple/instance_sunken_temple.cpp b/scripts/eastern_kingdoms/sunken_temple/instance_sunken_temple.cpp index f77708088..6aea1b4fc 100644 --- a/scripts/eastern_kingdoms/sunken_temple/instance_sunken_temple.cpp +++ b/scripts/eastern_kingdoms/sunken_temple/instance_sunken_temple.cpp @@ -213,7 +213,7 @@ void instance_sunken_temple::SetData(uint32 uiType, uint32 uiData) } // Respawn circles - for (GUIDVector::const_iterator itr = m_vuiCircleGUIDs.begin(); itr != m_vuiCircleGUIDs.end(); ++itr) + for (GuidVector::const_iterator itr = m_vuiCircleGUIDs.begin(); itr != m_vuiCircleGUIDs.end(); ++itr) DoRespawnGameObject(*itr, 30*MINUTE); } else if (uiData == FAIL) @@ -270,7 +270,7 @@ void instance_sunken_temple::DoSpawnAtalarionIfCan() DoRespawnGameObject(GO_IDOL_OF_HAKKAR, 30 * MINUTE); // Spawn the big green lights - for (GUIDList::const_iterator itr = m_luiBigLightGUIDs.begin(); itr != m_luiBigLightGUIDs.end(); ++itr) + for (GuidList::const_iterator itr = m_luiBigLightGUIDs.begin(); itr != m_luiBigLightGUIDs.end(); ++itr) DoRespawnGameObject(*itr, 30*MINUTE); } @@ -303,7 +303,7 @@ bool instance_sunken_temple::ProcessStatueEvent(uint32 uiEventId) void instance_sunken_temple::DoUpdateFlamesFlags(bool bRestore) { - for (GUIDList::const_iterator itr = m_luiFlameGUIDs.begin(); itr != m_luiFlameGUIDs.end(); ++itr) + for (GuidList::const_iterator itr = m_luiFlameGUIDs.begin(); itr != m_luiFlameGUIDs.end(); ++itr) DoToggleGameObjectFlags(*itr, GO_FLAG_NO_INTERACT, bRestore); } @@ -359,7 +359,7 @@ void instance_sunken_temple::Update(uint32 uiDiff) if (m_bIsFirstHakkarWave) // First wave summoned { // Summon at all circles - for (GUIDVector::const_iterator itr = m_vuiCircleGUIDs.begin(); itr != m_vuiCircleGUIDs.end(); ++itr) + for (GuidVector::const_iterator itr = m_vuiCircleGUIDs.begin(); itr != m_vuiCircleGUIDs.end(); ++itr) { if (GameObject* pCircle = instance->GetGameObject(*itr)) pShade->SummonCreature(NPC_HAKKARI_MINION, pCircle->GetPositionX(), pCircle->GetPositionY(), pCircle->GetPositionZ(), 0, TEMPSUMMON_DEAD_DESPAWN, 0); diff --git a/scripts/eastern_kingdoms/sunken_temple/sunken_temple.h b/scripts/eastern_kingdoms/sunken_temple/sunken_temple.h index a21a41fdc..23609d17b 100644 --- a/scripts/eastern_kingdoms/sunken_temple/sunken_temple.h +++ b/scripts/eastern_kingdoms/sunken_temple/sunken_temple.h @@ -141,9 +141,9 @@ class MANGOS_DLL_DECL instance_sunken_temple : public ScriptedInstance bool m_bIsFirstHakkarWave; bool m_bCanSummonBloodkeeper; - GUIDList m_luiFlameGUIDs; - GUIDList m_luiBigLightGUIDs; - GUIDVector m_vuiCircleGUIDs; + GuidList m_luiFlameGUIDs; + GuidList m_luiBigLightGUIDs; + GuidVector m_vuiCircleGUIDs; }; #endif diff --git a/scripts/eastern_kingdoms/sunwell_plateau/boss_muru.cpp b/scripts/eastern_kingdoms/sunwell_plateau/boss_muru.cpp index fba08ea08..7960938db 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/boss_muru.cpp +++ b/scripts/eastern_kingdoms/sunwell_plateau/boss_muru.cpp @@ -223,7 +223,7 @@ struct MANGOS_DLL_DECL boss_entropiusAI : public ScriptedAI uint32 m_uiBlackHoleTimer; uint32 m_uiDarknessTimer; - GUIDList m_lSummonedCreaturesList; + GuidList m_lSummonedCreaturesList; void Reset() { @@ -254,7 +254,7 @@ struct MANGOS_DLL_DECL boss_entropiusAI : public ScriptedAI // Wrapper to despawn the Singularities and Darkness on death or on evade void DespawnSummonedCreatures() { - for (GUIDList::const_iterator itr = m_lSummonedCreaturesList.begin(); itr != m_lSummonedCreaturesList.end(); ++itr) + for (GuidList::const_iterator itr = m_lSummonedCreaturesList.begin(); itr != m_lSummonedCreaturesList.end(); ++itr) { if (Creature* pTemp = m_creature->GetMap()->GetCreature(*itr)) pTemp->ForcedDespawn(); diff --git a/scripts/eastern_kingdoms/uldaman/instance_uldaman.cpp b/scripts/eastern_kingdoms/uldaman/instance_uldaman.cpp index a7a39fc9a..1047d8284 100644 --- a/scripts/eastern_kingdoms/uldaman/instance_uldaman.cpp +++ b/scripts/eastern_kingdoms/uldaman/instance_uldaman.cpp @@ -97,7 +97,7 @@ void instance_uldaman::SetData(uint32 uiType, uint32 uiData) case TYPE_ARCHAEDAS: if (uiData == FAIL) { - for (GUIDList::const_iterator itr = m_lWardens.begin(); itr != m_lWardens.end(); ++itr) + for (GuidList::const_iterator itr = m_lWardens.begin(); itr != m_lWardens.end(); ++itr) { if (Creature* pWarden = instance->GetCreature(*itr)) { @@ -109,7 +109,7 @@ void instance_uldaman::SetData(uint32 uiType, uint32 uiData) } else if (uiData == DONE) { - for (GUIDList::const_iterator itr = m_lWardens.begin(); itr != m_lWardens.end(); ++itr) + for (GuidList::const_iterator itr = m_lWardens.begin(); itr != m_lWardens.end(); ++itr) { Creature* pWarden = instance->GetCreature(*itr); if (pWarden && pWarden->isAlive()) @@ -221,7 +221,7 @@ Creature* instance_uldaman::GetClosestDwarfNotInCombat(Creature* pSearcher, uint { std::list lTemp; - for (GUIDList::const_iterator itr = m_lWardens.begin(); itr != m_lWardens.end(); ++itr) + for (GuidList::const_iterator itr = m_lWardens.begin(); itr != m_lWardens.end(); ++itr) { Creature* pTemp = instance->GetCreature(*itr); diff --git a/scripts/eastern_kingdoms/uldaman/uldaman.h b/scripts/eastern_kingdoms/uldaman/uldaman.h index c7977851b..7c543c1f6 100644 --- a/scripts/eastern_kingdoms/uldaman/uldaman.h +++ b/scripts/eastern_kingdoms/uldaman/uldaman.h @@ -69,7 +69,7 @@ class MANGOS_DLL_DECL instance_uldaman : public ScriptedInstance uint32 m_uiKeeperCooldown; uint32 m_uiStoneKeepersFallen; - GUIDList m_lWardens; + GuidList m_lWardens; std::map m_mKeeperMap; }; diff --git a/scripts/eastern_kingdoms/zulaman/boss_janalai.cpp b/scripts/eastern_kingdoms/zulaman/boss_janalai.cpp index 10a062fad..3d24450ca 100644 --- a/scripts/eastern_kingdoms/zulaman/boss_janalai.cpp +++ b/scripts/eastern_kingdoms/zulaman/boss_janalai.cpp @@ -147,7 +147,7 @@ struct MANGOS_DLL_DECL boss_janalaiAI : public ScriptedAI uint32 m_uiFireBreathTimer; - GUIDList m_lBombsGUIDList; + GuidList m_lBombsGUIDList; std::list m_lEggsRemainingList; uint32 m_uiBombTimer; @@ -205,7 +205,7 @@ struct MANGOS_DLL_DECL boss_janalaiAI : public ScriptedAI void JustReachedHome() { - for (GUIDList::const_iterator itr = m_lBombsGUIDList.begin(); itr != m_lBombsGUIDList.end(); ++itr) + for (GuidList::const_iterator itr = m_lBombsGUIDList.begin(); itr != m_lBombsGUIDList.end(); ++itr) { if (Creature* pBomb = m_creature->GetMap()->GetCreature(*itr)) pBomb->ForcedDespawn(); @@ -327,7 +327,7 @@ struct MANGOS_DLL_DECL boss_janalaiAI : public ScriptedAI void BlowUpBombs() { - for (GUIDList::const_iterator itr = m_lBombsGUIDList.begin(); itr != m_lBombsGUIDList.end(); ++itr) + for (GuidList::const_iterator itr = m_lBombsGUIDList.begin(); itr != m_lBombsGUIDList.end(); ++itr) { if (Creature* pBomb = m_creature->GetMap()->GetCreature(*itr)) { diff --git a/scripts/eastern_kingdoms/zulaman/boss_zuljin.cpp b/scripts/eastern_kingdoms/zulaman/boss_zuljin.cpp index bd71104d4..add076c9d 100644 --- a/scripts/eastern_kingdoms/zulaman/boss_zuljin.cpp +++ b/scripts/eastern_kingdoms/zulaman/boss_zuljin.cpp @@ -142,7 +142,7 @@ struct MANGOS_DLL_DECL boss_zuljinAI : public ScriptedAI bool m_bIsInTransition; uint32 m_uiTransformTimer; - GUIDList m_lSummonsList; + GuidList m_lSummonsList; void Reset() { @@ -222,7 +222,7 @@ struct MANGOS_DLL_DECL boss_zuljinAI : public ScriptedAI void DoDespawnVortexes() { - for (GUIDList::const_iterator itr = m_lSummonsList.begin(); itr != m_lSummonsList.end(); ++itr) + for (GuidList::const_iterator itr = m_lSummonsList.begin(); itr != m_lSummonsList.end(); ++itr) { if (Creature* pVortex = m_creature->GetMap()->GetCreature(*itr)) pVortex->ForcedDespawn(); diff --git a/scripts/eastern_kingdoms/zulaman/instance_zulaman.cpp b/scripts/eastern_kingdoms/zulaman/instance_zulaman.cpp index c6720d191..83932a901 100644 --- a/scripts/eastern_kingdoms/zulaman/instance_zulaman.cpp +++ b/scripts/eastern_kingdoms/zulaman/instance_zulaman.cpp @@ -135,7 +135,7 @@ void instance_zulaman::OnCreatureEvade(Creature* pCreature) case NPC_TRIBES_MAN: case NPC_WARBRINGER: case NPC_AXETHROWER: - for (GUIDSet::const_iterator itr = m_aNalorakkEvent[m_uiBearEventPhase].sBearTrashGuidSet.begin(); itr != m_aNalorakkEvent[m_uiBearEventPhase].sBearTrashGuidSet.end(); ++itr) + for (GuidSet::const_iterator itr = m_aNalorakkEvent[m_uiBearEventPhase].sBearTrashGuidSet.begin(); itr != m_aNalorakkEvent[m_uiBearEventPhase].sBearTrashGuidSet.end(); ++itr) { Creature* pTemp = instance->GetCreature(*itr); if (pTemp && !pTemp->isAlive()) @@ -259,7 +259,7 @@ void instance_zulaman::SetData(uint32 uiType, uint32 uiData) m_uiEggsRemainingCount_Left = 20; m_uiEggsRemainingCount_Right = 20; - for(GUIDList::const_iterator itr = m_lEggsGUIDList.begin(); itr != m_lEggsGUIDList.end(); ++itr) + for(GuidList::const_iterator itr = m_lEggsGUIDList.begin(); itr != m_lEggsGUIDList.end(); ++itr) { if (Creature* pEgg = instance->GetCreature(*itr)) { @@ -395,7 +395,7 @@ uint32 instance_zulaman::GetData(uint32 uiType) void instance_zulaman::SendNextBearWave(Unit* pTarget) { - for (GUIDSet::const_iterator itr = m_aNalorakkEvent[m_uiBearEventPhase].sBearTrashGuidSet.begin(); itr != m_aNalorakkEvent[m_uiBearEventPhase].sBearTrashGuidSet.end(); ++itr) + for (GuidSet::const_iterator itr = m_aNalorakkEvent[m_uiBearEventPhase].sBearTrashGuidSet.begin(); itr != m_aNalorakkEvent[m_uiBearEventPhase].sBearTrashGuidSet.end(); ++itr) { Creature* pTemp = instance->GetCreature(*itr); if (pTemp && pTemp->isAlive()) diff --git a/scripts/eastern_kingdoms/zulaman/zulaman.h b/scripts/eastern_kingdoms/zulaman/zulaman.h index 22f856999..dd79f3602 100644 --- a/scripts/eastern_kingdoms/zulaman/zulaman.h +++ b/scripts/eastern_kingdoms/zulaman/zulaman.h @@ -139,7 +139,7 @@ static const NalorakkBearEventInfo aBearEventInfo[MAX_BEAR_WAVES] = struct NalorakkTrashInfo { - GUIDSet sBearTrashGuidSet; + GuidSet sBearTrashGuidSet; uint8 uiTrashKilled; }; @@ -185,7 +185,7 @@ class MANGOS_DLL_DECL instance_zulaman : public ScriptedInstance uint8 m_uiBearEventPhase; bool m_bIsBearPhaseInProgress; - GUIDList m_lEggsGUIDList; + GuidList m_lEggsGUIDList; uint32 m_uiEggsRemainingCount_Left; uint32 m_uiEggsRemainingCount_Right; }; diff --git a/scripts/eastern_kingdoms/zulgurub/boss_jeklik.cpp b/scripts/eastern_kingdoms/zulgurub/boss_jeklik.cpp index e9a82829f..becc1684c 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_jeklik.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_jeklik.cpp @@ -84,7 +84,7 @@ struct MANGOS_DLL_DECL boss_jeklikAI : public ScriptedAI bool m_bIsPhaseOne; - GUIDList m_lBombRiderGuidsList; + GuidList m_lBombRiderGuidsList; void Reset() { @@ -151,7 +151,7 @@ struct MANGOS_DLL_DECL boss_jeklikAI : public ScriptedAI if (m_lBombRiderGuidsList.empty()) return; - for (GUIDList::const_iterator itr = m_lBombRiderGuidsList.begin(); itr != m_lBombRiderGuidsList.end(); ++itr) + for (GuidList::const_iterator itr = m_lBombRiderGuidsList.begin(); itr != m_lBombRiderGuidsList.end(); ++itr) { if (Creature* pRider = m_creature->GetMap()->GetCreature(*itr)) pRider->ForcedDespawn(); diff --git a/scripts/eastern_kingdoms/zulgurub/instance_zulgurub.cpp b/scripts/eastern_kingdoms/zulgurub/instance_zulgurub.cpp index 5e155a86e..ee0c9baa4 100644 --- a/scripts/eastern_kingdoms/zulgurub/instance_zulgurub.cpp +++ b/scripts/eastern_kingdoms/zulgurub/instance_zulgurub.cpp @@ -104,7 +104,7 @@ void instance_zulgurub::SetData(uint32 uiType, uint32 uiData) DoLowerHakkarHitPoints(); if (uiData == FAIL) { - for (GUIDList::const_iterator itr = m_lSpiderEggGUIDList.begin(); itr != m_lSpiderEggGUIDList.end(); ++itr) + for (GuidList::const_iterator itr = m_lSpiderEggGUIDList.begin(); itr != m_lSpiderEggGUIDList.end(); ++itr) { if (GameObject* pEgg = instance->GetGameObject(*itr)) { @@ -210,11 +210,11 @@ uint32 instance_zulgurub::GetData(uint32 uiType) Creature* instance_zulgurub::SelectRandomPantherTrigger(bool bIsLeft) { - GUIDList* plTempList = bIsLeft ? &m_lLeftPantherTriggerGUIDList : &m_lRightPantherTriggerGUIDList; + GuidList* plTempList = bIsLeft ? &m_lLeftPantherTriggerGUIDList : &m_lRightPantherTriggerGUIDList; std::vector vTriggers; vTriggers.reserve(plTempList->size()); - for (GUIDList::const_iterator itr = plTempList->begin(); itr != plTempList->end(); ++itr) + for (GuidList::const_iterator itr = plTempList->begin(); itr != plTempList->end(); ++itr) { if (Creature* pTemp = instance->GetCreature(*itr)) vTriggers.push_back(pTemp); diff --git a/scripts/eastern_kingdoms/zulgurub/zulgurub.h b/scripts/eastern_kingdoms/zulgurub/zulgurub.h index eb07bea0d..d71cd569b 100644 --- a/scripts/eastern_kingdoms/zulgurub/zulgurub.h +++ b/scripts/eastern_kingdoms/zulgurub/zulgurub.h @@ -71,9 +71,9 @@ class MANGOS_DLL_DECL instance_zulgurub : public ScriptedInstance uint32 m_auiEncounter[MAX_ENCOUNTER]; std::string m_strInstData; - GUIDList m_lRightPantherTriggerGUIDList; - GUIDList m_lLeftPantherTriggerGUIDList; - GUIDList m_lSpiderEggGUIDList; + GuidList m_lRightPantherTriggerGUIDList; + GuidList m_lLeftPantherTriggerGUIDList; + GuidList m_lSpiderEggGUIDList; bool m_bHasIntroYelled; bool m_bHasAltarYelled; diff --git a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.h b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.h index 2ae85651b..3772457aa 100644 --- a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.h +++ b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.h @@ -128,8 +128,8 @@ class MANGOS_DLL_DECL instance_culling_of_stratholme : public ScriptedInstance void Update(uint32 uiDiff); - void GetStratAgiatedCitizenList(GUIDList &lList){ lList = m_lAgiatedCitizenGUIDList; }; - void GetStratAgiatedResidentList(GUIDList &lList){ lList = m_lAgiatedResidentGUIDList; }; + void GetStratAgiatedCitizenList(GuidList &lList){ lList = m_lAgiatedCitizenGUIDList; }; + void GetStratAgiatedResidentList(GuidList &lList){ lList = m_lAgiatedResidentGUIDList; }; void GetCratesBunnyOrderedList(std::list &lList); Creature* GetStratIntroFootman(); @@ -150,12 +150,12 @@ class MANGOS_DLL_DECL instance_culling_of_stratholme : public ScriptedInstance uint32 m_uiRemoveCrateStateTimer; uint32 m_uiArthasRespawnTimer; - GUIDList m_luiCratesBunnyGUIDs; - GUIDList m_luiFootmanGUIDs; - GUIDList m_luiResidentGUIDs; + GuidList m_luiCratesBunnyGUIDs; + GuidList m_luiFootmanGUIDs; + GuidList m_luiResidentGUIDs; - GUIDList m_lAgiatedCitizenGUIDList; - GUIDList m_lAgiatedResidentGUIDList; + GuidList m_lAgiatedCitizenGUIDList; + GuidList m_lAgiatedResidentGUIDList; }; #endif diff --git a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/instance_culling_of_stratholme.cpp b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/instance_culling_of_stratholme.cpp index 68694ec3c..c7499d56e 100644 --- a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/instance_culling_of_stratholme.cpp +++ b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/instance_culling_of_stratholme.cpp @@ -337,7 +337,7 @@ static bool sortFromSouthToNorth(Creature* pFirst, Creature* pSecond) void instance_culling_of_stratholme::GetCratesBunnyOrderedList(std::list &lList) { std::list lCratesBunnyList; - for (GUIDList::const_iterator itr = m_luiCratesBunnyGUIDs.begin(); itr != m_luiCratesBunnyGUIDs.end(); ++itr) + for (GuidList::const_iterator itr = m_luiCratesBunnyGUIDs.begin(); itr != m_luiCratesBunnyGUIDs.end(); ++itr) { if (Creature* pBunny = instance->GetCreature(*itr)) lCratesBunnyList.push_back(pBunny); @@ -352,7 +352,7 @@ void instance_culling_of_stratholme::GetCratesBunnyOrderedList(std::list lFootmanList; - for (GUIDList::const_iterator itr = m_luiFootmanGUIDs.begin(); itr != m_luiFootmanGUIDs.end(); ++itr) + for (GuidList::const_iterator itr = m_luiFootmanGUIDs.begin(); itr != m_luiFootmanGUIDs.end(); ++itr) { if (Creature* pFootman = instance->GetCreature(*itr)) lFootmanList.push_back(pFootman); @@ -370,7 +370,7 @@ Creature* instance_culling_of_stratholme::GetStratIntroFootman() void instance_culling_of_stratholme::GetResidentOrderedList(std::list &lList) { std::list lResidentList; - for (GUIDList::const_iterator itr = m_luiResidentGUIDs.begin(); itr != m_luiResidentGUIDs.end(); ++itr) + for (GuidList::const_iterator itr = m_luiResidentGUIDs.begin(); itr != m_luiResidentGUIDs.end(); ++itr) { if (Creature* pResident = instance->GetCreature(*itr)) lResidentList.push_back(pResident); diff --git a/scripts/kalimdor/caverns_of_time/hyjal/hyjal.h b/scripts/kalimdor/caverns_of_time/hyjal/hyjal.h index dc6d933aa..93bfa5f47 100644 --- a/scripts/kalimdor/caverns_of_time/hyjal/hyjal.h +++ b/scripts/kalimdor/caverns_of_time/hyjal/hyjal.h @@ -75,7 +75,7 @@ class MANGOS_DLL_DECL instance_mount_hyjal : public ScriptedInstance uint32 m_auiEncounter[MAX_ENCOUNTER]; std::string m_strSaveData; - GUIDList lAncientGemGUIDList; + GuidList lAncientGemGUIDList; uint32 m_uiTrashCount; }; diff --git a/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.cpp b/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.cpp index d2b8f4008..b70599959 100644 --- a/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.cpp +++ b/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.cpp @@ -454,7 +454,7 @@ void hyjalAI::UpdateAI(const uint32 uiDiff) m_uiNextWaveTimer = std::min(m_uiNextWaveTimer, (uint32)5000); } - for (GUIDList::const_iterator itr = lWaveMobGUIDList.begin(); itr != lWaveMobGUIDList.end(); ++itr) + for (GuidList::const_iterator itr = lWaveMobGUIDList.begin(); itr != lWaveMobGUIDList.end(); ++itr) { if (Creature* pTemp = m_pInstance->instance->GetCreature(*itr)) { diff --git a/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.h b/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.h index 3e13ad100..a6a515443 100644 --- a/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.h +++ b/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.h @@ -132,7 +132,7 @@ struct MANGOS_DLL_DECL hyjalAI : public ScriptedAI private: uint32 m_uiSpellTimer[MAX_SPELL]; - GUIDList lWaveMobGUIDList; + GuidList lWaveMobGUIDList; }; #endif diff --git a/scripts/kalimdor/caverns_of_time/hyjal/instance_hyjal.cpp b/scripts/kalimdor/caverns_of_time/hyjal/instance_hyjal.cpp index 45b976aef..3f0671f7f 100644 --- a/scripts/kalimdor/caverns_of_time/hyjal/instance_hyjal.cpp +++ b/scripts/kalimdor/caverns_of_time/hyjal/instance_hyjal.cpp @@ -143,7 +143,7 @@ void instance_mount_hyjal::SetData(uint32 uiType, uint32 uiData) { if (!lAncientGemGUIDList.empty()) { - for(GUIDList::const_iterator itr = lAncientGemGUIDList.begin(); itr != lAncientGemGUIDList.end(); ++itr) + for(GuidList::const_iterator itr = lAncientGemGUIDList.begin(); itr != lAncientGemGUIDList.end(); ++itr) { //don't know how long it expected DoRespawnGameObject(*itr, DAY); diff --git a/scripts/kalimdor/dire_maul/dire_maul.h b/scripts/kalimdor/dire_maul/dire_maul.h index 793a26c9f..3d7e4eb5f 100644 --- a/scripts/kalimdor/dire_maul/dire_maul.h +++ b/scripts/kalimdor/dire_maul/dire_maul.h @@ -109,13 +109,13 @@ class MANGOS_DLL_DECL instance_dire_maul : public ScriptedInstance // East bool m_bWallDestroyed; - GUIDList m_lFelvineShardGUIDs; + GuidList m_lFelvineShardGUIDs; // West ObjectGuid m_aCrystalGeneratorGuid[MAX_GENERATORS]; - GUIDList m_luiHighborneSummonerGUIDs; - GUIDList m_lGeneratorGuardGUIDs; + GuidList m_luiHighborneSummonerGUIDs; + GuidList m_lGeneratorGuardGUIDs; std::set m_sSortedGeneratorGuards[MAX_GENERATORS]; }; diff --git a/scripts/kalimdor/dire_maul/instance_dire_maul.cpp b/scripts/kalimdor/dire_maul/instance_dire_maul.cpp index b08fa3656..e1f757f72 100644 --- a/scripts/kalimdor/dire_maul/instance_dire_maul.cpp +++ b/scripts/kalimdor/dire_maul/instance_dire_maul.cpp @@ -166,7 +166,7 @@ void instance_dire_maul::SetData(uint32 uiType, uint32 uiData) if (!m_lFelvineShardGUIDs.empty()) { - for(GUIDList::const_iterator itr = m_lFelvineShardGUIDs.begin(); itr != m_lFelvineShardGUIDs.end(); ++itr) + for(GuidList::const_iterator itr = m_lFelvineShardGUIDs.begin(); itr != m_lFelvineShardGUIDs.end(); ++itr) DoRespawnGameObject(*itr); } } @@ -355,7 +355,7 @@ void instance_dire_maul::ProcessForceFieldOpening() return; bool bHasYelled = false; - for (GUIDList::const_iterator itr = m_luiHighborneSummonerGUIDs.begin(); itr != m_luiHighborneSummonerGUIDs.end(); ++itr) + for (GuidList::const_iterator itr = m_luiHighborneSummonerGUIDs.begin(); itr != m_luiHighborneSummonerGUIDs.end(); ++itr) { Creature* pSummoner = instance->GetCreature(*itr); @@ -385,7 +385,7 @@ void instance_dire_maul::SortPylonGuards() continue; // Sort all remaining (alive) NPCs to unfinished generators - for (GUIDList::iterator itr = m_lGeneratorGuardGUIDs.begin(); itr != m_lGeneratorGuardGUIDs.end();) + for (GuidList::iterator itr = m_lGeneratorGuardGUIDs.begin(); itr != m_lGeneratorGuardGUIDs.end();) { Creature* pGuard = instance->GetCreature(*itr); if (!pGuard || pGuard->isDead()) // Remove invalid guids and dead guards diff --git a/scripts/kalimdor/moonglade.cpp b/scripts/kalimdor/moonglade.cpp index 3ccf1e020..b023eefe6 100644 --- a/scripts/kalimdor/moonglade.cpp +++ b/scripts/kalimdor/moonglade.cpp @@ -814,7 +814,7 @@ struct MANGOS_DLL_DECL boss_eranikusAI : public ScriptedAI ObjectGuid m_remulosGuid; ObjectGuid m_tyrandeGuid; - GUIDList m_lPriestessList; + GuidList m_lPriestessList; void Reset() { @@ -910,7 +910,7 @@ struct MANGOS_DLL_DECL boss_eranikusAI : public ScriptedAI void DoDespawnSummoned() { - for(GUIDList::const_iterator itr = m_lPriestessList.begin(); itr != m_lPriestessList.end(); ++itr) + for(GuidList::const_iterator itr = m_lPriestessList.begin(); itr != m_lPriestessList.end(); ++itr) { if (Creature* pTemp = m_creature->GetMap()->GetCreature(*itr)) pTemp->ForcedDespawn(); diff --git a/scripts/kalimdor/ruins_of_ahnqiraj/boss_ayamiss.cpp b/scripts/kalimdor/ruins_of_ahnqiraj/boss_ayamiss.cpp index 939c36c68..9e665f3ba 100644 --- a/scripts/kalimdor/ruins_of_ahnqiraj/boss_ayamiss.cpp +++ b/scripts/kalimdor/ruins_of_ahnqiraj/boss_ayamiss.cpp @@ -76,7 +76,7 @@ struct MANGOS_DLL_DECL boss_ayamissAI : public ScriptedAI bool m_bHasFrenzy; ObjectGuid m_paralyzeTarget; - GUIDList m_lSwarmersGuidList; + GuidList m_lSwarmersGuidList; void Reset() { @@ -191,7 +191,7 @@ struct MANGOS_DLL_DECL boss_ayamissAI : public ScriptedAI // All the swarmers attack at a certain period of time if (m_uiSwarmerAttackTimer < uiDiff) { - for (GUIDList::const_iterator itr = m_lSwarmersGuidList.begin(); itr != m_lSwarmersGuidList.end(); ++itr) + for (GuidList::const_iterator itr = m_lSwarmersGuidList.begin(); itr != m_lSwarmersGuidList.end(); ++itr) { if (Creature* pTemp = m_creature->GetMap()->GetCreature(*itr)) { diff --git a/scripts/kalimdor/silithus.cpp b/scripts/kalimdor/silithus.cpp index 576e6dad1..b5cc8df6a 100644 --- a/scripts/kalimdor/silithus.cpp +++ b/scripts/kalimdor/silithus.cpp @@ -442,7 +442,7 @@ struct MANGOS_DLL_DECL npc_anachronos_the_ancientAI : public ScriptedAI, private ObjectGuid m_playerGuid; ObjectGuid m_triggerGuid; - GUIDList m_lQirajiWarriorsList; + GuidList m_lQirajiWarriorsList; void Reset() { @@ -693,7 +693,7 @@ struct MANGOS_DLL_DECL npc_anachronos_the_ancientAI : public ScriptedAI, private void DoUnsummonArmy() { - for (GUIDList::const_iterator itr = m_lQirajiWarriorsList.begin(); itr != m_lQirajiWarriorsList.end(); ++itr) + for (GuidList::const_iterator itr = m_lQirajiWarriorsList.begin(); itr != m_lQirajiWarriorsList.end(); ++itr) { if (Creature* pTemp = m_creature->GetMap()->GetCreature(*itr)) pTemp->ForcedDespawn(); diff --git a/scripts/kalimdor/temple_of_ahnqiraj/mob_anubisath_sentinel.cpp b/scripts/kalimdor/temple_of_ahnqiraj/mob_anubisath_sentinel.cpp index db5b570ee..8d382f6ff 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/mob_anubisath_sentinel.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/mob_anubisath_sentinel.cpp @@ -53,7 +53,7 @@ struct MANGOS_DLL_DECL npc_anubisath_sentinelAI : public ScriptedAI uint32 m_uiMyAbility; bool m_bEnraged; - GUIDList m_lAssistList; + GuidList m_lAssistList; void Reset() { @@ -63,7 +63,7 @@ struct MANGOS_DLL_DECL npc_anubisath_sentinelAI : public ScriptedAI void JustReachedHome() { - for(GUIDList::const_iterator itr = m_lAssistList.begin(); itr != m_lAssistList.end(); ++itr) + for(GuidList::const_iterator itr = m_lAssistList.begin(); itr != m_lAssistList.end(); ++itr) { if (*itr == m_creature->GetObjectGuid()) continue; @@ -108,7 +108,7 @@ struct MANGOS_DLL_DECL npc_anubisath_sentinelAI : public ScriptedAI void DoTransferAbility() { - for(GUIDList::const_iterator itr = m_lAssistList.begin(); itr != m_lAssistList.end(); ++itr) + for(GuidList::const_iterator itr = m_lAssistList.begin(); itr != m_lAssistList.end(); ++itr) { if (Creature* pBuddy = m_creature->GetMap()->GetCreature(*itr)) { @@ -128,7 +128,7 @@ struct MANGOS_DLL_DECL npc_anubisath_sentinelAI : public ScriptedAI { if (!m_lAssistList.empty()) { - for(GUIDList::const_iterator itr = m_lAssistList.begin(); itr != m_lAssistList.end(); ++itr) + for(GuidList::const_iterator itr = m_lAssistList.begin(); itr != m_lAssistList.end(); ++itr) { if (*itr == m_creature->GetObjectGuid()) continue; diff --git a/scripts/kalimdor/the_barrens.cpp b/scripts/kalimdor/the_barrens.cpp index 9ee589db7..1a1ce78af 100644 --- a/scripts/kalimdor/the_barrens.cpp +++ b/scripts/kalimdor/the_barrens.cpp @@ -325,7 +325,7 @@ struct MANGOS_DLL_DECL npc_twiggy_flatheadAI : public ScriptedAI ObjectGuid m_playerGuid; ObjectGuid m_bigWillGuid; - GUIDVector m_vAffrayChallengerGuidsVector; + GuidVector m_vAffrayChallengerGuidsVector; void Reset() { diff --git a/scripts/northrend/azjol-nerub/ahnkahet/ahnkahet.h b/scripts/northrend/azjol-nerub/ahnkahet/ahnkahet.h index 6d8e71d95..0e0e13994 100644 --- a/scripts/northrend/azjol-nerub/ahnkahet/ahnkahet.h +++ b/scripts/northrend/azjol-nerub/ahnkahet/ahnkahet.h @@ -63,8 +63,8 @@ class MANGOS_DLL_DECL instance_ahnkahet : public ScriptedInstance ObjectGuid SelectRandomSwarmerEggGuid(); ObjectGuid SelectJedogaSacrificeControllerGuid() { return m_jedogaSacrificeController; } - void GetJedogaControllersList(GUIDList &lList) { lList = m_lJedogaControllersGuidList; } - void GetJedogaEventControllersList(GUIDList &lList) {lList = m_lJedogaEventControllersGuidList; } + void GetJedogaControllersList(GuidList &lList) { lList = m_lJedogaControllersGuidList; } + void GetJedogaEventControllersList(GuidList &lList) {lList = m_lJedogaEventControllersGuidList; } bool CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/); @@ -83,10 +83,10 @@ class MANGOS_DLL_DECL instance_ahnkahet : public ScriptedInstance ObjectGuid m_jedogaSacrificeController; - GUIDList m_GuardianEggList; - GUIDList m_SwarmerEggList; - GUIDList m_lJedogaControllersGuidList; - GUIDList m_lJedogaEventControllersGuidList; + GuidList m_GuardianEggList; + GuidList m_SwarmerEggList; + GuidList m_lJedogaControllersGuidList; + GuidList m_lJedogaEventControllersGuidList; }; #endif diff --git a/scripts/northrend/azjol-nerub/ahnkahet/boss_jedoga.cpp b/scripts/northrend/azjol-nerub/ahnkahet/boss_jedoga.cpp index 6c0faa171..fbbe66e49 100644 --- a/scripts/northrend/azjol-nerub/ahnkahet/boss_jedoga.cpp +++ b/scripts/northrend/azjol-nerub/ahnkahet/boss_jedoga.cpp @@ -105,7 +105,7 @@ struct MANGOS_DLL_DECL boss_jedogaAI : public ScriptedAI bool m_bIsSacrificing; bool m_bHasDoneIntro; - GUIDList m_lVolunteerGuidList; + GuidList m_lVolunteerGuidList; void Reset() { @@ -332,11 +332,11 @@ struct MANGOS_DLL_DECL boss_jedogaAI : public ScriptedAI { if (m_uiVisualTimer <= uiDiff) { - GUIDList lControllersList; + GuidList lControllersList; if (m_pInstance) m_pInstance->GetJedogaEventControllersList(lControllersList); - for (GUIDList::const_iterator itr = lControllersList.begin(); itr != lControllersList.end(); ++itr) + for (GuidList::const_iterator itr = lControllersList.begin(); itr != lControllersList.end(); ++itr) { if (Creature* pTemp = m_creature->GetMap()->GetCreature(*itr)) pTemp->CastSpell(m_creature, SPELL_BEAM_VISUAL, false); diff --git a/scripts/northrend/azjol-nerub/ahnkahet/boss_taldaram.cpp b/scripts/northrend/azjol-nerub/ahnkahet/boss_taldaram.cpp index e8b8fa481..66cf5d2ff 100644 --- a/scripts/northrend/azjol-nerub/ahnkahet/boss_taldaram.cpp +++ b/scripts/northrend/azjol-nerub/ahnkahet/boss_taldaram.cpp @@ -80,7 +80,7 @@ struct MANGOS_DLL_DECL boss_taldaramAI : public ScriptedAI uint32 m_uiVanishExpireTimer; uint32 m_uiEmbraceTimer; - GUIDList m_lFlameOrbsGuidList; + GuidList m_lFlameOrbsGuidList; void Reset() { @@ -181,7 +181,7 @@ struct MANGOS_DLL_DECL boss_taldaramAI : public ScriptedAI { float fX, fY; uint8 uiIndex = 0; - for (GUIDList::const_iterator itr = m_lFlameOrbsGuidList.begin(); itr != m_lFlameOrbsGuidList.end(); ++itr) + for (GuidList::const_iterator itr = m_lFlameOrbsGuidList.begin(); itr != m_lFlameOrbsGuidList.end(); ++itr) { if (Creature* pOrb = m_creature->GetMap()->GetCreature(*itr)) { @@ -200,11 +200,11 @@ struct MANGOS_DLL_DECL boss_taldaramAI : public ScriptedAI { if (m_uiVisualTimer <= uiDiff) { - GUIDList lControllersList; + GuidList lControllersList; if (m_pInstance) m_pInstance->GetJedogaControllersList(lControllersList); - for (GUIDList::const_iterator itr = lControllersList.begin(); itr != lControllersList.end(); ++itr) + for (GuidList::const_iterator itr = lControllersList.begin(); itr != lControllersList.end(); ++itr) { if (Creature* pTemp = m_creature->GetMap()->GetCreature(*itr)) pTemp->CastSpell(m_creature, SPELL_BEAM_VISUAL, false); diff --git a/scripts/northrend/azjol-nerub/ahnkahet/instance_ahnkahet.cpp b/scripts/northrend/azjol-nerub/ahnkahet/instance_ahnkahet.cpp index ee3fab35b..5f9414785 100644 --- a/scripts/northrend/azjol-nerub/ahnkahet/instance_ahnkahet.cpp +++ b/scripts/northrend/azjol-nerub/ahnkahet/instance_ahnkahet.cpp @@ -126,7 +126,7 @@ void instance_ahnkahet::SetData(uint32 uiType, uint32 uiData) pTaldaram->GetMotionMaster()->MovePoint(1, aTaldaramLandingLoc[0], aTaldaramLandingLoc[1], aTaldaramLandingLoc[2]); // Interrupt the channeling - for (GUIDList::const_iterator itr = m_lJedogaControllersGuidList.begin(); itr != m_lJedogaControllersGuidList.end(); ++itr) + for (GuidList::const_iterator itr = m_lJedogaControllersGuidList.begin(); itr != m_lJedogaControllersGuidList.end(); ++itr) { if (Creature* pTemp = instance->GetCreature(*itr)) pTemp->InterruptNonMeleeSpells(false); @@ -190,7 +190,7 @@ void instance_ahnkahet::OnCreatureDeath(Creature* pCreature) if (Creature* pJedoga = GetSingleCreatureFromStorage(NPC_JEDOGA_SHADOWSEEKER)) pJedoga->GetMotionMaster()->MovePoint(1, aJedogaLandingLoc[0], aJedogaLandingLoc[1], aJedogaLandingLoc[2]); - for (GUIDList::const_iterator itr = m_lJedogaEventControllersGuidList.begin(); itr != m_lJedogaEventControllersGuidList.end(); ++itr) + for (GuidList::const_iterator itr = m_lJedogaEventControllersGuidList.begin(); itr != m_lJedogaEventControllersGuidList.end(); ++itr) { if (Creature* pTemp = instance->GetCreature(*itr)) pTemp->InterruptNonMeleeSpells(false); diff --git a/scripts/northrend/azjol-nerub/azjol-nerub/azjol-nerub.h b/scripts/northrend/azjol-nerub/azjol-nerub/azjol-nerub.h index f9e1f6559..be3752873 100644 --- a/scripts/northrend/azjol-nerub/azjol-nerub/azjol-nerub.h +++ b/scripts/northrend/azjol-nerub/azjol-nerub/azjol-nerub.h @@ -80,8 +80,8 @@ class MANGOS_DLL_DECL instance_azjol_nerub : public ScriptedInstance ObjectGuid m_darterSummonTarget; ObjectGuid m_guardianSummonTarget; ObjectGuid m_anubSummonTarget; - GUIDVector m_vAssassinSummonTargetsVect; - GUIDList m_lTriggerGuids; + GuidVector m_vAssassinSummonTargetsVect; + GuidList m_lTriggerGuids; uint32 m_uiWatcherTimer; diff --git a/scripts/northrend/azjol-nerub/azjol-nerub/instance_azjol-nerub.cpp b/scripts/northrend/azjol-nerub/azjol-nerub/instance_azjol-nerub.cpp index bdc655fa3..63b8e0e41 100644 --- a/scripts/northrend/azjol-nerub/azjol-nerub/instance_azjol-nerub.cpp +++ b/scripts/northrend/azjol-nerub/azjol-nerub/instance_azjol-nerub.cpp @@ -166,7 +166,7 @@ void instance_azjol_nerub::DoSortWorldTriggers() float fZ = pAnub->GetPositionZ(); float fTriggZ = 0; - for (GUIDList::const_iterator itr = m_lTriggerGuids.begin(); itr != m_lTriggerGuids.end(); ++itr) + for (GuidList::const_iterator itr = m_lTriggerGuids.begin(); itr != m_lTriggerGuids.end(); ++itr) { if (Creature* pTrigg = instance->GetCreature(*itr)) { diff --git a/scripts/northrend/draktharon_keep/boss_trollgore.cpp b/scripts/northrend/draktharon_keep/boss_trollgore.cpp index 80522d4c9..0093a4844 100644 --- a/scripts/northrend/draktharon_keep/boss_trollgore.cpp +++ b/scripts/northrend/draktharon_keep/boss_trollgore.cpp @@ -73,7 +73,7 @@ struct MANGOS_DLL_DECL boss_trollgoreAI : public ScriptedAI uint32 m_uiWaveTimer; uint32 m_uiCorpseExplodeTimer; - GUIDVector m_vTriggers; + GuidVector m_vTriggers; void Reset() { diff --git a/scripts/northrend/draktharon_keep/draktharon_keep.h b/scripts/northrend/draktharon_keep/draktharon_keep.h index c9bfd0069..c31709167 100644 --- a/scripts/northrend/draktharon_keep/draktharon_keep.h +++ b/scripts/northrend/draktharon_keep/draktharon_keep.h @@ -70,7 +70,7 @@ class MANGOS_DLL_DECL instance_draktharon_keep : public ScriptedInstance void OnCreatureCreate(Creature* pCreature); void OnObjectCreate(GameObject* pGo); - void GetTrollgoreOutsideTriggers(GUIDVector& vTriggers) { vTriggers = m_vTriggerGuids; } + void GetTrollgoreOutsideTriggers(GuidVector& vTriggers) { vTriggers = m_vTriggerGuids; } ObjectGuid GetTrollgoreCornerTrigger() { return m_trollgoreCornerTriggerGuid; } bool CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/); @@ -97,9 +97,9 @@ class MANGOS_DLL_DECL instance_draktharon_keep : public ScriptedInstance NovosCrystalInfo m_aNovosCrystalInfo[MAX_CRYSTALS]; - GUIDVector m_vSummonDummyGuids; - GUIDList m_lNovosDummyGuids; - GUIDVector m_vTriggerGuids; + GuidVector m_vSummonDummyGuids; + GuidList m_lNovosDummyGuids; + GuidVector m_vTriggerGuids; }; #endif diff --git a/scripts/northrend/draktharon_keep/instance_draktharon_keep.cpp b/scripts/northrend/draktharon_keep/instance_draktharon_keep.cpp index 2454ec803..970791df9 100644 --- a/scripts/northrend/draktharon_keep/instance_draktharon_keep.cpp +++ b/scripts/northrend/draktharon_keep/instance_draktharon_keep.cpp @@ -105,7 +105,7 @@ void instance_draktharon_keep::DoSortNovosDummies() if (!pCrystal) continue; - for (GUIDList::iterator itr = m_lNovosDummyGuids.begin(); itr != m_lNovosDummyGuids.end();) + for (GuidList::iterator itr = m_lNovosDummyGuids.begin(); itr != m_lNovosDummyGuids.end();) { Creature* pDummy = instance->GetCreature(*itr); if (!pDummy) @@ -129,7 +129,7 @@ void instance_draktharon_keep::DoSortNovosDummies() // Find the crystal channel target (above Novos) float fNovosX, fNovosY, fNovosZ; pNovos->GetRespawnCoord(fNovosX, fNovosY, fNovosZ); - for (GUIDList::iterator itr = m_lNovosDummyGuids.begin(); itr != m_lNovosDummyGuids.end();) + for (GuidList::iterator itr = m_lNovosDummyGuids.begin(); itr != m_lNovosDummyGuids.end();) { Creature* pDummy = instance->GetCreature(*itr); if (!pDummy) @@ -150,7 +150,7 @@ void instance_draktharon_keep::DoSortNovosDummies() } // Summon positions (at end of stairs) - for (GUIDList::iterator itr = m_lNovosDummyGuids.begin(); itr != m_lNovosDummyGuids.end();) + for (GuidList::iterator itr = m_lNovosDummyGuids.begin(); itr != m_lNovosDummyGuids.end();) { Creature* pDummy = instance->GetCreature(*itr); if (!pDummy) diff --git a/scripts/northrend/gundrak/gundrak.h b/scripts/northrend/gundrak/gundrak.h index 1bf3a02b1..e41a9ad1f 100644 --- a/scripts/northrend/gundrak/gundrak.h +++ b/scripts/northrend/gundrak/gundrak.h @@ -102,10 +102,10 @@ class MANGOS_DLL_DECL instance_gundrak : public ScriptedInstance TypeTimerMap m_mBeamInProgress; TypeTimerMap m_mKeyInProgress; - GUIDList m_luiStalkerGUIDs; - GUIDVector m_vStalkerCasterGuids; - GUIDVector m_vStalkerTargetGuids; - GUIDSet m_sColossusMojosGuids; + GuidList m_luiStalkerGUIDs; + GuidVector m_vStalkerCasterGuids; + GuidVector m_vStalkerTargetGuids; + GuidSet m_sColossusMojosGuids; bool m_bLessRabi; diff --git a/scripts/northrend/gundrak/instance_gundrak.cpp b/scripts/northrend/gundrak/instance_gundrak.cpp index 137242191..498229270 100644 --- a/scripts/northrend/gundrak/instance_gundrak.cpp +++ b/scripts/northrend/gundrak/instance_gundrak.cpp @@ -203,7 +203,7 @@ void instance_gundrak::SetData(uint32 uiType, uint32 uiData) pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NO_INTERACT); if (uiData == FAIL) { - for (GUIDSet::const_iterator itr = m_sColossusMojosGuids.begin(); itr != m_sColossusMojosGuids.end(); ++itr) + for (GuidSet::const_iterator itr = m_sColossusMojosGuids.begin(); itr != m_sColossusMojosGuids.end(); ++itr) { if (Creature* pMojo = instance->GetCreature(*itr)) { @@ -297,7 +297,7 @@ void instance_gundrak::OnCreatureEnterCombat(Creature* pCreature) return; // Move all 4 Mojos to evade and move to the Colossus position - for (GUIDSet::const_iterator itr = m_sColossusMojosGuids.begin(); itr != m_sColossusMojosGuids.end(); ++itr) + for (GuidSet::const_iterator itr = m_sColossusMojosGuids.begin(); itr != m_sColossusMojosGuids.end(); ++itr) { if (Creature* pMojo = instance->GetCreature(*itr)) pMojo->AI()->EnterEvadeMode(); @@ -320,7 +320,7 @@ void instance_gundrak::DoAltarVisualEffect(uint8 uiType) fHeight += pCollusAltar->GetPositionZ(); std::list lStalkerTargets, lStalkerCasters; - for (GUIDList::const_iterator itr = m_luiStalkerGUIDs.begin(); itr != m_luiStalkerGUIDs.end(); ++itr) + for (GuidList::const_iterator itr = m_luiStalkerGUIDs.begin(); itr != m_luiStalkerGUIDs.end(); ++itr) { if (Creature* pStalker = instance->GetCreature(*itr)) { diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_devourer_of_souls.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_devourer_of_souls.cpp index 944a20736..d739338b4 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_devourer_of_souls.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_devourer_of_souls.cpp @@ -102,7 +102,7 @@ struct MANGOS_DLL_DECL boss_devourer_of_soulsAI : public ScriptedAI uint32 m_uiWailingTimer; uint32 m_uiEndPhaseTimer; - GUIDList m_lWellGuids; + GuidList m_lWellGuids; void Reset() { @@ -139,7 +139,7 @@ struct MANGOS_DLL_DECL boss_devourer_of_soulsAI : public ScriptedAI if (m_pInstance) m_pInstance->SetData(TYPE_DEVOURER_OF_SOULS, DONE); - for (GUIDList::const_iterator itr = m_lWellGuids.begin(); itr != m_lWellGuids.end(); ++itr) + for (GuidList::const_iterator itr = m_lWellGuids.begin(); itr != m_lWellGuids.end(); ++itr) { if (Creature* pWell = m_creature->GetMap()->GetCreature(*itr)) pWell->ForcedDespawn(); @@ -156,7 +156,7 @@ struct MANGOS_DLL_DECL boss_devourer_of_soulsAI : public ScriptedAI m_pInstance->SetData(TYPE_ACHIEV_PHANTOM_BLAST, IN_PROGRESS); } - for (GUIDList::const_iterator itr = m_lWellGuids.begin(); itr != m_lWellGuids.end(); ++itr) + for (GuidList::const_iterator itr = m_lWellGuids.begin(); itr != m_lWellGuids.end(); ++itr) { if (Creature* pWell = m_creature->GetMap()->GetCreature(*itr)) pWell->ForcedDespawn(); diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/forge_of_souls.h b/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/forge_of_souls.h index b2c309312..da400abc0 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/forge_of_souls.h +++ b/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/forge_of_souls.h @@ -117,8 +117,8 @@ class MANGOS_DLL_DECL instance_forge_of_souls : public ScriptedInstance uint32 m_uiTeam; // Team of first entered player, used to set if Jaina or Silvana to spawn - GUIDList m_luiSoulFragmentAliveGUIDs; - GUIDList m_lEventMobGUIDs; + GuidList m_luiSoulFragmentAliveGUIDs; + GuidList m_lEventMobGUIDs; }; #endif diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/instance_forge_of_souls.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/instance_forge_of_souls.cpp index 9dae4cc77..83283935e 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/instance_forge_of_souls.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/instance_forge_of_souls.cpp @@ -79,7 +79,7 @@ void instance_forge_of_souls::ProcessEventNpcs(Player* pPlayer, bool bChanged) // if bChanged, despawn Begin Mobs, spawn End Mobs at Spawn, else spawn EndMobs at End if (bChanged) { - for (GUIDList::const_iterator itr = m_lEventMobGUIDs.begin(); itr != m_lEventMobGUIDs.end(); ++itr) + for (GuidList::const_iterator itr = m_lEventMobGUIDs.begin(); itr != m_lEventMobGUIDs.end(); ++itr) { if (Creature* pSummoned = instance->GetCreature(*itr)) pSummoned->ForcedDespawn(); @@ -125,7 +125,7 @@ void instance_forge_of_souls::SetData(uint32 uiType, uint32 uiData) m_auiEncounter[0] = uiData; // Despawn remaining adds and clear list - for (GUIDList::const_iterator itr = m_luiSoulFragmentAliveGUIDs.begin(); itr != m_luiSoulFragmentAliveGUIDs.end(); ++itr) + for (GuidList::const_iterator itr = m_luiSoulFragmentAliveGUIDs.begin(); itr != m_luiSoulFragmentAliveGUIDs.end(); ++itr) { if (Creature* pFragment = instance->GetCreature(*itr)) pFragment->ForcedDespawn(); diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lady_deathwhisper.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lady_deathwhisper.cpp index 1d41ccca5..7d659c4f0 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lady_deathwhisper.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lady_deathwhisper.cpp @@ -95,9 +95,9 @@ struct MANGOS_DLL_DECL boss_lady_deathwhisperAI : public ScriptedAI uint8 m_uiMindControlCount; - GUIDList m_lCultistSpawnedGuidList; - GUIDVector m_vRightStalkersGuidVector; - GUIDVector m_vLeftStalkersGuidVector; + GuidList m_lCultistSpawnedGuidList; + GuidVector m_vRightStalkersGuidVector; + GuidVector m_vLeftStalkersGuidVector; ObjectGuid m_middleStalkerGuid; void Reset() @@ -140,7 +140,7 @@ struct MANGOS_DLL_DECL boss_lady_deathwhisperAI : public ScriptedAI m_pInstance->SetData(TYPE_LADY_DEATHWHISPER, IN_PROGRESS); // Sort the summoning stalkers - GUIDList lStalkersGuidList; + GuidList lStalkersGuidList; m_pInstance->GetDeathwhisperStalkersList(lStalkersGuidList); DoSortSummoningStalkers(lStalkersGuidList); } @@ -190,14 +190,14 @@ struct MANGOS_DLL_DECL boss_lady_deathwhisperAI : public ScriptedAI } // Wrapper to help sort the summoning stalkers - void DoSortSummoningStalkers(GUIDList &lDeathwhisperStalkers) + void DoSortSummoningStalkers(GuidList &lDeathwhisperStalkers) { std::list lRightStalkers; std::list lLeftStalkers; if (!lDeathwhisperStalkers.empty()) { - for (GUIDList::const_iterator itr = lDeathwhisperStalkers.begin(); itr != lDeathwhisperStalkers.end(); ++itr) + for (GuidList::const_iterator itr = lDeathwhisperStalkers.begin(); itr != lDeathwhisperStalkers.end(); ++itr) { if (Creature* pStalker = m_creature->GetMap()->GetCreature(*itr)) { @@ -232,7 +232,7 @@ struct MANGOS_DLL_DECL boss_lady_deathwhisperAI : public ScriptedAI std::vector vCultists; vCultists.reserve(m_lCultistSpawnedGuidList.size()); - for (GUIDList::const_iterator itr = m_lCultistSpawnedGuidList.begin(); itr != m_lCultistSpawnedGuidList.end(); ++itr) + for (GuidList::const_iterator itr = m_lCultistSpawnedGuidList.begin(); itr != m_lCultistSpawnedGuidList.end(); ++itr) { if (Creature* pCultist = m_creature->GetMap()->GetCreature(*itr)) { @@ -281,7 +281,7 @@ struct MANGOS_DLL_DECL boss_lady_deathwhisperAI : public ScriptedAI } else { - GUIDVector vTempVector = m_bIsLeftSideSummon ? m_vLeftStalkersGuidVector : m_vRightStalkersGuidVector; + GuidVector vTempVector = m_bIsLeftSideSummon ? m_vLeftStalkersGuidVector : m_vRightStalkersGuidVector; for (uint8 i = 0; i < 3; ++i) { if (Creature* pStalker = m_creature->GetMap()->GetCreature(vTempVector[i])) diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_citadel.h b/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_citadel.h index 1a2091f42..70709bbb6 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_citadel.h +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_citadel.h @@ -225,7 +225,7 @@ class MANGOS_DLL_DECL instance_icecrown_citadel : public ScriptedInstance, priva bool IsHeroicDifficulty() { return instance->GetDifficulty() > RAID_DIFFICULTY_25MAN_NORMAL; } bool Is25ManDifficulty() { return instance->GetDifficulty() == RAID_DIFFICULTY_25MAN_NORMAL || instance->GetDifficulty() == RAID_DIFFICULTY_25MAN_HEROIC; } - void GetDeathwhisperStalkersList(GUIDList &lList) { lList = m_lDeathwhisperStalkersGuids; } + void GetDeathwhisperStalkersList(GuidList &lList) { lList = m_lDeathwhisperStalkersGuids; } // Open Putricide door in a few seconds void DoPreparePutricideDoor() { m_uiPutricideValveTimer = 15000; } @@ -244,7 +244,7 @@ class MANGOS_DLL_DECL instance_icecrown_citadel : public ScriptedInstance, priva bool m_bHasMarrowgarIntroYelled; bool m_bHasDeathwhisperIntroYelled; - GUIDList m_lDeathwhisperStalkersGuids; + GuidList m_lDeathwhisperStalkersGuids; }; #endif diff --git a/scripts/northrend/naxxramas/boss_gluth.cpp b/scripts/northrend/naxxramas/boss_gluth.cpp index a5e809bfd..1a08bd513 100644 --- a/scripts/northrend/naxxramas/boss_gluth.cpp +++ b/scripts/northrend/naxxramas/boss_gluth.cpp @@ -73,7 +73,7 @@ struct MANGOS_DLL_DECL boss_gluthAI : public ScriptedAI uint32 m_uiBerserkTimer; - GUIDList m_lZombieChowGuidList; + GuidList m_lZombieChowGuidList; void Reset() { @@ -128,7 +128,7 @@ struct MANGOS_DLL_DECL boss_gluthAI : public ScriptedAI // Replaces missing spell 29682 void DoCallAllZombieChow() { - for (GUIDList::const_iterator itr = m_lZombieChowGuidList.begin(); itr != m_lZombieChowGuidList.end(); ++itr) + for (GuidList::const_iterator itr = m_lZombieChowGuidList.begin(); itr != m_lZombieChowGuidList.end(); ++itr) { if (Creature* pZombie = m_creature->GetMap()->GetCreature(*itr)) pZombie->GetMotionMaster()->MoveFollow(m_creature, ATTACK_DISTANCE, 0); @@ -138,7 +138,7 @@ struct MANGOS_DLL_DECL boss_gluthAI : public ScriptedAI // Replaces missing spell 28236 void DoSearchZombieChow() { - for (GUIDList::const_iterator itr = m_lZombieChowGuidList.begin(); itr != m_lZombieChowGuidList.end(); ++itr) + for (GuidList::const_iterator itr = m_lZombieChowGuidList.begin(); itr != m_lZombieChowGuidList.end(); ++itr) { if (Creature* pZombie = m_creature->GetMap()->GetCreature(*itr)) { diff --git a/scripts/northrend/naxxramas/boss_gothik.cpp b/scripts/northrend/naxxramas/boss_gothik.cpp index 16c723dde..4da56bc03 100644 --- a/scripts/northrend/naxxramas/boss_gothik.cpp +++ b/scripts/northrend/naxxramas/boss_gothik.cpp @@ -81,10 +81,10 @@ struct MANGOS_DLL_DECL boss_gothikAI : public ScriptedAI instance_naxxramas* m_pInstance; bool m_bIsRegularMode; - GUIDList m_lSummonedAddGuids; - GUIDList m_lTraineeSummonPosGuids; - GUIDList m_lDeathKnightSummonPosGuids; - GUIDList m_lRiderSummonPosGuids; + GuidList m_lSummonedAddGuids; + GuidList m_lTraineeSummonPosGuids; + GuidList m_lDeathKnightSummonPosGuids; + GuidList m_lRiderSummonPosGuids; uint8 m_uiPhase; uint8 m_uiSpeech; @@ -118,7 +118,7 @@ struct MANGOS_DLL_DECL boss_gothikAI : public ScriptedAI m_uiSpeechTimer = 1*IN_MILLISECONDS; // Despawn Adds - for (GUIDList::const_iterator itr = m_lSummonedAddGuids.begin(); itr != m_lSummonedAddGuids.end(); itr++) + for (GuidList::const_iterator itr = m_lSummonedAddGuids.begin(); itr != m_lSummonedAddGuids.end(); itr++) { if (Creature* pCreature = m_creature->GetMap()->GetCreature(*itr)) pCreature->ForcedDespawn(); @@ -243,7 +243,7 @@ struct MANGOS_DLL_DECL boss_gothikAI : public ScriptedAI void SummonAdds(bool bRightSide, uint32 uiSummonEntry) { - GUIDList* plSummonPosGuids; + GuidList* plSummonPosGuids; switch(uiSummonEntry) { case NPC_UNREL_TRAINEE: plSummonPosGuids = &m_lTraineeSummonPosGuids; break; @@ -255,7 +255,7 @@ struct MANGOS_DLL_DECL boss_gothikAI : public ScriptedAI if (plSummonPosGuids->empty()) return; - for (GUIDList::iterator itr = plSummonPosGuids->begin(); itr != plSummonPosGuids->end(); ++itr) + for (GuidList::iterator itr = plSummonPosGuids->begin(); itr != plSummonPosGuids->end(); ++itr) { if (Creature* pPos = m_creature->GetMap()->GetCreature(*itr)) m_creature->SummonCreature(uiSummonEntry, pPos->GetPositionX(), pPos->GetPositionY(), pPos->GetPositionZ(), pPos->GetOrientation(), TEMPSUMMON_DEAD_DESPAWN, 0); @@ -428,7 +428,7 @@ struct MANGOS_DLL_DECL boss_gothikAI : public ScriptedAI if (m_pInstance && !HasPlayersInLeftSide()) { ProcessCentralDoor(); - for (GUIDList::const_iterator itr = m_lSummonedAddGuids.begin(); itr != m_lSummonedAddGuids.end(); itr++) + for (GuidList::const_iterator itr = m_lSummonedAddGuids.begin(); itr != m_lSummonedAddGuids.end(); itr++) { if (Creature* pCreature = m_pInstance->instance->GetCreature(*itr)) { diff --git a/scripts/northrend/naxxramas/boss_kelthuzad.cpp b/scripts/northrend/naxxramas/boss_kelthuzad.cpp index b12432357..2f698a5dd 100644 --- a/scripts/northrend/naxxramas/boss_kelthuzad.cpp +++ b/scripts/northrend/naxxramas/boss_kelthuzad.cpp @@ -125,8 +125,8 @@ struct MANGOS_DLL_DECL boss_kelthuzadAI : public ScriptedAI uint32 m_uiIntroPackCount; uint32 m_uiKilledAbomination; - GUIDSet m_lIntroMobsSet; - GUIDSet m_lAddsSet; + GuidSet m_lIntroMobsSet; + GuidSet m_lAddsSet; void Reset() { @@ -196,7 +196,7 @@ struct MANGOS_DLL_DECL boss_kelthuzadAI : public ScriptedAI { if (m_pInstance) { - for(GUIDSet::const_iterator itr = m_lIntroMobsSet.begin(); itr != m_lIntroMobsSet.end(); ++itr) + for(GuidSet::const_iterator itr = m_lIntroMobsSet.begin(); itr != m_lIntroMobsSet.end(); ++itr) { if (Creature* pCreature = m_pInstance->instance->GetCreature(*itr)) pCreature->ForcedDespawn(); @@ -210,7 +210,7 @@ struct MANGOS_DLL_DECL boss_kelthuzadAI : public ScriptedAI { if (m_pInstance) { - for(GUIDSet::const_iterator itr = m_lAddsSet.begin(); itr != m_lAddsSet.end(); ++itr) + for(GuidSet::const_iterator itr = m_lAddsSet.begin(); itr != m_lAddsSet.end(); ++itr) { if (Creature* pCreature = m_pInstance->instance->GetCreature(*itr)) { diff --git a/scripts/northrend/naxxramas/boss_thaddius.cpp b/scripts/northrend/naxxramas/boss_thaddius.cpp index 7e6cbeba6..51e3d7aef 100644 --- a/scripts/northrend/naxxramas/boss_thaddius.cpp +++ b/scripts/northrend/naxxramas/boss_thaddius.cpp @@ -475,7 +475,7 @@ struct MANGOS_DLL_DECL boss_thaddiusAddsAI : public ScriptedAI { Reset(); // Needed to reset the flags properly - GUIDList lTeslaGUIDList; + GuidList lTeslaGUIDList; if (!m_pInstance) return; @@ -483,7 +483,7 @@ struct MANGOS_DLL_DECL boss_thaddiusAddsAI : public ScriptedAI if (lTeslaGUIDList.empty()) return; - for (GUIDList::const_iterator itr = lTeslaGUIDList.begin(); itr != lTeslaGUIDList.end(); ++itr) + for (GuidList::const_iterator itr = lTeslaGUIDList.begin(); itr != lTeslaGUIDList.end(); ++itr) { if (Creature* pTesla = m_pInstance->instance->GetCreature(*itr)) { @@ -557,9 +557,9 @@ struct MANGOS_DLL_DECL boss_thaddiusAddsAI : public ScriptedAI m_bBothDead = true; // Now both adds are counting dead pOtherAI->m_bBothDead = true; // Set both Teslas to overload - GUIDList lTeslaGUIDList; + GuidList lTeslaGUIDList; m_pInstance->GetThadTeslaCreatures(lTeslaGUIDList); - for (GUIDList::const_iterator itr = lTeslaGUIDList.begin(); itr != lTeslaGUIDList.end(); ++itr) + for (GuidList::const_iterator itr = lTeslaGUIDList.begin(); itr != lTeslaGUIDList.end(); ++itr) { if (Creature* pTesla = m_pInstance->instance->GetCreature(*itr)) { diff --git a/scripts/northrend/naxxramas/instance_naxxramas.cpp b/scripts/northrend/naxxramas/instance_naxxramas.cpp index 0cf560545..ba914d636 100644 --- a/scripts/northrend/naxxramas/instance_naxxramas.cpp +++ b/scripts/northrend/naxxramas/instance_naxxramas.cpp @@ -580,7 +580,7 @@ void instance_naxxramas::SetGothTriggers() if (!pGoth) return; - for(GUIDList::const_iterator itr = m_lGothTriggerList.begin(); itr != m_lGothTriggerList.end(); ++itr) + for(GuidList::const_iterator itr = m_lGothTriggerList.begin(); itr != m_lGothTriggerList.end(); ++itr) { if (Creature* pTrigger = instance->GetCreature(*itr)) { @@ -648,7 +648,7 @@ void instance_naxxramas::DoTriggerHeiganTraps(Creature* pHeigan, uint32 uiAreaIn if (uiAreaIndex >= MAX_HEIGAN_TRAP_AREAS) return; - for (GUIDList::const_iterator itr = m_alHeiganTrapGuids[uiAreaIndex].begin(); itr != m_alHeiganTrapGuids[uiAreaIndex].end(); ++itr) + for (GuidList::const_iterator itr = m_alHeiganTrapGuids[uiAreaIndex].begin(); itr != m_alHeiganTrapGuids[uiAreaIndex].end(); ++itr) { if (GameObject* pTrap = instance->GetGameObject(*itr)) pTrap->Use(pHeigan); diff --git a/scripts/northrend/naxxramas/naxxramas.h b/scripts/northrend/naxxramas/naxxramas.h index d036017ef..164afcc14 100644 --- a/scripts/northrend/naxxramas/naxxramas.h +++ b/scripts/northrend/naxxramas/naxxramas.h @@ -239,7 +239,7 @@ class MANGOS_DLL_DECL instance_naxxramas : public ScriptedInstance bool IsInRightSideGothArea(Unit* pUnit); // thaddius - void GetThadTeslaCreatures(GUIDList &lList){ lList = m_lThadTeslaCoilList; }; + void GetThadTeslaCreatures(GuidList &lList){ lList = m_lThadTeslaCoilList; }; // kel void SetChamberCenterCoords(float fX, float fY, float fZ); @@ -251,11 +251,11 @@ class MANGOS_DLL_DECL instance_naxxramas : public ScriptedInstance bool m_abAchievCriteria[MAX_SPECIAL_ACHIEV_CRITS]; std::string m_strInstData; - GUIDList m_lThadTeslaCoilList; - GUIDList m_lGothTriggerList; + GuidList m_lThadTeslaCoilList; + GuidList m_lGothTriggerList; UNORDERED_MAP m_mGothTriggerMap; - GUIDList m_alHeiganTrapGuids[MAX_HEIGAN_TRAP_AREAS]; + GuidList m_alHeiganTrapGuids[MAX_HEIGAN_TRAP_AREAS]; float m_fChamberCenterX; float m_fChamberCenterY; diff --git a/scripts/northrend/nexus/oculus/instance_oculus.cpp b/scripts/northrend/nexus/oculus/instance_oculus.cpp index 4b50098f5..c397afa03 100644 --- a/scripts/northrend/nexus/oculus/instance_oculus.cpp +++ b/scripts/northrend/nexus/oculus/instance_oculus.cpp @@ -77,7 +77,7 @@ void instance_oculus::SetData(uint32 uiType, uint32 uiData) if (uiData == DONE) { // Open all cages - for (GUIDList::const_iterator itr = m_lCageDoorGUIDs.begin(); itr != m_lCageDoorGUIDs.end(); ++itr) + for (GuidList::const_iterator itr = m_lCageDoorGUIDs.begin(); itr != m_lCageDoorGUIDs.end(); ++itr) DoUseDoorOrButton(*itr); // Notes: There should also be a small dialogue here involving Belgaristrasz and Varos diff --git a/scripts/northrend/nexus/oculus/oculus.h b/scripts/northrend/nexus/oculus/oculus.h index be71a373e..a65e79cca 100644 --- a/scripts/northrend/nexus/oculus/oculus.h +++ b/scripts/northrend/nexus/oculus/oculus.h @@ -89,7 +89,7 @@ class MANGOS_DLL_DECL instance_oculus : public ScriptedInstance uint8 m_uiConstructsDead; - GUIDList m_lCageDoorGUIDs; + GuidList m_lCageDoorGUIDs; }; #endif diff --git a/scripts/northrend/ulduar/halls_of_lightning/boss_ionar.cpp b/scripts/northrend/ulduar/halls_of_lightning/boss_ionar.cpp index 0855d3f9f..7334bc2ff 100644 --- a/scripts/northrend/ulduar/halls_of_lightning/boss_ionar.cpp +++ b/scripts/northrend/ulduar/halls_of_lightning/boss_ionar.cpp @@ -68,7 +68,7 @@ struct MANGOS_DLL_DECL boss_ionarAI : public ScriptedAI ScriptedInstance* m_pInstance; - GUIDList m_lSparkGUIDList; + GuidList m_lSparkGUIDList; bool m_bIsRegularMode; @@ -159,7 +159,7 @@ struct MANGOS_DLL_DECL boss_ionarAI : public ScriptedAI void DespawnSpark() { - for (GUIDList::const_iterator itr = m_lSparkGUIDList.begin(); itr != m_lSparkGUIDList.end(); ++itr) + for (GuidList::const_iterator itr = m_lSparkGUIDList.begin(); itr != m_lSparkGUIDList.end(); ++itr) { if (Creature* pTemp = m_creature->GetMap()->GetCreature(*itr)) { @@ -174,7 +174,7 @@ struct MANGOS_DLL_DECL boss_ionarAI : public ScriptedAI // make sparks come back void CallBackSparks() { - for (GUIDList::const_iterator itr = m_lSparkGUIDList.begin(); itr != m_lSparkGUIDList.end(); ++itr) + for (GuidList::const_iterator itr = m_lSparkGUIDList.begin(); itr != m_lSparkGUIDList.end(); ++itr) { if (Creature* pSpark = m_creature->GetMap()->GetCreature(*itr)) { diff --git a/scripts/northrend/ulduar/halls_of_lightning/boss_volkhan.cpp b/scripts/northrend/ulduar/halls_of_lightning/boss_volkhan.cpp index bbb49d197..3b12817b0 100644 --- a/scripts/northrend/ulduar/halls_of_lightning/boss_volkhan.cpp +++ b/scripts/northrend/ulduar/halls_of_lightning/boss_volkhan.cpp @@ -79,7 +79,7 @@ struct MANGOS_DLL_DECL boss_volkhanAI : public ScriptedAI ScriptedInstance* m_pInstance; - GUIDList m_lGolemGUIDList; + GuidList m_lGolemGUIDList; bool m_bIsRegularMode; bool m_bHasShattered; @@ -137,7 +137,7 @@ struct MANGOS_DLL_DECL boss_volkhanAI : public ScriptedAI if (m_lGolemGUIDList.empty()) return; - for(GUIDList::const_iterator itr = m_lGolemGUIDList.begin(); itr != m_lGolemGUIDList.end(); ++itr) + for(GuidList::const_iterator itr = m_lGolemGUIDList.begin(); itr != m_lGolemGUIDList.end(); ++itr) { if (Creature* pTemp = m_creature->GetMap()->GetCreature(*itr)) { @@ -154,7 +154,7 @@ struct MANGOS_DLL_DECL boss_volkhanAI : public ScriptedAI uint8 m_uiBrittleGolemsCount = 0; - for(GUIDList::const_iterator itr = m_lGolemGUIDList.begin(); itr != m_lGolemGUIDList.end(); ++itr) + for(GuidList::const_iterator itr = m_lGolemGUIDList.begin(); itr != m_lGolemGUIDList.end(); ++itr) { if (Creature* pTemp = m_creature->GetMap()->GetCreature(*itr)) { diff --git a/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.cpp b/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.cpp index 37408b405..4e640df2d 100644 --- a/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.cpp +++ b/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.cpp @@ -146,7 +146,7 @@ struct MANGOS_DLL_DECL npc_brann_hosAI : public npc_escortAI uint32 m_uiStep; uint32 m_uiPhaseTimer; - GUIDList m_luiDwarfGUIDs; + GuidList m_luiDwarfGUIDs; void Reset() { @@ -183,7 +183,7 @@ struct MANGOS_DLL_DECL npc_brann_hosAI : public npc_escortAI m_pInstance->SetData(TYPE_TRIBUNAL, IN_PROGRESS); } - for (GUIDList::const_iterator itr = m_luiDwarfGUIDs.begin(); itr != m_luiDwarfGUIDs.end(); ++itr) + for (GuidList::const_iterator itr = m_luiDwarfGUIDs.begin(); itr != m_luiDwarfGUIDs.end(); ++itr) { if (Creature* pDwarf = m_creature->GetMap()->GetCreature(*itr)) pDwarf->ForcedDespawn(); diff --git a/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.h b/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.h index 6d856527d..f4633c3d4 100644 --- a/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.h +++ b/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.h @@ -88,11 +88,11 @@ class MANGOS_DLL_DECL instance_halls_of_stone : public ScriptedInstance Face m_aFaces[MAX_FACES]; std::string m_strInstData; - GUIDList m_lKaddrakGUIDs; - GUIDList m_lAbedneumGUIDs; - GUIDList m_lMarnakGUIDs; - GUIDList m_lTribunalGUIDs; - GUIDList m_lWorldtriggerGUIDs; + GuidList m_lKaddrakGUIDs; + GuidList m_lAbedneumGUIDs; + GuidList m_lMarnakGUIDs; + GuidList m_lTribunalGUIDs; + GuidList m_lWorldtriggerGUIDs; }; #endif diff --git a/scripts/northrend/ulduar/halls_of_stone/instance_halls_of_stone.cpp b/scripts/northrend/ulduar/halls_of_stone/instance_halls_of_stone.cpp index dca0cea13..8fdbcb8e2 100644 --- a/scripts/northrend/ulduar/halls_of_stone/instance_halls_of_stone.cpp +++ b/scripts/northrend/ulduar/halls_of_stone/instance_halls_of_stone.cpp @@ -185,10 +185,10 @@ struct SortHelper }; // Small Helper-function -static void GetValidNPCsOfList(Map* pMap, GUIDList& lGUIDs, std::list& lNPCs) +static void GetValidNPCsOfList(Map* pMap, GuidList& lGUIDs, std::list& lNPCs) { lNPCs.clear(); - for (GUIDList::const_iterator itr = lGUIDs.begin(); itr != lGUIDs.end(); ++itr) + for (GuidList::const_iterator itr = lGUIDs.begin(); itr != lGUIDs.end(); ++itr) { if (Creature* pMob = pMap->GetCreature(*itr)) lNPCs.push_back(pMob); diff --git a/scripts/northrend/ulduar/ulduar/boss_general_vezax.cpp b/scripts/northrend/ulduar/ulduar/boss_general_vezax.cpp index b55279afc..ad2d08567 100644 --- a/scripts/northrend/ulduar/ulduar/boss_general_vezax.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_general_vezax.cpp @@ -77,7 +77,7 @@ struct MANGOS_DLL_DECL boss_general_vezaxAI : public ScriptedAI uint8 m_uiVaporsGathered; - GUIDList m_lVaporsGuids; + GuidList m_lVaporsGuids; void Reset() { @@ -169,7 +169,7 @@ struct MANGOS_DLL_DECL boss_general_vezaxAI : public ScriptedAI pSummoned->CastSpell(pSummoned, SPELL_ANIMUS_FORMATION, true); // Despawn the vapors - for (GUIDList::const_iterator itr = m_lVaporsGuids.begin(); itr != m_lVaporsGuids.end(); ++itr) + for (GuidList::const_iterator itr = m_lVaporsGuids.begin(); itr != m_lVaporsGuids.end(); ++itr) { if (Creature* pVapor = m_creature->GetMap()->GetCreature(*itr)) pVapor->ForcedDespawn(4000); @@ -184,7 +184,7 @@ struct MANGOS_DLL_DECL boss_general_vezaxAI : public ScriptedAI void DoPrepareAnimusIfCan() { // Gather the vapors to the boss - NOTE: not sure if position is ok - for (GUIDList::const_iterator itr = m_lVaporsGuids.begin(); itr != m_lVaporsGuids.end(); ++itr) + for (GuidList::const_iterator itr = m_lVaporsGuids.begin(); itr != m_lVaporsGuids.end(); ++itr) { // Better place: near him or some fixed position? if (Creature* pVapor = m_creature->GetMap()->GetCreature(*itr)) diff --git a/scripts/northrend/utgarde_keep/utgarde_keep/boss_keleseth.cpp b/scripts/northrend/utgarde_keep/utgarde_keep/boss_keleseth.cpp index cf0644e26..ca3885413 100644 --- a/scripts/northrend/utgarde_keep/utgarde_keep/boss_keleseth.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_keep/boss_keleseth.cpp @@ -192,7 +192,7 @@ struct MANGOS_DLL_DECL boss_kelesethAI : public ScriptedAI uint32 m_uiSummonTimer; uint32 m_uiShadowboltTimer; - GUIDList m_lSummonedAddGuids; + GuidList m_lSummonedAddGuids; void Reset() { @@ -232,7 +232,7 @@ struct MANGOS_DLL_DECL boss_kelesethAI : public ScriptedAI void DespawnOrKillAdds(bool bDespawn) { - for (GUIDList::const_iterator itr = m_lSummonedAddGuids.begin(); itr != m_lSummonedAddGuids.end(); ++itr) + for (GuidList::const_iterator itr = m_lSummonedAddGuids.begin(); itr != m_lSummonedAddGuids.end(); ++itr) { if (Creature* pAdd = m_creature->GetMap()->GetCreature(*itr)) { diff --git a/scripts/northrend/violet_hold/instance_violet_hold.cpp b/scripts/northrend/violet_hold/instance_violet_hold.cpp index 1e41474f5..a013daafb 100644 --- a/scripts/northrend/violet_hold/instance_violet_hold.cpp +++ b/scripts/northrend/violet_hold/instance_violet_hold.cpp @@ -86,7 +86,7 @@ void instance_violet_hold::ResetAll() // Respawn Erekem guards if (pData->uiType == TYPE_EREKEM) { - for (GUIDList::const_iterator itr = m_lErekemGuardList.begin(); itr != m_lErekemGuardList.end(); ++itr) + for (GuidList::const_iterator itr = m_lErekemGuardList.begin(); itr != m_lErekemGuardList.end(); ++itr) { if (Creature* pGuard = instance->GetCreature(*itr)) { @@ -395,7 +395,7 @@ void instance_violet_hold::Load(const char* chrIn) void instance_violet_hold::SetIntroPortals(bool bDeactivate) { - for(GUIDList::const_iterator itr = m_lIntroPortalList.begin(); itr != m_lIntroPortalList.end(); ++itr) + for(GuidList::const_iterator itr = m_lIntroPortalList.begin(); itr != m_lIntroPortalList.end(); ++itr) { if (Creature* pPortal = instance->GetCreature(*itr)) { @@ -505,7 +505,7 @@ void instance_violet_hold::SetRandomBosses() void instance_violet_hold::CallGuards(bool bRespawn) { - for(GUIDList::const_iterator itr = m_lGuardsList.begin(); itr != m_lGuardsList.end(); ++itr) + for(GuidList::const_iterator itr = m_lGuardsList.begin(); itr != m_lGuardsList.end(); ++itr) { if (Creature* pGuard = instance->GetCreature(*itr)) { diff --git a/scripts/northrend/violet_hold/violet_hold.cpp b/scripts/northrend/violet_hold/violet_hold.cpp index c475697fc..c76ba9ed2 100644 --- a/scripts/northrend/violet_hold/violet_hold.cpp +++ b/scripts/northrend/violet_hold/violet_hold.cpp @@ -230,7 +230,7 @@ struct MANGOS_DLL_DECL npc_prison_event_controllerAI : public ScriptedAI instance_violet_hold* m_pInstance; - GUIDSet m_sTrashPackSet; + GuidSet m_sTrashPackSet; uint32 m_uiSaboteurTimer; uint8 m_uiSaboteurPhase; @@ -346,12 +346,12 @@ struct MANGOS_DLL_DECL npc_prison_event_controllerAI : public ScriptedAI // Handle Erekem guards if (pData->uiType == TYPE_EREKEM) { - GUIDList lAddGuids; + GuidList lAddGuids; if (m_pInstance) m_pInstance->GetErekemGuardList(lAddGuids); float fMoveX; - for (GUIDList::const_iterator itr = lAddGuids.begin(); itr != lAddGuids.end(); ++itr) + for (GuidList::const_iterator itr = lAddGuids.begin(); itr != lAddGuids.end(); ++itr) { if (Creature* pAdd = m_pInstance->instance->GetCreature(*itr)) { diff --git a/scripts/northrend/violet_hold/violet_hold.h b/scripts/northrend/violet_hold/violet_hold.h index 559d042bc..37dddf590 100644 --- a/scripts/northrend/violet_hold/violet_hold.h +++ b/scripts/northrend/violet_hold/violet_hold.h @@ -223,8 +223,8 @@ class MANGOS_DLL_DECL instance_violet_hold : public ScriptedInstance void ProcessActivationCrystal(Unit* pUser, bool bIsIntro = false); - void GetErekemGuardList(GUIDList& lList) { lList = m_lErekemGuardList; } - void GetIchoronTriggerList(GUIDList& lList) { lList = m_lIchoronTargetsList; } + void GetErekemGuardList(GuidList& lList) { lList = m_lErekemGuardList; } + void GetIchoronTriggerList(GuidList& lList) { lList = m_lIchoronTargetsList; } void OnPlayerEnter(Player* pPlayer); @@ -286,10 +286,10 @@ class MANGOS_DLL_DECL instance_violet_hold : public ScriptedInstance BossToCellMap m_mBossToCellMap; - GUIDList m_lIntroPortalList; - GUIDList m_lGuardsList; - GUIDList m_lErekemGuardList; - GUIDList m_lIchoronTargetsList; + GuidList m_lIntroPortalList; + GuidList m_lGuardsList; + GuidList m_lErekemGuardList; + GuidList m_lIchoronTargetsList; std::list m_lRandomBossList; std::vector m_vRandomBosses; diff --git a/scripts/outland/auchindoun/sethekk_halls/boss_anzu.cpp b/scripts/outland/auchindoun/sethekk_halls/boss_anzu.cpp index 711b788c8..393e8f86e 100644 --- a/scripts/outland/auchindoun/sethekk_halls/boss_anzu.cpp +++ b/scripts/outland/auchindoun/sethekk_halls/boss_anzu.cpp @@ -64,7 +64,7 @@ struct MANGOS_DLL_DECL boss_anzuAI : public ScriptedAI uint32 m_uiCycloneTimer; uint8 m_uiBanishPhase; - GUIDList m_lBirdsGuidList; + GuidList m_lBirdsGuidList; void Reset() { @@ -145,7 +145,7 @@ struct MANGOS_DLL_DECL boss_anzuAI : public ScriptedAI void DespawnBirdHelpers() { - for (GUIDList::const_iterator itr = m_lBirdsGuidList.begin(); itr != m_lBirdsGuidList.end(); ++itr) + for (GuidList::const_iterator itr = m_lBirdsGuidList.begin(); itr != m_lBirdsGuidList.end(); ++itr) { if (Creature* pTemp = m_creature->GetMap()->GetCreature(*itr)) pTemp->ForcedDespawn(); diff --git a/scripts/outland/auchindoun/shadow_labyrinth/boss_grandmaster_vorpil.cpp b/scripts/outland/auchindoun/shadow_labyrinth/boss_grandmaster_vorpil.cpp index 2889da3ec..19ae120f4 100644 --- a/scripts/outland/auchindoun/shadow_labyrinth/boss_grandmaster_vorpil.cpp +++ b/scripts/outland/auchindoun/shadow_labyrinth/boss_grandmaster_vorpil.cpp @@ -172,9 +172,9 @@ struct MANGOS_DLL_DECL boss_grandmaster_vorpilAI : public ScriptedAI float fX, fY, fZ; - GUIDVector vGuids; + GuidVector vGuids; m_creature->FillGuidsListFromThreatList(vGuids); - for (GUIDVector::const_iterator itr = vGuids.begin();itr != vGuids.end(); ++itr) + for (GuidVector::const_iterator itr = vGuids.begin();itr != vGuids.end(); ++itr) { Unit* pTarget = m_creature->GetMap()->GetUnit(*itr); diff --git a/scripts/outland/black_temple/boss_shade_of_akama.cpp b/scripts/outland/black_temple/boss_shade_of_akama.cpp index b59c9cbf5..ad5c3d506 100644 --- a/scripts/outland/black_temple/boss_shade_of_akama.cpp +++ b/scripts/outland/black_temple/boss_shade_of_akama.cpp @@ -125,8 +125,8 @@ struct MANGOS_DLL_DECL boss_shade_of_akamaAI : public ScriptedAI ScriptedInstance* m_pInstance; - GUIDList m_lChannelersGUIDList; - GUIDList m_lSorcerersGUIDList; + GuidList m_lChannelersGUIDList; + GuidList m_lSorcerersGUIDList; uint32 m_uiDeathChannelerCount; @@ -231,7 +231,7 @@ struct MANGOS_DLL_DECL boss_shade_of_akamaAI : public ScriptedAI void DespawnSorceres() { - for (GUIDList::const_iterator itr = m_lSorcerersGUIDList.begin(); itr != m_lSorcerersGUIDList.end(); ++itr) + for (GuidList::const_iterator itr = m_lSorcerersGUIDList.begin(); itr != m_lSorcerersGUIDList.end(); ++itr) { if (Creature* pSorcerer = m_creature->GetMap()->GetCreature(*itr)) { @@ -243,7 +243,7 @@ struct MANGOS_DLL_DECL boss_shade_of_akamaAI : public ScriptedAI void RespawnChannelersIfDeadOrEvade() { - for (GUIDList::const_iterator itr = m_lChannelersGUIDList.begin(); itr != m_lChannelersGUIDList.end(); ++itr) + for (GuidList::const_iterator itr = m_lChannelersGUIDList.begin(); itr != m_lChannelersGUIDList.end(); ++itr) { if (Creature* pChanneler = m_creature->GetMap()->GetCreature(*itr)) { @@ -405,7 +405,7 @@ struct MANGOS_DLL_DECL npc_akamaAI : public ScriptedAI uint32 m_uiWayPointId; uint32 m_uiBrokenSummonIndex; - GUIDList m_lBrokenGUIDList; + GuidList m_lBrokenGUIDList; bool m_bIsEventBegun; bool m_bIsShadeDead; @@ -603,7 +603,7 @@ struct MANGOS_DLL_DECL npc_akamaAI : public ScriptedAI { bool bYelled = false; - for (GUIDList::const_iterator itr = m_lBrokenGUIDList.begin(); itr != m_lBrokenGUIDList.end(); ++itr) + for (GuidList::const_iterator itr = m_lBrokenGUIDList.begin(); itr != m_lBrokenGUIDList.end(); ++itr) { if (Creature* pBroken = m_creature->GetMap()->GetCreature(*itr)) { @@ -621,7 +621,7 @@ struct MANGOS_DLL_DECL npc_akamaAI : public ScriptedAI m_uiSoulRetrieveTimer = 1500; break; case 3: - for (GUIDList::const_iterator itr = m_lBrokenGUIDList.begin(); itr != m_lBrokenGUIDList.end(); ++itr) + for (GuidList::const_iterator itr = m_lBrokenGUIDList.begin(); itr != m_lBrokenGUIDList.end(); ++itr) { // This is the incorrect spell, but can't seem to find the right one. if (Creature* pBroken = m_creature->GetMap()->GetCreature(*itr)) @@ -631,7 +631,7 @@ struct MANGOS_DLL_DECL npc_akamaAI : public ScriptedAI m_uiSoulRetrieveTimer = 5000; break; case 4: - for (GUIDList::const_iterator itr = m_lBrokenGUIDList.begin(); itr != m_lBrokenGUIDList.end(); ++itr) + for (GuidList::const_iterator itr = m_lBrokenGUIDList.begin(); itr != m_lBrokenGUIDList.end(); ++itr) { if (Creature* pBroken = m_creature->GetMap()->GetCreature(*itr)) DoScriptText(SAY_BROKEN_FREE_02, pBroken); diff --git a/scripts/outland/black_temple/boss_supremus.cpp b/scripts/outland/black_temple/boss_supremus.cpp index 6a4f1d426..a4308b168 100644 --- a/scripts/outland/black_temple/boss_supremus.cpp +++ b/scripts/outland/black_temple/boss_supremus.cpp @@ -103,7 +103,7 @@ struct MANGOS_DLL_DECL boss_supremusAI : public ScriptedAI bool m_bTankPhase; - GUIDList m_lSummonedGUIDs; + GuidList m_lSummonedGUIDs; void Reset() { @@ -135,7 +135,7 @@ struct MANGOS_DLL_DECL boss_supremusAI : public ScriptedAI if (m_pInstance) m_pInstance->SetData(TYPE_SUPREMUS, DONE); - for (GUIDList::const_iterator itr = m_lSummonedGUIDs.begin(); itr != m_lSummonedGUIDs.end(); ++itr) + for (GuidList::const_iterator itr = m_lSummonedGUIDs.begin(); itr != m_lSummonedGUIDs.end(); ++itr) { if (Creature* pSummoned = m_creature->GetMap()->GetCreature(*itr)) pSummoned->ForcedDespawn(); diff --git a/scripts/outland/coilfang_reservoir/steam_vault/instance_steam_vault.cpp b/scripts/outland/coilfang_reservoir/steam_vault/instance_steam_vault.cpp index eb95de98e..5919b97dd 100644 --- a/scripts/outland/coilfang_reservoir/steam_vault/instance_steam_vault.cpp +++ b/scripts/outland/coilfang_reservoir/steam_vault/instance_steam_vault.cpp @@ -130,7 +130,7 @@ void instance_steam_vault::SetData(uint32 uiType, uint32 uiData) if (uiData == FAIL) { // Reset Distiller flags - respawn is handled by DB - for (GUIDList::const_iterator itr = m_lNagaDistillerGuidList.begin(); itr != m_lNagaDistillerGuidList.end(); ++itr) + for (GuidList::const_iterator itr = m_lNagaDistillerGuidList.begin(); itr != m_lNagaDistillerGuidList.end(); ++itr) { if (Creature* pDistiller = instance->GetCreature(*itr)) { diff --git a/scripts/outland/coilfang_reservoir/steam_vault/steam_vault.h b/scripts/outland/coilfang_reservoir/steam_vault/steam_vault.h index d06bb904a..8ab8a2cde 100644 --- a/scripts/outland/coilfang_reservoir/steam_vault/steam_vault.h +++ b/scripts/outland/coilfang_reservoir/steam_vault/steam_vault.h @@ -45,7 +45,7 @@ class MANGOS_DLL_DECL instance_steam_vault : public ScriptedInstance uint32 m_auiEncounter[MAX_ENCOUNTER]; std::string m_strInstData; - GUIDList m_lNagaDistillerGuidList; + GuidList m_lNagaDistillerGuidList; }; #endif diff --git a/scripts/outland/hellfire_citadel/blood_furnace/blood_furnace.h b/scripts/outland/hellfire_citadel/blood_furnace/blood_furnace.h index effed3407..8dcde9415 100644 --- a/scripts/outland/hellfire_citadel/blood_furnace/blood_furnace.h +++ b/scripts/outland/hellfire_citadel/blood_furnace/blood_furnace.h @@ -48,7 +48,7 @@ struct BroggokEventInfo ObjectGuid m_cellGuid; bool m_bIsCellOpened; uint8 m_uiKilledOrcCount; - GUIDSet m_sSortedOrcGuids; + GuidSet m_sSortedOrcGuids; }; class MANGOS_DLL_DECL instance_blood_furnace : public ScriptedInstance @@ -74,7 +74,7 @@ class MANGOS_DLL_DECL instance_blood_furnace : public ScriptedInstance void GetMovementDistanceForIndex(uint32 uiIndex, float& dx, float& dy); - void GetKelidanAddList(GUIDList& lList) { lList = m_lChannelersGuids; m_lChannelersGuids.clear(); } + void GetKelidanAddList(GuidList& lList) { lList = m_lChannelersGuids; m_lChannelersGuids.clear(); } private: void DoSortBroggokOrcs(); @@ -88,8 +88,8 @@ class MANGOS_DLL_DECL instance_blood_furnace : public ScriptedInstance uint32 m_uiBroggokEventTimer; // Timer for opening the event cages; only on heroic mode = 30 secs uint32 m_uiBroggokEventPhase; - GUIDList m_luiNascentOrcGuids; - GUIDList m_lChannelersGuids; + GuidList m_luiNascentOrcGuids; + GuidList m_lChannelersGuids; }; #endif diff --git a/scripts/outland/hellfire_citadel/blood_furnace/boss_kelidan_the_breaker.cpp b/scripts/outland/hellfire_citadel/blood_furnace/boss_kelidan_the_breaker.cpp index aafd65140..a1ba11b68 100644 --- a/scripts/outland/hellfire_citadel/blood_furnace/boss_kelidan_the_breaker.cpp +++ b/scripts/outland/hellfire_citadel/blood_furnace/boss_kelidan_the_breaker.cpp @@ -92,7 +92,7 @@ struct MANGOS_DLL_DECL boss_kelidan_the_breakerAI : public ScriptedAI uint8 m_uiKilledAdds; bool m_bDidMagtheridonYell; - GUIDVector m_vAddGuids; + GuidVector m_vAddGuids; void Reset() { @@ -153,7 +153,7 @@ struct MANGOS_DLL_DECL boss_kelidan_the_breakerAI : public ScriptedAI if (!m_pInstance) return; - GUIDList lAddGuids; + GuidList lAddGuids; m_pInstance->GetKelidanAddList(lAddGuids); // Sort Adds to vector if not already done @@ -161,7 +161,7 @@ struct MANGOS_DLL_DECL boss_kelidan_the_breakerAI : public ScriptedAI { m_vAddGuids.reserve(lAddGuids.size()); std::list lAdds; - for (GUIDList::const_iterator itr = lAddGuids.begin(); itr != lAddGuids.end(); ++itr) + for (GuidList::const_iterator itr = lAddGuids.begin(); itr != lAddGuids.end(); ++itr) { if (Creature* pAdd = m_pInstance->instance->GetCreature(*itr)) lAdds.push_back(pAdd); @@ -174,7 +174,7 @@ struct MANGOS_DLL_DECL boss_kelidan_the_breakerAI : public ScriptedAI // Respawn killed adds and reset counter m_uiKilledAdds = 0; - for (GUIDVector::const_iterator itr = m_vAddGuids.begin(); itr != m_vAddGuids.end(); ++itr) + for (GuidVector::const_iterator itr = m_vAddGuids.begin(); itr != m_vAddGuids.end(); ++itr) { Creature* pAdd = m_pInstance->instance->GetCreature(*itr); if (pAdd && !pAdd->isAlive()) @@ -195,7 +195,7 @@ struct MANGOS_DLL_DECL boss_kelidan_the_breakerAI : public ScriptedAI void AddJustAggroed(Unit* pWho) { // Let all adds attack - for (GUIDVector::const_iterator itr = m_vAddGuids.begin(); itr != m_vAddGuids.end(); ++itr) + for (GuidVector::const_iterator itr = m_vAddGuids.begin(); itr != m_vAddGuids.end(); ++itr) { Creature* pAdd = m_creature->GetMap()->GetCreature(*itr); if (pAdd && !pAdd->getVictim()) diff --git a/scripts/outland/hellfire_citadel/blood_furnace/instance_blood_furnace.cpp b/scripts/outland/hellfire_citadel/blood_furnace/instance_blood_furnace.cpp index 900762c9f..d69b6da44 100644 --- a/scripts/outland/hellfire_citadel/blood_furnace/instance_blood_furnace.cpp +++ b/scripts/outland/hellfire_citadel/blood_furnace/instance_blood_furnace.cpp @@ -134,7 +134,7 @@ void instance_blood_furnace::SetData(uint32 uiType, uint32 uiData) continue; m_aBroggokEvent[i].m_uiKilledOrcCount = 0; - for (GUIDSet::const_iterator itr = m_aBroggokEvent[i].m_sSortedOrcGuids.begin(); itr != m_aBroggokEvent[i].m_sSortedOrcGuids.end(); ++itr) + for (GuidSet::const_iterator itr = m_aBroggokEvent[i].m_sSortedOrcGuids.begin(); itr != m_aBroggokEvent[i].m_sSortedOrcGuids.end(); ++itr) { if (Creature* pOrc = instance->GetCreature(*itr)) { @@ -203,7 +203,7 @@ void instance_blood_furnace::DoNextBroggokEventPhase() m_aBroggokEvent[m_uiBroggokEventPhase].m_bIsCellOpened = true; - for(GUIDSet::const_iterator itr = m_aBroggokEvent[m_uiBroggokEventPhase].m_sSortedOrcGuids.begin(); itr != m_aBroggokEvent[m_uiBroggokEventPhase].m_sSortedOrcGuids.end(); ++itr) + for(GuidSet::const_iterator itr = m_aBroggokEvent[m_uiBroggokEventPhase].m_sSortedOrcGuids.begin(); itr != m_aBroggokEvent[m_uiBroggokEventPhase].m_sSortedOrcGuids.end(); ++itr) { if (Creature* pOrc = instance->GetCreature(*itr)) { @@ -314,7 +314,7 @@ void instance_blood_furnace::Load(const char* chrIn) // Sort all nascent orcs in the instance in order to get only those near broggok doors void instance_blood_furnace::DoSortBroggokOrcs() { - for (GUIDList::const_iterator itr = m_luiNascentOrcGuids.begin(); itr != m_luiNascentOrcGuids.end(); ++itr) + for (GuidList::const_iterator itr = m_luiNascentOrcGuids.begin(); itr != m_luiNascentOrcGuids.end(); ++itr) { if (Creature* pOrc = instance->GetCreature(*itr)) { diff --git a/scripts/outland/hellfire_citadel/hellfire_ramparts/hellfire_ramparts.h b/scripts/outland/hellfire_citadel/hellfire_ramparts/hellfire_ramparts.h index 07dc17521..6695af03b 100644 --- a/scripts/outland/hellfire_citadel/hellfire_ramparts/hellfire_ramparts.h +++ b/scripts/outland/hellfire_citadel/hellfire_ramparts/hellfire_ramparts.h @@ -41,7 +41,7 @@ class MANGOS_DLL_DECL instance_ramparts : public ScriptedInstance uint32 m_auiEncounter[MAX_ENCOUNTER]; uint32 m_uiSentryCounter; - GUIDList m_lSentryGUIDs; + GuidList m_lSentryGUIDs; }; #endif diff --git a/scripts/outland/hellfire_citadel/hellfire_ramparts/instance_hellfire_ramparts.cpp b/scripts/outland/hellfire_citadel/hellfire_ramparts/instance_hellfire_ramparts.cpp index 01ef20c25..468a2467f 100644 --- a/scripts/outland/hellfire_citadel/hellfire_ramparts/instance_hellfire_ramparts.cpp +++ b/scripts/outland/hellfire_citadel/hellfire_ramparts/instance_hellfire_ramparts.cpp @@ -115,7 +115,7 @@ void instance_ramparts::DoFailVazruden() // Restore Sentries (counter and respawn them) m_uiSentryCounter = 0; - for (GUIDList::const_iterator itr = m_lSentryGUIDs.begin(); itr != m_lSentryGUIDs.end(); ++itr) + for (GuidList::const_iterator itr = m_lSentryGUIDs.begin(); itr != m_lSentryGUIDs.end(); ++itr) { if (Creature* pSentry = instance->GetCreature(*itr)) pSentry->Respawn(); diff --git a/scripts/outland/hellfire_citadel/magtheridons_lair/instance_magtheridons_lair.cpp b/scripts/outland/hellfire_citadel/magtheridons_lair/instance_magtheridons_lair.cpp index bb5a35056..711cd3b29 100644 --- a/scripts/outland/hellfire_citadel/magtheridons_lair/instance_magtheridons_lair.cpp +++ b/scripts/outland/hellfire_citadel/magtheridons_lair/instance_magtheridons_lair.cpp @@ -106,7 +106,7 @@ void instance_magtheridons_lair::SetData(uint32 uiType, uint32 uiData) break; } - for(GUIDSet::const_iterator itr = m_sChannelerGuid.begin(); itr != m_sChannelerGuid.end(); ++itr) + for(GuidSet::const_iterator itr = m_sChannelerGuid.begin(); itr != m_sChannelerGuid.end(); ++itr) { if (Creature* pChanneler = instance->GetCreature(*itr)) { @@ -129,7 +129,7 @@ void instance_magtheridons_lair::SetData(uint32 uiType, uint32 uiData) m_auiEncounter[1] = IN_PROGRESS; // Let all five channelers aggro. - for(GUIDSet::const_iterator itr = m_sChannelerGuid.begin(); itr != m_sChannelerGuid.end(); ++itr) + for(GuidSet::const_iterator itr = m_sChannelerGuid.begin(); itr != m_sChannelerGuid.end(); ++itr) { Creature* pChanneler = instance->GetCreature(*itr); @@ -148,7 +148,7 @@ void instance_magtheridons_lair::SetData(uint32 uiType, uint32 uiData) } break; case DONE: // Add buff and check if all channelers are dead. - for(GUIDSet::iterator itr = m_sChannelerGuid.begin(); itr != m_sChannelerGuid.end(); ++itr) + for(GuidSet::iterator itr = m_sChannelerGuid.begin(); itr != m_sChannelerGuid.end(); ++itr) { Creature* pChanneler = instance->GetCreature(*itr); @@ -166,7 +166,7 @@ void instance_magtheridons_lair::SetData(uint32 uiType, uint32 uiData) break; case TYPE_HALL_COLLAPSE: // IN_PROGRESS - collapse / NOT_STARTED - reset - for(GUIDSet::const_iterator itr = m_sColumnGuid.begin(); itr != m_sColumnGuid.end(); ++itr) + for(GuidSet::const_iterator itr = m_sColumnGuid.begin(); itr != m_sColumnGuid.end(); ++itr) DoUseDoorOrButton(*itr); break; } @@ -230,7 +230,7 @@ void instance_magtheridons_lair::Update(uint32 uiDiff) { if (m_uiRespawnTimer <= uiDiff) { - for(GUIDSet::const_iterator itr = m_sChannelerGuid.begin(); itr != m_sChannelerGuid.end(); ++itr) + for(GuidSet::const_iterator itr = m_sChannelerGuid.begin(); itr != m_sChannelerGuid.end(); ++itr) { if (Creature* pChanneler = instance->GetCreature(*itr)) { diff --git a/scripts/outland/hellfire_citadel/magtheridons_lair/magtheridons_lair.h b/scripts/outland/hellfire_citadel/magtheridons_lair/magtheridons_lair.h index 2a7c8fe7f..e02f43921 100644 --- a/scripts/outland/hellfire_citadel/magtheridons_lair/magtheridons_lair.h +++ b/scripts/outland/hellfire_citadel/magtheridons_lair/magtheridons_lair.h @@ -56,8 +56,8 @@ class MANGOS_DLL_DECL instance_magtheridons_lair : public ScriptedInstance private: uint32 m_auiEncounter[MAX_ENCOUNTER]; - GUIDSet m_sChannelerGuid; - GUIDSet m_sColumnGuid; + GuidSet m_sChannelerGuid; + GuidSet m_sColumnGuid; uint32 m_uiCageTimer; uint32 m_uiRespawnTimer; diff --git a/scripts/outland/hellfire_citadel/shattered_halls/boss_warchief_kargath_bladefist.cpp b/scripts/outland/hellfire_citadel/shattered_halls/boss_warchief_kargath_bladefist.cpp index 62acb0394..033e3f634 100644 --- a/scripts/outland/hellfire_citadel/shattered_halls/boss_warchief_kargath_bladefist.cpp +++ b/scripts/outland/hellfire_citadel/shattered_halls/boss_warchief_kargath_bladefist.cpp @@ -65,8 +65,8 @@ struct MANGOS_DLL_DECL boss_warchief_kargath_bladefistAI : public ScriptedAI ScriptedInstance* m_pInstance; bool m_bIsRegularMode; - GUIDVector m_vAddGuids; - GUIDVector m_vAssassinGuids; + GuidVector m_vAddGuids; + GuidVector m_vAssassinGuids; uint32 m_uiChargeTimer; uint32 m_uiBladeDanceTimer; @@ -170,7 +170,7 @@ struct MANGOS_DLL_DECL boss_warchief_kargath_bladefistAI : public ScriptedAI // Note: this should be done by creature linkin in core void DoDespawnAdds() { - for (GUIDVector::const_iterator itr = m_vAddGuids.begin(); itr != m_vAddGuids.end(); ++itr) + for (GuidVector::const_iterator itr = m_vAddGuids.begin(); itr != m_vAddGuids.end(); ++itr) { if (Creature* pTemp = m_creature->GetMap()->GetCreature(*itr)) pTemp->ForcedDespawn(); @@ -178,7 +178,7 @@ struct MANGOS_DLL_DECL boss_warchief_kargath_bladefistAI : public ScriptedAI m_vAddGuids.clear(); - for (GUIDVector::const_iterator itr = m_vAssassinGuids.begin(); itr != m_vAssassinGuids.end(); ++itr) + for (GuidVector::const_iterator itr = m_vAssassinGuids.begin(); itr != m_vAssassinGuids.end(); ++itr) { if (Creature* pTemp = m_creature->GetMap()->GetCreature(*itr)) pTemp->ForcedDespawn(); diff --git a/scripts/outland/tempest_keep/arcatraz/arcatraz.h b/scripts/outland/tempest_keep/arcatraz/arcatraz.h index 22f8b08f8..949b7162e 100644 --- a/scripts/outland/tempest_keep/arcatraz/arcatraz.h +++ b/scripts/outland/tempest_keep/arcatraz/arcatraz.h @@ -88,7 +88,7 @@ class MANGOS_DLL_DECL instance_arcatraz : public ScriptedInstance, private Dialo uint32 m_uiResetDelayTimer; - GUIDList m_lSkyrissEventMobsGuidList; + GuidList m_lSkyrissEventMobsGuidList; }; #endif diff --git a/scripts/outland/tempest_keep/arcatraz/instance_arcatraz.cpp b/scripts/outland/tempest_keep/arcatraz/instance_arcatraz.cpp index 6f5ccbc34..5af79044e 100644 --- a/scripts/outland/tempest_keep/arcatraz/instance_arcatraz.cpp +++ b/scripts/outland/tempest_keep/arcatraz/instance_arcatraz.cpp @@ -174,7 +174,7 @@ void instance_arcatraz::SetData(uint32 uiType, uint32 uiData) m_uiResetDelayTimer = 60000; // Despawn all the summons manually - for (GUIDList::const_iterator itr = m_lSkyrissEventMobsGuidList.begin(); itr != m_lSkyrissEventMobsGuidList.end(); ++itr) + for (GuidList::const_iterator itr = m_lSkyrissEventMobsGuidList.begin(); itr != m_lSkyrissEventMobsGuidList.end(); ++itr) { if (Creature* pTemp = instance->GetCreature(*itr)) pTemp->ForcedDespawn(); diff --git a/scripts/outland/tempest_keep/the_eye/boss_astromancer.cpp b/scripts/outland/tempest_keep/the_eye/boss_astromancer.cpp index 9ff3e91fb..f0d4436e9 100644 --- a/scripts/outland/tempest_keep/the_eye/boss_astromancer.cpp +++ b/scripts/outland/tempest_keep/the_eye/boss_astromancer.cpp @@ -103,7 +103,7 @@ struct MANGOS_DLL_DECL boss_high_astromancer_solarianAI : public ScriptedAI Phases m_Phase; - GUIDVector m_vSpotLightsGuidVector; + GuidVector m_vSpotLightsGuidVector; void Reset() { diff --git a/scripts/outland/tempest_keep/the_mechanar/mechanar.h b/scripts/outland/tempest_keep/the_mechanar/mechanar.h index 538e108ab..94d8b5d0e 100644 --- a/scripts/outland/tempest_keep/the_mechanar/mechanar.h +++ b/scripts/outland/tempest_keep/the_mechanar/mechanar.h @@ -95,7 +95,7 @@ class MANGOS_DLL_DECL instance_mechanar : public ScriptedInstance uint32 m_uiBridgeEventTimer; uint8 m_uiBridgeEventPhase; - GUIDSet m_sBridgeTrashGuidSet; + GuidSet m_sBridgeTrashGuidSet; }; #endif diff --git a/scripts/world/npcs_special.cpp b/scripts/world/npcs_special.cpp index 17e503003..842d0d1a9 100644 --- a/scripts/world/npcs_special.cpp +++ b/scripts/world/npcs_special.cpp @@ -483,7 +483,7 @@ struct MANGOS_DLL_DECL npc_doctorAI : public ScriptedAI bool Event; - GUIDList Patients; + GuidList Patients; std::vector Coordinates; void Reset() @@ -698,7 +698,7 @@ void npc_doctorAI::PatientSaved(Creature* soldier, Player* pPlayer, Location* Po if (PatientSavedCount == 15) { - for(GUIDList::const_iterator itr = Patients.begin(); itr != Patients.end(); ++itr) + for(GuidList::const_iterator itr = Patients.begin(); itr != Patients.end(); ++itr) { if (Creature* Patient = m_creature->GetMap()->GetCreature(*itr)) Patient->SetDeathState(JUST_DIED); diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index fbc1c2b38..082b26580 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2609" + #define SD2_REVISION_NR "2610" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 5d442909b..61f9570ba 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -3,7 +3,7 @@ -- DELETE FROM sd2_db_version; -INSERT INTO sd2_db_version (version) VALUES ('ScriptDev2 (for MaNGOS 11962+) '); +INSERT INTO sd2_db_version (version) VALUES ('ScriptDev2 (for MaNGOS 12026+) '); -- -- Below contains data for table `script_texts` mainly used in C++ parts. diff --git a/sql/updates/r2610_scriptdev2.sql b/sql/updates/r2610_scriptdev2.sql new file mode 100644 index 000000000..a80fcadc0 --- /dev/null +++ b/sql/updates/r2610_scriptdev2.sql @@ -0,0 +1 @@ +UPDATE sd2_db_version SET version='ScriptDev2 (for MaNGOS 12026+) '; From 2a323cb3b2954c252f6cc64e61556763b7b8d477 Mon Sep 17 00:00:00 2001 From: michalpolko Date: Wed, 4 Jul 2012 18:02:07 +0300 Subject: [PATCH 0599/1172] [2611] Implement basic script for Blood Queen Lana'thel Signed-off-by: Xfurry --- .../boss_blood_queen_lanathel.cpp | 68 ++++++++++++++++++- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 + sql/scriptdev2_script_full.sql | 4 +- sql/updates/r2611_mangos.sql | 1 + sql/updates/r2611_scriptdev2.sql | 4 ++ 6 files changed, 76 insertions(+), 4 deletions(-) create mode 100644 sql/updates/r2611_mangos.sql create mode 100644 sql/updates/r2611_scriptdev2.sql diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_blood_queen_lanathel.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_blood_queen_lanathel.cpp index a6c2d52e0..9175816c8 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_blood_queen_lanathel.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_blood_queen_lanathel.cpp @@ -16,12 +16,13 @@ /* ScriptData SDName: boss_blood_queen_lanathel -SD%Complete: 0% -SDComment: +SD%Complete: 20% +SDComment: Only Basic script SDCategory: Icecrown Citadel EndScriptData */ #include "precompiled.h" +#include "icecrown_citadel.h" enum { @@ -34,8 +35,71 @@ enum SAY_AIR_PHASE = -1631127, SAY_BERSERK = -1631128, SAY_DEATH = -1631129, + SAY_SLAY_1 = -1631195, + SAY_SLAY_2 = -1631196, }; +struct MANGOS_DLL_DECL boss_blood_queen_lanathelAI : public ScriptedAI +{ + boss_blood_queen_lanathelAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (instance_icecrown_citadel*)pCreature->GetInstanceData(); + Reset(); + } + + instance_icecrown_citadel* m_pInstance; + + void Reset() + { + } + + void JustReachedHome() + { + if(m_pInstance) + m_pInstance->SetData(TYPE_QUEEN_LANATHEL, FAIL); + } + + void KilledUnit(Unit* pVictim) + { + DoScriptText(urand(0, 1) ? SAY_SLAY_1 : SAY_SLAY_2, m_creature); + } + + void Aggro(Unit* pWho) + { + DoScriptText(SAY_AGGRO, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_QUEEN_LANATHEL, IN_PROGRESS); + } + + void JustDied(Unit* pKiller) + { + DoScriptText(SAY_DEATH, m_creature); + + if(m_pInstance) + m_pInstance->SetData(TYPE_QUEEN_LANATHEL, DONE); + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_blood_queen_lanathel(Creature* pCreature) +{ + return new boss_blood_queen_lanathelAI(pCreature); +} + void AddSC_boss_blood_queen_lanathel() { + Script *pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_blood_queen_lanathel"; + pNewScript->GetAI = &GetAI_boss_blood_queen_lanathel; + pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 082b26580..19849ea2d 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2610" + #define SD2_REVISION_NR "2611" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 27b0b5755..30aea33a4 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -713,6 +713,7 @@ UPDATE instance_template SET ScriptName='instance_icecrown_citadel' WHERE map=63 UPDATE creature_template SET ScriptName='boss_lord_marrowgar' WHERE entry=36612; UPDATE creature_template SET ScriptName='boss_lady_deathwhisper' WHERE entry=36855; UPDATE creature_template SET ScriptName='boss_deathbringer_saurfang' WHERE entry=37813; +UPDATE creature_template SET ScriptName='boss_blood_queen_lanathel' WHERE entry=37955; DELETE FROM scripted_event_id WHERE id IN (23426,23438); INSERT INTO scripted_event_id VALUES (23426,'event_gameobject_citadel_valve'), diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 61f9570ba..72ece754f 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -3920,7 +3920,9 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1631192,'%s dies',17374,2,0,0,'lich_king SAY_OUTRO_14'), -- TODO Can be wrong (-1631193,'%s goes into a frenzy!',0,3,0,0,'saurfang EMOTE_FRENZY'), -(-1631194,'%s\'s Blood Beasts gain the scent of blood!',0,3,0,0,'saurfang EMOTE_SCENT'); +(-1631194,'%s\'s Blood Beasts gain the scent of blood!',0,3,0,0,'saurfang EMOTE_SCENT'), +(-1631195,'Really... Is that all you got?',16791,1,0,0,'blood_queen SAY_SLAY_1'), +(-1631196,'Such a pity...',16792,1,0,0,'blood_queen SAY_SLAY_2'); -- -1 632 000 ICC: FORGE OF SOULS INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES diff --git a/sql/updates/r2611_mangos.sql b/sql/updates/r2611_mangos.sql new file mode 100644 index 000000000..8cc4e5ba4 --- /dev/null +++ b/sql/updates/r2611_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='boss_blood_queen_lanathel' WHERE entry=37955; diff --git a/sql/updates/r2611_scriptdev2.sql b/sql/updates/r2611_scriptdev2.sql new file mode 100644 index 000000000..03f565b36 --- /dev/null +++ b/sql/updates/r2611_scriptdev2.sql @@ -0,0 +1,4 @@ +DELETE FROM script_texts WHERE entry IN (-1631195,-1631196); +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1631195,'Really... Is that all you got?',16791,1,0,0,'blood_queen SAY_SLAY_1'), +(-1631196,'Such a pity...',16792,1,0,0,'blood_queen SAY_SLAY_2'); From 762ac321ff2db3cc6419948590b114d56d364a7d Mon Sep 17 00:00:00 2001 From: Xfurry Date: Wed, 4 Jul 2012 18:55:01 +0300 Subject: [PATCH 0600/1172] [2612] Improve timers for Sethekk Halls bosses Thanks to X-Savior for providing the data --- .../auchindoun/sethekk_halls/boss_anzu.cpp | 35 +++++++------ .../sethekk_halls/boss_darkweaver_syth.cpp | 50 ++++++++++--------- .../sethekk_halls/boss_talon_king_ikiss.cpp | 34 ++++++++----- sd2_revision_nr.h | 2 +- sql/scriptdev2_script_full.sql | 6 ++- sql/updates/r2612_scriptdev2.sql | 5 ++ 6 files changed, 79 insertions(+), 53 deletions(-) create mode 100644 sql/updates/r2612_scriptdev2.sql diff --git a/scripts/outland/auchindoun/sethekk_halls/boss_anzu.cpp b/scripts/outland/auchindoun/sethekk_halls/boss_anzu.cpp index 393e8f86e..5005a6c68 100644 --- a/scripts/outland/auchindoun/sethekk_halls/boss_anzu.cpp +++ b/scripts/outland/auchindoun/sethekk_halls/boss_anzu.cpp @@ -17,7 +17,7 @@ /* ScriptData SDName: boss_anzu SD%Complete: 70 -SDComment: Timers need improvement; Intro event NYI. +SDComment: Intro event NYI. SDCategory: Auchindoun, Sethekk Halls EndScriptData */ @@ -27,7 +27,9 @@ EndScriptData */ enum { SAY_BANISH = -1556018, - SAY_WHISPER_MAGIC = -1556019, + SAY_WHISPER_MAGIC_1 = -1556019, + SAY_WHISPER_MAGIC_2 = -1556021, + SAY_WHISPER_MAGIC_3 = -1556022, EMOTE_BIRD_STONE = -1556020, SPELL_FLESH_RIP = 40199, @@ -62,17 +64,17 @@ struct MANGOS_DLL_DECL boss_anzuAI : public ScriptedAI uint32 m_uiScreechTimer; uint32 m_uiSpellBombTimer; uint32 m_uiCycloneTimer; - uint8 m_uiBanishPhase; + float m_fHealthCheck; GuidList m_lBirdsGuidList; void Reset() { - m_uiFleshRipTimer = urand(9000, 13000); - m_uiScreechTimer = 30000; - m_uiSpellBombTimer = 22000; + m_uiFleshRipTimer = urand(9000, 10000); + m_uiScreechTimer = 23000; + m_uiSpellBombTimer = 17000; m_uiCycloneTimer = 5000; - m_uiBanishPhase = 2; + m_fHealthCheck = 75.0f; } void Aggro(Unit* pWho) @@ -158,20 +160,20 @@ struct MANGOS_DLL_DECL boss_anzuAI : public ScriptedAI return; // Banish at 66% and 33%; Boss can still use spells while banished - if (m_creature->GetHealthPercent() < 33.3f * m_uiBanishPhase) + if (m_creature->GetHealthPercent() < m_fHealthCheck) { if (DoCastSpellIfCan(m_creature, SPELL_BANISH_SELF) == CAST_OK) { DoScriptText(SAY_BANISH, m_creature); DoSummonBroodsOfAnzu(); - --m_uiBanishPhase; + m_fHealthCheck -= 40.0f; } } if (m_uiFleshRipTimer < uiDiff) { if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_FLESH_RIP) == CAST_OK) - m_uiFleshRipTimer = urand(17000, 21000); + m_uiFleshRipTimer = urand(10000, 20000); } else m_uiFleshRipTimer -= uiDiff; @@ -179,7 +181,7 @@ struct MANGOS_DLL_DECL boss_anzuAI : public ScriptedAI if (m_uiScreechTimer < uiDiff) { if (DoCastSpellIfCan(m_creature, SPELL_SCREECH) == CAST_OK) - m_uiScreechTimer = 30000; + m_uiScreechTimer = urand(31000, 35000); } else m_uiScreechTimer -= uiDiff; @@ -190,8 +192,13 @@ struct MANGOS_DLL_DECL boss_anzuAI : public ScriptedAI { if (DoCastSpellIfCan(pTarget, SPELL_SPELL_BOMB) == CAST_OK) { - DoScriptText(SAY_WHISPER_MAGIC, m_creature, pTarget); - m_uiSpellBombTimer = urand(25000, 30000); + switch (urand(0, 2)) + { + case 0: DoScriptText(SAY_WHISPER_MAGIC_1, m_creature, pTarget); break; + case 1: DoScriptText(SAY_WHISPER_MAGIC_2, m_creature, pTarget); break; + case 2: DoScriptText(SAY_WHISPER_MAGIC_3, m_creature, pTarget); break; + } + m_uiSpellBombTimer = urand(24000, 40000); } } } @@ -200,7 +207,7 @@ struct MANGOS_DLL_DECL boss_anzuAI : public ScriptedAI if (m_uiCycloneTimer < uiDiff) { - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1)) { if (DoCastSpellIfCan(pTarget, SPELL_CYCLONE) == CAST_OK) m_uiCycloneTimer = 21000; diff --git a/scripts/outland/auchindoun/sethekk_halls/boss_darkweaver_syth.cpp b/scripts/outland/auchindoun/sethekk_halls/boss_darkweaver_syth.cpp index 8f6a72d0b..e5deaa96d 100644 --- a/scripts/outland/auchindoun/sethekk_halls/boss_darkweaver_syth.cpp +++ b/scripts/outland/auchindoun/sethekk_halls/boss_darkweaver_syth.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: Boss_Darkweaver_Syth -SD%Complete: 85 -SDComment: Shock spells/times need more work. +SD%Complete: 100 +SDComment: SDCategory: Auchindoun, Sethekk Halls EndScriptData */ @@ -33,13 +33,17 @@ enum SAY_SLAY_2 = -1556005, SAY_DEATH = -1556006, - // TODO Heroic spells (shock, chain lightning) missing, unknown if IDs are correct - SPELL_FROST_SHOCK = 37865, - SPELL_FLAME_SHOCK = 34354, - SPELL_SHADOW_SHOCK = 30138, - SPELL_ARCANE_SHOCK = 37132, + SPELL_FROST_SHOCK = 12548, + SPELL_FROST_SHOCK_H = 21401, + SPELL_FLAME_SHOCK = 15039, + SPELL_FLAME_SHOCK_H = 15616, + SPELL_SHADOW_SHOCK = 33620, + SPELL_SHADOW_SHOCK_H = 38136, + SPELL_ARCANE_SHOCK = 33534, + SPELL_ARCANE_SHOCK_H = 38135, - SPELL_CHAIN_LIGHTNING = 39945, + SPELL_CHAIN_LIGHTNING = 15659, + SPELL_CHAIN_LIGHTNING_H = 15305, SPELL_SUMMON_SYTH_FIRE = 33537, // Spawns 19203 SPELL_SUMMON_SYTH_ARCANE = 33538, // Spawns 19205 @@ -81,11 +85,11 @@ struct MANGOS_DLL_DECL boss_darkweaver_sythAI : public ScriptedAI void Reset() { - m_uiFlameshockTimer = 2000; - m_uiArcaneshockTimer = 4000; - m_uiFrostshockTimer = 6000; - m_uiShadowshockTimer = 8000; - m_uiChainlightningTimer = 15000; + m_uiFlameshockTimer = 18000; + m_uiArcaneshockTimer = 19000; + m_uiFrostshockTimer = 18000; + m_uiShadowshockTimer = 17000; + m_uiChainlightningTimer = urand(6000, 9000); m_fHpCheck = 90.0f; } @@ -165,8 +169,8 @@ struct MANGOS_DLL_DECL boss_darkweaver_sythAI : public ScriptedAI { if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) { - if (DoCastSpellIfCan(pTarget, SPELL_FLAME_SHOCK) == CAST_OK) - m_uiFlameshockTimer = urand(10000, 15000); + if (DoCastSpellIfCan(pTarget, m_bIsRegularMode ? SPELL_FLAME_SHOCK : SPELL_FLAME_SHOCK_H) == CAST_OK) + m_uiFlameshockTimer = m_bIsRegularMode ? urand(13000, 28000) : urand(11000, 20000); } } else @@ -176,8 +180,8 @@ struct MANGOS_DLL_DECL boss_darkweaver_sythAI : public ScriptedAI { if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) { - if (DoCastSpellIfCan(pTarget, SPELL_ARCANE_SHOCK) == CAST_OK) - m_uiArcaneshockTimer = urand(10000, 15000); + if (DoCastSpellIfCan(pTarget, m_bIsRegularMode ? SPELL_ARCANE_SHOCK : SPELL_ARCANE_SHOCK_H) == CAST_OK) + m_uiArcaneshockTimer = m_bIsRegularMode ? urand(13000, 28000) : urand(11000, 20000); } } else @@ -187,8 +191,8 @@ struct MANGOS_DLL_DECL boss_darkweaver_sythAI : public ScriptedAI { if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) { - if (DoCastSpellIfCan(pTarget, SPELL_FROST_SHOCK) == CAST_OK) - m_uiFrostshockTimer = urand(10000, 15000); + if (DoCastSpellIfCan(pTarget, m_bIsRegularMode ? SPELL_FROST_SHOCK : SPELL_FROST_SHOCK_H) == CAST_OK) + m_uiFrostshockTimer = m_bIsRegularMode ? urand(13000, 28000) : urand(11000, 20000); } } else @@ -198,8 +202,8 @@ struct MANGOS_DLL_DECL boss_darkweaver_sythAI : public ScriptedAI { if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) { - if (DoCastSpellIfCan(pTarget, SPELL_SHADOW_SHOCK) == CAST_OK) - m_uiShadowshockTimer = urand(10000, 15000); + if (DoCastSpellIfCan(pTarget, m_bIsRegularMode ? SPELL_SHADOW_SHOCK : SPELL_SHADOW_SHOCK_H) == CAST_OK) + m_uiShadowshockTimer = m_bIsRegularMode ? urand(13000, 28000) : urand(11000, 20000); } } else @@ -209,8 +213,8 @@ struct MANGOS_DLL_DECL boss_darkweaver_sythAI : public ScriptedAI { if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) { - if (DoCastSpellIfCan(pTarget, SPELL_CHAIN_LIGHTNING) == CAST_OK) - m_uiChainlightningTimer = 25000; + if (DoCastSpellIfCan(pTarget, m_bIsRegularMode ? SPELL_CHAIN_LIGHTNING : SPELL_CHAIN_LIGHTNING_H) == CAST_OK) + m_uiChainlightningTimer = m_bIsRegularMode ? urand(14000, 26000) : urand(13000, 19000); } } else diff --git a/scripts/outland/auchindoun/sethekk_halls/boss_talon_king_ikiss.cpp b/scripts/outland/auchindoun/sethekk_halls/boss_talon_king_ikiss.cpp index 9f50518df..49a2068dd 100644 --- a/scripts/outland/auchindoun/sethekk_halls/boss_talon_king_ikiss.cpp +++ b/scripts/outland/auchindoun/sethekk_halls/boss_talon_king_ikiss.cpp @@ -65,8 +65,9 @@ struct MANGOS_DLL_DECL boss_talon_king_ikissAI : public ScriptedAI uint32 m_uiArcaneVolleyTimer; uint32 m_uiSheepTimer; - uint32 m_uiBlinkTimer; uint32 m_uiSlowTimer; + uint8 m_uiBlinkPhase; + float m_fHealthCheck; bool m_bManaShield; bool m_bBlink; @@ -74,10 +75,11 @@ struct MANGOS_DLL_DECL boss_talon_king_ikissAI : public ScriptedAI void Reset() { - m_uiArcaneVolleyTimer = 5000; + m_uiArcaneVolleyTimer = urand(5000, 12000); m_uiSheepTimer = 8000; - m_uiBlinkTimer = 35000; - m_uiSlowTimer = urand(15000, 30000); + m_uiSlowTimer = urand(9000, 13000); + m_uiBlinkPhase = 0; + m_fHealthCheck = 80.0f; m_bBlink = false; m_bManaShield = false; @@ -148,7 +150,7 @@ struct MANGOS_DLL_DECL boss_talon_king_ikissAI : public ScriptedAI if (m_uiArcaneVolleyTimer < uiDiff) { if (DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_ARCANE_VOLLEY : SPELL_ARCANE_VOLLEY_H) == CAST_OK) - m_uiArcaneVolleyTimer = urand(7000, 12000); + m_uiArcaneVolleyTimer = urand(8000, 12000); } else m_uiArcaneVolleyTimer -= uiDiff; @@ -163,7 +165,7 @@ struct MANGOS_DLL_DECL boss_talon_king_ikissAI : public ScriptedAI else m_uiSheepTimer -= uiDiff; - if (!m_bManaShield && m_creature->GetHealthPercent() < 20.0f) + if (!m_bManaShield && m_creature->GetHealthPercent() < 15.0f) { if (DoCastSpellIfCan(m_creature, SPELL_MANA_SHIELD) == CAST_OK) m_bManaShield = true; @@ -174,24 +176,30 @@ struct MANGOS_DLL_DECL boss_talon_king_ikissAI : public ScriptedAI if (m_uiSlowTimer < uiDiff) { if (DoCastSpellIfCan(m_creature, SPELL_SLOW_H) == CAST_OK) - m_uiSlowTimer = urand(15000, 30000); + m_uiSlowTimer = urand(15000, 24000); } else m_uiSlowTimer -= uiDiff; } - if (m_uiBlinkTimer < uiDiff) + if (m_creature->GetHealthPercent() < m_fHealthCheck) { - DoScriptText(EMOTE_ARCANE_EXP, m_creature); - if (DoCastSpellIfCan(m_creature, SPELL_BLINK, CAST_INTERRUPT_PREVIOUS) == CAST_OK) { m_bBlink = true; - m_uiBlinkTimer = urand(35000, 40000); + DoScriptText(EMOTE_ARCANE_EXP, m_creature); + + // There is no relationship between the health percentages + switch (m_uiBlinkPhase) + { + case 0: m_fHealthCheck = 50.0f; break; + case 1: m_fHealthCheck = 25.0f; break; + case 2: m_fHealthCheck = 0.0f; break; + } + + ++m_uiBlinkPhase; } } - else - m_uiBlinkTimer -= uiDiff; if (!m_bBlink) DoMeleeAttackIfReady(); diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 19849ea2d..47d275bf2 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2611" + #define SD2_REVISION_NR "2612" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 72ece754f..cf3b432bf 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -2264,8 +2264,10 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1556016,'No! How can this be?',0,1,0,0,'anzu SAY_INTRO_1'), (-1556017,'Pain will be the price for your insolence! You cannot stop me from claiming the Emerald Dream as my own!',0,1,0,0,'anzu SAY_INTRO_2'), (-1556018,'Awaken, my children and assist your master!',0,1,0,0,'anzu SAY_BANISH'), -(-1556019,'Your magics shall be your undoing... ak-a-ak...',0,4,0,0,'anzu SAY_WHISPER_MAGIC'), -(-1556020,'%s returns to stone.',0,2,0,0,'anzu EMOTE_BIRD_STONE'); +(-1556019,'Your magics shall be your undoing... ak-a-ak...',0,5,0,0,'anzu SAY_WHISPER_MAGIC_1'), +(-1556020,'%s returns to stone.',0,2,0,0,'anzu EMOTE_BIRD_STONE'), +(-1556021,'Your powers... ak-ak... turn against you...',0,5,0,0,'anzu SAY_WHISPER_MAGIC_2'), +(-1556022,'Your spells... ke-kaw... are weak magics... easy to turn against you...',0,5,0,0,'anzu SAY_WHISPER_MAGIC_3'); -- -1 557 000 MANA TOMBS INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES diff --git a/sql/updates/r2612_scriptdev2.sql b/sql/updates/r2612_scriptdev2.sql new file mode 100644 index 000000000..dacfd326c --- /dev/null +++ b/sql/updates/r2612_scriptdev2.sql @@ -0,0 +1,5 @@ +DELETE FROM script_texts WHERE entry IN (-1556019,-1556021,-1556022); +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1556019,'Your magics shall be your undoing... ak-a-ak...',0,5,0,0,'anzu SAY_WHISPER_MAGIC_1'), +(-1556021,'Your powers... ak-ak... turn against you...',0,5,0,0,'anzu SAY_WHISPER_MAGIC_2'), +(-1556022,'Your spells... ke-kaw... are weak magics... easy to turn against you...',0,5,0,0,'anzu SAY_WHISPER_MAGIC_3'); From 3ab107e85eddca17ec2543bd54ac4fe0ab82f798 Mon Sep 17 00:00:00 2001 From: michalpolko Date: Wed, 4 Jul 2012 21:29:47 +0300 Subject: [PATCH 0601/1172] [2613] Implement combat abilities for Blood Queen Lana'thel Note: most of the spells need additional core support Signed-off-by: Xfurry --- .../boss_blood_queen_lanathel.cpp | 240 +++++++++++++++++- sd2_revision_nr.h | 2 +- 2 files changed, 236 insertions(+), 6 deletions(-) diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_blood_queen_lanathel.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_blood_queen_lanathel.cpp index 9175816c8..3e478c283 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_blood_queen_lanathel.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_blood_queen_lanathel.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: boss_blood_queen_lanathel -SD%Complete: 20% -SDComment: Only Basic script +SD%Complete: 60% +SDComment: Timers; Most spells are dummy targeting spells and need core support; Quest 24756 event NYI. SDCategory: Icecrown Citadel EndScriptData */ @@ -37,6 +37,43 @@ enum SAY_DEATH = -1631129, SAY_SLAY_1 = -1631195, SAY_SLAY_2 = -1631196, + + // all phases + SPELL_BERSERK = 26662, + SPELL_SHROUD_OF_SORROW = 70986, + + // ground phase + SPELL_BLOOD_MIRROR = 70450, // triggers 70445 and other similar spells + SPELL_SWARMING_SHADOWS = 71861, // triggers 71264 and 71267 + SPELL_PACT_OF_THE_DARKFALLEN = 71336, // triggers 71340 + SPELL_VAMPIRIC_BITE = 71837, // triggers 71726 and 70946 + SPELL_TWILIGHT_BLOODBOLT = 71445, // triggers 72313, 71446 and 71818 + SPELL_DELIRIOUS_SLASH = 72261, // heroic only - triggers 71623 and 72264 + SPELL_PRESENCE_OF_DARKFALLEN = 70994, // heroic only - triggers 71958, 71959 and 71952 + SPELL_THIRST_QUENCHED = 72154, // related to quest 24756 + + // air phase + SPELL_INCITE_TERROR = 73070, + SPELL_BLOODBOLT_WHIRL = 71772, + + // others + //NPC_SWARMING_SHADOWS = 38163, // has aura 71267 (or 71277?) + + // encounter phases + PHASE_GROUND = 1, + PHASE_RUNNING = 2, + PHASE_AIR = 3, + PHASE_FLYING = 4, + + // movement points + POINT_CENTER_GROUND = 1, + POINT_CENTER_AIR = 2 +}; + +static const float aQueenPosition[2][3] = +{ + {4595.64f, 2769.19f, 400.13f}, + {4595.90f, 2769.31f, 421.83f}, }; struct MANGOS_DLL_DECL boss_blood_queen_lanathelAI : public ScriptedAI @@ -49,13 +86,34 @@ struct MANGOS_DLL_DECL boss_blood_queen_lanathelAI : public ScriptedAI instance_icecrown_citadel* m_pInstance; + uint8 m_uiPhase; + uint32 m_uiPhaseTimer; + + uint32 m_uiBloodMirrorTimer; + uint32 m_uiEnrageTimer; + uint32 m_uiVampiricBiteTimer; + uint32 m_uiBloodboltTimer; + uint32 m_uiPactDarkfallenTimer; + uint32 m_uiSwarmingShadowsTimer; + uint32 m_uiDeliriousSlashTimer; + void Reset() { + m_uiPhase = PHASE_GROUND; + m_uiPhaseTimer = 120000; // 2 min + + m_uiEnrageTimer = 330000; // 5 min and 30 secs + m_uiBloodMirrorTimer = 0; + m_uiDeliriousSlashTimer = 20000; + m_uiVampiricBiteTimer = 15000; + m_uiBloodboltTimer = urand(15000, 20000); + m_uiPactDarkfallenTimer = 15000; + m_uiSwarmingShadowsTimer = 30000; } void JustReachedHome() { - if(m_pInstance) + if (m_pInstance) m_pInstance->SetData(TYPE_QUEEN_LANATHEL, FAIL); } @@ -67,25 +125,197 @@ struct MANGOS_DLL_DECL boss_blood_queen_lanathelAI : public ScriptedAI void Aggro(Unit* pWho) { DoScriptText(SAY_AGGRO, m_creature); + DoCastSpellIfCan(m_creature, SPELL_SHROUD_OF_SORROW, CAST_TRIGGERED); if (m_pInstance) + { m_pInstance->SetData(TYPE_QUEEN_LANATHEL, IN_PROGRESS); + + if (m_pInstance->IsHeroicDifficulty()) + DoCastSpellIfCan(m_creature, SPELL_PRESENCE_OF_DARKFALLEN, CAST_TRIGGERED); + } } void JustDied(Unit* pKiller) { DoScriptText(SAY_DEATH, m_creature); - if(m_pInstance) + if (m_pInstance) m_pInstance->SetData(TYPE_QUEEN_LANATHEL, DONE); } + void MovementInform(uint32 uiMovementType, uint32 uiPointId) + { + if (uiMovementType != POINT_MOTION_TYPE) + return; + + if (uiPointId == POINT_CENTER_GROUND) + { + if (m_uiPhase == PHASE_RUNNING) + { + if (DoCastSpellIfCan(m_creature, SPELL_INCITE_TERROR) == CAST_OK) + { + m_uiPhase = PHASE_FLYING; + + m_creature->SetLevitate(true); + m_creature->SetByteFlag(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_UNK_2); + + m_creature->GetMotionMaster()->Clear(); + m_creature->GetMotionMaster()->MovePoint(POINT_CENTER_AIR, aQueenPosition[1][0], aQueenPosition[1][1], aQueenPosition[1][2], false); + } + } + else if (m_uiPhase == PHASE_FLYING) + { + m_uiPhase = PHASE_GROUND; + m_uiPhaseTimer = 120000; + SetCombatMovement(true); + + m_creature->SetLevitate(false); + m_creature->RemoveByteFlag(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_UNK_2); + + m_creature->GetMotionMaster()->Clear(); + if (m_creature->getVictim()) + m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); + } + } + else if (uiPointId == POINT_CENTER_AIR) + { + if (DoCastSpellIfCan(m_creature, SPELL_BLOODBOLT_WHIRL) == CAST_OK) + { + DoScriptText(SAY_AIR_PHASE, m_creature); + m_uiPhase = PHASE_AIR; + m_uiPhaseTimer = 7000; + } + } + } + void UpdateAI(const uint32 uiDiff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - DoMeleeAttackIfReady(); + if (m_uiEnrageTimer) + { + if (m_uiEnrageTimer <= uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_BERSERK) == CAST_OK) + { + DoScriptText(SAY_BERSERK, m_creature); + m_uiEnrageTimer = 0; + } + } + else + m_uiEnrageTimer -= uiDiff; + } + + switch (m_uiPhase) + { + case PHASE_GROUND: + { + // Air phase change timer + if (m_uiPhaseTimer < uiDiff) + { + SetCombatMovement(false); + m_creature->GetMotionMaster()->Clear(); + m_creature->GetMotionMaster()->MovePoint(POINT_CENTER_GROUND, aQueenPosition[0][0], aQueenPosition[0][1], aQueenPosition[0][2]); + + m_uiPhase = PHASE_RUNNING; + m_uiPhaseTimer = 0; + } + else + m_uiPhaseTimer -= uiDiff; + + // Only one bite per fight + if (m_uiVampiricBiteTimer) + { + if (m_uiVampiricBiteTimer <= uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_VAMPIRIC_BITE) == CAST_OK) + { + DoScriptText(urand(0, 1) ? SAY_BITE_1 : SAY_BITE_2, m_creature); + m_uiVampiricBiteTimer = 0; + } + } + else + m_uiVampiricBiteTimer -= uiDiff; + } + + if (m_uiBloodMirrorTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_BLOOD_MIRROR) == CAST_OK) + m_uiBloodMirrorTimer = 5000; + } + else + m_uiBloodMirrorTimer -= uiDiff; + + if (m_uiBloodboltTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_TWILIGHT_BLOODBOLT) == CAST_OK) + m_uiBloodboltTimer = urand(15000, 20000); + } + else + m_uiBloodboltTimer -= uiDiff; + + if (m_uiPactDarkfallenTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_PACT_OF_THE_DARKFALLEN) == CAST_OK) + { + DoScriptText(SAY_PACT, m_creature); + m_uiPactDarkfallenTimer = urand(20000, 25000); + } + } + else + m_uiPactDarkfallenTimer -= uiDiff; + + if (m_uiSwarmingShadowsTimer <= uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_SWARMING_SHADOWS) == CAST_OK) + { + DoScriptText(SAY_SHADOWS, m_creature); + m_uiSwarmingShadowsTimer = urand(30000, 35000); + } + } + else + m_uiSwarmingShadowsTimer -= uiDiff; + + // Heroic spells + if (m_pInstance && m_pInstance->IsHeroicDifficulty()) + { + if (m_uiDeliriousSlashTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_DELIRIOUS_SLASH) == CAST_OK) + m_uiDeliriousSlashTimer = 15000; + } + else + m_uiDeliriousSlashTimer -= uiDiff; + } + + DoMeleeAttackIfReady(); + + break; + } + case PHASE_RUNNING: + case PHASE_FLYING: + { + // Nothing here. Wait for arriving at the point + break; + } + case PHASE_AIR: + { + if (m_uiPhaseTimer < uiDiff) + { + m_uiPhase = PHASE_FLYING; + m_uiPhaseTimer = 0; + + m_creature->GetMotionMaster()->Clear(); + m_creature->GetMotionMaster()->MovePoint(POINT_CENTER_GROUND, aQueenPosition[0][0], aQueenPosition[0][1], aQueenPosition[0][2]); + } + else + m_uiPhaseTimer -= uiDiff; + + break; + } + } } }; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 47d275bf2..fb30632ea 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2612" + #define SD2_REVISION_NR "2613" #endif // __SD2_REVISION_NR_H__ From c61d1d52454b068b13778d46f981e15b76ea3ba8 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Thu, 5 Jul 2012 00:31:56 +0200 Subject: [PATCH 0602/1172] [2614] Fix a little bug in AQ20 related to spawning of Andorov, use more container typedefs --- .../blackwing_lair/boss_chromaggus.cpp | 4 ++-- .../magisters_terrace/boss_felblood_kaelthas.cpp | 12 ++++++------ scripts/eastern_kingdoms/zulaman/boss_janalai.cpp | 4 ++-- .../ruins_of_ahnqiraj/instance_ruins_of_ahnqiraj.cpp | 7 ++----- .../northrend/azjol-nerub/ahnkahet/boss_jedoga.cpp | 4 ++-- .../azjol-nerub/ahnkahet/instance_ahnkahet.cpp | 8 ++++---- scripts/outland/black_temple/boss_illidan.cpp | 4 ++-- .../outland/gruuls_lair/boss_high_king_maulgar.cpp | 4 ++-- .../outland/tempest_keep/the_eye/boss_kaelthas.cpp | 8 ++++---- sd2_revision_nr.h | 2 +- 10 files changed, 27 insertions(+), 30 deletions(-) diff --git a/scripts/eastern_kingdoms/blackwing_lair/boss_chromaggus.cpp b/scripts/eastern_kingdoms/blackwing_lair/boss_chromaggus.cpp index d28654262..81ff986c3 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/boss_chromaggus.cpp +++ b/scripts/eastern_kingdoms/blackwing_lair/boss_chromaggus.cpp @@ -182,9 +182,9 @@ struct MANGOS_DLL_DECL boss_chromaggusAI : public ScriptedAI case 4: m_uiSpellAfflict = SPELL_BROODAF_GREEN; break; } - std::vector vGuids; + GuidVector vGuids; m_creature->FillGuidsListFromThreatList(vGuids); - for (std::vector::const_iterator i = vGuids.begin();i != vGuids.end(); ++i) + for (GuidVector::const_iterator i = vGuids.begin(); i != vGuids.end(); ++i) { Unit* pUnit = m_creature->GetMap()->GetUnit(*i); diff --git a/scripts/eastern_kingdoms/magisters_terrace/boss_felblood_kaelthas.cpp b/scripts/eastern_kingdoms/magisters_terrace/boss_felblood_kaelthas.cpp index 26a0b53ad..397e4fb13 100644 --- a/scripts/eastern_kingdoms/magisters_terrace/boss_felblood_kaelthas.cpp +++ b/scripts/eastern_kingdoms/magisters_terrace/boss_felblood_kaelthas.cpp @@ -195,9 +195,9 @@ struct MANGOS_DLL_DECL boss_felblood_kaelthasAI : public ScriptedAI { DoCastSpellIfCan(m_creature, SPELL_TELEPORT_CENTER, CAST_TRIGGERED); - std::vector vGuids; + GuidVector vGuids; m_creature->FillGuidsListFromThreatList(vGuids); - for (std::vector::const_iterator i = vGuids.begin();i != vGuids.end(); ++i) + for (GuidVector::const_iterator i = vGuids.begin(); i != vGuids.end(); ++i) { Unit* pUnit = m_creature->GetMap()->GetUnit(*i); @@ -222,9 +222,9 @@ struct MANGOS_DLL_DECL boss_felblood_kaelthasAI : public ScriptedAI // players can't cast "fly" spells unless in map 530. Has to be done a while after they get knocked into the air... void CastGravityLapseFly() { - std::vector vGuids; + GuidVector vGuids; m_creature->FillGuidsListFromThreatList(vGuids); - for (std::vector::const_iterator i = vGuids.begin();i != vGuids.end(); ++i) + for (GuidVector::const_iterator i = vGuids.begin(); i != vGuids.end(); ++i) { Unit* pUnit = m_creature->GetMap()->GetUnit(*i); @@ -236,9 +236,9 @@ struct MANGOS_DLL_DECL boss_felblood_kaelthasAI : public ScriptedAI void RemoveGravityLapse() { - std::vector vGuids; + GuidVector vGuids; m_creature->FillGuidsListFromThreatList(vGuids); - for (std::vector::const_iterator i = vGuids.begin();i != vGuids.end(); ++i) + for (GuidVector::const_iterator i = vGuids.begin(); i != vGuids.end(); ++i) { Unit* pUnit = m_creature->GetMap()->GetUnit(*i); diff --git a/scripts/eastern_kingdoms/zulaman/boss_janalai.cpp b/scripts/eastern_kingdoms/zulaman/boss_janalai.cpp index 3d24450ca..4bf1430ff 100644 --- a/scripts/eastern_kingdoms/zulaman/boss_janalai.cpp +++ b/scripts/eastern_kingdoms/zulaman/boss_janalai.cpp @@ -314,9 +314,9 @@ struct MANGOS_DLL_DECL boss_janalaiAI : public ScriptedAI //Teleport every player into the middle if more than 20 yards away (possibly what spell 43096 should do) void TeleportPlayersOutOfRange() { - std::vector vGuids; + GuidVector vGuids; m_creature->FillGuidsListFromThreatList(vGuids); - for (std::vector::const_iterator i = vGuids.begin();i != vGuids.end(); ++i) + for (GuidVector::const_iterator i = vGuids.begin(); i != vGuids.end(); ++i) { Unit* pTemp = m_creature->GetMap()->GetUnit(*i); diff --git a/scripts/kalimdor/ruins_of_ahnqiraj/instance_ruins_of_ahnqiraj.cpp b/scripts/kalimdor/ruins_of_ahnqiraj/instance_ruins_of_ahnqiraj.cpp index c665ce4e3..ffb112303 100644 --- a/scripts/kalimdor/ruins_of_ahnqiraj/instance_ruins_of_ahnqiraj.cpp +++ b/scripts/kalimdor/ruins_of_ahnqiraj/instance_ruins_of_ahnqiraj.cpp @@ -37,7 +37,8 @@ void instance_ruins_of_ahnqiraj::Initialize() void instance_ruins_of_ahnqiraj::OnPlayerEnter(Player* pPlayer) { // Spawn andorov if necessary - DoSapwnAndorovIfCan(); + if (m_auiEncounter[TYPE_KURINNAXX] == DONE) + DoSapwnAndorovIfCan(); } void instance_ruins_of_ahnqiraj::OnCreatureCreate(Creature* pCreature) @@ -143,10 +144,6 @@ uint32 instance_ruins_of_ahnqiraj::GetData(uint32 uiType) void instance_ruins_of_ahnqiraj::DoSapwnAndorovIfCan() { - // The npc is also a vendor so always spawn after kurinnaxx - if (m_auiEncounter[TYPE_KURINNAXX] != DONE) - return; - if (GetSingleCreatureFromStorage(NPC_GENERAL_ANDOROV)) return; diff --git a/scripts/northrend/azjol-nerub/ahnkahet/boss_jedoga.cpp b/scripts/northrend/azjol-nerub/ahnkahet/boss_jedoga.cpp index fbbe66e49..1950b1c6b 100644 --- a/scripts/northrend/azjol-nerub/ahnkahet/boss_jedoga.cpp +++ b/scripts/northrend/azjol-nerub/ahnkahet/boss_jedoga.cpp @@ -127,8 +127,8 @@ struct MANGOS_DLL_DECL boss_jedogaAI : public ScriptedAI if (m_lVolunteerGuidList.empty()) return ObjectGuid(); - std::list::iterator iter = m_lVolunteerGuidList.begin(); - advance(iter, urand(0, m_lVolunteerGuidList.size()-1)); + GuidList::iterator iter = m_lVolunteerGuidList.begin(); + advance(iter, urand(0, m_lVolunteerGuidList.size() - 1)); return *iter; } diff --git a/scripts/northrend/azjol-nerub/ahnkahet/instance_ahnkahet.cpp b/scripts/northrend/azjol-nerub/ahnkahet/instance_ahnkahet.cpp index 5f9414785..a07ebaf3b 100644 --- a/scripts/northrend/azjol-nerub/ahnkahet/instance_ahnkahet.cpp +++ b/scripts/northrend/azjol-nerub/ahnkahet/instance_ahnkahet.cpp @@ -204,8 +204,8 @@ ObjectGuid instance_ahnkahet::SelectRandomGuardianEggGuid() if (m_GuardianEggList.empty()) return ObjectGuid(); - std::list::iterator iter = m_GuardianEggList.begin(); - advance(iter, urand(0, m_GuardianEggList.size()-1)); + GuidList::iterator iter = m_GuardianEggList.begin(); + advance(iter, urand(0, m_GuardianEggList.size() - 1)); return *iter; } @@ -215,8 +215,8 @@ ObjectGuid instance_ahnkahet::SelectRandomSwarmerEggGuid() if (m_SwarmerEggList.empty()) return ObjectGuid(); - std::list::iterator iter = m_SwarmerEggList.begin(); - advance(iter, urand(0, m_SwarmerEggList.size()-1)); + GuidList::iterator iter = m_SwarmerEggList.begin(); + advance(iter, urand(0, m_SwarmerEggList.size() - 1)); return *iter; } diff --git a/scripts/outland/black_temple/boss_illidan.cpp b/scripts/outland/black_temple/boss_illidan.cpp index 4c6f17da6..36e26a655 100644 --- a/scripts/outland/black_temple/boss_illidan.cpp +++ b/scripts/outland/black_temple/boss_illidan.cpp @@ -476,9 +476,9 @@ struct MANGOS_DLL_DECL npc_akama_illidanAI : public ScriptedAI void KillAllElites() { - std::vector vGuids; + GuidVector vGuids; m_creature->FillGuidsListFromThreatList(vGuids); - for (std::vector::const_iterator itr = vGuids.begin();itr != vGuids.end(); ++itr) + for (GuidVector::const_iterator itr = vGuids.begin(); itr != vGuids.end(); ++itr) { Unit* pUnit = m_creature->GetMap()->GetUnit(*itr); diff --git a/scripts/outland/gruuls_lair/boss_high_king_maulgar.cpp b/scripts/outland/gruuls_lair/boss_high_king_maulgar.cpp index 31495586b..0a3f5edfa 100644 --- a/scripts/outland/gruuls_lair/boss_high_king_maulgar.cpp +++ b/scripts/outland/gruuls_lair/boss_high_king_maulgar.cpp @@ -545,9 +545,9 @@ struct MANGOS_DLL_DECL boss_krosh_firehandAI : public Council_Base_AI //BlastWave_Timer if (m_uiBlastWave_Timer < uiDiff) { - std::vector vGuids; + GuidVector vGuids; m_creature->FillGuidsListFromThreatList(vGuids); - for (std::vector::const_iterator i = vGuids.begin(); i != vGuids.end(); ++i) + for (GuidVector::const_iterator i = vGuids.begin(); i != vGuids.end(); ++i) { Unit* pUnit = m_creature->GetMap()->GetUnit(*i); diff --git a/scripts/outland/tempest_keep/the_eye/boss_kaelthas.cpp b/scripts/outland/tempest_keep/the_eye/boss_kaelthas.cpp index 51e71519c..ccffdb569 100644 --- a/scripts/outland/tempest_keep/the_eye/boss_kaelthas.cpp +++ b/scripts/outland/tempest_keep/the_eye/boss_kaelthas.cpp @@ -932,9 +932,9 @@ struct MANGOS_DLL_DECL boss_kaelthasAI : public ScriptedAI m_creature->MonsterMoveWithSpeed(afGravityPos[0], afGravityPos[1], afGravityPos[2], 28.f); // 1) Kael'thas will portal the whole raid right into his body - std::vector vGuids; + GuidVector vGuids; m_creature->FillGuidsListFromThreatList(vGuids); - for (std::vector::const_iterator i = vGuids.begin();i != vGuids.end(); ++i) + for (GuidVector::const_iterator i = vGuids.begin(); i != vGuids.end(); ++i) { Unit* pUnit = m_creature->GetMap()->GetUnit(*i); @@ -957,9 +957,9 @@ struct MANGOS_DLL_DECL boss_kaelthasAI : public ScriptedAI DoScriptText(urand(0, 1) ? SAY_GRAVITYLAPSE1 : SAY_GRAVITYLAPSE2, m_creature); // 2) At that point he will put a Gravity Lapse debuff on everyone - std::vector vGuids; + GuidVector vGuids; m_creature->FillGuidsListFromThreatList(vGuids); - for (std::vector::const_iterator i = vGuids.begin();i != vGuids.end(); ++i) + for (GuidVector::const_iterator i = vGuids.begin(); i != vGuids.end(); ++i) { if (Unit* pUnit = m_creature->GetMap()->GetUnit(*i)) { diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index fb30632ea..b2625d531 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2613" + #define SD2_REVISION_NR "2614" #endif // __SD2_REVISION_NR_H__ From e69ecc512c559d802c92b08bf8b951ef7bf35599 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Thu, 5 Jul 2012 11:33:33 +0200 Subject: [PATCH 0603/1172] [2615] Fix typo in soundid of Loken Intro Sound. Fix Issue #14. Thanks to Mrbytes for pointing Signed-off-by: Schmoozerd --- sd2_revision_nr.h | 2 +- sql/scriptdev2_script_full.sql | 2 +- sql/updates/r2615_scriptdev2.sql | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 sql/updates/r2615_scriptdev2.sql diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index b2625d531..6abf789d1 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2614" + #define SD2_REVISION_NR "2615" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index cf3b432bf..2c72235b3 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -3094,7 +3094,7 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1602018,'What hope is there for you? None!',14162,1,0,0,'loken SAY_AGGRO0'), (-1602019,'I have witnessed the rise and fall of empires. The birth and extinction of entire species. Over countless millennia the foolishness of mortals has remained beyond a constant. Your presence here confirms this.',14160,1,0,0,'loken SAY_INTRO_1'), -(-1602020,'My master has shown me the future, and you have no place in it. Azeroth will be reborn in darkness. Yogg-Saron shall be released! The Pantheon shall fall!',14162,1,0,0,'loken SAY_INTRO_2'), +(-1602020,'My master has shown me the future, and you have no place in it. Azeroth will be reborn in darkness. Yogg-Saron shall be released! The Pantheon shall fall!',14161,1,0,0,'loken SAY_INTRO_2'), (-1602021,'Only mortal...',14166,1,0,0,'loken SAY_SLAY_1'), (-1602022,'I... am... FOREVER!',14167,1,0,0,'loken SAY_SLAY_2'), (-1602023,'What little time you had, you wasted!',14168,1,0,0,'loken SAY_SLAY_3'), diff --git a/sql/updates/r2615_scriptdev2.sql b/sql/updates/r2615_scriptdev2.sql new file mode 100644 index 000000000..8d23b1e67 --- /dev/null +++ b/sql/updates/r2615_scriptdev2.sql @@ -0,0 +1 @@ +UPDATE script_texts SET sound=14161 WHERE entry=-1602020; From 2acd38fb55b3e5e58755269e45cfdb87ecb3ae38 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Thu, 5 Jul 2012 22:32:42 +0300 Subject: [PATCH 0604/1172] [2616] Implement event script for General Rajaxx - Ruins of AQ Based on the work of Nitka Note for DB devs: the full army needs to be spawned in DB. See SD2 forum for details. --- .../ruins_of_ahnqiraj/boss_rajaxx.cpp | 380 +++++++++++++++++- .../instance_ruins_of_ahnqiraj.cpp | 159 +++++++- .../ruins_of_ahnqiraj/ruins_of_ahnqiraj.h | 71 +++- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 2 + sql/scriptdev2_script_full.sql | 15 +- sql/updates/r2616_mangos.sql | 2 + sql/updates/r2616_scriptdev2.sql | 11 + system/ScriptLoader.cpp | 2 + 9 files changed, 611 insertions(+), 33 deletions(-) create mode 100644 sql/updates/r2616_mangos.sql create mode 100644 sql/updates/r2616_scriptdev2.sql diff --git a/scripts/kalimdor/ruins_of_ahnqiraj/boss_rajaxx.cpp b/scripts/kalimdor/ruins_of_ahnqiraj/boss_rajaxx.cpp index a68ab798e..7d6caaa76 100644 --- a/scripts/kalimdor/ruins_of_ahnqiraj/boss_rajaxx.cpp +++ b/scripts/kalimdor/ruins_of_ahnqiraj/boss_rajaxx.cpp @@ -16,29 +16,375 @@ /* ScriptData SDName: Boss_Rajaxx -SD%Complete: 0 -SDComment: Place Holder +SD%Complete: 100 +SDComment: General Andorov script SDCategory: Ruins of Ahn'Qiraj EndScriptData */ #include "precompiled.h" +#include "ruins_of_ahnqiraj.h" -#define SAY_ANDOROV_INTRO -1509003 -#define SAY_ANDOROV_ATTACK -1509004 +enum +{ + // Event yells + SAY_ANDOROV_INTRO_1 = -1509004, + SAY_ANDOROV_INTRO_2 = -1509028, + SAY_ANDOROV_INTRO_3 = -1509003, + SAY_ANDOROV_INTRO_4 = -1509029, + SAY_ANDOROV_ATTACK_START = -1509030, -#define SAY_WAVE3 -1509005 -#define SAY_WAVE4 -1509006 -#define SAY_WAVE5 -1509007 -#define SAY_WAVE6 -1509008 -#define SAY_WAVE7 -1509009 -#define SAY_INTRO -1509010 + // Rajaxx kills Andorov + SAY_KILLS_ANDOROV = -1509016, -#define SAY_UNK1 -1509011 -#define SAY_UNK2 -1509012 -#define SAY_UNK3 -1509013 -#define SAY_UNK4 -1509014 + // probably related to the opening of AQ event + SAY_UNK1 = -1509011, + SAY_UNK2 = -1509012, + SAY_UNK3 = -1509013, + SAY_UNK4 = -1509014, -#define SAY_DEAGGRO -1509015 -#define SAY_KILLS_ANDOROV -1509016 + // gossip items + GOSSIP_TEXT_ID_INTRO = 7883, + GOSSIP_TEXT_ID_TRADE = 8305, -#define SAY_COMPLETE_QUEST -1509017 //Yell when realm complete quest 8743 for world event + GOSSIP_ITEM_START = -3509000, + GOSSIP_ITEM_TRADE = -3509001, + + // Andorov spells + SPELL_AURA_OF_COMMAND = 25516, + SPELL_BASH = 25515, + SPELL_STRIKE = 22591, + + // Kaldorei spell + SPELL_CLEAVE = 26350, + SPELL_MORTAL_STRIKE = 16856, + + POINT_ID_MOVE_INTRO = 2, + POINT_ID_MOVE_ATTACK = 4, +}; + +static const DialogueEntry aIntroDialogue[] = +{ + {SAY_ANDOROV_INTRO_1, NPC_GENERAL_ANDOROV, 7000}, + {SAY_ANDOROV_INTRO_2, NPC_GENERAL_ANDOROV, 0}, + {SAY_ANDOROV_INTRO_3, NPC_GENERAL_ANDOROV, 4000}, + {SAY_ANDOROV_INTRO_4, NPC_GENERAL_ANDOROV, 6000}, + {SAY_ANDOROV_ATTACK_START, NPC_GENERAL_ANDOROV, 0}, + {0, 0, 0}, +}; + +struct MANGOS_DLL_DECL npc_general_andorovAI : public ScriptedAI, private DialogueHelper +{ + npc_general_andorovAI(Creature* pCreature) : ScriptedAI(pCreature), + DialogueHelper(aIntroDialogue) + { + m_pInstance = (instance_ruins_of_ahnqiraj*)pCreature->GetInstanceData(); + InitializeDialogueHelper(m_pInstance); + m_uiMoveTimer = 5000; + m_uiPointId = 0; + Reset(); + } + + instance_ruins_of_ahnqiraj* m_pInstance; + + uint32 m_uiCommandAuraTimer; + uint32 m_uiBashTimer; + uint32 m_uiStrikeTimer; + uint32 m_uiMoveTimer; + + uint8 m_uiPointId; + + void Reset() + { + m_uiCommandAuraTimer = urand(1000, 3000); + m_uiBashTimer = urand(8000, 11000); + m_uiStrikeTimer = urand(2000, 5000); + } + + void MoveInLineOfSight(Unit* pWho) + { + // If Rajaxx is in range attack him + if (pWho->GetEntry() == NPC_RAJAXX && m_creature->IsWithinDistInMap(pWho, 50.0f)) + AttackStart(pWho); + + ScriptedAI::MoveInLineOfSight(pWho); + } + + void JustDied(Unit* pKiller) + { + if (pKiller->GetEntry() != NPC_RAJAXX) + return; + + // Yell when killed by Rajaxx + if (m_pInstance) + { + if (Creature* pRajaxx = m_pInstance->GetSingleCreatureFromStorage(NPC_RAJAXX)) + DoScriptText(SAY_KILLS_ANDOROV, pRajaxx); + } + } + + void JustDidDialogueStep(int32 iEntry) + { + // Start the event when the dialogue is finished + if (iEntry == SAY_ANDOROV_ATTACK_START) + { + if (m_pInstance) + m_pInstance->SetData(TYPE_RAJAXX, IN_PROGRESS); + } + } + + void MovementInform(uint32 uiType, uint32 uiPointId) + { + if (uiType != POINT_MOTION_TYPE) + return; + + switch (uiPointId) + { + case 0: + case 1: + case 3: + ++m_uiPointId; + m_creature->GetMotionMaster()->MovePoint(m_uiPointId, aAndorovMoveLocs[m_uiPointId].m_fX, aAndorovMoveLocs[m_uiPointId].m_fY, aAndorovMoveLocs[m_uiPointId].m_fZ); + break; + case POINT_ID_MOVE_INTRO: + m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); + m_creature->SetFacingTo(aAndorovMoveLocs[3].m_fO); + ++m_uiPointId; + break; + case POINT_ID_MOVE_ATTACK: + // Start dialogue only the first time it reaches the point + if (m_uiPointId == 4) + { + StartNextDialogueText(SAY_ANDOROV_INTRO_3); + ++m_uiPointId; + } + break; + } + } + + void EnterEvadeMode() + { + if (!m_pInstance) + return; + + m_creature->RemoveAllAuras(); + m_creature->DeleteThreatList(); + m_creature->CombatStop(true); + + if (m_creature->isAlive()) + { + // reset to combat position + if (m_uiPointId >= 4) + m_creature->GetMotionMaster()->MovePoint(POINT_ID_MOVE_ATTACK, aAndorovMoveLocs[4].m_fX, aAndorovMoveLocs[4].m_fY, aAndorovMoveLocs[4].m_fZ); + // reset to intro position + else + m_creature->GetMotionMaster()->MovePoint(POINT_ID_MOVE_INTRO, aAndorovMoveLocs[2].m_fX, aAndorovMoveLocs[2].m_fY, aAndorovMoveLocs[2].m_fZ); + } + + m_creature->SetLootRecipient(NULL); + + Reset(); + } + + // Wrapper to start initialize Kaldorei followers + void DoInitializeFollowers() + { + if (!m_pInstance) + return; + + GuidList m_lKaldoreiGuids; + m_pInstance->GetKaldoreiGuidList(m_lKaldoreiGuids); + + for (GuidList::const_iterator itr = m_lKaldoreiGuids.begin(); itr != m_lKaldoreiGuids.end(); ++itr) + { + if (Creature* pKaldorei = m_creature->GetMap()->GetCreature(*itr)) + pKaldorei->GetMotionMaster()->MoveFollow(m_creature, pKaldorei->GetDistance(m_creature), pKaldorei->GetAngle(m_creature)); + } + } + + // Wrapper to start the event + void DoMoveToEventLocation() + { + m_creature->GetMotionMaster()->MovePoint(m_uiPointId, aAndorovMoveLocs[m_uiPointId].m_fX, aAndorovMoveLocs[m_uiPointId].m_fY, aAndorovMoveLocs[m_uiPointId].m_fZ); + m_creature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); + StartNextDialogueText(SAY_ANDOROV_INTRO_1); + } + + void UpdateAI(const uint32 uiDiff) + { + DialogueUpdate(uiDiff); + + if (m_uiMoveTimer) + { + if (m_uiMoveTimer <= uiDiff) + { + m_creature->SetWalk(false); + m_creature->GetMotionMaster()->MovePoint(m_uiPointId, aAndorovMoveLocs[m_uiPointId].m_fX, aAndorovMoveLocs[m_uiPointId].m_fY, aAndorovMoveLocs[m_uiPointId].m_fZ); + + DoInitializeFollowers(); + m_uiMoveTimer = 0; + } + else + m_uiMoveTimer -= uiDiff; + } + + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_uiBashTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_BASH) == CAST_OK) + m_uiBashTimer = urand(12000, 15000); + } + else + m_uiBashTimer -= uiDiff; + + if (m_uiStrikeTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_STRIKE) == CAST_OK) + m_uiStrikeTimer = urand(4000, 6000); + } + else + m_uiStrikeTimer -= uiDiff; + + if (m_uiCommandAuraTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_AURA_OF_COMMAND) == CAST_OK) + m_uiCommandAuraTimer = urand(30000, 45000); + } + else + m_uiCommandAuraTimer -= uiDiff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_npc_general_andorov(Creature* pCreature) +{ + return new npc_general_andorovAI(pCreature); +} + +bool GossipHello_npc_general_andorov(Player* pPlayer, Creature* pCreature) +{ + if (instance_ruins_of_ahnqiraj* pInstance = (instance_ruins_of_ahnqiraj*)pCreature->GetInstanceData()) + { + if (pInstance->GetData(TYPE_RAJAXX) == IN_PROGRESS) + return true; + + if (pInstance->GetData(TYPE_RAJAXX) == NOT_STARTED || pInstance->GetData(TYPE_RAJAXX) == FAIL) + pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_START, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + + pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_VENDOR, GOSSIP_ITEM_TRADE, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXT_ID_INTRO, pCreature->GetObjectGuid()); + } + + return true; +} + +bool GossipSelect_npc_general_andorov(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + if (uiAction == GOSSIP_ACTION_INFO_DEF+1) + { + if (instance_ruins_of_ahnqiraj* pInstance = (instance_ruins_of_ahnqiraj*)pCreature->GetInstanceData()) + { + if (npc_general_andorovAI* pAndorovAI = dynamic_cast(pCreature->AI())) + pAndorovAI->DoMoveToEventLocation(); + } + + pPlayer->CLOSE_GOSSIP_MENU(); + } + + if (uiAction == GOSSIP_ACTION_TRADE) + pPlayer->SEND_VENDORLIST(pCreature->GetObjectGuid()); + + return true; +} + +struct MANGOS_DLL_DECL npc_kaldorei_eliteAI : public ScriptedAI +{ + npc_kaldorei_eliteAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; + + uint32 m_uiCleaveTimer; + uint32 m_uiStrikeTimer; + + void Reset() + { + m_uiCleaveTimer = urand(2000, 4000); + m_uiStrikeTimer = urand(8000, 11000); + } + + void EnterEvadeMode() + { + if (!m_pInstance) + return; + + m_creature->RemoveAllAuras(); + m_creature->DeleteThreatList(); + m_creature->CombatStop(true); + + // reset only to the last position + if (m_creature->isAlive()) + { + if (Creature* pAndorov = m_pInstance->GetSingleCreatureFromStorage(NPC_GENERAL_ANDOROV)) + { + if (pAndorov->isAlive()) + m_creature->GetMotionMaster()->MoveFollow(pAndorov, m_creature->GetDistance(pAndorov), m_creature->GetAngle(pAndorov)); + } + } + + m_creature->SetLootRecipient(NULL); + + Reset(); + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_uiCleaveTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_CLEAVE) == CAST_OK) + m_uiCleaveTimer = urand(5000, 7000); + } + else + m_uiCleaveTimer -= uiDiff; + + if (m_uiStrikeTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_MORTAL_STRIKE) == CAST_OK) + m_uiStrikeTimer = urand(9000, 13000); + } + else + m_uiStrikeTimer -= uiDiff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_npc_kaldorei_elite(Creature* pCreature) +{ + return new npc_kaldorei_eliteAI(pCreature); +} + +void AddSC_boss_rajaxx() +{ + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "npc_general_andorov"; + pNewScript->GetAI = &GetAI_npc_general_andorov; + pNewScript->pGossipHello = &GossipHello_npc_general_andorov; + pNewScript->pGossipSelect = &GossipSelect_npc_general_andorov; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_kaldorei_elite"; + pNewScript->GetAI = &GetAI_npc_kaldorei_elite; + pNewScript->RegisterSelf(); +} diff --git a/scripts/kalimdor/ruins_of_ahnqiraj/instance_ruins_of_ahnqiraj.cpp b/scripts/kalimdor/ruins_of_ahnqiraj/instance_ruins_of_ahnqiraj.cpp index ffb112303..abc5d0829 100644 --- a/scripts/kalimdor/ruins_of_ahnqiraj/instance_ruins_of_ahnqiraj.cpp +++ b/scripts/kalimdor/ruins_of_ahnqiraj/instance_ruins_of_ahnqiraj.cpp @@ -17,14 +17,16 @@ /* ScriptData SDName: Instance_Ruins_of_Ahnqiraj SD%Complete: 80 -SDComment: +SDComment: It's not clear if the Rajaxx event should reset if Andorov dies, or party wipes. SDCategory: Ruins of Ahn'Qiraj EndScriptData */ #include "precompiled.h" #include "ruins_of_ahnqiraj.h" -instance_ruins_of_ahnqiraj::instance_ruins_of_ahnqiraj(Map* pMap) : ScriptedInstance(pMap) +instance_ruins_of_ahnqiraj::instance_ruins_of_ahnqiraj(Map* pMap) : ScriptedInstance(pMap), + m_uiArmyDelayTimer(0), + m_uiCurrentArmyWave(0) { Initialize(); } @@ -51,9 +53,20 @@ void instance_ruins_of_ahnqiraj::OnCreatureCreate(Creature* pCreature) break; case NPC_BURU: case NPC_OSSIRIAN: + case NPC_RAJAXX: case NPC_GENERAL_ANDOROV: + case NPC_COLONEL_ZERRAN: + case NPC_MAJOR_PAKKON: + case NPC_MAJOR_YEGGETH: + case NPC_CAPTAIN_XURREM: + case NPC_CAPTAIN_DRENN: + case NPC_CAPTAIN_TUUBID: + case NPC_CAPTAIN_QEEZ: m_mNpcEntryGuidStore[pCreature->GetEntry()] = pCreature->GetObjectGuid(); break; + case NPC_KALDOREI_ELITE: + m_lKaldoreiGuidList.push_back(pCreature->GetObjectGuid()); + return; } } @@ -62,7 +75,6 @@ void instance_ruins_of_ahnqiraj::OnCreatureEnterCombat(Creature* pCreature) switch (pCreature->GetEntry()) { case NPC_KURINNAXX: SetData(TYPE_KURINNAXX, IN_PROGRESS); break; - case NPC_RAJAXX: SetData(TYPE_RAJAXX, IN_PROGRESS); break; case NPC_MOAM: SetData(TYPE_MOAM, IN_PROGRESS); break; case NPC_BURU: SetData(TYPE_BURU, IN_PROGRESS); break; case NPC_AYAMISS: SetData(TYPE_AYAMISS, IN_PROGRESS); break; @@ -75,11 +87,23 @@ void instance_ruins_of_ahnqiraj::OnCreatureEvade(Creature* pCreature) switch (pCreature->GetEntry()) { case NPC_KURINNAXX: SetData(TYPE_KURINNAXX, FAIL); break; - case NPC_RAJAXX: SetData(TYPE_RAJAXX, FAIL); break; case NPC_MOAM: SetData(TYPE_MOAM, FAIL); break; case NPC_BURU: SetData(TYPE_BURU, FAIL); break; case NPC_AYAMISS: SetData(TYPE_AYAMISS, FAIL); break; case NPC_OSSIRIAN: SetData(TYPE_OSSIRIAN, FAIL); break; + case NPC_RAJAXX: + // Rajaxx yells on evade + DoScriptText(SAY_DEAGGRO, pCreature); + // no break; + case NPC_COLONEL_ZERRAN: + case NPC_MAJOR_PAKKON: + case NPC_MAJOR_YEGGETH: + case NPC_CAPTAIN_XURREM: + case NPC_CAPTAIN_DRENN: + case NPC_CAPTAIN_TUUBID: + case NPC_CAPTAIN_QEEZ: + SetData(TYPE_RAJAXX, FAIL); + break; } } @@ -93,6 +117,31 @@ void instance_ruins_of_ahnqiraj::OnCreatureDeath(Creature* pCreature) case NPC_BURU: SetData(TYPE_BURU, DONE); break; case NPC_AYAMISS: SetData(TYPE_AYAMISS, DONE); break; case NPC_OSSIRIAN: SetData(TYPE_OSSIRIAN, DONE); break; + case NPC_COLONEL_ZERRAN: + case NPC_MAJOR_PAKKON: + case NPC_MAJOR_YEGGETH: + case NPC_CAPTAIN_XURREM: + case NPC_CAPTAIN_DRENN: + case NPC_CAPTAIN_TUUBID: + case NPC_CAPTAIN_QEEZ: + case NPC_QIRAJI_WARRIOR: + case NPC_SWARMGUARD_NEEDLER: + { + // If event isn't started by Andorov, return + if (GetData(TYPE_RAJAXX) != IN_PROGRESS) + return; + + // Check if the dead creature belongs to the current wave + if (m_sArmyWavesGuids[m_uiCurrentArmyWave - 1].find(pCreature->GetObjectGuid()) != m_sArmyWavesGuids[m_uiCurrentArmyWave - 1].end()) + { + m_sArmyWavesGuids[m_uiCurrentArmyWave - 1].erase(pCreature->GetObjectGuid()); + + // If all the soldiers from the current wave are dead, then send the next one + if (m_sArmyWavesGuids[m_uiCurrentArmyWave - 1].empty()) + DoSendNextArmyWave(); + } + break; + } } } @@ -111,6 +160,10 @@ void instance_ruins_of_ahnqiraj::SetData(uint32 uiType, uint32 uiData) m_auiEncounter[uiType] = uiData; break; case TYPE_RAJAXX: + m_auiEncounter[uiType] = uiData; + if (uiData == IN_PROGRESS) + DoSortArmyWaves(); + break; case TYPE_MOAM: case TYPE_BURU: case TYPE_AYAMISS: @@ -179,6 +232,104 @@ void instance_ruins_of_ahnqiraj::Load(const char* chrIn) OUT_LOAD_INST_DATA_COMPLETE; } +void instance_ruins_of_ahnqiraj::Update(uint32 uiDiff) +{ + if (GetData(TYPE_RAJAXX) == IN_PROGRESS) + { + if (m_uiArmyDelayTimer) + { + if (m_uiArmyDelayTimer <= uiDiff) + { + DoSendNextArmyWave(); + m_uiArmyDelayTimer = 2*MINUTE*IN_MILLISECONDS; + } + else + m_uiArmyDelayTimer -= uiDiff; + } + } +} + +void instance_ruins_of_ahnqiraj::DoSortArmyWaves() +{ + std::list lCreatureList; + + // Sort the 7 army waves + // We need to use gridsearcher for this, because coords search is too complicated here + for (uint8 i = 0; i < MAX_ARMY_WAVES; ++i) + { + // Clear all the army waves + m_sArmyWavesGuids[i].clear(); + lCreatureList.clear(); + + if (Creature* pTemp = GetSingleCreatureFromStorage(aArmySortingParameters[i].m_uiEntry)) + { + GetCreatureListWithEntryInGrid(lCreatureList, pTemp, NPC_QIRAJI_WARRIOR, aArmySortingParameters[i].m_fSearchDist); + GetCreatureListWithEntryInGrid(lCreatureList, pTemp, NPC_SWARMGUARD_NEEDLER, aArmySortingParameters[i].m_fSearchDist); + + for (std::list::const_iterator itr = lCreatureList.begin(); itr != lCreatureList.end(); ++itr) + { + if ((*itr)->isAlive()) + m_sArmyWavesGuids[i].insert((*itr)->GetObjectGuid()); + } + + if (pTemp->isAlive()) + m_sArmyWavesGuids[i].insert(pTemp->GetObjectGuid()); + } + } + + // send the first wave + m_uiCurrentArmyWave = 0; + DoSendNextArmyWave(); +} + +void instance_ruins_of_ahnqiraj::DoSendNextArmyWave() +{ + // The next army wave is sent into battle after 2 min or after the previous wave is finished + if (GetData(TYPE_RAJAXX) != IN_PROGRESS) + return; + + // The last wave is General Rajaxx itself + if (m_uiCurrentArmyWave == MAX_ARMY_WAVES) + { + if (Creature* pRajaxx = GetSingleCreatureFromStorage(NPC_RAJAXX)) + { + DoScriptText(SAY_INTRO, pRajaxx); + pRajaxx->SetInCombatWithZone(); + } + } + else + { + // Increase the wave id if some are already dead + while (m_sArmyWavesGuids[m_uiCurrentArmyWave].empty()) + ++m_uiCurrentArmyWave; + + float fX, fY, fZ; + for (GuidSet::const_iterator itr = m_sArmyWavesGuids[m_uiCurrentArmyWave].begin(); itr != m_sArmyWavesGuids[m_uiCurrentArmyWave].end(); ++itr) + { + if (Creature* pTemp = instance->GetCreature(*itr)) + { + if (!pTemp->isAlive()) + continue; + + pTemp->SetWalk(false); + pTemp->GetRandomPoint(aAndorovMoveLocs[4].m_fX, aAndorovMoveLocs[4].m_fY, aAndorovMoveLocs[4].m_fZ, 10.0f, fX, fY, fZ); + pTemp->GetMotionMaster()->MovePoint(0, fX, fY, fZ); + } + } + + // Yell on each wave (except the first 2) + if (aArmySortingParameters[m_uiCurrentArmyWave].m_uiYellEntry) + { + if (Creature* pRajaxx = GetSingleCreatureFromStorage(NPC_RAJAXX)) + DoScriptText(aArmySortingParameters[m_uiCurrentArmyWave].m_uiYellEntry, pRajaxx); + } + } + + // on wowwiki it states that there were 3 min between the waves, but this was reduced in later patches + m_uiArmyDelayTimer = 2*MINUTE*IN_MILLISECONDS; + ++m_uiCurrentArmyWave; +} + InstanceData* GetInstanceData_instance_ruins_of_ahnqiraj(Map* pMap) { return new instance_ruins_of_ahnqiraj(pMap); diff --git a/scripts/kalimdor/ruins_of_ahnqiraj/ruins_of_ahnqiraj.h b/scripts/kalimdor/ruins_of_ahnqiraj/ruins_of_ahnqiraj.h index fc7561ed7..1d84d6c42 100644 --- a/scripts/kalimdor/ruins_of_ahnqiraj/ruins_of_ahnqiraj.h +++ b/scripts/kalimdor/ruins_of_ahnqiraj/ruins_of_ahnqiraj.h @@ -25,18 +25,32 @@ enum NPC_GENERAL_ANDOROV = 15471, // The general and the kaldorei are escorted for the rajaxx encounter NPC_KALDOREI_ELITE = 15473, NPC_RAJAXX = 15341, // All of the following are used in the rajaxx encounter - // NPC_COLONEL_ZERRAN = 15385, - // NPC_MAJOR_PAKKON = 15388, - // NPC_MAJOR_YEGGETH = 15386, - // NPC_CAPTAIN_XURREM = 15390, - // NPC_CAPTAIN_DRENN = 15389, - // NPC_CAPTAIN_TUUBID = 15392, - // NPC_CAPTAIN_QEEZ = 15391, + NPC_COLONEL_ZERRAN = 15385, + NPC_MAJOR_PAKKON = 15388, + NPC_MAJOR_YEGGETH = 15386, + NPC_CAPTAIN_XURREM = 15390, + NPC_CAPTAIN_DRENN = 15389, + NPC_CAPTAIN_TUUBID = 15392, + NPC_CAPTAIN_QEEZ = 15391, + NPC_QIRAJI_WARRIOR = 15387, + NPC_SWARMGUARD_NEEDLER = 15344, + + MAX_ARMY_WAVES = 7, GO_OSSIRIAN_CRYSTAL = 180619, // Used in the ossirian encounter NPC_OSSIRIAN_TRIGGER = 15590, // Triggers ossirian weakness - SAY_OSSIRIAN_INTRO = -1509022 // Yelled after Kurinnax dies + SAY_OSSIRIAN_INTRO = -1509022, // Yelled after Kurinnax dies + + // Rajaxx yells + SAY_WAVE3 = -1509005, + SAY_WAVE4 = -1509006, + SAY_WAVE5 = -1509007, + SAY_WAVE6 = -1509008, + SAY_WAVE7 = -1509009, + SAY_INTRO = -1509010, + SAY_DEAGGRO = -1509015, // on Rajaxx evade + SAY_COMPLETE_QUEST = -1509017, // Yell when realm complete quest 8743 for world event }; struct SpawnLocation @@ -45,6 +59,7 @@ struct SpawnLocation float m_fX, m_fY, m_fZ, m_fO; }; +// Spawn coords for Andorov and his team static const SpawnLocation aAndorovSpawnLocs[MAX_HELPERS] = { {NPC_GENERAL_ANDOROV, -8660.4f, 1510.29f, 32.449f, 2.2184f}, @@ -54,6 +69,34 @@ static const SpawnLocation aAndorovSpawnLocs[MAX_HELPERS] = {NPC_KALDOREI_ELITE, -8664.45f, 1506.44f, 32.0944f, 2.33302f} }; +// Movement locations for Andorov +static const SpawnLocation aAndorovMoveLocs[] = +{ + {0, -8701.51f, 1561.80f, 32.092f}, + {0, -8718.66f, 1577.69f, 21.612f}, + {0, -8876.97f, 1651.96f, 21.57f, 5.52f}, + {0, -8882.15f, 1602.77f, 21.386f}, + {0, -8940.45f, 1550.69f, 21.616f}, +}; + +struct SortingParameters +{ + uint32 m_uiEntry; + int32 m_uiYellEntry; + float m_fSearchDist; +}; + +static const SortingParameters aArmySortingParameters[MAX_ARMY_WAVES] = +{ + {NPC_CAPTAIN_QEEZ, 0, 20.0f}, + {NPC_CAPTAIN_TUUBID, 0, 22.0f}, + {NPC_CAPTAIN_DRENN, SAY_WAVE3, 22.0f}, + {NPC_CAPTAIN_XURREM, SAY_WAVE4, 22.0f}, + {NPC_MAJOR_YEGGETH, SAY_WAVE5, 20.0f}, + {NPC_MAJOR_PAKKON, SAY_WAVE6, 21.0f}, + {NPC_COLONEL_ZERRAN, SAY_WAVE7, 17.0f}, +}; + class MANGOS_DLL_DECL instance_ruins_of_ahnqiraj : public ScriptedInstance { public: @@ -74,13 +117,25 @@ class MANGOS_DLL_DECL instance_ruins_of_ahnqiraj : public ScriptedInstance void SetData(uint32 uiType, uint32 uiData); uint32 GetData(uint32 uiType); + void GetKaldoreiGuidList(GuidList &lList) { lList = m_lKaldoreiGuidList; } + + void Update(uint32 uiDiff); + const char* Save() { return m_strInstData.c_str(); } void Load(const char* chrIn); private: void DoSapwnAndorovIfCan(); + void DoSortArmyWaves(); + void DoSendNextArmyWave(); uint32 m_auiEncounter[MAX_ENCOUNTER]; std::string m_strInstData; + + GuidList m_lKaldoreiGuidList; + GuidSet m_sArmyWavesGuids[MAX_ARMY_WAVES]; + + uint32 m_uiArmyDelayTimer; + uint8 m_uiCurrentArmyWave; }; #endif diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 6abf789d1..5c4794d57 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2615" + #define SD2_REVISION_NR "2616" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 30aea33a4..497457977 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -949,6 +949,8 @@ UPDATE gameobject_template SET ScriptName='go_ossirian_crystal' WHERE entry=1806 UPDATE creature_template SET ScriptName='npc_hive_zara_larva' WHERE entry=15555; UPDATE creature_template SET ScriptName='boss_buru' WHERE entry=15370; UPDATE creature_template SET ScriptName='npc_buru_egg' WHERE entry=15514; +UPDATE creature_template SET ScriptName='npc_general_andorov' WHERE entry=15471; +UPDATE creature_template SET ScriptName='npc_kaldorei_elite' WHERE entry=15473; /* SCARLET MONASTERY */ UPDATE instance_template SET ScriptName='instance_scarlet_monastery' WHERE map=189; diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 2c72235b3..293dd5b68 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -1398,8 +1398,8 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1509002,'%s sets eyes on $N!',0,2,0,0,'buru EMOTE_TARGET'), -(-1509003,'They come now. Try not to get yourself killed, young blood.',0,1,0,0,'andorov SAY_ANDOROV_INTRO'), -(-1509004,'Remember, Rajaxx, when I said I\'d kill you last? I lied...',0,1,0,0,'andorov SAY_ANDOROV_ATTACK'), +(-1509003,'They come now. Try not to get yourself killed, young blood.',0,1,0,22,'andorov SAY_ANDOROV_INTRO_3'), +(-1509004,'Remember, Rajaxx, when I said I\'d kill you last?',0,1,0,0,'andorov SAY_ANDOROV_INTRO_1'), (-1509005,'The time of our retribution is at hand! Let darkness reign in the hearts of our enemies!',8612,1,0,0,'rajaxx SAY_WAVE3'), (-1509006,'No longer will we wait behind barred doors and walls of stone! No longer will our vengeance be denied! The dragons themselves will tremble before our wrath!',8610,1,0,0,'rajaxx SAY_WAVE4'), @@ -1424,7 +1424,11 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1509024,'Tresspassers will be terminated.',8601,1,0,0,'ossirian SAY_RAND_INTRO4'), (-1509025,'Sands of the desert rise and block out the sun!',8598,1,0,0,'ossirian SAY_AGGRO'), (-1509026,'You are terminated.',8602,1,0,0,'ossirian SAY_SLAY'), -(-1509027,'I...have...failed.',8594,1,0,0,'ossirian SAY_DEATH'); +(-1509027,'I...have...failed.',8594,1,0,0,'ossirian SAY_DEATH'), + +(-1509028,'I lied...',0,1,0,0,'andorov SAY_ANDOROV_INTRO_2'), +(-1509029,'Come get some!',0,0,0,0,'andorov SAY_ANDOROV_INTRO_4'), +(-1509030,'Kill first, ask questions later... Incoming!',0,1,0,0,'andorov SAY_ANDOROV_ATTACK_START'); -- -1 531 000 TEMPLE OF AHN'QIRAJ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES @@ -4252,6 +4256,11 @@ INSERT INTO gossip_texts (entry,content_default,comment) VALUES (-3469003,'I cannot, Vaelastrasz! Surely something can be done to heal you!','vaelastrasz GOSSIP_ITEM_VAEL_1'), (-3469004,'Vaelastrasz, no!!!','vaelastrasz GOSSIP_ITEM_VAEL_2'); +-- -3 509 000 RUINS OF AHN'QIRAJ +INSERT INTO gossip_texts (entry,content_default,comment) VALUES +(-3509000,'Let\'s find out.','andorov GOSSIP_ITEM_START'), +(-3509001,'Let\'s see what you have.','andorov GOSSIP_ITEM_TRADE'); + -- -3 560 000 ESCAPE FROM DURNHOLDE (OLD HILLSBRAD) INSERT INTO gossip_texts (entry,content_default,comment) VALUES (-3560000,'REUSE ME','REUSE ME'), diff --git a/sql/updates/r2616_mangos.sql b/sql/updates/r2616_mangos.sql new file mode 100644 index 000000000..0d63cfd75 --- /dev/null +++ b/sql/updates/r2616_mangos.sql @@ -0,0 +1,2 @@ +UPDATE creature_template SET ScriptName='npc_general_andorov' WHERE entry=15471; +UPDATE creature_template SET ScriptName='npc_kaldorei_elite' WHERE entry=15473; diff --git a/sql/updates/r2616_scriptdev2.sql b/sql/updates/r2616_scriptdev2.sql new file mode 100644 index 000000000..35c407378 --- /dev/null +++ b/sql/updates/r2616_scriptdev2.sql @@ -0,0 +1,11 @@ +DELETE FROM script_texts WHERE entry IN (-1509003,-1509004,-1509028,-1509029,-1509030); +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1509003,'They come now. Try not to get yourself killed, young blood.',0,1,0,22,'andorov SAY_ANDOROV_INTRO_3'), +(-1509004,'Remember, Rajaxx, when I said I\'d kill you last?',0,1,0,0,'andorov SAY_ANDOROV_INTRO_1'), +(-1509028,'I lied...',0,1,0,0,'andorov SAY_ANDOROV_INTRO_2'), +(-1509029,'Come get some!',0,0,0,0,'andorov SAY_ANDOROV_INTRO_4'), +(-1509030,'Kill first, ask questions later... Incoming!',0,1,0,0,'andorov SAY_ANDOROV_ATTACK_START'); +DELETE FROM gossip_texts WHERE entry IN (-3509000,-3509001); +INSERT INTO gossip_texts (entry,content_default,comment) VALUES +(-3509000,'Let\'s find out.','andorov GOSSIP_ITEM_START'), +(-3509001,'Let\'s see what you have.','andorov GOSSIP_ITEM_TRADE'); diff --git a/system/ScriptLoader.cpp b/system/ScriptLoader.cpp index e9ac10d54..00ad87754 100644 --- a/system/ScriptLoader.cpp +++ b/system/ScriptLoader.cpp @@ -231,6 +231,7 @@ extern void AddSC_boss_buru(); extern void AddSC_boss_kurinnaxx(); extern void AddSC_boss_ossirian(); extern void AddSC_boss_moam(); +extern void AddSC_boss_rajaxx(); extern void AddSC_ruins_of_ahnqiraj(); extern void AddSC_instance_ruins_of_ahnqiraj(); extern void AddSC_boss_cthun(); // temple_of_ahnqiraj @@ -729,6 +730,7 @@ void AddScripts() AddSC_boss_kurinnaxx(); AddSC_boss_ossirian(); AddSC_boss_moam(); + AddSC_boss_rajaxx(); AddSC_ruins_of_ahnqiraj(); AddSC_instance_ruins_of_ahnqiraj(); AddSC_boss_cthun(); // temple_of_ahnqiraj From 92df073a8dddb5589cdd2e9ee9e27ea14113a4f2 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Thu, 5 Jul 2012 23:32:12 +0300 Subject: [PATCH 0605/1172] [2617] Cleanup and improvement for Gruul's Lair --- scripts/outland/gruuls_lair/boss_gruul.cpp | 114 +++--- .../gruuls_lair/boss_high_king_maulgar.cpp | 331 +++++++----------- scripts/outland/gruuls_lair/gruuls_lair.h | 17 +- .../gruuls_lair/instance_gruuls_lair.cpp | 42 +-- sd2_revision_nr.h | 2 +- 5 files changed, 222 insertions(+), 284 deletions(-) diff --git a/scripts/outland/gruuls_lair/boss_gruul.cpp b/scripts/outland/gruuls_lair/boss_gruul.cpp index 63e00f4c3..8d99e9783 100644 --- a/scripts/outland/gruuls_lair/boss_gruul.cpp +++ b/scripts/outland/gruuls_lair/boss_gruul.cpp @@ -62,40 +62,38 @@ struct MANGOS_DLL_DECL boss_gruulAI : public ScriptedAI ScriptedInstance* m_pInstance; - uint32 m_uiGrowth_Timer; - uint32 m_uiCaveIn_Timer; - uint32 m_uiCaveIn_StaticTimer; + uint32 m_uiGrowthTimer; + uint32 m_uiCaveInTimer; + uint32 m_uiCaveInStaticTimer; uint32 m_uiGroundSlamTimer; - uint32 m_uiHurtfulStrike_Timer; - uint32 m_uiReverberation_Timer; + uint32 m_uiHurtfulStrikeTimer; + uint32 m_uiReverberationTimer; bool m_bPerformingGroundSlam; void Reset() { - m_uiGrowth_Timer = 30000; - m_uiCaveIn_Timer = 27000; - m_uiCaveIn_StaticTimer = 30000; + m_uiGrowthTimer = 30000; + m_uiCaveInTimer = 27000; + m_uiCaveInStaticTimer = 30000; m_uiGroundSlamTimer = 35000; - m_uiHurtfulStrike_Timer = 8000; - m_uiReverberation_Timer = 60000+45000; + m_uiHurtfulStrikeTimer = 8000; + m_uiReverberationTimer = 60000 + 45000; m_bPerformingGroundSlam = false; } - void Aggro(Unit *pWho) + void Aggro(Unit* pWho) { DoScriptText(SAY_AGGRO, m_creature); - if (!m_pInstance) - return; - - m_pInstance->SetData(TYPE_GRUUL_EVENT, IN_PROGRESS); + if (m_pInstance) + m_pInstance->SetData(TYPE_GRUUL_EVENT, IN_PROGRESS); } void JustReachedHome() { if (m_pInstance) - m_pInstance->SetData(TYPE_GRUUL_EVENT, NOT_STARTED); + m_pInstance->SetData(TYPE_GRUUL_EVENT, FAIL); } void KilledUnit(Unit* pVictim) @@ -112,10 +110,8 @@ struct MANGOS_DLL_DECL boss_gruulAI : public ScriptedAI { DoScriptText(SAY_DEATH, m_creature); - if (!m_pInstance) - return; - - m_pInstance->SetData(TYPE_GRUUL_EVENT, DONE); + if (m_pInstance) + m_pInstance->SetData(TYPE_GRUUL_EVENT, DONE); } void SpellHitTarget(Unit* pTarget, const SpellEntry* pSpell) @@ -160,33 +156,35 @@ struct MANGOS_DLL_DECL boss_gruulAI : public ScriptedAI void UpdateAI(const uint32 uiDiff) { - //Return since we have no target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - // Growth // Gruul can cast this spell up to 30 times - if (m_uiGrowth_Timer < uiDiff) + if (m_uiGrowthTimer < uiDiff) { - DoScriptText(EMOTE_GROW, m_creature); - DoCastSpellIfCan(m_creature,SPELL_GROWTH); - m_uiGrowth_Timer = 30000; + if (DoCastSpellIfCan(m_creature, SPELL_GROWTH) == CAST_OK) + { + DoScriptText(EMOTE_GROW, m_creature); + m_uiGrowthTimer = 30000; + } } else - m_uiGrowth_Timer -= uiDiff; + m_uiGrowthTimer -= uiDiff; if (m_bPerformingGroundSlam) { if (m_uiGroundSlamTimer < uiDiff) { - m_uiGroundSlamTimer = 120000; - m_uiHurtfulStrike_Timer = 8000; - - //Give a little time to the players to undo the damage from shatter - if (m_uiReverberation_Timer < 10000) - m_uiReverberation_Timer += 10000; + if (DoCastSpellIfCan(m_creature, SPELL_SHATTER) == CAST_OK) + { + DoScriptText(urand(0, 1) ? SAY_SHATTER1 : SAY_SHATTER2, m_creature); + m_uiGroundSlamTimer = 120000; + m_uiHurtfulStrikeTimer = 8000; - DoCastSpellIfCan(m_creature, SPELL_SHATTER); + //Give a little time to the players to undo the damage from shatter + if (m_uiReverberationTimer < 10000) + m_uiReverberationTimer += 10000; + } } else m_uiGroundSlamTimer -= uiDiff; @@ -194,52 +192,56 @@ struct MANGOS_DLL_DECL boss_gruulAI : public ScriptedAI else { // Hurtful Strike - if (m_uiHurtfulStrike_Timer < uiDiff) + if (m_uiHurtfulStrikeTimer < uiDiff) { if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_TOPAGGRO, 1, SPELL_HURTFUL_STRIKE, SELECT_FLAG_PLAYER)) DoCastSpellIfCan(pTarget, SPELL_HURTFUL_STRIKE); else DoCastSpellIfCan(m_creature->getVictim(), SPELL_HURTFUL_STRIKE); - m_uiHurtfulStrike_Timer = 8000; + m_uiHurtfulStrikeTimer = 8000; } else - m_uiHurtfulStrike_Timer -= uiDiff; + m_uiHurtfulStrikeTimer -= uiDiff; // Reverberation - if (m_uiReverberation_Timer < uiDiff) + if (m_uiReverberationTimer < uiDiff) { - DoCastSpellIfCan(m_creature, SPELL_REVERBERATION, CAST_TRIGGERED); - m_uiReverberation_Timer = urand(15000, 25000); + if (DoCastSpellIfCan(m_creature, SPELL_REVERBERATION) == CAST_OK) + m_uiReverberationTimer = urand(15000, 25000); } else - m_uiReverberation_Timer -= uiDiff; + m_uiReverberationTimer -= uiDiff; // Cave In - if (m_uiCaveIn_Timer < uiDiff) + if (m_uiCaveInTimer < uiDiff) { - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) - DoCastSpellIfCan(pTarget,SPELL_CAVE_IN); - - if (m_uiCaveIn_StaticTimer >= 4000) - m_uiCaveIn_StaticTimer -= 2000; - - m_uiCaveIn_Timer = m_uiCaveIn_StaticTimer; + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, SPELL_CAVE_IN) == CAST_OK) + { + if (m_uiCaveInStaticTimer >= 4000) + m_uiCaveInStaticTimer -= 2000; + m_uiCaveInTimer = m_uiCaveInStaticTimer; + } + } } else - m_uiCaveIn_Timer -= uiDiff; + m_uiCaveInTimer -= uiDiff; // Ground Slam, Gronn Lord's Grasp, Stoned, Shatter if (m_uiGroundSlamTimer < uiDiff) { - m_creature->GetMotionMaster()->Clear(); - m_creature->GetMotionMaster()->MoveIdle(); - - m_bPerformingGroundSlam = true; - m_uiGroundSlamTimer = 10000; + if (DoCastSpellIfCan(m_creature, SPELL_GROUND_SLAM) == CAST_OK) + { + DoScriptText(urand(0, 1) ? SAY_SLAM1 : SAY_SLAM2, m_creature); + m_creature->GetMotionMaster()->Clear(); + m_creature->GetMotionMaster()->MoveIdle(); - DoCastSpellIfCan(m_creature, SPELL_GROUND_SLAM); + m_bPerformingGroundSlam = true; + m_uiGroundSlamTimer = 10000; + } } else m_uiGroundSlamTimer -= uiDiff; diff --git a/scripts/outland/gruuls_lair/boss_high_king_maulgar.cpp b/scripts/outland/gruuls_lair/boss_high_king_maulgar.cpp index 0a3f5edfa..73e293db6 100644 --- a/scripts/outland/gruuls_lair/boss_high_king_maulgar.cpp +++ b/scripts/outland/gruuls_lair/boss_high_king_maulgar.cpp @@ -65,15 +65,8 @@ enum SPELL_GREATER_FIREBALL = 33051, SPELL_SPELLSHIELD = 33054, SPELL_BLAST_WAVE = 33061, - - MAX_COUNCIL = 4 }; -const float DISTANCE_KIGGLER = 20.0f; -const float DISTANCE_KROSH = 30.0f; - -static const uint32 aCouncilMember[] = {NPC_BLINDEYE, NPC_KIGGLER, NPC_KROSH, NPC_OLM}; - //High King Maulgar AI struct MANGOS_DLL_DECL boss_high_king_maulgarAI : public ScriptedAI { @@ -85,43 +78,30 @@ struct MANGOS_DLL_DECL boss_high_king_maulgarAI : public ScriptedAI ScriptedInstance* m_pInstance; - uint32 m_uiArcingSmash_Timer; - uint32 m_uiMightyBlow_Timer; - uint32 m_uiWhirlwind_Timer; - uint32 m_uiCharge_Timer; - uint32 m_uiFear_Timer; + uint32 m_uiArcingSmashTimer; + uint32 m_uiMightyBlowTimer; + uint32 m_uiWhirlwindTimer; + uint32 m_uiChargeTimer; + uint32 m_uiFearTimer; uint32 m_uiCouncilDeathCount; bool m_bPhase2; void Reset() { - m_uiArcingSmash_Timer = urand(8000, 14000); - m_uiMightyBlow_Timer = urand(15000, 25000); - m_uiWhirlwind_Timer = 30000; - m_uiCharge_Timer = 2000; - m_uiFear_Timer = urand(10000, 25000); + m_uiArcingSmashTimer = urand(8000, 14000); + m_uiMightyBlowTimer = urand(15000, 25000); + m_uiWhirlwindTimer = 30000; + m_uiChargeTimer = 2000; + m_uiFearTimer = urand(10000, 25000); m_uiCouncilDeathCount = 0; m_bPhase2 = false; } void JustReachedHome() { - if (!m_pInstance) - return; - - for (uint8 i = 0; i < MAX_COUNCIL; ++i) - { - if (Creature* pCreature = m_pInstance->GetSingleCreatureFromStorage(aCouncilMember[i])) - { - if (!pCreature->isAlive()) - pCreature->Respawn(); - else if (pCreature->getVictim()) - pCreature->AI()->EnterEvadeMode(); - } - } - - m_pInstance->SetData(TYPE_MAULGAR_EVENT, FAIL); + if (m_pInstance) + m_pInstance->SetData(TYPE_MAULGAR_EVENT, FAIL); } void KilledUnit(Unit* pVictim) @@ -138,32 +118,17 @@ struct MANGOS_DLL_DECL boss_high_king_maulgarAI : public ScriptedAI { DoScriptText(SAY_DEATH, m_creature); - if (!m_pInstance) - return; - - //we risk being DONE before adds are in fact dead - m_pInstance->SetData(TYPE_MAULGAR_EVENT, DONE); + // Set data to Special on Death + if (m_pInstance) + m_pInstance->SetData(TYPE_MAULGAR_EVENT, SPECIAL); } - void Aggro(Unit *pWho) + void Aggro(Unit* pWho) { - if (!m_pInstance) - return; - DoScriptText(SAY_AGGRO, m_creature); - m_pInstance->SetData(TYPE_MAULGAR_EVENT, IN_PROGRESS); - - for (uint8 i = 0; i < MAX_COUNCIL; ++i) - { - if (Creature* pCreature = m_pInstance->GetSingleCreatureFromStorage(aCouncilMember[i])) - { - if (!pCreature->isAlive()) - pCreature->Respawn(); - if (!pCreature->getVictim()) - pCreature->AI()->AttackStart(pWho); - } - } + if (m_pInstance) + m_pInstance->SetData(TYPE_MAULGAR_EVENT, IN_PROGRESS); } void EventCouncilDeath() @@ -179,66 +144,62 @@ struct MANGOS_DLL_DECL boss_high_king_maulgarAI : public ScriptedAI void UpdateAI(const uint32 uiDiff) { - //Return since we have no target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - //m_uiArcingSmash_Timer - if (m_uiArcingSmash_Timer < uiDiff) + if (m_uiArcingSmashTimer < uiDiff) { - DoCastSpellIfCan(m_creature, SPELL_ARCING_SMASH); - m_uiArcingSmash_Timer = urand(8000, 12000); + if (DoCastSpellIfCan(m_creature, SPELL_ARCING_SMASH) == CAST_OK) + m_uiArcingSmashTimer = urand(8000, 12000); } else - m_uiArcingSmash_Timer -= uiDiff; + m_uiArcingSmashTimer -= uiDiff; - //m_uiWhirlwind_Timer - if (m_uiWhirlwind_Timer < uiDiff) + if (m_uiWhirlwindTimer < uiDiff) { - DoCastSpellIfCan(m_creature, SPELL_WHIRLWIND); - m_uiWhirlwind_Timer = urand(30000, 40000); + if (DoCastSpellIfCan(m_creature, SPELL_WHIRLWIND) == CAST_OK) + m_uiWhirlwindTimer = urand(30000, 40000); } else - m_uiWhirlwind_Timer -= uiDiff; + m_uiWhirlwindTimer -= uiDiff; - //m_uiMightyBlow_Timer - if (m_uiMightyBlow_Timer < uiDiff) + if (m_uiMightyBlowTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_MIGHTY_BLOW); - m_uiMightyBlow_Timer = urand(20000, 35000); + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_MIGHTY_BLOW) == CAST_OK) + m_uiMightyBlowTimer = urand(20000, 35000); } else - m_uiMightyBlow_Timer -= uiDiff; + m_uiMightyBlowTimer -= uiDiff; - //Entering Phase 2 if (!m_bPhase2 && m_creature->GetHealthPercent() < 50.0f) { - m_bPhase2 = true; - DoScriptText(SAY_ENRAGE, m_creature); - DoCastSpellIfCan(m_creature, SPELL_FLURRY); + if (DoCastSpellIfCan(m_creature, SPELL_FLURRY) == CAST_OK) + { + DoScriptText(SAY_ENRAGE, m_creature); + m_bPhase2 = true; + } } if (m_bPhase2) { - //m_uiCharge_Timer - if (m_uiCharge_Timer < uiDiff) + if (m_uiChargeTimer < uiDiff) { if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1)) - DoCastSpellIfCan(pTarget, SPELL_CHARGE); - - m_uiCharge_Timer = urand(14000, 20000); + { + if (DoCastSpellIfCan(pTarget, SPELL_CHARGE) == CAST_OK) + m_uiChargeTimer = urand(14000, 20000); + } } else - m_uiCharge_Timer -= uiDiff; + m_uiChargeTimer -= uiDiff; - //m_uiFear_Timer - if (m_uiFear_Timer < uiDiff) + if (m_uiFearTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_FEAR); - m_uiFear_Timer = urand(20000, 35000); + if (DoCastSpellIfCan(m_creature, SPELL_FEAR) == CAST_OK) + m_uiFearTimer = urand(20000, 35000); } else - m_uiFear_Timer -= uiDiff; + m_uiFearTimer -= uiDiff; } DoMeleeAttackIfReady(); @@ -255,26 +216,6 @@ struct MANGOS_DLL_DECL Council_Base_AI : public ScriptedAI ScriptedInstance* m_pInstance; - void JustReachedHome() - { - if (!m_pInstance) - return; - - Creature* pMaulgar = m_pInstance->GetSingleCreatureFromStorage(NPC_MAULGAR); - if (pMaulgar && pMaulgar->isAlive() && pMaulgar->getVictim()) - pMaulgar->AI()->EnterEvadeMode(); - } - - void Aggro(Unit *pWho) - { - if (!m_pInstance) - return; - - Creature* pMaulgar = m_pInstance->GetSingleCreatureFromStorage(NPC_MAULGAR); - if (pMaulgar && pMaulgar->isAlive() && !pMaulgar->getVictim()) - pMaulgar->AI()->AttackStart((pWho)); - } - void JustDied(Unit* pVictim) { if (!m_pInstance) @@ -286,6 +227,9 @@ struct MANGOS_DLL_DECL Council_Base_AI : public ScriptedAI if (boss_high_king_maulgarAI* pMaulgarAI = dynamic_cast(pMaulgar->AI())) pMaulgarAI->EventCouncilDeath(); } + + // Set data to Special on Death + m_pInstance->SetData(TYPE_MAULGAR_EVENT, SPECIAL); } }; @@ -294,49 +238,45 @@ struct MANGOS_DLL_DECL boss_olm_the_summonerAI : public Council_Base_AI { boss_olm_the_summonerAI(Creature* pCreature) : Council_Base_AI(pCreature) {Reset();} - uint32 m_uiDarkDecay_Timer; - uint32 m_uiDeathCoil_Timer; - uint32 m_uiSummon_Timer; + uint32 m_uiDarkDecayTimer; + uint32 m_uiDeathCoilTimer; + uint32 m_uiSummonTimer; void Reset() { - m_uiDarkDecay_Timer = 18000; - m_uiDeathCoil_Timer = 14000; - m_uiSummon_Timer = 10000; + m_uiDarkDecayTimer = 18000; + m_uiDeathCoilTimer = 14000; + m_uiSummonTimer = 10000; } void UpdateAI(const uint32 uiDiff) { - //Return since we have no target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - //m_uiDarkDecay_Timer - if (m_uiDarkDecay_Timer < uiDiff) + if (m_uiDarkDecayTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_DARK_DECAY); - m_uiDarkDecay_Timer = 20000; + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_DARK_DECAY) == CAST_OK) + m_uiDarkDecayTimer = 20000; } else - m_uiDarkDecay_Timer -= uiDiff; + m_uiDarkDecayTimer -= uiDiff; - //m_uiDeathCoil_Timer - if (m_uiDeathCoil_Timer < uiDiff) + if (m_uiDeathCoilTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_DEATH_COIL); - m_uiDeathCoil_Timer = urand(8000, 13000); + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_DEATH_COIL) == CAST_OK) + m_uiDeathCoilTimer = urand(8000, 13000); } else - m_uiDeathCoil_Timer -= uiDiff; + m_uiDeathCoilTimer -= uiDiff; - //m_uiSummon_Timer - if (m_uiSummon_Timer < uiDiff) + if (m_uiSummonTimer < uiDiff) { - DoCastSpellIfCan(m_creature, SPELL_SUMMON_WILD_FELHUNTER); - m_uiSummon_Timer = urand(25000, 35000); + if (DoCastSpellIfCan(m_creature, SPELL_SUMMON_WILD_FELHUNTER) == CAST_OK) + m_uiSummonTimer = urand(25000, 35000); } else - m_uiSummon_Timer -= uiDiff; + m_uiSummonTimer -= uiDiff; DoMeleeAttackIfReady(); } @@ -347,17 +287,17 @@ struct MANGOS_DLL_DECL boss_kiggler_the_crazedAI : public Council_Base_AI { boss_kiggler_the_crazedAI(Creature* pCreature) : Council_Base_AI(pCreature) {Reset();} - uint32 m_uiGreatherPolymorph_Timer; - uint32 m_uiLightningBolt_Timer; - uint32 m_uiArcaneShock_Timer; - uint32 m_uiArcaneExplosion_Timer; + uint32 m_uiGreatherPolymorphTimer; + uint32 m_uiLightningBoltTimer; + uint32 m_uiArcaneShockTimer; + uint32 m_uiArcaneExplosionTimer; void Reset() { - m_uiGreatherPolymorph_Timer = 15000; - m_uiLightningBolt_Timer = 10000; - m_uiArcaneShock_Timer = 20000; - m_uiArcaneExplosion_Timer = 30000; + m_uiGreatherPolymorphTimer = 15000; + m_uiLightningBoltTimer = 10000; + m_uiArcaneShockTimer = 20000; + m_uiArcaneExplosionTimer = 30000; } void SpellHitTarget(Unit* pVictim, const SpellEntry* pSpell) @@ -384,51 +324,49 @@ struct MANGOS_DLL_DECL boss_kiggler_the_crazedAI : public Council_Base_AI m_creature->SetInCombatWith(pWho); pWho->SetInCombatWith(m_creature); - m_creature->GetMotionMaster()->MoveChase(pWho, DISTANCE_KIGGLER); + m_creature->GetMotionMaster()->MoveChase(pWho, 20.0f); } } void UpdateAI(const uint32 uiDiff) { - //Return since we have no target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - if (m_uiGreatherPolymorph_Timer < uiDiff) + if (m_uiGreatherPolymorphTimer < uiDiff) { if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) - DoCastSpellIfCan(pTarget, SPELL_GREATER_POLYMORPH); - m_uiGreatherPolymorph_Timer = urand(15000, 20000); + { + if (DoCastSpellIfCan(pTarget, SPELL_GREATER_POLYMORPH) == CAST_OK) + m_uiGreatherPolymorphTimer = urand(15000, 20000); + } } else - m_uiGreatherPolymorph_Timer -= uiDiff; + m_uiGreatherPolymorphTimer -= uiDiff; - //LightningBolt_Timer - if (m_uiLightningBolt_Timer < uiDiff) + if (m_uiLightningBoltTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_LIGHTNING_BOLT); - m_uiLightningBolt_Timer = urand(2500, 4000); + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_LIGHTNING_BOLT) == CAST_OK) + m_uiLightningBoltTimer = urand(2500, 4000); } else - m_uiLightningBolt_Timer -= uiDiff; + m_uiLightningBoltTimer -= uiDiff; - //ArcaneShock_Timer - if (m_uiArcaneShock_Timer < uiDiff) + if (m_uiArcaneShockTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_ARCANE_SHOCK); - m_uiArcaneShock_Timer = urand(15000, 20000); + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_ARCANE_SHOCK) == CAST_OK) + m_uiArcaneShockTimer = urand(15000, 20000); } else - m_uiArcaneShock_Timer -= uiDiff; + m_uiArcaneShockTimer -= uiDiff; - //ArcaneExplosion_Timer - if (m_uiArcaneExplosion_Timer < uiDiff) + if (m_uiArcaneExplosionTimer < uiDiff) { - DoCastSpellIfCan(m_creature, SPELL_ARCANE_EXPLOSION); - m_uiArcaneExplosion_Timer = 30000; + if (DoCastSpellIfCan(m_creature, SPELL_ARCANE_EXPLOSION) == CAST_OK) + m_uiArcaneExplosionTimer = 30000; } else - m_uiArcaneExplosion_Timer -= uiDiff; + m_uiArcaneExplosionTimer -= uiDiff; DoMeleeAttackIfReady(); } @@ -439,49 +377,48 @@ struct MANGOS_DLL_DECL boss_blindeye_the_seerAI : public Council_Base_AI { boss_blindeye_the_seerAI(Creature* pCreature) : Council_Base_AI(pCreature) {Reset();} - uint32 m_uiGreaterPowerWordShield_Timer; - uint32 m_uiHeal_Timer; - uint32 m_uiPrayerofHealing_Timer; + uint32 m_uiGreaterPowerWordShieldTimer; + uint32 m_uiHealTimer; + uint32 m_uiPrayerofHealingTimer; void Reset() { - m_uiGreaterPowerWordShield_Timer = 5000; - m_uiHeal_Timer = urand(25000, 40000); - m_uiPrayerofHealing_Timer = urand(45000, 55000); + m_uiGreaterPowerWordShieldTimer = 5000; + m_uiHealTimer = urand(25000, 40000); + m_uiPrayerofHealingTimer = urand(45000, 55000); } void UpdateAI(const uint32 uiDiff) { - //Return since we have no target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - //m_uiGreaterPowerWordShield_Timer - if (m_uiGreaterPowerWordShield_Timer < uiDiff) + if (m_uiGreaterPowerWordShieldTimer < uiDiff) { - DoCastSpellIfCan(m_creature, SPELL_GREATER_PW_SHIELD); - m_uiGreaterPowerWordShield_Timer = urand(30000, 40000); + if (DoCastSpellIfCan(m_creature, SPELL_GREATER_PW_SHIELD) == CAST_OK) + m_uiGreaterPowerWordShieldTimer = urand(30000, 40000); } else - m_uiGreaterPowerWordShield_Timer -= uiDiff; + m_uiGreaterPowerWordShieldTimer -= uiDiff; - //m_uiHeal_Timer - if (m_uiHeal_Timer < uiDiff) + if (m_uiHealTimer < uiDiff) { - DoCastSpellIfCan(m_creature, SPELL_HEAL); - m_uiHeal_Timer = urand(15000, 40000); + if (Unit* pTarget = DoSelectLowestHpFriendly(50.0f)) + { + if (DoCastSpellIfCan(pTarget, SPELL_HEAL) == CAST_OK) + m_uiHealTimer = urand(15000, 40000); + } } else - m_uiHeal_Timer -= uiDiff; + m_uiHealTimer -= uiDiff; - //PrayerofHealing_Timer - if (m_uiPrayerofHealing_Timer < uiDiff) + if (m_uiPrayerofHealingTimer < uiDiff) { - DoCastSpellIfCan(m_creature, SPELL_PRAYEROFHEALING); - m_uiPrayerofHealing_Timer = urand(35000, 50000); + if (DoCastSpellIfCan(m_creature, SPELL_PRAYEROFHEALING) == CAST_OK) + m_uiPrayerofHealingTimer = urand(35000, 50000); } else - m_uiPrayerofHealing_Timer -= uiDiff; + m_uiPrayerofHealingTimer -= uiDiff; DoMeleeAttackIfReady(); } @@ -492,15 +429,15 @@ struct MANGOS_DLL_DECL boss_krosh_firehandAI : public Council_Base_AI { boss_krosh_firehandAI(Creature* pCreature) : Council_Base_AI(pCreature) {Reset();} - uint32 m_uiGreaterFireball_Timer; - uint32 m_uiSpellShield_Timer; - uint32 m_uiBlastWave_Timer; + uint32 m_uiGreaterFireballTimer; + uint32 m_uiSpellShieldTimer; + uint32 m_uiBlastWaveTimer; void Reset() { - m_uiGreaterFireball_Timer = 4000; - m_uiSpellShield_Timer = 1000; - m_uiBlastWave_Timer = 12000; + m_uiGreaterFireballTimer = 4000; + m_uiSpellShieldTimer = 1000; + m_uiBlastWaveTimer = 12000; } void AttackStart(Unit* pWho) @@ -514,36 +451,32 @@ struct MANGOS_DLL_DECL boss_krosh_firehandAI : public Council_Base_AI m_creature->SetInCombatWith(pWho); pWho->SetInCombatWith(m_creature); - m_creature->GetMotionMaster()->MoveChase(pWho, DISTANCE_KROSH); + m_creature->GetMotionMaster()->MoveChase(pWho, 30.0f); } } void UpdateAI(const uint32 uiDiff) { - //Return since we have no target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - //m_uiGreaterFireball_Timer - if (m_uiGreaterFireball_Timer < uiDiff) + if (m_uiGreaterFireballTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_GREATER_FIREBALL); - m_uiGreaterFireball_Timer = 3200; + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_GREATER_FIREBALL) == CAST_OK) + m_uiGreaterFireballTimer = 3200; } else - m_uiGreaterFireball_Timer -= uiDiff; + m_uiGreaterFireballTimer -= uiDiff; - //SpellShield_Timer - if (m_uiSpellShield_Timer < uiDiff) + if (m_uiSpellShieldTimer < uiDiff) { - DoCastSpellIfCan(m_creature, SPELL_SPELLSHIELD, CAST_INTERRUPT_PREVIOUS); - m_uiSpellShield_Timer = 30000; + if (DoCastSpellIfCan(m_creature, SPELL_SPELLSHIELD) == CAST_OK) + m_uiSpellShieldTimer = 30000; } else - m_uiSpellShield_Timer -= uiDiff; + m_uiSpellShieldTimer -= uiDiff; - //BlastWave_Timer - if (m_uiBlastWave_Timer < uiDiff) + if (m_uiBlastWaveTimer < uiDiff) { GuidVector vGuids; m_creature->FillGuidsListFromThreatList(vGuids); @@ -558,10 +491,10 @@ struct MANGOS_DLL_DECL boss_krosh_firehandAI : public Council_Base_AI } } - m_uiBlastWave_Timer = 6000; + m_uiBlastWaveTimer = 6000; } else - m_uiBlastWave_Timer -= uiDiff; + m_uiBlastWaveTimer -= uiDiff; } }; diff --git a/scripts/outland/gruuls_lair/gruuls_lair.h b/scripts/outland/gruuls_lair/gruuls_lair.h index 53b7fb90c..eab6d0c01 100644 --- a/scripts/outland/gruuls_lair/gruuls_lair.h +++ b/scripts/outland/gruuls_lair/gruuls_lair.h @@ -8,20 +8,21 @@ enum { MAX_ENCOUNTER = 2, + MAX_COUNCIL = 5, // Encounter Status - TYPE_MAULGAR_EVENT = 1, - TYPE_GRUUL_EVENT = 2, + TYPE_MAULGAR_EVENT = 0, + TYPE_GRUUL_EVENT = 1, GO_PORT_GRONN_1 = 183817, // 184468 not in use GO_PORT_GRONN_2 = 184662, // NPC GUIDs - NPC_MAULGAR = 18831, - NPC_BLINDEYE = 18836, - NPC_KIGGLER = 18835, - NPC_KROSH = 18832, - NPC_OLM = 18834, + NPC_MAULGAR = 18831, + //NPC_BLINDEYE = 18836, + //NPC_KIGGLER = 18835, + //NPC_KROSH = 18832, + //NPC_OLM = 18834, }; class MANGOS_DLL_DECL instance_gruuls_lair : public ScriptedInstance @@ -44,6 +45,8 @@ class MANGOS_DLL_DECL instance_gruuls_lair : public ScriptedInstance private: uint32 m_auiEncounter[MAX_ENCOUNTER]; std::string m_strSaveData; + + uint8 m_uiCouncilMembersDied; }; #endif diff --git a/scripts/outland/gruuls_lair/instance_gruuls_lair.cpp b/scripts/outland/gruuls_lair/instance_gruuls_lair.cpp index cf0c2731f..5f766aa8e 100644 --- a/scripts/outland/gruuls_lair/instance_gruuls_lair.cpp +++ b/scripts/outland/gruuls_lair/instance_gruuls_lair.cpp @@ -29,7 +29,8 @@ EndScriptData */ 2 - Gruul event */ -instance_gruuls_lair::instance_gruuls_lair(Map *pMap) : ScriptedInstance(pMap) +instance_gruuls_lair::instance_gruuls_lair(Map *pMap) : ScriptedInstance(pMap), + m_uiCouncilMembersDied(0) { Initialize(); } @@ -50,16 +51,8 @@ bool instance_gruuls_lair::IsEncounterInProgress() const void instance_gruuls_lair::OnCreatureCreate(Creature* pCreature) { - switch (pCreature->GetEntry()) - { - case NPC_MAULGAR: - case NPC_KROSH: - case NPC_OLM: - case NPC_KIGGLER: - case NPC_BLINDEYE: - m_mNpcEntryGuidStore[pCreature->GetEntry()] = pCreature->GetObjectGuid(); - break; - } + if (pCreature->GetEntry() == NPC_MAULGAR) + m_mNpcEntryGuidStore[NPC_MAULGAR] = pCreature->GetObjectGuid(); } void instance_gruuls_lair::OnObjectCreate(GameObject* pGo) @@ -67,7 +60,7 @@ void instance_gruuls_lair::OnObjectCreate(GameObject* pGo) switch (pGo->GetEntry()) { case GO_PORT_GRONN_1: - if (m_auiEncounter[0] == DONE) + if (m_auiEncounter[TYPE_MAULGAR_EVENT] == DONE) pGo->SetGoState(GO_STATE_ACTIVE); break; case GO_PORT_GRONN_2: @@ -84,13 +77,24 @@ void instance_gruuls_lair::SetData(uint32 uiType, uint32 uiData) switch (uiType) { case TYPE_MAULGAR_EVENT: + if (uiData == SPECIAL) + { + ++m_uiCouncilMembersDied; + + if (m_uiCouncilMembersDied == MAX_COUNCIL) + SetData(TYPE_MAULGAR_EVENT, DONE); + // Don't store special data + break; + } + if (uiData == FAIL) + m_uiCouncilMembersDied = 0; if (uiData == DONE) DoUseDoorOrButton(GO_PORT_GRONN_1); - m_auiEncounter[0] = uiData; + m_auiEncounter[uiType] = uiData; break; case TYPE_GRUUL_EVENT: DoUseDoorOrButton(GO_PORT_GRONN_2); - m_auiEncounter[1] = uiData; + m_auiEncounter[uiType] = uiData; break; } @@ -110,14 +114,10 @@ void instance_gruuls_lair::SetData(uint32 uiType, uint32 uiData) uint32 instance_gruuls_lair::GetData(uint32 uiType) { - switch (uiType) - { - case TYPE_MAULGAR_EVENT: return m_auiEncounter[0]; - case TYPE_GRUUL_EVENT: return m_auiEncounter[1]; + if (uiType < MAX_ENCOUNTER) + return m_auiEncounter[uiType]; - default: - return 0; - } + return 0; } void instance_gruuls_lair::Load(const char* chrIn) diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 5c4794d57..2c27c9734 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2616" + #define SD2_REVISION_NR "2617" #endif // __SD2_REVISION_NR_H__ From b1c88721527afa082b009f120b3e062ab9cd1914 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Sat, 7 Jul 2012 15:17:22 +0200 Subject: [PATCH 0606/1172] [2618] Fix problems in SQL of last revision. Thanks to brian for pointing --- scripts/kalimdor/ruins_of_ahnqiraj/boss_rajaxx.cpp | 2 +- sd2_revision_nr.h | 2 +- sql/scriptdev2_script_full.sql | 6 +++--- sql/updates/r2616_scriptdev2.sql | 4 ++-- sql/updates/r2618_scriptdev2.sql | 4 ++++ 5 files changed, 11 insertions(+), 7 deletions(-) create mode 100644 sql/updates/r2618_scriptdev2.sql diff --git a/scripts/kalimdor/ruins_of_ahnqiraj/boss_rajaxx.cpp b/scripts/kalimdor/ruins_of_ahnqiraj/boss_rajaxx.cpp index 7d6caaa76..c8be438cf 100644 --- a/scripts/kalimdor/ruins_of_ahnqiraj/boss_rajaxx.cpp +++ b/scripts/kalimdor/ruins_of_ahnqiraj/boss_rajaxx.cpp @@ -28,7 +28,7 @@ enum { // Event yells SAY_ANDOROV_INTRO_1 = -1509004, - SAY_ANDOROV_INTRO_2 = -1509028, + SAY_ANDOROV_INTRO_2 = -1509031, SAY_ANDOROV_INTRO_3 = -1509003, SAY_ANDOROV_INTRO_4 = -1509029, SAY_ANDOROV_ATTACK_START = -1509030, diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 2c27c9734..db5bfda8e 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2617" + #define SD2_REVISION_NR "2618" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 293dd5b68..535d06f5a 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -1425,10 +1425,10 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1509025,'Sands of the desert rise and block out the sun!',8598,1,0,0,'ossirian SAY_AGGRO'), (-1509026,'You are terminated.',8602,1,0,0,'ossirian SAY_SLAY'), (-1509027,'I...have...failed.',8594,1,0,0,'ossirian SAY_DEATH'), - -(-1509028,'I lied...',0,1,0,0,'andorov SAY_ANDOROV_INTRO_2'), +-- 28 (above) = EMOTE_ENERGIZING (-1509029,'Come get some!',0,0,0,0,'andorov SAY_ANDOROV_INTRO_4'), -(-1509030,'Kill first, ask questions later... Incoming!',0,1,0,0,'andorov SAY_ANDOROV_ATTACK_START'); +(-1509030,'Kill first, ask questions later... Incoming!',0,1,0,0,'andorov SAY_ANDOROV_ATTACK_START'), +(-1509031,'I lied...',0,1,0,0,'andorov SAY_ANDOROV_INTRO_2'); -- -1 531 000 TEMPLE OF AHN'QIRAJ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES diff --git a/sql/updates/r2616_scriptdev2.sql b/sql/updates/r2616_scriptdev2.sql index 35c407378..a72318fd8 100644 --- a/sql/updates/r2616_scriptdev2.sql +++ b/sql/updates/r2616_scriptdev2.sql @@ -1,8 +1,8 @@ -DELETE FROM script_texts WHERE entry IN (-1509003,-1509004,-1509028,-1509029,-1509030); +DELETE FROM script_texts WHERE entry IN (-1509003,-1509004,-1509031,-1509029,-1509030); INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES (-1509003,'They come now. Try not to get yourself killed, young blood.',0,1,0,22,'andorov SAY_ANDOROV_INTRO_3'), (-1509004,'Remember, Rajaxx, when I said I\'d kill you last?',0,1,0,0,'andorov SAY_ANDOROV_INTRO_1'), -(-1509028,'I lied...',0,1,0,0,'andorov SAY_ANDOROV_INTRO_2'), +(-1509031,'I lied...',0,1,0,0,'andorov SAY_ANDOROV_INTRO_2'), (-1509029,'Come get some!',0,0,0,0,'andorov SAY_ANDOROV_INTRO_4'), (-1509030,'Kill first, ask questions later... Incoming!',0,1,0,0,'andorov SAY_ANDOROV_ATTACK_START'); DELETE FROM gossip_texts WHERE entry IN (-3509000,-3509001); diff --git a/sql/updates/r2618_scriptdev2.sql b/sql/updates/r2618_scriptdev2.sql new file mode 100644 index 000000000..5e9113a06 --- /dev/null +++ b/sql/updates/r2618_scriptdev2.sql @@ -0,0 +1,4 @@ +DELETE FROM script_texts WHERE entry IN (-1509028,-1509031); +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1509028,'%s drains your mana and turns to stone.',0,2,0,0,'moam EMOTE_ENERGIZING'), +(-1509031,'I lied...',0,1,0,0,'andorov SAY_ANDOROV_INTRO_2'); From c5f5a90496a3f8497d3bbf2326f018ff66983c98 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sat, 7 Jul 2012 16:53:14 +0300 Subject: [PATCH 0607/1172] [2619] Major cleanup and improvement for Kael'thas - The Eye Notes: * improve phase transition using the proper spells instead of hacks * fix some spells, such as Gravity Lapse * implement proper phase transition at 50% hp - still some elements are missing from here * implement combat doors and other animation gameobjects ToDo: Spells 35865 and 35869 require core support Some gameobjects spawns are missing Some animation spells are still missing - there are a lot of unknown things about the 50% health transition phase --- .../instance_ruins_of_ahnqiraj.cpp | 8 + .../tempest_keep/the_eye/boss_kaelthas.cpp | 1563 +++++++---------- .../tempest_keep/the_eye/instance_the_eye.cpp | 60 +- .../outland/tempest_keep/the_eye/the_eye.h | 28 +- sd2_revision_nr.h | 2 +- sql/scriptdev2_script_full.sql | 4 +- sql/updates/r2619_scriptdev2.sql | 3 + 7 files changed, 724 insertions(+), 944 deletions(-) create mode 100644 sql/updates/r2619_scriptdev2.sql diff --git a/scripts/kalimdor/ruins_of_ahnqiraj/instance_ruins_of_ahnqiraj.cpp b/scripts/kalimdor/ruins_of_ahnqiraj/instance_ruins_of_ahnqiraj.cpp index abc5d0829..5f86be466 100644 --- a/scripts/kalimdor/ruins_of_ahnqiraj/instance_ruins_of_ahnqiraj.cpp +++ b/scripts/kalimdor/ruins_of_ahnqiraj/instance_ruins_of_ahnqiraj.cpp @@ -163,6 +163,14 @@ void instance_ruins_of_ahnqiraj::SetData(uint32 uiType, uint32 uiData) m_auiEncounter[uiType] = uiData; if (uiData == IN_PROGRESS) DoSortArmyWaves(); + if (uiData == DONE) + { + if (Creature* pAndorov = GetSingleCreatureFromStorage(NPC_GENERAL_ANDOROV)) + { + if (pAndorov->isAlive()) + pAndorov->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); + } + } break; case TYPE_MOAM: case TYPE_BURU: diff --git a/scripts/outland/tempest_keep/the_eye/boss_kaelthas.cpp b/scripts/outland/tempest_keep/the_eye/boss_kaelthas.cpp index ccffdb569..d1381a168 100644 --- a/scripts/outland/tempest_keep/the_eye/boss_kaelthas.cpp +++ b/scripts/outland/tempest_keep/the_eye/boss_kaelthas.cpp @@ -16,17 +16,17 @@ /* ScriptData SDName: Boss_Kaelthas -SD%Complete: 60 -SDComment: SQL, weapon scripts, mind control, need correct spells(interruptible/uninterruptible), phoenix spawn location & animation, phoenix behaviour & spawn during gravity lapse +SD%Complete: 80 +SDComment: Timers; Transition phase is incomplete, some spells are unk. SDCategory: Tempest Keep, The Eye EndScriptData */ #include "precompiled.h" #include "the_eye.h" -#include "WorldPacket.h" enum { + // ***** Event yells ******** //kael'thas Speech SAY_INTRO = -1550016, SAY_INTRO_CAPERNIAN = -1550017, @@ -47,6 +47,7 @@ enum SAY_SUMMON_PHOENIX1 = -1550032, SAY_SUMMON_PHOENIX2 = -1550033, SAY_DEATH = -1550034, + EMOTE_PYROBLAST = -1550044, //Thaladred the Darkener speech SAY_THALADRED_AGGRO = -1550035, @@ -65,7 +66,9 @@ enum SAY_TELONICUS_AGGRO = -1550042, SAY_TELONICUS_DEATH = -1550043, + // ***** Kaelthas spells ******** //Phase 2 spells + SPELL_KAEL_PHASE_2 = 36709, // not sure if this is used in the right way SPELL_SUMMON_WEAPONS = 36976, SPELL_SUMMON_WEAPONA = 36958, SPELL_SUMMON_WEAPONB = 36959, @@ -74,1178 +77,921 @@ enum SPELL_SUMMON_WEAPONE = 36962, SPELL_SUMMON_WEAPONF = 36963, SPELL_SUMMON_WEAPONG = 36964, - SPELL_RES_VISUAL = 24171, + SPELL_RESURRECTION = 36450, //Phase 4 spells - SPELL_FIREBALL = 22088, //wrong but works with CastCustomSpell + SPELL_FIREBALL = 36805, SPELL_PYROBLAST = 36819, - SPELL_FLAME_STRIKE = 36735, // summons + SPELL_FLAME_STRIKE = 36735, // summons 21369 SPELL_FLAME_STRIKE_DUMMY = 36730, SPELL_ARCANE_DISRUPTION = 36834, SPELL_SHOCK_BARRIER = 36815, - SPELL_PHOENIX_ANIMATION = 36723, + SPELL_PHOENIX_ANIMATION = 36723, // summons 21362 SPELL_MIND_CONTROL = 32830, //Phase 5 spells + SPELL_GAIN_POWER = 36091, SPELL_EXPLODE = 36092, + //SPELL_EXPLODE_1 = 36354, // it's not very clear what all these spells should do + SPELL_EXPLODE_2 = 36373, + //SPELL_EXPLODE_3 = 36375, + //SPELL_EXPLODE_4 = 36376, + //SPELL_KAEL_STUN = 36185, // purpose unk SPELL_FULLPOWER = 36187, - SPELL_KNOCKBACK = 11027, - SPELL_GRAVITY_LAPSE = 34480, - SPELL_GRAVITY_LAPSE_AURA = 39432, - SPELL_NETHER_BEAM = 35873, + SPELL_GRAVITY_LAPSE = 35941, + SPELL_GRAVITY_LAPSE_KNOCKBACK = 34480, // cast by players - damage effect + SPELL_GRAVITY_LAPSE_AURA = 39432, // cast by players - fly effect + SPELL_NETHER_BEAM = 35869, // triggers 35873 on target + SPELL_NETHER_VAPOR_SUMMON = 35865, // script effect - probably related to 35879 + // ***** Advisors spells ******** //Thaladred the Darkener spells - SPELL_PSYCHIC_BLOW = 10689, + SPELL_PSYCHIC_BLOW = 36966, SPELL_SILENCE = 30225, + SPELL_REND = 36965, + //Lord Sanguinar spells - SPELL_BELLOWING_ROAR = 40636, - //Grand Astromancer Capernian spells + SPELL_BELLOWING_ROAR = 44863, + //Grand Astromancer Capernian spells SPELL_CAPERNIAN_FIREBALL = 36971, SPELL_CONFLAGRATION = 37018, - SPELL_ARCANE_EXPLOSION = 36970, + SPELL_ARCANE_BURST = 36970, + //Master Engineer Telonicus spells SPELL_BOMB = 37036, SPELL_REMOTE_TOY = 37027, + + // ***** Other summons spells ******** //Nether Vapor spell - SPELL_NETHER_VAPOR = 35859, + SPELL_NETHER_VAPOR = 35858, //Phoenix spell SPELL_BURN = 36720, SPELL_EMBER_BLAST = 34341, - SPELL_REBIRTH = 41587, + SPELL_REBIRTH = 35369, - //Creature IDs + // ***** Creature Entries ******** NPC_FLAME_STRIKE_TRIGGER = 21369, NPC_PHOENIX = 21362, NPC_PHOENIX_EGG = 21364, - - //Phoenix egg and phoenix model - MODEL_ID_PHOENIX = 19682, - MODEL_ID_PHOENIX_EGG = 20245, - - MAX_ADVISORS = 4 + NPC_NETHER_VAPOR = 21002, + + // ***** Other ******** + PHASE_0_NOT_BEGUN = 0, + PHASE_1_ADVISOR = 1, + PHASE_2_WEAPON = 2, + PHASE_3_ADVISOR_ALL = 3, + PHASE_4_SOLO = 4, + PHASE_5_WAITING = 5, + PHASE_6_FLYING = 6, + PHASE_7_GRAVITY = 7, + + POINT_ID_CENTER = 1, + POINT_ID_AIR = 2, + + MAX_WEAPONS = 7, + MAX_MIND_CONTROL = 3, }; -static const uint32 aAdvisors[MAX_ADVISORS] = {NPC_THALADRED, NPC_SANGUINAR, NPC_CAPERNIAN, NPC_TELONICUS}; - -uint32 m_auiSpellSummonWeapon[]= +static const uint32 m_auiSpellSummonWeapon[MAX_WEAPONS]= { SPELL_SUMMON_WEAPONA, SPELL_SUMMON_WEAPONB, SPELL_SUMMON_WEAPONC, SPELL_SUMMON_WEAPOND, SPELL_SUMMON_WEAPONE, SPELL_SUMMON_WEAPONF, SPELL_SUMMON_WEAPONG }; -const float CAPERNIAN_DISTANCE = 20.0f; //she casts away from the target -const float KAEL_VISIBLE_RANGE = 50.0f; +// teleport spells for gravity lapse event +static const uint32 m_auiSpellGravityLapseTeleport[] = +{ + 35966,35967,35968,35969,35970,35971,35972,35973,35974,35975,35976,35977,35978,35979,35980, + 35981,35982,35983,35984,35985,35986,35987,35988,35989,35990 +}; -const float afGravityPos[3] = {795.0f, 0.0f, 70.0f}; +static const float aCenterPos[3] = {795.00f, -0.46f, 48.72f}; -#define TIME_PHASE_2_3 120000 -#define TIME_PHASE_3_4 180000 +/*###### +## boss_kaelthas +######*/ -//Base AI for Advisors -struct MANGOS_DLL_DECL advisorbase_ai : public ScriptedAI +struct MANGOS_DLL_DECL boss_kaelthasAI : public ScriptedAI { - advisorbase_ai(Creature* pCreature) : ScriptedAI(pCreature) + boss_kaelthasAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bDoubled_Health = false; Reset(); } - protected: - int32 m_iAdvisor_Speech; - public: ScriptedInstance* m_pInstance; - bool m_bFakeDeath; - bool m_bDoubled_Health; - uint32 m_uiDelayRes_Timer; - ObjectGuid m_delayResTargetGuid; - void Reset() - { - if (m_bDoubled_Health) - { - m_creature->SetMaxHealth(m_creature->GetMaxHealth() / 2); - m_bDoubled_Health = false; - } - - m_bFakeDeath = false; - m_uiDelayRes_Timer = 0; - m_delayResTargetGuid.Clear(); - - m_creature->SetStandState(UNIT_STAND_STATE_STAND); - m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - - //reset encounter - if (m_pInstance && (m_pInstance->GetData(TYPE_KAELTHAS_PHASE) == PHASE_1_ADVISOR || m_pInstance->GetData(TYPE_KAELTHAS_PHASE) == PHASE_3_ADVISOR_ALL)) - { - if (Creature* pKaelthas = m_pInstance->GetSingleCreatureFromStorage(NPC_KAELTHAS)) - pKaelthas->AI()->EnterEvadeMode(); - } - } - - void MoveInLineOfSight(Unit* pWho) - { - if (!pWho || m_bFakeDeath || m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE)) - return; + uint32 m_uiFireballTimer; + uint32 m_uiArcaneDisruptionTimer; + uint32 m_uiPhoenixTimer; + uint32 m_uiFlameStrikeTimer; - ScriptedAI::MoveInLineOfSight(pWho); - } + uint32 m_uiPyroblastTimer; + uint32 m_uiShockBarrierTimer; + uint32 m_uiMindControlTimer; + uint32 m_uiExplodeTimer; - void AttackStart(Unit* pWho) - { - if (!pWho || m_bFakeDeath || m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE)) - return; + uint32 m_uiGravityLapseTimer; + uint32 m_uiGravityExpireTimer; + uint32 m_uiNetherBeamTimer; + uint32 m_uiNetherVaporTimer; + uint8 m_uiGravityIndex; - ScriptedAI::AttackStart(pWho); - } + uint32 m_uiPhaseTimer; + uint8 m_uiPhase; + uint8 m_uiPhaseSubphase; - void Revive(Unit* Target) + void Reset() { - m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - // double health for phase 3 - m_creature->SetMaxHealth(m_creature->GetMaxHealth() * 2); - m_bDoubled_Health = true; - m_creature->SetHealth(m_creature->GetMaxHealth()); - m_creature->SetStandState(UNIT_STAND_STATE_STAND); + // Phases + m_uiPhase = PHASE_0_NOT_BEGUN; + m_uiPhaseTimer = 23000; + m_uiPhaseSubphase = 0; + + // Spells + m_uiFireballTimer = urand(1000, 3000); + m_uiArcaneDisruptionTimer = 45000; + m_uiPhoenixTimer = 50000; + m_uiFlameStrikeTimer = 30000; + + m_uiShockBarrierTimer = 60000; + m_uiMindControlTimer = 40000; + m_uiPyroblastTimer = 0; + m_uiExplodeTimer = 0; + + m_uiGravityLapseTimer = 12000; + m_uiGravityExpireTimer = 0; + m_uiNetherBeamTimer = 8000; + m_uiNetherVaporTimer = 10000; + m_uiGravityIndex = 0; - DoCastSpellIfCan(m_creature, SPELL_RES_VISUAL); - m_uiDelayRes_Timer = 2000; - } + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - void JustDied(Unit* pKiller) - { - if (m_pInstance && m_pInstance->GetData(TYPE_KAELTHAS_PHASE) == PHASE_3_ADVISOR_ALL) - DoScriptText(m_iAdvisor_Speech, m_creature); + SetCombatMovement(true); } - void DamageTaken(Unit* pKiller, uint32 &damage) + // Custom Move in LoS function + void MoveInLineOfSight(Unit* pWho) { - if (damage < m_creature->GetHealth()) - return; - - //Prevent glitch if in fake death - if (m_bFakeDeath && m_pInstance && m_pInstance->GetData(TYPE_KAELTHAS_PHASE) != PHASE_0_NOT_BEGUN) + if (m_uiPhase == PHASE_0_NOT_BEGUN && pWho->GetTypeId() == TYPEID_PLAYER && !((Player*)pWho)->isGameMaster() && + m_creature->IsWithinDistInMap(pWho, m_creature->GetAttackDistance(pWho)) && m_creature->IsWithinLOSInMap(pWho)) { - damage = 0; - return; - } + DoScriptText(SAY_INTRO, m_creature); + m_uiPhase = PHASE_1_ADVISOR; - //Don't really die in phase 1 & 3, only die after that - if (m_pInstance && m_pInstance->GetData(TYPE_KAELTHAS_PHASE) != PHASE_0_NOT_BEGUN) - { - //prevent death - damage = 0; - m_bFakeDeath = true; - - m_creature->InterruptNonMeleeSpells(false); - m_creature->SetHealth(0); - m_creature->StopMoving(); - m_creature->ClearComboPointHolders(); - m_creature->RemoveAllAurasOnDeath(); - m_creature->ModifyAuraState(AURA_STATE_HEALTHLESS_20_PERCENT, false); - m_creature->ModifyAuraState(AURA_STATE_HEALTHLESS_35_PERCENT, false); - m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - m_creature->ClearAllReactives(); - m_creature->SetTargetGuid(ObjectGuid()); - m_creature->GetMotionMaster()->Clear(); - m_creature->GetMotionMaster()->MoveIdle(); - m_creature->SetStandState(UNIT_STAND_STATE_DEAD); - JustDied(pKiller); + // Set the player in combat with the boss + pWho->SetInCombatWith(m_creature); + m_creature->AddThreat(pWho); - if (m_creature->getVictim()) - m_delayResTargetGuid = m_creature->getVictim()->GetObjectGuid(); + if (m_pInstance) + m_pInstance->SetData(TYPE_KAELTHAS, IN_PROGRESS); } } - void UpdateAI(const uint32 uiDiff) + void AttackStart(Unit* pWho) { - if (m_uiDelayRes_Timer) + if (m_creature->Attack(pWho, true)) { - if (m_uiDelayRes_Timer <= uiDiff) - { - m_uiDelayRes_Timer = 0; - m_bFakeDeath = false; - - Unit* pTarget = m_creature->GetMap()->GetUnit(m_delayResTargetGuid); - - if (!pTarget || !pTarget->isAlive()) - pTarget = m_creature->getVictim(); - - if (!pTarget) - return; - - DoResetThreat(); - AttackStart(pTarget); - // In case of same target as before, AttackStart and Attack won't set the target guid. - m_creature->SetTargetGuid(pTarget->GetObjectGuid()); - - m_creature->GetMotionMaster()->Clear(); - m_creature->GetMotionMaster()->MoveChase(pTarget); - } - else - m_uiDelayRes_Timer -= uiDiff; + m_creature->AddThreat(pWho); + m_creature->SetInCombatWith(pWho); + pWho->SetInCombatWith(m_creature); + DoStartMovement(pWho, 25.0f); } } -}; - -//Kael'thas AI -struct MANGOS_DLL_DECL boss_kaelthasAI : public ScriptedAI -{ - boss_kaelthasAI(Creature* pCreature) : ScriptedAI(pCreature) + void KilledUnit(Unit* pUnit) { - m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - Reset(); + switch(urand(0, 2)) + { + case 0: DoScriptText(SAY_SLAY1, m_creature); break; + case 1: DoScriptText(SAY_SLAY2, m_creature); break; + case 2: DoScriptText(SAY_SLAY3, m_creature); break; + } } - ScriptedInstance* m_pInstance; - - uint32 m_uiFireball_Timer; - uint32 m_uiArcaneDisruption_Timer; - uint32 m_uiPhoenix_Timer; - uint32 m_uiShockBarrier_Timer; - uint32 m_uiGravityLapse_Timer; - uint32 m_uiGravityLapse_Phase; - uint32 m_uiNetherBeam_Timer; - uint32 m_uiNetherVapor_Timer; - uint32 m_uiFlameStrike_Timer; - uint32 m_uiMindControl_Timer; - uint32 m_uiPhase; - uint32 m_uiPhaseSubphase; //generic - uint32 m_uiPhase_Timer; //generic timer - uint32 m_uiPyrosCasted; - - bool m_bInGravityLapse; - bool m_bIsCastingFireball; - bool m_bChainPyros; - - void Reset() + void JustDied(Unit* pKiller) { - m_uiFireball_Timer = urand(5000, 15000); - m_uiArcaneDisruption_Timer = 45000; - m_uiMindControl_Timer = 40000; - m_uiPhoenix_Timer = 50000; - m_uiShockBarrier_Timer = 60000; - m_uiFlameStrike_Timer = 30000; - m_uiGravityLapse_Timer = 20000; - m_uiGravityLapse_Phase = 0; - m_uiNetherBeam_Timer = 8000; - m_uiNetherVapor_Timer = 10000; - m_uiPyrosCasted = 0; - m_uiPhase = 0; - m_bInGravityLapse = false; - m_bIsCastingFireball = false; - m_bChainPyros = false; - - if (m_creature->isInCombat()) - PrepareAdvisors(); - - m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + DoScriptText(SAY_DEATH, m_creature); if (m_pInstance) - m_pInstance->SetData(TYPE_KAELTHAS_PHASE, PHASE_0_NOT_BEGUN); + m_pInstance->SetData(TYPE_KAELTHAS, DONE); } - void PrepareAdvisors() + void JustReachedHome() { - if (!m_pInstance) - return; - - for(uint8 i = 0; i < MAX_ADVISORS; ++i) - { - if (Creature* pCreature = m_pInstance->GetSingleCreatureFromStorage(aAdvisors[i])) - { - pCreature->Respawn(); - pCreature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - pCreature->setFaction(m_creature->getFaction()); - pCreature->AI()->EnterEvadeMode(); - } - } + if (m_pInstance) + m_pInstance->SetData(TYPE_KAELTHAS, FAIL); } - void StartEvent() + void JustSummoned(Creature* pSummoned) { - if (!m_pInstance) - return; - - bool bAdivsorsFound = true; - for (uint8 i = 0; i < MAX_ADVISORS; ++i) - { - if (!m_pInstance->GetSingleCreatureFromStorage(aAdvisors[i])) - bAdivsorsFound = false; - } - - if (!bAdivsorsFound) - { - error_log("SD2: Kael'Thas One or more advisors missing, Skipping Phases 1-3"); - - DoScriptText(SAY_PHASE4_INTRO2, m_creature); - - m_uiPhase = PHASE_4_SOLO; - - m_pInstance->SetData(TYPE_KAELTHAS_PHASE, PHASE_4_SOLO); - - m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) - AttackStart(pTarget); - - } + if (pSummoned->GetEntry() == NPC_FLAME_STRIKE_TRIGGER) + pSummoned->CastSpell(pSummoned, SPELL_FLAME_STRIKE_DUMMY, false, NULL, NULL, m_creature->GetObjectGuid()); + else if (pSummoned->GetEntry() == NPC_NETHER_VAPOR) + pSummoned->CastSpell(pSummoned, SPELL_NETHER_VAPOR, false, NULL, NULL, m_creature->GetObjectGuid()); + // Start combat for Weapons of Phoenix else - { - PrepareAdvisors(); - - DoScriptText(SAY_INTRO, m_creature); - - m_pInstance->SetData(TYPE_KAELTHAS_PHASE, PHASE_1_ADVISOR); - m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - - m_uiPhaseSubphase = 0; - m_uiPhase_Timer = 23000; - m_uiPhase = PHASE_1_ADVISOR; - } + pSummoned->SetInCombatWithZone(); } - void MoveInLineOfSight(Unit* pWho) + void SpellHit(Unit* pCaster, const SpellEntry* pSpell) { - if (pWho->isTargetableForAttack() && - m_creature->IsHostileTo(pWho) && pWho->isInAccessablePlaceFor(m_creature)) + // Handle summon weapons event + if (pSpell->Id == SPELL_SUMMON_WEAPONS) { - if (!m_creature->CanFly() && m_creature->GetDistanceZ(pWho) > CREATURE_Z_ATTACK_RANGE) - return; - - float attackRadius = m_creature->GetAttackDistance(pWho); - if (m_creature->IsWithinDistInMap(pWho, attackRadius) && m_creature->IsWithinLOSInMap(pWho)) - { - if (!m_creature->getVictim() && m_uiPhase >= PHASE_4_SOLO) - { - pWho->RemoveSpellsCausingAura(SPELL_AURA_MOD_STEALTH); - AttackStart(pWho); - } - else if (m_creature->GetMap()->IsDungeon()) - { - if (m_pInstance && m_pInstance->GetData(TYPE_KAELTHAS_PHASE) == PHASE_0_NOT_BEGUN && !m_uiPhase) - StartEvent(); + for (uint8 i = 0; i < MAX_WEAPONS; ++i) + DoCastSpellIfCan(m_creature, m_auiSpellSummonWeapon[i], CAST_TRIGGERED); - pWho->SetInCombatWith(m_creature); - m_creature->AddThreat(pWho); - } - } + m_uiPhase = PHASE_2_WEAPON; + m_uiPhaseTimer = 120000; } } - void Aggro(Unit* pWho) - { - if (m_pInstance && m_pInstance->GetData(TYPE_KAELTHAS_PHASE) == PHASE_0_NOT_BEGUN && !m_uiPhase) - StartEvent(); - } - - void KilledUnit(Unit* pUnit) + void SpellHitTarget(Unit* pTarget, const SpellEntry* pSpell) { - switch(urand(0, 2)) + // Handle gravity lapse teleport - each player hit has his own teleport spell + if (pSpell->Id == SPELL_GRAVITY_LAPSE && pTarget->GetTypeId() == TYPEID_PLAYER) { - case 0: DoScriptText(SAY_SLAY1, m_creature); break; - case 1: DoScriptText(SAY_SLAY2, m_creature); break; - case 2: DoScriptText(SAY_SLAY3, m_creature); break; + DoCastSpellIfCan(pTarget, m_auiSpellGravityLapseTeleport[m_uiGravityIndex], CAST_TRIGGERED); + pTarget->CastSpell(pTarget, SPELL_GRAVITY_LAPSE_KNOCKBACK, true, NULL, NULL, m_creature->GetObjectGuid()); + pTarget->CastSpell(pTarget, SPELL_GRAVITY_LAPSE_AURA, true, NULL, NULL, m_creature->GetObjectGuid()); + ++m_uiGravityIndex; } } - void JustSummoned(Creature* pSummoned) + void MovementInform(uint32 uiMotionType, uint32 uiPointId) { - if (pSummoned->GetEntry() == NPC_FLAME_STRIKE_TRIGGER) - { - pSummoned->CastSpell(pSummoned, SPELL_FLAME_STRIKE_DUMMY, false, NULL, NULL, m_creature->GetObjectGuid()); + if (uiMotionType != POINT_MOTION_TYPE || !uiPointId) return; - } - if (pSummoned->GetEntry() == NPC_PHOENIX) + if (uiPointId == POINT_ID_CENTER) { - return; + if (m_uiPhase == PHASE_5_WAITING) + { + // ToDo: also start channeling to the giant crystals nearby + m_creature->SetLevitate(true); + m_creature->GetMotionMaster()->MovePoint(POINT_ID_AIR, m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ() + 30.0f, false); + m_uiPhaseTimer = 0; + m_uiPhase = PHASE_6_FLYING; + } + else if (m_uiPhase == PHASE_6_FLYING) + { + SetCombatMovement(true); + m_creature->SetLevitate(false); + m_creature->InterruptNonMeleeSpells(false); + m_creature->GetMotionMaster()->Clear(); + DoStartMovement(m_creature->getVictim(), 25.0f); + m_uiShockBarrierTimer = 10000; + m_uiPhase = PHASE_7_GRAVITY; + } + } + if (uiPointId == POINT_ID_AIR) + { + if (DoCastSpellIfCan(m_creature, SPELL_EXPLODE_2) == CAST_OK) + { + // ToDo: start channeling some additional crystals + // Also it's not very clear which other spells should be used here (which modifies his scale) + m_uiExplodeTimer = 8000; + } } - - // if not phoenix or trigger, then it's one of the 7 weapons - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) - pSummoned->AI()->AttackStart(pTarget); } - void JustDied(Unit* pKiller) + void AdvisorDefeated(uint32 uiEntry) { - m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - - DoScriptText(SAY_DEATH, m_creature); + if (m_uiPhase != PHASE_1_ADVISOR) + return; - if (m_pInstance) + // Handle phase 1 end + if (uiEntry == NPC_TELONICUS) { - m_pInstance->SetData(TYPE_KAELTHAS_PHASE, PHASE_6_COMPLETE); - - for (uint8 i = 0; i < MAX_ADVISORS; ++i) - { - if (Creature* pAdvisor = m_pInstance->GetSingleCreatureFromStorage(aAdvisors[i])) - pAdvisor->DealDamage(pAdvisor, pAdvisor->GetMaxHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); - } + if (DoCastSpellIfCan(m_creature, SPELL_SUMMON_WEAPONS) == CAST_OK) + DoScriptText(SAY_PHASE2_WEAPON, m_creature); } + else + m_uiPhaseTimer = 1000; } void UpdateAI(const uint32 uiDiff) { - //Phase 1 switch (m_uiPhase) { + // ***** Advisors phase ******** case PHASE_1_ADVISOR: { - Unit* pTarget = NULL; - Creature* pAdvisor = NULL; + if (!m_uiPhaseTimer) + return; - //Subphase switch - switch(m_uiPhaseSubphase) + if (m_uiPhaseTimer <= uiDiff) { - //Subphase 1 - Start - case 0: - if (m_uiPhase_Timer < uiDiff) - { - DoScriptText(SAY_INTRO_THALADRED, m_creature); - - //start advisor within 7 seconds - m_uiPhase_Timer = 7000; - ++m_uiPhaseSubphase; - } - else - m_uiPhase_Timer -= uiDiff; + if (!m_pInstance) + return; - break; - - //Subphase 1 - Unlock advisor - case 1: - if (m_uiPhase_Timer < uiDiff) - { - if (m_pInstance) - pAdvisor = m_pInstance->GetSingleCreatureFromStorage(aAdvisors[0]); + switch(m_uiPhaseSubphase) + { + case 0: + DoScriptText(SAY_INTRO_THALADRED, m_creature); + m_uiPhaseTimer = 7000; + break; - if (pAdvisor) + case 1: + if (Creature* pAdvisor = m_pInstance->GetSingleCreatureFromStorage(NPC_THALADRED)) { pAdvisor->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - pAdvisor->setFaction(m_creature->getFaction()); - - pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0); - if (pTarget) - pAdvisor->AI()->AttackStart(pTarget); + pAdvisor->SetInCombatWithZone(); } + m_uiPhaseTimer = 0; + break; - ++m_uiPhaseSubphase; - } - else - m_uiPhase_Timer -= uiDiff; - - break; - - //Subphase 2 - Start - case 2: - if (m_pInstance) - pAdvisor = m_pInstance->GetSingleCreatureFromStorage(aAdvisors[0]); - - if (pAdvisor && (pAdvisor->getStandState() == UNIT_STAND_STATE_DEAD)) - { + case 2: DoScriptText(SAY_INTRO_SANGUINAR, m_creature); + m_uiPhaseTimer = 12500; + break; - //start advisor within 12.5 seconds - m_uiPhase_Timer = 12500; - ++m_uiPhaseSubphase; - } - break; - - //Subphase 2 - Unlock advisor - case 3: - if (m_uiPhase_Timer < uiDiff) - { - if (m_pInstance) - pAdvisor = m_pInstance->GetSingleCreatureFromStorage(aAdvisors[1]); - - if (pAdvisor) + case 3: + if (Creature* pAdvisor = m_pInstance->GetSingleCreatureFromStorage(NPC_SANGUINAR)) { pAdvisor->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - pAdvisor->setFaction(m_creature->getFaction()); - - pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0); - if (pTarget) - pAdvisor->AI()->AttackStart(pTarget); + pAdvisor->SetInCombatWithZone(); } + m_uiPhaseTimer = 0; + break; - ++m_uiPhaseSubphase; - } - else - m_uiPhase_Timer -= uiDiff; - - break; - - //Subphase 3 - Start - case 4: - if (m_pInstance) - pAdvisor = m_pInstance->GetSingleCreatureFromStorage(aAdvisors[1]); - - if (pAdvisor && (pAdvisor->getStandState() == UNIT_STAND_STATE_DEAD)) - { + case 4: DoScriptText(SAY_INTRO_CAPERNIAN, m_creature); + m_uiPhaseTimer = 7000; + break; - //start advisor within 7 seconds - m_uiPhase_Timer = 7000; - ++m_uiPhaseSubphase; - } - break; - - //Subphase 3 - Unlock advisor - case 5: - if (m_uiPhase_Timer < uiDiff) - { - if (m_pInstance) - pAdvisor = m_pInstance->GetSingleCreatureFromStorage(aAdvisors[2]); - - if (pAdvisor) + case 5: + if (Creature* pAdvisor = m_pInstance->GetSingleCreatureFromStorage(NPC_CAPERNIAN)) { pAdvisor->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - pAdvisor->setFaction(m_creature->getFaction()); - - pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0); - if (pTarget) - pAdvisor->AI()->AttackStart(pTarget); + pAdvisor->SetInCombatWithZone(); } + m_uiPhaseTimer = 0; + break; - ++m_uiPhaseSubphase; - } - else - m_uiPhase_Timer -= uiDiff; - - break; - - //Subphase 4 - Start - case 6: - if (m_pInstance) - pAdvisor = m_pInstance->GetSingleCreatureFromStorage(aAdvisors[2]); - - if (pAdvisor && (pAdvisor->getStandState() == UNIT_STAND_STATE_DEAD)) - { + case 6: DoScriptText(SAY_INTRO_TELONICUS, m_creature); + m_uiPhaseTimer = 8400; + break; - //start advisor within 8.4 seconds - m_uiPhase_Timer = 8400; - ++m_uiPhaseSubphase; - } - break; - - //Subphase 4 - Unlock advisor - case 7: - if (m_uiPhase_Timer < uiDiff) - { - if (m_pInstance) - pAdvisor = m_pInstance->GetSingleCreatureFromStorage(aAdvisors[3]); - - if (pAdvisor) + case 7: + if (Creature* pAdvisor = m_pInstance->GetSingleCreatureFromStorage(NPC_TELONICUS)) { pAdvisor->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - pAdvisor->setFaction(m_creature->getFaction()); - - pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0); - if (pTarget) - pAdvisor->AI()->AttackStart(pTarget); + pAdvisor->SetInCombatWithZone(); } - - m_uiPhase_Timer = 3000; - ++m_uiPhaseSubphase; - }else m_uiPhase_Timer -= uiDiff; - break; - - //End of phase 1 - case 8: - if (m_pInstance) - pAdvisor = m_pInstance->GetSingleCreatureFromStorage(aAdvisors[3]); - - if (pAdvisor && (pAdvisor->getStandState() == UNIT_STAND_STATE_DEAD)) - { - m_uiPhase = PHASE_2_WEAPON; - m_pInstance->SetData(TYPE_KAELTHAS_PHASE, PHASE_2_WEAPON); - - DoScriptText(SAY_PHASE2_WEAPON, m_creature); - - m_uiPhaseSubphase = 0; - m_uiPhase_Timer = 3500; - DoCastSpellIfCan(m_creature, SPELL_SUMMON_WEAPONS); + m_uiPhaseTimer = 0; + break; } - break; + + ++m_uiPhaseSubphase; } + else + m_uiPhaseTimer -= uiDiff; break; } + // ***** Weapons phase ******** case PHASE_2_WEAPON: { - if (m_uiPhaseSubphase == 0) + if (m_uiPhaseTimer < uiDiff) { - if (m_uiPhase_Timer < uiDiff) - { - m_uiPhaseSubphase = 1; - }else m_uiPhase_Timer -= uiDiff; - } - - //Spawn weapons - if (m_uiPhaseSubphase == 1) - { - m_creature->CastSpell(m_creature, SPELL_SUMMON_WEAPONS, false); - - for (uint32 i = 0; i < countof(m_auiSpellSummonWeapon); ++i) - m_creature->CastSpell(m_creature,m_auiSpellSummonWeapon[i],true); - - m_uiPhaseSubphase = 2; - m_uiPhase_Timer = TIME_PHASE_2_3; - } - - if (m_uiPhaseSubphase == 2) - { - if (m_uiPhase_Timer < uiDiff) + // Switch to next phase, no matter if the weapons are killed or not + if (DoCastSpellIfCan(m_creature, SPELL_RESURRECTION) == CAST_OK) { DoScriptText(SAY_PHASE3_ADVANCE, m_creature); - m_pInstance->SetData(TYPE_KAELTHAS_PHASE, PHASE_3_ADVISOR_ALL); - m_uiPhase = PHASE_3_ADVISOR_ALL; m_uiPhaseSubphase = 0; + m_uiPhaseTimer = 180000; + m_uiPhase = PHASE_3_ADVISOR_ALL; } - else - m_uiPhase_Timer -= uiDiff; } + else + m_uiPhaseTimer -= uiDiff; break; } + // ***** All advisors phase ******** case PHASE_3_ADVISOR_ALL: { - if (m_uiPhaseSubphase == 0) - { - //Respawn advisors - Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0); - - for (uint32 i = 0; i < MAX_ADVISORS; ++i) - { - if (m_pInstance) - { - if (Creature* pAdvisor = m_pInstance->GetSingleCreatureFromStorage(aAdvisors[i])) - { - if (advisorbase_ai* pAdvisorAI = dynamic_cast(pAdvisor->AI())) - pAdvisorAI->Revive(pTarget); - } - } - } - - m_uiPhaseSubphase = 1; - m_uiPhase_Timer = TIME_PHASE_3_4; - } - - if (m_uiPhase_Timer < uiDiff) + if (m_uiPhaseTimer < uiDiff) { DoScriptText(SAY_PHASE4_INTRO2, m_creature); - m_uiPhase = PHASE_4_SOLO; - - m_pInstance->SetData(TYPE_KAELTHAS_PHASE, PHASE_4_SOLO); - - // Sometimes people can collect Aggro in Phase 1-3. Reset threat before releasing Kael. - DoResetThreat(); - - m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) - AttackStart(pTarget); - - m_uiPhase_Timer = 30000; + DoResetThreat(); + m_creature->SetInCombatWithZone(); + m_uiPhase = PHASE_4_SOLO; + m_uiPhaseTimer = 30000; } else - m_uiPhase_Timer -= uiDiff; + m_uiPhaseTimer -= uiDiff; break; } + // ***** Solo phases ******** case PHASE_4_SOLO: - case 5: - case 6: + case PHASE_7_GRAVITY: { - //Return since we have no target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - //m_uiFireball_Timer - if (!m_bInGravityLapse && !m_bChainPyros && m_uiPhase != 5) + if (m_uiGravityExpireTimer) { - if (m_uiFireball_Timer < uiDiff) + if (m_uiNetherBeamTimer < uiDiff) { - if (!m_bIsCastingFireball) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) { - if (!m_creature->IsNonMeleeSpellCasted(false)) - { - //interruptable - m_creature->ApplySpellImmune(0, IMMUNITY_EFFECT, SPELL_EFFECT_INTERRUPT_CAST, false); - int32 uiDmg = irand(20000, 25000); - m_creature->CastCustomSpell(m_creature->getVictim(), SPELL_FIREBALL, &uiDmg, 0, 0, false); - m_bIsCastingFireball = true; - m_uiFireball_Timer = 2500; - } - } - else - { - //apply resistance - m_creature->ApplySpellImmune(0, IMMUNITY_EFFECT, SPELL_EFFECT_INTERRUPT_CAST, true); - m_bIsCastingFireball = false; - m_uiFireball_Timer = urand(5000, 15000); + if (DoCastSpellIfCan(m_creature, SPELL_NETHER_BEAM) == CAST_OK) + m_uiNetherBeamTimer = urand(2000, 4000); } } else - m_uiFireball_Timer -= uiDiff; + m_uiNetherBeamTimer -= uiDiff; - //m_uiArcaneDisruption_Timer - if (m_uiArcaneDisruption_Timer < uiDiff) + // Switch to the other spells after gravity lapse expired + if (m_uiGravityExpireTimer <= uiDiff) + m_uiGravityExpireTimer = 0; + else + m_uiGravityExpireTimer -= uiDiff; + } + else + { + if (m_uiFireballTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_ARCANE_DISRUPTION, CAST_TRIGGERED); - m_uiArcaneDisruption_Timer = 60000; + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, SPELL_FIREBALL) == CAST_OK) + m_uiFireballTimer = urand(3000, 5000); + } } else - m_uiArcaneDisruption_Timer -= uiDiff; + m_uiFireballTimer -= uiDiff; - //m_uiFlameStrike_Timer - if (m_uiFlameStrike_Timer < uiDiff) + if (m_uiArcaneDisruptionTimer < uiDiff) { - if (Unit* pUnit = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) - DoCastSpellIfCan(pUnit, SPELL_FLAME_STRIKE); - - m_uiFlameStrike_Timer = 30000; + if (DoCastSpellIfCan(m_creature, SPELL_ARCANE_DISRUPTION) == CAST_OK) + m_uiArcaneDisruptionTimer = 60000; } else - m_uiFlameStrike_Timer -= uiDiff; + m_uiArcaneDisruptionTimer -= uiDiff; - if (m_uiMindControl_Timer < uiDiff) + if (m_uiFlameStrikeTimer < uiDiff) { - if (m_creature->getThreatManager().getThreatList().size() >= 2) - for (uint32 i = 0; i < 3; ++i) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) { - debug_log("SD2: Kael'Thas mind control not supported."); - //DoCastSpellIfCan(pUnit, SPELL_MIND_CONTROL); + if (DoCastSpellIfCan(pTarget, SPELL_FLAME_STRIKE) == CAST_OK) + m_uiFlameStrikeTimer = 30000; } - - m_uiMindControl_Timer = 60000; } else - m_uiMindControl_Timer -= uiDiff; - } + m_uiFlameStrikeTimer -= uiDiff; - // Summon Phoenix - if (m_uiPhoenix_Timer < uiDiff) - { - if (DoCastSpellIfCan(m_creature, SPELL_PHOENIX_ANIMATION) == CAST_OK) + if (m_uiPhoenixTimer < uiDiff) { - DoScriptText(urand(0, 1) ? SAY_SUMMON_PHOENIX1 : SAY_SUMMON_PHOENIX2, m_creature); - m_uiPhoenix_Timer = 60000; + if (DoCastSpellIfCan(m_creature, SPELL_PHOENIX_ANIMATION) == CAST_OK) + { + DoScriptText(urand(0, 1) ? SAY_SUMMON_PHOENIX1 : SAY_SUMMON_PHOENIX2, m_creature); + m_uiPhoenixTimer = 60000; + } } + else + m_uiPhoenixTimer -= uiDiff; } - else - m_uiPhoenix_Timer -= uiDiff; - //Phase 4 specific spells + DoMeleeAttackIfReady(); + + // ***** Phase 4 specific actions ******** if (m_uiPhase == PHASE_4_SOLO) { if (m_creature->GetHealthPercent() < 50.0f) { - m_pInstance->SetData(TYPE_KAELTHAS_PHASE, PHASE_5_GRAVITY); - m_uiPhase = PHASE_5_GRAVITY; - m_uiPhase_Timer = 10000; - + // ToDo: should he cast something here? + m_creature->InterruptNonMeleeSpells(false); DoScriptText(SAY_PHASE5_NUTS, m_creature); - m_creature->StopMoving(); + SetCombatMovement(false); m_creature->GetMotionMaster()->Clear(); - m_creature->GetMotionMaster()->MoveIdle(); - - m_creature->NearTeleportTo(afGravityPos[0], afGravityPos[1], afGravityPos[2], 0.0f); + m_creature->GetMotionMaster()->MovePoint(POINT_ID_CENTER, aCenterPos[0], aCenterPos[1], aCenterPos[2]); - m_creature->InterruptNonMeleeSpells(false); - DoCastSpellIfCan(m_creature, SPELL_FULLPOWER); - m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + m_uiPhase = PHASE_5_WAITING; } - //m_uiShockBarrier_Timer - if (m_uiShockBarrier_Timer < uiDiff) + if (m_uiShockBarrierTimer < uiDiff) { - DoCastSpellIfCan(m_creature, SPELL_SHOCK_BARRIER); - m_bChainPyros = true; - m_uiPyrosCasted = 0; - m_uiShockBarrier_Timer = 60000; + if (DoCastSpellIfCan(m_creature, SPELL_SHOCK_BARRIER) == CAST_OK) + { + m_uiPyroblastTimer = 1000; + m_uiShockBarrierTimer = 60000; + } } else - m_uiShockBarrier_Timer -= uiDiff; + m_uiShockBarrierTimer -= uiDiff; - //Chain Pyros (3 of them max) - if (m_bChainPyros && !m_creature->IsNonMeleeSpellCasted(false)) + if (m_uiPyroblastTimer) { - if (m_uiPyrosCasted < 3) + if (m_uiPyroblastTimer <= uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_PYROBLAST); - ++m_uiPyrosCasted; + if (DoCastSpellIfCan(m_creature, SPELL_PYROBLAST) == CAST_OK) + { + DoScriptText(EMOTE_PYROBLAST, m_creature); + m_uiPyroblastTimer = 0; + } } else - { - m_bChainPyros = false; - m_uiFireball_Timer = 2500; - m_uiArcaneDisruption_Timer = 60000; - } + m_uiPyroblastTimer -= uiDiff; } - } - if (m_uiPhase == PHASE_5_GRAVITY) - { - if (m_uiPhase_Timer < uiDiff) + if (m_uiMindControlTimer < uiDiff) { - m_creature->InterruptNonMeleeSpells(false); - m_creature->RemoveAurasDueToSpell(SPELL_FULLPOWER); - - DoCastSpellIfCan(m_creature, SPELL_EXPLODE); - - m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - m_uiPhase = 6; - AttackStart(m_creature->getVictim()); + for (uint8 i = 0; i < MAX_MIND_CONTROL; ++i) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1, SPELL_MIND_CONTROL, SELECT_FLAG_PLAYER)) + DoCastSpellIfCan(pTarget, SPELL_MIND_CONTROL); + } + m_uiMindControlTimer = 60000; } else - m_uiPhase_Timer -= uiDiff; + m_uiMindControlTimer -= uiDiff; } - //Phase 5 - if (m_uiPhase == 6) + // ***** Phase 7 specific actions ******** + if (m_uiPhase == PHASE_7_GRAVITY) { - - //m_uiGravityLapse_Timer - if (m_uiGravityLapse_Timer < uiDiff) + if (m_uiGravityLapseTimer < uiDiff) { - switch(m_uiGravityLapse_Phase) + if (DoCastSpellIfCan(m_creature, SPELL_GRAVITY_LAPSE) == CAST_OK) { - case 0: - { - m_creature->StopMoving(); - m_creature->GetMotionMaster()->Clear(); - m_creature->GetMotionMaster()->MoveIdle(); - m_creature->MonsterMoveWithSpeed(afGravityPos[0], afGravityPos[1], afGravityPos[2], 28.f); - - // 1) Kael'thas will portal the whole raid right into his body - GuidVector vGuids; - m_creature->FillGuidsListFromThreatList(vGuids); - for (GuidVector::const_iterator i = vGuids.begin(); i != vGuids.end(); ++i) - { - Unit* pUnit = m_creature->GetMap()->GetUnit(*i); - - if (pUnit && pUnit->GetTypeId() == TYPEID_PLAYER) - { - //Use work around packet to prevent player from being dropped from combat - DoTeleportPlayer(pUnit, afGravityPos[0], afGravityPos[1], afGravityPos[2], pUnit->GetOrientation()); - } - } - - m_uiGravityLapse_Timer = 500; - ++m_uiGravityLapse_Phase; - m_bInGravityLapse = true; - m_uiShockBarrier_Timer = 1000; - m_uiNetherBeam_Timer = 5000; - break; - } - case 1: - { - DoScriptText(urand(0, 1) ? SAY_GRAVITYLAPSE1 : SAY_GRAVITYLAPSE2, m_creature); - - // 2) At that point he will put a Gravity Lapse debuff on everyone - GuidVector vGuids; - m_creature->FillGuidsListFromThreatList(vGuids); - for (GuidVector::const_iterator i = vGuids.begin(); i != vGuids.end(); ++i) - { - if (Unit* pUnit = m_creature->GetMap()->GetUnit(*i)) - { - m_creature->CastSpell(pUnit, SPELL_KNOCKBACK, true); - //Gravity lapse - needs an exception in Spell system to work - - pUnit->CastSpell(pUnit, SPELL_GRAVITY_LAPSE, true, NULL, NULL, m_creature->GetObjectGuid()); - pUnit->CastSpell(pUnit, SPELL_GRAVITY_LAPSE_AURA, true, NULL, NULL, m_creature->GetObjectGuid()); - } - } - m_uiGravityLapse_Timer = 10000; - ++m_uiGravityLapse_Phase; - break; - } - case 2: - //Cast nether vapor aura on self - m_creature->InterruptNonMeleeSpells(false); - DoCastSpellIfCan(m_creature, SPELL_NETHER_VAPOR); - - m_uiGravityLapse_Timer = 20000; - ++m_uiGravityLapse_Phase; - break; - - case 3: - { - //Remove flight - m_creature->RemoveAurasDueToSpell(SPELL_NETHER_VAPOR); - m_bInGravityLapse = false; - m_uiGravityLapse_Timer = 60000; - m_uiGravityLapse_Phase = 0; - AttackStart(m_creature->getVictim()); - break; - } + DoScriptText(urand(0, 1) ? SAY_GRAVITYLAPSE1 : SAY_GRAVITYLAPSE2, m_creature);; + m_uiGravityIndex = 0; + m_uiNetherBeamTimer = 8000; + m_uiNetherVaporTimer = 4000; + m_uiGravityExpireTimer = 30000; + m_uiGravityLapseTimer = 90000; } } else - m_uiGravityLapse_Timer -= uiDiff; + m_uiGravityLapseTimer -= uiDiff; - if (m_bInGravityLapse) + if (m_uiShockBarrierTimer < uiDiff) { - //m_uiShockBarrier_Timer - if (m_uiShockBarrier_Timer < uiDiff) + if (DoCastSpellIfCan(m_creature, SPELL_SHOCK_BARRIER) == CAST_OK) + m_uiShockBarrierTimer = 20000; + } + else + m_uiShockBarrierTimer -= uiDiff; + + if (m_uiNetherVaporTimer) + { + if (m_uiNetherVaporTimer <= uiDiff) { - DoCastSpellIfCan(m_creature, SPELL_SHOCK_BARRIER); - m_uiShockBarrier_Timer = 20000; + if (DoCastSpellIfCan(m_creature, SPELL_NETHER_VAPOR_SUMMON) == CAST_OK) + m_uiNetherVaporTimer = 0; } else - m_uiShockBarrier_Timer -= uiDiff; - - //m_uiNetherBeam_Timer - if (m_uiNetherBeam_Timer < uiDiff) + m_uiNetherVaporTimer -= uiDiff; + } + } + } + // ***** Phase 5 - transition ******** + case PHASE_5_WAITING: + // Nothing here; wait for boss to arive at point + break; + // ***** Phase 6 - explode the bridge ******** + case PHASE_6_FLYING: + if (m_uiExplodeTimer) + { + if (m_uiExplodeTimer <= uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_EXPLODE) == CAST_OK) { - if (Unit* pUnit = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) - DoCastSpellIfCan(pUnit, SPELL_NETHER_BEAM); - - m_uiNetherBeam_Timer = 4000; + if (m_pInstance) + { + m_pInstance->DoUseDoorOrButton(GO_KAEL_STATUE_LEFT); + m_pInstance->DoUseDoorOrButton(GO_KAEL_STATUE_RIGHT); + m_pInstance->DoUseDoorOrButton(GO_BRIDGE_WINDOW); + } + // Note: also Kael casts some other unk spells here + m_uiPhaseTimer = 5000; + m_uiExplodeTimer = 0; } - else - m_uiNetherBeam_Timer -= uiDiff; } + else + m_uiExplodeTimer -= uiDiff; } - if (!m_bInGravityLapse) - DoMeleeAttackIfReady(); - } + if (m_uiPhaseTimer) + { + if (m_uiPhaseTimer <= uiDiff) + { + m_creature->GetMotionMaster()->Clear(); + m_creature->GetMotionMaster()->MovePoint(POINT_ID_CENTER, aCenterPos[0], aCenterPos[1], aCenterPos[2]); + m_uiPhaseTimer = 0; + } + else + m_uiPhaseTimer -= uiDiff; + } + break; } } }; -//Thaladred the Darkener AI -struct MANGOS_DLL_DECL boss_thaladred_the_darkenerAI : public advisorbase_ai +bool EffectDummyCreature_kael_phase_2(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) +{ + //always check spellid and effectindex + if (uiSpellId == SPELL_KAEL_PHASE_2 && uiEffIndex == EFFECT_INDEX_0) + { + if (boss_kaelthasAI* pKaelAI = dynamic_cast(pCreatureTarget->AI())) + pKaelAI->AdvisorDefeated(pCaster->GetEntry()); + + //always return true when we are handling this spell and effect + return true; + } + + return false; +} + +/*###### +## advisor_base_ai +######*/ + +struct MANGOS_DLL_DECL advisor_base_ai : public ScriptedAI { - boss_thaladred_the_darkenerAI(Creature* pCreature) : advisorbase_ai(pCreature) + advisor_base_ai(Creature* pCreature) : ScriptedAI(pCreature) { - m_iAdvisor_Speech = SAY_THALADRED_DEATH; + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); } - uint32 m_uiGaze_Timer; - uint32 m_uiSilence_Timer; - uint32 m_uiPsychicBlow_Timer; + ScriptedInstance* m_pInstance; + + bool m_bFakeDeath; + bool m_bCanFakeDeath; void Reset() { - m_uiGaze_Timer = 100; - m_uiSilence_Timer = 20000; - m_uiPsychicBlow_Timer = 10000; + m_bCanFakeDeath = true; + m_bFakeDeath = false; - advisorbase_ai::Reset(); + m_creature->SetStandState(UNIT_STAND_STATE_STAND); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); } - void Aggro(Unit* pWho) + void JustReachedHome() { - if (m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE)) + // Reset Kael if needed + if (m_pInstance) + { + if (Creature* pKael = m_pInstance->GetSingleCreatureFromStorage(NPC_KAELTHAS)) + pKael->AI()->EnterEvadeMode(); + + m_pInstance->SetData(TYPE_KAELTHAS, FAIL); + } + } + + void DamageTaken(Unit* pDoneby, uint32 &uiDamage) + { + // Allow fake death only in the first phase + if (!m_bCanFakeDeath) return; - if (!pWho || m_bFakeDeath) + if (uiDamage < m_creature->GetHealth()) return; + uiDamage = 0; + m_bFakeDeath = true; + + m_creature->InterruptNonMeleeSpells(true); + m_creature->SetHealth(0); + m_creature->StopMoving(); + m_creature->ClearComboPointHolders(); + m_creature->RemoveAllAurasOnDeath(); + m_creature->ModifyAuraState(AURA_STATE_HEALTHLESS_20_PERCENT, false); + m_creature->ModifyAuraState(AURA_STATE_HEALTHLESS_35_PERCENT, false); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + m_creature->ClearAllReactives(); + m_creature->GetMotionMaster()->Clear(); + m_creature->GetMotionMaster()->MoveIdle(); + m_creature->SetStandState(UNIT_STAND_STATE_DEAD); + + DoCastSpellIfCan(m_creature, SPELL_KAEL_PHASE_2, CAST_TRIGGERED); + } + + void SpellHit(Unit* pCaster, const SpellEntry* pSpell) + { + // Remove fake death + if (pSpell->Id == SPELL_RESURRECTION && pCaster->GetEntry() == NPC_KAELTHAS) + { + m_creature->SetStandState(UNIT_STAND_STATE_STAND); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_NON_ATTACKABLE); + m_creature->GetMotionMaster()->Clear(); + if (m_creature->GetEntry() == NPC_CAPERNIAN) + DoStartMovement(m_creature->getVictim(), 20.0f); + else + DoStartMovement(m_creature->getVictim()); + m_bCanFakeDeath = false; + m_bFakeDeath = false; + } + } +}; + +/*###### +## boss_thaladred_the_darkener +######*/ + +struct MANGOS_DLL_DECL boss_thaladred_the_darkenerAI : public advisor_base_ai +{ + boss_thaladred_the_darkenerAI(Creature* pCreature) : advisor_base_ai(pCreature) { Reset(); } + + uint32 m_uiGazeTimer; + uint32 m_uiRendTimer; + uint32 m_uiSilenceTimer; + uint32 m_uiPsychicBlowTimer; + + void Reset() + { + m_uiGazeTimer = 0; + m_uiRendTimer = urand(4000, 8000); + m_uiSilenceTimer = 5000; + m_uiPsychicBlowTimer = 25000; + + advisor_base_ai::Reset(); + } + + void Aggro(Unit* pWho) + { DoScriptText(SAY_THALADRED_AGGRO, m_creature); - m_creature->AddThreat(pWho, 5000000.0f); + m_creature->TauntApply(pWho); } - void UpdateAI(const uint32 uiDiff) + void JustDied(Unit* pKiller) { - advisorbase_ai::UpdateAI(uiDiff); + DoScriptText(SAY_THALADRED_DEATH, m_creature); + } - //Faking death, don't do anything - if (m_bFakeDeath) + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - //Return since we have no target - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + // Don't use abilities during fake death + if (m_bFakeDeath) return; - //m_uiGaze_Timer - if (m_uiGaze_Timer < uiDiff) + if (m_uiGazeTimer < uiDiff) { if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) { DoResetThreat(); - m_creature->AddThreat(pTarget, 5000000.0f); + m_creature->TauntApply(pTarget); DoScriptText(EMOTE_THALADRED_GAZE, m_creature, pTarget); } - m_uiGaze_Timer = 8500; + m_uiGazeTimer = 10000; } else - m_uiGaze_Timer -= uiDiff; + m_uiGazeTimer -= uiDiff; - //m_uiSilence_Timer - if (m_uiSilence_Timer < uiDiff) + if (m_uiRendTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_SILENCE); - m_uiSilence_Timer = 20000; + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_REND) == CAST_OK) + m_uiRendTimer = urand(7000, 12000); } else - m_uiSilence_Timer -= uiDiff; + m_uiRendTimer -= uiDiff; - //m_uiPsychicBlow_Timer - if (m_uiPsychicBlow_Timer < uiDiff) + if (m_uiSilenceTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_PSYCHIC_BLOW); - m_uiPsychicBlow_Timer = urand(20000, 25000); + if (DoCastSpellIfCan(m_creature, SPELL_SILENCE) == CAST_OK) + m_uiSilenceTimer = urand(7000, 13000); } else - m_uiPsychicBlow_Timer -= uiDiff; + m_uiSilenceTimer -= uiDiff; + + if (m_uiPsychicBlowTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_PSYCHIC_BLOW) == CAST_OK) + m_uiPsychicBlowTimer = urand(20000, 25000); + } + else + m_uiPsychicBlowTimer -= uiDiff; DoMeleeAttackIfReady(); } }; -//Lord Sanguinar AI -struct MANGOS_DLL_DECL boss_lord_sanguinarAI : public advisorbase_ai +/*###### +## boss_lord_sanguinar +######*/ + +struct MANGOS_DLL_DECL boss_lord_sanguinarAI : public advisor_base_ai { - boss_lord_sanguinarAI(Creature* pCreature) : advisorbase_ai(pCreature) - { - m_iAdvisor_Speech = SAY_SANGUINAR_DEATH; - } + boss_lord_sanguinarAI(Creature* pCreature) : advisor_base_ai(pCreature) { Reset(); } - uint32 m_uiFear_Timer; + uint32 m_uiFearTimer; void Reset() { - m_uiFear_Timer = 20000; - advisorbase_ai::Reset(); + m_uiFearTimer = 10000; + + advisor_base_ai::Reset(); } void Aggro(Unit* pWho) { - if (m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE)) - return; - - if (!pWho || m_bFakeDeath) - return; - DoScriptText(SAY_SANGUINAR_AGGRO, m_creature); } - void UpdateAI(const uint32 uiDiff) + void JustDied(Unit* pKiller) { - advisorbase_ai::UpdateAI(uiDiff); + DoScriptText(SAY_SANGUINAR_DEATH, m_creature); + } - //Faking death, don't do anything - if (m_bFakeDeath) + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - //Return since we have no target - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + // Don't use abilities during fake death + if (m_bFakeDeath) return; - //m_uiFear_Timer - if (m_uiFear_Timer < uiDiff) + if (m_uiFearTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_BELLOWING_ROAR); - m_uiFear_Timer = urand(25000, 35000); //approximately every 30 seconds + if (DoCastSpellIfCan(m_creature, SPELL_BELLOWING_ROAR) == CAST_OK) + m_uiFearTimer = 30000; } else - m_uiFear_Timer -= uiDiff; + m_uiFearTimer -= uiDiff; DoMeleeAttackIfReady(); } }; -//Grand Astromancer Capernian AI -struct MANGOS_DLL_DECL boss_grand_astromancer_capernianAI : public advisorbase_ai +/*###### +## boss_grand_astromancer_capernian +######*/ + +struct MANGOS_DLL_DECL boss_grand_astromancer_capernianAI : public advisor_base_ai { - boss_grand_astromancer_capernianAI(Creature* pCreature) : advisorbase_ai(pCreature) - { - m_iAdvisor_Speech = SAY_CAPERNIAN_DEATH; - } + boss_grand_astromancer_capernianAI(Creature* pCreature) : advisor_base_ai(pCreature) { Reset(); } - uint32 m_uiFireball_Timer; - uint32 m_uiConflagration_Timer; - uint32 m_uiArcaneExplosion_Timer; - uint32 m_uiYell_Timer; - bool m_bYell; + uint32 m_uiFireballTimer; + uint32 m_uiConflagrationTimer; + uint32 m_uiArcaneExplosionTimer; void Reset() { - m_uiFireball_Timer = 2000; - m_uiConflagration_Timer = 20000; - m_uiArcaneExplosion_Timer = 5000; - m_uiYell_Timer = 2000; - m_bYell = false; + m_uiFireballTimer = 2000; + m_uiConflagrationTimer = 20000; + m_uiArcaneExplosionTimer = 5000; - advisorbase_ai::Reset(); + advisor_base_ai::Reset(); } void AttackStart(Unit* pWho) { - if (!pWho || m_bFakeDeath || m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE)) - return; - if (m_creature->Attack(pWho, true)) { m_creature->AddThreat(pWho); m_creature->SetInCombatWith(pWho); pWho->SetInCombatWith(m_creature); - m_creature->GetMotionMaster()->MoveChase(pWho, CAPERNIAN_DISTANCE); + m_creature->GetMotionMaster()->MoveChase(pWho, 20.0f); } } - void Aggro(Unit *pWho) + void Aggro(Unit* pWho) { - if (m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE)) - return; + DoScriptText(SAY_CAPERNIAN_AGGRO, m_creature); + } - if (!pWho || m_bFakeDeath) - return; + void JustDied(Unit* pKiller) + { + DoScriptText(SAY_CAPERNIAN_DEATH, m_creature); } void UpdateAI(const uint32 uiDiff) { - advisorbase_ai::UpdateAI(uiDiff); - - //Faking Death, don't do anything - if (m_bFakeDeath) - return; - - //Return since we have no target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - //m_uiYell_Timer - if (!m_bYell) - { - if (m_uiYell_Timer < uiDiff) - { - DoScriptText(SAY_CAPERNIAN_AGGRO, m_creature); - m_bYell = true; - } - else - m_uiYell_Timer -= uiDiff; - } + // Don't use abilities during fake death + if (m_bFakeDeath) + return; - //m_uiFireball_Timer - if (m_uiFireball_Timer < uiDiff) + if (m_uiFireballTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_CAPERNIAN_FIREBALL); - m_uiFireball_Timer = 4000; + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_CAPERNIAN_FIREBALL) == CAST_OK) + m_uiFireballTimer = 4000; } else - m_uiFireball_Timer -= uiDiff; + m_uiFireballTimer -= uiDiff; - //m_uiConflagration_Timer - if (m_uiConflagration_Timer < uiDiff) + if (m_uiConflagrationTimer < uiDiff) { Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0); @@ -1254,111 +1000,107 @@ struct MANGOS_DLL_DECL boss_grand_astromancer_capernianAI : public advisorbase_a else DoCastSpellIfCan(m_creature->getVictim(), SPELL_CONFLAGRATION); - m_uiConflagration_Timer = urand(10000, 15000); + m_uiConflagrationTimer = urand(10000, 15000); } else - m_uiConflagration_Timer -= uiDiff; + m_uiConflagrationTimer -= uiDiff; - //m_uiArcaneExplosion_Timer - if (m_uiArcaneExplosion_Timer < uiDiff) + if (m_uiArcaneExplosionTimer < uiDiff) { - // if enemy is in melee range - if (m_creature->SelectAttackingTarget(ATTACKING_TARGET_TOPAGGRO, 0, uint32(0), SELECT_FLAG_IN_MELEE_RANGE)) - DoCastSpellIfCan(m_creature, SPELL_ARCANE_EXPLOSION); - - m_uiArcaneExplosion_Timer = urand(4000, 6000); + if (m_creature->SelectAttackingTarget(ATTACKING_TARGET_TOPAGGRO, 0, SPELL_ARCANE_BURST, SELECT_FLAG_IN_MELEE_RANGE)) + { + if (DoCastSpellIfCan(m_creature, SPELL_ARCANE_BURST) == CAST_OK) + m_uiArcaneExplosionTimer = urand(4000, 6000); + } } else - m_uiArcaneExplosion_Timer -= uiDiff; + m_uiArcaneExplosionTimer -= uiDiff; //Do NOT deal any melee damage. } }; -//Master Engineer Telonicus AI -struct MANGOS_DLL_DECL boss_master_engineer_telonicusAI : public advisorbase_ai +/*###### +## boss_master_engineer_telonicus +######*/ + +struct MANGOS_DLL_DECL boss_master_engineer_telonicusAI : public advisor_base_ai { - boss_master_engineer_telonicusAI(Creature* pCreature) : advisorbase_ai(pCreature) - { - m_iAdvisor_Speech = SAY_TELONICUS_DEATH; - } + boss_master_engineer_telonicusAI(Creature* pCreature) : advisor_base_ai(pCreature) { Reset(); } - uint32 m_uiBomb_Timer; - uint32 m_uiRemoteToy_Timer; + uint32 m_uiBombTimer; + uint32 m_uiRemoteToyTimer; void Reset() { - m_uiBomb_Timer = 10000; - m_uiRemoteToy_Timer = 5000; + m_uiBombTimer = 10000; + m_uiRemoteToyTimer = 5000; - advisorbase_ai::Reset(); + advisor_base_ai::Reset(); } void Aggro(Unit *pWho) { - if (m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE)) - return; - - if (!pWho || m_bFakeDeath) - return; - DoScriptText(SAY_TELONICUS_AGGRO, m_creature); } - void UpdateAI(const uint32 uiDiff) + void JustDied(Unit* pKiller) { - advisorbase_ai::UpdateAI(uiDiff); + DoScriptText(SAY_TELONICUS_DEATH, m_creature); + } - //Faking Death, do nothing - if (m_bFakeDeath) + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - //Return since we have no target - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + // Don't use abilities during fake death + if (m_bFakeDeath) return; - //m_uiBomb_Timer - if (m_uiBomb_Timer < uiDiff) + if (m_uiBombTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_BOMB); - m_uiBomb_Timer = 25000; + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_BOMB) == CAST_OK) + m_uiBombTimer = 25000; } else - m_uiBomb_Timer -= uiDiff; + m_uiBombTimer -= uiDiff; - //m_uiRemoteToy_Timer - if (m_uiRemoteToy_Timer < uiDiff) + if (m_uiRemoteToyTimer < uiDiff) { if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) - DoCastSpellIfCan(pTarget, SPELL_REMOTE_TOY); - - m_uiRemoteToy_Timer = urand(10000, 15000); + { + if (DoCastSpellIfCan(pTarget, SPELL_REMOTE_TOY) == CAST_OK) + m_uiRemoteToyTimer = urand(10000, 15000); + } } else - m_uiRemoteToy_Timer -= uiDiff; + m_uiRemoteToyTimer -= uiDiff; DoMeleeAttackIfReady(); } }; -//Phoenix AI +/*###### +## mob_phoenix_tk +######*/ + struct MANGOS_DLL_DECL mob_phoenix_tkAI : public ScriptedAI { mob_phoenix_tkAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} - uint32 m_uiCycle_Timer; + uint32 m_uiCycleTimer; void Reset() { - m_uiCycle_Timer = 2000; - m_creature->CastSpell(m_creature,SPELL_BURN,true); + m_uiCycleTimer = 2000; + DoCastSpellIfCan(m_creature, SPELL_BURN); } void JustDied(Unit* pKiller) { - //is this spell in use anylonger? - //m_creature->CastSpell(m_creature,SPELL_EMBER_BLAST,true); - m_creature->SummonCreature(NPC_PHOENIX_EGG,m_creature->GetPositionX(),m_creature->GetPositionY(),m_creature->GetPositionZ(),m_creature->GetOrientation(),TEMPSUMMON_TIMED_DESPAWN,16000); + DoCastSpellIfCan(m_creature, SPELL_EMBER_BLAST, CAST_TRIGGERED); + m_creature->SummonCreature(NPC_PHOENIX_EGG, 0, 0, 0, 0, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 16000); } void UpdateAI(const uint32 uiDiff) @@ -1366,67 +1108,61 @@ struct MANGOS_DLL_DECL mob_phoenix_tkAI : public ScriptedAI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - if (m_uiCycle_Timer < uiDiff) + // ToDo: research if this is correct and how can this be done by spell + if (m_uiCycleTimer < uiDiff) { //spell Burn should possible do this, but it doesn't, so do this for now. - uint32 uiDmg = urand(4500,5500); + uint32 uiDmg = urand(4500, 5500); if (m_creature->GetHealth() > uiDmg) - m_creature->SetHealth(uint32(m_creature->GetHealth()-uiDmg)); + m_creature->SetHealth(uint32(m_creature->GetHealth() - uiDmg)); - m_uiCycle_Timer = 2000; + m_uiCycleTimer = 2000; } else - m_uiCycle_Timer -= uiDiff; + m_uiCycleTimer -= uiDiff; DoMeleeAttackIfReady(); } }; -//Phoenix Egg AI -struct MANGOS_DLL_DECL mob_phoenix_egg_tkAI : public ScriptedAI +/*###### +## mob_phoenix_egg_tk +######*/ + +struct MANGOS_DLL_DECL mob_phoenix_egg_tkAI : public Scripted_NoMovementAI { - mob_phoenix_egg_tkAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + mob_phoenix_egg_tkAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { Reset(); } - uint32 m_uiRebirth_Timer; + uint32 m_uiRebirthTimer; void Reset() { - m_uiRebirth_Timer = 15000; + m_uiRebirthTimer = 15000; } - //ignore any - void MoveInLineOfSight(Unit* pWho) { return; } - - void AttackStart(Unit* pWho) - { - if (m_creature->Attack(pWho, false)) - { - m_creature->SetInCombatWith(pWho); - pWho->SetInCombatWith(m_creature); - - DoStartNoMovement(pWho); - } - } + void MoveInLineOfSight(Unit* pWho) { } + void AttackStart(Unit* pWho) { } void JustSummoned(Creature* pSummoned) { - pSummoned->AddThreat(m_creature->getVictim()); - pSummoned->CastSpell(pSummoned,SPELL_REBIRTH,false); + pSummoned->CastSpell(pSummoned, SPELL_REBIRTH, true); + pSummoned->SetInCombatWithZone(); } void UpdateAI(const uint32 uiDiff) { - if (!m_uiRebirth_Timer) - return; - - if (m_uiRebirth_Timer <= uiDiff) + if (m_uiRebirthTimer) { - m_creature->SummonCreature(NPC_PHOENIX,m_creature->GetPositionX(),m_creature->GetPositionY(),m_creature->GetPositionZ(),m_creature->GetOrientation(),TEMPSUMMON_CORPSE_DESPAWN,5000); - m_uiRebirth_Timer = 0; + if (m_uiRebirthTimer <= uiDiff) + { + // Summon a new Phoenix before despawn + m_creature->SummonCreature(NPC_PHOENIX, 0, 0, 0, 0,TEMPSUMMON_DEAD_DESPAWN, 0); + m_uiRebirthTimer = 0; + } + else + m_uiRebirthTimer -= uiDiff; } - else - m_uiRebirth_Timer -= uiDiff; } }; @@ -1472,6 +1208,7 @@ void AddSC_boss_kaelthas() pNewScript = new Script; pNewScript->Name = "boss_kaelthas"; pNewScript->GetAI = &GetAI_boss_kaelthas; + pNewScript->pEffectDummyNPC = &EffectDummyCreature_kael_phase_2; pNewScript->RegisterSelf(); pNewScript = new Script; diff --git a/scripts/outland/tempest_keep/the_eye/instance_the_eye.cpp b/scripts/outland/tempest_keep/the_eye/instance_the_eye.cpp index 97995da26..395700276 100644 --- a/scripts/outland/tempest_keep/the_eye/instance_the_eye.cpp +++ b/scripts/outland/tempest_keep/the_eye/instance_the_eye.cpp @@ -43,9 +43,6 @@ bool instance_the_eye::IsEncounterInProgress() const return true; } - if (PHASE_1_ADVISOR <= m_uiKaelthasEventPhase && m_uiKaelthasEventPhase <= PHASE_5_GRAVITY) - return true; - return false; } @@ -63,6 +60,20 @@ void instance_the_eye::OnCreatureCreate(Creature* pCreature) } } +void instance_the_eye::OnObjectCreate(GameObject* pGo) +{ + switch(pGo->GetEntry()) + { + case GO_ARCANE_DOOR_HORIZ_3: + case GO_ARCANE_DOOR_HORIZ_4: + case GO_KAEL_STATUE_LEFT: + case GO_KAEL_STATUE_RIGHT: + case GO_BRIDGE_WINDOW: + m_mGoEntryGuidStore[pGo->GetEntry()] = pGo->GetObjectGuid(); + break; + } +} + void instance_the_eye::SetData(uint32 uiType, uint32 uiData) { switch (uiType) @@ -72,27 +83,44 @@ void instance_the_eye::SetData(uint32 uiType, uint32 uiData) case TYPE_VOIDREAVER: m_auiEncounter[uiType] = uiData; break; + case TYPE_KAELTHAS: + // Don't set the same data twice + if (m_auiEncounter[uiType] == uiData) + break; + DoUseDoorOrButton(GO_ARCANE_DOOR_HORIZ_3); + DoUseDoorOrButton(GO_ARCANE_DOOR_HORIZ_4); + if (uiData == FAIL) + { + if (GameObject* pGo = GetSingleGameObjectFromStorage(GO_KAEL_STATUE_LEFT)) + pGo->ResetDoorOrButton(); + if (GameObject* pGo = GetSingleGameObjectFromStorage(GO_KAEL_STATUE_RIGHT)) + pGo->ResetDoorOrButton(); + if (GameObject* pGo = GetSingleGameObjectFromStorage(GO_BRIDGE_WINDOW)) + pGo->ResetDoorOrButton(); - case TYPE_KAELTHAS_PHASE: - m_uiKaelthasEventPhase = uiData; + // Respawn or reset the advisors + for (uint8 i = 0; i < MAX_ADVISORS; ++i) + { + if (Creature* pTemp = GetSingleCreatureFromStorage(aAdvisors[i])) + { + if (!pTemp->isAlive()) + pTemp->Respawn(); + else + pTemp->AI()->EnterEvadeMode(); + } + } + } + m_auiEncounter[uiType] = uiData; break; } } uint32 instance_the_eye::GetData(uint32 uiType) { - switch(uiType) - { - case TYPE_ALAR: - case TYPE_SOLARIAN: - case TYPE_VOIDREAVER: - return m_auiEncounter[uiType]; - case TYPE_KAELTHAS_PHASE: - return m_uiKaelthasEventPhase; + if (uiType < MAX_ENCOUNTER) + return m_auiEncounter[uiType]; - default: - return 0; - } + return 0; } InstanceData* GetInstanceData_instance_the_eye(Map* pMap) diff --git a/scripts/outland/tempest_keep/the_eye/the_eye.h b/scripts/outland/tempest_keep/the_eye/the_eye.h index 4ec424936..849adbb99 100644 --- a/scripts/outland/tempest_keep/the_eye/the_eye.h +++ b/scripts/outland/tempest_keep/the_eye/the_eye.h @@ -7,13 +7,13 @@ enum { - MAX_ENCOUNTER = 3, + MAX_ENCOUNTER = 4, + MAX_ADVISORS = 4, TYPE_ALAR = 0, TYPE_SOLARIAN = 1, TYPE_VOIDREAVER = 2, - - TYPE_KAELTHAS_PHASE = 3, // not regular encounter, contains phase instead + TYPE_KAELTHAS = 3, //NPC_ASTROMANCER = 18805, NPC_KAELTHAS = 19622, @@ -22,19 +22,20 @@ enum NPC_SANGUINAR = 20060, NPC_TELONICUS = 20063, NPC_THALADRED = 20064, -}; -enum KaelPhases -{ - PHASE_0_NOT_BEGUN = 0, - PHASE_1_ADVISOR = 1, - PHASE_2_WEAPON = 2, - PHASE_3_ADVISOR_ALL = 3, - PHASE_4_SOLO = 4, - PHASE_5_GRAVITY = 5, - PHASE_6_COMPLETE = 6, + GO_ARCANE_DOOR_HORIZ_3 = 184325, // combat doors for Kael + GO_ARCANE_DOOR_HORIZ_4 = 184324, + //GO_RAID_DOOR_4 = 184329, // encounter doors - no longer used since 2.4.0 + //GO_RAID_DOOR_3 = 184327, + //GO_ARCANE_DOOR_VERT_3 = 184326, + //GO_ARCANE_DOOR_VERT_4 = 184328, + GO_KAEL_STATUE_LEFT = 184597, // cosmetic objects for Kael encounter + GO_KAEL_STATUE_RIGHT = 184596, + GO_BRIDGE_WINDOW = 184069, }; +static const uint32 aAdvisors[MAX_ADVISORS] = {NPC_CAPERNIAN, NPC_SANGUINAR, NPC_TELONICUS, NPC_THALADRED}; + class MANGOS_DLL_DECL instance_the_eye : public ScriptedInstance { public: @@ -44,6 +45,7 @@ class MANGOS_DLL_DECL instance_the_eye : public ScriptedInstance bool IsEncounterInProgress() const; void OnCreatureCreate(Creature* pCreature); + void OnObjectCreate(GameObject* pGo); void SetData(uint32 uiType, uint32 uiData); uint32 GetData(uint32 uiType); diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index db5bfda8e..ffa7473e9 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2618" + #define SD2_REVISION_NR "2619" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 535d06f5a..6445292a3 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -2111,7 +2111,9 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1550041,'This is not over!',11118,1,0,0,'capernian SAY_CAPERNIAN_DEATH'), (-1550042,'Anar\'alah belore!',11157,1,0,0,'telonicus SAY_TELONICUS_AGGRO'), -(-1550043,'More perils... await',11158,1,0,0,'telonicus SAY_TELONICUS_DEATH'); +(-1550043,'More perils... await',11158,1,0,0,'telonicus SAY_TELONICUS_DEATH'), + +(-1550044,'%s begins to cast Pyroblast!',0,3,0,0,'kaelthas EMOTE_PYROBLAST'); -- -1 552 000 THE ARCATRAZ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES diff --git a/sql/updates/r2619_scriptdev2.sql b/sql/updates/r2619_scriptdev2.sql new file mode 100644 index 000000000..a48f87a80 --- /dev/null +++ b/sql/updates/r2619_scriptdev2.sql @@ -0,0 +1,3 @@ +DELETE FROM script_texts WHERE entry IN (-1550044); +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1550044,'%s begins to cast Pyroblast!',0,3,0,0,'kaelthas EMOTE_PYROBLAST'); From f49dcdffad7f4c6a1dff4cff0f398dbc80797509 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sun, 8 Jul 2012 16:34:16 +0300 Subject: [PATCH 0608/1172] [2620] Cleanup and improve script for Kael'thas - Magister's Terrace * this will fix the Gravity Lapse event * added intro and outro dialogue * fix Phoenix behavior - allow him to fake death, then use rebirth, in order to have the proper spell effects and animations - this also applies for the script version from The Eye * add some various small fixes Known issues: * spells 44251 and 44233 require targeting fix * Gravity Lapse spells require aura stacking exception --- .../boss_felblood_kaelthas.cpp | 650 ++++++++++-------- .../instance_magisters_terrace.cpp | 6 +- .../magisters_terrace/magisters_terrace.h | 9 +- .../sunwell_plateau/boss_brutallus.cpp | 2 +- .../boss_blood_queen_lanathel.cpp | 2 +- .../tempest_keep/the_eye/boss_kaelthas.cpp | 139 +++- sd2_revision_nr.h | 2 +- sql/scriptdev2_script_full.sql | 5 +- sql/updates/r2620_scriptdev2.sql | 4 + 9 files changed, 469 insertions(+), 350 deletions(-) create mode 100644 sql/updates/r2620_scriptdev2.sql diff --git a/scripts/eastern_kingdoms/magisters_terrace/boss_felblood_kaelthas.cpp b/scripts/eastern_kingdoms/magisters_terrace/boss_felblood_kaelthas.cpp index 397e4fb13..7d711e5dc 100644 --- a/scripts/eastern_kingdoms/magisters_terrace/boss_felblood_kaelthas.cpp +++ b/scripts/eastern_kingdoms/magisters_terrace/boss_felblood_kaelthas.cpp @@ -16,18 +16,18 @@ /* ScriptData SDName: Boss_Felblood_Kaelthas -SD%Complete: 80 -SDComment: Normal and Heroic Support. Issues: Arcane Spheres do not initially follow targets. +SD%Complete: 90 +SDComment: Minor adjustments required; Timers. SDCategory: Magisters' Terrace EndScriptData */ #include "precompiled.h" #include "magisters_terrace.h" -#include "WorldPacket.h" enum { - SAY_AGGRO = -1585023, // This yell should be done when the room is cleared. For now, set it as a movelineofsight yell. + SAY_INTRO_1 = -1585023, // This yell should be done when the room is cleared. For now, set it as a movelineofsight yell. + SAY_INTRO_2 = -1585030, SAY_PHOENIX = -1585024, SAY_FLAMESTRIKE = -1585025, SAY_GRAVITY_LAPSE = -1585026, @@ -38,38 +38,66 @@ enum // Phase 1 spells SPELL_FIREBALL = 44189, // Deals 2700-3300 damage at current target SPELL_FIREBALL_H = 46164, // 4950-6050 - SPELL_PHOENIX = 44194, // Summons a phoenix - SPELL_PHOENIX_BURN = 44197, // A spell Phoenix uses to damage everything around - SPELL_REBIRTH_DMG = 44196, // DMG if a Phoenix rebirth happen - - SPELL_FLAME_STRIKE_DUMMY = 44191, // Flamestrike indicator before the damage SPELL_FLAME_STRIKE = 44192, // Summons the trigger + animation (projectile) - SPELL_SHOCK_BARRIER = 46165, // Heroic only; 10k damage shield, followed by Pyroblast SPELL_PYROBLAST = 36819, // Heroic only; 45-55k fire damage // Phase 2 spells - SPELL_GRAVITY_LAPSE_INITIAL = 44224, // Cast at the beginning of every Gravity Lapse - SPELL_GRAVITY_LAPSE_CHANNEL = 44251, // Channeled; blue beam animation to every enemy in range - SPELL_TELEPORT_CENTER = 44218, // Should teleport people to the center. Requires DB entry in spell_target_position. - SPELL_GRAVITY_LAPSE_FLY = 44227, // Hastens flyspeed and allows flying for 1 minute. For some reason removes 44226. + SPELL_GRAVITY_LAPSE = 44224, // Cast at the beginning of every Gravity Lapse + SPELL_GRAVITY_LAPSE_VISUAL = 44251, // Channeled; blue beam animation to every enemy in range - when removed the Gravity Lapse auras are removed from players + SPELL_TELEPORT_CENTER = 44218, // Teleport the boss in the center. Requires DB entry in spell_target_position. + SPELL_GRAVITY_LAPSE_FLY = 44227, // Hastens flyspeed and allows flying for 1 minute. Requires aura stacking exception for 44226. SPELL_GRAVITY_LAPSE_DOT = 44226, // Knocks up in the air and applies a 300 DPS DoT. - SPELL_ARCANE_SPHERE_PASSIVE = 44263, // Passive auras on Arcane Spheres + SPELL_ARCANE_SPHERE_SUMMON = 44265, // Summons 1 arcane sphere SPELL_POWER_FEEDBACK = 44233, // Stuns him, making him take 50% more damage for 10 seconds. Cast after Gravity Lapse + // Summoned spells + SPELL_ARCANE_SPHERE_PASSIVE = 44263, // Passive auras on Arcane Spheres + SPELL_FLAME_STRIKE_DUMMY = 44191, // Flamestrike indicator before the damage + SPELL_EMBER_BLAST = 44199, // On Phoenix death + SPELL_PHOENIX_BURN = 44197, // A spell Phoenix uses to damage everything around + SPELL_REBIRTH_DMG = 44196, // DMG if a Phoenix rebirth happen + + // Summoned creatures NPC_FLAME_STRIKE_TRIGGER = 24666, NPC_PHOENIX = 24674, NPC_PHOENIX_EGG = 24675, NPC_ARCANE_SPHERE = 24708, + + MAX_ARCANE_SPHERES = 3, }; -struct MANGOS_DLL_DECL boss_felblood_kaelthasAI : public ScriptedAI +static const DialogueEntry aIntroDialogue[] = { - boss_felblood_kaelthasAI(Creature* pCreature) : ScriptedAI(pCreature) + {SAY_INTRO_1, NPC_KAELTHAS, 16000}, + {EMOTE_ONESHOT_LAUGH, 0, 2000}, + {EMOTE_STATE_TALK, 0, 2000}, + {SAY_INTRO_2, NPC_KAELTHAS, 16000}, + {NPC_PHOENIX, 0, 0}, + {SAY_DEATH, NPC_KAELTHAS, 4000}, + {EMOTE_ONESHOT_POINT, 0, 5000}, + {EMOTE_ONESHOT_ROAR, 0, 3000}, + {NPC_PHOENIX_EGG, 0, 0}, + {0, 0, 0}, +}; + +// Spells used to teleport players for Gravity Lapse +static const uint32 aGravityLapseSpells[] = {44219, 44220, 44221, 44222, 44223}; + +/*###### +## boss_felblood_kaelthas +######*/ + +struct MANGOS_DLL_DECL boss_felblood_kaelthasAI : public ScriptedAI, private DialogueHelper +{ + boss_felblood_kaelthasAI(Creature* pCreature) : ScriptedAI(pCreature), + DialogueHelper(aIntroDialogue) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); + InitializeDialogueHelper(m_pInstance); + m_bHasTaunted = false; Reset(); } @@ -79,60 +107,44 @@ struct MANGOS_DLL_DECL boss_felblood_kaelthasAI : public ScriptedAI uint32 m_uiFireballTimer; uint32 m_uiPhoenixTimer; uint32 m_uiFlameStrikeTimer; - uint32 m_uiCombatPulseTimer; // Heroic only + uint32 m_uiShockBarrierTimer; uint32 m_uiPyroblastTimer; uint32 m_uiGravityLapseTimer; - uint32 m_uiGravityLapsePhase; - // 0 = No Gravity Lapse - // 1 = Casting Gravity Lapse visual - // 2 = Teleported people to self - // 3 = Knocked people up in the air - // 4 = Applied an aura that allows them to fly, channeling visual, relased Arcane Orbs. + uint32 m_uiGravityLapseStage; + uint8 m_uiGravityIndex; + bool m_bIsFirstPhase; bool m_bFirstGravityLapse; bool m_bHasTaunted; - uint8 m_uiPhase; - // 0 = Not started - // 1 = Fireball; Summon Phoenix; Flamestrike - // 2 = Gravity Lapses - void Reset() { - // TODO: Timers - m_uiFireballTimer = 0; - m_uiPhoenixTimer = 10000; - m_uiFlameStrikeTimer = 25000; - m_uiCombatPulseTimer = 0; + m_uiFireballTimer = 0; + m_uiPhoenixTimer = 10000; + m_uiFlameStrikeTimer = 25000; - m_uiPyroblastTimer = 60000; + m_uiPyroblastTimer = 0; + m_uiShockBarrierTimer = 60000; - m_uiGravityLapseTimer = 0; - m_uiGravityLapsePhase = 0; + m_uiGravityLapseTimer = 1000; + m_uiGravityLapseStage = 0; + m_uiGravityIndex = 0; - m_bFirstGravityLapse = true; - m_bHasTaunted = false; + m_bFirstGravityLapse = true; + m_bIsFirstPhase = true; - m_uiPhase = 0; + SetCombatMovement(true); } void JustDied(Unit* pKiller) { - DoScriptText(SAY_DEATH, m_creature); - if (m_pInstance) m_pInstance->SetData(TYPE_KAELTHAS, DONE); } - void DamageTaken(Unit* pDealer, uint32& uiDamage) - { - if (uiDamage > m_creature->GetHealth()) - RemoveGravityLapse(); // Remove Gravity Lapse so that players fall to ground if they kill him when in air. - } - void Aggro(Unit* pWho) { if (m_pInstance) @@ -145,102 +157,130 @@ struct MANGOS_DLL_DECL boss_felblood_kaelthasAI : public ScriptedAI m_pInstance->SetData(TYPE_KAELTHAS, FAIL); } + // Boss has an interesting speech before killed, so we need to fake death (without stand state) and allow him to finish his theatre + void DamageTaken(Unit* pKiller, uint32& uiDamage) + { + if (uiDamage < m_creature->GetHealth()) + return; + + // Make sure it won't die by accident + if (m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE)) + { + uiDamage = 0; + return; + } + + uiDamage = 0; + RemoveGravityLapse(); + StartNextDialogueText(SAY_DEATH); + m_creature->HandleEmote(EMOTE_STATE_TALK); + + m_creature->InterruptNonMeleeSpells(true); + m_creature->SetHealth(1); + m_creature->StopMoving(); + m_creature->ClearComboPointHolders(); + m_creature->RemoveAllAurasOnDeath(); + m_creature->ModifyAuraState(AURA_STATE_HEALTHLESS_20_PERCENT, false); + m_creature->ModifyAuraState(AURA_STATE_HEALTHLESS_35_PERCENT, false); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + m_creature->ClearAllReactives(); + m_creature->GetMotionMaster()->Clear(); + m_creature->GetMotionMaster()->MoveIdle(); + } + void MoveInLineOfSight(Unit* pWho) { - if (!m_bHasTaunted && m_creature->IsWithinDistInMap(pWho, 40.0)) + if (!m_bHasTaunted && pWho->GetTypeId() == TYPEID_PLAYER && !((Player*)pWho)->isGameMaster() && + m_creature->IsWithinDistInMap(pWho, 40.0) && m_creature->IsWithinLOSInMap(pWho)) { - DoScriptText(SAY_AGGRO, m_creature); + StartNextDialogueText(SAY_INTRO_1); + m_creature->HandleEmote(EMOTE_STATE_TALK); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); m_bHasTaunted = true; } + // Allow him to finish intro + if (m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE)) + return; + ScriptedAI::MoveInLineOfSight(pWho); } - void JustSummoned(Creature* pSummoned) + void JustDidDialogueStep(int32 iEntry) { - switch (pSummoned->GetEntry()) + switch (iEntry) { - case NPC_FLAME_STRIKE_TRIGGER: - pSummoned->CastSpell(pSummoned, SPELL_FLAME_STRIKE_DUMMY, false, NULL, NULL, m_creature->GetObjectGuid()); + case EMOTE_ONESHOT_LAUGH: + m_creature->HandleEmote(EMOTE_ONESHOT_LAUGH); + break; + case EMOTE_STATE_TALK: + m_creature->HandleEmote(EMOTE_STATE_TALK); break; case NPC_PHOENIX: - // TODO ThreatList and Flag removal likely wrong - pSummoned->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE + UNIT_FLAG_NON_ATTACKABLE); - SetThreatList(pSummoned); - - if (m_creature->getVictim()) - pSummoned->AI()->AttackStart(m_creature->getVictim()); + m_creature->HandleEmote(EMOTE_STATE_NONE); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + break; + case EMOTE_ONESHOT_POINT: + m_creature->HandleEmote(EMOTE_ONESHOT_POINT); + break; + case EMOTE_ONESHOT_ROAR: + m_creature->HandleEmote(EMOTE_ONESHOT_ROAR); + break; + case NPC_PHOENIX_EGG: + m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); break; } } - void SetThreatList(Creature* SummonedUnit) - { - if (!SummonedUnit) - return; - - ThreatList const& tList = m_creature->getThreatManager().getThreatList(); - for (ThreatList::const_iterator i = tList.begin();i != tList.end(); ++i) - { - Unit* pUnit = m_creature->GetMap()->GetUnit((*i)->getUnitGuid()); - if (pUnit && pUnit->isAlive()) - { - float threat = m_creature->getThreatManager().getThreat(pUnit); - SummonedUnit->AddThreat(pUnit, threat); - } - } - } - - void TeleportPlayersToSelf() + void AttackStart(Unit* pWho) { - DoCastSpellIfCan(m_creature, SPELL_TELEPORT_CENTER, CAST_TRIGGERED); - - GuidVector vGuids; - m_creature->FillGuidsListFromThreatList(vGuids); - for (GuidVector::const_iterator i = vGuids.begin(); i != vGuids.end(); ++i) + if (m_creature->Attack(pWho, true)) { - Unit* pUnit = m_creature->GetMap()->GetUnit(*i); - - if (pUnit && pUnit->GetTypeId() == TYPEID_PLAYER) - pUnit->CastSpell(pUnit, SPELL_TELEPORT_CENTER, true); + m_creature->AddThreat(pWho); + m_creature->SetInCombatWith(pWho); + pWho->SetInCombatWith(m_creature); + DoStartMovement(pWho, 20.0f); } } - void CastGravityLapseKnockUp() + void JustSummoned(Creature* pSummoned) { - ThreatList const& tList = m_creature->getThreatManager().getThreatList(); - for (ThreatList::const_iterator i = tList.begin();i != tList.end(); ++i) + if (pSummoned->GetEntry() == NPC_FLAME_STRIKE_TRIGGER) + pSummoned->CastSpell(pSummoned, SPELL_FLAME_STRIKE_DUMMY, false, NULL, NULL, m_creature->GetObjectGuid()); + else { - Unit* pUnit = m_creature->GetMap()->GetUnit((*i)->getUnitGuid()); - - // Knockback into the air - if (pUnit && pUnit->GetTypeId() == TYPEID_PLAYER) - pUnit->CastSpell(pUnit, SPELL_GRAVITY_LAPSE_DOT, true, 0, 0, m_creature->GetObjectGuid()); + // Attack or follow target + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (pSummoned->GetEntry() == NPC_ARCANE_SPHERE) + pSummoned->GetMotionMaster()->MoveFollow(pTarget, 0, 0); + else + pSummoned->AI()->AttackStart(pTarget); + } } } - // players can't cast "fly" spells unless in map 530. Has to be done a while after they get knocked into the air... - void CastGravityLapseFly() + void SpellHitTarget(Unit* pTarget, const SpellEntry* pSpell) { - GuidVector vGuids; - m_creature->FillGuidsListFromThreatList(vGuids); - for (GuidVector::const_iterator i = vGuids.begin(); i != vGuids.end(); ++i) + // Handle Gravity Lapse on targets + if (pSpell->Id == SPELL_GRAVITY_LAPSE && pTarget->GetTypeId() == TYPEID_PLAYER) { - Unit* pUnit = m_creature->GetMap()->GetUnit(*i); - - // Also needs an exception in spell system. - if (pUnit && pUnit->GetTypeId() == TYPEID_PLAYER) - pUnit->CastSpell(pUnit, SPELL_GRAVITY_LAPSE_FLY, true, 0, 0, m_creature->GetObjectGuid()); + DoCastSpellIfCan(pTarget, aGravityLapseSpells[m_uiGravityIndex], CAST_TRIGGERED); + pTarget->CastSpell(pTarget, SPELL_GRAVITY_LAPSE_FLY, true, 0, 0, m_creature->GetObjectGuid()); + pTarget->CastSpell(pTarget, SPELL_GRAVITY_LAPSE_DOT, true, 0, 0, m_creature->GetObjectGuid()); + ++m_uiGravityIndex; } } + // Wrapper to remove Gravity Lapse - this should be removed on aura 44251 expires void RemoveGravityLapse() { GuidVector vGuids; m_creature->FillGuidsListFromThreatList(vGuids); - for (GuidVector::const_iterator i = vGuids.begin(); i != vGuids.end(); ++i) + + for (GuidVector::const_iterator itr = vGuids.begin(); itr != vGuids.end(); ++itr) { - Unit* pUnit = m_creature->GetMap()->GetUnit(*i); + Unit* pUnit = m_creature->GetMap()->GetUnit(*itr); if (pUnit && pUnit->GetTypeId() == TYPEID_PLAYER) { @@ -252,181 +292,178 @@ struct MANGOS_DLL_DECL boss_felblood_kaelthasAI : public ScriptedAI void UpdateAI(const uint32 uiDiff) { + DialogueUpdate(uiDiff); + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - switch (m_uiPhase) + // Don't use spells during the epilogue + if (m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE)) + return; + + if (m_bIsFirstPhase) { - case 0: + // *Heroic mode only: + if (!m_bIsRegularMode) { - // *Heroic mode only: - if (!m_bIsRegularMode) + if (m_uiShockBarrierTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_SHOCK_BARRIER) == CAST_OK) + { + m_uiPyroblastTimer = 1000; + m_uiShockBarrierTimer = 60000; + } + } + else + m_uiShockBarrierTimer -= uiDiff; + + if (m_uiPyroblastTimer) { - if (m_uiPyroblastTimer < uiDiff) + if (m_uiPyroblastTimer <= uiDiff) { - m_creature->InterruptSpell(CURRENT_CHANNELED_SPELL); - m_creature->InterruptSpell(CURRENT_GENERIC_SPELL); - DoCastSpellIfCan(m_creature, SPELL_SHOCK_BARRIER, CAST_TRIGGERED); - DoCastSpellIfCan(m_creature->getVictim(), SPELL_PYROBLAST); - m_uiPyroblastTimer = 60000; + if (DoCastSpellIfCan(m_creature, SPELL_PYROBLAST) == CAST_OK) + m_uiPyroblastTimer = 0; } else m_uiPyroblastTimer -= uiDiff; } + } - if (m_uiFireballTimer < uiDiff) + if (m_uiFireballTimer < uiDiff) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) { - if (DoCastSpellIfCan(m_creature->getVictim(), m_bIsRegularMode ? SPELL_FIREBALL : SPELL_FIREBALL_H) == CAST_OK) - m_uiFireballTimer = urand(2000, 6000); + if (DoCastSpellIfCan(pTarget, m_bIsRegularMode ? SPELL_FIREBALL : SPELL_FIREBALL_H) == CAST_OK) + m_uiFireballTimer = urand(2000, 4000); } - else - m_uiFireballTimer -= uiDiff; + } + else + m_uiFireballTimer -= uiDiff; - if (m_uiPhoenixTimer < uiDiff) + if (m_uiPhoenixTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_PHOENIX) == CAST_OK) { - if (DoCastSpellIfCan(m_creature, SPELL_PHOENIX) == CAST_OK) - { - DoScriptText(SAY_PHOENIX, m_creature); - m_uiPhoenixTimer = 60000; - } + DoScriptText(SAY_PHOENIX, m_creature); + m_uiPhoenixTimer = 45000; } - else - m_uiPhoenixTimer -= uiDiff; + } + else + m_uiPhoenixTimer -= uiDiff; - if (m_uiFlameStrikeTimer < uiDiff) + if (m_uiFlameStrikeTimer < uiDiff) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) { - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + if (DoCastSpellIfCan(pTarget, SPELL_FLAME_STRIKE) == CAST_OK) { - DoCastSpellIfCan(pTarget, SPELL_FLAME_STRIKE, CAST_INTERRUPT_PREVIOUS); DoScriptText(SAY_FLAMESTRIKE, m_creature); + m_uiFlameStrikeTimer = urand(15000, 25000); } - m_uiFlameStrikeTimer = urand(15000, 25000); } - else - m_uiFlameStrikeTimer -= uiDiff; + } + else + m_uiFlameStrikeTimer -= uiDiff; - // Below 50% - if (m_creature->GetHealthPercent() < 50.0f) + // Below 50% + if (m_creature->GetHealthPercent() < 50.0f) + { + if (DoCastSpellIfCan(m_creature, SPELL_TELEPORT_CENTER, CAST_INTERRUPT_PREVIOUS) == CAST_OK) { - m_creature->ApplySpellImmune(0, IMMUNITY_EFFECT, SPELL_EFFECT_INTERRUPT_CAST, true); - m_creature->StopMoving(); + SetCombatMovement(false); m_creature->GetMotionMaster()->Clear(); m_creature->GetMotionMaster()->MoveIdle(); - m_uiGravityLapseTimer = 0; - m_uiGravityLapsePhase = 0; - m_uiPhase = 1; - return; + m_bIsFirstPhase = false; } - - DoMeleeAttackIfReady(); - - break; } - case 1: + + DoMeleeAttackIfReady(); + } + else + { + if (m_uiGravityLapseTimer < uiDiff) { - if (m_uiGravityLapseTimer < uiDiff) + switch (m_uiGravityLapseStage) { - switch (m_uiGravityLapsePhase) - { - case 0: - if (m_bFirstGravityLapse) // Different yells at 50%, and at every following Gravity Lapse + case 0: + // Cast Gravity Lapse on Players + if (DoCastSpellIfCan(m_creature, SPELL_GRAVITY_LAPSE) == CAST_OK) + { + if (m_bFirstGravityLapse) { DoScriptText(SAY_GRAVITY_LAPSE, m_creature); m_bFirstGravityLapse = false; - - if (m_pInstance) - { - if (GameObject* pKaelLeft = m_pInstance->GetSingleGameObjectFromStorage(GO_KAEL_STATUE_LEFT)) - pKaelLeft->SetGoState(GO_STATE_ACTIVE); - - if (GameObject* pKaelRight = m_pInstance->GetSingleGameObjectFromStorage(GO_KAEL_STATUE_RIGHT)) - pKaelRight->SetGoState(GO_STATE_ACTIVE); - } } else - { DoScriptText(SAY_RECAST_GRAVITY, m_creature); - } - - DoCastSpellIfCan(m_creature, SPELL_GRAVITY_LAPSE_INITIAL); - m_uiGravityLapseTimer = 2000 + uiDiff;// Don't interrupt the visual spell - m_uiGravityLapsePhase = 1; - break; - - case 1: - TeleportPlayersToSelf(); - m_uiGravityLapseTimer = 1000; - m_uiGravityLapsePhase = 2; - break; - - case 2: - CastGravityLapseKnockUp(); - m_uiGravityLapseTimer = 1000; - m_uiGravityLapsePhase = 3; - break; - - case 3: - CastGravityLapseFly(); - m_uiGravityLapseTimer = 30000; - m_uiGravityLapsePhase = 4; - for(uint8 i = 0; i < 3; ++i) - { - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) - { - if (Creature* Orb = DoSpawnCreature(NPC_ARCANE_SPHERE, 5, 5, 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 30000)) - Orb->AI()->AttackStart(pTarget); - } - } + m_uiGravityLapseTimer = 2000; + m_uiGravityIndex = 0; + ++m_uiGravityLapseStage; + } + break; + case 1: + // Summon spheres and apply the Gravity Lapse visual - upon visual expire, the gravity lapse is removed + if (DoCastSpellIfCan(m_creature, SPELL_GRAVITY_LAPSE_VISUAL) == CAST_OK) + { + for (uint8 i = 0; i < MAX_ARCANE_SPHERES; ++i) + DoCastSpellIfCan(m_creature, SPELL_ARCANE_SPHERE_SUMMON, CAST_TRIGGERED); - DoCastSpellIfCan(m_creature, SPELL_GRAVITY_LAPSE_CHANNEL); - break; - - case 4: - m_creature->InterruptNonMeleeSpells(false); + m_uiGravityLapseTimer = 30000; + ++m_uiGravityLapseStage; + } + break; + case 2: + // Cast Power Feedback and stay stunned for 10 secs - also break the statues if they are not broken + if (DoCastSpellIfCan(m_creature, SPELL_POWER_FEEDBACK) == CAST_OK) + { DoScriptText(SAY_TIRED, m_creature); - DoCastSpellIfCan(m_creature, SPELL_POWER_FEEDBACK); RemoveGravityLapse(); m_uiGravityLapseTimer = 10000; - m_uiGravityLapsePhase = 0; - break; - } + m_uiGravityLapseStage = 0; + } + break; } - else - m_uiGravityLapseTimer -= uiDiff; - - break; } + else + m_uiGravityLapseTimer -= uiDiff; } } }; +/*###### +## mob_felkael_phoenix +######*/ + struct MANGOS_DLL_DECL mob_felkael_phoenixAI : public ScriptedAI { - mob_felkael_phoenixAI(Creature* pCreature) : ScriptedAI(pCreature) - { - m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - Reset(); - } + mob_felkael_phoenixAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } - ScriptedInstance* m_pInstance; uint32 m_uiBurnTimer; - uint32 m_uiDeathTimer; - bool m_bRebirth; + bool m_bFakeDeath; void Reset() { - m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_NON_ATTACKABLE); - m_creature->CastSpell(m_creature, SPELL_PHOENIX_BURN, true); - m_uiBurnTimer = 2000; - m_uiDeathTimer = 3000; - m_bRebirth = false; m_bFakeDeath = false; } + void Aggro(Unit* pWho) + { + DoCastSpellIfCan(m_creature, SPELL_PHOENIX_BURN); + } + + void EnterEvadeMode() + { + // Don't evade during ember blast + if (m_bFakeDeath) + return; + + ScriptedAI::EnterEvadeMode(); + } + void DamageTaken(Unit* pKiller, uint32& uiDamage) { if (uiDamage < m_creature->GetHealth()) @@ -437,69 +474,80 @@ struct MANGOS_DLL_DECL mob_felkael_phoenixAI : public ScriptedAI { uiDamage = 0; return; - } - // Don't really die in all phases of Kael'Thas - if (m_pInstance && m_pInstance->GetData(TYPE_KAELTHAS) == IN_PROGRESS) - { - // prevent death - uiDamage = 0; - m_bFakeDeath = true; - - m_creature->InterruptNonMeleeSpells(false); - m_creature->SetHealth(0); - m_creature->StopMoving(); - m_creature->ClearComboPointHolders(); - m_creature->RemoveAllAurasOnDeath(); - m_creature->ModifyAuraState(AURA_STATE_HEALTHLESS_20_PERCENT, false); - m_creature->ModifyAuraState(AURA_STATE_HEALTHLESS_35_PERCENT, false); - m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - m_creature->ClearAllReactives(); - m_creature->SetTargetGuid(ObjectGuid()); - m_creature->GetMotionMaster()->Clear(); - m_creature->GetMotionMaster()->MoveIdle(); - m_creature->SetStandState(UNIT_STAND_STATE_DEAD); - } + + // prevent death + uiDamage = 0; + DoSetFakeDeath(); } - void UpdateAI(const uint32 uiDiff) + void DoSetFakeDeath() { + m_bFakeDeath = true; + + m_creature->InterruptNonMeleeSpells(false); + m_creature->SetHealth(1); + m_creature->StopMoving(); + m_creature->ClearComboPointHolders(); + m_creature->RemoveAllAurasOnDeath(); + m_creature->ModifyAuraState(AURA_STATE_HEALTHLESS_20_PERCENT, false); + m_creature->ModifyAuraState(AURA_STATE_HEALTHLESS_35_PERCENT, false); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + m_creature->ClearAllReactives(); + m_creature->SetTargetGuid(ObjectGuid()); + m_creature->GetMotionMaster()->Clear(); + m_creature->GetMotionMaster()->MoveIdle(); + m_creature->SetStandState(UNIT_STAND_STATE_DEAD); + + // Spawn egg and make invisible + DoCastSpellIfCan(m_creature, SPELL_EMBER_BLAST, CAST_TRIGGERED); + m_creature->SummonCreature(NPC_PHOENIX_EGG, 0, 0, 0, 0, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 10000); + } - // If we are fake death, we cast rebirth and after that we kill the phoenix to spawn the egg. - if (m_bFakeDeath) + void SummonedCreatureDespawn(Creature* pSummoned) + { + m_creature->RemoveAurasDueToSpell(SPELL_EMBER_BLAST); + m_creature->SetStandState(UNIT_STAND_STATE_STAND); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + + // Remove fake death on egg despawn after 10 secs + if (DoCastSpellIfCan(m_creature, SPELL_REBIRTH_DMG) == CAST_OK) { - if (!m_bRebirth) - { - DoCastSpellIfCan(m_creature, SPELL_REBIRTH_DMG); - m_bRebirth = true; - } + m_creature->SetHealth(m_creature->GetMaxHealth()); + m_creature->GetMotionMaster()->Clear(); + DoStartMovement(m_creature->getVictim()); + m_bFakeDeath = false; - if (m_bRebirth) - { + DoCastSpellIfCan(m_creature, SPELL_PHOENIX_BURN, CAST_TRIGGERED); + } + } - if (m_uiDeathTimer < uiDiff) - { - m_creature->SummonCreature(NPC_PHOENIX_EGG, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 45000); - m_creature->SetDeathState(JUST_DIED); - m_creature->RemoveCorpse(); - m_bRebirth = false; - } - else - m_uiDeathTimer -= uiDiff; - } + void SummonedCreatureJustDied(Creature* pSummoned) + { + // Self kill if the egg is killed + if (m_bFakeDeath) + m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + } + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - } - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + if (m_bFakeDeath) return; + // ToDo: research if this is correct and how can this be done by spell if (m_uiBurnTimer < uiDiff) { //spell Burn should possible do this, but it doesn't, so do this for now. - uint32 dmg = urand(1650,2050); - m_creature->DealDamage(m_creature, dmg, 0, DOT, SPELL_SCHOOL_MASK_FIRE, NULL, false); - m_uiBurnTimer += 2000; + uint32 uiDmg = urand(1650, 2050); + if (uiDmg > m_creature->GetHealth()) + DoSetFakeDeath(); + else + m_creature->DealDamage(m_creature, uiDmg, 0, DOT, SPELL_SCHOOL_MASK_FIRE, NULL, false); + + m_uiBurnTimer = 2000; } else m_uiBurnTimer -= uiDiff; @@ -508,68 +556,70 @@ struct MANGOS_DLL_DECL mob_felkael_phoenixAI : public ScriptedAI } }; -struct MANGOS_DLL_DECL mob_felkael_phoenix_eggAI : public ScriptedAI -{ - mob_felkael_phoenix_eggAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} - - uint32 m_uiHatchTimer; +/*###### +## mob_felkael_phoenix_egg +######*/ - void Reset() - { - m_uiHatchTimer = 10000; - } +// TODO Remove this 'script' when combat movement can be proper prevented from core-side +struct MANGOS_DLL_DECL mob_felkael_phoenix_eggAI : public Scripted_NoMovementAI +{ + mob_felkael_phoenix_eggAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { Reset(); } + void Reset() {} void MoveInLineOfSight(Unit* pWho) {} void AttackStart(Unit* pWho) {} - - void UpdateAI(const uint32 uiDiff) - { - if (m_uiHatchTimer < uiDiff) - { - m_creature->SummonCreature(NPC_PHOENIX, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 60000); - m_creature->DealDamage(m_creature, m_creature->GetMaxHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); - } - else - m_uiHatchTimer -= uiDiff; - } + void UpdateAI(const uint32 uiDiff) {} }; +/*###### +## mob_arcane_sphere +######*/ + struct MANGOS_DLL_DECL mob_arcane_sphereAI : public ScriptedAI { - mob_arcane_sphereAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + mob_arcane_sphereAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; uint32 m_uiDespawnTimer; uint32 m_uiChangeTargetTimer; void Reset() { - m_uiDespawnTimer = 30000; + m_uiDespawnTimer = 30000; m_uiChangeTargetTimer = urand(6000, 12000); - m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - DoCastSpellIfCan(m_creature, SPELL_ARCANE_SPHERE_PASSIVE, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_ARCANE_SPHERE_PASSIVE); } + void AttackStart(Unit* pWho) { } + void MoveInLineOfSight(Unit* pWho) { } + void UpdateAI(const uint32 uiDiff) { + // Should despawn when aura 44251 expires if (m_uiDespawnTimer < uiDiff) { m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); - return; + m_uiDespawnTimer = 0; } else m_uiDespawnTimer -= uiDiff; - // Note: This check was reversed for some unknown reason, changed to usual behaviour! - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - if (m_uiChangeTargetTimer < uiDiff) { - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + if (!m_pInstance) + return; + + // Follow the target - do not attack + if (Creature* pKael = m_pInstance->GetSingleCreatureFromStorage(NPC_KAELTHAS)) { - m_creature->TauntApply(pTarget); // Useless Workaround - AttackStart(pTarget); + if (Unit* pTarget = pKael->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + m_creature->GetMotionMaster()->MoveFollow(pTarget, 0, 0); } m_uiChangeTargetTimer = urand(5000, 15000); diff --git a/scripts/eastern_kingdoms/magisters_terrace/instance_magisters_terrace.cpp b/scripts/eastern_kingdoms/magisters_terrace/instance_magisters_terrace.cpp index b39ba398e..f995949bb 100644 --- a/scripts/eastern_kingdoms/magisters_terrace/instance_magisters_terrace.cpp +++ b/scripts/eastern_kingdoms/magisters_terrace/instance_magisters_terrace.cpp @@ -49,6 +49,7 @@ void instance_magisters_terrace::OnCreatureCreate(Creature* pCreature) case NPC_SELIN_FIREHEART: case NPC_DELRISSA: case NPC_KALECGOS_DRAGON: + case NPC_KAELTHAS: m_mNpcEntryGuidStore[pCreature->GetEntry()] = pCreature->GetObjectGuid(); break; case NPC_FEL_CRYSTAL: @@ -75,8 +76,7 @@ void instance_magisters_terrace::OnObjectCreate(GameObject* pGo) break; case GO_SELIN_ENCOUNTER_DOOR: case GO_KAEL_DOOR: - case GO_KAEL_STATUE_LEFT: - case GO_KAEL_STATUE_RIGHT: + case GO_ESCAPE_QUEL_DANAS: break; default: @@ -109,6 +109,8 @@ void instance_magisters_terrace::SetData(uint32 uiType, uint32 uiData) break; case TYPE_KAELTHAS: DoUseDoorOrButton(GO_KAEL_DOOR); + if (uiData == DONE) + DoToggleGameObjectFlags(GO_ESCAPE_QUEL_DANAS, GO_FLAG_NO_INTERACT, false); m_auiEncounter[uiType] = uiData; break; case TYPE_DELRISSA_DEATH_COUNT: diff --git a/scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.h b/scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.h index 91072f643..84c341196 100644 --- a/scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.h +++ b/scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.h @@ -20,6 +20,7 @@ enum NPC_DELRISSA = 24560, NPC_FEL_CRYSTAL = 24722, NPC_KALECGOS_DRAGON = 24844, + NPC_KAELTHAS = 24664, GO_VEXALLUS_DOOR = 187896, GO_SELIN_DOOR = 187979, // SunwellRaid Gate 02 @@ -27,8 +28,9 @@ enum GO_SELIN_ENCOUNTER_DOOR = 188065, // Assembly Chamber Door GO_KAEL_DOOR = 188064, - GO_KAEL_STATUE_LEFT = 188165, - GO_KAEL_STATUE_RIGHT = 188166, + //GO_KAEL_STATUE_LEFT = 188165, // animation statues - they do not reset on fail + //GO_KAEL_STATUE_RIGHT = 188166, + GO_ESCAPE_QUEL_DANAS = 188173, }; class MANGOS_DLL_DECL instance_magisters_terrace : public ScriptedInstance @@ -38,9 +40,6 @@ class MANGOS_DLL_DECL instance_magisters_terrace : public ScriptedInstance void Initialize(); - // Was used, likely wrong for normal dungeon - //bool IsEncounterInProgress() const - void OnCreatureCreate(Creature* pCreature); void OnObjectCreate(GameObject* pGo); diff --git a/scripts/eastern_kingdoms/sunwell_plateau/boss_brutallus.cpp b/scripts/eastern_kingdoms/sunwell_plateau/boss_brutallus.cpp index 876995dac..a52d1d81f 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/boss_brutallus.cpp +++ b/scripts/eastern_kingdoms/sunwell_plateau/boss_brutallus.cpp @@ -217,7 +217,7 @@ struct MANGOS_DLL_DECL boss_brutallusAI : public ScriptedAI, private DialogueHel { pSummoned->SetWalk(false); pSummoned->SetLevitate(true); - pSummoned->GetMotionMaster()->MovePoint(0, aMadrigosaFlyLoc[0], aMadrigosaFlyLoc[1], aMadrigosaFlyLoc[2]); + pSummoned->GetMotionMaster()->MovePoint(0, aMadrigosaFlyLoc[0], aMadrigosaFlyLoc[1], aMadrigosaFlyLoc[2], false); } else if (pSummoned->GetEntry() == NPC_BRUTALLUS_DEATH_CLOUD) pSummoned->CastSpell(pSummoned, SPELL_BRUTALLUS_DEATH_CLOUD, true); diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_blood_queen_lanathel.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_blood_queen_lanathel.cpp index 3e478c283..4d9721c23 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_blood_queen_lanathel.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_blood_queen_lanathel.cpp @@ -43,7 +43,7 @@ enum SPELL_SHROUD_OF_SORROW = 70986, // ground phase - SPELL_BLOOD_MIRROR = 70450, // triggers 70445 and other similar spells + SPELL_BLOOD_MIRROR = 70837, // triggers 70445 and other similar spells SPELL_SWARMING_SHADOWS = 71861, // triggers 71264 and 71267 SPELL_PACT_OF_THE_DARKFALLEN = 71336, // triggers 71340 SPELL_VAMPIRIC_BITE = 71837, // triggers 71726 and 70946 diff --git a/scripts/outland/tempest_keep/the_eye/boss_kaelthas.cpp b/scripts/outland/tempest_keep/the_eye/boss_kaelthas.cpp index d1381a168..0dc284dee 100644 --- a/scripts/outland/tempest_keep/the_eye/boss_kaelthas.cpp +++ b/scripts/outland/tempest_keep/the_eye/boss_kaelthas.cpp @@ -231,6 +231,11 @@ struct MANGOS_DLL_DECL boss_kaelthasAI : public ScriptedAI SetCombatMovement(true); } + void GetAIInformation(ChatHandler& reader) + { + reader.PSendSysMessage("Kael'thas is currently in phase %u", m_uiPhase); + } + // Custom Move in LoS function void MoveInLineOfSight(Unit* pWho) { @@ -503,11 +508,8 @@ struct MANGOS_DLL_DECL boss_kaelthasAI : public ScriptedAI { if (m_uiNetherBeamTimer < uiDiff) { - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) - { - if (DoCastSpellIfCan(m_creature, SPELL_NETHER_BEAM) == CAST_OK) - m_uiNetherBeamTimer = urand(2000, 4000); - } + if (DoCastSpellIfCan(m_creature, SPELL_NETHER_BEAM) == CAST_OK) + m_uiNetherBeamTimer = urand(2000, 4000); } else m_uiNetherBeamTimer -= uiDiff; @@ -762,6 +764,13 @@ struct MANGOS_DLL_DECL advisor_base_ai : public ScriptedAI if (uiDamage < m_creature->GetHealth()) return; + // Make sure it won't die by accident + if (m_bFakeDeath) + { + uiDamage = 0; + return; + } + uiDamage = 0; m_bFakeDeath = true; @@ -1091,16 +1100,91 @@ struct MANGOS_DLL_DECL mob_phoenix_tkAI : public ScriptedAI uint32 m_uiCycleTimer; + bool m_bFakeDeath; + void Reset() { m_uiCycleTimer = 2000; + m_bFakeDeath = false; + } + + void Aggro(Unit* pWho) + { DoCastSpellIfCan(m_creature, SPELL_BURN); } - void JustDied(Unit* pKiller) + void EnterEvadeMode() + { + // Don't evade during ember blast + if (m_bFakeDeath) + return; + + ScriptedAI::EnterEvadeMode(); + } + + void DamageTaken(Unit* pKiller, uint32& uiDamage) + { + if (uiDamage < m_creature->GetHealth()) + return; + + // Prevent glitch if in fake death + if (m_bFakeDeath) + { + uiDamage = 0; + return; + } + + // prevent death + uiDamage = 0; + DoSetFakeDeath(); + } + + void DoSetFakeDeath() { + m_bFakeDeath = true; + + m_creature->InterruptNonMeleeSpells(false); + m_creature->SetHealth(1); + m_creature->StopMoving(); + m_creature->ClearComboPointHolders(); + m_creature->RemoveAllAurasOnDeath(); + m_creature->ModifyAuraState(AURA_STATE_HEALTHLESS_20_PERCENT, false); + m_creature->ModifyAuraState(AURA_STATE_HEALTHLESS_35_PERCENT, false); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + m_creature->ClearAllReactives(); + m_creature->SetTargetGuid(ObjectGuid()); + m_creature->GetMotionMaster()->Clear(); + m_creature->GetMotionMaster()->MoveIdle(); + m_creature->SetStandState(UNIT_STAND_STATE_DEAD); + + // Spawn egg and make invisible DoCastSpellIfCan(m_creature, SPELL_EMBER_BLAST, CAST_TRIGGERED); - m_creature->SummonCreature(NPC_PHOENIX_EGG, 0, 0, 0, 0, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 16000); + m_creature->SummonCreature(NPC_PHOENIX_EGG, 0, 0, 0, 0, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 15000); + } + + void SummonedCreatureDespawn(Creature* pSummoned) + { + // Remove fake death if the egg despawns after 15 secs + m_creature->RemoveAurasDueToSpell(SPELL_EMBER_BLAST); + m_creature->SetStandState(UNIT_STAND_STATE_STAND); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + + if (DoCastSpellIfCan(m_creature, SPELL_REBIRTH) == CAST_OK) + { + m_creature->SetHealth(m_creature->GetMaxHealth()); + m_creature->GetMotionMaster()->Clear(); + DoStartMovement(m_creature->getVictim()); + m_bFakeDeath = false; + + DoCastSpellIfCan(m_creature, SPELL_BURN, CAST_TRIGGERED); + } + } + + void SummonedCreatureJustDied(Creature* pSummoned) + { + // Self kill if the egg is killed + if (m_bFakeDeath) + m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); } void UpdateAI(const uint32 uiDiff) @@ -1108,14 +1192,18 @@ struct MANGOS_DLL_DECL mob_phoenix_tkAI : public ScriptedAI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; + if (m_bFakeDeath) + return; + // ToDo: research if this is correct and how can this be done by spell if (m_uiCycleTimer < uiDiff) { //spell Burn should possible do this, but it doesn't, so do this for now. uint32 uiDmg = urand(4500, 5500); - - if (m_creature->GetHealth() > uiDmg) - m_creature->SetHealth(uint32(m_creature->GetHealth() - uiDmg)); + if (uiDmg > m_creature->GetHealth()) + DoSetFakeDeath(); + else + m_creature->DealDamage(m_creature, uiDmg, 0, DOT, SPELL_SCHOOL_MASK_FIRE, NULL, false); m_uiCycleTimer = 2000; } @@ -1130,40 +1218,15 @@ struct MANGOS_DLL_DECL mob_phoenix_tkAI : public ScriptedAI ## mob_phoenix_egg_tk ######*/ +// TODO Remove this 'script' when combat movement can be proper prevented from core-side struct MANGOS_DLL_DECL mob_phoenix_egg_tkAI : public Scripted_NoMovementAI { mob_phoenix_egg_tkAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { Reset(); } - uint32 m_uiRebirthTimer; - - void Reset() - { - m_uiRebirthTimer = 15000; - } - + void Reset() { } void MoveInLineOfSight(Unit* pWho) { } void AttackStart(Unit* pWho) { } - - void JustSummoned(Creature* pSummoned) - { - pSummoned->CastSpell(pSummoned, SPELL_REBIRTH, true); - pSummoned->SetInCombatWithZone(); - } - - void UpdateAI(const uint32 uiDiff) - { - if (m_uiRebirthTimer) - { - if (m_uiRebirthTimer <= uiDiff) - { - // Summon a new Phoenix before despawn - m_creature->SummonCreature(NPC_PHOENIX, 0, 0, 0, 0,TEMPSUMMON_DEAD_DESPAWN, 0); - m_uiRebirthTimer = 0; - } - else - m_uiRebirthTimer -= uiDiff; - } - } + void UpdateAI(const uint32 uiDiff) { } }; CreatureAI* GetAI_boss_kaelthas(Creature* pCreature) diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index ffa7473e9..9c6bff6e3 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2619" + #define SD2_REVISION_NR "2620" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 6445292a3..2c000e625 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -2933,13 +2933,14 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1585021,'It\'s been a kick, really.',12411,1,0,0,'delrissa PlayerDeath5'), (-1585022,'Not what I had... planned...',12397,1,0,0,'delrissa SAY_DEATH'), -(-1585023,'Don\'t look so smug! I know what you\'re thinking, but Tempest Keep was merely a set back. Did you honestly believe I would trust the future to some blind, half-night elf mongrel? Oh no, he was merely an instrument, a stepping stone to a much larger plan! It has all led to this, and this time, you will not interfere!',12413,1,0,0,'kaelthas MT SAY_AGGRO'), +(-1585023,'Don\'t look so smug! I know what you\'re thinking, but Tempest Keep was merely a set back. Did you honestly believe I would trust the future to some blind, half-night elf mongrel?',12413,1,0,0,'kaelthas MT SAY_INTRO_1'), (-1585024,'Vengeance burns!',12415,1,0,0,'kaelthas MT SAY_PHOENIX'), (-1585025,'Felomin ashal!',12417,1,0,0,'kaelthas MT SAY_FLAMESTRIKE'), (-1585026,'I\'ll turn your world... upside... down...',12418,1,0,0,'kaelthas MT SAY_GRAVITY_LAPSE'), (-1585027,'Master... grant me strength.',12419,1,0,0,'kaelthas MT SAY_TIRED'), (-1585028,'Do not... get too comfortable.',12420,1,0,0,'kaelthas MT SAY_RECAST_GRAVITY'), -(-1585029,'My demise accomplishes nothing! The Master will have you! You will drown in your own blood! This world shall burn! Aaaghh!',12421,1,0,0,'kaelthas MT SAY_DEATH'); +(-1585029,'My demise accomplishes nothing! The Master will have you! You will drown in your own blood! This world shall burn! Aaaghh!',12421,1,0,0,'kaelthas MT SAY_DEATH'), +(-1585030,'Oh no, he was merely an instrument, a stepping stone to a much larger plan! It has all led to this, and this time, you will not interfere!',0,1,0,0,'kaelthas MT SAY_INTRO_2'); -- -1 595 000 CULLING OF STRATHOLME diff --git a/sql/updates/r2620_scriptdev2.sql b/sql/updates/r2620_scriptdev2.sql new file mode 100644 index 000000000..37bfc7b0d --- /dev/null +++ b/sql/updates/r2620_scriptdev2.sql @@ -0,0 +1,4 @@ +DELETE FROM script_texts WHERE entry IN (-1585023,-1585030); +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1585023,'Don\'t look so smug! I know what you\'re thinking, but Tempest Keep was merely a set back. Did you honestly believe I would trust the future to some blind, half-night elf mongrel?',12413,1,0,0,'kaelthas MT SAY_INTRO_1'), +(-1585030,'Oh no, he was merely an instrument, a stepping stone to a much larger plan! It has all led to this, and this time, you will not interfere!',0,1,0,0,'kaelthas MT SAY_INTRO_2'); From 329457eea92c13fe69e53a03c7923f8ed21a99d2 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sun, 8 Jul 2012 17:32:36 +0300 Subject: [PATCH 0609/1172] [2621] Cleanup for Vexallus - Magister's Terrace --- .../magisters_terrace/boss_vexallus.cpp | 118 ++++++++++-------- sd2_revision_nr.h | 2 +- 2 files changed, 64 insertions(+), 56 deletions(-) diff --git a/scripts/eastern_kingdoms/magisters_terrace/boss_vexallus.cpp b/scripts/eastern_kingdoms/magisters_terrace/boss_vexallus.cpp index 3026d0098..46d26ff7b 100644 --- a/scripts/eastern_kingdoms/magisters_terrace/boss_vexallus.cpp +++ b/scripts/eastern_kingdoms/magisters_terrace/boss_vexallus.cpp @@ -17,7 +17,7 @@ /* ScriptData SDName: Boss_Vexallus SD%Complete: 90 -SDComment: Heroic and Normal support. Needs further testing. +SDComment: Timers. SDCategory: Magister's Terrace EndScriptData */ @@ -39,6 +39,7 @@ enum //Pure energy spell info SPELL_ENERGY_BOLT = 46156, SPELL_ENERGY_FEEDBACK = 44335, + SPELL_ENERGY_PASSIVE = 44326, //Vexallus spell info SPELL_CHAIN_LIGHTNING = 44318, @@ -53,9 +54,6 @@ enum //Creatures NPC_PURE_ENERGY = 24745, - - INTERVAL_MODIFIER = 15, - INTERVAL_SWITCH = 6 }; struct MANGOS_DLL_DECL boss_vexallusAI : public ScriptedAI @@ -70,36 +68,39 @@ struct MANGOS_DLL_DECL boss_vexallusAI : public ScriptedAI ScriptedInstance* m_pInstance; bool m_bIsRegularMode; - uint32 ChainLightningTimer; - uint32 ArcaneShockTimer; - uint32 OverloadTimer; - uint32 IntervalHealthAmount; - bool Enraged; + uint32 m_uiChainLightningTimer; + uint32 m_uiArcaneShockTimer; + uint32 m_uiOverloadTimer; + uint32 m_uiIntervalHealthAmount; + bool m_bEnraged; void Reset() { - ChainLightningTimer = 8000; - ArcaneShockTimer = 5000; - OverloadTimer = 1200; - IntervalHealthAmount = 1; - Enraged = false; - - if (m_pInstance) - m_pInstance->SetData(TYPE_VEXALLUS, NOT_STARTED); + m_uiChainLightningTimer = 8000; + m_uiArcaneShockTimer = 5000; + m_uiOverloadTimer = 1200; + m_uiIntervalHealthAmount = 1; + m_bEnraged = false; } - void KilledUnit(Unit *victim) + void KilledUnit(Unit* pVictim) { DoScriptText(SAY_KILL, m_creature); } - void JustDied(Unit *victim) + void JustReachedHome() + { + if (m_pInstance) + m_pInstance->SetData(TYPE_VEXALLUS, FAIL); + } + + void JustDied(Unit* pKiller) { if (m_pInstance) m_pInstance->SetData(TYPE_VEXALLUS, DONE); } - void Aggro(Unit *who) + void Aggro(Unit* pWho) { DoScriptText(SAY_AGGRO, m_creature); @@ -112,64 +113,71 @@ struct MANGOS_DLL_DECL boss_vexallusAI : public ScriptedAI if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) pSummoned->GetMotionMaster()->MoveFollow(pTarget, 0.0f, 0.0f); - pSummoned->CastSpell(pSummoned, SPELL_ENERGY_BOLT, false, NULL, NULL, m_creature->GetObjectGuid()); + pSummoned->CastSpell(pSummoned, SPELL_ENERGY_PASSIVE, true, NULL, NULL, m_creature->GetObjectGuid()); + pSummoned->CastSpell(pSummoned, SPELL_ENERGY_BOLT, true, NULL, NULL, m_creature->GetObjectGuid()); } - void UpdateAI(const uint32 diff) + void UpdateAI(const uint32 uiDiff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - if (!Enraged) + if (!m_bEnraged) { - //used for check, when Vexallus cast adds 85%, 70%, 55%, 40%, 25% - if (m_creature->GetHealthPercent() <= float(100 - INTERVAL_MODIFIER*IntervalHealthAmount)) + // Enrage at 20% hp + if (m_creature->GetHealthPercent() < 20.0f) { - //increase amount, unless we're at 10%, then we switch and return - if (IntervalHealthAmount == INTERVAL_SWITCH) - { - Enraged = true; - return; - } - else - ++IntervalHealthAmount; + m_bEnraged = true; + return; + } + //used for check, when Vexallus cast adds 85%, 70%, 55%, 40%, 25% + if (m_creature->GetHealthPercent() <= float(100.0f - 15.0f * m_uiIntervalHealthAmount)) + { DoScriptText(SAY_ENERGY, m_creature); DoScriptText(EMOTE_DISCHARGE_ENERGY, m_creature); + ++m_uiIntervalHealthAmount; if (m_bIsRegularMode) - m_creature->CastSpell(m_creature, SPELL_SUMMON_PURE_ENERGY, true); + DoCastSpellIfCan(m_creature, SPELL_SUMMON_PURE_ENERGY); else { - m_creature->CastSpell(m_creature, SPELL_SUMMON_PURE_ENERGY1_H, true); - m_creature->CastSpell(m_creature, SPELL_SUMMON_PURE_ENERGY2_H, true); + DoCastSpellIfCan(m_creature, SPELL_SUMMON_PURE_ENERGY1_H, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_SUMMON_PURE_ENERGY2_H, CAST_TRIGGERED); } } - if (ChainLightningTimer < diff) + if (m_uiChainLightningTimer < uiDiff) { - if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) - DoCastSpellIfCan(target, m_bIsRegularMode ? SPELL_CHAIN_LIGHTNING : SPELL_CHAIN_LIGHTNING_H); - - ChainLightningTimer = 8000; - }else ChainLightningTimer -= diff; + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, m_bIsRegularMode ? SPELL_CHAIN_LIGHTNING : SPELL_CHAIN_LIGHTNING_H) == CAST_OK) + m_uiChainLightningTimer = 8000; + } + } + else + m_uiChainLightningTimer -= uiDiff; - if (ArcaneShockTimer < diff) + if (m_uiArcaneShockTimer < uiDiff) { - if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) - DoCastSpellIfCan(target, m_bIsRegularMode ? SPELL_ARCANE_SHOCK : SPELL_ARCANE_SHOCK_H); - - ArcaneShockTimer = 8000; - }else ArcaneShockTimer -= diff; + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, m_bIsRegularMode ? SPELL_ARCANE_SHOCK : SPELL_ARCANE_SHOCK_H) == CAST_OK) + m_uiArcaneShockTimer = 8000; + } + } + else + m_uiArcaneShockTimer -= uiDiff; } else { - if (OverloadTimer < diff) + if (m_uiOverloadTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_OVERLOAD); - - OverloadTimer = 2000; - }else OverloadTimer -= diff; + if (DoCastSpellIfCan(m_creature, SPELL_OVERLOAD) == CAST_OK) + m_uiOverloadTimer = 2000; + } + else + m_uiOverloadTimer -= uiDiff; } DoMeleeAttackIfReady(); @@ -206,8 +214,8 @@ struct MANGOS_DLL_DECL mob_pure_energyAI : public ScriptedAI } } - void MoveInLineOfSight(Unit *who) { } - void AttackStart(Unit *who) { } + void MoveInLineOfSight(Unit* pWho) { } + void AttackStart(Unit* pWho) { } }; CreatureAI* GetAI_mob_pure_energy(Creature* pCreature) diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 9c6bff6e3..ee5fc931c 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2620" + #define SD2_REVISION_NR "2621" #endif // __SD2_REVISION_NR_H__ From f9fbd4b1aa55ae4af0d492b819c252bfa53960a8 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sun, 8 Jul 2012 22:10:01 +0300 Subject: [PATCH 0610/1172] [2622] Cleanup and improve script for Selin Fireheart - Magister's Terrace * this will simplify the crystal handling code * added missing cosmetic spells --- .../boss_selin_fireheart.cpp | 293 ++++++++---------- .../instance_magisters_terrace.cpp | 32 +- .../magisters_terrace/magisters_terrace.h | 2 - sd2_revision_nr.h | 2 +- 4 files changed, 149 insertions(+), 180 deletions(-) diff --git a/scripts/eastern_kingdoms/magisters_terrace/boss_selin_fireheart.cpp b/scripts/eastern_kingdoms/magisters_terrace/boss_selin_fireheart.cpp index 849c016f7..da1d8c779 100644 --- a/scripts/eastern_kingdoms/magisters_terrace/boss_selin_fireheart.cpp +++ b/scripts/eastern_kingdoms/magisters_terrace/boss_selin_fireheart.cpp @@ -17,7 +17,7 @@ /* ScriptData SDName: Boss_Selin_Fireheart SD%Complete: 90 -SDComment: Heroic and Normal Support. Needs further testing. +SDComment: Timers. SDCategory: Magister's Terrace EndScriptData */ @@ -34,17 +34,21 @@ enum SAY_DEATH = -1585005, EMOTE_CRYSTAL = -1585006, - // Crystal effect spells - SPELL_FEL_CRYSTAL_COSMETIC = 44374, - SPELL_FEL_CRYSTAL_DUMMY = 44329, - SPELL_FEL_CRYSTAL_VISUAL = 44355, - SPELL_MANA_RAGE = 44320, // This spell triggers 44321, which changes scale and regens mana Requires an entry in spell_script_target - // Selin's spells SPELL_DRAIN_LIFE = 44294, + SPELL_DRAIN_LIFE_H = 46155, SPELL_FEL_EXPLOSION = 44314, - SPELL_DRAIN_MANA = 46153, // Heroic only + //SPELL_FEL_CRYSTAL_DUMMY = 44329, // used by Selin to select a nearby Crystal - not used in script + SPELL_MANA_RAGE = 44320, // This spell triggers 44321, which changes scale and regens mana Requires an entry in spell_script_target + + // Crystal spells and npcs + SPELL_FEL_CRYSTAL_COSMETIC = 44374, // cosmetic - used by the guys around Selin + SPELL_FEL_CRYSTAL_VISUAL = 44355, // cosmetic + + NPC_HUSK = 24690, + NPC_SKULER = 24688, + NPC_BRUISER = 24689, }; struct MANGOS_DLL_DECL boss_selin_fireheartAI : public ScriptedAI @@ -59,85 +63,51 @@ struct MANGOS_DLL_DECL boss_selin_fireheartAI : public ScriptedAI instance_magisters_terrace* m_pInstance; bool m_bIsRegularMode; - GuidList m_lCrystalGuids; - uint32 m_uiDrainLifeTimer; uint32 m_uiDrainManaTimer; uint32 m_uiFelExplosionTimer; uint32 m_uiDrainCrystalTimer; - uint32 m_uiEmpowerTimer; + uint32 m_uiManaRageTimer; - bool m_bIsDraining; bool m_bDrainingCrystal; - ObjectGuid m_crystalGuid; // This will help us create a pointer to the crystal we are draining. We store GUIDs, never units in case unit is deleted/offline (offline if player of course). + ObjectGuid m_crystalGuid; void Reset() { - m_uiDrainLifeTimer = urand(3000, 7000); - m_uiDrainManaTimer = m_uiDrainLifeTimer + 5000; + m_uiDrainLifeTimer = urand(3000, 7000); + m_uiDrainManaTimer = m_uiDrainLifeTimer + 5000; m_uiFelExplosionTimer = 2100; - m_uiDrainCrystalTimer = urand(10000, 15000); - m_uiDrainCrystalTimer = urand(20000, 25000); - m_uiEmpowerTimer = 10000; + m_uiDrainCrystalTimer = m_bIsRegularMode ? urand(20000, 25000) : urand(10000, 15000); + m_uiManaRageTimer = 0; - m_bIsDraining = false; - m_bDrainingCrystal = false; - m_crystalGuid.Clear(); + m_bDrainingCrystal = false; } - void SelectNearestCrystal() + // Get the closest alive crystal for draining + bool DoSelectNearestCrystal() { - if (m_lCrystalGuids.empty()) - return; - - m_crystalGuid.Clear(); - Creature* pCrystal = NULL; - Creature* pCrystalChosen = NULL; + // Wait to finish casting + if (m_creature->IsNonMeleeSpellCasted(false)) + return false; - for (GuidList::const_iterator itr = m_lCrystalGuids.begin(); itr != m_lCrystalGuids.end(); ++itr) - { - pCrystal = m_creature->GetMap()->GetCreature(*itr); - - if (pCrystal && pCrystal->isAlive()) - { - // select nearest - if (!pCrystalChosen || m_creature->GetDistanceOrder(pCrystal, pCrystalChosen, false)) - { - m_crystalGuid = pCrystal->GetObjectGuid(); - pCrystalChosen = pCrystal; // Store a copy of pCrystal so we don't need to recreate a pointer to closest crystal for the movement and yell. - } - } - } - if (pCrystalChosen) + if (Creature* pCrystal = GetClosestCreatureWithEntry(m_creature, NPC_FEL_CRYSTAL, 60.0f)) { + m_crystalGuid = pCrystal->GetObjectGuid(); DoScriptText(SAY_ENERGY, m_creature); DoScriptText(EMOTE_CRYSTAL, m_creature); + m_creature->InterruptNonMeleeSpells(false); - pCrystalChosen->CastSpell(pCrystalChosen, SPELL_FEL_CRYSTAL_COSMETIC, true); - - float x, y, z; // coords that we move to, close to the crystal. - pCrystalChosen->GetClosePoint(x, y, z, m_creature->GetObjectBoundingRadius(), CONTACT_DISTANCE); - - m_creature->SetWalk(false); - m_creature->GetMotionMaster()->MovePoint(1, x, y, z); + float fX, fY, fZ; + SetCombatMovement(false); + m_creature->GetContactPoint(pCrystal, fX, fY, fZ, INTERACTION_DISTANCE); + m_creature->GetMotionMaster()->MovePoint(1, fX, fY, fZ); m_bDrainingCrystal = true; - } - } - - void ShatterRemainingCrystals() - { - if (m_lCrystalGuids.empty()) - return; - for (GuidList::const_iterator itr = m_lCrystalGuids.begin(); itr != m_lCrystalGuids.end(); ++itr) - { - //Creature* pCrystal = m_creature->GetMap()->GetCreature(FelCrystals[i]); - Creature* pCrystal = m_creature->GetMap()->GetCreature(*itr); - - if (pCrystal && pCrystal->isAlive()) - pCrystal->DealDamage(pCrystal, pCrystal->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + return true; } + + return false; } void Aggro(Unit* pWho) @@ -145,37 +115,13 @@ struct MANGOS_DLL_DECL boss_selin_fireheartAI : public ScriptedAI DoScriptText(SAY_AGGRO, m_creature); if (m_pInstance) - { m_pInstance->SetData(TYPE_SELIN, IN_PROGRESS); - - if (m_lCrystalGuids.empty()) - { - // Get and output crystals - m_pInstance->GetFelCrystalList(m_lCrystalGuids); - for (GuidList::const_iterator itr = m_lCrystalGuids.begin(); itr != m_lCrystalGuids.end(); ++itr) - debug_log("SD2: Selin: Added Fel Crystal %s to list", ObjectGuid(*itr).GetString().c_str()); - } - } } void JustReachedHome() { if (m_pInstance) - { m_pInstance->SetData(TYPE_SELIN, FAIL); - - for (GuidList::const_iterator itr = m_lCrystalGuids.begin(); itr != m_lCrystalGuids.end(); ++itr) - { - if (Creature* pCrystal = m_creature->GetMap()->GetCreature(*itr)) - { - if (!pCrystal->isAlive()) - pCrystal->Respawn(); // Let MaNGOS handle setting death state, etc. - - // Only need to set unselectable flag. You can't attack unselectable units so non_attackable flag is not necessary here. - pCrystal->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - } - } - } } void KilledUnit(Unit* pVictim) @@ -185,36 +131,42 @@ struct MANGOS_DLL_DECL boss_selin_fireheartAI : public ScriptedAI void MovementInform(uint32 uiType, uint32 uiPointId) { - if (uiType == POINT_MOTION_TYPE && uiPointId == 1) + if (uiType != POINT_MOTION_TYPE || !uiPointId) + return; + + Creature* pCrystal = m_creature->GetMap()->GetCreature(m_crystalGuid); + if (pCrystal && pCrystal->isAlive()) { - Creature* pCrystalChosen = m_creature->GetMap()->GetCreature(m_crystalGuid); - if (pCrystalChosen && pCrystalChosen->isAlive()) - { - // Make the crystal attackable - // We also remove NON_ATTACKABLE in case the database has it set. - pCrystalChosen->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE + UNIT_FLAG_NOT_SELECTABLE); - pCrystalChosen->CastSpell(m_creature, SPELL_MANA_RAGE, true); - m_bIsDraining = true; - } - else + if (DoCastSpellIfCan(pCrystal, SPELL_MANA_RAGE) == CAST_OK) { - // Make an error message in case something weird happened here - error_log("SD2: Selin Fireheart unable to drain crystal as the crystal is either dead or deleted.."); - m_bDrainingCrystal = false; + // Allow the crystal to be killed + pCrystal->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + m_uiManaRageTimer = 10000; } } + else + { + // Make an error message in case something weird happened here + error_log("SD2: Selin Fireheart unable to drain crystal as the crystal is either dead or deleted.."); + m_bDrainingCrystal = false; + } } void JustDied(Unit* pKiller) { DoScriptText(SAY_DEATH, m_creature); - if (!m_pInstance) - return; - - m_pInstance->SetData(TYPE_SELIN, DONE); // Encounter complete! + if (m_pInstance) + m_pInstance->SetData(TYPE_SELIN, DONE); + } - ShatterRemainingCrystals(); + // Mark the Mana Rage as complete + void ManaRageComplete() + { + m_bDrainingCrystal = false; + SetCombatMovement(true); + m_creature->GetMotionMaster()->Clear(); + DoStartMovement(m_creature->getVictim()); } void UpdateAI(const uint32 uiDiff) @@ -224,14 +176,13 @@ struct MANGOS_DLL_DECL boss_selin_fireheartAI : public ScriptedAI if (!m_bDrainingCrystal) { - uint32 uiMaxPowerMana = m_creature->GetMaxPower(POWER_MANA); - if (uiMaxPowerMana && ((m_creature->GetPower(POWER_MANA)*100 / uiMaxPowerMana) < 10)) + if (m_creature->GetPower(POWER_MANA)*100 / m_creature->GetMaxPower(POWER_MANA) < 10) { if (m_uiDrainLifeTimer < uiDiff) { if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) { - if (DoCastSpellIfCan(pTarget, SPELL_DRAIN_LIFE) == CAST_OK) + if (DoCastSpellIfCan(pTarget, m_bIsRegularMode ? SPELL_DRAIN_LIFE : SPELL_DRAIN_LIFE_H) == CAST_OK) m_uiDrainLifeTimer = 10000; } } @@ -243,16 +194,23 @@ struct MANGOS_DLL_DECL boss_selin_fireheartAI : public ScriptedAI { if (m_uiDrainManaTimer < uiDiff) { - Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1); - if (!pTarget) - pTarget = m_creature->getVictim(); - - if (DoCastSpellIfCan(pTarget, SPELL_DRAIN_MANA) == CAST_OK) - m_uiDrainManaTimer = 10000; + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0, SPELL_DRAIN_MANA, SELECT_FLAG_POWER_MANA)) + { + if (DoCastSpellIfCan(pTarget, SPELL_DRAIN_MANA) == CAST_OK) + m_uiDrainManaTimer = 10000; + } } else m_uiDrainManaTimer -= uiDiff; } + + if (m_uiDrainCrystalTimer < uiDiff) + { + if (DoSelectNearestCrystal()) + m_uiDrainCrystalTimer = m_bIsRegularMode ? urand(20000, 25000) : urand(10000, 15000); + } + else + m_uiDrainCrystalTimer -= uiDiff; } if (m_uiFelExplosionTimer < uiDiff) @@ -263,49 +221,26 @@ struct MANGOS_DLL_DECL boss_selin_fireheartAI : public ScriptedAI else m_uiFelExplosionTimer -= uiDiff; - // If below 10% mana, start recharging - uiMaxPowerMana = m_creature->GetMaxPower(POWER_MANA); - if (uiMaxPowerMana && ((m_creature->GetPower(POWER_MANA)*100 / uiMaxPowerMana) < 10)) - { - if (m_uiDrainCrystalTimer < uiDiff) - { - SelectNearestCrystal(); - - if (m_bIsRegularMode) - m_uiDrainCrystalTimer = urand(20000, 25000); - else - m_uiDrainCrystalTimer = urand(10000, 15000); - - } - else - m_uiDrainCrystalTimer -= uiDiff; - } - DoMeleeAttackIfReady(); } - else // if m_bDrainingCrystal + else { - if (m_bIsDraining) + if (m_uiManaRageTimer) { - if (m_uiEmpowerTimer < uiDiff) + if (m_uiManaRageTimer <= uiDiff) { - m_bIsDraining = false; - m_bDrainingCrystal = false; - DoScriptText(SAY_EMPOWERED, m_creature); + ManaRageComplete(); - Creature* CrystalChosen = m_creature->GetMap()->GetCreature(m_crystalGuid); - if (CrystalChosen && CrystalChosen->isAlive()) - // Use Deal Damage to kill it, not SetDeathState. - CrystalChosen->DealDamage(CrystalChosen, CrystalChosen->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); - - m_crystalGuid.Clear(); + // Kill the drained crystal + Creature* pCrystalChosen = m_creature->GetMap()->GetCreature(m_crystalGuid); + if (pCrystalChosen && pCrystalChosen->isAlive()) + pCrystalChosen->DealDamage(pCrystalChosen, pCrystalChosen->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); - m_creature->GetMotionMaster()->Clear(); - m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); + m_uiManaRageTimer = 0; } else - m_uiEmpowerTimer -= uiDiff; + m_uiManaRageTimer -= uiDiff; } } } @@ -320,35 +255,55 @@ struct MANGOS_DLL_DECL mob_fel_crystalAI : public ScriptedAI { mob_fel_crystalAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } - void Reset() {} + GuidSet m_sWretchedGuids; + + uint32 m_uiVisualTimer; + + void Reset() + { + m_uiVisualTimer = 1000; + m_sWretchedGuids.clear(); + } + void AttackStart(Unit* pWho) {} - void MoveInLineOfSight(Unit* pWho) {} - void UpdateAI(const uint32 uiDiff) {} - void JustDied(Unit* killer) + void MoveInLineOfSight(Unit* pWho) + { + // Cosmetic spell + if (m_sWretchedGuids.find(pWho->GetObjectGuid()) == m_sWretchedGuids.end() && pWho->IsWithinDist(m_creature, 5.0f) && pWho->isAlive() && + (pWho->GetEntry() == NPC_SKULER || pWho->GetEntry() == NPC_BRUISER || pWho->GetEntry() == NPC_HUSK)) + { + pWho->CastSpell(m_creature, SPELL_FEL_CRYSTAL_COSMETIC, false); + m_sWretchedGuids.insert(pWho->GetObjectGuid()); + } + } + + void JustDied(Unit* pKiller) { if (ScriptedInstance* pInstance = (ScriptedInstance*)m_creature->GetInstanceData()) { Creature* pSelin = pInstance->GetSingleCreatureFromStorage(NPC_SELIN_FIREHEART); + if (!pSelin || !pSelin->isAlive()) + return; - if (pSelin && pSelin->isAlive()) - { - boss_selin_fireheartAI* pSelinAI = dynamic_cast(pSelin->AI()); - - if (pSelinAI && pSelinAI->m_crystalGuid == m_creature->GetObjectGuid()) - { - // Set this to false if we are the creature that Selin is draining so his AI flows properly - pSelinAI->m_bDrainingCrystal = false; - pSelinAI->m_bIsDraining = false; - pSelinAI->m_uiEmpowerTimer = 10000; + // Mark Mana rage as completed + pSelin->InterruptNonMeleeSpells(false); + if (boss_selin_fireheartAI* pBossAI = dynamic_cast(pSelin->AI())) + pBossAI->ManaRageComplete(); + } + } - if (pSelin->getVictim()) - { - pSelin->AI()->AttackStart(pSelin->getVictim()); - pSelin->GetMotionMaster()->MoveChase(pSelin->getVictim()); - } - } + void UpdateAI(const uint32 uiDiff) + { + if (m_uiVisualTimer) + { + if (m_uiVisualTimer <= uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_FEL_CRYSTAL_VISUAL) == CAST_OK) + m_uiVisualTimer = 0; } + else + m_uiVisualTimer -= uiDiff; } } }; diff --git a/scripts/eastern_kingdoms/magisters_terrace/instance_magisters_terrace.cpp b/scripts/eastern_kingdoms/magisters_terrace/instance_magisters_terrace.cpp index f995949bb..bad417480 100644 --- a/scripts/eastern_kingdoms/magisters_terrace/instance_magisters_terrace.cpp +++ b/scripts/eastern_kingdoms/magisters_terrace/instance_magisters_terrace.cpp @@ -92,6 +92,30 @@ void instance_magisters_terrace::SetData(uint32 uiType, uint32 uiData) case TYPE_SELIN: if (uiData == DONE) DoUseDoorOrButton(GO_SELIN_DOOR); + if (uiData == FAIL) + { + // Reset crystals - respawn and kill is handled by creature linking + for (GuidList::const_iterator itr = m_lFelCrystalGuid.begin(); itr != m_lFelCrystalGuid.end(); ++itr) + { + if (Creature* pTemp = instance->GetCreature(*itr)) + { + if (!pTemp->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE)) + pTemp->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + + if (pTemp->isAlive()) + pTemp->AI()->EnterEvadeMode(); + } + } + } + if (uiData == IN_PROGRESS) + { + // Stop channeling when the fight starts + for (GuidList::const_iterator itr = m_lFelCrystalGuid.begin(); itr != m_lFelCrystalGuid.end(); ++itr) + { + if (Creature* pTemp = instance->GetCreature(*itr)) + pTemp->InterruptNonMeleeSpells(false); + } + } DoUseDoorOrButton(GO_SELIN_ENCOUNTER_DOOR); m_auiEncounter[uiType] = uiData; break; @@ -172,14 +196,6 @@ uint32 instance_magisters_terrace::GetData(uint32 uiType) } } -void instance_magisters_terrace::GetFelCrystalList(GuidList& lList) -{ - if (m_lFelCrystalGuid.empty()) - error_log("SD2: Magisters Terrace: No Fel Crystals loaded in Inst Data"); - - lList = m_lFelCrystalGuid; -} - InstanceData* GetInstanceData_instance_magisters_terrace(Map* pMap) { return new instance_magisters_terrace(pMap); diff --git a/scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.h b/scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.h index 84c341196..5a047c66a 100644 --- a/scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.h +++ b/scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.h @@ -46,8 +46,6 @@ class MANGOS_DLL_DECL instance_magisters_terrace : public ScriptedInstance uint32 GetData(uint32 uiType); void SetData(uint32 uiType, uint32 uiData); - void GetFelCrystalList(GuidList& lList); - const char* Save() { return m_strInstData.c_str(); } void Load(const char* chrIn); diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index ee5fc931c..c2ae701c0 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2621" + #define SD2_REVISION_NR "2622" #endif // __SD2_REVISION_NR_H__ From ab69c3611126af039a75fe6c97f4be26a29ef819 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Tue, 10 Jul 2012 01:39:21 +0300 Subject: [PATCH 0611/1172] [2623] Cleanup and improve script for Priestess Delrissa - Magister's Terrace Notes: * implemented heroic spells * allow the companions to be handled by instance script, in order to avoid any issues * improve combat behavior of the AI, allowing it to use the Medallion of Immunity in order to remove all movement impairing effects and also allow the AI to better select healing and dispell targets --- .../boss_priestess_delrissa.cpp | 1555 ++++++++--------- .../instance_magisters_terrace.cpp | 62 +- .../magisters_terrace/magisters_terrace.h | 17 +- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 17 +- sql/updates/r2623_mangos.sql | 8 + 6 files changed, 851 insertions(+), 810 deletions(-) create mode 100644 sql/updates/r2623_mangos.sql diff --git a/scripts/eastern_kingdoms/magisters_terrace/boss_priestess_delrissa.cpp b/scripts/eastern_kingdoms/magisters_terrace/boss_priestess_delrissa.cpp index b4526d5ef..0efa15a01 100644 --- a/scripts/eastern_kingdoms/magisters_terrace/boss_priestess_delrissa.cpp +++ b/scripts/eastern_kingdoms/magisters_terrace/boss_priestess_delrissa.cpp @@ -16,74 +16,48 @@ /* ScriptData SDName: Boss_Priestess_Delrissa -SD%Complete: 65 -SDComment: No Heroic support yet. Needs further testing. Several scripts for pets disabled, not seem to require any special script. +SD%Complete: 90 +SDComment: Script handles Delrissa and her companions AI. They need special PvP-like behavior. Timers need adjustments SDCategory: Magister's Terrace EndScriptData */ #include "precompiled.h" #include "magisters_terrace.h" -struct Speech -{ - int32 id; -}; - -static Speech LackeyDeath[]= -{ - {-1585013}, - {-1585014}, - {-1585015}, - {-1585016}, -}; - -static Speech PlayerDeath[]= -{ - {-1585017}, - {-1585018}, - {-1585019}, - {-1585020}, - {-1585021}, -}; - enum { - SAY_AGGRO = -1585012, - SAY_DEATH = -1585022, - - SPELL_DISPEL_MAGIC = 27609, - SPELL_FLASH_HEAL = 17843, - SPELL_SW_PAIN_NORMAL = 14032, - SPELL_SW_PAIN_HEROIC = 15654, - SPELL_SHIELD = 44291, - SPELL_RENEW_NORMAL = 44174, - SPELL_RENEW_HEROIC = 46192, - - MAX_ACTIVE_LACKEY = 4 + SAY_AGGRO = -1585012, + SAY_DEATH = -1585022, + + SPELL_HEALING_POTION = 15503, + SPELL_DISPEL_MAGIC = 27609, + SPELL_MEDALLION = 46227, + SPELL_FLASH_HEAL = 17843, + SPELL_SHADOW_WORD_PAIN = 14032, + SPELL_SHADOW_WORD_PAIN_H = 15654, + SPELL_SCREAM = 27610, + SPELL_SHIELD = 44291, // maybe 44175? + SPELL_SHIELD_H = 46193, + SPELL_RENEW = 44174, + SPELL_RENEW_H = 46192, + + MAX_COMPANIONS = 8, }; -const float fOrientation = 4.98f; -const float fZLocation = -19.921f; +static const int32 aPlayerDeath[] = {-1585017, -1585018, -1585019, -1585020, -1585021}; +static const uint32 aDelrissaLackeys[MAX_COMPANIONS] = {NPC_KAGANI, NPC_ELLRYS, NPC_ERAMAS, NPC_YAZZAI, NPC_SALARIS, NPC_GARAXXAS, NPC_APOKO, NPC_ZELFAN}; -float LackeyLocations[4][2]= +static const float aLackeyLocations[MAX_DELRISSA_ADDS][4]= { - {123.77f, 17.6007f}, - {131.731f, 15.0827f}, - {121.563f, 15.6213f}, - {129.988f, 17.2355f}, + {123.77f, 17.6007f, -19.921f, 4.98f}, + {131.731f, 15.0827f, -19.921f, 4.98f}, + {121.563f, 15.6213f, -19.921f, 4.98f}, + {129.988f, 17.2355f, -19.921f, 4.98f}, }; -const uint32 m_auiAddEntries[] = -{ - 24557, //Kagani Nightstrike - 24558, //Elris Duskhallow - 24554, //Eramas Brightblaze - 24561, //Yazzaj - 24559, //Warlord Salaris - 24555, //Garaxxas - 24553, //Apoko - 24556, //Zelfan -}; +/*###### +## boss_priestess_delrissa +######*/ struct MANGOS_DLL_DECL boss_priestess_delrissaAI : public ScriptedAI { @@ -91,38 +65,37 @@ struct MANGOS_DLL_DECL boss_priestess_delrissaAI : public ScriptedAI { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); - LackeyEntryList.clear(); Reset(); } ScriptedInstance* m_pInstance; bool m_bIsRegularMode; - std::vector LackeyEntryList; - ObjectGuid m_aLackeyGuid[MAX_ACTIVE_LACKEY]; - - uint8 PlayersKilled; + std::vector m_vuiLackeyEnties; - uint32 HealTimer; - uint32 RenewTimer; - uint32 ShieldTimer; - uint32 SWPainTimer; - uint32 DispelTimer; + uint32 m_uiHealTimer; + uint32 m_uiRenewTimer; + uint32 m_uiShieldTimer; + uint32 m_uiSWPainTimer; + uint32 m_uiDispelTimer; + uint32 m_uiScreamTimer; + uint32 m_uiMedallionTimer; + uint8 m_uiPlayersKilled; void Reset() { - PlayersKilled = 0; - - HealTimer = 15000; - RenewTimer = 10000; - ShieldTimer = 2000; - SWPainTimer = 5000; - DispelTimer = 7500; - - InitializeLackeys(); + m_uiHealTimer = 15000; + m_uiRenewTimer = 10000; + m_uiShieldTimer = 2000; + m_uiSWPainTimer = 5000; + m_uiDispelTimer = 7500; + m_uiScreamTimer = 9000; + m_uiPlayersKilled = 0; + m_uiMedallionTimer = urand(1000, 2000); + + DoInitializeCompanions(); } - //this mean she at some point evaded void JustReachedHome() { if (m_pInstance) @@ -131,192 +104,161 @@ struct MANGOS_DLL_DECL boss_priestess_delrissaAI : public ScriptedAI void Aggro(Unit* pWho) { - DoScriptText(SAY_AGGRO, m_creature); + if (pWho->GetTypeId() != TYPEID_PLAYER) + return; - for(uint8 i = 0; i < MAX_ACTIVE_LACKEY; ++i) - { - if (Creature* pAdd = m_creature->GetMap()->GetCreature(m_aLackeyGuid[i])) - { - if (!pAdd->getVictim()) - { - pWho->SetInCombatWith(pAdd); - pAdd->AddThreat(pWho); - } - } - } + DoScriptText(SAY_AGGRO, m_creature); if (m_pInstance) m_pInstance->SetData(TYPE_DELRISSA, IN_PROGRESS); } - void InitializeLackeys() + // Summon four random adds to help during the fight + void DoInitializeCompanions() { //can be called if creature are dead, so avoid if (!m_creature->isAlive()) return; - uint8 j = 0; - - //it's empty, so first time - if (LackeyEntryList.empty()) + // it's empty, so first time + if (m_vuiLackeyEnties.empty()) { - //pre-allocate size for speed - LackeyEntryList.resize(countof(m_auiAddEntries)); + // pre-allocate size for speed + m_vuiLackeyEnties.resize(MAX_COMPANIONS); - //fill vector array with entries from creature array - for(uint8 i = 0; i < LackeyEntryList.size(); ++i) - LackeyEntryList[i] = m_auiAddEntries[i]; + // fill vector array with entries from creature array + for (uint8 i = 0; i < MAX_COMPANIONS; ++i) + m_vuiLackeyEnties[i] = aDelrissaLackeys[i]; - //remove random entries - while(LackeyEntryList.size() > MAX_ACTIVE_LACKEY) - LackeyEntryList.erase(LackeyEntryList.begin() + rand()%LackeyEntryList.size()); + std::random_shuffle(m_vuiLackeyEnties.begin(), m_vuiLackeyEnties.end()); - //summon all the remaining in vector - for(std::vector::iterator itr = LackeyEntryList.begin(); itr != LackeyEntryList.end(); ++itr) - { - if (Creature* pAdd = m_creature->SummonCreature((*itr), LackeyLocations[j][0], LackeyLocations[j][1], fZLocation, fOrientation, TEMPSUMMON_CORPSE_DESPAWN, 0)) - m_aLackeyGuid[j] = pAdd->GetObjectGuid(); - - ++j; - } + // Summon the 4 entries + for (uint8 i = 0; i < MAX_DELRISSA_ADDS; ++i) + m_creature->SummonCreature(m_vuiLackeyEnties[i], aLackeyLocations[i][0], aLackeyLocations[i][1], aLackeyLocations[i][2], aLackeyLocations[i][3], TEMPSUMMON_CORPSE_DESPAWN, 0); } + // Resummon the killed adds else { - for(std::vector::iterator itr = LackeyEntryList.begin(); itr != LackeyEntryList.end(); ++itr) + if (!m_pInstance) + return; + + for (uint8 i = 0; i < MAX_DELRISSA_ADDS; ++i) { - Creature* pAdd = m_creature->GetMap()->GetCreature(m_aLackeyGuid[j]); + // If we already have the creature on the map, then don't summon it + if (Creature* pAdd = m_pInstance->GetSingleCreatureFromStorage(m_vuiLackeyEnties[i], true)) + continue; - //object already removed, not exist - if (!pAdd) - { - if (Creature* pAdd = m_creature->SummonCreature((*itr), LackeyLocations[j][0], LackeyLocations[j][1], fZLocation, fOrientation, TEMPSUMMON_CORPSE_DESPAWN, 0)) - m_aLackeyGuid[j] = pAdd->GetObjectGuid(); - } - ++j; + m_creature->SummonCreature(m_vuiLackeyEnties[i], aLackeyLocations[i][0], aLackeyLocations[i][1], aLackeyLocations[i][2], aLackeyLocations[i][3], TEMPSUMMON_CORPSE_DESPAWN, 0); } } } - void KilledUnit(Unit* victim) + void KilledUnit(Unit* pVictim) { - if (victim->GetTypeId() != TYPEID_PLAYER) + if (pVictim->GetTypeId() != TYPEID_PLAYER) return; - DoScriptText(PlayerDeath[PlayersKilled].id, m_creature); + DoScriptText(aPlayerDeath[m_uiPlayersKilled], m_creature); + ++m_uiPlayersKilled; - if (PlayersKilled < 4) - ++PlayersKilled; + // reset counter + if (m_uiPlayersKilled == 5) + m_uiPlayersKilled = 0; } - void JustDied(Unit* killer) + void JustDied(Unit* pKiller) { DoScriptText(SAY_DEATH, m_creature); if (!m_pInstance) return; - if (m_pInstance->GetData(TYPE_DELRISSA_DEATH_COUNT) == MAX_ACTIVE_LACKEY) + // Remove lootable flag if the lackeys are not killed + if (m_pInstance->GetData(TYPE_DELRISSA) == SPECIAL) m_pInstance->SetData(TYPE_DELRISSA, DONE); else - { - if (m_creature->HasFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE)) - m_creature->RemoveFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE); - } + m_creature->RemoveFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE); } - void UpdateAI(const uint32 diff) + void UpdateAI(const uint32 uiDiff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - if (HealTimer < diff) + if (m_uiHealTimer < uiDiff) { - uint32 health = m_creature->GetHealth(); - Creature* target = m_creature; - - for(uint8 i = 0; i < MAX_ACTIVE_LACKEY; ++i) + if (Unit* pTarget = DoSelectLowestHpFriendly(50.0f)) { - if (Creature* pAdd = m_creature->GetMap()->GetCreature(m_aLackeyGuid[i])) - { - if (pAdd->isAlive() && pAdd->GetHealth() < health) - target = pAdd; - } + if (DoCastSpellIfCan(pTarget, SPELL_FLASH_HEAL) == CAST_OK) + m_uiHealTimer = urand(15000, 20000); } + } + else + m_uiHealTimer -= uiDiff; - DoCastSpellIfCan(target, SPELL_FLASH_HEAL); - HealTimer = 15000; - }else HealTimer -= diff; - - if (RenewTimer < diff) + if (m_uiRenewTimer < uiDiff) { - Creature* target = m_creature; - - if (urand(0, 1)) + if (Unit* pTarget = DoSelectLowestHpFriendly(50.0f)) { - if (Creature* pAdd = m_creature->GetMap()->GetCreature(m_aLackeyGuid[rand()%MAX_ACTIVE_LACKEY])) - { - if (pAdd->isAlive()) - target = pAdd; - } + if (DoCastSpellIfCan(pTarget, m_bIsRegularMode ? SPELL_RENEW : SPELL_RENEW_H) == CAST_OK) + m_uiRenewTimer = urand(5000, 10000); } + } + else + m_uiRenewTimer -= uiDiff; - DoCastSpellIfCan(target, m_bIsRegularMode ? SPELL_RENEW_NORMAL : SPELL_RENEW_HEROIC); - RenewTimer = 5000; - }else RenewTimer -= diff; - - if (ShieldTimer < diff) + if (m_uiShieldTimer < uiDiff) { - Creature* target = m_creature; + if (DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_SHIELD : SPELL_SHIELD_H) == CAST_OK) + m_uiShieldTimer = urand(30000, 35000); + } + else + m_uiShieldTimer -= uiDiff; - if (urand(0, 1)) + if (m_uiDispelTimer < uiDiff) + { + if (Unit* pTarget = DoSelectLowestHpFriendly(50.0f)) { - if (Creature* pAdd = m_creature->GetMap()->GetCreature(m_aLackeyGuid[rand()%MAX_ACTIVE_LACKEY])) - { - if (pAdd->isAlive() && !pAdd->HasAura(SPELL_SHIELD)) - target = pAdd; - } + if (DoCastSpellIfCan(pTarget, SPELL_DISPEL_MAGIC) == CAST_OK) + m_uiDispelTimer = urand(12000, 15000); } + } + else + m_uiDispelTimer -= uiDiff; - DoCastSpellIfCan(target, SPELL_SHIELD); - ShieldTimer = 7500; - }else ShieldTimer -= diff; - - if (DispelTimer < diff) + // Use the Medallion if CC - only on heroic. Not sure how many times they are allowed to use it. + if (!m_bIsRegularMode && m_uiMedallionTimer) { - Unit* target = NULL; - bool friendly = false; - - if (urand(0, 1)) - target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0); - else + if (m_creature->isFrozen() || m_creature->hasUnitState(UNIT_STAT_CAN_NOT_REACT)) { - friendly = true; - - if (urand(0, 1)) - target = m_creature; - else + if (m_uiMedallionTimer <= uiDiff) { - if (Creature* pAdd = m_creature->GetMap()->GetCreature(m_aLackeyGuid[rand()%MAX_ACTIVE_LACKEY])) - { - if (pAdd->isAlive()) - target = pAdd; - } + if (DoCastSpellIfCan(m_creature, SPELL_MEDALLION, CAST_TRIGGERED) == CAST_OK) + m_uiMedallionTimer = 0; } + else + m_uiMedallionTimer -= uiDiff; } + } - if (target) - DoCastSpellIfCan(target, SPELL_DISPEL_MAGIC); - - DispelTimer = 12000; - }else DispelTimer -= diff; - - if (SWPainTimer < diff) + if (m_uiSWPainTimer < uiDiff) { if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) - DoCastSpellIfCan(pTarget, m_bIsRegularMode ? SPELL_SW_PAIN_NORMAL : SPELL_SW_PAIN_HEROIC); + { + if (DoCastSpellIfCan(pTarget, m_bIsRegularMode ? SPELL_SHADOW_WORD_PAIN : SPELL_SHADOW_WORD_PAIN_H) == CAST_OK) + m_uiSWPainTimer = 10000; + } + } + else + m_uiSWPainTimer -= uiDiff; - SWPainTimer = 10000; - }else SWPainTimer -= diff; + if (m_uiScreamTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_SCREAM) == CAST_OK) + m_uiScreamTimer = urand(15000, 20000); + } + else + m_uiScreamTimer -= uiDiff; DoMeleeAttackIfReady(); } @@ -327,25 +269,24 @@ CreatureAI* GetAI_boss_priestess_delrissa(Creature* pCreature) return new boss_priestess_delrissaAI(pCreature); } -enum -{ - SPELL_HEALING_POTION = 15503 -}; +/*###### +## priestess_companion_common +######*/ -//all 8 possible lackey use this common -struct MANGOS_DLL_DECL boss_priestess_lackey_commonAI : public ScriptedAI +struct MANGOS_DLL_DECL priestess_companion_commonAI : public ScriptedAI { - boss_priestess_lackey_commonAI(Creature* pCreature) : ScriptedAI(pCreature) + priestess_companion_commonAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); Reset(); - AcquireGuids(); } ScriptedInstance* m_pInstance; + bool m_bIsRegularMode; - ObjectGuid m_aLackeyGuid[MAX_ACTIVE_LACKEY]; uint32 m_uiResetThreatTimer; + uint32 m_uiMedallionTimer; bool m_bUsedPotion; void Reset() @@ -357,77 +298,7 @@ struct MANGOS_DLL_DECL boss_priestess_lackey_commonAI : public ScriptedAI // We do not know what this system is based upon, but one theory is class (healers=high threat, dps=medium, etc) // We reset their threat frequently as an alternative until such a system exist m_uiResetThreatTimer = urand(5000, 15000); - - // in case she is not alive and Reset was for some reason called, respawn her (most likely party wipe after killing her) - if (Creature* pDelrissa = m_pInstance->GetSingleCreatureFromStorage(NPC_DELRISSA)) - { - if (!pDelrissa->isAlive()) - pDelrissa->Respawn(); - } - } - - void EnterCombat(Unit* pWho) - { - if (!pWho) - return; - - if (m_pInstance) - { - for(uint8 i = 0; i < MAX_ACTIVE_LACKEY; ++i) - { - if (Creature* pAdd = m_creature->GetMap()->GetCreature(m_aLackeyGuid[i])) - { - if (!pAdd->getVictim() && pAdd != m_creature) - { - pWho->SetInCombatWith(pAdd); - pAdd->AddThreat(pWho); - } - } - } - - if (Creature* pDelrissa = m_pInstance->GetSingleCreatureFromStorage(NPC_DELRISSA)) - { - if (pDelrissa->isAlive() && !pDelrissa->getVictim()) - { - pWho->SetInCombatWith(pDelrissa); - pDelrissa->AddThreat(pWho); - } - } - } - - Aggro(pWho); - } - - void JustDied(Unit* pKiller) - { - if (!m_pInstance) - return; - - Creature* pDelrissa = m_pInstance->GetSingleCreatureFromStorage(NPC_DELRISSA); - uint32 uiLackeyDeathCount = m_pInstance->GetData(TYPE_DELRISSA_DEATH_COUNT); - - if (!pDelrissa) - return; - - //should delrissa really yell if dead? - DoScriptText(LackeyDeath[uiLackeyDeathCount].id, pDelrissa); - - m_pInstance->SetData(TYPE_DELRISSA_DEATH_COUNT, SPECIAL); - - //increase local var, since we now may have four dead - ++uiLackeyDeathCount; - - if (uiLackeyDeathCount == MAX_ACTIVE_LACKEY) - { - //time to make her lootable and complete event if she died before lackeys - if (!pDelrissa->isAlive()) - { - if (!pDelrissa->HasFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE)) - pDelrissa->SetFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE); - - m_pInstance->SetData(TYPE_DELRISSA, DONE); - } - } + m_uiMedallionTimer = urand(1000, 2000); } void KilledUnit(Unit* pVictim) @@ -439,36 +310,54 @@ struct MANGOS_DLL_DECL boss_priestess_lackey_commonAI : public ScriptedAI pDelrissa->AI()->KilledUnit(pVictim); } - void AcquireGuids() + // Return true to handle shared timers and MeleeAttack + virtual bool UpdateCompanionAI(const uint32 uiDiff) { return true; } + + void UpdateAI(const uint32 uiDiff) { - if (!m_pInstance) + // Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - if (Creature* pDelrissa = m_pInstance->GetSingleCreatureFromStorage(NPC_DELRISSA)) - { - boss_priestess_delrissaAI* pDelrissaAI = dynamic_cast(pDelrissa->AI()); - - if (!pDelrissaAI) - return; - - for(uint8 i = 0; i < MAX_ACTIVE_LACKEY; ++i) - m_aLackeyGuid[i] = pDelrissaAI->m_aLackeyGuid[i]; - } - } + // Call specific virtual function + if (!UpdateCompanionAI(uiDiff)) + return; - void UpdateAI(const uint32 uiDiff) - { if (!m_bUsedPotion && m_creature->GetHealthPercent() < 25.0f) { - DoCastSpellIfCan(m_creature, SPELL_HEALING_POTION); - m_bUsedPotion = true; + if (DoCastSpellIfCan(m_creature, SPELL_HEALING_POTION) == CAST_OK) + m_bUsedPotion = true; } + // Change target if (m_uiResetThreatTimer < uiDiff) { - DoResetThreat(); - m_uiResetThreatTimer = urand(5000, 15000); - }else m_uiResetThreatTimer -= uiDiff; + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1)) + { + DoResetThreat(); + AttackStart(pTarget); + m_uiResetThreatTimer = urand(5000, 15000); + } + } + else + m_uiResetThreatTimer -= uiDiff; + + // Use the Medallion if CC - only on heroic. Not sure how many times they are allowed to use it. + if (!m_bIsRegularMode && m_uiMedallionTimer) + { + if (m_creature->isFrozen() || m_creature->hasUnitState(UNIT_STAT_CAN_NOT_REACT)) + { + if (m_uiMedallionTimer <= uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_MEDALLION, CAST_TRIGGERED) == CAST_OK) + m_uiMedallionTimer = 0; + } + else + m_uiMedallionTimer -= uiDiff; + } + } + + DoMeleeAttackIfReady(); } }; @@ -479,234 +368,296 @@ enum SPELL_KICK = 27613, SPELL_VANISH = 44290, SPELL_BACKSTAB = 15657, - SPELL_EVISCERATE = 27611 + SPELL_BACKSTAB_H = 15582, + SPELL_EVISCERATE = 27611, + SPELL_EVISCERATE_H = 46189, }; -struct MANGOS_DLL_DECL boss_kagani_nightstrikeAI : public boss_priestess_lackey_commonAI +/*###### +## npc_kagani_nightstrike - Rogue +######*/ + +struct MANGOS_DLL_DECL npc_kagani_nightstrikeAI : public priestess_companion_commonAI { - //Rogue - boss_kagani_nightstrikeAI(Creature* pCreature) : boss_priestess_lackey_commonAI(pCreature) { Reset(); } + npc_kagani_nightstrikeAI(Creature* pCreature) : priestess_companion_commonAI(pCreature) { Reset(); } - uint32 Gouge_Timer; - uint32 Kick_Timer; - uint32 Vanish_Timer; - uint32 Eviscerate_Timer; - uint32 Wait_Timer; - bool InVanish; + uint32 m_uiGougeTimer; + uint32 m_uiKickTimer; + uint32 m_uiVanishTimer; + uint32 m_uiEviscerateTimer; + uint32 m_uiVanishEndTimer; void Reset() { - Gouge_Timer = 5500; - Kick_Timer = 7000; - Vanish_Timer = 2000; - Eviscerate_Timer = 6000; - Wait_Timer = 5000; - InVanish = false; - m_creature->SetVisibility(VISIBILITY_ON); - - boss_priestess_lackey_commonAI::Reset(); + m_uiGougeTimer = 5500; + m_uiKickTimer = 7000; + m_uiVanishTimer = 2000; + m_uiEviscerateTimer = 6000; + m_uiVanishEndTimer = 0; + + priestess_companion_commonAI::Reset(); } - void UpdateAI(const uint32 diff) + void EnterEvadeMode() { - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + if (m_uiVanishEndTimer) return; - boss_priestess_lackey_commonAI::UpdateAI(diff); + ScriptedAI::EnterEvadeMode(); + } - if (Vanish_Timer < diff) + bool UpdateCompanionAI(const uint32 uiDiff) + { + if (m_uiVanishEndTimer) { - DoCastSpellIfCan(m_creature, SPELL_VANISH); - - Unit* pUnit = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0); - - DoResetThreat(); - - if (pUnit) - m_creature->AddThreat(pUnit, 1000.0f); + if (m_uiVanishEndTimer <= uiDiff) + { + DoCastSpellIfCan(m_creature->getVictim(), SPELL_BACKSTAB, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature->getVictim(), SPELL_KIDNEY_SHOT, CAST_TRIGGERED); + m_uiVanishEndTimer = 0; + } + else + m_uiVanishEndTimer -= uiDiff; - InVanish = true; - Vanish_Timer = 30000; - Wait_Timer = 10000; - }else Vanish_Timer -= diff; + return false; + } - if (InVanish) + if (m_uiVanishTimer < uiDiff) { - if (Wait_Timer < diff) + if (DoCastSpellIfCan(m_creature, SPELL_VANISH) == CAST_OK) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_BACKSTAB, CAST_TRIGGERED); - DoCastSpellIfCan(m_creature->getVictim(), SPELL_KIDNEY_SHOT, CAST_TRIGGERED); - m_creature->SetVisibility(VISIBILITY_ON); // ...? Hacklike - InVanish = false; - }else Wait_Timer -= diff; + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + DoResetThreat(); + AttackStart(pTarget); + } + + m_uiVanishTimer = 30000; + m_uiVanishEndTimer = 10000; + } } + else + m_uiVanishTimer -= uiDiff; - if (Gouge_Timer < diff) + if (m_uiGougeTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_GOUGE); - Gouge_Timer = 5500; - }else Gouge_Timer -= diff; + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_GOUGE) == CAST_OK) + m_uiGougeTimer = 5500; + } + else + m_uiGougeTimer -= uiDiff; - if (Kick_Timer < diff) + if (m_uiKickTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_KICK); - Kick_Timer = 7000; - }else Kick_Timer -= diff; + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_KICK) == CAST_OK) + m_uiKickTimer = 7000; + } + else + m_uiKickTimer -= uiDiff; - if (Eviscerate_Timer < diff) + if (m_uiEviscerateTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_EVISCERATE); - Eviscerate_Timer = 4000; - }else Eviscerate_Timer -= diff; + if (DoCastSpellIfCan(m_creature->getVictim(), m_bIsRegularMode ? SPELL_EVISCERATE : SPELL_EVISCERATE_H) == CAST_OK) + m_uiEviscerateTimer = 4000; + } + else + m_uiEviscerateTimer -= uiDiff; - if (!InVanish) - DoMeleeAttackIfReady(); + return true; } }; -CreatureAI* GetAI_boss_kagani_nightstrike(Creature* pCreature) +CreatureAI* GetAI_npc_kagani_nightstrike(Creature* pCreature) { - return new boss_kagani_nightstrikeAI(pCreature); + return new npc_kagani_nightstrikeAI(pCreature); } enum { SPELL_IMMOLATE = 44267, + SPELL_IMMOLATE_H = 46191, SPELL_SHADOW_BOLT = 12471, + SPELL_SHADOW_BOLT_H = 15232, SPELL_SEED_OF_CORRUPTION = 44141, SPELL_CURSE_OF_AGONY = 14875, + SPELL_CURSE_OF_AGONY_H = 46190, SPELL_FEAR = 38595, - SPELL_IMP_FIREBALL = 44164, - SPELL_SUMMON_IMP = 44163 + SPELL_DEATH_COIL = 44142, + SPELL_SUMMON_IMP = 44163, + + NPC_FIZZLE = 24656, }; -struct MANGOS_DLL_DECL boss_ellris_duskhallowAI : public boss_priestess_lackey_commonAI +/*###### +## npc_ellris_duskhallow - Warlock +######*/ + +struct MANGOS_DLL_DECL npc_ellris_duskhallowAI : public priestess_companion_commonAI { - //Warlock - boss_ellris_duskhallowAI(Creature* pCreature) : boss_priestess_lackey_commonAI(pCreature) { Reset(); } + npc_ellris_duskhallowAI(Creature* pCreature) : priestess_companion_commonAI(pCreature) { Reset(); } - uint32 Immolate_Timer; - uint32 Shadow_Bolt_Timer; - uint32 Seed_of_Corruption_Timer; - uint32 Curse_of_Agony_Timer; - uint32 Fear_Timer; + uint32 m_uiImmolateTimer; + uint32 m_uiShadowBoltTimer; + uint32 m_uiSeedCorruptionTimer; + uint32 m_uiCurseAgonyTimer; + uint32 m_uiFearTimer; + uint32 m_uiDeathCoilTimer; void Reset() { - Immolate_Timer = 6000; - Shadow_Bolt_Timer = 3000; - Seed_of_Corruption_Timer = 2000; - Curse_of_Agony_Timer = 1000; - Fear_Timer = 10000; - - boss_priestess_lackey_commonAI::Reset(); + m_uiImmolateTimer = 6000; + m_uiShadowBoltTimer = 3000; + m_uiSeedCorruptionTimer = 2000; + m_uiCurseAgonyTimer = 1000; + m_uiFearTimer = 10000; + m_uiDeathCoilTimer = 8000; + + priestess_companion_commonAI::Reset(); + + // Check if we already have an imp summoned + if (!GetClosestCreatureWithEntry(m_creature, NPC_FIZZLE, 50.0f)) + DoCastSpellIfCan(m_creature, SPELL_SUMMON_IMP); } - void Aggro(Unit* pWho) + void AttackStart(Unit* pWho) { - DoCastSpellIfCan(m_creature,SPELL_SUMMON_IMP); + if (m_creature->Attack(pWho, true)) + { + m_creature->AddThreat(pWho); + m_creature->SetInCombatWith(pWho); + pWho->SetInCombatWith(m_creature); + DoStartMovement(pWho, 20.0f); + } } - void UpdateAI(const uint32 diff) + bool UpdateCompanionAI(const uint32 uiDiff) { - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - boss_priestess_lackey_commonAI::UpdateAI(diff); - - if (Immolate_Timer < diff) + if (m_uiImmolateTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_IMMOLATE); - Immolate_Timer = 6000; - }else Immolate_Timer -= diff; + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, m_bIsRegularMode ? SPELL_IMMOLATE : SPELL_IMMOLATE_H) == CAST_OK) + m_uiImmolateTimer = 6000; + } + } + else + m_uiImmolateTimer -= uiDiff; - if (Shadow_Bolt_Timer < diff) + if (m_uiShadowBoltTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_SHADOW_BOLT); - Shadow_Bolt_Timer = 5000; - }else Shadow_Bolt_Timer -= diff; + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, m_bIsRegularMode ? SPELL_SHADOW_BOLT : SPELL_SHADOW_BOLT_H) == CAST_OK) + m_uiShadowBoltTimer = 5000; + } + } + else + m_uiShadowBoltTimer -= uiDiff; - if (Seed_of_Corruption_Timer < diff) + if (m_uiSeedCorruptionTimer < uiDiff) { - if (Unit* pUnit = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) - DoCastSpellIfCan(pUnit, SPELL_SEED_OF_CORRUPTION); - - Seed_of_Corruption_Timer = 10000; - }else Seed_of_Corruption_Timer -= diff; + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, SPELL_SEED_OF_CORRUPTION) == CAST_OK) + m_uiSeedCorruptionTimer = 10000; + } + } + else + m_uiSeedCorruptionTimer -= uiDiff; - if (Curse_of_Agony_Timer < diff) + if (m_uiCurseAgonyTimer < uiDiff) { - if (Unit* pUnit = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) - DoCastSpellIfCan(pUnit, SPELL_CURSE_OF_AGONY); - - Curse_of_Agony_Timer = 13000; - }else Curse_of_Agony_Timer -= diff; + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, m_bIsRegularMode ? SPELL_CURSE_OF_AGONY : SPELL_CURSE_OF_AGONY_H) == CAST_OK) + m_uiCurseAgonyTimer = 13000; + } + } + else + m_uiCurseAgonyTimer -= uiDiff; - if (Fear_Timer < diff) + if (m_uiFearTimer < uiDiff) { - if (Unit* pUnit = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) - DoCastSpellIfCan(pUnit, SPELL_FEAR); + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, SPELL_FEAR) == CAST_OK) + m_uiFearTimer = 10000; + } + } + else + m_uiFearTimer -= uiDiff; - Fear_Timer = 10000; - }else Fear_Timer -= diff; + if (m_uiDeathCoilTimer < uiDiff) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, SPELL_DEATH_COIL) == CAST_OK) + m_uiDeathCoilTimer = urand(8000, 13000); + } + } + else + m_uiDeathCoilTimer -= uiDiff; - DoMeleeAttackIfReady(); + return true; } }; -CreatureAI* GetAI_ellris_duskhallow(Creature* pCreature) +CreatureAI* GetAI_npc_ellris_duskhallow(Creature* pCreature) { - return new boss_ellris_duskhallowAI(pCreature); + return new npc_ellris_duskhallowAI(pCreature); } enum { SPELL_KNOCKDOWN = 11428, + SPELL_KNOCKDOWN_H = 46183, SPELL_SNAP_KICK = 46182 }; -struct MANGOS_DLL_DECL boss_eramas_brightblazeAI : public boss_priestess_lackey_commonAI +/*###### +## npc_eramas_brightblaze - Monk +######*/ + +struct MANGOS_DLL_DECL npc_eramas_brightblazeAI : public priestess_companion_commonAI { - //Monk - boss_eramas_brightblazeAI(Creature* pCreature) : boss_priestess_lackey_commonAI(pCreature) { Reset(); } + npc_eramas_brightblazeAI(Creature* pCreature) : priestess_companion_commonAI(pCreature) { Reset(); } - uint32 Knockdown_Timer; - uint32 Snap_Kick_Timer; + uint32 m_uiKnockdownTimer; + uint32 m_uiSnapKickTimer; void Reset() { - Knockdown_Timer = 6000; - Snap_Kick_Timer = 4500; + m_uiKnockdownTimer = 6000; + m_uiSnapKickTimer = 4500; - boss_priestess_lackey_commonAI::Reset(); + priestess_companion_commonAI::Reset(); } - void UpdateAI(const uint32 diff) + bool UpdateCompanionAI(const uint32 uiDiff) { - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - boss_priestess_lackey_commonAI::UpdateAI(diff); - - if (Knockdown_Timer < diff) + if (m_uiKnockdownTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_KNOCKDOWN); - Knockdown_Timer = 6000; - }else Knockdown_Timer -= diff; + if (DoCastSpellIfCan(m_creature->getVictim(), m_bIsRegularMode ? SPELL_KNOCKDOWN : SPELL_KNOCKDOWN_H) == CAST_OK) + m_uiKnockdownTimer = 6000; + } + else + m_uiKnockdownTimer -= uiDiff; - if (Snap_Kick_Timer < diff) + if (m_uiSnapKickTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_SNAP_KICK); - Snap_Kick_Timer = 4500; - }else Snap_Kick_Timer -= diff; + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_SNAP_KICK) == CAST_OK) + m_uiSnapKickTimer = 4500; + } + else + m_uiSnapKickTimer -= uiDiff; - DoMeleeAttackIfReady(); + return true; } }; -CreatureAI* GetAI_eramas_brightblaze(Creature* pCreature) +CreatureAI* GetAI_npc_eramas_brightblaze(Creature* pCreature) { - return new boss_eramas_brightblazeAI(pCreature); + return new npc_eramas_brightblazeAI(pCreature); } enum @@ -714,108 +665,143 @@ enum SPELL_POLYMORPH = 13323, SPELL_ICE_BLOCK = 27619, SPELL_BLIZZARD = 44178, - SPELL_ICE_LANCE = 46194, - SPELL_CONE_OF_COLD = 38384, + SPELL_BLIZZARD_H = 46195, + SPELL_ICE_LANCE = 44176, + SPELL_ICE_LANCE_H = 46194, + SPELL_CONE_OF_COLD = 12611, + SPELL_CONE_OF_COLD_H = 38384, SPELL_FROSTBOLT = 15043, + SPELL_FROSTBOLT_H = 15530, SPELL_BLINK = 14514 }; -struct MANGOS_DLL_DECL boss_yazzaiAI : public boss_priestess_lackey_commonAI +/*###### +## npc_yazzai - Mage +######*/ + +struct MANGOS_DLL_DECL npc_yazzaiAI : public priestess_companion_commonAI { - //Mage - boss_yazzaiAI(Creature* pCreature) : boss_priestess_lackey_commonAI(pCreature) { Reset(); } + npc_yazzaiAI(Creature* pCreature) : priestess_companion_commonAI(pCreature) { Reset(); } - bool HasIceBlocked; + bool m_bHasIceBlocked; - uint32 Polymorph_Timer; - uint32 Ice_Block_Timer; - uint32 Wait_Timer; - uint32 Blizzard_Timer; - uint32 Ice_Lance_Timer; - uint32 Cone_of_Cold_Timer; - uint32 Frostbolt_Timer; - uint32 Blink_Timer; + uint32 m_uiPolymorphTimer; + uint32 m_uiIceBlockTimer; + uint32 m_uiWait_Timer; + uint32 m_uiBlizzardTimer; + uint32 m_uiIceLanceTimer; + uint32 m_uiConeColdTimer; + uint32 m_uiFrostboltTimer; + uint32 m_uiBlinkTimer; void Reset() { - HasIceBlocked = false; - - Polymorph_Timer = 1000; - Ice_Block_Timer = 20000; - Wait_Timer = 10000; - Blizzard_Timer = 8000; - Ice_Lance_Timer = 12000; - Cone_of_Cold_Timer = 10000; - Frostbolt_Timer = 3000; - Blink_Timer = 8000; - - boss_priestess_lackey_commonAI::Reset(); + m_bHasIceBlocked = false; + + m_uiPolymorphTimer = 1000; + m_uiIceBlockTimer = 20000; + m_uiWait_Timer = 10000; + m_uiBlizzardTimer = 8000; + m_uiIceLanceTimer = 12000; + m_uiConeColdTimer = 10000; + m_uiFrostboltTimer = 3000; + m_uiBlinkTimer = 8000; + + priestess_companion_commonAI::Reset(); } - void UpdateAI(const uint32 diff) + void AttackStart(Unit* pWho) { - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - boss_priestess_lackey_commonAI::UpdateAI(diff); + if (m_creature->Attack(pWho, true)) + { + m_creature->AddThreat(pWho); + m_creature->SetInCombatWith(pWho); + pWho->SetInCombatWith(m_creature); + DoStartMovement(pWho, 20.0f); + } + } - if (Polymorph_Timer < diff) + bool UpdateCompanionAI(const uint32 uiDiff) + { + if (m_uiPolymorphTimer < uiDiff) { - if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) { - DoCastSpellIfCan(target, SPELL_POLYMORPH); - Polymorph_Timer = 20000; + if (DoCastSpellIfCan(pTarget, SPELL_POLYMORPH) == CAST_OK) + m_uiPolymorphTimer = 20000; } - }else Polymorph_Timer -= diff; + } + else + m_uiPolymorphTimer -= uiDiff; - if (m_creature->GetHealthPercent() < 35.0f && !HasIceBlocked) + if (m_creature->GetHealthPercent() < 35.0f && !m_bHasIceBlocked) { - DoCastSpellIfCan(m_creature, SPELL_ICE_BLOCK); - HasIceBlocked = true; + if (DoCastSpellIfCan(m_creature, SPELL_ICE_BLOCK) == CAST_OK) + m_bHasIceBlocked = true; } - if (Blizzard_Timer < diff) + if (m_uiBlizzardTimer < uiDiff) { - if (Unit* pUnit = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) - DoCastSpellIfCan(pUnit, SPELL_BLIZZARD); - - Blizzard_Timer = 8000; - }else Blizzard_Timer -= diff; + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, m_bIsRegularMode ? SPELL_BLIZZARD : SPELL_BLIZZARD_H) == CAST_OK) + m_uiBlizzardTimer = 8000; + } + } + else + m_uiBlizzardTimer -= uiDiff; - if (Ice_Lance_Timer < diff) + if (m_uiIceLanceTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_ICE_LANCE); - Ice_Lance_Timer = 12000; - }else Ice_Lance_Timer -= diff; + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, m_bIsRegularMode ? SPELL_ICE_LANCE : SPELL_ICE_LANCE_H) == CAST_OK) + m_uiIceLanceTimer = 12000; + } + } + else + m_uiIceLanceTimer -= uiDiff; - if (Cone_of_Cold_Timer < diff) + if (m_uiConeColdTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_CONE_OF_COLD); - Cone_of_Cold_Timer = 10000; - }else Cone_of_Cold_Timer -= diff; + if (DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_CONE_OF_COLD : SPELL_CONE_OF_COLD_H) == CAST_OK) + m_uiConeColdTimer = 10000; + } + else + m_uiConeColdTimer -= uiDiff; - if (Frostbolt_Timer < diff) + if (m_uiFrostboltTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_FROSTBOLT); - Frostbolt_Timer = 8000; - }else Frostbolt_Timer -= diff; + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, m_bIsRegularMode ? SPELL_FROSTBOLT : SPELL_FROSTBOLT_H) == CAST_OK) + m_uiFrostboltTimer = 8000; + } + } + else + m_uiFrostboltTimer -= uiDiff; - if (Blink_Timer < diff) + if (m_uiBlinkTimer < uiDiff) { //if anybody is in melee range than escape by blink if (m_creature->SelectAttackingTarget(ATTACKING_TARGET_TOPAGGRO, 0, uint32(0), SELECT_FLAG_IN_MELEE_RANGE)) - DoCastSpellIfCan(m_creature, SPELL_BLINK); - - Blink_Timer = 8000; - }else Blink_Timer -= diff; + { + if (DoCastSpellIfCan(m_creature, SPELL_BLINK) == CAST_OK) + m_uiBlinkTimer = 8000; + } + else + m_uiBlinkTimer = 2000; + } + else + m_uiBlinkTimer -= uiDiff; - DoMeleeAttackIfReady(); + return true; } }; -CreatureAI* GetAI_yazzai(Creature* pCreature) +CreatureAI* GetAI_npc_yazzai(Creature* pCreature) { - return new boss_yazzaiAI(pCreature); + return new npc_yazzaiAI(pCreature); } enum @@ -829,43 +815,41 @@ enum SPELL_MORTAL_STRIKE = 44268 }; -struct MANGOS_DLL_DECL boss_warlord_salarisAI : public boss_priestess_lackey_commonAI +/*###### +## npc_warlord_salaris - Warrior +######*/ + +struct MANGOS_DLL_DECL npc_warlord_salarisAI : public priestess_companion_commonAI { - //Warrior - boss_warlord_salarisAI(Creature* pCreature) : boss_priestess_lackey_commonAI(pCreature) { Reset(); } + npc_warlord_salarisAI(Creature* pCreature) : priestess_companion_commonAI(pCreature) { Reset(); } - uint32 Intercept_Stun_Timer; - uint32 Disarm_Timer; - uint32 Piercing_Howl_Timer; - uint32 Frightening_Shout_Timer; - uint32 Hamstring_Timer; - uint32 Mortal_Strike_Timer; + uint32 m_uiInterceptStunTimer; + uint32 m_uiDisarmTimer; + uint32 m_uiPiercingHowlTimer; + uint32 m_uiFrighteningShoutTimer; + uint32 m_uiHamstringTimer; + uint32 m_uiMortalStrikeTimer; void Reset() { - Intercept_Stun_Timer = 500; - Disarm_Timer = 6000; - Piercing_Howl_Timer = 10000; - Frightening_Shout_Timer = 18000; - Hamstring_Timer = 4500; - Mortal_Strike_Timer = 8000; - - boss_priestess_lackey_commonAI::Reset(); + m_uiInterceptStunTimer = 500; + m_uiDisarmTimer = 6000; + m_uiPiercingHowlTimer = 10000; + m_uiFrighteningShoutTimer = 18000; + m_uiHamstringTimer = 4500; + m_uiMortalStrikeTimer = 8000; + + priestess_companion_commonAI::Reset(); } - void Aggro(Unit* who) + void Aggro(Unit* pWho) { DoCastSpellIfCan(m_creature, SPELL_BATTLE_SHOUT); } - void UpdateAI(const uint32 diff) + bool UpdateCompanionAI(const uint32 uiDiff) { - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - boss_priestess_lackey_commonAI::UpdateAI(diff); - - if (Intercept_Stun_Timer < diff) + if (m_uiInterceptStunTimer < uiDiff) { //if nobody is in melee range than try to use Intercept if (!m_creature->SelectAttackingTarget(ATTACKING_TARGET_TOPAGGRO, 0, uint32(0), SELECT_FLAG_IN_MELEE_RANGE)) @@ -873,385 +857,401 @@ struct MANGOS_DLL_DECL boss_warlord_salarisAI : public boss_priestess_lackey_com if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0, SPELL_INTERCEPT_STUN, SELECT_FLAG_IN_LOS)) { if (DoCastSpellIfCan(pTarget, SPELL_INTERCEPT_STUN) == CAST_OK) - Intercept_Stun_Timer = 10000; + m_uiInterceptStunTimer = 10000; } } else - Intercept_Stun_Timer = 2000; - }else - Intercept_Stun_Timer -= diff; + m_uiInterceptStunTimer = 2000; + } + else + m_uiInterceptStunTimer -= uiDiff; - if (Disarm_Timer < diff) + if (m_uiDisarmTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_DISARM); - Disarm_Timer = 6000; - }else Disarm_Timer -= diff; + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_DISARM) == CAST_OK) + m_uiDisarmTimer = 6000; + } + else + m_uiDisarmTimer -= uiDiff; - if (Hamstring_Timer < diff) + if (m_uiHamstringTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_HAMSTRING); - Hamstring_Timer = 4500; - }else Hamstring_Timer -= diff; + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_HAMSTRING) == CAST_OK) + m_uiHamstringTimer = 4500; + } + else + m_uiHamstringTimer -= uiDiff; - if (Mortal_Strike_Timer < diff) + if (m_uiMortalStrikeTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_MORTAL_STRIKE); - Mortal_Strike_Timer = 4500; - }else Mortal_Strike_Timer -= diff; + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_MORTAL_STRIKE) == CAST_OK) + m_uiMortalStrikeTimer = 4500; + } + else + m_uiMortalStrikeTimer -= uiDiff; - if (Piercing_Howl_Timer < diff) + if (m_uiPiercingHowlTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_PIERCING_HOWL); - Piercing_Howl_Timer = 10000; - }else Piercing_Howl_Timer -= diff; + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_PIERCING_HOWL) == CAST_OK) + m_uiPiercingHowlTimer = 10000; + } + else + m_uiPiercingHowlTimer -= uiDiff; - if (Frightening_Shout_Timer < diff) + if (m_uiFrighteningShoutTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_FRIGHTENING_SHOUT); - Frightening_Shout_Timer = 18000; - }else Frightening_Shout_Timer -= diff; + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_FRIGHTENING_SHOUT) == CAST_OK) + m_uiFrighteningShoutTimer = 18000; + } + else + m_uiFrighteningShoutTimer -= uiDiff; - DoMeleeAttackIfReady(); + return true; } }; -CreatureAI* GetAI_warlord_salaris(Creature* pCreature) +CreatureAI* GetAI_npc_warlord_salaris(Creature* pCreature) { - return new boss_warlord_salarisAI(pCreature); + return new npc_warlord_salarisAI(pCreature); } enum { SPELL_AIMED_SHOT = 44271, SPELL_SHOOT = 15620, + SPELL_SHOOT_H = 22907, SPELL_CONCUSSIVE_SHOT = 27634, SPELL_MULTI_SHOT = 31942, + SPELL_MULTI_SHOT_H = 44285, SPELL_WING_CLIP = 44286, SPELL_FREEZING_TRAP = 44136, NPC_SLIVER = 24552 }; -struct MANGOS_DLL_DECL boss_garaxxasAI : public boss_priestess_lackey_commonAI -{ - //Hunter - boss_garaxxasAI(Creature* pCreature) : boss_priestess_lackey_commonAI(pCreature) - { - SetCombatMovement(false); - Reset(); - } +/*###### +## npc_garaxxas - Hunter +######*/ - ObjectGuid m_petGuid; +struct MANGOS_DLL_DECL npc_garaxxasAI : public priestess_companion_commonAI +{ + npc_garaxxasAI(Creature* pCreature) : priestess_companion_commonAI(pCreature) { Reset(); } - uint32 Aimed_Shot_Timer; - uint32 Shoot_Timer; - uint32 Concussive_Shot_Timer; - uint32 Multi_Shot_Timer; - uint32 Wing_Clip_Timer; - uint32 Freezing_Trap_Timer; + uint32 m_uiAimedShotTimer; + uint32 m_uiShootTimer; + uint32 m_uiConcussiveShotTimer; + uint32 m_uiMultiShotTimer; + uint32 m_uiWingClipTimer; + uint32 m_uiFreezingTrapTimer; void Reset() { - Aimed_Shot_Timer = 6000; - Shoot_Timer = 2500; - Concussive_Shot_Timer = 8000; - Multi_Shot_Timer = 10000; - Wing_Clip_Timer = 4000; - Freezing_Trap_Timer = 15000; - - Creature* pPet = m_creature->GetMap()->GetCreature(m_petGuid); - if (!pPet) - m_creature->SummonCreature(NPC_SLIVER, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_CORPSE_DESPAWN, 0); - - boss_priestess_lackey_commonAI::Reset(); + m_uiAimedShotTimer = 6000; + m_uiShootTimer = 2500; + m_uiConcussiveShotTimer = 8000; + m_uiMultiShotTimer = 10000; + m_uiWingClipTimer = 4000; + m_uiFreezingTrapTimer = 15000; + + priestess_companion_commonAI::Reset(); + + // Check if the pet was killed + if (!GetClosestCreatureWithEntry(m_creature, NPC_SLIVER, 50.0f)) + m_creature->SummonCreature(NPC_SLIVER, 0, 0, 0, 0, TEMPSUMMON_CORPSE_DESPAWN, 0); } - void JustSummoned(Creature* pSummoned) + void AttackStart(Unit* pWho) { - m_petGuid = pSummoned->GetObjectGuid(); + if (m_creature->Attack(pWho, true)) + { + m_creature->AddThreat(pWho); + m_creature->SetInCombatWith(pWho); + pWho->SetInCombatWith(m_creature); + DoStartMovement(pWho, 20.0f); + } } - void UpdateAI(const uint32 diff) + bool UpdateCompanionAI(const uint32 uiDiff) { - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - boss_priestess_lackey_commonAI::UpdateAI(diff); - if (m_creature->CanReachWithMeleeAttack(m_creature->getVictim())) { - if (Wing_Clip_Timer < diff) + if (m_uiWingClipTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_WING_CLIP); - Wing_Clip_Timer = 4000; - }else Wing_Clip_Timer -= diff; + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_WING_CLIP) == CAST_OK) + m_uiWingClipTimer = 4000; + } + else + m_uiWingClipTimer -= uiDiff; - if (Freezing_Trap_Timer < diff) + if (m_uiFreezingTrapTimer < uiDiff) { - //attempt find go summoned from spell (casted by m_creature) - GameObject* pGo = m_creature->GetGameObject(SPELL_FREEZING_TRAP); - - //if we have a pGo, we need to wait (only one trap at a time) - if (pGo) - Freezing_Trap_Timer = 2500; - else - { - //if pGo does not exist, then we can cast - DoCastSpellIfCan(m_creature->getVictim(), SPELL_FREEZING_TRAP); - Freezing_Trap_Timer = 15000; - } - }else Freezing_Trap_Timer -= diff; - - DoMeleeAttackIfReady(); + if (DoCastSpellIfCan(m_creature, SPELL_FREEZING_TRAP) == CAST_OK) + m_uiFreezingTrapTimer = urand(15000, 30000); + } + else + m_uiFreezingTrapTimer -= uiDiff; } else { - if (Concussive_Shot_Timer < diff) + if (m_uiConcussiveShotTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_CONCUSSIVE_SHOT); - Concussive_Shot_Timer = 8000; - }else Concussive_Shot_Timer -= diff; + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, SPELL_CONCUSSIVE_SHOT) == CAST_OK) + m_uiConcussiveShotTimer = 8000; + } + } + else + m_uiConcussiveShotTimer -= uiDiff; - if (Multi_Shot_Timer < diff) + if (m_uiMultiShotTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_MULTI_SHOT); - Multi_Shot_Timer = 10000; - }else Multi_Shot_Timer -= diff; + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, m_bIsRegularMode ? SPELL_MULTI_SHOT : SPELL_MULTI_SHOT_H) == CAST_OK) + m_uiMultiShotTimer = 10000; + } + } + else + m_uiMultiShotTimer -= uiDiff; - if (Aimed_Shot_Timer < diff) + if (m_uiAimedShotTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_AIMED_SHOT); - Aimed_Shot_Timer = 6000; - }else Aimed_Shot_Timer -= diff; + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, SPELL_AIMED_SHOT) == CAST_OK) + m_uiAimedShotTimer = 6000; + } + } + else + m_uiAimedShotTimer -= uiDiff; - if (Shoot_Timer < diff) + if (m_uiShootTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_SHOOT); - Shoot_Timer = 2500; - }else Shoot_Timer -= diff; + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, m_bIsRegularMode ? SPELL_SHOOT : SPELL_SHOOT_H) == CAST_OK) + m_uiShootTimer = 2500; + } + } + else + m_uiShootTimer -= uiDiff; } + + return true; } }; -CreatureAI* GetAI_garaxxas(Creature* pCreature) +CreatureAI* GetAI_npc_garaxxas(Creature* pCreature) { - return new boss_garaxxasAI(pCreature); + return new npc_garaxxasAI(pCreature); } enum { - SPELL_WINDFURY_TOTEM = 27621, SPELL_WAR_STOMP = 46026, SPELL_PURGE = 27626, SPELL_LESSER_HEALING_WAVE = 44256, + SPELL_LESSER_HEALING_WAVE_H = 46181, SPELL_FROST_SHOCK = 21401, + SPELL_FROST_SHOCK_H = 46180, + SPELL_WINDFURY_TOTEM = 27621, SPELL_FIRE_NOVA_TOTEM = 44257, SPELL_EARTHBIND_TOTEM = 15786 }; -struct MANGOS_DLL_DECL boss_apokoAI : public boss_priestess_lackey_commonAI +/*###### +## npc_apoko - Shaman +######*/ + +struct MANGOS_DLL_DECL npc_apokoAI : public priestess_companion_commonAI { - //Shaman - boss_apokoAI(Creature* pCreature) : boss_priestess_lackey_commonAI(pCreature) { Reset(); } + npc_apokoAI(Creature* pCreature) : priestess_companion_commonAI(pCreature) { Reset(); } - uint32 Totem_Timer; - uint8 Totem_Amount; - uint32 War_Stomp_Timer; - uint32 Purge_Timer; - uint32 Healing_Wave_Timer; - uint32 Frost_Shock_Timer; + uint32 m_uiTotemTimer; + uint32 m_uiWarStompTimer; + uint32 m_uiPurgeTimer; + uint32 m_uiHealingWaveTimer; + uint32 m_uiFrostShockTimer; void Reset() { - Totem_Timer = 2000; - Totem_Amount = 1; - War_Stomp_Timer = 10000; - Purge_Timer = 8000; - Healing_Wave_Timer = 5000; - Frost_Shock_Timer = 7000; - - boss_priestess_lackey_commonAI::Reset(); + m_uiTotemTimer = 0; + m_uiWarStompTimer = 10000; + m_uiPurgeTimer = 8000; + m_uiHealingWaveTimer = 5000; + m_uiFrostShockTimer = 7000; + + priestess_companion_commonAI::Reset(); } - void UpdateAI(const uint32 diff) + bool UpdateCompanionAI(const uint32 uiDiff) { - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - boss_priestess_lackey_commonAI::UpdateAI(diff); - - if (Totem_Timer < diff) + if (m_uiTotemTimer < uiDiff) { - switch(urand(0, 2)) + // It's not very clear how exactly these spells should be cast + switch (urand(0, 2)) { - case 0: DoCastSpellIfCan(m_creature, SPELL_WINDFURY_TOTEM); break; + case 0: DoCastSpellIfCan(m_creature, SPELL_WINDFURY_TOTEM); break; case 1: DoCastSpellIfCan(m_creature, SPELL_FIRE_NOVA_TOTEM); break; case 2: DoCastSpellIfCan(m_creature, SPELL_EARTHBIND_TOTEM); break; } - ++Totem_Amount; - Totem_Timer = Totem_Amount*2000; - }else Totem_Timer -= diff; + m_uiTotemTimer = urand(2000, 6000); + } + else + m_uiTotemTimer -= uiDiff; - if (War_Stomp_Timer < diff) + if (m_uiWarStompTimer < uiDiff) { - DoCastSpellIfCan(m_creature, SPELL_WAR_STOMP); - War_Stomp_Timer = 10000; - }else War_Stomp_Timer -= diff; + if (DoCastSpellIfCan(m_creature, SPELL_WAR_STOMP) == CAST_OK) + m_uiWarStompTimer = 10000; + } + else + m_uiWarStompTimer -= uiDiff; - if (Purge_Timer < diff) + if (m_uiPurgeTimer < uiDiff) { - if (Unit* pUnit = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) - DoCastSpellIfCan(pUnit, SPELL_PURGE); - - Purge_Timer = 15000; - }else Purge_Timer -= diff; + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, SPELL_PURGE) == CAST_OK) + m_uiPurgeTimer = 15000; + } + } + else + m_uiPurgeTimer -= uiDiff; - if (Frost_Shock_Timer < diff) + if (m_uiFrostShockTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_FROST_SHOCK); - Frost_Shock_Timer = 7000; - }else Frost_Shock_Timer -= diff; + if (DoCastSpellIfCan(m_creature->getVictim(), m_bIsRegularMode ? SPELL_FROST_SHOCK : SPELL_FROST_SHOCK_H) == CAST_OK) + m_uiFrostShockTimer = 7000; + } + else + m_uiFrostShockTimer -= uiDiff; - if (Healing_Wave_Timer < diff) + if (m_uiHealingWaveTimer < uiDiff) { - // std::vector::iterator itr = Group.begin() + rand()%Group.size(); - // ObjectGuid guid = (*itr)->guid; - // if (guid) - // { - // Unit* pAdd = m_creature->GetMap()->GetUnit((*itr)->guid); - // if (pAdd && pAdd->isAlive()) - // { - DoCastSpellIfCan(m_creature, SPELL_LESSER_HEALING_WAVE); - Healing_Wave_Timer = 5000; - // } - // } - }else Healing_Wave_Timer -= diff; + if (Unit* pTarget = DoSelectLowestHpFriendly(50.0f)) + { + if (DoCastSpellIfCan(pTarget, m_bIsRegularMode ? SPELL_LESSER_HEALING_WAVE : SPELL_LESSER_HEALING_WAVE_H) == CAST_OK) + m_uiHealingWaveTimer = 5000; + } + } + else + m_uiHealingWaveTimer -= uiDiff; - DoMeleeAttackIfReady(); + return true; } }; -CreatureAI* GetAI_apoko(Creature* pCreature) +CreatureAI* GetAI_npc_apoko(Creature* pCreature) { - return new boss_apokoAI(pCreature); + return new npc_apokoAI(pCreature); } enum { SPELL_GOBLIN_DRAGON_GUN = 44272, + SPELL_GOBLIN_DRAGON_GUN_H = 46185, SPELL_ROCKET_LAUNCH = 44137, + SPELL_ROCKET_LAUNCH_H = 46187, SPELL_RECOMBOBULATE = 44274, SPELL_HIGH_EXPLOSIVE_SHEEP = 44276, SPELL_FEL_IRON_BOMB = 46024, - SPELL_SHEEP_EXPLOSION = 44279 + SPELL_FEL_IRON_BOMB_H = 46184, }; -struct MANGOS_DLL_DECL boss_zelfanAI : public boss_priestess_lackey_commonAI +/*###### +## npc_zelfan - Engineer +######*/ + +struct MANGOS_DLL_DECL npc_zelfanAI : public priestess_companion_commonAI { - //Engineer - boss_zelfanAI(Creature* pCreature) : boss_priestess_lackey_commonAI(pCreature) { Reset(); } + npc_zelfanAI(Creature* pCreature) : priestess_companion_commonAI(pCreature) { Reset(); } - uint32 Goblin_Dragon_Gun_Timer; - uint32 Rocket_Launch_Timer; - uint32 Recombobulate_Timer; - uint32 High_Explosive_Sheep_Timer; - uint32 Fel_Iron_Bomb_Timer; + uint32 m_uiGoblinDragonGunTimer; + uint32 m_uiRocketLaunchTimer; + uint32 m_uiRecombobulateTimer; + uint32 m_uiHighExplosiveSheepTimer; + uint32 m_uiFelIronBombTimer; void Reset() { - Goblin_Dragon_Gun_Timer = 20000; - Rocket_Launch_Timer = 7000; - Recombobulate_Timer = 4000; - High_Explosive_Sheep_Timer = 10000; - Fel_Iron_Bomb_Timer = 15000; + m_uiGoblinDragonGunTimer = 20000; + m_uiRocketLaunchTimer = 7000; + m_uiRecombobulateTimer = 4000; + m_uiHighExplosiveSheepTimer = 10000; + m_uiFelIronBombTimer = 15000; - boss_priestess_lackey_commonAI::Reset(); + priestess_companion_commonAI::Reset(); } - void UpdateAI(const uint32 diff) + void JustSummoned(Creature* pSummoned) { - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - boss_priestess_lackey_commonAI::UpdateAI(diff); + if (m_creature->getVictim()) + pSummoned->AI()->AttackStart(m_creature->getVictim()); + } - if (Goblin_Dragon_Gun_Timer < diff) + bool UpdateCompanionAI(const uint32 uiDiff) + { + if (m_uiGoblinDragonGunTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_GOBLIN_DRAGON_GUN); - Goblin_Dragon_Gun_Timer = 10000; - }else Goblin_Dragon_Gun_Timer -= diff; + if (DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_GOBLIN_DRAGON_GUN : SPELL_GOBLIN_DRAGON_GUN_H) == CAST_OK) + m_uiGoblinDragonGunTimer = urand(10000, 20000); + } + else + m_uiGoblinDragonGunTimer -= uiDiff; - if (Rocket_Launch_Timer < diff) + if (m_uiRocketLaunchTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_ROCKET_LAUNCH); - Rocket_Launch_Timer = 9000; - }else Rocket_Launch_Timer -= diff; + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, m_bIsRegularMode ? SPELL_ROCKET_LAUNCH : SPELL_ROCKET_LAUNCH_H) == CAST_OK) + m_uiRocketLaunchTimer = 9000; + } + } + else + m_uiRocketLaunchTimer -= uiDiff; - if (Fel_Iron_Bomb_Timer < diff) + if (m_uiFelIronBombTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_FEL_IRON_BOMB); - Fel_Iron_Bomb_Timer = 15000; - }else Fel_Iron_Bomb_Timer -= diff; + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, m_bIsRegularMode ? SPELL_FEL_IRON_BOMB : SPELL_FEL_IRON_BOMB_H) == CAST_OK) + m_uiFelIronBombTimer = 15000; + } + } + else + m_uiFelIronBombTimer -= uiDiff; - if (Recombobulate_Timer < diff) + if (m_uiRecombobulateTimer < uiDiff) { - for(uint8 i = 0; i < MAX_ACTIVE_LACKEY; ++i) + // This should cast only on polymorphed targets + if (Unit* pTarget = DoSelectLowestHpFriendly(50.0f)) { - if (Creature* pAdd = m_creature->GetMap()->GetCreature(m_aLackeyGuid[i])) - { - if (pAdd->IsPolymorphed()) - { - DoCastSpellIfCan(pAdd, SPELL_RECOMBOBULATE); - break; - } - } + if (DoCastSpellIfCan(pTarget, SPELL_RECOMBOBULATE) == CAST_OK) + m_uiRecombobulateTimer = 2000; } - Recombobulate_Timer = 2000; - }else Recombobulate_Timer -= diff; + } + else + m_uiRecombobulateTimer -= uiDiff; - if (High_Explosive_Sheep_Timer < diff) + if (m_uiHighExplosiveSheepTimer < uiDiff) { - DoCastSpellIfCan(m_creature, SPELL_HIGH_EXPLOSIVE_SHEEP); - High_Explosive_Sheep_Timer = 65000; - }else High_Explosive_Sheep_Timer -= diff; + if (DoCastSpellIfCan(m_creature, SPELL_HIGH_EXPLOSIVE_SHEEP) == CAST_OK) + m_uiHighExplosiveSheepTimer = 65000; + } + else + m_uiHighExplosiveSheepTimer -= uiDiff; - DoMeleeAttackIfReady(); + return true; } }; -CreatureAI* GetAI_zelfan(Creature* pCreature) +CreatureAI* GetAI_npc_zelfan(Creature* pCreature) { - return new boss_zelfanAI(pCreature); + return new npc_zelfanAI(pCreature); } -//struct MANGOS_DLL_DECL mob_high_explosive_sheepAI : public ScriptedAI -//{ -// mob_high_explosive_sheepAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} -// -// uint32 Explosion_Timer; -// -// void Reset() -// { -// Explosion_Timer = 60000; -// } -// -// void JustDied(Unit *Killer){} -// -// void UpdateAI(const uint32 diff) -// { -// if (Explosion_Timer < diff) -// { -// DoCastSpellIfCan(m_creature->getVictim(), SPELL_SHEEP_EXPLOSION); -// }else -// Explosion_Timer -= diff; -// } -//}; - -//CreatureAI* GetAI_mob_high_explosive_sheep(Creature* pCreature) -//{ -// return new mob_high_explosive_sheepAI(pCreature); -//}; - void AddSC_boss_priestess_delrissa() { Script* pNewScript; @@ -1262,47 +1262,42 @@ void AddSC_boss_priestess_delrissa() pNewScript->RegisterSelf(); pNewScript = new Script; - pNewScript->Name = "boss_kagani_nightstrike"; - pNewScript->GetAI = &GetAI_boss_kagani_nightstrike; + pNewScript->Name = "npc_kagani_nightstrike"; + pNewScript->GetAI = &GetAI_npc_kagani_nightstrike; pNewScript->RegisterSelf(); pNewScript = new Script; - pNewScript->Name = "boss_ellris_duskhallow"; - pNewScript->GetAI = &GetAI_ellris_duskhallow; + pNewScript->Name = "npc_ellris_duskhallow"; + pNewScript->GetAI = &GetAI_npc_ellris_duskhallow; pNewScript->RegisterSelf(); pNewScript = new Script; - pNewScript->Name = "boss_eramas_brightblaze"; - pNewScript->GetAI = &GetAI_eramas_brightblaze; + pNewScript->Name = "npc_eramas_brightblaze"; + pNewScript->GetAI = &GetAI_npc_eramas_brightblaze; pNewScript->RegisterSelf(); pNewScript = new Script; - pNewScript->Name = "boss_yazzai"; - pNewScript->GetAI = &GetAI_yazzai; + pNewScript->Name = "npc_yazzai"; + pNewScript->GetAI = &GetAI_npc_yazzai; pNewScript->RegisterSelf(); pNewScript = new Script; - pNewScript->Name = "boss_warlord_salaris"; - pNewScript->GetAI = &GetAI_warlord_salaris; + pNewScript->Name = "npc_warlord_salaris"; + pNewScript->GetAI = &GetAI_npc_warlord_salaris; pNewScript->RegisterSelf(); pNewScript = new Script; - pNewScript->Name = "boss_garaxxas"; - pNewScript->GetAI = &GetAI_garaxxas; + pNewScript->Name = "npc_garaxxas"; + pNewScript->GetAI = &GetAI_npc_garaxxas; pNewScript->RegisterSelf(); pNewScript = new Script; - pNewScript->Name = "boss_apoko"; - pNewScript->GetAI = &GetAI_apoko; + pNewScript->Name = "npc_apoko"; + pNewScript->GetAI = &GetAI_npc_apoko; pNewScript->RegisterSelf(); pNewScript = new Script; - pNewScript->Name = "boss_zelfan"; - pNewScript->GetAI = &GetAI_zelfan; + pNewScript->Name = "npc_zelfan"; + pNewScript->GetAI = &GetAI_npc_zelfan; pNewScript->RegisterSelf(); - - /*pNewScript = new Script; - pNewScript->Name = "mob_high_explosive_sheep"; - pNewScript->GetAI = &GetAI_mob_high_explosive_sheep; - pNewScript->RegisterSelf();*/ } diff --git a/scripts/eastern_kingdoms/magisters_terrace/instance_magisters_terrace.cpp b/scripts/eastern_kingdoms/magisters_terrace/instance_magisters_terrace.cpp index bad417480..07bf5c636 100644 --- a/scripts/eastern_kingdoms/magisters_terrace/instance_magisters_terrace.cpp +++ b/scripts/eastern_kingdoms/magisters_terrace/instance_magisters_terrace.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: Instance_Magisters_Terrace -SD%Complete: 60 -SDComment: Designed only for Selin Fireheart +SD%Complete: 80 +SDComment: SDCategory: Magister's Terrace EndScriptData */ @@ -50,6 +50,15 @@ void instance_magisters_terrace::OnCreatureCreate(Creature* pCreature) case NPC_DELRISSA: case NPC_KALECGOS_DRAGON: case NPC_KAELTHAS: + // insert Delrissa adds here, for better handling + case NPC_KAGANI: + case NPC_ELLRYS: + case NPC_ERAMAS: + case NPC_YAZZAI: + case NPC_SALARIS: + case NPC_GARAXXAS: + case NPC_APOKO: + case NPC_ZELFAN: m_mNpcEntryGuidStore[pCreature->GetEntry()] = pCreature->GetObjectGuid(); break; case NPC_FEL_CRYSTAL: @@ -85,6 +94,36 @@ void instance_magisters_terrace::OnObjectCreate(GameObject* pGo) m_mGoEntryGuidStore[pGo->GetEntry()] = pGo->GetObjectGuid(); } +void instance_magisters_terrace::OnCreatureDeath(Creature* pCreature) +{ + switch (pCreature->GetEntry()) + { + case NPC_KAGANI: + case NPC_ELLRYS: + case NPC_ERAMAS: + case NPC_YAZZAI: + case NPC_SALARIS: + case NPC_GARAXXAS: + case NPC_APOKO: + case NPC_ZELFAN: + ++m_uiDelrissaDeathCount; + if (m_uiDelrissaDeathCount == MAX_DELRISSA_ADDS) + SetData(TYPE_DELRISSA, SPECIAL); + // yell on summoned death + if (Creature* pDelrissa = GetSingleCreatureFromStorage(NPC_DELRISSA)) + { + if (pDelrissa->isAlive()) + DoScriptText(aDelrissaAddDeath[m_uiDelrissaDeathCount - 1], pDelrissa); + else if (GetData(TYPE_DELRISSA) == SPECIAL) + { + SetData(TYPE_DELRISSA, DONE); + pDelrissa->SetFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE); + } + } + break; + } +} + void instance_magisters_terrace::SetData(uint32 uiType, uint32 uiData) { switch (uiType) @@ -137,12 +176,6 @@ void instance_magisters_terrace::SetData(uint32 uiType, uint32 uiData) DoToggleGameObjectFlags(GO_ESCAPE_QUEL_DANAS, GO_FLAG_NO_INTERACT, false); m_auiEncounter[uiType] = uiData; break; - case TYPE_DELRISSA_DEATH_COUNT: - if (uiData == SPECIAL) - ++m_uiDelrissaDeathCount; - else - m_uiDelrissaDeathCount = 0; - return; } if (uiData == DONE) @@ -183,17 +216,10 @@ void instance_magisters_terrace::Load(const char* chrIn) uint32 instance_magisters_terrace::GetData(uint32 uiType) { - switch (uiType) - { - case TYPE_SELIN: return m_auiEncounter[0]; - case TYPE_VEXALLUS: return m_auiEncounter[1]; - case TYPE_DELRISSA: return m_auiEncounter[2]; - case TYPE_KAELTHAS: return m_auiEncounter[3]; - case TYPE_DELRISSA_DEATH_COUNT: return m_uiDelrissaDeathCount; + if (uiType < MAX_ENCOUNTER) + return m_auiEncounter[uiType]; - default: - return 0; - } + return 0; } InstanceData* GetInstanceData_instance_magisters_terrace(Map* pMap) diff --git a/scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.h b/scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.h index 5a047c66a..ea3fb9706 100644 --- a/scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.h +++ b/scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.h @@ -8,20 +8,29 @@ enum { MAX_ENCOUNTER = 4, + MAX_DELRISSA_ADDS = 4, TYPE_SELIN = 0, TYPE_VEXALLUS = 1, TYPE_DELRISSA = 2, TYPE_KAELTHAS = 3, - TYPE_DELRISSA_DEATH_COUNT = 4, - NPC_SELIN_FIREHEART = 24723, NPC_DELRISSA = 24560, NPC_FEL_CRYSTAL = 24722, NPC_KALECGOS_DRAGON = 24844, NPC_KAELTHAS = 24664, + // Delrissa adds + NPC_KAGANI = 24557, + NPC_ELLRYS = 24558, + NPC_ERAMAS = 24554, + NPC_YAZZAI = 24561, + NPC_SALARIS = 24559, + NPC_GARAXXAS = 24555, + NPC_APOKO = 24553, + NPC_ZELFAN = 24556, + GO_VEXALLUS_DOOR = 187896, GO_SELIN_DOOR = 187979, // SunwellRaid Gate 02 GO_DELRISSA_DOOR = 187770, @@ -33,6 +42,8 @@ enum GO_ESCAPE_QUEL_DANAS = 188173, }; +static const int32 aDelrissaAddDeath[MAX_DELRISSA_ADDS] = {-1585013, -1585014, -1585015, -1585016}; + class MANGOS_DLL_DECL instance_magisters_terrace : public ScriptedInstance { public: @@ -43,6 +54,8 @@ class MANGOS_DLL_DECL instance_magisters_terrace : public ScriptedInstance void OnCreatureCreate(Creature* pCreature); void OnObjectCreate(GameObject* pGo); + void OnCreatureDeath(Creature* pCreature); + uint32 GetData(uint32 uiType); void SetData(uint32 uiType, uint32 uiData); diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index c2ae701c0..48ad0c857 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2622" + #define SD2_REVISION_NR "2623" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 497457977..857d017c8 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -785,15 +785,14 @@ UPDATE creature_template SET ScriptName='mob_fel_crystal' WHERE entry=24722; UPDATE creature_template SET ScriptName='boss_vexallus' WHERE entry=24744; UPDATE creature_template SET ScriptName='mob_pure_energy' WHERE entry=24745; UPDATE creature_template SET ScriptName='boss_priestess_delrissa' WHERE entry=24560; -UPDATE creature_template SET ScriptName='boss_kagani_nightstrike' WHERE entry=24557; -UPDATE creature_template SET ScriptName='boss_ellris_duskhallow' WHERE entry=24558; -UPDATE creature_template SET ScriptName='boss_eramas_brightblaze' WHERE entry=24554; -UPDATE creature_template SET ScriptName='boss_yazzai' WHERE entry=24561; -UPDATE creature_template SET ScriptName='boss_warlord_salaris' WHERE entry=24559; -UPDATE creature_template SET ScriptName='boss_garaxxas' WHERE entry=24555; --- UPDATE creature_template SET ScriptName='mob_sliver' WHERE entry=24552; -UPDATE creature_template SET ScriptName='boss_apoko' WHERE entry=24553; -UPDATE creature_template SET ScriptName='boss_zelfan' WHERE entry=24556; +UPDATE creature_template SET ScriptName='npc_kagani_nightstrike' WHERE entry=24557; +UPDATE creature_template SET ScriptName='npc_ellris_duskhallow' WHERE entry=24558; +UPDATE creature_template SET ScriptName='npc_eramas_brightblaze' WHERE entry=24554; +UPDATE creature_template SET ScriptName='npc_yazzai' WHERE entry=24561; +UPDATE creature_template SET ScriptName='npc_warlord_salaris' WHERE entry=24559; +UPDATE creature_template SET ScriptName='npc_garaxxas' WHERE entry=24555; +UPDATE creature_template SET ScriptName='npc_apoko' WHERE entry=24553; +UPDATE creature_template SET ScriptName='npc_zelfan' WHERE entry=24556; UPDATE creature_template SET ScriptName='boss_felblood_kaelthas' WHERE entry=24664; UPDATE creature_template SET ScriptName='mob_arcane_sphere' WHERE entry=24708; UPDATE creature_template SET ScriptName='mob_felkael_phoenix' WHERE entry=24674; diff --git a/sql/updates/r2623_mangos.sql b/sql/updates/r2623_mangos.sql new file mode 100644 index 000000000..1cce2b13a --- /dev/null +++ b/sql/updates/r2623_mangos.sql @@ -0,0 +1,8 @@ +UPDATE creature_template SET ScriptName='npc_kagani_nightstrike' WHERE entry=24557; +UPDATE creature_template SET ScriptName='npc_ellris_duskhallow' WHERE entry=24558; +UPDATE creature_template SET ScriptName='npc_eramas_brightblaze' WHERE entry=24554; +UPDATE creature_template SET ScriptName='npc_yazzai' WHERE entry=24561; +UPDATE creature_template SET ScriptName='npc_warlord_salaris' WHERE entry=24559; +UPDATE creature_template SET ScriptName='npc_garaxxas' WHERE entry=24555; +UPDATE creature_template SET ScriptName='npc_apoko' WHERE entry=24553; +UPDATE creature_template SET ScriptName='npc_zelfan' WHERE entry=24556; From 658b8f81d1c9f085cf5b68a3978bbd2aafea349f Mon Sep 17 00:00:00 2001 From: Xfurry Date: Tue, 10 Jul 2012 11:11:54 +0300 Subject: [PATCH 0612/1172] [2624] Improve companions handling for Malacrass - Zul'Aman Also add a few minor updates to Priestess Delrissa Note: Malacrass companion scripts can be moved to eventAI --- .../boss_priestess_delrissa.cpp | 33 +- .../zulaman/boss_malacrass.cpp | 306 +++++++----------- .../zulaman/instance_zulaman.cpp | 9 + scripts/eastern_kingdoms/zulaman/zulaman.h | 10 + sd2_revision_nr.h | 2 +- 5 files changed, 159 insertions(+), 201 deletions(-) diff --git a/scripts/eastern_kingdoms/magisters_terrace/boss_priestess_delrissa.cpp b/scripts/eastern_kingdoms/magisters_terrace/boss_priestess_delrissa.cpp index 0efa15a01..3d3503da2 100644 --- a/scripts/eastern_kingdoms/magisters_terrace/boss_priestess_delrissa.cpp +++ b/scripts/eastern_kingdoms/magisters_terrace/boss_priestess_delrissa.cpp @@ -217,7 +217,15 @@ struct MANGOS_DLL_DECL boss_priestess_delrissaAI : public ScriptedAI if (m_uiDispelTimer < uiDiff) { - if (Unit* pTarget = DoSelectLowestHpFriendly(50.0f)) + Unit* pTarget = NULL; + std::list lTempList = DoFindFriendlyCC(50.0f); + + if (!lTempList.empty()) + pTarget = *(lTempList.begin()); + else + pTarget = DoSelectLowestHpFriendly(50.0f); + + if (pTarget) { if (DoCastSpellIfCan(pTarget, SPELL_DISPEL_MAGIC) == CAST_OK) m_uiDispelTimer = urand(12000, 15000); @@ -426,7 +434,8 @@ struct MANGOS_DLL_DECL npc_kagani_nightstrikeAI : public priestess_companion_com { if (DoCastSpellIfCan(m_creature, SPELL_VANISH) == CAST_OK) { - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + // Prefer targets with mana + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0, uint32(0), SELECT_FLAG_POWER_MANA)) { DoResetThreat(); AttackStart(pTarget); @@ -745,7 +754,7 @@ struct MANGOS_DLL_DECL npc_yazzaiAI : public priestess_companion_commonAI if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) { if (DoCastSpellIfCan(pTarget, m_bIsRegularMode ? SPELL_BLIZZARD : SPELL_BLIZZARD_H) == CAST_OK) - m_uiBlizzardTimer = 8000; + m_uiBlizzardTimer = urand(8000, 15000); } } else @@ -784,7 +793,7 @@ struct MANGOS_DLL_DECL npc_yazzaiAI : public priestess_companion_commonAI if (m_uiBlinkTimer < uiDiff) { //if anybody is in melee range than escape by blink - if (m_creature->SelectAttackingTarget(ATTACKING_TARGET_TOPAGGRO, 0, uint32(0), SELECT_FLAG_IN_MELEE_RANGE)) + if (m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0, uint32(0), SELECT_FLAG_IN_MELEE_RANGE)) { if (DoCastSpellIfCan(m_creature, SPELL_BLINK) == CAST_OK) m_uiBlinkTimer = 8000; @@ -852,9 +861,9 @@ struct MANGOS_DLL_DECL npc_warlord_salarisAI : public priestess_companion_common if (m_uiInterceptStunTimer < uiDiff) { //if nobody is in melee range than try to use Intercept - if (!m_creature->SelectAttackingTarget(ATTACKING_TARGET_TOPAGGRO, 0, uint32(0), SELECT_FLAG_IN_MELEE_RANGE)) + if (!m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0, uint32(0), SELECT_FLAG_IN_MELEE_RANGE)) { - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0, SPELL_INTERCEPT_STUN, SELECT_FLAG_IN_LOS)) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0, SPELL_INTERCEPT_STUN, SELECT_FLAG_NOT_IN_MELEE_RANGE | SELECT_FLAG_IN_LOS)) { if (DoCastSpellIfCan(pTarget, SPELL_INTERCEPT_STUN) == CAST_OK) m_uiInterceptStunTimer = 10000; @@ -1225,8 +1234,16 @@ struct MANGOS_DLL_DECL npc_zelfanAI : public priestess_companion_commonAI if (m_uiRecombobulateTimer < uiDiff) { - // This should cast only on polymorphed targets - if (Unit* pTarget = DoSelectLowestHpFriendly(50.0f)) + // Note: this should be casted only on Polyformed targets + Unit* pTarget = NULL; + std::list lTempList = DoFindFriendlyCC(50.0f); + + if (!lTempList.empty()) + pTarget = *(lTempList.begin()); + else + pTarget = DoSelectLowestHpFriendly(50.0f); + + if (pTarget) { if (DoCastSpellIfCan(pTarget, SPELL_RECOMBOBULATE) == CAST_OK) m_uiRecombobulateTimer = 2000; diff --git a/scripts/eastern_kingdoms/zulaman/boss_malacrass.cpp b/scripts/eastern_kingdoms/zulaman/boss_malacrass.cpp index 5bcd66a79..ca270fd05 100644 --- a/scripts/eastern_kingdoms/zulaman/boss_malacrass.cpp +++ b/scripts/eastern_kingdoms/zulaman/boss_malacrass.cpp @@ -16,7 +16,7 @@ /* ScriptData SDName: Boss_Malacrass -SD%Complete: 70 +SD%Complete: 80 SDComment: Contain adds and adds selection; Stolen abilities timers need improvement SDCategory: Zul'Aman EndScriptData */ @@ -113,25 +113,22 @@ enum MAX_ACTIVE_ADDS = 4 }; -//Adds X positions -static float m_afAddPosX[4] = {128.279f, 123.261f, 112.084f, 106.473f}; - -const float ADD_POS_Y = 921.279f; -const float ADD_POS_Z = 33.889f; -const float ADD_ORIENT = 1.527f; - -struct SpawnGroup +//Adds positions +static const float m_aAddPositions[MAX_ACTIVE_ADDS][4] = { - uint32 m_uiCreatureEntry; - uint32 m_uiCreatureEntryAlt; + {128.279f, 921.279f, 33.889f, 1.527f}, + {123.261f, 921.279f, 33.889f, 1.527f}, + {112.084f, 921.279f, 33.889f, 1.527f}, + {106.473f, 921.279f, 33.889f, 1.527f}, }; -SpawnGroup m_auiSpawnEntry[] = +// Each position is a random of two spawns +static const uint32 aSpawnEntries[MAX_ACTIVE_ADDS][2]= { - {24240, 24241}, //Alyson Antille / Thurg - {24242, 24243}, //Slither / Lord Raadan - {24244, 24245}, //Gazakroth / Fenstalker - {24246, 24247}, //Darkheart / Koragg + {NPC_ALYSON, NPC_THURG}, + {NPC_SLITHER, NPC_RADAAN}, + {NPC_GAZAKROTH, NPC_FENSTALKER}, + {NPC_DARKHEART, NPC_KORAGG}, }; struct PlayerAbilityStruct @@ -209,7 +206,6 @@ struct MANGOS_DLL_DECL boss_malacrassAI : public ScriptedAI boss_malacrassAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_lAddsEntryList.clear(); Reset(); } @@ -223,9 +219,8 @@ struct MANGOS_DLL_DECL boss_malacrassAI : public ScriptedAI bool m_bCanUsePlayerSpell; + std::vector m_vAddsEntryList; std::vector m_vPlayerSpellTimer; - std::list m_lAddsEntryList; - ObjectGuid m_aAddGuid[MAX_ACTIVE_ADDS]; void Reset() { @@ -237,58 +232,46 @@ struct MANGOS_DLL_DECL boss_malacrassAI : public ScriptedAI m_bCanUsePlayerSpell = false; - InitializeAdds(); + DoInitializeAdds(); } void JustReachedHome() { if (m_pInstance) m_pInstance->SetData(TYPE_MALACRASS, FAIL); - - for(uint8 i = 0; i < MAX_ACTIVE_ADDS; ++i) - { - if (Creature* pAdd = m_creature->GetMap()->GetCreature(m_aAddGuid[i])) - pAdd->AI()->EnterEvadeMode(); - } } - void InitializeAdds() + void DoInitializeAdds() { //not if m_creature are dead, so avoid if (!m_creature->isAlive()) return; - uint8 j = 0; - - //it's empty, so first time - if (m_lAddsEntryList.empty()) + // it's empty, so first time + if (m_vAddsEntryList.empty()) { - //fill list with entries from creature array - for(uint8 i = 0; i < MAX_ACTIVE_ADDS; ++i) - m_lAddsEntryList.push_back(rand()%2 ? m_auiSpawnEntry[i].m_uiCreatureEntry : m_auiSpawnEntry[i].m_uiCreatureEntryAlt); + m_vAddsEntryList.resize(MAX_ACTIVE_ADDS); - //summon mobs from the list - for(std::list::iterator itr = m_lAddsEntryList.begin(); itr != m_lAddsEntryList.end(); ++itr) + for (uint8 i = 0; i < MAX_ACTIVE_ADDS; ++i) { - if (Creature* pAdd = m_creature->SummonCreature((*itr), m_afAddPosX[j], ADD_POS_Y, ADD_POS_Z, ADD_ORIENT, TEMPSUMMON_CORPSE_DESPAWN, 0)) - m_aAddGuid[j] = pAdd->GetObjectGuid(); - - ++j; + uint8 uiAddVersion = urand(0, 1); + m_vAddsEntryList[i] = aSpawnEntries[i][uiAddVersion]; + m_creature->SummonCreature(aSpawnEntries[i][uiAddVersion], m_aAddPositions[i][0], m_aAddPositions[i][1], m_aAddPositions[i][2], m_aAddPositions[i][3], TEMPSUMMON_CORPSE_DESPAWN, 0); } } + // Resummon the killed adds else { - for(std::list::iterator itr = m_lAddsEntryList.begin(); itr != m_lAddsEntryList.end(); ++itr) + if (!m_pInstance) + return; + + for (uint8 i = 0; i < MAX_ACTIVE_ADDS; ++i) { - Creature* pAdd = m_creature->GetMap()->GetCreature(m_aAddGuid[j]); + // If we already have the creature on the map, then don't summon it + if (Creature* pAdd = m_pInstance->GetSingleCreatureFromStorage(m_vAddsEntryList[i], true)) + continue; - //object already removed, not exist - if (!pAdd) - { - if (pAdd = m_creature->SummonCreature((*itr), m_afAddPosX[j], ADD_POS_Y, ADD_POS_Z, ADD_ORIENT, TEMPSUMMON_CORPSE_DESPAWN, 0)) - m_aAddGuid[j] = pAdd->GetObjectGuid(); - } - ++j; + m_creature->SummonCreature(m_vAddsEntryList[i], m_aAddPositions[i][0], m_aAddPositions[i][1], m_aAddPositions[i][2], m_aAddPositions[i][3], TEMPSUMMON_CORPSE_DESPAWN, 0); } } } @@ -296,24 +279,9 @@ struct MANGOS_DLL_DECL boss_malacrassAI : public ScriptedAI void Aggro(Unit* pWho) { DoScriptText(SAY_AGGRO, m_creature); - AddsAttack(pWho); - if (!m_pInstance) - return; - - m_pInstance->SetData(TYPE_MALACRASS, IN_PROGRESS); - } - - void AddsAttack(Unit* pWho) - { - for(uint8 i = 0; i < MAX_ACTIVE_ADDS; ++i) - { - if (Creature* pAdd = m_creature->GetMap()->GetCreature(m_aAddGuid[i])) - { - if (!pAdd->getVictim()) - pAdd->AI()->AttackStart(pWho); - } - } + if (m_pInstance) + m_pInstance->SetData(TYPE_MALACRASS, IN_PROGRESS); } void KilledUnit(Unit* pVictim) @@ -327,12 +295,19 @@ struct MANGOS_DLL_DECL boss_malacrassAI : public ScriptedAI void JustDied(Unit* pKiller) { DoScriptText(SAY_DEATH, m_creature); - CleanAdds(); - if (!m_pInstance) - return; + if (m_pInstance) + m_pInstance->SetData(TYPE_MALACRASS, DONE); + } - m_pInstance->SetData(TYPE_MALACRASS, DONE); + void SummonedCreatureJustDied(Creature* pSummoned) + { + switch(urand(0, 2)) + { + case 0: DoScriptText(SAY_ADD_DIED1, m_creature); break; + case 1: DoScriptText(SAY_ADD_DIED2, m_creature); break; + case 2: DoScriptText(SAY_ADD_DIED3, m_creature); break; + } } void SpellHitTarget(Unit* pTarget, const SpellEntry* pSpell) @@ -357,23 +332,6 @@ struct MANGOS_DLL_DECL boss_malacrassAI : public ScriptedAI } } - void CleanAdds() - { - for(uint8 i = 0; i < MAX_ACTIVE_ADDS; ++i) - { - if (Creature* pAdd = m_creature->GetMap()->GetCreature(m_aAddGuid[i])) - { - pAdd->AI()->EnterEvadeMode(); - pAdd->SetDeathState(JUST_DIED); - } - } - - for (uint8 i = 0; i < MAX_ACTIVE_ADDS; ++i) - m_aAddGuid[i].Clear(); - - m_lAddsEntryList.clear(); - } - bool CanUseSpecialAbility(uint32 uiSpellIndex) { Unit* pTarget = NULL; @@ -472,9 +430,9 @@ CreatureAI* GetAI_boss_malacrass(Creature* pCreature) } //common AI for adds -struct MANGOS_DLL_DECL boss_malacrass_addAI : public ScriptedAI +struct MANGOS_DLL_DECL malacrass_add_commmonAI : public ScriptedAI { - boss_malacrass_addAI(Creature* pCreature) : ScriptedAI(pCreature) + malacrass_add_commmonAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); Reset(); @@ -484,15 +442,6 @@ struct MANGOS_DLL_DECL boss_malacrass_addAI : public ScriptedAI void Reset() { } - void Aggro(Unit* pWho) - { - m_creature->SetInCombatWithZone(); - } - - void MoveInLineOfSight(Unit* pWho) - { - } - void KilledUnit(Unit* pVictim) { if (!m_pInstance) @@ -501,22 +450,6 @@ struct MANGOS_DLL_DECL boss_malacrass_addAI : public ScriptedAI if (Creature* pMalacrass = m_pInstance->GetSingleCreatureFromStorage(NPC_MALACRASS)) pMalacrass->AI()->KilledUnit(pVictim); } - - void JustDied(Unit* pKiller) - { - if (!m_pInstance) - return; - - if (Creature* pMalacrass = m_pInstance->GetSingleCreatureFromStorage(NPC_MALACRASS)) - { - switch(urand(0, 2)) - { - case 0: DoScriptText(SAY_ADD_DIED1, pMalacrass); break; - case 1: DoScriptText(SAY_ADD_DIED2, pMalacrass); break; - case 2: DoScriptText(SAY_ADD_DIED3, pMalacrass); break; - } - } - } }; enum @@ -525,9 +458,9 @@ enum SPELL_CLEAVE = 15496 }; -struct MANGOS_DLL_DECL mob_thurgAI : public boss_malacrass_addAI +struct MANGOS_DLL_DECL mob_thurgAI : public malacrass_add_commmonAI { - mob_thurgAI(Creature* pCreature) : boss_malacrass_addAI(pCreature) { Reset(); } + mob_thurgAI(Creature* pCreature) : malacrass_add_commmonAI(pCreature) { Reset(); } uint32 m_uiBloodlustTimer; uint32 m_uiCleaveTimer; @@ -535,7 +468,7 @@ struct MANGOS_DLL_DECL mob_thurgAI : public boss_malacrass_addAI void Reset() { m_uiBloodlustTimer = 15000; - m_uiCleaveTimer = 10000; + m_uiCleaveTimer = 10000; } void UpdateAI(const uint32 uiDiff) @@ -549,19 +482,22 @@ struct MANGOS_DLL_DECL mob_thurgAI : public boss_malacrass_addAI if (!lTempList.empty()) { - Unit* pTarget = *(lTempList.begin()); - DoCastSpellIfCan(pTarget, SPELL_BLOODLUST); + if (Unit* pTarget = *(lTempList.begin())) + { + if (DoCastSpellIfCan(pTarget, SPELL_BLOODLUST) == CAST_OK) + m_uiBloodlustTimer = 12000; + } } - - m_uiBloodlustTimer = 12000; + else + m_uiBloodlustTimer = 2000; } else m_uiBloodlustTimer -= uiDiff; if (m_uiCleaveTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_CLEAVE); - m_uiCleaveTimer = 12000; + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_CLEAVE) == CAST_OK) + m_uiCleaveTimer = 12000; } else m_uiCleaveTimer -= uiDiff; @@ -582,11 +518,9 @@ enum SPELL_DISPEL_MAGIC = 43577 }; -const float RANGE_FRIENDLY_TARGET = 40.0; - -struct MANGOS_DLL_DECL mob_alyson_antilleAI : public boss_malacrass_addAI +struct MANGOS_DLL_DECL mob_alyson_antilleAI : public malacrass_add_commmonAI { - mob_alyson_antilleAI(Creature* pCreature) : boss_malacrass_addAI(pCreature) { Reset(); } + mob_alyson_antilleAI(Creature* pCreature) : malacrass_add_commmonAI(pCreature) { Reset(); } uint32 m_uiArcaneTorrentTimer; uint32 m_uiFlashHealTimer; @@ -595,8 +529,8 @@ struct MANGOS_DLL_DECL mob_alyson_antilleAI : public boss_malacrass_addAI void Reset() { m_uiArcaneTorrentTimer = 0; - m_uiFlashHealTimer = 2500; - m_uiDispelMagicTimer = 10000; + m_uiFlashHealTimer = 2500; + m_uiDispelMagicTimer = 10000; } void AttackStart(Unit* pWho) @@ -623,8 +557,8 @@ struct MANGOS_DLL_DECL mob_alyson_antilleAI : public boss_malacrass_addAI { if (m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0, uint32(0), SELECT_FLAG_PLAYER | SELECT_FLAG_IN_MELEE_RANGE)) { - DoCastSpellIfCan(m_creature, SPELL_ARCANE_TORRENT); - m_uiArcaneTorrentTimer = 60000; + if (DoCastSpellIfCan(m_creature, SPELL_ARCANE_TORRENT) == CAST_OK) + m_uiArcaneTorrentTimer = 60000; } else m_uiArcaneTorrentTimer = 1000; @@ -634,29 +568,11 @@ struct MANGOS_DLL_DECL mob_alyson_antilleAI : public boss_malacrass_addAI if (m_uiFlashHealTimer < uiDiff) { - //this will fail if we previously was following target and pTarget is now different than before - if (Unit* pTarget = DoSelectLowestHpFriendly(RANGE_FRIENDLY_TARGET*2, 30000)) + if (Unit* pTarget = DoSelectLowestHpFriendly(80.0f)) { - if (pTarget->IsWithinDistInMap(m_creature, RANGE_FRIENDLY_TARGET)) - { - DoCastSpellIfCan(pTarget, SPELL_FLASH_HEAL); - - //if not already chasing, start chase - if (m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() != CHASE_MOTION_TYPE) - m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim(), 20.0f); - } - else - { - //if chasing, start follow target instead - if (m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() == CHASE_MOTION_TYPE) - { - m_creature->GetMotionMaster()->MovementExpired(); - m_creature->GetMotionMaster()->MoveFollow(pTarget, 20.0f, 0.0f); - } - } + if (DoCastSpellIfCan(pTarget, SPELL_FLASH_HEAL) == CAST_OK) + m_uiFlashHealTimer = urand(2000, 3000); } - - m_uiFlashHealTimer = 2500; } else m_uiFlashHealTimer -= uiDiff; @@ -664,17 +580,18 @@ struct MANGOS_DLL_DECL mob_alyson_antilleAI : public boss_malacrass_addAI if (m_uiDispelMagicTimer < uiDiff) { Unit* pTarget = NULL; - std::list lTempList = DoFindFriendlyCC(RANGE_FRIENDLY_TARGET); + std::list lTempList = DoFindFriendlyCC(40.0f); if (!lTempList.empty()) pTarget = *(lTempList.begin()); else - pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0); + pTarget = DoSelectLowestHpFriendly(40.0f); if (pTarget) - DoCastSpellIfCan(pTarget, SPELL_DISPEL_MAGIC); - - m_uiDispelMagicTimer = 12000; + { + if (DoCastSpellIfCan(pTarget, SPELL_DISPEL_MAGIC) == CAST_OK) + m_uiDispelMagicTimer = 12000; + } } else m_uiDispelMagicTimer -= uiDiff; @@ -693,9 +610,9 @@ enum SPELL_FIREBOLT = 43584 }; -struct MANGOS_DLL_DECL mob_gazakrothAI : public boss_malacrass_addAI +struct MANGOS_DLL_DECL mob_gazakrothAI : public malacrass_add_commmonAI { - mob_gazakrothAI(Creature* pCreature) : boss_malacrass_addAI(pCreature){ Reset(); } + mob_gazakrothAI(Creature* pCreature) : malacrass_add_commmonAI(pCreature){ Reset(); } uint32 m_uiFireboltTimer; @@ -726,8 +643,11 @@ struct MANGOS_DLL_DECL mob_gazakrothAI : public boss_malacrass_addAI if (m_uiFireboltTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_FIREBOLT); - m_uiFireboltTimer = 1000; + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, SPELL_FIREBOLT) == CAST_OK) + m_uiFireboltTimer = 1000; + } } else m_uiFireboltTimer -= uiDiff; @@ -747,9 +667,9 @@ enum SPELL_THUNDERCLAP = 43583 }; -struct MANGOS_DLL_DECL mob_lord_raadanAI : public boss_malacrass_addAI +struct MANGOS_DLL_DECL mob_lord_raadanAI : public malacrass_add_commmonAI { - mob_lord_raadanAI(Creature* pCreature) : boss_malacrass_addAI(pCreature) { Reset(); } + mob_lord_raadanAI(Creature* pCreature) : malacrass_add_commmonAI(pCreature) { Reset(); } uint32 m_uiFlameBreathTimer; uint32 m_uiThunderclapTimer; @@ -767,10 +687,10 @@ struct MANGOS_DLL_DECL mob_lord_raadanAI : public boss_malacrass_addAI if (m_uiThunderclapTimer < uiDiff) { - if (m_creature->SelectAttackingTarget(ATTACKING_TARGET_TOPAGGRO, 0, SPELL_THUNDERCLAP, SELECT_FLAG_PLAYER)) + if (m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0, SPELL_THUNDERCLAP, SELECT_FLAG_PLAYER | SELECT_FLAG_IN_MELEE_RANGE)) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_THUNDERCLAP); - m_uiThunderclapTimer = 12000; + if (DoCastSpellIfCan(m_creature, SPELL_THUNDERCLAP) == CAST_OK) + m_uiThunderclapTimer = 12000; } else m_uiThunderclapTimer = 1000; @@ -780,8 +700,8 @@ struct MANGOS_DLL_DECL mob_lord_raadanAI : public boss_malacrass_addAI if (m_uiFlameBreathTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_FLAME_BREATH); - m_uiFlameBreathTimer = 12000; + if (DoCastSpellIfCan(m_creature, SPELL_FLAME_BREATH) == CAST_OK) + m_uiFlameBreathTimer = 12000; } else m_uiFlameBreathTimer -= uiDiff; @@ -800,9 +720,9 @@ enum SPELL_PSYCHIC_WAIL = 43590 }; -struct MANGOS_DLL_DECL mob_darkheartAI : public boss_malacrass_addAI +struct MANGOS_DLL_DECL mob_darkheartAI : public malacrass_add_commmonAI { - mob_darkheartAI(Creature* pCreature) : boss_malacrass_addAI(pCreature) { Reset(); } + mob_darkheartAI(Creature* pCreature) : malacrass_add_commmonAI(pCreature) { Reset(); } uint32 m_uiPsychicWailTimer; @@ -818,10 +738,10 @@ struct MANGOS_DLL_DECL mob_darkheartAI : public boss_malacrass_addAI if (m_uiPsychicWailTimer < uiDiff) { - if (m_creature->SelectAttackingTarget(ATTACKING_TARGET_TOPAGGRO, 0, uint32(0), SELECT_FLAG_PLAYER | SELECT_FLAG_IN_MELEE_RANGE)) + if (m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0, uint32(0), SELECT_FLAG_PLAYER | SELECT_FLAG_IN_MELEE_RANGE)) { - DoCastSpellIfCan(m_creature, SPELL_PSYCHIC_WAIL); - m_uiPsychicWailTimer = 12000; + if (DoCastSpellIfCan(m_creature, SPELL_PSYCHIC_WAIL) == CAST_OK) + m_uiPsychicWailTimer = 12000; } else m_uiPsychicWailTimer = 1000; @@ -843,15 +763,15 @@ enum SPELL_VENOM_SPIT = 43579 }; -struct MANGOS_DLL_DECL mob_slitherAI : public boss_malacrass_addAI +struct MANGOS_DLL_DECL mob_slitherAI : public malacrass_add_commmonAI { - mob_slitherAI(Creature* pCreature) : boss_malacrass_addAI(pCreature) { Reset(); } + mob_slitherAI(Creature* pCreature) : malacrass_add_commmonAI(pCreature) { Reset(); } uint32 m_uiVenomSpitTimer; void Reset() { - m_uiVenomSpitTimer = 4000; + m_uiVenomSpitTimer = 2000; } void AttackStart(Unit* pWho) @@ -876,10 +796,11 @@ struct MANGOS_DLL_DECL mob_slitherAI : public boss_malacrass_addAI if (m_uiVenomSpitTimer < uiDiff) { - if (Unit* pVictim = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) - DoCastSpellIfCan(pVictim, SPELL_VENOM_SPIT); - - m_uiVenomSpitTimer = 2500; + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, SPELL_VENOM_SPIT) == CAST_OK) + m_uiVenomSpitTimer = 2500; + } } else m_uiVenomSpitTimer -= uiDiff; @@ -898,9 +819,9 @@ enum SPELL_VOLATILE_INFECTION = 43586 }; -struct MANGOS_DLL_DECL mob_fenstalkerAI : public boss_malacrass_addAI +struct MANGOS_DLL_DECL mob_fenstalkerAI : public malacrass_add_commmonAI { - mob_fenstalkerAI(Creature* pCreature) : boss_malacrass_addAI(pCreature) { Reset(); } + mob_fenstalkerAI(Creature* pCreature) : malacrass_add_commmonAI(pCreature) { Reset(); } uint32 m_uiVolatileInfectionTimer; @@ -916,8 +837,8 @@ struct MANGOS_DLL_DECL mob_fenstalkerAI : public boss_malacrass_addAI if (m_uiVolatileInfectionTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_VOLATILE_INFECTION); - m_uiVolatileInfectionTimer = 12000; + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_VOLATILE_INFECTION) == CAST_OK) + m_uiVolatileInfectionTimer = 12000; } else m_uiVolatileInfectionTimer -= uiDiff; @@ -937,16 +858,16 @@ enum SPELL_MIGHTY_BLOW = 43592, }; -struct MANGOS_DLL_DECL mob_koraggAI : public boss_malacrass_addAI +struct MANGOS_DLL_DECL mob_koraggAI : public malacrass_add_commmonAI { - mob_koraggAI(Creature* pCreature) : boss_malacrass_addAI(pCreature) { Reset(); } + mob_koraggAI(Creature* pCreature) : malacrass_add_commmonAI(pCreature) { Reset(); } uint32 m_uiColdStareTimer; uint32 m_uiMightyBlowTimer; void Reset() { - m_uiColdStareTimer = 15000; + m_uiColdStareTimer = 15000; m_uiMightyBlowTimer = 10000; } @@ -957,8 +878,8 @@ struct MANGOS_DLL_DECL mob_koraggAI : public boss_malacrass_addAI if (m_uiMightyBlowTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_MIGHTY_BLOW); - m_uiMightyBlowTimer = 12000; + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_MIGHTY_BLOW) == CAST_OK) + m_uiMightyBlowTimer = 12000; } else m_uiMightyBlowTimer -= uiDiff; @@ -966,9 +887,10 @@ struct MANGOS_DLL_DECL mob_koraggAI : public boss_malacrass_addAI if (m_uiColdStareTimer < uiDiff) { if (Unit* pVictim = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) - DoCastSpellIfCan(pVictim, SPELL_COLD_STARE); - - m_uiColdStareTimer = 12000; + { + if (DoCastSpellIfCan(pVictim, SPELL_COLD_STARE) == CAST_OK) + m_uiColdStareTimer = 12000; + } } else m_uiColdStareTimer -= uiDiff; diff --git a/scripts/eastern_kingdoms/zulaman/instance_zulaman.cpp b/scripts/eastern_kingdoms/zulaman/instance_zulaman.cpp index 83932a901..da2b5685e 100644 --- a/scripts/eastern_kingdoms/zulaman/instance_zulaman.cpp +++ b/scripts/eastern_kingdoms/zulaman/instance_zulaman.cpp @@ -68,6 +68,15 @@ void instance_zulaman::OnCreatureCreate(Creature* pCreature) case NPC_EAGLE_SPIRIT: case NPC_LYNX_SPIRIT: case NPC_DRAGONHAWK_SPIRIT: + // Insert Malacrass companions here for better handling + case NPC_ALYSON: + case NPC_THURG: + case NPC_SLITHER: + case NPC_RADAAN: + case NPC_GAZAKROTH: + case NPC_FENSTALKER: + case NPC_DARKHEART: + case NPC_KORAGG: m_mNpcEntryGuidStore[pCreature->GetEntry()] = pCreature->GetObjectGuid(); break; diff --git a/scripts/eastern_kingdoms/zulaman/zulaman.h b/scripts/eastern_kingdoms/zulaman/zulaman.h index dd79f3602..beb0cafda 100644 --- a/scripts/eastern_kingdoms/zulaman/zulaman.h +++ b/scripts/eastern_kingdoms/zulaman/zulaman.h @@ -62,6 +62,16 @@ enum InstanceZA NPC_AXETHROWER = 23542, NPC_WARBRINGER = 23580, + // Malacrass companions + NPC_ALYSON = 24240, + NPC_THURG = 24241, + NPC_SLITHER = 24242, + NPC_RADAAN = 24243, + NPC_GAZAKROTH = 24244, + NPC_FENSTALKER = 24245, + NPC_DARKHEART = 24246, + NPC_KORAGG = 24247, + NPC_EGG = 23817, NPC_SPIRIT_LYNX = 24143, diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 48ad0c857..4d923841a 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2623" + #define SD2_REVISION_NR "2624" #endif // __SD2_REVISION_NR_H__ From b53ab45202c9899b38eb6df13c5aac883a986287 Mon Sep 17 00:00:00 2001 From: michalpolko Date: Wed, 11 Jul 2012 00:43:49 +0300 Subject: [PATCH 0613/1172] [2625] Implement intro event for the Blood Prince Council - ICC Note: this is just a basic animation script - the encounter isn't playable yet Signed-off-by: Xfurry --- .../icecrown_citadel/blood_prince_council.cpp | 163 +++++++++++++++++- .../boss_blood_queen_lanathel.cpp | 2 + .../instance_icecrown_citadel.cpp | 2 + sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 + sql/scriptdev2_script_full.sql | 2 +- sql/updates/r2625_mangos.sql | 1 + sql/updates/r2625_scriptdev2.sql | 1 + 8 files changed, 170 insertions(+), 4 deletions(-) create mode 100644 sql/updates/r2625_mangos.sql create mode 100644 sql/updates/r2625_scriptdev2.sql diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/blood_prince_council.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/blood_prince_council.cpp index 1101ffe18..44fa04ace 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/blood_prince_council.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/blood_prince_council.cpp @@ -16,37 +16,196 @@ /* ScriptData SDName: blood_prince_council -SD%Complete: 0% -SDComment: +SD%Complete: 10% +SDComment: Only intro event is implemented. SDCategory: Icecrown Citadel EndScriptData */ #include "precompiled.h" +#include "icecrown_citadel.h" enum { + // Yells SAY_COUNCIL_INTRO_1 = -1631101, // Intro by Bloodqueen SAY_COUNCIL_INTRO_2 = -1631102, + SAY_KELESETH_INVOCATION = -1631103, SAY_KELESETH_SPECIAL = -1631104, SAY_KELESETH_SLAY_1 = -1631105, SAY_KELESETH_SLAY_2 = -1631106, SAY_KELESETH_BERSERK = -1631107, SAY_KELESETH_DEATH = -1631108, + SAY_TALDARAM_INVOCATION = -1631109, SAY_TALDARAM_SPECIAL = -1631110, SAY_TALDARAM_SLAY_1 = -1631111, SAY_TALDARAM_SLAY_2 = -1631112, SAY_TALDARAM_BERSERK = -1631113, SAY_TALDARAM_DEATH = -1631114, + SAY_VALANAR_INVOCATION = -1631115, SAY_VALANAR_SPECIAL = -1631116, SAY_VALANAR_SLAY_1 = -1631117, SAY_VALANAR_SLAY_2 = -1631118, SAY_VALANAR_BERSERK = -1631119, SAY_VALANAR_DEATH = -1631120, + + // Generic spells + SPELL_BERSERK = 26662, + SPELL_FEIGN_DEATH = 71598, + + SPELL_INVOCATION_BLOOD = 70934, + SPELL_INVOCATION_BLOOD_2 = 71596, + SPELL_INVOCATION_V_MOVE = 71075, + SPELL_INVOCATION_K_MOVE = 71079, + SPELL_INVOCATION_T_MOVE = 71082, + + // Valanar spells + SPELL_INVOCATION_VALANAR = 70952, + SPELL_KINETIC_BOMB_TARGET = 72053, // summons 38458 - the target of the bomb + SPELL_KINETIC_BOMB = 72080, // summons 38454 + SPELL_SHOCK_VORTEX = 72037, // summons 38422 + + // shock vortex spells + SPELL_SHOCK_VORTEX_AURA = 71945, + SPELL_SHOCK_VORTEX_VISUAL = 72633, + SPELL_EMP_SHOCK_VORTEX = 72039, + + // kinetic bomb spells + SPELL_KINETIC_BOMB_DMG = 72052, + SPELL_KINETIC_BOMB_VISUAL = 72054, + SPELL_UNSTABLE = 72059, // procs 72087 + + // Keleseth spells + SPELL_INVOCATION_KELESETH = 70981, + SPELL_SHADOW_LANCE = 71405, + SPELL_EMP_SHADOW_LANCE = 71815, + SPELL_SHADOW_RESONANCE = 71943, // summons 38369 + SPELL_SHADOW_PRISON = 73001, // on heroic + + // dark nucleus spells + SPELL_SHADOW_RESONANCE_AURA = 71911, // purpose unk - maybe range check + SPELL_SHADOW_RESONANCE_BUFF = 71822, // channeled from the dark nucleus + + // Taldaram spells + SPELL_INVOCATION_TALDARAM = 70982, + SPELL_GLITTERING_SPARKS = 71806, // triggers 71807 + SPELL_CONJURE_FLAME = 71718, // triggers 71719 which summons 38332 + SPELL_CONJURE_EMP_FLAME = 72040, // triggers 72041 which summons 38451 + + // ball of flame spells + SPELL_BALL_FLAMES_VISUAL = 71706, + SPELL_FLAMES = 71393, // cast on the impact + SPELL_BALL_FLAMES_PERIODIC = 71709, // triggers 71708 + SPELL_FLAMES_PROC = 71756, +}; + +static const DialogueEntry aIntroDialogue[] = +{ + {SAY_COUNCIL_INTRO_1, NPC_LANATHEL_INTRO, 15000}, + {SAY_COUNCIL_INTRO_2, NPC_LANATHEL_INTRO, 10000}, + {NPC_BLOOD_ORB_CONTROL, 0, 0}, + {0, 0, 0}, +}; + +static const float aLanathelFlyPos[3] = {4660.49f, 2769.2f, 430.0f}; + +/*###### +## npc_queen_lanathel_intro +######*/ + +struct MANGOS_DLL_DECL npc_queen_lanathel_introAI : public ScriptedAI, private DialogueHelper +{ + npc_queen_lanathel_introAI(Creature* pCreature) : ScriptedAI(pCreature), + DialogueHelper(aIntroDialogue) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + InitializeDialogueHelper(m_pInstance); + m_bEventStarted = false; + Reset(); + } + + ScriptedInstance* m_pInstance; + + bool m_bEventStarted; + + void Reset() + { + // Flying animation + m_creature->SetByteFlag(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_UNK_2); + } + + void MoveInLineOfSight(Unit* pWho) + { + // The range distance is not sure + if (!m_bEventStarted && pWho->GetTypeId() == TYPEID_PLAYER && !((Player*)pWho)->isGameMaster() && + pWho->IsWithinDistInMap(m_creature, 100.0f) && pWho->IsWithinLOSInMap(m_creature)) + { + StartNextDialogueText(SAY_COUNCIL_INTRO_1); + m_bEventStarted = true; + } + } + + void JustDidDialogueStep(int32 iEntry) + { + switch (iEntry) + { + case SAY_COUNCIL_INTRO_2: + m_creature->GetMotionMaster()->MovePoint(1, aLanathelFlyPos[0], aLanathelFlyPos[1], aLanathelFlyPos[2]); + break; + case NPC_BLOOD_ORB_CONTROL: + if (m_pInstance) + { + if (Creature* pTaldaram = m_pInstance->GetSingleCreatureFromStorage(NPC_TALDARAM)) + { + pTaldaram->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE); + pTaldaram->RemoveAurasDueToSpell(SPELL_FEIGN_DEATH); + pTaldaram->SetStandState(UNIT_STAND_STATE_STAND); + pTaldaram->HandleEmote(EMOTE_ONESHOT_ROAR); + } + if (Creature* pKeleseth = m_pInstance->GetSingleCreatureFromStorage(NPC_KELESETH)) + { + pKeleseth->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE); + pKeleseth->RemoveAurasDueToSpell(SPELL_FEIGN_DEATH); + pKeleseth->SetStandState(UNIT_STAND_STATE_STAND); + pKeleseth->HandleEmote(EMOTE_ONESHOT_ROAR); + } + if (Creature* pValanar = m_pInstance->GetSingleCreatureFromStorage(NPC_VALANAR)) + { + pValanar->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE); + pValanar->RemoveAurasDueToSpell(SPELL_FEIGN_DEATH); + pValanar->SetStandState(UNIT_STAND_STATE_STAND); + pValanar->HandleEmote(EMOTE_ONESHOT_ROAR); + } + } + break; + } + } + + void MovementInform(uint32 uiMoveType, uint32 uiPointId) + { + if (uiMoveType != POINT_MOTION_TYPE || !uiPointId) + return; + + // Despawn when reached point + m_creature->ForcedDespawn(); + } + + void UpdateAI(const uint32 uiDiff) { DialogueUpdate(uiDiff); } }; +CreatureAI* GetAI_npc_queen_lanathel_intro(Creature* pCreature) +{ + return new npc_queen_lanathel_introAI(pCreature); +} + void AddSC_blood_prince_council() { + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "npc_queen_lanathel_intro"; + pNewScript->GetAI = &GetAI_npc_queen_lanathel_intro; + pNewScript->RegisterSelf(); } diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_blood_queen_lanathel.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_blood_queen_lanathel.cpp index 4d9721c23..fd26e0124 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_blood_queen_lanathel.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_blood_queen_lanathel.cpp @@ -109,6 +109,8 @@ struct MANGOS_DLL_DECL boss_blood_queen_lanathelAI : public ScriptedAI m_uiBloodboltTimer = urand(15000, 20000); m_uiPactDarkfallenTimer = 15000; m_uiSwarmingShadowsTimer = 30000; + + m_creature->RemoveByteFlag(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_UNK_2); } void JustReachedHome() diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_citadel.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_citadel.cpp index 8977ae1de..7c8f57c3b 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_citadel.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_citadel.cpp @@ -296,6 +296,8 @@ void instance_icecrown_citadel::SetData(uint32 uiType, uint32 uiData) DoUseDoorOrButton(GO_SCIENTIST_DOOR); break; case TYPE_BLOOD_PRINCE_COUNCIL: + if (uiData == m_auiEncounter[uiType]) + break; m_auiEncounter[uiType] = uiData; DoUseDoorOrButton(GO_CRIMSON_HALL_DOOR); if (uiData == DONE) diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 4d923841a..d0dc787f6 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2624" + #define SD2_REVISION_NR "2625" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 857d017c8..e2e3f2f80 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -713,6 +713,7 @@ UPDATE instance_template SET ScriptName='instance_icecrown_citadel' WHERE map=63 UPDATE creature_template SET ScriptName='boss_lord_marrowgar' WHERE entry=36612; UPDATE creature_template SET ScriptName='boss_lady_deathwhisper' WHERE entry=36855; UPDATE creature_template SET ScriptName='boss_deathbringer_saurfang' WHERE entry=37813; +UPDATE creature_template SET ScriptName='npc_queen_lanathel_intro' WHERE entry=38004; UPDATE creature_template SET ScriptName='boss_blood_queen_lanathel' WHERE entry=37955; DELETE FROM scripted_event_id WHERE id IN (23426,23438); INSERT INTO scripted_event_id VALUES diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 2c000e625..58de9695b 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -3827,7 +3827,7 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1631099,'Great news, everyone!',17118,1,0,0,'putricide SAY_BERSERK'), (-1631100,'Bad news, everyone! I don\'t think I\'m going to make it',17117,1,0,0,'putricide SAY_DEATH'), -(-1631101,'Foolish mortals. You thought us defeated so easily? The San\'layn are the Lich King\'s immortal soldiers! Now you shall face their might combined!',16795,6,0,0,'lanathel SAY_COUNCIL_INTRO_1'), +(-1631101,'Foolish mortals. You thought us defeated so easily? The San\'layn are the Lich King\'s immortal soldiers! Now you shall face their might combined!',16795,6,0,1,'lanathel SAY_COUNCIL_INTRO_1'), (-1631102,'Rise up, brothers, and destroy our enemies',16796,6,0,0,'lanathel SAY_COUNCIL_INTRO_2'), (-1631103,'Such wondrous power! The Darkfallen Orb has made me INVINCIBLE!',16727,1,0,0,'keleseth SAY_KELESETH_INVOCATION'), diff --git a/sql/updates/r2625_mangos.sql b/sql/updates/r2625_mangos.sql new file mode 100644 index 000000000..af9da4698 --- /dev/null +++ b/sql/updates/r2625_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_queen_lanathel_intro' WHERE entry=38004; diff --git a/sql/updates/r2625_scriptdev2.sql b/sql/updates/r2625_scriptdev2.sql new file mode 100644 index 000000000..db84b7f6d --- /dev/null +++ b/sql/updates/r2625_scriptdev2.sql @@ -0,0 +1 @@ +UPDATE script_texts SET emote=1 WHERE entry=-1631101; From 7221bc4b93dff48271c9a90778850be0486aa0a2 Mon Sep 17 00:00:00 2001 From: michalpolko Date: Fri, 13 Jul 2012 00:44:21 +0300 Subject: [PATCH 0614/1172] [2626] Implement script support for the Blood Princes - ICC Note: some abilities required additional research and implementation - see spells 72087 and 73001. Also aura 300 needs core support Signed-off-by: Xfurry --- .../icecrown_citadel/blood_prince_council.cpp | 709 +++++++++++++++++- .../instance_icecrown_citadel.cpp | 2 - sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 7 + sql/scriptdev2_script_full.sql | 6 +- sql/updates/r2626_mangos.sql | 7 + sql/updates/r2626_scriptdev2.sql | 5 + 7 files changed, 721 insertions(+), 17 deletions(-) create mode 100644 sql/updates/r2626_mangos.sql create mode 100644 sql/updates/r2626_scriptdev2.sql diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/blood_prince_council.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/blood_prince_council.cpp index 44fa04ace..7115bbd42 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/blood_prince_council.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/blood_prince_council.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: blood_prince_council -SD%Complete: 10% -SDComment: Only intro event is implemented. +SD%Complete: 80% +SDComment: Timers; Some details are not very clear about this encounter: spells 72087 and 73001 require additional research. SDCategory: Icecrown Citadel EndScriptData */ @@ -51,6 +51,10 @@ enum SAY_VALANAR_BERSERK = -1631119, SAY_VALANAR_DEATH = -1631120, + EMOTE_INVOCATION = -1631197, + EMOTE_SHOCK_VORTEX = -1631198, + EMOTE_FLAMES = -1631199, + // Generic spells SPELL_BERSERK = 26662, SPELL_FEIGN_DEATH = 71598, @@ -66,27 +70,32 @@ enum SPELL_KINETIC_BOMB_TARGET = 72053, // summons 38458 - the target of the bomb SPELL_KINETIC_BOMB = 72080, // summons 38454 SPELL_SHOCK_VORTEX = 72037, // summons 38422 - - // shock vortex spells - SPELL_SHOCK_VORTEX_AURA = 71945, - SPELL_SHOCK_VORTEX_VISUAL = 72633, SPELL_EMP_SHOCK_VORTEX = 72039, + NPC_KINETIC_BOMB = 38454, + NPC_KINETIC_BOMB_TARGET = 38458, + + // shock vortex spells - in eventAI + //SPELL_SHOCK_VORTEX_AURA = 71945, + //SPELL_SHOCK_VORTEX_VISUAL = 72633, + // kinetic bomb spells SPELL_KINETIC_BOMB_DMG = 72052, SPELL_KINETIC_BOMB_VISUAL = 72054, SPELL_UNSTABLE = 72059, // procs 72087 + SPELL_KINETIC_KNOCKBACK = 72087, // Keleseth spells SPELL_INVOCATION_KELESETH = 70981, SPELL_SHADOW_LANCE = 71405, SPELL_EMP_SHADOW_LANCE = 71815, SPELL_SHADOW_RESONANCE = 71943, // summons 38369 - SPELL_SHADOW_PRISON = 73001, // on heroic + //SPELL_SHADOW_PRISON = 73001, // on heroic - not sure how to use // dark nucleus spells SPELL_SHADOW_RESONANCE_AURA = 71911, // purpose unk - maybe range check SPELL_SHADOW_RESONANCE_BUFF = 71822, // channeled from the dark nucleus + SPELL_SHADOW_RESONANCE_DMG = 72980, // self destruction spell // Taldaram spells SPELL_INVOCATION_TALDARAM = 70982, @@ -94,11 +103,16 @@ enum SPELL_CONJURE_FLAME = 71718, // triggers 71719 which summons 38332 SPELL_CONJURE_EMP_FLAME = 72040, // triggers 72041 which summons 38451 + NPC_BALL_OF_FLAME = 38332, + NPC_BALL_OF_INFERNO_FLAME = 38451, + // ball of flame spells SPELL_BALL_FLAMES_VISUAL = 71706, SPELL_FLAMES = 71393, // cast on the impact SPELL_BALL_FLAMES_PERIODIC = 71709, // triggers 71708 SPELL_FLAMES_PROC = 71756, + + MAX_PRINCES = 3, }; static const DialogueEntry aIntroDialogue[] = @@ -161,22 +175,19 @@ struct MANGOS_DLL_DECL npc_queen_lanathel_introAI : public ScriptedAI, private D { pTaldaram->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE); pTaldaram->RemoveAurasDueToSpell(SPELL_FEIGN_DEATH); - pTaldaram->SetStandState(UNIT_STAND_STATE_STAND); - pTaldaram->HandleEmote(EMOTE_ONESHOT_ROAR); + pTaldaram->SetHealth(1); } if (Creature* pKeleseth = m_pInstance->GetSingleCreatureFromStorage(NPC_KELESETH)) { pKeleseth->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE); pKeleseth->RemoveAurasDueToSpell(SPELL_FEIGN_DEATH); - pKeleseth->SetStandState(UNIT_STAND_STATE_STAND); - pKeleseth->HandleEmote(EMOTE_ONESHOT_ROAR); + pKeleseth->SetHealth(1); } if (Creature* pValanar = m_pInstance->GetSingleCreatureFromStorage(NPC_VALANAR)) { pValanar->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE); pValanar->RemoveAurasDueToSpell(SPELL_FEIGN_DEATH); - pValanar->SetStandState(UNIT_STAND_STATE_STAND); - pValanar->HandleEmote(EMOTE_ONESHOT_ROAR); + pValanar->SetHealth(1); } } break; @@ -188,6 +199,20 @@ struct MANGOS_DLL_DECL npc_queen_lanathel_introAI : public ScriptedAI, private D if (uiMoveType != POINT_MOTION_TYPE || !uiPointId) return; + // Emote here, and force them to stand up - this needs to be done as a workaround for some core issues + if (m_pInstance) + { + // This should be casted when they stand up - but because of the workaround, it will be casted here + if (Creature* pOrb = m_pInstance->GetSingleCreatureFromStorage(NPC_BLOOD_ORB_CONTROL)) + pOrb->CastSpell(pOrb, SPELL_INVOCATION_VALANAR, false); + if (Creature* pTaldaram = m_pInstance->GetSingleCreatureFromStorage(NPC_TALDARAM)) + pTaldaram->HandleEmote(EMOTE_ONESHOT_ROAR); + if (Creature* pKeleseth = m_pInstance->GetSingleCreatureFromStorage(NPC_KELESETH)) + pKeleseth->HandleEmote(EMOTE_ONESHOT_ROAR); + if (Creature* pValanar = m_pInstance->GetSingleCreatureFromStorage(NPC_VALANAR)) + pValanar->HandleEmote(EMOTE_ONESHOT_ROAR); + } + // Despawn when reached point m_creature->ForcedDespawn(); } @@ -200,6 +225,629 @@ CreatureAI* GetAI_npc_queen_lanathel_intro(Creature* pCreature) return new npc_queen_lanathel_introAI(pCreature); } +/*###### +## npc_ball_of_flame +######*/ + +struct MANGOS_DLL_DECL npc_ball_of_flameAI : public ScriptedAI +{ + npc_ball_of_flameAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } + + bool m_bHasFlamesCasted; + + uint32 m_uiTargetGuidLow; + + void Reset() + { + m_bHasFlamesCasted = false; + + DoCastSpellIfCan(m_creature, SPELL_BALL_FLAMES_VISUAL, CAST_TRIGGERED); + + // Empowered flame + if (m_creature->GetEntry() == NPC_BALL_OF_INFERNO_FLAME) + { + DoCastSpellIfCan(m_creature, SPELL_BALL_FLAMES_PERIODIC, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_FLAMES_PROC, CAST_TRIGGERED); + } + } + + void DoInitializeTarget(uint32 uiGuid) { m_uiTargetGuidLow = uiGuid; } + + void MoveInLineOfSight(Unit* pWho) + { + if (!m_bHasFlamesCasted && pWho->GetTypeId() == TYPEID_PLAYER && pWho->GetGUIDLow() == m_uiTargetGuidLow && + pWho->IsWithinDist(m_creature, ATTACK_DISTANCE)) + { + if (DoCastSpellIfCan(m_creature, SPELL_FLAMES) == CAST_OK) + { + m_bHasFlamesCasted = true; + m_creature->GetMotionMaster()->MoveIdle(); + m_creature->ForcedDespawn(1000); + } + } + } + + void AttackStart(Unit* pWho) { } + + void UpdateAI(const uint32 uiDiff) { } +}; + +CreatureAI* GetAI_npc_ball_of_flame(Creature* pCreature) +{ + return new npc_ball_of_flameAI (pCreature); +}; + +/*###### +## npc_kinetic_bomb +######*/ + +struct MANGOS_DLL_DECL npc_kinetic_bombAI : public ScriptedAI +{ + npc_kinetic_bombAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } + + void Reset() + { + DoCastSpellIfCan(m_creature, SPELL_UNSTABLE, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_KINETIC_BOMB_VISUAL, CAST_TRIGGERED); + } + + void DamageTaken(Unit* pDealer, uint32 &uiDamage) + { + // Note: this npc shouldn't take any damage - however this has an issue in the core, because the Unstanble spell doesn't proc on 0 damage + uiDamage = 0; + } + + void MovementInform(uint32 uiMoveType, uint32 uiPointId) + { + if (uiMoveType != POINT_MOTION_TYPE || !uiPointId) + return; + + DoCastSpellIfCan(m_creature, SPELL_KINETIC_BOMB_DMG); + m_creature->ForcedDespawn(1000); + } + + void AttackStart(Unit* pWho) { } + + void MoveInLineOfSight(Unit* pWho) { } + + void UpdateAI(const uint32 uiDiff) { } +}; + +CreatureAI* GetAI_npc_kinetic_bomb(Creature* pCreature) +{ + return new npc_kinetic_bombAI (pCreature); +}; + +/*###### +## npc_dark_nucleus +######*/ + +struct MANGOS_DLL_DECL npc_dark_nucleusAI : public ScriptedAI +{ + npc_dark_nucleusAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } + + uint32 m_uiDistanceCheck; + + void Reset() + { + DoCastSpellIfCan(m_creature, SPELL_SHADOW_RESONANCE_AURA, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_SHADOW_RESONANCE_DMG, CAST_TRIGGERED); + + m_uiDistanceCheck = 1000; + } + + void AttackStart(Unit* pWho) + { + if (m_creature->Attack(pWho, true)) + { + m_creature->AddThreat(pWho); + m_creature->SetInCombatWith(pWho); + pWho->SetInCombatWith(m_creature); + DoStartMovement(pWho, 10.0f); + } + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_uiDistanceCheck < uiDiff) + { + if (m_creature->GetDistance(m_creature->getVictim()) < 15.0f) + DoCastSpellIfCan(m_creature->getVictim(), SPELL_SHADOW_RESONANCE_BUFF); + + m_uiDistanceCheck = 1000; + } + else + m_uiDistanceCheck -= uiDiff; + } +}; + +CreatureAI* GetAI_npc_dark_nucleus(Creature* pCreature) +{ + return new npc_dark_nucleusAI (pCreature); +}; + +/*###### +## npc_blood_orb_control +######*/ + +struct MANGOS_DLL_DECL npc_blood_orb_controlAI : public Scripted_NoMovementAI +{ + npc_blood_orb_controlAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; + + uint8 m_uiLastResult; + uint32 m_uiInvocationTimer; + + void Reset() + { + m_uiInvocationTimer = 30000; + } + + void Aggro(Unit* pWho) + { + if (m_pInstance) + m_pInstance->SetData(TYPE_BLOOD_PRINCE_COUNCIL, IN_PROGRESS); + } + + void JustDied(Unit* pKiller) + { + if (m_pInstance) + { + m_pInstance->SetData(TYPE_BLOOD_PRINCE_COUNCIL, DONE); + + // Kill the 3 princes + if (Creature* pTmp = m_pInstance->GetSingleCreatureFromStorage(NPC_VALANAR)) + m_creature->DealDamage(pTmp, pTmp->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NONE, NULL, false); + + if (Creature* pTmp = m_pInstance->GetSingleCreatureFromStorage(NPC_KELESETH)) + m_creature->DealDamage(pTmp, pTmp->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NONE, NULL, false); + + if (Creature* pTmp = m_pInstance->GetSingleCreatureFromStorage(NPC_TALDARAM)) + m_creature->DealDamage(pTmp, pTmp->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NONE, NULL, false); + } + } + + void JustReachedHome() + { + if (m_pInstance) + m_pInstance->SetData(TYPE_BLOOD_PRINCE_COUNCIL, FAIL); + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + // every 30 seconds cast Invocation of Blood on random prince + if (m_uiInvocationTimer < uiDiff) + { + uint8 uiResult = urand(0, MAX_PRINCES - 1); + uiResult = uiResult == m_uiLastResult ? (uiResult + 1) % MAX_PRINCES : uiResult; + m_uiLastResult = uiResult; + + switch (uiResult) + { + case 0: + DoCastSpellIfCan(m_creature, SPELL_INVOCATION_V_MOVE, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_INVOCATION_VALANAR, CAST_TRIGGERED); + break; + case 1: + DoCastSpellIfCan(m_creature, SPELL_INVOCATION_K_MOVE, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_INVOCATION_KELESETH, CAST_TRIGGERED); + break; + case 2: + DoCastSpellIfCan(m_creature, SPELL_INVOCATION_T_MOVE, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_INVOCATION_TALDARAM, CAST_TRIGGERED); + break; + } + + m_uiInvocationTimer = 47000; + } + else + m_uiInvocationTimer -= uiDiff; + } +}; + +CreatureAI* GetAI_npc_blood_orb_control(Creature* pCreature) +{ + return new npc_blood_orb_controlAI(pCreature); +} + +/*###### +## blood_prince_council_base +######*/ + +struct MANGOS_DLL_DECL blood_prince_council_baseAI : public ScriptedAI +{ + blood_prince_council_baseAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (instance_icecrown_citadel*)pCreature->GetInstanceData(); + DoCastSpellIfCan(m_creature, SPELL_FEIGN_DEATH); + m_uiResetTimer = 0; + Reset(); + } + + instance_icecrown_citadel* m_pInstance; + + uint32 m_uiInvocationSpellEntry; + int32 m_iSayInvocationEntry; + int32 m_iSayBerserkEntry; + + uint32 m_uiEmpowermentTimer; + uint32 m_uiResetTimer; + uint32 m_uiBerserkTimer; + uint32 m_uiSphereTimer; + + bool m_bIsSaidSpecial; // 1st spell cast after being empowered is followed by special say + + void Reset() + { + m_bIsSaidSpecial = false; + m_uiEmpowermentTimer = 0; + m_uiSphereTimer = urand(5000, 15000); + m_uiBerserkTimer = 10*MINUTE*IN_MILLISECONDS; + } + + void EnterEvadeMode() + { + // Reset the health to 1 + m_creature->SetHealth(1); + + // Reset blood orb + if (m_creature->GetEntry() == NPC_VALANAR) + m_uiResetTimer = 5000; + + ScriptedAI::EnterEvadeMode(); + } + + void DamageTaken(Unit* pDealer, uint32 &uiDamage) + { + // Damage is shared by the Blood Orb Control npc + if (!m_uiEmpowermentTimer) + uiDamage = 0; + } + + void SpellHit(Unit* pCaster, const SpellEntry* pSpell) + { + // When hit by the Invocation spell, then set the health of the blood control npc + if (pSpell->Id == m_uiInvocationSpellEntry) + { + m_creature->SetHealth(pCaster->GetHealth()); + DoScriptText(EMOTE_INVOCATION, m_creature); + DoScriptText(m_iSayInvocationEntry, m_creature); + m_uiEmpowermentTimer = 30000; + } + } + + void UpdateAI(const uint32 uiDiff) + { + // On evade, reset the blood orb on Valanar + if (m_uiResetTimer) + { + if (m_uiResetTimer <= uiDiff) + { + if (m_pInstance) + { + if (Creature* pOrb = m_pInstance->GetSingleCreatureFromStorage(NPC_BLOOD_ORB_CONTROL)) + pOrb->CastSpell(pOrb, SPELL_INVOCATION_VALANAR, false); + + m_uiResetTimer = 0; + } + } + else + m_uiResetTimer -= uiDiff; + } + + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + // Invocation of Blood + if (m_uiEmpowermentTimer) + { + if (m_uiEmpowermentTimer <= uiDiff) + { + m_creature->RemoveAurasDueToSpell(m_uiInvocationSpellEntry); + m_creature->SetHealth(1); + m_bIsSaidSpecial = false; + m_uiEmpowermentTimer = 00; + } + else + m_uiEmpowermentTimer -= uiDiff; + } + + // Berserk + if (m_uiBerserkTimer) + { + if (m_uiBerserkTimer <= uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_BERSERK) == CAST_OK) + { + DoScriptText(m_iSayBerserkEntry, m_creature); + m_uiBerserkTimer = 0; + } + } + else + m_uiBerserkTimer -= uiDiff; + } + } +}; + +/*###### +## boss_valanar_icc +######*/ + +struct MANGOS_DLL_DECL boss_valanar_iccAI : public blood_prince_council_baseAI +{ + boss_valanar_iccAI(Creature* pCreature) : blood_prince_council_baseAI(pCreature) + { + m_uiInvocationSpellEntry = SPELL_INVOCATION_VALANAR; + m_iSayInvocationEntry = SAY_VALANAR_INVOCATION; + m_iSayBerserkEntry = SAY_VALANAR_BERSERK; + Reset(); + } + + uint32 m_uiVortexTimer; + + void Reset() + { + blood_prince_council_baseAI::Reset(); + + m_uiVortexTimer = urand(5000, 10000); + } + + void KilledUnit(Unit* pVictim) + { + if (pVictim->GetTypeId() == TYPEID_PLAYER) + DoScriptText(urand(0, 1) ? SAY_VALANAR_SLAY_1 : SAY_VALANAR_SLAY_2, m_creature); + } + + void JustDied(Unit* pKiller) + { + DoScriptText(SAY_VALANAR_DEATH, m_creature); + } + + void JustSummoned(Creature* pSummoned) + { + if (pSummoned->GetEntry() == NPC_KINETIC_BOMB_TARGET) + pSummoned->CastSpell(pSummoned->GetPositionX(), pSummoned->GetPositionY(), pSummoned->GetPositionZ() + 20.0f, SPELL_KINETIC_BOMB, true, NULL, NULL, m_creature->GetObjectGuid()); + else if (pSummoned->GetEntry() == NPC_KINETIC_BOMB) + { + // Handle Kinetic bomb movement + pSummoned->SetLevitate(true); + pSummoned->GetMotionMaster()->MovePoint(1, pSummoned->GetPositionX(), pSummoned->GetPositionY(), pSummoned->GetPositionZ() - 20.0f, false); + } + } + + void UpdateAI(const uint32 uiDiff) + { + blood_prince_council_baseAI::UpdateAI(uiDiff); + + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_uiSphereTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_KINETIC_BOMB_TARGET) == CAST_OK) + m_uiSphereTimer = 27000; + } + else + m_uiSphereTimer -= uiDiff; + + if (m_uiVortexTimer < uiDiff) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, m_uiEmpowermentTimer ? SPELL_EMP_SHOCK_VORTEX : SPELL_SHOCK_VORTEX) == CAST_OK) + { + if (m_uiEmpowermentTimer) + DoScriptText(EMOTE_SHOCK_VORTEX, m_creature); + + if (m_uiEmpowermentTimer && !m_bIsSaidSpecial) + { + DoScriptText(SAY_VALANAR_SPECIAL, m_creature); + m_bIsSaidSpecial = false; + } + + m_uiVortexTimer = 17000; + } + } + } + else + m_uiVortexTimer -= uiDiff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_valanar_icc(Creature* pCreature) +{ + return new boss_valanar_iccAI(pCreature); +} + +/*###### +## boss_keleseth_icc +######*/ + +struct MANGOS_DLL_DECL boss_keleseth_iccAI : public blood_prince_council_baseAI +{ + boss_keleseth_iccAI(Creature* pCreature) : blood_prince_council_baseAI(pCreature) + { + m_uiInvocationSpellEntry = SPELL_INVOCATION_KELESETH; + m_iSayInvocationEntry = SAY_KELESETH_INVOCATION; + m_iSayBerserkEntry = SAY_KELESETH_BERSERK; + Reset(); + } + + uint32 m_uiShadowLanceTimer; + + void Reset() + { + blood_prince_council_baseAI::Reset(); + + m_uiShadowLanceTimer = urand(2000, 3000); + m_uiSphereTimer = 4000; + } + + void AttackStart(Unit* pWho) + { + if (m_creature->Attack(pWho, true)) + { + m_creature->AddThreat(pWho); + m_creature->SetInCombatWith(pWho); + pWho->SetInCombatWith(m_creature); + DoStartMovement(pWho, 20.0f); + } + } + + void KilledUnit(Unit* pVictim) + { + if (pVictim->GetTypeId() == TYPEID_PLAYER) + DoScriptText(urand(0, 1) ? SAY_KELESETH_SLAY_1 : SAY_KELESETH_SLAY_2, m_creature); + } + + void JustDied(Unit* pKiller) + { + DoScriptText(SAY_KELESETH_DEATH, m_creature); + } + + void JustSummoned(Creature* pSummoned) + { + pSummoned->SetInCombatWithZone(); + } + + void UpdateAI(const uint32 uiDiff) + { + blood_prince_council_baseAI::UpdateAI(uiDiff); + + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_uiSphereTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_SHADOW_RESONANCE) == CAST_OK) + m_uiSphereTimer = 25000; + } + else + m_uiSphereTimer -= uiDiff; + + if (m_uiShadowLanceTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), m_uiEmpowermentTimer ? SPELL_EMP_SHADOW_LANCE : SPELL_SHADOW_LANCE) == CAST_OK) + { + if (m_uiEmpowermentTimer && !m_bIsSaidSpecial) + { + DoScriptText(SAY_KELESETH_SPECIAL, m_creature); + m_bIsSaidSpecial = true; + } + + m_uiShadowLanceTimer = urand(2000, 3000); + } + } + else + m_uiShadowLanceTimer -= uiDiff; + } +}; + +CreatureAI* GetAI_boss_keleseth_icc(Creature* pCreature) +{ + return new boss_keleseth_iccAI(pCreature); +} + +/*###### +## boss_taldaram_icc +######*/ + +struct MANGOS_DLL_DECL boss_taldaram_iccAI : public blood_prince_council_baseAI +{ + boss_taldaram_iccAI(Creature* pCreature) : blood_prince_council_baseAI(pCreature) + { + m_uiInvocationSpellEntry = SPELL_INVOCATION_TALDARAM; + m_iSayInvocationEntry = SAY_TALDARAM_INVOCATION; + m_iSayBerserkEntry = SAY_TALDARAM_BERSERK; + Reset(); + } + + uint32 m_uiSparksTimer; + + void Reset() + { + blood_prince_council_baseAI::Reset(); + + m_uiSparksTimer = urand(8000, 15000); + } + + void KilledUnit(Unit* pVictim) + { + if (pVictim->GetTypeId() == TYPEID_PLAYER) + DoScriptText(urand(0, 1) ? SAY_TALDARAM_SLAY_1 : SAY_TALDARAM_SLAY_2, m_creature); + } + + void JustDied(Unit* pKiller) + { + DoScriptText(SAY_TALDARAM_DEATH, m_creature); + } + + void JustSummoned(Creature* pSummoned) + { + // We need to initialize the target which is the ball of flame should follow + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0, uint32(0), SELECT_FLAG_NOT_IN_MELEE_RANGE | SELECT_FLAG_PLAYER)) + { + if (npc_ball_of_flameAI* pBallAI = dynamic_cast(pSummoned->AI())) + pBallAI->DoInitializeTarget(pTarget->GetGUIDLow()); + + DoScriptText(EMOTE_FLAMES, pSummoned, pTarget); + pSummoned->GetMotionMaster()->MoveFollow(pTarget, 0, 0); + } + } + + void UpdateAI(const uint32 uiDiff) + { + blood_prince_council_baseAI::UpdateAI(uiDiff); + + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_uiSphereTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, m_uiEmpowermentTimer ? SPELL_CONJURE_EMP_FLAME : SPELL_CONJURE_FLAME) == CAST_OK) + { + if (m_uiEmpowermentTimer && !m_bIsSaidSpecial) + { + DoScriptText(SAY_TALDARAM_SPECIAL, m_creature); + m_bIsSaidSpecial = true; + } + + m_uiSphereTimer = 20000; + } + } + else + m_uiSphereTimer -= uiDiff; + + if (m_uiSparksTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_GLITTERING_SPARKS) == CAST_OK) + m_uiSparksTimer = 30000; + } + else + m_uiSparksTimer -= uiDiff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_taldaram_icc(Creature* pCreature) +{ + return new boss_taldaram_iccAI(pCreature); +} + void AddSC_blood_prince_council() { Script* pNewScript; @@ -208,4 +856,39 @@ void AddSC_blood_prince_council() pNewScript->Name = "npc_queen_lanathel_intro"; pNewScript->GetAI = &GetAI_npc_queen_lanathel_intro; pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_ball_of_flame"; + pNewScript->GetAI = &GetAI_npc_ball_of_flame; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_kinetic_bomb"; + pNewScript->GetAI = &GetAI_npc_kinetic_bomb; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_dark_nucleus"; + pNewScript->GetAI = &GetAI_npc_dark_nucleus; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_blood_orb_control"; + pNewScript->GetAI = &GetAI_npc_blood_orb_control; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "boss_taldaram_icc"; + pNewScript->GetAI = &GetAI_boss_taldaram_icc; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "boss_keleseth_icc"; + pNewScript->GetAI = &GetAI_boss_keleseth_icc; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "boss_valanar_icc"; + pNewScript->GetAI = &GetAI_boss_valanar_icc; + pNewScript->RegisterSelf(); } diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_citadel.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_citadel.cpp index 7c8f57c3b..8977ae1de 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_citadel.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_citadel.cpp @@ -296,8 +296,6 @@ void instance_icecrown_citadel::SetData(uint32 uiType, uint32 uiData) DoUseDoorOrButton(GO_SCIENTIST_DOOR); break; case TYPE_BLOOD_PRINCE_COUNCIL: - if (uiData == m_auiEncounter[uiType]) - break; m_auiEncounter[uiType] = uiData; DoUseDoorOrButton(GO_CRIMSON_HALL_DOOR); if (uiData == DONE) diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index d0dc787f6..018f34341 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2625" + #define SD2_REVISION_NR "2626" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index e2e3f2f80..b1383d418 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -714,6 +714,13 @@ UPDATE creature_template SET ScriptName='boss_lord_marrowgar' WHERE entry=36612; UPDATE creature_template SET ScriptName='boss_lady_deathwhisper' WHERE entry=36855; UPDATE creature_template SET ScriptName='boss_deathbringer_saurfang' WHERE entry=37813; UPDATE creature_template SET ScriptName='npc_queen_lanathel_intro' WHERE entry=38004; +UPDATE creature_template SET ScriptName='npc_blood_orb_control' WHERE entry=38008; +UPDATE creature_template SET ScriptName='npc_ball_of_flame' WHERE entry IN (38332,38451); +UPDATE creature_template SET ScriptName='npc_kinetic_bomb' WHERE entry=38454; +UPDATE creature_template SET ScriptName='npc_dark_nucleus' WHERE entry=38369; +UPDATE creature_template SET ScriptName='boss_taldaram_icc' WHERE entry=37973; +UPDATE creature_template SET ScriptName='boss_keleseth_icc' WHERE entry=37972; +UPDATE creature_template SET ScriptName='boss_valanar_icc' WHERE entry=37970; UPDATE creature_template SET ScriptName='boss_blood_queen_lanathel' WHERE entry=37955; DELETE FROM scripted_event_id WHERE id IN (23426,23438); INSERT INTO scripted_event_id VALUES diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 58de9695b..664979eb9 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -3931,7 +3931,11 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1631193,'%s goes into a frenzy!',0,3,0,0,'saurfang EMOTE_FRENZY'), (-1631194,'%s\'s Blood Beasts gain the scent of blood!',0,3,0,0,'saurfang EMOTE_SCENT'), (-1631195,'Really... Is that all you got?',16791,1,0,0,'blood_queen SAY_SLAY_1'), -(-1631196,'Such a pity...',16792,1,0,0,'blood_queen SAY_SLAY_2'); +(-1631196,'Such a pity...',16792,1,0,0,'blood_queen SAY_SLAY_2'), + +(-1631197,'Invocation of Blood jumps to %s!',0,3,0,0,'blood_princes EMOTE_INVOCATION'), +(-1631198,'%s begins casting Empowered Shock Vortex!',0,3,0,0,'valanar EMOTE_SHOCK_VORTEX'), +(-1631199,'%s speed toward $N!',0,3,0,0,'taldaram EMOTE_FLAMES'); -- -1 632 000 ICC: FORGE OF SOULS INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES diff --git a/sql/updates/r2626_mangos.sql b/sql/updates/r2626_mangos.sql new file mode 100644 index 000000000..dd493a266 --- /dev/null +++ b/sql/updates/r2626_mangos.sql @@ -0,0 +1,7 @@ +UPDATE creature_template SET ScriptName='npc_blood_orb_control' WHERE entry=38008; +UPDATE creature_template SET ScriptName='npc_ball_of_flame' WHERE entry IN (38332,38451); +UPDATE creature_template SET ScriptName='npc_kinetic_bomb' WHERE entry=38454; +UPDATE creature_template SET ScriptName='npc_dark_nucleus' WHERE entry=38369; +UPDATE creature_template SET ScriptName='boss_taldaram_icc' WHERE entry=37973; +UPDATE creature_template SET ScriptName='boss_keleseth_icc' WHERE entry=37972; +UPDATE creature_template SET ScriptName='boss_valanar_icc' WHERE entry=37970; diff --git a/sql/updates/r2626_scriptdev2.sql b/sql/updates/r2626_scriptdev2.sql new file mode 100644 index 000000000..57f6f9372 --- /dev/null +++ b/sql/updates/r2626_scriptdev2.sql @@ -0,0 +1,5 @@ +DELETE FROM script_texts WHERE entry IN (-1631197,-1631198,-1631199); +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1631197,'Invocation of Blood jumps to %s!',0,3,0,0,'blood_princes EMOTE_INVOCATION'), +(-1631198,'%s begins casting Empowered Shock Vortex!',0,3,0,0,'valanar EMOTE_SHOCK_VORTEX'), +(-1631199,'%s speed toward $N!',0,3,0,0,'taldaram EMOTE_FLAMES'); From 1bdd687b5c11b6efb5da39b9503d71ca8100926c Mon Sep 17 00:00:00 2001 From: Xfurry Date: Fri, 13 Jul 2012 00:49:24 +0300 Subject: [PATCH 0615/1172] [2627] Apply a temporary workaround for Blood Princes due to the missing aura 300 support. Will be removed after the core will properly support this. --- .../icecrown_citadel/blood_prince_council.cpp | 8 ++++++++ sd2_revision_nr.h | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/blood_prince_council.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/blood_prince_council.cpp index 7115bbd42..a350f59dd 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/blood_prince_council.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/blood_prince_council.cpp @@ -513,6 +513,14 @@ struct MANGOS_DLL_DECL blood_prince_council_baseAI : public ScriptedAI // Damage is shared by the Blood Orb Control npc if (!m_uiEmpowermentTimer) uiDamage = 0; + + // ##### Workaround for missing aura 300 - Remove when this is implemented in core ##### + if (!m_pInstance || !uiDamage) + return; + + if (Creature* pOrb = m_pInstance->GetSingleCreatureFromStorage(NPC_BLOOD_ORB_CONTROL)) + pOrb->DealDamage(pOrb, uiDamage, NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + // ##### End of workaround ##### } void SpellHit(Unit* pCaster, const SpellEntry* pSpell) diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 018f34341..a9a38aa8c 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2626" + #define SD2_REVISION_NR "2627" #endif // __SD2_REVISION_NR_H__ From 181de5fa96ddeaf8f5fa84f1951873b98ddd69ca Mon Sep 17 00:00:00 2001 From: Xfurry Date: Fri, 13 Jul 2012 09:39:01 +0300 Subject: [PATCH 0616/1172] [2628] Allow Festergut and Rotface to yell when Stinky and Precious are killed --- .../icecrown_citadel/boss_festergut.cpp | 1 - .../icecrown_citadel/boss_rotface.cpp | 1 - .../icecrown_citadel/icecrown_citadel.h | 2 ++ .../instance_icecrown_citadel.cpp | 29 +++++++++++++++++-- sd2_revision_nr.h | 2 +- 5 files changed, 29 insertions(+), 6 deletions(-) diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_festergut.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_festergut.cpp index 70ec76748..2b869e195 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_festergut.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_festergut.cpp @@ -25,7 +25,6 @@ EndScriptData */ enum { - SAY_STINKY_DIES = -1631081, SAY_AGGRO = -1631082, SAY_BLIGHT = -1631083, SAY_SPORE = -1631084, diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_rotface.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_rotface.cpp index bfab41b7d..137e3b431 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_rotface.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_rotface.cpp @@ -25,7 +25,6 @@ EndScriptData */ enum { - SAY_PRECIOUS_DIES = -1631070, SAY_AGGRO = -1631071, SAY_SLIME_SPRAY = -1631072, SAY_OOZE_EXPLODE = -1631073, diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_citadel.h b/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_citadel.h index 70709bbb6..f2bb21ea3 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_citadel.h +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_citadel.h @@ -213,6 +213,8 @@ class MANGOS_DLL_DECL instance_icecrown_citadel : public ScriptedInstance, priva void OnCreatureCreate(Creature* pCreature); void OnObjectCreate(GameObject* pGo); + void OnCreatureDeath(Creature* pCreature); + void SetData(uint32 uiType, uint32 uiData); uint32 GetData(uint32 uiType); diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_citadel.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_citadel.cpp index 8977ae1de..981ce12d2 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_citadel.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_citadel.cpp @@ -37,6 +37,11 @@ enum SAY_DEATHWHISPER_SPEECH_5 = -1631015, SAY_DEATHWHISPER_SPEECH_6 = -1631016, SAY_DEATHWHISPER_SPEECH_7 = -1631017, + + // Festergut + SAY_STINKY_DIES = -1631081, + // Rotface + SAY_PRECIOUS_DIES = -1631070, }; static const DialogueEntry aCitadelDialogue[] = @@ -113,7 +118,6 @@ void instance_icecrown_citadel::OnCreatureCreate(Creature *pCreature) case NPC_TALDARAM: case NPC_VALANAR: case NPC_KELESETH: - case NPC_QUEEN_LANATHEL: case NPC_LANATHEL_INTRO: case NPC_VALITHRIA: case NPC_SINDRAGOSA: @@ -121,8 +125,6 @@ void instance_icecrown_citadel::OnCreatureCreate(Creature *pCreature) case NPC_TIRION: case NPC_RIMEFANG: case NPC_SPINESTALKER: - case NPC_STINKY: - case NPC_PRECIOUS: case NPC_VALITHRIA_COMBAT_TRIGGER: case NPC_BLOOD_ORB_CONTROL: m_mNpcEntryGuidStore[pCreature->GetEntry()] = pCreature->GetObjectGuid(); @@ -240,6 +242,27 @@ void instance_icecrown_citadel::OnObjectCreate(GameObject *pGo) m_mGoEntryGuidStore[pGo->GetEntry()] = pGo->GetObjectGuid(); } +void instance_icecrown_citadel::OnCreatureDeath(Creature* pCreature) +{ + switch (pCreature->GetEntry()) + { + case NPC_STINKY: + if (Creature* pFestergut = GetSingleCreatureFromStorage(NPC_FESTERGUT)) + { + if (pFestergut->isAlive()) + DoScriptText(SAY_STINKY_DIES, pFestergut); + } + break; + case NPC_PRECIOUS: + if (Creature* pRotface = GetSingleCreatureFromStorage(NPC_ROTFACE)) + { + if (pRotface->isAlive()) + DoScriptText(SAY_PRECIOUS_DIES, pRotface); + } + break; + } +} + void instance_icecrown_citadel::SetData(uint32 uiType, uint32 uiData) { switch(uiType) diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index a9a38aa8c..57aa5c091 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2627" + #define SD2_REVISION_NR "2628" #endif // __SD2_REVISION_NR_H__ From 76754155b0495d8c72412a04134ee733466bd3cd Mon Sep 17 00:00:00 2001 From: Xfurry Date: Fri, 13 Jul 2012 10:36:07 +0300 Subject: [PATCH 0617/1172] [2629] Improve timers for Shadow Labyrinth bosses Thanks to X-Savior for providing the data --- .../boss_ambassador_hellmaw.cpp | 8 ++--- .../boss_blackheart_the_inciter.cpp | 10 +++--- .../boss_grandmaster_vorpil.cpp | 12 +++---- .../shadow_labyrinth/boss_murmur.cpp | 31 +++++++++++-------- sd2_revision_nr.h | 2 +- 5 files changed, 34 insertions(+), 29 deletions(-) diff --git a/scripts/outland/auchindoun/shadow_labyrinth/boss_ambassador_hellmaw.cpp b/scripts/outland/auchindoun/shadow_labyrinth/boss_ambassador_hellmaw.cpp index d942feca1..d56f0ba2b 100644 --- a/scripts/outland/auchindoun/shadow_labyrinth/boss_ambassador_hellmaw.cpp +++ b/scripts/outland/auchindoun/shadow_labyrinth/boss_ambassador_hellmaw.cpp @@ -66,8 +66,8 @@ struct MANGOS_DLL_DECL boss_ambassador_hellmawAI : public ScriptedAI void Reset() { - m_uiCorrosiveAcidTimer = urand(5000, 10000); - m_uiFearTimer = urand(25000, 30000); + m_uiCorrosiveAcidTimer = urand(20000, 23000); + m_uiFearTimer = urand(20000, 26000); m_uiEnrageTimer = 3*MINUTE*IN_MILLISECONDS; m_bIsEnraged = false; } @@ -112,7 +112,7 @@ struct MANGOS_DLL_DECL boss_ambassador_hellmawAI : public ScriptedAI if (m_uiCorrosiveAcidTimer < uiDiff) { if (DoCastSpellIfCan(m_creature, SPELL_CORROSIVE_ACID) == CAST_OK) - m_uiCorrosiveAcidTimer = urand(15000, 25000); + m_uiCorrosiveAcidTimer = urand(23000, 35000); } else m_uiCorrosiveAcidTimer -= uiDiff; @@ -120,7 +120,7 @@ struct MANGOS_DLL_DECL boss_ambassador_hellmawAI : public ScriptedAI if (m_uiFearTimer < uiDiff) { if (DoCastSpellIfCan(m_creature, SPELL_FEAR) == CAST_OK) - m_uiFearTimer = urand(20000, 35000); + m_uiFearTimer = urand(20000, 38000); } else m_uiFearTimer -= uiDiff; diff --git a/scripts/outland/auchindoun/shadow_labyrinth/boss_blackheart_the_inciter.cpp b/scripts/outland/auchindoun/shadow_labyrinth/boss_blackheart_the_inciter.cpp index 00d147d22..217658e6f 100644 --- a/scripts/outland/auchindoun/shadow_labyrinth/boss_blackheart_the_inciter.cpp +++ b/scripts/outland/auchindoun/shadow_labyrinth/boss_blackheart_the_inciter.cpp @@ -69,9 +69,9 @@ struct MANGOS_DLL_DECL boss_blackheart_the_inciterAI : public ScriptedAI void Reset() { - m_uiInciteChaosTimer = 15000; - m_uiChargeTimer = 5000; - m_uiKnockbackTimer = 15000; + m_uiInciteChaosTimer = 50000; + m_uiChargeTimer = urand(30000, 37000); + m_uiKnockbackTimer = urand(10000, 14000); } void KilledUnit(Unit* pVictim) @@ -126,7 +126,7 @@ struct MANGOS_DLL_DECL boss_blackheart_the_inciterAI : public ScriptedAI { Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0); if (pTarget && DoCastSpellIfCan(pTarget, SPELL_CHARGE) == CAST_OK) - m_uiChargeTimer = urand(15000, 25000); + m_uiChargeTimer = urand(30000, 43000); } else m_uiChargeTimer -= uiDiff; @@ -135,7 +135,7 @@ struct MANGOS_DLL_DECL boss_blackheart_the_inciterAI : public ScriptedAI if (m_uiKnockbackTimer < uiDiff) { if (DoCastSpellIfCan(m_creature, SPELL_WAR_STOMP) == CAST_OK) - m_uiKnockbackTimer = urand(18000, 24000); + m_uiKnockbackTimer = urand(15000, 30000); } else m_uiKnockbackTimer -= uiDiff; diff --git a/scripts/outland/auchindoun/shadow_labyrinth/boss_grandmaster_vorpil.cpp b/scripts/outland/auchindoun/shadow_labyrinth/boss_grandmaster_vorpil.cpp index 19ae120f4..13c8e4ccd 100644 --- a/scripts/outland/auchindoun/shadow_labyrinth/boss_grandmaster_vorpil.cpp +++ b/scripts/outland/auchindoun/shadow_labyrinth/boss_grandmaster_vorpil.cpp @@ -99,11 +99,11 @@ struct MANGOS_DLL_DECL boss_grandmaster_vorpilAI : public ScriptedAI void Reset() { - m_uiShadowBoltVolleyTimer = urand(7000, 14000); - m_uiDrawShadowsTimer = 40000; + m_uiShadowBoltVolleyTimer = urand(13000, 19000); + m_uiDrawShadowsTimer = urand(38000, 44000); m_uiRainOfFireTimer = 0; m_uiVoidTravelerTimer = 5000; - m_uiBanishTimer = 25000; + m_uiBanishTimer = urand(12000, 16000); } void MoveInLineOfSight(Unit* pWho) @@ -208,7 +208,7 @@ struct MANGOS_DLL_DECL boss_grandmaster_vorpilAI : public ScriptedAI if (m_uiShadowBoltVolleyTimer < uiDiff) { if (DoCastSpellIfCan(m_creature, SPELL_SHADOW_BOLT_VOLLEY) == CAST_OK) - m_uiShadowBoltVolleyTimer = urand(15000, 30000); + m_uiShadowBoltVolleyTimer = urand(10000, 26000); } else m_uiShadowBoltVolleyTimer -= uiDiff; @@ -217,7 +217,7 @@ struct MANGOS_DLL_DECL boss_grandmaster_vorpilAI : public ScriptedAI { if (DoCastSpellIfCan(m_creature, SPELL_DRAW_SHADOWS) == CAST_OK) { - m_uiDrawShadowsTimer = 37000; + m_uiDrawShadowsTimer = urand(36000, 44000); m_uiRainOfFireTimer = 1000; } } @@ -242,7 +242,7 @@ struct MANGOS_DLL_DECL boss_grandmaster_vorpilAI : public ScriptedAI if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1)) { if (DoCastSpellIfCan(pTarget, SPELL_BANISH_H) == CAST_OK) - m_uiBanishTimer = 35000; + m_uiBanishTimer = urand(17000, 23000); } } else diff --git a/scripts/outland/auchindoun/shadow_labyrinth/boss_murmur.cpp b/scripts/outland/auchindoun/shadow_labyrinth/boss_murmur.cpp index b3f991d3d..0fcdc2f36 100644 --- a/scripts/outland/auchindoun/shadow_labyrinth/boss_murmur.cpp +++ b/scripts/outland/auchindoun/shadow_labyrinth/boss_murmur.cpp @@ -28,6 +28,11 @@ enum { EMOTE_SONIC_BOOM = -1555036, + // Intro spells - used on npcs + SPELL_SUPPRESSION_BLAST = 33332, + SPELL_MURMURS_WRATH = 33331, + SPELL_MURMURS_WRATH_2 = 33329, + SPELL_MAGNETIC_PULL = 33689, SPELL_SONIC_BOOM = 33923, // dummy spell - triggers 33666 SPELL_SONIC_BOOM_H = 38796, // dummy spell - triggers 38795 @@ -60,12 +65,12 @@ struct MANGOS_DLL_DECL boss_murmurAI : public Scripted_NoMovementAI void Reset() { - m_uiSonicBoomTimer = 30000; - m_uiMurmursTouchTimer = urand(8000, 20000); - m_uiResonanceTimer = 5000; - m_uiMagneticPullTimer = urand(15000, 30000); - m_uiSonicShockTimer = urand(4000, 10000); - m_uiThunderingStormTimer = 12000; // Casting directly after Sonic Boom. + m_uiSonicBoomTimer = urand(21000, 35000); + m_uiMurmursTouchTimer = urand(9000, 18000); + m_uiResonanceTimer = urand(1000, 7000); + m_uiMagneticPullTimer = urand(15000, 25000); + m_uiSonicShockTimer = urand(5000, 15000); + m_uiThunderingStormTimer = urand(10000, 50000); // Boss has only 0.4 of max health m_creature->SetHealth(uint32(m_creature->GetMaxHealth()*.4)); @@ -83,7 +88,7 @@ struct MANGOS_DLL_DECL boss_murmurAI : public Scripted_NoMovementAI if (DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_SONIC_BOOM : SPELL_SONIC_BOOM_H) == CAST_OK) { DoScriptText(EMOTE_SONIC_BOOM, m_creature); - m_uiSonicBoomTimer = 30000; + m_uiSonicBoomTimer = urand(31000, 38000); } } else @@ -93,7 +98,7 @@ struct MANGOS_DLL_DECL boss_murmurAI : public Scripted_NoMovementAI if (m_uiMurmursTouchTimer < uiDiff) { if (DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_MURMURS_TOUCH : SPELL_MURMURS_TOUCH_H) == CAST_OK) - m_uiMurmursTouchTimer = urand(25000, 35000); + m_uiMurmursTouchTimer = m_bIsRegularMode ? urand(21000, 21000) : urand(29000, 40000); } else m_uiMurmursTouchTimer -= uiDiff; @@ -104,7 +109,7 @@ struct MANGOS_DLL_DECL boss_murmurAI : public Scripted_NoMovementAI if (m_uiResonanceTimer < uiDiff) { if (DoCastSpellIfCan(m_creature, SPELL_RESONANCE) == CAST_OK) - m_uiResonanceTimer = 5000; + m_uiResonanceTimer = urand(5000, 12000); } else m_uiResonanceTimer -= uiDiff; @@ -113,10 +118,10 @@ struct MANGOS_DLL_DECL boss_murmurAI : public Scripted_NoMovementAI // MagneticPull_Timer if (m_uiMagneticPullTimer < uiDiff) { - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0, SPELL_MAGNETIC_PULL, SELECT_FLAG_PLAYER)) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0, SPELL_MAGNETIC_PULL, SELECT_FLAG_PLAYER | SELECT_FLAG_NOT_IN_MELEE_RANGE)) { if (DoCastSpellIfCan(pTarget, SPELL_MAGNETIC_PULL) == CAST_OK) - m_uiMagneticPullTimer = urand(15000, 30000); + m_uiMagneticPullTimer = urand(21000, 30000); } } else @@ -129,7 +134,7 @@ struct MANGOS_DLL_DECL boss_murmurAI : public Scripted_NoMovementAI if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0, SPELL_SONIC_SHOCK, SELECT_FLAG_IN_MELEE_RANGE)) { if (DoCastSpellIfCan(pTarget, SPELL_SONIC_SHOCK) == CAST_OK) - m_uiSonicShockTimer = urand(8000, 12000); + m_uiSonicShockTimer = urand(3000, 10000); } } else @@ -138,7 +143,7 @@ struct MANGOS_DLL_DECL boss_murmurAI : public Scripted_NoMovementAI if (m_uiThunderingStormTimer < uiDiff) { if (DoCastSpellIfCan(m_creature, SPELL_THUNDERING_STORM) == CAST_OK) - m_uiThunderingStormTimer = 12000; + m_uiThunderingStormTimer = urand(5000, 6000); } else m_uiThunderingStormTimer -= uiDiff; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 57aa5c091..03363ebb3 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2628" + #define SD2_REVISION_NR "2629" #endif // __SD2_REVISION_NR_H__ From 966aec6c9d1fd8a4d4e3630ef93b01a2331f479d Mon Sep 17 00:00:00 2001 From: Kid10 Date: Sat, 14 Jul 2012 01:25:51 +0300 Subject: [PATCH 0618/1172] [2630] Implement script support for Anub'arak - Trial of the Crusader Note: the Frostspheres might have some issues because they are critters and sometimes they get killed instead of faking death. Signed-off-by: Xfurry --- .../boss_anubarak_trial.cpp | 585 +++++++++++++++++- .../instance_trial_of_the_crusader.cpp | 4 +- .../trial_of_the_crusader.h | 23 + sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 3 + sql/scriptdev2_script_full.sql | 7 +- sql/updates/r2630_mangos.sql | 3 + sql/updates/r2630_scriptdev2.sql | 6 + 8 files changed, 621 insertions(+), 12 deletions(-) create mode 100644 sql/updates/r2630_mangos.sql create mode 100644 sql/updates/r2630_scriptdev2.sql diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp index 9db9b9118..a71efca4e 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp @@ -16,9 +16,9 @@ /* ScriptData SDName: boss_anubarak_trial -SD%Complete: 0 +SD%Complete: 100 SDComment: -SDCategory: +SDCategory: Crusader Coliseum EndScriptData */ #include "precompiled.h" @@ -26,6 +26,7 @@ EndScriptData */ enum { + SAY_INTRO = -1649038, SAY_AGGRO = -1649064, SAY_SLAY_1 = -1649065, SAY_SLAY_2 = -1649066, @@ -33,35 +34,238 @@ enum SAY_BERSERK = -1649068, SAY_SUBMERGE = -1649069, SAY_LEECHING_SWARM = -1649070, + + EMOTE_BURROW = -1649071, + EMOTE_PURSUE = -1649072, + EMOTE_EMERGE = -1649073, + EMOTE_LEECHING_SWARM = -1649074, + + // Anub'arak + SPELL_FREEZING_SLASH = 66012, + SPELL_PENETRATING_COLD = 66013, + SPELL_SUMMON_NERUBIAN_BURROWER = 66332, + SPELL_SUMMON_SCARAB = 66339, + SPELL_SUBMERGE = 65981, + SPELL_EMERGE = 65982, + SPELL_TELEPORT_TO_SPIKE = 66170, // used when the underground phase ends + SPELL_CLEAR_ALL_DEBUFFS = 34098, + SPELL_SUMMON_SPIKES = 66169, + SPELL_LEECHING_SWARM = 66118, + SPELL_BERSERK = 26662, + + // Pursuing Spikes + SPELL_PURSUING_SPIKES_FAIL = 66181, + SPELL_PURSUING_SPIKES_SPEED1 = 65920, + //SPELL_PURSUING_SPIKES_GROUND = 65921, // included in creature_template_addon + SPELL_PURSUING_SPIKES_SPEED2 = 65922, + SPELL_PURSUING_SPIKES_SPEED3 = 65923, + SPELL_MARK = 67574, + + // Frostsphere + SPELL_PERMAFROST_VISUAL = 65882, // triggers 65872 + SPELL_PERMAFROST_DUMMY = 65872, // dummy spell which handles the spike fail event + SPELL_PERMAFROST_TRANSFORM = 66185, + SPELL_PERMAFROST_SLOW = 66193, // slow spell + SPELL_FROSTSPHERE_VISUAL = 67539, + + POINT_GROUND = 0, + + // npcs + NPC_SCARAB = 34605, + NPC_FROSTSPHERE = 34606, + NPC_NERUBIAN_BURROWER = 34607, + NPC_ANUBARAK_SPIKE = 34660, + NPC_BURROW = 34862, + + MAX_FROSTSPHERES = 6, + MAX_BURROWS = 4 }; +enum Phases +{ + PHASE_GROUND = 0, + PHASE_UNDERGROUND = 1, + PHASE_LEECHING_SWARM = 2 +}; + +enum PursuingSpikesPhases +{ + PHASE_NO_MOVEMENT = 0, + PHASE_IMPALE_NORMAL = 1, + PHASE_IMPALE_MIDDLE = 2, + PHASE_IMPALE_FAST = 3 +}; + +static const float aFrostSphereSpawnPositions[MAX_FROSTSPHERES][3] = +{ + { 701.4270f, 126.4739f, 158.0205f }, + { 712.5711f, 160.9948f, 158.4367f }, + { 736.0243f, 113.4201f, 158.0225f }, + { 747.9201f, 155.0920f, 158.0613f }, + { 769.6285f, 121.1024f, 158.0504f }, + { 779.8038f, 150.658f, 158.1426f } +}; + +static const float aBurrowSpawnPositions[MAX_BURROWS][4] = +{ + { 735.4028f, 75.35764f, 142.2023f, 2.094395f }, + { 692.9202f, 184.809f, 142.2026f, 5.358161f }, + { 688.2066f, 102.8472f, 142.2023f, 0.6457718f }, + { 740.5452f, 189.1129f, 142.1972f, 3.752458f } +}; + +/*###### +## boss_anubarak_trial +######*/ + struct MANGOS_DLL_DECL boss_anubarak_trialAI : public ScriptedAI { boss_anubarak_trialAI(Creature* pCreature) : ScriptedAI(pCreature) { - m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_pInstance = (instance_trial_of_the_crusader*)pCreature->GetInstanceData(); + m_bDidIntroYell = false; Reset(); } - ScriptedInstance* m_pInstance; + instance_trial_of_the_crusader* m_pInstance; + + Phases m_Phase; - void Reset() {} + uint32 m_PhaseSwitchTimer; + uint32 m_uiFreezingSlashTimer; + uint32 m_uiPenetratingColdTimer; + uint32 m_uiBurrowerSummonTimer; + uint32 m_uiBerserkTimer; + bool m_bDidIntroYell; + + ObjectGuid m_PursuingSpikesGuid; + GuidVector m_vSpheresGuidVector; + + void Reset() + { + m_Phase = PHASE_GROUND; + m_PhaseSwitchTimer = 80000; + m_uiFreezingSlashTimer = 20000; + m_uiPenetratingColdTimer = urand(15000, 25000); + m_uiBurrowerSummonTimer = 10000; + m_uiBerserkTimer = 10*MINUTE*IN_MILLISECONDS; + + m_vSpheresGuidVector.clear(); + + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + } void JustReachedHome() { if (m_pInstance) - m_pInstance->SetData(TYPE_ANUBARAK, NOT_STARTED); + m_pInstance->SetData(TYPE_ANUBARAK, FAIL); } void JustDied(Unit* pKiller) { + DoScriptText(SAY_DEATH, m_creature); + if (m_pInstance) m_pInstance->SetData(TYPE_ANUBARAK, DONE); } + void MoveInLineOfSight(Unit* pWho) + { + if (!m_bDidIntroYell && pWho->GetTypeId() == TYPEID_PLAYER && !((Player*)pWho)->isGameMaster() && + pWho->IsWithinDistInMap(m_creature, 100) && pWho->IsWithinLOSInMap(m_creature)) + { + DoScriptText(SAY_INTRO, m_creature); + m_bDidIntroYell = true; + return; + } + + ScriptedAI::MoveInLineOfSight(pWho); + } + void Aggro(Unit* pWho) { - m_creature->SetInCombatWithZone(); + DoScriptText(SAY_AGGRO, m_creature); + + m_vSpheresGuidVector.reserve(MAX_FROSTSPHERES); + + // Summon the spheres on random points + for (uint8 i = 0; i < MAX_FROSTSPHERES; ++i) + { + if (Creature* pTemp = m_creature->SummonCreature(NPC_FROSTSPHERE, aFrostSphereSpawnPositions[i][0], aFrostSphereSpawnPositions[i][1], aFrostSphereSpawnPositions[i][2], 0, TEMPSUMMON_DEAD_DESPAWN, 0)) + m_vSpheresGuidVector[i] = pTemp->GetObjectGuid(); + } + + // It's not clear if these should be spawned by DB or summoned + for (uint8 i = 0; i < MAX_BURROWS; ++i) + m_creature->SummonCreature(NPC_BURROW, aBurrowSpawnPositions[i][0], aBurrowSpawnPositions[i][1], aBurrowSpawnPositions[i][2], aBurrowSpawnPositions[i][3], TEMPSUMMON_DEAD_DESPAWN, 0); + + if (m_pInstance) + m_pInstance->SetData(TYPE_ANUBARAK, IN_PROGRESS); + } + + void KilledUnit(Unit* pVictim) + { + if (pVictim->GetTypeId() != TYPEID_PLAYER) + return; + + DoScriptText((urand(0, 1)) ? SAY_SLAY_1 : SAY_SLAY_2, m_creature); + } + + void SpellHit(Unit* pCaster, const SpellEntry* pSpell) + { + if (pSpell->Id == SPELL_SUBMERGE) + { + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + + // Refresh spheres only on normal difficulty + if (m_pInstance && !m_pInstance->IsHeroicDifficulty()) + DoRefreshSpheres(); + + DoCastSpellIfCan(m_creature, SPELL_CLEAR_ALL_DEBUFFS, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_SUMMON_SPIKES, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_SUMMON_SCARAB, CAST_TRIGGERED); + } + } + + void JustSummoned(Creature* pSummoned) + { + switch (pSummoned->GetEntry()) + { + case NPC_ANUBARAK_SPIKE: + m_PursuingSpikesGuid = pSummoned->GetObjectGuid(); + // no break here + case NPC_NERUBIAN_BURROWER: + case NPC_SCARAB: + pSummoned->AI()->AttackStart(m_creature->getVictim()); + break; + } + } + + // Wrapper to refresh frost spheres - it's not very clear how ofter should this happen + void DoRefreshSpheres() + { + uint8 uiNewSpheres = 0; + + for (uint8 i = 0; i < MAX_FROSTSPHERES; ++i) + { + // If the sphere is alive and hasn't transfomed to permafrost yet summon a new one + Creature* pTemp = m_creature->GetMap()->GetCreature(m_vSpheresGuidVector[i]); + if (pTemp && !pTemp->HasAura(SPELL_PERMAFROST_TRANSFORM)) + continue; + + // Summon a new frost sphere instead of the killed one + if (Creature* pTemp = m_creature->SummonCreature(NPC_FROSTSPHERE, aFrostSphereSpawnPositions[i][0], aFrostSphereSpawnPositions[i][1], aFrostSphereSpawnPositions[i][2], 0, TEMPSUMMON_DEAD_DESPAWN, 0)) + m_vSpheresGuidVector[i] = pTemp->GetObjectGuid(); + } + } + + // Wrapper to despawn the Spikes + void DoDespawnPursuingSpikes() + { + if (Creature* pPursuingSpikes = m_creature->GetMap()->GetCreature(m_PursuingSpikesGuid)) + pPursuingSpikes->ForcedDespawn(); + + m_PursuingSpikesGuid.Clear(); } void UpdateAI(const uint32 uiDiff) @@ -69,7 +273,122 @@ struct MANGOS_DLL_DECL boss_anubarak_trialAI : public ScriptedAI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - DoMeleeAttackIfReady(); + switch (m_Phase) + { + case PHASE_GROUND: + + // Switch to underground phase on timer + if (m_PhaseSwitchTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_SUBMERGE) == CAST_OK) + { + DoScriptText(SAY_SUBMERGE, m_creature); + DoScriptText(EMOTE_BURROW, m_creature); + m_PhaseSwitchTimer = 65000; + m_Phase = PHASE_UNDERGROUND; + return; + } + } + else + m_PhaseSwitchTimer -= uiDiff; + + // Switch to phase 3 when below 30% + if (m_creature->GetHealthPercent() <= 30.0f) + { + if (DoCastSpellIfCan(m_creature, SPELL_LEECHING_SWARM) == CAST_OK) + { + DoScriptText(SAY_LEECHING_SWARM, m_creature); + DoScriptText(EMOTE_LEECHING_SWARM, m_creature); + m_Phase = PHASE_LEECHING_SWARM; + } + } + + // No break - the spells are used in both phase 1 and 3 + case PHASE_LEECHING_SWARM: + + if (m_uiFreezingSlashTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_FREEZING_SLASH) == CAST_OK) + m_uiFreezingSlashTimer = 20000; + } + else + m_uiFreezingSlashTimer -= uiDiff; + + if (m_uiPenetratingColdTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_PENETRATING_COLD) == CAST_OK) + m_uiPenetratingColdTimer = 15000; + } + else + m_uiPenetratingColdTimer -= uiDiff; + + // The Borrowers are summoned in Ground phase only on normal mode or during Ground and Swarm phase on heroic mode + if (m_Phase == PHASE_GROUND || (m_pInstance && m_pInstance->IsHeroicDifficulty())) + { + if (m_uiBurrowerSummonTimer < uiDiff) + { + DoCastSpellIfCan(m_creature, SPELL_SUMMON_NERUBIAN_BURROWER, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_SUMMON_NERUBIAN_BURROWER, CAST_TRIGGERED); + + // There are 4 summons on 25 man + if (m_pInstance && m_pInstance->Is25ManDifficulty()) + { + DoCastSpellIfCan(m_creature, SPELL_SUMMON_NERUBIAN_BURROWER, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_SUMMON_NERUBIAN_BURROWER, CAST_TRIGGERED); + } + + m_uiBurrowerSummonTimer = 45000; + } + else + m_uiBurrowerSummonTimer -= uiDiff; + } + + DoMeleeAttackIfReady(); + + break; + + case PHASE_UNDERGROUND: + + // Underground phase is finished + if (m_PhaseSwitchTimer < uiDiff) + { + DoCastSpellIfCan(m_creature, SPELL_EMERGE, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_TELEPORT_TO_SPIKE, CAST_TRIGGERED); + DoScriptText(EMOTE_EMERGE, m_creature); + DoDespawnPursuingSpikes(); + + m_creature->RemoveAurasDueToSpell(SPELL_SUBMERGE); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + + // Refresh spheres only on normal difficulty + if (m_pInstance && !m_pInstance->IsHeroicDifficulty()) + DoRefreshSpheres(); + + m_PhaseSwitchTimer = 80000; + m_Phase = PHASE_GROUND; + } + else + m_PhaseSwitchTimer -= uiDiff; + + break; + } + + if (m_uiBerserkTimer) + { + if (m_uiBerserkTimer <= uiDiff) + { + if (m_Phase != PHASE_UNDERGROUND) + { + if (DoCastSpellIfCan(m_creature, SPELL_BERSERK) == CAST_OK) + { + DoScriptText(SAY_BERSERK, m_creature); + m_uiBerserkTimer = 0; + } + } + } + else + m_uiBerserkTimer -= uiDiff; + } } }; @@ -78,6 +397,238 @@ CreatureAI* GetAI_boss_anubarak_trial(Creature* pCreature) return new boss_anubarak_trialAI(pCreature); } +/*###### +## npc_anubarak_trial_spike +######*/ + +struct MANGOS_DLL_DECL npc_anubarak_trial_spikeAI : public ScriptedAI +{ + npc_anubarak_trial_spikeAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } + + PursuingSpikesPhases m_Phase; + uint32 m_PhaseSwitchTimer; + + ObjectGuid m_PursuingVictimGuid; + + void Reset() + { + m_Phase = PHASE_NO_MOVEMENT; + m_PhaseSwitchTimer = 5000; + + m_PursuingVictimGuid.Clear(); + SetCombatMovement(false); + } + + // Handle permafrost hit from dummy spell + void PermafrostHit(Creature* pPermafrost) + { + // To prevent more than one call + if (m_Phase == PHASE_NO_MOVEMENT) + return; + + // Remove the speed auras + switch (m_Phase) + { + case PHASE_IMPALE_NORMAL: + m_creature->RemoveAurasDueToSpell(SPELL_PURSUING_SPIKES_SPEED1); + break; + case PHASE_IMPALE_MIDDLE: + m_creature->RemoveAurasDueToSpell(SPELL_PURSUING_SPIKES_SPEED2); + break; + case PHASE_IMPALE_FAST: + m_creature->RemoveAurasDueToSpell(SPELL_PURSUING_SPIKES_SPEED3); + break; + } + + // Set Spike fail animation and despawn + DoCastSpellIfCan(m_creature, SPELL_PURSUING_SPIKES_FAIL, CAST_TRIGGERED); + + if (pPermafrost) + pPermafrost->ForcedDespawn(2000); + + // After the spikes hit the icy surface they can't move for about ~5 seconds + m_Phase = PHASE_NO_MOVEMENT; + m_PhaseSwitchTimer = 5000; + DoResetThreat(); + + SetCombatMovement(false); + m_creature->GetMotionMaster()->Clear(); + m_creature->GetMotionMaster()->MoveIdle(); + } + + // Aquire a new victim + void SetPursuingVictim(Unit* pWho) + { + if (!pWho) + return; + + DoScriptText(EMOTE_PURSUE, m_creature, pWho); + DoCastSpellIfCan(pWho, SPELL_MARK, CAST_TRIGGERED); + m_PursuingVictimGuid = pWho->GetObjectGuid(); + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_PhaseSwitchTimer) + { + if (m_PhaseSwitchTimer <= uiDiff) + { + switch (m_Phase) + { + case PHASE_NO_MOVEMENT: + if (DoCastSpellIfCan(m_creature, SPELL_PURSUING_SPIKES_SPEED1) == CAST_OK) + { + // select a random target + Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0, SPELL_MARK, SELECT_FLAG_PLAYER | SELECT_FLAG_NOT_IN_MELEE_RANGE); + if (!pTarget) + pTarget = m_creature->getVictim(); + + // Start following target + SetCombatMovement(true); + SetPursuingVictim(pTarget); + DoStartMovement(pTarget); + + m_Phase = PHASE_IMPALE_NORMAL; + m_PhaseSwitchTimer = 7000; + } + break; + case PHASE_IMPALE_NORMAL: + if (DoCastSpellIfCan(m_creature, SPELL_PURSUING_SPIKES_SPEED2) == CAST_OK) + { + m_Phase = PHASE_IMPALE_MIDDLE; + m_PhaseSwitchTimer = 7000; + } + break; + case PHASE_IMPALE_MIDDLE: + if (DoCastSpellIfCan(m_creature, SPELL_PURSUING_SPIKES_SPEED3) == CAST_OK) + { + m_Phase = PHASE_IMPALE_FAST; + m_PhaseSwitchTimer = 0; + } + break; + } + } + else + m_PhaseSwitchTimer -= uiDiff; + } + } +}; + +CreatureAI* GetAI_npc_anubarak_trial_spike(Creature* pCreature) +{ + return new npc_anubarak_trial_spikeAI(pCreature); +} + +bool EffectDummyCreature_spell_dummy_permafrost(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) +{ + //always check spellid and effectindex + if (uiSpellId == SPELL_PERMAFROST_DUMMY && uiEffIndex == EFFECT_INDEX_0) + { + if (npc_anubarak_trial_spikeAI* pSpikeAI = dynamic_cast(pCreatureTarget->AI())) + pSpikeAI->PermafrostHit((Creature*)pCaster); + + //always return true when we are handling this spell and effect + return true; + } + + return false; +} + +/*###### +## npc_anubarak_trial_frostsphere +######*/ + +struct MANGOS_DLL_DECL npc_anubarak_trial_frostsphereAI : public Scripted_NoMovementAI +{ + npc_anubarak_trial_frostsphereAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { Reset(); } + + bool m_bPermafrost; + + void Reset() + { + m_bPermafrost = false; + + m_creature->GetMotionMaster()->MoveRandomAroundPoint(m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), 15.0f); + } + + void MoveInLineOfSight(Unit* pWho) { } + void AttackStart(Unit* pWho) { } + + void DamageTaken(Unit* pDoneBy, uint32 &uiDamage) + { + if (uiDamage < m_creature->GetHealth()) + return; + + // Set fake death in order to apply permafrost + if (m_bPermafrost) + { + uiDamage = 0; + return; + } + + uiDamage = 0; + + m_creature->InterruptNonMeleeSpells(false); + m_creature->SetHealth(0); + m_creature->StopMoving(); + m_creature->ClearComboPointHolders(); + m_creature->RemoveAllAurasOnDeath(); + m_creature->ModifyAuraState(AURA_STATE_HEALTHLESS_20_PERCENT, false); + m_creature->ModifyAuraState(AURA_STATE_HEALTHLESS_35_PERCENT, false); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + m_creature->ClearAllReactives(); + m_creature->SetTargetGuid(ObjectGuid()); + + // Set proper Z position + m_creature->SetWalk(false); + float fZ = pDoneBy->GetPositionZ(); + MaNGOS::NormalizeMapCoord(fZ); + + // Note: This should be fall movement + m_creature->GetMotionMaster()->Clear(); + m_creature->GetMotionMaster()->MovePoint(1, m_creature->GetPositionX(), m_creature->GetPositionY(), fZ); + m_bPermafrost = true; + } + + void MovementInform(uint32 uiMotionType, uint32 uiPointId) + { + if (uiMotionType != POINT_MOTION_TYPE || !uiPointId) + return; + + DoCastSpellIfCan(m_creature, SPELL_PERMAFROST_VISUAL, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_PERMAFROST_TRANSFORM, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_PERMAFROST_SLOW, CAST_TRIGGERED); + } +}; + +CreatureAI* GetAI_npc_anubarak_trial_frostsphere(Creature* pCreature) +{ + return new npc_anubarak_trial_frostsphereAI(pCreature); +} + +/*###### +## npc_nerubian_borrow +######*/ + +// TODO Remove this 'script' when combat movement can be proper prevented from core-side +struct MANGOS_DLL_DECL npc_nerubian_borrowAI : public Scripted_NoMovementAI +{ + npc_nerubian_borrowAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { Reset(); } + + void Reset() { } + void MoveInLineOfSight(Unit* pWho) { } + void AttackStart(Unit* pWho) { } + void UpdateAI(const uint32 uiDiff) { } +}; + +CreatureAI* GetAI_npc_nerubian_borrow(Creature* pCreature) +{ + return new npc_nerubian_borrowAI(pCreature); +} + void AddSC_boss_anubarak_trial() { Script* pNewScript; @@ -86,4 +637,20 @@ void AddSC_boss_anubarak_trial() pNewScript->Name = "boss_anubarak_trial"; pNewScript->GetAI = &GetAI_boss_anubarak_trial; pNewScript->RegisterSelf(); -} \ No newline at end of file + + pNewScript = new Script; + pNewScript->Name = "npc_anubarak_spike"; + pNewScript->GetAI = &GetAI_npc_anubarak_trial_spike; + pNewScript->pEffectDummyNPC = &EffectDummyCreature_spell_dummy_permafrost; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_frost_sphere"; + pNewScript->GetAI = &GetAI_npc_anubarak_trial_frostsphere; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_nerubian_borrow"; + pNewScript->GetAI = &GetAI_npc_nerubian_borrow; + pNewScript->RegisterSelf(); +} diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp index 998a60fa1..e0803f133 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp @@ -82,7 +82,6 @@ enum SAY_TIRION_ABUN_INTRO_1 = -1649035, SAY_LKING_ANUB_INTRO_2 = -1649036, SAY_LKING_ANUB_INTRO_3 = -1649037, - SAY_ANUB_ANUB_INTRO_1 = -1649038, // NYI }; static const DialogueEntryTwoSide aTocDialogues[] = @@ -203,6 +202,7 @@ void instance_trial_of_the_crusader::OnObjectCreate(GameObject* pGo) } break; case GO_MAIN_GATE: + case GO_WEB_DOOR: break; default: return; @@ -290,6 +290,8 @@ void instance_trial_of_the_crusader::SetData(uint32 uiType, uint32 uiData) StartNextDialogueText(TYPE_ANUBARAK); else if (uiData == FAIL) SetData(TYPE_WIPE_COUNT, m_auiEncounter[TYPE_WIPE_COUNT] + 1); + if (uiData != SPECIAL) + DoUseDoorOrButton(GO_WEB_DOOR); m_auiEncounter[uiType] = uiData; break; default: diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h index 9c8165d4a..0cab00f7d 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h @@ -56,7 +56,26 @@ enum NPC_PURPLE_RUNE = 35651, GO_MAIN_GATE = 195647, + GO_WEST_GATE = 195648, // entrance gate + GO_SOUTH_GATE = 195649, // south and north doors are used to allow the Champions to enter the arena + GO_NORTH_GATE = 195650, GO_COLISEUM_FLOOR = 195527, + GO_WEB_DOOR = 195485, + + GO_CRUSADERS_CACHE = 195631, + GO_CRUSADERS_CACHE_25 = 195632, + GO_CRUSADERS_CACHE_10_H = 195633, + GO_CRUSADERS_CACHE_25_H = 195635, + + GO_TRIBUTE_CHEST_10H_25 = 195665, + GO_TRIBUTE_CHEST_10H_45 = 195666, + GO_TRIBUTE_CHEST_10H_50 = 195667, + GO_TRIBUTE_CHEST_10H_99 = 195668, + + GO_TRIBUTE_CHEST_25H_25 = 195669, + GO_TRIBUTE_CHEST_25H_45 = 195670, + GO_TRIBUTE_CHEST_25H_50 = 195671, + GO_TRIBUTE_CHEST_25H_99 = 195672, SPELL_OPEN_PORTAL = 67864, SPELL_FEL_LIGHTNING_KILL = 67888, @@ -116,6 +135,10 @@ class MANGOS_DLL_DECL instance_trial_of_the_crusader : public ScriptedInstance, void SetData(uint32 uiType, uint32 uiData); uint32 GetData(uint32 uiType); + // Difficulty wrappers + bool IsHeroicDifficulty() { return instance->GetDifficulty() > RAID_DIFFICULTY_25MAN_NORMAL; } + bool Is25ManDifficulty() { return instance->GetDifficulty() == RAID_DIFFICULTY_25MAN_NORMAL || instance->GetDifficulty() == RAID_DIFFICULTY_25MAN_HEROIC; } + const char* Save() { return m_strInstData.c_str(); } void Load(const char* chrIn); diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 03363ebb3..b8f8d23a0 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2629" + #define SD2_REVISION_NR "2630" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index b1383d418..2ca3523e5 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -516,6 +516,9 @@ UPDATE creature_template SET ScriptName='boss_jaraxxus' WHERE entry=34780; UPDATE creature_template SET ScriptName='boss_anubarak_trial' WHERE entry=34564; UPDATE creature_template SET ScriptName='boss_fjola' WHERE entry=34497; UPDATE creature_template SET ScriptName='boss_eydis' WHERE entry=34496; +UPDATE creature_template SET ScriptName='npc_anubarak_spike' WHERE entry=34660; +UPDATE creature_template SET ScriptName='npc_frost_sphere' WHERE entry=34606; +UPDATE creature_template SET ScriptName='npc_nerubian_borrow' WHERE entry=34862; /* DALARAN */ UPDATE creature_template SET ScriptName='npc_dalaran_guardian_mage' WHERE entry IN (29255, 29254); diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 664979eb9..7862c1306 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -4049,7 +4049,12 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1649067,'I have failed you, master...',16238,1,0,0,'anubarak SAY_DEATH'), (-1649068,'',16239,1,0,0,'anubarak SAY_BERSERK'), (-1649069,'Auum na-l ak-k-k-k, isshhh. Rise, minions. Devour...',16240,1,0,0,'anubarak SAY_SUBMERGE'), -(-1649070,'The swarm shall overtake you!',16241,1,0,0,'anubarak SAY_LEECHING_SWARM'); +(-1649070,'The swarm shall overtake you!',16241,1,0,0,'anubarak SAY_LEECHING_SWARM'), + +(-1649071,'%s burrows into the ground!',0,3,0,0,'anubarak EMOTE_BURROW'), +(-1649072,'%s spikes pursue $N!',0,3,0,0,'anubarak EMOTE_PURSUE'), +(-1649073,'%s emerges from the ground!',0,3,0,0,'anubarak EMOTE_EMERGE'), +(-1649074,'%s unleashes a Leeching Swarm to heal himself!',0,3,0,0,'anubarak EMOTE_SWARM'); -- -1 650 000 TRIAL OF THE CHAMPION diff --git a/sql/updates/r2630_mangos.sql b/sql/updates/r2630_mangos.sql new file mode 100644 index 000000000..74e59c5ea --- /dev/null +++ b/sql/updates/r2630_mangos.sql @@ -0,0 +1,3 @@ +UPDATE creature_template SET ScriptName='npc_anubarak_spike' WHERE entry=34660; +UPDATE creature_template SET ScriptName='npc_frost_sphere' WHERE entry=34606; +UPDATE creature_template SET ScriptName='npc_nerubian_borrow' WHERE entry=34862; diff --git a/sql/updates/r2630_scriptdev2.sql b/sql/updates/r2630_scriptdev2.sql new file mode 100644 index 000000000..055f148fe --- /dev/null +++ b/sql/updates/r2630_scriptdev2.sql @@ -0,0 +1,6 @@ +DELETE FROM script_texts WHERE entry IN (-1649071,-1649072,-1649073,-1649074); +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1649071,'%s burrows into the ground!',0,3,0,0,'anubarak EMOTE_BURROW'), +(-1649072,'%s spikes pursue $N!',0,3,0,0,'anubarak EMOTE_PURSUE'), +(-1649073,'%s emerges from the ground!',0,3,0,0,'anubarak EMOTE_EMERGE'), +(-1649074,'%s unleashes a Leeching Swarm to heal himself!',0,3,0,0,'anubarak EMOTE_SWARM'); From f3743a2052e3005d4086f0354584bb89927b0912 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sat, 14 Jul 2012 08:47:48 +0300 Subject: [PATCH 0619/1172] [2631] Add some fixes to the previous commit. Thanks Reamer for pointing. --- .../boss_anubarak_trial.cpp | 21 +++++-------------- sd2_revision_nr.h | 2 +- 2 files changed, 6 insertions(+), 17 deletions(-) diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp index a71efca4e..10c950d67 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp @@ -55,6 +55,7 @@ enum // Pursuing Spikes SPELL_PURSUING_SPIKES_FAIL = 66181, + SPELL_PURSUING_SPIKES_DUMMY = 67470, // target selection spell - currently not used SPELL_PURSUING_SPIKES_SPEED1 = 65920, //SPELL_PURSUING_SPIKES_GROUND = 65921, // included in creature_template_addon SPELL_PURSUING_SPIKES_SPEED2 = 65922, @@ -327,17 +328,9 @@ struct MANGOS_DLL_DECL boss_anubarak_trialAI : public ScriptedAI { if (m_uiBurrowerSummonTimer < uiDiff) { - DoCastSpellIfCan(m_creature, SPELL_SUMMON_NERUBIAN_BURROWER, CAST_TRIGGERED); - DoCastSpellIfCan(m_creature, SPELL_SUMMON_NERUBIAN_BURROWER, CAST_TRIGGERED); - - // There are 4 summons on 25 man - if (m_pInstance && m_pInstance->Is25ManDifficulty()) - { - DoCastSpellIfCan(m_creature, SPELL_SUMMON_NERUBIAN_BURROWER, CAST_TRIGGERED); - DoCastSpellIfCan(m_creature, SPELL_SUMMON_NERUBIAN_BURROWER, CAST_TRIGGERED); - } - - m_uiBurrowerSummonTimer = 45000; + // The number of targets is handled in core, based on difficulty + if (DoCastSpellIfCan(m_creature, SPELL_SUMMON_NERUBIAN_BURROWER) == CAST_OK) + m_uiBurrowerSummonTimer = 45000; } else m_uiBurrowerSummonTimer -= uiDiff; @@ -408,14 +401,11 @@ struct MANGOS_DLL_DECL npc_anubarak_trial_spikeAI : public ScriptedAI PursuingSpikesPhases m_Phase; uint32 m_PhaseSwitchTimer; - ObjectGuid m_PursuingVictimGuid; - void Reset() { m_Phase = PHASE_NO_MOVEMENT; m_PhaseSwitchTimer = 5000; - m_PursuingVictimGuid.Clear(); SetCombatMovement(false); } @@ -464,7 +454,6 @@ struct MANGOS_DLL_DECL npc_anubarak_trial_spikeAI : public ScriptedAI DoScriptText(EMOTE_PURSUE, m_creature, pWho); DoCastSpellIfCan(pWho, SPELL_MARK, CAST_TRIGGERED); - m_PursuingVictimGuid = pWho->GetObjectGuid(); } void UpdateAI(const uint32 uiDiff) @@ -481,7 +470,7 @@ struct MANGOS_DLL_DECL npc_anubarak_trial_spikeAI : public ScriptedAI case PHASE_NO_MOVEMENT: if (DoCastSpellIfCan(m_creature, SPELL_PURSUING_SPIKES_SPEED1) == CAST_OK) { - // select a random target + // select a random target - ToDo: use the dummy spell in order to select target! Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0, SPELL_MARK, SELECT_FLAG_PLAYER | SELECT_FLAG_NOT_IN_MELEE_RANGE); if (!pTarget) pTarget = m_creature->getVictim(); diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index b8f8d23a0..e6eb04230 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2630" + #define SD2_REVISION_NR "2631" #endif // __SD2_REVISION_NR_H__ From cd7052e64e6fe34b5f029bc40e52e5d12c333342 Mon Sep 17 00:00:00 2001 From: michalpolko Date: Sun, 15 Jul 2012 14:59:02 +0200 Subject: [PATCH 0620/1172] [2632] Implement base scripts for Sindragosa, Rimefang and Spinestalker - ICC. --- .../icecrown_citadel/boss_sindragosa.cpp | 136 ++++++++++++++++++ sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 3 + sql/updates/r2632_mangos.sql | 3 + 4 files changed, 143 insertions(+), 1 deletion(-) create mode 100644 sql/updates/r2632_mangos.sql diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp index 26cbded0e..a37f56538 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp @@ -22,6 +22,7 @@ SDCategory: Icecrown Citadel EndScriptData */ #include "precompiled.h" +#include "icecrown_citadel.h" enum { @@ -37,6 +38,141 @@ enum SAY_DEATH = -1631157, }; +struct MANGOS_DLL_DECL boss_sindragosaAI : public ScriptedAI +{ + boss_sindragosaAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (instance_icecrown_citadel*)pCreature->GetInstanceData(); + Reset(); + } + + instance_icecrown_citadel* m_pInstance; + + void Reset() + { + } + + void JustReachedHome() + { + if (m_pInstance) + m_pInstance->SetData(TYPE_SINDRAGOSA, FAIL); + } + + void KilledUnit(Unit* pVictim) + { + DoScriptText(urand(0, 1) ? SAY_SLAY_1 : SAY_SLAY_2, m_creature); + } + + void Aggro(Unit* pWho) + { + DoScriptText(SAY_AGGRO, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_SINDRAGOSA, IN_PROGRESS); + } + + void JustDied(Unit* pKiller) + { + DoScriptText(SAY_DEATH, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_SINDRAGOSA, DONE); + } + + void MovementInform(uint32 uiMovementType, uint32 uiPointId) + { + if (uiMovementType != POINT_MOTION_TYPE) + return; + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_sindragosa(Creature* pCreature) +{ + return new boss_sindragosaAI(pCreature); +} + + +struct MANGOS_DLL_DECL npc_rimefang_iccAI : public ScriptedAI +{ + npc_rimefang_iccAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (instance_icecrown_citadel*)pCreature->GetInstanceData(); + Reset(); + } + + instance_icecrown_citadel* m_pInstance; + + void Reset() + { + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_npc_rimefang_icc(Creature* pCreature) +{ + return new npc_rimefang_iccAI(pCreature); +} + + +struct MANGOS_DLL_DECL npc_spinestalker_iccAI : public ScriptedAI +{ + npc_spinestalker_iccAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (instance_icecrown_citadel*)pCreature->GetInstanceData(); + Reset(); + } + + instance_icecrown_citadel* m_pInstance; + + void Reset() + { + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_npc_spinestalker_icc(Creature* pCreature) +{ + return new npc_spinestalker_iccAI(pCreature); +} + void AddSC_boss_sindragosa() { + Script *pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_sindragosa"; + pNewScript->GetAI = &GetAI_boss_sindragosa; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_rimefang_icc"; + pNewScript->GetAI = &GetAI_npc_rimefang_icc; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_spinestalker_icc"; + pNewScript->GetAI = &GetAI_npc_spinestalker_icc; + pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index e6eb04230..205f2c9f8 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2631" + #define SD2_REVISION_NR "2632" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 2ca3523e5..a8e8461f6 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -725,6 +725,9 @@ UPDATE creature_template SET ScriptName='boss_taldaram_icc' WHERE entry=37973; UPDATE creature_template SET ScriptName='boss_keleseth_icc' WHERE entry=37972; UPDATE creature_template SET ScriptName='boss_valanar_icc' WHERE entry=37970; UPDATE creature_template SET ScriptName='boss_blood_queen_lanathel' WHERE entry=37955; +UPDATE creature_template SET ScriptName='boss_sindragosa' WHERE entry=36853; +UPDATE creature_template SET ScriptName='npc_rimefang_icc' WHERE entry=37533; +UPDATE creature_template SET ScriptName='npc_spinestalker_icc' WHERE entry=37534; DELETE FROM scripted_event_id WHERE id IN (23426,23438); INSERT INTO scripted_event_id VALUES (23426,'event_gameobject_citadel_valve'), diff --git a/sql/updates/r2632_mangos.sql b/sql/updates/r2632_mangos.sql new file mode 100644 index 000000000..5e7ef3e72 --- /dev/null +++ b/sql/updates/r2632_mangos.sql @@ -0,0 +1,3 @@ +UPDATE creature_template SET ScriptName='boss_sindragosa' WHERE entry=36853; +UPDATE creature_template SET ScriptName='npc_rimefang_icc' WHERE entry=37533; +UPDATE creature_template SET ScriptName='npc_spinestalker_icc' WHERE entry=37534; From 27d51f35c3bb3d4bf82ba779237836aeb595b507 Mon Sep 17 00:00:00 2001 From: michalpolko Date: Sun, 15 Jul 2012 19:54:37 +0200 Subject: [PATCH 0621/1172] [2633] Implemented phases, movement and abilities for Sindragosa, Rimefang and Spinestalker. TODO: * Sindragosa - phases 2 and 3 abilities * Rimefang and Spinestalker - pulling (should they land just like Sindragosa?) and spawning Sindragosa after their death. --- include/sc_creature.cpp | 5 + .../icecrown_citadel/boss_sindragosa.cpp | 457 +++++++++++++++++- sd2_revision_nr.h | 2 +- 3 files changed, 458 insertions(+), 6 deletions(-) diff --git a/include/sc_creature.cpp b/include/sc_creature.cpp index 4db83aac4..1f593d9d3 100644 --- a/include/sc_creature.cpp +++ b/include/sc_creature.cpp @@ -511,6 +511,7 @@ enum NPC_TALON_KING_IKISS = 18473, NPC_KARGATH_BLADEFIST = 16808, NPC_ANUBARAK = 29120, + NPC_SINDRAGOSA = 36853 }; bool ScriptedAI::EnterEvadeIfOutOfCombatArea(const uint32 uiDiff) @@ -564,6 +565,10 @@ bool ScriptedAI::EnterEvadeIfOutOfCombatArea(const uint32 uiDiff) if (fY < 281.0f && fY > 228.0f) return false; break; + case NPC_SINDRAGOSA: + if (fX > 4314.0f) + return false; + break; default: error_log("SD2: EnterEvadeIfOutOfCombatArea used for creature entry %u, but does not have any definition.", m_creature->GetEntry()); return false; diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp index a37f56538..a03982199 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp @@ -36,6 +36,77 @@ enum SAY_SLAY_2 = -1631155, SAY_BERSERK = -1631156, SAY_DEATH = -1631157, + + // Spells + + // Sindragosa + + // all phases + SPELL_BERSERK = 26662, + + // Phase 1 and 3 + SPELL_TAIL_SMASH = 71077, + SPELL_CLEAVE = 19983, + SPELL_FROST_AURA = 70084, + SPELL_FROST_BREATH = 69649, + SPELL_ICY_GRIP = 70117, + SPELL_PERMEATING_CHILL = 70109, + SPELL_UNCHAINED_MAGIC = 69762, + + // Phase 2 + + // Phase 3 + SPELL_MYSTIC_BUFFET = 70128, + + // Rimefang + SPELL_RIMEFANG_FROST_AURA = 71387, + SPELL_RIMEFANG_FROST_BREATH = 71386, + SPELL_RIMEFANG_ICY_BLAST = 71376, + + // Spinestalker + SPELL_SPINESTALKER_BELLOWING_ROAR = 36922, + SPELL_SPINESTALKER_CLEAVE = 40505, + SPELL_SPINESTALKER_TAIL_SWEEP = 71369, +}; + +enum SindragosaPhase +{ + SINDRAGOSA_PHASE_OOC = 0, + SINDRAGOSA_PHASE_AGGRO = 1, + SINDRAGOSA_PHASE_GROUND = 2, + SINDRAGOSA_PHASE_FLYING_TO_AIR = 3, + SINDRAGOSA_PHASE_AIR = 4, + SINDRAGOSA_PHASE_FLYING_TO_GROUND = 5, + SINDRAGOSA_PHASE_THREE = 6, +}; + +enum SindragosaPoint +{ + SINDRAGOSA_POINT_GROUND_CENTER = 0, + SINDRAGOSA_POINT_AIR_CENTER = 1, + SINDRAGOSA_POINT_AIR_PHASE_2 = 2, +}; + +enum RimefangPhase +{ + RIMEFANG_PHASE_GROUND = 0, + RIMEFANG_PHASE_FLYING = 1, + RIMEFANG_PHASE_AIR = 2, +}; + +enum RimefangPoint +{ + RIMEFANG_POINT_GROUND = 0, + RIMEFANG_POINT_AIR = 1, +}; + +static const float SindragosaPosition[6][3] = +{ + {4407.44f, 2484.37f, 203.37f}, // center, ground + {4407.44f, 2484.37f, 235.37f}, // center, air + {4470.00f, 2484.37f, 235.37f}, // Sindragosa air phase point + {4414.32f, 2456.94f, 203.37f}, // Rimefang landing point? + {4414.32f, 2512.73f, 203.37f}, // Spinestalker landing point? }; struct MANGOS_DLL_DECL boss_sindragosaAI : public ScriptedAI @@ -48,8 +119,42 @@ struct MANGOS_DLL_DECL boss_sindragosaAI : public ScriptedAI instance_icecrown_citadel* m_pInstance; + uint32 m_uiPhase; + uint32 m_uiPhaseTimer; + uint32 m_uiBerserkTimer; + uint32 m_uiCleaveTimer; + uint32 m_uiFrostBreathTimer; + uint32 m_uiTailSmashTimer; + uint32 m_uiIcyGripTimer; + uint32 m_uiUnchainedMagicTimer; + void Reset() { + m_uiPhase = SINDRAGOSA_PHASE_OOC; + m_uiPhaseTimer = 45000; + m_uiBerserkTimer = 10 * MINUTE * IN_MILLISECONDS; + m_uiCleaveTimer = urand(5000, 15000); + m_uiTailSmashTimer = 20000; + m_uiFrostBreathTimer = 5000; + m_uiIcyGripTimer = 35000; + m_uiUnchainedMagicTimer = urand(15000, 30000); + } + + void SetFlying(bool bIsFlying) + { + if (bIsFlying) + m_creature->SetByteFlag(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_UNK_2); + else + m_creature->RemoveByteFlag(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_UNK_2); + + m_creature->SetLevitate(bIsFlying); + m_creature->SetWalk(bIsFlying); + } + + void EnterEvadeMode() + { + SetFlying(true); + ScriptedAI::EnterEvadeMode(); } void JustReachedHome() @@ -63,12 +168,24 @@ struct MANGOS_DLL_DECL boss_sindragosaAI : public ScriptedAI DoScriptText(urand(0, 1) ? SAY_SLAY_1 : SAY_SLAY_2, m_creature); } + void AttackStart(Unit *pWho) + { + ScriptedAI::AttackStart(pWho); + + // on aggro: land first, then start the encounter + if (m_uiPhase == SINDRAGOSA_PHASE_OOC) + { + m_uiPhase = SINDRAGOSA_PHASE_AGGRO; + SetCombatMovement(false); + m_creature->SetWalk(true); + m_creature->GetMotionMaster()->MovePoint(SINDRAGOSA_POINT_AIR_CENTER, SindragosaPosition[1][0], SindragosaPosition[1][1], SindragosaPosition[1][2], false); + } + } + void Aggro(Unit* pWho) { DoScriptText(SAY_AGGRO, m_creature); - - if (m_pInstance) - m_pInstance->SetData(TYPE_SINDRAGOSA, IN_PROGRESS); + // instance data set when sindragosa lands } void JustDied(Unit* pKiller) @@ -83,6 +200,55 @@ struct MANGOS_DLL_DECL boss_sindragosaAI : public ScriptedAI { if (uiMovementType != POINT_MOTION_TYPE) return; + + if (uiPointId == SINDRAGOSA_POINT_GROUND_CENTER) + { + // fly up + if (m_uiPhase == SINDRAGOSA_PHASE_GROUND) + { + m_uiPhase = SINDRAGOSA_PHASE_FLYING_TO_AIR; + SetFlying(true); + m_creature->GetMotionMaster()->MovePoint(SINDRAGOSA_POINT_AIR_CENTER, SindragosaPosition[1][0], SindragosaPosition[1][1], SindragosaPosition[1][2], false); + } + else // land and attack + { + // on aggro, after landing: set instance data and cast initial spells + if (m_uiPhase == SINDRAGOSA_PHASE_AGGRO) + { + DoCastSpellIfCan(m_creature, SPELL_FROST_AURA, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_PERMEATING_CHILL, CAST_TRIGGERED); + + if (m_pInstance) + m_pInstance->SetData(TYPE_SINDRAGOSA, IN_PROGRESS); + } + + m_uiPhase = SINDRAGOSA_PHASE_GROUND; + SetFlying(false); + SetCombatMovement(true); + + if (Unit *pVictim = m_creature->getVictim()) + m_creature->GetMotionMaster()->MoveChase(pVictim); + } + } + else if (uiPointId == SINDRAGOSA_POINT_AIR_CENTER) + { + if (m_uiPhase == SINDRAGOSA_PHASE_AGGRO || m_uiPhase == SINDRAGOSA_PHASE_FLYING_TO_GROUND) + { + // land + m_creature->GetMotionMaster()->MovePoint(SINDRAGOSA_POINT_GROUND_CENTER, SindragosaPosition[0][0], SindragosaPosition[0][1], SindragosaPosition[0][2], false); + } + else if (m_uiPhase == SINDRAGOSA_PHASE_FLYING_TO_AIR) + { + // fly up (air phase) + m_creature->GetMotionMaster()->MovePoint(SINDRAGOSA_POINT_AIR_PHASE_2, SindragosaPosition[2][0], SindragosaPosition[2][1], SindragosaPosition[2][2], false); + } + } + else if (uiPointId == SINDRAGOSA_POINT_AIR_PHASE_2) + { + // face the platform + m_creature->SetOrientation(M_PI_F); + m_uiPhase = SINDRAGOSA_PHASE_AIR; + } } void UpdateAI(const uint32 uiDiff) @@ -90,7 +256,129 @@ struct MANGOS_DLL_DECL boss_sindragosaAI : public ScriptedAI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - DoMeleeAttackIfReady(); + // Berserk + if (m_uiBerserkTimer) + { + if (m_uiBerserkTimer <= uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_BERSERK) == CAST_OK) + { + DoScriptText(SAY_BERSERK, m_creature); + m_uiBerserkTimer = 0; + } + } + else + m_uiBerserkTimer -= uiDiff; + } + + switch(m_uiPhase) + { + case SINDRAGOSA_PHASE_THREE: + // TODO:Ice Tombs + + // no break + case SINDRAGOSA_PHASE_GROUND: + { + // Phase 1 only + if (m_uiPhase == SINDRAGOSA_PHASE_GROUND) + { + // Health Check + if (m_creature->GetHealthPercent() <= 30.0f) + { + if (DoCastSpellIfCan(m_creature, SPELL_MYSTIC_BUFFET) == CAST_OK) + { + m_uiPhase = SINDRAGOSA_PHASE_THREE; + DoScriptText(SAY_PHASE_3, m_creature); + } + } + + // Phase 2 (air) + if (m_uiPhaseTimer <= uiDiff) + { + m_uiPhaseTimer = 35000; + DoScriptText(SAY_TAKEOFF, m_creature); + SetCombatMovement(false); + m_creature->GetMotionMaster()->MovePoint(SINDRAGOSA_POINT_GROUND_CENTER, SindragosaPosition[0][0], SindragosaPosition[0][1], SindragosaPosition[0][2], false); + } + else + m_uiPhaseTimer -= uiDiff; + } + + // Cleave + if (m_uiCleaveTimer <= uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_CLEAVE) == CAST_OK) + m_uiCleaveTimer = urand(5000, 15000); + } + else + m_uiCleaveTimer -= uiDiff; + + // Tail Smash + if (m_uiTailSmashTimer <= uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_TAIL_SMASH) == CAST_OK) + m_uiTailSmashTimer = urand(10000, 20000); + } + else + m_uiTailSmashTimer -= uiDiff; + + // Frost Breath + if (m_uiFrostBreathTimer <= uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_FROST_BREATH) == CAST_OK) + m_uiFrostBreathTimer = urand(15000, 20000); + } + else + m_uiFrostBreathTimer -= uiDiff; + + // Unchained Magic + if (m_uiUnchainedMagicTimer <= uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_UNCHAINED_MAGIC) == CAST_OK) + { + m_uiUnchainedMagicTimer = urand(40000, 60000); + DoScriptText(SAY_UNCHAINED_MAGIC, m_creature); + } + } + else + m_uiUnchainedMagicTimer -= uiDiff; + + // Icy Grip and Blistering Cold + if (m_uiIcyGripTimer <= uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_ICY_GRIP) == CAST_OK) + { + m_uiIcyGripTimer = 70000; + DoScriptText(SAY_BLISTERING_COLD, m_creature); + } + } + else + m_uiIcyGripTimer -= uiDiff; + + DoMeleeAttackIfReady(); + break; + } + case SINDRAGOSA_PHASE_FLYING_TO_GROUND: + case SINDRAGOSA_PHASE_FLYING_TO_AIR: + break; + case SINDRAGOSA_PHASE_AIR: + { + // Phase One (ground) + if (m_uiPhaseTimer <= uiDiff) + { + m_uiPhase = SINDRAGOSA_PHASE_FLYING_TO_GROUND; + m_uiPhaseTimer = 42000; + m_creature->GetMotionMaster()->MovePoint(SINDRAGOSA_POINT_AIR_CENTER, SindragosaPosition[1][0], SindragosaPosition[1][1], SindragosaPosition[1][2], false); + } + else + m_uiPhaseTimer -= uiDiff; + + break; + } + } + + // evade on top of the stairs + EnterEvadeIfOutOfCombatArea(uiDiff); } }; @@ -105,13 +393,80 @@ struct MANGOS_DLL_DECL npc_rimefang_iccAI : public ScriptedAI npc_rimefang_iccAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (instance_icecrown_citadel*)pCreature->GetInstanceData(); + + // Icy Blast - 3 casts on 10man, 6 on 25man + m_uiIcyBlastMaxCount = 3; + if (m_pInstance && m_pInstance->Is25ManDifficulty()) + m_uiIcyBlastMaxCount = 6; + Reset(); } instance_icecrown_citadel* m_pInstance; + uint32 m_uiPhase; + uint32 m_uiPhaseTimer; + uint32 m_uiFrostBreathTimer; + uint32 m_uiIcyBlastCounter; + uint32 m_uiIcyBlastMaxCount; + uint32 m_uiIcyBlastTimer; + void Reset() { + m_uiPhase = RIMEFANG_PHASE_GROUND; + m_uiPhaseTimer = 25000; + m_uiFrostBreathTimer = urand(5000, 8000); + m_uiIcyBlastTimer = 0; + m_uiIcyBlastCounter = 0; + + SetCombatMovement(true); + } + + void SetFlying(bool bIsFlying) + { + if (bIsFlying) + m_creature->SetByteFlag(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_UNK_2); + else + m_creature->RemoveByteFlag(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_UNK_2); + + m_creature->SetLevitate(bIsFlying); + m_creature->SetWalk(bIsFlying); + } + + void EnterEvadeMode() + { + SetFlying(true); + ScriptedAI::EnterEvadeMode(); + } + + void Aggro(Unit *pWho) + { + DoCastSpellIfCan(m_creature, SPELL_RIMEFANG_FROST_AURA, CAST_TRIGGERED); + } + + void JustDied(Unit *pKiller) + { + // TODO: Sindragosa invisible spawn or summon? + } + + void MovementInform(uint32 uiMovementType, uint32 uiPointId) + { + if (uiMovementType != POINT_MOTION_TYPE) + return; + + if (uiPointId == RIMEFANG_POINT_GROUND) + { + m_uiPhase = RIMEFANG_PHASE_GROUND; + SetFlying(false); + SetCombatMovement(true); + + if (Unit *pVictim = m_creature->getVictim()) + m_creature->GetMotionMaster()->MoveChase(pVictim); + } + else if (uiPointId == RIMEFANG_POINT_AIR) + { + m_uiPhase = RIMEFANG_PHASE_AIR; + } } void UpdateAI(const uint32 uiDiff) @@ -119,7 +474,60 @@ struct MANGOS_DLL_DECL npc_rimefang_iccAI : public ScriptedAI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - DoMeleeAttackIfReady(); + if (m_uiPhase == RIMEFANG_PHASE_GROUND) + { + // Frost Breath + if (m_uiFrostBreathTimer <= uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_RIMEFANG_FROST_BREATH) == CAST_OK) + m_uiFrostBreathTimer = urand(5000, 8000); + } + else + m_uiFrostBreathTimer -= uiDiff; + + // Icy Blast - air phase + if (m_uiPhaseTimer <= uiDiff) + { + m_uiPhaseTimer = 40000; + m_uiPhase = RIMEFANG_PHASE_FLYING; + SetFlying(true); + SetCombatMovement(false); + m_creature->GetMotionMaster()->Clear(); + m_creature->GetMotionMaster()->MovePoint(RIMEFANG_POINT_AIR, m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ() + 20.0f, false); + return; + } + else + m_uiPhaseTimer -= uiDiff; + + DoMeleeAttackIfReady(); + } + else if (m_uiPhase == RIMEFANG_PHASE_AIR) + { + // Icy Blast + if (m_uiIcyBlastTimer <= uiDiff) + { + if (Unit *pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0, SPELL_RIMEFANG_ICY_BLAST, SELECT_FLAG_PLAYER)) + { + if (DoCastSpellIfCan(pTarget, SPELL_RIMEFANG_ICY_BLAST) == CAST_OK) + { + m_uiIcyBlastTimer = 3000; + ++m_uiIcyBlastCounter; + + // phase end + if (m_uiIcyBlastCounter >= m_uiIcyBlastMaxCount) + { + m_uiIcyBlastCounter = 0; + m_uiIcyBlastTimer = 0; + m_uiPhase = RIMEFANG_PHASE_FLYING; + m_creature->GetMotionMaster()->Clear(); + m_creature->GetMotionMaster()->MovePoint(RIMEFANG_POINT_GROUND, m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ() - 20.0f, false); + } + } + } + } + else + m_uiIcyBlastTimer -= uiDiff; + } } }; @@ -139,8 +547,20 @@ struct MANGOS_DLL_DECL npc_spinestalker_iccAI : public ScriptedAI instance_icecrown_citadel* m_pInstance; + uint32 m_uiBellowingRoarTimer; + uint32 m_uiTailSweepTimer; + uint32 m_uiCleaveTimer; + void Reset() { + m_uiBellowingRoarTimer = urand(8000, 24000); + m_uiTailSweepTimer = urand(4000, 8000); + m_uiCleaveTimer = urand(5000, 8000); + } + + void JustDied(Unit *pKiller) + { + // TODO: Sindragosa invisible spawn or summon? } void UpdateAI(const uint32 uiDiff) @@ -148,6 +568,33 @@ struct MANGOS_DLL_DECL npc_spinestalker_iccAI : public ScriptedAI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; + // Cleave + if (m_uiCleaveTimer <= uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_SPINESTALKER_CLEAVE) == CAST_OK) + m_uiCleaveTimer = urand(5000, 8000); + } + else + m_uiCleaveTimer -= uiDiff; + + // Tail Sweep + if (m_uiTailSweepTimer <= uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_SPINESTALKER_TAIL_SWEEP) == CAST_OK) + m_uiTailSweepTimer = urand(4000, 8000); + } + else + m_uiTailSweepTimer -= uiDiff; + + // Bellowing Roar + if (m_uiBellowingRoarTimer <= uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_SPINESTALKER_BELLOWING_ROAR) == CAST_OK) + m_uiBellowingRoarTimer = urand(8000, 24000); + } + else + m_uiBellowingRoarTimer -= uiDiff; + DoMeleeAttackIfReady(); } }; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 205f2c9f8..d478abe2d 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2632" + #define SD2_REVISION_NR "2633" #endif // __SD2_REVISION_NR_H__ From b9d8ea6252ea6f14e7e1e6437651d0fc91fcc6e2 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Mon, 16 Jul 2012 22:50:08 +0300 Subject: [PATCH 0622/1172] [2634] More fixes to [2630] - Thanks Reamer for pointing the issue --- .../boss_anubarak_trial.cpp | 32 +++++++------------ sd2_revision_nr.h | 2 +- 2 files changed, 13 insertions(+), 21 deletions(-) diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp index 10c950d67..f54e4fe6c 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp @@ -55,7 +55,7 @@ enum // Pursuing Spikes SPELL_PURSUING_SPIKES_FAIL = 66181, - SPELL_PURSUING_SPIKES_DUMMY = 67470, // target selection spell - currently not used + SPELL_PURSUING_SPIKES_DUMMY = 67470, // target selection spell SPELL_PURSUING_SPIKES_SPEED1 = 65920, //SPELL_PURSUING_SPIKES_GROUND = 65921, // included in creature_template_addon SPELL_PURSUING_SPIKES_SPEED2 = 65922, @@ -409,6 +409,16 @@ struct MANGOS_DLL_DECL npc_anubarak_trial_spikeAI : public ScriptedAI SetCombatMovement(false); } + void SpellHitTarget(Unit* pTarget, const SpellEntry* pSpell) + { + if (pSpell->Id == SPELL_PURSUING_SPIKES_DUMMY && pTarget->GetTypeId() == TYPEID_PLAYER) + { + DoScriptText(EMOTE_PURSUE, m_creature, pTarget); + DoCastSpellIfCan(pTarget, SPELL_MARK, CAST_TRIGGERED); + DoStartMovement(pTarget); + } + } + // Handle permafrost hit from dummy spell void PermafrostHit(Creature* pPermafrost) { @@ -446,16 +456,6 @@ struct MANGOS_DLL_DECL npc_anubarak_trial_spikeAI : public ScriptedAI m_creature->GetMotionMaster()->MoveIdle(); } - // Aquire a new victim - void SetPursuingVictim(Unit* pWho) - { - if (!pWho) - return; - - DoScriptText(EMOTE_PURSUE, m_creature, pWho); - DoCastSpellIfCan(pWho, SPELL_MARK, CAST_TRIGGERED); - } - void UpdateAI(const uint32 uiDiff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) @@ -470,15 +470,7 @@ struct MANGOS_DLL_DECL npc_anubarak_trial_spikeAI : public ScriptedAI case PHASE_NO_MOVEMENT: if (DoCastSpellIfCan(m_creature, SPELL_PURSUING_SPIKES_SPEED1) == CAST_OK) { - // select a random target - ToDo: use the dummy spell in order to select target! - Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0, SPELL_MARK, SELECT_FLAG_PLAYER | SELECT_FLAG_NOT_IN_MELEE_RANGE); - if (!pTarget) - pTarget = m_creature->getVictim(); - - // Start following target - SetCombatMovement(true); - SetPursuingVictim(pTarget); - DoStartMovement(pTarget); + DoCastSpellIfCan(m_creature, SPELL_PURSUING_SPIKES_DUMMY, CAST_TRIGGERED); m_Phase = PHASE_IMPALE_NORMAL; m_PhaseSwitchTimer = 7000; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index d478abe2d..609200c6f 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2633" + #define SD2_REVISION_NR "2634" #endif // __SD2_REVISION_NR_H__ From 8064b9977a368631fbf977e1386210a222dfc170 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Tue, 17 Jul 2012 02:48:41 +0300 Subject: [PATCH 0623/1172] [2635] Cleanup and improve script for Archimonde - Mount Hyjal Notes: this will improve epilogue and Doomfire behavior Archimonde is now spawned by script, he shouldn't be spawned by DB anymore --- .../caverns_of_time/hyjal/boss_archimonde.cpp | 673 ++++++++---------- .../kalimdor/caverns_of_time/hyjal/hyjal.cpp | 39 +- .../kalimdor/caverns_of_time/hyjal/hyjal.h | 6 + .../caverns_of_time/hyjal/instance_hyjal.cpp | 28 +- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 3 +- sql/scriptdev2_script_full.sql | 12 +- sql/updates/r2635_mangos.sql | 2 + sql/updates/r2635_scriptdev2.sql | 10 + 9 files changed, 362 insertions(+), 413 deletions(-) create mode 100644 sql/updates/r2635_mangos.sql create mode 100644 sql/updates/r2635_scriptdev2.sql diff --git a/scripts/kalimdor/caverns_of_time/hyjal/boss_archimonde.cpp b/scripts/kalimdor/caverns_of_time/hyjal/boss_archimonde.cpp index 4d8257d4b..47df75285 100644 --- a/scripts/kalimdor/caverns_of_time/hyjal/boss_archimonde.cpp +++ b/scripts/kalimdor/caverns_of_time/hyjal/boss_archimonde.cpp @@ -17,154 +17,60 @@ /* ScriptData SDName: Boss_Archimonde SD%Complete: 85 -SDComment: Doomfires not completely offlike due to core limitations for random moving. Tyrande and second phase not fully implemented. +SDComment: Timers; Some details may need adjustments. SDCategory: Caverns of Time, Mount Hyjal EndScriptData */ #include "precompiled.h" #include "hyjal.h" -#include "SpellAuras.h" - -//text id -1534018 are the text used when previous events complete. Not part of this script. -#define SAY_AGGRO -1534019 -#define SAY_DOOMFIRE1 -1534020 -#define SAY_DOOMFIRE2 -1534021 -#define SAY_AIR_BURST1 -1534022 -#define SAY_AIR_BURST2 -1534023 -#define SAY_SLAY1 -1534024 -#define SAY_SLAY2 -1534025 -#define SAY_SLAY3 -1534026 -#define SAY_ENRAGE -1534027 -#define SAY_DEATH -1534028 -#define SAY_SOUL_CHARGE1 -1534029 -#define SAY_SOUL_CHARGE2 -1534030 - -#define SPELL_DENOUEMENT_WISP 32124 -#define SPELL_ANCIENT_SPARK 39349 -#define SPELL_PROTECTION_OF_ELUNE 38528 - -#define SPELL_DRAIN_WORLD_TREE 39140 -#define SPELL_DRAIN_WORLD_TREE_2 39141 - -#define SPELL_FINGER_OF_DEATH 31984 -#define SPELL_HAND_OF_DEATH 35354 -#define SPELL_AIR_BURST 32014 -#define SPELL_GRIP_OF_THE_LEGION 31972 -#define SPELL_DOOMFIRE_STRIKE 31903 //summons two creatures -#define SPELL_DOOMFIRE_SPAWN 32074 -#define SPELL_DOOMFIRE 31945 -#define SPELL_SOUL_CHARGE_YELLOW 32045 -#define SPELL_SOUL_CHARGE_GREEN 32051 -#define SPELL_SOUL_CHARGE_RED 32052 -#define SPELL_UNLEASH_SOUL_YELLOW 32054 -#define SPELL_UNLEASH_SOUL_GREEN 32057 -#define SPELL_UNLEASH_SOUL_RED 32053 -#define SPELL_FEAR 31970 - -#define CREATURE_ARCHIMONDE 17968 -#define CREATURE_DOOMFIRE 18095 -#define CREATURE_DOOMFIRE_SPIRIT 18104 -#define CREATURE_ANCIENT_WISP 17946 -#define CREATURE_CHANNEL_TARGET 22418 - -#define NORDRASSIL_X 5503.713f -#define NORDRASSIL_Y -3523.436f -#define NORDRASSIL_Z 1608.781f -struct mob_ancient_wispAI : public ScriptedAI +enum { - mob_ancient_wispAI(Creature* pCreature) : ScriptedAI(pCreature) - { - m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - Reset(); - } - - ScriptedInstance* m_pInstance; - uint32 CheckTimer; - - void Reset() - { - CheckTimer = 1000; - m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - } - - void DamageTaken(Unit* done_by, uint32 &damage) { damage = 0; } - - void UpdateAI(const uint32 diff) - { - if (!m_pInstance) - return; - - if (CheckTimer < diff) - { - if (Creature* Archimonde = m_pInstance->GetSingleCreatureFromStorage(NPC_ARCHIMONDE)) - { - if (Archimonde->GetHealthPercent() < 2.0f || !Archimonde->isAlive()) - DoCastSpellIfCan(m_creature, SPELL_DENOUEMENT_WISP); - else - DoCastSpellIfCan(Archimonde, SPELL_ANCIENT_SPARK); - } - CheckTimer = 1000; - }else CheckTimer -= diff; - } -}; - -/* This script is merely a placeholder for the Doomfire that triggers Doomfire spell. It will - MoveChase the Doomfire Spirit always, until despawn (AttackStart is called upon it's spawn) */ -struct MANGOS_DLL_DECL mob_doomfireAI : public ScriptedAI -{ - mob_doomfireAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } - - void Reset() { } - - void MoveInLineOfSight(Unit* who) { } - void DamageTaken(Unit *done_by, uint32 &damage) { damage = 0; } -}; - -/* This is the script for the Doomfire Spirit Mob. This mob simply follow players or - travels in random directions if target cannot be found. */ -struct MANGOS_DLL_DECL mob_doomfire_targettingAI : public ScriptedAI -{ - mob_doomfire_targettingAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } - - ObjectGuid m_targetGuid; - uint32 m_uiChangeTargetTimer; - - void Reset() - { - m_targetGuid.Clear(); - m_uiChangeTargetTimer = 5000; - } - - void MoveInLineOfSight(Unit* pWwho) - { - //will update once m_targetGuid is 0. In case noone actually moves(not likely) and this is 0 - //when UpdateAI needs it, it will be forced to select randomPoint - if (!m_targetGuid && pWwho->GetTypeId() == TYPEID_PLAYER) - m_targetGuid = pWwho->GetObjectGuid(); - } - - void DamageTaken(Unit* pDealer, uint32& uiDamage) { uiDamage = 0; } - - void UpdateAI(const uint32 uiDiff) - { - if (m_uiChangeTargetTimer < uiDiff) - { - if (Player* pPlayer = m_creature->GetMap()->GetPlayer(m_targetGuid)) - { - m_creature->GetMotionMaster()->MoveFollow(pPlayer, 0.0f, 0.0f); - m_targetGuid.Clear(); - } - else - { - float x,y,z = 0.0; - m_creature->GetRandomPoint(m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), 40, x, y, z); - m_creature->GetMotionMaster()->MovePoint(0, x, y, z); - } - - m_uiChangeTargetTimer = 5000; - }else m_uiChangeTargetTimer -= uiDiff; - } + SAY_INTRO = -1534018, + SAY_AGGRO = -1534019, + SAY_DOOMFIRE1 = -1534020, + SAY_DOOMFIRE2 = -1534021, + SAY_AIR_BURST1 = -1534022, + SAY_AIR_BURST2 = -1534023, + SAY_SLAY1 = -1534024, + SAY_SLAY2 = -1534025, + SAY_SLAY3 = -1534026, + SAY_ENRAGE = -1534027, + SAY_EPILOGUE = -1534028, + SAY_SOUL_CHARGE1 = -1534029, + SAY_SOUL_CHARGE2 = -1534030, + + // spells + SPELL_DRAIN_TREE = 39140, // intro cosmetic spell + //SPELL_DRAIN_TREE_DUMMY = 39141, // purpose unk + + SPELL_FINGER_DEATH = 31984, + SPELL_FINGER_DEATH_SCRIPT = 32111, // targets whisps + SPELL_FINGER_DEATH_DUMMY = 39369, // epilogue spell + SPELL_HAND_OF_DEATH = 35354, // hard enrage spell + SPELL_AIR_BURST = 32014, + SPELL_GRIP_OF_THE_LEGION = 31972, + SPELL_DOOMFIRE_STRIKE = 31903, // summons 18095 and 18104 + SPELL_SOUL_CHARGE_YELLOW = 32045, // procs 32054 + SPELL_SOUL_CHARGE_GREEN = 32051, // procs 32057 + SPELL_SOUL_CHARGE_RED = 32052, // procs 32053 + SPELL_FEAR = 31970, + + SPELL_PROTECTION_OF_ELUNE = 38528, // protect the players on epilogue + + // summoned creatures + NPC_DOOMFIRE = 18095, + //NPC_DOOMFIRE_SPIRIT = 18104, + NPC_ANCIENT_WISP = 17946, + NPC_CHANNEL_TARGET = 22418, // if he gets in range of 75.0f, then he gets enraged + + // doomfire spells + SPELL_DOOMFIRE_SPAWN = 32074, + SPELL_DOOMFIRE = 31945, // fire damage spell + + // wisp spells + SPELL_DENOUEMENT_WISP = 32124, + SPELL_ANCIENT_SPARK = 39349, }; /* Finally, Archimonde's script. His script isn't extremely complex, most are simply spells on timers. @@ -173,68 +79,75 @@ struct MANGOS_DLL_DECL mob_doomfire_targettingAI : public ScriptedAI select a random target and cast the spell on them. However, if someone IS in melee range, and this is NOT the main tank (creature's victim), then we aggro that player and they become the new victim. For Doomfire, we summon a mob (Doomfire Spirit) for the Doomfire mob to follow. It's spirit will - randomly select it's target to follow and then we create the random movement making it unpredictable. */ + randomly select it's target to follow and then we create the random movement making it unpredictable. +*/ struct MANGOS_DLL_DECL boss_archimondeAI : public ScriptedAI { boss_archimondeAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bHasIntro = false; Reset(); } ScriptedInstance* m_pInstance; - ObjectGuid m_doomfireSpiritGuid; - ObjectGuid m_worldTreeGuid; - - uint32 DrainNordrassilTimer; - uint32 FearTimer; - uint32 AirBurstTimer; - uint32 GripOfTheLegionTimer; - uint32 DoomfireTimer; - uint32 MeleeRangeCheckTimer; - uint32 HandOfDeathTimer; - uint32 SummonWispTimer; - uint32 WispCount; - uint32 EnrageTimer; - uint32 CheckDistanceTimer; - - bool Enraged; - bool BelowTenPercent; - bool HasProtected; - bool IsChanneling; + uint32 m_uiDrainNordrassilTimer; + uint32 m_uiFearTimer; + uint32 m_uiAirBurstTimer; + uint32 m_uiGripOfTheLegionTimer; + uint32 m_uiDoomfireTimer; + uint32 m_uiFingerOfDeathTimer; + uint32 m_uiHandOfDeathTimer; + uint32 m_uiSummonWispTimer; + uint32 m_uiWispCount; + uint32 m_uiEnrageTimer; + + bool m_bHasIntro; + bool m_bIsEnraged; + bool m_bIsEpilogue; + bool m_bStartEpilogue; void Reset() { - m_doomfireSpiritGuid.Clear(); - m_worldTreeGuid.Clear(); - - DrainNordrassilTimer = 0; - FearTimer = 42000; - AirBurstTimer = 30000; - GripOfTheLegionTimer = urand(5000, 25000); - DoomfireTimer = 20000; - MeleeRangeCheckTimer = 15000; - HandOfDeathTimer = 2000; - WispCount = 0; // When ~30 wisps are summoned, Archimonde dies - EnrageTimer = 600000; // 10 minutes - CheckDistanceTimer = 30000; // This checks if he's too close to the World Tree (75 yards from a point on the tree), if true then he will enrage - - Enraged = false; - BelowTenPercent = false; - HasProtected = false; - IsChanneling = false; + m_uiDrainNordrassilTimer = 10000; + m_uiFearTimer = 40000; + m_uiAirBurstTimer = 30000; + m_uiGripOfTheLegionTimer = urand(5000, 25000); + m_uiDoomfireTimer = 15000; + m_uiFingerOfDeathTimer = 15000; + m_uiHandOfDeathTimer = 2000; + m_uiWispCount = 0; + m_uiEnrageTimer = 10*MINUTE*IN_MILLISECONDS; + + m_bIsEnraged = false; + m_bIsEpilogue = false; + m_bStartEpilogue = false; } void Aggro(Unit* pWho) { - m_creature->InterruptSpell(CURRENT_CHANNELED_SPELL); DoScriptText(SAY_AGGRO, m_creature); } + void MoveInLineOfSight(Unit* pWho) + { + // If the boss reaches the tree during the fight, then he enrages - the distance is not very clear + if (!m_bIsEnraged && pWho->GetEntry() == NPC_CHANNEL_TARGET && pWho->IsWithinDistInMap(m_creature, 75.0f)) + { + m_uiEnrageTimer = 1000; + m_bIsEnraged = true; + } + + ScriptedAI::MoveInLineOfSight(pWho); + } + void KilledUnit(Unit* pVictim) { + if (pVictim->GetTypeId() != TYPEID_PLAYER) + return; + switch(urand(0, 2)) { case 0: DoScriptText(SAY_SLAY1, m_creature); break; @@ -242,9 +155,6 @@ struct MANGOS_DLL_DECL boss_archimondeAI : public ScriptedAI case 2: DoScriptText(SAY_SLAY3, m_creature); break; } - if (pVictim->GetTypeId() != TYPEID_PLAYER) - return; - switch(pVictim->getClass()) { case CLASS_PRIEST: @@ -265,265 +175,258 @@ struct MANGOS_DLL_DECL boss_archimondeAI : public ScriptedAI } } - void JustDied(Unit *victim) - { - DoScriptText(SAY_DEATH, m_creature); - } - - bool CanUseFingerOfDeath() + void JustReachedHome() { - // First we check if our current victim is in melee range or not. - Unit* victim = m_creature->getVictim(); - if (victim && m_creature->IsWithinDistInMap(victim, m_creature->GetAttackDistance(victim))) - return false; - - ThreatList const& tList = m_creature->getThreatManager().getThreatList(); - if (tList.empty()) - return false; - - std::list targets; - - for (ThreatList::const_iterator itr = tList.begin();itr != tList.end(); ++itr) - { - Unit* pUnit = m_creature->GetMap()->GetUnit((*itr)->getUnitGuid()); - - if (pUnit && pUnit->isAlive()) - targets.push_back(pUnit); - } - - if (targets.empty()) - return false; - - targets.sort(ObjectDistanceOrder(m_creature)); - Unit* target = targets.front(); - if (target) + // Start epilogue at 10% hp + if (m_bIsEpilogue) { - if (!m_creature->IsWithinDistInMap(target, m_creature->GetAttackDistance(target))) - return true; // Cast Finger of Death - else // This target is closest, he is our new tank - m_creature->AddThreat(target, m_creature->getThreatManager().getThreat(m_creature->getVictim())); + if (DoCastSpellIfCan(m_creature, SPELL_PROTECTION_OF_ELUNE) == CAST_OK) + { + m_uiFingerOfDeathTimer = 5000; + m_bStartEpilogue = true; + } } - - return false; + else if (m_pInstance) + m_pInstance->SetData(TYPE_ARCHIMONDE, FAIL); } void JustSummoned(Creature* pSummoned) { - if (pSummoned->GetEntry() == CREATURE_ANCIENT_WISP) - pSummoned->AI()->AttackStart(m_creature); - else + if (pSummoned->GetEntry() == NPC_ANCIENT_WISP) { - pSummoned->setFaction(m_creature->getFaction()); - pSummoned->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - pSummoned->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - } + pSummoned->AI()->AttackStart(m_creature); + ++m_uiWispCount; - if (pSummoned->GetEntry() == CREATURE_DOOMFIRE_SPIRIT) - { - m_doomfireSpiritGuid = pSummoned->GetObjectGuid(); + // When enough wisps have gathered or boss is low hp, then kill him + if (m_uiWispCount >= 45 || m_creature->GetHealthPercent() <= 1.0f) + pSummoned->CastSpell(pSummoned, SPELL_DENOUEMENT_WISP, false); } - - if (pSummoned->GetEntry() == CREATURE_DOOMFIRE) + else if (pSummoned->GetEntry() == NPC_DOOMFIRE) { - pSummoned->CastSpell(pSummoned,SPELL_DOOMFIRE_SPAWN,false); + pSummoned->CastSpell(pSummoned, SPELL_DOOMFIRE_SPAWN, true); pSummoned->CastSpell(pSummoned, SPELL_DOOMFIRE, true, NULL, NULL, m_creature->GetObjectGuid()); - - if (Creature* pDoomfireSpirit = m_creature->GetMap()->GetCreature(m_doomfireSpiritGuid)) - { - pSummoned->GetMotionMaster()->MoveFollow(pDoomfireSpirit,0.0f,0.0f); - m_doomfireSpiritGuid.Clear(); - } } } - //this is code doing close to what the summoning spell would do (spell 31903) - void SummonDoomfire(Unit* target) - { - m_creature->SummonCreature(CREATURE_DOOMFIRE_SPIRIT, - target->GetPositionX()+15.0,target->GetPositionY()+15.0,target->GetPositionZ(),0, - TEMPSUMMON_TIMED_DESPAWN, 27000); - - m_creature->SummonCreature(CREATURE_DOOMFIRE, - target->GetPositionX()-15.0,target->GetPositionY()-15.0,target->GetPositionZ(),0, - TEMPSUMMON_TIMED_DESPAWN, 27000); - } - - void UpdateAI(const uint32 diff) + void UpdateAI(const uint32 uiDiff) { - if (!m_creature->isInCombat()) + // Intro timer + if (m_uiDrainNordrassilTimer) { - if (m_pInstance) + if (m_uiDrainNordrassilTimer <= uiDiff) { - // Do not let the raid skip straight to Archimonde. Visible and hostile ONLY if Azagalor is finished. - if ((m_pInstance->GetData(TYPE_AZGALOR) < DONE) && ((m_creature->GetVisibility() != VISIBILITY_OFF) || (m_creature->getFaction() != 35))) + if (DoCastSpellIfCan(m_creature, SPELL_DRAIN_TREE) == CAST_OK) { - m_creature->SetVisibility(VISIBILITY_OFF); - m_creature->setFaction(35); - } - else if ((m_pInstance->GetData(TYPE_AZGALOR) >= DONE) && ((m_creature->GetVisibility() != VISIBILITY_ON) || (m_creature->getFaction() == 35))) - { - m_creature->setFaction(1720); - m_creature->SetVisibility(VISIBILITY_ON); + if (!m_bHasIntro) + { + DoScriptText(SAY_INTRO, m_creature); + m_bHasIntro = true; + } + m_uiDrainNordrassilTimer = 0; } } + else + m_uiDrainNordrassilTimer -= uiDiff; + } - if (DrainNordrassilTimer < diff) + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + // Start epilogue - fight was won! + if (m_creature->GetHealthPercent() < 10.0f) + { + if (!m_bIsEpilogue) { - if (!IsChanneling) - { - Creature *temp = m_creature->SummonCreature(CREATURE_CHANNEL_TARGET, NORDRASSIL_X, NORDRASSIL_Y, NORDRASSIL_Z, 0.0f, TEMPSUMMON_TIMED_DESPAWN, 1200000); + DoScriptText(SAY_EPILOGUE, m_creature); - if (temp) - m_worldTreeGuid = temp->GetObjectGuid(); + // move at home position and start outro + m_creature->GetMotionMaster()->MoveTargetedHome(); + SetCombatMovement(false); + m_bIsEpilogue = true; + } - if (Creature *Nordrassil = m_creature->GetMap()->GetCreature(m_worldTreeGuid)) - { - Nordrassil->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - Nordrassil->SetDisplayId(11686); - DoCastSpellIfCan(Nordrassil, SPELL_DRAIN_WORLD_TREE); - IsChanneling = true; - } + if (m_bStartEpilogue) + { + // Spam Finger of Death on players and Wisps + if (m_uiFingerOfDeathTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, urand(0, 1) ? SPELL_FINGER_DEATH_DUMMY : SPELL_FINGER_DEATH_SCRIPT) == CAST_OK) + m_uiFingerOfDeathTimer = 1000; } + else + m_uiFingerOfDeathTimer -= uiDiff; - if (Creature *Nordrassil = m_creature->GetMap()->GetCreature(m_worldTreeGuid)) + if (m_uiSummonWispTimer < uiDiff) { - Nordrassil->CastSpell(m_creature, SPELL_DRAIN_WORLD_TREE_2, true); - DrainNordrassilTimer = 1000; + float fX, fY, fZ; + m_creature->GetNearPoint(m_creature, fX, fY, fZ, 0, 75.0f, urand(0, 1) ? frand(0, 2.8f) : frand(4.3f, M_PI_F*2)); + m_creature->SummonCreature(NPC_ANCIENT_WISP, fX, fY, fZ, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000); + m_uiSummonWispTimer = urand(1000, 1500); } - }else DrainNordrassilTimer -= diff; - } + else + m_uiSummonWispTimer -= uiDiff; + } - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + // Stop using the other spells return; + } - if (m_creature->GetHealthPercent() < 10.0f && !BelowTenPercent && !Enraged) - BelowTenPercent = true; - - if (!Enraged) + if (m_uiEnrageTimer) { - if (EnrageTimer < diff) + if (m_uiEnrageTimer <= uiDiff) { - if (m_creature->GetHealthPercent() > 10.0f) + if (DoCastSpellIfCan(m_creature, SPELL_HAND_OF_DEATH) == CAST_OK) { - m_creature->GetMotionMaster()->Clear(false); - m_creature->GetMotionMaster()->MoveIdle(); - Enraged = true; DoScriptText(SAY_ENRAGE, m_creature); + m_uiEnrageTimer = 0; } - }else EnrageTimer -= diff; - - if (CheckDistanceTimer < diff) - { - // To simplify the check, we simply summon a creature in the location and then check how far we are from the creature - Creature* Check = m_creature->SummonCreature(CREATURE_CHANNEL_TARGET, NORDRASSIL_X, NORDRASSIL_Y, NORDRASSIL_Z, 0, TEMPSUMMON_TIMED_DESPAWN, 2000); - if (Check) - { - Check->SetVisibility(VISIBILITY_OFF); - - if (m_creature->IsWithinDistInMap(Check, 75)) - { - m_creature->GetMotionMaster()->Clear(false); - m_creature->GetMotionMaster()->MoveIdle(); - Enraged = true; - DoScriptText(SAY_ENRAGE, m_creature); - } - } - CheckDistanceTimer = 5000; - }else CheckDistanceTimer -= diff; + } + else + m_uiEnrageTimer -= uiDiff; } - if (BelowTenPercent) + if (m_uiGripOfTheLegionTimer < uiDiff) { - if (!HasProtected) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) { - m_creature->GetMotionMaster()->Clear(false); - m_creature->GetMotionMaster()->MoveIdle(); - - //all members of raid must get this buff - DoCastSpellIfCan(m_creature->getVictim(), SPELL_PROTECTION_OF_ELUNE); - HasProtected = true; - Enraged = true; + if (DoCastSpellIfCan(pTarget, SPELL_GRIP_OF_THE_LEGION) == CAST_OK) + m_uiGripOfTheLegionTimer = urand(5000, 25000); } + } + else + m_uiGripOfTheLegionTimer -= uiDiff; - if (SummonWispTimer < diff) + if (m_uiAirBurstTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_AIR_BURST) == CAST_OK) { - DoSpawnCreature(CREATURE_ANCIENT_WISP, rand()%40, rand()%40, 0, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000); - SummonWispTimer = 1500; - ++WispCount; - }else SummonWispTimer -= diff; + DoScriptText(urand(0, 1) ? SAY_AIR_BURST1 : SAY_AIR_BURST2, m_creature); + m_uiAirBurstTimer = urand(25000, 40000); + } + } + else + m_uiAirBurstTimer -= uiDiff; - if (WispCount >= 30) - m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + if (m_uiFearTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_FEAR) == CAST_OK) + m_uiFearTimer = 42000; } + else + m_uiFearTimer -= uiDiff; - if (Enraged) + if (m_uiDoomfireTimer < uiDiff) { - if (HandOfDeathTimer < diff) + if (DoCastSpellIfCan(m_creature, SPELL_DOOMFIRE_STRIKE) == CAST_OK) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_HAND_OF_DEATH); - HandOfDeathTimer = 2000; - }else HandOfDeathTimer -= diff; - return; // Don't do anything after this point. + DoScriptText(urand(0, 1) ? SAY_DOOMFIRE1 : SAY_DOOMFIRE2, m_creature); + m_uiDoomfireTimer = urand(10000, 15000); + } } + else + m_uiDoomfireTimer -= uiDiff; - if (GripOfTheLegionTimer < diff) + // If we are within range melee the target + if (m_creature->CanReachWithMeleeAttack(m_creature->getVictim())) { - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) - DoCastSpellIfCan(pTarget, SPELL_GRIP_OF_THE_LEGION); - - GripOfTheLegionTimer = urand(5000, 25000); - }else GripOfTheLegionTimer -= diff; - - if (AirBurstTimer < diff) + //Make sure our attack is ready and we arn't currently casting + if (m_creature->isAttackReady() && !m_creature->IsNonMeleeSpellCasted(false)) + { + m_creature->AttackerStateUpdate(m_creature->getVictim()); + m_creature->resetAttackTimer(); + } + } + // Else spam Finger of Death + else { - if (!urand(0, 1)) - DoScriptText(SAY_AIR_BURST1, m_creature); + if (m_uiFingerOfDeathTimer < uiDiff) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, SPELL_FINGER_DEATH) == CAST_OK) + m_uiFingerOfDeathTimer = 5000; + } + } else - DoScriptText(SAY_AIR_BURST2, m_creature); + m_uiFingerOfDeathTimer -= uiDiff; + } + } +}; - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1)) - DoCastSpellIfCan(pTarget, SPELL_AIR_BURST); - AirBurstTimer = urand(25000, 40000); - }else AirBurstTimer -= diff; +/* This is the script for the Doomfire Spirit Mob. This mob controls the doomfire npc and allows it to move randomly around the map. */ +struct MANGOS_DLL_DECL npc_doomfire_spiritAI : public ScriptedAI +{ + npc_doomfire_spiritAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } - if (FearTimer < diff) - { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_FEAR); - FearTimer = 42000; - }else FearTimer -= diff; + ObjectGuid m_doomfireGuid; - if (DoomfireTimer < diff) - { - if (!urand(0, 1)) - DoScriptText(SAY_DOOMFIRE1, m_creature); - else - DoScriptText(SAY_DOOMFIRE2, m_creature); + uint32 m_uiDoomfireLoadTimer; + uint32 m_uiChangeTargetTimer; + float m_fAngle; - Unit *temp = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1); - if (!temp) - temp = m_creature->getVictim(); + void Reset() + { + m_uiDoomfireLoadTimer = 1000; + m_uiChangeTargetTimer = 1500; + m_fAngle = urand(0, M_PI_F*2); + } - //replace with spell cast 31903 once implicitTarget 73 implemented - SummonDoomfire(temp); + void UpdateAI(const uint32 uiDiff) + { + if (m_uiDoomfireLoadTimer) + { + if (m_uiDoomfireLoadTimer <= uiDiff) + { + // Get the closest doomfire + if (Creature* pTemp = GetClosestCreatureWithEntry(m_creature, NPC_DOOMFIRE, 5.0f)) + m_doomfireGuid = pTemp->GetObjectGuid(); - //supposedly three doomfire can be up at the same time - DoomfireTimer = 20000; - }else DoomfireTimer -= diff; + m_uiDoomfireLoadTimer = 0; + } + else + m_uiDoomfireLoadTimer -= uiDiff; + } - if (MeleeRangeCheckTimer < diff) + // It's not very clear how should this one move. For the moment just move to random points around on timer + if (m_uiChangeTargetTimer < uiDiff) { - if (CanUseFingerOfDeath()) + if (Creature* pDoomfire = m_creature->GetMap()->GetCreature(m_doomfireGuid)) { - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) - DoCastSpellIfCan(pTarget, SPELL_FINGER_OF_DEATH); - - MeleeRangeCheckTimer = 1000; + float fX, fY, fZ; + pDoomfire->GetNearPoint(pDoomfire, fX, fY, fZ, 0, 30.0f, m_fAngle + frand(0, M_PI_F*.5)); + pDoomfire->GetMotionMaster()->MovePoint(0, fX, fY, fZ); } - MeleeRangeCheckTimer = 5000; - }else MeleeRangeCheckTimer -= diff; + m_uiChangeTargetTimer = 4000; + } + else + m_uiChangeTargetTimer -= uiDiff; + } +}; + +struct mob_ancient_wispAI : public ScriptedAI +{ + mob_ancient_wispAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } + + uint32 m_uiCheckTimer; + + void Reset() + { + m_uiCheckTimer = 1000; + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; - DoMeleeAttackIfReady(); + if (m_uiCheckTimer < uiDiff) + { + DoCastSpellIfCan(m_creature->getVictim(), SPELL_ANCIENT_SPARK); + m_uiCheckTimer = urand(2000, 3000); + } + else + m_uiCheckTimer -= uiDiff; } }; @@ -532,14 +435,9 @@ CreatureAI* GetAI_boss_archimonde(Creature* pCreature) return new boss_archimondeAI(pCreature); } -CreatureAI* GetAI_mob_doomfire(Creature* pCreature) +CreatureAI* GetAI_npc_doomfire_spirit(Creature* pCreature) { - return new mob_doomfireAI(pCreature); -} - -CreatureAI* GetAI_mob_doomfire_targetting(Creature* pCreature) -{ - return new mob_doomfire_targettingAI(pCreature); + return new npc_doomfire_spiritAI(pCreature); } CreatureAI* GetAI_mob_ancient_wisp(Creature* pCreature) @@ -557,13 +455,8 @@ void AddSC_boss_archimonde() pNewScript->RegisterSelf(); pNewScript = new Script; - pNewScript->Name = "mob_doomfire"; - pNewScript->GetAI = &GetAI_mob_doomfire; - pNewScript->RegisterSelf(); - - pNewScript = new Script; - pNewScript->Name = "mob_doomfire_targetting"; - pNewScript->GetAI = &GetAI_mob_doomfire_targetting; + pNewScript->Name = "npc_doomfire_spirit"; + pNewScript->GetAI = &GetAI_npc_doomfire_spirit; pNewScript->RegisterSelf(); pNewScript = new Script; diff --git a/scripts/kalimdor/caverns_of_time/hyjal/hyjal.cpp b/scripts/kalimdor/caverns_of_time/hyjal/hyjal.cpp index f65823a69..07f44dbe2 100644 --- a/scripts/kalimdor/caverns_of_time/hyjal/hyjal.cpp +++ b/scripts/kalimdor/caverns_of_time/hyjal/hyjal.cpp @@ -30,14 +30,21 @@ EndContentData */ #include "precompiled.h" #include "hyjalAI.h" -#define GOSSIP_ITEM_BEGIN_ALLY "My companions and I are with you, Lady Proudmoore." -#define GOSSIP_ITEM_ANETHERON "We are ready for whatever Archimonde might send our way, Lady Proudmoore." -#define GOSSIP_ITEM_BEGIN_HORDE "I am with you, Thrall." -#define GOSSIP_ITEM_AZGALOR "We have nothing to fear." +enum +{ + GOSSIP_ITEM_JAINA_BEGIN = -3534000, + GOSSIP_ITEM_JAINA_ANATHERON = -3534001, + GOSSIP_ITEM_JAINA_SUCCCESS = -3534002, + + GOSSIP_ITEM_THRALL_BEGIN = -3534003, + GOSSIP_ITEM_THRALL_AZGALOR = -3534004, + GOSSIP_ITEM_THRALL_SUCCESS = -3534005, -#define GOSSIP_ITEM_RETREAT "We can't keep this up. Let's retreat!" + GOSSIP_ITEM_TYRANDE_AID = -3534006, -#define GOSSIP_ITEM_TYRANDE "Aid us in defending Nordrassil" + // Note: additional menu items include 9230 and 9398. + GOSSIP_MENU_ID_DEFAULT = 907, // this is wrong, but currently we don't know which are the right ids +}; CreatureAI* GetAI_npc_jaina_proudmoore(Creature* pCreature) { @@ -70,11 +77,11 @@ bool GossipHello_npc_jaina_proudmoore(Player* pPlayer, Creature* pCreature) if (pInstance->GetData(TYPE_KAZROGAL) != DONE) { if (pInstance->GetData(TYPE_WINTERCHILL) == NOT_STARTED) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_BEGIN_ALLY, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); + pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_JAINA_BEGIN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); else if (pInstance->GetData(TYPE_WINTERCHILL) == DONE && pInstance->GetData(TYPE_ANETHERON) == NOT_STARTED) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_ANETHERON, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); + pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_JAINA_ANATHERON, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); else if (pInstance->GetData(TYPE_ANETHERON) == DONE) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_RETREAT, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); + pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_JAINA_SUCCCESS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); if (pPlayer->isGameMaster()) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_DOT, "[GM] Toggle Debug Timers", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF); @@ -83,7 +90,7 @@ bool GossipHello_npc_jaina_proudmoore(Player* pPlayer, Creature* pCreature) } } - pPlayer->SEND_GOSSIP_MENU(907, pCreature->GetObjectGuid()); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_MENU_ID_DEFAULT, pCreature->GetObjectGuid()); return true; } @@ -142,11 +149,11 @@ bool GossipHello_npc_thrall(Player* pPlayer, Creature* pCreature) if (pInstance->GetData(TYPE_ANETHERON) == DONE) { if (pInstance->GetData(TYPE_KAZROGAL) == NOT_STARTED) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_BEGIN_HORDE, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); + pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_THRALL_BEGIN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); else if (pInstance->GetData(TYPE_KAZROGAL) == DONE && pInstance->GetData(TYPE_AZGALOR) == NOT_STARTED) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_AZGALOR, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); + pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_THRALL_AZGALOR, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); else if (pInstance->GetData(TYPE_AZGALOR) == DONE) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_RETREAT, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); + pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_THRALL_SUCCESS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); if (pPlayer->isGameMaster()) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_DOT, "[GM] Toggle Debug Timers", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF); @@ -155,7 +162,7 @@ bool GossipHello_npc_thrall(Player* pPlayer, Creature* pCreature) } } - pPlayer->SEND_GOSSIP_MENU(907, pCreature->GetObjectGuid()); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_MENU_ID_DEFAULT, pCreature->GetObjectGuid()); return true; } @@ -193,10 +200,10 @@ bool GossipHello_npc_tyrande_whisperwind(Player* pPlayer, Creature* pCreature) { // Only let them get item if Azgalor is dead. if (pInstance->GetData(TYPE_AZGALOR) == DONE && !pPlayer->HasItemCount(ITEM_TEAR_OF_GODDESS, 1)) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_TYRANDE, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF); + pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_TYRANDE_AID, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF); } - pPlayer->SEND_GOSSIP_MENU(907, pCreature->GetObjectGuid()); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_MENU_ID_DEFAULT, pCreature->GetObjectGuid()); return true; } diff --git a/scripts/kalimdor/caverns_of_time/hyjal/hyjal.h b/scripts/kalimdor/caverns_of_time/hyjal/hyjal.h index 93bfa5f47..4d34f0286 100644 --- a/scripts/kalimdor/caverns_of_time/hyjal/hyjal.h +++ b/scripts/kalimdor/caverns_of_time/hyjal/hyjal.h @@ -50,6 +50,8 @@ enum GO_ANCIENT_GEM = 185557, }; +static const float aArchimondeSpawnLoc[4] = {5581.49f, -3445.63f, 1575.1f, 3.905f}; + class MANGOS_DLL_DECL instance_mount_hyjal : public ScriptedInstance { public: @@ -58,6 +60,8 @@ class MANGOS_DLL_DECL instance_mount_hyjal : public ScriptedInstance void Initialize(); bool IsEncounterInProgress() const; + void OnPlayerEnter(Player* pPlayer); + void OnCreatureCreate(Creature* pCreature); void OnObjectCreate(GameObject* pGo); @@ -72,6 +76,8 @@ class MANGOS_DLL_DECL instance_mount_hyjal : public ScriptedInstance void Load(const char* chrIn); private: + void DoSpawnArchimonde(); + uint32 m_auiEncounter[MAX_ENCOUNTER]; std::string m_strSaveData; diff --git a/scripts/kalimdor/caverns_of_time/hyjal/instance_hyjal.cpp b/scripts/kalimdor/caverns_of_time/hyjal/instance_hyjal.cpp index 3f0671f7f..4df40eeca 100644 --- a/scripts/kalimdor/caverns_of_time/hyjal/instance_hyjal.cpp +++ b/scripts/kalimdor/caverns_of_time/hyjal/instance_hyjal.cpp @@ -51,6 +51,12 @@ bool instance_mount_hyjal::IsEncounterInProgress() const return false; } +void instance_mount_hyjal::OnPlayerEnter(Player* pPlayer) +{ + if (GetData(TYPE_AZGALOR) == DONE) + DoSpawnArchimonde(); +} + void instance_mount_hyjal::OnCreatureCreate(Creature* pCreature) { if (pCreature->GetEntry() == NPC_ARCHIMONDE) @@ -83,7 +89,6 @@ void instance_mount_hyjal::OnCreatureEvade(Creature* pCreature) case NPC_ANETHERON: SetData(TYPE_ANETHERON, FAIL); break; case NPC_KAZROGAL: SetData(TYPE_KAZROGAL, FAIL); break; case NPC_AZGALOR: SetData(TYPE_AZGALOR, FAIL); break; - case NPC_ARCHIMONDE: SetData(TYPE_ARCHIMONDE, FAIL); break; } } @@ -124,10 +129,12 @@ void instance_mount_hyjal::SetData(uint32 uiType, uint32 uiData) case TYPE_WINTERCHILL: case TYPE_ANETHERON: case TYPE_KAZROGAL: + m_auiEncounter[uiType] = uiData; + break; case TYPE_AZGALOR: - if (m_auiEncounter[uiType] == DONE) - return; m_auiEncounter[uiType] = uiData; + if (uiData == DONE) + DoSpawnArchimonde(); break; case TYPE_ARCHIMONDE: m_auiEncounter[uiType] = uiData; @@ -170,6 +177,21 @@ void instance_mount_hyjal::SetData(uint32 uiType, uint32 uiData) } } +void instance_mount_hyjal::DoSpawnArchimonde() +{ + // Don't spawn if already killed + if (GetData(TYPE_ARCHIMONDE) == DONE) + return; + + // Don't spawn him twice + if (GetSingleCreatureFromStorage(NPC_ARCHIMONDE, true)) + return; + + // Summon Archimonde + if (Player* pPlayer = GetPlayerInMap()) + pPlayer->SummonCreature(NPC_ARCHIMONDE, aArchimondeSpawnLoc[0], aArchimondeSpawnLoc[1], aArchimondeSpawnLoc[2], aArchimondeSpawnLoc[3], TEMPSUMMON_DEAD_DESPAWN, 0); +} + uint32 instance_mount_hyjal::GetData(uint32 uiType) { switch(uiType) diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 609200c6f..71dd63294 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2634" + #define SD2_REVISION_NR "2635" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index a8e8461f6..cf7f284c1 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -425,8 +425,7 @@ UPDATE creature_template SET ScriptName='npc_tyrande_whisperwind' WHERE entry=17 UPDATE creature_template SET ScriptName='npc_thrall' WHERE entry=17852; UPDATE creature_template SET ScriptName='npc_jaina_proudmoore' WHERE entry=17772; UPDATE creature_template SET ScriptName='boss_archimonde' WHERE entry=17968; -UPDATE creature_template SET ScriptName='mob_doomfire' WHERE entry=18095; -UPDATE creature_template SET ScriptName='mob_doomfire_targetting' WHERE entry=18104; +UPDATE creature_template SET ScriptName='npc_doomfire_spirit' WHERE entry=18104; UPDATE creature_template SET ScriptName='mob_ancient_wisp' WHERE entry=17946; /* OLD HILLSBRAD */ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 7862c1306..829746c8a 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -1817,7 +1817,7 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1534016,'We have played our part and done well. It is up to the others now.',11035,1,0,0,'thrall hyjal SUCCESS'), (-1534017,'Uraaa...',11034,1,0,0,'thrall hyjal DEATH'), -(-1534018,'All of your efforts have been in vain, for the draining of the World Tree has already begun. Soon the heart of your world will beat no more.',10986,1,0,0,'archimonde SAY_PRE_EVENTS_COMPLETE'), +(-1534018,'All of your efforts have been in vain, for the draining of the World Tree has already begun. Soon the heart of your world will beat no more.',10986,6,0,0,'archimonde SAY_PRE_EVENTS_COMPLETE'), (-1534019,'Your resistance is insignificant.',10987,1,0,0,'archimonde SAY_AGGRO'), (-1534020,'This world will burn!',10990,1,0,0,'archimonde SAY_DOOMFIRE1'), (-1534021,'Manach sheek-thrish!',11041,1,0,0,'archimonde SAY_DOOMFIRE2'), @@ -4273,6 +4273,16 @@ INSERT INTO gossip_texts (entry,content_default,comment) VALUES (-3509000,'Let\'s find out.','andorov GOSSIP_ITEM_START'), (-3509001,'Let\'s see what you have.','andorov GOSSIP_ITEM_TRADE'); +-- -3 534 000 THE BATTLE OF MT. HYJAL +INSERT INTO gossip_texts (entry,content_default,comment) VALUES +(-3534000,'My companions and I are with you, Lady Proudmoore.','jaina GOSSIP_ITEM_JAIN_START'), +(-3534001,'We are ready for whatever Archimonde might send our way, Lady Proudmoore.','jaina GOSSIP_ITEM_ANATHERON'), +(-3534002,'Until we meet again, Lady Proudmoore.','jaina GOSSIP_ITEM_SUCCESS'), +(-3534003,'I am with you, Thrall.','thrall GOSSIP_ITEM_THRALL_START'), +(-3534004,'We have nothing to fear.','thrall GOSSIP_ITEM_AZGALOR'), +(-3534005,'Until we meet again, Thrall.','thrall GOSSIP_ITEM_SUCCESS'), +(-3534006,'I would be grateful for any aid you can provide, Priestess.','tyrande GOSSIP_ITEM_AID'); + -- -3 560 000 ESCAPE FROM DURNHOLDE (OLD HILLSBRAD) INSERT INTO gossip_texts (entry,content_default,comment) VALUES (-3560000,'REUSE ME','REUSE ME'), diff --git a/sql/updates/r2635_mangos.sql b/sql/updates/r2635_mangos.sql new file mode 100644 index 000000000..e3b431692 --- /dev/null +++ b/sql/updates/r2635_mangos.sql @@ -0,0 +1,2 @@ +UPDATE creature_template SET ScriptName='' WHERE entry=18095; +UPDATE creature_template SET ScriptName='npc_doomfire_spirit' WHERE entry=18104; diff --git a/sql/updates/r2635_scriptdev2.sql b/sql/updates/r2635_scriptdev2.sql new file mode 100644 index 000000000..40ef4eb79 --- /dev/null +++ b/sql/updates/r2635_scriptdev2.sql @@ -0,0 +1,10 @@ +UPDATE script_texts SET type=6 WHERE entry=-1534018; +DELETE FROM gossip_texts WHERE entry IN (-3534000,-3534001,-3534002,-3534003,-3534004,-3534005,-3534006); +INSERT INTO gossip_texts (entry,content_default,comment) VALUES +(-3534000,'My companions and I are with you, Lady Proudmoore.','jaina GOSSIP_ITEM_JAIN_START'), +(-3534001,'We are ready for whatever Archimonde might send our way, Lady Proudmoore.','jaina GOSSIP_ITEM_ANATHERON'), +(-3534002,'Until we meet again, Lady Proudmoore.','jaina GOSSIP_ITEM_SUCCESS'), +(-3534003,'I am with you, Thrall.','thrall GOSSIP_ITEM_THRALL_START'), +(-3534004,'We have nothing to fear.','thrall GOSSIP_ITEM_AZGALOR'), +(-3534005,'Until we meet again, Thrall.','thrall GOSSIP_ITEM_SUCCESS'), +(-3534006,'I would be grateful for any aid you can provide, Priestess.','tyrande GOSSIP_ITEM_AID'); From 6d9a87d88814158b075c24c4ebd14aaf4277b11c Mon Sep 17 00:00:00 2001 From: Xfurry Date: Tue, 17 Jul 2012 03:02:43 +0300 Subject: [PATCH 0624/1172] [2636] Add placeholder for the Eye of Eternity instance script --- VC100/100ScriptDev2.vcxproj | 2 ++ VC100/100ScriptDev2.vcxproj.filters | 6 ++++ VC80/80ScriptDev2.vcproj | 8 ++++++ VC90/90ScriptDev2.vcproj | 8 ++++++ .../nexus/eye_of_eternity/eye_of_eternity.h | 8 ++++++ .../instance_eye_of_eternity.cpp | 28 +++++++++++++++++++ sd2_revision_nr.h | 2 +- system/ScriptLoader.cpp | 2 ++ 8 files changed, 63 insertions(+), 1 deletion(-) create mode 100644 scripts/northrend/nexus/eye_of_eternity/eye_of_eternity.h create mode 100644 scripts/northrend/nexus/eye_of_eternity/instance_eye_of_eternity.cpp diff --git a/VC100/100ScriptDev2.vcxproj b/VC100/100ScriptDev2.vcxproj index 0f93f12ab..d46f2be6c 100644 --- a/VC100/100ScriptDev2.vcxproj +++ b/VC100/100ScriptDev2.vcxproj @@ -543,6 +543,7 @@ + @@ -754,6 +755,7 @@ + diff --git a/VC100/100ScriptDev2.vcxproj.filters b/VC100/100ScriptDev2.vcxproj.filters index 4f94d490a..3a382cbd2 100644 --- a/VC100/100ScriptDev2.vcxproj.filters +++ b/VC100/100ScriptDev2.vcxproj.filters @@ -1221,6 +1221,9 @@ scripts\northrend\nexus\eye_of_eternity + + scripts\northrend\nexus\eye_of_eternity + scripts\northrend\nexus\nexus @@ -1905,6 +1908,9 @@ scripts\northrend\naxxramas + + scripts\northrend\nexus\eye_of_eternity + scripts\northrend\nexus\nexus diff --git a/VC80/80ScriptDev2.vcproj b/VC80/80ScriptDev2.vcproj index 6b19e41f6..7d4a32bcd 100644 --- a/VC80/80ScriptDev2.vcproj +++ b/VC80/80ScriptDev2.vcproj @@ -2102,6 +2102,14 @@ RelativePath="..\scripts\northrend\nexus\eye_of_eternity\boss_malygos.cpp" > + + + + + + + + + * This program is free software licensed under GPL version 2 + * Please see the included DOCS/LICENSE.TXT for more information */ + +#ifndef DEF_EYE_ETERNITY_H +#define DEF_EYE_ETERNITY_H + +#endif diff --git a/scripts/northrend/nexus/eye_of_eternity/instance_eye_of_eternity.cpp b/scripts/northrend/nexus/eye_of_eternity/instance_eye_of_eternity.cpp new file mode 100644 index 000000000..2e2d44a54 --- /dev/null +++ b/scripts/northrend/nexus/eye_of_eternity/instance_eye_of_eternity.cpp @@ -0,0 +1,28 @@ +/* Copyright (C) 2006 - 2012 ScriptDev2 + * 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: instance_eye_of_eternity +SD%Complete: 0% +SDComment: +SDCategory: Eye of Eternity +EndScriptData */ + +#include "precompiled.h" + +void AddSC_instance_eye_of_eternity() +{ +} diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 71dd63294..4b6d95415 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2635" + #define SD2_REVISION_NR "2636" #endif // __SD2_REVISION_NR_H__ diff --git a/system/ScriptLoader.cpp b/system/ScriptLoader.cpp index 00ad87754..aa9e37a05 100644 --- a/system/ScriptLoader.cpp +++ b/system/ScriptLoader.cpp @@ -348,6 +348,7 @@ extern void AddSC_boss_sapphiron(); extern void AddSC_boss_thaddius(); extern void AddSC_instance_naxxramas(); extern void AddSC_boss_malygos(); // nexus, eye_of_eternity +extern void AddSC_instance_eye_of_eternity(); extern void AddSC_boss_anomalus(); // nexus, nexus extern void AddSC_boss_keristrasza(); extern void AddSC_boss_ormorok(); @@ -847,6 +848,7 @@ void AddScripts() AddSC_boss_thaddius(); AddSC_instance_naxxramas(); AddSC_boss_malygos(); // nexus, eye_of_eternity + AddSC_instance_eye_of_eternity(); AddSC_boss_anomalus(); // nexus, nexus AddSC_boss_keristrasza(); AddSC_boss_ormorok(); From b49ea71eef93b365259d616063dc32e156d1ec12 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Tue, 17 Jul 2012 11:22:04 +0300 Subject: [PATCH 0625/1172] [2637] Implement basic script for the Eye of Eternity and Malygos --- .../nexus/eye_of_eternity/boss_malygos.cpp | 118 +++++++++++++++++- .../nexus/eye_of_eternity/eye_of_eternity.h | 38 ++++++ .../instance_eye_of_eternity.cpp | 77 +++++++++++- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 5 + sql/updates/r2637_mangos.sql | 5 + 6 files changed, 241 insertions(+), 4 deletions(-) create mode 100644 sql/updates/r2637_mangos.sql diff --git a/scripts/northrend/nexus/eye_of_eternity/boss_malygos.cpp b/scripts/northrend/nexus/eye_of_eternity/boss_malygos.cpp index 3a11c4b41..83b815c09 100644 --- a/scripts/northrend/nexus/eye_of_eternity/boss_malygos.cpp +++ b/scripts/northrend/nexus/eye_of_eternity/boss_malygos.cpp @@ -16,12 +16,13 @@ /* ScriptData SDName: boss_malygos -SD%Complete: 0 -SDComment: Placeholder +SD%Complete: 10 +SDComment: Basic script SDCategory: Eye of Eternity EndScriptData */ #include "precompiled.h" +#include "eye_of_eternity.h" enum { @@ -63,6 +64,119 @@ enum SAY_EMOTE_BREATH = -1616034, }; +/*###### +## boss_malygos +######*/ + +struct MANGOS_DLL_DECL boss_malygosAI : public ScriptedAI +{ + boss_malygosAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (instance_eye_of_eternity*)pCreature->GetInstanceData(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); + Reset(); + } + + instance_eye_of_eternity* m_pInstance; + bool m_bIsRegularMode; + + void Reset() + { + SetCombatMovement(false); + } + + void Aggro(Unit* pWho) + { + DoScriptText(SAY_AGGRO, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_MALYGOS, IN_PROGRESS); + } + + void KilledUnit(Unit* pVictim) + { + // ToDo: add kill yells, based on encounter phase + } + + void JustDied(Unit* pKiller) + { + DoScriptText(SAY_DEATH, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_MALYGOS, DONE); + } + + void JustReachedHome() + { + if (m_pInstance) + m_pInstance->SetData(TYPE_MALYGOS, FAIL); + } + + void MovementInform(uint32 uiMoveType, uint32 uiPointId) + { + if (uiMoveType != POINT_MOTION_TYPE) + return; + + if (uiPointId) + { + m_creature->SetLevitate(false); + SetCombatMovement(true); + DoStartMovement(m_creature->getVictim()); + m_creature->RemoveByteFlag(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_UNK_2); + } + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_malygos(Creature* pCreature) +{ + return new boss_malygosAI(pCreature); +} + +bool ProcessEventId_event_go_focusing_iris(uint32 uiEventId, Object* pSource, Object* pTarget, bool bIsStart) +{ + if (instance_eye_of_eternity* pInstance = (instance_eye_of_eternity*)((Creature*)pSource)->GetInstanceData()) + { + if (pSource->GetTypeId() != TYPEID_PLAYER) + return false; + + if (pInstance->GetData(TYPE_MALYGOS) == IN_PROGRESS || pInstance->GetData(TYPE_MALYGOS) == DONE) + return false; + + Creature* pMalygos = pInstance->GetSingleCreatureFromStorage(NPC_MALYGOS); + Creature* pTrigger = pInstance->GetSingleCreatureFromStorage(NPC_LARGE_TRIGGER); + if (!pMalygos || !pTrigger) + return false; + + // Enter combat area + float fX, fY, fZ; + pTrigger->GetNearPoint(pTrigger, fX, fY, fZ, 0, 30.0f, pTrigger->GetAngle(pMalygos)); + pMalygos->GetMotionMaster()->MovePoint(1, fX, fY, fZ); + pMalygos->AI()->AttackStart((Player*)pSource); + + return true; + } + return false; +} + void AddSC_boss_malygos() { + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_malygos"; + pNewScript->GetAI = &GetAI_boss_malygos; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "event_go_focusing_iris"; + pNewScript->pProcessEventId = &ProcessEventId_event_go_focusing_iris; + pNewScript->RegisterSelf(); } diff --git a/scripts/northrend/nexus/eye_of_eternity/eye_of_eternity.h b/scripts/northrend/nexus/eye_of_eternity/eye_of_eternity.h index fbc687c36..e93c92c9a 100644 --- a/scripts/northrend/nexus/eye_of_eternity/eye_of_eternity.h +++ b/scripts/northrend/nexus/eye_of_eternity/eye_of_eternity.h @@ -5,4 +5,42 @@ #ifndef DEF_EYE_ETERNITY_H #define DEF_EYE_ETERNITY_H +enum +{ + TYPE_MALYGOS = 0, + + NPC_MALYGOS = 28859, + NPC_ALEXSTRASZA = 32295, + NPC_LARGE_TRIGGER = 22517, + + GO_EXIT_PORTAL = 193908, + GO_PLATFORM = 193070, + + GO_HEART_OF_MAGIC = 194158, + GO_HEART_OF_MAGIC_H = 194159, + GO_ALEXSTRASZAS_GIFT = 193905, + GO_ALEXSTRASZAS_GIFT_H = 193967, + + ACHIEV_START_MALYGOS_ID = 20387, +}; + +class MANGOS_DLL_DECL instance_eye_of_eternity : public ScriptedInstance +{ + public: + instance_eye_of_eternity(Map* pMap); + ~instance_eye_of_eternity() {} + + void Initialize(); + + bool IsEncounterInProgress() const; + + void OnCreatureCreate(Creature* pCreature); + void OnObjectCreate(GameObject* pGo); + + void SetData(uint32 uiType, uint32 uiData); + + protected: + uint32 m_uiEncounter; +}; + #endif diff --git a/scripts/northrend/nexus/eye_of_eternity/instance_eye_of_eternity.cpp b/scripts/northrend/nexus/eye_of_eternity/instance_eye_of_eternity.cpp index 2e2d44a54..5efaa511c 100644 --- a/scripts/northrend/nexus/eye_of_eternity/instance_eye_of_eternity.cpp +++ b/scripts/northrend/nexus/eye_of_eternity/instance_eye_of_eternity.cpp @@ -16,13 +16,88 @@ /* ScriptData SDName: instance_eye_of_eternity -SD%Complete: 0% +SD%Complete: 20 SDComment: SDCategory: Eye of Eternity EndScriptData */ #include "precompiled.h" +#include "eye_of_eternity.h" + +instance_eye_of_eternity::instance_eye_of_eternity(Map* pMap) : ScriptedInstance(pMap) +{ + Initialize(); +} + +void instance_eye_of_eternity::Initialize() +{ + m_uiEncounter = NOT_STARTED; +} + +bool instance_eye_of_eternity::IsEncounterInProgress() const +{ + return m_uiEncounter == IN_PROGRESS; +} + +void instance_eye_of_eternity::OnCreatureCreate(Creature* pCreature) +{ + switch(pCreature->GetEntry()) + { + case NPC_MALYGOS: + case NPC_ALEXSTRASZA: + case NPC_LARGE_TRIGGER: + m_mNpcEntryGuidStore[pCreature->GetEntry()] = pCreature->GetObjectGuid(); + break; + } +} + +void instance_eye_of_eternity::OnObjectCreate(GameObject* pGo) +{ + switch (pGo->GetEntry()) + { + case GO_EXIT_PORTAL: + case GO_PLATFORM: + case GO_HEART_OF_MAGIC: + case GO_HEART_OF_MAGIC_H: + case GO_ALEXSTRASZAS_GIFT: + case GO_ALEXSTRASZAS_GIFT_H: + m_mGoEntryGuidStore[pGo->GetEntry()] = pGo->GetObjectGuid(); + break; + } +} + +void instance_eye_of_eternity::SetData(uint32 uiType, uint32 uiData) +{ + if (uiType != TYPE_MALYGOS) + return; + + m_uiEncounter = uiData; + if (uiData == IN_PROGRESS) + { + // ToDo: Despawn the exit portal + + DoStartTimedAchievement(ACHIEVEMENT_CRITERIA_TYPE_KILL_CREATURE, ACHIEV_START_MALYGOS_ID); + } + if (uiData == DONE) + { + DoRespawnGameObject(instance->IsRegularDifficulty() ? GO_HEART_OF_MAGIC : GO_HEART_OF_MAGIC_H, 30*MINUTE); + DoRespawnGameObject(instance->IsRegularDifficulty() ? GO_ALEXSTRASZAS_GIFT : GO_ALEXSTRASZAS_GIFT_H, 30*MINUTE); + } + + // Currently no reason to save anything +} + +InstanceData* GetInstanceData_instance_eye_of_eternity(Map* pMap) +{ + return new instance_eye_of_eternity(pMap); +} void AddSC_instance_eye_of_eternity() { + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "instance_eye_of_eternity"; + pNewScript->GetInstanceData = &GetInstanceData_instance_eye_of_eternity; + pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 4b6d95415..bab6f83a9 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2636" + #define SD2_REVISION_NR "2637" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index cf7f284c1..0535ef3f2 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -896,6 +896,11 @@ UPDATE creature_template SET ScriptName='npc_zeppit' WHERE entry=22484; /* */ /* EYE OF ETERNITY */ +UPDATE instance_template SET ScriptName='instance_eye_of_eternity' WHERE map=616; +UPDATE creature_template SET ScriptName='boss_malygos' WHERE entry=28859; +DELETE FROM scripted_event_id WHERE id IN (20711); +INSERT INTO scripted_event_id VALUES +(20711,'event_go_focusing_iris'); /* NEXUS */ UPDATE creature_template SET ScriptName='boss_anomalus' WHERE entry=26763; diff --git a/sql/updates/r2637_mangos.sql b/sql/updates/r2637_mangos.sql new file mode 100644 index 000000000..a1c62ed28 --- /dev/null +++ b/sql/updates/r2637_mangos.sql @@ -0,0 +1,5 @@ +UPDATE instance_template SET ScriptName='instance_eye_of_eternity' WHERE map=616; +UPDATE creature_template SET ScriptName='boss_malygos' WHERE entry=28859; +DELETE FROM scripted_event_id WHERE id IN (20711); +INSERT INTO scripted_event_id VALUES +(20711,'event_go_focusing_iris'); From 7242901a09f3071e363e3312a0c9955c38e20964 Mon Sep 17 00:00:00 2001 From: Reamer Date: Tue, 17 Jul 2012 21:55:55 +0300 Subject: [PATCH 0626/1172] [2638] Spawn the Crusader's Cache after all bosses are defeated - ToC25 This will also handle the world state and Tirion spawn Signed-off-by: Xfurry --- .../instance_trial_of_the_crusader.cpp | 58 ++++++++++++++++++- .../trial_of_the_crusader.h | 24 +++++--- sd2_revision_nr.h | 2 +- sql/scriptdev2_script_full.sql | 4 +- sql/updates/r2638_scriptdev2.sql | 3 + 5 files changed, 80 insertions(+), 11 deletions(-) create mode 100644 sql/updates/r2638_scriptdev2.sql diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp index e0803f133..1eb891e5b 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp @@ -82,6 +82,9 @@ enum SAY_TIRION_ABUN_INTRO_1 = -1649035, SAY_LKING_ANUB_INTRO_2 = -1649036, SAY_LKING_ANUB_INTRO_3 = -1649037, + + // Epilogue + SAY_TIRION_EPILOGUE = -1649075, }; static const DialogueEntryTwoSide aTocDialogues[] = @@ -201,9 +204,23 @@ void instance_trial_of_the_crusader::OnObjectCreate(GameObject* pGo) pGo->SetGoState(GO_STATE_ACTIVE); } break; + case GO_TRIBUTE_CHEST_10H_01: + case GO_TRIBUTE_CHEST_10H_25: + case GO_TRIBUTE_CHEST_10H_45: + case GO_TRIBUTE_CHEST_10H_50: + case GO_TRIBUTE_CHEST_25H_01: + case GO_TRIBUTE_CHEST_25H_25: + case GO_TRIBUTE_CHEST_25H_45: + case GO_TRIBUTE_CHEST_25H_50: case GO_MAIN_GATE: case GO_WEB_DOOR: break; + case GO_CRUSADERS_CACHE: + case GO_CRUSADERS_CACHE_25: + case GO_CRUSADERS_CACHE_10_H: + case GO_CRUSADERS_CACHE_25_H: + m_mGoEntryGuidStore[GO_CRUSADERS_CACHE] = pGo->GetObjectGuid(); + return; default: return; } @@ -219,6 +236,13 @@ void instance_trial_of_the_crusader::OnPlayerEnter(Player* pPlayer) SetDialogueSide(m_uiTeam == ALLIANCE); DoSummonRamsey(0); + + // Show wipe world state on heroic difficulty + if (IsHeroicDifficulty()) + { + pPlayer->SendUpdateWorldState(WORLD_STATE_WIPES, 1); + pPlayer->SendUpdateWorldState(WORLD_STATE_WIPES_COUNT, MAX_WIPES_ALLOWED - GetData(TYPE_WIPE_COUNT)); + } } void instance_trial_of_the_crusader::SetData(uint32 uiType, uint32 uiData) @@ -226,6 +250,7 @@ void instance_trial_of_the_crusader::SetData(uint32 uiType, uint32 uiData) switch(uiType) { case TYPE_WIPE_COUNT: + DoUpdateWorldState(WORLD_STATE_WIPES_COUNT, MAX_WIPES_ALLOWED - m_auiEncounter[TYPE_WIPE_COUNT]); m_auiEncounter[uiType] = uiData; break; case TYPE_NORTHREND_BEASTS: @@ -266,7 +291,10 @@ void instance_trial_of_the_crusader::SetData(uint32 uiType, uint32 uiData) StartNextDialogueText(NPC_RAMSEY_3); } else if (uiData == DONE) + { + DoRespawnGameObject(GO_CRUSADERS_CACHE, 60*MINUTE); StartNextDialogueText(SAY_VARIAN_PVP_A_WIN); + } m_auiEncounter[uiType] = uiData; break; case TYPE_TWIN_VALKYR: @@ -274,7 +302,6 @@ void instance_trial_of_the_crusader::SetData(uint32 uiType, uint32 uiData) { if (Creature* pTirion = GetSingleCreatureFromStorage(NPC_TIRION_A)) DoScriptText(m_auiEncounter[uiType] != FAIL ? SAY_TIRION_TWINS_INTRO : SAY_RAID_INTRO_SHORT, pTirion); - } else if (uiData == FAIL) { @@ -290,6 +317,9 @@ void instance_trial_of_the_crusader::SetData(uint32 uiType, uint32 uiData) StartNextDialogueText(TYPE_ANUBARAK); else if (uiData == FAIL) SetData(TYPE_WIPE_COUNT, m_auiEncounter[TYPE_WIPE_COUNT] + 1); + else if (uiData == DONE) + DoHandleEventEpilogue(); + // Handle combat door if (uiData != SPECIAL) DoUseDoorOrButton(GO_WEB_DOOR); m_auiEncounter[uiType] = uiData; @@ -366,6 +396,32 @@ void instance_trial_of_the_crusader::DoSummonRamsey(uint32 uiEntry) pPlayer->SummonCreature(uiEntry, aRamsayPositions[0][0], aRamsayPositions[0][1], aRamsayPositions[0][2], aRamsayPositions[0][3], TEMPSUMMON_DEAD_DESPAWN, 0); } +void instance_trial_of_the_crusader::DoHandleEventEpilogue() +{ + Player* pPlayer = GetPlayerInMap(); + if (!pPlayer) + return; + + // Spawn Tirion and the mage + if (Creature* pTirion = pPlayer->SummonCreature(NPC_TIRION_B, aSpawnPositions[12][0], aSpawnPositions[12][1], aSpawnPositions[12][2], aSpawnPositions[12][3], TEMPSUMMON_CORPSE_DESPAWN, 0)) + DoScriptText(SAY_TIRION_EPILOGUE, pTirion); + + pPlayer->SummonCreature(NPC_ARGENT_MAGE, aSpawnPositions[13][0], aSpawnPositions[13][1], aSpawnPositions[13][2], aSpawnPositions[13][3], TEMPSUMMON_CORPSE_DESPAWN, 0); + + // Spawn the chest for heroic difficulty + if (IsHeroicDifficulty()) + { + if (GetData(TYPE_WIPE_COUNT) == 0) + DoRespawnGameObject(Is25ManDifficulty() ? GO_TRIBUTE_CHEST_25H_50 : GO_TRIBUTE_CHEST_10H_50, 60*MINUTE); + else if (GetData(TYPE_WIPE_COUNT) < 5) + DoRespawnGameObject(Is25ManDifficulty() ? GO_TRIBUTE_CHEST_25H_45 : GO_TRIBUTE_CHEST_10H_45, 60*MINUTE); + else if (GetData(TYPE_WIPE_COUNT) < 25) + DoRespawnGameObject(Is25ManDifficulty() ? GO_TRIBUTE_CHEST_25H_25 : GO_TRIBUTE_CHEST_10H_25, 60*MINUTE); + else + DoRespawnGameObject(Is25ManDifficulty() ? GO_TRIBUTE_CHEST_25H_01 : GO_TRIBUTE_CHEST_10H_01, 60*MINUTE); + } +} + void instance_trial_of_the_crusader::JustDidDialogueStep(int32 iEntry) { switch (iEntry) diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h index 0cab00f7d..b77660df3 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h @@ -8,6 +8,7 @@ enum { MAX_ENCOUNTER = 6, + MAX_WIPES_ALLOWED = 50, TYPE_WIPE_COUNT = 0, TYPE_NORTHREND_BEASTS = 1, @@ -37,6 +38,7 @@ enum NPC_TIRION_A = 34996, NPC_TIRION_B = 36095, // Summoned after his text (Champions, you're alive! Not only have you defeated every challenge of the Trial of the Crusader, but also thwarted Arthas' plans! Your skill and cunning will prove to be a powerful weapon against the Scourge. Well done! Allow one of the Crusade's mages to transport you to the surface!) is said.. + NPC_ARGENT_MAGE = 36097, // Summoned along with Tirion B NPC_VARIAN = 34990, NPC_GARROSH = 34995, NPC_FIZZLEBANG = 35458, @@ -67,15 +69,15 @@ enum GO_CRUSADERS_CACHE_10_H = 195633, GO_CRUSADERS_CACHE_25_H = 195635, - GO_TRIBUTE_CHEST_10H_25 = 195665, - GO_TRIBUTE_CHEST_10H_45 = 195666, - GO_TRIBUTE_CHEST_10H_50 = 195667, - GO_TRIBUTE_CHEST_10H_99 = 195668, + GO_TRIBUTE_CHEST_10H_01 = 195665, + GO_TRIBUTE_CHEST_10H_25 = 195666, + GO_TRIBUTE_CHEST_10H_45 = 195667, + GO_TRIBUTE_CHEST_10H_50 = 195668, - GO_TRIBUTE_CHEST_25H_25 = 195669, - GO_TRIBUTE_CHEST_25H_45 = 195670, - GO_TRIBUTE_CHEST_25H_50 = 195671, - GO_TRIBUTE_CHEST_25H_99 = 195672, + GO_TRIBUTE_CHEST_25H_01 = 195669, + GO_TRIBUTE_CHEST_25H_25 = 195670, + GO_TRIBUTE_CHEST_25H_45 = 195671, + GO_TRIBUTE_CHEST_25H_50 = 195672, SPELL_OPEN_PORTAL = 67864, SPELL_FEL_LIGHTNING_KILL = 67888, @@ -87,6 +89,9 @@ enum DISPLAYID_DESTROYED_FLOOR = 9060, POINT_COMBAT_POSITION = 10, + + WORLD_STATE_WIPES = 4390, + WORLD_STATE_WIPES_COUNT = 4389, }; static const float aRamsayPositions[2][4] = @@ -109,6 +114,8 @@ static const float aSpawnPositions[][4] = {563.6996f, 175.9826f, 394.5042f, 4.694936f}, // World Trigger Large {563.5712f, 174.8351f, 394.4954f, 4.712389f}, // Lich King {563.6858f, 139.4323f, 393.9862f, 4.694936f}, // Purple Rune / Center Position + {648.9169f, 131.0209f, 141.6159f, 0.0f}, // Tirion B + {649.1610f, 142.0399f, 141.3060f, 0.0f}, // Argent mage }; static const float aMovePositions[][3] = @@ -147,6 +154,7 @@ class MANGOS_DLL_DECL instance_trial_of_the_crusader : public ScriptedInstance, private: void DoSummonRamsey(uint32 uiEntry); void JustDidDialogueStep(int32 iEntry); + void DoHandleEventEpilogue(); uint32 m_auiEncounter[MAX_ENCOUNTER]; std::string m_strInstData; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index bab6f83a9..8e6ed0552 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2637" + #define SD2_REVISION_NR "2638" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 829746c8a..ccc33dc48 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -4054,7 +4054,9 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1649071,'%s burrows into the ground!',0,3,0,0,'anubarak EMOTE_BURROW'), (-1649072,'%s spikes pursue $N!',0,3,0,0,'anubarak EMOTE_PURSUE'), (-1649073,'%s emerges from the ground!',0,3,0,0,'anubarak EMOTE_EMERGE'), -(-1649074,'%s unleashes a Leeching Swarm to heal himself!',0,3,0,0,'anubarak EMOTE_SWARM'); +(-1649074,'%s unleashes a Leeching Swarm to heal himself!',0,3,0,0,'anubarak EMOTE_SWARM'), + +(-1649075,'Champions, you\'re alive! Not only have you defeated every challenge of the Trial of the Crusader, but also thwarted Arthas' plans! Your skill and cunning will prove to be a powerful weapon against the Scourge. Well done! Allow one of the Crusade's mages to transport you to the surface!',0,0,0,1,'tirion SAY_EPILOGUE'); -- -1 650 000 TRIAL OF THE CHAMPION diff --git a/sql/updates/r2638_scriptdev2.sql b/sql/updates/r2638_scriptdev2.sql new file mode 100644 index 000000000..9360af0c8 --- /dev/null +++ b/sql/updates/r2638_scriptdev2.sql @@ -0,0 +1,3 @@ +DELETE FROM script_texts WHERE entry IN (-1649075); +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1649075,'Champions, you\'re alive! Not only have you defeated every challenge of the Trial of the Crusader, but also thwarted Arthas\' plans! Your skill and cunning will prove to be a powerful weapon against the Scourge. Well done! Allow one of the Crusade\'s mages to transport you to the surface!',0,0,0,1,'tirion SAY_EPILOGUE'); From 92832e28d77c7ec3e69265e6bf1e37bd5ebaee84 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Wed, 18 Jul 2012 00:49:00 +0300 Subject: [PATCH 0627/1172] [2639] Add more content to Malygos script This will handle intro and epilogue dialogues and also add spell defines --- .../nexus/eye_of_eternity/boss_malygos.cpp | 104 ++++++++++++++++-- .../nexus/eye_of_eternity/eye_of_eternity.h | 16 ++- .../instance_eye_of_eternity.cpp | 47 ++++++-- sd2_revision_nr.h | 2 +- 4 files changed, 153 insertions(+), 16 deletions(-) diff --git a/scripts/northrend/nexus/eye_of_eternity/boss_malygos.cpp b/scripts/northrend/nexus/eye_of_eternity/boss_malygos.cpp index 83b815c09..4c1f6e1fc 100644 --- a/scripts/northrend/nexus/eye_of_eternity/boss_malygos.cpp +++ b/scripts/northrend/nexus/eye_of_eternity/boss_malygos.cpp @@ -16,7 +16,7 @@ /* ScriptData SDName: boss_malygos -SD%Complete: 10 +SD%Complete: 20 SDComment: Basic script SDCategory: Eye of Eternity EndScriptData */ @@ -55,31 +55,98 @@ enum SAY_SPELL_2 = -1616026, SAY_SPELL_3 = -1616027, SAY_DEATH = -1616028, - SAY_OUTRO_1 = -1616029, - SAY_OUTRO_2 = -1616030, - SAY_OUTRO_3 = -1616031, - SAY_OUTRO_4 = -1616032, SAY_EMOTE_SPARK = -1616033, SAY_EMOTE_BREATH = -1616034, + + // phase 1 spells + SPELL_BERSERK = 26662, + SPELL_ARCANE_BREATH = 56272, + SPELL_ARCANE_BREATH_H = 60072, + SPELL_SUMMON_SPARK = 56140, + SPELL_VORTEX = 56105, + + // phase 2 spells + SPELL_ARCANE_STORM = 57459, // related to spells 57473 and 61693 + SPELL_ARCANE_STORM_H = 61694, + SPELL_SUMMON_ARCANE_BOMB = 56429, + SPELL_ARCANE_PULSE = 57432, + + // transition spells + SPELL_DESTROY_PLATFORM_PRE = 58842, + SPELL_DESTROY_PLATFORM_BOOM = 59084, + SPELL_DESTROY_PLATFORM_EVENT = 59099, + SPELL_SUMMON_RED_DRAGON = 58846, + SPELL_RIDE_RED_DRAGON = 56072, + + // phase 3 spells + SPELL_STATIC_FIELD_SUMMON = 57430, + SPELL_SURGE_OF_POWER = 56505, + SPELL_SURGE_OF_POWER_DUMMY = 60939, + + // power spark + SPELL_POWER_SPARK_MALYGOS = 56152, + SPELL_POWER_SPARK_PLAYERS = 55852, + SPELL_POWER_SPARK_VISUAL = 55845, + + // vortex - thse spells require additional research + // related auras: 55853, 55883, 56263, 56264, 56265, 56266, 59666, 61071, 61072, 61073, 61074, 61075 + SPELL_VORTEX_SPAWN = 59670, + SPELL_VORTEX_VISUAL = 55873, + SPELL_VORTEX_CHANNEL = 56237, + + // arcane overload + SPELL_ARCANE_OVERLOAD = 56432, + + // static field + SPELL_STATIC_FIELD = 57428, + + // summoned npcs + NPC_VORTEX = 30090, + NPC_POWER_SPARK = 30084, + + NPC_HOVER_DISC = 30248, + NPC_NEXUS_LORD = 30245, + NPC_SCION_OF_ETERNITY = 30249, + NPC_ARCANE_OVERLOAD = 30282, + + NPC_STATIC_FIELD = 30592, +}; + +static const DialogueEntry aIntroDialogue[] = +{ + {SAY_INTRO_1, NPC_MALYGOS, 11000}, + {SAY_INTRO_2, NPC_MALYGOS, 13000}, + {SAY_INTRO_3, NPC_MALYGOS, 14000}, + {SAY_INTRO_4, NPC_MALYGOS, 12000}, + {SAY_INTRO_5, NPC_MALYGOS, 0}, + {0, 0, 0}, }; +static const float aAlextraszaSpawnPos[4] = {700.354f, 1310.718f, 298.13f, 6.02f}; +static const float aAlextraszaMovePos[3] = {726.754f, 1307.259f, 282.679f}; + /*###### ## boss_malygos ######*/ -struct MANGOS_DLL_DECL boss_malygosAI : public ScriptedAI +struct MANGOS_DLL_DECL boss_malygosAI : public ScriptedAI, private DialogueHelper { - boss_malygosAI(Creature* pCreature) : ScriptedAI(pCreature) + boss_malygosAI(Creature* pCreature) : ScriptedAI(pCreature), + DialogueHelper(aIntroDialogue) { m_pInstance = (instance_eye_of_eternity*)pCreature->GetInstanceData(); m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); + InitializeDialogueHelper(m_pInstance); + m_bHasDoneIntro = false; Reset(); } instance_eye_of_eternity* m_pInstance; bool m_bIsRegularMode; + bool m_bHasDoneIntro; + void Reset() { SetCombatMovement(false); @@ -93,6 +160,17 @@ struct MANGOS_DLL_DECL boss_malygosAI : public ScriptedAI m_pInstance->SetData(TYPE_MALYGOS, IN_PROGRESS); } + void MoveInLineOfSight(Unit* pWho) + { + if (!m_bHasDoneIntro && pWho->GetTypeId() == TYPEID_PLAYER && m_creature->IsWithinDistInMap(pWho, 110.0f)) + { + StartNextDialogueText(SAY_INTRO_1); + m_bHasDoneIntro = true; + } + + ScriptedAI::MoveInLineOfSight(pWho); + } + void KilledUnit(Unit* pVictim) { // ToDo: add kill yells, based on encounter phase @@ -101,6 +179,7 @@ struct MANGOS_DLL_DECL boss_malygosAI : public ScriptedAI void JustDied(Unit* pKiller) { DoScriptText(SAY_DEATH, m_creature); + m_creature->SummonCreature(NPC_ALEXSTRASZA, aAlextraszaSpawnPos[0], aAlextraszaSpawnPos[1], aAlextraszaSpawnPos[2], aAlextraszaSpawnPos[3], TEMPSUMMON_TIMED_DESPAWN, 5*MINUTE*IN_MILLISECONDS); if (m_pInstance) m_pInstance->SetData(TYPE_MALYGOS, DONE); @@ -126,8 +205,19 @@ struct MANGOS_DLL_DECL boss_malygosAI : public ScriptedAI } } + void JustSummoned(Creature* pSummoned) + { + if (pSummoned->GetEntry() == NPC_ALEXSTRASZA) + { + pSummoned->SetByteFlag(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_UNK_2); + pSummoned->GetMotionMaster()->MovePoint(0, aAlextraszaMovePos[0], aAlextraszaMovePos[1], aAlextraszaMovePos[2]); + } + } + void UpdateAI(const uint32 uiDiff) { + DialogueUpdate(uiDiff); + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/northrend/nexus/eye_of_eternity/eye_of_eternity.h b/scripts/northrend/nexus/eye_of_eternity/eye_of_eternity.h index e93c92c9a..39c1556c0 100644 --- a/scripts/northrend/nexus/eye_of_eternity/eye_of_eternity.h +++ b/scripts/northrend/nexus/eye_of_eternity/eye_of_eternity.h @@ -12,6 +12,7 @@ enum NPC_MALYGOS = 28859, NPC_ALEXSTRASZA = 32295, NPC_LARGE_TRIGGER = 22517, + NPC_ALEXSTRASZAS_GIFT = 32448, GO_EXIT_PORTAL = 193908, GO_PLATFORM = 193070, @@ -22,9 +23,18 @@ enum GO_ALEXSTRASZAS_GIFT_H = 193967, ACHIEV_START_MALYGOS_ID = 20387, + + // epilogue related + SAY_OUTRO_1 = -1616029, + SAY_OUTRO_2 = -1616030, + SAY_OUTRO_3 = -1616031, + SAY_OUTRO_4 = -1616032, + + SPELL_ALEXSTRASZAS_GIFT_BEAM = 61028, + SPELL_ALEXSTRASZAS_GIFT_VISUAL = 61023, }; -class MANGOS_DLL_DECL instance_eye_of_eternity : public ScriptedInstance +class MANGOS_DLL_DECL instance_eye_of_eternity : public ScriptedInstance, private DialogueHelper { public: instance_eye_of_eternity(Map* pMap); @@ -39,7 +49,11 @@ class MANGOS_DLL_DECL instance_eye_of_eternity : public ScriptedInstance void SetData(uint32 uiType, uint32 uiData); + void Update(uint32 uiDiff) { DialogueUpdate(uiDiff); } + protected: + void JustDidDialogueStep(int32 iEntry); + uint32 m_uiEncounter; }; diff --git a/scripts/northrend/nexus/eye_of_eternity/instance_eye_of_eternity.cpp b/scripts/northrend/nexus/eye_of_eternity/instance_eye_of_eternity.cpp index 5efaa511c..f000fa999 100644 --- a/scripts/northrend/nexus/eye_of_eternity/instance_eye_of_eternity.cpp +++ b/scripts/northrend/nexus/eye_of_eternity/instance_eye_of_eternity.cpp @@ -16,7 +16,7 @@ /* ScriptData SDName: instance_eye_of_eternity -SD%Complete: 20 +SD%Complete: 50 SDComment: SDCategory: Eye of Eternity EndScriptData */ @@ -24,7 +24,21 @@ EndScriptData */ #include "precompiled.h" #include "eye_of_eternity.h" -instance_eye_of_eternity::instance_eye_of_eternity(Map* pMap) : ScriptedInstance(pMap) +static const DialogueEntry aEpilogueDialogue[] = +{ + {NPC_ALEXSTRASZA, 0, 10000}, + {SPELL_ALEXSTRASZAS_GIFT_BEAM, 0, 3000}, + {NPC_ALEXSTRASZAS_GIFT, 0, 2000}, + {SAY_OUTRO_1, NPC_ALEXSTRASZA, 6000}, + {SAY_OUTRO_2, NPC_ALEXSTRASZA, 4000}, + {SAY_OUTRO_3, NPC_ALEXSTRASZA, 23000}, + {SAY_OUTRO_4, NPC_ALEXSTRASZA, 20000}, + {GO_PLATFORM, 0, 0}, + {0, 0, 0}, +}; + +instance_eye_of_eternity::instance_eye_of_eternity(Map* pMap) : ScriptedInstance(pMap), + DialogueHelper(aEpilogueDialogue) { Initialize(); } @@ -32,6 +46,7 @@ instance_eye_of_eternity::instance_eye_of_eternity(Map* pMap) : ScriptedInstance void instance_eye_of_eternity::Initialize() { m_uiEncounter = NOT_STARTED; + InitializeDialogueHelper(this); } bool instance_eye_of_eternity::IsEncounterInProgress() const @@ -46,6 +61,7 @@ void instance_eye_of_eternity::OnCreatureCreate(Creature* pCreature) case NPC_MALYGOS: case NPC_ALEXSTRASZA: case NPC_LARGE_TRIGGER: + case NPC_ALEXSTRASZAS_GIFT: m_mNpcEntryGuidStore[pCreature->GetEntry()] = pCreature->GetObjectGuid(); break; } @@ -78,15 +94,32 @@ void instance_eye_of_eternity::SetData(uint32 uiType, uint32 uiData) DoStartTimedAchievement(ACHIEVEMENT_CRITERIA_TYPE_KILL_CREATURE, ACHIEV_START_MALYGOS_ID); } - if (uiData == DONE) - { - DoRespawnGameObject(instance->IsRegularDifficulty() ? GO_HEART_OF_MAGIC : GO_HEART_OF_MAGIC_H, 30*MINUTE); - DoRespawnGameObject(instance->IsRegularDifficulty() ? GO_ALEXSTRASZAS_GIFT : GO_ALEXSTRASZAS_GIFT_H, 30*MINUTE); - } + else if (uiData == DONE) + StartNextDialogueText(NPC_ALEXSTRASZA); // Currently no reason to save anything } +void instance_eye_of_eternity::JustDidDialogueStep(int32 iEntry) +{ + switch (iEntry) + { + case SPELL_ALEXSTRASZAS_GIFT_BEAM: + if (Creature* pAlextrasza = GetSingleCreatureFromStorage(NPC_ALEXSTRASZA)) + pAlextrasza->CastSpell(pAlextrasza, SPELL_ALEXSTRASZAS_GIFT_BEAM, false); + break; + case NPC_ALEXSTRASZAS_GIFT: + if (Creature* pGift = GetSingleCreatureFromStorage(NPC_ALEXSTRASZAS_GIFT)) + pGift->CastSpell(pGift, SPELL_ALEXSTRASZAS_GIFT_VISUAL, false); + DoRespawnGameObject(instance->IsRegularDifficulty() ? GO_ALEXSTRASZAS_GIFT : GO_ALEXSTRASZAS_GIFT_H, 30*MINUTE); + break; + case GO_PLATFORM: + // ToDo: respawn the platform and the portal + DoRespawnGameObject(instance->IsRegularDifficulty() ? GO_HEART_OF_MAGIC : GO_HEART_OF_MAGIC_H, 30*MINUTE); + break; + } +} + InstanceData* GetInstanceData_instance_eye_of_eternity(Map* pMap) { return new instance_eye_of_eternity(pMap); diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 8e6ed0552..aa42e780d 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2638" + #define SD2_REVISION_NR "2639" #endif // __SD2_REVISION_NR_H__ From 2882a84b93db0855f9f5c1a0f9ddfd71e0a1cb91 Mon Sep 17 00:00:00 2001 From: Reamer Date: Wed, 18 Jul 2012 01:00:23 +0300 Subject: [PATCH 0628/1172] [2640] Some improvements for [2638] Signed-off-by: Xfurry --- .../trial_of_the_crusader/instance_trial_of_the_crusader.cpp | 5 +++-- .../trial_of_the_crusader/trial_of_the_crusader.h | 2 +- .../icecrown_citadel/icecrown_citadel/icecrown_citadel.h | 2 +- sd2_revision_nr.h | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp index 1eb891e5b..7de73291b 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp @@ -241,7 +241,7 @@ void instance_trial_of_the_crusader::OnPlayerEnter(Player* pPlayer) if (IsHeroicDifficulty()) { pPlayer->SendUpdateWorldState(WORLD_STATE_WIPES, 1); - pPlayer->SendUpdateWorldState(WORLD_STATE_WIPES_COUNT, MAX_WIPES_ALLOWED - GetData(TYPE_WIPE_COUNT)); + pPlayer->SendUpdateWorldState(WORLD_STATE_WIPES_COUNT, MAX_WIPES_ALLOWED - GetData(TYPE_WIPE_COUNT) >= 0 ? MAX_WIPES_ALLOWED - GetData(TYPE_WIPE_COUNT) : 0); } } @@ -250,7 +250,8 @@ void instance_trial_of_the_crusader::SetData(uint32 uiType, uint32 uiData) switch(uiType) { case TYPE_WIPE_COUNT: - DoUpdateWorldState(WORLD_STATE_WIPES_COUNT, MAX_WIPES_ALLOWED - m_auiEncounter[TYPE_WIPE_COUNT]); + if (IsHeroicDifficulty()) + DoUpdateWorldState(WORLD_STATE_WIPES_COUNT, MAX_WIPES_ALLOWED - m_auiEncounter[TYPE_WIPE_COUNT] >= 0 ? MAX_WIPES_ALLOWED - m_auiEncounter[TYPE_WIPE_COUNT] : 0); m_auiEncounter[uiType] = uiData; break; case TYPE_NORTHREND_BEASTS: diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h index b77660df3..ee35de308 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h @@ -143,7 +143,7 @@ class MANGOS_DLL_DECL instance_trial_of_the_crusader : public ScriptedInstance, uint32 GetData(uint32 uiType); // Difficulty wrappers - bool IsHeroicDifficulty() { return instance->GetDifficulty() > RAID_DIFFICULTY_25MAN_NORMAL; } + bool IsHeroicDifficulty() { return instance->GetDifficulty() == RAID_DIFFICULTY_10MAN_HEROIC || instance->GetDifficulty() == RAID_DIFFICULTY_25MAN_HEROIC; } bool Is25ManDifficulty() { return instance->GetDifficulty() == RAID_DIFFICULTY_25MAN_NORMAL || instance->GetDifficulty() == RAID_DIFFICULTY_25MAN_HEROIC; } const char* Save() { return m_strInstData.c_str(); } diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_citadel.h b/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_citadel.h index f2bb21ea3..971cc3656 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_citadel.h +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_citadel.h @@ -224,7 +224,7 @@ class MANGOS_DLL_DECL instance_icecrown_citadel : public ScriptedInstance, priva void DoHandleCitadelAreaTrigger(uint32 uiTriggerId); // Difficulty wrappers - bool IsHeroicDifficulty() { return instance->GetDifficulty() > RAID_DIFFICULTY_25MAN_NORMAL; } + bool IsHeroicDifficulty() { return instance->GetDifficulty() == RAID_DIFFICULTY_10MAN_HEROIC || instance->GetDifficulty() == RAID_DIFFICULTY_25MAN_HEROIC; } bool Is25ManDifficulty() { return instance->GetDifficulty() == RAID_DIFFICULTY_25MAN_NORMAL || instance->GetDifficulty() == RAID_DIFFICULTY_25MAN_HEROIC; } void GetDeathwhisperStalkersList(GuidList &lList) { lList = m_lDeathwhisperStalkersGuids; } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index aa42e780d..72d3acd6c 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2639" + #define SD2_REVISION_NR "2640" #endif // __SD2_REVISION_NR_H__ From 4136533b37b80be2ad3fc1ea3070c280e9213d57 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Wed, 18 Jul 2012 23:29:07 +0300 Subject: [PATCH 0629/1172] [2641] Implement combat abilities for Malygos - The Eye of Eternity Based on the original work of Tasssadar Note: for the moment only phase 1 is playable because of the missing vehicles support Also fix a typo in Ragnaros script and allow the Dalaran Portal to respawn when the Trial of the Crusader event is finished. --- .../molten_core/boss_ragnaros.cpp | 2 +- .../instance_trial_of_the_crusader.cpp | 3 + .../trial_of_the_crusader.h | 1 + .../nexus/eye_of_eternity/boss_malygos.cpp | 412 +++++++++++++++++- .../instance_eye_of_eternity.cpp | 4 + sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 + sql/scriptdev2_script_full.sql | 2 +- sql/updates/r2641_mangos.sql | 1 + sql/updates/r2641_scriptdev2.sql | 3 + 10 files changed, 411 insertions(+), 20 deletions(-) create mode 100644 sql/updates/r2641_mangos.sql create mode 100644 sql/updates/r2641_scriptdev2.sql diff --git a/scripts/eastern_kingdoms/molten_core/boss_ragnaros.cpp b/scripts/eastern_kingdoms/molten_core/boss_ragnaros.cpp index 459235cf8..d9cfd077c 100644 --- a/scripts/eastern_kingdoms/molten_core/boss_ragnaros.cpp +++ b/scripts/eastern_kingdoms/molten_core/boss_ragnaros.cpp @@ -272,7 +272,7 @@ struct MANGOS_DLL_DECL boss_ragnarosAI : public Scripted_NoMovementAI // Say dependend if first time or not DoScriptText(!m_bHasSubmergedOnce ? SAY_REINFORCEMENTS_1 : SAY_REINFORCEMENTS_2, m_creature); - m_bHasSubmergedOnce = false; + m_bHasSubmergedOnce = true; // Summon 8 elementals at random points around the boss float fX, fY, fZ; diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp index 7de73291b..b28f17348 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp @@ -214,6 +214,7 @@ void instance_trial_of_the_crusader::OnObjectCreate(GameObject* pGo) case GO_TRIBUTE_CHEST_25H_50: case GO_MAIN_GATE: case GO_WEB_DOOR: + case GO_PORTAL_DALARAN: break; case GO_CRUSADERS_CACHE: case GO_CRUSADERS_CACHE_25: @@ -409,6 +410,8 @@ void instance_trial_of_the_crusader::DoHandleEventEpilogue() pPlayer->SummonCreature(NPC_ARGENT_MAGE, aSpawnPositions[13][0], aSpawnPositions[13][1], aSpawnPositions[13][2], aSpawnPositions[13][3], TEMPSUMMON_CORPSE_DESPAWN, 0); + DoRespawnGameObject(GO_PORTAL_DALARAN, 60*MINUTE); + // Spawn the chest for heroic difficulty if (IsHeroicDifficulty()) { diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h index ee35de308..d96e929e4 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h @@ -63,6 +63,7 @@ enum GO_NORTH_GATE = 195650, GO_COLISEUM_FLOOR = 195527, GO_WEB_DOOR = 195485, + GO_PORTAL_DALARAN = 195682, GO_CRUSADERS_CACHE = 195631, GO_CRUSADERS_CACHE_25 = 195632, diff --git a/scripts/northrend/nexus/eye_of_eternity/boss_malygos.cpp b/scripts/northrend/nexus/eye_of_eternity/boss_malygos.cpp index 4c1f6e1fc..b5ca2deb1 100644 --- a/scripts/northrend/nexus/eye_of_eternity/boss_malygos.cpp +++ b/scripts/northrend/nexus/eye_of_eternity/boss_malygos.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: boss_malygos -SD%Complete: 20 -SDComment: Basic script +SD%Complete: 60 +SDComment: Only the first phase is playable. The rest of the script is disabled until vehicles are supported in core. Timers need adjustments. Movement in Phase 2 NYI. SDCategory: Eye of Eternity EndScriptData */ @@ -67,10 +67,11 @@ enum SPELL_VORTEX = 56105, // phase 2 spells - SPELL_ARCANE_STORM = 57459, // related to spells 57473 and 61693 + SPELL_ARCANE_STORM = 57459, // related to spell 61693 SPELL_ARCANE_STORM_H = 61694, SPELL_SUMMON_ARCANE_BOMB = 56429, - SPELL_ARCANE_PULSE = 57432, + SPELL_SURGE_OF_POWER_PULSE = 56505, // deep breath spell + //SPELL_ARCANE_PULSE = 57432, // purpose unk // transition spells SPELL_DESTROY_PLATFORM_PRE = 58842, @@ -80,9 +81,8 @@ enum SPELL_RIDE_RED_DRAGON = 56072, // phase 3 spells - SPELL_STATIC_FIELD_SUMMON = 57430, - SPELL_SURGE_OF_POWER = 56505, - SPELL_SURGE_OF_POWER_DUMMY = 60939, + SPELL_STATIC_FIELD_SUMMON = 57430, // cast on 1 or 3 targets based on difficulty + SPELL_SURGE_OF_POWER = 57407, // related to 60936 and 60939 // power spark SPELL_POWER_SPARK_MALYGOS = 56152, @@ -105,24 +105,42 @@ enum NPC_VORTEX = 30090, NPC_POWER_SPARK = 30084, - NPC_HOVER_DISC = 30248, NPC_NEXUS_LORD = 30245, NPC_SCION_OF_ETERNITY = 30249, NPC_ARCANE_OVERLOAD = 30282, NPC_STATIC_FIELD = 30592, + + // phases + PHASE_FLOOR = 1, + PHASE_TRANSITION_1 = 2, + PHASE_DISCS = 3, + PHASE_TRANSITION_2 = 4, + PHASE_DRAGONS = 5, + + POINT_ID_COMBAT = 1, }; static const DialogueEntry aIntroDialogue[] = { + // Intro dialogue {SAY_INTRO_1, NPC_MALYGOS, 11000}, {SAY_INTRO_2, NPC_MALYGOS, 13000}, {SAY_INTRO_3, NPC_MALYGOS, 14000}, {SAY_INTRO_4, NPC_MALYGOS, 12000}, {SAY_INTRO_5, NPC_MALYGOS, 0}, + + // Phase transitions + {SAY_END_PHASE_1, NPC_MALYGOS, 25000}, + {PHASE_DISCS, 0, 0}, + {SAY_END_PHASE_2, NPC_MALYGOS, 13000}, + {SPELL_DESTROY_PLATFORM_BOOM, 0, 2000}, + {SPELL_SUMMON_RED_DRAGON, 0, 5000}, + {SAY_INTRO_PHASE_3, NPC_MALYGOS, 0}, {0, 0, 0}, }; +static const float aCenterMovePos[3] = {754.395f, 1301.270f, 266.253f}; static const float aAlextraszaSpawnPos[4] = {700.354f, 1310.718f, 298.13f, 6.02f}; static const float aAlextraszaMovePos[3] = {726.754f, 1307.259f, 282.679f}; @@ -138,6 +156,11 @@ struct MANGOS_DLL_DECL boss_malygosAI : public ScriptedAI, private DialogueHelpe m_pInstance = (instance_eye_of_eternity*)pCreature->GetInstanceData(); m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); InitializeDialogueHelper(m_pInstance); + + m_uiMaxStaticFieldTargets = m_bIsRegularMode ? 1 : 3; + m_uiMaxNexusLords = m_bIsRegularMode ? 2 : 4; + m_uiMaxScions = m_bIsRegularMode ? 4 : 8; + m_bHasDoneIntro = false; Reset(); } @@ -147,8 +170,49 @@ struct MANGOS_DLL_DECL boss_malygosAI : public ScriptedAI, private DialogueHelpe bool m_bHasDoneIntro; + uint8 m_uiPhase; + uint8 m_uiMaxNexusLords; + uint8 m_uiMaxScions; + uint8 m_uiAddsDeadCount; + uint8 m_uiCurrentWaypoint; + uint8 m_uiMaxStaticFieldTargets; + + uint32 m_uiBerserkTimer; + uint32 m_uiVortexTimer; + uint32 m_uiArcaneBreathTimer; + uint32 m_uiPowerSparkTimer; + + uint32 m_uiArcanePulseTimer; + uint32 m_uiOverloadTimer; + uint32 m_uiArcaneStormTimer; + uint32 m_uiWaypointTimer; + + uint32 m_uiStaticFieldTimer; + uint32 m_uiSurgeOfPowerTimer; + void Reset() { + m_uiPhase = PHASE_FLOOR; + + m_uiBerserkTimer = 10*MINUTE*IN_MILLISECONDS; + m_uiVortexTimer = 60000; + m_uiArcaneBreathTimer = 15000; + m_uiPowerSparkTimer = 30000; + + m_uiArcanePulseTimer = 60000; + m_uiOverloadTimer = 1000; + m_uiArcaneStormTimer = 15000; + m_uiWaypointTimer = 15000; + m_uiAddsDeadCount = 0; + m_uiCurrentWaypoint = 0; + + m_uiStaticFieldTimer = 15000; + m_uiSurgeOfPowerTimer = 30000; + + // reset flags + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + m_creature->SetByteFlag(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_UNK_2); + SetCombatMovement(false); } @@ -162,7 +226,7 @@ struct MANGOS_DLL_DECL boss_malygosAI : public ScriptedAI, private DialogueHelpe void MoveInLineOfSight(Unit* pWho) { - if (!m_bHasDoneIntro && pWho->GetTypeId() == TYPEID_PLAYER && m_creature->IsWithinDistInMap(pWho, 110.0f)) + if (!m_bHasDoneIntro && pWho->GetTypeId() == TYPEID_PLAYER && !((Player*)pWho)->isGameMaster() && m_creature->IsWithinDistInMap(pWho, 110.0f)) { StartNextDialogueText(SAY_INTRO_1); m_bHasDoneIntro = true; @@ -173,7 +237,28 @@ struct MANGOS_DLL_DECL boss_malygosAI : public ScriptedAI, private DialogueHelpe void KilledUnit(Unit* pVictim) { - // ToDo: add kill yells, based on encounter phase + uint8 uiTextId = 0; + switch (m_uiPhase) + { + case PHASE_FLOOR: uiTextId = urand(0, 2); break; + case PHASE_DISCS: uiTextId = urand(3, 5); break; + case PHASE_DRAGONS: uiTextId = urand(6, 8); break; + } + + switch (uiTextId) + { + case 0: DoScriptText(SAY_SLAY_1_A, m_creature); break; + case 1: DoScriptText(SAY_SLAY_1_B, m_creature); break; + case 2: DoScriptText(SAY_SLAY_1_C, m_creature); break; + + case 3: DoScriptText(SAY_SLAY_2_A, m_creature); break; + case 4: DoScriptText(SAY_SLAY_2_B, m_creature); break; + case 5: DoScriptText(SAY_SLAY_2_C, m_creature); break; + + case 6: DoScriptText(SAY_SLAY_3_A, m_creature); break; + case 7: DoScriptText(SAY_SLAY_3_B, m_creature); break; + case 8: DoScriptText(SAY_SLAY_3_C, m_creature); break; + } } void JustDied(Unit* pKiller) @@ -196,7 +281,7 @@ struct MANGOS_DLL_DECL boss_malygosAI : public ScriptedAI, private DialogueHelpe if (uiMoveType != POINT_MOTION_TYPE) return; - if (uiPointId) + if (uiPointId == POINT_ID_COMBAT) { m_creature->SetLevitate(false); SetCombatMovement(true); @@ -207,10 +292,108 @@ struct MANGOS_DLL_DECL boss_malygosAI : public ScriptedAI, private DialogueHelpe void JustSummoned(Creature* pSummoned) { - if (pSummoned->GetEntry() == NPC_ALEXSTRASZA) + switch (pSummoned->GetEntry()) + { + case NPC_ALEXSTRASZA: + pSummoned->SetByteFlag(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_UNK_2); + pSummoned->GetMotionMaster()->MovePoint(0, aAlextraszaMovePos[0], aAlextraszaMovePos[1], aAlextraszaMovePos[2]); + break; + case NPC_POWER_SPARK: + pSummoned->GetMotionMaster()->MoveFollow(m_creature, 0, 0); + break; + case NPC_ARCANE_OVERLOAD: + pSummoned->CastSpell(pSummoned, SPELL_ARCANE_OVERLOAD, false); + break; + case NPC_STATIC_FIELD: + pSummoned->CastSpell(pSummoned, SPELL_STATIC_FIELD, false); + break; + case NPC_NEXUS_LORD: + case NPC_SCION_OF_ETERNITY: + // ToDo: maybe add more code here in order to handle the discs + pSummoned->SetInCombatWithZone(); + break; + } + } + + void SummonedCreatureJustDied(Creature* pSummoned) + { + if (pSummoned->GetEntry() == NPC_NEXUS_LORD || pSummoned->GetEntry() == NPC_SCION_OF_ETERNITY) + { + ++m_uiAddsDeadCount; + + // When all adds are killed start phase 3 + if (m_uiAddsDeadCount == m_uiMaxScions + m_uiMaxNexusLords) + { + StartNextDialogueText(SAY_END_PHASE_2); + m_uiPhase = PHASE_TRANSITION_2; + + // Start platform animation - not sure if this is cast by the right npc + if (m_pInstance) + { + if (Creature* pTrigger = m_pInstance->GetSingleCreatureFromStorage(NPC_LARGE_TRIGGER)) + pTrigger->CastSpell(pTrigger, SPELL_DESTROY_PLATFORM_PRE, false); + } + } + } + } + + void SpellHit(Unit* pCaster, const SpellEntry* pSpell) + { + // Handle yell on Power Spark hit + if (pSpell->Id == SPELL_POWER_SPARK_MALYGOS && pCaster->GetEntry() == NPC_POWER_SPARK) + DoScriptText(SAY_SPARK_BUFF, m_creature); + } + + void JustDidDialogueStep(int32 iEntry) + { + switch (iEntry) + { + case PHASE_DISCS: + // ToDo: start some movement over the platform + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + m_uiPhase = PHASE_DISCS; + DoSpawnAdds(); + break; + case SPELL_DESTROY_PLATFORM_BOOM: + if (m_pInstance) + { + if (Creature* pTrigger = m_pInstance->GetSingleCreatureFromStorage(NPC_LARGE_TRIGGER)) + pTrigger->CastSpell(pTrigger, SPELL_DESTROY_PLATFORM_BOOM, false); + } + break; + case SPELL_SUMMON_RED_DRAGON: + if (m_pInstance) + { + // Destroy the platform + if (GameObject* pPlatform = m_pInstance->GetSingleGameObjectFromStorage(GO_PLATFORM)) + pPlatform->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_UNK_11); + } + + // ToDo: maybe this requires more code after vehicles are implemented in core + DoCastSpellIfCan(m_creature, SPELL_SUMMON_RED_DRAGON); + break; + case SAY_INTRO_PHASE_3: + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + m_uiPhase = PHASE_DRAGONS; + break; + } + } + + // Wrapper to spawn the adds in phase 2 + void DoSpawnAdds() + { + // Note: this might need some adjustments when vehicles are implemented + float fX, fY, fZ; + for (uint8 i = 0; i < m_uiMaxNexusLords; ++i) { - pSummoned->SetByteFlag(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_UNK_2); - pSummoned->GetMotionMaster()->MovePoint(0, aAlextraszaMovePos[0], aAlextraszaMovePos[1], aAlextraszaMovePos[2]); + m_creature->GetRandomPoint(aCenterMovePos[0], aCenterMovePos[1], aCenterMovePos[2] + 30.0f, 50.0f, fX, fY, fZ); + m_creature->SummonCreature(NPC_NEXUS_LORD, fX, fY, fZ, 0, TEMPSUMMON_DEAD_DESPAWN, 0); + } + + for (uint8 i = 0; i < m_uiMaxScions; ++i) + { + m_creature->GetRandomPoint(aCenterMovePos[0], aCenterMovePos[1], aCenterMovePos[2] + 30.0f, 50.0f, fX, fY, fZ); + m_creature->SummonCreature(NPC_SCION_OF_ETERNITY, fX, fY, fZ, 0, TEMPSUMMON_DEAD_DESPAWN, 0); } } @@ -221,7 +404,156 @@ struct MANGOS_DLL_DECL boss_malygosAI : public ScriptedAI, private DialogueHelpe if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - DoMeleeAttackIfReady(); + if (m_uiBerserkTimer) + { + if (m_uiBerserkTimer <= uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_BERSERK) == CAST_OK) + m_uiBerserkTimer = 0; + } + else + m_uiBerserkTimer -= uiDiff; + } + + switch (m_uiPhase) + { + case PHASE_FLOOR: + + /* ToDo: Enable this when the spells are properly supported in core + if (m_uiVortexTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_VORTEX) == CAST_OK) + { + DoScriptText(SAY_VORTEX, m_creature); + m_uiVortexTimer = 60000; + } + } + else + m_uiVortexTimer -= uiDiff; + */ + + if (m_uiArcaneBreathTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_ARCANE_BREATH : SPELL_ARCANE_BREATH_H) == CAST_OK) + m_uiArcaneBreathTimer = urand(13000, 16000); + } + else + m_uiArcaneBreathTimer -= uiDiff; + + if (m_uiPowerSparkTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_SUMMON_SPARK) == CAST_OK) + { + DoScriptText(SAY_EMOTE_SPARK, m_creature); + m_uiPowerSparkTimer = 30000; + } + } + else + m_uiPowerSparkTimer -= uiDiff; + + /* ToDo: uncomment this when the core will support vehicles + if (m_creature->GetHealthPercent() < 50.0f) + { + SetCombatMovement(false); + m_creature->SetLevitate(true); + m_creature->SetByteFlag(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_UNK_2); + // Move idle first, so we can avoid evading, because of the waypoint movement + m_creature->GetMotionMaster()->MoveIdle(); + m_creature->GetMotionMaster()->MovePoint(0, aCenterMovePos[0], aCenterMovePos[1], aCenterMovePos[2] + 30.0f); + + StartNextDialogueText(SAY_END_PHASE_1); + m_uiPhase = PHASE_TRANSITION_1; + } + */ + + DoMeleeAttackIfReady(); + + break; + case PHASE_DISCS: + + if (m_uiOverloadTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_SUMMON_ARCANE_BOMB) == CAST_OK) + { + if (!urand(0, 3)) + DoScriptText(SAY_SHELL, m_creature); + + m_uiOverloadTimer = urand(16000, 19000); + } + } + else + m_uiOverloadTimer -= uiDiff; + + // Note: the boss should move in certain points before he does the breath ability + if (m_uiArcanePulseTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_SURGE_OF_POWER_PULSE) == CAST_OK) + { + DoScriptText(SAY_DEEP_BREATH, m_creature); + DoScriptText(SAY_EMOTE_BREATH, m_creature); + m_uiArcanePulseTimer = 60000; + } + } + else + m_uiArcanePulseTimer -= uiDiff; + + if (m_uiArcaneStormTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_ARCANE_STORM : SPELL_ARCANE_STORM_H) == CAST_OK) + m_uiArcaneStormTimer = urand(15000, 17000); + } + else + m_uiArcaneStormTimer -= uiDiff; + + break; + case PHASE_DRAGONS: + + if (m_uiStaticFieldTimer < uiDiff) + { + // Cast Static Field spell on a number of targets, based on difficulty + for (uint8 i = 0; i < m_uiMaxStaticFieldTargets; ++i) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, SPELL_STATIC_FIELD_SUMMON, CAST_TRIGGERED) == CAST_OK) + { + switch (urand(0, 2)) + { + case 0: DoScriptText(SAY_SPELL_1, m_creature); break; + case 1: DoScriptText(SAY_SPELL_2, m_creature); break; + case 2: DoScriptText(SAY_SPELL_3, m_creature); break; + } + m_uiStaticFieldTimer = urand(10000, 17000); + } + } + } + } + else + m_uiStaticFieldTimer -= uiDiff; + + if (m_uiSurgeOfPowerTimer < uiDiff) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, SPELL_SURGE_OF_POWER) == CAST_OK) + { + if (!urand(0, 3)) + DoScriptText(SAY_SURGE, m_creature); + + m_uiSurgeOfPowerTimer = urand(5000, 15000); + } + } + } + else + m_uiSurgeOfPowerTimer -= uiDiff; + + break; + case PHASE_TRANSITION_1: + case PHASE_TRANSITION_2: + // Nothing here - wait for transition to finish + break; + + } } }; @@ -230,6 +562,47 @@ CreatureAI* GetAI_boss_malygos(Creature* pCreature) return new boss_malygosAI(pCreature); } +/*###### +## npc_power_spark +######*/ + +struct MANGOS_DLL_DECL npc_power_sparkAI : public ScriptedAI +{ + npc_power_sparkAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } + + void Reset() + { + DoCastSpellIfCan(m_creature, SPELL_POWER_SPARK_VISUAL); + } + + void MoveInLineOfSight(Unit* pWho) + { + if (pWho->GetEntry() == NPC_MALYGOS && m_creature->CanReachWithMeleeAttack(pWho)) + { + DoCastSpellIfCan(m_creature, SPELL_POWER_SPARK_MALYGOS, CAST_TRIGGERED); + m_creature->ForcedDespawn(); + } + } + + void JustDied(Unit* pKiller) + { + DoCastSpellIfCan(m_creature, SPELL_POWER_SPARK_PLAYERS, CAST_TRIGGERED); + } + + void AttackStart(Unit* pWho) { } + + void UpdateAI(const uint32 uiDiff) { } +}; + +CreatureAI* GetAI_npc_power_spark(Creature* pCreature) +{ + return new npc_power_sparkAI(pCreature); +} + +/*###### +## event_go_focusing_iris +######*/ + bool ProcessEventId_event_go_focusing_iris(uint32 uiEventId, Object* pSource, Object* pTarget, bool bIsStart) { if (instance_eye_of_eternity* pInstance = (instance_eye_of_eternity*)((Creature*)pSource)->GetInstanceData()) @@ -245,10 +618,10 @@ bool ProcessEventId_event_go_focusing_iris(uint32 uiEventId, Object* pSource, Ob if (!pMalygos || !pTrigger) return false; - // Enter combat area + // Enter combat area - Move to ground point first, then start chasing target float fX, fY, fZ; pTrigger->GetNearPoint(pTrigger, fX, fY, fZ, 0, 30.0f, pTrigger->GetAngle(pMalygos)); - pMalygos->GetMotionMaster()->MovePoint(1, fX, fY, fZ); + pMalygos->GetMotionMaster()->MovePoint(POINT_ID_COMBAT, fX, fY, fZ); pMalygos->AI()->AttackStart((Player*)pSource); return true; @@ -265,6 +638,11 @@ void AddSC_boss_malygos() pNewScript->GetAI = &GetAI_boss_malygos; pNewScript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "npc_power_spark"; + pNewScript->GetAI = &GetAI_npc_power_spark; + pNewScript->RegisterSelf(); + pNewScript = new Script; pNewScript->Name = "event_go_focusing_iris"; pNewScript->pProcessEventId = &ProcessEventId_event_go_focusing_iris; diff --git a/scripts/northrend/nexus/eye_of_eternity/instance_eye_of_eternity.cpp b/scripts/northrend/nexus/eye_of_eternity/instance_eye_of_eternity.cpp index f000fa999..441300914 100644 --- a/scripts/northrend/nexus/eye_of_eternity/instance_eye_of_eternity.cpp +++ b/scripts/northrend/nexus/eye_of_eternity/instance_eye_of_eternity.cpp @@ -94,6 +94,10 @@ void instance_eye_of_eternity::SetData(uint32 uiType, uint32 uiData) DoStartTimedAchievement(ACHIEVEMENT_CRITERIA_TYPE_KILL_CREATURE, ACHIEV_START_MALYGOS_ID); } + else if (uiData == FAIL) + { + // ToDo: respawn the platform and the portal + } else if (uiData == DONE) StartNextDialogueText(NPC_ALEXSTRASZA); diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 72d3acd6c..06dd9bd1f 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2640" + #define SD2_REVISION_NR "2641" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 0535ef3f2..6f46416ee 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -898,6 +898,7 @@ UPDATE creature_template SET ScriptName='npc_zeppit' WHERE entry=22484; /* EYE OF ETERNITY */ UPDATE instance_template SET ScriptName='instance_eye_of_eternity' WHERE map=616; UPDATE creature_template SET ScriptName='boss_malygos' WHERE entry=28859; +UPDATE creature_template SET ScriptName='npc_power_spark' WHERE entry=30084; DELETE FROM scripted_event_id WHERE id IN (20711); INSERT INTO scripted_event_id VALUES (20711,'event_go_focusing_iris'); diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index ccc33dc48..c151f1a85 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -3650,7 +3650,7 @@ INSERT INTO script_texts (entry,content_default,sound,type,LANGUAGE,emote,commen (-1616010,' How very... naive...',14521,1,0,0,'malygos SAY_SLAY_1_C'), (-1616011,'I had hoped to end your lives quickly, but you have proven more...resilient then I had anticipated. Nonetheless, your efforts are in vain, it is you reckless, careless mortals who are to blame for this war! I do what I must...And if it means your...extinction...THEN SO BE IT!',14522,1,0,0,'malygos SAY_END_PHASE_1'), (-1616012,'Few have experienced the pain I will now inflict upon you!',14523,1,0,0,'malygos SAY_START_PHASE_2'), -(-1616013,'YOU WILL NOT SUCCEED WHILE I DRAW BREATH!',14518,1,0,0,'malygos SAY_DEEP_BREATH'), +(-1616013,'You will not succeed while I draw breath!',14518,1,0,0,'malygos SAY_DEEP_BREATH'), (-1616014,'I will teach you IGNORANT children just how little you know of magic...',14524,1,0,0,'malygos SAY_SHELL'), (-1616015,'Your energy will be put to good use!',14526,1,0,0,'malygos SAY_SLAY_2_A'), (-1616016,'I am the spell-weaver! My power is infinite!',14527,1,0,0,'malygos SAY_SLAY_2_B'), diff --git a/sql/updates/r2641_mangos.sql b/sql/updates/r2641_mangos.sql new file mode 100644 index 000000000..3763238ac --- /dev/null +++ b/sql/updates/r2641_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_power_spark' WHERE entry=30084; diff --git a/sql/updates/r2641_scriptdev2.sql b/sql/updates/r2641_scriptdev2.sql new file mode 100644 index 000000000..08285c826 --- /dev/null +++ b/sql/updates/r2641_scriptdev2.sql @@ -0,0 +1,3 @@ +DELETE FROM script_texts WHERE entry IN (-1616013); +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1616013,'You will not succeed while I draw breath!',14518,1,0,0,'malygos SAY_DEEP_BREATH'); From 3e1318d812a8f281e037fe02c0e73b8d37a5e5ed Mon Sep 17 00:00:00 2001 From: Xfurry Date: Thu, 19 Jul 2012 02:14:04 +0300 Subject: [PATCH 0630/1172] [2642] Cleanup and improve some Outland zone scripts Also fix a typo in [2638] - thanks pyromaniac --- scripts/outland/blades_edge_mountains.cpp | 168 ++++++++++++---------- scripts/outland/hellfire_peninsula.cpp | 98 +++++++------ scripts/outland/nagrand.cpp | 5 +- scripts/outland/shadowmoon_valley.cpp | 165 ++++++++++----------- scripts/outland/shattrath_city.cpp | 46 +++--- scripts/outland/terokkar_forest.cpp | 74 ++++------ sd2_revision_nr.h | 2 +- sql/scriptdev2_script_full.sql | 2 +- 8 files changed, 279 insertions(+), 281 deletions(-) diff --git a/scripts/outland/blades_edge_mountains.cpp b/scripts/outland/blades_edge_mountains.cpp index 12afa86e4..44e8e920a 100644 --- a/scripts/outland/blades_edge_mountains.cpp +++ b/scripts/outland/blades_edge_mountains.cpp @@ -58,133 +58,138 @@ CreatureAI* GetAI_mobs_bladespire_ogre(Creature* pCreature) ## mobs_nether_drake ######*/ -#define SAY_NIHIL_1 -1000169 -#define SAY_NIHIL_2 -1000170 -#define SAY_NIHIL_3 -1000171 -#define SAY_NIHIL_4 -1000172 -#define SAY_NIHIL_INTERRUPT -1000173 +enum +{ + SAY_NIHIL_1 = -1000169, + SAY_NIHIL_2 = -1000170, + SAY_NIHIL_3 = -1000171, + SAY_NIHIL_4 = -1000172, + SAY_NIHIL_INTERRUPT = -1000173, + + MAX_ENTRIES = 4, -#define ENTRY_WHELP 20021 -#define ENTRY_PROTO 21821 -#define ENTRY_ADOLE 21817 -#define ENTRY_MATUR 21820 -#define ENTRY_NIHIL 21823 + NPC_PROTO = 21821, + NPC_ADOLESCENT = 21817, + NPC_MATURE = 21820, + NPC_NIHIL = 21823, -#define SPELL_T_PHASE_MODULATOR 37573 + SPELL_T_PHASE_MODULATOR = 37573, -#define SPELL_ARCANE_BLAST 38881 -#define SPELL_MANA_BURN 38884 -#define SPELL_INTANGIBLE_PRESENCE 36513 + SPELL_ARCANE_BLAST = 38881, + SPELL_MANA_BURN = 38884, + SPELL_INTANGIBLE_PRESENCE = 36513, +}; + +static const uint32 aNetherDrakeEntries[MAX_ENTRIES] = {NPC_PROTO, NPC_ADOLESCENT, NPC_MATURE, NPC_NIHIL}; struct MANGOS_DLL_DECL mobs_nether_drakeAI : public ScriptedAI { mobs_nether_drakeAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } - bool IsNihil; - uint32 NihilSpeech_Timer; - uint32 NihilSpeech_Phase; + bool m_bIsNihil; + uint32 m_uiNihilSpeechTimer; + uint32 m_uiNihilSpeechPhase; - uint32 ArcaneBlast_Timer; - uint32 ManaBurn_Timer; - uint32 IntangiblePresence_Timer; + uint32 m_uiArcaneBlastTimer; + uint32 m_uiManaBurnTimer; + uint32 m_uiIntangiblePresenceTimer; void Reset() { - IsNihil = false; - NihilSpeech_Timer = 3000; - NihilSpeech_Phase = 0; + m_bIsNihil = false; + m_uiNihilSpeechTimer = 3000; + m_uiNihilSpeechPhase = 0; - ArcaneBlast_Timer = 7500; - ManaBurn_Timer = 10000; - IntangiblePresence_Timer = 15000; + m_uiArcaneBlastTimer = 7500; + m_uiManaBurnTimer = 10000; + m_uiIntangiblePresenceTimer = 15000; } - void MoveInLineOfSight(Unit *who) + void MoveInLineOfSight(Unit* pWho) { if (m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE)) return; - ScriptedAI::MoveInLineOfSight(who); + ScriptedAI::MoveInLineOfSight(pWho); } //in case creature was not summoned (not expected) - void MovementInform(uint32 type, uint32 id) + void MovementInform(uint32 uiMoveType, uint32 uiPointId) { - if (type != POINT_MOTION_TYPE) + if (uiMoveType != POINT_MOTION_TYPE) return; - if (id == 0) - { - m_creature->SetDeathState(JUST_DIED); - m_creature->RemoveCorpse(); - m_creature->SetHealth(0); - } + if (uiPointId) + m_creature->ForcedDespawn(); } - void SpellHit(Unit *caster, const SpellEntry *spell) + void SpellHit(Unit* pCaster, const SpellEntry* pSpell) { - if (spell->Id == SPELL_T_PHASE_MODULATOR && caster->GetTypeId() == TYPEID_PLAYER) + if (pSpell->Id == SPELL_T_PHASE_MODULATOR && pCaster->GetTypeId() == TYPEID_PLAYER) { - const uint32 entry_list[4] = {ENTRY_PROTO, ENTRY_ADOLE, ENTRY_MATUR, ENTRY_NIHIL}; - int cid = rand()%(4-1); - - if (entry_list[cid] == m_creature->GetEntry()) - ++cid; - - //we are nihil, so say before transform - if (m_creature->GetEntry() == ENTRY_NIHIL) + // we are nihil, so say before transform + if (m_creature->GetEntry() == NPC_NIHIL) { DoScriptText(SAY_NIHIL_INTERRUPT, m_creature); m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - IsNihil = false; + m_bIsNihil = false; } - if (m_creature->UpdateEntry(entry_list[cid])) + // choose a new entry + uint8 uiIndex = urand(0, MAX_ENTRIES - 1); + + // If we choose the same entry, try again + while (aNetherDrakeEntries[uiIndex] == m_creature->GetEntry()) + uiIndex = urand(0, MAX_ENTRIES - 1); + + if (m_creature->UpdateEntry(aNetherDrakeEntries[uiIndex])) { - if (entry_list[cid] == ENTRY_NIHIL) + // Nihil does only dialogue + if (aNetherDrakeEntries[uiIndex] == NPC_NIHIL) { EnterEvadeMode(); m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - IsNihil = true; - }else - AttackStart(caster); + m_bIsNihil = true; + } + else + AttackStart(pCaster); } } } - void UpdateAI(const uint32 diff) + void UpdateAI(const uint32 uiDiff) { - if (IsNihil) + if (m_bIsNihil) { - if (NihilSpeech_Timer <= diff) + if (m_uiNihilSpeechTimer < uiDiff) { - switch(NihilSpeech_Phase) + switch (m_uiNihilSpeechPhase) { case 0: DoScriptText(SAY_NIHIL_1, m_creature); - ++NihilSpeech_Phase; break; case 1: DoScriptText(SAY_NIHIL_2, m_creature); - ++NihilSpeech_Phase; break; case 2: DoScriptText(SAY_NIHIL_3, m_creature); - ++NihilSpeech_Phase; break; case 3: DoScriptText(SAY_NIHIL_4, m_creature); - ++NihilSpeech_Phase; break; case 4: m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); //take off to location above - m_creature->GetMotionMaster()->MovePoint(0, m_creature->GetPositionX()+50.0f, m_creature->GetPositionY(), m_creature->GetPositionZ()+50.0f); - ++NihilSpeech_Phase; + m_creature->SetLevitate(true); + m_creature->SetByteFlag(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_UNK_2); + m_creature->GetMotionMaster()->MovePoint(1, m_creature->GetPositionX() + 50.0f, m_creature->GetPositionY(), m_creature->GetPositionZ() + 50.0f); break; } - NihilSpeech_Timer = 5000; - }else NihilSpeech_Timer -=diff; + ++m_uiNihilSpeechPhase; + m_uiNihilSpeechTimer = 5000; + } + else + m_uiNihilSpeechTimer -= uiDiff; //anything below here is not interesting for Nihil, so skip it return; @@ -193,25 +198,32 @@ struct MANGOS_DLL_DECL mobs_nether_drakeAI : public ScriptedAI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - if (IntangiblePresence_Timer <= diff) + if (m_uiIntangiblePresenceTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_INTANGIBLE_PRESENCE); - IntangiblePresence_Timer = urand(15000, 30000); - }else IntangiblePresence_Timer -= diff; + if (DoCastSpellIfCan(m_creature, SPELL_INTANGIBLE_PRESENCE) == CAST_OK) + m_uiIntangiblePresenceTimer = urand(15000, 30000); + } + else + m_uiIntangiblePresenceTimer -= uiDiff; - if (ManaBurn_Timer <= diff) + if (m_uiManaBurnTimer < uiDiff) { - Unit* target = m_creature->getVictim(); - if (target && target->getPowerType() == POWER_MANA) - DoCastSpellIfCan(target,SPELL_MANA_BURN); - ManaBurn_Timer = urand(8000, 16000); - }else ManaBurn_Timer -= diff; + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0, SPELL_MANA_BURN, SELECT_FLAG_POWER_MANA)) + { + if (DoCastSpellIfCan(pTarget, SPELL_MANA_BURN) == CAST_OK) + m_uiManaBurnTimer = urand(8000, 16000); + } + } + else + m_uiManaBurnTimer -= uiDiff; - if (ArcaneBlast_Timer <= diff) + if (m_uiArcaneBlastTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_ARCANE_BLAST); - ArcaneBlast_Timer = urand(2500, 7500); - }else ArcaneBlast_Timer -= diff; + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_ARCANE_BLAST) == CAST_OK) + m_uiArcaneBlastTimer = urand(2500, 7500); + } + else + m_uiArcaneBlastTimer -= uiDiff; DoMeleeAttackIfReady(); } diff --git a/scripts/outland/hellfire_peninsula.cpp b/scripts/outland/hellfire_peninsula.cpp index 4221c6d85..ed83f4854 100644 --- a/scripts/outland/hellfire_peninsula.cpp +++ b/scripts/outland/hellfire_peninsula.cpp @@ -35,44 +35,48 @@ EndContentData */ ## npc_aeranas ######*/ -#define SAY_SUMMON -1000138 -#define SAY_FREE -1000139 +enum +{ + SAY_SUMMON = -1000138, + SAY_FREE = -1000139, -#define FACTION_HOSTILE 16 -#define FACTION_FRIENDLY 35 + FACTION_HOSTILE = 16, + FACTION_FRIENDLY = 35, -#define SPELL_ENVELOPING_WINDS 15535 -#define SPELL_SHOCK 12553 + SPELL_ENVELOPING_WINDS = 15535, + SPELL_SHOCK = 12553, +}; struct MANGOS_DLL_DECL npc_aeranasAI : public ScriptedAI { npc_aeranasAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } - uint32 Faction_Timer; - uint32 EnvelopingWinds_Timer; - uint32 Shock_Timer; + uint32 m_uiFactionTimer; + uint32 m_uiEnvelopingWindsTimer; + uint32 m_uiShockTimer; void Reset() { - Faction_Timer = 8000; - EnvelopingWinds_Timer = 9000; - Shock_Timer = 5000; + m_uiFactionTimer = 8000; + m_uiEnvelopingWindsTimer = 9000; + m_uiShockTimer = 5000; m_creature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER); - m_creature->setFaction(FACTION_FRIENDLY); DoScriptText(SAY_SUMMON, m_creature); } - void UpdateAI(const uint32 diff) + void UpdateAI(const uint32 uiDiff) { - if (Faction_Timer) + if (m_uiFactionTimer) { - if (Faction_Timer <= diff) + if (m_uiFactionTimer <= uiDiff) { m_creature->setFaction(FACTION_HOSTILE); - Faction_Timer = 0; - }else Faction_Timer -= diff; + m_uiFactionTimer = 0; + } + else + m_uiFactionTimer -= uiDiff; } if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) @@ -89,17 +93,21 @@ struct MANGOS_DLL_DECL npc_aeranasAI : public ScriptedAI return; } - if (Shock_Timer < diff) + if (m_uiShockTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_SHOCK); - Shock_Timer = 10000; - }else Shock_Timer -= diff; + DoCastSpellIfCan(m_creature->getVictim(), SPELL_SHOCK); + m_uiShockTimer = 10000; + } + else + m_uiShockTimer -= uiDiff; - if (EnvelopingWinds_Timer < diff) + if (m_uiEnvelopingWindsTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_ENVELOPING_WINDS); - EnvelopingWinds_Timer = 25000; - }else EnvelopingWinds_Timer -= diff; + DoCastSpellIfCan(m_creature->getVictim(), SPELL_ENVELOPING_WINDS); + m_uiEnvelopingWindsTimer = 25000; + } + else + m_uiEnvelopingWindsTimer -= uiDiff; DoMeleeAttackIfReady(); } @@ -344,27 +352,33 @@ bool GossipSelect_npc_demoniac_scryer(Player* pPlayer, Creature* pCreature, uint ## npc_wounded_blood_elf ######*/ -#define SAY_ELF_START -1000117 -#define SAY_ELF_SUMMON1 -1000118 -#define SAY_ELF_RESTING -1000119 -#define SAY_ELF_SUMMON2 -1000120 -#define SAY_ELF_COMPLETE -1000121 -#define SAY_ELF_AGGRO -1000122 +enum +{ + SAY_ELF_START = -1000117, + SAY_ELF_SUMMON1 = -1000118, + SAY_ELF_RESTING = -1000119, + SAY_ELF_SUMMON2 = -1000120, + SAY_ELF_COMPLETE = -1000121, + SAY_ELF_AGGRO = -1000122, -#define QUEST_ROAD_TO_FALCON_WATCH 9375 + NPC_WINDWALKER = 16966, + NPC_TALONGUARD = 16967, + + QUEST_ROAD_TO_FALCON_WATCH = 9375, +}; struct MANGOS_DLL_DECL npc_wounded_blood_elfAI : public npc_escortAI { npc_wounded_blood_elfAI(Creature* pCreature) : npc_escortAI(pCreature) {Reset();} - void WaypointReached(uint32 i) + void WaypointReached(uint32 uiPointId) { Player* pPlayer = GetPlayerForEscort(); if (!pPlayer) return; - switch (i) + switch (uiPointId) { case 0: DoScriptText(SAY_ELF_START, m_creature, pPlayer); @@ -372,8 +386,8 @@ struct MANGOS_DLL_DECL npc_wounded_blood_elfAI : public npc_escortAI case 9: DoScriptText(SAY_ELF_SUMMON1, m_creature, pPlayer); // Spawn two Haal'eshi Talonguard - DoSpawnCreature(16967, -15, -15, 0, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); - DoSpawnCreature(16967, -17, -17, 0, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); + DoSpawnCreature(NPC_WINDWALKER, -15, -15, 0, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); + DoSpawnCreature(NPC_WINDWALKER, -17, -17, 0, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); break; case 13: DoScriptText(SAY_ELF_RESTING, m_creature, pPlayer); @@ -381,8 +395,8 @@ struct MANGOS_DLL_DECL npc_wounded_blood_elfAI : public npc_escortAI case 14: DoScriptText(SAY_ELF_SUMMON2, m_creature, pPlayer); // Spawn two Haal'eshi Windwalker - DoSpawnCreature(16966, -15, -15, 0, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); - DoSpawnCreature(16966, -17, -17, 0, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); + DoSpawnCreature(NPC_WINDWALKER, -15, -15, 0, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); + DoSpawnCreature(NPC_WINDWALKER, -17, -17, 0, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); break; case 27: DoScriptText(SAY_ELF_COMPLETE, m_creature, pPlayer); @@ -394,15 +408,15 @@ struct MANGOS_DLL_DECL npc_wounded_blood_elfAI : public npc_escortAI void Reset() { } - void Aggro(Unit* who) + void Aggro(Unit* pWho) { if (HasEscortState(STATE_ESCORT_ESCORTING)) DoScriptText(SAY_ELF_AGGRO, m_creature); } - void JustSummoned(Creature* summoned) + void JustSummoned(Creature* pSummoned) { - summoned->AI()->AttackStart(m_creature); + pSummoned->AI()->AttackStart(m_creature); } }; diff --git a/scripts/outland/nagrand.cpp b/scripts/outland/nagrand.cpp index 40c5ced22..d33dcc76e 100644 --- a/scripts/outland/nagrand.cpp +++ b/scripts/outland/nagrand.cpp @@ -64,9 +64,6 @@ struct MANGOS_DLL_DECL mob_lumpAI : public ScriptedAI { m_uiResetTimer = MINUTE*IN_MILLISECONDS; m_uiSpearThrowTimer = 2000; - - if (m_creature->getFaction() != m_creature->GetCreatureInfo()->faction_A) - m_creature->setFaction(m_creature->GetCreatureInfo()->faction_A); } void AttackedBy(Unit* pAttacker) @@ -91,7 +88,7 @@ struct MANGOS_DLL_DECL mob_lumpAI : public ScriptedAI m_creature->CombatStop(true); // should get unit_flags UNIT_FLAG_OOC_NOT_ATTACKABLE | UNIT_FLAG_PASSIVE at faction change, but unclear why/for what reason, skipped (no flags expected as default) - m_creature->setFaction(FACTION_FRIENDLY); + m_creature->SetFactionTemporary(FACTION_FRIENDLY, TEMPFACTION_RESTORE_REACH_HOME); m_creature->SetStandState(UNIT_STAND_STATE_SIT); DoScriptText(SAY_LUMP_DEFEAT, m_creature); diff --git a/scripts/outland/shadowmoon_valley.cpp b/scripts/outland/shadowmoon_valley.cpp index ab94119e3..eb612e534 100644 --- a/scripts/outland/shadowmoon_valley.cpp +++ b/scripts/outland/shadowmoon_valley.cpp @@ -49,10 +49,11 @@ enum SPELL_PLACE_CARCASS = 38439, SPELL_JUST_EATEN = 38502, SPELL_NETHER_BREATH = 38467, - POINT_ID = 1, QUEST_KINDNESS = 10804, - NPC_EVENT_PINGER = 22131 + NPC_EVENT_PINGER = 22131, + + GO_FLAYER_CARCASS = 185155, }; struct MANGOS_DLL_DECL mob_mature_netherwing_drakeAI : public ScriptedAI @@ -61,100 +62,89 @@ struct MANGOS_DLL_DECL mob_mature_netherwing_drakeAI : public ScriptedAI ObjectGuid m_playerGuid; - bool bCanEat; - bool bIsEating; - - uint32 EatTimer; - uint32 CastTimer; + uint32 m_uiEatTimer; + uint32 m_uiCreditTimer; + uint32 m_uiCastTimer; void Reset() { m_playerGuid.Clear(); - bCanEat = false; - bIsEating = false; - - EatTimer = 5000; - CastTimer = 5000; + m_uiEatTimer = 0; + m_uiCreditTimer = 0; + m_uiCastTimer = 5000; } void SpellHit(Unit* pCaster, SpellEntry const* pSpell) { - if (bCanEat || bIsEating) + if (m_uiEatTimer || m_uiCreditTimer) return; if (pCaster->GetTypeId() == TYPEID_PLAYER && pSpell->Id == SPELL_PLACE_CARCASS && !m_creature->HasAura(SPELL_JUST_EATEN)) { m_playerGuid = pCaster->GetObjectGuid(); - bCanEat = true; + m_uiEatTimer = 5000; } } - void MovementInform(uint32 type, uint32 id) + void MovementInform(uint32 uiMoveType, uint32 uiPointId) { - if (type != POINT_MOTION_TYPE) + if (uiMoveType != POINT_MOTION_TYPE) return; - if (id == POINT_ID) + if (uiPointId) { - bIsEating = true; - EatTimer = 7000; + m_uiCreditTimer = 7000; + m_creature->SetLevitate(false); m_creature->HandleEmote(EMOTE_ONESHOT_ATTACKUNARMED); + m_creature->RemoveByteFlag(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_UNK_2); } } - void UpdateAI(const uint32 diff) + void UpdateAI(const uint32 uiDiff) { - if (bCanEat || bIsEating) + if (m_uiEatTimer) { - if (EatTimer < diff) + if (m_uiEatTimer <= uiDiff) { - if (bCanEat && !bIsEating) + if (GameObject* pGo = GetClosestGameObjectWithEntry(m_creature, GO_FLAYER_CARCASS, 80.0f)) { - if (Player* pPlayer = m_creature->GetMap()->GetPlayer(m_playerGuid)) - { - GameObject* pGo = pPlayer->GetGameObject(SPELL_PLACE_CARCASS); - - // Workaround for broken function GetGameObject - if (!pGo) - { - const SpellEntry* pSpell = GetSpellStore()->LookupEntry(SPELL_PLACE_CARCASS); + if (m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() == WAYPOINT_MOTION_TYPE) + m_creature->GetMotionMaster()->MovementExpired(); - uint32 uiGameobjectEntry = pSpell->EffectMiscValue[EFFECT_INDEX_0]; + m_creature->GetMotionMaster()->MoveIdle(); - pGo = GetClosestGameObjectWithEntry(pPlayer, uiGameobjectEntry, 2*INTERACTION_DISTANCE); - } - - if (pGo) - { - if (m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() == WAYPOINT_MOTION_TYPE) - m_creature->GetMotionMaster()->MovementExpired(); + float fX, fY, fZ; + pGo->GetContactPoint(m_creature, fX, fY, fZ, CONTACT_DISTANCE); - m_creature->GetMotionMaster()->MoveIdle(); - m_creature->StopMoving(); + m_creature->GetMotionMaster()->MovePoint(1, fX, fY, fZ); + } + m_uiEatTimer = 0; + } + else + m_uiEatTimer -= uiDiff; - float fX, fY, fZ; - pGo->GetContactPoint(m_creature, fX, fY, fZ, CONTACT_DISTANCE); + return; + } - m_creature->GetMotionMaster()->MovePoint(POINT_ID, fX, fY, fZ); - } - } - bCanEat = false; - } - else if (bIsEating) - { - DoCastSpellIfCan(m_creature, SPELL_JUST_EATEN); - DoScriptText(SAY_JUST_EATEN, m_creature); + if (m_uiCreditTimer) + { + if (m_uiCreditTimer <= uiDiff) + { + DoCastSpellIfCan(m_creature, SPELL_JUST_EATEN); + DoScriptText(SAY_JUST_EATEN, m_creature); - if (Player* pPlayer = m_creature->GetMap()->GetPlayer(m_playerGuid)) - pPlayer->KilledMonsterCredit(NPC_EVENT_PINGER, m_creature->GetObjectGuid()); + if (Player* pPlayer = m_creature->GetMap()->GetPlayer(m_playerGuid)) + pPlayer->KilledMonsterCredit(NPC_EVENT_PINGER, m_creature->GetObjectGuid()); - Reset(); - m_creature->GetMotionMaster()->Clear(); - } + Reset(); + m_creature->SetLevitate(true); + m_creature->SetByteFlag(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_UNK_2); + m_creature->GetMotionMaster()->Clear(); + m_uiCreditTimer = 0; } else - EatTimer -= diff; + m_uiCreditTimer -= uiDiff; return; } @@ -162,11 +152,13 @@ struct MANGOS_DLL_DECL mob_mature_netherwing_drakeAI : public ScriptedAI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - if (CastTimer < diff) + if (m_uiCastTimer < uiDiff) { DoCastSpellIfCan(m_creature->getVictim(), SPELL_NETHER_BREATH); - CastTimer = 5000; - }else CastTimer -= diff; + m_uiCastTimer = 5000; + } + else + m_uiCastTimer -= uiDiff; DoMeleeAttackIfReady(); } @@ -183,7 +175,6 @@ CreatureAI* GetAI_mob_mature_netherwing_drake(Creature* pCreature) enum { - FACTION_DEFAULT = 62, FACTION_FRIENDLY = 1840, // Not sure if this is correct, it was taken off of Mordenai. SPELL_HIT_FORCE_OF_NELTHARAKU = 38762, @@ -198,32 +189,25 @@ struct MANGOS_DLL_DECL mob_enslaved_netherwing_drakeAI : public ScriptedAI { mob_enslaved_netherwing_drakeAI(Creature* pCreature) : ScriptedAI(pCreature) { - Tapped = false; + m_uiFlyTimer = 0; Reset(); } ObjectGuid m_playerGuid; - uint32 FlyTimer; - bool Tapped; - - void Reset() - { - if (!Tapped) - m_creature->setFaction(FACTION_DEFAULT); + uint32 m_uiFlyTimer; - FlyTimer = 2500; - } + void Reset() { } void SpellHit(Unit* pCaster, const SpellEntry* pSpell) { - if (pSpell->Id == SPELL_HIT_FORCE_OF_NELTHARAKU && !Tapped) + if (pSpell->Id == SPELL_HIT_FORCE_OF_NELTHARAKU && !m_uiFlyTimer) { if (Player* pPlayer = pCaster->GetCharmerOrOwnerPlayerOrPlayerItself()) { - Tapped = true; + m_uiFlyTimer = 2500; m_playerGuid = pPlayer->GetObjectGuid(); - m_creature->setFaction(FACTION_FRIENDLY); + m_creature->SetFactionTemporary(FACTION_FRIENDLY, TEMPFACTION_RESTORE_RESPAWN); if (Creature* pDragonmaw = GetClosestCreatureWithEntry(m_creature, NPC_DRAGONMAW_SUBJUGATOR, 50.0f)) AttackStart(pDragonmaw); @@ -231,25 +215,23 @@ struct MANGOS_DLL_DECL mob_enslaved_netherwing_drakeAI : public ScriptedAI } } - void MovementInform(uint32 type, uint32 id) + void MovementInform(uint32 uiMoveType, uint32 uiPointId) { - if (type != POINT_MOTION_TYPE) + if (uiMoveType != POINT_MOTION_TYPE) return; - if (id == 1) + if (uiPointId) m_creature->ForcedDespawn(); } - void UpdateAI(const uint32 diff) + void UpdateAI(const uint32 uiDiff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) { - if (Tapped) + if (m_uiFlyTimer) { - if (FlyTimer <= diff) + if (m_uiFlyTimer <= uiDiff) { - Tapped = false; - if (Player* pPlayer = m_creature->GetMap()->GetPlayer(m_playerGuid)) { if (pPlayer->GetQuestStatus(QUEST_FORCE_OF_NELT) == QUEST_STATUS_INCOMPLETE) @@ -257,23 +239,26 @@ struct MANGOS_DLL_DECL mob_enslaved_netherwing_drakeAI : public ScriptedAI DoCastSpellIfCan(pPlayer, SPELL_FORCE_OF_NELTHARAKU, CAST_TRIGGERED); m_playerGuid.Clear(); - float dx, dy, dz; + float fX, fY, fZ; - if (Creature* EscapeDummy = GetClosestCreatureWithEntry(m_creature, NPC_ESCAPE_DUMMY, 30.0f)) - EscapeDummy->GetPosition(dx, dy, dz); + // Get an escape position + if (Creature* pEscapeDummy = GetClosestCreatureWithEntry(m_creature, NPC_ESCAPE_DUMMY, 50.0f)) + pEscapeDummy->GetPosition(fX, fY, fZ); else { - m_creature->GetRandomPoint(m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), 20, dx, dy, dz); - dz += 25; + m_creature->GetRandomPoint(m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), 20.0f, fX, fY, fZ); + fZ += 25; } - m_creature->GetMotionMaster()->MovePoint(1, dx, dy, dz); + m_creature->GetMotionMaster()->MovePoint(1, fX, fY, fZ); } } + m_uiFlyTimer = 0; } else - FlyTimer -= diff; + m_uiFlyTimer -= uiDiff; } + return; } diff --git a/scripts/outland/shattrath_city.cpp b/scripts/outland/shattrath_city.cpp index e1dbc7c6a..e2a0b3780 100644 --- a/scripts/outland/shattrath_city.cpp +++ b/scripts/outland/shattrath_city.cpp @@ -549,49 +549,55 @@ CreatureAI* GetAI_npc_khadgars_servant(Creature* pCreature) # npc_salsalabim ######*/ -#define FACTION_HOSTILE_SA 90 -#define FACTION_FRIENDLY_SA 35 -#define QUEST_10004 10004 +enum +{ + FACTION_HOSTILE_SA = 90, + QUEST_10004 = 10004, -#define SPELL_MAGNETIC_PULL 31705 + SPELL_MAGNETIC_PULL = 31705, +}; struct MANGOS_DLL_DECL npc_salsalabimAI : public ScriptedAI { npc_salsalabimAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } - uint32 MagneticPull_Timer; + uint32 m_uiMagneticPullTimer; void Reset() { - MagneticPull_Timer = 15000; - m_creature->setFaction(FACTION_FRIENDLY_SA); + m_uiMagneticPullTimer = 15000; } - void DamageTaken(Unit *done_by, uint32 &damage) + void DamageTaken(Unit* pDoneBy, uint32 &uiDamage) { - if (done_by->GetTypeId() == TYPEID_PLAYER) - if ((m_creature->GetHealth()-damage)*100 / m_creature->GetMaxHealth() < 20) + if (pDoneBy->GetTypeId() == TYPEID_PLAYER) { - ((Player*)done_by)->GroupEventHappens(QUEST_10004,m_creature); - damage = 0; - EnterEvadeMode(); + if (m_creature->GetHealthPercent() < 20.0f) + { + ((Player*)pDoneBy)->GroupEventHappens(QUEST_10004,m_creature); + uiDamage = 0; + EnterEvadeMode(); + } } } - void UpdateAI(const uint32 diff) + void UpdateAI(const uint32 uiDiff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - if (MagneticPull_Timer < diff) + if (m_uiMagneticPullTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_MAGNETIC_PULL); - MagneticPull_Timer = 15000; - }else MagneticPull_Timer -= diff; + DoCastSpellIfCan(m_creature->getVictim(), SPELL_MAGNETIC_PULL); + m_uiMagneticPullTimer = 15000; + } + else + m_uiMagneticPullTimer -= uiDiff; DoMeleeAttackIfReady(); } }; + CreatureAI* GetAI_npc_salsalabim(Creature* pCreature) { return new npc_salsalabimAI(pCreature); @@ -601,15 +607,17 @@ bool GossipHello_npc_salsalabim(Player* pPlayer, Creature* pCreature) { if (pPlayer->GetQuestStatus(QUEST_10004) == QUEST_STATUS_INCOMPLETE) { - pCreature->setFaction(FACTION_HOSTILE_SA); + pCreature->SetFactionTemporary(FACTION_HOSTILE_SA, TEMPFACTION_RESTORE_REACH_HOME); pCreature->AI()->AttackStart(pPlayer); } else { if (pCreature->isQuestGiver()) pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); } + return true; } diff --git a/scripts/outland/terokkar_forest.cpp b/scripts/outland/terokkar_forest.cpp index e8938441d..7d056c56b 100644 --- a/scripts/outland/terokkar_forest.cpp +++ b/scripts/outland/terokkar_forest.cpp @@ -50,12 +50,10 @@ enum { SAY_SUBMIT = -1000194, - FACTION_HOSTILE = 45, FACTION_FRIENDLY = 35, - QUEST_DONT_KILL_THE_FAT_ONE = 9889, SPELL_PULVERIZE = 2676, - // SPELL_QUID9889 = 32174, // TODO Make use of this quest-credit spell + SPELL_QUID9889 = 32174, }; struct MANGOS_DLL_DECL mob_unkor_the_ruthlessAI : public ScriptedAI @@ -65,20 +63,21 @@ struct MANGOS_DLL_DECL mob_unkor_the_ruthlessAI : public ScriptedAI bool m_bCanDoQuest; uint32 m_uiUnfriendlyTimer; uint32 m_uiPulverizeTimer; + uint32 m_uiFriendlyTimer; void Reset() { - m_bCanDoQuest = false; + m_bCanDoQuest = false; m_uiUnfriendlyTimer = 0; - m_uiPulverizeTimer = 3000; + m_uiFriendlyTimer = 0; + m_uiPulverizeTimer = 3000; m_creature->SetStandState(UNIT_STAND_STATE_STAND); - m_creature->setFaction(FACTION_HOSTILE); } void DoNice() { DoScriptText(SAY_SUBMIT, m_creature); - m_creature->setFaction(FACTION_FRIENDLY); + m_creature->SetFactionTemporary(FACTION_FRIENDLY, TEMPFACTION_RESTORE_REACH_HOME); m_creature->SetStandState(UNIT_STAND_STATE_SIT); m_creature->RemoveAllAuras(); m_creature->DeleteThreatList(); @@ -86,58 +85,40 @@ struct MANGOS_DLL_DECL mob_unkor_the_ruthlessAI : public ScriptedAI m_uiUnfriendlyTimer = 60000; } - void DamageTaken(Unit* pDealer, uint32 &uiDamage) + void UpdateAI(const uint32 uiDiff) { - if ((m_creature->GetHealth() - uiDamage)*100 / m_creature->GetMaxHealth() >= 30) + // Reset npc on timer + if (m_uiUnfriendlyTimer) + { + if (m_uiUnfriendlyTimer <= uiDiff) + EnterEvadeMode(); + else + m_uiUnfriendlyTimer -= uiDiff; + } + + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - if (Player* pPlayer = pDealer->GetCharmerOrOwnerPlayerOrPlayerItself()) + // Do quest kill credit at 30% + if (!m_bCanDoQuest && m_creature->GetHealthPercent() < 30.0f) { - if (Group* pGroup = pPlayer->GetGroup()) - { - for(GroupReference* itr = pGroup->GetFirstMember(); itr != NULL; itr = itr->next()) - { - Player* pGroupie = itr->getSource(); - if (pGroupie && - pGroupie->GetQuestStatus(QUEST_DONT_KILL_THE_FAT_ONE) == QUEST_STATUS_INCOMPLETE && - pGroupie->GetReqKillOrCastCurrentCount(QUEST_DONT_KILL_THE_FAT_ONE, 18260) == 10) - { - pGroupie->AreaExploredOrEventHappens(QUEST_DONT_KILL_THE_FAT_ONE); - if (!m_bCanDoQuest) - m_bCanDoQuest = true; - } - } - } - else if (pPlayer->GetQuestStatus(QUEST_DONT_KILL_THE_FAT_ONE) == QUEST_STATUS_INCOMPLETE && - pPlayer->GetReqKillOrCastCurrentCount(QUEST_DONT_KILL_THE_FAT_ONE, 18260) == 10) - { - pPlayer->AreaExploredOrEventHappens(QUEST_DONT_KILL_THE_FAT_ONE); - m_bCanDoQuest = true; - } + DoCastSpellIfCan(m_creature, SPELL_QUID9889, CAST_TRIGGERED); + m_uiFriendlyTimer = 1000; + m_bCanDoQuest = true; } - } - void UpdateAI(const uint32 uiDiff) - { - if (m_bCanDoQuest) + // Set faction right after the spell is casted, in order to avoid any issues + if (m_uiFriendlyTimer) { - if (!m_uiUnfriendlyTimer) + if (m_uiFriendlyTimer <= uiDiff) { - //DoCastSpellIfCan(m_creature,SPELL_QUID9889); //not using spell for now DoNice(); + m_uiFriendlyTimer = 0; } else - { - if (m_uiUnfriendlyTimer <= uiDiff) - EnterEvadeMode(); - else - m_uiUnfriendlyTimer -= uiDiff; - } + m_uiFriendlyTimer -= uiDiff; } - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - if (m_uiPulverizeTimer < uiDiff) { DoCastSpellIfCan(m_creature, SPELL_PULVERIZE); @@ -229,6 +210,7 @@ const uint32 netherwebVictims[6] = { 18470, 16805, 21242, 18452, 22482, 21285 }; + struct MANGOS_DLL_DECL mob_netherweb_victimAI : public ScriptedAI { mob_netherweb_victimAI(Creature* pCreature) : ScriptedAI(pCreature) diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 06dd9bd1f..c695ff00d 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2641" + #define SD2_REVISION_NR "2642" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index c151f1a85..eb6e96470 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -4056,7 +4056,7 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1649073,'%s emerges from the ground!',0,3,0,0,'anubarak EMOTE_EMERGE'), (-1649074,'%s unleashes a Leeching Swarm to heal himself!',0,3,0,0,'anubarak EMOTE_SWARM'), -(-1649075,'Champions, you\'re alive! Not only have you defeated every challenge of the Trial of the Crusader, but also thwarted Arthas' plans! Your skill and cunning will prove to be a powerful weapon against the Scourge. Well done! Allow one of the Crusade's mages to transport you to the surface!',0,0,0,1,'tirion SAY_EPILOGUE'); +(-1649075,'Champions, you\'re alive! Not only have you defeated every challenge of the Trial of the Crusader, but also thwarted Arthas\' plans! Your skill and cunning will prove to be a powerful weapon against the Scourge. Well done! Allow one of the Crusade\'s mages to transport you to the surface!',0,0,0,1,'tirion SAY_EPILOGUE'); -- -1 650 000 TRIAL OF THE CHAMPION From f7c0b4b0812dc70c31475bf177b808d9865abe4b Mon Sep 17 00:00:00 2001 From: Xfurry Date: Thu, 19 Jul 2012 10:15:55 +0300 Subject: [PATCH 0631/1172] [2643] Fix Arcane Overload for Malygos - Thanks Reamer for pointing --- .../northrend/nexus/eye_of_eternity/boss_malygos.cpp | 12 +++++------- sd2_revision_nr.h | 2 +- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/scripts/northrend/nexus/eye_of_eternity/boss_malygos.cpp b/scripts/northrend/nexus/eye_of_eternity/boss_malygos.cpp index b5ca2deb1..a5e4ad216 100644 --- a/scripts/northrend/nexus/eye_of_eternity/boss_malygos.cpp +++ b/scripts/northrend/nexus/eye_of_eternity/boss_malygos.cpp @@ -70,6 +70,7 @@ enum SPELL_ARCANE_STORM = 57459, // related to spell 61693 SPELL_ARCANE_STORM_H = 61694, SPELL_SUMMON_ARCANE_BOMB = 56429, + SPELL_ARCANE_BOMB = 56430, // triggers 56432 and 56431 on target hit SPELL_SURGE_OF_POWER_PULSE = 56505, // deep breath spell //SPELL_ARCANE_PULSE = 57432, // purpose unk @@ -95,8 +96,9 @@ enum SPELL_VORTEX_VISUAL = 55873, SPELL_VORTEX_CHANNEL = 56237, - // arcane overload - SPELL_ARCANE_OVERLOAD = 56432, + // arcane overload - handled in core + //SPELL_ARCANE_OVERLOAD = 56432, + //SPELL_ARCANE_BOMB_DAMAGE = 56431, // static field SPELL_STATIC_FIELD = 57428, @@ -174,7 +176,6 @@ struct MANGOS_DLL_DECL boss_malygosAI : public ScriptedAI, private DialogueHelpe uint8 m_uiMaxNexusLords; uint8 m_uiMaxScions; uint8 m_uiAddsDeadCount; - uint8 m_uiCurrentWaypoint; uint8 m_uiMaxStaticFieldTargets; uint32 m_uiBerserkTimer; @@ -185,7 +186,6 @@ struct MANGOS_DLL_DECL boss_malygosAI : public ScriptedAI, private DialogueHelpe uint32 m_uiArcanePulseTimer; uint32 m_uiOverloadTimer; uint32 m_uiArcaneStormTimer; - uint32 m_uiWaypointTimer; uint32 m_uiStaticFieldTimer; uint32 m_uiSurgeOfPowerTimer; @@ -202,9 +202,7 @@ struct MANGOS_DLL_DECL boss_malygosAI : public ScriptedAI, private DialogueHelpe m_uiArcanePulseTimer = 60000; m_uiOverloadTimer = 1000; m_uiArcaneStormTimer = 15000; - m_uiWaypointTimer = 15000; m_uiAddsDeadCount = 0; - m_uiCurrentWaypoint = 0; m_uiStaticFieldTimer = 15000; m_uiSurgeOfPowerTimer = 30000; @@ -302,7 +300,7 @@ struct MANGOS_DLL_DECL boss_malygosAI : public ScriptedAI, private DialogueHelpe pSummoned->GetMotionMaster()->MoveFollow(m_creature, 0, 0); break; case NPC_ARCANE_OVERLOAD: - pSummoned->CastSpell(pSummoned, SPELL_ARCANE_OVERLOAD, false); + DoCastSpellIfCan(pSummoned, SPELL_ARCANE_BOMB, CAST_TRIGGERED); break; case NPC_STATIC_FIELD: pSummoned->CastSpell(pSummoned, SPELL_STATIC_FIELD, false); diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index c695ff00d..7484a8b48 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2642" + #define SD2_REVISION_NR "2643" #endif // __SD2_REVISION_NR_H__ From eb2e3c1956cd182f1649da68c8971b70071b7f28 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Thu, 19 Jul 2012 13:46:47 +0200 Subject: [PATCH 0632/1172] [2644] Fix compile. Thanks to Jethro (dbauz) for pointing. Also fix a warning for Anub'Arak. On long term using DBCStores in sc_creature.h should be removed, and actually we should not require to use the whole storages at all. A wrapped up Lookup command for the stores should be enough --- include/sc_creature.h | 1 + .../trial_of_the_crusader/boss_anubarak_trial.cpp | 2 -- sd2_revision_nr.h | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/include/sc_creature.h b/include/sc_creature.h index e5eb5075e..c386eb4ea 100644 --- a/include/sc_creature.h +++ b/include/sc_creature.h @@ -6,6 +6,7 @@ #define SC_CREATURE_H #include "Chat.h" +#include "DBCStores.h" // Mostly only used the Lookup acces, but a few cases really do use the DBC-Stores //Spell targets used by SelectSpell enum SelectTarget diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp index f54e4fe6c..346a6bfcb 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp @@ -245,8 +245,6 @@ struct MANGOS_DLL_DECL boss_anubarak_trialAI : public ScriptedAI // Wrapper to refresh frost spheres - it's not very clear how ofter should this happen void DoRefreshSpheres() { - uint8 uiNewSpheres = 0; - for (uint8 i = 0; i < MAX_FROSTSPHERES; ++i) { // If the sphere is alive and hasn't transfomed to permafrost yet summon a new one diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 7484a8b48..d8f19fe9e 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2643" + #define SD2_REVISION_NR "2644" #endif // __SD2_REVISION_NR_H__ From 2156ecadf772281396512b5f762ee2da977929d2 Mon Sep 17 00:00:00 2001 From: Reamer Date: Thu, 19 Jul 2012 23:00:42 +0300 Subject: [PATCH 0633/1172] [2645] Cleanup for The Curator and The Maiden of Virtue - Karazhan Signed-off-by: Xfurry --- .../karazhan/boss_curator.cpp | 73 +++++++++---------- .../karazhan/boss_maiden_of_virtue.cpp | 71 +++++++----------- sd2_revision_nr.h | 2 +- 3 files changed, 62 insertions(+), 84 deletions(-) diff --git a/scripts/eastern_kingdoms/karazhan/boss_curator.cpp b/scripts/eastern_kingdoms/karazhan/boss_curator.cpp index 90f39a888..b1524ee16 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_curator.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_curator.cpp @@ -16,7 +16,7 @@ /* ScriptData SDName: Boss_Curator -SD%Complete: 80% +SD%Complete: 90% SDComment: SDCategory: Karazhan EndScriptData */ @@ -37,11 +37,12 @@ enum // Flare NPC_ASTRAL_FLARE = 17096, SPELL_ASTRAL_FLARE_PASSIVE = 30234, + SPELL_ASTRAL_FLARE_VISUAL = 30237, // The Curator SPELL_HATEFUL_BOLT = 30383, SPELL_EVOCATION = 30254, - SPELL_ENRAGE = 30403, + SPELL_ARCANE_INFUSION = 30403, SPELL_BERSERK = 26662 }; @@ -53,16 +54,14 @@ struct MANGOS_DLL_DECL boss_curatorAI : public ScriptedAI uint32 m_uiHatefulBoltTimer; uint32 m_uiBerserkTimer; - bool m_bIsBerserk; bool m_bIsEnraged; void Reset() { - m_uiFlareTimer = 10000; + m_uiFlareTimer = 10000; m_uiHatefulBoltTimer = 15000; // This time may be wrong - m_uiBerserkTimer = 12*MINUTE*IN_MILLISECONDS; - m_bIsBerserk = false; - m_bIsEnraged = false; + m_uiBerserkTimer = 10*MINUTE*IN_MILLISECONDS; + m_bIsEnraged = false; m_creature->ApplySpellImmune(0, IMMUNITY_DAMAGE, SPELL_SCHOOL_MASK_ARCANE, true); } @@ -86,16 +85,13 @@ struct MANGOS_DLL_DECL boss_curatorAI : public ScriptedAI { if (pSummoned->GetEntry() == NPC_ASTRAL_FLARE) { - // Flare start with agro on it's target, should be immune to arcane - pSummoned->CastSpell(pSummoned, SPELL_ASTRAL_FLARE_PASSIVE, false); + // Flare start with aggro on it's target, should be immune to arcane + pSummoned->CastSpell(pSummoned, SPELL_ASTRAL_FLARE_PASSIVE, true); + pSummoned->CastSpell(pSummoned, SPELL_ASTRAL_FLARE_VISUAL, true); pSummoned->ApplySpellImmune(0, IMMUNITY_DAMAGE, SPELL_SCHOOL_MASK_ARCANE, true); - if (m_creature->getVictim()) - { - Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1); - - pSummoned->AddThreat(pTarget ? pTarget : m_creature->getVictim(), 1000.0f); - } + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + pSummoned->AI()->AttackStart(pTarget); } } @@ -105,13 +101,12 @@ struct MANGOS_DLL_DECL boss_curatorAI : public ScriptedAI return; // always decrease BerserkTimer - if (!m_bIsBerserk) + if (m_uiBerserkTimer) { - if (m_uiBerserkTimer < uiDiff) + if (m_uiBerserkTimer <= uiDiff) { - // break evocation if we are under it's effect - if (m_creature->HasAura(SPELL_EVOCATION)) - m_creature->RemoveAurasDueToSpell(SPELL_EVOCATION); + // Also interrupt evocation + m_creature->RemoveAurasDueToSpell(SPELL_EVOCATION); if (DoCastSpellIfCan(m_creature, SPELL_BERSERK, CAST_INTERRUPT_PREVIOUS) == CAST_OK) { @@ -119,7 +114,7 @@ struct MANGOS_DLL_DECL boss_curatorAI : public ScriptedAI DoScriptText(SAY_ENRAGE, m_creature); // don't know if he's supposed to do summon/evocate after hard enrage (probably not) - m_bIsBerserk = true; + m_uiBerserkTimer = 0; } } else @@ -130,14 +125,16 @@ struct MANGOS_DLL_DECL boss_curatorAI : public ScriptedAI if (m_creature->HasAura(SPELL_EVOCATION)) return; - if (!m_bIsEnraged && !m_bIsBerserk) + if (!m_bIsEnraged) { if (m_uiFlareTimer < uiDiff) { m_uiFlareTimer = 10000; // summon Astral Flare - DoSpawnCreature(NPC_ASTRAL_FLARE, rand()%37, rand()%37, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); + float fX, fY, fZ; + m_creature->GetRandomPoint(m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), 10.0f, fX, fY, fZ); + m_creature->SummonCreature(NPC_ASTRAL_FLARE, fX, fY, fZ, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); // reduce mana by 10% of maximum if (int32 iMana = m_creature->GetMaxPower(POWER_MANA)) @@ -147,15 +144,12 @@ struct MANGOS_DLL_DECL boss_curatorAI : public ScriptedAI //if this get's us below 10%, then we evocate (the 10th should be summoned now if (m_creature->GetPower(POWER_MANA)*10 < m_creature->GetMaxPower(POWER_MANA)) { - DoScriptText(SAY_EVOCATE, m_creature); - - if (m_creature->IsNonMeleeSpellCasted(false)) - m_creature->InterruptNonMeleeSpells(false); - - m_creature->CastSpell(m_creature, SPELL_EVOCATION, false); - - //this small delay should make first flare appear fast after evocate, and also prevent possible spawn flood - m_uiFlareTimer = 1000; + if (DoCastSpellIfCan(m_creature, SPELL_EVOCATION, CAST_INTERRUPT_PREVIOUS) == CAST_OK) + { + DoScriptText(SAY_EVOCATE, m_creature); + //this small delay should make first flare appear fast after evocate, and also prevent possible spawn flood + m_uiFlareTimer = 1000; + } return; } else @@ -173,11 +167,13 @@ struct MANGOS_DLL_DECL boss_curatorAI : public ScriptedAI if (m_creature->GetHealthPercent() < 15.0f) { - if (!m_creature->IsNonMeleeSpellCasted(false)) + // Also stop evocation + m_creature->RemoveAurasDueToSpell(SPELL_EVOCATION); + + if (DoCastSpellIfCan(m_creature, SPELL_ARCANE_INFUSION, CAST_INTERRUPT_PREVIOUS) == CAST_OK) { - m_bIsEnraged = true; DoScriptText(SAY_ENRAGE, m_creature); - DoCastSpellIfCan(m_creature, SPELL_ENRAGE); + m_bIsEnraged = true; } } } @@ -185,9 +181,10 @@ struct MANGOS_DLL_DECL boss_curatorAI : public ScriptedAI if (m_uiHatefulBoltTimer < uiDiff) { if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_TOPAGGRO, 1)) - m_creature->CastSpell(pTarget, SPELL_HATEFUL_BOLT, false); - - m_uiHatefulBoltTimer = m_bIsEnraged ? 7000 : 15000; + { + if (DoCastSpellIfCan(pTarget, SPELL_HATEFUL_BOLT) == CAST_OK) + m_uiHatefulBoltTimer = m_bIsEnraged ? 7000 : 15000; + } } else m_uiHatefulBoltTimer -= uiDiff; diff --git a/scripts/eastern_kingdoms/karazhan/boss_maiden_of_virtue.cpp b/scripts/eastern_kingdoms/karazhan/boss_maiden_of_virtue.cpp index aaf9e5e33..625a75f49 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_maiden_of_virtue.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_maiden_of_virtue.cpp @@ -43,17 +43,17 @@ struct MANGOS_DLL_DECL boss_maiden_of_virtueAI : public ScriptedAI { boss_maiden_of_virtueAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} - uint32 m_uiRepentance_Timer; - uint32 m_uiHolyfire_Timer; - uint32 m_uiHolywrath_Timer; - uint32 m_uiHolyground_Timer; + uint32 m_uiRepentanceTimer; + uint32 m_uiHolyfireTimer; + uint32 m_uiHolywrathTimer; + uint32 m_uiHolygroundTimer; void Reset() { - m_uiRepentance_Timer = urand(25000, 40000); - m_uiHolyfire_Timer = urand(8000, 25000); - m_uiHolywrath_Timer = urand(15000, 25000); - m_uiHolyground_Timer = 3000; + m_uiRepentanceTimer = urand(25000, 40000); + m_uiHolyfireTimer = urand(8000, 25000); + m_uiHolywrathTimer = urand(15000, 25000); + m_uiHolygroundTimer = 3000; } void KilledUnit(Unit* pVictim) @@ -71,7 +71,7 @@ struct MANGOS_DLL_DECL boss_maiden_of_virtueAI : public ScriptedAI DoScriptText(SAY_DEATH, m_creature); } - void Aggro(Unit *pWho) + void Aggro(Unit* pWho) { DoScriptText(SAY_AGGRO, m_creature); } @@ -81,64 +81,45 @@ struct MANGOS_DLL_DECL boss_maiden_of_virtueAI : public ScriptedAI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - if (m_uiHolyground_Timer < uiDiff) + if (m_uiHolygroundTimer < uiDiff) { - DoCastSpellIfCan(m_creature, SPELL_HOLYGROUND, CAST_TRIGGERED); //Triggered so it doesn't interrupt her at all - m_uiHolyground_Timer = 3000; + if (DoCastSpellIfCan(m_creature, SPELL_HOLYGROUND, CAST_TRIGGERED) == CAST_OK) + m_uiHolygroundTimer = 3000; } else - m_uiHolyground_Timer -= uiDiff; + m_uiHolygroundTimer -= uiDiff; - if (m_uiRepentance_Timer < uiDiff) + if (m_uiRepentanceTimer < uiDiff) { - if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_REPENTANCE) == CAST_OK) + if (DoCastSpellIfCan(m_creature, SPELL_REPENTANCE) == CAST_OK) { DoScriptText(urand(0, 1) ? SAY_REPENTANCE1 : SAY_REPENTANCE2, m_creature); - - //A little randomness on that spell - m_uiRepentance_Timer = urand(25000, 35000); + m_uiRepentanceTimer = urand(25000, 35000); } } else - m_uiRepentance_Timer -= uiDiff; + m_uiRepentanceTimer -= uiDiff; - if (m_uiHolyfire_Timer < uiDiff) + if (m_uiHolyfireTimer < uiDiff) { - //Time for an omgwtfpwn code to make maiden cast holy fire only on units outside the holy ground's 18 yard range - Unit* pTarget = NULL; - std::vector target_list; - - ThreatList const& tList = m_creature->getThreatManager().getThreatList(); - for (ThreatList::const_iterator itr = tList.begin();itr != tList.end(); ++itr) - { - pTarget = m_creature->GetMap()->GetUnit((*itr)->getUnitGuid()); - - if (pTarget && !pTarget->IsWithinDist(m_creature, 12.0f, false)) - target_list.push_back(pTarget); - - pTarget = NULL; - } - - if (target_list.size()) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0, SPELL_HOLYFIRE, SELECT_FLAG_NOT_IN_MELEE_RANGE)) { - if (pTarget = *(target_list.begin()+rand()%target_list.size())) - DoCastSpellIfCan(pTarget,SPELL_HOLYFIRE); + if (DoCastSpellIfCan(pTarget, SPELL_HOLYFIRE) == CAST_OK) + m_uiHolyfireTimer = urand(8000, 23000); } - - m_uiHolyfire_Timer = urand(8000, 23000); //Anywhere from 8 to 23 seconds, good luck having several of those in a row! } else - m_uiHolyfire_Timer -= uiDiff; + m_uiHolyfireTimer -= uiDiff; - if (m_uiHolywrath_Timer < uiDiff) + if (m_uiHolywrathTimer < uiDiff) { - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) DoCastSpellIfCan(pTarget, SPELL_HOLYWRATH); - m_uiHolywrath_Timer = urand(20000, 25000); //20-25 secs sounds nice + m_uiHolywrathTimer = urand(20000, 25000); } else - m_uiHolywrath_Timer -= uiDiff; + m_uiHolywrathTimer -= uiDiff; DoMeleeAttackIfReady(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index d8f19fe9e..48793a7b0 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2644" + #define SD2_REVISION_NR "2645" #endif // __SD2_REVISION_NR_H__ From abea6edac764f01f62a89275dd283302128ded62 Mon Sep 17 00:00:00 2001 From: Reamer Date: Fri, 20 Jul 2012 11:03:44 +0300 Subject: [PATCH 0634/1172] [2646] Cleanup and improve Moroes - Karazhan Also add instance data to Curator and Maiden of Virtue Patch improved by Xfurry Signed-off-by: Xfurry --- .../karazhan/boss_curator.cpp | 21 +- .../karazhan/boss_maiden_of_virtue.cpp | 21 +- .../eastern_kingdoms/karazhan/boss_moroes.cpp | 402 +++++++----------- .../karazhan/instance_karazhan.cpp | 6 + scripts/eastern_kingdoms/karazhan/karazhan.h | 8 + sd2_revision_nr.h | 2 +- 6 files changed, 205 insertions(+), 255 deletions(-) diff --git a/scripts/eastern_kingdoms/karazhan/boss_curator.cpp b/scripts/eastern_kingdoms/karazhan/boss_curator.cpp index b1524ee16..cfc9e1525 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_curator.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_curator.cpp @@ -22,6 +22,7 @@ SDCategory: Karazhan EndScriptData */ #include "precompiled.h" +#include "karazhan.h" enum { @@ -48,7 +49,13 @@ enum struct MANGOS_DLL_DECL boss_curatorAI : public ScriptedAI { - boss_curatorAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + boss_curatorAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; uint32 m_uiFlareTimer; uint32 m_uiHatefulBoltTimer; @@ -74,11 +81,23 @@ struct MANGOS_DLL_DECL boss_curatorAI : public ScriptedAI void JustDied(Unit* pKiller) { DoScriptText(SAY_DEATH, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_CURATOR, DONE); } void Aggro(Unit* pWho) { DoScriptText(SAY_AGGRO, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_CURATOR, IN_PROGRESS); + } + + void JustReachedHome() + { + if (m_pInstance) + m_pInstance->SetData(TYPE_CURATOR, FAIL); } void JustSummoned(Creature* pSummoned) diff --git a/scripts/eastern_kingdoms/karazhan/boss_maiden_of_virtue.cpp b/scripts/eastern_kingdoms/karazhan/boss_maiden_of_virtue.cpp index 625a75f49..cf04c4e08 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_maiden_of_virtue.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_maiden_of_virtue.cpp @@ -22,6 +22,7 @@ SDCategory: Karazhan EndScriptData */ #include "precompiled.h" +#include "karazhan.h" enum { @@ -41,7 +42,13 @@ enum struct MANGOS_DLL_DECL boss_maiden_of_virtueAI : public ScriptedAI { - boss_maiden_of_virtueAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + boss_maiden_of_virtueAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; uint32 m_uiRepentanceTimer; uint32 m_uiHolyfireTimer; @@ -69,11 +76,23 @@ struct MANGOS_DLL_DECL boss_maiden_of_virtueAI : public ScriptedAI void JustDied(Unit* pKiller) { DoScriptText(SAY_DEATH, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_MAIDEN, DONE); } void Aggro(Unit* pWho) { DoScriptText(SAY_AGGRO, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_MAIDEN, IN_PROGRESS); + } + + void JustReachedHome() + { + if (m_pInstance) + m_pInstance->SetData(TYPE_MAIDEN, FAIL); } void UpdateAI(const uint32 uiDiff) diff --git a/scripts/eastern_kingdoms/karazhan/boss_moroes.cpp b/scripts/eastern_kingdoms/karazhan/boss_moroes.cpp index 8b1de57f8..c49b4b87e 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_moroes.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_moroes.cpp @@ -17,7 +17,7 @@ /* ScriptData SDName: Boss_Moroes SD%Complete: 95 -SDComment: +SDComment: ToDo: Guests script can be moved to eventAI. SDCategory: Karazhan EndScriptData */ @@ -26,7 +26,8 @@ EndScriptData */ enum { - MAX_GUESTS = 4, + MAX_ACTIVE_GUESTS = 4, + MAX_GUESTS = 6, SAY_AGGRO = -1532011, SAY_SPECIAL_1 = -1532012, @@ -43,7 +44,7 @@ enum SPELL_FRENZY = 37023 }; -static const float afLocations[4][MAX_GUESTS]= +static const float afLocations[MAX_ACTIVE_GUESTS][4] = { {-10991.0f, -1884.33f, 81.73f, 0.614315f}, {-10989.4f, -1885.88f, 81.73f, 0.904913f}, @@ -51,72 +52,53 @@ static const float afLocations[4][MAX_GUESTS]= {-10975.9f, -1885.81f, 81.73f, 2.253890f} }; -static const uint32 auiAdds[6]= +static const uint32 auiGuests[MAX_GUESTS] = { - 17007, - 19872, - 19873, - 19874, - 19875, - 19876 + NPC_LADY_KEIRA_BERRYBUCK, + NPC_LADY_CATRIONA_VON_INDI, + NPC_LORD_CRISPIN_FERENCE, + NPC_BARON_RAFE_DREUGER, + NPC_BARONESS_DOROTHEA_MILLSTIPE, + NPC_LORD_ROBIN_DARIS }; struct MANGOS_DLL_DECL boss_moroesAI : public ScriptedAI { boss_moroesAI(Creature* pCreature) : ScriptedAI(pCreature) { - m_bFirstTime = true; m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); Reset(); } ScriptedInstance* m_pInstance; - ObjectGuid m_aAddGuid[MAX_GUESTS]; - uint32 m_auiAddId[MAX_GUESTS]; + std::vector m_vGuestsEntryList; - uint32 m_uiVanish_Timer; - uint32 m_uiBlind_Timer; - uint32 m_uiGouge_Timer; - uint32 m_uiWait_Timer; - uint32 m_uiCheckAdds_Timer; + uint32 m_uiVanishTimer; + uint32 m_uiBlindTimer; + uint32 m_uiGougeTimer; + uint32 m_uiWaitTimer; - bool m_bFirstTime; - bool m_bInVanish; bool m_bEnrage; void Reset() { - m_uiVanish_Timer = 30000; - m_uiBlind_Timer = 35000; - m_uiGouge_Timer = 23000; - m_uiWait_Timer = 0; - m_uiCheckAdds_Timer = 5000; + m_uiVanishTimer = 30000; + m_uiBlindTimer = 35000; + m_uiGougeTimer = 23000; + m_uiWaitTimer = 0; m_bEnrage = false; - m_bInVanish = false; - SpawnAdds(); - - m_creature->setFaction(16); - m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - - if (m_pInstance) - m_pInstance->SetData(TYPE_MOROES, NOT_STARTED); - } - - void StartEvent() - { - if (m_pInstance) - m_pInstance->SetData(TYPE_MOROES, IN_PROGRESS); + DoSpawnGuests(); } void Aggro(Unit* pWho) { - StartEvent(); DoScriptText(SAY_AGGRO, m_creature); - AddsAttack(); + + if (m_pInstance) + m_pInstance->SetData(TYPE_MOROES, IN_PROGRESS); } void KilledUnit(Unit* pVictim) @@ -129,90 +111,87 @@ struct MANGOS_DLL_DECL boss_moroesAI : public ScriptedAI } } + void JustReachedHome() + { + DoRemoveGarroteAura(); + + if (m_pInstance) + m_pInstance->SetData(TYPE_MOROES, FAIL); + } + void JustDied(Unit* pVictim) { DoScriptText(SAY_DEATH, m_creature); + DoRemoveGarroteAura(); if (m_pInstance) m_pInstance->SetData(TYPE_MOROES, DONE); + } - //remove aura from spell Garrote when Moroes dies - Map* pMap = m_creature->GetMap(); - if (pMap->IsDungeon()) - { - Map::PlayerList const &PlayerList = pMap->GetPlayers(); - - if (PlayerList.isEmpty()) - return; + void EnterEvadeMode() + { + // Don't evade during vanish phase + if (m_uiWaitTimer) + return; - for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i) - { - if (i->getSource()->isAlive() && i->getSource()->HasAura(SPELL_GARROTE, EFFECT_INDEX_0)) - i->getSource()->RemoveAurasDueToSpell(SPELL_GARROTE); - } - } + ScriptedAI::EnterEvadeMode(); } - void SpawnAdds() + void DoSpawnGuests() { - if (m_bFirstTime) - { - std::vector vAddList; + //not if m_creature are dead, so avoid + if (!m_creature->isAlive()) + return; - for (uint8 i = 0; i < 6; ++i) - vAddList.push_back(auiAdds[i]); + // it's empty, so first time + if (m_vGuestsEntryList.empty()) + { + // pre-allocate size for speed + m_vGuestsEntryList.resize(MAX_GUESTS); - while (vAddList.size() > MAX_GUESTS) - vAddList.erase((vAddList.begin())+(rand()%vAddList.size())); + // fill vector array with entries from creature array + for (uint8 i = 0; i < MAX_GUESTS; ++i) + m_vGuestsEntryList[i] = auiGuests[i]; - uint8 i = 0; - for (std::vector::iterator itr = vAddList.begin(); itr != vAddList.end(); ++itr, ++i) - { - if (Creature* pCreature = m_creature->SummonCreature(*itr, afLocations[i][0], afLocations[i][1], afLocations[i][2], afLocations[i][3], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10000)) - { - m_aAddGuid[i] = pCreature->GetObjectGuid(); - m_auiAddId[i] = *itr; - } - } + std::random_shuffle(m_vGuestsEntryList.begin(), m_vGuestsEntryList.end()); - m_bFirstTime = false; + // Summon the 4 entries + for (uint8 i = 0; i < MAX_ACTIVE_GUESTS; ++i) + m_creature->SummonCreature(m_vGuestsEntryList[i], afLocations[i][0], afLocations[i][1], afLocations[i][2], afLocations[i][3], TEMPSUMMON_CORPSE_DESPAWN, 0); } + // Resummon the killed adds else { - for (uint8 i = 0; i < MAX_GUESTS; ++i) + if (!m_pInstance) + return; + + for (uint8 i = 0; i < MAX_ACTIVE_GUESTS; ++i) { - if (Creature* pCreature = m_creature->GetMap()->GetCreature(m_aAddGuid[i])) - { - if (!pCreature->isAlive()) // Exists but is dead - { - pCreature->Respawn(); - pCreature->AI()->EnterEvadeMode(); - } - else if (!pCreature->IsInEvadeMode()) // Exists and is alive - { - pCreature->AI()->EnterEvadeMode(); - } - } - else - { // Does not exist - if (Creature* pCreature = m_creature->SummonCreature(m_auiAddId[i], afLocations[i][0], afLocations[i][1], afLocations[i][2], afLocations[i][3], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10000)) - m_aAddGuid[i] = pCreature->GetObjectGuid(); - } + // If we already have the creature on the map, then don't summon it + if (Creature* pAdd = m_pInstance->GetSingleCreatureFromStorage(m_vGuestsEntryList[i], true)) + continue; + + m_creature->SummonCreature(m_vGuestsEntryList[i], afLocations[i][0], afLocations[i][1], afLocations[i][2], afLocations[i][3], TEMPSUMMON_CORPSE_DESPAWN, 0); } } } - void AddsAttack() + // Wrapper to remove the Garrote aura on death and on evade - ToDo: maybe find a better way for this! + void DoRemoveGarroteAura() { - for(uint8 i = 0; i < MAX_GUESTS; ++i) + // remove aura from spell Garrote when Moroes dies + Map* pMap = m_creature->GetMap(); + if (pMap->IsDungeon()) { - if (m_aAddGuid[i]) + Map::PlayerList const &PlayerList = pMap->GetPlayers(); + + if (PlayerList.isEmpty()) + return; + + for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i) { - Creature* pTemp = m_creature->GetMap()->GetCreature(m_aAddGuid[i]); - if (pTemp && pTemp->isAlive()) - pTemp->AI()->AttackStart(m_creature->getVictim()); - else - EnterEvadeMode(); + if (i->getSource()->isAlive() && i->getSource()->HasAura(SPELL_GARROTE)) + i->getSource()->RemoveAurasDueToSpell(SPELL_GARROTE); } } } @@ -222,149 +201,68 @@ struct MANGOS_DLL_DECL boss_moroesAI : public ScriptedAI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - if (m_pInstance && !m_pInstance->GetData(TYPE_MOROES)) - EnterEvadeMode(); - - if (!m_bEnrage && m_creature->GetHealthPercent() < 30.0f) - { - DoCastSpellIfCan(m_creature, SPELL_FRENZY); - m_bEnrage = true; - } - - if (m_uiCheckAdds_Timer < uiDiff) + // Note: because the Vanish spell adds invisibility effect on the target, the timers won't be decreased during the vanish phase + if (m_uiWaitTimer) { - for (uint8 i = 0; i < MAX_GUESTS; ++i) + if (m_uiWaitTimer <= uiDiff) { - if (m_aAddGuid[i]) + // It's not very clear how to handle this spell + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) { - Creature* pTemp = m_creature->GetMap()->GetCreature(m_aAddGuid[i]); - if (pTemp && pTemp->isAlive() && (!pTemp->SelectHostileTarget() || !pTemp->getVictim())) - pTemp->AI()->AttackStart(m_creature->getVictim()); + DoScriptText(urand(0, 1) ? SAY_SPECIAL_1 : SAY_SPECIAL_2, m_creature); + DoResetThreat(); + AttackStart(pTarget); + pTarget->CastSpell(pTarget, SPELL_GARROTE, true); } + m_uiWaitTimer = 0; } - m_uiCheckAdds_Timer = 5000; + else + m_uiWaitTimer -= uiDiff; + + // Don't user other abilities in vanish + return; } - else - m_uiCheckAdds_Timer -= uiDiff; - if (!m_bEnrage) + if (!m_bEnrage && m_creature->GetHealthPercent() < 30.0f) { - // Cast Vanish, then Garrote random victim - if (m_uiVanish_Timer < uiDiff) - { - m_creature->setFaction(35); - m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - DoCastSpellIfCan(m_creature, SPELL_VANISH); - m_bInVanish = true; - m_uiVanish_Timer = 30000; - m_uiWait_Timer = 5000; - } - else - m_uiVanish_Timer -= uiDiff; + if (DoCastSpellIfCan(m_creature, SPELL_FRENZY) == CAST_OK) + m_bEnrage = true; + } - if (m_bInVanish) + // No other spells are cast after enrage + if (!m_bEnrage) + { + if (m_uiVanishTimer < uiDiff) { - if (m_uiWait_Timer < uiDiff) + if (DoCastSpellIfCan(m_creature, SPELL_VANISH) == CAST_OK) { - DoScriptText(urand(0, 1) ? SAY_SPECIAL_1 : SAY_SPECIAL_2, m_creature); - - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) - pTarget->CastSpell(pTarget, SPELL_GARROTE, true); - - m_creature->setFaction(16); - m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - m_creature->AI()->AttackStart(m_creature->getVictim()); - m_bInVanish = false; + m_uiVanishTimer = 30000; + m_uiWaitTimer = 1000; } - else - m_uiWait_Timer -= uiDiff; } + else + m_uiVanishTimer -= uiDiff; //Gouge highest aggro, and attack second highest - if (m_uiGouge_Timer < uiDiff) + if (m_uiGougeTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_GOUGE); - m_uiGouge_Timer = 40000; + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_GOUGE) == CAST_OK) + m_uiGougeTimer = 40000; } else - m_uiGouge_Timer -= uiDiff; + m_uiGougeTimer -= uiDiff; - if (m_uiBlind_Timer < uiDiff) + if (m_uiBlindTimer < uiDiff) { if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0, SPELL_BLIND, SELECT_FLAG_PLAYER)) - DoCastSpellIfCan(pTarget, SPELL_BLIND); - - m_uiBlind_Timer = 40000; + { + if (DoCastSpellIfCan(pTarget, SPELL_BLIND) == CAST_OK) + m_uiBlindTimer = 40000; + } } else - m_uiBlind_Timer -= uiDiff; - } - - if (!m_bInVanish) - DoMeleeAttackIfReady(); - } -}; - -struct MANGOS_DLL_DECL boss_moroes_guestAI : public ScriptedAI -{ - ScriptedInstance* m_pInstance; - - ObjectGuid m_aGuestGuid[MAX_GUESTS]; - - boss_moroes_guestAI(Creature* pCreature) : ScriptedAI(pCreature) - { - m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - AcquireGUID(); - Reset(); - } - - void Reset() - { - if (m_pInstance) - m_pInstance->SetData(TYPE_MOROES, NOT_STARTED); - } - - void AcquireGUID() - { - if (!m_pInstance) - return; - - if (Creature* pMoroes = m_pInstance->GetSingleCreatureFromStorage(NPC_MOROES)) - { - m_aGuestGuid[0] = pMoroes->GetObjectGuid(); - - for(uint8 i = 0; i < 3; ++i) - { - ObjectGuid addGuid; - - if (boss_moroesAI* pMoroesAI = dynamic_cast(pMoroes->AI())) - addGuid = pMoroesAI->m_aAddGuid[i]; - - if (addGuid && addGuid != m_creature->GetObjectGuid()) - m_aGuestGuid[i+1] = addGuid; - } + m_uiBlindTimer -= uiDiff; } - } - - Unit* SelectTarget() - { - if (ObjectGuid tempGuid = m_aGuestGuid[urand(0, MAX_GUESTS-1)]) - { - Creature* pTemp = m_creature->GetMap()->GetCreature(tempGuid); - if (pTemp && pTemp->isAlive()) - return pTemp; - } - - return m_creature; - } - - // TODO double check this design! - with momentarily system DoMeleeAttackIfReady is called before the spells are handled - void UpdateAI(const uint32 uiDiff) - { - if (m_pInstance && !m_pInstance->GetData(TYPE_MOROES)) - EnterEvadeMode(); DoMeleeAttackIfReady(); } @@ -378,10 +276,10 @@ enum SPELL_SHADOWFORM = 29406 }; -struct MANGOS_DLL_DECL boss_baroness_dorothea_millstipeAI : public boss_moroes_guestAI +struct MANGOS_DLL_DECL boss_baroness_dorothea_millstipeAI : public ScriptedAI { //Shadow Priest - boss_baroness_dorothea_millstipeAI(Creature* pCreature) : boss_moroes_guestAI(pCreature) { Reset(); } + boss_baroness_dorothea_millstipeAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } uint32 m_uiManaBurn_Timer; uint32 m_uiMindFlay_Timer; @@ -401,8 +299,6 @@ struct MANGOS_DLL_DECL boss_baroness_dorothea_millstipeAI : public boss_moroes_g if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - boss_moroes_guestAI::UpdateAI(uiDiff); - if (m_uiMindFlay_Timer < uiDiff) { DoCastSpellIfCan(m_creature->getVictim(), SPELL_MINDFLY); @@ -441,10 +337,10 @@ enum SPELL_SEALOFCOMMAND = 29385 }; -struct MANGOS_DLL_DECL boss_baron_rafe_dreugerAI : public boss_moroes_guestAI +struct MANGOS_DLL_DECL boss_baron_rafe_dreugerAI : public ScriptedAI { //Retr Pally - boss_baron_rafe_dreugerAI(Creature* pCreature) : boss_moroes_guestAI(pCreature) { Reset(); } + boss_baron_rafe_dreugerAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } uint32 m_uiHammerOfJustice_Timer; uint32 m_uiSealOfCommand_Timer; @@ -462,8 +358,6 @@ struct MANGOS_DLL_DECL boss_baron_rafe_dreugerAI : public boss_moroes_guestAI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - boss_moroes_guestAI::UpdateAI(uiDiff); - if (m_uiSealOfCommand_Timer < uiDiff) { DoCastSpellIfCan(m_creature, SPELL_SEALOFCOMMAND); @@ -499,10 +393,10 @@ enum SPELL_PWSHIELD = 29408 }; -struct MANGOS_DLL_DECL boss_lady_catriona_von_indiAI : public boss_moroes_guestAI +struct MANGOS_DLL_DECL boss_lady_catriona_von_indiAI : public ScriptedAI { //Holy Priest - boss_lady_catriona_von_indiAI(Creature* pCreature) : boss_moroes_guestAI(pCreature) { Reset(); } + boss_lady_catriona_von_indiAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } uint32 m_uiDispelMagic_Timer; uint32 m_uiGreaterHeal_Timer; @@ -522,8 +416,6 @@ struct MANGOS_DLL_DECL boss_lady_catriona_von_indiAI : public boss_moroes_guestA if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - boss_moroes_guestAI::UpdateAI(uiDiff); - if (m_uiPowerWordShield_Timer < uiDiff) { DoCastSpellIfCan(m_creature, SPELL_PWSHIELD); @@ -534,8 +426,11 @@ struct MANGOS_DLL_DECL boss_lady_catriona_von_indiAI : public boss_moroes_guestA if (m_uiGreaterHeal_Timer < uiDiff) { - DoCastSpellIfCan(SelectTarget(), SPELL_GREATERHEAL); - m_uiGreaterHeal_Timer = 17000; + if (Unit* pTarget = DoSelectLowestHpFriendly(50.0f)) + { + DoCastSpellIfCan(pTarget, SPELL_GREATERHEAL); + m_uiGreaterHeal_Timer = 17000; + } } else m_uiGreaterHeal_Timer -= uiDiff; @@ -550,7 +445,7 @@ struct MANGOS_DLL_DECL boss_lady_catriona_von_indiAI : public boss_moroes_guestA if (m_uiDispelMagic_Timer < uiDiff) { - if (Unit* pTarget = urand(0, 1) ? SelectTarget() : m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + if (Unit* pTarget = urand(0, 1) ? DoSelectLowestHpFriendly(50.0f) : m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) DoCastSpellIfCan(pTarget, SPELL_DISPELMAGIC); m_uiDispelMagic_Timer = 25000; @@ -568,10 +463,10 @@ enum SPELL_DIVINESHIELD = 41367 }; -struct MANGOS_DLL_DECL boss_lady_keira_berrybuckAI : public boss_moroes_guestAI +struct MANGOS_DLL_DECL boss_lady_keira_berrybuckAI : public ScriptedAI { //Holy Pally - boss_lady_keira_berrybuckAI(Creature* pCreature) : boss_moroes_guestAI(pCreature) { Reset(); } + boss_lady_keira_berrybuckAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } uint32 m_uiCleanse_Timer; uint32 m_uiGreaterBless_Timer; @@ -591,8 +486,6 @@ struct MANGOS_DLL_DECL boss_lady_keira_berrybuckAI : public boss_moroes_guestAI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - boss_moroes_guestAI::UpdateAI(uiDiff); - if (m_uiDivineShield_Timer < uiDiff) { DoCastSpellIfCan(m_creature, SPELL_DIVINESHIELD); @@ -603,24 +496,33 @@ struct MANGOS_DLL_DECL boss_lady_keira_berrybuckAI : public boss_moroes_guestAI if (m_uiHolyLight_Timer < uiDiff) { - DoCast(SelectTarget(), SPELL_HOLYLIGHT); - m_uiHolyLight_Timer = 10000; + if (Unit* pTarget = DoSelectLowestHpFriendly(50.0f)) + { + DoCastSpellIfCan(pTarget, SPELL_HOLYLIGHT); + m_uiHolyLight_Timer = 10000; + } } else m_uiHolyLight_Timer -= uiDiff; if (m_uiGreaterBless_Timer < uiDiff) { - DoCastSpellIfCan(SelectTarget(), SPELL_GREATERBLESSOFMIGHT); - m_uiGreaterBless_Timer = 50000; + if (Unit* pTarget = DoSelectLowestHpFriendly(50.0f)) + { + DoCastSpellIfCan(pTarget, SPELL_GREATERBLESSOFMIGHT); + m_uiGreaterBless_Timer = 50000; + } } else m_uiGreaterBless_Timer -= uiDiff; if (m_uiCleanse_Timer < uiDiff) { - DoCastSpellIfCan(SelectTarget(), SPELL_CLEANSE); - m_uiCleanse_Timer = 10000; + if (Unit* pTarget = DoSelectLowestHpFriendly(50.0f)) + { + DoCastSpellIfCan(pTarget, SPELL_CLEANSE); + m_uiCleanse_Timer = 10000; + } } else m_uiCleanse_Timer -= uiDiff; @@ -634,10 +536,10 @@ enum SPELL_WHIRLWIND = 29573 }; -struct MANGOS_DLL_DECL boss_lord_robin_darisAI : public boss_moroes_guestAI +struct MANGOS_DLL_DECL boss_lord_robin_darisAI : public ScriptedAI { //Arms Warr - boss_lord_robin_darisAI(Creature* pCreature) : boss_moroes_guestAI(pCreature) { Reset(); } + boss_lord_robin_darisAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } uint32 m_uiHamstring_Timer; uint32 m_uiMortalStrike_Timer; @@ -655,8 +557,6 @@ struct MANGOS_DLL_DECL boss_lord_robin_darisAI : public boss_moroes_guestAI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - boss_moroes_guestAI::UpdateAI(uiDiff); - if (m_uiHamstring_Timer < uiDiff) { DoCastSpellIfCan(m_creature->getVictim(), SPELL_HAMSTRING); @@ -691,10 +591,10 @@ enum SPELL_SHIELDWALL = 29390 }; -struct MANGOS_DLL_DECL boss_lord_crispin_ferenceAI : public boss_moroes_guestAI +struct MANGOS_DLL_DECL boss_lord_crispin_ferenceAI : public ScriptedAI { //Arms Warr - boss_lord_crispin_ferenceAI(Creature* pCreature) : boss_moroes_guestAI(pCreature) { Reset(); } + boss_lord_crispin_ferenceAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } uint32 m_uiDisarm_Timer; uint32 m_uiHeroicStrike_Timer; @@ -714,8 +614,6 @@ struct MANGOS_DLL_DECL boss_lord_crispin_ferenceAI : public boss_moroes_guestAI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - boss_moroes_guestAI::UpdateAI(uiDiff); - if (m_uiDisarm_Timer < uiDiff) { DoCastSpellIfCan(m_creature->getVictim(), SPELL_DISARM); diff --git a/scripts/eastern_kingdoms/karazhan/instance_karazhan.cpp b/scripts/eastern_kingdoms/karazhan/instance_karazhan.cpp index 124e0aa9c..ecd9b0794 100644 --- a/scripts/eastern_kingdoms/karazhan/instance_karazhan.cpp +++ b/scripts/eastern_kingdoms/karazhan/instance_karazhan.cpp @@ -67,6 +67,12 @@ void instance_karazhan::OnCreatureCreate(Creature* pCreature) { case NPC_MOROES: case NPC_NIGHTBANE: + case NPC_LADY_KEIRA_BERRYBUCK: + case NPC_LADY_CATRIONA_VON_INDI: + case NPC_LORD_CRISPIN_FERENCE: + case NPC_BARON_RAFE_DREUGER: + case NPC_BARONESS_DOROTHEA_MILLSTIPE: + case NPC_LORD_ROBIN_DARIS: m_mNpcEntryGuidStore[pCreature->GetEntry()] = pCreature->GetObjectGuid(); break; } diff --git a/scripts/eastern_kingdoms/karazhan/karazhan.h b/scripts/eastern_kingdoms/karazhan/karazhan.h index f070375d1..b2577855a 100644 --- a/scripts/eastern_kingdoms/karazhan/karazhan.h +++ b/scripts/eastern_kingdoms/karazhan/karazhan.h @@ -28,6 +28,14 @@ enum // NPC_TERESTIAN = 15688, NPC_NIGHTBANE = 17225, + // Moroes event related + NPC_LADY_KEIRA_BERRYBUCK = 17007, + NPC_LADY_CATRIONA_VON_INDI = 19872, + NPC_LORD_CRISPIN_FERENCE = 19873, + NPC_BARON_RAFE_DREUGER = 19874, + NPC_BARONESS_DOROTHEA_MILLSTIPE = 19875, + NPC_LORD_ROBIN_DARIS = 19876, + GO_STAGE_CURTAIN = 183932, GO_STAGE_DOOR_LEFT = 184278, GO_STAGE_DOOR_RIGHT = 184279, diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 48793a7b0..1776dd222 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2645" + #define SD2_REVISION_NR "2646" #endif // __SD2_REVISION_NR_H__ From 46a51c87c4a6564f139f5e030140c926e263a273 Mon Sep 17 00:00:00 2001 From: michalpolko Date: Fri, 20 Jul 2012 16:59:22 +0200 Subject: [PATCH 0635/1172] [2647] Implemented basic script for Festergut - ICC. --- .../icecrown_citadel/boss_festergut.cpp | 64 ++++++++++++++++++- .../icecrown_citadel/boss_sindragosa.cpp | 4 +- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 + sql/updates/r2647_mangos.sql | 1 + 5 files changed, 68 insertions(+), 4 deletions(-) create mode 100644 sql/updates/r2647_mangos.sql diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_festergut.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_festergut.cpp index 2b869e195..82bd4e2c4 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_festergut.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_festergut.cpp @@ -16,12 +16,13 @@ /* ScriptData SDName: boss_festergut -SD%Complete: 0% +SD%Complete: 10% SDComment: SDCategory: Icecrown Citadel EndScriptData */ #include "precompiled.h" +#include "icecrown_citadel.h" enum { @@ -37,6 +38,67 @@ enum SAY_FESTERGUT_DEATH = -1631091, }; +struct MANGOS_DLL_DECL boss_festergutAI : public ScriptedAI +{ + boss_festergutAI(Creature *pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (instance_icecrown_citadel*)pCreature->GetMap()->GetInstanceData(); + Reset(); + } + + instance_icecrown_citadel *m_pInstance; + + void Reset() + { + } + + void Aggro(Unit *pWho) + { + DoScriptText(SAY_AGGRO, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_FESTERGUT, IN_PROGRESS); + } + + void KilledUnit(Unit *pVictim) + { + DoScriptText(urand(0, 1) ? SAY_SLAY_1 : SAY_SLAY_2, m_creature); + } + + void JustReachedHome() + { + if (m_pInstance) + m_pInstance->SetData(TYPE_FESTERGUT, FAIL); + } + + void JustDied(Unit *pKiller) + { + if (m_pInstance) + m_pInstance->SetData(TYPE_FESTERGUT, DONE); + + DoScriptText(SAY_DEATH, m_creature); + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_festergut(Creature* pCreature) +{ + return new boss_festergutAI(pCreature); +} + void AddSC_boss_festergut() { + Script *pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_festergut"; + pNewScript->GetAI = &GetAI_boss_festergut; + pNewScript->RegisterSelf(); } diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp index a03982199..ca2548796 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: boss_sindragosa -SD%Complete: 0% -SDComment: +SD%Complete: 50% +SDComment: requires core support for ice blocks (spells and GO in LoS checking) SDCategory: Icecrown Citadel EndScriptData */ diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 1776dd222..4563da9ab 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2646" + #define SD2_REVISION_NR "2647" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 6f46416ee..639b4d3b1 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -727,6 +727,7 @@ UPDATE creature_template SET ScriptName='boss_blood_queen_lanathel' WHERE entry= UPDATE creature_template SET ScriptName='boss_sindragosa' WHERE entry=36853; UPDATE creature_template SET ScriptName='npc_rimefang_icc' WHERE entry=37533; UPDATE creature_template SET ScriptName='npc_spinestalker_icc' WHERE entry=37534; +UPDATE creature_template SET ScriptName='boss_festergut' WHERE entry=36626; DELETE FROM scripted_event_id WHERE id IN (23426,23438); INSERT INTO scripted_event_id VALUES (23426,'event_gameobject_citadel_valve'), diff --git a/sql/updates/r2647_mangos.sql b/sql/updates/r2647_mangos.sql new file mode 100644 index 000000000..262da6df8 --- /dev/null +++ b/sql/updates/r2647_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='boss_festergut' WHERE entry=36626; From 4c4cd645c717ccaeaa9c6b994b46f9b752c24188 Mon Sep 17 00:00:00 2001 From: Reamer Date: Wed, 1 Aug 2012 22:13:09 +0300 Subject: [PATCH 0636/1172] [2648] Cleanup and improve script for Midnight - Karazhan This will remove hacks and allow the creatures to use spells Also fix a typo in Maexxna script Signed-off-by: Xfurry --- .../karazhan/boss_midnight.cpp | 310 +++++++++--------- .../karazhan/instance_karazhan.cpp | 37 ++- scripts/eastern_kingdoms/karazhan/karazhan.h | 2 + scripts/northrend/naxxramas/boss_maexxna.cpp | 2 +- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 2 +- sql/updates/r2648_mangos.sql | 1 + 7 files changed, 191 insertions(+), 165 deletions(-) create mode 100644 sql/updates/r2648_mangos.sql diff --git a/scripts/eastern_kingdoms/karazhan/boss_midnight.cpp b/scripts/eastern_kingdoms/karazhan/boss_midnight.cpp index 6cd022c52..77a2bb1ae 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_midnight.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_midnight.cpp @@ -16,12 +16,13 @@ /* ScriptData SDName: Boss_Midnight -SD%Complete: 90 -SDComment: Use SPELL_SUMMON_ATTUMEN and SPELL_SUMMON_ATTUMEN_MOUNTED instead of SummonCreature. +SD%Complete: 100 +SDComment: SDCategory: Karazhan EndScriptData */ #include "precompiled.h" +#include "karazhan.h" enum { @@ -37,137 +38,141 @@ enum SAY_RANDOM1 = -1532009, SAY_RANDOM2 = -1532010, - SPELL_SHADOWCLEAVE = 29832, - SPELL_INTANGIBLE_PRESENCE = 29833, - SPELL_BERSERKER_CHARGE = 26561, //Only when mounted + // Midnight + SPELL_MOUNT = 29770, + SPELL_KNOCKDOWN = 29711, SPELL_SUMMON_ATTUMEN = 29714, SPELL_SUMMON_ATTUMEN_MOUNTED= 29799, - MOUNTED_DISPLAYID = 16040, // should use creature 16152 instead of changing displayid + // Attumen + SPELL_SHADOWCLEAVE = 29832, + SPELL_INTANGIBLE_PRESENCE = 29833, + SPELL_UPPERCUT = 29850, + SPELL_BERSERKER_CHARGE = 26561, // Only when mounted - //Attumen (TODO: Use the summoning spell instead of creature id. It works , but is not convenient for us) - SUMMON_ATTUMEN = 15550 + NPC_ATTUMEN_MOUNTED = 16152, }; struct MANGOS_DLL_DECL boss_midnightAI : public ScriptedAI { - boss_midnightAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + boss_midnightAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (instance_karazhan*)pCreature->GetInstanceData(); + Reset(); + } + + instance_karazhan* m_pInstance; - ObjectGuid m_attumenGuid; - uint8 m_uiPhase; - uint32 m_uiMount_Timer; + uint8 m_uiPhase; + uint32 m_uiKnockDown; void Reset() { - m_uiPhase = 1; - m_uiMount_Timer = 0; + m_uiPhase = 0; + m_uiKnockDown = urand(6000, 9000); - m_creature->SetVisibility(VISIBILITY_ON); + SetCombatMovement(true); + } + + void Aggro(Unit* pWho) + { + if (m_pInstance) + m_pInstance->SetData(TYPE_ATTUMEN, IN_PROGRESS); } void KilledUnit(Unit* pVictim) { - if (m_uiPhase == 2) + if (m_uiPhase == 1 && m_pInstance) { - if (Creature* pAttumen = m_creature->GetMap()->GetCreature(m_attumenGuid)) + if (Creature* pAttumen = m_pInstance->GetSingleCreatureFromStorage(NPC_ATTUMEN)) DoScriptText(SAY_MIDNIGHT_KILL, pAttumen); } } - void Mount(Creature* pAttumen) + void JustReachedHome() { - DoScriptText(SAY_MOUNT, pAttumen); - m_uiPhase = 3; + if (m_pInstance) + m_pInstance->SetData(TYPE_ATTUMEN, FAIL); + } - m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - pAttumen->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + void JustSummoned(Creature* pSummoned) + { + if (m_creature->getVictim()) + pSummoned->AI()->AttackStart(m_creature->getVictim()); - float fAngle = m_creature->GetAngle(pAttumen); - float fDistance = m_creature->GetDistance2d(pAttumen); + if (pSummoned->GetEntry() == NPC_ATTUMEN) + { + // Attumen yells when spawned + switch (urand(0, 2)) + { + case 0: DoScriptText(SAY_APPEAR1, pSummoned); break; + case 1: DoScriptText(SAY_APPEAR2, pSummoned); break; + case 2: DoScriptText(SAY_APPEAR3, pSummoned); break; + } + } + else if (pSummoned->GetEntry() == NPC_ATTUMEN_MOUNTED) + DoScriptText(SAY_MOUNT, pSummoned); + } - float fNewX = m_creature->GetPositionX() + cos(fAngle)*(fDistance/2) ; - float fNewY = m_creature->GetPositionY() + sin(fAngle)*(fDistance/2) ; - float fNewZ = 50.0f; + void MovementInform(uint32 uiMoveType, uint32 uiPointId) + { + if (uiMoveType != POINT_MOTION_TYPE || !uiPointId || !m_pInstance) + return; - m_creature->GetMotionMaster()->Clear(); - m_creature->GetMotionMaster()->MovePoint(0, fNewX, fNewY, fNewZ); + // Spawn the mounted Attumen and despawn + if (DoCastSpellIfCan(m_creature, SPELL_SUMMON_ATTUMEN_MOUNTED, CAST_TRIGGERED) == CAST_OK) + { + if (Creature* pAttumen = m_pInstance->GetSingleCreatureFromStorage(NPC_ATTUMEN)) + pAttumen->ForcedDespawn(); - fDistance += 10.0f; - fNewX = m_creature->GetPositionX() + cos(fAngle)*(fDistance/2); - fNewY = m_creature->GetPositionY() + sin(fAngle)*(fDistance/2); + m_creature->ForcedDespawn(); + } + } - pAttumen->GetMotionMaster()->Clear(); - pAttumen->GetMotionMaster()->MovePoint(0, fNewX, fNewY, fNewZ); + // Wrapper to prepare phase 3 + void DoPrepareMount(Creature* pTarget) + { + if (pTarget) + { + m_uiPhase = 2; - m_uiMount_Timer = 1000; + SetCombatMovement(false); + m_creature->GetMotionMaster()->MovePoint(1, pTarget->GetPositionX(), pTarget->GetPositionY(), pTarget->GetPositionZ()); + } } - void SetMidnight(Creature*, ObjectGuid); // Below .. - void UpdateAI(const uint32 uiDiff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - switch(m_uiPhase) + // Stop attacking during the mount phase + if (m_uiPhase == 2) + return; + + // Spawn Attumen on 95% hp + if (m_uiPhase == 0 && m_creature->GetHealthPercent() < 95.0f) { - case 1: - if (m_creature->GetHealthPercent() < 95.0f) - { - m_uiPhase = 2; - - if (Creature* pAttumen = m_creature->SummonCreature(SUMMON_ATTUMEN, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 30000)) - { - m_attumenGuid = pAttumen->GetObjectGuid(); - pAttumen->AI()->AttackStart(m_creature->getVictim()); - SetMidnight(pAttumen, m_creature->GetObjectGuid()); - - switch(urand(0, 2)) - { - case 0: DoScriptText(SAY_APPEAR1, pAttumen); break; - case 1: DoScriptText(SAY_APPEAR2, pAttumen); break; - case 2: DoScriptText(SAY_APPEAR3, pAttumen); break; - } - } - } - break; - case 2: - if (m_creature->GetHealthPercent() < 25.0f) - { - if (Creature* pAttumen = m_creature->GetMap()->GetCreature(m_attumenGuid)) - Mount(pAttumen); - } - break; - case 3: - if (m_uiMount_Timer) - { - if (m_uiMount_Timer <= uiDiff) - { - m_uiMount_Timer = 0; - m_creature->SetVisibility(VISIBILITY_OFF); - m_creature->GetMotionMaster()->MoveIdle(); - - if (Creature *pAttumen = m_creature->GetMap()->GetCreature(m_attumenGuid)) - { - pAttumen->SetDisplayId(MOUNTED_DISPLAYID); - pAttumen->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - - if (pAttumen->getVictim()) - { - pAttumen->GetMotionMaster()->MoveChase(pAttumen->getVictim()); - pAttumen->SetTargetGuid(pAttumen->getVictim()->GetObjectGuid()); - } - pAttumen->SetFloatValue(OBJECT_FIELD_SCALE_X,1); - } - } - else - m_uiMount_Timer -= uiDiff; - } - break; + if (DoCastSpellIfCan(m_creature, SPELL_SUMMON_ATTUMEN) == CAST_OK) + m_uiPhase = 1; } - if (m_uiPhase != 3) - DoMeleeAttackIfReady(); + // Spawn Attumen mounted at 25% + if (m_uiPhase == 1 && m_creature->GetHealthPercent() < 25.0f) + { + if (DoCastSpellIfCan(m_creature, SPELL_MOUNT, CAST_TRIGGERED) == CAST_OK) + m_uiPhase = 2; + } + + if (m_uiKnockDown < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_KNOCKDOWN) == CAST_OK) + m_uiKnockDown = urand(6000, 9000); + } + else + m_uiKnockDown -= uiDiff; + + DoMeleeAttackIfReady(); } }; @@ -180,27 +185,29 @@ struct MANGOS_DLL_DECL boss_attumenAI : public ScriptedAI { boss_attumenAI(Creature* pCreature) : ScriptedAI(pCreature) { + m_pInstance = (instance_karazhan*)pCreature->GetInstanceData(); Reset(); - m_uiPhase = 1; - - m_uiCleaveTimer = urand(10000, 16000); - m_uiCurseTimer = 30000; - m_uiRandomYellTimer = urand(30000, 60000); //Occasionally yell - m_uiChargeTimer = 20000; - m_uiResetTimer = 0; } - ObjectGuid m_midnightGuid; - uint8 m_uiPhase; + instance_karazhan* m_pInstance; + uint32 m_uiCleaveTimer; uint32 m_uiCurseTimer; uint32 m_uiRandomYellTimer; + uint32 m_uiKnockDown; uint32 m_uiChargeTimer; //only when mounted - uint32 m_uiResetTimer; + + bool m_bHasSummonRider; void Reset() { - m_uiResetTimer = 2000; + m_uiCleaveTimer = urand(10000, 16000); + m_uiCurseTimer = 30000; + m_uiRandomYellTimer = urand(30000, 60000); //Occasionally yell + m_uiChargeTimer = 20000; + m_uiKnockDown = urand(6000, 9000); + + m_bHasSummonRider = false; } void KilledUnit(Unit* pVictim) @@ -218,51 +225,36 @@ struct MANGOS_DLL_DECL boss_attumenAI : public ScriptedAI { DoScriptText(SAY_DEATH, m_creature); - if (Creature* pMidnight = m_creature->GetMap()->GetCreature(m_midnightGuid)) - pMidnight->DealDamage(pMidnight, pMidnight->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + if (m_pInstance) + m_pInstance->SetData(TYPE_ATTUMEN, DONE); } - void UpdateAI(const uint32 uiDiff) + void JustReachedHome() { - if (m_uiResetTimer) - { - if (m_uiResetTimer <= uiDiff) - { - m_uiResetTimer = 0; + if (m_pInstance) + m_pInstance->SetData(TYPE_ATTUMEN, FAIL); - if (Creature *pMidnight = m_creature->GetMap()->GetCreature(m_midnightGuid)) - { - pMidnight->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - pMidnight->SetVisibility(VISIBILITY_ON); - } - m_midnightGuid.Clear(); - - m_creature->SetVisibility(VISIBILITY_OFF); - m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); - } - else - m_uiResetTimer -= uiDiff; - } + // Despawn Attumen on fail + m_creature->ForcedDespawn(); + } - //Return since we have no target + void UpdateAI(const uint32 uiDiff) + { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - if (m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE)) - return; - if (m_uiCleaveTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_SHADOWCLEAVE); - m_uiCleaveTimer = urand(10000, 16000); + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_SHADOWCLEAVE) == CAST_OK) + m_uiCleaveTimer = urand(10000, 16000); } else m_uiCleaveTimer -= uiDiff; if (m_uiCurseTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_INTANGIBLE_PRESENCE); - m_uiCurseTimer = 30000; + if (DoCastSpellIfCan(m_creature, SPELL_INTANGIBLE_PRESENCE) == CAST_OK) + m_uiCurseTimer = 30000; } else m_uiCurseTimer -= uiDiff; @@ -275,7 +267,17 @@ struct MANGOS_DLL_DECL boss_attumenAI : public ScriptedAI else m_uiRandomYellTimer -= uiDiff; - if (m_creature->GetDisplayId() == MOUNTED_DISPLAYID) + if (m_uiKnockDown < uiDiff) + { + // Cast knockdown when mounted, otherwise uppercut + if (DoCastSpellIfCan(m_creature->getVictim(), m_creature->GetEntry() == NPC_ATTUMEN_MOUNTED ? SPELL_KNOCKDOWN : SPELL_UPPERCUT) == CAST_OK) + m_uiKnockDown = urand(6000, 9000); + } + else + m_uiKnockDown -= uiDiff; + + // If creature is mounted then cast charge + if (m_creature->GetEntry() == NPC_ATTUMEN_MOUNTED) { if (m_uiChargeTimer < uiDiff) { @@ -290,18 +292,13 @@ struct MANGOS_DLL_DECL boss_attumenAI : public ScriptedAI else m_uiChargeTimer -= uiDiff; } - else + // Else, mount if below 25% + else if (!m_bHasSummonRider && m_creature->GetHealthPercent() < 25.0f) { - if (m_creature->GetHealthPercent() < 25.0f) + if (Creature* pMidnight = m_pInstance->GetSingleCreatureFromStorage(NPC_MIDNIGHT)) { - if (Creature *pMidnight = m_creature->GetMap()->GetCreature(m_midnightGuid)) - { - if (boss_midnightAI* pMidnightAI = dynamic_cast(pMidnight->AI())) - pMidnightAI->Mount(m_creature); - - m_creature->SetHealth(pMidnight->GetHealth()); - DoResetThreat(); - } + pMidnight->CastSpell(m_creature, SPELL_MOUNT, true); + m_bHasSummonRider = true; } } @@ -309,15 +306,29 @@ struct MANGOS_DLL_DECL boss_attumenAI : public ScriptedAI } }; -void boss_midnightAI::SetMidnight(Creature* pAttumen, ObjectGuid midnightGuid) +CreatureAI* GetAI_boss_attumen(Creature* pCreature) { - if (boss_attumenAI* pAttumenAI = dynamic_cast(pAttumen->AI())) - pAttumenAI->m_midnightGuid = midnightGuid; + return new boss_attumenAI(pCreature); } -CreatureAI* GetAI_boss_attumen(Creature* pCreature) +bool EffectDummyCreature_spell_mount_attumen(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) { - return new boss_attumenAI(pCreature); + //always check spellid and effectindex + if (uiSpellId == SPELL_MOUNT && uiEffIndex == EFFECT_INDEX_0) + { + // Avoid possible DB errors + if (pCaster->GetEntry() == NPC_MIDNIGHT && pCreatureTarget->GetEntry() == NPC_ATTUMEN) + { + // Prepare for mount + if (boss_midnightAI* pMidnightAI = dynamic_cast(((Creature*)pCaster)->AI())) + pMidnightAI->DoPrepareMount(pCreatureTarget); + } + + //always return true when we are handling this spell and effect + return true; + } + + return false; } void AddSC_boss_attumen() @@ -327,6 +338,7 @@ void AddSC_boss_attumen() pNewScript = new Script; pNewScript->Name = "boss_attumen"; pNewScript->GetAI = &GetAI_boss_attumen; + pNewScript->pEffectDummyNPC = &EffectDummyCreature_spell_mount_attumen; pNewScript->RegisterSelf(); pNewScript = new Script; diff --git a/scripts/eastern_kingdoms/karazhan/instance_karazhan.cpp b/scripts/eastern_kingdoms/karazhan/instance_karazhan.cpp index ecd9b0794..d3344f4d0 100644 --- a/scripts/eastern_kingdoms/karazhan/instance_karazhan.cpp +++ b/scripts/eastern_kingdoms/karazhan/instance_karazhan.cpp @@ -65,6 +65,8 @@ void instance_karazhan::OnCreatureCreate(Creature* pCreature) { switch (pCreature->GetEntry()) { + case NPC_ATTUMEN: + case NPC_MIDNIGHT: case NPC_MOROES: case NPC_NIGHTBANE: case NPC_LADY_KEIRA_BERRYBUCK: @@ -137,17 +139,26 @@ void instance_karazhan::SetData(uint32 uiType, uint32 uiData) switch(uiType) { case TYPE_ATTUMEN: - m_auiEncounter[0] = uiData; + m_auiEncounter[uiType] = uiData; + if (uiData == FAIL) + { + // Respawn Midnight on Fail + if (Creature* pMidnight = GetSingleCreatureFromStorage(NPC_MIDNIGHT)) + { + if (!pMidnight->isAlive()) + { + pMidnight->Respawn(); + pMidnight->GetMotionMaster()->MoveTargetedHome(); + } + } + } break; case TYPE_MOROES: - if (m_auiEncounter[1] != DONE) - m_auiEncounter[1] = uiData; - break; case TYPE_MAIDEN: - m_auiEncounter[2] = uiData; + m_auiEncounter[uiType] = uiData; break; case TYPE_OPERA: - m_auiEncounter[3] = uiData; + m_auiEncounter[uiType] = uiData; if (uiData == DONE) { DoUseDoorOrButton(GO_STAGE_DOOR_LEFT); @@ -156,30 +167,30 @@ void instance_karazhan::SetData(uint32 uiType, uint32 uiData) } break; case TYPE_CURATOR: - m_auiEncounter[4] = uiData; + m_auiEncounter[uiType] = uiData; break; case TYPE_TERESTIAN: - m_auiEncounter[5] = uiData; + m_auiEncounter[uiType] = uiData; break; case TYPE_ARAN: - m_auiEncounter[6] = uiData; + m_auiEncounter[uiType] = uiData; if (uiData != IN_PROGRESS) DoUseDoorOrButton(GO_PRIVATE_LIBRARY_DOOR); break; case TYPE_NETHERSPITE: - m_auiEncounter[7] = uiData; + m_auiEncounter[uiType] = uiData; DoUseDoorOrButton(GO_MASSIVE_DOOR); break; case TYPE_CHESS: if (uiData == DONE) DoRespawnGameObject(GO_DUST_COVERED_CHEST, DAY); - m_auiEncounter[8] = uiData; + m_auiEncounter[uiType] = uiData; break; case TYPE_MALCHEZZAR: - m_auiEncounter[9] = uiData; + m_auiEncounter[uiType] = uiData; break; case TYPE_NIGHTBANE: - m_auiEncounter[10] = uiData; + m_auiEncounter[uiType] = uiData; break; case DATA_OPERA_OZ_DEATHCOUNT: diff --git a/scripts/eastern_kingdoms/karazhan/karazhan.h b/scripts/eastern_kingdoms/karazhan/karazhan.h index b2577855a..00b199228 100644 --- a/scripts/eastern_kingdoms/karazhan/karazhan.h +++ b/scripts/eastern_kingdoms/karazhan/karazhan.h @@ -24,6 +24,8 @@ enum DATA_OPERA_PERFORMANCE = 11, DATA_OPERA_OZ_DEATHCOUNT = 12, + NPC_ATTUMEN = 15550, + NPC_MIDNIGHT = 16151, NPC_MOROES = 15687, // NPC_TERESTIAN = 15688, NPC_NIGHTBANE = 17225, diff --git a/scripts/northrend/naxxramas/boss_maexxna.cpp b/scripts/northrend/naxxramas/boss_maexxna.cpp index 8cae53408..02eb3c4aa 100644 --- a/scripts/northrend/naxxramas/boss_maexxna.cpp +++ b/scripts/northrend/naxxramas/boss_maexxna.cpp @@ -207,7 +207,7 @@ struct MANGOS_DLL_DECL boss_maexxnaAI : public ScriptedAI bool DoCastWebWrap() { // If we can't select a player for web wrap then skip the summoning - if (!m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1, SPELL_WEBWRAP, SELECT_FLAG_PLAYER)) + if (!m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1, uint32(0), SELECT_FLAG_PLAYER)) return false; uint8 uiPos1 = urand(0, MAX_WEB_WRAP_POSITIONS - 1); diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 4563da9ab..aaab77720 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2647" + #define SD2_REVISION_NR "2648" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 639b4d3b1..b22ed671b 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -755,7 +755,7 @@ UPDATE creature_template SET ScriptName='npc_converted_sentry' WHERE entry=24981 /* KARAZHAN */ UPDATE instance_template SET ScriptName='instance_karazhan' WHERE map=532; UPDATE creature_template SET ScriptName='boss_midnight' WHERE entry=16151; -UPDATE creature_template SET ScriptName='boss_attumen' WHERE entry=15550; +UPDATE creature_template SET ScriptName='boss_attumen' WHERE entry IN (15550,16152); UPDATE creature_template SET ScriptName='boss_moroes' WHERE entry=15687; UPDATE creature_template SET ScriptName='boss_maiden_of_virtue' WHERE entry=16457; UPDATE creature_template SET ScriptName='boss_curator' WHERE entry=15691; diff --git a/sql/updates/r2648_mangos.sql b/sql/updates/r2648_mangos.sql new file mode 100644 index 000000000..e84c430de --- /dev/null +++ b/sql/updates/r2648_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='boss_attumen' WHERE entry IN (16152); From 8e51995ef86eed9768d5d09cdf6a3ef0cefb5afd Mon Sep 17 00:00:00 2001 From: NeatElves Date: Wed, 1 Aug 2012 22:38:31 +0300 Subject: [PATCH 0637/1172] [2649] Drop some gameobjects scripts - will be handled by DB Signed-off-by: Xfurry --- scripts/world/go_scripts.cpp | 147 +------------------------------ sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 6 -- sql/scriptdev2_script_full.sql | 2 +- sql/updates/r2649_mangos.sql | 6 ++ sql/updates/r2649_scriptdev2.sql | 3 + 6 files changed, 12 insertions(+), 154 deletions(-) create mode 100644 sql/updates/r2649_mangos.sql create mode 100644 sql/updates/r2649_scriptdev2.sql diff --git a/scripts/world/go_scripts.cpp b/scripts/world/go_scripts.cpp index 9689dc12b..bf2807e06 100644 --- a/scripts/world/go_scripts.cpp +++ b/scripts/world/go_scripts.cpp @@ -17,44 +17,25 @@ /* ScriptData SDName: GO_Scripts SD%Complete: 100 -SDComment: Quest support: 5088, 5097, 5098, 5381, 6481, 10990, 10991, 10992, 12557, 14092/14076. Barov_journal->Teaches spell 26089 +SDComment: Quest support: 5097, 5098, 10990, 10991, 10992, 12557, 14092/14076. Barov_journal->Teaches spell 26089 SDCategory: Game Objects EndScriptData */ /* ContentData -go_cat_figurine (the "trap" version of GO, two different exist) go_barov_journal go_ethereum_prison go_ethereum_stasis go_mysterious_snow_mound -go_resonite_cask -go_sacred_fire_of_life go_shrine_of_the_birds go_tele_to_dalaran_crystal go_tele_to_violet_stand go_andorhal_tower go_scourge_enclosure go_lab_work_reagents -go_hand_of_iruxos_crystal EndContentData */ #include "precompiled.h" -/*###### -## go_cat_figurine -######*/ - -enum -{ - SPELL_SUMMON_GHOST_SABER = 5968, -}; - -bool GOUse_go_cat_figurine(Player* pPlayer, GameObject* pGo) -{ - pPlayer->CastSpell(pPlayer, SPELL_SUMMON_GHOST_SABER, true); - return false; -} - /*###### ## go_barov_journal ######*/ @@ -156,26 +137,6 @@ bool GOUse_go_ethereum_stasis(Player* pPlayer, GameObject* pGo) return false; } -/*###### -## go_gilded_brazier -######*/ - -enum -{ - NPC_STILLBLADE = 17716, -}; - -bool GOUse_go_gilded_brazier(Player* pPlayer, GameObject* pGO) -{ - if (pGO->GetGoType() == GAMEOBJECT_TYPE_GOOBER) - { - if (Creature* pCreature = pPlayer->SummonCreature(NPC_STILLBLADE, 8087.632f, -7542.740f, 151.568f, 0.122f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000)) - pCreature->AI()->AttackStart(pPlayer); - } - - return true; -} - /*###### ## go_jump_a_tron ######*/ @@ -224,40 +185,6 @@ bool GOUse_go_mysterious_snow_mound(Player* pPlayer, GameObject* pGo) return true; } -/*###### -## go_resonite_cask -######*/ - -enum -{ - NPC_GOGGEROC = 11920 -}; - -bool GOUse_go_resonite_cask(Player* pPlayer, GameObject* pGO) -{ - if (pGO->GetGoType() == GAMEOBJECT_TYPE_GOOBER) - pGO->SummonCreature(NPC_GOGGEROC, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 300000); - - return false; -} - -/*###### -## go_sacred_fire_of_life -######*/ - -enum -{ - NPC_ARIKARA = 10882, -}; - -bool GOUse_go_sacred_fire_of_life(Player* pPlayer, GameObject* pGO) -{ - if (pGO->GetGoType() == GAMEOBJECT_TYPE_GOOBER) - pPlayer->SummonCreature(NPC_ARIKARA, -5008.338f, -2118.894f, 83.657f, 0.874f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); - - return true; -} - /*###### ## go_shrine_of_the_birds ######*/ @@ -329,24 +256,6 @@ bool GOUse_go_tele_to_violet_stand(Player* pPlayer, GameObject* pGo) return true; } -enum -{ - NPC_ZELEMAR_THE_WRATHFULL = 17830, - SAY_AGGRO = -1000579 -}; - -float Position[4] = {-327.99f, 221.74f, -20.31f, 3.87f}; - -bool GOUse_go_blood_filled_orb(Player* pPlayer, GameObject* pGo) -{ - if (Creature* pZelemar = pGo->SummonCreature(NPC_ZELEMAR_THE_WRATHFULL, Position[0], Position[1], Position[2], Position[3], TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000)) - { - DoScriptText(SAY_AGGRO, pZelemar); - pZelemar->AI()->AttackStart(pPlayer); - } - return false; -} - /*###### ## go_andorhal_tower ######*/ @@ -448,39 +357,10 @@ bool GOUse_go_lab_work_reagents(Player* pPlayer, GameObject* pGo) return false; } -/*###### -## go_hand_of_iruxos_crystal -######*/ - -/* TODO - * Actually this script is extremely vague, but as long as there is no valid information - * hidden in some dark places, this will be the best we can do here :( - * Do not consider this a well proven script. - */ - -enum -{ - // QUEST_HAND_OF_IRUXOS = 5381, - NPC_IRUXOS = 11876, -}; - -bool GOUse_go_hand_of_iruxos_crystal(Player* pPlayer, GameObject* pGo) -{ - if (Creature* pIruxos = pGo->SummonCreature(NPC_IRUXOS, 0.0f, 0.0f, 0.0f, pPlayer->GetOrientation() + M_PI_F, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 20000)) - pIruxos->AI()->AttackStart(pPlayer); - - return false; -} - void AddSC_go_scripts() { Script* pNewScript; - pNewScript = new Script; - pNewScript->Name = "go_cat_figurine"; - pNewScript->pGOUse = &GOUse_go_cat_figurine; - pNewScript->RegisterSelf(); - pNewScript = new Script; pNewScript->Name = "go_barov_journal"; pNewScript->pGOUse = &GOUse_go_barov_journal; @@ -496,11 +376,6 @@ void AddSC_go_scripts() pNewScript->pGOUse = &GOUse_go_ethereum_stasis; pNewScript->RegisterSelf(); - pNewScript = new Script; - pNewScript->Name = "go_gilded_brazier"; - pNewScript->pGOUse = &GOUse_go_gilded_brazier; - pNewScript->RegisterSelf(); - pNewScript = new Script; pNewScript->Name = "go_jump_a_tron"; pNewScript->pGOUse = &GOUse_go_jump_a_tron; @@ -511,16 +386,6 @@ void AddSC_go_scripts() pNewScript->pGOUse = &GOUse_go_mysterious_snow_mound; pNewScript->RegisterSelf(); - pNewScript = new Script; - pNewScript->Name = "go_resonite_cask"; - pNewScript->pGOUse = &GOUse_go_resonite_cask; - pNewScript->RegisterSelf(); - - pNewScript = new Script; - pNewScript->Name = "go_sacred_fire_of_life"; - pNewScript->pGOUse = &GOUse_go_sacred_fire_of_life; - pNewScript->RegisterSelf(); - pNewScript = new Script; pNewScript->Name = "go_shrine_of_the_birds"; pNewScript->pGOUse = &GOUse_go_shrine_of_the_birds; @@ -536,11 +401,6 @@ void AddSC_go_scripts() pNewScript->pGOUse = &GOUse_go_tele_to_violet_stand; pNewScript->RegisterSelf(); - pNewScript = new Script; - pNewScript->Name = "go_blood_filled_orb"; - pNewScript->pGOUse = &GOUse_go_blood_filled_orb; - pNewScript->RegisterSelf(); - pNewScript = new Script; pNewScript->Name = "go_andorhal_tower"; pNewScript->pGOUse = &GOUse_go_andorhal_tower; @@ -555,9 +415,4 @@ void AddSC_go_scripts() pNewScript->Name = "go_lab_work_reagents"; pNewScript->pGOUse = &GOUse_go_lab_work_reagents; pNewScript->RegisterSelf(); - - pNewScript = new Script; - pNewScript->Name = "go_hand_of_iruxos_crystal"; - pNewScript->pGOUse = &GOUse_go_hand_of_iruxos_crystal; - pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index aaab77720..d27d3acfe 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2648" + #define SD2_REVISION_NR "2649" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index b22ed671b..29746d4a3 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -98,26 +98,20 @@ UPDATE creature_template SET ScriptName='boss_lethon' WHERE entry=14888; UPDATE creature_template SET ScriptName='npc_spirit_shade' WHERE entry=15261; /* GO */ -UPDATE gameobject_template SET ScriptName='go_cat_figurine' WHERE entry=13873; UPDATE gameobject_template SET ScriptName='go_barov_journal' WHERE entry=180794; UPDATE gameobject_template SET ScriptName='go_ethereum_prison' WHERE entry BETWEEN 184418 AND 184431; UPDATE gameobject_template SET ScriptName='go_ethereum_stasis' WHERE entry BETWEEN 185465 AND 185467; UPDATE gameobject_template SET ScriptName='go_ethereum_stasis' WHERE entry=184595; UPDATE gameobject_template SET ScriptName='go_ethereum_stasis' WHERE entry BETWEEN 185461 AND 185464; -UPDATE gameobject_template SET ScriptName='go_gilded_brazier' WHERE entry=181956; UPDATE gameobject_template SET ScriptName='go_jump_a_tron' WHERE entry=183146; UPDATE gameobject_template SET ScriptName='go_mysterious_snow_mound' WHERE entry=195308; -UPDATE gameobject_template SET ScriptName='go_resonite_cask' WHERE entry=178145; -UPDATE gameobject_template SET ScriptName='go_sacred_fire_of_life' WHERE entry=175944; UPDATE gameobject_template SET ScriptName='go_shrine_of_the_birds' WHERE entry IN (185547,185553,185551); UPDATE gameobject_template SET ScriptName='go_tele_to_dalaran_crystal' WHERE entry=191230; UPDATE gameobject_template SET ScriptName='go_tele_to_violet_stand' WHERE entry=191229; -UPDATE gameobject_template SET ScriptName='go_blood_filled_orb' WHERE entry=182024; UPDATE gameobject_template SET ScriptName='go_andorhal_tower' WHERE entry IN (176094,176095,176096,176097); UPDATE gameobject_template SET ScriptName='go_scourge_enclosure' WHERE entry=191548; UPDATE gameobject_template SET ScriptName='go_veil_skith_cage' WHERE entry IN (185202,185203,185204,185205); UPDATE gameobject_template SET ScriptName='go_lab_work_reagents' WHERE entry IN (190462, 190473, 190478, 190459); -UPDATE gameobject_template SET ScriptName='go_hand_of_iruxos_crystal' WHERE entry=176581; /* GUARD */ UPDATE creature_template SET ScriptName='guard_azuremyst' WHERE entry=18038; diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index eb6e96470..c46b16dca 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -606,7 +606,7 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1000577,'This is far enough. I can make it on my own from here.',0,0,0,0,'Lurgglbr - SAY_END_1'), (-1000578,'Thank you for helping me $r. Please tell the king I am back.',0,0,0,0,'Lurgglbr - SAY_END_2'), -(-1000579,'Insolent fool! You thought to steal Zelemar\'s blood? You shall pay with your own!',0,1,0,0,'Zelemar the Wrathful - Aggro'), +(-1000579,'REUSE ME',0,0,0,0,'REUSE ME'), (-1000580,'Sleep now, young one ...',0,0,0,0,'Raelorasz SAY_SLEEP'), (-1000581,'A wonderful specimen.',0,0,0,0,'Raeloarsz SAY_SPECIMEN'), diff --git a/sql/updates/r2649_mangos.sql b/sql/updates/r2649_mangos.sql new file mode 100644 index 000000000..59692026d --- /dev/null +++ b/sql/updates/r2649_mangos.sql @@ -0,0 +1,6 @@ +UPDATE gameobject_template SET ScriptName='' WHERE entry=13873; +UPDATE gameobject_template SET ScriptName='' WHERE entry=181956; +UPDATE gameobject_template SET ScriptName='' WHERE entry=178145; +UPDATE gameobject_template SET ScriptName='' WHERE entry=175944; +UPDATE gameobject_template SET ScriptName='' WHERE entry=182024; +UPDATE gameobject_template SET ScriptName='' WHERE entry=176581; diff --git a/sql/updates/r2649_scriptdev2.sql b/sql/updates/r2649_scriptdev2.sql new file mode 100644 index 000000000..de06faf83 --- /dev/null +++ b/sql/updates/r2649_scriptdev2.sql @@ -0,0 +1,3 @@ +DELETE FROM script_texts WHERE entry IN (-1000579); +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1000579,'REUSE ME',0,0,0,0,'REUSE ME'); From 70d7367ad001d4c62010d943fb07b7f36524f160 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Wed, 1 Aug 2012 23:31:40 +0300 Subject: [PATCH 0638/1172] [2650] Fix a possible bug for quest 8483 --- scripts/eastern_kingdoms/eversong_woods.cpp | 35 +++++++++------------ sd2_revision_nr.h | 2 +- sql/scriptdev2_script_full.sql | 5 +-- sql/updates/r2650_scriptdev2.sql | 4 +++ 4 files changed, 22 insertions(+), 24 deletions(-) create mode 100644 sql/updates/r2650_scriptdev2.sql diff --git a/scripts/eastern_kingdoms/eversong_woods.cpp b/scripts/eastern_kingdoms/eversong_woods.cpp index a96a06e74..da4984b40 100644 --- a/scripts/eastern_kingdoms/eversong_woods.cpp +++ b/scripts/eastern_kingdoms/eversong_woods.cpp @@ -254,7 +254,12 @@ enum SAY_ANVIL1 = -1000209, SAY_ANVIL2 = -1000210, - FACTION_DEFAULT = 35, + GOSSIP_ITEM_MOMENT = -3000108, + GOSSIP_ITEM_SHOW = -3000110, + + GOSSIP_TEXT_ID_MOMENT = 8239, + GOSSIP_TEXT_ID_SHOW = 8240, + FACTION_HOSTILE = 24, QUEST_THE_DWARVEN_SPY = 8483 @@ -265,6 +270,8 @@ struct MANGOS_DLL_DECL npc_prospector_anvilwardAI : public npc_escortAI // CreatureAI functions npc_prospector_anvilwardAI(Creature* pCreature) : npc_escortAI(pCreature) {Reset();} + void Reset() { } + // Pure Virtual Functions void WaypointReached(uint32 uiPointId) { @@ -282,22 +289,11 @@ struct MANGOS_DLL_DECL npc_prospector_anvilwardAI : public npc_escortAI DoScriptText(SAY_ANVIL2, m_creature, pPlayer); break; case 6: - m_creature->setFaction(FACTION_HOSTILE); + m_creature->SetFactionTemporary(FACTION_HOSTILE, TEMPFACTION_RESTORE_REACH_HOME | TEMPFACTION_RESTORE_RESPAWN); + AttackStart(pPlayer); break; } } - - void Reset() - { - //Default npc faction - m_creature->setFaction(FACTION_DEFAULT); - } - - void JustDied(Unit* pKiller) - { - //Default npc faction - m_creature->setFaction(FACTION_DEFAULT); - } }; CreatureAI* GetAI_npc_prospector_anvilward(Creature* pCreature) @@ -305,15 +301,12 @@ CreatureAI* GetAI_npc_prospector_anvilward(Creature* pCreature) return new npc_prospector_anvilwardAI(pCreature); } -#define GOSSIP_ITEM_MOMENT "I need a moment of your time, sir." -#define GOSSIP_ITEM_SHOW "Why... yes, of course. I've something to show you right inside this building, Mr. Anvilward." - bool GossipHello_npc_prospector_anvilward(Player* pPlayer, Creature* pCreature) { if (pPlayer->GetQuestStatus(QUEST_THE_DWARVEN_SPY) == QUEST_STATUS_INCOMPLETE) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_MOMENT, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_MOMENT, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - pPlayer->SEND_GOSSIP_MENU(8239, pCreature->GetObjectGuid()); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXT_ID_MOMENT, pCreature->GetObjectGuid()); return true; } @@ -322,8 +315,8 @@ bool GossipSelect_npc_prospector_anvilward(Player* pPlayer, Creature* pCreature, switch(uiAction) { case GOSSIP_ACTION_INFO_DEF+1: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_SHOW, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); - pPlayer->SEND_GOSSIP_MENU(8240, pCreature->GetObjectGuid()); + pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_SHOW, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXT_ID_SHOW, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+2: pPlayer->CLOSE_GOSSIP_MENU(); diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index d27d3acfe..9ab596b38 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2649" + #define SD2_REVISION_NR "2650" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index c46b16dca..d298ca9c9 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -4240,8 +4240,9 @@ INSERT INTO gossip_texts (entry,content_default,comment) VALUES (-3000105,'Ezekiel said that you might have a certain book...','dirty larry GOSSIP_ITEM_BOOK'), (-3000106,'Let Marshal Windsor know that I am ready.','squire rowe GOSSIP_ITEM_WINDSOR'), (-3000107,'I am ready, as are my forces. Let us end this masquerade!','reginald windsor GOSSIP_ITEM_START'), -(-3000108,'REUSE ME','REUSE ME'), -(-3000109,'I am ready, Oronok. Let us destroy Cyrukh and free the elements!','oronok torn-heart GOSSIP_ITEM_FIGHT'); +(-3000108,'I need a moment of your time, sir.','prospector anvilward GOSSIP_ITEM_MOMENT'), +(-3000109,'I am ready, Oronok. Let us destroy Cyrukh and free the elements!','oronok torn-heart GOSSIP_ITEM_FIGHT'), +(-3000110,'Why... yes, of course. I\'ve something to show you right inside this building, Mr. Anvilward.','prospector anvilward GOSSIP_ITEM_SHOW'); -- -3 033 000 SHADOWFANG KEEP INSERT INTO gossip_texts (entry,content_default,comment) VALUES diff --git a/sql/updates/r2650_scriptdev2.sql b/sql/updates/r2650_scriptdev2.sql new file mode 100644 index 000000000..4280ee218 --- /dev/null +++ b/sql/updates/r2650_scriptdev2.sql @@ -0,0 +1,4 @@ +DELETE FROM gossip_texts WHERE entry IN (-3000108,-3000110); +INSERT INTO gossip_texts (entry,content_default,comment) VALUES +(-3000108,'I need a moment of your time, sir.','prospector anvilward GOSSIP_ITEM_MOMENT'), +(-3000110,'Why... yes, of course. I\'ve something to show you right inside this building, Mr. Anvilward.','prospector anvilward GOSSIP_ITEM_SHOW'); From 82988b33630814aba29e442dd3b6ff66f3277775 Mon Sep 17 00:00:00 2001 From: grz3s Date: Fri, 3 Aug 2012 00:14:14 +0300 Subject: [PATCH 0639/1172] [2651] Implement script support for quest 4121 Signed-off-by: Xfurry --- scripts/eastern_kingdoms/burning_steppes.cpp | 310 ++++++++++++++++++- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 + sql/scriptdev2_script_full.sql | 67 +++- sql/updates/r2651_mangos.sql | 1 + sql/updates/r2651_scriptdev2.sql | 66 ++++ 6 files changed, 444 insertions(+), 3 deletions(-) create mode 100644 sql/updates/r2651_mangos.sql create mode 100644 sql/updates/r2651_scriptdev2.sql diff --git a/scripts/eastern_kingdoms/burning_steppes.cpp b/scripts/eastern_kingdoms/burning_steppes.cpp index 6a1fff548..e9cf5e402 100644 --- a/scripts/eastern_kingdoms/burning_steppes.cpp +++ b/scripts/eastern_kingdoms/burning_steppes.cpp @@ -17,15 +17,17 @@ /* ScriptData SDName: Burning_Steppes SD%Complete: 100 -SDComment: Quest support: 4224, 4866 +SDComment: Quest support: 4121, 4122, 4224, 4866 SDCategory: Burning Steppes EndScriptData */ /* ContentData npc_ragged_john +npc_grark_lorkrub EndContentData */ #include "precompiled.h" +#include "escort_ai.h" /*###### ## npc_ragged_john @@ -136,6 +138,305 @@ bool GossipSelect_npc_ragged_john(Player* pPlayer, Creature* pCreature, uint32 u return true; } +/*###### +## npc_grark_lorkrub +######*/ + +enum +{ + SAY_START = -1000873, + SAY_PAY = -1000874, + SAY_FIRST_AMBUSH_START = -1000875, + SAY_FIRST_AMBUSH_END = -1000876, + SAY_SEC_AMBUSH_START = -1000877, + SAY_SEC_AMBUSH_END = -1000878, + SAY_THIRD_AMBUSH_START = -1000879, + SAY_THIRD_AMBUSH_END = -1000880, + EMOTE_LAUGH = -1000881, + SAY_LAST_STAND = -1000882, + SAY_LEXLORT_1 = -1000883, + SAY_LEXLORT_2 = -1000884, + EMOTE_RAISE_AXE = -1000885, + EMOTE_LOWER_HAND = -1000886, + SAY_LEXLORT_3 = -1000887, + SAY_LEXLORT_4 = -1000888, + + SPELL_CAPTURE_GRARK = 14250, + + NPC_BLACKROCK_AMBUSHER = 9522, + NPC_BLACKROCK_RAIDER = 9605, + NPC_FLAMESCALE_DRAGONSPAWN = 7042, + NPC_SEARSCALE_DRAKE = 7046, + + NPC_GRARK_LORKRUB = 9520, + NPC_HIGH_EXECUTIONER_NUZARK = 9538, + NPC_SHADOW_OF_LEXLORT = 9539, + + FACTION_FRIENDLY = 35, + + QUEST_ID_PRECARIOUS_PREDICAMENT = 4121 +}; + +static const DialogueEntry aOutroDialogue[] = +{ + {SAY_LAST_STAND, NPC_GRARK_LORKRUB, 5000}, + {SAY_LEXLORT_1, NPC_SHADOW_OF_LEXLORT, 3000}, + {SAY_LEXLORT_2, NPC_SHADOW_OF_LEXLORT, 5000}, + {EMOTE_RAISE_AXE, NPC_HIGH_EXECUTIONER_NUZARK, 4000}, + {EMOTE_LOWER_HAND, NPC_SHADOW_OF_LEXLORT, 3000}, + {SAY_LEXLORT_3, NPC_SHADOW_OF_LEXLORT, 3000}, + {NPC_GRARK_LORKRUB, 0, 5000}, + {SAY_LEXLORT_4, NPC_SHADOW_OF_LEXLORT, 0}, + {0, 0, 0}, +}; + +struct MANGOS_DLL_DECL npc_grark_lorkrubAI : public npc_escortAI, private DialogueHelper +{ + npc_grark_lorkrubAI(Creature* pCreature) : npc_escortAI(pCreature), + DialogueHelper(aOutroDialogue) + { + Reset(); + } + + ObjectGuid m_nuzarkGuid; + ObjectGuid m_lexlortGuid; + + GuidList m_lSearscaleGuidList; + + uint8 m_uiKilledCreatures; + bool m_bIsFirstSearScale; + + void Reset() + { + if (!HasEscortState(STATE_ESCORT_ESCORTING)) + { + m_uiKilledCreatures = 0; + m_bIsFirstSearScale = true; + + m_lSearscaleGuidList.clear(); + + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + } + } + + void MoveInLineOfSight(Unit* pWho) + { + // No combat during escort + if (HasEscortState(STATE_ESCORT_ESCORTING)) + return; + + npc_escortAI::MoveInLineOfSight(pWho); + } + + void WaypointReached(uint32 uiPointId) + { + switch (uiPointId) + { + case 1: + DoScriptText(SAY_START, m_creature); + break; + case 7: + DoScriptText(SAY_PAY, m_creature); + break; + case 12: + DoScriptText(SAY_FIRST_AMBUSH_START, m_creature); + SetEscortPaused(true); + + m_creature->SummonCreature(NPC_BLACKROCK_AMBUSHER, -7844.3f, -1521.6f, 139.2f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 20000); + m_creature->SummonCreature(NPC_BLACKROCK_AMBUSHER, -7860.4f, -1507.8f, 141.0f, 6.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 20000); + m_creature->SummonCreature(NPC_BLACKROCK_RAIDER, -7845.6f, -1508.1f, 138.8f, 6.1f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 20000); + m_creature->SummonCreature(NPC_BLACKROCK_RAIDER, -7859.8f, -1521.8f, 139.2f, 6.2f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 20000); + break; + case 24: + DoScriptText(SAY_SEC_AMBUSH_START, m_creature); + SetEscortPaused(true); + + m_creature->SummonCreature(NPC_BLACKROCK_AMBUSHER, -8035.3f, -1222.2f, 135.5f, 5.1f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 20000); + m_creature->SummonCreature(NPC_FLAMESCALE_DRAGONSPAWN, -8037.5f, -1216.9f, 135.8f, 5.1f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 20000); + m_creature->SummonCreature(NPC_BLACKROCK_AMBUSHER, -8009.5f, -1222.1f, 139.2f, 3.9f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 20000); + m_creature->SummonCreature(NPC_FLAMESCALE_DRAGONSPAWN, -8007.1f, -1219.4f, 140.1f, 3.9f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 20000); + break; + case 28: + m_creature->SummonCreature(NPC_SEARSCALE_DRAKE, -7897.8f, -1123.1f, 233.4f, 3.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 60000); + m_creature->SummonCreature(NPC_SEARSCALE_DRAKE, -7898.8f, -1125.1f, 193.9f, 3.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 60000); + m_creature->SummonCreature(NPC_SEARSCALE_DRAKE, -7895.6f, -1119.5f, 194.5f, 3.1f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 60000); + break; + case 30: + { + SetEscortPaused(true); + DoScriptText(SAY_THIRD_AMBUSH_START, m_creature); + + Player* pPlayer = GetPlayerForEscort(); + if (!pPlayer) + return; + + // Set all the dragons in combat + for (GuidList::const_iterator itr = m_lSearscaleGuidList.begin(); itr != m_lSearscaleGuidList.end(); ++itr) + { + if (Creature* pTemp = m_creature->GetMap()->GetCreature(*itr)) + pTemp->AI()->AttackStart(pPlayer); + } + break; + } + case 36: + DoScriptText(EMOTE_LAUGH, m_creature); + break; + case 45: + StartNextDialogueText(SAY_LAST_STAND); + SetEscortPaused(true); + + m_creature->SummonCreature(NPC_HIGH_EXECUTIONER_NUZARK, -7532.3f, -1029.4f, 258.0f, 2.7f, TEMPSUMMON_TIMED_DESPAWN, 40000); + m_creature->SummonCreature(NPC_SHADOW_OF_LEXLORT, -7532.8f, -1032.9f, 258.2f, 2.5f, TEMPSUMMON_TIMED_DESPAWN, 40000); + break; + } + } + + void JustDidDialogueStep(int32 iEntry) + { + switch(iEntry) + { + case SAY_LEXLORT_1: + m_creature->SetStandState(UNIT_STAND_STATE_KNEEL); + break; + case SAY_LEXLORT_3: + // Note: this part isn't very clear. Should he just simply attack him, or charge him? + if (Creature* pNuzark = m_creature->GetMap()->GetCreature(m_nuzarkGuid)) + pNuzark->HandleEmote(EMOTE_ONESHOT_ATTACK2HTIGHT); + break; + case NPC_GRARK_LORKRUB: + // Fake death creature when the axe is lowered. This will allow us to finish the event + m_creature->InterruptNonMeleeSpells(true); + m_creature->SetHealth(1); + m_creature->StopMoving(); + m_creature->ClearComboPointHolders(); + m_creature->RemoveAllAurasOnDeath(); + m_creature->ModifyAuraState(AURA_STATE_HEALTHLESS_20_PERCENT, false); + m_creature->ModifyAuraState(AURA_STATE_HEALTHLESS_35_PERCENT, false); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + m_creature->ClearAllReactives(); + m_creature->GetMotionMaster()->Clear(); + m_creature->GetMotionMaster()->MoveIdle(); + m_creature->SetStandState(UNIT_STAND_STATE_DEAD); + break; + case SAY_LEXLORT_4: + // Finish the quest + if (Player* pPlayer = GetPlayerForEscort()) + pPlayer->GroupEventHappens(QUEST_ID_PRECARIOUS_PREDICAMENT, m_creature); + // Kill self + m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NONE, NULL, false); + break; + } + } + + void JustSummoned(Creature* pSummoned) + { + switch (pSummoned->GetEntry()) + { + case NPC_HIGH_EXECUTIONER_NUZARK: m_nuzarkGuid = pSummoned->GetObjectGuid(); break; + case NPC_SHADOW_OF_LEXLORT: m_lexlortGuid = pSummoned->GetObjectGuid(); break; + case NPC_SEARSCALE_DRAKE: + // If it's the flying drake allow him to move in circles + if (m_bIsFirstSearScale) + { + m_bIsFirstSearScale = false; + + pSummoned->SetLevitate(true); + // ToDo: this guy should fly in circles above the creature + } + m_lSearscaleGuidList.push_back(pSummoned->GetObjectGuid()); + break; + + default: + // The hostile mobs should attack the player only + if (Player* pPlayer = GetPlayerForEscort()) + pSummoned->AI()->AttackStart(pPlayer); + break; + } + } + + void SummonedCreatureJustDied(Creature* pSummoned) + { + ++m_uiKilledCreatures; + + switch (m_uiKilledCreatures) + { + case 4: + DoScriptText(SAY_FIRST_AMBUSH_END, m_creature); + SetEscortPaused(false); + break; + case 8: + DoScriptText(SAY_SEC_AMBUSH_END, m_creature); + SetEscortPaused(false); + break; + case 11: + DoScriptText(SAY_THIRD_AMBUSH_END, m_creature); + SetEscortPaused(false); + break; + } + } + + Creature* GetSpeakerByEntry(uint32 uiEntry) + { + switch (uiEntry) + { + case NPC_GRARK_LORKRUB: return m_creature; + case NPC_HIGH_EXECUTIONER_NUZARK: return m_creature->GetMap()->GetCreature(m_nuzarkGuid); + case NPC_SHADOW_OF_LEXLORT: return m_creature->GetMap()->GetCreature(m_lexlortGuid); + + default: + return NULL; + } + } + + void UpdateEscortAI(const uint32 uiDiff) + { + DialogueUpdate(uiDiff); + + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_npc_grark_lorkrub(Creature* pCreature) +{ + return new npc_grark_lorkrubAI(pCreature); +} + +bool QuestAccept_npc_grark_lorkrub(Player* pPlayer, Creature* pCreature, const Quest* pQuest) +{ + if (pQuest->GetQuestId() == QUEST_ID_PRECARIOUS_PREDICAMENT) + { + if (npc_grark_lorkrubAI* pEscortAI = dynamic_cast(pCreature->AI())) + pEscortAI->Start(false, pPlayer, pQuest); + + return true; + } + + return false; +} + +bool EffectDummyCreature_spell_capture_grark(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) +{ + //always check spellid and effectindex + if (uiSpellId == SPELL_CAPTURE_GRARK && uiEffIndex == EFFECT_INDEX_0) + { + // Note: this implementation needs additional research! There is a lot of guesswork involved in this! + if (pCreatureTarget->GetHealthPercent() > 25.0f) + return false; + + // The faction is guesswork - needs more research + pCreatureTarget->SetFactionTemporary(FACTION_FRIENDLY, TEMPFACTION_RESTORE_RESPAWN); + pCreatureTarget->AI()->EnterEvadeMode(); + + //always return true when we are handling this spell and effect + return true; + } + + return false; +} + void AddSC_burning_steppes() { Script* pNewScript; @@ -146,4 +447,11 @@ void AddSC_burning_steppes() pNewScript->pGossipHello = &GossipHello_npc_ragged_john; pNewScript->pGossipSelect = &GossipSelect_npc_ragged_john; pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_grark_lorkrub"; + pNewScript->GetAI = &GetAI_npc_grark_lorkrub; + pNewScript->pQuestAcceptNPC = &QuestAccept_npc_grark_lorkrub; + pNewScript->pEffectDummyNPC = &EffectDummyCreature_spell_capture_grark; + pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 9ab596b38..37c56f3a2 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2650" + #define SD2_REVISION_NR "2651" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 29746d4a3..db7317dc5 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -408,6 +408,7 @@ UPDATE creature_template SET ScriptName='npc_lurgglbr' WHERE entry=25208; /* BURNING STEPPES */ UPDATE creature_template SET ScriptName='npc_ragged_john' WHERE entry=9563; +UPDATE creature_template SET ScriptName='npc_grark_lorkrub' WHERE entry=9520; /* */ /* CAVERNS OF TIME */ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index d298ca9c9..7290d5117 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -936,7 +936,24 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1000869,'Reginald... I... I am sorry.',0,0,0,0,'bolvar SAY_IN_KEEP_13'), (-1000870,'Bol... Bolvar... the medallion... use...',0,0,0,0,'reginald windsor SAY_IN_KEEP_14'), (-1000871,'%s dies.',0,2,0,0,'reginald windsor EMOTE_IN_KEEP_DIE'), -(-1000872,'%s hisses',0,2,0,0,'reginald windsor EMOTE_GUARD_TRANSFORM'); +(-1000872,'%s hisses',0,2,0,0,'reginald windsor EMOTE_GUARD_TRANSFORM'), + +(-1000873,'I know the way, insect. There is no need to prod me as if I were cattle.',0,0,0,1,'grark SAY_START'), +(-1000874,'Surely you do not think that you will get away with this incursion. They will come for me and you shall pay for your insolence.',0,0,0,1,'grark SAY_PAY'), +(-1000875,'RUN THEM THROUGH BROTHERS!',0,0,0,5,'grark SAY_FIRST_AMBUSH_START'), +(-1000876,'I doubt you will be so lucky the next time you encounter my brethren.',0,0,0,1,'grark SAY_FIRST_AMBUSH_END'), +(-1000877,'They come for you, fool!',0,0,0,5,'grark SAY_SEC_AMBUSH_START'), +(-1000878,'What do you think you accomplish from this, fool? Even now, the Blackrock armies make preparations to destroy your world.',0,0,0,1,'grark SAY_SEC_AMBUSH_END'), +(-1000879,'On darkest wing they fly. Prepare to meet your end!',0,0,0,5,'grark SAY_THIRD_AMBUSH_START'), +(-1000880,'The worst is yet to come!',0,0,0,1,'grark SAY_THIRD_AMBUSH_END'), +(-1000881,'%s laughs.',0,2,0,11,'grark EMOTE_LAUGH'), +(-1000882,'Time to make your final stand, Insect.',0,0,0,0,'grark SAY_LAST_STAND'), +(-1000883,'Kneel, Grark',0,0,0,1,'lexlort SAY_LEXLORT_1'), +(-1000884,'Grark Lorkrub, you have been charged and found guilty of treason against Horde. How you plead is unimportant. High Executioner Nuzrak, step forward.',0,0,0,1,'lexlort SAY_LEXLORT_2'), +(-1000885,'%s raises his massive axe over Grark.',0,2,0,27,'nuzark EMOTE_RAISE_AXE'), +(-1000886,'%s raises his hand and then lowers it.',0,2,0,0,'lexlort EMOTE_LOWER_HAND'), +(-1000887,'End him...',0,0,0,0,'lexlort SAY_LEXLORT_3'), +(-1000888,'You, soldier, report back to Kargath at once!',0,0,0,1,'lexlort SAY_LEXLORT_4'); -- -1 033 000 SHADOWFANG KEEP INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES @@ -6708,4 +6725,52 @@ INSERT INTO script_waypoint VALUES (12580, 25, -8446.87, 339.904, 121.33, 0, 'SAY_WINDSOR_KEEP_1'), (12580, 26, -8446.87, 339.904, 121.33, 10000, ''); +DELETE FROM script_waypoint WHERE entry=9520; +INSERT INTO script_waypoint VALUES +(9520, 1, -7699.62, -1444.29, 139.87, 4000, 'SAY_START'), +(9520, 2, -7670.67, -1458.25, 140.74, 0, ''), +(9520, 3, -7675.26, -1465.58, 140.74, 0, ''), +(9520, 4, -7685.84, -1472.66, 140.75, 0, ''), +(9520, 5, -7700.08, -1473.41, 140.79, 0, ''), +(9520, 6, -7712.55, -1470.19, 140.79, 0, ''), +(9520, 7, -7717.27, -1481.70, 140.72, 5000, 'SAY_PAY'), +(9520, 8, -7726.23, -1500.78, 132.99, 0, ''), +(9520, 9, -7744.61, -1531.61, 132.69, 0, ''), +(9520, 10, -7763.08, -1536.22, 131.93, 0, ''), +(9520, 11, -7815.32, -1522.61, 134.16, 0, ''), +(9520, 12, -7850.26, -1516.87, 138.17, 0, 'SAY_FIRST_AMBUSH_START'), +(9520, 13, -7850.26, -1516.87, 138.17, 3000, 'SAY_FIRST_AMBUSH_END'), +(9520, 14, -7881.01, -1508.49, 142.37, 0, ''), +(9520, 15, -7888.91, -1458.09, 144.79, 0, ''), +(9520, 16, -7889.18, -1430.21, 145.31, 0, ''), +(9520, 17, -7900.53, -1427.01, 150.26, 0, ''), +(9520, 18, -7904.15, -1429.91, 150.27, 0, ''), +(9520, 19, -7921.48, -1425.47, 140.54, 0, ''), +(9520, 20, -7941.43, -1413.10, 134.35, 0, ''), +(9520, 21, -7964.85, -1367.45, 132.99, 0, ''), +(9520, 22, -7989.95, -1319.121, 133.71, 0, ''), +(9520, 23, -8010.43, -1270.23, 133.42, 0, ''), +(9520, 24, -8025.62, -1243.78, 133.91, 0, 'SAY_SEC_AMBUSH_START'), +(9520, 25, -8025.62, -1243.78, 133.91, 3000, 'SAY_SEC_AMBUSH_END'), +(9520, 26, -8015.22, -1196.98, 146.76, 0, ''), +(9520, 27, -7994.68, -1151.38, 160.70, 0, ''), +(9520, 28, -7970.91, -1132.81, 170.16, 0, 'summon Searscale Drakes'), +(9520, 29, -7927.59, -1122.79, 185.86, 0, ''), +(9520, 30, -7897.67, -1126.67, 194.32, 0, 'SAY_THIRD_AMBUSH_START'), +(9520, 31, -7897.67, -1126.67, 194.32, 3000, 'SAY_THIRD_AMBUSH_END'), +(9520, 32, -7864.11, -1135.98, 203.29, 0, ''), +(9520, 33, -7837.31, -1137.73, 209.63, 0, ''), +(9520, 34, -7808.72, -1134.90, 214.84, 0, ''), +(9520, 35, -7786.85, -1127.24, 214.84, 0, ''), +(9520, 36, -7746.58, -1125.16, 215.08, 5000, 'EMOTE_LAUGH'), +(9520, 37, -7746.41, -1103.62, 215.62, 0, ''), +(9520, 38, -7740.25, -1090.51, 216.69, 0, ''), +(9520, 39, -7730.97, -1085.55, 217.12, 0, ''), +(9520, 40, -7697.89, -1089.43, 217.62, 0, ''), +(9520, 41, -7679.30, -1059.15, 220.09, 0, ''), +(9520, 42, -7661.39, -1038.24, 226.24, 0, ''), +(9520, 43, -7634.49, -1020.96, 234.30, 0, ''), +(9520, 44, -7596.22, -1013.16, 244.03, 0, ''), +(9520, 45, -7556.53, -1021.74, 253.21, 0, 'SAY_LAST_STAND'); + -- EOF diff --git a/sql/updates/r2651_mangos.sql b/sql/updates/r2651_mangos.sql new file mode 100644 index 000000000..7271f68e7 --- /dev/null +++ b/sql/updates/r2651_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_grark_lorkrub' WHERE entry=9520; diff --git a/sql/updates/r2651_scriptdev2.sql b/sql/updates/r2651_scriptdev2.sql new file mode 100644 index 000000000..d8777c4ac --- /dev/null +++ b/sql/updates/r2651_scriptdev2.sql @@ -0,0 +1,66 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1000888 AND -1000873; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1000873,'I know the way, insect. There is no need to prod me as if I were cattle.',0,0,0,1,'grark SAY_START'), +(-1000874,'Surely you do not think that you will get away with this incursion. They will come for me and you shall pay for your insolence.',0,0,0,1,'grark SAY_PAY'), +(-1000875,'RUN THEM THROUGH BROTHERS!',0,0,0,5,'grark SAY_FIRST_AMBUSH_START'), +(-1000876,'I doubt you will be so lucky the next time you encounter my brethren.',0,0,0,1,'grark SAY_FIRST_AMBUSH_END'), +(-1000877,'They come for you, fool!',0,0,0,5,'grark SAY_SEC_AMBUSH_START'), +(-1000878,'What do you think you accomplish from this, fool? Even now, the Blackrock armies make preparations to destroy your world.',0,0,0,1,'grark SAY_SEC_AMBUSH_END'), +(-1000879,'On darkest wing they fly. Prepare to meet your end!',0,0,0,5,'grark SAY_THIRD_AMBUSH_START'), +(-1000880,'The worst is yet to come!',0,0,0,1,'grark SAY_THIRD_AMBUSH_END'), +(-1000881,'%s laughs.',0,2,0,11,'grark EMOTE_LAUGH'), +(-1000882,'Time to make your final stand, Insect.',0,0,0,0,'grark SAY_LAST_STAND'), +(-1000883,'Kneel, Grark',0,0,0,1,'lexlort SAY_LEXLORT_1'), +(-1000884,'Grark Lorkrub, you have been charged and found guilty of treason against Horde. How you plead is unimportant. High Executioner Nuzrak, step forward.',0,0,0,1,'lexlort SAY_LEXLORT_2'), +(-1000885,'%s raises his massive axe over Grark.',0,2,0,27,'nuzark EMOTE_RAISE_AXE'), +(-1000886,'%s raises his hand and then lowers it.',0,2,0,0,'lexlort EMOTE_LOWER_HAND'), +(-1000887,'End him...',0,0,0,0,'lexlort SAY_LEXLORT_3'), +(-1000888,'You, soldier, report back to Kargath at once!',0,0,0,1,'lexlort SAY_LEXLORT_4'); + +DELETE FROM script_waypoint WHERE entry=9520; +INSERT INTO script_waypoint VALUES +(9520, 1, -7699.62, -1444.29, 139.87, 4000, 'SAY_START'), +(9520, 2, -7670.67, -1458.25, 140.74, 0, ''), +(9520, 3, -7675.26, -1465.58, 140.74, 0, ''), +(9520, 4, -7685.84, -1472.66, 140.75, 0, ''), +(9520, 5, -7700.08, -1473.41, 140.79, 0, ''), +(9520, 6, -7712.55, -1470.19, 140.79, 0, ''), +(9520, 7, -7717.27, -1481.70, 140.72, 5000, 'SAY_PAY'), +(9520, 8, -7726.23, -1500.78, 132.99, 0, ''), +(9520, 9, -7744.61, -1531.61, 132.69, 0, ''), +(9520, 10, -7763.08, -1536.22, 131.93, 0, ''), +(9520, 11, -7815.32, -1522.61, 134.16, 0, ''), +(9520, 12, -7850.26, -1516.87, 138.17, 0, 'SAY_FIRST_AMBUSH_START'), +(9520, 13, -7850.26, -1516.87, 138.17, 3000, 'SAY_FIRST_AMBUSH_END'), +(9520, 14, -7881.01, -1508.49, 142.37, 0, ''), +(9520, 15, -7888.91, -1458.09, 144.79, 0, ''), +(9520, 16, -7889.18, -1430.21, 145.31, 0, ''), +(9520, 17, -7900.53, -1427.01, 150.26, 0, ''), +(9520, 18, -7904.15, -1429.91, 150.27, 0, ''), +(9520, 19, -7921.48, -1425.47, 140.54, 0, ''), +(9520, 20, -7941.43, -1413.10, 134.35, 0, ''), +(9520, 21, -7964.85, -1367.45, 132.99, 0, ''), +(9520, 22, -7989.95, -1319.121, 133.71, 0, ''), +(9520, 23, -8010.43, -1270.23, 133.42, 0, ''), +(9520, 24, -8025.62, -1243.78, 133.91, 0, 'SAY_SEC_AMBUSH_START'), +(9520, 25, -8025.62, -1243.78, 133.91, 3000, 'SAY_SEC_AMBUSH_END'), +(9520, 26, -8015.22, -1196.98, 146.76, 0, ''), +(9520, 27, -7994.68, -1151.38, 160.70, 0, ''), +(9520, 28, -7970.91, -1132.81, 170.16, 0, 'summon Searscale Drakes'), +(9520, 29, -7927.59, -1122.79, 185.86, 0, ''), +(9520, 30, -7897.67, -1126.67, 194.32, 0, 'SAY_THIRD_AMBUSH_START'), +(9520, 31, -7897.67, -1126.67, 194.32, 3000, 'SAY_THIRD_AMBUSH_END'), +(9520, 32, -7864.11, -1135.98, 203.29, 0, ''), +(9520, 33, -7837.31, -1137.73, 209.63, 0, ''), +(9520, 34, -7808.72, -1134.90, 214.84, 0, ''), +(9520, 35, -7786.85, -1127.24, 214.84, 0, ''), +(9520, 36, -7746.58, -1125.16, 215.08, 5000, 'EMOTE_LAUGH'), +(9520, 37, -7746.41, -1103.62, 215.62, 0, ''), +(9520, 38, -7740.25, -1090.51, 216.69, 0, ''), +(9520, 39, -7730.97, -1085.55, 217.12, 0, ''), +(9520, 40, -7697.89, -1089.43, 217.62, 0, ''), +(9520, 41, -7679.30, -1059.15, 220.09, 0, ''), +(9520, 42, -7661.39, -1038.24, 226.24, 0, ''), +(9520, 43, -7634.49, -1020.96, 234.30, 0, ''), +(9520, 44, -7596.22, -1013.16, 244.03, 0, ''), +(9520, 45, -7556.53, -1021.74, 253.21, 0, 'SAY_LAST_STAND'); From 9d3df48298ba026065206282291748ac8bdfbb7e Mon Sep 17 00:00:00 2001 From: Chero Date: Fri, 10 Aug 2012 10:57:19 +0300 Subject: [PATCH 0640/1172] [2652] Implement script support for quest 4322 Signed-off-by: Xfurry --- .../blackrock_depths/blackrock_depths.cpp | 350 +++++++++++++++++- .../blackrock_depths/blackrock_depths.h | 15 +- .../instance_blackrock_depths.cpp | 23 +- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 3 + sql/scriptdev2_script_full.sql | 93 ++++- sql/updates/r2652_mangos.sql | 3 + sql/updates/r2652_scriptdev2.sql | 92 +++++ 8 files changed, 575 insertions(+), 6 deletions(-) create mode 100644 sql/updates/r2652_mangos.sql create mode 100644 sql/updates/r2652_scriptdev2.sql diff --git a/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.cpp b/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.cpp index 60e01df5e..6d36af39f 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.cpp +++ b/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.cpp @@ -17,7 +17,7 @@ /* ScriptData SDName: Blackrock_Depths SD%Complete: 80 -SDComment: Quest support: 4001, 4342, 7604, 9015. Vendor Lokhtos Darkbargainer. +SDComment: Quest support: 4001, 4322, 4342, 7604, 9015. Vendor Lokhtos Darkbargainer. SDCategory: Blackrock Depths EndScriptData */ @@ -29,6 +29,9 @@ npc_grimstone mob_phalanx npc_kharan_mighthammer npc_lokhtos_darkbargainer +npc_marshal_windsor +npc_dughal_stormwing +npc_tobias_seecher EndContentData */ #include "precompiled.h" @@ -804,6 +807,333 @@ bool QuestRewarded_npc_rocknot(Player* pPlayer, Creature* pCreature, Quest const return true; } +/*###### +## npc_marshal_windsor +######*/ + +enum +{ + // Windsor texts + SAY_WINDSOR_AGGRO1 = -1230011, + SAY_WINDSOR_AGGRO2 = -1230012, + SAY_WINDSOR_AGGRO3 = -1230013, + SAY_WINDSOR_START = -1230014, + SAY_WINDSOR_CELL_DUGHAL_1 = -1230015, + SAY_WINDSOR_CELL_DUGHAL_3 = -1230016, + SAY_WINDSOR_EQUIPMENT_1 = -1230017, + SAY_WINDSOR_EQUIPMENT_2 = -1230018, + SAY_WINDSOR_EQUIPMENT_3 = -1230019, + SAY_WINDSOR_EQUIPMENT_4 = -1230020, + SAY_WINDSOR_CELL_JAZ_1 = -1230021, + SAY_WINDSOR_CELL_JAZ_2 = -1230022, + SAY_WINDSOR_CELL_SHILL_1 = -1230023, + SAY_WINDSOR_CELL_SHILL_2 = -1230024, + SAY_WINDSOR_CELL_SHILL_3 = -1230025, + SAY_WINDSOR_CELL_CREST_1 = -1230026, + SAY_WINDSOR_CELL_CREST_2 = -1230027, + SAY_WINDSOR_CELL_TOBIAS_1 = -1230028, + SAY_WINDSOR_CELL_TOBIAS_2 = -1230029, + SAY_WINDSOR_FREE_1 = -1230030, + SAY_WINDSOR_FREE_2 = -1230031, + + // Additional gossips + SAY_DUGHAL_FREE = -1230010, + GOSSIP_ID_DUGHAL = -3230000, + GOSSIP_TEXT_ID_DUGHAL = 2846, + + SAY_TOBIAS_FREE_1 = -1230032, + SAY_TOBIAS_FREE_2 = -1230033, + GOSSIP_ID_TOBIAS = -3230001, + GOSSIP_TEXT_ID_TOBIAS = 2847, + + NPC_REGINALD_WINDSOR = 9682, + + QUEST_JAIL_BREAK = 4322 +}; + +struct MANGOS_DLL_DECL npc_marshal_windsorAI : public npc_escortAI +{ + npc_marshal_windsorAI(Creature* m_creature) : npc_escortAI(m_creature) + { + m_pInstance = (instance_blackrock_depths*)m_creature->GetInstanceData(); + Reset(); + } + + instance_blackrock_depths* m_pInstance; + + uint8 m_uiEventPhase; + + void Reset() + { + if (!HasEscortState(STATE_ESCORT_ESCORTING)) + m_uiEventPhase = 0; + } + + void Aggro(Unit* pWho) + { + switch (urand(0, 2)) + { + case 0: DoScriptText(SAY_WINDSOR_AGGRO1, m_creature, pWho); break; + case 1: DoScriptText(SAY_WINDSOR_AGGRO2, m_creature); break; + case 2: DoScriptText(SAY_WINDSOR_AGGRO3, m_creature, pWho); break; + } + } + + void WaypointReached(uint32 uiPointId) + { + switch (uiPointId) + { + case 1: + if (m_pInstance) + m_pInstance->SetData(TYPE_QUEST_JAIL_BREAK, IN_PROGRESS); + + DoScriptText(SAY_WINDSOR_START, m_creature); + break; + case 7: + if (Player* pPlayer = GetPlayerForEscort()) + DoScriptText(SAY_WINDSOR_CELL_DUGHAL_1, m_creature, pPlayer); + if (m_pInstance) + { + if (Creature* pDughal = m_pInstance->GetSingleCreatureFromStorage(NPC_DUGHAL)) + { + pDughal->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); + m_creature->SetFacingToObject(pDughal); + } + } + ++m_uiEventPhase; + SetEscortPaused(true); + break; + case 9: + if (Player* pPlayer = GetPlayerForEscort()) + DoScriptText(SAY_WINDSOR_CELL_DUGHAL_3, m_creature, pPlayer); + break; + case 14: + if (Player* pPlayer = GetPlayerForEscort()) + DoScriptText(SAY_WINDSOR_EQUIPMENT_1, m_creature, pPlayer); + break; + case 15: + m_creature->HandleEmoteCommand(EMOTE_ONESHOT_USESTANDING); + break; + case 16: + if (m_pInstance) + m_pInstance->DoUseDoorOrButton(GO_JAIL_DOOR_SUPPLY); + break; + case 18: + DoScriptText(SAY_WINDSOR_EQUIPMENT_2, m_creature); + break; + case 19: + m_creature->HandleEmoteCommand(EMOTE_ONESHOT_USESTANDING); + break; + case 20: + if (m_pInstance) + m_pInstance->DoUseDoorOrButton(GO_JAIL_SUPPLY_CRATE); + break; + case 21: + m_creature->UpdateEntry(NPC_REGINALD_WINDSOR); + break; + case 22: + if (Player* pPlayer = GetPlayerForEscort()) + { + DoScriptText(SAY_WINDSOR_EQUIPMENT_3, m_creature, pPlayer); + m_creature->SetFacingToObject(pPlayer); + } + break; + case 23: + DoScriptText(SAY_WINDSOR_EQUIPMENT_4, m_creature); + if (Player* pPlayer = GetPlayerForEscort()) + m_creature->SetFacingToObject(pPlayer); + break; + case 30: + if (m_pInstance) + { + if (Creature* pJaz = m_pInstance->GetSingleCreatureFromStorage(NPC_JAZ)) + m_creature->SetFacingToObject(pJaz); + } + DoScriptText(SAY_WINDSOR_CELL_JAZ_1, m_creature); + ++m_uiEventPhase; + SetEscortPaused(true); + break; + case 32: + DoScriptText(SAY_WINDSOR_CELL_JAZ_2, m_creature); + break; + case 35: + if (m_pInstance) + { + if (Creature* pShill = m_pInstance->GetSingleCreatureFromStorage(NPC_SHILL)) + m_creature->SetFacingToObject(pShill); + } + DoScriptText(SAY_WINDSOR_CELL_SHILL_1, m_creature); + ++m_uiEventPhase; + SetEscortPaused(true); + break; + case 37: + DoScriptText(SAY_WINDSOR_CELL_SHILL_2, m_creature); + break; + case 38: + DoScriptText(SAY_WINDSOR_CELL_SHILL_3, m_creature); + break; + case 45: + if (m_pInstance) + { + if (Creature* pCrest = m_pInstance->GetSingleCreatureFromStorage(NPC_CREST)) + m_creature->SetFacingToObject(pCrest); + } + DoScriptText(SAY_WINDSOR_CELL_CREST_1, m_creature); + ++m_uiEventPhase; + SetEscortPaused(true); + break; + case 47: + DoScriptText(SAY_WINDSOR_CELL_CREST_2, m_creature); + break; + case 49: + DoScriptText(SAY_WINDSOR_CELL_TOBIAS_1, m_creature); + if (m_pInstance) + { + if (Creature* pTobias = m_pInstance->GetSingleCreatureFromStorage(NPC_TOBIAS)) + { + pTobias->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); + m_creature->SetFacingToObject(pTobias); + } + } + ++m_uiEventPhase; + SetEscortPaused(true); + break; + case 51: + if (Player* pPlayer = GetPlayerForEscort()) + DoScriptText(SAY_WINDSOR_CELL_TOBIAS_2, m_creature, pPlayer); + break; + case 57: + DoScriptText(SAY_WINDSOR_FREE_1, m_creature); + if (Player* pPlayer = GetPlayerForEscort()) + m_creature->SetFacingToObject(pPlayer); + break; + case 58: + DoScriptText(SAY_WINDSOR_FREE_2, m_creature); + if (m_pInstance) + m_pInstance->SetData(TYPE_QUEST_JAIL_BREAK, DONE); + + if (Player* pPlayer = GetPlayerForEscort()) + pPlayer->GroupEventHappens(QUEST_JAIL_BREAK, m_creature); + break; + } + } + + void UpdateEscortAI(const uint32 uiDiff) + { + // Handle escort resume events + if (m_pInstance && m_pInstance->GetData(TYPE_QUEST_JAIL_BREAK) == SPECIAL) + { + switch (m_uiEventPhase) + { + case 1: // Dughal + case 3: // Ograbisi + case 4: // Crest + case 5: // Shill + case 6: // Tobias + SetEscortPaused(false); + break; + case 2: // Jaz + ++m_uiEventPhase; + break; + } + + m_pInstance->SetData(TYPE_QUEST_JAIL_BREAK, IN_PROGRESS); + } + + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_npc_marshal_windsor(Creature* pCreature) +{ + return new npc_marshal_windsorAI(pCreature); +} + +bool QuestAccept_npc_marshal_windsor(Player* pPlayer, Creature* pCreature, const Quest* pQuest) +{ + if (pQuest->GetQuestId() == QUEST_JAIL_BREAK) + { + pCreature->SetFactionTemporary(FACTION_ESCORT_A_NEUTRAL_ACTIVE, TEMPFACTION_RESTORE_RESPAWN); + + if (npc_marshal_windsorAI* pEscortAI = dynamic_cast(pCreature->AI())) + pEscortAI->Start(false, pPlayer, pQuest); + + return true; + } + + return false; +} + +/*###### +## npc_dughal_stormwing +######*/ + +bool GossipHello_npc_dughal_stormwing(Player* pPlayer, Creature* pCreature) +{ + if (pPlayer->GetQuestStatus(QUEST_JAIL_BREAK) == QUEST_STATUS_INCOMPLETE) + pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ID_DUGHAL, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXT_ID_DUGHAL, pCreature->GetObjectGuid()); + return true; +} + +bool GossipSelect_npc_dughal_stormwing(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + if (uiAction == GOSSIP_ACTION_INFO_DEF+1) + { + // Set instance data in order to allow the quest to continue + if (instance_blackrock_depths* pInstance = (instance_blackrock_depths*)pCreature->GetInstanceData()) + pInstance->SetData(TYPE_QUEST_JAIL_BREAK, SPECIAL); + + DoScriptText(SAY_DUGHAL_FREE, pCreature, pPlayer); + pCreature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); + + pCreature->SetWalk(false); + pCreature->GetMotionMaster()->MoveWaypoint(); + + pPlayer->CLOSE_GOSSIP_MENU(); + } + + return true; +} + +/*###### +## npc_tobias_seecher +######*/ + +bool GossipHello_npc_tobias_seecher(Player* pPlayer, Creature* pCreature) +{ + if (pPlayer->GetQuestStatus(QUEST_JAIL_BREAK) == QUEST_STATUS_INCOMPLETE) + pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ID_TOBIAS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXT_ID_TOBIAS, pCreature->GetObjectGuid()); + + return true; +} + +bool GossipSelect_npc_tobias_seecher(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + if (uiAction == GOSSIP_ACTION_INFO_DEF+1) + { + // Set instance data in order to allow the quest to continue + if (instance_blackrock_depths* pInstance = (instance_blackrock_depths*)pCreature->GetInstanceData()) + pInstance->SetData(TYPE_QUEST_JAIL_BREAK, SPECIAL); + + DoScriptText(urand(0, 1) ? SAY_TOBIAS_FREE_1 : SAY_TOBIAS_FREE_2, pCreature); + pCreature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); + + pCreature->SetWalk(false); + pCreature->GetMotionMaster()->MoveWaypoint(); + + pPlayer->CLOSE_GOSSIP_MENU(); + } + + return true; +} + void AddSC_blackrock_depths() { Script* pNewScript; @@ -855,4 +1185,22 @@ void AddSC_blackrock_depths() pNewScript->GetAI = &GetAI_npc_rocknot; pNewScript->pQuestRewardedNPC = &QuestRewarded_npc_rocknot; pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_marshal_windsor"; + pNewScript->GetAI = &GetAI_npc_marshal_windsor; + pNewScript->pQuestAcceptNPC = &QuestAccept_npc_marshal_windsor; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_tobias_seecher"; + pNewScript->pGossipHello = &GossipHello_npc_tobias_seecher; + pNewScript->pGossipSelect = &GossipSelect_npc_tobias_seecher; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_dughal_stormwing"; + pNewScript->pGossipHello = &GossipHello_npc_dughal_stormwing; + pNewScript->pGossipSelect = &GossipSelect_npc_dughal_stormwing; + pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.h b/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.h index 14696ada6..76066f642 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.h +++ b/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.h @@ -7,7 +7,7 @@ enum { - MAX_ENCOUNTER = 6, + MAX_ENCOUNTER = 7, MAX_RELIC_DOORS = 12, TYPE_RING_OF_LAW = 1, @@ -16,6 +16,7 @@ enum TYPE_TOMB_OF_SEVEN = 4, TYPE_LYCEUM = 5, TYPE_IRON_HALL = 6, + TYPE_QUEST_JAIL_BREAK = 7, NPC_EMPEROR = 9019, NPC_PRINCESS = 8929, @@ -30,6 +31,14 @@ enum NPC_WATCHER_DOOMGRIP = 9476, NPC_WARBRINGER_CONST = 8905, // Four of them in Relict Vault are related to Doomgrip summon event + // Jail Break event related + NPC_OGRABISI = 9677, + NPC_SHILL = 9678, + NPC_CREST = 9680, + NPC_JAZ = 9681, + NPC_TOBIAS = 9679, + NPC_DUGHAL = 9022, + GO_ARENA_1 = 161525, GO_ARENA_2 = 161522, GO_ARENA_3 = 161524, @@ -54,6 +63,10 @@ enum GO_ARENA_SPOILS = 181074, GO_SECRET_DOOR = 174553, + // Jail break event related + GO_JAIL_DOOR_SUPPLY = 170561, + GO_JAIL_SUPPLY_CRATE = 166872, + SPELL_STONED = 10255, // Aura of Warbringer Constructs in Relict Vault }; diff --git a/scripts/eastern_kingdoms/blackrock_depths/instance_blackrock_depths.cpp b/scripts/eastern_kingdoms/blackrock_depths/instance_blackrock_depths.cpp index 7474eed3c..1e0a45fbd 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/instance_blackrock_depths.cpp +++ b/scripts/eastern_kingdoms/blackrock_depths/instance_blackrock_depths.cpp @@ -53,6 +53,11 @@ void instance_blackrock_depths::OnCreatureCreate(Creature* pCreature) case NPC_GLOOMREL: case NPC_SEETHREL: case NPC_DOPEREL: + case NPC_SHILL: + case NPC_CREST: + case NPC_JAZ: + case NPC_TOBIAS: + case NPC_DUGHAL: m_mNpcEntryGuidStore[pCreature->GetEntry()] = pCreature->GetObjectGuid(); break; @@ -94,6 +99,8 @@ void instance_blackrock_depths::OnObjectCreate(GameObject* pGo) case GO_CHEST_SEVEN: case GO_ARENA_SPOILS: case GO_SECRET_DOOR: + case GO_JAIL_DOOR_SUPPLY: + case GO_JAIL_SUPPLY_CRATE: break; default: @@ -194,6 +201,9 @@ void instance_blackrock_depths::SetData(uint32 uiType, uint32 uiData) } m_auiEncounter[5] = uiData; break; + case TYPE_QUEST_JAIL_BREAK: + m_auiEncounter[6] = uiData; + return; } if (uiData == DONE) @@ -202,7 +212,7 @@ void instance_blackrock_depths::SetData(uint32 uiType, uint32 uiData) std::ostringstream saveStream; saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2] << " " - << m_auiEncounter[3] << " " << m_auiEncounter[4] << " " << m_auiEncounter[5]; + << m_auiEncounter[3] << " " << m_auiEncounter[4] << " " << m_auiEncounter[5] << " " << m_auiEncounter[6]; m_strInstData = saveStream.str(); @@ -230,6 +240,8 @@ uint32 instance_blackrock_depths::GetData(uint32 uiType) return m_auiEncounter[4]; case TYPE_IRON_HALL: return m_auiEncounter[5]; + case TYPE_QUEST_JAIL_BREAK: + return m_auiEncounter[6]; default: return 0; } @@ -247,7 +259,7 @@ void instance_blackrock_depths::Load(const char* chrIn) std::istringstream loadStream(chrIn); loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3] - >> m_auiEncounter[4] >> m_auiEncounter[5]; + >> m_auiEncounter[4] >> m_auiEncounter[5] >> m_auiEncounter[6]; for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) if (m_auiEncounter[i] == IN_PROGRESS) @@ -286,6 +298,13 @@ void instance_blackrock_depths::OnCreatureDeath(Creature* pCreature) SetData(TYPE_VAULT, DONE); } break; + case NPC_OGRABISI: + case NPC_SHILL: + case NPC_CREST: + case NPC_JAZ: + if (GetData(TYPE_QUEST_JAIL_BREAK) == IN_PROGRESS) + SetData(TYPE_QUEST_JAIL_BREAK, SPECIAL); + break; } } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 37c56f3a2..f0b957061 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2651" + #define SD2_REVISION_NR "2652" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index db7317dc5..007c887d4 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -353,6 +353,9 @@ UPDATE creature_template SET ScriptName='npc_theldren_trigger' WHERE entry=16079 UPDATE creature_template SET ScriptName='npc_lokhtos_darkbargainer' WHERE entry=12944; UPDATE creature_template SET ScriptName='npc_kharan_mighthammer' WHERE entry=9021; UPDATE creature_template SET ScriptName='npc_rocknot' WHERE entry=9503; +UPDATE creature_template SET ScriptName ='npc_marshal_windsor' WHERE entry=9023; +UPDATE creature_template SET ScriptName ='npc_dughal_stormwing' WHERE entry=9022; +UPDATE creature_template SET ScriptName ='npc_tobias_seecher' WHERE entry=9679; UPDATE gameobject_template SET ScriptName='go_shadowforge_brazier' WHERE entry IN (174744, 174745); UPDATE gameobject_template SET ScriptName='go_relic_coffer_door' WHERE entry IN (174554, 174555, 174556, 174557, 174558, 174559, 174560, 174561, 174562, 174563, 174564, 174566); diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 7290d5117..d5903f1ac 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -1201,7 +1201,32 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1230006,'Unleash the fury and let it be done!',0,1,0,0,'grimstone SAY_OPEN_EAST_GATE'), (-1230007,'But your real punishment lies ahead.',0,1,0,0,'grimstone SAY_SUMMON_BOSS_1'), (-1230008,'Haha! I bet you thought you were done!',0,1,0,0,'grimstone SAY_SUMMON_BOSS_2'), -(-1230009,'Good Riddance!',0,1,0,0,'grimstone SAY_OPEN_NORTH_GATE'); +(-1230009,'Good Riddance!',0,1,0,0,'grimstone SAY_OPEN_NORTH_GATE'), + +(-1230010,'Thank you, $N! I\'m free!!!',0,0,0,0,'dughal SAY_FREE'), +(-1230011,'You locked up the wrong Marshal, $N. Prepare to be destroyed!',0,0,0,0,'windsor SAY_AGGRO_1'), +(-1230012,'I bet you\'re sorry now, aren\'t you?',0,0,0,0,'windsor SAY_AGGRO_2'), +(-1230013,'You better hold me back or $N is going to feel some prison house beatings.',0,0,0,0,'windsor SAY_AGGRO_3'), +(-1230014,'Let\'s get a move on. My gear should be in the storage area up this way...',0,0,0,0,'windsor SAY_START'), +(-1230015,'Check that cell, $N. If someone is alive in there, we need to get them out.',0,0,0,25,'windsor SAY_CELL_DUGHAL_1'), +(-1230016,'Good work! We\'re almost there, $N. This way.',0,0,0,0,'windsor SAY_CELL_DUGHAL_3'), +(-1230017,'This is it, $N. My stuff should be in that room. Cover me, I\'m going in!',0,0,0,0,'windsor SAY_EQUIPMENT_1'), +(-1230018,'Ah, there it is!',0,0,0,0,'windsor SAY_EQUIPMENT_2'), +(-1230019,'Can you feel the power, $N??? It\'s time to ROCK!',0,0,0,0,'reginald_windsor SAY__EQUIPMENT_3'), +(-1230020,'Now we just have to free Tobias and we can get out of here. This way!',0,0,0,0,'reginald_windsor SAY__EQUIPMENT_4'), +(-1230021,'Open it.',0,0,0,25,'reginald_windsor SAY_CELL_JAZ_1'), +(-1230022,'I never did like those two. Let\'s get moving.',0,0,0,0,'reginald_windsor SAY_CELL_JAZ_2'), +(-1230023,'Open it and be careful this time!',0,0,0,25,'reginald_windsor SAY_CELL_SHILL_1'), +(-1230024,'That intolerant dirtbag finally got what was coming to him. Good riddance!',0,0,0,66,'reginald_windsor SAY_CELL_SHILL_2'), +(-1230025,'Alright, let\'s go.',0,0,0,0,'reginald_windsor SAY_CELL_SHILL_3'), +(-1230026,'Open it. We need to hurry up. I can smell those Dark Irons coming a mile away and I can tell you one thing, they\'re COMING!',0,0,0,25,'reginald_windsor SAY_CELL_CREST_1'), +(-1230027,'He has to be in the last cell. Unless... they killed him.',0,0,0,0,'reginald_windsor SAY_CELL_CREST_2'), +(-1230028,'Get him out of there!',0,0,0,25,'reginald_windsor SAY_CELL_TOBIAS_1'), +(-1230029,'Excellent work, $N. Let\'s find the exit. I think I know the way. Follow me!',0,0,0,0,'reginald_windsor SAY_CELL_TOBIAS_2'), +(-1230030,'We made it!',0,0,0,4,'reginald_windsor SAY_FREE_1'), +(-1230031,'Meet me at Maxwell\'s encampment. We\'ll go over the next stages of the plan there and figure out a way to decode my tablets without the decryption ring.',0,0,0,1,'reginald_windsor SAY_FREE_2'), +(-1230032,'Thank you! I will run for safety immediately!',0,0,0,0,'tobias SAY_TOBIAS_FREE_1'), +(-1230033,'Finally!! I can leave this dump.',0,0,0,0,'tobias SAY_TOBIAS_FREE_2'); -- -1 249 000 ONYXIA'S LAIR INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES @@ -4273,6 +4298,11 @@ INSERT INTO gossip_texts (entry,content_default,comment) VALUES INSERT INTO gossip_texts (entry,content_default,comment) VALUES (-3090000,'I am ready to begin.','emi shortfuse GOSSIP_ITEM_START'); +-- -3 230 000 BLACKROCK DEPTHS +INSERT INTO gossip_texts (entry,content_default,comment) VALUES +(-3230000,'You\'re free, Dughal! Get out of here!','dughal GOSSIP_ITEM'), +(-3230001,'Get out of here, Tobias, you\'re free!','tobias GOSSIP_ITEM'); + -- -3 409 000 MOLTEN CORE INSERT INTO gossip_texts (entry,content_default,comment) VALUES (-3409000,'Tell me more.','majordomo_executus GOSSIP_ITEM_SUMMON_1'), @@ -6773,4 +6803,65 @@ INSERT INTO script_waypoint VALUES (9520, 44, -7596.22, -1013.16, 244.03, 0, ''), (9520, 45, -7556.53, -1021.74, 253.21, 0, 'SAY_LAST_STAND'); +DELETE FROM script_waypoint WHERE entry=9023; +INSERT INTO script_waypoint VALUES +(9023, 1, 316.336, -225.528, -77.7258, 2000, 'SAY_WINDSOR_START'), +(9023, 2, 322.96, -207.13, -77.87, 0, ''), +(9023, 3, 281.05, -172.16, -75.12, 0, ''), +(9023, 4, 272.19, -139.14, -70.61, 0, ''), +(9023, 5, 283.62, -116.09, -70.21, 0, ''), +(9023, 6, 296.18, -94.30, -74.08, 0, ''), +(9023, 7, 294.57, -93.11, -74.08, 0, 'escort paused - SAY_WINDSOR_CELL_DUGHAL_1'), +(9023, 8, 294.57, -93.11, -74.08, 10000, ''), +(9023, 9, 294.57, -93.11, -74.08, 3000, 'SAY_WINDSOR_CELL_DUGHAL_3'), +(9023, 10, 314.31, -74.31, -76.09, 0, ''), +(9023, 11, 360.22, -62.93, -66.77, 0, ''), +(9023, 12, 383.38, -69.40, -63.25, 0, ''), +(9023, 13, 389.99, -67.86, -62.57, 0, ''), +(9023, 14, 400.98, -72.01, -62.31, 0, 'SAY_WINDSOR_EQUIPMENT_1'), +(9023, 15, 404.22, -62.30, -63.50, 2000, ''), +(9023, 16, 404.22, -62.30, -63.50, 1500, 'open supply door'), +(9023, 17, 407.65, -51.86, -63.96, 0, ''), +(9023, 18, 403.61, -51.71, -63.92, 1000, 'SAY_WINDSOR_EQUIPMENT_2'), +(9023, 19, 403.61, -51.71, -63.92, 2000, ''), +(9023, 20, 403.61, -51.71, -63.92, 1000, 'open supply crate'), +(9023, 21, 403.61, -51.71, -63.92, 1000, 'update entry to Reginald Windsor'), +(9023, 22, 403.61, -52.71, -63.92, 4000, 'SAY_WINDSOR_EQUIPMENT_3'), +(9023, 23, 403.61, -52.71, -63.92, 4000, 'SAY_WINDSOR_EQUIPMENT_4'), +(9023, 24, 406.33, -54.87, -63.95, 0, ''), +(9023, 25, 403.86, -73.88, -62.02, 0, ''), +(9023, 26, 428.80, -81.34, -64.91, 0, ''), +(9023, 27, 557.03, -119.71, -61.83, 0, ''), +(9023, 28, 573.40, -124.39, -65.07, 0, ''), +(9023, 29, 593.91, -130.29, -69.25, 0, ''), +(9023, 30, 593.21, -132.16, -69.25, 0, 'escort paused - SAY_WINDSOR_CELL_JAZ_1'), +(9023, 31, 593.21, -132.16, -69.25, 1000, ''), +(9023, 32, 593.21, -132.16, -69.25, 3000, 'SAY_WINDSOR_CELL_JAZ_2'), +(9023, 33, 622.81, -135.55, -71.92, 0, ''), +(9023, 34, 634.68, -151.29, -70.32, 0, ''), +(9023, 35, 635.06, -153.25, -70.32, 0, 'escort paused - SAY_WINDSOR_CELL_SHILL_1'), +(9023, 36, 635.06, -153.25, -70.32, 3000, ''), +(9023, 37, 635.06, -153.25, -70.32, 5000, 'SAY_WINDSOR_CELL_SHILL_2'), +(9023, 38, 635.06, -153.25, -70.32, 2000, 'SAY_WINDSOR_CELL_SHILL_3'), +(9023, 39, 655.25, -172.39, -73.72, 0, ''), +(9023, 40, 654.79, -226.30, -83.06, 0, ''), +(9023, 41, 622.85, -268.85, -83.96, 0, ''), +(9023, 42, 579.45, -275.56, -80.44, 0, ''), +(9023, 43, 561.19, -266.85, -75.59, 0, ''), +(9023, 44, 547.91, -253.92, -70.34, 0, ''), +(9023, 45, 549.20, -252.40, -70.34, 0, 'escort paused - SAY_WINDSOR_CELL_CREST_1'), +(9023, 46, 549.20, -252.40, -70.34, 1000, ''), +(9023, 47, 549.20, -252.40, -70.34, 4000, 'SAY_WINDSOR_CELL_CREST_2'), +(9023, 48, 555.33, -269.16, -74.40, 0, ''), +(9023, 49, 554.31, -270.88, -74.40, 0, 'escort paused - SAY_WINDSOR_CELL_TOBIAS_1'), +(9023, 50, 554.31, -270.88, -74.40, 10000, ''), +(9023, 51, 554.31, -270.88, -74.40, 4000, 'SAY_WINDSOR_CELL_TOBIAS_2'), +(9023, 52, 536.10, -249.60, -67.47, 0, ''), +(9023, 53, 520.94, -216.65, -59.28, 0, ''), +(9023, 54, 505.99, -148.74, -62.17, 0, ''), +(9023, 55, 484.21, -56.24, -62.43, 0, ''), +(9023, 56, 470.39, -6.01, -70.10, 0, ''), +(9023, 57, 452.45, 29.85, -70.37, 1500, 'SAY_WINDSOR_FREE_1'), +(9023, 58, 452.45, 29.85, -70.37, 15000, 'SAY_WINDSOR_FREE_2'); + -- EOF diff --git a/sql/updates/r2652_mangos.sql b/sql/updates/r2652_mangos.sql new file mode 100644 index 000000000..8fa66e566 --- /dev/null +++ b/sql/updates/r2652_mangos.sql @@ -0,0 +1,3 @@ +UPDATE creature_template SET ScriptName ='npc_marshal_windsor' WHERE entry=9023; +UPDATE creature_template SET ScriptName ='npc_dughal_stormwing' WHERE entry=9022; +UPDATE creature_template SET ScriptName ='npc_tobias_seecher' WHERE entry=9679; diff --git a/sql/updates/r2652_scriptdev2.sql b/sql/updates/r2652_scriptdev2.sql new file mode 100644 index 000000000..bf693d239 --- /dev/null +++ b/sql/updates/r2652_scriptdev2.sql @@ -0,0 +1,92 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1230033 AND -1230010; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1230010,'Thank you, $N! I\'m free!!!',0,0,0,0,'dughal SAY_FREE'), +(-1230011,'You locked up the wrong Marshal, $N. Prepare to be destroyed!',0,0,0,0,'windsor SAY_AGGRO_1'), +(-1230012,'I bet you\'re sorry now, aren\'t you?',0,0,0,0,'windsor SAY_AGGRO_2'), +(-1230013,'You better hold me back or $N is going to feel some prison house beatings.',0,0,0,0,'windsor SAY_AGGRO_3'), +(-1230014,'Let\'s get a move on. My gear should be in the storage area up this way...',0,0,0,0,'windsor SAY_START'), +(-1230015,'Check that cell, $N. If someone is alive in there, we need to get them out.',0,0,0,25,'windsor SAY_CELL_DUGHAL_1'), +(-1230016,'Good work! We\'re almost there, $N. This way.',0,0,0,0,'windsor SAY_CELL_DUGHAL_3'), +(-1230017,'This is it, $N. My stuff should be in that room. Cover me, I\'m going in!',0,0,0,0,'windsor SAY_EQUIPMENT_1'), +(-1230018,'Ah, there it is!',0,0,0,0,'windsor SAY_EQUIPMENT_2'), +(-1230019,'Can you feel the power, $N??? It\'s time to ROCK!',0,0,0,0,'reginald_windsor SAY__EQUIPMENT_3'), +(-1230020,'Now we just have to free Tobias and we can get out of here. This way!',0,0,0,0,'reginald_windsor SAY__EQUIPMENT_4'), +(-1230021,'Open it.',0,0,0,25,'reginald_windsor SAY_CELL_JAZ_1'), +(-1230022,'I never did like those two. Let\'s get moving.',0,0,0,0,'reginald_windsor SAY_CELL_JAZ_2'), +(-1230023,'Open it and be careful this time!',0,0,0,25,'reginald_windsor SAY_CELL_SHILL_1'), +(-1230024,'That intolerant dirtbag finally got what was coming to him. Good riddance!',0,0,0,66,'reginald_windsor SAY_CELL_SHILL_2'), +(-1230025,'Alright, let\'s go.',0,0,0,0,'reginald_windsor SAY_CELL_SHILL_3'), +(-1230026,'Open it. We need to hurry up. I can smell those Dark Irons coming a mile away and I can tell you one thing, they\'re COMING!',0,0,0,25,'reginald_windsor SAY_CELL_CREST_1'), +(-1230027,'He has to be in the last cell. Unless... they killed him.',0,0,0,0,'reginald_windsor SAY_CELL_CREST_2'), +(-1230028,'Get him out of there!',0,0,0,25,'reginald_windsor SAY_CELL_TOBIAS_1'), +(-1230029,'Excellent work, $N. Let\'s find the exit. I think I know the way. Follow me!',0,0,0,0,'reginald_windsor SAY_CELL_TOBIAS_2'), +(-1230030,'We made it!',0,0,0,4,'reginald_windsor SAY_FREE_1'), +(-1230031,'Meet me at Maxwell\'s encampment. We\'ll go over the next stages of the plan there and figure out a way to decode my tablets without the decryption ring.',0,0,0,1,'reginald_windsor SAY_FREE_2'), +(-1230032,'Thank you! I will run for safety immediately!',0,0,0,0,'tobias SAY_TOBIAS_FREE_1'), +(-1230033,'Finally!! I can leave this dump.',0,0,0,0,'tobias SAY_TOBIAS_FREE_2'); + +DELETE FROM gossip_texts WHERE entry IN (-3230000, -3230001); +INSERT INTO gossip_texts (entry,content_default,comment) VALUES +(-3230000,'You\'re free, Dughal! Get out of here!','dughal GOSSIP_ITEM'), +(-3230001,'Get out of here, Tobias, you\'re free!','tobias GOSSIP_ITEM'); + +DELETE FROM script_waypoint WHERE entry=9023; +INSERT INTO script_waypoint VALUES +(9023, 1, 316.336, -225.528, -77.7258, 2000, 'SAY_WINDSOR_START'), +(9023, 2, 322.96, -207.13, -77.87, 0, ''), +(9023, 3, 281.05, -172.16, -75.12, 0, ''), +(9023, 4, 272.19, -139.14, -70.61, 0, ''), +(9023, 5, 283.62, -116.09, -70.21, 0, ''), +(9023, 6, 296.18, -94.30, -74.08, 0, ''), +(9023, 7, 294.57, -93.11, -74.08, 0, 'escort paused - SAY_WINDSOR_CELL_DUGHAL_1'), +(9023, 8, 294.57, -93.11, -74.08, 10000, ''), +(9023, 9, 294.57, -93.11, -74.08, 3000, 'SAY_WINDSOR_CELL_DUGHAL_3'), +(9023, 10, 314.31, -74.31, -76.09, 0, ''), +(9023, 11, 360.22, -62.93, -66.77, 0, ''), +(9023, 12, 383.38, -69.40, -63.25, 0, ''), +(9023, 13, 389.99, -67.86, -62.57, 0, ''), +(9023, 14, 400.98, -72.01, -62.31, 0, 'SAY_WINDSOR_EQUIPMENT_1'), +(9023, 15, 404.22, -62.30, -63.50, 2000, ''), +(9023, 16, 404.22, -62.30, -63.50, 1500, 'open supply door'), +(9023, 17, 407.65, -51.86, -63.96, 0, ''), +(9023, 18, 403.61, -51.71, -63.92, 1000, 'SAY_WINDSOR_EQUIPMENT_2'), +(9023, 19, 403.61, -51.71, -63.92, 2000, ''), +(9023, 20, 403.61, -51.71, -63.92, 1000, 'open supply crate'), +(9023, 21, 403.61, -51.71, -63.92, 1000, 'update entry to Reginald Windsor'), +(9023, 22, 403.61, -52.71, -63.92, 4000, 'SAY_WINDSOR_EQUIPMENT_3'), +(9023, 23, 403.61, -52.71, -63.92, 4000, 'SAY_WINDSOR_EQUIPMENT_4'), +(9023, 24, 406.33, -54.87, -63.95, 0, ''), +(9023, 25, 403.86, -73.88, -62.02, 0, ''), +(9023, 26, 428.80, -81.34, -64.91, 0, ''), +(9023, 27, 557.03, -119.71, -61.83, 0, ''), +(9023, 28, 573.40, -124.39, -65.07, 0, ''), +(9023, 29, 593.91, -130.29, -69.25, 0, ''), +(9023, 30, 593.21, -132.16, -69.25, 0, 'escort paused - SAY_WINDSOR_CELL_JAZ_1'), +(9023, 31, 593.21, -132.16, -69.25, 1000, ''), +(9023, 32, 593.21, -132.16, -69.25, 3000, 'SAY_WINDSOR_CELL_JAZ_2'), +(9023, 33, 622.81, -135.55, -71.92, 0, ''), +(9023, 34, 634.68, -151.29, -70.32, 0, ''), +(9023, 35, 635.06, -153.25, -70.32, 0, 'escort paused - SAY_WINDSOR_CELL_SHILL_1'), +(9023, 36, 635.06, -153.25, -70.32, 3000, ''), +(9023, 37, 635.06, -153.25, -70.32, 5000, 'SAY_WINDSOR_CELL_SHILL_2'), +(9023, 38, 635.06, -153.25, -70.32, 2000, 'SAY_WINDSOR_CELL_SHILL_3'), +(9023, 39, 655.25, -172.39, -73.72, 0, ''), +(9023, 40, 654.79, -226.30, -83.06, 0, ''), +(9023, 41, 622.85, -268.85, -83.96, 0, ''), +(9023, 42, 579.45, -275.56, -80.44, 0, ''), +(9023, 43, 561.19, -266.85, -75.59, 0, ''), +(9023, 44, 547.91, -253.92, -70.34, 0, ''), +(9023, 45, 549.20, -252.40, -70.34, 0, 'escort paused - SAY_WINDSOR_CELL_CREST_1'), +(9023, 46, 549.20, -252.40, -70.34, 1000, ''), +(9023, 47, 549.20, -252.40, -70.34, 4000, 'SAY_WINDSOR_CELL_CREST_2'), +(9023, 48, 555.33, -269.16, -74.40, 0, ''), +(9023, 49, 554.31, -270.88, -74.40, 0, 'escort paused - SAY_WINDSOR_CELL_TOBIAS_1'), +(9023, 50, 554.31, -270.88, -74.40, 10000, ''), +(9023, 51, 554.31, -270.88, -74.40, 4000, 'SAY_WINDSOR_CELL_TOBIAS_2'), +(9023, 52, 536.10, -249.60, -67.47, 0, ''), +(9023, 53, 520.94, -216.65, -59.28, 0, ''), +(9023, 54, 505.99, -148.74, -62.17, 0, ''), +(9023, 55, 484.21, -56.24, -62.43, 0, ''), +(9023, 56, 470.39, -6.01, -70.10, 0, ''), +(9023, 57, 452.45, 29.85, -70.37, 1500, 'SAY_WINDSOR_FREE_1'), +(9023, 58, 452.45, 29.85, -70.37, 15000, 'SAY_WINDSOR_FREE_2'); From 18d726f9b9ff7cb9aab3a70aa4059a337ce83b88 Mon Sep 17 00:00:00 2001 From: NeatElves Date: Fri, 10 Aug 2012 11:21:39 +0300 Subject: [PATCH 0641/1172] [2653] Drop more gossip scripts - will be handled by DB Signed-off-by: Xfurry --- .../blackrock_depths/blackrock_depths.cpp | 65 +------ .../eastern_kingdoms/western_plaguelands.cpp | 48 ----- scripts/kalimdor/felwood.cpp | 68 +------ scripts/kalimdor/moonglade.cpp | 183 +----------------- scripts/kalimdor/stonetalon_mountains.cpp | 51 +---- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 7 - sql/updates/r2653_mangos.sql | 7 + 8 files changed, 13 insertions(+), 418 deletions(-) create mode 100644 sql/updates/r2653_mangos.sql diff --git a/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.cpp b/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.cpp index 6d36af39f..c285322b7 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.cpp +++ b/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.cpp @@ -17,7 +17,7 @@ /* ScriptData SDName: Blackrock_Depths SD%Complete: 80 -SDComment: Quest support: 4001, 4322, 4342, 7604, 9015. Vendor Lokhtos Darkbargainer. +SDComment: Quest support: 4001, 4322, 4342, 7604, 9015. SDCategory: Blackrock Depths EndScriptData */ @@ -28,7 +28,6 @@ at_ring_of_law npc_grimstone mob_phalanx npc_kharan_mighthammer -npc_lokhtos_darkbargainer npc_marshal_windsor npc_dughal_stormwing npc_tobias_seecher @@ -608,62 +607,6 @@ bool GossipSelect_npc_kharan_mighthammer(Player* pPlayer, Creature* pCreature, u return true; } -/*###### -## npc_lokhtos_darkbargainer -######*/ - -enum -{ - FACTION_THORIUM_BROTHERHOOD = 59, - - ITEM_THRORIUM_BROTHERHOOD_CONTRACT = 18628, - ITEM_SULFURON_INGOT = 17203, - - QUEST_A_BINDING_CONTRACT = 7604, - - SPELL_CREATE_THORIUM_BROTHERHOOD_CONTRACT = 23059 -}; - -#define GOSSIP_ITEM_SHOW_ACCESS "Show me what I have access to, Lothos." -#define GOSSIP_ITEM_GET_CONTRACT "Get Thorium Brotherhood Contract" - -bool GossipHello_npc_lokhtos_darkbargainer(Player* pPlayer, Creature* pCreature) -{ - if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); - - if (pCreature->isVendor() && pPlayer->GetReputationRank(FACTION_THORIUM_BROTHERHOOD) >= REP_FRIENDLY) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_VENDOR, GOSSIP_ITEM_SHOW_ACCESS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE); - - if (!pPlayer->GetQuestRewardStatus(QUEST_A_BINDING_CONTRACT) && - !pPlayer->HasItemCount(ITEM_THRORIUM_BROTHERHOOD_CONTRACT, 1, true) && - pPlayer->HasItemCount(ITEM_SULFURON_INGOT, 1)) - { - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_GET_CONTRACT, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - } - - if (pPlayer->GetReputationRank(FACTION_THORIUM_BROTHERHOOD) < REP_FRIENDLY) - pPlayer->SEND_GOSSIP_MENU(3673, pCreature->GetObjectGuid()); - else - pPlayer->SEND_GOSSIP_MENU(3677, pCreature->GetObjectGuid()); - - return true; -} - -bool GossipSelect_npc_lokhtos_darkbargainer(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) -{ - if (uiAction == GOSSIP_ACTION_INFO_DEF + 1) - { - pPlayer->CLOSE_GOSSIP_MENU(); - pPlayer->CastSpell(pPlayer, SPELL_CREATE_THORIUM_BROTHERHOOD_CONTRACT, false); - } - - if (uiAction == GOSSIP_ACTION_TRADE) - pPlayer->SEND_VENDORLIST(pCreature->GetObjectGuid()); - - return true; -} - /*###### ## npc_rocknot ######*/ @@ -1174,12 +1117,6 @@ void AddSC_blackrock_depths() pNewScript->pGossipSelect = &GossipSelect_npc_kharan_mighthammer; pNewScript->RegisterSelf(); - pNewScript = new Script; - pNewScript->Name = "npc_lokhtos_darkbargainer"; - pNewScript->pGossipHello = &GossipHello_npc_lokhtos_darkbargainer; - pNewScript->pGossipSelect = &GossipSelect_npc_lokhtos_darkbargainer; - pNewScript->RegisterSelf(); - pNewScript = new Script; pNewScript->Name = "npc_rocknot"; pNewScript->GetAI = &GetAI_npc_rocknot; diff --git a/scripts/eastern_kingdoms/western_plaguelands.cpp b/scripts/eastern_kingdoms/western_plaguelands.cpp index 7a70b3b26..7d0c03ae2 100644 --- a/scripts/eastern_kingdoms/western_plaguelands.cpp +++ b/scripts/eastern_kingdoms/western_plaguelands.cpp @@ -22,53 +22,11 @@ SDCategory: Western Plaguelands EndScriptData */ /* ContentData -npc_myranda_hag npc_the_scourge_cauldron EndContentData */ #include "precompiled.h" -/*###### -## npc_myranda_the_hag -######*/ - -enum -{ - QUEST_SUBTERFUGE = 5862, - QUEST_IN_DREAMS = 5944, - SPELL_SCARLET_ILLUSION = 17961 -}; - -#define GOSSIP_ITEM_ILLUSION "I am ready for the illusion, Myranda." - -bool GossipHello_npc_myranda_the_hag(Player* pPlayer, Creature* pCreature) -{ - if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); - - if (pPlayer->GetQuestStatus(QUEST_SUBTERFUGE) == QUEST_STATUS_COMPLETE && - !pPlayer->GetQuestRewardStatus(QUEST_IN_DREAMS) && !pPlayer->HasAura(SPELL_SCARLET_ILLUSION)) - { - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_ILLUSION, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - pPlayer->SEND_GOSSIP_MENU(4773, pCreature->GetObjectGuid()); - return true; - } - else - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); - - return true; -} - -bool GossipSelect_npc_myranda_the_hag(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) -{ - if (uiAction == GOSSIP_ACTION_INFO_DEF+1) - { - pPlayer->CLOSE_GOSSIP_MENU(); - pCreature->CastSpell(pPlayer, SPELL_SCARLET_ILLUSION, false); - } - return true; -} - /*###### ## npc_the_scourge_cauldron ######*/ @@ -148,12 +106,6 @@ void AddSC_western_plaguelands() { Script* pNewScript; - pNewScript = new Script; - pNewScript->Name = "npc_myranda_the_hag"; - pNewScript->pGossipHello = &GossipHello_npc_myranda_the_hag; - pNewScript->pGossipSelect = &GossipSelect_npc_myranda_the_hag; - pNewScript->RegisterSelf(); - pNewScript = new Script; pNewScript->Name = "npc_the_scourge_cauldron"; pNewScript->GetAI = &GetAI_npc_the_scourge_cauldron; diff --git a/scripts/kalimdor/felwood.cpp b/scripts/kalimdor/felwood.cpp index e4f9e7060..a4906f208 100644 --- a/scripts/kalimdor/felwood.cpp +++ b/scripts/kalimdor/felwood.cpp @@ -17,13 +17,12 @@ /* ScriptData SDName: Felwood SD%Complete: 95 -SDComment: Quest support: related to 4101/4102 (To obtain Cenarion Beacon), 4506, 7603, 7603 (Summon Pollo Grande) +SDComment: Quest support: 4506, 7603, 7603 (Summon Pollo Grande) SDCategory: Felwood EndScriptData */ /* ContentData npc_kitten -npcs_riverbreeze_and_silversky npc_niby_the_almighty npc_kroshius EndContentData */ @@ -160,65 +159,6 @@ bool GossipSelect_npc_corrupt_saber(Player* pPlayer, Creature* pCreature, uint32 return true; } -/*###### -## npcs_riverbreeze_and_silversky -######*/ - -enum -{ - QUEST_CLEANSING_FELWOOD_A = 4101, - QUEST_CLEANSING_FELWOOD_H = 4102, - - NPC_ARATHANDIS_SILVERSKY = 9528, - NPC_MAYBESS_RIVERBREEZE = 9529, - - SPELL_CENARION_BEACON = 15120 -}; - -#define GOSSIP_ITEM_BEACON "Please make me a Cenarion Beacon" - -bool GossipHello_npcs_riverbreeze_and_silversky(Player* pPlayer, Creature* pCreature) -{ - if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); - - switch (pCreature->GetEntry()) - { - case NPC_ARATHANDIS_SILVERSKY: - if (pPlayer->GetQuestRewardStatus(QUEST_CLEANSING_FELWOOD_A)) - { - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_BEACON, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - pPlayer->SEND_GOSSIP_MENU(2848, pCreature->GetObjectGuid()); - }else if (pPlayer->GetTeam() == HORDE) - pPlayer->SEND_GOSSIP_MENU(2845, pCreature->GetObjectGuid()); - else - pPlayer->SEND_GOSSIP_MENU(2844, pCreature->GetObjectGuid()); - break; - case NPC_MAYBESS_RIVERBREEZE: - if (pPlayer->GetQuestRewardStatus(QUEST_CLEANSING_FELWOOD_H)) - { - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_BEACON, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - pPlayer->SEND_GOSSIP_MENU(2849, pCreature->GetObjectGuid()); - }else if (pPlayer->GetTeam() == ALLIANCE) - pPlayer->SEND_GOSSIP_MENU(2843, pCreature->GetObjectGuid()); - else - pPlayer->SEND_GOSSIP_MENU(2842, pCreature->GetObjectGuid()); - break; - } - - return true; -} - -bool GossipSelect_npcs_riverbreeze_and_silversky(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) -{ - if (uiAction == GOSSIP_ACTION_INFO_DEF+1) - { - pPlayer->CLOSE_GOSSIP_MENU(); - pCreature->CastSpell(pPlayer, SPELL_CENARION_BEACON, false); - } - return true; -} - /*###### ## npc_niby_the_almighty (summons el pollo grande) ######*/ @@ -486,12 +426,6 @@ void AddSC_felwood() pNewScript->pGossipSelect = &GossipSelect_npc_corrupt_saber; pNewScript->RegisterSelf(); - pNewScript = new Script; - pNewScript->Name = "npcs_riverbreeze_and_silversky"; - pNewScript->pGossipHello = &GossipHello_npcs_riverbreeze_and_silversky; - pNewScript->pGossipSelect = &GossipSelect_npcs_riverbreeze_and_silversky; - pNewScript->RegisterSelf(); - pNewScript = new Script; pNewScript->Name = "npc_niby_the_almighty"; pNewScript->GetAI = &GetAI_npc_niby_the_almighty; diff --git a/scripts/kalimdor/moonglade.cpp b/scripts/kalimdor/moonglade.cpp index b023eefe6..2609a0a22 100644 --- a/scripts/kalimdor/moonglade.cpp +++ b/scripts/kalimdor/moonglade.cpp @@ -17,15 +17,12 @@ /* ScriptData SDName: Moonglade SD%Complete: 100 -SDComment: Quest support: 30, 272, 5929, 5930, 8736, 10965. Special Flight Paths for Druid class. +SDComment: Quest support: 8736, 10965. SDCategory: Moonglade EndScriptData */ /* ContentData -npc_bunthen_plainswind npc_clintar_dw_spirit -npc_great_bear_spirit -npc_silva_filnaveth npc_keeper_remulos boss_eranikus EndContentData */ @@ -35,65 +32,6 @@ EndContentData */ #include "ObjectMgr.h" /*###### -## npc_bunthen_plainswind -######*/ - -enum -{ - QUEST_SEA_LION_HORDE = 30, - QUEST_SEA_LION_ALLY = 272, - TAXI_PATH_ID_ALLY = 315, - TAXI_PATH_ID_HORDE = 316 -}; - -#define GOSSIP_ITEM_THUNDER "I'd like to fly to Thunder Bluff." -#define GOSSIP_ITEM_AQ_END "Do you know where I can find Half Pendant of Aquatic Endurance?" - -bool GossipHello_npc_bunthen_plainswind(Player* pPlayer, Creature* pCreature) -{ - if (pPlayer->getClass() != CLASS_DRUID) - pPlayer->SEND_GOSSIP_MENU(4916, pCreature->GetObjectGuid()); - else if (pPlayer->GetTeam() != HORDE) - { - if (pPlayer->GetQuestStatus(QUEST_SEA_LION_ALLY) == QUEST_STATUS_INCOMPLETE) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_AQ_END, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); - - pPlayer->SEND_GOSSIP_MENU(4917, pCreature->GetObjectGuid()); - } - else if (pPlayer->getClass() == CLASS_DRUID && pPlayer->GetTeam() == HORDE) - { - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_THUNDER, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); - - if (pPlayer->GetQuestStatus(QUEST_SEA_LION_HORDE) == QUEST_STATUS_INCOMPLETE) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_AQ_END, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); - - pPlayer->SEND_GOSSIP_MENU(4918, pCreature->GetObjectGuid()); - } - return true; -} - -bool GossipSelect_npc_bunthen_plainswind(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) -{ - switch(uiAction) - { - case GOSSIP_ACTION_INFO_DEF + 1: - pPlayer->CLOSE_GOSSIP_MENU(); - - if (pPlayer->getClass() == CLASS_DRUID && pPlayer->GetTeam() == HORDE) - pPlayer->ActivateTaxiPathTo(TAXI_PATH_ID_HORDE); - - break; - case GOSSIP_ACTION_INFO_DEF + 2: - pPlayer->SEND_GOSSIP_MENU(5373, pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF + 3: - pPlayer->SEND_GOSSIP_MENU(5376, pCreature->GetObjectGuid()); - break; - } - return true; -} - -/*#### # npc_clintar_dw_spirit ####*/ @@ -230,107 +168,6 @@ bool EffectDummyCreature_npc_clintar_dw_spirit(Unit *pCaster, uint32 spellId, Sp return true; } -/*###### -## npc_great_bear_spirit -######*/ - -#define GOSSIP_BEAR1 "What do you represent, spirit?" -#define GOSSIP_BEAR2 "I seek to understand the importance of strength of the body." -#define GOSSIP_BEAR3 "I seek to understand the importance of strength of the heart." -#define GOSSIP_BEAR4 "I have heard your words, Great Bear Spirit, and I understand. I now seek your blessings to fully learn the way of the Claw." - -bool GossipHello_npc_great_bear_spirit(Player* pPlayer, Creature* pCreature) -{ - //ally or horde quest - if (pPlayer->GetQuestStatus(5929) == QUEST_STATUS_INCOMPLETE || pPlayer->GetQuestStatus(5930) == QUEST_STATUS_INCOMPLETE) - { - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_BEAR1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF); - pPlayer->SEND_GOSSIP_MENU(4719, pCreature->GetObjectGuid()); - } - else - pPlayer->SEND_GOSSIP_MENU(4718, pCreature->GetObjectGuid()); - - return true; -} - -bool GossipSelect_npc_great_bear_spirit(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) -{ - switch(uiAction) - { - case GOSSIP_ACTION_INFO_DEF: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_BEAR2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); - pPlayer->SEND_GOSSIP_MENU(4721, pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF + 1: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_BEAR3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); - pPlayer->SEND_GOSSIP_MENU(4733, pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF + 2: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_BEAR4, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); - pPlayer->SEND_GOSSIP_MENU(4734, pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF + 3: - pPlayer->SEND_GOSSIP_MENU(4735, pCreature->GetObjectGuid()); - if (pPlayer->GetQuestStatus(5929)==QUEST_STATUS_INCOMPLETE) - pPlayer->AreaExploredOrEventHappens(5929); - if (pPlayer->GetQuestStatus(5930)==QUEST_STATUS_INCOMPLETE) - pPlayer->AreaExploredOrEventHappens(5930); - break; - } - return true; -} - -/*###### -## npc_silva_filnaveth -######*/ - -#define GOSSIP_ITEM_RUTHERAN "I'd like to fly to Rut'theran Village." -#define GOSSIP_ITEM_AQ_AGI "Do you know where I can find Half Pendant of Aquatic Agility?" - -bool GossipHello_npc_silva_filnaveth(Player* pPlayer, Creature* pCreature) -{ - if (pPlayer->getClass() != CLASS_DRUID) - pPlayer->SEND_GOSSIP_MENU(4913, pCreature->GetObjectGuid()); - else if (pPlayer->GetTeam() != ALLIANCE) - { - if (pPlayer->GetQuestStatus(QUEST_SEA_LION_HORDE) == QUEST_STATUS_INCOMPLETE) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_AQ_AGI, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); - - pPlayer->SEND_GOSSIP_MENU(4915, pCreature->GetObjectGuid()); - } - else if (pPlayer->getClass() == CLASS_DRUID && pPlayer->GetTeam() == ALLIANCE) - { - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_RUTHERAN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); - - if (pPlayer->GetQuestStatus(QUEST_SEA_LION_ALLY) == QUEST_STATUS_INCOMPLETE) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_AQ_AGI, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); - - pPlayer->SEND_GOSSIP_MENU(4914, pCreature->GetObjectGuid()); - } - return true; -} - -bool GossipSelect_npc_silva_filnaveth(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) -{ - switch(uiAction) - { - case GOSSIP_ACTION_INFO_DEF + 1: - pPlayer->CLOSE_GOSSIP_MENU(); - - if (pPlayer->getClass() == CLASS_DRUID && pPlayer->GetTeam() == ALLIANCE) - pPlayer->ActivateTaxiPathTo(TAXI_PATH_ID_ALLY); - - break; - case GOSSIP_ACTION_INFO_DEF + 2: - pPlayer->SEND_GOSSIP_MENU(5374, pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF + 3: - pPlayer->SEND_GOSSIP_MENU(5375, pCreature->GetObjectGuid()); - break; - } - return true; -} - /*###### ## npc_keeper_remulos ######*/ @@ -1133,30 +970,12 @@ void AddSC_moonglade() { Script* pNewScript; - pNewScript = new Script; - pNewScript->Name = "npc_bunthen_plainswind"; - pNewScript->pGossipHello = &GossipHello_npc_bunthen_plainswind; - pNewScript->pGossipSelect = &GossipSelect_npc_bunthen_plainswind; - pNewScript->RegisterSelf(); - pNewScript = new Script; pNewScript->Name = "npc_clintar_dw_spirit"; pNewScript->GetAI = &GetAI_npc_clintar_dw_spirit; pNewScript->pEffectDummyNPC = &EffectDummyCreature_npc_clintar_dw_spirit; pNewScript->RegisterSelf(); - pNewScript = new Script; - pNewScript->Name = "npc_great_bear_spirit"; - pNewScript->pGossipHello = &GossipHello_npc_great_bear_spirit; - pNewScript->pGossipSelect = &GossipSelect_npc_great_bear_spirit; - pNewScript->RegisterSelf(); - - pNewScript = new Script; - pNewScript->Name = "npc_silva_filnaveth"; - pNewScript->pGossipHello = &GossipHello_npc_silva_filnaveth; - pNewScript->pGossipSelect = &GossipSelect_npc_silva_filnaveth; - pNewScript->RegisterSelf(); - pNewScript = new Script; pNewScript->Name = "npc_keeper_remulos"; pNewScript->GetAI = &GetAI_npc_keeper_remulos; diff --git a/scripts/kalimdor/stonetalon_mountains.cpp b/scripts/kalimdor/stonetalon_mountains.cpp index a5411906c..8bde11b35 100644 --- a/scripts/kalimdor/stonetalon_mountains.cpp +++ b/scripts/kalimdor/stonetalon_mountains.cpp @@ -16,55 +16,14 @@ /* ScriptData SDName: Stonetalon_Mountains -SD%Complete: 95 -SDComment: Quest support: 6627 (Braug Dimspirits questions/'answers' might have more to it, need more info),6523 +SD%Complete: 100 +SDComment: Quest support: 6523. SDCategory: Stonetalon Mountains EndScriptData */ #include "precompiled.h" #include "escort_ai.h" -/*###### -## npc_braug_dimspirit -######*/ - -bool GossipHello_npc_braug_dimspirit(Player* pPlayer, Creature* pCreature) -{ - if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); - - if (pPlayer->GetQuestStatus(6627) == QUEST_STATUS_INCOMPLETE) - { - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Ysera", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Neltharion", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Nozdormu", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Alexstrasza", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Malygos", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - - pPlayer->SEND_GOSSIP_MENU(5820, pCreature->GetObjectGuid()); - } - else - pPlayer->SEND_GOSSIP_MENU(5819, pCreature->GetObjectGuid()); - - return true; -} - -bool GossipSelect_npc_braug_dimspirit(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) -{ - if (uiAction == GOSSIP_ACTION_INFO_DEF+1) - { - pPlayer->CLOSE_GOSSIP_MENU(); - pCreature->CastSpell(pPlayer,6766,false); - - } - if (uiAction == GOSSIP_ACTION_INFO_DEF+2) - { - pPlayer->CLOSE_GOSSIP_MENU(); - pPlayer->AreaExploredOrEventHappens(6627); - } - return true; -} - /*###### ## npc_kaya ######*/ @@ -146,12 +105,6 @@ void AddSC_stonetalon_mountains() { Script* pNewScript; - pNewScript = new Script; - pNewScript->Name = "npc_braug_dimspirit"; - pNewScript->pGossipHello = &GossipHello_npc_braug_dimspirit; - pNewScript->pGossipSelect = &GossipSelect_npc_braug_dimspirit; - pNewScript->RegisterSelf(); - pNewScript = new Script; pNewScript->Name = "npc_kaya"; pNewScript->GetAI = &GetAI_npc_kaya; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index f0b957061..e54485f3f 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2652" + #define SD2_REVISION_NR "2653" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 007c887d4..768acb30a 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -350,7 +350,6 @@ UPDATE creature_template SET ScriptName='boss_magmus' WHERE entry=9938; UPDATE creature_template SET ScriptName='mob_phalanx' WHERE entry=9502; UPDATE creature_template SET ScriptName='npc_grimstone' WHERE entry=10096; UPDATE creature_template SET ScriptName='npc_theldren_trigger' WHERE entry=16079; -UPDATE creature_template SET ScriptName='npc_lokhtos_darkbargainer' WHERE entry=12944; UPDATE creature_template SET ScriptName='npc_kharan_mighthammer' WHERE entry=9021; UPDATE creature_template SET ScriptName='npc_rocknot' WHERE entry=9503; UPDATE creature_template SET ScriptName ='npc_marshal_windsor' WHERE entry=9023; @@ -603,7 +602,6 @@ INSERT INTO scripted_event_id VALUES (8328, 'npc_kroshius'); UPDATE creature_template SET ScriptName='npc_kitten' WHERE entry=9937; UPDATE creature_template SET ScriptName='npc_corrupt_saber' WHERE entry=10042; -UPDATE creature_template SET ScriptName='npcs_riverbreeze_and_silversky' WHERE entry IN (9528,9529); UPDATE creature_template SET ScriptName='npc_niby_the_almighty' WHERE entry=14469; UPDATE creature_template SET ScriptName='npc_kroshius' WHERE entry=14467; @@ -837,10 +835,7 @@ UPDATE creature_template SET ScriptName='mob_core_rager' WHERE entry=11672; UPDATE creature_template SET ScriptName='mob_flamewaker_priest' WHERE entry=11662; /* MOONGLADE */ -UPDATE creature_template SET ScriptName='npc_bunthen_plainswind' WHERE entry=11798; UPDATE creature_template SET ScriptName='npc_clintar_dw_spirit' WHERE entry=22916; -UPDATE creature_template SET ScriptName='npc_great_bear_spirit' WHERE entry=11956; -UPDATE creature_template SET ScriptName='npc_silva_filnaveth' WHERE entry=11800; UPDATE creature_template SET ScriptName='npc_keeper_remulos' WHERE entry=11832; UPDATE creature_template SET ScriptName='boss_eranikus' WHERE entry=15491; @@ -1056,7 +1051,6 @@ UPDATE creature_template SET ScriptName='npc_deathstalker_faerleia' WHERE entry= /* STOCKADES */ /* STONETALON MOUNTAINS */ -UPDATE creature_template SET ScriptName='npc_braug_dimspirit' WHERE entry=4489; UPDATE creature_template SET ScriptName='npc_kaya' WHERE entry=11856; /* STORM PEAKS */ @@ -1340,7 +1334,6 @@ UPDATE instance_template SET ScriptName='instance_wailing_caverns' WHERE map=43; UPDATE creature_template SET ScriptName='npc_disciple_of_naralex' WHERE entry=3678; /* WESTERN PLAGUELANDS */ -UPDATE creature_template SET ScriptName='npc_myranda_the_hag' WHERE entry=11872; UPDATE creature_template SET ScriptName='npc_the_scourge_cauldron' WHERE entry=11152; /* WESTFALL */ diff --git a/sql/updates/r2653_mangos.sql b/sql/updates/r2653_mangos.sql new file mode 100644 index 000000000..0d615c21e --- /dev/null +++ b/sql/updates/r2653_mangos.sql @@ -0,0 +1,7 @@ +UPDATE creature_template SET ScriptName='' WHERE entry=11956; +UPDATE creature_template SET ScriptName='' WHERE entry=11798; +UPDATE creature_template SET ScriptName='' WHERE entry=11800; +UPDATE creature_template SET ScriptName='' WHERE entry=4489; +UPDATE creature_template SET ScriptName='' WHERE entry IN (9528,9529); +UPDATE creature_template SET ScriptName='' WHERE entry=12944; +UPDATE creature_template SET ScriptName='' WHERE entry=11872; From 0fa51a81e0ba4bf0572d508e8b40ed0daf14f65c Mon Sep 17 00:00:00 2001 From: Reamer Date: Fri, 10 Aug 2012 20:21:09 +0300 Subject: [PATCH 0642/1172] [2654] Fix some issues on Prince Taldaram and Violet Hold Signed-off-by: Xfurry --- .../azjol-nerub/ahnkahet/boss_taldaram.cpp | 77 +++++++++---------- .../violet_hold/instance_violet_hold.cpp | 2 +- sd2_revision_nr.h | 2 +- 3 files changed, 37 insertions(+), 44 deletions(-) diff --git a/scripts/northrend/azjol-nerub/ahnkahet/boss_taldaram.cpp b/scripts/northrend/azjol-nerub/ahnkahet/boss_taldaram.cpp index 66cf5d2ff..492cb1e45 100644 --- a/scripts/northrend/azjol-nerub/ahnkahet/boss_taldaram.cpp +++ b/scripts/northrend/azjol-nerub/ahnkahet/boss_taldaram.cpp @@ -38,20 +38,20 @@ enum SPELL_BEAM_VISUAL = 60342, // Visual spell, used before Taltaram is lowered to the ground SPELL_CONJURE_FLAME_SPHERE = 55931, - SPELL_FLAME_ORB_SUMMON = 57752, // summons 30702 + SPELL_FLAME_SPHERE_SUMMON_1 = 55895, // summons 30106 + SPELL_FLAME_SPHERE_SUMMON_2 = 59511, // summons 31686 + SPELL_FLAME_SPHERE_SUMMON_3 = 59512, // summons 31687 SPELL_BLOODTHIRST = 55968, SPELL_VANISH = 55964, SPELL_EMBRACE_OF_THE_VAMPYR = 55959, SPELL_EMBRACE_OF_THE_VAMPYR_H = 59513, - // Spells used by the Flame Orb - SPELL_FLAME_ORB = 57750, - SPELL_FLAME_ORB_H = 58937, + // Spells used by the Flame Sphere + SPELL_FLAME_SPHERE_PERIODIC = 55926, + SPELL_FLAME_SPHERE_PERIODIC_H = 59508, SPELL_FLAME_SPHERE_SPAWN_EFFECT = 55891, SPELL_FLAME_SPHERE_VISUAL = 55928, SPELL_FLAME_SPHERE_DEATH_EFFECT = 55947, - - MAX_FLAME_ORBS = 3, }; /*###### @@ -77,7 +77,6 @@ struct MANGOS_DLL_DECL boss_taldaramAI : public ScriptedAI uint32 m_uiBloodthirstTimer; uint32 m_uiFlameOrbTimer; uint32 m_uiVanishTimer; - uint32 m_uiVanishExpireTimer; uint32 m_uiEmbraceTimer; GuidList m_lFlameOrbsGuidList; @@ -89,7 +88,6 @@ struct MANGOS_DLL_DECL boss_taldaramAI : public ScriptedAI m_uiFlameOrbTimer = urand(15000, 20000); m_uiVanishTimer = 0; m_uiEmbraceTimer = 0; - m_uiVanishExpireTimer = 0; m_bIsFirstAggro = false; } @@ -133,7 +131,7 @@ struct MANGOS_DLL_DECL boss_taldaramAI : public ScriptedAI void EnterEvadeMode() { // Don't allow him to evade during vanish - if (m_uiVanishExpireTimer) + if (m_uiEmbraceTimer) return; m_creature->RemoveAllAuras(); @@ -176,16 +174,16 @@ struct MANGOS_DLL_DECL boss_taldaramAI : public ScriptedAI pSummoned->CastSpell(pSummoned, SPELL_FLAME_SPHERE_DEATH_EFFECT, true); } - // Wrapper which sends each orb in a different direction - void DoSetOrbsInMotion() + // Wrapper which sends each sphere in a different direction + void DoSetSpheresInMotion() { float fX, fY; - uint8 uiIndex = 0; + uint8 uiIndex = m_bIsRegularMode ? urand(0, 2) : 0; for (GuidList::const_iterator itr = m_lFlameOrbsGuidList.begin(); itr != m_lFlameOrbsGuidList.end(); ++itr) { if (Creature* pOrb = m_creature->GetMap()->GetCreature(*itr)) { - pOrb->CastSpell(pOrb, m_bIsRegularMode ? SPELL_FLAME_ORB : SPELL_FLAME_ORB_H, true); + pOrb->CastSpell(pOrb, m_bIsRegularMode ? SPELL_FLAME_SPHERE_PERIODIC : SPELL_FLAME_SPHERE_PERIODIC_H, true); pOrb->GetNearPoint2D(fX, fY, 70.0f, (2*M_PI_F/3)*uiIndex); pOrb->GetMotionMaster()->MovePoint(0, fX, fY, pOrb->GetPositionZ()); @@ -218,15 +216,22 @@ struct MANGOS_DLL_DECL boss_taldaramAI : public ScriptedAI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - if (m_uiVanishExpireTimer) + // Cast Embrace of the Vampyr after Vanish expires - note: because of the invisibility effect, the timers won't decrease during vanish + if (m_uiEmbraceTimer) { - if (m_uiVanishExpireTimer <= uiDiff) + if (m_uiEmbraceTimer <= uiDiff) { - m_uiEmbraceTimer = 1000; - m_uiVanishExpireTimer = 0; + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, m_bIsRegularMode ? SPELL_EMBRACE_OF_THE_VAMPYR : SPELL_EMBRACE_OF_THE_VAMPYR_H) == CAST_OK) + { + DoScriptText(urand(0, 1) ? SAY_FEED_1 : SAY_FEED_2, m_creature); + m_uiEmbraceTimer = 0; + } + } } else - m_uiVanishExpireTimer -= uiDiff; + m_uiEmbraceTimer -= uiDiff; // do not use other abilities during vanish return; @@ -239,32 +244,14 @@ struct MANGOS_DLL_DECL boss_taldaramAI : public ScriptedAI if (DoCastSpellIfCan (m_creature, SPELL_VANISH) == CAST_OK) { DoScriptText(urand(0, 1) ? SAY_VANISH_1 : SAY_VANISH_2, m_creature); - m_uiVanishTimer = 0; - m_uiVanishExpireTimer = 2500; + m_uiVanishTimer = 0; + m_uiEmbraceTimer = 2000; } } else m_uiVanishTimer -= uiDiff; } - // Cast Embrace of the Vampyr after Vanish expires - if (m_uiEmbraceTimer) - { - if (m_uiEmbraceTimer <= uiDiff) - { - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) - { - if (DoCastSpellIfCan(pTarget, m_bIsRegularMode ? SPELL_EMBRACE_OF_THE_VAMPYR : SPELL_EMBRACE_OF_THE_VAMPYR_H) == CAST_OK) - { - DoScriptText(urand(0, 1) ? SAY_FEED_1 : SAY_FEED_2, m_creature); - m_uiEmbraceTimer = 0; - } - } - } - else - m_uiEmbraceTimer -= uiDiff; - } - if (m_uiBloodthirstTimer < uiDiff) { if (DoCastSpellIfCan(m_creature, SPELL_BLOODTHIRST) == CAST_OK) @@ -279,9 +266,15 @@ struct MANGOS_DLL_DECL boss_taldaramAI : public ScriptedAI { m_lFlameOrbsGuidList.clear(); - // Flame orbs are summoned above the boss - for (uint8 i = 0; i < MAX_FLAME_ORBS; ++i) - m_creature->CastSpell(m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ() + 5.0f, SPELL_FLAME_ORB_SUMMON, true); + // Flame speres are summoned above the boss + m_creature->CastSpell(m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ() + 5.0f, SPELL_FLAME_SPHERE_SUMMON_1, true); + + // 2 more spheres on heroic + if (!m_bIsRegularMode) + { + m_creature->CastSpell(m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ() + 5.0f, SPELL_FLAME_SPHERE_SUMMON_2, true); + m_creature->CastSpell(m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ() + 5.0f, SPELL_FLAME_SPHERE_SUMMON_3, true); + } m_uiFlameOrbTimer = urand(50000, 60000); m_uiVanishTimer = 12000; @@ -305,7 +298,7 @@ bool EffectDummyCreature_spell_conjure_flame_orbs(Unit* pCaster, uint32 uiSpellI if (uiSpellId == SPELL_CONJURE_FLAME_SPHERE && uiEffIndex == EFFECT_INDEX_0) { if (boss_taldaramAI* pBossAI = dynamic_cast(pCreatureTarget->AI())) - pBossAI->DoSetOrbsInMotion(); + pBossAI->DoSetSpheresInMotion(); //always return true when we are handling this spell and effect return true; diff --git a/scripts/northrend/violet_hold/instance_violet_hold.cpp b/scripts/northrend/violet_hold/instance_violet_hold.cpp index a013daafb..911a97b1b 100644 --- a/scripts/northrend/violet_hold/instance_violet_hold.cpp +++ b/scripts/northrend/violet_hold/instance_violet_hold.cpp @@ -281,8 +281,8 @@ void instance_violet_hold::SetData(uint32 uiType, uint32 uiData) if (Creature* pSinclari = GetSingleCreatureFromStorage(NPC_SINCLARI_ALT)) { // ToDo: I'm not sure if the last yell should be at 25% or at 5%. Needs research - DoScriptText(aSealWeakYell[m_uiSealYellCount-1], pSinclari); ++m_uiSealYellCount; + DoScriptText(aSealWeakYell[m_uiSealYellCount-1], pSinclari); } } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index e54485f3f..63b7bb04c 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2653" + #define SD2_REVISION_NR "2654" #endif // __SD2_REVISION_NR_H__ From cedc2f582ea8320f86b61119889cd729745548da Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sat, 11 Aug 2012 00:41:29 +0300 Subject: [PATCH 0643/1172] [2655] Improve script for Ouro - AQ40 --- .../kalimdor/temple_of_ahnqiraj/boss_ouro.cpp | 280 ++++++++++++++---- .../instance_temple_of_ahnqiraj.cpp | 16 +- .../temple_of_ahnqiraj/temple_of_ahnqiraj.h | 6 +- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 + sql/updates/r2655_mangos.sql | 1 + 6 files changed, 241 insertions(+), 65 deletions(-) create mode 100644 sql/updates/r2655_mangos.sql diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_ouro.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_ouro.cpp index e47e2818a..77826ea9d 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/boss_ouro.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_ouro.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: Boss_Ouro -SD%Complete: 50 -SDComment: script needs to be reworked +SD%Complete: 90 +SDComment: Some minor adjustments may be required SDCategory: Temple of Ahn'Qiraj EndScriptData */ @@ -26,55 +26,110 @@ EndScriptData */ enum { + // ground spells SPELL_SWEEP = 26103, SPELL_SANDBLAST = 26102, - SPELL_GROUND_RUPTURE = 26100, - SPELL_BIRTH = 26262, //The Birth Animation SPELL_BOULDER = 26616, SPELL_BERSERK = 26615, - SPELL_SUMMON_SCARABS = 26060, - SPELL_SUMMON_OURO_MOUND = 26058, - SPELL_SUMMON_OURO = 26642, + // emerge spells + SPELL_BIRTH = 26262, // The Birth Animation + SPELL_GROUND_RUPTURE = 26100, // spell not confirmed + SPELL_SUMMON_BASE = 26133, // summons gameobject 180795 - SPELL_DIRTMOUND_PASSIVE = 26092, + // submerge spells SPELL_SUBMERGE_VISUAL = 26063, + SPELL_SUMMON_OURO_MOUND = 26058, // summons 5 dirt mounds + SPELL_SUMMON_TRIGGER = 26284, + + SPELL_SUMMON_OURO = 26642, + SPELL_QUAKE = 26093, - NPC_OURO_SCARAB = 15718, - NPC_OURO_SPAWNER = 15957, - NPC_OURO_TRIGGER = 15717 + // other spells - not used + //SPELL_SUMMON_SCARABS = 26060, // triggered after 30 secs - cast by the Dirt Mounds + //SPELL_DIRTMOUND_PASSIVE = 26092, // casts 26093 every 1 sec - removed from DBC + //SPELL_SET_OURO_HEALTH = 26075, // removed from DBC + //SPELL_SAVE_OURO_HEALTH = 26076, // removed from DBC + //SPELL_TELEPORT_TRIGGER = 26285, // removed from DBC + //SPELL_SUBMERGE_TRIGGER = 26104, // removed from DBC + //SPELL_SUMMON_OURO_MOUND = 26617, // removed from DBC + //SPELL_SCARABS_PERIODIC = 26619, // cast by the Dirt Mounds in order to spawn the scarabs - removed from DBC + + // summoned npcs + NPC_OURO = 15517, + //NPC_OURO_SCARAB = 15718, // summoned by Dirt Mounds + NPC_OURO_TRIGGER = 15717, + NPC_DIRT_MOUND = 15712, // summoned also by missing spell 26617 }; -struct MANGOS_DLL_DECL boss_ouroAI : public ScriptedAI +struct MANGOS_DLL_DECL boss_ouroAI : public Scripted_NoMovementAI { - boss_ouroAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + boss_ouroAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; uint32 m_uiSweepTimer; uint32 m_uiSandBlastTimer; uint32 m_uiSubmergeTimer; - uint32 m_uiBackTimer; - uint32 m_uiChangeTargetTimer; - uint32 m_uiSpawnTimer; + uint32 m_uiSummonBaseTimer; + + uint32 m_uiBoulderTimer; + uint32 m_uiSummonMoundTimer; bool m_bEnraged; bool m_bSubmerged; + ObjectGuid m_ouroTriggerGuid; + void Reset() { - m_uiSweepTimer = urand(5000, 10000); - m_uiSandBlastTimer = urand(20000, 35000); - m_uiSubmergeTimer = urand(90000, 150000); - m_uiBackTimer = urand(30000, 45000); - m_uiChangeTargetTimer = urand(5000, 8000); - m_uiSpawnTimer = urand(10000, 20000); - - m_bEnraged = false; - m_bSubmerged = false; + m_uiSweepTimer = urand(35000, 40000); + m_uiSandBlastTimer = urand(30000, 45000); + m_uiSubmergeTimer = 90000; + m_uiSummonBaseTimer = 2000; + + m_uiBoulderTimer = urand(1000, 2000); + m_uiSummonMoundTimer = 10000; + + m_bEnraged = false; + m_bSubmerged = false; } void Aggro(Unit* pWho) { - DoCastSpellIfCan(m_creature, SPELL_BIRTH); + if (m_pInstance) + m_pInstance->SetData(TYPE_OURO, IN_PROGRESS); + } + + void JustReachedHome() + { + if (m_pInstance) + m_pInstance->SetData(TYPE_OURO, FAIL); + + m_creature->ForcedDespawn(); + } + + void JustDied(Unit* pKiller) + { + if (m_pInstance) + m_pInstance->SetData(TYPE_OURO, DONE); + } + + void JustSummoned(Creature* pSummoned) + { + switch (pSummoned->GetEntry()) + { + case NPC_OURO_TRIGGER: + m_ouroTriggerGuid = pSummoned->GetObjectGuid(); + // no break; + case NPC_DIRT_MOUND: + pSummoned->GetMotionMaster()->MoveRandomAroundPoint(pSummoned->GetPositionX(), pSummoned->GetPositionY(), pSummoned->GetPositionZ(), 40.0f); + break; + } } void UpdateAI(const uint32 uiDiff) @@ -85,11 +140,23 @@ struct MANGOS_DLL_DECL boss_ouroAI : public ScriptedAI if (!m_bSubmerged) { + // Summon sandworm base + if (m_uiSummonBaseTimer) + { + if (m_uiSummonBaseTimer <= uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_SUMMON_BASE) == CAST_OK) + m_uiSummonBaseTimer = 0; + } + else + m_uiSummonBaseTimer -= uiDiff; + } + // Sweep if (m_uiSweepTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_SWEEP); - m_uiSweepTimer = urand(15000, 30000); + if (DoCastSpellIfCan(m_creature, SPELL_SWEEP) == CAST_OK) + m_uiSweepTimer = 20000; } else m_uiSweepTimer -= uiDiff; @@ -97,74 +164,162 @@ struct MANGOS_DLL_DECL boss_ouroAI : public ScriptedAI // Sand Blast if (m_uiSandBlastTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_SANDBLAST); - m_uiSandBlastTimer = urand(20000, 35000); + if (DoCastSpellIfCan(m_creature, SPELL_SANDBLAST) == CAST_OK) + m_uiSandBlastTimer = 22000; } else m_uiSandBlastTimer -= uiDiff; if (!m_bEnraged) { + // Enrage at 20% HP if (m_creature->GetHealthPercent() < 20.0f) { - DoCastSpellIfCan(m_creature, SPELL_BERSERK); - m_bEnraged = true; - return; + if (DoCastSpellIfCan(m_creature, SPELL_BERSERK) == CAST_OK) + { + m_bEnraged = true; + return; + } } // Submerge if (m_uiSubmergeTimer < uiDiff) { - //Cast - m_creature->HandleEmote(EMOTE_ONESHOT_SUBMERGE); - m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - m_creature->setFaction(35); - DoCastSpellIfCan(m_creature, SPELL_DIRTMOUND_PASSIVE); - - m_bSubmerged = true; - m_uiBackTimer = urand(30000, 45000); + if (DoCastSpellIfCan(m_creature, SPELL_SUBMERGE_VISUAL) == CAST_OK) + { + DoCastSpellIfCan(m_creature, SPELL_SUMMON_OURO_MOUND, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_SUMMON_TRIGGER, CAST_TRIGGERED); + + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + + m_bSubmerged = true; + m_uiSubmergeTimer = 30000; + } } else m_uiSubmergeTimer -= uiDiff; } + else + { + // Summon 1 mound every 10 secs when enraged + if (m_uiSummonMoundTimer < uiDiff) + { + DoSpawnCreature(NPC_DIRT_MOUND, 0, 0, 0, 0, TEMPSUMMON_CORPSE_DESPAWN, 0); + m_uiSummonMoundTimer = 10000; + } + else + m_uiSummonMoundTimer -= uiDiff; + } - DoMeleeAttackIfReady(); + // If we are within range melee the target + if (m_creature->CanReachWithMeleeAttack(m_creature->getVictim())) + { + //Make sure our attack is ready and we arn't currently casting + if (m_creature->isAttackReady() && !m_creature->IsNonMeleeSpellCasted(false)) + { + m_creature->AttackerStateUpdate(m_creature->getVictim()); + m_creature->resetAttackTimer(); + } + } + // Spam Boulder spell when enraged and not tanked + else if (m_bEnraged) + { + if (m_uiBoulderTimer < uiDiff) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, SPELL_BOULDER) == CAST_OK) + m_uiBoulderTimer = urand(2000, 3000); + } + } + else + m_uiBoulderTimer -= uiDiff; + } } else { - // Change Target - if (m_uiChangeTargetTimer < uiDiff) + // Resume combat + if (m_uiSubmergeTimer < uiDiff) { - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + // Teleport to the trigger in order to get a new location + if (Creature* pTrigger = m_creature->GetMap()->GetCreature(m_ouroTriggerGuid)) + m_creature->NearTeleportTo(pTrigger->GetPositionX(), pTrigger->GetPositionY(), pTrigger->GetPositionZ(), 0); + + if (DoCastSpellIfCan(m_creature, SPELL_BIRTH) == CAST_OK) { - m_creature->MonsterMoveWithSpeed(pTarget->GetPositionX(), pTarget->GetPositionY(), pTarget->GetPositionZ(), 28.f); - } + m_creature->RemoveAurasDueToSpell(SPELL_SUBMERGE_VISUAL); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - m_uiChangeTargetTimer = urand(10000, 20000); + m_bSubmerged = false; + m_uiSummonBaseTimer = 2000; + m_uiSubmergeTimer = 90000; + } } else - m_uiChangeTargetTimer -= uiDiff; + m_uiSubmergeTimer -= uiDiff; + } + } +}; - // Back - if (m_uiBackTimer < uiDiff) - { - m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - m_creature->setFaction(14); +CreatureAI* GetAI_boss_ouro(Creature* pCreature) +{ + return new boss_ouroAI(pCreature); +} + +struct MANGOS_DLL_DECL npc_ouro_spawnerAI : public Scripted_NoMovementAI +{ + npc_ouro_spawnerAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) {Reset();} + + uint32 m_uiQuakeTimer; + bool m_bHasSummoned; - DoCastSpellIfCan(m_creature->getVictim(), SPELL_GROUND_RUPTURE); + void Reset() + { + m_uiQuakeTimer = 1000; + m_bHasSummoned = false; + } - m_bSubmerged = false; - m_uiSubmergeTimer = urand(60000, 120000); + void MoveInLineOfSight(Unit* pWho) + { + // Spawn Ouro on LoS check + if (!m_bHasSummoned && pWho->GetTypeId() == TYPEID_PLAYER && !((Player*)pWho)->isGameMaster() && m_creature->IsWithinDistInMap(pWho, 50.0f)) + { + if (DoCastSpellIfCan(m_creature, SPELL_SUMMON_OURO) == CAST_OK) + m_bHasSummoned = true; + } + + ScriptedAI::MoveInLineOfSight(pWho); + } + + void JustSummoned(Creature* pSummoned) + { + // Despanw when Ouro is spawned + if (pSummoned->GetEntry() == NPC_OURO) + { + pSummoned->CastSpell(pSummoned, SPELL_BIRTH, false); + pSummoned->SetInCombatWithZone(); + m_creature->ForcedDespawn(); + } + } + + void UpdateAI(const uint32 uiDiff) + { + if (m_bHasSummoned) + { + if (m_uiQuakeTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_QUAKE) == CAST_OK) + m_uiQuakeTimer = 1000; } else - m_uiBackTimer -= uiDiff; + m_uiQuakeTimer -= uiDiff; } } }; -CreatureAI* GetAI_boss_ouro(Creature* pCreature) +CreatureAI* GetAI_npc_ouro_spawner(Creature* pCreature) { - return new boss_ouroAI(pCreature); + return new npc_ouro_spawnerAI(pCreature); } void AddSC_boss_ouro() @@ -175,4 +330,9 @@ void AddSC_boss_ouro() pNewScript->Name = "boss_ouro"; pNewScript->GetAI = &GetAI_boss_ouro; pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_ouro_spawner"; + pNewScript->GetAI = &GetAI_npc_ouro_spawner; + pNewScript->RegisterSelf(); } diff --git a/scripts/kalimdor/temple_of_ahnqiraj/instance_temple_of_ahnqiraj.cpp b/scripts/kalimdor/temple_of_ahnqiraj/instance_temple_of_ahnqiraj.cpp index 4a4140afe..c42eb05f0 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/instance_temple_of_ahnqiraj.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/instance_temple_of_ahnqiraj.cpp @@ -74,6 +74,7 @@ void instance_temple_of_ahnqiraj::OnCreatureCreate (Creature* pCreature) case NPC_VEKLOR: case NPC_VEKNILASH: case NPC_MASTERS_EYE: + case NPC_OURO_SPAWNER: case NPC_CTHUN: m_mNpcEntryGuidStore[pCreature->GetEntry()] = pCreature->GetObjectGuid(); break; @@ -141,6 +142,15 @@ void instance_temple_of_ahnqiraj::SetData(uint32 uiType, uint32 uiData) if (uiData == DONE) DoUseDoorOrButton(GO_TWINS_EXIT_DOOR); break; + case TYPE_OURO: + // Respawn the Ouro spawner on fail + if (uiData == FAIL) + { + if (Creature* pSpawner = GetSingleCreatureFromStorage(NPC_OURO_SPAWNER)) + pSpawner->Respawn(); + } + m_auiEncounter[uiType] = uiData; + break; case TYPE_CTHUN_PHASE: m_auiEncounter[uiType] = uiData; break; @@ -151,7 +161,8 @@ void instance_temple_of_ahnqiraj::SetData(uint32 uiType, uint32 uiData) OUT_SAVE_INST_DATA; std::ostringstream saveStream; - saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2] << " " << m_auiEncounter[3]; + saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2] << " " << m_auiEncounter[3] << " " + << m_auiEncounter[4]; m_strInstData = saveStream.str(); @@ -171,7 +182,8 @@ void instance_temple_of_ahnqiraj::Load(const char* chrIn) OUT_LOAD_INST_DATA(chrIn); std::istringstream loadStream(chrIn); - loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3]; + loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3] + >> m_auiEncounter[4]; for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) { diff --git a/scripts/kalimdor/temple_of_ahnqiraj/temple_of_ahnqiraj.h b/scripts/kalimdor/temple_of_ahnqiraj/temple_of_ahnqiraj.h index 9f45a8c66..f117991c9 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/temple_of_ahnqiraj.h +++ b/scripts/kalimdor/temple_of_ahnqiraj/temple_of_ahnqiraj.h @@ -7,12 +7,13 @@ enum { - MAX_ENCOUNTER = 4, + MAX_ENCOUNTER = 5, TYPE_SKERAM = 0, TYPE_BUG_TRIO = 1, TYPE_TWINS = 2, - TYPE_CTHUN_PHASE = 3, + TYPE_OURO = 3, + TYPE_CTHUN_PHASE = 4, NPC_SKERAM = 15263, //NPC_KRI = 15511, @@ -21,6 +22,7 @@ enum NPC_VEKLOR = 15276, NPC_VEKNILASH = 15275, NPC_MASTERS_EYE = 15963, + NPC_OURO_SPAWNER = 15957, NPC_CTHUN = 15727, GO_SKERAM_GATE = 180636, diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 63b7bb04c..3b5b161bf 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2654" + #define SD2_REVISION_NR "2655" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 768acb30a..c53d8f248 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -1198,6 +1198,7 @@ UPDATE creature_template SET ScriptName='boss_huhuran' WHERE entry=15509; UPDATE creature_template SET ScriptName='boss_veklor' WHERE entry=15276; UPDATE creature_template SET ScriptName='boss_veknilash' WHERE entry=15275; UPDATE creature_template SET ScriptName='boss_ouro' WHERE entry=15517; +UPDATE creature_template SET ScriptName='npc_ouro_spawner' WHERE entry=15957; UPDATE creature_template SET ScriptName='boss_eye_of_cthun' WHERE entry=15589; UPDATE creature_template SET ScriptName='mob_sartura_royal_guard' WHERE entry=15984; UPDATE creature_template SET ScriptName='mob_claw_tentacle' WHERE entry=15725; diff --git a/sql/updates/r2655_mangos.sql b/sql/updates/r2655_mangos.sql new file mode 100644 index 000000000..dde13c3e1 --- /dev/null +++ b/sql/updates/r2655_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_ouro_spawner' WHERE entry=15957; From 5776a6712ed5f8435af583574bcac0590fc5955b Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sat, 11 Aug 2012 01:05:53 +0300 Subject: [PATCH 0644/1172] [2656] Use instance data for AQ40 bosses Also add some more texts for quest 4122 - thanks grz3s --- scripts/eastern_kingdoms/burning_steppes.cpp | 10 +++++++ .../temple_of_ahnqiraj/boss_fankriss.cpp | 27 ++++++++++++++++- .../temple_of_ahnqiraj/boss_huhuran.cpp | 27 ++++++++++++++++- .../temple_of_ahnqiraj/boss_sartura.cpp | 21 +++++++++++++- .../temple_of_ahnqiraj/boss_viscidus.cpp | 24 ++++++++++++++- .../instance_temple_of_ahnqiraj.cpp | 29 ++++++++++++++----- .../temple_of_ahnqiraj/temple_of_ahnqiraj.h | 12 +++++--- sd2_revision_nr.h | 2 +- sql/scriptdev2_script_full.sql | 4 ++- sql/updates/r2656_scriptdev2.sql | 4 +++ 10 files changed, 142 insertions(+), 18 deletions(-) create mode 100644 sql/updates/r2656_scriptdev2.sql diff --git a/scripts/eastern_kingdoms/burning_steppes.cpp b/scripts/eastern_kingdoms/burning_steppes.cpp index e9cf5e402..2c2e1e83d 100644 --- a/scripts/eastern_kingdoms/burning_steppes.cpp +++ b/scripts/eastern_kingdoms/burning_steppes.cpp @@ -161,6 +161,9 @@ enum SAY_LEXLORT_3 = -1000887, SAY_LEXLORT_4 = -1000888, + EMOTE_SUBMIT = -1000889, + SAY_AGGRO = -1000890, + SPELL_CAPTURE_GRARK = 14250, NPC_BLACKROCK_AMBUSHER = 9522, @@ -219,6 +222,12 @@ struct MANGOS_DLL_DECL npc_grark_lorkrubAI : public npc_escortAI, private Dialog } } + void Aggro(Unit* pWho) + { + if (!HasEscortState(STATE_ESCORT_ESCORTING)) + DoScriptText(SAY_AGGRO, m_creature); + } + void MoveInLineOfSight(Unit* pWho) { // No combat during escort @@ -427,6 +436,7 @@ bool EffectDummyCreature_spell_capture_grark(Unit* pCaster, uint32 uiSpellId, Sp return false; // The faction is guesswork - needs more research + DoScriptText(EMOTE_SUBMIT, pCreatureTarget); pCreatureTarget->SetFactionTemporary(FACTION_FRIENDLY, TEMPFACTION_RESTORE_RESPAWN); pCreatureTarget->AI()->EnterEvadeMode(); diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_fankriss.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_fankriss.cpp index e61912c82..ea9529a24 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/boss_fankriss.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_fankriss.cpp @@ -22,6 +22,7 @@ SDCategory: Temple of Ahn'Qiraj EndScriptData */ #include "precompiled.h" +#include "temple_of_ahnqiraj.h" enum { @@ -48,7 +49,13 @@ static const uint32 aEntangleSpells[3] = {SPELL_ENTANGLE_1, SPELL_ENTANGLE_2, SP struct MANGOS_DLL_DECL boss_fankrissAI : public ScriptedAI { - boss_fankrissAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } + boss_fankrissAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; uint32 m_uiMortalWoundTimer; uint32 m_uiSummonWormTimer; @@ -65,6 +72,24 @@ struct MANGOS_DLL_DECL boss_fankrissAI : public ScriptedAI m_uiEntangleSummonTimer = 0; } + void Aggro(Unit* pWho) + { + if (m_pInstance) + m_pInstance->SetData(TYPE_FANKRISS, IN_PROGRESS); + } + + void JustReachedHome() + { + if (m_pInstance) + m_pInstance->SetData(TYPE_FANKRISS, FAIL); + } + + void JustDied(Unit* pKiller) + { + if (m_pInstance) + m_pInstance->SetData(TYPE_FANKRISS, DONE); + } + void JustSummoned(Creature* pSummoned) { if (pSummoned->GetEntry() == NPC_SPAWN_FANKRISS) diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_huhuran.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_huhuran.cpp index 9ab086b12..4686f0012 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/boss_huhuran.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_huhuran.cpp @@ -22,6 +22,7 @@ SDCategory: Temple of Ahn'Qiraj EndScriptData */ #include "precompiled.h" +#include "temple_of_ahnqiraj.h" enum { @@ -37,7 +38,13 @@ enum struct MANGOS_DLL_DECL boss_huhuranAI : public ScriptedAI { - boss_huhuranAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + boss_huhuranAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; uint32 m_uiFrenzyTimer; uint32 m_uiWyvernTimer; @@ -55,6 +62,24 @@ struct MANGOS_DLL_DECL boss_huhuranAI : public ScriptedAI m_bIsBerserk = false; } + void Aggro(Unit* pWho) + { + if (m_pInstance) + m_pInstance->SetData(TYPE_HUHURAN, IN_PROGRESS); + } + + void JustReachedHome() + { + if (m_pInstance) + m_pInstance->SetData(TYPE_HUHURAN, FAIL); + } + + void JustDied(Unit* pKiller) + { + if (m_pInstance) + m_pInstance->SetData(TYPE_HUHURAN, DONE); + } + void UpdateAI(const uint32 uiDiff) { // Return since we have no target diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_sartura.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_sartura.cpp index f9933e1b7..4d4d91903 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/boss_sartura.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_sartura.cpp @@ -22,6 +22,7 @@ SDCategory: Temple of Ahn'Qiraj EndScriptData */ #include "precompiled.h" +#include "temple_of_ahnqiraj.h" enum { @@ -40,7 +41,13 @@ enum struct MANGOS_DLL_DECL boss_sarturaAI : public ScriptedAI { - boss_sarturaAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } + boss_sarturaAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; uint32 m_uiWhirlWindTimer; uint32 m_uiWhirlWindRandomTimer; @@ -72,6 +79,9 @@ struct MANGOS_DLL_DECL boss_sarturaAI : public ScriptedAI void Aggro(Unit* pWho) { DoScriptText(SAY_AGGRO, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_SARTURA, IN_PROGRESS); } void KilledUnit(Unit* pVictim) @@ -82,6 +92,15 @@ struct MANGOS_DLL_DECL boss_sarturaAI : public ScriptedAI void JustDied(Unit* pKiller) { DoScriptText(SAY_DEATH, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_SARTURA, DONE); + } + + void JustReachedHome() + { + if (m_pInstance) + m_pInstance->SetData(TYPE_SARTURA, FAIL); } void UpdateAI(const uint32 uiDiff) diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_viscidus.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_viscidus.cpp index 0d6d393d5..44aa76597 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/boss_viscidus.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_viscidus.cpp @@ -22,6 +22,7 @@ SDCategory: Temple of Ahn'Qiraj EndScriptData */ #include "precompiled.h" +#include "temple_of_ahnqiraj.h" enum { @@ -54,7 +55,13 @@ enum struct MANGOS_DLL_DECL boss_viscidusAI : public ScriptedAI { - boss_viscidusAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } + boss_viscidusAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; uint32 m_uiPoisonShockTimer; uint32 m_uiPoisonBoltVolleyTimer; @@ -68,6 +75,21 @@ struct MANGOS_DLL_DECL boss_viscidusAI : public ScriptedAI void Aggro(Unit* pWho) { DoCastSpellIfCan(m_creature, SPELL_TOXIN); + + if (m_pInstance) + m_pInstance->SetData(TYPE_VISCIDUS, IN_PROGRESS); + } + + void JustReachedHome() + { + if (m_pInstance) + m_pInstance->SetData(TYPE_VISCIDUS, FAIL); + } + + void JustDied(Unit* pKiller) + { + if (m_pInstance) + m_pInstance->SetData(TYPE_VISCIDUS, DONE); } void UpdateAI(const uint32 uiDiff) diff --git a/scripts/kalimdor/temple_of_ahnqiraj/instance_temple_of_ahnqiraj.cpp b/scripts/kalimdor/temple_of_ahnqiraj/instance_temple_of_ahnqiraj.cpp index c42eb05f0..8f88c9fa5 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/instance_temple_of_ahnqiraj.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/instance_temple_of_ahnqiraj.cpp @@ -51,6 +51,17 @@ void instance_temple_of_ahnqiraj::Initialize() m_dialogueHelper.InitializeDialogueHelper(this); } +bool instance_temple_of_ahnqiraj::IsEncounterInProgress() const +{ + for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) + { + if (m_auiEncounter[i] == IN_PROGRESS) + return true; + } + + return false; +} + void instance_temple_of_ahnqiraj::DoHandleTempleAreaTrigger(uint32 uiTriggerId) { if (uiTriggerId == AREATRIGGER_TWIN_EMPERORS && !m_bIsEmperorsIntroDone) @@ -103,12 +114,6 @@ void instance_temple_of_ahnqiraj::OnObjectCreate(GameObject* pGo) m_mGoEntryGuidStore[pGo->GetEntry()] = pGo->GetObjectGuid(); } -bool instance_temple_of_ahnqiraj::IsEncounterInProgress() const -{ - // not active in AQ40 - return false; -} - void instance_temple_of_ahnqiraj::SetData(uint32 uiType, uint32 uiData) { switch(uiType) @@ -132,6 +137,12 @@ void instance_temple_of_ahnqiraj::SetData(uint32 uiType, uint32 uiData) m_uiBugTrioDeathCount = 0; m_auiEncounter[uiType] = uiData; break; + case TYPE_SARTURA: + case TYPE_FANKRISS: + case TYPE_VISCIDUS: + case TYPE_HUHURAN: + m_auiEncounter[uiType] = uiData; + break; case TYPE_TWINS: // Either of the twins can set data, so return to avoid double changing if (m_auiEncounter[uiType] == uiData) @@ -162,7 +173,8 @@ void instance_temple_of_ahnqiraj::SetData(uint32 uiType, uint32 uiData) std::ostringstream saveStream; saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2] << " " << m_auiEncounter[3] << " " - << m_auiEncounter[4]; + << m_auiEncounter[4] << " " << m_auiEncounter[5] << " " << m_auiEncounter[6] << " " << m_auiEncounter[7] << " " + << m_auiEncounter[8] << " " << m_auiEncounter[9]; m_strInstData = saveStream.str(); @@ -183,7 +195,8 @@ void instance_temple_of_ahnqiraj::Load(const char* chrIn) std::istringstream loadStream(chrIn); loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3] - >> m_auiEncounter[4]; + >> m_auiEncounter[4] >> m_auiEncounter[5] >> m_auiEncounter[6] >> m_auiEncounter[7] + >> m_auiEncounter[8] >> m_auiEncounter[9]; for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) { diff --git a/scripts/kalimdor/temple_of_ahnqiraj/temple_of_ahnqiraj.h b/scripts/kalimdor/temple_of_ahnqiraj/temple_of_ahnqiraj.h index f117991c9..21faa6f01 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/temple_of_ahnqiraj.h +++ b/scripts/kalimdor/temple_of_ahnqiraj/temple_of_ahnqiraj.h @@ -7,13 +7,17 @@ enum { - MAX_ENCOUNTER = 5, + MAX_ENCOUNTER = 9, TYPE_SKERAM = 0, TYPE_BUG_TRIO = 1, - TYPE_TWINS = 2, - TYPE_OURO = 3, - TYPE_CTHUN_PHASE = 4, + TYPE_SARTURA = 2, + TYPE_FANKRISS = 3, + TYPE_VISCIDUS = 4, + TYPE_HUHURAN = 5, + TYPE_TWINS = 6, + TYPE_OURO = 7, + TYPE_CTHUN_PHASE = 8, NPC_SKERAM = 15263, //NPC_KRI = 15511, diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 3b5b161bf..6ca5dcc33 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2655" + #define SD2_REVISION_NR "2656" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index d5903f1ac..dabdc0b67 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -953,7 +953,9 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1000885,'%s raises his massive axe over Grark.',0,2,0,27,'nuzark EMOTE_RAISE_AXE'), (-1000886,'%s raises his hand and then lowers it.',0,2,0,0,'lexlort EMOTE_LOWER_HAND'), (-1000887,'End him...',0,0,0,0,'lexlort SAY_LEXLORT_3'), -(-1000888,'You, soldier, report back to Kargath at once!',0,0,0,1,'lexlort SAY_LEXLORT_4'); +(-1000888,'You, soldier, report back to Kargath at once!',0,0,0,1,'lexlort SAY_LEXLORT_4'), +(-1000889,'%s submits.',0,2,0,0,'grark EMOTE_SUBMIT'), +(-1000890,'You have come to play? Then let us play!',0,0,0,0,'grark SAY_AGGRO'); -- -1 033 000 SHADOWFANG KEEP INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES diff --git a/sql/updates/r2656_scriptdev2.sql b/sql/updates/r2656_scriptdev2.sql new file mode 100644 index 000000000..39d451607 --- /dev/null +++ b/sql/updates/r2656_scriptdev2.sql @@ -0,0 +1,4 @@ +DELETE FROM script_texts WHERE entry IN (-1000889, -1000890); +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1000889,'%s submits.',0,2,0,0,'grark EMOTE_SUBMIT'), +(-1000890,'You have come to play? Then let us play!',0,0,0,0,'grark SAY_AGGRO'); From c85fe6696968a2df36f77821c45520e614cb6e89 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Mon, 13 Aug 2012 23:34:36 +0300 Subject: [PATCH 0645/1172] [2657] Major cleanup and rewrite of C'thun script - AQ 40 Notes: * properly fix and implement the Dark Glare spell handling * properly handle tentacles spawn and despawn * remove some workarounds from the stomach event - use areatriggers instead * prepare most tentacles scripts to be moved to eventAI Also fix some issues with the Ouro - Sandworm base spell ToDo: * the Digestive Acid spell should be handled in core, by environmental damage effects * the Phase 2 transform spell aura requires some visual core adjustments and stacking fix * C'thun whisperings charm spells NYI --- .../temple_of_ahnqiraj/boss_cthun.cpp | 1535 +++++++---------- .../kalimdor/temple_of_ahnqiraj/boss_ouro.cpp | 5 +- .../instance_temple_of_ahnqiraj.cpp | 57 +- .../temple_of_ahnqiraj/temple_of_ahnqiraj.h | 33 +- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 4 + sql/scriptdev2_script_full.sql | 11 +- sql/updates/r2657_mangos.sql | 4 + sql/updates/r2657_scriptdev2.sql | 10 + 9 files changed, 686 insertions(+), 975 deletions(-) create mode 100644 sql/updates/r2657_mangos.sql create mode 100644 sql/updates/r2657_scriptdev2.sql diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_cthun.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_cthun.cpp index c43285366..ed3d0eaf8 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/boss_cthun.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_cthun.cpp @@ -17,7 +17,7 @@ /* ScriptData SDName: Boss_Cthun SD%Complete: 95 -SDComment: Darkglare tracking issue +SDComment: Transform spell has some minor core issues. Eject from stomach event contains workarounds because of the missing spells. Digestive Acid should be handled in core. SDCategory: Temple of Ahn'Qiraj EndScriptData */ @@ -28,934 +28,673 @@ enum { EMOTE_WEAKENED = -1531011, - // ****** Out of Combat ****** - // Random Wispers - No text only sound, maybe handle them in instance script! - RANDOM_SOUND_WHISPER = 8663, - // ***** Phase 1 ******** - NPC_EYE_OF_CTHUN = 15589, - MOB_CLAW_TENTACLE = 15725, - MOB_EYE_TENTACLE = 15726, - MOB_SMALL_PORTAL = 15904, - - SPELL_GREEN_BEAM = 26134, - SPELL_DARK_GLARE = 26029, - SPELL_RED_COLORATION = 22518, // Probably not the right spell but looks similar - - // Eye Tentacles Spells - SPELL_MIND_FLAY = 26143, + SPELL_EYE_BEAM = 26134, + //SPELL_DARK_GLARE = 26029, + SPELL_ROTATE_TRIGGER = 26137, // phase switch spell - triggers 26009 or 26136. These trigger the Dark Glare spell - 26029 + SPELL_ROTATE_360_LEFT = 26009, + SPELL_ROTATE_360_RIGHT = 26136, - // Claw Tentacles Spells - SPELL_GROUND_RUPTURE = 26139, - SPELL_HAMSTRING = 26141, - - // *****Phase 2****** - // Body spells + // ***** Phase 2 ****** // SPELL_CARAPACE_CTHUN = 26156, // Was removed from client dbcs SPELL_TRANSFORM = 26232, - - // Giant Claw Tentacles - SPELL_MASSIVE_GROUND_RUPTURE = 26100, - - // Also casts Hamstring + SPELL_CTHUN_VULNERABLE = 26235, + SPELL_MOUTH_TENTACLE = 26332, // prepare target to teleport to stomach + //SPELL_DIGESTIVE_ACID_TELEPORT = 26220, // removed from DBC. stomach teleport spell + SPELL_EXIT_STOMACH_KNOCKBACK = 25383, // spell id is wrong + //SPELL_EXIT_STOMACH_JUMP = 26224, // removed from DBC. should make the player jump to the ceiling + //SPELL_EXIT_STOMACH_EFFECT = 26230, // removed from DBC. used to complete the eject effect from the stomach + //SPELL_PORT_OUT_STOMACH_EFFECT = 26648, // removed from DBC. used to kill players inside the stomach on evade + SPELL_DIGESTIVE_ACID = 26476, // damage spell - should be handled by the map + //SPELL_EXIT_STOMACH = 26221, // summons 15800 + + // ***** Summoned spells ***** + // Giant Claw tentacles + SPELL_GIANT_GROUND_RUPTURE = 26478, + //SPELL_MASSIVE_GROUND_RUPTURE = 26100, // spell not confirmed + SPELL_GROUND_TREMOR = 6524, + SPELL_HAMSTRING = 26211, SPELL_THRASH = 3391, - // Giant Eye Tentacles - // CHAIN CASTS "SPELL_GREEN_BEAM" - - // Stomach Spells - SPELL_MOUTH_TENTACLE = 26332, - SPELL_EXIT_STOMACH_KNOCKBACK = 25383, - SPELL_DIGESTIVE_ACID = 26476, - - // Mobs - MOB_BODY_OF_CTHUN = 15809, - MOB_GIANT_CLAW_TENTACLE = 15728, - MOB_GIANT_EYE_TENTACLE = 15334, - MOB_FLESH_TENTACLE = 15802, - MOB_GIANT_PORTAL = 15910, -}; + // Npcs + // Phase 1 npcs + NPC_CLAW_TENTACLE = 15725, // summoned by missing spell 26140 + NPC_EYE_TENTACLE = 15726, // summoned by spells 26144 - 26151; script effect of 26152 - triggered every 45 secs + NPC_TENTACLE_PORTAL = 15904, // summoned by missing spell 26396 -//Stomach Teleport positions -#define STOMACH_X -8562.0f -#define STOMACH_Y 2037.0f -#define STOMACH_Z -70.0f -#define STOMACH_O 5.05f - -//Flesh tentacle positions -#define TENTACLE_POS1_X -8571.0f -#define TENTACLE_POS1_Y 1990.0f -#define TENTACLE_POS1_Z -98.0f -#define TENTACLE_POS1_O 1.22f - -#define TENTACLE_POS2_X -8525.0f -#define TENTACLE_POS2_Y 1994.0f -#define TENTACLE_POS2_Z -98.0f -#define TENTACLE_POS2_O 2.12f - -//Kick out position -- unneeded - replace this with areatrigger handling of trigger [Trigger 4033]! -#define KICK_X -8545.0f -#define KICK_Y 1984.0f -#define KICK_Z -96.0f - -struct MANGOS_DLL_DECL flesh_tentacleAI : public ScriptedAI -{ - flesh_tentacleAI(Creature* pCreature) : ScriptedAI(pCreature) - { - SetCombatMovement(false); - Reset(); - } + // Phase 2 npcs + NPC_GIANT_CLAW_TENTACLE = 15728, // summoned by missing spell 26216 every 60 secs - also teleported by spell 26191 + NPC_GIANT_EYE_TENTACLE = 15334, // summoned by missing spell 26768 every 60 secs + NPC_FLESH_TENTACLE = 15802, // summoned by missing spell 26237 every 10 secs + NPC_GIANT_TENTACLE_PORTAL = 15910, // summoned by missing spell 26477 + NPC_EXIT_TRIGGER = 15800, - ObjectGuid m_cThunGuid; - uint32 m_uiCheckTimer; + DISPLAY_ID_CTHUN_BODY = 15786, // Helper display id; This is needed in order to have the proper transform animation. ToDo: remove this when auras are fixed in core. - void SpawnedByCthun(Creature* pCThun) - { - m_cThunGuid = pCThun->GetObjectGuid(); - } + AREATRIGGER_STOMACH_1 = 4033, + AREATRIGGER_STOMACH_2 = 4034, - void Reset() - { - m_uiCheckTimer = 1000; - } + MAX_FLESH_TENTACLES = 2, + MAX_EYE_TENTACLES = 8, +}; - void UpdateAI(const uint32 diff); +static const float afCthunLocations[4][4] = +{ + {-8571.0f, 1990.0f, -98.0f, 1.22f}, // flesh tentacles locations + {-8525.0f, 1994.0f, -98.0f, 2.12f}, + {-8562.0f, 2037.0f, -70.0f, 5.05f}, // stomach teleport location + {-8545.6f, 1987.7f, -32.9f, 0.0f}, // stomach eject location +}; - void JustDied(Unit* killer); +enum CThunPhase +{ + PHASE_EYE_NORMAL = 0, + PHASE_EYE_DARK_GLARE = 1, + PHASE_TRANSITION = 2, + PHASE_CTHUN = 3, + PHASE_CTHUN_WEAKENED = 4, }; -struct MANGOS_DLL_DECL eye_of_cthunAI : public ScriptedAI +/*###### +## boss_eye_of_cthun +######*/ + +struct MANGOS_DLL_DECL boss_eye_of_cthunAI : public Scripted_NoMovementAI { - eye_of_cthunAI(Creature* pCreature) : ScriptedAI(pCreature) + boss_eye_of_cthunAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { - SetCombatMovement(false); - m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - if (!m_pInstance) - error_log("SD2: No Instance eye_of_cthunAI"); - Reset(); } ScriptedInstance* m_pInstance; - // Global variables - uint32 m_uiPhaseTimer; + CThunPhase m_Phase; - // Eye beam phase - uint32 m_uiBeamTimer; - uint32 m_uiEyeTentacleTimer; uint32 m_uiClawTentacleTimer; + uint32 m_uiEyeTentacleTimer; + uint32 m_uiBeamTimer; + uint32 m_uiDarkGlareTimer; + uint32 m_uiDarkGlareEndTimer; - // Dark Glare phase - uint32 m_uiDarkGlareTick; - uint32 m_uiDarkGlareTickTimer; - float m_fDarkGlareAngle; - bool m_bClockWise; + GuidList m_lEyeTentaclesList; void Reset() { - // Phase information - m_uiPhaseTimer = 50000; // First dark glare in 50 seconds + m_Phase = PHASE_EYE_NORMAL; + + m_uiDarkGlareTimer = 45000; + m_uiDarkGlareEndTimer = 40000; + m_uiClawTentacleTimer = urand(10000, 15000); + m_uiBeamTimer = 0; + m_uiEyeTentacleTimer = 45000; + } + + void Aggro(Unit* pWho) + { + if (m_pInstance) + m_pInstance->SetData(TYPE_CTHUN, IN_PROGRESS); + } - // Eye beam phase 50 seconds - m_uiBeamTimer = 3000; - m_uiEyeTentacleTimer = 45000; // Always spawns 5 seconds before Dark Beam - m_uiClawTentacleTimer = 12500; // 4 per Eye beam phase (unsure if they spawn durring Dark beam) + void JustDied(Unit* pKiller) + { + // Allow the body to begin the transition + if (m_pInstance) + { + if (Creature* pCthun = m_pInstance->GetSingleCreatureFromStorage(NPC_CTHUN)) + pCthun->AI()->AttackStart(pKiller); + else + error_log("SD2: C'thun could not be found. Please check your database!"); + } + } - // Dark Beam phase 35 seconds (each tick = 1 second, 35 ticks) - m_uiDarkGlareTick = 0; - m_uiDarkGlareTickTimer = 1000; - m_fDarkGlareAngle = 0; - m_bClockWise = false; + void JustReachedHome() + { + // Despawn Eye tentacles on evade + DoDespawnEyeTentacles(); - // Reset flags - m_creature->RemoveAurasDueToSpell(SPELL_RED_COLORATION); - m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_NON_ATTACKABLE); + if (m_pInstance) + m_pInstance->SetData(TYPE_CTHUN, FAIL); } void JustSummoned(Creature* pSummoned) { - if (pSummoned->GetEntry() == MOB_EYE_TENTACLE) + switch (pSummoned->GetEntry()) { - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) - pSummoned->AI()->AttackStart(pTarget); + case NPC_EYE_TENTACLE: + m_lEyeTentaclesList.push_back(pSummoned->GetObjectGuid()); + // no break; + case NPC_CLAW_TENTACLE: + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + pSummoned->AI()->AttackStart(pTarget); + + pSummoned->SummonCreature(NPC_TENTACLE_PORTAL, pSummoned->GetPositionX(), pSummoned->GetPositionY(), pSummoned->GetPositionZ(), 0, TEMPSUMMON_CORPSE_DESPAWN, 0); + break; } } - void SpawnEyeTentacle(float x, float y) + void SummonedCreatureJustDied(Creature* pSummoned) { - m_creature->SummonCreature(MOB_EYE_TENTACLE, m_creature->GetPositionX()+x ,m_creature->GetPositionY()+y, m_creature->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 500); + // Despawn the tentacle portal - this applies to all the summoned tentacles + if (Creature* pPortal = GetClosestCreatureWithEntry(pSummoned, NPC_TENTACLE_PORTAL, 5.0f)) + pPortal->ForcedDespawn(); } - void Aggro(Unit* pWho) + void SummonedCreatureDespawn(Creature* pSummoned) { - if (m_pInstance) - m_pInstance->SetData(TYPE_CTHUN_PHASE, PHASE_EYE_NORMAL); + // Used only after evade + if (SelectHostileTarget()) + return; + + // Despawn the tentacle portal - this applies to all the summoned tentacles for evade case (which is handled by creature linking) + if (Creature* pPortal = GetClosestCreatureWithEntry(pSummoned, NPC_TENTACLE_PORTAL, 5.0f)) + pPortal->ForcedDespawn(); } - void EnterEvadeMode() + // Wrapper to kill the eye tentacles before summoning new ones + void DoDespawnEyeTentacles() { - if (m_pInstance) - m_pInstance->SetData(TYPE_CTHUN_PHASE, PHASE_NOT_STARTED); + for (GuidList::const_iterator itr = m_lEyeTentaclesList.begin(); itr != m_lEyeTentaclesList.end(); ++itr) + { + if (Creature* pTemp = m_creature->GetMap()->GetCreature(*itr)) + pTemp->DealDamage(pTemp, pTemp->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NONE, NULL, false); + } - ScriptedAI::EnterEvadeMode(); + m_lEyeTentaclesList.clear(); } - void UpdateAI(const uint32 uiDiff) + // Custom threat management + bool SelectHostileTarget() { - // Check if we have a target - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; + Unit* pTarget = NULL; + Unit* pOldTarget = m_creature->getVictim(); + + if (!m_creature->getThreatManager().isThreatListEmpty()) + pTarget = m_creature->getThreatManager().getHostileTarget(); + + if (pTarget) + { + if (pOldTarget != pTarget && m_Phase == PHASE_EYE_NORMAL) + AttackStart(pTarget); + + // Set victim to old target (if not while Dark Glare) + if (pOldTarget && pOldTarget->isAlive() && m_Phase == PHASE_EYE_NORMAL) + { + m_creature->SetTargetGuid(pOldTarget->GetObjectGuid()); + m_creature->SetInFront(pOldTarget); + } + + return true; + } + + // Will call EnterEvadeMode if fit + return m_creature->SelectHostileTarget(); + } - // No instance - if (!m_pInstance) + void UpdateAI(const uint32 uiDiff) + { + if (!SelectHostileTarget()) return; - switch (m_pInstance->GetData(TYPE_CTHUN_PHASE)) + switch (m_Phase) { case PHASE_EYE_NORMAL: - { - // m_uiBeamTimer + if (m_uiBeamTimer < uiDiff) { - // SPELL_GREEN_BEAM if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) { - m_creature->InterruptNonMeleeSpells(false); - DoCastSpellIfCan(pTarget, SPELL_GREEN_BEAM); - - // Correctly update our target - m_creature->SetTargetGuid(pTarget->GetObjectGuid()); + if (DoCastSpellIfCan(pTarget, SPELL_EYE_BEAM) == CAST_OK) + { + m_creature->SetTargetGuid(pTarget->GetObjectGuid()); + m_uiBeamTimer = 3000; + } } - - //Beam every 3 seconds - m_uiBeamTimer = 3000; } else m_uiBeamTimer -= uiDiff; - // m_uiClawTentacleTimer - if (m_uiClawTentacleTimer < uiDiff) + if (m_uiDarkGlareTimer < uiDiff) { - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + // Cast the rotation spell + if (DoCastSpellIfCan(m_creature, SPELL_ROTATE_TRIGGER) == CAST_OK) { - // Spawn claw tentacle on the random target - if (Creature* pSummoned = m_creature->SummonCreature(MOB_CLAW_TENTACLE, pTarget->GetPositionX(), pTarget->GetPositionY(), pTarget->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 500)) - pSummoned->AI()->AttackStart(pTarget); - } - - // One claw tentacle every 12.5 seconds - m_uiClawTentacleTimer = 12500; - } - else - m_uiClawTentacleTimer -= uiDiff; - - // m_uiEyeTentacleTimer - if (m_uiEyeTentacleTimer < uiDiff) - { - //Spawn the 8 Eye Tentacles in the corret spots - SpawnEyeTentacle(0, 20); //south - SpawnEyeTentacle(10, 10); //south west - SpawnEyeTentacle(20, 0); //west - SpawnEyeTentacle(10, -10); //north west - - SpawnEyeTentacle(0, -20); //north - SpawnEyeTentacle(-10, -10); //north east - SpawnEyeTentacle(-20, 0); // east - SpawnEyeTentacle(-10, 10); // south east - - // No point actually putting a timer here since - // These shouldn't trigger agian until after phase shifts - m_uiEyeTentacleTimer = 45000; - } - else - m_uiEyeTentacleTimer -= uiDiff; - - // m_uiPhaseTimer - if (m_uiPhaseTimer < uiDiff) - { - //Switch to Dark Beam - m_pInstance->SetData(TYPE_CTHUN_PHASE, PHASE_EYE_DARK_GLARE); - - m_creature->InterruptNonMeleeSpells(false); + // Remove the target focus but allow the boss to face the current victim + m_creature->SetTargetGuid(ObjectGuid()); + m_creature->SetFacingToObject(m_creature->getVictim()); - // Select random target for dark beam to start on - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) - { - // Correctly update our target - m_creature->SetTargetGuid(pTarget->GetObjectGuid()); - - // Face our target - m_fDarkGlareAngle = m_creature->GetAngle(pTarget); - m_uiDarkGlareTickTimer = 1000; - m_uiDarkGlareTick = 0; - m_bClockWise = urand(0, 1); + // Switch to Dark Glare phase + m_uiDarkGlareTimer = 45000; + m_Phase = PHASE_EYE_DARK_GLARE; } - - // Add red coloration to C'thun - DoCastSpellIfCan(m_creature, SPELL_RED_COLORATION); - - // Freeze animation - - // Darkbeam for 35 seconds - m_uiPhaseTimer = 35000; } else - m_uiPhaseTimer -= uiDiff; + m_uiDarkGlareTimer -= uiDiff; break; - } case PHASE_EYE_DARK_GLARE: - { - // Dark Glare - if (m_uiDarkGlareTick < 35) - { - if (m_uiDarkGlareTickTimer < uiDiff) - { - // Remove any target - m_creature->SetTargetGuid(ObjectGuid()); - - // Set angle and cast - m_creature->SetOrientation(m_fDarkGlareAngle + (m_bClockWise ? 1 : -1) * ((float)m_uiDarkGlareTick*M_PI_F/35)); - m_creature->StopMoving(); - - // Actual dark glare cast, maybe something missing here? - DoCastSpellIfCan(m_creature, SPELL_DARK_GLARE); - - // Increase tick - ++m_uiDarkGlareTick; - - // 1 second per tick - m_uiDarkGlareTickTimer = 1000; - } - else - m_uiDarkGlareTickTimer -= uiDiff; - } - - // m_uiPhaseTimer - if (m_uiPhaseTimer < uiDiff) + if (m_uiDarkGlareEndTimer < uiDiff) { - // Switch to Eye Beam - m_pInstance->SetData(TYPE_CTHUN_PHASE, PHASE_EYE_NORMAL); + // Remove rotation auras + m_creature->RemoveAurasDueToSpell(SPELL_ROTATE_360_LEFT); + m_creature->RemoveAurasDueToSpell(SPELL_ROTATE_360_RIGHT); - m_uiBeamTimer = 3000; - m_uiEyeTentacleTimer = 45000; //Always spawns 5 seconds before Dark Beam - m_uiClawTentacleTimer = 12500; //4 per Eye beam phase (unsure if they spawn durring Dark beam) - - m_creature->InterruptNonMeleeSpells(false); - - // Remove Red coloration from C'thun - m_creature->RemoveAurasDueToSpell(SPELL_RED_COLORATION); - - // Freeze animation - m_creature->SetUInt32Value(UNIT_FIELD_FLAGS, 0); - - // Eye Beam for 50 seconds - m_uiPhaseTimer = 50000; + // Switch to Eye Beam + m_uiDarkGlareEndTimer = 40000; + m_uiBeamTimer = 1000; + m_Phase = PHASE_EYE_NORMAL; } else - m_uiPhaseTimer -= uiDiff; + m_uiDarkGlareEndTimer -= uiDiff; break; - } - // Transition phase - case PHASE_TRANSITION: - { - // Remove any target - m_creature->SetTargetGuid(ObjectGuid()); - m_creature->SetHealth(0); - - // Do not kill yet, to be able to reset on evade - break; - } + } - // Dead phase - case PHASE_FINISH: + if (m_uiClawTentacleTimer < uiDiff) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) { - m_creature->DealDamage(m_creature, m_creature->GetMaxHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NONE, NULL, false); - return; + // Spawn claw tentacle on the random target on both phases + m_creature->SummonCreature(NPC_CLAW_TENTACLE, pTarget->GetPositionX(), pTarget->GetPositionY(), pTarget->GetPositionZ(), 0, TEMPSUMMON_DEAD_DESPAWN, 0); + m_uiClawTentacleTimer = urand(7000, 13000); } } - } - - void DamageTaken(Unit* pDealer, uint32& uiDamage) - { - // No instance - if (!m_pInstance) - return; + else + m_uiClawTentacleTimer -= uiDiff; - switch (m_pInstance->GetData(TYPE_CTHUN_PHASE)) + if (m_uiEyeTentacleTimer <= uiDiff) { - case PHASE_EYE_NORMAL: - case PHASE_EYE_DARK_GLARE: - { - // Only if it will kill - if (uiDamage < m_creature->GetHealth()) - return; - - // Fake death in phase 0 or 1 (green beam or dark glare phase) - m_creature->InterruptNonMeleeSpells(false); - - // Remove Red coloration from c'thun - m_creature->RemoveAurasDueToSpell(SPELL_RED_COLORATION); - - // Reset to normal emote state and prevent select and attack - m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_NON_ATTACKABLE); - - // Remove Target field - m_creature->SetTargetGuid(ObjectGuid()); + // Despawn the eye tentacles if necessary + DoDespawnEyeTentacles(); - // Death animation/ respawning; - m_pInstance->SetData(TYPE_CTHUN_PHASE, PHASE_TRANSITION); - // Ensure CThun is in combat - if (Creature* pCThun = m_pInstance->GetSingleCreatureFromStorage(NPC_CTHUN)) - pCThun->AI()->AttackStart(pDealer); - - m_creature->SetHealth(0); - uiDamage = 0; - - m_creature->InterruptNonMeleeSpells(true); - m_creature->RemoveAllAuras(); - - break; - } - case PHASE_FINISH: + // Spawn 8 Eye Tentacles + float fX, fY, fZ; + for (uint8 i = 0; i < MAX_EYE_TENTACLES; ++i) { - // Allow death here - return; + m_creature->GetNearPoint(m_creature, fX, fY, fZ, 0, 30.0f, M_PI_F/4*i); + m_creature->SummonCreature(NPC_EYE_TENTACLE, fX, fY, fZ, 0, TEMPSUMMON_DEAD_DESPAWN, 0); } - default: - { - // Prevent death in this phase - uiDamage = 0; - return; - } - break; + m_uiEyeTentacleTimer = 45000; } + else + m_uiEyeTentacleTimer -= uiDiff; } }; -struct MANGOS_DLL_DECL cthunAI : public ScriptedAI +/*###### +## boss_cthun +######*/ + +struct MANGOS_DLL_DECL boss_cthunAI : public Scripted_NoMovementAI { - cthunAI(Creature* pCreature) : ScriptedAI(pCreature) + boss_cthunAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { - SetCombatMovement(false); - m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - if (!m_pInstance) - error_log("SD2: No Instance eye_of_cthunAI"); - + // Set active in order to be used during the instance progress + m_creature->SetActiveObjectState(true); Reset(); } ScriptedInstance* m_pInstance; - // Out of combat whisper timer - uint32 m_uiWisperTimer; + CThunPhase m_Phase; // Global variables uint32 m_uiPhaseTimer; - - //------------------- - - // Body Phase - uint32 m_uiEyeTentacleTimer; uint8 m_uiFleshTentaclesKilled; + uint32 m_uiEyeTentacleTimer; uint32 m_uiGiantClawTentacleTimer; uint32 m_uiGiantEyeTentacleTimer; - uint32 m_uiStomachAcidTimer; + uint32 m_uiDigestiveAcidTimer; + + // Body Phase + uint32 m_uiMouthTentacleTimer; uint32 m_uiStomachEnterTimer; - uint32 m_uiStomachEnterVisTimer; - ObjectGuid m_stomachEnterTargetGuid; + GuidList m_lEyeTentaclesList; + GuidList m_lPlayersInStomachList; - // Stomach map, bool = true then in stomach - typedef UNORDERED_MAP StomachMap; - StomachMap m_mStomachMap; + ObjectGuid m_stomachEnterTargetGuid; void Reset() { - // One random wisper every 90 - 300 seconds - m_uiWisperTimer = 90000; - // Phase information - m_uiPhaseTimer = 10000; // Emerge in 10 seconds + m_Phase = PHASE_TRANSITION; + + m_uiPhaseTimer = 5000; + m_uiFleshTentaclesKilled = 0; + m_uiEyeTentacleTimer = 35000; + m_uiGiantClawTentacleTimer = 20000; + m_uiGiantEyeTentacleTimer = 50000; + m_uiDigestiveAcidTimer = 4000; // Body Phase - m_uiEyeTentacleTimer = 30000; - m_uiFleshTentaclesKilled = 0; - m_uiGiantClawTentacleTimer = 15000; // 15 seconds into body phase (1 min repeat) - m_uiGiantEyeTentacleTimer = 45000; // 15 seconds into body phase (1 min repeat) - m_uiStomachAcidTimer = 4000; // Every 4 seconds - m_uiStomachEnterTimer = 10000; // Every 10 seconds - m_uiStomachEnterVisTimer = 0; // Always 3.5 seconds after Stomach Enter Timer - m_stomachEnterTargetGuid.Clear(); // Target to be teleported to stomach + m_uiMouthTentacleTimer = 15000; + m_uiStomachEnterTimer = 0; - // Clear players in stomach and outside - m_mStomachMap.clear(); + // Clear players in stomach + m_lPlayersInStomachList.clear(); // Reset flags - m_creature->RemoveAurasDueToSpell(SPELL_TRANSFORM); - m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_NON_ATTACKABLE); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); } - void JustSummoned(Creature* pSummoned) + void DamageTaken(Unit* pDealer, uint32& uiDamage) + { + // Ignore damage reduction when vulnerable + if (m_Phase == PHASE_CTHUN_WEAKENED) + return; + + // Not weakened so reduce damage by 99% - workaround for missing spell 26156 + if (uiDamage / 99 > 0) + uiDamage /= 99; + else + uiDamage = 1; + + // Prevent death in non-weakened state + if (uiDamage >= m_creature->GetHealth()) + uiDamage = 0; + } + + void EnterEvadeMode() { - if (pSummoned->GetEntry() == MOB_EYE_TENTACLE) + // Kill any player from the stomach on evade - this is becuase C'thun cannot be soloed. + for (GuidList::const_iterator itr = m_lPlayersInStomachList.begin(); itr != m_lPlayersInStomachList.end(); ++itr) { - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) - pSummoned->AI()->AttackStart(pTarget); + // Workaround for missing spell 26648 + if (Player* pPlayer = m_creature->GetMap()->GetPlayer(*itr)) + m_creature->DealDamage(pPlayer, pPlayer->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NONE, NULL, false); } + + Scripted_NoMovementAI::EnterEvadeMode(); } - void SpawnEyeTentacle(float x, float y) + void JustReachedHome() { - m_creature->SummonCreature(MOB_EYE_TENTACLE, m_creature->GetPositionX()+x ,m_creature->GetPositionY()+y, m_creature->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 500); + if (m_pInstance) + m_pInstance->SetData(TYPE_CTHUN, FAIL); } - Player* SelectRandomNotStomach() + void JustDied(Unit* pKiller) { - if (m_mStomachMap.empty()) - return NULL; + m_creature->SetActiveObjectState(false); - std::vector vTempTargets; - vTempTargets.reserve(m_mStomachMap.size()); + if (m_pInstance) + m_pInstance->SetData(TYPE_CTHUN, DONE); + } - // Get all players in map - for (StomachMap::const_iterator itr = m_mStomachMap.begin(); itr != m_mStomachMap.end(); ++itr) + void JustSummoned(Creature* pSummoned) + { + switch (pSummoned->GetEntry()) { - // Check for valid player - Player* pPlayer = m_creature->GetMap()->GetPlayer(itr->first); + case NPC_EYE_TENTACLE: + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + pSummoned->AI()->AttackStart(pTarget); + + m_lEyeTentaclesList.push_back(pSummoned->GetObjectGuid()); + pSummoned->SummonCreature(NPC_TENTACLE_PORTAL, pSummoned->GetPositionX(), pSummoned->GetPositionY(), pSummoned->GetPositionZ(), 0, TEMPSUMMON_CORPSE_DESPAWN, 0); + break; + case NPC_GIANT_EYE_TENTACLE: + case NPC_GIANT_CLAW_TENTACLE: + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + pSummoned->AI()->AttackStart(pTarget); - // Only units out of stomach - if (pPlayer && itr->second == false) - vTempTargets.push_back(pPlayer); + pSummoned->SummonCreature(NPC_GIANT_TENTACLE_PORTAL, pSummoned->GetPositionX(), pSummoned->GetPositionY(), pSummoned->GetPositionZ(), 0, TEMPSUMMON_CORPSE_DESPAWN, 0); + break; } + } - if (vTempTargets.empty()) - return NULL; + void SummonedCreatureJustDied(Creature* pSummoned) + { + switch (pSummoned->GetEntry()) + { + // Handle portal despawn on tentacle kill + case NPC_EYE_TENTACLE: + if (Creature* pPortal = GetClosestCreatureWithEntry(pSummoned, NPC_TENTACLE_PORTAL, 5.0f)) + pPortal->ForcedDespawn(); + break; + case NPC_GIANT_EYE_TENTACLE: + case NPC_GIANT_CLAW_TENTACLE: + if (Creature* pPortal = GetClosestCreatureWithEntry(pSummoned, NPC_GIANT_TENTACLE_PORTAL, 5.0f)) + pPortal->ForcedDespawn(); + break; + // Handle the stomach tentacles kill + case NPC_FLESH_TENTACLE: + ++m_uiFleshTentaclesKilled; + if (m_uiFleshTentaclesKilled == MAX_FLESH_TENTACLES) + { + if (DoCastSpellIfCan(m_creature, SPELL_CTHUN_VULNERABLE, CAST_INTERRUPT_PREVIOUS) == CAST_OK) + { + DoScriptText(EMOTE_WEAKENED, m_creature); + m_uiPhaseTimer = 45000; + m_Phase = PHASE_CTHUN_WEAKENED; + } + } + break; + } + } - // Get random but only if we have more than one unit on threat list - return vTempTargets[urand(0, vTempTargets.size()- 1)]; + // Wrapper to handle the Flesh Tentacles spawn + void DoSpawnFleshTentacles() + { + m_uiFleshTentaclesKilled = 0; + + // Spawn 2 flesh tentacles + for (uint8 i = 0; i < MAX_FLESH_TENTACLES; ++i) + m_creature->SummonCreature(NPC_FLESH_TENTACLE, afCthunLocations[i][0], afCthunLocations[i][1], afCthunLocations[i][2], afCthunLocations[i][3], TEMPSUMMON_DEAD_DESPAWN, 0); } - void UpdateAI(const uint32 uiDiff) + // Wrapper to kill the eye tentacles before summoning new ones + void DoDespawnEyeTentacles() { - // Check if we have a target - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + for (GuidList::const_iterator itr = m_lEyeTentaclesList.begin(); itr != m_lEyeTentaclesList.end(); ++itr) { - // No target so we'll use this section to do our random wispers instance wide - // WisperTimer - if (m_uiWisperTimer < uiDiff) - { - if (!m_creature->GetMap()->IsDungeon()) - return; + if (Creature* pTemp = m_creature->GetMap()->GetCreature(*itr)) + pTemp->DealDamage(pTemp, pTemp->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NONE, NULL, false); + } + + m_lEyeTentaclesList.clear(); + } + + // Wrapper to remove a stored player from the stomach + void DoRemovePlayerFromStomach(Player* pPlayer) + { + if (pPlayer) + m_lPlayersInStomachList.remove(pPlayer->GetObjectGuid()); + } + + // Custom threat management + bool SelectHostileTarget() + { + Unit* pTarget = NULL; + Unit* pOldTarget = m_creature->getVictim(); - // Play random sound to the map - m_creature->GetMap()->PlayDirectSoundToMap(RANDOM_SOUND_WHISPER); + if (!m_creature->getThreatManager().isThreatListEmpty()) + pTarget = m_creature->getThreatManager().getHostileTarget(); - // One random wisper every 90 - 300 seconds - m_uiWisperTimer = urand(90000, 300000); + if (pTarget) + { + if (pOldTarget != pTarget) + AttackStart(pTarget); + + // Set victim to old target + if (pOldTarget && pOldTarget->isAlive()) + { + m_creature->SetTargetGuid(pOldTarget->GetObjectGuid()); + m_creature->SetInFront(pOldTarget); } - else - m_uiWisperTimer -= uiDiff; - return; + return true; } - m_creature->SetTargetGuid(ObjectGuid()); + // Will call EnterEvadeMode if fit + return m_creature->SelectHostileTarget(); + } - // No instance - if (!m_pInstance) + void UpdateAI(const uint32 uiDiff) + { + if (!SelectHostileTarget()) return; - switch (m_pInstance->GetData(TYPE_CTHUN_PHASE)) + switch (m_Phase) { - // Transition phase case PHASE_TRANSITION: - { - // PhaseTimer + if (m_uiPhaseTimer < uiDiff) { - // Switch - m_pInstance->SetData(TYPE_CTHUN_PHASE, PHASE_CTHUN); - - // Switch to C'thun model - m_creature->InterruptNonMeleeSpells(false); - DoCastSpellIfCan(m_creature, SPELL_TRANSFORM); - m_creature->SetHealth(m_creature->GetMaxHealth()); - - m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_NON_ATTACKABLE); - - // Emerging phase - m_creature->SetInCombatWithZone(); - - // Place all units in threat list on outside of stomach - m_mStomachMap.clear(); + // Note: we need to set the display id before casting the transform spell, in order to get the proper animation + m_creature->SetDisplayId(DISPLAY_ID_CTHUN_BODY); - ThreatList const& tList = m_creature->getThreatManager().getThreatList(); - for (ThreatList::const_iterator i = tList.begin();i != tList.end(); ++i) + // Transform and start C'thun phase + if (DoCastSpellIfCan(m_creature, SPELL_TRANSFORM) == CAST_OK) { - // Outside stomach, only players - if ((*i)->getUnitGuid().IsPlayer()) - m_mStomachMap[(*i)->getUnitGuid()] = false; - } - - // Spawn 2 flesh tentacles - m_uiFleshTentaclesKilled = 0; - - // Spawn flesh tentacle - Creature* pSpawned = m_creature->SummonCreature(MOB_FLESH_TENTACLE, TENTACLE_POS1_X, TENTACLE_POS1_Y, TENTACLE_POS1_Z, TENTACLE_POS1_O, TEMPSUMMON_CORPSE_DESPAWN, 0); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + DoSpawnFleshTentacles(); - if (!pSpawned) - ++m_uiFleshTentaclesKilled; - else - { - if (flesh_tentacleAI* pTentacleAI = dynamic_cast(pSpawned->AI())) - pTentacleAI->SpawnedByCthun(m_creature); + m_Phase = PHASE_CTHUN; + m_uiPhaseTimer = 0; } - - // Spawn flesh tentacle - pSpawned = m_creature->SummonCreature(MOB_FLESH_TENTACLE, TENTACLE_POS2_X, TENTACLE_POS2_Y, TENTACLE_POS2_Z, TENTACLE_POS2_O, TEMPSUMMON_CORPSE_DESPAWN, 0); - - if (!pSpawned) - ++m_uiFleshTentaclesKilled; - else - { - if (flesh_tentacleAI* pTentacleAI = dynamic_cast(pSpawned->AI())) - pTentacleAI->SpawnedByCthun(m_creature); - } - - m_uiPhaseTimer = 0; } else m_uiPhaseTimer -= uiDiff; break; - - } - // Body Phase case PHASE_CTHUN: - { - // Weaken - if (m_uiFleshTentaclesKilled > 1) - { - m_pInstance->SetData(TYPE_CTHUN_PHASE, PHASE_CTHUN_WEAKENED); - - DoScriptText(EMOTE_WEAKENED, m_creature); - m_uiPhaseTimer = 45000; - - DoCastSpellIfCan(m_creature, SPELL_RED_COLORATION, CAST_TRIGGERED); - - // Kick all players out of stomach - for (StomachMap::iterator itr = m_mStomachMap.begin(); itr != m_mStomachMap.end(); ++itr) - { - // Check for valid player - Player* pPlayer = m_creature->GetMap()->GetPlayer(itr->first); - - if (pPlayer && itr->second == true) - { - // Teleport each player out - DoTeleportPlayer(pPlayer, m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ()+10, rand()%6); - - // Cast knockback on them - DoCastSpellIfCan(pPlayer, SPELL_EXIT_STOMACH_KNOCKBACK, CAST_TRIGGERED); - // Remove the acid debuff - pPlayer->RemoveAurasDueToSpell(SPELL_DIGESTIVE_ACID); - - itr->second = false; - } - } - - return; - } - - // Stomach acid - if (m_uiStomachAcidTimer < uiDiff) + if (m_uiMouthTentacleTimer < uiDiff) { - // Apply aura to all players in stomach - for (StomachMap::iterator itr = m_mStomachMap.begin(); itr != m_mStomachMap.end(); ++itr) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0, uint32(0), SELECT_FLAG_IN_LOS)) { - // Check for valid player - Player* pPlayer = m_creature->GetMap()->GetPlayer(itr->first); - - // Only apply to units in stomach - if (pPlayer && itr->second == true) - { - // Cast digestive acid on them - DoCastSpellIfCan(pPlayer, SPELL_DIGESTIVE_ACID, CAST_TRIGGERED); - - // Check if player should be kicked from stomach - if (pPlayer->IsWithinDist3d(KICK_X, KICK_Y, KICK_Z, 10.0f)) - { - // Teleport each player out - DoTeleportPlayer(pPlayer, m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ()+10, rand()%6); - - // Cast knockback on them - DoCastSpellIfCan(pPlayer, SPELL_EXIT_STOMACH_KNOCKBACK, CAST_TRIGGERED); - - // Remove the acid debuff - pPlayer->RemoveAurasDueToSpell(SPELL_DIGESTIVE_ACID); - - itr->second = false; - } - } - } - - m_uiStomachAcidTimer = 4000; - } - else - m_uiStomachAcidTimer -= uiDiff; - - // Stomach Enter Timer - if (m_uiStomachEnterTimer < uiDiff) - { - if (Player* pTarget = SelectRandomNotStomach()) - { - // Set target in stomach - m_mStomachMap[pTarget->GetObjectGuid()] = true; + // Cast the spell using the target as source pTarget->InterruptNonMeleeSpells(false); pTarget->CastSpell(pTarget, SPELL_MOUTH_TENTACLE, true, NULL, NULL, m_creature->GetObjectGuid()); m_stomachEnterTargetGuid = pTarget->GetObjectGuid(); - m_uiStomachEnterVisTimer = 3800; - } - m_uiStomachEnterTimer = 13800; + m_uiStomachEnterTimer = 3800; + m_uiMouthTentacleTimer = urand(13000, 15000); + } } else - m_uiStomachEnterTimer -= uiDiff; + m_uiMouthTentacleTimer -= uiDiff; - if (m_uiStomachEnterVisTimer && m_stomachEnterTargetGuid) + // Teleport the target to the stomach after a few seconds + if (m_uiStomachEnterTimer) { - if (m_uiStomachEnterVisTimer <= uiDiff) + if (m_uiStomachEnterTimer <= uiDiff) { // Check for valid player if (Player* pPlayer = m_creature->GetMap()->GetPlayer(m_stomachEnterTargetGuid)) - DoTeleportPlayer(pPlayer, STOMACH_X, STOMACH_Y, STOMACH_Z, STOMACH_O); - - m_stomachEnterTargetGuid.Clear(); - m_uiStomachEnterVisTimer = 0; - - // Note that actually C'Thun cannot be soloed, so kill all players, if no player left outside of stomach - bool bKillAllPlayer = true; - for (StomachMap::iterator itr = m_mStomachMap.begin(); itr != m_mStomachMap.end(); ++itr) - { - Player* pPlayer = m_creature->GetMap()->GetPlayer(itr->first); - if (itr->second == false && pPlayer) - { - bKillAllPlayer = false; - break; - } - } - if (bKillAllPlayer) { - for (StomachMap::iterator itr = m_mStomachMap.begin(); itr != m_mStomachMap.end(); ++itr) - { - if (Player* pPlayer = m_creature->GetMap()->GetPlayer(itr->first)) - m_creature->DealDamage(pPlayer, pPlayer->GetMaxHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NONE, NULL, false); - } - EnterEvadeMode(); - return; + DoTeleportPlayer(pPlayer, afCthunLocations[2][0], afCthunLocations[2][1], afCthunLocations[2][2], afCthunLocations[2][3]); + m_lPlayersInStomachList.push_back(pPlayer->GetObjectGuid()); } - } - else - m_uiStomachEnterVisTimer -= uiDiff; - } - - // GientClawTentacleTimer - if (m_uiGiantClawTentacleTimer < uiDiff) - { - if (Player* pTarget = SelectRandomNotStomach()) - { - // Spawn claw tentacle on the random target - if (Creature* pSummoned = m_creature->SummonCreature(MOB_GIANT_CLAW_TENTACLE, pTarget->GetPositionX(), pTarget->GetPositionY(), pTarget->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 500)) - pSummoned->AI()->AttackStart(pTarget); - } - - // One giant claw tentacle every minute - m_uiGiantClawTentacleTimer = 60000; - } - else - m_uiGiantClawTentacleTimer -= uiDiff; - // GiantEyeTentacleTimer - if (m_uiGiantEyeTentacleTimer < uiDiff) - { - if (Player* pTarget = SelectRandomNotStomach()) - { - // Spawn claw tentacle on the random target - if (Creature* pSummoned = m_creature->SummonCreature(MOB_GIANT_EYE_TENTACLE, pTarget->GetPositionX(), pTarget->GetPositionY(), pTarget->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 500)) - pSummoned->AI()->AttackStart(pTarget); + m_stomachEnterTargetGuid.Clear(); + m_uiStomachEnterTimer = 0; } - - // One giant eye tentacle every minute - m_uiGiantEyeTentacleTimer = 60000; - } - else - m_uiGiantEyeTentacleTimer -= uiDiff; - - // EyeTentacleTimer - if (m_uiEyeTentacleTimer < uiDiff) - { - // Spawn the 8 Eye Tentacles in the corret spots - SpawnEyeTentacle(0, 25); //south - SpawnEyeTentacle(12, 12); //south west - SpawnEyeTentacle(25, 0); //west - SpawnEyeTentacle(12, -12); //north west - - SpawnEyeTentacle(0, -25); //north - SpawnEyeTentacle(-12, -12); //north east - SpawnEyeTentacle(-25, 0); // east - SpawnEyeTentacle(-12, 12); // south east - - //These spawn at every 30 seconds - m_uiEyeTentacleTimer = 30000; + else + m_uiStomachEnterTimer -= uiDiff; } - else - m_uiEyeTentacleTimer -= uiDiff; break; - - } - // Weakened state case PHASE_CTHUN_WEAKENED: - { - // PhaseTimer + + // Handle Flesh Tentacles respawn when the vulnerability spell expires if (m_uiPhaseTimer < uiDiff) { - // Switch - m_pInstance->SetData(TYPE_CTHUN_PHASE, PHASE_CTHUN); - - // Remove red coloration - m_creature->RemoveAurasDueToSpell(SPELL_RED_COLORATION); - - // Spawn 2 flesh tentacles - m_uiFleshTentaclesKilled = 0; - - // Spawn flesh tentacle - Creature* pSpawned = m_creature->SummonCreature(MOB_FLESH_TENTACLE, TENTACLE_POS1_X, TENTACLE_POS1_Y, TENTACLE_POS1_Z, TENTACLE_POS1_O, TEMPSUMMON_CORPSE_DESPAWN, 0); - - if (!pSpawned) - ++m_uiFleshTentaclesKilled; - else - { - if (flesh_tentacleAI* pTentacleAI = dynamic_cast(pSpawned->AI())) - pTentacleAI->SpawnedByCthun(m_creature); - } - - pSpawned = NULL; - // Spawn flesh tentacle - pSpawned = m_creature->SummonCreature(MOB_FLESH_TENTACLE, TENTACLE_POS2_X, TENTACLE_POS2_Y, TENTACLE_POS2_Z, TENTACLE_POS2_O, TEMPSUMMON_CORPSE_DESPAWN, 0); - - if (!pSpawned) - ++m_uiFleshTentaclesKilled; - else - { - if (flesh_tentacleAI* pTentacleAI = dynamic_cast(pSpawned->AI())) - pTentacleAI->SpawnedByCthun(m_creature); - } + DoSpawnFleshTentacles(); m_uiPhaseTimer = 0; + m_Phase = PHASE_CTHUN; } else m_uiPhaseTimer -= uiDiff; - } - } - } - - void JustDied(Unit* pKiller) - { - // Switch - if (m_pInstance) - m_pInstance->SetData(TYPE_CTHUN_PHASE, PHASE_FINISH); - } - void EnterEvadeMode() - { - if (m_pInstance) - m_pInstance->SetData(TYPE_CTHUN_PHASE, PHASE_NOT_STARTED); + break; + } - ScriptedAI::EnterEvadeMode(); - } + if (m_uiGiantClawTentacleTimer < uiDiff) + { + // Summon 1 Giant Claw Tentacle every 60 seconds + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0, uint32(0), SELECT_FLAG_IN_LOS)) + m_creature->SummonCreature(NPC_GIANT_CLAW_TENTACLE, pTarget->GetPositionX(), pTarget->GetPositionY(), pTarget->GetPositionZ(), 0, TEMPSUMMON_DEAD_DESPAWN, 0); - void DamageTaken(Unit* pDealer, uint32& uiDamage) - { - // No instance - if (!m_pInstance) - return; + m_uiGiantClawTentacleTimer = 60000; + } + else + m_uiGiantClawTentacleTimer -= uiDiff; - switch (m_pInstance->GetData(TYPE_CTHUN_PHASE)) + if (m_uiGiantEyeTentacleTimer < uiDiff) { - case PHASE_CTHUN: - { - // Not weakened so reduce damage by 99% - if (uiDamage / 99 > 0) uiDamage/= 99; - else - uiDamage = 1; + // Summon 1 Giant Eye Tentacle every 60 seconds + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0, uint32(0), SELECT_FLAG_IN_LOS)) + m_creature->SummonCreature(NPC_GIANT_EYE_TENTACLE, pTarget->GetPositionX(), pTarget->GetPositionY(), pTarget->GetPositionZ(), 0, TEMPSUMMON_DEAD_DESPAWN, 0); - // Prevent death in non-weakened state - if (uiDamage >= m_creature->GetHealth()) - uiDamage = 0; + m_uiGiantEyeTentacleTimer = 60000; + } + else + m_uiGiantEyeTentacleTimer -= uiDiff; - return; - } - break; + if (m_uiEyeTentacleTimer < uiDiff) + { + DoDespawnEyeTentacles(); - case PHASE_CTHUN_WEAKENED: + // Spawn 8 Eye Tentacles every 30 seconds + float fX, fY, fZ; + for (uint8 i = 0; i < MAX_EYE_TENTACLES; ++i) { - //Weakened - takes normal damage - return; + m_creature->GetNearPoint(m_creature, fX, fY, fZ, 0, 30.0f, M_PI_F/4*i); + m_creature->SummonCreature(NPC_EYE_TENTACLE, fX, fY, fZ, 0, TEMPSUMMON_DEAD_DESPAWN, 0); } - default: - uiDamage = 0; - break; + m_uiEyeTentacleTimer = 30000; } - } + else + m_uiEyeTentacleTimer -= uiDiff; - void FleshTentcleKilled() - { - ++m_uiFleshTentaclesKilled; + // Note: this should be handled by the maps + if (m_uiDigestiveAcidTimer < uiDiff) + { + // Iterate the Stomach players list and apply the Digesti acid debuff on them every 4 sec + for (GuidList::const_iterator itr = m_lPlayersInStomachList.begin(); itr != m_lPlayersInStomachList.end(); ++itr) + { + if (Player* pPlayer = m_creature->GetMap()->GetPlayer(*itr)) + pPlayer->CastSpell(pPlayer, SPELL_DIGESTIVE_ACID, true, NULL, NULL, m_creature->GetObjectGuid()); + } + m_uiDigestiveAcidTimer = 4000; + } + else + m_uiDigestiveAcidTimer -= uiDiff; } }; -struct MANGOS_DLL_DECL eye_tentacleAI : public ScriptedAI +/*###### +## npc_giant_claw_tentacle +######*/ + +struct MANGOS_DLL_DECL npc_giant_claw_tentacleAI : public Scripted_NoMovementAI { - eye_tentacleAI(Creature* pCreature) : ScriptedAI(pCreature) + npc_giant_claw_tentacleAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { - SetCombatMovement(false); + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); Reset(); - - if (Unit* pPortal = m_creature->SummonCreature(MOB_SMALL_PORTAL, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_CORPSE_DESPAWN, 0)) - m_portalGuid = pPortal->GetObjectGuid(); } - uint32 m_uiMindflayTimer; - uint32 m_uiKillSelfTimer; - ObjectGuid m_portalGuid; + ScriptedInstance* m_pInstance; - void JustDied(Unit*) - { - if (Creature* pCreature = m_creature->GetMap()->GetCreature(m_portalGuid)) - pCreature->DealDamage(pCreature, pCreature->GetMaxHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NONE, NULL, false); - } + uint32 m_uiThrashTimer; + uint32 m_uiHamstringTimer; + uint32 m_uiDistCheckTimer; void Reset() { - // Mind flay half a second after we spawn - m_uiMindflayTimer = 500; - - // This prevents eyes from overlapping - m_uiKillSelfTimer = 35000; - } + m_uiHamstringTimer = 2000; + m_uiThrashTimer = 5000; + m_uiDistCheckTimer = 5000; - void Aggro(Unit* pWho) - { - m_creature->SetInCombatWithZone(); + DoCastSpellIfCan(m_creature, SPELL_GIANT_GROUND_RUPTURE); } void UpdateAI(const uint32 uiDiff) @@ -964,65 +703,118 @@ struct MANGOS_DLL_DECL eye_tentacleAI : public ScriptedAI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - // KillSelfTimer - if (m_uiKillSelfTimer < uiDiff) + if (m_uiDistCheckTimer < uiDiff) { - m_creature->DealDamage(m_creature, m_creature->GetMaxHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NONE, NULL, false); + // If there is nobody in range, spawn a new tentacle at a new target location + if (!m_creature->SelectAttackingTarget(ATTACKING_TARGET_TOPAGGRO, 0, uint32(0), SELECT_FLAG_IN_MELEE_RANGE) && m_pInstance) + { + if (Creature* pCthun = m_pInstance->GetSingleCreatureFromStorage(NPC_CTHUN)) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0, uint32(0), SELECT_FLAG_NOT_IN_MELEE_RANGE)) + { + pCthun->SummonCreature(NPC_GIANT_CLAW_TENTACLE, pTarget->GetPositionX(), pTarget->GetPositionY(), pTarget->GetPositionZ(), 0, TEMPSUMMON_DEAD_DESPAWN, 0); - return; + // Self kill when a new tentacle is spawned + m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NONE, NULL, false); + return; + } + } + } + else + m_uiDistCheckTimer = 5000; } else - m_uiKillSelfTimer -= uiDiff; + m_uiDistCheckTimer -= uiDiff; - // MindflayTimer - if (m_uiMindflayTimer < uiDiff) + if (m_uiThrashTimer < uiDiff) { - Unit* target = NULL; - target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0); - if (target && !target->HasAura(SPELL_DIGESTIVE_ACID, EFFECT_INDEX_0)) - DoCastSpellIfCan(target, SPELL_MIND_FLAY); + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_THRASH) == CAST_OK) + m_uiThrashTimer = 10000; + } + else + m_uiThrashTimer -= uiDiff; - //Mindflay every 10 seconds - m_uiMindflayTimer = 10100; + if (m_uiHamstringTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_HAMSTRING) == CAST_OK) + m_uiHamstringTimer = 10000; } else - m_uiMindflayTimer -= uiDiff; + m_uiHamstringTimer -= uiDiff; + + DoMeleeAttackIfReady(); } }; -struct MANGOS_DLL_DECL claw_tentacleAI : public ScriptedAI +/*###### +## at_stomach_cthun +######*/ + +bool AreaTrigger_at_stomach_cthun(Player* pPlayer, AreaTriggerEntry const* pAt) { - claw_tentacleAI(Creature* pCreature) : ScriptedAI(pCreature) + if (pAt->id == AREATRIGGER_STOMACH_1) { - SetCombatMovement(false); - Reset(); + if (pPlayer->isGameMaster() || !pPlayer->isAlive()) + return false; - if (Unit* pPortal = m_creature->SummonCreature(MOB_SMALL_PORTAL, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_CORPSE_DESPAWN, 0)) - m_portalGuid = pPortal->GetObjectGuid(); + // Summon the exit trigger which should push the player outside the stomach - not used because missing eject spells + //if (!GetClosestCreatureWithEntry(pPlayer, NPC_EXIT_TRIGGER, 10.0f)) + // pPlayer->CastSpell(pPlayer, SPELL_EXIT_STOMACH, true); + + // Note: because of the missing spell id 26224, we will use basic jump movement + pPlayer->GetMotionMaster()->MoveJump(afCthunLocations[3][0], afCthunLocations[3][1], afCthunLocations[3][2], pPlayer->GetSpeed(MOVE_RUN)*5, 0); } + else if (pAt->id == AREATRIGGER_STOMACH_2) + { + if (ScriptedInstance* pInstance = (ScriptedInstance*)pPlayer->GetInstanceData()) + { + if (Creature* pCthun = pInstance->GetSingleCreatureFromStorage(NPC_CTHUN)) + { + // Remove player from the Stomach + if (boss_cthunAI* pBossAI = dynamic_cast(pCthun->AI())) + pBossAI->DoRemovePlayerFromStomach(pPlayer); - uint32 m_uiGroundRuptureTimer; - uint32 m_uiHamstringTimer; - uint32 m_uiEvadeTimer; - ObjectGuid m_portalGuid; + // Teleport back to C'thun and remove the Digestive Acid + pPlayer->RemoveAurasDueToSpell(SPELL_DIGESTIVE_ACID); + pPlayer->NearTeleportTo(pCthun->GetPositionX(), pCthun->GetPositionY(), pCthun->GetPositionZ() + 15.0f, frand(0, 2*M_PI_F)); - void JustDied(Unit*) - { - if (Creature* pCreature = m_creature->GetMap()->GetCreature(m_portalGuid)) - pCreature->DealDamage(pCreature, pCreature->GetMaxHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NONE, NULL, false); + // Note: the real knockback spell id should be 26230 + pPlayer->CastSpell(pPlayer, SPELL_EXIT_STOMACH_KNOCKBACK, true, NULL, NULL, pCthun->GetObjectGuid()); + } + } } - void Reset() - { - // First rupture should happen half a second after we spawn - m_uiGroundRuptureTimer = 500; - m_uiHamstringTimer = 2000; - m_uiEvadeTimer = 5000; - } + return false; +} - void Aggro(Unit* pWho) +// ToDo: move the following scripts to eventAI +enum TentacleSpells +{ + // Tentacle spells which can be moved to eventAI + // All Tentacles Spells + SPELL_GROUND_RUPTURE = 26139, + + // Eye Tentacles Spells + SPELL_MIND_FLAY = 26143, + + // Claw Tentacles Spells + //SPELL_HAMSTRING = 26141, // already defined + + // Giant Eye Tentacles + //SPELL_EYE_BEAM = 26134, // already defined +}; + +struct MANGOS_DLL_DECL eye_tentacleAI : public Scripted_NoMovementAI +{ + eye_tentacleAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { Reset(); } + + uint32 m_uiMindflayTimer; + uint32 m_uiKillSelfTimer; + + void Reset() { - m_creature->SetInCombatWithZone(); + // Mind flay half a second after we spawn + m_uiMindflayTimer = 500; } void UpdateAI(const uint32 uiDiff) @@ -1031,100 +823,34 @@ struct MANGOS_DLL_DECL claw_tentacleAI : public ScriptedAI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - // EvadeTimer - if (!m_creature->CanReachWithMeleeAttack(m_creature->getVictim())) - { - if (m_uiEvadeTimer < uiDiff) - { - if (Creature* pCreature = m_creature->GetMap()->GetCreature(m_portalGuid)) - pCreature->DealDamage(pCreature, pCreature->GetMaxHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NONE, NULL, false); - - // Dissapear and reappear at new position - m_creature->SetVisibility(VISIBILITY_OFF); - - Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0); - if (!pTarget) - { - m_creature->DealDamage(m_creature, m_creature->GetMaxHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NONE, NULL, false); - return; - } - - if (!pTarget->HasAura(SPELL_DIGESTIVE_ACID, EFFECT_INDEX_0)) - { - m_creature->GetMap()->CreatureRelocation(m_creature, pTarget->GetPositionX(), pTarget->GetPositionY(), pTarget->GetPositionZ(), 0); - - if (Unit* pPortal = m_creature->SummonCreature(MOB_SMALL_PORTAL, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_CORPSE_DESPAWN, 0)) - m_portalGuid = pPortal->GetObjectGuid(); - - m_uiGroundRuptureTimer = 500; - m_uiHamstringTimer = 2000; - m_uiEvadeTimer = 5000; - AttackStart(pTarget); - } - - m_creature->SetVisibility(VISIBILITY_ON); - } - else - m_uiEvadeTimer -= uiDiff; - } - - // GroundRuptureTimer - if (m_uiGroundRuptureTimer < uiDiff) + // MindflayTimer + if (m_uiMindflayTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_GROUND_RUPTURE); - m_uiGroundRuptureTimer = 30000; - } - else - m_uiGroundRuptureTimer -= uiDiff; + Unit* target = NULL; + target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0); + if (target) + DoCastSpellIfCan(target, SPELL_MIND_FLAY); - // HamstringTimer - if (m_uiHamstringTimer < uiDiff) - { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_HAMSTRING); - m_uiHamstringTimer = 5000; + //Mindflay every 10 seconds + m_uiMindflayTimer = 10100; } else - m_uiHamstringTimer -= uiDiff; - - DoMeleeAttackIfReady(); + m_uiMindflayTimer -= uiDiff; } }; -struct MANGOS_DLL_DECL giant_claw_tentacleAI : public ScriptedAI +struct MANGOS_DLL_DECL claw_tentacleAI : public Scripted_NoMovementAI { - giant_claw_tentacleAI(Creature* pCreature) : ScriptedAI(pCreature) - { - SetCombatMovement(false); - Reset(); - - if (Unit* pPortal = m_creature->SummonCreature(MOB_GIANT_PORTAL, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_CORPSE_DESPAWN, 0)) - m_portalGuid = pPortal->GetObjectGuid(); - } + claw_tentacleAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { Reset(); } uint32 m_uiGroundRuptureTimer; - uint32 m_uiThrashTimer; uint32 m_uiHamstringTimer; - uint32 m_uiEvadeTimer; - ObjectGuid m_portalGuid; - - void JustDied(Unit*) - { - if (Creature* pCreature = m_creature->GetMap()->GetCreature(m_portalGuid)) - pCreature->DealDamage(pCreature, pCreature->GetMaxHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NONE, NULL, false); - } void Reset() { - //First rupture should happen half a second after we spawn + // First rupture should happen half a second after we spawn m_uiGroundRuptureTimer = 500; m_uiHamstringTimer = 2000; - m_uiThrashTimer = 5000; - m_uiEvadeTimer = 5000; - } - - void Aggro(Unit* pWho) - { - m_creature->SetInCombatWithZone(); } void UpdateAI(const uint32 uiDiff) @@ -1133,46 +859,6 @@ struct MANGOS_DLL_DECL giant_claw_tentacleAI : public ScriptedAI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - // EvadeTimer - if (m_creature->CanReachWithMeleeAttack(m_creature->getVictim())) - { - if (m_uiEvadeTimer < uiDiff) - { - if (Creature* pCreature = m_creature->GetMap()->GetCreature(m_portalGuid)) - pCreature->DealDamage(pCreature, pCreature->GetMaxHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NONE, NULL, false); - - // Dissapear and reappear at new position - m_creature->SetVisibility(VISIBILITY_OFF); - - Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0); - - if (!target) - { - m_creature->DealDamage(m_creature, m_creature->GetMaxHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NONE, NULL, false); - return; - } - - if (!target->HasAura(SPELL_DIGESTIVE_ACID, EFFECT_INDEX_0)) - { - m_creature->GetMap()->CreatureRelocation(m_creature, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0); - - if (Unit* pPortal = m_creature->SummonCreature(MOB_GIANT_PORTAL, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_CORPSE_DESPAWN, 0)) - m_portalGuid = pPortal->GetObjectGuid(); - - m_uiGroundRuptureTimer = 500; - m_uiHamstringTimer = 2000; - m_uiThrashTimer = 5000; - m_uiEvadeTimer = 5000; - AttackStart(target); - } - - m_creature->SetVisibility(VISIBILITY_ON); - - } - else - m_uiEvadeTimer -= uiDiff; - } - // GroundRuptureTimer if (m_uiGroundRuptureTimer < uiDiff) { @@ -1182,20 +868,11 @@ struct MANGOS_DLL_DECL giant_claw_tentacleAI : public ScriptedAI else m_uiGroundRuptureTimer -= uiDiff; - // ThrashTimer - if (m_uiThrashTimer < uiDiff) - { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_THRASH); - m_uiThrashTimer = 10000; - } - else - m_uiThrashTimer -= uiDiff; - // HamstringTimer if (m_uiHamstringTimer < uiDiff) { DoCastSpellIfCan(m_creature->getVictim(),SPELL_HAMSTRING); - m_uiHamstringTimer = 10000; + m_uiHamstringTimer = 5000; } else m_uiHamstringTimer -= uiDiff; @@ -1204,25 +881,11 @@ struct MANGOS_DLL_DECL giant_claw_tentacleAI : public ScriptedAI } }; -struct MANGOS_DLL_DECL giant_eye_tentacleAI : public ScriptedAI +struct MANGOS_DLL_DECL giant_eye_tentacleAI : public Scripted_NoMovementAI { - giant_eye_tentacleAI(Creature* pCreature) : ScriptedAI(pCreature) - { - SetCombatMovement(false); - Reset(); - - if (Unit* pPortal = m_creature->SummonCreature(MOB_GIANT_PORTAL, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_CORPSE_DESPAWN, 0)) - m_portalGuid = pPortal->GetObjectGuid(); - } + giant_eye_tentacleAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { Reset(); } uint32 m_uiBeamTimer; - ObjectGuid m_portalGuid; - - void JustDied(Unit*) - { - if (Creature* pCreature = m_creature->GetMap()->GetCreature(m_portalGuid)) - pCreature->DealDamage(pCreature, pCreature->GetMaxHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NONE, NULL, false); - } void Reset() { @@ -1230,11 +893,6 @@ struct MANGOS_DLL_DECL giant_eye_tentacleAI : public ScriptedAI m_uiBeamTimer = 500; } - void Aggro(Unit* pWho) - { - m_creature->SetInCombatWithZone(); - } - void UpdateAI(const uint32 uiDiff) { // Check if we have a target @@ -1245,8 +903,8 @@ struct MANGOS_DLL_DECL giant_eye_tentacleAI : public ScriptedAI if (m_uiBeamTimer < uiDiff) { Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0); - if (target && !target->HasAura(SPELL_DIGESTIVE_ACID, EFFECT_INDEX_0)) - DoCastSpellIfCan(target,SPELL_GREEN_BEAM); + if (target) + DoCastSpellIfCan(target, SPELL_EYE_BEAM); // Beam every 2 seconds m_uiBeamTimer = 2100; @@ -1256,61 +914,35 @@ struct MANGOS_DLL_DECL giant_eye_tentacleAI : public ScriptedAI } }; -// Flesh tentacle functions -void flesh_tentacleAI::UpdateAI(const uint32 uiDiff) +struct MANGOS_DLL_DECL flesh_tentacleAI : public Scripted_NoMovementAI { - // Check if we have a target - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; + flesh_tentacleAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { Reset(); } - if (m_cThunGuid) - { - if (m_uiCheckTimer < uiDiff) - { - Creature* pParent = m_creature->GetMap()->GetCreature(m_cThunGuid); + void Reset() { } - if (!pParent || !pParent->isAlive() || !pParent->isInCombat()) - { - m_cThunGuid.Clear(); - m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NONE, NULL, false); - return; - } + void UpdateAI(const uint32 uiDiff) + { + // Check if we have a target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; - m_uiCheckTimer = 1000; - } - else - m_uiCheckTimer -= uiDiff; + DoMeleeAttackIfReady(); } +}; - DoMeleeAttackIfReady(); -} - -void flesh_tentacleAI::JustDied(Unit* killer) +CreatureAI* GetAI_boss_eye_of_cthun(Creature* pCreature) { - if (!m_cThunGuid) - { - error_log("SD2: flesh_tentacle: No m_cThunGuid variable"); - return; - } - - if (Creature* pCthun = m_creature->GetMap()->GetCreature(m_cThunGuid)) - { - if (cthunAI* pCthunAI = dynamic_cast(pCthun->AI())) - pCthunAI->FleshTentcleKilled(); - } - else - error_log("SD2: flesh_tentacle: No Cthun"); + return new boss_eye_of_cthunAI(pCreature); } -// GetAIs -CreatureAI* GetAI_eye_of_cthun(Creature* pCreature) +CreatureAI* GetAI_boss_cthun(Creature* pCreature) { - return new eye_of_cthunAI(pCreature); + return new boss_cthunAI(pCreature); } -CreatureAI* GetAI_cthun(Creature* pCreature) +CreatureAI* GetAI_npc_giant_claw_tentacle(Creature* pCreature) { - return new cthunAI(pCreature); + return new npc_giant_claw_tentacleAI(pCreature); } CreatureAI* GetAI_eye_tentacle(Creature* pCreature) @@ -1323,11 +955,6 @@ CreatureAI* GetAI_claw_tentacle(Creature* pCreature) return new claw_tentacleAI(pCreature); } -CreatureAI* GetAI_giant_claw_tentacle(Creature* pCreature) -{ - return new giant_claw_tentacleAI(pCreature); -} - CreatureAI* GetAI_giant_eye_tentacle(Creature* pCreature) { return new giant_eye_tentacleAI(pCreature); @@ -1342,15 +969,24 @@ void AddSC_boss_cthun() { Script* pNewScript; - //Eye pNewScript = new Script; pNewScript->Name = "boss_eye_of_cthun"; - pNewScript->GetAI = &GetAI_eye_of_cthun; + pNewScript->GetAI = &GetAI_boss_eye_of_cthun; pNewScript->RegisterSelf(); pNewScript = new Script; pNewScript->Name = "boss_cthun"; - pNewScript->GetAI = &GetAI_cthun; + pNewScript->GetAI = &GetAI_boss_cthun; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "mob_giant_claw_tentacle"; + pNewScript->GetAI = &GetAI_npc_giant_claw_tentacle; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "at_stomach_cthun"; + pNewScript->pAreaTrigger = &AreaTrigger_at_stomach_cthun; pNewScript->RegisterSelf(); pNewScript = new Script; @@ -1363,11 +999,6 @@ void AddSC_boss_cthun() pNewScript->GetAI = &GetAI_claw_tentacle; pNewScript->RegisterSelf(); - pNewScript = new Script; - pNewScript->Name = "mob_giant_claw_tentacle"; - pNewScript->GetAI = &GetAI_giant_claw_tentacle; - pNewScript->RegisterSelf(); - pNewScript = new Script; pNewScript->Name = "mob_giant_eye_tentacle"; pNewScript->GetAI = &GetAI_giant_eye_tentacle; diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_ouro.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_ouro.cpp index 77826ea9d..b7e7065eb 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/boss_ouro.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_ouro.cpp @@ -145,8 +145,9 @@ struct MANGOS_DLL_DECL boss_ouroAI : public Scripted_NoMovementAI { if (m_uiSummonBaseTimer <= uiDiff) { - if (DoCastSpellIfCan(m_creature, SPELL_SUMMON_BASE) == CAST_OK) - m_uiSummonBaseTimer = 0; + // Note: server side spells should be cast directly + m_creature->CastSpell(m_creature, SPELL_SUMMON_BASE, true); + m_uiSummonBaseTimer = 0; } else m_uiSummonBaseTimer -= uiDiff; diff --git a/scripts/kalimdor/temple_of_ahnqiraj/instance_temple_of_ahnqiraj.cpp b/scripts/kalimdor/temple_of_ahnqiraj/instance_temple_of_ahnqiraj.cpp index 8f88c9fa5..0775c260a 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/instance_temple_of_ahnqiraj.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/instance_temple_of_ahnqiraj.cpp @@ -17,7 +17,7 @@ /* ScriptData SDName: Instance_Temple_of_Ahnqiraj SD%Complete: 80 -SDComment: +SDComment: C'thun whisperings spells NYI. SDCategory: Temple of Ahn'Qiraj EndScriptData */ @@ -39,6 +39,7 @@ static const DialogueEntry aIntroDialogue[] = instance_temple_of_ahnqiraj::instance_temple_of_ahnqiraj(Map* pMap) : ScriptedInstance(pMap), m_dialogueHelper(aIntroDialogue), m_bIsEmperorsIntroDone(false), + m_uiCthunWhisperTimer(90000), m_uiBugTrioDeathCount(0) { Initialize(); @@ -106,6 +107,8 @@ void instance_temple_of_ahnqiraj::OnObjectCreate(GameObject* pGo) if (m_auiEncounter[TYPE_TWINS] == DONE) pGo->SetGoState(GO_STATE_ACTIVE); break; + case GO_SANDWORM_BASE: + break; default: return; @@ -154,15 +157,22 @@ void instance_temple_of_ahnqiraj::SetData(uint32 uiType, uint32 uiData) DoUseDoorOrButton(GO_TWINS_EXIT_DOOR); break; case TYPE_OURO: - // Respawn the Ouro spawner on fail - if (uiData == FAIL) + switch (uiData) { - if (Creature* pSpawner = GetSingleCreatureFromStorage(NPC_OURO_SPAWNER)) - pSpawner->Respawn(); + case FAIL: + // Respawn the Ouro spawner on fail + if (Creature* pSpawner = GetSingleCreatureFromStorage(NPC_OURO_SPAWNER)) + pSpawner->Respawn(); + // no break; + case DONE: + // Despawn the sandworm base on Done or Fail + if (GameObject* pBase = GetSingleGameObjectFromStorage(GO_SANDWORM_BASE)) + pBase->SetLootState(GO_JUST_DEACTIVATED); + break; } m_auiEncounter[uiType] = uiData; break; - case TYPE_CTHUN_PHASE: + case TYPE_CTHUN: m_auiEncounter[uiType] = uiData; break; } @@ -215,6 +225,39 @@ uint32 instance_temple_of_ahnqiraj::GetData(uint32 uiType) return 0; } +void instance_temple_of_ahnqiraj::Update(uint32 uiDiff) +{ + m_dialogueHelper.DialogueUpdate(uiDiff); + + if (GetData(TYPE_CTHUN) == IN_PROGRESS || GetData(TYPE_CTHUN) == DONE) + return; + + if (m_uiCthunWhisperTimer < uiDiff) + { + if (Player* pPlayer = GetPlayerInMap()) + { + if (Creature* pCthun = GetSingleCreatureFromStorage(NPC_CTHUN)) + { + // ToDo: also cast the C'thun Whispering charm spell - requires additional research + switch (urand(0, 7)) + { + case 0: DoScriptText(SAY_CTHUN_WHISPER_1, pCthun, pPlayer); break; + case 1: DoScriptText(SAY_CTHUN_WHISPER_2, pCthun, pPlayer); break; + case 2: DoScriptText(SAY_CTHUN_WHISPER_3, pCthun, pPlayer); break; + case 3: DoScriptText(SAY_CTHUN_WHISPER_4, pCthun, pPlayer); break; + case 4: DoScriptText(SAY_CTHUN_WHISPER_5, pCthun, pPlayer); break; + case 5: DoScriptText(SAY_CTHUN_WHISPER_6, pCthun, pPlayer); break; + case 6: DoScriptText(SAY_CTHUN_WHISPER_7, pCthun, pPlayer); break; + case 7: DoScriptText(SAY_CTHUN_WHISPER_8, pCthun, pPlayer); break; + } + } + } + m_uiCthunWhisperTimer = urand(1.5*MINUTE*IN_MILLISECONDS, 5*MINUTE*IN_MILLISECONDS); + } + else + m_uiCthunWhisperTimer -= uiDiff; +} + InstanceData* GetInstanceData_instance_temple_of_ahnqiraj(Map* pMap) { return new instance_temple_of_ahnqiraj(pMap); @@ -224,7 +267,7 @@ bool AreaTrigger_at_temple_ahnqiraj(Player* pPlayer, AreaTriggerEntry const* pAt { if (pAt->id == AREATRIGGER_TWIN_EMPERORS) { - if (pPlayer->isGameMaster() || pPlayer->isDead()) + if (pPlayer->isGameMaster() || !pPlayer->isAlive()) return false; if (instance_temple_of_ahnqiraj* pInstance = (instance_temple_of_ahnqiraj*)pPlayer->GetInstanceData()) diff --git a/scripts/kalimdor/temple_of_ahnqiraj/temple_of_ahnqiraj.h b/scripts/kalimdor/temple_of_ahnqiraj/temple_of_ahnqiraj.h index 21faa6f01..7850c82f9 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/temple_of_ahnqiraj.h +++ b/scripts/kalimdor/temple_of_ahnqiraj/temple_of_ahnqiraj.h @@ -17,7 +17,7 @@ enum TYPE_HUHURAN = 5, TYPE_TWINS = 6, TYPE_OURO = 7, - TYPE_CTHUN_PHASE = 8, + TYPE_CTHUN = 8, NPC_SKERAM = 15263, //NPC_KRI = 15511, @@ -27,11 +27,13 @@ enum NPC_VEKNILASH = 15275, NPC_MASTERS_EYE = 15963, NPC_OURO_SPAWNER = 15957, + //NPC_EYE_OF_CTHUN = 15589, NPC_CTHUN = 15727, GO_SKERAM_GATE = 180636, GO_TWINS_ENTER_DOOR = 180634, GO_TWINS_EXIT_DOOR = 180635, + GO_SANDWORM_BASE = 180795, EMOTE_EYE_INTRO = -1531012, SAY_EMPERORS_INTRO_1 = -1531013, @@ -41,20 +43,26 @@ enum SAY_EMPERORS_INTRO_5 = -1531017, SAY_EMPERORS_INTRO_6 = -1531018, + // Whispered on players around the map + SAY_CTHUN_WHISPER_1 = -1531033, + SAY_CTHUN_WHISPER_2 = -1531034, + SAY_CTHUN_WHISPER_3 = -1531035, + SAY_CTHUN_WHISPER_4 = -1531036, + SAY_CTHUN_WHISPER_5 = -1531037, + SAY_CTHUN_WHISPER_6 = -1531038, + SAY_CTHUN_WHISPER_7 = -1531039, + SAY_CTHUN_WHISPER_8 = -1531040, + AREATRIGGER_TWIN_EMPERORS = 4047, SPELL_SUMMON_PLAYER = 20477, -}; -enum CThunPhase -{ - PHASE_NOT_STARTED = 0, - PHASE_EYE_NORMAL = 1, - PHASE_EYE_DARK_GLARE = 2, - PHASE_TRANSITION = 3, - PHASE_CTHUN = 4, - PHASE_CTHUN_WEAKENED = 5, - PHASE_FINISH = 6, + // Cast periodically on players around the instance + SPELL_WHISPERINGS_CTHUN_1 = 26195, + SPELL_WHISPERINGS_CTHUN_2 = 26197, + SPELL_WHISPERINGS_CTHUN_3 = 26198, + SPELL_WHISPERINGS_CTHUN_4 = 26258, + SPELL_WHISPERINGS_CTHUN_5 = 26259, }; class MANGOS_DLL_DECL instance_temple_of_ahnqiraj : public ScriptedInstance @@ -77,13 +85,14 @@ class MANGOS_DLL_DECL instance_temple_of_ahnqiraj : public ScriptedInstance const char* Save() { return m_strInstData.c_str(); } void Load(const char* chrIn); - void Update(uint32 uiDiff) { m_dialogueHelper.DialogueUpdate(uiDiff); } + void Update(uint32 uiDiff); private: uint32 m_auiEncounter[MAX_ENCOUNTER]; std::string m_strInstData; uint8 m_uiBugTrioDeathCount; + uint32 m_uiCthunWhisperTimer; bool m_bIsEmperorsIntroDone; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 6ca5dcc33..1ccbe774c 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2656" + #define SD2_REVISION_NR "2657" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index c53d8f248..e186239f5 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -1207,6 +1207,10 @@ UPDATE creature_template SET ScriptName='mob_giant_claw_tentacle' WHERE entry=15 UPDATE creature_template SET ScriptName='mob_giant_eye_tentacle' WHERE entry=15334; UPDATE creature_template SET ScriptName='mob_giant_flesh_tentacle' WHERE entry=15802; UPDATE creature_template SET ScriptName='mob_anubisath_sentinel' WHERE entry=15264; +DELETE FROM scripted_areatrigger WHERE entry IN (4033,4034); +INSERT INTO scripted_areatrigger VALUES +(4033,'at_stomach_cthun'), +(4034,'at_stomach_cthun'); /* TEROKKAR FOREST */ UPDATE creature_template SET ScriptName='mob_infested_root_walker' WHERE entry=22095; diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index dabdc0b67..95df45fa0 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -1513,7 +1513,16 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1531029,'Look brother, fresh blood!',8633,1,0,0,'veknilash SAY_AGGRO_4'), (-1531030,'Your fate is sealed!',8635,1,0,0,'veknilash SAY_SLAY'), (-1531031,'Vek\'lor, I feel your pain!',8636,1,0,0,'veknilash SAY_DEATH'), -(-1531032,'Shall be your undoing!',8634,1,0,0,'veknilash SAY_SPECIAL'); +(-1531032,'Shall be your undoing!',8634,1,0,0,'veknilash SAY_SPECIAL'), + +(-1531033,'Death is close...',8580,4,0,0,'cthun SAY_WHISPER_1'), +(-1531034,'You are already dead.',8581,4,0,0,'cthun SAY_WHISPER_2'), +(-1531035,'Your courage will fail.',8582,4,0,0,'cthun SAY_WHISPER_3'), +(-1531036,'Your friends will abandon you.',8583,4,0,0,'cthun SAY_WHISPER_4'), +(-1531037,'You will betray your friends.',8584,4,0,0,'cthun SAY_WHISPER_5'), +(-1531038,'You will die.',8585,4,0,0,'cthun SAY_WHISPER_6'), +(-1531039,'You are weak.',8586,4,0,0,'cthun SAY_WHISPER_7'), +(-1531040,'Your heart will explode.',8587,4,0,0,'cthun SAY_WHISPER_8'); -- -1 532 000 KARAZHAN INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES diff --git a/sql/updates/r2657_mangos.sql b/sql/updates/r2657_mangos.sql new file mode 100644 index 000000000..673919bdf --- /dev/null +++ b/sql/updates/r2657_mangos.sql @@ -0,0 +1,4 @@ +DELETE FROM scripted_areatrigger WHERE entry IN (4033,4034); +INSERT INTO scripted_areatrigger VALUES +(4033,'at_stomach_cthun'), +(4034,'at_stomach_cthun'); diff --git a/sql/updates/r2657_scriptdev2.sql b/sql/updates/r2657_scriptdev2.sql new file mode 100644 index 000000000..9322a60ed --- /dev/null +++ b/sql/updates/r2657_scriptdev2.sql @@ -0,0 +1,10 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1531040 AND -1531033; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1531033,'Death is close...',8580,4,0,0,'cthun SAY_WHISPER_1'), +(-1531034,'You are already dead.',8581,4,0,0,'cthun SAY_WHISPER_2'), +(-1531035,'Your courage will fail.',8582,4,0,0,'cthun SAY_WHISPER_3'), +(-1531036,'Your friends will abandon you.',8583,4,0,0,'cthun SAY_WHISPER_4'), +(-1531037,'You will betray your friends.',8584,4,0,0,'cthun SAY_WHISPER_5'), +(-1531038,'You will die.',8585,4,0,0,'cthun SAY_WHISPER_6'), +(-1531039,'You are weak.',8586,4,0,0,'cthun SAY_WHISPER_7'), +(-1531040,'Your heart will explode.',8587,4,0,0,'cthun SAY_WHISPER_8'); From 1febee06d9a82656cf9b50e6c3cd2f6540ca1616 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Tue, 14 Aug 2012 08:53:35 +0300 Subject: [PATCH 0646/1172] [2658] Improve and simplify the Tomb of the Seven script - Blackrock Depths Also drop gossip for npc 9037 - thanks NeatElves. This will be handled by database --- .../blackrock_depths/blackrock_depths.h | 17 +- .../blackrock_depths/boss_tomb_of_seven.cpp | 251 ++++-------------- .../instance_blackrock_depths.cpp | 99 ++++++- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 7 +- sql/scriptdev2_script_full.sql | 5 +- sql/updates/r2658_mangos.sql | 1 + sql/updates/r2658_scriptdev2.sql | 3 + 8 files changed, 163 insertions(+), 222 deletions(-) create mode 100644 sql/updates/r2658_mangos.sql create mode 100644 sql/updates/r2658_scriptdev2.sql diff --git a/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.h b/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.h index 76066f642..c7f678866 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.h +++ b/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.h @@ -9,6 +9,7 @@ enum { MAX_ENCOUNTER = 7, MAX_RELIC_DOORS = 12, + MAX_DWARFS = 7, TYPE_RING_OF_LAW = 1, TYPE_VAULT = 2, @@ -26,7 +27,7 @@ enum NPC_VILEREL = 9036, NPC_GLOOMREL = 9037, NPC_SEETHREL = 9038, - // NPC_DOOMREL = 9039, + NPC_DOOMREL = 9039, NPC_DOPEREL = 9040, NPC_WATCHER_DOOMGRIP = 9476, NPC_WARBRINGER_CONST = 8905, // Four of them in Relict Vault are related to Doomgrip summon event @@ -68,6 +69,8 @@ enum GO_JAIL_SUPPLY_CRATE = 166872, SPELL_STONED = 10255, // Aura of Warbringer Constructs in Relict Vault + + FACTION_DWARF_HOSTILE = 754, // Hostile faction for the Tomb of the Seven dwarfs }; enum ArenaNPCs @@ -111,6 +114,9 @@ static const uint32 aArenaNPCs[] = // Used to summon Watcher Doomgrip static const float aVaultPositions[4] = {821.905f, -338.382f, -50.134f, 3.78736f}; +// Tomb of the Seven dwarfs +static const uint32 aTombDwarfes[MAX_DWARFS] = {NPC_ANGERREL, NPC_SEETHREL, NPC_DOPEREL, NPC_GLOOMREL, NPC_VILEREL, NPC_HATEREL, NPC_DOOMREL}; + class MANGOS_DLL_DECL instance_blackrock_depths : public ScriptedInstance { public: @@ -121,6 +127,7 @@ class MANGOS_DLL_DECL instance_blackrock_depths : public ScriptedInstance void OnCreatureCreate(Creature* pCreature); void OnCreatureDeath(Creature* pCreature); + void OnCreatureEvade(Creature* pCreature); void OnObjectCreate(GameObject* pGo); void SetData(uint32 uiType, uint32 uiData); @@ -128,19 +135,25 @@ class MANGOS_DLL_DECL instance_blackrock_depths : public ScriptedInstance const char* Save() { return m_strInstData.c_str(); } void Load(const char* chrIn); - void OnCreatureEvade(Creature* pCreature); + + void Update(uint32 uiDiff); // Arena Event void SetArenaCenterCoords(float fX, float fY, float fZ) { m_fArenaCenterX = fX; m_fArenaCenterY = fY; m_fArenaCenterZ = fZ; } void GetArenaCenterCoords(float &fX, float &fY, float &fZ) { fX = m_fArenaCenterX; fY = m_fArenaCenterY; fZ = m_fArenaCenterZ; } private: + void DoCallNextDwarf(); + uint32 m_auiEncounter[MAX_ENCOUNTER]; std::string m_strInstData; uint32 m_uiBarAleCount; uint8 m_uiCofferDoorsOpened; + uint8 m_uiDwarfRound; + uint32 m_uiDwarfFightTimer; + float m_fArenaCenterX, m_fArenaCenterY, m_fArenaCenterZ; GuidSet m_sVaultNpcGuids; diff --git a/scripts/eastern_kingdoms/blackrock_depths/boss_tomb_of_seven.cpp b/scripts/eastern_kingdoms/blackrock_depths/boss_tomb_of_seven.cpp index c8096a9f3..8afd91e9b 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/boss_tomb_of_seven.cpp +++ b/scripts/eastern_kingdoms/blackrock_depths/boss_tomb_of_seven.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: Boss_Tomb_Of_Seven -SD%Complete: 90 -SDComment: Learning Smelt Dark Iron if tribute quest rewarded. Basic event implemented. Correct order and timing of event is unknown. +SD%Complete: 100 +SDComment: SDCategory: Blackrock Depths EndScriptData */ @@ -26,82 +26,17 @@ EndScriptData */ enum { - FACTION_NEUTRAL = 734, - FACTION_HOSTILE = 754, - - SPELL_SMELT_DARK_IRON = 14891, - SPELL_LEARN_SMELT = 14894, - QUEST_SPECTRAL_CHALICE = 4083, - SKILLPOINT_MIN = 230 -}; - -#define GOSSIP_ITEM_TEACH_1 "Teach me the art of smelting dark iron" -#define GOSSIP_ITEM_TEACH_2 "Continue..." -#define GOSSIP_ITEM_TRIBUTE "I want to pay tribute" - -bool GossipHello_boss_gloomrel(Player* pPlayer, Creature* pCreature) -{ - if (ScriptedInstance* pInstance = (ScriptedInstance*)pCreature->GetInstanceData()) - { - if (pInstance->GetData(TYPE_TOMB_OF_SEVEN) == NOT_STARTED) - { - if (pPlayer->GetQuestRewardStatus(QUEST_SPECTRAL_CHALICE) && - pPlayer->GetSkillValue(SKILL_MINING) >= SKILLPOINT_MIN && - !pPlayer->HasSpell(SPELL_SMELT_DARK_IRON)) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_TEACH_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); - - if (!pPlayer->GetQuestRewardStatus(QUEST_SPECTRAL_CHALICE) && - pPlayer->GetSkillValue(SKILL_MINING) >= SKILLPOINT_MIN) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_TRIBUTE, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); - } - } - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); - return true; -} - -bool GossipSelect_boss_gloomrel(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) -{ - switch(uiAction) - { - case GOSSIP_ACTION_INFO_DEF+1: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_TEACH_2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 11); - pPlayer->SEND_GOSSIP_MENU(2606, pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF+11: - pPlayer->CLOSE_GOSSIP_MENU(); - pCreature->CastSpell(pPlayer, SPELL_LEARN_SMELT, false); - break; - case GOSSIP_ACTION_INFO_DEF+2: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "[PH] Continue...", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 22); - pPlayer->SEND_GOSSIP_MENU(2604, pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF+22: - pPlayer->CLOSE_GOSSIP_MENU(); - if (ScriptedInstance* pInstance = (ScriptedInstance*)pCreature->GetInstanceData()) - { - //are 5 minutes expected? go template may have data to despawn when used at quest - pInstance->DoRespawnGameObject(GO_SPECTRAL_CHALICE, MINUTE*5); - } - break; - } - return true; -} - -enum -{ - SPELL_SHADOWBOLTVOLLEY = 15245, - SPELL_IMMOLATE = 12742, - SPELL_CURSEOFWEAKNESS = 12493, - SPELL_DEMONARMOR = 13787, - SPELL_SUMMON_VOIDWALKERS = 15092, - - SAY_DOOMREL_START_EVENT = -1230003, - - MAX_DWARF = 7 + SPELL_SHADOW_BOLT_VOLLEY = 15245, + SPELL_IMMOLATE = 12742, + SPELL_CURSE_OF_WEAKNESS = 12493, + SPELL_DEMON_ARMOR = 13787, + SPELL_SUMMON_VOIDWALKERS = 15092, + + SAY_DOOMREL_START_EVENT = -1230003, + GOSSIP_ITEM_CHALLENGE = -3230002, + GOSSIP_TEXT_ID_CHALLENGE = 2601, }; -#define GOSSIP_ITEM_CHALLENGE "Your bondage is at an end, Doom'rel. I challenge you!" - struct MANGOS_DLL_DECL boss_doomrelAI : public ScriptedAI { boss_doomrelAI(Creature* pCreature) : ScriptedAI(pCreature) @@ -112,23 +47,22 @@ struct MANGOS_DLL_DECL boss_doomrelAI : public ScriptedAI ScriptedInstance* m_pInstance; - uint32 m_uiShadowVolley_Timer; - uint32 m_uiImmolate_Timer; - uint32 m_uiCurseOfWeakness_Timer; - uint32 m_uiDemonArmor_Timer; - uint32 m_uiCallToFight_Timer; - uint8 m_uiDwarfRound; - bool m_bHasSummoned; + uint32 m_uiShadowVolleyTimer; + uint32 m_uiImmolateTimer; + uint32 m_uiCurseOfWeaknessTimer; + uint32 m_uiDemonArmorTimer; void Reset() { - m_uiShadowVolley_Timer = 10000; - m_uiImmolate_Timer = 18000; - m_uiCurseOfWeakness_Timer = 5000; - m_uiDemonArmor_Timer = 16000; - m_uiCallToFight_Timer = 0; - m_uiDwarfRound = 0; - m_bHasSummoned = false; + m_uiShadowVolleyTimer = 10000; + m_uiImmolateTimer = 18000; + m_uiCurseOfWeaknessTimer = 5000; + m_uiDemonArmorTimer = 1000; + } + + void Aggro(Unit* pWho) + { + DoCastSpellIfCan(m_creature, SPELL_SUMMON_VOIDWALKERS); } void JustReachedHome() @@ -149,125 +83,48 @@ struct MANGOS_DLL_DECL boss_doomrelAI : public ScriptedAI pSummoned->AI()->AttackStart(pTarget); } - Creature* GetDwarfForPhase(uint8 uiPhase) - { - switch(uiPhase) - { - case 0: - return m_pInstance->GetSingleCreatureFromStorage(NPC_ANGERREL); - case 1: - return m_pInstance->GetSingleCreatureFromStorage(NPC_SEETHREL); - case 2: - return m_pInstance->GetSingleCreatureFromStorage(NPC_DOPEREL); - case 3: - return m_pInstance->GetSingleCreatureFromStorage(NPC_GLOOMREL); - case 4: - return m_pInstance->GetSingleCreatureFromStorage(NPC_VILEREL); - case 5: - return m_pInstance->GetSingleCreatureFromStorage(NPC_HATEREL); - case 6: - return m_creature; - } - return NULL; - } - - void CallToFight(bool bStartFight) + void UpdateAI(const uint32 uiDiff) { - if (Creature* pDwarf = GetDwarfForPhase(m_uiDwarfRound)) - { - if (bStartFight && pDwarf->isAlive()) - { - pDwarf->setFaction(FACTION_HOSTILE); - pDwarf->SetInCombatWithZone(); // attackstart - } - else - { - if (!pDwarf->isAlive() || pDwarf->isDead()) - pDwarf->Respawn(); - - pDwarf->setFaction(FACTION_NEUTRAL); - } - } - } - - void UpdateAI(const uint32 diff) - { - if (m_pInstance) - { - if (m_pInstance->GetData(TYPE_TOMB_OF_SEVEN) == IN_PROGRESS) - { - if (m_uiDwarfRound < MAX_DWARF) - { - if (m_uiCallToFight_Timer < diff) - { - CallToFight(true); - ++m_uiDwarfRound; - m_uiCallToFight_Timer = 30000; - } - else - m_uiCallToFight_Timer -= diff; - } - } - else if (m_pInstance->GetData(TYPE_TOMB_OF_SEVEN) == FAIL) - { - for (m_uiDwarfRound = 0; m_uiDwarfRound < MAX_DWARF; ++m_uiDwarfRound) - CallToFight(false); - - m_uiDwarfRound = 0; - m_uiCallToFight_Timer = 0; - - if (m_pInstance) - m_pInstance->SetData(TYPE_TOMB_OF_SEVEN, NOT_STARTED); - } - } - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - //ShadowVolley_Timer - if (m_uiShadowVolley_Timer < diff) + if (m_uiShadowVolleyTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_SHADOWBOLTVOLLEY); - m_uiShadowVolley_Timer = 12000; + if (DoCastSpellIfCan(m_creature, SPELL_SHADOW_BOLT_VOLLEY) == CAST_OK) + m_uiShadowVolleyTimer = 12000; } else - m_uiShadowVolley_Timer -= diff; + m_uiShadowVolleyTimer -= uiDiff; - //Immolate_Timer - if (m_uiImmolate_Timer < diff) + if (m_uiImmolateTimer < uiDiff) { - if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) - DoCastSpellIfCan(target,SPELL_IMMOLATE); - - m_uiImmolate_Timer = 25000; + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, SPELL_IMMOLATE) == CAST_OK) + m_uiImmolateTimer = 25000; + } } else - m_uiImmolate_Timer -= diff; + m_uiImmolateTimer -= uiDiff; - //CurseOfWeakness_Timer - if (m_uiCurseOfWeakness_Timer < diff) + if (m_uiCurseOfWeaknessTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_CURSEOFWEAKNESS); - m_uiCurseOfWeakness_Timer = 45000; + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, SPELL_CURSE_OF_WEAKNESS) == CAST_OK) + m_uiCurseOfWeaknessTimer = 45000; + } } else - m_uiCurseOfWeakness_Timer -= diff; + m_uiCurseOfWeaknessTimer -= uiDiff; - //DemonArmor_Timer - if (m_uiDemonArmor_Timer < diff) + if (m_uiDemonArmorTimer < uiDiff) { - DoCastSpellIfCan(m_creature,SPELL_DEMONARMOR); - m_uiDemonArmor_Timer = 300000; + if (DoCastSpellIfCan(m_creature, SPELL_DEMON_ARMOR) == CAST_OK) + m_uiDemonArmorTimer = 300000; } else - m_uiDemonArmor_Timer -= diff; - - //Summon Voidwalkers - if (!m_bHasSummoned && m_creature->GetHealthPercent() <= 50.0f) - { - m_creature->CastSpell(m_creature, SPELL_SUMMON_VOIDWALKERS, true); - m_bHasSummoned = true; - } + m_uiDemonArmorTimer -= uiDiff; DoMeleeAttackIfReady(); } @@ -282,11 +139,11 @@ bool GossipHello_boss_doomrel(Player* pPlayer, Creature* pCreature) { if (ScriptedInstance* pInstance = (ScriptedInstance*)pCreature->GetInstanceData()) { - if (pInstance->GetData(TYPE_TOMB_OF_SEVEN) == NOT_STARTED) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_CHALLENGE, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); + if (pInstance->GetData(TYPE_TOMB_OF_SEVEN) == NOT_STARTED || pInstance->GetData(TYPE_TOMB_OF_SEVEN) == FAIL) + pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_CHALLENGE, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); } - pPlayer->SEND_GOSSIP_MENU(2601, pCreature->GetObjectGuid()); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXT_ID_CHALLENGE, pCreature->GetObjectGuid()); return true; } @@ -296,7 +153,7 @@ bool GossipSelect_boss_doomrel(Player* pPlayer, Creature* pCreature, uint32 uiSe { case GOSSIP_ACTION_INFO_DEF+1: pPlayer->CLOSE_GOSSIP_MENU(); - DoScriptText(SAY_DOOMREL_START_EVENT, pCreature, pPlayer); + DoScriptText(SAY_DOOMREL_START_EVENT, pCreature); // start event if (ScriptedInstance* pInstance = (ScriptedInstance*)pCreature->GetInstanceData()) pInstance->SetData(TYPE_TOMB_OF_SEVEN, IN_PROGRESS); @@ -310,12 +167,6 @@ void AddSC_boss_tomb_of_seven() { Script* pNewScript; - pNewScript = new Script; - pNewScript->Name = "boss_gloomrel"; - pNewScript->pGossipHello = &GossipHello_boss_gloomrel; - pNewScript->pGossipSelect = &GossipSelect_boss_gloomrel; - pNewScript->RegisterSelf(); - pNewScript = new Script; pNewScript->Name = "boss_doomrel"; pNewScript->GetAI = &GetAI_boss_doomrel; diff --git a/scripts/eastern_kingdoms/blackrock_depths/instance_blackrock_depths.cpp b/scripts/eastern_kingdoms/blackrock_depths/instance_blackrock_depths.cpp index 1e0a45fbd..89def5e36 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/instance_blackrock_depths.cpp +++ b/scripts/eastern_kingdoms/blackrock_depths/instance_blackrock_depths.cpp @@ -27,6 +27,8 @@ EndScriptData */ instance_blackrock_depths::instance_blackrock_depths(Map* pMap) : ScriptedInstance(pMap), m_uiBarAleCount(0), m_uiCofferDoorsOpened(0), + m_uiDwarfRound(0), + m_uiDwarfFightTimer(0), m_fArenaCenterX(0.0f), m_fArenaCenterY(0.0f), @@ -52,6 +54,7 @@ void instance_blackrock_depths::OnCreatureCreate(Creature* pCreature) case NPC_VILEREL: case NPC_GLOOMREL: case NPC_SEETHREL: + case NPC_DOOMREL: case NPC_DOPEREL: case NPC_SHILL: case NPC_CREST: @@ -157,20 +160,33 @@ void instance_blackrock_depths::SetData(uint32 uiType, uint32 uiData) m_auiEncounter[2] = uiData; break; case TYPE_TOMB_OF_SEVEN: - switch(uiData) + // Don't set the same data twice + if (uiData == m_auiEncounter[3]) + break; + // Combat door + DoUseDoorOrButton(GO_TOMB_ENTER); + // Start the event + if (uiData == IN_PROGRESS) + DoCallNextDwarf(); + if (uiData == FAIL) { - case IN_PROGRESS: - DoUseDoorOrButton(GO_TOMB_ENTER); - break; - case FAIL: - if (m_auiEncounter[3] == IN_PROGRESS) // Prevent use more than one time - DoUseDoorOrButton(GO_TOMB_ENTER); - break; - case DONE: - DoRespawnGameObject(GO_CHEST_SEVEN, HOUR); - DoUseDoorOrButton(GO_TOMB_EXIT); - DoUseDoorOrButton(GO_TOMB_ENTER); - break; + // Reset dwarfes + for (uint8 i = 0; i < MAX_DWARFS; ++i) + { + if (Creature* pDwarf = GetSingleCreatureFromStorage(aTombDwarfes[i])) + { + if (!pDwarf->isAlive()) + pDwarf->Respawn(); + } + } + + m_uiDwarfRound = 0; + m_uiDwarfFightTimer = 0; + } + if (uiData == DONE) + { + DoRespawnGameObject(GO_CHEST_SEVEN, HOUR); + DoUseDoorOrButton(GO_TOMB_EXIT); } m_auiEncounter[3] = uiData; break; @@ -281,6 +297,19 @@ void instance_blackrock_depths::OnCreatureEvade(Creature* pCreature) } } } + + switch (pCreature->GetEntry()) + { + // Handle Tomb of the Seven reset in case of wipe + case NPC_HATEREL: + case NPC_ANGERREL: + case NPC_VILEREL: + case NPC_GLOOMREL: + case NPC_SEETHREL: + case NPC_DOPEREL: + SetData(TYPE_TOMB_OF_SEVEN, FAIL); + break; + } } void instance_blackrock_depths::OnCreatureDeath(Creature* pCreature) @@ -305,6 +334,50 @@ void instance_blackrock_depths::OnCreatureDeath(Creature* pCreature) if (GetData(TYPE_QUEST_JAIL_BREAK) == IN_PROGRESS) SetData(TYPE_QUEST_JAIL_BREAK, SPECIAL); break; + // Handle Tomb of the Seven dwarf death event + case NPC_HATEREL: + case NPC_ANGERREL: + case NPC_VILEREL: + case NPC_GLOOMREL: + case NPC_SEETHREL: + case NPC_DOPEREL: + // Call the next dwarf only if it's the last one which joined the fight + if (pCreature->GetEntry() == aTombDwarfes[m_uiDwarfRound - 1]) + DoCallNextDwarf(); + break; + } +} + +void instance_blackrock_depths::DoCallNextDwarf() +{ + if (Creature* pDwarf = GetSingleCreatureFromStorage(aTombDwarfes[m_uiDwarfRound])) + { + if (Player* pPlayer = GetPlayerInMap()) + { + pDwarf->SetFactionTemporary(FACTION_DWARF_HOSTILE, TEMPFACTION_RESTORE_RESPAWN | TEMPFACTION_RESTORE_REACH_HOME); + pDwarf->AI()->AttackStart(pPlayer); + } + } + m_uiDwarfFightTimer = 30000; + ++m_uiDwarfRound; +} + +void instance_blackrock_depths::Update(uint32 uiDiff) +{ + if (m_uiDwarfFightTimer) + { + if (m_uiDwarfFightTimer <= uiDiff) + { + if (m_uiDwarfRound < MAX_DWARFS) + { + DoCallNextDwarf(); + m_uiDwarfFightTimer = 30000; + } + else + m_uiDwarfFightTimer = 0; + } + else + m_uiDwarfFightTimer -= uiDiff; } } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 1ccbe774c..e7a2590c3 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2657" + #define SD2_REVISION_NR "2658" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index e186239f5..4e7162725 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -341,7 +341,6 @@ UPDATE creature_template SET ScriptName='boss_moira_bronzebeard' WHERE entry=892 UPDATE creature_template SET ScriptName='boss_ambassador_flamelash' WHERE entry=9156; UPDATE creature_template SET ScriptName='boss_anubshiah' WHERE entry=9031; UPDATE creature_template SET ScriptName='boss_doomrel' WHERE entry=9039; -UPDATE creature_template SET ScriptName='boss_gloomrel' WHERE entry=9037; UPDATE creature_template SET ScriptName='boss_general_angerforge' WHERE entry=9033; UPDATE creature_template SET ScriptName='boss_gorosh_the_dervish' WHERE entry=9027; UPDATE creature_template SET ScriptName='boss_grizzle' WHERE entry=9028; @@ -352,9 +351,9 @@ UPDATE creature_template SET ScriptName='npc_grimstone' WHERE entry=10096; UPDATE creature_template SET ScriptName='npc_theldren_trigger' WHERE entry=16079; UPDATE creature_template SET ScriptName='npc_kharan_mighthammer' WHERE entry=9021; UPDATE creature_template SET ScriptName='npc_rocknot' WHERE entry=9503; -UPDATE creature_template SET ScriptName ='npc_marshal_windsor' WHERE entry=9023; -UPDATE creature_template SET ScriptName ='npc_dughal_stormwing' WHERE entry=9022; -UPDATE creature_template SET ScriptName ='npc_tobias_seecher' WHERE entry=9679; +UPDATE creature_template SET ScriptName='npc_marshal_windsor' WHERE entry=9023; +UPDATE creature_template SET ScriptName='npc_dughal_stormwing' WHERE entry=9022; +UPDATE creature_template SET ScriptName='npc_tobias_seecher' WHERE entry=9679; UPDATE gameobject_template SET ScriptName='go_shadowforge_brazier' WHERE entry IN (174744, 174745); UPDATE gameobject_template SET ScriptName='go_relic_coffer_door' WHERE entry IN (174554, 174555, 174556, 174557, 174558, 174559, 174560, 174561, 174562, 174563, 174564, 174566); diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 95df45fa0..1a970de70 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -4311,8 +4311,9 @@ INSERT INTO gossip_texts (entry,content_default,comment) VALUES -- -3 230 000 BLACKROCK DEPTHS INSERT INTO gossip_texts (entry,content_default,comment) VALUES -(-3230000,'You\'re free, Dughal! Get out of here!','dughal GOSSIP_ITEM'), -(-3230001,'Get out of here, Tobias, you\'re free!','tobias GOSSIP_ITEM'); +(-3230000,'You\'re free, Dughal! Get out of here!','dughal GOSSIP_ITEM_DUGHAL'), +(-3230001,'Get out of here, Tobias, you\'re free!','tobias GOSSIP_ITEM_TOBIAS'), +(-3230002,'Your bondage is at an end, Doom\'rel. I challenge you!','doomrel GOSSIP_ITEM_CHALLENGE'); -- -3 409 000 MOLTEN CORE INSERT INTO gossip_texts (entry,content_default,comment) VALUES diff --git a/sql/updates/r2658_mangos.sql b/sql/updates/r2658_mangos.sql new file mode 100644 index 000000000..faffc5d77 --- /dev/null +++ b/sql/updates/r2658_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='' WHERE entry=9037; diff --git a/sql/updates/r2658_scriptdev2.sql b/sql/updates/r2658_scriptdev2.sql new file mode 100644 index 000000000..02fac67e5 --- /dev/null +++ b/sql/updates/r2658_scriptdev2.sql @@ -0,0 +1,3 @@ +DELETE FROM gossip_texts WHERE entry=-3230002; +INSERT INTO gossip_texts (entry,content_default,comment) VALUES +(-3230002,'Your bondage is at an end, Doom\'rel. I challenge you!','doomrel GOSSIP_ITEM_CHALLENGE'); From 7782f964db8573098f6eb49e735b0c6ccc507f75 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Tue, 14 Aug 2012 22:46:30 +0300 Subject: [PATCH 0647/1172] [2659] Improve script for the bridge event - Mechanar Also make some adjustments to Sepethrea and Pathaleon scripts Thanks to X-Savior for providing the proper data --- .../instance_blackrock_depths.cpp | 3 + .../boss_nethermancer_sepethrea.cpp | 36 ++--------- .../boss_pathaleon_the_calculator.cpp | 59 ++++++++++++------- .../the_mechanar/instance_mechanar.cpp | 45 ++++++-------- .../tempest_keep/the_mechanar/mechanar.h | 59 ++++++++++++------- sd2_revision_nr.h | 2 +- sql/scriptdev2_script_full.sql | 2 +- sql/updates/r2659_scriptdev2.sql | 1 + 8 files changed, 104 insertions(+), 103 deletions(-) create mode 100644 sql/updates/r2659_scriptdev2.sql diff --git a/scripts/eastern_kingdoms/blackrock_depths/instance_blackrock_depths.cpp b/scripts/eastern_kingdoms/blackrock_depths/instance_blackrock_depths.cpp index 89def5e36..73fe58521 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/instance_blackrock_depths.cpp +++ b/scripts/eastern_kingdoms/blackrock_depths/instance_blackrock_depths.cpp @@ -341,6 +341,9 @@ void instance_blackrock_depths::OnCreatureDeath(Creature* pCreature) case NPC_GLOOMREL: case NPC_SEETHREL: case NPC_DOPEREL: + // Only handle the event when event is in progress + if (GetData(TYPE_TOMB_OF_SEVEN) != IN_PROGRESS) + return; // Call the next dwarf only if it's the last one which joined the fight if (pCreature->GetEntry() == aTombDwarfes[m_uiDwarfRound - 1]) DoCallNextDwarf(); diff --git a/scripts/outland/tempest_keep/the_mechanar/boss_nethermancer_sepethrea.cpp b/scripts/outland/tempest_keep/the_mechanar/boss_nethermancer_sepethrea.cpp index 70cb2a847..9cc3b7930 100644 --- a/scripts/outland/tempest_keep/the_mechanar/boss_nethermancer_sepethrea.cpp +++ b/scripts/outland/tempest_keep/the_mechanar/boss_nethermancer_sepethrea.cpp @@ -16,7 +16,7 @@ /* ScriptData SDName: Boss_Nethermancer_Sepethrea -SD%Complete: 90 +SD%Complete: 95 SDComment: May need some small adjustments SDCategory: Tempest Keep, The Mechanar EndScriptData */ @@ -34,12 +34,11 @@ enum SAY_SLAY2 = -1554018, SAY_DEATH = -1554019, - SPELL_SUMMON_RAGIN_FLAMES = 35275, - SPELL_FROST_ATTACK = 35263, + SPELL_SUMMON_RAGING_FLAMES = 35275, + SPELL_SUMMON_RAGING_FLAMES_H = 39084, + SPELL_FROST_ATTACK = 45195, SPELL_ARCANE_BLAST = 35314, SPELL_DRAGONS_BREATH = 35250, - SPELL_KNOCKBACK = 37317, - SPELL_SOLARBURN = 35267, NPC_RAGING_FLAMES = 20481, @@ -64,22 +63,18 @@ struct MANGOS_DLL_DECL boss_nethermancer_sepethreaAI : public ScriptedAI uint32 m_uiFrostAttackTimer; uint32 m_uiArcaneBlastTimer; uint32 m_uiDragonsBreathTimer; - uint32 m_uiKnockbackTimer; - uint32 m_uiSolarburnTimer; void Reset() { m_uiFrostAttackTimer = urand(7000, 10000); m_uiArcaneBlastTimer = urand(12000, 18000); m_uiDragonsBreathTimer = urand(18000, 22000); - m_uiKnockbackTimer = urand(22000, 28000); - m_uiSolarburnTimer = 30000; } void Aggro(Unit* pWho) { DoScriptText(SAY_AGGRO, m_creature); - DoCastSpellIfCan(m_creature, SPELL_SUMMON_RAGIN_FLAMES); + DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_SUMMON_RAGING_FLAMES : SPELL_SUMMON_RAGING_FLAMES_H); } void KilledUnit(Unit* pVictim) @@ -146,27 +141,6 @@ struct MANGOS_DLL_DECL boss_nethermancer_sepethreaAI : public ScriptedAI else m_uiDragonsBreathTimer -= uiDiff; - // Knockback - if (m_uiKnockbackTimer < uiDiff) - { - if (DoCastSpellIfCan(m_creature, SPELL_KNOCKBACK) == CAST_OK) - m_uiKnockbackTimer = urand(15000, 25000); - } - else - m_uiKnockbackTimer -= uiDiff; - - // Solarburn - if (m_uiSolarburnTimer < uiDiff) - { - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1)) - { - if (DoCastSpellIfCan(pTarget, SPELL_SOLARBURN) == CAST_OK) - m_uiSolarburnTimer = 30000; - } - } - else - m_uiSolarburnTimer -= uiDiff; - DoMeleeAttackIfReady(); } }; diff --git a/scripts/outland/tempest_keep/the_mechanar/boss_pathaleon_the_calculator.cpp b/scripts/outland/tempest_keep/the_mechanar/boss_pathaleon_the_calculator.cpp index b9d522da9..db1533fcf 100644 --- a/scripts/outland/tempest_keep/the_mechanar/boss_pathaleon_the_calculator.cpp +++ b/scripts/outland/tempest_keep/the_mechanar/boss_pathaleon_the_calculator.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: Boss Pathaleon the Calculator -SD%Complete: 85 -SDComment: The Nether Wraith script needs additional research and update +SD%Complete: 95 +SDComment: Timers may need update. SDCategory: Tempest Keep, The Mechanar EndScriptData */ @@ -41,7 +41,8 @@ enum SPELL_DOMINATION = 35280, SPELL_ARCANE_EXPLOSION_H = 15453, SPELL_FRENZY = 36992, - SPELL_DISGRUNTLED_ANGER = 35289, // research where to use this - possible to be used by Nether Wraits when boss is at 20% HP + SPELL_SUICIDE = 35301, // kill the Nether Wraiths + SPELL_DISGRUNTLED_ANGER = 35289, // empower a Nether Wraith SPELL_SUMMON_NETHER_WRAITH_1 = 35285, SPELL_SUMMON_NETHER_WRAITH_2 = 35286, @@ -68,6 +69,7 @@ struct MANGOS_DLL_DECL boss_pathaleon_the_calculatorAI : public ScriptedAI bool m_bIsRegularMode; uint32 m_uiSummonTimer; + uint32 m_uiAngerTimer; uint32 m_uiManaTapTimer; uint32 m_uiArcaneTorrentTimer; uint32 m_uiDominationTimer; @@ -77,6 +79,7 @@ struct MANGOS_DLL_DECL boss_pathaleon_the_calculatorAI : public ScriptedAI void Reset() { m_uiSummonTimer = 30000; + m_uiAngerTimer = urand(30000, 35000); m_uiManaTapTimer = urand(12000, 20000); m_uiArcaneTorrentTimer = urand(16000, 25000); m_uiDominationTimer = urand(25000, 40000); @@ -114,18 +117,6 @@ struct MANGOS_DLL_DECL boss_pathaleon_the_calculatorAI : public ScriptedAI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - if (m_uiSummonTimer < uiDiff) - { - uint8 uiMaxWraith = urand(3, 4); - for (uint8 i = 0; i < uiMaxWraith; ++i) - DoCastSpellIfCan(m_creature, aWraithSummonSpells[i], CAST_TRIGGERED); - - DoScriptText(SAY_SUMMON, m_creature); - m_uiSummonTimer = urand(30000, 45000); - } - else - m_uiSummonTimer -= uiDiff; - if (m_uiManaTapTimer < uiDiff) { if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0, SPELL_MANA_TAP, SELECT_FLAG_POWER_MANA)) @@ -140,7 +131,7 @@ struct MANGOS_DLL_DECL boss_pathaleon_the_calculatorAI : public ScriptedAI if (m_uiArcaneTorrentTimer < uiDiff) { if (DoCastSpellIfCan(m_creature, SPELL_ARCANE_TORRENT) == CAST_OK) - m_uiArcaneTorrentTimer = urand(12000, 18000); + m_uiArcaneTorrentTimer = urand(40000, 50000); } else m_uiArcaneTorrentTimer -= uiDiff; @@ -165,7 +156,7 @@ struct MANGOS_DLL_DECL boss_pathaleon_the_calculatorAI : public ScriptedAI if (m_uiArcaneExplosionTimer < uiDiff) { if (DoCastSpellIfCan(m_creature, SPELL_ARCANE_EXPLOSION_H) == CAST_OK) - m_uiArcaneExplosionTimer = urand(10000, 14000); + m_uiArcaneExplosionTimer = urand(18000, 20000); } else m_uiArcaneExplosionTimer -= uiDiff; @@ -175,11 +166,34 @@ struct MANGOS_DLL_DECL boss_pathaleon_the_calculatorAI : public ScriptedAI { if (DoCastSpellIfCan(m_creature, SPELL_FRENZY) == CAST_OK) { - // ToDo: despawn nether wraiths here + DoCastSpellIfCan(m_creature, SPELL_SUICIDE, CAST_TRIGGERED); DoScriptText(SAY_ENRAGE, m_creature); m_bIsEnraged = true; } } + // Summon and empower Nether Wraiths only when not enraged + else + { + if (m_uiSummonTimer < uiDiff) + { + uint8 uiMaxWraith = urand(3, 4); + for (uint8 i = 0; i < uiMaxWraith; ++i) + DoCastSpellIfCan(m_creature, aWraithSummonSpells[i], CAST_TRIGGERED); + + DoScriptText(SAY_SUMMON, m_creature); + m_uiSummonTimer = 50000; + } + else + m_uiSummonTimer -= uiDiff; + + if (m_uiAngerTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_DISGRUNTLED_ANGER) == CAST_OK) + m_uiAngerTimer = urand(60000, 90000); + } + else + m_uiAngerTimer -= uiDiff; + } DoMeleeAttackIfReady(); } @@ -195,7 +209,7 @@ struct MANGOS_DLL_DECL mob_nether_wraithAI : public ScriptedAI void Reset() { m_uiArcaneMissilesTimer = urand(1000, 4000); - m_uiDetonationTimer = 20000; + m_uiDetonationTimer = 30000; } void UpdateAI(const uint32 uiDiff) @@ -222,11 +236,12 @@ struct MANGOS_DLL_DECL mob_nether_wraithAI : public ScriptedAI { if (m_uiDetonationTimer <= uiDiff) { - if (DoCastSpellIfCan(m_creature, SPELL_DETONATION) == CAST_OK) + if (DoCastSpellIfCan(m_creature, SPELL_DETONATION, CAST_TRIGGERED) == CAST_OK) { - // Not sure if this one needs to be despawned here. Needs further research - //m_creature->ForcedDespawn(2200); + // Selfkill after the detonation + m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NONE, NULL, false); m_uiDetonationTimer = 0; + return; } } else diff --git a/scripts/outland/tempest_keep/the_mechanar/instance_mechanar.cpp b/scripts/outland/tempest_keep/the_mechanar/instance_mechanar.cpp index dd85b087d..e9be3807a 100644 --- a/scripts/outland/tempest_keep/the_mechanar/instance_mechanar.cpp +++ b/scripts/outland/tempest_keep/the_mechanar/instance_mechanar.cpp @@ -46,7 +46,7 @@ void instance_mechanar::OnPlayerEnter(Player* pPlayer) if (GetSingleCreatureFromStorage(NPC_PATHALEON, true)) return; - pPlayer->SummonCreature(NPC_PATHALEON, aBridgeLocs[6].m_fX, aBridgeLocs[6].m_fY, aBridgeLocs[6].m_fZ, aBridgeLocs[6].m_fO, TEMPSUMMON_DEAD_DESPAWN, 0); + pPlayer->SummonCreature(aBridgeEventLocs[6][0].m_uiSpawnEntry, aBridgeEventLocs[6][0].m_fX, aBridgeEventLocs[6][0].m_fY, aBridgeEventLocs[6][0].m_fZ, aBridgeEventLocs[6][0].m_fO, TEMPSUMMON_DEAD_DESPAWN, 0); } void instance_mechanar::OnCreatureCreate(Creature* pCreature) @@ -179,38 +179,27 @@ void instance_mechanar::DoSpawnBridgeWave() { if (Player* pPlayer = GetPlayerInMap(true, false)) { - // For these wave ids summon only 1 npc - if (m_uiBridgeEventPhase == 6 || m_uiBridgeEventPhase == 4 || m_uiBridgeEventPhase == 1) + for (uint8 i = 0; i < MAX_BRIDGE_TRASH; ++i) { - if (Creature* pTemp = pPlayer->SummonCreature(aBridgeEventNpcs[m_uiBridgeEventPhase][0], aBridgeLocs[m_uiBridgeEventPhase].m_fX, aBridgeLocs[m_uiBridgeEventPhase].m_fY, aBridgeLocs[m_uiBridgeEventPhase].m_fZ, aBridgeLocs[m_uiBridgeEventPhase].m_fO, TEMPSUMMON_DEAD_DESPAWN, 0)) - { - pTemp->CastSpell(pTemp, SPELL_SIMPLE_TELEPORT, false); - - // Yell intro when Pathaleon is summoned - if (m_uiBridgeEventPhase == 6) - DoScriptText(SAY_PATHALEON_INTRO, pTemp); - // The Forge Destroyers need to attack the player - else - pTemp->AI()->AttackStart(pPlayer); - } - } - else - { - float fX, fY, fZ; - for (uint8 i = 0; i < MAX_BRIDGE_TRASH; ++i) + // Skip the blank entries + if (aBridgeEventLocs[m_uiBridgeEventPhase][i].m_uiSpawnEntry == 0) + break; + + if (Creature* pTemp = pPlayer->SummonCreature(aBridgeEventLocs[m_uiBridgeEventPhase][i].m_uiSpawnEntry, aBridgeEventLocs[m_uiBridgeEventPhase][i].m_fX, aBridgeEventLocs[m_uiBridgeEventPhase][i].m_fY, aBridgeEventLocs[m_uiBridgeEventPhase][i].m_fZ, aBridgeEventLocs[m_uiBridgeEventPhase][i].m_fO, TEMPSUMMON_DEAD_DESPAWN, 0)) { - if (!aBridgeEventNpcs[m_uiBridgeEventPhase][i]) - continue; + pTemp->CastSpell(pTemp, SPELL_ETHEREAL_TELEPORT, false); - // Choose a random point to summon the npcs - pPlayer->GetRandomPoint(aBridgeLocs[m_uiBridgeEventPhase].m_fX, aBridgeLocs[m_uiBridgeEventPhase].m_fY, aBridgeLocs[m_uiBridgeEventPhase].m_fZ, 5.0f, fX, fY, fZ); - if (Creature* pTemp = pPlayer->SummonCreature(aBridgeEventNpcs[m_uiBridgeEventPhase][i], fX, fY, fZ, aBridgeLocs[m_uiBridgeEventPhase].m_fO, TEMPSUMMON_DEAD_DESPAWN, 0)) + switch (m_uiBridgeEventPhase) { - pTemp->CastSpell(pTemp, SPELL_SIMPLE_TELEPORT, false); - - // They start attacking the players, except for the ones from phase 0 and 3 - if (m_uiBridgeEventPhase != 0 && m_uiBridgeEventPhase != 3) + case 1: // These waves should attack the player directly + case 2: + case 4: + case 5: pTemp->AI()->AttackStart(pPlayer); + break; + case 6: // Pathaleon + DoScriptText(SAY_PATHALEON_INTRO, pTemp); + break; } } } diff --git a/scripts/outland/tempest_keep/the_mechanar/mechanar.h b/scripts/outland/tempest_keep/the_mechanar/mechanar.h index 94d8b5d0e..fe4cfb060 100644 --- a/scripts/outland/tempest_keep/the_mechanar/mechanar.h +++ b/scripts/outland/tempest_keep/the_mechanar/mechanar.h @@ -33,36 +33,55 @@ enum GO_FACTORY_ELEVATOR = 183788, - SPELL_SIMPLE_TELEPORT = 12980, + SPELL_ETHEREAL_TELEPORT = 34427, SAY_PATHALEON_INTRO = -1554028, }; struct SpawnLocation { + uint32 m_uiSpawnEntry; float m_fX, m_fY, m_fZ, m_fO; }; -static const SpawnLocation aBridgeLocs[MAX_BRIDGE_LOCATIONS] = +static const SpawnLocation aBridgeEventLocs[MAX_BRIDGE_LOCATIONS][4] = { - {246.29f, -22.41f, 26.32f, 0}, - {207.52f, -23.13f, 24.87f, 0}, - {181.58f, -23.01f, 24.87f, 0}, - {137.87f, 28.67f, 24.87f, 4.65f}, - {137.95f, 52.72f, 24.87f, 4.65f}, - {138.25f, 93.51f, 26.37f, 4.65f}, - {138.44f, 150.28f, 25.57f, 4.63f} // Pathaleon summon location -}; - -static const uint32 aBridgeEventNpcs[MAX_BRIDGE_LOCATIONS][MAX_BRIDGE_TRASH] = -{ - {NPC_ASTROMAGE, NPC_ASTROMAGE, NPC_PHYSICIAN, NPC_CENTURION}, - {NPC_FORGE_DESTROYER, 0, 0, 0}, - {NPC_ENGINEER, NPC_PHYSICIAN, NPC_ENGINEER, 0}, - {NPC_ASTROMAGE, NPC_PHYSICIAN, NPC_ENGINEER, 0}, - {NPC_FORGE_DESTROYER, 0, 0, 0}, - {NPC_PHYSICIAN, NPC_ASTROMAGE, NPC_ENGINEER, NPC_NETHERBINDER}, - {NPC_PATHALEON, 0, 0, 0} + { + {NPC_ASTROMAGE, 243.9323f, -24.53621f, 26.3284f, 0}, + {NPC_ASTROMAGE, 240.5847f, -21.25438f, 26.3284f, 0}, + {NPC_PHYSICIAN, 238.4178f, -25.92982f, 26.3284f, 0}, + {NPC_CENTURION, 237.1122f, -19.14261f, 26.3284f, 0}, + }, + { + {NPC_FORGE_DESTROYER, 199.945f, -22.85885f, 24.95783f, 0}, + {0, 0, 0, 0, 0}, + }, + { + {NPC_ENGINEER, 179.8642f, -25.84609f, 24.8745f, 0}, + {NPC_ENGINEER, 181.9983f, -17.56084f, 24.8745f, 0}, + {NPC_PHYSICIAN, 183.4078f, -22.46612f, 24.8745f, 0}, + {0, 0, 0, 0, 0}, + }, + { + {NPC_ENGINEER, 141.0496f, 37.86048f, 24.87399f, 4.65f}, + {NPC_ASTROMAGE, 137.6626f, 34.89631f, 24.8742f, 4.65f}, + {NPC_PHYSICIAN, 135.3587f, 38.03816f, 24.87417f, 4.65f}, + {0, 0, 0, 0, 0}, + }, + { + {NPC_FORGE_DESTROYER, 137.8275f, 53.18128f, 24.95783f, 4.65f}, + {0, 0, 0, 0, 0}, + }, + { + {NPC_PHYSICIAN, 134.3062f, 109.1506f, 26.45663f, 4.65f}, + {NPC_ASTROMAGE, 135.3307f, 99.96439f, 26.45663f, 4.65f}, + {NPC_NETHERBINDER, 141.3976f, 102.7863f, 26.45663f, 4.65f}, + {NPC_ENGINEER, 140.8281f, 112.0363f, 26.45663f, 4.65f}, + }, + { + {NPC_PATHALEON, 139.5425f, 149.3192f, 25.65904f, 4.63f}, + {0, 0, 0, 0, 0}, + }, }; class MANGOS_DLL_DECL instance_mechanar : public ScriptedInstance diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index e7a2590c3..0eff2e36d 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2658" + #define SD2_REVISION_NR "2659" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 1a970de70..542fefeaf 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -2255,7 +2255,7 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1554025,'A minor inconvenience.',11194,1,0,0,'pathaleon SAY_SLAY_1'), (-1554026,'Looks like you lose.',11195,1,0,0,'pathaleon SAY_SLAY_2'), (-1554027,'The project will... continue.',11200,1,0,0,'pathaleon SAY_DEATH'), -(-1554028,'I have been waiting for you!',0,1,0,0,'pathaleon SAY_INTRO'); +(-1554028,'I have been waiting for you!',0,1,0,53,'pathaleon SAY_INTRO'); -- -1 555 000 SHADOW LABYRINTH INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES diff --git a/sql/updates/r2659_scriptdev2.sql b/sql/updates/r2659_scriptdev2.sql new file mode 100644 index 000000000..c5d3d8cf8 --- /dev/null +++ b/sql/updates/r2659_scriptdev2.sql @@ -0,0 +1 @@ +UPDATE script_texts SET emote=53 WHERE entry=-1554028; From c8c63e438d1f958d5eb80e38f0e049676871f960 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Wed, 15 Aug 2012 00:16:20 +0300 Subject: [PATCH 0648/1172] [2660] Add placeholders for some Arcatraz bosses These creatures are currently handled in eventAI, but require SD2 script because of some complex intro event Also made a few adjustments to the Arcatraz instance script --- VC100/100ScriptDev2.vcxproj | 2 ++ VC100/100ScriptDev2.vcxproj.filters | 6 ++++ VC80/80ScriptDev2.vcproj | 8 +++++ VC90/90ScriptDev2.vcproj | 8 +++++ .../tempest_keep/arcatraz/boss_dalliah.cpp | 29 +++++++++++++++++++ .../arcatraz/boss_soccothrates.cpp | 29 +++++++++++++++++++ .../arcatraz/instance_arcatraz.cpp | 11 +++++-- sd2_revision_nr.h | 2 +- system/ScriptLoader.cpp | 4 +++ 9 files changed, 96 insertions(+), 3 deletions(-) create mode 100644 scripts/outland/tempest_keep/arcatraz/boss_dalliah.cpp create mode 100644 scripts/outland/tempest_keep/arcatraz/boss_soccothrates.cpp diff --git a/VC100/100ScriptDev2.vcxproj b/VC100/100ScriptDev2.vcxproj index d46f2be6c..1f79a12ad 100644 --- a/VC100/100ScriptDev2.vcxproj +++ b/VC100/100ScriptDev2.vcxproj @@ -668,7 +668,9 @@ + + diff --git a/VC100/100ScriptDev2.vcxproj.filters b/VC100/100ScriptDev2.vcxproj.filters index 3a382cbd2..67909d021 100644 --- a/VC100/100ScriptDev2.vcxproj.filters +++ b/VC100/100ScriptDev2.vcxproj.filters @@ -1659,9 +1659,15 @@ scripts\outland\tempest_keep\arcatraz + + scripts\outland\tempest_keep\arcatraz + scripts\outland\tempest_keep\arcatraz + + scripts\outland\tempest_keep\arcatraz + scripts\outland\tempest_keep\arcatraz diff --git a/VC80/80ScriptDev2.vcproj b/VC80/80ScriptDev2.vcproj index 7d4a32bcd..1f4214a30 100644 --- a/VC80/80ScriptDev2.vcproj +++ b/VC80/80ScriptDev2.vcproj @@ -2827,10 +2827,18 @@ RelativePath="..\scripts\outland\tempest_keep\arcatraz\arcatraz.h" > + + + + diff --git a/VC90/90ScriptDev2.vcproj b/VC90/90ScriptDev2.vcproj index 0631758bb..6e64fd847 100644 --- a/VC90/90ScriptDev2.vcproj +++ b/VC90/90ScriptDev2.vcproj @@ -2825,10 +2825,18 @@ RelativePath="..\scripts\outland\tempest_keep\arcatraz\arcatraz.h" > + + + + diff --git a/scripts/outland/tempest_keep/arcatraz/boss_dalliah.cpp b/scripts/outland/tempest_keep/arcatraz/boss_dalliah.cpp new file mode 100644 index 000000000..ba6df9933 --- /dev/null +++ b/scripts/outland/tempest_keep/arcatraz/boss_dalliah.cpp @@ -0,0 +1,29 @@ +/* Copyright (C) 2006 - 2012 ScriptDev2 + * 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_dalliah +SD%Complete: 0 +SDComment: Placeholder +SDCategory: Tempest Keep, The Arcatraz +EndScriptData */ + +#include "precompiled.h" + + +void AddSC_boss_dalliah() +{ +} diff --git a/scripts/outland/tempest_keep/arcatraz/boss_soccothrates.cpp b/scripts/outland/tempest_keep/arcatraz/boss_soccothrates.cpp new file mode 100644 index 000000000..4accf6e60 --- /dev/null +++ b/scripts/outland/tempest_keep/arcatraz/boss_soccothrates.cpp @@ -0,0 +1,29 @@ +/* Copyright (C) 2006 - 2012 ScriptDev2 + * 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_soccothrates +SD%Complete: 0 +SDComment: Placeholder +SDCategory: Tempest Keep, The Arcatraz +EndScriptData */ + +#include "precompiled.h" + + +void AddSC_boss_soccothrates() +{ +} diff --git a/scripts/outland/tempest_keep/arcatraz/instance_arcatraz.cpp b/scripts/outland/tempest_keep/arcatraz/instance_arcatraz.cpp index 5af79044e..6fda15c3e 100644 --- a/scripts/outland/tempest_keep/arcatraz/instance_arcatraz.cpp +++ b/scripts/outland/tempest_keep/arcatraz/instance_arcatraz.cpp @@ -50,6 +50,8 @@ enum SPELL_TARGET_ALPHA = 36856, SPELL_TARGET_DELTA = 36857, SPELL_TARGET_GAMMA = 36858, + SPELL_SIMPLE_TELEPORT = 12980, + SPELL_MIND_REND = 36859, }; static const DialogueEntry aArcatrazDialogue[] = @@ -70,7 +72,7 @@ static const DialogueEntry aArcatrazDialogue[] = {YELL_MELLICHAR_RELEASE5, NPC_MELLICHAR, 8000}, {TYPE_WARDEN_5, 0, 5000}, {SAY_SKYRISS_INTRO, NPC_SKYRISS, 25000}, - {YELL_MELLICAR_WELCOME, NPC_MELLICHAR, 5000}, + {YELL_MELLICAR_WELCOME, NPC_MELLICHAR, 3000}, {SAY_SKYRISS_AGGRO, NPC_SKYRISS, 0}, {0, 0, 0}, }; @@ -356,7 +358,12 @@ void instance_arcatraz::JustDidDialogueStep(int32 iEntry) SetData(TYPE_WARDEN_5, IN_PROGRESS); break; case TYPE_WARDEN_5: - pMellichar->SummonCreature(NPC_SKYRISS, aSummonPosition[4].m_fX, aSummonPosition[4].m_fY, aSummonPosition[4].m_fZ, aSummonPosition[4].m_fO, TEMPSUMMON_DEAD_DESPAWN, 0); + if (Creature* pSkyriss = pMellichar->SummonCreature(NPC_SKYRISS, aSummonPosition[4].m_fX, aSummonPosition[4].m_fY, aSummonPosition[4].m_fZ, aSummonPosition[4].m_fO, TEMPSUMMON_DEAD_DESPAWN, 0)) + pSkyriss->CastSpell(pSkyriss, SPELL_SIMPLE_TELEPORT, false); + break; + case YELL_MELLICAR_WELCOME: + if (Creature* pSkyriss = GetSingleCreatureFromStorage(NPC_SKYRISS)) + pSkyriss->CastSpell(pSkyriss, SPELL_MIND_REND, false); break; case SAY_SKYRISS_AGGRO: // Kill Mellichar and start combat diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 0eff2e36d..b1b150607 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2659" + #define SD2_REVISION_NR "2660" #endif // __SD2_REVISION_NR_H__ diff --git a/system/ScriptLoader.cpp b/system/ScriptLoader.cpp index aa9e37a05..06206236a 100644 --- a/system/ScriptLoader.cpp +++ b/system/ScriptLoader.cpp @@ -475,7 +475,9 @@ extern void AddSC_boss_warbringer_omrogg(); extern void AddSC_boss_warchief_kargath_bladefist(); extern void AddSC_instance_shattered_halls(); extern void AddSC_arcatraz(); // TK, arcatraz +extern void AddSC_boss_dalliah(); extern void AddSC_boss_harbinger_skyriss(); +extern void AddSC_boss_soccothrates(); extern void AddSC_instance_arcatraz(); extern void AddSC_boss_high_botanist_freywinn(); // TK, botanica extern void AddSC_boss_laj(); @@ -975,7 +977,9 @@ void AddScripts() AddSC_boss_warchief_kargath_bladefist(); AddSC_instance_shattered_halls(); AddSC_arcatraz(); // TK, arcatraz + AddSC_boss_dalliah(); AddSC_boss_harbinger_skyriss(); + AddSC_boss_soccothrates(); AddSC_instance_arcatraz(); AddSC_boss_high_botanist_freywinn(); // TK, botanica AddSC_boss_laj(); From 832ac209bbfac7af8a9180e727515813ed5b92f6 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Wed, 15 Aug 2012 13:32:10 +0300 Subject: [PATCH 0649/1172] [2661] Add basic scripts for the previous added placeholders --- .../outland/tempest_keep/arcatraz/arcatraz.h | 5 +- .../tempest_keep/arcatraz/boss_dalliah.cpp | 91 +++++++++++++++++- .../arcatraz/boss_soccothrates.cpp | 93 ++++++++++++++++++- .../arcatraz/instance_arcatraz.cpp | 1 + sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 2 + sql/scriptdev2_script_full.sql | 30 +++++- sql/updates/r2661_mangos.sql | 2 + sql/updates/r2661_scriptdev2.sql | 29 ++++++ 9 files changed, 247 insertions(+), 8 deletions(-) create mode 100644 sql/updates/r2661_mangos.sql create mode 100644 sql/updates/r2661_scriptdev2.sql diff --git a/scripts/outland/tempest_keep/arcatraz/arcatraz.h b/scripts/outland/tempest_keep/arcatraz/arcatraz.h index 949b7162e..ca34a12d1 100644 --- a/scripts/outland/tempest_keep/arcatraz/arcatraz.h +++ b/scripts/outland/tempest_keep/arcatraz/arcatraz.h @@ -10,8 +10,8 @@ enum MAX_ENCOUNTER = 9, TYPE_ZEREKETH = 1, - TYPE_DALLIAH = 2, // Handled in ACID (20885 - Dalliah the Doomsayer) - TYPE_SOCCOTHRATES = 3, // Handled in ACID (20886 - Wrath-Scryer Soccothrates) + TYPE_DALLIAH = 2, + TYPE_SOCCOTHRATES = 3, TYPE_HARBINGERSKYRISS = 4, // Handled with ACID (FAIL of 20905, 20906, 20908, 20909, 20910, 20911) TYPE_WARDEN_1 = 5, // Handled with ACID (20905 - Blazing Trickster, 20906 - Phase-Hunter) TYPE_WARDEN_2 = 6, @@ -19,6 +19,7 @@ enum TYPE_WARDEN_4 = 8, // Handled with ACID (20910 - Twilight Drakonaar, 20911 - Blackwing Drakonaar) TYPE_WARDEN_5 = 9, + NPC_SOCCOTHRATES = 20886, NPC_MELLICHAR = 20904, // Skyriss will kill this unit NPC_PRISON_APHPA_POD = 21436, NPC_PRISON_BETA_POD = 21437, diff --git a/scripts/outland/tempest_keep/arcatraz/boss_dalliah.cpp b/scripts/outland/tempest_keep/arcatraz/boss_dalliah.cpp index ba6df9933..86818c810 100644 --- a/scripts/outland/tempest_keep/arcatraz/boss_dalliah.cpp +++ b/scripts/outland/tempest_keep/arcatraz/boss_dalliah.cpp @@ -16,14 +16,101 @@ /* ScriptData SDName: boss_dalliah -SD%Complete: 0 -SDComment: Placeholder +SD%Complete: 20 +SDComment: Basic script SDCategory: Tempest Keep, The Arcatraz EndScriptData */ #include "precompiled.h" +#include "arcatraz.h" +enum +{ + SAY_AGGRO = -1552031, + SAY_SOCCOTHRATES_AGGRO_1 = -1552039, + SAY_SOCCOTHRATES_TAUNT_1 = -1552040, + SAY_SOCCOTHRATES_TAUNT_2 = -1552041, + SAY_SOCCOTHRATES_TAUNT_3 = -1552042, + SAY_HEAL_1 = -1552032, + SAY_HEAL_2 = -1552033, + SAY_KILL_1 = -1552034, + SAY_KILL_2 = -1552035, + SAY_WHIRLWIND_1 = -1552036, + SAY_WHIRLWIND_2 = -1552037, + SAY_DEATH = -1552038, + SAY_SOCCOTHRATES_DEATH = -1552043, + + SPELL_GIFT_DOOMSAYER = 36173, + SPELL_GIFT_DOOMSAYER_H = 39009, + SPELL_HEAL = 36144, + SPELL_HEAL_H = 39013, + SPELL_WHIRLWIND = 36142, + SPELL_SHADOW_WAVE = 39016, // heroic spell only +}; + +struct MANGOS_DLL_DECL boss_dalliahAI : public ScriptedAI +{ + boss_dalliahAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); + Reset(); + } + + ScriptedInstance* m_pInstance; + bool m_bIsRegularMode; + + void Reset() + { + } + + void Aggro(Unit* pWho) + { + DoScriptText(SAY_AGGRO, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_DALLIAH, IN_PROGRESS); + } + + void KilledUnit(Unit* pVictim) + { + DoScriptText(urand(0, 1) ? SAY_KILL_1 : SAY_KILL_2, m_creature); + } + + void JustDied(Unit* pWho) + { + DoScriptText(SAY_DEATH, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_DALLIAH, DONE); + } + + void JustReachedHome() + { + if (m_pInstance) + m_pInstance->SetData(TYPE_DALLIAH, FAIL); + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_dalliah(Creature* pCreature) +{ + return new boss_dalliahAI(pCreature); +} void AddSC_boss_dalliah() { + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_dalliah"; + pNewScript->GetAI = &GetAI_boss_dalliah; + pNewScript->RegisterSelf(); } diff --git a/scripts/outland/tempest_keep/arcatraz/boss_soccothrates.cpp b/scripts/outland/tempest_keep/arcatraz/boss_soccothrates.cpp index 4accf6e60..10f2a4860 100644 --- a/scripts/outland/tempest_keep/arcatraz/boss_soccothrates.cpp +++ b/scripts/outland/tempest_keep/arcatraz/boss_soccothrates.cpp @@ -16,14 +16,103 @@ /* ScriptData SDName: boss_soccothrates -SD%Complete: 0 -SDComment: Placeholder +SD%Complete: 20 +SDComment: Basic script SDCategory: Tempest Keep, The Arcatraz EndScriptData */ #include "precompiled.h" +#include "arcatraz.h" +enum +{ + // Intro yells + SAY_SOCCOTHRATES_INTRO_1 = -1552049, + SAY_DALLIAH_INTRO_2 = -1552050, + SAY_SOCCOTHRATES_INTRO_3 = -1552051, + SAY_DALLIAH_INTRO_4 = -1552052, + SAY_SOCCOTHRATES_INTRO_5 = -1552053, + SAY_DALLIAH_INTRO_6 = -1552054, + SAY_SOCCOTHRATES_INTRO_7 = -1552055, + + SAY_AGGRO = -1552048, + SAY_KILL = -1552047, + SAY_DEATH = -1552046, + SAY_CHARGE_1 = -1552044, + SAY_CHARGE_2 = -1552045, + + SPELL_IMMOLATION = 36051, + SPELL_IMMOLATION_H = 39007, + SPELL_KNOCK_AWAY = 36512, + SPELL_FELFIRE_LINE_UP = 35770, + SPELL_FELFIRE_SHOCK = 35759, + SPELL_FELFIRE_SHOCK_H = 39006, +}; + +struct MANGOS_DLL_DECL boss_soccothratesAI : public ScriptedAI +{ + boss_soccothratesAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); + Reset(); + } + + ScriptedInstance* m_pInstance; + bool m_bIsRegularMode; + + void Reset() + { + } + + void Aggro(Unit* pWho) + { + DoScriptText(SAY_AGGRO, m_creature); + DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_IMMOLATION : SPELL_IMMOLATION_H); + + if (m_pInstance) + m_pInstance->SetData(TYPE_SOCCOTHRATES, IN_PROGRESS); + } + + void KilledUnit(Unit* pVictim) + { + DoScriptText(SAY_KILL, m_creature); + } + + void JustDied(Unit* pWho) + { + DoScriptText(SAY_DEATH, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_SOCCOTHRATES, DONE); + } + + void JustReachedHome() + { + if (m_pInstance) + m_pInstance->SetData(TYPE_SOCCOTHRATES, FAIL); + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_soccothrates(Creature* pCreature) +{ + return new boss_soccothratesAI(pCreature); +} void AddSC_boss_soccothrates() { + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_soccothrates"; + pNewScript->GetAI = &GetAI_boss_soccothrates; + pNewScript->RegisterSelf(); } diff --git a/scripts/outland/tempest_keep/arcatraz/instance_arcatraz.cpp b/scripts/outland/tempest_keep/arcatraz/instance_arcatraz.cpp index 6fda15c3e..c01f694f3 100644 --- a/scripts/outland/tempest_keep/arcatraz/instance_arcatraz.cpp +++ b/scripts/outland/tempest_keep/arcatraz/instance_arcatraz.cpp @@ -128,6 +128,7 @@ void instance_arcatraz::OnCreatureCreate(Creature* pCreature) case NPC_PRISON_GAMMA_POD: case NPC_PRISON_BOSS_POD: case NPC_MELLICHAR: + case NPC_SOCCOTHRATES: m_mNpcEntryGuidStore[pCreature->GetEntry()] = pCreature->GetObjectGuid(); break; case NPC_BLAZING_TRICKSTER: diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index b1b150607..f88e74e0e 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2660" + #define SD2_REVISION_NR "2661" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 4e7162725..6ead03476 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -1159,6 +1159,8 @@ UPDATE creature_template SET ScriptName='mob_warp_splinter_treant' WHERE entry=1 UPDATE instance_template SET ScriptName='instance_arcatraz' WHERE map=552; UPDATE creature_template SET ScriptName='mob_zerekethvoidzone' WHERE entry=21101; UPDATE creature_template SET ScriptName='boss_harbinger_skyriss' WHERE entry=20912; +UPDATE creature_template SET ScriptName='boss_dalliah' WHERE entry=20885; +UPDATE creature_template SET ScriptName='boss_soccothrates' WHERE entry=20886; UPDATE creature_template SET ScriptName='npc_warden_mellichar' WHERE entry=20904; UPDATE creature_template SET ScriptName='npc_millhouse_manastorm' WHERE entry=20977; diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 542fefeaf..de93f3970 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -2202,7 +2202,35 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1552027,'What is this? A lowly gnome? I will do better, O\'great one.',11226,1,0,0,'mellichar YELL_RELEASE2B'), (-1552028,'Anarchy! Bedlam! Oh, you are so wise! Yes, I see it now, of course!',11227,1,0,0,'mellichar YELL_RELEASE3'), (-1552029,'One final cell remains. Yes, O\'great one, right away!',11228,1,0,0,'mellichar YELL_RELEASE4'), -(-1552030,'Welcome, O\'great one. I am your humble servant.',11229,1,0,0,'mellichar YELL_WELCOME'); +(-1552030,'Welcome, O\'great one. I am your humble servant.',11229,1,0,0,'mellichar YELL_WELCOME'), + +(-1552031,'It is unwise to anger me.',11086,1,0,0,'dalliah SAY_AGGRO'), +(-1552032,'Ahh... That is much better.',11091,1,0,0,'dalliah SAY_HEAL_1'), +(-1552033,'Ahh... Just what I needed.',11092,1,0,0,'dalliah SAY_HEAL_2'), +(-1552034,'Completely ineffective. Just like someone else I know.',11087,1,0,0,'dalliah SAY_KILL_1'), +(-1552035,'You chose the wrong opponent.',11088,1,0,0,'dalliah SAY_KILL_2'), +(-1552036,'I\'ll cut you to pieces!',11090,1,0,0,'dalliah SAY_WHIRLWIND_1'), +(-1552037,'Reap the Whirlwind!',11089,1,0,0,'dalliah SAY_WHIRLWIND_2'), +(-1552038,'Now I\'m really... angry...',11093,1,0,0,'dalliah SAY_DEATH'), + +(-1552039,'Have you come to kill Dalliah? Can I watch?',11237,1,0,1,'soccothrates SAY_DALLIAH_AGGRO_1'), +(-1552040,'This may be the end for you, Dalliah. What a shame that would be.',11245,1,0,1,'soccothrates SAY_DALLIAH_TAUNT_1'), +(-1552041,'Facing difficulties, Dalliah? How nice.',11244,1,0,1,'soccothrates SAY_DALLIAH_TAUNT_2'), +(-1552042,'I suggest a new strategy, you draw the attackers while I gather reinforcements. Hahaha!',11246,1,0,1,'soccothrates SAY_DALLIAH_TAUNT_3'), +(-1552043,'Finally! Well done!',11247,1,0,66,'soccothrates SAY_DALLIAH_DEAD'), +(-1552044,'On guard!',11241,1,0,0,'soccothrates SAY_CHARGE_1'), +(-1552045,'Defend yourself, for all the good it will do...',11242,1,0,0,'soccothrates SAY_CHARGE_2'), +(-1552046,'Knew this was... the only way out',11243,1,0,0,'soccothrates SAY_DEATH'), +(-1552047,'Yes, that was quite satisfying',11239,1,0,0,'soccothrates SAY_KILL'), +(-1552048,'At last, a target for my frustrations!',11238,1,0,0,'soccothrates SAY_AGGRO'), + +(-1552049,'Did you call on me?',11236,1,0,397,'soccothrates SAY_INTRO_1'), +(-1552050,'Why would I call on you?',0,1,0,396,'dalliah SAY_INTRO_2'), +(-1552051,'To do your heavy lifting, most likely.',0,1,0,396,'soccothrates SAY_INTRO_3'), +(-1552052,'When I need someone to prance around like an overstuffed peacock, I''ll call on you.',0,1,0,396,'dalliah SAY_INTRO_4'), +(-1552053,'Then I\'ll commit myself to ignoring you.',0,1,0,396,'soccothrates SAY_INTRO_5'), +(-1552054,'What would you know about commitment, sheet-sah?',0,1,0,396,'dalliah SAY_INTRO_6'), +(-1552055,'You\'re the one who should be-- Wait, we have company...',0,1,0,396,'soccothrates SAY_INTRO_7'); -- -1 553 000 THE BOTANICA INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES diff --git a/sql/updates/r2661_mangos.sql b/sql/updates/r2661_mangos.sql new file mode 100644 index 000000000..def81fae2 --- /dev/null +++ b/sql/updates/r2661_mangos.sql @@ -0,0 +1,2 @@ +UPDATE creature_template SET ScriptName='boss_dalliah' WHERE entry=20885; +UPDATE creature_template SET ScriptName='boss_soccothrates' WHERE entry=20886; diff --git a/sql/updates/r2661_scriptdev2.sql b/sql/updates/r2661_scriptdev2.sql new file mode 100644 index 000000000..3088ed78a --- /dev/null +++ b/sql/updates/r2661_scriptdev2.sql @@ -0,0 +1,29 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1552055 AND -1552031; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1552031,'It is unwise to anger me.',11086,1,0,0,'dalliah SAY_AGGRO'), +(-1552032,'Ahh... That is much better.',11091,1,0,0,'dalliah SAY_HEAL_1'), +(-1552033,'Ahh... Just what I needed.',11092,1,0,0,'dalliah SAY_HEAL_2'), +(-1552034,'Completely ineffective. Just like someone else I know.',11087,1,0,0,'dalliah SAY_KILL_1'), +(-1552035,'You chose the wrong opponent.',11088,1,0,0,'dalliah SAY_KILL_2'), +(-1552036,'I\'ll cut you to pieces!',11090,1,0,0,'dalliah SAY_WHIRLWIND_1'), +(-1552037,'Reap the Whirlwind!',11089,1,0,0,'dalliah SAY_WHIRLWIND_2'), +(-1552038,'Now I\'m really... angry...',11093,1,0,0,'dalliah SAY_DEATH'), + +(-1552039,'Have you come to kill Dalliah? Can I watch?',11237,1,0,1,'soccothrates SAY_DALLIAH_AGGRO_1'), +(-1552040,'This may be the end for you, Dalliah. What a shame that would be.',11245,1,0,1,'soccothrates SAY_DALLIAH_TAUNT_1'), +(-1552041,'Facing difficulties, Dalliah? How nice.',11244,1,0,1,'soccothrates SAY_DALLIAH_TAUNT_2'), +(-1552042,'I suggest a new strategy, you draw the attackers while I gather reinforcements. Hahaha!',11246,1,0,1,'soccothrates SAY_DALLIAH_TAUNT_3'), +(-1552043,'Finally! Well done!',11247,1,0,66,'soccothrates SAY_DALLIAH_DEAD'), +(-1552044,'On guard!',11241,1,0,0,'soccothrates SAY_CHARGE_1'), +(-1552045,'Defend yourself, for all the good it will do...',11242,1,0,0,'soccothrates SAY_CHARGE_2'), +(-1552046,'Knew this was... the only way out',11243,1,0,0,'soccothrates SAY_DEATH'), +(-1552047,'Yes, that was quite satisfying',11239,1,0,0,'soccothrates SAY_KILL'), +(-1552048,'At last, a target for my frustrations!',11238,1,0,0,'soccothrates SAY_AGGRO'), + +(-1552049,'Did you call on me?',11236,1,0,397,'soccothrates SAY_INTRO_1'), +(-1552050,'Why would I call on you?',0,1,0,396,'dalliah SAY_INTRO_2'), +(-1552051,'To do your heavy lifting, most likely.',0,1,0,396,'soccothrates SAY_INTRO_3'), +(-1552052,'When I need someone to prance around like an overstuffed peacock, I''ll call on you.',0,1,0,396,'dalliah SAY_INTRO_4'), +(-1552053,'Then I\'ll commit myself to ignoring you.',0,1,0,396,'soccothrates SAY_INTRO_5'), +(-1552054,'What would you know about commitment, sheet-sah?',0,1,0,396,'dalliah SAY_INTRO_6'), +(-1552055,'You\'re the one who should be-- Wait, we have company...',0,1,0,396,'soccothrates SAY_INTRO_7'); From 552d507cd8afc0238a12ce3fe50e3bdbe9d36ca5 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Wed, 15 Aug 2012 13:59:35 +0300 Subject: [PATCH 0650/1172] [2662] Add the rest of the script for Dalliah the Doomsayer - Arcatraz --- .../tempest_keep/arcatraz/boss_dalliah.cpp | 86 ++++++++++++++++++- .../arcatraz/instance_arcatraz.cpp | 21 +++++ sd2_revision_nr.h | 2 +- 3 files changed, 104 insertions(+), 5 deletions(-) diff --git a/scripts/outland/tempest_keep/arcatraz/boss_dalliah.cpp b/scripts/outland/tempest_keep/arcatraz/boss_dalliah.cpp index 86818c810..220fccf4c 100644 --- a/scripts/outland/tempest_keep/arcatraz/boss_dalliah.cpp +++ b/scripts/outland/tempest_keep/arcatraz/boss_dalliah.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: boss_dalliah -SD%Complete: 20 -SDComment: Basic script +SD%Complete: 100 +SDComment: SDCategory: Tempest Keep, The Arcatraz EndScriptData */ @@ -27,7 +27,6 @@ EndScriptData */ enum { SAY_AGGRO = -1552031, - SAY_SOCCOTHRATES_AGGRO_1 = -1552039, SAY_SOCCOTHRATES_TAUNT_1 = -1552040, SAY_SOCCOTHRATES_TAUNT_2 = -1552041, SAY_SOCCOTHRATES_TAUNT_3 = -1552042, @@ -38,7 +37,6 @@ enum SAY_WHIRLWIND_1 = -1552036, SAY_WHIRLWIND_2 = -1552037, SAY_DEATH = -1552038, - SAY_SOCCOTHRATES_DEATH = -1552043, SPELL_GIFT_DOOMSAYER = 36173, SPELL_GIFT_DOOMSAYER_H = 39009, @@ -60,8 +58,21 @@ struct MANGOS_DLL_DECL boss_dalliahAI : public ScriptedAI ScriptedInstance* m_pInstance; bool m_bIsRegularMode; + uint32 m_uiGiftDoomsayerTimer; + uint32 m_uiHealTimer; + uint32 m_uiWhirlwindTimer; + uint32 m_uiShadowWaveTimer; + + bool m_bHasTaunted; + void Reset() { + m_uiGiftDoomsayerTimer = urand(4000, 7000); + m_uiHealTimer = 0; + m_uiWhirlwindTimer = 15000; + m_uiShadowWaveTimer = urand(9000, 13000); + + m_bHasTaunted = false; } void Aggro(Unit* pWho) @@ -96,6 +107,73 @@ struct MANGOS_DLL_DECL boss_dalliahAI : public ScriptedAI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; + if (m_uiGiftDoomsayerTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), m_bIsRegularMode ? SPELL_GIFT_DOOMSAYER : SPELL_GIFT_DOOMSAYER_H) == CAST_OK) + m_uiGiftDoomsayerTimer = urand(14000, 19000); + } + else + m_uiGiftDoomsayerTimer -= uiDiff; + + if (m_uiWhirlwindTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_WHIRLWIND) == CAST_OK) + { + DoScriptText(urand(0, 1) ? SAY_WHIRLWIND_1 : SAY_WHIRLWIND_2, m_creature); + m_uiWhirlwindTimer = urand(25000, 30000); + m_uiHealTimer = urand(6000, 10000); + } + } + else + m_uiWhirlwindTimer -= uiDiff; + + if (m_uiHealTimer) + { + if (m_uiHealTimer <= uiDiff) + { + if (DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_HEAL : SPELL_HEAL_H) == CAST_OK) + { + DoScriptText(urand(0, 1) ? SAY_HEAL_1 : SAY_HEAL_2, m_creature); + m_uiHealTimer = 0; + } + } + else + m_uiHealTimer -= uiDiff; + } + + if (!m_bIsRegularMode) + { + if (m_uiShadowWaveTimer < uiDiff) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, SPELL_SHADOW_WAVE) == CAST_OK) + m_uiShadowWaveTimer = urand(13000, 17000); + } + } + else + m_uiShadowWaveTimer -= uiDiff; + } + + if (!m_bHasTaunted && m_creature->GetHealthPercent() < 25.0f) + { + // Taunt if Soccothares isn't dead yet + if (m_pInstance && m_pInstance->GetData(TYPE_SOCCOTHRATES) != DONE) + { + if (Creature* pSoccothares = m_pInstance->GetSingleCreatureFromStorage(NPC_SOCCOTHRATES)) + { + switch (urand(0, 2)) + { + case 0: DoScriptText(SAY_SOCCOTHRATES_TAUNT_1, pSoccothares); break; + case 1: DoScriptText(SAY_SOCCOTHRATES_TAUNT_2, pSoccothares); break; + case 2: DoScriptText(SAY_SOCCOTHRATES_TAUNT_3, pSoccothares); break; + } + } + } + + m_bHasTaunted = true; + } + DoMeleeAttackIfReady(); } }; diff --git a/scripts/outland/tempest_keep/arcatraz/instance_arcatraz.cpp b/scripts/outland/tempest_keep/arcatraz/instance_arcatraz.cpp index c01f694f3..44ada4f8f 100644 --- a/scripts/outland/tempest_keep/arcatraz/instance_arcatraz.cpp +++ b/scripts/outland/tempest_keep/arcatraz/instance_arcatraz.cpp @@ -33,6 +33,9 @@ EndScriptData */ enum { + SAY_SOCCOTHRATES_AGGRO = -1552039, + SAY_SOCCOTHRATES_DEATH = -1552043, + YELL_MELLICHAR_INTRO1 = -1552023, YELL_MELLICHAR_INTRO2 = -1552024, YELL_MELLICHAR_RELEASE1 = -1552025, @@ -56,6 +59,12 @@ enum static const DialogueEntry aArcatrazDialogue[] = { + // Soccothares taunts + {TYPE_DALLIAH, 0, 5000}, + {SAY_SOCCOTHRATES_AGGRO, NPC_SOCCOTHRATES, 0}, + {TYPE_SOCCOTHRATES, 0, 5000}, + {SAY_SOCCOTHRATES_DEATH, NPC_SOCCOTHRATES, 0}, + // Skyriss event {YELL_MELLICHAR_INTRO1, NPC_MELLICHAR, 22000}, {YELL_MELLICHAR_INTRO2, NPC_MELLICHAR, 7000}, {SPELL_TARGET_ALPHA, 0, 7000}, @@ -151,8 +160,20 @@ void instance_arcatraz::SetData(uint32 uiType, uint32 uiData) break; case TYPE_DALLIAH: + if (uiData == IN_PROGRESS) + { + // Soccothares taunts after Dalliah gets aggro + if (GetData(TYPE_SOCCOTHRATES) != DONE) + StartNextDialogueText(TYPE_DALLIAH); + } if (uiData == DONE) + { DoUseDoorOrButton(GO_CORE_SECURITY_FIELD_BETA); + + // Soccothares taunts after Dalliah dies + if (GetData(TYPE_SOCCOTHRATES) != DONE) + StartNextDialogueText(TYPE_SOCCOTHRATES); + } m_auiEncounter[1] = uiData; break; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index f88e74e0e..9380ba95d 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2661" + #define SD2_REVISION_NR "2662" #endif // __SD2_REVISION_NR_H__ From 550a5d4f3f79778426f04fe9a473dcbd72be85da Mon Sep 17 00:00:00 2001 From: Xfurry Date: Wed, 15 Aug 2012 15:42:17 +0300 Subject: [PATCH 0651/1172] [2663] Add the rest of the script for Wrath-Scryer Soccothrates - Arcatraz --- .../outland/tempest_keep/arcatraz/arcatraz.h | 4 + .../tempest_keep/arcatraz/boss_dalliah.cpp | 26 +++ .../arcatraz/boss_soccothrates.cpp | 149 +++++++++++++++++- .../arcatraz/instance_arcatraz.cpp | 3 + sd2_revision_nr.h | 2 +- 5 files changed, 177 insertions(+), 7 deletions(-) diff --git a/scripts/outland/tempest_keep/arcatraz/arcatraz.h b/scripts/outland/tempest_keep/arcatraz/arcatraz.h index ca34a12d1..4b8ba229b 100644 --- a/scripts/outland/tempest_keep/arcatraz/arcatraz.h +++ b/scripts/outland/tempest_keep/arcatraz/arcatraz.h @@ -19,6 +19,7 @@ enum TYPE_WARDEN_4 = 8, // Handled with ACID (20910 - Twilight Drakonaar, 20911 - Blackwing Drakonaar) TYPE_WARDEN_5 = 9, + NPC_DALLIAH = 20885, NPC_SOCCOTHRATES = 20886, NPC_MELLICHAR = 20904, // Skyriss will kill this unit NPC_PRISON_APHPA_POD = 21436, @@ -63,6 +64,9 @@ static const SpawnLocation aSummonPosition[5] = {445.763f, -191.639f, 44.64f, 1.60f} // Skyriss }; +static const float aDalliahStartPos[4] = {118.6038f, 96.84682f, 22.44115f, 1.012f}; +static const float aSoccotharesStartPos[4] = {122.1035f, 192.7203f, 22.44115f, 5.235f}; + class MANGOS_DLL_DECL instance_arcatraz : public ScriptedInstance, private DialogueHelper { public: diff --git a/scripts/outland/tempest_keep/arcatraz/boss_dalliah.cpp b/scripts/outland/tempest_keep/arcatraz/boss_dalliah.cpp index 220fccf4c..d9a56e9e2 100644 --- a/scripts/outland/tempest_keep/arcatraz/boss_dalliah.cpp +++ b/scripts/outland/tempest_keep/arcatraz/boss_dalliah.cpp @@ -102,6 +102,32 @@ struct MANGOS_DLL_DECL boss_dalliahAI : public ScriptedAI m_pInstance->SetData(TYPE_DALLIAH, FAIL); } + void EnterEvadeMode() + { + m_creature->RemoveAllAuras(); + m_creature->DeleteThreatList(); + m_creature->CombatStop(true); + m_creature->LoadCreatureAddon(true); + + // should evade to the attack position + if (m_creature->isAlive()) + m_creature->GetMotionMaster()->MovePoint(1, aDalliahStartPos[0], aDalliahStartPos[1], aDalliahStartPos[2]); + + m_creature->SetLootRecipient(NULL); + + Reset(); + } + + void MovementInform(uint32 uiMoveType, uint32 uiPointId) + { + if (uiMoveType != POINT_MOTION_TYPE) + return; + + // Adjust orientation + if (uiPointId) + m_creature->SetFacingTo(aDalliahStartPos[3]); + } + void UpdateAI(const uint32 uiDiff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) diff --git a/scripts/outland/tempest_keep/arcatraz/boss_soccothrates.cpp b/scripts/outland/tempest_keep/arcatraz/boss_soccothrates.cpp index 10f2a4860..07594e1f5 100644 --- a/scripts/outland/tempest_keep/arcatraz/boss_soccothrates.cpp +++ b/scripts/outland/tempest_keep/arcatraz/boss_soccothrates.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: boss_soccothrates -SD%Complete: 20 -SDComment: Basic script +SD%Complete: 80 +SDComment: Spell Felfire Line Up and Wrath-Scryer's Felfire npc are summoning are NYI and they need additional research. SDCategory: Tempest Keep, The Arcatraz EndScriptData */ @@ -44,36 +44,76 @@ enum SPELL_IMMOLATION = 36051, SPELL_IMMOLATION_H = 39007, SPELL_KNOCK_AWAY = 36512, - SPELL_FELFIRE_LINE_UP = 35770, + SPELL_FELFIRE_LINE_UP = 35770, // dummy spell - should summon a line of npcs - 20978 to the target + SPELL_CHARGE_TARGETING = 36038, // summons 21030 on target + SPELL_CHARGE = 35754, // script target on 21030; also dummy effect area effect target on 20978 - makes the target cast 35769 SPELL_FELFIRE_SHOCK = 35759, SPELL_FELFIRE_SHOCK_H = 39006, }; -struct MANGOS_DLL_DECL boss_soccothratesAI : public ScriptedAI +static const DialogueEntry aIntroDialogue[] = { - boss_soccothratesAI(Creature* pCreature) : ScriptedAI(pCreature) + {SAY_SOCCOTHRATES_INTRO_1, NPC_SOCCOTHRATES, 3000}, + {SAY_DALLIAH_INTRO_2, NPC_DALLIAH, 2000}, + {SAY_SOCCOTHRATES_INTRO_3, NPC_SOCCOTHRATES, 4000}, + {SAY_DALLIAH_INTRO_4, NPC_DALLIAH, 5000}, + {SAY_SOCCOTHRATES_INTRO_5, NPC_SOCCOTHRATES, 3000}, + {SAY_DALLIAH_INTRO_6, NPC_DALLIAH, 3000}, + {SAY_SOCCOTHRATES_INTRO_7, NPC_SOCCOTHRATES, 0}, + {0, 0, 0}, +}; + +struct MANGOS_DLL_DECL boss_soccothratesAI : public ScriptedAI, private DialogueHelper +{ + boss_soccothratesAI(Creature* pCreature) : ScriptedAI(pCreature), + DialogueHelper(aIntroDialogue) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); + InitializeDialogueHelper(m_pInstance); + m_bHasYelledIntro = false; Reset(); } ScriptedInstance* m_pInstance; bool m_bIsRegularMode; + uint32 m_uiKnockAwayTimer; + uint32 m_uiFelfireShockTimer; + uint32 m_uiFelfireLineupTimer; + uint32 m_uiChargeTimer; + + bool m_bHasYelledIntro; + void Reset() { + m_uiFelfireShockTimer = urand(10000, 13000); + m_uiKnockAwayTimer = urand(22000, 25000); + m_uiFelfireLineupTimer = 0; + m_uiChargeTimer = 0; + + DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_IMMOLATION : SPELL_IMMOLATION_H); } void Aggro(Unit* pWho) { DoScriptText(SAY_AGGRO, m_creature); - DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_IMMOLATION : SPELL_IMMOLATION_H); if (m_pInstance) m_pInstance->SetData(TYPE_SOCCOTHRATES, IN_PROGRESS); } + void MoveInLineOfSight(Unit* pWho) + { + if (!m_bHasYelledIntro && pWho->GetTypeId() == TYPEID_PLAYER && m_creature->IsWithinDistInMap(pWho, 75.0f) && m_creature->IsWithinLOSInMap(pWho)) + { + StartNextDialogueText(SAY_SOCCOTHRATES_INTRO_1); + m_bHasYelledIntro = true; + } + + ScriptedAI::MoveInLineOfSight(pWho); + } + void KilledUnit(Unit* pVictim) { DoScriptText(SAY_KILL, m_creature); @@ -93,11 +133,108 @@ struct MANGOS_DLL_DECL boss_soccothratesAI : public ScriptedAI m_pInstance->SetData(TYPE_SOCCOTHRATES, FAIL); } + void EnterEvadeMode() + { + m_creature->RemoveAllAuras(); + m_creature->DeleteThreatList(); + m_creature->CombatStop(true); + m_creature->LoadCreatureAddon(true); + + // should evade to the attack position + if (m_creature->isAlive()) + m_creature->GetMotionMaster()->MovePoint(1, aSoccotharesStartPos[0], aSoccotharesStartPos[1], aSoccotharesStartPos[2]); + + m_creature->SetLootRecipient(NULL); + + Reset(); + } + + void MovementInform(uint32 uiMoveType, uint32 uiPointId) + { + if (uiMoveType != POINT_MOTION_TYPE) + return; + + // Adjust orientation + if (uiPointId) + m_creature->SetFacingTo(aSoccotharesStartPos[3]); + } + + void JustDidDialogueStep(int32 iEntry) + { + // Move each of them to their places + if (iEntry == SAY_SOCCOTHRATES_INTRO_7) + { + m_creature->GetMotionMaster()->MovePoint(1, aSoccotharesStartPos[0], aSoccotharesStartPos[1], aSoccotharesStartPos[2]); + + if (m_pInstance) + { + if (Creature* pDalliah = m_pInstance->GetSingleCreatureFromStorage(NPC_DALLIAH)) + pDalliah->GetMotionMaster()->MovePoint(1, aDalliahStartPos[0], aDalliahStartPos[1], aDalliahStartPos[2]); + } + } + } + void UpdateAI(const uint32 uiDiff) { + DialogueUpdate(uiDiff); + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; + if (m_uiFelfireShockTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), m_bIsRegularMode ? SPELL_FELFIRE_SHOCK : SPELL_FELFIRE_SHOCK_H) == CAST_OK) + m_uiFelfireShockTimer = urand(35000, 45000); + } + else + m_uiFelfireShockTimer -= uiDiff; + + if (m_uiKnockAwayTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_KNOCK_AWAY) == CAST_OK) + { + m_uiKnockAwayTimer = urand(30000, 35000); + m_uiFelfireLineupTimer = 3000; + } + } + else + m_uiKnockAwayTimer -= uiDiff; + + // Prepare the boss for charging + if (m_uiFelfireLineupTimer) + { + if (m_uiFelfireLineupTimer <= uiDiff) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, SPELL_CHARGE_TARGETING) == CAST_OK) + { + // ToDo: the Wrath-Scryer's Felfire npcs should be summoned at this point and aligned to the chosen target! + DoCastSpellIfCan(m_creature, SPELL_FELFIRE_LINE_UP, CAST_TRIGGERED); + DoScriptText(urand(0, 1) ? SAY_CHARGE_1 : SAY_CHARGE_2, m_creature); + + m_uiChargeTimer = 1500; + m_uiFelfireLineupTimer = 0; + } + } + } + else + m_uiFelfireLineupTimer -= uiDiff; + } + + // Charge the target + if (m_uiChargeTimer) + { + if (m_uiChargeTimer <= uiDiff) + { + // Note: this spell will also light up the Wrath-Scryer's Felfire npcs + if (DoCastSpellIfCan(m_creature, SPELL_CHARGE) == CAST_OK) + m_uiChargeTimer = 0; + } + else + m_uiChargeTimer -= uiDiff; + } + DoMeleeAttackIfReady(); } }; diff --git a/scripts/outland/tempest_keep/arcatraz/instance_arcatraz.cpp b/scripts/outland/tempest_keep/arcatraz/instance_arcatraz.cpp index 44ada4f8f..f7d959572 100644 --- a/scripts/outland/tempest_keep/arcatraz/instance_arcatraz.cpp +++ b/scripts/outland/tempest_keep/arcatraz/instance_arcatraz.cpp @@ -137,6 +137,7 @@ void instance_arcatraz::OnCreatureCreate(Creature* pCreature) case NPC_PRISON_GAMMA_POD: case NPC_PRISON_BOSS_POD: case NPC_MELLICHAR: + case NPC_DALLIAH: case NPC_SOCCOTHRATES: m_mNpcEntryGuidStore[pCreature->GetEntry()] = pCreature->GetObjectGuid(); break; @@ -284,6 +285,8 @@ uint32 instance_arcatraz::GetData(uint32 uiType) { switch(uiType) { + case TYPE_DALLIAH: return m_auiEncounter[1]; + case TYPE_SOCCOTHRATES: return m_auiEncounter[2]; case TYPE_HARBINGERSKYRISS: return m_auiEncounter[3]; case TYPE_WARDEN_1: return m_auiEncounter[4]; case TYPE_WARDEN_2: return m_auiEncounter[5]; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 9380ba95d..87c05eafb 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2662" + #define SD2_REVISION_NR "2663" #endif // __SD2_REVISION_NR_H__ From 7ea50f386c0b640590c6ecaff036430ce02196b0 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Wed, 15 Aug 2012 16:28:48 +0300 Subject: [PATCH 0652/1172] [2664] Add a few fixes and adjustments to the previous commits --- scripts/outland/tempest_keep/arcatraz/arcatraz.cpp | 11 ++++++++--- .../outland/tempest_keep/arcatraz/boss_dalliah.cpp | 9 +++------ .../tempest_keep/arcatraz/boss_soccothrates.cpp | 9 +++------ .../tempest_keep/arcatraz/instance_arcatraz.cpp | 4 ++-- sd2_revision_nr.h | 2 +- 5 files changed, 17 insertions(+), 18 deletions(-) diff --git a/scripts/outland/tempest_keep/arcatraz/arcatraz.cpp b/scripts/outland/tempest_keep/arcatraz/arcatraz.cpp index 065e17dc0..80c52457e 100644 --- a/scripts/outland/tempest_keep/arcatraz/arcatraz.cpp +++ b/scripts/outland/tempest_keep/arcatraz/arcatraz.cpp @@ -52,6 +52,7 @@ enum SPELL_CONJURE_WATER = 36879, SPELL_ARCANE_INTELLECT = 36880, SPELL_ICE_ARMOR = 36881, + SPELL_DRINK = 30024, SPELL_ARCANE_MISSILES = 33833, SPELL_CONE_OF_COLD = 12611, @@ -71,14 +72,15 @@ static const DialogueEntry aIntroDialogue[] = {TYPE_WARDEN_2, 0, 10000}, {SAY_INTRO_2, NPC_MILLHOUSE, 18000}, {SAY_WATER, NPC_MILLHOUSE, 7000}, - {SAY_BUFFS, NPC_MILLHOUSE, 7000}, + {SAY_BUFFS, NPC_MILLHOUSE, 6000}, + {SPELL_ICE_ARMOR, 0, 1000}, {SAY_DRINK, NPC_MILLHOUSE, 7000}, {SAY_READY, NPC_MILLHOUSE, 6000}, {POINT_ID_CENTER, 0, 0}, {0, 0, 0}, }; -static const float fRoomCenterCoords[3] = {445.92f, -158.37f, 43.06f}; +static const float fRoomCenterCoords[3] = {445.8804f, -158.7055f, 43.06898f}; struct MANGOS_DLL_DECL npc_millhouse_manastormAI : public ScriptedAI, private DialogueHelper { @@ -166,10 +168,13 @@ struct MANGOS_DLL_DECL npc_millhouse_manastormAI : public ScriptedAI, private Di DoCastSpellIfCan(m_creature, SPELL_CONJURE_WATER); break; case SAY_BUFFS: + DoCastSpellIfCan(m_creature, SPELL_ARCANE_INTELLECT); + break; + case SPELL_ICE_ARMOR: DoCastSpellIfCan(m_creature, SPELL_ICE_ARMOR); break; case SAY_DRINK: - DoCastSpellIfCan(m_creature, SPELL_ARCANE_INTELLECT); + DoCastSpellIfCan(m_creature, SPELL_DRINK); break; case POINT_ID_CENTER: m_creature->SetWalk(false); diff --git a/scripts/outland/tempest_keep/arcatraz/boss_dalliah.cpp b/scripts/outland/tempest_keep/arcatraz/boss_dalliah.cpp index d9a56e9e2..e681d816a 100644 --- a/scripts/outland/tempest_keep/arcatraz/boss_dalliah.cpp +++ b/scripts/outland/tempest_keep/arcatraz/boss_dalliah.cpp @@ -96,12 +96,6 @@ struct MANGOS_DLL_DECL boss_dalliahAI : public ScriptedAI m_pInstance->SetData(TYPE_DALLIAH, DONE); } - void JustReachedHome() - { - if (m_pInstance) - m_pInstance->SetData(TYPE_DALLIAH, FAIL); - } - void EnterEvadeMode() { m_creature->RemoveAllAuras(); @@ -113,6 +107,9 @@ struct MANGOS_DLL_DECL boss_dalliahAI : public ScriptedAI if (m_creature->isAlive()) m_creature->GetMotionMaster()->MovePoint(1, aDalliahStartPos[0], aDalliahStartPos[1], aDalliahStartPos[2]); + if (m_pInstance) + m_pInstance->SetData(TYPE_DALLIAH, FAIL); + m_creature->SetLootRecipient(NULL); Reset(); diff --git a/scripts/outland/tempest_keep/arcatraz/boss_soccothrates.cpp b/scripts/outland/tempest_keep/arcatraz/boss_soccothrates.cpp index 07594e1f5..8e98b3289 100644 --- a/scripts/outland/tempest_keep/arcatraz/boss_soccothrates.cpp +++ b/scripts/outland/tempest_keep/arcatraz/boss_soccothrates.cpp @@ -127,12 +127,6 @@ struct MANGOS_DLL_DECL boss_soccothratesAI : public ScriptedAI, private Dialogue m_pInstance->SetData(TYPE_SOCCOTHRATES, DONE); } - void JustReachedHome() - { - if (m_pInstance) - m_pInstance->SetData(TYPE_SOCCOTHRATES, FAIL); - } - void EnterEvadeMode() { m_creature->RemoveAllAuras(); @@ -144,6 +138,9 @@ struct MANGOS_DLL_DECL boss_soccothratesAI : public ScriptedAI, private Dialogue if (m_creature->isAlive()) m_creature->GetMotionMaster()->MovePoint(1, aSoccotharesStartPos[0], aSoccotharesStartPos[1], aSoccotharesStartPos[2]); + if (m_pInstance) + m_pInstance->SetData(TYPE_SOCCOTHRATES, FAIL); + m_creature->SetLootRecipient(NULL); Reset(); diff --git a/scripts/outland/tempest_keep/arcatraz/instance_arcatraz.cpp b/scripts/outland/tempest_keep/arcatraz/instance_arcatraz.cpp index f7d959572..00918eaf2 100644 --- a/scripts/outland/tempest_keep/arcatraz/instance_arcatraz.cpp +++ b/scripts/outland/tempest_keep/arcatraz/instance_arcatraz.cpp @@ -68,7 +68,7 @@ static const DialogueEntry aArcatrazDialogue[] = {YELL_MELLICHAR_INTRO1, NPC_MELLICHAR, 22000}, {YELL_MELLICHAR_INTRO2, NPC_MELLICHAR, 7000}, {SPELL_TARGET_ALPHA, 0, 7000}, - {TYPE_WARDEN_1, 0, 0}, + {YELL_MELLICHAR_RELEASE1, NPC_MELLICHAR, 0}, {YELL_MELLICHAR_RELEASE2, NPC_MELLICHAR, 7000}, {SPELL_TARGET_BETA, 0, 7000}, {TYPE_WARDEN_2, 0, 0}, @@ -335,7 +335,7 @@ void instance_arcatraz::JustDidDialogueStep(int32 iEntry) pMellichar->SetFacingToObject(pTarget); SetData(TYPE_WARDEN_1, IN_PROGRESS); break; - case TYPE_WARDEN_1: + case YELL_MELLICHAR_RELEASE1: pMellichar->SummonCreature(urand(0, 1) ? NPC_BLAZING_TRICKSTER : NPC_PHASE_HUNTER, aSummonPosition[0].m_fX, aSummonPosition[0].m_fY, aSummonPosition[0].m_fZ, aSummonPosition[0].m_fO, TEMPSUMMON_DEAD_DESPAWN, 0); break; case YELL_MELLICHAR_RELEASE2: diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 87c05eafb..aa2ec149e 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2663" + #define SD2_REVISION_NR "2664" #endif // __SD2_REVISION_NR_H__ From f73b0717bd992cf1fcaa039e6624971f18490c73 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Wed, 15 Aug 2012 16:58:16 +0300 Subject: [PATCH 0653/1172] [2665] Cleanup for Akil'zon - Zul'Aman --- .../eastern_kingdoms/zulaman/boss_akilzon.cpp | 167 +++++++++--------- sd2_revision_nr.h | 2 +- 2 files changed, 86 insertions(+), 83 deletions(-) diff --git a/scripts/eastern_kingdoms/zulaman/boss_akilzon.cpp b/scripts/eastern_kingdoms/zulaman/boss_akilzon.cpp index e1e84c9f9..6868ee2c2 100644 --- a/scripts/eastern_kingdoms/zulaman/boss_akilzon.cpp +++ b/scripts/eastern_kingdoms/zulaman/boss_akilzon.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: Boss_Akilzon -SD%Complete: 50 -SDComment: TODO: Correct timers, correct details, remove hack for eagles +SD%Complete: 80 +SDComment: Timers; Some details may need adjustments. SDCategory: Zul'Aman EndScriptData */ @@ -38,23 +38,17 @@ enum EMOTE_STORM = -1568033, SPELL_STATIC_DISRUPTION = 43622, - SPELL_STATIC_VISUAL = 45265, - SPELL_CALL_LIGHTNING = 43661, SPELL_GUST_OF_WIND = 43621, - SPELL_ELECTRICAL_STORM = 43648, SPELL_STORMCLOUD_VISUAL = 45213, - SPELL_BERSERK = 45078, + // spell used by eagles + SPELL_EAGLE_SWOOP = 44732, + NPC_SOARING_EAGLE = 24858, MAX_EAGLE_COUNT = 6, - - //SE_LOC_X_MAX = 400, - //SE_LOC_X_MIN = 335, - //SE_LOC_Y_MAX = 1435, - //SE_LOC_Y_MIN = 1370 }; struct MANGOS_DLL_DECL boss_akilzonAI : public ScriptedAI @@ -73,17 +67,15 @@ struct MANGOS_DLL_DECL boss_akilzonAI : public ScriptedAI uint32 m_uiStormTimer; uint32 m_uiSummonEagleTimer; uint32 m_uiBerserkTimer; - bool m_bIsBerserk; void Reset() { - m_uiStaticDisruptTimer = urand(7000, 14000); - m_uiCallLightTimer = urand(15000, 25000); - m_uiGustOfWindTimer = urand(20000, 30000); - m_uiStormTimer = 50000; - m_uiSummonEagleTimer = 65000; - m_uiBerserkTimer = MINUTE*8*IN_MILLISECONDS; - m_bIsBerserk = false; + m_uiStaticDisruptTimer = urand(7000, 14000); + m_uiCallLightTimer = urand(15000, 25000); + m_uiGustOfWindTimer = urand(20000, 30000); + m_uiStormTimer = 50000; + m_uiSummonEagleTimer = 65000; + m_uiBerserkTimer = 10*MINUTE*IN_MILLISECONDS; } void Aggro(Unit* pWho) @@ -118,17 +110,19 @@ struct MANGOS_DLL_DECL boss_akilzonAI : public ScriptedAI void JustSummoned(Creature* pSummoned) { if (pSummoned->GetEntry() == NPC_SOARING_EAGLE) + { + pSummoned->SetLevitate(true); pSummoned->SetInCombatWithZone(); + } } void DoSummonEagles() { - for(uint32 i = 0; i < MAX_EAGLE_COUNT; ++i) + for (uint32 i = 0; i < MAX_EAGLE_COUNT; ++i) { float fX, fY, fZ; - m_creature->GetRandomPoint(m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ()+15.0f, 30.0f, fX, fY, fZ); - - m_creature->SummonCreature(NPC_SOARING_EAGLE, fX, fY, fZ, m_creature->GetOrientation(), TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 1000); + m_creature->GetRandomPoint(m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ() + 15.0f, 30.0f, fX, fY, fZ); + m_creature->SummonCreature(NPC_SOARING_EAGLE, fX, fY, fZ, m_creature->GetOrientation(), TEMPSUMMON_DEAD_DESPAWN, 0); } } @@ -139,53 +133,70 @@ struct MANGOS_DLL_DECL boss_akilzonAI : public ScriptedAI if (m_uiCallLightTimer < uiDiff) { - m_creature->CastSpell(m_creature->getVictim(), SPELL_CALL_LIGHTNING, false); - m_uiCallLightTimer = urand(15000, 25000); - }else m_uiCallLightTimer -= uiDiff; + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_CALL_LIGHTNING) == CAST_OK) + m_uiCallLightTimer = urand(15000, 25000); + } + else + m_uiCallLightTimer -= uiDiff; if (m_uiStaticDisruptTimer < uiDiff) { if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1)) - m_creature->CastSpell(pTarget, SPELL_STATIC_DISRUPTION, false); - - m_uiStaticDisruptTimer = urand(7000, 14000); - }else m_uiStaticDisruptTimer -= uiDiff; + { + if (DoCastSpellIfCan(pTarget, SPELL_STATIC_DISRUPTION) == CAST_OK) + m_uiStaticDisruptTimer = urand(7000, 14000); + } + } + else + m_uiStaticDisruptTimer -= uiDiff; if (m_uiStormTimer < uiDiff) { if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) { - if (m_creature->IsNonMeleeSpellCasted(false)) - m_creature->InterruptNonMeleeSpells(false); - - DoScriptText(EMOTE_STORM, m_creature); - m_creature->CastSpell(pTarget, SPELL_ELECTRICAL_STORM, false); + if(DoCastSpellIfCan(pTarget, SPELL_ELECTRICAL_STORM) == CAST_OK) + { + DoScriptText(EMOTE_STORM, m_creature); + m_uiStormTimer = 55000; + } } - - m_uiStormTimer = 60000; - }else m_uiStormTimer -= uiDiff; + } + else + m_uiStormTimer -= uiDiff; if (m_uiGustOfWindTimer < uiDiff) { if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1)) - m_creature->CastSpell(pTarget, SPELL_GUST_OF_WIND, false); - - m_uiGustOfWindTimer = urand(20000, 30000); - }else m_uiGustOfWindTimer -= uiDiff; + { + if (DoCastSpellIfCan(pTarget, SPELL_GUST_OF_WIND) == CAST_OK) + m_uiGustOfWindTimer = urand(20000, 30000); + } + } + else + m_uiGustOfWindTimer -= uiDiff; if (m_uiSummonEagleTimer < uiDiff) { - DoScriptText(urand(0,1) ? SAY_SUMMON : SAY_SUMMON_ALT, m_creature); + DoScriptText(urand(0, 1) ? SAY_SUMMON : SAY_SUMMON_ALT, m_creature); DoSummonEagles(); m_uiSummonEagleTimer = 60000; - }else m_uiSummonEagleTimer -= uiDiff; + } + else + m_uiSummonEagleTimer -= uiDiff; - if (!m_bIsBerserk && m_uiBerserkTimer < uiDiff) + if (m_uiBerserkTimer) { - DoScriptText(SAY_ENRAGE, m_creature); - m_creature->CastSpell(m_creature, SPELL_BERSERK, true); - m_bIsBerserk = true; - }else m_uiBerserkTimer -= uiDiff; + if (m_uiBerserkTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_BERSERK) == CAST_OK) + { + DoScriptText(SAY_ENRAGE, m_creature); + m_uiBerserkTimer = 0; + } + } + else + m_uiBerserkTimer -= uiDiff; + } DoMeleeAttackIfReady(); } @@ -196,12 +207,6 @@ CreatureAI* GetAI_boss_akilzon(Creature* pCreature) return new boss_akilzonAI(pCreature); } -enum -{ - SPELL_EAGLE_SWOOP = 44732, - POINT_ID_RANDOM = 1 -}; - struct MANGOS_DLL_DECL mob_soaring_eagleAI : public ScriptedAI { mob_soaring_eagleAI(Creature* pCreature) : ScriptedAI(pCreature) @@ -215,15 +220,12 @@ struct MANGOS_DLL_DECL mob_soaring_eagleAI : public ScriptedAI uint32 m_uiEagleSwoopTimer; uint32 m_uiReturnTimer; bool m_bCanMoveToRandom; - bool m_bCanCast; void Reset() { - m_uiEagleSwoopTimer = urand(2000, 6000); - m_uiReturnTimer = 800; - m_bCanMoveToRandom = false; - m_bCanCast = true; - + m_uiEagleSwoopTimer = 0; + m_uiReturnTimer = 800; + m_bCanMoveToRandom = false; } void AttackStart(Unit* pWho) @@ -241,10 +243,10 @@ struct MANGOS_DLL_DECL mob_soaring_eagleAI : public ScriptedAI void MovementInform(uint32 uiType, uint32 uiPointId) { - if (uiType != POINT_MOTION_TYPE) + if (uiType != POINT_MOTION_TYPE || !uiPointId) return; - m_bCanCast = true; + m_uiEagleSwoopTimer = urand(2000, 6000); } void DoMoveToRandom() @@ -258,9 +260,7 @@ struct MANGOS_DLL_DECL mob_soaring_eagleAI : public ScriptedAI pAzkil->GetRandomPoint(pAzkil->GetPositionX(), pAzkil->GetPositionY(), pAzkil->GetPositionZ()+15.0f, 30.0f, fX, fY, fZ); m_creature->SetWalk(false); - m_creature->GetMotionMaster()->MovePoint(POINT_ID_RANDOM, fX, fY, fZ); - - m_bCanMoveToRandom = false; + m_creature->GetMotionMaster()->MovePoint(1, fX, fY, fZ); } } @@ -269,30 +269,33 @@ struct MANGOS_DLL_DECL mob_soaring_eagleAI : public ScriptedAI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - if (m_bCanMoveToRandom) + if (m_uiReturnTimer) { - if (m_uiReturnTimer < uiDiff) + if (m_uiReturnTimer <= uiDiff) { DoMoveToRandom(); - m_uiReturnTimer = 800; - }else m_uiReturnTimer -= uiDiff; + m_uiReturnTimer = 0; + } + else + m_uiReturnTimer -= uiDiff; } - if (!m_bCanCast) - return; - - if (m_uiEagleSwoopTimer < uiDiff) + if (m_uiEagleSwoopTimer) { - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) + if (m_uiEagleSwoopTimer <= uiDiff) { - DoCastSpellIfCan(pTarget,SPELL_EAGLE_SWOOP); - - m_bCanMoveToRandom = true; - m_bCanCast = false; + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, SPELL_EAGLE_SWOOP) == CAST_OK) + { + m_uiEagleSwoopTimer = 0; + m_uiReturnTimer = 1000; + } + } } - - m_uiEagleSwoopTimer = urand(4000, 6000); - }else m_uiEagleSwoopTimer -= uiDiff; + else + m_uiEagleSwoopTimer -= uiDiff; + } } }; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index aa2ec149e..a07abc5fb 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2664" + #define SD2_REVISION_NR "2665" #endif // __SD2_REVISION_NR_H__ From 406d7c641f57d274a0b88bfab4b9d0b6390b42b1 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Wed, 15 Aug 2012 18:33:07 +0300 Subject: [PATCH 0654/1172] [2666] Cleanup and improve script for Halazzi - Zul'aman This will remove the old transformation hacks. --- .../eastern_kingdoms/zulaman/boss_halazzi.cpp | 261 ++++++++---------- .../zulaman/instance_zulaman.cpp | 1 - scripts/eastern_kingdoms/zulaman/zulaman.h | 2 +- sd2_revision_nr.h | 2 +- 4 files changed, 121 insertions(+), 145 deletions(-) diff --git a/scripts/eastern_kingdoms/zulaman/boss_halazzi.cpp b/scripts/eastern_kingdoms/zulaman/boss_halazzi.cpp index 7922a35c8..c4a667ebe 100644 --- a/scripts/eastern_kingdoms/zulaman/boss_halazzi.cpp +++ b/scripts/eastern_kingdoms/zulaman/boss_halazzi.cpp @@ -16,14 +16,13 @@ /* ScriptData SDName: Boss_Halazzi -SD%Complete: 70 -SDComment: Details and timers need check. +SD%Complete: 90 +SDComment: A few details and timers need check. SDCategory: Zul'Aman EndScriptData */ #include "precompiled.h" #include "zulaman.h" -#include "ObjectMgr.h" enum { @@ -39,28 +38,33 @@ enum SAY_EVENT1 = -1568043, SAY_EVENT2 = -1568044, - SPELL_DUAL_WIELD = 42459, - SPELL_SABER_LASH = 43267, - SPELL_FRENZY = 43139, - SPELL_FLAMESHOCK = 43303, - SPELL_EARTHSHOCK = 43305, + // generic spells SPELL_BERSERK = 45078, + SPELL_TRANSFORM_TO_ORIGINAL = 43311, + //SPELL_DUAL_WIELD = 42459, // spell not confirmed + //SPELL_TRANSFIGURE = 44054, // purpose unk - //SPELL_TRANSFORM_TO_ORIGINAL = 43311, - - //SPELL_TRANSFIGURE = 44054, + // Phase single spells + SPELL_SABER_LASH = 43267, + SPELL_FRENZY = 43139, - SPELL_TRANSFIGURE_TO_TROLL = 43142, - //SPELL_TRANSFIGURE_TO_TROLL_TRIGGERED = 43573, + // Phase switch spells + SPELL_HALAZZI_TRANSFORM_SUMMON = 43143, // summons 24143 + SPELL_TRANSFIGURE_TO_TROLL = 43142, // triggers 43573 SPELL_TRANSFORM_TO_LYNX_75 = 43145, SPELL_TRANSFORM_TO_LYNX_50 = 43271, SPELL_TRANSFORM_TO_LYNX_25 = 43272, + SPELL_HALAZZI_TRANSFORM_DUMMY = 43615, + //SPELL_HALAZZI_TRANSFORM_VISUAL= 43293, - SPELL_SUMMON_LYNX = 43143, - SPELL_SUMMON_TOTEM = 43302, + // Phase spirits spells + SPELL_FLAMESHOCK = 43303, + SPELL_EARTHSHOCK = 43305, + SPELL_LIGHTNING_TOTEM = 43302, // summons 24224 - NPC_TOTEM = 24224 + NPC_HALAZZI_TROLL = 24144, // dummy creature - used to update stats + NPC_SPIRIT_LYNX = 24143, }; enum HalazziPhase @@ -80,41 +84,42 @@ struct MANGOS_DLL_DECL boss_halazziAI : public ScriptedAI ScriptedInstance* m_pInstance; - uint32 m_uiPhase; + HalazziPhase m_uiPhase; + uint32 m_uiPhaseCounter; uint32 m_uiFrenzyTimer; uint32 m_uiSaberLashTimer; uint32 m_uiShockTimer; uint32 m_uiTotemTimer; - uint32 m_uiCheckTimer; uint32 m_uiBerserkTimer; - bool m_bIsBerserk; + + ObjectGuid m_spiritLynxGuid; void Reset() { - m_uiPhase = PHASE_SINGLE; // reset phase - m_uiPhaseCounter = 3; - - m_uiCheckTimer = IN_MILLISECONDS; - m_uiFrenzyTimer = 16*IN_MILLISECONDS; - m_uiSaberLashTimer = 20*IN_MILLISECONDS; - m_uiShockTimer = 10*IN_MILLISECONDS; - m_uiTotemTimer = 12*IN_MILLISECONDS; - m_uiBerserkTimer = 10*MINUTE*IN_MILLISECONDS; - m_bIsBerserk = false; + m_uiPhase = PHASE_SINGLE; + m_uiPhaseCounter = 3; + + m_uiFrenzyTimer = 16000; + m_uiSaberLashTimer = 20000; + m_uiShockTimer = 10000; + m_uiTotemTimer = 12000; + m_uiBerserkTimer = 10*MINUTE*IN_MILLISECONDS; + } - m_creature->SetMaxHealth(m_creature->GetCreatureInfo()->maxhealth); + void EnterEvadeMode() + { + // Transform back on evade + if (DoCastSpellIfCan(m_creature, SPELL_TRANSFORM_TO_ORIGINAL) == CAST_OK) + m_creature->UpdateEntry(NPC_HALAZZI); - if (m_pInstance) - { - if (Creature* pSpiritLynx = m_pInstance->GetSingleCreatureFromStorage(NPC_SPIRIT_LYNX)) - pSpiritLynx->ForcedDespawn(); - } + ScriptedAI::EnterEvadeMode(); } void JustReachedHome() { - m_pInstance->SetData(TYPE_HALAZZI, FAIL); + if (m_pInstance) + m_pInstance->SetData(TYPE_HALAZZI, FAIL); } void Aggro(Unit* pWho) @@ -144,85 +149,43 @@ struct MANGOS_DLL_DECL boss_halazziAI : public ScriptedAI void JustSummoned(Creature* pSummoned) { if (pSummoned->GetEntry() == NPC_SPIRIT_LYNX) - pSummoned->SetInCombatWithZone(); - } - - void DoUpdateStats(const CreatureInfo* pInfo) - { - m_creature->SetMaxHealth(pInfo->maxhealth); - - if (m_uiPhase == PHASE_SINGLE) { - m_creature->SetHealth(m_creature->GetMaxHealth()/4*m_uiPhaseCounter); - --m_uiPhaseCounter; + m_spiritLynxGuid = pSummoned->GetObjectGuid(); + pSummoned->SetInCombatWithZone(); + pSummoned->CastSpell(m_creature, SPELL_HALAZZI_TRANSFORM_DUMMY, true); } } - void SpellHit(Unit* pCaster, const SpellEntry* pSpell) + // Wrapper to handle the phase transform + void DoReuniteSpirits() { - if (pSpell->EffectApplyAuraName[0] != SPELL_AURA_TRANSFORM) - return; + uint32 uiSpellId = 0; - // possibly hack and health should be set by Aura::HandleAuraTransform() - if (const CreatureInfo* pInfo = GetCreatureTemplateStore(pSpell->EffectMiscValue[0])) - DoUpdateStats(pInfo); - - if (m_uiPhase == PHASE_TOTEM) - DoCastSpellIfCan(m_creature, SPELL_SUMMON_LYNX); - } - - void PhaseChange() - { - if (m_uiPhase == PHASE_SINGLE) + // Each health level has it's own spell - but they all do the same thing + switch(m_uiPhaseCounter) { - if (m_creature->GetHealthPercent() <= float(25*m_uiPhaseCounter)) - { - if (!m_uiPhaseCounter) - { - // final phase - m_uiPhase = PHASE_FINAL; - m_uiFrenzyTimer = 16*IN_MILLISECONDS; - m_uiSaberLashTimer = 20*IN_MILLISECONDS; - } - else - { - m_uiPhase = PHASE_TOTEM; - m_uiShockTimer = 10*IN_MILLISECONDS; - m_uiTotemTimer = 12*IN_MILLISECONDS; - - DoScriptText(SAY_SPLIT, m_creature); - m_creature->CastSpell(m_creature, SPELL_TRANSFIGURE_TO_TROLL, false); - } - } + case 3: uiSpellId = SPELL_TRANSFORM_TO_LYNX_75; break; + case 2: uiSpellId = SPELL_TRANSFORM_TO_LYNX_50; break; + case 1: uiSpellId = SPELL_TRANSFORM_TO_LYNX_25; break; } - else - { - Creature* pSpiritLynx = m_pInstance->GetSingleCreatureFromStorage(NPC_SPIRIT_LYNX); - - if (m_creature->GetHealthPercent() < 10.0f || - (pSpiritLynx && pSpiritLynx->GetHealthPercent() < 10.0f)) - { - m_uiPhase = PHASE_SINGLE; - - DoScriptText(SAY_MERGE, m_creature); - - uint32 uiSpellId = 0; - switch(m_uiPhaseCounter) - { - case 3: uiSpellId = SPELL_TRANSFORM_TO_LYNX_75; break; - case 2: uiSpellId = SPELL_TRANSFORM_TO_LYNX_50; break; - case 1: uiSpellId = SPELL_TRANSFORM_TO_LYNX_25; break; - } + if (DoCastSpellIfCan(m_creature, uiSpellId) == CAST_OK) + { + DoScriptText(SAY_MERGE, m_creature); + // Update stats back to the original Halazzi + m_creature->UpdateEntry(NPC_HALAZZI); - m_creature->CastSpell(m_creature, uiSpellId, false); + // Despawn the Lynx + if (Creature* pLynx = m_creature->GetMap()->GetCreature(m_spiritLynxGuid)) + pLynx->ForcedDespawn(); - if (pSpiritLynx) - pSpiritLynx->ForcedDespawn(); + // Set the proper health level - workaround for missing server side spell 43538 + m_creature->SetHealth(m_creature->GetMaxHealth()/4*m_uiPhaseCounter); + --m_uiPhaseCounter; - m_uiFrenzyTimer = 16*IN_MILLISECONDS; - m_uiSaberLashTimer = 20*IN_MILLISECONDS; - } + m_uiPhase = m_uiPhaseCounter > 0 ? PHASE_SINGLE : PHASE_FINAL; + m_uiFrenzyTimer = 16000; + m_uiSaberLashTimer = 20000; } } @@ -231,80 +194,85 @@ struct MANGOS_DLL_DECL boss_halazziAI : public ScriptedAI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - if (!m_bIsBerserk) + if (m_uiBerserkTimer) { - if (m_uiBerserkTimer < uiDiff) + if (m_uiBerserkTimer <= uiDiff) { - DoScriptText(SAY_BERSERK, m_creature); - DoCastSpellIfCan(m_creature, SPELL_BERSERK, CAST_TRIGGERED); - m_bIsBerserk = true; + if (DoCastSpellIfCan(m_creature, SPELL_BERSERK) == CAST_OK) + { + DoScriptText(SAY_BERSERK, m_creature); + m_uiBerserkTimer = 0; + } } else m_uiBerserkTimer -= uiDiff; } - if (m_uiPhase != PHASE_FINAL) + // Abilities used only in the single or final phase + if (m_uiPhase == PHASE_SINGLE || m_uiPhase == PHASE_FINAL) { - if (m_uiCheckTimer < uiDiff) + // Split boss at 75%, 50% and 25% + if (m_creature->GetHealthPercent() <= float(25*m_uiPhaseCounter)) { - if (m_pInstance) - PhaseChange(); - else - m_uiPhase = PHASE_FINAL; + if (DoCastSpellIfCan(m_creature, SPELL_TRANSFIGURE_TO_TROLL) == CAST_OK) + { + DoCastSpellIfCan(m_creature, SPELL_HALAZZI_TRANSFORM_SUMMON, CAST_TRIGGERED); + DoScriptText(SAY_SPLIT, m_creature); + m_creature->UpdateEntry(NPC_HALAZZI_TROLL); - m_uiCheckTimer = IN_MILLISECONDS; + m_uiPhase = PHASE_TOTEM; + m_uiShockTimer = 10000; + m_uiTotemTimer = 12000; + } } - else - m_uiCheckTimer -= uiDiff; - } - if (m_uiPhase == PHASE_FINAL || m_uiPhase == PHASE_SINGLE) - { if (m_uiFrenzyTimer < uiDiff) { - DoCastSpellIfCan(m_creature, SPELL_FRENZY); - m_uiFrenzyTimer = 16*IN_MILLISECONDS; + if (DoCastSpellIfCan(m_creature, SPELL_FRENZY) == CAST_OK) + m_uiFrenzyTimer = 16000; } else m_uiFrenzyTimer -= uiDiff; if (m_uiSaberLashTimer < uiDiff) { - DoScriptText(urand(0, 1) ? SAY_SABERLASH1 : SAY_SABERLASH2, m_creature); - - DoCastSpellIfCan(m_creature->getVictim(), SPELL_SABER_LASH); - m_uiSaberLashTimer = 20*IN_MILLISECONDS; + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_SABER_LASH) == CAST_OK) + { + DoScriptText(urand(0, 1) ? SAY_SABERLASH1 : SAY_SABERLASH2, m_creature); + m_uiSaberLashTimer = 20000; + } } else m_uiSaberLashTimer -= uiDiff; } - if (m_uiPhase == PHASE_FINAL || m_uiPhase == PHASE_TOTEM) + // Abilities used during the split phase or when the boss is below 25% health + if (m_uiPhase == PHASE_TOTEM || m_uiPhase == PHASE_FINAL) { if (m_uiTotemTimer < uiDiff) { - DoCastSpellIfCan(m_creature, SPELL_SUMMON_TOTEM); - m_uiTotemTimer = 20*IN_MILLISECONDS; + if (DoCastSpellIfCan(m_creature, SPELL_LIGHTNING_TOTEM) == CAST_OK) + m_uiTotemTimer = 20000; } else m_uiTotemTimer -= uiDiff; if (m_uiShockTimer < uiDiff) { - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) { - if (pTarget->IsNonMeleeSpellCasted(false)) - DoCastSpellIfCan(pTarget, SPELL_EARTHSHOCK); - else - DoCastSpellIfCan(pTarget, SPELL_FLAMESHOCK); - - m_uiShockTimer = urand(10000, 14000); + if (DoCastSpellIfCan(pTarget, urand(0, 1) ? SPELL_EARTHSHOCK : SPELL_FLAMESHOCK) == CAST_OK) + m_uiShockTimer = urand(10000, 14000); } } else m_uiShockTimer -= uiDiff; } + // Transform back from Totem phase + if (m_uiPhase == PHASE_TOTEM && m_creature->GetHealthPercent() < 20.0f) + DoReuniteSpirits(); + DoMeleeAttackIfReady(); } }; @@ -332,16 +300,13 @@ struct MANGOS_DLL_DECL boss_spirit_lynxAI : public ScriptedAI uint32 m_uiFrenzyTimer; uint32 m_uiShredArmorTimer; + bool m_bHasUnited; void Reset() { - m_uiFrenzyTimer = urand(10000, 20000); //first frenzy after 10-20 seconds + m_uiFrenzyTimer = urand(10000, 20000); //first frenzy after 10-20 seconds m_uiShredArmorTimer = 4000; - } - - void Aggro(Unit* pWho) - { - m_creature->SetInCombatWithZone(); + m_bHasUnited = false; } void KilledUnit(Unit* pVictim) @@ -374,6 +339,18 @@ struct MANGOS_DLL_DECL boss_spirit_lynxAI : public ScriptedAI else m_uiShredArmorTimer -= uiDiff; + // Unite spirits at 20% health + // Note: maybe there is some spell related to this - needs research + if (!m_bHasUnited && m_creature->GetHealthPercent() < 20.0f && m_pInstance) + { + if (Creature* pHalazzi = m_pInstance->GetSingleCreatureFromStorage(NPC_HALAZZI)) + { + if (boss_halazziAI* pBossAI = dynamic_cast(pHalazzi->AI())) + pBossAI->DoReuniteSpirits(); + } + m_bHasUnited = true; + } + DoMeleeAttackIfReady(); } }; diff --git a/scripts/eastern_kingdoms/zulaman/instance_zulaman.cpp b/scripts/eastern_kingdoms/zulaman/instance_zulaman.cpp index da2b5685e..48155921f 100644 --- a/scripts/eastern_kingdoms/zulaman/instance_zulaman.cpp +++ b/scripts/eastern_kingdoms/zulaman/instance_zulaman.cpp @@ -63,7 +63,6 @@ void instance_zulaman::OnCreatureCreate(Creature* pCreature) case NPC_NALORAKK: case NPC_MALACRASS: case NPC_HARRISON: - case NPC_SPIRIT_LYNX: case NPC_BEAR_SPIRIT: case NPC_EAGLE_SPIRIT: case NPC_LYNX_SPIRIT: diff --git a/scripts/eastern_kingdoms/zulaman/zulaman.h b/scripts/eastern_kingdoms/zulaman/zulaman.h index beb0cafda..20933d0ec 100644 --- a/scripts/eastern_kingdoms/zulaman/zulaman.h +++ b/scripts/eastern_kingdoms/zulaman/zulaman.h @@ -73,7 +73,6 @@ enum InstanceZA NPC_KORAGG = 24247, NPC_EGG = 23817, - NPC_SPIRIT_LYNX = 24143, NPC_HARRISON = 24358, // Time Run Event NPCs @@ -87,6 +86,7 @@ enum InstanceZA NPC_ASHIL_CORPSE = 24441, NPC_HARKOR_CORPSE = 24443, + // Zul'jin event spirits NPC_BEAR_SPIRIT = 23878, // They should all have aura 42466 NPC_EAGLE_SPIRIT = 23880, NPC_LYNX_SPIRIT = 23877, diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index a07abc5fb..42357d3c3 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2665" + #define SD2_REVISION_NR "2666" #endif // __SD2_REVISION_NR_H__ From 5bb6e4a9f41d1d129645e6118850b6c345ae5239 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Wed, 15 Aug 2012 19:07:49 +0300 Subject: [PATCH 0655/1172] [2667] Fix mistakes from the previous commit --- .../eastern_kingdoms/zulaman/boss_halazzi.cpp | 30 ++++++++++++++----- sd2_revision_nr.h | 2 +- 2 files changed, 23 insertions(+), 9 deletions(-) diff --git a/scripts/eastern_kingdoms/zulaman/boss_halazzi.cpp b/scripts/eastern_kingdoms/zulaman/boss_halazzi.cpp index c4a667ebe..e58a69cb8 100644 --- a/scripts/eastern_kingdoms/zulaman/boss_halazzi.cpp +++ b/scripts/eastern_kingdoms/zulaman/boss_halazzi.cpp @@ -51,6 +51,7 @@ enum // Phase switch spells SPELL_HALAZZI_TRANSFORM_SUMMON = 43143, // summons 24143 SPELL_TRANSFIGURE_TO_TROLL = 43142, // triggers 43573 + SPELL_TRANSFIGURE_TRANSFORM = 43573, SPELL_TRANSFORM_TO_LYNX_75 = 43145, SPELL_TRANSFORM_TO_LYNX_50 = 43271, @@ -93,6 +94,8 @@ struct MANGOS_DLL_DECL boss_halazziAI : public ScriptedAI uint32 m_uiTotemTimer; uint32 m_uiBerserkTimer; + bool m_bHasTransformed; + ObjectGuid m_spiritLynxGuid; void Reset() @@ -105,6 +108,8 @@ struct MANGOS_DLL_DECL boss_halazziAI : public ScriptedAI m_uiShockTimer = 10000; m_uiTotemTimer = 12000; m_uiBerserkTimer = 10*MINUTE*IN_MILLISECONDS; + + m_bHasTransformed = false; } void EnterEvadeMode() @@ -156,6 +161,19 @@ struct MANGOS_DLL_DECL boss_halazziAI : public ScriptedAI } } + void SpellHit(Unit* pCaster, const SpellEntry* pSpell) + { + if (pSpell->Id == SPELL_TRANSFIGURE_TRANSFORM) + { + DoCastSpellIfCan(m_creature, SPELL_HALAZZI_TRANSFORM_SUMMON, CAST_TRIGGERED); + m_creature->UpdateEntry(NPC_HALAZZI_TROLL); + + m_uiPhase = PHASE_TOTEM; + m_uiShockTimer = 10000; + m_uiTotemTimer = 12000; + } + } + // Wrapper to handle the phase transform void DoReuniteSpirits() { @@ -186,6 +204,7 @@ struct MANGOS_DLL_DECL boss_halazziAI : public ScriptedAI m_uiPhase = m_uiPhaseCounter > 0 ? PHASE_SINGLE : PHASE_FINAL; m_uiFrenzyTimer = 16000; m_uiSaberLashTimer = 20000; + m_bHasTransformed = false; } } @@ -212,17 +231,12 @@ struct MANGOS_DLL_DECL boss_halazziAI : public ScriptedAI if (m_uiPhase == PHASE_SINGLE || m_uiPhase == PHASE_FINAL) { // Split boss at 75%, 50% and 25% - if (m_creature->GetHealthPercent() <= float(25*m_uiPhaseCounter)) + if (!m_bHasTransformed && m_creature->GetHealthPercent() <= float(25*m_uiPhaseCounter)) { if (DoCastSpellIfCan(m_creature, SPELL_TRANSFIGURE_TO_TROLL) == CAST_OK) { - DoCastSpellIfCan(m_creature, SPELL_HALAZZI_TRANSFORM_SUMMON, CAST_TRIGGERED); DoScriptText(SAY_SPLIT, m_creature); - m_creature->UpdateEntry(NPC_HALAZZI_TROLL); - - m_uiPhase = PHASE_TOTEM; - m_uiShockTimer = 10000; - m_uiTotemTimer = 12000; + m_bHasTransformed = true; } } @@ -341,7 +355,7 @@ struct MANGOS_DLL_DECL boss_spirit_lynxAI : public ScriptedAI // Unite spirits at 20% health // Note: maybe there is some spell related to this - needs research - if (!m_bHasUnited && m_creature->GetHealthPercent() < 20.0f && m_pInstance) + if (!m_bHasUnited && m_creature->GetHealthPercent() < 10.0f && m_pInstance) { if (Creature* pHalazzi = m_pInstance->GetSingleCreatureFromStorage(NPC_HALAZZI)) { diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 42357d3c3..ce19c7fe5 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2666" + #define SD2_REVISION_NR "2667" #endif // __SD2_REVISION_NR_H__ From 632aa95ef1c6a737d5793b5488cbbc276d7eef80 Mon Sep 17 00:00:00 2001 From: michalpolko Date: Thu, 16 Aug 2012 22:36:28 +0200 Subject: [PATCH 0656/1172] [2668] Implemented intro's in Sindragosa encounter and her sub-bosses. Movements based on some videos found in web, might not be fully blizzlike. --- .../icecrown_citadel/boss_sindragosa.cpp | 184 ++++++++++++++++-- .../icecrown_citadel/icecrown_citadel.h | 5 +- .../instance_icecrown_citadel.cpp | 39 +++- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 3 +- sql/updates/r2668_mangos.sql | 2 + 6 files changed, 208 insertions(+), 27 deletions(-) create mode 100644 sql/updates/r2668_mangos.sql diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp index ca2548796..8a2bbb1dc 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp @@ -66,7 +66,7 @@ enum // Spinestalker SPELL_SPINESTALKER_BELLOWING_ROAR = 36922, SPELL_SPINESTALKER_CLEAVE = 40505, - SPELL_SPINESTALKER_TAIL_SWEEP = 71369, + SPELL_SPINESTALKER_TAIL_SWEEP = 71369 }; enum SindragosaPhase @@ -77,7 +77,7 @@ enum SindragosaPhase SINDRAGOSA_PHASE_FLYING_TO_AIR = 3, SINDRAGOSA_PHASE_AIR = 4, SINDRAGOSA_PHASE_FLYING_TO_GROUND = 5, - SINDRAGOSA_PHASE_THREE = 6, + SINDRAGOSA_PHASE_THREE = 6 }; enum SindragosaPoint @@ -85,28 +85,43 @@ enum SindragosaPoint SINDRAGOSA_POINT_GROUND_CENTER = 0, SINDRAGOSA_POINT_AIR_CENTER = 1, SINDRAGOSA_POINT_AIR_PHASE_2 = 2, + SINDRAGOSA_POINT_AIR_EAST = 3, + SINDRAGOSA_POINT_AIR_WEST = 4 }; enum RimefangPhase { RIMEFANG_PHASE_GROUND = 0, RIMEFANG_PHASE_FLYING = 1, - RIMEFANG_PHASE_AIR = 2, + RIMEFANG_PHASE_AIR = 2 }; enum RimefangPoint { RIMEFANG_POINT_GROUND = 0, RIMEFANG_POINT_AIR = 1, + RIMEFANG_POINT_INITIAL_LAND_AIR = 2, + RIMEFANG_POINT_INITIAL_LAND = 3 }; -static const float SindragosaPosition[6][3] = +enum SpinestalkerPoint { - {4407.44f, 2484.37f, 203.37f}, // center, ground - {4407.44f, 2484.37f, 235.37f}, // center, air - {4470.00f, 2484.37f, 235.37f}, // Sindragosa air phase point - {4414.32f, 2456.94f, 203.37f}, // Rimefang landing point? - {4414.32f, 2512.73f, 203.37f}, // Spinestalker landing point? + SPINESTALKER_POINT_INITIAL_LAND_AIR = 0, + SPINESTALKER_POINT_INITIAL_LAND = 1 +}; + +static const float SindragosaPosition[10][3] = +{ + {4407.44f, 2484.37f, 203.37f}, // 0 center, ground + {4407.44f, 2484.37f, 235.37f}, // 1 center, air + {4470.00f, 2484.37f, 235.37f}, // 2 Sindragosa air phase point + {4414.32f, 2456.94f, 203.37f}, // 3 Rimefang landing point + {4414.32f, 2456.94f, 228.37f}, // 4 Rimefang above landing point + {4414.32f, 2512.73f, 203.37f}, // 5 Spinestalker landing point + {4414.32f, 2512.73f, 228.37f}, // 6 Spinestalker above landing point + {4505.00f, 2484.37f, 235.37f}, // 7 Sindragosa spawn point + {4505.00f, 2444.37f, 235.37f}, // 8 Sindragosa east flying point + {4505.00f, 2524.37f, 235.37f}, // 9 Sindragosa west flying point }; struct MANGOS_DLL_DECL boss_sindragosaAI : public ScriptedAI @@ -161,6 +176,8 @@ struct MANGOS_DLL_DECL boss_sindragosaAI : public ScriptedAI { if (m_pInstance) m_pInstance->SetData(TYPE_SINDRAGOSA, FAIL); + + m_creature->GetMotionMaster()->MovePoint(SINDRAGOSA_POINT_AIR_EAST, SindragosaPosition[8][0], SindragosaPosition[8][1], SindragosaPosition[8][2], false); } void KilledUnit(Unit* pVictim) @@ -178,6 +195,7 @@ struct MANGOS_DLL_DECL boss_sindragosaAI : public ScriptedAI m_uiPhase = SINDRAGOSA_PHASE_AGGRO; SetCombatMovement(false); m_creature->SetWalk(true); + m_creature->GetMotionMaster()->Clear(); m_creature->GetMotionMaster()->MovePoint(SINDRAGOSA_POINT_AIR_CENTER, SindragosaPosition[1][0], SindragosaPosition[1][1], SindragosaPosition[1][2], false); } } @@ -201,7 +219,15 @@ struct MANGOS_DLL_DECL boss_sindragosaAI : public ScriptedAI if (uiMovementType != POINT_MOTION_TYPE) return; - if (uiPointId == SINDRAGOSA_POINT_GROUND_CENTER) + if (uiPointId == SINDRAGOSA_POINT_AIR_EAST) + { + m_creature->GetMotionMaster()->MovePoint(SINDRAGOSA_POINT_AIR_WEST, SindragosaPosition[9][0], SindragosaPosition[9][1], SindragosaPosition[9][2], false); + } + else if (uiPointId == SINDRAGOSA_POINT_AIR_WEST) + { + m_creature->GetMotionMaster()->MovePoint(SINDRAGOSA_POINT_AIR_EAST, SindragosaPosition[8][0], SindragosaPosition[8][1], SindragosaPosition[8][2], false); + } + else if (uiPointId == SINDRAGOSA_POINT_GROUND_CENTER) { // fly up if (m_uiPhase == SINDRAGOSA_PHASE_GROUND) @@ -399,6 +425,9 @@ struct MANGOS_DLL_DECL npc_rimefang_iccAI : public ScriptedAI if (m_pInstance && m_pInstance->Is25ManDifficulty()) m_uiIcyBlastMaxCount = 6; + m_bHasLanded = false; + m_bIsReady = false; + Reset(); } @@ -410,6 +439,8 @@ struct MANGOS_DLL_DECL npc_rimefang_iccAI : public ScriptedAI uint32 m_uiIcyBlastCounter; uint32 m_uiIcyBlastMaxCount; uint32 m_uiIcyBlastTimer; + bool m_bHasLanded; // landed after player entered areatrigger + bool m_bIsReady; void Reset() { @@ -433,20 +464,53 @@ struct MANGOS_DLL_DECL npc_rimefang_iccAI : public ScriptedAI m_creature->SetWalk(bIsFlying); } - void EnterEvadeMode() + void Aggro(Unit *pWho) { - SetFlying(true); - ScriptedAI::EnterEvadeMode(); + DoCastSpellIfCan(m_creature, SPELL_RIMEFANG_FROST_AURA, CAST_TRIGGERED); } - void Aggro(Unit *pWho) + void AttackStart(Unit *pWho) { - DoCastSpellIfCan(m_creature, SPELL_RIMEFANG_FROST_AURA, CAST_TRIGGERED); + if (!m_bIsReady) + { + if (!m_bHasLanded) + { + m_bHasLanded = true; + m_creature->GetMotionMaster()->MovePoint(RIMEFANG_POINT_INITIAL_LAND_AIR, SindragosaPosition[4][0], SindragosaPosition[4][1], SindragosaPosition[4][2], false); + } + + return; + } + + ScriptedAI::AttackStart(pWho); } void JustDied(Unit *pKiller) { - // TODO: Sindragosa invisible spawn or summon? + if (!m_pInstance) + return; + + Creature *pSpinestalker = m_pInstance->GetSingleCreatureFromStorage(NPC_SPINESTALKER); + if (!pSpinestalker || !pSpinestalker->isAlive()) + { + if (Creature *pSindragosa = m_creature->SummonCreature(NPC_SINDRAGOSA, SindragosaPosition[7][0], SindragosaPosition[7][1], SindragosaPosition[7][2], 0.0f, TEMPSUMMON_MANUAL_DESPAWN, 0)) + pSindragosa->SetInCombatWithZone(); + } + } + + // evade to point on platform + void EnterEvadeMode() + { + m_creature->RemoveAllAuras(); + m_creature->DeleteThreatList(); + m_creature->CombatStop(true); + + if (m_creature->isAlive()) + m_creature->GetMotionMaster()->MovePoint(RIMEFANG_POINT_INITIAL_LAND, SindragosaPosition[3][0], SindragosaPosition[3][1], SindragosaPosition[3][2], false); + + m_creature->SetLootRecipient(NULL); + + Reset(); } void MovementInform(uint32 uiMovementType, uint32 uiPointId) @@ -454,7 +518,18 @@ struct MANGOS_DLL_DECL npc_rimefang_iccAI : public ScriptedAI if (uiMovementType != POINT_MOTION_TYPE) return; - if (uiPointId == RIMEFANG_POINT_GROUND) + if (uiPointId == RIMEFANG_POINT_INITIAL_LAND_AIR) + { + m_creature->GetMotionMaster()->MovePoint(RIMEFANG_POINT_INITIAL_LAND, SindragosaPosition[3][0], SindragosaPosition[3][1], SindragosaPosition[3][2], false); + } + else if (uiPointId == RIMEFANG_POINT_INITIAL_LAND) + { + m_creature->GetMotionMaster()->MoveIdle(); + m_creature->SetFacingTo(M_PI_F); + m_bIsReady = true; + SetFlying(false); + } + else if (uiPointId == RIMEFANG_POINT_GROUND) { m_uiPhase = RIMEFANG_PHASE_GROUND; SetFlying(false); @@ -492,7 +567,6 @@ struct MANGOS_DLL_DECL npc_rimefang_iccAI : public ScriptedAI m_uiPhase = RIMEFANG_PHASE_FLYING; SetFlying(true); SetCombatMovement(false); - m_creature->GetMotionMaster()->Clear(); m_creature->GetMotionMaster()->MovePoint(RIMEFANG_POINT_AIR, m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ() + 20.0f, false); return; } @@ -519,7 +593,6 @@ struct MANGOS_DLL_DECL npc_rimefang_iccAI : public ScriptedAI m_uiIcyBlastCounter = 0; m_uiIcyBlastTimer = 0; m_uiPhase = RIMEFANG_PHASE_FLYING; - m_creature->GetMotionMaster()->Clear(); m_creature->GetMotionMaster()->MovePoint(RIMEFANG_POINT_GROUND, m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ() - 20.0f, false); } } @@ -542,6 +615,8 @@ struct MANGOS_DLL_DECL npc_spinestalker_iccAI : public ScriptedAI npc_spinestalker_iccAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (instance_icecrown_citadel*)pCreature->GetInstanceData(); + m_bHasLanded = false; + m_bIsReady = false; Reset(); } @@ -550,6 +625,8 @@ struct MANGOS_DLL_DECL npc_spinestalker_iccAI : public ScriptedAI uint32 m_uiBellowingRoarTimer; uint32 m_uiTailSweepTimer; uint32 m_uiCleaveTimer; + bool m_bHasLanded; + bool m_bIsReady; void Reset() { @@ -558,9 +635,76 @@ struct MANGOS_DLL_DECL npc_spinestalker_iccAI : public ScriptedAI m_uiCleaveTimer = urand(5000, 8000); } + void SetFlying(bool bIsFlying) + { + if (bIsFlying) + m_creature->SetByteFlag(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_UNK_2); + else + m_creature->RemoveByteFlag(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_UNK_2); + + m_creature->SetLevitate(bIsFlying); + m_creature->SetWalk(bIsFlying); + } + void JustDied(Unit *pKiller) { - // TODO: Sindragosa invisible spawn or summon? + if (!m_pInstance) + return; + + Creature *pRimefang = m_pInstance->GetSingleCreatureFromStorage(NPC_RIMEFANG); + if (!pRimefang || !pRimefang->isAlive()) + { + if (Creature *pSindragosa = m_creature->SummonCreature(NPC_SINDRAGOSA, SindragosaPosition[7][0], SindragosaPosition[7][1], SindragosaPosition[7][2], 0.0f, TEMPSUMMON_MANUAL_DESPAWN, 0)) + pSindragosa->SetInCombatWithZone(); + } + } + + void AttackStart(Unit *pWho) + { + if (!m_bIsReady) + { + if (!m_bHasLanded) + { + m_bHasLanded = true; + m_creature->GetMotionMaster()->MovePoint(SPINESTALKER_POINT_INITIAL_LAND_AIR, SindragosaPosition[6][0], SindragosaPosition[6][1], SindragosaPosition[6][2], false); + } + + return; + } + + ScriptedAI::AttackStart(pWho); + } + + void EnterEvadeMode() + { + m_creature->RemoveAllAuras(); + m_creature->DeleteThreatList(); + m_creature->CombatStop(true); + + if (m_creature->isAlive()) + m_creature->GetMotionMaster()->MovePoint(SPINESTALKER_POINT_INITIAL_LAND, SindragosaPosition[5][0], SindragosaPosition[5][1], SindragosaPosition[5][2]); + + m_creature->SetLootRecipient(NULL); + + Reset(); + } + + void MovementInform(uint32 uiMovementType, uint32 uiPointId) + { + if (uiMovementType != POINT_MOTION_TYPE) + return; + + if (uiPointId == SPINESTALKER_POINT_INITIAL_LAND_AIR) + { + m_creature->GetMotionMaster()->MovePoint(SPINESTALKER_POINT_INITIAL_LAND, SindragosaPosition[5][0], SindragosaPosition[5][1], SindragosaPosition[5][2], false); + } + else if (uiPointId == SPINESTALKER_POINT_INITIAL_LAND) + { + m_creature->GetMotionMaster()->MoveIdle(); + m_creature->SetFacingTo(M_PI_F); + m_bIsReady = true; + SetFlying(false); + } } void UpdateAI(const uint32 uiDiff) diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_citadel.h b/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_citadel.h index 971cc3656..6973aa391 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_citadel.h +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_citadel.h @@ -138,6 +138,7 @@ enum // Area triggers AREATRIGGER_MARROWGAR_INTRO = 5732, AREATRIGGER_DEATHWHISPER_INTRO = 5709, + AREATRIGGER_SINDRAGOSA_PLATFORM = 5604, // Achievement criterias ACHIEV_CRIT_BONED_10N = 12775, // Lord Marrowgar, achievs 4534, 4610 @@ -221,7 +222,7 @@ class MANGOS_DLL_DECL instance_icecrown_citadel : public ScriptedInstance, priva const char* Save() { return m_strInstData.c_str(); } void Load(const char* strIn); - void DoHandleCitadelAreaTrigger(uint32 uiTriggerId); + void DoHandleCitadelAreaTrigger(uint32 uiTriggerId, Player* pPlayer); // Difficulty wrappers bool IsHeroicDifficulty() { return instance->GetDifficulty() == RAID_DIFFICULTY_10MAN_HEROIC || instance->GetDifficulty() == RAID_DIFFICULTY_25MAN_HEROIC; } @@ -245,6 +246,8 @@ class MANGOS_DLL_DECL instance_icecrown_citadel : public ScriptedInstance, priva bool m_bHasMarrowgarIntroYelled; bool m_bHasDeathwhisperIntroYelled; + bool m_bHasRimefangLanded; + bool m_bHasSpinestalkerLanded; GuidList m_lDeathwhisperStalkersGuids; }; diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_citadel.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_citadel.cpp index 981ce12d2..b4b40088f 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_citadel.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_citadel.cpp @@ -60,7 +60,9 @@ instance_icecrown_citadel::instance_icecrown_citadel(Map *pMap) : ScriptedInstan m_uiTeam(0), m_uiPutricideValveTimer(0), m_bHasMarrowgarIntroYelled(false), - m_bHasDeathwhisperIntroYelled(false) + m_bHasDeathwhisperIntroYelled(false), + m_bHasRimefangLanded(false), + m_bHasSpinestalkerLanded(false) { Initialize(); } @@ -82,7 +84,7 @@ bool instance_icecrown_citadel::IsEncounterInProgress() const return false; } -void instance_icecrown_citadel::DoHandleCitadelAreaTrigger(uint32 uiTriggerId) +void instance_icecrown_citadel::DoHandleCitadelAreaTrigger(uint32 uiTriggerId, Player* pPlayer) { if (uiTriggerId == AREATRIGGER_MARROWGAR_INTRO && !m_bHasMarrowgarIntroYelled) { @@ -97,6 +99,34 @@ void instance_icecrown_citadel::DoHandleCitadelAreaTrigger(uint32 uiTriggerId) StartNextDialogueText(SAY_DEATHWHISPER_SPEECH_1); m_bHasDeathwhisperIntroYelled = true; } + else if (uiTriggerId == AREATRIGGER_SINDRAGOSA_PLATFORM) + { + if (Creature *pSindragosa = GetSingleCreatureFromStorage(NPC_SINDRAGOSA)) + { + if (pSindragosa->isAlive() && !pSindragosa->isInCombat()) + pSindragosa->SetInCombatWithZone(); + } + else + { + if (!m_bHasRimefangLanded) + { + if (Creature *pRimefang = GetSingleCreatureFromStorage(NPC_RIMEFANG)) + { + pRimefang->AI()->AttackStart(pPlayer); + m_bHasRimefangLanded = true; + } + } + + if (!m_bHasSpinestalkerLanded) + { + if (Creature *pSpinestalker = GetSingleCreatureFromStorage(NPC_SPINESTALKER)) + { + pSpinestalker->AI()->AttackStart(pPlayer); + m_bHasSpinestalkerLanded = true; + } + } + } + } } void instance_icecrown_citadel::OnPlayerEnter(Player* pPlayer) @@ -449,13 +479,14 @@ InstanceData* GetInstanceData_instance_icecrown_citadel(Map* pMap) bool AreaTrigger_at_icecrown_citadel(Player* pPlayer, AreaTriggerEntry const* pAt) { - if (pAt->id == AREATRIGGER_MARROWGAR_INTRO || pAt->id == AREATRIGGER_DEATHWHISPER_INTRO) + if (pAt->id == AREATRIGGER_MARROWGAR_INTRO || pAt->id == AREATRIGGER_DEATHWHISPER_INTRO || + pAt->id == AREATRIGGER_SINDRAGOSA_PLATFORM) { if (pPlayer->isGameMaster() || pPlayer->isDead()) return false; if (instance_icecrown_citadel* pInstance = (instance_icecrown_citadel*)pPlayer->GetInstanceData()) - pInstance->DoHandleCitadelAreaTrigger(pAt->id); + pInstance->DoHandleCitadelAreaTrigger(pAt->id, pPlayer); } return false; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index ce19c7fe5..2c9c794a0 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2667" + #define SD2_REVISION_NR "2668" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 6ead03476..3b440722b 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -69,8 +69,9 @@ INSERT INTO scripted_areatrigger VALUES (1738,'at_scent_larkorwi'), (1739,'at_scent_larkorwi'), (1740,'at_scent_larkorwi'); -DELETE FROM scripted_areatrigger WHERE entry IN (5709,5732); +DELETE FROM scripted_areatrigger WHERE entry IN (5604,5709,5732); INSERT INTO scripted_areatrigger VALUES +(5604,'at_icecrown_citadel'), (5709,'at_icecrown_citadel'), (5732,'at_icecrown_citadel'); DELETE FROM scripted_areatrigger WHERE entry in (4288,4485); diff --git a/sql/updates/r2668_mangos.sql b/sql/updates/r2668_mangos.sql new file mode 100644 index 000000000..2d4199f69 --- /dev/null +++ b/sql/updates/r2668_mangos.sql @@ -0,0 +1,2 @@ +DELETE FROM `scripted_areatrigger` WHERE `entry` = 5604; +INSERT INTO `scripted_areatrigger` VALUES (5604, 'at_icecrown_citadel'); From db979e4b48be4bc95802ce19b0197d2410c30c3b Mon Sep 17 00:00:00 2001 From: NeatElves Date: Fri, 17 Aug 2012 22:19:36 +0300 Subject: [PATCH 0657/1172] [2669] Move more gossips to DB Also fix a typo from the previous commits Signed-off-by: Xfurry --- .../eastern_kingdoms/zulaman/boss_halazzi.cpp | 2 +- scripts/outland/nagrand.cpp | 193 +----------------- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 2 - sql/updates/r2669_mangos.sql | 2 + 5 files changed, 5 insertions(+), 196 deletions(-) create mode 100644 sql/updates/r2669_mangos.sql diff --git a/scripts/eastern_kingdoms/zulaman/boss_halazzi.cpp b/scripts/eastern_kingdoms/zulaman/boss_halazzi.cpp index e58a69cb8..d95952e86 100644 --- a/scripts/eastern_kingdoms/zulaman/boss_halazzi.cpp +++ b/scripts/eastern_kingdoms/zulaman/boss_halazzi.cpp @@ -353,7 +353,7 @@ struct MANGOS_DLL_DECL boss_spirit_lynxAI : public ScriptedAI else m_uiShredArmorTimer -= uiDiff; - // Unite spirits at 20% health + // Unite spirits at 10% health // Note: maybe there is some spell related to this - needs research if (!m_bHasUnited && m_creature->GetHealthPercent() < 10.0f && m_pInstance) { diff --git a/scripts/outland/nagrand.cpp b/scripts/outland/nagrand.cpp index d33dcc76e..ccfe43dd4 100644 --- a/scripts/outland/nagrand.cpp +++ b/scripts/outland/nagrand.cpp @@ -17,14 +17,12 @@ /* ScriptData SDName: Nagrand SD%Complete: 90 -SDComment: Quest support: 9868, 9918, 9991, 10044, 10085, 10172, 10646. TextId's unknown for altruis_the_sufferer and greatmother_geyah (npc_text) +SDComment: Quest support: 9868, 9918, 10085, 10646. SDCategory: Nagrand EndScriptData */ /* ContentData mob_lump -npc_altruis_the_sufferer -npc_greatmother_geyah npc_maghar_captive npc_creditmarker_visit_with_ancestors EndContentData */ @@ -145,182 +143,6 @@ CreatureAI* GetAI_mob_lump(Creature* pCreature) } /*###### -## npc_altruis_the_sufferer -######*/ - -enum -{ - QUEST_SURVEY = 9991, - QUEST_PUPIL = 10646, - - TAXI_PATH_ID = 532 -}; - -bool GossipHello_npc_altruis_the_sufferer(Player* pPlayer, Creature* pCreature) -{ - if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); - - //gossip before obtaining Survey the Land - if (pPlayer->GetQuestStatus(QUEST_SURVEY) == QUEST_STATUS_NONE) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "I see twisted steel and smell sundered earth.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+10); - - //gossip when Survey the Land is incomplete (technically, after the flight) - if (pPlayer->GetQuestStatus(QUEST_SURVEY) == QUEST_STATUS_INCOMPLETE) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Well...?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+20); - - //wowwiki.com/Varedis - if (pPlayer->GetQuestStatus(QUEST_PUPIL) == QUEST_STATUS_INCOMPLETE) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "[PH] Story about Illidan's Pupil", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+30); - - pPlayer->SEND_GOSSIP_MENU(9419, pCreature->GetObjectGuid()); - return true; -} - -bool GossipSelect_npc_altruis_the_sufferer(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) -{ - switch(uiAction) - { - case GOSSIP_ACTION_INFO_DEF+10: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Legion?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 11); - pPlayer->SEND_GOSSIP_MENU(9420, pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF+11: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "And now?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 12); - pPlayer->SEND_GOSSIP_MENU(9421, pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF+12: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "How do you see them now?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 13); - pPlayer->SEND_GOSSIP_MENU(9422, pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF+13: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Forge camps?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 14); - pPlayer->SEND_GOSSIP_MENU(9423, pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF+14: - pPlayer->SEND_GOSSIP_MENU(9424, pCreature->GetObjectGuid()); - break; - - case GOSSIP_ACTION_INFO_DEF+20: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Ok.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 21); - pPlayer->SEND_GOSSIP_MENU(9427, pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF+21: - pPlayer->CLOSE_GOSSIP_MENU(); - pPlayer->AreaExploredOrEventHappens(QUEST_SURVEY); - break; - - case GOSSIP_ACTION_INFO_DEF+30: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "[PH] Story done", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 31); - pPlayer->SEND_GOSSIP_MENU(384, pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF+31: - pPlayer->CLOSE_GOSSIP_MENU(); - pPlayer->AreaExploredOrEventHappens(QUEST_PUPIL); - break; - } - return true; -} - -bool QuestAccept_npc_altruis_the_sufferer(Player* pPlayer, Creature* pCreature, const Quest* pQuest) -{ - if (!pPlayer->GetQuestRewardStatus(QUEST_SURVEY)) //Survey the Land - { - pPlayer->CLOSE_GOSSIP_MENU(); - pPlayer->ActivateTaxiPathTo(TAXI_PATH_ID); - } - return true; -} - -/*###### -## npc_greatmother_geyah -######*/ - -//all the textId's for the below is unknown, but i do believe the gossip item texts are proper. -bool GossipHello_npc_greatmother_geyah(Player* pPlayer, Creature* pCreature) -{ - if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); - - if (pPlayer->GetQuestStatus(10044) == QUEST_STATUS_INCOMPLETE) - { - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Hello, Greatmother. Garrosh told me that you wanted to speak with me.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); - } - else if (pPlayer->GetQuestStatus(10172) == QUEST_STATUS_INCOMPLETE) - { - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Garrosh is beyond redemption, Greatmother. I fear that in helping the Mag'har, I have convinced Garrosh that he is unfit to lead.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 10); - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); - } - else - - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); - - return true; -} - -bool GossipSelect_npc_greatmother_geyah(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) -{ - switch(uiAction) - { - case GOSSIP_ACTION_INFO_DEF + 1: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "You raised all of the orcs here, Greatmother?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF + 2: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Do you believe that?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF + 3: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "What can be done? I have tried many different things. I have done my best to help the people of Nagrand. Each time I have approached Garrosh, he has dismissed me.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4); - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF + 4: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Left? How can you choose to leave?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 5); - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF + 5: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "What is this duty?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 6); - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF + 6: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Is there anything I can do for you, Greatmother?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 7); - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF + 7: - pPlayer->AreaExploredOrEventHappens(10044); - pPlayer->CLOSE_GOSSIP_MENU(); - break; - - case GOSSIP_ACTION_INFO_DEF + 10: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "I have done all that I could, Greatmother. I thank you for your kind words.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 11); - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF + 11: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Greatmother, you are the mother of Durotan?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 12); - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF + 12: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Greatmother, I never had the honor. Durotan died long before my time, but his heroics are known to all on my world. The orcs of Azeroth reside in a place known as Durotar, named after your son. And ... (You take a moment to breathe and think through what you are about to tell the Greatmother.)", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 13); - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF + 13: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "It is my Warchief, Greatmother. The leader of my people. From my world. He ... He is the son of Durotan. He is your grandchild.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 14); - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF + 14: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "I will return to Azeroth at once, Greatmother.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 15); - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF + 15: - pPlayer->AreaExploredOrEventHappens(10172); - pPlayer->CLOSE_GOSSIP_MENU(); - break; - } - return true; -} - -/*##### ## npc_maghar_captive #####*/ @@ -532,19 +354,6 @@ void AddSC_nagrand() pNewScript->GetAI = &GetAI_mob_lump; pNewScript->RegisterSelf(); - pNewScript = new Script; - pNewScript->Name = "npc_altruis_the_sufferer"; - pNewScript->pGossipHello = &GossipHello_npc_altruis_the_sufferer; - pNewScript->pGossipSelect = &GossipSelect_npc_altruis_the_sufferer; - pNewScript->pQuestAcceptNPC = &QuestAccept_npc_altruis_the_sufferer; - pNewScript->RegisterSelf(); - - pNewScript = new Script; - pNewScript->Name = "npc_greatmother_geyah"; - pNewScript->pGossipHello = &GossipHello_npc_greatmother_geyah; - pNewScript->pGossipSelect = &GossipSelect_npc_greatmother_geyah; - pNewScript->RegisterSelf(); - pNewScript = new Script; pNewScript->Name = "npc_maghar_captive"; pNewScript->GetAI = &GetAI_npc_maghar_captive; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 2c9c794a0..270b1c647 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2668" + #define SD2_REVISION_NR "2669" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 3b440722b..2e69bcfca 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -844,8 +844,6 @@ UPDATE creature_template SET ScriptName='npc_kyle_the_frenzied' WHERE entry=2361 /* NAGRAND */ UPDATE creature_template SET ScriptName='mob_lump' WHERE entry=18351; -UPDATE creature_template SET ScriptName='npc_altruis_the_sufferer' WHERE entry=18417; -UPDATE creature_template SET ScriptName='npc_greatmother_geyah' WHERE entry=18141; UPDATE creature_template SET ScriptName='npc_maghar_captive' WHERE entry=18210; UPDATE creature_template SET ScriptName='npc_creditmarker_visit_with_ancestors' WHERE entry IN (18840,18841,18842,18843); diff --git a/sql/updates/r2669_mangos.sql b/sql/updates/r2669_mangos.sql new file mode 100644 index 000000000..a270ba884 --- /dev/null +++ b/sql/updates/r2669_mangos.sql @@ -0,0 +1,2 @@ +UPDATE creature_template SET ScriptName='' WHERE entry=18417; +UPDATE creature_template SET ScriptName='' WHERE entry=18141; From 379905072f2ddada2bbdb954e6e4f5260d86eb0f Mon Sep 17 00:00:00 2001 From: michalpolko Date: Sat, 18 Aug 2012 00:03:25 +0200 Subject: [PATCH 0658/1172] [2670] Implemented second phase of Sindragosa encounter. Ice Tomb requires core support for GO in LOS and target selection and triggering Frost Beacon spell --- .../icecrown_citadel/boss_sindragosa.cpp | 101 +++++++++++++++++- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 + sql/updates/r2670_mangos.sql | 1 + 4 files changed, 101 insertions(+), 4 deletions(-) create mode 100644 sql/updates/r2670_mangos.sql diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp index 8a2bbb1dc..9023628ab 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp @@ -54,6 +54,13 @@ enum SPELL_UNCHAINED_MAGIC = 69762, // Phase 2 + SPELL_ICE_TOMB = 69712, // triggers Frost Beacon on random targets, which triggers actual Ice Tomb after 7 sec. + + // Frost Bomb related + SPELL_FROST_BOMB = 69846, // summons dummy target npc + SPELL_FROST_BOMB_DMG = 69845, + SPELL_FROST_BOMB_VISUAL = 70022, // circle mark + // SPELL_FROST_BOMB_OTHER = 70521, // no idea where it is used, wowhead says it is used by some other Sindragosa (37755) // Phase 3 SPELL_MYSTIC_BUFFET = 70128, @@ -110,6 +117,11 @@ enum SpinestalkerPoint SPINESTALKER_POINT_INITIAL_LAND = 1 }; +#define FROST_BOMB_MIN_X 4367.0f +#define FROST_BOMB_MAX_X 4424.0f +#define FROST_BOMB_MIN_Y 2437.0f +#define FROST_BOMB_MAX_Y 2527.0f + static const float SindragosaPosition[10][3] = { {4407.44f, 2484.37f, 203.37f}, // 0 center, ground @@ -142,6 +154,7 @@ struct MANGOS_DLL_DECL boss_sindragosaAI : public ScriptedAI uint32 m_uiTailSmashTimer; uint32 m_uiIcyGripTimer; uint32 m_uiUnchainedMagicTimer; + uint32 m_uiFrostBombTimer; void Reset() { @@ -271,12 +284,23 @@ struct MANGOS_DLL_DECL boss_sindragosaAI : public ScriptedAI } else if (uiPointId == SINDRAGOSA_POINT_AIR_PHASE_2) { - // face the platform - m_creature->SetOrientation(M_PI_F); + m_creature->SetOrientation(M_PI_F); // face the platform + m_uiFrostBombTimer = 10000; // set initial Frost Bomb timer + DoCastSpellIfCan(m_creature, SPELL_ICE_TOMB); m_uiPhase = SINDRAGOSA_PHASE_AIR; } } + void DoFrostBomb() + { + float x, y, z; + x = frand(FROST_BOMB_MIN_X, FROST_BOMB_MAX_X); + y = frand(FROST_BOMB_MIN_Y, FROST_BOMB_MAX_Y); + z = SindragosaPosition[0][2]; // platform height + + m_creature->CastSpell(x, y, z, SPELL_FROST_BOMB, false); + } + void UpdateAI(const uint32 uiDiff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) @@ -321,7 +345,7 @@ struct MANGOS_DLL_DECL boss_sindragosaAI : public ScriptedAI // Phase 2 (air) if (m_uiPhaseTimer <= uiDiff) { - m_uiPhaseTimer = 35000; + m_uiPhaseTimer = 33000; DoScriptText(SAY_TAKEOFF, m_creature); SetCombatMovement(false); m_creature->GetMotionMaster()->MovePoint(SINDRAGOSA_POINT_GROUND_CENTER, SindragosaPosition[0][0], SindragosaPosition[0][1], SindragosaPosition[0][2], false); @@ -399,6 +423,15 @@ struct MANGOS_DLL_DECL boss_sindragosaAI : public ScriptedAI else m_uiPhaseTimer -= uiDiff; + // Frost Bomb + if (m_uiFrostBombTimer <= uiDiff) + { + DoFrostBomb(); + m_uiFrostBombTimer = 6000; + } + else + m_uiFrostBombTimer -= uiDiff; + break; } } @@ -748,6 +781,63 @@ CreatureAI* GetAI_npc_spinestalker_icc(Creature* pCreature) return new npc_spinestalker_iccAI(pCreature); } +/** + * Frost Bomb - npc marking the target of Frost Bomb + * + * NOTE: should triggering damage spell be done + * after dummy spell hits instead of a timer? + */ +struct MANGOS_DLL_DECL mob_frost_bombAI : public ScriptedAI +{ + mob_frost_bombAI(Creature *pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (instance_icecrown_citadel*)pCreature->GetInstanceData(); + Reset(); + } + + instance_icecrown_citadel* m_pInstance; + uint32 m_uiFrostBombTimer; + + void Reset() + { + SetCombatMovement(false); + DoCastSpellIfCan(m_creature, SPELL_FROST_BOMB_VISUAL, CAST_TRIGGERED); + m_uiFrostBombTimer = 6000; + } + + void AttackStart(Unit *pWho){} + + void UpdateAI(const uint32 uiDiff) + { + // Frost Bomb (dmg) + if (m_uiFrostBombTimer) + { + if (m_uiFrostBombTimer <= uiDiff) + { + if (m_pInstance) + { + if (Creature* pSindragosa = m_pInstance->GetSingleCreatureFromStorage(NPC_SINDRAGOSA)) + { + if (pSindragosa->AI()->DoCastSpellIfCan(m_creature, SPELL_FROST_BOMB_DMG) == CAST_OK) + { + m_creature->RemoveAurasDueToSpell(SPELL_FROST_BOMB_VISUAL); + m_creature->ForcedDespawn(2000); + m_uiFrostBombTimer = 0; + } + } + } + } + else + m_uiFrostBombTimer -= uiDiff; + } + } +}; + +CreatureAI* GetAI_mob_frost_bomb(Creature* pCreature) +{ + return new mob_frost_bombAI(pCreature); +} + void AddSC_boss_sindragosa() { Script *pNewScript; @@ -766,4 +856,9 @@ void AddSC_boss_sindragosa() pNewScript->Name = "npc_spinestalker_icc"; pNewScript->GetAI = &GetAI_npc_spinestalker_icc; pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "mob_frost_bomb"; + pNewScript->GetAI = &GetAI_mob_frost_bomb; + pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 270b1c647..36f0b194f 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2669" + #define SD2_REVISION_NR "2670" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 2e69bcfca..50ed43ab9 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -723,6 +723,7 @@ UPDATE creature_template SET ScriptName='boss_blood_queen_lanathel' WHERE entry= UPDATE creature_template SET ScriptName='boss_sindragosa' WHERE entry=36853; UPDATE creature_template SET ScriptName='npc_rimefang_icc' WHERE entry=37533; UPDATE creature_template SET ScriptName='npc_spinestalker_icc' WHERE entry=37534; +UPDATE creature_template SET ScriptName='mob_frost_bomb' WHERE entry=37186; UPDATE creature_template SET ScriptName='boss_festergut' WHERE entry=36626; DELETE FROM scripted_event_id WHERE id IN (23426,23438); INSERT INTO scripted_event_id VALUES diff --git a/sql/updates/r2670_mangos.sql b/sql/updates/r2670_mangos.sql new file mode 100644 index 000000000..032ea5e4d --- /dev/null +++ b/sql/updates/r2670_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='mob_frost_bomb' WHERE entry=37186; From 8db426ad3f2220e4ae7d6bbb717e6a86b0e73e48 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sat, 18 Aug 2012 12:49:37 +0300 Subject: [PATCH 0659/1172] [2671] EventAI cleanup Part I - Outland Notes: Creature 22009 hasn't yet been removed because it may require additional research. Probably will be removed upon Lady Vashj script cleanup. --- .../auchenai_crypts/boss_exarch_maladaar.cpp | 44 ---- .../mana_tombs/boss_nexusprince_shaffar.cpp | 74 ------ .../sethekk_halls/boss_darkweaver_syth.cpp | 226 +----------------- .../black_temple/boss_reliquary_of_souls.cpp | 65 +---- .../black_temple/boss_teron_gorefiend.cpp | 70 ------ .../serpent_shrine/boss_lady_vashj.cpp | 71 ------ .../boss_leotheras_the_blind.cpp | 52 ---- .../steam_vault/boss_hydromancer_thespia.cpp | 45 ---- .../tempest_keep/arcatraz/arcatraz.cpp | 32 --- .../outland/tempest_keep/the_eye/the_eye.cpp | 68 +----- .../boss_gatewatcher_ironhand.cpp | 113 +-------- .../boss_nethermancer_sepethrea.cpp | 60 ----- scripts/outland/terokkar_forest.cpp | 143 ----------- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 19 -- sql/scriptdev2_script_full.sql | 15 +- sql/updates/r2671_mangos.sql | 18 ++ sql/updates/r2671_scriptdev2.sql | 9 + 18 files changed, 46 insertions(+), 1080 deletions(-) create mode 100644 sql/updates/r2671_mangos.sql create mode 100644 sql/updates/r2671_scriptdev2.sql diff --git a/scripts/outland/auchindoun/auchenai_crypts/boss_exarch_maladaar.cpp b/scripts/outland/auchindoun/auchenai_crypts/boss_exarch_maladaar.cpp index 81b9c20d2..d4d357318 100644 --- a/scripts/outland/auchindoun/auchenai_crypts/boss_exarch_maladaar.cpp +++ b/scripts/outland/auchindoun/auchenai_crypts/boss_exarch_maladaar.cpp @@ -307,45 +307,6 @@ CreatureAI* GetAI_boss_exarch_maladaar(Creature* pCreature) return new boss_exarch_maladaarAI(pCreature); } -enum -{ - SPELL_AV_MORTAL_STRIKE = 16856, - SPELL_AV_SUNDER_ARMOR = 16145 -}; - -struct MANGOS_DLL_DECL mob_avatar_of_martyredAI : public ScriptedAI -{ - mob_avatar_of_martyredAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} - - void Reset() - { - m_uiMortalStrikeTimer = 10000; - } - - uint32 m_uiMortalStrikeTimer; - - void UpdateAI(const uint32 uiDiff) - { - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - if (m_uiMortalStrikeTimer < uiDiff) - { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_AV_MORTAL_STRIKE); - m_uiMortalStrikeTimer = urand(10000, 30000); - } - else - m_uiMortalStrikeTimer -= uiDiff; - - DoMeleeAttackIfReady(); - } -}; - -CreatureAI* GetAI_mob_avatar_of_martyred(Creature* pCreature) -{ - return new mob_avatar_of_martyredAI(pCreature); -} - void AddSC_boss_exarch_maladaar() { Script* pNewScript; @@ -355,11 +316,6 @@ void AddSC_boss_exarch_maladaar() pNewScript->GetAI = &GetAI_boss_exarch_maladaar; pNewScript->RegisterSelf(); - pNewScript = new Script; - pNewScript->Name = "mob_avatar_of_martyred"; - pNewScript->GetAI = &GetAI_mob_avatar_of_martyred; - pNewScript->RegisterSelf(); - pNewScript = new Script; pNewScript->Name = "mob_stolen_soul"; pNewScript->GetAI = &GetAI_mob_stolen_soul; diff --git a/scripts/outland/auchindoun/mana_tombs/boss_nexusprince_shaffar.cpp b/scripts/outland/auchindoun/mana_tombs/boss_nexusprince_shaffar.cpp index b2bb02a4c..22dc0cc76 100644 --- a/scripts/outland/auchindoun/mana_tombs/boss_nexusprince_shaffar.cpp +++ b/scripts/outland/auchindoun/mana_tombs/boss_nexusprince_shaffar.cpp @@ -176,75 +176,6 @@ CreatureAI* GetAI_boss_nexusprince_shaffar(Creature* pCreature) return new boss_nexusprince_shaffarAI(pCreature); } -enum -{ - SPELL_ARCANE_BOLT = 15254, - SPELL_ETHEREAL_APPRENTICE = 32372 // Summon 18430 -}; - -struct MANGOS_DLL_DECL mob_ethereal_beaconAI : public ScriptedAI -{ - mob_ethereal_beaconAI(Creature* pCreature) : ScriptedAI(pCreature) - { - m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); - Reset(); - } - - bool m_bIsRegularMode; - - uint32 m_uiApprenticeTimer; - uint32 m_uiArcaneBoltTimer; - - void Reset() - { - m_uiApprenticeTimer = m_bIsRegularMode ? 20000 : 10000; - m_uiArcaneBoltTimer = 0; - } - - void JustSummoned(Creature* pSummoned) - { - if (m_creature->getVictim()) - pSummoned->AI()->AttackStart(m_creature->getVictim()); - } - - void UpdateAI(const uint32 uiDiff) - { - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - if (m_uiArcaneBoltTimer < uiDiff) - { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_ARCANE_BOLT); - m_uiArcaneBoltTimer = urand(3000, 8000); - } - else - m_uiArcaneBoltTimer -= uiDiff; - - if (m_uiApprenticeTimer) - { - if (m_uiApprenticeTimer <= uiDiff) - { - if (DoCastSpellIfCan(m_creature, SPELL_ETHEREAL_APPRENTICE) == CAST_OK) - { - // despawn in 2 sec because of the spell visual - m_creature->ForcedDespawn(2000); - m_uiApprenticeTimer = 0; - } - } - else - m_uiApprenticeTimer -= uiDiff; - } - - //should they do meele? - DoMeleeAttackIfReady(); - } -}; - -CreatureAI* GetAI_mob_ethereal_beacon(Creature* pCreature) -{ - return new mob_ethereal_beaconAI(pCreature); -} - void AddSC_boss_nexusprince_shaffar() { Script* pNewScript; @@ -253,9 +184,4 @@ void AddSC_boss_nexusprince_shaffar() pNewScript->Name = "boss_nexusprince_shaffar"; pNewScript->GetAI = &GetAI_boss_nexusprince_shaffar; pNewScript->RegisterSelf(); - - pNewScript = new Script; - pNewScript->Name = "mob_ethereal_beacon"; - pNewScript->GetAI = &GetAI_mob_ethereal_beacon; - pNewScript->RegisterSelf(); } diff --git a/scripts/outland/auchindoun/sethekk_halls/boss_darkweaver_syth.cpp b/scripts/outland/auchindoun/sethekk_halls/boss_darkweaver_syth.cpp index e5deaa96d..8215cf79b 100644 --- a/scripts/outland/auchindoun/sethekk_halls/boss_darkweaver_syth.cpp +++ b/scripts/outland/auchindoun/sethekk_halls/boss_darkweaver_syth.cpp @@ -55,15 +55,6 @@ enum NPC_FROST_ELEMENTAL = 19204, NPC_ARCANE_ELEMENTAL = 19205, NPC_SHADOW_ELEMENTAL = 19206, - - SPELL_FLAME_BUFFET = 33526, - SPELL_FLAME_BUFFET_H = 38141, - SPELL_ARCANE_BUFFET = 33527, - SPELL_ARCANE_BUFFET_H = 38138, - SPELL_FROST_BUFFET = 33528, - SPELL_FROST_BUFFET_H = 38142, - SPELL_SHADOW_BUFFET = 33529, - SPELL_SHADOW_BUFFET_H = 38143, }; struct MANGOS_DLL_DECL boss_darkweaver_sythAI : public ScriptedAI @@ -229,201 +220,6 @@ CreatureAI* GetAI_boss_darkweaver_syth(Creature* pCreature) return new boss_darkweaver_sythAI(pCreature); } -/* ELEMENTALS */ - -struct MANGOS_DLL_DECL mob_syth_fireAI : public ScriptedAI -{ - mob_syth_fireAI(Creature* pCreature) : ScriptedAI(pCreature) - { - m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); - Reset(); - } - - bool m_bIsRegularMode; - uint32 flameshock_timer; - uint32 flamebuffet_timer; - - void Reset() - { - flameshock_timer = 2500; - flamebuffet_timer = 5000; - } - - void UpdateAI(const uint32 diff) - { - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - if (flameshock_timer < diff) - { - if (Unit *target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) - DoCastSpellIfCan(target, SPELL_FLAME_SHOCK); - - flameshock_timer = 5000; - }else flameshock_timer -= diff; - - if (flamebuffet_timer < diff) - { - if (Unit *target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) - DoCastSpellIfCan(target, m_bIsRegularMode ? SPELL_FLAME_BUFFET : SPELL_FLAME_BUFFET_H); - - flamebuffet_timer = 5000; - - }else flamebuffet_timer -= diff; - - DoMeleeAttackIfReady(); - } -}; - -CreatureAI* GetAI_mob_syth_fire(Creature* pCreature) -{ - return new mob_syth_fireAI(pCreature); -} - -struct MANGOS_DLL_DECL mob_syth_arcaneAI : public ScriptedAI -{ - mob_syth_arcaneAI(Creature* pCreature) : ScriptedAI(pCreature) - { - m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); - Reset(); - } - - bool m_bIsRegularMode; - uint32 arcaneshock_timer; - uint32 arcanebuffet_timer; - - void Reset() - { - arcaneshock_timer = 2500; - arcanebuffet_timer = 5000; - } - - void UpdateAI(const uint32 diff) - { - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - if (arcaneshock_timer < diff) - { - if (Unit *target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) - DoCastSpellIfCan(target, SPELL_ARCANE_SHOCK); - - arcaneshock_timer = 5000; - }else arcaneshock_timer -= diff; - - if (arcanebuffet_timer < diff) - { - if (Unit *target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) - DoCastSpellIfCan(target, m_bIsRegularMode ? SPELL_ARCANE_BUFFET : SPELL_ARCANE_BUFFET_H); - - arcanebuffet_timer = 5000; - }else arcanebuffet_timer -= diff; - - DoMeleeAttackIfReady(); - } -}; - -CreatureAI* GetAI_mob_syth_arcane(Creature* pCreature) -{ - return new mob_syth_arcaneAI(pCreature); -} - -struct MANGOS_DLL_DECL mob_syth_frostAI : public ScriptedAI -{ - mob_syth_frostAI(Creature* pCreature) : ScriptedAI(pCreature) - { - m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); - Reset(); - } - - bool m_bIsRegularMode; - uint32 frostshock_timer; - uint32 frostbuffet_timer; - - void Reset() - { - frostshock_timer = 2500; - frostbuffet_timer = 5000; - } - - void UpdateAI(const uint32 diff) - { - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - if (frostshock_timer < diff) - { - if (Unit *target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) - DoCastSpellIfCan(target, SPELL_FROST_SHOCK); - - frostshock_timer = 5000; - }else frostshock_timer -= diff; - - if (frostbuffet_timer < diff) - { - if (Unit *target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) - DoCastSpellIfCan(target, m_bIsRegularMode ? SPELL_FROST_BUFFET : SPELL_FROST_BUFFET_H); - - frostbuffet_timer = 5000; - }else frostbuffet_timer -= diff; - - DoMeleeAttackIfReady(); - } -}; - -CreatureAI* GetAI_mob_syth_frost(Creature* pCreature) -{ - return new mob_syth_frostAI(pCreature); -} - -struct MANGOS_DLL_DECL mob_syth_shadowAI : public ScriptedAI -{ - mob_syth_shadowAI(Creature* pCreature) : ScriptedAI(pCreature) - { - m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); - Reset(); - } - - bool m_bIsRegularMode; - uint32 shadowshock_timer; - uint32 shadowbuffet_timer; - - void Reset() - { - shadowshock_timer = 2500; - shadowbuffet_timer = 5000; - } - - void UpdateAI(const uint32 diff) - { - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - if (shadowshock_timer < diff) - { - if (Unit *target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) - DoCastSpellIfCan(target, SPELL_SHADOW_SHOCK); - - shadowshock_timer = 5000; - }else shadowshock_timer -= diff; - - if (shadowbuffet_timer < diff) - { - if (Unit *target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) - DoCastSpellIfCan(target, m_bIsRegularMode ? SPELL_SHADOW_BUFFET : SPELL_SHADOW_BUFFET_H); - - shadowbuffet_timer = 5000; - }else shadowbuffet_timer -= diff; - - DoMeleeAttackIfReady(); - } -}; - -CreatureAI* GetAI_mob_syth_shadow(Creature* pCreature) -{ - return new mob_syth_shadowAI(pCreature); -} - void AddSC_boss_darkweaver_syth() { Script* pNewScript; @@ -432,24 +228,4 @@ void AddSC_boss_darkweaver_syth() pNewScript->Name = "boss_darkweaver_syth"; pNewScript->GetAI = &GetAI_boss_darkweaver_syth; pNewScript->RegisterSelf(); - - pNewScript = new Script; - pNewScript->Name = "mob_syth_fire"; - pNewScript->GetAI = &GetAI_mob_syth_fire; - pNewScript->RegisterSelf(); - - pNewScript = new Script; - pNewScript->Name = "mob_syth_arcane"; - pNewScript->GetAI = &GetAI_mob_syth_arcane; - pNewScript->RegisterSelf(); - - pNewScript = new Script; - pNewScript->Name = "mob_syth_frost"; - pNewScript->GetAI = &GetAI_mob_syth_frost; - pNewScript->RegisterSelf(); - - pNewScript = new Script; - pNewScript->Name = "mob_syth_shadow"; - pNewScript->GetAI = &GetAI_mob_syth_shadow; - pNewScript->RegisterSelf(); -} \ No newline at end of file +} diff --git a/scripts/outland/black_temple/boss_reliquary_of_souls.cpp b/scripts/outland/black_temple/boss_reliquary_of_souls.cpp index 396209101..e9c1949f7 100644 --- a/scripts/outland/black_temple/boss_reliquary_of_souls.cpp +++ b/scripts/outland/black_temple/boss_reliquary_of_souls.cpp @@ -94,40 +94,6 @@ static ReliquaryPosition Coords[]= {450.4f, 168.3f} }; -struct MANGOS_DLL_DECL npc_enslaved_soulAI : public ScriptedAI -{ - npc_enslaved_soulAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} - - ObjectGuid m_reliquaryGuid; - - void Reset() - { - m_reliquaryGuid.Clear(); - } - - void DamageTaken(Unit *done_by, uint32 &damage) - { - if (damage >= m_creature->GetHealth()) - { - if (done_by->GetTypeId() == TYPEID_PLAYER) - { - done_by->CastSpell(done_by, SPELL_RESTORE_HEALTH, true); - if (done_by->GetMaxPower(POWER_MANA) > 0) - { - if ((done_by->GetPower(POWER_MANA) / done_by->GetMaxPower(POWER_MANA)) < 70) - { - uint32 mana = done_by->GetPower(POWER_MANA) + (uint32)(done_by->GetMaxPower(POWER_MANA)*0.3); - done_by->SetPower(POWER_MANA, mana); - }else done_by->SetPower(POWER_MANA, done_by->GetMaxPower(POWER_MANA)); - } - } - DoCastSpellIfCan(done_by, SPELL_SOUL_RELEASE); - } - } - - void JustDied(Unit *killer); -}; - struct MANGOS_DLL_DECL boss_reliquary_of_soulsAI : public ScriptedAI { boss_reliquary_of_soulsAI(Creature* pCreature) : ScriptedAI(pCreature) @@ -238,15 +204,18 @@ struct MANGOS_DLL_DECL boss_reliquary_of_soulsAI : public ScriptedAI Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0); if (target && Soul) { - if (npc_enslaved_soulAI* pSoulAI = dynamic_cast(Soul->AI())) - pSoulAI->m_reliquaryGuid = m_creature->GetObjectGuid(); - Soul->CastSpell(Soul, ENSLAVED_SOUL_PASSIVE, true); Soul->AddThreat(target); ++SoulCount; } } + void SummonedCreatureJustDied(Creature* pSummoned) + { + if (pSummoned->GetEntry() == CREATURE_ENSLAVED_SOUL) + ++SoulDeathCount; + } + void MergeThreatList(Creature* target) { if (!target) @@ -905,18 +874,6 @@ struct MANGOS_DLL_DECL boss_essence_of_angerAI : public ScriptedAI } }; -void npc_enslaved_soulAI::JustDied(Unit *killer) -{ - if (m_reliquaryGuid) - { - if (Creature* pReliquary = m_creature->GetMap()->GetCreature(m_reliquaryGuid)) - { - if (boss_reliquary_of_soulsAI* pReliqAI = dynamic_cast(pReliquary->AI())) - pReliqAI->SoulDeathCount++; - } - } -} - CreatureAI* GetAI_boss_reliquary_of_souls(Creature* pCreature) { return new boss_reliquary_of_soulsAI(pCreature); @@ -937,11 +894,6 @@ CreatureAI* GetAI_boss_essence_of_anger(Creature* pCreature) return new boss_essence_of_angerAI(pCreature); } -CreatureAI* GetAI_npc_enslaved_soul(Creature* pCreature) -{ - return new npc_enslaved_soulAI(pCreature); -} - void AddSC_boss_reliquary_of_souls() { Script* pNewScript; @@ -965,9 +917,4 @@ void AddSC_boss_reliquary_of_souls() pNewScript->Name = "boss_essence_of_anger"; pNewScript->GetAI = &GetAI_boss_essence_of_anger; pNewScript->RegisterSelf(); - - pNewScript = new Script; - pNewScript->Name = "npc_enslaved_soul"; - pNewScript->GetAI = &GetAI_npc_enslaved_soul; - pNewScript->RegisterSelf(); } diff --git a/scripts/outland/black_temple/boss_teron_gorefiend.cpp b/scripts/outland/black_temple/boss_teron_gorefiend.cpp index 900ecc048..ec92503c0 100644 --- a/scripts/outland/black_temple/boss_teron_gorefiend.cpp +++ b/scripts/outland/black_temple/boss_teron_gorefiend.cpp @@ -52,63 +52,6 @@ enum NPC_SHADOWY_CONSTRUCT = 23111 }; -struct MANGOS_DLL_DECL mob_doom_blossomAI : public ScriptedAI -{ - mob_doom_blossomAI(Creature* pCreature) : ScriptedAI(pCreature) - { - Reset(); - } - - uint32 m_uiCheckTeronTimer; - uint32 m_uiShadowBoltTimer; - ObjectGuid m_teronGuid; - - void Reset() - { - m_uiCheckTeronTimer = 5000; - m_uiShadowBoltTimer = 12000; - } - - void AttackStart(Unit* pWho) { } - void MoveInLineOfSight(Unit* pWho) { } - - void UpdateAI(const uint32 uiDiff) - { - if (m_uiCheckTeronTimer < uiDiff) - { - if (m_teronGuid) - { - m_creature->SetInCombatWithZone(); - - Creature* pTeron = m_creature->GetMap()->GetCreature(m_teronGuid); - if (pTeron && (!pTeron->isAlive() || pTeron->IsInEvadeMode())) - m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); - } - else - m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); - - m_uiCheckTeronTimer = 5000; - } - else - m_uiCheckTeronTimer -= uiDiff; - - if (!m_creature->getVictim() || !m_creature->SelectHostileTarget()) - return; - - if (m_uiShadowBoltTimer < uiDiff) - { - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) - DoCastSpellIfCan(pTarget, SPELL_SHADOWBOLT); - - m_uiShadowBoltTimer = 10000; - } - else - m_uiShadowBoltTimer -= uiDiff; - } - - void SetTeronGUID(ObjectGuid guid){ m_teronGuid = guid; } -}; - struct MANGOS_DLL_DECL mob_shadowy_constructAI : public ScriptedAI { mob_shadowy_constructAI(Creature* pCreature) : ScriptedAI(pCreature) @@ -406,9 +349,6 @@ struct MANGOS_DLL_DECL boss_teron_gorefiendAI : public ScriptedAI pDoomBlossom->setFaction(m_creature->getFaction()); pDoomBlossom->AddThreat(pTarget); - if (mob_doom_blossomAI* pDoomBlossomAI = dynamic_cast(pDoomBlossom->AI())) - pDoomBlossomAI->SetTeronGUID(m_creature->GetObjectGuid()); - SetThreatList(pDoomBlossom); } @@ -480,11 +420,6 @@ struct MANGOS_DLL_DECL boss_teron_gorefiendAI : public ScriptedAI } }; -CreatureAI* GetAI_mob_doom_blossom(Creature* pCreature) -{ - return new mob_doom_blossomAI(pCreature); -} - CreatureAI* GetAI_mob_shadowy_construct(Creature* pCreature) { return new mob_shadowy_constructAI(pCreature); @@ -499,11 +434,6 @@ void AddSC_boss_teron_gorefiend() { Script* pNewScript; - pNewScript = new Script; - pNewScript->Name = "mob_doom_blossom"; - pNewScript->GetAI = &GetAI_mob_doom_blossom; - pNewScript->RegisterSelf(); - pNewScript = new Script; pNewScript->Name = "mob_shadowy_construct"; pNewScript->GetAI = &GetAI_mob_shadowy_construct; diff --git a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_lady_vashj.cpp b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_lady_vashj.cpp index 4e74b5e8a..d7be2c375 100644 --- a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_lady_vashj.cpp +++ b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_lady_vashj.cpp @@ -548,67 +548,6 @@ struct MANGOS_DLL_DECL mob_tainted_elementalAI : public ScriptedAI } }; -//Toxic Sporebat -//Toxic Spores: Used in m_uiPhase 3 by the Spore Bats, it creates a contaminated green patch of ground, dealing about 2775-3225 nature damage every second to anyone who stands in it. -struct MANGOS_DLL_DECL mob_toxic_sporebatAI : public ScriptedAI -{ - mob_toxic_sporebatAI(Creature* pCreature) : ScriptedAI(pCreature) - { - m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - Reset(); - } - - ScriptedInstance* m_pInstance; - - uint32 m_uiToxicSpore_Timer; - uint32 m_uiCheck_Timer; - - void Reset() - { - m_creature->setFaction(14); - m_uiToxicSpore_Timer = 5000; - m_uiCheck_Timer = 1000; - } - - void UpdateAI(const uint32 uiDiff) - { - //Return since we have no target - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - //m_uiToxicSpore_Timer - if (m_uiToxicSpore_Timer < uiDiff) - { - //The Spores will hit you anywhere in the instance: underwater, at the elevator, at the entrance, wherever. - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) - DoCastSpellIfCan(pTarget, SPELL_TOXIC_SPORES); - - m_uiToxicSpore_Timer = urand(20000, 25000); - }else m_uiToxicSpore_Timer -= uiDiff; - - //m_uiCheck_Timer - if (m_uiCheck_Timer < uiDiff) - { - if (m_pInstance) - { - //check if vashj is death - Creature* pVashj = m_pInstance->GetSingleCreatureFromStorage(NPC_LADYVASHJ); - if (!pVashj || !pVashj->isAlive()) - { - //remove - m_creature->SetDeathState(DEAD); - m_creature->RemoveCorpse(); - m_creature->setFaction(35); - } - } - - m_uiCheck_Timer = 1000; - }else m_uiCheck_Timer -= uiDiff; - - DoMeleeAttackIfReady(); - } -}; - enum { SPELL_CLEAVE = 31345, @@ -709,11 +648,6 @@ CreatureAI* GetAI_mob_tainted_elemental(Creature* pCreature) return new mob_tainted_elementalAI(pCreature); } -CreatureAI* GetAI_mob_toxic_sporebat(Creature* pCreature) -{ - return new mob_toxic_sporebatAI(pCreature); -} - CreatureAI* GetAI_mob_shield_generator_channel(Creature* pCreature) { return new mob_shield_generator_channelAI(pCreature); @@ -738,11 +672,6 @@ void AddSC_boss_lady_vashj() pNewScript->GetAI = &GetAI_mob_tainted_elemental; pNewScript->RegisterSelf(); - pNewScript = new Script; - pNewScript->Name = "mob_toxic_sporebat"; - pNewScript->GetAI = &GetAI_mob_toxic_sporebat; - pNewScript->RegisterSelf(); - pNewScript = new Script; pNewScript->Name = "mob_shield_generator_channel"; pNewScript->GetAI = &GetAI_mob_shield_generator_channel; diff --git a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_leotheras_the_blind.cpp b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_leotheras_the_blind.cpp index e386b67f2..757909693 100644 --- a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_leotheras_the_blind.cpp +++ b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_leotheras_the_blind.cpp @@ -273,58 +273,11 @@ struct MANGOS_DLL_DECL boss_leotheras_the_blindAI : public ScriptedAI } }; -//Leotheras the Blind Demon Form AI -struct MANGOS_DLL_DECL boss_leotheras_the_blind_demonformAI : public ScriptedAI -{ - boss_leotheras_the_blind_demonformAI(Creature* pCreature) : ScriptedAI(pCreature) - { - SetCombatMovement(false); - Reset(); - } - - void Reset() { } - - void Aggro(Unit* pWho) - { - DoScriptText(SAY_FREE, m_creature); - } - - void KilledUnit(Unit* pVictim) - { - if (pVictim->GetTypeId() != TYPEID_PLAYER) - return; - - switch(urand(0, 2)) - { - case 0: DoScriptText(SAY_DEMON_SLAY1, m_creature); break; - case 1: DoScriptText(SAY_DEMON_SLAY2, m_creature); break; - case 2: DoScriptText(SAY_DEMON_SLAY3, m_creature); break; - } - } - - void UpdateAI(const uint32 uiDiff) - { - //Return since we have no target - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - if (!m_creature->IsNonMeleeSpellCasted(false)) - m_creature->CastSpell(m_creature->getVictim(), SPELL_CHAOS_BLAST, false); - - //Do NOT deal any melee damage to the target. - } -}; - CreatureAI* GetAI_boss_leotheras_the_blind(Creature* pCreature) { return new boss_leotheras_the_blindAI(pCreature); } -CreatureAI* GetAI_boss_leotheras_the_blind_demonform(Creature* pCreature) -{ - return new boss_leotheras_the_blind_demonformAI(pCreature); -} - void AddSC_boss_leotheras_the_blind() { Script* pNewScript; @@ -333,9 +286,4 @@ void AddSC_boss_leotheras_the_blind() pNewScript->Name = "boss_leotheras_the_blind"; pNewScript->GetAI = &GetAI_boss_leotheras_the_blind; pNewScript->RegisterSelf(); - - pNewScript = new Script; - pNewScript->Name = "boss_leotheras_the_blind_demonform"; - pNewScript->GetAI = &GetAI_boss_leotheras_the_blind_demonform; - pNewScript->RegisterSelf(); } diff --git a/scripts/outland/coilfang_reservoir/steam_vault/boss_hydromancer_thespia.cpp b/scripts/outland/coilfang_reservoir/steam_vault/boss_hydromancer_thespia.cpp index 77a246397..4b7fc83ba 100644 --- a/scripts/outland/coilfang_reservoir/steam_vault/boss_hydromancer_thespia.cpp +++ b/scripts/outland/coilfang_reservoir/steam_vault/boss_hydromancer_thespia.cpp @@ -44,10 +44,6 @@ enum SPELL_LUNG_BURST = 31481, SPELL_ENVELOPING_WINDS = 31718, SPELL_SUMMON_ELEMENTALS = 31476, // not sure where to use this - - // Water elemental spells - SPELL_WATER_BOLT_VOLLEY = 34449, - SPELL_WATER_BOLT_VOLLEY_H = 37924, }; struct MANGOS_DLL_DECL boss_thespiaAI : public ScriptedAI @@ -154,47 +150,11 @@ struct MANGOS_DLL_DECL boss_thespiaAI : public ScriptedAI } }; -struct MANGOS_DLL_DECL mob_coilfang_waterelementalAI : public ScriptedAI -{ - mob_coilfang_waterelementalAI(Creature* pCreature) : ScriptedAI(pCreature) - { - m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); - Reset(); - } - - bool m_bIsRegularMode; - uint32 WaterBoltVolley_Timer; - - void Reset() - { - WaterBoltVolley_Timer = urand(3000, 6000); - } - - void UpdateAI(const uint32 diff) - { - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - if (WaterBoltVolley_Timer < diff) - { - DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_WATER_BOLT_VOLLEY : SPELL_WATER_BOLT_VOLLEY_H); - WaterBoltVolley_Timer = urand(7000, 12000); - }else WaterBoltVolley_Timer -= diff; - - DoMeleeAttackIfReady(); - } -}; - CreatureAI* GetAI_boss_thespiaAI(Creature* pCreature) { return new boss_thespiaAI(pCreature); } -CreatureAI* GetAI_mob_coilfang_waterelementalAI(Creature* pCreature) -{ - return new mob_coilfang_waterelementalAI(pCreature); -} - void AddSC_boss_hydromancer_thespia() { Script* pNewScript; @@ -203,9 +163,4 @@ void AddSC_boss_hydromancer_thespia() pNewScript->Name = "boss_hydromancer_thespia"; pNewScript->GetAI = &GetAI_boss_thespiaAI; pNewScript->RegisterSelf(); - - pNewScript = new Script; - pNewScript->Name = "mob_coilfang_waterelemental"; - pNewScript->GetAI = &GetAI_mob_coilfang_waterelementalAI; - pNewScript->RegisterSelf(); } diff --git a/scripts/outland/tempest_keep/arcatraz/arcatraz.cpp b/scripts/outland/tempest_keep/arcatraz/arcatraz.cpp index 80c52457e..a82b6e4a9 100644 --- a/scripts/outland/tempest_keep/arcatraz/arcatraz.cpp +++ b/scripts/outland/tempest_keep/arcatraz/arcatraz.cpp @@ -346,33 +346,6 @@ CreatureAI* GetAI_npc_warden_mellichar(Creature* pCreature) return new npc_warden_mellicharAI(pCreature); } -/*##### -# mob_zerekethvoidzone (this script probably not needed in future -> `creature_template_addon`.`auras`='36120 0') -#####*/ - -enum -{ - SPELL_VOID_ZONE_DAMAGE = 36120, -}; - -struct MANGOS_DLL_DECL mob_zerekethvoidzoneAI : public ScriptedAI -{ - mob_zerekethvoidzoneAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } - - void Reset() - { - m_creature->SetUInt32Value(UNIT_NPC_FLAGS, 0); - m_creature->setFaction(16); - m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - - DoCastSpellIfCan(m_creature, SPELL_VOID_ZONE_DAMAGE); - } -}; -CreatureAI* GetAI_mob_zerekethvoidzoneAI(Creature* pCreature) -{ - return new mob_zerekethvoidzoneAI(pCreature); -} - void AddSC_arcatraz() { Script* pNewScript; @@ -386,9 +359,4 @@ void AddSC_arcatraz() pNewScript->Name = "npc_warden_mellichar"; pNewScript->GetAI = &GetAI_npc_warden_mellichar; pNewScript->RegisterSelf(); - - pNewScript = new Script; - pNewScript->Name = "mob_zerekethvoidzone"; - pNewScript->GetAI = &GetAI_mob_zerekethvoidzoneAI; - pNewScript->RegisterSelf(); } diff --git a/scripts/outland/tempest_keep/the_eye/the_eye.cpp b/scripts/outland/tempest_keep/the_eye/the_eye.cpp index 3fb1ed148..dce079dd1 100644 --- a/scripts/outland/tempest_keep/the_eye/the_eye.cpp +++ b/scripts/outland/tempest_keep/the_eye/the_eye.cpp @@ -16,80 +16,16 @@ /* ScriptData SDName: The_Eye -SD%Complete: 100 -SDComment: +SD%Complete: 0 +SDComment: Placeholder SDCategory: Tempest Keep, The Eye EndScriptData */ /* ContentData -mob_crystalcore_devastator EndContentData */ #include "precompiled.h" -#include "the_eye.h" - -#define SPELL_COUNTERCHARGE 35035 -#define SPELL_KNOCKAWAY 22893 - -struct MANGOS_DLL_DECL mob_crystalcore_devastatorAI : public ScriptedAI -{ - mob_crystalcore_devastatorAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} - - uint32 Knockaway_Timer; - uint32 Countercharge_Timer; - - void Reset() - { - Countercharge_Timer = 9000; - Knockaway_Timer = 25000; - } - - void UpdateAI(const uint32 diff) - { - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - //Check if we have a current target - //Knockaway_Timer - if (Knockaway_Timer < diff) - { - m_creature->CastSpell(m_creature->getVictim(),SPELL_KNOCKAWAY, true); - - // current aggro target is knocked away pick new target - Unit* Target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_TOPAGGRO, 0); - - if (!Target || Target == m_creature->getVictim()) - Target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_TOPAGGRO, 1); - - if (Target) - m_creature->TauntApply(Target); - - Knockaway_Timer = 23000; - } - else Knockaway_Timer -= diff; - - //Countercharge_Timer - if (Countercharge_Timer < diff) - { - DoCastSpellIfCan(this->m_creature,SPELL_COUNTERCHARGE); - Countercharge_Timer = 45000; - }else Countercharge_Timer -= diff; - - DoMeleeAttackIfReady(); - } -}; - -CreatureAI* GetAI_mob_crystalcore_devastator(Creature* pCreature) -{ - return new mob_crystalcore_devastatorAI(pCreature); -} void AddSC_the_eye() { - Script* pNewScript; - - pNewScript = new Script; - pNewScript->Name = "mob_crystalcore_devastator"; - pNewScript->GetAI = &GetAI_mob_crystalcore_devastator; - pNewScript->RegisterSelf(); } diff --git a/scripts/outland/tempest_keep/the_mechanar/boss_gatewatcher_ironhand.cpp b/scripts/outland/tempest_keep/the_mechanar/boss_gatewatcher_ironhand.cpp index 42a7a0e93..7860f5a32 100644 --- a/scripts/outland/tempest_keep/the_mechanar/boss_gatewatcher_ironhand.cpp +++ b/scripts/outland/tempest_keep/the_mechanar/boss_gatewatcher_ironhand.cpp @@ -16,122 +16,13 @@ /* ScriptData SDName: Boss_Gatewatcher_Ironhand -SD%Complete: 75 -SDComment: +SD%Complete: 0 +SDComment: Placeholder SDCategory: Tempest Keep, The Mechanar EndScriptData */ #include "precompiled.h" -#define SAY_AGGRO_1 -1554006 -#define SAY_HAMMER_1 -1554007 -#define SAY_HAMMER_2 -1554008 -#define SAY_SLAY_1 -1554009 -#define SAY_SLAY_2 -1554010 -#define SAY_DEATH_1 -1554011 -#define EMOTE_HAMMER -1554012 - -#define SPELL_SHADOW_POWER 35322 -#define SPELL_SHADOW_POWER_H 39193 -#define SPELL_HAMMER_PUNCH 35326 -#define SPELL_JACKHAMMER 35327 -#define SPELL_JACKHAMMER_H 39194 -#define SPELL_STREAM_OF_MACHINE_FLUID 35311 - -struct MANGOS_DLL_DECL boss_gatewatcher_iron_handAI : public ScriptedAI -{ - boss_gatewatcher_iron_handAI(Creature* pCreature) : ScriptedAI(pCreature) - { - m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); - Reset(); - } - - ScriptedInstance* m_pInstance; - bool m_bIsRegularMode; - - uint32 Shadow_Power_Timer; - uint32 Jackhammer_Timer; - uint32 Stream_of_Machine_Fluid_Timer; - - void Reset() - { - Shadow_Power_Timer = 25000; - Jackhammer_Timer = 45000; - Stream_of_Machine_Fluid_Timer = 55000; - } - - void Aggro(Unit *who) - { - DoScriptText(SAY_AGGRO_1, m_creature); - } - - void KilledUnit(Unit* victim) - { - if (urand(0, 1)) - return; - - DoScriptText(urand(0, 1) ? SAY_SLAY_1 : SAY_SLAY_2, m_creature); - } - - void JustDied(Unit* Killer) - { - DoScriptText(SAY_DEATH_1, m_creature); - - if (!m_pInstance) - return; - - //TODO: Add door check/open code - } - - void UpdateAI(const uint32 diff) - { - //Return since we have no target - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - //Shadow Power - if (Shadow_Power_Timer < diff) - { - DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_SHADOW_POWER : SPELL_SHADOW_POWER_H); - Shadow_Power_Timer = urand(20000, 28000); - }else Shadow_Power_Timer -= diff; - - //Jack Hammer - if (Jackhammer_Timer < diff) - { - //TODO: expect cast this about 5 times in a row (?), announce it by emote only once - DoScriptText(EMOTE_HAMMER, m_creature); - DoCastSpellIfCan(m_creature->getVictim(), m_bIsRegularMode ? SPELL_JACKHAMMER : SPELL_JACKHAMMER_H); - - //chance to yell, but not same time as emote (after spell in fact casted) - if (urand(0, 4)) - DoScriptText(urand(0, 1) ? SAY_HAMMER_1 : SAY_HAMMER_2, m_creature); - - Jackhammer_Timer = 30000; - }else Jackhammer_Timer -= diff; - - //Stream of Machine Fluid - if (Stream_of_Machine_Fluid_Timer < diff) - { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_STREAM_OF_MACHINE_FLUID); - Stream_of_Machine_Fluid_Timer = urand(35000, 50000); - }else Stream_of_Machine_Fluid_Timer -= diff; - - DoMeleeAttackIfReady(); - } -}; -CreatureAI* GetAI_boss_gatewatcher_iron_hand(Creature* pCreature) -{ - return new boss_gatewatcher_iron_handAI(pCreature); -} - void AddSC_boss_gatewatcher_iron_hand() { - Script* pNewScript; - - pNewScript = new Script; - pNewScript->Name = "boss_gatewatcher_iron_hand"; - pNewScript->GetAI = &GetAI_boss_gatewatcher_iron_hand; - pNewScript->RegisterSelf(); } diff --git a/scripts/outland/tempest_keep/the_mechanar/boss_nethermancer_sepethrea.cpp b/scripts/outland/tempest_keep/the_mechanar/boss_nethermancer_sepethrea.cpp index 9cc3b7930..6105811e8 100644 --- a/scripts/outland/tempest_keep/the_mechanar/boss_nethermancer_sepethrea.cpp +++ b/scripts/outland/tempest_keep/the_mechanar/boss_nethermancer_sepethrea.cpp @@ -41,11 +41,6 @@ enum SPELL_DRAGONS_BREATH = 35250, NPC_RAGING_FLAMES = 20481, - - // Summons spells - SPELL_INFERNO = 35268, - SPELL_INFERNO_H = 39346, - SPELL_FIRE_TAIL = 35278, }; struct MANGOS_DLL_DECL boss_nethermancer_sepethreaAI : public ScriptedAI @@ -150,56 +145,6 @@ CreatureAI* GetAI_boss_nethermancer_sepethrea(Creature* pCreature) return new boss_nethermancer_sepethreaAI(pCreature); } -struct MANGOS_DLL_DECL mob_ragin_flamesAI : public ScriptedAI -{ - mob_ragin_flamesAI(Creature* pCreature) : ScriptedAI(pCreature) - { - m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); - Reset(); - } - - ScriptedInstance* m_pInstance; - bool m_bIsRegularMode; - - uint32 inferno_Timer; - uint32 flame_timer; - - void Reset() - { - inferno_Timer = 10000; - flame_timer = 500; - } - - void UpdateAI(const uint32 diff) - { - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - if (inferno_Timer < diff) - { - DoCastSpellIfCan(m_creature->getVictim(), m_bIsRegularMode ? SPELL_INFERNO : SPELL_INFERNO_H); - - m_creature->TauntApply(m_creature->getVictim()); - - inferno_Timer = 10000; - }else inferno_Timer -= diff; - - if (flame_timer < diff) - { - DoCastSpellIfCan(m_creature,SPELL_FIRE_TAIL); - flame_timer = 500; - }else flame_timer -=diff; - - DoMeleeAttackIfReady(); - } -}; - -CreatureAI* GetAI_mob_ragin_flames(Creature* pCreature) -{ - return new mob_ragin_flamesAI(pCreature); -} - void AddSC_boss_nethermancer_sepethrea() { Script* pNewScript; @@ -208,9 +153,4 @@ void AddSC_boss_nethermancer_sepethrea() pNewScript->Name = "boss_nethermancer_sepethrea"; pNewScript->GetAI = &GetAI_boss_nethermancer_sepethrea; pNewScript->RegisterSelf(); - - pNewScript = new Script; - pNewScript->Name = "mob_ragin_flames"; - pNewScript->GetAI = &GetAI_mob_ragin_flames; - pNewScript->RegisterSelf(); } diff --git a/scripts/outland/terokkar_forest.cpp b/scripts/outland/terokkar_forest.cpp index 7d056c56b..8a6d05b68 100644 --- a/scripts/outland/terokkar_forest.cpp +++ b/scripts/outland/terokkar_forest.cpp @@ -23,11 +23,8 @@ EndScriptData */ /* ContentData mob_unkor_the_ruthless -mob_infested_root_walker -mob_rotting_forest_rager mob_netherweb_victim npc_akuno -npc_floon npc_hungry_nether_ray npc_letoll npc_mana_bomb_exp_trigger @@ -136,65 +133,6 @@ CreatureAI* GetAI_mob_unkor_the_ruthless(Creature* pCreature) return new mob_unkor_the_ruthlessAI(pCreature); } -/*###### -## mob_infested_root_walker -######*/ - -enum -{ - SPELL_SUMMON_WOOD_MITES = 39130, -}; - -struct MANGOS_DLL_DECL mob_infested_root_walkerAI : public ScriptedAI -{ - mob_infested_root_walkerAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} - - void Reset() { } - - void DamageTaken(Unit* pDealer, uint32 &uiDamage) - { - if (m_creature->GetHealth() <= uiDamage) - if (pDealer->IsControlledByPlayer()) - if (urand(0, 3)) - //Summon Wood Mites - DoCastSpellIfCan(m_creature, SPELL_SUMMON_WOOD_MITES, CAST_TRIGGERED); - } -}; - -CreatureAI* GetAI_mob_infested_root_walker(Creature* pCreature) -{ - return new mob_infested_root_walkerAI(pCreature); -} - -/*###### -## mob_rotting_forest_rager -######*/ - -enum -{ - SPELL_SUMMON_LOTS_OF_WOOD_MIGHTS = 39134, -}; - -struct MANGOS_DLL_DECL mob_rotting_forest_ragerAI : public ScriptedAI -{ - mob_rotting_forest_ragerAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} - - void Reset() { } - - void DamageTaken(Unit* pDealer, uint32 &uiDamage) - { - if (m_creature->GetHealth() <= uiDamage) - if (pDealer->IsControlledByPlayer()) - if (urand(0, 3)) - //Summon Lots of Wood Mights - DoCastSpellIfCan(m_creature, SPELL_SUMMON_LOTS_OF_WOOD_MIGHTS, CAST_TRIGGERED); - } -}; -CreatureAI* GetAI_mob_rotting_forest_rager(Creature* pCreature) -{ - return new mob_rotting_forest_ragerAI(pCreature); -} - /*###### ## mob_netherweb_victim ######*/ @@ -349,72 +287,6 @@ CreatureAI* GetAI_npc_akuno(Creature* pCreature) return new npc_akunoAI(pCreature); } -/*###### -## npc_floon -- TODO move to EventAI -######*/ - -enum -{ - SPELL_SILENCE = 6726, - SPELL_FROSTBOLT = 9672, - SPELL_FROST_NOVA = 11831, -}; - -struct MANGOS_DLL_DECL npc_floonAI : public ScriptedAI -{ - npc_floonAI(Creature* pCreature) : ScriptedAI(pCreature) - { - m_uiNormFaction = pCreature->getFaction(); - Reset(); - } - - uint32 m_uiNormFaction; - uint32 m_uiSilence_Timer; - uint32 m_uiFrostbolt_Timer; - uint32 m_uiFrostNova_Timer; - - void Reset() - { - m_uiSilence_Timer = 2000; - m_uiFrostbolt_Timer = 4000; - m_uiFrostNova_Timer = 9000; - - if (m_creature->getFaction() != m_uiNormFaction) - m_creature->setFaction(m_uiNormFaction); - } - - void UpdateAI(const uint32 uiDiff) - { - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - if (m_uiSilence_Timer < uiDiff) - { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_SILENCE); - m_uiSilence_Timer = 30000; - }else m_uiSilence_Timer -= uiDiff; - - if (m_uiFrostNova_Timer < uiDiff) - { - DoCastSpellIfCan(m_creature,SPELL_FROST_NOVA); - m_uiFrostNova_Timer = 20000; - }else m_uiFrostNova_Timer -= uiDiff; - - if (m_uiFrostbolt_Timer < uiDiff) - { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_FROSTBOLT); - m_uiFrostbolt_Timer = 5000; - }else m_uiFrostbolt_Timer -= uiDiff; - - DoMeleeAttackIfReady(); - } -}; - -CreatureAI* GetAI_npc_floon(Creature* pCreature) -{ - return new npc_floonAI(pCreature); -} - /*###### ## npc_hungry_nether_ray ######*/ @@ -1123,16 +995,6 @@ void AddSC_terokkar_forest() pNewScript->GetAI = &GetAI_mob_unkor_the_ruthless; pNewScript->RegisterSelf(); - pNewScript = new Script; - pNewScript->Name = "mob_infested_root_walker"; - pNewScript->GetAI = &GetAI_mob_infested_root_walker; - pNewScript->RegisterSelf(); - - pNewScript = new Script; - pNewScript->Name = "mob_rotting_forest_rager"; - pNewScript->GetAI = &GetAI_mob_rotting_forest_rager; - pNewScript->RegisterSelf(); - pNewScript = new Script; pNewScript->Name = "mob_netherweb_victim"; pNewScript->GetAI = &GetAI_mob_netherweb_victim; @@ -1144,11 +1006,6 @@ void AddSC_terokkar_forest() pNewScript->pQuestAcceptNPC = &QuestAccept_npc_akuno; pNewScript->RegisterSelf(); - pNewScript = new Script; - pNewScript->Name = "npc_floon"; - pNewScript->GetAI = &GetAI_npc_floon; - pNewScript->RegisterSelf(); - pNewScript = new Script; pNewScript->Name = "npc_hungry_nether_ray"; pNewScript->GetAI = &GetAI_npc_hungry_nether_ray; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 36f0b194f..a1dc30e23 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2670" + #define SD2_REVISION_NR "2671" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 50ed43ab9..addfae9f1 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -213,20 +213,14 @@ UPDATE creature_template SET ScriptName='npc_feero_ironhand' WHERE entry=4484; /* MANA TOMBS */ UPDATE creature_template SET ScriptName='boss_pandemonius' WHERE entry=18341; UPDATE creature_template SET ScriptName='boss_nexusprince_shaffar' WHERE entry=18344; -UPDATE creature_template SET ScriptName='mob_ethereal_beacon' WHERE entry=18431; /* AUCHENAI CRYPTS */ UPDATE creature_template SET ScriptName='boss_exarch_maladaar' WHERE entry=18373; -UPDATE creature_template SET ScriptName='mob_avatar_of_martyred' WHERE entry=18478; UPDATE creature_template SET ScriptName='mob_stolen_soul' WHERE entry=18441; UPDATE creature_template SET ScriptName='boss_shirrak' WHERE entry=18371; /* SETHEKK HALLS */ UPDATE instance_template SET ScriptName='instance_sethekk_halls' WHERE map=556; -UPDATE creature_template SET ScriptName='mob_syth_fire' WHERE entry=19203; -UPDATE creature_template SET ScriptName='mob_syth_arcane' WHERE entry=19205; -UPDATE creature_template SET ScriptName='mob_syth_frost' WHERE entry=19204; -UPDATE creature_template SET ScriptName='mob_syth_shadow' WHERE entry=19206; UPDATE creature_template SET ScriptName='boss_talon_king_ikiss' WHERE entry=18473; UPDATE creature_template SET ScriptName='boss_darkweaver_syth' WHERE entry=18472; UPDATE creature_template SET ScriptName='boss_anzu' WHERE entry=23035; @@ -324,8 +318,6 @@ UPDATE creature_template SET ScriptName='npc_volcano' WHERE entry=23085; -- Supr UPDATE creature_template SET ScriptName='molten_flame' WHERE entry=23095; -- Molten Flame in SUpremus UPDATE creature_template SET ScriptName='mob_ashtongue_channeler' WHERE entry=23421; -- Ashtongue CHanneler in Shade of AKama UPDATE creature_template SET ScriptName='mob_ashtongue_sorcerer' WHERE entry=23215; -- Ashtongue Sorcerer in Shade of Akama -UPDATE creature_template SET ScriptName='npc_enslaved_soul' WHERE entry=23469; -- Enslaved Soul in Reliquary Event -UPDATE creature_template SET ScriptName='mob_doom_blossom' WHERE entry=23123; -- Doom Blossoms in Teron Gorefiend's encounter UPDATE creature_template SET ScriptName='npc_spirit_of_olum' WHERE entry=23411; -- UPDATE creature_template SET ScriptName='mob_shadowy_construct' WHERE entry=23111; -- Shadowy Construct in Teron Gorefiend's encounter. Commented until Mind Control is implemented. @@ -464,7 +456,6 @@ UPDATE creature_template SET ScriptName='boss_hydromancer_thespia' WHERE entry=1 UPDATE creature_template SET ScriptName='boss_mekgineer_steamrigger' WHERE entry=17796; UPDATE creature_template SET ScriptName='boss_warlord_kalithresh' WHERE entry=17798; UPDATE gameobject_template SET ScriptName='go_main_chambers_access_panel' WHERE entry IN (184125,184126); -UPDATE creature_template SET ScriptName='mob_coilfang_waterelemental' WHERE entry=17917; UPDATE creature_template SET ScriptName='mob_naga_distiller' WHERE entry=17954; UPDATE creature_template SET ScriptName='mob_steamrigger_mechanic' WHERE entry=17951; @@ -473,7 +464,6 @@ UPDATE instance_template SET ScriptName='instance_serpent_shrine' WHERE map=548; UPDATE creature_template SET ScriptName='boss_hydross_the_unstable' WHERE entry=21216; /* Leotheras the Blind event */ UPDATE creature_template SET ScriptName='boss_leotheras_the_blind' WHERE entry=21215; -UPDATE creature_template SET ScriptName='boss_leotheras_the_blind_demonform' WHERE entry=21875; /* Fathom-lord Karathress event */ UPDATE creature_template SET ScriptName='boss_fathomlord_karathress' WHERE entry=21214; UPDATE creature_template SET ScriptName='boss_fathomguard_sharkkis' WHERE entry=21966; @@ -486,7 +476,6 @@ UPDATE creature_template SET ScriptName='mob_water_globule' WHERE entry=21913; UPDATE creature_template SET ScriptName='boss_lady_vashj' WHERE entry=21212; UPDATE creature_template SET ScriptName='mob_enchanted_elemental' WHERE entry=21958; UPDATE creature_template SET ScriptName='mob_tainted_elemental' WHERE entry=22009; -UPDATE creature_template SET ScriptName='mob_toxic_sporebat' WHERE entry=22140; UPDATE creature_template SET ScriptName='mob_shield_generator_channel' WHERE entry=19870; /* The Lurker Below event */ UPDATE gameobject_template SET ScriptName='go_strange_pool' WHERE entry=184956; @@ -1142,9 +1131,7 @@ UPDATE creature_template SET ScriptName='npc_mist' WHERE entry=3568; /* */ /* THE MECHANAR */ -UPDATE creature_template SET ScriptName='boss_gatewatcher_iron_hand' WHERE entry=19710; UPDATE creature_template SET ScriptName='boss_nethermancer_sepethrea' WHERE entry=19221; -UPDATE creature_template SET ScriptName='mob_ragin_flames' WHERE entry=20481; UPDATE creature_template SET ScriptName='boss_pathaleon_the_calculator' WHERE entry=19220; UPDATE creature_template SET ScriptName='mob_nether_wraith' WHERE entry=21062; UPDATE instance_template SET ScriptName='instance_mechanar' WHERE map=554; @@ -1157,7 +1144,6 @@ UPDATE creature_template SET ScriptName='mob_warp_splinter_treant' WHERE entry=1 /* THE ARCATRAZ */ UPDATE instance_template SET ScriptName='instance_arcatraz' WHERE map=552; -UPDATE creature_template SET ScriptName='mob_zerekethvoidzone' WHERE entry=21101; UPDATE creature_template SET ScriptName='boss_harbinger_skyriss' WHERE entry=20912; UPDATE creature_template SET ScriptName='boss_dalliah' WHERE entry=20885; UPDATE creature_template SET ScriptName='boss_soccothrates' WHERE entry=20886; @@ -1166,8 +1152,6 @@ UPDATE creature_template SET ScriptName='npc_millhouse_manastorm' WHERE entry=20 /* THE EYE */ UPDATE instance_template SET ScriptName='instance_the_eye' WHERE map=550; -/* The Eye Trash Mobs */ -UPDATE creature_template SET ScriptName='mob_crystalcore_devastator' WHERE entry=20040; /* Al'ar event */ UPDATE creature_template SET ScriptName='boss_alar' WHERE entry=19514; /* Void Reaver event */ @@ -1214,12 +1198,9 @@ INSERT INTO scripted_areatrigger VALUES (4034,'at_stomach_cthun'); /* TEROKKAR FOREST */ -UPDATE creature_template SET ScriptName='mob_infested_root_walker' WHERE entry=22095; UPDATE creature_template SET ScriptName='mob_netherweb_victim' WHERE entry=22355; -UPDATE creature_template SET ScriptName='mob_rotting_forest_rager' WHERE entry=22307; UPDATE creature_template SET ScriptName='mob_unkor_the_ruthless' WHERE entry=18262; UPDATE creature_template SET ScriptName='npc_akuno' WHERE entry=22377; -UPDATE creature_template SET ScriptName='npc_floon' WHERE entry=18588; UPDATE creature_template SET ScriptName='npc_hungry_nether_ray' WHERE entry=23439; UPDATE creature_template SET ScriptName='npc_letoll' WHERE entry=22458; UPDATE creature_template SET ScriptName='npc_mana_bomb_exp_trigger' WHERE entry=20767; diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index de93f3970..639520994 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -2258,14 +2258,13 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1554003,'REUSE_ME',0,0,0,0,'REUSE_ME'), (-1554004,'REUSE_ME',0,0,0,0,'REUSE_ME'), (-1554005,'REUSE_ME',0,0,0,0,'REUSE_ME'), - -(-1554006,'You have approximately five seconds to live.',11109,1,0,0,'ironhand SAY_AGGRO_1'), -(-1554007,'With the precise angle and velocity...',11112,1,0,0,'ironhand SAY_HAMMER_1'), -(-1554008,'Low tech yet quiet effective!',11113,1,0,0,'ironhand SAY_HAMMER_2'), -(-1554009,'A foregone conclusion.',11110,1,0,0,'ironhand SAY_SLAY_1'), -(-1554010,'The processing will continue a schedule!',11111,1,0,0,'ironhand SAY_SLAY_2'), -(-1554011,'My calculations did not...',11114,1,0,0,'ironhand SAY_DEATH_1'), -(-1554012,'%s raises his hammer menacingly...',0,3,0,0,'ironhand EMOTE_HAMMER'), +(-1554006,'REUSE_ME',0,0,0,0,'REUSE_ME'), +(-1554007,'REUSE_ME',0,0,0,0,'REUSE_ME'), +(-1554008,'REUSE_ME',0,0,0,0,'REUSE_ME'), +(-1554009,'REUSE_ME',0,0,0,0,'REUSE_ME'), +(-1554010,'REUSE_ME',0,0,0,0,'REUSE_ME'), +(-1554011,'REUSE_ME',0,0,0,0,'REUSE_ME'), +(-1554012,'REUSE_ME',0,0,0,0,'REUSE_ME'), (-1554013,'Don\'t value your life very much, do you?',11186,1,0,0,'sepethrea SAY_AGGRO'), (-1554014,'I am not alone.',11191,1,0,0,'sepethrea SAY_SUMMON'), diff --git a/sql/updates/r2671_mangos.sql b/sql/updates/r2671_mangos.sql new file mode 100644 index 000000000..0dad5e263 --- /dev/null +++ b/sql/updates/r2671_mangos.sql @@ -0,0 +1,18 @@ +UPDATE creature_template SET ScriptName='' WHERE entry=18478; +UPDATE creature_template SET ScriptName='' WHERE entry=18431; +UPDATE creature_template SET ScriptName='' WHERE entry=19203; +UPDATE creature_template SET ScriptName='' WHERE entry=19205; +UPDATE creature_template SET ScriptName='' WHERE entry=19204; +UPDATE creature_template SET ScriptName='' WHERE entry=19206; +UPDATE creature_template SET ScriptName='' WHERE entry=17917; +UPDATE creature_template SET ScriptName='' WHERE entry=21101; +UPDATE creature_template SET ScriptName='' WHERE entry=20040; +UPDATE creature_template SET ScriptName='' WHERE entry=19710; +UPDATE creature_template SET ScriptName='' WHERE entry=20481; +UPDATE creature_template SET ScriptName='' WHERE entry=22140; +UPDATE creature_template SET ScriptName='' WHERE entry=21875; +UPDATE creature_template SET ScriptName='' WHERE entry=23469; +UPDATE creature_template SET ScriptName='' WHERE entry=23123; +UPDATE creature_template SET ScriptName='' WHERE entry=18588; +UPDATE creature_template SET ScriptName='' WHERE entry=22095; +UPDATE creature_template SET ScriptName='' WHERE entry=22307; diff --git a/sql/updates/r2671_scriptdev2.sql b/sql/updates/r2671_scriptdev2.sql new file mode 100644 index 000000000..525d67855 --- /dev/null +++ b/sql/updates/r2671_scriptdev2.sql @@ -0,0 +1,9 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1554012 AND -1554006; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1554006,'REUSE_ME',0,0,0,0,'REUSE_ME'), +(-1554007,'REUSE_ME',0,0,0,0,'REUSE_ME'), +(-1554008,'REUSE_ME',0,0,0,0,'REUSE_ME'), +(-1554009,'REUSE_ME',0,0,0,0,'REUSE_ME'), +(-1554010,'REUSE_ME',0,0,0,0,'REUSE_ME'), +(-1554011,'REUSE_ME',0,0,0,0,'REUSE_ME'), +(-1554012,'REUSE_ME',0,0,0,0,'REUSE_ME'); From 2c141bd39f9d411aba0eaa06cbbc2653b751b614 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sat, 18 Aug 2012 13:18:17 +0300 Subject: [PATCH 0660/1172] [2672] Small cleanup for Warbringer Omrogg - Shattered Halls --- .../boss_warbringer_omrogg.cpp | 181 ++++++++++-------- sd2_revision_nr.h | 2 +- 2 files changed, 101 insertions(+), 82 deletions(-) diff --git a/scripts/outland/hellfire_citadel/shattered_halls/boss_warbringer_omrogg.cpp b/scripts/outland/hellfire_citadel/shattered_halls/boss_warbringer_omrogg.cpp index bbee1ec9c..14095e274 100644 --- a/scripts/outland/hellfire_citadel/shattered_halls/boss_warbringer_omrogg.cpp +++ b/scripts/outland/hellfire_citadel/shattered_halls/boss_warbringer_omrogg.cpp @@ -102,12 +102,12 @@ struct MANGOS_DLL_DECL mob_omrogg_headsAI : public ScriptedAI { mob_omrogg_headsAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } - uint32 m_uiDeath_Timer; + uint32 m_uiDeathTimer; bool m_bDeathYell; void Reset() { - m_uiDeath_Timer = 4000; + m_uiDeathTimer = 2000; m_bDeathYell = false; } @@ -121,12 +121,14 @@ struct MANGOS_DLL_DECL mob_omrogg_headsAI : public ScriptedAI if (!m_bDeathYell) return; - if (m_uiDeath_Timer < uiDiff) + if (m_uiDeathTimer < uiDiff) { DoScriptText(YELL_DIE_R, m_creature); - m_uiDeath_Timer = false; - m_creature->SetDeathState(JUST_DIED); - }else m_uiDeath_Timer -= uiDiff; + m_uiDeathTimer = 10000; + m_creature->ForcedDespawn(1000); + } + else + m_uiDeathTimer -= uiDiff; } }; @@ -154,43 +156,28 @@ struct MANGOS_DLL_DECL boss_warbringer_omroggAI : public ScriptedAI bool m_bThreatYell2; bool m_bKillingYell; - uint32 m_uiDelay_Timer; - uint32 m_uiBlastWave_Timer; + uint32 m_uiDelayTimer; + uint32 m_uiBlastWaveTimer; uint32 m_uiBlastCount; - uint32 m_uiFear_Timer; - uint32 m_uiBurningMaul_Timer; - uint32 m_uiThunderClap_Timer; - uint32 m_uiResetThreat_Timer; + uint32 m_uiFearTimer; + uint32 m_uiBurningMaulTimer; + uint32 m_uiThunderClapTimer; + uint32 m_uiResetThreatTimer; void Reset() { - if (Creature* pLeftHead = m_creature->GetMap()->GetCreature(m_leftHeadGuid)) - { - pLeftHead->SetDeathState(JUST_DIED); - m_leftHeadGuid.Clear(); - } - - if (Creature* pRightHead = m_creature->GetMap()->GetCreature(m_rightHeadGuid)) - { - pRightHead->SetDeathState(JUST_DIED); - m_rightHeadGuid.Clear(); - } - - m_bAggroYell = false; - m_bThreatYell = false; - m_bThreatYell2 = false; - m_bKillingYell = false; - - m_uiDelay_Timer = 4000; - m_uiBlastWave_Timer = 0; - m_uiBlastCount = 0; - m_uiFear_Timer = 8000; - m_uiBurningMaul_Timer = 25000; - m_uiThunderClap_Timer = 15000; - m_uiResetThreat_Timer = 30000; - - if (m_pInstance) - m_pInstance->SetData(TYPE_OMROGG, NOT_STARTED); //End boss can use this later. O'mrogg must be defeated(DONE) or he will come to aid. + m_bAggroYell = false; + m_bThreatYell = false; + m_bThreatYell2 = false; + m_bKillingYell = false; + + m_uiDelayTimer = 4000; + m_uiBlastWaveTimer = 0; + m_uiBlastCount = 0; + m_uiFearTimer = 8000; + m_uiBurningMaulTimer = 25000; + m_uiThunderClapTimer = 15000; + m_uiResetThreatTimer = 30000; } void DoYellForThreat() @@ -207,7 +194,7 @@ struct MANGOS_DLL_DECL boss_warbringer_omroggAI : public ScriptedAI DoScriptText(Threat[m_iThreat].id, pSource); - m_uiDelay_Timer = 3500; + m_uiDelayTimer = 3500; m_bThreatYell = true; } @@ -222,7 +209,7 @@ struct MANGOS_DLL_DECL boss_warbringer_omroggAI : public ScriptedAI DoScriptText(GoCombat[m_iAggro].id, pLeftHead); - m_uiDelay_Timer = 3500; + m_uiDelayTimer = 3500; m_bAggroYell = true; } @@ -234,13 +221,8 @@ struct MANGOS_DLL_DECL boss_warbringer_omroggAI : public ScriptedAI { if (pSummoned->GetEntry() == NPC_LEFT_HEAD) m_leftHeadGuid = pSummoned->GetObjectGuid(); - - if (pSummoned->GetEntry() == NPC_RIGHT_HEAD) + else if (pSummoned->GetEntry() == NPC_RIGHT_HEAD) m_rightHeadGuid = pSummoned->GetObjectGuid(); - - //summoned->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - //summoned->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - pSummoned->SetVisibility(VISIBILITY_OFF); } void KilledUnit(Unit* pVictim) @@ -259,7 +241,7 @@ struct MANGOS_DLL_DECL boss_warbringer_omroggAI : public ScriptedAI { case 0: DoScriptText(Killing[m_iKilling].id, pSource); - m_uiDelay_Timer = 3500; + m_uiDelayTimer = 3500; m_bKillingYell = true; break; case 1: @@ -278,7 +260,7 @@ struct MANGOS_DLL_DECL boss_warbringer_omroggAI : public ScriptedAI return; DoScriptText(YELL_DIE_L, pLeftHead); - pLeftHead->SetDeathState(JUST_DIED); + pLeftHead->ForcedDespawn(1000); if (mob_omrogg_headsAI* pHeadAI = dynamic_cast(pRightHead->AI())) pHeadAI->DoDeathYell(); @@ -287,11 +269,29 @@ struct MANGOS_DLL_DECL boss_warbringer_omroggAI : public ScriptedAI m_pInstance->SetData(TYPE_OMROGG, DONE); } + void JustReachedHome() + { + if (Creature* pLeftHead = m_creature->GetMap()->GetCreature(m_leftHeadGuid)) + { + pLeftHead->ForcedDespawn(); + m_leftHeadGuid.Clear(); + } + + if (Creature* pRightHead = m_creature->GetMap()->GetCreature(m_rightHeadGuid)) + { + pRightHead->ForcedDespawn(); + m_rightHeadGuid.Clear(); + } + + if (m_pInstance) + m_pInstance->SetData(TYPE_OMROGG, FAIL); + } + void UpdateAI(const uint32 uiDiff) { - if (m_uiDelay_Timer < uiDiff) + if (m_uiDelayTimer < uiDiff) { - m_uiDelay_Timer = 3500; + m_uiDelayTimer = 3500; Creature* pLeftHead = m_creature->GetMap()->GetCreature(m_leftHeadGuid); Creature* pRightHead = m_creature->GetMap()->GetCreature(m_rightHeadGuid); @@ -329,52 +329,71 @@ struct MANGOS_DLL_DECL boss_warbringer_omroggAI : public ScriptedAI DoScriptText(KillingDelay[m_iKilling].id, pSource); m_bKillingYell = false; } - }else m_uiDelay_Timer -= uiDiff; + } + else + m_uiDelayTimer -= uiDiff; if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - if (m_uiBlastCount && m_uiBlastWave_Timer <= uiDiff) + if (m_uiBlastCount && m_uiBlastWaveTimer) { - DoCastSpellIfCan(m_creature,SPELL_BLAST_WAVE); - m_uiBlastWave_Timer = 5000; - ++m_uiBlastCount; - - if (m_uiBlastCount == 3) - m_uiBlastCount = 0; - }else m_uiBlastWave_Timer -= uiDiff; + if (m_uiBlastWaveTimer <= uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_BLAST_WAVE) == CAST_OK) + { + m_uiBlastWaveTimer = 5000; + ++m_uiBlastCount; + + if (m_uiBlastCount == 3) + m_uiBlastCount = 0; + } + } + else + m_uiBlastWaveTimer -= uiDiff; + } - if (m_uiBurningMaul_Timer < uiDiff) + if (m_uiBurningMaulTimer < uiDiff) { - DoScriptText(EMOTE_ENRAGE, m_creature); - DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_BURNING_MAUL : SPELL_BURNING_MAUL_H); - m_uiBurningMaul_Timer = 40000; - m_uiBlastWave_Timer = 16000; - m_uiBlastCount = 1; - }else m_uiBurningMaul_Timer -= uiDiff; - - if (m_uiResetThreat_Timer < uiDiff) + if (DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_BURNING_MAUL : SPELL_BURNING_MAUL_H) == CAST_OK) + { + DoScriptText(EMOTE_ENRAGE, m_creature); + m_uiBurningMaulTimer = 40000; + m_uiBlastWaveTimer = 16000; + m_uiBlastCount = 1; + } + } + else + m_uiBurningMaulTimer -= uiDiff; + + if (m_uiResetThreatTimer < uiDiff) { - if (Unit *target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) { DoYellForThreat(); DoResetThreat(); - m_creature->AddThreat(target); + AttackStart(pTarget); } - m_uiResetThreat_Timer = urand(25000, 40000); - }else m_uiResetThreat_Timer -= uiDiff; + m_uiResetThreatTimer = urand(25000, 40000); + } + else + m_uiResetThreatTimer -= uiDiff; - if (m_uiFear_Timer < uiDiff) + if (m_uiFearTimer < uiDiff) { - DoCastSpellIfCan(m_creature,SPELL_FEAR); - m_uiFear_Timer = urand(15000, 35000); - }else m_uiFear_Timer -= uiDiff; + if (DoCastSpellIfCan(m_creature, SPELL_FEAR) == CAST_OK) + m_uiFearTimer = urand(15000, 35000); + } + else + m_uiFearTimer -= uiDiff; - if (m_uiThunderClap_Timer < uiDiff) + if (m_uiThunderClapTimer < uiDiff) { - DoCastSpellIfCan(m_creature,SPELL_THUNDERCLAP); - m_uiThunderClap_Timer = urand(15000, 30000); - }else m_uiThunderClap_Timer -= uiDiff; + if (DoCastSpellIfCan(m_creature, SPELL_THUNDERCLAP) == CAST_OK) + m_uiThunderClapTimer = urand(15000, 30000); + } + else + m_uiThunderClapTimer -= uiDiff; DoMeleeAttackIfReady(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index a1dc30e23..f900fd91c 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2671" + #define SD2_REVISION_NR "2672" #endif // __SD2_REVISION_NR_H__ From d1fc15bfde7817aa3d1efcbf893cfbc5e57f081e Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sat, 18 Aug 2012 14:30:25 +0300 Subject: [PATCH 0661/1172] [2673] EventAI cleanup Part II - Kalimdor --- .../caverns_of_time/hyjal/boss_archimonde.cpp | 36 ---- .../old_hillsbrad/boss_captain_skarloc.cpp | 129 +----------- .../old_hillsbrad/boss_epoch_hunter.cpp | 115 +---------- .../old_hillsbrad/boss_leutenant_drake.cpp | 164 +--------------- .../old_hillsbrad/instance_old_hillsbrad.cpp | 16 +- .../old_hillsbrad/old_hillsbrad.cpp | 31 ++- .../old_hillsbrad/old_hillsbrad.h | 1 + .../maraudon/boss_celebras_the_cursed.cpp | 72 +------ scripts/kalimdor/maraudon/boss_landslide.cpp | 67 +------ .../maraudon/boss_princess_theradras.cpp | 81 +------- scripts/kalimdor/orgrimmar.cpp | 48 +---- .../boss_amnennar_the_coldbringer.cpp | 106 +--------- .../temple_of_ahnqiraj/boss_cthun.cpp | 183 ------------------ scripts/kalimdor/thunder_bluff.cpp | 83 +------- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 13 -- sql/scriptdev2_script_full.sql | 51 ++--- sql/updates/r2673_mangos.sql | 13 ++ sql/updates/r2673_scriptdev2.sql | 32 +++ 19 files changed, 135 insertions(+), 1108 deletions(-) create mode 100644 sql/updates/r2673_mangos.sql create mode 100644 sql/updates/r2673_scriptdev2.sql diff --git a/scripts/kalimdor/caverns_of_time/hyjal/boss_archimonde.cpp b/scripts/kalimdor/caverns_of_time/hyjal/boss_archimonde.cpp index 47df75285..35a9ea0f7 100644 --- a/scripts/kalimdor/caverns_of_time/hyjal/boss_archimonde.cpp +++ b/scripts/kalimdor/caverns_of_time/hyjal/boss_archimonde.cpp @@ -404,32 +404,6 @@ struct MANGOS_DLL_DECL npc_doomfire_spiritAI : public ScriptedAI } }; -struct mob_ancient_wispAI : public ScriptedAI -{ - mob_ancient_wispAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } - - uint32 m_uiCheckTimer; - - void Reset() - { - m_uiCheckTimer = 1000; - } - - void UpdateAI(const uint32 uiDiff) - { - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - if (m_uiCheckTimer < uiDiff) - { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_ANCIENT_SPARK); - m_uiCheckTimer = urand(2000, 3000); - } - else - m_uiCheckTimer -= uiDiff; - } -}; - CreatureAI* GetAI_boss_archimonde(Creature* pCreature) { return new boss_archimondeAI(pCreature); @@ -440,11 +414,6 @@ CreatureAI* GetAI_npc_doomfire_spirit(Creature* pCreature) return new npc_doomfire_spiritAI(pCreature); } -CreatureAI* GetAI_mob_ancient_wisp(Creature* pCreature) -{ - return new mob_ancient_wispAI(pCreature); -} - void AddSC_boss_archimonde() { Script* pNewScript; @@ -458,9 +427,4 @@ void AddSC_boss_archimonde() pNewScript->Name = "npc_doomfire_spirit"; pNewScript->GetAI = &GetAI_npc_doomfire_spirit; pNewScript->RegisterSelf(); - - pNewScript = new Script; - pNewScript->Name = "mob_ancient_wisp"; - pNewScript->GetAI = &GetAI_mob_ancient_wisp; - pNewScript->RegisterSelf(); } diff --git a/scripts/kalimdor/caverns_of_time/old_hillsbrad/boss_captain_skarloc.cpp b/scripts/kalimdor/caverns_of_time/old_hillsbrad/boss_captain_skarloc.cpp index cafed2178..91cd01e76 100644 --- a/scripts/kalimdor/caverns_of_time/old_hillsbrad/boss_captain_skarloc.cpp +++ b/scripts/kalimdor/caverns_of_time/old_hillsbrad/boss_captain_skarloc.cpp @@ -16,138 +16,13 @@ /* ScriptData SDName: Boss_Captain_Skarloc -SD%Complete: 75 -SDComment: Missing adds, missing waypoints to move up to Thrall once spawned + speech before enter combat. +SD%Complete: 0 +SDComment: Placeholder SDCategory: Caverns of Time, Old Hillsbrad Foothills EndScriptData */ #include "precompiled.h" -#include "old_hillsbrad.h" - -#define SAY_ENTER -1560000 -#define SAY_TAUNT1 -1560001 -#define SAY_TAUNT2 -1560002 -#define SAY_SLAY1 -1560003 -#define SAY_SLAY2 -1560004 -#define SAY_DEATH -1560005 - -#define SPELL_HOLY_LIGHT 29427 -#define SPELL_CLEANSE 29380 -#define SPELL_HAMMER_OF_JUSTICE 13005 -#define SPELL_HOLY_SHIELD 31904 -#define SPELL_DEVOTION_AURA 8258 -#define SPELL_CONSECRATION 38385 - -struct MANGOS_DLL_DECL boss_captain_skarlocAI : public ScriptedAI -{ - boss_captain_skarlocAI(Creature* pCreature) : ScriptedAI(pCreature) - { - m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - Reset(); - } - - ScriptedInstance* m_pInstance; - - uint32 Holy_Light_Timer; - uint32 Cleanse_Timer; - uint32 HammerOfJustice_Timer; - uint32 HolyShield_Timer; - uint32 DevotionAura_Timer; - uint32 Consecration_Timer; - - void Reset() - { - Holy_Light_Timer = 30000; - Cleanse_Timer = 10000; - HammerOfJustice_Timer = 60000; - HolyShield_Timer = 240000; - DevotionAura_Timer = 3000; - Consecration_Timer = 8000; - } - - void Aggro(Unit *who) - { - //This is not correct. Should taunt Thrall before engage in combat - DoScriptText(SAY_TAUNT1, m_creature); - DoScriptText(SAY_TAUNT2, m_creature); - } - - void KilledUnit(Unit *victim) - { - DoScriptText(urand(0, 1) ? SAY_SLAY1 : SAY_SLAY2, m_creature); - } - - void JustDied(Unit *victim) - { - DoScriptText(SAY_DEATH, m_creature); - - if (m_pInstance && m_pInstance->GetData(TYPE_THRALL_EVENT) == IN_PROGRESS) - m_pInstance->SetData(TYPE_THRALL_PART1, DONE); - } - - void UpdateAI(const uint32 diff) - { - //Return since we have no target - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - //Holy_Light - if (Holy_Light_Timer < diff) - { - DoCastSpellIfCan(m_creature, SPELL_HOLY_LIGHT); - Holy_Light_Timer = urand(20000, 30000); - }else Holy_Light_Timer -= diff; - - //Cleanse - if (Cleanse_Timer < diff) - { - DoCastSpellIfCan(m_creature, SPELL_CLEANSE); - Cleanse_Timer = 10000; - } else Cleanse_Timer -= diff; - - //Hammer of Justice - if (HammerOfJustice_Timer < diff) - { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_HAMMER_OF_JUSTICE); - HammerOfJustice_Timer = urand(20000, 35000); - }else HammerOfJustice_Timer -= diff; - - //Holy Shield - if (HolyShield_Timer < diff) - { - DoCastSpellIfCan(m_creature, SPELL_HOLY_SHIELD); - HolyShield_Timer = 240000; - }else HolyShield_Timer -= diff; - - //Devotion_Aura - if (DevotionAura_Timer < diff) - { - DoCastSpellIfCan(m_creature, SPELL_DEVOTION_AURA); - DevotionAura_Timer = urand(45000, 55000); - }else DevotionAura_Timer -= diff; - - //Consecration - if (Consecration_Timer < diff) - { - //DoCastSpellIfCan(m_creature->getVictim(), SPELL_CONSECRATION); - Consecration_Timer = urand(5000, 10000); - }else Consecration_Timer -= diff; - - DoMeleeAttackIfReady(); - } -}; - -CreatureAI* GetAI_boss_captain_skarloc(Creature* pCreature) -{ - return new boss_captain_skarlocAI(pCreature); -} void AddSC_boss_captain_skarloc() { - Script* pNewScript; - - pNewScript = new Script; - pNewScript->Name = "boss_captain_skarloc"; - pNewScript->GetAI = &GetAI_boss_captain_skarloc; - pNewScript->RegisterSelf(); } diff --git a/scripts/kalimdor/caverns_of_time/old_hillsbrad/boss_epoch_hunter.cpp b/scripts/kalimdor/caverns_of_time/old_hillsbrad/boss_epoch_hunter.cpp index b97cd6282..0bba8c74f 100644 --- a/scripts/kalimdor/caverns_of_time/old_hillsbrad/boss_epoch_hunter.cpp +++ b/scripts/kalimdor/caverns_of_time/old_hillsbrad/boss_epoch_hunter.cpp @@ -16,124 +16,13 @@ /* ScriptData SDName: Boss_Epoch_Hunter -SD%Complete: 60 -SDComment: Missing spawns pre-event, missing speech to be coordinated with rest of escort event. +SD%Complete: 0 +SDComment: Placeholder SDCategory: Caverns of Time, Old Hillsbrad Foothills EndScriptData */ #include "precompiled.h" -#include "old_hillsbrad.h" - -#define SAY_ENTER1 -1560013 -#define SAY_ENTER2 -1560014 -#define SAY_ENTER3 -1560015 -#define SAY_AGGRO1 -1560016 -#define SAY_AGGRO2 -1560017 -#define SAY_SLAY1 -1560018 -#define SAY_SLAY2 -1560019 -#define SAY_BREATH1 -1560020 -#define SAY_BREATH2 -1560021 -#define SAY_DEATH -1560022 - -#define SPELL_SAND_BREATH 31914 -#define SPELL_IMPENDING_DEATH 31916 -#define SPELL_MAGIC_DISRUPTION_AURA 33834 -#define SPELL_WING_BUFFET 31475 - -struct MANGOS_DLL_DECL boss_epoch_hunterAI : public ScriptedAI -{ - boss_epoch_hunterAI(Creature* pCreature) : ScriptedAI(pCreature) - { - m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - Reset(); - } - - ScriptedInstance* m_pInstance; - - uint32 SandBreath_Timer; - uint32 ImpendingDeath_Timer; - uint32 WingBuffet_Timer; - uint32 Mda_Timer; - - void Reset() - { - SandBreath_Timer = urand(8000, 16000); - ImpendingDeath_Timer = urand(25000, 30000); - WingBuffet_Timer = 35000; - Mda_Timer = 40000; - } - - void Aggro(Unit *who) - { - DoScriptText(urand(0, 1) ? SAY_AGGRO1 : SAY_AGGRO2, m_creature); - } - - void KilledUnit(Unit *victim) - { - DoScriptText(urand(0, 1) ? SAY_SLAY1 : SAY_SLAY2, m_creature); - } - - void JustDied(Unit *victim) - { - DoScriptText(SAY_DEATH, m_creature); - - if (m_pInstance && m_pInstance->GetData(TYPE_THRALL_EVENT) == IN_PROGRESS) - m_pInstance->SetData(TYPE_THRALL_PART4, DONE); - } - - void UpdateAI(const uint32 diff) - { - //Return since we have no target - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - //Sand Breath - if (SandBreath_Timer < diff) - { - if (m_creature->IsNonMeleeSpellCasted(false)) - m_creature->InterruptNonMeleeSpells(false); - - DoCastSpellIfCan(m_creature->getVictim(),SPELL_SAND_BREATH); - - DoScriptText(urand(0, 1) ? SAY_BREATH1 : SAY_BREATH2, m_creature); - - SandBreath_Timer = urand(10000, 20000); - }else SandBreath_Timer -= diff; - - if (ImpendingDeath_Timer < diff) - { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_IMPENDING_DEATH); - ImpendingDeath_Timer = urand(25000, 30000); - }else ImpendingDeath_Timer -= diff; - - if (WingBuffet_Timer < diff) - { - if (Unit *target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) - DoCastSpellIfCan(target,SPELL_WING_BUFFET); - WingBuffet_Timer = urand(25000, 35000); - }else WingBuffet_Timer -= diff; - - if (Mda_Timer < diff) - { - DoCastSpellIfCan(m_creature,SPELL_MAGIC_DISRUPTION_AURA); - Mda_Timer = 15000; - }else Mda_Timer -= diff; - - DoMeleeAttackIfReady(); - } -}; - -CreatureAI* GetAI_boss_epoch_hunter(Creature* pCreature) -{ - return new boss_epoch_hunterAI(pCreature); -} void AddSC_boss_epoch_hunter() { - Script* pNewScript; - - pNewScript = new Script; - pNewScript->Name = "boss_epoch_hunter"; - pNewScript->GetAI = &GetAI_boss_epoch_hunter; - pNewScript->RegisterSelf(); } diff --git a/scripts/kalimdor/caverns_of_time/old_hillsbrad/boss_leutenant_drake.cpp b/scripts/kalimdor/caverns_of_time/old_hillsbrad/boss_leutenant_drake.cpp index b0d78db4f..e12f8f151 100644 --- a/scripts/kalimdor/caverns_of_time/old_hillsbrad/boss_leutenant_drake.cpp +++ b/scripts/kalimdor/caverns_of_time/old_hillsbrad/boss_leutenant_drake.cpp @@ -16,173 +16,13 @@ /* ScriptData SDName: Boss_Luetenant_Drake -SD%Complete: 70 -SDComment: Missing proper code for patrolling area after being spawned. Script for GO (barrels) quest 10283 +SD%Complete: 0 +SDComment: Placeholder SDCategory: Caverns of Time, Old Hillsbrad Foothills EndScriptData */ #include "precompiled.h" -#include "old_hillsbrad.h" -#include "escort_ai.h" - -/*###### -## go_barrel_old_hillsbrad -######*/ - -bool GOUse_go_barrel_old_hillsbrad(Player* pPlayer, GameObject* pGo) -{ - if (ScriptedInstance* pInstance = (ScriptedInstance*)pGo->GetInstanceData()) - { - if (pInstance->GetData(TYPE_BARREL_DIVERSION) == DONE) - return false; - - pInstance->SetData(TYPE_BARREL_DIVERSION, IN_PROGRESS); - } - return false; -} - -/*###### -## boss_lieutenant_drake -######*/ - -#define SAY_ENTER -1560006 -#define SAY_AGGRO -1560007 -#define SAY_SLAY1 -1560008 -#define SAY_SLAY2 -1560009 -#define SAY_MORTAL -1560010 -#define SAY_SHOUT -1560011 -#define SAY_DEATH -1560012 - -#define SPELL_WHIRLWIND 31909 -#define SPELL_HAMSTRING 9080 -#define SPELL_MORTAL_STRIKE 31911 -#define SPELL_FRIGHTENING_SHOUT 33789 - -struct Location -{ - uint32 wpId; - float x; - float y; - float z; -}; - -static Location DrakeWP[]= -{ - {0, 2125.84f, 88.2535f, 54.8830f}, - {1, 2111.01f, 93.8022f, 52.6356f}, - {2, 2106.70f, 114.753f, 53.1965f}, - {3, 2107.76f, 138.746f, 52.5109f}, - {4, 2114.83f, 160.142f, 52.4738f}, - {5, 2125.24f, 178.909f, 52.7283f}, - {6, 2151.02f, 208.901f, 53.1551f}, - {7, 2177.00f, 233.069f, 52.4409f}, - {8, 2190.71f, 227.831f, 53.2742f}, - {9, 2178.14f, 214.219f, 53.0779f}, - {10, 2154.99f, 202.795f, 52.6446f}, - {11, 2132.00f, 191.834f, 52.5709f}, - {12, 2117.59f, 166.708f, 52.7686f}, - {13, 2093.61f, 139.441f, 52.7616f}, - {14, 2086.29f, 104.950f, 52.9246f}, - {15, 2094.23f, 81.2788f, 52.6946f}, - {16, 2108.70f, 85.3075f, 53.3294f}, - {17, 2125.50f, 88.9481f, 54.7953f}, - {18, 2128.20f, 70.9763f, 64.4221f} -}; - -struct MANGOS_DLL_DECL boss_lieutenant_drakeAI : public ScriptedAI -{ - boss_lieutenant_drakeAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} - - bool CanPatrol; - uint32 wpId; - - uint32 Whirlwind_Timer; - uint32 Fear_Timer; - uint32 MortalStrike_Timer; - uint32 ExplodingShout_Timer; - - void Reset() - { - CanPatrol = true; - wpId = 0; - - Whirlwind_Timer = 20000; - Fear_Timer = 30000; - MortalStrike_Timer = 45000; - ExplodingShout_Timer = 25000; - } - - void Aggro(Unit *who) - { - DoScriptText(SAY_AGGRO, m_creature); - } - - void KilledUnit(Unit *victim) - { - DoScriptText(urand(0, 1) ? SAY_SLAY1 : SAY_SLAY2, m_creature); - } - - void JustDied(Unit *victim) - { - DoScriptText(SAY_DEATH, m_creature); - } - - void UpdateAI(const uint32 diff) - { - //TODO: make this work - if (CanPatrol && wpId == 0) - { - m_creature->GetMotionMaster()->MovePoint(DrakeWP[0].wpId, DrakeWP[0].x, DrakeWP[0].y, DrakeWP[0].z); - ++wpId; - } - - //Return since we have no target - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - //Whirlwind - if (Whirlwind_Timer < diff) - { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_WHIRLWIND); - Whirlwind_Timer = urand(20000, 25000); - }else Whirlwind_Timer -= diff; - - //Fear - if (Fear_Timer < diff) - { - DoScriptText(SAY_SHOUT, m_creature); - DoCastSpellIfCan(m_creature->getVictim(), SPELL_FRIGHTENING_SHOUT); - Fear_Timer = urand(25000, 35000); - }else Fear_Timer -= diff; - - //Mortal Strike - if (MortalStrike_Timer < diff) - { - DoScriptText(SAY_MORTAL, m_creature); - DoCastSpellIfCan(m_creature->getVictim(), SPELL_MORTAL_STRIKE); - MortalStrike_Timer = urand(20000, 30000); - }else MortalStrike_Timer -= diff; - - DoMeleeAttackIfReady(); - } -}; - -CreatureAI* GetAI_boss_lieutenant_drake(Creature* pCreature) -{ - return new boss_lieutenant_drakeAI(pCreature); -} void AddSC_boss_lieutenant_drake() { - Script* pNewScript; - - pNewScript = new Script; - pNewScript->Name = "go_barrel_old_hillsbrad"; - pNewScript->pGOUse = &GOUse_go_barrel_old_hillsbrad; - pNewScript->RegisterSelf(); - - pNewScript = new Script; - pNewScript->Name = "boss_lieutenant_drake"; - pNewScript->GetAI = &GetAI_boss_lieutenant_drake; - pNewScript->RegisterSelf(); } diff --git a/scripts/kalimdor/caverns_of_time/old_hillsbrad/instance_old_hillsbrad.cpp b/scripts/kalimdor/caverns_of_time/old_hillsbrad/instance_old_hillsbrad.cpp index 5a4d76207..d60cb4b17 100644 --- a/scripts/kalimdor/caverns_of_time/old_hillsbrad/instance_old_hillsbrad.cpp +++ b/scripts/kalimdor/caverns_of_time/old_hillsbrad/instance_old_hillsbrad.cpp @@ -50,11 +50,19 @@ void instance_old_hillsbrad::OnCreatureCreate(Creature* pCreature) void instance_old_hillsbrad::OnCreatureDeath(Creature* pCreature) { - if (pCreature->GetEntry() == NPC_EPOCH) + switch (pCreature->GetEntry()) { - // notify thrall so he can continue - if (Creature* pThrall = GetSingleCreatureFromStorage(NPC_THRALL)) - pThrall->AI()->KilledUnit(pCreature); + case NPC_SKARLOC: + if (GetData(TYPE_THRALL_EVENT) == IN_PROGRESS) + SetData(TYPE_THRALL_PART1, DONE); + break; + case NPC_EPOCH: + if (GetData(TYPE_THRALL_EVENT) == IN_PROGRESS) + SetData(TYPE_THRALL_PART4, DONE); + // notify thrall so he can continue + if (Creature* pThrall = GetSingleCreatureFromStorage(NPC_THRALL)) + pThrall->AI()->KilledUnit(pCreature); + break; } } diff --git a/scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.cpp b/scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.cpp index c25099f03..f52e560dd 100644 --- a/scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.cpp +++ b/scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.cpp @@ -25,6 +25,7 @@ EndScriptData */ npc_erozion npc_thrall_old_hillsbrad npc_taretha +go_barrel_old_hillsbrad EndContentData */ #include "precompiled.h" @@ -154,6 +155,12 @@ enum SAY_TH_EVENT_COMPLETE = -1560033, SAY_TA_FAREWELL = -1560053, + // other texts - ToDo: + SAY_SKARLOC_ENTER = -1560000, + SAY_EPOCH_ENTER_1 = -1560013, + SAY_EPOCH_ENTER_2 = -1560014, + SAY_EPOCH_ENTER_3 = -1560015, + // Misc for Thrall SPELL_STRIKE = 14516, SPELL_SHIELD_BLOCK = 12169, @@ -166,7 +173,6 @@ enum // misc creature entries NPC_ARMORER = 18764, - NPC_SCARLOC = 17862, NPC_RIFLE = 17820, NPC_WARDEN = 17833, @@ -296,7 +302,7 @@ struct MANGOS_DLL_DECL npc_thrall_old_hillsbradAI : public npc_escortAI break; case 29: DoScriptText(SAY_TH_SKARLOC_MEET, m_creature); - m_creature->SummonCreature(NPC_SCARLOC, 2036.48f, 271.22f, 63.43f, 5.27f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); + m_creature->SummonCreature(NPC_SKARLOC, 2036.48f, 271.22f, 63.43f, 5.27f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); break; case 30: SetEscortPaused(true); @@ -821,6 +827,22 @@ bool GossipSelect_npc_taretha(Player* pPlayer, Creature* pCreature, uint32 uiSen return true; } +/*###### +## go_barrel_old_hillsbrad +######*/ + +bool GOUse_go_barrel_old_hillsbrad(Player* pPlayer, GameObject* pGo) +{ + if (ScriptedInstance* pInstance = (ScriptedInstance*)pGo->GetInstanceData()) + { + if (pInstance->GetData(TYPE_BARREL_DIVERSION) == DONE) + return false; + + pInstance->SetData(TYPE_BARREL_DIVERSION, IN_PROGRESS); + } + return false; +} + /*###### ## AddSC ######*/ @@ -848,4 +870,9 @@ void AddSC_old_hillsbrad() pNewScript->pGossipSelect = &GossipSelect_npc_taretha; pNewScript->GetAI = &GetAI_npc_taretha; pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "go_barrel_old_hillsbrad"; + pNewScript->pGOUse = &GOUse_go_barrel_old_hillsbrad; + pNewScript->RegisterSelf(); } diff --git a/scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.h b/scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.h index 59a3b2862..c0d7e68bd 100644 --- a/scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.h +++ b/scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.h @@ -20,6 +20,7 @@ enum NPC_TARETHA = 18887, NPC_DRAKE = 17848, NPC_LODGE_QUEST_TRIGGER = 20155, + NPC_SKARLOC = 17862, NPC_EPOCH = 18096, QUEST_ENTRY_HILLSBRAD = 10282, diff --git a/scripts/kalimdor/maraudon/boss_celebras_the_cursed.cpp b/scripts/kalimdor/maraudon/boss_celebras_the_cursed.cpp index b2238b811..a09686d01 100644 --- a/scripts/kalimdor/maraudon/boss_celebras_the_cursed.cpp +++ b/scripts/kalimdor/maraudon/boss_celebras_the_cursed.cpp @@ -16,81 +16,13 @@ /* ScriptData SDName: Boss_Celebras_the_Cursed -SD%Complete: 100 -SDComment: +SD%Complete: 0 +SDComment: Placeholder SDCategory: Maraudon EndScriptData */ #include "precompiled.h" -#define SPELL_WRATH 21807 -#define SPELL_ENTANGLINGROOTS 12747 -#define SPELL_CORRUPT_FORCES 21968 - -struct MANGOS_DLL_DECL celebras_the_cursedAI : public ScriptedAI -{ - celebras_the_cursedAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} - - uint32 Wrath_Timer; - uint32 EntanglingRoots_Timer; - uint32 CorruptForces_Timer; - - void Reset() - { - Wrath_Timer = 8000; - EntanglingRoots_Timer = 2000; - CorruptForces_Timer = 30000; - } - - void JustDied(Unit* Killer) - { - m_creature->SummonCreature(13716, m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN, 600000); - } - - void UpdateAI(const uint32 diff) - { - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - //Wrath - if (Wrath_Timer < diff) - { - Unit* target = NULL; - target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0); - if (target) - DoCastSpellIfCan(target,SPELL_WRATH); - Wrath_Timer = 8000; - }else Wrath_Timer -= diff; - - //EntanglingRoots - if (EntanglingRoots_Timer < diff) - { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_ENTANGLINGROOTS); - EntanglingRoots_Timer = 20000; - }else EntanglingRoots_Timer -= diff; - - //CorruptForces - if (CorruptForces_Timer < diff) - { - m_creature->InterruptNonMeleeSpells(false); - DoCastSpellIfCan(m_creature,SPELL_CORRUPT_FORCES); - CorruptForces_Timer = 20000; - }else CorruptForces_Timer -= diff; - - DoMeleeAttackIfReady(); - } -}; -CreatureAI* GetAI_celebras_the_cursed(Creature* pCreature) -{ - return new celebras_the_cursedAI(pCreature); -} - void AddSC_boss_celebras_the_cursed() { - Script* pNewScript; - - pNewScript = new Script; - pNewScript->Name = "celebras_the_cursed"; - pNewScript->GetAI = &GetAI_celebras_the_cursed; - pNewScript->RegisterSelf(); } diff --git a/scripts/kalimdor/maraudon/boss_landslide.cpp b/scripts/kalimdor/maraudon/boss_landslide.cpp index 47bf75dd8..f9980e386 100644 --- a/scripts/kalimdor/maraudon/boss_landslide.cpp +++ b/scripts/kalimdor/maraudon/boss_landslide.cpp @@ -16,76 +16,13 @@ /* ScriptData SDName: Boss_Landslide -SD%Complete: 100 -SDComment: +SD%Complete: 0 +SDComment: Placeholder SDCategory: Maraudon EndScriptData */ #include "precompiled.h" -#define SPELL_KNOCKAWAY 18670 -#define SPELL_TRAMPLE 5568 -#define SPELL_LANDSLIDE 21808 - -struct MANGOS_DLL_DECL boss_landslideAI : public ScriptedAI -{ - boss_landslideAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} - - uint32 KnockAway_Timer; - uint32 Trample_Timer; - uint32 Landslide_Timer; - - void Reset() - { - KnockAway_Timer = 8000; - Trample_Timer = 2000; - Landslide_Timer = 0; - } - - void UpdateAI(const uint32 diff) - { - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - //KnockAway_Timer - if (KnockAway_Timer < diff) - { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_KNOCKAWAY); - KnockAway_Timer = 15000; - }else KnockAway_Timer -= diff; - - //Trample_Timer - if (Trample_Timer < diff) - { - DoCastSpellIfCan(m_creature,SPELL_TRAMPLE); - Trample_Timer = 8000; - }else Trample_Timer -= diff; - - //Landslide - if (m_creature->GetHealthPercent() < 50.0f) - { - if (Landslide_Timer < diff) - { - m_creature->InterruptNonMeleeSpells(false); - DoCastSpellIfCan(m_creature,SPELL_LANDSLIDE); - Landslide_Timer = 60000; - } else Landslide_Timer -= diff; - } - - DoMeleeAttackIfReady(); - } -}; -CreatureAI* GetAI_boss_landslide(Creature* pCreature) -{ - return new boss_landslideAI(pCreature); -} - void AddSC_boss_landslide() { - Script* pNewScript; - - pNewScript = new Script; - pNewScript->Name = "boss_landslide"; - pNewScript->GetAI = &GetAI_boss_landslide; - pNewScript->RegisterSelf(); } diff --git a/scripts/kalimdor/maraudon/boss_princess_theradras.cpp b/scripts/kalimdor/maraudon/boss_princess_theradras.cpp index 3119cac74..cd5b45497 100644 --- a/scripts/kalimdor/maraudon/boss_princess_theradras.cpp +++ b/scripts/kalimdor/maraudon/boss_princess_theradras.cpp @@ -16,90 +16,13 @@ /* ScriptData SDName: Boss_Princess_Theradras -SD%Complete: 100 -SDComment: +SD%Complete: 0 +SDComment: Placeholder SDCategory: Maraudon EndScriptData */ #include "precompiled.h" -#define SPELL_DUSTFIELD 21909 -#define SPELL_BOULDER 21832 -#define SPELL_THRASH 3391 -#define SPELL_REPULSIVEGAZE 21869 - -struct MANGOS_DLL_DECL boss_ptheradrasAI : public ScriptedAI -{ - boss_ptheradrasAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} - - uint32 Dustfield_Timer; - uint32 Boulder_Timer; - uint32 Thrash_Timer; - uint32 RepulsiveGaze_Timer; - - void Reset() - { - Dustfield_Timer = 8000; - Boulder_Timer = 2000; - Thrash_Timer = 5000; - RepulsiveGaze_Timer = 23000; - } - - void JustDied(Unit* Killer) - { - m_creature->SummonCreature(12238,28.067f, 61.875f, -123.405f, 4.67f, TEMPSUMMON_TIMED_DESPAWN, 600000); - } - - void UpdateAI(const uint32 diff) - { - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - //Dustfield_Timer - if (Dustfield_Timer < diff) - { - DoCastSpellIfCan(m_creature,SPELL_DUSTFIELD); - Dustfield_Timer = 14000; - }else Dustfield_Timer -= diff; - - //Boulder_Timer - if (Boulder_Timer < diff) - { - Unit* target = NULL; - target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0); - if (target) - DoCastSpellIfCan(target,SPELL_BOULDER); - Boulder_Timer = 10000; - }else Boulder_Timer -= diff; - - //RepulsiveGaze_Timer - if (RepulsiveGaze_Timer < diff) - { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_REPULSIVEGAZE); - RepulsiveGaze_Timer = 20000; - }else RepulsiveGaze_Timer -= diff; - - //Thrash_Timer - if (Thrash_Timer < diff) - { - DoCastSpellIfCan(m_creature,SPELL_THRASH); - Thrash_Timer = 18000; - }else Thrash_Timer -= diff; - - DoMeleeAttackIfReady(); - } -}; -CreatureAI* GetAI_boss_ptheradras(Creature* pCreature) -{ - return new boss_ptheradrasAI(pCreature); -} - void AddSC_boss_ptheradras() { - Script* pNewScript; - - pNewScript = new Script; - pNewScript->Name = "boss_princess_theradras"; - pNewScript->GetAI = &GetAI_boss_ptheradras; - pNewScript->RegisterSelf(); } diff --git a/scripts/kalimdor/orgrimmar.cpp b/scripts/kalimdor/orgrimmar.cpp index 79f23980d..d7ea50404 100644 --- a/scripts/kalimdor/orgrimmar.cpp +++ b/scripts/kalimdor/orgrimmar.cpp @@ -127,56 +127,17 @@ bool QuestAccept_npc_shenthul(Player* pPlayer, Creature* pCreature, const Quest* ## npc_thrall_warchief ######*/ -#define QUEST_6566 6566 - -#define SPELL_CHAIN_LIGHTNING 16033 -#define SPELL_SHOCK 16034 - -//TODO: verify abilities/timers -struct MANGOS_DLL_DECL npc_thrall_warchiefAI : public ScriptedAI +enum { - npc_thrall_warchiefAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } - - uint32 ChainLightning_Timer; - uint32 Shock_Timer; - - void Reset() - { - ChainLightning_Timer = 2000; - Shock_Timer = 8000; - } - - void UpdateAI(const uint32 diff) - { - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - if (ChainLightning_Timer < diff) - { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_CHAIN_LIGHTNING); - ChainLightning_Timer = 9000; - }else ChainLightning_Timer -= diff; - - if (Shock_Timer < diff) - { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_SHOCK); - Shock_Timer = 15000; - }else Shock_Timer -= diff; - - DoMeleeAttackIfReady(); - } + QUEST_ID_WHAT_THE_WIND_CARRIES = 6566, }; -CreatureAI* GetAI_npc_thrall_warchief(Creature* pCreature) -{ - return new npc_thrall_warchiefAI(pCreature); -} bool GossipHello_npc_thrall_warchief(Player* pPlayer, Creature* pCreature) { if (pCreature->isQuestGiver()) pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); - if (pPlayer->GetQuestStatus(QUEST_6566) == QUEST_STATUS_INCOMPLETE) + if (pPlayer->GetQuestStatus(QUEST_ID_WHAT_THE_WIND_CARRIES) == QUEST_STATUS_INCOMPLETE) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Please share your wisdom with me, Warchief.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); @@ -213,7 +174,7 @@ bool GossipSelect_npc_thrall_warchief(Player* pPlayer, Creature* pCreature, uint break; case GOSSIP_ACTION_INFO_DEF+7: pPlayer->CLOSE_GOSSIP_MENU(); - pPlayer->AreaExploredOrEventHappens(QUEST_6566); + pPlayer->AreaExploredOrEventHappens(QUEST_ID_WHAT_THE_WIND_CARRIES); break; } return true; @@ -231,7 +192,6 @@ void AddSC_orgrimmar() pNewScript = new Script; pNewScript->Name = "npc_thrall_warchief"; - pNewScript->GetAI = &GetAI_npc_thrall_warchief; pNewScript->pGossipHello = &GossipHello_npc_thrall_warchief; pNewScript->pGossipSelect = &GossipSelect_npc_thrall_warchief; pNewScript->RegisterSelf(); diff --git a/scripts/kalimdor/razorfen_downs/boss_amnennar_the_coldbringer.cpp b/scripts/kalimdor/razorfen_downs/boss_amnennar_the_coldbringer.cpp index 2aef7d045..52003e47d 100644 --- a/scripts/kalimdor/razorfen_downs/boss_amnennar_the_coldbringer.cpp +++ b/scripts/kalimdor/razorfen_downs/boss_amnennar_the_coldbringer.cpp @@ -16,115 +16,13 @@ /* ScriptData SDName: Boss_Amnennar_the_coldbringer -SD%Complete: 100 -SDComment: +SD%Complete: 0 +SDComment: Placeholder SDCategory: Razorfen Downs EndScriptData */ #include "precompiled.h" -#define SAY_AGGRO -1129000 -#define SAY_SUMMON60 -1129001 -#define SAY_SUMMON30 -1129002 -#define SAY_HP -1129003 -#define SAY_KILL -1129004 - -#define SPELL_AMNENNARSWRATH 13009 -#define SPELL_FROSTBOLT 15530 -#define SPELL_FROST_NOVA 15531 -#define SPELL_FROST_SPECTRES 12642 - -struct MANGOS_DLL_DECL boss_amnennar_the_coldbringerAI : public ScriptedAI -{ - boss_amnennar_the_coldbringerAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} - - uint32 AmnenarsWrath_Timer; - uint32 FrostBolt_Timer; - uint32 FrostNova_Timer; - bool Spectrals60; - bool Spectrals30; - bool Hp; - - void Reset() - { - AmnenarsWrath_Timer = 8000; - FrostBolt_Timer = 1000; - FrostNova_Timer = urand(10000, 15000); - Spectrals30 = false; - Spectrals60 = false; - Hp = false; - } - - void Aggro(Unit *who) - { - DoScriptText(SAY_AGGRO, m_creature); - } - - void KilledUnit(Unit* pVictim) - { - DoScriptText(SAY_KILL, m_creature); - } - - void UpdateAI(const uint32 diff) - { - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - //AmnenarsWrath_Timer - if (AmnenarsWrath_Timer < diff) - { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_AMNENNARSWRATH); - AmnenarsWrath_Timer = 12000; - } else AmnenarsWrath_Timer -= diff; - - //FrostBolt_Timer - if (FrostBolt_Timer < diff) - { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_FROSTBOLT); - FrostBolt_Timer = 8000; - } else FrostBolt_Timer -= diff; - - if (FrostNova_Timer < diff) - { - DoCastSpellIfCan(m_creature,SPELL_FROST_NOVA); - FrostNova_Timer = 15000; - } else FrostNova_Timer -= diff; - - if (!Spectrals60 && m_creature->GetHealthPercent() < 60.0f) - { - DoScriptText(SAY_SUMMON60, m_creature); - DoCastSpellIfCan(m_creature->getVictim(),SPELL_FROST_SPECTRES); - Spectrals60 = true; - } - - if (!Hp && m_creature->GetHealthPercent() < 50.0f) - { - DoScriptText(SAY_HP, m_creature); - Hp = true; - } - - if (!Spectrals30 && m_creature->GetHealthPercent() < 30.0f) - { - DoScriptText(SAY_SUMMON30, m_creature); - DoCastSpellIfCan(m_creature->getVictim(),SPELL_FROST_SPECTRES); - Spectrals30 = true; - } - - DoMeleeAttackIfReady(); - } -}; - -CreatureAI* GetAI_boss_amnennar_the_coldbringer(Creature* pCreature) -{ - return new boss_amnennar_the_coldbringerAI(pCreature); -} - void AddSC_boss_amnennar_the_coldbringer() { - Script* pNewScript; - - pNewScript = new Script; - pNewScript->Name = "boss_amnennar_the_coldbringer"; - pNewScript->GetAI = &GetAI_boss_amnennar_the_coldbringer; - pNewScript->RegisterSelf(); } diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_cthun.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_cthun.cpp index ed3d0eaf8..d6f7e0d31 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/boss_cthun.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_cthun.cpp @@ -787,149 +787,6 @@ bool AreaTrigger_at_stomach_cthun(Player* pPlayer, AreaTriggerEntry const* pAt) return false; } -// ToDo: move the following scripts to eventAI -enum TentacleSpells -{ - // Tentacle spells which can be moved to eventAI - // All Tentacles Spells - SPELL_GROUND_RUPTURE = 26139, - - // Eye Tentacles Spells - SPELL_MIND_FLAY = 26143, - - // Claw Tentacles Spells - //SPELL_HAMSTRING = 26141, // already defined - - // Giant Eye Tentacles - //SPELL_EYE_BEAM = 26134, // already defined -}; - -struct MANGOS_DLL_DECL eye_tentacleAI : public Scripted_NoMovementAI -{ - eye_tentacleAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { Reset(); } - - uint32 m_uiMindflayTimer; - uint32 m_uiKillSelfTimer; - - void Reset() - { - // Mind flay half a second after we spawn - m_uiMindflayTimer = 500; - } - - void UpdateAI(const uint32 uiDiff) - { - // Check if we have a target - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - // MindflayTimer - if (m_uiMindflayTimer < uiDiff) - { - Unit* target = NULL; - target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0); - if (target) - DoCastSpellIfCan(target, SPELL_MIND_FLAY); - - //Mindflay every 10 seconds - m_uiMindflayTimer = 10100; - } - else - m_uiMindflayTimer -= uiDiff; - } -}; - -struct MANGOS_DLL_DECL claw_tentacleAI : public Scripted_NoMovementAI -{ - claw_tentacleAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { Reset(); } - - uint32 m_uiGroundRuptureTimer; - uint32 m_uiHamstringTimer; - - void Reset() - { - // First rupture should happen half a second after we spawn - m_uiGroundRuptureTimer = 500; - m_uiHamstringTimer = 2000; - } - - void UpdateAI(const uint32 uiDiff) - { - // Check if we have a target - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - // GroundRuptureTimer - if (m_uiGroundRuptureTimer < uiDiff) - { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_GROUND_RUPTURE); - m_uiGroundRuptureTimer = 30000; - } - else - m_uiGroundRuptureTimer -= uiDiff; - - // HamstringTimer - if (m_uiHamstringTimer < uiDiff) - { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_HAMSTRING); - m_uiHamstringTimer = 5000; - } - else - m_uiHamstringTimer -= uiDiff; - - DoMeleeAttackIfReady(); - } -}; - -struct MANGOS_DLL_DECL giant_eye_tentacleAI : public Scripted_NoMovementAI -{ - giant_eye_tentacleAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { Reset(); } - - uint32 m_uiBeamTimer; - - void Reset() - { - //Green Beam half a second after we spawn - m_uiBeamTimer = 500; - } - - void UpdateAI(const uint32 uiDiff) - { - // Check if we have a target - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - // BeamTimer - if (m_uiBeamTimer < uiDiff) - { - Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0); - if (target) - DoCastSpellIfCan(target, SPELL_EYE_BEAM); - - // Beam every 2 seconds - m_uiBeamTimer = 2100; - } - else - m_uiBeamTimer -= uiDiff; - } -}; - -struct MANGOS_DLL_DECL flesh_tentacleAI : public Scripted_NoMovementAI -{ - flesh_tentacleAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { Reset(); } - - void Reset() { } - - void UpdateAI(const uint32 uiDiff) - { - // Check if we have a target - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - DoMeleeAttackIfReady(); - } -}; - CreatureAI* GetAI_boss_eye_of_cthun(Creature* pCreature) { return new boss_eye_of_cthunAI(pCreature); @@ -945,26 +802,6 @@ CreatureAI* GetAI_npc_giant_claw_tentacle(Creature* pCreature) return new npc_giant_claw_tentacleAI(pCreature); } -CreatureAI* GetAI_eye_tentacle(Creature* pCreature) -{ - return new eye_tentacleAI(pCreature); -} - -CreatureAI* GetAI_claw_tentacle(Creature* pCreature) -{ - return new claw_tentacleAI(pCreature); -} - -CreatureAI* GetAI_giant_eye_tentacle(Creature* pCreature) -{ - return new giant_eye_tentacleAI(pCreature); -} - -CreatureAI* GetAI_flesh_tentacle(Creature* pCreature) -{ - return new flesh_tentacleAI(pCreature); -} - void AddSC_boss_cthun() { Script* pNewScript; @@ -988,24 +825,4 @@ void AddSC_boss_cthun() pNewScript->Name = "at_stomach_cthun"; pNewScript->pAreaTrigger = &AreaTrigger_at_stomach_cthun; pNewScript->RegisterSelf(); - - pNewScript = new Script; - pNewScript->Name = "mob_eye_tentacle"; - pNewScript->GetAI = &GetAI_eye_tentacle; - pNewScript->RegisterSelf(); - - pNewScript = new Script; - pNewScript->Name = "mob_claw_tentacle"; - pNewScript->GetAI = &GetAI_claw_tentacle; - pNewScript->RegisterSelf(); - - pNewScript = new Script; - pNewScript->Name = "mob_giant_eye_tentacle"; - pNewScript->GetAI = &GetAI_giant_eye_tentacle; - pNewScript->RegisterSelf(); - - pNewScript = new Script; - pNewScript->Name = "mob_giant_flesh_tentacle"; - pNewScript->GetAI = &GetAI_flesh_tentacle; - pNewScript->RegisterSelf(); } diff --git a/scripts/kalimdor/thunder_bluff.cpp b/scripts/kalimdor/thunder_bluff.cpp index 6eb49b24b..87c9e0f26 100644 --- a/scripts/kalimdor/thunder_bluff.cpp +++ b/scripts/kalimdor/thunder_bluff.cpp @@ -16,94 +16,17 @@ /* ScriptData SDName: Thunder_Bluff -SD%Complete: 100 -SDComment: ToDo: Cairne BloodHoof can be moved to eventAI +SD%Complete: 0 +SDComment: SDCategory: Thunder Bluff EndScriptData */ #include "precompiled.h" /*##### -# npc_cairne_bloodhoof +# ######*/ -#define SPELL_BERSERKER_CHARGE 16636 -#define SPELL_CLEAVE 16044 -#define SPELL_MORTAL_STRIKE 16856 -#define SPELL_THUNDERCLAP 23931 -#define SPELL_UPPERCUT 22916 - -//TODO: verify abilities/timers -struct MANGOS_DLL_DECL npc_cairne_bloodhoofAI : public ScriptedAI -{ - npc_cairne_bloodhoofAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } - - uint32 BerserkerCharge_Timer; - uint32 Cleave_Timer; - uint32 MortalStrike_Timer; - uint32 Thunderclap_Timer; - uint32 Uppercut_Timer; - - void Reset() - { - BerserkerCharge_Timer = 30000; - Cleave_Timer = 5000; - MortalStrike_Timer = 10000; - Thunderclap_Timer = 15000; - Uppercut_Timer = 10000; - } - - void UpdateAI(const uint32 diff) - { - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - if (BerserkerCharge_Timer < diff) - { - Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0); - if (target) - DoCastSpellIfCan(target,SPELL_BERSERKER_CHARGE); - BerserkerCharge_Timer = 25000; - }else BerserkerCharge_Timer -= diff; - - if (Uppercut_Timer < diff) - { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_UPPERCUT); - Uppercut_Timer = 20000; - }else Uppercut_Timer -= diff; - - if (Thunderclap_Timer < diff) - { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_THUNDERCLAP); - Thunderclap_Timer = 15000; - }else Thunderclap_Timer -= diff; - - if (MortalStrike_Timer < diff) - { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_MORTAL_STRIKE); - MortalStrike_Timer = 15000; - }else MortalStrike_Timer -= diff; - - if (Cleave_Timer < diff) - { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_CLEAVE); - Cleave_Timer = 7000; - }else Cleave_Timer -= diff; - - DoMeleeAttackIfReady(); - } -}; -CreatureAI* GetAI_npc_cairne_bloodhoof(Creature* pCreature) -{ - return new npc_cairne_bloodhoofAI(pCreature); -} - void AddSC_thunder_bluff() { - Script* pNewScript; - - pNewScript = new Script; - pNewScript->Name = "npc_cairne_bloodhoof"; - pNewScript->GetAI = &GetAI_npc_cairne_bloodhoof; - pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index f900fd91c..fb6d5926c 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2672" + #define SD2_REVISION_NR "2673" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index addfae9f1..3103223b7 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -415,13 +415,9 @@ UPDATE creature_template SET ScriptName='npc_thrall' WHERE entry=17852; UPDATE creature_template SET ScriptName='npc_jaina_proudmoore' WHERE entry=17772; UPDATE creature_template SET ScriptName='boss_archimonde' WHERE entry=17968; UPDATE creature_template SET ScriptName='npc_doomfire_spirit' WHERE entry=18104; -UPDATE creature_template SET ScriptName='mob_ancient_wisp' WHERE entry=17946; /* OLD HILLSBRAD */ UPDATE instance_template SET ScriptName='instance_old_hillsbrad' WHERE map=560; -UPDATE creature_template SET ScriptName='boss_lieutenant_drake' WHERE entry=17848; -UPDATE creature_template SET ScriptName='boss_epoch_hunter' WHERE entry=18096; -UPDATE creature_template SET ScriptName='boss_captain_skarloc' WHERE entry=17862; UPDATE gameobject_template SET ScriptName='go_barrel_old_hillsbrad' WHERE entry=182589; UPDATE creature_template SET ScriptName='npc_erozion' WHERE entry=18723; UPDATE creature_template SET ScriptName='npc_taretha' WHERE entry=18887; @@ -803,10 +799,7 @@ INSERT INTO scripted_event_id VALUES (16547,'event_go_scrying_orb'); /* MARAUDON */ -UPDATE creature_template SET ScriptName='boss_princess_theradras' WHERE entry=12201; UPDATE creature_template SET ScriptName='boss_noxxion' WHERE entry=13282; -UPDATE creature_template SET ScriptName='boss_landslide' WHERE entry=12203; -UPDATE creature_template SET ScriptName='celebras_the_cursed' WHERE entry=12225; /* MOLTEN CORE */ UPDATE instance_template SET ScriptName='instance_molten_core' WHERE map=409; @@ -922,7 +915,6 @@ UPDATE creature_template SET ScriptName='npc_thrall_warchief' WHERE entry=4949; /* RAZORFEN DOWNS */ -UPDATE creature_template SET ScriptName='boss_amnennar_the_coldbringer' WHERE entry=7358; UPDATE creature_template SET ScriptName='npc_belnistrasz' WHERE entry=8516; /* RAZORFEN KRAUL */ @@ -1186,11 +1178,7 @@ UPDATE creature_template SET ScriptName='boss_ouro' WHERE entry=15517; UPDATE creature_template SET ScriptName='npc_ouro_spawner' WHERE entry=15957; UPDATE creature_template SET ScriptName='boss_eye_of_cthun' WHERE entry=15589; UPDATE creature_template SET ScriptName='mob_sartura_royal_guard' WHERE entry=15984; -UPDATE creature_template SET ScriptName='mob_claw_tentacle' WHERE entry=15725; -UPDATE creature_template SET ScriptName='mob_eye_tentacle' WHERE entry=15726; UPDATE creature_template SET ScriptName='mob_giant_claw_tentacle' WHERE entry=15728; -UPDATE creature_template SET ScriptName='mob_giant_eye_tentacle' WHERE entry=15334; -UPDATE creature_template SET ScriptName='mob_giant_flesh_tentacle' WHERE entry=15802; UPDATE creature_template SET ScriptName='mob_anubisath_sentinel' WHERE entry=15264; DELETE FROM scripted_areatrigger WHERE entry IN (4033,4034); INSERT INTO scripted_areatrigger VALUES @@ -1216,7 +1204,6 @@ UPDATE creature_template SET ScriptName='npc_paoka_swiftmountain' WHERE entry=10 UPDATE creature_template SET ScriptName='npc_lakota_windsong' WHERE entry=10646; /* THUNDER BLUFF */ -UPDATE creature_template SET ScriptName='npc_cairne_bloodhoof' WHERE entry=3057; /* TIRISFAL GLADES */ UPDATE gameobject_template SET ScriptName='go_mausoleum_trigger' WHERE entry=104593; diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 639520994..1865ea8de 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -1102,11 +1102,11 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen -- -1 129 000 RAZORFEN DOWNS INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES -(-1129000,'You\'ll never leave this place... alive.',5825,1,0,0,'amnennar SAY_AGGRO'), -(-1129001,'To me, my servants!',5828,1,0,0,'amnennar SAY_SUMMON60'), -(-1129002,'Come, spirits, attend your master!',5829,1,0,0,'amnennar SAY_SUMMON30'), -(-1129003,'I am the hand of the Lich King!',5827,1,0,0,'amnennar SAY_HP'), -(-1129004,'Too...easy!',5826,1,0,0,'amnennar SAY_KILL'), +(-1129000,'REUSE_ME',0,0,0,0,'REUSE_ME'), +(-1129001,'REUSE_ME',0,0,0,0,'REUSE_ME'), +(-1129002,'REUSE_ME',0,0,0,0,'REUSE_ME'), +(-1129003,'REUSE_ME',0,0,0,0,'REUSE_ME'), +(-1129004,'REUSE_ME',0,0,0,0,'REUSE_ME'), (-1129005,'All right, stay close. These fiends will jump right out of the shadows at you if you let your guard down.',0,0,0,0,'belnistrasz SAY_READY'), (-1129006,'Okay, here we go. It\'s going to take about five minutes to shut this thing down through the ritual. Once I start, keep the vermin off of me or it will be the end of us all!',0,0,0,0,'belnistrasz SAY_START_RIT'), @@ -2392,30 +2392,31 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen -- -1 560 000 ESCAPE FROM DURNHOLDE (OLD HILLSBRAD) INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES (-1560000,'Thrall! You didn\'t really think you would escape did you? You and your allies shall answer to Blackmoore - after I\'ve had my fun!',10406,1,0,0,'skarloc SAY_ENTER'), -(-1560001,'You\'re a slave. That\'s all you\'ll ever be.',10407,1,0,0,'skarloc SAY_TAUNT1'), -(-1560002,'I don\'t know what Blackmoore sees in you. For my money, you\'re just another ignorant savage!',10408,1,0,0,'skarloc SAY_TAUNT2'), -(-1560003,'Thrall will never be free!',10409,1,0,0,'skarloc SAY_SLAY1'), -(-1560004,'Did you really think you would leave here alive?',10410,1,0,0,'skarloc SAY_SLAY2'), -(-1560005,'Guards! Urgh..Guards..!',10411,1,0,0,'skarloc SAY_DEATH'), - -(-1560006,'You there, fetch water quickly! Get these flames out before they spread to the rest of the keep! Hurry, damn you!',10428,1,0,0,'lieutenant_drake SAY_ENTER'), -(-1560007,'I know what you\'re up to, and I mean to put an end to it, permanently!',10429,1,0,0,'lieutenant_drake SAY_AGGRO'), -(-1560008,'No more middling for you.',10432,1,0,0,'lieutenant_drake SAY_SLAY1'), -(-1560009,'You will not interfere!',10433,1,0,0,'lieutenant_drake SAY_SLAY2'), -(-1560010,'Time to bleed!',10430,1,0,0,'lieutenant_drake SAY_MORTAL'), -(-1560011,'Run, you blasted cowards!',10431,1,0,0,'lieutenant_drake SAY_SHOUT'), -(-1560012,'Thrall... must not... go free.',10434,1,0,0,'lieutenant_drake SAY_DEATH'), + +(-1560001,'REUSE_ME',0,0,0,0,'REUSE_ME'), +(-1560002,'REUSE_ME',0,0,0,0,'REUSE_ME'), +(-1560003,'REUSE_ME',0,0,0,0,'REUSE_ME'), +(-1560004,'REUSE_ME',0,0,0,0,'REUSE_ME'), +(-1560005,'REUSE_ME',0,0,0,0,'REUSE_ME'), +(-1560006,'REUSE_ME',0,0,0,0,'REUSE_ME'), +(-1560007,'REUSE_ME',0,0,0,0,'REUSE_ME'), +(-1560008,'REUSE_ME',0,0,0,0,'REUSE_ME'), +(-1560009,'REUSE_ME',0,0,0,0,'REUSE_ME'), +(-1560010,'REUSE_ME',0,0,0,0,'REUSE_ME'), +(-1560011,'REUSE_ME',0,0,0,0,'REUSE_ME'), +(-1560012,'REUSE_ME',0,0,0,0,'REUSE_ME'), (-1560013,'Thrall! Come outside and face your fate!',10418,1,0,0,'epoch SAY_ENTER1'), (-1560014,'Taretha\'s life hangs in the balance. Surely you care for her. Surely you wish to save her...',10419,1,0,0,'epoch SAY_ENTER2'), (-1560015,'Ah, there you are. I had hoped to accomplish this with a bit of subtlety, but I suppose direct confrontation was inevitable. Your future, Thrall, must not come to pass and so...you and your troublesome friends must die!',10420,1,0,0,'epoch SAY_ENTER3'), -(-1560016,'Enough! I will erase your very existence!',10421,1,0,0,'epoch SAY_AGGRO1'), -(-1560017,'You cannot fight fate!',10422,1,0,0,'epoch SAY_AGGRO2'), -(-1560018,'You are...irrelevant.',10425,1,0,0,'epoch SAY_SLAY1'), -(-1560019,'Thrall will remain a slave. Taretha will die. You have failed.',10426,1,0,0,'epoch SAY_SLAY2'), -(-1560020,'Not so fast!',10423,1,0,0,'epoch SAY_BREATH1'), -(-1560021,'Struggle as much as you like!',10424,1,0,0,'epoch SAY_BREATH2'), -(-1560022,'No!...The master... will not... be pleased.',10427,1,0,0,'epoch SAY_DEATH'), + +(-1560016,'REUSE_ME',0,0,0,0,'REUSE_ME'), +(-1560017,'REUSE_ME',0,0,0,0,'REUSE_ME'), +(-1560018,'REUSE_ME',0,0,0,0,'REUSE_ME'), +(-1560019,'REUSE_ME',0,0,0,0,'REUSE_ME'), +(-1560020,'REUSE_ME',0,0,0,0,'REUSE_ME'), +(-1560021,'REUSE_ME',0,0,0,0,'REUSE_ME'), +(-1560022,'REUSE_ME',0,0,0,0,'REUSE_ME'), (-1560023,'Very well then. Let\'s go!',10465,0,0,0,'thrall hillsbrad SAY_TH_START_EVENT_PART1'), (-1560024,'As long as we\'re going with a new plan, I may aswell pick up a weapon and some armor.',0,0,0,0,'thrall hillsbrad SAY_TH_ARMORY'), diff --git a/sql/updates/r2673_mangos.sql b/sql/updates/r2673_mangos.sql new file mode 100644 index 000000000..84e04bf49 --- /dev/null +++ b/sql/updates/r2673_mangos.sql @@ -0,0 +1,13 @@ +UPDATE creature_template SET ScriptName='' WHERE entry=12225; +UPDATE creature_template SET ScriptName='' WHERE entry=12203; +UPDATE creature_template SET ScriptName='' WHERE entry=12201; +UPDATE creature_template SET ScriptName='' WHERE entry=7358; +UPDATE creature_template SET ScriptName='' WHERE entry=15802; +UPDATE creature_template SET ScriptName='' WHERE entry=15334; +UPDATE creature_template SET ScriptName='' WHERE entry=15725; +UPDATE creature_template SET ScriptName='' WHERE entry=15726; +UPDATE creature_template SET ScriptName='' WHERE entry=17946; +UPDATE creature_template SET ScriptName='' WHERE entry=3057; +UPDATE creature_template SET ScriptName='' WHERE entry=17848; +UPDATE creature_template SET ScriptName='' WHERE entry=18096; +UPDATE creature_template SET ScriptName='' WHERE entry=17862; diff --git a/sql/updates/r2673_scriptdev2.sql b/sql/updates/r2673_scriptdev2.sql new file mode 100644 index 000000000..4d0461bcd --- /dev/null +++ b/sql/updates/r2673_scriptdev2.sql @@ -0,0 +1,32 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1129004 AND -1129000; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1129000,'REUSE_ME',0,0,0,0,'REUSE_ME'), +(-1129001,'REUSE_ME',0,0,0,0,'REUSE_ME'), +(-1129002,'REUSE_ME',0,0,0,0,'REUSE_ME'), +(-1129003,'REUSE_ME',0,0,0,0,'REUSE_ME'), +(-1129004,'REUSE_ME',0,0,0,0,'REUSE_ME'); +DELETE FROM script_texts WHERE entry BETWEEN -1560012 AND -1560006; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1560006,'REUSE_ME',0,0,0,0,'REUSE_ME'), +(-1560007,'REUSE_ME',0,0,0,0,'REUSE_ME'), +(-1560008,'REUSE_ME',0,0,0,0,'REUSE_ME'), +(-1560009,'REUSE_ME',0,0,0,0,'REUSE_ME'), +(-1560010,'REUSE_ME',0,0,0,0,'REUSE_ME'), +(-1560011,'REUSE_ME',0,0,0,0,'REUSE_ME'), +(-1560012,'REUSE_ME',0,0,0,0,'REUSE_ME'); +DELETE FROM script_texts WHERE entry BETWEEN -1560022 AND -1560016; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1560016,'REUSE_ME',0,0,0,0,'REUSE_ME'), +(-1560017,'REUSE_ME',0,0,0,0,'REUSE_ME'), +(-1560018,'REUSE_ME',0,0,0,0,'REUSE_ME'), +(-1560019,'REUSE_ME',0,0,0,0,'REUSE_ME'), +(-1560020,'REUSE_ME',0,0,0,0,'REUSE_ME'), +(-1560021,'REUSE_ME',0,0,0,0,'REUSE_ME'), +(-1560022,'REUSE_ME',0,0,0,0,'REUSE_ME'); +DELETE FROM script_texts WHERE entry BETWEEN -1560005 AND -1560001; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1560001,'REUSE_ME',0,0,0,0,'REUSE_ME'), +(-1560002,'REUSE_ME',0,0,0,0,'REUSE_ME'), +(-1560003,'REUSE_ME',0,0,0,0,'REUSE_ME'), +(-1560004,'REUSE_ME',0,0,0,0,'REUSE_ME'), +(-1560005,'REUSE_ME',0,0,0,0,'REUSE_ME'); From ce4f38d948f481f73fade345b16a079c3830d8aa Mon Sep 17 00:00:00 2001 From: michalpolko Date: Sat, 18 Aug 2012 17:13:13 +0200 Subject: [PATCH 0662/1172] [2674] Implemented 3rd phase Ice Tomb spell in Sindragosa encounter. Ice Tomb spells require core support. TODO: add script for Ice Tomb creatures (also handling Asphyxiation in the script). --- .../icecrown_citadel/boss_sindragosa.cpp | 19 +++++++++++++++++-- sd2_revision_nr.h | 2 +- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp index 9023628ab..f77e98370 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp @@ -55,7 +55,7 @@ enum // Phase 2 SPELL_ICE_TOMB = 69712, // triggers Frost Beacon on random targets, which triggers actual Ice Tomb after 7 sec. - + SPELL_ICE_TOMB_PROTECTION = 69700, // protects from taking dmg while in Ice Tomb, should be triggered by Ice Tomb stunning spell // Frost Bomb related SPELL_FROST_BOMB = 69846, // summons dummy target npc SPELL_FROST_BOMB_DMG = 69845, @@ -64,6 +64,7 @@ enum // Phase 3 SPELL_MYSTIC_BUFFET = 70128, + SPELL_ICE_TOMB_SINGLE = 69675, // Rimefang SPELL_RIMEFANG_FROST_AURA = 71387, @@ -155,6 +156,7 @@ struct MANGOS_DLL_DECL boss_sindragosaAI : public ScriptedAI uint32 m_uiIcyGripTimer; uint32 m_uiUnchainedMagicTimer; uint32 m_uiFrostBombTimer; + uint32 m_uiIceTombSingleTimer; void Reset() { @@ -165,6 +167,7 @@ struct MANGOS_DLL_DECL boss_sindragosaAI : public ScriptedAI m_uiTailSmashTimer = 20000; m_uiFrostBreathTimer = 5000; m_uiIcyGripTimer = 35000; + m_uiIceTombSingleTimer = 15000; m_uiUnchainedMagicTimer = urand(15000, 30000); } @@ -324,9 +327,21 @@ struct MANGOS_DLL_DECL boss_sindragosaAI : public ScriptedAI switch(m_uiPhase) { case SINDRAGOSA_PHASE_THREE: - // TODO:Ice Tombs + { + // Ice Tomb + if (m_uiIceTombSingleTimer <= uiDiff) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1, SPELL_ICE_TOMB_SINGLE, SELECT_FLAG_PLAYER)) + { + if (DoCastSpellIfCan(pTarget, SPELL_ICE_TOMB) == CAST_OK) + m_uiIceTombSingleTimer = 15000; + } + } + else + m_uiIceTombSingleTimer -= uiDiff; // no break + } case SINDRAGOSA_PHASE_GROUND: { // Phase 1 only diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index fb6d5926c..a92de2d35 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2673" + #define SD2_REVISION_NR "2674" #endif // __SD2_REVISION_NR_H__ From 7ddf40fc9760396b61e362acfda4af0afa4e76e1 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sat, 18 Aug 2012 21:39:09 +0300 Subject: [PATCH 0663/1172] [2674] EventAI cleanup Part III - Eastern Kingdoms --- .../blackrock_depths/blackrock_depths.cpp | 122 ++--- .../blackrock_depths/blackrock_depths.h | 2 + .../blackrock_depths/boss_anubshiah.cpp | 100 +--- .../boss_gorosh_the_dervish.cpp | 62 +-- .../blackrock_depths/boss_grizzle.cpp | 70 +-- .../blackrock_depths/boss_magmus.cpp | 90 +-- .../blackrock_depths/boss_tomb_of_seven.cpp | 152 +----- .../instance_blackrock_depths.cpp | 16 + .../blackrock_spire/boss_drakkisath.cpp | 86 +-- .../blackrock_spire/boss_halycon.cpp | 68 +-- .../blackrock_spire/boss_highlord_omokk.cpp | 110 +--- .../boss_mother_smolderweb.cpp | 69 +-- .../boss_quartermaster_zigris.cpp | 66 +-- .../blackrock_spire/boss_rend_blackhand.cpp | 74 +-- .../boss_shadow_hunter_voshgajin.cpp | 77 +-- .../blackrock_spire/boss_the_beast.cpp | 76 +-- .../blackrock_spire/boss_warmaster_voone.cpp | 95 +--- scripts/eastern_kingdoms/boss_kruul.cpp | 155 +----- .../eastern_kingdoms/eastern_plaguelands.cpp | 48 -- .../eastern_kingdoms/karazhan/boss_moroes.cpp | 440 +-------------- .../karazhan/boss_shade_of_aran.cpp | 36 -- .../boss_azshir_the_sleepless.cpp | 70 +-- .../boss_bloodmage_thalnos.cpp | 100 +--- .../boss_high_inquisitor_fairbanks.cpp | 105 +--- .../boss_houndmaster_loksey.cpp | 54 +- .../boss_interrogator_vishas.cpp | 80 +-- .../scarlet_monastery/boss_scorn.cpp | 73 +-- .../boss_death_knight_darkreaver.cpp | 32 +- .../scholomance/boss_jandice_barov.cpp | 43 -- .../scholomance/boss_kormok.cpp | 114 +--- .../stratholme/boss_baron_rivendare.cpp | 122 +---- .../stratholme/boss_magistrate_barthilas.cpp | 86 +-- .../stratholme/boss_nerubenkan.cpp | 91 +--- .../stratholme/boss_postmaster_malown.cpp | 116 +--- .../stratholme/boss_ramstein_the_gorger.cpp | 60 +- .../stratholme/boss_timmy_the_cruel.cpp | 47 +- .../stratholme/stratholme.cpp | 51 +- .../zulaman/boss_malacrass.cpp | 515 ------------------ .../zulgurub/boss_gahzranka.cpp | 65 +-- .../eastern_kingdoms/zulgurub/boss_grilek.cpp | 65 +-- .../eastern_kingdoms/zulgurub/boss_jindo.cpp | 51 -- .../zulgurub/boss_wushoolay.cpp | 57 +- sql/mangos_scriptname_full.sql | 66 +-- sql/scriptdev2_script_full.sql | 17 +- sql/updates/r2674_mangos.sql | 51 ++ sql/updates/r2674_scriptdev2.sql | 14 + 46 files changed, 218 insertions(+), 3941 deletions(-) create mode 100644 sql/updates/r2674_mangos.sql create mode 100644 sql/updates/r2674_scriptdev2.sql diff --git a/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.cpp b/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.cpp index c285322b7..aa93942be 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.cpp +++ b/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.cpp @@ -26,11 +26,11 @@ go_shadowforge_brazier go_relic_coffer_door at_ring_of_law npc_grimstone -mob_phalanx npc_kharan_mighthammer npc_marshal_windsor npc_dughal_stormwing npc_tobias_seecher +boss_doomrel EndContentData */ #include "precompiled.h" @@ -449,76 +449,6 @@ bool EffectDummyCreature_spell_banner_of_provocation(Unit* pCaster, uint32 uiSpe return false; } -/*###### -## mob_phalanx -######*/ - -enum -{ - SPELL_THUNDERCLAP = 15588, - SPELL_FIREBALLVOLLEY = 15285, - SPELL_MIGHTYBLOW = 14099 -}; - -struct MANGOS_DLL_DECL mob_phalanxAI : public ScriptedAI -{ - mob_phalanxAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} - - uint32 m_uiThunderClapTimer; - uint32 m_uiFireballVolleyTimer; - uint32 m_uiMightyBlowTimer; - - void Reset() - { - m_uiThunderClapTimer = 12000; - m_uiFireballVolleyTimer = 0; - m_uiMightyBlowTimer = 15000; - } - - void UpdateAI(const uint32 uiDiff) - { - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - // ThunderClap - if (m_uiThunderClapTimer < uiDiff) - { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_THUNDERCLAP); - m_uiThunderClapTimer = 10000; - } - else - m_uiThunderClapTimer -= uiDiff; - - // FireballVolley - if (m_creature->GetHealthPercent() < 51.0f) - { - if (m_uiFireballVolleyTimer < uiDiff) - { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_FIREBALLVOLLEY); - m_uiFireballVolleyTimer = 15000; - } - else - m_uiFireballVolleyTimer -= uiDiff; - } - - // MightyBlow - if (m_uiMightyBlowTimer < uiDiff) - { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_MIGHTYBLOW); - m_uiMightyBlowTimer = 10000; - } - else - m_uiMightyBlowTimer -= uiDiff; - - DoMeleeAttackIfReady(); - } -}; - -CreatureAI* GetAI_mob_phalanx(Creature* pCreature) -{ - return new mob_phalanxAI(pCreature); -} - /*###### ## npc_kharan_mighthammer ######*/ @@ -1077,6 +1007,45 @@ bool GossipSelect_npc_tobias_seecher(Player* pPlayer, Creature* pCreature, uint3 return true; } +/*###### +## boss_doomrel +######*/ + +enum +{ + SAY_DOOMREL_START_EVENT = -1230003, + GOSSIP_ITEM_CHALLENGE = -3230002, + GOSSIP_TEXT_ID_CHALLENGE = 2601, +}; + +bool GossipHello_boss_doomrel(Player* pPlayer, Creature* pCreature) +{ + if (ScriptedInstance* pInstance = (ScriptedInstance*)pCreature->GetInstanceData()) + { + if (pInstance->GetData(TYPE_TOMB_OF_SEVEN) == NOT_STARTED || pInstance->GetData(TYPE_TOMB_OF_SEVEN) == FAIL) + pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_CHALLENGE, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); + } + + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXT_ID_CHALLENGE, pCreature->GetObjectGuid()); + return true; +} + +bool GossipSelect_boss_doomrel(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + switch(uiAction) + { + case GOSSIP_ACTION_INFO_DEF+1: + pPlayer->CLOSE_GOSSIP_MENU(); + DoScriptText(SAY_DOOMREL_START_EVENT, pCreature); + // start event + if (ScriptedInstance* pInstance = (ScriptedInstance*)pCreature->GetInstanceData()) + pInstance->SetData(TYPE_TOMB_OF_SEVEN, IN_PROGRESS); + + break; + } + return true; +} + void AddSC_blackrock_depths() { Script* pNewScript; @@ -1106,11 +1075,6 @@ void AddSC_blackrock_depths() pNewScript->pEffectDummyNPC = &EffectDummyCreature_spell_banner_of_provocation; pNewScript->RegisterSelf(); - pNewScript = new Script; - pNewScript->Name = "mob_phalanx"; - pNewScript->GetAI = &GetAI_mob_phalanx; - pNewScript->RegisterSelf(); - pNewScript = new Script; pNewScript->Name = "npc_kharan_mighthammer"; pNewScript->pGossipHello = &GossipHello_npc_kharan_mighthammer; @@ -1140,4 +1104,10 @@ void AddSC_blackrock_depths() pNewScript->pGossipHello = &GossipHello_npc_dughal_stormwing; pNewScript->pGossipSelect = &GossipSelect_npc_dughal_stormwing; pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "boss_doomrel"; + pNewScript->pGossipHello = &GossipHello_boss_doomrel; + pNewScript->pGossipSelect = &GossipSelect_boss_doomrel; + pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.h b/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.h index c7f678866..dcde1c25e 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.h +++ b/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.h @@ -29,6 +29,7 @@ enum NPC_SEETHREL = 9038, NPC_DOOMREL = 9039, NPC_DOPEREL = 9040, + NPC_MAGMUS = 9938, NPC_WATCHER_DOOMGRIP = 9476, NPC_WARBRINGER_CONST = 8905, // Four of them in Relict Vault are related to Doomgrip summon event @@ -126,6 +127,7 @@ class MANGOS_DLL_DECL instance_blackrock_depths : public ScriptedInstance void Initialize(); void OnCreatureCreate(Creature* pCreature); + void OnCreatureEnterCombat(Creature* pCreature); void OnCreatureDeath(Creature* pCreature); void OnCreatureEvade(Creature* pCreature); void OnObjectCreate(GameObject* pGo); diff --git a/scripts/eastern_kingdoms/blackrock_depths/boss_anubshiah.cpp b/scripts/eastern_kingdoms/blackrock_depths/boss_anubshiah.cpp index 870d20f5c..1eafe2d0c 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/boss_anubshiah.cpp +++ b/scripts/eastern_kingdoms/blackrock_depths/boss_anubshiah.cpp @@ -16,109 +16,13 @@ /* ScriptData SDName: Boss_Anubshiah -SD%Complete: 100 -SDComment: +SD%Complete: 0 +SDComment: Placeholder SDCategory: Blackrock Depths EndScriptData */ #include "precompiled.h" -enum -{ - SPELL_SHADOWBOLT = 17228, - SPELL_CURSEOFTONGUES = 15470, - SPELL_CURSEOFWEAKNESS = 17227, - SPELL_DEMONARMOR = 11735, - SPELL_ENVELOPINGWEB = 15471 -}; - -struct MANGOS_DLL_DECL boss_anubshiahAI : public ScriptedAI -{ - boss_anubshiahAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } - - uint32 m_uiShadowBoltTimer; - uint32 m_uiCurseOfTonguesTimer; - uint32 m_uiCurseOfWeaknessTimer; - uint32 m_uiDemonArmorTimer; - uint32 m_uiEnvelopingWebTimer; - - void Reset() - { - m_uiShadowBoltTimer = 7000; - m_uiCurseOfTonguesTimer = 24000; - m_uiCurseOfWeaknessTimer = 12000; - m_uiDemonArmorTimer = 3000; - m_uiEnvelopingWebTimer = 16000; - } - - void UpdateAI(const uint32 uiDiff) - { - //Return since we have no target - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - //ShadowBolt_Timer - if (m_uiShadowBoltTimer < uiDiff) - { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_SHADOWBOLT); - m_uiShadowBoltTimer = 7000; - } - else - m_uiShadowBoltTimer -= uiDiff; - - //CurseOfTongues_Timer - if (m_uiCurseOfTonguesTimer < uiDiff) - { - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) - DoCastSpellIfCan(pTarget, SPELL_CURSEOFTONGUES); - m_uiCurseOfTonguesTimer = 18000; - } - else - m_uiCurseOfTonguesTimer -= uiDiff; - - //CurseOfWeakness_Timer - if (m_uiCurseOfWeaknessTimer < uiDiff) - { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_CURSEOFWEAKNESS); - m_uiCurseOfWeaknessTimer = 45000; - } - else - m_uiCurseOfWeaknessTimer -= uiDiff; - - //DemonArmor_Timer - if (m_uiDemonArmorTimer < uiDiff) - { - DoCastSpellIfCan(m_creature, SPELL_DEMONARMOR); - m_uiDemonArmorTimer = 300000; - } - else - m_uiDemonArmorTimer -= uiDiff; - - //EnvelopingWeb_Timer - if (m_uiEnvelopingWebTimer < uiDiff) - { - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) - DoCastSpellIfCan(pTarget, SPELL_ENVELOPINGWEB); - m_uiEnvelopingWebTimer = 12000; - } - else - m_uiEnvelopingWebTimer -= uiDiff; - - DoMeleeAttackIfReady(); - } -}; - -CreatureAI* GetAI_boss_anubshiah(Creature* pCreature) -{ - return new boss_anubshiahAI(pCreature); -} - void AddSC_boss_anubshiah() { - Script* pNewScript; - - pNewScript = new Script; - pNewScript->Name = "boss_anubshiah"; - pNewScript->GetAI = &GetAI_boss_anubshiah; - pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/blackrock_depths/boss_gorosh_the_dervish.cpp b/scripts/eastern_kingdoms/blackrock_depths/boss_gorosh_the_dervish.cpp index df22713fd..4f14910e7 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/boss_gorosh_the_dervish.cpp +++ b/scripts/eastern_kingdoms/blackrock_depths/boss_gorosh_the_dervish.cpp @@ -16,71 +16,13 @@ /* ScriptData SDName: Boss_Gorosh_the_Dervish -SD%Complete: 100 -SDComment: +SD%Complete: 0 +SDComment: Placeholder SDCategory: Blackrock Depths EndScriptData */ #include "precompiled.h" -enum -{ - SPELL_WHIRLWIND = 15589, - SPELL_MORTALSTRIKE = 24573, -}; - -struct MANGOS_DLL_DECL boss_gorosh_the_dervishAI : public ScriptedAI -{ - boss_gorosh_the_dervishAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} - - uint32 m_uiWhirlWindTimer; - uint32 m_uiMortalStrikeTimer; - - void Reset() - { - m_uiWhirlWindTimer = 12000; - m_uiMortalStrikeTimer = 22000; - } - - void UpdateAI(const uint32 uiDiff) - { - //Return since we have no target - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - //WhirlWind_Timer - if (m_uiWhirlWindTimer < uiDiff) - { - DoCastSpellIfCan(m_creature, SPELL_WHIRLWIND); - m_uiWhirlWindTimer = 15000; - } - else - m_uiWhirlWindTimer -= uiDiff; - - //MortalStrike_Timer - if (m_uiMortalStrikeTimer < uiDiff) - { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_MORTALSTRIKE); - m_uiMortalStrikeTimer = 15000; - } - else - m_uiMortalStrikeTimer -= uiDiff; - - DoMeleeAttackIfReady(); - } -}; - -CreatureAI* GetAI_boss_gorosh_the_dervish(Creature* pCreature) -{ - return new boss_gorosh_the_dervishAI(pCreature); -} - void AddSC_boss_gorosh_the_dervish() { - Script* pNewScript; - - pNewScript = new Script; - pNewScript->Name = "boss_gorosh_the_dervish"; - pNewScript->GetAI = &GetAI_boss_gorosh_the_dervish; - pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/blackrock_depths/boss_grizzle.cpp b/scripts/eastern_kingdoms/blackrock_depths/boss_grizzle.cpp index d89545bea..5045d6d4b 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/boss_grizzle.cpp +++ b/scripts/eastern_kingdoms/blackrock_depths/boss_grizzle.cpp @@ -16,79 +16,13 @@ /* ScriptData SDName: Boss_Grizzle -SD%Complete: 100 -SDComment: +SD%Complete: 0 +SDComment: Placeholder SDCategory: Blackrock Depths EndScriptData */ #include "precompiled.h" -enum -{ - EMOTE_GENERIC_FRENZY_KILL = -1000001, - - SPELL_GROUNDTREMOR = 6524, - SPELL_FRENZY = 28371, -}; - -struct MANGOS_DLL_DECL boss_grizzleAI : public ScriptedAI -{ - boss_grizzleAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } - - uint32 m_uiGroundTremorTimer; - uint32 m_uiFrenzyTimer; - - void Reset() - { - m_uiGroundTremorTimer = 12000; - m_uiFrenzyTimer = 0; - } - - void UpdateAI(const uint32 uiDiff) - { - //Return since we have no target - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - //GroundTremor_Timer - if (m_uiGroundTremorTimer < uiDiff) - { - DoCastSpellIfCan(m_creature, SPELL_GROUNDTREMOR); - m_uiGroundTremorTimer = 8000; - } - else - m_uiGroundTremorTimer -= uiDiff; - - //Frenzy_Timer - if (m_creature->GetHealthPercent() < 51.0f) - { - if (m_uiFrenzyTimer < uiDiff) - { - if (DoCastSpellIfCan(m_creature, SPELL_FRENZY) == CAST_OK) - { - DoScriptText(EMOTE_GENERIC_FRENZY_KILL, m_creature); - m_uiFrenzyTimer = 15000; - } - } - else - m_uiFrenzyTimer -= uiDiff; - } - - DoMeleeAttackIfReady(); - } -}; - -CreatureAI* GetAI_boss_grizzle(Creature* pCreature) -{ - return new boss_grizzleAI(pCreature); -} - void AddSC_boss_grizzle() { - Script* pNewScript; - - pNewScript = new Script; - pNewScript->Name = "boss_grizzle"; - pNewScript->GetAI = &GetAI_boss_grizzle; - pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/blackrock_depths/boss_magmus.cpp b/scripts/eastern_kingdoms/blackrock_depths/boss_magmus.cpp index 25dc1a2ca..b590f4fe3 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/boss_magmus.cpp +++ b/scripts/eastern_kingdoms/blackrock_depths/boss_magmus.cpp @@ -16,99 +16,13 @@ /* ScriptData SDName: Boss_Magmus -SD%Complete: 80 -SDComment: Missing pre-event to open doors +SD%Complete: 0 +SDComment: Placeholder SDCategory: Blackrock Depths EndScriptData */ #include "precompiled.h" -#include "blackrock_depths.h" - -enum -{ - SPELL_FIERYBURST = 13900, - SPELL_WARSTOMP = 24375 -}; - -struct MANGOS_DLL_DECL boss_magmusAI : public ScriptedAI -{ - boss_magmusAI(Creature* pCreature) : ScriptedAI(pCreature) - { - m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - Reset(); - } - - ScriptedInstance* m_pInstance; - - uint32 m_uiFieryBurstTimer; - uint32 m_uiWarStompTimer; - - void Reset() - { - m_uiFieryBurstTimer = 5000; - m_uiWarStompTimer = 0; - } - - void Aggro(Unit* pWho) - { - if (m_pInstance) - m_pInstance->SetData(TYPE_IRON_HALL, IN_PROGRESS); - } - - void JustReachedHome() - { - if (m_pInstance) - m_pInstance->SetData(TYPE_IRON_HALL, FAIL); - } - - void JustDied(Unit* pVictim) - { - if (m_pInstance) - m_pInstance->SetData(TYPE_IRON_HALL, DONE); - } - - void UpdateAI(const uint32 uiDiff) - { - //Return since we have no target - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - //FieryBurst_Timer - if (m_uiFieryBurstTimer < uiDiff) - { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_FIERYBURST); - m_uiFieryBurstTimer = 6000; - } - else - m_uiFieryBurstTimer -= uiDiff; - - //WarStomp_Timer - if (m_creature->GetHealthPercent() < 51.0f) - { - if (m_uiWarStompTimer < uiDiff) - { - DoCastSpellIfCan(m_creature, SPELL_WARSTOMP); - m_uiWarStompTimer = 8000; - } - else - m_uiWarStompTimer -= uiDiff; - } - - DoMeleeAttackIfReady(); - } -}; - -CreatureAI* GetAI_boss_magmus(Creature* pCreature) -{ - return new boss_magmusAI(pCreature); -} void AddSC_boss_magmus() { - Script* pNewScript; - - pNewScript = new Script; - pNewScript->Name = "boss_magmus"; - pNewScript->GetAI = &GetAI_boss_magmus; - pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/blackrock_depths/boss_tomb_of_seven.cpp b/scripts/eastern_kingdoms/blackrock_depths/boss_tomb_of_seven.cpp index 8afd91e9b..75f37a5de 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/boss_tomb_of_seven.cpp +++ b/scripts/eastern_kingdoms/blackrock_depths/boss_tomb_of_seven.cpp @@ -16,161 +16,13 @@ /* ScriptData SDName: Boss_Tomb_Of_Seven -SD%Complete: 100 -SDComment: +SD%Complete: 0 +SDComment: Placeholder SDCategory: Blackrock Depths EndScriptData */ #include "precompiled.h" -#include "blackrock_depths.h" - -enum -{ - SPELL_SHADOW_BOLT_VOLLEY = 15245, - SPELL_IMMOLATE = 12742, - SPELL_CURSE_OF_WEAKNESS = 12493, - SPELL_DEMON_ARMOR = 13787, - SPELL_SUMMON_VOIDWALKERS = 15092, - - SAY_DOOMREL_START_EVENT = -1230003, - GOSSIP_ITEM_CHALLENGE = -3230002, - GOSSIP_TEXT_ID_CHALLENGE = 2601, -}; - -struct MANGOS_DLL_DECL boss_doomrelAI : public ScriptedAI -{ - boss_doomrelAI(Creature* pCreature) : ScriptedAI(pCreature) - { - m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - Reset(); - } - - ScriptedInstance* m_pInstance; - - uint32 m_uiShadowVolleyTimer; - uint32 m_uiImmolateTimer; - uint32 m_uiCurseOfWeaknessTimer; - uint32 m_uiDemonArmorTimer; - - void Reset() - { - m_uiShadowVolleyTimer = 10000; - m_uiImmolateTimer = 18000; - m_uiCurseOfWeaknessTimer = 5000; - m_uiDemonArmorTimer = 1000; - } - - void Aggro(Unit* pWho) - { - DoCastSpellIfCan(m_creature, SPELL_SUMMON_VOIDWALKERS); - } - - void JustReachedHome() - { - if (m_pInstance) - m_pInstance->SetData(TYPE_TOMB_OF_SEVEN, FAIL); - } - - void JustDied(Unit *victim) - { - if (m_pInstance) - m_pInstance->SetData(TYPE_TOMB_OF_SEVEN, DONE); - } - - void JustSummoned(Creature* pSummoned) - { - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) - pSummoned->AI()->AttackStart(pTarget); - } - - void UpdateAI(const uint32 uiDiff) - { - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - if (m_uiShadowVolleyTimer < uiDiff) - { - if (DoCastSpellIfCan(m_creature, SPELL_SHADOW_BOLT_VOLLEY) == CAST_OK) - m_uiShadowVolleyTimer = 12000; - } - else - m_uiShadowVolleyTimer -= uiDiff; - - if (m_uiImmolateTimer < uiDiff) - { - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) - { - if (DoCastSpellIfCan(pTarget, SPELL_IMMOLATE) == CAST_OK) - m_uiImmolateTimer = 25000; - } - } - else - m_uiImmolateTimer -= uiDiff; - - if (m_uiCurseOfWeaknessTimer < uiDiff) - { - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) - { - if (DoCastSpellIfCan(pTarget, SPELL_CURSE_OF_WEAKNESS) == CAST_OK) - m_uiCurseOfWeaknessTimer = 45000; - } - } - else - m_uiCurseOfWeaknessTimer -= uiDiff; - - if (m_uiDemonArmorTimer < uiDiff) - { - if (DoCastSpellIfCan(m_creature, SPELL_DEMON_ARMOR) == CAST_OK) - m_uiDemonArmorTimer = 300000; - } - else - m_uiDemonArmorTimer -= uiDiff; - - DoMeleeAttackIfReady(); - } -}; - -CreatureAI* GetAI_boss_doomrel(Creature* pCreature) -{ - return new boss_doomrelAI(pCreature); -} - -bool GossipHello_boss_doomrel(Player* pPlayer, Creature* pCreature) -{ - if (ScriptedInstance* pInstance = (ScriptedInstance*)pCreature->GetInstanceData()) - { - if (pInstance->GetData(TYPE_TOMB_OF_SEVEN) == NOT_STARTED || pInstance->GetData(TYPE_TOMB_OF_SEVEN) == FAIL) - pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_CHALLENGE, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); - } - - pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXT_ID_CHALLENGE, pCreature->GetObjectGuid()); - return true; -} - -bool GossipSelect_boss_doomrel(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) -{ - switch(uiAction) - { - case GOSSIP_ACTION_INFO_DEF+1: - pPlayer->CLOSE_GOSSIP_MENU(); - DoScriptText(SAY_DOOMREL_START_EVENT, pCreature); - // start event - if (ScriptedInstance* pInstance = (ScriptedInstance*)pCreature->GetInstanceData()) - pInstance->SetData(TYPE_TOMB_OF_SEVEN, IN_PROGRESS); - - break; - } - return true; -} void AddSC_boss_tomb_of_seven() { - Script* pNewScript; - - pNewScript = new Script; - pNewScript->Name = "boss_doomrel"; - pNewScript->GetAI = &GetAI_boss_doomrel; - pNewScript->pGossipHello = &GossipHello_boss_doomrel; - pNewScript->pGossipSelect = &GossipSelect_boss_doomrel; - pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/blackrock_depths/instance_blackrock_depths.cpp b/scripts/eastern_kingdoms/blackrock_depths/instance_blackrock_depths.cpp index 73fe58521..003e93c4e 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/instance_blackrock_depths.cpp +++ b/scripts/eastern_kingdoms/blackrock_depths/instance_blackrock_depths.cpp @@ -284,6 +284,12 @@ void instance_blackrock_depths::Load(const char* chrIn) OUT_LOAD_INST_DATA_COMPLETE; } +void instance_blackrock_depths::OnCreatureEnterCombat(Creature* pCreature) +{ + if (pCreature->GetEntry() == NPC_MAGMUS) + SetData(TYPE_IRON_HALL, IN_PROGRESS); +} + void instance_blackrock_depths::OnCreatureEvade(Creature* pCreature) { if (GetData(TYPE_RING_OF_LAW) == IN_PROGRESS || GetData(TYPE_RING_OF_LAW) == SPECIAL) @@ -307,8 +313,12 @@ void instance_blackrock_depths::OnCreatureEvade(Creature* pCreature) case NPC_GLOOMREL: case NPC_SEETHREL: case NPC_DOPEREL: + case NPC_DOOMREL: SetData(TYPE_TOMB_OF_SEVEN, FAIL); break; + case NPC_MAGMUS: + SetData(TYPE_IRON_HALL, FAIL); + break; } } @@ -348,6 +358,12 @@ void instance_blackrock_depths::OnCreatureDeath(Creature* pCreature) if (pCreature->GetEntry() == aTombDwarfes[m_uiDwarfRound - 1]) DoCallNextDwarf(); break; + case NPC_DOOMREL: + SetData(TYPE_TOMB_OF_SEVEN, DONE); + break; + case NPC_MAGMUS: + SetData(TYPE_IRON_HALL, DONE); + break; } } diff --git a/scripts/eastern_kingdoms/blackrock_spire/boss_drakkisath.cpp b/scripts/eastern_kingdoms/blackrock_spire/boss_drakkisath.cpp index 6f8813738..ea00a4af6 100644 --- a/scripts/eastern_kingdoms/blackrock_spire/boss_drakkisath.cpp +++ b/scripts/eastern_kingdoms/blackrock_spire/boss_drakkisath.cpp @@ -16,95 +16,13 @@ /* ScriptData SDName: Boss_Drakkisath -SD%Complete: 100 -SDComment: +SD%Complete: 0 +SDComment: Placeholder SDCategory: Blackrock Spire EndScriptData */ #include "precompiled.h" -enum -{ - SPELL_FIRENOVA = 23462, - SPELL_CLEAVE = 20691, - SPELL_CONFLIGURATION = 16805, - SPELL_THUNDERCLAP = 15548 //Not sure if right ID. 23931 would be a harder possibility. -}; - -struct MANGOS_DLL_DECL boss_drakkisathAI : public ScriptedAI -{ - boss_drakkisathAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} - - uint32 m_uiFireNovaTimer; - uint32 m_uiCleaveTimer; - uint32 m_uiConfligurationTimer; - uint32 m_uiThunderclapTimer; - - void Reset() - { - m_uiFireNovaTimer = 6000; - m_uiCleaveTimer = 8000; - m_uiConfligurationTimer = 15000; - m_uiThunderclapTimer = 17000; - } - - void UpdateAI(const uint32 uiDiff) - { - // Return since we have no target - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - // FireNova - if (m_uiFireNovaTimer < uiDiff) - { - DoCastSpellIfCan(m_creature, SPELL_FIRENOVA); - m_uiFireNovaTimer = 10000; - } - else - m_uiFireNovaTimer -= uiDiff; - - // Cleave - if (m_uiCleaveTimer < uiDiff) - { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_CLEAVE); - m_uiCleaveTimer = 8000; - } - else - m_uiCleaveTimer -= uiDiff; - - // Confliguration - if (m_uiConfligurationTimer < uiDiff) - { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_CONFLIGURATION, 0, m_creature->getVictim()->GetObjectGuid()); - m_uiConfligurationTimer = 18000; - } - else - m_uiConfligurationTimer -= uiDiff; - - // Thunderclap - if (m_uiThunderclapTimer < uiDiff) - { - DoCastSpellIfCan(m_creature, SPELL_THUNDERCLAP); - m_uiThunderclapTimer = 20000; - } - else - m_uiThunderclapTimer -= uiDiff; - - DoMeleeAttackIfReady(); - } -}; - -CreatureAI* GetAI_boss_drakkisath(Creature* pCreature) -{ - return new boss_drakkisathAI(pCreature); -} - void AddSC_boss_drakkisath() { - Script* pNewScript; - - pNewScript = new Script; - pNewScript->Name = "boss_drakkisath"; - pNewScript->GetAI = &GetAI_boss_drakkisath; - pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/blackrock_spire/boss_halycon.cpp b/scripts/eastern_kingdoms/blackrock_spire/boss_halycon.cpp index e40f2627c..c539a2b2f 100644 --- a/scripts/eastern_kingdoms/blackrock_spire/boss_halycon.cpp +++ b/scripts/eastern_kingdoms/blackrock_spire/boss_halycon.cpp @@ -16,77 +16,13 @@ /* ScriptData SDName: Boss_Halycon -SD%Complete: 100 -SDComment: +SD%Complete: 0 +SDComment: Placeholder SDCategory: Blackrock Spire EndScriptData */ #include "precompiled.h" -#define SPELL_CROWDPUMMEL 10887 -#define SPELL_MIGHTYBLOW 14099 - -#define ADD_1X -169.839203f -#define ADD_1Y -324.961395f -#define ADD_1Z 64.401443f -#define ADD_1O 3.124724f - -struct MANGOS_DLL_DECL boss_halyconAI : public ScriptedAI -{ - boss_halyconAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} - - uint32 CrowdPummel_Timer; - uint32 MightyBlow_Timer; - bool Summoned; - - void Reset() - { - CrowdPummel_Timer = 8000; - MightyBlow_Timer = 14000; - Summoned = false; - } - - void UpdateAI(const uint32 diff) - { - //Return since we have no target - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - //CrowdPummel_Timer - if (CrowdPummel_Timer < diff) - { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_CROWDPUMMEL); - CrowdPummel_Timer = 14000; - }else CrowdPummel_Timer -= diff; - - //MightyBlow_Timer - if (MightyBlow_Timer < diff) - { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_MIGHTYBLOW); - MightyBlow_Timer = 10000; - }else MightyBlow_Timer -= diff; - - //Summon Gizrul - if (!Summoned && m_creature->GetHealthPercent() < 25.0f) - { - m_creature->SummonCreature(10268,ADD_1X,ADD_1Y,ADD_1Z,ADD_1O,TEMPSUMMON_TIMED_DESPAWN,300000); - Summoned = true; - } - - DoMeleeAttackIfReady(); - } -}; -CreatureAI* GetAI_boss_halycon(Creature* pCreature) -{ - return new boss_halyconAI(pCreature); -} - void AddSC_boss_halycon() { - Script* pNewScript; - - pNewScript = new Script; - pNewScript->Name = "boss_halycon"; - pNewScript->GetAI = &GetAI_boss_halycon; - pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/blackrock_spire/boss_highlord_omokk.cpp b/scripts/eastern_kingdoms/blackrock_spire/boss_highlord_omokk.cpp index 57d65d297..48894c963 100644 --- a/scripts/eastern_kingdoms/blackrock_spire/boss_highlord_omokk.cpp +++ b/scripts/eastern_kingdoms/blackrock_spire/boss_highlord_omokk.cpp @@ -16,119 +16,13 @@ /* ScriptData SDName: Boss_Highlord_Omokk -SD%Complete: 100 -SDComment: +SD%Complete: 0 +SDComment: Placeholder. SDCategory: Blackrock Spire EndScriptData */ #include "precompiled.h" -enum -{ - SPELL_WARSTOMP = 24375, - SPELL_STRIKE = 18368, - SPELL_REND = 18106, - SPELL_SUNDERARMOR = 24317, - SPELL_KNOCKAWAY = 20686, - SPELL_SLOW = 22356 -}; - -struct MANGOS_DLL_DECL boss_highlordomokkAI : public ScriptedAI -{ - boss_highlordomokkAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} - - uint32 m_uiWarStompTimer; - uint32 m_uiStrikeTimer; - uint32 m_uiRendTimer; - uint32 m_uiSunderArmorTimer; - uint32 m_uiKnockAwayTimer; - uint32 m_uiSlowTimer; - - void Reset() - { - m_uiWarStompTimer = 15000; - m_uiStrikeTimer = 10000; - m_uiRendTimer = 14000; - m_uiSunderArmorTimer = 2000; - m_uiKnockAwayTimer = 18000; - m_uiSlowTimer = 24000; - } - - void UpdateAI(const uint32 uiDiff) - { - //Return since we have no target - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - // WarStomp - if (m_uiWarStompTimer < uiDiff) - { - DoCastSpellIfCan(m_creature, SPELL_WARSTOMP); - m_uiWarStompTimer = 14000; - } - else - m_uiWarStompTimer -= uiDiff; - - // Strike - if (m_uiStrikeTimer < uiDiff) - { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_STRIKE); - m_uiStrikeTimer = 10000; - } - else - m_uiStrikeTimer -= uiDiff; - - // Rend - if (m_uiRendTimer < uiDiff) - { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_REND); - m_uiRendTimer = 18000; - } - else - m_uiRendTimer -= uiDiff; - - // Sunder Armor - if (m_uiSunderArmorTimer < uiDiff) - { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_SUNDERARMOR); - m_uiSunderArmorTimer = 25000; - } - else - m_uiSunderArmorTimer -= uiDiff; - - // KnockAway - if (m_uiKnockAwayTimer < uiDiff) - { - DoCastSpellIfCan(m_creature, SPELL_KNOCKAWAY); - m_uiKnockAwayTimer = 12000; - } - else - m_uiKnockAwayTimer -= uiDiff; - - // Slow - if (m_uiSlowTimer < uiDiff) - { - DoCastSpellIfCan(m_creature, SPELL_SLOW); - m_uiSlowTimer = 18000; - } - else - m_uiSlowTimer -= uiDiff; - - DoMeleeAttackIfReady(); - } -}; - -CreatureAI* GetAI_boss_highlordomokk(Creature* pCreature) -{ - return new boss_highlordomokkAI(pCreature); -} - void AddSC_boss_highlordomokk() { - Script* pNewScript; - - pNewScript = new Script; - pNewScript->Name = "boss_highlord_omokk"; - pNewScript->GetAI = &GetAI_boss_highlordomokk; - pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/blackrock_spire/boss_mother_smolderweb.cpp b/scripts/eastern_kingdoms/blackrock_spire/boss_mother_smolderweb.cpp index 25a1e66b1..0b756a87f 100644 --- a/scripts/eastern_kingdoms/blackrock_spire/boss_mother_smolderweb.cpp +++ b/scripts/eastern_kingdoms/blackrock_spire/boss_mother_smolderweb.cpp @@ -16,78 +16,13 @@ /* ScriptData SDName: Boss_Mother_Smolderweb -SD%Complete: 100 -SDComment: Uncertain how often mother's milk is casted +SD%Complete: 0 +SDComment: Placeholder. SDCategory: Blackrock Spire EndScriptData */ #include "precompiled.h" -enum -{ - SPELL_CRYSTALIZE = 16104, - SPELL_MOTHERSMILK = 16468, - SPELL_SUMMON_SPIRE_SPIDERLING = 16103 -}; - -struct MANGOS_DLL_DECL boss_mothersmolderwebAI : public ScriptedAI -{ - boss_mothersmolderwebAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} - - uint32 m_uiCrystalizeTimer; - uint32 m_uiMothersMilkTimer; - - void Reset() - { - m_uiCrystalizeTimer = 20000; - m_uiMothersMilkTimer = 10000; - } - - void DamageTaken(Unit* pDoneBy, uint32 &uiDamage) - { - if (m_creature->GetHealth() <= uiDamage) - DoCastSpellIfCan(m_creature, SPELL_SUMMON_SPIRE_SPIDERLING, CAST_TRIGGERED); - } - - void UpdateAI(const uint32 uiDiff) - { - // Return since we have no target - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - // Crystalize - if (m_uiCrystalizeTimer < uiDiff) - { - DoCastSpellIfCan(m_creature, SPELL_CRYSTALIZE); - m_uiCrystalizeTimer = 15000; - } - else - m_uiCrystalizeTimer -= uiDiff; - - // Mothers Milk - if (m_uiMothersMilkTimer < uiDiff) - { - DoCastSpellIfCan(m_creature, SPELL_MOTHERSMILK); - m_uiMothersMilkTimer = urand(5000, 12500); - } - else - m_uiMothersMilkTimer -= uiDiff; - - DoMeleeAttackIfReady(); - } -}; - -CreatureAI* GetAI_boss_mothersmolderweb(Creature* pCreature) -{ - return new boss_mothersmolderwebAI(pCreature); -} - void AddSC_boss_mothersmolderweb() { - Script* pNewScript; - - pNewScript = new Script; - pNewScript->Name = "boss_mother_smolderweb"; - pNewScript->GetAI = &GetAI_boss_mothersmolderweb; - pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/blackrock_spire/boss_quartermaster_zigris.cpp b/scripts/eastern_kingdoms/blackrock_spire/boss_quartermaster_zigris.cpp index 25c8be0d4..7893f773e 100644 --- a/scripts/eastern_kingdoms/blackrock_spire/boss_quartermaster_zigris.cpp +++ b/scripts/eastern_kingdoms/blackrock_spire/boss_quartermaster_zigris.cpp @@ -16,75 +16,13 @@ /* ScriptData SDName: Boss_Quartmaster_Zigris -SD%Complete: 100 -SDComment: Needs revision +SD%Complete: 0 +SDComment: Placeholder SDCategory: Blackrock Spire EndScriptData */ #include "precompiled.h" -enum -{ - SPELL_SHOOT = 16496, - SPELL_STUNBOMB = 16497, - SPELL_HEALING_POTION = 15504, - SPELL_HOOKEDNET = 15609 -}; - -struct MANGOS_DLL_DECL boss_quatermasterzigrisAI : public ScriptedAI -{ - boss_quatermasterzigrisAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} - - uint32 m_uiShootTimer; - uint32 m_uiStunBombTimer; - //uint32 HelingPotion_Timer; - - void Reset() - { - m_uiShootTimer = 1000; - m_uiStunBombTimer = 16000; - //HelingPotion_Timer = 25000; - } - - void UpdateAI(const uint32 uiDiff) - { - // Return since we have no target - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - // Shoot - if (m_uiShootTimer < uiDiff) - { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_SHOOT); - m_uiShootTimer = 500; - } - else - m_uiShootTimer -= uiDiff; - - // StunBomb - if (m_uiStunBombTimer < uiDiff) - { - DoCastSpellIfCan(m_creature, SPELL_STUNBOMB); - m_uiStunBombTimer = 14000; - } - else - m_uiStunBombTimer -= uiDiff; - - DoMeleeAttackIfReady(); - } -}; - -CreatureAI* GetAI_boss_quatermasterzigris(Creature* pCreature) -{ - return new boss_quatermasterzigrisAI(pCreature); -} - void AddSC_boss_quatermasterzigris() { - Script* pNewScript; - - pNewScript = new Script; - pNewScript->Name = "quartermaster_zigris"; - pNewScript->GetAI = &GetAI_boss_quatermasterzigris; - pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/blackrock_spire/boss_rend_blackhand.cpp b/scripts/eastern_kingdoms/blackrock_spire/boss_rend_blackhand.cpp index be09d1955..a5624c313 100644 --- a/scripts/eastern_kingdoms/blackrock_spire/boss_rend_blackhand.cpp +++ b/scripts/eastern_kingdoms/blackrock_spire/boss_rend_blackhand.cpp @@ -16,83 +16,13 @@ /* ScriptData SDName: Boss_Rend_Blackhand -SD%Complete: 100 -SDComment: Intro event NYI +SD%Complete: 0 +SDComment: Placeholder SDCategory: Blackrock Spire EndScriptData */ #include "precompiled.h" -enum -{ - SPELL_WHIRLWIND = 26038, - SPELL_CLEAVE = 20691, - SPELL_THUNDERCLAP = 23931 //Not sure if he cast this spell -}; - -struct MANGOS_DLL_DECL boss_rend_blackhandAI : public ScriptedAI -{ - boss_rend_blackhandAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} - - uint32 m_uiWhirlWindTimer; - uint32 m_uiCleaveTimer; - uint32 m_uiThunderclapTimer; - - void Reset() - { - m_uiWhirlWindTimer = 20000; - m_uiCleaveTimer = 5000; - m_uiThunderclapTimer = 9000; - } - - void UpdateAI(const uint32 uiDiff) - { - // Return since we have no target - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - // WhirlWind - if (m_uiWhirlWindTimer < uiDiff) - { - DoCastSpellIfCan(m_creature, SPELL_WHIRLWIND); - m_uiWhirlWindTimer = 18000; - } - else - m_uiWhirlWindTimer -= uiDiff; - - // Cleave - if (m_uiCleaveTimer < uiDiff) - { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_CLEAVE); - m_uiCleaveTimer = 10000; - } - else - m_uiCleaveTimer -= uiDiff; - - // Thunderclap - if (m_uiThunderclapTimer < uiDiff) - { - DoCastSpellIfCan(m_creature, SPELL_THUNDERCLAP); - m_uiThunderclapTimer = 16000; - } - else - m_uiThunderclapTimer -= uiDiff; - - DoMeleeAttackIfReady(); - } -}; - -CreatureAI* GetAI_boss_rend_blackhand(Creature* pCreature) -{ - return new boss_rend_blackhandAI(pCreature); -} - void AddSC_boss_rend_blackhand() { - Script* pNewScript; - - pNewScript = new Script; - pNewScript->Name = "boss_rend_blackhand"; - pNewScript->GetAI = &GetAI_boss_rend_blackhand; - pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/blackrock_spire/boss_shadow_hunter_voshgajin.cpp b/scripts/eastern_kingdoms/blackrock_spire/boss_shadow_hunter_voshgajin.cpp index 1a9cd75c9..a3cbee71e 100644 --- a/scripts/eastern_kingdoms/blackrock_spire/boss_shadow_hunter_voshgajin.cpp +++ b/scripts/eastern_kingdoms/blackrock_spire/boss_shadow_hunter_voshgajin.cpp @@ -16,86 +16,13 @@ /* ScriptData SDName: Boss_Shadow_Hunter_Voshgajin -SD%Complete: 100 -SDComment: +SD%Complete: 0 +SDComment: Placeholder SDCategory: Blackrock Spire EndScriptData */ #include "precompiled.h" -enum -{ - SPELL_CURSEOFBLOOD = 24673, - SPELL_HEX = 16708, - SPELL_CLEAVE = 20691 -}; - -struct MANGOS_DLL_DECL boss_shadowvoshAI : public ScriptedAI -{ - boss_shadowvoshAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} - - uint32 m_uiCurseOfBloodTimer; - uint32 m_uiHexTimer; - uint32 m_uiCleaveTimer; - - void Reset() - { - m_uiCurseOfBloodTimer = 2000; - m_uiHexTimer = 8000; - m_uiCleaveTimer = 14000; - - //m_creature->CastSpell(m_creature,SPELL_ICEARMOR,true); - } - - void UpdateAI(const uint32 uiDiff) - { - // Return since we have no target - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - // Curse Of Blood - if (m_uiCurseOfBloodTimer < uiDiff) - { - DoCastSpellIfCan(m_creature, SPELL_CURSEOFBLOOD); - m_uiCurseOfBloodTimer = 45000; - } - else - m_uiCurseOfBloodTimer -= uiDiff; - - // Hex - if (m_uiHexTimer < uiDiff) - { - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) - DoCastSpellIfCan(pTarget, SPELL_HEX); - m_uiHexTimer = 15000; - } - else - m_uiHexTimer -= uiDiff; - - // Cleave - if (m_uiCleaveTimer < uiDiff) - { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_CLEAVE); - m_uiCleaveTimer = 7000; - } - else - m_uiCleaveTimer -= uiDiff; - - DoMeleeAttackIfReady(); - } -}; - -CreatureAI* GetAI_boss_shadowvosh(Creature* pCreature) -{ - return new boss_shadowvoshAI(pCreature); -} - void AddSC_boss_shadowvosh() { - Script* pNewScript; - - pNewScript = new Script; - pNewScript->Name = "boss_shadow_hunter_voshgajin"; - pNewScript->GetAI = &GetAI_boss_shadowvosh; - pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/blackrock_spire/boss_the_beast.cpp b/scripts/eastern_kingdoms/blackrock_spire/boss_the_beast.cpp index 6329f878a..408ff60d4 100644 --- a/scripts/eastern_kingdoms/blackrock_spire/boss_the_beast.cpp +++ b/scripts/eastern_kingdoms/blackrock_spire/boss_the_beast.cpp @@ -16,85 +16,13 @@ /* ScriptData SDName: Boss_The_Best -SD%Complete: 100 -SDComment: +SD%Complete: 0 +SDComment: Placeholder SDCategory: Blackrock Spire EndScriptData */ #include "precompiled.h" -enum -{ - SPELL_FLAMEBREAK = 16785, - SPELL_IMMOLATE = 20294, - SPELL_TERRIFYINGROAR = 14100 -}; - -struct MANGOS_DLL_DECL boss_thebeastAI : public ScriptedAI -{ - boss_thebeastAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} - - uint32 m_uiFlamebreakTimer; - uint32 m_uiImmolateTimer; - uint32 m_uiTerrifyingRoarTimer; - - void Reset() - { - m_uiFlamebreakTimer = 12000; - m_uiImmolateTimer = 3000; - m_uiTerrifyingRoarTimer = 23000; - } - - void UpdateAI(const uint32 uiDiff) - { - // Return since we have no target - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - // Flamebreak - if (m_uiFlamebreakTimer < uiDiff) - { - DoCastSpellIfCan(m_creature, SPELL_FLAMEBREAK); - m_uiFlamebreakTimer = 10000; - } - else - m_uiFlamebreakTimer -= uiDiff; - - // Immolate - if (m_uiImmolateTimer < uiDiff) - { - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) - DoCastSpellIfCan(pTarget, SPELL_IMMOLATE); - - m_uiImmolateTimer = 8000; - } - else - m_uiImmolateTimer -= uiDiff; - - // Terrifying Roar - if (m_uiTerrifyingRoarTimer < uiDiff) - { - DoCastSpellIfCan(m_creature, SPELL_TERRIFYINGROAR); - m_uiTerrifyingRoarTimer = 20000; - } - else - m_uiTerrifyingRoarTimer -= uiDiff; - - DoMeleeAttackIfReady(); - } -}; - -CreatureAI* GetAI_boss_thebeast(Creature* pCreature) -{ - return new boss_thebeastAI(pCreature); -} - void AddSC_boss_thebeast() { - Script* pNewScript; - - pNewScript = new Script; - pNewScript->Name = "boss_the_beast"; - pNewScript->GetAI = &GetAI_boss_thebeast; - pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/blackrock_spire/boss_warmaster_voone.cpp b/scripts/eastern_kingdoms/blackrock_spire/boss_warmaster_voone.cpp index a6728b67e..7cc984b96 100644 --- a/scripts/eastern_kingdoms/blackrock_spire/boss_warmaster_voone.cpp +++ b/scripts/eastern_kingdoms/blackrock_spire/boss_warmaster_voone.cpp @@ -16,104 +16,13 @@ /* ScriptData SDName: Boss_Warmaster_Voone -SD%Complete: 100 -SDComment: +SD%Complete: 0 +SDComment: Placeholder SDCategory: Blackrock Spire EndScriptData */ #include "precompiled.h" -#define SPELL_SNAPKICK 15618 -#define SPELL_CLEAVE 15284 -#define SPELL_UPPERCUT 10966 -#define SPELL_MORTALSTRIKE 15708 -#define SPELL_PUMMEL 15615 -#define SPELL_THROWAXE 16075 - -struct MANGOS_DLL_DECL boss_warmastervooneAI : public ScriptedAI -{ - boss_warmastervooneAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} - - uint32 Snapkick_Timer; - uint32 Cleave_Timer; - uint32 Uppercut_Timer; - uint32 MortalStrike_Timer; - uint32 Pummel_Timer; - uint32 ThrowAxe_Timer; - - void Reset() - { - Snapkick_Timer = 8000; - Cleave_Timer = 14000; - Uppercut_Timer = 20000; - MortalStrike_Timer = 12000; - Pummel_Timer = 32000; - ThrowAxe_Timer = 1000; - } - - void UpdateAI(const uint32 diff) - { - //Return since we have no target - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - //Snapkick_Timer - if (Snapkick_Timer < diff) - { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_SNAPKICK); - Snapkick_Timer = 6000; - }else Snapkick_Timer -= diff; - - //Cleave_Timer - if (Cleave_Timer < diff) - { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_CLEAVE); - Cleave_Timer = 12000; - }else Cleave_Timer -= diff; - - //Uppercut_Timer - if (Uppercut_Timer < diff) - { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_UPPERCUT); - Uppercut_Timer = 14000; - }else Uppercut_Timer -= diff; - - //MortalStrike_Timer - if (MortalStrike_Timer < diff) - { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_MORTALSTRIKE); - MortalStrike_Timer = 10000; - }else MortalStrike_Timer -= diff; - - //Pummel_Timer - if (Pummel_Timer < diff) - { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_PUMMEL); - Pummel_Timer = 16000; - }else Pummel_Timer -= diff; - - //ThrowAxe_Timer - if (ThrowAxe_Timer < diff) - { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_THROWAXE); - ThrowAxe_Timer = 8000; - }else ThrowAxe_Timer -= diff; - - DoMeleeAttackIfReady(); - } -}; - -CreatureAI* GetAI_boss_warmastervoone(Creature* pCreature) -{ - return new boss_warmastervooneAI(pCreature); -} - void AddSC_boss_warmastervoone() { - Script* pNewScript; - - pNewScript = new Script; - pNewScript->Name = "boss_warmaster_voone"; - pNewScript->GetAI = &GetAI_boss_warmastervoone; - pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/boss_kruul.cpp b/scripts/eastern_kingdoms/boss_kruul.cpp index 34b385446..90a5ec585 100644 --- a/scripts/eastern_kingdoms/boss_kruul.cpp +++ b/scripts/eastern_kingdoms/boss_kruul.cpp @@ -16,164 +16,13 @@ /* ScriptData SDName: Boss_Kruul -SD%Complete: 100 -SDComment: Highlord Kruul are presumably no longer in-game on regular bases, however future events could bring him back. +SD%Complete: 0 +SDComment: Placeholder SDCategory: Bosses EndScriptData */ #include "precompiled.h" -#define SPELL_SHADOWVOLLEY 21341 -#define SPELL_CLEAVE 20677 -#define SPELL_THUNDERCLAP 23931 -#define SPELL_TWISTEDREFLECTION 21063 -#define SPELL_VOIDBOLT 21066 -#define SPELL_RAGE 21340 -#define SPELL_CAPTURESOUL 21054 - -struct MANGOS_DLL_DECL boss_kruulAI : public ScriptedAI -{ - boss_kruulAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} - - uint32 ShadowVolley_Timer; - uint32 Cleave_Timer; - uint32 ThunderClap_Timer; - uint32 TwistedReflection_Timer; - uint32 VoidBolt_Timer; - uint32 Rage_Timer; - uint32 Hound_Timer; - int Rand; - int RandX; - int RandY; - Creature* Summoned; - - void Reset() - { - ShadowVolley_Timer = 10000; - Cleave_Timer = 14000; - ThunderClap_Timer = 20000; - TwistedReflection_Timer = 25000; - VoidBolt_Timer = 30000; - Rage_Timer = 60000; //Cast rage after 1 minute - Hound_Timer = 8000; - } - - void KilledUnit(Unit* pVictim) - { - // When a player, pet or totem gets killed, Lord Kazzak casts this spell to instantly regenerate 70,000 health. - DoCastSpellIfCan(m_creature,SPELL_CAPTURESOUL); - - } - - void SummonHounds(Unit* victim) - { - Rand = rand()%10; - switch(urand(0, 1)) - { - case 0: RandX = 0 - Rand; break; - case 1: RandX = 0 + Rand; break; - } - Rand = 0; - Rand = rand()%10; - switch(urand(0, 1)) - { - case 0: RandY = 0 - Rand; break; - case 1: RandY = 0 + Rand; break; - } - Rand = 0; - Summoned = DoSpawnCreature(19207, RandX, RandY, 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 300000); - if (Summoned) - Summoned->AI()->AttackStart(victim); - } - - void UpdateAI(const uint32 diff) - { - //Return since we have no target - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - //ShadowVolley_Timer - if (ShadowVolley_Timer < diff) - { - if (rand()%100 < 46) - { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_SHADOWVOLLEY); - } - - ShadowVolley_Timer = 5000; - }else ShadowVolley_Timer -= diff; - - //Cleave_Timer - if (Cleave_Timer < diff) - { - if (rand()%100 < 50) - { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_CLEAVE); - } - - Cleave_Timer = 10000; - }else Cleave_Timer -= diff; - - //ThunderClap_Timer - if (ThunderClap_Timer < diff) - { - if (rand()%100 < 20) - { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_THUNDERCLAP); - } - - ThunderClap_Timer = 12000; - }else ThunderClap_Timer -= diff; - - //TwistedReflection_Timer - if (TwistedReflection_Timer < diff) - { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_TWISTEDREFLECTION); - TwistedReflection_Timer = 30000; - }else TwistedReflection_Timer -= diff; - - //VoidBolt_Timer - if (VoidBolt_Timer < diff) - { - if (rand()%100 < 40) - { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_VOIDBOLT); - } - - VoidBolt_Timer = 18000; - }else VoidBolt_Timer -= diff; - - //Rage_Timer - if (Rage_Timer < diff) - { - DoCastSpellIfCan(m_creature,SPELL_RAGE); - Rage_Timer = 70000; - }else Rage_Timer -= diff; - - //Hound_Timer - if (Hound_Timer < diff) - { - SummonHounds(m_creature->getVictim()); - SummonHounds(m_creature->getVictim()); - SummonHounds(m_creature->getVictim()); - - Hound_Timer = 45000; - }else Hound_Timer -= diff; - - DoMeleeAttackIfReady(); - } -}; -CreatureAI* GetAI_boss_kruul(Creature* pCreature) -{ - return new boss_kruulAI(pCreature); -} - void AddSC_boss_kruul() { - Script* pNewScript; - - pNewScript = new Script; - pNewScript->Name = "boss_kruul"; - pNewScript->GetAI = &GetAI_boss_kruul; - pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/eastern_plaguelands.cpp b/scripts/eastern_kingdoms/eastern_plaguelands.cpp index 45f8cd3f4..d24c34672 100644 --- a/scripts/eastern_kingdoms/eastern_plaguelands.cpp +++ b/scripts/eastern_kingdoms/eastern_plaguelands.cpp @@ -22,58 +22,16 @@ SDCategory: Eastern Plaguelands EndScriptData */ /* ContentData -mobs_ghoul_flayer npc_darrowshire_spirit npc_eris_havenfire EndContentData */ #include "precompiled.h" -//id8530 - cannibal ghoul -//id8531 - gibbering ghoul -//id8532 - diseased flayer - -struct MANGOS_DLL_DECL mobs_ghoul_flayerAI : public ScriptedAI -{ - mobs_ghoul_flayerAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} - - void Reset() { } - - void JustDied(Unit* Killer) - { - if (Killer->GetTypeId() == TYPEID_PLAYER) - m_creature->SummonCreature(11064, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN, 60000); - } - -}; - -CreatureAI* GetAI_mobs_ghoul_flayer(Creature* pCreature) -{ - return new mobs_ghoul_flayerAI(pCreature); -} - /*###### ## npc_darrowshire_spirit ######*/ -#define SPELL_SPIRIT_SPAWNIN 17321 - -struct MANGOS_DLL_DECL npc_darrowshire_spiritAI : public ScriptedAI -{ - npc_darrowshire_spiritAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} - - void Reset() - { - DoCastSpellIfCan(m_creature,SPELL_SPIRIT_SPAWNIN); - m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - } -}; - -CreatureAI* GetAI_npc_darrowshire_spirit(Creature* pCreature) -{ - return new npc_darrowshire_spiritAI(pCreature); -} - bool GossipHello_npc_darrowshire_spirit(Player* pPlayer, Creature* pCreature) { pPlayer->SEND_GOSSIP_MENU(3873, pCreature->GetObjectGuid()); @@ -368,14 +326,8 @@ void AddSC_eastern_plaguelands() { Script* pNewScript; - pNewScript = new Script; - pNewScript->Name = "mobs_ghoul_flayer"; - pNewScript->GetAI = &GetAI_mobs_ghoul_flayer; - pNewScript->RegisterSelf(); - pNewScript = new Script; pNewScript->Name = "npc_darrowshire_spirit"; - pNewScript->GetAI = &GetAI_npc_darrowshire_spirit; pNewScript->pGossipHello = &GossipHello_npc_darrowshire_spirit; pNewScript->RegisterSelf(); diff --git a/scripts/eastern_kingdoms/karazhan/boss_moroes.cpp b/scripts/eastern_kingdoms/karazhan/boss_moroes.cpp index c49b4b87e..62ee88f36 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_moroes.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_moroes.cpp @@ -17,7 +17,7 @@ /* ScriptData SDName: Boss_Moroes SD%Complete: 95 -SDComment: ToDo: Guests script can be moved to eventAI. +SDComment: Timers. SDCategory: Karazhan EndScriptData */ @@ -268,419 +268,11 @@ struct MANGOS_DLL_DECL boss_moroesAI : public ScriptedAI } }; -enum -{ - SPELL_MANABURN = 29405, - SPELL_MINDFLY = 29570, - SPELL_SWPAIN = 34441, - SPELL_SHADOWFORM = 29406 -}; - -struct MANGOS_DLL_DECL boss_baroness_dorothea_millstipeAI : public ScriptedAI -{ - //Shadow Priest - boss_baroness_dorothea_millstipeAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } - - uint32 m_uiManaBurn_Timer; - uint32 m_uiMindFlay_Timer; - uint32 m_uiShadowWordPain_Timer; - - void Reset() - { - m_uiManaBurn_Timer = 7000; - m_uiMindFlay_Timer = 1000; - m_uiShadowWordPain_Timer = 6000; - - DoCastSpellIfCan(m_creature, SPELL_SHADOWFORM, CAST_TRIGGERED); - } - - void UpdateAI(const uint32 uiDiff) - { - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - if (m_uiMindFlay_Timer < uiDiff) - { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_MINDFLY); - m_uiMindFlay_Timer = 12000; //3sec channeled - } - else - m_uiMindFlay_Timer -= uiDiff; - - if (m_uiManaBurn_Timer < uiDiff) - { - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0, SPELL_MANABURN, SELECT_FLAG_POWER_MANA)) - DoCastSpellIfCan(pTarget, SPELL_MANABURN); - - m_uiManaBurn_Timer = 5000; //3 sec cast - } - else - m_uiManaBurn_Timer -= uiDiff; - - if (m_uiShadowWordPain_Timer < uiDiff) - { - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) - { - DoCastSpellIfCan(pTarget, SPELL_SWPAIN); - m_uiShadowWordPain_Timer = 7000; - } - } - else - m_uiShadowWordPain_Timer -= uiDiff; - } -}; - -enum -{ - SPELL_HAMMEROFJUSTICE = 13005, - SPELL_JUDGEMENTOFCOMMAND = 29386, - SPELL_SEALOFCOMMAND = 29385 -}; - -struct MANGOS_DLL_DECL boss_baron_rafe_dreugerAI : public ScriptedAI -{ - //Retr Pally - boss_baron_rafe_dreugerAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } - - uint32 m_uiHammerOfJustice_Timer; - uint32 m_uiSealOfCommand_Timer; - uint32 m_uiJudgementOfCommand_Timer; - - void Reset() - { - m_uiHammerOfJustice_Timer = 1000; - m_uiSealOfCommand_Timer = 7000; - m_uiJudgementOfCommand_Timer = m_uiSealOfCommand_Timer + 29000; - } - - void UpdateAI(const uint32 uiDiff) - { - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - if (m_uiSealOfCommand_Timer < uiDiff) - { - DoCastSpellIfCan(m_creature, SPELL_SEALOFCOMMAND); - m_uiSealOfCommand_Timer = 32000; - m_uiJudgementOfCommand_Timer = 29000; - } - else - m_uiSealOfCommand_Timer -= uiDiff; - - if (m_uiJudgementOfCommand_Timer < uiDiff) - { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_JUDGEMENTOFCOMMAND); - m_uiJudgementOfCommand_Timer = m_uiSealOfCommand_Timer + 29000; - } - else - m_uiJudgementOfCommand_Timer -= uiDiff; - - if (m_uiHammerOfJustice_Timer < uiDiff) - { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_HAMMEROFJUSTICE); - m_uiHammerOfJustice_Timer = 12000; - } - else - m_uiHammerOfJustice_Timer -= uiDiff; - } -}; - -enum -{ - SPELL_DISPELMAGIC = 15090, // Self or other guest+Moroes - SPELL_GREATERHEAL = 29564, // Self or other guest+Moroes - SPELL_HOLYFIRE = 29563, - SPELL_PWSHIELD = 29408 -}; - -struct MANGOS_DLL_DECL boss_lady_catriona_von_indiAI : public ScriptedAI -{ - //Holy Priest - boss_lady_catriona_von_indiAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } - - uint32 m_uiDispelMagic_Timer; - uint32 m_uiGreaterHeal_Timer; - uint32 m_uiHolyFire_Timer; - uint32 m_uiPowerWordShield_Timer; - - void Reset() - { - m_uiDispelMagic_Timer = 11000; - m_uiGreaterHeal_Timer = 1500; - m_uiHolyFire_Timer = 5000; - m_uiPowerWordShield_Timer = 1000; - } - - void UpdateAI(const uint32 uiDiff) - { - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - if (m_uiPowerWordShield_Timer < uiDiff) - { - DoCastSpellIfCan(m_creature, SPELL_PWSHIELD); - m_uiPowerWordShield_Timer = 15000; - } - else - m_uiPowerWordShield_Timer -= uiDiff; - - if (m_uiGreaterHeal_Timer < uiDiff) - { - if (Unit* pTarget = DoSelectLowestHpFriendly(50.0f)) - { - DoCastSpellIfCan(pTarget, SPELL_GREATERHEAL); - m_uiGreaterHeal_Timer = 17000; - } - } - else - m_uiGreaterHeal_Timer -= uiDiff; - - if (m_uiHolyFire_Timer < uiDiff) - { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_HOLYFIRE); - m_uiHolyFire_Timer = 22000; - } - else - m_uiHolyFire_Timer -= uiDiff; - - if (m_uiDispelMagic_Timer < uiDiff) - { - if (Unit* pTarget = urand(0, 1) ? DoSelectLowestHpFriendly(50.0f) : m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) - DoCastSpellIfCan(pTarget, SPELL_DISPELMAGIC); - - m_uiDispelMagic_Timer = 25000; - } - else - m_uiDispelMagic_Timer -= uiDiff; - } -}; - -enum -{ - SPELL_CLEANSE = 29380, //Self or other guest+Moroes - SPELL_GREATERBLESSOFMIGHT = 29381, //Self or other guest+Moroes - SPELL_HOLYLIGHT = 29562, //Self or other guest+Moroes - SPELL_DIVINESHIELD = 41367 -}; - -struct MANGOS_DLL_DECL boss_lady_keira_berrybuckAI : public ScriptedAI -{ - //Holy Pally - boss_lady_keira_berrybuckAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } - - uint32 m_uiCleanse_Timer; - uint32 m_uiGreaterBless_Timer; - uint32 m_uiHolyLight_Timer; - uint32 m_uiDivineShield_Timer; - - void Reset() - { - m_uiCleanse_Timer = 13000; - m_uiGreaterBless_Timer = 1000; - m_uiHolyLight_Timer = 7000; - m_uiDivineShield_Timer = 31000; - } - - void UpdateAI(const uint32 uiDiff) - { - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - if (m_uiDivineShield_Timer < uiDiff) - { - DoCastSpellIfCan(m_creature, SPELL_DIVINESHIELD); - m_uiDivineShield_Timer = 31000; - } - else - m_uiDivineShield_Timer -= uiDiff; - - if (m_uiHolyLight_Timer < uiDiff) - { - if (Unit* pTarget = DoSelectLowestHpFriendly(50.0f)) - { - DoCastSpellIfCan(pTarget, SPELL_HOLYLIGHT); - m_uiHolyLight_Timer = 10000; - } - } - else - m_uiHolyLight_Timer -= uiDiff; - - if (m_uiGreaterBless_Timer < uiDiff) - { - if (Unit* pTarget = DoSelectLowestHpFriendly(50.0f)) - { - DoCastSpellIfCan(pTarget, SPELL_GREATERBLESSOFMIGHT); - m_uiGreaterBless_Timer = 50000; - } - } - else - m_uiGreaterBless_Timer -= uiDiff; - - if (m_uiCleanse_Timer < uiDiff) - { - if (Unit* pTarget = DoSelectLowestHpFriendly(50.0f)) - { - DoCastSpellIfCan(pTarget, SPELL_CLEANSE); - m_uiCleanse_Timer = 10000; - } - } - else - m_uiCleanse_Timer -= uiDiff; - } -}; - -enum -{ - SPELL_HAMSTRING = 9080, - SPELL_MORTALSTRIKE = 29572, - SPELL_WHIRLWIND = 29573 -}; - -struct MANGOS_DLL_DECL boss_lord_robin_darisAI : public ScriptedAI -{ - //Arms Warr - boss_lord_robin_darisAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } - - uint32 m_uiHamstring_Timer; - uint32 m_uiMortalStrike_Timer; - uint32 m_uiWhirlWind_Timer; - - void Reset() - { - m_uiHamstring_Timer = 7000; - m_uiMortalStrike_Timer = 10000; - m_uiWhirlWind_Timer = 21000; - } - - void UpdateAI(const uint32 uiDiff) - { - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - if (m_uiHamstring_Timer < uiDiff) - { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_HAMSTRING); - m_uiHamstring_Timer = 12000; - } - else - m_uiHamstring_Timer -= uiDiff; - - if (m_uiMortalStrike_Timer < uiDiff) - { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_MORTALSTRIKE); - m_uiMortalStrike_Timer = 18000; - } - else - m_uiMortalStrike_Timer -= uiDiff; - - if (m_uiWhirlWind_Timer < uiDiff) - { - DoCastSpellIfCan(m_creature, SPELL_WHIRLWIND); - m_uiWhirlWind_Timer = 21000; - } - else - m_uiWhirlWind_Timer -= uiDiff; - } -}; - -enum -{ - SPELL_DISARM = 8379, - SPELL_HEROICSTRIKE = 29567, - SPELL_SHIELDBASH = 11972, - SPELL_SHIELDWALL = 29390 -}; - -struct MANGOS_DLL_DECL boss_lord_crispin_ferenceAI : public ScriptedAI -{ - //Arms Warr - boss_lord_crispin_ferenceAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } - - uint32 m_uiDisarm_Timer; - uint32 m_uiHeroicStrike_Timer; - uint32 m_uiShieldBash_Timer; - uint32 m_uiShieldWall_Timer; - - void Reset() - { - m_uiDisarm_Timer = 6000; - m_uiHeroicStrike_Timer = 10000; - m_uiShieldBash_Timer = 8000; - m_uiShieldWall_Timer = 4000; - } - - void UpdateAI(const uint32 uiDiff) - { - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - if (m_uiDisarm_Timer < uiDiff) - { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_DISARM); - m_uiDisarm_Timer = 12000; - } - else - m_uiDisarm_Timer -= uiDiff; - - if (m_uiHeroicStrike_Timer < uiDiff) - { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_HEROICSTRIKE); - m_uiHeroicStrike_Timer = 10000; - }else m_uiHeroicStrike_Timer -= uiDiff; - - if (m_uiShieldBash_Timer < uiDiff) - { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_SHIELDBASH); - m_uiShieldBash_Timer = 13000; - } - else - m_uiShieldBash_Timer -= uiDiff; - - if (m_uiShieldWall_Timer < uiDiff) - { - DoCastSpellIfCan(m_creature, SPELL_SHIELDWALL); - m_uiShieldWall_Timer = 21000; - } - else - m_uiShieldWall_Timer -= uiDiff; - } -}; - CreatureAI* GetAI_boss_moroes(Creature* pCreature) { return new boss_moroesAI(pCreature); } -CreatureAI* GetAI_baroness_dorothea_millstipe(Creature* pCreature) -{ - return new boss_baroness_dorothea_millstipeAI(pCreature); -} - -CreatureAI* GetAI_baron_rafe_dreuger(Creature* pCreature) -{ - return new boss_baron_rafe_dreugerAI(pCreature); -} - -CreatureAI* GetAI_lady_catriona_von_indi(Creature* pCreature) -{ - return new boss_lady_catriona_von_indiAI(pCreature); -} - -CreatureAI* GetAI_lady_keira_berrybuck(Creature* pCreature) -{ - return new boss_lady_keira_berrybuckAI(pCreature); -} - -CreatureAI* GetAI_lord_robin_daris(Creature* pCreature) -{ - return new boss_lord_robin_darisAI(pCreature); -} - -CreatureAI* GetAI_lord_crispin_ference(Creature* pCreature) -{ - return new boss_lord_crispin_ferenceAI(pCreature); -} - void AddSC_boss_moroes() { Script* pNewScript; @@ -689,34 +281,4 @@ void AddSC_boss_moroes() pNewScript->Name = "boss_moroes"; pNewScript->GetAI = &GetAI_boss_moroes; pNewScript->RegisterSelf(); - - pNewScript = new Script; - pNewScript->Name = "boss_baroness_dorothea_millstipe"; - pNewScript->GetAI = &GetAI_baroness_dorothea_millstipe; - pNewScript->RegisterSelf(); - - pNewScript = new Script; - pNewScript->Name = "boss_baron_rafe_dreuger"; - pNewScript->GetAI = &GetAI_baron_rafe_dreuger; - pNewScript->RegisterSelf(); - - pNewScript = new Script; - pNewScript->Name = "boss_lady_catriona_von_indi"; - pNewScript->GetAI = &GetAI_lady_catriona_von_indi; - pNewScript->RegisterSelf(); - - pNewScript = new Script; - pNewScript->Name = "boss_lady_keira_berrybuck"; - pNewScript->GetAI = &GetAI_lady_keira_berrybuck; - pNewScript->RegisterSelf(); - - pNewScript = new Script; - pNewScript->Name = "boss_lord_robin_daris"; - pNewScript->GetAI = &GetAI_lord_robin_daris; - pNewScript->RegisterSelf(); - - pNewScript = new Script; - pNewScript->Name = "boss_lord_crispin_ference"; - pNewScript->GetAI = &GetAI_lord_crispin_ference; - pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/karazhan/boss_shade_of_aran.cpp b/scripts/eastern_kingdoms/karazhan/boss_shade_of_aran.cpp index fdd5e01e6..86bab0106 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_shade_of_aran.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_shade_of_aran.cpp @@ -508,42 +508,11 @@ struct MANGOS_DLL_DECL boss_aranAI : public ScriptedAI } }; -struct MANGOS_DLL_DECL water_elementalAI : public ScriptedAI -{ - water_elementalAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} - - uint32 m_uiCast_Timer; - - void Reset() - { - m_uiCast_Timer = urand(2000, 5000); - } - - void UpdateAI(const uint32 uiDiff) - { - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - if (m_uiCast_Timer < uiDiff) - { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_WATERBOLT); - m_uiCast_Timer = urand(2000, 5000); - } - else - m_uiCast_Timer -= uiDiff; - } -}; - CreatureAI* GetAI_boss_aran(Creature* pCreature) { return new boss_aranAI(pCreature); } -CreatureAI* GetAI_water_elemental(Creature* pCreature) -{ - return new water_elementalAI(pCreature); -} - void AddSC_boss_shade_of_aran() { Script* pNewScript; @@ -552,9 +521,4 @@ void AddSC_boss_shade_of_aran() pNewScript->Name = "boss_shade_of_aran"; pNewScript->GetAI = &GetAI_boss_aran; pNewScript->RegisterSelf(); - - pNewScript = new Script; - pNewScript->Name = "mob_aran_elemental"; - pNewScript->GetAI = &GetAI_water_elemental; - pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/scarlet_monastery/boss_azshir_the_sleepless.cpp b/scripts/eastern_kingdoms/scarlet_monastery/boss_azshir_the_sleepless.cpp index 22b51f82e..97f7a278d 100644 --- a/scripts/eastern_kingdoms/scarlet_monastery/boss_azshir_the_sleepless.cpp +++ b/scripts/eastern_kingdoms/scarlet_monastery/boss_azshir_the_sleepless.cpp @@ -16,79 +16,13 @@ /* ScriptData SDName: Boss_Azshir_the_Sleepless -SD%Complete: 80 -SDComment: +SD%Complete: 0 +SDComment: Placeholder SDCategory: Scarlet Monastery EndScriptData */ #include "precompiled.h" -#define SPELL_CALLOFTHEGRAVE 17831 -#define SPELL_TERRIFY 7399 -#define SPELL_SOULSIPHON 7290 - -struct MANGOS_DLL_DECL boss_azshir_the_sleeplessAI : public ScriptedAI -{ - boss_azshir_the_sleeplessAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} - - uint32 SoulSiphon_Timer; - uint32 CallOftheGrave_Timer; - uint32 Terrify_Timer; - - void Reset() - { - SoulSiphon_Timer = 1; - CallOftheGrave_Timer = 30000; - Terrify_Timer = 20000; - } - - void UpdateAI(const uint32 diff) - { - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - //If we are <50% hp cast Soul Siphon rank 1 - if (m_creature->GetHealthPercent() <= 50.0f && !m_creature->IsNonMeleeSpellCasted(false)) - { - //SoulSiphon_Timer - if (SoulSiphon_Timer < diff) - { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_SOULSIPHON); - // return; // Why was this return here? - - SoulSiphon_Timer = 20000; - }else SoulSiphon_Timer -= diff; - } - - //CallOfTheGrave_Timer - if (CallOftheGrave_Timer < diff) - { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_CALLOFTHEGRAVE); - CallOftheGrave_Timer = 30000; - }else CallOftheGrave_Timer -= diff; - - //Terrify_Timer - if (Terrify_Timer < diff) - { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_TERRIFY); - Terrify_Timer = 20000; - }else Terrify_Timer -= diff; - - DoMeleeAttackIfReady(); - } -}; - -CreatureAI* GetAI_boss_azshir_the_sleepless(Creature* pCreature) -{ - return new boss_azshir_the_sleeplessAI(pCreature); -} - void AddSC_boss_azshir_the_sleepless() { - Script* pNewScript; - - pNewScript = new Script; - pNewScript->Name = "boss_azshir_the_sleepless"; - pNewScript->GetAI = &GetAI_boss_azshir_the_sleepless; - pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/scarlet_monastery/boss_bloodmage_thalnos.cpp b/scripts/eastern_kingdoms/scarlet_monastery/boss_bloodmage_thalnos.cpp index ca9758243..c1ad6c97d 100644 --- a/scripts/eastern_kingdoms/scarlet_monastery/boss_bloodmage_thalnos.cpp +++ b/scripts/eastern_kingdoms/scarlet_monastery/boss_bloodmage_thalnos.cpp @@ -16,109 +16,13 @@ /* ScriptData SDName: Boss_Bloodmage_Thalnos -SD%Complete: 100 -SDComment: +SD%Complete: 0 +SDComment: Placeholder SDCategory: Scarlet Monastery EndScriptData */ #include "precompiled.h" -enum -{ - SAY_AGGRO = -1189016, - SAY_HEALTH = -1189017, - SAY_KILL = -1189018, - - SPELL_FLAMESHOCK = 8053, - SPELL_SHADOWBOLT = 1106, - SPELL_FLAMESPIKE = 8814, - SPELL_FIRENOVA = 16079, -}; - -struct MANGOS_DLL_DECL boss_bloodmage_thalnosAI : public ScriptedAI -{ - boss_bloodmage_thalnosAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} - - bool HpYell; - uint32 FlameShock_Timer; - uint32 ShadowBolt_Timer; - uint32 FlameSpike_Timer; - uint32 FireNova_Timer; - - void Reset() - { - HpYell = false; - FlameShock_Timer = 10000; - ShadowBolt_Timer = 2000; - FlameSpike_Timer = 8000; - FireNova_Timer = 40000; - } - - void Aggro(Unit *who) - { - DoScriptText(SAY_AGGRO, m_creature); - } - - void KilledUnit(Unit* Victim) - { - DoScriptText(SAY_KILL, m_creature); - } - - void UpdateAI(const uint32 diff) - { - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - //If we are <35% hp - if (!HpYell && m_creature->GetHealthPercent() <= 35.0f) - { - DoScriptText(SAY_HEALTH, m_creature); - HpYell = true; - } - - //FlameShock_Timer - if (FlameShock_Timer < diff) - { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_FLAMESHOCK); - FlameShock_Timer = urand(10000, 15000); - }else FlameShock_Timer -= diff; - - //FlameSpike_Timer - if (FlameSpike_Timer < diff) - { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_FLAMESPIKE); - FlameSpike_Timer = 30000; - }else FlameSpike_Timer -= diff; - - //FireNova_Timer - if (FireNova_Timer < diff) - { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_FIRENOVA); - FireNova_Timer = 40000; - }else FireNova_Timer -= diff; - - //ShadowBolt_Timer - if (ShadowBolt_Timer < diff) - { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_SHADOWBOLT); - ShadowBolt_Timer = 2000; - }else ShadowBolt_Timer -= diff; - - DoMeleeAttackIfReady(); - } -}; - -CreatureAI* GetAI_boss_bloodmage_thalnos(Creature* pCreature) -{ - return new boss_bloodmage_thalnosAI(pCreature); -} - void AddSC_boss_bloodmage_thalnos() { - Script* pNewScript; - - pNewScript = new Script; - pNewScript->Name = "boss_bloodmage_thalnos"; - pNewScript->GetAI = &GetAI_boss_bloodmage_thalnos; - pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/scarlet_monastery/boss_high_inquisitor_fairbanks.cpp b/scripts/eastern_kingdoms/scarlet_monastery/boss_high_inquisitor_fairbanks.cpp index f3573b1f2..1934830a0 100644 --- a/scripts/eastern_kingdoms/scarlet_monastery/boss_high_inquisitor_fairbanks.cpp +++ b/scripts/eastern_kingdoms/scarlet_monastery/boss_high_inquisitor_fairbanks.cpp @@ -16,114 +16,13 @@ /* ScriptData SDName: Boss_High_Inquisitor_Fairbanks -SD%Complete: 100 -SDComment: TODO: if this guy not involved in some special event, remove (and let ACID script) +SD%Complete: 0 +SDComment: Placeholder SDCategory: Scarlet Monastery EndScriptData */ #include "precompiled.h" -enum -{ - SPELL_CURSEOFBLOOD = 8282, - SPELL_DISPELMAGIC = 15090, - SPELL_FEAR = 12096, - SPELL_HEAL = 12039, - SPELL_POWERWORDSHIELD = 11647, - SPELL_SLEEP = 8399 -}; - -struct MANGOS_DLL_DECL boss_high_inquisitor_fairbanksAI : public ScriptedAI -{ - boss_high_inquisitor_fairbanksAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} - - uint32 CurseOfBlood_Timer; - uint32 DispelMagic_Timer; - uint32 Fear_Timer; - uint32 Heal_Timer; - uint32 Sleep_Timer; - uint32 Dispel_Timer; - bool PowerWordShield; - - void Reset() - { - CurseOfBlood_Timer = 10000; - DispelMagic_Timer = 30000; - Fear_Timer = 40000; - Heal_Timer = 30000; - Sleep_Timer = 30000; - Dispel_Timer = 20000; - PowerWordShield = false; - } - - void UpdateAI(const uint32 diff) - { - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - //If we are <25% hp cast Heal - if (m_creature->GetHealthPercent() <= 25.0f && !m_creature->IsNonMeleeSpellCasted(false) && Heal_Timer < diff) - { - DoCastSpellIfCan(m_creature,SPELL_HEAL); - Heal_Timer = 30000; - }else Heal_Timer -= diff; - - //Fear_Timer - if (Fear_Timer < diff) - { - if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,1)) - DoCastSpellIfCan(target,SPELL_FEAR); - - Fear_Timer = 40000; - }else Fear_Timer -= diff; - - //Sleep_Timer - if (Sleep_Timer < diff) - { - if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_TOPAGGRO,0)) - DoCastSpellIfCan(target,SPELL_SLEEP); - - Sleep_Timer = 30000; - }else Sleep_Timer -= diff; - - //PowerWordShield_Timer - if (!PowerWordShield && m_creature->GetHealthPercent() <= 25.0f) - { - DoCastSpellIfCan(m_creature,SPELL_POWERWORDSHIELD); - PowerWordShield = true; - } - - //Dispel_Timer - if (Dispel_Timer < diff) - { - if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) - DoCastSpellIfCan(target, SPELL_DISPELMAGIC); - - DispelMagic_Timer = 30000; - }else DispelMagic_Timer -= diff; - - //CurseOfBlood_Timer - if (CurseOfBlood_Timer < diff) - { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_CURSEOFBLOOD); - CurseOfBlood_Timer = 25000; - }else CurseOfBlood_Timer -= diff; - - DoMeleeAttackIfReady(); - } -}; - -CreatureAI* GetAI_boss_high_inquisitor_fairbanks(Creature* pCreature) -{ - return new boss_high_inquisitor_fairbanksAI(pCreature); -} - void AddSC_boss_high_inquisitor_fairbanks() { - Script* pNewScript; - - pNewScript = new Script; - pNewScript->Name = "boss_high_inquisitor_fairbanks"; - pNewScript->GetAI = &GetAI_boss_high_inquisitor_fairbanks; - pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/scarlet_monastery/boss_houndmaster_loksey.cpp b/scripts/eastern_kingdoms/scarlet_monastery/boss_houndmaster_loksey.cpp index 7f6a02beb..0cfcde61f 100644 --- a/scripts/eastern_kingdoms/scarlet_monastery/boss_houndmaster_loksey.cpp +++ b/scripts/eastern_kingdoms/scarlet_monastery/boss_houndmaster_loksey.cpp @@ -16,63 +16,13 @@ /* ScriptData SDName: Boss_Houndmaster_Loksey -SD%Complete: 100 -SDComment: TODO: if this guy not involved in some special event, remove (and let ACID script) +SD%Complete: 0 +SDComment: Placeholder SDCategory: Scarlet Monastery EndScriptData */ #include "precompiled.h" -enum -{ - SAY_AGGRO = -1189021, - SPELL_SUMMONSCARLETHOUND = 17164, - SPELL_BLOODLUST = 6742 -}; - -struct MANGOS_DLL_DECL boss_houndmaster_lokseyAI : public ScriptedAI -{ - boss_houndmaster_lokseyAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} - - uint32 BloodLust_Timer; - - void Reset() - { - BloodLust_Timer = 20000; - } - - void Aggro(Unit *who) - { - DoScriptText(SAY_AGGRO, m_creature); - DoCastSpellIfCan(m_creature,SPELL_SUMMONSCARLETHOUND); - } - - void UpdateAI(const uint32 diff) - { - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - if (BloodLust_Timer < diff) - { - DoCastSpellIfCan(m_creature,SPELL_BLOODLUST); - BloodLust_Timer = 20000; - }else BloodLust_Timer -= diff; - - DoMeleeAttackIfReady(); - } -}; - -CreatureAI* GetAI_boss_houndmaster_loksey(Creature* pCreature) -{ - return new boss_houndmaster_lokseyAI(pCreature); -} - void AddSC_boss_houndmaster_loksey() { - Script* pNewScript; - - pNewScript = new Script; - pNewScript->Name = "boss_houndmaster_loksey"; - pNewScript->GetAI = &GetAI_boss_houndmaster_loksey; - pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/scarlet_monastery/boss_interrogator_vishas.cpp b/scripts/eastern_kingdoms/scarlet_monastery/boss_interrogator_vishas.cpp index 68eae58cf..51e13f096 100644 --- a/scripts/eastern_kingdoms/scarlet_monastery/boss_interrogator_vishas.cpp +++ b/scripts/eastern_kingdoms/scarlet_monastery/boss_interrogator_vishas.cpp @@ -16,89 +16,13 @@ /* ScriptData SDName: Boss_Interrogator_Vishas -SD%Complete: 100 -SDComment: +SD%Complete: 0 +SDComment: Placeholder SDCategory: Scarlet Monastery EndScriptData */ #include "precompiled.h" -#include "scarlet_monastery.h" - -enum -{ - SAY_AGGRO = -1189011, - SAY_HEALTH1 = -1189012, - SAY_HEALTH2 = -1189013, - SAY_KILL = -1189014, - - SPELL_SHADOWWORDPAIN = 2767, -}; - -struct MANGOS_DLL_DECL boss_interrogator_vishasAI : public ScriptedAI -{ - boss_interrogator_vishasAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } - - bool Yell30; - bool Yell60; - uint32 ShadowWordPain_Timer; - - void Reset() - { - Yell30 = false; - Yell60 = false; - ShadowWordPain_Timer = 5000; - } - - void Aggro(Unit *who) - { - DoScriptText(SAY_AGGRO, m_creature); - } - - void KilledUnit(Unit* Victim) - { - DoScriptText(SAY_KILL, m_creature); - } - - void UpdateAI(const uint32 diff) - { - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - //If we are low on hp Do sayings - if (!Yell60 && m_creature->GetHealthPercent() <= 60.0f) - { - DoScriptText(SAY_HEALTH1, m_creature); - Yell60 = true; - } - - if (!Yell30 && m_creature->GetHealthPercent() <= 30.0f) - { - DoScriptText(SAY_HEALTH2, m_creature); - Yell30 = true; - } - - //ShadowWordPain_Timer - if (ShadowWordPain_Timer < diff) - { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_SHADOWWORDPAIN); - ShadowWordPain_Timer = urand(5000, 15000); - }else ShadowWordPain_Timer -= diff; - - DoMeleeAttackIfReady(); - } -}; - -CreatureAI* GetAI_boss_interrogator_vishas(Creature* pCreature) -{ - return new boss_interrogator_vishasAI(pCreature); -} void AddSC_boss_interrogator_vishas() { - Script* pNewScript; - - pNewScript = new Script; - pNewScript->Name = "boss_interrogator_vishas"; - pNewScript->GetAI = &GetAI_boss_interrogator_vishas; - pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/scarlet_monastery/boss_scorn.cpp b/scripts/eastern_kingdoms/scarlet_monastery/boss_scorn.cpp index 4afda0bf0..99c6b80e5 100644 --- a/scripts/eastern_kingdoms/scarlet_monastery/boss_scorn.cpp +++ b/scripts/eastern_kingdoms/scarlet_monastery/boss_scorn.cpp @@ -16,82 +16,13 @@ /* ScriptData SDName: Boss_Scorn -SD%Complete: 100 -SDComment: +SD%Complete: 0 +SDComment: Placeholder SDCategory: Scarlet Monastery EndScriptData */ #include "precompiled.h" -#define SPELL_LICHSLAP 28873 -#define SPELL_FROSTBOLTVOLLEY 8398 -#define SPELL_MINDFLAY 17313 -#define SPELL_FROSTNOVA 15531 - -struct MANGOS_DLL_DECL boss_scornAI : public ScriptedAI -{ - boss_scornAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} - - uint32 LichSlap_Timer; - uint32 FrostboltVolley_Timer; - uint32 MindFlay_Timer; - uint32 FrostNova_Timer; - - void Reset() - { - LichSlap_Timer = 45000; - FrostboltVolley_Timer = 30000; - MindFlay_Timer = 30000; - FrostNova_Timer = 30000; - } - - void UpdateAI(const uint32 diff) - { - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - //LichSlap_Timer - if (LichSlap_Timer < diff) - { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_LICHSLAP); - LichSlap_Timer = 45000; - }else LichSlap_Timer -= diff; - - //FrostboltVolley_Timer - if (FrostboltVolley_Timer < diff) - { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_FROSTBOLTVOLLEY); - FrostboltVolley_Timer = 20000; - }else FrostboltVolley_Timer -= diff; - - //MindFlay_Timer - if (MindFlay_Timer < diff) - { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_MINDFLAY); - MindFlay_Timer = 20000; - }else MindFlay_Timer -= diff; - - //FrostNova_Timer - if (FrostNova_Timer < diff) - { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_FROSTNOVA); - FrostNova_Timer = 15000; - }else FrostNova_Timer -= diff; - - DoMeleeAttackIfReady(); - } -}; -CreatureAI* GetAI_boss_scorn(Creature* pCreature) -{ - return new boss_scornAI(pCreature); -} - void AddSC_boss_scorn() { - Script* pNewScript; - - pNewScript = new Script; - pNewScript->Name = "boss_scorn"; - pNewScript->GetAI = &GetAI_boss_scorn; - pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/scholomance/boss_death_knight_darkreaver.cpp b/scripts/eastern_kingdoms/scholomance/boss_death_knight_darkreaver.cpp index 6b70cd4fc..873b02225 100644 --- a/scripts/eastern_kingdoms/scholomance/boss_death_knight_darkreaver.cpp +++ b/scripts/eastern_kingdoms/scholomance/boss_death_knight_darkreaver.cpp @@ -16,41 +16,13 @@ /* ScriptData SDName: Boss_Death_knight_darkreaver -SD%Complete: 100 -SDComment: +SD%Complete: 0 +SDComment: Placeholder SDCategory: Scholomance EndScriptData */ #include "precompiled.h" -struct MANGOS_DLL_DECL boss_death_knight_darkreaverAI : public ScriptedAI -{ - boss_death_knight_darkreaverAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} - - void Reset() - { - } - - void DamageTaken(Unit *done_by, uint32 &damage) - { - if (m_creature->GetHealth() <= damage) - { - m_creature->CastSpell(m_creature,23261,true); //Summon Darkreaver's Fallen Charger - } - } -}; - -CreatureAI* GetAI_boss_death_knight_darkreaver(Creature* pCreature) -{ - return new boss_death_knight_darkreaverAI(pCreature); -} - void AddSC_boss_death_knight_darkreaver() { - Script* pNewScript; - - pNewScript = new Script; - pNewScript->Name = "boss_death_knight_darkreaver"; - pNewScript->GetAI = &GetAI_boss_death_knight_darkreaver; - pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/scholomance/boss_jandice_barov.cpp b/scripts/eastern_kingdoms/scholomance/boss_jandice_barov.cpp index e0d19b395..4fb2e8cf6 100644 --- a/scripts/eastern_kingdoms/scholomance/boss_jandice_barov.cpp +++ b/scripts/eastern_kingdoms/scholomance/boss_jandice_barov.cpp @@ -28,9 +28,6 @@ enum SPELL_CURSE_OF_BLOOD = 16098, SPELL_SUMMON_ILLUSIONS = 17773, SPELL_BANISH = 8994, - - //Spells of Illusion of Jandice Barov - SPELL_CLEAVE = 15584, }; struct MANGOS_DLL_DECL boss_jandicebarovAI : public ScriptedAI @@ -96,46 +93,11 @@ struct MANGOS_DLL_DECL boss_jandicebarovAI : public ScriptedAI } }; -struct MANGOS_DLL_DECL mob_illusionofjandicebarovAI : public ScriptedAI -{ - mob_illusionofjandicebarovAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} - - uint32 m_uiCleaveTimer; - - void Reset() - { - m_uiCleaveTimer = urand(2000, 8000); - } - - void UpdateAI(const uint32 diff) - { - // Return since we have no target - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - // Cleave_Timer - if (m_uiCleaveTimer < diff) - { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_CLEAVE); - m_uiCleaveTimer = urand(5000, 8000); - } - else - m_uiCleaveTimer -= diff; - - DoMeleeAttackIfReady(); - } -}; - CreatureAI* GetAI_boss_jandicebarov(Creature* pCreature) { return new boss_jandicebarovAI(pCreature); } -CreatureAI* GetAI_mob_illusionofjandicebarov(Creature* pCreature) -{ - return new mob_illusionofjandicebarovAI(pCreature); -} - void AddSC_boss_jandicebarov() { Script* pNewScript; @@ -144,9 +106,4 @@ void AddSC_boss_jandicebarov() pNewScript->Name = "boss_jandice_barov"; pNewScript->GetAI = &GetAI_boss_jandicebarov; pNewScript->RegisterSelf(); - - pNewScript = new Script; - pNewScript->Name = "mob_illusionofjandicebarov"; - pNewScript->GetAI = &GetAI_mob_illusionofjandicebarov; - pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/scholomance/boss_kormok.cpp b/scripts/eastern_kingdoms/scholomance/boss_kormok.cpp index 342d5969d..6134b1621 100644 --- a/scripts/eastern_kingdoms/scholomance/boss_kormok.cpp +++ b/scripts/eastern_kingdoms/scholomance/boss_kormok.cpp @@ -16,123 +16,13 @@ /* ScriptData SDName: Boss_Kormok -SD%Complete: 100 -SDComment: +SD%Complete: 0 +SDComment: Placeholder SDCategory: Scholomance EndScriptData */ #include "precompiled.h" -enum -{ - EMOTE_GENERIC_FRENZY = -1000002, - - SPELL_SHADOWBOLT_VOLLEY = 20741, - SPELL_BONE_SHIELD = 27688, - SPELL_BLOODLUST = 27689, - SPELL_SUMMON_BONE_MAGES = 27695, // triggers 27696, 27697, 27698, 27699 - SPELL_SUMMON_BONE_MINIONS = 27687, // triggers 27690, 27691, 27692, 27693 (spells were removed after vanilla) - SPELL_FRENZY = 8269, -}; - -struct MANGOS_DLL_DECL boss_kormokAI : public ScriptedAI -{ - boss_kormokAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} - - uint32 m_uiShadowVolleyTimer; - uint32 m_uiBoneShieldTimer; - uint32 m_uiMinionTimer; - uint32 m_uiBloodlustTimer; - bool m_bHasMages; - bool m_bIsFrenzy; - - void Reset() - { - m_uiShadowVolleyTimer = urand(10000, 12000); - m_uiMinionTimer = 15000; - m_uiBloodlustTimer = urand(20000, 25000); - m_bHasMages = false; - m_bIsFrenzy = false; - - // the boss casts this on spawn because he is summoned - DoCastSpellIfCan(m_creature, SPELL_BONE_SHIELD); - } - - void Aggro(Unit* pWho) - { - DoCastSpellIfCan(m_creature, SPELL_BONE_SHIELD, CAST_AURA_NOT_PRESENT); - } - - void JustSummoned(Creature* pSummoned) - { - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) - pSummoned->AI()->AttackStart(pTarget); - } - - void UpdateAI(const uint32 uiDiff) - { - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - // ShadowVolley_Timer - if (m_uiShadowVolleyTimer < uiDiff) - { - if (DoCastSpellIfCan(m_creature, SPELL_SHADOWBOLT_VOLLEY) == CAST_OK) - m_uiShadowVolleyTimer = 15000; - } - else - m_uiShadowVolleyTimer -= uiDiff; - - // Minion_Timer - if (m_uiMinionTimer < uiDiff) - { - if (DoCastSpellIfCan(m_creature, SPELL_SUMMON_BONE_MINIONS) == CAST_OK) - m_uiMinionTimer = urand(12000, 15000); - } - else - m_uiMinionTimer -= uiDiff; - - // Bloodlust - if (m_uiBloodlustTimer < uiDiff) - { - if (DoCastSpellIfCan(m_creature, SPELL_BLOODLUST) == CAST_OK) - m_uiBloodlustTimer = urand(25000, 30000); - } - else - m_uiBloodlustTimer -= uiDiff; - - // Summon Bone Mages - if (!m_bHasMages && m_creature->GetHealthPercent() < 26.0f) - { - if (DoCastSpellIfCan(m_creature, SPELL_SUMMON_BONE_MAGES) == CAST_OK) - m_bHasMages = true; - } - - // Frenzy - if (!m_bIsFrenzy && m_creature->GetHealthPercent() < 20.0f) - { - if (DoCastSpellIfCan(m_creature, SPELL_FRENZY) == CAST_OK) - { - DoScriptText(EMOTE_GENERIC_FRENZY, m_creature); - m_bIsFrenzy = true; - } - } - - DoMeleeAttackIfReady(); - } -}; - -CreatureAI* GetAI_boss_kormok(Creature* pCreature) -{ - return new boss_kormokAI(pCreature); -} - void AddSC_boss_kormok() { - Script* pNewScript; - - pNewScript = new Script; - pNewScript->Name = "boss_kormok"; - pNewScript->GetAI = &GetAI_boss_kormok; - pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/stratholme/boss_baron_rivendare.cpp b/scripts/eastern_kingdoms/stratholme/boss_baron_rivendare.cpp index 553a93edc..08f09a029 100644 --- a/scripts/eastern_kingdoms/stratholme/boss_baron_rivendare.cpp +++ b/scripts/eastern_kingdoms/stratholme/boss_baron_rivendare.cpp @@ -16,131 +16,13 @@ /* ScriptData SDName: Boss_Baron_Rivendare -SD%Complete: 70 -SDComment: aura applied/defined in database +SD%Complete: 0 +SDComment: Placeholder SDCategory: Stratholme EndScriptData */ #include "precompiled.h" -#include "stratholme.h" - -enum -{ - SPELL_SHADOW_BOLT = 17393, - SPELL_CLEAVE = 15284, - SPELL_MORTAL_STRIKE = 15708, - - SPELL_RAISE_DEAD = 17473, //triggers death pact (17471) - - SPELL_RAISE_DEAD_1 = 17475, - SPELL_RAISE_DEAD_2 = 17476, - SPELL_RAISE_DEAD_3 = 17477, - SPELL_RAISE_DEAD_4 = 17478, - SPELL_RAISE_DEAD_5 = 17479, - SPELL_RAISE_DEAD_6 = 17480 -}; - -struct MANGOS_DLL_DECL boss_baron_rivendareAI : public ScriptedAI -{ - boss_baron_rivendareAI(Creature* pCreature) : ScriptedAI(pCreature) - { - m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - Reset(); - } - - ScriptedInstance* m_pInstance; - - uint32 m_uiShadowBoltTimer; - uint32 m_uiCleaveTimer; - uint32 m_uiMortalStrikeTimer; - uint32 m_uiRaiseDeadTimer; - - void Reset() - { - m_uiShadowBoltTimer = 5000; - m_uiCleaveTimer = 8000; - m_uiMortalStrikeTimer = 12000; - m_uiRaiseDeadTimer = 30000; - } - - void JustSummoned(Creature* pSummoned) - { - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) - pSummoned->AI()->AttackStart(pTarget); - } - - void SpellHit(Unit* pWho, const SpellEntry* pSpell) - { - if (pSpell->Id == SPELL_RAISE_DEAD) - { - DoCastSpellIfCan(m_creature, SPELL_RAISE_DEAD_1, CAST_TRIGGERED); - DoCastSpellIfCan(m_creature, SPELL_RAISE_DEAD_2, CAST_TRIGGERED); - DoCastSpellIfCan(m_creature, SPELL_RAISE_DEAD_3, CAST_TRIGGERED); - DoCastSpellIfCan(m_creature, SPELL_RAISE_DEAD_4, CAST_TRIGGERED); - DoCastSpellIfCan(m_creature, SPELL_RAISE_DEAD_5, CAST_TRIGGERED); - DoCastSpellIfCan(m_creature, SPELL_RAISE_DEAD_6, CAST_TRIGGERED); - } - } - - void UpdateAI(const uint32 uiDiff) - { - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - // ShadowBolt - if (m_uiShadowBoltTimer < uiDiff) - { - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) - { - if (DoCastSpellIfCan(pTarget, SPELL_SHADOW_BOLT) == CAST_OK) - m_uiShadowBoltTimer = 10000; - } - } - else - m_uiShadowBoltTimer -= uiDiff; - - // Cleave - if (m_uiCleaveTimer < uiDiff) - { - if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_CLEAVE) == CAST_OK) - m_uiCleaveTimer = urand(7000, 17000); - } - else - m_uiCleaveTimer -= uiDiff; - - // MortalStrike - if (m_uiMortalStrikeTimer < uiDiff) - { - if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_MORTAL_STRIKE) == CAST_OK) - m_uiMortalStrikeTimer = urand(10000, 25000); - } - else - m_uiMortalStrikeTimer -= uiDiff; - - // RaiseDead - if (m_uiRaiseDeadTimer < uiDiff) - { - if (DoCastSpellIfCan(m_creature, SPELL_RAISE_DEAD) == CAST_OK) - m_uiRaiseDeadTimer = 45000; - } - else - m_uiRaiseDeadTimer -= uiDiff; - - DoMeleeAttackIfReady(); - } -}; - -CreatureAI* GetAI_boss_baron_rivendare(Creature* pCreature) -{ - return new boss_baron_rivendareAI(pCreature); -} void AddSC_boss_baron_rivendare() { - Script* pNewScript; - - pNewScript = new Script; - pNewScript->Name = "boss_baron_rivendare"; - pNewScript->GetAI = &GetAI_boss_baron_rivendare; - pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/stratholme/boss_magistrate_barthilas.cpp b/scripts/eastern_kingdoms/stratholme/boss_magistrate_barthilas.cpp index 81335ccd2..ecb806d3e 100644 --- a/scripts/eastern_kingdoms/stratholme/boss_magistrate_barthilas.cpp +++ b/scripts/eastern_kingdoms/stratholme/boss_magistrate_barthilas.cpp @@ -16,95 +16,13 @@ /* ScriptData SDName: Boss_Magistrate_Barthilas -SD%Complete: 70 -SDComment: +SD%Complete: 0 +SDComment: Placeholder SDCategory: Stratholme EndScriptData */ #include "precompiled.h" -enum -{ - SPELL_DRAINING_BLOW = 16793, - SPELL_CROWD_PUMMEL = 10887, - SPELL_MIGHTY_BLOW = 14099, - SPELL_FURIOUS_ANGER = 16792, - - MODEL_HUMAN = 3637 -}; - -struct MANGOS_DLL_DECL boss_magistrate_barthilasAI : public ScriptedAI -{ - boss_magistrate_barthilasAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } - - uint32 m_uiDrainingBlowTimer; - uint32 m_uiCrowdPummelTimer; - uint32 m_uiMightyBlowTimer; - - void Reset() - { - m_uiDrainingBlowTimer = 20000; - m_uiCrowdPummelTimer = 15000; - m_uiMightyBlowTimer = 10000; - } - - void Aggro(Unit* pWho) - { - DoCastSpellIfCan(m_creature, SPELL_FURIOUS_ANGER); - } - - void JustDied(Unit* pKiller) - { - m_creature->SetDisplayId(MODEL_HUMAN); - } - - void UpdateAI(const uint32 uiDiff) - { - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - // DrainingBlow - if (m_uiDrainingBlowTimer < uiDiff) - { - if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_DRAINING_BLOW) == CAST_OK) - m_uiDrainingBlowTimer = 15000; - } - else - m_uiDrainingBlowTimer -= uiDiff; - - // CrowdPummel - if (m_uiCrowdPummelTimer < uiDiff) - { - if (DoCastSpellIfCan(m_creature, SPELL_CROWD_PUMMEL) == CAST_OK) - m_uiCrowdPummelTimer = 15000; - } - else - m_uiCrowdPummelTimer -= uiDiff; - - // MightyBlow - if (m_uiMightyBlowTimer < uiDiff) - { - if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_MIGHTY_BLOW) == CAST_OK) - m_uiMightyBlowTimer = 20000; - } - else - m_uiMightyBlowTimer -= uiDiff; - - DoMeleeAttackIfReady(); - } -}; - -CreatureAI* GetAI_boss_magistrate_barthilas(Creature* pCreature) -{ - return new boss_magistrate_barthilasAI(pCreature); -} - void AddSC_boss_magistrate_barthilas() { - Script* pNewScript; - - pNewScript = new Script; - pNewScript->Name = "boss_magistrate_barthilas"; - pNewScript->GetAI = &GetAI_boss_magistrate_barthilas; - pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/stratholme/boss_nerubenkan.cpp b/scripts/eastern_kingdoms/stratholme/boss_nerubenkan.cpp index 8687f598c..9a0a3aa47 100644 --- a/scripts/eastern_kingdoms/stratholme/boss_nerubenkan.cpp +++ b/scripts/eastern_kingdoms/stratholme/boss_nerubenkan.cpp @@ -16,100 +16,13 @@ /* ScriptData SDName: Boss_Nerubenkan -SD%Complete: 70 -SDComment: +SD%Complete: 0 +SDComment: Placeholder SDCategory: Stratholme EndScriptData */ #include "precompiled.h" -enum -{ - SPELL_ENCASING_WEBS = 4962, - SPELL_PIERCE_ARMOR = 6016, - SPELL_CRYPT_SCARABS = 31602, - SPELL_RAISE_UNDEAD_SCARAB = 17235 -}; - -struct MANGOS_DLL_DECL boss_nerubenkanAI : public ScriptedAI -{ - boss_nerubenkanAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } - - uint32 m_uiEncasingWebsTimer; - uint32 m_uiPierceArmorTimer; - uint32 m_uiCryptScarabsTimer; - uint32 m_uiRaiseUndeadScarabTimer; - - void Reset() - { - m_uiCryptScarabsTimer = 3000; - m_uiEncasingWebsTimer = 7000; - m_uiPierceArmorTimer = 19000; - m_uiRaiseUndeadScarabTimer = 3000; - } - - void UpdateAI(const uint32 uiDiff) - { - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - // EncasingWebs - if (m_uiEncasingWebsTimer < uiDiff) - { - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1)) - { - if (DoCastSpellIfCan(pTarget, SPELL_ENCASING_WEBS) == CAST_OK) - m_uiEncasingWebsTimer = 30000; - } - } - else - m_uiEncasingWebsTimer -= uiDiff; - - // PierceArmor - if (m_uiPierceArmorTimer < uiDiff) - { - if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_PIERCE_ARMOR) == CAST_OK) - m_uiPierceArmorTimer = 35000; - } - else - m_uiPierceArmorTimer -= uiDiff; - - // CryptScarabs - if (m_uiCryptScarabsTimer < uiDiff) - { - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) - { - if (DoCastSpellIfCan(pTarget, SPELL_CRYPT_SCARABS) == CAST_OK) - m_uiCryptScarabsTimer = 16000; - } - } - else - m_uiCryptScarabsTimer -= uiDiff; - - // RaiseUndeadScarab - if (m_uiRaiseUndeadScarabTimer < uiDiff) - { - if (DoCastSpellIfCan(m_creature, SPELL_RAISE_UNDEAD_SCARAB) == CAST_OK) - m_uiRaiseUndeadScarabTimer = 18000; - } - else - m_uiRaiseUndeadScarabTimer -= uiDiff; - - DoMeleeAttackIfReady(); - } -}; - -CreatureAI* GetAI_boss_nerubenkan(Creature* pCreature) -{ - return new boss_nerubenkanAI(pCreature); -} - void AddSC_boss_nerubenkan() { - Script* pNewScript; - - pNewScript = new Script; - pNewScript->Name = "boss_nerubenkan"; - pNewScript->GetAI = &GetAI_boss_nerubenkan; - pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/stratholme/boss_postmaster_malown.cpp b/scripts/eastern_kingdoms/stratholme/boss_postmaster_malown.cpp index f11809ab7..cddcc9d81 100644 --- a/scripts/eastern_kingdoms/stratholme/boss_postmaster_malown.cpp +++ b/scripts/eastern_kingdoms/stratholme/boss_postmaster_malown.cpp @@ -16,125 +16,13 @@ /* ScriptData SDName: boss_postmaster_malown -SD%Complete: 50 -SDComment: +SD%Complete: 0 +SDComment: Placeholder SDCategory: Stratholme EndScriptData */ #include "precompiled.h" -//Spell ID to summon this guy is 24627 "Summon Postmaster Malown" -//He should be spawned along with three other elites once the third postbox has been opened - -#define SAY_MALOWNED "You just got MALOWNED!" - -#define SPELL_WAILINGDEAD 7713 -#define SPELL_BACKHAND 6253 -#define SPELL_CURSEOFWEAKNESS 8552 -#define SPELL_CURSEOFTONGUES 12889 -#define SPELL_CALLOFTHEGRAVE 17831 - -struct MANGOS_DLL_DECL boss_postmaster_malownAI : public ScriptedAI -{ - boss_postmaster_malownAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} - - uint32 WailingDead_Timer; - uint32 Backhand_Timer; - uint32 CurseOfWeakness_Timer; - uint32 CurseOfTongues_Timer; - uint32 CallOfTheGrave_Timer; - bool HasYelled; - - void Reset() - { - WailingDead_Timer = 19000; //lasts 6 sec - Backhand_Timer = 8000; //2 sec stun - CurseOfWeakness_Timer = 20000; //lasts 2 mins - CurseOfTongues_Timer = 22000; - CallOfTheGrave_Timer = 25000; - HasYelled = false; - } - - void UpdateAI(const uint32 diff) - { - //Return since we have no target - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - //WailingDead - if (WailingDead_Timer < diff) - { - //Cast - if (rand()%100 < 65) //65% chance to cast - { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_WAILINGDEAD); - } - //19 seconds until we should cast this again - WailingDead_Timer = 19000; - }else WailingDead_Timer -= diff; - - //Backhand - if (Backhand_Timer < diff) - { - //Cast - if (rand()%100 < 45) //45% chance to cast - { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_BACKHAND); - } - //8 seconds until we should cast this again - Backhand_Timer = 8000; - }else Backhand_Timer -= diff; - - //CurseOfWeakness - if (CurseOfWeakness_Timer < diff) - { - //Cast - if (rand()%100 < 3) //3% chance to cast - { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_CURSEOFWEAKNESS); - } - //20 seconds until we should cast this again - CurseOfWeakness_Timer = 20000; - }else CurseOfWeakness_Timer -= diff; - - //CurseOfTongues - if (CurseOfTongues_Timer < diff) - { - //Cast - if (rand()%100 < 3) //3% chance to cast - { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_CURSEOFTONGUES); - } - //22 seconds until we should cast this again - CurseOfTongues_Timer = 22000; - }else CurseOfTongues_Timer -= diff; - - //CallOfTheGrave - if (CallOfTheGrave_Timer < diff) - { - //Cast - if (rand()%100 < 5) //5% chance to cast - { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_CALLOFTHEGRAVE); - } - //25 seconds until we should cast this again - CallOfTheGrave_Timer = 25000; - }else CallOfTheGrave_Timer -= diff; - - DoMeleeAttackIfReady(); - } -}; -CreatureAI* GetAI_boss_postmaster_malown(Creature* pCreature) -{ - return new boss_postmaster_malownAI(pCreature); -} - void AddSC_boss_postmaster_malown() { - Script* pNewScript; - - pNewScript = new Script; - pNewScript->Name = "boss_postmaster_malown"; - pNewScript->GetAI = &GetAI_boss_postmaster_malown; - pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/stratholme/boss_ramstein_the_gorger.cpp b/scripts/eastern_kingdoms/stratholme/boss_ramstein_the_gorger.cpp index ebdeac2bf..163cd92c6 100644 --- a/scripts/eastern_kingdoms/stratholme/boss_ramstein_the_gorger.cpp +++ b/scripts/eastern_kingdoms/stratholme/boss_ramstein_the_gorger.cpp @@ -16,69 +16,13 @@ /* ScriptData SDName: Boss_Ramstein_the_Gorger -SD%Complete: 70 -SDComment: +SD%Complete: 0 +SDComment: Placeholder SDCategory: Stratholme EndScriptData */ #include "precompiled.h" -#include "stratholme.h" - -#define SPELL_TRAMPLE 5568 -#define SPELL_KNOCKOUT 17307 - -struct MANGOS_DLL_DECL boss_ramstein_the_gorgerAI : public ScriptedAI -{ - boss_ramstein_the_gorgerAI(Creature* pCreature) : ScriptedAI(pCreature) - { - m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - Reset(); - } - - ScriptedInstance* m_pInstance; - - uint32 Trample_Timer; - uint32 Knockout_Timer; - - void Reset() - { - Trample_Timer = 3000; - Knockout_Timer = 12000; - } - - void UpdateAI(const uint32 diff) - { - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - //Trample - if (Trample_Timer < diff) - { - DoCastSpellIfCan(m_creature,SPELL_TRAMPLE); - Trample_Timer = 7000; - }else Trample_Timer -= diff; - - //Knockout - if (Knockout_Timer < diff) - { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_KNOCKOUT); - Knockout_Timer = 10000; - }else Knockout_Timer -= diff; - - DoMeleeAttackIfReady(); - } -}; -CreatureAI* GetAI_boss_ramstein_the_gorger(Creature* pCreature) -{ - return new boss_ramstein_the_gorgerAI(pCreature); -} void AddSC_boss_ramstein_the_gorger() { - Script* pNewScript; - - pNewScript = new Script; - pNewScript->Name = "boss_ramstein_the_gorger"; - pNewScript->GetAI = &GetAI_boss_ramstein_the_gorger; - pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/stratholme/boss_timmy_the_cruel.cpp b/scripts/eastern_kingdoms/stratholme/boss_timmy_the_cruel.cpp index 9a6fa8cca..fa072260c 100644 --- a/scripts/eastern_kingdoms/stratholme/boss_timmy_the_cruel.cpp +++ b/scripts/eastern_kingdoms/stratholme/boss_timmy_the_cruel.cpp @@ -16,56 +16,13 @@ /* ScriptData SDName: boss_timmy_the_cruel -SD%Complete: 100 -SDComment: +SD%Complete: 0 +SDComment: Placeholder SDCategory: Stratholme EndScriptData */ #include "precompiled.h" -#define SAY_SPAWN "TIMMY!" - -#define SPELL_RAVENOUSCLAW 17470 - -struct MANGOS_DLL_DECL boss_timmy_the_cruelAI : public ScriptedAI -{ - boss_timmy_the_cruelAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} - - uint32 RavenousClaw_Timer; - - void Reset() - { - RavenousClaw_Timer = 10000; - } - - void UpdateAI(const uint32 diff) - { - //Return since we have no target - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - //RavenousClaw - if (RavenousClaw_Timer < diff) - { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_RAVENOUSCLAW); - RavenousClaw_Timer = 15000; - }else RavenousClaw_Timer -= diff; - - DoMeleeAttackIfReady(); - } -}; - -CreatureAI* GetAI_boss_timmy_the_cruel(Creature* pCreature) -{ - return new boss_timmy_the_cruelAI(pCreature); -} - void AddSC_boss_timmy_the_cruel() { - Script* pNewScript; - - pNewScript = new Script; - pNewScript->Name = "boss_timmy_the_cruel"; - pNewScript->GetAI = &GetAI_boss_timmy_the_cruel; - pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/stratholme/stratholme.cpp b/scripts/eastern_kingdoms/stratholme/stratholme.cpp index d98345f53..ab21843f2 100644 --- a/scripts/eastern_kingdoms/stratholme/stratholme.cpp +++ b/scripts/eastern_kingdoms/stratholme/stratholme.cpp @@ -25,7 +25,6 @@ EndScriptData */ go_service_gate go_gauntlet_gate go_stratholme_postbox -mob_freed_soul mob_restless_soul mobs_spectral_ghostly_citizen EndContentData */ @@ -123,45 +122,17 @@ bool GOUse_go_stratholme_postbox(Player* pPlayer, GameObject* pGo) } /*###### -## mob_freed_soul +## mob_restless_soul ######*/ -// Possibly more of these quotes around. enum { + // Possibly more of these quotes around. SAY_ZAPPED0 = -1329000, SAY_ZAPPED1 = -1329001, SAY_ZAPPED2 = -1329002, SAY_ZAPPED3 = -1329003, -}; - -struct MANGOS_DLL_DECL mob_freed_soulAI : public ScriptedAI -{ - mob_freed_soulAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } - - void Reset() - { - switch(urand(0, 3)) - { - case 0: DoScriptText(SAY_ZAPPED0, m_creature); break; - case 1: DoScriptText(SAY_ZAPPED1, m_creature); break; - case 2: DoScriptText(SAY_ZAPPED2, m_creature); break; - case 3: DoScriptText(SAY_ZAPPED3, m_creature); break; - } - } -}; - -CreatureAI* GetAI_mob_freed_soul(Creature* pCreature) -{ - return new mob_freed_soulAI(pCreature); -} -/*###### -## mob_restless_soul -######*/ - -enum -{ QUEST_RESTLESS_SOUL = 5282, SPELL_EGAN_BLASTER = 17368, @@ -201,7 +172,18 @@ struct MANGOS_DLL_DECL mob_restless_soulAI : public ScriptedAI void JustSummoned(Creature* pSummoned) { - pSummoned->CastSpell(pSummoned, SPELL_SOUL_FREED, false); + if (pSummoned->GetEntry() == NPC_FREED_SOUL) + { + pSummoned->CastSpell(pSummoned, SPELL_SOUL_FREED, false); + + switch(urand(0, 3)) + { + case 0: DoScriptText(SAY_ZAPPED0, pSummoned); break; + case 1: DoScriptText(SAY_ZAPPED1, pSummoned); break; + case 2: DoScriptText(SAY_ZAPPED2, pSummoned); break; + case 3: DoScriptText(SAY_ZAPPED3, pSummoned); break; + } + } } void JustDied(Unit* Killer) @@ -344,11 +326,6 @@ void AddSC_stratholme() pNewScript->pGOUse = &GOUse_go_stratholme_postbox; pNewScript->RegisterSelf(); - pNewScript = new Script; - pNewScript->Name = "mob_freed_soul"; - pNewScript->GetAI = &GetAI_mob_freed_soul; - pNewScript->RegisterSelf(); - pNewScript = new Script; pNewScript->Name = "mob_restless_soul"; pNewScript->GetAI = &GetAI_mob_restless_soul; diff --git a/scripts/eastern_kingdoms/zulaman/boss_malacrass.cpp b/scripts/eastern_kingdoms/zulaman/boss_malacrass.cpp index ca270fd05..657dcf301 100644 --- a/scripts/eastern_kingdoms/zulaman/boss_malacrass.cpp +++ b/scripts/eastern_kingdoms/zulaman/boss_malacrass.cpp @@ -429,481 +429,6 @@ CreatureAI* GetAI_boss_malacrass(Creature* pCreature) return new boss_malacrassAI(pCreature); } -//common AI for adds -struct MANGOS_DLL_DECL malacrass_add_commmonAI : public ScriptedAI -{ - malacrass_add_commmonAI(Creature* pCreature) : ScriptedAI(pCreature) - { - m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - Reset(); - } - - ScriptedInstance* m_pInstance; - - void Reset() { } - - void KilledUnit(Unit* pVictim) - { - if (!m_pInstance) - return; - - if (Creature* pMalacrass = m_pInstance->GetSingleCreatureFromStorage(NPC_MALACRASS)) - pMalacrass->AI()->KilledUnit(pVictim); - } -}; - -enum -{ - SPELL_BLOODLUST = 43578, - SPELL_CLEAVE = 15496 -}; - -struct MANGOS_DLL_DECL mob_thurgAI : public malacrass_add_commmonAI -{ - mob_thurgAI(Creature* pCreature) : malacrass_add_commmonAI(pCreature) { Reset(); } - - uint32 m_uiBloodlustTimer; - uint32 m_uiCleaveTimer; - - void Reset() - { - m_uiBloodlustTimer = 15000; - m_uiCleaveTimer = 10000; - } - - void UpdateAI(const uint32 uiDiff) - { - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - if (m_uiBloodlustTimer < uiDiff) - { - std::list lTempList = DoFindFriendlyMissingBuff(50.0f, SPELL_BLOODLUST); - - if (!lTempList.empty()) - { - if (Unit* pTarget = *(lTempList.begin())) - { - if (DoCastSpellIfCan(pTarget, SPELL_BLOODLUST) == CAST_OK) - m_uiBloodlustTimer = 12000; - } - } - else - m_uiBloodlustTimer = 2000; - } - else - m_uiBloodlustTimer -= uiDiff; - - if (m_uiCleaveTimer < uiDiff) - { - if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_CLEAVE) == CAST_OK) - m_uiCleaveTimer = 12000; - } - else - m_uiCleaveTimer -= uiDiff; - - DoMeleeAttackIfReady(); - } -}; - -CreatureAI* GetAI_mob_thurg(Creature* pCreature) -{ - return new mob_thurgAI(pCreature); -} - -enum -{ - SPELL_ARCANE_TORRENT = 33390, - SPELL_FLASH_HEAL = 43575, - SPELL_DISPEL_MAGIC = 43577 -}; - -struct MANGOS_DLL_DECL mob_alyson_antilleAI : public malacrass_add_commmonAI -{ - mob_alyson_antilleAI(Creature* pCreature) : malacrass_add_commmonAI(pCreature) { Reset(); } - - uint32 m_uiArcaneTorrentTimer; - uint32 m_uiFlashHealTimer; - uint32 m_uiDispelMagicTimer; - - void Reset() - { - m_uiArcaneTorrentTimer = 0; - m_uiFlashHealTimer = 2500; - m_uiDispelMagicTimer = 10000; - } - - void AttackStart(Unit* pWho) - { - if (!pWho) - return; - - if (m_creature->Attack(pWho, false)) - { - m_creature->AddThreat(pWho); - m_creature->SetInCombatWith(pWho); - pWho->SetInCombatWith(m_creature); - - m_creature->GetMotionMaster()->MoveChase(pWho, 20.0f); - } - } - - void UpdateAI(const uint32 uiDiff) - { - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - if (m_uiArcaneTorrentTimer < uiDiff) - { - if (m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0, uint32(0), SELECT_FLAG_PLAYER | SELECT_FLAG_IN_MELEE_RANGE)) - { - if (DoCastSpellIfCan(m_creature, SPELL_ARCANE_TORRENT) == CAST_OK) - m_uiArcaneTorrentTimer = 60000; - } - else - m_uiArcaneTorrentTimer = 1000; - } - else - m_uiArcaneTorrentTimer -= uiDiff; - - if (m_uiFlashHealTimer < uiDiff) - { - if (Unit* pTarget = DoSelectLowestHpFriendly(80.0f)) - { - if (DoCastSpellIfCan(pTarget, SPELL_FLASH_HEAL) == CAST_OK) - m_uiFlashHealTimer = urand(2000, 3000); - } - } - else - m_uiFlashHealTimer -= uiDiff; - - if (m_uiDispelMagicTimer < uiDiff) - { - Unit* pTarget = NULL; - std::list lTempList = DoFindFriendlyCC(40.0f); - - if (!lTempList.empty()) - pTarget = *(lTempList.begin()); - else - pTarget = DoSelectLowestHpFriendly(40.0f); - - if (pTarget) - { - if (DoCastSpellIfCan(pTarget, SPELL_DISPEL_MAGIC) == CAST_OK) - m_uiDispelMagicTimer = 12000; - } - } - else - m_uiDispelMagicTimer -= uiDiff; - - DoMeleeAttackIfReady(); - } -}; - -CreatureAI* GetAI_mob_alyson_antille(Creature* pCreature) -{ - return new mob_alyson_antilleAI(pCreature); -} - -enum -{ - SPELL_FIREBOLT = 43584 -}; - -struct MANGOS_DLL_DECL mob_gazakrothAI : public malacrass_add_commmonAI -{ - mob_gazakrothAI(Creature* pCreature) : malacrass_add_commmonAI(pCreature){ Reset(); } - - uint32 m_uiFireboltTimer; - - void Reset() - { - m_uiFireboltTimer = 1000; - } - - void AttackStart(Unit* pWho) - { - if (!pWho) - return; - - if (m_creature->Attack(pWho, false)) - { - m_creature->AddThreat(pWho); - m_creature->SetInCombatWith(pWho); - pWho->SetInCombatWith(m_creature); - - m_creature->GetMotionMaster()->MoveChase(pWho, 20.0f); - } - } - - void UpdateAI(const uint32 uiDiff) - { - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - if (m_uiFireboltTimer < uiDiff) - { - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) - { - if (DoCastSpellIfCan(pTarget, SPELL_FIREBOLT) == CAST_OK) - m_uiFireboltTimer = 1000; - } - } - else - m_uiFireboltTimer -= uiDiff; - - DoMeleeAttackIfReady(); - } -}; - -CreatureAI* GetAI_mob_gazakroth(Creature* pCreature) -{ - return new mob_gazakrothAI(pCreature); -} - -enum -{ - SPELL_FLAME_BREATH = 43582, - SPELL_THUNDERCLAP = 43583 -}; - -struct MANGOS_DLL_DECL mob_lord_raadanAI : public malacrass_add_commmonAI -{ - mob_lord_raadanAI(Creature* pCreature) : malacrass_add_commmonAI(pCreature) { Reset(); } - - uint32 m_uiFlameBreathTimer; - uint32 m_uiThunderclapTimer; - - void Reset() - { - m_uiFlameBreathTimer = 8000; - m_uiThunderclapTimer = 13000; - } - - void UpdateAI(const uint32 uiDiff) - { - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - if (m_uiThunderclapTimer < uiDiff) - { - if (m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0, SPELL_THUNDERCLAP, SELECT_FLAG_PLAYER | SELECT_FLAG_IN_MELEE_RANGE)) - { - if (DoCastSpellIfCan(m_creature, SPELL_THUNDERCLAP) == CAST_OK) - m_uiThunderclapTimer = 12000; - } - else - m_uiThunderclapTimer = 1000; - } - else - m_uiThunderclapTimer -= uiDiff; - - if (m_uiFlameBreathTimer < uiDiff) - { - if (DoCastSpellIfCan(m_creature, SPELL_FLAME_BREATH) == CAST_OK) - m_uiFlameBreathTimer = 12000; - } - else - m_uiFlameBreathTimer -= uiDiff; - - DoMeleeAttackIfReady(); - } -}; - -CreatureAI* GetAI_mob_lord_raadan(Creature* pCreature) -{ - return new mob_lord_raadanAI(pCreature); -} - -enum -{ - SPELL_PSYCHIC_WAIL = 43590 -}; - -struct MANGOS_DLL_DECL mob_darkheartAI : public malacrass_add_commmonAI -{ - mob_darkheartAI(Creature* pCreature) : malacrass_add_commmonAI(pCreature) { Reset(); } - - uint32 m_uiPsychicWailTimer; - - void Reset() - { - m_uiPsychicWailTimer = 8000; - } - - void UpdateAI(const uint32 uiDiff) - { - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - if (m_uiPsychicWailTimer < uiDiff) - { - if (m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0, uint32(0), SELECT_FLAG_PLAYER | SELECT_FLAG_IN_MELEE_RANGE)) - { - if (DoCastSpellIfCan(m_creature, SPELL_PSYCHIC_WAIL) == CAST_OK) - m_uiPsychicWailTimer = 12000; - } - else - m_uiPsychicWailTimer = 1000; - } - else - m_uiPsychicWailTimer -= uiDiff; - - DoMeleeAttackIfReady(); - } -}; - -CreatureAI* GetAI_mob_darkheart(Creature* pCreature) -{ - return new mob_darkheartAI(pCreature); -} - -enum -{ - SPELL_VENOM_SPIT = 43579 -}; - -struct MANGOS_DLL_DECL mob_slitherAI : public malacrass_add_commmonAI -{ - mob_slitherAI(Creature* pCreature) : malacrass_add_commmonAI(pCreature) { Reset(); } - - uint32 m_uiVenomSpitTimer; - - void Reset() - { - m_uiVenomSpitTimer = 2000; - } - - void AttackStart(Unit* pWho) - { - if (!pWho) - return; - - if (m_creature->Attack(pWho, false)) - { - m_creature->AddThreat(pWho); - m_creature->SetInCombatWith(pWho); - pWho->SetInCombatWith(m_creature); - - m_creature->GetMotionMaster()->MoveChase(pWho, 20.0f); - } - } - - void UpdateAI(const uint32 uiDiff) - { - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - if (m_uiVenomSpitTimer < uiDiff) - { - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) - { - if (DoCastSpellIfCan(pTarget, SPELL_VENOM_SPIT) == CAST_OK) - m_uiVenomSpitTimer = 2500; - } - } - else - m_uiVenomSpitTimer -= uiDiff; - - DoMeleeAttackIfReady(); - } -}; - -CreatureAI* GetAI_mob_slither(Creature* pCreature) -{ - return new mob_slitherAI(pCreature); -} - -enum -{ - SPELL_VOLATILE_INFECTION = 43586 -}; - -struct MANGOS_DLL_DECL mob_fenstalkerAI : public malacrass_add_commmonAI -{ - mob_fenstalkerAI(Creature* pCreature) : malacrass_add_commmonAI(pCreature) { Reset(); } - - uint32 m_uiVolatileInfectionTimer; - - void Reset() - { - m_uiVolatileInfectionTimer = 15000; - } - - void UpdateAI(const uint32 uiDiff) - { - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - if (m_uiVolatileInfectionTimer < uiDiff) - { - if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_VOLATILE_INFECTION) == CAST_OK) - m_uiVolatileInfectionTimer = 12000; - } - else - m_uiVolatileInfectionTimer -= uiDiff; - - DoMeleeAttackIfReady(); - } -}; - -CreatureAI* GetAI_mob_fenstalker(Creature* pCreature) -{ - return new mob_fenstalkerAI(pCreature); -} - -enum -{ - SPELL_COLD_STARE = 43593, - SPELL_MIGHTY_BLOW = 43592, -}; - -struct MANGOS_DLL_DECL mob_koraggAI : public malacrass_add_commmonAI -{ - mob_koraggAI(Creature* pCreature) : malacrass_add_commmonAI(pCreature) { Reset(); } - - uint32 m_uiColdStareTimer; - uint32 m_uiMightyBlowTimer; - - void Reset() - { - m_uiColdStareTimer = 15000; - m_uiMightyBlowTimer = 10000; - } - - void UpdateAI(const uint32 uiDiff) - { - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - if (m_uiMightyBlowTimer < uiDiff) - { - if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_MIGHTY_BLOW) == CAST_OK) - m_uiMightyBlowTimer = 12000; - } - else - m_uiMightyBlowTimer -= uiDiff; - - if (m_uiColdStareTimer < uiDiff) - { - if (Unit* pVictim = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) - { - if (DoCastSpellIfCan(pVictim, SPELL_COLD_STARE) == CAST_OK) - m_uiColdStareTimer = 12000; - } - } - else - m_uiColdStareTimer -= uiDiff; - - DoMeleeAttackIfReady(); - } -}; - -CreatureAI* GetAI_mob_koragg(Creature* pCreature) -{ - return new mob_koraggAI(pCreature); -} - void AddSC_boss_malacrass() { Script* pNewScript; @@ -912,44 +437,4 @@ void AddSC_boss_malacrass() pNewScript->Name = "boss_malacrass"; pNewScript->GetAI = &GetAI_boss_malacrass; pNewScript->RegisterSelf(); - - pNewScript = new Script; - pNewScript->Name = "mob_thurg"; - pNewScript->GetAI = &GetAI_mob_thurg; - pNewScript->RegisterSelf(); - - pNewScript = new Script; - pNewScript->Name = "mob_gazakroth"; - pNewScript->GetAI = &GetAI_mob_gazakroth; - pNewScript->RegisterSelf(); - - pNewScript = new Script; - pNewScript->Name = "mob_lord_raadan"; - pNewScript->GetAI = &GetAI_mob_lord_raadan; - pNewScript->RegisterSelf(); - - pNewScript = new Script; - pNewScript->Name = "mob_darkheart"; - pNewScript->GetAI = &GetAI_mob_darkheart; - pNewScript->RegisterSelf(); - - pNewScript = new Script; - pNewScript->Name = "mob_slither"; - pNewScript->GetAI = &GetAI_mob_slither; - pNewScript->RegisterSelf(); - - pNewScript = new Script; - pNewScript->Name = "mob_fenstalker"; - pNewScript->GetAI = &GetAI_mob_fenstalker; - pNewScript->RegisterSelf(); - - pNewScript = new Script; - pNewScript->Name = "mob_koragg"; - pNewScript->GetAI = &GetAI_mob_koragg; - pNewScript->RegisterSelf(); - - pNewScript = new Script; - pNewScript->Name = "mob_alyson_antille"; - pNewScript->GetAI = &GetAI_mob_alyson_antille; - pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/zulgurub/boss_gahzranka.cpp b/scripts/eastern_kingdoms/zulgurub/boss_gahzranka.cpp index 1fe1fc7f5..c21b5fa49 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_gahzranka.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_gahzranka.cpp @@ -16,74 +16,13 @@ /* ScriptData SDName: Boss_Gahz'ranka -SD%Complete: 85 -SDComment: Massive Geyser with knockback not working. Spell buggy. +SD%Complete: 0 +SDComment: Placeholder SDCategory: Zul'Gurub EndScriptData */ #include "precompiled.h" -#define SPELL_FROSTBREATH 16099 -#define SPELL_MASSIVEGEYSER 22421 //Not working. Cause its a summon... -#define SPELL_SLAM 24326 - -struct MANGOS_DLL_DECL boss_gahzrankaAI : public ScriptedAI -{ - boss_gahzrankaAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} - uint32 Frostbreath_Timer; - uint32 MassiveGeyser_Timer; - uint32 Slam_Timer; - - void Reset() - { - Frostbreath_Timer = 8000; - MassiveGeyser_Timer = 25000; - Slam_Timer = 17000; - } - - void UpdateAI(const uint32 diff) - { - //Return since we have no target - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - //Frostbreath_Timer - if (Frostbreath_Timer < diff) - { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_FROSTBREATH); - Frostbreath_Timer = urand(7000, 11000); - }else Frostbreath_Timer -= diff; - - //MassiveGeyser_Timer - if (MassiveGeyser_Timer < diff) - { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_MASSIVEGEYSER); - DoResetThreat(); - - MassiveGeyser_Timer = urand(22000, 32000); - }else MassiveGeyser_Timer -= diff; - - //Slam_Timer - if (Slam_Timer < diff) - { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_SLAM); - Slam_Timer = urand(12000, 20000); - }else Slam_Timer -= diff; - - DoMeleeAttackIfReady(); - } -}; -CreatureAI* GetAI_boss_gahzranka(Creature* pCreature) -{ - return new boss_gahzrankaAI(pCreature); -} - void AddSC_boss_gahzranka() { - Script* pNewScript; - - pNewScript = new Script; - pNewScript->Name = "boss_gahzranka"; - pNewScript->GetAI = &GetAI_boss_gahzranka; - pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/zulgurub/boss_grilek.cpp b/scripts/eastern_kingdoms/zulgurub/boss_grilek.cpp index d861b60d5..f3f0ceb23 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_grilek.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_grilek.cpp @@ -16,74 +16,13 @@ /* ScriptData SDName: Boss_Grilek -SD%Complete: 100 -SDComment: +SD%Complete: 0 +SDComment: Placeholder SDCategory: Zul'Gurub EndScriptData */ #include "precompiled.h" -#include "zulgurub.h" - -#define SPELL_AVARTAR 24646 //The Enrage Spell -#define SPELL_GROUNDTREMOR 6524 - -struct MANGOS_DLL_DECL boss_grilekAI : public ScriptedAI -{ - boss_grilekAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} - - uint32 Avartar_Timer; - uint32 GroundTremor_Timer; - - void Reset() - { - Avartar_Timer = urand(15000, 25000); - GroundTremor_Timer = urand(8000, 16000); - } - - void UpdateAI(const uint32 diff) - { - //Return since we have no target - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - //Avartar_Timer - if (Avartar_Timer < diff) - { - - DoCastSpellIfCan(m_creature, SPELL_AVARTAR); - Unit* target = NULL; - - target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,1); - - if (m_creature->getThreatManager().getThreat(m_creature->getVictim())) - m_creature->getThreatManager().modifyThreatPercent(m_creature->getVictim(),-50); - if (target) - AttackStart(target); - - Avartar_Timer = urand(25000, 35000); - }else Avartar_Timer -= diff; - - //GroundTremor_Timer - if (GroundTremor_Timer < diff) - { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_GROUNDTREMOR); - GroundTremor_Timer = urand(12000, 16000); - }else GroundTremor_Timer -= diff; - - DoMeleeAttackIfReady(); - } -}; -CreatureAI* GetAI_boss_grilek(Creature* pCreature) -{ - return new boss_grilekAI(pCreature); -} void AddSC_boss_grilek() { - Script* pNewScript; - - pNewScript = new Script; - pNewScript->Name = "boss_grilek"; - pNewScript->GetAI = &GetAI_boss_grilek; - pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/zulgurub/boss_jindo.cpp b/scripts/eastern_kingdoms/zulgurub/boss_jindo.cpp index 8110af909..7ffe97bb9 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_jindo.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_jindo.cpp @@ -36,10 +36,6 @@ enum SPELL_HEALING_WARD_HEAL = 24311, - // Shade of Jindo Spell - SPELL_SHADOWSHOCK = 19460, - SPELL_SHADE_OF_JINDO_PASSIVE = 24307, // shade invisibility, needs core support to prevent removing when attacking - // npcs NPC_SHADE_OF_JINDO = 14986, NPC_SACRIFICED_TROLL = 14826, @@ -199,43 +195,6 @@ struct MANGOS_DLL_DECL mob_healing_wardAI : public ScriptedAI } }; -// TODO Move to Acid -struct MANGOS_DLL_DECL mob_shade_of_jindoAI : public ScriptedAI -{ - mob_shade_of_jindoAI(Creature* pCreature) : ScriptedAI(pCreature) - { - m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - Reset(); - } - - ScriptedInstance* m_pInstance; - - uint32 m_uiShadowShockTimer; - - void Reset() - { - m_uiShadowShockTimer = 1000; - DoCastSpellIfCan(m_creature, SPELL_SHADE_OF_JINDO_PASSIVE); - } - - void UpdateAI (const uint32 uiDiff) - { - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - // ShadowShock Timer - if (m_uiShadowShockTimer < uiDiff) - { - if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_SHADOWSHOCK) == CAST_OK) - m_uiShadowShockTimer = 2000; - } - else - m_uiShadowShockTimer -= uiDiff; - - DoMeleeAttackIfReady(); - } -}; - CreatureAI* GetAI_boss_jindo(Creature* pCreature) { return new boss_jindoAI(pCreature); @@ -246,11 +205,6 @@ CreatureAI* GetAI_mob_healing_ward(Creature* pCreature) return new mob_healing_wardAI(pCreature); } -CreatureAI* GetAI_mob_shade_of_jindo(Creature* pCreature) -{ - return new mob_shade_of_jindoAI(pCreature); -} - void AddSC_boss_jindo() { Script* pNewScript; @@ -264,9 +218,4 @@ void AddSC_boss_jindo() pNewScript->Name = "mob_healing_ward"; pNewScript->GetAI = &GetAI_mob_healing_ward; pNewScript->RegisterSelf(); - - pNewScript = new Script; - pNewScript->Name = "mob_shade_of_jindo"; - pNewScript->GetAI = &GetAI_mob_shade_of_jindo; - pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/zulgurub/boss_wushoolay.cpp b/scripts/eastern_kingdoms/zulgurub/boss_wushoolay.cpp index 4ffba6247..65e9392fc 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_wushoolay.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_wushoolay.cpp @@ -16,66 +16,13 @@ /* ScriptData SDName: Boss_Wushoolay -SD%Complete: 100 -SDComment: +SD%Complete: 0 +SDComment: Placeholder SDCategory: Zul'Gurub EndScriptData */ #include "precompiled.h" -#include "zulgurub.h" - -#define SPELL_LIGHTNINGCLOUD 25033 -#define SPELL_LIGHTNINGWAVE 24819 - -struct MANGOS_DLL_DECL boss_wushoolayAI : public ScriptedAI -{ - boss_wushoolayAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} - - uint32 LightningCloud_Timer; - uint32 LightningWave_Timer; - - void Reset() - { - LightningCloud_Timer = urand(5000, 10000); - LightningWave_Timer = urand(8000, 16000); - } - - void UpdateAI(const uint32 diff) - { - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - //LightningCloud_Timer - if (LightningCloud_Timer < diff) - { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_LIGHTNINGCLOUD); - LightningCloud_Timer = urand(15000, 20000); - }else LightningCloud_Timer -= diff; - - //LightningWave_Timer - if (LightningWave_Timer < diff) - { - Unit* target = NULL; - target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0); - if (target) DoCastSpellIfCan(target,SPELL_LIGHTNINGWAVE); - - LightningWave_Timer = urand(12000, 16000); - }else LightningWave_Timer -= diff; - - DoMeleeAttackIfReady(); - } -}; -CreatureAI* GetAI_boss_wushoolay(Creature* pCreature) -{ - return new boss_wushoolayAI(pCreature); -} void AddSC_boss_wushoolay() { - Script* pNewScript; - - pNewScript = new Script; - pNewScript->Name = "boss_wushoolay"; - pNewScript->GetAI = &GetAI_boss_wushoolay; - pNewScript->RegisterSelf(); } diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 3103223b7..6d690c767 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -92,7 +92,6 @@ UPDATE creature_template SET ScriptName='boss_ysondre' WHERE entry=14887; UPDATE creature_template SET ScriptName='boss_emeriss' WHERE entry=14889; UPDATE creature_template SET ScriptName='boss_taerar' WHERE entry=14890; UPDATE creature_template SET ScriptName='boss_shade_of_taerar' WHERE entry=15302; -UPDATE creature_template SET ScriptName='boss_kruul' WHERE entry=18338; UPDATE creature_template SET ScriptName='boss_azuregos' WHERE entry=6109; UPDATE creature_template SET ScriptName='mob_dementeddruids' WHERE entry=15260; UPDATE creature_template SET ScriptName='boss_lethon' WHERE entry=14888; @@ -192,10 +191,8 @@ INSERT INTO world_template VALUES /* ALTERAC MOUNTAINS */ - /* ALTERAC VALLEY */ - /* ARATHI HIGHLANDS */ UPDATE creature_template SET ScriptName='npc_professor_phizzlethorpe' WHERE entry=2768; @@ -273,7 +270,6 @@ UPDATE creature_template SET ScriptName='npc_magwin' WHERE entry=17312; /* BADLANDS */ - /* BARRENS */ UPDATE creature_template SET ScriptName='npc_beaten_corpse' WHERE entry=10668; UPDATE creature_template SET ScriptName='npc_gilthares' WHERE entry=3465; @@ -332,14 +328,9 @@ UPDATE instance_template SET ScriptName='instance_blackrock_depths' WHERE map =2 UPDATE creature_template SET ScriptName='boss_emperor_dagran_thaurissan' WHERE entry=9019; UPDATE creature_template SET ScriptName='boss_moira_bronzebeard' WHERE entry=8929; UPDATE creature_template SET ScriptName='boss_ambassador_flamelash' WHERE entry=9156; -UPDATE creature_template SET ScriptName='boss_anubshiah' WHERE entry=9031; UPDATE creature_template SET ScriptName='boss_doomrel' WHERE entry=9039; UPDATE creature_template SET ScriptName='boss_general_angerforge' WHERE entry=9033; -UPDATE creature_template SET ScriptName='boss_gorosh_the_dervish' WHERE entry=9027; -UPDATE creature_template SET ScriptName='boss_grizzle' WHERE entry=9028; UPDATE creature_template SET ScriptName='boss_high_interrogator_gerstahn' WHERE entry=9018; -UPDATE creature_template SET ScriptName='boss_magmus' WHERE entry=9938; -UPDATE creature_template SET ScriptName='mob_phalanx' WHERE entry=9502; UPDATE creature_template SET ScriptName='npc_grimstone' WHERE entry=10096; UPDATE creature_template SET ScriptName='npc_theldren_trigger' WHERE entry=16079; UPDATE creature_template SET ScriptName='npc_kharan_mighthammer' WHERE entry=9021; @@ -352,19 +343,8 @@ UPDATE gameobject_template SET ScriptName='go_relic_coffer_door' WHERE entry IN /* BLACKROCK SPIRE */ UPDATE instance_template SET ScriptName='instance_blackrock_spire' WHERE map=229; -/* BLACKROCK SPIRE Lower bosses */ -UPDATE creature_template SET ScriptName='boss_highlord_omokk' WHERE entry=9196; -UPDATE creature_template SET ScriptName='boss_shadow_hunter_voshgajin' WHERE entry=9236; -UPDATE creature_template SET ScriptName='boss_warmaster_voone' WHERE entry=9237; -UPDATE creature_template SET ScriptName='boss_mother_smolderweb' WHERE entry=10596; -UPDATE creature_template SET ScriptName='quartermaster_zigris' WHERE entry=9736; -UPDATE creature_template SET ScriptName='boss_halycon' WHERE entry=10220; UPDATE creature_template SET ScriptName='boss_overlord_wyrmthalak' WHERE entry=9568; -/* BLACKROCK SPIRE Upper bosses */ -UPDATE creature_template SET ScriptName='boss_the_beast' WHERE entry=10430; -UPDATE creature_template SET ScriptName='boss_drakkisath' WHERE entry=10363; UPDATE creature_template SET ScriptName='boss_gyth' WHERE entry=10339; -UPDATE creature_template SET ScriptName='boss_rend_blackhand' WHERE entry=10429; UPDATE creature_template SET ScriptName='boss_pyroguard_emberseer' WHERE entry=9816; DELETE FROM scripted_event_id WHERE id=4884; INSERT INTO scripted_event_id VALUES @@ -512,7 +492,6 @@ UPDATE creature_template SET ScriptName='npc_volcor' WHERE entry=3692; /* DARNASSUS */ - /* DEADMINES */ UPDATE creature_template SET ScriptName='boss_mr_smite' WHERE entry=646; UPDATE instance_template SET ScriptName='instance_deadmines' WHERE map=36; @@ -520,7 +499,6 @@ UPDATE gameobject_template SET ScriptName='go_defias_cannon' WHERE entry=16398; /* DEADWIND PASS */ - /* DESOLACE */ UPDATE creature_template SET ScriptName='npc_aged_dying_ancient_kodo' WHERE entry IN (4700, 4701, 4702, 11627); UPDATE creature_template SET ScriptName='npc_dalinda_malem' WHERE entry=5644; @@ -541,14 +519,11 @@ UPDATE instance_template SET ScriptName='instance_draktharon_keep' WHERE map=600 /* DUN MOROGH */ - /* DUROTAR */ UPDATE creature_template SET ScriptName='npc_lazy_peon' WHERE entry=10556; - /* DUSKWOOD */ - /* DUSTWALLOW MARSH */ UPDATE creature_template SET ScriptName='mobs_risen_husk_spirit' WHERE entry IN (23554,23555); UPDATE creature_template SET ScriptName='npc_ogron' WHERE entry=4983; @@ -560,7 +535,6 @@ INSERT INTO scripted_areatrigger VALUES (4752,'at_nats_landing'); /* EASTERN PLAGUELANDS */ -UPDATE creature_template SET ScriptName='mobs_ghoul_flayer' WHERE entry IN (8530,8531,8532); UPDATE creature_template SET ScriptName='npc_darrowshire_spirit' WHERE entry=11064; UPDATE creature_template SET ScriptName='npc_eris_havenfire' WHERE entry=14494; @@ -675,7 +649,6 @@ UPDATE creature_template SET ScriptName='npc_wounded_blood_elf' WHERE entry=1699 /* HILLSBRAD FOOTHILLS */ - /* HINTERLANDS */ UPDATE creature_template SET ScriptName='npc_00x09hl' WHERE entry=7806; UPDATE creature_template SET ScriptName='npc_rinji' WHERE entry=7780; @@ -754,14 +727,7 @@ UPDATE creature_template SET ScriptName='boss_shade_of_aran' WHERE entry=16524; UPDATE creature_template SET ScriptName='boss_netherspite' WHERE entry=15689; UPDATE creature_template SET ScriptName='boss_malchezaar' WHERE entry=15690; -- UPDATE creature_template SET ScriptName='boss_nightbane' WHERE entry=17225; -UPDATE creature_template SET ScriptName='boss_baroness_dorothea_millstipe' WHERE entry=19875; -UPDATE creature_template SET ScriptName='boss_baron_rafe_dreuger' WHERE entry=19874; -UPDATE creature_template SET ScriptName='boss_lady_catriona_von_indi' WHERE entry=19872; -UPDATE creature_template SET ScriptName='boss_lady_keira_berrybuck' WHERE entry=17007; -UPDATE creature_template SET ScriptName='boss_lord_robin_daris' WHERE entry=19876; -UPDATE creature_template SET ScriptName='boss_lord_crispin_ference' WHERE entry=19873; UPDATE creature_template SET ScriptName='boss_bigbadwolf' WHERE entry=17521; -UPDATE creature_template SET ScriptName='mob_aran_elemental' WHERE entry=17167; UPDATE creature_template SET ScriptName='mob_demon_chain' WHERE entry=17248; UPDATE creature_template SET ScriptName='npc_fiendish_portal' WHERE entry=17265; UPDATE creature_template SET ScriptName='mob_cyclone' WHERE entry=18412; @@ -874,7 +840,7 @@ UPDATE creature_template SET ScriptName='npc_zeppit' WHERE entry=22484; UPDATE instance_template SET ScriptName='instance_eye_of_eternity' WHERE map=616; UPDATE creature_template SET ScriptName='boss_malygos' WHERE entry=28859; UPDATE creature_template SET ScriptName='npc_power_spark' WHERE entry=30084; -DELETE FROM scripted_event_id WHERE id IN (20711); +DELETE FROM scripted_event_id WHERE id=20711; INSERT INTO scripted_event_id VALUES (20711,'event_go_focusing_iris'); @@ -913,7 +879,6 @@ UPDATE creature_template SET ScriptName='npc_thrall_warchief' WHERE entry=4949; /* RAGEFIRE CHASM */ - /* RAZORFEN DOWNS */ UPDATE creature_template SET ScriptName='npc_belnistrasz' WHERE entry=8516; @@ -947,26 +912,17 @@ UPDATE creature_template SET ScriptName='npc_kaldorei_elite' WHERE entry=15473; /* SCARLET MONASTERY */ UPDATE instance_template SET ScriptName='instance_scarlet_monastery' WHERE map=189; UPDATE creature_template SET ScriptName='boss_arcanist_doan' WHERE entry=6487; -UPDATE creature_template SET ScriptName='boss_azshir_the_sleepless' WHERE entry=6490; -UPDATE creature_template SET ScriptName='boss_bloodmage_thalnos' WHERE entry=4543; UPDATE creature_template SET ScriptName='boss_herod' WHERE entry=3975; -UPDATE creature_template SET ScriptName='boss_high_inquisitor_fairbanks' WHERE entry=4542; UPDATE creature_template SET ScriptName='boss_high_inquisitor_whitemane' WHERE entry=3977; -UPDATE creature_template SET ScriptName='boss_houndmaster_loksey' WHERE entry=3974; -UPDATE creature_template SET ScriptName='boss_interrogator_vishas' WHERE entry=3983; UPDATE creature_template SET ScriptName='boss_scarlet_commander_mograine' WHERE entry=3976; -UPDATE creature_template SET ScriptName='boss_scorn' WHERE entry=14693; UPDATE creature_template SET ScriptName='mob_scarlet_trainee' WHERE entry=6575; UPDATE creature_template SET ScriptName='boss_headless_horseman' WHERE entry=23682; /* SCHOLOMANCE */ UPDATE instance_template SET ScriptName='instance_scholomance' WHERE map=289; UPDATE creature_template SET ScriptName='boss_darkmaster_gandling' WHERE entry=1853; -UPDATE creature_template SET ScriptName='boss_death_knight_darkreaver' WHERE entry=14516; UPDATE creature_template SET ScriptName='boss_vectus' WHERE entry=10432; UPDATE creature_template SET ScriptName='boss_jandice_barov' WHERE entry=10503; -UPDATE creature_template SET ScriptName='boss_kormok' WHERE entry=16118; -UPDATE creature_template SET ScriptName='mob_illusionofjandicebarov' WHERE entry=11439; DELETE FROM scripted_event_id WHERE id IN (5618, 5619, 5620, 5621, 5622, 5623); INSERT INTO scripted_event_id VALUES (5618,'event_spell_gandling_shadow_portal'), @@ -1048,19 +1004,12 @@ UPDATE creature_template SET ScriptName='mob_yenniku' WHERE entry=2530; /* STRATHOLME */ UPDATE instance_template SET ScriptName='instance_stratholme' WHERE map=329; UPDATE creature_template SET ScriptName='boss_dathrohan_balnazzar' WHERE entry=10812; -UPDATE creature_template SET ScriptName='boss_magistrate_barthilas' WHERE entry=10435; UPDATE creature_template SET ScriptName='boss_maleki_the_pallid' WHERE entry=10438; -UPDATE creature_template SET ScriptName='boss_nerubenkan' WHERE entry=10437; UPDATE creature_template SET ScriptName='boss_cannon_master_willey' WHERE entry=10997; UPDATE creature_template SET ScriptName='boss_baroness_anastari' WHERE entry=10436; -UPDATE creature_template SET ScriptName='boss_ramstein_the_gorger' WHERE entry=10439; -UPDATE creature_template SET ScriptName='boss_timmy_the_cruel' WHERE entry=10808; UPDATE creature_template SET ScriptName='boss_silver_hand_bosses' WHERE entry IN (17910,17911,17912,17913,17914); -UPDATE creature_template SET ScriptName='boss_postmaster_malown' WHERE entry=11143; -UPDATE creature_template SET ScriptName='boss_baron_rivendare' WHERE entry=10440; UPDATE creature_template SET ScriptName='mobs_spectral_ghostly_citizen' WHERE entry IN (10384,10385); UPDATE creature_template SET ScriptName='mob_restless_soul' WHERE entry=11122; -UPDATE creature_template SET ScriptName='mob_freed_soul' WHERE entry=11136; UPDATE gameobject_template SET ScriptName='go_gauntlet_gate' WHERE entry=175357; UPDATE gameobject_template SET ScriptName='go_service_gate' WHERE entry=175368; UPDATE gameobject_template SET ScriptName='go_stratholme_postbox' WHERE entry IN (176346,176349,176350,176351,176352,176353); @@ -1291,7 +1240,6 @@ INSERT INTO scripted_event_id VALUES /* VAULT OF ARCHAVON */ - /* VIOLET HOLD */ UPDATE instance_template SET ScriptName='instance_violet_hold' WHERE map=608; UPDATE gameobject_template SET ScriptName='go_activation_crystal' WHERE entry=193611; @@ -1338,14 +1286,6 @@ UPDATE creature_template SET ScriptName='boss_halazzi' WHERE entry=23577; UPDATE creature_template SET ScriptName='boss_spirit_lynx' WHERE entry=24143; UPDATE creature_template SET ScriptName='boss_janalai' WHERE entry=23578; UPDATE creature_template SET ScriptName='boss_malacrass' WHERE entry=24239; -UPDATE creature_template SET ScriptName='mob_alyson_antille' WHERE entry=24240; -UPDATE creature_template SET ScriptName='mob_thurg' WHERE entry=24241; -UPDATE creature_template SET ScriptName='mob_slither' WHERE entry=24242; -UPDATE creature_template SET ScriptName='mob_lord_raadan' WHERE entry=24243; -UPDATE creature_template SET ScriptName='mob_gazakroth' WHERE entry=24244; -UPDATE creature_template SET ScriptName='mob_fenstalker' WHERE entry=24245; -UPDATE creature_template SET ScriptName='mob_darkheart' WHERE entry=24246; -UPDATE creature_template SET ScriptName='mob_koragg' WHERE entry=24247; UPDATE creature_template SET ScriptName='boss_nalorakk' WHERE entry=23576; UPDATE creature_template SET ScriptName='boss_zuljin' WHERE entry=23863; UPDATE creature_template SET ScriptName='npc_janalai_firebomb' WHERE entry=23920; @@ -1373,20 +1313,16 @@ UPDATE creature_template SET ScriptName='boss_venoxis' WHERE entry=14507; UPDATE creature_template SET ScriptName='boss_marli' WHERE entry=14510; UPDATE creature_template SET ScriptName='boss_mandokir' WHERE entry=11382; UPDATE creature_template SET ScriptName='mob_ohgan' WHERE entry=14988; -UPDATE creature_template SET ScriptName='boss_gahzranka' WHERE entry=15114; UPDATE creature_template SET ScriptName='boss_jindo' WHERE entry=11380; UPDATE creature_template SET ScriptName='boss_hakkar' WHERE entry=14834; UPDATE creature_template SET ScriptName='boss_thekal' WHERE entry=14509; UPDATE creature_template SET ScriptName='boss_arlokk' WHERE entry=14515; UPDATE gameobject_template SET ScriptName='go_gong_of_bethekk' WHERE entry=180526; -UPDATE creature_template SET ScriptName='boss_grilek' WHERE entry=15082; UPDATE creature_template SET ScriptName='boss_hazzarah' WHERE entry=15083; UPDATE creature_template SET ScriptName='boss_renataki' WHERE entry=15084; -UPDATE creature_template SET ScriptName='boss_wushoolay' WHERE entry=15085; UPDATE creature_template SET ScriptName='mob_zealot_lorkhan' WHERE entry=11347; UPDATE creature_template SET ScriptName='mob_zealot_zath' WHERE entry=11348; UPDATE creature_template SET ScriptName='mob_healing_ward' WHERE entry=14987; UPDATE creature_template SET ScriptName='npc_gurubashi_bat_rider' WHERE entry=14750; -UPDATE creature_template SET ScriptName='mob_shade_of_jindo' WHERE entry=14986; /* EOF */ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 1865ea8de..68700705a 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -1133,20 +1133,21 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1189009,'The Light has spoken!',5839,1,0,0,'whitemane SAY_WH_KILL'), (-1189010,'Arise, my champion!',5840,1,0,0,'whitemane SAY_WH_RESSURECT'), -(-1189011,'Tell me... tell me everything!',5847,1,0,0,'vishas SAY_AGGRO'), -(-1189012,'Naughty secrets!',5849,1,0,0,'vishas SAY_HEALTH1'), -(-1189013,'I\'ll rip the secrets from your flesh!',5850,1,0,0,'vishas SAY_HEALTH2'), -(-1189014,'Purged by pain!',5848,1,0,0,'vishas SAY_KILL'), +(-1189011,'REUSE_ME',0,0,0,0,'REUSE_ME'), +(-1189012,'REUSE_ME',0,0,0,0,'REUSE_ME'), +(-1189013,'REUSE_ME',0,0,0,0,'REUSE_ME'), +(-1189014,'REUSE_ME',0,0,0,0,'REUSE_ME'), + (-1189015,'The monster got what he deserved.',0,0,1,0,'vishas SAY_TRIGGER_VORREL'), -(-1189016,'We hunger for vengeance.',5844,1,0,0,'thalnos SAY_AGGRO'), -(-1189017,'No rest, for the angry dead.',5846,1,0,0,'thalnos SAY_HEALTH'), -(-1189018,'More... More souls.',5845,1,0,0,'thalnos SAY_KILL'), +(-1189016,'REUSE_ME',0,0,0,0,'REUSE_ME'), +(-1189017,'REUSE_ME',0,0,0,0,'REUSE_ME'), +(-1189018,'REUSE_ME',0,0,0,0,'REUSE_ME'), (-1189019,'You will not defile these mysteries!',5842,1,0,0,'doan SAY_AGGRO'), (-1189020,'Burn in righteous fire!',5843,1,0,0,'doan SAY_SPECIALAE'), -(-1189021,'Release the hounds!',5841,1,0,0,'loksey SAY_AGGRO'), +(-1189021,'REUSE_ME',0,0,0,0,'REUSE_ME'), (-1189022,'It is over, your search is done! Let fate choose now, the righteous one.',11961,1,0,0,'horseman SAY_ENTRANCE'), (-1189023,'Here\'s my body, fit and pure! Now, your blackened souls I\'ll cure!',12567,1,0,0,'horseman SAY_REJOINED'), diff --git a/sql/updates/r2674_mangos.sql b/sql/updates/r2674_mangos.sql new file mode 100644 index 000000000..7e75e6308 --- /dev/null +++ b/sql/updates/r2674_mangos.sql @@ -0,0 +1,51 @@ +UPDATE creature_template SET ScriptName='' WHERE entry=18338; +UPDATE creature_template SET ScriptName='' WHERE entry IN (8530,8531,8532); +UPDATE creature_template SET ScriptName='' WHERE entry=15085; +UPDATE creature_template SET ScriptName='' WHERE entry=15082; +UPDATE creature_template SET ScriptName='' WHERE entry=15114; +UPDATE creature_template SET ScriptName='' WHERE entry=14986; +UPDATE creature_template SET ScriptName='' WHERE entry=10440; +UPDATE creature_template SET ScriptName='' WHERE entry=10435; +UPDATE creature_template SET ScriptName='' WHERE entry=10437; +UPDATE creature_template SET ScriptName='' WHERE entry=11143; +UPDATE creature_template SET ScriptName='' WHERE entry=11136 +UPDATE creature_template SET ScriptName='' WHERE entry=10439; +UPDATE creature_template SET ScriptName='' WHERE entry=10808; +UPDATE creature_template SET ScriptName='' WHERE entry=11439; +UPDATE creature_template SET ScriptName='' WHERE entry=16118; +UPDATE creature_template SET ScriptName='' WHERE entry=14516; +UPDATE creature_template SET ScriptName='' WHERE entry=14693; +UPDATE creature_template SET ScriptName='' WHERE entry=3974; +UPDATE creature_template SET ScriptName='' WHERE entry=3983; +UPDATE creature_template SET ScriptName='' WHERE entry=4543; +UPDATE creature_template SET ScriptName='' WHERE entry=6490; +UPDATE creature_template SET ScriptName='' WHERE entry=4542; +UPDATE creature_template SET ScriptName='' WHERE entry=17167; +UPDATE creature_template SET ScriptName='' WHERE entry=19875; +UPDATE creature_template SET ScriptName='' WHERE entry=19874; +UPDATE creature_template SET ScriptName='' WHERE entry=19872; +UPDATE creature_template SET ScriptName='' WHERE entry=17007; +UPDATE creature_template SET ScriptName='' WHERE entry=19876; +UPDATE creature_template SET ScriptName='' WHERE entry=19873; +UPDATE creature_template SET ScriptName='' WHERE entry=24240; +UPDATE creature_template SET ScriptName='' WHERE entry=24241; +UPDATE creature_template SET ScriptName='' WHERE entry=24242; +UPDATE creature_template SET ScriptName='' WHERE entry=24243; +UPDATE creature_template SET ScriptName='' WHERE entry=24244; +UPDATE creature_template SET ScriptName='' WHERE entry=24245; +UPDATE creature_template SET ScriptName='' WHERE entry=24246; +UPDATE creature_template SET ScriptName='' WHERE entry=24247; +UPDATE creature_template SET ScriptName='' WHERE entry=10363; +UPDATE creature_template SET ScriptName='' WHERE entry=10220; +UPDATE creature_template SET ScriptName='' WHERE entry=9196; +UPDATE creature_template SET ScriptName='' WHERE entry=10596; +UPDATE creature_template SET ScriptName='' WHERE entry=9736; +UPDATE creature_template SET ScriptName='' WHERE entry=10429; +UPDATE creature_template SET ScriptName='' WHERE entry=9236; +UPDATE creature_template SET ScriptName='' WHERE entry=10430; +UPDATE creature_template SET ScriptName='' WHERE entry=9237; +UPDATE creature_template SET ScriptName='' WHERE entry=9031; +UPDATE creature_template SET ScriptName='' WHERE entry=9502; +UPDATE creature_template SET ScriptName='' WHERE entry=9027; +UPDATE creature_template SET ScriptName='' WHERE entry=9028; +UPDATE creature_template SET ScriptName='' WHERE entry=9938; diff --git a/sql/updates/r2674_scriptdev2.sql b/sql/updates/r2674_scriptdev2.sql new file mode 100644 index 000000000..5f457a20d --- /dev/null +++ b/sql/updates/r2674_scriptdev2.sql @@ -0,0 +1,14 @@ +DELETE FROM script_texts WHERE entry=-1189021; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1189021,'REUSE_ME',0,0,0,0,'REUSE_ME'); +DELETE FROM script_texts WHERE entry BETWEEN -1189014 AND -1189011; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1189011,'REUSE_ME',0,0,0,0,'REUSE_ME'), +(-1189012,'REUSE_ME',0,0,0,0,'REUSE_ME'), +(-1189013,'REUSE_ME',0,0,0,0,'REUSE_ME'), +(-1189014,'REUSE_ME',0,0,0,0,'REUSE_ME'); +DELETE FROM script_texts WHERE entry BETWEEN -1189018 AND -1189016; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1189016,'REUSE_ME',0,0,0,0,'REUSE_ME'), +(-1189017,'REUSE_ME',0,0,0,0,'REUSE_ME'), +(-1189018,'REUSE_ME',0,0,0,0,'REUSE_ME'); From be5183193422bf72c468dc7725d32fb442d91ed9 Mon Sep 17 00:00:00 2001 From: michalpolko Date: Sat, 18 Aug 2012 21:22:26 +0200 Subject: [PATCH 0664/1172] [2675] Implemented combat abilities for Festergut. Timers for Vile Gas and Gas Spore might need adjusting. Some spells require core support. Resetting visual gas aura after evading NYI. Some dummy npcs might require fixing in DB (targetable, visible etc.) --- .../icecrown_citadel/boss_festergut.cpp | 124 ++++++++++++++++++ sd2_revision_nr.h | 2 +- 2 files changed, 125 insertions(+), 1 deletion(-) diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_festergut.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_festergut.cpp index 82bd4e2c4..291c881cb 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_festergut.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_festergut.cpp @@ -24,6 +24,45 @@ EndScriptData */ #include "precompiled.h" #include "icecrown_citadel.h" + +enum +{ + SPELL_BERSERK = 47008, + + // Gastric Bloat + SPELL_GASTRIC_BLOAT = 72214, // proc aura, ~8 sec cooldown, cooldown for Creature requires implementation in core + + // Inhale Blight + SPELL_INHALE_BLIGHT = 69165, + SPELL_INHALED_BLIGHT_10 = 69166, + SPELL_INHALED_BLIGHT_25 = 71912, + + // Pungent Blight + SPELL_PUNGENT_BLIGHT = 69195, + + // Gaseous Blight + SPELL_GASEUS_BLIGHT_DUMMY = 69125, // gas is spread into the room on aggro + // periodic auras spells + SPELL_GASEOUS_BLIGHT_1 = 69157, + SPELL_GASEOUS_BLIGHT_2 = 69162, + SPELL_GASEOUS_BLIGHT_3 = 69164, + + // visual gas dummy auras + SPELL_GASEOUS_BLIGHT_DUMMY1 = 69126, + SPELL_GASEOUS_BLIGHT_DUMMY2 = 69152, + SPELL_GASEOUS_BLIGHT_DUMMY3 = 69154, + + // Inoculent + SPELL_REMOVE_INOCULENT = 69298, + + // Gas Spore + SPELL_GAS_SPORE = 69278, + + // Vile Gas + SPELL_VILE_GAS_SUMMON = 72288, + SPELL_VILE_GAS = 71307 +}; + enum { SAY_AGGRO = -1631082, @@ -48,13 +87,28 @@ struct MANGOS_DLL_DECL boss_festergutAI : public ScriptedAI instance_icecrown_citadel *m_pInstance; + uint32 m_uiBerserkTimer; + uint32 m_uiGastricBloatTimer; + uint32 m_uiInhaleBlightTimer; + uint32 m_uiGasSporeTimer; + uint32 m_uiVileGasTimer; + void Reset() { + m_uiBerserkTimer = 5 * MINUTE * IN_MILLISECONDS; + m_uiGastricBloatTimer = 10000; + m_uiInhaleBlightTimer = 30000; + m_uiGasSporeTimer = 20000; + m_uiVileGasTimer = 10000; } void Aggro(Unit *pWho) { DoScriptText(SAY_AGGRO, m_creature); + + DoCastSpellIfCan(m_creature, SPELL_GASTRIC_BLOAT, CAST_TRIGGERED); // not working as intended currently + DoCastSpellIfCan(m_creature, SPELL_GASEOUS_BLIGHT_1, CAST_TRIGGERED); // DoT aura + DoCastSpellIfCan(m_creature, SPELL_GASEUS_BLIGHT_DUMMY, CAST_TRIGGERED); // visual cast on dummy npc if (m_pInstance) m_pInstance->SetData(TYPE_FESTERGUT, IN_PROGRESS); @@ -69,6 +123,8 @@ struct MANGOS_DLL_DECL boss_festergutAI : public ScriptedAI { if (m_pInstance) m_pInstance->SetData(TYPE_FESTERGUT, FAIL); + + DoCastSpellIfCan(m_creature, SPELL_REMOVE_INOCULENT, CAST_TRIGGERED); } void JustDied(Unit *pKiller) @@ -77,6 +133,7 @@ struct MANGOS_DLL_DECL boss_festergutAI : public ScriptedAI m_pInstance->SetData(TYPE_FESTERGUT, DONE); DoScriptText(SAY_DEATH, m_creature); + DoCastSpellIfCan(m_creature, SPELL_REMOVE_INOCULENT, CAST_TRIGGERED); } void UpdateAI(const uint32 uiDiff) @@ -84,6 +141,73 @@ struct MANGOS_DLL_DECL boss_festergutAI : public ScriptedAI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; + // Berserk + if (m_uiBerserkTimer <= uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_BERSERK) == CAST_OK) + { + DoScriptText(SAY_BERSERK, m_creature); + m_uiBerserkTimer = 5 * MINUTE * IN_MILLISECONDS; + } + } + else + m_uiBerserkTimer -= uiDiff; + + // Inhale Blight and Pungent Blight + if (m_uiInhaleBlightTimer <= uiDiff) + { + SpellAuraHolder* holder = m_creature->GetSpellAuraHolder(SPELL_INHALED_BLIGHT_10); + + if (!holder) + holder = m_creature->GetSpellAuraHolder(SPELL_INHALED_BLIGHT_25); + + // inhale the gas or if already have 3 stacks - release it + if (holder && holder->GetStackAmount() >= 3) + { + if (DoCastSpellIfCan(m_creature, SPELL_PUNGENT_BLIGHT) == CAST_OK) + { + DoScriptText(SAY_PUNGUENT_BLIGHT_EMOTE, m_creature); + DoScriptText(SAY_PUNGUENT_BLIGHT, m_creature); + m_uiInhaleBlightTimer = 35000; + } + } + else if (DoCastSpellIfCan(m_creature, SPELL_INHALE_BLIGHT) == CAST_OK) + { + if (m_pInstance) + { + if (Creature *pProfessor = m_pInstance->GetSingleCreatureFromStorage(NPC_PROFESSOR_PUTRICIDE)) + DoScriptText(SAY_BLIGHT, pProfessor); + } + m_uiInhaleBlightTimer = 30000; + } + } + else + m_uiInhaleBlightTimer -= uiDiff; + + // Gas Spore + if (m_uiGasSporeTimer <= uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_GAS_SPORE) == CAST_OK) + { + DoScriptText(SAY_SPORE, m_creature); + m_uiGasSporeTimer = 40000; + } + } + else + m_uiGasSporeTimer -= uiDiff; + + // Vile Gas + if (m_uiVileGasTimer <= uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_VILE_GAS_SUMMON, CAST_TRIGGERED) == CAST_OK) + { + if (DoCastSpellIfCan(m_creature, SPELL_VILE_GAS) == CAST_OK) + m_uiVileGasTimer = 30000; + } + } + else + m_uiVileGasTimer -= uiDiff; + DoMeleeAttackIfReady(); } }; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index a92de2d35..96289f2eb 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2674" + #define SD2_REVISION_NR "2675" #endif // __SD2_REVISION_NR_H__ From 5fed1b541cb2d5ef98193b7676a4a78e83390bd6 Mon Sep 17 00:00:00 2001 From: michalpolko Date: Sat, 18 Aug 2012 21:29:02 +0200 Subject: [PATCH 0665/1172] [2676] Implemented reacting on damage taken for Dark Nucleus in Blood Prince Council encounter. --- .../icecrown_citadel/blood_prince_council.cpp | 10 ++++++++++ .../icecrown_citadel/boss_festergut.cpp | 2 +- .../icecrown_citadel/boss_sindragosa.cpp | 2 +- sd2_revision_nr.h | 2 +- 4 files changed, 13 insertions(+), 3 deletions(-) diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/blood_prince_council.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/blood_prince_council.cpp index a350f59dd..8ac157f0a 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/blood_prince_council.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/blood_prince_council.cpp @@ -347,6 +347,16 @@ struct MANGOS_DLL_DECL npc_dark_nucleusAI : public ScriptedAI } } + void DamageTaken(Unit *pDealer, uint32 &uiDamage) + { + if (m_creature->getVictim() && pDealer != m_creature->getVictim()) + { + DoResetThreat(); + m_creature->AddThreat(pDealer, 100000.0f); + m_creature->InterruptNonMeleeSpells(true); + } + } + void UpdateAI(const uint32 uiDiff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_festergut.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_festergut.cpp index 291c881cb..be103e3f8 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_festergut.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_festergut.cpp @@ -16,7 +16,7 @@ /* ScriptData SDName: boss_festergut -SD%Complete: 10% +SD%Complete: 90% SDComment: SDCategory: Icecrown Citadel EndScriptData */ diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp index f77e98370..c556f0330 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp @@ -16,7 +16,7 @@ /* ScriptData SDName: boss_sindragosa -SD%Complete: 50% +SD%Complete: 80% SDComment: requires core support for ice blocks (spells and GO in LoS checking) SDCategory: Icecrown Citadel EndScriptData */ diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 96289f2eb..23c1a6d85 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2675" + #define SD2_REVISION_NR "2676" #endif // __SD2_REVISION_NR_H__ From 91cd92342f5bb588360a7bf7e546e1903c871abd Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sat, 18 Aug 2012 22:59:35 +0300 Subject: [PATCH 0666/1172] [2677] EventAI cleanup Part IV - Drop all the useless placeholders. Cleanup is finished! --- VC100/100ScriptDev2.vcxproj | 41 ----- VC100/100ScriptDev2.vcxproj.filters | 123 ------------- VC80/80ScriptDev2.vcproj | 164 ------------------ VC90/90ScriptDev2.vcproj | 164 ------------------ .../eastern_kingdoms/alterac_mountains.cpp | 5 +- .../blackrock_depths/boss_anubshiah.cpp | 28 --- .../boss_gorosh_the_dervish.cpp | 28 --- .../blackrock_depths/boss_grizzle.cpp | 28 --- .../blackrock_depths/boss_magmus.cpp | 28 --- .../blackrock_depths/boss_tomb_of_seven.cpp | 28 --- .../blackrock_spire/boss_drakkisath.cpp | 28 --- .../blackrock_spire/boss_halycon.cpp | 28 --- .../blackrock_spire/boss_highlord_omokk.cpp | 28 --- .../boss_mother_smolderweb.cpp | 28 --- .../boss_quartermaster_zigris.cpp | 28 --- .../blackrock_spire/boss_rend_blackhand.cpp | 28 --- .../boss_shadow_hunter_voshgajin.cpp | 28 --- .../blackrock_spire/boss_the_beast.cpp | 28 --- .../blackrock_spire/boss_warmaster_voone.cpp | 28 --- scripts/eastern_kingdoms/boss_kruul.cpp | 28 --- .../boss_azshir_the_sleepless.cpp | 28 --- .../boss_bloodmage_thalnos.cpp | 28 --- .../boss_high_inquisitor_fairbanks.cpp | 28 --- .../boss_houndmaster_loksey.cpp | 28 --- .../boss_interrogator_vishas.cpp | 28 --- .../scarlet_monastery/boss_scorn.cpp | 28 --- .../boss_death_knight_darkreaver.cpp | 28 --- .../scholomance/boss_kormok.cpp | 28 --- .../stratholme/boss_baron_rivendare.cpp | 28 --- .../stratholme/boss_magistrate_barthilas.cpp | 28 --- .../stratholme/boss_nerubenkan.cpp | 28 --- .../stratholme/boss_postmaster_malown.cpp | 28 --- .../stratholme/boss_ramstein_the_gorger.cpp | 28 --- .../stratholme/boss_timmy_the_cruel.cpp | 28 --- .../zulgurub/boss_gahzranka.cpp | 28 --- .../eastern_kingdoms/zulgurub/boss_grilek.cpp | 28 --- .../zulgurub/boss_wushoolay.cpp | 28 --- .../old_hillsbrad/boss_captain_skarloc.cpp | 28 --- .../old_hillsbrad/boss_epoch_hunter.cpp | 28 --- .../old_hillsbrad/boss_leutenant_drake.cpp | 28 --- .../maraudon/boss_celebras_the_cursed.cpp | 28 --- scripts/kalimdor/maraudon/boss_landslide.cpp | 28 --- .../maraudon/boss_princess_theradras.cpp | 28 --- .../boss_amnennar_the_coldbringer.cpp | 28 --- .../outland/tempest_keep/the_eye/the_eye.cpp | 31 ---- .../boss_gatewatcher_ironhand.cpp | 28 --- sd2_revision_nr.h | 2 +- sql/updates/r2674_mangos.sql | 2 +- system/ScriptLoader.cpp | 110 ++---------- 49 files changed, 18 insertions(+), 1744 deletions(-) delete mode 100644 scripts/eastern_kingdoms/blackrock_depths/boss_anubshiah.cpp delete mode 100644 scripts/eastern_kingdoms/blackrock_depths/boss_gorosh_the_dervish.cpp delete mode 100644 scripts/eastern_kingdoms/blackrock_depths/boss_grizzle.cpp delete mode 100644 scripts/eastern_kingdoms/blackrock_depths/boss_magmus.cpp delete mode 100644 scripts/eastern_kingdoms/blackrock_depths/boss_tomb_of_seven.cpp delete mode 100644 scripts/eastern_kingdoms/blackrock_spire/boss_drakkisath.cpp delete mode 100644 scripts/eastern_kingdoms/blackrock_spire/boss_halycon.cpp delete mode 100644 scripts/eastern_kingdoms/blackrock_spire/boss_highlord_omokk.cpp delete mode 100644 scripts/eastern_kingdoms/blackrock_spire/boss_mother_smolderweb.cpp delete mode 100644 scripts/eastern_kingdoms/blackrock_spire/boss_quartermaster_zigris.cpp delete mode 100644 scripts/eastern_kingdoms/blackrock_spire/boss_rend_blackhand.cpp delete mode 100644 scripts/eastern_kingdoms/blackrock_spire/boss_shadow_hunter_voshgajin.cpp delete mode 100644 scripts/eastern_kingdoms/blackrock_spire/boss_the_beast.cpp delete mode 100644 scripts/eastern_kingdoms/blackrock_spire/boss_warmaster_voone.cpp delete mode 100644 scripts/eastern_kingdoms/boss_kruul.cpp delete mode 100644 scripts/eastern_kingdoms/scarlet_monastery/boss_azshir_the_sleepless.cpp delete mode 100644 scripts/eastern_kingdoms/scarlet_monastery/boss_bloodmage_thalnos.cpp delete mode 100644 scripts/eastern_kingdoms/scarlet_monastery/boss_high_inquisitor_fairbanks.cpp delete mode 100644 scripts/eastern_kingdoms/scarlet_monastery/boss_houndmaster_loksey.cpp delete mode 100644 scripts/eastern_kingdoms/scarlet_monastery/boss_interrogator_vishas.cpp delete mode 100644 scripts/eastern_kingdoms/scarlet_monastery/boss_scorn.cpp delete mode 100644 scripts/eastern_kingdoms/scholomance/boss_death_knight_darkreaver.cpp delete mode 100644 scripts/eastern_kingdoms/scholomance/boss_kormok.cpp delete mode 100644 scripts/eastern_kingdoms/stratholme/boss_baron_rivendare.cpp delete mode 100644 scripts/eastern_kingdoms/stratholme/boss_magistrate_barthilas.cpp delete mode 100644 scripts/eastern_kingdoms/stratholme/boss_nerubenkan.cpp delete mode 100644 scripts/eastern_kingdoms/stratholme/boss_postmaster_malown.cpp delete mode 100644 scripts/eastern_kingdoms/stratholme/boss_ramstein_the_gorger.cpp delete mode 100644 scripts/eastern_kingdoms/stratholme/boss_timmy_the_cruel.cpp delete mode 100644 scripts/eastern_kingdoms/zulgurub/boss_gahzranka.cpp delete mode 100644 scripts/eastern_kingdoms/zulgurub/boss_grilek.cpp delete mode 100644 scripts/eastern_kingdoms/zulgurub/boss_wushoolay.cpp delete mode 100644 scripts/kalimdor/caverns_of_time/old_hillsbrad/boss_captain_skarloc.cpp delete mode 100644 scripts/kalimdor/caverns_of_time/old_hillsbrad/boss_epoch_hunter.cpp delete mode 100644 scripts/kalimdor/caverns_of_time/old_hillsbrad/boss_leutenant_drake.cpp delete mode 100644 scripts/kalimdor/maraudon/boss_celebras_the_cursed.cpp delete mode 100644 scripts/kalimdor/maraudon/boss_landslide.cpp delete mode 100644 scripts/kalimdor/maraudon/boss_princess_theradras.cpp delete mode 100644 scripts/kalimdor/razorfen_downs/boss_amnennar_the_coldbringer.cpp delete mode 100644 scripts/outland/tempest_keep/the_eye/the_eye.cpp delete mode 100644 scripts/outland/tempest_keep/the_mechanar/boss_gatewatcher_ironhand.cpp diff --git a/VC100/100ScriptDev2.vcxproj b/VC100/100ScriptDev2.vcxproj index 1f79a12ad..4b86f9738 100644 --- a/VC100/100ScriptDev2.vcxproj +++ b/VC100/100ScriptDev2.vcxproj @@ -218,7 +218,6 @@ - @@ -243,28 +242,14 @@ - - - - - - - - - - - - - - @@ -315,36 +300,22 @@ - - - - - - - - - - - - - - @@ -368,8 +339,6 @@ - - @@ -379,7 +348,6 @@ - @@ -420,20 +388,13 @@ - - - - - - - @@ -680,8 +641,6 @@ - - diff --git a/VC100/100ScriptDev2.vcxproj.filters b/VC100/100ScriptDev2.vcxproj.filters index 67909d021..3552520ec 100644 --- a/VC100/100ScriptDev2.vcxproj.filters +++ b/VC100/100ScriptDev2.vcxproj.filters @@ -324,9 +324,6 @@ scripts\eastern_kingdoms - - scripts\eastern_kingdoms - scripts\eastern_kingdoms @@ -399,9 +396,6 @@ scripts\eastern_kingdoms\blackrock_depths - - scripts\eastern_kingdoms\blackrock_depths - scripts\eastern_kingdoms\blackrock_depths @@ -411,60 +405,21 @@ scripts\eastern_kingdoms\blackrock_depths - - scripts\eastern_kingdoms\blackrock_depths - - - scripts\eastern_kingdoms\blackrock_depths - scripts\eastern_kingdoms\blackrock_depths - - scripts\eastern_kingdoms\blackrock_depths - - - scripts\eastern_kingdoms\blackrock_depths - scripts\eastern_kingdoms\blackrock_depths - - scripts\eastern_kingdoms\blackrock_spire - scripts\eastern_kingdoms\blackrock_spire - - scripts\eastern_kingdoms\blackrock_spire - - - scripts\eastern_kingdoms\blackrock_spire - - - scripts\eastern_kingdoms\blackrock_spire - scripts\eastern_kingdoms\blackrock_spire scripts\eastern_kingdoms\blackrock_spire - - scripts\eastern_kingdoms\blackrock_spire - - - scripts\eastern_kingdoms\blackrock_spire - - - scripts\eastern_kingdoms\blackrock_spire - - - scripts\eastern_kingdoms\blackrock_spire - - - scripts\eastern_kingdoms\blackrock_spire - scripts\eastern_kingdoms\blackrock_spire @@ -615,48 +570,24 @@ scripts\eastern_kingdoms\scarlet_monastery - - scripts\eastern_kingdoms\scarlet_monastery - - - scripts\eastern_kingdoms\scarlet_monastery - scripts\eastern_kingdoms\scarlet_monastery scripts\eastern_kingdoms\scarlet_monastery - - scripts\eastern_kingdoms\scarlet_monastery - - - scripts\eastern_kingdoms\scarlet_monastery - - - scripts\eastern_kingdoms\scarlet_monastery - scripts\eastern_kingdoms\scarlet_monastery - - scripts\eastern_kingdoms\scarlet_monastery - scripts\eastern_kingdoms\scarlet_monastery scripts\eastern_kingdoms\scholomance - - scripts\eastern_kingdoms\scholomance - scripts\eastern_kingdoms\scholomance - - scripts\eastern_kingdoms\scholomance - scripts\eastern_kingdoms\scholomance @@ -672,9 +603,6 @@ scripts\eastern_kingdoms\shadowfang_keep - - scripts\eastern_kingdoms\stratholme - scripts\eastern_kingdoms\stratholme @@ -684,27 +612,12 @@ scripts\eastern_kingdoms\stratholme - - scripts\eastern_kingdoms\stratholme - scripts\eastern_kingdoms\stratholme - - scripts\eastern_kingdoms\stratholme - scripts\eastern_kingdoms\stratholme - - scripts\eastern_kingdoms\stratholme - - - scripts\eastern_kingdoms\stratholme - - - scripts\eastern_kingdoms\stratholme - scripts\eastern_kingdoms\stratholme @@ -774,12 +687,6 @@ scripts\eastern_kingdoms\zulgurub - - scripts\eastern_kingdoms\zulgurub - - - scripts\eastern_kingdoms\zulgurub - scripts\eastern_kingdoms\zulgurub @@ -807,9 +714,6 @@ scripts\eastern_kingdoms\zulgurub - - scripts\eastern_kingdoms\zulgurub - scripts\eastern_kingdoms\zulgurub @@ -930,15 +834,6 @@ scripts\kalimdor\caverns_of_time\hyjal - - scripts\kalimdor\caverns_of_time\old_hillsbrad - - - scripts\kalimdor\caverns_of_time\old_hillsbrad - - - scripts\kalimdor\caverns_of_time\old_hillsbrad - scripts\kalimdor\caverns_of_time\old_hillsbrad @@ -951,27 +846,15 @@ scripts\kalimdor\dire_maul - - scripts\kalimdor\maraudon - - - scripts\kalimdor\maraudon - scripts\kalimdor\maraudon - - scripts\kalimdor\maraudon - scripts\kalimdor\onyxias_lair scripts\kalimdor\onyxias_lair - - scripts\kalimdor\razorfen_downs - scripts\kalimdor\razorfen_downs @@ -1695,12 +1578,6 @@ scripts\outland\tempest_keep\the_eye - - scripts\outland\tempest_keep\the_eye - - - scripts\outland\tempest_keep\the_mechanar - scripts\outland\tempest_keep\the_mechanar diff --git a/VC80/80ScriptDev2.vcproj b/VC80/80ScriptDev2.vcproj index 1f4214a30..0138bdcfd 100644 --- a/VC80/80ScriptDev2.vcproj +++ b/VC80/80ScriptDev2.vcproj @@ -420,10 +420,6 @@ RelativePath="..\scripts\eastern_kingdoms\blasted_lands.cpp" > - - @@ -527,10 +523,6 @@ RelativePath="..\scripts\eastern_kingdoms\blackrock_depths\boss_ambassador_flamelash.cpp" > - - @@ -543,26 +535,10 @@ RelativePath="..\scripts\eastern_kingdoms\blackrock_depths\boss_general_angerforge.cpp" > - - - - - - - - @@ -571,26 +547,10 @@ - - - - - - - - @@ -599,26 +559,6 @@ RelativePath="..\scripts\eastern_kingdoms\blackrock_spire\boss_pyroguard_emberseer.cpp" > - - - - - - - - - - @@ -879,38 +819,14 @@ RelativePath="..\scripts\eastern_kingdoms\scarlet_monastery\boss_arcanist_doan.cpp" > - - - - - - - - - - - - @@ -931,18 +847,10 @@ RelativePath="..\scripts\eastern_kingdoms\scholomance\boss_darkmaster_gandling.cpp" > - - - - @@ -983,10 +891,6 @@ - - @@ -999,34 +903,14 @@ RelativePath="..\scripts\eastern_kingdoms\stratholme\boss_dathrohan_balnazzar.cpp" > - - - - - - - - - - @@ -1159,14 +1043,6 @@ RelativePath="..\scripts\eastern_kingdoms\zulgurub\boss_arlokk.cpp" > - - - - @@ -1203,10 +1079,6 @@ RelativePath="..\scripts\eastern_kingdoms\zulgurub\boss_venoxis.cpp" > - - @@ -1422,18 +1294,6 @@ - - - - - - @@ -1467,22 +1327,10 @@ - - - - - - - - @@ -2883,10 +2727,6 @@ RelativePath="..\scripts\outland\tempest_keep\the_eye\instance_the_eye.cpp" > - - @@ -2895,10 +2735,6 @@ - - diff --git a/VC90/90ScriptDev2.vcproj b/VC90/90ScriptDev2.vcproj index 6e64fd847..4a2e7c796 100644 --- a/VC90/90ScriptDev2.vcproj +++ b/VC90/90ScriptDev2.vcproj @@ -419,10 +419,6 @@ RelativePath="..\scripts\eastern_kingdoms\blasted_lands.cpp" > - - @@ -526,10 +522,6 @@ RelativePath="..\scripts\eastern_kingdoms\blackrock_depths\boss_ambassador_flamelash.cpp" > - - @@ -542,26 +534,10 @@ RelativePath="..\scripts\eastern_kingdoms\blackrock_depths\boss_general_angerforge.cpp" > - - - - - - - - @@ -574,26 +550,10 @@ RelativePath="..\scripts\eastern_kingdoms\blackrock_spire\blackrock_spire.h" > - - - - - - - - @@ -602,26 +562,6 @@ RelativePath="..\scripts\eastern_kingdoms\blackrock_spire\boss_pyroguard_emberseer.cpp" > - - - - - - - - - - @@ -878,14 +818,6 @@ RelativePath="..\scripts\eastern_kingdoms\scarlet_monastery\boss_arcanist_doan.cpp" > - - - - @@ -894,26 +826,10 @@ RelativePath="..\scripts\eastern_kingdoms\scarlet_monastery\boss_herod.cpp" > - - - - - - - - @@ -930,18 +846,10 @@ RelativePath="..\scripts\eastern_kingdoms\scholomance\boss_darkmaster_gandling.cpp" > - - - - @@ -982,10 +890,6 @@ - - @@ -998,34 +902,14 @@ RelativePath="..\scripts\eastern_kingdoms\stratholme\boss_dathrohan_balnazzar.cpp" > - - - - - - - - - - @@ -1158,14 +1042,6 @@ RelativePath="..\scripts\eastern_kingdoms\zulgurub\boss_arlokk.cpp" > - - - - @@ -1202,10 +1078,6 @@ RelativePath="..\scripts\eastern_kingdoms\zulgurub\boss_venoxis.cpp" > - - @@ -1421,18 +1293,6 @@ - - - - - - @@ -1466,22 +1326,10 @@ - - - - - - - - @@ -2881,10 +2725,6 @@ RelativePath="..\scripts\outland\tempest_keep\the_eye\instance_the_eye.cpp" > - - @@ -2893,10 +2733,6 @@ - - diff --git a/scripts/eastern_kingdoms/alterac_mountains.cpp b/scripts/eastern_kingdoms/alterac_mountains.cpp index d2f182b11..7fa90cea5 100644 --- a/scripts/eastern_kingdoms/alterac_mountains.cpp +++ b/scripts/eastern_kingdoms/alterac_mountains.cpp @@ -26,7 +26,6 @@ EndContentData */ #include "precompiled.h" -/*void AddSC_alterac_mountains() +void AddSC_alterac_mountains() { - Script* pNewScript; -}*/ +} diff --git a/scripts/eastern_kingdoms/blackrock_depths/boss_anubshiah.cpp b/scripts/eastern_kingdoms/blackrock_depths/boss_anubshiah.cpp deleted file mode 100644 index 1eafe2d0c..000000000 --- a/scripts/eastern_kingdoms/blackrock_depths/boss_anubshiah.cpp +++ /dev/null @@ -1,28 +0,0 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 - * 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_Anubshiah -SD%Complete: 0 -SDComment: Placeholder -SDCategory: Blackrock Depths -EndScriptData */ - -#include "precompiled.h" - -void AddSC_boss_anubshiah() -{ -} diff --git a/scripts/eastern_kingdoms/blackrock_depths/boss_gorosh_the_dervish.cpp b/scripts/eastern_kingdoms/blackrock_depths/boss_gorosh_the_dervish.cpp deleted file mode 100644 index 4f14910e7..000000000 --- a/scripts/eastern_kingdoms/blackrock_depths/boss_gorosh_the_dervish.cpp +++ /dev/null @@ -1,28 +0,0 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 - * 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_Gorosh_the_Dervish -SD%Complete: 0 -SDComment: Placeholder -SDCategory: Blackrock Depths -EndScriptData */ - -#include "precompiled.h" - -void AddSC_boss_gorosh_the_dervish() -{ -} diff --git a/scripts/eastern_kingdoms/blackrock_depths/boss_grizzle.cpp b/scripts/eastern_kingdoms/blackrock_depths/boss_grizzle.cpp deleted file mode 100644 index 5045d6d4b..000000000 --- a/scripts/eastern_kingdoms/blackrock_depths/boss_grizzle.cpp +++ /dev/null @@ -1,28 +0,0 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 - * 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_Grizzle -SD%Complete: 0 -SDComment: Placeholder -SDCategory: Blackrock Depths -EndScriptData */ - -#include "precompiled.h" - -void AddSC_boss_grizzle() -{ -} diff --git a/scripts/eastern_kingdoms/blackrock_depths/boss_magmus.cpp b/scripts/eastern_kingdoms/blackrock_depths/boss_magmus.cpp deleted file mode 100644 index b590f4fe3..000000000 --- a/scripts/eastern_kingdoms/blackrock_depths/boss_magmus.cpp +++ /dev/null @@ -1,28 +0,0 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 - * 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_Magmus -SD%Complete: 0 -SDComment: Placeholder -SDCategory: Blackrock Depths -EndScriptData */ - -#include "precompiled.h" - -void AddSC_boss_magmus() -{ -} diff --git a/scripts/eastern_kingdoms/blackrock_depths/boss_tomb_of_seven.cpp b/scripts/eastern_kingdoms/blackrock_depths/boss_tomb_of_seven.cpp deleted file mode 100644 index 75f37a5de..000000000 --- a/scripts/eastern_kingdoms/blackrock_depths/boss_tomb_of_seven.cpp +++ /dev/null @@ -1,28 +0,0 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 - * 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_Tomb_Of_Seven -SD%Complete: 0 -SDComment: Placeholder -SDCategory: Blackrock Depths -EndScriptData */ - -#include "precompiled.h" - -void AddSC_boss_tomb_of_seven() -{ -} diff --git a/scripts/eastern_kingdoms/blackrock_spire/boss_drakkisath.cpp b/scripts/eastern_kingdoms/blackrock_spire/boss_drakkisath.cpp deleted file mode 100644 index ea00a4af6..000000000 --- a/scripts/eastern_kingdoms/blackrock_spire/boss_drakkisath.cpp +++ /dev/null @@ -1,28 +0,0 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 - * 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_Drakkisath -SD%Complete: 0 -SDComment: Placeholder -SDCategory: Blackrock Spire -EndScriptData */ - -#include "precompiled.h" - -void AddSC_boss_drakkisath() -{ -} diff --git a/scripts/eastern_kingdoms/blackrock_spire/boss_halycon.cpp b/scripts/eastern_kingdoms/blackrock_spire/boss_halycon.cpp deleted file mode 100644 index c539a2b2f..000000000 --- a/scripts/eastern_kingdoms/blackrock_spire/boss_halycon.cpp +++ /dev/null @@ -1,28 +0,0 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 - * 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_Halycon -SD%Complete: 0 -SDComment: Placeholder -SDCategory: Blackrock Spire -EndScriptData */ - -#include "precompiled.h" - -void AddSC_boss_halycon() -{ -} diff --git a/scripts/eastern_kingdoms/blackrock_spire/boss_highlord_omokk.cpp b/scripts/eastern_kingdoms/blackrock_spire/boss_highlord_omokk.cpp deleted file mode 100644 index 48894c963..000000000 --- a/scripts/eastern_kingdoms/blackrock_spire/boss_highlord_omokk.cpp +++ /dev/null @@ -1,28 +0,0 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 - * 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_Highlord_Omokk -SD%Complete: 0 -SDComment: Placeholder. -SDCategory: Blackrock Spire -EndScriptData */ - -#include "precompiled.h" - -void AddSC_boss_highlordomokk() -{ -} diff --git a/scripts/eastern_kingdoms/blackrock_spire/boss_mother_smolderweb.cpp b/scripts/eastern_kingdoms/blackrock_spire/boss_mother_smolderweb.cpp deleted file mode 100644 index 0b756a87f..000000000 --- a/scripts/eastern_kingdoms/blackrock_spire/boss_mother_smolderweb.cpp +++ /dev/null @@ -1,28 +0,0 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 - * 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_Mother_Smolderweb -SD%Complete: 0 -SDComment: Placeholder. -SDCategory: Blackrock Spire -EndScriptData */ - -#include "precompiled.h" - -void AddSC_boss_mothersmolderweb() -{ -} diff --git a/scripts/eastern_kingdoms/blackrock_spire/boss_quartermaster_zigris.cpp b/scripts/eastern_kingdoms/blackrock_spire/boss_quartermaster_zigris.cpp deleted file mode 100644 index 7893f773e..000000000 --- a/scripts/eastern_kingdoms/blackrock_spire/boss_quartermaster_zigris.cpp +++ /dev/null @@ -1,28 +0,0 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 - * 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_Quartmaster_Zigris -SD%Complete: 0 -SDComment: Placeholder -SDCategory: Blackrock Spire -EndScriptData */ - -#include "precompiled.h" - -void AddSC_boss_quatermasterzigris() -{ -} diff --git a/scripts/eastern_kingdoms/blackrock_spire/boss_rend_blackhand.cpp b/scripts/eastern_kingdoms/blackrock_spire/boss_rend_blackhand.cpp deleted file mode 100644 index a5624c313..000000000 --- a/scripts/eastern_kingdoms/blackrock_spire/boss_rend_blackhand.cpp +++ /dev/null @@ -1,28 +0,0 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 - * 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_Rend_Blackhand -SD%Complete: 0 -SDComment: Placeholder -SDCategory: Blackrock Spire -EndScriptData */ - -#include "precompiled.h" - -void AddSC_boss_rend_blackhand() -{ -} diff --git a/scripts/eastern_kingdoms/blackrock_spire/boss_shadow_hunter_voshgajin.cpp b/scripts/eastern_kingdoms/blackrock_spire/boss_shadow_hunter_voshgajin.cpp deleted file mode 100644 index a3cbee71e..000000000 --- a/scripts/eastern_kingdoms/blackrock_spire/boss_shadow_hunter_voshgajin.cpp +++ /dev/null @@ -1,28 +0,0 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 - * 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_Shadow_Hunter_Voshgajin -SD%Complete: 0 -SDComment: Placeholder -SDCategory: Blackrock Spire -EndScriptData */ - -#include "precompiled.h" - -void AddSC_boss_shadowvosh() -{ -} diff --git a/scripts/eastern_kingdoms/blackrock_spire/boss_the_beast.cpp b/scripts/eastern_kingdoms/blackrock_spire/boss_the_beast.cpp deleted file mode 100644 index 408ff60d4..000000000 --- a/scripts/eastern_kingdoms/blackrock_spire/boss_the_beast.cpp +++ /dev/null @@ -1,28 +0,0 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 - * 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_The_Best -SD%Complete: 0 -SDComment: Placeholder -SDCategory: Blackrock Spire -EndScriptData */ - -#include "precompiled.h" - -void AddSC_boss_thebeast() -{ -} diff --git a/scripts/eastern_kingdoms/blackrock_spire/boss_warmaster_voone.cpp b/scripts/eastern_kingdoms/blackrock_spire/boss_warmaster_voone.cpp deleted file mode 100644 index 7cc984b96..000000000 --- a/scripts/eastern_kingdoms/blackrock_spire/boss_warmaster_voone.cpp +++ /dev/null @@ -1,28 +0,0 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 - * 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_Warmaster_Voone -SD%Complete: 0 -SDComment: Placeholder -SDCategory: Blackrock Spire -EndScriptData */ - -#include "precompiled.h" - -void AddSC_boss_warmastervoone() -{ -} diff --git a/scripts/eastern_kingdoms/boss_kruul.cpp b/scripts/eastern_kingdoms/boss_kruul.cpp deleted file mode 100644 index 90a5ec585..000000000 --- a/scripts/eastern_kingdoms/boss_kruul.cpp +++ /dev/null @@ -1,28 +0,0 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 - * 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_Kruul -SD%Complete: 0 -SDComment: Placeholder -SDCategory: Bosses -EndScriptData */ - -#include "precompiled.h" - -void AddSC_boss_kruul() -{ -} diff --git a/scripts/eastern_kingdoms/scarlet_monastery/boss_azshir_the_sleepless.cpp b/scripts/eastern_kingdoms/scarlet_monastery/boss_azshir_the_sleepless.cpp deleted file mode 100644 index 97f7a278d..000000000 --- a/scripts/eastern_kingdoms/scarlet_monastery/boss_azshir_the_sleepless.cpp +++ /dev/null @@ -1,28 +0,0 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 - * 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_Azshir_the_Sleepless -SD%Complete: 0 -SDComment: Placeholder -SDCategory: Scarlet Monastery -EndScriptData */ - -#include "precompiled.h" - -void AddSC_boss_azshir_the_sleepless() -{ -} diff --git a/scripts/eastern_kingdoms/scarlet_monastery/boss_bloodmage_thalnos.cpp b/scripts/eastern_kingdoms/scarlet_monastery/boss_bloodmage_thalnos.cpp deleted file mode 100644 index c1ad6c97d..000000000 --- a/scripts/eastern_kingdoms/scarlet_monastery/boss_bloodmage_thalnos.cpp +++ /dev/null @@ -1,28 +0,0 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 - * 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_Bloodmage_Thalnos -SD%Complete: 0 -SDComment: Placeholder -SDCategory: Scarlet Monastery -EndScriptData */ - -#include "precompiled.h" - -void AddSC_boss_bloodmage_thalnos() -{ -} diff --git a/scripts/eastern_kingdoms/scarlet_monastery/boss_high_inquisitor_fairbanks.cpp b/scripts/eastern_kingdoms/scarlet_monastery/boss_high_inquisitor_fairbanks.cpp deleted file mode 100644 index 1934830a0..000000000 --- a/scripts/eastern_kingdoms/scarlet_monastery/boss_high_inquisitor_fairbanks.cpp +++ /dev/null @@ -1,28 +0,0 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 - * 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_High_Inquisitor_Fairbanks -SD%Complete: 0 -SDComment: Placeholder -SDCategory: Scarlet Monastery -EndScriptData */ - -#include "precompiled.h" - -void AddSC_boss_high_inquisitor_fairbanks() -{ -} diff --git a/scripts/eastern_kingdoms/scarlet_monastery/boss_houndmaster_loksey.cpp b/scripts/eastern_kingdoms/scarlet_monastery/boss_houndmaster_loksey.cpp deleted file mode 100644 index 0cfcde61f..000000000 --- a/scripts/eastern_kingdoms/scarlet_monastery/boss_houndmaster_loksey.cpp +++ /dev/null @@ -1,28 +0,0 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 - * 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_Houndmaster_Loksey -SD%Complete: 0 -SDComment: Placeholder -SDCategory: Scarlet Monastery -EndScriptData */ - -#include "precompiled.h" - -void AddSC_boss_houndmaster_loksey() -{ -} diff --git a/scripts/eastern_kingdoms/scarlet_monastery/boss_interrogator_vishas.cpp b/scripts/eastern_kingdoms/scarlet_monastery/boss_interrogator_vishas.cpp deleted file mode 100644 index 51e13f096..000000000 --- a/scripts/eastern_kingdoms/scarlet_monastery/boss_interrogator_vishas.cpp +++ /dev/null @@ -1,28 +0,0 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 - * 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_Interrogator_Vishas -SD%Complete: 0 -SDComment: Placeholder -SDCategory: Scarlet Monastery -EndScriptData */ - -#include "precompiled.h" - -void AddSC_boss_interrogator_vishas() -{ -} diff --git a/scripts/eastern_kingdoms/scarlet_monastery/boss_scorn.cpp b/scripts/eastern_kingdoms/scarlet_monastery/boss_scorn.cpp deleted file mode 100644 index 99c6b80e5..000000000 --- a/scripts/eastern_kingdoms/scarlet_monastery/boss_scorn.cpp +++ /dev/null @@ -1,28 +0,0 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 - * 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_Scorn -SD%Complete: 0 -SDComment: Placeholder -SDCategory: Scarlet Monastery -EndScriptData */ - -#include "precompiled.h" - -void AddSC_boss_scorn() -{ -} diff --git a/scripts/eastern_kingdoms/scholomance/boss_death_knight_darkreaver.cpp b/scripts/eastern_kingdoms/scholomance/boss_death_knight_darkreaver.cpp deleted file mode 100644 index 873b02225..000000000 --- a/scripts/eastern_kingdoms/scholomance/boss_death_knight_darkreaver.cpp +++ /dev/null @@ -1,28 +0,0 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 - * 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_Death_knight_darkreaver -SD%Complete: 0 -SDComment: Placeholder -SDCategory: Scholomance -EndScriptData */ - -#include "precompiled.h" - -void AddSC_boss_death_knight_darkreaver() -{ -} diff --git a/scripts/eastern_kingdoms/scholomance/boss_kormok.cpp b/scripts/eastern_kingdoms/scholomance/boss_kormok.cpp deleted file mode 100644 index 6134b1621..000000000 --- a/scripts/eastern_kingdoms/scholomance/boss_kormok.cpp +++ /dev/null @@ -1,28 +0,0 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 - * 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_Kormok -SD%Complete: 0 -SDComment: Placeholder -SDCategory: Scholomance -EndScriptData */ - -#include "precompiled.h" - -void AddSC_boss_kormok() -{ -} diff --git a/scripts/eastern_kingdoms/stratholme/boss_baron_rivendare.cpp b/scripts/eastern_kingdoms/stratholme/boss_baron_rivendare.cpp deleted file mode 100644 index 08f09a029..000000000 --- a/scripts/eastern_kingdoms/stratholme/boss_baron_rivendare.cpp +++ /dev/null @@ -1,28 +0,0 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 - * 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_Baron_Rivendare -SD%Complete: 0 -SDComment: Placeholder -SDCategory: Stratholme -EndScriptData */ - -#include "precompiled.h" - -void AddSC_boss_baron_rivendare() -{ -} diff --git a/scripts/eastern_kingdoms/stratholme/boss_magistrate_barthilas.cpp b/scripts/eastern_kingdoms/stratholme/boss_magistrate_barthilas.cpp deleted file mode 100644 index ecb806d3e..000000000 --- a/scripts/eastern_kingdoms/stratholme/boss_magistrate_barthilas.cpp +++ /dev/null @@ -1,28 +0,0 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 - * 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_Magistrate_Barthilas -SD%Complete: 0 -SDComment: Placeholder -SDCategory: Stratholme -EndScriptData */ - -#include "precompiled.h" - -void AddSC_boss_magistrate_barthilas() -{ -} diff --git a/scripts/eastern_kingdoms/stratholme/boss_nerubenkan.cpp b/scripts/eastern_kingdoms/stratholme/boss_nerubenkan.cpp deleted file mode 100644 index 9a0a3aa47..000000000 --- a/scripts/eastern_kingdoms/stratholme/boss_nerubenkan.cpp +++ /dev/null @@ -1,28 +0,0 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 - * 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_Nerubenkan -SD%Complete: 0 -SDComment: Placeholder -SDCategory: Stratholme -EndScriptData */ - -#include "precompiled.h" - -void AddSC_boss_nerubenkan() -{ -} diff --git a/scripts/eastern_kingdoms/stratholme/boss_postmaster_malown.cpp b/scripts/eastern_kingdoms/stratholme/boss_postmaster_malown.cpp deleted file mode 100644 index cddcc9d81..000000000 --- a/scripts/eastern_kingdoms/stratholme/boss_postmaster_malown.cpp +++ /dev/null @@ -1,28 +0,0 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 - * 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_postmaster_malown -SD%Complete: 0 -SDComment: Placeholder -SDCategory: Stratholme -EndScriptData */ - -#include "precompiled.h" - -void AddSC_boss_postmaster_malown() -{ -} diff --git a/scripts/eastern_kingdoms/stratholme/boss_ramstein_the_gorger.cpp b/scripts/eastern_kingdoms/stratholme/boss_ramstein_the_gorger.cpp deleted file mode 100644 index 163cd92c6..000000000 --- a/scripts/eastern_kingdoms/stratholme/boss_ramstein_the_gorger.cpp +++ /dev/null @@ -1,28 +0,0 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 - * 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_Ramstein_the_Gorger -SD%Complete: 0 -SDComment: Placeholder -SDCategory: Stratholme -EndScriptData */ - -#include "precompiled.h" - -void AddSC_boss_ramstein_the_gorger() -{ -} diff --git a/scripts/eastern_kingdoms/stratholme/boss_timmy_the_cruel.cpp b/scripts/eastern_kingdoms/stratholme/boss_timmy_the_cruel.cpp deleted file mode 100644 index fa072260c..000000000 --- a/scripts/eastern_kingdoms/stratholme/boss_timmy_the_cruel.cpp +++ /dev/null @@ -1,28 +0,0 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 - * 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_timmy_the_cruel -SD%Complete: 0 -SDComment: Placeholder -SDCategory: Stratholme -EndScriptData */ - -#include "precompiled.h" - -void AddSC_boss_timmy_the_cruel() -{ -} diff --git a/scripts/eastern_kingdoms/zulgurub/boss_gahzranka.cpp b/scripts/eastern_kingdoms/zulgurub/boss_gahzranka.cpp deleted file mode 100644 index c21b5fa49..000000000 --- a/scripts/eastern_kingdoms/zulgurub/boss_gahzranka.cpp +++ /dev/null @@ -1,28 +0,0 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 - * 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_Gahz'ranka -SD%Complete: 0 -SDComment: Placeholder -SDCategory: Zul'Gurub -EndScriptData */ - -#include "precompiled.h" - -void AddSC_boss_gahzranka() -{ -} diff --git a/scripts/eastern_kingdoms/zulgurub/boss_grilek.cpp b/scripts/eastern_kingdoms/zulgurub/boss_grilek.cpp deleted file mode 100644 index f3f0ceb23..000000000 --- a/scripts/eastern_kingdoms/zulgurub/boss_grilek.cpp +++ /dev/null @@ -1,28 +0,0 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 - * 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_Grilek -SD%Complete: 0 -SDComment: Placeholder -SDCategory: Zul'Gurub -EndScriptData */ - -#include "precompiled.h" - -void AddSC_boss_grilek() -{ -} diff --git a/scripts/eastern_kingdoms/zulgurub/boss_wushoolay.cpp b/scripts/eastern_kingdoms/zulgurub/boss_wushoolay.cpp deleted file mode 100644 index 65e9392fc..000000000 --- a/scripts/eastern_kingdoms/zulgurub/boss_wushoolay.cpp +++ /dev/null @@ -1,28 +0,0 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 - * 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_Wushoolay -SD%Complete: 0 -SDComment: Placeholder -SDCategory: Zul'Gurub -EndScriptData */ - -#include "precompiled.h" - -void AddSC_boss_wushoolay() -{ -} diff --git a/scripts/kalimdor/caverns_of_time/old_hillsbrad/boss_captain_skarloc.cpp b/scripts/kalimdor/caverns_of_time/old_hillsbrad/boss_captain_skarloc.cpp deleted file mode 100644 index 91cd01e76..000000000 --- a/scripts/kalimdor/caverns_of_time/old_hillsbrad/boss_captain_skarloc.cpp +++ /dev/null @@ -1,28 +0,0 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 - * 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_Captain_Skarloc -SD%Complete: 0 -SDComment: Placeholder -SDCategory: Caverns of Time, Old Hillsbrad Foothills -EndScriptData */ - -#include "precompiled.h" - -void AddSC_boss_captain_skarloc() -{ -} diff --git a/scripts/kalimdor/caverns_of_time/old_hillsbrad/boss_epoch_hunter.cpp b/scripts/kalimdor/caverns_of_time/old_hillsbrad/boss_epoch_hunter.cpp deleted file mode 100644 index 0bba8c74f..000000000 --- a/scripts/kalimdor/caverns_of_time/old_hillsbrad/boss_epoch_hunter.cpp +++ /dev/null @@ -1,28 +0,0 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 - * 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_Epoch_Hunter -SD%Complete: 0 -SDComment: Placeholder -SDCategory: Caverns of Time, Old Hillsbrad Foothills -EndScriptData */ - -#include "precompiled.h" - -void AddSC_boss_epoch_hunter() -{ -} diff --git a/scripts/kalimdor/caverns_of_time/old_hillsbrad/boss_leutenant_drake.cpp b/scripts/kalimdor/caverns_of_time/old_hillsbrad/boss_leutenant_drake.cpp deleted file mode 100644 index e12f8f151..000000000 --- a/scripts/kalimdor/caverns_of_time/old_hillsbrad/boss_leutenant_drake.cpp +++ /dev/null @@ -1,28 +0,0 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 - * 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_Luetenant_Drake -SD%Complete: 0 -SDComment: Placeholder -SDCategory: Caverns of Time, Old Hillsbrad Foothills -EndScriptData */ - -#include "precompiled.h" - -void AddSC_boss_lieutenant_drake() -{ -} diff --git a/scripts/kalimdor/maraudon/boss_celebras_the_cursed.cpp b/scripts/kalimdor/maraudon/boss_celebras_the_cursed.cpp deleted file mode 100644 index a09686d01..000000000 --- a/scripts/kalimdor/maraudon/boss_celebras_the_cursed.cpp +++ /dev/null @@ -1,28 +0,0 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 - * 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_Celebras_the_Cursed -SD%Complete: 0 -SDComment: Placeholder -SDCategory: Maraudon -EndScriptData */ - -#include "precompiled.h" - -void AddSC_boss_celebras_the_cursed() -{ -} diff --git a/scripts/kalimdor/maraudon/boss_landslide.cpp b/scripts/kalimdor/maraudon/boss_landslide.cpp deleted file mode 100644 index f9980e386..000000000 --- a/scripts/kalimdor/maraudon/boss_landslide.cpp +++ /dev/null @@ -1,28 +0,0 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 - * 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_Landslide -SD%Complete: 0 -SDComment: Placeholder -SDCategory: Maraudon -EndScriptData */ - -#include "precompiled.h" - -void AddSC_boss_landslide() -{ -} diff --git a/scripts/kalimdor/maraudon/boss_princess_theradras.cpp b/scripts/kalimdor/maraudon/boss_princess_theradras.cpp deleted file mode 100644 index cd5b45497..000000000 --- a/scripts/kalimdor/maraudon/boss_princess_theradras.cpp +++ /dev/null @@ -1,28 +0,0 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 - * 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_Princess_Theradras -SD%Complete: 0 -SDComment: Placeholder -SDCategory: Maraudon -EndScriptData */ - -#include "precompiled.h" - -void AddSC_boss_ptheradras() -{ -} diff --git a/scripts/kalimdor/razorfen_downs/boss_amnennar_the_coldbringer.cpp b/scripts/kalimdor/razorfen_downs/boss_amnennar_the_coldbringer.cpp deleted file mode 100644 index 52003e47d..000000000 --- a/scripts/kalimdor/razorfen_downs/boss_amnennar_the_coldbringer.cpp +++ /dev/null @@ -1,28 +0,0 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 - * 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_Amnennar_the_coldbringer -SD%Complete: 0 -SDComment: Placeholder -SDCategory: Razorfen Downs -EndScriptData */ - -#include "precompiled.h" - -void AddSC_boss_amnennar_the_coldbringer() -{ -} diff --git a/scripts/outland/tempest_keep/the_eye/the_eye.cpp b/scripts/outland/tempest_keep/the_eye/the_eye.cpp deleted file mode 100644 index dce079dd1..000000000 --- a/scripts/outland/tempest_keep/the_eye/the_eye.cpp +++ /dev/null @@ -1,31 +0,0 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 - * 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: The_Eye -SD%Complete: 0 -SDComment: Placeholder -SDCategory: Tempest Keep, The Eye -EndScriptData */ - -/* ContentData -EndContentData */ - -#include "precompiled.h" - -void AddSC_the_eye() -{ -} diff --git a/scripts/outland/tempest_keep/the_mechanar/boss_gatewatcher_ironhand.cpp b/scripts/outland/tempest_keep/the_mechanar/boss_gatewatcher_ironhand.cpp deleted file mode 100644 index 7860f5a32..000000000 --- a/scripts/outland/tempest_keep/the_mechanar/boss_gatewatcher_ironhand.cpp +++ /dev/null @@ -1,28 +0,0 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 - * 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_Gatewatcher_Ironhand -SD%Complete: 0 -SDComment: Placeholder -SDCategory: Tempest Keep, The Mechanar -EndScriptData */ - -#include "precompiled.h" - -void AddSC_boss_gatewatcher_iron_hand() -{ -} diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 23c1a6d85..0b3b4e64f 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2676" + #define SD2_REVISION_NR "2677" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/updates/r2674_mangos.sql b/sql/updates/r2674_mangos.sql index 7e75e6308..bcaf00f30 100644 --- a/sql/updates/r2674_mangos.sql +++ b/sql/updates/r2674_mangos.sql @@ -8,7 +8,7 @@ UPDATE creature_template SET ScriptName='' WHERE entry=10440; UPDATE creature_template SET ScriptName='' WHERE entry=10435; UPDATE creature_template SET ScriptName='' WHERE entry=10437; UPDATE creature_template SET ScriptName='' WHERE entry=11143; -UPDATE creature_template SET ScriptName='' WHERE entry=11136 +UPDATE creature_template SET ScriptName='' WHERE entry=11136; UPDATE creature_template SET ScriptName='' WHERE entry=10439; UPDATE creature_template SET ScriptName='' WHERE entry=10808; UPDATE creature_template SET ScriptName='' WHERE entry=11439; diff --git a/system/ScriptLoader.cpp b/system/ScriptLoader.cpp index 06206236a..b88c8dcd0 100644 --- a/system/ScriptLoader.cpp +++ b/system/ScriptLoader.cpp @@ -30,28 +30,14 @@ extern void AddSC_world_map_scripts(); // eastern kingdoms extern void AddSC_blackrock_depths(); // blackrock_depths extern void AddSC_boss_ambassador_flamelash(); -extern void AddSC_boss_anubshiah(); extern void AddSC_boss_coren_direbrew(); extern void AddSC_boss_draganthaurissan(); extern void AddSC_boss_general_angerforge(); -extern void AddSC_boss_gorosh_the_dervish(); -extern void AddSC_boss_grizzle(); extern void AddSC_boss_high_interrogator_gerstahn(); -extern void AddSC_boss_magmus(); -extern void AddSC_boss_tomb_of_seven(); extern void AddSC_instance_blackrock_depths(); -extern void AddSC_boss_drakkisath(); // blackrock_spire -extern void AddSC_boss_halycon(); -extern void AddSC_boss_highlordomokk(); -extern void AddSC_boss_mothersmolderweb(); -extern void AddSC_boss_overlordwyrmthalak(); -extern void AddSC_boss_shadowvosh(); -extern void AddSC_boss_thebeast(); -extern void AddSC_boss_warmastervoone(); -extern void AddSC_boss_quatermasterzigris(); +extern void AddSC_boss_overlordwyrmthalak(); // blackrock_spire extern void AddSC_boss_pyroguard_emberseer(); extern void AddSC_boss_gyth(); -extern void AddSC_boss_rend_blackhand(); extern void AddSC_instance_blackrock_spire(); extern void AddSC_boss_razorgore(); // blackwing_lair extern void AddSC_boss_vaelastrasz(); @@ -102,34 +88,20 @@ extern void AddSC_instance_molten_core(); extern void AddSC_molten_core(); extern void AddSC_ebon_hold(); // scarlet_enclave extern void AddSC_boss_arcanist_doan(); // scarlet_monastery -extern void AddSC_boss_azshir_the_sleepless(); -extern void AddSC_boss_bloodmage_thalnos(); extern void AddSC_boss_herod(); -extern void AddSC_boss_high_inquisitor_fairbanks(); -extern void AddSC_boss_houndmaster_loksey(); -extern void AddSC_boss_interrogator_vishas(); extern void AddSC_boss_mograine_and_whitemane(); -extern void AddSC_boss_scorn(); extern void AddSC_boss_headless_horseman(); extern void AddSC_instance_scarlet_monastery(); extern void AddSC_boss_darkmaster_gandling(); // scholomance -extern void AddSC_boss_death_knight_darkreaver(); extern void AddSC_boss_jandicebarov(); -extern void AddSC_boss_kormok(); extern void AddSC_boss_vectus(); extern void AddSC_instance_scholomance(); extern void AddSC_boss_hummel(); // shadowfang_keep extern void AddSC_shadowfang_keep(); extern void AddSC_instance_shadowfang_keep(); -extern void AddSC_boss_magistrate_barthilas(); // stratholme -extern void AddSC_boss_maleki_the_pallid(); -extern void AddSC_boss_nerubenkan(); +extern void AddSC_boss_maleki_the_pallid(); // stratholme extern void AddSC_boss_cannon_master_willey(); extern void AddSC_boss_baroness_anastari(); -extern void AddSC_boss_ramstein_the_gorger(); -extern void AddSC_boss_timmy_the_cruel(); -extern void AddSC_boss_postmaster_malown(); -extern void AddSC_boss_baron_rivendare(); extern void AddSC_boss_dathrohan_balnazzar(); extern void AddSC_boss_order_of_silver_hand(); extern void AddSC_instance_stratholme(); @@ -155,8 +127,6 @@ extern void AddSC_instance_zulaman(); extern void AddSC_zulaman(); extern void AddSC_boss_zuljin(); extern void AddSC_boss_arlokk(); // zulgurub -extern void AddSC_boss_gahzranka(); -extern void AddSC_boss_grilek(); extern void AddSC_boss_hakkar(); extern void AddSC_boss_hazzarah(); extern void AddSC_boss_jeklik(); @@ -167,13 +137,11 @@ extern void AddSC_boss_ouro(); extern void AddSC_boss_renataki(); extern void AddSC_boss_thekal(); extern void AddSC_boss_venoxis(); -extern void AddSC_boss_wushoolay(); extern void AddSC_instance_zulgurub(); -//extern void AddSC_alterac_mountains(); +extern void AddSC_alterac_mountains(); extern void AddSC_arathi_highlands(); extern void AddSC_blasted_lands(); -extern void AddSC_boss_kruul(); extern void AddSC_burning_steppes(); extern void AddSC_dun_morogh(); extern void AddSC_eastern_plaguelands(); @@ -207,23 +175,16 @@ extern void AddSC_instance_dark_portal(); extern void AddSC_hyjal(); // COT, hyjal extern void AddSC_boss_archimonde(); extern void AddSC_instance_mount_hyjal(); -extern void AddSC_boss_captain_skarloc(); // COT, old_hillsbrad -extern void AddSC_boss_epoch_hunter(); -extern void AddSC_boss_lieutenant_drake(); -extern void AddSC_instance_old_hillsbrad(); +extern void AddSC_instance_old_hillsbrad(); // COT, old_hillsbrad extern void AddSC_old_hillsbrad(); extern void AddSC_culling_of_stratholme(); // COT, culling_of_stratholme extern void AddSC_instance_culling_of_stratholme(); extern void AddSC_dire_maul(); // dire_maul extern void AddSC_instance_dire_maul(); -extern void AddSC_boss_celebras_the_cursed(); // maraudon -extern void AddSC_boss_landslide(); -extern void AddSC_boss_noxxion(); -extern void AddSC_boss_ptheradras(); +extern void AddSC_boss_noxxion(); // maraudon extern void AddSC_boss_onyxia(); // onyxias_lair extern void AddSC_instance_onyxias_lair(); -extern void AddSC_boss_amnennar_the_coldbringer(); // razorfen_downs -extern void AddSC_razorfen_downs(); +extern void AddSC_razorfen_downs(); // razorfen_downs extern void AddSC_instance_razorfen_kraul(); // razorfen_kraul extern void AddSC_razorfen_kraul(); extern void AddSC_boss_ayamiss(); // ruins_of_ahnqiraj @@ -487,9 +448,7 @@ extern void AddSC_boss_high_astromancer_solarian(); extern void AddSC_boss_kaelthas(); extern void AddSC_boss_void_reaver(); extern void AddSC_instance_the_eye(); -extern void AddSC_the_eye(); -extern void AddSC_boss_gatewatcher_iron_hand(); // TK, the_mechanar -extern void AddSC_boss_nethermancer_sepethrea(); +extern void AddSC_boss_nethermancer_sepethrea(); // TK, the_mechanar extern void AddSC_boss_pathaleon_the_calculator(); extern void AddSC_instance_mechanar(); @@ -532,28 +491,14 @@ void AddScripts() // eastern kingdoms AddSC_blackrock_depths(); // blackrock_depths AddSC_boss_ambassador_flamelash(); - AddSC_boss_anubshiah(); AddSC_boss_coren_direbrew(); AddSC_boss_draganthaurissan(); AddSC_boss_general_angerforge(); - AddSC_boss_gorosh_the_dervish(); - AddSC_boss_grizzle(); AddSC_boss_high_interrogator_gerstahn(); - AddSC_boss_magmus(); - AddSC_boss_tomb_of_seven(); AddSC_instance_blackrock_depths(); - AddSC_boss_drakkisath(); // blackrock_spire - AddSC_boss_halycon(); - AddSC_boss_highlordomokk(); - AddSC_boss_mothersmolderweb(); - AddSC_boss_overlordwyrmthalak(); - AddSC_boss_shadowvosh(); - AddSC_boss_thebeast(); - AddSC_boss_warmastervoone(); - AddSC_boss_quatermasterzigris(); + AddSC_boss_overlordwyrmthalak(); // blackrock_spire AddSC_boss_pyroguard_emberseer(); AddSC_boss_gyth(); - AddSC_boss_rend_blackhand(); AddSC_instance_blackrock_spire(); AddSC_boss_razorgore(); // blackwing_lair AddSC_boss_vaelastrasz(); @@ -604,34 +549,20 @@ void AddScripts() AddSC_molten_core(); AddSC_ebon_hold(); // scarlet_enclave AddSC_boss_arcanist_doan(); // scarlet_monastery - AddSC_boss_azshir_the_sleepless(); - AddSC_boss_bloodmage_thalnos(); AddSC_boss_herod(); - AddSC_boss_high_inquisitor_fairbanks(); - AddSC_boss_houndmaster_loksey(); - AddSC_boss_interrogator_vishas(); AddSC_boss_mograine_and_whitemane(); - AddSC_boss_scorn(); AddSC_boss_headless_horseman(); AddSC_instance_scarlet_monastery(); AddSC_boss_darkmaster_gandling(); // scholomance - AddSC_boss_death_knight_darkreaver(); AddSC_boss_jandicebarov(); - AddSC_boss_kormok(); AddSC_boss_vectus(); AddSC_instance_scholomance(); AddSC_boss_hummel(); // shadowfang_keep AddSC_shadowfang_keep(); AddSC_instance_shadowfang_keep(); - AddSC_boss_magistrate_barthilas(); // stratholme - AddSC_boss_maleki_the_pallid(); - AddSC_boss_nerubenkan(); + AddSC_boss_maleki_the_pallid(); // stratholme AddSC_boss_cannon_master_willey(); AddSC_boss_baroness_anastari(); - AddSC_boss_ramstein_the_gorger(); - AddSC_boss_timmy_the_cruel(); - AddSC_boss_postmaster_malown(); - AddSC_boss_baron_rivendare(); AddSC_boss_dathrohan_balnazzar(); AddSC_boss_order_of_silver_hand(); AddSC_instance_stratholme(); @@ -657,8 +588,6 @@ void AddScripts() AddSC_zulaman(); AddSC_boss_zuljin(); AddSC_boss_arlokk(); // zulgurub - AddSC_boss_gahzranka(); - AddSC_boss_grilek(); AddSC_boss_hakkar(); AddSC_boss_hazzarah(); AddSC_boss_jeklik(); @@ -669,13 +598,11 @@ void AddScripts() AddSC_boss_renataki(); AddSC_boss_thekal(); AddSC_boss_venoxis(); - AddSC_boss_wushoolay(); AddSC_instance_zulgurub(); - //AddSC_alterac_mountains(); + AddSC_alterac_mountains(); AddSC_arathi_highlands(); AddSC_blasted_lands(); - AddSC_boss_kruul(); AddSC_burning_steppes(); AddSC_dun_morogh(); AddSC_eastern_plaguelands(); @@ -709,23 +636,16 @@ void AddScripts() AddSC_hyjal(); // CoT, hyjal AddSC_boss_archimonde(); AddSC_instance_mount_hyjal(); - AddSC_boss_captain_skarloc(); // CoT, old_hillsbrand - AddSC_boss_epoch_hunter(); - AddSC_boss_lieutenant_drake(); - AddSC_instance_old_hillsbrad(); + AddSC_instance_old_hillsbrad(); // CoT, old_hillsbrand AddSC_old_hillsbrad(); AddSC_culling_of_stratholme(); // CoT, culling_of_stratholme AddSC_instance_culling_of_stratholme(); AddSC_dire_maul(); // dire_maul AddSC_instance_dire_maul(); - AddSC_boss_celebras_the_cursed(); // maraudon - AddSC_boss_landslide(); - AddSC_boss_noxxion(); - AddSC_boss_ptheradras(); + AddSC_boss_noxxion(); // maraudon AddSC_boss_onyxia(); // onyxias_lair AddSC_instance_onyxias_lair(); - AddSC_boss_amnennar_the_coldbringer(); // razorfen_downs - AddSC_razorfen_downs(); + AddSC_razorfen_downs(); // razorfen_downs AddSC_instance_razorfen_kraul(); // razorfen_kraul AddSC_razorfen_kraul(); AddSC_boss_ayamiss(); // ruins_of_ahnqiraj @@ -989,9 +909,7 @@ void AddScripts() AddSC_boss_kaelthas(); AddSC_boss_void_reaver(); AddSC_instance_the_eye(); - AddSC_the_eye(); - AddSC_boss_gatewatcher_iron_hand(); // TK, the_mechanar - AddSC_boss_nethermancer_sepethrea(); + AddSC_boss_nethermancer_sepethrea(); // TK, the_mechanar AddSC_boss_pathaleon_the_calculator(); AddSC_instance_mechanar(); From 10c65b40de8651f4d35b775d5b9975b6e62e6fd0 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sat, 18 Aug 2012 23:04:10 +0300 Subject: [PATCH 0667/1172] [2678] Drop support for Visual Studio 2005 --- VC80/80ScriptDev2.vcproj | 3005 -------------------------------------- scriptVC80.sln | 25 - sd2_revision_nr.h | 2 +- 3 files changed, 1 insertion(+), 3031 deletions(-) delete mode 100644 VC80/80ScriptDev2.vcproj delete mode 100644 scriptVC80.sln diff --git a/VC80/80ScriptDev2.vcproj b/VC80/80ScriptDev2.vcproj deleted file mode 100644 index 0138bdcfd..000000000 --- a/VC80/80ScriptDev2.vcproj +++ /dev/null @@ -1,3005 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/scriptVC80.sln b/scriptVC80.sln deleted file mode 100644 index 420b4d657..000000000 --- a/scriptVC80.sln +++ /dev/null @@ -1,25 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 9.00 -# Visual Studio 2005 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ScriptDev2", "VC80\80ScriptDev2.vcproj", "{4295C8A9-79B7-4354-8064-F05FB9CA0C96}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Debug|x64 = Debug|x64 - Release|Win32 = Release|Win32 - Release|x64 = Release|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {4295C8A9-79B7-4354-8064-F05FB9CA0C96}.Debug|Win32.ActiveCfg = Debug|Win32 - {4295C8A9-79B7-4354-8064-F05FB9CA0C96}.Debug|Win32.Build.0 = Debug|Win32 - {4295C8A9-79B7-4354-8064-F05FB9CA0C96}.Debug|x64.ActiveCfg = Debug|x64 - {4295C8A9-79B7-4354-8064-F05FB9CA0C96}.Debug|x64.Build.0 = Debug|x64 - {4295C8A9-79B7-4354-8064-F05FB9CA0C96}.Release|Win32.ActiveCfg = Release|Win32 - {4295C8A9-79B7-4354-8064-F05FB9CA0C96}.Release|Win32.Build.0 = Release|Win32 - {4295C8A9-79B7-4354-8064-F05FB9CA0C96}.Release|x64.ActiveCfg = Release|x64 - {4295C8A9-79B7-4354-8064-F05FB9CA0C96}.Release|x64.Build.0 = Release|x64 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 0b3b4e64f..d610244f2 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2677" + #define SD2_REVISION_NR "2678" #endif // __SD2_REVISION_NR_H__ From 5391805a50bec4cb1e82c66a178eb8239d78cad4 Mon Sep 17 00:00:00 2001 From: NeatElves Date: Sat, 18 Aug 2012 23:12:23 +0300 Subject: [PATCH 0668/1172] [2679] Drop gossip script for npc 14347 - will be handled in DB Signed-off-by: Xfurry --- scripts/kalimdor/silithus.cpp | 89 +--------------------------------- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 - sql/updates/r2679_mangos.sql | 1 + 4 files changed, 3 insertions(+), 90 deletions(-) create mode 100644 sql/updates/r2679_mangos.sql diff --git a/scripts/kalimdor/silithus.cpp b/scripts/kalimdor/silithus.cpp index b5cc8df6a..0e817f9c0 100644 --- a/scripts/kalimdor/silithus.cpp +++ b/scripts/kalimdor/silithus.cpp @@ -17,98 +17,17 @@ /* ScriptData SDName: Silithus SD%Complete: 100 -SDComment: Quest support: 7785, 8304, 8519. +SDComment: Quest support: 8304, 8519. SDCategory: Silithus EndScriptData */ /* ContentData -npc_highlord_demitrian npcs_rutgar_and_frankal npc_anachronos_the_ancient EndContentData */ #include "precompiled.h" -/*### -## npc_highlord_demitrian -###*/ - -#define GOSSIP_ITEM_DEMITRIAN1 "What do you know of it?" -#define GOSSIP_ITEM_DEMITRIAN2 "I am listening , Demitrian." -#define GOSSIP_ITEM_DEMITRIAN3 "Continue, please." -#define GOSSIP_ITEM_DEMITRIAN4 "A battle?" -#define GOSSIP_ITEM_DEMITRIAN5 "" -#define GOSSIP_ITEM_DEMITRIAN6 "Caught unaware? How?" -#define GOSSIP_ITEM_DEMITRIAN7 "So what did Ragnaros do next?" - -enum -{ - QUEST_EXAMINE_THE_VESSEL = 7785, - ITEM_BINDINGS_WINDSEEKER_LEFT = 18563, - ITEM_BINDINGS_WINDSEEKER_RIGHT = 18564, - ITEM_VESSEL_OF_REBIRTH = 19016, - GOSSIP_TEXTID_DEMITRIAN1 = 6842, - GOSSIP_TEXTID_DEMITRIAN2 = 6843, - GOSSIP_TEXTID_DEMITRIAN3 = 6844, - GOSSIP_TEXTID_DEMITRIAN4 = 6867, - GOSSIP_TEXTID_DEMITRIAN5 = 6868, - GOSSIP_TEXTID_DEMITRIAN6 = 6869, - GOSSIP_TEXTID_DEMITRIAN7 = 6870 -}; - -bool GossipHello_npc_highlord_demitrian(Player* pPlayer, Creature* pCreature) -{ - if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); - - if (pPlayer->GetQuestStatus(QUEST_EXAMINE_THE_VESSEL) == QUEST_STATUS_NONE && - (pPlayer->HasItemCount(ITEM_BINDINGS_WINDSEEKER_LEFT,1,false) || pPlayer->HasItemCount(ITEM_BINDINGS_WINDSEEKER_RIGHT,1,false))) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_DEMITRIAN1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF); - - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); - - return true; -} - -bool GossipSelect_npc_highlord_demitrian(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) -{ - switch(uiAction) - { - case GOSSIP_ACTION_INFO_DEF: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_DEMITRIAN2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_DEMITRIAN1, pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF+1: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_DEMITRIAN3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); - pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_DEMITRIAN2, pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF+2: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_DEMITRIAN4, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3); - pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_DEMITRIAN3, pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF+3: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_DEMITRIAN5, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+4); - pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_DEMITRIAN4, pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF+4: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_DEMITRIAN6, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+5); - pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_DEMITRIAN5, pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF+5: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_DEMITRIAN7, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+6); - pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_DEMITRIAN6, pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF+6: - pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_DEMITRIAN7, pCreature->GetObjectGuid()); - - if (Item* pItem = pPlayer->StoreNewItemInInventorySlot(ITEM_VESSEL_OF_REBIRTH, 1)) - pPlayer->SendNewItem(pItem, 1, true, false); - - break; - } - return true; -} - /*### ## npcs_rutgar_and_frankal ###*/ @@ -880,12 +799,6 @@ void AddSC_silithus() { Script* pNewScript; - pNewScript = new Script; - pNewScript->Name = "npc_highlord_demitrian"; - pNewScript->pGossipHello = &GossipHello_npc_highlord_demitrian; - pNewScript->pGossipSelect = &GossipSelect_npc_highlord_demitrian; - pNewScript->RegisterSelf(); - pNewScript = new Script; pNewScript->Name = "npcs_rutgar_and_frankal"; pNewScript->pGossipHello = &GossipHello_npcs_rutgar_and_frankal; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index d610244f2..2277ef1dc 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2678" + #define SD2_REVISION_NR "2679" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 6d690c767..11ba37f67 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -973,7 +973,6 @@ UPDATE creature_template SET ScriptName='npc_injured_rainspeaker' WHERE entry=28 UPDATE creature_template SET ScriptName='npc_mosswalker_victim' WHERE entry=28113; /* SILITHUS */ -UPDATE creature_template SET ScriptName='npc_highlord_demitrian' WHERE entry=14347; UPDATE creature_template SET ScriptName='npcs_rutgar_and_frankal' WHERE entry IN (15170,15171); UPDATE creature_template SET ScriptName='npc_anachronos_the_ancient' WHERE entry=15381; UPDATE gameobject_template SET ScriptName='go_crystalline_tear' WHERE entry=180633; diff --git a/sql/updates/r2679_mangos.sql b/sql/updates/r2679_mangos.sql new file mode 100644 index 000000000..beb28edd7 --- /dev/null +++ b/sql/updates/r2679_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='' WHERE entry=14347; From 0014d7b3ff30bb23244f2cf98f8bcce94b5142b8 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sun, 19 Aug 2012 02:32:17 +0300 Subject: [PATCH 0669/1172] [2680] Add instance intro part for Arcatraz Thanks to X-Savior for providing the data --- .../outland/tempest_keep/arcatraz/arcatraz.h | 11 ++- .../arcatraz/instance_arcatraz.cpp | 93 +++++++++++++------ sd2_revision_nr.h | 2 +- 3 files changed, 76 insertions(+), 30 deletions(-) diff --git a/scripts/outland/tempest_keep/arcatraz/arcatraz.h b/scripts/outland/tempest_keep/arcatraz/arcatraz.h index 4b8ba229b..7ecd272a0 100644 --- a/scripts/outland/tempest_keep/arcatraz/arcatraz.h +++ b/scripts/outland/tempest_keep/arcatraz/arcatraz.h @@ -7,8 +7,9 @@ enum { - MAX_ENCOUNTER = 9, + MAX_ENCOUNTER = 10, + TYPE_ENTRANCE = 0, TYPE_ZEREKETH = 1, TYPE_DALLIAH = 2, TYPE_SOCCOTHRATES = 3, @@ -28,6 +29,10 @@ enum NPC_PRISON_GAMMA_POD = 21439, NPC_PRISON_BOSS_POD = 21440, + // intro event related + NPC_PROTEAN_NIGHTMARE = 20864, + NPC_PROTEAN_HORROR = 20865, + // Harbinger Skyriss event related (trash mobs are scripted in ACID) NPC_BLAZING_TRICKSTER = 20905, // phase 1 NPC_PHASE_HUNTER = 20906, @@ -66,6 +71,7 @@ static const SpawnLocation aSummonPosition[5] = static const float aDalliahStartPos[4] = {118.6038f, 96.84682f, 22.44115f, 1.012f}; static const float aSoccotharesStartPos[4] = {122.1035f, 192.7203f, 22.44115f, 5.235f}; +static const float aEntranceMoveLoc[3] = {82.020f, 0.306f, -11.026f}; class MANGOS_DLL_DECL instance_arcatraz : public ScriptedInstance, private DialogueHelper { @@ -74,6 +80,7 @@ class MANGOS_DLL_DECL instance_arcatraz : public ScriptedInstance, private Dialo void Initialize(); + void OnPlayerEnter(Player* pPlayer); void OnObjectCreate(GameObject* pGo); void OnCreatureCreate(Creature* pCreature); @@ -92,8 +99,10 @@ class MANGOS_DLL_DECL instance_arcatraz : public ScriptedInstance, private Dialo std::string m_strInstData; uint32 m_uiResetDelayTimer; + uint32 m_uiEntranceEventTimer; GuidList m_lSkyrissEventMobsGuidList; + std::queue m_qIntroEventMobsGuidQueue; }; #endif diff --git a/scripts/outland/tempest_keep/arcatraz/instance_arcatraz.cpp b/scripts/outland/tempest_keep/arcatraz/instance_arcatraz.cpp index 00918eaf2..3c31c85b6 100644 --- a/scripts/outland/tempest_keep/arcatraz/instance_arcatraz.cpp +++ b/scripts/outland/tempest_keep/arcatraz/instance_arcatraz.cpp @@ -87,6 +87,7 @@ static const DialogueEntry aArcatrazDialogue[] = }; instance_arcatraz::instance_arcatraz(Map* pMap) : ScriptedInstance(pMap), DialogueHelper(aArcatrazDialogue), + m_uiEntranceEventTimer(0), m_uiResetDelayTimer(0) { Initialize(); @@ -98,6 +99,16 @@ void instance_arcatraz::Initialize() InitializeDialogueHelper(this); } +void instance_arcatraz::OnPlayerEnter(Player* pPlayer) +{ + // Check encounter states + if (GetData(TYPE_ENTRANCE) == DONE || GetData(TYPE_ENTRANCE) == IN_PROGRESS) + return; + + SetData(TYPE_ENTRANCE, IN_PROGRESS); + m_uiEntranceEventTimer = 1000; +} + void instance_arcatraz::OnObjectCreate(GameObject* pGo) { switch(pGo->GetEntry()) @@ -149,6 +160,12 @@ void instance_arcatraz::OnCreatureCreate(Creature* pCreature) case NPC_BL_DRAKONAAR: m_lSkyrissEventMobsGuidList.push_back(pCreature->GetObjectGuid()); break; + case NPC_PROTEAN_HORROR: + case NPC_PROTEAN_NIGHTMARE: + // Only take the mobs from the entrance + if (pCreature->GetPositionY() > 0 && pCreature->GetPositionY() < 1.0f) + m_qIntroEventMobsGuidQueue.push(pCreature->GetObjectGuid()); + break; } } @@ -156,8 +173,9 @@ void instance_arcatraz::SetData(uint32 uiType, uint32 uiData) { switch(uiType) { + case TYPE_ENTRANCE: case TYPE_ZEREKETH: - m_auiEncounter[0] = uiData; + m_auiEncounter[uiType] = uiData; break; case TYPE_DALLIAH: @@ -175,23 +193,23 @@ void instance_arcatraz::SetData(uint32 uiType, uint32 uiData) if (GetData(TYPE_SOCCOTHRATES) != DONE) StartNextDialogueText(TYPE_SOCCOTHRATES); } - m_auiEncounter[1] = uiData; + m_auiEncounter[uiType] = uiData; break; case TYPE_SOCCOTHRATES: if (uiData == DONE) DoUseDoorOrButton(GO_CORE_SECURITY_FIELD_ALPHA); - m_auiEncounter[2] = uiData; + m_auiEncounter[uiType] = uiData; break; case TYPE_HARBINGERSKYRISS: if (uiData == FAIL) { - m_auiEncounter[4] = NOT_STARTED; - m_auiEncounter[5] = NOT_STARTED; - m_auiEncounter[6] = NOT_STARTED; - m_auiEncounter[7] = NOT_STARTED; - m_auiEncounter[8] = NOT_STARTED; + SetData(TYPE_WARDEN_1, NOT_STARTED); + SetData(TYPE_WARDEN_2, NOT_STARTED); + SetData(TYPE_WARDEN_3, NOT_STARTED); + SetData(TYPE_WARDEN_4, NOT_STARTED); + SetData(TYPE_WARDEN_5, NOT_STARTED); // Reset event in 1 min if (Creature* pMellichar = GetSingleCreatureFromStorage(NPC_MELLICHAR)) @@ -231,7 +249,7 @@ void instance_arcatraz::SetData(uint32 uiType, uint32 uiData) DoUseDoorOrButton(GO_POD_ALPHA); if (uiData == DONE) StartNextDialogueText(YELL_MELLICHAR_RELEASE2); - m_auiEncounter[4] = uiData; + m_auiEncounter[uiType] = uiData; break; case TYPE_WARDEN_2: @@ -239,7 +257,7 @@ void instance_arcatraz::SetData(uint32 uiType, uint32 uiData) DoUseDoorOrButton(GO_POD_BETA); if (uiData == DONE) StartNextDialogueText(YELL_MELLICHAR_RELEASE3); - m_auiEncounter[5] = uiData; + m_auiEncounter[uiType] = uiData; break; case TYPE_WARDEN_3: @@ -247,7 +265,7 @@ void instance_arcatraz::SetData(uint32 uiType, uint32 uiData) DoUseDoorOrButton(GO_POD_DELTA); if (uiData == DONE) StartNextDialogueText(YELL_MELLICHAR_RELEASE4); - m_auiEncounter[6] = uiData; + m_auiEncounter[uiType] = uiData; break; case TYPE_WARDEN_4: @@ -255,13 +273,13 @@ void instance_arcatraz::SetData(uint32 uiType, uint32 uiData) DoUseDoorOrButton(GO_POD_GAMMA); if (uiData == DONE) StartNextDialogueText(YELL_MELLICHAR_RELEASE5); - m_auiEncounter[7] = uiData; + m_auiEncounter[uiType] = uiData; break; case TYPE_WARDEN_5: if (uiData == IN_PROGRESS) DoUseDoorOrButton(GO_POD_OMEGA); - m_auiEncounter[8] = uiData; + m_auiEncounter[uiType] = uiData; break; } @@ -272,7 +290,7 @@ void instance_arcatraz::SetData(uint32 uiType, uint32 uiData) std::ostringstream saveStream; saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2] << " " - << m_auiEncounter[3]; + << m_auiEncounter[3] << " " << m_auiEncounter[4]; m_strInstData = saveStream.str(); @@ -283,20 +301,10 @@ void instance_arcatraz::SetData(uint32 uiType, uint32 uiData) uint32 instance_arcatraz::GetData(uint32 uiType) { - switch(uiType) - { - case TYPE_DALLIAH: return m_auiEncounter[1]; - case TYPE_SOCCOTHRATES: return m_auiEncounter[2]; - case TYPE_HARBINGERSKYRISS: return m_auiEncounter[3]; - case TYPE_WARDEN_1: return m_auiEncounter[4]; - case TYPE_WARDEN_2: return m_auiEncounter[5]; - case TYPE_WARDEN_3: return m_auiEncounter[6]; - case TYPE_WARDEN_4: return m_auiEncounter[7]; - case TYPE_WARDEN_5: return m_auiEncounter[8]; + if (uiType < MAX_ENCOUNTER) + return m_auiEncounter[uiType]; - default: - return 0; - } + return 0; } void instance_arcatraz::Load(const char* chrIn) @@ -310,7 +318,8 @@ void instance_arcatraz::Load(const char* chrIn) OUT_LOAD_INST_DATA(chrIn); std::istringstream loadStream(chrIn); - loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3]; + loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3] + >> m_auiEncounter[4]; for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) { @@ -417,6 +426,34 @@ void instance_arcatraz::Update(uint32 uiDiff) else m_uiResetDelayTimer -= uiDiff; } + + if (m_uiEntranceEventTimer) + { + if (m_uiEntranceEventTimer <= uiDiff) + { + // Move the intro creatures into combat positions + if (Creature* pTemp = instance->GetCreature(m_qIntroEventMobsGuidQueue.front())) + { + if (pTemp->isAlive()) + { + pTemp->SetWalk(false); + pTemp->GetMotionMaster()->MovePoint(0, aEntranceMoveLoc[0], aEntranceMoveLoc[1], aEntranceMoveLoc[2]); + } + m_qIntroEventMobsGuidQueue.pop(); + } + + // When all intro creatures were moved, stop the timer + if (m_qIntroEventMobsGuidQueue.empty()) + { + SetData(TYPE_ENTRANCE, DONE); + m_uiEntranceEventTimer = 0; + } + else + m_uiEntranceEventTimer = urand(10000, 15000); + } + else + m_uiEntranceEventTimer -= uiDiff; + } } InstanceData* GetInstanceData_instance_arcatraz(Map* pMap) diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 2277ef1dc..12f0a04e1 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2679" + #define SD2_REVISION_NR "2680" #endif // __SD2_REVISION_NR_H__ From d236a54966f1792a76bcdc7be39a63ec63e468ec Mon Sep 17 00:00:00 2001 From: michalpolko Date: Sun, 19 Aug 2012 10:56:32 +0200 Subject: [PATCH 0670/1172] [2681] Implemented basic script for Rotface encounter. --- .../icecrown_citadel/boss_rotface.cpp | 64 ++++++++++++++++++- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 + sql/updates/r2681_mangos.sql | 1 + 4 files changed, 66 insertions(+), 2 deletions(-) create mode 100644 sql/updates/r2681_mangos.sql diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_rotface.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_rotface.cpp index 137e3b431..1a609ee06 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_rotface.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_rotface.cpp @@ -16,12 +16,13 @@ /* ScriptData SDName: boss_rotface -SD%Complete: 0% +SD%Complete: 10% SDComment: SDCategory: Icecrown Citadel EndScriptData */ #include "precompiled.h" +#include "icecrown_citadel.h" enum { @@ -37,6 +38,67 @@ enum SAY_ROTFACE_DEATH = -1631080, }; +struct MANGOS_DLL_DECL boss_rotfaceAI : public ScriptedAI +{ + boss_rotfaceAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (instance_icecrown_citadel*)pCreature->GetInstanceData(); + Reset(); + } + + instance_icecrown_citadel* m_pInstance; + + void Reset() + { + } + + void Aggro(Unit *pWho) + { + if (m_pInstance) + m_pInstance->SetData(TYPE_ROTFACE, IN_PROGRESS); + + DoScriptText(SAY_AGGRO, m_creature); + } + + void JustReachedHome() + { + if (m_pInstance) + m_pInstance->SetData(TYPE_ROTFACE, FAIL); + } + + void KilledUnit(Unit* pVictim) + { + if (pVictim->GetTypeId() == TYPEID_PLAYER) + DoScriptText(urand(0,1) ? SAY_SLAY_1 : SAY_SLAY_2, m_creature, pVictim); + } + + void JustDied(Unit *pKiller) + { + if (m_pInstance) + m_pInstance->SetData(TYPE_ROTFACE, DONE); + + DoScriptText(SAY_DEATH, m_creature); + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_rotface(Creature* pCreature) +{ + return new boss_rotfaceAI(pCreature); +} + void AddSC_boss_rotface() { + Script *newscript; + newscript = new Script; + newscript->Name = "boss_rotface"; + newscript->GetAI = &GetAI_boss_rotface; + newscript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 12f0a04e1..593a7ce5e 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2680" + #define SD2_REVISION_NR "2681" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 11ba37f67..c00b8aaa5 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -683,6 +683,7 @@ UPDATE creature_template SET ScriptName='npc_rimefang_icc' WHERE entry=37533; UPDATE creature_template SET ScriptName='npc_spinestalker_icc' WHERE entry=37534; UPDATE creature_template SET ScriptName='mob_frost_bomb' WHERE entry=37186; UPDATE creature_template SET ScriptName='boss_festergut' WHERE entry=36626; +UPDATE creature_template SET ScriptName='boss_rotface' WHERE entry=36626; DELETE FROM scripted_event_id WHERE id IN (23426,23438); INSERT INTO scripted_event_id VALUES (23426,'event_gameobject_citadel_valve'), diff --git a/sql/updates/r2681_mangos.sql b/sql/updates/r2681_mangos.sql new file mode 100644 index 000000000..20b663f97 --- /dev/null +++ b/sql/updates/r2681_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='boss_rotface' WHERE entry=36626; From 681fe15523a72d8069c92d2024cee0c71f05ebea Mon Sep 17 00:00:00 2001 From: michalpolko Date: Sun, 19 Aug 2012 11:08:42 +0200 Subject: [PATCH 0671/1172] [2682] Implemented combat abilities for Rotface. --- .../icecrown_citadel/boss_rotface.cpp | 102 ++++++++++++++++++ sd2_revision_nr.h | 2 +- 2 files changed, 103 insertions(+), 1 deletion(-) diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_rotface.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_rotface.cpp index 1a609ee06..55d6b4d70 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_rotface.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_rotface.cpp @@ -38,6 +38,48 @@ enum SAY_ROTFACE_DEATH = -1631080, }; +enum +{ + SPELL_BERSERK = 47008, + + // Mutated Infection + SPELL_MUTATED_INFECTION_1 = 70090, // periodic trigger auras + SPELL_MUTATED_INFECTION_2 = 70003, + SPELL_MUTATED_INFECTION_3 = 70004, + SPELL_MUTATED_INFECTION_4 = 70005, + SPELL_MUTATED_INFECTION_5 = 70006, + + // Slime Spray + SPELL_SLIME_SPRAY_SUMMON = 70882, + SPELL_SLIME_SPRAY = 69508, + + // Ooze Flood + SPELL_OOZE_FLOOD_PERIODIC = 70069, // periodically trigger ooze flood + SPELL_OOZE_FLOOD_REMOVE = 70079, + + // Little Ooze + SPELL_STICKY_OOZE = 69774, + SPELL_STICKY_AURA = 69776, + SPELL_WEAK_RADIATING_OOZE = 69750, + SPELL_LITTLE_OOZE_COMBINE = 69537, // periodic check + SPELL_MERGE = 69889, + + // Big Ooze + SPELL_UNSTABLE_OOZE = 69558, // stacking buff + SPELL_RADIATING_OOZE = 69760, + SPELL_BIG_OOZE_COMBINE = 69552, // periodic check + SPELL_BIG_OOZE_BUFF_COMB = 69611 // periodic check +}; + +static uint32 uiMutatedInfections[5] = +{ + SPELL_MUTATED_INFECTION_1, + SPELL_MUTATED_INFECTION_2, + SPELL_MUTATED_INFECTION_3, + SPELL_MUTATED_INFECTION_4, + SPELL_MUTATED_INFECTION_5 +}; + struct MANGOS_DLL_DECL boss_rotfaceAI : public ScriptedAI { boss_rotfaceAI(Creature* pCreature) : ScriptedAI(pCreature) @@ -48,8 +90,19 @@ struct MANGOS_DLL_DECL boss_rotfaceAI : public ScriptedAI instance_icecrown_citadel* m_pInstance; + uint32 m_uiSlimeSprayTimer; + uint32 m_uiSlimeFlowTimer; + uint32 m_uiMutatedInfectionTimer; + uint32 m_uiMutatedInfectionBeforeTimer; + uint32 m_uiInfectionsRate; + void Reset() { + m_uiSlimeSprayTimer = urand(17000, 23000); + m_uiSlimeFlowTimer = 20000; + m_uiMutatedInfectionTimer = 60000; + m_uiMutatedInfectionBeforeTimer = 60000; + m_uiInfectionsRate = 1; } void Aggro(Unit *pWho) @@ -58,12 +111,17 @@ struct MANGOS_DLL_DECL boss_rotfaceAI : public ScriptedAI m_pInstance->SetData(TYPE_ROTFACE, IN_PROGRESS); DoScriptText(SAY_AGGRO, m_creature); + + DoCastSpellIfCan(m_creature, SPELL_MUTATED_INFECTION_1, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_OOZE_FLOOD_PERIODIC, CAST_TRIGGERED); } void JustReachedHome() { if (m_pInstance) m_pInstance->SetData(TYPE_ROTFACE, FAIL); + + DoCastSpellIfCan(m_creature, SPELL_OOZE_FLOOD_REMOVE, CAST_TRIGGERED); } void KilledUnit(Unit* pVictim) @@ -85,6 +143,50 @@ struct MANGOS_DLL_DECL boss_rotfaceAI : public ScriptedAI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; + // Slime Spray + if (m_uiSlimeSprayTimer <= uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_SLIME_SPRAY_SUMMON, CAST_TRIGGERED) == CAST_OK) + { + if (DoCastSpellIfCan(m_creature, SPELL_SLIME_SPRAY) == CAST_OK) + { + DoScriptText(SAY_SLIME_SPRAY, m_creature); + m_uiSlimeSprayTimer = urand(17000, 23000); + } + } + } + else + m_uiSlimeSprayTimer -= uiDiff; + + // Mutated Infection - faster with time + // implemented this instead of phases + if (m_uiInfectionsRate < 5) + { + if (m_uiMutatedInfectionTimer <= uiDiff) + { + if (DoCastSpellIfCan(m_creature, uiMutatedInfections[m_uiInfectionsRate]) == CAST_OK) + { + m_creature->RemoveAurasDueToSpell(uiMutatedInfections[m_uiInfectionsRate - 1]); + m_uiMutatedInfectionBeforeTimer = - 10000; // every next 15 seconds faster + m_uiMutatedInfectionTimer = m_uiMutatedInfectionBeforeTimer; + ++m_uiInfectionsRate; + } + } + else + m_uiMutatedInfectionTimer -= uiDiff; + } + + // Slime Flow + if (m_uiSlimeFlowTimer <= uiDiff) + { + if (Creature *pProfessor = m_pInstance->GetSingleCreatureFromStorage(NPC_PROFESSOR_PUTRICIDE)) + DoScriptText(urand(0, 1) ? SAY_SLIME_FLOW_1 : SAY_SLIME_FLOW_2, pProfessor); + + m_uiSlimeFlowTimer = 20000; + } + else + m_uiSlimeFlowTimer -= uiDiff; + DoMeleeAttackIfReady(); } }; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 593a7ce5e..32ee565ca 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2681" + #define SD2_REVISION_NR "2682" #endif // __SD2_REVISION_NR_H__ From 56e7b84e22a50458a659e3a6ef98630987a9d734 Mon Sep 17 00:00:00 2001 From: michalpolko Date: Sun, 19 Aug 2012 11:28:35 +0200 Subject: [PATCH 0672/1172] [2683] Implemented scripts for Little and Big Ooze in Rotface encounter. --- .../icecrown_citadel/boss_rotface.cpp | 160 +++++++++++++++++- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 4 +- sql/updates/r2681_mangos.sql | 1 - sql/updates/r2683_mangos.sql | 3 + 5 files changed, 158 insertions(+), 12 deletions(-) delete mode 100644 sql/updates/r2681_mangos.sql create mode 100644 sql/updates/r2683_mangos.sql diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_rotface.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_rotface.cpp index 55d6b4d70..b47286021 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_rotface.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_rotface.cpp @@ -16,7 +16,7 @@ /* ScriptData SDName: boss_rotface -SD%Complete: 10% +SD%Complete: 70% SDComment: SDCategory: Icecrown Citadel EndScriptData */ @@ -59,16 +59,17 @@ enum // Little Ooze SPELL_STICKY_OOZE = 69774, - SPELL_STICKY_AURA = 69776, + SPELL_STICKY_AURA = 69776, // aura on dummy Sticky Ooze NPC SPELL_WEAK_RADIATING_OOZE = 69750, SPELL_LITTLE_OOZE_COMBINE = 69537, // periodic check - SPELL_MERGE = 69889, + // SPELL_MERGE = 69889, // Big Ooze SPELL_UNSTABLE_OOZE = 69558, // stacking buff SPELL_RADIATING_OOZE = 69760, SPELL_BIG_OOZE_COMBINE = 69552, // periodic check - SPELL_BIG_OOZE_BUFF_COMB = 69611 // periodic check + SPELL_BIG_OOZE_BUFF_COMB = 69611, // periodic check + SPELL_UNSTABLE_EXPLOSION = 69839 }; static uint32 uiMutatedInfections[5] = @@ -196,11 +197,152 @@ CreatureAI* GetAI_boss_rotface(Creature* pCreature) return new boss_rotfaceAI(pCreature); } + +struct MANGOS_DLL_DECL mob_little_oozeAI : public ScriptedAI +{ + mob_little_oozeAI(Creature *pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (instance_icecrown_citadel*)pCreature->GetInstanceData(); + Reset(); + } + + instance_icecrown_citadel* m_pInstance; + uint32 m_uiStickyOozeTimer; + + void Reset() + { + m_uiStickyOozeTimer = 5000; + } + + void EnterEvadeMode() + { + m_creature->ForcedDespawn(); + } + + void Aggro(Unit *pWho) + { + m_creature->AddThreat(pWho, 500000.0f); // not sure about the threat amount but should be very high + DoCastSpellIfCan(m_creature, SPELL_WEAK_RADIATING_OOZE, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_LITTLE_OOZE_COMBINE, CAST_TRIGGERED); + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_uiStickyOozeTimer <= uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_STICKY_OOZE) == CAST_OK) + m_uiStickyOozeTimer = urand(10000, 15000); + } + else + m_uiStickyOozeTimer -= uiDiff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_mob_little_ooze(Creature* pCreature) +{ + return new mob_little_oozeAI(pCreature); +} + + +struct MANGOS_DLL_DECL mob_big_oozeAI : public ScriptedAI +{ + mob_big_oozeAI(Creature *pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (instance_icecrown_citadel*)pCreature->GetInstanceData(); + Reset(); + } + + instance_icecrown_citadel *m_pInstance; + uint32 m_uiStickyOozeTimer; + uint32 m_uiUnstableExplosionCheckTimer; + + void Reset() + { + m_uiStickyOozeTimer = 5000; + m_uiUnstableExplosionCheckTimer = 1000; + } + + void EnterEvadeMode() + { + m_creature->ForcedDespawn(); + } + + void Aggro(Unit *pWho) + { + m_creature->AddThreat(pWho, 500000.0f); + DoCastSpellIfCan(m_creature, SPELL_RADIATING_OOZE, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_BIG_OOZE_COMBINE, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_BIG_OOZE_BUFF_COMB, CAST_TRIGGERED); + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + // Unstable Ooze + if (m_uiUnstableExplosionCheckTimer) + { + if (m_uiUnstableExplosionCheckTimer <= uiDiff) + { + m_uiUnstableExplosionCheckTimer = 1000; + + SpellAuraHolder* holder= m_creature->GetSpellAuraHolder(SPELL_UNSTABLE_OOZE); + if (holder && holder->GetStackAmount() >= 5) + { + if (DoCastSpellIfCan(m_creature, SPELL_UNSTABLE_EXPLOSION) == CAST_OK) + { + if (m_pInstance) + { + if (Creature *pRotface = m_pInstance->GetSingleCreatureFromStorage(NPC_ROTFACE)) + DoScriptText(SAY_OOZE_EXPLODE, pRotface); + } + } + } + } + else + m_uiUnstableExplosionCheckTimer -= uiDiff; + } + + // Sticky Ooze + if (m_uiStickyOozeTimer <= uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_STICKY_OOZE) == CAST_OK) + m_uiStickyOozeTimer = urand(10000, 15000); + } + else + m_uiStickyOozeTimer -= uiDiff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_mob_big_ooze(Creature* pCreature) +{ + return new mob_big_oozeAI(pCreature); +} + void AddSC_boss_rotface() { - Script *newscript; - newscript = new Script; - newscript->Name = "boss_rotface"; - newscript->GetAI = &GetAI_boss_rotface; - newscript->RegisterSelf(); + Script* pNewscript; + + pNewscript = new Script; + pNewscript->Name = "boss_rotface"; + pNewscript->GetAI = &GetAI_boss_rotface; + pNewscript->RegisterSelf(); + + pNewscript = new Script; + pNewscript->Name = "mob_little_ooze"; + pNewscript->GetAI = &GetAI_mob_little_ooze; + pNewscript->RegisterSelf(); + + pNewscript = new Script; + pNewscript->Name = "mob_big_ooze"; + pNewscript->GetAI = &GetAI_mob_big_ooze; + pNewscript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 32ee565ca..c15d9abc0 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2682" + #define SD2_REVISION_NR "2683" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index c00b8aaa5..9252d94b7 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -683,7 +683,9 @@ UPDATE creature_template SET ScriptName='npc_rimefang_icc' WHERE entry=37533; UPDATE creature_template SET ScriptName='npc_spinestalker_icc' WHERE entry=37534; UPDATE creature_template SET ScriptName='mob_frost_bomb' WHERE entry=37186; UPDATE creature_template SET ScriptName='boss_festergut' WHERE entry=36626; -UPDATE creature_template SET ScriptName='boss_rotface' WHERE entry=36626; +UPDATE creature_template SET ScriptName='boss_rotface' WHERE entry=36627; +UPDATE creature_template SET ScriptName='mob_little_ooze' WHERE entry=36897; +UPDATE creature_template SET ScriptName='mob_big_ooze' WHERE entry=36899; DELETE FROM scripted_event_id WHERE id IN (23426,23438); INSERT INTO scripted_event_id VALUES (23426,'event_gameobject_citadel_valve'), diff --git a/sql/updates/r2681_mangos.sql b/sql/updates/r2681_mangos.sql deleted file mode 100644 index 20b663f97..000000000 --- a/sql/updates/r2681_mangos.sql +++ /dev/null @@ -1 +0,0 @@ -UPDATE creature_template SET ScriptName='boss_rotface' WHERE entry=36626; diff --git a/sql/updates/r2683_mangos.sql b/sql/updates/r2683_mangos.sql new file mode 100644 index 000000000..d4e726dd8 --- /dev/null +++ b/sql/updates/r2683_mangos.sql @@ -0,0 +1,3 @@ +UPDATE creature_template SET ScriptName='boss_rotface' WHERE entry=36627; +UPDATE creature_template SET ScriptName='mob_little_ooze' WHERE entry=36897; +UPDATE creature_template SET ScriptName='mob_big_ooze' WHERE entry=36899; From 997a01e885aa06b2da66de42953bac3004608229 Mon Sep 17 00:00:00 2001 From: michalpolko Date: Sun, 19 Aug 2012 11:44:16 +0200 Subject: [PATCH 0673/1172] [2684] Rotface: removed not used berserk spell and implemented (hopefully) more correct way of Slime Spray casting, thx Schmoozerd for pointing. --- .../icecrown_citadel/boss_rotface.cpp | 13 ++++--------- sd2_revision_nr.h | 2 +- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_rotface.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_rotface.cpp index b47286021..069c3ced3 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_rotface.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_rotface.cpp @@ -40,8 +40,6 @@ enum enum { - SPELL_BERSERK = 47008, - // Mutated Infection SPELL_MUTATED_INFECTION_1 = 70090, // periodic trigger auras SPELL_MUTATED_INFECTION_2 = 70003, @@ -50,7 +48,7 @@ enum SPELL_MUTATED_INFECTION_5 = 70006, // Slime Spray - SPELL_SLIME_SPRAY_SUMMON = 70882, + // SPELL_SLIME_SPRAY_SUMMON = 70882, // precast of Slime Spray dmg spell SPELL_SLIME_SPRAY = 69508, // Ooze Flood @@ -147,13 +145,10 @@ struct MANGOS_DLL_DECL boss_rotfaceAI : public ScriptedAI // Slime Spray if (m_uiSlimeSprayTimer <= uiDiff) { - if (DoCastSpellIfCan(m_creature, SPELL_SLIME_SPRAY_SUMMON, CAST_TRIGGERED) == CAST_OK) + if (DoCastSpellIfCan(m_creature, SPELL_SLIME_SPRAY) == CAST_OK) { - if (DoCastSpellIfCan(m_creature, SPELL_SLIME_SPRAY) == CAST_OK) - { - DoScriptText(SAY_SLIME_SPRAY, m_creature); - m_uiSlimeSprayTimer = urand(17000, 23000); - } + DoScriptText(SAY_SLIME_SPRAY, m_creature); + m_uiSlimeSprayTimer = urand(17000, 23000); } } else diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index c15d9abc0..696426a94 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2683" + #define SD2_REVISION_NR "2684" #endif // __SD2_REVISION_NR_H__ From 0d806b2a42d4c056ca449c10ca6e97dae33f76cb Mon Sep 17 00:00:00 2001 From: michalpolko Date: Sun, 19 Aug 2012 12:06:34 +0200 Subject: [PATCH 0674/1172] [2685] Implemented basic script for Valithria Dreamwalker and scripts + combat abilities for her summoned adds. TODO: research on the way adds should be summoned (timers and their speedup), handling of starting and ending (wiping) encounter, handling of dream-phase-Valithria, portals, some spells, outro event. --- .../boss_valithria_dreamwalker.cpp | 447 +++++++++++++++++- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 6 + sql/updates/r2685_mangos.sql | 6 + 4 files changed, 459 insertions(+), 2 deletions(-) create mode 100644 sql/updates/r2685_mangos.sql diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_valithria_dreamwalker.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_valithria_dreamwalker.cpp index e7f734625..82ce9a97c 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_valithria_dreamwalker.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_valithria_dreamwalker.cpp @@ -16,12 +16,13 @@ /* ScriptData SDName: boss_valithria -SD%Complete: 0% +SD%Complete: 20% SDComment: SDCategory: Icecrown Citadel EndScriptData */ #include "precompiled.h" +#include "icecrown_citadel.h" enum SvalnaTexts // TODO Maybe need own file? { @@ -49,6 +50,450 @@ enum SAY_VICTORY = -1631147, }; +// Valithria +enum +{ + SPELL_NIGHTMARE_PORTAL_PRE = 71977, + SPELL_NIGHTMARE_PORTAL = 71987, + SPELL_TWISTED_NIGHTMARES = 71941, + SPELL_TWISTED_NIGHTMARES_DOT = 71940, + SPELL_NIGHTMARE_CLOUD = 71970, // Nightmare Clouds cast this on dreaming Valithria - then she deals this dmg to Real Valithria(?) + SPELL_NIGHTMARE_CLOUD_VISUAL = 71939, + + SPELL_DREAM_PORTAL_PRE = 71301, + SPELL_DREAM_PORTAL = 71305, + SPELL_EMERALD_VIGOR = 70873, + SPELL_DREAM_CLOUD_VISUAL = 70876, + + SPELL_DREAM_STATE = 70766, + + SPELL_DREAMWALKER_RAGE = 71189, + SPELL_IMMUNITY = 72724, + SPELL_CORRUPTION = 70904, + SPELL_DREAM_SLIP = 71196, + SPELL_ICE_SPIKE = 70702, + + SPELL_CLEAR_DREAMS_NIGHTMARES = 75863, // script effect removes Emerald Vigor and Nightmare auras + + // summons + // TODO: + // these spells should be applied to dummy npcs in gates + // they should apply these auras once the encounter has started + // but how to apply this, which spell on which npc and when? + // how to handle summon timers speedup? + SPELL_SUMMON_TIMER_SUPPRESSER = 70912, + SPELL_SUMMON_TIMER_SKELETON = 70913, + SPELL_SUMMON_TIMER_ZOMBIE = 70914, + SPELL_SUMMON_TIMER_ABOMIN = 70915, + SPELL_SUMMON_TIMER_ARCHMAGE = 70916, + + // entries + NPC_NIGHTMARE_PORTAL_PRE = 38429, + NPC_NIGHTMARE_PORTAL = 38430, + NPC_NIGHTMARE_CLOUD = 38421, + NPC_DREAM_PORTAL_PRE = 38186, + NPC_DREAM_PORTAL = 37945, + NPC_DREAM_CLOUD = 37985, + + // Achievements + SPELL_ACHIEVEMENT_CREDIT = 72706, + + // other + SUMMON_TYPES_NUMBER = 4 +}; + +// adds +enum +{ + // Risen Archmage + SPELL_FROSTBOLT_VOLLEY = 70759, + SPELL_MANA_VOID = 71179, + SPELL_VOID_BUFF = 71085, + SPELL_COLUMN_OF_FROST = 70704, + SPELL_COLUMN_OF_FROST_VISUAL = 70715, + SPELL_COLUMN_OF_FROST_TRIG = 70702, + + // Blazing Skeleton + SPELL_FIREBALL = 70754, + SPELL_LAY_WASTE = 69325, + + // Suppresser + SPELL_SUPPRESSION = 70588, // NOTE: must stack from many casters + + // Blistering Zombie + SPELL_CORROSION = 70749, + SPELL_ACID_BURST = 70744, // 750ms cast time. seems like it is cast always before dying + + // Gluttonous Abomination + SPELL_GUT_SPRAY = 71283, + SPELL_ROT_WORM_SPAWNER = 70675, // cast around 30% HP or something? + SPELL_ROT_WORM = 72962, + + // entries + NPC_RISEN_ARCHMAGE = 37868, + NPC_COLUMN_OF_FROST = 37918, + NPC_MANA_VOID = 38068, + NPC_SUPPRESSER = 37863, + NPC_BLAZING_SKELETON = 36791, + NPC_BLISTERING_ZOMBIE = 37934, + NPC_GLUTTONOUS_ABOMINATION = 37886, + NPC_ROT_WORM = 37907 +}; + +static uint32 m_uiSummonedAddsEntries[SUMMON_TYPES_NUMBER] = +{ + NPC_GLUTTONOUS_ABOMINATION, + NPC_RISEN_ARCHMAGE, + NPC_BLISTERING_ZOMBIE, + NPC_BLAZING_SKELETON +}; + +static const float fValithriaPosition[5][3] = +{ + {4203.470215f, 2484.500000f, 364.872009f}, // 0 Valithria + {4240.688477f, 2405.794678f, 364.868591f}, // 1 Valithria Room 1 + {4239.579102f, 2566.753418f, 364.868439f}, // 2 Valithria Room 2 + {4166.216797f, 2564.197266f, 364.873047f}, // 3 Valithria Room 3 + {4165.112305f, 2405.872559f, 364.872925f} // 4 Valithria Room 4 +}; + +struct MANGOS_DLL_DECL boss_valithria_dreamwalkerAI : public ScriptedAI +{ + boss_valithria_dreamwalkerAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (instance_icecrown_citadel*)pCreature->GetInstanceData(); + Reset(); + } + + instance_icecrown_citadel* m_pInstance; + + void Reset() + { + } + + void JustReachedHome() + { + if (m_pInstance) + m_pInstance->SetData(TYPE_VALITHRIA, FAIL); + } + + // actually, when summoned creature kills a player + void KilledUnit(Unit* pVictim) + { + if (pVictim->GetTypeId() == TYPEID_PLAYER) + DoScriptText(SAY_PLAYER_DIES, m_creature, pVictim); + } + + void JustDied(Unit *pKiller) + { + DoScriptText(SAY_0_HEALTH, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_VALITHRIA, FAIL); + } + + void UpdateAI(const uint32 uiDiff) + { + } +}; + +CreatureAI* GetAI_boss_valithria_dreamwalker(Creature* pCreature) +{ + return new boss_valithria_dreamwalkerAI(pCreature); +}; + +// Gluttonous Abomination +struct MANGOS_DLL_DECL mob_gluttonous_abominationAI : public ScriptedAI +{ + mob_gluttonous_abominationAI(Creature *pCreature) : ScriptedAI(pCreature) + { + Reset(); + } + + uint32 m_uiGutSprayTimer; + + void Reset() + { + m_uiGutSprayTimer = urand(3000, 5000); + } + + void JustDied(Unit *pKiller) + { + DoCastSpellIfCan(m_creature, SPELL_ROT_WORM_SPAWNER, CAST_TRIGGERED); + } + + void JustSummoned(Creature *pCreature) + { + pCreature->SetInCombatWithZone(); + pCreature->CastSpell(pCreature, SPELL_ROT_WORM, true); + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + // Gut Spray + if (m_uiGutSprayTimer <= uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_GUT_SPRAY) == CAST_OK) + m_uiGutSprayTimer = urand(5000, 10000); + } + else + m_uiGutSprayTimer -= uiDiff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_mob_gluttonous_abomination(Creature *pCreature) +{ + return new mob_gluttonous_abominationAI(pCreature); +}; + +// Blistering Zombie +struct MANGOS_DLL_DECL mob_blistering_zombieAI : public ScriptedAI +{ + mob_blistering_zombieAI(Creature *pCreature) : ScriptedAI(pCreature) + { + Reset(); + } + + bool m_bHasDied; + + void Reset() + { + m_bHasDied = false; + } + + void Aggro(Unit *pWho) + { + DoCastSpellIfCan(m_creature, SPELL_CORROSION, CAST_TRIGGERED); + } + + void DamageTaken(Unit *pDealer, uint32 &uiDamage) + { + if (uiDamage > m_creature->GetHealth()) + { + uiDamage = 0; + + if (!m_bHasDied) + { + if (DoCastSpellIfCan(m_creature, SPELL_ACID_BURST) == CAST_OK) + { + SetCombatMovement(false); + m_bHasDied = true; + m_creature->ForcedDespawn(2000); + } + } + } + } + + void UpdateAI(const uint32 uiDiff) + { + if (m_bHasDied) + return; + + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_mob_blistering_zombie(Creature *pCreature) +{ + return new mob_blistering_zombieAI(pCreature); +}; + +// Risen Archmage +struct MANGOS_DLL_DECL mob_risen_archmageAI : public ScriptedAI +{ + mob_risen_archmageAI(Creature *pCreature) : ScriptedAI(pCreature) + { + Reset(); + } + + uint32 m_uiFrostboltVolleyTimer; + uint32 m_uiColumnOfFrostTimer; + uint32 m_uiManaVoidTimer; + + void Reset() + { + m_uiFrostboltVolleyTimer = urand(3000, 5000); + m_uiColumnOfFrostTimer = urand(3000, 5000); + m_uiManaVoidTimer = urand(5000, 10000); + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + // Frostbolt Volley + if (m_uiFrostboltVolleyTimer <= uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_FROSTBOLT_VOLLEY) == CAST_OK) + m_uiFrostboltVolleyTimer = urand(5000, 15000); + } + else + m_uiFrostboltVolleyTimer -= uiDiff; + + // Column of Frost + if (m_uiColumnOfFrostTimer <= uiDiff) + { + if (Unit *pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0, SPELL_COLUMN_OF_FROST, SELECT_FLAG_PLAYER)) + { + if (DoCastSpellIfCan(pTarget, SPELL_COLUMN_OF_FROST) == CAST_OK) + m_uiColumnOfFrostTimer = urand(10000, 15000); + } + } + else + m_uiColumnOfFrostTimer -= uiDiff; + + // Mana Void + if (m_uiManaVoidTimer <= uiDiff) + { + if (Unit *pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0, SPELL_MANA_VOID, SELECT_FLAG_PLAYER)) + { + if (DoCastSpellIfCan(pTarget, SPELL_MANA_VOID) == CAST_OK) + m_uiManaVoidTimer = urand(10000, 15000); + } + } + else + m_uiManaVoidTimer -= uiDiff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_mob_risen_archmage(Creature *pCreature) +{ + return new mob_risen_archmageAI(pCreature); +}; + +// Blazing Skeleton +struct MANGOS_DLL_DECL mob_blazing_skeletonAI : public ScriptedAI +{ + mob_blazing_skeletonAI(Creature *pCreature) : ScriptedAI(pCreature) + { + Reset(); + } + + uint32 m_uiFireballTimer; + uint32 m_uiLayWasteTimer; + + void Reset() + { + m_uiFireballTimer = urand(3000, 5000); + m_uiLayWasteTimer = urand(15000, 30000); + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + // Fireball + if (m_uiFireballTimer <= uiDiff) + { + if (Unit *pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0, SPELL_FIREBALL, SELECT_FLAG_PLAYER)) + { + if (DoCastSpellIfCan(pTarget, SPELL_FIREBALL) == CAST_OK) + m_uiFireballTimer = urand(3000, 5000); + } + } + else + m_uiFireballTimer -= uiDiff; + + // Lay Waste + if (m_uiLayWasteTimer <= uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_LAY_WASTE) == CAST_OK) + m_uiLayWasteTimer = urand(20000, 25000); + } + else + m_uiLayWasteTimer -= uiDiff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_mob_blazing_skeleton(Creature *pCreature) +{ + return new mob_blazing_skeletonAI(pCreature); +}; + +// Suppresser +struct MANGOS_DLL_DECL mob_suppresserAI : public ScriptedAI +{ + mob_suppresserAI(Creature *pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (instance_icecrown_citadel*)pCreature->GetInstanceData(); + } + + instance_icecrown_citadel* m_pInstance; + + void Reset(){} + + void UpdateAI(const uint32 uiDiff) + { + if (m_pInstance) + { + if (m_pInstance->GetData(TYPE_VALITHRIA) == FAIL) + { + m_creature->ForcedDespawn(); + return; + } + } + + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_creature->getVictim()->GetEntry() == NPC_VALITHRIA) + { + if (m_creature->CanReachWithMeleeAttack(m_creature->getVictim())) + DoCastSpellIfCan(m_creature->getVictim(), SPELL_SUPPRESSION); + } + } +}; + +CreatureAI* GetAI_mob_suppresser(Creature *pCreature) +{ + return new mob_suppresserAI(pCreature); +}; + void AddSC_boss_valithria_dreamwalker() { + Script* pNewscript; + + pNewscript = new Script; + pNewscript->Name = "boss_valithria_dreamwalker"; + pNewscript->GetAI = &GetAI_boss_valithria_dreamwalker; + pNewscript->RegisterSelf(); + + pNewscript = new Script; + pNewscript->Name = "mob_gluttonous_abomination"; + pNewscript->GetAI = &GetAI_mob_gluttonous_abomination; + pNewscript->RegisterSelf(); + + pNewscript = new Script; + pNewscript->Name = "mob_blistering_zombie"; + pNewscript->GetAI = &GetAI_mob_blistering_zombie; + pNewscript->RegisterSelf(); + + pNewscript = new Script; + pNewscript->Name = "mob_risen_archmage"; + pNewscript->GetAI = &GetAI_mob_risen_archmage; + pNewscript->RegisterSelf(); + + pNewscript = new Script; + pNewscript->Name = "mob_blazing_skeleton"; + pNewscript->GetAI = &GetAI_mob_blazing_skeleton; + pNewscript->RegisterSelf(); + + pNewscript = new Script; + pNewscript->Name = "mob_suppresser"; + pNewscript->GetAI = &GetAI_mob_suppresser; + pNewscript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 696426a94..eb65971c3 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2684" + #define SD2_REVISION_NR "2685" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 9252d94b7..db03aa0bb 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -686,6 +686,12 @@ UPDATE creature_template SET ScriptName='boss_festergut' WHERE entry=36626; UPDATE creature_template SET ScriptName='boss_rotface' WHERE entry=36627; UPDATE creature_template SET ScriptName='mob_little_ooze' WHERE entry=36897; UPDATE creature_template SET ScriptName='mob_big_ooze' WHERE entry=36899; +UPDATE creature_template SET ScriptName='boss_valithria_dreamwalker' WHERE entry=36789; +UPDATE creature_template SET ScriptName='mob_gluttonous_abomination' WHERE entry=37886; +UPDATE creature_template SET ScriptName='mob_blistering_zombie' WHERE entry=37934; +UPDATE creature_template SET ScriptName='mob_risen_archmage' WHERE entry=37868; +UPDATE creature_template SET ScriptName='mob_blazing_skeleton' WHERE entry=36791; +UPDATE creature_template SET ScriptName='mob_suppresser' WHERE entry=37863; DELETE FROM scripted_event_id WHERE id IN (23426,23438); INSERT INTO scripted_event_id VALUES (23426,'event_gameobject_citadel_valve'), diff --git a/sql/updates/r2685_mangos.sql b/sql/updates/r2685_mangos.sql new file mode 100644 index 000000000..971d0bb88 --- /dev/null +++ b/sql/updates/r2685_mangos.sql @@ -0,0 +1,6 @@ +UPDATE creature_template SET ScriptName='boss_valithria_dreamwalker' WHERE entry=36789; +UPDATE creature_template SET ScriptName='mob_gluttonous_abomination' WHERE entry=37886; +UPDATE creature_template SET ScriptName='mob_blistering_zombie' WHERE entry=37934; +UPDATE creature_template SET ScriptName='mob_risen_archmage' WHERE entry=37868; +UPDATE creature_template SET ScriptName='mob_blazing_skeleton' WHERE entry=36791; +UPDATE creature_template SET ScriptName='mob_suppresser' WHERE entry=37863; From a043d4955e9fbd6f5786840335f0a7e610e45ae6 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Mon, 20 Aug 2012 00:27:25 +0300 Subject: [PATCH 0675/1172] [2686] Fix some combat timers Thanks to X-Savior for providing the proper data! --- .../scarlet_monastery/boss_arcanist_doan.cpp | 10 +- .../scarlet_monastery/boss_herod.cpp | 9 +- .../boss_mograine_and_whitemane.cpp | 94 ++++++++----------- .../tempest_keep/botanica/boss_laj.cpp | 12 +-- .../botanica/boss_warp_splinter.cpp | 12 +-- .../boss_nethermancer_sepethrea.cpp | 12 +-- .../boss_pathaleon_the_calculator.cpp | 41 ++++---- sd2_revision_nr.h | 2 +- 8 files changed, 83 insertions(+), 109 deletions(-) diff --git a/scripts/eastern_kingdoms/scarlet_monastery/boss_arcanist_doan.cpp b/scripts/eastern_kingdoms/scarlet_monastery/boss_arcanist_doan.cpp index a34091dc7..df052f9c7 100644 --- a/scripts/eastern_kingdoms/scarlet_monastery/boss_arcanist_doan.cpp +++ b/scripts/eastern_kingdoms/scarlet_monastery/boss_arcanist_doan.cpp @@ -48,10 +48,10 @@ struct MANGOS_DLL_DECL boss_arcanist_doanAI : public ScriptedAI void Reset() { m_uiPolymorphTimer = 15000; - m_uiSilenceTimer = 18000; - m_uiArcaneExplosionTimer = 3000; + m_uiSilenceTimer = 7500; + m_uiArcaneExplosionTimer = urand(1000, 3000); m_uiDetonationTimer = 0; - bShielded = false; + bShielded = false; } void Aggro(Unit* pWho) @@ -107,7 +107,7 @@ struct MANGOS_DLL_DECL boss_arcanist_doanAI : public ScriptedAI if (m_uiSilenceTimer < uiDiff) { if (DoCastSpellIfCan(m_creature, SPELL_SILENCE) == CAST_OK) - m_uiSilenceTimer = urand(15000, 20000); + m_uiSilenceTimer = urand(15000, 22000); } else m_uiSilenceTimer -= uiDiff; @@ -116,7 +116,7 @@ struct MANGOS_DLL_DECL boss_arcanist_doanAI : public ScriptedAI if (m_uiArcaneExplosionTimer < uiDiff) { if (DoCastSpellIfCan(m_creature, SPELL_ARCANE_EXPLOSION) == CAST_OK) - m_uiArcaneExplosionTimer = 8000; + m_uiArcaneExplosionTimer = urand(2500, 8500); } else m_uiArcaneExplosionTimer -= uiDiff; diff --git a/scripts/eastern_kingdoms/scarlet_monastery/boss_herod.cpp b/scripts/eastern_kingdoms/scarlet_monastery/boss_herod.cpp index 34d7cce90..ff3cb58c3 100644 --- a/scripts/eastern_kingdoms/scarlet_monastery/boss_herod.cpp +++ b/scripts/eastern_kingdoms/scarlet_monastery/boss_herod.cpp @@ -57,8 +57,8 @@ struct MANGOS_DLL_DECL boss_herodAI : public ScriptedAI m_bTraineeSay = false; m_bEnrage = false; - m_uiCleaveTimer = 12000; - m_uiWhirlwindTimer = 45000; + m_uiCleaveTimer = 7500; + m_uiWhirlwindTimer = 14500; } void Aggro(Unit* pWho) @@ -75,7 +75,6 @@ struct MANGOS_DLL_DECL boss_herodAI : public ScriptedAI DoScriptText(SAY_TRAINEE_SPAWN, pSummoned); m_bTraineeSay = true; } - } void KilledUnit(Unit* pVictim) @@ -109,7 +108,7 @@ struct MANGOS_DLL_DECL boss_herodAI : public ScriptedAI if (m_uiCleaveTimer < uiDiff) { DoCastSpellIfCan(m_creature->getVictim(), SPELL_CLEAVE); - m_uiCleaveTimer = 12000; + m_uiCleaveTimer = urand(7500, 17500); } else m_uiCleaveTimer -= uiDiff; @@ -119,7 +118,7 @@ struct MANGOS_DLL_DECL boss_herodAI : public ScriptedAI if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_WHIRLWIND) == CAST_OK) { DoScriptText(SAY_WHIRLWIND, m_creature); - m_uiWhirlwindTimer = 30000; + m_uiWhirlwindTimer = urand(15000, 25000); } } else diff --git a/scripts/eastern_kingdoms/scarlet_monastery/boss_mograine_and_whitemane.cpp b/scripts/eastern_kingdoms/scarlet_monastery/boss_mograine_and_whitemane.cpp index 29b86e412..fc16d2257 100644 --- a/scripts/eastern_kingdoms/scarlet_monastery/boss_mograine_and_whitemane.cpp +++ b/scripts/eastern_kingdoms/scarlet_monastery/boss_mograine_and_whitemane.cpp @@ -70,18 +70,18 @@ struct MANGOS_DLL_DECL boss_scarlet_commander_mograineAI : public ScriptedAI void Reset() { - m_uiCrusaderStrike_Timer = 10000; - m_uiHammerOfJustice_Timer = 10000; + m_uiCrusaderStrike_Timer = 8400; + m_uiHammerOfJustice_Timer = 9600; + + m_bHasDied = false; + m_bHeal = false; + m_bFakeDeath = false; //Incase wipe during phase that mograine fake death m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); m_creature->SetStandState(UNIT_STAND_STATE_STAND); - m_bHasDied = false; - m_bHeal = false; - m_bFakeDeath = false; - if (!m_pInstance) return; @@ -163,20 +163,18 @@ struct MANGOS_DLL_DECL boss_scarlet_commander_mograineAI : public ScriptedAI if (m_bHasDied && !m_bHeal && m_pInstance && m_pInstance->GetData(TYPE_MOGRAINE_AND_WHITE_EVENT) == SPECIAL) { //On ressurection, stop fake death and heal whitemane and resume fight - if (Creature* pWhitemane = m_pInstance->GetSingleCreatureFromStorage(NPC_WHITEMANE)) - { - m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - m_creature->SetStandState(UNIT_STAND_STATE_STAND); - DoCastSpellIfCan(pWhitemane, SPELL_LAYONHANDS); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + m_creature->SetStandState(UNIT_STAND_STATE_STAND); + // spell has script target on Whitemane + DoCastSpellIfCan(m_creature, SPELL_LAYONHANDS); - m_uiCrusaderStrike_Timer = 10000; - m_uiHammerOfJustice_Timer = 10000; + m_uiCrusaderStrike_Timer = 8400; + m_uiHammerOfJustice_Timer = 9600; - if (m_creature->getVictim()) - m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); + if (m_creature->getVictim()) + m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); - m_bHeal = true; - } + m_bHeal = true; } //This if-check to make sure mograine does not attack while fake death @@ -186,8 +184,8 @@ struct MANGOS_DLL_DECL boss_scarlet_commander_mograineAI : public ScriptedAI //m_uiCrusaderStrike_Timer if (m_uiCrusaderStrike_Timer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_CRUSADERSTRIKE); - m_uiCrusaderStrike_Timer = 10000; + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_CRUSADERSTRIKE) == CAST_OK) + m_uiCrusaderStrike_Timer = urand(6000, 15000); } else m_uiCrusaderStrike_Timer -= uiDiff; @@ -195,8 +193,8 @@ struct MANGOS_DLL_DECL boss_scarlet_commander_mograineAI : public ScriptedAI //m_uiHammerOfJustice_Timer if (m_uiHammerOfJustice_Timer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_HAMMEROFJUSTICE); - m_uiHammerOfJustice_Timer = 60000; + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_HAMMEROFJUSTICE) == CAST_OK) + m_uiHammerOfJustice_Timer = urand(7000, 18500); } else m_uiHammerOfJustice_Timer -= uiDiff; @@ -225,13 +223,13 @@ struct MANGOS_DLL_DECL boss_high_inquisitor_whitemaneAI : public ScriptedAI void Reset() { - m_uiWait_Timer = 7000; - m_uiHeal_Timer = 10000; + m_uiWait_Timer = 7000; + m_uiHeal_Timer = 10000; m_uiPowerWordShield_Timer = 15000; - m_uiHolySmite_Timer = 6000; + m_uiHolySmite_Timer = 4000; - m_bCanResurrectCheck = false; - m_bCanResurrect = false; + m_bCanResurrectCheck = false; + m_bCanResurrect = false; if (!m_pInstance) return; @@ -295,14 +293,12 @@ struct MANGOS_DLL_DECL boss_high_inquisitor_whitemaneAI : public ScriptedAI if (m_bCanResurrect) { //When casting resuruction make sure to delay so on rez when reinstate battle deepsleep runs out - if (m_pInstance && m_uiWait_Timer < uiDiff) + if (m_uiWait_Timer < uiDiff) { - if (Creature* pMograine = m_pInstance->GetSingleCreatureFromStorage(NPC_MOGRAINE)) - { - DoCastSpellIfCan(pMograine, SPELL_SCARLETRESURRECTION); - DoScriptText(SAY_WH_RESSURECT, m_creature); - m_bCanResurrect = false; - } + // spell has script target on Mograine + DoCastSpellIfCan(m_creature, SPELL_SCARLETRESURRECTION); + DoScriptText(SAY_WH_RESSURECT, m_creature); + m_bCanResurrect = false; } else m_uiWait_Timer -= uiDiff; @@ -311,10 +307,7 @@ struct MANGOS_DLL_DECL boss_high_inquisitor_whitemaneAI : public ScriptedAI //Cast Deep sleep when health is less than 50% if (!m_bCanResurrectCheck && m_creature->GetHealthPercent() <= 50.0f) { - if (m_creature->IsNonMeleeSpellCasted(false)) - m_creature->InterruptNonMeleeSpells(false); - - DoCastSpellIfCan(m_creature->getVictim(), SPELL_DEEPSLEEP); + DoCastSpellIfCan(m_creature, SPELL_DEEPSLEEP, CAST_INTERRUPT_PREVIOUS); m_bCanResurrectCheck = true; m_bCanResurrect = true; return; @@ -327,24 +320,11 @@ struct MANGOS_DLL_DECL boss_high_inquisitor_whitemaneAI : public ScriptedAI //If we are <75% hp cast healing spells at self or Mograine if (m_uiHeal_Timer < uiDiff) { - Creature* pTarget = NULL; - - if (m_creature->GetHealthPercent() <= 75.0f) - pTarget = m_creature; - - if (m_pInstance) + if (Unit* pTarget = DoSelectLowestHpFriendly(50.0f)) { - if (Creature* pMograine = m_pInstance->GetSingleCreatureFromStorage(NPC_MOGRAINE)) - { - if (pMograine->isAlive() && pMograine->GetHealthPercent() <= 75.0f) - pTarget = pMograine; - } + if (DoCastSpellIfCan(pTarget, SPELL_HEAL) == CAST_OK) + m_uiHeal_Timer = 13000; } - - if (pTarget) - DoCastSpellIfCan(pTarget, SPELL_HEAL); - - m_uiHeal_Timer = 13000; } else m_uiHeal_Timer -= uiDiff; @@ -352,8 +332,8 @@ struct MANGOS_DLL_DECL boss_high_inquisitor_whitemaneAI : public ScriptedAI //m_uiPowerWordShield_Timer if (m_uiPowerWordShield_Timer < uiDiff) { - DoCastSpellIfCan(m_creature,SPELL_POWERWORDSHIELD); - m_uiPowerWordShield_Timer = 15000; + if (DoCastSpellIfCan(m_creature, SPELL_POWERWORDSHIELD) == CAST_OK) + m_uiPowerWordShield_Timer = urand(22000, 45000); } else m_uiPowerWordShield_Timer -= uiDiff; @@ -361,8 +341,8 @@ struct MANGOS_DLL_DECL boss_high_inquisitor_whitemaneAI : public ScriptedAI //m_uiHolySmite_Timer if (m_uiHolySmite_Timer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_HOLYSMITE); - m_uiHolySmite_Timer = 6000; + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_HOLYSMITE) == CAST_OK) + m_uiHolySmite_Timer = urand(3500, 5000); } else m_uiHolySmite_Timer -= uiDiff; diff --git a/scripts/outland/tempest_keep/botanica/boss_laj.cpp b/scripts/outland/tempest_keep/botanica/boss_laj.cpp index 69e80d665..92aeae53c 100644 --- a/scripts/outland/tempest_keep/botanica/boss_laj.cpp +++ b/scripts/outland/tempest_keep/botanica/boss_laj.cpp @@ -66,11 +66,11 @@ struct MANGOS_DLL_DECL boss_lajAI : public ScriptedAI m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_FROST, false); m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_NATURE, false); - m_uiTeleportTimer = 15000; + m_uiTeleportTimer = urand(17000, 26000); m_uiSummonTimer = 0; m_uiTransformTimer = 30000; - m_uiAllergicTimer = 5000; - m_uiTrashTimer = urand(4000, 7000); + m_uiAllergicTimer = urand(8500, 30000); + m_uiTrashTimer = urand(3600, 5000); } void DoTransform() @@ -174,7 +174,7 @@ struct MANGOS_DLL_DECL boss_lajAI : public ScriptedAI if (m_uiAllergicTimer < uiDiff) { if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_ALLERGIC_REACTION) == CAST_OK) - m_uiAllergicTimer = urand(25000, 40000); + m_uiAllergicTimer = urand(21000, 32000); } else m_uiAllergicTimer -= uiDiff; @@ -184,7 +184,7 @@ struct MANGOS_DLL_DECL boss_lajAI : public ScriptedAI if (DoCastSpellIfCan(m_creature, SPELL_TELEPORT_SELF) == CAST_OK) { m_creature->GetMotionMaster()->MoveIdle(); - m_uiTeleportTimer = urand(30000, 40000); + m_uiTeleportTimer = urand(25000, 33000); m_uiSummonTimer = 4000; } } @@ -202,7 +202,7 @@ struct MANGOS_DLL_DECL boss_lajAI : public ScriptedAI if (m_uiTrashTimer < uiDiff) { if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_TRASH) == CAST_OK) - m_uiTrashTimer = urand(4000, 9000); + m_uiTrashTimer = urand(10000, 24000); } else m_uiTrashTimer -= uiDiff; diff --git a/scripts/outland/tempest_keep/botanica/boss_warp_splinter.cpp b/scripts/outland/tempest_keep/botanica/boss_warp_splinter.cpp index 5fdc733d5..2b16e0772 100644 --- a/scripts/outland/tempest_keep/botanica/boss_warp_splinter.cpp +++ b/scripts/outland/tempest_keep/botanica/boss_warp_splinter.cpp @@ -69,9 +69,9 @@ struct MANGOS_DLL_DECL boss_warp_splinterAI : public ScriptedAI void Reset() { - m_uiWarStompTimer = 20000; - m_uiSummonTreantsTimer = 15000; - m_uiArcaneVolleyTimer = urand(20000, 25000); + m_uiWarStompTimer = urand(6000, 7000); + m_uiSummonTreantsTimer = urand(25000, 35000); + m_uiArcaneVolleyTimer = urand(12000, 14500); } void Aggro(Unit* pWho) @@ -116,7 +116,7 @@ struct MANGOS_DLL_DECL boss_warp_splinterAI : public ScriptedAI if (m_uiWarStompTimer < uiDiff) { if (DoCastSpellIfCan(m_creature, SPELL_WAR_STOMP) == CAST_OK) - m_uiWarStompTimer = urand(25000, 30000); + m_uiWarStompTimer = urand(17000, 38000); } else m_uiWarStompTimer -= uiDiff; @@ -125,7 +125,7 @@ struct MANGOS_DLL_DECL boss_warp_splinterAI : public ScriptedAI if (m_uiArcaneVolleyTimer < uiDiff) { if (DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_ARCANE_VOLLEY : SPELL_ARCANE_VOLLEY_H) == CAST_OK) - m_uiArcaneVolleyTimer = urand(20000, 35000); + m_uiArcaneVolleyTimer = urand(16000, 38000); } else m_uiArcaneVolleyTimer -= uiDiff; @@ -134,7 +134,7 @@ struct MANGOS_DLL_DECL boss_warp_splinterAI : public ScriptedAI if (m_uiSummonTreantsTimer < uiDiff) { SummonTreants(); - m_uiSummonTreantsTimer = 45000; + m_uiSummonTreantsTimer = urand(37000, 55000); } else m_uiSummonTreantsTimer -= uiDiff; diff --git a/scripts/outland/tempest_keep/the_mechanar/boss_nethermancer_sepethrea.cpp b/scripts/outland/tempest_keep/the_mechanar/boss_nethermancer_sepethrea.cpp index 6105811e8..9003aae93 100644 --- a/scripts/outland/tempest_keep/the_mechanar/boss_nethermancer_sepethrea.cpp +++ b/scripts/outland/tempest_keep/the_mechanar/boss_nethermancer_sepethrea.cpp @@ -61,9 +61,9 @@ struct MANGOS_DLL_DECL boss_nethermancer_sepethreaAI : public ScriptedAI void Reset() { - m_uiFrostAttackTimer = urand(7000, 10000); - m_uiArcaneBlastTimer = urand(12000, 18000); - m_uiDragonsBreathTimer = urand(18000, 22000); + m_uiFrostAttackTimer = urand(8000, 17000); + m_uiArcaneBlastTimer = urand(14000, 25000); + m_uiDragonsBreathTimer = urand(20000, 26000); } void Aggro(Unit* pWho) @@ -108,7 +108,7 @@ struct MANGOS_DLL_DECL boss_nethermancer_sepethreaAI : public ScriptedAI if (m_uiFrostAttackTimer < uiDiff) { if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_FROST_ATTACK) == CAST_OK) - m_uiFrostAttackTimer = urand(7000, 10000); + m_uiFrostAttackTimer = urand(5000, 17000); } else m_uiFrostAttackTimer -= uiDiff; @@ -117,7 +117,7 @@ struct MANGOS_DLL_DECL boss_nethermancer_sepethreaAI : public ScriptedAI if (m_uiArcaneBlastTimer < uiDiff) { if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_ARCANE_BLAST) == CAST_OK) - m_uiArcaneBlastTimer = 15000; + m_uiArcaneBlastTimer = urand(15000, 30000); } else m_uiArcaneBlastTimer -= uiDiff; @@ -130,7 +130,7 @@ struct MANGOS_DLL_DECL boss_nethermancer_sepethreaAI : public ScriptedAI if (urand(0, 1)) DoScriptText(urand(0, 1) ? SAY_DRAGONS_BREATH_1 : SAY_DRAGONS_BREATH_2, m_creature); - m_uiDragonsBreathTimer = urand(12000, 22000); + m_uiDragonsBreathTimer = urand(20000, 35000); } } else diff --git a/scripts/outland/tempest_keep/the_mechanar/boss_pathaleon_the_calculator.cpp b/scripts/outland/tempest_keep/the_mechanar/boss_pathaleon_the_calculator.cpp index db1533fcf..02d8ecde3 100644 --- a/scripts/outland/tempest_keep/the_mechanar/boss_pathaleon_the_calculator.cpp +++ b/scripts/outland/tempest_keep/the_mechanar/boss_pathaleon_the_calculator.cpp @@ -78,12 +78,12 @@ struct MANGOS_DLL_DECL boss_pathaleon_the_calculatorAI : public ScriptedAI void Reset() { - m_uiSummonTimer = 30000; - m_uiAngerTimer = urand(30000, 35000); - m_uiManaTapTimer = urand(12000, 20000); - m_uiArcaneTorrentTimer = urand(16000, 25000); + m_uiSummonTimer = urand(12000, 23000); + m_uiAngerTimer = urand(31000, 42000); + m_uiManaTapTimer = urand(2000, 9000); + m_uiArcaneTorrentTimer = urand(11000, 24000); m_uiDominationTimer = urand(25000, 40000); - m_uiArcaneExplosionTimer = urand(8000, 13000); + m_uiArcaneExplosionTimer = urand(18000, 45000); m_bIsEnraged = false; } @@ -122,7 +122,7 @@ struct MANGOS_DLL_DECL boss_pathaleon_the_calculatorAI : public ScriptedAI if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0, SPELL_MANA_TAP, SELECT_FLAG_POWER_MANA)) { if (DoCastSpellIfCan(pTarget, SPELL_MANA_TAP) == CAST_OK) - m_uiManaTapTimer = urand(14000, 22000); + m_uiManaTapTimer = urand(16000, 34000); } } else @@ -131,7 +131,7 @@ struct MANGOS_DLL_DECL boss_pathaleon_the_calculatorAI : public ScriptedAI if (m_uiArcaneTorrentTimer < uiDiff) { if (DoCastSpellIfCan(m_creature, SPELL_ARCANE_TORRENT) == CAST_OK) - m_uiArcaneTorrentTimer = urand(40000, 50000); + m_uiArcaneTorrentTimer = urand(40000, 52000); } else m_uiArcaneTorrentTimer -= uiDiff; @@ -156,7 +156,7 @@ struct MANGOS_DLL_DECL boss_pathaleon_the_calculatorAI : public ScriptedAI if (m_uiArcaneExplosionTimer < uiDiff) { if (DoCastSpellIfCan(m_creature, SPELL_ARCANE_EXPLOSION_H) == CAST_OK) - m_uiArcaneExplosionTimer = urand(18000, 20000); + m_uiArcaneExplosionTimer = urand(13000, 25000); } else m_uiArcaneExplosionTimer -= uiDiff; @@ -181,7 +181,7 @@ struct MANGOS_DLL_DECL boss_pathaleon_the_calculatorAI : public ScriptedAI DoCastSpellIfCan(m_creature, aWraithSummonSpells[i], CAST_TRIGGERED); DoScriptText(SAY_SUMMON, m_creature); - m_uiSummonTimer = 50000; + m_uiSummonTimer = urand(45000, 50000); } else m_uiSummonTimer -= uiDiff; @@ -189,7 +189,7 @@ struct MANGOS_DLL_DECL boss_pathaleon_the_calculatorAI : public ScriptedAI if (m_uiAngerTimer < uiDiff) { if (DoCastSpellIfCan(m_creature, SPELL_DISGRUNTLED_ANGER) == CAST_OK) - m_uiAngerTimer = urand(60000, 90000); + m_uiAngerTimer = urand(55000, 84000); } else m_uiAngerTimer -= uiDiff; @@ -204,12 +204,12 @@ struct MANGOS_DLL_DECL mob_nether_wraithAI : public ScriptedAI mob_nether_wraithAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} uint32 m_uiArcaneMissilesTimer; - uint32 m_uiDetonationTimer; + bool m_bHasDetonated; void Reset() { m_uiArcaneMissilesTimer = urand(1000, 4000); - m_uiDetonationTimer = 30000; + m_bHasDetonated = false; } void UpdateAI(const uint32 uiDiff) @@ -232,20 +232,15 @@ struct MANGOS_DLL_DECL mob_nether_wraithAI : public ScriptedAI else m_uiArcaneMissilesTimer -=uiDiff; - if (m_uiDetonationTimer) + if (!m_bHasDetonated && m_creature->GetHealthPercent() < 10.0f) { - if (m_uiDetonationTimer <= uiDiff) + if (DoCastSpellIfCan(m_creature, SPELL_DETONATION, CAST_TRIGGERED) == CAST_OK) { - if (DoCastSpellIfCan(m_creature, SPELL_DETONATION, CAST_TRIGGERED) == CAST_OK) - { - // Selfkill after the detonation - m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NONE, NULL, false); - m_uiDetonationTimer = 0; - return; - } + // Selfkill after the detonation + m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NONE, NULL, false); + m_bHasDetonated = true; + return; } - else - m_uiDetonationTimer -= uiDiff; } DoMeleeAttackIfReady(); diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index eb65971c3..90c141a92 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2685" + #define SD2_REVISION_NR "2686" #endif // __SD2_REVISION_NR_H__ From c36949da1588202e1e1c540997b181710eeb74a5 Mon Sep 17 00:00:00 2001 From: NeatElves Date: Mon, 20 Aug 2012 00:33:18 +0300 Subject: [PATCH 0676/1172] [2687] Drop gossip script for npcs 15170 and 15171. Will be handled in DB. Signed-off-by: Xfurry --- scripts/kalimdor/silithus.cpp | 135 +-------------------------------- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 - sql/updates/r2687_mangos.sql | 1 + 4 files changed, 3 insertions(+), 136 deletions(-) create mode 100644 sql/updates/r2687_mangos.sql diff --git a/scripts/kalimdor/silithus.cpp b/scripts/kalimdor/silithus.cpp index 0e817f9c0..a9b877968 100644 --- a/scripts/kalimdor/silithus.cpp +++ b/scripts/kalimdor/silithus.cpp @@ -17,143 +17,16 @@ /* ScriptData SDName: Silithus SD%Complete: 100 -SDComment: Quest support: 8304, 8519. +SDComment: Quest support: 8519. SDCategory: Silithus EndScriptData */ /* ContentData -npcs_rutgar_and_frankal npc_anachronos_the_ancient EndContentData */ #include "precompiled.h" -/*### -## npcs_rutgar_and_frankal -###*/ - -//gossip item text best guess -#define GOSSIP_ITEM_SEEK1 "I seek information about Natalia" - -#define GOSSIP_ITEM_RUTGAR2 "That sounds dangerous!" -#define GOSSIP_ITEM_RUTGAR3 "What did you do?" -#define GOSSIP_ITEM_RUTGAR4 "Who?" -#define GOSSIP_ITEM_RUTGAR5 "Women do that. What did she demand?" -#define GOSSIP_ITEM_RUTGAR6 "What do you mean?" -#define GOSSIP_ITEM_RUTGAR7 "What happened next?" - -#define GOSSIP_ITEM_FRANKAL11 "Yes, please continue" -#define GOSSIP_ITEM_FRANKAL12 "What language?" -#define GOSSIP_ITEM_FRANKAL13 "The Priestess attacked you?!" -#define GOSSIP_ITEM_FRANKAL14 "I should ask the monkey about this" -#define GOSSIP_ITEM_FRANKAL15 "Then what..." - -enum -{ - QUEST_DEAREST_NATALIA = 8304, - NPC_RUTGAR = 15170, - NPC_FRANKAL = 15171, - TRIGGER_RUTGAR = 15222, - TRIGGER_FRANKAL = 15221, - GOSSIP_TEXTID_RF = 7754, - GOSSIP_TEXTID_RUTGAR1 = 7755, - GOSSIP_TEXTID_RUTGAR2 = 7756, - GOSSIP_TEXTID_RUTGAR3 = 7757, - GOSSIP_TEXTID_RUTGAR4 = 7758, - GOSSIP_TEXTID_RUTGAR5 = 7759, - GOSSIP_TEXTID_RUTGAR6 = 7760, - GOSSIP_TEXTID_RUTGAR7 = 7761, - GOSSIP_TEXTID_FRANKAL1 = 7762, - GOSSIP_TEXTID_FRANKAL2 = 7763, - GOSSIP_TEXTID_FRANKAL3 = 7764, - GOSSIP_TEXTID_FRANKAL4 = 7765, - GOSSIP_TEXTID_FRANKAL5 = 7766, - GOSSIP_TEXTID_FRANKAL6 = 7767 -}; - -bool GossipHello_npcs_rutgar_and_frankal(Player* pPlayer, Creature* pCreature) -{ - if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); - - if (pPlayer->GetQuestStatus(QUEST_DEAREST_NATALIA) == QUEST_STATUS_INCOMPLETE && - pCreature->GetEntry() == NPC_RUTGAR && - !pPlayer->GetReqKillOrCastCurrentCount(QUEST_DEAREST_NATALIA, TRIGGER_RUTGAR)) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_SEEK1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF); - - if (pPlayer->GetQuestStatus(QUEST_DEAREST_NATALIA) == QUEST_STATUS_INCOMPLETE && - pCreature->GetEntry() == NPC_FRANKAL && - pPlayer->GetReqKillOrCastCurrentCount(QUEST_DEAREST_NATALIA, TRIGGER_RUTGAR)) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_SEEK1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+9); - - pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_RF, pCreature->GetObjectGuid()); - - return true; -} - -bool GossipSelect_npcs_rutgar_and_frankal(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) -{ - switch(uiAction) - { - case GOSSIP_ACTION_INFO_DEF: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_RUTGAR2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); - pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_RUTGAR1, pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF + 1: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_RUTGAR3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); - pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_RUTGAR2, pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF + 2: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_RUTGAR4, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); - pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_RUTGAR3, pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF + 3: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_RUTGAR5, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4); - pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_RUTGAR4, pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF + 4: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_RUTGAR6, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 5); - pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_RUTGAR5, pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF + 5: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_RUTGAR7, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 6); - pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_RUTGAR6, pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF + 6: - pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_RUTGAR7, pCreature->GetObjectGuid()); - //'kill' our trigger to update quest status - pPlayer->KilledMonsterCredit(TRIGGER_RUTGAR, pCreature->GetObjectGuid()); - break; - - case GOSSIP_ACTION_INFO_DEF + 9: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_FRANKAL11, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 11); - pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_FRANKAL1, pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF + 10: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_FRANKAL12, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 11); - pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_FRANKAL2, pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF + 11: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_FRANKAL13, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 12); - pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_FRANKAL3, pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF + 12: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_FRANKAL14, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 13); - pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_FRANKAL4, pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF + 13: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_FRANKAL15, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 14); - pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_FRANKAL5, pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF + 14: - pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_FRANKAL6, pCreature->GetObjectGuid()); - //'kill' our trigger to update quest status - pPlayer->KilledMonsterCredit(TRIGGER_FRANKAL, pCreature->GetObjectGuid()); - break; - } - return true; -} - /*### ## npc_anachronos_the_ancient ###*/ @@ -799,12 +672,6 @@ void AddSC_silithus() { Script* pNewScript; - pNewScript = new Script; - pNewScript->Name = "npcs_rutgar_and_frankal"; - pNewScript->pGossipHello = &GossipHello_npcs_rutgar_and_frankal; - pNewScript->pGossipSelect = &GossipSelect_npcs_rutgar_and_frankal; - pNewScript->RegisterSelf(); - pNewScript = new Script; pNewScript->Name = "npc_anachronos_the_ancient"; pNewScript->GetAI = &GetAI_npc_anachronos_the_ancient; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 90c141a92..c9043d9ab 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2686" + #define SD2_REVISION_NR "2687" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index db03aa0bb..8b7c63805 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -982,7 +982,6 @@ UPDATE creature_template SET ScriptName='npc_injured_rainspeaker' WHERE entry=28 UPDATE creature_template SET ScriptName='npc_mosswalker_victim' WHERE entry=28113; /* SILITHUS */ -UPDATE creature_template SET ScriptName='npcs_rutgar_and_frankal' WHERE entry IN (15170,15171); UPDATE creature_template SET ScriptName='npc_anachronos_the_ancient' WHERE entry=15381; UPDATE gameobject_template SET ScriptName='go_crystalline_tear' WHERE entry=180633; diff --git a/sql/updates/r2687_mangos.sql b/sql/updates/r2687_mangos.sql new file mode 100644 index 000000000..b588bef55 --- /dev/null +++ b/sql/updates/r2687_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='' WHERE entry IN (15170,15171); From 265eb8c8c11616ba7e20152fe0119daff10962a6 Mon Sep 17 00:00:00 2001 From: NeatElves Date: Mon, 20 Aug 2012 09:15:19 +0300 Subject: [PATCH 0677/1172] [2688] Drop gossip for npc 11064. Will be handled in DB. Signed-off-by: Xfurry --- .../eastern_kingdoms/eastern_plaguelands.cpp | 20 +------------------ sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 - sql/updates/r2688_mangos.sql | 1 + 4 files changed, 3 insertions(+), 21 deletions(-) create mode 100644 sql/updates/r2688_mangos.sql diff --git a/scripts/eastern_kingdoms/eastern_plaguelands.cpp b/scripts/eastern_kingdoms/eastern_plaguelands.cpp index d24c34672..92301bdf6 100644 --- a/scripts/eastern_kingdoms/eastern_plaguelands.cpp +++ b/scripts/eastern_kingdoms/eastern_plaguelands.cpp @@ -17,29 +17,16 @@ /* ScriptData SDName: Eastern_Plaguelands SD%Complete: 100 -SDComment: Quest support: 5211, 7622. +SDComment: Quest support: 7622. SDCategory: Eastern Plaguelands EndScriptData */ /* ContentData -npc_darrowshire_spirit npc_eris_havenfire EndContentData */ #include "precompiled.h" -/*###### -## npc_darrowshire_spirit -######*/ - -bool GossipHello_npc_darrowshire_spirit(Player* pPlayer, Creature* pCreature) -{ - pPlayer->SEND_GOSSIP_MENU(3873, pCreature->GetObjectGuid()); - pPlayer->TalkedToCreature(pCreature->GetEntry(), pCreature->GetObjectGuid()); - pCreature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - return true; -} - /*###### ## npc_eris_havenfire ######*/ @@ -326,11 +313,6 @@ void AddSC_eastern_plaguelands() { Script* pNewScript; - pNewScript = new Script; - pNewScript->Name = "npc_darrowshire_spirit"; - pNewScript->pGossipHello = &GossipHello_npc_darrowshire_spirit; - pNewScript->RegisterSelf(); - pNewScript = new Script; pNewScript->Name = "npc_eris_havenfire"; pNewScript->GetAI = &GetAI_npc_eris_havenfire; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index c9043d9ab..47bb67098 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2687" + #define SD2_REVISION_NR "2688" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 8b7c63805..40a52e0a7 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -535,7 +535,6 @@ INSERT INTO scripted_areatrigger VALUES (4752,'at_nats_landing'); /* EASTERN PLAGUELANDS */ -UPDATE creature_template SET ScriptName='npc_darrowshire_spirit' WHERE entry=11064; UPDATE creature_template SET ScriptName='npc_eris_havenfire' WHERE entry=14494; /* EBON HOLD */ diff --git a/sql/updates/r2688_mangos.sql b/sql/updates/r2688_mangos.sql new file mode 100644 index 000000000..fba8074de --- /dev/null +++ b/sql/updates/r2688_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='' WHERE entry=11064; From bdee22cab5ae87e14a3d4e9a71820e8034157167 Mon Sep 17 00:00:00 2001 From: NeatElves Date: Mon, 20 Aug 2012 21:10:49 +0300 Subject: [PATCH 0678/1172] [2689] Drop gossip for npcs 3442 and 7564. Will be handled in DB Signed-off-by: Xfurry --- scripts/kalimdor/tanaris.cpp | 34 +------------------------------ scripts/kalimdor/the_barrens.cpp | 35 +------------------------------- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 2 -- sql/updates/r2689_mangos.sql | 2 ++ 5 files changed, 5 insertions(+), 70 deletions(-) create mode 100644 sql/updates/r2689_mangos.sql diff --git a/scripts/kalimdor/tanaris.cpp b/scripts/kalimdor/tanaris.cpp index 6de0a4f8d..022e1c5f6 100644 --- a/scripts/kalimdor/tanaris.cpp +++ b/scripts/kalimdor/tanaris.cpp @@ -17,14 +17,13 @@ /* ScriptData SDName: Tanaris SD%Complete: 80 -SDComment: Quest support: 648, 1560, 2954, 4005, 10277. Noggenfogger vendor +SDComment: Quest support: 648, 1560, 2954, 4005, 10277. SDCategory: Tanaris EndScriptData */ /* ContentData mob_aquementas npc_custodian_of_time -npc_marin_noggenfogger npc_oox17tn npc_stone_watcher_of_norgannon npc_tooga @@ -218,31 +217,6 @@ CreatureAI* GetAI_npc_custodian_of_time(Creature* pCreature) return new npc_custodian_of_timeAI(pCreature); } -/*###### -## npc_marin_noggenfogger -######*/ - -bool GossipHello_npc_marin_noggenfogger(Player* pPlayer, Creature* pCreature) -{ - if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); - - if (pCreature->isVendor() && pPlayer->GetQuestRewardStatus(2662)) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_VENDOR, GOSSIP_TEXT_BROWSE_GOODS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE); - - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); - - return true; -} - -bool GossipSelect_npc_marin_noggenfogger(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) -{ - if (uiAction == GOSSIP_ACTION_TRADE) - pPlayer->SEND_VENDORLIST(pCreature->GetObjectGuid()); - - return true; -} - /*###### ## npc_oox17tn ######*/ @@ -574,12 +548,6 @@ void AddSC_tanaris() pNewScript->GetAI = &GetAI_npc_custodian_of_time; pNewScript->RegisterSelf(); - pNewScript = new Script; - pNewScript->Name = "npc_marin_noggenfogger"; - pNewScript->pGossipHello = &GossipHello_npc_marin_noggenfogger; - pNewScript->pGossipSelect = &GossipSelect_npc_marin_noggenfogger; - pNewScript->RegisterSelf(); - pNewScript = new Script; pNewScript->Name = "npc_oox17tn"; pNewScript->GetAI = &GetAI_npc_oox17tn; diff --git a/scripts/kalimdor/the_barrens.cpp b/scripts/kalimdor/the_barrens.cpp index 1a1ce78af..f7ee39071 100644 --- a/scripts/kalimdor/the_barrens.cpp +++ b/scripts/kalimdor/the_barrens.cpp @@ -17,14 +17,13 @@ /* ScriptData SDName: The_Barrens SD%Complete: 90 -SDComment: Quest support: 863, 898, 1719, 2458, 4921, 6981 +SDComment: Quest support: 863, 898, 1719, 2458, 4921. SDCategory: Barrens EndScriptData */ /* ContentData npc_beaten_corpse npc_gilthares -npc_sputtervalve npc_taskmaster_fizzule npc_twiggy_flathead at_twiggy_flathead @@ -163,32 +162,6 @@ bool QuestAccept_npc_gilthares(Player* pPlayer, Creature* pCreature, const Quest return true; } -/*###### -## npc_sputtervalve -######*/ - -bool GossipHello_npc_sputtervalve(Player* pPlayer, Creature* pCreature) -{ - if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); - - if (pPlayer->GetQuestStatus(6981) == QUEST_STATUS_INCOMPLETE) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT,"Can you tell me about this shard?",GOSSIP_SENDER_MAIN,GOSSIP_ACTION_INFO_DEF); - - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); - return true; -} - -bool GossipSelect_npc_sputtervalve(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) -{ - if (uiAction == GOSSIP_ACTION_INFO_DEF) - { - pPlayer->SEND_GOSSIP_MENU(2013, pCreature->GetObjectGuid()); - pPlayer->AreaExploredOrEventHappens(6981); - } - return true; -} - /*###### ## npc_taskmaster_fizzule ######*/ @@ -664,12 +637,6 @@ void AddSC_the_barrens() pNewScript->pQuestAcceptNPC = &QuestAccept_npc_gilthares; pNewScript->RegisterSelf(); - pNewScript = new Script; - pNewScript->Name = "npc_sputtervalve"; - pNewScript->pGossipHello = &GossipHello_npc_sputtervalve; - pNewScript->pGossipSelect = &GossipSelect_npc_sputtervalve; - pNewScript->RegisterSelf(); - pNewScript = new Script; pNewScript->Name = "npc_taskmaster_fizzule"; pNewScript->GetAI = &GetAI_npc_taskmaster_fizzule; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 47bb67098..0b75f6385 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2688" + #define SD2_REVISION_NR "2689" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 40a52e0a7..162f38113 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -273,7 +273,6 @@ UPDATE creature_template SET ScriptName='npc_magwin' WHERE entry=17312; /* BARRENS */ UPDATE creature_template SET ScriptName='npc_beaten_corpse' WHERE entry=10668; UPDATE creature_template SET ScriptName='npc_gilthares' WHERE entry=3465; -UPDATE creature_template SET ScriptName='npc_sputtervalve' WHERE entry=3442; UPDATE creature_template SET ScriptName='npc_taskmaster_fizzule' WHERE entry=7233; UPDATE creature_template SET ScriptName='npc_twiggy_flathead' WHERE entry=6248; DELETE FROM scripted_areatrigger WHERE entry=522; @@ -1065,7 +1064,6 @@ UPDATE creature_template SET ScriptName='npc_galen_goodward' WHERE entry=5391; /* TANARIS */ UPDATE creature_template SET ScriptName='mob_aquementas' WHERE entry=9453; UPDATE creature_template SET ScriptName='npc_custodian_of_time' WHERE entry=20129; -UPDATE creature_template SET ScriptName='npc_marin_noggenfogger' WHERE entry=7564; UPDATE creature_template SET ScriptName='npc_oox17tn' WHERE entry=7784; UPDATE creature_template SET ScriptName='npc_stone_watcher_of_norgannon' WHERE entry=7918; UPDATE creature_template SET ScriptName='npc_tooga' WHERE entry=5955; diff --git a/sql/updates/r2689_mangos.sql b/sql/updates/r2689_mangos.sql new file mode 100644 index 000000000..dc9cf5160 --- /dev/null +++ b/sql/updates/r2689_mangos.sql @@ -0,0 +1,2 @@ +UPDATE creature_template SET ScriptName='' WHERE entry=3442; +UPDATE creature_template SET ScriptName='' WHERE entry=7564; From 66973b3d1904aa65795433023d3afa62d191f20c Mon Sep 17 00:00:00 2001 From: michalpolko Date: Mon, 20 Aug 2012 21:46:19 +0200 Subject: [PATCH 0679/1172] [2690] Implemented basic script for Professor Putricide. --- .../boss_professor_putricide.cpp | 97 ++++++++++++++++++- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 + sql/updates/r2690_mangos.sql | 1 + 4 files changed, 99 insertions(+), 2 deletions(-) create mode 100644 sql/updates/r2690_mangos.sql diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_professor_putricide.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_professor_putricide.cpp index a225f0885..2fa416103 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_professor_putricide.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_professor_putricide.cpp @@ -16,12 +16,13 @@ /* ScriptData SDName: boss_professor_putricide -SD%Complete: 0% +SD%Complete: 10% SDComment: SDCategory: Icecrown Citadel EndScriptData */ #include "precompiled.h" +#include "icecrown_citadel.h" enum { @@ -36,6 +37,100 @@ enum SAY_DEATH = -1631100, }; +enum +{ + SPELL_BERSERK = 47008 +}; + +enum Phase +{ + PHASE_ONE = 1 +}; + +struct MANGOS_DLL_DECL boss_professor_putricideAI : public ScriptedAI +{ + boss_professor_putricideAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (instance_icecrown_citadel*)pCreature->GetInstanceData(); + Reset(); + } + + instance_icecrown_citadel* m_pInstance; + + uint32 m_uiPhase; + + uint32 m_uiHealthCheckTimer; + uint32 m_uiEnrageTimer; + + void Reset() + { + m_uiPhase = PHASE_ONE; + m_uiHealthCheckTimer = 1000; + m_uiEnrageTimer = 10 * MINUTE * IN_MILLISECONDS; + } + + void KilledUnit(Unit* pVictim) + { + DoScriptText(urand(0, 1) ? SAY_SLAY_1 : SAY_SLAY_2, m_creature); + } + + void Aggro(Unit* pWho) + { + if (m_pInstance) + m_pInstance->SetData(TYPE_PROFESSOR_PUTRICIDE, IN_PROGRESS); + + DoScriptText(SAY_AGGRO, m_creature); + } + + void JustDied(Unit *pKiller) + { + if (m_pInstance) + m_pInstance->SetData(TYPE_PROFESSOR_PUTRICIDE, DONE); + + DoScriptText(SAY_DEATH, m_creature); + } + + void JustReachedHome() + { + if (m_pInstance) + m_pInstance->SetData(TYPE_PROFESSOR_PUTRICIDE, FAIL); + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + // Enrage + if (m_uiEnrageTimer) + { + if (m_uiEnrageTimer <= uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_BERSERK) == CAST_OK) + { + DoScriptText(SAY_BERSERK, m_creature); + m_uiEnrageTimer = 0; + } + } + else + m_uiEnrageTimer -= uiDiff; + } + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_professor_putricide(Creature* pCreature) +{ + return new boss_professor_putricideAI(pCreature); +} + void AddSC_boss_professor_putricide() { + Script *pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_professor_putricide"; + pNewScript->GetAI = &GetAI_boss_professor_putricide; + pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 0b75f6385..9161aba24 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2689" + #define SD2_REVISION_NR "2690" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 162f38113..d221eda60 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -690,6 +690,7 @@ UPDATE creature_template SET ScriptName='mob_blistering_zombie' WHERE entry=3793 UPDATE creature_template SET ScriptName='mob_risen_archmage' WHERE entry=37868; UPDATE creature_template SET ScriptName='mob_blazing_skeleton' WHERE entry=36791; UPDATE creature_template SET ScriptName='mob_suppresser' WHERE entry=37863; +UPDATE creature_template SET ScriptName='boss_professor_putricide' WHERE entry=36678; DELETE FROM scripted_event_id WHERE id IN (23426,23438); INSERT INTO scripted_event_id VALUES (23426,'event_gameobject_citadel_valve'), diff --git a/sql/updates/r2690_mangos.sql b/sql/updates/r2690_mangos.sql new file mode 100644 index 000000000..55a8fe3be --- /dev/null +++ b/sql/updates/r2690_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='boss_professor_putricide' WHERE entry=36678; From a0829f977589ffbb9d990b08116f3ba7f8ace081 Mon Sep 17 00:00:00 2001 From: michalpolko Date: Tue, 21 Aug 2012 00:28:58 +0200 Subject: [PATCH 0680/1172] [2691] Implemented some of the phases, movements, events and combat abilities for Professor Putricide. --- .../boss_professor_putricide.cpp | 365 +++++++++++++++++- sd2_revision_nr.h | 2 +- 2 files changed, 364 insertions(+), 3 deletions(-) diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_professor_putricide.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_professor_putricide.cpp index 2fa416103..c49692ae2 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_professor_putricide.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_professor_putricide.cpp @@ -39,12 +39,86 @@ enum enum { - SPELL_BERSERK = 47008 + SPELL_BERSERK = 47008, + + // controlled abomination + SPELL_MUTATED_TRANSFORMATION = 70308, + SPELL_EAT_OOZE = 72527, + SPELL_REGURGITATED_OOZE = 70539, + SPELL_MUTATED_SLASH = 70542, + SPELL_MUTATED_AURA = 70405, + SPELL_ABOMINATION_POWER_DRAIN = 70385, // prevents normal regen of abomination's power + + SPELL_UNSTABLE_EXPERIMENT = 70351, // ooze and gas summoning spells in basepoints of effects of this spell suggest that they should be handled in core + SPELL_VOLATILE_EXPERIMENT = 72842, // heroic + SPELL_GREEN_OOZE_SUMMON = 71412, + SPELL_ORANGE_OOZE_SUMMON = 71415, + + SPELL_OOZE_ADHESIVE = 70447, + SPELL_OOZE_ERUPTION = 70492, + + SPELL_GASEOUS_BLOAT = 70672, + SPELL_EXPUNGED_GAS = 70701, + SPELL_GASEOUS_BLOAT_VISUAL = 70215, + + SPELL_SLIME_PUDDLE = 70341, + SPELL_SLIME_PUDDLE_SUMMON = 70342, + SPELL_SLIME_PUDDLE_AURA = 70343, + // SPELL_SLIME_PUDDLE_TRIGGER = 71424, // trigger summon spell from target? + // SPELL_SLIME_PUDDLE_SUMMON_TRIG = 71425, + SPELL_GROW_STACKER = 70345, + SPELL_GROW_STACKER_GROW_AURA = 70347, + + SPELL_MALLEABLE_GOO_MISSILE = 70852, + + SPELL_CHOKING_GAS_BOMB = 71255, + SPELL_CHOKING_GAS_BOMB_AURA = 71259, + SPELL_CHOKING_GAS_BOMB_EXPL_AUR = 71280, + SPELL_CHOKING_GAS_EXPLOSION = 71279, + + // phase transitions + SPELL_TEAR_GAS = 71617, // stuns players + SPELL_TEAR_GAS_PERIODIC_AURA = 73170, // stuns summoned creatures? + SPELL_TEAR_GAS_CANCEL = 71620, + + SPELL_CREATE_CONCOCTION = 71621, + SPELL_GUZZLE_POTIONS = 71893, + + SPELL_MUTATED_PLAGUE = 72451, + + // heroic + SPELL_UNBOUND_PLAGUE = 70911, + SPELL_OOZE_VARIABLE = 70352, // aura 303 - dont allow taking damage from attacker with linked aura303? + SPELL_OOZE_VARIABLE_OOZE = 74118, // anyway, implemented as hardcoded in script + SPELL_GAS_VARIABLE = 70353, + SPELL_GAS_VARIABLE_GAS = 74119, + + SPELL_OOZE_GAS_PROTECTION = 70812, + SPELL_OOZE_BEAM_PROTECTION = 71530, + SPELL_OOZE_TANK_PROTECTION = 71770, + + SPELL_ORANGE_RADIATION = 45857, //Additional visual }; enum Phase { - PHASE_ONE = 1 + PHASE_ONE = 1, + PHASE_RUNNING_ONE = 2, + PHASE_TRANSITION_ONE = 3, + PHASE_TWO = 4, + PHASE_RUNNING_TWO = 5, + PHASE_TRANSITION_TWO = 6, + PHASE_THREE = 7 +}; + +enum Waypoint +{ + POINT_PUTRICIDE_SPAWN = 1 +}; + +static const float fPutricidePosition[1][3] = +{ + {4356.78f, 3263.51f, 389.40f} // 0 Putricide spawn point }; struct MANGOS_DLL_DECL boss_professor_putricideAI : public ScriptedAI @@ -60,13 +134,22 @@ struct MANGOS_DLL_DECL boss_professor_putricideAI : public ScriptedAI uint32 m_uiPhase; uint32 m_uiHealthCheckTimer; + uint32 m_uiTransitionTimer; uint32 m_uiEnrageTimer; + uint32 m_uiPuddleTimer; + uint32 m_uiUnstableExperimentTimer; + uint32 m_uiUnboundPlagueTimer; + uint32 m_uiChokingGasBombTimer; void Reset() { m_uiPhase = PHASE_ONE; m_uiHealthCheckTimer = 1000; m_uiEnrageTimer = 10 * MINUTE * IN_MILLISECONDS; + m_uiPuddleTimer = 10000; + m_uiUnstableExperimentTimer = 20000; + m_uiUnboundPlagueTimer = 10000; + m_uiChokingGasBombTimer = urand(10000, 15000); } void KilledUnit(Unit* pVictim) @@ -96,6 +179,48 @@ struct MANGOS_DLL_DECL boss_professor_putricideAI : public ScriptedAI m_pInstance->SetData(TYPE_PROFESSOR_PUTRICIDE, FAIL); } + void MovementInform(uint32 uiMovementType, uint32 uiData) + { + if (uiMovementType != POINT_MOTION_TYPE) + return; + + if (uiData == POINT_PUTRICIDE_SPAWN) + { + if (m_uiPhase == PHASE_RUNNING_ONE) + { + if (m_pInstance && m_pInstance->IsHeroicDifficulty()) + { + DoScriptText(SAY_PHASE_CHANGE, m_creature); + m_uiTransitionTimer = 30000; + } + else + { + DoCastSpellIfCan(m_creature, SPELL_CREATE_CONCOCTION); + DoScriptText(SAY_TRANSFORM_1, m_creature); + m_uiTransitionTimer = 15000; + } + + m_uiPhase = PHASE_TRANSITION_ONE; // waiting for entering phase 2 + } + else if (m_uiPhase == PHASE_RUNNING_TWO) + { + if (m_pInstance && m_pInstance->IsHeroicDifficulty()) + { + DoScriptText(SAY_PHASE_CHANGE, m_creature); + m_uiTransitionTimer = 30000; + } + else + { + DoCastSpellIfCan(m_creature, SPELL_GUZZLE_POTIONS); + DoScriptText(SAY_TRANSFORM_2, m_creature); + m_uiTransitionTimer = 15000; + } + + m_uiPhase = PHASE_TRANSITION_TWO; // waiting for entering phase 3 + } + } + } + void UpdateAI(const uint32 uiDiff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) @@ -116,6 +241,242 @@ struct MANGOS_DLL_DECL boss_professor_putricideAI : public ScriptedAI m_uiEnrageTimer -= uiDiff; } + switch(m_uiPhase) + { + case PHASE_ONE: + { + // health check + if (m_uiHealthCheckTimer <= uiDiff) + { + if (m_creature->GetHealthPercent() <= 80.0f) + { + uint32 spellId = (m_pInstance && m_pInstance->IsHeroicDifficulty() ? SPELL_VOLATILE_EXPERIMENT : SPELL_TEAR_GAS); + + if (DoCastSpellIfCan(m_creature, spellId) == CAST_OK) + { + m_creature->GetMotionMaster()->Clear(); + SetCombatMovement(false); + m_creature->GetMotionMaster()->MovePoint(POINT_PUTRICIDE_SPAWN, fPutricidePosition[0][0], fPutricidePosition[0][1], fPutricidePosition[0][2]); + m_uiPhase = PHASE_RUNNING_ONE; + return; + } + } + m_uiHealthCheckTimer = 1000; + } + else + m_uiHealthCheckTimer -= uiDiff; + + // Unbound Plague + if (m_pInstance && m_pInstance->IsHeroicDifficulty()) + { + if (m_uiUnboundPlagueTimer <= uiDiff) + { + if (Unit *pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1, SPELL_UNBOUND_PLAGUE, SELECT_FLAG_PLAYER)) + { + if (DoCastSpellIfCan(pTarget, SPELL_UNBOUND_PLAGUE) == CAST_OK) + m_uiUnboundPlagueTimer = 70000; + } + } + else + m_uiUnboundPlagueTimer -= uiDiff; + } + + // Slime Puddle + if (m_uiPuddleTimer <= uiDiff) + { + for (int i = 0; i < 2; ++i) + { + if (Unit *pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0, SPELL_SLIME_PUDDLE_SUMMON, SELECT_FLAG_PLAYER)) + DoCastSpellIfCan(pTarget, SPELL_SLIME_PUDDLE, CAST_TRIGGERED); + } + m_uiPuddleTimer = 30000; + } + else + m_uiPuddleTimer -= uiDiff; + + // Unstable Experiment + if (m_uiUnstableExperimentTimer <= uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_UNSTABLE_EXPERIMENT) == CAST_OK) + m_uiUnstableExperimentTimer = 30000; + } + else + m_uiUnstableExperimentTimer -= uiDiff; + + break; + } + case PHASE_TRANSITION_ONE: + { + if (m_uiTransitionTimer <= uiDiff) + { + m_creature->GetMotionMaster()->Clear(); + SetCombatMovement(true); + m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); + m_uiPhase = PHASE_TWO; + + if (m_pInstance && m_pInstance->IsHeroicDifficulty()) + { + DoCastSpellIfCan(m_creature, SPELL_CREATE_CONCOCTION); + DoScriptText(SAY_TRANSFORM_1, m_creature); + } + else + DoCastSpellIfCan(m_creature, SPELL_TEAR_GAS_CANCEL, CAST_INTERRUPT_PREVIOUS); + } + else + m_uiTransitionTimer -= uiDiff; + + return; + } + case PHASE_TWO: + { + // health check + if (m_uiHealthCheckTimer <= uiDiff) + { + if (m_creature->GetHealthPercent() <= 35.0f) + { + uint32 spellId = (m_pInstance && m_pInstance->IsHeroicDifficulty() ? SPELL_VOLATILE_EXPERIMENT : SPELL_TEAR_GAS); + + if (DoCastSpellIfCan(m_creature, spellId) == CAST_OK) + { + m_creature->GetMotionMaster()->Clear(); + SetCombatMovement(false); + m_creature->GetMotionMaster()->MovePoint(POINT_PUTRICIDE_SPAWN, fPutricidePosition[0][0], fPutricidePosition[0][1], fPutricidePosition[0][2]); + m_uiPhase = PHASE_RUNNING_TWO; + + // TODO: remove Mutated Abomination + + return; + } + } + m_uiHealthCheckTimer = 1000; + } + else + m_uiHealthCheckTimer -= uiDiff; + + // Unbound Plague + if (m_pInstance && m_pInstance->IsHeroicDifficulty()) + { + if (m_uiUnboundPlagueTimer <= uiDiff) + { + if (Unit *pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1, SPELL_UNBOUND_PLAGUE, SELECT_FLAG_PLAYER)) + { + if (DoCastSpellIfCan(pTarget, SPELL_UNBOUND_PLAGUE) == CAST_OK) + m_uiUnboundPlagueTimer = 70000; + } + } + else + m_uiUnboundPlagueTimer -= uiDiff; + } + + // Slime Puddle + if (m_uiPuddleTimer <= uiDiff) + { + for (int i = 0; i < 2; ++i) + { + if (Unit *pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0, SPELL_SLIME_PUDDLE_SUMMON, SELECT_FLAG_PLAYER)) + DoCastSpellIfCan(pTarget, SPELL_SLIME_PUDDLE, CAST_TRIGGERED); + } + + m_uiPuddleTimer = 30000; + } + else + m_uiPuddleTimer -= uiDiff; + + // Unstable Experiment + if (m_uiUnstableExperimentTimer <= uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_UNSTABLE_EXPERIMENT) == CAST_OK) + m_uiUnstableExperimentTimer = 30000; + } + else + m_uiUnstableExperimentTimer -= uiDiff; + + // Choking Gas + if (m_uiChokingGasBombTimer <= uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_CHOKING_GAS_BOMB) == CAST_OK) + m_uiChokingGasBombTimer = urand(25000, 30000); + } + else + m_uiChokingGasBombTimer -= uiDiff; + + // TODO: Malleable Goo + + break; + } + case PHASE_TRANSITION_TWO: + { + if (m_uiTransitionTimer <= uiDiff) + { + m_creature->GetMotionMaster()->Clear(); + SetCombatMovement(true); + m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); + m_uiPhase = PHASE_THREE; + + if (m_pInstance && m_pInstance->IsHeroicDifficulty()) + { + DoCastSpellIfCan(m_creature, SPELL_GUZZLE_POTIONS); + DoScriptText(SAY_TRANSFORM_2, m_creature); + } + else + DoCastSpellIfCan(m_creature, SPELL_TEAR_GAS_CANCEL, CAST_INTERRUPT_PREVIOUS); + } + else + m_uiTransitionTimer -= uiDiff; + + return; + } + case PHASE_THREE: + { + // Unbound Plague + if (m_pInstance && m_pInstance->IsHeroicDifficulty()) + { + if (m_uiUnboundPlagueTimer <= uiDiff) + { + if (Unit *pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1, SPELL_UNBOUND_PLAGUE, SELECT_FLAG_PLAYER)) + { + if (DoCastSpellIfCan(pTarget, SPELL_UNBOUND_PLAGUE) == CAST_OK) + m_uiUnboundPlagueTimer = 70000; + } + } + else + m_uiUnboundPlagueTimer -= uiDiff; + } + + // Slime Puddle + if (m_uiPuddleTimer <= uiDiff) + { + for (int i = 0; i < 2; ++i) + { + if (Unit *pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1, SPELL_SLIME_PUDDLE_SUMMON, SELECT_FLAG_PLAYER)) + DoCastSpellIfCan(pTarget, SPELL_SLIME_PUDDLE, CAST_TRIGGERED); + } + m_uiPuddleTimer = 30000; + } + else + m_uiPuddleTimer -= uiDiff; + + // Choking Gas + if (m_uiChokingGasBombTimer <= uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_CHOKING_GAS_BOMB) == CAST_OK) + m_uiChokingGasBombTimer = urand(25000, 30000); + } + else + m_uiChokingGasBombTimer -= uiDiff; + + // TODO: Malleable Goo + + break; + } + case PHASE_RUNNING_ONE: + case PHASE_RUNNING_TWO: + { + // wait for arriving at the table (during phase transition) + break; + } + } + DoMeleeAttackIfReady(); } }; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 9161aba24..7a2ef7c84 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2690" + #define SD2_REVISION_NR "2691" #endif // __SD2_REVISION_NR_H__ From eca7e092bff776b9cf503c24524157347fd25722 Mon Sep 17 00:00:00 2001 From: michalpolko Date: Tue, 21 Aug 2012 21:05:29 +0200 Subject: [PATCH 0681/1172] [2692] Drop scripts for Valithria summoned creatures (they can be handled in EAI). --- .../boss_valithria_dreamwalker.cpp | 343 +----------------- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 5 - sql/updates/r2692_mangos.sql | 5 + 4 files changed, 7 insertions(+), 348 deletions(-) create mode 100644 sql/updates/r2692_mangos.sql diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_valithria_dreamwalker.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_valithria_dreamwalker.cpp index 82ce9a97c..4947815fa 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_valithria_dreamwalker.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_valithria_dreamwalker.cpp @@ -16,7 +16,7 @@ /* ScriptData SDName: boss_valithria -SD%Complete: 20% +SD%Complete: 5% SDComment: SDCategory: Icecrown Citadel EndScriptData */ @@ -102,61 +102,6 @@ enum SUMMON_TYPES_NUMBER = 4 }; -// adds -enum -{ - // Risen Archmage - SPELL_FROSTBOLT_VOLLEY = 70759, - SPELL_MANA_VOID = 71179, - SPELL_VOID_BUFF = 71085, - SPELL_COLUMN_OF_FROST = 70704, - SPELL_COLUMN_OF_FROST_VISUAL = 70715, - SPELL_COLUMN_OF_FROST_TRIG = 70702, - - // Blazing Skeleton - SPELL_FIREBALL = 70754, - SPELL_LAY_WASTE = 69325, - - // Suppresser - SPELL_SUPPRESSION = 70588, // NOTE: must stack from many casters - - // Blistering Zombie - SPELL_CORROSION = 70749, - SPELL_ACID_BURST = 70744, // 750ms cast time. seems like it is cast always before dying - - // Gluttonous Abomination - SPELL_GUT_SPRAY = 71283, - SPELL_ROT_WORM_SPAWNER = 70675, // cast around 30% HP or something? - SPELL_ROT_WORM = 72962, - - // entries - NPC_RISEN_ARCHMAGE = 37868, - NPC_COLUMN_OF_FROST = 37918, - NPC_MANA_VOID = 38068, - NPC_SUPPRESSER = 37863, - NPC_BLAZING_SKELETON = 36791, - NPC_BLISTERING_ZOMBIE = 37934, - NPC_GLUTTONOUS_ABOMINATION = 37886, - NPC_ROT_WORM = 37907 -}; - -static uint32 m_uiSummonedAddsEntries[SUMMON_TYPES_NUMBER] = -{ - NPC_GLUTTONOUS_ABOMINATION, - NPC_RISEN_ARCHMAGE, - NPC_BLISTERING_ZOMBIE, - NPC_BLAZING_SKELETON -}; - -static const float fValithriaPosition[5][3] = -{ - {4203.470215f, 2484.500000f, 364.872009f}, // 0 Valithria - {4240.688477f, 2405.794678f, 364.868591f}, // 1 Valithria Room 1 - {4239.579102f, 2566.753418f, 364.868439f}, // 2 Valithria Room 2 - {4166.216797f, 2564.197266f, 364.873047f}, // 3 Valithria Room 3 - {4165.112305f, 2405.872559f, 364.872925f} // 4 Valithria Room 4 -}; - struct MANGOS_DLL_DECL boss_valithria_dreamwalkerAI : public ScriptedAI { boss_valithria_dreamwalkerAI(Creature* pCreature) : ScriptedAI(pCreature) @@ -202,267 +147,6 @@ CreatureAI* GetAI_boss_valithria_dreamwalker(Creature* pCreature) return new boss_valithria_dreamwalkerAI(pCreature); }; -// Gluttonous Abomination -struct MANGOS_DLL_DECL mob_gluttonous_abominationAI : public ScriptedAI -{ - mob_gluttonous_abominationAI(Creature *pCreature) : ScriptedAI(pCreature) - { - Reset(); - } - - uint32 m_uiGutSprayTimer; - - void Reset() - { - m_uiGutSprayTimer = urand(3000, 5000); - } - - void JustDied(Unit *pKiller) - { - DoCastSpellIfCan(m_creature, SPELL_ROT_WORM_SPAWNER, CAST_TRIGGERED); - } - - void JustSummoned(Creature *pCreature) - { - pCreature->SetInCombatWithZone(); - pCreature->CastSpell(pCreature, SPELL_ROT_WORM, true); - } - - void UpdateAI(const uint32 uiDiff) - { - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - // Gut Spray - if (m_uiGutSprayTimer <= uiDiff) - { - if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_GUT_SPRAY) == CAST_OK) - m_uiGutSprayTimer = urand(5000, 10000); - } - else - m_uiGutSprayTimer -= uiDiff; - - DoMeleeAttackIfReady(); - } -}; - -CreatureAI* GetAI_mob_gluttonous_abomination(Creature *pCreature) -{ - return new mob_gluttonous_abominationAI(pCreature); -}; - -// Blistering Zombie -struct MANGOS_DLL_DECL mob_blistering_zombieAI : public ScriptedAI -{ - mob_blistering_zombieAI(Creature *pCreature) : ScriptedAI(pCreature) - { - Reset(); - } - - bool m_bHasDied; - - void Reset() - { - m_bHasDied = false; - } - - void Aggro(Unit *pWho) - { - DoCastSpellIfCan(m_creature, SPELL_CORROSION, CAST_TRIGGERED); - } - - void DamageTaken(Unit *pDealer, uint32 &uiDamage) - { - if (uiDamage > m_creature->GetHealth()) - { - uiDamage = 0; - - if (!m_bHasDied) - { - if (DoCastSpellIfCan(m_creature, SPELL_ACID_BURST) == CAST_OK) - { - SetCombatMovement(false); - m_bHasDied = true; - m_creature->ForcedDespawn(2000); - } - } - } - } - - void UpdateAI(const uint32 uiDiff) - { - if (m_bHasDied) - return; - - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - DoMeleeAttackIfReady(); - } -}; - -CreatureAI* GetAI_mob_blistering_zombie(Creature *pCreature) -{ - return new mob_blistering_zombieAI(pCreature); -}; - -// Risen Archmage -struct MANGOS_DLL_DECL mob_risen_archmageAI : public ScriptedAI -{ - mob_risen_archmageAI(Creature *pCreature) : ScriptedAI(pCreature) - { - Reset(); - } - - uint32 m_uiFrostboltVolleyTimer; - uint32 m_uiColumnOfFrostTimer; - uint32 m_uiManaVoidTimer; - - void Reset() - { - m_uiFrostboltVolleyTimer = urand(3000, 5000); - m_uiColumnOfFrostTimer = urand(3000, 5000); - m_uiManaVoidTimer = urand(5000, 10000); - } - - void UpdateAI(const uint32 uiDiff) - { - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - // Frostbolt Volley - if (m_uiFrostboltVolleyTimer <= uiDiff) - { - if (DoCastSpellIfCan(m_creature, SPELL_FROSTBOLT_VOLLEY) == CAST_OK) - m_uiFrostboltVolleyTimer = urand(5000, 15000); - } - else - m_uiFrostboltVolleyTimer -= uiDiff; - - // Column of Frost - if (m_uiColumnOfFrostTimer <= uiDiff) - { - if (Unit *pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0, SPELL_COLUMN_OF_FROST, SELECT_FLAG_PLAYER)) - { - if (DoCastSpellIfCan(pTarget, SPELL_COLUMN_OF_FROST) == CAST_OK) - m_uiColumnOfFrostTimer = urand(10000, 15000); - } - } - else - m_uiColumnOfFrostTimer -= uiDiff; - - // Mana Void - if (m_uiManaVoidTimer <= uiDiff) - { - if (Unit *pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0, SPELL_MANA_VOID, SELECT_FLAG_PLAYER)) - { - if (DoCastSpellIfCan(pTarget, SPELL_MANA_VOID) == CAST_OK) - m_uiManaVoidTimer = urand(10000, 15000); - } - } - else - m_uiManaVoidTimer -= uiDiff; - - DoMeleeAttackIfReady(); - } -}; - -CreatureAI* GetAI_mob_risen_archmage(Creature *pCreature) -{ - return new mob_risen_archmageAI(pCreature); -}; - -// Blazing Skeleton -struct MANGOS_DLL_DECL mob_blazing_skeletonAI : public ScriptedAI -{ - mob_blazing_skeletonAI(Creature *pCreature) : ScriptedAI(pCreature) - { - Reset(); - } - - uint32 m_uiFireballTimer; - uint32 m_uiLayWasteTimer; - - void Reset() - { - m_uiFireballTimer = urand(3000, 5000); - m_uiLayWasteTimer = urand(15000, 30000); - } - - void UpdateAI(const uint32 uiDiff) - { - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - // Fireball - if (m_uiFireballTimer <= uiDiff) - { - if (Unit *pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0, SPELL_FIREBALL, SELECT_FLAG_PLAYER)) - { - if (DoCastSpellIfCan(pTarget, SPELL_FIREBALL) == CAST_OK) - m_uiFireballTimer = urand(3000, 5000); - } - } - else - m_uiFireballTimer -= uiDiff; - - // Lay Waste - if (m_uiLayWasteTimer <= uiDiff) - { - if (DoCastSpellIfCan(m_creature, SPELL_LAY_WASTE) == CAST_OK) - m_uiLayWasteTimer = urand(20000, 25000); - } - else - m_uiLayWasteTimer -= uiDiff; - - DoMeleeAttackIfReady(); - } -}; - -CreatureAI* GetAI_mob_blazing_skeleton(Creature *pCreature) -{ - return new mob_blazing_skeletonAI(pCreature); -}; - -// Suppresser -struct MANGOS_DLL_DECL mob_suppresserAI : public ScriptedAI -{ - mob_suppresserAI(Creature *pCreature) : ScriptedAI(pCreature) - { - m_pInstance = (instance_icecrown_citadel*)pCreature->GetInstanceData(); - } - - instance_icecrown_citadel* m_pInstance; - - void Reset(){} - - void UpdateAI(const uint32 uiDiff) - { - if (m_pInstance) - { - if (m_pInstance->GetData(TYPE_VALITHRIA) == FAIL) - { - m_creature->ForcedDespawn(); - return; - } - } - - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - if (m_creature->getVictim()->GetEntry() == NPC_VALITHRIA) - { - if (m_creature->CanReachWithMeleeAttack(m_creature->getVictim())) - DoCastSpellIfCan(m_creature->getVictim(), SPELL_SUPPRESSION); - } - } -}; - -CreatureAI* GetAI_mob_suppresser(Creature *pCreature) -{ - return new mob_suppresserAI(pCreature); -}; - void AddSC_boss_valithria_dreamwalker() { Script* pNewscript; @@ -471,29 +155,4 @@ void AddSC_boss_valithria_dreamwalker() pNewscript->Name = "boss_valithria_dreamwalker"; pNewscript->GetAI = &GetAI_boss_valithria_dreamwalker; pNewscript->RegisterSelf(); - - pNewscript = new Script; - pNewscript->Name = "mob_gluttonous_abomination"; - pNewscript->GetAI = &GetAI_mob_gluttonous_abomination; - pNewscript->RegisterSelf(); - - pNewscript = new Script; - pNewscript->Name = "mob_blistering_zombie"; - pNewscript->GetAI = &GetAI_mob_blistering_zombie; - pNewscript->RegisterSelf(); - - pNewscript = new Script; - pNewscript->Name = "mob_risen_archmage"; - pNewscript->GetAI = &GetAI_mob_risen_archmage; - pNewscript->RegisterSelf(); - - pNewscript = new Script; - pNewscript->Name = "mob_blazing_skeleton"; - pNewscript->GetAI = &GetAI_mob_blazing_skeleton; - pNewscript->RegisterSelf(); - - pNewscript = new Script; - pNewscript->Name = "mob_suppresser"; - pNewscript->GetAI = &GetAI_mob_suppresser; - pNewscript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 7a2ef7c84..206cb03bb 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2691" + #define SD2_REVISION_NR "2692" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index d221eda60..c60d2c1cb 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -685,11 +685,6 @@ UPDATE creature_template SET ScriptName='boss_rotface' WHERE entry=36627; UPDATE creature_template SET ScriptName='mob_little_ooze' WHERE entry=36897; UPDATE creature_template SET ScriptName='mob_big_ooze' WHERE entry=36899; UPDATE creature_template SET ScriptName='boss_valithria_dreamwalker' WHERE entry=36789; -UPDATE creature_template SET ScriptName='mob_gluttonous_abomination' WHERE entry=37886; -UPDATE creature_template SET ScriptName='mob_blistering_zombie' WHERE entry=37934; -UPDATE creature_template SET ScriptName='mob_risen_archmage' WHERE entry=37868; -UPDATE creature_template SET ScriptName='mob_blazing_skeleton' WHERE entry=36791; -UPDATE creature_template SET ScriptName='mob_suppresser' WHERE entry=37863; UPDATE creature_template SET ScriptName='boss_professor_putricide' WHERE entry=36678; DELETE FROM scripted_event_id WHERE id IN (23426,23438); INSERT INTO scripted_event_id VALUES diff --git a/sql/updates/r2692_mangos.sql b/sql/updates/r2692_mangos.sql new file mode 100644 index 000000000..f3f99148f --- /dev/null +++ b/sql/updates/r2692_mangos.sql @@ -0,0 +1,5 @@ +UPDATE creature_template SET ScriptName='' WHERE entry=37886; +UPDATE creature_template SET ScriptName='' WHERE entry=37934; +UPDATE creature_template SET ScriptName='' WHERE entry=37868; +UPDATE creature_template SET ScriptName='' WHERE entry=36791; +UPDATE creature_template SET ScriptName='' WHERE entry=37863; From 15a6b915fb853762285c25e4a2ad0ab55df587b6 Mon Sep 17 00:00:00 2001 From: michalpolko Date: Tue, 21 Aug 2012 21:47:51 +0200 Subject: [PATCH 0682/1172] [2693] Implemented basic script for The Lich King and added some comments in other ICC scripts. --- .../boss_professor_putricide.cpp | 5 +- .../icecrown_citadel/boss_sindragosa.cpp | 3 - .../icecrown_citadel/boss_the_lich_king.cpp | 427 +++++++++++++++++- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 + sql/updates/r2693_mangos.sql | 1 + 6 files changed, 432 insertions(+), 7 deletions(-) create mode 100644 sql/updates/r2693_mangos.sql diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_professor_putricide.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_professor_putricide.cpp index c49692ae2..2c0538f50 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_professor_putricide.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_professor_putricide.cpp @@ -16,8 +16,9 @@ /* ScriptData SDName: boss_professor_putricide -SD%Complete: 10% -SDComment: +SD%Complete: 70% +SDComment: NYI: Abomination and table handling, Malleable Goo, + possibly Green Ooze and Orange Gas scripts require handling in sd2, but need further research on their spells SDCategory: Icecrown Citadel EndScriptData */ diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp index c556f0330..01b3cc336 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp @@ -798,9 +798,6 @@ CreatureAI* GetAI_npc_spinestalker_icc(Creature* pCreature) /** * Frost Bomb - npc marking the target of Frost Bomb - * - * NOTE: should triggering damage spell be done - * after dummy spell hits instead of a timer? */ struct MANGOS_DLL_DECL mob_frost_bombAI : public ScriptedAI { diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_the_lich_king.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_the_lich_king.cpp index a8a3a474e..fa93f05a4 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_the_lich_king.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_the_lich_king.cpp @@ -16,12 +16,13 @@ /* ScriptData SDName: boss_the_lich_king -SD%Complete: 0% +SD%Complete: 5% SDComment: SDCategory: Icecrown Citadel EndScriptData */ #include "precompiled.h" +#include "icecrown_citadel.h" enum { @@ -62,6 +63,430 @@ enum SAY_OUTRO_14 = -1631192, }; + +enum +{ + SPELL_BERSERK = 47008, + SPELL_SIT_EMOTE_NO_SHEATH = 73220, + SPELL_PLAGUE_AVOIDANCE = 72846, + + // Intro + SPELL_ICE_LOCK = 71614, + + // Outro + SPELL_FURY_OF_FROSTMOURNE = 72350, + SPELL_FURY_OF_FROSTMOURNE2 = 72351, // cannot resurect aura + SPELL_RAISE_DEAD = 71769, + SPELL_THROW_FROSTMOURNE = 73017, // 1 + SPELL_BROKEN_FROSTMOURNE = 72398, // 2 + SPELL_SUMMON_FROSTMOURNE = 72407, // 3 summon npc which casts 4 and 5 and LK enters this npc as vehicle + SPELL_FROSTMOURNE_DESPAWN = 72726, // 4 + SPELL_FROSTMOURNE_SPIRITS = 72405, // 5 + SPELL_SOUL_BARRAGE = 72305, // strangulation and sounds + SPELL_LK_CINEMATIC = 73159, + + // Tirion + SPELL_LIGHTS_BLESSING = 71797, // after 5secs smashes Ice Lock + + // Terenas Menethil + SPELL_MASS_RESURRECTION = 72429, // dummy + SPELL_MASS_RESURRECTION2 = 72423, // actual res + + // Phase One + SPELL_NECROTIC_PLAGUE = 70337, + SPELL_NECROTIC_PLAGUE_STACK = 70338, + SPELL_INFEST = 70541, + SPELL_SUMMON_GHOULS = 70358, + SPELL_SUMMON_HORROR = 70372, + SPELL_SHADOW_TRAP = 73539, + + // Phase transition + SPELL_REMORSELESS_WINTER_1 = 68981, // rooting caster and with Activate Object effect + SPELL_REMORSELESS_WINTER_2 = 72259, // rooting caster and with Send Script Event (23507) effect + SPELL_QUAKE = 72262, + SPELL_PAIN_AND_SUFFERING = 72133, + SPELL_RAGING_SPIRIT = 69200, + SPELL_SUMMON_RAGING_SPIRIT = 69201, + SPELL_SUMMON_ICE_SPHERE = 69103, + SPELL_ICE_SPHERE = 69104, // missile and summon effect + + // Phase Two + SPELL_SUMMON_VALKYR = 69037, + SPELL_SUMMON_VALKYRS = 74361, // 25man + SPELL_SOUL_REAPER = 69409, + SPELL_DEFILE = 72762, + + // Phase Three + SPELL_VILE_SPIRITS = 70498, + SPELL_HARVEST_SOUL = 68980, // stun aura and periodic damage, triggers summoning of vehicle + SPELL_HARVEST_SOUL_TP_FM_N = 72546, // teleports to Frostmourne Room and applies 60sec dummy aura (normal) + SPELL_HARVEST_SOUL_TP_FM_H = 73655, // teleports to Frostmourne Room and applies 60sec DoT aura (heroic) + SPELL_HARVEST_SOUL_CLONE = 71372, + SPELL_HARVEST_SOULS = 74296, + SPELL_HARVESTED_SOUL_1 = 73028, + SPELL_HARVESTED_SOUL_2 = 74321, + SPELL_HARVESTED_SOUL_3 = 74322, + SPELL_HARVESTED_SOUL_4 = 74323, + + SPELL_FROSTMOURNE_TP_VISUAL = 73078, + + // Shambling Horror + SPELL_FRENZY = 28747, + SPELL_ENRAGE = 72143, + SPELL_SHOCKWAVE = 72149, + + // Shadow Trap + SPELL_SHADOW_TRAP_VISUAL = 73530, + SPELL_SHADOW_TRAP_AURA = 73525, + + // Raging Spirit + SPELL_SOUL_SHRIEK = 69242, + SPELL_RAGING_SPIRIT_VISUAL = 69198, // clone effect (clone of player) + + // Ice Sphere + SPELL_ICE_SPHERE_VISUAL = 69090, + SPELL_ICE_BURST_AURA = 69109, + SPELL_ICE_BURST = 69108, + SPELL_ICE_PULSE = 69091, + + // Val'kyr Shadowguard + SPELL_LIFE_SIPHON = 73783, + SPELL_VALKYR_CHARGE = 74399, + SPELL_HARVEST_SOUL_VEHICLE = 68985, + SPELL_EJECT_PASSENGERS = 68576, + SPELL_WINGS_OF_THE_DAMNED = 74352, + + // Defile + SPELL_DEFILE_AURA = 72743, + SPELL_DEFILE_GROW = 72756, + + // Vile Spirit and Wicked Spirit + SPELL_SPIRIT_BURST_AURA = 70502, + + // Spirit Warden + SPELL_DARK_HUNGER = 69383, + SPELL_DESTROY_SOUL = 74086, + SPELL_SOUL_RIP = 69397, // 3500, each next one x2 (maybe based on HP of target?) + + // Terenas in Frostmourne + SPELL_RESTORE_SOUL = 72595, + SPELL_RESTORE_SOUL_HEROIC = 73650, + SPELL_LIGHTS_FAVOR = 69382, + SPELL_SUMMON_SPIRIT_BOMBS_1 = 73581, // heroic only, summons Spirit Bomb every 1 sec + SPELL_SUMMON_SPIRIT_BOMBS_2 = 74299, // 2 secs interval + SPELL_SUMMON_SPIRIT_BOMB = 74300, // aura doesnt work somehow, so we will use manual summoning + + // Spirit Bomb + SPELL_SPIRIT_BOMB_VISUAL = 73572, + SPELL_EXPLOSION = 73804, + + // NPCs + NPC_SHADOW_TRAP = 39137, + NPC_FROSTMOURNE = 38584, + NPC_ICE_SPHERE = 36633, + NPC_RAGING_SPIRIT = 36701, + NPC_DEFILE = 38757, + NPC_SPIRIT_WARDEN = 36824, + NPC_TERENAS_FM_NORMAL = 36823, + NPC_TERENAS_FM_HEROIC = 39217, + NPC_WICKED_SPIRIT = 39190, + NPC_SPIRIT_BOMB = 39189, +}; + + +enum Phase +{ + PHASE_INTRO = 0, // intro + PHASE_ONE = 1, // phase one + PHASE_RUNNING_WINTER_ONE = 2, // running to center of platform to cast Remorseless Winter + PHASE_TRANSITION_ONE = 3, // Remorseless Winter aura and casting spells, summoning orbs and spirits + PHASE_QUAKE_ONE = 4, // casting Quake + PHASE_TWO = 5, // phase two with val'kyrs and some more spells + PHASE_RUNNING_WINTER_TWO = 6, // running to center of platform to cast Remorseless Winter again + PHASE_TRANSITION_TWO = 7, // second Remorseless Winter phase + PHASE_QUAKE_TWO = 8, // second Quake casting + PHASE_THREE = 9, // phase three, casting Soul Harvest (Frostmourne phase) + PHASE_IN_FROSTMOURNE = 10, // phase three, waiting untill whole raid leaves Frostmourne + PHASE_CUTSCENE = 11, // phase when LK kills raid, Terenas comes etc. + PHASE_DEATH_AWAITS = 12, // strangulating Lich King, raid group finishing him +}; + +enum Point +{ + POINT_CENTER_LAND = 1, + POINT_CENTER_LAND_TIRION = 2, + POINT_TELEPORTER_TIRION = 3, + POINT_VALKYR_THROW = 4, + POINT_VALKYR_CENTER = 5, + POINT_TP_TO_FM = 6, // point where strangulate vehicle moves, after reaching player is teleported into frostmourne + POINT_SPIRIT_BOMB = 7, // Spirit Bomb moving down +}; + +static const float fLichKingPosition[11][3] = +{ + {458.59f, -2122.71f, 1040.86f}, // 0 Lich King Intro + {503.16f, -2124.52f, 1040.86f}, // 1 Center of the platform + {500.16f, -2124.52f, 1040.86f}, // 2 Tirion strikes Lich King + {481.70f, -2124.64f, 1040.86f}, // 3 Tirion 2 + {498.00f, -2201.57f, 1046.09f}, // 4 Valkyrs? + {517.48f, -2124.91f, 1040.86f}, // 5 Tirion? + {529.85f, -2124.71f, 1040.86f}, // 6 Lich king final, o=3.1146 + {520.31f, -2124.71f, 1040.86f}, // 7 Frostmourne + {453.80f, -2088.20f, 1040.86f}, // 8 Val'kyr drop point right to Frozen Throne + {457.03f, -2155.08f, 1040.86f}, // 9 Val'kyr drop point left to Frozen Throne + {494.31f, -2523.08f, 1249.87f}, // 10 center of platform inside Frostmourne +}; + +struct MANGOS_DLL_DECL boss_the_lich_king_iccAI : public ScriptedAI +{ + boss_the_lich_king_iccAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (instance_icecrown_citadel*)pCreature->GetInstanceData(); + Reset(); + } + + instance_icecrown_citadel* m_pInstance; + + uint32 m_uiPhase; + uint32 m_uiPhaseTimer; + uint32 m_uiBerserkTimer; + + void Reset() + { + // TODO: handling phases "intro" and "one" and aggroing depending on resetting encounter + m_uiPhase = PHASE_INTRO; + + m_uiBerserkTimer = 15 * MINUTE * IN_MILLISECONDS; + } + + void Aggro(Unit *pWho) + { + if (m_pInstance) + m_pInstance->SetData(TYPE_LICH_KING, IN_PROGRESS); + + DoScriptText(SAY_AGGRO, m_creature); + m_uiPhase = PHASE_ONE; + } + + void KilledUnit(Unit *pWho) + { + if (pWho->GetTypeId() == TYPEID_PLAYER) + DoScriptText(urand(0, 1) ? SAY_SLAY_1 : SAY_SLAY_2, m_creature); + } + + void JustDied(Unit *pKiller) + { + if (m_pInstance) + m_pInstance->SetData(TYPE_LICH_KING, DONE); + + DoScriptText(SAY_OUTRO_14, m_creature); + + // TODO: finish event, after around 8 seconds play cinematic + } + + void JustReachedHome() + { + if (m_pInstance) + m_pInstance->SetData(TYPE_LICH_KING, FAIL); + } + + void MovementInform(uint32 uiMovementType, uint32 uiData) + { + if (uiMovementType != POINT_MOTION_TYPE) + return; + + switch(uiData) + { + case POINT_CENTER_LAND: + { + if (m_uiPhase == PHASE_RUNNING_WINTER_ONE) + { + DoScriptText(SAY_REMORSELESS_WINTER, m_creature); + + // TODO: not sure which spell in which phase + // DoCastSpellIfCan(m_creature, SPELL_REMORSELESS_WINTER_1); + + m_uiPhase = PHASE_TRANSITION_ONE; + m_uiPhaseTimer = 62000; + + // TODO: set phase initial timers + // TODO: on heroic despawn Shadow Traps + } + else if (m_uiPhase == PHASE_RUNNING_WINTER_TWO) + { + DoScriptText(SAY_REMORSELESS_WINTER, m_creature); + + // TODO: not sure which spell in which phase + // DoCastSpellIfCan(m_creature, SPELL_REMORSELESS_WINTER_2); + + m_uiPhase = PHASE_TRANSITION_TWO; + m_uiPhaseTimer = 62000; + + // TODO: set phase initial timers + } + else if (m_uiPhase == PHASE_DEATH_AWAITS) + { + DoCastSpellIfCan(m_creature, SPELL_RAISE_DEAD); + } + + break; + } + } + } + + void UpdateAI(const uint32 uiDiff) + { + if (m_uiPhase != PHASE_INTRO && m_uiPhase != PHASE_DEATH_AWAITS) + { + // check evade + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + // Berserk + if (m_uiBerserkTimer) + { + if (m_uiBerserkTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_BERSERK) == CAST_OK) + { + DoScriptText(SAY_ENRAGE, m_creature); + m_uiBerserkTimer = 0; + } + } + else + m_uiBerserkTimer -= uiDiff; + } + } + + switch(m_uiPhase) + { + case PHASE_INTRO: + { + // wait until set in combat + return; + } + case PHASE_ONE: + { + // check HP + if (m_creature->GetHealthPercent() <= 70.0f) + { + // phase transition + m_creature->GetMotionMaster()->Clear(); + m_creature->GetMotionMaster()->MovePoint(POINT_CENTER_LAND, fLichKingPosition[1][0], fLichKingPosition[1][1], fLichKingPosition[1][2]); + m_uiPhase = PHASE_RUNNING_WINTER_ONE; + return; + } + + DoMeleeAttackIfReady(); + + break; + } + case PHASE_RUNNING_WINTER_ONE: + case PHASE_RUNNING_WINTER_TWO: + { + // wait for waypoint arrival + break; + } + case PHASE_TRANSITION_ONE: + case PHASE_TRANSITION_TWO: + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + // phase end timer + if (m_uiPhaseTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_QUAKE) == CAST_OK) + { + DoScriptText(SAY_SHATTER_ARENA, m_creature); + m_uiPhase = (m_uiPhase == PHASE_TRANSITION_ONE ? PHASE_QUAKE_ONE : PHASE_QUAKE_TWO); + m_uiPhaseTimer = 6500; + } + } + else + m_uiPhaseTimer -= uiDiff; + + break; + } + case PHASE_QUAKE_ONE: + case PHASE_QUAKE_TWO: + { + // Casting Quake spell - phase end timer + if (m_uiPhaseTimer < uiDiff) + { + // TODO: destroy platform + + m_uiPhase = (m_uiPhase == PHASE_QUAKE_ONE ? PHASE_TWO : PHASE_THREE); + m_creature->GetMotionMaster()->Clear(); + m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); + return; + } + else + m_uiPhaseTimer -= uiDiff; + + break; + } + case PHASE_TWO: + { + // check HP + if (m_creature->GetHealthPercent() <= 40.0f) + { + // phase transition + m_creature->GetMotionMaster()->Clear(); + m_creature->GetMotionMaster()->MovePoint(POINT_CENTER_LAND, fLichKingPosition[1][0], fLichKingPosition[1][1], fLichKingPosition[1][2]); + m_uiPhaseTimer = 60000; + m_uiPhase = PHASE_RUNNING_WINTER_TWO; + } + + DoMeleeAttackIfReady(); + + break; + } + case PHASE_THREE: + { + // check HP + if (m_creature->GetHealthPercent() <= 10.0f) + { + if (DoCastSpellIfCan(m_creature, SPELL_FURY_OF_FROSTMOURNE) == CAST_OK) + { + DoScriptText(SAY_LAST_PHASE, m_creature); + m_uiPhase = PHASE_DEATH_AWAITS; + + // TODO: start ending event + + return; + } + } + + DoMeleeAttackIfReady(); + + break; + } + case PHASE_IN_FROSTMOURNE: + { + break; + } + case PHASE_DEATH_AWAITS: + { + // wait for swift death + break; + } + } + } +}; + +CreatureAI* GetAI_boss_the_lich_king_icc(Creature* pCreature) +{ + return new boss_the_lich_king_iccAI(pCreature); +} + + void AddSC_boss_the_lich_king() { + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_the_lich_king_icc"; + pNewScript->GetAI = &GetAI_boss_the_lich_king_icc; + pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 206cb03bb..1debae620 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2692" + #define SD2_REVISION_NR "2693" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index c60d2c1cb..866fc39e9 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -686,6 +686,7 @@ UPDATE creature_template SET ScriptName='mob_little_ooze' WHERE entry=36897; UPDATE creature_template SET ScriptName='mob_big_ooze' WHERE entry=36899; UPDATE creature_template SET ScriptName='boss_valithria_dreamwalker' WHERE entry=36789; UPDATE creature_template SET ScriptName='boss_professor_putricide' WHERE entry=36678; +UPDATE creature_template SET ScriptName='boss_the_lich_king_icc' WHERE entry=36597; DELETE FROM scripted_event_id WHERE id IN (23426,23438); INSERT INTO scripted_event_id VALUES (23426,'event_gameobject_citadel_valve'), diff --git a/sql/updates/r2693_mangos.sql b/sql/updates/r2693_mangos.sql new file mode 100644 index 000000000..b0d17ba4e --- /dev/null +++ b/sql/updates/r2693_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='boss_the_lich_king_icc' WHERE entry=36597; From 915cfe471c57d0fd876dbe74e8d8e21231caa7b7 Mon Sep 17 00:00:00 2001 From: michalpolko Date: Tue, 21 Aug 2012 22:34:15 +0200 Subject: [PATCH 0683/1172] [2694] Cleanup in ICC enums and removed some obsolete code in Lich King script. --- .../icecrown_citadel/boss_professor_putricide.cpp | 14 ++++++++------ .../icecrown_citadel/boss_the_lich_king.cpp | 3 --- sd2_revision_nr.h | 2 +- 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_professor_putricide.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_professor_putricide.cpp index 2c0538f50..0c5fbbfa1 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_professor_putricide.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_professor_putricide.cpp @@ -51,7 +51,13 @@ enum SPELL_ABOMINATION_POWER_DRAIN = 70385, // prevents normal regen of abomination's power SPELL_UNSTABLE_EXPERIMENT = 70351, // ooze and gas summoning spells in basepoints of effects of this spell suggest that they should be handled in core - SPELL_VOLATILE_EXPERIMENT = 72842, // heroic + + // Volatile Experiment on heroic difficulties + SPELL_VOLATILE_EXPERIMENT = 72840, // single target dummy effect + SPELL_VOLATILE_EXPERIMENT_2 = 72841, // single target dummy effect + SPELL_VOLATILE_EXPERIMENT_3 = 72842, // radius target dummy effect + SPELL_VOLATILE_EXPERIMENT_4 = 72843, // radius target dummy effect + SPELL_GREEN_OOZE_SUMMON = 71412, SPELL_ORANGE_OOZE_SUMMON = 71415, @@ -94,11 +100,7 @@ enum SPELL_GAS_VARIABLE = 70353, SPELL_GAS_VARIABLE_GAS = 74119, - SPELL_OOZE_GAS_PROTECTION = 70812, - SPELL_OOZE_BEAM_PROTECTION = 71530, - SPELL_OOZE_TANK_PROTECTION = 71770, - - SPELL_ORANGE_RADIATION = 45857, //Additional visual + SPELL_OOZE_TANK_PROTECTION = 71770 }; enum Phase diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_the_lich_king.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_the_lich_king.cpp index fa93f05a4..5bad68f6c 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_the_lich_king.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_the_lich_king.cpp @@ -390,9 +390,6 @@ struct MANGOS_DLL_DECL boss_the_lich_king_iccAI : public ScriptedAI case PHASE_TRANSITION_ONE: case PHASE_TRANSITION_TWO: { - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - // phase end timer if (m_uiPhaseTimer < uiDiff) { diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 1debae620..59a695668 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2693" + #define SD2_REVISION_NR "2694" #endif // __SD2_REVISION_NR_H__ From 05fd7114ae213cff7142cdfaf42d8a620c57b35c Mon Sep 17 00:00:00 2001 From: Xfurry Date: Fri, 24 Aug 2012 11:45:16 +0300 Subject: [PATCH 0684/1172] [2695] Rewrite the Old Hillsbrad event script to blizzlike standards. Many thanks to X-Savior for providing the proper data. Without his help, this wouldn't have been possible. Additional notes: * improve the Barrel event - allow the houses to burn * added proper dialogue for the Armory event * fixed the spawn positions for the ambush soldiers * added proper dialogue and event for Skarloc * allow the road soldiers to be handled in DB * implemented barn dialogue * fixed Epoch intro dialogue * added Epoch infinite dragon waves before the boss fight * improved outro dialogue ToDo: * fix Thrall relocation on server restart - currently not supported in core. --- include/sc_instance.cpp | 2 +- .../old_hillsbrad/instance_old_hillsbrad.cpp | 322 ++-- .../old_hillsbrad/old_hillsbrad.cpp | 1330 +++++++++++------ .../old_hillsbrad/old_hillsbrad.h | 68 +- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 4 +- sql/scriptdev2_script_full.sql | 267 ++-- sql/updates/r2695_mangos.sql | 4 + sql/updates/r2695_scriptdev2.sql | 167 +++ 9 files changed, 1496 insertions(+), 670 deletions(-) create mode 100644 sql/updates/r2695_mangos.sql create mode 100644 sql/updates/r2695_scriptdev2.sql diff --git a/include/sc_instance.cpp b/include/sc_instance.cpp index c7939126d..f7cf3e200 100644 --- a/include/sc_instance.cpp +++ b/include/sc_instance.cpp @@ -56,7 +56,7 @@ void ScriptedInstance::DoRespawnGameObject(ObjectGuid guid, uint32 uiTimeToDespa { //not expect any of these should ever be handled if (pGo->GetGoType() == GAMEOBJECT_TYPE_FISHINGNODE || pGo->GetGoType() == GAMEOBJECT_TYPE_DOOR || - pGo->GetGoType() == GAMEOBJECT_TYPE_BUTTON || pGo->GetGoType() == GAMEOBJECT_TYPE_TRAP) + pGo->GetGoType() == GAMEOBJECT_TYPE_BUTTON) return; if (pGo->isSpawned()) diff --git a/scripts/kalimdor/caverns_of_time/old_hillsbrad/instance_old_hillsbrad.cpp b/scripts/kalimdor/caverns_of_time/old_hillsbrad/instance_old_hillsbrad.cpp index d60cb4b17..47baf034b 100644 --- a/scripts/kalimdor/caverns_of_time/old_hillsbrad/instance_old_hillsbrad.cpp +++ b/scripts/kalimdor/caverns_of_time/old_hillsbrad/instance_old_hillsbrad.cpp @@ -17,7 +17,7 @@ /* ScriptData SDName: Instance_Old_Hillsbrad SD%Complete: 75 -SDComment: If thrall escort fail, all parts will reset. In future, save sub-parts and continue from last known. +SDComment: Thrall reset on server restart is not supported, because of core limitation. SDCategory: Caverns of Time, Old Hillsbrad Foothills EndScriptData */ @@ -26,7 +26,8 @@ EndScriptData */ instance_old_hillsbrad::instance_old_hillsbrad(Map* pMap) : ScriptedInstance(pMap), m_uiBarrelCount(0), - m_uiThrallEventCount(0) + m_uiThrallEventCount(0), + m_uiThrallResetTimer(0) { Initialize(); } @@ -36,15 +37,47 @@ void instance_old_hillsbrad::Initialize() memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); } +void instance_old_hillsbrad::OnPlayerEnter(Player* pPlayer) +{ + // ToDo: HandleThrallRelocation(); + // Note: this isn't yet supported because of the grid load / unload + + // Spawn Drake if necessary + if (GetData(TYPE_DRAKE) == DONE || GetData(TYPE_BARREL_DIVERSION) != DONE) + return; + + if (GetSingleCreatureFromStorage(NPC_DRAKE, true)) + return; + + pPlayer->SummonCreature(NPC_DRAKE, aDrakeSummonLoc[0], aDrakeSummonLoc[1], aDrakeSummonLoc[2], aDrakeSummonLoc[3], TEMPSUMMON_DEAD_DESPAWN, 0); +} + void instance_old_hillsbrad::OnCreatureCreate(Creature* pCreature) { switch(pCreature->GetEntry()) { case NPC_THRALL: case NPC_TARETHA: + case NPC_EROZION: + case NPC_ARMORER: + case NPC_TARREN_MILL_PROTECTOR: + case NPC_TARREN_MILL_LOOKOUT: + case NPC_YOUNG_BLANCHY: + case NPC_DRAKE: + case NPC_SKARLOC: case NPC_EPOCH: m_mNpcEntryGuidStore[pCreature->GetEntry()] = pCreature->GetObjectGuid(); break; + case NPC_ORC_PRISONER: + // Sort the orcs which are inside the houses + if (pCreature->GetPositionZ() > 53.4f) + { + if (pCreature->GetPositionY() > 150.0f) + m_lLeftPrisonersList.push_back(pCreature->GetObjectGuid()); + else + m_lRightPrisonersList.push_back(pCreature->GetObjectGuid()); + } + break; } } @@ -52,49 +85,67 @@ void instance_old_hillsbrad::OnCreatureDeath(Creature* pCreature) { switch (pCreature->GetEntry()) { - case NPC_SKARLOC: - if (GetData(TYPE_THRALL_EVENT) == IN_PROGRESS) - SetData(TYPE_THRALL_PART1, DONE); - break; - case NPC_EPOCH: - if (GetData(TYPE_THRALL_EVENT) == IN_PROGRESS) - SetData(TYPE_THRALL_PART4, DONE); - // notify thrall so he can continue - if (Creature* pThrall = GetSingleCreatureFromStorage(NPC_THRALL)) - pThrall->AI()->KilledUnit(pCreature); + case NPC_DRAKE: SetData(TYPE_DRAKE, DONE); break; + case NPC_SKARLOC: SetData(TYPE_SKARLOC, DONE); break; + case NPC_EPOCH: SetData(TYPE_EPOCH, DONE); break; + } +} + +void instance_old_hillsbrad::OnCreatureEnterCombat(Creature* pCreature) +{ + switch (pCreature->GetEntry()) + { + case NPC_DRAKE: + SetData(TYPE_DRAKE, IN_PROGRESS); + DoUpdateWorldState(WORLD_STATE_OH, 0); break; + case NPC_SKARLOC: SetData(TYPE_SKARLOC, IN_PROGRESS); break; + case NPC_EPOCH: SetData(TYPE_EPOCH, IN_PROGRESS); break; } } +void instance_old_hillsbrad::OnCreatureEvade(Creature* pCreature) +{ + switch (pCreature->GetEntry()) + { + case NPC_DRAKE: SetData(TYPE_DRAKE, FAIL); break; + case NPC_SKARLOC: SetData(TYPE_SKARLOC, FAIL); break; + case NPC_EPOCH: SetData(TYPE_EPOCH, FAIL); break; + } +} + +void instance_old_hillsbrad::OnObjectCreate(GameObject* pGo) +{ + if (pGo->GetEntry() == GO_ROARING_FLAME) + m_lRoaringFlamesList.push_back(pGo->GetObjectGuid()); + else if (pGo->GetEntry() == GO_PRISON_DOOR) + m_mGoEntryGuidStore[GO_PRISON_DOOR] = pGo->GetObjectGuid(); +} + void instance_old_hillsbrad::HandleThrallRelocation() { + // reset instance data + SetData(TYPE_THRALL_EVENT, IN_PROGRESS); + if (Creature* pThrall = GetSingleCreatureFromStorage(NPC_THRALL)) { debug_log("SD2: Instance Old Hillsbrad: Thrall relocation"); - if (m_auiEncounter[TYPE_THRALL_PART4] == IN_PROGRESS) - { - // boss failed, reloc to inn - pThrall->GetMap()->CreatureRelocation(pThrall, 2660.57f, 659.173f, 61.9370f, 0.0f); - m_auiEncounter[TYPE_THRALL_PART4] = NOT_STARTED; - } - else if (m_auiEncounter[TYPE_THRALL_PART3] == IN_PROGRESS) - { - // barn to inn failed, reloc to inn - pThrall->GetMap()->CreatureRelocation(pThrall, 2660.57f, 659.173f, 61.9370f, 0.0f); - m_auiEncounter[TYPE_THRALL_PART3] = DONE; - } - else if (m_auiEncounter[TYPE_THRALL_PART2] == IN_PROGRESS) - { - // keep to barn failed, reloc to barn - pThrall->GetMap()->CreatureRelocation(pThrall, 2486.91f, 626.356f, 58.0761f, 0.0f); - m_auiEncounter[TYPE_THRALL_PART2] = DONE; - } - else if (m_auiEncounter[TYPE_THRALL_PART1] == IN_PROGRESS) - { - // didn't reach very far, back to the basement using default - m_auiEncounter[TYPE_THRALL_PART1] = NOT_STARTED; - } + if (!pThrall->isAlive()) + pThrall->Respawn(); + + // epoch failed, reloc to inn + if (GetData(TYPE_ESCORT_INN == DONE)) + pThrall->GetMap()->CreatureRelocation(pThrall, 2660.57f, 659.173f, 61.9370f, 5.76f); + // barn to inn failed, reloc to barn + else if (GetData(TYPE_ESCORT_BARN) == DONE) + pThrall->GetMap()->CreatureRelocation(pThrall, 2486.91f, 626.356f, 58.0761f, 4.66f); + // keep to barn failed, reloc to keep + else if (GetData(TYPE_SKARLOC) == DONE) + pThrall->GetMap()->CreatureRelocation(pThrall, 2063.40f, 229.509f, 64.4883f, 2.23f); + // prison to keep failed, reloc to prison + else + pThrall->GetMap()->CreatureRelocation(pThrall, 2231.89f, 119.95f, 82.2979f, 4.21f); } } @@ -103,102 +154,149 @@ void instance_old_hillsbrad::SetData(uint32 uiType, uint32 uiData) switch(uiType) { case TYPE_BARREL_DIVERSION: - { + m_auiEncounter[uiType] = uiData; if (uiData == IN_PROGRESS) { - if (m_uiBarrelCount >= 5) + if (m_uiBarrelCount >= MAX_BARRELS) return; + // Update barrels used and world state ++m_uiBarrelCount; DoUpdateWorldState(WORLD_STATE_OH, m_uiBarrelCount); debug_log("SD2: Instance Old Hillsbrad: go_barrel_old_hillsbrad count %u", m_uiBarrelCount); - m_auiEncounter[TYPE_BARREL_DIVERSION] = IN_PROGRESS; - - if (m_uiBarrelCount == 5) + // Set encounter to done, and spawn Liutenant Drake + if (m_uiBarrelCount == MAX_BARRELS) { UpdateLodgeQuestCredit(); if (Player* pPlayer = GetPlayerInMap()) - pPlayer->SummonCreature(NPC_DRAKE, 2128.43f, 71.01f, 64.42f, 1.74f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 1800000); + { + pPlayer->SummonCreature(NPC_DRAKE, aDrakeSummonLoc[0], aDrakeSummonLoc[1], aDrakeSummonLoc[2], aDrakeSummonLoc[3], TEMPSUMMON_DEAD_DESPAWN, 0); + + // set the houses on fire + for (GuidList::const_iterator itr = m_lRoaringFlamesList.begin(); itr != m_lRoaringFlamesList.end(); ++itr) + DoRespawnGameObject(*itr, 30*MINUTE); + + // move the orcs outside the houses + float fX, fY, fZ; + for (GuidList::const_iterator itr = m_lRightPrisonersList.begin(); itr != m_lRightPrisonersList.end(); ++itr) + { + if (Creature* pOrc = instance->GetCreature(*itr)) + { + pOrc->GetRandomPoint(afInstanceLoc[0][0], afInstanceLoc[0][1], afInstanceLoc[0][2], 10.0f, fX, fY, fZ); + pOrc->SetWalk(false); + pOrc->GetMotionMaster()->MovePoint(0, fX, fY, fZ); + } + } + for (GuidList::const_iterator itr = m_lLeftPrisonersList.begin(); itr != m_lLeftPrisonersList.end(); ++itr) + { + if (Creature* pOrc = instance->GetCreature(*itr)) + { + pOrc->GetRandomPoint(afInstanceLoc[1][0], afInstanceLoc[1][1], afInstanceLoc[1][2], 10.0f, fX, fY, fZ); + pOrc->SetWalk(false); + pOrc->GetMotionMaster()->MovePoint(0, fX, fY, fZ); + } + } + } else debug_log("SD2: Instance Old Hillsbrad: SetData (Type: %u Data %u) cannot find any pPlayer.", uiType, uiData); - m_auiEncounter[TYPE_BARREL_DIVERSION] = DONE; + SetData(TYPE_BARREL_DIVERSION, DONE); } } break; - } case TYPE_THRALL_EVENT: - { // nothing to do if already done and thrall respawn - if (m_auiEncounter[TYPE_THRALL_EVENT] == DONE) + if (GetData(TYPE_THRALL_EVENT) == DONE) return; - + m_auiEncounter[uiType] = uiData; if (uiData == FAIL) { - if (m_uiThrallEventCount <= 20) + // despawn the bosses if necessary + if (Creature* pSkarloc = GetSingleCreatureFromStorage(NPC_SKARLOC, true)) + pSkarloc->ForcedDespawn(); + if (Creature* pEpoch = GetSingleCreatureFromStorage(NPC_EPOCH, true)) + pEpoch->ForcedDespawn(); + + if (m_uiThrallEventCount <= MAX_WIPE_COUNTER) { ++m_uiThrallEventCount; debug_log("SD2: Instance Old Hillsbrad: Thrall event failed %u times.", m_uiThrallEventCount); - HandleThrallRelocation(); + // reset Thrall on timer + m_uiThrallResetTimer = 30000; } - else if (m_uiThrallEventCount > 20) - { - m_auiEncounter[TYPE_THRALL_EVENT] = uiData; - m_auiEncounter[TYPE_THRALL_PART1] = uiData; - m_auiEncounter[TYPE_THRALL_PART2] = uiData; - m_auiEncounter[TYPE_THRALL_PART3] = uiData; - m_auiEncounter[TYPE_THRALL_PART4] = uiData; + // If we already respawned Thrall too many times, the event is failed for good + else if (m_uiThrallEventCount > MAX_WIPE_COUNTER) debug_log("SD2: Instance Old Hillsbrad: Thrall event failed %u times. Reset instance required.", m_uiThrallEventCount); - } } - else - m_auiEncounter[TYPE_THRALL_EVENT] = uiData; - - debug_log("SD2: Instance Old Hillsbrad: Thrall escort event adjusted to data %u.",uiData); - break; - } - case TYPE_THRALL_PART1: - m_auiEncounter[TYPE_THRALL_PART1] = uiData; - debug_log("SD2: Instance Old Hillsbrad: Thrall event part I adjusted to data %u.",uiData); - break; - case TYPE_THRALL_PART2: - m_auiEncounter[TYPE_THRALL_PART2] = uiData; - debug_log("SD2: Instance Old Hillsbrad: Thrall event part II adjusted to data %u.",uiData); - break; - case TYPE_THRALL_PART3: - m_auiEncounter[TYPE_THRALL_PART3] = uiData; - debug_log("SD2: Instance Old Hillsbrad: Thrall event part III adjusted to data %u.",uiData); break; - case TYPE_THRALL_PART4: - m_auiEncounter[TYPE_THRALL_PART4] = uiData; - debug_log("SD2: Instance Old Hillsbrad: Thrall event part IV adjusted to data %u.",uiData); + case TYPE_DRAKE: + case TYPE_SKARLOC: + case TYPE_ESCORT_BARN: + case TYPE_ESCORT_INN: + case TYPE_EPOCH: + m_auiEncounter[uiType] = uiData; + debug_log("SD2: Instance Old Hillsbrad: Thrall event type %u adjusted to data %u.", uiType, uiData); break; } + + if (uiData == DONE) + { + OUT_SAVE_INST_DATA; + + std::ostringstream saveStream; + saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2] << " " + << m_auiEncounter[3] << " " << m_auiEncounter[4] << " " << m_auiEncounter[5] << " " + << m_auiEncounter[6]; + + m_strInstData = saveStream.str(); + + SaveToDB(); + OUT_SAVE_INST_DATA_COMPLETE; + } } -uint32 instance_old_hillsbrad::GetData(uint32 uiData) +uint32 instance_old_hillsbrad::GetData(uint32 uiType) { - switch(uiData) + if (uiType < MAX_ENCOUNTER) + return m_auiEncounter[uiType]; + + return 0; +} + +void instance_old_hillsbrad::Load(const char* chrIn) +{ + if (!chrIn) { - case TYPE_BARREL_DIVERSION: - return m_auiEncounter[TYPE_BARREL_DIVERSION]; - case TYPE_THRALL_EVENT: - return m_auiEncounter[TYPE_THRALL_EVENT]; - case TYPE_THRALL_PART1: - return m_auiEncounter[TYPE_THRALL_PART1]; - case TYPE_THRALL_PART2: - return m_auiEncounter[TYPE_THRALL_PART2]; - case TYPE_THRALL_PART3: - return m_auiEncounter[TYPE_THRALL_PART3]; - case TYPE_THRALL_PART4: - return m_auiEncounter[TYPE_THRALL_PART4]; - default: - return 0; + OUT_LOAD_INST_DATA_FAIL; + return; } + + OUT_LOAD_INST_DATA(chrIn); + + std::istringstream loadStream(chrIn); + loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3] + >> m_auiEncounter[4] >> m_auiEncounter[5] >> m_auiEncounter[6]; + + for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) + { + if (m_auiEncounter[i] == IN_PROGRESS) + m_auiEncounter[i] = NOT_STARTED; + } + + // custom reload - if the escort event or the Epoch event are not done, then reset the escort + // this is done, because currently we cannot handle Thrall relocation on server reset + if (m_auiEncounter[5] != DONE) + { + m_auiEncounter[2] = NOT_STARTED; + m_auiEncounter[3] = NOT_STARTED; + m_auiEncounter[4] = NOT_STARTED; + } + + OUT_LOAD_INST_DATA_COMPLETE; } void instance_old_hillsbrad::UpdateLodgeQuestCredit() @@ -215,11 +313,46 @@ void instance_old_hillsbrad::UpdateLodgeQuestCredit() } } +void instance_old_hillsbrad::Update(uint32 uiDiff) +{ + if (m_uiThrallResetTimer) + { + if (m_uiThrallResetTimer <= uiDiff) + { + HandleThrallRelocation(); + m_uiThrallResetTimer = 0; + } + else + m_uiThrallResetTimer -= uiDiff; + } +} + InstanceData* GetInstanceData_instance_old_hillsbrad(Map* pMap) { return new instance_old_hillsbrad(pMap); } +bool ProcessEventId_event_go_barrel_old_hillsbrad(uint32 uiEventId, Object* pSource, Object* pTarget, bool bIsStart) +{ + if (bIsStart && pSource->GetTypeId() == TYPEID_PLAYER) + { + if (instance_old_hillsbrad* pInstance = (instance_old_hillsbrad*)((Player*)pSource)->GetInstanceData()) + { + if (pInstance->GetData(TYPE_BARREL_DIVERSION) == DONE) + return true; + + pInstance->SetData(TYPE_BARREL_DIVERSION, IN_PROGRESS); + + // Don't allow players to use same object twice + if (pTarget->GetTypeId() == TYPEID_GAMEOBJECT) + ((GameObject*)pTarget)->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NO_INTERACT); + + return true; + } + } + return false; +} + void AddSC_instance_old_hillsbrad() { Script* pNewScript; @@ -228,4 +361,9 @@ void AddSC_instance_old_hillsbrad() pNewScript->Name = "instance_old_hillsbrad"; pNewScript->GetInstanceData = &GetInstanceData_instance_old_hillsbrad; pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "event_go_barrel_old_hillsbrad"; + pNewScript->pProcessEventId = &ProcessEventId_event_go_barrel_old_hillsbrad; + pNewScript->RegisterSelf(); } diff --git a/scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.cpp b/scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.cpp index f52e560dd..25750e5d3 100644 --- a/scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.cpp +++ b/scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: Old_Hillsbrad -SD%Complete: 60 -SDComment: Quest support: 10283, 10284. All friendly NPC's. Thrall waypoints fairly complete, missing many details, but possible to complete escort. +SD%Complete: 90 +SDComment: Quest support: 10283, 10284. All friendly NPC's. Thrall escort event is complete, possible a few details are still missing. SDCategory: Caverns of Time, Old Hillsbrad Foothills EndScriptData */ @@ -25,27 +25,12 @@ EndScriptData */ npc_erozion npc_thrall_old_hillsbrad npc_taretha -go_barrel_old_hillsbrad EndContentData */ #include "precompiled.h" #include "old_hillsbrad.h" #include "escort_ai.h" -struct MANGOS_DLL_DECL npc_tarethaAI : public npc_escortAI -{ - npc_tarethaAI(Creature* pCreature); - - instance_old_hillsbrad* m_pInstance; - ObjectGuid m_erozionGuid; - uint32 m_uiErozionEventTimer; - uint32 m_uiErozionPhase; - - void Reset() {} - void JustSummoned(Creature* pSummoned); - void WaypointReached(uint32 uiPoint); - void UpdateEscortAI(const uint32 uiDiff); -}; /*###### ## npc_erozion @@ -57,7 +42,6 @@ enum TEXT_ID_DEFAULT = 9778, TEXT_ID_GOT_ITEM = 9515, - GOSSIP_ID_UNKNOWN_TEXT = -1000000, ITEM_ENTRY_BOMBS = 25853, }; @@ -102,23 +86,51 @@ bool GossipSelect_npc_erozion(Player* pPlayer, Creature* pCreature, uint32 uiSen enum { - // Thrall texts - SAY_TH_START_EVENT_PART1 = -1560023, - SAY_TH_ARMORY = -1560024, + // Thrall texts - part I + SAY_TH_START_EVENT_PART_1 = -1560023, + SAY_ARMORER_CALL_GUARDS = -1560003, + SAY_TH_KILL_ARMORER = -1560050, + SAY_TH_ARMORY_1 = -1560024, + SAY_TH_ARMORY_2 = -1560005, SAY_TH_SKARLOC_MEET = -1560025, + SAY_SKARLOC_ENTER = -1560000, SAY_TH_SKARLOC_TAUNT = -1560026, + + // Thrall texts - part II SAY_TH_START_EVENT_PART2 = -1560027, SAY_TH_MOUNTS_UP = -1560028, + EMOTE_TH_STARTLE_HORSE = -1560006, + + // Thrall texts part III (barn) + SAY_LOOKOUT_BARN_1 = -1560007, + SAY_PROTECTOR_BARN_2 = -1560008, + EMOTE_TH_CALM_HORSE = -1560009, + SAY_PROTECTOR_BARN_3 = -1560010, + SAY_TH_HEAD_TOWN = -1560011, + + // Thrall texts part III (church) + SAY_TH_CHURCH_ENTER = -1560012, + SAY_LOOKOUT_CHURCH = -1560016, SAY_TH_CHURCH_END = -1560029, + + // Thrall texts part III (inn) + SAY_LOOKOUT_INN = -1560017, + SAY_TA_ESCAPED = -1560049, SAY_TH_MEET_TARETHA = -1560030, SAY_EPOCH_ENTER1 = -1560013, + SAY_TH_EPOCH_WONDER = -1560031, SAY_EPOCH_ENTER2 = -1560014, + SAY_TH_EPOCH_KILL_TARETHA = -1560032, SAY_EPOCH_ENTER3 = -1560015, - SAY_TH_EPOCH_WONDER = -1560031, - SAY_TH_EPOCH_KILL_TARETHA = -1560032, + // infinite dragons texts + SAY_INFINITE_DRAGON_AGGRO_1 = -1560004, + SAY_INFINITE_DRAGON_AGGRO_2 = -1560018, + SAY_INFINITE_DRAGON_AGGRO_3 = -1560019, + SAY_INFINITE_DRAGON_AGGRO_4 = -1560020, + // Thrall texts - misc SAY_TH_RANDOM_LOW_HP1 = -1560034, SAY_TH_RANDOM_LOW_HP2 = -1560035, @@ -134,56 +146,64 @@ enum SAY_TH_RANDOM_KILL2 = -1560043, SAY_TH_RANDOM_KILL3 = -1560044, - SAY_TH_KILL_ARMORER = -1560050, - SAY_TH_LEAVE_COMBAT1 = -1560045, SAY_TH_LEAVE_COMBAT2 = -1560046, SAY_TH_LEAVE_COMBAT3 = -1560047, - // Taretha texts - SAY_TA_ESCAPED = -1560049, + // reset texts + SAY_ERONZION_RESET_THRALL = -1560001, + SAY_ERONZION_RESET_LAST = -1560002, - // end event texts - SAY_TA_FREE = -1560048, - SAY_TR_GLAD_SAFE = -1560054, - SAY_TA_NEVER_MET = -1560055, - SAY_TR_THEN_WHO = -1560056, - SAY_PRE_WIPE = -1560057, - SAY_WIPE_MEMORY = -1560051, - SAY_AFTER_WIPE = -1560058, - SAY_ABOUT_TARETHA = -1560052, - SAY_TH_EVENT_COMPLETE = -1560033, - SAY_TA_FAREWELL = -1560053, + // gossip - start item + GOSSIP_ITEM_START = -3560000, // "We are ready to get you out of here, Thrall" + TEXT_ID_START = 9568, - // other texts - ToDo: - SAY_SKARLOC_ENTER = -1560000, - SAY_EPOCH_ENTER_1 = -1560013, - SAY_EPOCH_ENTER_2 = -1560014, - SAY_EPOCH_ENTER_3 = -1560015, + // gossip - after Skarloc items + GOSSIP_ITEM_SKARLOC_1 = -3560002, // "Taretha cannot see you, Thrall." + TEXT_ID_SKARLOC_1 = 9578, // Thank you friends, I owe my freedom to you. Where is Taretha? I hoped to see her + GOSSIP_ITEM_SKARLOC_2 = -3560003, // "The situation is rather complicated, Thrall. It would be best for you..." + TEXT_ID_SKARLOC_2 = 9579, // What do you mean by this? Is Taretha in danger? + GOSSIP_ITEM_SKARLOC_3 = -3560007, + TEXT_ID_SKARLOC_3 = 9580, // I will do no such thing. I simply cannot leave Taretha... + + // gossip - barn + GOSSIP_ITEM_TARREN_1 = -3560004, // "We're ready, Thrall." + TEXT_ID_TARREN = 9597, // tarren mill is beyond these trees + + TEXT_ID_INN = 9614, // I'm glad Taretha is alive. We now must find a way to free her... - // Misc for Thrall + // spells used by Thrall + SPELL_KNOCKOUT_ARMORER = 32890, // cast on the armorer SPELL_STRIKE = 14516, SPELL_SHIELD_BLOCK = 12169, - SPELL_SUMMON_EROZION_IMAGE = 33954, // if thrall dies during escort? + SPELL_SHADOW_SPIKE = 33125, // used to kill Taretha + SPELL_TRANSFORM = 33133, // transform infinite defilers + SPELL_SUMMON_EROZION_IMAGE = 33954, // if thrall dies during escort + SPELL_SPAWN_EROZION_IMAGE = 33955, + // equipment EQUIP_ID_WEAPON = 927, - EQUIP_ID_SHIELD = 20913, + EQUIP_ID_SHIELD = 1961, + + // display ids MODEL_THRALL_UNEQUIPPED = 17292, MODEL_THRALL_EQUIPPED = 18165, + MODEL_SKARLOC_MOUNT = 8469, // misc creature entries - NPC_ARMORER = 18764, + NPC_IMAGE_OF_ERONZION = 19438, + NPC_SKARLOC_MOUNT = 18798, + NPC_THRALL_QUEST_TRIGGER = 20156, + // part I and II ambush npcs NPC_RIFLE = 17820, NPC_WARDEN = 17833, NPC_VETERAN = 17860, + NPC_MAGE = 18934, NPC_WATCHMAN = 17814, NPC_SENTRY = 17815, - NPC_BARN_GUARDSMAN = 18092, - NPC_BARN_PROTECTOR = 18093, - NPC_BARN_LOOKOUT = 18094, - + // part III ambush npcs NPC_CHURCH_GUARDSMAN = 23175, NPC_CHURCH_PROTECTOR = 23179, NPC_CHURCH_LOOKOUT = 23177, @@ -192,36 +212,35 @@ enum NPC_INN_PROTECTOR = 23180, NPC_INN_LOOKOUT = 23178, - NPC_SKARLOC_MOUNT = 18798, - MODEL_SKARLOC_MOUNT = 18223, - NPC_EROZION = 18723, - NPC_THRALL_QUEST_TRIGGER = 20156, - - // gossip - TEXT_ID_START = 9568, - TEXT_ID_SKARLOC1 = 9614, // I'm glad Taretha is alive. We now must find a way to free her... - GOSSIP_ITEM_SKARLOC1 = -3560002, // "Taretha cannot see you, Thrall." - TEXT_ID_SKARLOC2 = 9579, // What do you mean by this? Is Taretha in danger? - GOSSIP_ITEM_SKARLOC2 = -3560003, // "The situation is rather complicated, Thrall. It would be best for you to head into the mountains now, before more of Blackmoore's men show up. We'll make sure Taretha is safe." - TEXT_ID_SKARLOC3 = 9580, - - TEXT_ID_TARREN = 9597, // tarren mill is beyond these trees - GOSSIP_ITEM_TARREN = -3560004, // "We're ready, Thrall." - - TEXT_ID_COMPLETE = 9578, // Thank you friends, I owe my freedom to you. Where is Taretha? I hoped to see her + NPC_INFINITE_DEFILER = 18171, + NPC_INFINITE_SABOTEOR = 18172, + NPC_INFINITE_SLAYER = 18170, }; -const float SPEED_WALK = 0.5f; -const float SPEED_RUN = 1.0f; -const float SPEED_MOUNT = 1.6f; +static const DialogueEntry aThrallDialogue[] = +{ + {SAY_LOOKOUT_BARN_1, NPC_TARREN_MILL_LOOKOUT, 5000}, + {SAY_PROTECTOR_BARN_2, NPC_TARREN_MILL_PROTECTOR, 3000}, + {NPC_YOUNG_BLANCHY, 0, 4000}, + {EMOTE_TH_CALM_HORSE, NPC_THRALL, 1000}, + {SAY_PROTECTOR_BARN_3, NPC_TARREN_MILL_LOOKOUT, 0}, + {NPC_EPOCH, 0, 8000}, + {SAY_TH_EPOCH_WONDER, NPC_THRALL, 4000}, + {SAY_EPOCH_ENTER2, NPC_EPOCH, 4000}, + {SAY_TH_EPOCH_KILL_TARETHA, NPC_THRALL, 2000}, + {NPC_THRALL, 0, 0}, + {0, 0, 0}, +}; -struct MANGOS_DLL_DECL npc_thrall_old_hillsbradAI : public npc_escortAI +struct MANGOS_DLL_DECL npc_thrall_old_hillsbradAI : public npc_escortAI, private DialogueHelper { - npc_thrall_old_hillsbradAI(Creature* pCreature) : npc_escortAI(pCreature) + npc_thrall_old_hillsbradAI(Creature* pCreature) : npc_escortAI(pCreature), + DialogueHelper(aThrallDialogue) { m_pInstance = (instance_old_hillsbrad*)pCreature->GetInstanceData(); - m_bHadMount = false; + InitializeDialogueHelper(m_pInstance); pCreature->SetActiveObjectState(true); // required for proper relocation + m_bHadMount = false; Reset(); } @@ -229,23 +248,176 @@ struct MANGOS_DLL_DECL npc_thrall_old_hillsbradAI : public npc_escortAI bool m_bIsLowHp; bool m_bHadMount; + bool m_bHasChurchYelled; + bool m_bHasInnYelled; + bool m_bHasEpochYelled; + + uint8 m_uiEpochWaveId; + + uint32 m_uiStrikeTimer; + uint32 m_uiShieldBlockTimer; + uint32 m_uiEpochAttackTimer; + + ObjectGuid m_skarlocMountGuid; + + GuidList m_lSkarlocAddsGuids; + GuidList m_lTarrenMillSoldiersGuids; void Reset() { - m_bIsLowHp = false; + m_bIsLowHp = false; + m_uiStrikeTimer = urand(3000, 7000); + m_uiShieldBlockTimer = urand(6000, 11000); if (m_bHadMount) - DoMount(); + m_creature->Mount(MODEL_SKARLOC_MOUNT); if (!HasEscortState(STATE_ESCORT_ESCORTING)) { - DoUnmount(); - m_bHadMount = false; + m_bHadMount = false; + m_bHasChurchYelled = false; + m_bHasEpochYelled = false; + + m_uiEpochWaveId = 0; + m_uiEpochAttackTimer = 0; + + m_creature->Unmount(); SetEquipmentSlots(true); m_creature->SetDisplayId(MODEL_THRALL_UNEQUIPPED); } } + void Aggro(Unit* pWho) + { + switch(urand(0, 3)) + { + case 0: DoScriptText(SAY_TH_RANDOM_AGGRO1, m_creature); break; + case 1: DoScriptText(SAY_TH_RANDOM_AGGRO2, m_creature); break; + case 2: DoScriptText(SAY_TH_RANDOM_AGGRO3, m_creature); break; + case 3: DoScriptText(SAY_TH_RANDOM_AGGRO4, m_creature); break; + } + + if (m_creature->IsMounted()) + { + m_creature->Unmount(); + m_bHadMount = true; + } + } + + void KilledUnit(Unit* pVictim) + { + switch(urand(0, 2)) + { + case 0: DoScriptText(SAY_TH_RANDOM_KILL1, m_creature); break; + case 1: DoScriptText(SAY_TH_RANDOM_KILL2, m_creature); break; + case 2: DoScriptText(SAY_TH_RANDOM_KILL3, m_creature); break; + } + } + + void JustDied(Unit* pKiller) + { + // fail, and relocation handled in instance script + if (m_pInstance) + m_pInstance->SetData(TYPE_THRALL_EVENT, FAIL); + + DoScriptText(urand(0, 1) ? SAY_TH_RANDOM_DIE1 : SAY_TH_RANDOM_DIE2, m_creature); + DoCastSpellIfCan(m_creature, SPELL_SUMMON_EROZION_IMAGE, CAST_TRIGGERED); + + // despawn the summons which won't self despawn + for (GuidList::const_iterator itr = m_lSkarlocAddsGuids.begin(); itr != m_lSkarlocAddsGuids.end(); ++itr) + { + if (Creature* pTemp = m_creature->GetMap()->GetCreature(*itr)) + pTemp->ForcedDespawn(); + } + for (GuidList::const_iterator itr = m_lTarrenMillSoldiersGuids.begin(); itr != m_lTarrenMillSoldiersGuids.end(); ++itr) + { + if (Creature* pTemp = m_creature->GetMap()->GetCreature(*itr)) + pTemp->ForcedDespawn(); + } + } + + void CorpseRemoved(uint32 &uiRespawnDelay) + { + uiRespawnDelay = 0; + + // if we're done, just set some high so he never really respawn + if (m_pInstance && (m_pInstance->GetData(TYPE_THRALL_EVENT) == DONE || m_pInstance->GetData(TYPE_THRALL_EVENT) == FAIL)) + uiRespawnDelay = 12 * HOUR; + } + + void JustRespawned() + { + npc_escortAI::JustRespawned(); + + if (!m_pInstance) + return; + + if (m_pInstance->GetData(TYPE_THRALL_EVENT) == IN_PROGRESS) + { + Start(true); + SetEscortPaused(true); + + m_bHadMount = false; + m_creature->Unmount(); + + m_creature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER); + + // check current states before fail and set spesific for the part + if (m_pInstance->GetData(TYPE_SKARLOC) != DONE) + { + SetCurrentWaypoint(1); // basement + + SetEquipmentSlots(true); + m_creature->SetDisplayId(MODEL_THRALL_UNEQUIPPED); + m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); + m_lSkarlocAddsGuids.clear(); + + // reset prison door + m_pInstance->DoUseDoorOrButton(GO_PRISON_DOOR); + // respawn the Armorer + if (Creature* pArmorer = m_pInstance->GetSingleCreatureFromStorage(NPC_ARMORER)) + pArmorer->Respawn(); + // despwn the horse + if (Creature* pHorse = m_creature->GetMap()->GetCreature(m_skarlocMountGuid)) + pHorse->ForcedDespawn(); + } + else if (m_pInstance->GetData(TYPE_ESCORT_BARN) != DONE) + { + SetCurrentWaypoint(35); // keep + + m_creature->SetDisplayId(MODEL_THRALL_EQUIPPED); + m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); + + // resummon the mount + m_creature->SummonCreature(NPC_SKARLOC_MOUNT, 2047.775f, 253.4088f, 62.91183f, 5.37f, TEMPSUMMON_DEAD_DESPAWN, 0); + } + else if (m_pInstance->GetData(TYPE_ESCORT_INN) != DONE) + { + SetCurrentWaypoint(67); // barn + m_lTarrenMillSoldiersGuids.clear(); + + m_creature->SetDisplayId(MODEL_THRALL_EQUIPPED); + m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); + } + else if (m_pInstance->GetData(TYPE_EPOCH) != DONE) + { + SetCurrentWaypoint(108); // inn + m_creature->SetDisplayId(MODEL_THRALL_EQUIPPED); + m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); + m_lTarrenMillSoldiersGuids.clear(); + m_uiEpochWaveId = 0; + + // Reset Taretha + if (Creature* pTaretha = m_pInstance->GetSingleCreatureFromStorage(NPC_TARETHA)) + { + pTaretha->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); + pTaretha->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + pTaretha->SetStandState(UNIT_STAND_STATE_STAND); + } + } + } + } + void EnterEvadeMode() { if (HasEscortState(STATE_ESCORT_ESCORTING)) @@ -261,6 +433,263 @@ struct MANGOS_DLL_DECL npc_thrall_old_hillsbradAI : public npc_escortAI npc_escortAI::EnterEvadeMode(); } + void JustSummoned(Creature* pSummoned) + { + switch(pSummoned->GetEntry()) + { + // Barn soldiers - also used for the first wave of Epoch adds + case NPC_TARREN_MILL_GUARDSMAN: + case NPC_TARREN_MILL_PROTECTOR: + case NPC_TARREN_MILL_LOOKOUT: + m_lTarrenMillSoldiersGuids.push_back(pSummoned->GetObjectGuid()); + // For the summons corresponding to the Epoch event, handle movement + if (m_pInstance && m_pInstance->GetData(TYPE_ESCORT_INN) == DONE) + { + pSummoned->GetMotionMaster()->MovePoint(1, pSummoned->GetPositionX(), pSummoned->GetPositionY() - 10.0f, pSummoned->GetPositionZ()); + + // Transform on timer + if (!m_uiEpochAttackTimer) + m_uiEpochAttackTimer = 7000; + } + break; + // Epoch wave spawns + case NPC_INFINITE_DEFILER: + case NPC_INFINITE_SABOTEOR: + case NPC_INFINITE_SLAYER: + m_lTarrenMillSoldiersGuids.push_back(pSummoned->GetObjectGuid()); + pSummoned->AI()->AttackStart(m_creature); + if (!m_bHasEpochYelled) + { + switch (urand(0, 3)) + { + case 0: DoScriptText(SAY_INFINITE_DRAGON_AGGRO_1, pSummoned); break; + case 1: DoScriptText(SAY_INFINITE_DRAGON_AGGRO_2, pSummoned); break; + case 2: DoScriptText(SAY_INFINITE_DRAGON_AGGRO_3, pSummoned); break; + case 3: DoScriptText(SAY_INFINITE_DRAGON_AGGRO_4, pSummoned); break; + } + m_bHasEpochYelled = true; + } + break; + case NPC_SKARLOC_MOUNT: + m_skarlocMountGuid = pSummoned->GetObjectGuid(); + break; + // Church solider - used to yell + case NPC_CHURCH_LOOKOUT: + if (!m_bHasChurchYelled) + { + DoScriptText(SAY_LOOKOUT_CHURCH, pSummoned); + m_bHasChurchYelled = true; + } + pSummoned->AI()->AttackStart(m_creature); + break; + // Inn soldier - used to yell + case NPC_INN_LOOKOUT: + if (!m_bHasInnYelled) + { + DoScriptText(SAY_LOOKOUT_INN, pSummoned); + m_bHasInnYelled = true; + } + pSummoned->AI()->AttackStart(m_creature); + break; + // Spawned when Thrall is dead + case NPC_IMAGE_OF_ERONZION: + if (m_pInstance) + DoScriptText(m_pInstance->GetThrallEventCount() < MAX_WIPE_COUNTER ? SAY_ERONZION_RESET_THRALL : SAY_ERONZION_RESET_LAST, pSummoned); + pSummoned->CastSpell(pSummoned, SPELL_SPAWN_EROZION_IMAGE, false); + pSummoned->ForcedDespawn(30000); + break; + case NPC_SKARLOC: + pSummoned->SetWalk(false); + pSummoned->GetMotionMaster()->MovePoint(1, 2050.029f, 249.9696f, 63.0313f); + break; + case NPC_EPOCH: + pSummoned->SetLevitate(true); + DoScriptText(SAY_EPOCH_ENTER1, pSummoned); + break; + // Skarloc helpers - they have special behavior + case NPC_WARDEN: + case NPC_VETERAN: + if (m_pInstance && m_pInstance->GetData(TYPE_SKARLOC) == IN_PROGRESS) + { + // Allow these to follow Skarloc and attack only on command + if (Creature* pSkarloc = m_pInstance->GetSingleCreatureFromStorage(NPC_SKARLOC)) + pSummoned->GetMotionMaster()->MoveFollow(pSkarloc, 5.0f, pSummoned->GetAngle(pSkarloc) + M_PI_F); + + pSummoned->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PASSIVE | UNIT_FLAG_OOC_NOT_ATTACKABLE); + m_lSkarlocAddsGuids.push_back(pSummoned->GetObjectGuid()); + } + else + pSummoned->AI()->AttackStart(m_creature); + break; + default: + pSummoned->AI()->AttackStart(m_creature); + break; + } + } + + void SummonedCreatureJustDied(Creature* pSummoned) + { + switch (pSummoned->GetEntry()) + { + case NPC_EPOCH: + DoHandleQuestCredit(); + SetEscortPaused(false); + break; + case NPC_SKARLOC: + SetEscortPaused(false); + break; + case NPC_TARREN_MILL_PROTECTOR: + case NPC_TARREN_MILL_LOOKOUT: + case NPC_TARREN_MILL_GUARDSMAN: + // continue escort when all the barn soldiers are dead + m_lTarrenMillSoldiersGuids.remove(pSummoned->GetObjectGuid()); + if (m_lTarrenMillSoldiersGuids.empty()) + { + SetRun(); + SetEscortPaused(false); + } + break; + case NPC_INFINITE_DEFILER: + case NPC_INFINITE_SABOTEOR: + case NPC_INFINITE_SLAYER: + // Handle Epoch event waves - spawn another when the previous is dead + m_lTarrenMillSoldiersGuids.remove(pSummoned->GetObjectGuid()); + if (m_lTarrenMillSoldiersGuids.empty()) + { + m_lTarrenMillSoldiersGuids.clear(); + m_bHasEpochYelled = false; + switch (m_uiEpochWaveId) + { + case 1: + m_creature->SummonCreature(NPC_INFINITE_DEFILER, 2595.477f, 684.3738f, 55.95534f, 6.05f, TEMPSUMMON_DEAD_DESPAWN, 0); + m_creature->SummonCreature(NPC_INFINITE_SABOTEOR, 2602.208f, 678.2955f, 56.34682f, 6.07f, TEMPSUMMON_DEAD_DESPAWN, 0); + m_creature->SummonCreature(NPC_INFINITE_SLAYER, 2602.8f, 686.2845f, 55.79315f, 5.95f, TEMPSUMMON_DEAD_DESPAWN, 0); + ++m_uiEpochWaveId; + break; + case 2: + m_creature->SummonCreature(NPC_INFINITE_DEFILER, 2646.289f, 718.5257f, 57.90024f, 4.32f, TEMPSUMMON_DEAD_DESPAWN, 0); + m_creature->SummonCreature(NPC_INFINITE_SABOTEOR, 2641.788f, 719.7106f, 57.4023f, 4.46f, TEMPSUMMON_DEAD_DESPAWN, 0); + m_creature->SummonCreature(NPC_INFINITE_SLAYER, 2645.725f, 709.7153f, 56.69411f, 4.38f, TEMPSUMMON_DEAD_DESPAWN, 0); + m_creature->SummonCreature(NPC_INFINITE_SLAYER, 2639.641f, 710.5246f, 56.23582f, 4.60f, TEMPSUMMON_DEAD_DESPAWN, 0); + ++m_uiEpochWaveId; + break; + case 3: + if (m_pInstance) + { + if (Creature* pEpoch = m_pInstance->GetSingleCreatureFromStorage(NPC_EPOCH)) + { + pEpoch->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PASSIVE); + pEpoch->AI()->AttackStart(m_creature); + AttackStart(pEpoch); + } + } + break; + } + } + break; + } + } + + void SummonedMovementInform(Creature* pSummoned, uint32 uiType, uint32 uiPointId) + { + if (uiType != POINT_MOTION_TYPE) + return; + + switch (pSummoned->GetEntry()) + { + // Handle Skarloc movement for the intro part + case NPC_SKARLOC: + switch(uiPointId) + { + case 1: + // summon mount + pSummoned->Unmount(); + m_creature->SummonCreature(NPC_SKARLOC_MOUNT, 2047.775f, 253.4088f, 62.91183f, 5.37f, TEMPSUMMON_DEAD_DESPAWN, 0); + pSummoned->SetWalk(true); + pSummoned->GetMotionMaster()->MovePoint(2, 2059.899f, 234.2593f, 64.10809f); + break; + case 2: + // taunt Thrall + DoScriptText(SAY_SKARLOC_ENTER, pSummoned); + SetEscortPaused(false); + break; + } + break; + // Handle infinite dragons transform on point reaches + case NPC_TARREN_MILL_GUARDSMAN: + if (uiPointId) + { + pSummoned->CastSpell(pSummoned, SPELL_TRANSFORM, false); + pSummoned->UpdateEntry(NPC_INFINITE_SLAYER); + } + break; + case NPC_TARREN_MILL_PROTECTOR: + if (uiPointId) + { + pSummoned->CastSpell(pSummoned, SPELL_TRANSFORM, false); + pSummoned->UpdateEntry(NPC_INFINITE_SABOTEOR); + } + break; + case NPC_TARREN_MILL_LOOKOUT: + if (uiPointId) + { + pSummoned->CastSpell(pSummoned, SPELL_TRANSFORM, false); + pSummoned->UpdateEntry(NPC_INFINITE_DEFILER); + } + break; + } + } + + void JustDidDialogueStep(int32 iEntry) + { + if (!m_pInstance) + return; + + switch(iEntry) + { + case NPC_YOUNG_BLANCHY: + // ToDo: deal with the horse animation! + break; + case EMOTE_TH_CALM_HORSE: + if (Creature* pHorse = m_pInstance->GetSingleCreatureFromStorage(NPC_YOUNG_BLANCHY)) + m_creature->SetFacingToObject(pHorse); + break; + case SAY_PROTECTOR_BARN_3: + // Move the soldiers inside + float fX, fY, fZ; + for (GuidList::const_iterator itr = m_lTarrenMillSoldiersGuids.begin(); itr != m_lTarrenMillSoldiersGuids.end(); ++itr) + { + if (Creature* pTemp = m_creature->GetMap()->GetCreature(*itr)) + { + pTemp->SetWalk(false); + pTemp->GetRandomPoint(2480.19f, 696.15f, 55.78f, 5.0f, fX, fY, fZ); + pTemp->GetMotionMaster()->MovePoint(0, fX, fY, fZ); + pTemp->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PASSIVE); + } + } + break; + case SAY_TH_EPOCH_WONDER: + m_creature->SetFacingTo(2.69f); + break; + case SAY_EPOCH_ENTER2: + if (Creature* pTaretha = m_pInstance->GetSingleCreatureFromStorage(NPC_TARETHA)) + { + pTaretha->CastSpell(pTaretha, SPELL_SHADOW_SPIKE, true); + pTaretha->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + pTaretha->SetStandState(UNIT_STAND_STATE_DEAD); + } + break; + case SAY_TH_EPOCH_KILL_TARETHA: + if (Creature* pTaretha = m_pInstance->GetSingleCreatureFromStorage(NPC_TARETHA)) + m_creature->SetFacingToObject(pTaretha); + break; + case NPC_THRALL: + SetRun(); + SetEscortPaused(false); + break; + } + } + void WaypointReached(uint32 uiPoint) { if (!m_pInstance) @@ -268,304 +697,304 @@ struct MANGOS_DLL_DECL npc_thrall_old_hillsbradAI : public npc_escortAI switch(uiPoint) { + // *** Escort event - Part I - inside the keep *** + case 0: + m_pInstance->DoUseDoorOrButton(GO_PRISON_DOOR); + break; case 8: - SetRun(false); - m_creature->SummonCreature(NPC_ARMORER, 2181.87f, 112.46f, 89.45f, 0.26f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,5000); + if (Creature* pArmorer = m_pInstance->GetSingleCreatureFromStorage(NPC_ARMORER)) + { + DoScriptText(SAY_ARMORER_CALL_GUARDS, pArmorer); + pArmorer->SetFacingToObject(m_creature); + } break; case 9: - DoScriptText(SAY_TH_ARMORY, m_creature); - SetEquipmentSlots(false, EQUIP_ID_WEAPON, EQUIP_ID_SHIELD, EQUIP_NO_CHANGE); + DoScriptText(SAY_TH_KILL_ARMORER, m_creature); + DoCastSpellIfCan(m_creature, SPELL_KNOCKOUT_ARMORER); + // also kill the armorer + if (Creature* pArmorer = m_pInstance->GetSingleCreatureFromStorage(NPC_ARMORER)) + pArmorer->DealDamage(pArmorer, pArmorer->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NONE, NULL, false); break; case 10: + DoScriptText(SAY_TH_ARMORY_1, m_creature); + m_creature->SetStandState(UNIT_STAND_STATE_KNEEL); m_creature->SetDisplayId(MODEL_THRALL_EQUIPPED); + SetEquipmentSlots(false, EQUIP_ID_WEAPON, EQUIP_ID_SHIELD, EQUIP_NO_CHANGE); break; case 11: - SetRun(); + m_creature->SetStandState(UNIT_STAND_STATE_STAND); + break; + case 12: + if (Creature* pArmorer = m_pInstance->GetSingleCreatureFromStorage(NPC_ARMORER)) + m_creature->SetFacingToObject(pArmorer); + DoScriptText(SAY_TH_ARMORY_2, m_creature); break; - case 15: - m_creature->SummonCreature(NPC_RIFLE, 2200.28f, 137.37f, 87.93f, 5.07f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); - m_creature->SummonCreature(NPC_WARDEN, 2197.44f, 131.83f, 87.93f, 0.78f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); - m_creature->SummonCreature(NPC_VETERAN, 2203.62f, 135.40f, 87.93f, 3.70f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); - m_creature->SummonCreature(NPC_VETERAN, 2200.75f, 130.13f, 87.93f, 1.48f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); + // *** Escort event - Part I - outside the keep *** + case 17: + m_creature->SummonCreature(NPC_MAGE, 2186.909f, 139.8108f, 88.21628f, 5.75f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); + m_creature->SummonCreature(NPC_WARDEN, 2187.943f, 141.6124f, 88.21628f, 5.73f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); + m_creature->SummonCreature(NPC_VETERAN, 2190.508f, 140.4597f, 88.21628f, 6.04f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); + m_creature->SummonCreature(NPC_VETERAN, 2189.543f, 139.0996f, 88.23965f, 0.21f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); break; - case 21: - m_creature->SummonCreature(NPC_RIFLE, 2135.80f, 154.01f, 67.45f, 4.98f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); - m_creature->SummonCreature(NPC_WARDEN, 2144.36f, 151.87f, 67.74f, 4.46f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); - m_creature->SummonCreature(NPC_VETERAN, 2142.12f, 154.41f, 67.12f, 4.56f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); - m_creature->SummonCreature(NPC_VETERAN, 2138.08f, 155.38f, 67.24f, 4.60f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); + case 20: + m_creature->SummonCreature(NPC_MAGE, 2149.463f, 104.9756f, 73.63239f, 1.71f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); + m_creature->SummonCreature(NPC_SENTRY, 2147.642f, 105.0251f, 73.99422f, 1.52f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); + m_creature->SummonCreature(NPC_VETERAN, 2149.212f, 107.2005f, 74.15676f, 1.71f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); + m_creature->SummonCreature(NPC_WARDEN, 2147.328f, 106.7235f, 74.34447f, 1.69f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); + break; + case 23: + m_creature->SummonCreature(NPC_MAGE, 2142.363f, 172.4260f, 66.30494f, 2.54f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); + m_creature->SummonCreature(NPC_SENTRY, 2138.177f, 168.6046f, 66.30494f, 2.47f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); + m_creature->SummonCreature(NPC_SENTRY, 2142.372f, 174.2907f, 66.30494f, 2.56f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); + m_creature->SummonCreature(NPC_VETERAN, 2140.146f, 169.2364f, 66.30494f, 2.49f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); break; case 25: - m_creature->SummonCreature(NPC_RIFLE, 2102.98f, 192.17f, 65.24f, 6.02f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); - m_creature->SummonCreature(NPC_WARDEN, 2108.48f, 198.75f, 65.18f, 5.15f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); - m_creature->SummonCreature(NPC_VETERAN, 2106.11f, 197.29f, 65.18f, 5.63f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); - m_creature->SummonCreature(NPC_VETERAN, 2104.18f, 194.82f, 65.18f, 5.75f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); + m_creature->SummonCreature(NPC_MAGE, 2107.938f, 192.0753f, 66.30494f, 2.54f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); + m_creature->SummonCreature(NPC_MAGE, 2109.852f, 195.1403f, 66.30493f, 2.42f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); + m_creature->SummonCreature(NPC_VETERAN, 2108.486f, 189.9346f, 66.30494f, 2.68f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); + m_creature->SummonCreature(NPC_VETERAN, 2112.387f, 195.4947f, 66.30494f, 2.39f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); break; - case 29: + // *** Escort event - Part I - meet Skarloc *** + case 31: + m_pInstance->SetData(TYPE_SKARLOC, IN_PROGRESS); + m_creature->SummonCreature(NPC_SKARLOC, 2000.201f, 277.9190f, 66.4911f, 6.11f, TEMPSUMMON_DEAD_DESPAWN, 0); + m_creature->SummonCreature(NPC_VETERAN, 1997.969f, 274.4247f, 66.6181f, 5.67f, TEMPSUMMON_DEAD_DESPAWN, 0); + m_creature->SummonCreature(NPC_WARDEN, 2000.002f, 282.0754f, 66.2986f, 6.02f, TEMPSUMMON_DEAD_DESPAWN, 0); DoScriptText(SAY_TH_SKARLOC_MEET, m_creature); - m_creature->SummonCreature(NPC_SKARLOC, 2036.48f, 271.22f, 63.43f, 5.27f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); + SetEscortPaused(true); break; - case 30: + case 33: + // Allow the guards and Skarloc to attack + if (Creature* pSkarloc = m_pInstance->GetSingleCreatureFromStorage(NPC_SKARLOC)) + { + pSkarloc->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PASSIVE); + pSkarloc->AI()->AttackStart(m_creature); + AttackStart(pSkarloc); + } + for (GuidList::const_iterator itr = m_lSkarlocAddsGuids.begin(); itr != m_lSkarlocAddsGuids.end(); ++itr) + { + if (Creature* pTemp = m_creature->GetMap()->GetCreature(*itr)) + { + pTemp->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PASSIVE); + pTemp->AI()->AttackStart(m_creature); + } + } + break; + case 34: + // wait for player input + if (Creature* pMount = m_creature->GetMap()->GetCreature(m_skarlocMountGuid)) + m_creature->SetFacingToObject(pMount); + SetEscortPaused(true); m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); - SetRun(false); break; - case 31: - DoScriptText(SAY_TH_MOUNTS_UP, m_creature); - DoMount(); - SetRun(); + // *** Escort event - Part II - road *** + case 35: + if (Creature* pMount = m_creature->GetMap()->GetCreature(m_skarlocMountGuid)) + { + m_creature->SetFacingToObject(pMount); + pMount->ForcedDespawn(4000); + } break; - case 37: - // possibly regular patrollers? If so, remove this and let database handle them - m_creature->SummonCreature(NPC_WATCHMAN, 2124.26f, 522.16f, 56.87f, 3.99f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); - m_creature->SummonCreature(NPC_WATCHMAN, 2121.69f, 525.37f, 57.11f, 4.01f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); - m_creature->SummonCreature(NPC_SENTRY, 2124.65f, 524.55f, 56.63f, 3.98f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); + case 36: + DoScriptText(SAY_TH_MOUNTS_UP, m_creature); + m_creature->SetFacingTo(5.33f); + m_creature->Mount(MODEL_SKARLOC_MOUNT); break; - case 59: - m_creature->SummonCreature(NPC_SKARLOC_MOUNT, 2488.64f, 625.77f, 58.26f, 4.71f, TEMPSUMMON_TIMED_DESPAWN, 10000); - DoUnmount(); + // *** Escort event - Part II - reached barn *** + case 64: + m_creature->SummonCreature(NPC_SKARLOC_MOUNT, 2488.779f, 623.9724f, 58.07383f, 1.37f, TEMPSUMMON_TIMED_DESPAWN, 30000); + m_creature->Unmount(); m_bHadMount = false; - SetRun(false); break; - case 60: - m_creature->HandleEmote(EMOTE_ONESHOT_EXCLAMATION); - // make horsie run off + case 65: + if (Creature* pMount = m_creature->GetMap()->GetCreature(m_skarlocMountGuid)) + m_creature->SetFacingToObject(pMount); + DoScriptText(EMOTE_TH_STARTLE_HORSE, m_creature); + break; + case 66: + if (Creature* pMount = m_creature->GetMap()->GetCreature(m_skarlocMountGuid)) + { + pMount->SetWalk(false); + pMount->GetMotionMaster()->MovePoint(0, 2517.504f, 506.253f, 42.329f); + } + m_creature->SetFacingTo(4.66f); + // wait for player input SetEscortPaused(true); m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); - m_pInstance->SetData(TYPE_THRALL_PART2, DONE); - SetRun(); + m_pInstance->SetData(TYPE_ESCORT_BARN, DONE); break; - case 64: + // *** Escort event - Part III - barn *** + case 70: SetRun(false); break; - case 68: - m_creature->SummonCreature(NPC_BARN_PROTECTOR, 2500.22f, 692.60f, 55.50f, 2.84f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); - m_creature->SummonCreature(NPC_BARN_LOOKOUT, 2500.13f, 696.55f, 55.51f, 3.38f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); - m_creature->SummonCreature(NPC_BARN_GUARDSMAN, 2500.55f, 693.64f, 55.50f, 3.14f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); - m_creature->SummonCreature(NPC_BARN_GUARDSMAN, 2500.94f, 695.81f, 55.50f, 3.14f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); + case 73: + m_creature->SummonCreature(NPC_TARREN_MILL_PROTECTOR, 2500.22f, 692.60f, 55.50f, 2.84f, TEMPSUMMON_DEAD_DESPAWN, 0); + m_creature->SummonCreature(NPC_TARREN_MILL_LOOKOUT, 2500.13f, 696.55f, 55.51f, 3.38f, TEMPSUMMON_DEAD_DESPAWN, 0); + m_creature->SummonCreature(NPC_TARREN_MILL_GUARDSMAN, 2500.55f, 693.64f, 55.50f, 3.14f, TEMPSUMMON_DEAD_DESPAWN, 0); + m_creature->SummonCreature(NPC_TARREN_MILL_GUARDSMAN, 2500.94f, 695.81f, 55.50f, 3.14f, TEMPSUMMON_DEAD_DESPAWN, 0); break; - case 71: - SetRun(); + // *** Escort event - Part III - start barn dialogue *** + case 74: + StartNextDialogueText(SAY_LOOKOUT_BARN_1); + SetEscortPaused(true); break; - case 81: - SetRun(false); + case 75: + DoScriptText(SAY_TH_HEAD_TOWN, m_creature); break; - case 83: - m_creature->SummonCreature(NPC_CHURCH_PROTECTOR, 2627.33f, 646.82f, 56.03f, 4.28f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 5000); - m_creature->SummonCreature(NPC_CHURCH_LOOKOUT, 2624.14f, 648.03f, 56.03f, 4.50f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 5000); - m_creature->SummonCreature(NPC_CHURCH_GUARDSMAN, 2625.32f, 649.60f, 56.03f, 4.38f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 5000); - m_creature->SummonCreature(NPC_CHURCH_GUARDSMAN, 2627.22f, 649.00f, 56.03f, 4.34f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 5000); + // *** Escort event - Part III - church *** + case 92: + DoScriptText(SAY_TH_CHURCH_ENTER, m_creature); + m_creature->SetFacingTo(1.0f); break; - case 84: - DoScriptText(SAY_TH_CHURCH_END, m_creature); - SetRun(); + case 93: + m_creature->SummonCreature(NPC_CHURCH_PROTECTOR, 2627.88f, 657.63f, 55.98f, 4.28f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 5000); + m_creature->SummonCreature(NPC_CHURCH_LOOKOUT, 2627.27f, 655.17f, 56.03f, 4.50f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 5000); + m_creature->SummonCreature(NPC_CHURCH_LOOKOUT, 2629.21f, 654.81f, 56.04f, 4.38f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 5000); + m_creature->SummonCreature(NPC_CHURCH_GUARDSMAN, 2629.98f, 656.96f, 55.96f, 4.34f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 5000); break; - case 91: - SetRun(false); + case 94: + DoScriptText(SAY_TH_CHURCH_END, m_creature); break; - case 93: + // *** Escort event - Part III - inside the inn *** + case 105: m_creature->SummonCreature(NPC_INN_PROTECTOR, 2652.71f, 660.31f, 61.93f, 1.67f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); - m_creature->SummonCreature(NPC_INN_LOOKOUT, 2648.96f, 662.59f, 61.93f, 0.79f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); - m_creature->SummonCreature(NPC_INN_GUARDSMAN, 2657.36f, 662.34f, 61.93f, 2.68f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); + m_creature->SummonCreature(NPC_INN_LOOKOUT, 2648.96f, 662.59f, 61.93f, 0.79f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); + m_creature->SummonCreature(NPC_INN_LOOKOUT, 2657.36f, 662.34f, 61.93f, 2.68f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); m_creature->SummonCreature(NPC_INN_GUARDSMAN, 2656.39f, 659.77f, 61.93f, 2.61f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); + SetRun(false); break; - case 94: - if (Creature* pTaretha = m_pInstance->GetTaretha()) + // *** Escort event - Part III - meet Taretha *** + case 106: + if (Creature* pTaretha = m_pInstance->GetSingleCreatureFromStorage(NPC_TARETHA)) DoScriptText(SAY_TA_ESCAPED, pTaretha, m_creature); - break; - case 95: + case 107: + // wait for player input DoScriptText(SAY_TH_MEET_TARETHA, m_creature); - m_pInstance->SetData(TYPE_THRALL_PART3, DONE); + m_pInstance->SetData(TYPE_ESCORT_INN, DONE); + m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); + if (Creature* pTaretha = m_pInstance->GetSingleCreatureFromStorage(NPC_TARETHA)) + pTaretha->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); SetEscortPaused(true); break; - case 96: - DoScriptText(SAY_TH_EPOCH_WONDER, m_creature); - break; - case 97: - DoScriptText(SAY_TH_EPOCH_KILL_TARETHA, m_creature); - SetRun(); + // *** Escort event - Part IV - Epoch *** + case 108: + m_creature->SummonCreature(NPC_EPOCH, 2639.92f, 700.2587f, 65.13583f, 4.74f, TEMPSUMMON_DEAD_DESPAWN, 0); + StartNextDialogueText(NPC_EPOCH); + SetEscortPaused(true); break; - case 104: - if (Creature* pEpoch = m_pInstance->GetEpoch()) + // *** Escort event - Part IV - Epoch - begin fight *** + case 116: + if (Creature* pEpoch = m_pInstance->GetSingleCreatureFromStorage(NPC_EPOCH)) + { DoScriptText(SAY_EPOCH_ENTER3, pEpoch); - + m_creature->SetFacingToObject(pEpoch); + } break; - case 105: // outside inn, meeting the dragon + case 117: + // begin fight + m_lTarrenMillSoldiersGuids.clear(); + m_creature->SummonCreature(NPC_TARREN_MILL_GUARDSMAN, 2630.318f, 704.3388f, 56.33701f, 4.73f, TEMPSUMMON_DEAD_DESPAWN, 0); + m_creature->SummonCreature(NPC_TARREN_MILL_LOOKOUT, 2639.1f, 707.3839f, 56.14664f, 4.49f, TEMPSUMMON_DEAD_DESPAWN, 0); + m_creature->SummonCreature(NPC_TARREN_MILL_PROTECTOR, 2653.135f, 698.6548f, 57.56876f, 3.17f, TEMPSUMMON_DEAD_DESPAWN, 0); + ++m_uiEpochWaveId; SetEscortPaused(true); - - if (Creature* pEpoch = m_pInstance->GetEpoch()) - m_creature->SetFacingToObject(pEpoch); - break; - case 106: // epoch is dead, proceeding with cheering - { - // trigger taretha to run down outside - if (Creature* pTaretha = m_pInstance->GetTaretha()) - { - if (npc_tarethaAI* pTarethaAI = dynamic_cast(pTaretha->AI())) - pTarethaAI->Start(true, GetPlayerForEscort()); - } - - // kill credit creature for quest - Map::PlayerList const& lPlayerList = m_pInstance->instance->GetPlayers(); - - if (!lPlayerList.isEmpty()) - { - for(Map::PlayerList::const_iterator itr = lPlayerList.begin(); itr != lPlayerList.end(); ++itr) - { - if (Player* pPlayer = itr->getSource()) - pPlayer->KilledMonsterCredit(NPC_THRALL_QUEST_TRIGGER, m_creature->GetObjectGuid()); - } - } - - // a lot will happen here, thrall and taretha talk, erozion appear at spot to explain - // handled by taretha script + // *** Escort event - Epilogue - run off *** + case 118: + // return to position SetEscortPaused(true); break; - } - case 107: + case 120: m_creature->SetActiveObjectState(false); break; } } - void WaypointStart(uint32 uiPointId) - { - if (!m_pInstance) - return; - - if (uiPointId == 97) - { - if (Creature* pEpoch = m_pInstance->GetEpoch()) - DoScriptText(SAY_EPOCH_ENTER2, pEpoch); - } - } - - void StartWP() + // Wrapper to restart escort + void DoRestartEscortMovement() { m_creature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); SetEscortPaused(false); } - void DoMount() - { - m_creature->Mount(MODEL_SKARLOC_MOUNT); - m_creature->SetSpeedRate(MOVE_RUN, SPEED_MOUNT); - } - - void DoUnmount() + // Complete the quest for escorting + void DoHandleQuestCredit() { - m_creature->Unmount(); - m_creature->SetSpeedRate(MOVE_RUN, SPEED_RUN); - } + Map::PlayerList const& lPlayerList = m_pInstance->instance->GetPlayers(); - void Aggro(Unit* pWho) - { - switch(urand(0, 3)) - { - case 0: DoScriptText(SAY_TH_RANDOM_AGGRO1, m_creature); break; - case 1: DoScriptText(SAY_TH_RANDOM_AGGRO2, m_creature); break; - case 2: DoScriptText(SAY_TH_RANDOM_AGGRO3, m_creature); break; - case 3: DoScriptText(SAY_TH_RANDOM_AGGRO4, m_creature); break; - } - - if (m_creature->IsMounted()) + if (!lPlayerList.isEmpty()) { - DoUnmount(); - m_bHadMount = true; + for(Map::PlayerList::const_iterator itr = lPlayerList.begin(); itr != lPlayerList.end(); ++itr) + { + if (Player* pPlayer = itr->getSource()) + pPlayer->KilledMonsterCredit(NPC_THRALL_QUEST_TRIGGER, m_creature->GetObjectGuid()); + } } } - void JustSummoned(Creature* pSummoned) + // Wrapper to make the dragons attack + void DoStartDragonsAttack() { - switch(pSummoned->GetEntry()) + for (GuidList::const_iterator itr = m_lTarrenMillSoldiersGuids.begin(); itr != m_lTarrenMillSoldiersGuids.end(); ++itr) { - // TODO: make Scarloc start into event instead, and not start attack directly - case NPC_BARN_GUARDSMAN: - case NPC_BARN_PROTECTOR: - case NPC_BARN_LOOKOUT: - case NPC_SKARLOC_MOUNT: - break; - default: - pSummoned->AI()->AttackStart(m_creature); - break; - } - } + if (Creature* pTemp = m_creature->GetMap()->GetCreature(*itr)) + { + // Only one will yell aggro + if (!m_bHasEpochYelled) + { + switch (urand(0, 3)) + { + case 0: DoScriptText(SAY_INFINITE_DRAGON_AGGRO_1, pTemp); break; + case 1: DoScriptText(SAY_INFINITE_DRAGON_AGGRO_2, pTemp); break; + case 2: DoScriptText(SAY_INFINITE_DRAGON_AGGRO_3, pTemp); break; + case 3: DoScriptText(SAY_INFINITE_DRAGON_AGGRO_4, pTemp); break; + } + m_bHasEpochYelled = true; + } - void KilledUnit(Unit* pVictim) - { - switch(urand(0, 2)) - { - case 0: DoScriptText(SAY_TH_RANDOM_KILL1, m_creature); break; - case 1: DoScriptText(SAY_TH_RANDOM_KILL2, m_creature); break; - case 2: DoScriptText(SAY_TH_RANDOM_KILL3, m_creature); break; + // Attack Thrall + pTemp->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PASSIVE); + pTemp->AI()->AttackStart(m_creature); + } } - - // Death called from instance script (or if he has the killing blow of course) - // Thrall should normally always be the one killing, but no support for this yet. - if (pVictim->GetEntry() == NPC_EPOCH) - SetEscortPaused(false); - } - - void JustDied(Unit* pKiller) - { - DoScriptText(urand(0, 1) ? SAY_TH_RANDOM_DIE1 : SAY_TH_RANDOM_DIE2, m_creature); - } - - void CorpseRemoved(uint32 &uiRespawnDelay) - { - uiRespawnDelay = 0; - - // if we're done, just set some high so he never really respawn - if (m_pInstance && m_pInstance->GetData(TYPE_THRALL_EVENT) == DONE) - uiRespawnDelay = 4 * HOUR; } - void JustRespawned() + void UpdateEscortAI(const uint32 uiDiff) { - if (!m_pInstance) - return; + DialogueUpdate(uiDiff); - Reset(); - - if (m_pInstance->GetData(TYPE_THRALL_EVENT) == IN_PROGRESS) + // Handle soldiers tranform to Infinite dragons + if (m_uiEpochAttackTimer) { - SetEscortPaused(true); - - m_bHadMount = false; - DoUnmount(); - - m_creature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER); - - // check current states before fail and set spesific for the part - if (m_pInstance->GetData(TYPE_THRALL_PART1) == IN_PROGRESS) - { - SetCurrentWaypoint(1); // basement - - SetEquipmentSlots(true); - m_creature->SetDisplayId(MODEL_THRALL_UNEQUIPPED); - - m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); - } - else if (m_pInstance->GetData(TYPE_THRALL_PART2) == IN_PROGRESS) + if (m_uiEpochAttackTimer <= uiDiff) { - SetCurrentWaypoint(61); // barn - m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); + DoStartDragonsAttack(); + m_uiEpochAttackTimer = 0; } - else if (m_pInstance->GetData(TYPE_THRALL_PART3) == IN_PROGRESS || m_pInstance->GetData(TYPE_THRALL_PART4) == IN_PROGRESS) - SetCurrentWaypoint(96); // inn - - // fail, and relocation handled in instance script - m_pInstance->SetData(TYPE_THRALL_EVENT, FAIL); + else + m_uiEpochAttackTimer -= uiDiff; } - } - void UpdateEscortAI(const uint32 uiDiff) - { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - // TODO: add his abilities'n-crap here + if (m_uiStrikeTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_STRIKE) == CAST_OK) + m_uiStrikeTimer = urand(4000, 7000); + } + else + m_uiStrikeTimer -= uiDiff; + + if (m_uiShieldBlockTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_SHIELD_BLOCK) == CAST_OK) + m_uiShieldBlockTimer = urand(8000, 15000); + } + else + m_uiShieldBlockTimer -= uiDiff; if (!m_bIsLowHp && m_creature->GetHealthPercent() < 20.0f) { @@ -592,22 +1021,26 @@ bool GossipHello_npc_thrall_old_hillsbrad(Player* pPlayer, Creature* pCreature) if (instance_old_hillsbrad* pInstance = (instance_old_hillsbrad*)pCreature->GetInstanceData()) { - if (pInstance->GetData(TYPE_BARREL_DIVERSION) == DONE && !pInstance->GetData(TYPE_THRALL_EVENT)) + // If the inn escort has started, skip the gossip + if (pInstance->GetData(TYPE_ESCORT_INN) == DONE) + pPlayer->SEND_GOSSIP_MENU(TEXT_ID_INN, pCreature->GetObjectGuid()); + // Escort - barn to inn + else if (pInstance->GetData(TYPE_ESCORT_BARN) == DONE) { - pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ID_UNKNOWN_TEXT, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - pPlayer->SEND_GOSSIP_MENU(TEXT_ID_START, pCreature->GetObjectGuid()); + pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_TARREN_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3); + pPlayer->SEND_GOSSIP_MENU(TEXT_ID_TARREN, pCreature->GetObjectGuid()); } - - if (pInstance->GetData(TYPE_THRALL_PART1) == DONE && !pInstance->GetData(TYPE_THRALL_PART2)) + // Escort - after Skarloc is defeated + else if (pInstance->GetData(TYPE_SKARLOC) == DONE) { - pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_SKARLOC1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); - pPlayer->SEND_GOSSIP_MENU(TEXT_ID_SKARLOC1, pCreature->GetObjectGuid()); + pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_SKARLOC_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); + pPlayer->SEND_GOSSIP_MENU(TEXT_ID_SKARLOC_1, pCreature->GetObjectGuid()); } - - if (pInstance->GetData(TYPE_THRALL_PART2) == DONE && !pInstance->GetData(TYPE_THRALL_PART3)) + // Event start - after Drake is defeated + else if (pInstance->GetData(TYPE_DRAKE) == DONE) { - pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_TARREN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3); - pPlayer->SEND_GOSSIP_MENU(TEXT_ID_TARREN, pCreature->GetObjectGuid()); + pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_START, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + pPlayer->SEND_GOSSIP_MENU(TEXT_ID_START, pCreature->GetObjectGuid()); } } return true; @@ -619,48 +1052,58 @@ bool GossipSelect_npc_thrall_old_hillsbrad(Player* pPlayer, Creature* pCreature, switch(uiAction) { + // Event start case GOSSIP_ACTION_INFO_DEF+1: { pPlayer->CLOSE_GOSSIP_MENU(); - pInstance->SetData(TYPE_THRALL_EVENT, IN_PROGRESS); - pInstance->SetData(TYPE_THRALL_PART1, IN_PROGRESS); + DoScriptText(SAY_TH_START_EVENT_PART_1, pCreature); - DoScriptText(SAY_TH_START_EVENT_PART1, pCreature); + if (pInstance) + pInstance->SetData(TYPE_THRALL_EVENT, IN_PROGRESS); if (npc_thrall_old_hillsbradAI* pThrallAI = dynamic_cast(pCreature->AI())) pThrallAI->Start(true, pPlayer); break; } + // Escort - after Skarloc case GOSSIP_ACTION_INFO_DEF+2: { - pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_SKARLOC2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+20); - pPlayer->SEND_GOSSIP_MENU(TEXT_ID_SKARLOC2, pCreature->GetObjectGuid()); + pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_SKARLOC_2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+20); + pPlayer->SEND_GOSSIP_MENU(TEXT_ID_SKARLOC_2, pCreature->GetObjectGuid()); break; } case GOSSIP_ACTION_INFO_DEF+20: { - pPlayer->SEND_GOSSIP_MENU(TEXT_ID_SKARLOC3, pCreature->GetObjectGuid()); - - pCreature->SummonCreature(NPC_SKARLOC_MOUNT, 2038.81f, 270.26f, 63.20f, 5.41f, TEMPSUMMON_TIMED_DESPAWN,12000); - pInstance->SetData(TYPE_THRALL_PART2, IN_PROGRESS); + pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_SKARLOC_3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+21); + pPlayer->SEND_GOSSIP_MENU(TEXT_ID_SKARLOC_3, pCreature->GetObjectGuid()); + break; + } + case GOSSIP_ACTION_INFO_DEF+21: + { + pPlayer->CLOSE_GOSSIP_MENU(); DoScriptText(SAY_TH_START_EVENT_PART2, pCreature); + if (pInstance) + pInstance->SetData(TYPE_ESCORT_BARN, IN_PROGRESS); + if (npc_thrall_old_hillsbradAI* pThrallAI = dynamic_cast(pCreature->AI())) - pThrallAI->StartWP(); + pThrallAI->DoRestartEscortMovement(); break; } + // Escort - barn to inn case GOSSIP_ACTION_INFO_DEF+3: { pPlayer->CLOSE_GOSSIP_MENU(); - pInstance->SetData(TYPE_THRALL_PART3, IN_PROGRESS); + if (pInstance) + pInstance->SetData(TYPE_ESCORT_INN, IN_PROGRESS); if (npc_thrall_old_hillsbradAI* pThrallAI = dynamic_cast(pCreature->AI())) - pThrallAI->StartWP(); + pThrallAI->DoRestartEscortMovement(); break; } @@ -674,110 +1117,155 @@ bool GossipSelect_npc_thrall_old_hillsbrad(Player* pPlayer, Creature* pCreature, enum { - TEXT_ID_EPOCH1 = 9610, // Thank you for helping Thrall escape, friends. Now I only hope - GOSSIP_ITEM_EPOCH1 = -3560005, // "Strange wizard?" - TEXT_ID_EPOCH2 = 9613, // Yes, friends. This man was no wizard of - GOSSIP_ITEM_EPOCH2 = -3560006, // "We'll get you out. Taretha. Don't worry. I doubt the wizard would wander too far away." + // end event texts and spells + SAY_TA_FREE = -1560048, + SAY_TR_GLAD_SAFE = -1560054, + SAY_TA_NEVER_MET = -1560055, + SAY_TR_THEN_WHO = -1560056, + SAY_PRE_WIPE = -1560057, + SAY_WIPE_MEMORY = -1560051, + SAY_ABOUT_TARETHA = -1560052, + SAY_TH_EVENT_COMPLETE = -1560033, + SAY_TA_FAREWELL = -1560053, + SAY_AFTER_WIPE = -1560058, // not sure when to use this one + + GOSSIP_ITEM_EPOCH_1 = -3560005, // "Strange wizard?" + TEXT_ID_EPOCH_1 = 9610, // Thank you for helping Thrall escape, friends. Now I only hope + + GOSSIP_ITEM_EPOCH_2 = -3560006, // "We'll get you out. Taretha. Don't worry. I doubt the wizard would wander too far away." + TEXT_ID_EPOCH_2 = 9613, // Yes, friends. This man was no wizard of + + SPELL_TELEPORT = 7791, + SPELL_MEMORY_WIPE = 33336, // hits Taretha and Thrall + SPELL_MEMORY_WP_RESUME = 33337, + SPELL_SHADOW_PRISON = 33071, // in creature_template_addon - remove from Taretha on event complete }; -npc_tarethaAI::npc_tarethaAI(Creature* pCreature) : npc_escortAI(pCreature) +static const DialogueEntry aTarethaDialogue[] = { - m_pInstance = (instance_old_hillsbrad*)pCreature->GetInstanceData(); - m_uiErozionEventTimer = 5000; - m_uiErozionPhase = 0; - Reset(); -} + {SAY_TA_FREE, NPC_TARETHA, 4000}, + {SAY_TR_GLAD_SAFE, NPC_THRALL, 9000}, + {SAY_TA_NEVER_MET, NPC_TARETHA, 3000}, + {SAY_TR_THEN_WHO, NPC_THRALL, 6000}, + {SPELL_MEMORY_WIPE, 0, 3000}, + {SAY_WIPE_MEMORY, NPC_EROZION, 12000}, + {SAY_ABOUT_TARETHA, NPC_EROZION, 6000}, + {SAY_TH_EVENT_COMPLETE, NPC_THRALL, 3000}, + {NPC_THRALL, 0, 2000}, + {SAY_TA_FAREWELL, NPC_TARETHA, 3000}, + {NPC_TARETHA, 0, 0}, + {0, 0, 0}, +}; -void npc_tarethaAI::JustSummoned(Creature* pSummoned) +struct MANGOS_DLL_DECL npc_tarethaAI : public npc_escortAI, private DialogueHelper { - if (pSummoned->GetEntry() == NPC_EROZION) - m_erozionGuid = pSummoned->GetObjectGuid(); - else - DoScriptText(SAY_EPOCH_ENTER1, pSummoned); -} + npc_tarethaAI(Creature* pCreature) : npc_escortAI(pCreature), + DialogueHelper(aTarethaDialogue) + { + m_pInstance = (instance_old_hillsbrad*)pCreature->GetInstanceData(); + InitializeDialogueHelper(m_pInstance); + Reset(); + } -void npc_tarethaAI::WaypointReached(uint32 uiPoint) -{ - switch(uiPoint) + instance_old_hillsbrad* m_pInstance; + + bool m_bHasStartedEpilogue; + + void Reset() { - case 6: - DoScriptText(SAY_TA_FREE, m_creature); - break; - case 7: + m_bHasStartedEpilogue = false; + } + + void JustSummoned(Creature* pSummoned) + { + // Remove flags from the npc - the quest will be handled by the entrance version + if (pSummoned->GetEntry() == NPC_EROZION) + { + DoScriptText(SAY_PRE_WIPE, pSummoned); + pSummoned->CastSpell(pSummoned, SPELL_TELEPORT, false); + pSummoned->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP | UNIT_NPC_FLAG_QUESTGIVER); + } + } + + void WaypointReached(uint32 uiPoint) + { + if (uiPoint == 7) + { + StartNextDialogueText(SAY_TA_FREE); + + if (m_pInstance) + { + if (Creature* pThrall = m_pInstance->GetSingleCreatureFromStorage(NPC_THRALL)) + pThrall->SetFacingToObject(m_creature); + } + m_creature->HandleEmote(EMOTE_ONESHOT_CHEER); - m_creature->SummonCreature(NPC_EROZION, 2646.47f, 680.416f, 55.38f, 4.16f, TEMPSUMMON_TIMED_DESPAWN, 120000); SetEscortPaused(true); SetRun(false); - break; + } } -} - -void npc_tarethaAI::UpdateEscortAI(const uint32 uiDiff) -{ - if (!HasEscortState(STATE_ESCORT_PAUSED)) - return; - if (m_uiErozionEventTimer < uiDiff) + void JustDidDialogueStep(int32 iEntry) { - ++m_uiErozionPhase; - m_uiErozionEventTimer = 5000; + if (!m_pInstance) + return; - switch(m_uiErozionPhase) + switch(iEntry) { - case 1: - if (Creature* pThrall = m_pInstance->GetThrall()) - { - pThrall->SetFacingToObject(m_creature); - DoScriptText(SAY_TR_GLAD_SAFE, pThrall); - } - break; - case 2: - DoScriptText(SAY_TA_NEVER_MET, m_creature); - break; - case 3: - if (Creature* pThrall = m_pInstance->GetThrall()) - DoScriptText(SAY_TR_THEN_WHO, pThrall); - break; - case 4: - if (Creature* pErozion = m_creature->GetMap()->GetCreature(m_erozionGuid)) - DoScriptText(SAY_PRE_WIPE, pErozion); + case SAY_TR_THEN_WHO: + m_creature->SummonCreature(NPC_EROZION, 2646.47f, 680.416f, 55.38f, 4.16f, TEMPSUMMON_TIMED_DESPAWN, 5*MINUTE*IN_MILLISECONDS); break; - case 5: - //if (Creature* pErozion = m_creature->GetMap()->GetCreature(m_erozionGuid)) - //pErozion->AI()->DoCastSpellIfCan(); - break; - case 6: - if (Creature* pErozion = m_creature->GetMap()->GetCreature(m_erozionGuid)) - DoScriptText(SAY_WIPE_MEMORY, pErozion); - break; - case 7: - if (Creature* pErozion = m_creature->GetMap()->GetCreature(m_erozionGuid)) - DoScriptText(SAY_ABOUT_TARETHA, pErozion); - break; - case 8: - if (Creature* pErozion = m_creature->GetMap()->GetCreature(m_erozionGuid)) - DoScriptText(SAY_AFTER_WIPE, pErozion); + case SPELL_MEMORY_WIPE: + if (Creature* pErozion = m_pInstance->GetSingleCreatureFromStorage(NPC_EROZION)) + pErozion->CastSpell(pErozion, SPELL_MEMORY_WIPE, false); break; - case 9: - if (Creature* pThrall = m_pInstance->GetThrall()) - DoScriptText(SAY_TH_EVENT_COMPLETE, pThrall); + case SAY_TH_EVENT_COMPLETE: + if (Creature* pErozion = m_pInstance->GetSingleCreatureFromStorage(NPC_EROZION)) + pErozion->CastSpell(pErozion, SPELL_MEMORY_WP_RESUME, false); + if (Creature* pThrall = m_pInstance->GetSingleCreatureFromStorage(NPC_THRALL)) + pThrall->RemoveAurasDueToSpell(SPELL_MEMORY_WIPE); + m_creature->RemoveAurasDueToSpell(SPELL_MEMORY_WIPE); break; - case 10: - DoScriptText(SAY_TA_FAREWELL, m_creature); - SetEscortPaused(false); - - if (Creature* pThrall = m_pInstance->GetThrall()) + case NPC_THRALL: + if (Creature* pThrall = m_pInstance->GetSingleCreatureFromStorage(NPC_THRALL)) { if (npc_thrall_old_hillsbradAI* pThrallAI = dynamic_cast(pThrall->AI())) pThrallAI->SetEscortPaused(false); } - + break; + case SAY_TA_FAREWELL: + if (Creature* pThrall = m_pInstance->GetSingleCreatureFromStorage(NPC_THRALL)) + m_creature->SetFacingToObject(pThrall); + m_creature->HandleEmote(EMOTE_ONESHOT_WAVE); + break; + case NPC_TARETHA: + if (Creature* pErozion = m_pInstance->GetSingleCreatureFromStorage(NPC_EROZION)) + pErozion->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER); + m_pInstance->SetData(TYPE_THRALL_EVENT, DONE); + SetEscortPaused(false); break; } } - else - m_uiErozionEventTimer -= uiDiff; -} + + void UpdateEscortAI(const uint32 uiDiff) + { + DialogueUpdate(uiDiff); + + if (!m_bHasStartedEpilogue && m_pInstance) + { + // Start epilogue + if (m_pInstance->GetData(TYPE_EPOCH) == DONE && m_pInstance->GetData(TYPE_THRALL_EVENT) != DONE) + { + m_creature->RemoveAurasDueToSpell(SPELL_SHADOW_PRISON); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + m_creature->SetStandState(UNIT_STAND_STATE_STAND); + + Start(true); + m_bHasStartedEpilogue = true; + } + } + } +}; CreatureAI* GetAI_npc_taretha(Creature* pCreature) { @@ -788,10 +1276,10 @@ bool GossipHello_npc_taretha(Player* pPlayer, Creature* pCreature) { instance_old_hillsbrad* pInstance = (instance_old_hillsbrad*)pCreature->GetInstanceData(); - if (pInstance && pInstance->GetData(TYPE_THRALL_PART3) == DONE && pInstance->GetData(TYPE_THRALL_PART4) == NOT_STARTED) + if (pInstance && pInstance->GetData(TYPE_ESCORT_INN) == DONE && pInstance->GetData(TYPE_EPOCH) != DONE) { - pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_EPOCH1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - pPlayer->SEND_GOSSIP_MENU(TEXT_ID_EPOCH1, pCreature->GetObjectGuid()); + pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_EPOCH_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + pPlayer->SEND_GOSSIP_MENU(TEXT_ID_EPOCH_1, pCreature->GetObjectGuid()); } return true; @@ -803,8 +1291,8 @@ bool GossipSelect_npc_taretha(Player* pPlayer, Creature* pCreature, uint32 uiSen if (uiAction == GOSSIP_ACTION_INFO_DEF+1) { - pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_EPOCH2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); - pPlayer->SEND_GOSSIP_MENU(TEXT_ID_EPOCH2, pCreature->GetObjectGuid()); + pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_EPOCH_2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); + pPlayer->SEND_GOSSIP_MENU(TEXT_ID_EPOCH_2, pCreature->GetObjectGuid()); } if (uiAction == GOSSIP_ACTION_INFO_DEF+2) @@ -813,13 +1301,12 @@ bool GossipSelect_npc_taretha(Player* pPlayer, Creature* pCreature, uint32 uiSen if (pInstance && pInstance->GetData(TYPE_THRALL_EVENT) == IN_PROGRESS) { - pInstance->SetData(TYPE_THRALL_PART4, IN_PROGRESS); - pCreature->SummonCreature(NPC_EPOCH, 2639.13f, 698.55f, 65.43f, 4.59f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 120000); + pCreature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); - if (Creature* pThrall = pInstance->GetThrall()) + if (Creature* pThrall = pInstance->GetSingleCreatureFromStorage(NPC_THRALL)) { if (npc_thrall_old_hillsbradAI* pThrallAI = dynamic_cast(pThrall->AI())) - pThrallAI->StartWP(); + pThrallAI->DoRestartEscortMovement(); } } } @@ -827,26 +1314,6 @@ bool GossipSelect_npc_taretha(Player* pPlayer, Creature* pCreature, uint32 uiSen return true; } -/*###### -## go_barrel_old_hillsbrad -######*/ - -bool GOUse_go_barrel_old_hillsbrad(Player* pPlayer, GameObject* pGo) -{ - if (ScriptedInstance* pInstance = (ScriptedInstance*)pGo->GetInstanceData()) - { - if (pInstance->GetData(TYPE_BARREL_DIVERSION) == DONE) - return false; - - pInstance->SetData(TYPE_BARREL_DIVERSION, IN_PROGRESS); - } - return false; -} - -/*###### -## AddSC -######*/ - void AddSC_old_hillsbrad() { Script* pNewScript; @@ -859,20 +1326,15 @@ void AddSC_old_hillsbrad() pNewScript = new Script; pNewScript->Name = "npc_thrall_old_hillsbrad"; + pNewScript->GetAI = &GetAI_npc_thrall_old_hillsbrad; pNewScript->pGossipHello = &GossipHello_npc_thrall_old_hillsbrad; pNewScript->pGossipSelect = &GossipSelect_npc_thrall_old_hillsbrad; - pNewScript->GetAI = &GetAI_npc_thrall_old_hillsbrad; pNewScript->RegisterSelf(); pNewScript = new Script; pNewScript->Name = "npc_taretha"; + pNewScript->GetAI = &GetAI_npc_taretha; pNewScript->pGossipHello = &GossipHello_npc_taretha; pNewScript->pGossipSelect = &GossipSelect_npc_taretha; - pNewScript->GetAI = &GetAI_npc_taretha; - pNewScript->RegisterSelf(); - - pNewScript = new Script; - pNewScript->Name = "go_barrel_old_hillsbrad"; - pNewScript->pGOUse = &GOUse_go_barrel_old_hillsbrad; pNewScript->RegisterSelf(); } diff --git a/scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.h b/scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.h index c0d7e68bd..fa137b48b 100644 --- a/scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.h +++ b/scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.h @@ -7,22 +7,39 @@ enum { - MAX_ENCOUNTER = 6, - - TYPE_BARREL_DIVERSION = 0, - TYPE_THRALL_EVENT = 1, - TYPE_THRALL_PART1 = 2, // prison to keep - TYPE_THRALL_PART2 = 3, // keep to barn - TYPE_THRALL_PART3 = 4, // barn to inn - TYPE_THRALL_PART4 = 5, // inn to boss - + MAX_ENCOUNTER = 7, + MAX_BARRELS = 5, + MAX_WIPE_COUNTER = 20, + + TYPE_BARREL_DIVERSION = 0, // barrel event + TYPE_DRAKE = 1, // first boss + TYPE_SKARLOC = 2, // prison to keep - boss + TYPE_ESCORT_BARN = 3, // keep to barn + TYPE_ESCORT_INN = 4, // barn to inn + TYPE_EPOCH = 5, // inn event + TYPE_THRALL_EVENT = 6, // global event + + // event npcs NPC_THRALL = 17876, NPC_TARETHA = 18887, - NPC_DRAKE = 17848, + NPC_EROZION = 18723, NPC_LODGE_QUEST_TRIGGER = 20155, + NPC_ARMORER = 18764, + NPC_ORC_PRISONER = 18598, + + NPC_TARREN_MILL_GUARDSMAN = 18092, + NPC_TARREN_MILL_PROTECTOR = 18093, + NPC_TARREN_MILL_LOOKOUT = 18094, + NPC_YOUNG_BLANCHY = 18651, + + // bosses + NPC_DRAKE = 17848, NPC_SKARLOC = 17862, NPC_EPOCH = 18096, + GO_ROARING_FLAME = 182592, + GO_PRISON_DOOR = 184393, + QUEST_ENTRY_HILLSBRAD = 10282, QUEST_ENTRY_DIVERSION = 10283, QUEST_ENTRY_ESCAPE = 10284, @@ -31,6 +48,14 @@ enum WORLD_STATE_OH = 2436, }; +static const float afInstanceLoc[][4]= +{ + {2104.51f, 91.96f, 53.14f, 0}, // right orcs outside loc + {2192.58f, 238.44f,52.44f, 0}, // left orcs outside loc +}; + +static const float aDrakeSummonLoc[4] = {2128.43f, 71.01f, 64.42f, 1.74f}; + class MANGOS_DLL_DECL instance_old_hillsbrad : public ScriptedInstance { public: @@ -39,25 +64,38 @@ class MANGOS_DLL_DECL instance_old_hillsbrad : public ScriptedInstance void Initialize(); + void OnPlayerEnter(Player* pPlayer); void OnCreatureCreate(Creature* pCreature); + void OnObjectCreate(GameObject* pGo); + + void OnCreatureEnterCombat(Creature* pCreature); + void OnCreatureEvade(Creature* pCreature); void OnCreatureDeath(Creature* pCreature); void SetData(uint32 uiType, uint32 uiData); uint32 GetData(uint32 uiType); - void HandleThrallRelocation(); + uint32 GetThrallEventCount() { return m_uiThrallEventCount; } - void UpdateLodgeQuestCredit(); + const char* Save() { return m_strInstData.c_str(); } + void Load(const char* chrIn); - Creature* GetThrall() { return GetSingleCreatureFromStorage(NPC_THRALL); } - Creature* GetTaretha() { return GetSingleCreatureFromStorage(NPC_TARETHA); } - Creature* GetEpoch() { return GetSingleCreatureFromStorage(NPC_EPOCH); } + void Update(uint32 uiDiff); protected: + void HandleThrallRelocation(); + void UpdateLodgeQuestCredit(); + uint32 m_auiEncounter[MAX_ENCOUNTER]; + std::string m_strInstData; uint32 m_uiBarrelCount; uint32 m_uiThrallEventCount; + uint32 m_uiThrallResetTimer; + + GuidList m_lRoaringFlamesList; + GuidList m_lLeftPrisonersList; + GuidList m_lRightPrisonersList; }; #endif diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 59a695668..846c1560d 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2694" + #define SD2_REVISION_NR "2695" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 866fc39e9..10fc67e96 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -397,10 +397,12 @@ UPDATE creature_template SET ScriptName='npc_doomfire_spirit' WHERE entry=18104; /* OLD HILLSBRAD */ UPDATE instance_template SET ScriptName='instance_old_hillsbrad' WHERE map=560; -UPDATE gameobject_template SET ScriptName='go_barrel_old_hillsbrad' WHERE entry=182589; UPDATE creature_template SET ScriptName='npc_erozion' WHERE entry=18723; UPDATE creature_template SET ScriptName='npc_taretha' WHERE entry=18887; UPDATE creature_template SET ScriptName='npc_thrall_old_hillsbrad' WHERE entry=17876; +DELETE FROM scripted_event_id WHERE id=11111; +INSERT INTO scripted_event_id VALUES +(11111,'event_go_barrel_old_hillsbrad'); /* THE CULLING OF STRATHOLME */ UPDATE instance_template SET ScriptName='instance_culling_of_stratholme' WHERE map=595; diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 68700705a..5e817285c 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -2392,30 +2392,32 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen -- -1 560 000 ESCAPE FROM DURNHOLDE (OLD HILLSBRAD) INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES -(-1560000,'Thrall! You didn\'t really think you would escape did you? You and your allies shall answer to Blackmoore - after I\'ve had my fun!',10406,1,0,0,'skarloc SAY_ENTER'), - -(-1560001,'REUSE_ME',0,0,0,0,'REUSE_ME'), -(-1560002,'REUSE_ME',0,0,0,0,'REUSE_ME'), -(-1560003,'REUSE_ME',0,0,0,0,'REUSE_ME'), -(-1560004,'REUSE_ME',0,0,0,0,'REUSE_ME'), -(-1560005,'REUSE_ME',0,0,0,0,'REUSE_ME'), -(-1560006,'REUSE_ME',0,0,0,0,'REUSE_ME'), -(-1560007,'REUSE_ME',0,0,0,0,'REUSE_ME'), -(-1560008,'REUSE_ME',0,0,0,0,'REUSE_ME'), -(-1560009,'REUSE_ME',0,0,0,0,'REUSE_ME'), -(-1560010,'REUSE_ME',0,0,0,0,'REUSE_ME'), -(-1560011,'REUSE_ME',0,0,0,0,'REUSE_ME'), -(-1560012,'REUSE_ME',0,0,0,0,'REUSE_ME'), +(-1560000,'Thrall! You didn\'t really think you would escape did you? You and your allies shall answer to Blackmoore - after I\'ve had my fun!',10406,0,0,1,'skarloc SAY_ENTER'), + +(-1560001,'My magical power can turn back time to before Thrall\'s death, but be careful. My power to manipulate time is limited.',0,0,0,0,'image of eronzion SAY_RESET_THRALL'), +(-1560002,'I have set back the flow of time just once more. If you fail to prevent Thrall\'s death, then all is lost.',0,0,0,0,'image of eronzion SAY_RESET_THRALL_LAST'), + +(-1560003,'What\'s the meaning of this? GUARDS!',0,0,0,0,'armorer SAY_CALL_GUARDS'), +(-1560004,'All that you know... will be undone.',0,0,0,0,'infinite dragon SAY_INFINITE_AGGRO_1'), +(-1560005,'Let\'s go.',0,0,0,0,'thrall hillsbrad SAY_TH_ARMORY2'), +(-1560006,'%s startles the horse with a fierce yell!',0,2,0,0,'thrall hillsbrad EMOTE_TH_STARTLE_HORSE'), +(-1560007,'I thought I saw something go into the barn.',0,0,0,0,'tarren mill lookout SAY_LOOKOUT_BARN_1'), +(-1560008,'I didn\'t see anything.',0,0,0,0,'tarren mill lookout SAY_PROTECTOR_BARN_2'), +(-1560009,'%s tries to calm the horse down.',0,2,0,0,'thrall hillsbrad EMOTE_TH_CALM_HORSE'), +(-1560010,'Something riled that horse. Let\'s go!',0,0,0,0,'tarren mill lookout SAY_PROTECTOR_BARN_3'), +(-1560011,'Taretha isn\'t here. Let\'s head into town.',0,0,0,0,'thrall hillsbrad SAY_TH_HEAD_TOWN'), +(-1560012,'She\'s not here.',0,0,0,0,'thrall hillsbrad SAY_TH_CHURCH_ENTER'), (-1560013,'Thrall! Come outside and face your fate!',10418,1,0,0,'epoch SAY_ENTER1'), (-1560014,'Taretha\'s life hangs in the balance. Surely you care for her. Surely you wish to save her...',10419,1,0,0,'epoch SAY_ENTER2'), (-1560015,'Ah, there you are. I had hoped to accomplish this with a bit of subtlety, but I suppose direct confrontation was inevitable. Your future, Thrall, must not come to pass and so...you and your troublesome friends must die!',10420,1,0,0,'epoch SAY_ENTER3'), -(-1560016,'REUSE_ME',0,0,0,0,'REUSE_ME'), -(-1560017,'REUSE_ME',0,0,0,0,'REUSE_ME'), -(-1560018,'REUSE_ME',0,0,0,0,'REUSE_ME'), -(-1560019,'REUSE_ME',0,0,0,0,'REUSE_ME'), -(-1560020,'REUSE_ME',0,0,0,0,'REUSE_ME'), +(-1560016,'Thrall\'s trapped himself in the chapel. He can\'t escape now.',0,0,0,0,'tarren mill lookout SAY_LOOKOUT_CHURCH'), +(-1560017,'He\'s here, stop him!',0,0,0,0,'tarren mill lookout SAY_LOOKOUT_INN'), +(-1560018,'We have all the time in the world....',0,0,0,0,'infinite dragon SAY_INFINITE_AGGRO_2'), +(-1560019,'You cannot escape us!',0,0,0,0,'infinite dragon SAY_INFINITE_AGGRO_3'), +(-1560020,'Do not think you can win!',0,0,0,0,'infinite dragon SAY_INFINITE_AGGRO_4'), + (-1560021,'REUSE_ME',0,0,0,0,'REUSE_ME'), (-1560022,'REUSE_ME',0,0,0,0,'REUSE_ME'), @@ -2423,7 +2425,7 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1560024,'As long as we\'re going with a new plan, I may aswell pick up a weapon and some armor.',0,0,0,0,'thrall hillsbrad SAY_TH_ARMORY'), (-1560025,'A rider approaches!',10466,0,0,0,'thrall hillsbrad SAY_TH_SKARLOC_MEET'), (-1560026,'I\'ll never be chained again!',10467,1,0,0,'thrall hillsbrad SAY_TH_SKARLOC_TAUNT'), -(-1560027,'Very well. Tarren Mill lies just west of here. Since time is of the essence...',10468,1,0,0,'thrall hillsbrad SAY_TH_START_EVENT_PART2'), +(-1560027,'Very well. Tarren Mill lies just west of here. Since time is of the essence...',10468,0,0,0,'thrall hillsbrad SAY_TH_START_EVENT_PART2'), (-1560028,'Let\'s ride!',10469,0,0,1,'thrall hillsbrad SAY_TH_MOUNTS_UP'), (-1560029,'Taretha must be in the inn. Let\'s go.',0,0,0,0,'thrall hillsbrad SAY_TH_CHURCH_END'), (-1560030,'Taretha! What foul magic is this?',0,0,0,0,'thrall hillsbrad SAY_TH_MEET_TARETHA'), @@ -4376,13 +4378,14 @@ INSERT INTO gossip_texts (entry,content_default,comment) VALUES -- -3 560 000 ESCAPE FROM DURNHOLDE (OLD HILLSBRAD) INSERT INTO gossip_texts (entry,content_default,comment) VALUES -(-3560000,'REUSE ME','REUSE ME'), +(-3560000,'We are ready to get you out of here, Thrall. Let\'s go!','thrall GOSSIP_ITEM_START'), (-3560001,'I need a pack of Incendiary Bombs.','erozion GOSSIP_ITEM_NEED_BOMBS'), (-3560002,'Taretha cannot see you, Thrall.','thrall GOSSIP_ITEM_SKARLOC1'), (-3560003,'The situation is rather complicated, Thrall. It would be best for you to head into the mountains now, before more of Blackmoore\'s men show up. We\'ll make sure Taretha is safe.','thrall GOSSIP_ITEM_SKARLOC2'), -(-3560004,'We\'re ready, Thrall.','thrall GOSSIP_ITEM_TARREN'), +(-3560004,'We\'re ready, Thrall.','thrall GOSSIP_ITEM_TARREN_2'), (-3560005,'Strange wizard?','taretha GOSSIP_ITEM_EPOCH1'), -(-3560006,'We\'ll get you out. Taretha. Don\'t worry. I doubt the wizard would wander too far away.','taretha GOSSIP_ITEM_EPOCH2'); +(-3560006,'We\'ll get you out. Taretha. Don\'t worry. I doubt the wizard would wander too far away.','taretha GOSSIP_ITEM_EPOCH2'), +(-3560007,'Tarren Mill.','thrall GOSSIP_ITEM_TARREN_1'); -- -3 564 000 BLACK TEMPLE INSERT INTO gossip_texts (entry,content_default,comment) VALUES @@ -5476,7 +5479,7 @@ INSERT INTO script_waypoint VALUES DELETE FROM script_waypoint WHERE entry=17876; INSERT INTO script_waypoint VALUES -(17876, 0, 2230.91, 118.765, 82.2947,5000, ''), +(17876, 0, 2230.91, 118.765, 82.2947, 2000, 'open the prison door'), (17876, 1, 2230.33, 114.980, 82.2946, 0, ''), (17876, 2, 2233.36, 111.057, 82.2996, 0, ''), (17876, 3, 2231.17, 108.486, 82.6624, 0, ''), @@ -5484,107 +5487,119 @@ INSERT INTO script_waypoint VALUES (17876, 5, 2215.23, 115.990, 89.4549, 0, ''), (17876, 6, 2210.00, 106.849, 89.4549, 0, ''), (17876, 7, 2205.66, 105.234, 89.4549, 0, ''), -(17876, 8, 2192.26, 112.618, 89.4549, 0, 'spawn armorer'), -(17876, 9, 2181.28, 118.612, 89.4549,8000, 'get weapon'), -(17876, 10, 2181.62, 120.385, 89.4549,5000, 'get armor'), -(17876, 11, 2189.44, 113.922, 89.4549, 0, ''), -(17876, 12, 2195.63, 110.584, 89.4549, 0, ''), -(17876, 13, 2201.09, 115.115, 89.4549, 0, ''), -(17876, 14, 2204.34, 121.036, 89.4355, 0, ''), -(17876, 15, 2208.66, 129.127, 87.9560, 0, 'first ambush'), -(17876, 16, 2193.09, 137.940, 88.2164, 0, ''), -(17876, 17, 2173.39, 149.064, 87.9227, 0, ''), -(17876, 18, 2164.25, 137.965, 85.0595, 0, ''), -(17876, 19, 2149.31, 125.645, 77.0858, 0, ''), -(17876, 20, 2142.78, 127.173, 75.5954, 0, ''), -(17876, 21, 2139.28, 133.952, 73.6386, 0, 'second ambush'), -(17876, 22, 2139.54, 155.235, 67.1269, 0, ''), -(17876, 23, 2145.38, 167.551, 64.8974, 0, ''), -(17876, 24, 2134.28, 175.304, 67.9446, 0, ''), -(17876, 25, 2118.08, 187.387, 68.8141, 0, ''), -(17876, 26, 2105.88, 195.461, 65.1854, 0, 'third ambush'), -(17876, 27, 2096.77, 196.939, 65.2117, 0, ''), -(17876, 28, 2083.90, 209.395, 64.8736, 0, ''), -(17876, 29, 2067.84, 224.376, 64.8022,30000, 'meeting scarloc'), -(17876, 30, 2055.40, 242.90, 63.3418, 0, 'after skarloc'), -(17876, 31, 2039.20, 266.460, 63.0182,10000, 'mount up'), -(17876, 32, 2011.77, 278.478, 65.3388, 0, ''), -(17876, 33, 2005.08, 289.676, 66.1179, 0, ''), -(17876, 34, 2033.11, 337.450, 66.0948, 0, ''), -(17876, 35, 2070.30, 416.208, 66.0893, 0, ''), -(17876, 36, 2086.76, 469.768, 65.9182, 0, ''), -(17876, 37, 2101.70, 497.955, 61.7881, 0, 'road ambush'), -(17876, 38, 2133.39, 530.933, 55.3700,5000, ''), -(17876, 39, 2157.91, 559.635, 48.5157, 0, ''), -(17876, 40, 2167.34, 586.191, 42.4394, 0, ''), -(17876, 41, 2174.17, 637.643, 33.9002, 0, ''), -(17876, 42, 2179.31, 656.053, 34.723, 0, ''), -(17876, 43, 2183.65, 670.941, 34.0318, 0, ''), -(17876, 44, 2201.50, 668.616, 36.1236, 0, ''), -(17876, 45, 2221.56, 652.747, 36.6153, 0, ''), -(17876, 46, 2238.97, 640.125, 37.2214, 0, ''), -(17876, 47, 2251.17, 620.574, 40.1473, 0, ''), -(17876, 48, 2261.98, 595.303, 41.4117, 0, ''), -(17876, 49, 2278.67, 560.172, 38.9090, 0, ''), -(17876, 50, 2336.72, 528.327, 40.9369, 0, ''), -(17876, 51, 2381.04, 519.612, 37.7312, 0, ''), -(17876, 52, 2412.20, 515.425, 39.2068, 0, ''), -(17876, 53, 2452.39, 516.174, 42.9387, 0, ''), -(17876, 54, 2467.38, 539.389, 47.4992, 0, ''), -(17876, 55, 2470.70, 554.333, 46.6668, 0, ''), -(17876, 56, 2478.07, 575.321, 55.4549, 0, ''), -(17876, 57, 2480.00, 585.408, 56.6921, 0, ''), -(17876, 58, 2482.67, 608.817, 55.6643, 0, ''), -(17876, 59, 2485.62, 626.061, 58.0132, 2000, 'dismount'), -(17876, 60, 2486.91, 626.356, 58.0761, 0, 'scare horse'), -(17876, 61, 2488.58, 660.940, 57.3913, 0, ''), -(17876, 62, 2502.56, 686.059, 55.6252, 0, ''), -(17876, 63, 2502.08, 694.360, 55.5083, 0, ''), -(17876, 64, 2491.46, 694.321, 55.7163, 0, ''), -(17876, 65, 2491.10, 703.300, 55.7630, 0, ''), -(17876, 66, 2485.64, 702.992, 55.7917, 0, ''), -(17876, 67, 2479.10, 695.291, 55.7901, 10000, ''), -(17876, 68, 2476.75, 693.689, 55.7960, 0, 'spawn mobs'), -(17876, 69, 2475.39, 695.983, 55.8146, 0, ''), -(17876, 70, 2477.75, 694.473, 55.7945, 0, ''), -(17876, 71, 2481.27, 697.747, 55.7910, 0, 'mobs in doorway'), -(17876, 72, 2486.31, 703.131, 55.7861, 5000, ''), -(17876, 73, 2490.76, 703.511, 55.7662, 0, ''), -(17876, 74, 2491.30, 694.792, 55.7195, 0, ''), -(17876, 75, 2518.69, 693.876, 55.1383, 0, ''), -(17876, 76, 2531.33, 681.914, 55.1383, 0, ''), -(17876, 77, 2568.25, 682.654, 55.1778, 0, ''), -(17876, 78, 2589.61, 689.981, 55.1421, 0, ''), -(17876, 79, 2634.74, 679.833, 54.6613, 0, ''), -(17876, 80, 2630.41, 661.464, 54.2761, 0, ''), -(17876, 81, 2629.00, 656.982, 56.0651, 0, ''), -(17876, 82, 2620.84, 633.007, 56.0300, 3000, 'stop in church'), -(17876, 83, 2622.99, 639.178, 56.0300, 0, 'summon'), -(17876, 84, 2628.73, 656.693, 56.0610, 5000, ''), -(17876, 85, 2630.34, 661.135, 54.2738, 0, ''), -(17876, 86, 2635.38, 672.243, 54.4508, 0, ''), -(17876, 87, 2644.13, 668.158, 55.3797, 0, ''), -(17876, 88, 2646.82, 666.740, 56.9898, 0, ''), -(17876, 89, 2658.22, 665.432, 57.1725, 0, ''), -(17876, 90, 2661.88, 674.849, 57.1725, 0, ''), -(17876, 91, 2656.23, 677.208, 57.1725, 0, ''), -(17876, 92, 2652.28, 670.270, 61.9353, 0, ''), -(17876, 93, 2650.79, 664.290, 61.9302, 0, 'summon inn'), -(17876, 94, 2658.19, 660.454, 61.9320, 5000, ''), -(17876, 95, 2660.57, 659.173, 61.9370, 0, 'speak with Taretha'), -(17876, 96, 2658.19, 660.454, 61.9320, 15000, 'epoch calls'), -(17876, 97, 2659.84, 659.482, 61.9361, 10000, 'taretha "dies"'), -(17876, 98, 2654.28, 662.722, 61.9313, 0, ''), -(17876, 99, 2652.37, 670.561, 61.9368, 0, ''), -(17876, 100, 2656.05, 676.761, 57.1727, 0, ''), -(17876, 101, 2658.49, 677.166, 57.1727, 0, ''), -(17876, 102, 2659.28, 667.117, 57.1727, 0, ''), -(17876, 103, 2649.71, 665.387, 57.1727, 0, ''), -(17876, 104, 2634.79, 672.964, 54.4577, 0, 'outside inn'), -(17876, 105, 2635.06, 673.892, 54.4713, 30000, 'getting ready'), -(17876, 106, 2630.45, 674.420, 54.4943, 5000, 'when all dead and meet Taretha'), -(17876, 107, 2634.30, 661.698, 54.4147, 0, 'run off'), -(17876, 108, 2652.21, 644.396, 56.1906, 0, ''); +(17876, 8, 2192.26, 112.618, 89.4549, 2000, 'SAY_ARMORER_CALL_GUARDS'), +(17876, 9, 2185.32, 116.593, 89.4548, 2000, 'SAY_TH_ARMORER_HIT'), +(17876, 10, 2182.11, 120.328, 89.4548, 3000, 'SAY_TH_ARMORY_1'), +(17876, 11, 2182.11, 120.328, 89.4548, 5000, ''), +(17876, 12, 2182.11, 120.328, 89.4548, 3000, 'SAY_TH_ARMORY_2'), +(17876, 13, 2189.44, 113.922, 89.4549, 0, ''), +(17876, 14, 2195.63, 110.584, 89.4549, 0, ''), +(17876, 15, 2201.09, 115.115, 89.4549, 0, ''), +(17876, 16, 2204.34, 121.036, 89.4355, 0, ''), +(17876, 17, 2208.66, 129.127, 87.9560, 0, 'first ambush'), +(17876, 18, 2193.09, 137.940, 88.2164, 0, ''), +(17876, 19, 2173.39, 149.064, 87.9227, 0, ''), +(17876, 20, 2164.25, 137.965, 85.0595, 0, 'second ambush'), +(17876, 21, 2149.31, 125.645, 77.0858, 0, ''), +(17876, 22, 2142.78, 127.173, 75.5954, 0, ''), +(17876, 23, 2139.28, 133.952, 73.6386, 0, 'third ambush'), +(17876, 24, 2139.54, 155.235, 67.1269, 0, ''), +(17876, 25, 2145.38, 167.551, 64.8974, 0, 'fourth ambush'), +(17876, 26, 2134.28, 175.304, 67.9446, 0, ''), +(17876, 27, 2118.08, 187.387, 68.8141, 0, ''), +(17876, 28, 2105.88, 195.461, 65.1854, 0, ''), +(17876, 29, 2096.77, 196.939, 65.2117, 0, ''), +(17876, 30, 2083.90, 209.395, 64.8736, 0, ''), +(17876, 31, 2063.40, 229.509, 64.4883, 0, 'summon Skarloc'), +(17876, 32, 2063.40, 229.509, 64.4883, 10000, 'SAY_SKARLOC_ENTER'), +(17876, 33, 2063.40, 229.509, 64.4883, 5000, 'attack Skarloc'), +(17876, 34, 2063.40, 229.509, 64.4883, 0, 'gossip after skarloc'), +(17876, 35, 2046.70, 251.941, 62.7851, 4000, 'mount up'), +(17876, 36, 2046.70, 251.941, 62.7851, 3000, 'SAY_TH_MOUNTS_UP'), +(17876, 37, 2011.77, 278.478, 65.3388, 0, ''), +(17876, 38, 2005.08, 289.676, 66.1179, 0, ''), +(17876, 39, 2033.11, 337.450, 66.0948, 0, ''), +(17876, 40, 2070.30, 416.208, 66.0893, 0, ''), +(17876, 41, 2086.76, 469.768, 65.9182, 0, ''), +(17876, 42, 2101.70, 497.955, 61.7881, 0, ''), +(17876, 43, 2133.39, 530.933, 55.3700, 0, ''), +(17876, 44, 2157.91, 559.635, 48.5157, 0, ''), +(17876, 45, 2167.34, 586.191, 42.4394, 0, ''), +(17876, 46, 2174.17, 637.643, 33.9002, 0, ''), +(17876, 47, 2179.31, 656.053, 34.723, 0, ''), +(17876, 48, 2183.65, 670.941, 34.0318, 0, ''), +(17876, 49, 2201.50, 668.616, 36.1236, 0, ''), +(17876, 50, 2221.56, 652.747, 36.6153, 0, ''), +(17876, 51, 2238.97, 640.125, 37.2214, 0, ''), +(17876, 52, 2251.17, 620.574, 40.1473, 0, ''), +(17876, 53, 2261.98, 595.303, 41.4117, 0, ''), +(17876, 54, 2278.67, 560.172, 38.9090, 0, ''), +(17876, 55, 2336.72, 528.327, 40.9369, 0, ''), +(17876, 56, 2381.04, 519.612, 37.7312, 0, ''), +(17876, 57, 2412.20, 515.425, 39.2068, 0, ''), +(17876, 58, 2452.39, 516.174, 42.9387, 0, ''), +(17876, 59, 2467.38, 539.389, 47.4992, 0, ''), +(17876, 60, 2470.70, 554.333, 46.6668, 0, ''), +(17876, 61, 2478.07, 575.321, 55.4549, 0, ''), +(17876, 62, 2480.00, 585.408, 56.6921, 0, ''), +(17876, 63, 2482.67, 608.817, 55.6643, 0, ''), +(17876, 64, 2485.62, 626.061, 58.0132, 2000, 'dismount'), +(17876, 65, 2486.91, 626.356, 58.0761, 2000, 'EMOTE_TH_STARTLE_HORSE'), +(17876, 66, 2486.91, 626.356, 58.0761, 0, 'gossip before barn'), +(17876, 67, 2488.58, 660.940, 57.3913, 0, ''), +(17876, 68, 2502.56, 686.059, 55.6252, 0, ''), +(17876, 69, 2502.08, 694.360, 55.5083, 0, ''), +(17876, 70, 2491.46, 694.321, 55.7163, 0, 'enter barn'), +(17876, 71, 2491.10, 703.300, 55.7630, 0, ''), +(17876, 72, 2485.64, 702.992, 55.7917, 0, ''), +(17876, 73, 2479.63, 696.521, 55.7901, 0, 'spawn mobs'), +(17876, 74, 2476.24, 696.204, 55.8093, 0, 'start dialogue'), +(17876, 75, 2475.39, 695.983, 55.8146, 0, ''), +(17876, 76, 2477.75, 694.473, 55.7945, 0, ''), +(17876, 77, 2481.27, 697.747, 55.7910, 0, ''), +(17876, 78, 2486.31, 703.131, 55.7861, 0, ''), +(17876, 79, 2490.76, 703.511, 55.7662, 0, ''), +(17876, 80, 2491.30, 694.792, 55.7195, 0, 'exit barn'), +(17876, 81, 2502.08, 694.360, 55.5083, 0, ''), +(17876, 82, 2507.99, 679.298, 56.3760, 0, ''), +(17876, 83, 2524.79, 669.919, 54.9258, 0, ''), +(17876, 84, 2543.19, 665.289, 56.2957, 0, ''), +(17876, 85, 2566.49, 664.354, 54.5034, 0, ''), +(17876, 86, 2592.00, 664.611, 56.4394, 0, ''), +(17876, 87, 2614.43, 663.806, 55.3921, 2000, ''), +(17876, 88, 2616.14, 665.499, 55.1610, 0, ''), +(17876, 89, 2623.56, 666.965, 54.3983, 0, ''), +(17876, 90, 2629.99, 661.059, 54.2738, 0, ''), +(17876, 91, 2629.00, 656.982, 56.0651, 0, 'enter the church'), +(17876, 92, 2620.84, 633.007, 56.0300, 3000, 'SAY_TH_CHURCH_ENTER'), +(17876, 93, 2620.84, 633.007, 56.0300, 5000, 'church ambush'), +(17876, 94, 2620.84, 633.007, 56.0300, 0, 'SAY_TH_CHURCH_END'), +(17876, 95, 2622.99, 639.178, 56.0300, 0, ''), +(17876, 96, 2628.73, 656.693, 56.0610, 0, ''), +(17876, 97, 2630.34, 661.135, 54.2738, 0, ''), +(17876, 98, 2635.38, 672.243, 54.4508, 0, ''), +(17876, 99, 2644.13, 668.158, 55.3797, 0, ''), +(17876, 100, 2646.82, 666.740, 56.9898, 0, ''), +(17876, 101, 2658.22, 665.432, 57.1725, 0, ''), +(17876, 102, 2661.88, 674.849, 57.1725, 0, ''), +(17876, 103, 2656.23, 677.208, 57.1725, 0, ''), +(17876, 104, 2652.28, 670.270, 61.9353, 0, ''), +(17876, 105, 2650.79, 664.290, 61.9302, 0, 'inn ambush'), +(17876, 106, 2660.48, 659.409, 61.9370, 5000, 'SAY_TA_ESCAPED'), +(17876, 107, 2660.48, 659.409, 61.9370, 0, 'SAY_TH_MEET_TARETHA - gossip before epoch'), +(17876, 108, 2660.48, 659.409, 61.9370, 0, 'SAY_EPOCH_ENTER1'), +(17876, 109, 2650.62, 666.643, 61.9305, 0, ''), +(17876, 110, 2652.37, 670.561, 61.9368, 0, ''), +(17876, 111, 2656.05, 676.761, 57.1727, 0, ''), +(17876, 112, 2658.49, 677.166, 57.1727, 0, ''), +(17876, 113, 2659.28, 667.117, 57.1727, 0, ''), +(17876, 114, 2649.71, 665.387, 57.1727, 0, ''), +(17876, 115, 2634.79, 672.964, 54.4577, 0, 'outside inn'), +(17876, 116, 2635.06, 673.892, 54.4713, 18000, 'SAY_EPOCH_ENTER3'), +(17876, 117, 2635.06, 673.892, 54.4713, 0, 'fight begins'), +(17876, 118, 2635.06, 673.892, 54.4713, 0, 'fight ends'), +(17876, 119, 2634.30, 661.698, 54.4147, 0, 'run off'), +(17876, 120, 2652.21, 644.396, 56.1906, 0, ''); DELETE FROM script_waypoint WHERE entry=17969; INSERT INTO script_waypoint VALUES @@ -5647,7 +5662,7 @@ INSERT INTO script_waypoint VALUES (18887, 4, 2651.75, 664.482, 57.1725, 0, ''), (18887, 5, 2647.49, 666.595, 57.0824, 0, ''), (18887, 6, 2644.37, 668.167, 55.4182, 0, ''), -(18887, 7, 2638.57, 671.231, 54.5200, 60000, ''), +(18887, 7, 2638.57, 671.231, 54.5200, 0, 'start dialogue - escort paused'), (18887, 8, 2636.56, 679.894, 54.6595, 0, ''), (18887, 9, 2640.79, 689.647, 55.3215, 0, ''), (18887, 10, 2639.35, 706.777, 56.0667, 0, ''), diff --git a/sql/updates/r2695_mangos.sql b/sql/updates/r2695_mangos.sql new file mode 100644 index 000000000..039ed20e3 --- /dev/null +++ b/sql/updates/r2695_mangos.sql @@ -0,0 +1,4 @@ +DELETE FROM scripted_event_id WHERE id=11111; +INSERT INTO scripted_event_id VALUES +(11111,'event_go_barrel_old_hillsbrad'); +UPDATE gameobject_template SET ScriptName='' WHERE entry=182589; diff --git a/sql/updates/r2695_scriptdev2.sql b/sql/updates/r2695_scriptdev2.sql new file mode 100644 index 000000000..a70d28341 --- /dev/null +++ b/sql/updates/r2695_scriptdev2.sql @@ -0,0 +1,167 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1560012 AND -1560000; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1560000,'Thrall! You didn\'t really think you would escape did you? You and your allies shall answer to Blackmoore - after I\'ve had my fun!',10406,0,0,1,'skarloc SAY_ENTER'), +(-1560001,'My magical power can turn back time to before Thrall\'s death, but be careful. My power to manipulate time is limited.',0,0,0,0,'image of eronzion SAY_RESET_THRALL'), +(-1560002,'I have set back the flow of time just once more. If you fail to prevent Thrall\'s death, then all is lost.',0,0,0,0,'image of eronzion SAY_RESET_THRALL_LAST'), +(-1560003,'What\'s the meaning of this? GUARDS!',0,0,0,0,'armorer SAY_CALL_GUARDS'), +(-1560004,'All that you know... will be undone.',0,0,0,0,'infinite dragon SAY_INFINITE_AGGRO_1'), +(-1560005,'Let\'s go.',0,0,0,0,'thrall hillsbrad SAY_TH_ARMORY2'), +(-1560006,'%s startles the horse with a fierce yell!',0,2,0,0,'thrall hillsbrad EMOTE_TH_STARTLE_HORSE'), +(-1560007,'I thought I saw something go into the barn.',0,0,0,0,'tarren mill lookout SAY_LOOKOUT_BARN_1'), +(-1560008,'I didn\'t see anything.',0,0,0,0,'tarren mill lookout SAY_PROTECTOR_BARN_2'), +(-1560009,'%s tries to calm the horse down.',0,2,0,0,'thrall EMOTE_TH_CALM_HORSE'), +(-1560010,'Something riled that horse. Let\'s go!',0,0,0,0,'tarren mill lookout SAY_PROTECTOR_BARN_3'), +(-1560011,'Taretha isn\'t here. Let\'s head into town.',0,0,0,0,'thrall hillsbrad SAY_TH_HEAD_TOWN'), +(-1560012,'She\'s not here.',0,0,0,0,'thrall hillsbrad SAY_TH_CHURCH'); +DELETE FROM script_texts WHERE entry BETWEEN -1560020 AND -1560016; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1560016,'Thrall\'s trapped himself in the chapel. He can\'t escape now.',0,0,0,0,'tarren mill lookout SAY_LOOKOUT_CHURCH'), +(-1560017,'He\'s here, stop him!',0,0,0,0,'tarren mill lookout SAY_LOOKOUT_INN'), +(-1560018,'We have all the time in the world....',0,0,0,0,'infinite dragon SAY_INFINITE_AGGRO_2'), +(-1560019,'You cannot escape us!',0,0,0,0,'infinite dragon SAY_INFINITE_AGGRO_3'), +(-1560020,'Do not think you can win!',0,0,0,0,'infinite dragon SAY_INFINITE_AGGRO_4'); + +UPDATE script_texts SET type=0 WHERE entry=-1560027; +DELETE FROM gossip_texts WHERE entry IN (-3560000,-3560007); +INSERT INTO gossip_texts (entry,content_default,comment) VALUES +(-3560000,'We are ready to get you out of here, Thrall. Let\'s go!','thrall GOSSIP_ITEM_START'), +(-3560007,'Tarren Mill.','thrall GOSSIP_ITEM_TARREN_1'); + +DELETE FROM script_waypoint WHERE entry=17876; +INSERT INTO script_waypoint VALUES +(17876, 0, 2230.91, 118.765, 82.2947, 2000, 'open the prison door'), +(17876, 1, 2230.33, 114.980, 82.2946, 0, ''), +(17876, 2, 2233.36, 111.057, 82.2996, 0, ''), +(17876, 3, 2231.17, 108.486, 82.6624, 0, ''), +(17876, 4, 2220.22, 114.605, 89.4264, 0, ''), +(17876, 5, 2215.23, 115.990, 89.4549, 0, ''), +(17876, 6, 2210.00, 106.849, 89.4549, 0, ''), +(17876, 7, 2205.66, 105.234, 89.4549, 0, ''), +(17876, 8, 2192.26, 112.618, 89.4549, 2000, 'SAY_ARMORER_CALL_GUARDS'), +(17876, 9, 2185.32, 116.593, 89.4548, 2000, 'SAY_TH_ARMORER_HIT'), +(17876, 10, 2182.11, 120.328, 89.4548, 3000, 'SAY_TH_ARMORY_1'), +(17876, 11, 2182.11, 120.328, 89.4548, 5000, ''), +(17876, 12, 2182.11, 120.328, 89.4548, 3000, 'SAY_TH_ARMORY_2'), +(17876, 13, 2189.44, 113.922, 89.4549, 0, ''), +(17876, 14, 2195.63, 110.584, 89.4549, 0, ''), +(17876, 15, 2201.09, 115.115, 89.4549, 0, ''), +(17876, 16, 2204.34, 121.036, 89.4355, 0, ''), +(17876, 17, 2208.66, 129.127, 87.9560, 0, 'first ambush'), +(17876, 18, 2193.09, 137.940, 88.2164, 0, ''), +(17876, 19, 2173.39, 149.064, 87.9227, 0, ''), +(17876, 20, 2164.25, 137.965, 85.0595, 0, 'second ambush'), +(17876, 21, 2149.31, 125.645, 77.0858, 0, ''), +(17876, 22, 2142.78, 127.173, 75.5954, 0, ''), +(17876, 23, 2139.28, 133.952, 73.6386, 0, 'third ambush'), +(17876, 24, 2139.54, 155.235, 67.1269, 0, ''), +(17876, 25, 2145.38, 167.551, 64.8974, 0, 'fourth ambush'), +(17876, 26, 2134.28, 175.304, 67.9446, 0, ''), +(17876, 27, 2118.08, 187.387, 68.8141, 0, ''), +(17876, 28, 2105.88, 195.461, 65.1854, 0, ''), +(17876, 29, 2096.77, 196.939, 65.2117, 0, ''), +(17876, 30, 2083.90, 209.395, 64.8736, 0, ''), +(17876, 31, 2063.40, 229.509, 64.4883, 0, 'summon Skarloc'), +(17876, 32, 2063.40, 229.509, 64.4883, 10000, 'SAY_SKARLOC_ENTER'), +(17876, 33, 2063.40, 229.509, 64.4883, 5000, 'attack Skarloc'), +(17876, 34, 2063.40, 229.509, 64.4883, 0, 'gossip after skarloc'), +(17876, 35, 2046.70, 251.941, 62.7851, 4000, 'mount up'), +(17876, 36, 2046.70, 251.941, 62.7851, 3000, 'SAY_TH_MOUNTS_UP'), +(17876, 37, 2011.77, 278.478, 65.3388, 0, ''), +(17876, 38, 2005.08, 289.676, 66.1179, 0, ''), +(17876, 39, 2033.11, 337.450, 66.0948, 0, ''), +(17876, 40, 2070.30, 416.208, 66.0893, 0, ''), +(17876, 41, 2086.76, 469.768, 65.9182, 0, ''), +(17876, 42, 2101.70, 497.955, 61.7881, 0, ''), +(17876, 43, 2133.39, 530.933, 55.3700, 0, ''), +(17876, 44, 2157.91, 559.635, 48.5157, 0, ''), +(17876, 45, 2167.34, 586.191, 42.4394, 0, ''), +(17876, 46, 2174.17, 637.643, 33.9002, 0, ''), +(17876, 47, 2179.31, 656.053, 34.723, 0, ''), +(17876, 48, 2183.65, 670.941, 34.0318, 0, ''), +(17876, 49, 2201.50, 668.616, 36.1236, 0, ''), +(17876, 50, 2221.56, 652.747, 36.6153, 0, ''), +(17876, 51, 2238.97, 640.125, 37.2214, 0, ''), +(17876, 52, 2251.17, 620.574, 40.1473, 0, ''), +(17876, 53, 2261.98, 595.303, 41.4117, 0, ''), +(17876, 54, 2278.67, 560.172, 38.9090, 0, ''), +(17876, 55, 2336.72, 528.327, 40.9369, 0, ''), +(17876, 56, 2381.04, 519.612, 37.7312, 0, ''), +(17876, 57, 2412.20, 515.425, 39.2068, 0, ''), +(17876, 58, 2452.39, 516.174, 42.9387, 0, ''), +(17876, 59, 2467.38, 539.389, 47.4992, 0, ''), +(17876, 60, 2470.70, 554.333, 46.6668, 0, ''), +(17876, 61, 2478.07, 575.321, 55.4549, 0, ''), +(17876, 62, 2480.00, 585.408, 56.6921, 0, ''), +(17876, 63, 2482.67, 608.817, 55.6643, 0, ''), +(17876, 64, 2485.62, 626.061, 58.0132, 2000, 'dismount'), +(17876, 65, 2486.91, 626.356, 58.0761, 2000, 'EMOTE_TH_STARTLE_HORSE'), +(17876, 66, 2486.91, 626.356, 58.0761, 0, 'gossip before barn'), +(17876, 67, 2488.58, 660.940, 57.3913, 0, ''), +(17876, 68, 2502.56, 686.059, 55.6252, 0, ''), +(17876, 69, 2502.08, 694.360, 55.5083, 0, ''), +(17876, 70, 2491.46, 694.321, 55.7163, 0, 'enter barn'), +(17876, 71, 2491.10, 703.300, 55.7630, 0, ''), +(17876, 72, 2485.64, 702.992, 55.7917, 0, ''), +(17876, 73, 2479.63, 696.521, 55.7901, 0, 'spawn mobs'), +(17876, 74, 2476.24, 696.204, 55.8093, 0, 'start dialogue'), +(17876, 75, 2475.39, 695.983, 55.8146, 0, ''), +(17876, 76, 2477.75, 694.473, 55.7945, 0, ''), +(17876, 77, 2481.27, 697.747, 55.7910, 0, ''), +(17876, 78, 2486.31, 703.131, 55.7861, 0, ''), +(17876, 79, 2490.76, 703.511, 55.7662, 0, ''), +(17876, 80, 2491.30, 694.792, 55.7195, 0, 'exit barn'), +(17876, 81, 2502.08, 694.360, 55.5083, 0, ''), +(17876, 82, 2507.99, 679.298, 56.3760, 0, ''), +(17876, 83, 2524.79, 669.919, 54.9258, 0, ''), +(17876, 84, 2543.19, 665.289, 56.2957, 0, ''), +(17876, 85, 2566.49, 664.354, 54.5034, 0, ''), +(17876, 86, 2592.00, 664.611, 56.4394, 0, ''), +(17876, 87, 2614.43, 663.806, 55.3921, 2000, ''), +(17876, 88, 2616.14, 665.499, 55.1610, 0, ''), +(17876, 89, 2623.56, 666.965, 54.3983, 0, ''), +(17876, 90, 2629.99, 661.059, 54.2738, 0, ''), +(17876, 91, 2629.00, 656.982, 56.0651, 0, 'enter the church'), +(17876, 92, 2620.84, 633.007, 56.0300, 3000, 'SAY_TH_CHURCH_ENTER'), +(17876, 93, 2620.84, 633.007, 56.0300, 5000, 'church ambush'), +(17876, 94, 2620.84, 633.007, 56.0300, 0, 'SAY_TH_CHURCH_END'), +(17876, 95, 2622.99, 639.178, 56.0300, 0, ''), +(17876, 96, 2628.73, 656.693, 56.0610, 0, ''), +(17876, 97, 2630.34, 661.135, 54.2738, 0, ''), +(17876, 98, 2635.38, 672.243, 54.4508, 0, ''), +(17876, 99, 2644.13, 668.158, 55.3797, 0, ''), +(17876, 100, 2646.82, 666.740, 56.9898, 0, ''), +(17876, 101, 2658.22, 665.432, 57.1725, 0, ''), +(17876, 102, 2661.88, 674.849, 57.1725, 0, ''), +(17876, 103, 2656.23, 677.208, 57.1725, 0, ''), +(17876, 104, 2652.28, 670.270, 61.9353, 0, ''), +(17876, 105, 2650.79, 664.290, 61.9302, 0, 'inn ambush'), +(17876, 106, 2660.48, 659.409, 61.9370, 5000, 'SAY_TA_ESCAPED'), +(17876, 107, 2660.48, 659.409, 61.9370, 0, 'SAY_TH_MEET_TARETHA - gossip before epoch'), +(17876, 108, 2660.48, 659.409, 61.9370, 0, 'SAY_EPOCH_ENTER1'), +(17876, 109, 2650.62, 666.643, 61.9305, 0, ''), +(17876, 110, 2652.37, 670.561, 61.9368, 0, ''), +(17876, 111, 2656.05, 676.761, 57.1727, 0, ''), +(17876, 112, 2658.49, 677.166, 57.1727, 0, ''), +(17876, 113, 2659.28, 667.117, 57.1727, 0, ''), +(17876, 114, 2649.71, 665.387, 57.1727, 0, ''), +(17876, 115, 2634.79, 672.964, 54.4577, 0, 'outside inn'), +(17876, 116, 2635.06, 673.892, 54.4713, 18000, 'SAY_EPOCH_ENTER3'), +(17876, 117, 2635.06, 673.892, 54.4713, 0, 'fight begins'), +(17876, 118, 2635.06, 673.892, 54.4713, 0, 'fight ends'), +(17876, 119, 2634.30, 661.698, 54.4147, 0, 'run off'), +(17876, 120, 2652.21, 644.396, 56.1906, 0, ''); + +DELETE FROM script_waypoint WHERE entry=18887; +INSERT INTO script_waypoint VALUES +(18887, 0, 2650.06, 665.473, 61.9305, 0, ''), +(18887, 1, 2652.44, 670.761, 61.9370, 0, ''), +(18887, 2, 2655.96, 676.913, 57.1725, 0, ''), +(18887, 3, 2659.40, 677.317, 57.1725, 0, ''), +(18887, 4, 2651.75, 664.482, 57.1725, 0, ''), +(18887, 5, 2647.49, 666.595, 57.0824, 0, ''), +(18887, 6, 2644.37, 668.167, 55.4182, 0, ''), +(18887, 7, 2638.57, 671.231, 54.5200, 0, 'start dialogue - escort paused'), +(18887, 8, 2636.56, 679.894, 54.6595, 0, ''), +(18887, 9, 2640.79, 689.647, 55.3215, 0, ''), +(18887, 10, 2639.35, 706.777, 56.0667, 0, ''), +(18887, 11, 2617.70, 731.884, 55.5571, 0, ''); From 61f3d01bbc64c02224ee258d4abbab47511f5df4 Mon Sep 17 00:00:00 2001 From: dufernst Date: Sun, 26 Aug 2012 20:36:08 +0300 Subject: [PATCH 0685/1172] TotC: Continue DialogueHelper when twin valkyr event is started. --- .../trial_of_the_crusader/instance_trial_of_the_crusader.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp index b28f17348..eb0ae055d 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp @@ -304,6 +304,7 @@ void instance_trial_of_the_crusader::SetData(uint32 uiType, uint32 uiData) { if (Creature* pTirion = GetSingleCreatureFromStorage(NPC_TIRION_A)) DoScriptText(m_auiEncounter[uiType] != FAIL ? SAY_TIRION_TWINS_INTRO : SAY_RAID_INTRO_SHORT, pTirion); + StartNextDialogueText(TYPE_TWIN_VALKYR); } else if (uiData == FAIL) { From 1d2ffa985470fce911b0d3cbd2a2e9f2e02c8d33 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Mon, 27 Aug 2012 01:33:41 +0300 Subject: [PATCH 0686/1172] [2696] Cleanup and improve Opera event intro - Karazhan This will properly set the stage background and summons Also, the opera performance will be saved for the whole raid lockout period. Note: The wipe gossip it's not very clear. Will require additional research. --- .../karazhan/instance_karazhan.cpp | 116 ++++-- .../eastern_kingdoms/karazhan/karazhan.cpp | 363 ++++++------------ scripts/eastern_kingdoms/karazhan/karazhan.h | 41 +- sd2_revision_nr.h | 2 +- sql/scriptdev2_script_full.sql | 9 +- sql/updates/r2696_scriptdev2.sql | 8 + 6 files changed, 250 insertions(+), 289 deletions(-) create mode 100644 sql/updates/r2696_scriptdev2.sql diff --git a/scripts/eastern_kingdoms/karazhan/instance_karazhan.cpp b/scripts/eastern_kingdoms/karazhan/instance_karazhan.cpp index d3344f4d0..842450dd0 100644 --- a/scripts/eastern_kingdoms/karazhan/instance_karazhan.cpp +++ b/scripts/eastern_kingdoms/karazhan/instance_karazhan.cpp @@ -39,7 +39,8 @@ EndScriptData */ */ instance_karazhan::instance_karazhan(Map* pMap) : ScriptedInstance(pMap), - m_uiOzDeathCount(0) + m_uiOzDeathCount(0), + m_uiOperaEvent(0) { Initialize(); } @@ -47,20 +48,29 @@ instance_karazhan::instance_karazhan(Map* pMap) : ScriptedInstance(pMap), void instance_karazhan::Initialize() { memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); - - // 1 - OZ, 2 - HOOD, 3 - RAJ, this never gets altered. - m_uiOperaEvent = urand(EVENT_OZ, EVENT_RAJ); } bool instance_karazhan::IsEncounterInProgress() const { for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) + { if (m_auiEncounter[i] == IN_PROGRESS) return true; + } return false; } +void instance_karazhan::OnPlayerEnter(Player* pPlayer) +{ + // If the opera event is already set, return + if (GetData(TYPE_OPERA_PERFORMANCE) != 0) + return; + + // Set the Opera Performance type on the first player enter + SetData(TYPE_OPERA_PERFORMANCE, urand(OPERA_EVENT_WIZARD_OZ, OPERA_EVENT_ROMULO_AND_JUL)); +} + void instance_karazhan::OnCreatureCreate(Creature* pCreature) { switch (pCreature->GetEntry()) @@ -68,6 +78,7 @@ void instance_karazhan::OnCreatureCreate(Creature* pCreature) case NPC_ATTUMEN: case NPC_MIDNIGHT: case NPC_MOROES: + case NPC_BARNES: case NPC_NIGHTBANE: case NPC_LADY_KEIRA_BERRYBUCK: case NPC_LADY_CATRIONA_VON_INDI: @@ -84,49 +95,39 @@ void instance_karazhan::OnObjectCreate(GameObject* pGo) { switch(pGo->GetEntry()) { - case GO_STAGE_CURTAIN: - break; case GO_STAGE_DOOR_LEFT: - if (m_auiEncounter[4] == DONE) - pGo->SetGoState(GO_STATE_ACTIVE); - break; case GO_STAGE_DOOR_RIGHT: if (m_auiEncounter[4] == DONE) pGo->SetGoState(GO_STATE_ACTIVE); break; - case GO_PRIVATE_LIBRARY_DOOR: - break; - case GO_MASSIVE_DOOR: - break; - case GO_GAMESMANS_HALL_DOOR: - break; case GO_GAMESMANS_HALL_EXIT_DOOR: - break; - case GO_NETHERSPACE_DOOR: + if (m_auiEncounter[8] == DONE) + pGo->SetGoState(GO_STATE_ACTIVE); break; case GO_SIDE_ENTRANCE_DOOR: - if (m_auiEncounter[4] != DONE) - pGo->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_LOCKED); - else + if (m_auiEncounter[4] == DONE) pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_LOCKED); break; + case GO_STAGE_CURTAIN: + case GO_PRIVATE_LIBRARY_DOOR: + case GO_MASSIVE_DOOR: + case GO_GAMESMANS_HALL_DOOR: + case GO_NETHERSPACE_DOOR: case GO_DUST_COVERED_CHEST: + case GO_MASTERS_TERRACE_DOOR_1: + case GO_MASTERS_TERRACE_DOOR_2: break; + // Opera event backgrounds case GO_OZ_BACKDROP: case GO_OZ_HAY: - // if (m_uiOperaEvent == EVENT_OZ) // TODO - respawn, store for later respawn? - return; case GO_HOOD_BACKDROP: case GO_HOOD_TREE: case GO_HOOD_HOUSE: - // if (m_uiOperaEvent == EVENT_HOOD) // TODO - respawn, store for later respawn? - return; case GO_RAJ_BACKDROP: case GO_RAJ_MOON: case GO_RAJ_BALCONY: - // if (m_uiOperaEvent == EVENT_RAJ) // TODO - respawn, store for later respawn? - return; + break; default: return; @@ -165,17 +166,14 @@ void instance_karazhan::SetData(uint32 uiType, uint32 uiData) DoUseDoorOrButton(GO_STAGE_DOOR_RIGHT); DoToggleGameObjectFlags(GO_SIDE_ENTRANCE_DOOR, GO_FLAG_LOCKED, false); } + // use curtain only for event start or fail + else + DoUseDoorOrButton(GO_STAGE_CURTAIN); break; case TYPE_CURATOR: - m_auiEncounter[uiType] = uiData; - break; case TYPE_TERESTIAN: - m_auiEncounter[uiType] = uiData; - break; case TYPE_ARAN: m_auiEncounter[uiType] = uiData; - if (uiData != IN_PROGRESS) - DoUseDoorOrButton(GO_PRIVATE_LIBRARY_DOOR); break; case TYPE_NETHERSPITE: m_auiEncounter[uiType] = uiData; @@ -183,14 +181,24 @@ void instance_karazhan::SetData(uint32 uiType, uint32 uiData) break; case TYPE_CHESS: if (uiData == DONE) + { + DoUseDoorOrButton(GO_GAMESMANS_HALL_EXIT_DOOR); DoRespawnGameObject(GO_DUST_COVERED_CHEST, DAY); + } m_auiEncounter[uiType] = uiData; break; case TYPE_MALCHEZZAR: + DoUseDoorOrButton(GO_NETHERSPACE_DOOR); m_auiEncounter[uiType] = uiData; break; case TYPE_NIGHTBANE: m_auiEncounter[uiType] = uiData; + DoUseDoorOrButton(GO_MASTERS_TERRACE_DOOR_1); + DoUseDoorOrButton(GO_MASTERS_TERRACE_DOOR_2); + break; + // Store the event type for the Opera + case TYPE_OPERA_PERFORMANCE: + m_uiOperaEvent = uiData; break; case DATA_OPERA_OZ_DEATHCOUNT: @@ -201,7 +209,8 @@ void instance_karazhan::SetData(uint32 uiType, uint32 uiData) return; } - if (uiData == DONE) + // Also save the opera performance, once it's set + if (uiData == DONE || uiType == TYPE_OPERA_PERFORMANCE) { OUT_SAVE_INST_DATA; @@ -209,7 +218,7 @@ void instance_karazhan::SetData(uint32 uiType, uint32 uiData) saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2] << " " << m_auiEncounter[3] << " " << m_auiEncounter[4] << " " << m_auiEncounter[5] << " " << m_auiEncounter[6] << " " << m_auiEncounter[7] << " " << m_auiEncounter[8] << " " - << m_auiEncounter[9] << " " << m_auiEncounter[10]; + << m_auiEncounter[9] << " " << m_auiEncounter[10] << " " << m_uiOperaEvent; m_strInstData = saveStream.str(); @@ -233,8 +242,8 @@ uint32 instance_karazhan::GetData(uint32 uiType) case TYPE_CHESS: return m_auiEncounter[8]; case TYPE_MALCHEZZAR: return m_auiEncounter[9]; case TYPE_NIGHTBANE: return m_auiEncounter[10]; + case TYPE_OPERA_PERFORMANCE: return m_uiOperaEvent; - case DATA_OPERA_PERFORMANCE: return m_uiOperaEvent; case DATA_OPERA_OZ_DEATHCOUNT: return m_uiOzDeathCount; default: @@ -256,15 +265,50 @@ void instance_karazhan::Load(const char* chrIn) loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3] >> m_auiEncounter[4] >> m_auiEncounter[5] >> m_auiEncounter[6] >> m_auiEncounter[7] - >> m_auiEncounter[8] >> m_auiEncounter[9] >> m_auiEncounter[10]; + >> m_auiEncounter[8] >> m_auiEncounter[9] >> m_auiEncounter[10] >> m_uiOperaEvent; for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) + { if (m_auiEncounter[i] == IN_PROGRESS) // Do not load an encounter as "In Progress" - reset it instead. m_auiEncounter[i] = NOT_STARTED; + } OUT_LOAD_INST_DATA_COMPLETE; } +void instance_karazhan::DoPrepareOperaStage(Creature* pOrganizer) +{ + if (!pOrganizer) + return; + + debug_log("SD2: Barnes Opera Event - Introduction complete - preparing encounter %d", GetData(TYPE_OPERA_PERFORMANCE)); + + // summon the bosses and respawn the stage background + switch (GetData(TYPE_OPERA_PERFORMANCE)) + { + case OPERA_EVENT_WIZARD_OZ: + for (uint8 i = 0; i < MAX_OZ_OPERA_MOBS; ++i) + pOrganizer->SummonCreature(aOperaLocOz[i].uiEntry, aOperaLocOz[i].fX, aOperaLocOz[i].fY, aOperaLocOz[i].fZ, aOperaLocOz[i].fO, TEMPSUMMON_DEAD_DESPAWN, 0); + DoRespawnGameObject(GO_OZ_BACKDROP, 12*HOUR); + DoRespawnGameObject(GO_OZ_HAY, 12*HOUR); + break; + case OPERA_EVENT_BIG_BAD_WOLF: + pOrganizer->SummonCreature(aOperaLocWolf.uiEntry, aOperaLocWolf.fX, aOperaLocWolf.fY, aOperaLocWolf.fZ, aOperaLocWolf.fO, TEMPSUMMON_DEAD_DESPAWN, 0); + DoRespawnGameObject(GO_HOOD_BACKDROP, 12*HOUR); + DoRespawnGameObject(GO_HOOD_HOUSE, 12*HOUR); + DoRespawnGameObject(GO_HOOD_TREE, 12*HOUR); + break; + case OPERA_EVENT_ROMULO_AND_JUL: + pOrganizer->SummonCreature(aOperaLocJul.uiEntry, aOperaLocJul.fX, aOperaLocJul.fY, aOperaLocJul.fZ, aOperaLocJul.fO, TEMPSUMMON_DEAD_DESPAWN, 0); + DoRespawnGameObject(GO_RAJ_BACKDROP, 12*HOUR); + DoRespawnGameObject(GO_RAJ_MOON, 12*HOUR); + DoRespawnGameObject(GO_RAJ_BALCONY, 12*HOUR); + break; + } + + SetData(TYPE_OPERA, IN_PROGRESS); +} + InstanceData* GetInstanceData_instance_karazhan(Map* pMap) { return new instance_karazhan(pMap); diff --git a/scripts/eastern_kingdoms/karazhan/karazhan.cpp b/scripts/eastern_kingdoms/karazhan/karazhan.cpp index 651f4432b..d17ea5965 100644 --- a/scripts/eastern_kingdoms/karazhan/karazhan.cpp +++ b/scripts/eastern_kingdoms/karazhan/karazhan.cpp @@ -34,128 +34,86 @@ EndContentData */ # npc_barnesAI ######*/ -#define GOSSIP_READY "I'm not an actor." - -#define SAY_READY "Splendid, I'm going to get the audience ready. Break a leg!" -#define SAY_OZ_INTRO1 "Finally, everything is in place. Are you ready for your big stage debut?" -#define OZ_GOSSIP1 "I'm not an actor." -#define SAY_OZ_INTRO2 "Don't worry, you'll be fine. You look like a natural!" -#define OZ_GOSSIP2 "Ok, I'll give it a try, then." +enum +{ + SAY_BARNES_EVENT_START = -1532115, -#define SAY_RAJ_INTRO1 "The romantic plays are really tough, but you'll do better this time. You have TALENT. Ready?" -#define RAJ_GOSSIP1 "I've never been more ready." + SAY_BARNES_OZ_1 = -1532103, + SAY_BARNES_OZ_2 = -1532104, + SAY_BARNES_OZ_3 = -1532105, + SAY_BARNES_OZ_4 = -1532106, -#define OZ_GM_GOSSIP1 "[GM] Change event to EVENT_OZ" -#define OZ_GM_GOSSIP2 "[GM] Change event to EVENT_HOOD" -#define OZ_GM_GOSSIP3 "[GM] Change event to EVENT_RAJ" + SAY_BARNES_HOOD_1 = -1532107, + SAY_BARNES_HOOD_2 = -1532108, + SAY_BARNES_HOOD_3 = -1532109, + SAY_BARNES_HOOD_4 = -1532110, -struct Dialogue -{ - int32 iTextId; - uint32 uiTimer; -}; + SAY_BARNES_RAJ_1 = -1532111, + SAY_BARNES_RAJ_2 = -1532112, + SAY_BARNES_RAJ_3 = -1532113, + SAY_BARNES_RAJ_4 = -1532114, -static Dialogue aOzDialogue[4]= -{ - {-1532103, 6000}, - {-1532104, 18000}, - {-1532105, 9000}, - {-1532106, 15000} -}; + // ToDo: it's not very clear which is the gossip sequence for event FAIL case + GOSSIP_ITEM_OPERA_1 = -3532001, + GOSSIP_ITEM_OPERA_2 = -3532002, -static Dialogue aHoodDialogue[4]= -{ - {-1532107, 6000}, - {-1532108, 10000}, - {-1532109, 14000}, - {-1532110, 15000} -}; + TEXT_ID_OPERA_1 = 8970, + TEXT_ID_OPERA_2 = 8971, + TEXT_ID_OPERA_WIPE = 8975, -static Dialogue aRAJDialogue[4]= -{ - {-1532111, 5000}, - {-1532112, 7000}, - {-1532113, 14000}, - {-1532114, 14000} -}; + //SPELL_SPOTLIGHT = 25824, // in creature_template_addon + SPELL_TUXEDO = 32616, -struct Spawn -{ - uint32 uiEntry; - float fPosX; + NPC_SPOTLIGHT = 19525, }; -// Entries and spawn locations for creatures in Oz event -Spawn aSpawns_OZ[4]= -{ - {17535, -10896.0f}, // Dorothee - {17546, -10891.0f}, // Roar - {17547, -10884.0f}, // Tinhead - {17543, -10902.0f}, // Strawman -}; -Spawn Spawn_HOOD = {17603, -10892.0f}; // Grandmother -Spawn Spawn_RAJ = {17534, -10900.0f}; // Julianne +// ToDo: these may be the gossip items for raid wipe. Needs research! +//#define TEXT_ID_WIPE "The romantic plays are really tough, but you'll do better this time. You have TALENT. Ready?" +//#define GOSSIP_ITEM_WIPE "I've never been more ready." -enum +static const DialogueEntry aIntroDialogue[] = { - NPC_SPOTLIGHT = 19525, - - SPELL_SPOTLIGHT = 25824, - SPELL_TUXEDO = 32616 + {SAY_BARNES_OZ_1, NPC_BARNES, 6000}, + {SAY_BARNES_OZ_2, NPC_BARNES, 18000}, + {SAY_BARNES_OZ_3, NPC_BARNES, 9000}, + {SAY_BARNES_OZ_4, NPC_BARNES, 15000}, + {OPERA_EVENT_WIZARD_OZ, 0, 0}, + {SAY_BARNES_HOOD_1, NPC_BARNES, 6000}, + {SAY_BARNES_HOOD_2, NPC_BARNES, 10000}, + {SAY_BARNES_HOOD_3, NPC_BARNES, 14000}, + {SAY_BARNES_HOOD_4, NPC_BARNES, 15000}, + {OPERA_EVENT_BIG_BAD_WOLF, 0, 0}, + {SAY_BARNES_RAJ_1, NPC_BARNES, 5000}, + {SAY_BARNES_RAJ_2, NPC_BARNES, 7000}, + {SAY_BARNES_RAJ_3, NPC_BARNES, 14000}, + {SAY_BARNES_RAJ_4, NPC_BARNES, 14000}, + {OPERA_EVENT_ROMULO_AND_JUL, 0, 0}, + {0, 0, 0}, }; -const float SPAWN_Z = 90.5f; -const float SPAWN_Y = -1758.0f; -const float SPAWN_O = 4.738f; - -struct MANGOS_DLL_DECL npc_barnesAI : public npc_escortAI +struct MANGOS_DLL_DECL npc_barnesAI : public npc_escortAI, private DialogueHelper { - npc_barnesAI(Creature* pCreature) : npc_escortAI(pCreature) + npc_barnesAI(Creature* pCreature) : npc_escortAI(pCreature), + DialogueHelper(aIntroDialogue) { - m_bRaidWiped = false; - m_uiEventId = 0; - m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_pInstance = (instance_karazhan*)pCreature->GetInstanceData(); + InitializeDialogueHelper(m_pInstance); Reset(); } - ScriptedInstance* m_pInstance; + instance_karazhan* m_pInstance; ObjectGuid m_spotlightGuid; - uint32 m_uiTalkCount; - uint32 m_uiTalkTimer; - uint32 m_uiWipeTimer; - uint32 m_uiEventId; - - bool m_bPerformanceReady; - bool m_bRaidWiped; - void Reset() { m_spotlightGuid.Clear(); - - m_uiTalkCount = 0; - m_uiTalkTimer = 2000; - m_uiWipeTimer = 5000; - - m_bPerformanceReady = false; - - if (m_pInstance) - m_uiEventId = m_pInstance->GetData(DATA_OPERA_PERFORMANCE); } - void StartEvent() + void JustSummoned(Creature* pSummoned) { - if (!m_pInstance) - return; - - m_pInstance->SetData(TYPE_OPERA, IN_PROGRESS); - - //resets count for this event, in case earlier failed - if (m_uiEventId == EVENT_OZ) - m_pInstance->SetData(DATA_OPERA_OZ_DEATHCOUNT, IN_PROGRESS); - - Start(false, NULL, NULL, true); + if (pSummoned->GetEntry() == NPC_SPOTLIGHT) + m_spotlightGuid = pSummoned->GetObjectGuid(); } void WaypointReached(uint32 uiPointId) @@ -166,144 +124,50 @@ struct MANGOS_DLL_DECL npc_barnesAI : public npc_escortAI switch(uiPointId) { case 0: - m_creature->CastSpell(m_creature, SPELL_TUXEDO, false); + DoCastSpellIfCan(m_creature, SPELL_TUXEDO); m_pInstance->DoUseDoorOrButton(GO_STAGE_DOOR_LEFT); break; case 4: - m_uiTalkCount = 0; - SetEscortPaused(true); - - if (Creature* pSpotlight = m_creature->SummonCreature(NPC_SPOTLIGHT, - m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), 0.0f, - TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 60000)) + switch (m_pInstance->GetData(TYPE_OPERA_PERFORMANCE)) { - pSpotlight->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - pSpotlight->CastSpell(pSpotlight, SPELL_SPOTLIGHT, false); - m_spotlightGuid = pSpotlight->GetObjectGuid(); + case OPERA_EVENT_WIZARD_OZ: + StartNextDialogueText(SAY_BARNES_OZ_1); + break; + case OPERA_EVENT_BIG_BAD_WOLF: + StartNextDialogueText(SAY_BARNES_HOOD_1); + break; + case OPERA_EVENT_ROMULO_AND_JUL: + StartNextDialogueText(SAY_BARNES_RAJ_1); + break; } + SetEscortPaused(true); + m_creature->SummonCreature(NPC_SPOTLIGHT, 0, 0, 0, 0, TEMPSUMMON_DEAD_DESPAWN, 0); break; case 8: m_pInstance->DoUseDoorOrButton(GO_STAGE_DOOR_LEFT); - m_bPerformanceReady = true; break; case 9: - PrepareEncounter(); - m_pInstance->DoUseDoorOrButton(GO_STAGE_CURTAIN); - break; - } - } - - void Talk(uint32 uiCount) - { - int32 iTextId = 0; - - switch(m_uiEventId) - { - case EVENT_OZ: - if (aOzDialogue[uiCount].iTextId) - iTextId = aOzDialogue[uiCount].iTextId; - if (aOzDialogue[uiCount].uiTimer) - m_uiTalkTimer = aOzDialogue[uiCount].uiTimer; - break; - - case EVENT_HOOD: - if (aHoodDialogue[uiCount].iTextId) - iTextId = aHoodDialogue[uiCount].iTextId; - if (aHoodDialogue[uiCount].uiTimer) - m_uiTalkTimer = aHoodDialogue[uiCount].uiTimer; - break; - - case EVENT_RAJ: - if (aRAJDialogue[uiCount].iTextId) - iTextId = aRAJDialogue[uiCount].iTextId; - if (aRAJDialogue[uiCount].uiTimer) - m_uiTalkTimer = aRAJDialogue[uiCount].uiTimer; + m_pInstance->DoPrepareOperaStage(m_creature); break; } - - if (iTextId) - DoScriptText(iTextId, m_creature); } - void PrepareEncounter() + void JustDidDialogueStep(int32 iEntry) { - debug_log("SD2: Barnes Opera Event - Introduction complete - preparing encounter %d", m_uiEventId); - - switch(m_uiEventId) + switch (iEntry) { - case EVENT_OZ: - for(int i=0; i < 4; ++i) - m_creature->SummonCreature(aSpawns_OZ[i].uiEntry, aSpawns_OZ[i].fPosX, SPAWN_Y, SPAWN_Z, SPAWN_O, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, HOUR*2*IN_MILLISECONDS); - break; - case EVENT_HOOD: - m_creature->SummonCreature(Spawn_HOOD.uiEntry, Spawn_HOOD.fPosX, SPAWN_Y, SPAWN_Z, SPAWN_O, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, HOUR*2*IN_MILLISECONDS); - break; - case EVENT_RAJ: - m_creature->SummonCreature(Spawn_RAJ.uiEntry, Spawn_RAJ.fPosX, SPAWN_Y, SPAWN_Z, SPAWN_O, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, HOUR*2*IN_MILLISECONDS); - break; - default: - error_log("SD2: Barnes Opera Event - Wrong EventId set: %d", m_uiEventId); + case OPERA_EVENT_WIZARD_OZ: + case OPERA_EVENT_BIG_BAD_WOLF: + case OPERA_EVENT_ROMULO_AND_JUL: + // Despawn spotlight and resume escort + if (Creature* pSpotlight = m_creature->GetMap()->GetCreature(m_spotlightGuid)) + pSpotlight->ForcedDespawn(); + SetEscortPaused(false); break; } - - m_bRaidWiped = false; } - void UpdateEscortAI(const uint32 uiDiff) - { - if (HasEscortState(STATE_ESCORT_PAUSED)) - { - if (m_uiTalkTimer < uiDiff) - { - if (m_uiTalkCount > 3) - { - if (Creature* pSpotlight = m_creature->GetMap()->GetCreature(m_spotlightGuid)) - pSpotlight->ForcedDespawn(); - - SetEscortPaused(false); - return; - } - - Talk(m_uiTalkCount++); - } - else - m_uiTalkTimer -= uiDiff; - } - - if (m_bPerformanceReady) - { - if (!m_bRaidWiped) - { - if (m_uiWipeTimer < uiDiff) - { - Map *pMap = m_creature->GetMap(); - if (!pMap->IsDungeon()) - return; - - Map::PlayerList const &PlayerList = pMap->GetPlayers(); - if (PlayerList.isEmpty()) - return; - - m_bRaidWiped = true; - for(Map::PlayerList::const_iterator i = PlayerList.begin();i != PlayerList.end(); ++i) - { - if (i->getSource()->isAlive() && !i->getSource()->isGameMaster()) - { - m_bRaidWiped = false; - break; - } - } - - if (m_bRaidWiped) - EnterEvadeMode(); - - m_uiWipeTimer = 15000; - } - else - m_uiWipeTimer -= uiDiff; - } - } - } + void UpdateEscortAI(const uint32 uiDiff) { DialogueUpdate(uiDiff); } }; CreatureAI* GetAI_npc_barnesAI(Creature* pCreature) @@ -315,66 +179,71 @@ bool GossipHello_npc_barnes(Player* pPlayer, Creature* pCreature) { if (ScriptedInstance* pInstance = (ScriptedInstance*)pCreature->GetInstanceData()) { - // Check for death of Moroes and if opera event is not done already - if (pInstance->GetData(TYPE_MOROES) == DONE && pInstance->GetData(TYPE_OPERA) != DONE) + // Check if opera event is not yet in progress + if (pInstance->GetData(TYPE_OPERA) == IN_PROGRESS || pInstance->GetData(TYPE_OPERA) == DONE) + return true; + + // Check for death of Moroes + if (pInstance->GetData(TYPE_MOROES) == DONE) { - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, OZ_GOSSIP1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); + pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_OPERA_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); - if (pPlayer->isGameMaster()) // for GMs we add the possibility to change the event + // for GMs we add the possibility to change the event + if (pPlayer->isGameMaster()) { - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_DOT, OZ_GM_GOSSIP1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_DOT, OZ_GM_GOSSIP2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4); - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_DOT, OZ_GM_GOSSIP3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 5); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_DOT, "[GM] Change event to EVENT_OZ", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_DOT, "[GM] Change event to EVENT_HOOD", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_DOT, "[GM] Change event to EVENT_RAJ", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 5); } - if (npc_barnesAI* pBarnesAI = dynamic_cast(pCreature->AI())) - { - if (!pBarnesAI->m_bRaidWiped) - pPlayer->SEND_GOSSIP_MENU(8970, pCreature->GetObjectGuid()); - else - pPlayer->SEND_GOSSIP_MENU(8975, pCreature->GetObjectGuid()); + pPlayer->SEND_GOSSIP_MENU(pInstance->GetData(TYPE_OPERA) == FAIL ? TEXT_ID_OPERA_1 : TEXT_ID_OPERA_WIPE, pCreature->GetObjectGuid()); - return true; - } + return true; } } - pPlayer->SEND_GOSSIP_MENU(8978, pCreature->GetObjectGuid()); return true; } bool GossipSelect_npc_barnes(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) { - npc_barnesAI* pBarnesAI = dynamic_cast(pCreature->AI()); - switch(uiAction) { case GOSSIP_ACTION_INFO_DEF+1: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, OZ_GOSSIP2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); - pPlayer->SEND_GOSSIP_MENU(8971, pCreature->GetObjectGuid()); + pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_OPERA_2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); + pPlayer->SEND_GOSSIP_MENU(TEXT_ID_OPERA_2, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+2: pPlayer->CLOSE_GOSSIP_MENU(); - if (pBarnesAI) - pBarnesAI->StartEvent(); + DoScriptText(SAY_BARNES_EVENT_START, pCreature); + // start the stage escort + if (npc_barnesAI* pBarnesAI = dynamic_cast(pCreature->AI())) + pBarnesAI->Start(false, NULL, NULL, true); break; + // GM gossip options case GOSSIP_ACTION_INFO_DEF+3: pPlayer->CLOSE_GOSSIP_MENU(); - if (pBarnesAI && pPlayer->isGameMaster()) - pBarnesAI->m_uiEventId = EVENT_OZ; - outstring_log("SD2: %s manually set Opera event to EVENT_OZ", pPlayer->GetGuidStr().c_str()); + if (ScriptedInstance* pInstance = (ScriptedInstance*)pCreature->GetInstanceData()) + { + pInstance->SetData(TYPE_OPERA_PERFORMANCE, OPERA_EVENT_WIZARD_OZ); + outstring_log("SD2: %s manually set Opera event to EVENT_OZ", pPlayer->GetGuidStr().c_str()); + } break; case GOSSIP_ACTION_INFO_DEF+4: pPlayer->CLOSE_GOSSIP_MENU(); - if (pBarnesAI && pPlayer->isGameMaster()) - pBarnesAI->m_uiEventId = EVENT_HOOD; - outstring_log("SD2: %s manually set Opera event to EVENT_HOOD", pPlayer->GetGuidStr().c_str()); + if (ScriptedInstance* pInstance = (ScriptedInstance*)pCreature->GetInstanceData()) + { + pInstance->SetData(TYPE_OPERA_PERFORMANCE, OPERA_EVENT_BIG_BAD_WOLF); + outstring_log("SD2: %s manually set Opera event to EVENT_HOOD", pPlayer->GetGuidStr().c_str()); + } break; case GOSSIP_ACTION_INFO_DEF+5: pPlayer->CLOSE_GOSSIP_MENU(); - if (pBarnesAI && pPlayer->isGameMaster()) - pBarnesAI->m_uiEventId = EVENT_RAJ; - outstring_log("SD2: %s manually set Opera event to EVENT_RAJ", pPlayer->GetGuidStr().c_str()); + if (ScriptedInstance* pInstance = (ScriptedInstance*)pCreature->GetInstanceData()) + { + pInstance->SetData(TYPE_OPERA_PERFORMANCE, OPERA_EVENT_ROMULO_AND_JUL); + outstring_log("SD2: %s manually set Opera event to EVENT_RAJ", pPlayer->GetGuidStr().c_str()); + } break; } @@ -387,18 +256,18 @@ bool GossipSelect_npc_barnes(Player* pPlayer, Creature* pCreature, uint32 uiSend enum { + GOSSIP_ITEM_TELEPORT = -3532000, + SPELL_TELEPORT = 39567 }; -#define GOSSIP_ITEM_TELEPORT "Teleport me to the Guardian's Library" - bool GossipHello_npc_berthold(Player* pPlayer, Creature* pCreature) { if (ScriptedInstance* pInstance = (ScriptedInstance*)pCreature->GetInstanceData()) { // Check if Shade of Aran event is done if (pInstance->GetData(TYPE_ARAN) == DONE) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_TELEPORT, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); + pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_TELEPORT, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); } pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); diff --git a/scripts/eastern_kingdoms/karazhan/karazhan.h b/scripts/eastern_kingdoms/karazhan/karazhan.h index 00b199228..9edb130b2 100644 --- a/scripts/eastern_kingdoms/karazhan/karazhan.h +++ b/scripts/eastern_kingdoms/karazhan/karazhan.h @@ -8,6 +8,7 @@ enum { MAX_ENCOUNTER = 11, + MAX_OZ_OPERA_MOBS = 4, TYPE_ATTUMEN = 0, TYPE_MOROES = 1, @@ -20,13 +21,14 @@ enum TYPE_CHESS = 8, TYPE_MALCHEZZAR = 9, TYPE_NIGHTBANE = 10, + TYPE_OPERA_PERFORMANCE = 11, // no regular encounter - just store one random opera event - DATA_OPERA_PERFORMANCE = 11, DATA_OPERA_OZ_DEATHCOUNT = 12, NPC_ATTUMEN = 15550, NPC_MIDNIGHT = 16151, NPC_MOROES = 15687, + NPC_BARNES = 16812, // NPC_TERESTIAN = 15688, NPC_NIGHTBANE = 17225, @@ -38,6 +40,15 @@ enum NPC_BARONESS_DOROTHEA_MILLSTIPE = 19875, NPC_LORD_ROBIN_DARIS = 19876, + // Opera event + NPC_DOROTHEE = 17535, + NPC_ROAR = 17546, + NPC_TINHEAD = 17547, + NPC_STRAWMAN = 17543, + NPC_GRANDMOTHER = 17603, + NPC_JULIANNE = 17534, + NPC_ROMULO = 17533, + GO_STAGE_CURTAIN = 183932, GO_STAGE_DOOR_LEFT = 184278, GO_STAGE_DOOR_RIGHT = 184279, @@ -48,6 +59,8 @@ enum GO_NETHERSPACE_DOOR = 185134, GO_SIDE_ENTRANCE_DOOR = 184275, GO_DUST_COVERED_CHEST = 185119, + GO_MASTERS_TERRACE_DOOR_1 = 184274, + GO_MASTERS_TERRACE_DOOR_2 = 184280, // Opera event stage decoration GO_OZ_BACKDROP = 183442, @@ -62,11 +75,28 @@ enum enum OperaEvents { - EVENT_OZ = 1, - EVENT_HOOD = 2, - EVENT_RAJ = 3 + OPERA_EVENT_WIZARD_OZ = 1, + OPERA_EVENT_BIG_BAD_WOLF = 2, + OPERA_EVENT_ROMULO_AND_JUL = 3 }; +struct OperaSpawns +{ + uint32 uiEntry; + float fX, fY, fZ, fO; +}; + +static const OperaSpawns aOperaLocOz[MAX_OZ_OPERA_MOBS]= +{ + {NPC_DOROTHEE, -10896.65f, -1757.62f, 90.55f, 4.86f}, + {NPC_ROAR, -10889.53f, -1758.10f, 90.55f, 4.57f}, + {NPC_TINHEAD, -10883.84f, -1758.85f, 90.55f, 4.53f}, + {NPC_STRAWMAN, -10902.11f, -1756.45f, 90.55f, 4.66f}, +}; + +static const OperaSpawns aOperaLocWolf = {NPC_GRANDMOTHER, -10892.0f, -1758.0f, 90.55f, 4.738f}; +static const OperaSpawns aOperaLocJul = {NPC_JULIANNE, -10900.0f, -1758.0f, 90.55f, 4.738f}; + class MANGOS_DLL_DECL instance_karazhan : public ScriptedInstance { public: @@ -76,12 +106,15 @@ class MANGOS_DLL_DECL instance_karazhan : public ScriptedInstance void Initialize(); bool IsEncounterInProgress() const; + void OnPlayerEnter(Player* pPlayer); void OnCreatureCreate(Creature* pCreature); void OnObjectCreate(GameObject* pGo); void SetData(uint32 uiType, uint32 uiData); uint32 GetData(uint32 uiType); + void DoPrepareOperaStage(Creature* pOrganizer); + void Load(const char* chrIn); const char* Save() { return m_strInstData.c_str(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 846c1560d..4a7c20fd0 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2695" + #define SD2_REVISION_NR "2696" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 5e817285c..099990a2e 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -1657,7 +1657,8 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1532111,'Welcome, Ladies and Gentlemen, to this evening\'s presentation!',9176,1,0,0,'barnes RAJ1'), (-1532112,'Tonight, we explore a tale of forbidden love!',9341,1,0,0,'barnes RAJ2'), (-1532113,'But beware, for not all love stories end happily, as you may find out. Sometimes, love pricks like a thorn.',9342,1,0,0,'barnes RAJ3'), -(-1532114,'But don\'t take it from me, see for yourself what tragedy lies ahead when the paths of star-crossed lovers meet. And now...on with the show!',9343,1,0,0,'barnes RAJ4'); +(-1532114,'But don\'t take it from me, see for yourself what tragedy lies ahead when the paths of star-crossed lovers meet. And now...on with the show!',9343,1,0,0,'barnes RAJ4'), +(-1532115,'Splendid, I\'m going to get the audience ready. Break a leg!',0,0,0,0,'barnes SAY_EVENT_START'); -- -1 533 000 NAXXRAMAS INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES @@ -4366,6 +4367,12 @@ INSERT INTO gossip_texts (entry,content_default,comment) VALUES (-3509000,'Let\'s find out.','andorov GOSSIP_ITEM_START'), (-3509001,'Let\'s see what you have.','andorov GOSSIP_ITEM_TRADE'); +-- -3 532 000 KARAZHAN +INSERT INTO gossip_texts (entry,content_default,comment) VALUES +(-3532000,'Teleport me to the Guardian\'s Library','berthold GOSSIP_ITEM_TELEPORT'), +(-3532001,'I\'m not an actor.','barnes GOSSIP_ITEM_OPERA_1'), +(-3532002,'Ok, I\'ll give it a try, then.','barnes GOSSIP_ITEM_OPERA_2'); + -- -3 534 000 THE BATTLE OF MT. HYJAL INSERT INTO gossip_texts (entry,content_default,comment) VALUES (-3534000,'My companions and I are with you, Lady Proudmoore.','jaina GOSSIP_ITEM_JAIN_START'), diff --git a/sql/updates/r2696_scriptdev2.sql b/sql/updates/r2696_scriptdev2.sql new file mode 100644 index 000000000..04c79f953 --- /dev/null +++ b/sql/updates/r2696_scriptdev2.sql @@ -0,0 +1,8 @@ +DELETE FROM script_texts WHERE entry=-1532115; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1532115,'Splendid, I\'m going to get the audience ready. Break a leg!',0,0,0,0,'barnes SAY_EVENT_START'); +DELETE FROM gossip_texts WHERE entry IN (-3532000,-3532001,-3532002); +INSERT INTO gossip_texts (entry,content_default,comment) VALUES +(-3532000,'Teleport me to the Guardian\'s Library','berthold GOSSIP_ITEM_TELEPORT'), +(-3532001,'I\'m not an actor.','barnes GOSSIP_ITEM_OPERA_1'), +(-3532002,'Ok, I\'ll give it a try, then.','barnes GOSSIP_ITEM_OPERA_2'); From 303cff9df69204267c57357e1711a4579a1ab987 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Mon, 27 Aug 2012 08:40:34 +0300 Subject: [PATCH 0687/1172] [2697] Fix mistakes from previous commit Also add a few more gossip items for the opera event --- .../karazhan/instance_karazhan.cpp | 16 ++++++++++----- .../eastern_kingdoms/karazhan/karazhan.cpp | 20 +++++++++---------- scripts/eastern_kingdoms/karazhan/karazhan.h | 5 ++++- sd2_revision_nr.h | 2 +- sql/scriptdev2_script_full.sql | 5 ++++- sql/updates/r2697_scriptdev2.sql | 5 +++++ 6 files changed, 35 insertions(+), 18 deletions(-) create mode 100644 sql/updates/r2697_scriptdev2.sql diff --git a/scripts/eastern_kingdoms/karazhan/instance_karazhan.cpp b/scripts/eastern_kingdoms/karazhan/instance_karazhan.cpp index 842450dd0..713f22794 100644 --- a/scripts/eastern_kingdoms/karazhan/instance_karazhan.cpp +++ b/scripts/eastern_kingdoms/karazhan/instance_karazhan.cpp @@ -120,14 +120,18 @@ void instance_karazhan::OnObjectCreate(GameObject* pGo) // Opera event backgrounds case GO_OZ_BACKDROP: - case GO_OZ_HAY: case GO_HOOD_BACKDROP: - case GO_HOOD_TREE: case GO_HOOD_HOUSE: case GO_RAJ_BACKDROP: case GO_RAJ_MOON: case GO_RAJ_BALCONY: break; + case GO_OZ_HAY: + m_lOperaHayGuidList.push_back(pGo->GetObjectGuid()); + return; + case GO_HOOD_TREE: + m_lOperaTreeGuidList.push_back(pGo->GetObjectGuid()); + return; default: return; @@ -290,13 +294,15 @@ void instance_karazhan::DoPrepareOperaStage(Creature* pOrganizer) for (uint8 i = 0; i < MAX_OZ_OPERA_MOBS; ++i) pOrganizer->SummonCreature(aOperaLocOz[i].uiEntry, aOperaLocOz[i].fX, aOperaLocOz[i].fY, aOperaLocOz[i].fZ, aOperaLocOz[i].fO, TEMPSUMMON_DEAD_DESPAWN, 0); DoRespawnGameObject(GO_OZ_BACKDROP, 12*HOUR); - DoRespawnGameObject(GO_OZ_HAY, 12*HOUR); + for (GuidList::const_iterator itr = m_lOperaHayGuidList.begin(); itr != m_lOperaHayGuidList.end(); ++itr) + DoRespawnGameObject(*itr, 12*HOUR); break; - case OPERA_EVENT_BIG_BAD_WOLF: + case OPERA_EVENT_RED_RIDING_HOOD: pOrganizer->SummonCreature(aOperaLocWolf.uiEntry, aOperaLocWolf.fX, aOperaLocWolf.fY, aOperaLocWolf.fZ, aOperaLocWolf.fO, TEMPSUMMON_DEAD_DESPAWN, 0); DoRespawnGameObject(GO_HOOD_BACKDROP, 12*HOUR); DoRespawnGameObject(GO_HOOD_HOUSE, 12*HOUR); - DoRespawnGameObject(GO_HOOD_TREE, 12*HOUR); + for (GuidList::const_iterator itr = m_lOperaTreeGuidList.begin(); itr != m_lOperaTreeGuidList.end(); ++itr) + DoRespawnGameObject(*itr, 12*HOUR); break; case OPERA_EVENT_ROMULO_AND_JUL: pOrganizer->SummonCreature(aOperaLocJul.uiEntry, aOperaLocJul.fX, aOperaLocJul.fY, aOperaLocJul.fZ, aOperaLocJul.fO, TEMPSUMMON_DEAD_DESPAWN, 0); diff --git a/scripts/eastern_kingdoms/karazhan/karazhan.cpp b/scripts/eastern_kingdoms/karazhan/karazhan.cpp index d17ea5965..a5b838cc0 100644 --- a/scripts/eastern_kingdoms/karazhan/karazhan.cpp +++ b/scripts/eastern_kingdoms/karazhan/karazhan.cpp @@ -56,10 +56,14 @@ enum // ToDo: it's not very clear which is the gossip sequence for event FAIL case GOSSIP_ITEM_OPERA_1 = -3532001, GOSSIP_ITEM_OPERA_2 = -3532002, + GOSSIP_ITEM_JUL_WIPE = -3532003, + GOSSIP_ITEM_WOLF_WIPE = -3532004, TEXT_ID_OPERA_1 = 8970, TEXT_ID_OPERA_2 = 8971, - TEXT_ID_OPERA_WIPE = 8975, + TEXT_ID_OPERA_WOLF_WIPE = 8975, + TEXT_ID_OPERA_OZ_WIPE = 8781, // guesswork, not confirmed + //TEXT_ID_OPERA_JUL_WIPE = ????, // Item not found in DB: "The romantic plays are really tough, but you'll do better this time. You have TALENT. Ready?" //SPELL_SPOTLIGHT = 25824, // in creature_template_addon SPELL_TUXEDO = 32616, @@ -67,10 +71,6 @@ enum NPC_SPOTLIGHT = 19525, }; -// ToDo: these may be the gossip items for raid wipe. Needs research! -//#define TEXT_ID_WIPE "The romantic plays are really tough, but you'll do better this time. You have TALENT. Ready?" -//#define GOSSIP_ITEM_WIPE "I've never been more ready." - static const DialogueEntry aIntroDialogue[] = { {SAY_BARNES_OZ_1, NPC_BARNES, 6000}, @@ -82,7 +82,7 @@ static const DialogueEntry aIntroDialogue[] = {SAY_BARNES_HOOD_2, NPC_BARNES, 10000}, {SAY_BARNES_HOOD_3, NPC_BARNES, 14000}, {SAY_BARNES_HOOD_4, NPC_BARNES, 15000}, - {OPERA_EVENT_BIG_BAD_WOLF, 0, 0}, + {OPERA_EVENT_RED_RIDING_HOOD, 0, 0}, {SAY_BARNES_RAJ_1, NPC_BARNES, 5000}, {SAY_BARNES_RAJ_2, NPC_BARNES, 7000}, {SAY_BARNES_RAJ_3, NPC_BARNES, 14000}, @@ -133,7 +133,7 @@ struct MANGOS_DLL_DECL npc_barnesAI : public npc_escortAI, private DialogueHelpe case OPERA_EVENT_WIZARD_OZ: StartNextDialogueText(SAY_BARNES_OZ_1); break; - case OPERA_EVENT_BIG_BAD_WOLF: + case OPERA_EVENT_RED_RIDING_HOOD: StartNextDialogueText(SAY_BARNES_HOOD_1); break; case OPERA_EVENT_ROMULO_AND_JUL: @@ -157,7 +157,7 @@ struct MANGOS_DLL_DECL npc_barnesAI : public npc_escortAI, private DialogueHelpe switch (iEntry) { case OPERA_EVENT_WIZARD_OZ: - case OPERA_EVENT_BIG_BAD_WOLF: + case OPERA_EVENT_RED_RIDING_HOOD: case OPERA_EVENT_ROMULO_AND_JUL: // Despawn spotlight and resume escort if (Creature* pSpotlight = m_creature->GetMap()->GetCreature(m_spotlightGuid)) @@ -196,7 +196,7 @@ bool GossipHello_npc_barnes(Player* pPlayer, Creature* pCreature) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_DOT, "[GM] Change event to EVENT_RAJ", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 5); } - pPlayer->SEND_GOSSIP_MENU(pInstance->GetData(TYPE_OPERA) == FAIL ? TEXT_ID_OPERA_1 : TEXT_ID_OPERA_WIPE, pCreature->GetObjectGuid()); + pPlayer->SEND_GOSSIP_MENU(TEXT_ID_OPERA_1, pCreature->GetObjectGuid()); return true; } @@ -233,7 +233,7 @@ bool GossipSelect_npc_barnes(Player* pPlayer, Creature* pCreature, uint32 uiSend pPlayer->CLOSE_GOSSIP_MENU(); if (ScriptedInstance* pInstance = (ScriptedInstance*)pCreature->GetInstanceData()) { - pInstance->SetData(TYPE_OPERA_PERFORMANCE, OPERA_EVENT_BIG_BAD_WOLF); + pInstance->SetData(TYPE_OPERA_PERFORMANCE, OPERA_EVENT_RED_RIDING_HOOD); outstring_log("SD2: %s manually set Opera event to EVENT_HOOD", pPlayer->GetGuidStr().c_str()); } break; diff --git a/scripts/eastern_kingdoms/karazhan/karazhan.h b/scripts/eastern_kingdoms/karazhan/karazhan.h index 9edb130b2..a3cb41470 100644 --- a/scripts/eastern_kingdoms/karazhan/karazhan.h +++ b/scripts/eastern_kingdoms/karazhan/karazhan.h @@ -76,7 +76,7 @@ enum enum OperaEvents { OPERA_EVENT_WIZARD_OZ = 1, - OPERA_EVENT_BIG_BAD_WOLF = 2, + OPERA_EVENT_RED_RIDING_HOOD = 2, OPERA_EVENT_ROMULO_AND_JUL = 3 }; @@ -124,6 +124,9 @@ class MANGOS_DLL_DECL instance_karazhan : public ScriptedInstance uint32 m_uiOperaEvent; uint32 m_uiOzDeathCount; + + GuidList m_lOperaTreeGuidList; + GuidList m_lOperaHayGuidList; }; class MANGOS_DLL_DECL npc_fiendish_portalAI : public ScriptedAI diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 4a7c20fd0..f0ff7c7dd 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2696" + #define SD2_REVISION_NR "2697" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 099990a2e..17dd052ea 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -4371,7 +4371,10 @@ INSERT INTO gossip_texts (entry,content_default,comment) VALUES INSERT INTO gossip_texts (entry,content_default,comment) VALUES (-3532000,'Teleport me to the Guardian\'s Library','berthold GOSSIP_ITEM_TELEPORT'), (-3532001,'I\'m not an actor.','barnes GOSSIP_ITEM_OPERA_1'), -(-3532002,'Ok, I\'ll give it a try, then.','barnes GOSSIP_ITEM_OPERA_2'); +(-3532002,'Ok, I\'ll give it a try, then.','barnes GOSSIP_ITEM_OPERA_2'), +(-3532003,'I\'ve never been more ready.','barnes GOSSIP_ITEM_OPERA_JULIANNE_WIPE'), +(-3532004,'The wolf\'s going down.','barnes GOSSIP_ITEM_OPERA_WOLF_WIPE'), +(-3532005,'What phat lewtz you have grandmother?','grandma GOSSIP_ITEM_GRANDMA'); -- -3 534 000 THE BATTLE OF MT. HYJAL INSERT INTO gossip_texts (entry,content_default,comment) VALUES diff --git a/sql/updates/r2697_scriptdev2.sql b/sql/updates/r2697_scriptdev2.sql new file mode 100644 index 000000000..ddafeaeac --- /dev/null +++ b/sql/updates/r2697_scriptdev2.sql @@ -0,0 +1,5 @@ +DELETE FROM gossip_texts WHERE entry IN (-3532003,-3532004,-3532005); +INSERT INTO gossip_texts (entry,content_default,comment) VALUES +(-3532003,'I\'ve never been more ready.','barnes GOSSIP_ITEM_OPERA_JULIANNE_WIPE'), +(-3532004,'The wolf\'s going down.','barnes GOSSIP_ITEM_OPERA_WOLF_WIPE'), +(-3532005,'What phat lewtz you have grandmother?','grandma GOSSIP_ITEM_GRANDMA'); From 6456c88ff8df74e3102ddcea340136810ef2d0b4 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Tue, 28 Aug 2012 02:12:07 +0200 Subject: [PATCH 0688/1172] [2698] Increase debug output for npc_anubisath_sentinel - Thanks to Jetrhogibbs for pointing to possible problems --- .../mob_anubisath_sentinel.cpp | 17 ++++++++++++----- sd2_revision_nr.h | 2 +- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/scripts/kalimdor/temple_of_ahnqiraj/mob_anubisath_sentinel.cpp b/scripts/kalimdor/temple_of_ahnqiraj/mob_anubisath_sentinel.cpp index 8d382f6ff..ab3a72dc8 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/mob_anubisath_sentinel.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/mob_anubisath_sentinel.cpp @@ -61,6 +61,16 @@ struct MANGOS_DLL_DECL npc_anubisath_sentinelAI : public ScriptedAI m_bEnraged = false; } + void GetAIInformation(ChatHandler& reader) + { + if (m_lAssistList.empty()) + reader.PSendSysMessage("Anubisath Sentinel - group not assigned, will be assigned OnAggro"); + if (m_lAssistList.size() == MAX_BUDDY) + reader.PSendSysMessage("Anubisath Sentinel - proper group found"); + else + reader.PSendSysMessage("Anubisath Sentinel - not correct number of mobs for group found. Number found %u, should be %u", m_lAssistList.size(), MAX_BUDDY); + } + void JustReachedHome() { for(GuidList::const_iterator itr = m_lAssistList.begin(); itr != m_lAssistList.end(); ++itr) @@ -146,10 +156,7 @@ struct MANGOS_DLL_DECL npc_anubisath_sentinelAI : public ScriptedAI std::list lAssistList; GetCreatureListWithEntryInGrid(lAssistList, m_creature, m_creature->GetEntry(), 80.0f); - if (lAssistList.empty()) - return; - - for(std::list::iterator iter = lAssistList.begin(); iter != lAssistList.end(); ++iter) + for (std::list::iterator iter = lAssistList.begin(); iter != lAssistList.end(); ++iter) { m_lAssistList.push_back((*iter)->GetObjectGuid()); @@ -160,7 +167,7 @@ struct MANGOS_DLL_DECL npc_anubisath_sentinelAI : public ScriptedAI } if (m_lAssistList.size() != MAX_BUDDY) - error_log("SD2: npc_anubisath_sentinel found too few/too many buddies, expected %u.", MAX_BUDDY); + error_log("SD2: npc_anubisath_sentinel for %s found too few/too many buddies, expected %u.", m_creature->GetGuidStr().c_str(), MAX_BUDDY); } void UpdateAI(const uint32 uiDiff) diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index f0ff7c7dd..d4fba59ae 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2697" + #define SD2_REVISION_NR "2698" #endif // __SD2_REVISION_NR_H__ From d106fc4339e5e6f2a2ac82541b974919378acef3 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Tue, 28 Aug 2012 02:13:07 +0200 Subject: [PATCH 0689/1172] [2699] Fix a warning for rotface (hopefully correct) --- .../icecrown_citadel/boss_rotface.cpp | 16 ++++++++-------- sd2_revision_nr.h | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_rotface.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_rotface.cpp index 069c3ced3..e4b24e461 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_rotface.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_rotface.cpp @@ -67,10 +67,12 @@ enum SPELL_RADIATING_OOZE = 69760, SPELL_BIG_OOZE_COMBINE = 69552, // periodic check SPELL_BIG_OOZE_BUFF_COMB = 69611, // periodic check - SPELL_UNSTABLE_EXPLOSION = 69839 + SPELL_UNSTABLE_EXPLOSION = 69839, + + MAX_MUTATE_INFACTION_STEPS = 5, }; -static uint32 uiMutatedInfections[5] = +static const uint32 uiMutatedInfections[MAX_MUTATE_INFACTION_STEPS] = { SPELL_MUTATED_INFECTION_1, SPELL_MUTATED_INFECTION_2, @@ -92,7 +94,6 @@ struct MANGOS_DLL_DECL boss_rotfaceAI : public ScriptedAI uint32 m_uiSlimeSprayTimer; uint32 m_uiSlimeFlowTimer; uint32 m_uiMutatedInfectionTimer; - uint32 m_uiMutatedInfectionBeforeTimer; uint32 m_uiInfectionsRate; void Reset() @@ -100,7 +101,6 @@ struct MANGOS_DLL_DECL boss_rotfaceAI : public ScriptedAI m_uiSlimeSprayTimer = urand(17000, 23000); m_uiSlimeFlowTimer = 20000; m_uiMutatedInfectionTimer = 60000; - m_uiMutatedInfectionBeforeTimer = 60000; m_uiInfectionsRate = 1; } @@ -156,15 +156,15 @@ struct MANGOS_DLL_DECL boss_rotfaceAI : public ScriptedAI // Mutated Infection - faster with time // implemented this instead of phases - if (m_uiInfectionsRate < 5) + if (m_uiInfectionsRate < MAX_MUTATE_INFACTION_STEPS) { if (m_uiMutatedInfectionTimer <= uiDiff) { - if (DoCastSpellIfCan(m_creature, uiMutatedInfections[m_uiInfectionsRate]) == CAST_OK) + if (DoCastSpellIfCan(m_creature, uiMutatedInfections[m_uiInfectionsRate], CAST_TRIGGERED) == CAST_OK) { m_creature->RemoveAurasDueToSpell(uiMutatedInfections[m_uiInfectionsRate - 1]); - m_uiMutatedInfectionBeforeTimer = - 10000; // every next 15 seconds faster - m_uiMutatedInfectionTimer = m_uiMutatedInfectionBeforeTimer; + // every next 15 seconds faster + m_uiMutatedInfectionTimer = 60000 - m_uiInfectionsRate * 15000; ++m_uiInfectionsRate; } } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index d4fba59ae..b2c19a862 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2698" + #define SD2_REVISION_NR "2699" #endif // __SD2_REVISION_NR_H__ From ffe77e48538a31445395162e3912ab5690f19caf Mon Sep 17 00:00:00 2001 From: Xfurry Date: Tue, 28 Aug 2012 20:14:21 +0300 Subject: [PATCH 0690/1172] [2700] Drop script support for Vectus - Scholomance. The boss script is already included in the latest ACID. Also the event can be handled by gameobject or spell script. --- VC100/100ScriptDev2.vcxproj | 1 - VC100/100ScriptDev2.vcxproj.filters | 3 - VC90/90ScriptDev2.vcproj | 4 - .../scholomance/boss_vectus.cpp | 104 ------------------ sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 - sql/updates/r2700_mangos.sql | 1 + system/ScriptLoader.cpp | 2 - 8 files changed, 2 insertions(+), 116 deletions(-) delete mode 100644 scripts/eastern_kingdoms/scholomance/boss_vectus.cpp create mode 100644 sql/updates/r2700_mangos.sql diff --git a/VC100/100ScriptDev2.vcxproj b/VC100/100ScriptDev2.vcxproj index 4b86f9738..f060551a1 100644 --- a/VC100/100ScriptDev2.vcxproj +++ b/VC100/100ScriptDev2.vcxproj @@ -306,7 +306,6 @@ - diff --git a/VC100/100ScriptDev2.vcxproj.filters b/VC100/100ScriptDev2.vcxproj.filters index 3552520ec..187e43315 100644 --- a/VC100/100ScriptDev2.vcxproj.filters +++ b/VC100/100ScriptDev2.vcxproj.filters @@ -588,9 +588,6 @@ scripts\eastern_kingdoms\scholomance - - scripts\eastern_kingdoms\scholomance - scripts\eastern_kingdoms\scholomance diff --git a/VC90/90ScriptDev2.vcproj b/VC90/90ScriptDev2.vcproj index 4a2e7c796..2e580761a 100644 --- a/VC90/90ScriptDev2.vcproj +++ b/VC90/90ScriptDev2.vcproj @@ -850,10 +850,6 @@ RelativePath="..\scripts\eastern_kingdoms\scholomance\boss_jandice_barov.cpp" > - - diff --git a/scripts/eastern_kingdoms/scholomance/boss_vectus.cpp b/scripts/eastern_kingdoms/scholomance/boss_vectus.cpp deleted file mode 100644 index cd236d22f..000000000 --- a/scripts/eastern_kingdoms/scholomance/boss_vectus.cpp +++ /dev/null @@ -1,104 +0,0 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 - * 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_Vectus -SD%Complete: 60 -SDComment: event not implemented -SDCategory: Scholomance -EndScriptData */ - -#include "precompiled.h" - -enum -{ - //EMOTE_GENERIC_FRENZY_KILL = -1000001, - - SPELL_FLAMESTRIKE = 18399, - SPELL_BLAST_WAVE = 16046 - //SPELL_FRENZY = 28371 //spell is used by Gluth, confirm this is for this boss too - //SPELL_FIRE_SHIELD = 0 //should supposedly have some aura, but proper spell not found -}; - -struct MANGOS_DLL_DECL boss_vectusAI : public ScriptedAI -{ - boss_vectusAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} - - uint32 m_uiFlameStrike_Timer; - uint32 m_uiBlastWave_Timer; - uint32 m_uiFrenzy_Timer; - - void Reset() - { - m_uiFlameStrike_Timer = 2000; - m_uiBlastWave_Timer = 14000; - m_uiFrenzy_Timer = 0; - } - - void UpdateAI(const uint32 uiDiff) - { - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - //m_uiFlameStrike_Timer - if (m_uiFlameStrike_Timer < uiDiff) - { - DoCastSpellIfCan(m_creature, SPELL_FLAMESTRIKE); - m_uiFlameStrike_Timer = 30000; - } - else - m_uiFlameStrike_Timer -= uiDiff; - - //BlastWave_Timer - if (m_uiBlastWave_Timer < uiDiff) - { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_BLAST_WAVE); - m_uiBlastWave_Timer = 12000; - } - else - m_uiBlastWave_Timer -= uiDiff; - - //Frenzy_Timer - /*if (m_creature->GetHealthPercent() < 25.0f) - { - if (m_uiFrenzy_Timer < uiDiff) - { - DoCastSpellIfCan(m_creature, SPELL_FRENZY); - DoScriptText(EMOTE_GENERIC_FRENZY_KILL, m_creature); - m_uiFrenzy_Timer = 24000; - } - else - m_uiFrenzy_Timer -= uiDiff; - }*/ - - DoMeleeAttackIfReady(); - } -}; - -CreatureAI* GetAI_boss_vectus(Creature* pCreature) -{ - return new boss_vectusAI(pCreature); -} - -void AddSC_boss_vectus() -{ - Script* pNewScript; - - pNewScript = new Script; - pNewScript->Name = "boss_vectus"; - pNewScript->GetAI = &GetAI_boss_vectus; - pNewScript->RegisterSelf(); -} diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index b2c19a862..49a8c5971 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2699" + #define SD2_REVISION_NR "2700" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 10fc67e96..f585cba6d 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -927,7 +927,6 @@ UPDATE creature_template SET ScriptName='boss_headless_horseman' WHERE entry=236 /* SCHOLOMANCE */ UPDATE instance_template SET ScriptName='instance_scholomance' WHERE map=289; UPDATE creature_template SET ScriptName='boss_darkmaster_gandling' WHERE entry=1853; -UPDATE creature_template SET ScriptName='boss_vectus' WHERE entry=10432; UPDATE creature_template SET ScriptName='boss_jandice_barov' WHERE entry=10503; DELETE FROM scripted_event_id WHERE id IN (5618, 5619, 5620, 5621, 5622, 5623); INSERT INTO scripted_event_id VALUES diff --git a/sql/updates/r2700_mangos.sql b/sql/updates/r2700_mangos.sql new file mode 100644 index 000000000..1acb18d33 --- /dev/null +++ b/sql/updates/r2700_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='' WHERE entry=10432; diff --git a/system/ScriptLoader.cpp b/system/ScriptLoader.cpp index b88c8dcd0..c6b699dd1 100644 --- a/system/ScriptLoader.cpp +++ b/system/ScriptLoader.cpp @@ -94,7 +94,6 @@ extern void AddSC_boss_headless_horseman(); extern void AddSC_instance_scarlet_monastery(); extern void AddSC_boss_darkmaster_gandling(); // scholomance extern void AddSC_boss_jandicebarov(); -extern void AddSC_boss_vectus(); extern void AddSC_instance_scholomance(); extern void AddSC_boss_hummel(); // shadowfang_keep extern void AddSC_shadowfang_keep(); @@ -555,7 +554,6 @@ void AddScripts() AddSC_instance_scarlet_monastery(); AddSC_boss_darkmaster_gandling(); // scholomance AddSC_boss_jandicebarov(); - AddSC_boss_vectus(); AddSC_instance_scholomance(); AddSC_boss_hummel(); // shadowfang_keep AddSC_shadowfang_keep(); From cbf4402565e353579eab9d240c28582191ff1b2e Mon Sep 17 00:00:00 2001 From: Reamer Date: Thu, 30 Aug 2012 01:54:15 +0300 Subject: [PATCH 0691/1172] [2701] Cleanup and improve the Opera event bosses - Karazhan --- .../karazhan/bosses_opera.cpp | 1618 ++++++++--------- .../karazhan/instance_karazhan.cpp | 33 +- scripts/eastern_kingdoms/karazhan/karazhan.h | 9 +- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 - sql/updates/r2701_mangos.sql | 1 + 6 files changed, 780 insertions(+), 884 deletions(-) create mode 100644 sql/updates/r2701_mangos.sql diff --git a/scripts/eastern_kingdoms/karazhan/bosses_opera.cpp b/scripts/eastern_kingdoms/karazhan/bosses_opera.cpp index 0003d4b36..74b62997d 100644 --- a/scripts/eastern_kingdoms/karazhan/bosses_opera.cpp +++ b/scripts/eastern_kingdoms/karazhan/bosses_opera.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: Bosses_Opera -SD%Complete: 90 -SDComment: Oz, Hood, and RAJ event implemented. RAJ event requires more testing. +SD%Complete: 95 +SDComment: Oz, Hood, and RAJ event implemented. Spell timers may need adjustments. SDCategory: Karazhan EndScriptData */ @@ -28,76 +28,64 @@ EndScriptData */ /*** OPERA WIZARD OF OZ EVENT *****/ /*********************************/ -#define SAY_DOROTHEE_DEATH -1532025 -#define SAY_DOROTHEE_SUMMON -1532026 -#define SAY_DOROTHEE_TITO_DEATH -1532027 -#define SAY_DOROTHEE_AGGRO -1532028 - -#define SAY_ROAR_AGGRO -1532029 -#define SAY_ROAR_DEATH -1532030 -#define SAY_ROAR_SLAY -1532031 - -#define SAY_STRAWMAN_AGGRO -1532032 -#define SAY_STRAWMAN_DEATH -1532033 -#define SAY_STRAWMAN_SLAY -1532034 - -#define SAY_TINHEAD_AGGRO -1532035 -#define SAY_TINHEAD_DEATH -1532036 -#define SAY_TINHEAD_SLAY -1532037 -#define EMOTE_RUST -1532038 - -#define SAY_CRONE_AGGRO -1532039 -#define SAY_CRONE_AGGRO2 -1532040 -#define SAY_CRONE_DEATH -1532041 -#define SAY_CRONE_SLAY -1532042 - -/**** Spells ****/ -// Dorothee -#define SPELL_WATERBOLT 31012 -#define SPELL_SCREAM 31013 -#define SPELL_SUMMONTITO 31014 - -// Tito -#define SPELL_YIPPING 31015 - -// Strawman -#define SPELL_BRAIN_BASH 31046 -#define SPELL_BRAIN_WIPE 31069 -#define SPELL_BURNING_STRAW 31075 - -// Tinhead -#define SPELL_CLEAVE 31043 -#define SPELL_RUST 31086 - -// Roar -#define SPELL_MANGLE 31041 -#define SPELL_SHRED 31042 -#define SPELL_FRIGHTENED_SCREAM 31013 - -// Crone -#define SPELL_CHAIN_LIGHTNING 32337 - -// Cyclone -#define SPELL_KNOCKBACK 32334 -#define SPELL_CYCLONE_VISUAL 32332 - -/** Creature Entries **/ -#define CREATURE_TITO 17548 -#define CREATURE_CYCLONE 18412 -#define CREATURE_CRONE 18168 - -void SummonCroneIfReady(ScriptedInstance* pInstance, Creature* pCreature) +enum { - pInstance->SetData(DATA_OPERA_OZ_DEATHCOUNT, SPECIAL); // Increment DeathCount - - if (pInstance->GetData(DATA_OPERA_OZ_DEATHCOUNT) == 4) - { - if (Creature* pCrone = pCreature->SummonCreature(CREATURE_CRONE, -10891.96f, -1755.95f, pCreature->GetPositionZ(), 4.64f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, HOUR*2*IN_MILLISECONDS)) - { - if (pCreature->getVictim()) - pCrone->AI()->AttackStart(pCreature->getVictim()); - } - } + SAY_DOROTHEE_DEATH = -1532025, + SAY_DOROTHEE_SUMMON = -1532026, + SAY_DOROTHEE_TITO_DEATH = -1532027, + SAY_DOROTHEE_AGGRO = -1532028, + + SAY_ROAR_AGGRO = -1532029, + SAY_ROAR_DEATH = -1532030, + SAY_ROAR_SLAY = -1532031, + + SAY_STRAWMAN_AGGRO = -1532032, + SAY_STRAWMAN_DEATH = -1532033, + SAY_STRAWMAN_SLAY = -1532034, + + SAY_TINHEAD_AGGRO = -1532035, + SAY_TINHEAD_DEATH = -1532036, + SAY_TINHEAD_SLAY = -1532037, + EMOTE_RUST = -1532038, + + SAY_CRONE_AGGRO = -1532039, + SAY_CRONE_AGGRO2 = -1532040, + SAY_CRONE_DEATH = -1532041, + SAY_CRONE_SLAY = -1532042, + + /**** Spells ****/ + // Dorothee + SPELL_WATERBOLT = 31012, + SPELL_SCREAM = 31013, + SPELL_SUMMONTITO = 31014, + + // Tito + SPELL_YIPPING = 31015, + + // Strawman + SPELL_BRAIN_BASH = 31046, + SPELL_BRAIN_WIPE = 31069, + SPELL_CONFLAG_PROC = 31073, // procs 31075 on fire damage + + // Tinhead + SPELL_CLEAVE = 31043, + SPELL_RUST = 31086, + + // Roar + SPELL_MANGLE = 31041, + SPELL_SHRED = 31042, + SPELL_FRIGHTENED_SCREAM = 31013, + + // Crone + SPELL_CHAIN_LIGHTNING = 32337, + + // Cyclone + SPELL_CYCLONE = 32334, + SPELL_CYCLONE_VISUAL = 32332, + + /** Creature Entries **/ + NPC_TITO = 17548, + NPC_CYCLONE = 18412, }; struct MANGOS_DLL_DECL boss_dorotheeAI : public ScriptedAI @@ -110,163 +98,163 @@ struct MANGOS_DLL_DECL boss_dorotheeAI : public ScriptedAI ScriptedInstance* m_pInstance; - uint32 AggroTimer; + uint32 m_uiAggroTimer; + uint32 m_uiIntroTimer; - uint32 WaterBoltTimer; - uint32 FearTimer; - uint32 SummonTitoTimer; + uint32 m_uiWaterBoltTimer; + uint32 m_uiFearTimer; + uint32 m_uiSummonTitoTimer; - bool SummonedTito; - bool TitoDied; + bool m_bTitoDied; void Reset() { - AggroTimer = 500; + m_uiIntroTimer = 2000; + m_uiAggroTimer = 12000; - WaterBoltTimer = 5000; - FearTimer = 15000; - SummonTitoTimer = 47500; + m_uiWaterBoltTimer = 5000; + m_uiFearTimer = 15000; + m_uiSummonTitoTimer = 47500; - SummonedTito = false; - TitoDied = false; - } - - void Aggro(Unit* who) - { - DoScriptText(SAY_DOROTHEE_AGGRO, m_creature); + m_bTitoDied = false; } void JustReachedHome() { + if (m_pInstance) + m_pInstance->SetData(TYPE_OPERA, FAIL); + m_creature->ForcedDespawn(); } - void SummonTito(); // See below - - void JustDied(Unit* killer) + void JustDied(Unit* pKiller) { DoScriptText(SAY_DOROTHEE_DEATH, m_creature); - - if (m_pInstance) - SummonCroneIfReady(m_pInstance, m_creature); } - void AttackStart(Unit* who) + void MoveInLineOfSight(Unit* pWho) { - if (m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE)) + // Allow a short delay before attacking + if (m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE)) return; - ScriptedAI::AttackStart(who); + ScriptedAI::MoveInLineOfSight(pWho); } - void MoveInLineOfSight(Unit* who) + void JustSummoned(Creature* pSummoned) { - if (m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE)) - return; + if (m_creature->getVictim()) + pSummoned->AI()->AttackStart(m_creature->getVictim()); + } - ScriptedAI::MoveInLineOfSight(who); + void SummonedCreatureJustDied(Creature* pSummoned) + { + if (pSummoned->GetEntry() == NPC_TITO) + { + DoScriptText(SAY_DOROTHEE_TITO_DEATH, m_creature); + m_bTitoDied = true; + } } - void UpdateAI(const uint32 diff) + void UpdateAI(const uint32 uiDiff) { - if (AggroTimer) + if (m_uiIntroTimer) { - if (AggroTimer <= diff) + if (m_uiIntroTimer <= uiDiff) { - m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - AggroTimer = 0; - }else AggroTimer -= diff; + DoScriptText(SAY_DOROTHEE_AGGRO, m_creature); + m_uiIntroTimer = 0; + } + else + m_uiIntroTimer -= uiDiff; + } + + if (m_uiAggroTimer) + { + if (m_uiAggroTimer <= uiDiff) + { + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE); + m_creature->SetInCombatWithZone(); + m_uiAggroTimer = 0; + } + else + m_uiAggroTimer -= uiDiff; } if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - if (WaterBoltTimer < diff) + if (m_uiWaterBoltTimer < uiDiff) { if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) - DoCastSpellIfCan(pTarget, SPELL_WATERBOLT); - - WaterBoltTimer = TitoDied ? 1500 : 5000; - }else WaterBoltTimer -= diff; + { + if (DoCastSpellIfCan(pTarget, SPELL_WATERBOLT) == CAST_OK) + m_uiWaterBoltTimer = m_bTitoDied ? 1500 : 5000; + } + } + else + m_uiWaterBoltTimer -= uiDiff; - if (FearTimer < diff) + if (m_uiFearTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_SCREAM); - FearTimer = 30000; - }else FearTimer -= diff; + if (DoCastSpellIfCan(m_creature, SPELL_SCREAM) == CAST_OK) + m_uiFearTimer = 30000; + } + else + m_uiFearTimer -= uiDiff; - if (!SummonedTito) + if (m_uiSummonTitoTimer) { - if (SummonTitoTimer < diff) - SummonTito(); - else SummonTitoTimer -= diff; + if (m_uiSummonTitoTimer <= uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_SUMMONTITO) == CAST_OK) + { + DoScriptText(SAY_DOROTHEE_SUMMON, m_creature); + m_uiSummonTitoTimer = 0; + } + } + else + m_uiSummonTitoTimer -= uiDiff; } DoMeleeAttackIfReady(); } }; +// ToDo: move to eventAI!!! struct MANGOS_DLL_DECL mob_titoAI : public ScriptedAI { - mob_titoAI(Creature* pCreature) : ScriptedAI(pCreature) - { - Reset(); - } + mob_titoAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } - ObjectGuid m_dorotheeGuid; - uint32 YipTimer; + uint32 m_uiYipTimer; void Reset() { - YipTimer = 10000; + m_uiYipTimer = 10000; } - void JustDied(Unit* killer) + void JustReachedHome() { - if (m_dorotheeGuid) - { - Creature* Dorothee = m_creature->GetMap()->GetCreature(m_dorotheeGuid); - if (Dorothee && Dorothee->isAlive()) - { - if (boss_dorotheeAI* pDoroAI = dynamic_cast(Dorothee->AI())) - pDoroAI->TitoDied = true; - - DoScriptText(SAY_DOROTHEE_TITO_DEATH, Dorothee); - } - } + m_creature->ForcedDespawn(); } - void UpdateAI(const uint32 diff) + void UpdateAI(const uint32 uiDiff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - if (YipTimer < diff) + if (m_uiYipTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_YIPPING); - YipTimer = 10000; - }else YipTimer -= diff; + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_YIPPING) == CAST_OK) + m_uiYipTimer = 10000; + } + else + m_uiYipTimer -= uiDiff; DoMeleeAttackIfReady(); } }; -void boss_dorotheeAI::SummonTito() -{ - if (Creature* pTito = m_creature->SummonCreature(CREATURE_TITO, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000)) - { - DoScriptText(SAY_DOROTHEE_SUMMON, m_creature); - - if (mob_titoAI* pTitoAI = dynamic_cast(pTito->AI())) - pTitoAI->m_dorotheeGuid = m_creature->GetObjectGuid(); - - pTito->AI()->AttackStart(m_creature->getVictim()); - - SummonedTito = true; - TitoDied = false; - } -} - struct MANGOS_DLL_DECL boss_strawmanAI : public ScriptedAI { boss_strawmanAI(Creature* pCreature) : ScriptedAI(pCreature) @@ -277,96 +265,92 @@ struct MANGOS_DLL_DECL boss_strawmanAI : public ScriptedAI ScriptedInstance* m_pInstance; - uint32 AggroTimer; - uint32 BrainBashTimer; - uint32 BrainWipeTimer; + uint32 m_uiAggroTimer; + uint32 m_uiBrainBashTimer; + uint32 m_uiBrainWipeTimer; void Reset() { - AggroTimer = 13000; - BrainBashTimer = 5000; - BrainWipeTimer = 7000; + m_uiAggroTimer = 27000; + m_uiBrainBashTimer = 5000; + m_uiBrainWipeTimer = 7000; } - void AttackStart(Unit* who) + void MoveInLineOfSight(Unit* pWho) { - if (m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE)) + if (m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE)) return; - ScriptedAI::AttackStart(who); + ScriptedAI::MoveInLineOfSight(pWho); } - void MoveInLineOfSight(Unit* who) + void AttackStart(Unit* pWho) { - if (m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE)) + if (m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE)) return; - ScriptedAI::MoveInLineOfSight(who); + ScriptedAI::AttackStart(pWho); } - void Aggro(Unit* who) + void Aggro(Unit* pWho) { + DoCastSpellIfCan(m_creature, SPELL_CONFLAG_PROC); DoScriptText(SAY_STRAWMAN_AGGRO, m_creature); } void JustReachedHome() { - m_creature->ForcedDespawn(); - } - - void SpellHit(Unit* caster, const SpellEntry *Spell) - { - if ((Spell->SchoolMask == SPELL_SCHOOL_MASK_FIRE) && !urand(0, 1)) - { - /* - if (not direct damage(aoe,dot)) - return; - */ + if (m_pInstance) + m_pInstance->SetData(TYPE_OPERA, FAIL); - DoCastSpellIfCan(m_creature, SPELL_BURNING_STRAW, true); - } + m_creature->ForcedDespawn(); } - void JustDied(Unit* killer) + void JustDied(Unit* pKiller) { DoScriptText(SAY_STRAWMAN_DEATH, m_creature); - - if (m_pInstance) - SummonCroneIfReady(m_pInstance, m_creature); } - void KilledUnit(Unit* victim) + void KilledUnit(Unit* pVictim) { DoScriptText(SAY_STRAWMAN_SLAY, m_creature); } - void UpdateAI(const uint32 diff) + void UpdateAI(const uint32 uiDiff) { - if (AggroTimer) + if (m_uiAggroTimer) { - if (AggroTimer <= diff) + if (m_uiAggroTimer <= uiDiff) { - m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - AggroTimer = 0; - }else AggroTimer -= diff; + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE); + m_creature->SetInCombatWithZone(); + m_uiAggroTimer = 0; + } + else + m_uiAggroTimer -= uiDiff; } if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - if (BrainBashTimer < diff) + if (m_uiBrainBashTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_BRAIN_BASH); - BrainBashTimer = 15000; - }else BrainBashTimer -= diff; + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_BRAIN_BASH) == CAST_OK) + m_uiBrainBashTimer = 15000; + } + else + m_uiBrainBashTimer -= uiDiff; - if (BrainWipeTimer < diff) + if (m_uiBrainWipeTimer < uiDiff) { if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) - DoCastSpellIfCan(pTarget, SPELL_BRAIN_WIPE); - - BrainWipeTimer = 20000; - }else BrainWipeTimer -= diff; + { + if (DoCastSpellIfCan(pTarget, SPELL_BRAIN_WIPE) == CAST_OK) + m_uiBrainWipeTimer = 20000; + } + } + else + m_uiBrainWipeTimer -= uiDiff; DoMeleeAttackIfReady(); } @@ -382,93 +366,91 @@ struct MANGOS_DLL_DECL boss_tinheadAI : public ScriptedAI ScriptedInstance* m_pInstance; - uint32 AggroTimer; - uint32 CleaveTimer; - uint32 RustTimer; - - uint8 RustCount; + uint32 m_uiAggroTimer; + uint32 m_uiCleaveTimer; + uint32 m_uiRustTimer; void Reset() { - AggroTimer = 15000; - CleaveTimer = 5000; - RustTimer = 30000; - - RustCount = 0; + m_uiAggroTimer = 37000; + m_uiCleaveTimer = 5000; + m_uiRustTimer = 30000; } - void Aggro(Unit* who) + void Aggro(Unit* pWho) { DoScriptText(SAY_TINHEAD_AGGRO, m_creature); } void JustReachedHome() { + if (m_pInstance) + m_pInstance->SetData(TYPE_OPERA, FAIL); + m_creature->ForcedDespawn(); } - void AttackStart(Unit* who) + void MoveInLineOfSight(Unit* pWho) { - if (m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE)) + if (m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE)) return; - ScriptedAI::AttackStart(who); + ScriptedAI::MoveInLineOfSight(pWho); } - void MoveInLineOfSight(Unit* who) + void AttackStart(Unit* pWho) { - if (m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE)) + if (m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE)) return; - ScriptedAI::MoveInLineOfSight(who); + ScriptedAI::AttackStart(pWho); } - void JustDied(Unit* killer) + void JustDied(Unit* pKiller) { DoScriptText(SAY_TINHEAD_DEATH, m_creature); - - if (m_pInstance) - SummonCroneIfReady(m_pInstance, m_creature); } - void KilledUnit(Unit* victim) + void KilledUnit(Unit* pVictim) { DoScriptText(SAY_TINHEAD_SLAY, m_creature); } - void UpdateAI(const uint32 diff) + void UpdateAI(const uint32 uiDiff) { - if (AggroTimer) + if (m_uiAggroTimer) { - if (AggroTimer <= diff) + if (m_uiAggroTimer <= uiDiff) { - m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - AggroTimer = 0; - }else AggroTimer -= diff; + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE); + m_creature->SetInCombatWithZone(); + m_uiAggroTimer = 0; + } + else + m_uiAggroTimer -= uiDiff; } if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - if (CleaveTimer < diff) + if (m_uiCleaveTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_CLEAVE); - CleaveTimer = 5000; - }else CleaveTimer -= diff; + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_CLEAVE) == CAST_OK) + m_uiCleaveTimer = 5000; + } + else + m_uiCleaveTimer -= uiDiff; - if (RustCount < 8) + if (m_uiRustTimer < uiDiff) { - if (RustTimer < diff) + if (DoCastSpellIfCan(m_creature, SPELL_RUST) == CAST_OK) { - if (DoCastSpellIfCan(m_creature, SPELL_RUST) == CAST_OK) - { - ++RustCount; - - DoScriptText(EMOTE_RUST, m_creature); - RustTimer = 6000; - } - }else RustTimer -= diff; + DoScriptText(EMOTE_RUST, m_creature); + m_uiRustTimer = 6000; + } } + else + m_uiRustTimer -= uiDiff; DoMeleeAttackIfReady(); } @@ -484,94 +466,105 @@ struct MANGOS_DLL_DECL boss_roarAI : public ScriptedAI ScriptedInstance* m_pInstance; - uint32 AggroTimer; - uint32 MangleTimer; - uint32 ShredTimer; - uint32 ScreamTimer; + uint32 m_uiAggroTimer; + uint32 m_uiMangleTimer; + uint32 m_uiShredTimer; + uint32 m_uiScreamTimer; void Reset() { - AggroTimer = 20000; - MangleTimer = 5000; - ShredTimer = 10000; - ScreamTimer = 15000; + m_uiAggroTimer = 17000; + m_uiMangleTimer = 5000; + m_uiShredTimer = 10000; + m_uiScreamTimer = 15000; } - void MoveInLineOfSight(Unit* who) + void MoveInLineOfSight(Unit* pWho) { - if (m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE)) + if (m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE)) return; - ScriptedAI::MoveInLineOfSight(who); + ScriptedAI::MoveInLineOfSight(pWho); } - void AttackStart(Unit* who) + void AttackStart(Unit* pWho) { - if (m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE)) + if (m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE)) return; - ScriptedAI::AttackStart(who); + ScriptedAI::AttackStart(pWho); } - void Aggro(Unit* who) + void Aggro(Unit* pWho) { DoScriptText(SAY_ROAR_AGGRO, m_creature); } void JustReachedHome() { + if (m_pInstance) + m_pInstance->SetData(TYPE_OPERA, FAIL); + m_creature->ForcedDespawn(); } - void JustDied(Unit* killer) + void JustDied(Unit* pKiller) { DoScriptText(SAY_ROAR_DEATH, m_creature); - - if (m_pInstance) - SummonCroneIfReady(m_pInstance, m_creature); } - void KilledUnit(Unit* victim) + void KilledUnit(Unit* pVictim) { DoScriptText(SAY_ROAR_SLAY, m_creature); } - void UpdateAI(const uint32 diff) + void UpdateAI(const uint32 uiDiff) { - if (AggroTimer) + if (m_uiAggroTimer) { - if (AggroTimer <= diff) + if (m_uiAggroTimer <= uiDiff) { - m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - AggroTimer = 0; - }else AggroTimer -= diff; + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE); + m_creature->SetInCombatWithZone(); + m_uiAggroTimer = 0; + } + else + m_uiAggroTimer -= uiDiff; } if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - if (MangleTimer < diff) + if (m_uiMangleTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_MANGLE); - MangleTimer = urand(5000, 8000); - }else MangleTimer -= diff; + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_MANGLE) == CAST_OK) + m_uiMangleTimer = urand(5000, 8000); + } + else + m_uiMangleTimer -= uiDiff; - if (ShredTimer < diff) + if (m_uiShredTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_SHRED); - ShredTimer = urand(10000, 15000); - }else ShredTimer -= diff; + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_SHRED) == CAST_OK) + m_uiShredTimer = urand(10000, 15000); + } + else + m_uiShredTimer -= uiDiff; - if (ScreamTimer < diff) + if (m_uiScreamTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_FRIGHTENED_SCREAM); - ScreamTimer = urand(20000, 30000); - }else ScreamTimer -= diff; + if (DoCastSpellIfCan(m_creature, SPELL_FRIGHTENED_SCREAM) == CAST_OK) + m_uiScreamTimer = urand(20000, 30000); + } + else + m_uiScreamTimer -= uiDiff; DoMeleeAttackIfReady(); } }; +static const float afCycloneSpawnLoc[4] = {-10907.68f, -1778.651f, 90.56018f, 0.61f}; + struct MANGOS_DLL_DECL boss_croneAI : public ScriptedAI { boss_croneAI(Creature* pCreature) : ScriptedAI(pCreature) @@ -582,28 +575,30 @@ struct MANGOS_DLL_DECL boss_croneAI : public ScriptedAI ScriptedInstance* m_pInstance; - uint32 CycloneTimer; - uint32 ChainLightningTimer; + uint32 m_uiChainLightningTimer; void Reset() { - CycloneTimer = 30000; - ChainLightningTimer = 10000; + m_uiChainLightningTimer = 10000; } void JustReachedHome() { + if (m_pInstance) + m_pInstance->SetData(TYPE_OPERA, FAIL); + m_creature->ForcedDespawn(); } - void Aggro(Unit* who) + void Aggro(Unit* pWho) { DoScriptText(urand(0, 1) ? SAY_CRONE_AGGRO : SAY_CRONE_AGGRO2, m_creature); - m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + // spawn the cyclone on aggro + m_creature->SummonCreature(NPC_CYCLONE, afCycloneSpawnLoc[0], afCycloneSpawnLoc[1], afCycloneSpawnLoc[2], afCycloneSpawnLoc[3], TEMPSUMMON_DEAD_DESPAWN, 0); } - void JustDied(Unit* killer) + void JustDied(Unit* pKiller) { DoScriptText(SAY_CRONE_DEATH, m_creature); @@ -611,65 +606,33 @@ struct MANGOS_DLL_DECL boss_croneAI : public ScriptedAI m_pInstance->SetData(TYPE_OPERA, DONE); } - void UpdateAI(const uint32 diff) + void JustSummoned(Creature* pSummoned) + { + pSummoned->CastSpell(pSummoned, SPELL_CYCLONE, true); + pSummoned->CastSpell(pSummoned, SPELL_CYCLONE_VISUAL, true); + pSummoned->GetMotionMaster()->MoveRandomAroundPoint(m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), 15.0f); + } + + void UpdateAI(const uint32 uiDiff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - if (m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE)) - m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - - if (CycloneTimer < diff) - { - Creature* Cyclone = DoSpawnCreature(CREATURE_CYCLONE, rand()%10, rand()%10, 0, 0, TEMPSUMMON_TIMED_DESPAWN, 15000); - if (Cyclone) - Cyclone->CastSpell(Cyclone, SPELL_CYCLONE_VISUAL, true); - CycloneTimer = 30000; - }else CycloneTimer -= diff; - - if (ChainLightningTimer < diff) + if (m_uiChainLightningTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_CHAIN_LIGHTNING); - ChainLightningTimer = 15000; - }else ChainLightningTimer -= diff; + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, SPELL_CHAIN_LIGHTNING) == CAST_OK) + m_uiChainLightningTimer = 15000; + } + } + else + m_uiChainLightningTimer -= uiDiff; DoMeleeAttackIfReady(); } }; -struct MANGOS_DLL_DECL mob_cycloneAI : public ScriptedAI -{ - mob_cycloneAI(Creature* pCreature) : ScriptedAI(pCreature) - { - Reset(); - } - - uint32 MoveTimer; - - void Reset() - { - MoveTimer = 1000; - } - - void MoveInLineOfSight(Unit* who) { } - - void UpdateAI(const uint32 diff) - { - if (!m_creature->HasAura(SPELL_KNOCKBACK, EFFECT_INDEX_0)) - DoCastSpellIfCan(m_creature, SPELL_KNOCKBACK, CAST_TRIGGERED); - - if (MoveTimer < diff) - { - float x,y,z; - m_creature->GetPosition(x,y,z); - float PosX, PosY, PosZ; - m_creature->GetRandomPoint(x,y,z,10, PosX, PosY, PosZ); - m_creature->GetMotionMaster()->MovePoint(0, PosX, PosY, PosZ); - MoveTimer = urand(5000, 8000); - }else MoveTimer -= diff; - } -}; - CreatureAI* GetAI_boss_dorothee(Creature* pCreature) { return new boss_dorotheeAI(pCreature); @@ -700,35 +663,34 @@ CreatureAI* GetAI_mob_tito(Creature* pCreature) return new mob_titoAI(pCreature); } -CreatureAI* GetAI_mob_cyclone(Creature* pCreature) -{ - return new mob_cycloneAI(pCreature); -} - /**************************************/ /**** Opera Red Riding Hood Event ****/ /************************************/ -/**** Yells for the Wolf ****/ -#define SAY_WOLF_AGGRO -1532043 -#define SAY_WOLF_SLAY -1532044 -#define SAY_WOLF_HOOD -1532045 -#define SOUND_WOLF_DEATH 9275 //Only sound on death, no text. - -/**** Spells For The Wolf ****/ -#define SPELL_LITTLE_RED_RIDING_HOOD 30768 -#define SPELL_TERRIFYING_HOWL 30752 -#define SPELL_WIDE_SWIPE 30761 - -#define GOSSIP_GRANDMA "What phat lewtz you have grandmother?" - -/**** The Wolf's Entry ****/ -#define CREATURE_BIG_BAD_WOLF 17521 +enum +{ + /**** Yells for the Wolf ****/ + SAY_WOLF_AGGRO = -1532043, + SAY_WOLF_SLAY = -1532044, + SAY_WOLF_HOOD = -1532045, + SOUND_WOLF_DEATH = 9275, // Only sound on death, no text. + + /**** Spells For The Wolf ****/ + SPELL_PICK_RED_RIDING_HOOD = 30769, // targeting spell - triggers 30768 + SPELL_TERRIFYING_HOWL = 30752, + SPELL_WIDE_SWIPE = 30761, + + GOSSIP_ITEM_GRANDMA = -3532005, + TEXT_ID_GRANDMA = 8990, + + /**** The Wolf's Entry ****/ + NPC_BIG_BAD_WOLF = 17521 +}; bool GossipHello_npc_grandmother(Player* pPlayer, Creature* pCreature) { - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_GRANDMA, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF); - pPlayer->SEND_GOSSIP_MENU(8990, pCreature->GetObjectGuid()); + pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_GRANDMA, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF); + pPlayer->SEND_GOSSIP_MENU(TEXT_ID_GRANDMA, pCreature->GetObjectGuid()); return true; } @@ -737,7 +699,7 @@ bool GossipSelect_npc_grandmother(Player* pPlayer, Creature* pCreature, uint32 u { if (uiAction == GOSSIP_ACTION_INFO_DEF) { - if (Creature* pBigBadWolf = pCreature->SummonCreature(CREATURE_BIG_BAD_WOLF, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, HOUR*2*IN_MILLISECONDS)) + if (Creature* pBigBadWolf = pCreature->SummonCreature(NPC_BIG_BAD_WOLF, 0, 0, 0, 0, TEMPSUMMON_DEAD_DESPAWN, 0)) pBigBadWolf->AI()->AttackStart(pPlayer); pCreature->ForcedDespawn(); @@ -756,38 +718,31 @@ struct MANGOS_DLL_DECL boss_bigbadwolfAI : public ScriptedAI ScriptedInstance* m_pInstance; - uint32 ChaseTimer; - uint32 FearTimer; - uint32 SwipeTimer; - - ObjectGuid m_hoodGuid; - float TempThreat; - - bool IsChasing; + uint32 m_uiRedRidingHoodTimer; + uint32 m_uiFearTimer; + uint32 m_uiSwipeTimer; void Reset() { - ChaseTimer = 30000; - FearTimer = urand(25000, 35000); - SwipeTimer = 5000; - - m_hoodGuid.Clear(); - TempThreat = 0; - - IsChasing = false; + m_uiRedRidingHoodTimer = 30000; + m_uiFearTimer = urand(25000, 35000); + m_uiSwipeTimer = 5000; } - void Aggro(Unit* who) + void Aggro(Unit* pWho) { DoScriptText(SAY_WOLF_AGGRO, m_creature); } void JustReachedHome() { + if (m_pInstance) + m_pInstance->SetData(TYPE_OPERA, FAIL); + m_creature->ForcedDespawn(); } - void JustDied(Unit* killer) + void JustDied(Unit* pKiller) { DoPlaySoundToSet(m_creature, SOUND_WOLF_DEATH); @@ -795,65 +750,39 @@ struct MANGOS_DLL_DECL boss_bigbadwolfAI : public ScriptedAI m_pInstance->SetData(TYPE_OPERA, DONE); } - void UpdateAI(const uint32 diff) + void UpdateAI(const uint32 uiDiff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - DoMeleeAttackIfReady(); - - if (ChaseTimer < diff) + if (m_uiRedRidingHoodTimer < uiDiff) { - if (!IsChasing) + if (DoCastSpellIfCan(m_creature, SPELL_PICK_RED_RIDING_HOOD) == CAST_OK) { - if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0, SPELL_LITTLE_RED_RIDING_HOOD, SELECT_FLAG_PLAYER)) - { - DoScriptText(SAY_WOLF_HOOD, m_creature); - DoCastSpellIfCan(target, SPELL_LITTLE_RED_RIDING_HOOD, CAST_TRIGGERED); - - TempThreat = m_creature->getThreatManager().getThreat(target); - if (TempThreat) - m_creature->getThreatManager().modifyThreatPercent(target, -100); - - m_hoodGuid = target->GetObjectGuid(); - m_creature->AddThreat(target, 1000000.0f); - ChaseTimer = 20000; - IsChasing = true; - } + DoScriptText(SAY_WOLF_HOOD, m_creature); + m_uiRedRidingHoodTimer = 30000; } - else - { - IsChasing = false; - - if (Player* target = m_creature->GetMap()->GetPlayer(m_hoodGuid)) - { - m_hoodGuid.Clear(); - - if (m_creature->getThreatManager().getThreat(target)) - m_creature->getThreatManager().modifyThreatPercent(target, -100); - - m_creature->AddThreat(target, TempThreat); - TempThreat = 0; - } - - ChaseTimer = 40000; - } - }else ChaseTimer -= diff; - - if (IsChasing) - return; + } + else + m_uiRedRidingHoodTimer -= uiDiff; - if (FearTimer < diff) + if (m_uiFearTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_TERRIFYING_HOWL); - FearTimer = urand(25000, 35000); - }else FearTimer -= diff; + if (DoCastSpellIfCan(m_creature, SPELL_TERRIFYING_HOWL) == CAST_OK) + m_uiFearTimer = 24000; + } + else + m_uiFearTimer -= uiDiff; - if (SwipeTimer < diff) + if (m_uiSwipeTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_WIDE_SWIPE); - SwipeTimer = urand(25000, 30000); - }else SwipeTimer -= diff; + if (DoCastSpellIfCan(m_creature, SPELL_WIDE_SWIPE) == CAST_OK) + m_uiSwipeTimer = urand(25000, 30000); + } + else + m_uiSwipeTimer -= uiDiff; + + DoMeleeAttackIfReady(); } }; @@ -866,582 +795,519 @@ CreatureAI* GetAI_boss_bigbadwolf(Creature* pCreature) /******** Opera Romeo and Juliet Event *******/ /********************************************/ -/**** Speech *****/ -#define SAY_JULIANNE_AGGRO -1532046 -#define SAY_JULIANNE_ENTER -1532047 -#define SAY_JULIANNE_DEATH01 -1532048 -#define SAY_JULIANNE_DEATH02 -1532049 -#define SAY_JULIANNE_RESURRECT -1532050 -#define SAY_JULIANNE_SLAY -1532051 - -#define SAY_ROMULO_AGGRO -1532052 -#define SAY_ROMULO_DEATH -1532053 -#define SAY_ROMULO_ENTER -1532054 -#define SAY_ROMULO_RESURRECT -1532055 -#define SAY_ROMULO_SLAY -1532056 - -/***** Spells For Julianne *****/ -#define SPELL_BLINDING_PASSION 30890 -#define SPELL_DEVOTION 30887 -#define SPELL_ETERNAL_AFFECTION 30878 -#define SPELL_POWERFUL_ATTRACTION 30889 -#define SPELL_DRINK_POISON 30907 - -/***** Spells For Romulo ****/ -#define SPELL_BACKWARD_LUNGE 30815 -#define SPELL_DARING 30841 -#define SPELL_DEADLY_SWATHE 30817 -#define SPELL_POISON_THRUST 30822 - -/**** Other Misc. Spells ****/ -#define SPELL_UNDYING_LOVE 30951 -#define SPELL_RES_VISUAL 24171 - -/*** Misc. Information ****/ -#define CREATURE_ROMULO 17533 -#define ROMULO_X -10900 -#define ROMULO_Y -1758 - -enum RAJPhase +enum +{ + /**** Speech *****/ + SAY_JULIANNE_AGGRO = -1532046, + SAY_JULIANNE_ENTER = -1532047, + SAY_JULIANNE_DEATH01 = -1532048, + SAY_JULIANNE_DEATH02 = -1532049, + SAY_JULIANNE_RESURRECT = -1532050, + SAY_JULIANNE_SLAY = -1532051, + + SAY_ROMULO_AGGRO = -1532052, + SAY_ROMULO_DEATH = -1532053, + SAY_ROMULO_ENTER = -1532054, + SAY_ROMULO_RESURRECT = -1532055, + SAY_ROMULO_SLAY = -1532056, + + /***** Spells For Julianne *****/ + SPELL_BLINDING_PASSION = 30890, + SPELL_DEVOTION = 30887, + SPELL_ETERNAL_AFFECTION = 30878, + SPELL_POWERFUL_ATTRACTION = 30889, + SPELL_DRINK_POISON = 30907, + + /***** Spells For Romulo ****/ + SPELL_BACKWARD_LUNGE = 30815, + SPELL_DARING = 30841, + SPELL_DEADLY_SWATHE = 30817, + SPELL_POISON_THRUST = 30822, + + /**** Other Misc. Spells ****/ + SPELL_FULL_HEALTH = 43979, // res effect on Julianne + SPELL_UNDYING_LOVE = 30951, // res effect on Romulo +}; + +enum OperaPhase { PHASE_JULIANNE = 0, PHASE_ROMULO = 1, PHASE_BOTH = 2, }; -void PretendToDie(Creature* pCreature) -{ - pCreature->InterruptNonMeleeSpells(true); - pCreature->RemoveAllAuras(); - pCreature->SetHealth(0); - pCreature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - pCreature->GetMotionMaster()->MovementExpired(false); - pCreature->GetMotionMaster()->MoveIdle(); - pCreature->SetStandState(UNIT_STAND_STATE_DEAD); -}; - -void Resurrect(Creature* target) -{ - target->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - target->SetHealth(target->GetMaxHealth()); - target->SetStandState(UNIT_STAND_STATE_STAND); - target->CastSpell(target, SPELL_RES_VISUAL, true); - if (target->getVictim()) - { - target->GetMotionMaster()->MoveChase(target->getVictim()); - target->AI()->AttackStart(target->getVictim()); - } - else - target->GetMotionMaster()->Initialize(); -}; +static const float afRomuloSpawnLoc[4] = {-10893.62f, -1760.78f, 90.55f, 4.76f}; struct MANGOS_DLL_DECL boss_julianneAI : public ScriptedAI { boss_julianneAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - EntryYellTimer = 1000; - AggroYellTimer = 10000; - IsFakingDeath = false; Reset(); } ScriptedInstance* m_pInstance; - uint32 EntryYellTimer; - uint32 AggroYellTimer; + OperaPhase m_Phase; - ObjectGuid m_romuloGuid; - uint32 Phase; + uint32 m_uiBlindingPassionTimer; + uint32 m_uiDevotionTimer; + uint32 m_uiEternalAffectionTimer; + uint32 m_uiPowerfulAttractionTimer; + uint32 m_uiSummonRomuloTimer; + uint32 m_uiResurrectSelfTimer; - uint32 BlindingPassionTimer; - uint32 DevotionTimer; - uint32 EternalAffectionTimer; - uint32 PowerfulAttractionTimer; - uint32 SummonRomuloTimer; - uint32 ResurrectTimer; - uint32 DrinkPoisonTimer; - uint32 ResurrectSelfTimer; - - bool IsFakingDeath; - bool SummonedRomulo; - bool RomuloDead; + bool m_bIsFakingDeath; void Reset() { - m_romuloGuid.Clear(); - Phase = PHASE_JULIANNE; + m_Phase = PHASE_JULIANNE; - BlindingPassionTimer = 30000; - DevotionTimer = 15000; - EternalAffectionTimer = 25000; - PowerfulAttractionTimer = 5000; - SummonRomuloTimer = 10000; - ResurrectTimer = 10000; - DrinkPoisonTimer = 0; - ResurrectSelfTimer = 0; + m_uiBlindingPassionTimer = 30000; + m_uiDevotionTimer = 15000; + m_uiEternalAffectionTimer = 25000; + m_uiPowerfulAttractionTimer = 5000; + m_uiSummonRomuloTimer = 0; + m_uiResurrectSelfTimer = 0; - if (IsFakingDeath) - { - Resurrect(m_creature); - IsFakingDeath = false; - } + m_bIsFakingDeath = false; + } - SummonedRomulo = false; - RomuloDead = false; + void Aggro(Unit* pWho) + { + DoScriptText(SAY_JULIANNE_AGGRO, m_creature); } - void AttackStart(Unit* who) + void JustReachedHome() { - if (m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE)) - return; + if (m_pInstance) + m_pInstance->SetData(TYPE_OPERA, FAIL); - ScriptedAI::AttackStart(who); + m_creature->ForcedDespawn(); } - void MoveInLineOfSight(Unit* who) + void DamageTaken(Unit* pDoneBy, uint32& uiDamage) { - if (m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE)) + if (uiDamage < m_creature->GetHealth()) return; - ScriptedAI::MoveInLineOfSight(who); - } + uiDamage = 0; - void JustReachedHome() - { - m_creature->ForcedDespawn(); - } + if (m_bIsFakingDeath) + return; - void SpellHit(Unit* caster, const SpellEntry *Spell) - { - if (Spell->Id == SPELL_DRINK_POISON) + if (m_Phase == PHASE_JULIANNE) + { + // Prepare fake death + if (DoCastSpellIfCan(m_creature, SPELL_DRINK_POISON, CAST_INTERRUPT_PREVIOUS) == CAST_OK) + { + m_Phase = PHASE_BOTH; + m_bIsFakingDeath = true; + m_uiSummonRomuloTimer = 12000; + } + } + else if (m_Phase == PHASE_BOTH) { - DoScriptText(SAY_JULIANNE_DEATH01, m_creature); - DrinkPoisonTimer = 2500; + // set fake death and allow 10 sec timer to kill Romulos + DoScriptText(SAY_JULIANNE_DEATH02, m_creature); + DoSetFakeDeath(); + m_uiResurrectSelfTimer = 10000; } } - void DamageTaken(Unit* done_by, uint32 &damage); - - void JustDied(Unit* killer) + void JustDied(Unit* pKiller) { - DoScriptText(SAY_JULIANNE_DEATH02, m_creature); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); if (m_pInstance) m_pInstance->SetData(TYPE_OPERA, DONE); } - void KilledUnit(Unit* victim) + void KilledUnit(Unit* pVictim) { + if (pVictim->GetTypeId() != TYPEID_PLAYER) + return; + DoScriptText(SAY_JULIANNE_SLAY, m_creature); } - void UpdateAI(const uint32 diff); -}; - -struct MANGOS_DLL_DECL boss_romuloAI : public ScriptedAI -{ - boss_romuloAI(Creature* pCreature) : ScriptedAI(pCreature) + void JustSummoned(Creature* pSummoned) { - m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - Reset(); - EntryYellTimer = 8000; - AggroYellTimer = 15000; + if (m_creature->getVictim()) + pSummoned->AI()->AttackStart(m_creature->getVictim()); } - ScriptedInstance* m_pInstance; - - ObjectGuid m_julianneGuid; - uint32 Phase; - - uint32 EntryYellTimer; - uint32 AggroYellTimer; - uint32 BackwardLungeTimer; - uint32 DaringTimer; - uint32 DeadlySwatheTimer; - uint32 PoisonThrustTimer; - uint32 ResurrectTimer; - - bool IsFakingDeath; - bool JulianneDead; - - void Reset() + // Wrapper to set fake death + void DoSetFakeDeath() { - m_julianneGuid.Clear(); - Phase = PHASE_ROMULO; + m_bIsFakingDeath = true; - BackwardLungeTimer = 15000; - DaringTimer = 20000; - DeadlySwatheTimer = 25000; - PoisonThrustTimer = 10000; - ResurrectTimer = 10000; - - IsFakingDeath = false; - JulianneDead = false; + m_creature->InterruptNonMeleeSpells(false); + m_creature->SetHealth(1); + m_creature->StopMoving(); + m_creature->ClearComboPointHolders(); + m_creature->RemoveAllAurasOnDeath(); + m_creature->ModifyAuraState(AURA_STATE_HEALTHLESS_20_PERCENT, false); + m_creature->ModifyAuraState(AURA_STATE_HEALTHLESS_35_PERCENT, false); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + m_creature->ClearAllReactives(); + m_creature->SetTargetGuid(ObjectGuid()); + m_creature->GetMotionMaster()->Clear(); + m_creature->GetMotionMaster()->MoveIdle(); + m_creature->SetStandState(UNIT_STAND_STATE_DEAD); } - void JustReachedHome() + // Wrapper to remove fake death + void DoRemoveFakeDeath() { - m_creature->ForcedDespawn(); - } + m_bIsFakingDeath = false; - void DamageTaken(Unit* done_by, uint32 &damage); + m_creature->SetStandState(UNIT_STAND_STATE_STAND); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + m_creature->GetMotionMaster()->Clear(); + DoStartMovement(m_creature->getVictim()); + } - void Aggro(Unit* who) + // Wrapper to start phase 3 + void DoHandleRomuloResurrect() { - DoScriptText(SAY_ROMULO_AGGRO, m_creature); - - if (m_julianneGuid) + if (DoCastSpellIfCan(m_creature, SPELL_UNDYING_LOVE) == CAST_OK) { - Creature* Julianne = m_creature->GetMap()->GetCreature(m_julianneGuid); - - if (Julianne && Julianne->getVictim()) - m_creature->AddThreat(Julianne->getVictim()); + DoCastSpellIfCan(m_creature, SPELL_FULL_HEALTH, CAST_TRIGGERED); + DoScriptText(SAY_JULIANNE_RESURRECT, m_creature); + DoRemoveFakeDeath(); } } - void MoveInLineOfSight(Unit* who) - { - if (m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE)) - return; - - ScriptedAI::MoveInLineOfSight(who); - } - - void JustDied(Unit* killer) - { - DoScriptText(SAY_ROMULO_DEATH, m_creature); - - if (m_pInstance) - m_pInstance->SetData(TYPE_OPERA, DONE); - } - - void KilledUnit(Unit* victim) - { - DoScriptText(SAY_ROMULO_SLAY, m_creature); - } - - void UpdateAI(const uint32 diff); -}; - -void boss_julianneAI::DamageTaken(Unit* done_by, uint32 &damage) -{ - if (damage < m_creature->GetHealth()) - return; - - //anything below only used if incoming damage will kill - - if (Phase == PHASE_JULIANNE) - { - damage = 0; - - //this means already drinking, so return - if (IsFakingDeath) - return; - - m_creature->InterruptNonMeleeSpells(true); - DoCastSpellIfCan(m_creature, SPELL_DRINK_POISON); - - IsFakingDeath = true; - return; - } - - if (Phase == PHASE_ROMULO) + void UpdateAI(const uint32 uiDiff) { - error_log("SD2: boss_julianneAI: cannot take damage in PHASE_ROMULO, why was i here?"); - damage = 0; - return; - } - - if (Phase == PHASE_BOTH) - { - //if this is true then we have to kill romulo too - if (RomuloDead) + // spawn Romulo on timer after fake death + if (m_uiSummonRomuloTimer) { - if (Creature* Romulo = m_creature->GetMap()->GetCreature(m_romuloGuid)) + if (m_uiSummonRomuloTimer <= uiDiff) { - Romulo->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - Romulo->GetMotionMaster()->Clear(); - Romulo->SetDeathState(JUST_DIED); - Romulo->CombatStop(true); - Romulo->DeleteThreatList(); - Romulo->SetUInt32Value(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE); + m_creature->SummonCreature(NPC_ROMULO, afRomuloSpawnLoc[0], afRomuloSpawnLoc[1], afRomuloSpawnLoc[2], afRomuloSpawnLoc[3], TEMPSUMMON_DEAD_DESPAWN, 0); + m_uiSummonRomuloTimer = 0; } - return; + else + m_uiSummonRomuloTimer -= uiDiff; } - //if not already returned, then romulo is alive and we can pretend die - if (Creature* Romulo = m_creature->GetMap()->GetCreature(m_romuloGuid)) + if (m_uiResurrectSelfTimer) { - PretendToDie(m_creature); - IsFakingDeath = true; - - if (boss_romuloAI* pRomAI = dynamic_cast(Romulo->AI())) + if (m_uiResurrectSelfTimer <= uiDiff) { - pRomAI->ResurrectTimer = 10000; - pRomAI->JulianneDead = true; + if (m_pInstance) + { + if (Creature* pRomulo = m_pInstance->GetSingleCreatureFromStorage(NPC_ROMULO)) + { + // if Romulos is dead, then self kill + if (pRomulo->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE)) + { + m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NONE, NULL, false); + pRomulo->DealDamage(pRomulo, pRomulo->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NONE, NULL, false); + } + else + { + DoRemoveFakeDeath(); + DoCastSpellIfCan(m_creature, SPELL_FULL_HEALTH, CAST_TRIGGERED); + } + } + } + m_uiResurrectSelfTimer = 0; } - - damage = 0; - return; + else + m_uiResurrectSelfTimer -= uiDiff; } - } - - error_log("SD2: boss_julianneAI: DamageTaken reach end of code, that should not happen."); -} - -void boss_romuloAI::DamageTaken(Unit* done_by, uint32 &damage) -{ - if (damage < m_creature->GetHealth()) - return; - //anything below only used if incoming damage will kill + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; - if (Phase == PHASE_ROMULO) - { - DoScriptText(SAY_ROMULO_DEATH, m_creature); - PretendToDie(m_creature); - IsFakingDeath = true; - Phase = PHASE_BOTH; + // don't use spells during transition + if (m_bIsFakingDeath) + return; - if (Creature* Julianne = m_creature->GetMap()->GetCreature(m_julianneGuid)) + if (m_uiBlindingPassionTimer < uiDiff) { - if (boss_julianneAI* pJulAI = dynamic_cast(Julianne->AI())) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) { - pJulAI->ResurrectSelfTimer = 10000; - pJulAI->RomuloDead = true; + if (DoCastSpellIfCan(pTarget, SPELL_BLINDING_PASSION) == CAST_OK) + m_uiBlindingPassionTimer = urand(30000, 45000); } } + else + m_uiBlindingPassionTimer -= uiDiff; - damage = 0; - return; - } + if (m_uiDevotionTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_DEVOTION) == CAST_OK) + m_uiDevotionTimer = urand(15000, 45000); + } + else + m_uiDevotionTimer -= uiDiff; - if (Phase == PHASE_BOTH) - { - if (JulianneDead) + if (m_uiPowerfulAttractionTimer < uiDiff) { - if (Creature* Julianne = m_creature->GetMap()->GetCreature(m_julianneGuid)) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) { - Julianne->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - Julianne->GetMotionMaster()->Clear(); - Julianne->SetDeathState(JUST_DIED); - Julianne->CombatStop(true); - Julianne->DeleteThreatList(); - Julianne->SetUInt32Value(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE); + if (DoCastSpellIfCan(pTarget, SPELL_POWERFUL_ATTRACTION) == CAST_OK) + m_uiPowerfulAttractionTimer = urand(5000, 30000); } - return; } + else + m_uiPowerfulAttractionTimer -= uiDiff; - if (Creature* Julianne = m_creature->GetMap()->GetCreature(m_julianneGuid)) + if (m_uiEternalAffectionTimer < uiDiff) { - PretendToDie(m_creature); - IsFakingDeath = true; - - if (boss_julianneAI* pJulAI = dynamic_cast(Julianne->AI())) + if (Unit* pTarget = DoSelectLowestHpFriendly(30.0f)) { - pJulAI->ResurrectTimer = 10000; - pJulAI->RomuloDead = true; + if (DoCastSpellIfCan(pTarget, SPELL_ETERNAL_AFFECTION) == CAST_OK) + m_uiEternalAffectionTimer = urand(45000, 60000); } - - damage = 0; - return; } - } + else + m_uiEternalAffectionTimer -= uiDiff; - error_log("SD2: boss_romuloAI: DamageTaken reach end of code, that should not happen."); -} + DoMeleeAttackIfReady(); + } +}; -void boss_julianneAI::UpdateAI(const uint32 diff) +bool EffectDummyCreature_spell_drink_poison(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) { - if (EntryYellTimer) + //always check spellid and effectindex + if (uiSpellId == SPELL_DRINK_POISON && uiEffIndex == EFFECT_INDEX_0) { - if (EntryYellTimer <= diff) - { - DoScriptText(SAY_JULIANNE_ENTER, m_creature); - EntryYellTimer = 0; - }else EntryYellTimer -= diff; - } + // Set fake death on poison + if (boss_julianneAI* pJulianneAI = dynamic_cast(pCreatureTarget->AI())) + pJulianneAI->DoSetFakeDeath(); - if (AggroYellTimer) - { - if (AggroYellTimer <= diff) - { - DoScriptText(SAY_JULIANNE_AGGRO, m_creature); - m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - m_creature->setFaction(16); - AggroYellTimer = 0; - }else AggroYellTimer -= diff; + DoScriptText(SAY_JULIANNE_DEATH01, pCreatureTarget); + + //always return true when we are handling this spell and effect + return true; } - if (DrinkPoisonTimer) + return false; +} + +struct MANGOS_DLL_DECL boss_romuloAI : public ScriptedAI +{ + boss_romuloAI(Creature* pCreature) : ScriptedAI(pCreature) { - //will do this 2secs after spell hit. this is time to display visual as expected - if (DrinkPoisonTimer <= diff) - { - PretendToDie(m_creature); - Phase = PHASE_ROMULO; - SummonRomuloTimer = 10000; - DrinkPoisonTimer = 0; - }else DrinkPoisonTimer -= diff; + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); } - if (Phase == PHASE_ROMULO && !SummonedRomulo) - { - if (SummonRomuloTimer < diff) - { - if (Creature* pRomulo = m_creature->SummonCreature(CREATURE_ROMULO, ROMULO_X, ROMULO_Y, m_creature->GetPositionZ(), 0, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, HOUR*2*IN_MILLISECONDS)) - { - m_romuloGuid = pRomulo->GetObjectGuid(); + ScriptedInstance* m_pInstance; - if (boss_romuloAI* pRomAI = dynamic_cast(pRomulo->AI())) - { - pRomAI->m_julianneGuid = m_creature->GetObjectGuid(); - pRomAI->Phase = PHASE_ROMULO; - } + OperaPhase m_Phase; - //why? - pRomulo->setFaction(16); + uint32 m_uiBackwardLungeTimer; + uint32 m_uiDaringTimer; + uint32 m_uiDeadlySwatheTimer; + uint32 m_uiPoisonThrustTimer; + uint32 m_uiResurrectTimer; + uint32 m_uiResurrectSelfTimer; - pRomulo->SetInCombatWithZone(); - } - SummonedRomulo = true; - }else SummonRomuloTimer -= diff; - } + bool m_bIsFakingDeath; - if (ResurrectSelfTimer) + void Reset() { - if (ResurrectSelfTimer <= diff) - { - Resurrect(m_creature); - Phase = PHASE_BOTH; - IsFakingDeath = false; + m_Phase = PHASE_ROMULO; - if (m_creature->getVictim()) - AttackStart(m_creature->getVictim()); + m_uiBackwardLungeTimer = 15000; + m_uiDaringTimer = 20000; + m_uiDeadlySwatheTimer = 25000; + m_uiPoisonThrustTimer = 10000; + m_uiResurrectTimer = 0; + m_uiResurrectSelfTimer = 0; - ResurrectSelfTimer = 0; - ResurrectTimer = 1000; - }else ResurrectSelfTimer -= diff; + m_bIsFakingDeath = false; } - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim() || IsFakingDeath) - return; + void JustReachedHome() + { + if (m_pInstance) + m_pInstance->SetData(TYPE_OPERA, FAIL); + + m_creature->ForcedDespawn(); + } - if (RomuloDead) + void DamageTaken(Unit* pDoneBy, uint32& uiDamage) { - if (ResurrectTimer < diff) - { - Creature* pRomulo = m_creature->GetMap()->GetCreature(m_romuloGuid); - boss_romuloAI* pRomAI = dynamic_cast(pRomulo->AI()); + if (uiDamage < m_creature->GetHealth()) + return; - if (pRomulo && pRomAI && pRomAI->IsFakingDeath) - { - DoScriptText(SAY_JULIANNE_RESURRECT, m_creature); - Resurrect(pRomulo); + uiDamage = 0; - pRomAI->IsFakingDeath = false; + if (m_Phase == PHASE_ROMULO) + { + DoScriptText(SAY_ROMULO_DEATH, m_creature); + DoSetFakeDeath(); + m_Phase = PHASE_BOTH; + m_uiResurrectTimer = 10000; + } + else if (m_Phase == PHASE_BOTH) + { + // set fake death and allow 10 sec timer to kill Julianne + DoSetFakeDeath(); + m_uiResurrectSelfTimer = 10000; + } + } - RomuloDead = false; - ResurrectTimer = 10000; - } - }else ResurrectTimer -= diff; + void Aggro(Unit* pWho) + { + DoScriptText(SAY_ROMULO_AGGRO, m_creature); } - if (BlindingPassionTimer < diff) + void JustDied(Unit* pKiller) { - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) - DoCastSpellIfCan(pTarget, SPELL_BLINDING_PASSION); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - BlindingPassionTimer = urand(30000, 45000); - } else BlindingPassionTimer -= diff; + if (m_pInstance) + m_pInstance->SetData(TYPE_OPERA, DONE); + } - if (DevotionTimer < diff) + void KilledUnit(Unit* pVictim) { - DoCastSpellIfCan(m_creature, SPELL_DEVOTION); - DevotionTimer = urand(15000, 45000); - } else DevotionTimer -= diff; + if (pVictim->GetTypeId() != TYPEID_PLAYER) + return; - if (PowerfulAttractionTimer < diff) - { - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) - DoCastSpellIfCan(pTarget, SPELL_POWERFUL_ATTRACTION); + DoScriptText(SAY_ROMULO_SLAY, m_creature); + } - PowerfulAttractionTimer = urand(5000, 30000); - } else PowerfulAttractionTimer -= diff; + void SpellHit(Unit* pCaster, const SpellEntry* pSpell) + { + // remove fake death on res + if (pSpell->Id == SPELL_UNDYING_LOVE && pCaster->GetEntry() == NPC_JULIANNE) + DoRemoveFakeDeath(); + } - if (EternalAffectionTimer < diff) + // Wrapper to set fake death + void DoSetFakeDeath() { - if (urand(0, 1) && SummonedRomulo) - { - Creature* Romulo = m_creature->GetMap()->GetCreature(m_romuloGuid); - if (Romulo && Romulo->isAlive() && !RomuloDead) - DoCastSpellIfCan(Romulo, SPELL_ETERNAL_AFFECTION); - } else DoCastSpellIfCan(m_creature, SPELL_ETERNAL_AFFECTION); + m_bIsFakingDeath = true; - EternalAffectionTimer = urand(45000, 60000); - } else EternalAffectionTimer -= diff; + m_creature->InterruptNonMeleeSpells(false); + m_creature->SetHealth(1); + m_creature->StopMoving(); + m_creature->ClearComboPointHolders(); + m_creature->RemoveAllAurasOnDeath(); + m_creature->ModifyAuraState(AURA_STATE_HEALTHLESS_20_PERCENT, false); + m_creature->ModifyAuraState(AURA_STATE_HEALTHLESS_35_PERCENT, false); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + m_creature->ClearAllReactives(); + m_creature->SetTargetGuid(ObjectGuid()); + m_creature->GetMotionMaster()->Clear(); + m_creature->GetMotionMaster()->MoveIdle(); + m_creature->SetStandState(UNIT_STAND_STATE_DEAD); + } - DoMeleeAttackIfReady(); -} + // Wrapper to remove fake death + void DoRemoveFakeDeath() + { + m_bIsFakingDeath = false; -void boss_romuloAI::UpdateAI(const uint32 diff) -{ - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim() || IsFakingDeath) - return; + m_creature->SetStandState(UNIT_STAND_STATE_STAND); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + m_creature->GetMotionMaster()->Clear(); + DoStartMovement(m_creature->getVictim()); + } - if (JulianneDead) + void UpdateAI(const uint32 uiDiff) { - if (ResurrectTimer < diff) + // Resurrect both of them at the beginning of phase 3 + if (m_uiResurrectTimer) { - Creature* pJulianne = m_creature->GetMap()->GetCreature(m_julianneGuid); - boss_julianneAI* pJulAI = dynamic_cast(pJulianne->AI()); + if (m_uiResurrectTimer <= uiDiff) + { + if (m_pInstance) + { + if (Creature* pJulianne = m_pInstance->GetSingleCreatureFromStorage(NPC_JULIANNE)) + { + if (boss_julianneAI* pJulianneAI = dynamic_cast(pJulianne->AI())) + pJulianneAI->DoHandleRomuloResurrect(); + } + } + m_uiResurrectTimer = 0; + } + else + m_uiResurrectTimer -= uiDiff; + } - if (pJulianne && pJulAI && pJulAI->IsFakingDeath) + if (m_uiResurrectSelfTimer) + { + if (m_uiResurrectSelfTimer <= uiDiff) { - DoScriptText(SAY_ROMULO_RESURRECT, m_creature); - Resurrect(pJulianne); + if (m_pInstance) + { + if (Creature* pJulianne = m_pInstance->GetSingleCreatureFromStorage(NPC_JULIANNE)) + { + // if Julianne is dead, then self kill + if (pJulianne->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE)) + { + m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NONE, NULL, false); + pJulianne->DealDamage(pJulianne, pJulianne->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NONE, NULL, false); + } + else + { + DoRemoveFakeDeath(); + DoScriptText(SAY_ROMULO_RESURRECT, m_creature); + DoCastSpellIfCan(m_creature, SPELL_FULL_HEALTH, CAST_TRIGGERED); + } + } + } + m_uiResurrectSelfTimer = 0; + } + else + m_uiResurrectSelfTimer -= uiDiff; + } - pJulAI->IsFakingDeath = false; + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; - JulianneDead = false; - ResurrectTimer = 10000; - } - } else ResurrectTimer -= diff; - } + // don't use spells on fake death + if (m_bIsFakingDeath) + return; - if (BackwardLungeTimer < diff) - { - Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1); - if (target && !m_creature->HasInArc(M_PI_F, target)) + if (m_uiBackwardLungeTimer < uiDiff) { - DoCastSpellIfCan(target, SPELL_BACKWARD_LUNGE); - BackwardLungeTimer = urand(15000, 30000); + if (DoCastSpellIfCan(m_creature, SPELL_BACKWARD_LUNGE) == CAST_OK) + m_uiBackwardLungeTimer = urand(15000, 30000); } - }else BackwardLungeTimer -= diff; - - if (DaringTimer < diff) - { - DoCastSpellIfCan(m_creature, SPELL_DARING); - DaringTimer = urand(20000, 40000); - }else DaringTimer -= diff; + else + m_uiBackwardLungeTimer -= uiDiff; - if (DeadlySwatheTimer < diff) - { - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) - DoCastSpellIfCan(pTarget, SPELL_DEADLY_SWATHE); + if (m_uiDaringTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_DARING) == CAST_OK) + m_uiDaringTimer = urand(20000, 40000); + } + else + m_uiDaringTimer -= uiDiff; - DeadlySwatheTimer = urand(15000, 25000); - }else DeadlySwatheTimer -= diff; + if (m_uiDeadlySwatheTimer < uiDiff) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, SPELL_DEADLY_SWATHE) == CAST_OK) + m_uiDeadlySwatheTimer = urand(15000, 25000); + } + } + else + m_uiDeadlySwatheTimer -= uiDiff; - if (PoisonThrustTimer < diff) - { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_POISON_THRUST); - PoisonThrustTimer = urand(10000, 20000); - }else PoisonThrustTimer -= diff; + if (m_uiPoisonThrustTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_POISON_THRUST) == CAST_OK) + m_uiPoisonThrustTimer = urand(10000, 20000); + } + else + m_uiPoisonThrustTimer -= uiDiff; - DoMeleeAttackIfReady(); -} + DoMeleeAttackIfReady(); + } +}; CreatureAI* GetAI_boss_julianne(Creature* pCreature) { @@ -1459,60 +1325,56 @@ void AddSC_bosses_opera() // Oz pNewScript = new Script; - pNewScript->GetAI = &GetAI_boss_dorothee; pNewScript->Name = "boss_dorothee"; + pNewScript->GetAI = &GetAI_boss_dorothee; pNewScript->RegisterSelf(); pNewScript = new Script; - pNewScript->GetAI = &GetAI_boss_strawman; pNewScript->Name = "boss_strawman"; + pNewScript->GetAI = &GetAI_boss_strawman; pNewScript->RegisterSelf(); pNewScript = new Script; - pNewScript->GetAI = &GetAI_boss_tinhead; pNewScript->Name = "boss_tinhead"; + pNewScript->GetAI = &GetAI_boss_tinhead; pNewScript->RegisterSelf(); pNewScript = new Script; - pNewScript->GetAI = &GetAI_boss_roar; pNewScript->Name = "boss_roar"; + pNewScript->GetAI = &GetAI_boss_roar; pNewScript->RegisterSelf(); pNewScript = new Script; - pNewScript->GetAI = &GetAI_boss_crone; pNewScript->Name = "boss_crone"; + pNewScript->GetAI = &GetAI_boss_crone; pNewScript->RegisterSelf(); pNewScript = new Script; - pNewScript->GetAI = &GetAI_mob_tito; pNewScript->Name = "mob_tito"; - pNewScript->RegisterSelf(); - - pNewScript = new Script; - pNewScript->GetAI = &GetAI_mob_cyclone; - pNewScript->Name = "mob_cyclone"; + pNewScript->GetAI = &GetAI_mob_tito; pNewScript->RegisterSelf(); // Hood pNewScript = new Script; + pNewScript->Name = "npc_grandmother"; pNewScript->pGossipHello = &GossipHello_npc_grandmother; pNewScript->pGossipSelect = &GossipSelect_npc_grandmother; - pNewScript->Name = "npc_grandmother"; pNewScript->RegisterSelf(); pNewScript = new Script; - pNewScript->GetAI = &GetAI_boss_bigbadwolf; pNewScript->Name = "boss_bigbadwolf"; + pNewScript->GetAI = &GetAI_boss_bigbadwolf; pNewScript->RegisterSelf(); // Romeo And Juliet pNewScript = new Script; - pNewScript->GetAI = &GetAI_boss_julianne; pNewScript->Name = "boss_julianne"; + pNewScript->GetAI = &GetAI_boss_julianne; + pNewScript->pEffectDummyNPC = &EffectDummyCreature_spell_drink_poison; pNewScript->RegisterSelf(); pNewScript = new Script; - pNewScript->GetAI = &GetAI_boss_romulo; pNewScript->Name = "boss_romulo"; + pNewScript->GetAI = &GetAI_boss_romulo; pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/karazhan/instance_karazhan.cpp b/scripts/eastern_kingdoms/karazhan/instance_karazhan.cpp index 713f22794..593d6e9c3 100644 --- a/scripts/eastern_kingdoms/karazhan/instance_karazhan.cpp +++ b/scripts/eastern_kingdoms/karazhan/instance_karazhan.cpp @@ -80,6 +80,8 @@ void instance_karazhan::OnCreatureCreate(Creature* pCreature) case NPC_MOROES: case NPC_BARNES: case NPC_NIGHTBANE: + case NPC_JULIANNE: + case NPC_ROMULO: case NPC_LADY_KEIRA_BERRYBUCK: case NPC_LADY_CATRIONA_VON_INDI: case NPC_LORD_CRISPIN_FERENCE: @@ -97,7 +99,7 @@ void instance_karazhan::OnObjectCreate(GameObject* pGo) { case GO_STAGE_DOOR_LEFT: case GO_STAGE_DOOR_RIGHT: - if (m_auiEncounter[4] == DONE) + if (m_auiEncounter[3] == DONE) pGo->SetGoState(GO_STATE_ACTIVE); break; case GO_GAMESMANS_HALL_EXIT_DOOR: @@ -105,7 +107,7 @@ void instance_karazhan::OnObjectCreate(GameObject* pGo) pGo->SetGoState(GO_STATE_ACTIVE); break; case GO_SIDE_ENTRANCE_DOOR: - if (m_auiEncounter[4] == DONE) + if (m_auiEncounter[3] == DONE) pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_LOCKED); break; case GO_STAGE_CURTAIN: @@ -163,7 +165,12 @@ void instance_karazhan::SetData(uint32 uiType, uint32 uiData) m_auiEncounter[uiType] = uiData; break; case TYPE_OPERA: + // Don't store the same data twice + if (uiData == m_auiEncounter[uiType]) + break; m_auiEncounter[uiType] = uiData; + if (uiData == IN_PROGRESS) + m_uiOzDeathCount = 0; if (uiData == DONE) { DoUseDoorOrButton(GO_STAGE_DOOR_LEFT); @@ -280,6 +287,28 @@ void instance_karazhan::Load(const char* chrIn) OUT_LOAD_INST_DATA_COMPLETE; } +void instance_karazhan::OnCreatureDeath(Creature* pCreature) +{ + switch (pCreature->GetEntry()) + { + case NPC_DOROTHEE: + case NPC_ROAR: + case NPC_TINHEAD: + case NPC_STRAWMAN: + ++m_uiOzDeathCount; + // Summon Chrone when all 4 Oz mobs are killed + if (m_uiOzDeathCount == MAX_OZ_OPERA_MOBS) + { + if (Creature* pCrone = pCreature->SummonCreature(NPC_CRONE, afChroneSpawnLoc[0], afChroneSpawnLoc[1], afChroneSpawnLoc[2], afChroneSpawnLoc[3], TEMPSUMMON_DEAD_DESPAWN, 0)) + { + if (pCreature->getVictim()) + pCrone->AI()->AttackStart(pCreature->getVictim()); + } + } + break; + } +} + void instance_karazhan::DoPrepareOperaStage(Creature* pOrganizer) { if (!pOrganizer) diff --git a/scripts/eastern_kingdoms/karazhan/karazhan.h b/scripts/eastern_kingdoms/karazhan/karazhan.h index a3cb41470..4b5c06e3a 100644 --- a/scripts/eastern_kingdoms/karazhan/karazhan.h +++ b/scripts/eastern_kingdoms/karazhan/karazhan.h @@ -45,6 +45,7 @@ enum NPC_ROAR = 17546, NPC_TINHEAD = 17547, NPC_STRAWMAN = 17543, + NPC_CRONE = 18168, NPC_GRANDMOTHER = 17603, NPC_JULIANNE = 17534, NPC_ROMULO = 17533, @@ -94,8 +95,10 @@ static const OperaSpawns aOperaLocOz[MAX_OZ_OPERA_MOBS]= {NPC_STRAWMAN, -10902.11f, -1756.45f, 90.55f, 4.66f}, }; -static const OperaSpawns aOperaLocWolf = {NPC_GRANDMOTHER, -10892.0f, -1758.0f, 90.55f, 4.738f}; -static const OperaSpawns aOperaLocJul = {NPC_JULIANNE, -10900.0f, -1758.0f, 90.55f, 4.738f}; +static const OperaSpawns aOperaLocWolf = {NPC_GRANDMOTHER, -10892.01f, -1758.01f, 90.55f, 4.73f}; +static const OperaSpawns aOperaLocJul = {NPC_JULIANNE, -10893.56f, -1760.43f, 90.55f, 4.55f}; + +static const float afChroneSpawnLoc[4] = {-10893.11f, -1757.85f, 90.55f, 4.60f}; class MANGOS_DLL_DECL instance_karazhan : public ScriptedInstance { @@ -110,6 +113,8 @@ class MANGOS_DLL_DECL instance_karazhan : public ScriptedInstance void OnCreatureCreate(Creature* pCreature); void OnObjectCreate(GameObject* pGo); + void OnCreatureDeath(Creature* pCreature); + void SetData(uint32 uiType, uint32 uiData); uint32 GetData(uint32 uiType); diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 49a8c5971..5aa92932f 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2700" + #define SD2_REVISION_NR "2701" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index f585cba6d..d3e0ede4e 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -736,7 +736,6 @@ UPDATE creature_template SET ScriptName='boss_malchezaar' WHERE entry=15690; UPDATE creature_template SET ScriptName='boss_bigbadwolf' WHERE entry=17521; UPDATE creature_template SET ScriptName='mob_demon_chain' WHERE entry=17248; UPDATE creature_template SET ScriptName='npc_fiendish_portal' WHERE entry=17265; -UPDATE creature_template SET ScriptName='mob_cyclone' WHERE entry=18412; UPDATE creature_template SET ScriptName='netherspite_infernal' WHERE entry=17646; UPDATE creature_template SET ScriptName='npc_berthold' WHERE entry=16153; UPDATE creature_template SET ScriptName='npc_barnes' WHERE entry=16812; diff --git a/sql/updates/r2701_mangos.sql b/sql/updates/r2701_mangos.sql new file mode 100644 index 000000000..fdaf5b752 --- /dev/null +++ b/sql/updates/r2701_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='' WHERE entry=18412; From acecbe10f61eb07f01ee0e705de50bfb39eba550 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Thu, 30 Aug 2012 22:31:50 +0300 Subject: [PATCH 0692/1172] [2702] Implement script support for quest 9645 - part I --- .../karazhan/instance_karazhan.cpp | 11 +- .../eastern_kingdoms/karazhan/karazhan.cpp | 130 +++++++++++++++++- scripts/eastern_kingdoms/karazhan/karazhan.h | 6 +- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 4 + sql/scriptdev2_script_full.sql | 12 +- sql/updates/r2702_mangos.sql | 4 + sql/updates/r2702_scriptdev2.sql | 11 ++ 8 files changed, 166 insertions(+), 14 deletions(-) create mode 100644 sql/updates/r2702_mangos.sql create mode 100644 sql/updates/r2702_scriptdev2.sql diff --git a/scripts/eastern_kingdoms/karazhan/instance_karazhan.cpp b/scripts/eastern_kingdoms/karazhan/instance_karazhan.cpp index 593d6e9c3..de6a17c2e 100644 --- a/scripts/eastern_kingdoms/karazhan/instance_karazhan.cpp +++ b/scripts/eastern_kingdoms/karazhan/instance_karazhan.cpp @@ -88,6 +88,8 @@ void instance_karazhan::OnCreatureCreate(Creature* pCreature) case NPC_BARON_RAFE_DREUGER: case NPC_BARONESS_DOROTHEA_MILLSTIPE: case NPC_LORD_ROBIN_DARIS: + case NPC_IMAGE_OF_MEDIVH: + case NPC_IMAGE_OF_ARCANAGOS: m_mNpcEntryGuidStore[pCreature->GetEntry()] = pCreature->GetObjectGuid(); break; } @@ -211,13 +213,6 @@ void instance_karazhan::SetData(uint32 uiType, uint32 uiData) case TYPE_OPERA_PERFORMANCE: m_uiOperaEvent = uiData; break; - - case DATA_OPERA_OZ_DEATHCOUNT: - if (uiData == SPECIAL) - ++m_uiOzDeathCount; - else if (uiData == IN_PROGRESS) - m_uiOzDeathCount = 0; - return; } // Also save the opera performance, once it's set @@ -255,8 +250,6 @@ uint32 instance_karazhan::GetData(uint32 uiType) case TYPE_NIGHTBANE: return m_auiEncounter[10]; case TYPE_OPERA_PERFORMANCE: return m_uiOperaEvent; - case DATA_OPERA_OZ_DEATHCOUNT: return m_uiOzDeathCount; - default: return 0; } diff --git a/scripts/eastern_kingdoms/karazhan/karazhan.cpp b/scripts/eastern_kingdoms/karazhan/karazhan.cpp index a5b838cc0..cb8ae4697 100644 --- a/scripts/eastern_kingdoms/karazhan/karazhan.cpp +++ b/scripts/eastern_kingdoms/karazhan/karazhan.cpp @@ -17,13 +17,14 @@ /* ScriptData SDName: Karazhan SD%Complete: 100 -SDComment: Support for Barnes (Opera controller) and Berthold (Doorman). +SDComment: Quest support: 9645. Support for Barnes (Opera controller) and Berthold (Doorman). SDCategory: Karazhan EndScriptData */ /* ContentData npc_barnes npc_berthold +npc_image_of_medivh EndContentData */ #include "precompiled.h" @@ -283,6 +284,123 @@ bool GossipSelect_npc_berthold(Player* pPlayer, Creature* pCreature, uint32 uiSe return true; } +/*###### +# npc_image_of_medivh +######*/ + +enum +{ + // yells + SAY_MEDIVH_1 = -1532116, + SAY_ARCANAGOS_2 = -1532117, + SAY_MEDIVH_3 = -1532118, + SAY_ARCANAGOS_4 = -1532119, + SAY_MEDIVH_5 = -1532120, + SAY_ARCANAGOS_6 = -1532121, + EMOTE_CAST_SPELL = -1532122, + SAY_ARCANAGOS_7 = -1532123, + SAY_MEDIVH_8 = -1532124, + + // spells + // Arcanagos + SPELL_NOTIFY_FLEE = 30985, + SPELL_PREPARE_FIREBALL = 30970, + SPELL_REFLECTION = 30969, + SPELL_SHOOT_FIREBALL = 30968, + SPELL_FIREBALL_REFLECT = 30971, + + // Medivh + SPELL_FROST_BREATH = 30974, + SPELL_CONFLAG_BLAST = 30977, + SPELL_EVOCATION = 30972, + SPELL_FIREBALL = 30967, + SPELL_FLY_TO_DEATH = 30936, + SPELL_MANA_SHIELD = 30973, + + //NPC_ARCANAGOS_CREDIT = 17665, // purpose unk + + POINT_ID_INTRO = 1, + POINT_ID_DESPAWN = 2, +}; + +// Note: all coords are guesswork +static const float afMedivhSpawnLoc[4] = {-11153.18f, -1889.65f, 91.47f, 2.07f}; +static const float afArcanagosSpawnLoc[4] = {-11242.66f, -1778.55f, 125.35f}; +static const float afArcanagosMoveLoc[3] = {-11170.28f, -1865.09f, 125.35f}; + +static const DialogueEntry aMedivhDialogue[] = +{ + // ToDo: + {0, 0, 0}, +}; + +struct MANGOS_DLL_DECL npc_image_of_medivhAI : public ScriptedAI, private DialogueHelper +{ + npc_image_of_medivhAI(Creature* pCreature) : ScriptedAI(pCreature), + DialogueHelper(aMedivhDialogue) + { + m_pInstance = (instance_karazhan*)pCreature->GetInstanceData(); + InitializeDialogueHelper(m_pInstance); + Reset(); + } + + instance_karazhan* m_pInstance; + + void Reset() + { + } + + void JustSummoned(Creature* pSummoned) + { + if (pSummoned->GetEntry() == NPC_IMAGE_OF_ARCANAGOS) + { + pSummoned->SetLevitate(true); + pSummoned->SetWalk(false); + pSummoned->GetMotionMaster()->MovePoint(1, afArcanagosMoveLoc[0], afArcanagosMoveLoc[1], afArcanagosMoveLoc[2]); + pSummoned->SetByteFlag(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_UNK_2); + } + } + + void SummonedMovementInform(Creature* pSummoned, uint32 uiMotionType, uint32 uiPointId) + { + if (uiMotionType != POINT_MOTION_TYPE || pSummoned->GetEntry() != NPC_IMAGE_OF_ARCANAGOS) + return; + + switch (uiPointId) + { + case POINT_ID_INTRO: + // ToDo: start dialogue here + break; + case POINT_ID_DESPAWN: + break; + } + } + + void JustDidDialogueStep(int32 iEntry) + { + // ToDo: + } + + void UpdateAI(const uint32 uiDiff) { DialogueUpdate(uiDiff); } +}; + +CreatureAI* GetAI_npc_image_of_medivhAI(Creature* pCreature) +{ + return new npc_image_of_medivhAI(pCreature); +} + +bool ProcessEventId_event_spell_medivh_journal(uint32 uiEventId, Object* pSource, Object* pTarget, bool bIsStart) +{ + if (bIsStart && pSource->GetTypeId() == TYPEID_PLAYER) + { + // Summon Medivh and Arcanagos + if (Creature* pMedivh = ((Player*)pSource)->SummonCreature(NPC_IMAGE_OF_MEDIVH, afMedivhSpawnLoc[0], afMedivhSpawnLoc[1], afMedivhSpawnLoc[2], afMedivhSpawnLoc[3], TEMPSUMMON_DEAD_DESPAWN, 0)) + pMedivh->SummonCreature(NPC_IMAGE_OF_ARCANAGOS, afArcanagosSpawnLoc[0], afArcanagosSpawnLoc[1], afArcanagosSpawnLoc[2], afArcanagosSpawnLoc[2], TEMPSUMMON_DEAD_DESPAWN, 0); + } + + return true; +} + void AddSC_karazhan() { Script* pNewScript; @@ -299,4 +417,14 @@ void AddSC_karazhan() pNewScript->pGossipHello = &GossipHello_npc_berthold; pNewScript->pGossipSelect = &GossipSelect_npc_berthold; pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_image_of_medivh"; + pNewScript->GetAI = &GetAI_npc_image_of_medivhAI; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "event_spell_medivh_journal"; + pNewScript->pProcessEventId = &ProcessEventId_event_spell_medivh_journal; + pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/karazhan/karazhan.h b/scripts/eastern_kingdoms/karazhan/karazhan.h index 4b5c06e3a..261588341 100644 --- a/scripts/eastern_kingdoms/karazhan/karazhan.h +++ b/scripts/eastern_kingdoms/karazhan/karazhan.h @@ -23,8 +23,6 @@ enum TYPE_NIGHTBANE = 10, TYPE_OPERA_PERFORMANCE = 11, // no regular encounter - just store one random opera event - DATA_OPERA_OZ_DEATHCOUNT = 12, - NPC_ATTUMEN = 15550, NPC_MIDNIGHT = 16151, NPC_MOROES = 15687, @@ -50,6 +48,10 @@ enum NPC_JULIANNE = 17534, NPC_ROMULO = 17533, + // The Master's Terrace quest related + NPC_IMAGE_OF_MEDIVH = 17651, + NPC_IMAGE_OF_ARCANAGOS = 17652, + GO_STAGE_CURTAIN = 183932, GO_STAGE_DOOR_LEFT = 184278, GO_STAGE_DOOR_RIGHT = 184279, diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 5aa92932f..1495ef31e 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2701" + #define SD2_REVISION_NR "2702" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index d3e0ede4e..75a04a8ed 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -740,6 +740,10 @@ UPDATE creature_template SET ScriptName='netherspite_infernal' WHERE entry=17646 UPDATE creature_template SET ScriptName='npc_berthold' WHERE entry=16153; UPDATE creature_template SET ScriptName='npc_barnes' WHERE entry=16812; UPDATE creature_template SET ScriptName='npc_grandmother' WHERE entry=17603; +UPDATE creature_template SET ScriptName='npc_image_of_medivh' WHERE entry=17651; +DELETE FROM scripted_event_id WHERE id=10951; +INSERT INTO scripted_event_id VALUES +(10951,'event_spell_medivh_journal'); /* LOCH MODAN */ UPDATE creature_template SET ScriptName='npc_mountaineer_pebblebitty' WHERE entry=3836; diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 17dd052ea..fa61d9b93 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -1658,7 +1658,17 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1532112,'Tonight, we explore a tale of forbidden love!',9341,1,0,0,'barnes RAJ2'), (-1532113,'But beware, for not all love stories end happily, as you may find out. Sometimes, love pricks like a thorn.',9342,1,0,0,'barnes RAJ3'), (-1532114,'But don\'t take it from me, see for yourself what tragedy lies ahead when the paths of star-crossed lovers meet. And now...on with the show!',9343,1,0,0,'barnes RAJ4'), -(-1532115,'Splendid, I\'m going to get the audience ready. Break a leg!',0,0,0,0,'barnes SAY_EVENT_START'); +(-1532115,'Splendid, I\'m going to get the audience ready. Break a leg!',0,0,0,0,'barnes SAY_EVENT_START'), + +(-1532116,'You\'ve got my attention, dragon. You\'ll find I\'m not as easily scared as the villagers below.',0,1,0,0,'image of medivh SAY_MEDIVH_1'), +(-1532117,'Your dabbling in the arcane has gone too far, Medivh. You\'ve attracted the attention of powers beyond your understanding. You must leave Karazhan at once!',0,1,0,0,'arcanagos SAY_ARCANAGOS_2'), +(-1532118,'You dare challenge me at my own dwelling? Your arrogance is astounding, even for a dragon.',0,1,0,0,'image of medivh SAY_MEDIVH_3'), +(-1532119,'A dark power seeks to use you, Medivh! If you stay, dire days will follow. You must hurry, we don\'t have much time!',0,1,0,0,'arcanagos SAY_ARCANAGOS_4'), +(-1532120,'I do not know what you speak of, dragon... but I will not be bullied by this display of insolence. I\'ll leave Karazhan when it suits me!',0,1,0,0,'image of medivh SAY_MEDIVH_5'), +(-1532121,'You leave me no alternative. I will stop you by force if you wont listen to reason.',0,1,0,0,'arcanagos SAY_ARCANAGOS_6'), +(-1532122,'%s begins to cast a spell of great power, weaving his own essence into the magic.',0,2,0,0,'image of medivh EMOTE_CAST_SPELL'), +(-1532123,'What have you done, wizard? This cannot be! I\'m burning from... within!',0,1,0,0,'arcanagos SAY_ARCANAGOS_7'), +(-1532124,'He should not have angered me. I must go... recover my strength now...',0,0,0,0,'image of medivh SAY_MEDIVH_8'); -- -1 533 000 NAXXRAMAS INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES diff --git a/sql/updates/r2702_mangos.sql b/sql/updates/r2702_mangos.sql new file mode 100644 index 000000000..ad92fdf84 --- /dev/null +++ b/sql/updates/r2702_mangos.sql @@ -0,0 +1,4 @@ +UPDATE creature_template SET ScriptName='npc_image_of_medivh' WHERE entry=17651; +DELETE FROM scripted_event_id WHERE id=10951; +INSERT INTO scripted_event_id VALUES +(10951,'event_spell_medivh_journal'); diff --git a/sql/updates/r2702_scriptdev2.sql b/sql/updates/r2702_scriptdev2.sql new file mode 100644 index 000000000..efc5127fe --- /dev/null +++ b/sql/updates/r2702_scriptdev2.sql @@ -0,0 +1,11 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1532124 AND -1532116; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1532116,'You\'ve got my attention, dragon. You\'ll find I\'m not as easily scared as the villagers below.',0,1,0,0,'image of medivh SAY_MEDIVH_1'), +(-1532117,'Your dabbling in the arcane has gone too far, Medivh. You\'ve attracted the attention of powers beyond your understanding. You must leave Karazhan at once!',0,1,0,0,'arcanagos SAY_ARCANAGOS_2'), +(-1532118,'You dare challenge me at my own dwelling? Your arrogance is astounding, even for a dragon.',0,1,0,0,'image of medivh SAY_MEDIVH_3'), +(-1532119,'A dark power seeks to use you, Medivh! If you stay, dire days will follow. You must hurry, we don\'t have much time!',0,1,0,0,'arcanagos SAY_ARCANAGOS_4'), +(-1532120,'I do not know what you speak of, dragon... but I will not be bullied by this display of insolence. I\'ll leave Karazhan when it suits me!',0,1,0,0,'image of medivh SAY_MEDIVH_5'), +(-1532121,'You leave me no alternative. I will stop you by force if you wont listen to reason.',0,1,0,0,'arcanagos SAY_ARCANAGOS_6'), +(-1532122,'%s begins to cast a spell of great power, weaving his own essence into the magic.',0,2,0,0,'image of medivh EMOTE_CAST_SPELL'), +(-1532123,'What have you done, wizard? This cannot be! I\'m burning from... within!',0,1,0,0,'arcanagos SAY_ARCANAGOS_7'), +(-1532124,'He should not have angered me. I must go... recover my strength now...',0,0,0,0,'image of medivh SAY_MEDIVH_8'); From 2062c09d1ac601ac67fd6968fd6e6a44257bf1a5 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Fri, 31 Aug 2012 00:33:59 +0300 Subject: [PATCH 0693/1172] [2703] Implement script support for quest 9645 - part II --- .../eastern_kingdoms/karazhan/karazhan.cpp | 141 ++++++++++++++++-- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 + sql/updates/r2703_mangos.sql | 1 + 4 files changed, 129 insertions(+), 16 deletions(-) create mode 100644 sql/updates/r2703_mangos.sql diff --git a/scripts/eastern_kingdoms/karazhan/karazhan.cpp b/scripts/eastern_kingdoms/karazhan/karazhan.cpp index cb8ae4697..3808744b1 100644 --- a/scripts/eastern_kingdoms/karazhan/karazhan.cpp +++ b/scripts/eastern_kingdoms/karazhan/karazhan.cpp @@ -25,6 +25,8 @@ EndScriptData */ npc_barnes npc_berthold npc_image_of_medivh +npc_image_arcanagos +event_spell_medivh_journal EndContentData */ #include "precompiled.h" @@ -303,34 +305,54 @@ enum // spells // Arcanagos - SPELL_NOTIFY_FLEE = 30985, - SPELL_PREPARE_FIREBALL = 30970, + //SPELL_NOTIFY_FLEE = 30985, // not used - allow Medivh to return inside after the dragon has escaped + //SPELL_PREPARE_FIREBALL= 30970, // not used - allow Medivh to cast fireball SPELL_REFLECTION = 30969, - SPELL_SHOOT_FIREBALL = 30968, + //SPELL_SHOOT_FIREBALL = 30968, // not used SPELL_FIREBALL_REFLECT = 30971, // Medivh - SPELL_FROST_BREATH = 30974, - SPELL_CONFLAG_BLAST = 30977, - SPELL_EVOCATION = 30972, + //SPELL_FROST_BREATH = 30974, // not used + SPELL_CONFLAG_BLAST = 30977, // cast on Arcanagos + SPELL_EVOCATION = 30972, // prepare the Conflagration Blast SPELL_FIREBALL = 30967, - SPELL_FLY_TO_DEATH = 30936, + //SPELL_FLY_TO_DEATH = 30936, // not used - inform the dragon to move to death Location SPELL_MANA_SHIELD = 30973, //NPC_ARCANAGOS_CREDIT = 17665, // purpose unk + QUEST_MASTERS_TERRACE = 9645, + POINT_ID_INTRO = 1, POINT_ID_DESPAWN = 2, }; -// Note: all coords are guesswork +/* Notes for future development of the event: + * this whole event includes a lot of guesswork + * the dummy spells usage is unk; for the moment they are not used + * also all coords are guesswork + */ static const float afMedivhSpawnLoc[4] = {-11153.18f, -1889.65f, 91.47f, 2.07f}; +static const float afMedivhExitLoc[3] = {-11121.81f, -1881.24f, 91.47f}; + static const float afArcanagosSpawnLoc[4] = {-11242.66f, -1778.55f, 125.35f}; static const float afArcanagosMoveLoc[3] = {-11170.28f, -1865.09f, 125.35f}; +static const float afArcanagosFleeLoc[3] = {-11003.70f, -1760.18f, 180.25f}; static const DialogueEntry aMedivhDialogue[] = { - // ToDo: + {NPC_IMAGE_OF_MEDIVH, 0, 10000}, + {SAY_MEDIVH_1, NPC_IMAGE_OF_MEDIVH, 6000}, + {SAY_ARCANAGOS_2, NPC_IMAGE_OF_ARCANAGOS, 10000}, + {SAY_MEDIVH_3, NPC_IMAGE_OF_MEDIVH, 6000}, + {SAY_ARCANAGOS_4, NPC_IMAGE_OF_ARCANAGOS, 8000}, + {SAY_MEDIVH_5, NPC_IMAGE_OF_MEDIVH, 7000}, + {SAY_ARCANAGOS_6, NPC_IMAGE_OF_ARCANAGOS, 0}, + {SPELL_MANA_SHIELD, 0, 4000}, + {EMOTE_CAST_SPELL, NPC_IMAGE_OF_MEDIVH, 5000}, + {SPELL_CONFLAG_BLAST, 0, 1000}, + {SAY_ARCANAGOS_7, NPC_IMAGE_OF_ARCANAGOS, 10000}, + {SAY_MEDIVH_8, NPC_IMAGE_OF_MEDIVH, 0}, {0, 0, 0}, }; @@ -346,9 +368,12 @@ struct MANGOS_DLL_DECL npc_image_of_medivhAI : public ScriptedAI, private Dialog instance_karazhan* m_pInstance; - void Reset() - { - } + ObjectGuid m_eventStarterGuid; + + void Reset() { } + + void AttackStart(Unit* pWho) { } + void MoveInLineOfSight(Unit* pWho) { } void JustSummoned(Creature* pSummoned) { @@ -356,7 +381,7 @@ struct MANGOS_DLL_DECL npc_image_of_medivhAI : public ScriptedAI, private Dialog { pSummoned->SetLevitate(true); pSummoned->SetWalk(false); - pSummoned->GetMotionMaster()->MovePoint(1, afArcanagosMoveLoc[0], afArcanagosMoveLoc[1], afArcanagosMoveLoc[2]); + pSummoned->GetMotionMaster()->MovePoint(POINT_ID_INTRO, afArcanagosMoveLoc[0], afArcanagosMoveLoc[1], afArcanagosMoveLoc[2]); pSummoned->SetByteFlag(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_UNK_2); } } @@ -369,18 +394,55 @@ struct MANGOS_DLL_DECL npc_image_of_medivhAI : public ScriptedAI, private Dialog switch (uiPointId) { case POINT_ID_INTRO: - // ToDo: start dialogue here + StartNextDialogueText(NPC_IMAGE_OF_MEDIVH); break; case POINT_ID_DESPAWN: + pSummoned->ForcedDespawn(); + m_creature->ForcedDespawn(10000); + m_creature->GetMotionMaster()->MovePoint(0, afMedivhExitLoc[0], afMedivhExitLoc[1], afMedivhExitLoc[2]); + // complete quest + if (Player* pPlayer = m_creature->GetMap()->GetPlayer(m_eventStarterGuid)) + pPlayer->GroupEventHappens(QUEST_MASTERS_TERRACE, m_creature); break; } } + void SpellHit(Unit* pCaster, const SpellEntry* pSpell) + { + if (pSpell->Id == SPELL_FIREBALL_REFLECT && pCaster->GetEntry() == NPC_IMAGE_OF_ARCANAGOS) + { + StartNextDialogueText(SPELL_MANA_SHIELD); + DoCastSpellIfCan(m_creature, SPELL_MANA_SHIELD); + } + } + void JustDidDialogueStep(int32 iEntry) { - // ToDo: + if (!m_pInstance) + return; + + switch (iEntry) + { + case SAY_ARCANAGOS_6: + if (Creature* pDragon = m_pInstance->GetSingleCreatureFromStorage(NPC_IMAGE_OF_ARCANAGOS)) + DoCastSpellIfCan(pDragon, SPELL_FIREBALL); + break; + case EMOTE_CAST_SPELL: + DoCastSpellIfCan(m_creature, SPELL_EVOCATION); + break; + case SPELL_CONFLAG_BLAST: + m_creature->RemoveAurasDueToSpell(SPELL_EVOCATION); + if (Creature* pDragon = m_pInstance->GetSingleCreatureFromStorage(NPC_IMAGE_OF_ARCANAGOS)) + { + DoCastSpellIfCan(pDragon, SPELL_CONFLAG_BLAST, CAST_TRIGGERED); + pDragon->GetMotionMaster()->MovePoint(POINT_ID_DESPAWN, afArcanagosFleeLoc[0], afArcanagosFleeLoc[1], afArcanagosFleeLoc[2]); + } + break; + } } + void SetEventStarter(ObjectGuid m_starterGuid) { m_eventStarterGuid = m_starterGuid; } + void UpdateAI(const uint32 uiDiff) { DialogueUpdate(uiDiff); } }; @@ -389,13 +451,57 @@ CreatureAI* GetAI_npc_image_of_medivhAI(Creature* pCreature) return new npc_image_of_medivhAI(pCreature); } +/*###### +# npc_image_arcanagos +######*/ + +struct MANGOS_DLL_DECL npc_image_arcanagosAI : public ScriptedAI +{ + npc_image_arcanagosAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } + + void Reset() { } + + void SpellHit(Unit* pCaster, const SpellEntry* pSpell) + { + if (pSpell->Id == SPELL_FIREBALL && pCaster->GetEntry() == NPC_IMAGE_OF_MEDIVH) + { + // !!!Workaround Alert!!! - the spell should be cast on Medivh without changing the unit flags! + pCaster->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + + DoCastSpellIfCan(pCaster, SPELL_FIREBALL_REFLECT, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_REFLECTION, CAST_TRIGGERED); + + pCaster->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + } + } + + void AttackStart(Unit* pWho) { } + void MoveInLineOfSight(Unit* pWho) { } + void UpdateAI (const uint32 uiDiff) { } +}; + +CreatureAI* GetAI_npc_image_arcanagosAI(Creature* pCreature) +{ + return new npc_image_arcanagosAI(pCreature); +} + +/*###### +# event_spell_medivh_journal +######*/ + bool ProcessEventId_event_spell_medivh_journal(uint32 uiEventId, Object* pSource, Object* pTarget, bool bIsStart) { if (bIsStart && pSource->GetTypeId() == TYPEID_PLAYER) { // Summon Medivh and Arcanagos if (Creature* pMedivh = ((Player*)pSource)->SummonCreature(NPC_IMAGE_OF_MEDIVH, afMedivhSpawnLoc[0], afMedivhSpawnLoc[1], afMedivhSpawnLoc[2], afMedivhSpawnLoc[3], TEMPSUMMON_DEAD_DESPAWN, 0)) + { pMedivh->SummonCreature(NPC_IMAGE_OF_ARCANAGOS, afArcanagosSpawnLoc[0], afArcanagosSpawnLoc[1], afArcanagosSpawnLoc[2], afArcanagosSpawnLoc[2], TEMPSUMMON_DEAD_DESPAWN, 0); + + // store the player who started the event + if (npc_image_of_medivhAI* pMedivhAI = dynamic_cast(pMedivh->AI())) + pMedivhAI->SetEventStarter(pSource->GetObjectGuid()); + } } return true; @@ -423,6 +529,11 @@ void AddSC_karazhan() pNewScript->GetAI = &GetAI_npc_image_of_medivhAI; pNewScript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "npc_image_arcanagos"; + pNewScript->GetAI = &GetAI_npc_image_arcanagosAI; + pNewScript->RegisterSelf(); + pNewScript = new Script; pNewScript->Name = "event_spell_medivh_journal"; pNewScript->pProcessEventId = &ProcessEventId_event_spell_medivh_journal; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 1495ef31e..cff8fddaf 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2702" + #define SD2_REVISION_NR "2703" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 75a04a8ed..344a3ddd5 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -741,6 +741,7 @@ UPDATE creature_template SET ScriptName='npc_berthold' WHERE entry=16153; UPDATE creature_template SET ScriptName='npc_barnes' WHERE entry=16812; UPDATE creature_template SET ScriptName='npc_grandmother' WHERE entry=17603; UPDATE creature_template SET ScriptName='npc_image_of_medivh' WHERE entry=17651; +UPDATE creature_template SET ScriptName='npc_image_arcanagos' WHERE entry=17652; DELETE FROM scripted_event_id WHERE id=10951; INSERT INTO scripted_event_id VALUES (10951,'event_spell_medivh_journal'); diff --git a/sql/updates/r2703_mangos.sql b/sql/updates/r2703_mangos.sql new file mode 100644 index 000000000..980044589 --- /dev/null +++ b/sql/updates/r2703_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_image_arcanagos' WHERE entry=17652; From db37a822fcf9404c2e3fe8783e5ee142bccebd86 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Mon, 3 Sep 2012 21:25:46 +0300 Subject: [PATCH 0694/1172] [2704] Implement script support for Nightbane - Part I This will implement intro and ground phase script Also, fix a typo from a previous commit --- .../karazhan/boss_nightbane.cpp | 218 +++++++++++++++++- .../eastern_kingdoms/karazhan/karazhan.cpp | 2 +- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 5 +- sql/scriptdev2_script_full.sql | 44 +++- sql/updates/r2704_mangos.sql | 4 + sql/updates/r2704_scriptdev2.sql | 42 ++++ 7 files changed, 309 insertions(+), 8 deletions(-) create mode 100644 sql/updates/r2704_mangos.sql create mode 100644 sql/updates/r2704_scriptdev2.sql diff --git a/scripts/eastern_kingdoms/karazhan/boss_nightbane.cpp b/scripts/eastern_kingdoms/karazhan/boss_nightbane.cpp index bd9117ee1..4a2aba451 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_nightbane.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_nightbane.cpp @@ -16,25 +16,237 @@ /* ScriptData SDName: Boss_Nightbane -SD%Complete: 0 -SDComment: Place holder +SD%Complete: 50 +SDComment: Only ground phase. Intro movement is a little choppy because of the lack of waypoint movement support. Timers need adjustment. SDCategory: Karazhan EndScriptData */ #include "precompiled.h" +#include "karazhan.h" +#include "escort_ai.h" enum { + EMOTE_AWAKEN = -1532125, + SAY_AGGRO = -1532126, + SAY_AIR_PHASE = -1532127, + SAY_LAND_PHASE_1 = -1532128, + SAY_LAND_PHASE_2 = -1532129, + EMOTE_DEEP_BREATH = -1532130, + + // ground phase spells SPELL_BELLOWING_ROAR = 39427, SPELL_CHARRED_EARTH = 30129, //Also 30209 (Target Charred Earth) triggers this SPELL_DISTRACTING_ASH = 30130, SPELL_SMOLDERING_BREATH = 30210, SPELL_TAIL_SWEEP = 25653, - SPELL_RAIN_OF_BONES = 37098, + SPELL_CLEAVE = 30131, + + // air phase spells + SPELL_RAIN_OF_BONES = 37098, // triggers 30170 on dummy aura apply SPELL_SMOKING_BLAST = 37057, SPELL_FIREBALL_BARRAGE = 30282 }; +struct MANGOS_DLL_DECL boss_nightbaneAI : public npc_escortAI +{ + boss_nightbaneAI(Creature* pCreature) : npc_escortAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; + + bool m_bIsGroundPhase; + uint8 m_uiPhase; + + uint32 m_uiBellowingRoarTimer; + uint32 m_uiCharredEarthTimer; + uint32 m_uiDistractingAshTimer; + uint32 m_uiSmolderingBreathTimer; + uint32 m_uiTailSweepTimer; + uint32 m_uiCleavetimer; + + void Reset() + { + m_bIsGroundPhase = true; + m_uiPhase = 3; + + m_uiBellowingRoarTimer = urand(20000, 30000); + m_uiCharredEarthTimer = urand(10000, 15000); + m_uiDistractingAshTimer = urand(7000, 17000); + m_uiSmolderingBreathTimer = urand(9000, 13000); + m_uiTailSweepTimer = urand(12000, 15000); + m_uiCleavetimer = urand(4000, 8000); + + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + } + + void Aggro(Unit* pWho) + { + DoScriptText(SAY_AGGRO, m_creature); + } + + void JustDied(Unit* pKiller) + { + if (m_pInstance) + m_pInstance->SetData(TYPE_NIGHTBANE, DONE); + } + + void JustReachedHome() + { + if (m_pInstance) + m_pInstance->SetData(TYPE_NIGHTBANE, FAIL); + + // Reset escort waypoints + npc_escortAI::JustRespawned(); + } + + void EnterEvadeMode() + { + // Use standard AI evade, in order to reset position + ScriptedAI::EnterEvadeMode(); + } + + void WaypointReached(uint32 uiPointId) + { + // Set in combat after the intro is done + if (uiPointId == 31) + { + SetEscortPaused(true); + m_creature->SetLevitate(false); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + m_creature->RemoveByteFlag(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_UNK_2); + + m_creature->SetInCombatWithZone(); + } + } + + void UpdateEscortAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + // Ground phase + if (m_bIsGroundPhase) + { + if (m_uiBellowingRoarTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_BELLOWING_ROAR) == CAST_OK) + m_uiBellowingRoarTimer = urand(20000, 30000); + } + else + m_uiBellowingRoarTimer -= uiDiff; + + if (m_uiSmolderingBreathTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_SMOLDERING_BREATH) == CAST_OK) + m_uiSmolderingBreathTimer = urand(14000, 20000); + } + else + m_uiSmolderingBreathTimer -= uiDiff; + + if (m_uiDistractingAshTimer < uiDiff) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, SPELL_DISTRACTING_ASH) == CAST_OK) + m_uiDistractingAshTimer = urand(35000, 45000); + } + } + else + m_uiDistractingAshTimer -= uiDiff; + + if (m_uiCharredEarthTimer < uiDiff) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, SPELL_CHARRED_EARTH) == CAST_OK) + m_uiCharredEarthTimer = urand(25000, 35000); + } + } + else + m_uiCharredEarthTimer -= uiDiff; + + if (m_uiTailSweepTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_TAIL_SWEEP) == CAST_OK) + m_uiTailSweepTimer = urand(14000, 20000); + } + else + m_uiTailSweepTimer -= uiDiff; + + if (m_uiCleavetimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_CLEAVE) == CAST_OK) + m_uiCleavetimer = urand(6000, 12000); + } + else + m_uiCleavetimer -= uiDiff; + + if (m_creature->GetHealthPercent() < 100 - 25*m_uiPhase) + { + // ToDo: change phase + --m_uiPhase; + } + + DoMeleeAttackIfReady(); + } + // Air phase + else + { + // ToDo: + } + } +}; + +CreatureAI* GetAI_boss_nightbane(Creature* pCreature) +{ + return new boss_nightbaneAI(pCreature); +} + +bool ProcessEventId_event_spell_summon_nightbane(uint32 uiEventId, Object* pSource, Object* pTarget, bool bIsStart) +{ + if (bIsStart && pSource->GetTypeId() == TYPEID_PLAYER) + { + ScriptedInstance* pInstance = (ScriptedInstance*)((Player*)pSource)->GetInstanceData(); + if (!pInstance) + return false; + + if (pInstance->GetData(TYPE_NIGHTBANE) == NOT_STARTED || pInstance->GetData(TYPE_NIGHTBANE) == FAIL) + { + if (Creature* pNightbane = pInstance->GetSingleCreatureFromStorage(NPC_NIGHTBANE)) + { + DoScriptText(EMOTE_AWAKEN, ((Player*)pSource)); + pInstance->SetData(TYPE_NIGHTBANE, IN_PROGRESS); + + // Sort of a hack, it is unclear how this really work but the values appear to be valid (see Onyxia, too) + pNightbane->SetStandState(UNIT_STAND_STATE_STAND); + pNightbane->SetByteValue(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_UNK_2); + pNightbane->SetLevitate(true); + + // Switch to waypoint movement + if (boss_nightbaneAI* pNightbaneAI = dynamic_cast(pNightbane->AI())) + pNightbaneAI->Start(true); + } + } + } + + return true; +} + void AddSC_boss_nightbane() { + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_nightbane"; + pNewScript->GetAI = &GetAI_boss_nightbane; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "event_spell_summon_nightbane"; + pNewScript->pProcessEventId = &ProcessEventId_event_spell_summon_nightbane; + pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/karazhan/karazhan.cpp b/scripts/eastern_kingdoms/karazhan/karazhan.cpp index 3808744b1..f8927b233 100644 --- a/scripts/eastern_kingdoms/karazhan/karazhan.cpp +++ b/scripts/eastern_kingdoms/karazhan/karazhan.cpp @@ -335,7 +335,7 @@ enum static const float afMedivhSpawnLoc[4] = {-11153.18f, -1889.65f, 91.47f, 2.07f}; static const float afMedivhExitLoc[3] = {-11121.81f, -1881.24f, 91.47f}; -static const float afArcanagosSpawnLoc[4] = {-11242.66f, -1778.55f, 125.35f}; +static const float afArcanagosSpawnLoc[4] = {-11242.66f, -1778.55f, 125.35f, 0.0f}; static const float afArcanagosMoveLoc[3] = {-11170.28f, -1865.09f, 125.35f}; static const float afArcanagosFleeLoc[3] = {-11003.70f, -1760.18f, 180.25f}; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index cff8fddaf..15a20c14b 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2703" + #define SD2_REVISION_NR "2704" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 344a3ddd5..29b2ff38c 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -732,7 +732,7 @@ UPDATE creature_template SET ScriptName='boss_terestian_illhoof' WHERE entry=156 UPDATE creature_template SET ScriptName='boss_shade_of_aran' WHERE entry=16524; UPDATE creature_template SET ScriptName='boss_netherspite' WHERE entry=15689; UPDATE creature_template SET ScriptName='boss_malchezaar' WHERE entry=15690; --- UPDATE creature_template SET ScriptName='boss_nightbane' WHERE entry=17225; +UPDATE creature_template SET ScriptName='boss_nightbane' WHERE entry=17225; UPDATE creature_template SET ScriptName='boss_bigbadwolf' WHERE entry=17521; UPDATE creature_template SET ScriptName='mob_demon_chain' WHERE entry=17248; UPDATE creature_template SET ScriptName='npc_fiendish_portal' WHERE entry=17265; @@ -742,8 +742,9 @@ UPDATE creature_template SET ScriptName='npc_barnes' WHERE entry=16812; UPDATE creature_template SET ScriptName='npc_grandmother' WHERE entry=17603; UPDATE creature_template SET ScriptName='npc_image_of_medivh' WHERE entry=17651; UPDATE creature_template SET ScriptName='npc_image_arcanagos' WHERE entry=17652; -DELETE FROM scripted_event_id WHERE id=10951; +DELETE FROM scripted_event_id WHERE id IN (10591,10951); INSERT INTO scripted_event_id VALUES +(10591,'event_spell_summon_nightbane'), (10951,'event_spell_medivh_journal'); /* LOCH MODAN */ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index fa61d9b93..c759acb54 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -1668,7 +1668,14 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1532121,'You leave me no alternative. I will stop you by force if you wont listen to reason.',0,1,0,0,'arcanagos SAY_ARCANAGOS_6'), (-1532122,'%s begins to cast a spell of great power, weaving his own essence into the magic.',0,2,0,0,'image of medivh EMOTE_CAST_SPELL'), (-1532123,'What have you done, wizard? This cannot be! I\'m burning from... within!',0,1,0,0,'arcanagos SAY_ARCANAGOS_7'), -(-1532124,'He should not have angered me. I must go... recover my strength now...',0,0,0,0,'image of medivh SAY_MEDIVH_8'); +(-1532124,'He should not have angered me. I must go... recover my strength now...',0,0,0,0,'image of medivh SAY_MEDIVH_8'), + +(-1532125,'An ancient being awakens in the distance...',0,2,0,0,'nightbane EMOTE_AWAKEN'), +(-1532126,'What fools! I shall bring a quick end to your suffering!',0,1,0,0,'nightbane SAY_AGGRO'), +(-1532127,'Miserable vermin. I shall exterminate you from the air!',0,1,0,0,'nightbane SAY_AIR_PHASE'), +(-1532128,'Enough! I shall land and crush you myself!',0,1,0,0,'nightbane SAY_LAND_PHASE_1'), +(-1532129,'Insects! Let me show you my strength up close!',0,1,0,0,'nightbane SAY_LAND_PHASE_2'), +(-1532130,'%s takes a deep breath.',0,3,0,0,'nightbane EMOTE_DEEP_BREATH'); -- -1 533 000 NAXXRAMAS INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES @@ -6940,4 +6947,39 @@ INSERT INTO script_waypoint VALUES (9023, 57, 452.45, 29.85, -70.37, 1500, 'SAY_WINDSOR_FREE_1'), (9023, 58, 452.45, 29.85, -70.37, 15000, 'SAY_WINDSOR_FREE_2'); +DELETE FROM script_waypoint WHERE entry=17225; +INSERT INTO script_waypoint VALUES +(17225, 0, -11033.51, -1784.65, 182.284, 3000, ''), +(17225, 1, -11107.57, -1873.36, 136.878, 0, ''), +(17225, 2, -11118.71, -1883.65, 132.441, 0, ''), +(17225, 3, -11132.92, -1888.12, 128.969, 0, ''), +(17225, 4, -11150.31, -1890.54, 126.557, 0, ''), +(17225, 5, -11160.64, -1891.63, 124.793, 0, ''), +(17225, 6, -11171.52, -1889.45, 123.417, 0, ''), +(17225, 7, -11183.46, -1884.09, 119.754, 0, ''), +(17225, 8, -11196.25, -1874.01, 115.227, 0, ''), +(17225, 9, -11205.59, -1859.66, 110.216, 0, ''), +(17225, 10, -11236.53, -1818.03, 97.3972, 0, ''), +(17225, 11, -11253.11, -1794.48, 93.3101, 0, ''), +(17225, 12, -11254.86, -1787.13, 92.5174, 0, ''), +(17225, 13, -11253.32, -1777.08, 91.7739, 0, ''), +(17225, 14, -11247.48, -1770.27, 92.4183, 0, ''), +(17225, 15, -11238.61, -1766.51, 94.6417, 0, ''), +(17225, 16, -11227.56, -1767.22, 100.256, 0, ''), +(17225, 17, -11218.41, -1770.55, 107.859, 0, ''), +(17225, 18, -11204.81, -1781.77, 110.383, 0, ''), +(17225, 19, -11195.77, -1801.07, 110.833, 0, ''), +(17225, 20, -11195.81, -1824.66, 113.936, 0, ''), +(17225, 21, -11197.11, -1860.01, 117.945, 0, ''), +(17225, 22, -11194.60, -1884.23, 121.401, 0, ''), +(17225, 23, -11184.21, -1894.78, 120.326, 0, ''), +(17225, 24, -11176.91, -1899.84, 119.844, 0, ''), +(17225, 25, -11168.13, -1901.77, 118.958, 0, ''), +(17225, 26, -11154.91, -1901.66, 117.218, 0, ''), +(17225, 27, -11143.15, -1901.22, 115.885, 0, ''), +(17225, 28, -11131.19, -1897.59, 113.722, 0, ''), +(17225, 29, -11121.31, -1890.25, 111.643, 0, ''), +(17225, 30, -11118.22, -1883.83, 110.595, 3000, ''), +(17225, 31, -11118.45, -1883.68, 91.473, 0, 'start combat'); + -- EOF diff --git a/sql/updates/r2704_mangos.sql b/sql/updates/r2704_mangos.sql new file mode 100644 index 000000000..18a79d165 --- /dev/null +++ b/sql/updates/r2704_mangos.sql @@ -0,0 +1,4 @@ +UPDATE creature_template SET ScriptName='boss_nightbane' WHERE entry=17225; +DELETE FROM scripted_event_id WHERE id in (10591); +INSERT INTO scripted_event_id VALUES +(10591,'event_spell_summon_nightbane'); diff --git a/sql/updates/r2704_scriptdev2.sql b/sql/updates/r2704_scriptdev2.sql new file mode 100644 index 000000000..5a50904fe --- /dev/null +++ b/sql/updates/r2704_scriptdev2.sql @@ -0,0 +1,42 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1532130 AND -1532125; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1532125,'An ancient being awakens in the distance...',0,2,0,0,'nightbane EMOTE_AWAKEN'), +(-1532126,'What fools! I shall bring a quick end to your suffering!',0,1,0,0,'nightbane SAY_AGGRO'), +(-1532127,'Miserable vermin. I shall exterminate you from the air!',0,1,0,0,'nightbane SAY_AIR_PHASE'), +(-1532128,'Enough! I shall land and crush you myself!',0,1,0,0,'nightbane SAY_LAND_PHASE_1'), +(-1532129,'Insects! Let me show you my strength up close!',0,1,0,0,'nightbane SAY_LAND_PHASE_2'), +(-1532130,'%s takes a deep breath.',0,3,0,0,'nightbane EMOTE_DEEP_BREATH'); +DELETE FROM script_waypoint WHERE entry=17225; +INSERT INTO script_waypoint VALUES +(17225, 0, -11033.51, -1784.65, 182.284, 3000, ''), +(17225, 1, -11107.57, -1873.36, 136.878, 0, ''), +(17225, 2, -11118.71, -1883.65, 132.441, 0, ''), +(17225, 3, -11132.92, -1888.12, 128.969, 0, ''), +(17225, 4, -11150.31, -1890.54, 126.557, 0, ''), +(17225, 5, -11160.64, -1891.63, 124.793, 0, ''), +(17225, 6, -11171.52, -1889.45, 123.417, 0, ''), +(17225, 7, -11183.46, -1884.09, 119.754, 0, ''), +(17225, 8, -11196.25, -1874.01, 115.227, 0, ''), +(17225, 9, -11205.59, -1859.66, 110.216, 0, ''), +(17225, 10, -11236.53, -1818.03, 97.3972, 0, ''), +(17225, 11, -11253.11, -1794.48, 93.3101, 0, ''), +(17225, 12, -11254.86, -1787.13, 92.5174, 0, ''), +(17225, 13, -11253.32, -1777.08, 91.7739, 0, ''), +(17225, 14, -11247.48, -1770.27, 92.4183, 0, ''), +(17225, 15, -11238.61, -1766.51, 94.6417, 0, ''), +(17225, 16, -11227.56, -1767.22, 100.256, 0, ''), +(17225, 17, -11218.41, -1770.55, 107.859, 0, ''), +(17225, 18, -11204.81, -1781.77, 110.383, 0, ''), +(17225, 19, -11195.77, -1801.07, 110.833, 0, ''), +(17225, 20, -11195.81, -1824.66, 113.936, 0, ''), +(17225, 21, -11197.11, -1860.01, 117.945, 0, ''), +(17225, 22, -11194.60, -1884.23, 121.401, 0, ''), +(17225, 23, -11184.21, -1894.78, 120.326, 0, ''), +(17225, 24, -11176.91, -1899.84, 119.844, 0, ''), +(17225, 25, -11168.13, -1901.77, 118.958, 0, ''), +(17225, 26, -11154.91, -1901.66, 117.218, 0, ''), +(17225, 27, -11143.15, -1901.22, 115.885, 0, ''), +(17225, 28, -11131.19, -1897.59, 113.722, 0, ''), +(17225, 29, -11121.31, -1890.25, 111.643, 0, ''), +(17225, 30, -11118.22, -1883.83, 110.595, 3000, ''), +(17225, 31, -11118.45, -1883.68, 91.473, 0, 'start combat'); From 4413370d365ac739f6f49fbc400f3b942bbb3df4 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Tue, 4 Sep 2012 00:12:42 +0300 Subject: [PATCH 0695/1172] [2705] Implement script support for Nightbane - Part II Note: air phase end movement NYI spell 30170 requires additional research - maybe core support --- .../karazhan/boss_nightbane.cpp | 282 +++++++++++++----- .../karazhan/instance_karazhan.cpp | 6 + scripts/eastern_kingdoms/karazhan/karazhan.h | 6 + sd2_revision_nr.h | 2 +- 4 files changed, 228 insertions(+), 68 deletions(-) diff --git a/scripts/eastern_kingdoms/karazhan/boss_nightbane.cpp b/scripts/eastern_kingdoms/karazhan/boss_nightbane.cpp index 4a2aba451..06dd172cf 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_nightbane.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_nightbane.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: Boss_Nightbane -SD%Complete: 50 -SDComment: Only ground phase. Intro movement is a little choppy because of the lack of waypoint movement support. Timers need adjustment. +SD%Complete: 80 +SDComment: Intro movement is a little choppy because of the lack of waypoint movement support. Air phase movement requires improvement. Timers need adjustment. SDCategory: Karazhan EndScriptData */ @@ -37,52 +37,74 @@ enum // ground phase spells SPELL_BELLOWING_ROAR = 39427, SPELL_CHARRED_EARTH = 30129, //Also 30209 (Target Charred Earth) triggers this - SPELL_DISTRACTING_ASH = 30130, SPELL_SMOLDERING_BREATH = 30210, SPELL_TAIL_SWEEP = 25653, SPELL_CLEAVE = 30131, // air phase spells - SPELL_RAIN_OF_BONES = 37098, // triggers 30170 on dummy aura apply + SPELL_DISTRACTING_ASH = 30130, + SPELL_RAIN_OF_BONES = 37098, // should trigger 30170 SPELL_SMOKING_BLAST = 37057, - SPELL_FIREBALL_BARRAGE = 30282 + SPELL_FIREBALL_BARRAGE = 30282, + + PHASE_GROUND = 1, + PHASE_AIR = 2, + PHASE_TRANSITION = 3, + + // These points are a placeholder for the air phase movement. The dragon should do some circles around the area before landing again + POINT_ID_AIR = 1, + POINT_ID_GROUND = 2, }; struct MANGOS_DLL_DECL boss_nightbaneAI : public npc_escortAI { boss_nightbaneAI(Creature* pCreature) : npc_escortAI(pCreature) { - m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_pInstance = (instance_karazhan*)pCreature->GetInstanceData(); Reset(); } - ScriptedInstance* m_pInstance; + instance_karazhan* m_pInstance; - bool m_bIsGroundPhase; uint8 m_uiPhase; + uint8 m_uiFlightPhase; + uint32 m_uiPhaseResetTimer; uint32 m_uiBellowingRoarTimer; uint32 m_uiCharredEarthTimer; - uint32 m_uiDistractingAshTimer; uint32 m_uiSmolderingBreathTimer; uint32 m_uiTailSweepTimer; uint32 m_uiCleavetimer; + uint32 m_uiDistractingAshTimer; + uint32 m_uiRainBonesTimer; + uint32 m_uiSmokingBlastTimer; + uint32 m_uiFireballBarrageTimer; + void Reset() { - m_bIsGroundPhase = true; - m_uiPhase = 3; + m_uiPhase = PHASE_GROUND; + m_uiFlightPhase = 1; m_uiBellowingRoarTimer = urand(20000, 30000); m_uiCharredEarthTimer = urand(10000, 15000); - m_uiDistractingAshTimer = urand(7000, 17000); m_uiSmolderingBreathTimer = urand(9000, 13000); m_uiTailSweepTimer = urand(12000, 15000); m_uiCleavetimer = urand(4000, 8000); + SetCombatMovement(true); m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); } + void DoResetAirTimers() + { + m_uiPhaseResetTimer = urand(20000, 40000); + m_uiRainBonesTimer = 3000; + m_uiDistractingAshTimer = urand(10000, 12000); + m_uiSmokingBlastTimer = urand(10000, 12000); + m_uiFireballBarrageTimer = 10000; + } + void Aggro(Unit* pWho) { DoScriptText(SAY_AGGRO, m_creature); @@ -123,80 +145,206 @@ struct MANGOS_DLL_DECL boss_nightbaneAI : public npc_escortAI } } - void UpdateEscortAI(const uint32 uiDiff) + void MovementInform(uint32 uiMotionType, uint32 uiPointId) { - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + if (uiMotionType != POINT_MOTION_TYPE) return; - // Ground phase - if (m_bIsGroundPhase) + if (!m_creature->getVictim()) + npc_escortAI::MovementInform(uiMotionType, uiPointId); + else { - if (m_uiBellowingRoarTimer < uiDiff) + switch (uiPointId) { - if (DoCastSpellIfCan(m_creature, SPELL_BELLOWING_ROAR) == CAST_OK) - m_uiBellowingRoarTimer = urand(20000, 30000); + case POINT_ID_AIR: + m_uiPhase = PHASE_AIR; + break; + case POINT_ID_GROUND: + m_creature->SetLevitate(false); + m_creature->RemoveByteFlag(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_UNK_2); + + m_uiPhase = PHASE_GROUND; + SetCombatMovement(true); + DoStartMovement(m_creature->getVictim()); + break; } - else - m_uiBellowingRoarTimer -= uiDiff; + } + } + + void JustSummoned(Creature* pSummoned) + { + if (m_creature->getVictim()) + pSummoned->AI()->AttackStart(m_creature->getVictim()); + } + + // Wrapper to handle movement to the closest trigger + void DoMoveToClosestTrigger(bool bGround) + { + if (!m_pInstance) + return; + + Unit* pChosenTrigger; + GuidList lTriggersList; + float fX, fY, fZ; - if (m_uiSmolderingBreathTimer < uiDiff) + // get the list of wanted triggers + bGround ? m_pInstance->GetNightbaneGroundTriggers(lTriggersList) : m_pInstance->GetNightbaneAirTriggers(lTriggersList); + + // calculate the closest trigger from the list + for (GuidList::const_iterator itr = lTriggersList.begin(); itr != lTriggersList.end(); ++itr) + { + if (Creature* pTrigger = m_creature->GetMap()->GetCreature(*itr)) { - if (DoCastSpellIfCan(m_creature, SPELL_SMOLDERING_BREATH) == CAST_OK) - m_uiSmolderingBreathTimer = urand(14000, 20000); + if (!pTrigger || m_creature->GetDistanceOrder(pTrigger, pChosenTrigger, false)) + pChosenTrigger = pTrigger; } - else - m_uiSmolderingBreathTimer -= uiDiff; + } - if (m_uiDistractingAshTimer < uiDiff) - { - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + // Move to trigger position + if (pChosenTrigger) + { + pChosenTrigger->GetPosition(fX, fY, fZ); + m_creature->GetMotionMaster()->MovePoint(bGround ? POINT_ID_GROUND : POINT_ID_AIR, fX, fY, fZ); + } + } + + void UpdateEscortAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + switch (m_uiPhase) + { + case PHASE_GROUND: + + if (m_uiBellowingRoarTimer < uiDiff) { - if (DoCastSpellIfCan(pTarget, SPELL_DISTRACTING_ASH) == CAST_OK) - m_uiDistractingAshTimer = urand(35000, 45000); + if (DoCastSpellIfCan(m_creature, SPELL_BELLOWING_ROAR) == CAST_OK) + m_uiBellowingRoarTimer = urand(20000, 30000); } - } - else - m_uiDistractingAshTimer -= uiDiff; + else + m_uiBellowingRoarTimer -= uiDiff; - if (m_uiCharredEarthTimer < uiDiff) - { - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + if (m_uiSmolderingBreathTimer < uiDiff) { - if (DoCastSpellIfCan(pTarget, SPELL_CHARRED_EARTH) == CAST_OK) - m_uiCharredEarthTimer = urand(25000, 35000); + if (DoCastSpellIfCan(m_creature, SPELL_SMOLDERING_BREATH) == CAST_OK) + m_uiSmolderingBreathTimer = urand(14000, 20000); } - } - else - m_uiCharredEarthTimer -= uiDiff; + else + m_uiSmolderingBreathTimer -= uiDiff; - if (m_uiTailSweepTimer < uiDiff) - { - if (DoCastSpellIfCan(m_creature, SPELL_TAIL_SWEEP) == CAST_OK) - m_uiTailSweepTimer = urand(14000, 20000); - } - else - m_uiTailSweepTimer -= uiDiff; + if (m_uiCharredEarthTimer < uiDiff) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, SPELL_CHARRED_EARTH) == CAST_OK) + m_uiCharredEarthTimer = urand(25000, 35000); + } + } + else + m_uiCharredEarthTimer -= uiDiff; - if (m_uiCleavetimer < uiDiff) - { - if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_CLEAVE) == CAST_OK) - m_uiCleavetimer = urand(6000, 12000); - } - else - m_uiCleavetimer -= uiDiff; + if (m_uiTailSweepTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_TAIL_SWEEP) == CAST_OK) + m_uiTailSweepTimer = urand(14000, 20000); + } + else + m_uiTailSweepTimer -= uiDiff; - if (m_creature->GetHealthPercent() < 100 - 25*m_uiPhase) - { - // ToDo: change phase - --m_uiPhase; - } + if (m_uiCleavetimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_CLEAVE) == CAST_OK) + m_uiCleavetimer = urand(6000, 12000); + } + else + m_uiCleavetimer -= uiDiff; - DoMeleeAttackIfReady(); - } - // Air phase - else - { - // ToDo: + if (m_creature->GetHealthPercent() < 100 - 25*m_uiFlightPhase) + { + // Start air phase movement (handled by creature_movement_template) + SetCombatMovement(false); + m_creature->SetByteValue(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_UNK_2); + m_creature->SetLevitate(true); + DoMoveToClosestTrigger(false); + + DoScriptText(SAY_AIR_PHASE, m_creature); + m_uiPhase = PHASE_TRANSITION; + DoResetAirTimers(); + ++m_uiFlightPhase; + } + + DoMeleeAttackIfReady(); + + break; + case PHASE_AIR: + + if (m_uiRainBonesTimer) + { + if (m_uiRainBonesTimer <= uiDiff) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, SPELL_RAIN_OF_BONES) == CAST_OK) + { + DoScriptText(EMOTE_DEEP_BREATH, m_creature); + m_uiRainBonesTimer = 0; + } + } + } + else + m_uiRainBonesTimer -= uiDiff; + } + + if (m_uiDistractingAshTimer < uiDiff) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, SPELL_DISTRACTING_ASH) == CAST_OK) + m_uiDistractingAshTimer = urand(7000, 13000); + } + } + else + m_uiDistractingAshTimer -= uiDiff; + + if (m_uiSmokingBlastTimer < uiDiff) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, SPELL_SMOKING_BLAST) == CAST_OK) + m_uiSmokingBlastTimer = urand(1000, 3000); + } + } + else + m_uiSmokingBlastTimer -= uiDiff; + + if (m_uiFireballBarrageTimer < uiDiff) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0, SPELL_FIREBALL_BARRAGE, SELECT_FLAG_NOT_IN_MELEE_RANGE)) + { + if (DoCastSpellIfCan(pTarget, SPELL_FIREBALL_BARRAGE) == CAST_OK) + m_uiFireballBarrageTimer = urand(3000, 6000); + } + } + else + m_uiFireballBarrageTimer -= uiDiff; + + if (m_uiPhaseResetTimer < uiDiff) + { + // ToDo: more circle movement should be done here! + DoScriptText(urand(0, 1) ? SAY_LAND_PHASE_1 : SAY_LAND_PHASE_2, m_creature); + DoMoveToClosestTrigger(true); + + m_uiPhase = PHASE_TRANSITION; + m_uiPhaseResetTimer = 20000; + } + else + m_uiPhaseResetTimer -= uiDiff; + + break; + case PHASE_TRANSITION: + // nothing here + break; } } }; diff --git a/scripts/eastern_kingdoms/karazhan/instance_karazhan.cpp b/scripts/eastern_kingdoms/karazhan/instance_karazhan.cpp index de6a17c2e..106dc2456 100644 --- a/scripts/eastern_kingdoms/karazhan/instance_karazhan.cpp +++ b/scripts/eastern_kingdoms/karazhan/instance_karazhan.cpp @@ -92,6 +92,12 @@ void instance_karazhan::OnCreatureCreate(Creature* pCreature) case NPC_IMAGE_OF_ARCANAGOS: m_mNpcEntryGuidStore[pCreature->GetEntry()] = pCreature->GetObjectGuid(); break; + case NPC_NIGHTBANE_HELPER: + if (pCreature->GetPositionZ() < 100.0f) + m_lNightbaneGroundTriggers.push_back(pCreature->GetObjectGuid()); + else + m_lNightbaneAirTriggers.push_back(pCreature->GetObjectGuid()); + break; } } diff --git a/scripts/eastern_kingdoms/karazhan/karazhan.h b/scripts/eastern_kingdoms/karazhan/karazhan.h index 261588341..b50e8ae77 100644 --- a/scripts/eastern_kingdoms/karazhan/karazhan.h +++ b/scripts/eastern_kingdoms/karazhan/karazhan.h @@ -29,6 +29,7 @@ enum NPC_BARNES = 16812, // NPC_TERESTIAN = 15688, NPC_NIGHTBANE = 17225, + NPC_NIGHTBANE_HELPER = 17260, // Moroes event related NPC_LADY_KEIRA_BERRYBUCK = 17007, @@ -122,6 +123,9 @@ class MANGOS_DLL_DECL instance_karazhan : public ScriptedInstance void DoPrepareOperaStage(Creature* pOrganizer); + void GetNightbaneGroundTriggers(GuidList &lList) { lList = m_lNightbaneGroundTriggers; } + void GetNightbaneAirTriggers(GuidList &lList) { lList = m_lNightbaneAirTriggers; } + void Load(const char* chrIn); const char* Save() { return m_strInstData.c_str(); } @@ -134,6 +138,8 @@ class MANGOS_DLL_DECL instance_karazhan : public ScriptedInstance GuidList m_lOperaTreeGuidList; GuidList m_lOperaHayGuidList; + GuidList m_lNightbaneGroundTriggers; + GuidList m_lNightbaneAirTriggers; }; class MANGOS_DLL_DECL npc_fiendish_portalAI : public ScriptedAI diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 15a20c14b..855169324 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2704" + #define SD2_REVISION_NR "2705" #endif // __SD2_REVISION_NR_H__ From b281c50005b69d5441365e8d41308103f153432c Mon Sep 17 00:00:00 2001 From: Reamer Date: Tue, 4 Sep 2012 21:42:55 +0300 Subject: [PATCH 0696/1172] [2706] Cleanup and improve script for Prince Malchezaar - Karazhan Signed-off-by: Xfurry --- .../karazhan/boss_prince_malchezaar.cpp | 651 +++++------------- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 2 +- sql/updates/r2706_mangos.sql | 2 + 4 files changed, 174 insertions(+), 483 deletions(-) create mode 100644 sql/updates/r2706_mangos.sql diff --git a/scripts/eastern_kingdoms/karazhan/boss_prince_malchezaar.cpp b/scripts/eastern_kingdoms/karazhan/boss_prince_malchezaar.cpp index 4744eccda..4c706a073 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_prince_malchezaar.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_prince_malchezaar.cpp @@ -22,206 +22,97 @@ SDCategory: Karazhan EndScriptData */ #include "precompiled.h" +#include "karazhan.h" enum { - SAY_AGGRO = -1532091, - SAY_AXE_TOSS1 = -1532092, - SAY_AXE_TOSS2 = -1532093, - SAY_SPECIAL1 = -1532094, - SAY_SPECIAL2 = -1532095, - SAY_SPECIAL3 = -1532096, - SAY_SLAY1 = -1532097, - SAY_SLAY2 = -1532098, - SAY_SLAY3 = -1532099, - SAY_SUMMON1 = -1532100, - SAY_SUMMON2 = -1532101, - SAY_DEATH = -1532102, -}; - -// 18 Coordinates for Infernal spawns -struct InfernalPoint -{ - float x,y; -}; - -#define INFERNAL_Z 275.5 - -static InfernalPoint InfernalPoints[] = -{ - {-10922.8f, -1985.2f}, - {-10916.2f, -1996.2f}, - {-10932.2f, -2008.1f}, - {-10948.8f, -2022.1f}, - {-10958.7f, -1997.7f}, - {-10971.5f, -1997.5f}, - {-10990.8f, -1995.1f}, - {-10989.8f, -1976.5f}, - {-10971.6f, -1973.0f}, - {-10955.5f, -1974.0f}, - {-10939.6f, -1969.8f}, - {-10958.0f, -1952.2f}, - {-10941.7f, -1954.8f}, - {-10943.1f, -1988.5f}, - {-10948.8f, -2005.1f}, - {-10984.0f, -2019.3f}, - {-10932.8f, -1979.6f}, - {-10935.7f, -1996.0f} -}; - -enum -{ - TOTAL_INFERNAL_POINTS = 18, - -//Enfeeble is supposed to reduce hp to 1 and then heal player back to full when it ends -//Along with reducing healing and regen while enfeebled to 0% -//This spell effect will only reduce healing - - SPELL_ENFEEBLE = 30843, // Enfeeble during m_uiPhase 1 and 2 - SPELL_ENFEEBLE_EFFECT = 41624, - - SPELL_SHADOWNOVA = 30852, // Shadownova used during all phases - SPELL_SW_PAIN = 30854, // Shadow word pain during m_uiPhase 1 and 3 (different targeting rules though) - SPELL_THRASH_PASSIVE = 12787, // Extra attack chance during m_uiPhase 2 - SPELL_SUNDER_ARMOR = 30901, // Sunder armor during m_uiPhase 2 + SAY_AGGRO = -1532091, + SAY_AXE_TOSS1 = -1532092, + SAY_AXE_TOSS2 = -1532093, + SAY_SPECIAL1 = -1532094, + SAY_SPECIAL2 = -1532095, + SAY_SPECIAL3 = -1532096, + SAY_SLAY1 = -1532097, + SAY_SLAY2 = -1532098, + SAY_SLAY3 = -1532099, + SAY_SUMMON1 = -1532100, + SAY_SUMMON2 = -1532101, + SAY_DEATH = -1532102, + + //Enfeeble is supposed to reduce hp to 1 and then heal player back to full when it ends + SPELL_ENFEEBLE = 30843, // Enfeeble during phases 1 and 2 + SPELL_ENFEEBLE_EFFECT = 41624, // purpose unk - cast during the transition from phase 2 to 3 + SPELL_SHADOW_NOVA = 30852, // Shadownova used during all phases + SPELL_SW_PAIN_PHASE1 = 30854, // Shadow word pain during phase 1 + SPELL_SW_PAIN_PHASE3 = 30898, // Shadow word pain during phase 3 + SPELL_SUNDER_ARMOR = 30901, // Sunder armor during phase 2 SPELL_THRASH_AURA = 12787, // Passive proc chance for thrash - SPELL_EQUIP_AXES = 30857, // Visual for axe equiping - SPELL_AMPLIFY_DAMAGE = 39095, // Amplifiy during m_uiPhase 3 - SPELL_CLEAVE = 30131, // Same as Nightbane. - SPELL_HELLFIRE = 30859, // Infenals' hellfire aura - NETHERSPITE_INFERNAL = 17646, // The netherspite infernal creature - MALCHEZARS_AXE = 17650, // Malchezar's m_aAxeGuid (creatures), summoned during m_uiPhase 3 - - INFERNAL_MODEL_INVISIBLE = 11686, // Infernal Effects - SPELL_INFERNAL_RELAY = 30834, - - EQUIP_ID_AXE = 33542, // Axes info -}; - -//---------Infernal code first -struct MANGOS_DLL_DECL netherspite_infernalAI : public ScriptedAI -{ - netherspite_infernalAI(Creature* pCreature) : ScriptedAI(pCreature), - m_uiHellfireTimer(0), - m_uiCleanupTimer(0), - pPoint(NULL) - { - Reset(); - } + SPELL_SUMMON_AXES = 30891, // Summon 17650 + SPELL_EQUIP_AXES = 30857, // Visual for axe equiping - transition to phase 2 + SPELL_AMPLIFY_DAMAGE = 39095, // Amplifiy during phase 3 3 + //SPELL_CLEAVE = 30131, // spell not confirmed + //SPELL_INFERNAL_RELAY = 30834, // purpose unk + SPELL_INFERNAL_RELAY_SUMMON = 30835, // triggers 30836, which summons an infernal - uint32 m_uiHellfireTimer; - uint32 m_uiCleanupTimer; - ObjectGuid m_malchezaarGuid; - InfernalPoint* pPoint; + SPELL_HELLFIRE = 30859, // Infernal damage aura - void Reset() {} - void MoveInLineOfSight(Unit* pWho) {} + NPC_NETHERSPITE_INFERNAL = 17646, // The netherspite infernal creature + NPC_MALCHEZARS_AXE = 17650, // Malchezar's axes summoned during phase 3 - void UpdateAI(const uint32 uiDiff) - { - if (m_uiHellfireTimer) - { - if (m_uiHellfireTimer <= uiDiff) - { - if (DoCastSpellIfCan(m_creature, SPELL_HELLFIRE) == CAST_OK) - m_uiHellfireTimer = 0; - } - else - m_uiHellfireTimer -= uiDiff; - } - - if (m_uiCleanupTimer) - { - if (m_uiCleanupTimer <= uiDiff) - { - Cleanup(); - m_uiCleanupTimer = 0; - } - else - m_uiCleanupTimer -= uiDiff; - } - } + EQUIP_ID_AXE = 23996, // Axes info - void KilledUnit(Unit *who) - { - if (Creature* pMalchezaar = m_creature->GetMap()->GetCreature(m_malchezaarGuid)) - pMalchezaar->AI()->KilledUnit(who); - } + ATTACK_TIMER_DEFAULT = 2000, // note: for TBC it was 2400 + ATTACK_TIMER_AXES = 1333, // note: for TBC it was 1600 - void SpellHit(Unit* pWho, const SpellEntry* pSpell) - { - if (pSpell->Id == SPELL_INFERNAL_RELAY) - { - m_creature->SetDisplayId(m_creature->GetUInt32Value(UNIT_FIELD_NATIVEDISPLAYID)); - m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - m_uiHellfireTimer = 4000; - m_uiCleanupTimer = 170000; - } - } - - void DamageTaken(Unit* pDealer, uint32& uiDamage) - { - if (pDealer->GetObjectGuid() != m_malchezaarGuid) - uiDamage = 0; - } - - void Cleanup(); // below ... + MAX_ENFEEBLE_TARGETS = 5, }; struct MANGOS_DLL_DECL boss_malchezaarAI : public ScriptedAI { boss_malchezaarAI(Creature* pCreature) : ScriptedAI(pCreature) { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); Reset(); } + ScriptedInstance* m_pInstance; + + uint8 m_uiEnfeebleIndex; uint32 m_uiEnfeebleTimer; uint32 m_uiEnfeebleResetTimer; uint32 m_uiShadowNovaTimer; uint32 m_uiSWPainTimer; - uint32 SunderArmorTimer; + uint32 m_uiSunderArmorTimer; uint32 m_uiAmplifyDamageTimer; - uint32 m_uiCleave_Timer; - uint32 InfernalTimer; - uint32 m_uiAxesTargetSwitchTimer; - uint32 m_uiInfernalCleanupTimer; + uint32 m_uiInfernalTimer; - GuidVector m_vInfernalGuids; - std::vector m_positions; + ObjectGuid m_aEnfeebleTargetGuid[MAX_ENFEEBLE_TARGETS]; + uint32 m_auiEnfeebleHealth[MAX_ENFEEBLE_TARGETS]; - ObjectGuid m_aAxeGuid[2]; - ObjectGuid m_aEnfeebleTargetGuid[5]; - uint32 m_auiEnfeebleHealth[5]; - - uint32 m_uiPhase; + uint8 m_uiPhase; void Reset() { - AxesCleanup(); - ClearWeapons(); - InfernalCleanup(); - m_positions.clear(); - - for (uint8 i = 0; i < 5; ++i) + for (uint8 i = 0; i < MAX_ENFEEBLE_TARGETS; ++i) { m_aEnfeebleTargetGuid[i].Clear(); m_auiEnfeebleHealth[i] = 0; } - for(int i = 0; i < TOTAL_INFERNAL_POINTS; ++i) - m_positions.push_back(&InfernalPoints[i]); - - m_uiEnfeebleTimer = 30000; - m_uiEnfeebleResetTimer = 38000; - m_uiShadowNovaTimer = 35500; - m_uiSWPainTimer = 20000; - m_uiAmplifyDamageTimer = 5000; - m_uiCleave_Timer = 8000; - InfernalTimer = 45000; - m_uiInfernalCleanupTimer = 47000; - m_uiAxesTargetSwitchTimer = urand(7500, 20000); - SunderArmorTimer = urand(5000, 10000); - m_uiPhase = 1; + m_uiEnfeebleIndex = 0; + m_uiEnfeebleTimer = 30000; + m_uiEnfeebleResetTimer = 0; + m_uiShadowNovaTimer = 35500; + m_uiSWPainTimer = 20000; + m_uiAmplifyDamageTimer = 5000; + m_uiInfernalTimer = 40000; + m_uiSunderArmorTimer = urand(5000, 10000); + + m_uiPhase = 1; + + // Reset equipment and attack + SetEquipmentSlots(false, EQUIP_UNEQUIP, EQUIP_UNEQUIP, EQUIP_NO_CHANGE); + m_creature->SetAttackTime(BASE_ATTACK, ATTACK_TIMER_DEFAULT); } void KilledUnit(Unit* pVictim) @@ -238,103 +129,55 @@ struct MANGOS_DLL_DECL boss_malchezaarAI : public ScriptedAI { DoScriptText(SAY_DEATH, m_creature); - AxesCleanup(); - ClearWeapons(); - InfernalCleanup(); - m_positions.clear(); + // Remove the summoned axe - which is considered a guardian + m_creature->RemoveGuardians(); - for (uint8 i = 0; i < TOTAL_INFERNAL_POINTS; ++i) - m_positions.push_back(&InfernalPoints[i]); + if (m_pInstance) + m_pInstance->SetData(TYPE_MALCHEZZAR, DONE); } - void Aggro(Unit *who) + void Aggro(Unit* pWho) { DoScriptText(SAY_AGGRO, m_creature); - } - void InfernalCleanup() - { - // Infernal Cleanup - for(GuidVector::const_iterator itr = m_vInfernalGuids.begin(); itr!= m_vInfernalGuids.end(); ++itr) - { - Creature *pInfernal = m_creature->GetMap()->GetCreature(*itr); - if (pInfernal && pInfernal->isAlive()) - { - pInfernal->SetVisibility(VISIBILITY_OFF); - pInfernal->SetDeathState(JUST_DIED); - } - } - m_vInfernalGuids.clear(); + if (m_pInstance) + m_pInstance->SetData(TYPE_MALCHEZZAR, IN_PROGRESS); } - void AxesCleanup() + void JustReachedHome() { - for (uint8 i = 0; i < 2; ++i) - { - Creature* pAxe = m_creature->GetMap()->GetCreature(m_aAxeGuid[i]); - if (pAxe && pAxe->isAlive()) - pAxe->DealDamage(pAxe, pAxe->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); - m_aAxeGuid[i].Clear(); - } + if (m_pInstance) + m_pInstance->SetData(TYPE_MALCHEZZAR, FAIL); + + // Remove the summoned axe - which is considered a guardian + m_creature->RemoveGuardians(); } - void ClearWeapons() + void JustSummoned(Creature* pSummoned) { - SetEquipmentSlots(false, EQUIP_UNEQUIP, EQUIP_UNEQUIP, EQUIP_NO_CHANGE); - - //damage - const CreatureInfo *cinfo = m_creature->GetCreatureInfo(); - m_creature->SetBaseWeaponDamage(BASE_ATTACK, MINDAMAGE, cinfo->mindmg); - m_creature->SetBaseWeaponDamage(BASE_ATTACK, MAXDAMAGE, cinfo->maxdmg); - m_creature->UpdateDamagePhysical(BASE_ATTACK); + if (pSummoned->GetEntry() == NPC_NETHERSPITE_INFERNAL) + pSummoned->CastSpell(pSummoned, SPELL_HELLFIRE, false); + else if (pSummoned->GetEntry() == NPC_MALCHEZARS_AXE) + pSummoned->SetInCombatWithZone(); } - void EnfeebleHealthEffect() + void SpellHitTarget(Unit* pTarget, SpellEntry const* pSpellEntry) { - const SpellEntry *info = GetSpellStore()->LookupEntry(SPELL_ENFEEBLE_EFFECT); - if (!info) - return; - - ThreatList const& tList = m_creature->getThreatManager().getThreatList(); - std::vector targets; - - if (tList.empty()) - return; - - //begin + 1 , so we don't target the one with the highest threat - ThreatList::const_iterator itr = tList.begin(); - std::advance(itr, 1); - for(; itr!= tList.end(); ++itr) //store the threat list in a different container + // Target selection is already handled properly in core (doesn't affect tank) + if (pSpellEntry->Id == SPELL_ENFEEBLE && pTarget->GetTypeId() == TYPEID_PLAYER) { - Unit *target = m_creature->GetMap()->GetUnit((*itr)->getUnitGuid()); - //only on alive players - if (target && target->isAlive() && target->GetTypeId() == TYPEID_PLAYER) - targets.push_back(target); + // Workaround to handle health set to 1 + m_aEnfeebleTargetGuid[m_uiEnfeebleIndex] = pTarget->GetObjectGuid(); + m_auiEnfeebleHealth[m_uiEnfeebleIndex] = pTarget->GetHealth(); + pTarget->SetHealth(1); + ++m_uiEnfeebleIndex; } - - //cut down to size if we have more than 5 targets - while(targets.size() > 5) - targets.erase(targets.begin()+rand()%targets.size()); - - int i = 0; - for(std::vector::iterator iter = targets.begin(); iter!= targets.end(); ++iter, ++i) - { - Unit *target = *iter; - if (target) - { - m_aEnfeebleTargetGuid[i] = target->GetObjectGuid(); - m_auiEnfeebleHealth[i] = target->GetHealth(); - - target->CastSpell(target, SPELL_ENFEEBLE, true, 0, 0, m_creature->GetObjectGuid()); - target->SetHealth(1); - } - } - } - void EnfeebleResetHealth() + // Wrapper to reset health of the Enfeebled targets + void DoHandleEnfeebleHealthReset() { - for(int i = 0; i < 5; ++i) + for (int i = 0; i < m_uiEnfeebleIndex; ++i) { Player* pTarget = m_creature->GetMap()->GetPlayer(m_aEnfeebleTargetGuid[i]); @@ -344,49 +187,8 @@ struct MANGOS_DLL_DECL boss_malchezaarAI : public ScriptedAI m_aEnfeebleTargetGuid[i].Clear(); m_auiEnfeebleHealth[i] = 0; } - } - - void SummonInfernal() - { - InfernalPoint *point = NULL; - float posX,posY,posZ; - if ((m_creature->GetMapId() != 532) || m_positions.empty()) - { - m_creature->GetRandomPoint(m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), 60, posX, posY, posZ); - } - else - { - std::vector::iterator itr = m_positions.begin()+rand()%m_positions.size(); - point = *itr; - m_positions.erase(itr); - - posX = point->x; - posY = point->y; - posZ = INFERNAL_Z; - } - - Creature *Infernal = m_creature->SummonCreature(NETHERSPITE_INFERNAL, posX, posY, posZ, 0, TEMPSUMMON_TIMED_DESPAWN, 180000); - - if (Infernal) - { - Infernal->SetDisplayId(INFERNAL_MODEL_INVISIBLE); - Infernal->setFaction(m_creature->getFaction()); - - netherspite_infernalAI* pInfernalAI = dynamic_cast(Infernal->AI()); - - if (pInfernalAI) - { - if (point) - pInfernalAI->pPoint = point; - - pInfernalAI->m_malchezaarGuid = m_creature->GetObjectGuid(); - } - - m_vInfernalGuids.push_back(Infernal->GetObjectGuid()); - DoCastSpellIfCan(Infernal, SPELL_INFERNAL_RELAY); - } - DoScriptText(urand(0, 1) ? SAY_SUMMON1 : SAY_SUMMON2, m_creature); + m_uiEnfeebleIndex = 0; } void UpdateAI(const uint32 uiDiff) @@ -394,269 +196,156 @@ struct MANGOS_DLL_DECL boss_malchezaarAI : public ScriptedAI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - if (m_uiEnfeebleResetTimer) - { - if (m_uiEnfeebleResetTimer <= uiDiff) //Let's not forget to reset that - { - EnfeebleResetHealth(); - m_uiEnfeebleResetTimer=0; - } - else - m_uiEnfeebleResetTimer -= uiDiff; - } - - if (m_creature->hasUnitState(UNIT_STAT_STUNNED)) //While shifting to m_uiPhase 2 m_malchezaarGuid stuns himself - return; - - if (m_creature->GetTargetGuid() != m_creature->getVictim()->GetObjectGuid()) - m_creature->SetTargetGuid(m_creature->getVictim()->GetObjectGuid()); - + // Phase 1 - over 60% HP if (m_uiPhase == 1) { + // transition to phase 2 if (m_creature->GetHealthPercent() < 60.0f) { - m_creature->InterruptNonMeleeSpells(false); - - m_uiPhase = 2; - - //animation - DoCastSpellIfCan(m_creature, SPELL_EQUIP_AXES); - - //text - DoScriptText(SAY_AXE_TOSS1, m_creature); - - //passive thrash aura - m_creature->CastSpell(m_creature, SPELL_THRASH_AURA, true); - - //models - SetEquipmentSlots(false, EQUIP_ID_AXE, EQUIP_ID_AXE, EQUIP_NO_CHANGE); - - //damage - const CreatureInfo *cinfo = m_creature->GetCreatureInfo(); - m_creature->SetBaseWeaponDamage(BASE_ATTACK, MINDAMAGE, 2*cinfo->mindmg); - m_creature->SetBaseWeaponDamage(BASE_ATTACK, MAXDAMAGE, 2*cinfo->maxdmg); - m_creature->UpdateDamagePhysical(BASE_ATTACK); - - m_creature->SetBaseWeaponDamage(OFF_ATTACK, MINDAMAGE, cinfo->mindmg); - m_creature->SetBaseWeaponDamage(OFF_ATTACK, MAXDAMAGE, cinfo->maxdmg); - //Sigh, updating only works on main attack , do it manually .... - m_creature->SetFloatValue(UNIT_FIELD_MINOFFHANDDAMAGE, cinfo->mindmg); - m_creature->SetFloatValue(UNIT_FIELD_MAXOFFHANDDAMAGE, cinfo->maxdmg); + if (DoCastSpellIfCan(m_creature, SPELL_EQUIP_AXES, CAST_INTERRUPT_PREVIOUS) == CAST_OK) + { + DoCastSpellIfCan(m_creature, SPELL_THRASH_AURA, CAST_TRIGGERED); + DoScriptText(SAY_AXE_TOSS1, m_creature); - m_creature->SetAttackTime(OFF_ATTACK, (m_creature->GetAttackTime(BASE_ATTACK)*150)/100); + SetEquipmentSlots(false, EQUIP_ID_AXE, EQUIP_ID_AXE, EQUIP_NO_CHANGE); + m_creature->SetAttackTime(BASE_ATTACK, ATTACK_TIMER_AXES); + m_uiPhase = 2; + } } } + // Phase 2 - over 30% HP else if (m_uiPhase == 2) { + // transition to phase 3 if (m_creature->GetHealthPercent() < 30.0f) { - InfernalTimer = 15000; - - m_uiPhase = 3; - - ClearWeapons(); - - //remove thrash - m_creature->RemoveAurasDueToSpell(SPELL_THRASH_AURA); - - DoScriptText(SAY_AXE_TOSS2, m_creature); - - Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0); - for (uint32 i = 0; i < 2; ++i) + if (DoCastSpellIfCan(m_creature, SPELL_SUMMON_AXES) == CAST_OK) { - Creature* pAxe = m_creature->SummonCreature(MALCHEZARS_AXE, m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 1000); - if (pAxe) - { - pAxe->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - pAxe->setFaction(m_creature->getFaction()); - - m_aAxeGuid[i] = pAxe->GetObjectGuid(); - if (pTarget) - { - pAxe->AI()->AttackStart(pTarget); - // pAxe->getThreatManager().tauntApply(pTarget); //Taunt Apply and fade out does not work properly - // So we'll use a hack to add a lot of threat to our pTarget - pAxe->AddThreat(pTarget, 10000000.0f); - } - } - } + DoCastSpellIfCan(m_creature, SPELL_ENFEEBLE_EFFECT, CAST_TRIGGERED); + DoScriptText(SAY_SPECIAL3, m_creature); - if (m_uiShadowNovaTimer > 35000) - m_uiShadowNovaTimer = m_uiEnfeebleTimer + 5000; + SetEquipmentSlots(false, EQUIP_UNEQUIP, EQUIP_UNEQUIP, EQUIP_NO_CHANGE); + m_creature->SetAttackTime(BASE_ATTACK, ATTACK_TIMER_DEFAULT); - return; - } + // Reset Enfeebled targets if necessary + DoHandleEnfeebleHealthReset(); + m_uiEnfeebleResetTimer=0; - if (SunderArmorTimer < uiDiff) - { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_SUNDER_ARMOR); - SunderArmorTimer = urand(10000, 18000); + m_creature->RemoveAurasDueToSpell(SPELL_THRASH_AURA); + m_uiShadowNovaTimer = m_uiEnfeebleTimer + 5000; + m_uiInfernalTimer = 15000; + m_uiPhase = 3; + return; + } } - else - SunderArmorTimer -= uiDiff; - if (m_uiCleave_Timer < uiDiff) + if (m_uiSunderArmorTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_CLEAVE); - m_uiCleave_Timer = urand(6000, 12000); - + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_SUNDER_ARMOR) == CAST_OK) + m_uiSunderArmorTimer = urand(10000, 18000); } else - m_uiCleave_Timer -= uiDiff; + m_uiSunderArmorTimer -= uiDiff; } + // Phase 3 else { - if (m_uiAxesTargetSwitchTimer < uiDiff) - { - m_uiAxesTargetSwitchTimer = urand(7500, 20000); - - Unit *target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0); - if (target) - { - for(int i = 0; i < 2; ++i) - { - Creature *axe = m_creature->GetMap()->GetCreature(m_aAxeGuid[i]); - if (axe) - { - float threat = 1000000.0f; - if (axe->getVictim() && m_creature->getThreatManager().getThreat(axe->getVictim())) - { - threat = axe->getThreatManager().getThreat(axe->getVictim()); - axe->getThreatManager().modifyThreatPercent(axe->getVictim(), -100); - } - if (target) - axe->AddThreat(target, threat); - //axe->getThreatManager().tauntFadeOut(axe->getVictim()); - //axe->getThreatManager().tauntApply(target); - } - } - } - } - else - m_uiAxesTargetSwitchTimer -= uiDiff; - if (m_uiAmplifyDamageTimer < uiDiff) { - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) - DoCastSpellIfCan(pTarget, SPELL_AMPLIFY_DAMAGE); - - m_uiAmplifyDamageTimer = urand(20000, 30000); + if (DoCastSpellIfCan(m_creature, SPELL_AMPLIFY_DAMAGE) == CAST_OK) + m_uiAmplifyDamageTimer = urand(20000, 30000); } else m_uiAmplifyDamageTimer -= uiDiff; } - //Time for global and double timers - if (InfernalTimer < uiDiff) + // Summon an infernal on timer + if (m_uiInfernalTimer < uiDiff) { - SummonInfernal(); - InfernalTimer = m_uiPhase == 3 ? 14500 : 44500; //15 secs in m_uiPhase 3, 45 otherwise + if (DoCastSpellIfCan(m_creature, SPELL_INFERNAL_RELAY_SUMMON) == CAST_OK) + { + DoScriptText(urand(0, 1) ? SAY_SUMMON1 : SAY_SUMMON2, m_creature); + m_uiInfernalTimer = m_uiPhase == 3 ? 17000 : 45000; + } } else - InfernalTimer -= uiDiff; + m_uiInfernalTimer -= uiDiff; - if (m_uiShadowNovaTimer < uiDiff) + // Cast shadow nova - on timer during phase 3, or after Enfeeble during phases 1 and 2 + if (m_uiShadowNovaTimer) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_SHADOWNOVA); - m_uiShadowNovaTimer = m_uiPhase == 3 ? 31000 : -1; + if (m_uiShadowNovaTimer <= uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_SHADOW_NOVA) == CAST_OK) + m_uiShadowNovaTimer = m_uiPhase == 3 ? 30000 : 0; + } + else + m_uiShadowNovaTimer -= uiDiff; } - else - m_uiShadowNovaTimer -= uiDiff; + // Cast SW pain during phase 1 and 3 if (m_uiPhase != 2) { if (m_uiSWPainTimer < uiDiff) { - Unit* target = NULL; - if (m_uiPhase == 1) - target = m_creature->getVictim(); // the tank - else //anyone but the tank - target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1); - - if (target) - DoCastSpellIfCan(target, SPELL_SW_PAIN); - - m_uiSWPainTimer = 20000; + if (DoCastSpellIfCan(m_uiPhase == 1 ? m_creature->getVictim() : m_creature, m_uiPhase == 1 ? SPELL_SW_PAIN_PHASE1 : SPELL_SW_PAIN_PHASE3) == CAST_OK) + m_uiSWPainTimer = 20000; } else m_uiSWPainTimer -= uiDiff; } + // Cast Enfeeble during phase 1 and 2 if (m_uiPhase != 3) { if (m_uiEnfeebleTimer < uiDiff) { - EnfeebleHealthEffect(); - m_uiEnfeebleTimer = 30000; - m_uiShadowNovaTimer = 5000; - m_uiEnfeebleResetTimer = 9000; + if (DoCastSpellIfCan(m_creature, SPELL_ENFEEBLE) == CAST_OK) + { + m_uiEnfeebleTimer = 30000; + m_uiShadowNovaTimer = 5000; + m_uiEnfeebleResetTimer = 9000; + } } else m_uiEnfeebleTimer -= uiDiff; } - if (m_uiPhase==2) - DoMeleeAttacksIfReady(); - else - DoMeleeAttackIfReady(); - } - - void DoMeleeAttacksIfReady() - { - // Check if pTarget is valid - if (!m_creature->getVictim()) - return; - - if (!m_creature->IsNonMeleeSpellCasted(false) && m_creature->CanReachWithMeleeAttack(m_creature->getVictim())) + if (m_uiEnfeebleResetTimer) { - //Check for base attack - if (m_creature->isAttackReady()) - { - m_creature->AttackerStateUpdate(m_creature->getVictim()); - m_creature->resetAttackTimer(); - } - //Check for offhand attack - if (m_creature->isAttackReady(OFF_ATTACK)) + if (m_uiEnfeebleResetTimer <= uiDiff) { - m_creature->AttackerStateUpdate(m_creature->getVictim(), OFF_ATTACK); - m_creature->resetAttackTimer(OFF_ATTACK); + DoHandleEnfeebleHealthReset(); + m_uiEnfeebleResetTimer=0; } - } - } - - void Cleanup(Creature *infernal, InfernalPoint *point) - { - for(GuidVector::iterator itr = m_vInfernalGuids.begin(); itr!= m_vInfernalGuids.end(); ++itr) - if (*itr == infernal->GetObjectGuid()) - { - m_vInfernalGuids.erase(itr); - break; + else + m_uiEnfeebleResetTimer -= uiDiff; } - m_positions.push_back(point); + DoMeleeAttackIfReady(); } }; -void netherspite_infernalAI::Cleanup() +CreatureAI* GetAI_boss_malchezaar(Creature* pCreature) { - Creature* pMalchezaar = m_creature->GetMap()->GetCreature(m_malchezaarGuid); - - if (pMalchezaar && pMalchezaar->isAlive()) - { - if (boss_malchezaarAI* pMalAI = dynamic_cast(pMalchezaar->AI())) - pMalAI->Cleanup(m_creature, pPoint); - } + return new boss_malchezaarAI(pCreature); } -CreatureAI* GetAI_netherspite_infernal(Creature* pCreature) +// TODO Remove this 'script' when combat can be proper prevented from core-side +struct MANGOS_DLL_DECL npc_infernal_targetAI : public Scripted_NoMovementAI { - return new netherspite_infernalAI(pCreature); -} + npc_infernal_targetAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { Reset(); } -CreatureAI* GetAI_boss_malchezaar(Creature* pCreature) + void Reset() { } + void MoveInLineOfSight(Unit* pWho) { } + void AttackStart(Unit* pWho) { } + void UpdateAI(const uint32 uiDiff) { } +}; + +CreatureAI* GetAI_npc_infernal_target(Creature* pCreature) { - return new boss_malchezaarAI(pCreature); + return new npc_infernal_targetAI(pCreature); } void AddSC_boss_prince_malchezaar() @@ -669,7 +358,7 @@ void AddSC_boss_prince_malchezaar() pNewScript->RegisterSelf(); pNewScript = new Script; - pNewScript->Name = "netherspite_infernal"; - pNewScript->GetAI = &GetAI_netherspite_infernal; + pNewScript->Name = "npc_infernal_target"; + pNewScript->GetAI = &GetAI_npc_infernal_target; pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 855169324..61e7af62b 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2705" + #define SD2_REVISION_NR "2706" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 29b2ff38c..5dc1d1fb0 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -736,7 +736,7 @@ UPDATE creature_template SET ScriptName='boss_nightbane' WHERE entry=17225; UPDATE creature_template SET ScriptName='boss_bigbadwolf' WHERE entry=17521; UPDATE creature_template SET ScriptName='mob_demon_chain' WHERE entry=17248; UPDATE creature_template SET ScriptName='npc_fiendish_portal' WHERE entry=17265; -UPDATE creature_template SET ScriptName='netherspite_infernal' WHERE entry=17646; +UPDATE creature_template SET ScriptName='npc_infernal_target' WHERE entry=17644; UPDATE creature_template SET ScriptName='npc_berthold' WHERE entry=16153; UPDATE creature_template SET ScriptName='npc_barnes' WHERE entry=16812; UPDATE creature_template SET ScriptName='npc_grandmother' WHERE entry=17603; diff --git a/sql/updates/r2706_mangos.sql b/sql/updates/r2706_mangos.sql new file mode 100644 index 000000000..494bd50cf --- /dev/null +++ b/sql/updates/r2706_mangos.sql @@ -0,0 +1,2 @@ +UPDATE creature_template SET ScriptName='' WHERE entry=17646; +UPDATE creature_template SET ScriptName='npc_infernal_target' WHERE entry=17644; From 6da8d7286e95ee464eaf1959fb9289ea831cef25 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Wed, 5 Sep 2012 20:44:55 +0300 Subject: [PATCH 0697/1172] [2707] Cleanup and improve script for Shade of Aran - Karazhan --- .../karazhan/boss_shade_of_aran.cpp | 548 ++++++++---------- .../karazhan/instance_karazhan.cpp | 8 +- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 + sql/updates/r2707_mangos.sql | 1 + 5 files changed, 237 insertions(+), 323 deletions(-) create mode 100644 sql/updates/r2707_mangos.sql diff --git a/scripts/eastern_kingdoms/karazhan/boss_shade_of_aran.cpp b/scripts/eastern_kingdoms/karazhan/boss_shade_of_aran.cpp index 86bab0106..21fc5021d 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_shade_of_aran.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_shade_of_aran.cpp @@ -17,13 +17,12 @@ /* ScriptData SDName: Boss_Shade_of_Aran SD%Complete: 95 -SDComment: Flame wreath missing cast animation, mods won't trigger. +SDComment: When drinking mana, it should remove all negative damage auras and should sit. Timers may need adjustments. SDCategory: Karazhan EndScriptData */ #include "precompiled.h" #include "karazhan.h" -#include "GameObject.h" enum { @@ -44,44 +43,50 @@ enum SAY_DEATH = -1532087, SAY_ATIESH = -1532088, //Atiesh is equipped by a raid member - //Spells + // basic spells SPELL_FROSTBOLT = 29954, SPELL_FIREBALL = 29953, - SPELL_ARCMISSLE = 29955, - SPELL_CHAINSOFICE = 29991, - SPELL_DRAGONSBREATH = 29964, - SPELL_MASSSLOW = 30035, - SPELL_FLAME_WREATH = 29946, - SPELL_AOE_CS = 29961, - SPELL_PLAYERPULL = 32265, - SPELL_AEXPLOSION = 29973, - SPELL_MASS_POLY = 29963, - SPELL_BLINK_CENTER = 29967, - SPELL_ELEMENTALS = 29962, - SPELL_CONJURE = 29975, + SPELL_ARCANE_MISSILES = 29955, + //SPELL_DRAGONS_BREATH = 29964, // not used since 2.1.0 + SPELL_CHAINS_OF_ICE = 29991, + SPELL_COUNTERSPELL = 29961, + //SPELL_COMBUSTION = 29977, // spell not confirmed + //SPELL_PRESENCE_OF_MIND = 29976, // spell not confirmed + //SPELL_WATER_BREAK = 39177, // purpose unk + + // low mana spells + SPELL_MASS_POLYMORPH = 29963, + SPELL_CONJURE_WATER = 29975, SPELL_DRINK = 30024, - SPELL_POTION = 32453, - SPELL_AOE_PYROBLAST = 29978, + SPELL_MANA_POTION = 32453, + SPELL_PYROBLAST = 29978, - SPELL_EXPLOSION = 20476, - SPELL_KNOCKBACK_500 = 11027, + // super spells + SPELL_FLAME_WREATH = 30004, // triggers 29946 on targets + SPELL_SUMMON_BLIZZARD = 29969, // script target on npc 17161 - triggers spell 29952 on target + SPELL_BLINK_CENTER = 29967, + SPELL_MASSIVE_MAGNETIC_PULL = 29979, // triggers 30010 on target + SPELL_MASS_SLOW = 30035, + SPELL_ARCANE_EXPLOSION = 29973, - //Creature Spells - SPELL_CIRCULAR_BLIZZARD = 29951, //29952 is the REAL circular blizzard that leaves persistant blizzards that last for 10 seconds - SPELL_WATERBOLT = 31012, - SPELL_SHADOW_PYRO = 29978, + // summon elemental spells + SPELL_SUMMON_WATER_ELEM_1 = 29962, + SPELL_SUMMON_WATER_ELEM_2 = 37051, + SPELL_SUMMON_WATER_ELEM_3 = 37052, + SPELL_SUMMON_WATER_ELEM_4 = 37053, - //Creatures + // Creatures NPC_WATER_ELEMENTAL = 17167, NPC_SHADOW_OF_ARAN = 18254, - NPC_ARAN_BLIZZARD = 17161 + + MAX_SHADOWS_OF_ARAN = 5, // this is not confirmed }; -enum SuperSpell +enum SuperSpells { - SUPER_FLAME = 0, - SUPER_BLIZZARD, - SUPER_AE, + SUPER_FLAME_WREATH = 0, + SUPER_BLIZZARD = 1, + SUPER_ARCANE_EXPL = 2, }; struct MANGOS_DLL_DECL boss_aranAI : public ScriptedAI @@ -94,57 +99,38 @@ struct MANGOS_DLL_DECL boss_aranAI : public ScriptedAI ScriptedInstance* m_pInstance; - uint32 m_uiSecondarySpell_Timer; - uint32 m_uiNormalCast_Timer; - uint32 m_uiSuperCast_Timer; - uint32 m_uiBerserk_Timer; - uint32 m_uiCloseDoor_Timer; // Don't close the door right on aggro in case some people are still entering. + uint32 m_uiSecondarySpellTimer; + uint32 m_uiNormalCastTimer; + uint32 m_uiSuperCastTimer; + uint32 m_uiBerserkTimer; uint8 m_uiLastSuperSpell; + uint8 m_uiLastNormalSpell; - uint32 m_uiFlameWreath_Timer; - uint32 m_uiFlameWreathCheck_Timer; - ObjectGuid m_aFlameWreathTargetGuid[3]; - float m_fFWTargPosX[3]; - float m_fFWTargPosY[3]; - - uint32 m_uiCurrentNormalSpell; - uint32 m_uiArcaneCooldown; - uint32 m_uiFireCooldown; - uint32 m_uiFrostCooldown; - - uint32 m_uiDrinkInturrupt_Timer; + uint32 m_uiManaRecoveryTimer; + uint8 m_uiManaRecoveryStage; bool m_bElementalsSpawned; - bool m_bDrinking; + bool m_bIsDrinking; bool m_bDrinkInturrupted; void Reset() { - m_uiSecondarySpell_Timer = 5000; - m_uiNormalCast_Timer = 0; - m_uiSuperCast_Timer = 35000; - m_uiBerserk_Timer = 720000; - m_uiCloseDoor_Timer = 15000; - - m_uiLastSuperSpell = urand(0, 2); - - m_uiFlameWreath_Timer = 0; - m_uiFlameWreathCheck_Timer = 0; - - m_uiCurrentNormalSpell = 0; - m_uiArcaneCooldown = 0; - m_uiFireCooldown = 0; - m_uiFrostCooldown = 0; + m_uiLastSuperSpell = urand(SUPER_FLAME_WREATH, SUPER_ARCANE_EXPL); + m_uiLastNormalSpell = urand(0, 2); - m_uiDrinkInturrupt_Timer = 10000; + m_uiSecondarySpellTimer = 5000; + m_uiNormalCastTimer = 0; + m_uiSuperCastTimer = 35000; + m_uiManaRecoveryTimer = 0; + m_uiManaRecoveryStage = 0; + m_uiBerserkTimer = 12*MINUTE*IN_MILLISECONDS; - m_bElementalsSpawned = false; - m_bDrinking = false; - m_bDrinkInturrupted = false; + m_bElementalsSpawned = false; + m_bIsDrinking = false; + m_bDrinkInturrupted = false; - if (m_pInstance) - m_pInstance->SetData(TYPE_ARAN, NOT_STARTED); + SetCombatMovement(true); } void KilledUnit(Unit* pVictim) @@ -156,6 +142,9 @@ struct MANGOS_DLL_DECL boss_aranAI : public ScriptedAI { DoScriptText(SAY_DEATH, m_creature); + // Remove the summoned elementals - which are considered guardians + m_creature->RemoveGuardians(); + if (m_pInstance) m_pInstance->SetData(TYPE_ARAN, DONE); } @@ -173,39 +162,41 @@ struct MANGOS_DLL_DECL boss_aranAI : public ScriptedAI m_pInstance->SetData(TYPE_ARAN, IN_PROGRESS); } - void FlameWreathEffect() + void JustReachedHome() { - std::vector targets; + if (m_pInstance) + m_pInstance->SetData(TYPE_ARAN, FAIL); - ThreatList const& tList = m_creature->getThreatManager().getThreatList(); - if (tList.empty()) - return; + // Remove the summoned elementals - which are considered guardians + m_creature->RemoveGuardians(); + } - //store the threat list in a different container - for (ThreatList::const_iterator itr = tList.begin();itr != tList.end(); ++itr) + void DamageTaken(Unit* pDoneBy, uint32& uiDamage) + { + if (!m_bDrinkInturrupted && m_bIsDrinking && uiDamage > 0) { - Unit* pTarget = m_creature->GetMap()->GetUnit((*itr)->getUnitGuid()); + if (!m_creature->HasAura(SPELL_DRINK)) + return; - //only on alive players - if (pTarget && pTarget->isAlive() && pTarget->GetTypeId() == TYPEID_PLAYER) - targets.push_back(pTarget); + if (DoCastSpellIfCan(m_creature, SPELL_MANA_POTION) == CAST_OK) + { + m_creature->RemoveAurasDueToSpell(SPELL_DRINK); + m_creature->SetStandState(UNIT_STAND_STATE_STAND); + m_uiManaRecoveryTimer = 1000; + m_uiManaRecoveryStage = 2; + m_bDrinkInturrupted = true; + } } + } - //cut down to size if we have more than 3 targets - while(targets.size() > 3) - targets.erase(targets.begin()+rand()%targets.size()); - - uint32 i = 0; - for(std::vector::iterator itr = targets.begin(); itr!= targets.end(); ++itr) + void JustSummoned(Creature* pSummoned) + { + switch (pSummoned->GetEntry()) { - if (*itr) - { - m_aFlameWreathTargetGuid[i] = (*itr)->GetObjectGuid(); - m_fFWTargPosX[i] = (*itr)->GetPositionX(); - m_fFWTargPosY[i] = (*itr)->GetPositionY(); - m_creature->CastSpell((*itr), SPELL_FLAME_WREATH, true); - ++i; - } + case NPC_WATER_ELEMENTAL: + case NPC_SHADOW_OF_ARAN: + pSummoned->SetInCombatWithZone(); + break; } } @@ -214,95 +205,64 @@ struct MANGOS_DLL_DECL boss_aranAI : public ScriptedAI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - if (m_uiCloseDoor_Timer) + // Start drinking when below 20% mana + if (!m_bIsDrinking && m_creature->getPowerType() == POWER_MANA && (m_creature->GetPower(POWER_MANA)*100 / m_creature->GetMaxPower(POWER_MANA)) < 20) { - if (m_uiCloseDoor_Timer <= uiDiff) + if (DoCastSpellIfCan(m_creature, SPELL_MASS_POLYMORPH) == CAST_OK) { - if (m_pInstance) - { - if (GameObject* pDoor = m_pInstance->GetSingleGameObjectFromStorage(GO_PRIVATE_LIBRARY_DOOR)) - pDoor->SetGoState(GO_STATE_READY); - - m_uiCloseDoor_Timer = 0; - } + DoScriptText(SAY_DRINK, m_creature); + SetCombatMovement(false); + m_creature->GetMotionMaster()->MoveIdle(); + + m_uiManaRecoveryStage = 0; + m_uiManaRecoveryTimer = 2000; + m_bDrinkInturrupted = false; + m_bIsDrinking = true; + return; } - else - m_uiCloseDoor_Timer -= uiDiff; } - //Cooldowns for casts - if (m_uiArcaneCooldown) + if (m_bIsDrinking) { - if (m_uiArcaneCooldown >= uiDiff) - m_uiArcaneCooldown -= uiDiff; - else - m_uiArcaneCooldown = 0; - } - - if (m_uiFireCooldown) - { - if (m_uiFireCooldown >= uiDiff) - m_uiFireCooldown -= uiDiff; - else - m_uiFireCooldown = 0; - } - - if (m_uiFrostCooldown) - { - if (m_uiFrostCooldown >= uiDiff) - m_uiFrostCooldown -= uiDiff; - else - m_uiFrostCooldown = 0; - } - - if (!m_bDrinking && m_creature->GetMaxPower(POWER_MANA) && (m_creature->GetPower(POWER_MANA)*100 / m_creature->GetMaxPower(POWER_MANA)) < 20) - { - m_bDrinking = true; - m_creature->InterruptNonMeleeSpells(false); - - DoScriptText(SAY_DRINK, m_creature); - - if (!m_bDrinkInturrupted) + // Do the mana recovery process + if (m_uiManaRecoveryTimer < uiDiff) { - m_creature->CastSpell(m_creature, SPELL_MASS_POLY, true); - m_creature->CastSpell(m_creature, SPELL_CONJURE, false); - m_creature->CastSpell(m_creature, SPELL_DRINK, false); - m_creature->SetStandState(UNIT_STAND_STATE_SIT); - m_uiDrinkInturrupt_Timer = 10000; + switch (m_uiManaRecoveryStage) + { + case 0: + if (DoCastSpellIfCan(m_creature, SPELL_CONJURE_WATER) == CAST_OK) + m_uiManaRecoveryTimer = 2000; + break; + case 1: + if (DoCastSpellIfCan(m_creature, SPELL_DRINK) == CAST_OK) + { + m_creature->SetStandState(UNIT_STAND_STATE_SIT); + m_uiManaRecoveryTimer = 5000; + } + break; + case 2: + if (DoCastSpellIfCan(m_creature, SPELL_PYROBLAST) == CAST_OK) + { + SetCombatMovement(true); + DoStartMovement(m_creature->getVictim()); + m_creature->SetStandState(UNIT_STAND_STATE_STAND); + + m_uiManaRecoveryTimer = 2000; + m_bIsDrinking = false; + } + break; + } + ++m_uiManaRecoveryStage; } - } - - //Drink Inturrupt - if (m_bDrinking && m_bDrinkInturrupted) - { - m_bDrinking = false; - m_creature->RemoveAurasDueToSpell(SPELL_DRINK); - m_creature->SetStandState(UNIT_STAND_STATE_STAND); - m_creature->SetPower(POWER_MANA, m_creature->GetMaxPower(POWER_MANA)-32000); - m_creature->CastSpell(m_creature, SPELL_POTION, false); - } - - //Drink Inturrupt Timer - if (m_bDrinking && !m_bDrinkInturrupted) - { - if (m_uiDrinkInturrupt_Timer >= uiDiff) - m_uiDrinkInturrupt_Timer -= uiDiff; else - { - m_creature->SetStandState(UNIT_STAND_STATE_STAND); - m_creature->CastSpell(m_creature, SPELL_POTION, true); - m_creature->CastSpell(m_creature, SPELL_AOE_PYROBLAST, false); - m_bDrinkInturrupted = true; - m_bDrinking = false; - } - } + m_uiManaRecoveryTimer -= uiDiff; - //Don't execute any more code if we are drinking - if (m_bDrinking) + // no other spells during mana recovery return; + } - //Normal casts - if (m_uiNormalCast_Timer < uiDiff) + // Normal spell casts + if (m_uiNormalCastTimer < uiDiff) { if (!m_creature->IsNonMeleeSpellCasted(false)) { @@ -310,207 +270,148 @@ struct MANGOS_DLL_DECL boss_aranAI : public ScriptedAI if (!pTarget) return; - uint32 auiSpells[3]; - uint8 uiAvailableSpells = 0; + uint8 uiCurrentSpell = urand(0, 2); + uint32 uiCurrentSpellId = 0; + + // randomize so it won't be the same spell twice in a row + while (uiCurrentSpell == m_uiLastNormalSpell) + uiCurrentSpell = urand(0, 2); - //Check for what spells are not on cooldown - if (!m_uiArcaneCooldown) - auiSpells[uiAvailableSpells++] = SPELL_ARCMISSLE; - if (!m_uiFireCooldown) - auiSpells[uiAvailableSpells++] = SPELL_FIREBALL; - if (!m_uiFrostCooldown) - auiSpells[uiAvailableSpells++] = SPELL_FROSTBOLT; + m_uiLastNormalSpell = uiCurrentSpell; - //If no available spells wait 1 second and try again - if (uiAvailableSpells) + switch (uiCurrentSpell) { - m_uiCurrentNormalSpell = auiSpells[rand() % uiAvailableSpells]; - DoCastSpellIfCan(pTarget, m_uiCurrentNormalSpell); + case 0: + uiCurrentSpellId = SPELL_ARCANE_MISSILES; + m_uiNormalCastTimer = urand(6000, 7000); + break; + case 1: + uiCurrentSpellId = SPELL_FIREBALL; + m_uiNormalCastTimer = urand(2000, 3000); + break; + case 2: + uiCurrentSpellId = SPELL_FROSTBOLT; + m_uiNormalCastTimer = urand(2000, 3000); + break; } + + if (uiCurrentSpellId) + DoCastSpellIfCan(pTarget, uiCurrentSpellId); } - m_uiNormalCast_Timer = 1000; } else - m_uiNormalCast_Timer -= uiDiff; + m_uiNormalCastTimer -= uiDiff; - if (m_uiSecondarySpell_Timer < uiDiff) + // Secondary spells + if (m_uiSecondarySpellTimer < uiDiff) { + CanCastResult spellResult = CAST_OK; + switch(urand(0, 1)) { case 0: - DoCastSpellIfCan(m_creature, SPELL_AOE_CS); + spellResult = DoCastSpellIfCan(m_creature, SPELL_COUNTERSPELL); break; case 1: if (Unit* pUnit = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) - DoCastSpellIfCan(pUnit, SPELL_CHAINSOFICE); + spellResult = DoCastSpellIfCan(pUnit, SPELL_CHAINS_OF_ICE); break; } - m_uiSecondarySpell_Timer = urand(5000, 20000); + if (spellResult == CAST_OK) + m_uiSecondarySpellTimer = urand(5000, 20000); } else - m_uiSecondarySpell_Timer -= uiDiff; + m_uiSecondarySpellTimer -= uiDiff; - if (m_uiSuperCast_Timer < uiDiff) + if (m_uiSuperCastTimer < uiDiff) { - uint8 auiAvailable[2]; - - switch (m_uiLastSuperSpell) + if (!m_creature->IsNonMeleeSpellCasted(false)) { - case SUPER_AE: - auiAvailable[0] = SUPER_FLAME; - auiAvailable[1] = SUPER_BLIZZARD; - break; - case SUPER_FLAME: - auiAvailable[0] = SUPER_AE; - auiAvailable[1] = SUPER_BLIZZARD; - break; - case SUPER_BLIZZARD: - auiAvailable[0] = SUPER_FLAME; - auiAvailable[1] = SUPER_AE; - break; - } - - m_uiLastSuperSpell = auiAvailable[urand(0, 2)]; + uint8 uiAvailableSpell = urand(SUPER_FLAME_WREATH, SUPER_ARCANE_EXPL); - switch (m_uiLastSuperSpell) - { - case SUPER_AE: - DoScriptText(urand(0, 1) ? SAY_EXPLOSION1 : SAY_EXPLOSION2, m_creature); + // randomize so it won't be the same spell twice in a row + while (uiAvailableSpell == m_uiLastSuperSpell) + uiAvailableSpell = urand(SUPER_FLAME_WREATH, SUPER_ARCANE_EXPL); - m_creature->CastSpell(m_creature, SPELL_BLINK_CENTER, true); - m_creature->CastSpell(m_creature, SPELL_PLAYERPULL, true); - m_creature->CastSpell(m_creature, SPELL_MASSSLOW, true); - m_creature->CastSpell(m_creature, SPELL_AEXPLOSION, false); - break; + m_uiLastSuperSpell = uiAvailableSpell; - case SUPER_FLAME: - DoScriptText(urand(0, 1) ? SAY_FLAMEWREATH1 : SAY_FLAMEWREATH2, m_creature); - - m_uiFlameWreath_Timer = 20000; - m_uiFlameWreathCheck_Timer = 500; - - for (uint8 i = 0; i < 3; ++i) - m_aFlameWreathTargetGuid[i].Clear(); - - FlameWreathEffect(); - break; - - case SUPER_BLIZZARD: - DoScriptText(urand(0, 1) ? SAY_BLIZZARD1 : SAY_BLIZZARD2, m_creature); - - if (Creature* pSpawn = m_creature->SummonCreature(NPC_ARAN_BLIZZARD, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN, 25000)) - { - pSpawn->setFaction(m_creature->getFaction()); - pSpawn->CastSpell(pSpawn, SPELL_CIRCULAR_BLIZZARD, false); - } - break; + switch (m_uiLastSuperSpell) + { + case SUPER_ARCANE_EXPL: + if (DoCastSpellIfCan(m_creature, SPELL_ARCANE_EXPLOSION) == CAST_OK) + { + DoCastSpellIfCan(m_creature, SPELL_BLINK_CENTER, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_MASSIVE_MAGNETIC_PULL, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_MASS_SLOW, CAST_TRIGGERED); + + DoScriptText(urand(0, 1) ? SAY_EXPLOSION1 : SAY_EXPLOSION2, m_creature); + } + break; + case SUPER_FLAME_WREATH: + if (DoCastSpellIfCan(m_creature, SPELL_FLAME_WREATH) == CAST_OK) + DoScriptText(urand(0, 1) ? SAY_FLAMEWREATH1 : SAY_FLAMEWREATH2, m_creature); + break; + case SUPER_BLIZZARD: + if (DoCastSpellIfCan(m_creature, SPELL_SUMMON_BLIZZARD) == CAST_OK) + DoScriptText(urand(0, 1) ? SAY_BLIZZARD1 : SAY_BLIZZARD2, m_creature); + break; + } + m_uiSuperCastTimer = 30000; } - - m_uiSuperCast_Timer = urand(35000, 40000); } else - m_uiSuperCast_Timer -= uiDiff; + m_uiSuperCastTimer -= uiDiff; if (!m_bElementalsSpawned && m_creature->GetHealthPercent() < 40.0f) { - m_bElementalsSpawned = true; - - for (uint32 i = 0; i < 4; ++i) - { - if (Creature* pElemental = m_creature->SummonCreature(NPC_WATER_ELEMENTAL, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN, 90000)) - { - pElemental->Attack(m_creature->getVictim(), true); - pElemental->setFaction(m_creature->getFaction()); - } - } + DoCastSpellIfCan(m_creature, SPELL_SUMMON_WATER_ELEM_1, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_SUMMON_WATER_ELEM_2, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_SUMMON_WATER_ELEM_3, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_SUMMON_WATER_ELEM_4, CAST_TRIGGERED); DoScriptText(SAY_ELEMENTALS, m_creature); - } - if (m_uiBerserk_Timer < uiDiff) - { - for (uint32 i = 0; i < 5; ++i) - { - if (Creature* pShadow = m_creature->SummonCreature(NPC_SHADOW_OF_ARAN, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000)) - { - pShadow->Attack(m_creature->getVictim(), true); - pShadow->setFaction(m_creature->getFaction()); - } - } - - DoScriptText(SAY_TIMEOVER, m_creature); - - m_uiBerserk_Timer = 60000; + m_bElementalsSpawned = true; } - else - m_uiBerserk_Timer -= uiDiff; - //Flame Wreath check - if (m_uiFlameWreath_Timer) + // Berserk timer - the summons position is guesswork + if (m_uiBerserkTimer) { - if (m_uiFlameWreath_Timer >= uiDiff) - m_uiFlameWreath_Timer -= uiDiff; - else - m_uiFlameWreath_Timer = 0; - - if (m_uiFlameWreathCheck_Timer < uiDiff) + if (m_uiBerserkTimer <= uiDiff) { - for (uint32 i = 0; i < 3; ++i) - { - if (!m_aFlameWreathTargetGuid[i]) - continue; - - Player* pPlayer = m_creature->GetMap()->GetPlayer(m_aFlameWreathTargetGuid[i]); + for (uint8 i = 0; i < MAX_SHADOWS_OF_ARAN; ++i) + DoSpawnCreature(NPC_SHADOW_OF_ARAN, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); - if (pPlayer && !pPlayer->IsWithinDist2d(m_fFWTargPosX[i], m_fFWTargPosY[i], 3.0f)) - { - pPlayer->CastSpell(pPlayer, SPELL_EXPLOSION, true, 0, 0, m_creature->GetObjectGuid()); - pPlayer->CastSpell(pPlayer, SPELL_KNOCKBACK_500, true); - m_aFlameWreathTargetGuid[i].Clear(); - } - } - m_uiFlameWreathCheck_Timer = 500; + DoScriptText(SAY_TIMEOVER, m_creature); + m_uiBerserkTimer = 0; } else - m_uiFlameWreathCheck_Timer -= uiDiff; + m_uiBerserkTimer -= uiDiff; } - if (m_uiArcaneCooldown && m_uiFireCooldown && m_uiFrostCooldown) - DoMeleeAttackIfReady(); - } - - void DamageTaken(Unit* pAttacker, uint32 &damage) - { - if (!m_bDrinkInturrupted && m_bDrinking && damage) - m_bDrinkInturrupted = true; + DoMeleeAttackIfReady(); } +}; - void SpellHit(Unit* pAttacker, const SpellEntry* Spell) - { - //We only care about inturrupt effects and only if they are durring a spell currently being casted - if ((Spell->Effect[0]!=SPELL_EFFECT_INTERRUPT_CAST && - Spell->Effect[1]!=SPELL_EFFECT_INTERRUPT_CAST && - Spell->Effect[2]!=SPELL_EFFECT_INTERRUPT_CAST) || !m_creature->IsNonMeleeSpellCasted(false)) - return; - - //Inturrupt effect - m_creature->InterruptNonMeleeSpells(false); +CreatureAI* GetAI_boss_aran(Creature* pCreature) +{ + return new boss_aranAI(pCreature); +} - //Normally we would set the cooldown equal to the spell duration - //but we do not have access to the DurationStore +// TODO Remove this 'script' when combat can be proper prevented from core-side +struct MANGOS_DLL_DECL npc_shade_of_aran_blizzardAI : public ScriptedAI +{ + npc_shade_of_aran_blizzardAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } - switch (m_uiCurrentNormalSpell) - { - case SPELL_ARCMISSLE: m_uiArcaneCooldown = 5000; break; - case SPELL_FIREBALL: m_uiFireCooldown = 5000; break; - case SPELL_FROSTBOLT: m_uiFrostCooldown = 5000; break; - } - } + void Reset() { } + void MoveInLineOfSight(Unit* pWho) { } + void AttackStart(Unit* pWho) { } + void UpdateAI(const uint32 uiDiff) { } }; -CreatureAI* GetAI_boss_aran(Creature* pCreature) +CreatureAI* GetAI_npc_shade_of_aran_blizzard(Creature* pCreature) { - return new boss_aranAI(pCreature); + return new npc_shade_of_aran_blizzardAI(pCreature); } void AddSC_boss_shade_of_aran() @@ -521,4 +422,9 @@ void AddSC_boss_shade_of_aran() pNewScript->Name = "boss_shade_of_aran"; pNewScript->GetAI = &GetAI_boss_aran; pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_shade_of_aran_blizzard"; + pNewScript->GetAI = &GetAI_npc_shade_of_aran_blizzard; + pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/karazhan/instance_karazhan.cpp b/scripts/eastern_kingdoms/karazhan/instance_karazhan.cpp index 106dc2456..f5ea7e9e1 100644 --- a/scripts/eastern_kingdoms/karazhan/instance_karazhan.cpp +++ b/scripts/eastern_kingdoms/karazhan/instance_karazhan.cpp @@ -17,7 +17,7 @@ /* ScriptData SDName: Instance_Karazhan SD%Complete: 70 -SDComment: Instance Script for Karazhan to help in various encounters. TODO: GameObject visibility for Opera event. +SDComment: Instance Script for Karazhan to help in various encounters. SDCategory: Karazhan EndScriptData */ @@ -191,7 +191,13 @@ void instance_karazhan::SetData(uint32 uiType, uint32 uiData) break; case TYPE_CURATOR: case TYPE_TERESTIAN: + m_auiEncounter[uiType] = uiData; + break; case TYPE_ARAN: + if (uiData == FAIL || uiData == DONE) + DoToggleGameObjectFlags(GO_PRIVATE_LIBRARY_DOOR, GO_FLAG_LOCKED, false); + if (uiData == IN_PROGRESS) + DoToggleGameObjectFlags(GO_PRIVATE_LIBRARY_DOOR, GO_FLAG_LOCKED, true); m_auiEncounter[uiType] = uiData; break; case TYPE_NETHERSPITE: diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 61e7af62b..5425629c8 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2706" + #define SD2_REVISION_NR "2707" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 5dc1d1fb0..e39db1f29 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -736,6 +736,7 @@ UPDATE creature_template SET ScriptName='boss_nightbane' WHERE entry=17225; UPDATE creature_template SET ScriptName='boss_bigbadwolf' WHERE entry=17521; UPDATE creature_template SET ScriptName='mob_demon_chain' WHERE entry=17248; UPDATE creature_template SET ScriptName='npc_fiendish_portal' WHERE entry=17265; +UPDATE creature_template SET ScriptName='npc_shade_of_aran_blizzard' WHERE entry=17161; UPDATE creature_template SET ScriptName='npc_infernal_target' WHERE entry=17644; UPDATE creature_template SET ScriptName='npc_berthold' WHERE entry=16153; UPDATE creature_template SET ScriptName='npc_barnes' WHERE entry=16812; diff --git a/sql/updates/r2707_mangos.sql b/sql/updates/r2707_mangos.sql new file mode 100644 index 000000000..68cb2dbb8 --- /dev/null +++ b/sql/updates/r2707_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_shade_of_aran_blizzard' WHERE entry=17161; From 108529ba19662204c728e29e8f81de68c11c5334 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Wed, 5 Sep 2012 20:54:38 +0300 Subject: [PATCH 0698/1172] [2708] Drop script for npc 17548 - already included in latest ACID --- .../karazhan/bosses_opera.cpp | 47 ------------------- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 - sql/updates/r2708_mangos.sql | 1 + 4 files changed, 2 insertions(+), 49 deletions(-) create mode 100644 sql/updates/r2708_mangos.sql diff --git a/scripts/eastern_kingdoms/karazhan/bosses_opera.cpp b/scripts/eastern_kingdoms/karazhan/bosses_opera.cpp index 74b62997d..3c62e65bc 100644 --- a/scripts/eastern_kingdoms/karazhan/bosses_opera.cpp +++ b/scripts/eastern_kingdoms/karazhan/bosses_opera.cpp @@ -59,9 +59,6 @@ enum SPELL_SCREAM = 31013, SPELL_SUMMONTITO = 31014, - // Tito - SPELL_YIPPING = 31015, - // Strawman SPELL_BRAIN_BASH = 31046, SPELL_BRAIN_WIPE = 31069, @@ -221,40 +218,6 @@ struct MANGOS_DLL_DECL boss_dorotheeAI : public ScriptedAI } }; -// ToDo: move to eventAI!!! -struct MANGOS_DLL_DECL mob_titoAI : public ScriptedAI -{ - mob_titoAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } - - uint32 m_uiYipTimer; - - void Reset() - { - m_uiYipTimer = 10000; - } - - void JustReachedHome() - { - m_creature->ForcedDespawn(); - } - - void UpdateAI(const uint32 uiDiff) - { - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - if (m_uiYipTimer < uiDiff) - { - if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_YIPPING) == CAST_OK) - m_uiYipTimer = 10000; - } - else - m_uiYipTimer -= uiDiff; - - DoMeleeAttackIfReady(); - } -}; - struct MANGOS_DLL_DECL boss_strawmanAI : public ScriptedAI { boss_strawmanAI(Creature* pCreature) : ScriptedAI(pCreature) @@ -658,11 +621,6 @@ CreatureAI* GetAI_boss_crone(Creature* pCreature) return new boss_croneAI(pCreature); } -CreatureAI* GetAI_mob_tito(Creature* pCreature) -{ - return new mob_titoAI(pCreature); -} - /**************************************/ /**** Opera Red Riding Hood Event ****/ /************************************/ @@ -1349,11 +1307,6 @@ void AddSC_bosses_opera() pNewScript->GetAI = &GetAI_boss_crone; pNewScript->RegisterSelf(); - pNewScript = new Script; - pNewScript->Name = "mob_tito"; - pNewScript->GetAI = &GetAI_mob_tito; - pNewScript->RegisterSelf(); - // Hood pNewScript = new Script; pNewScript->Name = "npc_grandmother"; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 5425629c8..48f089fe0 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2707" + #define SD2_REVISION_NR "2708" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index e39db1f29..240e2df24 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -725,7 +725,6 @@ UPDATE creature_template SET ScriptName='boss_romulo' WHERE entry=17533; UPDATE creature_template SET ScriptName='boss_dorothee' WHERE entry=17535; UPDATE creature_template SET ScriptName='boss_strawman' WHERE entry=17543; UPDATE creature_template SET ScriptName='boss_tinhead' WHERE entry=17547; -UPDATE creature_template SET ScriptName='mob_tito' WHERE entry=17548; UPDATE creature_template SET ScriptName='boss_roar' WHERE entry=17546; UPDATE creature_template SET ScriptName='boss_crone' WHERE entry=18168; UPDATE creature_template SET ScriptName='boss_terestian_illhoof' WHERE entry=15688; diff --git a/sql/updates/r2708_mangos.sql b/sql/updates/r2708_mangos.sql new file mode 100644 index 000000000..de3461ca5 --- /dev/null +++ b/sql/updates/r2708_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='' WHERE entry=17548; From 73923e6bf376efd0c011d66ecc4f248c4479b3f9 Mon Sep 17 00:00:00 2001 From: Reamer Date: Thu, 6 Sep 2012 02:06:52 +0300 Subject: [PATCH 0699/1172] [2709] Cleanup and improve script for Terestrian Illhof - Karazhan Signed-off-by: Xfurry --- .../karazhan/boss_terestian_illhoof.cpp | 258 +++++++----------- scripts/eastern_kingdoms/karazhan/karazhan.h | 13 - sd2_revision_nr.h | 2 +- 3 files changed, 106 insertions(+), 167 deletions(-) diff --git a/scripts/eastern_kingdoms/karazhan/boss_terestian_illhoof.cpp b/scripts/eastern_kingdoms/karazhan/boss_terestian_illhoof.cpp index b78f58c4b..eaa4a64e7 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_terestian_illhoof.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_terestian_illhoof.cpp @@ -35,115 +35,69 @@ enum SAY_SUMMON1 = -1532071, SAY_SUMMON2 = -1532072, + // spells SPELL_SUMMON_DEMONCHAINS = 30120, // Summons demonic chains that maintain the ritual of sacrifice. - SPELL_DEMON_CHAINS = 30206, // Instant - Visual Effect - SPELL_ENRAGE = 23537, // Increases the caster's attack speed by 50% and the Physical damage it deals by 219 to 281 for 10 min. SPELL_SHADOW_BOLT = 30055, // Hurls a bolt of dark magic at an enemy, inflicting Shadow damage. SPELL_SACRIFICE = 30115, // Teleports and adds the debuff SPELL_BERSERK = 32965, // Increases attack speed by 75%. Periodically casts Shadow Bolt Volley. - SPELL_SUMMON_IMP = 30066, // Summons Kil'rek - - SPELL_SUMMON_FIENDISH_IMP = 30184, SPELL_FIENDISH_PORTAL = 30171, // Opens portal and summons Fiendish Portal, 2 sec cast SPELL_FIENDISH_PORTAL_1 = 30179, // Opens portal and summons Fiendish Portal, instant cast - SPELL_FIREBOLT = 30050, // Blasts a target for 150 Fire damage. + // Chains spells + SPELL_DEMON_CHAINS = 30206, // Instant - Visual Effect + + // Portal spells + SPELL_SUMMON_FIENDISH_IMP = 30184, + // Kilrek SPELL_BROKEN_PACT = 30065, // All damage taken increased by 25%. - SPELL_AMPLIFY_FLAMES = 30053, // Increases the Fire damage taken by an enemy by 500 for 25 sec. + // summoned npcs NPC_DEMONCHAINS = 17248, NPC_FIENDISHIMP = 17267, NPC_PORTAL = 17265, NPC_KILREK = 17229 }; -struct MANGOS_DLL_DECL mob_demon_chainAI : public ScriptedAI -{ - mob_demon_chainAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } - - ObjectGuid m_sacrificeGuid; - - void Reset(){} - - void AttackStart(Unit* pWho) {} - void MoveInLineOfSight(Unit* pWho) {} - - void JustDied(Unit* pKiller) - { - if (m_sacrificeGuid) - { - if (Player* pSacrifice = m_creature->GetMap()->GetPlayer(m_sacrificeGuid)) - pSacrifice->RemoveAurasDueToSpell(SPELL_SACRIFICE); - } - } -}; - struct MANGOS_DLL_DECL boss_terestianAI : public ScriptedAI { boss_terestianAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bSummonKilrek = true; Reset(); } ScriptedInstance* m_pInstance; - ObjectGuid m_aPortalGuid[2]; + ObjectGuid m_sacrificeGuid; uint32 m_uiSummonKilrekTimer; - uint32 m_uiSacrifice_Timer; - uint32 m_uiShadowbolt_Timer; - uint32 m_uiSummon_Timer; - uint32 m_uiBerserk_Timer; + uint32 m_uiSacrificeTimer; + uint32 m_uiShadowboltTimer; + uint32 m_uiSummonTimer; + uint32 m_uiBerserkTimer; - bool m_bSummonKilrek; bool m_bSummonedPortals; - bool m_bBerserk; void Reset() { - m_uiSummonKilrekTimer = 5000; - m_uiSacrifice_Timer = 30000; - m_uiShadowbolt_Timer = 5000; - m_uiSummon_Timer = 10000; - m_uiBerserk_Timer = 600000; + m_uiSummonKilrekTimer = 0; + m_uiSacrificeTimer = 30000; + m_uiShadowboltTimer = 5000; + m_uiSummonTimer = 10000; + m_uiBerserkTimer = 10*MINUTE*IN_MILLISECONDS; m_bSummonedPortals = false; - m_bBerserk = false; - - if (!m_pInstance) - return; - - for(uint8 i = 0; i < 2; ++i) - { - if (m_aPortalGuid[i]) - { - if (Creature* pPortal = m_pInstance->instance->GetCreature(m_aPortalGuid[i])) - pPortal->ForcedDespawn(); - - m_aPortalGuid[i].Clear(); - } - } - - if (!m_creature->isAlive()) - return; - - m_pInstance->SetData(TYPE_TERESTIAN, NOT_STARTED); - - if (!m_creature->GetPet()) - m_bSummonKilrek = true; } void Aggro(Unit* pWho) { - if (Pet* pKilrek = m_creature->GetPet()) - pKilrek->SetInCombatWithZone(); - DoScriptText(SAY_AGGRO, m_creature); + if (!m_creature->GetPet()) + DoCastSpellIfCan(m_creature, SPELL_SUMMON_IMP); + if (m_pInstance) m_pInstance->SetData(TYPE_TERESTIAN, IN_PROGRESS); } @@ -153,39 +107,45 @@ struct MANGOS_DLL_DECL boss_terestianAI : public ScriptedAI DoScriptText(urand(0, 1) ? SAY_SLAY1 : SAY_SLAY2, m_creature); } + void JustReachedHome() + { + if (m_pInstance) + m_pInstance->SetData(TYPE_TERESTIAN, FAIL); + } + void JustSummoned(Creature* pSummoned) { switch(pSummoned->GetEntry()) { case NPC_PORTAL: - { - if (m_aPortalGuid[0]) - { - m_aPortalGuid[1] = pSummoned->GetObjectGuid(); - - if (npc_fiendish_portalAI* pPortalAI = dynamic_cast(pSummoned->AI())) - pPortalAI->m_uiSummonTimer = 10000; - } - else + if (!m_bSummonedPortals) { - m_aPortalGuid[0] = pSummoned->GetObjectGuid(); + m_bSummonedPortals = true; DoCastSpellIfCan(m_creature, SPELL_FIENDISH_PORTAL_1, CAST_TRIGGERED); } - break; - } case NPC_KILREK: m_creature->RemoveAurasDueToSpell(SPELL_BROKEN_PACT); + pSummoned->SetInCombatWithZone(); + break; + case NPC_DEMONCHAINS: + pSummoned->CastSpell(pSummoned, SPELL_DEMON_CHAINS, false); break; } } void SummonedCreatureJustDied(Creature* pSummoned) { - if (pSummoned->GetEntry() == NPC_KILREK) + switch (pSummoned->GetEntry()) { - DoCastSpellIfCan(m_creature, SPELL_BROKEN_PACT, CAST_TRIGGERED); - m_bSummonKilrek = true; + case NPC_KILREK: + pSummoned->CastSpell(m_creature, SPELL_BROKEN_PACT, true); + m_uiSummonKilrekTimer = 30000; + break; + case NPC_DEMONCHAINS: + if (Player* pPlayer = m_creature->GetMap()->GetPlayer(m_sacrificeGuid)) + pPlayer->RemoveAurasDueToSpell(SPELL_SACRIFICE); + break; } } @@ -193,34 +153,19 @@ struct MANGOS_DLL_DECL boss_terestianAI : public ScriptedAI { DoScriptText(SAY_DEATH, m_creature); - if (!m_pInstance) - return; - - for(uint8 i = 0; i < 2; ++i) - { - if (m_aPortalGuid[i]) - { - if (Creature* pPortal = m_pInstance->instance->GetCreature(m_aPortalGuid[i])) - pPortal->ForcedDespawn(); - - m_aPortalGuid[i].Clear(); - } - } - - m_pInstance->SetData(TYPE_TERESTIAN, DONE); + if (m_pInstance) + m_pInstance->SetData(TYPE_TERESTIAN, DONE); } void UpdateAI(const uint32 uiDiff) { - if (m_bSummonKilrek) + // Respawn Kilrek if killed + if (m_uiSummonKilrekTimer) { - if (m_uiSummonKilrekTimer < uiDiff) + if (m_uiSummonKilrekTimer <= uiDiff) { if (DoCastSpellIfCan(m_creature, SPELL_SUMMON_IMP) == CAST_OK) - { - m_uiSummonKilrekTimer = 45000; - m_bSummonKilrek = false; - } + m_uiSummonKilrekTimer = 0; } else m_uiSummonKilrekTimer -= uiDiff; @@ -229,90 +174,102 @@ struct MANGOS_DLL_DECL boss_terestianAI : public ScriptedAI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - if (m_uiSacrifice_Timer < uiDiff) + if (m_uiSacrificeTimer < uiDiff) { if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1, SPELL_SACRIFICE, SELECT_FLAG_PLAYER)) { - DoCastSpellIfCan(pTarget, SPELL_SACRIFICE, CAST_TRIGGERED); - - if (Creature* pChains = m_creature->SummonCreature(NPC_DEMONCHAINS, pTarget->GetPositionX(), pTarget->GetPositionY(), pTarget->GetPositionZ(), 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 21000)) + if (DoCastSpellIfCan(pTarget, SPELL_SACRIFICE) == CAST_OK) { - if (mob_demon_chainAI* pDemonAI = dynamic_cast(pChains->AI())) - pDemonAI->m_sacrificeGuid = pTarget->GetObjectGuid(); - - pChains->CastSpell(pChains, SPELL_DEMON_CHAINS, true); - + DoCastSpellIfCan(m_creature, SPELL_SUMMON_DEMONCHAINS, CAST_TRIGGERED); DoScriptText(urand(0, 1) ? SAY_SACRIFICE1 : SAY_SACRIFICE2, m_creature); - - m_uiSacrifice_Timer = 30000; + m_sacrificeGuid = pTarget->GetObjectGuid(); + m_uiSacrificeTimer = 43000; } } } else - m_uiSacrifice_Timer -= uiDiff; + m_uiSacrificeTimer -= uiDiff; - if (m_uiShadowbolt_Timer < uiDiff) + if (m_uiShadowboltTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_SHADOW_BOLT); - m_uiShadowbolt_Timer = 10000; + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_SHADOW_BOLT) == CAST_OK) + m_uiShadowboltTimer = 10000; } else - m_uiShadowbolt_Timer -= uiDiff; + m_uiShadowboltTimer -= uiDiff; - if (!m_bSummonedPortals) + if (m_uiSummonTimer) { - if (m_uiSummon_Timer < uiDiff) + if (m_uiSummonTimer <= uiDiff) { - if (DoCastSpellIfCan(m_creature, SPELL_FIENDISH_PORTAL, CAST_INTERRUPT_PREVIOUS) == CAST_OK) + if (DoCastSpellIfCan(m_creature, SPELL_FIENDISH_PORTAL) == CAST_OK) { DoScriptText(urand(0, 1) ? SAY_SUMMON1 : SAY_SUMMON2, m_creature); - m_bSummonedPortals = true; + m_uiSummonTimer = 0; } } else - m_uiSummon_Timer -= uiDiff; + m_uiSummonTimer -= uiDiff; } - if (!m_bBerserk) + if (m_uiBerserkTimer) { - if (m_uiBerserk_Timer < uiDiff) + if (m_uiBerserkTimer <= uiDiff) { - DoCastSpellIfCan(m_creature, SPELL_BERSERK, CAST_INTERRUPT_PREVIOUS); - m_bBerserk = true; + if (DoCastSpellIfCan(m_creature, SPELL_BERSERK) == CAST_OK) + m_uiBerserkTimer = 0; } else - m_uiBerserk_Timer -= uiDiff; + m_uiBerserkTimer -= uiDiff; } DoMeleeAttackIfReady(); } }; -npc_fiendish_portalAI::npc_fiendish_portalAI(Creature* pCreature) : ScriptedAI(pCreature), - m_uiSummonTimer(5000) +struct MANGOS_DLL_DECL npc_fiendish_portalAI : public ScriptedAI { - Reset(); -} + npc_fiendish_portalAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } -void npc_fiendish_portalAI::Reset() -{ -} + uint32 m_uiSummonTimer; -void npc_fiendish_portalAI::JustSummoned(Creature* pSummoned) -{ - pSummoned->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_FIRE, true); - pSummoned->SetInCombatWithZone(); -} + void Reset() + { + m_uiSummonTimer = 5000; + } -void npc_fiendish_portalAI::UpdateAI(const uint32 uiDiff) -{ - if (m_uiSummonTimer < uiDiff) + void JustSummoned(Creature* pSummoned) + { + pSummoned->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_FIRE, true); + pSummoned->SetInCombatWithZone(); + } + + void UpdateAI(const uint32 uiDiff) { - DoCastSpellIfCan(m_creature, SPELL_SUMMON_FIENDISH_IMP); - m_uiSummonTimer = 10000; + if (m_uiSummonTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_SUMMON_FIENDISH_IMP) == CAST_OK) + m_uiSummonTimer = 5000; + } + else + m_uiSummonTimer -= uiDiff; } - else - m_uiSummonTimer -= uiDiff; +}; + +// TODO Remove this 'script' when combat can be proper prevented from core-side +struct MANGOS_DLL_DECL mob_demon_chainAI : public Scripted_NoMovementAI +{ + mob_demon_chainAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { Reset(); } + + void Reset() { } + void MoveInLineOfSight(Unit* pWho) { } + void AttackStart(Unit* pWho) { } + void UpdateAI(const uint32 uiDiff) { } +}; + +CreatureAI* GetAI_boss_terestian_illhoof(Creature* pCreature) +{ + return new boss_terestianAI(pCreature); } CreatureAI* GetAI_npc_fiendish_portal(Creature* pCreature) @@ -325,11 +282,6 @@ CreatureAI* GetAI_mob_demon_chain(Creature* pCreature) return new mob_demon_chainAI(pCreature); } -CreatureAI* GetAI_boss_terestian_illhoof(Creature* pCreature) -{ - return new boss_terestianAI(pCreature); -} - void AddSC_boss_terestian_illhoof() { Script* pNewScript; diff --git a/scripts/eastern_kingdoms/karazhan/karazhan.h b/scripts/eastern_kingdoms/karazhan/karazhan.h index b50e8ae77..f90e8952d 100644 --- a/scripts/eastern_kingdoms/karazhan/karazhan.h +++ b/scripts/eastern_kingdoms/karazhan/karazhan.h @@ -142,17 +142,4 @@ class MANGOS_DLL_DECL instance_karazhan : public ScriptedInstance GuidList m_lNightbaneAirTriggers; }; -class MANGOS_DLL_DECL npc_fiendish_portalAI : public ScriptedAI -{ - public: - npc_fiendish_portalAI(Creature* pCreature); - ~npc_fiendish_portalAI() {} - - void Reset(); - void JustSummoned(Creature* pSummoned); - void UpdateAI(const uint32 uiDiff); - - uint32 m_uiSummonTimer; -}; - #endif diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 48f089fe0..55eb55028 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2708" + #define SD2_REVISION_NR "2709" #endif // __SD2_REVISION_NR_H__ From 4137666a4cb488e16af02e847c32a3a479a2bc6f Mon Sep 17 00:00:00 2001 From: Reamer Date: Thu, 6 Sep 2012 23:49:42 +0300 Subject: [PATCH 0700/1172] [2710] Improve script for Netherspite - Karazhan Signed-off-by: Xfurry --- .../karazhan/boss_netherspite.cpp | 177 +++++++++++++----- .../karazhan/boss_terestian_illhoof.cpp | 4 +- sd2_revision_nr.h | 2 +- sql/scriptdev2_script_full.sql | 4 +- sql/updates/r2710_scriptdev2.sql | 1 + 5 files changed, 137 insertions(+), 51 deletions(-) create mode 100644 sql/updates/r2710_scriptdev2.sql diff --git a/scripts/eastern_kingdoms/karazhan/boss_netherspite.cpp b/scripts/eastern_kingdoms/karazhan/boss_netherspite.cpp index b0271fe9b..581feb77b 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_netherspite.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_netherspite.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: Boss_Netherspite -SD%Complete: 30% -SDComment: find spell ID for tail swipe added in patch 3.0.2 +SD%Complete: 50 +SDComment: Nether portals NYI. Find spell ID for tail swipe added in patch 3.0.2 SDCategory: Karazhan EndScriptData */ @@ -31,33 +31,41 @@ enum SPELL_VOID_ZONE = 37063, SPELL_NETHERBREATH = 38523, SPELL_EMPOWERMENT = 38549, - SPELL_NETHER_INFUSION = 38688, - SPELL_NETHERSPITE_ROAR = 38684, - SPELL_BANISH_VISUAL = 39833, - SPELL_ROOT = 42716, + SPELL_NETHER_INFUSION = 38688, // hard enrage spell + SPELL_NETHERSPITE_ROAR = 38684, // on banish phase begin + SPELL_SHADOWFORM = 38542, // banish visual spell + SPELL_FACE_RANDOM_TARGET = 38546, // triggered by spell 38684 - currently not used + SPELL_PORTAL_ATTUNEMENT = 30425, //void zone spells - SPELL_CONSUMPTION = 30497, + SPELL_CONSUMPTION = 28865, //beam buffs - SPELL_PERSEVERENCE_NS = 30466, - SPELL_PERSEVERENCE_PLR = 30421, SPELL_SERENITY_NS = 30467, SPELL_SERENITY_PLR = 30422, SPELL_DOMINANCE_NS = 30468, SPELL_DOMINANCE_PLR = 30423, + SPELL_PERSEVERENCE_NS = 30466, + SPELL_PERSEVERENCE_PLR = 30421, //beam debuffs - SPELL_EXHAUSTION_DOM = 38639, SPELL_EXHAUSTION_SER = 38638, + SPELL_EXHAUSTION_DOM = 38639, SPELL_EXHAUSTION_PER = 38637, - //beam spells - SPELL_BEAM_DOM = 30402, + // spells which hit players SPELL_BEAM_SER = 30401, + SPELL_BEAM_DOM = 30402, SPELL_BEAM_PER = 30400, - SPELL_BLUE_PORTAL = 30491, + + // spells which hit Netherspite + SPELL_BEAM_GREEN = 30464, + SPELL_BEAM_BLUE = 30463, + SPELL_BEAM_RED = 30465, + + // portal visual spells SPELL_GREEN_PORTAL = 30490, + SPELL_BLUE_PORTAL = 30491, SPELL_RED_PORTAL = 30487, //emotes @@ -65,29 +73,40 @@ enum EMOTE_PHASE_BANISH = -1532090, //npcs - NPC_PORTAL_CREATURE = 17369, - NPC_VOID_ZONE = 16697 + NPC_PORTAL_GREEN = 17367, + NPC_PORTAL_BLUE = 17368, + NPC_PORTAL_RED = 17369, + NPC_VOID_ZONE = 16697, + + MAX_PORTALS = 3, }; struct SpawnLocation { - float x, y, z; + float fX, fY, fZ, fO; }; // at first spawn portals got fixed coords, should be shuffled in subsequent beam phases -static SpawnLocation PortalCoordinates[] = +static const SpawnLocation aPortalCoordinates[MAX_PORTALS] = { - {-11105.508789f, -1600.851685f, 279.950256f}, - {-11195.353516f, -1613.237183f, 278.237258f}, - {-11137.846680f, -1685.607422f, 278.239258f} + {-11195.14f, -1616.375f, 278.3217f, 6.230825f}, + {-11108.13f, -1602.839f, 280.0323f, 3.717551f}, + {-11139.78f, -1681.278f, 278.3217f, 1.396263f}, }; -enum Phases +enum NetherspitePhases { BEAM_PHASE = 0, BANISH_PHASE = 1, }; +static const uint32 auiPortals[MAX_PORTALS] = +{ + NPC_PORTAL_GREEN, + NPC_PORTAL_BLUE, + NPC_PORTAL_RED, +}; + struct MANGOS_DLL_DECL boss_netherspiteAI : public ScriptedAI { boss_netherspiteAI(Creature* pCreature) : ScriptedAI(pCreature) @@ -98,22 +117,33 @@ struct MANGOS_DLL_DECL boss_netherspiteAI : public ScriptedAI ScriptedInstance* m_pInstance; - bool m_bIsEnraged; - uint8 m_uiActivePhase; + NetherspitePhases m_uiActivePhase; uint32 m_uiEnrageTimer; uint32 m_uiVoidZoneTimer; uint32 m_uiPhaseSwitchTimer; uint32 m_uiNetherbreathTimer; + uint32 m_uiEmpowermentTimer; + + std::vector m_vPortalEntryList; void Reset() { - m_bIsEnraged = false; - m_uiActivePhase = BEAM_PHASE; + m_uiActivePhase = BEAM_PHASE; - m_uiEnrageTimer = MINUTE*9*IN_MILLISECONDS; + m_uiEmpowermentTimer = 10000; + m_uiEnrageTimer = 9*MINUTE*IN_MILLISECONDS; m_uiVoidZoneTimer = 15000; m_uiPhaseSwitchTimer = MINUTE*IN_MILLISECONDS; + + SetCombatMovement(true); + + // initialize the portal list + m_vPortalEntryList.clear(); + m_vPortalEntryList.resize(MAX_PORTALS); + + for (uint8 i = 0; i < MAX_PORTALS; ++i) + m_vPortalEntryList[i] = auiPortals[i]; } void Aggro(Unit* pWho) @@ -121,6 +151,7 @@ struct MANGOS_DLL_DECL boss_netherspiteAI : public ScriptedAI if (m_pInstance) m_pInstance->SetData(TYPE_NETHERSPITE, IN_PROGRESS); + DoSummonPortals(); DoCastSpellIfCan(m_creature, SPELL_NETHERBURN); } @@ -133,32 +164,74 @@ struct MANGOS_DLL_DECL boss_netherspiteAI : public ScriptedAI void JustReachedHome() { if (m_pInstance) - m_pInstance->SetData(TYPE_NETHERSPITE, NOT_STARTED); + m_pInstance->SetData(TYPE_NETHERSPITE, FAIL); } void SwitchPhases() { if (m_uiActivePhase == BEAM_PHASE) { - m_uiActivePhase = BANISH_PHASE; - DoScriptText(EMOTE_PHASE_BANISH, m_creature); + if (DoCastSpellIfCan(m_creature, SPELL_NETHERSPITE_ROAR) == CAST_OK) + { + DoCastSpellIfCan(m_creature, SPELL_SHADOWFORM, CAST_TRIGGERED); + m_creature->RemoveAurasDueToSpell(SPELL_EMPOWERMENT); - m_uiNetherbreathTimer = 500; - m_uiPhaseSwitchTimer = (MINUTE/2)*IN_MILLISECONDS; + SetCombatMovement(false); + m_creature->GetMotionMaster()->MoveIdle(); + + m_uiActivePhase = BANISH_PHASE; + DoScriptText(EMOTE_PHASE_BANISH, m_creature); + + m_uiNetherbreathTimer = 2000; + m_uiPhaseSwitchTimer = 30000; + } } else { + m_creature->RemoveAurasDueToSpell(SPELL_SHADOWFORM); + SetCombatMovement(true); + DoStartMovement(m_creature->getVictim()); + m_uiActivePhase = BEAM_PHASE; DoScriptText(EMOTE_PHASE_BEAM, m_creature); - DoCastSpellIfCan(m_creature, SPELL_NETHERSPITE_ROAR); - m_uiPhaseSwitchTimer = MINUTE*IN_MILLISECONDS; + DoSummonPortals(); + m_uiEmpowermentTimer = 10000; + m_uiPhaseSwitchTimer = MINUTE*IN_MILLISECONDS; } //reset threat every phase switch DoResetThreat(); } + void DoSummonPortals() + { + for (uint8 i = 0; i < MAX_PORTALS; ++i) + m_creature->SummonCreature(m_vPortalEntryList[i], aPortalCoordinates[i].fX, aPortalCoordinates[i].fY, aPortalCoordinates[i].fZ, aPortalCoordinates[i].fO, TEMPSUMMON_TIMED_DESPAWN, 60000); + + // randomize the portals after the first summon + std::random_shuffle(m_vPortalEntryList.begin(), m_vPortalEntryList.end()); + } + + void JustSummoned(Creature* pSummoned) + { + switch (pSummoned->GetEntry()) + { + case NPC_VOID_ZONE: + pSummoned->CastSpell(pSummoned, SPELL_CONSUMPTION, false); + break; + case NPC_PORTAL_RED: + pSummoned->CastSpell(pSummoned, SPELL_RED_PORTAL, false); + break; + case NPC_PORTAL_GREEN: + pSummoned->CastSpell(pSummoned, SPELL_GREEN_PORTAL, false); + break; + case NPC_PORTAL_BLUE: + pSummoned->CastSpell(pSummoned, SPELL_BLUE_PORTAL, false); + break; + } + } + void UpdateAI(const uint32 uiDiff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) @@ -169,12 +242,12 @@ struct MANGOS_DLL_DECL boss_netherspiteAI : public ScriptedAI else m_uiPhaseSwitchTimer -= uiDiff; - if (!m_bIsEnraged) + if (m_uiEnrageTimer) { - if (m_uiEnrageTimer < uiDiff) + if (m_uiEnrageTimer <= uiDiff) { - DoCastSpellIfCan(m_creature, SPELL_NETHER_INFUSION, CAST_FORCE_CAST); - m_bIsEnraged = true; + if (DoCastSpellIfCan(m_creature, SPELL_NETHER_INFUSION) == CAST_OK) + m_uiEnrageTimer = 0; } else m_uiEnrageTimer -= uiDiff; @@ -185,28 +258,40 @@ struct MANGOS_DLL_DECL boss_netherspiteAI : public ScriptedAI if (m_uiVoidZoneTimer < uiDiff) { if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) - DoCastSpellIfCan(pTarget, SPELL_VOID_ZONE, true); - - m_uiVoidZoneTimer = 15000; + { + if (DoCastSpellIfCan(pTarget, SPELL_VOID_ZONE) == CAST_OK) + m_uiVoidZoneTimer = 15000; + } } else m_uiVoidZoneTimer -= uiDiff; + if (m_uiEmpowermentTimer) + { + if (m_uiEmpowermentTimer <= uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_EMPOWERMENT) == CAST_OK) + { + DoCastSpellIfCan(m_creature, SPELL_PORTAL_ATTUNEMENT, CAST_TRIGGERED); + m_uiEmpowermentTimer = 0; + } + } + else + m_uiEmpowermentTimer -= uiDiff; + } + + DoMeleeAttackIfReady(); } else { if (m_uiNetherbreathTimer < uiDiff) { - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) - DoCastSpellIfCan(pTarget, SPELL_NETHERBREATH); - - m_uiNetherbreathTimer = urand(4000, 5000); + if (DoCastSpellIfCan(m_creature, SPELL_NETHERBREATH) == CAST_OK) + m_uiNetherbreathTimer = urand(4000, 5000); } else m_uiNetherbreathTimer -= uiDiff; } - - DoMeleeAttackIfReady(); } }; diff --git a/scripts/eastern_kingdoms/karazhan/boss_terestian_illhoof.cpp b/scripts/eastern_kingdoms/karazhan/boss_terestian_illhoof.cpp index eaa4a64e7..9f8b22a70 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_terestian_illhoof.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_terestian_illhoof.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: Boss_Terestian_Illhoof -SD%Complete: 95 -SDComment: Complete! Needs adjustments to use spell though. +SD%Complete: 100 +SDComment: SDCategory: Karazhan EndScriptData */ diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 55eb55028..ff98e95ea 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2709" + #define SD2_REVISION_NR "2710" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index c759acb54..0298d1eab 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -1630,8 +1630,8 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1532087,'At last... The nightmare is.. over...',9244,1,0,0,'aran SAY_DEATH'), (-1532088,'Where did you get that?! Did HE send you?!',9249,1,0,0,'aran SAY_ATIESH'), -(-1532089,'%s cries out in withdrawal, opening gates to the warp.',0,2,0,0,'netherspite EMOTE_PHASE_PORTAL'), -(-1532090,'%s goes into a nether-fed rage!',0,2,0,0,'netherspite EMOTE_PHASE_BANISH'), +(-1532089,'%s cries out in withdrawal, opening gates to the warp.',0,3,0,0,'netherspite EMOTE_PHASE_PORTAL'), +(-1532090,'%s goes into a nether-fed rage!',0,3,0,0,'netherspite EMOTE_PHASE_BANISH'), (-1532091,'Madness has brought you here to me. I shall be your undoing!',9218,1,0,0,'malchezaar SAY_AGGRO'), (-1532092,'Simple fools! Time is the fire in which you\'ll burn!',9220,1,0,0,'malchezaar SAY_AXE_TOSS1'), diff --git a/sql/updates/r2710_scriptdev2.sql b/sql/updates/r2710_scriptdev2.sql new file mode 100644 index 000000000..84f796272 --- /dev/null +++ b/sql/updates/r2710_scriptdev2.sql @@ -0,0 +1 @@ +UPDATE script_texts SET type=3 WHERE entry IN (-1532089,-1532090); From e73b84859bc1e2ecd82e005e41fa3d92c2702d11 Mon Sep 17 00:00:00 2001 From: evil-at-wow Date: Thu, 6 Sep 2012 23:48:32 +0200 Subject: [PATCH 0701/1172] Fix typo in script support for quest 9645 --- scripts/eastern_kingdoms/karazhan/karazhan.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/eastern_kingdoms/karazhan/karazhan.cpp b/scripts/eastern_kingdoms/karazhan/karazhan.cpp index f8927b233..6ae9d9515 100644 --- a/scripts/eastern_kingdoms/karazhan/karazhan.cpp +++ b/scripts/eastern_kingdoms/karazhan/karazhan.cpp @@ -496,7 +496,7 @@ bool ProcessEventId_event_spell_medivh_journal(uint32 uiEventId, Object* pSource // Summon Medivh and Arcanagos if (Creature* pMedivh = ((Player*)pSource)->SummonCreature(NPC_IMAGE_OF_MEDIVH, afMedivhSpawnLoc[0], afMedivhSpawnLoc[1], afMedivhSpawnLoc[2], afMedivhSpawnLoc[3], TEMPSUMMON_DEAD_DESPAWN, 0)) { - pMedivh->SummonCreature(NPC_IMAGE_OF_ARCANAGOS, afArcanagosSpawnLoc[0], afArcanagosSpawnLoc[1], afArcanagosSpawnLoc[2], afArcanagosSpawnLoc[2], TEMPSUMMON_DEAD_DESPAWN, 0); + pMedivh->SummonCreature(NPC_IMAGE_OF_ARCANAGOS, afArcanagosSpawnLoc[0], afArcanagosSpawnLoc[1], afArcanagosSpawnLoc[2], afArcanagosSpawnLoc[3], TEMPSUMMON_DEAD_DESPAWN, 0); // store the player who started the event if (npc_image_of_medivhAI* pMedivhAI = dynamic_cast(pMedivh->AI())) From c5b1401869922f29f13899794e4354dab25965e1 Mon Sep 17 00:00:00 2001 From: evil-at-wow Date: Thu, 6 Sep 2012 23:53:00 +0200 Subject: [PATCH 0702/1172] Fix missing value/timer in the Illidan/Maiev conversation data. --- scripts/outland/black_temple/boss_illidan.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/outland/black_temple/boss_illidan.cpp b/scripts/outland/black_temple/boss_illidan.cpp index 36e26a655..528b70f53 100644 --- a/scripts/outland/black_temple/boss_illidan.cpp +++ b/scripts/outland/black_temple/boss_illidan.cpp @@ -107,7 +107,7 @@ static const Yells aConversation[]= // Emote dead for now. Kill him later {SAY_CONVO_12, ILLIDAN_STORMRAGE, 22000, 0, true}, {SAY_CONVO_13, MAIEV_SHADOWSONG, 9000, 0, true}, - {SAY_CONVO_14, MAIEV_SHADOWSONG, 0, true}, + {SAY_CONVO_14, MAIEV_SHADOWSONG, 3000, 0, true}, {SAY_CONVO_15, AKAMA, 8000, 0, true}, {0, EMPTY, 1000, 0, false} }; From 511f214585c1d9f40dde0e645e911fe1de48c8d2 Mon Sep 17 00:00:00 2001 From: michalpolko Date: Sat, 8 Sep 2012 12:04:19 +0200 Subject: [PATCH 0703/1172] [2711] Implemented basic Lich King's abilities. TODO: Some spells require special targeting rules Need research on destroying the pillars and platform while transition phases and targeting of Quake spell (visual beam effect - what NPCs should be used for targeting?) --- .../icecrown_citadel/boss_the_lich_king.cpp | 234 ++++++++++++++++++ sd2_revision_nr.h | 2 +- 2 files changed, 235 insertions(+), 1 deletion(-) diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_the_lich_king.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_the_lich_king.cpp index 5bad68f6c..ca3eb81db 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_the_lich_king.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_the_lich_king.cpp @@ -250,6 +250,20 @@ struct MANGOS_DLL_DECL boss_the_lich_king_iccAI : public ScriptedAI uint32 m_uiPhase; uint32 m_uiPhaseTimer; uint32 m_uiBerserkTimer; + uint32 m_uiGhoulsTimer; + uint32 m_uiHorrorTimer; + uint32 m_uiNecroticPlagueTimer; + uint32 m_uiInfestTimer; + uint32 m_uiShadowTrapTimer; + uint32 m_uiPainSufferingTimer; + uint32 m_uiRagingSpiritTimer; + uint32 m_uiIceSphereTimer; + uint32 m_uiValkyrTimer; + uint32 m_uiDefileTimer; + uint32 m_uiSoulReaperTimer; + uint32 m_uiHarvestSoulTimer; + uint32 m_uiFrostmournePhaseTimer; + uint32 m_uiVileSpiritsTimer; void Reset() { @@ -257,6 +271,19 @@ struct MANGOS_DLL_DECL boss_the_lich_king_iccAI : public ScriptedAI m_uiPhase = PHASE_INTRO; m_uiBerserkTimer = 15 * MINUTE * IN_MILLISECONDS; + m_uiGhoulsTimer = 13000; + m_uiHorrorTimer = 21000; + m_uiInfestTimer = 20000; + m_uiNecroticPlagueTimer = 23000; + m_uiShadowTrapTimer = 15000; + m_uiPainSufferingTimer = 6000; + m_uiRagingSpiritTimer = 20000; + m_uiIceSphereTimer = 6000; + m_uiValkyrTimer = 10000; + m_uiDefileTimer = 30000; + m_uiSoulReaperTimer = 25000; + m_uiHarvestSoulTimer = 5000; + m_uiVileSpiritsTimer = 20000; } void Aggro(Unit *pWho) @@ -377,6 +404,61 @@ struct MANGOS_DLL_DECL boss_the_lich_king_iccAI : public ScriptedAI return; } + // Necrotic Plague + if (m_uiNecroticPlagueTimer < uiDiff) + { + // shouldn't be targeting players who already have Necrotic Plague on them + if (Unit *pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1, SPELL_NECROTIC_PLAGUE, SELECT_FLAG_PLAYER)) + { + if (DoCastSpellIfCan(pTarget, SPELL_NECROTIC_PLAGUE) == CAST_OK) + m_uiNecroticPlagueTimer = 30000; + } + } + else + m_uiNecroticPlagueTimer -= uiDiff; + + // Infest + if (m_uiInfestTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_INFEST) == CAST_OK) + m_uiInfestTimer = urand(20000, 25000); + } + else + m_uiInfestTimer -= uiDiff; + + // Summon Ghouls + if (m_uiGhoulsTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_SUMMON_GHOULS) == CAST_OK) + m_uiGhoulsTimer = 32000; + } + else + m_uiGhoulsTimer -= uiDiff; + + // Summon Shambling Horror + if (m_uiHorrorTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_SUMMON_HORROR) == CAST_OK) + m_uiHorrorTimer = 60000; + } + else + m_uiHorrorTimer -= uiDiff; + + // Shadow Trap (heroic) + if (m_pInstance && m_pInstance->IsHeroicDifficulty()) + { + if (m_uiShadowTrapTimer < uiDiff) + { + if (Unit *pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1, SPELL_SHADOW_TRAP, SELECT_FLAG_PLAYER)) + { + if (DoCastSpellIfCan(pTarget, SPELL_SHADOW_TRAP) == CAST_OK) + m_uiShadowTrapTimer = 15000; + } + } + else + m_uiShadowTrapTimer -= uiDiff; + } + DoMeleeAttackIfReady(); break; @@ -403,6 +485,39 @@ struct MANGOS_DLL_DECL boss_the_lich_king_iccAI : public ScriptedAI else m_uiPhaseTimer -= uiDiff; + // Pain and Suffering + if (m_uiPainSufferingTimer < uiDiff) + { + if (Unit *pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0, SPELL_PAIN_AND_SUFFERING, SELECT_FLAG_PLAYER)) + { + if (DoCastSpellIfCan(pTarget, SPELL_PAIN_AND_SUFFERING) == CAST_OK) + m_uiPainSufferingTimer = urand(1500, 3000); + } + } + else + m_uiPainSufferingTimer -= uiDiff; + + // Summon Ice Sphere + if (m_uiIceSphereTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_ICE_SPHERE) == CAST_OK) + m_uiIceSphereTimer = 6000; + } + else + m_uiIceSphereTimer -= uiDiff; + + // Summon Raging Spirit + if (m_uiRagingSpiritTimer < uiDiff) + { + if (Unit *pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0, SPELL_RAGING_SPIRIT, SELECT_FLAG_PLAYER)) + { + if (DoCastSpellIfCan(pTarget, SPELL_RAGING_SPIRIT, CAST_TRIGGERED) == CAST_OK) + m_uiRagingSpiritTimer = (m_uiPhase == PHASE_TRANSITION_ONE ? 20000 : 15000); + } + } + else + m_uiRagingSpiritTimer -= uiDiff; + break; } case PHASE_QUAKE_ONE: @@ -435,6 +550,49 @@ struct MANGOS_DLL_DECL boss_the_lich_king_iccAI : public ScriptedAI m_uiPhase = PHASE_RUNNING_WINTER_TWO; } + // Soul Reaper + if (m_uiSoulReaperTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_SOUL_REAPER) == CAST_OK) + m_uiSoulReaperTimer = 30000; + } + else + m_uiSoulReaperTimer -= uiDiff; + + // Infest + if (m_uiInfestTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_INFEST) == CAST_OK) + m_uiInfestTimer = urand(20000, 25000); + } + else + m_uiInfestTimer -= uiDiff; + + // Defile + if (m_uiDefileTimer < uiDiff) + { + // shouldn't be targeting players in vehicles + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1, SPELL_DEFILE, SELECT_FLAG_PLAYER)) + { + if (DoCastSpellIfCan(pTarget, SPELL_DEFILE) == CAST_OK) + m_uiDefileTimer = 30000; + } + } + else + m_uiDefileTimer -= uiDiff; + + // Summon Val'kyr + if (m_uiValkyrTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_SUMMON_VALKYR) == CAST_OK) + { + DoScriptText(SAY_SUMMON_VALKYR, m_creature); + m_uiValkyrTimer = 50000; + } + } + else + m_uiValkyrTimer -= uiDiff; + DoMeleeAttackIfReady(); break; @@ -455,12 +613,88 @@ struct MANGOS_DLL_DECL boss_the_lich_king_iccAI : public ScriptedAI } } + // Soul Reaper + if (m_uiSoulReaperTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_SOUL_REAPER) == CAST_OK) + m_uiSoulReaperTimer = 30000; + } + else + m_uiSoulReaperTimer -= uiDiff; + + // Defile + if (m_uiDefileTimer < uiDiff) + { + // shouldn't be targeting players in vehicles + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1, SPELL_DEFILE, SELECT_FLAG_PLAYER)) + { + if (DoCastSpellIfCan(pTarget, SPELL_DEFILE) == CAST_OK) + m_uiDefileTimer = 30000; + } + } + else + m_uiDefileTimer -= uiDiff; + + // Harvest Soul + if (m_uiHarvestSoulTimer < uiDiff) + { + Unit *pTarget = NULL; + bool m_bIsHeroic = m_pInstance && m_pInstance->IsHeroicDifficulty(); + if (m_bIsHeroic) + pTarget = m_creature; + else + pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1, SPELL_HARVEST_SOUL, SELECT_FLAG_PLAYER); + + if (pTarget) + { + if (DoCastSpellIfCan(pTarget, m_bIsHeroic ? SPELL_HARVEST_SOULS : SPELL_HARVEST_SOUL) == CAST_OK) + { + DoScriptText(SAY_HARVEST_SOUL, m_creature); + m_uiHarvestSoulTimer = m_bIsHeroic ? 120000 : 70000; + + // TODO: prepare Frostmourne room - summon bombs and Tirion, or Tirion and the "bad spirit-guy" + + if (m_bIsHeroic) + { + m_uiPhase = PHASE_IN_FROSTMOURNE; + SetCombatMovement(false); + m_creature->StopMoving(); + m_uiFrostmournePhaseTimer = 47000; + m_uiDefileTimer = 1000; + } + } + } + } + else + m_uiHarvestSoulTimer -= uiDiff; + + // Vile Spirits + if (m_uiVileSpiritsTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_VILE_SPIRITS) == CAST_OK) + m_uiVileSpiritsTimer = 30000; + } + else + m_uiVileSpiritsTimer -= uiDiff; + DoMeleeAttackIfReady(); break; } case PHASE_IN_FROSTMOURNE: { + // check if players are alive before entering evade mode? + // wait until they leave Frostmourne + if (m_uiFrostmournePhaseTimer < uiDiff) + { + m_uiPhase = PHASE_THREE; + if (m_creature->getVictim()) + m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); + return; + } + else + m_uiFrostmournePhaseTimer -= uiDiff; + break; } case PHASE_DEATH_AWAITS: diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index ff98e95ea..c65ae2c71 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2710" + #define SD2_REVISION_NR "2711" #endif // __SD2_REVISION_NR_H__ From a46be54742b1c005f61ae0ae1497ea627907f0ad Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sun, 9 Sep 2012 00:57:19 +0300 Subject: [PATCH 0704/1172] [2712] Cleanup and improve script for Jan'alai - Zul'aman * This will remove the bomb event hacks * Improve the hatcher behavior * Allow the event creatures to be handled by database or boss script --- .../eastern_kingdoms/zulaman/boss_janalai.cpp | 700 +++++++----------- .../zulaman/instance_zulaman.cpp | 35 +- scripts/eastern_kingdoms/zulaman/zulaman.h | 11 +- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 + sql/updates/r2712_mangos.sql | 1 + 6 files changed, 257 insertions(+), 493 deletions(-) create mode 100644 sql/updates/r2712_mangos.sql diff --git a/scripts/eastern_kingdoms/zulaman/boss_janalai.cpp b/scripts/eastern_kingdoms/zulaman/boss_janalai.cpp index 4bf1430ff..797607486 100644 --- a/scripts/eastern_kingdoms/zulaman/boss_janalai.cpp +++ b/scripts/eastern_kingdoms/zulaman/boss_janalai.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: Boss_Janalai -SD%Complete: 75 -SDComment: +SD%Complete: 90 +SDComment: The hatchers may need some additional behavior adjustments. SDCategory: Zul'Aman EndScriptData */ @@ -39,52 +39,43 @@ enum //Jan'alai SPELL_FLAME_BREATH = 43140, - SPELL_FIRE_WALL = 43113, + SPELL_HATCH_ALL_EGGS = 43144, // triggers 42493 + SPELL_TELEPORT_TO_CENTER = 43098, + SPELL_SUMMON_ALL_PLAYERS = 43096, // triggers 43097 SPELL_ENRAGE = 44779, - SPELL_TELETOCENTER = 43098, - SPELL_SUMMONALL = 43097, SPELL_BERSERK = 47008, SPELL_SUMMON_HATCHER_1 = 43962, SPELL_SUMMON_HATCHER_2 = 45340, //Fire Bob Spells SPELL_FIRE_BOMB_CHANNEL = 42621, - SPELL_FIRE_BOMB_THROW = 42628, - SPELL_FIRE_BOMB_DUMMY = 42629, - SPELL_FIRE_BOMB_DAMAGE = 42630, + SPELL_FIRE_BOMB_THROW = 42628, // triggers 42629 + SPELL_FIRE_BOMB_EXPLODE = 42631, // triggers 42630 - //NPC's + //NPCs NPC_FIRE_BOMB = 23920, NPC_AMANI_HATCHER_1 = 23818, NPC_AMANI_HATCHER_2 = 24504, NPC_HATCHLING = 23598, + NPC_DRAGONHAWK_EGG = 23817, //Hatcher Spells - SPELL_HATCH_EGG = 43734, //spell 42471 also exist - SPELL_HATCH_ALL_EGGS = 43144, + SPELL_HATCH_EGG_1 = 43734, + SPELL_HATCH_EGG_2 = 42471, + + // Fire Wall + SPELL_FIRE_WALL = 43113, - //Eggs spells + // Eggs spells SPELL_SUMMON_DRAGONHAWK = 42493, //Hatchling Spells - SPELL_FLAMEBUFFED = 43299 -}; + SPELL_FLAMEBUFFED = 43299, -//spells should summon Fire Bomb, used in Throw5Bombs() -static uint32 m_auiSpellFireBombSummon[]= -{ - 42622, 42623, 42624, 42625, 42626 + MAX_EGGS_ON_SIDE = 20, // there are 20 eggs spawned on each side }; -const int area_dx = 44; -const int area_dy = 51; - -float JanalainPos[1][3] = -{ - {-33.93f, 1149.27f, 19.0f} -}; - -float FireWallCoords[4][4] = +static const float afFireWallCoords[4][4] = { {-10.13f, 1149.27f, 19.0f, M_PI_F}, {-33.93f, 1123.90f, 19.0f, 0.5f*M_PI_F}, @@ -97,44 +88,26 @@ struct WaypointDef float m_fX, m_fY, m_fZ; }; -WaypointDef m_aHatcherRight[]= +static const WaypointDef m_aHatcherRight[]= { - {-86.203f, 1136.834f, 5.594f}, //this is summon point, not regular waypoint {-74.783f, 1145.827f, 5.420f}, + {-54.476f, 1146.934f, 18.705f}, {-56.957f, 1146.713f, 18.725f}, {-45.428f, 1141.697f, 18.709f}, {-34.002f, 1124.427f, 18.711f}, {-34.085f, 1106.158f, 18.711f} }; -WaypointDef m_aHatcherLeft[]= +static const WaypointDef m_aHatcherLeft[]= { - {-85.420f, 1167.321f, 5.594f}, //this is summon point, not regular waypoint {-73.569f, 1154.960f, 5.510f}, + {-54.264f, 1153.968f, 18.705f}, {-56.985f, 1153.373f, 18.608f}, {-45.515f, 1158.356f, 18.709f}, {-33.314f, 1174.816f, 18.709f}, {-33.097f, 1195.359f, 18.709f} }; -float hatcherway_l[5][3] = -{ - {-87.46f, 1170.09f, 6.0f}, - {-74.41f, 1154.75f, 6.0f}, - {-52.74f, 1153.32f, 19.0f}, - {-33.37f, 1172.46f, 19.0f}, - {-33.09f, 1203.87f, 19.0f} -}; - -float hatcherway_r[5][3] = -{ - {-86.57f, 1132.85f, 6.0f}, - {-73.94f, 1146.00f, 6.0f}, - {-52.29f, 1146.51f, 19.0f}, - {-33.57f, 1125.72f, 19.0f}, - {-34.29f, 1095.22f, 19.0f} -}; - struct MANGOS_DLL_DECL boss_janalaiAI : public ScriptedAI { boss_janalaiAI(Creature* pCreature) : ScriptedAI(pCreature) @@ -146,77 +119,48 @@ struct MANGOS_DLL_DECL boss_janalaiAI : public ScriptedAI ScriptedInstance* m_pInstance; uint32 m_uiFireBreathTimer; - - GuidList m_lBombsGUIDList; - std::list m_lEggsRemainingList; - - uint32 m_uiBombTimer; - uint32 m_uiBombSequenzeTimer; - uint32 m_uiBombPhase; - uint32 m_uiBombCounter; - uint32 m_uiEnrageTimer; uint32 m_uiHatcherTimer; - uint32 m_uiWipeTimer; + uint32 m_uiBerserkTimer; + uint32 m_uiBombTimer; + uint32 m_uiBombAuraTimer; + uint32 m_uiExplodeTimer; + + uint8 m_uiEggsHatchedLeft; + uint8 m_uiEggsHatchedRight; - bool m_bIsBombing; - bool m_bCanBlowUpBombs; - bool m_bIsEggRemaining; + bool m_bIsFlameWall; + bool m_bHasHatchedEggs; bool m_bIsEnraged; - bool m_bCanEnrage; ObjectGuid m_hatcherOneGuid; ObjectGuid m_hatcherTwoGuid; void Reset() { - m_lEggsRemainingList.clear(); - - if (Creature* pHatcher = m_creature->GetMap()->GetCreature(m_hatcherOneGuid)) - { - pHatcher->AI()->EnterEvadeMode(); - pHatcher->SetDeathState(JUST_DIED); - m_hatcherOneGuid.Clear(); - } - - if (Creature* pHatcher = m_creature->GetMap()->GetCreature(m_hatcherTwoGuid)) - { - pHatcher->AI()->EnterEvadeMode(); - pHatcher->SetDeathState(JUST_DIED); - m_hatcherTwoGuid.Clear(); - } - m_uiFireBreathTimer = 8000; - - m_uiBombTimer = 30000; - m_bIsBombing = false; - m_uiBombSequenzeTimer = 1500; - m_uiBombPhase = 0; - m_uiBombCounter = 0; - m_bCanBlowUpBombs = false; - m_bIsEggRemaining = true; - - m_uiEnrageTimer = MINUTE*5*IN_MILLISECONDS; - m_uiHatcherTimer = 10000; - m_uiWipeTimer = MINUTE*10*IN_MILLISECONDS; - m_bIsEnraged = false; - m_bCanEnrage = false; + m_uiEnrageTimer = 5*MINUTE*IN_MILLISECONDS; + m_uiHatcherTimer = 10000; + m_uiBerserkTimer = 10*MINUTE*IN_MILLISECONDS; + m_uiBombTimer = 30000; + m_uiBombAuraTimer = 0; + m_uiExplodeTimer = 0; + + m_uiEggsHatchedLeft = 0; + m_uiEggsHatchedRight= 0; + + m_bHasHatchedEggs = false; + m_bIsEnraged = false; + m_bIsFlameWall = false; } void JustReachedHome() { - for (GuidList::const_iterator itr = m_lBombsGUIDList.begin(); itr != m_lBombsGUIDList.end(); ++itr) - { - if (Creature* pBomb = m_creature->GetMap()->GetCreature(*itr)) - pBomb->ForcedDespawn(); - } - m_lBombsGUIDList.clear(); - if (m_pInstance) m_pInstance->SetData(TYPE_JANALAI, FAIL); } - void JustDied(Unit* Killer) + void JustDied(Unit* pKiller) { DoScriptText(SAY_DEATH, m_creature); @@ -224,12 +168,12 @@ struct MANGOS_DLL_DECL boss_janalaiAI : public ScriptedAI m_pInstance->SetData(TYPE_JANALAI, DONE); } - void KilledUnit(Unit* victim) + void KilledUnit(Unit* pVictim) { DoScriptText(urand(0, 1) ? SAY_SLAY_1 : SAY_SLAY_2, m_creature); } - void Aggro(Unit *who) + void Aggro(Unit* pWho) { DoScriptText(SAY_AGGRO, m_creature); @@ -243,311 +187,185 @@ struct MANGOS_DLL_DECL boss_janalaiAI : public ScriptedAI { case NPC_AMANI_HATCHER_1: m_hatcherOneGuid = pSummoned->GetObjectGuid(); + // If all the eggs from one side are hatched, move to the other side + if (m_uiEggsHatchedRight == MAX_EGGS_ON_SIDE) + pSummoned->GetMotionMaster()->MovePoint(1, m_aHatcherLeft[0].m_fX, m_aHatcherLeft[0].m_fY, m_aHatcherLeft[0].m_fZ); + else + pSummoned->GetMotionMaster()->MovePoint(1, m_aHatcherRight[0].m_fX, m_aHatcherRight[0].m_fY, m_aHatcherRight[0].m_fZ); break; case NPC_AMANI_HATCHER_2: m_hatcherTwoGuid = pSummoned->GetObjectGuid(); + // If all the eggs from one side are hatched, move to the other side + if (m_uiEggsHatchedLeft == MAX_EGGS_ON_SIDE) + pSummoned->GetMotionMaster()->MovePoint(1, m_aHatcherRight[0].m_fX, m_aHatcherRight[0].m_fY, m_aHatcherRight[0].m_fZ); + else + pSummoned->GetMotionMaster()->MovePoint(1, m_aHatcherLeft[0].m_fX, m_aHatcherLeft[0].m_fY, m_aHatcherLeft[0].m_fZ); break; case NPC_FIRE_BOMB: - if (m_bIsBombing) + if (!m_bIsFlameWall) + DoCastSpellIfCan(pSummoned, SPELL_FIRE_BOMB_THROW, CAST_TRIGGERED); + else + pSummoned->CastSpell(pSummoned, SPELL_FIRE_WALL, true); + break; + case NPC_HATCHLING: + pSummoned->SetInCombatWithZone(); + // Count the Hatched eggs + pSummoned->GetPositionY() > 1100.0f ? ++m_uiEggsHatchedLeft : ++m_uiEggsHatchedRight; + // Notify the script when all the eggs were hatched + if (m_uiEggsHatchedRight == MAX_EGGS_ON_SIDE && m_uiEggsHatchedLeft == MAX_EGGS_ON_SIDE) + m_bHasHatchedEggs = true; + // Change the side of the hatcher if necessary + if (m_uiEggsHatchedRight == MAX_EGGS_ON_SIDE && m_uiEggsHatchedLeft < MAX_EGGS_ON_SIDE) { - //store bombs in list to be used in BlowUpBombs() - m_lBombsGUIDList.push_back(pSummoned->GetObjectGuid()); - - if (pSummoned->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE)) - pSummoned->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - - //visual spell, spell hit pSummoned after a short time - m_creature->CastSpell(pSummoned,SPELL_FIRE_BOMB_THROW,true); + if (Creature* pHatcer = m_creature->GetMap()->GetCreature(m_hatcherOneGuid)) + pHatcer->GetMotionMaster()->MovePoint(1, m_aHatcherLeft[5].m_fX, m_aHatcherLeft[5].m_fY, m_aHatcherLeft[5].m_fZ); } - else + if (m_uiEggsHatchedLeft == MAX_EGGS_ON_SIDE && m_uiEggsHatchedRight < MAX_EGGS_ON_SIDE) { - pSummoned->CastSpell(pSummoned, SPELL_FIRE_WALL, true); + if (Creature* pHatcer = m_creature->GetMap()->GetCreature(m_hatcherTwoGuid)) + pHatcer->GetMotionMaster()->MovePoint(1, m_aHatcherRight[5].m_fX, m_aHatcherRight[5].m_fY, m_aHatcherRight[5].m_fZ); } break; } } - void SpellHitTarget(Unit* pUnit, const SpellEntry* pSpell) - { - //when spell actually hit the fire bombs, make then cast spell(making them "visible") - if (pUnit->GetEntry() == NPC_FIRE_BOMB && pSpell->Id == SPELL_FIRE_BOMB_THROW) - pUnit->CastSpell(pUnit,SPELL_FIRE_BOMB_DUMMY,false); - } - - void CreateFireWall() // Create Firewall - { - m_creature->SummonCreature(NPC_FIRE_BOMB,FireWallCoords[0][0],FireWallCoords[0][1],FireWallCoords[0][2],FireWallCoords[0][3],TEMPSUMMON_TIMED_DESPAWN,11500); - - m_creature->SummonCreature(NPC_FIRE_BOMB,FireWallCoords[0][0],FireWallCoords[0][1]+5,FireWallCoords[0][2],FireWallCoords[0][3],TEMPSUMMON_TIMED_DESPAWN,11500); - - m_creature->SummonCreature(NPC_FIRE_BOMB,FireWallCoords[0][0],FireWallCoords[0][1]-5,FireWallCoords[0][2],FireWallCoords[0][3],TEMPSUMMON_TIMED_DESPAWN,11500); - - m_creature->SummonCreature(NPC_FIRE_BOMB,FireWallCoords[1][0]-2,FireWallCoords[1][1]-2,FireWallCoords[1][2],FireWallCoords[1][3],TEMPSUMMON_TIMED_DESPAWN,11500); - - m_creature->SummonCreature(NPC_FIRE_BOMB,FireWallCoords[1][0]+2,FireWallCoords[1][1]+2,FireWallCoords[1][2],FireWallCoords[1][3],TEMPSUMMON_TIMED_DESPAWN,11500); - - m_creature->SummonCreature(NPC_FIRE_BOMB,FireWallCoords[2][0],FireWallCoords[2][1],FireWallCoords[2][2],FireWallCoords[2][3],TEMPSUMMON_TIMED_DESPAWN,11500); - - m_creature->SummonCreature(NPC_FIRE_BOMB,FireWallCoords[2][0],FireWallCoords[2][1]-5,FireWallCoords[2][2],FireWallCoords[2][3],TEMPSUMMON_TIMED_DESPAWN,11500); - - m_creature->SummonCreature(NPC_FIRE_BOMB,FireWallCoords[2][0],FireWallCoords[2][1]+5,FireWallCoords[2][2],FireWallCoords[2][3],TEMPSUMMON_TIMED_DESPAWN,11500); - - m_creature->SummonCreature(NPC_FIRE_BOMB,FireWallCoords[3][0]-2,FireWallCoords[3][1],FireWallCoords[3][2],FireWallCoords[3][3],TEMPSUMMON_TIMED_DESPAWN,11500); - - m_creature->SummonCreature(NPC_FIRE_BOMB,FireWallCoords[3][0]+2,FireWallCoords[3][1],FireWallCoords[3][2],FireWallCoords[3][3],TEMPSUMMON_TIMED_DESPAWN,11500); - } - - void Throw5Bombs() + // Wrapper to create the firewalls during Bomb phase + void DoCreateFireWall() { - for(uint8 i = 0; i < countof(m_auiSpellFireBombSummon); ++i) - { - m_creature->CastSpell(m_creature, m_auiSpellFireBombSummon[i], true); - - //workaround part - //m_creature->GetRandomPoint(m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), fRadius+(fRadius*i), fX, fY, fZ); - //m_creature->SummonCreature(NPC_FIRE_BOMB, fX, fY, fZ, 0.0f, TEMPSUMMON_TIMED_DESPAWN, MINUTE*IN_MILLISECONDS); - } - - ++m_uiBombCounter; + // This function involves a lot of guesswork!!! + // The npc entry isn't sure and the locations are guessed + m_bIsFlameWall = true; + m_creature->SummonCreature(NPC_FIRE_BOMB, afFireWallCoords[0][0], afFireWallCoords[0][1], afFireWallCoords[0][2], afFireWallCoords[0][3], TEMPSUMMON_TIMED_DESPAWN, 12000); + m_creature->SummonCreature(NPC_FIRE_BOMB, afFireWallCoords[1][0], afFireWallCoords[1][1], afFireWallCoords[1][2], afFireWallCoords[1][3], TEMPSUMMON_TIMED_DESPAWN, 12000); + m_creature->SummonCreature(NPC_FIRE_BOMB, afFireWallCoords[2][0], afFireWallCoords[2][1], afFireWallCoords[2][2], afFireWallCoords[2][3], TEMPSUMMON_TIMED_DESPAWN, 12000); + m_creature->SummonCreature(NPC_FIRE_BOMB, afFireWallCoords[3][0], afFireWallCoords[3][1], afFireWallCoords[3][2], afFireWallCoords[3][3], TEMPSUMMON_TIMED_DESPAWN, 12000); + m_bIsFlameWall = false; } - //Teleport every player into the middle if more than 20 yards away (possibly what spell 43096 should do) - void TeleportPlayersOutOfRange() + void UpdateAI(const uint32 uiDiff) { - GuidVector vGuids; - m_creature->FillGuidsListFromThreatList(vGuids); - for (GuidVector::const_iterator i = vGuids.begin(); i != vGuids.end(); ++i) - { - Unit* pTemp = m_creature->GetMap()->GetUnit(*i); - - if (pTemp && pTemp->GetTypeId() == TYPEID_PLAYER && !m_creature->IsWithinDist(pTemp, 20.0f)) - m_creature->CastSpell(pTemp, SPELL_SUMMONALL, true); - } - } + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; - void BlowUpBombs() - { - for (GuidList::const_iterator itr = m_lBombsGUIDList.begin(); itr != m_lBombsGUIDList.end(); ++itr) + // Start bombing + if (m_uiBombTimer < uiDiff) { - if (Creature* pBomb = m_creature->GetMap()->GetCreature(*itr)) + if (DoCastSpellIfCan(m_creature, SPELL_FIRE_BOMB_CHANNEL) == CAST_OK) { - //do damage and then remove aura (making them "disappear") - pBomb->CastSpell(pBomb, SPELL_FIRE_BOMB_DAMAGE, false, NULL, NULL, m_creature->GetObjectGuid()); - pBomb->RemoveAurasDueToSpell(SPELL_FIRE_BOMB_DUMMY); + DoCastSpellIfCan(m_creature, SPELL_TELEPORT_TO_CENTER, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_SUMMON_ALL_PLAYERS, CAST_TRIGGERED); + DoScriptText(SAY_FIRE_BOMBS, m_creature); + DoCreateFireWall(); + + m_uiBombAuraTimer = 5000; + m_uiBombTimer = urand(20000, 40000); } } + else + m_uiBombTimer -= uiDiff; - m_lBombsGUIDList.clear(); - } - - void DoHatchRemainingEggs() - { - GetCreatureListWithEntryInGrid(m_lEggsRemainingList, m_creature, NPC_EGG, 125.0f); - - if (!m_lEggsRemainingList.empty()) + if (m_uiFireBreathTimer < uiDiff) { - for(std::list::iterator itr = m_lEggsRemainingList.begin(); itr != m_lEggsRemainingList.end(); ++itr) - { - if ((*itr)->isAlive()) - (*itr)->CastSpell((*itr), SPELL_SUMMON_DRAGONHAWK, true); - } - - m_bIsEggRemaining = false; - - if (!m_pInstance) - return; - - if (uint32 uiEggsRemaining_Right = m_pInstance->GetData(TYPE_J_EGGS_RIGHT)) - { - for(uint32 i = 0; i < uiEggsRemaining_Right; ++i) - m_pInstance->SetData(TYPE_J_EGGS_RIGHT, SPECIAL); - } - - if (uint32 uiEggsRemaining_Left = m_pInstance->GetData(TYPE_J_EGGS_LEFT)) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) { - for(uint32 i = 0; i < uiEggsRemaining_Left; ++i) - m_pInstance->SetData(TYPE_J_EGGS_LEFT, SPECIAL); + if (DoCastSpellIfCan(pTarget, SPELL_FLAME_BREATH) == CAST_OK) + m_uiFireBreathTimer = 8000; } } - } - - void UpdateAI(const uint32 uiDiff) - { - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; + else + m_uiFireBreathTimer -= uiDiff; - //blow up bombs happen after bombing is over, so handle this here - if (m_bCanBlowUpBombs) + // Remove bomb aura after five seconds + if (m_uiBombAuraTimer) { - if (m_uiBombSequenzeTimer < uiDiff) + if (m_uiBombAuraTimer <= uiDiff) { - BlowUpBombs(); - m_bCanBlowUpBombs = false; + m_creature->RemoveAurasDueToSpell(SPELL_FIRE_BOMB_CHANNEL); + m_uiBombAuraTimer = 0; + m_uiExplodeTimer = 5000; } else - m_uiBombSequenzeTimer -= uiDiff; + m_uiBombAuraTimer -= uiDiff; } - if (!m_bIsBombing) // every Spell if NOT Bombing + // Explode the summoned bombs on timer + if (m_uiExplodeTimer) { - if (m_uiBombTimer < uiDiff) + if (m_uiExplodeTimer <= uiDiff) { - DoScriptText(SAY_FIRE_BOMBS, m_creature); - - //first clear movement - if (m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() == CHASE_MOTION_TYPE) - m_creature->GetMotionMaster()->MovementExpired(); - - //then teleport self - DoCastSpellIfCan(m_creature, SPELL_TELETOCENTER, CAST_INTERRUPT_PREVIOUS | CAST_TRIGGERED); - - //then players and create the firewall - TeleportPlayersOutOfRange(); - CreateFireWall(); - - //prepare variables for bombing sequenze - m_lBombsGUIDList.clear(); - - m_uiBombPhase = 0; - m_uiBombSequenzeTimer = 500; - m_uiBombCounter = 0; - - m_uiBombTimer = urand(20000, 40000); - m_bIsBombing = true; - - //we don't want anything else to happen this Update() - return; + if (DoCastSpellIfCan(m_creature, SPELL_FIRE_BOMB_EXPLODE) == CAST_OK) + m_uiExplodeTimer = 0; } else - m_uiBombTimer -= uiDiff; - - //FIRE BREATH several videos says every 8Secounds - if (m_uiFireBreathTimer < uiDiff) - { - if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) - DoCastSpellIfCan(target,SPELL_FLAME_BREATH); - m_uiFireBreathTimer = 8000; - }else m_uiFireBreathTimer -= uiDiff; - - //enrage if under 25% hp before 5 min. - if (m_creature->GetHealthPercent() < 25.0f && !m_bIsEnraged) - { - m_bCanEnrage = true; - m_uiEnrageTimer = 600000; - } - - //Enrage but only if not bombing - if (m_bCanEnrage && !m_bIsEnraged) - { - DoScriptText(SAY_BERSERK, m_creature); - - DoCastSpellIfCan(m_creature, SPELL_ENRAGE, CAST_INTERRUPT_PREVIOUS); - m_bIsEnraged = true; - } + m_uiExplodeTimer -= uiDiff; + } - //Hatch All - if (m_bIsEggRemaining && m_creature->GetHealthPercent() < 35.0f) + // Hatch all eggs at 35% health + if (!m_bHasHatchedEggs && m_creature->GetHealthPercent() < 35.0f) + { + if (DoCastSpellIfCan(m_creature, SPELL_HATCH_ALL_EGGS) == CAST_OK) { DoScriptText(SAY_ALL_EGGS, m_creature); - - DoCastSpellIfCan(m_creature, SPELL_HATCH_ALL_EGGS, CAST_INTERRUPT_PREVIOUS); - - DoHatchRemainingEggs(); + m_bHasHatchedEggs = true; } - - DoMeleeAttackIfReady(); } - else // every Spell if Bombing + + // Soft Enrage - after 5 min, or at 20% health + if (!m_bIsEnraged) { - if (m_uiBombSequenzeTimer < uiDiff) + if (m_uiEnrageTimer < uiDiff) { - switch(m_uiBombPhase) - { - case 0: - DoCastSpellIfCan(m_creature, SPELL_FIRE_BOMB_CHANNEL, CAST_TRIGGERED); - m_uiBombSequenzeTimer = 500; - ++m_uiBombPhase; - break; - case 1: - if (m_uiBombCounter < 8) - { - Throw5Bombs(); - m_uiBombSequenzeTimer = 500; - } - else - { - m_uiBombSequenzeTimer = 1000; - ++m_uiBombPhase; - } - break; - case 2: - m_bCanBlowUpBombs = true; - m_uiBombSequenzeTimer = 2000; - m_creature->RemoveAurasDueToSpell(SPELL_FIRE_BOMB_CHANNEL); - m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); - m_bIsBombing = false; - break; - } - + if (DoCastSpellIfCan(m_creature, SPELL_ENRAGE) == CAST_OK) + m_bIsEnraged = true; } else - m_uiBombSequenzeTimer -= uiDiff; - } + m_uiEnrageTimer -= uiDiff; - //Enrage after 5 minutes - if (m_uiEnrageTimer < uiDiff) - { - m_bCanEnrage = true; - m_uiEnrageTimer = 600000; + if (m_creature->GetHealthPercent() < 20.0f) + { + if (DoCastSpellIfCan(m_creature, SPELL_ENRAGE) == CAST_OK) + m_bIsEnraged = true; + } } - else - m_uiEnrageTimer -= uiDiff; - //Call Hatcher - if (m_bIsEggRemaining) + // Spawn Hatchers - if necessary + if (!m_bHasHatchedEggs) { if (m_uiHatcherTimer < uiDiff) { - if (!m_pInstance || (m_pInstance->GetData(TYPE_J_EGGS_LEFT) == 0 && m_pInstance->GetData(TYPE_J_EGGS_RIGHT) == 0)) - m_bIsEggRemaining = false; - else - { - DoScriptText(SAY_SUMMON_HATCHER, m_creature); - - Creature* pHatcer1 = m_creature->GetMap()->GetCreature(m_hatcherOneGuid); - Creature* pHatcer2 = m_creature->GetMap()->GetCreature(m_hatcherTwoGuid); + DoScriptText(SAY_SUMMON_HATCHER, m_creature); - if (!pHatcer1 || (pHatcer1 && !pHatcer1->isAlive())) - { - if (Creature* pHatcher = m_creature->SummonCreature(NPC_AMANI_HATCHER_1, m_aHatcherRight[0].m_fX, m_aHatcherRight[0].m_fY, m_aHatcherRight[0].m_fZ, 0.0f, TEMPSUMMON_CORPSE_DESPAWN, 0)) - pHatcher->GetMotionMaster()->MovePoint(1, m_aHatcherRight[1].m_fX, m_aHatcherRight[1].m_fY, m_aHatcherRight[1].m_fZ); - } + Creature* pHatcer1 = m_creature->GetMap()->GetCreature(m_hatcherOneGuid); + Creature* pHatcer2 = m_creature->GetMap()->GetCreature(m_hatcherTwoGuid); - if (!pHatcer2 || (pHatcer2 && !pHatcer2->isAlive())) - { - if (Creature* pHatcher = m_creature->SummonCreature(NPC_AMANI_HATCHER_2, m_aHatcherLeft[0].m_fX, m_aHatcherLeft[0].m_fY, m_aHatcherLeft[0].m_fZ, 0.0f, TEMPSUMMON_CORPSE_DESPAWN, 0)) - pHatcher->GetMotionMaster()->MovePoint(1, m_aHatcherLeft[1].m_fX, m_aHatcherLeft[1].m_fY, m_aHatcherLeft[1].m_fZ); - } + if (!pHatcer1 || !pHatcer1->isAlive()) + DoCastSpellIfCan(m_creature, SPELL_SUMMON_HATCHER_1, CAST_TRIGGERED); - m_uiHatcherTimer = 90000; - } + if (!pHatcer2 || !pHatcer2->isAlive()) + DoCastSpellIfCan(m_creature, SPELL_SUMMON_HATCHER_2, CAST_TRIGGERED); + m_uiHatcherTimer = 90000; } else m_uiHatcherTimer -= uiDiff; } - //WIPE after 10 minutes - if (m_uiWipeTimer < uiDiff) + // Hard enrage + if (m_uiBerserkTimer) { - if (DoCastSpellIfCan(m_creature,SPELL_ENRAGE) == CAST_OK) + if (m_uiBerserkTimer <= uiDiff) { - DoScriptText(SAY_BERSERK, m_creature); - m_uiWipeTimer = 30000; + if (DoCastSpellIfCan(m_creature, SPELL_BERSERK) == CAST_OK) + { + DoScriptText(SAY_BERSERK, m_creature); + m_uiBerserkTimer = 0; + } } + else + m_uiBerserkTimer -= uiDiff; } - else - m_uiWipeTimer -= uiDiff; + + DoMeleeAttackIfReady(); //check for reset ... exploit preventing ... pulled from his podest EnterEvadeIfOutOfCombatArea(uiDiff); @@ -559,24 +377,6 @@ CreatureAI* GetAI_boss_janalaiAI(Creature* pCreature) return new boss_janalaiAI(pCreature); } -struct MANGOS_DLL_DECL npc_janalai_firebombAI : public ScriptedAI -{ - npc_janalai_firebombAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} - - void Reset() {} - - void AttackStart(Unit* pWho) {} - - void MoveInLineOfSight(Unit* pWho) {} - - void UpdateAI(const uint32 uiDiff) {} -}; - -CreatureAI* GetAI_npc_janalai_firebombAI(Creature* pCreature) -{ - return new npc_janalai_firebombAI(pCreature); -} - struct MANGOS_DLL_DECL npc_amanishi_hatcherAI : public ScriptedAI { npc_amanishi_hatcherAI(Creature* pCreature) : ScriptedAI(pCreature) @@ -589,106 +389,91 @@ struct MANGOS_DLL_DECL npc_amanishi_hatcherAI : public ScriptedAI uint32 m_uiWaypoint; uint32 m_uiHatchlingTimer; - uint32 m_uiHatchlingCount; - bool m_bCanMoveNext; + uint8 m_uiHatchlingCount; + uint8 m_uiEggsHatched; bool m_bWaypointEnd; void Reset() { - m_uiWaypoint = 0; - m_uiHatchlingTimer = 1000; - m_uiHatchlingCount = 1; - m_bCanMoveNext = false; - m_bWaypointEnd = false; + m_uiWaypoint = 0; + m_uiHatchlingTimer = 0; + m_uiHatchlingCount = 0; + m_uiEggsHatched = 0; + m_bWaypointEnd = false; + m_creature->SetWalk(false); } - void MoveInLineOfSight(Unit* pWho) {} + void MoveInLineOfSight(Unit* pWho) { } + void AttackStart(Unit* pWho) { } - void AttackStart(Unit* pWho) + void MovementInform(uint32 uiType, uint32 uiPointId) { - if (!pWho) + if (uiType != POINT_MOTION_TYPE) return; - if (m_creature->Attack(pWho, false)) + // Used when a hatcher is forced to switch sides + if (m_bWaypointEnd && uiPointId) { - m_creature->AddThreat(pWho); - m_creature->SetInCombatWith(pWho); - pWho->SetInCombatWith(m_creature); - } - } - - void MovementInform(uint32 uiType, uint32 uiPointId) - { - if (uiType != POINT_MOTION_TYPE || m_bWaypointEnd) + m_creature->GetMotionMaster()->Clear(); + m_uiHatchlingTimer = 1000; return; + } uint32 uiCount = m_creature->GetEntry() == NPC_AMANI_HATCHER_1 ? countof(m_aHatcherRight) : countof(m_aHatcherLeft); m_uiWaypoint = uiPointId + 1; if (uiCount == m_uiWaypoint) + { + m_creature->GetMotionMaster()->Clear(); + m_uiHatchlingTimer = 1000; m_bWaypointEnd = true; - - m_bCanMoveNext = true; + } + else + { + if (m_creature->GetEntry() == NPC_AMANI_HATCHER_1) + m_creature->GetMotionMaster()->MovePoint(m_uiWaypoint, m_aHatcherRight[m_uiWaypoint].m_fX, m_aHatcherRight[m_uiWaypoint].m_fY, m_aHatcherRight[m_uiWaypoint].m_fZ); + else + m_creature->GetMotionMaster()->MovePoint(m_uiWaypoint, m_aHatcherLeft[m_uiWaypoint].m_fX, m_aHatcherLeft[m_uiWaypoint].m_fY, m_aHatcherLeft[m_uiWaypoint].m_fZ); + } } - void DoHatchEggs(uint32 uiCount) + void SpellHitTarget(Unit* pTarget, SpellEntry const* pSpell) { - uint32 uiSaveRightOrLeft = m_creature->GetEntry() == NPC_AMANI_HATCHER_1 ? TYPE_J_EGGS_RIGHT : TYPE_J_EGGS_LEFT; + if ((pSpell->Id != SPELL_HATCH_EGG_1 && pSpell->Id != SPELL_HATCH_EGG_2) || pTarget->GetEntry() != NPC_DRAGONHAWK_EGG) + return; - for(uint32 i = 0; i < uiCount; ++i) - { - if (Creature* pEgg = GetClosestCreatureWithEntry(m_creature, NPC_EGG, 40.0f)) - pEgg->CastSpell(pEgg, SPELL_SUMMON_DRAGONHAWK, true); + // If we already hatched the number of eggs allowed per hatch phase, stop the hatching + if (m_uiEggsHatched >= m_uiHatchlingCount) + return; + + if (!m_pInstance) + return; - m_pInstance->SetData(uiSaveRightOrLeft, SPECIAL); + if (Creature* pJanalai = m_pInstance->GetSingleCreatureFromStorage(NPC_JANALAI)) + { + pTarget->CastSpell(pTarget, SPELL_SUMMON_DRAGONHAWK, true, NULL, NULL, pJanalai->GetObjectGuid()); + ++m_uiEggsHatched; } } void UpdateAI(const uint32 uiDiff) { - if (m_bCanMoveNext) - { - m_bCanMoveNext = false; - - if (m_bWaypointEnd) - m_creature->GetMotionMaster()->Clear(); - else - { - if (m_creature->GetEntry() == NPC_AMANI_HATCHER_1) - m_creature->GetMotionMaster()->MovePoint(m_uiWaypoint, m_aHatcherRight[m_uiWaypoint].m_fX, m_aHatcherRight[m_uiWaypoint].m_fY, m_aHatcherRight[m_uiWaypoint].m_fZ); - else - m_creature->GetMotionMaster()->MovePoint(m_uiWaypoint, m_aHatcherLeft[m_uiWaypoint].m_fX, m_aHatcherLeft[m_uiWaypoint].m_fY, m_aHatcherLeft[m_uiWaypoint].m_fZ); - } - } + if (!m_bWaypointEnd) + return; - if (m_bWaypointEnd) + if (m_uiHatchlingTimer) { - if (m_uiHatchlingTimer < uiDiff) + if (m_uiHatchlingTimer <= uiDiff) { - m_uiHatchlingTimer = 10000; - - if (!m_pInstance) - return; - - uint32 uiEggsRemaining = m_creature->GetEntry() == NPC_AMANI_HATCHER_1 ? m_pInstance->GetData(TYPE_J_EGGS_RIGHT) : m_pInstance->GetData(TYPE_J_EGGS_LEFT); - - if (!uiEggsRemaining) + // Note: there are 2 Hatch Eggs spells. Not sure which one to use + if (DoCastSpellIfCan(m_creature, SPELL_HATCH_EGG_2) == CAST_OK) { - //instead, should run to other side and start hatch if eggs remain - m_creature->ForcedDespawn(); - return; + m_uiHatchlingTimer = m_uiHatchlingCount < 5 ? 10000 : 0; + m_uiEggsHatched = 0; + ++m_uiHatchlingCount; } - else if (m_uiHatchlingCount >= uiEggsRemaining/2) - m_uiHatchlingCount = uiEggsRemaining; - - DoCastSpellIfCan(m_creature,SPELL_HATCH_EGG); - - DoHatchEggs(m_uiHatchlingCount); - - ++m_uiHatchlingCount; - } else m_uiHatchlingTimer -= uiDiff; @@ -701,42 +486,54 @@ CreatureAI* GetAI_npc_amanishi_hatcherAI(Creature* pCreature) return new npc_amanishi_hatcherAI(pCreature); } -struct MANGOS_DLL_DECL npc_hatchlingAI : public ScriptedAI +// TODO Remove this 'script' when combat can be proper prevented from core-side +struct MANGOS_DLL_DECL npc_dragonhawk_eggAI : public Scripted_NoMovementAI { - npc_hatchlingAI(Creature* pCreature) : ScriptedAI(pCreature) - { - m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - Reset(); - } + npc_dragonhawk_eggAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) {Reset();} - ScriptedInstance* m_pInstance; + void Reset() {} + + void AttackStart(Unit* pWho) {} + void MoveInLineOfSight(Unit* pWho) {} + void UpdateAI(const uint32 uiDiff) {} +}; + +CreatureAI* GetAI_npc_dragonhawk_eggAI(Creature* pCreature) +{ + return new npc_dragonhawk_eggAI(pCreature); +} + +// TODO Remove this 'script' when combat can be proper prevented from core-side +struct MANGOS_DLL_DECL npc_janalai_firebombAI : public Scripted_NoMovementAI +{ + npc_janalai_firebombAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) {Reset();} + + void Reset() {} + + void AttackStart(Unit* pWho) {} + void MoveInLineOfSight(Unit* pWho) {} + void UpdateAI(const uint32 uiDiff) {} +}; + +CreatureAI* GetAI_npc_janalai_firebombAI(Creature* pCreature) +{ + return new npc_janalai_firebombAI(pCreature); +} + +// ToDo: move to eventAI +struct MANGOS_DLL_DECL npc_hatchlingAI : public ScriptedAI +{ + npc_hatchlingAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } uint32 m_uiBufferTimer; - bool m_bIsStarted; void Reset() { m_uiBufferTimer = 7000; - m_bIsStarted = false; } void UpdateAI(const uint32 uiDiff) { - if (!m_bIsStarted) - { - if (m_creature->GetPositionY() > 1150) - m_creature->GetMotionMaster()->MovePoint(0, hatcherway_l[3][0] + rand()%4-2, hatcherway_l[3][1] + rand()%4-2, hatcherway_l[3][2]); - else - m_creature->GetMotionMaster()->MovePoint(0, hatcherway_r[3][0] + rand()%4-2, hatcherway_r[3][1] + rand()%4-2, hatcherway_r[3][2]); - m_bIsStarted = true; - } - - if (m_pInstance && m_pInstance->GetData(TYPE_JANALAI) == FAIL) - { - m_creature->ForcedDespawn(); - return; - } - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -768,6 +565,11 @@ void AddSC_boss_janalai() pNewScript->GetAI = &GetAI_boss_janalaiAI; pNewScript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "npc_dragonhawk_egg"; + pNewScript->GetAI = &GetAI_npc_dragonhawk_eggAI; + pNewScript->RegisterSelf(); + pNewScript = new Script; pNewScript->Name = "npc_janalai_firebomb"; pNewScript->GetAI = &GetAI_npc_janalai_firebombAI; diff --git a/scripts/eastern_kingdoms/zulaman/instance_zulaman.cpp b/scripts/eastern_kingdoms/zulaman/instance_zulaman.cpp index 48155921f..fe6475ccd 100644 --- a/scripts/eastern_kingdoms/zulaman/instance_zulaman.cpp +++ b/scripts/eastern_kingdoms/zulaman/instance_zulaman.cpp @@ -28,10 +28,7 @@ instance_zulaman::instance_zulaman(Map* pMap) : ScriptedInstance(pMap), m_uiEventTimer(MINUTE*IN_MILLISECONDS), m_uiGongCount(0), m_uiBearEventPhase(0), - m_bIsBearPhaseInProgress(false), - - m_uiEggsRemainingCount_Left(20), - m_uiEggsRemainingCount_Right(20) + m_bIsBearPhaseInProgress(false) { Initialize(); } @@ -61,6 +58,7 @@ void instance_zulaman::OnCreatureCreate(Creature* pCreature) case NPC_AKILZON: case NPC_HALAZZI: case NPC_NALORAKK: + case NPC_JANALAI: case NPC_MALACRASS: case NPC_HARRISON: case NPC_BEAR_SPIRIT: @@ -84,11 +82,6 @@ void instance_zulaman::OnCreatureCreate(Creature* pCreature) case NPC_ASHLI: m_aEventNpcInfo[INDEX_HALAZZI].npGuid = pCreature->GetObjectGuid(); break; case NPC_HARKOR: m_aEventNpcInfo[INDEX_AKILZON].npGuid = pCreature->GetObjectGuid(); break; - case NPC_EGG: - if (m_auiEncounter[TYPE_JANALAI] != DONE) - m_lEggsGUIDList.push_back(pCreature->GetObjectGuid()); - break; - case NPC_MEDICINE_MAN: case NPC_TRIBES_MAN: case NPC_WARBRINGER: @@ -262,24 +255,8 @@ void instance_zulaman::SetData(uint32 uiType, uint32 uiData) m_auiEncounter[uiType] = uiData; break; case TYPE_JANALAI: - if (uiData == FAIL) - { - m_uiEggsRemainingCount_Left = 20; - m_uiEggsRemainingCount_Right = 20; - - for(GuidList::const_iterator itr = m_lEggsGUIDList.begin(); itr != m_lEggsGUIDList.end(); ++itr) - { - if (Creature* pEgg = instance->GetCreature(*itr)) - { - if (!pEgg->isAlive()) - pEgg->Respawn(); - } - } - } if (uiData == DONE) { - m_lEggsGUIDList.clear(); - if (m_auiEncounter[TYPE_EVENT_RUN] == IN_PROGRESS) DoChestEvent(INDEX_JANALAI); } @@ -310,12 +287,6 @@ void instance_zulaman::SetData(uint32 uiType, uint32 uiData) DoUpdateWorldState(WORLD_STATE_COUNTER, m_auiEncounter[uiType]); break; - case TYPE_J_EGGS_RIGHT: - --m_uiEggsRemainingCount_Right; - break; - case TYPE_J_EGGS_LEFT: - --m_uiEggsRemainingCount_Left; - break; case TYPE_RAND_VENDOR_1: m_auiRandVendor[0] = uiData; break; @@ -394,8 +365,6 @@ uint32 instance_zulaman::GetData(uint32 uiType) return m_auiEncounter[uiType]; case TYPE_RAND_VENDOR_1: return m_auiRandVendor[0]; case TYPE_RAND_VENDOR_2: return m_auiRandVendor[1]; - case TYPE_J_EGGS_LEFT: return m_uiEggsRemainingCount_Left; - case TYPE_J_EGGS_RIGHT: return m_uiEggsRemainingCount_Right; default: return 0; } diff --git a/scripts/eastern_kingdoms/zulaman/zulaman.h b/scripts/eastern_kingdoms/zulaman/zulaman.h index 20933d0ec..bb6109b4b 100644 --- a/scripts/eastern_kingdoms/zulaman/zulaman.h +++ b/scripts/eastern_kingdoms/zulaman/zulaman.h @@ -46,12 +46,9 @@ enum InstanceZA TYPE_RAND_VENDOR_1 = 8, TYPE_RAND_VENDOR_2 = 9, - TYPE_J_EGGS_RIGHT = 10, - TYPE_J_EGGS_LEFT = 11, - NPC_AKILZON = 23574, NPC_NALORAKK = 23576, - // NPC_JANALAI = 23578, + NPC_JANALAI = 23578, NPC_HALAZZI = 23577, NPC_MALACRASS = 24239, // NPC_ZULJIN = 23863, @@ -72,8 +69,6 @@ enum InstanceZA NPC_DARKHEART = 24246, NPC_KORAGG = 24247, - NPC_EGG = 23817, - NPC_HARRISON = 24358, // Time Run Event NPCs NPC_TANZAR = 23790, // at bear @@ -194,10 +189,6 @@ class MANGOS_DLL_DECL instance_zulaman : public ScriptedInstance NalorakkTrashInfo m_aNalorakkEvent[MAX_BEAR_WAVES]; uint8 m_uiBearEventPhase; bool m_bIsBearPhaseInProgress; - - GuidList m_lEggsGUIDList; - uint32 m_uiEggsRemainingCount_Left; - uint32 m_uiEggsRemainingCount_Right; }; #endif diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index c65ae2c71..27d91ac4b 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2711" + #define SD2_REVISION_NR "2712" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 240e2df24..ab50f329f 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -1295,6 +1295,7 @@ UPDATE creature_template SET ScriptName='boss_janalai' WHERE entry=23578; UPDATE creature_template SET ScriptName='boss_malacrass' WHERE entry=24239; UPDATE creature_template SET ScriptName='boss_nalorakk' WHERE entry=23576; UPDATE creature_template SET ScriptName='boss_zuljin' WHERE entry=23863; +UPDATE creature_template SET ScriptName='npc_dragonhawk_egg' WHERE entry=23817; UPDATE creature_template SET ScriptName='npc_janalai_firebomb' WHERE entry=23920; UPDATE creature_template SET ScriptName='npc_amanishi_hatcher' WHERE entry IN (23818,24504); UPDATE creature_template SET ScriptName='npc_hatchling' WHERE entry=23598; diff --git a/sql/updates/r2712_mangos.sql b/sql/updates/r2712_mangos.sql new file mode 100644 index 000000000..8f4f1e5b7 --- /dev/null +++ b/sql/updates/r2712_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_dragonhawk_egg' WHERE entry=23817; From a743ba78f9f568f6cc739a0afef673be8e3ae1d8 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Thu, 13 Sep 2012 01:59:35 +0300 Subject: [PATCH 0705/1172] [2713] Update script for quests 6124/6129 --- scripts/world/spell_scripts.cpp | 13 +++++++++---- sd2_revision_nr.h | 2 +- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/scripts/world/spell_scripts.cpp b/scripts/world/spell_scripts.cpp index 5be62beec..9db7e26da 100644 --- a/scripts/world/spell_scripts.cpp +++ b/scripts/world/spell_scripts.cpp @@ -145,6 +145,7 @@ enum // quest 6124/6129 SPELL_APPLY_SALVE = 19512, + SPELL_SICKLY_AURA = 19502, NPC_SICKLY_DEER = 12298, NPC_SICKLY_GAZELLE = 12296, @@ -519,11 +520,15 @@ bool EffectDummyCreature_spell_dummy_npc(Unit* pCaster, uint32 uiSpellId, SpellE if (pCaster->GetTypeId() != TYPEID_PLAYER) return true; - if (pCreatureTarget->GetEntry() == NPC_SICKLY_DEER && ((Player*)pCaster)->GetTeam() == ALLIANCE) - pCreatureTarget->UpdateEntry(NPC_CURED_DEER); + if (pCreatureTarget->GetEntry() != NPC_SICKLY_DEER && pCreatureTarget->GetEntry() != NPC_SICKLY_GAZELLE) + return true; - if (pCreatureTarget->GetEntry() == NPC_SICKLY_GAZELLE && ((Player*)pCaster)->GetTeam() == HORDE) - pCreatureTarget->UpdateEntry(NPC_CURED_GAZELLE); + // Update entry, remove aura, set the kill credit and despawn + uint32 uiUpdateEntry = pCreatureTarget->GetEntry() == NPC_SICKLY_DEER ? NPC_CURED_DEER : NPC_CURED_GAZELLE; + pCreatureTarget->RemoveAurasDueToSpell(SPELL_SICKLY_AURA); + pCreatureTarget->UpdateEntry(uiUpdateEntry); + ((Player*)pCaster)->KilledMonsterCredit(uiUpdateEntry); + pCreatureTarget->ForcedDespawn(20000); return true; } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 27d91ac4b..c06cb6e5e 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2712" + #define SD2_REVISION_NR "2713" #endif // __SD2_REVISION_NR_H__ From 9fc7cee27af72acc8d1b69893b03f6e75c46053d Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Thu, 13 Sep 2012 15:56:06 +0300 Subject: [PATCH 0706/1172] Fixup sql-updates file from 2318/2319. Thanks to antiroot for pointing --- sql/updates/r2318_scriptdev2.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql/updates/r2318_scriptdev2.sql b/sql/updates/r2318_scriptdev2.sql index da6ae8ad4..2cc5a85a8 100644 --- a/sql/updates/r2318_scriptdev2.sql +++ b/sql/updates/r2318_scriptdev2.sql @@ -1,4 +1,4 @@ -DELETE FROM script_texts WHERE entry BETWEEN -1000771 AND -1000780; +DELETE FROM script_texts WHERE entry BETWEEN -1000780 AND -1000771; INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES (-1000771,'Let\'s go $N!',0,0,0,0,'Feero Ironhand SAY_QUEST_START'), (-1000772,'It looks like we\'re in trouble. Look lively, here they come!',0,0,0,0,'Feero Ironhand SAY_FIRST_AMBUSH_START'), From e5cbfdf24156f210fbb35adf6c639c02a0cb5ec2 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Thu, 13 Sep 2012 23:03:49 +0300 Subject: [PATCH 0707/1172] [2714] Fix quest 9303 Note: in the future this should be handled by spell_scripts --- scripts/world/spell_scripts.cpp | 1 + sd2_revision_nr.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/world/spell_scripts.cpp b/scripts/world/spell_scripts.cpp index 9db7e26da..e39ea4db5 100644 --- a/scripts/world/spell_scripts.cpp +++ b/scripts/world/spell_scripts.cpp @@ -601,6 +601,7 @@ bool EffectDummyCreature_spell_dummy_npc(Unit* pCaster, uint32 uiSpellId, SpellE return true; pCreatureTarget->UpdateEntry(NPC_OWLKIN_INOC); + ((Player*)pCaster)->KilledMonsterCredit(NPC_OWLKIN_INOC); //set despawn timer, since we want to remove creature after a short time pCreatureTarget->ForcedDespawn(15000); diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index c06cb6e5e..00747a8ac 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2713" + #define SD2_REVISION_NR "2714" #endif // __SD2_REVISION_NR_H__ From e7bc36758aa54eb1383751ed813ef6307ecb31b9 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Fri, 14 Sep 2012 08:17:34 +0300 Subject: [PATCH 0708/1172] [2715] Cleanup and improve script for Leotheras the Blind - SSC --- .../boss_leotheras_the_blind.cpp | 250 ++++++++++-------- sd2_revision_nr.h | 2 +- 2 files changed, 135 insertions(+), 117 deletions(-) diff --git a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_leotheras_the_blind.cpp b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_leotheras_the_blind.cpp index 757909693..b9a097f82 100644 --- a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_leotheras_the_blind.cpp +++ b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_leotheras_the_blind.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: Boss_Leotheras_The_Blind -SD%Complete: 50 -SDComment: Missing Inner Demons +SD%Complete: 60 +SDComment: Banish spell event NYI; Inner Demons NYI; Transition to final phase needs more work. SDCategory: Coilfang Resevoir, Serpent Shrine Cavern EndScriptData */ @@ -39,30 +39,30 @@ enum SAY_FREE = -1548019, SAY_DEATH = -1548020, - SPELL_ENRAGE = 26662, - + SPELL_BANISH = 37546, // may be related to spell 37833 - boss should be banished with this spell. Only by killing npcs 21806, will become unbanished + SPELL_BERSERK = 27680, SPELL_WHIRLWIND = 37640, - SPELL_CHAOS_BLAST = 37674, - SPELL_INSIDIOUS_WHISPER = 37676, //not implemented yet. After cast (spellHit), do the inner demon - SPELL_CONS_MADNESS = 37749, - - SPELL_DEMON_ALIGNMENT = 37713, //inner demon have this aura - SPELL_SHADOW_BOLT = 39309, //inner demon spell spam - - FACTION_DEMON_1 = 1829, - FACTION_DEMON_2 = 1830, - FACTION_DEMON_3 = 1831, - FACTION_DEMON_4 = 1832, - FACTION_DEMON_5 = 1833, - - MODEL_NIGHTELF = 20514, - MODEL_DEMON = 20125, + SPELL_CHAOS_BLAST = 37674, // triggers 37675 + SPELL_INSIDIOUS_WHISPER = 37676, + SPELL_WHISPER_CLEAR = 37922, // purpose unk - probably clear the demons on evade + SPELL_CONS_MADNESS = 37749, // charm spell for the players which didn't kill the inner demons during the demon phase + SPELL_METAMORPHOSIS = 37673, // demon transform spell + + // Inner demons already scripted in eventAI + //SPELL_DEMON_ALIGNMENT = 37713, + //SPELL_SHADOW_BOLT = 39309, + //SPELL_DEMON_LINK = 37716, + + //FACTION_DEMON_1 = 1829, + //FACTION_DEMON_2 = 1830, + //FACTION_DEMON_3 = 1831, + //FACTION_DEMON_4 = 1832, + //FACTION_DEMON_5 = 1833, NPC_INNER_DEMON = 21857, NPC_SHADOW_LEO = 21875 }; -//Original Leotheras the Blind AI struct MANGOS_DLL_DECL boss_leotheras_the_blindAI : public ScriptedAI { boss_leotheras_the_blindAI(Creature* pCreature) : ScriptedAI(pCreature) @@ -71,34 +71,31 @@ struct MANGOS_DLL_DECL boss_leotheras_the_blindAI : public ScriptedAI Reset(); } - ScriptedInstance* m_pInstance; // the instance + ScriptedInstance* m_pInstance; - // timers - uint32 m_uiWhirlwind_Timer; - uint32 m_uiInnerDemon_Timer; - uint32 m_uiSwitch_Timer; - uint32 m_uiEnrage_Timer; + uint32 m_uiWhirlwindTimer; + uint32 m_uiInnerDemonTimer; + uint32 m_uiSwitchTimer; + uint32 m_uiChaosBlastTimer; + uint32 m_uiFinalFormTimer; + uint32 m_uiEnrageTimer; bool m_bDemonForm; bool m_bIsFinalForm; - ObjectGuid m_shadowLeoGuid; - void Reset() { - m_uiWhirlwind_Timer = 18500; - m_uiInnerDemon_Timer = 15000; - m_uiSwitch_Timer = 45000; - m_uiEnrage_Timer = MINUTE*10*IN_MILLISECONDS; - - m_bDemonForm = false; - m_bIsFinalForm = false; + m_uiWhirlwindTimer = 18500; + m_uiInnerDemonTimer = 27500; + m_uiSwitchTimer = 60000; + m_uiChaosBlastTimer = 0; + m_uiFinalFormTimer = 0; + m_uiEnrageTimer = 10*MINUTE*IN_MILLISECONDS; - if (m_creature->GetDisplayId() != MODEL_NIGHTELF) - m_creature->SetDisplayId(MODEL_NIGHTELF); + m_bDemonForm = false; + m_bIsFinalForm = false; - if (m_pInstance) - m_pInstance->SetData(TYPE_LEOTHERAS_EVENT, NOT_STARTED); + SetCombatMovement(true); } void Aggro(Unit* pWho) @@ -124,152 +121,173 @@ struct MANGOS_DLL_DECL boss_leotheras_the_blindAI : public ScriptedAI void JustSummoned(Creature* pSummoned) { - if (m_creature->getVictim() && pSummoned->GetEntry() == NPC_SHADOW_LEO) + if (pSummoned->GetEntry() == NPC_SHADOW_LEO) { - m_shadowLeoGuid = pSummoned->GetObjectGuid(); pSummoned->AI()->AttackStart(m_creature->getVictim()); + pSummoned->GetMotionMaster()->MoveFollow(m_creature, 0, 0); } } - void JustDied(Unit* pVictim) + void JustDied(Unit* pKiller) { DoScriptText(SAY_DEATH, m_creature); - //despawn copy - if (m_shadowLeoGuid) - { - if (Creature* pShadowLeo = m_creature->GetMap()->GetCreature(m_shadowLeoGuid)) - pShadowLeo->ForcedDespawn(); - } - if (m_pInstance) m_pInstance->SetData(TYPE_LEOTHERAS_EVENT, DONE); } + void JustReachedHome() + { + if (m_pInstance) + m_pInstance->SetData(TYPE_LEOTHERAS_EVENT, FAIL); + } + void UpdateAI(const uint32 uiDiff) { //Return since we have no target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; + if (m_uiFinalFormTimer) + { + if (m_uiFinalFormTimer <= uiDiff) + { + DoSpawnCreature(NPC_SHADOW_LEO, 0, 0, 0, 0, TEMPSUMMON_CORPSE_DESPAWN, 0); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + + SetCombatMovement(true); + DoStartMovement(m_creature->getVictim()); + m_uiFinalFormTimer = 0; + } + else + m_uiFinalFormTimer -= uiDiff; + + // Wait until we finish the transition + return; + } + + // Human form spells if (!m_bDemonForm) { - //Whirlwind_Timer - if (m_uiWhirlwind_Timer < uiDiff) + if (m_uiWhirlwindTimer < uiDiff) { - DoCastSpellIfCan(m_creature, SPELL_WHIRLWIND); - m_uiWhirlwind_Timer = 30000; - }else m_uiWhirlwind_Timer -= uiDiff; + if (DoCastSpellIfCan(m_creature, SPELL_WHIRLWIND) == CAST_OK) + m_uiWhirlwindTimer = 32000; + } + else + m_uiWhirlwindTimer -= uiDiff; - //Switch_Timer if (!m_bIsFinalForm) { - if (m_uiSwitch_Timer < uiDiff) + if (m_uiSwitchTimer < uiDiff) { - DoScriptText(SAY_SWITCH_TO_DEMON, m_creature); - - if (m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() == CHASE_MOTION_TYPE) + if (DoCastSpellIfCan(m_creature, SPELL_METAMORPHOSIS) == CAST_OK) { - //set false, so MoveChase is not triggered in AttackStart - SetCombatMovement(false); + DoScriptText(SAY_SWITCH_TO_DEMON, m_creature); - m_creature->GetMotionMaster()->Clear(false); + SetCombatMovement(false); + m_creature->GetMotionMaster()->Clear(); m_creature->GetMotionMaster()->MoveIdle(); - m_creature->StopMoving(); - } - //switch to demon form - m_creature->SetDisplayId(MODEL_DEMON); - DoResetThreat(); - m_bDemonForm = true; + DoResetThreat(); + m_bDemonForm = true; - m_uiInnerDemon_Timer = 15000; - m_uiSwitch_Timer = 60000; - }else m_uiSwitch_Timer -= uiDiff; + m_uiInnerDemonTimer = 27500; + m_uiSwitchTimer = 60000; + } + } + else + m_uiSwitchTimer -= uiDiff; } + + DoMeleeAttackIfReady(); } + // Demon form spells else { - //inner demon - if (m_uiInnerDemon_Timer < uiDiff) + if (m_uiInnerDemonTimer) { - DoScriptText(SAY_INNER_DEMONS, m_creature); - - if (m_creature->IsNonMeleeSpellCasted(false)) - m_creature->InterruptNonMeleeSpells(false); - - DoCastSpellIfCan(m_creature, SPELL_INSIDIOUS_WHISPER); - - m_uiInnerDemon_Timer = 60000; - }else m_uiInnerDemon_Timer -= uiDiff; + if (m_uiInnerDemonTimer <= uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_INSIDIOUS_WHISPER, CAST_INTERRUPT_PREVIOUS) == CAST_OK) + { + DoScriptText(SAY_INNER_DEMONS, m_creature); + m_uiInnerDemonTimer = 0; + } + } + else + m_uiInnerDemonTimer -= uiDiff; + } - //chaos blast spam - if (!m_creature->IsNonMeleeSpellCasted(false)) - m_creature->CastSpell(m_creature->getVictim(), SPELL_CHAOS_BLAST, false); + if (m_uiChaosBlastTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_CHAOS_BLAST) == CAST_OK) + m_uiChaosBlastTimer = urand(2000, 3000); + } + else + m_uiChaosBlastTimer -= uiDiff; - //Switch_Timer - if (m_uiSwitch_Timer < uiDiff) + if (m_uiSwitchTimer < uiDiff) { if (m_creature->IsNonMeleeSpellCasted(false)) m_creature->InterruptNonMeleeSpells(false); //switch to nightelf form - m_creature->SetDisplayId(MODEL_NIGHTELF); - - if (m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() != CHASE_MOTION_TYPE) - m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); + m_creature->RemoveAurasDueToSpell(SPELL_METAMORPHOSIS); - //set true SetCombatMovement(true); + DoStartMovement(m_creature->getVictim()); DoResetThreat(); m_bDemonForm = false; - m_uiWhirlwind_Timer = 18500; - m_uiSwitch_Timer = 45000; - }else m_uiSwitch_Timer -= uiDiff; + m_uiWhirlwindTimer = 18500; + m_uiSwitchTimer = 45000; + } + else + m_uiSwitchTimer -= uiDiff; } + // Prepare to summon the Shadow of Leotheras if (!m_bIsFinalForm && m_creature->GetHealthPercent() < 15.0f) { DoScriptText(SAY_FINAL_FORM, m_creature); + m_uiFinalFormTimer = 10000; - //at this point he divides himself in two parts - m_creature->SummonCreature(NPC_SHADOW_LEO, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_CORPSE_DESPAWN, 0); - + // reset him to human form if necessary if (m_bDemonForm) { if (m_creature->IsNonMeleeSpellCasted(false)) m_creature->InterruptNonMeleeSpells(false); //switch to nightelf form - m_creature->SetDisplayId(MODEL_NIGHTELF); - - if (m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() != CHASE_MOTION_TYPE) - m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); - - //set true - SetCombatMovement(true); + m_creature->RemoveAurasDueToSpell(SPELL_METAMORPHOSIS); DoResetThreat(); m_bDemonForm = false; } + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + m_creature->HandleEmote(EMOTE_ONESHOT_KNEEL); + + SetCombatMovement(false); + m_creature->GetMotionMaster()->Clear(); + m_creature->GetMotionMaster()->MoveIdle(); + m_bIsFinalForm = true; } - //m_uiEnrage_Timer - if (m_uiEnrage_Timer < uiDiff) + // Hard enrage timer + if (m_uiEnrageTimer) { - if (m_creature->IsNonMeleeSpellCasted(false)) - m_creature->InterruptNonMeleeSpells(false); - - DoCastSpellIfCan(m_creature, SPELL_ENRAGE); - m_uiEnrage_Timer = MINUTE*5*IN_MILLISECONDS; - }else m_uiEnrage_Timer -= uiDiff; - - if (!m_bDemonForm) - DoMeleeAttackIfReady(); + if (m_uiEnrageTimer <= uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_BERSERK) == CAST_OK) + m_uiEnrageTimer = 0; + } + else + m_uiEnrageTimer -= uiDiff; + } } }; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 00747a8ac..fd4fbecae 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2714" + #define SD2_REVISION_NR "2715" #endif // __SD2_REVISION_NR_H__ From 0a9b30c981d904d5b5e83e8e215aac1c06dfbc68 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Tue, 18 Sep 2012 22:29:10 +0300 Subject: [PATCH 0709/1172] [2716] Cleanup and improve script for Fathomlord Karathress - SSC --- .../boss_fathomlord_karathress.cpp | 423 +++++++----------- .../instance_serpent_shrine.cpp | 15 - .../serpent_shrine/serpent_shrine.h | 8 +- sd2_revision_nr.h | 2 +- 4 files changed, 164 insertions(+), 284 deletions(-) diff --git a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_fathomlord_karathress.cpp b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_fathomlord_karathress.cpp index 254af1976..8528ef361 100644 --- a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_fathomlord_karathress.cpp +++ b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_fathomlord_karathress.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: Boss_Fathomlord_Karathress -SD%Complete: 60 -SDComment: Missing Multishot, Totems, Windfury, Whirlwind +SD%Complete: 95 +SDComment: Timers may need adjustments. SDCategory: Coilfang Resevoir, Serpent Shrine Cavern EndScriptData */ @@ -38,12 +38,9 @@ enum //Karathress spells SPELL_CATACLYSMIC_BOLT = 38441, - SPELL_POWER_OF_SHARKKIS = 38455, - SPELL_POWER_OF_TIDALVESS = 38452, - SPELL_POWER_OF_CARIBDIS = 38451, - SPELL_ENRAGE = 24318, + SPELL_ENRAGE = 24318, // ToDo: spell needs to be confirmed SPELL_SEAR_NOVA = 38445, - SPELL_BLESSING_OF_THE_TIDES = 38449, + SPELL_BLESSING_OF_THE_TIDES = 38449, // cast by each of the advisors when the boss reaches 75% hp //Sharkkis spells SPELL_LEECHING_THROW = 29436, @@ -52,6 +49,7 @@ enum SPELL_MULTI_TOSS = 38366, SPELL_SUMMON_FATHOM_LURKER = 38433, SPELL_SUMMON_FATHOM_SPOREBAT = 38431, + SPELL_POWER_OF_SHARKKIS = 38455, // cast on Karathress, on death //Tidalvess spells SPELL_FROST_SHOCK = 38234, @@ -59,24 +57,32 @@ enum SPELL_POISON_CLEANSING_TOTEM = 38306, SPELL_EARTHBIND_TOTEM = 38304, SPELL_WINDFURY_WEAPON = 32911, // triggers spell 32912 (Windfury) + SPELL_POWER_OF_TIDALVESS = 38452, // cast on Karathress, on death //Caribdis Spells SPELL_WATER_BOLT_VOLLEY = 38335, SPELL_TIDAL_SURGE = 38358, // triggers 38353 which then triggers 38357 - SPELL_HEAL = 38330, + SPELL_HEALING_WAVE = 38330, SPELL_SUMMON_CYCLONE = 38337, // summons creature 22104 which uses spell 29538 + SPELL_POWER_OF_CARIBDIS = 38451, // cast on Karathress, on death + + SPELL_CYCLONE = 29538, MAX_ADVISORS = 3, + NPC_CYCLONE = 22104, NPC_SEER_OLUM = 22820 }; // position for Seer Olum -const float afCoords_Olum[] = {446.78f, -542.76f, -7.54773f, 0.401581f}; +static const float afCoordsOlum[4] = {446.78f, -542.76f, -7.547f, 0.401f}; + +static const uint32 aAdvisors[MAX_ADVISORS] = {NPC_SHARKKIS, NPC_TIDALVESS, NPC_CARIBDIS}; -static const uint32 aAdvisors[] = {NPC_SHARKKIS, NPC_TIDALVESS, NPC_CARIBDIS}; +/*###### +## boss_fathomlord_karathress +######*/ -//Fathom-Lord Karathress AI struct MANGOS_DLL_DECL boss_fathomlord_karathressAI : public ScriptedAI { boss_fathomlord_karathressAI(Creature* pCreature) : ScriptedAI(pCreature) @@ -87,64 +93,42 @@ struct MANGOS_DLL_DECL boss_fathomlord_karathressAI : public ScriptedAI ScriptedInstance* m_pInstance; - // timers uint32 m_uiCataclysmicBoltTimer; + uint32 m_uiSearingNovaTimer; uint32 m_uiEnrageTimer; - bool m_bBlessingOfTides_MobsChecked; + bool m_bBlessingOfTides; void Reset() { - m_uiCataclysmicBoltTimer = 10000; - m_uiEnrageTimer = 600000; - m_bBlessingOfTides_MobsChecked = false; + m_uiCataclysmicBoltTimer = 10000; + m_uiSearingNovaTimer = urand(20000, 30000); + m_uiEnrageTimer = 10*MINUTE*IN_MILLISECONDS; + m_bBlessingOfTides = false; } - // TODO - unneeded workaround - the spell should be cast by adviser onto karathress; text can also be handled in their AI - // select the spell and the text based on the advisor which died - void EventAdvisorDeath(uint32 uiAdvisor) + void SpellHit(Unit* pCaster, const SpellEntry* pSpell) { - if (!m_creature->isAlive()) - return; - - int32 iSayGainAbility = 0; - uint32 uiSpell = 0; - - switch(uiAdvisor) + switch (pSpell->Id) { - case NPC_SHARKKIS: - iSayGainAbility = SAY_GAIN_ABILITY1; - uiSpell = SPELL_POWER_OF_SHARKKIS; + case SPELL_POWER_OF_SHARKKIS: + DoScriptText(SAY_GAIN_ABILITY1, m_creature); break; - case NPC_TIDALVESS: - iSayGainAbility = SAY_GAIN_ABILITY2; - uiSpell = SPELL_POWER_OF_TIDALVESS; + case SPELL_POWER_OF_TIDALVESS: + DoScriptText(SAY_GAIN_ABILITY1, m_creature); break; - case NPC_CARIBDIS: - iSayGainAbility = SAY_GAIN_ABILITY3; - uiSpell = SPELL_POWER_OF_CARIBDIS; + case SPELL_POWER_OF_CARIBDIS: + DoScriptText(SAY_GAIN_ABILITY3, m_creature); break; - default: - error_log("SD2: invalid advisor (id %u) for karathress!", uiAdvisor); - return; } - - DoScriptText(iSayGainAbility, m_creature); - DoCastSpellIfCan(m_creature, uiSpell); } void Aggro(Unit* pWho) { - if (!m_pInstance) - return; + if (m_pInstance) + m_pInstance->SetData(TYPE_KARATHRESS_EVENT, IN_PROGRESS); DoScriptText(SAY_AGGRO, m_creature); - - if (Player* pPlayer = pWho->GetCharmerOrOwnerPlayerOrPlayerItself()) - { - m_pInstance->SetGuid(DATA_KARATHRESS_STARTER, pPlayer->GetObjectGuid()); - m_pInstance->SetData(TYPE_KARATHRESS_EVENT, IN_PROGRESS); - } } void KilledUnit(Unit* pVictim) @@ -165,54 +149,20 @@ struct MANGOS_DLL_DECL boss_fathomlord_karathressAI : public ScriptedAI m_pInstance->SetData(TYPE_KARATHRESS_EVENT, DONE); //support for quest 10944 - m_creature->SummonCreature(NPC_SEER_OLUM, afCoords_Olum[0], afCoords_Olum[1], afCoords_Olum[2], afCoords_Olum[3], TEMPSUMMON_TIMED_DESPAWN, 3600000); + m_creature->SummonCreature(NPC_SEER_OLUM, afCoordsOlum[0], afCoordsOlum[1], afCoordsOlum[2], afCoordsOlum[3], TEMPSUMMON_TIMED_DESPAWN, 1*HOUR*IN_MILLISECONDS); } void JustReachedHome() { - if (!m_pInstance) - return; - - for (uint8 i = 0; i < MAX_ADVISORS; ++i) - { - if (Creature* pAdvisor = m_pInstance->GetSingleCreatureFromStorage(aAdvisors[i])) - { - if (pAdvisor->getVictim()) - pAdvisor->AI()->EnterEvadeMode(); - else if (!pAdvisor->isAlive()) - pAdvisor->Respawn(); - } - } - if (m_pInstance) m_pInstance->SetData(TYPE_KARATHRESS_EVENT, FAIL); } void UpdateAI(const uint32 uiDiff) { - if (!m_pInstance) - return; - - //Return since we have no target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - { - //check if the event is started - if (m_pInstance->GetData(TYPE_KARATHRESS_EVENT) == IN_PROGRESS) - { - if (Player* pTarget = m_creature->GetMap()->GetPlayer(m_pInstance->GetGuid(DATA_KARATHRESS_STARTER))) - AttackStart(pTarget); - } - return; - } - - //someone evaded! - if (m_pInstance->GetData(TYPE_KARATHRESS_EVENT) == FAIL) - { - EnterEvadeMode(); return; - } - //m_uiCataclysmicBoltTimer if (m_uiCataclysmicBoltTimer < uiDiff) { //select a random unit other than the main tank @@ -222,16 +172,18 @@ struct MANGOS_DLL_DECL boss_fathomlord_karathressAI : public ScriptedAI if (!pTarget) pTarget = m_creature->getVictim(); - if (DoCastSpellIfCan(pTarget, SPELL_CATACLYSMIC_BOLT) == CAST_OK) - m_uiCataclysmicBoltTimer = 10000; + if (pTarget) + { + if (DoCastSpellIfCan(pTarget, SPELL_CATACLYSMIC_BOLT) == CAST_OK) + m_uiCataclysmicBoltTimer = 10000; + } } else m_uiCataclysmicBoltTimer -= uiDiff; - //hp under 75% - if (!m_bBlessingOfTides_MobsChecked && m_creature->GetHealthPercent() < 75.0f) + if (!m_bBlessingOfTides && m_creature->GetHealthPercent() < 75.0f) { - for(uint8 i = 0; i < MAX_ADVISORS; ++i) + for (uint8 i = 0; i < MAX_ADVISORS; ++i) { if (Creature* pAdvisor = m_pInstance->GetSingleCreatureFromStorage(aAdvisors[i])) { @@ -239,7 +191,7 @@ struct MANGOS_DLL_DECL boss_fathomlord_karathressAI : public ScriptedAI if (pAdvisor->isAlive()) { pAdvisor->InterruptNonMeleeSpells(false); - pAdvisor->CastSpell(m_creature, SPELL_BLESSING_OF_THE_TIDES, false); + pAdvisor->CastSpell(m_creature, SPELL_BLESSING_OF_THE_TIDES, true); } } } @@ -248,165 +200,101 @@ struct MANGOS_DLL_DECL boss_fathomlord_karathressAI : public ScriptedAI if (m_creature->HasAura(SPELL_BLESSING_OF_THE_TIDES)) DoScriptText(SAY_GAIN_BLESSING, m_creature); - m_bBlessingOfTides_MobsChecked = true; + m_bBlessingOfTides = true; } - //m_uiEnrageTimer - if (m_uiEnrageTimer < uiDiff) + if (m_uiSearingNovaTimer < uiDiff) { - if (DoCastSpellIfCan(m_creature, SPELL_ENRAGE) == CAST_OK) - m_uiEnrageTimer = 90000; + if (DoCastSpellIfCan(m_creature, SPELL_SEAR_NOVA) == CAST_OK) + m_uiSearingNovaTimer = urand(20000, 30000); } else - m_uiEnrageTimer -= uiDiff; + m_uiSearingNovaTimer -= uiDiff; - DoMeleeAttackIfReady(); - } -}; - -// Base AI for every advisor -struct MANGOS_DLL_DECL Advisor_Base_AI : public ScriptedAI -{ - Advisor_Base_AI(Creature* pCreature) : ScriptedAI(pCreature) - { - m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - } - - ScriptedInstance* m_pInstance; - - void JustReachedHome() - { - if (m_pInstance && m_pInstance->GetData(TYPE_KARATHRESS_EVENT) == IN_PROGRESS) - m_pInstance->SetData(TYPE_KARATHRESS_EVENT, FAIL); - } - - void Aggro(Unit *pWho) - { - if (!m_pInstance) - return; - - if (m_pInstance->GetData(TYPE_KARATHRESS_EVENT) == NOT_STARTED || m_pInstance->GetData(TYPE_KARATHRESS_EVENT) == FAIL) - m_pInstance->SetData(TYPE_KARATHRESS_EVENT, IN_PROGRESS); - - if (Player* pPlayer = pWho->GetCharmerOrOwnerPlayerOrPlayerItself()) - m_pInstance->SetGuid(DATA_KARATHRESS_STARTER, pPlayer->GetObjectGuid()); - } - - void JustDied(Unit* pVictim) - { - if (!m_pInstance) - return; - - if (Creature* pKarathress = m_pInstance->GetSingleCreatureFromStorage(NPC_KARATHRESS)) + if (m_uiEnrageTimer) { - if (boss_fathomlord_karathressAI* pKaraAI = dynamic_cast(pKarathress->AI())) - pKaraAI->EventAdvisorDeath(m_creature->GetEntry()); + if (m_uiEnrageTimer <= uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_ENRAGE) == CAST_OK) + m_uiEnrageTimer = 0; + } + else + m_uiEnrageTimer -= uiDiff; } + + DoMeleeAttackIfReady(); } }; -//Fathom-Guard Sharkkis AI -struct MANGOS_DLL_DECL boss_fathomguard_sharkkisAI : public Advisor_Base_AI +/*###### +## boss_fathomguard_sharkkis +######*/ + +struct MANGOS_DLL_DECL boss_fathomguard_sharkkisAI : public ScriptedAI { - boss_fathomguard_sharkkisAI(Creature* pCreature) : Advisor_Base_AI(pCreature) { Reset(); } + boss_fathomguard_sharkkisAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } - // timers uint32 m_uiHurlTridentTimer; uint32 m_uiLeechingThrowTimer; uint32 m_uiTheBeastWithinTimer; + uint32 m_uiMultiTossTimer; uint32 m_uiPetTimer; - bool m_bIsPetCheckNeeded; - void Reset() { m_uiHurlTridentTimer = 2500; m_uiLeechingThrowTimer = 20000; m_uiTheBeastWithinTimer = 30000; - m_uiPetTimer = 10000; - - m_bIsPetCheckNeeded = true; + m_uiMultiTossTimer = urand(7000, 11000); + if (!m_creature->GetPet()) + m_uiPetTimer = 10000; } - void AttackStart(Unit* pWho) + void JustDied(Unit* pKiller) { - if (!pWho) - return; - - if (m_creature->Attack(pWho, false)) - { - m_creature->AddThreat(pWho); - m_creature->SetInCombatWith(pWho); - pWho->SetInCombatWith(m_creature); - - //using larger distance, since hunter type - m_creature->GetMotionMaster()->MoveChase(pWho, 15.0f); - } + DoCastSpellIfCan(m_creature, SPELL_POWER_OF_SHARKKIS, CAST_TRIGGERED); } void JustSummoned(Creature* pSummoned) { - if (pSummoned->IsPet()) - { - m_uiPetTimer = 10000; - m_bIsPetCheckNeeded = false; - } + if (m_creature->getVictim()) + pSummoned->AI()->AttackStart(m_creature->getVictim()); } - void SummonedCreatureDespawn(Creature* pDespawned) + void SummonedCreatureJustDied(Creature* pSummoned) { - if (pDespawned->IsPet()) - m_bIsPetCheckNeeded = true; + // resummon the pet in 10 secs + if (pSummoned->IsPet()) + m_uiPetTimer = 10000; } void UpdateAI(const uint32 uiDiff) { - if (!m_pInstance) - return; - - //Return since we have no target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - { - //check if the event is started - if (m_pInstance->GetData(TYPE_KARATHRESS_EVENT) == IN_PROGRESS) - { - if (Player* pTarget = m_creature->GetMap()->GetPlayer(m_pInstance->GetGuid(DATA_KARATHRESS_STARTER))) - AttackStart(pTarget); - } return; - } - - //someone evaded! - if (m_pInstance->GetData(TYPE_KARATHRESS_EVENT) == FAIL) - { - EnterEvadeMode(); - return; - } - //after 10 seconds: spawn pet if not exist - if (m_bIsPetCheckNeeded) + if (m_uiPetTimer) { - if (m_uiPetTimer < uiDiff) + if (m_uiPetTimer <= uiDiff) { - if (!m_creature->GetPet()) - DoCastSpellIfCan(m_creature, urand(0,1) ? SPELL_SUMMON_FATHOM_LURKER : SPELL_SUMMON_FATHOM_SPOREBAT); + if (DoCastSpellIfCan(m_creature, urand(0, 1) ? SPELL_SUMMON_FATHOM_LURKER : SPELL_SUMMON_FATHOM_SPOREBAT) == CAST_OK) + m_uiPetTimer = 0; } else m_uiPetTimer -= uiDiff; } - //m_uiHurlTridentTimer if (m_uiHurlTridentTimer < uiDiff) { if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0, SPELL_HURL_TRIDENT, 0)) - DoCastSpellIfCan(pTarget, SPELL_HURL_TRIDENT); - - m_uiHurlTridentTimer = 5000; + { + if (DoCastSpellIfCan(pTarget, SPELL_HURL_TRIDENT) == CAST_OK) + m_uiHurlTridentTimer = 5000; + } } else m_uiHurlTridentTimer -= uiDiff; - //m_uiLeechingThrowTimer if (m_uiLeechingThrowTimer < uiDiff) { if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_LEECHING_THROW) == CAST_OK) @@ -415,7 +303,6 @@ struct MANGOS_DLL_DECL boss_fathomguard_sharkkisAI : public Advisor_Base_AI else m_uiLeechingThrowTimer -= uiDiff; - //m_uiTheBeastWithinTimer if (m_uiTheBeastWithinTimer < uiDiff) { if (DoCastSpellIfCan(m_creature, SPELL_THE_BEAST_WITHIN) == CAST_OK) @@ -424,102 +311,124 @@ struct MANGOS_DLL_DECL boss_fathomguard_sharkkisAI : public Advisor_Base_AI else m_uiTheBeastWithinTimer -= uiDiff; + if (m_uiMultiTossTimer < uiDiff) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, SPELL_HURL_TRIDENT) == CAST_OK) + m_uiMultiTossTimer = urand(7000, 12000); + } + } + else + m_uiMultiTossTimer -= uiDiff; + DoMeleeAttackIfReady(); } }; -//Fathom-Guard Tidalvess AI -struct MANGOS_DLL_DECL boss_fathomguard_tidalvessAI : public Advisor_Base_AI +/*###### +## boss_fathomguard_tidalvess +######*/ + +struct MANGOS_DLL_DECL boss_fathomguard_tidalvessAI : public ScriptedAI { - boss_fathomguard_tidalvessAI(Creature* pCreature) : Advisor_Base_AI(pCreature) { Reset(); } + boss_fathomguard_tidalvessAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } - // timers uint32 m_uiFrostShockTimer; + uint32 m_uiWindfuryTimer; + uint32 m_uiTotemTimer; void Reset() { m_uiFrostShockTimer = 25000; + m_uiWindfuryTimer = 0; + m_uiTotemTimer = urand(2000, 5000); + } + + void JustDied(Unit* pKiller) + { + DoCastSpellIfCan(m_creature, SPELL_POWER_OF_TIDALVESS, CAST_TRIGGERED); } void UpdateAI(const uint32 uiDiff) { - if (!m_pInstance) + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - //Return since we have no target - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + if (m_uiFrostShockTimer < uiDiff) { - //check if the event is started - if (m_pInstance->GetData(TYPE_KARATHRESS_EVENT) == IN_PROGRESS) - { - if (Player* pTarget = m_creature->GetMap()->GetPlayer(m_pInstance->GetGuid(DATA_KARATHRESS_STARTER))) - AttackStart(pTarget); - } - return; + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_FROST_SHOCK) == CAST_OK) + m_uiFrostShockTimer = urand(25000, 30000); } + else + m_uiFrostShockTimer -= uiDiff; - //someone evaded! - if (m_pInstance->GetData(TYPE_KARATHRESS_EVENT) == FAIL) + if (m_uiWindfuryTimer < uiDiff) { - EnterEvadeMode(); - return; + if (DoCastSpellIfCan(m_creature, SPELL_WINDFURY_WEAPON) == CAST_OK) + m_uiWindfuryTimer = urand(90000, 100000); } + else + m_uiWindfuryTimer -= uiDiff; - //m_uiFrostShockTimer - if (m_uiFrostShockTimer < uiDiff) + if (m_uiTotemTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_FROST_SHOCK); - m_uiFrostShockTimer = urand(25000, 30000); + if (m_creature->IsNonMeleeSpellCasted(false)) + { + switch (urand(0, 2)) + { + case 0: DoCastSpellIfCan(m_creature, SPELL_SPITFIRE_TOTEM); + case 1: DoCastSpellIfCan(m_creature, SPELL_POISON_CLEANSING_TOTEM); + case 2: DoCastSpellIfCan(m_creature, SPELL_EARTHBIND_TOTEM); + } + m_uiTotemTimer = urand(30000, 60000); + } } else - m_uiFrostShockTimer -= uiDiff; + m_uiTotemTimer -= uiDiff; DoMeleeAttackIfReady(); } }; -//Fathom-Guard Caribdis AI -struct MANGOS_DLL_DECL boss_fathomguard_caribdisAI : public Advisor_Base_AI +/*###### +## boss_fathomguard_caribdis +######*/ + +struct MANGOS_DLL_DECL boss_fathomguard_caribdisAI : public ScriptedAI { - boss_fathomguard_caribdisAI(Creature* pCreature) : Advisor_Base_AI(pCreature) { Reset(); } + boss_fathomguard_caribdisAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } - // timers uint32 m_uiWaterBoltVolleyTimer; uint32 m_uiTidalSurgeTimer; uint32 m_uiHealTimer; + uint32 m_uiCycloneTimer; void Reset() { m_uiWaterBoltVolleyTimer = 35000; m_uiTidalSurgeTimer = urand(15000, 20000); m_uiHealTimer = 55000; + m_uiCycloneTimer = urand(10000, 15000); } - void UpdateAI(const uint32 uiDiff) + void JustDied(Unit* pKiller) { - if (!m_pInstance) - return; + DoCastSpellIfCan(m_creature, SPELL_POWER_OF_CARIBDIS, CAST_TRIGGERED); + } - //Return since we have no target - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - { - //check if the event is started - if (m_pInstance->GetData(TYPE_KARATHRESS_EVENT) == IN_PROGRESS) - { - if (Player* pTarget = m_creature->GetMap()->GetPlayer(m_pInstance->GetGuid(DATA_KARATHRESS_STARTER))) - AttackStart(pTarget); - } - return; - } + void JustSummoned(Creature* pSummoned) + { + // ToDo: research if this creature should follow the summoner or a random target + if (pSummoned->GetEntry() == NPC_CYCLONE) + pSummoned->CastSpell(pSummoned, SPELL_CYCLONE, true); + } - //someone evaded! - if (m_pInstance->GetData(TYPE_KARATHRESS_EVENT) == FAIL) - { - EnterEvadeMode(); + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - } - //m_uiWaterBoltVolleyTimer if (m_uiWaterBoltVolleyTimer < uiDiff) { if (DoCastSpellIfCan(m_creature, SPELL_WATER_BOLT_VOLLEY) == CAST_OK) @@ -528,7 +437,6 @@ struct MANGOS_DLL_DECL boss_fathomguard_caribdisAI : public Advisor_Base_AI else m_uiWaterBoltVolleyTimer -= uiDiff; - //m_uiTidalSurgeTimer if (m_uiTidalSurgeTimer < uiDiff) { if (DoCastSpellIfCan(m_creature, SPELL_TIDAL_SURGE) == CAST_OK) @@ -537,26 +445,19 @@ struct MANGOS_DLL_DECL boss_fathomguard_caribdisAI : public Advisor_Base_AI else m_uiTidalSurgeTimer -= uiDiff; - //m_uiHealTimer - if (m_uiHealTimer < uiDiff) + if (m_uiCycloneTimer < uiDiff) { - // It can be cast on any of the mobs - Unit* pUnit = NULL; - - switch (urand(0, 3)) - { - case 0: pUnit = m_pInstance->GetSingleCreatureFromStorage(NPC_KARATHRESS); break; - case 1: pUnit = m_pInstance->GetSingleCreatureFromStorage(NPC_SHARKKIS); break; - case 2: pUnit = m_pInstance->GetSingleCreatureFromStorage(NPC_TIDALVESS); break; - case 3: pUnit = m_creature; break; - } - - if (!pUnit) - pUnit = m_creature; + if (DoCastSpellIfCan(m_creature, SPELL_SUMMON_CYCLONE) == CAST_OK) + m_uiCycloneTimer = urand(45000, 60000); + } + else + m_uiCycloneTimer -= uiDiff; - if (pUnit->isAlive()) + if (m_uiHealTimer < uiDiff) + { + if (Unit* pTarget = DoSelectLowestHpFriendly(50.0f)) { - if (DoCastSpellIfCan(pUnit, SPELL_HEAL) == CAST_OK) + if (DoCastSpellIfCan(pTarget, SPELL_HEALING_WAVE) == CAST_OK) m_uiHealTimer = 60000; } } diff --git a/scripts/outland/coilfang_reservoir/serpent_shrine/instance_serpent_shrine.cpp b/scripts/outland/coilfang_reservoir/serpent_shrine/instance_serpent_shrine.cpp index ec8623157..a23fe07de 100644 --- a/scripts/outland/coilfang_reservoir/serpent_shrine/instance_serpent_shrine.cpp +++ b/scripts/outland/coilfang_reservoir/serpent_shrine/instance_serpent_shrine.cpp @@ -60,7 +60,6 @@ void instance_serpentshrine_cavern::OnCreatureCreate(Creature* pCreature) switch (pCreature->GetEntry()) { case NPC_LADYVASHJ: - case NPC_KARATHRESS: case NPC_SHARKKIS: case NPC_TIDALVESS: case NPC_CARIBDIS: @@ -69,20 +68,6 @@ void instance_serpentshrine_cavern::OnCreatureCreate(Creature* pCreature) } } -void instance_serpentshrine_cavern::SetData64(uint32 uiType, uint64 uiData) -{ - if (uiType == DATA_KARATHRESS_STARTER) - m_karathressEventStarterGuid = ObjectGuid(uiData); -} - -uint64 instance_serpentshrine_cavern::GetData64(uint32 uiData) -{ - if (uiData == DATA_KARATHRESS_STARTER) - return m_karathressEventStarterGuid.GetRawValue(); - - return 0; -} - void instance_serpentshrine_cavern::SetData(uint32 uiType, uint32 uiData) { switch (uiType) diff --git a/scripts/outland/coilfang_reservoir/serpent_shrine/serpent_shrine.h b/scripts/outland/coilfang_reservoir/serpent_shrine/serpent_shrine.h index cce375d52..e9a2eff94 100644 --- a/scripts/outland/coilfang_reservoir/serpent_shrine/serpent_shrine.h +++ b/scripts/outland/coilfang_reservoir/serpent_shrine/serpent_shrine.h @@ -23,9 +23,7 @@ enum TYPE_SHIELDGENERATOR3 = TYPE_SHIELDGENERATOR1 + 2, TYPE_SHIELDGENERATOR4 = TYPE_SHIELDGENERATOR1 + 3, - DATA_KARATHRESS_STARTER = 12, // Player who started the Karathress encounter - - NPC_KARATHRESS = 21214, + //NPC_KARATHRESS = 21214, NPC_CARIBDIS = 21964, NPC_SHARKKIS = 21966, NPC_TIDALVESS = 21965, @@ -44,8 +42,6 @@ class MANGOS_DLL_DECL instance_serpentshrine_cavern : public ScriptedInstance void SetData(uint32 uiType, uint32 uiData); uint32 GetData(uint32 uiType); - void SetData64(uint32 uiType, uint64 uiData); - uint64 GetData64(uint32 uiData); const char* Save() { return m_strInstData.c_str(); } void Load(const char* chrIn); @@ -54,8 +50,6 @@ class MANGOS_DLL_DECL instance_serpentshrine_cavern : public ScriptedInstance uint32 m_auiEncounter[MAX_ENCOUNTER]; uint32 m_auiShieldGenerator[MAX_GENERATOR]; std::string m_strInstData; - - ObjectGuid m_karathressEventStarterGuid; }; #endif diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index fd4fbecae..a4b26f8ae 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2715" + #define SD2_REVISION_NR "2716" #endif // __SD2_REVISION_NR_H__ From 9b450a6078a564906d32f184a83b7efaec8337b1 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Thu, 20 Sep 2012 01:42:06 +0300 Subject: [PATCH 0710/1172] [2717] Implement banishment for Leotheras the Blind - SSC Also fix a bug in Kael'thas script - thanks Reamer --- .../boss_felblood_kaelthas.cpp | 1 + .../boss_leotheras_the_blind.cpp | 38 +++++++++++++++-- .../instance_serpent_shrine.cpp | 41 ++++++++++++++++++- .../serpent_shrine/serpent_shrine.h | 11 +++++ sd2_revision_nr.h | 2 +- 5 files changed, 88 insertions(+), 5 deletions(-) diff --git a/scripts/eastern_kingdoms/magisters_terrace/boss_felblood_kaelthas.cpp b/scripts/eastern_kingdoms/magisters_terrace/boss_felblood_kaelthas.cpp index 7d711e5dc..49fefa0ba 100644 --- a/scripts/eastern_kingdoms/magisters_terrace/boss_felblood_kaelthas.cpp +++ b/scripts/eastern_kingdoms/magisters_terrace/boss_felblood_kaelthas.cpp @@ -227,6 +227,7 @@ struct MANGOS_DLL_DECL boss_felblood_kaelthasAI : public ScriptedAI, private Dia m_creature->HandleEmote(EMOTE_ONESHOT_ROAR); break; case NPC_PHOENIX_EGG: + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); break; } diff --git a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_leotheras_the_blind.cpp b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_leotheras_the_blind.cpp index b9a097f82..f53ef5de4 100644 --- a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_leotheras_the_blind.cpp +++ b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_leotheras_the_blind.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: Boss_Leotheras_The_Blind -SD%Complete: 60 -SDComment: Banish spell event NYI; Inner Demons NYI; Transition to final phase needs more work. +SD%Complete: 70 +SDComment: Inner Demons NYI; Transition to final phase needs more work. SDCategory: Coilfang Resevoir, Serpent Shrine Cavern EndScriptData */ @@ -39,7 +39,6 @@ enum SAY_FREE = -1548019, SAY_DEATH = -1548020, - SPELL_BANISH = 37546, // may be related to spell 37833 - boss should be banished with this spell. Only by killing npcs 21806, will become unbanished SPELL_BERSERK = 27680, SPELL_WHIRLWIND = 37640, SPELL_CHAOS_BLAST = 37674, // triggers 37675 @@ -73,6 +72,7 @@ struct MANGOS_DLL_DECL boss_leotheras_the_blindAI : public ScriptedAI ScriptedInstance* m_pInstance; + uint32 m_uiBanishTimer; uint32 m_uiWhirlwindTimer; uint32 m_uiInnerDemonTimer; uint32 m_uiSwitchTimer; @@ -85,6 +85,7 @@ struct MANGOS_DLL_DECL boss_leotheras_the_blindAI : public ScriptedAI void Reset() { + m_uiBanishTimer = 10000; m_uiWhirlwindTimer = 18500; m_uiInnerDemonTimer = 27500; m_uiSwitchTimer = 60000; @@ -95,6 +96,7 @@ struct MANGOS_DLL_DECL boss_leotheras_the_blindAI : public ScriptedAI m_bDemonForm = false; m_bIsFinalForm = false; + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); SetCombatMovement(true); } @@ -106,6 +108,24 @@ struct MANGOS_DLL_DECL boss_leotheras_the_blindAI : public ScriptedAI m_pInstance->SetData(TYPE_LEOTHERAS_EVENT, IN_PROGRESS); } + void AttackStart(Unit* pWho) + { + // Don't attack while banished + if (m_creature->HasAura(SPELL_LEOTHERAS_BANISH)) + return; + + ScriptedAI::AttackStart(pWho); + } + + void MoveInLineOfSight(Unit* pWho) + { + // Don't attack while banished + if (m_creature->HasAura(SPELL_LEOTHERAS_BANISH)) + return; + + ScriptedAI::MoveInLineOfSight(pWho); + } + void KilledUnit(Unit* pVictim) { if (pVictim->GetTypeId() != TYPEID_PLAYER) @@ -144,6 +164,18 @@ struct MANGOS_DLL_DECL boss_leotheras_the_blindAI : public ScriptedAI void UpdateAI(const uint32 uiDiff) { + // Banish the boss before combat + if (m_uiBanishTimer) + { + if (m_uiBanishTimer <= uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_LEOTHERAS_BANISH) == CAST_OK) + m_uiBanishTimer = 0; + } + else + m_uiBanishTimer -= uiDiff; + } + //Return since we have no target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/outland/coilfang_reservoir/serpent_shrine/instance_serpent_shrine.cpp b/scripts/outland/coilfang_reservoir/serpent_shrine/instance_serpent_shrine.cpp index a23fe07de..14df8e510 100644 --- a/scripts/outland/coilfang_reservoir/serpent_shrine/instance_serpent_shrine.cpp +++ b/scripts/outland/coilfang_reservoir/serpent_shrine/instance_serpent_shrine.cpp @@ -33,7 +33,8 @@ EndScriptData */ 5 - Lady Vashj Event */ -instance_serpentshrine_cavern::instance_serpentshrine_cavern(Map* pMap) : ScriptedInstance(pMap) +instance_serpentshrine_cavern::instance_serpentshrine_cavern(Map* pMap) : ScriptedInstance(pMap), + m_uiSpellBinderCount(0) { Initialize(); } @@ -63,8 +64,12 @@ void instance_serpentshrine_cavern::OnCreatureCreate(Creature* pCreature) case NPC_SHARKKIS: case NPC_TIDALVESS: case NPC_CARIBDIS: + case NPC_LEOTHERAS: m_mNpcEntryGuidStore[pCreature->GetEntry()] = pCreature->GetObjectGuid(); break; + case NPC_GREYHEART_SPELLBINDER: + m_lSpellBindersGUIDList.push_back(pCreature->GetObjectGuid()); + break; } } @@ -77,6 +82,16 @@ void instance_serpentshrine_cavern::SetData(uint32 uiType, uint32 uiData) break; case TYPE_LEOTHERAS_EVENT: m_auiEncounter[1] = uiData; + if (uiData == FAIL) + { + for (GuidList::const_iterator itr = m_lSpellBindersGUIDList.begin(); itr != m_lSpellBindersGUIDList.end(); ++itr) + { + if (Creature* pSpellBinder = instance->GetCreature(*itr)) + pSpellBinder->Respawn(); + } + + m_uiSpellBinderCount = 0; + } break; case TYPE_THELURKER_EVENT: m_auiEncounter[2] = uiData; @@ -167,6 +182,30 @@ uint32 instance_serpentshrine_cavern::GetData(uint32 uiType) } } +void instance_serpentshrine_cavern::OnCreatureEnterCombat(Creature* pCreature) +{ + // Interrupt spell casting on aggro + if (pCreature->GetEntry() == NPC_GREYHEART_SPELLBINDER) + pCreature->InterruptNonMeleeSpells(false); +} + +void instance_serpentshrine_cavern::OnCreatureDeath(Creature* pCreature) +{ + if (pCreature->GetEntry() == NPC_GREYHEART_SPELLBINDER) + { + ++m_uiSpellBinderCount; + + if (m_uiSpellBinderCount == MAX_SPELLBINDERS) + { + if (Creature* pLeotheras = GetSingleCreatureFromStorage(NPC_LEOTHERAS)) + { + pLeotheras->RemoveAurasDueToSpell(SPELL_LEOTHERAS_BANISH); + pLeotheras->SetInCombatWithZone(); + } + } + } +} + InstanceData* GetInstanceData_instance_serpentshrine_cavern(Map* pMap) { return new instance_serpentshrine_cavern(pMap); diff --git a/scripts/outland/coilfang_reservoir/serpent_shrine/serpent_shrine.h b/scripts/outland/coilfang_reservoir/serpent_shrine/serpent_shrine.h index e9a2eff94..5a870e12e 100644 --- a/scripts/outland/coilfang_reservoir/serpent_shrine/serpent_shrine.h +++ b/scripts/outland/coilfang_reservoir/serpent_shrine/serpent_shrine.h @@ -9,6 +9,7 @@ enum { MAX_ENCOUNTER = 6, MAX_GENERATOR = 4, + MAX_SPELLBINDERS = 3, TYPE_HYDROSS_EVENT = 1, TYPE_KARATHRESS_EVENT = 2, @@ -27,7 +28,11 @@ enum NPC_CARIBDIS = 21964, NPC_SHARKKIS = 21966, NPC_TIDALVESS = 21965, + NPC_LEOTHERAS = 21215, NPC_LADYVASHJ = 21212, + NPC_GREYHEART_SPELLBINDER = 21806, + + SPELL_LEOTHERAS_BANISH = 37546, }; class MANGOS_DLL_DECL instance_serpentshrine_cavern : public ScriptedInstance @@ -39,6 +44,8 @@ class MANGOS_DLL_DECL instance_serpentshrine_cavern : public ScriptedInstance bool IsEncounterInProgress() const; void OnCreatureCreate(Creature* pCreature); + void OnCreatureEnterCombat(Creature* pCreature); + void OnCreatureDeath(Creature* pCreature); void SetData(uint32 uiType, uint32 uiData); uint32 GetData(uint32 uiType); @@ -50,6 +57,10 @@ class MANGOS_DLL_DECL instance_serpentshrine_cavern : public ScriptedInstance uint32 m_auiEncounter[MAX_ENCOUNTER]; uint32 m_auiShieldGenerator[MAX_GENERATOR]; std::string m_strInstData; + + uint32 m_uiSpellBinderCount; + + GuidList m_lSpellBindersGUIDList; }; #endif diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index a4b26f8ae..ffd68acbe 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2716" + #define SD2_REVISION_NR "2717" #endif // __SD2_REVISION_NR_H__ From aa93c8f886b83b1f7d1dce4ba8b01d442b318c50 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Thu, 20 Sep 2012 22:32:15 +0300 Subject: [PATCH 0711/1172] [2718] Implement missing abilities for The Lurker Below - SSC --- .../serpent_shrine/boss_the_lurker_below.cpp | 204 +++++++++++++++--- sd2_revision_nr.h | 2 +- sql/scriptdev2_script_full.sql | 4 +- sql/updates/r2718_scriptdev2.sql | 3 + 4 files changed, 185 insertions(+), 28 deletions(-) create mode 100644 sql/updates/r2718_scriptdev2.sql diff --git a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_the_lurker_below.cpp b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_the_lurker_below.cpp index ef8fc4afd..6ec36a610 100644 --- a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_the_lurker_below.cpp +++ b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_the_lurker_below.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: boss_the_lurker_below -SD%Complete: 5 -SDComment: Timers from ACID, only placeholder quality, Spout unused, submerge phase missing +SD%Complete: 90 +SDComment: Spawn animation NYI; Timers may need adjustments. SDCategory: Coilfang Resevoir, Serpent Shrine Cavern EndScriptData */ @@ -26,11 +26,21 @@ EndScriptData */ enum { + EMOTE_DEEP_BREATH = -1548056, + SPELL_LURKER_SPAWN_TRIGGER = 54587, - SPELL_WHIRL = 37363, + SPELL_WHIRL = 37660, SPELL_GEYSER = 37478, - SPELL_SPOUT = 37433, // TODO should sweep the room 360degrees, related spells 37429 37430 37431 - SPELL_WATERBOLT = 37138, // TODO is used when no enemy in melee range (unknown if on random or top-most aggro holder in this case + SPELL_SPOUT = 37431, // trigger spells 37429, 37430 + SPELL_SPOUT_LEFT = 37429, + SPELL_SPOUT_RIGHT = 37430, + SPELL_WATERBOLT = 37138, + SPELL_SUBMERGE = 37550, + + NPC_COILFANG_AMBUSHER = 21865, + NPC_COILFANG_GUARDIAN = 21873, + + MAX_SUBMERGE_ADDS = 9, }; enum Phases @@ -41,10 +51,29 @@ enum Phases PHASE_SUBMERGED = 3, }; -// TODO This boss should infact be a Scripted_NoMovementAI, but selecting only melee targets is not supported yet, change when implemented -struct MANGOS_DLL_DECL boss_the_lurker_belowAI : public ScriptedAI +struct AddsLocations +{ + uint32 uiEntry; + float fX, fY, fZ; +}; + +// Coords are guesswork +static const AddsLocations aLurkerLoc[MAX_SUBMERGE_ADDS]= { - boss_the_lurker_belowAI(Creature* pCreature) : ScriptedAI(pCreature) + {NPC_COILFANG_AMBUSHER, 2.855f, -459.823f, -19.18f}, + {NPC_COILFANG_AMBUSHER, 12.458f, -466.042f, -19.18f}, + {NPC_COILFANG_AMBUSHER, 51.366f, -460.836f, -19.18f}, + {NPC_COILFANG_AMBUSHER, 62.597f, -457.433f, -19.18f}, + {NPC_COILFANG_AMBUSHER, 77.607f, -384.302f, -19.18f}, + {NPC_COILFANG_AMBUSHER, 63.897f, -378.984f, -19.18f}, + {NPC_COILFANG_GUARDIAN, 34.447f, -387.333f, -19.18f}, + {NPC_COILFANG_GUARDIAN, 14.388f, -423.468f, -19.62f}, + {NPC_COILFANG_GUARDIAN, 42.471f, -445.115f, -19.76f}, +}; + +struct MANGOS_DLL_DECL boss_the_lurker_belowAI : public Scripted_NoMovementAI +{ + boss_the_lurker_belowAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); Reset(); @@ -53,22 +82,28 @@ struct MANGOS_DLL_DECL boss_the_lurker_belowAI : public ScriptedAI ScriptedInstance* m_pInstance; Phases m_uiPhase; + uint32 m_uiPhaseChangeTimer; uint32 m_uiWhirlTimer; uint32 m_uiGeyserTimer; + uint32 m_uiSpoutTimer; + uint32 m_uiSpoutEndTimer; void Reset() { - m_uiPhase = PHASE_NORMAL; + m_uiPhase = PHASE_NORMAL; + m_uiPhaseChangeTimer= 90000; - m_uiWhirlTimer = 19500; - m_uiGeyserTimer = 49700; + m_uiWhirlTimer = 18000; + m_uiGeyserTimer = 50000; + m_uiSpoutTimer = 42000; + m_uiSpoutEndTimer = 23000; } void JustReachedHome() { if (m_pInstance) - m_pInstance->SetData(TYPE_THELURKER_EVENT, NOT_STARTED); + m_pInstance->SetData(TYPE_THELURKER_EVENT, FAIL); m_creature->ForcedDespawn(); } @@ -79,34 +114,151 @@ struct MANGOS_DLL_DECL boss_the_lurker_belowAI : public ScriptedAI m_pInstance->SetData(TYPE_THELURKER_EVENT, DONE); } + void JustSummoned(Creature* pSummoned) + { + // Allow the adds to attack + pSummoned->SetInCombatWithZone(); + } + + // Wrapper to summon adds in phase 2 + void DoSummonCoilfangNaga() + { + for (uint8 i = 0; i < MAX_SUBMERGE_ADDS; ++i) + m_creature->SummonCreature(aLurkerLoc[i].uiEntry, aLurkerLoc[i].fX, aLurkerLoc[i].fY, aLurkerLoc[i].fZ, 0, TEMPSUMMON_DEAD_DESPAWN, 0); + } + + // Custom threat management + bool SelectHostileTarget() + { + Unit* pTarget = NULL; + Unit* pOldTarget = m_creature->getVictim(); + + if (!m_creature->getThreatManager().isThreatListEmpty()) + pTarget = m_creature->getThreatManager().getHostileTarget(); + + if (pTarget) + { + if (pOldTarget != pTarget && m_uiPhase != PHASE_SPOUT) + AttackStart(pTarget); + + // Set victim to old target (if not while Spout) + if (pOldTarget && pOldTarget->isAlive() && m_uiPhase != PHASE_SPOUT) + { + m_creature->SetTargetGuid(pOldTarget->GetObjectGuid()); + m_creature->SetInFront(pOldTarget); + } + + return true; + } + + // Will call EnterEvadeMode if fit + return m_creature->SelectHostileTarget(); + } + void UpdateAI(const uint32 uiDiff) { - // Return since we have no target - // Unclear if we will use this selecting for spout-alike situations - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + if (!SelectHostileTarget()) return; switch (m_uiPhase) { + case PHASE_SPOUT: + + if (m_uiSpoutEndTimer < uiDiff) + { + // Remove rotation auras + m_creature->RemoveAurasDueToSpell(SPELL_SPOUT_LEFT); + m_creature->RemoveAurasDueToSpell(SPELL_SPOUT_RIGHT); + + m_uiPhase = PHASE_NORMAL; + m_uiSpoutEndTimer = 23000; + } + else + m_uiSpoutEndTimer -= uiDiff; + + // no break; case PHASE_NORMAL: - if (m_uiWhirlTimer < uiDiff) + + // Count the first phase during Spout too + if (m_uiPhaseChangeTimer < uiDiff) { - if (DoCastSpellIfCan(m_creature, SPELL_WHIRL) == CAST_OK) - m_uiWhirlTimer = urand(15000, 30000); + if (DoCastSpellIfCan(m_creature, SPELL_SUBMERGE) == CAST_OK) + { + DoSummonCoilfangNaga(); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + m_uiPhase = PHASE_SUBMERGED; + m_uiPhaseChangeTimer = MINUTE*IN_MILLISECONDS; + } } else - m_uiWhirlTimer -= uiDiff; + m_uiPhaseChangeTimer -= uiDiff; + + // Combat spells are only in normal phase + if (m_uiPhase == PHASE_NORMAL) + { + if (m_uiSpoutTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_SPOUT) == CAST_OK) + { + DoScriptText(EMOTE_DEEP_BREATH, m_creature); + + // Remove the target focus but allow the boss to face the current victim + m_creature->SetTargetGuid(ObjectGuid()); + m_creature->SetFacingToObject(m_creature->getVictim()); + + m_uiPhase = PHASE_SPOUT; + m_uiSpoutTimer = 30000; + } + } + else + m_uiSpoutTimer -= uiDiff; + + if (m_uiWhirlTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_WHIRL) == CAST_OK) + m_uiWhirlTimer = 18000; + } + else + m_uiWhirlTimer -= uiDiff; + + if (m_uiGeyserTimer < uiDiff) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, SPELL_GEYSER) == CAST_OK) + m_uiGeyserTimer = urand(50000, 60000); + } + } + else + m_uiGeyserTimer -= uiDiff; + + // If we are within range melee the target + if (m_creature->CanReachWithMeleeAttack(m_creature->getVictim())) + DoMeleeAttackIfReady(); + // Spam Waterbolt spell when not tanked + else + { + if (!m_creature->IsNonMeleeSpellCasted(false)) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + DoCastSpellIfCan(pTarget, SPELL_WATERBOLT); + } + } + } + + break; + case PHASE_SUBMERGED: - if (m_uiGeyserTimer < uiDiff) + if (m_uiPhaseChangeTimer < uiDiff) { - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) - if (DoCastSpellIfCan(pTarget, SPELL_GEYSER) == CAST_OK) - m_uiGeyserTimer = urand(49700, 60000); + m_uiPhase = PHASE_NORMAL; + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + m_creature->RemoveAurasDueToSpell(SPELL_SUBMERGE); + m_uiPhaseChangeTimer = 2*MINUTE*IN_MILLISECONDS; } else - m_uiGeyserTimer -= uiDiff; + m_uiPhaseChangeTimer -= uiDiff; - DoMeleeAttackIfReady(); break; } } @@ -125,7 +277,7 @@ bool GOUse_go_strange_pool(Player* pPlayer, GameObject* pGo) { if (ScriptedInstance* pInstance = (ScriptedInstance*)pGo->GetInstanceData()) { - if (pInstance->GetData(TYPE_THELURKER_EVENT) == NOT_STARTED) + if (pInstance->GetData(TYPE_THELURKER_EVENT) == NOT_STARTED || pInstance->GetData(TYPE_THELURKER_EVENT) == FAIL) { pPlayer->CastSpell(pPlayer, SPELL_LURKER_SPAWN_TRIGGER, true); pInstance->SetData(TYPE_THELURKER_EVENT, IN_PROGRESS); diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index ffd68acbe..cd52c68f6 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2717" + #define SD2_REVISION_NR "2718" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 0298d1eab..6feb3650b 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -2130,7 +2130,9 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1548052,'Your time ends now!',11541,1,0,0,'vashj SAY_SLAY1'), (-1548053,'You have failed!',11542,1,0,0,'vashj SAY_SLAY2'), (-1548054,'Be\'lamere an\'delay',11543,1,0,0,'vashj SAY_SLAY3'), -(-1548055,'Lord Illidan, I... I am... sorry.',11544,1,0,0,'vashj SAY_DEATH'); +(-1548055,'Lord Illidan, I... I am... sorry.',11544,1,0,0,'vashj SAY_DEATH'), + +(-1548056,'%s takes a deep breath!',0,3,0,0,'lurker below EMOTE_DEEP_BREATH'); -- -1 550 000 THE EYE INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES diff --git a/sql/updates/r2718_scriptdev2.sql b/sql/updates/r2718_scriptdev2.sql new file mode 100644 index 000000000..d8822639d --- /dev/null +++ b/sql/updates/r2718_scriptdev2.sql @@ -0,0 +1,3 @@ +DELETE FROM script_texts WHERE entry=-1548056; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1548056,'%s takes a deep breath!',0,3,0,0,'lurker below EMOTE_DEEP_BREATH'); From c17d5234035a6afadb664b2456480079ba8adb9b Mon Sep 17 00:00:00 2001 From: Xfurry Date: Thu, 20 Sep 2012 22:49:57 +0300 Subject: [PATCH 0712/1172] [2719] Fix some out of melee range spam spells. Thanks Schmoozerd for pointing. --- .../caverns_of_time/hyjal/boss_archimonde.cpp | 18 +++-------------- .../kalimdor/temple_of_ahnqiraj/boss_ouro.cpp | 20 +++---------------- .../temple_of_ahnqiraj/boss_skeram.cpp | 20 ++++--------------- sd2_revision_nr.h | 2 +- 4 files changed, 11 insertions(+), 49 deletions(-) diff --git a/scripts/kalimdor/caverns_of_time/hyjal/boss_archimonde.cpp b/scripts/kalimdor/caverns_of_time/hyjal/boss_archimonde.cpp index 35a9ea0f7..85c83904d 100644 --- a/scripts/kalimdor/caverns_of_time/hyjal/boss_archimonde.cpp +++ b/scripts/kalimdor/caverns_of_time/hyjal/boss_archimonde.cpp @@ -328,27 +328,15 @@ struct MANGOS_DLL_DECL boss_archimondeAI : public ScriptedAI // If we are within range melee the target if (m_creature->CanReachWithMeleeAttack(m_creature->getVictim())) - { - //Make sure our attack is ready and we arn't currently casting - if (m_creature->isAttackReady() && !m_creature->IsNonMeleeSpellCasted(false)) - { - m_creature->AttackerStateUpdate(m_creature->getVictim()); - m_creature->resetAttackTimer(); - } - } + DoMeleeAttackIfReady(); // Else spam Finger of Death else { - if (m_uiFingerOfDeathTimer < uiDiff) + if (!m_creature->IsNonMeleeSpellCasted(false)) { if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) - { - if (DoCastSpellIfCan(pTarget, SPELL_FINGER_DEATH) == CAST_OK) - m_uiFingerOfDeathTimer = 5000; - } + DoCastSpellIfCan(pTarget, SPELL_FINGER_DEATH); } - else - m_uiFingerOfDeathTimer -= uiDiff; } } }; diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_ouro.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_ouro.cpp index b7e7065eb..8b462d96d 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/boss_ouro.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_ouro.cpp @@ -77,7 +77,6 @@ struct MANGOS_DLL_DECL boss_ouroAI : public Scripted_NoMovementAI uint32 m_uiSubmergeTimer; uint32 m_uiSummonBaseTimer; - uint32 m_uiBoulderTimer; uint32 m_uiSummonMoundTimer; bool m_bEnraged; @@ -92,7 +91,6 @@ struct MANGOS_DLL_DECL boss_ouroAI : public Scripted_NoMovementAI m_uiSubmergeTimer = 90000; m_uiSummonBaseTimer = 2000; - m_uiBoulderTimer = urand(1000, 2000); m_uiSummonMoundTimer = 10000; m_bEnraged = false; @@ -214,27 +212,15 @@ struct MANGOS_DLL_DECL boss_ouroAI : public Scripted_NoMovementAI // If we are within range melee the target if (m_creature->CanReachWithMeleeAttack(m_creature->getVictim())) - { - //Make sure our attack is ready and we arn't currently casting - if (m_creature->isAttackReady() && !m_creature->IsNonMeleeSpellCasted(false)) - { - m_creature->AttackerStateUpdate(m_creature->getVictim()); - m_creature->resetAttackTimer(); - } - } + DoMeleeAttackIfReady(); // Spam Boulder spell when enraged and not tanked else if (m_bEnraged) { - if (m_uiBoulderTimer < uiDiff) + if (!m_creature->IsNonMeleeSpellCasted(false)) { if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) - { - if (DoCastSpellIfCan(pTarget, SPELL_BOULDER) == CAST_OK) - m_uiBoulderTimer = urand(2000, 3000); - } + DoCastSpellIfCan(pTarget, SPELL_BOULDER); } - else - m_uiBoulderTimer -= uiDiff; } } else diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_skeram.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_skeram.cpp index 939d54d8f..ffa4f8c8a 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/boss_skeram.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_skeram.cpp @@ -62,7 +62,6 @@ struct MANGOS_DLL_DECL boss_skeramAI : public ScriptedAI ScriptedInstance* m_pInstance; uint32 m_uiArcaneExplosionTimer; - uint32 m_uiEarthShockTimer; uint32 m_uiFullFillmentTimer; uint32 m_uiBlinkTimer; @@ -73,7 +72,6 @@ struct MANGOS_DLL_DECL boss_skeramAI : public ScriptedAI void Reset() { m_uiArcaneExplosionTimer = urand(6000, 12000); - m_uiEarthShockTimer = 2000; m_uiFullFillmentTimer = 15000; m_uiBlinkTimer = urand(30000, 45000); @@ -227,24 +225,14 @@ struct MANGOS_DLL_DECL boss_skeramAI : public ScriptedAI // If we are within range melee the target if (m_creature->CanReachWithMeleeAttack(m_creature->getVictim())) - { - //Make sure our attack is ready and we arn't currently casting - if (m_creature->isAttackReady() && !m_creature->IsNonMeleeSpellCasted(false)) - { - m_creature->AttackerStateUpdate(m_creature->getVictim()); - m_creature->resetAttackTimer(); - } - } + DoMeleeAttackIfReady(); else { - // EarthShock_Timer - if (m_uiEarthShockTimer < uiDiff) + if (!m_creature->IsNonMeleeSpellCasted(false)) { - if (DoCastSpellIfCan(m_creature, SPELL_EARTH_SHOCK) == CAST_OK) - m_uiEarthShockTimer = 1000; + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + DoCastSpellIfCan(pTarget, SPELL_EARTH_SHOCK); } - else - m_uiEarthShockTimer -= uiDiff; } } }; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index cd52c68f6..05f57bc0d 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2718" + #define SD2_REVISION_NR "2719" #endif // __SD2_REVISION_NR_H__ From cf17b53d102a28b4645f299c2b4a132464ee829a Mon Sep 17 00:00:00 2001 From: Xfurry Date: Thu, 20 Sep 2012 23:53:09 +0300 Subject: [PATCH 0713/1172] [2720] Drop script for npc 23598 - already included in latest ACID --- .../eastern_kingdoms/zulaman/boss_janalai.cpp | 44 ------------------- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 - sql/updates/r2720_mangos.sql | 1 + 4 files changed, 2 insertions(+), 46 deletions(-) create mode 100644 sql/updates/r2720_mangos.sql diff --git a/scripts/eastern_kingdoms/zulaman/boss_janalai.cpp b/scripts/eastern_kingdoms/zulaman/boss_janalai.cpp index 797607486..1ded76f68 100644 --- a/scripts/eastern_kingdoms/zulaman/boss_janalai.cpp +++ b/scripts/eastern_kingdoms/zulaman/boss_janalai.cpp @@ -69,9 +69,6 @@ enum // Eggs spells SPELL_SUMMON_DRAGONHAWK = 42493, - //Hatchling Spells - SPELL_FLAMEBUFFED = 43299, - MAX_EGGS_ON_SIDE = 20, // there are 20 eggs spawned on each side }; @@ -520,42 +517,6 @@ CreatureAI* GetAI_npc_janalai_firebombAI(Creature* pCreature) return new npc_janalai_firebombAI(pCreature); } -// ToDo: move to eventAI -struct MANGOS_DLL_DECL npc_hatchlingAI : public ScriptedAI -{ - npc_hatchlingAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } - - uint32 m_uiBufferTimer; - - void Reset() - { - m_uiBufferTimer = 7000; - } - - void UpdateAI(const uint32 uiDiff) - { - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - if (m_uiBufferTimer < uiDiff) - { - if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) - DoCastSpellIfCan(target, SPELL_FLAMEBUFFED); - - m_uiBufferTimer = 7000; - } - else - m_uiBufferTimer -= uiDiff; - - DoMeleeAttackIfReady(); - } -}; - -CreatureAI* GetAI_npc_hatchlingAI(Creature* pCreature) -{ - return new npc_hatchlingAI(pCreature); -} - void AddSC_boss_janalai() { Script* pNewScript; @@ -579,9 +540,4 @@ void AddSC_boss_janalai() pNewScript->Name = "npc_amanishi_hatcher"; pNewScript->GetAI = &GetAI_npc_amanishi_hatcherAI; pNewScript->RegisterSelf(); - - pNewScript = new Script; - pNewScript->Name = "npc_hatchling"; - pNewScript->GetAI = &GetAI_npc_hatchlingAI; - pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 05f57bc0d..565fd21c7 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2719" + #define SD2_REVISION_NR "2720" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index ab50f329f..4304d88d1 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -1298,7 +1298,6 @@ UPDATE creature_template SET ScriptName='boss_zuljin' WHERE entry=23863; UPDATE creature_template SET ScriptName='npc_dragonhawk_egg' WHERE entry=23817; UPDATE creature_template SET ScriptName='npc_janalai_firebomb' WHERE entry=23920; UPDATE creature_template SET ScriptName='npc_amanishi_hatcher' WHERE entry IN (23818,24504); -UPDATE creature_template SET ScriptName='npc_hatchling' WHERE entry=23598; UPDATE creature_template SET ScriptName='npc_forest_frog' WHERE entry=24396; /* ZUL'DRAK */ diff --git a/sql/updates/r2720_mangos.sql b/sql/updates/r2720_mangos.sql new file mode 100644 index 000000000..c9314865b --- /dev/null +++ b/sql/updates/r2720_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='' WHERE entry=23598; From bec773f34bd6ce9c9193bbcccb93c6111a03fc24 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sat, 22 Sep 2012 00:32:07 +0300 Subject: [PATCH 0714/1172] [2721] Cleanup and improve script for Morogrim Tidewalker - SSC --- .../boss_morogrim_tidewalker.cpp | 227 ++++++++---------- sd2_revision_nr.h | 2 +- sql/scriptdev2_script_full.sql | 4 +- sql/updates/r2721_scriptdev2.sql | 1 + 4 files changed, 106 insertions(+), 128 deletions(-) create mode 100644 sql/updates/r2721_scriptdev2.sql diff --git a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_morogrim_tidewalker.cpp b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_morogrim_tidewalker.cpp index 582dea808..fedb88009 100644 --- a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_morogrim_tidewalker.cpp +++ b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_morogrim_tidewalker.cpp @@ -17,7 +17,7 @@ /* ScriptData SDName: Boss_Morogrim_Tidewalker SD%Complete: 90 -SDComment: +SDComment: Water Globule script is not complete - requires additional research. SDCategory: Coilfang Resevoir, Serpent Shrine Cavern EndScriptData */ @@ -39,13 +39,11 @@ enum EMOTE_EARTHQUAKE = -1548040, EMOTE_WATERY_GLOBULES = -1548041, + SPELL_DOUBLE_ATTACK = 18943, SPELL_TIDAL_WAVE = 37730, SPELL_EARTHQUAKE = 37764, - - SPELL_WATERY_GRAVE_1 = 37850, - SPELL_WATERY_GRAVE_2 = 38023, - SPELL_WATERY_GRAVE_3 = 38024, - SPELL_WATERY_GRAVE_4 = 38025, + SPELL_WATERY_GRAVE = 38028, + //SPELL_WATERY_GRAVE_EXPLOSION = 38049, // spell purpose unk SPELL_SUMMON_MURLOC_A6 = 39813, SPELL_SUMMON_MURLOC_A7 = 39814, @@ -64,11 +62,14 @@ enum SPELL_SUMMON_GLOBULE_3 = 37860, SPELL_SUMMON_GLOBULE_4 = 37861, + SPELL_WATER_GLOBULE_NEW_TARGET = 39848, // spell requires additional research and probably core or script support + NPC_WATER_GLOBULE = 21913, NPC_TIDEWALKER_LURKER = 21920 }; -//Morogrim Tidewalker AI +static const uint32 m_auiSpellWateryGraveTeleport[] = { 37850, 38023, 38024, 38025 }; + struct MANGOS_DLL_DECL boss_morogrim_tidewalkerAI : public ScriptedAI { boss_morogrim_tidewalkerAI(Creature* pCreature) : ScriptedAI(pCreature) @@ -77,29 +78,27 @@ struct MANGOS_DLL_DECL boss_morogrim_tidewalkerAI : public ScriptedAI Reset(); } - ScriptedInstance* m_pInstance; // the instance + ScriptedInstance* m_pInstance; - // timers - uint32 m_uiTidalWave_Timer; - uint32 m_uiWateryGrave_Timer; - uint32 m_uiEarthquake_Timer; - uint32 m_uiWateryGlobules_Timer; + uint32 m_uiTidalWaveTimer; + uint32 m_uiWateryGraveTimer; + uint32 m_uiEarthquakeTimer; + uint32 m_uiWateryGlobulesTimer; + uint8 m_uiGraveIndex; - bool m_bEarthquake; - bool m_bPhase2; + bool m_bIsPhase2; void Reset() { - m_uiTidalWave_Timer = 10000; - m_uiWateryGrave_Timer = 30000; - m_uiEarthquake_Timer = 40000; - m_uiWateryGlobules_Timer = 0; + m_uiTidalWaveTimer = 10000; + m_uiWateryGraveTimer = 30000; + m_uiEarthquakeTimer = 40000; + m_uiWateryGlobulesTimer = 0; + m_uiGraveIndex = 0; - m_bEarthquake = false; - m_bPhase2 = false; + m_bIsPhase2 = false; - if (m_pInstance) - m_pInstance->SetData(TYPE_MOROGRIM_EVENT, NOT_STARTED); + DoCastSpellIfCan(m_creature, SPELL_DOUBLE_ATTACK); } void Aggro(Unit* pWho) @@ -128,6 +127,12 @@ struct MANGOS_DLL_DECL boss_morogrim_tidewalkerAI : public ScriptedAI m_pInstance->SetData(TYPE_MOROGRIM_EVENT, DONE); } + void JustReachedHome() + { + if (m_pInstance) + m_pInstance->SetData(TYPE_MOROGRIM_EVENT, FAIL); + } + void JustSummoned(Creature* pSummoned) { if (pSummoned->GetEntry() == NPC_TIDEWALKER_LURKER) @@ -135,160 +140,131 @@ struct MANGOS_DLL_DECL boss_morogrim_tidewalkerAI : public ScriptedAI if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) pSummoned->AI()->AttackStart(pTarget); } - - if (pSummoned->GetEntry() == NPC_WATER_GLOBULE) + else if (pSummoned->GetEntry() == NPC_WATER_GLOBULE) { if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) pSummoned->GetMotionMaster()->MoveFollow(pTarget, 0.0f, 0.0f); } } + void SpellHitTarget(Unit* pTarget, const SpellEntry* pSpell) + { + // Handle watery grave teleport - each player hit has his own teleport spell + if (pSpell->Id == SPELL_WATERY_GRAVE && pTarget->GetTypeId() == TYPEID_PLAYER) + { + DoCastSpellIfCan(pTarget, m_auiSpellWateryGraveTeleport[m_uiGraveIndex], CAST_TRIGGERED); + ++m_uiGraveIndex; + } + } + void UpdateAI(const uint32 uiDiff) { - //Return since we have no target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - //m_uiEarthquake_Timer - if (m_uiEarthquake_Timer < uiDiff) + if (m_uiEarthquakeTimer < uiDiff) { - if (!m_bEarthquake) - { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_EARTHQUAKE); - m_bEarthquake = true; - m_uiEarthquake_Timer = 5000; - } - else + if (DoCastSpellIfCan(m_creature, SPELL_EARTHQUAKE) == CAST_OK) { - DoScriptText(urand(0,1) ? SAY_SUMMON1 : SAY_SUMMON2, m_creature); - - //north - m_creature->CastSpell(m_creature,SPELL_SUMMON_MURLOC_A6,true); - m_creature->CastSpell(m_creature,SPELL_SUMMON_MURLOC_A7,true); - m_creature->CastSpell(m_creature,SPELL_SUMMON_MURLOC_A8,true); - m_creature->CastSpell(m_creature,SPELL_SUMMON_MURLOC_A9,true); - m_creature->CastSpell(m_creature,SPELL_SUMMON_MURLOC_A10,true); - - //south - m_creature->CastSpell(m_creature,SPELL_SUMMON_MURLOC_B6,true); - m_creature->CastSpell(m_creature,SPELL_SUMMON_MURLOC_B7,true); - m_creature->CastSpell(m_creature,SPELL_SUMMON_MURLOC_B8,true); - m_creature->CastSpell(m_creature,SPELL_SUMMON_MURLOC_B9,true); - m_creature->CastSpell(m_creature,SPELL_SUMMON_MURLOC_B10,true); - DoScriptText(EMOTE_EARTHQUAKE, m_creature); - - m_bEarthquake = false; - m_uiEarthquake_Timer = urand(40000, 45000); + DoScriptText(urand(0, 1) ? SAY_SUMMON1 : SAY_SUMMON2, m_creature); + + // summon murlocs - north + DoCastSpellIfCan(m_creature, SPELL_SUMMON_MURLOC_A6, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_SUMMON_MURLOC_A7, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_SUMMON_MURLOC_A8, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_SUMMON_MURLOC_A9, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_SUMMON_MURLOC_A10, CAST_TRIGGERED); + + // summon murlocs - south + DoCastSpellIfCan(m_creature, SPELL_SUMMON_MURLOC_B6, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_SUMMON_MURLOC_B7, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_SUMMON_MURLOC_B8, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_SUMMON_MURLOC_B9, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_SUMMON_MURLOC_B10, CAST_TRIGGERED); + + m_uiEarthquakeTimer = 50000; } - }else m_uiEarthquake_Timer -= uiDiff; + } + else + m_uiEarthquakeTimer -= uiDiff; - //m_uiTidalWave_Timer - if (m_uiTidalWave_Timer < uiDiff) + if (m_uiTidalWaveTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_TIDAL_WAVE); - m_uiTidalWave_Timer = 20000; - }else m_uiTidalWave_Timer -= uiDiff; + if (DoCastSpellIfCan(m_creature, SPELL_TIDAL_WAVE) == CAST_OK) + m_uiTidalWaveTimer = urand(20000, 25000); + } + else + m_uiTidalWaveTimer -= uiDiff; - if (!m_bPhase2) + // Phase one specific spells + if (!m_bIsPhase2) { - //m_uiWateryGrave_Timer - if (m_uiWateryGrave_Timer < uiDiff) + if (m_uiWateryGraveTimer < uiDiff) { - //Teleport 4 players under the waterfalls - for (uint8 i = 0; i < 4; ++i) + if (DoCastSpellIfCan(m_creature, SPELL_WATERY_GRAVE) == CAST_OK) { - Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1, SPELL_WATERY_GRAVE_1, SELECT_FLAG_PLAYER); - - if (pTarget && !pTarget->HasAuraType(SPELL_AURA_MOD_STUN)) - { - switch(i) - { - case 0: pTarget->CastSpell(pTarget,SPELL_WATERY_GRAVE_1,false); break; - case 1: pTarget->CastSpell(pTarget,SPELL_WATERY_GRAVE_2,false); break; - case 2: pTarget->CastSpell(pTarget,SPELL_WATERY_GRAVE_3,false); break; - case 3: pTarget->CastSpell(pTarget,SPELL_WATERY_GRAVE_4,false); break; - } - } + DoScriptText(EMOTE_WATERY_GRAVE, m_creature); + m_uiWateryGraveTimer = 30000; + m_uiGraveIndex = 0; } + } + else + m_uiWateryGraveTimer -= uiDiff; - DoScriptText(urand(0,1) ? SAY_SUMMON_BUBL1 : SAY_SUMMON_BUBL2, m_creature); - DoScriptText(EMOTE_WATERY_GRAVE, m_creature); - - m_uiWateryGrave_Timer = 30000; - }else m_uiWateryGrave_Timer -= uiDiff; - - //Start Phase2 + // Start Phase2 below 25% hp if (m_creature->GetHealthPercent() < 25.0f) - m_bPhase2 = true; + m_bIsPhase2 = true; } else { - //m_uiWateryGlobules_Timer - if (m_uiWateryGlobules_Timer < uiDiff) + if (m_uiWateryGlobulesTimer < uiDiff) { - DoScriptText(EMOTE_WATERY_GLOBULES, m_creature); + if (DoCastSpellIfCan(m_creature, SPELL_SUMMON_GLOBULE_1) == CAST_OK) + { + DoScriptText(EMOTE_WATERY_GLOBULES, m_creature); + DoScriptText(urand(0, 1) ? SAY_SUMMON_BUBL1 : SAY_SUMMON_BUBL2, m_creature); - m_creature->CastSpell(m_creature,SPELL_SUMMON_GLOBULE_1,true); - m_creature->CastSpell(m_creature,SPELL_SUMMON_GLOBULE_2,true); - m_creature->CastSpell(m_creature,SPELL_SUMMON_GLOBULE_3,true); - m_creature->CastSpell(m_creature,SPELL_SUMMON_GLOBULE_4,false); + DoCastSpellIfCan(m_creature,SPELL_SUMMON_GLOBULE_2, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature,SPELL_SUMMON_GLOBULE_3, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature,SPELL_SUMMON_GLOBULE_4, CAST_TRIGGERED); - m_uiWateryGlobules_Timer = 25000; - }else m_uiWateryGlobules_Timer -= uiDiff; + m_uiWateryGlobulesTimer = 25000; + } + } + else + m_uiWateryGlobulesTimer -= uiDiff; } DoMeleeAttackIfReady(); } }; -//Water Globule AI struct MANGOS_DLL_DECL mob_water_globuleAI : public ScriptedAI { mob_water_globuleAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } - // timers - uint32 m_uiCheck_Timer; + uint32 m_uiTargetTimer; void Reset() { - m_uiCheck_Timer = 1000; - m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + m_uiTargetTimer = 10000; } void MoveInLineOfSight(Unit* pWho) { - if (!pWho || m_creature->getVictim()) - return; - - if (pWho->isTargetableForAttack() && pWho->isInAccessablePlaceFor(m_creature) && m_creature->IsHostileTo(pWho)) - { - //no attack radius check - it attacks the first target that moves in his los - pWho->RemoveSpellsCausingAura(SPELL_AURA_MOD_STEALTH); - AttackStart(pWho); - } + // ToDo: cast damage spell here, after proper checks are done } void UpdateAI(const uint32 uiDiff) { - //Return since we have no target - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - if (m_uiCheck_Timer < uiDiff) + if (m_uiTargetTimer < uiDiff) { - if (m_creature->CanReachWithMeleeAttack(m_creature->getVictim())) - { - m_creature->DealDamage(m_creature->getVictim(), 4000+rand()%2000, NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_FROST, NULL, false); - - //despawn - m_creature->ForcedDespawn(); - return; - } - m_uiCheck_Timer = 500; - }else m_uiCheck_Timer -= uiDiff; - - //do NOT deal any melee damage to the target. + if (DoCastSpellIfCan(m_creature, SPELL_WATER_GLOBULE_NEW_TARGET) == CAST_OK) + m_uiTargetTimer = 10000; + } + else + m_uiTargetTimer -= uiDiff; } }; @@ -296,6 +272,7 @@ CreatureAI* GetAI_boss_morogrim_tidewalker(Creature* pCreature) { return new boss_morogrim_tidewalkerAI (pCreature); } + CreatureAI* GetAI_mob_water_globule(Creature* pCreature) { return new mob_water_globuleAI (pCreature); diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 565fd21c7..c90c8b9f5 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2720" + #define SD2_REVISION_NR "2721" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 6feb3650b..30c7d7a80 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -2113,9 +2113,9 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1548036,'Strugging only makes it worse.',11327,1,0,0,'morogrim SAY_SLAY2'), (-1548037,'Only the strong survive.',11328,1,0,0,'morogrim SAY_SLAY3'), (-1548038,'Great... currents of... Ageon.',11329,1,0,0,'morogrim SAY_DEATH'), -(-1548039,'%s sends his enemies to their watery graves!',0,2,0,0,'morogrim EMOTE_WATERY_GRAVE'), +(-1548039,'%s sends his enemies to their watery graves!',0,3,0,0,'morogrim EMOTE_WATERY_GRAVE'), (-1548040,'The violent earthquake has alerted nearby murlocs!',0,3,0,0,'morogrim EMOTE_EARTHQUAKE'), -(-1548041,'%s summons Watery Globules!',0,2,0,0,'morogrim EMOTE_WATERY_GLOBULES'), +(-1548041,'%s summons Watery Globules!',0,3,0,0,'morogrim EMOTE_WATERY_GLOBULES'), (-1548042,'Water is life. It has become a rare commodity here in Outland. A commodity that we alone shall control. We are the Highborne, and the time has come at last for us to retake our rightful place in the world!',11531,1,0,0,'vashj SAY_INTRO'), (-1548043,'I\'ll split you from stem to stern!',11532,1,0,0,'vashj SAY_AGGRO1'), diff --git a/sql/updates/r2721_scriptdev2.sql b/sql/updates/r2721_scriptdev2.sql new file mode 100644 index 000000000..cb49c6ef0 --- /dev/null +++ b/sql/updates/r2721_scriptdev2.sql @@ -0,0 +1 @@ +UPDATE script_texts SET type=3 WHERE entry IN (-1548039, -1548041); From 86ee965c375a771bacd69b6aa64e29ddb1baeab5 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sat, 22 Sep 2012 02:42:02 +0300 Subject: [PATCH 0715/1172] [2722] Implement basic script for Coren Direbrew - Brewfest event --- .../blackrock_depths/boss_coren_direbrew.cpp | 157 +++++++++++++++++- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 + sql/scriptdev2_script_full.sql | 4 +- sql/updates/r2722_mangos.sql | 1 + sql/updates/r2722_scriptdev2.sql | 3 + 6 files changed, 164 insertions(+), 4 deletions(-) create mode 100644 sql/updates/r2722_mangos.sql create mode 100644 sql/updates/r2722_scriptdev2.sql diff --git a/scripts/eastern_kingdoms/blackrock_depths/boss_coren_direbrew.cpp b/scripts/eastern_kingdoms/blackrock_depths/boss_coren_direbrew.cpp index c7aaf79fb..257a105ea 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/boss_coren_direbrew.cpp +++ b/scripts/eastern_kingdoms/blackrock_depths/boss_coren_direbrew.cpp @@ -16,13 +16,166 @@ /* ScriptData SDName: boss_coren_direbrew -SD%Complete: 0 -SDComment: Placeholder +SD%Complete: 75 +SDComment: Some parts are not complete - requires additional research. Brewmaidens scripts handled in eventAI. SDCategory: Blackrock Depths EndScriptData */ #include "precompiled.h" +enum +{ + SAY_AGGRO = -1230034, + + // spells + SPELL_DIREBREW_DISARM = 47310, + SPELL_SUMMON_DIREBREW_MINION = 47375, + SPELL_DIREBREW_CHARGE = 47718, + SPELL_SUMMON_MOLE_MACHINE = 47691, // triggers 47690 + + // summoned auras + SPELL_PORT_TO_COREN = 52850, + + // other summoned spells - currently not used in script + //SPELL_CHUCK_MUG = 50276, + //SPELL_BARRELED_AURA = 50278, // used by Ursula + //SPELL_HAS_BREW = 47331, // triggers 47344 - aura which asks for the second brew on item expire + //SPELL_SEND_FIRST_MUG = 47333, // triggers 47345 + //SPELL_SEND_SECOND_MUG = 47339, // triggers 47340 - spell triggered by 47344 + //SPELL_BREWMAIDEN_DESPAWN_AURA = 48186, // purpose unk + + // npcs + NPC_DIREBREW_MINION = 26776, + NPC_ILSA_DIREBREW = 26764, + NPC_URSULA_DIREBREW = 26822, + + // other + FACTION_HOSTILE = 736, + + QUEST_INSULT_COREN = 12062, + + MAX_DIREBREW_MINIONS = 3, +}; + +struct MANGOS_DLL_DECL boss_coren_direbrewAI : public ScriptedAI +{ + boss_coren_direbrewAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } + + uint32 m_uiDisarmTimer; + uint32 m_uiChargeTimer; + uint32 m_uiSummonTimer; + uint8 m_uiPhase; + + void Reset() + { + m_uiDisarmTimer = 10000; + m_uiChargeTimer = 5000; + m_uiSummonTimer = 15000; + m_uiPhase = 0; + } + + void Aggro(Unit* pWho) + { + // Spawn 3 minions on aggro + for (uint8 i = 0; i < MAX_DIREBREW_MINIONS; ++i) + DoCastSpellIfCan(m_creature, SPELL_SUMMON_DIREBREW_MINION, CAST_TRIGGERED); + } + + void JustSummoned(Creature* pSummoned) + { + switch (pSummoned->GetEntry()) + { + case NPC_ILSA_DIREBREW: + case NPC_URSULA_DIREBREW: + pSummoned->CastSpell(m_creature, SPELL_PORT_TO_COREN, true); + break; + } + + if (m_creature->getVictim()) + pSummoned->AI()->AttackStart(m_creature->getVictim()); + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + // Spawn Ilsa + if (m_creature->GetHealthPercent() < 66.0f && m_uiPhase == 0) + { + float fX, fY, fZ; + m_creature->GetRandomPoint(m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), 10, fX, fY, fZ); + m_creature->SummonCreature(NPC_ILSA_DIREBREW, fX, fY, fZ, 0, TEMPSUMMON_DEAD_DESPAWN, 0); + m_uiPhase = 1; + } + + // Spawn Ursula + if (m_creature->GetHealthPercent() < 33.0f && m_uiPhase == 1) + { + float fX, fY, fZ; + m_creature->GetRandomPoint(m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), 10, fX, fY, fZ); + m_creature->SummonCreature(NPC_URSULA_DIREBREW, fX, fY, fZ, 0, TEMPSUMMON_DEAD_DESPAWN, 0); + m_uiPhase = 2; + } + + if (m_uiDisarmTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_DIREBREW_DISARM) == CAST_OK) + m_uiDisarmTimer = 15000; + } + else + m_uiDisarmTimer -= uiDiff; + + if (m_uiChargeTimer < uiDiff) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0, SPELL_DIREBREW_CHARGE, SELECT_FLAG_NOT_IN_MELEE_RANGE)) + { + if (DoCastSpellIfCan(pTarget, SPELL_DIREBREW_CHARGE) == CAST_OK) + m_uiChargeTimer = urand(5000, 10000); + } + } + else + m_uiChargeTimer -= uiDiff; + + if (m_uiSummonTimer < uiDiff) + { + for (uint8 i = 0; i < MAX_DIREBREW_MINIONS; ++i) + DoCastSpellIfCan(m_creature, SPELL_SUMMON_DIREBREW_MINION, CAST_TRIGGERED); + + m_uiSummonTimer = 15000; + } + else + m_uiSummonTimer -= uiDiff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_coren_direbrew(Creature* pCreature) +{ + return new boss_coren_direbrewAI(pCreature); +} + +bool QuestRewarded_npc_coren_direbrew(Player* pPlayer, Creature* pCreature, Quest const* pQuest) +{ + if (pQuest->GetQuestId() == QUEST_INSULT_COREN) + { + DoScriptText(SAY_AGGRO, pCreature, pPlayer); + + pCreature->SetFactionTemporary(FACTION_HOSTILE, TEMPFACTION_RESTORE_REACH_HOME | TEMPFACTION_RESTORE_RESPAWN); + pCreature->AI()->AttackStart(pPlayer); + } + + return true; +} + void AddSC_boss_coren_direbrew() { + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_coren_direbrew"; + pNewScript->GetAI = &GetAI_boss_coren_direbrew; + pNewScript->pQuestRewardedNPC = &QuestRewarded_npc_coren_direbrew; + pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index c90c8b9f5..96d0bd73e 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2721" + #define SD2_REVISION_NR "2722" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 4304d88d1..3873fe478 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -330,6 +330,7 @@ UPDATE creature_template SET ScriptName='boss_ambassador_flamelash' WHERE entry= UPDATE creature_template SET ScriptName='boss_doomrel' WHERE entry=9039; UPDATE creature_template SET ScriptName='boss_general_angerforge' WHERE entry=9033; UPDATE creature_template SET ScriptName='boss_high_interrogator_gerstahn' WHERE entry=9018; +UPDATE creature_template SET ScriptName='boss_coren_direbrew' WHERE entry=23872; UPDATE creature_template SET ScriptName='npc_grimstone' WHERE entry=10096; UPDATE creature_template SET ScriptName='npc_theldren_trigger' WHERE entry=16079; UPDATE creature_template SET ScriptName='npc_kharan_mighthammer' WHERE entry=9021; diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 30c7d7a80..6a6b0c2a7 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -1229,7 +1229,9 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1230030,'We made it!',0,0,0,4,'reginald_windsor SAY_FREE_1'), (-1230031,'Meet me at Maxwell\'s encampment. We\'ll go over the next stages of the plan there and figure out a way to decode my tablets without the decryption ring.',0,0,0,1,'reginald_windsor SAY_FREE_2'), (-1230032,'Thank you! I will run for safety immediately!',0,0,0,0,'tobias SAY_TOBIAS_FREE_1'), -(-1230033,'Finally!! I can leave this dump.',0,0,0,0,'tobias SAY_TOBIAS_FREE_2'); +(-1230033,'Finally!! I can leave this dump.',0,0,0,0,'tobias SAY_TOBIAS_FREE_2'), + +(-1230034,'You\'ll pay for this insult, $c!',0,0,0,15,'coren direbrew SAY_AGGRO'); -- -1 249 000 ONYXIA'S LAIR INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES diff --git a/sql/updates/r2722_mangos.sql b/sql/updates/r2722_mangos.sql new file mode 100644 index 000000000..b0d861869 --- /dev/null +++ b/sql/updates/r2722_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='boss_coren_direbrew' WHERE entry=23872; diff --git a/sql/updates/r2722_scriptdev2.sql b/sql/updates/r2722_scriptdev2.sql new file mode 100644 index 000000000..1a336d9c1 --- /dev/null +++ b/sql/updates/r2722_scriptdev2.sql @@ -0,0 +1,3 @@ +DELETE FROM script_texts WHERE entry=-1230034; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1230034,'You\'ll pay for this insult, $c!',0,0,0,15,'coren direbrew SAY_AGGRO'); From 39c32734c8dce524ca3a184544b9267480cd702d Mon Sep 17 00:00:00 2001 From: evil-at-wow Date: Mon, 24 Sep 2012 14:30:03 +0200 Subject: [PATCH 0716/1172] A few small fixes in the text of NPC 9563 (Ragged John) for quest 4224. --- scripts/eastern_kingdoms/burning_steppes.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/eastern_kingdoms/burning_steppes.cpp b/scripts/eastern_kingdoms/burning_steppes.cpp index 2c2e1e83d..da7b1b576 100644 --- a/scripts/eastern_kingdoms/burning_steppes.cpp +++ b/scripts/eastern_kingdoms/burning_steppes.cpp @@ -76,7 +76,7 @@ bool GossipHello_npc_ragged_john(Player* pPlayer, Creature* pCreature) pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); if (pPlayer->GetQuestStatus(4224) == QUEST_STATUS_INCOMPLETE) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Official buisness, John. I need some information about Marsha Windsor. Tell me about the last time you saw him.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Official business, John. I need some information about Marshal Windsor. Tell me about he last time you saw him.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF); pPlayer->SEND_GOSSIP_MENU(2713, pCreature->GetObjectGuid()); return true; @@ -99,7 +99,7 @@ bool GossipSelect_npc_ragged_john(Player* pPlayer, Creature* pCreature, uint32 u pPlayer->SEND_GOSSIP_MENU(2716, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+3: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Interesting... continue John.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Interesting... continue, John.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4); pPlayer->SEND_GOSSIP_MENU(2717, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+4: @@ -111,7 +111,7 @@ bool GossipSelect_npc_ragged_john(Player* pPlayer, Creature* pCreature, uint32 u pPlayer->SEND_GOSSIP_MENU(2719, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+6: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Ok so where the hell is he? Wait a minute! Are you drunk?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 7); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Ok, so where the hell is he? Wait a minute! Are you drunk?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 7); pPlayer->SEND_GOSSIP_MENU(2720, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+7: @@ -123,11 +123,11 @@ bool GossipSelect_npc_ragged_john(Player* pPlayer, Creature* pCreature, uint32 u pPlayer->SEND_GOSSIP_MENU(2722, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+9: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Ahh... Ironfoe", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 10); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Ahh... Ironfoe.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 10); pPlayer->SEND_GOSSIP_MENU(2723, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+10: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Thanks, Ragged John. Your story was very uplifting and informative", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 11); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Thanks, Ragged John. Your story was very uplifting and informative.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 11); pPlayer->SEND_GOSSIP_MENU(2725, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+11: From 3025c0372561e2c86a64477ee760cdf98d19c450 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Tue, 2 Oct 2012 00:07:26 +0300 Subject: [PATCH 0717/1172] [2723] Ceanup and improve script for Hydross the Unstable - SSC Also fix Lurker combat timers reset --- .../boss_hydross_the_unstable.cpp | 371 ++++++++++-------- .../boss_morogrim_tidewalker.cpp | 2 +- .../serpent_shrine/boss_the_lurker_below.cpp | 6 + .../instance_serpent_shrine.cpp | 3 + .../serpent_shrine/serpent_shrine.h | 4 + sd2_revision_nr.h | 2 +- 6 files changed, 223 insertions(+), 165 deletions(-) diff --git a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_hydross_the_unstable.cpp b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_hydross_the_unstable.cpp index c02fb5ad3..601d4a99f 100644 --- a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_hydross_the_unstable.cpp +++ b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_hydross_the_unstable.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: Boss_Hydross_The_Unstable -SD%Complete: 90 -SDComment: Some details and adjustments left to do, probably nothing major. Spawns may be spawned in different way/location. code cleanup needed +SD%Complete: 95 +SDComment: Timers may need improvemets. SDCategory: Coilfang Resevoir, Serpent Shrine Cavern EndScriptData */ @@ -36,84 +36,70 @@ enum SAY_CORRUPT_SLAY2 = -1548007, SAY_CORRUPT_DEATH = -1548008, - SWITCH_RADIUS = 18, - - MODEL_CORRUPT = 20609, - MODEL_CLEAN = 20162, - SPELL_WATER_TOMB = 38235, - SPELL_MARK_OF_HYDROSS1 = 38215, - SPELL_MARK_OF_HYDROSS2 = 38216, - SPELL_MARK_OF_HYDROSS3 = 38217, - SPELL_MARK_OF_HYDROSS4 = 38218, - SPELL_MARK_OF_HYDROSS5 = 38231, - SPELL_MARK_OF_HYDROSS6 = 40584, - SPELL_MARK_OF_CORRUPTION1 = 38219, - SPELL_MARK_OF_CORRUPTION2 = 38220, - SPELL_MARK_OF_CORRUPTION3 = 38221, - SPELL_MARK_OF_CORRUPTION4 = 38222, - SPELL_MARK_OF_CORRUPTION5 = 38230, - SPELL_MARK_OF_CORRUPTION6 = 40583, SPELL_VILE_SLUDGE = 38246, - SPELL_ENRAGE = 27680, //this spell need verification - SPELL_SUMMON_WATER_ELEMENT = 36459, //not in use yet(in use ever?) - SPELL_ELEMENTAL_SPAWNIN = 25035, - SPELL_BLUE_BEAM = 38015, //channeled Hydross Beam Helper (not in use yet) - SPELL_PURIFY_ELEMENTAL = 36461, //(not in use) visualize the line by tainting/purifying mobs + SPELL_CORRUPTION = 37961, // transform spell + SPELL_ENRAGE = 27680, // ToDo: this spell need verification + SPELL_BLUE_BEAM = 38015, + SPELL_SUMMON_WATER_ELEMENT = 36459, // spawn elemental on OOC timer + //SPELL_ELEMENTAL_SPAWNIN = 25035, // already handled in eventAI + SPELL_PURIFY_ELEMENTAL = 36461, // purify elemental on OOC timer NPC_PURE_SPAWN = 22035, - NPC_TAINTED_SPAWN = 22036 -}; + NPC_TAINTED_SPAWN = 22036, + NPC_PURIFIED_ELEMENTAL = 21260, + NPC_TAINTED_ELEMENTAL = 21253, -const float afSpawnDiffs[4][2] = -{ - {6.934003f , -11.255012f}, // diff 1 - {-6.934003f , 11.255012f }, // diff 2 - {-12.577011f, -4.72702f }, // diff 3 - {12.577011f , 4.72702f } // diff 4 + POINT_ID_ELEMENTAL_CLEAN = 1, + POINT_ID_ELEMENTAL_EXIT = 2, + + SWITCH_RADIUS = 18, + MAX_HYDROSS_ADDS = 4, + MAX_HYDROSS_MARKS = 6, }; +static const uint32 aMarkHydross[MAX_HYDROSS_MARKS] = {38215, 38216, 38217, 38218, 38231, 40584}; +static const uint32 aMarkCorruption[MAX_HYDROSS_MARKS] = {38219, 38220, 38221, 38222, 38230, 40583}; + +static const float aElementalCleanPoint[3] = {-231.48f, -343.05f, -1.58f}; +static const float aElementalExitPoint[3] = {-177.41f, -395.72f, -1.60f}; + struct MANGOS_DLL_DECL boss_hydross_the_unstableAI : public ScriptedAI { boss_hydross_the_unstableAI(Creature* pCreature) : ScriptedAI(pCreature) { - m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_pInstance = (instance_serpentshrine_cavern*)pCreature->GetInstanceData(); Reset(); } - ScriptedInstance* m_pInstance; // the instance + instance_serpentshrine_cavern* m_pInstance; - uint32 m_uiPosCheck_Timer; - uint32 m_uiMarkOfHydross_Timer; - uint32 m_uiMarkOfCorruption_Timer; - uint32 m_uiWaterTomb_Timer; - uint32 m_uiVileSludge_Timer; - uint32 m_uiMarkOfHydross_Count; - uint32 m_uiMarkOfCorruption_Count; + uint32 m_uiBeamInitTimer; + uint32 m_uiElementalTimer; + uint32 m_uiPosCheckTimer; + uint32 m_uiMarkTimer; + uint32 m_uiWaterTombTimer; + uint32 m_uiVileSludgeTimer; uint32 m_uiEnrageTimer; - bool m_bCorruptedForm; + uint8 m_uiMarkCount; + bool m_bCorruptedForm; void Reset() { - m_uiPosCheck_Timer = 2500; - m_uiMarkOfHydross_Timer = 15000; - m_uiMarkOfCorruption_Timer = 15000; - m_uiWaterTomb_Timer = 7000; - m_uiVileSludge_Timer = 7000; - m_uiMarkOfHydross_Count = 0; - m_uiMarkOfCorruption_Count = 0; - m_uiEnrageTimer = 600000; + m_uiBeamInitTimer = 5000; + m_uiElementalTimer = 20000; + m_uiPosCheckTimer = 2000; + m_uiMarkTimer = 15000; + m_uiWaterTombTimer = 7000; + m_uiVileSludgeTimer = 7000; + m_uiMarkCount = 0; + m_uiEnrageTimer = 10*MINUTE*IN_MILLISECONDS; - m_bCorruptedForm = false; + m_bCorruptedForm = false; m_creature->SetMeleeDamageSchool(SPELL_SCHOOL_FROST); m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_FROST, true); m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_NATURE, false); - - m_creature->SetDisplayId(MODEL_CLEAN); - - if (m_pInstance) - m_pInstance->SetData(TYPE_HYDROSS_EVENT, NOT_STARTED); } void Aggro(Unit* pWho) @@ -132,77 +118,136 @@ struct MANGOS_DLL_DECL boss_hydross_the_unstableAI : public ScriptedAI DoScriptText(urand(0,1) ? SAY_CLEAN_SLAY1 : SAY_CLEAN_SLAY2, m_creature); } + void JustDied(Unit* pKiller) + { + DoScriptText(m_bCorruptedForm ? SAY_CORRUPT_DEATH : SAY_CLEAN_DEATH, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_HYDROSS_EVENT, DONE); + } + + void JustReachedHome() + { + if (m_pInstance) + m_pInstance->SetData(TYPE_HYDROSS_EVENT, FAIL); + } + void JustSummoned(Creature* pSummoned) { - if (pSummoned->GetEntry() == NPC_PURE_SPAWN) - pSummoned->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_FROST, true); - else if (pSummoned->GetEntry() == NPC_TAINTED_SPAWN) - pSummoned->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_NATURE, true); + switch (pSummoned->GetEntry()) + { + case NPC_PURE_SPAWN: + pSummoned->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_FROST, true); + break; + case NPC_TAINTED_SPAWN: + pSummoned->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_NATURE, true); + break; + case NPC_TAINTED_ELEMENTAL: + pSummoned->GetMotionMaster()->MovePoint(POINT_ID_ELEMENTAL_CLEAN, aElementalCleanPoint[0], aElementalCleanPoint[1], aElementalCleanPoint[2]); + break; + } - pSummoned->CastSpell(pSummoned, SPELL_ELEMENTAL_SPAWNIN, true); + // Attack only in combat + if (m_creature->getVictim()) + pSummoned->AI()->AttackStart(m_creature->getVictim()); } - void JustDied(Unit* pVictim) + void SummonedMovementInform(Creature* pSummoned, uint32 uiMotionType, uint32 uiPointId) { - DoScriptText(m_bCorruptedForm ? SAY_CORRUPT_DEATH : SAY_CLEAN_DEATH, m_creature); + if (uiMotionType != POINT_MOTION_TYPE) + return; - if (m_pInstance) - m_pInstance->SetData(TYPE_HYDROSS_EVENT, DONE); + if (uiPointId == POINT_ID_ELEMENTAL_CLEAN) + { + pSummoned->SetFacingToObject(m_creature); + DoCastSpellIfCan(pSummoned, SPELL_PURIFY_ELEMENTAL); + } + else if (uiPointId == POINT_ID_ELEMENTAL_EXIT) + pSummoned->ForcedDespawn(); + } + + void SpellHitTarget(Unit* pTarget, const SpellEntry* pSpell) + { + // Purify elementals and make them go to exit + if (pSpell->Id == SPELL_PURIFY_ELEMENTAL) + { + ((Creature*)pTarget)->UpdateEntry(NPC_PURIFIED_ELEMENTAL); + pTarget->GetMotionMaster()->MovePoint(POINT_ID_ELEMENTAL_EXIT, aElementalExitPoint[0], aElementalExitPoint[1], aElementalExitPoint[2]); + } } - void SpawnAdds() + // Adds summon during phase switch + void DoSpawnAdds() { - for(uint8 i = 0; i < 4; ++i) - DoSpawnCreature(m_bCorruptedForm ? NPC_TAINTED_SPAWN : NPC_PURE_SPAWN, - afSpawnDiffs[i][0], afSpawnDiffs[i][1], 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 10000); + float fX, fY, fZ; + for(uint8 i = 0; i < MAX_HYDROSS_ADDS; ++i) + { + m_creature->GetNearPoint(m_creature, fX, fY, fZ, 0, 10, M_PI_F/2*i); + m_creature->SummonCreature(m_bCorruptedForm ? NPC_PURE_SPAWN : NPC_TAINTED_SPAWN, fX, fY, fZ, 0, TEMPSUMMON_DEAD_DESPAWN, 0); + } + } + + // Wrapper to handle the blue beams animation + void DoHandleBeamHelpers(bool bReset) + { + GuidList lBeamHelpersGuid; + m_pInstance->GetBeamHelpersGUIDList(lBeamHelpersGuid); + + for (GuidList::const_iterator itr = lBeamHelpersGuid.begin(); itr != lBeamHelpersGuid.end(); ++itr) + { + if (Creature* pBeam = m_creature->GetMap()->GetCreature(*itr)) + { + if (bReset) + pBeam->InterruptNonMeleeSpells(false); + else + pBeam->CastSpell(m_creature, SPELL_BLUE_BEAM, false); + } + } } void UpdateAI(const uint32 uiDiff) { - //Return since we have no target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + { + // handle elementals on OOC timer + if (m_uiElementalTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_SUMMON_WATER_ELEMENT) == CAST_OK) + m_uiElementalTimer = 20000; + } + else + m_uiElementalTimer -= uiDiff; + return; + } + + if (m_uiBeamInitTimer) + { + if (m_uiBeamInitTimer <= uiDiff) + { + DoHandleBeamHelpers(false); + m_uiBeamInitTimer = 0; + } + else + m_uiBeamInitTimer -= uiDiff; + } // corrupted form if (m_bCorruptedForm) { - //MarkOfCorruption_Timer - if (m_uiMarkOfCorruption_Timer < uiDiff) + if (m_uiVileSludgeTimer < uiDiff) { - if (m_uiMarkOfCorruption_Count <= 5) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) { - uint32 uiMarkSpell = 0; - - switch(m_uiMarkOfCorruption_Count) - { - case 0: uiMarkSpell = SPELL_MARK_OF_CORRUPTION1; break; - case 1: uiMarkSpell = SPELL_MARK_OF_CORRUPTION2; break; - case 2: uiMarkSpell = SPELL_MARK_OF_CORRUPTION3; break; - case 3: uiMarkSpell = SPELL_MARK_OF_CORRUPTION4; break; - case 4: uiMarkSpell = SPELL_MARK_OF_CORRUPTION5; break; - case 5: uiMarkSpell = SPELL_MARK_OF_CORRUPTION6; break; - } - - DoCastSpellIfCan(m_creature->getVictim(), uiMarkSpell); - - if (m_uiMarkOfCorruption_Count < 5) - ++m_uiMarkOfCorruption_Count; + if (DoCastSpellIfCan(pTarget, SPELL_VILE_SLUDGE) == CAST_OK) + m_uiVileSludgeTimer = 15000; } + } + else + m_uiVileSludgeTimer -= uiDiff; - m_uiMarkOfCorruption_Timer = 15000; - }else m_uiMarkOfCorruption_Timer -= uiDiff; - - //VileSludge_Timer - if (m_uiVileSludge_Timer < uiDiff) - { - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) - DoCastSpellIfCan(pTarget, SPELL_VILE_SLUDGE); - - m_uiVileSludge_Timer = 15000; - }else m_uiVileSludge_Timer -= uiDiff; - - //PosCheck_Timer - if (m_uiPosCheck_Timer < uiDiff) + // Change to clean + if (m_uiPosCheckTimer < uiDiff) { float fPosX, fPosY, fPosZ; m_creature->GetCombatStartPosition(fPosX, fPosY, fPosZ); @@ -210,98 +255,98 @@ struct MANGOS_DLL_DECL boss_hydross_the_unstableAI : public ScriptedAI if (m_creature->IsWithinDist2d(fPosX, fPosY, SWITCH_RADIUS)) { DoScriptText(SAY_SWITCH_TO_CLEAN, m_creature); + m_creature->RemoveAurasDueToSpell(SPELL_CORRUPTION); + m_uiMarkCount = 0; - // switch to clean form - m_creature->SetDisplayId(MODEL_CLEAN); - m_uiMarkOfHydross_Count = 0; + DoHandleBeamHelpers(false); DoResetThreat(); - - // spawn 4 adds - SpawnAdds(); + DoSpawnAdds(); m_creature->SetMeleeDamageSchool(SPELL_SCHOOL_FROST); m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_FROST, true); m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_NATURE, false); m_bCorruptedForm = false; + m_uiMarkTimer = 15000; } - m_uiPosCheck_Timer = 2500; - }else m_uiPosCheck_Timer -=uiDiff; + m_uiPosCheckTimer = 2000; + } + else + m_uiPosCheckTimer -=uiDiff; } // clean form else { - //MarkOfHydross_Timer - if (m_uiMarkOfHydross_Timer < uiDiff) + if (m_uiWaterTombTimer < uiDiff) { - if (m_uiMarkOfHydross_Count <= 5) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) { - uint32 uiMarkSpell = 0; - - switch(m_uiMarkOfHydross_Count) - { - case 0: uiMarkSpell = SPELL_MARK_OF_HYDROSS1; break; - case 1: uiMarkSpell = SPELL_MARK_OF_HYDROSS2; break; - case 2: uiMarkSpell = SPELL_MARK_OF_HYDROSS3; break; - case 3: uiMarkSpell = SPELL_MARK_OF_HYDROSS4; break; - case 4: uiMarkSpell = SPELL_MARK_OF_HYDROSS5; break; - case 5: uiMarkSpell = SPELL_MARK_OF_HYDROSS6; break; - } - - DoCastSpellIfCan(m_creature->getVictim(), uiMarkSpell); - - if (m_uiMarkOfHydross_Count < 5) - ++m_uiMarkOfHydross_Count; + if (DoCastSpellIfCan(pTarget, SPELL_WATER_TOMB) == CAST_OK) + m_uiWaterTombTimer = 7000; } + } + else + m_uiWaterTombTimer -= uiDiff; - m_uiMarkOfHydross_Timer = 15000; - }else m_uiMarkOfHydross_Timer -= uiDiff; - - //WaterTomb_Timer - if (m_uiWaterTomb_Timer < uiDiff) - { - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) - DoCastSpellIfCan(pTarget, SPELL_WATER_TOMB); - - m_uiWaterTomb_Timer = 7000; - }else m_uiWaterTomb_Timer -= uiDiff; - - //PosCheck_Timer - if (m_uiPosCheck_Timer < uiDiff) + // Change to corrupt + if (m_uiPosCheckTimer < uiDiff) { float fPosX, fPosY, fPosZ; m_creature->GetCombatStartPosition(fPosX, fPosY, fPosZ); if (!m_creature->IsWithinDist2d(fPosX, fPosY, SWITCH_RADIUS)) { - DoScriptText(SAY_SWITCH_TO_CORRUPT, m_creature); - - // switch to corrupted form - m_creature->SetDisplayId(MODEL_CORRUPT); - m_uiMarkOfCorruption_Count = 0; - DoResetThreat(); + if (DoCastSpellIfCan(m_creature, SPELL_CORRUPTION) == CAST_OK) + { + DoScriptText(SAY_SWITCH_TO_CORRUPT, m_creature); + m_uiMarkCount = 0; - // spawn 4 adds - SpawnAdds(); + DoHandleBeamHelpers(true); + DoResetThreat(); + DoSpawnAdds(); - m_creature->SetMeleeDamageSchool(SPELL_SCHOOL_NATURE); - m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_NATURE, true); - m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_FROST, false); + m_creature->SetMeleeDamageSchool(SPELL_SCHOOL_NATURE); + m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_NATURE, true); + m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_FROST, false); - m_bCorruptedForm = true; + m_bCorruptedForm = true; + m_uiMarkTimer = 15000; + } } - m_uiPosCheck_Timer = 2500; - }else m_uiPosCheck_Timer -=uiDiff; + m_uiPosCheckTimer = 2000; + } + else + m_uiPosCheckTimer -=uiDiff; } - //EnrageTimer - if (m_uiEnrageTimer < uiDiff) + // Apply mark debuff + if (m_uiMarkTimer < uiDiff) { - DoCastSpellIfCan(m_creature, SPELL_ENRAGE); - m_uiEnrageTimer = 60000; - }else m_uiEnrageTimer -= uiDiff; + if (DoCastSpellIfCan(m_creature, m_bCorruptedForm ? aMarkCorruption[m_uiMarkCount] : aMarkHydross[m_uiMarkCount]) == CAST_OK) + { + ++m_uiMarkCount; + m_uiMarkTimer = 15000; + + // limit the mark counter to 6 + if (m_uiMarkCount == MAX_HYDROSS_MARKS) + m_uiMarkCount = MAX_HYDROSS_MARKS - 1; + } + } + else + m_uiMarkTimer -= uiDiff; + + if (m_uiEnrageTimer) + { + if (m_uiEnrageTimer <= uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_ENRAGE) == CAST_OK) + m_uiEnrageTimer = 0; + } + else + m_uiEnrageTimer -= uiDiff; + } DoMeleeAttackIfReady(); } diff --git a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_morogrim_tidewalker.cpp b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_morogrim_tidewalker.cpp index fedb88009..66e9e9f50 100644 --- a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_morogrim_tidewalker.cpp +++ b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_morogrim_tidewalker.cpp @@ -119,7 +119,7 @@ struct MANGOS_DLL_DECL boss_morogrim_tidewalkerAI : public ScriptedAI } } - void JustDied(Unit* pVictim) + void JustDied(Unit* pKiller) { DoScriptText(SAY_DEATH, m_creature); diff --git a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_the_lurker_below.cpp b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_the_lurker_below.cpp index 6ec36a610..9ebe8bef4 100644 --- a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_the_lurker_below.cpp +++ b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_the_lurker_below.cpp @@ -94,6 +94,11 @@ struct MANGOS_DLL_DECL boss_the_lurker_belowAI : public Scripted_NoMovementAI m_uiPhase = PHASE_NORMAL; m_uiPhaseChangeTimer= 90000; + DoResetCombatTimers(); + } + + void DoResetCombatTimers() + { m_uiWhirlTimer = 18000; m_uiGeyserTimer = 50000; m_uiSpoutTimer = 42000; @@ -251,6 +256,7 @@ struct MANGOS_DLL_DECL boss_the_lurker_belowAI : public Scripted_NoMovementAI if (m_uiPhaseChangeTimer < uiDiff) { + DoResetCombatTimers(); m_uiPhase = PHASE_NORMAL; m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); m_creature->RemoveAurasDueToSpell(SPELL_SUBMERGE); diff --git a/scripts/outland/coilfang_reservoir/serpent_shrine/instance_serpent_shrine.cpp b/scripts/outland/coilfang_reservoir/serpent_shrine/instance_serpent_shrine.cpp index 14df8e510..3838e21b8 100644 --- a/scripts/outland/coilfang_reservoir/serpent_shrine/instance_serpent_shrine.cpp +++ b/scripts/outland/coilfang_reservoir/serpent_shrine/instance_serpent_shrine.cpp @@ -70,6 +70,9 @@ void instance_serpentshrine_cavern::OnCreatureCreate(Creature* pCreature) case NPC_GREYHEART_SPELLBINDER: m_lSpellBindersGUIDList.push_back(pCreature->GetObjectGuid()); break; + case NPC_HYDROSS_BEAM_HELPER: + m_lBeamHelpersGUIDList.push_back(pCreature->GetObjectGuid()); + break; } } diff --git a/scripts/outland/coilfang_reservoir/serpent_shrine/serpent_shrine.h b/scripts/outland/coilfang_reservoir/serpent_shrine/serpent_shrine.h index 5a870e12e..d1c8aec42 100644 --- a/scripts/outland/coilfang_reservoir/serpent_shrine/serpent_shrine.h +++ b/scripts/outland/coilfang_reservoir/serpent_shrine/serpent_shrine.h @@ -31,6 +31,7 @@ enum NPC_LEOTHERAS = 21215, NPC_LADYVASHJ = 21212, NPC_GREYHEART_SPELLBINDER = 21806, + NPC_HYDROSS_BEAM_HELPER = 21933, SPELL_LEOTHERAS_BANISH = 37546, }; @@ -50,6 +51,8 @@ class MANGOS_DLL_DECL instance_serpentshrine_cavern : public ScriptedInstance void SetData(uint32 uiType, uint32 uiData); uint32 GetData(uint32 uiType); + void GetBeamHelpersGUIDList(GuidList &lList) { lList = m_lBeamHelpersGUIDList; } + const char* Save() { return m_strInstData.c_str(); } void Load(const char* chrIn); @@ -61,6 +64,7 @@ class MANGOS_DLL_DECL instance_serpentshrine_cavern : public ScriptedInstance uint32 m_uiSpellBinderCount; GuidList m_lSpellBindersGUIDList; + GuidList m_lBeamHelpersGUIDList; }; #endif diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 96d0bd73e..3936e5273 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2722" + #define SD2_REVISION_NR "2723" #endif // __SD2_REVISION_NR_H__ From 91127113f963dba85b64ee2d33baa32caa63df85 Mon Sep 17 00:00:00 2001 From: Radu Date: Tue, 2 Oct 2012 11:15:40 +0300 Subject: [PATCH 0718/1172] Update scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.cpp Thanks to didoutheone for pointing this mistake --- .../eastern_kingdoms/magisters_terrace/magisters_terrace.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.cpp b/scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.cpp index 6b60d387d..2da04539a 100644 --- a/scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.cpp +++ b/scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.cpp @@ -65,7 +65,7 @@ struct MANGOS_DLL_DECL npc_kalecgosAI : public ScriptedAI if (uiPointId) { m_creature->SetLevitate(false); - m_creature->SetFacingTo(afKaelLandPoint[4]); + m_creature->SetFacingTo(afKaelLandPoint[3]); m_uiTransformTimer = MINUTE*IN_MILLISECONDS; } } From 1a150f37530ccf5770cb35a5fac7a32c1ccdc668 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Thu, 4 Oct 2012 20:28:57 +0200 Subject: [PATCH 0719/1172] [2724] Improve Lazy Peon quest (5441). Close #21 Also fix a small warning in Karazhan Thanks to tarwyn for pointing. --- .../karazhan/boss_nightbane.cpp | 2 +- scripts/kalimdor/durotar.cpp | 55 ++++++++++++++----- sd2_revision_nr.h | 2 +- 3 files changed, 42 insertions(+), 17 deletions(-) diff --git a/scripts/eastern_kingdoms/karazhan/boss_nightbane.cpp b/scripts/eastern_kingdoms/karazhan/boss_nightbane.cpp index 06dd172cf..6f216c454 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_nightbane.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_nightbane.cpp @@ -183,7 +183,7 @@ struct MANGOS_DLL_DECL boss_nightbaneAI : public npc_escortAI if (!m_pInstance) return; - Unit* pChosenTrigger; + Unit* pChosenTrigger = NULL; GuidList lTriggersList; float fX, fY, fZ; diff --git a/scripts/kalimdor/durotar.cpp b/scripts/kalimdor/durotar.cpp index 2dc16ad3d..1b5393bc6 100644 --- a/scripts/kalimdor/durotar.cpp +++ b/scripts/kalimdor/durotar.cpp @@ -47,11 +47,38 @@ struct MANGOS_DLL_DECL npc_lazy_peonAI : public ScriptedAI { npc_lazy_peonAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset (); } - uint32 m_uiResetSleepTimer; + uint32 m_uiResetSleepTimer; // Time, until the npc stops harvesting lumber + uint32 m_uiStopSleepingTimer; // Time, until the npcs (re)starts working on its own void Reset() { m_uiResetSleepTimer = 0; + m_uiStopSleepingTimer = urand(30000, 120000); // Sleeping aura has only 2min duration + } + + // Can also be self invoked for random working + void StartLumbering(Unit* pInvoker) + { + m_uiStopSleepingTimer = 0; + if (GameObject* pLumber = GetClosestGameObjectWithEntry(m_creature, GO_LUMBERPILE, 15.0f)) + { + m_creature->RemoveAurasDueToSpell(SPELL_PEON_SLEEP); + DoScriptText(urand(0, 1) ? SAY_PEON_AWAKE_1 : SAY_PEON_AWAKE_2, m_creature); + + float fX, fY, fZ; + m_creature->SetWalk(false); + pLumber->GetContactPoint(m_creature, fX, fY, fZ, CONTACT_DISTANCE); + + if (pInvoker->GetTypeId() == TYPEID_PLAYER) + { + ((Player*)pInvoker)->KilledMonsterCredit(m_creature->GetEntry(), m_creature->GetObjectGuid()); + m_creature->GetMotionMaster()->MovePoint(1, fX, fY, fZ); + } + else + m_creature->GetMotionMaster()->MovePoint(2, fX, fY, fZ); + } + else + error_log("SD2: No GameObject of entry %u was found in range or something really bad happened.", GO_LUMBERPILE); } void MovementInform(uint32 uiMotionType, uint32 uiPointId) @@ -60,7 +87,8 @@ struct MANGOS_DLL_DECL npc_lazy_peonAI : public ScriptedAI return; m_creature->HandleEmote(EMOTE_STATE_WORK_CHOPWOOD); - m_uiResetSleepTimer = 80000; + // TODO - random bevahior for self-invoked awakening guesswork + m_uiResetSleepTimer = uiPointId == 1 ? 80000 : urand(30000, 60000); } void UpdateAI(const uint32 uiDiff) @@ -76,6 +104,14 @@ struct MANGOS_DLL_DECL npc_lazy_peonAI : public ScriptedAI else m_uiResetSleepTimer -= uiDiff; } + + if (m_uiStopSleepingTimer) + { + if (m_uiStopSleepingTimer <= uiDiff) + StartLumbering(m_creature); + else + m_uiStopSleepingTimer -= uiDiff; + } } }; @@ -92,19 +128,8 @@ bool EffectDummyCreature_lazy_peon_awake(Unit* pCaster, uint32 uiSpellId, SpellE if (!pCreatureTarget->HasAura(SPELL_PEON_SLEEP) || pCaster->GetTypeId() != TYPEID_PLAYER || pCreatureTarget->GetEntry() != NPC_SLEEPING_PEON) return true; - if (GameObject* pLumber = GetClosestGameObjectWithEntry(pCreatureTarget, GO_LUMBERPILE, 15.0f)) - { - pCreatureTarget->RemoveAurasDueToSpell(SPELL_PEON_SLEEP); - DoScriptText(urand(0, 1) ? SAY_PEON_AWAKE_1 : SAY_PEON_AWAKE_2, pCreatureTarget); - ((Player*)pCaster)->KilledMonsterCredit(pCreatureTarget->GetEntry()); - - float fX, fY, fZ; - pCreatureTarget->SetWalk(false); - pLumber->GetContactPoint(pCreatureTarget, fX, fY, fZ, CONTACT_DISTANCE); - pCreatureTarget->GetMotionMaster()->MovePoint(1, fX, fY, fZ); - } - else - error_log("SD2: No GameObject of entry %u was found in range or something really bad happened.", GO_LUMBERPILE); + if (npc_lazy_peonAI* pPeonAI = dynamic_cast(pCreatureTarget->AI())) + pPeonAI->StartLumbering(pCaster); //always return true when we are handling this spell and effect return true; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 3936e5273..20997e967 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2723" + #define SD2_REVISION_NR "2724" #endif // __SD2_REVISION_NR_H__ From 37b81266d6bf67d60d87f2c95d3001cd8b3e017d Mon Sep 17 00:00:00 2001 From: tarwyn Date: Fri, 5 Oct 2012 23:11:13 +0200 Subject: [PATCH 0720/1172] [2725] Continue improving Lazy Peons quest from recent commit. Close #25 Signed-off-by: Schmoozerd --- scripts/kalimdor/durotar.cpp | 11 ++++++++--- sd2_revision_nr.h | 2 +- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/scripts/kalimdor/durotar.cpp b/scripts/kalimdor/durotar.cpp index 1b5393bc6..cef72d5d0 100644 --- a/scripts/kalimdor/durotar.cpp +++ b/scripts/kalimdor/durotar.cpp @@ -45,7 +45,11 @@ enum struct MANGOS_DLL_DECL npc_lazy_peonAI : public ScriptedAI { - npc_lazy_peonAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset (); } + npc_lazy_peonAI(Creature* pCreature) : ScriptedAI(pCreature) + { + Reset (); + m_uiStopSleepingTimer = urand(30000, 120000); // Set on spawn to a potential small timer, to get nice results for initial case + } uint32 m_uiResetSleepTimer; // Time, until the npc stops harvesting lumber uint32 m_uiStopSleepingTimer; // Time, until the npcs (re)starts working on its own @@ -53,7 +57,7 @@ struct MANGOS_DLL_DECL npc_lazy_peonAI : public ScriptedAI void Reset() { m_uiResetSleepTimer = 0; - m_uiStopSleepingTimer = urand(30000, 120000); // Sleeping aura has only 2min duration + m_uiStopSleepingTimer = urand(90000, 120000); // Sleeping aura has only 2min duration } // Can also be self invoked for random working @@ -63,7 +67,6 @@ struct MANGOS_DLL_DECL npc_lazy_peonAI : public ScriptedAI if (GameObject* pLumber = GetClosestGameObjectWithEntry(m_creature, GO_LUMBERPILE, 15.0f)) { m_creature->RemoveAurasDueToSpell(SPELL_PEON_SLEEP); - DoScriptText(urand(0, 1) ? SAY_PEON_AWAKE_1 : SAY_PEON_AWAKE_2, m_creature); float fX, fY, fZ; m_creature->SetWalk(false); @@ -71,6 +74,7 @@ struct MANGOS_DLL_DECL npc_lazy_peonAI : public ScriptedAI if (pInvoker->GetTypeId() == TYPEID_PLAYER) { + DoScriptText(SAY_PEON_AWAKE_1, m_creature); ((Player*)pInvoker)->KilledMonsterCredit(m_creature->GetEntry(), m_creature->GetObjectGuid()); m_creature->GetMotionMaster()->MovePoint(1, fX, fY, fZ); } @@ -97,6 +101,7 @@ struct MANGOS_DLL_DECL npc_lazy_peonAI : public ScriptedAI { if (m_uiResetSleepTimer <= uiDiff) { + DoScriptText(SAY_PEON_AWAKE_2, m_creature); m_creature->HandleEmote(EMOTE_STATE_NONE); EnterEvadeMode(); m_uiResetSleepTimer = 0; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 20997e967..ff41553f8 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2724" + #define SD2_REVISION_NR "2725" #endif // __SD2_REVISION_NR_H__ From be53764df668f9c4452e4957a1aca1c6935737f7 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Sat, 6 Oct 2012 03:58:57 +0200 Subject: [PATCH 0721/1172] [2726] Fix a possible bug with Sartharion's add staying unattackable when entering combat before landing --- .../obsidian_sanctum/boss_sartharion.cpp | 16 +++++++++------- sd2_revision_nr.h | 2 +- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/scripts/northrend/obsidian_sanctum/boss_sartharion.cpp b/scripts/northrend/obsidian_sanctum/boss_sartharion.cpp index a412c1935..7e7cb0932 100644 --- a/scripts/northrend/obsidian_sanctum/boss_sartharion.cpp +++ b/scripts/northrend/obsidian_sanctum/boss_sartharion.cpp @@ -221,12 +221,12 @@ struct MANGOS_DLL_DECL boss_sartharionAI : public ScriptedAI void JustReachedHome() { if (m_pInstance) - m_pInstance->SetData(TYPE_SARTHARION_EVENT, NOT_STARTED); + m_pInstance->SetData(TYPE_SARTHARION_EVENT, FAIL); } void Aggro(Unit* pWho) { - DoScriptText(SAY_SARTHARION_AGGRO,m_creature); + DoScriptText(SAY_SARTHARION_AGGRO, m_creature); if (m_pInstance) { @@ -237,7 +237,7 @@ struct MANGOS_DLL_DECL boss_sartharionAI : public ScriptedAI void JustDied(Unit* pKiller) { - DoScriptText(SAY_SARTHARION_DEATH,m_creature); + DoScriptText(SAY_SARTHARION_DEATH, m_creature); if (m_pInstance) m_pInstance->SetData(TYPE_SARTHARION_EVENT, DONE); @@ -300,14 +300,16 @@ struct MANGOS_DLL_DECL boss_sartharionAI : public ScriptedAI if (m_pInstance) { Creature* pTemp = m_pInstance->GetSingleCreatureFromStorage(uiEntry); - - if (pTemp && pTemp->isAlive() && !pTemp->getVictim()) + if (pTemp && pTemp->isAlive()) { - pTemp->SetWalk(false); - if (pTemp->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE)) pTemp->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + if (pTemp->getVictim()) + return; + + pTemp->SetWalk(false); + int32 iTextId = 0; switch(uiEntry) diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index ff41553f8..17f963535 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2725" + #define SD2_REVISION_NR "2726" #endif // __SD2_REVISION_NR_H__ From 6f88fd70cf6b74e8f530f95266b14bce52737fb2 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Sat, 6 Oct 2012 04:08:35 +0200 Subject: [PATCH 0722/1172] [2727] Fix a possible crash due to not created vector --- .../boss_anubarak_trial.cpp | 18 +++++++++++++----- sd2_revision_nr.h | 2 +- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp index 346a6bfcb..a403060a4 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp @@ -86,7 +86,8 @@ enum Phases { PHASE_GROUND = 0, PHASE_UNDERGROUND = 1, - PHASE_LEECHING_SWARM = 2 + PHASE_LEECHING_SWARM = 2, + PHASE_SUBMERGING = 3, // virtual use only while casting SPELL_SUBMERGE (triggered by script!) }; enum PursuingSpikesPhases @@ -152,6 +153,7 @@ struct MANGOS_DLL_DECL boss_anubarak_trialAI : public ScriptedAI m_uiBerserkTimer = 10*MINUTE*IN_MILLISECONDS; m_vSpheresGuidVector.clear(); + m_vSpheresGuidVector.resize(MAX_FROSTSPHERES, ObjectGuid()); m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); } @@ -187,8 +189,6 @@ struct MANGOS_DLL_DECL boss_anubarak_trialAI : public ScriptedAI { DoScriptText(SAY_AGGRO, m_creature); - m_vSpheresGuidVector.reserve(MAX_FROSTSPHERES); - // Summon the spheres on random points for (uint8 i = 0; i < MAX_FROSTSPHERES; ++i) { @@ -218,6 +218,12 @@ struct MANGOS_DLL_DECL boss_anubarak_trialAI : public ScriptedAI { m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + // Extra check here, because AnubArak must be submerged by default + if (m_Phase != PHASE_SUBMERGING) + return; + + m_Phase = PHASE_UNDERGROUND; + // Refresh spheres only on normal difficulty if (m_pInstance && !m_pInstance->IsHeroicDifficulty()) DoRefreshSpheres(); @@ -283,8 +289,8 @@ struct MANGOS_DLL_DECL boss_anubarak_trialAI : public ScriptedAI { DoScriptText(SAY_SUBMERGE, m_creature); DoScriptText(EMOTE_BURROW, m_creature); - m_PhaseSwitchTimer = 65000; - m_Phase = PHASE_UNDERGROUND; + m_PhaseSwitchTimer = 63000; + m_Phase = PHASE_SUBMERGING; return; } } @@ -361,6 +367,8 @@ struct MANGOS_DLL_DECL boss_anubarak_trialAI : public ScriptedAI else m_PhaseSwitchTimer -= uiDiff; + break; + case PHASE_SUBMERGING: // Do nothing, but continue berserk timer break; } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 17f963535..5f792f6d0 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2726" + #define SD2_REVISION_NR "2727" #endif // __SD2_REVISION_NR_H__ From 0713c736f99a5df333775991741097e92580a7c1 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Thu, 17 Nov 2011 22:00:55 +0100 Subject: [PATCH 0723/1172] [2728] ToC25, Anub'Arak - Move unattackable removal to emerge --- .../trial_of_the_crusader/boss_anubarak_trial.cpp | 9 ++++++--- sd2_revision_nr.h | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp index a403060a4..4c2463423 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp @@ -154,8 +154,6 @@ struct MANGOS_DLL_DECL boss_anubarak_trialAI : public ScriptedAI m_vSpheresGuidVector.clear(); m_vSpheresGuidVector.resize(MAX_FROSTSPHERES, ObjectGuid()); - - m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); } void JustReachedHome() @@ -175,9 +173,14 @@ struct MANGOS_DLL_DECL boss_anubarak_trialAI : public ScriptedAI void MoveInLineOfSight(Unit* pWho) { if (!m_bDidIntroYell && pWho->GetTypeId() == TYPEID_PLAYER && !((Player*)pWho)->isGameMaster() && - pWho->IsWithinDistInMap(m_creature, 100) && pWho->IsWithinLOSInMap(m_creature)) + !m_creature->IsInEvadeMode() && pWho->IsWithinDistInMap(m_creature, 100) && pWho->IsWithinLOSInMap(m_creature)) { DoScriptText(SAY_INTRO, m_creature); + + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE); + m_creature->RemoveAurasDueToSpell(SPELL_SUBMERGE); + DoCastSpellIfCan(m_creature, SPELL_EMERGE); + m_bDidIntroYell = true; return; } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 5f792f6d0..c945cd3ff 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2727" + #define SD2_REVISION_NR "2728" #endif // __SD2_REVISION_NR_H__ From 81cdc7d82d30d83cea747c483fa29c04d065002f Mon Sep 17 00:00:00 2001 From: kid 10 Date: Wed, 17 Aug 2011 00:19:58 +0200 Subject: [PATCH 0724/1172] [2729] Improve ToC Anub'Arak Frostsphere handling --- .../trial_of_the_crusader/boss_anubarak_trial.cpp | 7 ++----- sd2_revision_nr.h | 2 +- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp index 4c2463423..5fdb51467 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp @@ -553,13 +553,10 @@ struct MANGOS_DLL_DECL npc_anubarak_trial_frostsphereAI : public Scripted_NoMove return; // Set fake death in order to apply permafrost + uiDamage = 0; + if (m_bPermafrost) - { - uiDamage = 0; return; - } - - uiDamage = 0; m_creature->InterruptNonMeleeSpells(false); m_creature->SetHealth(0); diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index c945cd3ff..bfc28cc9a 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2728" + #define SD2_REVISION_NR "2729" #endif // __SD2_REVISION_NR_H__ From 2d67df8a3d15f4ae5aaf439fcef26d51a2f50412 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sat, 6 Oct 2012 15:40:21 +0300 Subject: [PATCH 0725/1172] [2730] Cleanup and improve Lady Vashj script - SSC Known issues: Spells 38112 and 38044 require self stacking exception Item 31088 behavior requires additional research and core fix --- .../boss_hydross_the_unstable.cpp | 3 + .../serpent_shrine/boss_lady_vashj.cpp | 652 +++++++----------- .../instance_serpent_shrine.cpp | 77 +-- .../serpent_shrine/serpent_shrine.h | 40 +- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 4 +- sql/updates/r2730_mangos.sql | 4 + 7 files changed, 315 insertions(+), 467 deletions(-) create mode 100644 sql/updates/r2730_mangos.sql diff --git a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_hydross_the_unstable.cpp b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_hydross_the_unstable.cpp index 601d4a99f..75ba3bd9e 100644 --- a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_hydross_the_unstable.cpp +++ b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_hydross_the_unstable.cpp @@ -190,6 +190,9 @@ struct MANGOS_DLL_DECL boss_hydross_the_unstableAI : public ScriptedAI // Wrapper to handle the blue beams animation void DoHandleBeamHelpers(bool bReset) { + if (!m_pInstance) + return; + GuidList lBeamHelpersGuid; m_pInstance->GetBeamHelpersGUIDList(lBeamHelpersGuid); diff --git a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_lady_vashj.cpp b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_lady_vashj.cpp index d7be2c375..dcd973d35 100644 --- a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_lady_vashj.cpp +++ b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_lady_vashj.cpp @@ -16,18 +16,17 @@ /* ScriptData SDName: Boss_Lady_Vashj -SD%Complete: 60 -SDComment: Code cleanup needed. This script needs further adjustments. +SD%Complete: 80 +SDComment: Some details are not very clear: the usage of Shoot and Multishot spells; the summons positions. Tainted Core paralize NYI. Timers need improvements. SDCategory: Coilfang Resevoir, Serpent Shrine Cavern EndScriptData */ #include "precompiled.h" #include "serpent_shrine.h" -#include "Item.h" -#include "Spell.h" enum { + // yells SAY_INTRO = -1548042, SAY_AGGRO1 = -1548043, SAY_AGGRO2 = -1548044, @@ -43,43 +42,44 @@ enum SAY_SLAY3 = -1548054, SAY_DEATH = -1548055, - POINT_MOVE_CENTER = 0, - - PHASE_1 = 1, - PHASE_2 = 2, - PHASE_3 = 3, - - MAX_SHIELD_GEN = 4, - + // spells SPELL_MULTI_SHOT = 38310, SPELL_SHOCK_BLAST = 38509, SPELL_ENTANGLE = 38316, - SPELL_STATIC_CHARGE_TRIGGER = 38280, + SPELL_STATIC_CHARGE = 38280, SPELL_FORKED_LIGHTNING = 38145, SPELL_SHOOT = 38295, - SPELL_TOXIC_SPORES = 38575, SPELL_MAGIC_BARRIER = 38112, SPELL_SURGE = 38044, + SPELL_SUMMON_TAINTED_ELEM = 38139, // maybe also related to spell 38494 + SPELL_PARALIZE = 38132, // aura which should apply to the player which picked the tainted core - //tainted elemental - SPELL_POISON_BOLT = 38253, - SPELL_SUMMON_TAINTED = 38139, - + // summons NPC_ENCHANTED_ELEMENTAL = 21958, NPC_TAINTED_ELEMENTAL = 22009, NPC_COILFANG_STRIDER = 22056, NPC_COILFANG_ELITE = 22055, NPC_TOXIC_SPOREBAT = 22140, - NPC_SHIELD_GENERATOR = 19870 + // other + POINT_MOVE_CENTER = 1, + + PHASE_1 = 1, + PHASE_2 = 2, + PHASE_3 = 3, + + MAX_SHIELD_GEN = 4, }; -const float afMiddlePos[3] = {30.134f, -923.65f, 42.9f}; +static const float afMiddlePos[3] = {30.134f, -923.65f, 42.9f}; + +// ToDo: all the following mobs are probably summoned by trigger npcs. +// Remove the hardcoded coords and set the right summoning when then DB will suppot this! -const float afSporebatPos[4] = {30.977156f, -925.297761f, 77.176567f, 5.223932f}; +static const float afSporebatPos[4] = {30.977156f, -925.297761f, 77.176567f, 5.223932f}; -const float afElementPos[8][4] = +static const float afElementPos[8][4] = { {8.3f , -835.3f , 21.9f, 5.0f}, {53.4f , -835.3f , 21.9f, 4.5f}, @@ -105,41 +105,30 @@ const float afCoilfangStriderPos[3][4] = {-12.843f, -907.798f, 41.239620f, 6.087f} }; -const float afShieldGeneratorChannelPos[4][4] = -{ - {49.626f, -902.181f, 41.54f, 3.956f}, - {10.988f, -901.616f, 41.54f, 5.437f}, - {10.385f, -944.036f, 41.54f, 0.779f}, - {49.312f, -943.398f, 41.54f, 2.401f} -}; - -//Lady Vashj AI struct MANGOS_DLL_DECL boss_lady_vashjAI : public ScriptedAI { boss_lady_vashjAI(Creature* pCreature) : ScriptedAI(pCreature) { - m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_pInstance = (instance_serpentshrine_cavern*)pCreature->GetInstanceData(); Reset(); } - ScriptedInstance *m_pInstance; // the instance - - ObjectGuid m_auiShieldGeneratorChannel[MAX_SHIELD_GEN]; - - // timers - uint32 m_uiShockBlast_Timer; - uint32 m_uiEntangle_Timer; - uint32 m_uiStaticCharge_Timer; - uint32 m_uiForkedLightning_Timer; - uint32 m_uiCheck_Timer; - uint32 m_uiEnchantedElemental_Timer; - uint32 m_uiTaintedElemental_Timer; - uint32 m_uiCoilfangElite_Timer; - uint32 m_uiCoilfangStrider_Timer; - uint32 m_uiSummonSporebat_Timer; - uint32 m_uiSummonSporebat_StaticTimer; - uint8 m_uiEnchantedElemental_Pos; - uint8 m_uiPhase; + instance_serpentshrine_cavern* m_pInstance; + + uint32 m_uiShockBlastTimer; + uint32 m_uiEntangleTimer; + uint32 m_uiStaticChargeTimer; + uint32 m_uiRangedCheckTimer; + uint32 m_uiForkedLightningTimer; + uint32 m_uiEnchantedElementalTimer; + uint32 m_uiTaintedElementalTimer; + uint32 m_uiCoilfangEliteTimer; + uint32 m_uiCoilfangStriderTimer; + uint32 m_uiSummonSporebatTimer; + uint32 m_uiSummonSporebatStaticTimer; + + uint8 m_uiPhase; + uint8 m_uiGeneratorsUsed; bool m_bEntangle; @@ -147,42 +136,23 @@ struct MANGOS_DLL_DECL boss_lady_vashjAI : public ScriptedAI { SetCombatMovement(true); - m_uiShockBlast_Timer = urand(1000, 60000); - m_uiEntangle_Timer = 30000; - m_uiStaticCharge_Timer = urand(10000, 25000); - m_uiCheck_Timer = 1000; - - m_uiForkedLightning_Timer = urand(43000, 49000); - m_uiEnchantedElemental_Timer = 10000; - m_uiTaintedElemental_Timer = 50000; - m_uiCoilfangElite_Timer = 45000; - m_uiCoilfangStrider_Timer = 60000; + m_uiPhase = PHASE_1; + m_uiGeneratorsUsed = 0; - m_uiSummonSporebat_Timer = 10000; - m_uiSummonSporebat_StaticTimer = 30000; - m_uiEnchantedElemental_Pos = 0; - m_uiPhase = PHASE_1; + m_uiShockBlastTimer = urand(1000, 60000); + m_uiEntangleTimer = 30000; + m_uiStaticChargeTimer = urand(10000, 25000); + m_uiRangedCheckTimer = 2000; + m_bEntangle = false; - m_bEntangle = false; + m_uiForkedLightningTimer = urand(3000, 5000); + m_uiEnchantedElementalTimer = 10000; + m_uiTaintedElementalTimer = 53000; + m_uiCoilfangEliteTimer = 47000; + m_uiCoilfangStriderTimer = 60000; - RemoveAllShieldGenerators(); - - if (m_pInstance) - m_pInstance->SetData(TYPE_LADYVASHJ_EVENT, NOT_STARTED); - } - - void RemoveAllShieldGenerators() - { - for(uint8 i = 0; i < MAX_SHIELD_GEN; ++i) - { - if (Creature* pTemp = m_creature->GetMap()->GetCreature(m_auiShieldGeneratorChannel[i])) - { - if (pTemp->isAlive()) - pTemp->SetDeathState(JUST_DIED); - - m_auiShieldGeneratorChannel[i].Clear(); - } - } + m_uiSummonSporebatTimer = 10000; + m_uiSummonSporebatStaticTimer = 30000; } void Aggro(Unit* pWho) @@ -206,46 +176,53 @@ struct MANGOS_DLL_DECL boss_lady_vashjAI : public ScriptedAI if (uiPointId == POINT_MOVE_CENTER) { - m_creature->RemoveAllAuras(); - - for(uint8 i = 0; i < MAX_SHIELD_GEN; ++i) + // Initialize all the shield generators + if (m_pInstance) { - if (Creature* pCreature = m_creature->SummonCreature(NPC_SHIELD_GENERATOR, afShieldGeneratorChannelPos[i][0], afShieldGeneratorChannelPos[i][1], afShieldGeneratorChannelPos[i][2], afShieldGeneratorChannelPos[i][3], TEMPSUMMON_CORPSE_DESPAWN, 0)) - m_auiShieldGeneratorChannel[i] = pCreature->GetObjectGuid(); + GuidList lShieldGeneratorsGuid; + m_pInstance->GetShieldGeneratorsGUIDList(lShieldGeneratorsGuid); + + for (GuidList::const_iterator itr = lShieldGeneratorsGuid.begin(); itr != lShieldGeneratorsGuid.end(); ++itr) + { + if (Creature* pGenerator = m_creature->GetMap()->GetCreature(*itr)) + pGenerator->CastSpell(m_creature, SPELL_MAGIC_BARRIER, false); + } } + + m_uiPhase = PHASE_2; } } void JustSummoned(Creature* pSummoned) { - uint32 uiEntry = pSummoned->GetEntry(); - - if (uiEntry == NPC_COILFANG_STRIDER || uiEntry == NPC_COILFANG_ELITE || uiEntry == NPC_TOXIC_SPOREBAT) + switch (pSummoned->GetEntry()) { - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) - pSummoned->AI()->AttackStart(pTarget); + case NPC_COILFANG_STRIDER: + case NPC_COILFANG_ELITE: + case NPC_TOXIC_SPOREBAT: + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + pSummoned->AI()->AttackStart(pTarget); + break; + case NPC_ENCHANTED_ELEMENTAL: + pSummoned->GetMotionMaster()->MoveFollow(m_creature, 0, 0); + break; } + } - if (uiEntry == NPC_SHIELD_GENERATOR) - { - //we should really expect database to have this set already - if (!pSummoned->HasFlag(UNIT_FIELD_FLAGS, (UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE))) - { - pSummoned->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - pSummoned->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - } - - pSummoned->CastSpell(m_creature,SPELL_MAGIC_BARRIER,true); - } + void SummonedCreatureJustDied(Creature* pSummoned) + { + // Set the timer when summoned killed + if (pSummoned->GetEntry() == NPC_TAINTED_ELEMENTAL) + m_uiTaintedElementalTimer = 50000; } - //called when any summoned (by m_creature) despawns - void SummonedCreatureDespawn(Creature* pDespawned) + void SummonedCreatureDespawn(Creature* pSummoned) { - if (pDespawned->GetEntry() == NPC_TAINTED_ELEMENTAL) + // Set the timer when summoned despawned, if not already killed + if (pSummoned->GetEntry() == NPC_TAINTED_ELEMENTAL) { - if (m_uiTaintedElemental_Timer > 50000) - m_uiTaintedElemental_Timer = 50000; + if (!m_uiTaintedElementalTimer) + m_uiTaintedElementalTimer = 50000; } } @@ -259,7 +236,7 @@ struct MANGOS_DLL_DECL boss_lady_vashjAI : public ScriptedAI } } - void JustDied(Unit* pVictim) + void JustDied(Unit* pKiller) { DoScriptText(SAY_DEATH, m_creature); @@ -267,65 +244,99 @@ struct MANGOS_DLL_DECL boss_lady_vashjAI : public ScriptedAI m_pInstance->SetData(TYPE_LADYVASHJ_EVENT, DONE); } - void CastShootOrMultishot() + void JustReachedHome() { - //Shoot: Used in m_uiPhases 1 and 3 after Entangle or while having nobody in melee range. A shot that hits her target for 4097-5543 Physical damage. - //Multishot: Used in m_uiPhases 1 and 3 after Entangle or while having nobody in melee range. A shot that hits 1 person and 4 people around him for 6475-7525 physical damage. - DoCastSpellIfCan(m_creature->getVictim(), urand(0,1) ? SPELL_SHOOT : SPELL_MULTI_SHOT); + if (m_pInstance) + m_pInstance->SetData(TYPE_LADYVASHJ_EVENT, FAIL); + } - if (urand(0, 2)) - DoScriptText(urand(0,1) ? SAY_BOWSHOT1 : SAY_BOWSHOT2, m_creature); + bool CanCastShootOrMultishot() + { + // It's not very clear how this should work - requires additional research! + if (DoCastSpellIfCan(m_creature->getVictim(), urand(0,1) ? SPELL_SHOOT : SPELL_MULTI_SHOT) == CAST_OK) + { + if (urand(0, 2)) + DoScriptText(urand(0,1) ? SAY_BOWSHOT1 : SAY_BOWSHOT2, m_creature); + + return true; + } + + return false; + } + + // Wrapper to inform the boss that a generator has been deactivated + void DoInformGeneratorStopped() + { + ++m_uiGeneratorsUsed; + + // Remove 5% of health on each generator used + // ToDo: research if this should be done by spell + m_creature->SetHealth(m_creature->GetHealth() - m_creature->GetMaxHealth()*.05f); + + // Check if all generators have been deactivated, or the creature doesn't have the spell barrier aura (in order to avoid eventual aura stacking bugs) + if (m_uiGeneratorsUsed == MAX_SHIELD_GEN || !m_creature->HasAura(SPELL_MAGIC_BARRIER)) + { + DoScriptText(SAY_PHASE3, m_creature); + SetCombatMovement(true); + + if (m_creature->getVictim()) + m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); + + m_uiPhase = PHASE_3; + m_uiRangedCheckTimer = 3000; + } } void UpdateAI(const uint32 uiDiff) { - //Return since we have no target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; if (m_uiPhase == PHASE_1 || m_uiPhase == PHASE_3) { - //m_uiShockBlast_Timer - if (m_uiShockBlast_Timer < uiDiff) + if (m_uiShockBlastTimer < uiDiff) { - //Randomly used in m_uiPhases 1 and 3 on Vashj's target, it's a Shock spell doing 8325-9675 nature damage and stunning the target for 5 seconds, during which she will not attack her target but switch to the next person on the aggro list. - DoCastSpellIfCan(m_creature->getVictim(), SPELL_SHOCK_BLAST); - - m_uiShockBlast_Timer = urand(1000, 15000); //random cooldown - }else m_uiShockBlast_Timer -= uiDiff; + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_SHOCK_BLAST) == CAST_OK) + m_uiShockBlastTimer = urand(1000, 15000); + } + else + m_uiShockBlastTimer -= uiDiff; - //m_uiStaticCharge_Timer - if (m_uiStaticCharge_Timer < uiDiff) + if (m_uiStaticChargeTimer < uiDiff) { - //Used on random people (only 1 person at any given time) in m_uiPhases 1 and 3, it's a debuff doing 2775 to 3225 Nature damage to the target and everybody in about 5 yards around it, every 1 seconds for 30 seconds. It can be removed by Cloak of Shadows, Iceblock, Divine Shield, etc, but not by Cleanse or Dispel Magic. - Unit *pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0); - - //cast Static Charge every 2 seconds for 20 seconds - if (pTarget && !pTarget->HasAura(SPELL_STATIC_CHARGE_TRIGGER)) - DoCastSpellIfCan(pTarget, SPELL_STATIC_CHARGE_TRIGGER); - - m_uiStaticCharge_Timer = urand(10000, 30000); - }else m_uiStaticCharge_Timer -= uiDiff; + if (Unit *pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0, SPELL_STATIC_CHARGE, SELECT_FLAG_IN_MELEE_RANGE)) + { + if (DoCastSpellIfCan(pTarget, SPELL_STATIC_CHARGE) == CAST_OK) + m_uiStaticChargeTimer = urand(10000, 30000); + } + } + else + m_uiStaticChargeTimer -= uiDiff; - //m_uiEntangle_Timer - if (m_uiEntangle_Timer < uiDiff) + if (m_uiEntangleTimer < uiDiff) { if (!m_bEntangle) { - //Used in m_uiPhases 1 and 3, it casts Entangling Roots on everybody in a 15 yard radius of Vashj, immobilzing them for 10 seconds and dealing 500 damage every 2 seconds. It's not a magic effect so it cannot be dispelled, but is removed by various buffs such as Cloak of Shadows or Blessing of Freedom. - DoCastSpellIfCan(m_creature->getVictim(), SPELL_ENTANGLE); - m_bEntangle = true; - m_uiEntangle_Timer = 10000; + if (DoCastSpellIfCan(m_creature, SPELL_ENTANGLE) == CAST_OK) + { + m_bEntangle = true; + m_uiEntangleTimer = 5000; + } } else { - CastShootOrMultishot(); - m_bEntangle = false; - m_uiEntangle_Timer = urand(20000, 25000); + // Cast Shoot or Multishot after Entangle + if (CanCastShootOrMultishot()) + { + m_bEntangle = false; + m_uiEntangleTimer = urand(20000, 25000); + } } - }else m_uiEntangle_Timer -= uiDiff; + } + else + m_uiEntangleTimer -= uiDiff; - //m_uiPhase 1 + // Phase 1 abilities if (m_uiPhase == PHASE_1) { //m_uiPhase 2 begins when Vashj hits 70%. She will run to the middle of her platform and surround herself in a shield making her invulerable. @@ -333,304 +344,147 @@ struct MANGOS_DLL_DECL boss_lady_vashjAI : public ScriptedAI { DoScriptText(SAY_PHASE2, m_creature); - if (m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() == CHASE_MOTION_TYPE) - { - //set false, so MoveChase is not triggered in AttackStart - SetCombatMovement(false); + SetCombatMovement(false); - m_creature->GetMotionMaster()->MovementExpired(); - m_creature->GetMotionMaster()->MovePoint(POINT_MOVE_CENTER, afMiddlePos[0], afMiddlePos[1], afMiddlePos[2]); - } + m_creature->GetMotionMaster()->Clear(); + m_creature->GetMotionMaster()->MovePoint(POINT_MOVE_CENTER, afMiddlePos[0], afMiddlePos[1], afMiddlePos[2]); m_uiPhase = PHASE_2; - return; + m_uiRangedCheckTimer = 10000; } } - //m_uiPhase PHASE_3 + // Phase 3 abilities else { - //m_uiSummonSporebat_Timer - if (m_uiSummonSporebat_Timer < uiDiff) + // ToDo: this is not very clear how it should work - requires additional research! + if (m_uiSummonSporebatTimer < uiDiff) { - m_creature->SummonCreature(NPC_TOXIC_SPOREBAT, - afSporebatPos[0], afSporebatPos[1], afSporebatPos[2], afSporebatPos[3], - TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); + m_creature->SummonCreature(NPC_TOXIC_SPOREBAT, afSporebatPos[0], afSporebatPos[1], afSporebatPos[2], afSporebatPos[3], TEMPSUMMON_DEAD_DESPAWN, 0); - //summon sporebats faster and faster - if (m_uiSummonSporebat_StaticTimer > 1000) - m_uiSummonSporebat_StaticTimer -= 1000; + // summon sporebats faster and faster + if (m_uiSummonSporebatStaticTimer > 1000) + m_uiSummonSporebatStaticTimer -= 1000; - m_uiSummonSporebat_Timer = m_uiSummonSporebat_StaticTimer; - }else m_uiSummonSporebat_Timer -= uiDiff; + m_uiSummonSporebatTimer = m_uiSummonSporebatStaticTimer; + } + else + m_uiSummonSporebatTimer -= uiDiff; } - //Melee attack - DoMeleeAttackIfReady(); - - //m_uiCheck_Timer - used to check if somebody is in melee range - if (m_uiCheck_Timer < uiDiff) + // If we are within range melee the target + if (m_creature->CanReachWithMeleeAttack(m_creature->getVictim())) + DoMeleeAttackIfReady(); + else { - //if nobody is in melee range - if (!m_creature->SelectAttackingTarget(ATTACKING_TARGET_TOPAGGRO, 0, uint32(0), SELECT_FLAG_IN_MELEE_RANGE)) - CastShootOrMultishot(); - - m_uiCheck_Timer = 1500; - }else m_uiCheck_Timer -= uiDiff; + // Cast Shoot or Multishot when nobody in melee range + if (m_uiRangedCheckTimer < uiDiff) + { + if (CanCastShootOrMultishot()) + m_uiRangedCheckTimer = urand(1000, 2000); + } + else + m_uiRangedCheckTimer -= uiDiff; + } } - //m_uiPhase PHASE_2 + // Phase 2 only else { - //m_uiForkedLightning_Timer - if (m_uiForkedLightning_Timer < uiDiff) + if (m_uiForkedLightningTimer < uiDiff) { - //Used constantly in m_uiPhase 2, it shoots out completely randomly targeted bolts of lightning which hit everybody in a roughtly 60 degree cone in front of Vashj for 2313-2687 nature damage. - Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0); - - if (!pTarget) - pTarget = m_creature->getVictim(); - - DoCastSpellIfCan(pTarget, SPELL_FORKED_LIGHTNING); - - m_uiForkedLightning_Timer = urand(3000, 9000); - }else m_uiForkedLightning_Timer -= uiDiff; - - //NPC_ENCHANTED_ELEMENTAL - if (m_uiEnchantedElemental_Timer < uiDiff) - { - if (Creature* pElemental = m_creature->SummonCreature(NPC_ENCHANTED_ELEMENTAL, afElementPos[m_uiEnchantedElemental_Pos][0], afElementPos[m_uiEnchantedElemental_Pos][1], afElementPos[m_uiEnchantedElemental_Pos][2], afElementPos[m_uiEnchantedElemental_Pos][3], TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 60000)) - pElemental->GetMotionMaster()->MoveFollow(m_creature, 0.0f, 0.0f); - - if (m_uiEnchantedElemental_Pos == 7) - m_uiEnchantedElemental_Pos = 0; - else - ++m_uiEnchantedElemental_Pos; - - m_uiEnchantedElemental_Timer = urand(10000, 15000); - }else m_uiEnchantedElemental_Timer -= uiDiff; + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, SPELL_FORKED_LIGHTNING) == CAST_OK) + m_uiForkedLightningTimer = urand(3000, 6000); + } + } + else + m_uiForkedLightningTimer -= uiDiff; - //NPC_TAINTED_ELEMENTAL - if (m_uiTaintedElemental_Timer < uiDiff) + if (m_uiEnchantedElementalTimer < uiDiff) { - uint32 uiPos = urand(0,7); - - m_creature->SummonCreature(NPC_TAINTED_ELEMENTAL, - afElementPos[uiPos][0], afElementPos[uiPos][1], afElementPos[uiPos][2], afElementPos[uiPos][3], - TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 15000); + uint8 uiPos = urand(0, 7); + m_creature->SummonCreature(NPC_ENCHANTED_ELEMENTAL, afElementPos[uiPos][0], afElementPos[uiPos][1], afElementPos[uiPos][2], afElementPos[uiPos][3], TEMPSUMMON_DEAD_DESPAWN, 0); - m_uiTaintedElemental_Timer = 120000; - }else m_uiTaintedElemental_Timer -= uiDiff; + m_uiEnchantedElementalTimer = urand(5000, 10000); + } + else + m_uiEnchantedElementalTimer -= uiDiff; - //NPC_COILFANG_ELITE - if (m_uiCoilfangElite_Timer < uiDiff) + if (m_uiTaintedElementalTimer) { - uint32 uiPos = urand(0,2); - - m_creature->SummonCreature(NPC_COILFANG_ELITE, - afCoilfangElitePos[uiPos][0], afCoilfangElitePos[uiPos][1], afCoilfangElitePos[uiPos][2], afCoilfangElitePos[uiPos][3], - TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 45000); + if (m_uiTaintedElementalTimer <= uiDiff) + { + uint8 uiPos = urand(0, 7); - //wowwiki says 50 seconds, bosskillers says 45 - m_uiCoilfangElite_Timer = urand(45000, 50000); - }else m_uiCoilfangElite_Timer -= uiDiff; + m_creature->SummonCreature(NPC_TAINTED_ELEMENTAL, afElementPos[uiPos][0], afElementPos[uiPos][1], afElementPos[uiPos][2], afElementPos[uiPos][3], TEMPSUMMON_DEAD_DESPAWN, 0); + m_uiTaintedElementalTimer = 0; + } + else + m_uiTaintedElementalTimer -= uiDiff; + } - //NPC_COILFANG_STRIDER - if (m_uiCoilfangStrider_Timer < uiDiff) + if (m_uiCoilfangEliteTimer < uiDiff) { - uint32 uiPos = urand(0,2); - - m_creature->SummonCreature(NPC_COILFANG_STRIDER, - afCoilfangStriderPos[uiPos][0], afCoilfangStriderPos[uiPos][1], afCoilfangStriderPos[uiPos][2], afCoilfangStriderPos[uiPos][3], - TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); + uint8 uiPos = urand(0, 2); - //wowwiki says 60 seconds, bosskillers says 60-70 - m_uiCoilfangStrider_Timer = urand(60000, 70000); - }else m_uiCoilfangStrider_Timer -= uiDiff; + m_creature->SummonCreature(NPC_COILFANG_ELITE, afCoilfangElitePos[uiPos][0], afCoilfangElitePos[uiPos][1], afCoilfangElitePos[uiPos][2], afCoilfangElitePos[uiPos][3], TEMPSUMMON_DEAD_DESPAWN, 0); + m_uiCoilfangEliteTimer = urand(45000, 50000); + } + else + m_uiCoilfangEliteTimer -= uiDiff; - //m_uiCheck_Timer - if (m_uiCheck_Timer < uiDiff) + if (m_uiCoilfangStriderTimer < uiDiff) { - //Start m_uiPhase 3 - if (m_pInstance && m_pInstance->GetData(TYPE_VASHJ_PHASE3_CHECK) == DONE) - { - DoScriptText(SAY_PHASE3, m_creature); - - //set life 50%, not correct. Must remove 5% for each generator switched off - m_creature->SetHealth(m_creature->GetMaxHealth()/2); + uint8 uiPos = urand(0, 2); - //m_creature->RemoveAurasDueToSpell(SPELL_MAGIC_BARRIER); - - SetCombatMovement(true); - - //return to chase top aggro - if (m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() != CHASE_MOTION_TYPE) - m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); - - m_uiPhase = PHASE_3; - } - m_uiCheck_Timer = 1000; - }else m_uiCheck_Timer -= uiDiff; + m_creature->SummonCreature(NPC_COILFANG_STRIDER, afCoilfangStriderPos[uiPos][0], afCoilfangStriderPos[uiPos][1], afCoilfangStriderPos[uiPos][2], afCoilfangStriderPos[uiPos][3], TEMPSUMMON_DEAD_DESPAWN, 0); + m_uiCoilfangStriderTimer = urand(60000, 70000); + } + else + m_uiCoilfangStriderTimer -= uiDiff; } } }; -//Enchanted Elemental -//If one of them reaches Vashj he will increase her damage done by 5%. struct MANGOS_DLL_DECL mob_enchanted_elementalAI : public ScriptedAI { mob_enchanted_elementalAI(Creature* pCreature) : ScriptedAI(pCreature) { - m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); SetCombatMovement(false); Reset(); } - ScriptedInstance *m_pInstance; // the instance - void Reset() { } void MoveInLineOfSight(Unit* pWho) { - if (m_pInstance) - { - if (Creature* pVashj = m_pInstance->GetSingleCreatureFromStorage(NPC_LADYVASHJ)) - { - if (pVashj->IsWithinDistInMap(m_creature, INTERACTION_DISTANCE)) - { - //increase lady vashj damage - if (pVashj->isAlive() && pVashj->isInCombat()) - m_creature->CastSpell(pVashj, SPELL_SURGE, false, NULL, NULL, pVashj->GetObjectGuid()); - else - m_creature->SetDeathState(JUST_DIED); - } - } - } + // Buff Lady Vashj on range check - spell has script target + if (pWho->GetEntry() == NPC_LADYVASHJ && pWho->IsWithinDistInMap(m_creature, INTERACTION_DISTANCE) && pWho->IsWithinLOSInMap(m_creature)) + DoCastSpellIfCan(m_creature, SPELL_SURGE, CAST_TRIGGERED); } + void AttackStart(Unit* pWho) { } void UpdateAI(const uint32 uiDiff) { } }; -//Tainted Elemental -//This mob has 7,900 life, doesn't move, and shoots Poison Bolts at one person anywhere in the area, doing 3,000 nature damage and placing a posion doing 2,000 damage every 2 seconds. He will switch targets often, or sometimes just hang on a single player, but there is nothing you can do about it except heal the damage and kill the Tainted Elemental -struct MANGOS_DLL_DECL mob_tainted_elementalAI : public ScriptedAI +bool GOUse_go_shield_generator(Player* pPlayer, GameObject* pGo) { - mob_tainted_elementalAI(Creature* pCreature) : ScriptedAI(pCreature) + // Interrupt Magic barrier spell casting, inform the boss and make the GO unusable + if (ScriptedInstance* pInstance = (ScriptedInstance*)pGo->GetInstanceData()) { - m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - SetCombatMovement(false); - Reset(); - } - - ScriptedInstance* m_pInstance; // the instance + if (Creature* pGenerator = GetClosestCreatureWithEntry(pGo, NPC_SHIELD_GENERATOR, 5.0f)) + pGenerator->InterruptNonMeleeSpells(false); - // timers - uint32 m_uiPoisonBolt_Timer; - - void Reset() - { - m_uiPoisonBolt_Timer = urand(5000, 10000); - } - - void UpdateAI(const uint32 uiDiff) - { - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - //m_uiPoisonBolt_Timer - if (m_uiPoisonBolt_Timer < uiDiff) + if (Creature* pVashj = pInstance->GetSingleCreatureFromStorage(NPC_LADYVASHJ)) { - Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0); - - if (pTarget && pTarget->IsWithinDistInMap(m_creature, 30.0f)) - DoCastSpellIfCan(pTarget, SPELL_POISON_BOLT); - - m_uiPoisonBolt_Timer = urand(5000, 10000); - }else m_uiPoisonBolt_Timer -= uiDiff; - } -}; - -enum -{ - SPELL_CLEAVE = 31345, - SPELL_MIND_BLAST = 41374 -}; - -//can probably be removed -struct MANGOS_DLL_DECL mob_shield_generator_channelAI : public ScriptedAI -{ - mob_shield_generator_channelAI(Creature* pCreature) : ScriptedAI(pCreature) - { - m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - Reset(); - } - - ScriptedInstance* m_pInstance; // the instance - - void Reset() { } - - void MoveInLineOfSight(Unit* pWho) { } -}; - -//this is wrong, alternative script needed -bool ItemUse_item_tainted_core(Player* pPlayer, Item* pItem, SpellCastTargets const& sctTargets) -{ - ScriptedInstance* pInstance = (ScriptedInstance*)pPlayer->GetInstanceData(); + if (boss_lady_vashjAI* pLadyAI = dynamic_cast(pVashj->AI())) + pLadyAI->DoInformGeneratorStopped(); + } - if (!pInstance) - { - error_log("SD2: Lady Vashj Tainted Core: Instance Script Not Initialized"); - return true; + pGo->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NO_INTERACT); } - Creature* pVashj = pInstance->GetSingleCreatureFromStorage(NPC_LADYVASHJ); - - if (!pVashj) - return true; - - boss_lady_vashjAI* pVashjAI = dynamic_cast(pVashj->AI()); - - if (pVashjAI && pVashjAI->m_uiPhase == 2) - { - if (sctTargets.getGOTarget() && sctTargets.getGOTarget()->GetTypeId()==TYPEID_GAMEOBJECT) - { - uint32 uiIdentifier; - uint8 uiChannelIdentifier; - switch(sctTargets.getGOTarget()->GetEntry()) - { - case 185052: - uiIdentifier = TYPE_SHIELDGENERATOR1; - uiChannelIdentifier = 0; - break; - case 185053: - uiIdentifier = TYPE_SHIELDGENERATOR2; - uiChannelIdentifier = 1; - break; - case 185051: - uiIdentifier = TYPE_SHIELDGENERATOR3; - uiChannelIdentifier = 2; - break; - case 185054: - uiIdentifier = TYPE_SHIELDGENERATOR4; - uiChannelIdentifier = 3; - break; - default: - return true; - break; - } - - if (pInstance->GetData(uiIdentifier) == DONE) - return true; - - //get and remove channel - if (Creature* pChannel = pVashj->GetMap()->GetCreature(pVashjAI->m_auiShieldGeneratorChannel[uiChannelIdentifier])) - pChannel->SetDeathState(JUST_DIED); //calls Unsummon() - - pInstance->SetData(uiIdentifier, DONE); - - //remove this item - pPlayer->DestroyItemCount(31088, 1, true); - } - } - return true; + return false; } CreatureAI* GetAI_boss_lady_vashj(Creature* pCreature) @@ -643,16 +497,6 @@ CreatureAI* GetAI_mob_enchanted_elemental(Creature* pCreature) return new mob_enchanted_elementalAI(pCreature); } -CreatureAI* GetAI_mob_tainted_elemental(Creature* pCreature) -{ - return new mob_tainted_elementalAI(pCreature); -} - -CreatureAI* GetAI_mob_shield_generator_channel(Creature* pCreature) -{ - return new mob_shield_generator_channelAI(pCreature); -} - void AddSC_boss_lady_vashj() { Script* pNewScript; @@ -668,17 +512,7 @@ void AddSC_boss_lady_vashj() pNewScript->RegisterSelf(); pNewScript = new Script; - pNewScript->Name = "mob_tainted_elemental"; - pNewScript->GetAI = &GetAI_mob_tainted_elemental; - pNewScript->RegisterSelf(); - - pNewScript = new Script; - pNewScript->Name = "mob_shield_generator_channel"; - pNewScript->GetAI = &GetAI_mob_shield_generator_channel; - pNewScript->RegisterSelf(); - - pNewScript = new Script; - pNewScript->Name = "item_tainted_core"; - pNewScript->pItemUse = &ItemUse_item_tainted_core; + pNewScript->Name = "go_shield_generator"; + pNewScript->pGOUse = &GOUse_go_shield_generator; pNewScript->RegisterSelf(); } diff --git a/scripts/outland/coilfang_reservoir/serpent_shrine/instance_serpent_shrine.cpp b/scripts/outland/coilfang_reservoir/serpent_shrine/instance_serpent_shrine.cpp index 3838e21b8..c04f94ea5 100644 --- a/scripts/outland/coilfang_reservoir/serpent_shrine/instance_serpent_shrine.cpp +++ b/scripts/outland/coilfang_reservoir/serpent_shrine/instance_serpent_shrine.cpp @@ -42,7 +42,6 @@ instance_serpentshrine_cavern::instance_serpentshrine_cavern(Map* pMap) : Script void instance_serpentshrine_cavern::Initialize() { memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); - memset(&m_auiShieldGenerator, 0, sizeof(m_auiShieldGenerator)); } bool instance_serpentshrine_cavern::IsEncounterInProgress() const @@ -73,6 +72,22 @@ void instance_serpentshrine_cavern::OnCreatureCreate(Creature* pCreature) case NPC_HYDROSS_BEAM_HELPER: m_lBeamHelpersGUIDList.push_back(pCreature->GetObjectGuid()); break; + case NPC_SHIELD_GENERATOR: + m_lShieldGeneratorGUIDList.push_back(pCreature->GetObjectGuid()); + break; + } +} + +void instance_serpentshrine_cavern::OnObjectCreate(GameObject* pGo) +{ + switch(pGo->GetEntry()) + { + case GO_SHIELD_GENERATOR_1: + case GO_SHIELD_GENERATOR_2: + case GO_SHIELD_GENERATOR_3: + case GO_SHIELD_GENERATOR_4: + m_mGoEntryGuidStore[pGo->GetEntry()] = pGo->GetObjectGuid(); + break; } } @@ -81,7 +96,7 @@ void instance_serpentshrine_cavern::SetData(uint32 uiType, uint32 uiData) switch (uiType) { case TYPE_HYDROSS_EVENT: - m_auiEncounter[0] = uiData; + m_auiEncounter[uiType] = uiData; break; case TYPE_LEOTHERAS_EVENT: m_auiEncounter[1] = uiData; @@ -97,25 +112,28 @@ void instance_serpentshrine_cavern::SetData(uint32 uiType, uint32 uiData) } break; case TYPE_THELURKER_EVENT: - m_auiEncounter[2] = uiData; - break; case TYPE_KARATHRESS_EVENT: - m_auiEncounter[3] = uiData; - break; case TYPE_MOROGRIM_EVENT: - m_auiEncounter[4] = uiData; + m_auiEncounter[uiType] = uiData; break; case TYPE_LADYVASHJ_EVENT: - if (uiData == NOT_STARTED) - memset(&m_auiShieldGenerator, 0, sizeof(m_auiShieldGenerator)); - m_auiEncounter[5] = uiData; + m_auiEncounter[uiType] = uiData; + if (uiData == FAIL) + { + // interrupt the shield + for (GuidList::const_iterator itr = m_lShieldGeneratorGUIDList.begin(); itr != m_lShieldGeneratorGUIDList.end(); ++itr) + { + if (Creature* pGenerator = instance->GetCreature(*itr)) + pGenerator->InterruptNonMeleeSpells(false); + } + + // reset generators + DoToggleGameObjectFlags(GO_SHIELD_GENERATOR_1, GO_FLAG_NO_INTERACT, false); + DoToggleGameObjectFlags(GO_SHIELD_GENERATOR_2, GO_FLAG_NO_INTERACT, false); + DoToggleGameObjectFlags(GO_SHIELD_GENERATOR_3, GO_FLAG_NO_INTERACT, false); + DoToggleGameObjectFlags(GO_SHIELD_GENERATOR_4, GO_FLAG_NO_INTERACT, false); + } break; - case TYPE_SHIELDGENERATOR1: - case TYPE_SHIELDGENERATOR2: - case TYPE_SHIELDGENERATOR3: - case TYPE_SHIELDGENERATOR4: - m_auiShieldGenerator[uiType - TYPE_SHIELDGENERATOR1] = uiData; - return; } if (uiData == DONE) @@ -158,31 +176,10 @@ void instance_serpentshrine_cavern::Load(const char* chrIn) uint32 instance_serpentshrine_cavern::GetData(uint32 uiType) { - switch (uiType) - { - case TYPE_HYDROSS_EVENT: return m_auiEncounter[0]; - case TYPE_LEOTHERAS_EVENT: return m_auiEncounter[1]; - case TYPE_THELURKER_EVENT: return m_auiEncounter[2]; - case TYPE_KARATHRESS_EVENT: return m_auiEncounter[3]; - case TYPE_MOROGRIM_EVENT: return m_auiEncounter[4]; - case TYPE_LADYVASHJ_EVENT: return m_auiEncounter[5]; - - case TYPE_SHIELDGENERATOR1: return m_auiShieldGenerator[0]; - case TYPE_SHIELDGENERATOR2: return m_auiShieldGenerator[1]; - case TYPE_SHIELDGENERATOR3: return m_auiShieldGenerator[2]; - case TYPE_SHIELDGENERATOR4: return m_auiShieldGenerator[3]; - - case TYPE_VASHJ_PHASE3_CHECK: - for(uint8 i = 0; i < MAX_GENERATOR; ++i) - { - if (m_auiShieldGenerator[i] != DONE) - return NOT_STARTED; - } - return DONE; + if (uiType < MAX_ENCOUNTER) + return m_auiEncounter[uiType]; - default: - return 0; - } + return 0; } void instance_serpentshrine_cavern::OnCreatureEnterCombat(Creature* pCreature) diff --git a/scripts/outland/coilfang_reservoir/serpent_shrine/serpent_shrine.h b/scripts/outland/coilfang_reservoir/serpent_shrine/serpent_shrine.h index d1c8aec42..d2318ce3b 100644 --- a/scripts/outland/coilfang_reservoir/serpent_shrine/serpent_shrine.h +++ b/scripts/outland/coilfang_reservoir/serpent_shrine/serpent_shrine.h @@ -8,21 +8,14 @@ enum { MAX_ENCOUNTER = 6, - MAX_GENERATOR = 4, MAX_SPELLBINDERS = 3, - TYPE_HYDROSS_EVENT = 1, - TYPE_KARATHRESS_EVENT = 2, - TYPE_LADYVASHJ_EVENT = 3, - TYPE_LEOTHERAS_EVENT = 4, - TYPE_MOROGRIM_EVENT = 5, - TYPE_THELURKER_EVENT = 6, - TYPE_VASHJ_PHASE3_CHECK = 7, - - TYPE_SHIELDGENERATOR1 = 8, - TYPE_SHIELDGENERATOR2 = TYPE_SHIELDGENERATOR1 + 1, - TYPE_SHIELDGENERATOR3 = TYPE_SHIELDGENERATOR1 + 2, - TYPE_SHIELDGENERATOR4 = TYPE_SHIELDGENERATOR1 + 3, + TYPE_HYDROSS_EVENT = 0, + TYPE_KARATHRESS_EVENT = 1, + TYPE_LADYVASHJ_EVENT = 2, + TYPE_LEOTHERAS_EVENT = 3, + TYPE_MOROGRIM_EVENT = 4, + TYPE_THELURKER_EVENT = 5, //NPC_KARATHRESS = 21214, NPC_CARIBDIS = 21964, @@ -32,6 +25,23 @@ enum NPC_LADYVASHJ = 21212, NPC_GREYHEART_SPELLBINDER = 21806, NPC_HYDROSS_BEAM_HELPER = 21933, + NPC_SHIELD_GENERATOR = 19870, + + GO_SHIELD_GENERATOR_1 = 185051, + GO_SHIELD_GENERATOR_2 = 185052, + GO_SHIELD_GENERATOR_3 = 185053, + GO_SHIELD_GENERATOR_4 = 185054, + + // Objects and doors no longer used since 2.4.0 + //GO_CONSOLE_HYDROSS = 185117, + //GO_CONSOLE_LURKER = 185118, + //GO_CONSOLE_LEOTHERAS = 185115, + //GO_CONSOLE_KARATHRESS = 185114, + //GO_CONSOLE_MOROGRIM = 185116, + //GO_CONSOLE_VASHJ = 184568, + //GO_BRIDGE_PART_1 = 184203, + //GO_BRIDGE_PART_2 = 184204, + //GO_BRIDGE_PART_3 = 184205, SPELL_LEOTHERAS_BANISH = 37546, }; @@ -47,24 +57,26 @@ class MANGOS_DLL_DECL instance_serpentshrine_cavern : public ScriptedInstance void OnCreatureCreate(Creature* pCreature); void OnCreatureEnterCombat(Creature* pCreature); void OnCreatureDeath(Creature* pCreature); + void OnObjectCreate(GameObject* pGo); void SetData(uint32 uiType, uint32 uiData); uint32 GetData(uint32 uiType); void GetBeamHelpersGUIDList(GuidList &lList) { lList = m_lBeamHelpersGUIDList; } + void GetShieldGeneratorsGUIDList(GuidList &lList) { lList = m_lShieldGeneratorGUIDList; } const char* Save() { return m_strInstData.c_str(); } void Load(const char* chrIn); private: uint32 m_auiEncounter[MAX_ENCOUNTER]; - uint32 m_auiShieldGenerator[MAX_GENERATOR]; std::string m_strInstData; uint32 m_uiSpellBinderCount; GuidList m_lSpellBindersGUIDList; GuidList m_lBeamHelpersGUIDList; + GuidList m_lShieldGeneratorGUIDList; }; #endif diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index bfc28cc9a..5e77dc24b 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2729" + #define SD2_REVISION_NR "2730" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 3873fe478..d27ce6413 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -140,7 +140,6 @@ UPDATE creature_template SET ScriptName='guard_shattrath_scryer' WHERE entry=185 UPDATE item_template SET ScriptName='item_arcane_charges' WHERE entry=34475; UPDATE item_template SET ScriptName='item_flying_machine' WHERE entry IN (34060,34061); UPDATE item_template SET ScriptName='item_gor_dreks_ointment' WHERE entry=30175; -UPDATE item_template SET ScriptName='item_tainted_core' WHERE entry=31088; UPDATE item_template SET ScriptName='item_petrov_cluster_bombs' WHERE entry=33098; /* NPC (usually creatures to be found in more than one specific zone) */ @@ -453,8 +452,7 @@ UPDATE creature_template SET ScriptName='mob_water_globule' WHERE entry=21913; /* Lady Vashj event */ UPDATE creature_template SET ScriptName='boss_lady_vashj' WHERE entry=21212; UPDATE creature_template SET ScriptName='mob_enchanted_elemental' WHERE entry=21958; -UPDATE creature_template SET ScriptName='mob_tainted_elemental' WHERE entry=22009; -UPDATE creature_template SET ScriptName='mob_shield_generator_channel' WHERE entry=19870; +UPDATE gameobject_template SET ScriptName='go_shield_generator' WHERE entry IN (185051,185052,185053,185054); /* The Lurker Below event */ UPDATE gameobject_template SET ScriptName='go_strange_pool' WHERE entry=184956; UPDATE creature_template SET ScriptName='boss_the_lurker_below' WHERE entry=21217; diff --git a/sql/updates/r2730_mangos.sql b/sql/updates/r2730_mangos.sql new file mode 100644 index 000000000..4d16e708a --- /dev/null +++ b/sql/updates/r2730_mangos.sql @@ -0,0 +1,4 @@ +UPDATE item_template SET ScriptName='' WHERE entry=31088; +UPDATE creature_template SET ScriptName='' WHERE entry=19870; +UPDATE creature_template SET ScriptName='' WHERE entry=22009; +UPDATE gameobject_template SET ScriptName='go_shield_generator' WHERE entry IN (185051,185052,185053,185054); From 48505e94a6d0915ecafc64c72bd6259fc187a9f5 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Mon, 8 Oct 2012 02:39:52 +0300 Subject: [PATCH 0726/1172] [2731] Cleanup and rewrite of the Magtheridon script - removed most of the old hacks and workarounds - improved some encounter mechanics - move the spell mechanics to the core Known issues or workarounds: - the soul transfer spell require core support - quake event isn't very clear. The original spell war removed. Now it's implemented with a script workaround. - the transition to phase 3 spells require additional research - the debris fall in phase 3 requires additional research and core support. Now it's implemented by a script workaround - the Mantricon cubes require core support, so they won't interrupt player spell casting when clicked - the DB target trigger spawns need to be checked --- .../blood_furnace/blood_furnace.h | 4 + .../blood_furnace/instance_blood_furnace.cpp | 15 +- .../magtheridons_lair/boss_magtheridon.cpp | 770 ++++++++---------- .../instance_magtheridons_lair.cpp | 259 +++--- .../magtheridons_lair/magtheridons_lair.h | 29 +- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 + sql/scriptdev2_script_full.sql | 15 +- sql/updates/r2731_mangos.sql | 1 + sql/updates/r2731_scriptdev2.sql | 4 + 10 files changed, 502 insertions(+), 598 deletions(-) create mode 100644 sql/updates/r2731_mangos.sql create mode 100644 sql/updates/r2731_scriptdev2.sql diff --git a/scripts/outland/hellfire_citadel/blood_furnace/blood_furnace.h b/scripts/outland/hellfire_citadel/blood_furnace/blood_furnace.h index 8dcde9415..5490d8b76 100644 --- a/scripts/outland/hellfire_citadel/blood_furnace/blood_furnace.h +++ b/scripts/outland/hellfire_citadel/blood_furnace/blood_furnace.h @@ -41,6 +41,9 @@ enum SAY_BROGGOK_INTRO = -1542015, }; +// Random Magtheridon taunt +static const int32 aRandomTaunt[]= {-1544000, -1544001, -1544002, -1544003, -1544004, -1544005}; + struct BroggokEventInfo { BroggokEventInfo() : m_bIsCellOpened(false), m_uiKilledOrcCount(0) {} @@ -87,6 +90,7 @@ class MANGOS_DLL_DECL instance_blood_furnace : public ScriptedInstance uint32 m_uiBroggokEventTimer; // Timer for opening the event cages; only on heroic mode = 30 secs uint32 m_uiBroggokEventPhase; + uint32 m_uiRandYellTimer; // Random yell for Magtheridon GuidList m_luiNascentOrcGuids; GuidList m_lChannelersGuids; diff --git a/scripts/outland/hellfire_citadel/blood_furnace/instance_blood_furnace.cpp b/scripts/outland/hellfire_citadel/blood_furnace/instance_blood_furnace.cpp index d69b6da44..a9b1db149 100644 --- a/scripts/outland/hellfire_citadel/blood_furnace/instance_blood_furnace.cpp +++ b/scripts/outland/hellfire_citadel/blood_furnace/instance_blood_furnace.cpp @@ -26,7 +26,8 @@ EndScriptData */ instance_blood_furnace::instance_blood_furnace(Map* pMap) : ScriptedInstance(pMap), m_uiBroggokEventTimer(30000), - m_uiBroggokEventPhase(0) + m_uiBroggokEventPhase(0), + m_uiRandYellTimer(90000) { Initialize(); } @@ -42,6 +43,7 @@ void instance_blood_furnace::OnCreatureCreate(Creature* pCreature) { case NPC_BROGGOK: case NPC_KELIDAN_THE_BREAKER: + case NPC_MAGTHERIDON: m_mNpcEntryGuidStore[pCreature->GetEntry()] = pCreature->GetObjectGuid(); break; @@ -281,6 +283,17 @@ void instance_blood_furnace::Update(uint32 uiDiff) else m_uiBroggokEventTimer -= uiDiff; } + + if (m_uiRandYellTimer < uiDiff) + { + if (Creature* pMagtheridon = GetSingleCreatureFromStorage(NPC_MAGTHERIDON)) + { + DoScriptText(aRandomTaunt[urand(0, 5)], pMagtheridon); + m_uiRandYellTimer = 90000; + } + } + else + m_uiRandYellTimer -= uiDiff; } uint32 instance_blood_furnace::GetData(uint32 uiType) diff --git a/scripts/outland/hellfire_citadel/magtheridons_lair/boss_magtheridon.cpp b/scripts/outland/hellfire_citadel/magtheridons_lair/boss_magtheridon.cpp index ce8f99442..4f9609056 100644 --- a/scripts/outland/hellfire_citadel/magtheridons_lair/boss_magtheridon.cpp +++ b/scripts/outland/hellfire_citadel/magtheridons_lair/boss_magtheridon.cpp @@ -17,32 +17,18 @@ /* ScriptData SDName: Boss_Magtheridon SD%Complete: 80 -SDComment: Some spell issues with target selection. +SDComment: Phase 3 transition requires additional research. The Manticron cubes require additional core support. Timers need to be revised. SDCategory: Hellfire Citadel, Magtheridon's lair EndScriptData */ #include "precompiled.h" #include "magtheridons_lair.h" -struct Yell -{ - int32 id; -}; - -static Yell RandomTaunt[]= -{ - {-1544000}, - {-1544001}, - {-1544002}, - {-1544003}, - {-1544004}, - {-1544005}, -}; - enum { - SAY_FREED = -1544006, - SAY_AGGRO = -1544007, + // yells + SAY_AGGRO_1 = -1544006, + SAY_AGGRO_2 = -1544007, SAY_BANISH = -1544008, SAY_CHAMBER_DESTROY = -1544009, SAY_PLAYER_KILLED = -1544010, @@ -50,459 +36,272 @@ enum EMOTE_GENERIC_ENRAGED = -1000003, EMOTE_BLASTNOVA = -1544013, - EMOTE_BEGIN = -1544014, EMOTE_FREED = -1544015, + // Maghteridon spells + SPELL_SHADOW_CAGE_DUMMY = 30205, // dummy aura - in creature_template_addon SPELL_BLASTNOVA = 30616, SPELL_CLEAVE = 30619, - SPELL_QUAKE_TRIGGER = 30576, // must be cast with 30561 as the proc spell + //SPELL_QUAKE = 30657, // spell may be related but probably used in the recent versions of the script + //SPELL_QUAKE_TRIGGER = 30576, // spell removed from DBC - triggers 30571 SPELL_QUAKE_KNOCKBACK = 30571, + SPELL_BLAZE = 30541, // triggers 30542 + SPELL_BERSERK = 27680, - SPELL_BLAZE_TRAP = 30542, - SPELL_DEBRIS_VISUAL = 30632, + // phase 3 spells SPELL_CAMERA_SHAKE = 36455, - SPELL_BERSERK = 27680, + SPELL_DEBRIS_KNOCKDOWN = 36449, + SPELL_QUAKE_EFFECT = 30572, // sets the debris during phase 3 - triggers 30632 + SPELL_DEBRIS_DAMAGE = 30631, + SPELL_DEBRIS_VISUAL = 30632, - SPELL_SHADOW_CAGE_DUMMY = 30205, + // Cube spells SPELL_SHADOW_CAGE = 30168, - - SPELL_SHADOW_GRASP_DUMMY = 30207, - SPELL_SHADOW_GRASP = 30410, SPELL_SHADOW_GRASP_VISUAL = 30166, - SPELL_MIND_EXHAUSTION = 44032, // Casted by the cubes when channeling ends - - SPELL_FIRE_BLAST = 37110, + SPELL_SHADOW_GRASP = 30410, + SPELL_MIND_EXHAUSTION = 44032, + // Hellfire channeler spells + SPELL_SHADOW_GRASP_DUMMY = 30207, // dummy spell - cast on OOC timer SPELL_SHADOW_BOLT_VOLLEY = 30510, SPELL_DARK_MENDING = 30528, SPELL_FEAR = 30530, // 39176 SPELL_BURNING_ABYSSAL = 30511, + SPELL_SOUL_TRANSFER = 30531, - NPC_MAGS_ROOM = 17516, + // Abyss spells + SPELL_FIRE_BLAST = 37110, + + // summons + //NPC_MAGS_ROOM = 17516, NPC_BURNING_ABYSS = 17454, + NPC_RAID_TRIGGER = 17376, - // count of clickers needed to interrupt blast nova - MAX_CLICK = 5 + MAX_QUAKE_COUNT = 7, }; -typedef std::map CubeMap; +/*###### +## boss_magtheridon +######*/ -struct MANGOS_DLL_DECL mob_abyssalAI : public ScriptedAI +struct MANGOS_DLL_DECL boss_magtheridonAI : public ScriptedAI { - mob_abyssalAI(Creature* pCreature) : ScriptedAI(pCreature) + boss_magtheridonAI(Creature* pCreature) : ScriptedAI(pCreature) { - m_uiTriggerId = 0; - m_uiDespawn_Timer = 60000; + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); Reset(); } - uint32 m_uiFireBlast_Timer; - uint32 m_uiDespawn_Timer; - uint32 m_uiTriggerId; + ScriptedInstance* m_pInstance; - void Reset() - { - m_uiFireBlast_Timer = 6000; - } + uint32 m_uiBerserkTimer; + uint32 m_uiQuakeTimer; + uint32 m_uiCleaveTimer; + uint32 m_uiBlastNovaTimer; + uint32 m_uiBlazeTimer; + uint32 m_uiDebrisTimer; + uint32 m_uiTransitionTimer; + uint8 m_uiTransitionCount; + uint8 m_uiQuakeCount; - void SpellHit(Unit* pCaster, const SpellEntry* pSpell) - { - if (m_uiTriggerId == 2 && pSpell->Id == SPELL_BLAZE_TARGET) - { - m_creature->CastSpell(m_creature, SPELL_BLAZE_TRAP, true); - m_creature->SetVisibility(VISIBILITY_OFF); - m_uiDespawn_Timer = 130000; - } - } + bool m_bIsPhase3; - void SetTrigger(uint32 uiTrigger) + void Reset() { - m_uiTriggerId = uiTrigger; - m_creature->SetDisplayId(11686); + m_uiBerserkTimer = 20*MINUTE*IN_MILLISECONDS; + m_uiQuakeTimer = 30000; + m_uiBlazeTimer = urand(10000, 15000); + m_uiBlastNovaTimer = 60000; + m_uiCleaveTimer = 15000; + m_uiTransitionTimer = 0; + m_uiTransitionCount = 0; + m_uiDebrisTimer = urand(20000, 30000); - if (m_uiTriggerId == 1) //debris - { - m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - m_creature->CastSpell(m_creature, SPELL_DEBRIS_VISUAL, true); - m_uiFireBlast_Timer = 5000; - m_uiDespawn_Timer = 10000; - } - } + m_bIsPhase3 = false; - void Aggro(Unit* pWho) - { - m_creature->SetInCombatWithZone(); - } + SetCombatMovement(true); - void AttackStart(Unit* pWho) - { - if (m_uiTriggerId) - return; - - ScriptedAI::AttackStart(pWho); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); } - void MoveInLineOfSight(Unit* pWho) + void Aggro(Unit* pWho) { - if (m_uiTriggerId) - return; + DoScriptText(EMOTE_FREED, m_creature); + DoScriptText(urand(0, 1) ? SAY_AGGRO_1 : SAY_AGGRO_2, m_creature); - ScriptedAI::MoveInLineOfSight(pWho); + m_creature->RemoveAurasDueToSpell(SPELL_SHADOW_CAGE_DUMMY); } - void UpdateAI(const uint32 uiDiff) + void KilledUnit(Unit* pVictim) { - if (m_uiTriggerId) - { - if (m_uiTriggerId == 1) - { - if (m_uiFireBlast_Timer < uiDiff) - { - m_creature->CastSpell(m_creature, SPELL_DEBRIS_DAMAGE, true); - m_uiTriggerId = 3; - } - else - m_uiFireBlast_Timer -= uiDiff; - } - } - - if (m_uiDespawn_Timer < uiDiff) - { - m_creature->ForcedDespawn(); - return; - } - else - m_uiDespawn_Timer -= uiDiff; - - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - if (m_uiFireBlast_Timer < uiDiff) - { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_FIRE_BLAST); - m_uiFireBlast_Timer = urand(5000, 15000); - } - else - m_uiFireBlast_Timer -= uiDiff; - - DoMeleeAttackIfReady(); + DoScriptText(SAY_PLAYER_KILLED, m_creature); } -}; -struct MANGOS_DLL_DECL boss_magtheridonAI : public ScriptedAI -{ - boss_magtheridonAI(Creature* pCreature) : ScriptedAI(pCreature) + void JustDied(Unit* pKiller) { - m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - Reset(); - } - - CubeMap m_mCube; - - ScriptedInstance* m_pInstance; - - uint32 m_uiRandChat_Timer; - - uint32 m_uiBerserk_Timer; - uint32 m_uiQuake_Timer; - uint32 m_uiCleave_Timer; - uint32 m_uiBlastNova_Timer; - uint32 m_uiBlaze_Timer; - uint32 m_uiPhase3_Timer; - uint32 m_uiPhase3_Count; - - bool m_bIsIntroDone; - bool m_bIsPhase3; - bool m_bNeedCheckCube; + if (m_pInstance) + m_pInstance->SetData(TYPE_MAGTHERIDON_EVENT, DONE); - void Reset() - { - m_uiRandChat_Timer = 90000; - - m_uiBerserk_Timer = 1320000; - m_uiQuake_Timer = 40000; - m_uiPhase3_Timer = 5000; - m_uiPhase3_Count = 0; - m_uiBlaze_Timer = urand(10000, 30000); - m_uiBlastNova_Timer = 60000; - m_uiCleave_Timer = 15000; - - m_bIsIntroDone = false; - m_bIsPhase3 = false; - m_bNeedCheckCube = false; - - m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + DoScriptText(SAY_DEATH, m_creature); } void JustReachedHome() { if (m_pInstance) - { - m_pInstance->SetData(TYPE_MAGTHERIDON_EVENT, NOT_STARTED); - m_pInstance->SetData(TYPE_HALL_COLLAPSE, NOT_STARTED); - } + m_pInstance->SetData(TYPE_MAGTHERIDON_EVENT, FAIL); } - void SetClicker(GameObject* pGo, Player* pPlayer) - { - // to avoid multiclicks from 1 cube - if (ObjectGuid guid = m_mCube[pGo->GetObjectGuid()]) - DebuffClicker(m_creature->GetMap()->GetPlayer(guid)); - - m_mCube[pGo->GetObjectGuid()] = pPlayer->GetObjectGuid(); - m_bNeedCheckCube = true; - } - - //function to interrupt channeling and debuff clicker with mind exhaused if second person clicks with same cube or after dispeling/ending shadow grasp DoT) - void DebuffClicker(Player* pClicker) + void SpellHit(Unit* pCaster, const SpellEntry* pSpell) { - if (!pClicker || !pClicker->isAlive()) - return; - - pClicker->RemoveAurasDueToSpell(SPELL_SHADOW_GRASP);// cannot interrupt triggered spells - pClicker->InterruptNonMeleeSpells(false); - pClicker->CastSpell(pClicker, SPELL_MIND_EXHAUSTION, true); + // When banished by the cubes + if (pSpell->Id == SPELL_SHADOW_CAGE) + DoScriptText(SAY_BANISH, m_creature); } - void MoveInLineOfSight(Unit* pWho) + void UpdateAI(const uint32 uiDiff) { - if (!m_bIsIntroDone) + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - ScriptedAI::MoveInLineOfSight(pWho); - } - - void NeedCheckCubeStatus() - { - uint32 ClickerNum = 0; - - // now checking if every clicker has debuff from manticron - // if not - apply mind exhaustion and delete from clicker's list - for(CubeMap::iterator i = m_mCube.begin(); i != m_mCube.end(); ++i) + if (m_uiBerserkTimer) { - Player* pClicker = m_creature->GetMap()->GetPlayer(i->second); - - if (!pClicker || !pClicker->HasAura(SPELL_SHADOW_GRASP, EFFECT_INDEX_1)) + if (m_uiBerserkTimer <= uiDiff) { - DebuffClicker(pClicker); - i->second.Clear(); + if (DoCastSpellIfCan(m_creature, SPELL_BERSERK) == CAST_OK) + { + DoScriptText(EMOTE_GENERIC_ENRAGED, m_creature); + m_uiBerserkTimer = 0; + } } else - ++ClickerNum; + m_uiBerserkTimer -= uiDiff; } - // if 5 clickers from other cubes apply shadow cage - if (ClickerNum >= MAX_CLICK && !m_creature->HasAura(SPELL_SHADOW_CAGE, EFFECT_INDEX_0) && m_creature->HasAura(SPELL_BLASTNOVA, EFFECT_INDEX_0)) + // Transition to phase 3 + if (m_uiTransitionTimer) { - DoScriptText(SAY_BANISH, m_creature); - m_creature->CastSpell(m_creature, SPELL_SHADOW_CAGE, true); - } - else - { - if (ClickerNum < MAX_CLICK && m_creature->HasAura(SPELL_SHADOW_CAGE, EFFECT_INDEX_0)) - m_creature->RemoveAurasDueToSpell(SPELL_SHADOW_CAGE); - } - - if (!ClickerNum) - m_bNeedCheckCube = false; - } - - void IntroDone() - { - if (!m_pInstance) - return; - - if (m_pInstance->GetData(TYPE_MAGTHERIDON_EVENT) == NOT_STARTED) - return; - - if (m_pInstance->GetData(TYPE_MAGTHERIDON_EVENT) == DONE) - return; - - m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - m_creature->RemoveAurasDueToSpell(SPELL_SHADOW_CAGE_DUMMY); - m_creature->clearUnitState(UNIT_STAT_STUNNED); - - DoScriptText(EMOTE_FREED, m_creature); - DoScriptText(SAY_FREED, m_creature); + if (m_uiTransitionTimer <= uiDiff) + { + switch (m_uiTransitionCount) + { + case 0: + // Shake the room + if (DoCastSpellIfCan(m_creature, SPELL_CAMERA_SHAKE) == CAST_OK) + { + if (m_pInstance) + m_pInstance->SetData(TYPE_MAGTHERIDON_EVENT, SPECIAL); - m_bIsIntroDone = true; - } + m_uiTransitionTimer = 8000; + } + break; + case 1: + if (DoCastSpellIfCan(m_creature, SPELL_DEBRIS_KNOCKDOWN) == CAST_OK) + m_uiTransitionTimer = 0; + break; + } - void Aggro(Unit* pWho) - { - DoScriptText(SAY_AGGRO, m_creature); - } + ++m_uiTransitionCount; + } + else + m_uiTransitionTimer -= uiDiff; - void SpellHit(Unit* pCaster, const SpellEntry* pSpell) - { - if (pSpell->Id == SPELL_SHADOW_GRASP_DUMMY) - { - m_creature->CastSpell(m_creature, SPELL_SHADOW_CAGE_DUMMY, false); - m_creature->addUnitState(UNIT_STAT_STUNNED); + // Workaround for missing spell: no other spells during transition + if (!m_uiTransitionCount) + return; } - } - - void KilledUnit(Unit* pVictim) - { - DoScriptText(SAY_PLAYER_KILLED, m_creature); - } - - void JustDied(Unit* pKiller) - { - if (m_pInstance) - m_pInstance->SetData(TYPE_MAGTHERIDON_EVENT, DONE); - - DoScriptText(SAY_DEATH, m_creature); - } - void UpdateAI(const uint32 uiDiff) - { - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + if (m_uiQuakeTimer < uiDiff) { - if (!m_bIsIntroDone) + // Workaround for missing spell + // Note: this won't really stun the boss, but it won't allow him to use other spells + if (!m_uiQuakeCount) { - IntroDone(); - return; + SetCombatMovement(false); + m_creature->GetMotionMaster()->Clear(); + m_creature->GetMotionMaster()->MoveIdle(); } - if (m_uiRandChat_Timer < uiDiff) + if (m_uiQuakeCount < MAX_QUAKE_COUNT) { - DoScriptText(RandomTaunt[rand()%6].id, m_creature); - m_uiRandChat_Timer = 90000; - } - else - m_uiRandChat_Timer -= uiDiff; - - return; - } - - if (m_bNeedCheckCube) - NeedCheckCubeStatus(); - - if (m_uiBerserk_Timer < uiDiff) - { - if (DoCastSpellIfCan(m_creature, SPELL_BERSERK) == CAST_OK) + if (DoCastSpellIfCan(m_creature, SPELL_QUAKE_KNOCKBACK) == CAST_OK) + { + m_uiQuakeTimer = 1000; + ++m_uiQuakeCount; + } + } + else { - DoScriptText(EMOTE_GENERIC_ENRAGED, m_creature); - m_uiBerserk_Timer = 60000; + SetCombatMovement(true); + m_creature->GetMotionMaster()->Clear(); + m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); + + m_uiQuakeTimer = 43000; + m_uiQuakeCount = 0; } } else - m_uiBerserk_Timer -= uiDiff; + m_uiQuakeTimer -= uiDiff; - //Cleave_Timer - if (m_uiCleave_Timer < uiDiff) - { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_CLEAVE); - m_uiCleave_Timer = 10000; - } - else - m_uiCleave_Timer -= uiDiff; + // don't use other spells during quake + if (m_uiQuakeCount) + return; - if (m_uiQuake_Timer < uiDiff) + if (m_uiCleaveTimer < uiDiff) { - // to avoid blastnova interruption - if (!m_creature->IsNonMeleeSpellCasted(false)) - { - int32 i = SPELL_QUAKE_KNOCKBACK; - m_creature->CastCustomSpell(m_creature, SPELL_QUAKE_TRIGGER, &i, 0, 0, false); - m_uiQuake_Timer = 50000; - } + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_CLEAVE) == CAST_OK) + m_uiCleaveTimer = 10000; } else - m_uiQuake_Timer -= uiDiff; + m_uiCleaveTimer -= uiDiff; - if (m_uiBlastNova_Timer < uiDiff) + if (m_uiBlastNovaTimer < uiDiff) { - // to avoid earthquake interruption - if (!m_creature->hasUnitState(UNIT_STAT_STUNNED)) + if (DoCastSpellIfCan(m_creature, SPELL_BLASTNOVA) == CAST_OK) { DoScriptText(EMOTE_BLASTNOVA, m_creature); - DoCastSpellIfCan(m_creature, SPELL_BLASTNOVA); - m_uiBlastNova_Timer = 60000; + m_uiBlastNovaTimer = 60000; } } else - m_uiBlastNova_Timer -= uiDiff; + m_uiBlastNovaTimer -= uiDiff; - if (m_uiBlaze_Timer < uiDiff) + if (m_uiBlazeTimer < uiDiff) { - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) - { - float x, y, z; - pTarget->GetPosition(x, y, z); - - if (Creature* pSummon = m_creature->SummonCreature(NPC_BURNING_ABYSS, x, y, z, 0.0f, TEMPSUMMON_CORPSE_DESPAWN, 0)) - { - if (mob_abyssalAI* pAbyssAI = dynamic_cast(pSummon->AI())) - pAbyssAI->SetTrigger(2); - - m_creature->CastSpell(pSummon, SPELL_BLAZE_TARGET, true); - pSummon->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - } - } - - m_uiBlaze_Timer = urand(20000, 40000); + if (DoCastSpellIfCan(m_creature, SPELL_BLAZE) == CAST_OK) + m_uiBlazeTimer = urand(10000, 15000); } else - m_uiBlaze_Timer -= uiDiff; + m_uiBlazeTimer -= uiDiff; - if (!m_bIsPhase3 && m_creature->GetHealthPercent() < 30.0f - && !m_creature->IsNonMeleeSpellCasted(false) // blast nova - && !m_creature->hasUnitState(UNIT_STAT_STUNNED))// shadow cage and earthquake + // Transition to phase 3 + if (!m_bIsPhase3 && m_creature->GetHealthPercent() < 30.0f) { - m_bIsPhase3 = true; + // ToDo: maybe there is a spell here - requires additional research DoScriptText(SAY_CHAMBER_DESTROY, m_creature); + m_uiTransitionTimer = 5000; + m_bIsPhase3 = true; } + // Debris fall in phase 3 if (m_bIsPhase3) { - if (m_uiPhase3_Timer < uiDiff) + if (m_uiDebrisTimer < uiDiff) { - switch(m_uiPhase3_Count) - { - case 0: - m_creature->CastSpell(m_creature, SPELL_CAMERA_SHAKE, true); - ++m_uiPhase3_Count; - m_uiPhase3_Timer = 2000; - break; - case 1: - if (m_pInstance) - m_pInstance->SetData(TYPE_HALL_COLLAPSE, IN_PROGRESS); - ++m_uiPhase3_Count; - m_uiPhase3_Timer = 8000; - break; - case 2: - m_creature->CastSpell(m_creature, SPELL_DEBRIS_KNOCKDOWN, true); - ++m_uiPhase3_Count; - m_uiPhase3_Timer = 15000; - break; - case 3: - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) - { - float x, y, z; - pTarget->GetPosition(x, y, z); - - if (Creature* pSummon = m_creature->SummonCreature(NPC_BURNING_ABYSS, x, y, z, 0.0f, TEMPSUMMON_CORPSE_DESPAWN, 0)) - { - if (mob_abyssalAI* pAbyssAI = dynamic_cast(pSummon->AI())) - pAbyssAI->SetTrigger(1); - } - - m_uiPhase3_Timer = 15000; - } - break; - } + if (DoCastSpellIfCan(m_creature, SPELL_QUAKE_EFFECT) == CAST_OK) + m_uiDebrisTimer = urand(20000, 30000); } else - m_uiPhase3_Timer -= uiDiff; + m_uiDebrisTimer -= uiDiff; } DoMeleeAttackIfReady(); } }; +/*###### +## mob_hellfire_channeler +######*/ + struct MANGOS_DLL_DECL mob_hellfire_channelerAI : public ScriptedAI { mob_hellfire_channelerAI(Creature* pCreature) : ScriptedAI(pCreature) @@ -513,131 +312,130 @@ struct MANGOS_DLL_DECL mob_hellfire_channelerAI : public ScriptedAI ScriptedInstance* m_pInstance; - uint32 m_uiShadowBoltVolley_Timer; - uint32 m_uiDarkMending_Timer; - uint32 m_uiFear_Timer; - uint32 m_uiInfernal_Timer; - - bool m_bIsInfernalSpawned; + uint32 m_uiShadowGraspTimer; + uint32 m_uiShadowBoltVolleyTimer; + uint32 m_uiDarkMendingTimer; + uint32 m_uiFearTimer; + uint32 m_uiInfernalTimer; void Reset() { - m_uiShadowBoltVolley_Timer = urand(8000, 10000); - m_uiDarkMending_Timer = 10000; - m_uiFear_Timer = urand(15000, 20000); - m_uiInfernal_Timer = urand(10000, 50000); - - m_bIsInfernalSpawned = false; + m_uiShadowGraspTimer = 10000; + m_uiShadowBoltVolleyTimer = urand(8000, 10000); + m_uiDarkMendingTimer = 10000; + m_uiFearTimer = urand(15000, 20000); + m_uiInfernalTimer = urand(10000, 50000); } void Aggro(Unit* pWho) { - if (!m_pInstance) - return; - m_creature->InterruptNonMeleeSpells(false); - if (Creature* pMagtheridon = m_pInstance->GetSingleCreatureFromStorage(NPC_MAGTHERIDON)) - { - if (!pMagtheridon->isAlive()) - return; - - if (m_pInstance->GetData(TYPE_CHANNELER_EVENT) == NOT_STARTED) - DoScriptText(EMOTE_BEGIN, pMagtheridon); - } - - m_pInstance->SetData(TYPE_CHANNELER_EVENT, IN_PROGRESS); + if (m_pInstance) + m_pInstance->SetData(TYPE_CHANNELER_EVENT, IN_PROGRESS); } - void JustSummoned(Creature* pSummoned) - { - if (m_creature->getVictim()) - pSummoned->AI()->AttackStart(m_creature->getVictim()); - } + // Don't attack on LoS check + void MoveInLineOfSight(Unit* pWho) { } - void MoveInLineOfSight(Unit* pWho) + void JustDied(Unit* pKiller) { + DoCastSpellIfCan(m_creature, SPELL_SOUL_TRANSFER, CAST_TRIGGERED); } - void JustDied(Unit* pKiller) + void JustReachedHome() { if (m_pInstance) - m_pInstance->SetData(TYPE_CHANNELER_EVENT, DONE); + m_pInstance->SetData(TYPE_CHANNELER_EVENT, FAIL); + } - pKiller->CastSpell(pKiller, SPELL_SOUL_TRANSFER, false); + void JustSummoned(Creature* pSummoned) + { + if (m_creature->getVictim()) + pSummoned->AI()->AttackStart(m_creature->getVictim()); } - void JustReachedHome() + void SummonedCreatureDespawn(Creature* pSummoned) { - if (m_pInstance) - m_pInstance->SetData(TYPE_CHANNELER_EVENT, NOT_STARTED); + if (pSummoned->GetEntry() == NPC_BURNING_ABYSS) + m_uiInfernalTimer = urand(10000, 15000); } void UpdateAI(const uint32 uiDiff) { - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + // Channel spell on Magtheridon, on OOC timer + if (m_uiShadowGraspTimer) { - if (!m_creature->IsNonMeleeSpellCasted(false) && !m_creature->IsInEvadeMode()) - DoCastSpellIfCan(m_creature, SPELL_SHADOW_GRASP_DUMMY); + if (m_uiShadowGraspTimer <= uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_SHADOW_GRASP_DUMMY) == CAST_OK) + m_uiShadowGraspTimer = 0; + } + else + m_uiShadowGraspTimer -= uiDiff; + } + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - } - //Shadow bolt volley - if (m_uiShadowBoltVolley_Timer < uiDiff) + if (m_uiShadowBoltVolleyTimer < uiDiff) { - DoCastSpellIfCan(m_creature, SPELL_SHADOW_BOLT_VOLLEY); - m_uiShadowBoltVolley_Timer = urand(10000, 20000); + if (DoCastSpellIfCan(m_creature, SPELL_SHADOW_BOLT_VOLLEY) == CAST_OK) + m_uiShadowBoltVolleyTimer = urand(10000, 20000); } else - m_uiShadowBoltVolley_Timer -= uiDiff; + m_uiShadowBoltVolleyTimer -= uiDiff; - //Dark Mending - if (m_uiDarkMending_Timer < uiDiff) + if (m_uiDarkMendingTimer < uiDiff) { - if (m_creature->GetHealthPercent() < 50.0f) + if (Unit* pTarget = DoSelectLowestHpFriendly(50.0f)) { - //Cast on ourselves if we are lower then lowest hp friendly unit - /*if (pLowestHPTarget && LowestHP < m_creature->GetHealth()) - DoCastSpellIfCan(pLowestHPTarget, SPELL_DARK_MENDING); - else*/ - DoCastSpellIfCan(m_creature, SPELL_DARK_MENDING); + if (DoCastSpellIfCan(m_creature, SPELL_DARK_MENDING) == CAST_OK) + m_uiDarkMendingTimer = urand(10000, 20000); } - - m_uiDarkMending_Timer = urand(10000, 20000); } else - m_uiDarkMending_Timer -= uiDiff; + m_uiDarkMendingTimer -= uiDiff; - //Fear - if (m_uiFear_Timer < uiDiff) + if (m_uiFearTimer < uiDiff) { if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1)) - DoCastSpellIfCan(pTarget, SPELL_FEAR); - - m_uiFear_Timer = urand(25000, 40000); + { + if (DoCastSpellIfCan(pTarget, SPELL_FEAR) == CAST_OK) + m_uiFearTimer = urand(25000, 40000); + } } else - m_uiFear_Timer -= uiDiff; + m_uiFearTimer -= uiDiff; - //Infernal spawning - if (!m_bIsInfernalSpawned && m_uiInfernal_Timer < uiDiff) + if (m_uiInfernalTimer) { - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) - m_creature->CastSpell(pTarget, SPELL_BURNING_ABYSSAL, true); - - m_bIsInfernalSpawned = true; + if (m_uiInfernalTimer <= uiDiff) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, SPELL_BURNING_ABYSSAL) == CAST_OK) + m_uiInfernalTimer = 0; + } + } + else + m_uiInfernalTimer -= uiDiff; } - else - m_uiInfernal_Timer -= uiDiff; DoMeleeAttackIfReady(); } }; -//Manticron Cube +/*###### +## go_manticron_cube +######*/ + bool GOUse_go_manticron_cube(Player* pPlayer, GameObject* pGo) { + // if exhausted or already channeling return + if (pPlayer->HasAura(SPELL_MIND_EXHAUSTION) || pPlayer->HasAura(SPELL_SHADOW_GRASP)) + return true; + if (ScriptedInstance* pInstance = (ScriptedInstance*)pGo->GetInstanceData()) { if (pInstance->GetData(TYPE_MAGTHERIDON_EVENT) != IN_PROGRESS) @@ -648,22 +446,98 @@ bool GOUse_go_manticron_cube(Player* pPlayer, GameObject* pGo) if (!pMagtheridon->isAlive()) return true; - // if exhausted or already channeling return - if (pPlayer->HasAura(SPELL_MIND_EXHAUSTION, EFFECT_INDEX_0) || pPlayer->HasAura(SPELL_SHADOW_GRASP, EFFECT_INDEX_1)) - return true; - - pPlayer->InterruptNonMeleeSpells(false); - pPlayer->CastSpell(pPlayer, SPELL_SHADOW_GRASP, true); - pPlayer->CastSpell(pPlayer, SPELL_SHADOW_GRASP_VISUAL, false); + // visual is cast by cube + if (Creature* pTrigger = GetClosestCreatureWithEntry(pGo, NPC_RAID_TRIGGER, 5.0f)) + pTrigger->CastSpell(pTrigger, SPELL_SHADOW_GRASP_VISUAL, false); - if (boss_magtheridonAI* pMagAI = dynamic_cast(pMagtheridon->AI())) - pMagAI->SetClicker(pGo, pPlayer); + // the real spell is cast by player + pPlayer->CastSpell(pPlayer, SPELL_SHADOW_GRASP, false); } } - return false; + return true; } +// TODO Remove this 'script' when combat and persistent area auras can be proper prevented from core-side +struct MANGOS_DLL_DECL npc_target_triggerAI : public Scripted_NoMovementAI +{ + npc_target_triggerAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) {Reset();} + + uint32 m_uiDebrisTimer; + + void Reset() + { + m_uiDebrisTimer = 0; + } + + void AttackStart(Unit* pWho) {} + void MoveInLineOfSight(Unit* pWho) {} + + void SpellHit(Unit* pCaster, const SpellEntry* pSpell) + { + // Workaround for missing core support for this type of dummy aura + if (pSpell->Id == SPELL_QUAKE_EFFECT) + { + if (DoCastSpellIfCan(m_creature, SPELL_DEBRIS_VISUAL) == CAST_OK) + m_uiDebrisTimer = 5000; + } + } + + void UpdateAI(const uint32 uiDiff) + { + // Cast debris damage after 5 seconds (on visual removal) + if (m_uiDebrisTimer) + { + if (m_uiDebrisTimer <= uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_DEBRIS_DAMAGE) == CAST_OK) + m_uiDebrisTimer = 0; + } + else + m_uiDebrisTimer -= uiDiff; + } + } +}; + +// ToDo: move this script to eventAI +struct MANGOS_DLL_DECL mob_abyssalAI : public ScriptedAI +{ + mob_abyssalAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } + + uint32 m_uiFireBlastTimer; + uint32 m_uiDespawnTimer; + + void Reset() + { + m_uiDespawnTimer = 60000; + m_uiFireBlastTimer = 6000; + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_uiDespawnTimer < uiDiff) + { + m_creature->ForcedDespawn(); + m_uiDespawnTimer = 10000; + } + else + m_uiDespawnTimer -= uiDiff; + + if (m_uiFireBlastTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_FIRE_BLAST) == CAST_OK) + m_uiFireBlastTimer = urand(5000, 15000); + } + else + m_uiFireBlastTimer -= uiDiff; + + DoMeleeAttackIfReady(); + } +}; + CreatureAI* GetAI_boss_magtheridon(Creature* pCreature) { return new boss_magtheridonAI(pCreature); @@ -674,6 +548,11 @@ CreatureAI* GetAI_mob_hellfire_channeler(Creature* pCreature) return new mob_hellfire_channelerAI(pCreature); } +CreatureAI* GetAI_npc_target_triggerAI(Creature* pCreature) +{ + return new npc_target_triggerAI(pCreature); +} + CreatureAI* GetAI_mob_abyssalAI(Creature* pCreature) { return new mob_abyssalAI(pCreature); @@ -698,6 +577,11 @@ void AddSC_boss_magtheridon() pNewScript->pGOUse = &GOUse_go_manticron_cube; pNewScript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "npc_target_trigger"; + pNewScript->GetAI = &GetAI_npc_target_triggerAI; + pNewScript->RegisterSelf(); + pNewScript = new Script; pNewScript->Name = "mob_abyssal"; pNewScript->GetAI = &GetAI_mob_abyssalAI; diff --git a/scripts/outland/hellfire_citadel/magtheridons_lair/instance_magtheridons_lair.cpp b/scripts/outland/hellfire_citadel/magtheridons_lair/instance_magtheridons_lair.cpp index 711cd3b29..ed8fabdf4 100644 --- a/scripts/outland/hellfire_citadel/magtheridons_lair/instance_magtheridons_lair.cpp +++ b/scripts/outland/hellfire_citadel/magtheridons_lair/instance_magtheridons_lair.cpp @@ -24,21 +24,26 @@ EndScriptData */ #include "precompiled.h" #include "magtheridons_lair.h" -instance_magtheridons_lair::instance_magtheridons_lair(Map* pMap) : ScriptedInstance(pMap) { Initialize(); } +instance_magtheridons_lair::instance_magtheridons_lair(Map* pMap) : ScriptedInstance(pMap), + m_uiCageBreakTimer(0), + m_uiCageBreakStage(0), + m_uiRandYellTimer(90000) +{ + Initialize(); +} void instance_magtheridons_lair::Initialize() { memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); - - m_uiCageTimer = 0; - m_uiRespawnTimer = 0; } bool instance_magtheridons_lair::IsEncounterInProgress() const { - for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) + for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) + { if (m_auiEncounter[i] == IN_PROGRESS) return true; + } return false; } @@ -51,7 +56,7 @@ void instance_magtheridons_lair::OnCreatureCreate(Creature* pCreature) m_mNpcEntryGuidStore[NPC_MAGTHERIDON] = pCreature->GetObjectGuid(); break; case NPC_CHANNELER: - m_sChannelerGuid.insert(pCreature->GetObjectGuid()); + m_lChannelerGuidList.push_back(pCreature->GetObjectGuid()); break; } } @@ -60,9 +65,6 @@ void instance_magtheridons_lair::OnObjectCreate(GameObject* pGo) { switch(pGo->GetEntry()) { - case GO_MANTICRON_CUBE: - pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NO_INTERACT); - break; case GO_DOODAD_HF_MAG_DOOR01: // event door m_mGoEntryGuidStore[GO_DOODAD_HF_MAG_DOOR01] = pGo->GetObjectGuid(); break; @@ -73,7 +75,10 @@ void instance_magtheridons_lair::OnObjectCreate(GameObject* pGo) case GO_MAGTHERIDON_COLUMN_005: case GO_MAGTHERIDON_COLUMN_000: case GO_MAGTHERIDON_COLUMN_001: - m_sColumnGuid.insert(pGo->GetObjectGuid()); + m_lColumnGuidList.push_back(pGo->GetObjectGuid()); + break; + case GO_MANTICRON_CUBE: + m_lCubeGuidList.push_back(pGo->GetObjectGuid()); break; } } @@ -83,169 +88,163 @@ void instance_magtheridons_lair::SetData(uint32 uiType, uint32 uiData) switch(uiType) { case TYPE_MAGTHERIDON_EVENT: - m_auiEncounter[0] = uiData; - if (uiData == NOT_STARTED) - m_uiRespawnTimer = 10000; - if (uiData != IN_PROGRESS) + switch (uiData) { - if (GameObject* pDoor = GetSingleGameObjectFromStorage(GO_DOODAD_HF_MAG_DOOR01)) - pDoor->SetGoState(GO_STATE_ACTIVE); - } - break; - case TYPE_CHANNELER_EVENT: - switch(uiData) - { - case NOT_STARTED: // Reset all channelers once one is reset. - if (m_auiEncounter[1] != NOT_STARTED) + case FAIL: + // Reset channelers + for (GuidList::const_iterator itr = m_lChannelerGuidList.begin(); itr != m_lChannelerGuidList.end(); ++itr) { - m_auiEncounter[1] = NOT_STARTED; - - if (m_sChannelerGuid.empty()) - { - debug_log("SD2: Instance Magtheridon: Channeler GUID list are empty."); - break; - } - - for(GuidSet::const_iterator itr = m_sChannelerGuid.begin(); itr != m_sChannelerGuid.end(); ++itr) + if (Creature* pChanneler = instance->GetCreature(*itr)) { - if (Creature* pChanneler = instance->GetCreature(*itr)) - { - if (pChanneler->isAlive()) - pChanneler->AI()->EnterEvadeMode(); - else - pChanneler->Respawn(); - } + if (!pChanneler->isAlive()) + pChanneler->Respawn(); } - - m_uiCageTimer = 0; - - if (GameObject* pDoor = GetSingleGameObjectFromStorage(GO_DOODAD_HF_MAG_DOOR01)) - pDoor->SetGoState(GO_STATE_ACTIVE); } - break; - case IN_PROGRESS: // Event start. - if (m_auiEncounter[1] != IN_PROGRESS) - { - m_auiEncounter[1] = IN_PROGRESS; - // Let all five channelers aggro. - for(GuidSet::const_iterator itr = m_sChannelerGuid.begin(); itr != m_sChannelerGuid.end(); ++itr) - { - Creature* pChanneler = instance->GetCreature(*itr); - - if (pChanneler && pChanneler->isAlive()) - AttackNearestTarget(pChanneler); - } + // Reset columns + for (GuidList::const_iterator itr = m_lColumnGuidList.begin(); itr != m_lColumnGuidList.end(); ++itr) + { + if (GameObject* pColumn = instance->GetGameObject(*itr)) + pColumn->ResetDoorOrButton(); + } - // Magtheridon breaks free after two minutes. - Creature* pMagtheridon = GetSingleCreatureFromStorage(NPC_MAGTHERIDON); + // Reset cubes + for (GuidList::const_iterator itr = m_lCubeGuidList.begin(); itr != m_lCubeGuidList.end(); ++itr) + DoToggleGameObjectFlags(*itr, GO_FLAG_NO_INTERACT, true); - if (pMagtheridon && pMagtheridon->isAlive()) - m_uiCageTimer = 120000; + // Reset timers and doors + SetData(TYPE_CHANNELER_EVENT, NOT_STARTED); + m_uiCageBreakTimer = 0; + m_uiCageBreakStage = 0; - if (GameObject* pDoor = GetSingleGameObjectFromStorage(GO_DOODAD_HF_MAG_DOOR01)) - pDoor->SetGoState(GO_STATE_READY); - } + // no break; + case DONE: + // Reset door on Fail or Done + if (GameObject* pDoor = GetSingleGameObjectFromStorage(GO_DOODAD_HF_MAG_DOOR01)) + pDoor->ResetDoorOrButton(); break; - case DONE: // Add buff and check if all channelers are dead. - for(GuidSet::iterator itr = m_sChannelerGuid.begin(); itr != m_sChannelerGuid.end(); ++itr) + case IN_PROGRESS: + // Set boss in combat + if (Creature* pMagtheridon = GetSingleCreatureFromStorage(NPC_MAGTHERIDON)) { - Creature* pChanneler = instance->GetCreature(*itr); - - if (pChanneler && pChanneler->isAlive()) + if (pMagtheridon->isAlive()) { - //Channeler->InterruptNonMeleeSpells(false); - //Channeler->CastSpell(Channeler, SPELL_SOUL_TRANSFER, false); - uiData = IN_PROGRESS; - break; + pMagtheridon->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + pMagtheridon->SetInCombatWithZone(); } } + // Enable cubes + for (GuidList::const_iterator itr = m_lCubeGuidList.begin(); itr != m_lCubeGuidList.end(); ++itr) + DoToggleGameObjectFlags(*itr, GO_FLAG_NO_INTERACT, false); break; + case SPECIAL: + // Collapse the hall - don't store this value + for (GuidList::const_iterator itr = m_lColumnGuidList.begin(); itr != m_lColumnGuidList.end(); ++itr) + DoUseDoorOrButton(*itr); + // return, don't set encounter as special + return; } - m_auiEncounter[1] = uiData; + m_auiEncounter[uiType] = uiData; break; - case TYPE_HALL_COLLAPSE: - // IN_PROGRESS - collapse / NOT_STARTED - reset - for(GuidSet::const_iterator itr = m_sColumnGuid.begin(); itr != m_sColumnGuid.end(); ++itr) - DoUseDoorOrButton(*itr); + case TYPE_CHANNELER_EVENT: + // don't set the same data twice + if (m_auiEncounter[1] == uiData) + break; + // stop the event timer on fail + if (uiData == FAIL) + { + m_uiCageBreakTimer = 0; + m_uiCageBreakStage = 0; + + // Reset door on Fail + if (GameObject* pDoor = GetSingleGameObjectFromStorage(GO_DOODAD_HF_MAG_DOOR01)) + pDoor->ResetDoorOrButton(); + + // Reset Magtheridon + if (Creature* pMagtheridon = GetSingleCreatureFromStorage(NPC_MAGTHERIDON)) + { + if (pMagtheridon->isAlive()) + pMagtheridon->AI()->EnterEvadeMode(); + } + } + // prepare Magtheridon for release + if (uiData == IN_PROGRESS) + { + if (Creature* pMagtheridon = GetSingleCreatureFromStorage(NPC_MAGTHERIDON)) + { + if (pMagtheridon->isAlive()) + { + DoScriptText(EMOTE_EVENT_BEGIN, pMagtheridon); + m_uiCageBreakTimer = MINUTE*IN_MILLISECONDS; + } + } + + // combat door + DoUseDoorOrButton(GO_DOODAD_HF_MAG_DOOR01); + } + m_auiEncounter[uiType] = uiData; break; } + + // Instance save isn't needed for this one } uint32 instance_magtheridons_lair::GetData(uint32 uiType) { - if (uiType == TYPE_MAGTHERIDON_EVENT) - return m_auiEncounter[0]; - if (uiType == TYPE_CHANNELER_EVENT) - return m_auiEncounter[1]; + if (uiType < MAX_ENCOUNTER) + return m_auiEncounter[uiType]; return 0; } -void instance_magtheridons_lair::AttackNearestTarget(Creature* pCreature) +void instance_magtheridons_lair::Update(uint32 uiDiff) { - float minRange = VISIBLE_RANGE; - float range; - Player* target = NULL; - - Map::PlayerList const& players = instance->GetPlayers(); - for(Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr) + // Prepare to release Magtheridon + if (m_uiCageBreakTimer) { - if (Player* i_pl = itr->getSource()) + if (m_uiCageBreakTimer <= uiDiff) { - if (i_pl->isTargetableForAttack()) + switch (m_uiCageBreakStage) { - range = i_pl->GetDistance(pCreature); - if (range < minRange) - { - minRange = range; - target = i_pl; - } + case 0: + if (Creature* pMagtheridon = GetSingleCreatureFromStorage(NPC_MAGTHERIDON)) + { + if (pMagtheridon->isAlive()) + { + DoScriptText(EMOTE_NEARLY_FREE, pMagtheridon); + m_uiCageBreakTimer = MINUTE*IN_MILLISECONDS; + } + } + break; + case 1: + SetData(TYPE_MAGTHERIDON_EVENT, IN_PROGRESS); + m_uiCageBreakTimer = 0; + break; } - } - } - if (!target) - { - debug_log("SD2: Instance Magtheridon: AttackNearestTarget failed. No player."); - return; - } - pCreature->AI()->AttackStart(target); -} - -void instance_magtheridons_lair::Update(uint32 uiDiff) -{ - if (m_uiCageTimer) - { - if (m_uiCageTimer <= uiDiff) - { - SetData(TYPE_MAGTHERIDON_EVENT, IN_PROGRESS); - m_uiCageTimer = 0; + ++m_uiCageBreakStage; } else - m_uiCageTimer -= uiDiff; + m_uiCageBreakTimer -= uiDiff; } - if (m_uiRespawnTimer) + // no yell if event is in progress + if (GetData(TYPE_CHANNELER_EVENT) == IN_PROGRESS) + return; + + if (m_uiRandYellTimer < uiDiff) { - if (m_uiRespawnTimer <= uiDiff) + if (Creature* pMagtheridon = GetSingleCreatureFromStorage(NPC_MAGTHERIDON)) { - for(GuidSet::const_iterator itr = m_sChannelerGuid.begin(); itr != m_sChannelerGuid.end(); ++itr) + if (pMagtheridon->isAlive()) { - if (Creature* pChanneler = instance->GetCreature(*itr)) - { - if (pChanneler->isAlive()) - pChanneler->AI()->EnterEvadeMode(); - else - pChanneler->Respawn(); - } + DoScriptText(aRandomTaunt[urand(0, 5)], pMagtheridon); + m_uiRandYellTimer = 90000; } - - m_uiRespawnTimer = 0; } - else - m_uiRespawnTimer -= uiDiff; } + else + m_uiRandYellTimer -= uiDiff; } InstanceData* GetInstanceData_instance_magtheridons_lair(Map* pMap) diff --git a/scripts/outland/hellfire_citadel/magtheridons_lair/magtheridons_lair.h b/scripts/outland/hellfire_citadel/magtheridons_lair/magtheridons_lair.h index e02f43921..d9333f2c5 100644 --- a/scripts/outland/hellfire_citadel/magtheridons_lair/magtheridons_lair.h +++ b/scripts/outland/hellfire_citadel/magtheridons_lair/magtheridons_lair.h @@ -9,20 +9,12 @@ enum { MAX_ENCOUNTER = 2, - TYPE_MAGTHERIDON_EVENT = 1, - TYPE_CHANNELER_EVENT = 2, - TYPE_HALL_COLLAPSE = 4, - - DATA_CHANNELER = 5, + TYPE_MAGTHERIDON_EVENT = 0, + TYPE_CHANNELER_EVENT = 1, NPC_MAGTHERIDON = 17257, NPC_CHANNELER = 17256, - SPELL_SOUL_TRANSFER = 30531, - SPELL_BLAZE_TARGET = 30541, - SPELL_DEBRIS_DAMAGE = 30631, - SPELL_DEBRIS_KNOCKDOWN = 36449, - GO_MANTICRON_CUBE = 181713, GO_DOODAD_HF_MAG_DOOR01 = 183847, GO_DOODAD_HF_RAID_FX01 = 184653, @@ -32,8 +24,13 @@ enum GO_MAGTHERIDON_COLUMN_005 = 184637, GO_MAGTHERIDON_COLUMN_000 = 184638, GO_MAGTHERIDON_COLUMN_001 = 184639, + + EMOTE_EVENT_BEGIN = -1544014, + EMOTE_NEARLY_FREE = -1544016, }; +static const int32 aRandomTaunt[]= {-1544000, -1544001, -1544002, -1544003, -1544004, -1544005}; + class MANGOS_DLL_DECL instance_magtheridons_lair : public ScriptedInstance { public: @@ -49,18 +46,18 @@ class MANGOS_DLL_DECL instance_magtheridons_lair : public ScriptedInstance void SetData(uint32 uiType, uint32 uiData); uint32 GetData(uint32 uiType); - void AttackNearestTarget(Creature* pCreature); - void Update(uint32 uiDiff); private: uint32 m_auiEncounter[MAX_ENCOUNTER]; - GuidSet m_sChannelerGuid; - GuidSet m_sColumnGuid; + GuidList m_lChannelerGuidList; + GuidList m_lColumnGuidList; + GuidList m_lCubeGuidList; - uint32 m_uiCageTimer; - uint32 m_uiRespawnTimer; + uint32 m_uiRandYellTimer; + uint32 m_uiCageBreakTimer; + uint8 m_uiCageBreakStage; }; #endif diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 5e77dc24b..9a06058e2 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2730" + #define SD2_REVISION_NR "2731" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index d27ce6413..c9b7d7111 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -638,6 +638,7 @@ UPDATE gameobject_template SET ScriptName='go_manticron_cube' WHERE entry=181713 UPDATE creature_template SET ScriptName='boss_magtheridon' WHERE entry=17257; UPDATE creature_template SET ScriptName='mob_abyssal' WHERE entry=17454; UPDATE creature_template SET ScriptName='mob_hellfire_channeler' WHERE entry=17256; +UPDATE creature_template SET ScriptName='npc_target_trigger' WHERE entry=17474; /* HELLFIRE PENINSULA */ UPDATE creature_template SET ScriptName='boss_doomlord_kazzak' WHERE entry=18728; diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 6a6b0c2a7..efba07a0e 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -2019,12 +2019,12 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen -- -1 544 000 MAGTHERIDON'S LAIR INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES -(-1544000,'Wretched, meddling insects. Release me and perhaps i will grant you a merciful death!',10247,1,0,0,'magtheridon SAY_TAUNT1'), -(-1544001,'Vermin! Leeches! Take my blood and choke on it!',10248,1,0,0,'magtheridon SAY_TAUNT2'), -(-1544002,'Illidan is an arrogant fool. I will crush him and reclaim Outland as my own.',10249,1,0,0,'magtheridon SAY_TAUNT3'), -(-1544003,'Away, you mindless parasites. My blood is my own!',10250,1,0,0,'magtheridon SAY_TAUNT4'), -(-1544004,'How long do you believe your pathetic sorcery can hold me?',10251,1,0,0,'magtheridon SAY_TAUNT5'), -(-1544005,'My blood will be the end of you!',10252,1,0,0,'magtheridon SAY_TAUNT6'), +(-1544000,'Wretched, meddling insects. Release me and perhaps i will grant you a merciful death!',10247,6,0,0,'magtheridon SAY_TAUNT1'), +(-1544001,'Vermin! Leeches! Take my blood and choke on it!',10248,6,0,0,'magtheridon SAY_TAUNT2'), +(-1544002,'Illidan is an arrogant fool. I will crush him and reclaim Outland as my own.',10249,6,0,0,'magtheridon SAY_TAUNT3'), +(-1544003,'Away, you mindless parasites. My blood is my own!',10250,6,0,0,'magtheridon SAY_TAUNT4'), +(-1544004,'How long do you believe your pathetic sorcery can hold me?',10251,6,0,0,'magtheridon SAY_TAUNT5'), +(-1544005,'My blood will be the end of you!',10252,6,0,0,'magtheridon SAY_TAUNT6'), (-1544006,'I...am...UNLEASHED!!!',10253,1,0,0,'magtheridon SAY_FREED'), (-1544007,'Thank you for releasing me. Now...die!',10254,1,0,0,'magtheridon SAY_AGGRO'), (-1544008,'Not again...NOT AGAIN!',10256,1,0,0,'magtheridon SAY_BANISH'), @@ -2034,7 +2034,8 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1544012,'REUSE_ME',0,0,0,0,'REUSE_ME'), (-1544013,'%s begins to cast Blast Nova!',0,3,0,0,'magtheridon EMOTE_BLASTNOVA'), (-1544014,'%s\'s bonds begin to weaken!',0,2,0,0,'magtheridon EMOTE_BEGIN'), -(-1544015,'%s breaks free!',0,2,0,0,'magtheridon EMOTE_FREED'); +(-1544015,'%s breaks free!',0,2,0,0,'magtheridon EMOTE_FREED'), +(-1544016,'%s is nearly free of his bonds!',0,2,0,0,'magtheridon EMOTE_NEARLY_FREE'); -- -1 545 000 THE STEAMVAULT INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES diff --git a/sql/updates/r2731_mangos.sql b/sql/updates/r2731_mangos.sql new file mode 100644 index 000000000..e80d82254 --- /dev/null +++ b/sql/updates/r2731_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_target_trigger' WHERE entry=17474; diff --git a/sql/updates/r2731_scriptdev2.sql b/sql/updates/r2731_scriptdev2.sql new file mode 100644 index 000000000..c6c2e38d0 --- /dev/null +++ b/sql/updates/r2731_scriptdev2.sql @@ -0,0 +1,4 @@ +DELETE FROM script_texts WHERE entry=-1544016; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1544016,'%s is nearly free of his bonds!',0,2,0,0,'magtheridon EMOTE_NEARLY_FREE'); +UPDATE script_texts SET type=6 WHERE entry IN (-1544000, -1544001, -1544002, -1544003, -1544004, -1544005); From c36808e87f76016f635256a9a008fd35a51743a9 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Tue, 9 Oct 2012 20:34:38 +0200 Subject: [PATCH 0727/1172] [2732] Fix a bug in 2705. Thanks to overy for pointing --- scripts/eastern_kingdoms/karazhan/boss_nightbane.cpp | 4 ++-- scripts/eastern_kingdoms/karazhan/karazhan.h | 3 +-- sd2_revision_nr.h | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/scripts/eastern_kingdoms/karazhan/boss_nightbane.cpp b/scripts/eastern_kingdoms/karazhan/boss_nightbane.cpp index 6f216c454..6dd279542 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_nightbane.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_nightbane.cpp @@ -188,14 +188,14 @@ struct MANGOS_DLL_DECL boss_nightbaneAI : public npc_escortAI float fX, fY, fZ; // get the list of wanted triggers - bGround ? m_pInstance->GetNightbaneGroundTriggers(lTriggersList) : m_pInstance->GetNightbaneAirTriggers(lTriggersList); + m_pInstance->GetNightbaneTriggers(lTriggersList, bGround); // calculate the closest trigger from the list for (GuidList::const_iterator itr = lTriggersList.begin(); itr != lTriggersList.end(); ++itr) { if (Creature* pTrigger = m_creature->GetMap()->GetCreature(*itr)) { - if (!pTrigger || m_creature->GetDistanceOrder(pTrigger, pChosenTrigger, false)) + if (!pChosenTrigger || m_creature->GetDistanceOrder(pTrigger, pChosenTrigger, false)) pChosenTrigger = pTrigger; } } diff --git a/scripts/eastern_kingdoms/karazhan/karazhan.h b/scripts/eastern_kingdoms/karazhan/karazhan.h index f90e8952d..f569e52d2 100644 --- a/scripts/eastern_kingdoms/karazhan/karazhan.h +++ b/scripts/eastern_kingdoms/karazhan/karazhan.h @@ -123,8 +123,7 @@ class MANGOS_DLL_DECL instance_karazhan : public ScriptedInstance void DoPrepareOperaStage(Creature* pOrganizer); - void GetNightbaneGroundTriggers(GuidList &lList) { lList = m_lNightbaneGroundTriggers; } - void GetNightbaneAirTriggers(GuidList &lList) { lList = m_lNightbaneAirTriggers; } + void GetNightbaneTriggers(GuidList &lList, bool bGround) { lList = bGround ? m_lNightbaneGroundTriggers : m_lNightbaneAirTriggers; } void Load(const char* chrIn); const char* Save() { return m_strInstData.c_str(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 9a06058e2..08ea0beb9 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2731" + #define SD2_REVISION_NR "2732" #endif // __SD2_REVISION_NR_H__ From aa1a37d39e8a552033905113232d65f48b35d5e5 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Fri, 12 Oct 2012 22:04:23 +0300 Subject: [PATCH 0728/1172] [2733] Cleanup script for Mother Shahraz - Black Temple Note: spells 40869 and 40816 require core support. --- .../black_temple/boss_mother_shahraz.cpp | 301 +++++++----------- sd2_revision_nr.h | 2 +- 2 files changed, 116 insertions(+), 187 deletions(-) diff --git a/scripts/outland/black_temple/boss_mother_shahraz.cpp b/scripts/outland/black_temple/boss_mother_shahraz.cpp index cb93a835b..572b5973e 100644 --- a/scripts/outland/black_temple/boss_mother_shahraz.cpp +++ b/scripts/outland/black_temple/boss_mother_shahraz.cpp @@ -17,40 +17,41 @@ /* ScriptData SDName: Boss_Mother_Shahraz SD%Complete: 80 -SDComment: Saber Lash missing, Fatal Attraction slightly incorrect; need to damage only if affected players are within range of each other +SDComment: Saber Lash and Fatal Attraction need core support. Timers may need some tunning. SDCategory: Black Temple EndScriptData */ #include "precompiled.h" #include "black_temple.h" -//Speech'n'Sounds -#define SAY_TAUNT1 -1564018 -#define SAY_TAUNT2 -1564019 -#define SAY_TAUNT3 -1564020 -#define SAY_AGGRO -1564021 -#define SAY_SPELL1 -1564022 -#define SAY_SPELL2 -1564023 -#define SAY_SPELL3 -1564024 -#define SAY_SLAY1 -1564025 -#define SAY_SLAY2 -1564026 -#define SAY_ENRAGE -1564027 -#define SAY_DEATH -1564028 - -//Spells -#define SPELL_BEAM_SINISTER 40859 -#define SPELL_BEAM_VILE 40860 -#define SPELL_BEAM_WICKED 40861 -#define SPELL_BEAM_SINFUL 40827 -#define SPELL_ATTRACTION 40871 -#define SPELL_SILENCING_SHRIEK 40823 -#define SPELL_ENRAGE 23537 -#define SPELL_SABER_LASH 43267 -#define SPELL_SABER_LASH_IMM 43690 -#define SPELL_TELEPORT_VISUAL 40869 -#define SPELL_BERSERK 45078 - -uint32 PrismaticAuras[]= +enum +{ + // Speech'n'Sounds + SAY_TAUNT_1 = -1564018, + SAY_TAUNT_2 = -1564019, + SAY_TAUNT_3 = -1564020, + SAY_AGGRO = -1564021, + SAY_SPELL_1 = -1564022, + SAY_SPELL_2 = -1564023, + SAY_SPELL_3 = -1564024, + SAY_SLAY_1 = -1564025, + SAY_SLAY_2 = -1564026, + SAY_ENRAGE = -1564027, + SAY_DEATH = -1564028, + + // Spells + SPELL_SINFUL_PERIODIC = 40862, // periodic triggers 40827 + SPELL_SINISTER_PERIODIC = 40863, // periodic triggers 40859 + SPELL_VILE_PERIODIC = 40865, // periodic triggers 40860 + SPELL_WICKED_PERIODIC = 40866, // periodic triggers 40861 + SPELL_FATAL_ATTRACTION = 40869, // dummy, triggers 41001 + SPELL_SILENCING_SHRIEK = 40823, + SPELL_SABER_LASH_PROC = 40816, // procs 40810 and 43690 on melee damage + SPELL_FRENZY = 23537, + SPELL_BERSERK = 45078, +}; + +static const uint32 aPrismaticAuras[]= { 40880, // Shadow 40882, // Fire @@ -60,63 +61,42 @@ uint32 PrismaticAuras[]= 40897, // Holy }; -struct Locations -{ - float x,y,z; -}; - -static Locations TeleportPoint[]= -{ - {959.996f, 212.576f, 193.843f}, - {932.537f, 231.813f, 193.838f}, - {958.675f, 254.767f, 193.822f}, - {946.955f, 201.316f, 192.535f}, - {944.294f, 149.676f, 197.551f}, - {930.548f, 284.888f, 193.367f}, - {965.997f, 278.398f, 195.777f} -}; +static const uint32 aPeriodicBeams[]= {SPELL_SINFUL_PERIODIC, SPELL_SINISTER_PERIODIC, SPELL_VILE_PERIODIC, SPELL_WICKED_PERIODIC}; struct MANGOS_DLL_DECL boss_shahrazAI : public ScriptedAI { boss_shahrazAI(Creature* pCreature) : ScriptedAI(pCreature) { - m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_pInstance = (instance_black_temple*)pCreature->GetInstanceData(); Reset(); } - ScriptedInstance* m_pInstance; + instance_black_temple* m_pInstance; - ObjectGuid m_targetGuid[3]; - uint32 BeamTimer; - uint32 BeamCount; - uint32 CurrentBeam; - uint32 PrismaticShieldTimer; - uint32 FatalAttractionTimer; - uint32 FatalAttractionExplodeTimer; - uint32 ShriekTimer; - uint32 RandomYellTimer; - uint32 EnrageTimer; - uint32 ExplosionCount; + uint32 m_uiBeamTimer; + uint32 m_uiPrismaticShieldTimer; + uint32 m_uiFatalAttractionTimer; + uint32 m_uiShriekTimer; + uint32 m_uiRandomYellTimer; + uint32 m_uiBerserkTimer; + uint8 m_uiCurrentBeam; - bool Enraged; + bool m_bIsEnraged; void Reset() { - for (uint8 i = 0; i < 3; ++i) - m_targetGuid[i].Clear(); - - BeamTimer = 60000; // Timers may be incorrect - BeamCount = 0; - CurrentBeam = 0; // 0 - Sinister, 1 - Vile, 2 - Wicked, 3 - Sinful - PrismaticShieldTimer = 0; - FatalAttractionTimer = 60000; - FatalAttractionExplodeTimer = 70000; - ShriekTimer = 30000; - RandomYellTimer = urand(70000, 110000); - EnrageTimer = 600000; - ExplosionCount = 0; - - Enraged = false; + m_uiBeamTimer = urand(5000, 10000); + m_uiCurrentBeam = urand(0, 3); + m_uiPrismaticShieldTimer = 0; + m_uiFatalAttractionTimer = 25000; + m_uiShriekTimer = 30000; + m_uiRandomYellTimer = urand(70000, 110000); + m_uiBerserkTimer = 10*MINUTE*IN_MILLISECONDS; + + m_bIsEnraged = false; + + // ToDo: Enable this when the core will properly support the damage split! We can't deal 70-80k damage only to one player. + //DoCastSpellIfCan(m_creature, SPELL_SABER_LASH_PROC); } void Aggro(Unit* pWho) @@ -130,15 +110,15 @@ struct MANGOS_DLL_DECL boss_shahrazAI : public ScriptedAI void JustReachedHome() { if (m_pInstance) - m_pInstance->SetData(TYPE_SHAHRAZ, NOT_STARTED); + m_pInstance->SetData(TYPE_SHAHRAZ, FAIL); } - void KilledUnit(Unit *victim) + void KilledUnit(Unit* pVictim) { - DoScriptText(urand(0, 1) ? SAY_SLAY1 : SAY_SLAY2, m_creature); + DoScriptText(urand(0, 1) ? SAY_SLAY_1 : SAY_SLAY_2, m_creature); } - void JustDied(Unit *victim) + void JustDied(Unit* pKiller) { if (m_pInstance) m_pInstance->SetData(TYPE_SHAHRAZ, DONE); @@ -146,146 +126,95 @@ struct MANGOS_DLL_DECL boss_shahrazAI : public ScriptedAI DoScriptText(SAY_DEATH, m_creature); } - void TeleportPlayers() - { - uint32 random = urand(0, 6); - float X = TeleportPoint[random].x; - float Y = TeleportPoint[random].y; - float Z = TeleportPoint[random].z; - - for(uint8 i = 0; i < 3; ++i) - { - Unit* pUnit = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1); - if (pUnit && pUnit->isAlive() && (pUnit->GetTypeId() == TYPEID_PLAYER)) - { - m_targetGuid[i] = pUnit->GetObjectGuid(); - pUnit->CastSpell(pUnit, SPELL_TELEPORT_VISUAL, true); - DoTeleportPlayer(pUnit, X, Y, Z, pUnit->GetOrientation()); - } - } - } - - void UpdateAI(const uint32 diff) + void UpdateAI(const uint32 uiDiff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - if (m_creature->GetHealthPercent() < 10.0f && !Enraged) + if (m_creature->GetHealthPercent() < 10.0f && !m_bIsEnraged) { - Enraged = true; - DoCastSpellIfCan(m_creature, SPELL_ENRAGE, CAST_TRIGGERED); - DoScriptText(SAY_ENRAGE, m_creature); + if (DoCastSpellIfCan(m_creature, SPELL_FRENZY) == CAST_OK) + { + DoScriptText(SAY_ENRAGE, m_creature); + m_bIsEnraged = true; + } } - //Randomly cast one beam. - if (BeamTimer < diff) + // Randomly cast one beam. + if (m_uiBeamTimer < uiDiff) { - Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0); - if (!target || !target->isAlive()) - return; - - BeamTimer = 9000; - - switch(CurrentBeam) + if (DoCastSpellIfCan(m_creature, aPeriodicBeams[m_uiCurrentBeam]) == CAST_OK) { - case 0: - DoCastSpellIfCan(target, SPELL_BEAM_SINISTER); - break; - case 1: - DoCastSpellIfCan(target, SPELL_BEAM_VILE); - break; - case 2: - DoCastSpellIfCan(target, SPELL_BEAM_WICKED); - break; - case 3: - DoCastSpellIfCan(target, SPELL_BEAM_SINFUL); - break; + uint8 uiNextBeam = (m_uiCurrentBeam + urand(1, 3)) % 4; + m_uiCurrentBeam = uiNextBeam; + m_uiBeamTimer = urand(10000, 13000); } - ++BeamCount; - uint32 Beam = CurrentBeam; - - if (BeamCount > 3) - while(CurrentBeam == Beam) - CurrentBeam = urand(0, 2); - - }else BeamTimer -= diff; + } + else + m_uiBeamTimer -= uiDiff; // Random Prismatic Shield every 15 seconds. - if (PrismaticShieldTimer < diff) + if (m_uiPrismaticShieldTimer < uiDiff) { - uint32 random = urand(0, 5); - if (PrismaticAuras[random]) - DoCastSpellIfCan(m_creature, PrismaticAuras[random]); - PrismaticShieldTimer = 15000; - }else PrismaticShieldTimer -= diff; - - // Select 3 random targets (can select same target more than once), teleport to a random location then make them cast explosions until they get away from each other. - if (FatalAttractionTimer < diff) - { - ExplosionCount = 0; - - TeleportPlayers(); - - DoScriptText(urand(0, 1) ? SAY_SPELL2 : SAY_SPELL3, m_creature); - - FatalAttractionExplodeTimer = 2000; - FatalAttractionTimer = urand(40000, 70000); - }else FatalAttractionTimer -= diff; + if (DoCastSpellIfCan(m_creature, aPrismaticAuras[urand(0, 5)]) == CAST_OK) + m_uiPrismaticShieldTimer = 15000; + } + else + m_uiPrismaticShieldTimer -= uiDiff; - if (FatalAttractionExplodeTimer < diff) + // ToDo: Enable this spell when it will be properly supported by core! Right now it teleports players under the map. + /*if (m_uiFatalAttractionTimer < uiDiff) { - // Just make them explode three times... they're supposed to keep exploding while they are in range, but it'll take too much code. I'll try to think of an efficient way for it later. - if (ExplosionCount < 3) + if (DoCastSpellIfCan(m_creature, SPELL_FATAL_ATTRACTION) == CAST_OK) { - for(uint8 i = 0; i < 3; ++i) + switch (urand(0, 2)) { - if (m_targetGuid[i]) - { - if (Player* pPlayer = m_creature->GetMap()->GetPlayer(m_targetGuid[i])) - pPlayer->CastSpell(pPlayer, SPELL_ATTRACTION, true); - - m_targetGuid[i].Clear(); - } + case 0: DoScriptText(SAY_SPELL_1, m_creature); break; + case 1: DoScriptText(SAY_SPELL_2, m_creature); break; + case 2: DoScriptText(SAY_SPELL_3, m_creature); break; } - - ++ExplosionCount; - FatalAttractionExplodeTimer = 1000; + m_uiFatalAttractionTimer = 30000; } - else - { - FatalAttractionExplodeTimer = FatalAttractionTimer + 2000; - ExplosionCount = 0; - } - }else FatalAttractionExplodeTimer -= diff; + } + else + m_uiFatalAttractionTimer -= uiDiff;*/ - if (ShriekTimer < diff) + if (m_uiShriekTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_SILENCING_SHRIEK); - ShriekTimer = 30000; - }else ShriekTimer -= diff; + if (DoCastSpellIfCan(m_creature, SPELL_SILENCING_SHRIEK) == CAST_OK) + m_uiShriekTimer = 30000; + } + else + m_uiShriekTimer -= uiDiff; - //Enrage - if (!m_creature->HasAura(SPELL_BERSERK, EFFECT_INDEX_0)) + if (m_uiBerserkTimer) { - if (EnrageTimer < diff) + if (m_uiBerserkTimer <= uiDiff) { - DoCastSpellIfCan(m_creature, SPELL_BERSERK); - DoScriptText(SAY_ENRAGE, m_creature); - }else EnrageTimer -= diff; + if (DoCastSpellIfCan(m_creature, SPELL_BERSERK) == CAST_OK) + { + DoScriptText(SAY_ENRAGE, m_creature); + m_uiBerserkTimer = 0; + } + } + else + m_uiBerserkTimer -= uiDiff; } - //Random taunts - if (RandomYellTimer < diff) + // Random taunts + if (m_uiRandomYellTimer < uiDiff) { - switch(urand(0, 2)) + switch (urand(0, 2)) { - case 0: DoScriptText(SAY_TAUNT1, m_creature); break; - case 1: DoScriptText(SAY_TAUNT2, m_creature); break; - case 2: DoScriptText(SAY_TAUNT3, m_creature); break; + case 0: DoScriptText(SAY_TAUNT_1, m_creature); break; + case 1: DoScriptText(SAY_TAUNT_2, m_creature); break; + case 2: DoScriptText(SAY_TAUNT_3, m_creature); break; } - RandomYellTimer = urand(60000, 150000); - }else RandomYellTimer -= diff; + m_uiRandomYellTimer = urand(60000, 150000); + } + else + m_uiRandomYellTimer -= uiDiff; DoMeleeAttackIfReady(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 08ea0beb9..8b83207ef 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2732" + #define SD2_REVISION_NR "2733" #endif // __SD2_REVISION_NR_H__ From 758f91205f5ee29b961b2896325398ae2130c33a Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sat, 13 Oct 2012 15:12:41 +0300 Subject: [PATCH 0729/1172] [2734] Improve script for Kil'jaeden - Sunwell Plateau * Allow players to use the Orb of the Blue Flight * Implement the Shield Orbs * Implement offcombat yells Note: the spells related to the Orb of the Blue Flight still need core support --- .../sunwell_plateau/boss_kiljaeden.cpp | 201 +++++++++++++----- .../instance_sunwell_plateau.cpp | 60 +++++- .../sunwell_plateau/sunwell_plateau.h | 16 ++ sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 + sql/scriptdev2_script_full.sql | 10 +- sql/updates/r2734_mangos.sql | 1 + sql/updates/r2734_scriptdev2.sql | 1 + 8 files changed, 235 insertions(+), 57 deletions(-) create mode 100644 sql/updates/r2734_mangos.sql create mode 100644 sql/updates/r2734_scriptdev2.sql diff --git a/scripts/eastern_kingdoms/sunwell_plateau/boss_kiljaeden.cpp b/scripts/eastern_kingdoms/sunwell_plateau/boss_kiljaeden.cpp index f8fd05dcb..4573d49a5 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/boss_kiljaeden.cpp +++ b/scripts/eastern_kingdoms/sunwell_plateau/boss_kiljaeden.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: boss_kiljaeden -SD%Complete: 50 -SDComment: Sinister Reflection need core and AI support; Orb of the Blue Fight activation NYI; Shield Orb summoning NYI; Armageddon NYI; Offcombat yells NYI; +SD%Complete: 80 +SDComment: Sinister Reflection need core and AI support. SDCategory: Sunwell Plateau EndScriptData */ @@ -26,11 +26,6 @@ EndScriptData */ enum { - SAY_ORDER_1 = -1580064, - SAY_ORDER_2 = -1580065, - SAY_ORDER_3 = -1580066, - SAY_ORDER_4 = -1580067, - SAY_ORDER_5 = -1580068, SAY_EMERGE = -1580069, SAY_SLAY_1 = -1580070, SAY_SLAY_2 = -1580071, @@ -97,11 +92,12 @@ enum SPELL_RING_BLUE_FLAME = 45825, // cast by the orb targets when activated SPELL_ANVEENA_PRISON = 46367, SPELL_SACRIFICE_ANVEENA = 46474, + SPELL_SINISTER_REFL_CLASS = 45893, // increase the size of the clones // Npcs NPC_SHIELD_ORB = 25502, NPC_SINISTER_REFLECTION = 25708, - NPC_ARMAGEDDON = 25735, // uses spell 45914 followed by spell 45911, 45912, then by 45909 + NPC_ARMAGEDDON = 25735, // npc handled by eventAI NPC_BLUE_ORB_TARGET = 25640, // dummy npc near gameobjects 187869, 188114, 188115, 188116 // phases @@ -204,6 +200,10 @@ static const EventLocations aOutroLocations[] = {1711.537f, 637.600f, 27.34f} // liadrin move forward }; +/*###### +## npc_kiljaeden_controller +######*/ + struct MANGOS_DLL_DECL npc_kiljaeden_controllerAI : public Scripted_NoMovementAI, private DialogueHelper { npc_kiljaeden_controllerAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature), @@ -225,12 +225,6 @@ struct MANGOS_DLL_DECL npc_kiljaeden_controllerAI : public Scripted_NoMovementAI DoCastSpellIfCan(m_creature, SPELL_ANVEENA_DRAIN); } - // Wrapper to start the dialogue text from another AI - void DoStartOutroDialogue() - { - StartNextDialogueText(NPC_KALECGOS); - } - void JustDidDialogueStep(int32 iEntry) { if (!m_pInstance) @@ -311,6 +305,13 @@ struct MANGOS_DLL_DECL npc_kiljaeden_controllerAI : public Scripted_NoMovementAI } } + void SummonedCreatureJustDied(Creature* pSummoned) + { + // Start outro dialogue when Kil'jaeden is killed + if (pSummoned->GetEntry() == NPC_KILJAEDEN) + StartNextDialogueText(NPC_KALECGOS); + } + void SummonedMovementInform(Creature* pSummoned, uint32 uiType, uint32 uiPointId) { if (uiType != POINT_MOTION_TYPE) @@ -356,6 +357,10 @@ struct MANGOS_DLL_DECL npc_kiljaeden_controllerAI : public Scripted_NoMovementAI } }; +/*###### +## boss_kiljaeden +######*/ + struct MANGOS_DLL_DECL boss_kiljaedenAI : public Scripted_NoMovementAI, private DialogueHelper { boss_kiljaedenAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature), @@ -369,6 +374,8 @@ struct MANGOS_DLL_DECL boss_kiljaedenAI : public Scripted_NoMovementAI, private instance_sunwell_plateau* m_pInstance; uint8 m_uiPhase; + uint8 m_uiMaxShieldOrbs; + uint8 m_uiShieldOrbCount; uint32 m_uiKalecSummonTimer; @@ -386,6 +393,8 @@ struct MANGOS_DLL_DECL boss_kiljaedenAI : public Scripted_NoMovementAI, private { m_uiPhase = PHASE_INFERNO; m_uiKalecSummonTimer = 35000; + m_uiMaxShieldOrbs = 1; + m_uiShieldOrbCount = 0; m_uiSoulFlyTimer = 10000; m_uiLegionLightingTimer = urand(10000, 15000); @@ -416,17 +425,6 @@ struct MANGOS_DLL_DECL boss_kiljaedenAI : public Scripted_NoMovementAI, private // Reset the corrupt Sunwell aura if (Creature* pKiljaedenController = m_pInstance->GetSingleCreatureFromStorage(NPC_KILJAEDEN_CONTROLLER)) pKiljaedenController->CastSpell(pKiljaedenController, SPELL_ANVEENA_DRAIN, true); - - // Respawn Anveena if necessary - if (Creature* pAnveena = m_pInstance->GetSingleCreatureFromStorage(NPC_ANVEENA)) - { - if (!pAnveena->isAlive()) - pAnveena->Respawn(); - } - - // Despawn Kalec if already summoned - if (Creature* pKalec = m_pInstance->GetSingleCreatureFromStorage(NPC_KALECGOS, true)) - pKalec->ForcedDespawn(); } // Despawn on wipe @@ -435,33 +433,47 @@ struct MANGOS_DLL_DECL boss_kiljaedenAI : public Scripted_NoMovementAI, private void KilledUnit(Unit* pVictim) { + if (pVictim->GetTypeId() != TYPEID_PLAYER) + return; + DoScriptText(urand(0, 1) ? SAY_SLAY_1 : SAY_SLAY_2, m_creature); } void JustDied(Unit* pKiller) { if (m_pInstance) - { m_pInstance->SetData(TYPE_KILJAEDEN, DONE); - - // Start the outro - if (Creature* pKiljaedenController = m_pInstance->GetSingleCreatureFromStorage(NPC_KILJAEDEN_CONTROLLER)) - { - if (npc_kiljaeden_controllerAI* pControllerAI = dynamic_cast(pKiljaedenController->AI())) - pControllerAI->DoStartOutroDialogue(); - } - } } void JustSummoned(Creature* pSummoned) { if (pSummoned->GetEntry() == NPC_KALECGOS) - { DoScriptText(SAY_KALECGOS_INTRO, pSummoned); - pSummoned->SetLevitate(true); + else if (pSummoned->GetEntry() == NPC_SHIELD_ORB) + { + pSummoned->CastSpell(pSummoned, SPELL_SHADOW_BOLT_AURA, true); + + // Start the movement of the shadow orb - calculate new position based on the angle between the boss and orb + float fX, fY, fAng; + fAng = m_creature->GetAngle(pSummoned) + M_PI_F/8; + // Normalize angle + if (fAng > 2*M_PI_F) + fAng = fAng - 2*M_PI_F; + + m_creature->GetNearPoint2D(fX, fY, 25.0f, fAng); + + // Move to new position + pSummoned->GetMotionMaster()->Clear(); + pSummoned->GetMotionMaster()->MovePoint(1, fX, fY, pSummoned->GetPositionZ()); } } + void SummonedCreatureJustDied(Creature* pSummoned) + { + if (pSummoned->GetEntry() == NPC_SHIELD_ORB) + --m_uiShieldOrbCount; + } + void GetAIInformation(ChatHandler& reader) { reader.PSendSysMessage("Kil'jaeden is currently in phase %u", m_uiPhase); @@ -496,20 +508,30 @@ struct MANGOS_DLL_DECL boss_kiljaedenAI : public Scripted_NoMovementAI, private DoCastSpellIfCan(m_creature, SPELL_SHADOW_SPIKE); break; case EVENT_DRAGON_ORB: + // Activate blue orbs if (Creature* pKalec = m_pInstance->GetSingleCreatureFromStorage(NPC_KALECGOS)) DoScriptText(irand(0, 1) ? SAY_KALECGOS_ORB_2 : SAY_KALECGOS_ORB_3, pKalec); - // no break + DoActivateDragonOrb(GO_ORB_BLUE_FLIGHT_2); + break; case SAY_KALECGOS_ORB_1: + DoActivateDragonOrb(GO_ORB_BLUE_FLIGHT_1); + break; case SAY_KALECGOS_ORB_4: - // ToDo: activate the blue dragon orbs + DoActivateDragonOrb(GO_ORB_BLUE_FLIGHT_3); + DoActivateDragonOrb(GO_ORB_BLUE_FLIGHT_4); break; case SAY_PHASE_3: + // Set next phase and increase the max shield orbs m_uiPhase = PHASE_DARKNESS; + ++m_uiMaxShieldOrbs; break; case SAY_PHASE_4: + // Set next phase and increase the max shield orbs m_uiPhase = PHASE_ARMAGEDDON; + ++m_uiMaxShieldOrbs; break; case SAY_PHASE_5: + // Set next phase and sacrifice Anveena if (Creature* pAnveena = m_pInstance->GetSingleCreatureFromStorage(NPC_ANVEENA)) { pAnveena->RemoveAurasDueToSpell(SPELL_ANVEENA_PRISON); @@ -521,6 +543,23 @@ struct MANGOS_DLL_DECL boss_kiljaedenAI : public Scripted_NoMovementAI, private } } + // Wrapper to activate dragon orbs + void DoActivateDragonOrb(uint32 uiEntry) + { + if (!m_pInstance) + return; + + // Set the visual around the Orb + if (GameObject* pGo = m_pInstance->GetSingleGameObjectFromStorage(uiEntry)) + { + if (Creature* pTarget = GetClosestCreatureWithEntry(pGo, NPC_BLUE_ORB_TARGET, 5.0f)) + pTarget->CastSpell(pTarget, SPELL_RING_BLUE_FLAME, false); + } + + // Make the orb usable + m_pInstance->DoToggleGameObjectFlags(uiEntry, GO_FLAG_NO_INTERACT, false); + } + void UpdateAI(const uint32 uiDiff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) @@ -618,6 +657,24 @@ struct MANGOS_DLL_DECL boss_kiljaedenAI : public Scripted_NoMovementAI, private else m_uiSoulFlyTimer -= uiDiff; + // Only spawn a Shadow orb when necessary + if (m_uiShieldOrbCount < m_uiMaxShieldOrbs) + { + if (m_uiShieldOrbTimer < uiDiff) + { + // Get some random coords for the Orb + float fX, fY, fZ; + m_creature->GetNearPoint2D(fX, fY, 25.0f, frand(0, 2*M_PI_F)); + fZ = frand(35.0f, 45.0f); + + m_creature->SummonCreature(NPC_SHIELD_ORB, fX, fY, fZ, 0, TEMPSUMMON_CORPSE_DESPAWN, 0); + ++m_uiShieldOrbCount; + m_uiShieldOrbTimer = 30000; + } + else + m_uiShieldOrbTimer -= uiDiff; + } + // Go to next phase and start transition dialogue if (m_uiPhase == PHASE_INFERNO && m_creature->GetHealthPercent() < 85.0f) StartNextDialogueText(PHASE_DARKNESS); @@ -639,23 +696,61 @@ bool EffectAuraDummy_spell_aura_dummy_darkness_of_souls(const Aura* pAura, bool { pTarget->CastSpell(pTarget, pAura->GetSpellProto()->CalculateSimpleValue(EFFECT_INDEX_2), true); - switch (irand(0, 2)) + switch (urand(0, 2)) { - case 0: - DoScriptText(SAY_DARKNESS_1, pTarget); - break; - case 1: - DoScriptText(SAY_DARKNESS_2, pTarget); - break; - case 2: - DoScriptText(SAY_DARKNESS_3, pTarget); - break; + case 0: DoScriptText(SAY_DARKNESS_1, pTarget); break; + case 1: DoScriptText(SAY_DARKNESS_2, pTarget); break; + case 2: DoScriptText(SAY_DARKNESS_3, pTarget); break; } } } return true; } +/*###### +## npc_shield_orb +######*/ + +struct MANGOS_DLL_DECL npc_shield_orbAI : public ScriptedAI +{ + npc_shield_orbAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = ((instance_sunwell_plateau*)pCreature->GetInstanceData()); + Reset(); + } + + instance_sunwell_plateau* m_pInstance; + + void Reset() { } + + // Handle circel movement around the boss + void MovementInform(uint32 uiMoveType, uint32 uiPointId) + { + if (uiMoveType != POINT_MOTION_TYPE || !uiPointId || !m_pInstance) + return; + + if (Creature* pSummoner = m_pInstance->GetSingleCreatureFromStorage(NPC_KILJAEDEN)) + { + // Calculate new position based on the angle between the boss and self + float fX, fY, fAng; + fAng = pSummoner->GetAngle(m_creature) + M_PI_F/8; + // Normalize angle + if (fAng > 2*M_PI_F) + fAng = fAng - 2*M_PI_F; + + pSummoner->GetNearPoint2D(fX, fY, 25.0f, fAng); + + // Move to new position + m_creature->GetMotionMaster()->Clear(); + m_creature->GetMotionMaster()->MovePoint(1, fX, fY, m_creature->GetPositionZ()); + } + } + + void AttackStart(Unit* pWho) {} + void MoveInLineOfSight(Unit* pWho) {} + void UpdateAI(const uint32 uiDiff) { } +}; + CreatureAI* GetAI_boss_kiljaeden(Creature *pCreature) { return new boss_kiljaedenAI(pCreature); @@ -666,6 +761,11 @@ CreatureAI* GetAI_npc_kiljaeden_controller(Creature *pCreature) return new npc_kiljaeden_controllerAI(pCreature); } +CreatureAI* GetAI_npc_shield_orb(Creature *pCreature) +{ + return new npc_shield_orbAI(pCreature); +} + void AddSC_boss_kiljaeden() { Script* pNewScript; @@ -680,4 +780,9 @@ void AddSC_boss_kiljaeden() pNewScript->Name="npc_kiljaeden_controller"; pNewScript->GetAI = &GetAI_npc_kiljaeden_controller; pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name="npc_shield_orb"; + pNewScript->GetAI = &GetAI_npc_shield_orb; + pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/sunwell_plateau/instance_sunwell_plateau.cpp b/scripts/eastern_kingdoms/sunwell_plateau/instance_sunwell_plateau.cpp index bb117f042..bcfcc4e6d 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/instance_sunwell_plateau.cpp +++ b/scripts/eastern_kingdoms/sunwell_plateau/instance_sunwell_plateau.cpp @@ -45,7 +45,8 @@ instance_sunwell_plateau::instance_sunwell_plateau(Map* pMap) : ScriptedInstance m_uiMuruBerserkTimer(0), m_uiDeceiversKilled(0), m_uiKalecRespawnTimer(0), - m_uiSpectralRealmTimer(5000) + m_uiSpectralRealmTimer(5000), + m_uiKiljaedenYellTimer(90000) { Initialize(); } @@ -104,6 +105,9 @@ void instance_sunwell_plateau::OnCreatureCreate(Creature* pCreature) case NPC_LIADRIN: m_mNpcEntryGuidStore[pCreature->GetEntry()] = pCreature->GetObjectGuid(); break; + case NPC_DECEIVER: + m_lDeceiversGuidList.push_back(pCreature->GetObjectGuid()); + break; } } @@ -126,6 +130,13 @@ void instance_sunwell_plateau::OnCreatureDeath(Creature* pCreature) } } +void instance_sunwell_plateau::OnCreatureEvade(Creature* pCreature) +{ + // Reset encounter if raid wipes at deceivers + if (pCreature->GetEntry() == NPC_DECEIVER) + SetData(TYPE_KILJAEDEN, FAIL); +} + void instance_sunwell_plateau::OnObjectCreate(GameObject* pGo) { switch(pGo->GetEntry()) @@ -157,6 +168,11 @@ void instance_sunwell_plateau::OnObjectCreate(GameObject* pGo) if (m_auiEncounter[TYPE_MURU] == DONE) pGo->SetGoState(GO_STATE_ACTIVE); break; + case GO_ORB_BLUE_FLIGHT_1: + case GO_ORB_BLUE_FLIGHT_2: + case GO_ORB_BLUE_FLIGHT_3: + case GO_ORB_BLUE_FLIGHT_4: + break; default: return; @@ -223,9 +239,26 @@ void instance_sunwell_plateau::SetData(uint32 uiType, uint32 uiData) break; case TYPE_KILJAEDEN: m_auiEncounter[uiType] = uiData; - // When event fails the deceivers are respawned so restart the counter if (uiData == FAIL) + { m_uiDeceiversKilled = 0; + + // Reset Orbs + DoToggleGameObjectFlags(GO_ORB_BLUE_FLIGHT_1, GO_FLAG_NO_INTERACT, true); + DoToggleGameObjectFlags(GO_ORB_BLUE_FLIGHT_2, GO_FLAG_NO_INTERACT, true); + DoToggleGameObjectFlags(GO_ORB_BLUE_FLIGHT_3, GO_FLAG_NO_INTERACT, true); + DoToggleGameObjectFlags(GO_ORB_BLUE_FLIGHT_4, GO_FLAG_NO_INTERACT, true); + + // Respawn deceivers + for (GuidList::const_iterator itr = m_lDeceiversGuidList.begin(); itr != m_lDeceiversGuidList.end(); ++itr) + { + if (Creature* pDeceiver = instance->GetCreature(*itr)) + { + if (!pDeceiver->isAlive()) + pDeceiver->Respawn(); + } + } + } break; } @@ -273,7 +306,7 @@ void instance_sunwell_plateau::Update(uint32 uiDiff) // Muru berserk timer; needs to be done here because it involves two distinct creatures if (m_auiEncounter[TYPE_MURU] == IN_PROGRESS) { - if (m_uiMuruBerserkTimer <= uiDiff) + if (m_uiMuruBerserkTimer < uiDiff) { if (Creature* pEntrpius = GetSingleCreatureFromStorage(NPC_ENTROPIUS, true)) pEntrpius->CastSpell(pEntrpius, SPELL_MURU_BERSERK, true); @@ -285,6 +318,27 @@ void instance_sunwell_plateau::Update(uint32 uiDiff) else m_uiMuruBerserkTimer -= uiDiff; } + + if (m_auiEncounter[TYPE_KILJAEDEN] == NOT_STARTED || m_auiEncounter[TYPE_KILJAEDEN] == FAIL) + { + if (m_uiKiljaedenYellTimer < uiDiff) + { + if (Creature* pKiljaeden = GetSingleCreatureFromStorage(NPC_KILJAEDEN_CONTROLLER)) + { + switch (urand(0, 4)) + { + case 0: DoScriptText(SAY_ORDER_1, pKiljaeden); break; + case 1: DoScriptText(SAY_ORDER_2, pKiljaeden); break; + case 2: DoScriptText(SAY_ORDER_3, pKiljaeden); break; + case 3: DoScriptText(SAY_ORDER_4, pKiljaeden); break; + case 4: DoScriptText(SAY_ORDER_5, pKiljaeden); break; + } + } + m_uiKiljaedenYellTimer = 90000; + } + else + m_uiKiljaedenYellTimer -= uiDiff; + } } void instance_sunwell_plateau::Load(const char* in) diff --git a/scripts/eastern_kingdoms/sunwell_plateau/sunwell_plateau.h b/scripts/eastern_kingdoms/sunwell_plateau/sunwell_plateau.h index 3ba53dc15..495633745 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/sunwell_plateau.h +++ b/scripts/eastern_kingdoms/sunwell_plateau/sunwell_plateau.h @@ -47,9 +47,21 @@ enum GO_MURU_EXIT_GATE = 188118, GO_THIRD_GATE = 187765, // door after muru; why another? + GO_ORB_BLUE_FLIGHT_1 = 187869, // orbs used in the Kil'jaeden fight + GO_ORB_BLUE_FLIGHT_2 = 188114, + GO_ORB_BLUE_FLIGHT_3 = 188115, + GO_ORB_BLUE_FLIGHT_4 = 188116, + SAY_KALECGOS_OUTRO = -1580043, SAY_TWINS_INTRO = -1580044, + // Kil'jaeden yells + SAY_ORDER_1 = -1580064, + SAY_ORDER_2 = -1580065, + SAY_ORDER_3 = -1580066, + SAY_ORDER_4 = -1580067, + SAY_ORDER_5 = -1580068, + AREATRIGGER_TWINS = 4937, // Felmyst ouro spell @@ -80,6 +92,7 @@ class MANGOS_DLL_DECL instance_sunwell_plateau : public ScriptedInstance, privat void OnObjectCreate(GameObject* pGo); void OnCreatureCreate(Creature* pCreature); void OnCreatureDeath(Creature* pCreature); + void OnCreatureEvade(Creature* pCreature); void SetData(uint32 uiType, uint32 uiData); uint32 GetData(uint32 uiType); @@ -100,5 +113,8 @@ class MANGOS_DLL_DECL instance_sunwell_plateau : public ScriptedInstance, privat uint32 m_uiSpectralRealmTimer; uint32 m_uiKalecRespawnTimer; uint32 m_uiMuruBerserkTimer; + uint32 m_uiKiljaedenYellTimer; + + GuidList m_lDeceiversGuidList; }; #endif diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 8b83207ef..a3e42aeb2 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2733" + #define SD2_REVISION_NR "2734" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index c9b7d7111..bc943c6ec 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -1060,6 +1060,7 @@ UPDATE creature_template SET ScriptName='boss_kiljaeden' WHERE entry=25315; UPDATE creature_template SET ScriptName='npc_kiljaeden_controller' WHERE entry=25608; UPDATE creature_template SET ScriptName='spell_dummy_npc_brutallus_cloud' WHERE entry=25703; UPDATE creature_template SET ScriptName='boss_felmyst' WHERE entry=25038; +UPDATE creature_template SET ScriptName='npc_shield_orb' WHERE entry=25502; /* SWAMP OF SORROWS */ UPDATE creature_template SET ScriptName='npc_galen_goodward' WHERE entry=5391; diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index efba07a0e..1f399239e 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -2967,11 +2967,11 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1580062,'De-ek Anur!',12494,1,0,0,'alythess SAY_ALYTHESS_DEAD'), (-1580063,'Your luck has run its course!',12493,1,0,0,'alythess SAY_ALYTHESS_BERSERK'), -(-1580064,'All my plans have led to this!',12495,1,0,0,'kiljaeden SAY_ORDER_1'), -(-1580065,'Stay on task! Do not waste time!',12496,1,0,0,'kiljaeden SAY_ORDER_2'), -(-1580066,'I have waited long enough!',12497,1,0,0,'kiljaeden SAY_ORDER_3'), -(-1580067,'Fail me and suffer for eternity!',12498,1,0,0,'kiljaeden SAY_ORDER_4'), -(-1580068,'Drain the girl! Drain her power until there is nothing but a vacant shell!',12499,1,0,0,'kiljaeden SAY_ORDER_5'), +(-1580064,'All my plans have led to this!',12495,6,0,0,'kiljaeden SAY_ORDER_1'), +(-1580065,'Stay on task! Do not waste time!',12496,6,0,0,'kiljaeden SAY_ORDER_2'), +(-1580066,'I have waited long enough!',12497,6,0,0,'kiljaeden SAY_ORDER_3'), +(-1580067,'Fail me and suffer for eternity!',12498,6,0,0,'kiljaeden SAY_ORDER_4'), +(-1580068,'Drain the girl! Drain her power until there is nothing but a vacant shell!',12499,6,0,0,'kiljaeden SAY_ORDER_5'), (-1580069,'The expendible have perished... So be it! Now I shall succeed where Sargeras could not! I will bleed this wretched world and secure my place as the true master of the Burning Legion. The end has come! Let the unraveling of this world commence!',12500,1,0,0,'kiljaeden SAY_EMERGE'), (-1580070,'Another step towards destruction!',12501,1,0,0,'kiljaeden SAY_SLAY_1'), (-1580071,'Anukh-Kyrie!',12502,1,0,0,'kiljaeden SAY_SLAY_2'), diff --git a/sql/updates/r2734_mangos.sql b/sql/updates/r2734_mangos.sql new file mode 100644 index 000000000..60804b924 --- /dev/null +++ b/sql/updates/r2734_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_shield_orb' WHERE entry=25502; diff --git a/sql/updates/r2734_scriptdev2.sql b/sql/updates/r2734_scriptdev2.sql new file mode 100644 index 000000000..2fce2de05 --- /dev/null +++ b/sql/updates/r2734_scriptdev2.sql @@ -0,0 +1 @@ +UPDATE script_texts SET type=6 WHERE entry IN (-1580064, -1580065, -1580066, -1580067, -1580068); From 919f99e8fad2235713920a66facf6a2c69791bc1 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sat, 13 Oct 2012 17:55:21 +0300 Subject: [PATCH 0730/1172] [2735] Cleanup and improve script for Gurtogg Bloodboil - Black Temple --- .../outland/black_temple/boss_bloodboil.cpp | 416 ++++++++---------- sd2_revision_nr.h | 2 +- 2 files changed, 188 insertions(+), 230 deletions(-) diff --git a/scripts/outland/black_temple/boss_bloodboil.cpp b/scripts/outland/black_temple/boss_bloodboil.cpp index 35d4b7ebb..adead44ec 100644 --- a/scripts/outland/black_temple/boss_bloodboil.cpp +++ b/scripts/outland/black_temple/boss_bloodboil.cpp @@ -16,41 +16,55 @@ /* ScriptData SDName: Boss_Bloodboil -SD%Complete: 85 -SDComment: Bloodboil not working correctly +SD%Complete: 90 +SDComment: Timers may need adjustments. SDCategory: Black Temple EndScriptData */ #include "precompiled.h" #include "black_temple.h" -//Speech'n'Sound -#define SAY_AGGRO -1564029 -#define SAY_SLAY1 -1564030 -#define SAY_SLAY2 -1564031 -#define SAY_SPECIAL1 -1564032 -#define SAY_SPECIAL2 -1564033 -#define SAY_ENRAGE1 -1564034 -#define SAY_ENRAGE2 -1564035 -#define SAY_DEATH -1564036 - -//Spells -#define SPELL_ACID_GEYSER 40630 -#define SPELL_ACIDIC_WOUND 40481 -#define SPELL_ARCING_SMASH 40599 -#define SPELL_BLOODBOIL 42005 // This spell is AoE whereas it shouldn't be -#define SPELL_FEL_ACID 40508 -#define SPELL_FEL_RAGE_SELF 40594 -#define SPELL_FEL_RAGE_TARGET 40604 -#define SPELL_FEL_RAGE_2 40616 -#define SPELL_FEL_RAGE_3 41625 -#define SPELL_BEWILDERING_STRIKE 40491 -#define SPELL_EJECT1 40486 // 1000 Physical damage + knockback + script effect (should handle threat reduction I think) -#define SPELL_EJECT2 40597 // 1000 Physical damage + Stun (used in phase 2?) -#define SPELL_TAUNT_GURTOGG 40603 -#define SPELL_INSIGNIFIGANCE 40618 -#define SPELL_BERSERK 45078 -#define SPELL_ENRAGE 27680 +enum +{ + // Speech'n'Sound + SAY_AGGRO = -1564029, + SAY_SLAY1 = -1564030, + SAY_SLAY2 = -1564031, + SAY_SPECIAL1 = -1564032, + SAY_SPECIAL2 = -1564033, + SAY_ENRAGE1 = -1564034, + SAY_ENRAGE2 = -1564035, + SAY_DEATH = -1564036, + + // Spells + // Phase 1 + SPELL_FEL_ACID_1 = 40508, + SPELL_ARCING_SMASH_1 = 40457, + SPELL_EJECT_1 = 40486, + SPELL_ACIDIC_WOUND = 40481, + SPELL_BLOODBOIL = 42005, + SPELL_BEWILDERING_STRIKE = 40491, + + // Phase 2 + SPELL_ACID_GEYSER = 40630, + SPELL_FEL_ACID_2 = 40595, + SPELL_ARCING_SMASH_2 = 40599, + SPELL_EJECT_2 = 40597, + SPELL_INSIGNIFIGANCE = 40618, + SPELL_FEL_RAGE = 40594, + SPELL_FEL_RAGE_PLAYER_1 = 40604, + SPELL_FEL_RAGE_PLAYER_2 = 40616, + SPELL_FEL_RAGE_PLAYER_3 = 41625, + SPELL_FEL_RAGE_4 = 40617, // spell not confirmed + SPELL_FEL_RAGE_5 = 46787, // spell not confirmed + SPELL_TAUNT_GURTOGG = 40603, + + // Other spells + SPELL_CHARGE = 40602, // spell not confirmed + SPELL_BERSERK = 27680, + + MAX_BLOODBOILS = 5, +}; struct MANGOS_DLL_DECL boss_gurtogg_bloodboilAI : public ScriptedAI { @@ -62,52 +76,42 @@ struct MANGOS_DLL_DECL boss_gurtogg_bloodboilAI : public ScriptedAI ScriptedInstance* m_pInstance; - ObjectGuid m_targetGuid; - - float TargetThreat; - - uint32 BloodboilTimer; - uint32 BloodboilCount; - uint32 AcidGeyserTimer; - uint32 AcidicWoundTimer; - uint32 ArcingSmashTimer; - uint32 EnrageTimer; - uint32 FelAcidTimer; - uint32 EjectTimer; - uint32 BewilderingStrikeTimer; - uint32 PhaseChangeTimer; - uint32 m_uiEnrageTimer; + uint32 m_uiBloodboilTimer; + uint32 m_uiAcidGeyserTimer; + uint32 m_uiAcidicWoundTimer; + uint32 m_uiArcingSmashTimer; + uint32 m_uiFelAcidTimer; + uint32 m_uiEjectTimer; + uint32 m_uiStrikeTimer; + uint32 m_uiPhaseChangeTimer; + uint32 m_uiBerserkTimer; + uint8 m_uiBloodboilCount; - bool Phase1; + bool m_bIsPhase1; void Reset() { - m_targetGuid.Clear(); - - TargetThreat = 0; - - BloodboilTimer = 10000; - BloodboilCount = 0; - AcidGeyserTimer = 1000; - AcidicWoundTimer = 6000; - ArcingSmashTimer = 19000; - EnrageTimer = 600000; - FelAcidTimer = 25000; - EjectTimer = 10000; - BewilderingStrikeTimer = 15000; - PhaseChangeTimer = 60000; - m_uiEnrageTimer = 600000; - - Phase1 = true; + m_uiBloodboilTimer = 10000; + m_uiBloodboilCount = 0; + m_uiAcidGeyserTimer = 1000; + m_uiAcidicWoundTimer = 6000; + m_uiArcingSmashTimer = 19000; + m_uiFelAcidTimer = 25000; + m_uiEjectTimer = 10000; + m_uiStrikeTimer = 15000; + m_uiPhaseChangeTimer = MINUTE*IN_MILLISECONDS; + m_uiBerserkTimer = 10*MINUTE*IN_MILLISECONDS; + + m_bIsPhase1 = true; } void JustReachedHome() { if (m_pInstance) - m_pInstance->SetData(TYPE_BLOODBOIL, NOT_STARTED); + m_pInstance->SetData(TYPE_BLOODBOIL, FAIL); } - void Aggro(Unit *who) + void Aggro(Unit* pWho) { DoScriptText(SAY_AGGRO, m_creature); @@ -115,12 +119,12 @@ struct MANGOS_DLL_DECL boss_gurtogg_bloodboilAI : public ScriptedAI m_pInstance->SetData(TYPE_BLOODBOIL, IN_PROGRESS); } - void KilledUnit(Unit *victim) + void KilledUnit(Unit* pVictim) { DoScriptText(urand(0, 1) ? SAY_SLAY1 : SAY_SLAY2, m_creature); } - void JustDied(Unit *victim) + void JustDied(Unit* pKiller) { if (m_pInstance) m_pInstance->SetData(TYPE_BLOODBOIL, DONE); @@ -128,203 +132,157 @@ struct MANGOS_DLL_DECL boss_gurtogg_bloodboilAI : public ScriptedAI DoScriptText(SAY_DEATH, m_creature); } - // Note: This seems like a very complicated fix. The fix needs to be handled by the core, as implementation of limited-target AoE spells are still not limited. - void CastBloodboil() - { - // Get the Threat List - ThreatList const& tList = m_creature->getThreatManager().getThreatList(); - - // He doesn't have anyone in his threatlist, useless to continue - if (tList.empty()) - return; - - std::list targets; - - //store the threat list in a different container - for (ThreatList::const_iterator itr = tList.begin();itr != tList.end(); ++itr) - { - Unit *target = m_creature->GetMap()->GetUnit((*itr)->getUnitGuid()); - - //only on alive players - if (target && target->isAlive() && target->GetTypeId() == TYPEID_PLAYER) - targets.push_back(target); - } - - //Sort the list of players - targets.sort(ObjectDistanceOrderReversed(m_creature)); - //Resize so we only get top 5 - targets.resize(5); - - //Aura each player in the targets list with Bloodboil. Aura code copied+pasted from Aura command in Level3.cpp - /*SpellEntry const *spellInfo = GetSpellStore()->LookupEntry(SPELL_BLOODBOIL); - if (spellInfo) - { - for(std::list::iterator itr = targets.begin(); itr != targets.end(); ++itr) - { - Unit* target = *itr; - if (!target) return; - for(uint32 i = 0;i<3; ++i) - { - uint8 eff = spellInfo->Effect[i]; - if (eff>=TOTAL_SPELL_EFFECTS) - continue; - - Aura *Aur = new Aura(spellInfo, i, NULL, target); - target->AddAura(Aur); - } - } - }*/ - } - - void RevertThreatOnTarget(ObjectGuid guid) - { - if (Player* pPlayer = m_creature->GetMap()->GetPlayer(guid)) - { - if (m_creature->getThreatManager().getThreat(pPlayer)) - m_creature->getThreatManager().modifyThreatPercent(pPlayer, -100); - - if (TargetThreat) - m_creature->AddThreat(pPlayer, TargetThreat); - } - } - - void UpdateAI(const uint32 diff) + void UpdateAI(const uint32 uiDiff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - if (ArcingSmashTimer < diff) + if (m_uiArcingSmashTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_ARCING_SMASH); - ArcingSmashTimer = 10000; - }else ArcingSmashTimer -= diff; - - if (FelAcidTimer < diff) - { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_FEL_ACID); - FelAcidTimer = 25000; - }else FelAcidTimer -= diff; + if (DoCastSpellIfCan(m_creature, m_bIsPhase1 ? SPELL_ARCING_SMASH_1 : SPELL_ARCING_SMASH_2) == CAST_OK) + m_uiArcingSmashTimer = 10000; + } + else + m_uiArcingSmashTimer -= uiDiff; - if (!m_creature->HasAura(SPELL_BERSERK, EFFECT_INDEX_0)) + if (m_uiFelAcidTimer < uiDiff) { - if (EnrageTimer < diff) - { - if (DoCastSpellIfCan(m_creature, SPELL_BERSERK) == CAST_OK) - DoScriptText(urand(0, 1) ? SAY_ENRAGE1 : SAY_ENRAGE2, m_creature); - }else EnrageTimer -= diff; + if (DoCastSpellIfCan(m_creature->getVictim(), m_bIsPhase1 ? SPELL_FEL_ACID_1 : SPELL_FEL_ACID_2) == CAST_OK) + m_uiFelAcidTimer = 25000; } + else + m_uiFelAcidTimer -= uiDiff; - if (Phase1) + // Phase 1 spells + if (m_bIsPhase1) { - if (BewilderingStrikeTimer < diff) + if (m_uiStrikeTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_BEWILDERING_STRIKE); - float mt_threat = m_creature->getThreatManager().getThreat(m_creature->getVictim()); - - if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_TOPAGGRO, 1)) - m_creature->AddThreat(target, mt_threat); - - BewilderingStrikeTimer = 20000; - }else BewilderingStrikeTimer -= diff; + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_BEWILDERING_STRIKE) == CAST_OK) + m_uiStrikeTimer = 20000; + } + else + m_uiStrikeTimer -= uiDiff; - if (EjectTimer < diff) + if (m_uiEjectTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_EJECT1); - m_creature->getThreatManager().modifyThreatPercent(m_creature->getVictim(), -40); - EjectTimer = 15000; - }else EjectTimer -= diff; + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_EJECT_1) == CAST_OK) + { + // Script effect: reduce threat on main target + m_creature->getThreatManager().modifyThreatPercent(m_creature->getVictim(), -40); + m_uiEjectTimer = 15000; + } + } + else + m_uiEjectTimer -= uiDiff; - if (AcidicWoundTimer < diff) + if (m_uiAcidicWoundTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_ACIDIC_WOUND); - AcidicWoundTimer = 10000; - }else AcidicWoundTimer -= diff; + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_ACIDIC_WOUND) == CAST_OK) + m_uiAcidicWoundTimer = 10000; + } + else + m_uiAcidicWoundTimer -= uiDiff; - if (BloodboilTimer < diff) + if (m_uiBloodboilTimer) { - if (BloodboilCount < 5) // Only cast it five times. + if (m_uiBloodboilTimer <= uiDiff) { - //CastBloodboil(); // Causes issues on windows, so is commented out. - DoCastSpellIfCan(m_creature->getVictim(), SPELL_BLOODBOIL); - ++BloodboilCount; - BloodboilTimer = 10000*BloodboilCount; + if (DoCastSpellIfCan(m_creature, SPELL_BLOODBOIL) == CAST_OK) + { + ++m_uiBloodboilCount; + + // Allow only 5 Bloodboils per phase. + if (m_uiBloodboilCount == MAX_BLOODBOILS) + m_uiBloodboilTimer = 0; + else + m_uiBloodboilTimer = 10000; + } } - }else BloodboilTimer -= diff; + else + m_uiBloodboilTimer -= uiDiff; + } } - - if (!Phase1) + // Phase 2 spells + else { - if (AcidGeyserTimer < diff) + if (m_uiAcidGeyserTimer) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_ACID_GEYSER); - AcidGeyserTimer = 30000; - }else AcidGeyserTimer -= diff; + if (m_uiAcidGeyserTimer <= uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_ACID_GEYSER) == CAST_OK) + m_uiAcidGeyserTimer = 0; + } + else + m_uiAcidGeyserTimer -= uiDiff; + } - if (EjectTimer < diff) + if (m_uiEjectTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_EJECT2); - EjectTimer = 15000; - }else EjectTimer -= diff; + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_EJECT_2) == CAST_OK) + m_uiEjectTimer = 15000; + } + else + m_uiEjectTimer -= uiDiff; } - if (PhaseChangeTimer < diff) + if (m_uiPhaseChangeTimer < uiDiff) { - if (Phase1) + if (m_bIsPhase1) { - Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0); - if (target && target->isAlive()) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) { - Phase1 = false; - - TargetThreat = m_creature->getThreatManager().getThreat(target); - m_targetGuid = target->GetObjectGuid(); - target->CastSpell(m_creature, SPELL_TAUNT_GURTOGG, true); - - if (m_creature->getThreatManager().getThreat(target)) - m_creature->getThreatManager().modifyThreatPercent(target, -100); - - m_creature->AddThreat(target, 50000000.0f); - - // If VMaps are disabled, this spell can call the whole instance - DoCastSpellIfCan(m_creature, SPELL_INSIGNIFIGANCE, CAST_TRIGGERED); - DoCastSpellIfCan(target, SPELL_FEL_RAGE_TARGET, CAST_TRIGGERED); - DoCastSpellIfCan(target, SPELL_FEL_RAGE_2, CAST_TRIGGERED); - - /* These spells do not work, comment them out for now. - DoCastSpellIfCan(target, SPELL_FEL_RAGE_2, CAST_TRIGGERED); - DoCastSpellIfCan(target, SPELL_FEL_RAGE_3, CAST_TRIGGERED);*/ - - //Cast this without triggered so that it appears in combat logs and shows visual. - DoCastSpellIfCan(m_creature, SPELL_FEL_RAGE_SELF); - - DoScriptText(urand(0, 1) ? SAY_SPECIAL1 : SAY_SPECIAL2, m_creature); - - AcidGeyserTimer = 1000; - PhaseChangeTimer = 30000; + // Buff self + if (DoCastSpellIfCan(m_creature, SPELL_FEL_RAGE) == CAST_OK) + { + DoScriptText(urand(0, 1) ? SAY_SPECIAL1 : SAY_SPECIAL2, m_creature); + + // Debuff player + DoCastSpellIfCan(pTarget, SPELL_FEL_RAGE_PLAYER_1, CAST_TRIGGERED); + DoCastSpellIfCan(pTarget, SPELL_FEL_RAGE_PLAYER_2, CAST_TRIGGERED); + DoCastSpellIfCan(pTarget, SPELL_FEL_RAGE_PLAYER_3, CAST_TRIGGERED); + // Allow player to taunt Gurtogg + pTarget->CastSpell(m_creature, SPELL_TAUNT_GURTOGG, true); + + // Don't allow others to generate threat + DoCastSpellIfCan(m_creature, SPELL_INSIGNIFIGANCE, CAST_TRIGGERED); + + // Reset timers + m_bIsPhase1 = false; + m_uiAcidGeyserTimer = 1000; + m_uiPhaseChangeTimer = 30000; + } } - }else // Encounter is a loop pretty much. Phase 1 -> Phase 2 -> Phase 1 -> Phase 2 till death or enrage + } + else { - if (m_targetGuid) - RevertThreatOnTarget(m_targetGuid); - - m_targetGuid.Clear(); - Phase1 = true; - BloodboilTimer = 10000; - BloodboilCount = 0; - AcidicWoundTimer += 2000; - ArcingSmashTimer += 2000; - FelAcidTimer += 2000; - EjectTimer += 2000; - PhaseChangeTimer = 60000; + // Reset timers + m_bIsPhase1 = true; + m_uiBloodboilTimer = 10000; + m_uiBloodboilCount = 0; + m_uiAcidicWoundTimer += 2000; + m_uiArcingSmashTimer += 2000; + m_uiFelAcidTimer += 2000; + m_uiEjectTimer += 2000; + m_uiPhaseChangeTimer = 60000; } - }else PhaseChangeTimer -= diff; + } + else + m_uiPhaseChangeTimer -= uiDiff; - //Enrage - if (m_uiEnrageTimer < diff) + if (m_uiBerserkTimer) { - DoCast(m_creature, SPELL_ENRAGE); - m_uiEnrageTimer = 60000; - }else m_uiEnrageTimer -= diff; + if (m_uiBerserkTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_BERSERK) == CAST_OK) + { + DoScriptText(urand(0, 1) ? SAY_ENRAGE1 : SAY_ENRAGE2, m_creature); + m_uiBerserkTimer = 0; + } + } + else + m_uiBerserkTimer -= uiDiff; + } DoMeleeAttackIfReady(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index a3e42aeb2..5ae7c2578 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2734" + #define SD2_REVISION_NR "2735" #endif // __SD2_REVISION_NR_H__ From 38755932ab3382d8c3a1994f0a829822fd3c6765 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sun, 14 Oct 2012 12:23:59 +0300 Subject: [PATCH 0731/1172] [2736] Cleanup script for Teron Gorefiend - Black Temple This will remove all the bad hacks from the script. However spells 40188 and 40251 require additional core support. --- .../black_temple/boss_teron_gorefiend.cpp | 375 ++++-------------- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 - 3 files changed, 79 insertions(+), 299 deletions(-) diff --git a/scripts/outland/black_temple/boss_teron_gorefiend.cpp b/scripts/outland/black_temple/boss_teron_gorefiend.cpp index ec92503c0..3ef0a6dbc 100644 --- a/scripts/outland/black_temple/boss_teron_gorefiend.cpp +++ b/scripts/outland/black_temple/boss_teron_gorefiend.cpp @@ -26,7 +26,7 @@ EndScriptData */ enum { - //Speech'n'sound + // Speech'n'sound SAY_INTRO = -1564037, SAY_AGGRO = -1564038, SAY_SLAY1 = -1564039, @@ -38,103 +38,27 @@ enum SAY_ENRAGE = -1564045, SAY_DEATH = -1564046, - //Spells - SPELL_INCINERATE = 40239, - SPELL_CRUSHING_SHADOWS = 40243, - SPELL_SHADOWBOLT = 40185, - SPELL_PASSIVE_SHADOWFORM = 40326, - SPELL_SHADOW_OF_DEATH = 40251, - SPELL_BERSERK = 45078, - - SPELL_ATROPHY = 40327, // Shadowy Constructs use this when they get within melee range of a player - - NPC_DOOM_BLOSSOM = 23123, - NPC_SHADOWY_CONSTRUCT = 23111 -}; - -struct MANGOS_DLL_DECL mob_shadowy_constructAI : public ScriptedAI -{ - mob_shadowy_constructAI(Creature* pCreature) : ScriptedAI(pCreature) - { - Reset(); - } - - ObjectGuid m_ghostGuid; - ObjectGuid m_teronGuid; // TODO unused, possible bug? - - uint32 m_uiCheckPlayerTimer; - uint32 m_uiCheckTeronTimer; - - void Reset() - { - m_ghostGuid.Clear(); - - m_uiCheckPlayerTimer = 2000; - m_uiCheckTeronTimer = 5000; - } - - void MoveInLineOfSight(Unit* pWho) - { - if (!pWho || !pWho->isAlive() || pWho->GetObjectGuid() == m_ghostGuid) - return; - - ScriptedAI::MoveInLineOfSight(pWho); - } - -/* Comment it out for now. NOTE TO FUTURE DEV: UNCOMMENT THIS OUT ONLY AFTER MIND CONTROL IS IMPLEMENTED - void DamageTaken(Unit* done_by, uint32 &damage) - { - if (done_by->GetObjectGuid() != m_ghostGuid) - damage = 0; // Only the ghost can deal damage. - } - */ - - void CheckPlayers() - { - ThreatList const& tList = m_creature->getThreatManager().getThreatList(); - if (tList.empty()) - return; // No threat list. Don't continue. - - std::list lTargets; - - for (ThreatList::const_iterator itr = tList.begin(); itr != tList.end(); ++itr) - { - Unit* pUnit = m_creature->GetMap()->GetUnit((*itr)->getUnitGuid()); - - if (pUnit && pUnit->isAlive()) - lTargets.push_back(pUnit); - } - - lTargets.sort(ObjectDistanceOrder(m_creature)); - Unit* pTarget = lTargets.front(); - if (pTarget && m_creature->IsWithinDistInMap(pTarget, m_creature->GetAttackDistance(pTarget))) - { - DoCastSpellIfCan(pTarget, SPELL_ATROPHY); - m_creature->AI()->AttackStart(pTarget); - } - } - - void UpdateAI(const uint32 uiDiff) - { - if (m_uiCheckPlayerTimer < uiDiff) - { - CheckPlayers(); - m_uiCheckPlayerTimer = 3000; - } - else - m_uiCheckPlayerTimer -= uiDiff; - - if (m_uiCheckTeronTimer < uiDiff) - { - Creature* pTeron = m_creature->GetMap()->GetCreature(m_teronGuid); - if (!pTeron || !pTeron->isAlive() || pTeron->IsInEvadeMode()) - m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); - - m_uiCheckTeronTimer = 5000; - } - else - m_uiCheckTeronTimer -= uiDiff; - } + // Spells - boss spells + SPELL_INCINERATE = 40239, + SPELL_CRUSHING_SHADOWS = 40243, + SPELL_SHADOW_OF_DEATH = 40251, + SPELL_BERSERK = 45078, + SPELL_SUMMON_DOOM_BLOSSOM = 40188, + SPELL_SUMMON_SKELETON_1 = 40270, + SPELL_SUMMON_SKELETON_2 = 41948, + SPELL_SUMMON_SKELETON_3 = 41949, + SPELL_SUMMON_SKELETON_4 = 41950, + SPELL_SUMMON_SPIRIT = 40266, + SPELL_DESTROY_SPIRIT = 41626, // purpose unk + SPELL_DESTROY_ALL_SPIRITS = 44659, // purpose unk + + // Spells - other + //SPELL_ATROPHY = 40327, // Shadowy Constructs use this when they get within melee range of a player + SPELL_SHADOWY_CONSTRUCT = 40326, + + //NPC_DOOM_BLOSSOM = 23123, // scripted in eventAI + NPC_SHADOWY_CONSTRUCT = 23111, // scripted in eventAI + //NPC_VENGEFUL_SPIRIT = 23109, // npc controlled by the dead player }; struct MANGOS_DLL_DECL boss_teron_gorefiendAI : public ScriptedAI @@ -142,6 +66,7 @@ struct MANGOS_DLL_DECL boss_teron_gorefiendAI : public ScriptedAI boss_teron_gorefiendAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIntroDone = false; Reset(); } @@ -149,60 +74,41 @@ struct MANGOS_DLL_DECL boss_teron_gorefiendAI : public ScriptedAI uint32 m_uiIncinerateTimer; uint32 m_uiSummonDoomBlossomTimer; - uint32 m_uiEnrageTimer; + uint32 m_uiBerserkTimer; uint32 m_uiCrushingShadowsTimer; uint32 m_uiShadowOfDeathTimer; - uint32 m_uiSummonShadowsTimer; - uint32 m_uiRandomYellTimer; - uint32 m_uiAggroTimer; - - ObjectGuid m_aggroTargetGuid; - ObjectGuid m_ghostGuid; // Player that gets killed by Shadow of Death and gets turned into a ghost - bool m_bIntro; + bool m_bIntroDone; void Reset() { - m_uiIncinerateTimer = urand(20000, 30000); - m_uiSummonDoomBlossomTimer = 12000; - m_uiEnrageTimer = MINUTE*10*IN_MILLISECONDS; - m_uiCrushingShadowsTimer = 22000; - m_uiSummonShadowsTimer = 60000; - m_uiRandomYellTimer = 50000; - - m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - // Start off unattackable so that the intro is done properly - m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - - m_uiAggroTimer = 20000; - m_aggroTargetGuid.Clear(); - m_bIntro = false; + m_uiIncinerateTimer = urand(20000, 30000); + m_uiSummonDoomBlossomTimer = urand(5000, 10000); + m_uiShadowOfDeathTimer = 10000; + m_uiCrushingShadowsTimer = 22000; + m_uiBerserkTimer = 10*MINUTE*IN_MILLISECONDS; } void JustReachedHome() { if (m_pInstance) - m_pInstance->SetData(TYPE_GOREFIEND, NOT_STARTED); + m_pInstance->SetData(TYPE_GOREFIEND, FAIL); } - void MoveInLineOfSight(Unit* pWho) + void Aggro(Unit* pWho) { - if (m_pInstance && m_pInstance->GetData(TYPE_GOREFIEND)!= IN_PROGRESS && !m_bIntro && pWho->GetTypeId() == TYPEID_PLAYER && pWho->isTargetableForAttack() && - m_creature->IsHostileTo(pWho) && pWho->isInAccessablePlaceFor(m_creature)) - { - if (m_creature->IsWithinDistInMap(pWho, VISIBLE_RANGE) && m_creature->IsWithinLOSInMap(pWho)) - { - m_pInstance->SetData(TYPE_GOREFIEND, IN_PROGRESS); - - m_creature->GetMotionMaster()->Clear(false); - m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + DoScriptText(SAY_AGGRO, m_creature); - DoScriptText(SAY_INTRO, m_creature); + if (m_pInstance) + m_pInstance->SetData(TYPE_GOREFIEND, IN_PROGRESS); + } - m_creature->HandleEmote(EMOTE_STATE_TALK); - m_aggroTargetGuid = pWho->GetObjectGuid(); - m_bIntro = true; - } + void MoveInLineOfSight(Unit* pWho) + { + if (!m_bIntroDone && pWho->GetTypeId() == TYPEID_PLAYER && m_creature->IsWithinDistInMap(pWho, 60.0f)) + { + DoScriptText(SAY_INTRO, m_creature); + m_bIntroDone = true; } ScriptedAI::MoveInLineOfSight(pWho); @@ -210,6 +116,9 @@ struct MANGOS_DLL_DECL boss_teron_gorefiendAI : public ScriptedAI void KilledUnit(Unit* pVictim) { + if (pVictim->GetTypeId() != TYPEID_PLAYER) + return; + DoScriptText(urand(0, 1) ? SAY_SLAY1 : SAY_SLAY2, m_creature); } @@ -221,136 +130,25 @@ struct MANGOS_DLL_DECL boss_teron_gorefiendAI : public ScriptedAI DoScriptText(SAY_DEATH, m_creature); } - float CalculateRandomLocation(float fLoc, uint32 uiRadius) + void JustSummoned(Creature* pSummoned) { - return fLoc + urand(0, 1) ? -rand()%uiRadius : rand()%uiRadius; - } + if (pSummoned->GetEntry() == NPC_SHADOWY_CONSTRUCT) + pSummoned->CastSpell(pSummoned, SPELL_SHADOWY_CONSTRUCT, true); - void SetThreatList(Creature* pCreature) - { - if (!pCreature) - return; - - ThreatList const& tList = m_creature->getThreatManager().getThreatList(); - for (ThreatList::const_iterator i = tList.begin();i != tList.end(); ++i) - { - Unit* pUnit = m_creature->GetMap()->GetUnit((*i)->getUnitGuid()); - - if (pUnit && pUnit->isAlive()) - { - float threat = m_creature->getThreatManager().getThreat(pUnit); - pCreature->AddThreat(pUnit, threat); - } - } - } - - void MindControlGhost() - { - /************************************************************************/ - /** NOTE FOR FUTURE DEVELOPER: PROPERLY IMPLEMENT THE GHOST PORTION *****/ - /** ONLY AFTER MaNGOS FULLY IMPLEMENTS MIND CONTROL ABILITIES *****/ - /** THE CURRENT CODE IN THIS FUNCTION IS ONLY THE BEGINNING OF *****/ - /** WHAT IS FULLY NECESSARY FOR GOREFIEND TO BE 100% COMPLETE *****/ - /************************************************************************/ - - Player* pGhost = NULL; - if (m_ghostGuid) - pGhost = m_creature->GetMap()->GetPlayer(m_ghostGuid); - - if (pGhost && pGhost->isAlive() && pGhost->HasAura(SPELL_SHADOW_OF_DEATH, EFFECT_INDEX_0)) - { - /*float x,y,z; - pGhost->GetPosition(x,y,z); - Creature* control = m_creature->SummonCreature(CREATURE_GHOST, x, y, z, 0, TEMPSUMMON_TIMED_DESAWN, 30000); - if (control) - { - ((Player*)pGhost)->Possess(control); - pGhost->DealDamage(pGhost, pGhost->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, - false); - }*/ - for(uint8 i = 0; i < 4; ++i) - { - float fX = CalculateRandomLocation(pGhost->GetPositionX(), 10); - float fY = CalculateRandomLocation(pGhost->GetPositionY(), 10); - - if (Creature* pConstruct = m_creature->SummonCreature(NPC_SHADOWY_CONSTRUCT, fX, fY, pGhost->GetPositionZ(), 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 45000)) - { - pConstruct->CastSpell(pConstruct, SPELL_PASSIVE_SHADOWFORM, true); - - SetThreatList(pConstruct); // Use same function as Doom Blossom to set Threat List. - if (mob_shadowy_constructAI* pConstructAI = dynamic_cast(pConstruct->AI())) - pConstructAI->m_ghostGuid = m_ghostGuid; - - Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1); - pConstruct->GetMotionMaster()->MoveChase(pTarget ? pTarget : m_creature->getVictim()); - } - } - } + pSummoned->SetInCombatWithZone(); } void UpdateAI(const uint32 uiDiff) { - if (m_bIntro) - { - if (m_uiAggroTimer < uiDiff) - { - m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - - DoScriptText(SAY_AGGRO, m_creature); - - m_creature->HandleEmote(EMOTE_STATE_NONE); - m_bIntro = false; - if (m_aggroTargetGuid) - { - if (Player* pPlayer = m_creature->GetMap()->GetPlayer(m_aggroTargetGuid)) - AttackStart(pPlayer); - - m_creature->SetInCombatWithZone(); - } - else - EnterEvadeMode(); - } - else - m_uiAggroTimer -= uiDiff; - } - - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim() || m_bIntro) + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - if (m_uiSummonShadowsTimer < uiDiff) - { - //MindControlGhost(); - for(uint8 i = 0; i < 2; ++i) - { - float fX = CalculateRandomLocation(m_creature->GetPositionX(), 10); - - if (Creature* pShadow = m_creature->SummonCreature(NPC_SHADOWY_CONSTRUCT, fX, m_creature->GetPositionY(), m_creature->GetPositionZ(), 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 0)) - { - Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1); - pShadow->AI()->AttackStart(pTarget ? pTarget : m_creature->getVictim()); - } - } - m_uiSummonShadowsTimer = 60000; - } - else - m_uiSummonShadowsTimer -= uiDiff; - if (m_uiSummonDoomBlossomTimer < uiDiff) { - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + if (DoCastSpellIfCan(m_creature, SPELL_SUMMON_DOOM_BLOSSOM) == CAST_OK) { - float fX = CalculateRandomLocation(pTarget->GetPositionX(), 20); - float fY = CalculateRandomLocation(pTarget->GetPositionY(), 20); - - if (Creature* pDoomBlossom = m_creature->SummonCreature(NPC_DOOM_BLOSSOM, fX, fY, pTarget->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 20000)) - { - pDoomBlossom->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - pDoomBlossom->setFaction(m_creature->getFaction()); - pDoomBlossom->AddThreat(pTarget); - - SetThreatList(pDoomBlossom); - } + if (urand(0, 1)) + DoScriptText(urand(0, 1) ? SAY_SPELL1 : SAY_SPELL2, m_creature); m_uiSummonDoomBlossomTimer = 35000; } @@ -360,71 +158,59 @@ struct MANGOS_DLL_DECL boss_teron_gorefiendAI : public ScriptedAI if (m_uiIncinerateTimer < uiDiff) { - DoScriptText(urand(0, 1) ? SAY_SPECIAL1 : SAY_SPECIAL2, m_creature); - Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1); - DoCastSpellIfCan(pTarget ? pTarget : m_creature->getVictim(), SPELL_INCINERATE); - m_uiIncinerateTimer = urand(20000, 50000); + + if (DoCastSpellIfCan(pTarget ? pTarget : m_creature->getVictim(), SPELL_INCINERATE) == CAST_OK) + m_uiIncinerateTimer = urand(20000, 50000); } else m_uiIncinerateTimer -= uiDiff; if (m_uiCrushingShadowsTimer < uiDiff) { - Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0); - if (pTarget && pTarget->isAlive()) - DoCastSpellIfCan(pTarget, SPELL_CRUSHING_SHADOWS); + if (DoCastSpellIfCan(m_creature, SPELL_CRUSHING_SHADOWS) == CAST_OK) + { + if (urand(0, 1)) + DoScriptText(urand(0, 1) ? SAY_SPECIAL1 : SAY_SPECIAL2, m_creature); - m_uiCrushingShadowsTimer = urand(10000, 26000); + m_uiCrushingShadowsTimer = urand(10000, 26000); + } } else m_uiCrushingShadowsTimer -= uiDiff; - /*** NOTE FOR FUTURE DEV: UNCOMMENT BELOW ONLY IF MIND CONTROL IS FULLY IMPLEMENTED **/ - /*if (m_uiShadowOfDeathTimer < uiDiff) + if (m_uiShadowOfDeathTimer < uiDiff) { - Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1); - - if (!pTarget) - pTarget = m_creature->getVictim(); - - if (pTarget && pTarget->isAlive() && pTarget->GetTypeId() == TYPEID_PLAYER) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1, SPELL_SHADOW_OF_DEATH, SELECT_FLAG_PLAYER)) { - DoCastSpellIfCan(pTarget, SPELL_SHADOW_OF_DEATH); - m_ghostGuid = pTarget->GetObjectGuid(); - m_uiShadowOfDeathTimer = 30000; - m_uiSummonShadowsTimer = 53000; // Make it VERY close but slightly less so that we can check if the aura is still on the pPlayer + if (DoCastSpellIfCan(pTarget, SPELL_SHADOW_OF_DEATH) == CAST_OK) + { + DoScriptText(urand(0, 1) ? SAY_SPECIAL1 : SAY_SPECIAL2, m_creature); + m_uiShadowOfDeathTimer = 30000; + } } - }else m_uiShadowOfDeathTimer -= uiDiff;*/ - - if (m_uiRandomYellTimer < uiDiff) - { - DoScriptText(urand(0, 1) ? SAY_SPELL1 : SAY_SPELL2, m_creature); - m_uiRandomYellTimer = urand(50000, 100000); } else - m_uiRandomYellTimer -= uiDiff; + m_uiShadowOfDeathTimer -= uiDiff; - if (!m_creature->HasAura(SPELL_BERSERK, EFFECT_INDEX_0)) + if (m_uiBerserkTimer) { - if (m_uiEnrageTimer < uiDiff) + if (m_uiBerserkTimer <= uiDiff) { - DoCastSpellIfCan(m_creature, SPELL_BERSERK); - DoScriptText(SAY_ENRAGE, m_creature); + if (DoCastSpellIfCan(m_creature, SPELL_BERSERK) == CAST_OK) + { + DoScriptText(SAY_ENRAGE, m_creature); + m_uiBerserkTimer = 0; + } } else - m_uiEnrageTimer -= uiDiff; + m_uiBerserkTimer -= uiDiff; } DoMeleeAttackIfReady(); } }; -CreatureAI* GetAI_mob_shadowy_construct(Creature* pCreature) -{ - return new mob_shadowy_constructAI(pCreature); -} - CreatureAI* GetAI_boss_teron_gorefiend(Creature* pCreature) { return new boss_teron_gorefiendAI(pCreature); @@ -434,11 +220,6 @@ void AddSC_boss_teron_gorefiend() { Script* pNewScript; - pNewScript = new Script; - pNewScript->Name = "mob_shadowy_construct"; - pNewScript->GetAI = &GetAI_mob_shadowy_construct; - pNewScript->RegisterSelf(); - pNewScript = new Script; pNewScript->Name = "boss_teron_gorefiend"; pNewScript->GetAI = &GetAI_boss_teron_gorefiend; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 5ae7c2578..854a06d0b 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2735" + #define SD2_REVISION_NR "2736" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index bc943c6ec..917fafc34 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -313,7 +313,6 @@ UPDATE creature_template SET ScriptName='molten_flame' WHERE entry=23095; -- Mol UPDATE creature_template SET ScriptName='mob_ashtongue_channeler' WHERE entry=23421; -- Ashtongue CHanneler in Shade of AKama UPDATE creature_template SET ScriptName='mob_ashtongue_sorcerer' WHERE entry=23215; -- Ashtongue Sorcerer in Shade of Akama UPDATE creature_template SET ScriptName='npc_spirit_of_olum' WHERE entry=23411; --- UPDATE creature_template SET ScriptName='mob_shadowy_construct' WHERE entry=23111; -- Shadowy Construct in Teron Gorefiend's encounter. Commented until Mind Control is implemented. /* BLACKFATHOM DEPTHS */ UPDATE instance_template SET ScriptName='instance_blackfathom_deeps' WHERE map=48; From 9928e660e531739132bcad592685a64359d448b3 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Mon, 15 Oct 2012 00:26:46 +0300 Subject: [PATCH 0732/1172] [2737] Cleanup and improve script for Reliquary of Souls - Black Temple *Remove all of the old hacks *Properly handle summons *Properly handle phase transition *Improve timers and spell handling --- scripts/outland/black_temple/black_temple.h | 1 + .../black_temple/boss_reliquary_of_souls.cpp | 1077 +++++++---------- .../black_temple/instance_black_temple.cpp | 1 + sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 + sql/updates/r2737_mangos.sql | 2 + 6 files changed, 441 insertions(+), 643 deletions(-) create mode 100644 sql/updates/r2737_mangos.sql diff --git a/scripts/outland/black_temple/black_temple.h b/scripts/outland/black_temple/black_temple.h index 85d9d988d..368a51d53 100644 --- a/scripts/outland/black_temple/black_temple.h +++ b/scripts/outland/black_temple/black_temple.h @@ -23,6 +23,7 @@ enum // NPC_SUPREMUS = 22898, NPC_SHADE_OF_AKAMA = 22841, NPC_AKAMA_SHADE = 22990, + NPC_RELIQUARY_OF_SOULS = 22856, NPC_ILLIDARI_COUNCIL = 23426, NPC_COUNCIL_VOICE = 23499, NPC_LADY_MALANDE = 22951, diff --git a/scripts/outland/black_temple/boss_reliquary_of_souls.cpp b/scripts/outland/black_temple/boss_reliquary_of_souls.cpp index e9c1949f7..d5ab31df9 100644 --- a/scripts/outland/black_temple/boss_reliquary_of_souls.cpp +++ b/scripts/outland/black_temple/boss_reliquary_of_souls.cpp @@ -24,79 +24,90 @@ EndScriptData */ #include "precompiled.h" #include "black_temple.h" -//Sound'n'speech -//Suffering -#define SUFF_SAY_FREED -1564047 -#define SUFF_SAY_AGGRO -1564048 -#define SUFF_SAY_SLAY1 -1564049 -#define SUFF_SAY_SLAY2 -1564050 -#define SUFF_SAY_SLAY3 -1564051 -#define SUFF_SAY_RECAP -1564052 -#define SUFF_SAY_AFTER -1564053 -#define EMOTE_BOSS_GENERIC_ENRAGED -1000006 - -//Desire -#define DESI_SAY_FREED -1564055 -#define DESI_SAY_SLAY1 -1564056 -#define DESI_SAY_SLAY2 -1564057 -#define DESI_SAY_SLAY3 -1564058 -#define DESI_SAY_SPEC -1564059 -#define DESI_SAY_RECAP -1564060 -#define DESI_SAY_AFTER -1564061 - -//Anger -#define ANGER_SAY_FREED -1564062 -#define ANGER_SAY_FREED2 -1564063 -#define ANGER_SAY_SLAY1 -1564064 -#define ANGER_SAY_SLAY2 -1564065 -#define ANGER_SAY_SPEC -1564066 -#define ANGER_SAY_BEFORE -1564067 -#define ANGER_SAY_DEATH -1564068 - -//Spells -#define AURA_OF_SUFFERING 41292 -#define AURA_OF_SUFFERING_ARMOR 42017 -#define ESSENCE_OF_SUFFERING_PASSIVE 41296 -#define SPELL_ENRAGE 41305 -#define SPELL_SOUL_DRAIN 41303 -#define SPELL_FIXATE 41295 - -#define AURA_OF_DESIRE 41350 -#define SPELL_RUNE_SHIELD 41431 -#define SPELL_DEADEN 41410 -#define SPELL_SOUL_SHOCK 41426 - -#define AURA_OF_ANGER 41337 -#define SPELL_SELF_SEETHE 41364 -#define SPELL_ENEMY_SEETHE 41520 -#define SPELL_SOUL_SCREAM 41545 -#define SPELL_SPITE 41377 - -#define ENSLAVED_SOUL_PASSIVE 41535 -#define SPELL_SOUL_RELEASE 41542 -#define SPELL_RESTORE_MANA 32848 -#define SPELL_RESTORE_HEALTH 25329 - -#define CREATURE_ENSLAVED_SOUL 23469 - -struct ReliquaryPosition +enum { - float x,y; + // Sound'n'speech + // Suffering + SUFF_SAY_FREED = -1564047, + SUFF_SAY_AGGRO = -1564048, + SUFF_SAY_SLAY1 = -1564049, + SUFF_SAY_SLAY2 = -1564050, + SUFF_SAY_FRENZY = -1564051, + SUFF_SAY_RECAP = -1564052, + SUFF_SAY_AFTER = -1564053, + EMOTE_BOSS_GENERIC_ENRAGED = -1000006, + + // Desire + DESI_SAY_FREED = -1564055, + DESI_SAY_SLAY1 = -1564056, + DESI_SAY_SLAY2 = -1564057, + DESI_SAY_SLAY3 = -1564058, + DESI_SAY_SPEC = -1564059, + DESI_SAY_RECAP = -1564060, + DESI_SAY_AFTER = -1564061, + + // Anger + ANGER_SAY_FREED = -1564062, + ANGER_SAY_FREED2 = -1564063, + ANGER_SAY_SLAY1 = -1564064, + ANGER_SAY_SLAY2 = -1564065, + ANGER_SAY_SPEC = -1564066, + ANGER_SAY_BEFORE = -1564067, + ANGER_SAY_DEATH = -1564068, + + // Spells + // Suffering + SPELL_AURA_OF_SUFFERING = 41292, + SPELL_AURA_OF_SUFFERING_ARMOR = 42017, + SPELL_SUFFERING_PASSIVE = 41296, + SPELL_SUFFERING_PASSIVE_2 = 41623, + SPELL_FRENZY = 41305, + SPELL_SOUL_DRAIN = 41303, + + // Desire + SPELL_AURA_OF_DESIRE = 41350, + SPELL_RUNE_SHIELD = 41431, + SPELL_DEADEN = 41410, + SPELL_SPIRIT_SHOCK = 41426, + + // Anger + SPELL_AURA_OF_ANGER = 41337, + SPELL_SEETHE = 41364, + SPELL_SOUL_SCREAM = 41545, + SPELL_SPITE = 41376, // triggers 41377 after 2 seconds + + // Generic + SPELL_SUMMON_ESSENCE_SUFFERING = 41488, + SPELL_SUMMON_ESSENCE_DESIRE = 41493, + SPELL_SUMMON_ESSENCE_ANGER = 41496, + SPELL_SUMMON_ENSLAVED_SOUL = 41537, + + // Soul spells + SPELL_ENSLAVED_SOUL_PASSIVE = 41535, + SPELL_SOUL_RELEASE = 41542, + + // Summons + NPC_ESSENCE_SUFFERING = 23418, + NPC_ESSENCE_DESIRE = 23419, + NPC_ESSENCE_ANGER = 23420, + NPC_ENSLAVED_SOUL = 23469, // scripted in eventAI + + // Phases + PHASE_0_NOT_BEGUN = 0, + PHASE_1_SUFFERING = 1, + PHASE_2_DESIRE = 2, + PHASE_3_ANGER = 3, + + MAX_ENSLAVED_SOULS = 36, }; -static ReliquaryPosition Coords[]= -{ - {450.4f, 212.3f}, - {542.1f, 212.3f}, - {542.1f, 168.3f}, - {542.1f, 137.4f}, - {450.4f, 137.4f}, - {450.4f, 168.3f} -}; +/*###### +## boss_reliquary_of_souls +######*/ -struct MANGOS_DLL_DECL boss_reliquary_of_soulsAI : public ScriptedAI +struct MANGOS_DLL_DECL boss_reliquary_of_soulsAI : public Scripted_NoMovementAI { - boss_reliquary_of_soulsAI(Creature* pCreature) : ScriptedAI(pCreature) + boss_reliquary_of_soulsAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); Reset(); @@ -104,592 +115,357 @@ struct MANGOS_DLL_DECL boss_reliquary_of_soulsAI : public ScriptedAI ScriptedInstance* m_pInstance; - ObjectGuid m_sufferingGuid; - ObjectGuid m_desireGuid; - ObjectGuid m_angerGuid; - - uint32 SoulDeathCount; - // 0 = Out of Combat, 1 = Not started, 2 = Suffering, 3 = Souls, 4 = Desire, 5 = Souls, 6 = Anger - uint32 Phase; - uint32 SummonEssenceTimer; - uint32 DespawnEssenceTimer; - uint32 SoulCount; - uint32 SummonSoulTimer; - uint32 AnimationTimer; + uint8 m_uiPhase; + uint8 m_uiSoulSummonedCount; + uint8 m_uiSoulDeathCount; - bool IsDead; - bool EndingPhase; + uint32 m_uiSummonEssenceTimer; + uint32 m_uiSummonSoulTimer; + uint32 m_uiAnimationTimer; + uint32 m_uiAnimResetTimer; void Reset() { - DespawnEssences(); + m_uiPhase = PHASE_0_NOT_BEGUN; + m_uiSoulDeathCount = 0; + m_uiSoulSummonedCount = 0; - SoulDeathCount = 0; - Phase = 0; - SummonEssenceTimer = 8000; - DespawnEssenceTimer = 2000; - SoulCount = 0; - SummonSoulTimer = 1000; - AnimationTimer = 8000; + m_uiSummonSoulTimer = 1000; + m_uiAnimationTimer = 0; + m_uiAnimResetTimer = 0; + m_uiSummonEssenceTimer = 0; - IsDead = false; - EndingPhase = false; - - m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - m_creature->HandleEmote(EMOTE_ONESHOT_NONE); - m_creature->GetMotionMaster()->Clear(false); + // Reset animation + m_creature->HandleEmote(EMOTE_STATE_NONE); } - void JustReachedHome() + void JustDied(Unit* pKiller) { if (m_pInstance) - m_pInstance->SetData(TYPE_RELIQUIARY, NOT_STARTED); + m_pInstance->SetData(TYPE_RELIQUIARY, DONE); } - void DespawnEssences() + void JustReachedHome() { - Creature* pEssence = NULL; - - if (m_sufferingGuid) - pEssence = m_creature->GetMap()->GetCreature(m_sufferingGuid); - else if (m_desireGuid) - pEssence = m_creature->GetMap()->GetCreature(m_desireGuid); - else if (m_angerGuid) - pEssence = m_creature->GetMap()->GetCreature(m_angerGuid); - - if (pEssence && pEssence->isAlive()) - pEssence->ForcedDespawn(); + if (m_pInstance) + m_pInstance->SetData(TYPE_RELIQUIARY, FAIL); } - void AttackStart(Unit* who) { } + void AttackStart(Unit* pWho) { } - void MoveInLineOfSight(Unit *who) + void MoveInLineOfSight(Unit* pWho) { - if (who->isTargetableForAttack() && who->isInAccessablePlaceFor(m_creature) && m_creature->IsHostileTo(who)) + if (m_uiPhase == PHASE_0_NOT_BEGUN && pWho->GetTypeId() == TYPEID_PLAYER && !((Player*)pWho)->isGameMaster() && + m_creature->IsWithinDistInMap(pWho, m_creature->GetAttackDistance(pWho)) && m_creature->IsWithinLOSInMap(pWho)) { - float attackRadius = m_creature->GetAttackDistance(who); - if (m_creature->IsWithinDistInMap(who, attackRadius) && m_creature->GetDistanceZ(who) <= CREATURE_Z_ATTACK_RANGE && m_creature->IsWithinLOSInMap(who)) - { - who->RemoveSpellsCausingAura(SPELL_AURA_MOD_STEALTH); - - if (m_creature->getThreatManager().getThreatList().empty()) - { - if (m_pInstance) - m_pInstance->SetData(TYPE_RELIQUIARY, IN_PROGRESS); + // Start phase 1 + m_uiPhase = PHASE_1_SUFFERING; + m_uiSummonEssenceTimer = 7000; + m_uiAnimationTimer = 4000; - Phase = 1; + // Set the player in combat with the boss + pWho->SetInCombatWith(m_creature); + m_creature->AddThreat(pWho); - // I R ANNNGRRRY! - m_creature->HandleEmote(EMOTE_STATE_READY2H); - SummonEssenceTimer = 8000; - AnimationTimer = 5100; - m_creature->AddThreat(who); - //m_creature->SetInCombatWith(who); // Don't know what is like retail - //who->SetInCombatWith(m_creature); - m_creature->SetInCombatWithZone(); // Same goes here, but setting to zone will prevent bug if the only player of threatList dies + // Start animation + m_creature->SetStandState(UNIT_STAND_STATE_STAND); - } - } + if (m_pInstance) + m_pInstance->SetData(TYPE_RELIQUIARY, IN_PROGRESS); } } - void SummonSoul() + void JustSummoned(Creature* pSummoned) { - uint32 random = urand(0, 5); - float x = Coords[random].x; - float y = Coords[random].y; - - Creature* Soul = m_creature->SummonCreature(CREATURE_ENSLAVED_SOUL, x, y, m_creature->GetPositionZ(), m_creature->GetOrientation(), TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 45000); - Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0); - if (target && Soul) - { - Soul->CastSpell(Soul, ENSLAVED_SOUL_PASSIVE, true); - Soul->AddThreat(target); - ++SoulCount; + switch (pSummoned->GetEntry()) + { + case NPC_ESSENCE_SUFFERING: + DoScriptText(SUFF_SAY_FREED, pSummoned); + break; + case NPC_ESSENCE_DESIRE: + DoScriptText(DESI_SAY_FREED, pSummoned); + break; + case NPC_ESSENCE_ANGER: + DoScriptText(ANGER_SAY_FREED, pSummoned); + break; } + + // All summons are set in combat + pSummoned->SetInCombatWithZone(); } void SummonedCreatureJustDied(Creature* pSummoned) { - if (pSummoned->GetEntry() == CREATURE_ENSLAVED_SOUL) - ++SoulDeathCount; + // Self kill when the Essence of Anger is killed + if (pSummoned->GetEntry() == NPC_ESSENCE_ANGER) + m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); } - void MergeThreatList(Creature* target) + void SummonedMovementInform(Creature* pSummoned, uint32 uiMoveType, uint32 uiPointId) { - if (!target) + if (uiMoveType != POINT_MOTION_TYPE || !uiPointId) return; - ThreatList const& tList = m_creature->getThreatManager().getThreatList(); - for (ThreatList::const_iterator itr = tList.begin();itr != tList.end(); ++itr) - { - if (Unit* pUnit = m_creature->GetMap()->GetUnit((*itr)->getUnitGuid())) - { - m_creature->AddThreat(pUnit); // This is so that we make sure the unit is in Reliquary's threat list before we reset the unit's threat. - m_creature->getThreatManager().modifyThreatPercent(pUnit, -100); - float threat = target->getThreatManager().getThreat(pUnit); - m_creature->AddThreat(pUnit, threat); // This makes it so that the unit has the same amount of threat in Reliquary's threatlist as in the target creature's (One of the Essences). - } + // Switch to next phase when the essence gets back + switch (pSummoned->GetEntry()) + { + case NPC_ESSENCE_SUFFERING: + DoScriptText(SUFF_SAY_AFTER, pSummoned); + m_uiPhase = PHASE_2_DESIRE;; + break; + case NPC_ESSENCE_DESIRE: + DoScriptText(DESI_SAY_AFTER, pSummoned); + m_uiPhase = PHASE_3_ANGER; + break; } - } - void JustDied(Unit* killer) - { - if (m_pInstance) - m_pInstance->SetData(TYPE_RELIQUIARY, DONE); + // Despawn and set animation + pSummoned->ForcedDespawn(); + + m_uiSoulDeathCount = 0; + m_uiSoulSummonedCount = 0; + m_uiAnimResetTimer = 2000; + // Reset animation + m_creature->HandleEmote(EMOTE_ONESHOT_EMERGE); } - void UpdateAI(const uint32 diff) + // Wrapper to count the dead spirits + void DoNotifySouldDead() { - if (!Phase) - return; + ++m_uiSoulDeathCount; - // Reset if event is begun and we don't have a threatlist - if (Phase && m_creature->getThreatManager().getThreatList().empty()) - EnterEvadeMode(); - - if (Phase == 1) + // Prepare to summon the essence + if (m_uiSoulDeathCount == MAX_ENSLAVED_SOULS) { - if (AnimationTimer < diff) - { - // Release the cube - m_creature->HandleEmote(EMOTE_ONESHOT_SUBMERGE); - AnimationTimer = 8300; - }else AnimationTimer -= diff; - - if (SummonEssenceTimer < diff) - { - // Ribs: open - m_creature->HandleEmote(EMOTE_STATE_SUBMERGED); - - Creature* EssenceSuffering = m_creature->SummonCreature(23418, m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), 1.57f, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 10000); - - if (EssenceSuffering) - { - DoScriptText(SUFF_SAY_FREED, EssenceSuffering); - - if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_TOPAGGRO, 0)) - { - EssenceSuffering->AddThreat(target); - EssenceSuffering->AI()->AttackStart(target); - } - - m_sufferingGuid = EssenceSuffering->GetObjectGuid(); - } - - EndingPhase = false; - Phase = 2; - }else SummonEssenceTimer -= diff; + m_uiSummonEssenceTimer = 7000; + m_uiAnimationTimer = 4000; } + } - if (Phase == 2) + void UpdateAI(const uint32 uiDiff) + { + // Animation for opening the Reliquary + if (m_uiAnimationTimer) { - if (m_sufferingGuid) + if (m_uiAnimationTimer <= uiDiff) { - Creature* EssenceSuffering = m_creature->GetMap()->GetCreature(m_sufferingGuid); - - if (!EssenceSuffering || (!EssenceSuffering->isAlive())) - EnterEvadeMode(); - - if (!EndingPhase) - { - if (EssenceSuffering) - { - if (EssenceSuffering->GetHealthPercent() < 10.0f) - { - DoScriptText(SUFF_SAY_RECAP, EssenceSuffering); - MergeThreatList(EssenceSuffering); - EssenceSuffering->RemoveAllAuras(); - EssenceSuffering->DeleteThreatList(); - EssenceSuffering->GetMotionMaster()->MoveFollow(m_creature,0.0f,0.0f); - EssenceSuffering->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - DespawnEssenceTimer = 4000; - AnimationTimer = 2200; - EndingPhase = true; - } - } - } - - if ((EndingPhase) && (EssenceSuffering) && (EssenceSuffering->isAlive())) - { - if (AnimationTimer < diff) - { - // Return - EssenceSuffering->HandleEmote(EMOTE_ONESHOT_SUBMERGE); - AnimationTimer = 10000; - }else AnimationTimer -= diff; - - if (DespawnEssenceTimer < diff) - { - DoScriptText(SUFF_SAY_AFTER, EssenceSuffering); - - EssenceSuffering->DeleteThreatList(); - EssenceSuffering->SetDisplayId(11686); - EssenceSuffering->setFaction(35); - m_creature->HandleEmote(EMOTE_ONESHOT_NONE); - SummonEssenceTimer = 20000; //60000; - AnimationTimer = 18200; //58100; - SoulDeathCount = 0; - SoulCount = 0; - SummonSoulTimer = 1000; - EndingPhase = false; - Phase = 3; - m_sufferingGuid.Clear(); - }else DespawnEssenceTimer -= diff; - } + m_creature->HandleEmote(EMOTE_ONESHOT_SUBMERGE); + m_uiAnimationTimer = 0; } + else + m_uiAnimationTimer -= uiDiff; } - if (Phase == 3) + // Animation for reset Reliquary + if (m_uiAnimResetTimer) { - if (SoulCount < 36) + if (m_uiAnimResetTimer <= uiDiff) { - if (SummonSoulTimer < diff) - { - SummonSoul(); - SummonSoulTimer = 500; - }else SummonSoulTimer -= diff; - } - - if (SoulDeathCount >= SoulCount) - { - if (AnimationTimer < diff) - { - // Release the cube - m_creature->HandleEmote(EMOTE_ONESHOT_SUBMERGE); - AnimationTimer = 10000; - }else AnimationTimer -= diff; - - if (SummonEssenceTimer < diff) - { - // Ribs: open - m_creature->HandleEmote(EMOTE_STATE_SUBMERGED); - - Creature* EssenceDesire = m_creature->SummonCreature(23419, m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), 1.57f, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 10000); - - if (EssenceDesire) - { - DoScriptText(DESI_SAY_FREED, EssenceDesire); - - if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) - { - EssenceDesire->AddThreat(target); - EssenceDesire->AI()->AttackStart(target); - } - - m_desireGuid = EssenceDesire->GetObjectGuid(); - SoulDeathCount = 0; - } - - Phase = 4; - }else SummonEssenceTimer -= diff; + // Reset animation + m_creature->HandleEmote(EMOTE_STATE_NONE); + m_uiAnimResetTimer = 0; } + else + m_uiAnimResetTimer -= uiDiff; } - if (Phase == 4) + // Summon the Essence on timer + if (m_uiSummonEssenceTimer) { - if (m_desireGuid) + if (m_uiSummonEssenceTimer <= uiDiff) { - Creature* EssenceDesire = m_creature->GetMap()->GetCreature(m_desireGuid); - - if (!EssenceDesire || !EssenceDesire->isAlive()) - EnterEvadeMode(); - - if (!EndingPhase && EssenceDesire) + uint32 uiSpellId = 0; + switch (m_uiPhase) { - if (EssenceDesire->GetHealthPercent() < 10.0f) - { - MergeThreatList(EssenceDesire); - EssenceDesire->GetMotionMaster()->MoveFollow(m_creature,0.0f,0.0f); - EssenceDesire->RemoveAllAuras(); - EssenceDesire->DeleteThreatList(); - - DoScriptText(DESI_SAY_RECAP, EssenceDesire); - - EssenceDesire->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - DespawnEssenceTimer = 4000; - AnimationTimer = 2200; - EndingPhase = true; - } + case PHASE_1_SUFFERING: uiSpellId = SPELL_SUMMON_ESSENCE_SUFFERING; break; + case PHASE_2_DESIRE: uiSpellId = SPELL_SUMMON_ESSENCE_DESIRE; break; + case PHASE_3_ANGER: uiSpellId = SPELL_SUMMON_ESSENCE_ANGER; break; } - if (EndingPhase && EssenceDesire) + if (DoCastSpellIfCan(m_creature, uiSpellId) == CAST_OK) { - if (EssenceDesire->isAlive()) - { - if (AnimationTimer < diff) - { - // Return - EssenceDesire->HandleEmote(EMOTE_ONESHOT_SUBMERGE); - AnimationTimer = 10000; - }else AnimationTimer -= diff; - - if (DespawnEssenceTimer < diff) - { - EssenceDesire->DeleteThreatList(); - EssenceDesire->setFaction(35); - - DoScriptText(DESI_SAY_AFTER, EssenceDesire); - - EssenceDesire->SetDisplayId(11686); - m_creature->HandleEmote(EMOTE_ONESHOT_NONE); - SummonEssenceTimer = 20000; - AnimationTimer = 18200; - SoulDeathCount = 0; - SoulCount = 0; - SummonSoulTimer = 1000; - EndingPhase = false; - Phase = 5; - m_desireGuid.Clear(); - }else DespawnEssenceTimer -= diff; - } + m_creature->HandleEmote(EMOTE_STATE_SUBMERGED); + m_uiSummonEssenceTimer = 0; } } + else + m_uiSummonEssenceTimer -= uiDiff; } - if (Phase == 5) + // Summon Enslaved souls between the essence + switch (m_uiPhase) { - if (SoulCount < 36) - { - if (SummonSoulTimer < diff) - { - SummonSoul(); - SummonSoulTimer = 500; - }else SummonSoulTimer -= diff; - } - - if (SoulDeathCount >= SoulCount) - { - if (AnimationTimer < diff) - { - // Release the cube - m_creature->HandleEmote(EMOTE_ONESHOT_SUBMERGE); - AnimationTimer = 10000; - }else AnimationTimer -= diff; + case PHASE_2_DESIRE: + case PHASE_3_ANGER: - if (SummonEssenceTimer < diff) + if (m_uiSoulSummonedCount < MAX_ENSLAVED_SOULS) { - // Ribs: open - m_creature->HandleEmote(EMOTE_STATE_SUBMERGED); - - Creature* EssenceAnger = m_creature->SummonCreature(23420, m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), 1.57f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 45000); - - if (EssenceAnger) + if (m_uiSummonSoulTimer < uiDiff) { - if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_TOPAGGRO, 0)) + if (DoCastSpellIfCan(m_creature, SPELL_SUMMON_ENSLAVED_SOUL) == CAST_OK) { - EssenceAnger->AddThreat(target); - EssenceAnger->AI()->AttackStart(target); + ++m_uiSoulSummonedCount; + m_uiSummonSoulTimer = 500; } - - m_angerGuid = EssenceAnger->GetObjectGuid(); - DoScriptText(ANGER_SAY_FREED, EssenceAnger); - SoulDeathCount = 0; - } - - Phase = 6; - }else SummonEssenceTimer -= diff; - } - } - - if (Phase == 6) - { - if (m_angerGuid) - { - Creature* EssenceAnger = m_creature->GetMap()->GetCreature(m_angerGuid); - - if (!EssenceAnger) - EnterEvadeMode(); - - if (m_creature->isAlive() && EssenceAnger) - { - if (!EssenceAnger->isAlive()) - { - m_angerGuid.Clear(); - m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); } + else + m_uiSummonSoulTimer -= uiDiff; } - } + + break; } } }; -struct MANGOS_DLL_DECL boss_essence_of_sufferingAI : public ScriptedAI -{ - boss_essence_of_sufferingAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} +/*###### +## essence_base_AI +######*/ - ObjectGuid m_statAuraGuid; // TODO currently unused - bug? +struct MANGOS_DLL_DECL essence_base_AI : public ScriptedAI +{ + essence_base_AI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsPhaseFinished = false; + } - uint32 AggroYellTimer; - uint32 FixateTimer; - uint32 EnrageTimer; - uint32 SoulDrainTimer; + ScriptedInstance* m_pInstance; - void Reset() - { - m_statAuraGuid.Clear(); + bool m_bIsPhaseFinished; - AggroYellTimer = 5000; - FixateTimer = 5000; - EnrageTimer = 30000; - SoulDrainTimer = 150000; - } + virtual void OnPhaseFinished() {} - void DamageTaken(Unit *done_by, uint32 &damage) + void JustReachedHome() { - if ((damage >= m_creature->GetHealth()) && (done_by != m_creature)) + // Reset encounter and despawn Essence + if (m_pInstance) { - damage = 0; - // 10% of total health, signalling time to return - m_creature->SetHealth(m_creature->GetMaxHealth()/10); - if (m_statAuraGuid) - { - if (Player* pPlayer = m_creature->GetMap()->GetPlayer(m_statAuraGuid)) - pPlayer->RemoveAurasDueToSpell(AURA_OF_SUFFERING_ARMOR); - } + if (Creature* pReliquary = m_pInstance->GetSingleCreatureFromStorage(NPC_RELIQUARY_OF_SOULS)) + pReliquary->AI()->EnterEvadeMode(); } - } - void Aggro(Unit* pWho) - { - DoCastSpellIfCan(pWho, AURA_OF_SUFFERING, CAST_TRIGGERED); - DoCastSpellIfCan(m_creature, ESSENCE_OF_SUFFERING_PASSIVE, CAST_TRIGGERED); + m_creature->ForcedDespawn(); } - void KilledUnit(Unit *victim) + void DamageTaken(Unit* pKiller, uint32& uiDamage) { - switch(urand(0, 2)) + if (uiDamage < m_creature->GetHealth()) + return; + + // Prevent glitch if in fake death + if (m_bIsPhaseFinished) { - case 0: DoScriptText(SUFF_SAY_SLAY1, m_creature); break; - case 1: DoScriptText(SUFF_SAY_SLAY2, m_creature); break; - case 2: DoScriptText(SUFF_SAY_SLAY3, m_creature); break; + uiDamage = 0; + return; } - } - void JustDied(Unit* killer) - { + uiDamage = 0; + + m_creature->InterruptNonMeleeSpells(true); + m_creature->SetHealth(0); + m_creature->StopMoving(); + m_creature->ClearComboPointHolders(); + m_creature->RemoveAllAurasOnDeath(); + m_creature->ModifyAuraState(AURA_STATE_HEALTHLESS_20_PERCENT, false); + m_creature->ModifyAuraState(AURA_STATE_HEALTHLESS_35_PERCENT, false); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + m_creature->ClearAllReactives(); + m_creature->GetMotionMaster()->Clear(); + + if (!m_pInstance) + return; + + // Move to home position + if (Creature* pReliquary = m_pInstance->GetSingleCreatureFromStorage(NPC_RELIQUARY_OF_SOULS)) + m_creature->GetMotionMaster()->MovePoint(1, pReliquary->GetPositionX(), pReliquary->GetPositionY(), pReliquary->GetPositionZ()); + + m_bIsPhaseFinished = true; + + OnPhaseFinished(); } +}; - void CastFixate() - { - ThreatList const& tList = m_creature->getThreatManager().getThreatList(); - if (tList.empty()) - return; // No point continuing if empty threatlist. +/*###### +## boss_essence_of_suffering +######*/ - std::list targets; +struct MANGOS_DLL_DECL boss_essence_of_sufferingAI : public essence_base_AI +{ + boss_essence_of_sufferingAI(Creature* pCreature) : essence_base_AI(pCreature) { Reset(); } - for (ThreatList::const_iterator itr = tList.begin();itr != tList.end(); ++itr) - { - Unit* pUnit = m_creature->GetMap()->GetUnit((*itr)->getUnitGuid()); + uint32 m_uiEnrageTimer; + uint32 m_uiSoulDrainTimer; - // Only alive players - if (pUnit && pUnit->isAlive() && pUnit->GetTypeId() == TYPEID_PLAYER) - targets.push_back(pUnit); - } + void Reset() + { + DoCastSpellIfCan(m_creature, SPELL_AURA_OF_SUFFERING, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_SUFFERING_PASSIVE, CAST_TRIGGERED); - if (targets.empty()) - return; // No targets added for some reason. No point continuing. + m_uiEnrageTimer = 45000; + m_uiSoulDrainTimer = 20000; + } - targets.sort(ObjectDistanceOrder(m_creature)); // Sort players by distance. - targets.resize(1); // Only need closest target. - Unit* target = targets.front(); // Get the first target. + void KilledUnit(Unit* pVictim) + { + DoScriptText(urand(0, 1) ? SUFF_SAY_SLAY1 : SUFF_SAY_SLAY2, m_creature); + } - // Add threat equivalent to threat on victim. - m_creature->AddThreat(target, m_creature->getThreatManager().getThreat(m_creature->getVictim())); - DoCastSpellIfCan(target, SPELL_FIXATE); + void OnPhaseFinished() + { + DoScriptText(SUFF_SAY_RECAP, m_creature); } - void UpdateAI(const uint32 diff) + void UpdateAI(const uint32 uiDiff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - if (m_creature->GetHealthPercent() <= 10.0f) + if (m_uiEnrageTimer < uiDiff) { - if (m_statAuraGuid) + if (DoCastSpellIfCan(m_creature, SPELL_FRENZY) == CAST_OK) { - if (Player* pPlayer = m_creature->GetMap()->GetPlayer(m_statAuraGuid)) - pPlayer->RemoveAurasDueToSpell(AURA_OF_SUFFERING_ARMOR); + DoScriptText(EMOTE_BOSS_GENERIC_ENRAGED, m_creature); + DoScriptText(SUFF_SAY_FRENZY, m_creature); + m_uiEnrageTimer = 45000; } } + else + m_uiEnrageTimer -= uiDiff; - if (m_creature->GetHealthPercent() <= 10.0f) - { - if (m_creature->getVictim()) - m_creature->DeleteThreatList(); // Delete our threatlist if below 10% as we should no longer attack. - return; - } - - // Prevent overlapping yells - if (AggroYellTimer) + if (m_uiSoulDrainTimer < uiDiff) { - if (AggroYellTimer <= diff) - { - DoScriptText(SUFF_SAY_AGGRO, m_creature); - AggroYellTimer = 0; - }else AggroYellTimer -= diff; + if (DoCastSpellIfCan(m_creature, SPELL_SOUL_DRAIN) == CAST_OK) + m_uiSoulDrainTimer = urand(45000, 60000); } - - //Supposed to be cast on nearest target - if (FixateTimer < diff) - { - CastFixate(); - FixateTimer = 5000; - }else FixateTimer -= diff; - - if (EnrageTimer < diff) - { - if (DoCastSpellIfCan(m_creature, SPELL_ENRAGE) == CAST_OK) - { - DoScriptText(EMOTE_BOSS_GENERIC_ENRAGED, m_creature); - EnrageTimer = 60000; - } - }else EnrageTimer -= diff; - - if (SoulDrainTimer < diff) - { - if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) - DoCastSpellIfCan(target, SPELL_SOUL_DRAIN); - SoulDrainTimer = 60000; - }else SoulDrainTimer -= diff; + else + m_uiSoulDrainTimer -= uiDiff; DoMeleeAttackIfReady(); } }; -struct MANGOS_DLL_DECL boss_essence_of_desireAI : public ScriptedAI + +/*###### +## boss_essence_of_desire +######*/ + +struct MANGOS_DLL_DECL boss_essence_of_desireAI : public essence_base_AI { - boss_essence_of_desireAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + boss_essence_of_desireAI(Creature* pCreature) : essence_base_AI(pCreature) { Reset(); } - uint32 AggroYellTimer; - uint32 RuneShieldTimer; - uint32 DeadenTimer; - uint32 SoulShockTimer; + uint32 m_uiRuneShieldTimer; + uint32 m_uiDeadenTimer; + uint32 m_uiSoulShockTimer; void Reset() { - AggroYellTimer = 5000; - RuneShieldTimer = 60000; - DeadenTimer = 15000; - SoulShockTimer = 40000; - } + m_uiRuneShieldTimer = urand(10000, 15000); + m_uiDeadenTimer = 15000; + m_uiSoulShockTimer = urand(5000, 10000); - void DamageTaken(Unit *done_by, uint32 &damage) - { - if ((damage >= m_creature->GetHealth()) && (done_by != m_creature)) - { - damage = 0; - // 10% of total health, signalling time to return - m_creature->SetHealth(m_creature->GetMaxHealth()/10); - } - else - { - if (done_by && (done_by->GetTypeId() == TYPEID_PLAYER) && done_by->isAlive()) - done_by->DealDamage(done_by, damage/2, NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); - } + DoCastSpellIfCan(m_creature, SPELL_AURA_OF_DESIRE); } - void KilledUnit(Unit *victim) + void KilledUnit(Unit* pVictim) { switch(urand(0, 2)) { @@ -699,181 +475,188 @@ struct MANGOS_DLL_DECL boss_essence_of_desireAI : public ScriptedAI } } - void MoveInLineOfSight(Unit *who) + void OnPhaseFinished() { - if (!who || m_creature->getVictim()) - return; - - if (who->isTargetableForAttack() && who->isInAccessablePlaceFor(m_creature) && m_creature->IsHostileTo(who)) - { - 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 (!m_creature->isInCombat()) - { - DoCastSpellIfCan(who, AURA_OF_DESIRE); - } - - who->RemoveSpellsCausingAura(SPELL_AURA_MOD_STEALTH); - AttackStart(who); - } - } + DoScriptText(DESI_SAY_RECAP, m_creature); } - void UpdateAI(const uint32 diff) + void UpdateAI(const uint32 uiDiff) { - //Return since we have no target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - if (m_creature->GetHealthPercent() <= 10.0f) + if (m_uiRuneShieldTimer < uiDiff) { - if (m_creature->getVictim()) - m_creature->DeleteThreatList(); // Delete our threatlist if below 10% as we should no longer attack. - return; + if (DoCastSpellIfCan(m_creature, SPELL_RUNE_SHIELD) == CAST_OK) + m_uiRuneShieldTimer = 15000; } + else + m_uiRuneShieldTimer -= uiDiff; - if (RuneShieldTimer < diff) - { - DoCastSpellIfCan(m_creature, SPELL_RUNE_SHIELD); - RuneShieldTimer = 60000; - }else RuneShieldTimer -= diff; - - if (DeadenTimer < diff) - { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_DEADEN); - DeadenTimer = urand(30000, 60000); - }else DeadenTimer -= diff; - - if (SoulShockTimer < diff) + if (m_uiDeadenTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_SOUL_SHOCK); - SoulShockTimer = 40000; - - if (urand(0, 1)) + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_DEADEN) == CAST_OK) + { DoScriptText(DESI_SAY_SPEC, m_creature); + m_uiDeadenTimer = 30000; + } + } + else + m_uiDeadenTimer -= uiDiff; - }else SoulShockTimer -= diff; + if (m_uiSoulShockTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_SPIRIT_SHOCK) == CAST_OK) + m_uiSoulShockTimer = urand(5000, 10000); + } + else + m_uiSoulShockTimer -= uiDiff; DoMeleeAttackIfReady(); } }; +/*###### +## boss_essence_of_anger +######*/ + struct MANGOS_DLL_DECL boss_essence_of_angerAI : public ScriptedAI { - boss_essence_of_angerAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} - - ObjectGuid m_aggroTargetGuid; + boss_essence_of_angerAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } - uint32 AggroYellTimer; - uint32 CheckTankTimer; - uint32 SoulScreamTimer; - uint32 SpiteTimer; + ScriptedInstance* m_pInstance; - bool CheckedAggro; + uint32 m_uiSeetheTimer; + uint32 m_uiSoulScreamTimer; + uint32 m_uiSpiteTimer; void Reset() { - m_aggroTargetGuid.Clear(); - - AggroYellTimer = 5000; - CheckTankTimer = 5000; - SoulScreamTimer = 10000; - SpiteTimer = 30000; + m_uiSeetheTimer = 5000; + m_uiSoulScreamTimer = 10000; + m_uiSpiteTimer = 20000; - CheckedAggro = false; + DoCastSpellIfCan(m_creature, SPELL_AURA_OF_ANGER); } - void Aggro(Unit* pWho) + void KilledUnit(Unit* pVictim) { - DoCastSpellIfCan(m_creature->getVictim(), AURA_OF_ANGER, CAST_TRIGGERED); - } - - void MoveInLineOfSight(Unit *who) - { - if (!who || m_creature->getVictim()) - return; - - if (who->isTargetableForAttack() && who->isInAccessablePlaceFor(m_creature) && m_creature->IsHostileTo(who)) - { - 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 (!m_creature->isInCombat()) - { - DoCastSpellIfCan(who, AURA_OF_ANGER); - } - - who->RemoveSpellsCausingAura(SPELL_AURA_MOD_STEALTH); - AttackStart(who); - } - } + DoScriptText(urand(0, 1) ? ANGER_SAY_SLAY1 : ANGER_SAY_SLAY2, m_creature); } - void JustDied(Unit *victim) + void JustDied(Unit* pKiller) { DoScriptText(ANGER_SAY_DEATH, m_creature); } - void KilledUnit(Unit *victim) + void JustReachedHome() { - DoScriptText(urand(0, 1) ? ANGER_SAY_SLAY1 : ANGER_SAY_SLAY2, m_creature); + // Reset encounter and despawn Essence + if (m_pInstance) + { + if (Creature* pReliquary = m_pInstance->GetSingleCreatureFromStorage(NPC_RELIQUARY_OF_SOULS)) + pReliquary->AI()->EnterEvadeMode(); + } + + m_creature->ForcedDespawn(); } - void UpdateAI(const uint32 diff) + void UpdateAI(const uint32 uiDiff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - if (!CheckedAggro) + if (m_uiSeetheTimer < uiDiff) { - m_aggroTargetGuid = m_creature->getVictim()->GetObjectGuid(); - CheckedAggro = true; + if (DoCastSpellIfCan(m_creature, SPELL_SEETHE) == CAST_OK) + m_uiSeetheTimer = urand(20000, 30000); } + else + m_uiSeetheTimer -= uiDiff; - if (AggroYellTimer) + if (m_uiSoulScreamTimer < uiDiff) { - if (AggroYellTimer <= diff) - { - DoScriptText(ANGER_SAY_FREED2, m_creature); - AggroYellTimer = 0; - }else AggroYellTimer -= diff; + if (DoCastSpellIfCan(m_creature, SPELL_SOUL_SCREAM) == CAST_OK) + m_uiSoulScreamTimer = 10000; } + else + m_uiSoulScreamTimer -= uiDiff; - if (CheckTankTimer < diff) + if (m_uiSpiteTimer < uiDiff) { - if (m_creature->getVictim()->GetObjectGuid() != m_aggroTargetGuid) + if (DoCastSpellIfCan(m_creature, SPELL_SPITE) == CAST_OK) { DoScriptText(ANGER_SAY_BEFORE, m_creature); - DoCastSpellIfCan(m_creature, SPELL_SELF_SEETHE); - DoCastSpellIfCan(m_creature->getVictim(), SPELL_ENEMY_SEETHE, CAST_TRIGGERED); - m_aggroTargetGuid = m_creature->getVictim()->GetObjectGuid(); + m_uiSpiteTimer = 20000; } - CheckTankTimer = 2000; - }else CheckTankTimer -= diff; + } + else + m_uiSpiteTimer -= uiDiff; - if (SoulScreamTimer < diff) - { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_SOUL_SCREAM); - SoulScreamTimer = 10000; - }else SoulScreamTimer -= diff; + DoMeleeAttackIfReady(); + } +}; + +/*###### +## npc_enslaved_soul +######*/ - if (SpiteTimer < diff) +struct MANGOS_DLL_DECL npc_enslaved_soulAI : public ScriptedAI +{ + npc_enslaved_soulAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; + + void Reset() + { + DoCastSpellIfCan(m_creature, SPELL_ENSLAVED_SOUL_PASSIVE); + } + + void JustDied(Unit* pKiller) + { + DoCastSpellIfCan(m_creature, SPELL_SOUL_RELEASE, CAST_TRIGGERED); + + // Notify the main boss about the spirit death. Needs to be done here, because the spirit is summoned with triggered spell + if (m_pInstance) { - for(uint8 i = 0; i < 4; ++i) + if (Creature* pReliquary = m_pInstance->GetSingleCreatureFromStorage(NPC_RELIQUARY_OF_SOULS)) { - if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) - DoCastSpellIfCan(target, SPELL_SPITE); + if (boss_reliquary_of_soulsAI* pBossAI = dynamic_cast(pReliquary->AI())) + pBossAI->DoNotifySouldDead(); } + } + } - SpiteTimer = 30000; - DoScriptText(ANGER_SAY_SPEC, m_creature); - }else SpiteTimer -= diff; + void JustReachedHome() + { + // Reset encounter and despawn the spirit + if (m_pInstance) + { + if (Creature* pReliquary = m_pInstance->GetSingleCreatureFromStorage(NPC_RELIQUARY_OF_SOULS)) + pReliquary->AI()->EnterEvadeMode(); + } + + m_creature->ForcedDespawn(); + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; DoMeleeAttackIfReady(); } }; + CreatureAI* GetAI_boss_reliquary_of_souls(Creature* pCreature) { return new boss_reliquary_of_soulsAI(pCreature); @@ -894,6 +677,11 @@ CreatureAI* GetAI_boss_essence_of_anger(Creature* pCreature) return new boss_essence_of_angerAI(pCreature); } +CreatureAI* GetAI_npc_enslaved_soul(Creature* pCreature) +{ + return new npc_enslaved_soulAI(pCreature); +} + void AddSC_boss_reliquary_of_souls() { Script* pNewScript; @@ -917,4 +705,9 @@ void AddSC_boss_reliquary_of_souls() pNewScript->Name = "boss_essence_of_anger"; pNewScript->GetAI = &GetAI_boss_essence_of_anger; pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_enslaved_soul"; + pNewScript->GetAI = &GetAI_npc_enslaved_soul; + pNewScript->RegisterSelf(); } diff --git a/scripts/outland/black_temple/instance_black_temple.cpp b/scripts/outland/black_temple/instance_black_temple.cpp index 0dadef8ea..f54d6859c 100644 --- a/scripts/outland/black_temple/instance_black_temple.cpp +++ b/scripts/outland/black_temple/instance_black_temple.cpp @@ -64,6 +64,7 @@ void instance_black_temple::OnCreatureCreate(Creature* pCreature) case NPC_AKAMA_SHADE: case NPC_SHADE_OF_AKAMA: + case NPC_RELIQUARY_OF_SOULS: case NPC_GATHIOS: case NPC_ZEREVOR: case NPC_LADY_MALANDE: diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 854a06d0b..32528dfa1 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2736" + #define SD2_REVISION_NR "2737" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 917fafc34..fcbdcfa52 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -313,6 +313,7 @@ UPDATE creature_template SET ScriptName='molten_flame' WHERE entry=23095; -- Mol UPDATE creature_template SET ScriptName='mob_ashtongue_channeler' WHERE entry=23421; -- Ashtongue CHanneler in Shade of AKama UPDATE creature_template SET ScriptName='mob_ashtongue_sorcerer' WHERE entry=23215; -- Ashtongue Sorcerer in Shade of Akama UPDATE creature_template SET ScriptName='npc_spirit_of_olum' WHERE entry=23411; +UPDATE creature_template SET ScriptName='npc_enslaved_soul' WHERE entry=23469; /* BLACKFATHOM DEPTHS */ UPDATE instance_template SET ScriptName='instance_blackfathom_deeps' WHERE map=48; diff --git a/sql/updates/r2737_mangos.sql b/sql/updates/r2737_mangos.sql new file mode 100644 index 000000000..ca7403767 --- /dev/null +++ b/sql/updates/r2737_mangos.sql @@ -0,0 +1,2 @@ +UPDATE creature_template SET ScriptName='npc_enslaved_soul' WHERE entry=23469; +UPDATE creature_template SET ScriptName='' WHERE entry=23111; From 58dc8d6e9e9b75e95da3182350c0aff76626b07b Mon Sep 17 00:00:00 2001 From: Reamer Date: Sat, 20 Oct 2012 00:04:31 +0300 Subject: [PATCH 0733/1172] [2738] Remove attack start from Impale Target - Anub'arak - AN --- scripts/northrend/azjol-nerub/azjol-nerub/boss_anubarak.cpp | 4 +--- sd2_revision_nr.h | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/scripts/northrend/azjol-nerub/azjol-nerub/boss_anubarak.cpp b/scripts/northrend/azjol-nerub/azjol-nerub/boss_anubarak.cpp index 36c715923..c40b17613 100644 --- a/scripts/northrend/azjol-nerub/azjol-nerub/boss_anubarak.cpp +++ b/scripts/northrend/azjol-nerub/azjol-nerub/boss_anubarak.cpp @@ -176,9 +176,7 @@ struct MANGOS_DLL_DECL boss_anubarakAI : public ScriptedAI pSummoned->GetMotionMaster()->MovePoint(0, fX, fY, fZ); } break; - case NPC_IMPALE_TARGET: - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) - pSummoned->AI()->AttackStart(pTarget); + default: break; } } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 32528dfa1..b5e8f17c9 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2737" + #define SD2_REVISION_NR "2738" #endif // __SD2_REVISION_NR_H__ From 34a7af5da14e9b48514760da8f6103d804b0b239 Mon Sep 17 00:00:00 2001 From: Cyberium Date: Sat, 20 Oct 2012 01:00:59 +0200 Subject: [PATCH 0734/1172] [2739] Make BG Spiritguides active by default. This will prevent some glitches --- scripts/battlegrounds/battleground.cpp | 8 +++++--- sd2_revision_nr.h | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/scripts/battlegrounds/battleground.cpp b/scripts/battlegrounds/battleground.cpp index eb95391a0..b77dd2a76 100644 --- a/scripts/battlegrounds/battleground.cpp +++ b/scripts/battlegrounds/battleground.cpp @@ -47,12 +47,14 @@ enum struct MANGOS_DLL_DECL npc_spirit_guideAI : public ScriptedAI { - npc_spirit_guideAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} - - void Reset() + npc_spirit_guideAI(Creature* pCreature) : ScriptedAI(pCreature) { + pCreature->SetActiveObjectState(true); + Reset(); } + void Reset() {} + void UpdateAI(const uint32 uiDiff) { // auto cast the whole time this spell diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index b5e8f17c9..9f30688fb 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2738" + #define SD2_REVISION_NR "2739" #endif // __SD2_REVISION_NR_H__ From acc715b39b4d6330dbd6b027635a45763ebfca5a Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sat, 20 Oct 2012 19:50:55 +0300 Subject: [PATCH 0735/1172] [2740] Cleanup and improve script for Shade of Akama - Black Temple --- scripts/outland/black_temple/black_temple.h | 13 +- .../black_temple/boss_reliquary_of_souls.cpp | 3 +- .../black_temple/boss_shade_of_akama.cpp | 984 ++++++++---------- .../black_temple/instance_black_temple.cpp | 65 +- sd2_revision_nr.h | 2 +- sql/scriptdev2_script_full.sql | 10 +- sql/updates/r2740_scriptdev2.sql | 8 + 7 files changed, 499 insertions(+), 586 deletions(-) create mode 100644 sql/updates/r2740_scriptdev2.sql diff --git a/scripts/outland/black_temple/black_temple.h b/scripts/outland/black_temple/black_temple.h index 368a51d53..88e6a9205 100644 --- a/scripts/outland/black_temple/black_temple.h +++ b/scripts/outland/black_temple/black_temple.h @@ -33,9 +33,14 @@ enum NPC_AKAMA = 23089, NPC_ILLIDAN_STORMRAGE = 22917, + NPC_ASH_CHANNELER = 23421, + NPC_CREATURE_GENERATOR = 23210, + GO_NAJENTUS_GATE = 185483, GO_SUPREMUS_DOORS = 185882, GO_SHADE_OF_AKAMA = 185478, + GO_GOREFIEND_DOOR = 186153, + GO_GURTOGG_DOOR = 185892, GO_PRE_SHAHRAZ_DOOR = 185479, GO_POST_SHAHRAZ_DOOR = 185482, GO_PRE_COUNCIL_DOOR = 185481, @@ -61,17 +66,23 @@ class MANGOS_DLL_DECL instance_black_temple : public ScriptedInstance uint32 GetData(uint32 uiType); uint64 GetData64(uint32 uiData); + void GetChannelersGuidList(GuidList &lList) { lList = m_lChannelersGuidList; } + void GetGeneratorGuidVector(GuidVector &vVector) { vVector = m_vCreatureGeneratorGuidVector; } + const char* Save() { return m_strInstData.c_str(); } void Load(const char* chrIn); private: - bool CanPreMotherDoorOpen(); + void DoOpenPreMotherDoor(); uint32 m_auiEncounter[MAX_ENCOUNTER]; std::string m_strInstData; ObjectGuid m_akamaGuid; // This is the Akama that starts the Illidan encounter. ObjectGuid m_illidanStormrageGuid; + + GuidList m_lChannelersGuidList; + GuidVector m_vCreatureGeneratorGuidVector; }; #endif diff --git a/scripts/outland/black_temple/boss_reliquary_of_souls.cpp b/scripts/outland/black_temple/boss_reliquary_of_souls.cpp index d5ab31df9..74d9125ae 100644 --- a/scripts/outland/black_temple/boss_reliquary_of_souls.cpp +++ b/scripts/outland/black_temple/boss_reliquary_of_souls.cpp @@ -90,7 +90,7 @@ enum NPC_ESSENCE_SUFFERING = 23418, NPC_ESSENCE_DESIRE = 23419, NPC_ESSENCE_ANGER = 23420, - NPC_ENSLAVED_SOUL = 23469, // scripted in eventAI + NPC_ENSLAVED_SOUL = 23469, // Phases PHASE_0_NOT_BEGUN = 0, @@ -656,7 +656,6 @@ struct MANGOS_DLL_DECL npc_enslaved_soulAI : public ScriptedAI } }; - CreatureAI* GetAI_boss_reliquary_of_souls(Creature* pCreature) { return new boss_reliquary_of_soulsAI(pCreature); diff --git a/scripts/outland/black_temple/boss_shade_of_akama.cpp b/scripts/outland/black_temple/boss_shade_of_akama.cpp index ad5c3d506..36bb1a9be 100644 --- a/scripts/outland/black_temple/boss_shade_of_akama.cpp +++ b/scripts/outland/black_temple/boss_shade_of_akama.cpp @@ -16,55 +16,57 @@ /* ScriptData SDName: Boss_Shade_of_Akama -SD%Complete: 85 -SDComment: Seems to be complete. Some little details/cosmetics left (see next comment section). +SD%Complete: 90 +SDComment: Some adjustments may be required once the Shade Soul Channel stacking is fixed in core. Epilogue positions need more work. SDCategory: Black Temple EndScriptData */ -/* ToDo: -(1) After start event Akama should walk a bit towards Shade of Akama, then stop (between the two pillars) and begin to channel. -(2) Some minor changes to post event (after killing Shade of Akama): -(2.1) After Shade of Akama is dead Akama should roar in direction to the door (he must turn around if he reached the stage). -(2.2) Positioning of broken NPCs. -(3) The channelers are casting their spell somestimes even if they are daed (move out of view distance and then move in - they are dead but they channel - maybe some clientspecific issue?). -(4) Unbanish Shade of Akama if a ashtongue sorcerer is spawned but not reached Shade of Akama and channels his spell? -(5) Unsure: If sourcer channels the banish spell, shade should be banished again? -*/ - #include "precompiled.h" #include "black_temple.h" enum { - GOSSIP_ITEM_START_ENCOUNTER = -3564000, - TEXT_ID_AKAMA = 907, - + // yells SAY_DEATH = -1564013, SAY_LOW_HEALTH = -1564014, // Ending cinematic text - SAY_FREE = -1564015, + SAY_FREE_1 = -1564130, + SAY_FREE_2 = -1564015, SAY_BROKEN_FREE_01 = -1564016, SAY_BROKEN_FREE_02 = -1564017, - SPELL_VERTEX_SHADE_BLACK = 39833, - SPELL_SHADE_SOUL_CHANNEL = 40401, - SPELL_DESTRUCTIVE_POISON = 40874, - SPELL_LIGHTNING_BOLT = 42024, - SPELL_AKAMA_SOUL_CHANNEL = 40447, - SPELL_AKAMA_SOUL_RETRIEVE = 40902, + // gossip + GOSSIP_ITEM_START_ENCOUNTER = -3564000, + TEXT_ID_AKAMA = 10866, - NPC_ASH_CHANNELER = 23421, + // Akama spells + SPELL_STEALTH = 34189, + SPELL_DESTRUCTIVE_POISON = 40874, + SPELL_CHAIN_LIGHTNING = 39945, // old spell was 42024 -> probably wrong + SPELL_AKAMA_SOUL_CHANNEL = 40447, // channeled during the event + SPELL_AKAMA_SOUL_RETRIEVE = 40902, // used for the epilogue + + // Other spells + SPELL_SUMMON_DEFENDER = 40474, + SPELL_SUMMON_SORCERER = 40476, + //SPELL_VERTEX_SHADE_BLACK = 39833, // used by the shade - in c_t_a + SPELL_SHADE_SOUL_CHANNEL = 40401, // channel spell, used to banish the shade + SPELL_SUMMON_SHADE_TRIGGER = 40955, + + // npcs NPC_ASH_SORCERER = 23215, NPC_ASH_DEFENDER = 23216, - NPC_ASH_BROKEN = 23319, NPC_ASH_ELEMENTAL = 23523, NPC_ASH_ROGUE = 23318, NPC_ASH_SPIRITBIND = 23524, + NPC_ASH_BROKEN = 23319, + + //akama's phases + PHASE_CHANNEL = 1, + PHASE_COMBAT = 2, + PHASE_EPILOGUE = 3, - //akama's phases (used as point id's) - //PHASE_CHANNEL = 1, - //PHASE_BELOW_PLATFORM = 2, - //PHASE_ON_PLATFORM = 3 + MAX_CHANNELERS = 6, }; static const uint32 auiRandSpawnEntry[]= @@ -74,607 +76,413 @@ static const uint32 auiRandSpawnEntry[]= NPC_ASH_SPIRITBIND }; -static const float LOC_RAND_TO_CENTER_X = 482.793182f; -static const float LOC_RAND_TO_CENTER_Y = 401.270172f; -static const float LOC_RAND_TO_CENTER_Z = 112.783928f; - -static const float LOC_PLATFORM_Z = 118.537f; -static const float LOC_LOW_Z = 112.784f; - -struct Location +static const DialogueEntry aOutroDialogue[] = { - float m_fX, m_fY, m_fZ, m_fO; + {SPELL_AKAMA_SOUL_RETRIEVE, 0, 18000}, + {EMOTE_ONESHOT_ROAR, 0, 2000}, + {SAY_FREE_1, NPC_AKAMA_SHADE, 5000}, + {SAY_FREE_2, NPC_AKAMA_SHADE, 20000}, + {SAY_BROKEN_FREE_01, 0, 2000}, + {EMOTE_STATE_KNEEL, 0, 5000}, + {SAY_BROKEN_FREE_02, 0, 0}, + {0, 0, 0}, }; -static const Location afSpawnLoc[]= +struct Location { - {498.652740f, 461.728119f, LOC_LOW_Z, 0.0f}, - {498.505003f, 339.619324f, LOC_LOW_Z, 0.0f} + float m_fX, m_fY, m_fZ; }; static const Location afAkamaWP[]= { - //{516.885193, 400.836060, LOC_LOW_Z_SPAWN, 0.0}, //not used yet, he moves to here before start channel - {482.352448f, 401.162720f, LOC_LOW_Z, 0.0f}, - {469.597443f, 402.264404f, LOC_PLATFORM_Z, 0.0f} + {516.885193f, 400.836060f, 112.784f}, + {469.597443f, 402.264404f, 118.537f} }; static const Location afBrokenSpawnLoc[]= { - {541.375916f, 401.439575f, LOC_LOW_Z, M_PI_F}, // The place where Akama channels - {534.130005f, 352.394531f, LOC_LOW_Z, 2.164150f}, // Behind a 'pillar' which is behind the east alcove - {499.621185f, 341.534729f, LOC_LOW_Z, 1.652856f}, // East Alcove - {499.151093f, 461.036438f, LOC_LOW_Z, 4.770888f} // West Alcove + {541.375916f, 401.439575f, 112.784f}, // The place where Akama channels + {534.130005f, 352.394531f, 112.784f}, // Behind a 'pillar' which is behind the east alcove }; -static const Location afBrokenWP[]= -{ - {492.491638f, 400.744690f, LOC_LOW_Z, 3.122336f}, - {494.335724f, 382.221771f, LOC_LOW_Z, 2.676230f}, - {489.555939f, 373.507202f, LOC_LOW_Z, 2.416263f}, - {491.136353f, 427.868774f, LOC_LOW_Z, 3.519748f} -}; +/*###### +## npc_akama +######*/ -struct MANGOS_DLL_DECL boss_shade_of_akamaAI : public ScriptedAI +struct MANGOS_DLL_DECL npc_akamaAI : public ScriptedAI, private DialogueHelper { - boss_shade_of_akamaAI(Creature* pCreature) : ScriptedAI(pCreature) + npc_akamaAI(Creature* pCreature) : ScriptedAI(pCreature), + DialogueHelper(aOutroDialogue) { - m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_pInstance = (instance_black_temple*)pCreature->GetInstanceData(); + InitializeDialogueHelper(m_pInstance); Reset(); } - ScriptedInstance* m_pInstance; - - GuidList m_lChannelersGUIDList; - GuidList m_lSorcerersGUIDList; + instance_black_temple* m_pInstance; - uint32 m_uiDeathChannelerCount; + uint8 m_uiPhase; - uint32 m_uiReduceHealthTimer; - uint32 m_uiSummonTimer; - uint32 m_uiResetTimer; - uint32 m_uiDefenderTimer; // They are on a flat 15 second timer, independant of the other summon creature timer. + uint32 m_uiDestructivePoisonTimer; + uint32 m_uiLightningBoltTimer; - bool m_bIsBanished; - bool m_bHasKilledAkama; + uint32 m_uiSummonPackTimer; + uint32 m_uiSummonDefenderTimer; + uint32 m_uiSummonSorcererTimer; - void Reset() - { - m_uiDeathChannelerCount = 0; + uint8 m_uiChannelersDead; - m_uiSummonTimer = 10000; - m_uiReduceHealthTimer = 0; - m_uiResetTimer = 60000; - m_uiDefenderTimer = 15000; + GuidList m_lBrokenGUIDList; + GuidList m_lSorcerersGUIDList; - m_bIsBanished = true; - m_bHasKilledAkama = false; + bool m_bHasYelledOnce; - m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + void Reset() + { + SetCombatMovement(false); - m_creature->HandleEmote(EMOTE_STATE_STUN); - } + m_uiPhase = 0; - void AttackStart(Unit* pWho) - { - if (!pWho || m_bIsBanished) - return; + m_uiDestructivePoisonTimer = 15000; + m_uiLightningBoltTimer = 10000; - ScriptedAI::AttackStart(pWho); - } + m_uiSummonPackTimer = 5000; + m_uiSummonDefenderTimer = 10000; + m_uiSummonSorcererTimer = 10000; - void MoveInLineOfSight(Unit* pWho) - { - if (m_bIsBanished) - return; + m_uiChannelersDead = 0; - ScriptedAI::MoveInLineOfSight(pWho); - } + m_bHasYelledOnce = false; - void JustReachedHome() - { - if (m_pInstance) - m_pInstance->SetData(TYPE_SHADE, NOT_STARTED); + m_lBrokenGUIDList.clear(); + m_lSorcerersGUIDList.clear(); - RespawnChannelersIfDeadOrEvade(); + DoCastSpellIfCan(m_creature, SPELL_STEALTH); + m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); } - // If guid is set, will remove it from list of sorcerer - void IncrementDeathCount(ObjectGuid uiGuid = ObjectGuid()) + void AttackedBy(Unit* pAttacker) { - debug_log("SD2: Increasing Death Count for Shade of Akama encounter"); - ++m_uiDeathChannelerCount; - - if (uiGuid) + // When the Shade starts to attack Akama, switch to melee phase + if (m_uiPhase == PHASE_CHANNEL && pAttacker->GetEntry() == NPC_SHADE_OF_AKAMA) { - if (m_lSorcerersGUIDList.empty()) - error_log("SD2: boss_shade_of_akamaAI attempt to remove guid %s from Sorcerers list but list is already empty", uiGuid.GetString().c_str()); - else - m_lSorcerersGUIDList.remove(uiGuid); + m_creature->InterruptNonMeleeSpells(false); + AttackStart(pAttacker); + m_uiPhase = PHASE_COMBAT; + + // despawn all sorcerers at this point + for (GuidList::const_iterator itr = m_lSorcerersGUIDList.begin(); itr != m_lSorcerersGUIDList.end(); ++itr) + { + if (Creature* pSorcerer = m_creature->GetMap()->GetCreature(*itr)) + pSorcerer->ForcedDespawn(); + } } } - void SummonCreature() + void KilledUnit(Unit* pVictim) { - uint32 uiRand = urand(0, countof(afSpawnLoc) - 1); - - // max of 6 sorcerers can be summoned at one time! - if (!urand(0, 2) && (m_uiDeathChannelerCount > 0) && (m_lSorcerersGUIDList.size() < 7)) + // Note: this is called from the Shade, Channeler and Sorcerer script + // If the function is changed in the future, please review this. + switch (pVictim->GetEntry()) { - if (Creature* pSorcerer = m_creature->SummonCreature(NPC_ASH_SORCERER, - afSpawnLoc[uiRand].m_fX, afSpawnLoc[uiRand].m_fY, afSpawnLoc[uiRand].m_fZ, afSpawnLoc[uiRand].m_fO, - TEMPSUMMON_DEAD_DESPAWN, 0)) - { - pSorcerer->SetWalk(false); - pSorcerer->GetMotionMaster()->MovePoint(0, m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ()); - pSorcerer->SetTargetGuid(m_creature->GetObjectGuid()); + case NPC_SHADE_OF_AKAMA: + m_uiPhase = PHASE_EPILOGUE; - m_lSorcerersGUIDList.push_back(pSorcerer->GetObjectGuid()); + m_creature->GetMotionMaster()->MovePoint(PHASE_EPILOGUE, afAkamaWP[1].m_fX, afAkamaWP[1].m_fY, afAkamaWP[1].m_fZ); + break; + case NPC_ASH_SORCERER: + // Decrease the sorcerer counter + m_lSorcerersGUIDList.remove(pVictim->GetObjectGuid()); + break; + case NPC_ASH_CHANNELER: - --m_uiDeathChannelerCount; - } - } - else - { - for (uint8 i = 0; i < countof(auiRandSpawnEntry); ++i) - { - if (Creature* pSpawn = m_creature->SummonCreature(auiRandSpawnEntry[i], - afSpawnLoc[uiRand].m_fX, afSpawnLoc[uiRand].m_fY, afSpawnLoc[uiRand].m_fZ, afSpawnLoc[uiRand].m_fO, - TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 25000)) + ++m_uiChannelersDead; + + // Move the shade to Akama when all channelers are dead + // Note: the boss should be already slowly moving, but this isn't possible because of the missing stack for the speed debuff + if (m_uiChannelersDead == MAX_CHANNELERS) { - pSpawn->SetWalk(false); - pSpawn->GetMotionMaster()->MovePoint(0, LOC_RAND_TO_CENTER_X, LOC_RAND_TO_CENTER_Y, LOC_RAND_TO_CENTER_Z); + if (m_pInstance) + { + if (Creature* pShade = m_pInstance->GetSingleCreatureFromStorage(NPC_SHADE_OF_AKAMA)) + { + float fX, fY, fZ; + m_creature->GetContactPoint(pShade, fX, fY, fZ); + pShade->GetMotionMaster()->MovePoint(1, fX, fY, fZ); + } + } } - } + break; } } - void DespawnSorceres() + void JustDied(Unit* pKiller) { - for (GuidList::const_iterator itr = m_lSorcerersGUIDList.begin(); itr != m_lSorcerersGUIDList.end(); ++itr) + DoScriptText(SAY_DEATH, m_creature); + m_creature->SetCorpseDelay(30); + + if (m_pInstance) { - if (Creature* pSorcerer = m_creature->GetMap()->GetCreature(*itr)) - { - if (pSorcerer->isAlive()) - pSorcerer->ForcedDespawn(); - } + // Reset the shade + if (Creature* pShade = m_pInstance->GetSingleCreatureFromStorage(NPC_SHADE_OF_AKAMA)) + pShade->AI()->EnterEvadeMode(); } } - void RespawnChannelersIfDeadOrEvade() + void CorpseRemoved(uint32 &uiRespawnDelay) { - for (GuidList::const_iterator itr = m_lChannelersGUIDList.begin(); itr != m_lChannelersGUIDList.end(); ++itr) - { - if (Creature* pChanneler = m_creature->GetMap()->GetCreature(*itr)) - { - if (!pChanneler->isAlive()) - pChanneler->Respawn(); - else - pChanneler->AI()->EnterEvadeMode(); - } - } + // Resapwn after 5 min + uiRespawnDelay = 5*MINUTE; } - void PrepareChannelers() + void JustSummoned(Creature* pSummoned) { - std::list lChannelerList; - GetCreatureListWithEntryInGrid(lChannelerList,m_creature, NPC_ASH_CHANNELER, 50.0f); - - if (!lChannelerList.empty()) + switch (pSummoned->GetEntry()) { - //clear this, we want a clean start - m_lChannelersGUIDList.clear(); + case NPC_ASH_SORCERER: + { + pSummoned->SetWalk(false); + m_lSorcerersGUIDList.push_back(pSummoned->GetObjectGuid()); - for (std::list::iterator itr = lChannelerList.begin(); itr != lChannelerList.end(); ++itr) + float fX, fY, fZ; + if (m_pInstance) + { + if (Creature* pShade = m_pInstance->GetSingleCreatureFromStorage(NPC_SHADE_OF_AKAMA)) + { + pShade->GetNearPoint(pShade, fX, fY, fZ, 0, 20.0f, pShade->GetAngle(pSummoned)); + pSummoned->GetMotionMaster()->MovePoint(1, fX, fY, fZ); + } + } + break; + } + case NPC_ASH_BROKEN: { - m_lChannelersGUIDList.push_back((*itr)->GetObjectGuid()); + float fX, fY, fZ; + m_lBrokenGUIDList.push_back(pSummoned->GetObjectGuid()); - (*itr)->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + m_creature->GetNearPoint(m_creature, fX, fY, fZ, 0, 30.0f, m_creature->GetAngle(pSummoned)); + pSummoned->GetMotionMaster()->MovePoint(0, fX, fY, fZ); + break; } + case NPC_ASH_DEFENDER: + pSummoned->AI()->AttackStart(m_creature); + break; + default: + pSummoned->SetInCombatWithZone(); + break; } - else - error_log("SD2: boss_shade_of_akamaAI unable to find any channelers."); - } - - void KilledUnit(Unit* pVictim) - { - if (pVictim->GetEntry() == NPC_AKAMA) - EnterEvadeMode(); - } - - void JustDied(Unit* pKiller) - { - if (m_pInstance) - m_pInstance->SetData(TYPE_SHADE, DONE); } - void UpdateAI(const uint32 uiDiff) + void MovementInform(uint32 uiMoveType, uint32 uiPointId) { - if (!m_creature->isInCombat()) + if (uiMoveType != POINT_MOTION_TYPE || !m_pInstance) return; - if (m_bIsBanished) + switch (uiPointId) { - // Akama is set in the threatlist so when we reset, we make sure that he is not included in our check - if (m_creature->getThreatManager().getThreatList().size() < 2) - ScriptedAI::EnterEvadeMode(); - - if (m_uiDefenderTimer < uiDiff) - { - uint32 uiRand = urand(0, countof(afSpawnLoc) - 1); - - if (Creature* pDefender = m_creature->SummonCreature(NPC_ASH_DEFENDER, - afSpawnLoc[uiRand].m_fX, afSpawnLoc[uiRand].m_fY, afSpawnLoc[uiRand].m_fZ, afSpawnLoc[uiRand].m_fO, - TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 25000)) + case PHASE_CHANNEL: + if (DoCastSpellIfCan(m_creature, SPELL_AKAMA_SOUL_CHANNEL) == CAST_OK) { - if (Creature* pAkama = m_pInstance->GetSingleCreatureFromStorage(NPC_AKAMA_SHADE)) - pDefender->AI()->AttackStart(pAkama); - } - - m_uiDefenderTimer = 15000; - } - else - m_uiDefenderTimer -= uiDiff; + m_uiPhase = PHASE_CHANNEL; - if (m_uiSummonTimer < uiDiff) - { - SummonCreature(); - m_uiSummonTimer = 35000; - } - else - m_uiSummonTimer -= uiDiff; + GuidList m_lChannelersList; + m_pInstance->GetChannelersGuidList(m_lChannelersList); - if (m_uiDeathChannelerCount >= 6) - { - if (Creature* pAkama = m_pInstance->GetSingleCreatureFromStorage(NPC_AKAMA_SHADE)) - { - if (pAkama && pAkama->isAlive()) + for (GuidList::const_iterator itr = m_lChannelersList.begin(); itr != m_lChannelersList.end(); ++itr) { - m_bIsBanished = false; - - m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - - // Shade should move to Akama, not the other way around - AttackStart(pAkama); - - // Crazy amount of threat - m_creature->AddThreat(pAkama, 10000000.0f); - pAkama->AddThreat(m_creature, 10000000.0f); + if (Creature* pChanneler = m_creature->GetMap()->GetCreature(*itr)) + pChanneler->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); } } - } + break; + case PHASE_EPILOGUE: + // Start epilogue here + if (Creature* pShade = m_pInstance->GetSingleCreatureFromStorage(NPC_SHADE_OF_AKAMA)) + m_creature->SetFacingToObject(pShade); + + StartNextDialogueText(SPELL_AKAMA_SOUL_RETRIEVE); + break; } - else // No longer banished, let's fight Akama now + } + + void JustDidDialogueStep(int32 iEntry) + { + switch (iEntry) { - if (m_uiReduceHealthTimer < uiDiff) - { - if (Creature* pAkama = m_pInstance->GetSingleCreatureFromStorage(NPC_AKAMA_SHADE)) + case SPELL_AKAMA_SOUL_RETRIEVE: + DoCastSpellIfCan(m_creature, SPELL_AKAMA_SOUL_RETRIEVE); + break; + case EMOTE_ONESHOT_ROAR: + m_creature->HandleEmote(EMOTE_ONESHOT_ROAR); + break; + case SAY_FREE_1: + DoSummonBrokenAshtongue(); + break; + case SAY_BROKEN_FREE_01: + if (Creature* pBroken = GetClosestCreatureWithEntry(m_creature, NPC_ASH_BROKEN, 35.0f)) + DoScriptText(SAY_BROKEN_FREE_01, pBroken); + break; + case EMOTE_STATE_KNEEL: + for (GuidList::const_iterator itr = m_lBrokenGUIDList.begin(); itr != m_lBrokenGUIDList.end(); ++itr) { - if (pAkama->isAlive()) - { - // 10 % less health every few seconds. - m_creature->DealDamage(pAkama, pAkama->GetMaxHealth()/10, NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); - m_uiReduceHealthTimer = 12000; - } - else - { - m_bHasKilledAkama = true; // Akama is dead, we stop fighting and disappear - EnterEvadeMode(); - return; - } + if (Creature* pBroken = m_creature->GetMap()->GetCreature(*itr)) + pBroken->HandleEmote(EMOTE_STATE_KNEEL); } - } - else - m_uiReduceHealthTimer -= uiDiff; - - if (m_bHasKilledAkama) - { - if (m_uiResetTimer < uiDiff) + break; + case SAY_BROKEN_FREE_02: + for (GuidList::const_iterator itr = m_lBrokenGUIDList.begin(); itr != m_lBrokenGUIDList.end(); ++itr) { - EnterEvadeMode(); // Reset a little while after killing Akama - return; + if (Creature* pBroken = m_creature->GetMap()->GetCreature(*itr)) + DoScriptText(SAY_BROKEN_FREE_02, pBroken); } - else - m_uiResetTimer -= uiDiff; - } - - DoMeleeAttackIfReady(); + break; } } -}; -struct MANGOS_DLL_DECL npc_akamaAI : public ScriptedAI -{ - npc_akamaAI(Creature* pCreature) : ScriptedAI(pCreature) + // Wrapper to start the Akama event + void DoStartEvent() { - m_bIsShadeDead = false; - m_bCanStartCombat = false; - m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - Reset(); - } - - ScriptedInstance* m_pInstance; - - uint32 m_uiDestructivePoisonTimer; - uint32 m_uiLightningBoltTimer; - uint32 m_uiCheckTimer; - uint32 m_uiCastSoulRetrieveTimer; - uint32 m_uiSoulRetrieveTimer; - uint32 m_uiSummonBrokenTimer; - uint32 m_uiEndingTalkCount; - uint32 m_uiWayPointId; - uint32 m_uiBrokenSummonIndex; - - GuidList m_lBrokenGUIDList; + if (m_pInstance) + m_pInstance->SetData(TYPE_SHADE, IN_PROGRESS); - bool m_bIsEventBegun; - bool m_bIsShadeDead; - bool m_bCanStartCombat; - bool m_bHasYelledOnce; + m_creature->RemoveAurasDueToSpell(SPELL_STEALTH); + m_creature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); + m_creature->GetMotionMaster()->MovePoint(PHASE_CHANNEL, afAkamaWP[0].m_fX, afAkamaWP[0].m_fY, afAkamaWP[0].m_fZ); + } - void Reset() + // Wrapper to summon ashtongue mobs + void DoSummonAshtongue(uint32 uiSpellId = 0) { - SetCombatMovement(false); - - m_uiDestructivePoisonTimer = 15000; - m_uiLightningBoltTimer = 10000; - m_uiCheckTimer = 2000; - m_uiCastSoulRetrieveTimer = 0; - m_uiSoulRetrieveTimer = 0; - m_uiSummonBrokenTimer = 0; - m_uiEndingTalkCount = 0; - m_uiWayPointId = 0; - m_uiBrokenSummonIndex = 0; - - m_lBrokenGUIDList.clear(); + if (!m_pInstance) + return; - m_bIsEventBegun = false; - m_bHasYelledOnce = false; + GuidVector vGeneratorsVect; + m_pInstance->GetGeneratorGuidVector(vGeneratorsVect); + Creature* pGenerator = m_creature->GetMap()->GetCreature(vGeneratorsVect[urand(0, 1)]); + if (!pGenerator) + return; - m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); + // Summon mobs by spell + if (uiSpellId) + pGenerator->CastSpell(pGenerator, uiSpellId, true, NULL, NULL, m_creature->GetObjectGuid()); + // Summon ashtongue pack + else + { + float fX, fY, fZ; + for (uint8 i = 0; i < countof(auiRandSpawnEntry); ++i) + { + pGenerator->GetRandomPoint(pGenerator->GetPositionX(), pGenerator->GetPositionY(), pGenerator->GetPositionZ(), 5.0f, fX, fY, fZ); + m_creature->SummonCreature(auiRandSpawnEntry[i], fX, fY, fZ, 0, TEMPSUMMON_DEAD_DESPAWN, 0); + } + } } - void BeginEvent() + // Wrapper to summon the npcs for the epilogue + void DoSummonBrokenAshtongue() { if (!m_pInstance) return; - if (Creature* pShade = m_pInstance->GetSingleCreatureFromStorage(NPC_SHADE_OF_AKAMA)) - { - if (boss_shade_of_akamaAI* pShadeAI = dynamic_cast(pShade->AI())) - pShadeAI->PrepareChannelers(); - - // Prevent players from trying to restart event - m_pInstance->SetData(TYPE_SHADE, IN_PROGRESS); - - m_creature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); + float fX, fY, fZ; - pShade->AddThreat(m_creature, 1000000.0f); - pShade->SetInCombatWith(m_creature); - m_creature->SetInCombatWith(pShade); - - pShade->HandleEmote(EMOTE_STATE_NONE); - pShade->SetTargetGuid(m_creature->GetObjectGuid()); - - pShade->SetInCombatWithZone(); + // Spawn 4 Broken in the center and behind the column + for (uint8 i = 0; i < countof(afBrokenSpawnLoc); ++i) + { + for (uint8 j = 0; j < 4; ++j) + { + fX = afBrokenSpawnLoc[i].m_fX; + fY = afBrokenSpawnLoc[i].m_fY + (j*7); + fZ = afBrokenSpawnLoc[i].m_fZ; - m_bIsEventBegun = true; + m_creature->SummonCreature(NPC_ASH_BROKEN, fX, fY, fZ, 0, TEMPSUMMON_TIMED_DESPAWN, 10*MINUTE*IN_MILLISECONDS); + } } - } - void MovementInform(uint32 uiMoveType, uint32 uiPointId) - { - if (uiMoveType != POINT_MOTION_TYPE || !m_pInstance) - return; + GuidVector vGeneratorsVect; + m_pInstance->GetGeneratorGuidVector(vGeneratorsVect); - switch(uiPointId) + // Spawn 4 Broken at each generator + for (uint8 i = 0; i < vGeneratorsVect.size(); ++i) { - case 0: - ++m_uiWayPointId; - break; - case 1: - if (Creature* pShade = m_pInstance->GetSingleCreatureFromStorage(NPC_SHADE_OF_AKAMA)) + if (Creature* pGenerator = m_creature->GetMap()->GetCreature(vGeneratorsVect[i])) + { + for (uint8 j = 0; j < 4; ++j) { - DoCastSpellIfCan(pShade, SPELL_AKAMA_SOUL_RETRIEVE); - m_uiEndingTalkCount = 0; - m_uiSoulRetrieveTimer = 16000; + pGenerator->GetRandomPoint(pGenerator->GetPositionX(), pGenerator->GetPositionY(), pGenerator->GetPositionZ(), 10.0f, fX, fY, fZ); + m_creature->SummonCreature(NPC_ASH_BROKEN, fX, fY, fZ, 0, TEMPSUMMON_TIMED_DESPAWN, 10*MINUTE*IN_MILLISECONDS); } - break; + } } } - void JustDied(Unit* pKiller) - { - DoScriptText(SAY_DEATH, m_creature); - } - void UpdateAI(const uint32 uiDiff) { - if (!m_bIsEventBegun || !m_pInstance) - return; - - if (!m_bCanStartCombat) + switch (m_uiPhase) { - if (Creature* pShade = m_pInstance->GetSingleCreatureFromStorage(NPC_SHADE_OF_AKAMA)) - { - if (!pShade->isAlive()) + case PHASE_CHANNEL: + + if (m_uiSummonDefenderTimer < uiDiff) { - EnterEvadeMode(); - return; + DoSummonAshtongue(SPELL_SUMMON_DEFENDER); + m_uiSummonDefenderTimer = 15000; } + else + m_uiSummonDefenderTimer -= uiDiff; - if (boss_shade_of_akamaAI* pShadeAI = dynamic_cast(pShade->AI())) + if (m_lSorcerersGUIDList.size() <= m_uiChannelersDead) { - if (pShadeAI->m_bIsBanished) + if (m_uiSummonSorcererTimer < uiDiff) { - if (m_uiCastSoulRetrieveTimer < uiDiff) - { - DoCastSpellIfCan(pShade, SPELL_AKAMA_SOUL_CHANNEL); - m_uiCastSoulRetrieveTimer = 500; - } - else - m_uiCastSoulRetrieveTimer -= uiDiff; + DoSummonAshtongue(SPELL_SUMMON_SORCERER); + m_uiSummonSorcererTimer = urand(20000, 30000); } else - { - m_creature->InterruptNonMeleeSpells(false); - m_bCanStartCombat = true; - } + m_uiSummonSorcererTimer -= uiDiff; } - } - } - - if (m_bIsShadeDead && (m_uiWayPointId == 1)) - { - m_creature->GetMotionMaster()->MovePoint(m_uiWayPointId, afAkamaWP[1].m_fX, afAkamaWP[1].m_fY, afAkamaWP[1].m_fZ); - ++m_uiWayPointId; - } - if (!m_bIsShadeDead && m_bCanStartCombat) - { - if (m_uiCheckTimer < uiDiff) - { - if (Creature* pShade = m_pInstance->GetSingleCreatureFromStorage(NPC_SHADE_OF_AKAMA)) + if (m_uiSummonPackTimer < uiDiff) { - if (!pShade->isAlive()) - { - m_bIsShadeDead = true; - m_uiWayPointId = 0; - m_creature->SetWalk(true); - m_creature->GetMotionMaster()->MovePoint(m_uiWayPointId, afAkamaWP[0].m_fX, afAkamaWP[0].m_fY, afAkamaWP[0].m_fZ); - } + DoSummonAshtongue(); + m_uiSummonPackTimer = 35000; } - m_uiCheckTimer = 5000; - } - else - m_uiCheckTimer -= uiDiff; - } - - if (m_uiSummonBrokenTimer && m_uiBrokenSummonIndex < countof(afBrokenSpawnLoc)) - { - if (m_uiSummonBrokenTimer <= uiDiff) - { - for (uint8 i = 0; i < 4; ++i) - { - float x = afBrokenSpawnLoc[m_uiBrokenSummonIndex].m_fX + (i*5); - float y = afBrokenSpawnLoc[m_uiBrokenSummonIndex].m_fY + (1*5); - float z = afBrokenSpawnLoc[m_uiBrokenSummonIndex].m_fZ; - float o = afBrokenSpawnLoc[m_uiBrokenSummonIndex].m_fO; + else + m_uiSummonPackTimer -= uiDiff; - if (Creature* pBroken = m_creature->SummonCreature(NPC_ASH_BROKEN, x, y, z, o, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 360000)) - { - float wx = afBrokenWP[m_uiBrokenSummonIndex].m_fX + (i*5); - float wy = afBrokenWP[m_uiBrokenSummonIndex].m_fY + (i*5); - float wz = afBrokenWP[m_uiBrokenSummonIndex].m_fZ; + break; + case PHASE_COMBAT: - pBroken->GetMotionMaster()->MovePoint(0, wx, wy, wz); - pBroken->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; - m_lBrokenGUIDList.push_back(pBroken->GetObjectGuid()); - } + if (!m_bHasYelledOnce && m_creature->GetHealthPercent() < 15.0f) + { + DoScriptText(SAY_LOW_HEALTH, m_creature); + m_bHasYelledOnce = true; } - ++m_uiBrokenSummonIndex; - m_uiSummonBrokenTimer = 1000; - } - else - m_uiSummonBrokenTimer -= uiDiff; - } - - if (m_uiSoulRetrieveTimer) - { - if (m_uiSoulRetrieveTimer <= uiDiff) - { - switch(m_uiEndingTalkCount) + if (m_uiDestructivePoisonTimer < uiDiff) { - case 0: - m_creature->HandleEmote(EMOTE_ONESHOT_ROAR); - ++m_uiEndingTalkCount; - m_uiSoulRetrieveTimer = 2000; - m_uiSummonBrokenTimer = 1; - break; - case 1: - DoScriptText(SAY_FREE, m_creature); - ++m_uiEndingTalkCount; - m_uiSoulRetrieveTimer = 25000; - break; - case 2: - if (!m_lBrokenGUIDList.empty()) - { - bool bYelled = false; - - for (GuidList::const_iterator itr = m_lBrokenGUIDList.begin(); itr != m_lBrokenGUIDList.end(); ++itr) - { - if (Creature* pBroken = m_creature->GetMap()->GetCreature(*itr)) - { - if (!bYelled) - { - DoScriptText(SAY_BROKEN_FREE_01, pBroken); - bYelled = true; - } - - pBroken->HandleEmote(EMOTE_ONESHOT_KNEEL); - } - } - } - ++m_uiEndingTalkCount; - m_uiSoulRetrieveTimer = 1500; - break; - case 3: - for (GuidList::const_iterator itr = m_lBrokenGUIDList.begin(); itr != m_lBrokenGUIDList.end(); ++itr) - { - // This is the incorrect spell, but can't seem to find the right one. - if (Creature* pBroken = m_creature->GetMap()->GetCreature(*itr)) - pBroken->CastSpell(pBroken, 39656, true); - } - ++m_uiEndingTalkCount; - m_uiSoulRetrieveTimer = 5000; - break; - case 4: - for (GuidList::const_iterator itr = m_lBrokenGUIDList.begin(); itr != m_lBrokenGUIDList.end(); ++itr) - { - if (Creature* pBroken = m_creature->GetMap()->GetCreature(*itr)) - DoScriptText(SAY_BROKEN_FREE_02, pBroken); - } - m_uiSoulRetrieveTimer = 0; - break; + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_DESTRUCTIVE_POISON) == CAST_OK) + m_uiDestructivePoisonTimer = 15000; } - } - else - m_uiSoulRetrieveTimer -= uiDiff; - } - - if (!m_creature->getVictim() || !m_creature->SelectHostileTarget()) - return; - - if (!m_bHasYelledOnce && m_creature->GetHealthPercent() < 15.0f) - { - DoScriptText(SAY_LOW_HEALTH, m_creature); - m_bHasYelledOnce = true; - } + else + m_uiDestructivePoisonTimer -= uiDiff; - if (m_uiDestructivePoisonTimer < uiDiff) - { - if (Creature* pShade = m_pInstance->GetSingleCreatureFromStorage(NPC_SHADE_OF_AKAMA)) - { - if (pShade->isAlive()) - DoCastSpellIfCan(pShade, SPELL_DESTRUCTIVE_POISON); - } + if (m_uiLightningBoltTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_CHAIN_LIGHTNING) == CAST_OK) + m_uiLightningBoltTimer = 10000; + } + else + m_uiLightningBoltTimer -= uiDiff; - m_uiDestructivePoisonTimer = 15000; - } - else - m_uiDestructivePoisonTimer -= uiDiff; + DoMeleeAttackIfReady(); - if (m_uiLightningBoltTimer < uiDiff) - { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_LIGHTNING_BOLT); - m_uiLightningBoltTimer = 10000; + break; + case PHASE_EPILOGUE: + DialogueUpdate(uiDiff); + break; } - else - m_uiLightningBoltTimer -= uiDiff; - - DoMeleeAttackIfReady(); } }; @@ -697,15 +505,19 @@ bool GossipSelect_npc_akama(Player* pPlayer, Creature* pCreature, uint32 uiSende pPlayer->CLOSE_GOSSIP_MENU(); if (npc_akamaAI* pAkamaAI = dynamic_cast(pCreature->AI())) - pAkamaAI->BeginEvent(); + pAkamaAI->DoStartEvent(); } return true; } -struct MANGOS_DLL_DECL mob_ashtongue_channelerAI : public ScriptedAI +/*###### +## boss_shade_of_akama +######*/ + +struct MANGOS_DLL_DECL boss_shade_of_akamaAI : public ScriptedAI { - mob_ashtongue_channelerAI(Creature* pCreature) : ScriptedAI(pCreature) + boss_shade_of_akamaAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); Reset(); @@ -714,54 +526,72 @@ struct MANGOS_DLL_DECL mob_ashtongue_channelerAI : public ScriptedAI ScriptedInstance* m_pInstance; void Reset() + { + SetCombatMovement(false); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + } + + void JustReachedHome() { + if (m_pInstance) + m_pInstance->SetData(TYPE_SHADE, FAIL); + } + + void KilledUnit(Unit* pVictim) + { + if (pVictim->GetEntry() == NPC_AKAMA) + EnterEvadeMode(); + } + + void JustDied(Unit* pKiller) + { + DoCastSpellIfCan(m_creature, SPELL_SUMMON_SHADE_TRIGGER, CAST_TRIGGERED); + if (m_pInstance) { - //self-resurrect if encounter not done and we are dead - if (!m_creature->isAlive() && m_pInstance->GetData(TYPE_SHADE) != DONE) - m_creature->Respawn(); + m_pInstance->SetData(TYPE_SHADE, DONE); - m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + // Inform Akama that the Shade is dead + if (Creature* pAkama = m_pInstance->GetSingleCreatureFromStorage(NPC_AKAMA_SHADE)) + pAkama->AI()->KilledUnit(m_creature); } } - void AttackStart(Unit* pWho) {} - void MoveInLineOfSight(Unit* pWho) {} - - void JustDied(Unit* pKiller) + void MovementInform(uint32 uiMoveType, uint32 uiPointId) { - if (!m_pInstance) + if (uiMoveType != POINT_MOTION_TYPE || !uiPointId || !m_pInstance) return; - if (Creature* pShade = m_pInstance->GetSingleCreatureFromStorage(NPC_SHADE_OF_AKAMA)) + // Set in combat with Akama + if (Creature* pAkama = m_pInstance->GetSingleCreatureFromStorage(NPC_AKAMA_SHADE)) { - if (pShade->isAlive()) - { - if (boss_shade_of_akamaAI* pShadeAI = dynamic_cast(pShade->AI())) - pShadeAI->IncrementDeathCount(); - else - error_log("SD2: mob_ashtongue_channelerAI dead but unable to increment DeathCount for Shade of Akama."); - } + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + + // Shade should move to Akama, not the other way around + AttackStart(pAkama); + + // Crazy amount of threat + m_creature->AddThreat(pAkama, 10000000.0f); + pAkama->AddThreat(m_creature, 10000000.0f); } } void UpdateAI(const uint32 uiDiff) { - if (!m_creature->isAlive()) + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - //start channel (not nice way to start channeling) - if (!m_creature->IsNonMeleeSpellCasted(false) && !m_creature->getVictim() && m_pInstance) - { - if (Creature* pShade = m_pInstance->GetSingleCreatureFromStorage(NPC_SHADE_OF_AKAMA)) - m_creature->CastSpell(pShade, SPELL_SHADE_SOUL_CHANNEL, false); - } + DoMeleeAttackIfReady(); } }; -struct MANGOS_DLL_DECL mob_ashtongue_sorcererAI : public ScriptedAI +/*###### +## mob_ashtongue_channeler +######*/ + +struct MANGOS_DLL_DECL mob_ashtongue_channelerAI : public ScriptedAI { - mob_ashtongue_sorcererAI(Creature* pCreature) : ScriptedAI(pCreature) + mob_ashtongue_channelerAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); Reset(); @@ -769,70 +599,96 @@ struct MANGOS_DLL_DECL mob_ashtongue_sorcererAI : public ScriptedAI ScriptedInstance* m_pInstance; - uint32 m_uiCheckTimer; - bool m_bStartBanishing; + uint32 m_uiBanishTimer; void Reset() { - m_uiCheckTimer = 5000; - m_bStartBanishing = false; - } + m_uiBanishTimer = 5000; - void AttackStart(Unit* pWho) {} - void MoveInLineOfSight(Unit* pWho) {} + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + } void JustDied(Unit* pKiller) { if (!m_pInstance) return; - if (Creature* pShade = m_pInstance->GetSingleCreatureFromStorage(NPC_SHADE_OF_AKAMA)) + // Inform Akama that one channeler is dead + if (Creature* pAkama = m_pInstance->GetSingleCreatureFromStorage(NPC_AKAMA_SHADE)) + pAkama->AI()->KilledUnit(m_creature); + } + + void AttackStart(Unit* pWho) {} + void MoveInLineOfSight(Unit* pWho) {} + + void UpdateAI(const uint32 uiDiff) + { + if (m_uiBanishTimer) { - if (pShade->isAlive()) + if (m_uiBanishTimer <= uiDiff) { - if (boss_shade_of_akamaAI* pShadeAI = dynamic_cast(pShade->AI())) - pShadeAI->IncrementDeathCount(m_creature->GetObjectGuid()); - else - error_log("SD2: mob_ashtongue_sorcererAI dead but unable to increment DeathCount for Shade of Akama."); + if (DoCastSpellIfCan(m_creature, SPELL_SHADE_SOUL_CHANNEL)) + m_uiBanishTimer = 0; } + else + m_uiBanishTimer -= uiDiff; } } +}; - void UpdateAI(const uint32 uiDiff) +/*###### +## mob_ashtongue_sorcerer +######*/ + +struct MANGOS_DLL_DECL mob_ashtongue_sorcererAI : public ScriptedAI +{ + mob_ashtongue_sorcererAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; + + void Reset() {} + + void AttackStart(Unit* pWho) {} + void MoveInLineOfSight(Unit* pWho) {} + + void JustDied(Unit* pKiller) { - if (m_bStartBanishing || !m_pInstance) + if (!m_pInstance) return; - if (m_uiCheckTimer < uiDiff) - { - Creature* pShade = m_pInstance->GetSingleCreatureFromStorage(NPC_SHADE_OF_AKAMA); + // Inform Akama that one sorcerer is dead + if (Creature* pAkama = m_pInstance->GetSingleCreatureFromStorage(NPC_AKAMA_SHADE)) + pAkama->AI()->KilledUnit(m_creature); + } - if (pShade && pShade->isAlive() && m_creature->isAlive()) - { - if (m_creature->IsWithinDist(pShade, 20.0f, false)) - { - m_creature->GetMotionMaster()->Clear(false); - m_creature->GetMotionMaster()->MoveIdle(); + void MovementInform(uint32 uiMoveType, uint32 uiPointId) + { + if (uiMoveType != POINT_MOTION_TYPE || !uiPointId) + return; - if (DoCastSpellIfCan(pShade, SPELL_SHADE_SOUL_CHANNEL) == CAST_OK) - m_bStartBanishing = true; - } - } - m_uiCheckTimer = 2000; + // Channel on the Shade when reached the calculated point + if (DoCastSpellIfCan(m_creature, SPELL_SHADE_SOUL_CHANNEL) == CAST_OK) + { + m_creature->GetMotionMaster()->Clear(); + m_creature->GetMotionMaster()->MoveIdle(); } - else - m_uiCheckTimer -= uiDiff; } + + void UpdateAI(const uint32 uiDiff) {} }; -CreatureAI* GetAI_boss_shade_of_akama(Creature* pCreature) +CreatureAI* GetAI_npc_akama_shade(Creature* pCreature) { - return new boss_shade_of_akamaAI(pCreature); + return new npc_akamaAI(pCreature); } -CreatureAI* GetAI_npc_akama_shade(Creature* pCreature) +CreatureAI* GetAI_boss_shade_of_akama(Creature* pCreature) { - return new npc_akamaAI(pCreature); + return new boss_shade_of_akamaAI(pCreature); } CreatureAI* GetAI_mob_ashtongue_channeler(Creature* pCreature) @@ -849,11 +705,6 @@ void AddSC_boss_shade_of_akama() { Script* pNewScript; - pNewScript = new Script; - pNewScript->Name = "boss_shade_of_akama"; - pNewScript->GetAI = &GetAI_boss_shade_of_akama; - pNewScript->RegisterSelf(); - pNewScript = new Script; pNewScript->Name = "npc_akama_shade"; pNewScript->GetAI = &GetAI_npc_akama_shade; @@ -861,6 +712,11 @@ void AddSC_boss_shade_of_akama() pNewScript->pGossipSelect = &GossipSelect_npc_akama; pNewScript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "boss_shade_of_akama"; + pNewScript->GetAI = &GetAI_boss_shade_of_akama; + pNewScript->RegisterSelf(); + pNewScript = new Script; pNewScript->Name = "mob_ashtongue_channeler"; pNewScript->GetAI = &GetAI_mob_ashtongue_channeler; diff --git a/scripts/outland/black_temple/instance_black_temple.cpp b/scripts/outland/black_temple/instance_black_temple.cpp index f54d6859c..50457c057 100644 --- a/scripts/outland/black_temple/instance_black_temple.cpp +++ b/scripts/outland/black_temple/instance_black_temple.cpp @@ -73,6 +73,12 @@ void instance_black_temple::OnCreatureCreate(Creature* pCreature) case NPC_COUNCIL_VOICE: m_mNpcEntryGuidStore[pCreature->GetEntry()] = pCreature->GetObjectGuid(); break; + case NPC_ASH_CHANNELER: + m_lChannelersGuidList.push_back(pCreature->GetObjectGuid()); + break; + case NPC_CREATURE_GENERATOR: + m_vCreatureGeneratorGuidVector.push_back(pCreature->GetObjectGuid()); + break; } } @@ -89,13 +95,18 @@ void instance_black_temple::OnObjectCreate(GameObject* pGo) pGo->SetGoState(GO_STATE_ACTIVE); break; case GO_SHADE_OF_AKAMA: // Door close during encounter + case GO_GOREFIEND_DOOR: // Door close during encounter + break; + case GO_GURTOGG_DOOR: // Door opens after encounter + if (m_auiEncounter[TYPE_BLOODBOIL] == DONE) + pGo->SetGoState(GO_STATE_ACTIVE); break; case GO_PRE_SHAHRAZ_DOOR: // Door leading to Mother Shahraz - if (CanPreMotherDoorOpen()) + if (m_auiEncounter[TYPE_SHADE] == DONE && m_auiEncounter[TYPE_GOREFIEND] == DONE && m_auiEncounter[TYPE_BLOODBOIL] == DONE && m_auiEncounter[TYPE_RELIQUIARY] == DONE) pGo->SetGoState(GO_STATE_ACTIVE); break; - case GO_POST_SHAHRAZ_DOOR: // Door after shahraz - if (m_auiEncounter[6] == DONE) + case GO_POST_SHAHRAZ_DOOR: // Door after shahraz + if (m_auiEncounter[TYPE_SHAHRAZ] == DONE) pGo->SetGoState(GO_STATE_ACTIVE); break; case GO_PRE_COUNCIL_DOOR: // Door leading to the Council (grand promenade) @@ -115,16 +126,10 @@ void instance_black_temple::OnObjectCreate(GameObject* pGo) m_mGoEntryGuidStore[pGo->GetEntry()] = pGo->GetObjectGuid(); } -bool instance_black_temple::CanPreMotherDoorOpen() +void instance_black_temple::DoOpenPreMotherDoor() { - if (m_auiEncounter[TYPE_SHADE] == DONE && m_auiEncounter[TYPE_GOREFIEND] == DONE && m_auiEncounter[TYPE_BLOODBOIL] == DONE && m_auiEncounter[TYPE_RELIQUIARY] == DONE) - { - debug_log("SD2: Black Temple: door to Mother Shahraz can open"); - return true; - } - - debug_log("SD2: Black Temple: Door data to Mother Shahraz requested, cannot open yet (Encounter data: %u %u %u %u)",m_auiEncounter[2],m_auiEncounter[3],m_auiEncounter[4],m_auiEncounter[5]); - return false; + if (GetData(TYPE_SHADE) == DONE && GetData(TYPE_GOREFIEND) == DONE && GetData(TYPE_BLOODBOIL) == DONE && GetData(TYPE_RELIQUIARY) == DONE) + DoUseDoorOrButton(GO_PRE_SHAHRAZ_DOOR); } void instance_black_temple::SetData(uint32 uiType, uint32 uiData) @@ -144,12 +149,44 @@ void instance_black_temple::SetData(uint32 uiType, uint32 uiData) DoUseDoorOrButton(GO_SUPREMUS_DOORS); break; case TYPE_SHADE: + m_auiEncounter[uiType] = uiData; + // combat door + DoUseDoorOrButton(GO_SHADE_OF_AKAMA); + if (uiData == FAIL) + { + // Reset channelers on fail + for (GuidList::const_iterator itr = m_lChannelersGuidList.begin(); itr != m_lChannelersGuidList.end(); ++itr) + { + if (Creature* pChanneler = instance->GetCreature(*itr)) + { + if (!pChanneler->isAlive()) + pChanneler->Respawn(); + else + pChanneler->AI()->EnterEvadeMode(); + } + } + } + if (uiData == DONE) + DoOpenPreMotherDoor(); + break; case TYPE_GOREFIEND: + m_auiEncounter[uiType] = uiData; + DoUseDoorOrButton(GO_GOREFIEND_DOOR); + if (uiData == DONE) + DoOpenPreMotherDoor(); + break; case TYPE_BLOODBOIL: + m_auiEncounter[uiType] = uiData; + if (uiData == DONE) + { + DoOpenPreMotherDoor(); + DoUseDoorOrButton(GO_GURTOGG_DOOR); + } + break; case TYPE_RELIQUIARY: m_auiEncounter[uiType] = uiData; - if (uiData == DONE && CanPreMotherDoorOpen()) - DoUseDoorOrButton(GO_PRE_SHAHRAZ_DOOR); + if (uiData == DONE) + DoOpenPreMotherDoor(); break; case TYPE_SHAHRAZ: if (uiData == DONE) diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 9f30688fb..640c5e18e 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2739" + #define SD2_REVISION_NR "2740" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 1f399239e..6075daca1 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -2501,8 +2501,8 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1564011,'%s punches the ground in anger!',0,3,0,0,'supremus EMOTE_PUNCH_GROUND'), (-1564012,'The ground begins to crack open!',0,3,0,0,'supremus EMOTE_GROUND_CRACK'), -(-1564013,'No! Not yet...',11385,1,0,0,'akama shade SAY_LOW_HEALTH'), -(-1564014,'I will not last much longer...',11386,1,0,0,'akama shade SAY_DEATH'), +(-1564013,'No! Not yet...',11386,1,0,0,'akama shade SAY_LOW_HEALTH'), +(-1564014,'I will not last much longer...',11385,1,0,0,'akama shade SAY_DEATH'), (-1564015,'Come out from the shadows! I\'ve returned to lead you against our true enemy! Shed your chains and raise your weapons against your Illidari masters!',0,1,0,0,'akama shade SAY_FREE'), (-1564016,'Hail our leader! Hail Akama!',0,1,0,0,'akama shade broken SAY_BROKEN_FREE_01'), (-1564017,'Hail Akama!',0,1,0,0,'akama shade broken SAY_BROKEN_FREE_02'), @@ -2631,7 +2631,9 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1564126,'Behold the flames of Azzinoth!',11480,1,0,0,'illidan SAY_SUMMONFLAMES'), (-1564127,'Stare into the eyes of the Betrayer!',11481,1,0,0,'illidan SAY_EYE_BLAST'), (-1564128,'Behold the power... of the demon within!',11475,1,0,0,'illidan SAY_MORPH'), -(-1564129,'You\'ve wasted too much time mortals, now you shall fall!',11474,1,0,0,'illidan SAY_ENRAGE'); +(-1564129,'You\'ve wasted too much time mortals, now you shall fall!',11474,1,0,0,'illidan SAY_ENRAGE'), + +(-1564130,'Broken of the Ashtongue tribe, your leader speaks!',0,1,0,0,'akama shade SAY_FREE_1'); -- -1 565 000 GRUUL'S LAIR INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES @@ -4421,7 +4423,7 @@ INSERT INTO gossip_texts (entry,content_default,comment) VALUES -- -3 564 000 BLACK TEMPLE INSERT INTO gossip_texts (entry,content_default,comment) VALUES -(-3564000,'We are ready to fight alongside you, Akama','akama(shade) GOSSIP_ITEM_START_ENCOUNTER'); +(-3564000,'I\'m with you, Akama.','akama(shade) GOSSIP_ITEM_START_ENCOUNTER'); -- -3 595 000 CULLING OF STRATHOLME INSERT INTO gossip_texts (entry,content_default,comment) VALUES diff --git a/sql/updates/r2740_scriptdev2.sql b/sql/updates/r2740_scriptdev2.sql new file mode 100644 index 000000000..6819ca841 --- /dev/null +++ b/sql/updates/r2740_scriptdev2.sql @@ -0,0 +1,8 @@ +DELETE FROM script_texts WHERE entry=-1564130; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1564130,'Broken of the Ashtongue tribe, your leader speaks!',0,1,0,0,'akama shade SAY_FREE_1'); +UPDATE script_texts SET sound=11386 WHERE entry=-1564013; +UPDATE script_texts SET sound=11385 WHERE entry=-1564014; +DELETE FROM gossip_texts WHERE entry=-3564000; +INSERT INTO gossip_texts (entry,content_default,comment) VALUES +(-3564000,'I\'m with you, Akama.','akama(shade) GOSSIP_ITEM_START_ENCOUNTER'); From 3873ff7aff3ac34e276c50c222cbe981e3fe1e88 Mon Sep 17 00:00:00 2001 From: Sattelit Date: Sat, 20 Oct 2012 20:03:26 +0300 Subject: [PATCH 0736/1172] [2741] Fix Attumen the Huntsman health after mounting Signed-off-by: Xfurry --- scripts/eastern_kingdoms/karazhan/boss_midnight.cpp | 9 +++++++++ sd2_revision_nr.h | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/scripts/eastern_kingdoms/karazhan/boss_midnight.cpp b/scripts/eastern_kingdoms/karazhan/boss_midnight.cpp index 77a2bb1ae..3e39b7e66 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_midnight.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_midnight.cpp @@ -111,7 +111,16 @@ struct MANGOS_DLL_DECL boss_midnightAI : public ScriptedAI } } else if (pSummoned->GetEntry() == NPC_ATTUMEN_MOUNTED) + { DoScriptText(SAY_MOUNT, pSummoned); + + if (!m_pInstance) + return; + + // The summoned has the health equal to the one which has the higher HP percentage of both + if (Creature* pAttumen = m_pInstance->GetSingleCreatureFromStorage(NPC_ATTUMEN)) + pSummoned->SetHealth(pAttumen->GetHealth() > m_creature->GetHealth() ? pAttumen->GetHealth() : m_creature->GetHealth()); + } } void MovementInform(uint32 uiMoveType, uint32 uiPointId) diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 640c5e18e..973188d3e 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2740" + #define SD2_REVISION_NR "2741" #endif // __SD2_REVISION_NR_H__ From 0333ac984d4ca79e182d8de20e62f0a3b4c57426 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sun, 21 Oct 2012 16:45:29 +0300 Subject: [PATCH 0737/1172] [2742] Implement script for escort quest 10406 Thanks grz3s for providing the data --- scripts/outland/netherstorm.cpp | 168 ++++++++++++++++++++++++++++++- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 + sql/scriptdev2_script_full.sql | 30 +++++- sql/updates/r2742_mangos.sql | 1 + sql/updates/r2742_scriptdev2.sql | 29 ++++++ 6 files changed, 228 insertions(+), 3 deletions(-) create mode 100644 sql/updates/r2742_mangos.sql create mode 100644 sql/updates/r2742_scriptdev2.sql diff --git a/scripts/outland/netherstorm.cpp b/scripts/outland/netherstorm.cpp index b6456485c..3f2cca202 100644 --- a/scripts/outland/netherstorm.cpp +++ b/scripts/outland/netherstorm.cpp @@ -17,7 +17,7 @@ /* ScriptData SDName: Netherstorm SD%Complete: 80 -SDComment: Quest support: 10438, 10299, 10321, 10322, 10323, 10329, 10330, 10337, 10338, 10365(Shutting Down Manaforge), 10198, 10191, 10924 +SDComment: Quest support: 10191, 10198, 10299, 10321, 10322, 10323, 10329, 10330, 10337, 10338, 10365(Shutting Down Manaforge), 10406, 10438, 10924. SDCategory: Netherstorm EndScriptData */ @@ -27,6 +27,8 @@ go_manaforge_control_console npc_commander_dawnforge npc_bessy npc_maxx_a_million +npc_zeppit +npc_protectorate_demolitionist EndContentData */ #include "precompiled.h" @@ -880,6 +882,165 @@ CreatureAI* GetAI_npc_zeppit(Creature* pCreature) return new npc_zeppitAI(pCreature); } +/*###### +## npc_protectorate_demolitionist +######*/ + +enum +{ + SAY_INTRO = -1000891, + SAY_ATTACKED_1 = -1000892, + SAY_ATTACKED_2 = -1000893, + SAY_STAGING_GROUNDS = -1000894, + SAY_TOXIC_HORROR = -1000895, + SAY_SALHADAAR = -1000896, + SAY_DISRUPTOR = -1000897, + SAY_NEXUS_PROTECT = -1000898, + SAY_FINISH_1 = -1000899, + SAY_FINISH_2 = -1000900, + + SPELL_ETHEREAL_TELEPORT = 34427, + SPELL_PROTECTORATE = 35679, // dummy aura applied on player + + NPC_NEXUS_STALKER = 20474, + NPC_ARCHON = 20458, + + FACTION_FRIENDLY = 35, + + QUEST_ID_DELIVERING_MESSAGE = 10406, +}; + +struct MANGOS_DLL_DECL npc_protectorate_demolitionistAI : public npc_escortAI +{ + npc_protectorate_demolitionistAI(Creature* pCreature) : npc_escortAI(pCreature) { Reset(); } + + uint32 m_uiEventTimer; + uint8 m_uiEventStage; + + void Reset() + { + if (!HasEscortState(STATE_ESCORT_ESCORTING)) + { + m_uiEventTimer = 0; + m_uiEventStage = 0; + } + } + + void Aggro(Unit* pWho) + { + DoScriptText(urand(0, 1) ? SAY_ATTACKED_1 : SAY_ATTACKED_2, m_creature); + } + + // No attack done by this npc + void AttackStart(Unit* pWho) { } + + void MoveInLineOfSight(Unit* pWho) + { + if (HasEscortState(STATE_ESCORT_ESCORTING)) + return; + + // Star the escort + if (pWho->GetTypeId() == TYPEID_PLAYER) + { + if (pWho->HasAura(SPELL_PROTECTORATE) && ((Player*)pWho)->GetQuestStatus(QUEST_ID_DELIVERING_MESSAGE) == QUEST_STATUS_INCOMPLETE) + { + if (m_creature->IsWithinDistInMap(pWho, 10.0f)) + { + m_creature->SetFactionTemporary(FACTION_FRIENDLY, TEMPFACTION_RESTORE_RESPAWN); + Start(false, (Player*)pWho); + } + } + } + } + + void JustSummoned(Creature* pSummoned) + { + if (pSummoned->GetEntry() == NPC_NEXUS_STALKER) + DoScriptText(SAY_NEXUS_PROTECT, pSummoned); + else if (pSummoned->GetEntry() == NPC_ARCHON) + pSummoned->CastSpell(pSummoned, SPELL_ETHEREAL_TELEPORT, true); + + pSummoned->AI()->AttackStart(m_creature); + } + + void WaypointReached(uint32 uiPointId) + { + switch(uiPointId) + { + case 0: + DoScriptText(SAY_INTRO, m_creature); + break; + case 3: + DoScriptText(SAY_STAGING_GROUNDS, m_creature); + break; + case 4: + DoScriptText(SAY_TOXIC_HORROR, m_creature); + break; + case 9: + DoScriptText(SAY_SALHADAAR, m_creature); + break; + case 12: + DoScriptText(SAY_DISRUPTOR, m_creature); + SetEscortPaused(true); + m_uiEventTimer = 5000; + break; + case 13: + DoScriptText(SAY_FINISH_2, m_creature); + if (Player* pPlayer = GetPlayerForEscort()) + { + m_creature->SetFacingToObject(pPlayer); + pPlayer->GroupEventHappens(QUEST_ID_DELIVERING_MESSAGE, m_creature); + } + SetEscortPaused(true); + m_uiEventTimer = 6000; + break; + } + } + + void UpdateEscortAI(const uint32 uiDiff) + { + if (m_uiEventTimer) + { + if (m_uiEventTimer <= uiDiff) + { + switch (m_uiEventStage) + { + case 0: + m_creature->SummonCreature(NPC_ARCHON, 3875.69f, 2308.72f, 115.80f, 1.48f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 30000); + m_uiEventTimer = 4000; + break; + case 1: + m_creature->SummonCreature(NPC_NEXUS_STALKER, 3884.06f, 2325.22f, 111.37f, 3.45f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 30000); + m_creature->SummonCreature(NPC_NEXUS_STALKER, 3861.54f, 2320.44f, 111.48f, 0.32f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 30000); + m_uiEventTimer = 9000; + break; + case 2: + DoScriptText(SAY_FINISH_1, m_creature); + SetRun(); + SetEscortPaused(false); + m_uiEventTimer = 0; + break; + case 3: + if (DoCastSpellIfCan(m_creature, SPELL_ETHEREAL_TELEPORT, CAST_TRIGGERED) == CAST_OK) + m_creature->ForcedDespawn(1000); + m_uiEventTimer = 0; + break; + } + ++m_uiEventStage; + } + else + m_uiEventTimer -= uiDiff; + } + + // ToDo: research if the npc uses spells or melee for combat + } +}; + +CreatureAI* GetAI_npc_protectorate_demolitionist(Creature* pCreature) +{ + return new npc_protectorate_demolitionistAI(pCreature); +} + void AddSC_netherstorm() { Script* pNewScript; @@ -920,4 +1081,9 @@ void AddSC_netherstorm() pNewScript->Name = "npc_zeppit"; pNewScript->GetAI = &GetAI_npc_zeppit; pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_protectorate_demolitionist"; + pNewScript->GetAI = &GetAI_npc_protectorate_demolitionist; + pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 973188d3e..4dd50cc29 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2741" + #define SD2_REVISION_NR "2742" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index fcbdcfa52..02a41fc1c 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -842,6 +842,7 @@ UPDATE creature_template SET ScriptName='npc_commander_dawnforge' WHERE entry=19 UPDATE creature_template SET ScriptName='npc_bessy' WHERE entry=20415; UPDATE creature_template SET ScriptName='npc_maxx_a_million' WHERE entry=19589; UPDATE creature_template SET ScriptName='npc_zeppit' WHERE entry=22484; +UPDATE creature_template SET ScriptName='npc_protectorate_demolitionist' WHERE entry=20802; /* */ /* THE NEXUS */ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 6075daca1..72b18aceb 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -955,7 +955,18 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1000887,'End him...',0,0,0,0,'lexlort SAY_LEXLORT_3'), (-1000888,'You, soldier, report back to Kargath at once!',0,0,0,1,'lexlort SAY_LEXLORT_4'), (-1000889,'%s submits.',0,2,0,0,'grark EMOTE_SUBMIT'), -(-1000890,'You have come to play? Then let us play!',0,0,0,0,'grark SAY_AGGRO'); +(-1000890,'You have come to play? Then let us play!',0,0,0,0,'grark SAY_AGGRO'), + +(-1000891,'Let\'s do this... Just keep me covered and I\'ll deliver the package.',0,0,0,0,'demolitionist SAY_INTRO'), +(-1000892,'I\'m under attack! I repeat, I am under attack!',0,0,0,0,'demolitionist SAY_ATTACK_1'), +(-1000893,'I need to find a new line of work.',0,0,0,0,'demolitionist SAY_ATTACK_2'), +(-1000894,'By the second sun of K\'aresh, look at this place! I can only imagine what Salhadaar is planning. Come on, let\'s keep going.',0,0,0,1,'demolitionist SAY_STAGING_GROUNDS'), +(-1000895,'With this much void waste and run off, a toxic void horror can\'t be too far behind.',0,0,0,0,'demolitionist SAY_TOXIC_HORROR'), +(-1000896,'Look there, fleshling! Salhadaar\'s conduits! He\'s keeping well fed...',0,0,0,1,'demolitionist SAY_SALHADAAR'), +(-1000897,'Alright, keep me protected while I plant this disruptor. This shouldn\'t take very long...',0,0,0,0,'demolitionist SAY_DISRUPTOR'), +(-1000898,'Protect the conduit! Stop the intruders!',0,0,0,0,'nexus stalkers SAY_PROTECT'), +(-1000899,'Done! Back up! Back up!',0,0,0,0,'demolitionist SAY_FINISH_1'), +(-1000900,'Looks like my work here is done. Report to the holo-image of Ameer over at the transporter.',0,0,0,1,'demolitionist SAY_FINISH_2'); -- -1 033 000 SHADOWFANG KEEP INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES @@ -6989,4 +7000,21 @@ INSERT INTO script_waypoint VALUES (17225, 30, -11118.22, -1883.83, 110.595, 3000, ''), (17225, 31, -11118.45, -1883.68, 91.473, 0, 'start combat'); +DELETE FROM script_waypoint WHERE entry=20802; +INSERT INTO script_waypoint VALUES +(20802, 0, 4017.864, 2325.038, 114.029, 3000, 'SAY_INTRO'), +(20802, 1, 4006.373, 2324.593, 111.455, 0, ''), +(20802, 2, 3998.391, 2326.364, 113.164, 0, ''), +(20802, 3, 3982.309, 2330.261, 113.846, 7000, 'SAY_STAGING_GROUNDS'), +(20802, 4, 3950.646, 2329.249, 113.924, 0, 'SAY_TOXIC_HORROR'), +(20802, 5, 3939.229, 2330.994, 112.197, 0, ''), +(20802, 6, 3927.858, 2333.644, 111.330, 0, ''), +(20802, 7, 3917.851, 2337.696, 113.493, 0, ''), +(20802, 8, 3907.743, 2343.336, 114.062, 0, ''), +(20802, 9, 3878.760, 2378.611, 114.037, 8000, 'SAY_SALHADAAR'), +(20802, 10, 3863.153, 2355.876, 114.987, 0, ''), +(20802, 11, 3861.241, 2344.893, 115.201, 0, ''), +(20802, 12, 3872.463, 2323.114, 114.671, 0, 'escort paused - SAY_DISRUPTOR'), +(20802, 13, 3863.740, 2349.790, 115.382, 0, 'SAY_FINISH_2'); + -- EOF diff --git a/sql/updates/r2742_mangos.sql b/sql/updates/r2742_mangos.sql new file mode 100644 index 000000000..1b3927857 --- /dev/null +++ b/sql/updates/r2742_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_protectorate_demolitionist' WHERE entry=20802; diff --git a/sql/updates/r2742_scriptdev2.sql b/sql/updates/r2742_scriptdev2.sql new file mode 100644 index 000000000..a916d8e6b --- /dev/null +++ b/sql/updates/r2742_scriptdev2.sql @@ -0,0 +1,29 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1000900 AND -1000891; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1000891,'Let\'s do this... Just keep me covered and I\'ll deliver the package.',0,0,0,0,'demolitionist SAY_INTRO'), +(-1000892,'I\'m under attack! I repeat, I am under attack!',0,0,0,0,'demolitionist SAY_ATTACK_1'), +(-1000893,'I need to find a new line of work.',0,0,0,0,'demolitionist SAY_ATTACK_2'), +(-1000894,'By the second sun of K\'aresh, look at this place! I can only imagine what Salhadaar is planning. Come on, let\'s keep going.',0,0,0,1,'demolitionist SAY_STAGING_GROUNDS'), +(-1000895,'With this much void waste and run off, a toxic void horror can\'t be too far behind.',0,0,0,0,'demolitionist SAY_TOXIC_HORROR'), +(-1000896,'Look there, fleshling! Salhadaar\'s conduits! He\'s keeping well fed...',0,0,0,1,'demolitionist SAY_SALHADAAR'), +(-1000897,'Alright, keep me protected while I plant this disruptor. This shouldn\'t take very long...',0,0,0,0,'demolitionist SAY_DISRUPTOR'), +(-1000898,'Protect the conduit! Stop the intruders!',0,0,0,0,'nexus stalkers SAY_PROTECT'), +(-1000899,'Done! Back up! Back up!',0,0,0,0,'demolitionist SAY_FINISH_1'), +(-1000900,'Looks like my work here is done. Report to the holo-image of Ameer over at the transporter.',0,0,0,1,'demolitionist SAY_FINISH_2'); + +DELETE FROM script_waypoint WHERE entry=20802; +INSERT INTO script_waypoint VALUES +(20802, 0, 4017.864, 2325.038, 114.029, 3000, 'SAY_INTRO'), +(20802, 1, 4006.373, 2324.593, 111.455, 0, ''), +(20802, 2, 3998.391, 2326.364, 113.164, 0, ''), +(20802, 3, 3982.309, 2330.261, 113.846, 7000, 'SAY_STAGING_GROUNDS'), +(20802, 4, 3950.646, 2329.249, 113.924, 0, 'SAY_TOXIC_HORROR'), +(20802, 5, 3939.229, 2330.994, 112.197, 0, ''), +(20802, 6, 3927.858, 2333.644, 111.330, 0, ''), +(20802, 7, 3917.851, 2337.696, 113.493, 0, ''), +(20802, 8, 3907.743, 2343.336, 114.062, 0, ''), +(20802, 9, 3878.760, 2378.611, 114.037, 8000, 'SAY_SALHADAAR'), +(20802, 10, 3863.153, 2355.876, 114.987, 0, ''), +(20802, 11, 3861.241, 2344.893, 115.201, 0, ''), +(20802, 12, 3872.463, 2323.114, 114.671, 0, 'escort paused - SAY_DISRUPTOR'), +(20802, 13, 3863.740, 2349.790, 115.382, 0, 'SAY_FINISH_2'); From fb30dbc301e8f6a44afcf7ba8785669500dc8a26 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sun, 21 Oct 2012 22:00:34 +0300 Subject: [PATCH 0738/1172] [2743] Implement script for escort quest 10425 Thanks to grz3s for providing the data --- scripts/outland/netherstorm.cpp | 113 ++++++++++++++++++++++++++++++- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 + sql/scriptdev2_script_full.sql | 29 +++++++- sql/updates/r2743_mangos.sql | 1 + sql/updates/r2743_scriptdev2.sql | 28 ++++++++ 6 files changed, 171 insertions(+), 3 deletions(-) create mode 100644 sql/updates/r2743_mangos.sql create mode 100644 sql/updates/r2743_scriptdev2.sql diff --git a/scripts/outland/netherstorm.cpp b/scripts/outland/netherstorm.cpp index 3f2cca202..8da566f25 100644 --- a/scripts/outland/netherstorm.cpp +++ b/scripts/outland/netherstorm.cpp @@ -17,7 +17,7 @@ /* ScriptData SDName: Netherstorm SD%Complete: 80 -SDComment: Quest support: 10191, 10198, 10299, 10321, 10322, 10323, 10329, 10330, 10337, 10338, 10365(Shutting Down Manaforge), 10406, 10438, 10924. +SDComment: Quest support: 10191, 10198, 10299, 10321, 10322, 10323, 10329, 10330, 10337, 10338, 10365(Shutting Down Manaforge), 10406, 10425, 10438, 10924. SDCategory: Netherstorm EndScriptData */ @@ -29,6 +29,7 @@ npc_bessy npc_maxx_a_million npc_zeppit npc_protectorate_demolitionist +npc_captured_vanguard EndContentData */ #include "precompiled.h" @@ -1041,6 +1042,110 @@ CreatureAI* GetAI_npc_protectorate_demolitionist(Creature* pCreature) return new npc_protectorate_demolitionistAI(pCreature); } +/*###### +## npc_captured_vanguard +######*/ + +enum +{ + SAY_VANGUARD_INTRO = -1000901, + SAY_VANGUARD_START = -1000902, + SAY_VANGUARD_FINISH = -1000903, + EMOTE_VANGUARD_FINISH = -1000904, + + SPELL_GLAIVE = 36500, + SPELL_HAMSTRING = 31553, + + NPC_COMMANDER_AMEER = 20448, + + QUEST_ID_ESCAPE_STAGING_GROUNDS = 10425, +}; + +struct MANGOS_DLL_DECL npc_captured_vanguardAI : public npc_escortAI +{ + npc_captured_vanguardAI(Creature* pCreature) : npc_escortAI(pCreature) { Reset(); } + + uint32 m_uiGlaiveTimer; + uint32 m_uiHamstringTimer; + + void Reset() + { + m_uiGlaiveTimer = urand(4000, 8000); + m_uiHamstringTimer = urand(8000, 13000); + } + + void JustReachedHome() + { + // Happens only if the player helps the npc in the fight - otherwise he dies + DoScriptText(SAY_VANGUARD_INTRO, m_creature); + } + + void WaypointReached(uint32 uiPointId) + { + switch(uiPointId) + { + case 15: + if (Player* pPlayer = GetPlayerForEscort()) + pPlayer->GroupEventHappens(QUEST_ID_ESCAPE_STAGING_GROUNDS, m_creature); + break; + case 16: + DoScriptText(SAY_VANGUARD_FINISH, m_creature); + SetRun(); + break; + case 17: + if (Creature* pAmeer = GetClosestCreatureWithEntry(m_creature, NPC_COMMANDER_AMEER, 5.0f)) + DoScriptText(EMOTE_VANGUARD_FINISH, m_creature, pAmeer); + break; + case 18: + if (DoCastSpellIfCan(m_creature, SPELL_ETHEREAL_TELEPORT, CAST_TRIGGERED) == CAST_OK) + m_creature->ForcedDespawn(1000); + break; + } + } + + void UpdateEscortAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_uiGlaiveTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_GLAIVE) == CAST_OK) + m_uiGlaiveTimer = urand(5000, 9000); + } + else + m_uiGlaiveTimer -= uiDiff; + + if (m_uiHamstringTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_HAMSTRING) == CAST_OK) + m_uiHamstringTimer = urand(10000, 16000); + } + else + m_uiHamstringTimer -= uiDiff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_npc_captured_vanguard(Creature* pCreature) +{ + return new npc_captured_vanguardAI(pCreature); +} + +bool QuestAccept_npc_captured_vanguard(Player* pPlayer, Creature* pCreature, const Quest* pQuest) +{ + if (pQuest->GetQuestId() == QUEST_ID_ESCAPE_STAGING_GROUNDS) + { + if (npc_captured_vanguardAI* pEscortAI = dynamic_cast(pCreature->AI())) + pEscortAI->Start(false, pPlayer, pQuest); + + DoScriptText(SAY_VANGUARD_START, pCreature, pPlayer); + } + + return true; +} + void AddSC_netherstorm() { Script* pNewScript; @@ -1086,4 +1191,10 @@ void AddSC_netherstorm() pNewScript->Name = "npc_protectorate_demolitionist"; pNewScript->GetAI = &GetAI_npc_protectorate_demolitionist; pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_captured_vanguard"; + pNewScript->GetAI = &GetAI_npc_captured_vanguard; + pNewScript->pQuestAcceptNPC = &QuestAccept_npc_captured_vanguard; + pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 4dd50cc29..9c608ccf7 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2742" + #define SD2_REVISION_NR "2743" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 02a41fc1c..d58f6cf82 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -843,6 +843,7 @@ UPDATE creature_template SET ScriptName='npc_bessy' WHERE entry=20415; UPDATE creature_template SET ScriptName='npc_maxx_a_million' WHERE entry=19589; UPDATE creature_template SET ScriptName='npc_zeppit' WHERE entry=22484; UPDATE creature_template SET ScriptName='npc_protectorate_demolitionist' WHERE entry=20802; +UPDATE creature_template SET ScriptName='npc_captured_vanguard' WHERE entry=20763; /* */ /* THE NEXUS */ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 72b18aceb..8e7442548 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -966,7 +966,12 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1000897,'Alright, keep me protected while I plant this disruptor. This shouldn\'t take very long...',0,0,0,0,'demolitionist SAY_DISRUPTOR'), (-1000898,'Protect the conduit! Stop the intruders!',0,0,0,0,'nexus stalkers SAY_PROTECT'), (-1000899,'Done! Back up! Back up!',0,0,0,0,'demolitionist SAY_FINISH_1'), -(-1000900,'Looks like my work here is done. Report to the holo-image of Ameer over at the transporter.',0,0,0,1,'demolitionist SAY_FINISH_2'); +(-1000900,'Looks like my work here is done. Report to the holo-image of Ameer over at the transporter.',0,0,0,1,'demolitionist SAY_FINISH_2'), + +(-1000901,'Thanks, friend. Will you help me get out of here?',0,0,0,1,'vanguard SAY_VANGUARD_INTRO'), +(-1000902,'We\'re not too far from the Protectorate Watch Post, $N. This way!',0,0,0,1,'vanguard SAY_VANGUARD_START'), +(-1000903,'Commander! This fleshling rescued me!',0,0,0,0,'vanguard SAY_VANGUARD_FINISH'), +(-1000904,'%s salutes $N.',0,2,0,0,'vanguard EMOTE_VANGUARD_FINISH'); -- -1 033 000 SHADOWFANG KEEP INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES @@ -7017,4 +7022,26 @@ INSERT INTO script_waypoint VALUES (20802, 12, 3872.463, 2323.114, 114.671, 0, 'escort paused - SAY_DISRUPTOR'), (20802, 13, 3863.740, 2349.790, 115.382, 0, 'SAY_FINISH_2'); +DELETE FROM script_waypoint WHERE entry=20763; +INSERT INTO script_waypoint VALUES +(20763, 0, 4084.092, 2297.254, 110.277, 0, ''), +(20763, 1, 4107.174, 2294.916, 106.625, 0, ''), +(20763, 2, 4154.129, 2296.789, 102.331, 0, ''), +(20763, 3, 4166.021, 2302.819, 103.422, 0, ''), +(20763, 4, 4195.039, 2301.094, 113.786, 0, ''), +(20763, 5, 4205.246, 2297.116, 117.992, 0, ''), +(20763, 6, 4230.429, 2294.642, 127.307, 0, ''), +(20763, 7, 4238.981, 2293.579, 129.332, 0, ''), +(20763, 8, 4250.184, 2293.272, 129.009, 0, ''), +(20763, 9, 4262.810, 2290.768, 126.485, 0, ''), +(20763, 10, 4265.845, 2278.562, 128.235, 0, ''), +(20763, 11, 4265.609, 2265.734, 128.452, 0, ''), +(20763, 12, 4258.838, 2245.354, 132.804, 0, ''), +(20763, 13, 4247.976, 2221.211, 137.668, 0, ''), +(20763, 14, 4247.973, 2213.876, 137.721, 0, ''), +(20763, 15, 4249.876, 2204.265, 137.121, 4000, ''), +(20763, 16, 4249.876, 2204.265, 137.121, 0, 'SAY_VANGUARD_FINISH'), +(20763, 17, 4252.455, 2170.885, 137.677, 3000, 'EMOTE_VANGUARD_FINISH'), +(20763, 18, 4252.455, 2170.885, 137.677, 5000, ''); + -- EOF diff --git a/sql/updates/r2743_mangos.sql b/sql/updates/r2743_mangos.sql new file mode 100644 index 000000000..c5b3652d4 --- /dev/null +++ b/sql/updates/r2743_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_captured_vanguard' WHERE entry=20763; diff --git a/sql/updates/r2743_scriptdev2.sql b/sql/updates/r2743_scriptdev2.sql new file mode 100644 index 000000000..07444dbc8 --- /dev/null +++ b/sql/updates/r2743_scriptdev2.sql @@ -0,0 +1,28 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1000904 AND -1000901; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1000901,'Thanks, friend. Will you help me get out of here?',0,0,0,1,'vanguard SAY_VANGUARD_INTRO'), +(-1000902,'We\'re not too far from the Protectorate Watch Post, $N. This way!',0,0,0,1,'vanguard SAY_VANGUARD_START'), +(-1000903,'Commander! This fleshling rescued me!',0,0,0,0,'vanguard SAY_VANGUARD_FINISH'), +(-1000904,'%s salutes $N.',0,2,0,0,'vanguard EMOTE_VANGUARD_FINISH'); + +DELETE FROM script_waypoint WHERE entry=20763; +INSERT INTO script_waypoint VALUES +(20763, 0, 4084.092, 2297.254, 110.277, 0, ''), +(20763, 1, 4107.174, 2294.916, 106.625, 0, ''), +(20763, 2, 4154.129, 2296.789, 102.331, 0, ''), +(20763, 3, 4166.021, 2302.819, 103.422, 0, ''), +(20763, 4, 4195.039, 2301.094, 113.786, 0, ''), +(20763, 5, 4205.246, 2297.116, 117.992, 0, ''), +(20763, 6, 4230.429, 2294.642, 127.307, 0, ''), +(20763, 7, 4238.981, 2293.579, 129.332, 0, ''), +(20763, 8, 4250.184, 2293.272, 129.009, 0, ''), +(20763, 9, 4262.810, 2290.768, 126.485, 0, ''), +(20763, 10, 4265.845, 2278.562, 128.235, 0, ''), +(20763, 11, 4265.609, 2265.734, 128.452, 0, ''), +(20763, 12, 4258.838, 2245.354, 132.804, 0, ''), +(20763, 13, 4247.976, 2221.211, 137.668, 0, ''), +(20763, 14, 4247.973, 2213.876, 137.721, 0, ''), +(20763, 15, 4249.876, 2204.265, 137.121, 4000, ''), +(20763, 16, 4249.876, 2204.265, 137.121, 0, 'SAY_VANGUARD_FINISH'), +(20763, 17, 4252.455, 2170.885, 137.677, 3000, 'EMOTE_VANGUARD_FINISH'), +(20763, 18, 4252.455, 2170.885, 137.677, 5000, ''); From 500a4a6be67101051667942fa1a50ee6e90bbf20 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Mon, 29 Oct 2012 01:31:27 +0200 Subject: [PATCH 0739/1172] [2744] Improve script for Illidari Council - Black Temple --- .../outland/black_temple/illidari_council.cpp | 665 ++++++++---------- .../black_temple/instance_black_temple.cpp | 3 + sd2_revision_nr.h | 2 +- 3 files changed, 309 insertions(+), 361 deletions(-) diff --git a/scripts/outland/black_temple/illidari_council.cpp b/scripts/outland/black_temple/illidari_council.cpp index 46fb541fb..4abe44e77 100644 --- a/scripts/outland/black_temple/illidari_council.cpp +++ b/scripts/outland/black_temple/illidari_council.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: Illidari_Council -SD%Complete: 85 -SDComment: Circle of Healing not working properly. +SD%Complete: 90 +SDComment: The shared health is done by workaround - proper spells are NYI. SDCategory: Black Temple EndScriptData */ @@ -27,56 +27,38 @@ EndScriptData */ enum { //Speech'n'Sounds + SAY_GATH_AGGRO = -1564069, SAY_GATH_SLAY = -1564085, SAY_GATH_SLAY_COMNT = -1564089, SAY_GATH_DEATH = -1564093, SAY_GATH_SPECIAL1 = -1564077, SAY_GATH_SPECIAL2 = -1564081, + SAY_GATH_BERSERK = -1564073, + SAY_VERA_AGGRO = -1564070, SAY_VERA_SLAY = -1564086, SAY_VERA_COMNT = -1564089, SAY_VERA_DEATH = -1564094, SAY_VERA_SPECIAL1 = -1564078, SAY_VERA_SPECIAL2 = -1564082, + SAY_VERA_BERSERK = -1564074, + SAY_MALA_AGGRO = -1564071, SAY_MALA_SLAY = -1564087, SAY_MALA_COMNT = -1564090, SAY_MALA_DEATH = -1564095, SAY_MALA_SPECIAL1 = -1564079, SAY_MALA_SPECIAL2 = -1564083, + SAY_MALA_BERSERK = -1564075, + SAY_ZERE_AGGRO = -1564072, SAY_ZERE_SLAY = -1564088, SAY_ZERE_COMNT = -1564091, SAY_ZERE_DEATH = -1564096, SAY_ZERE_SPECIAL1 = -1564080, SAY_ZERE_SPECIAL2 = -1564084, -}; - -struct CouncilYells -{ - int32 entry; - uint32 timer; -}; - -static const CouncilYells CouncilAggro[]= -{ - {-1564069, 5000}, // Gathios - {-1564070, 5500}, // Veras - {-1564071, 5000}, // Malande - {-1564072, 0}, // Zerevor -}; + SAY_ZERE_BERSERK = -1564076, -// Need to get proper timers for this later -static const CouncilYells CouncilEnrage[]= -{ - {-1564073, 2000}, // Gathios - {-1564074, 6000}, // Veras - {-1564075, 5000}, // Malande - {-1564076, 0}, // Zerevor -}; - -enum -{ // High Nethermancer Zerevor's spells SPELL_FLAMESTRIKE = 41481, SPELL_BLIZZARD = 41482, @@ -89,7 +71,6 @@ enum SPELL_CIRCLE_OF_HEALING = 41455, SPELL_REFLECTIVE_SHIELD = 41475, SPELL_DIVINE_WRATH = 41472, - SPELL_HEAL_VISUAL = 24171, // Gathios the Shatterer's spells SPELL_BLESS_PROTECTION = 41450, @@ -100,74 +81,78 @@ enum SPELL_SEAL_OF_BLOOD = 41459, SPELL_CHROMATIC_AURA = 41453, SPELL_DEVOTION_AURA = 41452, + SPELL_JUDGMENT = 41467, // triggers 41473 (41470 or 41461) // Veras Darkshadow's spells SPELL_DEADLY_POISON = 41485, SPELL_ENVENOM = 41487, - SPELL_VANISH = 41479, + SPELL_VANISH_TELEPORT = 41479, + SPELL_VANISH = 41476, SPELL_BERSERK = 45078, + //SPELL_BALANCE_OF_POWER = 41341, // procs 41342 on damage - added in c_t_a + SPELL_EMPYREAL_EQUIVALENCY = 41333, + SPELL_EMPYREAL_BALANCE = 41499, +}; + +static const DialogueEntry aCouncilDialogue[] = +{ + {SAY_GATH_AGGRO, NPC_GATHIOS, 5000}, + {SAY_VERA_AGGRO, NPC_VERAS, 5500}, + {SAY_MALA_AGGRO, NPC_LADY_MALANDE, 5000}, + {SAY_ZERE_AGGRO, NPC_ZEREVOR, 0}, + {SAY_GATH_BERSERK, NPC_GATHIOS, 2000}, + {SAY_VERA_BERSERK, NPC_VERAS, 6000}, + {SAY_MALA_BERSERK, NPC_LADY_MALANDE, 5000}, + {SAY_ZERE_BERSERK, NPC_ZEREVOR, 0}, + {0, 0, 0}, }; static const uint32 aCouncilMember[] = {NPC_GATHIOS, NPC_VERAS, NPC_LADY_MALANDE, NPC_ZEREVOR}; +/*###### +## mob_blood_elf_council_voice_trigger +######*/ + struct MANGOS_DLL_DECL mob_blood_elf_council_voice_triggerAI : public ScriptedAI { - mob_blood_elf_council_voice_triggerAI(Creature* pCreature) : ScriptedAI(pCreature) + mob_blood_elf_council_voice_triggerAI(Creature* pCreature) : ScriptedAI(pCreature), + m_councilDialogue(aCouncilDialogue) { m_pInstance = (ScriptedInstance*)(m_creature->GetInstanceData()); + m_councilDialogue.InitializeDialogueHelper(m_pInstance); Reset(); } + ScriptedInstance* m_pInstance; + DialogueHelper m_councilDialogue; uint32 m_uiEnrageTimer; uint32 m_uiAggroYellTimer; - uint8 m_uiYellCounter; // Serves as the counter for both the aggro and enrage yells - - bool m_bEventStarted; - - void StartVoiceEvent() + void Reset() { - if (!m_pInstance) - return; - - m_bEventStarted = true; + m_uiEnrageTimer = 0; + m_uiAggroYellTimer = 0; } - void Reset() + void StartVoiceEvent() { - m_uiEnrageTimer = 15*MINUTE*IN_MILLISECONDS; // 15 minutes m_uiAggroYellTimer = 500; - m_uiYellCounter = 0; - - m_bEventStarted = false; + m_uiEnrageTimer = 15*MINUTE*IN_MILLISECONDS; } - void AttackStart(Unit* pWho) {} - void MoveInLineOfSight(Unit* pWho) {} - void UpdateAI(const uint32 uiDiff) { - if (!m_bEventStarted) - return; - - if (m_uiYellCounter > 3) - return; + m_councilDialogue.DialogueUpdate(uiDiff); if (m_uiAggroYellTimer) { if (m_uiAggroYellTimer <= uiDiff) { - if (Creature* pMember = m_pInstance->GetSingleCreatureFromStorage(aCouncilMember[m_uiYellCounter])) - { - DoScriptText(CouncilAggro[m_uiYellCounter].entry, pMember); - m_uiAggroYellTimer = CouncilAggro[m_uiYellCounter].timer; - } - ++m_uiYellCounter; - - if (m_uiYellCounter > 3) - m_uiYellCounter = 0; // Reuse for Enrage Yells + // Start yells + m_councilDialogue.StartNextDialogueText(SAY_GATH_AGGRO); + m_uiAggroYellTimer = 0; } else m_uiAggroYellTimer -= uiDiff; @@ -177,13 +162,15 @@ struct MANGOS_DLL_DECL mob_blood_elf_council_voice_triggerAI : public ScriptedAI { if (m_uiEnrageTimer <= uiDiff) { - if (Creature* pMember = m_pInstance->GetSingleCreatureFromStorage(aCouncilMember[m_uiYellCounter])) + // Cast berserk on all members + for (uint8 i = 0; i < 4; ++i) { - pMember->CastSpell(pMember, SPELL_BERSERK, true); - DoScriptText(CouncilEnrage[m_uiYellCounter].entry, pMember); - m_uiEnrageTimer = CouncilEnrage[m_uiYellCounter].timer; + if (Creature* pMember = m_pInstance->GetSingleCreatureFromStorage(aCouncilMember[i])) + pMember->CastSpell(pMember, SPELL_BERSERK, true); } - ++m_uiYellCounter; + // Start yells + m_councilDialogue.StartNextDialogueText(SAY_GATH_BERSERK); + m_uiEnrageTimer = 0; } else m_uiEnrageTimer -= uiDiff; @@ -191,6 +178,10 @@ struct MANGOS_DLL_DECL mob_blood_elf_council_voice_triggerAI : public ScriptedAI } }; +/*###### +## mob_illidari_council +######*/ + struct MANGOS_DLL_DECL mob_illidari_councilAI : public ScriptedAI { mob_illidari_councilAI(Creature* pCreature) : ScriptedAI(pCreature) @@ -201,150 +192,80 @@ struct MANGOS_DLL_DECL mob_illidari_councilAI : public ScriptedAI ScriptedInstance* m_pInstance; - uint32 m_uiCheckTimer; - uint32 m_uiEndEventTimer; - - uint8 m_uiDeathCount; + uint32 m_uiEquivalencyTimer; bool m_bEventBegun; + bool m_bEventEnd; void Reset() { - m_uiCheckTimer = 2000; - m_uiEndEventTimer = 0; - - m_uiDeathCount = 0; - m_bEventBegun = false; + m_bEventEnd = false; - m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - m_creature->SetDisplayId(11686); - - if (m_pInstance) - { - // If already done, not do anything - if (m_pInstance->GetData(TYPE_COUNCIL) == DONE) - return; - - if (Creature* VoiceTrigger = m_pInstance->GetSingleCreatureFromStorage(NPC_COUNCIL_VOICE)) - VoiceTrigger->AI()->EnterEvadeMode(); - - m_pInstance->SetData(TYPE_COUNCIL, NOT_STARTED); - - for(uint8 i = 0; i < 4; ++i) - { - if (Creature* pMember = m_pInstance->GetSingleCreatureFromStorage(aCouncilMember[i])) - { - if (!pMember->isAlive()) - { - pMember->RemoveCorpse(); - pMember->Respawn(); - } - pMember->AI()->EnterEvadeMode(); - } - } - } + m_uiEquivalencyTimer = urand(2000, 3000); } - void AttackStart(Unit* pWho) {} - void MoveInLineOfSight(Unit* pWho) {} - - void StartEvent(Unit* pTarget) + void DoStartEvent() { - if (!m_pInstance) + if (!m_pInstance || m_bEventBegun) return; - if (pTarget && pTarget->isAlive() && !m_bEventBegun) - { - // Prevent further handling for next council uiMember aggroing - m_bEventBegun = true; + // Prevent further handling for next council uiMember aggroing + m_bEventBegun = true; - // Start the event for the Voice Trigger - if (Creature* pVoiceTrigger = m_pInstance->GetSingleCreatureFromStorage(NPC_COUNCIL_VOICE)) - { - if (mob_blood_elf_council_voice_triggerAI* pVoiceAI = dynamic_cast(pVoiceTrigger->AI())) - pVoiceAI->StartVoiceEvent(); - } - - for(uint8 i = 0; i < 4; ++i) - { - Creature* pMember = m_pInstance->GetSingleCreatureFromStorage(aCouncilMember[i]); - if (pMember && pMember->isAlive() && !pMember->isInCombat()) - pMember->AI()->AttackStart(pTarget); - } - - // All are set into combat now, Set Instance Data - m_pInstance->SetData(TYPE_COUNCIL, IN_PROGRESS); + // Start the event for the Voice Trigger + if (Creature* pVoiceTrigger = m_pInstance->GetSingleCreatureFromStorage(NPC_COUNCIL_VOICE)) + { + if (mob_blood_elf_council_voice_triggerAI* pVoiceAI = dynamic_cast(pVoiceTrigger->AI())) + pVoiceAI->StartVoiceEvent(); } + + DoCastSpellIfCan(m_creature, SPELL_EMPYREAL_BALANCE); } - void UpdateAI(const uint32 diff) + void DoEndEvent() { - if (!m_bEventBegun) // Can only be true when m_pInstance is valid + if (!m_pInstance || m_bEventEnd) return; - if (m_uiEndEventTimer) - { - if (m_uiEndEventTimer <= diff) - { - if (m_uiDeathCount > 3) - { - if (Creature* VoiceTrigger = m_pInstance->GetSingleCreatureFromStorage(NPC_COUNCIL_VOICE)) - VoiceTrigger->DealDamage(VoiceTrigger, VoiceTrigger->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); - - m_pInstance->SetData(TYPE_COUNCIL, DONE); + // Prevent further handling for next council uiMember death + m_bEventEnd = true; - m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); - return; - } + // Kill all the other council members + for (uint8 i = 0; i < 4; ++i) + { + Creature* pMember = m_pInstance->GetSingleCreatureFromStorage(aCouncilMember[i]); + if (pMember && pMember->isAlive()) + pMember->DealDamage(pMember, pMember->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + } - Creature* pMember = m_pInstance->GetSingleCreatureFromStorage(aCouncilMember[m_uiDeathCount]); - if (pMember && pMember->isAlive()) - pMember->DealDamage(pMember, pMember->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + // Self kill the voice trigger and the controller + if (Creature* pVoiceTrigger = m_pInstance->GetSingleCreatureFromStorage(NPC_COUNCIL_VOICE)) + pVoiceTrigger->DealDamage(pVoiceTrigger, pVoiceTrigger->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); - ++m_uiDeathCount; - m_uiEndEventTimer = 1500; - } - else - m_uiEndEventTimer -= diff; - } + m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + } - if (m_uiCheckTimer) + void UpdateAI(const uint32 uiDiff) + { + // Make the council members health equal every 2-3 secs + if (m_bEventBegun && !m_bEventEnd) { - if (m_uiCheckTimer <= diff) + if (m_uiEquivalencyTimer < uiDiff) { - uint8 EvadeCheck = 0; - for(uint8 i = 0; i < 4; ++i) - { - if (Creature* Member = m_pInstance->GetSingleCreatureFromStorage(aCouncilMember[i])) - { - // This is the evade/death check. - if (Member->isAlive() && !Member->SelectHostileTarget()) - ++EvadeCheck; // If all members evade, we reset so that players can properly reset the event - else if (!Member->isAlive()) // If even one uiMember dies, kill the rest, set instance data, and kill self. - { - m_uiEndEventTimer = 1000; - m_uiCheckTimer = 0; - return; - } - } - } - - if (EvadeCheck > 3) - { - m_pInstance->SetData(TYPE_COUNCIL, FAIL); - Reset(); - } - - m_uiCheckTimer = 2000; + if (DoCastSpellIfCan(m_creature, SPELL_EMPYREAL_EQUIVALENCY) == CAST_OK) + m_uiEquivalencyTimer = urand(2000, 3000); } else - m_uiCheckTimer -= diff; + m_uiEquivalencyTimer -= uiDiff; } } }; +/*###### +## boss_illidari_council +######*/ + struct MANGOS_DLL_DECL boss_illidari_councilAI : public ScriptedAI { boss_illidari_councilAI(Creature* pCreature) : ScriptedAI(pCreature) @@ -358,36 +279,74 @@ struct MANGOS_DLL_DECL boss_illidari_councilAI : public ScriptedAI { if (m_pInstance) { + // Note: council aggro handled by creature linking + if (Creature* pController = m_pInstance->GetSingleCreatureFromStorage(NPC_ILLIDARI_COUNCIL)) { if (mob_illidari_councilAI* pControlAI = dynamic_cast(pController->AI())) - pControlAI->StartEvent(pWho); + pControlAI->DoStartEvent(); } + + m_pInstance->SetData(TYPE_COUNCIL, IN_PROGRESS); + } + } + + void JustDied(Unit* pKiller) + { + if (m_pInstance) + { + if (Creature* pController = m_pInstance->GetSingleCreatureFromStorage(NPC_ILLIDARI_COUNCIL)) + { + if (mob_illidari_councilAI* pControlAI = dynamic_cast(pController->AI())) + pControlAI->DoEndEvent(); + } + + m_pInstance->SetData(TYPE_COUNCIL, DONE); + } + } + + void JustReachedHome() + { + if (m_pInstance) + { + // Note: council respawn handled by creature linking + + if (Creature* pVoiceTrigger = m_pInstance->GetSingleCreatureFromStorage(NPC_COUNCIL_VOICE)) + pVoiceTrigger->AI()->EnterEvadeMode(); + + if (Creature* pController = m_pInstance->GetSingleCreatureFromStorage(NPC_ILLIDARI_COUNCIL)) + pController->AI()->EnterEvadeMode(); + + m_pInstance->SetData(TYPE_COUNCIL, FAIL); } - else - EnterEvadeMode(); } - void DamageTaken(Unit* done_by, uint32 &damage) + // ##### Workaround for missing spell aura proc 41342 - Remove when this is implemented in core ##### + void DamageTaken(Unit* pDoneBy, uint32 &uiDamage) { - if (done_by == m_creature) + if (pDoneBy == m_creature) return; - damage /= 4; + uiDamage /= 4; if (!m_pInstance) return; - for(uint8 i = 0; i < 4; ++i) + for (uint8 i = 0; i < 4; ++i) { if (Creature* pCouncil = m_pInstance->GetSingleCreatureFromStorage(aCouncilMember[i])) { - if (pCouncil != m_creature && damage < pCouncil->GetHealth()) - pCouncil->SetHealth(pCouncil->GetHealth() - damage); + if (pCouncil != m_creature && uiDamage < pCouncil->GetHealth()) + pCouncil->SetHealth(pCouncil->GetHealth() - uiDamage); } } } + // ##### End of workaround ##### }; +/*###### +## boss_gathios_the_shatterer +######*/ + struct MANGOS_DLL_DECL boss_gathios_the_shattererAI : public boss_illidari_councilAI { boss_gathios_the_shattererAI(Creature* pCreature) : boss_illidari_councilAI(pCreature) { Reset(); } @@ -397,14 +356,16 @@ struct MANGOS_DLL_DECL boss_gathios_the_shattererAI : public boss_illidari_counc uint32 m_uiSealTimer; uint32 m_uiAuraTimer; uint32 m_uiBlessingTimer; + uint32 m_uiJudgmentTimer; void Reset() { - m_uiConsecrationTimer = 40000; - m_uiHammerOfJusticeTimer = 10000; - m_uiSealTimer = 40000; - m_uiAuraTimer = 90000; - m_uiBlessingTimer = 60000; + m_uiConsecrationTimer = 40000; + m_uiHammerOfJusticeTimer = 10000; + m_uiSealTimer = 40000; + m_uiAuraTimer = 90000; + m_uiBlessingTimer = 60000; + m_uiJudgmentTimer = 0; } void KilledUnit(Unit* pVictim) @@ -415,45 +376,8 @@ struct MANGOS_DLL_DECL boss_gathios_the_shattererAI : public boss_illidari_counc void JustDied(Unit* pKiller) { DoScriptText(SAY_GATH_DEATH, m_creature); - } - - Unit* SelectCouncilMember() - { - if (!m_pInstance) - return m_creature; - - Unit* pUnit = m_creature; - uint32 uiMember = 2; // He chooses Lady Malande most often - if (!urand(0, 9)) // But there is a chance he picks someone else. - { - uiMember += urand(1, 3); - uiMember %= 4; - } - - if (uiMember != 0) // No need to create another pointer - pUnit = m_pInstance->GetSingleCreatureFromStorage(aCouncilMember[uiMember]); - - return pUnit; - } - - void CastAuraOnCouncil() - { - uint32 uiSpellid = 0; - switch(urand(0, 1)) - { - case 0: uiSpellid = SPELL_DEVOTION_AURA; break; - case 1: uiSpellid = SPELL_CHROMATIC_AURA; break; - } - - if (!m_pInstance) - return; - - for(uint8 i = 0; i < 4; ++i) - { - if (Creature* pCouncil = m_pInstance->GetSingleCreatureFromStorage(aCouncilMember[i])) - pCouncil->CastSpell(pCouncil, uiSpellid, true, NULL, NULL, m_creature->GetObjectGuid()); - } + boss_illidari_councilAI::JustDied(pKiller); } void UpdateAI(const uint32 uiDiff) @@ -463,32 +387,29 @@ struct MANGOS_DLL_DECL boss_gathios_the_shattererAI : public boss_illidari_counc if (m_uiBlessingTimer < uiDiff) { - if (Unit* pUnit = SelectCouncilMember()) - DoCastSpellIfCan(pUnit, urand(0, 1) ? SPELL_BLESS_SPELLWARD : SPELL_BLESS_PROTECTION); - - m_uiBlessingTimer = 60000; + if (Unit* pTarget = DoSelectLowestHpFriendly(80.0f)) + { + if (DoCastSpellIfCan(pTarget, urand(0, 1) ? SPELL_BLESS_SPELLWARD : SPELL_BLESS_PROTECTION) == CAST_OK) + m_uiBlessingTimer = 60000; + } } else m_uiBlessingTimer -= uiDiff; if (m_uiConsecrationTimer < uiDiff) { - DoCastSpellIfCan(m_creature, SPELL_CONSECRATION); - m_uiConsecrationTimer = 40000; + if (DoCastSpellIfCan(m_creature, SPELL_CONSECRATION) == CAST_OK) + m_uiConsecrationTimer = urand(10000, 15000); } else m_uiConsecrationTimer -= uiDiff; if (m_uiHammerOfJusticeTimer < uiDiff) { - if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0, SPELL_HAMMER_OF_JUSTICE, SELECT_FLAG_PLAYER | SELECT_FLAG_NOT_IN_MELEE_RANGE)) { - // is in ~10-40 yd range - if (m_creature->IsInRange(target, 10.0f, 40.0f, false)) - { - DoCastSpellIfCan(target, SPELL_HAMMER_OF_JUSTICE); + if (DoCastSpellIfCan(pTarget, SPELL_HAMMER_OF_JUSTICE) == CAST_OK) m_uiHammerOfJusticeTimer = 20000; - } } } else @@ -496,24 +417,44 @@ struct MANGOS_DLL_DECL boss_gathios_the_shattererAI : public boss_illidari_counc if (m_uiSealTimer < uiDiff) { - DoCastSpellIfCan(m_creature, urand(0, 1) ? SPELL_SEAL_OF_COMMAND : SPELL_SEAL_OF_BLOOD); - m_uiSealTimer = 40000; + if (DoCastSpellIfCan(m_creature, urand(0, 1) ? SPELL_SEAL_OF_COMMAND : SPELL_SEAL_OF_BLOOD) == CAST_OK) + { + m_uiSealTimer = 40000; + + if (urand(0, 1)) + m_uiJudgmentTimer = urand(4000, 7000); + } } else m_uiSealTimer -= uiDiff; if (m_uiAuraTimer < uiDiff) { - CastAuraOnCouncil(); - m_uiAuraTimer = 90000; + if (DoCastSpellIfCan(m_creature, urand(0, 1) ? SPELL_DEVOTION_AURA : SPELL_CHROMATIC_AURA) == CAST_OK) + m_uiAuraTimer = 90000; } else m_uiAuraTimer -= uiDiff; + if (m_uiJudgmentTimer) + { + if (m_uiJudgmentTimer <= uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_JUDGMENT) == CAST_OK) + m_uiJudgmentTimer = 0; + } + else + m_uiJudgmentTimer -= uiDiff; + } + DoMeleeAttackIfReady(); } }; +/*###### +## boss_high_nethermancer_zerevor +######*/ + struct MANGOS_DLL_DECL boss_high_nethermancer_zerevorAI : public boss_illidari_councilAI { boss_high_nethermancer_zerevorAI(Creature* pCreature) : boss_illidari_councilAI(pCreature) { Reset(); } @@ -522,17 +463,26 @@ struct MANGOS_DLL_DECL boss_high_nethermancer_zerevorAI : public boss_illidari_c uint32 m_uiFlamestrikeTimer; uint32 m_uiArcaneBoltTimer; uint32 m_uiDampenMagicTimer; - uint32 m_uiCooldown; uint32 m_uiArcaneExplosionTimer; void Reset() { - m_uiBlizzardTimer = urand(30000, 90000); - m_uiFlamestrikeTimer = urand(30000, 90000); - m_uiArcaneBoltTimer = 10000; - m_uiDampenMagicTimer = 2000; - m_uiArcaneExplosionTimer = 14000; - m_uiCooldown = 0; + m_uiBlizzardTimer = urand(10000, 20000); + m_uiFlamestrikeTimer = urand(10000, 20000); + m_uiArcaneBoltTimer = 3000; + m_uiDampenMagicTimer = 2000; + m_uiArcaneExplosionTimer = 13000; + } + + void AttackStart(Unit* pWho) + { + if (m_creature->Attack(pWho, true)) + { + m_creature->AddThreat(pWho); + m_creature->SetInCombatWith(pWho); + pWho->SetInCombatWith(m_creature); + DoStartMovement(pWho, 20.0f); + } } void KilledUnit(Unit* pVictim) @@ -543,6 +493,8 @@ struct MANGOS_DLL_DECL boss_high_nethermancer_zerevorAI : public boss_illidari_c void JustDied(Unit* pKiller) { DoScriptText(SAY_ZERE_DEATH, m_creature); + + boss_illidari_councilAI::JustDied(pKiller); } void UpdateAI(const uint32 uiDiff) @@ -550,53 +502,39 @@ struct MANGOS_DLL_DECL boss_high_nethermancer_zerevorAI : public boss_illidari_c if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - if (m_uiCooldown) - { - if (m_uiCooldown < uiDiff) - m_uiCooldown = 0; - else - { - m_uiCooldown -= uiDiff; - return; // Don't cast any other spells if global cooldown is still ticking - } - } - if (m_uiDampenMagicTimer < uiDiff) { - DoCastSpellIfCan(m_creature, SPELL_DAMPEN_MAGIC); - m_uiCooldown = 1000; - m_uiDampenMagicTimer = 110000; // Almost 2 minutes - m_uiArcaneBoltTimer += 1000; // Give the Mage some time to spellsteal Dampen. + if (DoCastSpellIfCan(m_creature, SPELL_DAMPEN_MAGIC) == CAST_OK) + m_uiDampenMagicTimer = 110000; // Almost 2 minutes } else m_uiDampenMagicTimer -= uiDiff; if (m_uiArcaneExplosionTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_ARCANE_EXPLOSION); - m_uiCooldown = 1000; - m_uiArcaneExplosionTimer = 14000; + if (DoCastSpellIfCan(m_creature, SPELL_ARCANE_EXPLOSION) == CAST_OK) + m_uiArcaneExplosionTimer = urand(5000, 15000); } else m_uiArcaneExplosionTimer -= uiDiff; if (m_uiArcaneBoltTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_ARCANE_BOLT); - m_uiArcaneBoltTimer = 3000; - m_uiCooldown = 2000; + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_ARCANE_BOLT) == CAST_OK) + m_uiArcaneBoltTimer = 3000; } else m_uiArcaneBoltTimer -= uiDiff; if (m_uiBlizzardTimer < uiDiff) { - if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) { - DoCastSpellIfCan(target, SPELL_BLIZZARD); - m_uiBlizzardTimer = urand(45000, 90000); - m_uiFlamestrikeTimer += 10000; - m_uiCooldown = 1000; + if (DoCastSpellIfCan(pTarget, SPELL_BLIZZARD) == CAST_OK) + { + m_uiBlizzardTimer = urand(5000, 15000); + m_uiFlamestrikeTimer += 5000; + } } } else @@ -604,12 +542,13 @@ struct MANGOS_DLL_DECL boss_high_nethermancer_zerevorAI : public boss_illidari_c if (m_uiFlamestrikeTimer < uiDiff) { - if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) { - DoCastSpellIfCan(target, SPELL_FLAMESTRIKE); - m_uiFlamestrikeTimer = urand(55000, 100000); - m_uiBlizzardTimer += 10000; - m_uiCooldown = 2000; + if (DoCastSpellIfCan(pTarget, SPELL_FLAMESTRIKE) == CAST_OK) + { + m_uiFlamestrikeTimer = urand(5000, 15000); + m_uiBlizzardTimer += 5000; + } } } else @@ -617,6 +556,10 @@ struct MANGOS_DLL_DECL boss_high_nethermancer_zerevorAI : public boss_illidari_c } }; +/*###### +## boss_lady_malande +######*/ + struct MANGOS_DLL_DECL boss_lady_malandeAI : public boss_illidari_councilAI { boss_lady_malandeAI(Creature* pCreature) : boss_illidari_councilAI(pCreature) { Reset(); } @@ -628,10 +571,21 @@ struct MANGOS_DLL_DECL boss_lady_malandeAI : public boss_illidari_councilAI void Reset() { - m_uiEmpoweredSmiteTimer = 38000; - m_uiCircleOfHealingTimer = 20000; - m_uiDivineWrathTimer = 40000; - m_uiReflectiveShieldTimer = 0; + m_uiEmpoweredSmiteTimer = 10000; + m_uiCircleOfHealingTimer = 20000; + m_uiDivineWrathTimer = 5000; + m_uiReflectiveShieldTimer = 0; + } + + void AttackStart(Unit* pWho) + { + if (m_creature->Attack(pWho, true)) + { + m_creature->AddThreat(pWho); + m_creature->SetInCombatWith(pWho); + pWho->SetInCombatWith(m_creature); + DoStartMovement(pWho, 20.0f); + } } void KilledUnit(Unit* pVictim) @@ -642,6 +596,8 @@ struct MANGOS_DLL_DECL boss_lady_malandeAI : public boss_illidari_councilAI void JustDied(Unit* pKiller) { DoScriptText(SAY_MALA_DEATH, m_creature); + + boss_illidari_councilAI::JustDied(pKiller); } void UpdateAI(const uint32 uiDiff) @@ -653,8 +609,8 @@ struct MANGOS_DLL_DECL boss_lady_malandeAI : public boss_illidari_councilAI { if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) { - DoCastSpellIfCan(pTarget, SPELL_EMPOWERED_SMITE); - m_uiEmpoweredSmiteTimer = 38000; + if (DoCastSpellIfCan(pTarget, SPELL_EMPOWERED_SMITE) == CAST_OK) + m_uiEmpoweredSmiteTimer = urand(5000, 15000); } } else @@ -662,19 +618,18 @@ struct MANGOS_DLL_DECL boss_lady_malandeAI : public boss_illidari_councilAI if (m_uiCircleOfHealingTimer < uiDiff) { - //Currently bugged and puts Malande on the threatlist of the other council members. It also heals players. - //DoCastSpellIfCan(m_creature, SPELL_CIRCLE_OF_HEALING); - m_uiCircleOfHealingTimer = 60000; + if (DoCastSpellIfCan(m_creature, SPELL_CIRCLE_OF_HEALING) == CAST_OK) + m_uiCircleOfHealingTimer = 20000; } else m_uiCircleOfHealingTimer -= uiDiff; if (m_uiDivineWrathTimer < uiDiff) { - if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) { - DoCastSpellIfCan(target, SPELL_DIVINE_WRATH); - m_uiDivineWrathTimer = urand(40000, 80000); + if (DoCastSpellIfCan(pTarget, SPELL_DIVINE_WRATH) == CAST_OK) + m_uiDivineWrathTimer = urand(2000, 5000); } } else @@ -682,8 +637,8 @@ struct MANGOS_DLL_DECL boss_lady_malandeAI : public boss_illidari_councilAI if (m_uiReflectiveShieldTimer < uiDiff) { - DoCastSpellIfCan(m_creature, SPELL_REFLECTIVE_SHIELD); - m_uiReflectiveShieldTimer = 65000; + if (DoCastSpellIfCan(m_creature, SPELL_REFLECTIVE_SHIELD) == CAST_OK) + m_uiReflectiveShieldTimer = urand(30000, 40000); } else m_uiReflectiveShieldTimer -= uiDiff; @@ -692,25 +647,25 @@ struct MANGOS_DLL_DECL boss_lady_malandeAI : public boss_illidari_councilAI } }; +/*###### +## boss_veras_darkshadow +######*/ + struct MANGOS_DLL_DECL boss_veras_darkshadowAI : public boss_illidari_councilAI { boss_veras_darkshadowAI(Creature* pCreature) : boss_illidari_councilAI(pCreature) { Reset(); } uint32 m_uiDeadlyPoisonTimer; uint32 m_uiVanishTimer; - uint32 m_uiAppearEnvenomTimer; - - bool m_bHasVanished; + uint32 m_uiVanishEndtimer; + uint32 m_uiEnvenomTimer; void Reset() { - m_uiDeadlyPoisonTimer = 20000; - m_uiVanishTimer = urand(60000, 120000); - m_uiAppearEnvenomTimer = 150000; - - m_bHasVanished = false; - m_creature->SetVisibility(VISIBILITY_ON); - m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + m_uiDeadlyPoisonTimer = 1000; + m_uiVanishTimer = urand(30000, 40000); + m_uiEnvenomTimer = 5000; + m_uiVanishEndtimer = 0; } void KilledUnit(Unit* pVictim) @@ -721,6 +676,16 @@ struct MANGOS_DLL_DECL boss_veras_darkshadowAI : public boss_illidari_councilAI void JustDied(Unit* pKiller) { DoScriptText(SAY_VERA_DEATH, m_creature); + + boss_illidari_councilAI::JustDied(pKiller); + } + + void EnterEvadeMode() + { + if (m_uiVanishEndtimer) + return; + + ScriptedAI::EnterEvadeMode(); } void UpdateAI(const uint32 uiDiff) @@ -728,71 +693,51 @@ struct MANGOS_DLL_DECL boss_veras_darkshadowAI : public boss_illidari_councilAI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - if (!m_bHasVanished) + if (m_uiVanishEndtimer) { - if (m_uiDeadlyPoisonTimer < uiDiff) + if (m_uiVanishEndtimer <= uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_DEADLY_POISON); - m_uiDeadlyPoisonTimer = urand(15000, 45000); - } - else - m_uiDeadlyPoisonTimer -= uiDiff; - - if (m_uiAppearEnvenomTimer < uiDiff) // Cast Envenom. This is cast 4 seconds after Vanish is over - { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_ENVENOM); - m_uiAppearEnvenomTimer = 90000; - } - else - m_uiAppearEnvenomTimer -= uiDiff; - - if (m_uiVanishTimer < uiDiff) // Disappear and stop attacking, but follow a random unit - { - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + if (DoCastSpellIfCan(m_creature, SPELL_VANISH_TELEPORT) == CAST_OK) { - m_uiVanishTimer = 30000; - m_uiAppearEnvenomTimer= 28000; - m_bHasVanished = true; - m_creature->SetVisibility(VISIBILITY_OFF); - m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); DoResetThreat(); - // Chase a unit. Check before DoMeleeAttackIfReady prevents from attacking - m_creature->AddThreat(pTarget, 500000.0f); - m_creature->GetMotionMaster()->MoveChase(pTarget); + m_uiVanishEndtimer = 0; } } else - m_uiVanishTimer -= uiDiff; + m_uiVanishEndtimer -= uiDiff; - DoMeleeAttackIfReady(); + // no more abilities during vanish + return; + } + + if (m_uiDeadlyPoisonTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_DEADLY_POISON) == CAST_OK) + m_uiDeadlyPoisonTimer = urand(4000, 7000); } else + m_uiDeadlyPoisonTimer -= uiDiff; + + if (m_uiEnvenomTimer < uiDiff) { - if (m_uiVanishTimer < uiDiff) // Become attackable and poison current target - { - Unit* target = m_creature->getVictim(); - DoCastSpellIfCan(target, SPELL_DEADLY_POISON); - m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - DoResetThreat(); - m_creature->AddThreat(target, 3000.0f); // Make Veras attack his pTarget for a while, he will cast Envenom 4 seconds after. - m_uiDeadlyPoisonTimer += 6000; - m_uiVanishTimer = 90000; - m_uiAppearEnvenomTimer = 4000; - m_bHasVanished = false; - } - else - m_uiVanishTimer -= uiDiff; + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_ENVENOM) == CAST_OK) + m_uiEnvenomTimer = 5000; + } + else + m_uiEnvenomTimer -= uiDiff; - if (m_uiAppearEnvenomTimer < uiDiff) // Appear 2 seconds before becoming attackable (Shifting out of vanish) + if (m_uiVanishTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_VANISH) == CAST_OK) { - m_creature->GetMotionMaster()->Clear(); - m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); - m_creature->SetVisibility(VISIBILITY_ON); - m_uiAppearEnvenomTimer = 6000; + m_uiVanishTimer = urand(30000, 40000); + m_uiVanishEndtimer = 1000; } - else - m_uiAppearEnvenomTimer -= uiDiff; } + else + m_uiVanishTimer -= uiDiff; + + DoMeleeAttackIfReady(); } }; diff --git a/scripts/outland/black_temple/instance_black_temple.cpp b/scripts/outland/black_temple/instance_black_temple.cpp index 50457c057..c6a2d6694 100644 --- a/scripts/outland/black_temple/instance_black_temple.cpp +++ b/scripts/outland/black_temple/instance_black_temple.cpp @@ -194,6 +194,9 @@ void instance_black_temple::SetData(uint32 uiType, uint32 uiData) m_auiEncounter[uiType] = uiData; break; case TYPE_COUNCIL: + // Don't set the same data twice + if (m_auiEncounter[uiType] == uiData) + return; DoUseDoorOrButton(GO_COUNCIL_DOOR); m_auiEncounter[uiType] = uiData; break; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 9c608ccf7..550b4f91f 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2743" + #define SD2_REVISION_NR "2744" #endif // __SD2_REVISION_NR_H__ From f212e92f2d0bc513345b4a59babd5110300dd337 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sat, 3 Nov 2012 02:19:29 +0200 Subject: [PATCH 0740/1172] [2745] Rewrite script for Illidan Stormrage - Black Temple Changes: * removed all spell hacks * transform Akama AI into an escort AI for better movement control * implement Akama intro event * improve timers * improve flight phase - transitions and Flames of Azzinoth * improve demon phase transition and timers * fix the cage trap * improve epilogue to blizzlike levels * fix texts and emotes * use the dialogue helper as a generic way to handle cinematic events * handle summons with creature linking * drop useless scripts known issues or missing features: * movement during the flight phase NYI - requires additional research * the eye blast spells require aura stacking exceptions * the range marker aura requires core support --- scripts/outland/black_temple/black_temple.h | 13 +- scripts/outland/black_temple/boss_illidan.cpp | 3283 ++++++----------- .../black_temple/instance_black_temple.cpp | 83 +- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 4 - sql/scriptdev2_script_full.sql | 87 +- sql/updates/r2745_mangos.sql | 4 + sql/updates/r2745_scriptdev2.sql | 74 + 8 files changed, 1429 insertions(+), 2121 deletions(-) create mode 100644 sql/updates/r2745_mangos.sql create mode 100644 sql/updates/r2745_scriptdev2.sql diff --git a/scripts/outland/black_temple/black_temple.h b/scripts/outland/black_temple/black_temple.h index 88e6a9205..5290260da 100644 --- a/scripts/outland/black_temple/black_temple.h +++ b/scripts/outland/black_temple/black_temple.h @@ -31,10 +31,15 @@ enum NPC_GATHIOS = 22949, NPC_VERAS = 22952, NPC_AKAMA = 23089, + NPC_MAIEV_SHADOWSONG = 23197, NPC_ILLIDAN_STORMRAGE = 22917, NPC_ASH_CHANNELER = 23421, NPC_CREATURE_GENERATOR = 23210, + NPC_ILLIDAN_DOOR_TRIGGER = 23412, + NPC_GLAIVE_TARGET = 23448, + NPC_SPIRIT_OF_OLUM = 23411, + NPC_SPIRIT_OF_UDALO = 23410, GO_NAJENTUS_GATE = 185483, GO_SUPREMUS_DOORS = 185882, @@ -59,30 +64,30 @@ class MANGOS_DLL_DECL instance_black_temple : public ScriptedInstance bool IsEncounterInProgress() const; + void OnPlayerEnter(Player* pPlayer); void OnCreatureCreate(Creature* pCreature); void OnObjectCreate(GameObject* pGo); void SetData(uint32 uiType, uint32 uiData); uint32 GetData(uint32 uiType); - uint64 GetData64(uint32 uiData); void GetChannelersGuidList(GuidList &lList) { lList = m_lChannelersGuidList; } void GetGeneratorGuidVector(GuidVector &vVector) { vVector = m_vCreatureGeneratorGuidVector; } + void GetGlaiveTargetGuidVector(GuidVector &vVector) { vVector = m_vGlaiveTargetGuidVector; } const char* Save() { return m_strInstData.c_str(); } void Load(const char* chrIn); private: void DoOpenPreMotherDoor(); + void DoSpawnAkamaIfCan(); uint32 m_auiEncounter[MAX_ENCOUNTER]; std::string m_strInstData; - ObjectGuid m_akamaGuid; // This is the Akama that starts the Illidan encounter. - ObjectGuid m_illidanStormrageGuid; - GuidList m_lChannelersGuidList; GuidVector m_vCreatureGeneratorGuidVector; + GuidVector m_vGlaiveTargetGuidVector; }; #endif diff --git a/scripts/outland/black_temple/boss_illidan.cpp b/scripts/outland/black_temple/boss_illidan.cpp index 528b70f53..15a85ab5f 100644 --- a/scripts/outland/black_temple/boss_illidan.cpp +++ b/scripts/outland/black_temple/boss_illidan.cpp @@ -17,2421 +17,1636 @@ /* ScriptData SDName: Boss_Illidan_Stormrage SD%Complete: 90 -SDComment: +SDComment: Movement during flight phase NYI. Some other fine details may need adjustments. SDCategory: Black Temple EndScriptData */ #include "precompiled.h" #include "black_temple.h" -#include "WorldPacket.h" - -/**** Creature Summon and Recognition IDs ****/ -enum CreatureEntry -{ - EMPTY = 0, - AKAMA = 22990, - ILLIDAN_STORMRAGE = 22917, - BLADE_OF_AZZINOTH = 22996, - FLAME_OF_AZZINOTH = 22997, - MAIEV_SHADOWSONG = 23197, - SHADOW_DEMON = 23375, - DEMON_FIRE = 23069, - FLAME_CRASH = 23336, - ILLIDAN_DOOR_TRIGGER = 23412, - SPIRIT_OF_OLUM = 23411, - SPIRIT_OF_UDALO = 23410, - ILLIDARI_ELITE = 23226, - PARASITIC_SHADOWFIEND = 23498, - CAGE_TRAP_TRIGGER = 23292, -}; - -/************* Quotes and Sounds ***********************/ -// Gossip for when a player clicks Akama -#define GOSSIP_ITEM "We are ready to face Illidan" - -enum -{ - SAY_CONVO_1 = -1564097, - SAY_CONVO_2 = -1564098, - SAY_CONVO_3 = -1564099, - SAY_CONVO_4 = -1564100, - SAY_CONVO_5 = -1564101, - SAY_CONVO_6 = -1564102, - SAY_CONVO_7 = -1564103, - SAY_CONVO_8 = -1564104, - SAY_CONVO_9 = -1564105, - SAY_CONVO_10 = -1564106, - SAY_CONVO_11 = -1564107, - SAY_CONVO_12 = -1564108, - SAY_CONVO_13 = -1564109, - SAY_CONVO_14 = -1564110, - SAY_CONVO_15 = -1564111, - - SAY_TAUNT_1 = -1564112, - SAY_TAUNT_2 = -1564113, - SAY_TAUNT_3 = -1564114, - SAY_TAUNT_4 = -1564115, - - SAY_MAIEV_TAUNT_1 = -1564116, - SAY_MAIEV_TAUNT_2 = -1564117, - SAY_MAIEV_TAUNT_3 = -1564118, - SAY_MAIEV_TAUNT_4 = -1564119, -}; - -//emote only defined if not related to textId (in database) -struct Yells -{ - int32 textId; - uint32 creature, timer, emote; - bool Talk; -}; - -static const Yells aConversation[]= -{ - {SAY_CONVO_1, ILLIDAN_STORMRAGE, 8000, 0, true}, - {0, ILLIDAN_STORMRAGE, 5000, 396, true}, - {SAY_CONVO_2, AKAMA, 7000, 0, true}, - {0, AKAMA, 5000, 66, true}, - {SAY_CONVO_3, ILLIDAN_STORMRAGE, 8000, 0, true}, - {SAY_CONVO_4, AKAMA, 3000, 0, true}, - {0, AKAMA, 2000, 15, true}, - {SAY_CONVO_5, ILLIDAN_STORMRAGE, 3000, 0, true}, - {0, EMPTY, 1000, 0, true}, - {0, EMPTY, 0, 0, false}, - {SAY_CONVO_6, ILLIDAN_STORMRAGE, 8000, 0, true}, - {SAY_CONVO_7, MAIEV_SHADOWSONG, 8000, 0, true}, - {SAY_CONVO_8, ILLIDAN_STORMRAGE, 7000, 0, true}, - {SAY_CONVO_9, MAIEV_SHADOWSONG, 8000, 0, true}, - {SAY_CONVO_10, ILLIDAN_STORMRAGE, 1000, 0, false}, - {SAY_CONVO_11, MAIEV_SHADOWSONG, 6000, 0, true}, - // Emote dead for now. Kill him later - {SAY_CONVO_12, ILLIDAN_STORMRAGE, 22000, 0, true}, - {SAY_CONVO_13, MAIEV_SHADOWSONG, 9000, 0, true}, - {SAY_CONVO_14, MAIEV_SHADOWSONG, 3000, 0, true}, - {SAY_CONVO_15, AKAMA, 8000, 0, true}, - {0, EMPTY, 1000, 0, false} -}; - -static const Yells aRandomTaunts[]= -{ - {SAY_TAUNT_1, ILLIDAN_STORMRAGE, 0, 0, false}, - {SAY_TAUNT_2, ILLIDAN_STORMRAGE, 0, 0, false}, - {SAY_TAUNT_3, ILLIDAN_STORMRAGE, 0, 0, false}, - {SAY_TAUNT_4, ILLIDAN_STORMRAGE, 0, 0, false} -}; - -static const Yells aMaievTaunts[]= -{ - {SAY_MAIEV_TAUNT_1, MAIEV_SHADOWSONG, 0, 0, false}, - {SAY_MAIEV_TAUNT_2, MAIEV_SHADOWSONG, 0, 0, false}, - {SAY_MAIEV_TAUNT_3, MAIEV_SHADOWSONG, 0, 0, false}, - {SAY_MAIEV_TAUNT_4, MAIEV_SHADOWSONG, 0, 0, false} -}; +#include "escort_ai.h" enum { - // Yells for/by Akama - SAY_AKAMA_BEWARE = -1564120, - SAY_AKAMA_MINION = -1564121, - SAY_AKAMA_LEAVE = -1564122, - - // Self explanatory - SAY_KILL1 = -1564123, - SAY_KILL2 = -1564124, - - // I think I'll fly now and let my subordinates take you on - SAY_TAKEOFF = -1564125, - SAY_SUMMONFLAMES = -1564126, - - // When casting Eye Blast. Demon Fire will be appear on places that he casts this - SAY_EYE_BLAST = -1564127, - - // kk, I go big, dark and demon on you. - SAY_MORPH = -1564128, + /************* Quotes and Sounds ***********************/ + // Intro yells and gossip + SAY_AKAMA_BEWARE = -1564120, + SAY_AKAMA_OPEN_DOOR_1 = -1564131, + SAY_AKAMA_OPEN_DOOR_2 = -1564132, + SAY_UDALO_OPEN_DOOR_3 = -1564133, + SAY_OLUM_OPEN_DOOR_4 = -1564134, + + // Gossip for when a player clicks Akama + GOSSIP_ITEM_PREPARE = -3564001, + GOSSIP_ITEM_START_EVENT = -3564002, + TEXT_ID_AKAMA_ILLIDAN_PREPARE = 10465, // ToDo: fix text id - this entry is wrong -> "The time has come to face Illidan, $N. Are you ready?" + TEXT_ID_AKAMA_ILLIDAN_START = 10835, + + // Event speech + SAY_ILLIDAN_SPEECH_1 = -1564097, + SAY_AKAMA_SPEECH_2 = -1564098, + SAY_ILLIDAN_SPEECH_3 = -1564099, + SAY_AKAMA_SPEECH_4 = -1564100, + SAY_ILLIDAN_SPEECH_5 = -1564101, // aggro + SAY_ILLIDAN_MINION = -1564121, + SAY_AKAMA_LEAVE = -1564122, + SAY_ILLIDAN_SPEECH_6 = -1564102, + SAY_MAIEV_SPEECH_7 = -1564103, + SAY_ILLIDAN_SPEECH_8 = -1564104, + SAY_MAIEV_SPEECH_9 = -1564105, + SAY_MAIEV_TRAP = -1564118, + + // Epilogue speech + SAY_MAIEV_EPILOGUE_1 = -1564107, + SAY_ILLIDAN_EPILOGUE_2 = -1564108, + SAY_MAIEV_EPILOGUE_3 = -1564109, + SAY_MAIEV_EPILOGUE_4 = -1564110, + SAY_AKAMA_EPILOGUE_5 = -1564111, + + // Combat yells + SAY_KILL1 = -1564123, + SAY_KILL2 = -1564124, + SAY_TAKEOFF = -1564125, + SAY_SUMMONFLAMES = -1564126, + SAY_EYE_BLAST = -1564127, + SAY_MORPH = -1564128, + SAY_FRENZY = -1564106, + SAY_BERSERK = -1564129, + + // Note: this yells may not be used. Need additional research + SAY_TAUNT_1 = -1564112, + SAY_TAUNT_2 = -1564113, + SAY_TAUNT_3 = -1564114, + SAY_TAUNT_4 = -1564115, + + SAY_MAIEV_TAUNT_1 = -1564116, + SAY_MAIEV_TAUNT_2 = -1564117, + SAY_MAIEV_TAUNT_3 = -1564119, - // I KILL! - SAY_ENRAGE = -1564129, /************** Spells *************/ // Normal Form - SPELL_SHEAR = 41032, // Reduces Max. Health by 60% for 7 seconds. Can stack 19 times. 1.5 second cast - SPELL_FLAME_CRASH = 40832, // Summons an invis/unselect passive mob that has an uiAura of flame in a circle around him. - SPELL_DRAW_SOUL = 40904, // 5k Shadow Damage in front of him. Heals Illidan for 100k health (script effect) - SPELL_PARASITIC_SHADOWFIEND = 41917, // DoT of 3k Shadow every 2 seconds. Lasts 10 seconds. (Script effect: Summon 2 parasites once the debuff has ticked off) - SPELL_SUMMON_PARASITICS = 41915, // Summons 2 Parasitic Shadowfiends on the target. It's supposed to be cast as soon as the Parasitic Shadowfiend debuff is gone, but the spells aren't linked :( - SPELL_AGONIZING_FLAMES = 40932, // 4k fire damage uiInitial to target and anyone w/i 5 yards. PHASE 3 ONLY - SPELL_ENRAGE = 40683, // Increases damage by 50% and attack speed by 30%. 20 seconds, PHASE 5 ONLY + SPELL_SHEAR = 41032, // Reduces Max. Health by 60% for 7 seconds. Can stack 19 times. 1.5 second cast + SPELL_FLAME_CRASH = 40832, // Summons an invis/unselect passive mob that has an uiAura of flame in a circle around him. + SPELL_DRAW_SOUL = 40904, // 5k Shadow Damage in front of him. Heals Illidan for 100k health (script effect) + SPELL_PARASITIC_SHADOWFIEND = 41917, // DoT of 3k Shadow every 2 seconds. Lasts 10 seconds. (Script effect: Summon 2 parasites once the debuff has ticked off) + //SPELL_SUMMON_PARASITICS = 41915, // Summons 2 Parasitic Shadowfiends on the target. Handled in core. + SPELL_AGONIZING_FLAMES = 40834, // triggers 40932 + SPELL_FRENZY = 40683, // Increases damage by 50% and attack speed by 30%. 20 seconds, PHASE 5 ONLY + // Flying (Phase 2) - SPELL_THROW_GLAIVE = 39635, // Throws a glaive on the ground - SPELL_THROW_GLAIVE2 = 39849, // Animation for the above spell - SPELL_GLAIVE_RETURNS = 39873, // Glaive flies back to Illidan - SPELL_FIREBALL = 40598, // 2.5k-3.5k damage in 10 yard radius. 2 second cast time. - SPELL_DARK_BARRAGE = 40585, // 10 second channeled spell, 3k shadow damage per second. + SPELL_THROW_GLAIVE = 39635, // triggers 41466 - Throws the first glaive on the ground + SPELL_THROW_GLAIVE_VISUAL = 39849, // triggers 41466 - Throws the second glaive on the ground + SPELL_GLAIVE_RETURNS = 39873, // Glaive flies back to Illidan + SPELL_FIREBALL = 40598, // 2.5k-3.5k damage in 10 yard radius. 2 second cast time. + SPELL_DARK_BARRAGE = 40585, // 10 second channeled spell, 3k shadow damage per second. + SPELL_EYE_BLAST_DUMMY = 39908, // This does the blue beam channel - targets 23070 + // Demon Form - SPELL_DEMON_TRANSFORM_1 = 40511, // First uiPhase of animations for transforming into Dark Illidan (fall to ground) - SPELL_DEMON_TRANSFORM_2 = 40398, // Second uiPhase of animations (kneel) - SPELL_DEMON_TRANSFORM_3 = 40510, // Final uiPhase of animations (stand up and roar) - SPELL_DEMON_FORM = 40506, // Transforms into Demon Illidan. Has an Aura of Dread on him. - SPELL_SHADOW_BLAST = 41078, // 8k - 11k Shadow Damage. Targets highest threat. Has a splash effect, damaging anyone in 20 yards of the target. - SPELL_FLAME_BURST = 41126, // Hurls fire at entire raid for ~3.5k damage every 10 seconds. Resistable. (Does not work: Script effect) - SPELL_FLAME_BURST_EFFECT = 41131, // The actual damage. Handled by core (41126 triggers 41131) + SPELL_DEMON_TRANSFORM_1 = 40511, // start transform animation - spell sequence: 40398, 40506, 40510 - handled in core + SPELL_DEMON_TRANSFORM_2 = 40398, // Second uiPhase of animations (kneel) + SPELL_DEMON_TRANSFORM_3 = 40510, // Final uiPhase of animations (stand up and roar) + SPELL_DEMON_FORM = 40506, // Transforms into Demon Illidan. Has an Aura of Dread on him. + SPELL_SHADOW_BLAST = 41078, // 8k - 11k Shadow Damage. Targets highest threat. Has a splash effect, damaging anyone in 20 yards of the target. + SPELL_FLAME_BURST = 41126, // triggers 41131 + SPELL_SUMMON_SHADOW_DEMONS = 41117, // summons 23375 + // Other Illidan spells - SPELL_KNEEL = 39656, // Before beginning encounter, this is how he appears (talking to Wilson). - SPELL_SHADOW_PRISON = 40647, // Illidan casts this spell to immobilize entire raid when he summons Maiev. - SPELL_DEATH = 41220, // This spell doesn't do anything except stun Illidan and set him on his knees. - SPELL_BERSERK = 45078, // Damage increased by 500%, attack speed by 150% - - // Non-Illidan spells - SPELL_AKAMA_DOOR_CHANNEL = 41268, // Akama's channel spell on the door before the Temple Summit - SPELL_DEATHSWORN_DOOR_CHANNEL = 41269, // Olum and Udalo's channel spell on the door before the Temple Summit - SPELL_AKAMA_DOOR_FAIL = 41271, // Not sure where this is really used... - SPELL_HEALING_POTION = 40535, // Akama uses this to heal himself to full. - SPELL_AZZINOTH_CHANNEL = 39857, // Glaives cast it on Flames. Not sure if this is the right spell. - SPELL_SHADOW_DEMON_PASSIVE = 41079, // Adds the "shadowform" uiAura to Shadow Demons. - SPELL_CONSUME_SOUL = 41080, // Once the Shadow Demons reach their target, they use this to kill them - SPELL_PARALYZE = 41083, // Shadow Demons cast this on their target - SPELL_PURPLE_BEAM = 39123, // Purple Beam connecting Shadow Demon to their target - SPELL_CAGE_TRAP_DUMMY = 40761, // Put this in DB for cage trap GO. - SPELL_EYE_BLAST_TRIGGER = 40017, // This summons Demon Form every few seconds and deals ~20k damage in its radius - SPELL_EYE_BLAST = 39908, // This does the blue flamey animation. - SPELL_FLAME_CRASH_EFFECT = 40836, // Firey blue ring of circle that the other flame crash summons - SPELL_BLAZE_EFFECT = 40610, // Green flame on the ground, triggers damage (5k) every few seconds - SPELL_BLAZE_SUMMON = 40637, // Summons the Blaze creature - SPELL_DEMON_FIRE = 40029, // Blue fire trail left by Eye Blast. Deals 2k per second if players stand on it. - SPELL_CAGED = 40695, // Caged Trap triggers will cast this on Illidan if he is within 3 yards - SPELL_CAGE_TRAP_SUMMON = 40694, // Summons a Cage Trap GO (bugged) on the ground along with a Cage Trap Disturb Trigger mob (working) - SPELL_CAGE_TRAP_BEAM = 40713, // 8 Triggers on the ground in an octagon cast spells like this on Illidan 'caging him' - SPELL_FLAME_BLAST = 40631, // Flames of Azzinoth use this. Frontal cone AoE 7k-9k damage. - SPELL_CHARGE = 40602, // Flames of Azzinoth charges whoever is too far from them. They enrage after this. For simplicity, we'll use the same enrage as Illidan. - SPELL_TELEPORT_VISUAL = 41232, // Teleport visual for Maiev - SPELL_SHADOWFIEND_PASSIVE = 41913, // Passive uiAura for shadowfiends - - EQUIP_ID_MAIN_HAND = 32837, - EQUIP_ID_OFF_HAND = 32838, + SPELL_KNEEL_INTRO = 39656, // Before beginning encounter, this is how he appears (talking to Wilson). + SPELL_SUMMMON_MAIEV = 40403, // summons 23197 + SPELL_TELEPORT_MAIEV = 41221, + SPELL_SHADOW_PRISON = 40647, // Illidan casts this spell to immobilize entire raid when he summons Maiev. + SPELL_CAGE_TRAP = 40693, // Cast by Illidan on Maiev - teleports Maiev for the trap + SPELL_DEATH = 41220, // This spell doesn't do anything except stun Illidan and set him on his knees. + SPELL_BERSERK = 45078, // Damage increased by 500%, attack speed by 150% + + + /************** Non-Illidan Spells *************/ + // Akama + SPELL_AKAMA_DOOR_FAIL = 41271, // Akama's first door attempt + SPELL_AKAMA_DOOR_CHANNEL = 41268, // Akama's channel spell on the door before the Temple Summit + SPELL_DEATHSWORN_DOOR_CHANNEL = 41269, // Olum and Udalo's channel spell on the door before the Temple Summit + SPELL_HEALING_POTION = 40535, // Akama uses this to heal himself to full. + SPELL_CHAIN_LIGHTNING = 40536, + + // Maiev + SPELL_SHADOW_STRIKE = 40685, + SPELL_THROW_DAGGER = 41152, + SPELL_CAGE_TRAP_SUMMON = 40694, // summons npc 23304 and go 185916 + SPELL_TELEPORT_VISUAL = 41236, + + // Misc Summoned + SPELL_FLAME_CRASH_EFFECT = 40836, // Firey blue ring of circle that the other flame crash summons + SPELL_EYE_BLAST_TRIGGER = 40017, // This summons Demon Form every few seconds and deals ~20k damage in its radius + SPELL_DEMON_FIRE = 40029, // Blue fire trail left by Eye Blast. Deals 2k per second if players stand on it. + SPELL_BLAZE_EFFECT = 40610, // Green flame on the ground, triggers damage (5k) every few seconds + + // Blade of Azzinoth + SPELL_RANGE_MARKER = 41997, // Dummy effect used by the Blade of Azzinoth to check the range of the Azzinoth flame - needs core support + SPELL_SUMMON_TEAR_AZZINOTH = 39855, // Summons 22997 + SPELL_AZZINOTH_CHANNEL = 39857, // Glaives cast it on Flames + + // Flame of Azzinoth + SPELL_FLAME_BLAST = 40631, // Flames of Azzinoth use this. Frontal cone AoE 7k-9k damage. + SPELL_CHARGE = 42003, // Flames of Azzinoth charges whoever is too far from them. They enrage after this + SPELL_UNCAGED_WRATH = 39869, + SPELL_BLAZE = 40637, // summons 23259 + + // Shadow Demon + SPELL_SHADOW_DEMON_PASSIVE = 41079, // Adds the "shadowform" uiAura to Shadow Demons. + SPELL_CONSUME_SOUL = 41080, // Once the Shadow Demons reach their target, they use this to kill them + SPELL_PARALYZE = 41083, // Shadow Demons cast this on their target + + // Cage spells + SPELL_CAGE_TRAP_PERIODIC = 40760, // purpose unk + SPELL_CAGE_TRAP_DUMMY = 40761, // purpose unk + SPELL_CAGED = 40695, // Caged Trap triggers will cast this on Illidan if he is within 3 yards + + + /************** Creature Summons **************/ + NPC_ILLIDARI_ELITE = 23226, // attacks Akama on the stairs + NPC_FLAME_CRASH = 23336, // has aura 40836 + //NPC_PARASITIC_SHADOWFIEND = 23498, // has aura 41913 (in c_t_a) + NPC_BLADE_OF_AZZINOTH = 22996, // has aura 41997 and summons 22997 on spawn + NPC_FLAME_OF_AZZINOTH = 22997, + NPC_ILLIDAN_TARGET = 23070, // the eye blast target - has aura 40017 + NPC_DEMON_FIRE = 23069, // has aura 40029 + NPC_BLAZE = 23259, // has aura 40610 + NPC_SHADOW_DEMON = 23375, + //NPC_CAGE_TRAP_DISTURB_TRIGGER = 23304, + + GO_CAGE_TRAP = 185916, + + /************** Others **************/ + EQUIP_ID_MAIN_HAND = 32837, + EQUIP_ID_OFF_HAND = 32838, + + MAX_ILLIDARI_ELITES = 10, + MAX_CAGE_SPELLS = 8, + MAX_FLAME_AZZINOTH = 2, + + DUMMY_EMOTE_ID_1 = 1, + DUMMY_EMOTE_ID_2 = 2, + DUMMY_EMOTE_ID_3 = 3, }; -// Other defines -#define CENTER_X 676.740f -#define CENTER_Y 305.297f -#define CENTER_Z 353.192f +static const uint32 aCagedSummonSpells[MAX_CAGE_SPELLS] = { 40696, 40697, 40698, 40699, 40700, 40701, 40702, 40703 }; +static const uint32 aCagedVisualSpells[MAX_CAGE_SPELLS] = { 40704, 40707, 40708, 40709, 40710, 40711, 40712, 40713 }; -/*** Phase Names ***/ -enum Phase +static const DialogueEntry aIntroDialogue[] = { - PHASE_NORMAL = 1, - PHASE_FLIGHT = 2, - PHASE_NORMAL_2 = 3, - PHASE_DEMON = 4, - PHASE_NORMAL_MAIEV = 5, - PHASE_DEMON_SEQUENCE = 6, - PHASE_NORMAL_FORM = 7, // Internal marker, for switching back to either NORMAL_2 or NORMAL_MAIEV + {SAY_AKAMA_OPEN_DOOR_1, NPC_AKAMA, 4000}, + {SPELL_AKAMA_DOOR_FAIL, 0, 9000}, + {SAY_AKAMA_OPEN_DOOR_2, NPC_AKAMA, 6000}, + {NPC_SPIRIT_OF_OLUM, 0, 2000}, + {SAY_UDALO_OPEN_DOOR_3, NPC_SPIRIT_OF_UDALO, 2000}, + {SAY_OLUM_OPEN_DOOR_4, NPC_SPIRIT_OF_OLUM, 4000}, + {SPELL_AKAMA_DOOR_CHANNEL, 0, 11000}, + {GO_ILLIDAN_GATE, 0, 4000}, + {NPC_SPIRIT_OF_UDALO, 0, 0}, + {0, 0, 0}, }; -struct Locations +static const DialogueEntry aEventDialogue[] = { - float x, y, z; - uint32 id; + // Akama intro + {NPC_AKAMA, 0, 1000}, + {SAY_ILLIDAN_SPEECH_1, NPC_ILLIDAN_STORMRAGE, 3000}, + {EMOTE_ONESHOT_QUESTION, 0, 3000}, + {DUMMY_EMOTE_ID_1, 0, 3000}, + {DUMMY_EMOTE_ID_2, 0, 3000}, + {SAY_AKAMA_SPEECH_2, NPC_AKAMA, 10000}, + {SAY_ILLIDAN_SPEECH_3, NPC_ILLIDAN_STORMRAGE, 3000}, + {DUMMY_EMOTE_ID_3, 0, 4000}, + {SAY_AKAMA_SPEECH_4, NPC_AKAMA, 4000}, + {EQUIP_ID_MAIN_HAND, 0, 1000}, + {SAY_ILLIDAN_SPEECH_5, NPC_ILLIDAN_STORMRAGE, 4000}, + {NPC_ILLIDAN_STORMRAGE, 0, 0}, + // Akama leaves fight + {SAY_ILLIDAN_MINION, NPC_ILLIDAN_STORMRAGE, 8000}, + {SAY_AKAMA_LEAVE, NPC_AKAMA, 0}, + // Maiev cutscene + {SAY_ILLIDAN_SPEECH_6, NPC_ILLIDAN_STORMRAGE, 7000}, + {SPELL_SUMMMON_MAIEV, 0, 1000}, + {SAY_MAIEV_SPEECH_7, NPC_MAIEV_SHADOWSONG, 2000}, + {EMOTE_ONESHOT_EXCLAMATION, 0, 6000}, + {SAY_ILLIDAN_SPEECH_8, NPC_ILLIDAN_STORMRAGE, 7000}, + {SAY_MAIEV_SPEECH_9, NPC_MAIEV_SHADOWSONG, 2000}, + {EMOTE_ONESHOT_YES, 0, 5000}, + {NPC_MAIEV_SHADOWSONG, 0, 0}, + {0, 0, 0}, }; -static const Locations aGlaivePosition[]= +static const DialogueEntry aEpilogueDialogue[] = { - {695.105f, 305.303f, 354.256f}, - {659.338f, 305.303f, 354.256f}, - {700.105f, 305.303f, 354.256f}, - {664.338f, 305.303f, 354.256f} + {SAY_MAIEV_EPILOGUE_1, NPC_MAIEV_SHADOWSONG, 6000}, + {SAY_ILLIDAN_EPILOGUE_2, NPC_ILLIDAN_STORMRAGE, 18000}, + {NPC_ILLIDAN_STORMRAGE, 0, 2000}, + {SAY_MAIEV_EPILOGUE_3, NPC_MAIEV_SHADOWSONG, 13000}, + {SAY_MAIEV_EPILOGUE_4, NPC_MAIEV_SHADOWSONG, 2000}, + {SPELL_TELEPORT_VISUAL, 0, 0}, + {0, 0, 0}, }; -static const Locations aEyeBlast[]= +/*** Phase Names ***/ +enum Phase { - {650.697f, 320.128f, 353.730f}, - {652.799f, 275.091f, 353.367f}, - {701.527f, 273.815f, 353.230f}, - {709.865f, 325.654f, 353.322f} + PHASE_AKAMA = 1, + PHASE_BLADES = 2, + PHASE_DUAL_NORMAL = 3, + PHASE_DUAL_DEMON = 4, + PHASE_MAIEV = 5, + PHASE_TRANSITION = 6, }; -static const Locations aAkamaWP[]= -{ - {770.01f, 304.50f, 312.29f}, // Bottom of the first stairs, at the doors - {780.66f, 304.50f, 319.74f}, // Top of the first stairs - {790.13f, 319.68f, 319.76f}, // Bottom of the second stairs (left from the entrance) - {787.17f, 347.38f, 341.42f}, // Top of the second stairs - {781.34f, 350.31f, 341.44f}, // Bottom of the third stairs - {762.60f, 361.06f, 353.60f}, // Top of the third stairs - {756.35f, 360.52f, 353.27f}, // Before the door-thingy - {743.82f, 342.21f, 353.00f}, // Somewhere further - {732.69f, 305.13f, 353.00f}, // In front of Illidan - {738.11f, 365.44f, 353.00f}, // in front of the door-thingy (the other one!) - {792.18f, 366.62f, 341.42f}, // Down the first flight of stairs - {796.84f, 304.89f, 319.76f}, // Down the second flight of stairs - {782.01f, 304.55f, 319.76f} // Final location - back at the uiInitial gates. This is where he will fight the minions! -}; -// 755.762, 304.0747, 312.1769 -- This is where Akama should be spawned -static const Locations aSpiritSpawns[]= +struct Locations { - {755.5426f, 309.9156f, 312.2129f, SPIRIT_OF_UDALO}, - {755.5426f, 298.7923f, 312.0834f, SPIRIT_OF_OLUM} + float fX, fY, fZ; }; -struct WayPoints +static const Locations aCenterLoc[]= { - WayPoints(uint32 _id, float _x, float _y, float _z) - { - id = _id; - x = _x; - y = _y; - z = _z; - } - uint32 id; - float x, y, z; + {705.012f, 305.721f, 354.723f}, // front location + {676.740f, 305.297f, 353.192f}, // center location }; -struct Animation // For the demon transformation +static const Locations aIllidariElitesPos[MAX_ILLIDARI_ELITES]= { - uint32 uiAura, uiUnAura, uiTimer, uiSize, uiDisplayId; - Phase uiPhase; - bool bEquip; + {743.9686f, 289.6447f, 311.1807f}, + {753.8425f, 286.562f, 310.9353f}, + {745.2552f, 322.1574f, 310.4596f}, + {745.3237f, 283.986f, 309.2765f}, + {750.0472f, 282.3274f, 309.4353f}, + {747.0576f, 326.4268f, 309.0688f}, + {751.0878f, 327.6505f, 309.4576f}, + {748.8422f, 288.062f, 310.9782f}, + {750.0322f, 323.6064f, 310.2757f}, + {754.0332f, 325.8136f, 310.3195f}, }; -static Animation DemonTransformation[]= +static const Locations aEyeBlastPos[]= { - {SPELL_DEMON_TRANSFORM_1, 0, 1300, 0, 0, PHASE_DEMON_SEQUENCE, true}, - {SPELL_DEMON_TRANSFORM_2, SPELL_DEMON_TRANSFORM_1, 4000, 0, 0, PHASE_DEMON_SEQUENCE, true}, - {SPELL_DEMON_FORM, 0, 3000, 1073741824, 21322, PHASE_DEMON_SEQUENCE, false}, - {SPELL_DEMON_TRANSFORM_3, SPELL_DEMON_TRANSFORM_2, 3500, 0, 0, PHASE_DEMON_SEQUENCE, false}, - {0, 0, 0, 0, 0, PHASE_DEMON, false}, - {SPELL_DEMON_TRANSFORM_1, 0, 1500, 0, 0, PHASE_DEMON_SEQUENCE, false}, - {SPELL_DEMON_TRANSFORM_2, SPELL_DEMON_TRANSFORM_1, 4000, 0, 0, PHASE_DEMON_SEQUENCE, false}, - {0, SPELL_DEMON_FORM, 3000, 1069547520, 21135, PHASE_DEMON_SEQUENCE, false}, - {SPELL_DEMON_TRANSFORM_3, SPELL_DEMON_TRANSFORM_2, 3500, 0, 0, PHASE_DEMON_SEQUENCE, true}, - {0, 0, 0, 0, 0, PHASE_NORMAL_FORM, true} + // spawn + {650.600f, 258.124f, 352.996f}, // back left + {651.867f, 353.212f, 352.996f}, // back right + {710.010f, 266.950f, 352.996f}, // front left + {711.003f, 343.562f, 352.996f}, // front right + // target - left + {742.212f, 338.333f, 352.996f}, // front right + {674.559f, 375.761f, 352.996f}, // back right + // target - right + {741.545f, 270.640f, 352.996f}, // front left + {671.943f, 235.718f, 352.996f}, // back left + // center back + {639.511f, 305.852f, 353.264f} }; -/**** Demon Fire will be used for Eye Blast. Illidan needs to have access to it's vars and functions, so we'll set it here ****/ -struct MANGOS_DLL_DECL demonfireAI : public ScriptedAI +/*###### +## boss_illidan_stormrage +######*/ + +struct MANGOS_DLL_DECL boss_illidan_stormrageAI : public ScriptedAI, private DialogueHelper { - demonfireAI(Creature* pCreature) : ScriptedAI(pCreature) + boss_illidan_stormrageAI(Creature* pCreature) : ScriptedAI(pCreature), + DialogueHelper(aEventDialogue) { - m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_pInstance = (instance_black_temple*)pCreature->GetInstanceData(); + InitializeDialogueHelper(m_pInstance); Reset(); } - ScriptedInstance* m_pInstance; - - ObjectGuid m_illidanGuid; - - bool m_bIsTrigger; - - uint32 m_uiCheckTimer; - uint32 m_uiDemonFireTimer; - uint32 m_uiDespawnTimer; - - void Reset() - { - m_illidanGuid.Clear(); - - m_bIsTrigger = false; - - m_uiCheckTimer = 2000; - m_uiDemonFireTimer = 0; - m_uiDespawnTimer = 45000; - } - - void AttackStart(Unit* who) { } - void MoveInLineOfSight(Unit *who){ } - - void UpdateAI(const uint32 uiDiff) - { - if (m_bIsTrigger) - return; - - m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - - if (m_uiCheckTimer < uiDiff) - { - if (!m_illidanGuid && m_pInstance) - { - if (Creature* pIllidan = m_pInstance->instance->GetCreature(m_pInstance->GetGuid(NPC_ILLIDAN_STORMRAGE))) - { - m_illidanGuid = m_pInstance->GetGuid(NPC_ILLIDAN_STORMRAGE); - - if (!pIllidan->IsLevitating()) - m_creature->SetDeathState(JUST_DIED); - } - } - m_uiCheckTimer = 2000; - } - else - m_uiCheckTimer -= uiDiff; - - if (m_uiDemonFireTimer < uiDiff) - { - DoCastSpellIfCan(m_creature, SPELL_DEMON_FIRE); - m_uiDemonFireTimer = 30000; - } - else - m_uiDemonFireTimer -= uiDiff; + instance_black_temple* m_pInstance; - if (m_uiDespawnTimer < uiDiff) - m_creature->SetDeathState(JUST_DIED); - else - m_uiDespawnTimer -= uiDiff; - } -}; + Phase m_uiPhase; + uint32 m_uiBerserkTimer; -/******* Functions and vars for Akama's AI ******/ -struct MANGOS_DLL_DECL npc_akama_illidanAI : public ScriptedAI -{ - npc_akama_illidanAI(Creature* pCreature) : ScriptedAI(pCreature) - { - m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - WayPointList.clear(); - Reset(); - } + bool m_bHasSummonedElites; + float m_fTargetMoveX, m_fTargetMoveY, m_fTargetMoveZ; - /* Instance Data */ - ScriptedInstance* m_pInstance; + uint32 m_uiShearTimer; + uint32 m_uiDrawSoulTimer; + uint32 m_uiFlameCrashTimer; + uint32 m_uiShadowFiendTimer; - /* Timers */ - uint32 m_uiChannelTimer; - uint32 m_uiTalkTimer; - uint32 m_uiWalkTimer; - uint32 m_uiSummonMinionTimer; + uint32 m_uiFireballTimer; + uint32 m_uiEyeBlastTimer; + uint32 m_uiDarkBarrageTimer; + uint32 m_uiSummonBladesTimer; // Animate summoning the Blades of Azzinoth in Phase 2 + uint32 m_uiCenterMoveTimer; + uint32 m_uiLandTimer; // This is used at the end of uiPhase 2 to signal Illidan landing after Flames are dead + uint8 m_uiLandStage; + uint8 m_uiFlameAzzinothKilled; - /* GUIDs */ - ObjectGuid m_illidanGuid; - ObjectGuid m_playerGuid; - ObjectGuid m_aSpiritGuids[2]; - ObjectGuid m_channelGuid; + uint32 m_uiAgonizingFlamesTimer; + uint32 m_uiTransformTimer; - bool m_bIsTalking; - bool m_bStartChanneling; - bool m_bDoorOpen; - bool m_bFightMinions; - bool m_bIsReturningToIllidan; - bool m_bIsWalking; - uint32 m_uiTalkCount; - uint32 m_uiChannelCount; + uint32 m_uiShadowBlastTimer; + uint32 m_uiFlameBurstTimer; + uint32 m_uiShadowDemonTimer; + Phase m_uiPrevPhase; // store the previous phase in transition - std::list WayPointList; - std::list::iterator WayPoint; + uint32 m_uiEnrageTimer; + uint32 m_uiTrapTimer; - void BeginEvent(ObjectGuid playerGuid); + GuidList m_lBladesGuidList; void Reset() { - if (m_pInstance) - { - m_pInstance->SetData(TYPE_ILLIDAN, NOT_STARTED); - GameObject* pGate = m_pInstance->GetSingleGameObjectFromStorage(GO_ILLIDAN_GATE); + m_uiPhase = PHASE_AKAMA; + m_uiBerserkTimer = 25*MINUTE*IN_MILLISECONDS; - // close door if already open (when raid wipes or something) - if (pGate && !pGate->GetGoState()) - pGate->SetGoState(GO_STATE_READY); + m_bHasSummonedElites = false; - for(uint32 i = GO_ILLIDAN_DOOR_R; i <= GO_ILLIDAN_DOOR_L; ++i) - { - if (GameObject* pDoor = m_pInstance->GetSingleGameObjectFromStorage(i)) - pDoor->SetGoState(GO_STATE_ACTIVE); - } - } + m_uiShearTimer = urand(10000, 15000); + m_uiFlameCrashTimer = 30000; + m_uiShadowFiendTimer = 25000; + m_uiDrawSoulTimer = 35000; - m_illidanGuid.Clear(); - m_playerGuid.Clear(); - m_channelGuid.Clear(); - for(uint8 i = 0; i < 2; ++i) - m_aSpiritGuids[i].Clear(); + m_uiFlameAzzinothKilled = 0; + m_uiSummonBladesTimer = 0; + m_uiCenterMoveTimer = 0; + m_uiFireballTimer = 5000; + m_uiDarkBarrageTimer = 45000; + m_uiEyeBlastTimer = 15000; + m_uiLandTimer = 0; + m_uiLandStage = 0; - m_uiChannelTimer = 0; - m_uiChannelCount = 0; - m_uiSummonMinionTimer = 2000; + m_uiAgonizingFlamesTimer= 35000; + m_uiTransformTimer = 0; - m_uiWalkTimer = 0; - m_bIsWalking = false; + m_uiShadowBlastTimer = urand(1000, 2000); + m_uiFlameBurstTimer = 10000; + m_uiShadowDemonTimer = 30000; - m_uiTalkTimer = 0; - m_uiTalkCount = 0; + m_uiEnrageTimer = 40000; + m_uiTrapTimer = urand(30000, 40000); - KillAllElites(); + m_lBladesGuidList.clear(); - m_bIsReturningToIllidan = false; - m_bFightMinions = false; - m_bIsTalking = false; - m_bStartChanneling = false; - m_bDoorOpen = false; + // Reset boss + m_creature->SetLevitate(false); + SetCombatMovement(true); - // Database sometimes has strange values.. - m_creature->SetUInt32Value(UNIT_NPC_FLAGS, 0); - m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); - m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - m_creature->SetVisibility(VISIBILITY_ON); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PASSIVE); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + SetEquipmentSlots(false, EQUIP_UNEQUIP, EQUIP_UNEQUIP, EQUIP_NO_CHANGE); } - // Do not call reset in Akama's evade mode, as this will stop him from summoning minions after he kills the first bit - void EnterEvadeMode() + void GetAIInformation(ChatHandler& reader) { - m_creature->RemoveAllAuras(); - m_creature->DeleteThreatList(); - m_creature->CombatStop(true); + reader.PSendSysMessage("Boss Illidan, current uiPhase = %u", m_uiPhase); } - void KillAllElites() + void Aggro(Unit* pWho) { - GuidVector vGuids; - m_creature->FillGuidsListFromThreatList(vGuids); - for (GuidVector::const_iterator itr = vGuids.begin(); itr != vGuids.end(); ++itr) - { - Unit* pUnit = m_creature->GetMap()->GetUnit(*itr); - - if (pUnit && pUnit->GetTypeId() == TYPEID_UNIT && pUnit->GetEntry() == ILLIDARI_ELITE) - pUnit->SetDeathState(JUST_DIED); - } + if (m_pInstance) + m_pInstance->SetData(TYPE_ILLIDAN, IN_PROGRESS); } - void ReturnToIllidan() + // Do not attack using LoS function. The attack is triggered in script + void MoveInLineOfSight(Unit* pWho) { } + + void JustReachedHome() { - KillAllElites(); - m_bFightMinions = false; - m_bIsReturningToIllidan = true; - WayPoint = WayPointList.begin(); - m_creature->SetSpeedRate(MOVE_RUN, 2.0f); - m_creature->SetWalk(false); - m_bIsWalking = true; + if (m_pInstance) + m_pInstance->SetData(TYPE_ILLIDAN, FAIL); } - void AddWaypoint(uint32 id, float x, float y, float z) + void JustDied(Unit* pKiller) { - WayPoints AWP(id, x, y, z); - WayPointList.push_back(AWP); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + + if (m_pInstance) + m_pInstance->SetData(TYPE_ILLIDAN, DONE); } - void DamageTaken(Unit* pDealer, uint32& uiDamage) + void KilledUnit(Unit* pVictim) { - if (uiDamage > m_creature->GetHealth() && (pDealer != m_creature)) - { - uiDamage = 0; - DoCastSpellIfCan(m_creature, SPELL_HEALING_POTION); - } + if (pVictim->GetTypeId() != TYPEID_PLAYER) + return; + + DoScriptText(urand(0, 1) ? SAY_KILL1 : SAY_KILL2, m_creature); } - void BeginDoorEvent(Player* pPlayer) + void DamageTaken(Unit* pDealer, uint32& uiDamage) { - // Requires Instance and this additional check to prevent exploits - if (!m_pInstance || m_pInstance->GetData(TYPE_COUNCIL) != DONE) + if (uiDamage < m_creature->GetHealth()) return; - debug_log("SD2: Akama - Door event initiated by player %s", pPlayer->GetObjectGuid().GetString().c_str()); - m_playerGuid = pPlayer->GetObjectGuid(); - - if (GameObject* pGate = m_pInstance->GetSingleGameObjectFromStorage(GO_ILLIDAN_GATE)) + // Make sure it won't die by accident + if (m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE)) { - float x,y,z; - pGate->GetPosition(x, y, z); - Creature* Channel = m_creature->SummonCreature(ILLIDAN_DOOR_TRIGGER, x, y, z+5, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 360000); - if (Channel) - { - m_channelGuid = Channel->GetObjectGuid(); + uiDamage = 0; + return; + }; - // Invisible but spell visuals can still be seen. - Channel->SetDisplayId(11686); - Channel->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + uiDamage = 0; + m_creature->InterruptNonMeleeSpells(true); + m_creature->SetHealth(1); + m_creature->StopMoving(); + m_creature->RemoveAllAurasOnDeath(); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + m_creature->ClearAllReactives(); - float PosX, PosY, PosZ; - m_creature->GetPosition(PosX, PosY, PosZ); - for(uint8 i = 0; i < 2; ++i) - { - Creature* Spirit = m_creature->SummonCreature(aSpiritSpawns[i].id, aSpiritSpawns[i].x, aSpiritSpawns[i].y, aSpiritSpawns[i].z, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 360000); - if (Spirit) - { - Spirit->SetVisibility(VISIBILITY_OFF); - m_aSpiritGuids[i] = Spirit->GetObjectGuid(); - } - } + DoCastSpellIfCan(m_creature, SPELL_DEATH, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_TELEPORT_MAIEV, CAST_TRIGGERED); + m_creature->GetMotionMaster()->Clear(); + m_creature->GetMotionMaster()->MoveIdle(); - m_bStartChanneling = true; - m_creature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); - m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - DoCastSpellIfCan(Channel, SPELL_AKAMA_DOOR_FAIL); - } + // Signal Maiev to start the outro dialogue + if (m_pInstance) + { + if (Creature* pMaiev = m_pInstance->GetSingleCreatureFromStorage(NPC_MAIEV_SHADOWSONG)) + pMaiev->AI()->KilledUnit(m_creature); } } - void MovementInform(uint32 type, uint32 id) + void JustDidDialogueStep(int32 iEntry) { - if (type != POINT_MOTION_TYPE || !m_bIsWalking) - return; - - if (WayPoint->id != id) - return; - - switch(id) + switch (iEntry) { - case 6: - if (!m_bIsReturningToIllidan) + case NPC_AKAMA: + if (m_pInstance) + { + if (Creature* pAkama = m_pInstance->GetSingleCreatureFromStorage(NPC_AKAMA)) + m_creature->SetFacingToObject(pAkama); + } + m_creature->RemoveAurasDueToSpell(SPELL_KNEEL_INTRO); + break; + case EMOTE_ONESHOT_QUESTION: + case DUMMY_EMOTE_ID_1: + case DUMMY_EMOTE_ID_2: + case DUMMY_EMOTE_ID_3: + m_creature->HandleEmote(EMOTE_ONESHOT_QUESTION); + break; + case EQUIP_ID_MAIN_HAND: + SetEquipmentSlots(false, EQUIP_ID_MAIN_HAND, EQUIP_ID_OFF_HAND, EQUIP_NO_CHANGE); + break; + case NPC_ILLIDAN_STORMRAGE: + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PASSIVE); + m_creature->SetInCombatWithZone(); + if (m_pInstance) { - // open the doors that close the summit - for(uint32 i = GO_ILLIDAN_DOOR_R; i < GO_ILLIDAN_DOOR_L+1; ++i) + if (Creature* pAkama = m_pInstance->GetSingleCreatureFromStorage(NPC_AKAMA)) { - if (GameObject* pDoor = m_pInstance->GetSingleGameObjectFromStorage(i)) - pDoor->SetGoState(GO_STATE_ACTIVE); + pAkama->AI()->AttackStart(m_creature); + AttackStart(pAkama); } } break; - case 7: - if (m_bIsReturningToIllidan) + case SAY_AKAMA_LEAVE: + DoResetThreat(); + if (m_pInstance) { - m_bIsWalking = false; - if (m_illidanGuid) + // Remove Akama from threat list and allow him to fight the Illidari elites + if (Creature* pAkama = m_pInstance->GetSingleCreatureFromStorage(NPC_AKAMA)) { - Creature* Illidan = m_creature->GetMap()->GetCreature(m_illidanGuid); - if (Illidan) - { - float dx = Illidan->GetPositionX() + rand()%15; - float dy = Illidan->GetPositionY() + rand()%15; - m_creature->GetMotionMaster()->MovePoint(13, dx, dy, Illidan->GetPositionZ()); - m_creature->SetTargetGuid(Illidan->GetObjectGuid()); - } + pAkama->AI()->EnterEvadeMode(); + m_creature->getThreatManager().modifyThreatPercent(pAkama, -101); } } break; - case 8: - m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - if (!m_bIsReturningToIllidan) + case SPELL_SUMMMON_MAIEV: + DoCastSpellIfCan(m_creature, SPELL_SUMMMON_MAIEV); + break; + case EMOTE_ONESHOT_EXCLAMATION: + if (m_pInstance) { - m_bIsWalking = false; - BeginEvent(m_playerGuid); + if (Creature* pMaiev = m_pInstance->GetSingleCreatureFromStorage(NPC_MAIEV_SHADOWSONG)) + pMaiev->HandleEmote(EMOTE_ONESHOT_EXCLAMATION); } break; - case 12: - m_bIsWalking = false; - m_bFightMinions = true; - m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + case EMOTE_ONESHOT_YES: + if (m_pInstance) + { + if (Creature* pMaiev = m_pInstance->GetSingleCreatureFromStorage(NPC_MAIEV_SHADOWSONG)) + pMaiev->HandleEmote(EMOTE_ONESHOT_YES); + } + break; + case NPC_MAIEV_SHADOWSONG: + // Resume combat and attack Maiev + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + m_creature->SetTargetGuid(m_creature->getVictim()->GetObjectGuid()); + SetCombatMovement(false); + m_creature->GetMotionMaster()->Clear(); + m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); + if (m_pInstance) + { + if (Creature* pMaiev = m_pInstance->GetSingleCreatureFromStorage(NPC_MAIEV_SHADOWSONG)) + pMaiev->AI()->AttackStart(m_creature); + } + m_uiPhase = PHASE_MAIEV; + m_uiTransformTimer = 60000; break; } - - ++WayPoint; - m_uiWalkTimer = 200; } - void DeleteFromThreatList() + void JustSummoned(Creature* pSummoned) { - // If we do not have Illidan's GUID, do not proceed - if (!m_illidanGuid) - return; + switch (pSummoned->GetEntry()) + { + case NPC_FLAME_CRASH: + pSummoned->CastSpell(pSummoned, SPELL_FLAME_CRASH_EFFECT, false); + break; + case NPC_BLADE_OF_AZZINOTH: + pSummoned->CastSpell(pSummoned, SPELL_RANGE_MARKER, true); + pSummoned->CastSpell(pSummoned, SPELL_SUMMON_TEAR_AZZINOTH, true); + m_lBladesGuidList.push_back(pSummoned->GetObjectGuid()); + break; + case NPC_ILLIDAN_TARGET: + pSummoned->CastSpell(pSummoned, SPELL_EYE_BLAST_TRIGGER, true, NULL, NULL, m_creature->GetObjectGuid()); + pSummoned->GetMotionMaster()->MovePoint(0, m_fTargetMoveX, m_fTargetMoveY, m_fTargetMoveZ); + DoCastSpellIfCan(pSummoned, SPELL_EYE_BLAST_DUMMY, CAST_TRIGGERED); + break; + case NPC_DEMON_FIRE: + pSummoned->CastSpell(pSummoned, SPELL_DEMON_FIRE, true); + break; + case NPC_SHADOW_DEMON: + pSummoned->CastSpell(pSummoned, SPELL_SHADOW_DEMON_PASSIVE, true); + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0, SPELL_PARALYZE, SELECT_FLAG_PLAYER)) + { + // Dummy attack function - used only to set the target + pSummoned->AI()->AttackStart(pTarget); + pSummoned->CastSpell(pTarget, SPELL_PARALYZE, true); + + // Move towards target (which is stunned) + pSummoned->GetMotionMaster()->MovePoint(1, pTarget->GetPositionX(), pTarget->GetPositionY(), pTarget->GetPositionZ()); + } + break; + case NPC_MAIEV_SHADOWSONG: + pSummoned->SetFacingToObject(m_creature); + m_creature->SetTargetGuid(pSummoned->GetObjectGuid()); + break; + } + } - // Create a pointer to Illidan - Creature* Illidan = m_creature->GetMap()->GetCreature(m_illidanGuid); + // Wrapper to start the combat dialogue + void DoStartCombatEvent() { StartNextDialogueText(NPC_AKAMA); } - // No use to continue if Illidan does not exist - if (!Illidan) - return; + // Wrapper to land Illidan when both flames are killed + void DoInformFlameKilled() + { + // Land Illidan if both Flames are killed + ++m_uiFlameAzzinothKilled; - ThreatList const& tList = Illidan->getThreatManager().getThreatList(); - for (ThreatList::const_iterator itr = tList.begin();itr != tList.end(); ++itr) + if (m_uiFlameAzzinothKilled == MAX_FLAME_AZZINOTH) { - // Loop through threatlist till our Guid is found in it. - if ((*itr)->getUnitGuid() == m_creature->GetObjectGuid()) - { - (*itr)->removeReference(); // Delete ourself from his threatlist. - break; // No need to continue anymore. - } + m_uiLandTimer = 5000; + m_uiPhase = PHASE_TRANSITION; + m_creature->InterruptNonMeleeSpells(false); } - - // Now we delete our threatlist to prevent attacking anyone for now - m_creature->DeleteThreatList(); - // Also we remove all auras, to prevent delayed damage - m_creature->RemoveAllAuras(); } - void UpdateAI(const uint32 diff) + // Wrapper to handle the Eye Blast cast + bool DoCastEyeBlastIfCan() { - if (!m_pInstance) - return; + if (m_creature->IsNonMeleeSpellCasted(false)) + return false; - if (m_illidanGuid) - { - if (Creature* Illidan = m_creature->GetMap()->GetCreature(m_illidanGuid)) - { - if (Illidan->GetHealthPercent() < 85.0f && m_creature->isInCombat() && !m_bFightMinions) - { - if (m_uiTalkTimer < diff) - { - switch(m_uiTalkCount) - { - case 0: - DoScriptText(SAY_AKAMA_MINION, Illidan); - m_uiTalkTimer = 8000; - m_uiTalkCount = 1; - break; - case 1: - DoScriptText(SAY_AKAMA_LEAVE, m_creature); - m_uiTalkTimer = 3000; - m_uiTalkCount = 2; - break; - case 2: - m_bIsTalking = true; - m_uiTalkTimer = 2000; - m_creature->RemoveAllAuras(); - m_creature->CombatStop(true); - m_creature->AttackStop(); - m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - m_uiTalkCount = 3; - break; - case 3: - DeleteFromThreatList(); - m_bIsWalking = true; - WayPoint = WayPointList.begin(); - std::advance(WayPoint, 9); - m_creature->SetWalk(false); - break; - } - } - else - m_uiTalkTimer -= diff; - } + DoScriptText(SAY_EYE_BLAST, m_creature); - if (Illidan->GetHealthPercent() < 4.0f && !m_bIsReturningToIllidan) - ReturnToIllidan(); - } + // Set spawn and target loc + uint8 uiSpawnLoc = urand(0, 3); + uint8 uiTargetLoc = 0; + switch (uiSpawnLoc) + { + case 0: uiTargetLoc = urand(4, 5); break; + case 1: uiTargetLoc = urand(6, 7); break; + case 2: uiTargetLoc = urand(0, 1) ? 5 : 8; break; + case 3: uiTargetLoc = urand(7, 8); break; } - else - m_illidanGuid = m_pInstance->GetGuid(NPC_ILLIDAN_STORMRAGE); - // Reset Encounter - if (m_pInstance->GetData(TYPE_ILLIDAN) == FAIL) - { - m_pInstance->SetData(TYPE_ILLIDAN, NOT_STARTED); + m_fTargetMoveX = aEyeBlastPos[uiTargetLoc].fX; + m_fTargetMoveY = aEyeBlastPos[uiTargetLoc].fY; + m_fTargetMoveZ = aEyeBlastPos[uiTargetLoc].fZ; + m_creature->SummonCreature(NPC_ILLIDAN_TARGET, aEyeBlastPos[uiSpawnLoc].fX, aEyeBlastPos[uiSpawnLoc].fY, aEyeBlastPos[uiSpawnLoc].fZ, 0, TEMPSUMMON_TIMED_DESPAWN, 15000); - m_creature->GetMotionMaster()->Clear(false); - Reset(); - // Get Akama Home - float fX, fY, fZ, fO; - m_creature->GetRespawnCoord(fX, fY, fZ, &fO); - m_creature->NearTeleportTo(fX, fY, fZ, fO); + return true; + } + + void UpdateAI(const uint32 uiDiff) + { + DialogueUpdate(uiDiff); + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; + + // Make Akama evade combat at 85% + if (!m_bHasSummonedElites && m_creature->GetHealthPercent() < 85.0f) + { + StartNextDialogueText(SAY_ILLIDAN_MINION); + m_bHasSummonedElites = true; } - if (m_bIsWalking && m_uiWalkTimer) + // Phase 1 to 2 transition + if (m_uiPhase == PHASE_AKAMA && m_creature->GetHealthPercent() < 65.0f) { - if (m_uiWalkTimer <= diff) - { - if (WayPoint == WayPointList.end()) - return; + DoScriptText(SAY_TAKEOFF, m_creature); + m_uiSummonBladesTimer = 10000; + m_uiCenterMoveTimer = 2000; + m_uiPhase = PHASE_BLADES; - m_creature->GetMotionMaster()->MovePoint(WayPoint->id, WayPoint->x, WayPoint->y,WayPoint->z); - m_uiWalkTimer = 0; - }else m_uiWalkTimer -= diff; + m_creature->RemoveAllAuras(); + m_creature->SetLevitate(true); + SetCombatMovement(false); + m_creature->GetMotionMaster()->Clear(); + m_creature->HandleEmote(EMOTE_ONESHOT_LIFTOFF); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + return; } - if (m_bStartChanneling) + // Summon Maiev at 30% hp + if (m_uiPhase == PHASE_DUAL_NORMAL && m_creature->GetHealthPercent() <= 30.0f) { - if (m_uiChannelTimer < diff) + if (DoCastSpellIfCan(m_creature, SPELL_SHADOW_PRISON, CAST_INTERRUPT_PREVIOUS) == CAST_OK) { - switch(m_uiChannelCount) - { - case 3: - if (!m_bDoorOpen) - { - m_creature->InterruptNonMeleeSpells(true); - - for(uint8 i = 0; i < 2; ++i) - { - if (m_aSpiritGuids[i]) - { - Creature* Spirit = m_creature->GetMap()->GetCreature(m_aSpiritGuids[i]); - if (Spirit) - Spirit->InterruptNonMeleeSpells(true); - } - } - - if (GameObject* pGate = m_pInstance->GetSingleGameObjectFromStorage(GO_ILLIDAN_GATE)) - pGate->SetGoState(GO_STATE_ACTIVE); - - ++m_uiChannelCount; - m_uiChannelTimer = 5000; - } - break; - case 4: - m_creature->HandleEmote(EMOTE_ONESHOT_SALUTE); - m_uiChannelTimer = 2000; - ++m_uiChannelCount; - break; - case 5: - DoScriptText(SAY_AKAMA_BEWARE, m_creature); - if (m_channelGuid) - { - Creature* ChannelTarget = m_creature->GetMap()->GetCreature(m_channelGuid); - if (ChannelTarget) - ChannelTarget->SetDeathState(JUST_DIED); - m_channelGuid.Clear(); - } - for(uint8 i = 0; i < 2; ++i) - { - if (m_aSpiritGuids[i]) - { - Creature* Spirit = m_creature->GetMap()->GetCreature(m_aSpiritGuids[i]); - if (Spirit) - Spirit->SetDeathState(JUST_DIED); - } - } - m_uiChannelTimer = 6000; - ++m_uiChannelCount; - break; - case 6: - m_bStartChanneling = false; - if (WayPointList.empty()) - { - error_log("SD2: Akama has no waypoints to start with!"); - return; - } + StartNextDialogueText(SAY_ILLIDAN_SPEECH_6); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - WayPoint = WayPointList.begin(); - m_creature->SetWalk(true); - m_creature->GetMotionMaster()->MovePoint(WayPoint->id, WayPoint->x, WayPoint->y, WayPoint->z); - m_bIsWalking = true; - break; - default: - if (m_channelGuid) - { - Creature* Channel = m_creature->GetMap()->GetCreature(m_channelGuid); - if (Channel) - { - m_creature->InterruptNonMeleeSpells(true); + SetCombatMovement(false); + m_creature->GetMotionMaster()->Clear(); + m_creature->GetMotionMaster()->MoveIdle(); - for(uint8 i = 0; i < 2; ++i) - { - if (m_aSpiritGuids[i]) - { - Creature* Spirit = m_creature->GetMap()->GetCreature(m_aSpiritGuids[i]); - if (Spirit) - { - Spirit->InterruptNonMeleeSpells(true); - if (m_uiChannelCount%2 == 0) - { - Spirit->CastSpell(Channel, SPELL_DEATHSWORN_DOOR_CHANNEL,false); - DoCastSpellIfCan(Channel, SPELL_AKAMA_DOOR_CHANNEL); - } - else - { - if (Spirit->GetVisibility() == VISIBILITY_OFF) - Spirit->SetVisibility(VISIBILITY_ON); - } - } - } - } - if (m_uiChannelCount < 3) - ++m_uiChannelCount; - m_uiChannelTimer = 10000; - } - } - break; - } + m_uiPhase = PHASE_TRANSITION; + m_uiTransformTimer = 0; } - else - m_uiChannelTimer -= diff; + return; } - if (m_bFightMinions) + if (m_uiBerserkTimer) { - if (m_uiSummonMinionTimer < diff) + if (m_uiBerserkTimer <= uiDiff) { - float x,y,z; - m_creature->GetPosition(x,y,z); - Creature* Elite = m_creature->SummonCreature(ILLIDARI_ELITE, x+rand()%10, y+rand()%10, z, 0, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 30000); - if (Elite) + if (DoCastSpellIfCan(m_creature, SPELL_BERSERK) == CAST_OK) { - Elite->AI()->AttackStart(m_creature); - Elite->AddThreat(m_creature, 1000000.0f); - AttackStart(Elite); + DoScriptText(SAY_BERSERK, m_creature); + m_uiBerserkTimer = 0; } - m_uiSummonMinionTimer = urand(10000, 16000); } else - m_uiSummonMinionTimer -= diff; + m_uiBerserkTimer -= uiDiff; } - // If we don't have a target, or is talking, or has run away, return - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - - DoMeleeAttackIfReady(); - } -}; - -/************************************** Illidan's AI ***************************************/ -struct MANGOS_DLL_DECL boss_illidan_stormrageAI : public ScriptedAI -{ - boss_illidan_stormrageAI(Creature* pCreature) : ScriptedAI(pCreature) - { - m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - Reset(); - } - - /** Instance Data **/ - ScriptedInstance* m_pInstance; - - /** Generic **/ - bool m_bIsTalking; - bool m_bHasSummoned; - bool m_bRefaceVictim; - uint32 m_uiPhase; - uint32 m_uiGlobalTimer; - uint32 m_uiTalkCount; - uint32 m_uiDemonFormSequence; - - /** GUIDs **/ - ObjectGuid m_flameGuids[2]; - ObjectGuid m_glaiveGuids[2]; - ObjectGuid m_akamaGuid; - ObjectGuid m_maievGuid; - - /** Timers **/ - uint32 m_uiShearTimer; - uint32 m_uiDrawSoulTimer; - uint32 m_uiFlameCrashTimer; - uint32 m_uiParasiticShadowFiendTimer; - uint32 m_uiFireballTimer; - uint32 m_uiEyeBlastTimer; - uint32 m_uiDarkBarrageTimer; - uint32 m_uiSummonBladesTimer; // Animate summoning the Blades of Azzinoth in Phase 2 - uint32 m_uiSummonFlamesTimer; // Summon Flames of Azzinoth in Phase 2 - uint32 m_uiCheckFlamesTimer; // This is used to check the status of the Flames to see if we should begin entering Phase 3 or not. - uint32 m_uiRetrieveBladesTimer; // Animate retrieving the Blades of Azzinoth in Phase 2 -> 3 transition - uint32 m_uiLandTimer; // This is used at the end of uiPhase 2 to signal Illidan landing after Flames are dead - uint32 m_uiAgonizingFlamesTimer; - uint32 m_uiShadowBlastTimer; - uint32 m_uiFlameBurstTimer; - uint32 m_uiShadowDemonTimer; - uint32 m_uiTalkTimer; - uint32 m_uiTransformTimer; - uint32 m_uiEnrageTimer; - uint32 m_uiCageTimer; - uint32 m_uiLayTrapTimer; - uint32 m_uiAnimationTimer; - uint32 m_uiTauntTimer; // This is used for his random yells - uint32 m_uiFaceVictimTimer; - uint32 m_uiBerserkTimer; - - void Reset() - { - m_uiPhase = PHASE_NORMAL; - - m_bRefaceVictim = false; - m_bHasSummoned = false; - - m_uiFaceVictimTimer = 1000; - m_uiBerserkTimer = 1500000; - m_uiGlobalTimer = 0; - m_uiDemonFormSequence = 0; - - /** Normal Form **/ - m_uiShearTimer = urand(20000, 30000); // 20 to 30 seconds - m_uiFlameCrashTimer = 30000; // 30 seconds - m_uiParasiticShadowFiendTimer = 25000; // 25 seconds - m_uiDrawSoulTimer = 50000; // 50 seconds - - /** Phase 2 **/ - m_uiSummonBladesTimer = 10000; - m_uiSummonFlamesTimer = 20000; // Phase 2 timers may be incorrect - m_uiFireballTimer = 5000; - m_uiDarkBarrageTimer = 45000; - m_uiEyeBlastTimer = 30000; - m_uiCheckFlamesTimer = 5000; - m_uiRetrieveBladesTimer = 5000; - m_uiLandTimer = 0; - - /** Phase 3+ **/ - m_uiAgonizingFlamesTimer = 35000; // Phase 3+ timers may be incorrect - m_uiShadowBlastTimer = 3000; - m_uiFlameBurstTimer = 10000; - m_uiShadowDemonTimer = 30000; - m_uiTransformTimer = 90000; - m_uiEnrageTimer = 40000; - m_uiCageTimer = 30000; - m_uiLayTrapTimer = m_uiCageTimer + 2000; - m_uiAnimationTimer = 0; - - m_uiTauntTimer = 30000; // This timer may be off. - - m_creature->SetDisplayId(21135); - m_creature->InterruptNonMeleeSpells(false); - m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - - // Unequip warglaives if needed - SetEquipmentSlots(false, EQUIP_UNEQUIP, EQUIP_UNEQUIP, EQUIP_NO_CHANGE); - - m_creature->SetLevitate(false); - - m_bIsTalking = false; - - m_uiTalkCount = 0; - m_uiTalkTimer = 0; - - SetCombatMovement(false); // Start idle - } - - void GetAIInformation(ChatHandler& reader) - { - reader.PSendSysMessage("Boss Illidan, current uiPhase = %u, m_uiDemonFormSequence = %u", m_uiPhase, m_uiDemonFormSequence); - reader.PSendSysMessage("Boolean Vars: m_bIsTalking is %s, m_bHasSummoned is %s, m_bRefaceVictim is %s", m_bIsTalking ? "true" : "false", m_bHasSummoned ? "true" : "false", m_bRefaceVictim ? "true" : "false"); - reader.PSendSysMessage("Guids: Akama is %s, Maiev is %s", m_akamaGuid.GetString().c_str(), m_maievGuid.GetString().c_str()); - } - - void JustReachedHome() - { - // Check if Maiev are alive/existing. Despawn and clear Guid - if (Creature* Maiev = m_creature->GetMap()->GetCreature(m_maievGuid)) - Maiev->ForcedDespawn(); - m_maievGuid.Clear(); - - // Check if any flames/glaives are alive/existing. Kill if alive and clear Guids - for (uint8 i = 0; i < 2; ++i) - { - if (Creature* pFlame = m_creature->GetMap()->GetCreature(m_flameGuids[i])) - { - if (pFlame->isAlive()) - pFlame->SetDeathState(JUST_DIED); - - m_flameGuids[i].Clear(); - } - - if (Creature* pGlaive = m_creature->GetMap()->GetCreature(m_glaiveGuids[i])) - { - if (pGlaive->isAlive()) - pGlaive->SetDeathState(JUST_DIED); - - m_glaiveGuids[i].Clear(); - } - } - - if (Creature* pAkama = m_creature->GetMap()->GetCreature(m_akamaGuid)) - { - if (!pAkama->isAlive()) - pAkama->Respawn(); - - pAkama->AI()->EnterEvadeMode(); - } - - if (m_pInstance) - m_pInstance->SetData(TYPE_ILLIDAN, FAIL); - } - - void MoveInLineOfSight(Unit* pWho) - { - if (!pWho || m_creature->getVictim() || m_bIsTalking || m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE)) - return; - - if (pWho->isTargetableForAttack() && pWho->isInAccessablePlaceFor(m_creature) && m_creature->IsHostileTo(pWho)) - { - if (!m_creature->CanFly() && m_creature->GetDistanceZ(pWho) > CREATURE_Z_ATTACK_RANGE) - return; - - float attackRadius = m_creature->GetAttackDistance(pWho); - if (m_creature->IsWithinDistInMap(pWho, attackRadius) && m_creature->IsWithinLOSInMap(pWho)) - { - pWho->RemoveSpellsCausingAura(SPELL_AURA_MOD_STEALTH); - AttackStart(pWho); - } - } - } - - void JustDied(Unit* pKiller) - { - m_bIsTalking = false; - m_uiTalkCount = 0; - m_uiTalkTimer = 0; - - m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - - if (!m_pInstance) - return; - - // Completed - m_pInstance->SetData(TYPE_ILLIDAN, DONE); - - for(uint32 i = GO_ILLIDAN_DOOR_R; i < GO_ILLIDAN_DOOR_L + 1; ++i) - { - // Open Doors - if (GameObject* pDoor = m_pInstance->GetSingleGameObjectFromStorage(i)) - pDoor->SetGoState(GO_STATE_ACTIVE); - } - - } - - void KilledUnit(Unit* pVictim) - { - if (pVictim == m_creature) - return; - - DoScriptText(urand(0, 1) ? SAY_KILL1 : SAY_KILL2, m_creature); - } - - void DamageTaken(Unit* pDealer, uint32& uiDamage) - { - if (uiDamage > m_creature->GetHealth()) // Don't let ourselves be slain before we do our death speech - { - uiDamage = 0; - m_creature->SetHealth(m_creature->GetMaxHealth()/100); - } - } - - void Cast(Unit* pVictim, uint32 uiSpellId, bool bTriggered = false) - { - if (!pVictim) - return; - - m_bRefaceVictim = true; - m_creature->SetTargetGuid(pVictim->GetObjectGuid()); - m_creature->CastSpell(pVictim, uiSpellId, bTriggered); - } - - /** This will handle the cast of eye blast **/ - void CastEyeBlast() - { - m_creature->InterruptNonMeleeSpells(false); - - m_uiDarkBarrageTimer += 10000; - - DoScriptText(SAY_EYE_BLAST, m_creature); - - uint32 uiInitial = urand(0, 3); - uint32 uiFinal = 0; - - if (uiInitial < 3) - uiFinal = uiInitial+1; - - float initial_X = aEyeBlast[uiInitial].x; - float initial_Y = aEyeBlast[uiInitial].y; - float initial_Z = aEyeBlast[uiInitial].z; - - float final_X = aEyeBlast[uiFinal].x; - float final_Y = aEyeBlast[uiFinal].y; - float final_Z = aEyeBlast[uiFinal].z; - - for(uint8 i = 0; i < 2; ++i) - { - if (Creature* pTrigger = m_creature->SummonCreature(DEMON_FIRE, initial_X, initial_Y, initial_Z, 0, TEMPSUMMON_TIMED_DESPAWN, 20000)) - { - if (demonfireAI* pTriggerAI = dynamic_cast(pTrigger->AI())) - pTriggerAI->m_bIsTrigger = true; - - pTrigger->GetMotionMaster()->MovePoint(0, final_X, final_Y, final_Z); - - if (!i) - pTrigger->CastSpell(pTrigger, SPELL_EYE_BLAST_TRIGGER, true); - else - { - pTrigger->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - m_creature->SetTargetGuid(pTrigger->GetObjectGuid()); - DoCastSpellIfCan(pTrigger, SPELL_EYE_BLAST); - } - } - } - } - - // It's only cast on players that are greater than 15 yards away from Illidan. - //If no one is found, cast it on MT instead (since selecting someone in that 15 yard radius would cause the flames to hit the MT anyway). - void CastAgonizingFlames() - { - // We'll use a grid searcher that selects a player that is at a distance >15 yards - if (Player* pPlayer = GetPlayerAtMinimumRange(15.0f)) - DoCastSpellIfCan(pPlayer, SPELL_AGONIZING_FLAMES); - else - DoCastSpellIfCan(m_creature->getVictim(), SPELL_AGONIZING_FLAMES); - } - - void Talk(uint32 count) - { - if (!m_creature->isAlive()) - return; - - int32 text = 0; - - if (aConversation[count].textId) - text = aConversation[count].textId; - - m_uiTalkTimer = aConversation[count].timer; - uint32 emote = aConversation[count].emote; - m_bIsTalking = aConversation[count].Talk; - Creature* pCreature = NULL; - ObjectGuid Guid; - - if (aConversation[count].creature == ILLIDAN_STORMRAGE) - pCreature = m_creature; - else if (aConversation[count].creature == AKAMA) - { - if (!m_akamaGuid) - { - if (m_pInstance) - { - m_akamaGuid = m_pInstance->GetGuid(NPC_AKAMA); - if (!m_akamaGuid) - return; - Guid = m_akamaGuid; - } - } - else Guid = m_akamaGuid; - } - else if (aConversation[count].creature == MAIEV_SHADOWSONG) - { - if (!m_maievGuid) - return; - Guid = m_maievGuid; - } - else if (aConversation[count].creature == EMPTY) // This is just for special cases without speech/sounds/emotes. - return; - - if (Guid) // Now we check if we actually specified a GUID, if so: - // we grab a pointer to that creature - pCreature = m_creature->GetMap()->GetCreature(Guid); - - if (pCreature) - { - if (emote) - pCreature->HandleEmote(emote); // Make the creature do some animation - if (text) - DoScriptText(text, pCreature); // Have the creature yell out some text - } - } - - void Move(float X, float Y, float Z, Creature* pCreature) - { - pCreature->GetMotionMaster()->MovePoint(0, X, Y, Z); - } - - void HandleDemonTransformAnimation(uint32 uiSequenceCount) - { - m_uiAnimationTimer = DemonTransformation[uiSequenceCount].uiTimer; - - m_creature->InterruptNonMeleeSpells(false); - - if (DemonTransformation[uiSequenceCount].uiPhase != PHASE_NORMAL_FORM) - { - m_creature->GetMotionMaster()->Clear(); - m_creature->GetMotionMaster()->MoveIdle(); - } - - if (DemonTransformation[uiSequenceCount].uiUnAura) - m_creature->RemoveAurasDueToSpell(DemonTransformation[uiSequenceCount].uiUnAura); - - if (DemonTransformation[uiSequenceCount].uiAura) - DoCastSpellIfCan(m_creature, DemonTransformation[uiSequenceCount].uiAura, CAST_TRIGGERED); - - if (DemonTransformation[uiSequenceCount].uiDisplayId) - // It's morphin time! - m_creature->SetDisplayId(DemonTransformation[uiSequenceCount].uiDisplayId); - /*if (DemonTransformation[uiSequenceCount].uiSize) - m_creature->SetUInt32Value(OBJECT_FIELD_SCALE_X, DemonTransformation[uiSequenceCount].uiSize); // Let us grow! (or shrink)*/ - - if (DemonTransformation[uiSequenceCount].bEquip) + switch (m_uiPhase) { - // Requip warglaives if needed - SetEquipmentSlots(false, EQUIP_ID_MAIN_HAND, EQUIP_ID_OFF_HAND, EQUIP_NO_CHANGE); - } - else - { - // Unequip warglaives if needed - SetEquipmentSlots(false, EQUIP_UNEQUIP, EQUIP_UNEQUIP, EQUIP_NO_CHANGE); - } + case PHASE_MAIEV: - if (DemonTransformation[uiSequenceCount].uiPhase != PHASE_NORMAL_FORM) - m_uiPhase = DemonTransformation[uiSequenceCount].uiPhase; // Set uiPhase properly - else - { - // Refollow and attack our old victim - SetCombatMovement(true); - m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); - - // Depending on whether we summoned Maiev, we switch to either uiPhase 5 or 3 - if (m_maievGuid) - m_uiPhase = PHASE_NORMAL_MAIEV; - else - m_uiPhase = PHASE_NORMAL_2; - } - - if (uiSequenceCount == 7) - { - DoResetThreat(); - m_creature->RemoveAurasDueToSpell(SPELL_DEMON_FORM); - } - else if (uiSequenceCount == 4) - { - DoResetThreat(); - if (!m_creature->HasAura(SPELL_DEMON_FORM, EFFECT_INDEX_0)) - DoCastSpellIfCan(m_creature, SPELL_DEMON_FORM, CAST_TRIGGERED); - } - } - - /** To reduce the amount of code in UpdateAI, we can seperate them into different functions and simply call them from UpdateAI **/ - void EnterPhase2() - { - DoScriptText(SAY_TAKEOFF, m_creature); - - m_uiSummonBladesTimer = 10000; // Summon Glaives when this decrements - m_uiSummonFlamesTimer = 20000; // Summon Flames when this decrements - m_uiGlobalTimer += 20000; - m_uiLandTimer = 0; - m_uiPhase = PHASE_FLIGHT; - m_creature->RemoveAllAuras(); - m_creature->SetTargetGuid(ObjectGuid()); - - // So players don't shoot us down - m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - - // We now hover! - m_creature->SetLevitate(true); - SetCombatMovement(false); - m_creature->GetMotionMaster()->Clear(false); - m_creature->GetMotionMaster()->MovePoint(0, CENTER_X, CENTER_Y, CENTER_Z); - for(uint8 i = 0; i < 2; ++i) - { - Creature* Glaive = m_creature->SummonCreature(BLADE_OF_AZZINOTH, aGlaivePosition[i].x, aGlaivePosition[i].y, aGlaivePosition[i].z, 0, TEMPSUMMON_CORPSE_DESPAWN, 0); - if (Glaive) - { - m_glaiveGuids[i] = Glaive->GetObjectGuid(); // We need this to remove them later on - Glaive->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - Glaive->SetVisibility(VISIBILITY_OFF); - Glaive->setFaction(m_creature->getFaction()); - } - } - } - - void SummonBladesOfAzzinoth() - { - m_creature->GetMotionMaster()->Clear(false); - - m_uiLandTimer = 0; - m_uiRetrieveBladesTimer = 0; - - // Make it look like we're throwing the glaives on the ground - DoCastSpellIfCan(m_creature, SPELL_THROW_GLAIVE2); - - // We no longer wear the glaives! - // since they are now channeling the flames (or will be) - SetEquipmentSlots(false, EQUIP_UNEQUIP, EQUIP_UNEQUIP, EQUIP_NO_CHANGE); - - for(uint8 i = 0; i < 2; ++i) - { - Creature* Glaive = NULL; - Glaive = m_creature->GetMap()->GetCreature(m_glaiveGuids[i]); - if (Glaive) - { - DoCastSpellIfCan(Glaive, SPELL_THROW_GLAIVE, CAST_TRIGGERED); - Glaive->SetVisibility(VISIBILITY_ON); - } - } - } - - void SummonFlamesOfAzzinoth() - { - DoScriptText(SAY_SUMMONFLAMES, m_creature); - - for(uint8 i = 0; i < 2; ++i) - { - Creature* Flame = NULL; - Creature* Glaive = NULL; - Glaive = m_creature->GetMap()->GetCreature(m_glaiveGuids[i]); - if (Glaive) - { - Flame = m_creature->SummonCreature(FLAME_OF_AZZINOTH, aGlaivePosition[i+2].x, aGlaivePosition[i+2].y, aGlaivePosition[i+2].z, 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 5000); - if (Flame) + // Phase 5 spell only + if (m_uiEnrageTimer < uiDiff) { - // Just in case the database has it as a different faction - Flame->setFaction(m_creature->getFaction()); - - // Attack our target! - Flame->AI()->AttackStart(m_creature->getVictim()); - - // Record GUID in order to check if they're dead later on to move to the next uiPhase - m_flameGuids[i] = Flame->GetObjectGuid(); - - // Glaives do some random Beam type channel on it. - Glaive->CastSpell(Flame, SPELL_AZZINOTH_CHANNEL, true); - - if (m_creature->getVictim()) - Flame->AI()->AttackStart(m_creature->getVictim()); + if (DoCastSpellIfCan(m_creature, SPELL_FRENZY) == CAST_OK) + { + DoScriptText(SAY_FRENZY, m_creature); + m_uiEnrageTimer = 40000; + } } else - { - error_log("SD2: Illidan Stormrage AI: Unable to summon Flame of Azzinoth (entry: 22997), please check your database"); - EnterEvadeMode(); - } - } - else - { - error_log("SD2: Illidan Stormrage AI: Unable to summon Blade of Azzinoth (entry: 22996), please check your database"); - } - } - DoResetThreat(); // And now reset our threatlist - m_bHasSummoned = true; - } - - void SummonMaiev() - { - m_uiTauntTimer += 4000; - m_uiGlobalTimer += 4000; - - m_creature->InterruptNonMeleeSpells(false); // Interrupt any of our spells - Creature* Maiev = NULL; // Summon Maiev near Illidan - Maiev = m_creature->SummonCreature(MAIEV_SHADOWSONG, m_creature->GetPositionX() + 10, m_creature->GetPositionY() + 5, m_creature->GetPositionZ()+2, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 45000); - if (Maiev) - { - SetCombatMovement(false); - m_creature->GetMotionMaster()->Clear(false); // Stop moving, it's rude to walk and talk! - m_creature->GetMotionMaster()->MoveIdle(); - // Just in case someone is unaffected by Shadow Prison - m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - DoCastSpellIfCan(m_creature, SPELL_SHADOW_PRISON, CAST_TRIGGERED); - m_uiTalkCount = 10; - m_bIsTalking = true; // We are now talking/ - Maiev->SetVisibility(VISIBILITY_OFF); // Leave her invisible until she has to talk - Maiev->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - m_maievGuid = Maiev->GetObjectGuid(); - } - else // If Maiev cannot be summoned, reset the encounter and post some errors to the console. - { - EnterEvadeMode(); - debug_log("SD2: Unable to summon Maiev Shadowsong and enter Phase 4. Resetting Encounter."); - error_log("SD2: Unable to summon Maiev Shadowsong (entry: 23197). Check your database to see if you have the proper SQL for Maiev Shadowsong (entry: 23197)"); - } - } - - void InitializeDeath() - { - m_creature->RemoveAllAuras(); - DoCastSpellIfCan(m_creature, SPELL_DEATH); // Animate his kneeling + stun him - // Don't let the players interrupt our talk! - m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - SetCombatMovement(false); - m_creature->GetMotionMaster()->Clear(false); // No moving! - m_creature->GetMotionMaster()->MoveIdle(); - - if (m_maievGuid) - { - if (Creature* Maiev = m_creature->GetMap()->GetCreature(m_maievGuid)) - { - Maiev->CombatStop(true); // Maiev shouldn't do anything either. No point in her attacking us =] - Maiev->GetMotionMaster()->Clear(false); // Stop her from moving as well - Maiev->GetMotionMaster()->MoveIdle(); - - float distance = 10.0f; - float dx = m_creature->GetPositionX() + (distance*cos(m_creature->GetOrientation())); - float dy = m_creature->GetPositionY() + (distance*sin(m_creature->GetOrientation())); - - Maiev->NearTeleportTo(dx, dy, Maiev->GetPositionZ(), 0.0f); - - Maiev->CastSpell(Maiev, SPELL_TELEPORT_VISUAL, true); - Maiev->SetTargetGuid(m_creature->GetObjectGuid()); - } - } - m_bIsTalking = true; - ++m_uiTalkCount; - } - - void UpdateAI(const uint32 uiDiff) - { - /*** This section will handle the conversations ***/ - if (m_bIsTalking) // Somewhat more efficient using a function rather than a long switch - { - if (m_uiTalkTimer < uiDiff) - { - switch(m_uiTalkCount) // This is only for specialized cases - { - case 0: - // Time to stand up! - m_creature->RemoveAurasDueToSpell(SPELL_KNEEL); - break; - case 8: - // Equip our warglaives! - SetEquipmentSlots(false, EQUIP_ID_MAIN_HAND, EQUIP_ID_OFF_HAND, EQUIP_NO_CHANGE); - // Hostile if we weren't before - m_creature->setFaction(14); - break; - case 9: - SetCombatMovement(true); - if (m_akamaGuid) - { - if (Creature* pAkama = m_creature->GetMap()->GetCreature(m_akamaGuid)) - { - // Start attacking Akama - AttackStart(pAkama); - - // Akama stop talk and start attack illidan - if (npc_akama_illidanAI* pAkamaAI = dynamic_cast(pAkama->AI())) - pAkamaAI->m_bIsTalking = false; - - pAkama->AI()->AttackStart(m_creature); - pAkama->AddThreat(m_creature, 1000000.0f); - } - } - - // We are now attackable! - m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - debug_log("SD2: Black Temple: Illidan intro complete, players can attack Illidan."); - break; - case 11: - if (m_maievGuid) - { - Creature* Maiev = m_creature->GetMap()->GetCreature(m_maievGuid); - if (Maiev) - { - // Maiev is now visible - Maiev->SetVisibility(VISIBILITY_ON); - // onoz she looks like she teleported! - Maiev->CastSpell(Maiev, SPELL_TELEPORT_VISUAL, true); - // Have her face us - Maiev->SetTargetGuid(m_creature->GetObjectGuid()); - // Face her, so it's not rude =P - m_creature->SetTargetGuid(Maiev->GetObjectGuid()); - } - } - break; - case 14: - if (Creature* pMaiev = m_creature->GetMap()->GetCreature(m_maievGuid)) - { - pMaiev->GetMotionMaster()->Clear(false); - pMaiev->GetMotionMaster()->MoveChase(m_creature); - // Have Maiev add a lot of threat on us so that players don't pull her off if they damage her via AOE - pMaiev->AddThreat(m_creature, 10000000.0f); - // Force Maiev to attack us. - pMaiev->AI()->AttackStart(m_creature); - pMaiev->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - } - m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - SetCombatMovement(true); - m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); - m_bIsTalking = false; - m_uiFaceVictimTimer = 2000; - m_bRefaceVictim = true; - break; - case 20: - // Kill ourself. - if (Creature* Maiev = m_creature->GetMap()->GetCreature(m_maievGuid)) - { - // Make Maiev leave - Maiev->CastSpell(Maiev, SPELL_TELEPORT_VISUAL, true); - Maiev->SetDeathState(JUST_DIED); - } - m_bIsTalking = false; - if (m_creature->getVictim()) - m_creature->getVictim()->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE,SPELL_SCHOOL_MASK_NORMAL, NULL, false); - else - // Now we kill ourself - m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); - break; - } - - // This function does most of the talking - Talk(m_uiTalkCount); - ++m_uiTalkCount; - } - else - m_uiTalkTimer -= uiDiff; - - // No further action while talking - return; - } - - // If we don't have a target, return. - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; + m_uiEnrageTimer -= uiDiff; - // If we are 'caged', then we shouldn't do anything such as cast spells or transform into Demon Form. - if (m_creature->HasAura(SPELL_CAGED, EFFECT_INDEX_0)) - { - // Just so that he doesn't immediately enrage after he stops being caged. - m_uiEnrageTimer = 40000; - m_uiCageTimer = 30000; - return; - } + if (m_uiTrapTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_CAGE_TRAP) == CAST_OK) + m_uiTrapTimer = urand(40000, 50000); + } + else + m_uiTrapTimer -= uiDiff; - // Berserk Timer - flat 25 minutes - if (m_uiPhase != PHASE_DEMON_SEQUENCE && !m_creature->HasAura(SPELL_BERSERK, EFFECT_INDEX_0)) - { - if (m_uiBerserkTimer < uiDiff) - { - DoScriptText(SAY_ENRAGE, m_creature); - DoCastSpellIfCan(m_creature, SPELL_BERSERK, CAST_TRIGGERED); - } - else - m_uiBerserkTimer -= uiDiff; - } + // no break; + case PHASE_DUAL_NORMAL: - if (m_bRefaceVictim) - { - if (m_uiFaceVictimTimer < uiDiff) - { - m_creature->SetTargetGuid(m_creature->getVictim()->GetObjectGuid()); - m_uiFaceVictimTimer = 1000; - m_bRefaceVictim = false; - } - else - m_uiFaceVictimTimer -= uiDiff; - } + // Phase 3 and 5 spells + if (m_uiAgonizingFlamesTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_AGONIZING_FLAMES) == CAST_OK) + m_uiAgonizingFlamesTimer = 60000; + } + else + m_uiAgonizingFlamesTimer -= uiDiff; - /** Signal to change to uiPhase 2 **/ - if (m_uiPhase == PHASE_NORMAL && m_creature->GetHealthPercent() < 65.0f) - { - EnterPhase2(); - return; - } + if (m_uiTransformTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_DEMON_TRANSFORM_1) == CAST_OK) + { + DoScriptText(SAY_MORPH, m_creature); - /** Signal to summon Maiev at 30% health**/ - if (!m_maievGuid && !(m_uiPhase == PHASE_DEMON || m_uiPhase == PHASE_DEMON_SEQUENCE) && m_creature->GetHealthPercent() < 30.0f) - { - SummonMaiev(); - return; - } + m_uiPrevPhase = m_uiPhase; + m_uiPhase = PHASE_TRANSITION; + m_uiTransformTimer = 12500; + m_uiFlameBurstTimer = 10000; + m_uiShadowDemonTimer = 30000; - /** Time for the death speech **/ - if (!(m_uiPhase == PHASE_DEMON || m_uiPhase == PHASE_DEMON_SEQUENCE) && m_creature->GetHealthPercent() < 1.0f) - { - InitializeDeath(); - return; - } + SetCombatMovement(false); + m_creature->GetMotionMaster()->Clear(); + m_creature->GetMotionMaster()->MoveIdle(); + } + } + else + m_uiTransformTimer -= uiDiff; - /***** Spells for Phase 1, 3 and 5 (Normal Form) ******/ - if (m_uiPhase == PHASE_NORMAL || m_uiPhase == PHASE_NORMAL_2 || m_uiPhase == PHASE_NORMAL_MAIEV) - { - if (m_uiTauntTimer < uiDiff) // His random taunt/yell uiTimer. - { - uint32 random = urand(0, 3); - int32 yell = aRandomTaunts[random].textId; - if (yell) - DoScriptText(yell, m_creature); - m_uiTauntTimer = 32000; - } - else - m_uiTauntTimer -= uiDiff; + // no break; + case PHASE_AKAMA: - // Global Timer so that spells do not overlap. - if (m_uiGlobalTimer < uiDiff) - { if (m_uiShearTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_SHEAR); - m_uiShearTimer = urand(25000, 40000); - m_uiGlobalTimer += 2000; + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_SHEAR) == CAST_OK) + m_uiShearTimer = urand(10000, 15000); } else m_uiShearTimer -= uiDiff; if (m_uiFlameCrashTimer < uiDiff) { - //It spawns multiple flames sometimes. Therefore, we'll do this manually. - //DoCastSpellIfCan(m_creature->getVictim(), SPELL_FLAME_CRASH); - m_creature->SummonCreature(FLAME_CRASH, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN, 40000); - m_uiFlameCrashTimer = 35000; - m_uiGlobalTimer += 2000; + if (DoCastSpellIfCan(m_creature, SPELL_FLAME_CRASH) == CAST_OK) + m_uiFlameCrashTimer = urand(25000, 35000); } else m_uiFlameCrashTimer -= uiDiff; - if (m_uiParasiticShadowFiendTimer < uiDiff) + if (m_uiShadowFiendTimer < uiDiff) { - Unit* target = NULL; - target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,1); - if (target && target->isAlive() && !target->HasAura(SPELL_PARASITIC_SHADOWFIEND, EFFECT_INDEX_0)) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1, SPELL_PARASITIC_SHADOWFIEND, SELECT_FLAG_PLAYER)) { - Cast(target, SPELL_PARASITIC_SHADOWFIEND); - m_uiParasiticShadowFiendTimer = 40000; + if (DoCastSpellIfCan(pTarget, SPELL_PARASITIC_SHADOWFIEND) == CAST_OK) + m_uiShadowFiendTimer = 40000; } } else - m_uiParasiticShadowFiendTimer -= uiDiff; + m_uiShadowFiendTimer -= uiDiff; if (m_uiDrawSoulTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_DRAW_SOUL); - m_uiDrawSoulTimer = 55000; - m_uiGlobalTimer += 3000; + if (DoCastSpellIfCan(m_creature, SPELL_DRAW_SOUL) == CAST_OK) + m_uiDrawSoulTimer = 35000; } else m_uiDrawSoulTimer -= uiDiff; - } - else - m_uiGlobalTimer -= uiDiff; - DoMeleeAttackIfReady(); - } + DoMeleeAttackIfReady(); - /*** Phase 2 ***/ - if (m_uiPhase == PHASE_FLIGHT) - { - // Check if we have summoned or not. - if (!m_bHasSummoned) - { - if (m_uiSummonBladesTimer) + break; + case PHASE_BLADES: + + if (m_uiCenterMoveTimer) { - if (m_uiSummonBladesTimer <= uiDiff) + if (m_uiCenterMoveTimer <= uiDiff) { - SummonBladesOfAzzinoth(); - m_uiSummonBladesTimer = 0; + // The movement is not very clear - it may be possible that he is moving around the center during this phase + // ToDo: this requires additional resarch. For now bring him near home position + m_creature->GetMotionMaster()->MovePoint(0, aCenterLoc[0].fX, aCenterLoc[0].fY, aCenterLoc[0].fZ); + m_uiCenterMoveTimer = 0; } else - m_uiSummonBladesTimer -= uiDiff; + m_uiCenterMoveTimer -= uiDiff; } - if (m_uiSummonFlamesTimer < uiDiff) - { - SummonFlamesOfAzzinoth(); - } - else - m_uiSummonFlamesTimer -= uiDiff; - } - - if (!m_creature->GetMotionMaster()->empty() && (m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() != POINT_MOTION_TYPE)) - m_creature->GetMotionMaster()->Clear(false); - - if (m_bHasSummoned) - { - if (m_uiCheckFlamesTimer) + if (m_uiSummonBladesTimer) { - if (m_uiCheckFlamesTimer <= uiDiff) + if (m_uiSummonBladesTimer <= uiDiff) { - // Check if flames are dead or non-existant. If so, set GUID to 0. - for(uint8 i = 0; i < 2; ++i) + if (m_pInstance) { - if (m_flameGuids[i]) - { - Creature* pFlame = m_creature->GetMap()->GetCreature(m_flameGuids[i]); + // Need to provide explicit glaive targets + GuidVector vTargetsVect; + m_pInstance->GetGlaiveTargetGuidVector(vTargetsVect); - // If the flame dies, or somehow the pointer becomes invalid, reset Guid. - if (!pFlame || !pFlame->isAlive()) - m_flameGuids[i].Clear(); + Creature* pGlaive1 = m_creature->GetMap()->GetCreature(vTargetsVect[0]); + Creature* pGlaive2 = m_creature->GetMap()->GetCreature(vTargetsVect[1]); + if (!pGlaive1 || !pGlaive2) + return; + + // Summon both blades and remove them from equipment + if (DoCastSpellIfCan(pGlaive1, SPELL_THROW_GLAIVE_VISUAL) == CAST_OK) + { + DoCastSpellIfCan(pGlaive2, SPELL_THROW_GLAIVE, CAST_TRIGGERED); + SetEquipmentSlots(false, EQUIP_UNEQUIP, EQUIP_UNEQUIP, EQUIP_NO_CHANGE); + m_uiSummonBladesTimer = 0; } } - m_uiCheckFlamesTimer = 500; } else - m_uiCheckFlamesTimer -= uiDiff; + m_uiSummonBladesTimer -= uiDiff; + + // no other spells during takeoff + return; } - // If both flames are dead/non-existant, kill glaives and change to uiPhase 3. - if (!m_flameGuids[0] && !m_flameGuids[1] && m_uiCheckFlamesTimer) + if (m_uiFireballTimer < uiDiff) { - m_uiRetrieveBladesTimer = 5000; // Prepare for re-equipin! - m_uiCheckFlamesTimer = 0; + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, SPELL_FIREBALL) == CAST_OK) + m_uiFireballTimer = urand(2000, 3000); + } } + else + m_uiFireballTimer -= uiDiff; - if (m_uiRetrieveBladesTimer) + if (m_uiDarkBarrageTimer < uiDiff) { - if (m_uiRetrieveBladesTimer <= uiDiff) // Time to get back our glaives! + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) { - // Interrupt any spells we might be doing *cough* DArk Barrage *cough* - m_creature->InterruptNonMeleeSpells(false); - for(uint8 i = 0; i < 2; ++i) - { - if (Creature* pGlaive = m_creature->GetMap()->GetCreature(m_glaiveGuids[i])) - { - // Make it look like the Glaive flies back up to us - pGlaive->CastSpell(m_creature, SPELL_GLAIVE_RETURNS, true); - // Despawn the Glaive - pGlaive->SetDeathState(JUST_DIED); - m_glaiveGuids[i].Clear(); - } - } - - // Re-bEquip our warblades! - SetEquipmentSlots(false, EQUIP_ID_MAIN_HAND, EQUIP_ID_OFF_HAND, EQUIP_NO_CHANGE); - - // Prepare for landin'! - m_uiLandTimer = 5000; - m_uiRetrieveBladesTimer = 0; + if (DoCastSpellIfCan(pTarget, SPELL_DARK_BARRAGE) == CAST_OK) + m_uiDarkBarrageTimer = 45000; } - else - m_uiRetrieveBladesTimer -= uiDiff; } + else + m_uiDarkBarrageTimer -= uiDiff; - if (m_uiLandTimer) + if (m_uiEyeBlastTimer < uiDiff) { - // Time to land! - if (m_uiLandTimer <= uiDiff) + if (DoCastEyeBlastIfCan()) { - DoResetThreat(); + m_uiEyeBlastTimer = urand(35000, 45000); + m_uiFireballTimer = 15000; + } + } + else + m_uiEyeBlastTimer -= uiDiff; - // anndddd touchdown! - m_creature->HandleEmote(EMOTE_ONESHOT_LAND); - m_creature->SetLevitate(false); - m_uiPhase = PHASE_NORMAL_2; + break; + case PHASE_DUAL_DEMON: - // We should let the raid fight us =) - m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - m_creature->SetTargetGuid(m_creature->getVictim()->GetObjectGuid()); + // Handle phase transition at 30% + if (m_uiPrevPhase == PHASE_DUAL_NORMAL && m_creature->GetHealthPercent() <= 30.0f) + { + if (DoCastSpellIfCan(m_creature, SPELL_DEMON_TRANSFORM_1) == CAST_OK) + { + m_uiTransformTimer = 12500; + m_uiPhase = PHASE_TRANSITION; - // Chase our victim! SetCombatMovement(true); + m_creature->GetMotionMaster()->Clear(); m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); } - else - m_uiLandTimer -= uiDiff; - - return; // Do not continue past this point if m_uiLandTimer is not 0 and we are in uiPhase 2. } - } - if (m_uiGlobalTimer < uiDiff) - { - if (m_uiFireballTimer < uiDiff) + if (m_uiTransformTimer < uiDiff) { - Cast(m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0), SPELL_FIREBALL); - m_uiFireballTimer = 5000; + if (DoCastSpellIfCan(m_creature, SPELL_DEMON_TRANSFORM_1) == CAST_OK) + { + m_uiTransformTimer = 12500; + m_uiPhase = PHASE_TRANSITION; + + SetCombatMovement(true); + m_creature->GetMotionMaster()->Clear(); + m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); + } } else - m_uiFireballTimer -= uiDiff; + m_uiTransformTimer -= uiDiff; - if (m_uiDarkBarrageTimer < uiDiff) + if (m_uiShadowDemonTimer < uiDiff) { - m_creature->InterruptNonMeleeSpells(false); - - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) - DoCastSpellIfCan(pTarget, SPELL_DARK_BARRAGE); - - m_uiDarkBarrageTimer = 35000; - m_uiGlobalTimer += 9000; + if (DoCastSpellIfCan(m_creature, SPELL_SUMMON_SHADOW_DEMONS) == CAST_OK) + m_uiShadowDemonTimer = 60000; } else - m_uiDarkBarrageTimer -= uiDiff; + m_uiShadowDemonTimer -= uiDiff; - if (m_uiEyeBlastTimer < uiDiff) + if (m_uiShadowBlastTimer < uiDiff) { - CastEyeBlast(); - m_uiEyeBlastTimer = 30000; + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_TOPAGGRO, 0)) + { + if (DoCastSpellIfCan(pTarget, SPELL_SHADOW_BLAST) == CAST_OK) + m_uiShadowBlastTimer = urand(2000, 3000); + } } else - m_uiEyeBlastTimer -= uiDiff; - } - else - m_uiGlobalTimer -= uiDiff; - } + m_uiShadowBlastTimer -= uiDiff; - /** Phase 3,5 spells only**/ - if (m_uiPhase == PHASE_NORMAL_2 || m_uiPhase == PHASE_NORMAL_MAIEV) - { - if (m_uiGlobalTimer < uiDiff) - { - if (m_uiAgonizingFlamesTimer < uiDiff) + if (m_uiFlameBurstTimer < uiDiff) { - CastAgonizingFlames(); - m_uiAgonizingFlamesTimer = 60000; + if (DoCastSpellIfCan(m_creature, SPELL_FLAME_BURST) == CAST_OK) + m_uiFlameBurstTimer = 20000; } else - m_uiAgonizingFlamesTimer -= uiDiff; - } - else - m_uiGlobalTimer -= uiDiff; - - if (m_uiTransformTimer < uiDiff) - { - float CurHealth = m_creature->GetHealthPercent(); - // Prevent Illidan from morphing if less than 32% or 5%, as this may cause issues with the uiPhase transition or death speech - if ((CurHealth < 32.0f && !m_maievGuid) || CurHealth < 5.0f) - return; - - m_uiPhase = PHASE_DEMON_SEQUENCE; // Transform sequence - m_uiDemonFormSequence = 0; - m_uiAnimationTimer = 0; - - DoScriptText(SAY_MORPH, m_creature); - - m_uiTransformTimer = 60000; - m_uiFlameBurstTimer = 10000; - m_uiShadowDemonTimer = 30000; - SetCombatMovement(false); - m_creature->GetMotionMaster()->Clear(false);// Stop moving - } - else - m_uiTransformTimer -= uiDiff; - } - - /** Phase 4 spells only (Demon Form) **/ - if (m_uiPhase == PHASE_DEMON) - { - // Stop moving if we are by clearing movement generators. - if (!m_creature->GetMotionMaster()->empty()) - m_creature->GetMotionMaster()->Clear(false); + m_uiFlameBurstTimer -= uiDiff; - if (m_uiTransformTimer < uiDiff) - { - m_uiPhase = PHASE_DEMON_SEQUENCE; - m_uiDemonFormSequence = 5; - m_uiAnimationTimer = 100; - m_uiTransformTimer = 60000; - } - else - m_uiTransformTimer -= uiDiff; + break; + case PHASE_TRANSITION: - if (m_uiShadowDemonTimer < uiDiff) - { - m_creature->InterruptNonMeleeSpells(false); - for (uint8 i = 0; i < 4; ++i) + if (m_uiLandTimer) { - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0, uint32(0), SELECT_FLAG_PLAYER)) + if (m_uiLandTimer <= uiDiff) { - if (Creature* ShadowDemon = m_creature->SummonCreature(SHADOW_DEMON, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 25000)) + switch (m_uiLandStage) { - ShadowDemon->AddThreat(pTarget, 5000000.0f); - ShadowDemon->AI()->AttackStart(pTarget); - ShadowDemon->SetInCombatWithZone(); + case 0: + // Despawn the blades + for (GuidList::const_iterator itr = m_lBladesGuidList.begin(); itr != m_lBladesGuidList.end(); ++itr) + { + if (Creature* pBlade = m_creature->GetMap()->GetCreature(*itr)) + { + pBlade->CastSpell(m_creature, SPELL_GLAIVE_RETURNS, true); + pBlade->ForcedDespawn(500); + } + } + m_uiLandTimer = 5000; + break; + case 1: + // Set the equipment and land + SetEquipmentSlots(false, EQUIP_ID_MAIN_HAND, EQUIP_ID_OFF_HAND, EQUIP_NO_CHANGE); + + m_creature->SetLevitate(false); + m_creature->HandleEmote(EMOTE_ONESHOT_LAND); + m_uiLandTimer = 2000; + break; + case 2: + // Start phase 3 + DoResetThreat(); + m_uiPhase = PHASE_DUAL_NORMAL; + + SetCombatMovement(true); + m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + m_uiTransformTimer = 64000; + m_uiLandTimer = 0; + break; } + ++m_uiLandStage; } + else + m_uiLandTimer -= uiDiff; } - m_uiShadowDemonTimer = 60000; - } - else - m_uiShadowDemonTimer -= uiDiff; - if (m_uiGlobalTimer < uiDiff) - { - if (m_uiShadowBlastTimer < uiDiff) + if (m_uiTransformTimer) { - Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_TOPAGGRO, 0); - if (target && target->isAlive()) + if (m_uiTransformTimer <= uiDiff) { - m_creature->SetTargetGuid(target->GetObjectGuid()); - DoCastSpellIfCan(target, SPELL_SHADOW_BLAST); - m_uiShadowBlastTimer = 4000; - m_uiGlobalTimer += 1500; + // Drop the transform time from the spell timers + if (m_creature->HasAura(SPELL_DEMON_FORM)) + { + DoResetThreat(); + m_uiPhase = PHASE_DUAL_DEMON; + m_uiShadowDemonTimer = 17000; + m_uiFlameBurstTimer = 7000; + m_uiTransformTimer = 47000; + } + else + { + m_uiPhase = m_uiPrevPhase; + m_uiEnrageTimer = 40000; + m_uiTransformTimer = 60000; + m_uiTrapTimer = urand(30000, 40000); + } } - if (!m_creature->HasAura(SPELL_DEMON_FORM, EFFECT_INDEX_0)) - DoCastSpellIfCan(m_creature, SPELL_DEMON_FORM, CAST_TRIGGERED); + else + m_uiTransformTimer -= uiDiff; } - else - m_uiShadowBlastTimer -= uiDiff; - if (m_uiFlameBurstTimer < uiDiff) - { - DoCastSpellIfCan(m_creature, SPELL_FLAME_BURST); - m_uiFlameBurstTimer = 15000; - } - else - m_uiFlameBurstTimer -= uiDiff; - } - else - m_uiGlobalTimer -= uiDiff; + break; + } + } +}; + +/*###### +## npc_akama_illidan +######*/ + +struct MANGOS_DLL_DECL npc_akama_illidanAI : public npc_escortAI, private DialogueHelper +{ + npc_akama_illidanAI(Creature* pCreature) : npc_escortAI(pCreature), + DialogueHelper(aIntroDialogue) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + InitializeDialogueHelper(m_pInstance); + Reset(); + } + + ScriptedInstance* m_pInstance; + + uint32 m_uiSummonMinionTimer; + uint32 m_uiHealDelayTimer; + uint32 m_uiChainLightningTimer; + + bool m_bFightMinions; + bool m_bIsIntroFinished; + + void Reset() + { + m_uiSummonMinionTimer = 2000; + m_uiHealDelayTimer = 0; + m_uiChainLightningTimer = urand(5000, 10000); + + if (!HasEscortState(STATE_ESCORT_ESCORTING)) + { + m_bFightMinions = false; + m_bIsIntroFinished = false; } + } + + void MoveInLineOfSight(Unit* pWho) + { + if (HasEscortState(STATE_ESCORT_ESCORTING)) + return; - /** Phase 5 timers. Enrage spell **/ - if (m_uiPhase == PHASE_NORMAL_MAIEV) + // Star the event + if (pWho->GetTypeId() == TYPEID_PLAYER && pWho->IsWithinDistInMap(m_creature, 70.0f) && pWho->IsWithinLOSInMap(m_creature)) + Start(true); + } + + void AttackStart(Unit* pWho) + { + // Don't attack Illidan again + if (m_bIsIntroFinished && pWho->GetEntry() == NPC_ILLIDAN_STORMRAGE) + return; + + npc_escortAI::AttackStart(pWho); + } + + void EnterEvadeMode() + { + // Called first when evading from Illidan + if (!m_bIsIntroFinished) { - if (m_uiEnrageTimer < uiDiff) - { - DoCastSpellIfCan(m_creature, SPELL_ENRAGE); - m_uiEnrageTimer = 40000; - m_uiCageTimer = 30000; - m_uiTransformTimer += 10000; - } - else - m_uiEnrageTimer -= uiDiff; + SetEscortPaused(false); + m_bIsIntroFinished = true; + } - // We'll handle Cage Trap in Illidan's script for simplicity's sake - if (m_uiCageTimer < uiDiff) - { - if (m_maievGuid) - { - Creature* Maiev = m_creature->GetMap()->GetCreature(m_maievGuid); - Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0); + // Go back to epilogue position + if (m_pInstance && m_pInstance->GetData(TYPE_ILLIDAN) == DONE) + { + SetEscortPaused(false); + m_bFightMinions = false; + } - if (!Maiev || !target || (target->GetTypeId() != TYPEID_PLAYER)) - return; + npc_escortAI::EnterEvadeMode(); + } - float X, Y, Z; - target->GetPosition(X, Y, Z); - Maiev->GetMap()->CreatureRelocation(m_creature, X, Y, Z, Maiev->GetOrientation()); + void WaypointReached(uint32 uiPointId) + { + switch (uiPointId) + { + case 0: + SetEscortPaused(true); + m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); + break; + case 9: + SetEscortPaused(true); + if (m_pInstance) + { + if (Creature* pTrigger = m_pInstance->GetSingleCreatureFromStorage(NPC_ILLIDAN_DOOR_TRIGGER)) + m_creature->SetFacingToObject(pTrigger); + } + StartNextDialogueText(SAY_AKAMA_OPEN_DOOR_1); + break; + case 16: + SetEscortPaused(true); + m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); + if (m_pInstance) + { + if (Creature* pIllidan = m_pInstance->GetSingleCreatureFromStorage(NPC_ILLIDAN_STORMRAGE)) + m_creature->SetFacingToObject(pIllidan); + } + break; + case 17: + SetEscortPaused(true); + if (m_pInstance) + { + if (Creature* pIllidan = m_pInstance->GetSingleCreatureFromStorage(NPC_ILLIDAN_STORMRAGE)) + { + if (boss_illidan_stormrageAI* pIllidanAI = dynamic_cast(pIllidan->AI())) + pIllidanAI->DoStartCombatEvent(); - // Make it look like she 'teleported' - Maiev->CastSpell(Maiev, SPELL_TELEPORT_VISUAL, true); - // summon the trap! - Maiev->CastSpell(Maiev, SPELL_CAGE_TRAP_SUMMON, false); + m_creature->SetFacingToObject(pIllidan); + } } - m_uiCageTimer = 15000; - } - else - m_uiCageTimer -= uiDiff; + break; + case 24: + SetEscortPaused(true); + m_bFightMinions = true; + break; + case 30: + SetEscortPaused(true); + if (m_pInstance) + { + // Move to a close point to Illidan + if (Creature* pIllidan = m_pInstance->GetSingleCreatureFromStorage(NPC_ILLIDAN_STORMRAGE)) + { + float fX, fY, fZ; + m_creature->GetRandomPoint(pIllidan->GetPositionX(), pIllidan->GetPositionY(), pIllidan->GetPositionZ(), 5.0f, fX, fY, fZ); + m_creature->GetMotionMaster()->MovePoint(100, fX, fY, fZ); + } + } + break; } + } + + void MovementInform(uint32 uiMoveType, uint32 uiPointId) + { + npc_escortAI::MovementInform(uiMoveType, uiPointId); + + if (uiMoveType != POINT_MOTION_TYPE || uiPointId != 100) + return; - if (m_uiPhase == PHASE_DEMON_SEQUENCE) // Demonic Transformation + // Do outro + if (m_pInstance) { - if (m_uiAnimationTimer < uiDiff) - { - HandleDemonTransformAnimation(m_uiDemonFormSequence); - ++m_uiDemonFormSequence; - } - else - m_uiAnimationTimer -= uiDiff; + if (Creature* pIllidan = m_pInstance->GetSingleCreatureFromStorage(NPC_ILLIDAN_STORMRAGE)) + m_creature->SetFacingToObject(pIllidan); } + + DoScriptText(SAY_AKAMA_EPILOGUE_5, m_creature); + m_creature->ForcedDespawn(10000); } -}; -/*********************** End of Illidan AI ******************************************/ + void JustDidDialogueStep(int32 iEntry) + { + switch (iEntry) + { + case SPELL_AKAMA_DOOR_FAIL: + DoCastSpellIfCan(m_creature, SPELL_AKAMA_DOOR_FAIL); + break; + case NPC_SPIRIT_OF_OLUM: + m_creature->SummonCreature(NPC_SPIRIT_OF_OLUM, 751.64f, 297.22f, 312.21f, 6.03f, TEMPSUMMON_TIMED_DESPAWN, 25000); + m_creature->SummonCreature(NPC_SPIRIT_OF_UDALO, 751.47f, 311.01f, 312.19f, 0.0f, TEMPSUMMON_TIMED_DESPAWN, 25000); + break; + case SPELL_AKAMA_DOOR_CHANNEL: + DoCastSpellIfCan(m_creature, SPELL_AKAMA_DOOR_CHANNEL); + if (m_pInstance) + { + if (Creature* pOlum = m_pInstance->GetSingleCreatureFromStorage(NPC_SPIRIT_OF_OLUM)) + pOlum->CastSpell(pOlum, SPELL_DEATHSWORN_DOOR_CHANNEL, true); + if (Creature* pUdalo = m_pInstance->GetSingleCreatureFromStorage(NPC_SPIRIT_OF_UDALO)) + pUdalo->CastSpell(pUdalo, SPELL_DEATHSWORN_DOOR_CHANNEL, true); + } + break; + case GO_ILLIDAN_GATE: + if (m_pInstance) + m_pInstance->DoUseDoorOrButton(GO_ILLIDAN_GATE); + break; + case NPC_SPIRIT_OF_UDALO: + SetEscortPaused(false); + break; + } + } -void npc_akama_illidanAI::BeginEvent(ObjectGuid playerGuid) -{ - debug_log("SD2: Akama - Illidan Introduction started. Illidan event properly begun."); - if (m_pInstance) + void JustSummoned(Creature* pSummoned) { - m_illidanGuid = m_pInstance->GetGuid(NPC_ILLIDAN_STORMRAGE); - m_pInstance->SetData(TYPE_ILLIDAN, IN_PROGRESS); + switch (pSummoned->GetEntry()) + { + case NPC_ILLIDARI_ELITE: + pSummoned->AI()->AttackStart(m_creature); + break; + case NPC_SPIRIT_OF_OLUM: + case NPC_SPIRIT_OF_UDALO: + pSummoned->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); + break; + } } - if (m_pInstance) + // Wrapper to handle event resume + void DoResumeEvent() { - m_pInstance->DoUseDoorOrButton(GO_ILLIDAN_DOOR_R); - m_pInstance->DoUseDoorOrButton(GO_ILLIDAN_DOOR_L); + SetEscortPaused(false); + m_creature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); } - if (m_illidanGuid) + void UpdateEscortAI(const uint32 uiDiff) { - m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + DialogueUpdate(uiDiff); - if (Creature* pIllidan = m_creature->GetMap()->GetCreature(m_illidanGuid)) + if (m_bFightMinions) { - boss_illidan_stormrageAI* pIllidanAI = dynamic_cast(pIllidan->AI()); - - if (!pIllidanAI) - return; - - // Time for Illidan to stand up. - pIllidan->RemoveAurasDueToSpell(SPELL_KNEEL); - - // First line of Akama-Illidan convo - - pIllidanAI->m_uiTalkCount = 0; - - // Begin Talking - pIllidanAI->m_bIsTalking = true; - pIllidanAI->m_akamaGuid = m_creature->GetObjectGuid(); - - m_creature->SetTargetGuid(pIllidan->GetObjectGuid()); - pIllidan->SetTargetGuid(m_creature->GetObjectGuid()); - - m_bIsTalking = true; // Prevent Akama from starting to attack him - // Prevent players from talking again + if (m_uiSummonMinionTimer < uiDiff) + { + for (uint8 i = 0; i < MAX_ILLIDARI_ELITES; ++i) + m_creature->SummonCreature(NPC_ILLIDARI_ELITE, aIllidariElitesPos[i].fX, aIllidariElitesPos[i].fY, aIllidariElitesPos[i].fZ, 0, TEMPSUMMON_DEAD_DESPAWN, 0); - m_creature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); - m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + m_uiSummonMinionTimer = urand(35000, 50000); + } + else + m_uiSummonMinionTimer -= uiDiff; + } - pIllidan->GetMotionMaster()->Clear(false); - pIllidan->GetMotionMaster()->MoveIdle(); + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; - m_creature->GetMotionMaster()->Clear(false); - m_creature->GetMotionMaster()->MoveIdle(); + if (m_uiHealDelayTimer) + { + if (m_uiHealDelayTimer <= uiDiff) + m_uiHealDelayTimer = 0; + else + m_uiHealDelayTimer -= uiDiff; + } - if (playerGuid) + if (m_bFightMinions) + { + if (m_uiChainLightningTimer < uiDiff) { - if (Player* pPlayer = m_creature->GetMap()->GetPlayer(playerGuid)) - pIllidan->AddThreat(pPlayer, 100.0f); + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_CHAIN_LIGHTNING) == CAST_OK) + m_uiChainLightningTimer = urand(4000, 8000); } + else + m_uiChainLightningTimer -= uiDiff; + } + + if (m_creature->GetHealthPercent() < 10.0f && !m_uiHealDelayTimer) + { + if (DoCastSpellIfCan(m_creature, SPELL_HEALING_POTION) == CAST_OK) + m_uiHealDelayTimer = 30000; } + + DoMeleeAttackIfReady(); } -} +}; -bool GossipHello_npc_akama_at_illidan(Player* pPlayer, Creature* pCreature) +bool GossipHello_npc_akama_illidan(Player* pPlayer, Creature* pCreature) { - // TODO: Add gossip item only when Council is done? - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF); - pPlayer->SEND_GOSSIP_MENU(10465, pCreature->GetObjectGuid()); + // Before climbing the stairs + if (pCreature->GetPositionZ() < 300.0f) + { + pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_PREPARE, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); + pPlayer->SEND_GOSSIP_MENU(TEXT_ID_AKAMA_ILLIDAN_PREPARE, pCreature->GetObjectGuid()); + } + // Before starting combat + else + { + pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_START_EVENT, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); + pPlayer->SEND_GOSSIP_MENU(TEXT_ID_AKAMA_ILLIDAN_START, pCreature->GetObjectGuid()); + } return true; } -bool GossipSelect_npc_akama_at_illidan(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +bool GossipSelect_npc_akama_illidan(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) { - if (uiAction == GOSSIP_ACTION_INFO_DEF) // Time to begin the event + if (uiAction == GOSSIP_ACTION_INFO_DEF+1 || GOSSIP_ACTION_INFO_DEF+2) { pPlayer->CLOSE_GOSSIP_MENU(); if (npc_akama_illidanAI* pAkamaAI = dynamic_cast(pCreature->AI())) - pAkamaAI->BeginDoorEvent(pPlayer); + pAkamaAI->DoResumeEvent(); } + return true; } -struct MANGOS_DLL_DECL boss_maievAI : public ScriptedAI +/*###### +## boss_maiev +######*/ + +struct MANGOS_DLL_DECL boss_maievAI : public ScriptedAI, private DialogueHelper { - boss_maievAI(Creature* pCreature) : ScriptedAI(pCreature) + boss_maievAI(Creature* pCreature) : ScriptedAI(pCreature), + DialogueHelper(aEpilogueDialogue) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + InitializeDialogueHelper(m_pInstance); Reset(); }; + ScriptedInstance* m_pInstance; + uint32 m_uiTauntTimer; - ObjectGuid m_illidanGuid; + uint32 m_uiShadowStriketimer; + uint32 m_uiThrowDaggerTimer; - ScriptedInstance* m_pInstance; + bool m_bHasYelledTrap; void Reset() { - m_uiTauntTimer = 12000; + m_uiTauntTimer = urand(40000, 60000); + m_uiShadowStriketimer = urand(4000, 8000); + m_uiThrowDaggerTimer = urand(6000, 10000); + m_bHasYelledTrap = false; + + // Not sure if this is correct, but she seems to ignore all the shadow damage inflicted + m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_SHADOW, true); + } + + void KilledUnit(Unit* pVictim) + { + // Dummy function - used to start the epilogue + if (pVictim->GetEntry() == NPC_ILLIDAN_STORMRAGE) + StartNextDialogueText(SAY_MAIEV_EPILOGUE_1); + } + + // Custom evade - don't allow her to return to home position + void EnterEvadeMode() + { + m_creature->RemoveAllAuras(); + m_creature->DeleteThreatList(); + m_creature->CombatStop(true); + m_creature->LoadCreatureAddon(true); + + m_creature->SetLootRecipient(NULL); + + Reset(); } - void UpdateAI(const uint32 diff) + // Attack only by script + void MoveInLineOfSight(Unit* pWho) { } + + void JustDidDialogueStep(int32 iEntry) { - if (!m_illidanGuid) + switch (iEntry) { - if (m_pInstance) - m_illidanGuid = m_pInstance->GetGuid(NPC_ILLIDAN_STORMRAGE); + case NPC_ILLIDAN_STORMRAGE: + if (m_pInstance) + { + if (Creature* pIllidan = m_pInstance->GetSingleCreatureFromStorage(NPC_ILLIDAN_STORMRAGE)) + pIllidan->DealDamage(pIllidan, pIllidan->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NONE, NULL, false); + } + break; + case SPELL_TELEPORT_VISUAL: + if (DoCastSpellIfCan(m_creature, SPELL_TELEPORT_VISUAL) == CAST_OK) + m_creature->ForcedDespawn(1000); + break; } - else - { - Creature* pIllidan = m_creature->GetMap()->GetCreature(m_illidanGuid); + } - if (!pIllidan || !pIllidan->isAlive() || pIllidan->IsInEvadeMode()) + void SpellHit(Unit* pCaster, const SpellEntry* pSpell) + { + if (pSpell->Id == SPELL_CAGE_TRAP) + { + // Yell only the first time + if (!m_bHasYelledTrap) { - m_creature->SetVisibility(VISIBILITY_OFF); - m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + DoScriptText(SAY_MAIEV_TRAP, m_creature); + m_bHasYelledTrap = true; } - else if (pIllidan && pIllidan->GetHealthPercent() < 2.0f) - return; + DoCastSpellIfCan(m_creature, SPELL_CAGE_TRAP_SUMMON, CAST_TRIGGERED); } + } + + void UpdateAI(const uint32 uiDiff) + { + DialogueUpdate(uiDiff); - // Return if we don't have a target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - if (m_uiTauntTimer < diff) + if (m_uiTauntTimer < uiDiff) { - uint32 random = urand(0, 3); - int32 text = aMaievTaunts[random].textId; + switch (urand(0, 2)) + { + case 0: DoScriptText(SAY_MAIEV_TAUNT_1, m_creature); break; + case 1: DoScriptText(SAY_MAIEV_TAUNT_2, m_creature); break; + case 2: DoScriptText(SAY_MAIEV_TAUNT_3, m_creature); break; + } + m_uiTauntTimer = urand(40000, 60000); + } + else + m_uiTauntTimer -= uiDiff; - DoScriptText(text, m_creature); + if (m_uiShadowStriketimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_SHADOW_STRIKE) == CAST_OK) + m_uiShadowStriketimer = urand(12000, 16000); + } + else + m_uiShadowStriketimer -= uiDiff; - m_uiTauntTimer = urand(22000, 42000); + if (m_uiThrowDaggerTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_THROW_DAGGER) == CAST_OK) + m_uiThrowDaggerTimer = urand(6000, 10000); } else - m_uiTauntTimer -= diff; + m_uiThrowDaggerTimer -= uiDiff; DoMeleeAttackIfReady(); } }; -struct MANGOS_DLL_DECL cage_trap_triggerAI : public ScriptedAI -{ - cage_trap_triggerAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } - - ObjectGuid m_illidanGuid; - ObjectGuid m_cageTrapGuid; +/*###### +## npc_cage_trap_trigger +######*/ - uint32 m_uiDespawnTimer; +struct MANGOS_DLL_DECL npc_cage_trap_triggerAI : public ScriptedAI +{ + npc_cage_trap_triggerAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } bool m_bActive; - bool m_bSummonedBeams; void Reset() { m_bActive = false; - m_bSummonedBeams = false; - - m_uiDespawnTimer = 0; - - m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); } - void MoveInLineOfSight(Unit *who) - { - if (!m_bActive) - return; - - if (who && (who->GetTypeId() != TYPEID_PLAYER)) - { - if (who->GetEntry() == ILLIDAN_STORMRAGE) // Check if who is Illidan - { - if (!m_illidanGuid && m_creature->IsWithinDistInMap(who, 3) && !who->HasAura(SPELL_CAGED, EFFECT_INDEX_0)) - { - m_illidanGuid = who->GetObjectGuid(); - who->CastSpell(who, SPELL_CAGED, true); - m_uiDespawnTimer = 5000; - - // Dispel his enrage - if (who->HasAura(SPELL_ENRAGE, EFFECT_INDEX_0)) - who->RemoveAurasDueToSpell(SPELL_ENRAGE); - - if (GameObject* pCageTrap = m_creature->GetMap()->GetGameObject(m_cageTrapGuid)) - pCageTrap->SetLootState(GO_JUST_DEACTIVATED); - } - } - } - } + void AttackStart(Unit* pWho) { } - void UpdateAI(const uint32 diff) + void MoveInLineOfSight(Unit* pWho) { - if (m_uiDespawnTimer) + if (!m_bActive && pWho->GetEntry() == NPC_ILLIDAN_STORMRAGE && m_creature->IsWithinDistInMap(pWho, 3.0f)) { - if (m_uiDespawnTimer <= diff) - m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); - else m_uiDespawnTimer -= diff; - } + pWho->CastSpell(pWho, SPELL_CAGED, true); - //if (m_illidanGuid && !m_bSummonedBeams) - //{ - // if (Creature* pIllidan = m_creature->GetMap()->GetCreature(m_illidanGuid) - // { - // //TODO: Find proper spells and properly apply 'caged' Illidan effect - // } - //} - } -}; + // Cast the visual effects + for (uint8 i = 0; i < MAX_CAGE_SPELLS; ++i) + DoCastSpellIfCan(m_creature, aCagedSummonSpells[i], CAST_TRIGGERED); -bool GOUse_go_cage_trap(Player* pPlayer, GameObject* pGo) -{ - float x, y, z; - pPlayer->GetPosition(x, y, z); + for (uint8 i = 0; i < MAX_CAGE_SPELLS; ++i) + DoCastSpellIfCan(m_creature, aCagedVisualSpells[i], CAST_TRIGGERED); - // Grid search for nearest live creature of entry 23304 within 10 yards - Creature* pTrigger = GetClosestCreatureWithEntry(pGo, 23304, 10.0f); + if (GameObject* pCageTrap = GetClosestGameObjectWithEntry(m_creature, GO_CAGE_TRAP, 5.0f)) + pCageTrap->Use(m_creature); - if (!pTrigger) - { - error_log("SD2: Cage Trap- Unable to find trigger. This Cage Trap is now useless"); - return false; + m_bActive = true; + m_creature->ForcedDespawn(15000); + } } - if (cage_trap_triggerAI* pTriggerAI = dynamic_cast(pTrigger->AI())) - pTriggerAI->m_bActive = true; + void UpdateAI(const uint32 uiDiff) { } +}; - pGo->SetGoState(GO_STATE_ACTIVE); - return true; -} +/*###### +## npc_flame_of_azzinoth +######*/ -struct MANGOS_DLL_DECL flame_of_azzinothAI : public ScriptedAI +struct MANGOS_DLL_DECL npc_flame_of_azzinothAI : public ScriptedAI { - flame_of_azzinothAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + npc_flame_of_azzinothAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} uint32 m_uiFlameBlastTimer; uint32 m_uiSummonBlazeTimer; uint32 m_uiChargeTimer; + uint32 m_uiWrathCheckTimer; void Reset() { - m_uiFlameBlastTimer = urand(15000, 30000); - m_uiSummonBlazeTimer = urand(10000, 30000); - m_uiChargeTimer = 5000; + m_uiFlameBlastTimer = 10000; + m_uiSummonBlazeTimer = 0; + m_uiChargeTimer = 5000; + m_uiWrathCheckTimer = 1000; } - void Charge() + void JustSummoned(Creature* pSummoned) { - // Get the Threat List - ThreatList const& tList = m_creature->getThreatManager().getThreatList(); - - // He doesn't have anyone in his threatlist, useless to continue - if (tList.empty()) - return; - - std::list targets; - - //store the threat list in a different container - for (ThreatList::const_iterator itr = tList.begin();itr != tList.end(); ++itr) - { - Unit *target = m_creature->GetMap()->GetUnit((*itr)->getUnitGuid()); - - //only on alive players - if (target && target->isAlive() && target->GetTypeId() == TYPEID_PLAYER) - targets.push_back(target); - } - - //Sort the list of players - targets.sort(ObjectDistanceOrderReversed(m_creature)); - //Resize so we only get the furthest target - targets.resize(1); - - Unit* target = (*targets.begin()); - if (target && (!m_creature->IsWithinDistInMap(target, 40))) - { - DoCastSpellIfCan(m_creature, SPELL_ENRAGE, CAST_TRIGGERED); - DoCastSpellIfCan(target, SPELL_CHARGE); - } + if (pSummoned->GetEntry() == NPC_BLAZE) + pSummoned->CastSpell(pSummoned, SPELL_BLAZE_EFFECT, false); } - void UpdateAI(const uint32 diff) + void UpdateAI(const uint32 uiDiff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - if (m_uiFlameBlastTimer < diff) + if (m_uiFlameBlastTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_FLAME_BLAST); - m_uiFlameBlastTimer = 30000; + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_FLAME_BLAST) == CAST_OK) + { + m_uiFlameBlastTimer = 10000; + m_uiSummonBlazeTimer = 3000; + } } else - m_uiFlameBlastTimer -= diff; + m_uiFlameBlastTimer -= uiDiff; + + if (m_uiSummonBlazeTimer) + { + if (m_uiSummonBlazeTimer <= uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_BLAZE) == CAST_OK) + m_uiSummonBlazeTimer = 0; + } + else + m_uiSummonBlazeTimer -= uiDiff; + } - if (m_uiSummonBlazeTimer < diff) + // Workaround for broken aura 41997; the creature should enrage if not within dist of 30 from summoner + // This should be done by checking if aura 41997 is removed from self, when getting out of range + if (m_uiWrathCheckTimer) { - DoCastSpellIfCan(m_creature, SPELL_BLAZE_SUMMON); - m_uiSummonBlazeTimer = urand(30000, 50000); + if (m_uiWrathCheckTimer <= uiDiff) + { + if (GetClosestCreatureWithEntry(m_creature, NPC_BLADE_OF_AZZINOTH, 30.0f)) + m_uiWrathCheckTimer = 1000; + else + { + if (DoCastSpellIfCan(m_creature, SPELL_UNCAGED_WRATH, CAST_TRIGGERED) == CAST_OK) + m_uiWrathCheckTimer = 0; + } + } + else + m_uiWrathCheckTimer -= uiDiff; } - else - m_uiSummonBlazeTimer -= diff; - if (m_uiChargeTimer < diff) + // Try to find a suitable target to charge + if (m_uiChargeTimer < uiDiff) { - Charge(); - m_uiChargeTimer = 5000; + std::vector suitableTargets; + ThreatList const& threatList = m_creature->getThreatManager().getThreatList(); + ThreatList::const_iterator itr = threatList.begin(); + + for (itr; itr != threatList.end(); ++itr) + { + if (Unit* pTarget = m_creature->GetMap()->GetUnit((*itr)->getUnitGuid())) + { + if (pTarget->GetTypeId() == TYPEID_PLAYER && !pTarget->IsWithinDist(m_creature, 30.0f)) + suitableTargets.push_back(pTarget); + } + } + + if (suitableTargets.empty()) + m_uiChargeTimer = 3000; + else + { + Unit* pTarget = suitableTargets[urand(0, suitableTargets.size() - 1)]; + + if (pTarget) + { + if (DoCastSpellIfCan(pTarget, SPELL_CHARGE) == CAST_OK) + m_uiChargeTimer = urand(5000, 10000); + } + } } else - m_uiChargeTimer -= diff; + m_uiChargeTimer -= uiDiff; DoMeleeAttackIfReady(); } }; -struct MANGOS_DLL_DECL shadow_demonAI : public ScriptedAI +/*###### +## npc_shadow_demon +######*/ + +struct MANGOS_DLL_DECL npc_shadow_demonAI : public ScriptedAI { - shadow_demonAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } + npc_shadow_demonAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } ObjectGuid m_targetGuid; void Reset() {} - void JustDied(Unit *killer) - { - if (m_targetGuid) - { - if (Player* pPlayer = m_creature->GetMap()->GetPlayer(m_targetGuid)) - pPlayer->RemoveAurasDueToSpell(SPELL_PARALYZE); - } - } - - void UpdateAI(const uint32 diff) + void AttackStart(Unit* pWho) { - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - // Only cast the below on players. - if (m_creature->getVictim()->GetTypeId() != TYPEID_PLAYER) - return; - - if (!m_creature->getVictim()->HasAura(SPELL_PARALYZE, EFFECT_INDEX_0)) - { - m_targetGuid = m_creature->getVictim()->GetObjectGuid(); - m_creature->AddThreat(m_creature->getVictim(), 10000000.0f); - DoCastSpellIfCan(m_creature, SPELL_SHADOW_DEMON_PASSIVE, CAST_TRIGGERED); - DoCastSpellIfCan(m_creature->getVictim(), SPELL_PURPLE_BEAM, CAST_TRIGGERED); - DoCastSpellIfCan(m_creature->getVictim(), SPELL_PARALYZE, CAST_TRIGGERED); - } - // Kill our target if we're very close. - if (m_creature->IsWithinDistInMap(m_creature->getVictim(), 3)) - DoCastSpellIfCan(m_creature->getVictim(), SPELL_CONSUME_SOUL); + // Function used to set target only - the npc doesn't really attack + m_targetGuid = pWho->GetObjectGuid(); } -}; - -struct MANGOS_DLL_DECL flamecrashAI : public ScriptedAI -{ - flamecrashAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} - uint32 m_uiFlameCrashTimer; - uint32 m_uiDespawnTimer; + void MoveInLineOfSight(Unit* pWho) { } - void Reset() + void JustDied(Unit* pKiller) { - m_uiFlameCrashTimer = urand(3000, 8000); - m_uiDespawnTimer = 60000; + if (Player* pPlayer = m_creature->GetMap()->GetPlayer(m_targetGuid)) + pPlayer->RemoveAurasDueToSpell(SPELL_PARALYZE); } - void AttackStart(Unit *who) { } - - void MoveInLineOfSight(Unit *who){ } - - void UpdateAI(const uint32 diff) + void MovementInform(uint32 uiMovementType, uint32 uiPointId) { - if (m_uiFlameCrashTimer < diff) - { - DoCastSpellIfCan(m_creature, SPELL_FLAME_CRASH_EFFECT); - m_uiFlameCrashTimer = 15000; - } - else - m_uiFlameCrashTimer -= diff; + if (uiMovementType != POINT_MOTION_TYPE || !uiPointId) + return; - if (m_uiDespawnTimer < diff) + if (Player* pPlayer = m_creature->GetMap()->GetPlayer(m_targetGuid)) { - // So that players don't see the sparkly effect when we die. - m_creature->SetVisibility(VISIBILITY_OFF); - m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + if (DoCastSpellIfCan(pPlayer, SPELL_CONSUME_SOUL) == CAST_OK) + m_creature->ForcedDespawn(1000); } - else - m_uiDespawnTimer -= diff; } + + void UpdateAI(const uint32 uiDiff) { } }; -/* ** TODO This code was unused for long time (not used in DB and pointless) - * ** Keep it temporarily as reference +/*###### +## npc_blade_of_azzinoth +######*/ -// Shadowfiends interact with Illidan, setting more targets in Illidan's hashmap -struct MANGOS_DLL_DECL mob_parasitic_shadowfiendAI : public ScriptedAI +struct MANGOS_DLL_DECL npc_blade_of_azzinothAI : public ScriptedAI { - mob_parasitic_shadowfiendAI(Creature* pCreature) : ScriptedAI(pCreature) + npc_blade_of_azzinothAI(Creature* pCreature) : ScriptedAI(pCreature) { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); Reset(); } + ScriptedInstance* m_pInstance; + void Reset() {} - void DoMeleeAttackIfReady() + // Do-Nothing-But-Stand-There + void AttackStart(Unit* pWho) { } + void MoveInLineOfSight(Unit* pWho) { } + + void JustSummoned(Creature* pSummoned) { - //If we are within range melee the target - if (m_creature->CanReachWithMeleeAttack(m_creature->getVictim())) + // Summon a Flame pear each blade + if (pSummoned->GetEntry() == NPC_FLAME_OF_AZZINOTH) { - //Make sure our attack is ready and we aren't currently casting - if (m_creature->isAttackReady() && !m_creature->IsNonMeleeSpellCasted(false)) - { - if (!m_creature->getVictim()->HasAura(SPELL_PARASITIC_SHADOWFIEND, EFFECT_INDEX_0)) - DoCastSpellIfCan(m_creature->getVictim(), SPELL_PARASITIC_SHADOWFIEND, CAST_TRIGGERED); - - m_creature->AttackerStateUpdate(m_creature->getVictim()); - m_creature->resetAttackTimer(); - } + DoCastSpellIfCan(pSummoned, SPELL_AZZINOTH_CHANNEL, CAST_TRIGGERED); + pSummoned->SetInCombatWithZone(); } } -}; -*/ - -struct MANGOS_DLL_DECL blazeAI : public ScriptedAI -{ - blazeAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } - - uint32 m_uiBlazeTimer; - uint32 m_uiDespawnTimer; - - void Reset() - { - m_uiBlazeTimer = 2000; - m_uiDespawnTimer = 15000; - } - - void AttackStart(Unit* who) { } - void MoveInLineOfSight(Unit *who){ } - - void UpdateAI(const uint32 diff) + void SummonedCreatureJustDied(Creature* pSummoned) { - if (m_uiBlazeTimer < diff) + // Inform Illidan when a flame is killed + if (pSummoned->GetEntry() == NPC_FLAME_OF_AZZINOTH) { - DoCastSpellIfCan(m_creature, SPELL_BLAZE_EFFECT); - m_uiBlazeTimer = 15000; - } - else - m_uiBlazeTimer -= diff; + if (!m_pInstance) + return; - if (m_uiDespawnTimer < diff) - { - m_creature->SetVisibility(VISIBILITY_OFF); - m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + // For some reason it doesn't work with Spell Hit for SPELL_GLAIVE_RETURNS script effect, so we need to inform him manually + if (Creature* pIllidan = m_pInstance->GetSingleCreatureFromStorage(NPC_ILLIDAN_STORMRAGE)) + { + if (boss_illidan_stormrageAI* pIllidanAI = dynamic_cast(pIllidan->AI())) + pIllidanAI->DoInformFlameKilled(); + } } - else - m_uiDespawnTimer -= diff; } -}; - -struct MANGOS_DLL_DECL blade_of_azzinothAI : public ScriptedAI -{ - blade_of_azzinothAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } - - void Reset() {} - - // Do-Nothing-But-Stand-There - void AttackStart(Unit* who) { } - void MoveInLineOfSight(Unit* who) { } + void UpdateAI(const uint32 uiDiff) { } }; CreatureAI* GetAI_boss_illidan_stormrage(Creature* pCreature) @@ -2439,14 +1654,9 @@ CreatureAI* GetAI_boss_illidan_stormrage(Creature* pCreature) return new boss_illidan_stormrageAI(pCreature); } -CreatureAI* GetAI_npc_akama_at_illidan(Creature* pCreature) +CreatureAI* GetAI_npc_akama_illidan(Creature* pCreature) { - npc_akama_illidanAI* Akama_AI = new npc_akama_illidanAI(pCreature); - - for(uint8 i = 0; i < 13; ++i) - Akama_AI->AddWaypoint(i, aAkamaWP[i].x, aAkamaWP[i].y, aAkamaWP[i].z); - - return ((CreatureAI*)Akama_AI); + return new npc_akama_illidanAI(pCreature); } CreatureAI* GetAI_boss_maiev(Creature* pCreature) @@ -2456,45 +1666,23 @@ CreatureAI* GetAI_boss_maiev(Creature* pCreature) CreatureAI* GetAI_mob_flame_of_azzinoth(Creature* pCreature) { - return new flame_of_azzinothAI(pCreature); -} - -CreatureAI* GetAI_cage_trap_trigger(Creature* pCreature) -{ - return new cage_trap_triggerAI(pCreature); -} - -CreatureAI* GetAI_shadow_demon(Creature* pCreature) -{ - return new shadow_demonAI(pCreature); -} - -CreatureAI* GetAI_flamecrash(Creature* pCreature) -{ - return new flamecrashAI(pCreature); -} - -CreatureAI* GetAI_demonfire(Creature* pCreature) -{ - return new demonfireAI(pCreature); + return new npc_flame_of_azzinothAI(pCreature); } -CreatureAI* GetAI_blaze(Creature* pCreature) +CreatureAI* GetAI_npc_cage_trap_trigger(Creature* pCreature) { - return new blazeAI(pCreature); + return new npc_cage_trap_triggerAI(pCreature); } -CreatureAI* GetAI_blade_of_azzinoth(Creature* pCreature) +CreatureAI* GetAI_npc_shadow_demon(Creature* pCreature) { - return new blade_of_azzinothAI(pCreature); + return new npc_shadow_demonAI(pCreature); } -/* ** TODO dead code -CreatureAI* GetAI_parasitic_shadowfiend(Creature* pCreature) +CreatureAI* GetAI_npc_blade_of_azzinoth(Creature* pCreature) { - return new mob_parasitic_shadowfiendAI(pCreature); + return new npc_blade_of_azzinothAI(pCreature); } -*/ void AddSC_boss_illidan() { @@ -2507,9 +1695,9 @@ void AddSC_boss_illidan() pNewScript = new Script; pNewScript->Name = "npc_akama_illidan"; - pNewScript->GetAI = &GetAI_npc_akama_at_illidan; - pNewScript->pGossipHello = &GossipHello_npc_akama_at_illidan; - pNewScript->pGossipSelect = &GossipSelect_npc_akama_at_illidan; + pNewScript->GetAI = &GetAI_npc_akama_illidan; + pNewScript->pGossipHello = &GossipHello_npc_akama_illidan; + pNewScript->pGossipSelect = &GossipSelect_npc_akama_illidan; pNewScript->RegisterSelf(); pNewScript = new Script; @@ -2524,43 +1712,16 @@ void AddSC_boss_illidan() pNewScript = new Script; pNewScript->Name = "mob_blade_of_azzinoth"; - pNewScript->GetAI = &GetAI_blade_of_azzinoth; - pNewScript->RegisterSelf(); - - pNewScript = new Script; - pNewScript->Name = "gameobject_cage_trap"; - pNewScript->pGOUse = &GOUse_go_cage_trap; + pNewScript->GetAI = &GetAI_npc_blade_of_azzinoth; pNewScript->RegisterSelf(); pNewScript = new Script; pNewScript->Name = "mob_cage_trap_trigger"; - pNewScript->GetAI = &GetAI_cage_trap_trigger; + pNewScript->GetAI = &GetAI_npc_cage_trap_trigger; pNewScript->RegisterSelf(); pNewScript = new Script; pNewScript->Name = "mob_shadow_demon"; - pNewScript->GetAI = &GetAI_shadow_demon; - pNewScript->RegisterSelf(); - - pNewScript = new Script; - pNewScript->Name = "mob_flame_crash"; - pNewScript->GetAI = &GetAI_flamecrash; - pNewScript->RegisterSelf(); - - pNewScript = new Script; - pNewScript->Name = "mob_demon_fire"; - pNewScript->GetAI = &GetAI_demonfire; - pNewScript->RegisterSelf(); - - pNewScript = new Script; - pNewScript->Name = "mob_blaze"; - pNewScript->GetAI = &GetAI_blaze; - pNewScript->RegisterSelf(); - - /* ** TODO dead code - pNewScript = new Script; - pNewScript->Name = "mob_parasitic_shadowfiend"; - pNewScript->GetAI = &GetAI_parasitic_shadowfiend; + pNewScript->GetAI = &GetAI_npc_shadow_demon; pNewScript->RegisterSelf(); - */ } diff --git a/scripts/outland/black_temple/instance_black_temple.cpp b/scripts/outland/black_temple/instance_black_temple.cpp index c6a2d6694..966ea2f43 100644 --- a/scripts/outland/black_temple/instance_black_temple.cpp +++ b/scripts/outland/black_temple/instance_black_temple.cpp @@ -46,10 +46,18 @@ void instance_black_temple::Initialize() memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); } +void instance_black_temple::OnPlayerEnter(Player* pPlayer) +{ + DoSpawnAkamaIfCan(); +} + bool instance_black_temple::IsEncounterInProgress() const { - for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) - if (m_auiEncounter[i] == IN_PROGRESS) return true; + for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) + { + if (m_auiEncounter[i] == IN_PROGRESS) + return true; + } return false; } @@ -58,10 +66,14 @@ void instance_black_temple::OnCreatureCreate(Creature* pCreature) { switch(pCreature->GetEntry()) { - // SPECIAL - guid is directly used, keep open how to handle - case NPC_AKAMA: m_akamaGuid = pCreature->GetObjectGuid(); break; - case NPC_ILLIDAN_STORMRAGE: m_illidanStormrageGuid = pCreature->GetObjectGuid(); break; - + case NPC_SPIRIT_OF_OLUM: + case NPC_SPIRIT_OF_UDALO: + // Use only the summoned versions + if (!pCreature->IsTemporarySummon()) + break; + case NPC_AKAMA: + case NPC_ILLIDAN_STORMRAGE: + case NPC_MAIEV_SHADOWSONG: case NPC_AKAMA_SHADE: case NPC_SHADE_OF_AKAMA: case NPC_RELIQUARY_OF_SOULS: @@ -71,6 +83,7 @@ void instance_black_temple::OnCreatureCreate(Creature* pCreature) case NPC_VERAS: case NPC_ILLIDARI_COUNCIL: case NPC_COUNCIL_VOICE: + case NPC_ILLIDAN_DOOR_TRIGGER: m_mNpcEntryGuidStore[pCreature->GetEntry()] = pCreature->GetObjectGuid(); break; case NPC_ASH_CHANNELER: @@ -79,6 +92,9 @@ void instance_black_temple::OnCreatureCreate(Creature* pCreature) case NPC_CREATURE_GENERATOR: m_vCreatureGeneratorGuidVector.push_back(pCreature->GetObjectGuid()); break; + case NPC_GLAIVE_TARGET: + m_vGlaiveTargetGuidVector.push_back(pCreature->GetObjectGuid()); + break; } } @@ -110,12 +126,8 @@ void instance_black_temple::OnObjectCreate(GameObject* pGo) pGo->SetGoState(GO_STATE_ACTIVE); break; case GO_PRE_COUNCIL_DOOR: // Door leading to the Council (grand promenade) - break; case GO_COUNCIL_DOOR: // Door leading to the Council (inside) - break; case GO_ILLIDAN_GATE: // Gate leading to Temple Summit - // TODO - dependend on council state - break; case GO_ILLIDAN_DOOR_R: // Right door at Temple Summit case GO_ILLIDAN_DOOR_L: // Left door at Temple Summit break; @@ -126,16 +138,8 @@ void instance_black_temple::OnObjectCreate(GameObject* pGo) m_mGoEntryGuidStore[pGo->GetEntry()] = pGo->GetObjectGuid(); } -void instance_black_temple::DoOpenPreMotherDoor() -{ - if (GetData(TYPE_SHADE) == DONE && GetData(TYPE_GOREFIEND) == DONE && GetData(TYPE_BLOODBOIL) == DONE && GetData(TYPE_RELIQUIARY) == DONE) - DoUseDoorOrButton(GO_PRE_SHAHRAZ_DOOR); -} - void instance_black_temple::SetData(uint32 uiType, uint32 uiData) { - debug_log("SD2: Instance Black Temple: SetData received for type %u with data %u",uiType,uiData); - switch(uiType) { case TYPE_NAJENTUS: @@ -199,8 +203,20 @@ void instance_black_temple::SetData(uint32 uiType, uint32 uiData) return; DoUseDoorOrButton(GO_COUNCIL_DOOR); m_auiEncounter[uiType] = uiData; + if (uiData == DONE) + DoSpawnAkamaIfCan(); + break; + case TYPE_ILLIDAN: + DoUseDoorOrButton(GO_ILLIDAN_DOOR_R); + DoUseDoorOrButton(GO_ILLIDAN_DOOR_L); + if (uiData == FAIL) + { + // Cleanup encounter + DoSpawnAkamaIfCan(); + DoUseDoorOrButton(GO_ILLIDAN_GATE); + } + m_auiEncounter[uiType] = uiData; break; - case TYPE_ILLIDAN: m_auiEncounter[uiType] = uiData; break; default: error_log("SD2: Instance Black Temple: ERROR SetData = %u for type %u does not exist/not implemented.", uiType, uiData); return; @@ -230,15 +246,24 @@ uint32 instance_black_temple::GetData(uint32 uiType) return 0; } -uint64 instance_black_temple::GetData64(uint32 uiData) +void instance_black_temple::DoOpenPreMotherDoor() { - switch(uiData) - { - case NPC_AKAMA: return m_akamaGuid.GetRawValue(); - case NPC_ILLIDAN_STORMRAGE: return m_illidanStormrageGuid.GetRawValue(); - default: - return 0; - } + if (GetData(TYPE_SHADE) == DONE && GetData(TYPE_GOREFIEND) == DONE && GetData(TYPE_BLOODBOIL) == DONE && GetData(TYPE_RELIQUIARY) == DONE) + DoUseDoorOrButton(GO_PRE_SHAHRAZ_DOOR); +} + +void instance_black_temple::DoSpawnAkamaIfCan() +{ + if (GetData(TYPE_ILLIDAN) == DONE || GetData(TYPE_COUNCIL) != DONE) + return; + + // If already spawned return + if (GetSingleCreatureFromStorage(NPC_AKAMA, true)) + return; + + // Summon Akama after the council has been defeated + if (Player* pPlayer = GetPlayerInMap()) + pPlayer->SummonCreature(NPC_AKAMA, 617.754f, 307.768f, 271.735f, 6.197f, TEMPSUMMON_DEAD_DESPAWN, 0); } void instance_black_temple::Load(const char* chrIn) @@ -255,9 +280,11 @@ void instance_black_temple::Load(const char* chrIn) loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3] >> m_auiEncounter[4] >> m_auiEncounter[5] >> m_auiEncounter[6] >> m_auiEncounter[7] >> m_auiEncounter[8]; - for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) + for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) + { if (m_auiEncounter[i] == IN_PROGRESS) // Do not load an encounter as "In Progress" - reset it instead. m_auiEncounter[i] = NOT_STARTED; + } OUT_LOAD_INST_DATA_COMPLETE; } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 550b4f91f..a4c37e41a 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2744" + #define SD2_REVISION_NR "2745" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index d58f6cf82..0595b3d02 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -300,12 +300,8 @@ UPDATE creature_template SET ScriptName='boss_illidan_stormrage' WHERE entry=229 UPDATE creature_template SET ScriptName='boss_high_nethermancer_zerevor' WHERE entry=22950; -- Mage at Illidari Council UPDATE creature_template SET ScriptName='boss_gathios_the_shatterer' WHERE entry=22949; -- Paladin at Illidari Council UPDATE creature_template SET ScriptName='boss_maiev_shadowsong' WHERE entry=23197; -- Maiev Shadowsong -UPDATE gameobject_template SET ScriptName='gameobject_cage_trap' WHERE entry=185916; -- Cage Trap GO in Illidan Encounter -UPDATE creature_template SET ScriptName='mob_blaze' WHERE entry=23259; -- Blaze mob in Illidan Phase 2 UPDATE creature_template SET ScriptName='mob_flame_of_azzinoth' WHERE entry=22997; -- Flame of Azzinoth (Illidan Phase 2) UPDATE creature_template SET ScriptName='mob_blade_of_azzinoth' WHERE entry=22996; -- Blade of Azzinoth (Illidan Phase 2) -UPDATE creature_template SET ScriptName='mob_demon_fire' WHERE entry=23069; -- Demon Fire in Illidan Phase 2 -UPDATE creature_template SET ScriptName='mob_flame_crash' WHERE entry=23336; -- Flame Crash in Illidan Normal Form UPDATE creature_template SET ScriptName='mob_cage_trap_trigger' WHERE entry=23304; -- Cage Trap mob in Illidan Phase 3/4 Normal UPDATE creature_template SET ScriptName='mob_shadow_demon' WHERE entry=23375; -- Shadow Demon in Illidan Demon Form UPDATE creature_template SET ScriptName='npc_volcano' WHERE entry=23085; -- Supremus Volcano diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 8e7442548..f063885a6 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -2615,32 +2615,32 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1564095,'Destiny... awaits.',11485,1,0,0,'council mala DEATH'), (-1564096,'Diel ma\'ahn... oreindel\'o',11443,1,0,0,'council zere DEATH'), -(-1564097,'Akama... your duplicity is hardly surprising. I should have slaughtered you and your malformed brethren long ago.',11463,1,0,0,'illidan SAY_CONVO_1'), -(-1564098,'We\'ve come to end your reign, Illidan. My people and all of Outland shall be free!',11389,1,0,25,'illidan SAY_CONVO_2'), -(-1564099,'Boldly said. But I remain unconvinced.',11464,1,0,396,'illidan SAY_CONVO_3'), -(-1564100,'The time has come! The moment is at hand!',11380,1,0,22,'illidan SAY_CONVO_4'), -(-1564101,'You are not prepared!',11466,1,0,406,'illidan SAY_CONVO_5'), -(-1564102,'Is this it, mortals? Is this all the fury you can muster?',11476,1,0,0,'illidan SAY_CONVO_6'), -(-1564103,'Their fury pales before mine, Illidan. We have some unsettled business between us.',11491,1,0,5,'illidan SAY_CONVO_7'), -(-1564104,'Maiev... How is this even possible?',11477,1,0,1,'illidan SAY_CONVO_8'), -(-1564105,'Ah... my long hunt is finally over. Today, Justice will be done!',11492,1,0,15,'illidan SAY_CONVO_9'), -(-1564106,'Feel the hatred of ten thousand years!',11470,1,0,0,'illidan SAY_CONVO_10'), -(-1564107,'Ahh... It is finished. You are beaten.',11496,1,0,0,'illidan SAY_CONVO_11'), -(-1564108,'You have won... Maiev...but the huntress... is nothing...without the hunt... you... are nothing... without me..',11478,1,0,65,'illidan SAY_CONVO_12'), -(-1564109,'He is right. I feel nothing... I am nothing...',11497,1,0,0,'illidan SAY_CONVO_13'), -(-1564110,'Farewell, champions.',11498,1,0,0,'illidan SAY_CONVO_14'), -(-1564111,'The Light will fill these dismal halls once again. I swear it.',11387,1,0,0,'illidan SAY_CONVO_15'), +(-1564097,'Akama. Your duplicity is hardly surprising. I should have slaughtered you and your malformed brethren long ago.',11463,1,0,0,'illidan SAY_ILLIDAN_SPEECH_1'), +(-1564098,'We\'ve come to end your reign, Illidan. My people and all of Outland shall be free!',11389,1,0,25,'akama(illidan) SAY_AKAMA_SPEECH_2'), +(-1564099,'Boldly said. But I remain unconvinced.',11464,1,0,6,'illidan SAY_ILLIDAN_SPEECH_3'), +(-1564100,'The time has come! The moment is at hand!',11380,1,0,22,'akama(illidan) SAY_AKAMA_SPEECH_4'), +(-1564101,'You are not prepared!',11466,1,0,406,'illidan SAY_ILLIDAN_SPEECH_5'), +(-1564102,'Is this it, mortals? Is this all the fury you can muster?',11476,1,0,0,'illidan SAY_ILLIDAN_SPEECH_6'), +(-1564103,'Their fury pales before mine, Illidan. We have some unsettled business between us.',11491,1,0,6,'maiev SAY_MAIEV_SPEECH_7'), +(-1564104,'Maiev... How is this even possible?',11477,1,0,1,'illidan SAY_ILLIDAN_SPEECH_8'), +(-1564105,'My long hunt is finally over. Today, Justice will be done!',11492,1,0,5,'maiev SAY_MAIEV_SPEECH_9'), +(-1564106,'Feel the hatred of ten thousand years!',11470,1,0,0,'illidan SAY_FRENZY'), +(-1564107,'It is finished. You are beaten.',11496,1,0,0,'maiev SAY_MAIEV_EPILOGUE_1'), +(-1564108,'You have won... Maiev. But the huntress... is nothing without the hunt. You... are nothing... without me.',11478,1,0,0,'illidan SAY_ILLIDAN_EPILOGUE_2'), +(-1564109,'He\'s right. I feel nothing... I am... nothing.',11497,1,0,0,'maiev SAY_MAIEV_EPILOGUE_3'), +(-1564110,'Farewell, champions.',11498,1,0,0,'maiev SAY_MAIEV_EPILOGUE_4'), +(-1564111,'The Light will fill these dismal halls once again. I swear it.',11387,1,0,0,'akama(illidan) SAY_AKAMA_EPILOGUE_5'), (-1564112,'I can feel your hatred.',11467,1,0,0,'illidan SAY_TAUNT_1'), (-1564113,'Give in to your fear!',11468,1,0,0,'illidan SAY_TAUNT_2'), (-1564114,'You know nothing of power!',11469,1,0,0,'illidan SAY_TAUNT_3'), (-1564115,'Such... arrogance!',11471,1,0,0,'illidan SAY_TAUNT_4'), -(-1564116,'That is for Naisha!',11493,1,0,0,'illidan SAY_MAIEV_TAUNT_1'), -(-1564117,'Bleed as I have bled!',11494,1,0,0,'illidan SAY_MAIEV_TAUNT_2'), -(-1564118,'There shall be no prison for you this time!',11495,1,0,0,'illidan SAY_MAIEV_TAUNT_3'), -(-1564119,'Meet your end, demon!',11500,1,0,0,'illidan SAY_MAIEV_TAUNT_4'), -(-1564120,'Be wary friends, The Betrayer meditates in the court just beyond.',11388,1,0,0,'illidan SAY_AKAMA_BEWARE'), +(-1564116,'That is for Naisha!',11493,1,0,0,'maiev SAY_MAIEV_TAUNT_1'), +(-1564117,'Bleed as I have bled!',11494,1,0,0,'maiev SAY_MAIEV_TAUNT_2'), +(-1564118,'There shall be no prison for you this time!',11495,1,0,0,'maiev SAY_MAIEV_TRAP'), +(-1564119,'Meet your end, demon!',11500,1,0,0,'maiev SAY_MAIEV_TAUNT_4'), +(-1564120,'Be wary friends, The Betrayer meditates in the court just beyond.',11388,1,0,0,'akama(illidan) SAY_AKAMA_BEWARE'), (-1564121,'Come, my minions. Deal with this traitor as he deserves!',11465,1,0,0,'illidan SAY_AKAMA_MINION'), -(-1564122,'I\'ll deal with these mongrels. Strike now, friends! Strike at the betrayer!',11390,1,0,0,'illidan SAY_AKAMA_LEAVE'), +(-1564122,'I\'ll deal with these mongrels. Strike now, friends! Strike at the betrayer!',11390,1,0,22,'akama(illidan) SAY_AKAMA_LEAVE'), (-1564123,'Who shall be next to taste my blades?!',11473,1,0,0,'illidan SAY_KILL1'), (-1564124,'This is too easy!',11472,1,0,0,'illidan SAY_KILL2'), (-1564125,'I will not be touched by rabble such as you!',11479,1,0,254,'illidan SAY_TAKEOFF'), @@ -2649,7 +2649,12 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1564128,'Behold the power... of the demon within!',11475,1,0,0,'illidan SAY_MORPH'), (-1564129,'You\'ve wasted too much time mortals, now you shall fall!',11474,1,0,0,'illidan SAY_ENRAGE'), -(-1564130,'Broken of the Ashtongue tribe, your leader speaks!',0,1,0,0,'akama shade SAY_FREE_1'); +(-1564130,'Broken of the Ashtongue tribe, your leader speaks!',0,1,0,0,'akama(shade) SAY_FREE_1'), + +(-1564131,'This door is all that stands between us and the Betrayer. Stand aside, friends.',0,0,0,1,'akama(illidan) SAY_OPEN_DOOR_1'), +(-1564132,'I cannot do this alone...',0,0,0,0,'akama(illidan) SAY_OPEN_DOOR_2'), +(-1564133,'You are not alone, Akama.',0,0,0,0,'spirit_Udalo SAY_OPEN_DOOR_3'), +(-1564134,'Your people will always be with you!',0,0,0,0,'spirit_Olum SAY_OPEN_DOOR_4'); -- -1 565 000 GRUUL'S LAIR INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES @@ -4439,7 +4444,9 @@ INSERT INTO gossip_texts (entry,content_default,comment) VALUES -- -3 564 000 BLACK TEMPLE INSERT INTO gossip_texts (entry,content_default,comment) VALUES -(-3564000,'I\'m with you, Akama.','akama(shade) GOSSIP_ITEM_START_ENCOUNTER'); +(-3564000,'I\'m with you, Akama.','akama(shade) GOSSIP_ITEM_START_ENCOUNTER'), +(-3564001,'I\'m ready, Akama.','akama(illidan) GOSSIP_ITEM_PREPARE'), +(-3564002,'We\'re ready to face Illidan.','akama(illidan) GOSSIP_ITEM_START_EVENT'); -- -3 595 000 CULLING OF STRATHOLME INSERT INTO gossip_texts (entry,content_default,comment) VALUES @@ -7044,4 +7051,38 @@ INSERT INTO script_waypoint VALUES (20763, 17, 4252.455, 2170.885, 137.677, 3000, 'EMOTE_VANGUARD_FINISH'), (20763, 18, 4252.455, 2170.885, 137.677, 5000, ''); +DELETE FROM script_waypoint WHERE entry=23089; +INSERT INTO script_waypoint VALUES +(23089, 0, 660.22, 305.74, 271.688, 0, 'escort paused - GOSSIP_ITEM_PREPARE'), +(23089, 1, 675.10, 343.30, 271.688, 0, ''), +(23089, 2, 694.01, 374.84, 271.687, 0, ''), +(23089, 3, 706.22, 375.75, 274.888, 0, ''), +(23089, 4, 720.48, 370.38, 281.300, 0, ''), +(23089, 5, 733.30, 357.66, 292.477, 0, ''), +(23089, 6, 740.40, 344.39, 300.920, 0, ''), +(23089, 7, 747.54, 329.03, 308.509, 0, ''), +(23089, 8, 748.24, 318.78, 311.781, 0, ''), +(23089, 9, 752.41, 304.31, 312.077, 0, 'escort paused - SAY_AKAMA_OPEN_DOOR_1'), +(23089, 10, 770.27, 304.89, 312.35, 0, ''), +(23089, 11, 780.18, 305.26, 319.71 , 0, ''), +(23089, 12, 791.45, 289.27, 319.80, 0, ''), +(23089, 13, 790.41, 262.70, 341.42, 0, ''), +(23089, 14, 782.88, 250.20, 341.60, 0, ''), +(23089, 15, 765.35, 241.40, 353.62, 0, ''), +(23089, 16, 750.61, 235.63, 353.02, 0, 'escort paused - GOSSIP_ITEM_START_EVENT'), +(23089, 17, 748.87, 304.93, 352.99, 0, 'escort paused - SAY_ILLIDAN_SPEECH_1'), +(23089, 18, 737.92, 368.15, 352.99, 0, ''), +(23089, 19, 749.64, 378.69, 352.99, 0, ''), +(23089, 20, 766.49, 371.79, 353.63, 0, ''), +(23089, 21, 784.98, 361.89, 341.41, 0, ''), +(23089, 22, 791.44, 347.10, 341.41, 0, ''), +(23089, 23, 794.80, 319.47, 319.75, 0, ''), +(23089, 24, 794.34, 304.34, 319.75, 0, 'escort paused - fight illidari elites'), +(23089, 25, 794.80, 319.47, 319.75, 0, ''), +(23089, 26, 791.44, 347.10, 341.41, 0, ''), +(23089, 27, 784.98, 361.89, 341.41, 0, ''), +(23089, 28, 766.49, 371.79, 353.63, 0, ''), +(23089, 29, 749.64, 378.69, 352.99, 0, ''), +(23089, 30, 737.92, 368.15, 352.99, 0, 'escort paused'); + -- EOF diff --git a/sql/updates/r2745_mangos.sql b/sql/updates/r2745_mangos.sql new file mode 100644 index 000000000..c3e1078cf --- /dev/null +++ b/sql/updates/r2745_mangos.sql @@ -0,0 +1,4 @@ +UPDATE creature_template SET ScriptName='' WHERE entry=23336; +UPDATE creature_template SET ScriptName='' WHERE entry=23069; +UPDATE creature_template SET ScriptName='' WHERE entry=23259; +UPDATE gameobject_template SET ScriptName='' WHERE entry=185916; diff --git a/sql/updates/r2745_scriptdev2.sql b/sql/updates/r2745_scriptdev2.sql new file mode 100644 index 000000000..97f51a36c --- /dev/null +++ b/sql/updates/r2745_scriptdev2.sql @@ -0,0 +1,74 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1564134 AND -1564131; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1564131,'This door is all that stands between us and the Betrayer. Stand aside, friends.',0,0,0,1,'akama illidan SAY_OPEN_DOOR_1'), +(-1564132,'I cannot do this alone...',0,0,0,0,'akama illidan SAY_OPEN_DOOR_2'), +(-1564133,'You are not alone, Akama.',0,0,0,0,'spirit Udalo SAY_OPEN_DOOR_3'), +(-1564134,'Your people will always be with you!',0,0,0,0,'spirit Olum SAY_OPEN_DOOR_4'); + +DELETE FROM script_texts WHERE entry BETWEEN -1564122 AND -1564097; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1564097,'Akama. Your duplicity is hardly surprising. I should have slaughtered you and your malformed brethren long ago.',11463,1,0,0,'illidan SAY_ILLIDAN_SPEECH_1'), +(-1564098,'We\'ve come to end your reign, Illidan. My people and all of Outland shall be free!',11389,1,0,25,'akama(illidan) SAY_AKAMA_SPEECH_2'), +(-1564099,'Boldly said. But I remain unconvinced.',11464,1,0,6,'illidan SAY_ILLIDAN_SPEECH_3'), +(-1564100,'The time has come! The moment is at hand!',11380,1,0,22,'akama(illidan) SAY_AKAMA_SPEECH_4'), +(-1564101,'You are not prepared!',11466,1,0,406,'illidan SAY_ILLIDAN_SPEECH_5'), +(-1564102,'Is this it, mortals? Is this all the fury you can muster?',11476,1,0,0,'illidan SAY_ILLIDAN_SPEECH_6'), +(-1564103,'Their fury pales before mine, Illidan. We have some unsettled business between us.',11491,1,0,6,'maiev SAY_MAIEV_SPEECH_7'), +(-1564104,'Maiev... How is this even possible?',11477,1,0,1,'illidan SAY_ILLIDAN_SPEECH_8'), +(-1564105,'My long hunt is finally over. Today, Justice will be done!',11492,1,0,5,'maiev SAY_MAIEV_SPEECH_9'), +(-1564106,'Feel the hatred of ten thousand years!',11470,1,0,0,'illidan SAY_FRENZY'), +(-1564107,'It is finished. You are beaten.',11496,1,0,0,'maiev SAY_MAIEV_EPILOGUE_1'), +(-1564108,'You have won... Maiev. But the huntress... is nothing without the hunt. You... are nothing... without me.',11478,1,0,0,'illidan SAY_ILLIDAN_EPILOGUE_2'), +(-1564109,'He\'s right. I feel nothing... I am... nothing.',11497,1,0,0,'maiev SAY_MAIEV_EPILOGUE_3'), +(-1564110,'Farewell, champions.',11498,1,0,0,'maiev SAY_MAIEV_EPILOGUE_4'), +(-1564111,'The Light will fill these dismal halls once again. I swear it.',11387,1,0,0,'akama(illidan) SAY_AKAMA_EPILOGUE_5'), +(-1564112,'I can feel your hatred.',11467,1,0,0,'illidan SAY_TAUNT_1'), +(-1564113,'Give in to your fear!',11468,1,0,0,'illidan SAY_TAUNT_2'), +(-1564114,'You know nothing of power!',11469,1,0,0,'illidan SAY_TAUNT_3'), +(-1564115,'Such... arrogance!',11471,1,0,0,'illidan SAY_TAUNT_4'), +(-1564116,'That is for Naisha!',11493,1,0,0,'maiev SAY_MAIEV_TAUNT_1'), +(-1564117,'Bleed as I have bled!',11494,1,0,0,'maiev SAY_MAIEV_TAUNT_2'), +(-1564118,'There shall be no prison for you this time!',11495,1,0,0,'maiev SAY_MAIEV_TRAP'), +(-1564119,'Meet your end, demon!',11500,1,0,0,'maiev SAY_MAIEV_TAUNT_4'), +(-1564120,'Be wary friends, The Betrayer meditates in the court just beyond.',11388,1,0,0,'akama(illidan) SAY_AKAMA_BEWARE'), +(-1564121,'Come, my minions. Deal with this traitor as he deserves!',11465,1,0,0,'illidan SAY_AKAMA_MINION'), +(-1564122,'I\'ll deal with these mongrels. Strike now, friends! Strike at the betrayer!',11390,1,0,22,'akama(illidan) SAY_AKAMA_LEAVE'); + +DELETE FROM gossip_texts WHERE entry IN (-3564001,-3564002); +INSERT INTO gossip_texts (entry,content_default,comment) VALUES +(-3564001,'I\'m ready, Akama.','akama(illidan) GOSSIP_ITEM_PREPARE'), +(-3564002,'We\'re ready to face Illidan.','akama(illidan) GOSSIP_ITEM_START_EVENT'); + +DELETE FROM script_waypoint WHERE entry=23089; +INSERT INTO script_waypoint VALUES +(23089, 0, 660.22, 305.74, 271.688, 0, 'escort paused - GOSSIP_ITEM_PREPARE'), +(23089, 1, 675.10, 343.30, 271.688, 0, ''), +(23089, 2, 694.01, 374.84, 271.687, 0, ''), +(23089, 3, 706.22, 375.75, 274.888, 0, ''), +(23089, 4, 720.48, 370.38, 281.300, 0, ''), +(23089, 5, 733.30, 357.66, 292.477, 0, ''), +(23089, 6, 740.40, 344.39, 300.920, 0, ''), +(23089, 7, 747.54, 329.03, 308.509, 0, ''), +(23089, 8, 748.24, 318.78, 311.781, 0, ''), +(23089, 9, 752.41, 304.31, 312.077, 0, 'escort paused - SAY_AKAMA_OPEN_DOOR_1'), +(23089, 10, 770.27, 304.89, 312.35, 0, ''), +(23089, 11, 780.18, 305.26, 319.71 , 0, ''), +(23089, 12, 791.45, 289.27, 319.80, 0, ''), +(23089, 13, 790.41, 262.70, 341.42, 0, ''), +(23089, 14, 782.88, 250.20, 341.60, 0, ''), +(23089, 15, 765.35, 241.40, 353.62, 0, ''), +(23089, 16, 750.61, 235.63, 353.02, 0, 'escort paused - GOSSIP_ITEM_START_EVENT'), +(23089, 17, 748.87, 304.93, 352.99, 0, 'escort paused - SAY_ILLIDAN_SPEECH_1'), +(23089, 18, 737.92, 368.15, 352.99, 0, ''), +(23089, 19, 749.64, 378.69, 352.99, 0, ''), +(23089, 20, 766.49, 371.79, 353.63, 0, ''), +(23089, 21, 784.98, 361.89, 341.41, 0, ''), +(23089, 22, 791.44, 347.10, 341.41, 0, ''), +(23089, 23, 794.80, 319.47, 319.75, 0, ''), +(23089, 24, 794.34, 304.34, 319.75, 0, 'escort paused - fight illidari elites'), +(23089, 25, 794.80, 319.47, 319.75, 0, ''), +(23089, 26, 791.44, 347.10, 341.41, 0, ''), +(23089, 27, 784.98, 361.89, 341.41, 0, ''), +(23089, 28, 766.49, 371.79, 353.63, 0, ''), +(23089, 29, 749.64, 378.69, 352.99, 0, ''), +(23089, 30, 737.92, 368.15, 352.99, 0, 'escort paused'); From 33f698238871ee6a8eb762281cfbbf0e2a242478 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Sat, 3 Nov 2012 23:07:54 +0100 Subject: [PATCH 0741/1172] [2746] Cleanup Style --- ScriptMgr.cpp | 19 +- ScriptMgr.h | 48 +- base/escort_ai.cpp | 22 +- base/escort_ai.h | 22 +- base/follower_ai.cpp | 14 +- base/follower_ai.h | 22 +- base/guard_ai.cpp | 66 +-- base/guard_ai.h | 4 +- base/pet_ai.cpp | 6 +- config.h | 26 +- include/precompiled.h | 8 +- include/sc_creature.cpp | 158 ++--- include/sc_creature.h | 28 +- include/sc_grid_searchers.cpp | 4 +- include/sc_grid_searchers.h | 2 +- include/sc_instance.cpp | 10 +- scripts/battlegrounds/battleground.cpp | 10 +- scripts/eastern_kingdoms/arathi_highlands.cpp | 2 +- .../blackrock_depths/blackrock_depths.cpp | 54 +- .../blackrock_depths/blackrock_depths.h | 2 +- .../boss_ambassador_flamelash.cpp | 6 +- .../blackrock_depths/boss_coren_direbrew.cpp | 12 +- .../boss_emperor_dagran_thaurissan.cpp | 42 +- .../boss_general_angerforge.cpp | 12 +- .../boss_high_interrogator_gerstahn.cpp | 10 +- .../instance_blackrock_depths.cpp | 28 +- .../blackrock_spire/blackrock_spire.h | 4 +- .../blackrock_spire/boss_gyth.cpp | 2 +- .../boss_overlord_wyrmthalak.cpp | 6 +- .../boss_pyroguard_emberseer.cpp | 4 +- .../instance_blackrock_spire.cpp | 22 +- .../blackwing_lair/blackwing_lair.h | 6 +- .../blackwing_lair/boss_chromaggus.cpp | 14 +- .../blackwing_lair/boss_nefarian.cpp | 14 +- .../blackwing_lair/boss_razorgore.cpp | 2 +- .../blackwing_lair/boss_victor_nefarius.cpp | 40 +- .../instance_blackwing_lair.cpp | 14 +- scripts/eastern_kingdoms/blasted_lands.cpp | 8 +- scripts/eastern_kingdoms/burning_steppes.cpp | 12 +- .../deadmines/boss_mr_smite.cpp | 4 +- .../deadmines/instance_deadmines.cpp | 8 +- .../eastern_kingdoms/eastern_plaguelands.cpp | 12 +- scripts/eastern_kingdoms/eversong_woods.cpp | 36 +- scripts/eastern_kingdoms/ghostlands.cpp | 2 +- .../gnomeregan/boss_thermaplugg.cpp | 10 +- .../gnomeregan/gnomeregan.cpp | 10 +- .../gnomeregan/instance_gnomeregan.cpp | 8 +- scripts/eastern_kingdoms/hinterlands.cpp | 28 +- .../karazhan/boss_curator.cpp | 12 +- .../karazhan/boss_maiden_of_virtue.cpp | 2 +- .../karazhan/boss_midnight.cpp | 10 +- .../eastern_kingdoms/karazhan/boss_moroes.cpp | 16 +- .../karazhan/boss_netherspite.cpp | 26 +- .../karazhan/boss_nightbane.cpp | 4 +- .../karazhan/boss_prince_malchezaar.cpp | 12 +- .../karazhan/boss_shade_of_aran.cpp | 20 +- .../karazhan/boss_terestian_illhoof.cpp | 4 +- .../karazhan/bosses_opera.cpp | 12 +- .../karazhan/instance_karazhan.cpp | 36 +- .../eastern_kingdoms/karazhan/karazhan.cpp | 36 +- scripts/eastern_kingdoms/karazhan/karazhan.h | 6 +- scripts/eastern_kingdoms/loch_modan.cpp | 10 +- .../boss_felblood_kaelthas.cpp | 4 +- .../boss_priestess_delrissa.cpp | 10 +- .../boss_selin_fireheart.cpp | 6 +- .../magisters_terrace/boss_vexallus.cpp | 20 +- .../instance_magisters_terrace.cpp | 4 +- .../magisters_terrace/magisters_terrace.cpp | 2 +- .../magisters_terrace/magisters_terrace.h | 6 +- .../molten_core/boss_golemagg.cpp | 10 +- .../molten_core/boss_majordomo_executus.cpp | 16 +- .../molten_core/boss_ragnaros.cpp | 12 +- .../molten_core/boss_sulfuron_harbinger.cpp | 2 +- .../molten_core/instance_molten_core.cpp | 30 +- .../molten_core/molten_core.h | 2 +- .../eastern_kingdoms/redridge_mountains.cpp | 10 +- .../scarlet_enclave/ebon_hold.cpp | 60 +- .../scarlet_monastery/boss_herod.cpp | 2 +- .../boss_mograine_and_whitemane.cpp | 44 +- .../instance_scarlet_monastery.cpp | 2 +- .../scholomance/instance_scholomance.cpp | 16 +- .../shadowfang_keep/boss_hummel.cpp | 6 +- .../instance_shadowfang_keep.cpp | 30 +- .../shadowfang_keep/shadowfang_keep.cpp | 72 +-- .../shadowfang_keep/shadowfang_keep.h | 16 +- .../eastern_kingdoms/silverpine_forest.cpp | 14 +- scripts/eastern_kingdoms/stormwind_city.cpp | 74 +-- .../eastern_kingdoms/stranglethorn_vale.cpp | 4 +- .../stratholme/boss_cannon_master_willey.cpp | 2 +- .../stratholme/boss_dathrohan_balnazzar.cpp | 91 +-- .../stratholme/boss_order_of_silver_hand.cpp | 4 +- .../stratholme/instance_stratholme.cpp | 40 +- .../stratholme/stratholme.cpp | 10 +- .../eastern_kingdoms/stratholme/stratholme.h | 2 +- .../sunken_temple/instance_sunken_temple.cpp | 22 +- .../sunken_temple/sunken_temple.cpp | 4 +- .../sunken_temple/sunken_temple.h | 10 +- .../sunwell_plateau/boss_brutallus.cpp | 10 +- .../sunwell_plateau/boss_eredar_twins.cpp | 18 +- .../sunwell_plateau/boss_felmyst.cpp | 2 +- .../sunwell_plateau/boss_kalecgos.cpp | 18 +- .../sunwell_plateau/boss_kiljaeden.cpp | 36 +- .../sunwell_plateau/boss_muru.cpp | 34 +- .../instance_sunwell_plateau.cpp | 20 +- scripts/eastern_kingdoms/swamp_of_sorrows.cpp | 24 +- scripts/eastern_kingdoms/tirisfal_glades.cpp | 10 +- .../uldaman/boss_archaedas.cpp | 6 +- .../uldaman/instance_uldaman.cpp | 20 +- scripts/eastern_kingdoms/undercity.cpp | 2 +- .../eastern_kingdoms/western_plaguelands.cpp | 30 +- scripts/eastern_kingdoms/westfall.cpp | 4 +- scripts/eastern_kingdoms/wetlands.cpp | 6 +- .../eastern_kingdoms/zulaman/boss_akilzon.cpp | 6 +- .../eastern_kingdoms/zulaman/boss_halazzi.cpp | 18 +- .../eastern_kingdoms/zulaman/boss_janalai.cpp | 64 +-- .../zulaman/boss_malacrass.cpp | 70 ++- .../zulaman/boss_nalorakk.cpp | 12 +- .../eastern_kingdoms/zulaman/boss_zuljin.cpp | 44 +- .../zulaman/instance_zulaman.cpp | 24 +- scripts/eastern_kingdoms/zulaman/zulaman.cpp | 50 +- .../eastern_kingdoms/zulgurub/boss_arlokk.cpp | 4 +- .../eastern_kingdoms/zulgurub/boss_hakkar.cpp | 6 +- .../eastern_kingdoms/zulgurub/boss_jeklik.cpp | 4 +- .../eastern_kingdoms/zulgurub/boss_jindo.cpp | 2 +- .../zulgurub/boss_mandokir.cpp | 76 +-- .../zulgurub/boss_renataki.cpp | 2 +- .../eastern_kingdoms/zulgurub/boss_thekal.cpp | 18 +- .../zulgurub/instance_zulgurub.cpp | 22 +- scripts/eastern_kingdoms/zulgurub/zulgurub.h | 2 +- scripts/examples/example_creature.cpp | 14 +- scripts/examples/example_escort.cpp | 18 +- scripts/examples/example_gossip_codebox.cpp | 32 +- scripts/kalimdor/ashenvale.cpp | 36 +- scripts/kalimdor/azshara.cpp | 48 +- scripts/kalimdor/azuremyst_isle.cpp | 22 +- .../blackfathom_deeps/blackfathom_deeps.h | 40 +- .../instance_blackfathom_deeps.cpp | 8 +- scripts/kalimdor/bloodmyst_isle.cpp | 2 +- .../culling_of_stratholme.cpp | 8 +- .../culling_of_stratholme.h | 8 +- .../instance_culling_of_stratholme.cpp | 34 +- .../dark_portal/boss_temporus.cpp | 2 +- .../dark_portal/dark_portal.cpp | 10 +- .../caverns_of_time/dark_portal/dark_portal.h | 12 +- .../dark_portal/instance_dark_portal.cpp | 16 +- .../caverns_of_time/hyjal/boss_archimonde.cpp | 16 +- .../kalimdor/caverns_of_time/hyjal/hyjal.cpp | 4 +- .../caverns_of_time/hyjal/hyjalAI.cpp | 42 +- .../kalimdor/caverns_of_time/hyjal/hyjalAI.h | 62 +- .../caverns_of_time/hyjal/instance_hyjal.cpp | 18 +- .../old_hillsbrad/instance_old_hillsbrad.cpp | 16 +- .../old_hillsbrad/old_hillsbrad.cpp | 110 ++-- .../old_hillsbrad/old_hillsbrad.h | 4 +- scripts/kalimdor/darkshore.cpp | 34 +- scripts/kalimdor/desolace.cpp | 39 +- .../kalimdor/dire_maul/instance_dire_maul.cpp | 56 +- scripts/kalimdor/durotar.cpp | 6 +- scripts/kalimdor/dustwallow_marsh.cpp | 48 +- scripts/kalimdor/felwood.cpp | 20 +- scripts/kalimdor/feralas.cpp | 24 +- scripts/kalimdor/moonglade.cpp | 70 +-- scripts/kalimdor/mulgore.cpp | 4 +- scripts/kalimdor/onyxias_lair/boss_onyxia.cpp | 52 +- .../onyxias_lair/instance_onyxias_lair.cpp | 2 +- scripts/kalimdor/orgrimmar.cpp | 16 +- .../razorfen_downs/razorfen_downs.cpp | 22 +- .../instance_razorfen_kraul.cpp | 10 +- .../razorfen_kraul/razorfen_kraul.cpp | 4 +- .../ruins_of_ahnqiraj/boss_ayamiss.cpp | 12 +- .../kalimdor/ruins_of_ahnqiraj/boss_moam.cpp | 2 +- .../ruins_of_ahnqiraj/boss_ossirian.cpp | 6 +- .../ruins_of_ahnqiraj/boss_rajaxx.cpp | 4 +- .../instance_ruins_of_ahnqiraj.cpp | 14 +- .../ruins_of_ahnqiraj/ruins_of_ahnqiraj.cpp | 12 +- .../ruins_of_ahnqiraj/ruins_of_ahnqiraj.h | 2 +- scripts/kalimdor/silithus.cpp | 50 +- scripts/kalimdor/stonetalon_mountains.cpp | 16 +- scripts/kalimdor/tanaris.cpp | 42 +- scripts/kalimdor/teldrassil.cpp | 6 +- .../temple_of_ahnqiraj/boss_bug_trio.cpp | 2 +- .../temple_of_ahnqiraj/boss_cthun.cpp | 38 +- .../kalimdor/temple_of_ahnqiraj/boss_ouro.cpp | 18 +- .../temple_of_ahnqiraj/boss_sartura.cpp | 4 +- .../temple_of_ahnqiraj/boss_skeram.cpp | 8 +- .../temple_of_ahnqiraj/boss_twinemperors.cpp | 10 +- .../temple_of_ahnqiraj/boss_viscidus.cpp | 16 +- .../instance_temple_of_ahnqiraj.cpp | 18 +- .../mob_anubisath_sentinel.cpp | 8 +- .../temple_of_ahnqiraj/temple_of_ahnqiraj.h | 8 +- scripts/kalimdor/the_barrens.cpp | 42 +- scripts/kalimdor/thousand_needles.cpp | 48 +- scripts/kalimdor/ungoro_crater.cpp | 14 +- .../instance_wailing_caverns.cpp | 10 +- .../wailing_caverns/wailing_caverns.cpp | 16 +- scripts/kalimdor/winterspring.cpp | 60 +- .../kalimdor/zulfarrak/instance_zulfarrak.cpp | 6 +- scripts/kalimdor/zulfarrak/zulfarrak.cpp | 32 +- .../northrend/azjol-nerub/ahnkahet/ahnkahet.h | 4 +- .../azjol-nerub/ahnkahet/boss_jedoga.cpp | 18 +- .../azjol-nerub/ahnkahet/boss_nadox.cpp | 2 +- .../azjol-nerub/ahnkahet/boss_taldaram.cpp | 10 +- .../azjol-nerub/ahnkahet/boss_volazj.cpp | 4 +- .../ahnkahet/instance_ahnkahet.cpp | 10 +- .../azjol-nerub/azjol-nerub/azjol-nerub.h | 2 +- .../azjol-nerub/azjol-nerub/boss_anubarak.cpp | 10 +- .../azjol-nerub/azjol-nerub/boss_hadronox.cpp | 28 +- .../azjol-nerub/azjol-nerub/boss_krikthir.cpp | 6 +- .../azjol-nerub/instance_azjol-nerub.cpp | 12 +- scripts/northrend/borean_tundra.cpp | 12 +- .../boss_anubarak_trial.cpp | 10 +- .../trial_of_the_crusader/boss_jaraxxus.cpp | 12 +- .../boss_northrend_beasts.cpp | 6 +- .../instance_trial_of_the_crusader.cpp | 24 +- scripts/northrend/dragonblight.cpp | 2 +- .../northrend/draktharon_keep/boss_novos.cpp | 6 +- .../draktharon_keep/boss_trollgore.cpp | 4 +- .../draktharon_keep/draktharon_keep.h | 2 +- .../instance_draktharon_keep.cpp | 6 +- scripts/northrend/gundrak/boss_eck.cpp | 2 +- scripts/northrend/gundrak/boss_galdarah.cpp | 4 +- scripts/northrend/gundrak/boss_moorabi.cpp | 2 +- scripts/northrend/gundrak/boss_sladran.cpp | 6 +- .../northrend/gundrak/instance_gundrak.cpp | 24 +- scripts/northrend/howling_fjord.cpp | 24 +- .../forge_of_souls/boss_devourer_of_souls.cpp | 18 +- .../instance_forge_of_souls.cpp | 15 +- .../pit_of_saron/instance_pit_of_saron.cpp | 10 +- .../icecrown_citadel/blood_prince_council.cpp | 24 +- .../boss_blood_queen_lanathel.cpp | 8 +- .../boss_deathbringer_saurfang.cpp | 20 +- .../icecrown_citadel/boss_festergut.cpp | 16 +- .../boss_lady_deathwhisper.cpp | 16 +- .../icecrown_citadel/boss_lord_marrowgar.cpp | 4 +- .../boss_professor_putricide.cpp | 26 +- .../icecrown_citadel/boss_rotface.cpp | 26 +- .../icecrown_citadel/boss_sindragosa.cpp | 38 +- .../icecrown_citadel/boss_the_lich_king.cpp | 22 +- .../boss_valithria_dreamwalker.cpp | 2 +- .../icecrown_citadel/icecrown_citadel.h | 8 +- .../instance_icecrown_citadel.cpp | 64 +-- .../northrend/naxxramas/boss_anubrekhan.cpp | 20 +- scripts/northrend/naxxramas/boss_faerlina.cpp | 2 +- .../naxxramas/boss_four_horsemen.cpp | 12 +- scripts/northrend/naxxramas/boss_gluth.cpp | 14 +- scripts/northrend/naxxramas/boss_gothik.cpp | 52 +- .../northrend/naxxramas/boss_grobbulus.cpp | 24 +- scripts/northrend/naxxramas/boss_heigan.cpp | 6 +- .../northrend/naxxramas/boss_kelthuzad.cpp | 42 +- scripts/northrend/naxxramas/boss_loatheb.cpp | 4 +- scripts/northrend/naxxramas/boss_maexxna.cpp | 8 +- scripts/northrend/naxxramas/boss_noth.cpp | 18 +- .../northrend/naxxramas/boss_patchwerk.cpp | 6 +- .../northrend/naxxramas/boss_razuvious.cpp | 6 +- .../northrend/naxxramas/boss_sapphiron.cpp | 2 +- scripts/northrend/naxxramas/boss_thaddius.cpp | 62 +- .../naxxramas/instance_naxxramas.cpp | 62 +- scripts/northrend/naxxramas/naxxramas.h | 42 +- .../nexus/eye_of_eternity/boss_malygos.cpp | 10 +- .../instance_eye_of_eternity.cpp | 6 +- .../northrend/nexus/nexus/boss_anomalus.cpp | 2 +- .../nexus/nexus/boss_keristrasza.cpp | 2 +- .../northrend/nexus/nexus/boss_telestra.cpp | 10 +- .../northrend/nexus/nexus/instance_nexus.cpp | 4 +- .../northrend/nexus/oculus/boss_eregos.cpp | 4 +- scripts/northrend/nexus/oculus/boss_urom.cpp | 10 +- .../nexus/oculus/instance_oculus.cpp | 10 +- .../obsidian_sanctum/boss_sartharion.cpp | 124 ++-- .../instance_obsidian_sanctum.cpp | 12 +- .../ruby_sanctum/instance_ruby_sanctum.cpp | 8 +- scripts/northrend/ruby_sanctum/ruby_sanctum.h | 14 +- scripts/northrend/sholazar_basin.cpp | 20 +- .../halls_of_lightning/boss_bjarngrim.cpp | 30 +- .../ulduar/halls_of_lightning/boss_ionar.cpp | 18 +- .../ulduar/halls_of_lightning/boss_loken.cpp | 30 +- .../halls_of_lightning/boss_volkhan.cpp | 36 +- .../halls_of_lightning/halls_of_lightning.h | 2 +- .../instance_halls_of_lightning.cpp | 10 +- .../halls_of_stone/boss_maiden_of_grief.cpp | 8 +- .../ulduar/halls_of_stone/boss_sjonnir.cpp | 8 +- .../ulduar/halls_of_stone/halls_of_stone.cpp | 28 +- .../instance_halls_of_stone.cpp | 10 +- .../ulduar/ulduar/assembly_of_iron.cpp | 10 +- .../northrend/ulduar/ulduar/boss_auriaya.cpp | 12 +- .../ulduar/ulduar/boss_general_vezax.cpp | 2 +- .../ulduar/ulduar/instance_ulduar.cpp | 108 ++-- .../utgarde_keep/utgarde_keep/boss_ingvar.cpp | 8 +- .../utgarde_keep/boss_keleseth.cpp | 8 +- .../boss_skarvald_and_dalronn.cpp | 8 +- .../utgarde_keep/instance_utgarde_keep.cpp | 6 +- .../utgarde_keep/utgarde_keep.cpp | 6 +- .../utgarde_pinnacle/boss_gortok.cpp | 6 +- .../utgarde_pinnacle/boss_skadi.cpp | 2 +- .../utgarde_pinnacle/boss_svala.cpp | 4 +- .../utgarde_pinnacle/boss_ymiron.cpp | 12 +- .../instance_utgarde_pinnacle.cpp | 10 +- scripts/northrend/violet_hold/boss_erekem.cpp | 4 +- .../violet_hold/instance_violet_hold.cpp | 46 +- scripts/northrend/violet_hold/violet_hold.cpp | 40 +- scripts/northrend/violet_hold/violet_hold.h | 24 +- scripts/northrend/zuldrak.cpp | 2 +- .../auchenai_crypts/boss_exarch_maladaar.cpp | 6 +- .../mana_tombs/boss_nexusprince_shaffar.cpp | 10 +- .../mana_tombs/boss_pandemonius.cpp | 2 +- .../auchindoun/sethekk_halls/boss_anzu.cpp | 2 +- .../sethekk_halls/boss_darkweaver_syth.cpp | 10 +- .../sethekk_halls/boss_talon_king_ikiss.cpp | 2 +- .../sethekk_halls/instance_sethekk_halls.cpp | 4 +- .../boss_ambassador_hellmaw.cpp | 4 +- .../boss_blackheart_the_inciter.cpp | 2 +- .../boss_grandmaster_vorpil.cpp | 18 +- .../instance_shadow_labyrinth.cpp | 10 +- .../shadow_labyrinth/shadow_labyrinth.h | 4 +- scripts/outland/black_temple/black_temple.h | 6 +- .../outland/black_temple/boss_bloodboil.cpp | 4 +- scripts/outland/black_temple/boss_illidan.cpp | 22 +- .../black_temple/boss_mother_shahraz.cpp | 8 +- .../black_temple/boss_reliquary_of_souls.cpp | 4 +- .../black_temple/boss_shade_of_akama.cpp | 24 +- .../outland/black_temple/boss_supremus.cpp | 4 +- .../black_temple/boss_teron_gorefiend.cpp | 8 +- .../black_temple/boss_warlord_najentus.cpp | 12 +- .../outland/black_temple/illidari_council.cpp | 10 +- .../black_temple/instance_black_temple.cpp | 12 +- scripts/outland/blades_edge_mountains.cpp | 10 +- scripts/outland/boss_doomlord_kazzak.cpp | 6 +- .../boss_fathomlord_karathress.cpp | 24 +- .../boss_hydross_the_unstable.cpp | 20 +- .../serpent_shrine/boss_lady_vashj.cpp | 18 +- .../boss_leotheras_the_blind.cpp | 26 +- .../boss_morogrim_tidewalker.cpp | 16 +- .../serpent_shrine/boss_the_lurker_below.cpp | 10 +- .../instance_serpent_shrine.cpp | 6 +- .../serpent_shrine/serpent_shrine.h | 24 +- .../steam_vault/boss_hydromancer_thespia.cpp | 2 +- .../boss_mekgineer_steamrigger.cpp | 16 +- .../steam_vault/boss_warlord_kalithresh.cpp | 2 +- .../steam_vault/instance_steam_vault.cpp | 6 +- .../steam_vault/steam_vault.h | 2 +- .../underbog/boss_hungarfen.cpp | 2 +- scripts/outland/gruuls_lair/boss_gruul.cpp | 24 +- .../gruuls_lair/boss_high_king_maulgar.cpp | 28 +- scripts/outland/gruuls_lair/gruuls_lair.h | 10 +- .../gruuls_lair/instance_gruuls_lair.cpp | 4 +- .../blood_furnace/blood_furnace.h | 2 +- .../blood_furnace/boss_broggok.cpp | 4 +- .../boss_kelidan_the_breaker.cpp | 18 +- .../blood_furnace/instance_blood_furnace.cpp | 6 +- .../boss_nazan_and_vazruden.cpp | 12 +- .../boss_omor_the_unscarred.cpp | 4 +- .../boss_watchkeeper_gargolmar.cpp | 4 +- .../instance_hellfire_ramparts.cpp | 4 +- .../magtheridons_lair/boss_magtheridon.cpp | 12 +- .../instance_magtheridons_lair.cpp | 10 +- .../magtheridons_lair/magtheridons_lair.h | 2 +- .../shattered_halls/boss_nethekurse.cpp | 28 +- .../boss_warbringer_omrogg.cpp | 60 +- .../boss_warchief_kargath_bladefist.cpp | 20 +- .../instance_shattered_halls.cpp | 22 +- .../shattered_halls/shattered_halls.h | 2 +- scripts/outland/hellfire_peninsula.cpp | 26 +- scripts/outland/nagrand.cpp | 22 +- scripts/outland/netherstorm.cpp | 50 +- scripts/outland/shadowmoon_valley.cpp | 116 ++-- scripts/outland/shattrath_city.cpp | 44 +- .../tempest_keep/arcatraz/arcatraz.cpp | 8 +- .../arcatraz/boss_harbinger_skyriss.cpp | 12 +- .../arcatraz/instance_arcatraz.cpp | 10 +- .../botanica/boss_high_botanist_freywinn.cpp | 4 +- .../tempest_keep/botanica/boss_laj.cpp | 4 +- .../botanica/boss_warp_splinter.cpp | 6 +- .../tempest_keep/the_eye/boss_alar.cpp | 22 +- .../tempest_keep/the_eye/boss_astromancer.cpp | 16 +- .../tempest_keep/the_eye/boss_kaelthas.cpp | 66 +-- .../tempest_keep/the_eye/boss_void_reaver.cpp | 4 +- .../tempest_keep/the_eye/instance_the_eye.cpp | 2 +- .../outland/tempest_keep/the_eye/the_eye.h | 10 +- .../boss_pathaleon_the_calculator.cpp | 4 +- .../the_mechanar/instance_mechanar.cpp | 8 +- .../tempest_keep/the_mechanar/mechanar.h | 2 +- scripts/outland/terokkar_forest.cpp | 38 +- scripts/outland/zangarmarsh.cpp | 7 +- scripts/world/areatrigger_scripts.cpp | 14 +- scripts/world/bosses_emerald_dragons.cpp | 12 +- scripts/world/go_scripts.cpp | 32 +- scripts/world/item_scripts.cpp | 10 +- scripts/world/mob_generic_creature.cpp | 75 +-- scripts/world/npc_professions.cpp | 544 +++++++++--------- scripts/world/npcs_special.cpp | 330 +++++------ scripts/world/spell_scripts.cpp | 48 +- scripts/world/world_map_scripts.cpp | 4 +- sd2_revision_nr.h | 2 +- sd2_revision_sql.h | 4 +- system/system.cpp | 11 +- system/system.h | 16 +- tool/git_id/git_id.cpp | 425 +++++++------- 395 files changed, 4181 insertions(+), 4111 deletions(-) diff --git a/ScriptMgr.cpp b/ScriptMgr.cpp index 303a3f674..3f2faddcd 100644 --- a/ScriptMgr.cpp +++ b/ScriptMgr.cpp @@ -53,10 +53,11 @@ void LoadDatabase() } -struct TSpellSummary { +struct TSpellSummary +{ uint8 Targets; // set of enum SelectTarget uint8 Effects; // set of enum SelectEffect -}extern *SpellSummary; +} extern* SpellSummary; MANGOS_DLL_EXPORT void FreeScriptLibrary() @@ -91,7 +92,7 @@ void InitScriptLibrary() if (!SD2Config.SetSource(_SCRIPTDEV2_CONFIG)) error_log("SD2: Unable to open configuration file. Database will be unaccessible. Configuration values will use default."); else - outstring_log("SD2: Using configuration file %s",_SCRIPTDEV2_CONFIG); + outstring_log("SD2: Using configuration file %s", _SCRIPTDEV2_CONFIG); // Check config file version if (SD2Config.GetIntDefault("ConfVersion", 0) != SD2_CONF_VERSION) @@ -145,7 +146,7 @@ void DoScriptText(int32 iTextEntry, WorldObject* pSource, Unit* pTarget) if (iTextEntry >= 0) { error_log("SD2: DoScriptText with source entry %u (TypeId=%u, guid=%u) attempts to process text entry %i, but text entry must be negative.", - pSource->GetEntry(), pSource->GetTypeId(), pSource->GetGUIDLow(), iTextEntry); + pSource->GetEntry(), pSource->GetTypeId(), pSource->GetGUIDLow(), iTextEntry); return; } @@ -154,13 +155,13 @@ void DoScriptText(int32 iTextEntry, WorldObject* pSource, Unit* pTarget) if (!pData) { error_log("SD2: DoScriptText with source entry %u (TypeId=%u, guid=%u) could not find text entry %i.", - pSource->GetEntry(), pSource->GetTypeId(), pSource->GetGUIDLow(), iTextEntry); + pSource->GetEntry(), pSource->GetTypeId(), pSource->GetGUIDLow(), iTextEntry); return; } debug_log("SD2: DoScriptText: text entry=%i, Sound=%u, Type=%u, Language=%u, Emote=%u", - iTextEntry, pData->uiSoundId, pData->uiType, pData->uiLanguage, pData->uiEmote); + iTextEntry, pData->uiSoundId, pData->uiType, pData->uiLanguage, pData->uiEmote); if (pData->uiSoundId) { @@ -189,7 +190,7 @@ void DoScriptText(int32 iTextEntry, WorldObject* pSource, Unit* pTarget) error_log("SD2: DoScriptText entry %i tried to process emote for invalid TypeId (%u).", iTextEntry, pSource->GetTypeId()); } - switch(pData->uiType) + switch (pData->uiType) { case CHAT_TYPE_SAY: pSource->MonsterSay(iTextEntry, pData->uiLanguage, pTarget); @@ -253,7 +254,7 @@ void DoOrSimulateScriptTextForMap(int32 iTextEntry, uint32 uiCreatureEntry, Map* CreatureInfo const* pInfo = GetCreatureTemplateStore(uiCreatureEntry); if (!pInfo) { - error_log("SD2: DoOrSimulateScriptTextForMap has invalid source entry %u for map %u.", uiCreatureEntry, pMap->GetId()); + error_log("SD2: DoOrSimulateScriptTextForMap has invalid source entry %u for map %u.", uiCreatureEntry, pMap->GetId()); return; } @@ -265,7 +266,7 @@ void DoOrSimulateScriptTextForMap(int32 iTextEntry, uint32 uiCreatureEntry, Map* } debug_log("SD2: DoOrSimulateScriptTextForMap: text entry=%i, Sound=%u, Type=%u, Language=%u, Emote=%u", - iTextEntry, pData->uiSoundId, pData->uiType, pData->uiLanguage, pData->uiEmote); + iTextEntry, pData->uiSoundId, pData->uiType, pData->uiLanguage, pData->uiEmote); if (pData->uiType != CHAT_TYPE_ZONE_YELL) { diff --git a/ScriptMgr.h b/ScriptMgr.h index 63f29bbd2..8c386fb8a 100644 --- a/ScriptMgr.h +++ b/ScriptMgr.h @@ -74,30 +74,30 @@ struct Script std::string Name; - bool (*pGossipHello )(Player*, Creature*); - bool (*pGossipHelloGO )(Player*, GameObject*); - bool (*pGossipSelect )(Player*, Creature*, uint32, uint32); - bool (*pGossipSelectGO )(Player*, GameObject*, uint32, uint32); - bool (*pGossipSelectWithCode )(Player*, Creature*, uint32, uint32, const char*); - bool (*pGossipSelectGOWithCode )(Player*, GameObject*, uint32, uint32, const char*); - uint32 (*pDialogStatusNPC )(Player*, Creature*); - uint32 (*pDialogStatusGO )(Player*, GameObject*); - bool (*pQuestAcceptNPC )(Player*, Creature*, Quest const*); - bool (*pQuestAcceptGO )(Player*, GameObject*, Quest const*); - bool (*pQuestAcceptItem )(Player*, Item*, Quest const*); - bool (*pQuestRewardedNPC )(Player*, Creature*, Quest const*); - bool (*pQuestRewardedGO )(Player*, GameObject*, Quest const*); - bool (*pGOUse )(Player*, GameObject*); - bool (*pItemUse )(Player*, Item*, SpellCastTargets const&); - bool (*pAreaTrigger )(Player*, AreaTriggerEntry const*); - bool (*pProcessEventId )(uint32, Object*, Object*, bool); - bool (*pEffectDummyNPC )(Unit*, uint32, SpellEffectIndex, Creature*); - bool (*pEffectDummyGO )(Unit*, uint32, SpellEffectIndex, GameObject*); - bool (*pEffectDummyItem )(Unit*, uint32, SpellEffectIndex, Item*); - bool (*pEffectAuraDummy )(const Aura*, bool); - - CreatureAI* (*GetAI )(Creature*); - InstanceData* (*GetInstanceData )(Map*); + bool (*pGossipHello)(Player*, Creature*); + bool (*pGossipHelloGO)(Player*, GameObject*); + bool (*pGossipSelect)(Player*, Creature*, uint32, uint32); + bool (*pGossipSelectGO)(Player*, GameObject*, uint32, uint32); + bool (*pGossipSelectWithCode)(Player*, Creature*, uint32, uint32, const char*); + bool (*pGossipSelectGOWithCode)(Player*, GameObject*, uint32, uint32, const char*); + uint32(*pDialogStatusNPC)(Player*, Creature*); + uint32(*pDialogStatusGO)(Player*, GameObject*); + bool (*pQuestAcceptNPC)(Player*, Creature*, Quest const*); + bool (*pQuestAcceptGO)(Player*, GameObject*, Quest const*); + bool (*pQuestAcceptItem)(Player*, Item*, Quest const*); + bool (*pQuestRewardedNPC)(Player*, Creature*, Quest const*); + bool (*pQuestRewardedGO)(Player*, GameObject*, Quest const*); + bool (*pGOUse)(Player*, GameObject*); + bool (*pItemUse)(Player*, Item*, SpellCastTargets const&); + bool (*pAreaTrigger)(Player*, AreaTriggerEntry const*); + bool (*pProcessEventId)(uint32, Object*, Object*, bool); + bool (*pEffectDummyNPC)(Unit*, uint32, SpellEffectIndex, Creature*); + bool (*pEffectDummyGO)(Unit*, uint32, SpellEffectIndex, GameObject*); + bool (*pEffectDummyItem)(Unit*, uint32, SpellEffectIndex, Item*); + bool (*pEffectAuraDummy)(const Aura*, bool); + + CreatureAI* (*GetAI)(Creature*); + InstanceData* (*GetInstanceData)(Map*); void RegisterSelf(bool bReportError = true); }; diff --git a/base/escort_ai.cpp b/base/escort_ai.cpp index 373a60aaa..deae456d4 100644 --- a/base/escort_ai.cpp +++ b/base/escort_ai.cpp @@ -95,7 +95,7 @@ void npc_escortAI::Aggro(Unit* pEnemy) { } -//see followerAI +// see followerAI bool npc_escortAI::AssistPlayerInCombat(Unit* pWho) { if (!pWho->getVictim()) @@ -180,7 +180,7 @@ void npc_escortAI::JustDied(Unit* pKiller) { if (Group* pGroup = pPlayer->GetGroup()) { - for(GroupReference* pRef = pGroup->GetFirstMember(); pRef != NULL; pRef = pRef->next()) + for (GroupReference* pRef = pGroup->GetFirstMember(); pRef != NULL; pRef = pRef->next()) { if (Player* pMember = pRef->getSource()) { @@ -204,7 +204,7 @@ void npc_escortAI::JustRespawned() if (!IsCombatMovement()) SetCombatMovement(true); - //add a small delay before going to first waypoint, normal in near all cases + // add a small delay before going to first waypoint, normal in near all cases m_uiWPWaitTimer = 2500; if (m_creature->getFaction() != m_creature->GetCreatureInfo()->faction_A) @@ -365,7 +365,7 @@ void npc_escortAI::MovementInform(uint32 uiMoveType, uint32 uiPointId) if (uiMoveType != POINT_MOTION_TYPE || !HasEscortState(STATE_ESCORT_ESCORTING)) return; - //Combat start position reached, continue waypoint movement + // Combat start position reached, continue waypoint movement if (uiPointId == POINT_LAST_POINT) { debug_log("SD2: EscortAI has returned to original position before combat"); @@ -382,7 +382,7 @@ void npc_escortAI::MovementInform(uint32 uiMoveType, uint32 uiPointId) } else { - //Make sure that we are still on the right waypoint + // Make sure that we are still on the right waypoint if (CurrentWP->uiId != uiPointId) { error_log("SD2: EscortAI for Npc %u reached waypoint out of order %u, expected %u.", m_creature->GetEntry(), uiPointId, CurrentWP->uiId); @@ -394,7 +394,7 @@ void npc_escortAI::MovementInform(uint32 uiMoveType, uint32 uiPointId) // In case we were moving while in combat, we should evade back to this position m_creature->SetCombatStartPosition(m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ()); - //Call WP function + // Call WP function WaypointReached(CurrentWP->uiId); m_uiWPWaitTimer = CurrentWP->uiWaitTime; @@ -421,7 +421,7 @@ void npc_escortAI::MovementInform(uint32 uiMoveType, uint32 uiPointId) void npc_escortAI::FillPointMovementListForCreature() { - std::vector const &pPointsEntries = pSystemMgr.GetPointMoveList(m_creature->GetEntry()); + std::vector const& pPointsEntries = pSystemMgr.GetPointMoveList(m_creature->GetEntry()); if (pPointsEntries.empty()) return; @@ -484,7 +484,7 @@ void npc_escortAI::SetRun(bool bRun) m_bIsRunning = bRun; } -//TODO: get rid of this many variables passed in function. +// TODO: get rid of this many variables passed in function. void npc_escortAI::Start(bool bRun, const Player* pPlayer, const Quest* pQuest, bool bInstantRespawn, bool bCanLoopPath) { if (m_creature->getVictim()) @@ -510,7 +510,7 @@ void npc_escortAI::Start(bool bRun, const Player* pPlayer, const Quest* pQuest, return; } - //set variables + // set variables m_bIsRunning = bRun; m_playerGuid = pPlayer ? pPlayer->GetObjectGuid() : ObjectGuid(); @@ -529,14 +529,14 @@ void npc_escortAI::Start(bool bRun, const Player* pPlayer, const Quest* pQuest, debug_log("SD2: EscortAI start with WAYPOINT_MOTION_TYPE, changed to MoveIdle."); } - //disable npcflags + // disable npcflags m_creature->SetUInt32Value(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_NONE); debug_log("SD2: EscortAI started with " SIZEFMTD " waypoints. Run = %d, PlayerGuid = %s", WaypointList.size(), m_bIsRunning, m_playerGuid.GetString().c_str()); CurrentWP = WaypointList.begin(); - //Set initial speed + // Set initial speed m_creature->SetWalk(!m_bIsRunning); AddEscortState(STATE_ESCORT_ESCORTING); diff --git a/base/escort_ai.h b/base/escort_ai.h index 564499ef1..47cd11965 100644 --- a/base/escort_ai.h +++ b/base/escort_ai.h @@ -24,10 +24,10 @@ struct Escort_Waypoint enum EscortState { - STATE_ESCORT_NONE = 0x000, //nothing in progress - STATE_ESCORT_ESCORTING = 0x001, //escort are in progress - STATE_ESCORT_RETURNING = 0x002, //escort is returning after being in combat - STATE_ESCORT_PAUSED = 0x004 //will not proceed with waypoints before state is removed + STATE_ESCORT_NONE = 0x000, // nothing in progress + STATE_ESCORT_ESCORTING = 0x001, // escort are in progress + STATE_ESCORT_RETURNING = 0x002, // escort is returning after being in combat + STATE_ESCORT_PAUSED = 0x004 // will not proceed with waypoints before state is removed }; struct MANGOS_DLL_DECL npc_escortAI : public ScriptedAI @@ -57,13 +57,13 @@ struct MANGOS_DLL_DECL npc_escortAI : public ScriptedAI void EnterEvadeMode(); - void UpdateAI(const uint32); //the "internal" update, calls UpdateEscortAI() - virtual void UpdateEscortAI(const uint32); //used when it's needed to add code in update (abilities, scripted events, etc) + void UpdateAI(const uint32); // the "internal" update, calls UpdateEscortAI() + virtual void UpdateEscortAI(const uint32); // used when it's needed to add code in update (abilities, scripted events, etc) void MovementInform(uint32, uint32); // EscortAI functions - //void AddWaypoint(uint32 id, float x, float y, float z, uint32 WaitTimeMs = 0); + // void AddWaypoint(uint32 id, float x, float y, float z, uint32 WaitTimeMs = 0); virtual void WaypointReached(uint32 uiPointId) = 0; virtual void WaypointStart(uint32 uiPointId) {} @@ -96,13 +96,13 @@ struct MANGOS_DLL_DECL npc_escortAI : public ScriptedAI uint32 m_uiPlayerCheckTimer; uint32 m_uiEscortState; - const Quest* m_pQuestForEscort; //generally passed in Start() when regular escort script. + const Quest* m_pQuestForEscort; // generally passed in Start() when regular escort script. std::list WaypointList; std::list::iterator CurrentWP; - bool m_bIsRunning; //all creatures are walking by default (has flag SPLINEFLAG_WALKMODE) - bool m_bCanInstantRespawn; //if creature should respawn instantly after escort over (if not, database respawntime are used) - bool m_bCanReturnToStart; //if creature can walk same path (loop) without despawn. Not for regular escort quests. + bool m_bIsRunning; // all creatures are walking by default (has flag SPLINEFLAG_WALKMODE) + bool m_bCanInstantRespawn; // if creature should respawn instantly after escort over (if not, database respawntime are used) + bool m_bCanReturnToStart; // if creature can walk same path (loop) without despawn. Not for regular escort quests. }; #endif diff --git a/base/follower_ai.cpp b/base/follower_ai.cpp index 26cc67bee..a80c0c233 100644 --- a/base/follower_ai.cpp +++ b/base/follower_ai.cpp @@ -42,8 +42,8 @@ void FollowerAI::AttackStart(Unit* pWho) } } -//This part provides assistance to a player that are attacked by pWho, even if out of normal aggro range -//It will cause m_creature to attack pWho that are attacking _any_ player (which has been confirmed may happen also on offi) +// This part provides assistance to a player that are attacked by pWho, even if out of normal aggro range +// It will cause m_creature to attack pWho that are attacking _any_ player (which has been confirmed may happen also on offi) bool FollowerAI::AssistPlayerInCombat(Unit* pWho) { if (!pWho->getVictim()) @@ -124,12 +124,12 @@ void FollowerAI::JustDied(Unit* pKiller) if (!HasFollowState(STATE_FOLLOW_INPROGRESS) || !m_leaderGuid || !m_pQuestForFollow) return; - //TODO: need a better check for quests with time limit. + // TODO: need a better check for quests with time limit. if (Player* pPlayer = GetLeaderForFollower()) { if (Group* pGroup = pPlayer->GetGroup()) { - for(GroupReference* pRef = pGroup->GetFirstMember(); pRef != NULL; pRef = pRef->next()) + for (GroupReference* pRef = pGroup->GetFirstMember(); pRef != NULL; pRef = pRef->next()) { if (Player* pMember = pRef->getSource()) { @@ -214,7 +214,7 @@ void FollowerAI::UpdateAI(const uint32 uiDiff) if (Group* pGroup = pPlayer->GetGroup()) { - for(GroupReference* pRef = pGroup->GetFirstMember(); pRef != NULL; pRef = pRef->next()) + for (GroupReference* pRef = pGroup->GetFirstMember(); pRef != NULL; pRef = pRef->next()) { Player* pMember = pRef->getSource(); @@ -287,7 +287,7 @@ void FollowerAI::StartFollow(Player* pLeader, uint32 uiFactionForFollower, const return; } - //set variables + // set variables m_leaderGuid = pLeader->GetObjectGuid(); if (uiFactionForFollower) @@ -321,7 +321,7 @@ Player* FollowerAI::GetLeaderForFollower() { if (Group* pGroup = pLeader->GetGroup()) { - for(GroupReference* pRef = pGroup->GetFirstMember(); pRef != NULL; pRef = pRef->next()) + for (GroupReference* pRef = pGroup->GetFirstMember(); pRef != NULL; pRef = pRef->next()) { Player* pMember = pRef->getSource(); diff --git a/base/follower_ai.h b/base/follower_ai.h index 9533a7580..346eca54f 100644 --- a/base/follower_ai.h +++ b/base/follower_ai.h @@ -8,12 +8,12 @@ enum FollowState { STATE_FOLLOW_NONE = 0x000, - STATE_FOLLOW_INPROGRESS = 0x001, //must always have this state for any follow - STATE_FOLLOW_RETURNING = 0x002, //when returning to combat start after being in combat - STATE_FOLLOW_PAUSED = 0x004, //disables following - STATE_FOLLOW_COMPLETE = 0x008, //follow is completed and may end - STATE_FOLLOW_PREEVENT = 0x010, //not implemented (allow pre event to run, before follow is initiated) - STATE_FOLLOW_POSTEVENT = 0x020 //can be set at complete and allow post event to run + STATE_FOLLOW_INPROGRESS = 0x001, // must always have this state for any follow + STATE_FOLLOW_RETURNING = 0x002, // when returning to combat start after being in combat + STATE_FOLLOW_PAUSED = 0x004, // disables following + STATE_FOLLOW_COMPLETE = 0x008, // follow is completed and may end + STATE_FOLLOW_PREEVENT = 0x010, // not implemented (allow pre event to run, before follow is initiated) + STATE_FOLLOW_POSTEVENT = 0x020 // can be set at complete and allow post event to run }; class MANGOS_DLL_DECL FollowerAI : public ScriptedAI @@ -22,7 +22,7 @@ class MANGOS_DLL_DECL FollowerAI : public ScriptedAI explicit FollowerAI(Creature* pCreature); ~FollowerAI() {} - //virtual void WaypointReached(uint32 uiPointId) = 0; + // virtual void WaypointReached(uint32 uiPointId) = 0; void MovementInform(uint32 uiMotionType, uint32 uiPointId); @@ -36,12 +36,12 @@ class MANGOS_DLL_DECL FollowerAI : public ScriptedAI void JustRespawned(); - void UpdateAI(const uint32); //the "internal" update, calls UpdateFollowerAI() - virtual void UpdateFollowerAI(const uint32); //used when it's needed to add code in update (abilities, scripted events, etc) + void UpdateAI(const uint32); // the "internal" update, calls UpdateFollowerAI() + virtual void UpdateFollowerAI(const uint32); // used when it's needed to add code in update (abilities, scripted events, etc) void StartFollow(Player* pPlayer, uint32 uiFactionForFollower = 0, const Quest* pQuest = NULL); - void SetFollowPaused(bool bPaused); //if special event require follow mode to hold/resume during the follow + void SetFollowPaused(bool bPaused); // if special event require follow mode to hold/resume during the follow void SetFollowComplete(bool bWithEndEvent = false); bool HasFollowState(uint32 uiFollowState) { return (m_uiFollowState & uiFollowState); } @@ -59,7 +59,7 @@ class MANGOS_DLL_DECL FollowerAI : public ScriptedAI uint32 m_uiUpdateFollowTimer; uint32 m_uiFollowState; - const Quest* m_pQuestForFollow; //normally we have a quest + const Quest* m_pQuestForFollow; // normally we have a quest }; #endif diff --git a/base/guard_ai.cpp b/base/guard_ai.cpp index 78d292d3d..cfeed491c 100644 --- a/base/guard_ai.cpp +++ b/base/guard_ai.cpp @@ -34,14 +34,14 @@ guardAI::guardAI(Creature* pCreature) : ScriptedAI(pCreature), void guardAI::Reset() { m_uiGlobalCooldown = 0; - m_uiBuffTimer = 0; //Rebuff as soon as we can + m_uiBuffTimer = 0; // Rebuff as soon as we can } -void guardAI::Aggro(Unit *pWho) +void guardAI::Aggro(Unit* pWho) { if (m_creature->GetEntry() == NPC_CENARION_INFANTRY) { - switch(urand(0, 2)) + switch (urand(0, 2)) { case 0: DoScriptText(SAY_GUARD_SIL_AGGRO1, m_creature, pWho); break; case 1: DoScriptText(SAY_GUARD_SIL_AGGRO2, m_creature, pWho); break; @@ -49,44 +49,44 @@ void guardAI::Aggro(Unit *pWho) } } - if (const SpellEntry *pSpellInfo = m_creature->ReachWithSpellAttack(pWho)) + if (const SpellEntry* pSpellInfo = m_creature->ReachWithSpellAttack(pWho)) DoCastSpell(pWho, pSpellInfo); } -void guardAI::JustDied(Unit *pKiller) +void guardAI::JustDied(Unit* pKiller) { - //Send Zone Under Attack message to the LocalDefense and WorldDefense Channels + // Send Zone Under Attack message to the LocalDefense and WorldDefense Channels if (Player* pPlayer = pKiller->GetCharmerOrOwnerPlayerOrPlayerItself()) m_creature->SendZoneUnderAttackMessage(pPlayer); } void guardAI::UpdateAI(const uint32 uiDiff) { - //Always decrease our global cooldown first + // Always decrease our global cooldown first if (m_uiGlobalCooldown > uiDiff) m_uiGlobalCooldown -= uiDiff; else m_uiGlobalCooldown = 0; - //Buff timer (only buff when we are alive and not in combat + // Buff timer (only buff when we are alive and not in combat if (m_creature->isAlive() && !m_creature->isInCombat()) { if (m_uiBuffTimer < uiDiff) { - //Find a spell that targets friendly and applies an aura (these are generally buffs) - const SpellEntry *pSpellInfo = SelectSpell(m_creature, -1, -1, SELECT_TARGET_ANY_FRIEND, 0, 0, 0, 0, SELECT_EFFECT_AURA); + // Find a spell that targets friendly and applies an aura (these are generally buffs) + const SpellEntry* pSpellInfo = SelectSpell(m_creature, -1, -1, SELECT_TARGET_ANY_FRIEND, 0, 0, 0, 0, SELECT_EFFECT_AURA); if (pSpellInfo && !m_uiGlobalCooldown) { - //Cast the buff spell + // Cast the buff spell DoCastSpell(m_creature, pSpellInfo); - //Set our global cooldown + // Set our global cooldown m_uiGlobalCooldown = GENERIC_CREATURE_COOLDOWN; - //Set our timer to 10 minutes before rebuff + // Set our timer to 10 minutes before rebuff m_uiBuffTimer = 600000; - } //Try again in 30 seconds + } // Try again in 30 seconds else m_uiBuffTimer = 30000; } @@ -94,39 +94,39 @@ void guardAI::UpdateAI(const uint32 uiDiff) m_uiBuffTimer -= uiDiff; } - //Return since we have no target + // Return since we have no target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; // Make sure our attack is ready and we arn't currently casting if (m_creature->isAttackReady() && !m_creature->IsNonMeleeSpellCasted(false)) { - //If we are within range melee the target + // If we are within range melee the target if (m_creature->CanReachWithMeleeAttack(m_creature->getVictim())) { bool bHealing = false; - const SpellEntry *pSpellInfo = NULL; + const SpellEntry* pSpellInfo = NULL; - //Select a healing spell if less than 30% hp + // Select a healing spell if less than 30% hp if (m_creature->GetHealthPercent() < 30.0f) pSpellInfo = SelectSpell(m_creature, -1, -1, SELECT_TARGET_ANY_FRIEND, 0, 0, 0, 0, SELECT_EFFECT_HEALING); - //No healing spell available, select a hostile spell + // No healing spell available, select a hostile spell if (pSpellInfo) bHealing = true; else pSpellInfo = SelectSpell(m_creature->getVictim(), -1, -1, SELECT_TARGET_ANY_ENEMY, 0, 0, 0, 0, SELECT_EFFECT_DONTCARE); - //20% chance to replace our white hit with a spell + // 20% chance to replace our white hit with a spell if (pSpellInfo && !urand(0, 4) && !m_uiGlobalCooldown) { - //Cast the spell + // Cast the spell if (bHealing) DoCastSpell(m_creature, pSpellInfo); else DoCastSpell(m_creature->getVictim(), pSpellInfo); - //Set our global cooldown + // Set our global cooldown m_uiGlobalCooldown = GENERIC_CREATURE_COOLDOWN; } else @@ -137,45 +137,45 @@ void guardAI::UpdateAI(const uint32 uiDiff) } else { - //Only run this code if we arn't already casting + // Only run this code if we arn't already casting if (!m_creature->IsNonMeleeSpellCasted(false)) { bool bHealing = false; - const SpellEntry *pSpellInfo = NULL; + const SpellEntry* pSpellInfo = NULL; - //Select a healing spell if less than 30% hp ONLY 33% of the time + // Select a healing spell if less than 30% hp ONLY 33% of the time if (m_creature->GetHealthPercent() < 30.0f && !urand(0, 2)) pSpellInfo = SelectSpell(m_creature, -1, -1, SELECT_TARGET_ANY_FRIEND, 0, 0, 0, 0, SELECT_EFFECT_HEALING); - //No healing spell available, See if we can cast a ranged spell (Range must be greater than ATTACK_DISTANCE) + // No healing spell available, See if we can cast a ranged spell (Range must be greater than ATTACK_DISTANCE) if (pSpellInfo) bHealing = true; else pSpellInfo = SelectSpell(m_creature->getVictim(), -1, -1, SELECT_TARGET_ANY_ENEMY, 0, 0, ATTACK_DISTANCE, 0, SELECT_EFFECT_DONTCARE); - //Found a spell, check if we arn't on cooldown + // Found a spell, check if we arn't on cooldown if (pSpellInfo && !m_uiGlobalCooldown) { - //If we are currently moving stop us and set the movement generator + // If we are currently moving stop us and set the movement generator if (m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() != IDLE_MOTION_TYPE) { m_creature->GetMotionMaster()->Clear(false); m_creature->GetMotionMaster()->MoveIdle(); } - //Cast spell + // Cast spell if (bHealing) DoCastSpell(m_creature, pSpellInfo); else DoCastSpell(m_creature->getVictim(), pSpellInfo); - //Set our global cooldown + // Set our global cooldown m_uiGlobalCooldown = GENERIC_CREATURE_COOLDOWN; - } //If no spells available and we arn't moving run to target + } // If no spells available and we arn't moving run to target else if (m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() != CHASE_MOTION_TYPE) { - //Cancel our current spell and then mutate new movement generator + // Cancel our current spell and then mutate new movement generator m_creature->InterruptNonMeleeSpells(false); m_creature->GetMotionMaster()->Clear(false); m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); @@ -186,7 +186,7 @@ void guardAI::UpdateAI(const uint32 uiDiff) void guardAI::DoReplyToTextEmote(uint32 uiTextEmote) { - switch(uiTextEmote) + switch (uiTextEmote) { case TEXTEMOTE_KISS: m_creature->HandleEmote(EMOTE_ONESHOT_BOW); break; case TEXTEMOTE_WAVE: m_creature->HandleEmote(EMOTE_ONESHOT_WAVE); break; diff --git a/base/guard_ai.h b/base/guard_ai.h index c9470f8b4..0de094e50 100644 --- a/base/guard_ai.h +++ b/base/guard_ai.h @@ -35,9 +35,9 @@ struct MANGOS_DLL_DECL guardAI : public ScriptedAI void Reset(); - void Aggro(Unit *pWho); + void Aggro(Unit* pWho); - void JustDied(Unit *pKiller); + void JustDied(Unit* pKiller); void UpdateAI(const uint32 uiDiff); diff --git a/base/pet_ai.cpp b/base/pet_ai.cpp index 8146b8688..8784d43fc 100644 --- a/base/pet_ai.cpp +++ b/base/pet_ai.cpp @@ -18,7 +18,7 @@ ScriptedPetAI::ScriptedPetAI(Creature* pCreature) : CreatureAI(pCreature) bool ScriptedPetAI::IsVisible(Unit* pWho) const { return pWho && m_creature->IsWithinDist(pWho, VISIBLE_RANGE) - && pWho->isVisibleForOrDetect(m_creature, m_creature, true); + && pWho->isVisibleForOrDetect(m_creature, m_creature, true); } void ScriptedPetAI::MoveInLineOfSight(Unit* pWho) @@ -30,7 +30,7 @@ void ScriptedPetAI::MoveInLineOfSight(Unit* pWho) return; if (m_creature->CanInitiateAttack() && pWho->isTargetableForAttack() && - m_creature->IsHostileTo(pWho) && pWho->isInAccessablePlaceFor(m_creature)) + m_creature->IsHostileTo(pWho) && pWho->isInAccessablePlaceFor(m_creature)) { if (!m_creature->CanFly() && m_creature->GetDistanceZ(pWho) > CREATURE_Z_ATTACK_RANGE) return; @@ -55,7 +55,7 @@ void ScriptedPetAI::AttackedBy(Unit* pAttacker) return; if (m_creature->GetCharmInfo() && !m_creature->GetCharmInfo()->HasReactState(REACT_PASSIVE) && - m_creature->CanReachWithMeleeAttack(pAttacker)) + m_creature->CanReachWithMeleeAttack(pAttacker)) AttackStart(pAttacker); } diff --git a/config.h b/config.h index e7d3411c5..826e01849 100644 --- a/config.h +++ b/config.h @@ -28,32 +28,32 @@ #define SD2_CONF_VERSION 2010062001 #ifdef WIN32 - #define MANGOS_DLL_EXPORT extern "C" __declspec(dllexport) +#define MANGOS_DLL_EXPORT extern "C" __declspec(dllexport) #elif defined( __GNUC__ ) - #define MANGOS_DLL_EXPORT extern "C" +#define MANGOS_DLL_EXPORT extern "C" #else - #define MANGOS_DLL_EXPORT extern "C" export +#define MANGOS_DLL_EXPORT extern "C" export #endif #ifndef _VERSION - #define _VERSION "Revision [" SD2_REVISION_NR "] (" REVISION_ID ") " REVISION_DATE " " REVISION_TIME +#define _VERSION "Revision [" SD2_REVISION_NR "] (" REVISION_ID ") " REVISION_DATE " " REVISION_TIME #endif // The path to config files #ifndef SYSCONFDIR - #define SYSCONFDIR "" +#define SYSCONFDIR "" #endif #if PLATFORM == PLATFORM_WINDOWS - #ifdef _WIN64 - #define _FULLVERSION _VERSION " (Win64)" - #else - #define _FULLVERSION _VERSION " (Win32)" - #endif - #define _SCRIPTDEV2_CONFIG "scriptdev2.conf" +#ifdef _WIN64 +#define _FULLVERSION _VERSION " (Win64)" #else - #define _FULLVERSION _VERSION " (Unix)" - #define _SCRIPTDEV2_CONFIG SYSCONFDIR"scriptdev2.conf" +#define _FULLVERSION _VERSION " (Win32)" +#endif +#define _SCRIPTDEV2_CONFIG "scriptdev2.conf" +#else +#define _FULLVERSION _VERSION " (Unix)" +#define _SCRIPTDEV2_CONFIG SYSCONFDIR"scriptdev2.conf" #endif #endif diff --git a/include/precompiled.h b/include/precompiled.h index c401b4072..611667ccd 100644 --- a/include/precompiled.h +++ b/include/precompiled.h @@ -19,10 +19,10 @@ #ifdef WIN32 # include - BOOL APIENTRY DllMain(HANDLE hModule, DWORD ul_reason_for_call, LPVOID lpReserved) - { - return true; - } +BOOL APIENTRY DllMain(HANDLE hModule, DWORD ul_reason_for_call, LPVOID lpReserved) +{ + return true; +} #endif #endif diff --git a/include/sc_creature.cpp b/include/sc_creature.cpp index 1f593d9d3..a91fcd938 100644 --- a/include/sc_creature.cpp +++ b/include/sc_creature.cpp @@ -17,7 +17,7 @@ struct TSpellSummary { uint8 Targets; // set of enum SelectTarget uint8 Effects; // set of enum SelectEffect -} *SpellSummary; +}* SpellSummary; ScriptedAI::ScriptedAI(Creature* pCreature) : CreatureAI(pCreature), m_bCombatMovement(true), @@ -51,7 +51,7 @@ bool ScriptedAI::IsVisible(Unit* pWho) const void ScriptedAI::MoveInLineOfSight(Unit* pWho) { if (m_creature->CanInitiateAttack() && pWho->isTargetableForAttack() && - m_creature->IsHostileTo(pWho) && pWho->isInAccessablePlaceFor(m_creature)) + m_creature->IsHostileTo(pWho) && pWho->isInAccessablePlaceFor(m_creature)) { if (!m_creature->CanFly() && m_creature->GetDistanceZ(pWho) > CREATURE_Z_ATTACK_RANGE) return; @@ -106,7 +106,7 @@ void ScriptedAI::EnterCombat(Unit* pEnemy) */ void ScriptedAI::UpdateAI(const uint32 uiDiff) { - //Check if we have a current target + // Check if we have a current target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -196,116 +196,116 @@ void ScriptedAI::DoPlaySoundToSet(WorldObject* pSource, uint32 uiSoundId) Creature* ScriptedAI::DoSpawnCreature(uint32 uiId, float fX, float fY, float fZ, float fAngle, uint32 uiType, uint32 uiDespawntime) { - return m_creature->SummonCreature(uiId,m_creature->GetPositionX()+fX, m_creature->GetPositionY()+fY, m_creature->GetPositionZ()+fZ, fAngle, (TempSummonType)uiType, uiDespawntime); + return m_creature->SummonCreature(uiId, m_creature->GetPositionX() + fX, m_creature->GetPositionY() + fY, m_creature->GetPositionZ() + fZ, fAngle, (TempSummonType)uiType, uiDespawntime); } SpellEntry const* ScriptedAI::SelectSpell(Unit* pTarget, int32 uiSchool, int32 iMechanic, SelectTarget selectTargets, uint32 uiPowerCostMin, uint32 uiPowerCostMax, float fRangeMin, float fRangeMax, SelectEffect selectEffects) { - //No target so we can't cast + // No target so we can't cast if (!pTarget) return false; - //Silenced so we can't cast + // Silenced so we can't cast if (m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_SILENCED)) return false; - //Using the extended script system we first create a list of viable spells + // Using the extended script system we first create a list of viable spells SpellEntry const* apSpell[4]; - memset(apSpell, 0, sizeof(SpellEntry*)*4); + memset(apSpell, 0, sizeof(SpellEntry*) * 4); uint32 uiSpellCount = 0; SpellEntry const* pTempSpell; SpellRangeEntry const* pTempRange; - //Check if each spell is viable(set it to null if not) + // Check if each spell is viable(set it to null if not) for (uint8 i = 0; i < 4; ++i) { pTempSpell = GetSpellStore()->LookupEntry(m_creature->m_spells[i]); - //This spell doesn't exist + // This spell doesn't exist if (!pTempSpell) continue; // Targets and Effects checked first as most used restrictions - //Check the spell targets if specified - if (selectTargets && !(SpellSummary[m_creature->m_spells[i]].Targets & (1 << (selectTargets-1)))) + // Check the spell targets if specified + if (selectTargets && !(SpellSummary[m_creature->m_spells[i]].Targets & (1 << (selectTargets - 1)))) continue; - //Check the type of spell if we are looking for a specific spell type - if (selectEffects && !(SpellSummary[m_creature->m_spells[i]].Effects & (1 << (selectEffects-1)))) + // Check the type of spell if we are looking for a specific spell type + if (selectEffects && !(SpellSummary[m_creature->m_spells[i]].Effects & (1 << (selectEffects - 1)))) continue; - //Check for school if specified + // Check for school if specified if (uiSchool >= 0 && pTempSpell->SchoolMask & uiSchool) continue; - //Check for spell mechanic if specified + // Check for spell mechanic if specified if (iMechanic >= 0 && pTempSpell->Mechanic != (uint32)iMechanic) continue; - //Make sure that the spell uses the requested amount of power + // Make sure that the spell uses the requested amount of power if (uiPowerCostMin && pTempSpell->manaCost < uiPowerCostMin) continue; if (uiPowerCostMax && pTempSpell->manaCost > uiPowerCostMax) continue; - //Continue if we don't have the mana to actually cast this spell + // Continue if we don't have the mana to actually cast this spell if (pTempSpell->manaCost > m_creature->GetPower((Powers)pTempSpell->powerType)) continue; - //Get the Range + // Get the Range pTempRange = GetSpellRangeStore()->LookupEntry(pTempSpell->rangeIndex); - //Spell has invalid range store so we can't use it + // Spell has invalid range store so we can't use it if (!pTempRange) continue; - //Check if the spell meets our range requirements + // Check if the spell meets our range requirements if (fRangeMin && pTempRange->maxRange < fRangeMin) continue; if (fRangeMax && pTempRange->maxRange > fRangeMax) continue; - //Check if our target is in range + // Check if our target is in range if (m_creature->IsWithinDistInMap(pTarget, pTempRange->minRange) || !m_creature->IsWithinDistInMap(pTarget, pTempRange->maxRange)) continue; - //All good so lets add it to the spell list + // All good so lets add it to the spell list apSpell[uiSpellCount] = pTempSpell; ++uiSpellCount; } - //We got our usable spells so now lets randomly pick one + // We got our usable spells so now lets randomly pick one if (!uiSpellCount) return NULL; - return apSpell[urand(0, uiSpellCount -1)]; + return apSpell[urand(0, uiSpellCount - 1)]; } bool ScriptedAI::CanCast(Unit* pTarget, SpellEntry const* pSpellEntry, bool bTriggered) { - //No target so we can't cast + // No target so we can't cast if (!pTarget || !pSpellEntry) return false; - //Silenced so we can't cast + // Silenced so we can't cast if (!bTriggered && m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_SILENCED)) return false; - //Check for power + // Check for power if (!bTriggered && m_creature->GetPower((Powers)pSpellEntry->powerType) < pSpellEntry->manaCost) return false; SpellRangeEntry const* pTempRange = GetSpellRangeStore()->LookupEntry(pSpellEntry->rangeIndex); - //Spell has invalid range store so we can't use it + // Spell has invalid range store so we can't use it if (!pTempRange) return false; - //Unit is out of range of this spell + // Unit is out of range of this spell if (!m_creature->IsInRange(pTarget, pTempRange->minRange, pTempRange->maxRange)) return false; @@ -324,75 +324,75 @@ void FillSpellSummary() SpellSummary[i].Targets = 0; pTempSpell = GetSpellStore()->LookupEntry(i); - //This spell doesn't exist + // This spell doesn't exist if (!pTempSpell) continue; for (uint8 j = 0; j < 3; ++j) { - //Spell targets self + // Spell targets self if (pTempSpell->EffectImplicitTargetA[j] == TARGET_SELF) - SpellSummary[i].Targets |= 1 << (SELECT_TARGET_SELF-1); + SpellSummary[i].Targets |= 1 << (SELECT_TARGET_SELF - 1); - //Spell targets a single enemy + // Spell targets a single enemy if (pTempSpell->EffectImplicitTargetA[j] == TARGET_CHAIN_DAMAGE || - pTempSpell->EffectImplicitTargetA[j] == TARGET_CURRENT_ENEMY_COORDINATES) - SpellSummary[i].Targets |= 1 << (SELECT_TARGET_SINGLE_ENEMY-1); + pTempSpell->EffectImplicitTargetA[j] == TARGET_CURRENT_ENEMY_COORDINATES) + SpellSummary[i].Targets |= 1 << (SELECT_TARGET_SINGLE_ENEMY - 1); - //Spell targets AoE at enemy + // Spell targets AoE at enemy if (pTempSpell->EffectImplicitTargetA[j] == TARGET_ALL_ENEMY_IN_AREA || - pTempSpell->EffectImplicitTargetA[j] == TARGET_ALL_ENEMY_IN_AREA_INSTANT || - pTempSpell->EffectImplicitTargetA[j] == TARGET_CASTER_COORDINATES || - pTempSpell->EffectImplicitTargetA[j] == TARGET_ALL_ENEMY_IN_AREA_CHANNELED) - SpellSummary[i].Targets |= 1 << (SELECT_TARGET_AOE_ENEMY-1); + pTempSpell->EffectImplicitTargetA[j] == TARGET_ALL_ENEMY_IN_AREA_INSTANT || + pTempSpell->EffectImplicitTargetA[j] == TARGET_CASTER_COORDINATES || + pTempSpell->EffectImplicitTargetA[j] == TARGET_ALL_ENEMY_IN_AREA_CHANNELED) + SpellSummary[i].Targets |= 1 << (SELECT_TARGET_AOE_ENEMY - 1); - //Spell targets an enemy + // Spell targets an enemy if (pTempSpell->EffectImplicitTargetA[j] == TARGET_CHAIN_DAMAGE || - pTempSpell->EffectImplicitTargetA[j] == TARGET_CURRENT_ENEMY_COORDINATES || - pTempSpell->EffectImplicitTargetA[j] == TARGET_ALL_ENEMY_IN_AREA || - pTempSpell->EffectImplicitTargetA[j] == TARGET_ALL_ENEMY_IN_AREA_INSTANT || - pTempSpell->EffectImplicitTargetA[j] == TARGET_CASTER_COORDINATES || - pTempSpell->EffectImplicitTargetA[j] == TARGET_ALL_ENEMY_IN_AREA_CHANNELED) - SpellSummary[i].Targets |= 1 << (SELECT_TARGET_ANY_ENEMY-1); - - //Spell targets a single friend(or self) + pTempSpell->EffectImplicitTargetA[j] == TARGET_CURRENT_ENEMY_COORDINATES || + pTempSpell->EffectImplicitTargetA[j] == TARGET_ALL_ENEMY_IN_AREA || + pTempSpell->EffectImplicitTargetA[j] == TARGET_ALL_ENEMY_IN_AREA_INSTANT || + pTempSpell->EffectImplicitTargetA[j] == TARGET_CASTER_COORDINATES || + pTempSpell->EffectImplicitTargetA[j] == TARGET_ALL_ENEMY_IN_AREA_CHANNELED) + SpellSummary[i].Targets |= 1 << (SELECT_TARGET_ANY_ENEMY - 1); + + // Spell targets a single friend(or self) if (pTempSpell->EffectImplicitTargetA[j] == TARGET_SELF || - pTempSpell->EffectImplicitTargetA[j] == TARGET_SINGLE_FRIEND || - pTempSpell->EffectImplicitTargetA[j] == TARGET_SINGLE_PARTY) - SpellSummary[i].Targets |= 1 << (SELECT_TARGET_SINGLE_FRIEND-1); + pTempSpell->EffectImplicitTargetA[j] == TARGET_SINGLE_FRIEND || + pTempSpell->EffectImplicitTargetA[j] == TARGET_SINGLE_PARTY) + SpellSummary[i].Targets |= 1 << (SELECT_TARGET_SINGLE_FRIEND - 1); - //Spell targets aoe friends + // Spell targets aoe friends if (pTempSpell->EffectImplicitTargetA[j] == TARGET_ALL_PARTY_AROUND_CASTER || - pTempSpell->EffectImplicitTargetA[j] == TARGET_AREAEFFECT_PARTY || - pTempSpell->EffectImplicitTargetA[j] == TARGET_CASTER_COORDINATES) - SpellSummary[i].Targets |= 1 << (SELECT_TARGET_AOE_FRIEND-1); + pTempSpell->EffectImplicitTargetA[j] == TARGET_AREAEFFECT_PARTY || + pTempSpell->EffectImplicitTargetA[j] == TARGET_CASTER_COORDINATES) + SpellSummary[i].Targets |= 1 << (SELECT_TARGET_AOE_FRIEND - 1); - //Spell targets any friend(or self) + // Spell targets any friend(or self) if (pTempSpell->EffectImplicitTargetA[j] == TARGET_SELF || - pTempSpell->EffectImplicitTargetA[j] == TARGET_SINGLE_FRIEND || - pTempSpell->EffectImplicitTargetA[j] == TARGET_SINGLE_PARTY || - pTempSpell->EffectImplicitTargetA[j] == TARGET_ALL_PARTY_AROUND_CASTER || - pTempSpell->EffectImplicitTargetA[j] == TARGET_AREAEFFECT_PARTY || - pTempSpell->EffectImplicitTargetA[j] == TARGET_CASTER_COORDINATES) - SpellSummary[i].Targets |= 1 << (SELECT_TARGET_ANY_FRIEND-1); - - //Make sure that this spell includes a damage effect + pTempSpell->EffectImplicitTargetA[j] == TARGET_SINGLE_FRIEND || + pTempSpell->EffectImplicitTargetA[j] == TARGET_SINGLE_PARTY || + pTempSpell->EffectImplicitTargetA[j] == TARGET_ALL_PARTY_AROUND_CASTER || + pTempSpell->EffectImplicitTargetA[j] == TARGET_AREAEFFECT_PARTY || + pTempSpell->EffectImplicitTargetA[j] == TARGET_CASTER_COORDINATES) + SpellSummary[i].Targets |= 1 << (SELECT_TARGET_ANY_FRIEND - 1); + + // Make sure that this spell includes a damage effect if (pTempSpell->Effect[j] == SPELL_EFFECT_SCHOOL_DAMAGE || - pTempSpell->Effect[j] == SPELL_EFFECT_INSTAKILL || - pTempSpell->Effect[j] == SPELL_EFFECT_ENVIRONMENTAL_DAMAGE || - pTempSpell->Effect[j] == SPELL_EFFECT_HEALTH_LEECH) - SpellSummary[i].Effects |= 1 << (SELECT_EFFECT_DAMAGE-1); + pTempSpell->Effect[j] == SPELL_EFFECT_INSTAKILL || + pTempSpell->Effect[j] == SPELL_EFFECT_ENVIRONMENTAL_DAMAGE || + pTempSpell->Effect[j] == SPELL_EFFECT_HEALTH_LEECH) + SpellSummary[i].Effects |= 1 << (SELECT_EFFECT_DAMAGE - 1); - //Make sure that this spell includes a healing effect (or an apply aura with a periodic heal) + // Make sure that this spell includes a healing effect (or an apply aura with a periodic heal) if (pTempSpell->Effect[j] == SPELL_EFFECT_HEAL || - pTempSpell->Effect[j] == SPELL_EFFECT_HEAL_MAX_HEALTH || - pTempSpell->Effect[j] == SPELL_EFFECT_HEAL_MECHANICAL || - (pTempSpell->Effect[j] == SPELL_EFFECT_APPLY_AURA && pTempSpell->EffectApplyAuraName[j]== 8)) - SpellSummary[i].Effects |= 1 << (SELECT_EFFECT_HEALING-1); + pTempSpell->Effect[j] == SPELL_EFFECT_HEAL_MAX_HEALTH || + pTempSpell->Effect[j] == SPELL_EFFECT_HEAL_MECHANICAL || + (pTempSpell->Effect[j] == SPELL_EFFECT_APPLY_AURA && pTempSpell->EffectApplyAuraName[j] == 8)) + SpellSummary[i].Effects |= 1 << (SELECT_EFFECT_HEALING - 1); - //Make sure that this spell applies an aura + // Make sure that this spell applies an aura if (pTempSpell->Effect[j] == SPELL_EFFECT_APPLY_AURA) - SpellSummary[i].Effects |= 1 << (SELECT_EFFECT_AURA-1); + SpellSummary[i].Effects |= 1 << (SELECT_EFFECT_AURA - 1); } } } @@ -406,7 +406,7 @@ void ScriptedAI::DoResetThreat() } ThreatList const& tList = m_creature->getThreatManager().getThreatList(); - for (ThreatList::const_iterator itr = tList.begin();itr != tList.end(); ++itr) + for (ThreatList::const_iterator itr = tList.begin(); itr != tList.end(); ++itr) { Unit* pUnit = m_creature->GetMap()->GetUnit((*itr)->getUnitGuid()); @@ -531,7 +531,7 @@ bool ScriptedAI::EnterEvadeIfOutOfCombatArea(const uint32 uiDiff) float fY = m_creature->GetPositionY(); float fZ = m_creature->GetPositionZ(); - switch(m_creature->GetEntry()) + switch (m_creature->GetEntry()) { case NPC_BROODLORD: // broodlord (not move down stairs) if (fZ > 448.60f) diff --git a/include/sc_creature.h b/include/sc_creature.h index c386eb4ea..b5542308f 100644 --- a/include/sc_creature.h +++ b/include/sc_creature.h @@ -8,29 +8,29 @@ #include "Chat.h" #include "DBCStores.h" // Mostly only used the Lookup acces, but a few cases really do use the DBC-Stores -//Spell targets used by SelectSpell +// Spell targets used by SelectSpell enum SelectTarget { - SELECT_TARGET_DONTCARE = 0, //All target types allowed + SELECT_TARGET_DONTCARE = 0, // All target types allowed - SELECT_TARGET_SELF, //Only Self casting + SELECT_TARGET_SELF, // Only Self casting - SELECT_TARGET_SINGLE_ENEMY, //Only Single Enemy - SELECT_TARGET_AOE_ENEMY, //Only AoE Enemy - SELECT_TARGET_ANY_ENEMY, //AoE or Single Enemy + SELECT_TARGET_SINGLE_ENEMY, // Only Single Enemy + SELECT_TARGET_AOE_ENEMY, // Only AoE Enemy + SELECT_TARGET_ANY_ENEMY, // AoE or Single Enemy - SELECT_TARGET_SINGLE_FRIEND, //Only Single Friend - SELECT_TARGET_AOE_FRIEND, //Only AoE Friend - SELECT_TARGET_ANY_FRIEND, //AoE or Single Friend + SELECT_TARGET_SINGLE_FRIEND, // Only Single Friend + SELECT_TARGET_AOE_FRIEND, // Only AoE Friend + SELECT_TARGET_ANY_FRIEND, // AoE or Single Friend }; -//Spell Effects used by SelectSpell +// Spell Effects used by SelectSpell enum SelectEffect { - SELECT_EFFECT_DONTCARE = 0, //All spell effects allowed - SELECT_EFFECT_DAMAGE, //Spell does damage - SELECT_EFFECT_HEALING, //Spell does healing - SELECT_EFFECT_AURA, //Spell applies an aura + SELECT_EFFECT_DONTCARE = 0, // All spell effects allowed + SELECT_EFFECT_DAMAGE, // Spell does damage + SELECT_EFFECT_HEALING, // Spell does healing + SELECT_EFFECT_AURA, // Spell applies an aura }; enum SCEquip diff --git a/include/sc_grid_searchers.cpp b/include/sc_grid_searchers.cpp index 733aa8202..8d62d6bd5 100644 --- a/include/sc_grid_searchers.cpp +++ b/include/sc_grid_searchers.cpp @@ -10,7 +10,7 @@ #include "GridNotifiersImpl.h" -//return closest GO in grid, with range from pSource +// return closest GO in grid, with range from pSource GameObject* GetClosestGameObjectWithEntry(WorldObject* pSource, uint32 uiEntry, float fMaxSearchRange) { GameObject* pGo = NULL; @@ -23,7 +23,7 @@ GameObject* GetClosestGameObjectWithEntry(WorldObject* pSource, uint32 uiEntry, return pGo; } -//return closest creature alive in grid, with range from pSource +// return closest creature alive in grid, with range from pSource Creature* GetClosestCreatureWithEntry(WorldObject* pSource, uint32 uiEntry, float fMaxSearchRange, bool bOnlyAlive/*=true*/, bool bOnlyDead/*=false*/) { Creature* pCreature = NULL; diff --git a/include/sc_grid_searchers.h b/include/sc_grid_searchers.h index 9290acced..400a426ad 100644 --- a/include/sc_grid_searchers.h +++ b/include/sc_grid_searchers.h @@ -39,7 +39,7 @@ Creature* GetClosestCreatureWithEntry(WorldObject* pSource, uint32 uiEntry, floa void GetGameObjectListWithEntryInGrid(std::list& lList , WorldObject* pSource, uint32 uiEntry, float fMaxSearchRange); void GetCreatureListWithEntryInGrid(std::list& lList, WorldObject* pSource, uint32 uiEntry, float fMaxSearchRange); -//Used in: hyjalAI.cpp +// Used in: hyjalAI.cpp /* class AllFriendlyCreaturesInGrid { diff --git a/include/sc_instance.cpp b/include/sc_instance.cpp index f7cf3e200..4340c2280 100644 --- a/include/sc_instance.cpp +++ b/include/sc_instance.cpp @@ -54,9 +54,9 @@ void ScriptedInstance::DoRespawnGameObject(ObjectGuid guid, uint32 uiTimeToDespa if (GameObject* pGo = instance->GetGameObject(guid)) { - //not expect any of these should ever be handled + // not expect any of these should ever be handled if (pGo->GetGoType() == GAMEOBJECT_TYPE_FISHINGNODE || pGo->GetGoType() == GAMEOBJECT_TYPE_DOOR || - pGo->GetGoType() == GAMEOBJECT_TYPE_BUTTON) + pGo->GetGoType() == GAMEOBJECT_TYPE_BUTTON) return; if (pGo->isSpawned()) @@ -123,7 +123,7 @@ void ScriptedInstance::DoUpdateWorldState(uint32 uiStateId, uint32 uiStateData) if (!lPlayers.isEmpty()) { - for(Map::PlayerList::const_iterator itr = lPlayers.begin(); itr != lPlayers.end(); ++itr) + for (Map::PlayerList::const_iterator itr = lPlayers.begin(); itr != lPlayers.end(); ++itr) { if (Player* pPlayer = itr->getSource()) pPlayer->SendUpdateWorldState(uiStateId, uiStateData); @@ -138,7 +138,7 @@ Player* ScriptedInstance::GetPlayerInMap(bool bOnlyAlive /*=false*/, bool bCanBe { Map::PlayerList const& lPlayers = instance->GetPlayers(); - for(Map::PlayerList::const_iterator itr = lPlayers.begin(); itr != lPlayers.end(); ++itr) + for (Map::PlayerList::const_iterator itr = lPlayers.begin(); itr != lPlayers.end(); ++itr) { Player* pPlayer = itr->getSource(); if (pPlayer && (!bOnlyAlive || pPlayer->isAlive()) && (bCanBeGamemaster || !pPlayer->isGameMaster())) @@ -187,7 +187,7 @@ void ScriptedInstance::DoStartTimedAchievement(AchievementCriteriaTypes criteria if (!lPlayers.isEmpty()) { - for(Map::PlayerList::const_iterator itr = lPlayers.begin(); itr != lPlayers.end(); ++itr) + for (Map::PlayerList::const_iterator itr = lPlayers.begin(); itr != lPlayers.end(); ++itr) { if (Player* pPlayer = itr->getSource()) pPlayer->StartTimedAchievementCriteria(criteriaType, uiTimedCriteriaMiscId); diff --git a/scripts/battlegrounds/battleground.cpp b/scripts/battlegrounds/battleground.cpp index b77dd2a76..2579c9a56 100644 --- a/scripts/battlegrounds/battleground.cpp +++ b/scripts/battlegrounds/battleground.cpp @@ -62,7 +62,7 @@ struct MANGOS_DLL_DECL npc_spirit_guideAI : public ScriptedAI m_creature->CastSpell(m_creature, SPELL_SPIRIT_HEAL_CHANNEL, false); } - void CorpseRemoved(uint32 &) + void CorpseRemoved(uint32&) { // TODO: would be better to cast a dummy spell Map* pMap = m_creature->GetMap(); @@ -70,9 +70,9 @@ struct MANGOS_DLL_DECL npc_spirit_guideAI : public ScriptedAI if (!pMap || !pMap->IsBattleGround()) return; - Map::PlayerList const &PlayerList = pMap->GetPlayers(); + Map::PlayerList const& PlayerList = pMap->GetPlayers(); - for(Map::PlayerList::const_iterator itr = PlayerList.begin(); itr != PlayerList.end(); ++itr) + for (Map::PlayerList::const_iterator itr = PlayerList.begin(); itr != PlayerList.end(); ++itr) { Player* pPlayer = itr->getSource(); if (!pPlayer || !pPlayer->IsWithinDistInMap(m_creature, 20.0f) || !pPlayer->HasAura(SPELL_WAITING_TO_RESURRECT)) @@ -83,10 +83,10 @@ struct MANGOS_DLL_DECL npc_spirit_guideAI : public ScriptedAI } } - void SpellHitTarget (Unit* pUnit, const SpellEntry* pSpellEntry) + void SpellHitTarget(Unit* pUnit, const SpellEntry* pSpellEntry) { if (pSpellEntry->Id == SPELL_SPIRIT_HEAL && pUnit->GetTypeId() == TYPEID_PLAYER - && pUnit->HasAura(SPELL_WAITING_TO_RESURRECT)) + && pUnit->HasAura(SPELL_WAITING_TO_RESURRECT)) pUnit->CastSpell(pUnit, SPELL_SPIRIT_HEAL_MANA, true); } }; diff --git a/scripts/eastern_kingdoms/arathi_highlands.cpp b/scripts/eastern_kingdoms/arathi_highlands.cpp index 4bf7206fe..6253f8378 100644 --- a/scripts/eastern_kingdoms/arathi_highlands.cpp +++ b/scripts/eastern_kingdoms/arathi_highlands.cpp @@ -62,7 +62,7 @@ struct MANGOS_DLL_DECL npc_professor_phizzlethorpeAI : public npc_escortAI if (!pPlayer) return; - switch(uiPointId) + switch (uiPointId) { case 4: DoScriptText(SAY_PROGRESS_2, m_creature, pPlayer); break; case 5: DoScriptText(SAY_PROGRESS_3, m_creature, pPlayer); break; diff --git a/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.cpp b/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.cpp index aa93942be..fcb94ad58 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.cpp +++ b/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.cpp @@ -92,7 +92,7 @@ enum NPC_GRIMSTONE = 10096, DATA_BANNER_BEFORE_EVENT = 5, - //4 or 6 in total? 1+2+1 / 2+2+2 / 3+3. Depending on this, code should be changed. + // 4 or 6 in total? 1+2+1 / 2+2+2 / 3+3. Depending on this, code should be changed. MAX_MOB_AMOUNT = 4, MAX_THELDREN_ADDS = 4, MAX_POSSIBLE_THELDREN_ADDS = 8, @@ -220,7 +220,7 @@ struct MANGOS_DLL_DECL npc_grimstoneAI : public npc_escortAI void DoChallengeQuestCredit() { - Map::PlayerList const &PlayerList = m_creature->GetMap()->GetPlayers(); + Map::PlayerList const& PlayerList = m_creature->GetMap()->GetPlayers(); for (Map::PlayerList::const_iterator itr = PlayerList.begin(); itr != PlayerList.end(); ++itr) { @@ -272,7 +272,7 @@ struct MANGOS_DLL_DECL npc_grimstoneAI : public npc_escortAI void WaypointReached(uint32 uiPointId) { - switch(uiPointId) + switch (uiPointId) { case 0: // Middle reached first time DoScriptText(urand(0, 1) ? SAY_START_1 : SAY_START_2, m_creature); @@ -341,11 +341,11 @@ struct MANGOS_DLL_DECL npc_grimstoneAI : public npc_escortAI { if (m_uiEventTimer <= uiDiff) { - switch(m_uiEventPhase) + switch (m_uiEventPhase) { case 0: // Shortly after spawn, start walking - //DoScriptText(-1000000, m_creature); // no more text on spawn + // DoScriptText(-1000000, m_creature); // no more text on spawn m_pInstance->DoUseDoorOrButton(GO_ARENA_4); Start(false); SetEscortPaused(false); @@ -386,7 +386,7 @@ struct MANGOS_DLL_DECL npc_grimstoneAI : public npc_escortAI // Summoned Mobs are dead, continue event m_creature->SetVisibility(VISIBILITY_ON); m_pInstance->DoUseDoorOrButton(GO_ARENA_1); - //DoScriptText(-1000000, m_creature); // after killed the mobs, no say here + // DoScriptText(-1000000, m_creature); // after killed the mobs, no say here SetEscortPaused(false); m_uiEventTimer = 0; break; @@ -476,10 +476,10 @@ bool GossipHello_npc_kharan_mighthammer(Player* pPlayer, Creature* pCreature) pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); if (pPlayer->GetQuestStatus(QUEST_WHAT_IS_GOING_ON) == QUEST_STATUS_INCOMPLETE) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KHARAN_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KHARAN_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); if (pPlayer->GetQuestStatus(QUEST_KHARANS_TALE) == QUEST_STATUS_INCOMPLETE) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KHARAN_2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KHARAN_2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); if (pPlayer->GetTeam() == HORDE) pPlayer->SEND_GOSSIP_MENU(2473, pCreature->GetObjectGuid()); @@ -491,39 +491,39 @@ bool GossipHello_npc_kharan_mighthammer(Player* pPlayer, Creature* pCreature) bool GossipSelect_npc_kharan_mighthammer(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) { - switch(uiAction) + switch (uiAction) { case GOSSIP_ACTION_INFO_DEF+1: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KHARAN_3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KHARAN_3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); pPlayer->SEND_GOSSIP_MENU(2475, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+2: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KHARAN_4, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KHARAN_4, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); pPlayer->SEND_GOSSIP_MENU(2476, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+3: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KHARAN_5, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+4); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KHARAN_5, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4); pPlayer->SEND_GOSSIP_MENU(2477, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+4: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KHARAN_6, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+5); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KHARAN_6, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 5); pPlayer->SEND_GOSSIP_MENU(2478, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+5: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KHARAN_7, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+6); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KHARAN_7, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 6); pPlayer->SEND_GOSSIP_MENU(2479, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+6: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KHARAN_8, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+7); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KHARAN_8, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 7); pPlayer->SEND_GOSSIP_MENU(2480, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+7: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KHARAN_9, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+8); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KHARAN_9, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 8); pPlayer->SEND_GOSSIP_MENU(2481, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+8: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KHARAN_10, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+9); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KHARAN_10, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 9); pPlayer->SEND_GOSSIP_MENU(2482, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+9: @@ -583,7 +583,7 @@ struct MANGOS_DLL_DECL npc_rocknotAI : public npc_escortAI if (!m_pInstance) return; - switch(uiPointId) + switch (uiPointId) { case 1: m_creature->HandleEmote(EMOTE_ONESHOT_KICK); @@ -626,8 +626,8 @@ struct MANGOS_DLL_DECL npc_rocknotAI : public npc_escortAI if (m_uiBreakDoorTimer <= uiDiff) { DoGo(GO_BAR_DOOR, 2); - DoGo(GO_BAR_KEG_TRAP, 0); //doesn't work very well, leaving code here for future - //spell by trap has effect61, this indicate the bar go hostile + DoGo(GO_BAR_KEG_TRAP, 0); // doesn't work very well, leaving code here for future + // spell by trap has effect61, this indicate the bar go hostile if (Creature* pTmp = m_pInstance->GetSingleCreatureFromStorage(NPC_PHALANX)) pTmp->setFaction(14); @@ -662,9 +662,9 @@ bool QuestRewarded_npc_rocknot(Player* pPlayer, Creature* pCreature, Quest const if (pQuest->GetQuestId() == QUEST_ALE) { if (pInstance->GetData(TYPE_BAR) != IN_PROGRESS) - pInstance->SetData(TYPE_BAR,IN_PROGRESS); + pInstance->SetData(TYPE_BAR, IN_PROGRESS); - pInstance->SetData(TYPE_BAR,SPECIAL); + pInstance->SetData(TYPE_BAR, SPECIAL); // keep track of amount in instance script, returns SPECIAL if amount ok and event in progress if (pInstance->GetData(TYPE_BAR) == SPECIAL) @@ -947,7 +947,7 @@ bool QuestAccept_npc_marshal_windsor(Player* pPlayer, Creature* pCreature, const bool GossipHello_npc_dughal_stormwing(Player* pPlayer, Creature* pCreature) { if (pPlayer->GetQuestStatus(QUEST_JAIL_BREAK) == QUEST_STATUS_INCOMPLETE) - pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ID_DUGHAL, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ID_DUGHAL, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXT_ID_DUGHAL, pCreature->GetObjectGuid()); return true; @@ -955,7 +955,7 @@ bool GossipHello_npc_dughal_stormwing(Player* pPlayer, Creature* pCreature) bool GossipSelect_npc_dughal_stormwing(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) { - if (uiAction == GOSSIP_ACTION_INFO_DEF+1) + if (uiAction == GOSSIP_ACTION_INFO_DEF + 1) { // Set instance data in order to allow the quest to continue if (instance_blackrock_depths* pInstance = (instance_blackrock_depths*)pCreature->GetInstanceData()) @@ -980,7 +980,7 @@ bool GossipSelect_npc_dughal_stormwing(Player* pPlayer, Creature* pCreature, uin bool GossipHello_npc_tobias_seecher(Player* pPlayer, Creature* pCreature) { if (pPlayer->GetQuestStatus(QUEST_JAIL_BREAK) == QUEST_STATUS_INCOMPLETE) - pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ID_TOBIAS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ID_TOBIAS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXT_ID_TOBIAS, pCreature->GetObjectGuid()); @@ -989,7 +989,7 @@ bool GossipHello_npc_tobias_seecher(Player* pPlayer, Creature* pCreature) bool GossipSelect_npc_tobias_seecher(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) { - if (uiAction == GOSSIP_ACTION_INFO_DEF+1) + if (uiAction == GOSSIP_ACTION_INFO_DEF + 1) { // Set instance data in order to allow the quest to continue if (instance_blackrock_depths* pInstance = (instance_blackrock_depths*)pCreature->GetInstanceData()) @@ -1032,7 +1032,7 @@ bool GossipHello_boss_doomrel(Player* pPlayer, Creature* pCreature) bool GossipSelect_boss_doomrel(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) { - switch(uiAction) + switch (uiAction) { case GOSSIP_ACTION_INFO_DEF+1: pPlayer->CLOSE_GOSSIP_MENU(); diff --git a/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.h b/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.h index dcde1c25e..91f23fcc6 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.h +++ b/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.h @@ -142,7 +142,7 @@ class MANGOS_DLL_DECL instance_blackrock_depths : public ScriptedInstance // Arena Event void SetArenaCenterCoords(float fX, float fY, float fZ) { m_fArenaCenterX = fX; m_fArenaCenterY = fY; m_fArenaCenterZ = fZ; } - void GetArenaCenterCoords(float &fX, float &fY, float &fZ) { fX = m_fArenaCenterX; fY = m_fArenaCenterY; fZ = m_fArenaCenterZ; } + void GetArenaCenterCoords(float& fX, float& fY, float& fZ) { fX = m_fArenaCenterX; fY = m_fArenaCenterY; fZ = m_fArenaCenterZ; } private: void DoCallNextDwarf(); diff --git a/scripts/eastern_kingdoms/blackrock_depths/boss_ambassador_flamelash.cpp b/scripts/eastern_kingdoms/blackrock_depths/boss_ambassador_flamelash.cpp index b071ad1fd..c5e174c42 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/boss_ambassador_flamelash.cpp +++ b/scripts/eastern_kingdoms/blackrock_depths/boss_ambassador_flamelash.cpp @@ -50,7 +50,7 @@ struct MANGOS_DLL_DECL boss_ambassador_flamelashAI : public ScriptedAI { float fX, fY, fZ; m_creature->GetRandomPoint(m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), 30.0f, fX, fY, fZ); - m_creature->SummonCreature(NPC_BURNING_SPIRIT, fX, fY, fZ, m_creature->GetAngle(fX, fY)+M_PI_F, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 60000); + m_creature->SummonCreature(NPC_BURNING_SPIRIT, fX, fY, fZ, m_creature->GetAngle(fX, fY) + M_PI_F, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 60000); } void Aggro(Unit* pWho) @@ -73,11 +73,11 @@ struct MANGOS_DLL_DECL boss_ambassador_flamelashAI : public ScriptedAI void UpdateAI(const uint32 uiDiff) { - //Return since we have no target + // Return since we have no target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - //m_uiSpiritTimer + // m_uiSpiritTimer if (m_uiSpiritTimer < uiDiff) { SummonSpirits(); diff --git a/scripts/eastern_kingdoms/blackrock_depths/boss_coren_direbrew.cpp b/scripts/eastern_kingdoms/blackrock_depths/boss_coren_direbrew.cpp index 257a105ea..a97803808 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/boss_coren_direbrew.cpp +++ b/scripts/eastern_kingdoms/blackrock_depths/boss_coren_direbrew.cpp @@ -37,12 +37,12 @@ enum SPELL_PORT_TO_COREN = 52850, // other summoned spells - currently not used in script - //SPELL_CHUCK_MUG = 50276, - //SPELL_BARRELED_AURA = 50278, // used by Ursula - //SPELL_HAS_BREW = 47331, // triggers 47344 - aura which asks for the second brew on item expire - //SPELL_SEND_FIRST_MUG = 47333, // triggers 47345 - //SPELL_SEND_SECOND_MUG = 47339, // triggers 47340 - spell triggered by 47344 - //SPELL_BREWMAIDEN_DESPAWN_AURA = 48186, // purpose unk + // SPELL_CHUCK_MUG = 50276, + // SPELL_BARRELED_AURA = 50278, // used by Ursula + // SPELL_HAS_BREW = 47331, // triggers 47344 - aura which asks for the second brew on item expire + // SPELL_SEND_FIRST_MUG = 47333, // triggers 47345 + // SPELL_SEND_SECOND_MUG = 47339, // triggers 47340 - spell triggered by 47344 + // SPELL_BREWMAIDEN_DESPAWN_AURA = 48186, // purpose unk // npcs NPC_DIREBREW_MINION = 26776, diff --git a/scripts/eastern_kingdoms/blackrock_depths/boss_emperor_dagran_thaurissan.cpp b/scripts/eastern_kingdoms/blackrock_depths/boss_emperor_dagran_thaurissan.cpp index 0755cce51..bd8457055 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/boss_emperor_dagran_thaurissan.cpp +++ b/scripts/eastern_kingdoms/blackrock_depths/boss_emperor_dagran_thaurissan.cpp @@ -46,13 +46,13 @@ struct MANGOS_DLL_DECL boss_emperor_dagran_thaurissanAI : public ScriptedAI uint32 m_uiHandOfThaurissan_Timer; uint32 m_uiAvatarOfFlame_Timer; - //uint32 m_uiCounter; + // uint32 m_uiCounter; void Reset() { m_uiHandOfThaurissan_Timer = 4000; m_uiAvatarOfFlame_Timer = 25000; - //m_uiCounter = 0; + // m_uiCounter = 0; } void Aggro(Unit* pWho) @@ -88,28 +88,28 @@ struct MANGOS_DLL_DECL boss_emperor_dagran_thaurissanAI : public ScriptedAI if (m_uiHandOfThaurissan_Timer < uiDiff) { - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) - DoCastSpellIfCan(pTarget,SPELL_HANDOFTHAURISSAN); + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + DoCastSpellIfCan(pTarget, SPELL_HANDOFTHAURISSAN); - //3 Hands of Thaurissan will be casted - //if (m_uiCounter < 3) + // 3 Hands of Thaurissan will be casted + // if (m_uiCounter < 3) //{ // m_uiHandOfThaurissan_Timer = 1000; // ++m_uiCounter; //} - //else + // else //{ - m_uiHandOfThaurissan_Timer = 5000; - //m_uiCounter = 0; + m_uiHandOfThaurissan_Timer = 5000; + // m_uiCounter = 0; //} } else m_uiHandOfThaurissan_Timer -= uiDiff; - //AvatarOfFlame_Timer + // AvatarOfFlame_Timer if (m_uiAvatarOfFlame_Timer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_AVATAROFFLAME); + DoCastSpellIfCan(m_creature->getVictim(), SPELL_AVATAROFFLAME); m_uiAvatarOfFlame_Timer = 18000; } else @@ -157,7 +157,7 @@ struct MANGOS_DLL_DECL boss_moira_bronzebeardAI : public ScriptedAI void Reset() { - m_uiHeal_Timer = 12000; //These times are probably wrong + m_uiHeal_Timer = 12000; // These times are probably wrong m_uiMindBlast_Timer = 16000; m_uiShadowWordPain_Timer = 2000; m_uiSmite_Timer = 8000; @@ -190,38 +190,38 @@ struct MANGOS_DLL_DECL boss_moira_bronzebeardAI : public ScriptedAI void UpdateAI(const uint32 uiDiff) { - //Return since we have no target + // Return since we have no target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - //MindBlast_Timer + // MindBlast_Timer if (m_uiMindBlast_Timer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_MINDBLAST); + DoCastSpellIfCan(m_creature->getVictim(), SPELL_MINDBLAST); m_uiMindBlast_Timer = 14000; } else m_uiMindBlast_Timer -= uiDiff; - //ShadowWordPain_Timer + // ShadowWordPain_Timer if (m_uiShadowWordPain_Timer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_SHADOWWORDPAIN); + DoCastSpellIfCan(m_creature->getVictim(), SPELL_SHADOWWORDPAIN); m_uiShadowWordPain_Timer = 18000; } else m_uiShadowWordPain_Timer -= uiDiff; - //Smite_Timer + // Smite_Timer if (m_uiSmite_Timer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_SMITE); + DoCastSpellIfCan(m_creature->getVictim(), SPELL_SMITE); m_uiSmite_Timer = 10000; } else m_uiSmite_Timer -= uiDiff; - //Heal_Timer + // Heal_Timer if (m_uiHeal_Timer < uiDiff) { if (Creature* pEmperor = m_pInstance->GetSingleCreatureFromStorage(NPC_EMPEROR)) @@ -235,7 +235,7 @@ struct MANGOS_DLL_DECL boss_moira_bronzebeardAI : public ScriptedAI else m_uiHeal_Timer -= uiDiff; - //No meele? + // No meele? } }; diff --git a/scripts/eastern_kingdoms/blackrock_depths/boss_general_angerforge.cpp b/scripts/eastern_kingdoms/blackrock_depths/boss_general_angerforge.cpp index 2c20c7120..d85600fd2 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/boss_general_angerforge.cpp +++ b/scripts/eastern_kingdoms/blackrock_depths/boss_general_angerforge.cpp @@ -67,11 +67,11 @@ struct MANGOS_DLL_DECL boss_general_angerforgeAI : public ScriptedAI void UpdateAI(const uint32 uiDiff) { - //Return since we have no target + // Return since we have no target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - //MightyBlow_Timer + // MightyBlow_Timer if (m_uiMightyBlowTimer < uiDiff) { DoCastSpellIfCan(m_creature->getVictim(), SPELL_MIGHTYBLOW); @@ -80,7 +80,7 @@ struct MANGOS_DLL_DECL boss_general_angerforgeAI : public ScriptedAI else m_uiMightyBlowTimer -= uiDiff; - //HamString_Timer + // HamString_Timer if (m_uiHamStringTimer < uiDiff) { DoCastSpellIfCan(m_creature->getVictim(), SPELL_HAMSTRING); @@ -89,7 +89,7 @@ struct MANGOS_DLL_DECL boss_general_angerforgeAI : public ScriptedAI else m_uiHamStringTimer -= uiDiff; - //Cleave_Timer + // Cleave_Timer if (m_uiCleaveTimer < uiDiff) { DoCastSpellIfCan(m_creature->getVictim(), SPELL_CLEAVE); @@ -98,7 +98,7 @@ struct MANGOS_DLL_DECL boss_general_angerforgeAI : public ScriptedAI else m_uiCleaveTimer -= uiDiff; - //Adds_Timer + // Adds_Timer if (m_creature->GetHealthPercent() < 21.0f) { if (m_uiAddsTimer < uiDiff) @@ -114,7 +114,7 @@ struct MANGOS_DLL_DECL boss_general_angerforgeAI : public ScriptedAI m_uiAddsTimer -= uiDiff; } - //Summon Medics + // Summon Medics if (!m_bSummonedMedics && m_creature->GetHealthPercent() < 21.0f) { SummonAdd(NPC_ANVILRAGE_MEDIC); diff --git a/scripts/eastern_kingdoms/blackrock_depths/boss_high_interrogator_gerstahn.cpp b/scripts/eastern_kingdoms/blackrock_depths/boss_high_interrogator_gerstahn.cpp index ca649875e..0de778084 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/boss_high_interrogator_gerstahn.cpp +++ b/scripts/eastern_kingdoms/blackrock_depths/boss_high_interrogator_gerstahn.cpp @@ -50,11 +50,11 @@ struct MANGOS_DLL_DECL boss_high_interrogator_gerstahnAI : public ScriptedAI void UpdateAI(const uint32 uiDiff) { - //Return since we have no target + // Return since we have no target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - //ShadowWordPain_Timer + // ShadowWordPain_Timer if (m_uiShadowWordPainTimer < uiDiff) { if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) @@ -65,7 +65,7 @@ struct MANGOS_DLL_DECL boss_high_interrogator_gerstahnAI : public ScriptedAI else m_uiShadowWordPainTimer -= uiDiff; - //ManaBurn_Timer + // ManaBurn_Timer if (m_uiManaBurnTimer < uiDiff) { if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0, SPELL_MANABURN, SELECT_FLAG_POWER_MANA)) @@ -76,7 +76,7 @@ struct MANGOS_DLL_DECL boss_high_interrogator_gerstahnAI : public ScriptedAI else m_uiManaBurnTimer -= uiDiff; - //PsychicScream_Timer + // PsychicScream_Timer if (m_uiPsychicScreamTimer < uiDiff) { DoCastSpellIfCan(m_creature, SPELL_PSYCHICSCREAM); @@ -85,7 +85,7 @@ struct MANGOS_DLL_DECL boss_high_interrogator_gerstahnAI : public ScriptedAI else m_uiPsychicScreamTimer -= uiDiff; - //ShadowShield_Timer + // ShadowShield_Timer if (m_uiShadowShieldTimer < uiDiff) { DoCastSpellIfCan(m_creature, SPELL_SHADOWSHIELD); diff --git a/scripts/eastern_kingdoms/blackrock_depths/instance_blackrock_depths.cpp b/scripts/eastern_kingdoms/blackrock_depths/instance_blackrock_depths.cpp index 003e93c4e..233ec2318 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/instance_blackrock_depths.cpp +++ b/scripts/eastern_kingdoms/blackrock_depths/instance_blackrock_depths.cpp @@ -44,7 +44,7 @@ void instance_blackrock_depths::Initialize() void instance_blackrock_depths::OnCreatureCreate(Creature* pCreature) { - switch(pCreature->GetEntry()) + switch (pCreature->GetEntry()) { case NPC_EMPEROR: case NPC_PRINCESS: @@ -79,7 +79,7 @@ void instance_blackrock_depths::OnCreatureCreate(Creature* pCreature) void instance_blackrock_depths::OnObjectCreate(GameObject* pGo) { - switch(pGo->GetEntry()) + switch (pGo->GetEntry()) { case GO_ARENA_1: case GO_ARENA_2: @@ -114,7 +114,7 @@ void instance_blackrock_depths::OnObjectCreate(GameObject* pGo) void instance_blackrock_depths::SetData(uint32 uiType, uint32 uiData) { - switch(uiType) + switch (uiType) { case TYPE_RING_OF_LAW: // If finished the arena event after theldren fight @@ -199,7 +199,7 @@ void instance_blackrock_depths::SetData(uint32 uiType, uint32 uiData) m_auiEncounter[4] = uiData; break; case TYPE_IRON_HALL: - switch(uiData) + switch (uiData) { case IN_PROGRESS: DoUseDoorOrButton(GO_GOLEM_ROOM_N); @@ -228,7 +228,7 @@ void instance_blackrock_depths::SetData(uint32 uiType, uint32 uiData) std::ostringstream saveStream; saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2] << " " - << m_auiEncounter[3] << " " << m_auiEncounter[4] << " " << m_auiEncounter[5] << " " << m_auiEncounter[6]; + << m_auiEncounter[3] << " " << m_auiEncounter[4] << " " << m_auiEncounter[5] << " " << m_auiEncounter[6]; m_strInstData = saveStream.str(); @@ -239,7 +239,7 @@ void instance_blackrock_depths::SetData(uint32 uiType, uint32 uiData) uint32 instance_blackrock_depths::GetData(uint32 uiType) { - switch(uiType) + switch (uiType) { case TYPE_RING_OF_LAW: return m_auiEncounter[0]; @@ -275,9 +275,9 @@ void instance_blackrock_depths::Load(const char* chrIn) std::istringstream loadStream(chrIn); loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3] - >> m_auiEncounter[4] >> m_auiEncounter[5] >> m_auiEncounter[6]; + >> m_auiEncounter[4] >> m_auiEncounter[5] >> m_auiEncounter[6]; - for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) + for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) if (m_auiEncounter[i] == IN_PROGRESS) m_auiEncounter[i] = NOT_STARTED; @@ -298,15 +298,15 @@ void instance_blackrock_depths::OnCreatureEvade(Creature* pCreature) { if (pCreature->GetEntry() == aArenaNPCs[i]) { - SetData(TYPE_RING_OF_LAW, FAIL); - return; - } + SetData(TYPE_RING_OF_LAW, FAIL); + return; + } } } switch (pCreature->GetEntry()) { - // Handle Tomb of the Seven reset in case of wipe + // Handle Tomb of the Seven reset in case of wipe case NPC_HATEREL: case NPC_ANGERREL: case NPC_VILEREL: @@ -324,7 +324,7 @@ void instance_blackrock_depths::OnCreatureEvade(Creature* pCreature) void instance_blackrock_depths::OnCreatureDeath(Creature* pCreature) { - switch(pCreature->GetEntry()) + switch (pCreature->GetEntry()) { case NPC_WARBRINGER_CONST: case NPC_WATCHER_DOOMGRIP: @@ -344,7 +344,7 @@ void instance_blackrock_depths::OnCreatureDeath(Creature* pCreature) if (GetData(TYPE_QUEST_JAIL_BREAK) == IN_PROGRESS) SetData(TYPE_QUEST_JAIL_BREAK, SPECIAL); break; - // Handle Tomb of the Seven dwarf death event + // Handle Tomb of the Seven dwarf death event case NPC_HATEREL: case NPC_ANGERREL: case NPC_VILEREL: diff --git a/scripts/eastern_kingdoms/blackrock_spire/blackrock_spire.h b/scripts/eastern_kingdoms/blackrock_spire/blackrock_spire.h index 5fce5558c..6ec0fb7aa 100644 --- a/scripts/eastern_kingdoms/blackrock_spire/blackrock_spire.h +++ b/scripts/eastern_kingdoms/blackrock_spire/blackrock_spire.h @@ -116,8 +116,8 @@ class MANGOS_DLL_DECL instance_blackrock_spire : public ScriptedInstance, privat void DoProcessEmberseerEvent(); void DoSortRoomEventMobs(); - void GetIncarceratorGUIDList(GuidList &lList) { lList = m_lIncarceratorGUIDList; } - void GetRookeryEggGUIDList(GuidList &lList) { lList = m_lRookeryEggGUIDList; } + void GetIncarceratorGUIDList(GuidList& lList) { lList = m_lIncarceratorGUIDList; } + void GetRookeryEggGUIDList(GuidList& lList) { lList = m_lRookeryEggGUIDList; } void Update(uint32 uiDiff); diff --git a/scripts/eastern_kingdoms/blackrock_spire/boss_gyth.cpp b/scripts/eastern_kingdoms/blackrock_spire/boss_gyth.cpp index 7e7c4ec0c..f00a8c2b1 100644 --- a/scripts/eastern_kingdoms/blackrock_spire/boss_gyth.cpp +++ b/scripts/eastern_kingdoms/blackrock_spire/boss_gyth.cpp @@ -73,7 +73,7 @@ struct MANGOS_DLL_DECL boss_gythAI : public ScriptedAI void UpdateAI(const uint32 uiDiff) { - //Return since we have no target + // Return since we have no target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/eastern_kingdoms/blackrock_spire/boss_overlord_wyrmthalak.cpp b/scripts/eastern_kingdoms/blackrock_spire/boss_overlord_wyrmthalak.cpp index fa8256101..d29f65b26 100644 --- a/scripts/eastern_kingdoms/blackrock_spire/boss_overlord_wyrmthalak.cpp +++ b/scripts/eastern_kingdoms/blackrock_spire/boss_overlord_wyrmthalak.cpp @@ -35,10 +35,10 @@ enum }; -const float afLocations[2][4]= +const float afLocations[2][4] = { - {-39.355381f, -513.456482f, 88.472046f, 4.679872f}, - {-49.875881f, -511.896942f, 88.195160f, 4.613114f} + { -39.355381f, -513.456482f, 88.472046f, 4.679872f}, + { -49.875881f, -511.896942f, 88.195160f, 4.613114f} }; struct MANGOS_DLL_DECL boss_overlordwyrmthalakAI : public ScriptedAI diff --git a/scripts/eastern_kingdoms/blackrock_spire/boss_pyroguard_emberseer.cpp b/scripts/eastern_kingdoms/blackrock_spire/boss_pyroguard_emberseer.cpp index 8c78aefce..a4ca612af 100644 --- a/scripts/eastern_kingdoms/blackrock_spire/boss_pyroguard_emberseer.cpp +++ b/scripts/eastern_kingdoms/blackrock_spire/boss_pyroguard_emberseer.cpp @@ -94,7 +94,7 @@ struct MANGOS_DLL_DECL boss_pyroguard_emberseerAI : public ScriptedAI { ++m_uiGrowingStacks; - if (m_uiGrowingStacks == MAX_GROWING_STACKS*0.5f) + if (m_uiGrowingStacks == MAX_GROWING_STACKS * 0.5f) DoScriptText(EMOTE_NEAR, m_creature); else if (m_uiGrowingStacks == MAX_GROWING_STACKS) { @@ -185,7 +185,7 @@ CreatureAI* GetAI_boss_pyroguard_emberseer(Creature* pCreature) bool EffectDummyCreature_pyroguard_emberseer(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) { - //always check spellid and effectindex + // always check spellid and effectindex if (uiSpellId == SPELL_GROWING && uiEffIndex == EFFECT_INDEX_0) { if (boss_pyroguard_emberseerAI* pEmberseerAI = dynamic_cast(pCreatureTarget->AI())) diff --git a/scripts/eastern_kingdoms/blackrock_spire/instance_blackrock_spire.cpp b/scripts/eastern_kingdoms/blackrock_spire/instance_blackrock_spire.cpp index 96db4888d..2de91da0c 100644 --- a/scripts/eastern_kingdoms/blackrock_spire/instance_blackrock_spire.cpp +++ b/scripts/eastern_kingdoms/blackrock_spire/instance_blackrock_spire.cpp @@ -96,7 +96,7 @@ void instance_blackrock_spire::Initialize() void instance_blackrock_spire::OnObjectCreate(GameObject* pGo) { - switch(pGo->GetEntry()) + switch (pGo->GetEntry()) { case GO_EMBERSEER_IN: if (GetData(TYPE_ROOM_EVENT) == DONE) @@ -146,7 +146,7 @@ void instance_blackrock_spire::OnObjectCreate(GameObject* pGo) void instance_blackrock_spire::OnCreatureCreate(Creature* pCreature) { - switch(pCreature->GetEntry()) + switch (pCreature->GetEntry()) { case NPC_PYROGUARD_EMBERSEER: case NPC_LORD_VICTOR_NEFARIUS: @@ -164,7 +164,7 @@ void instance_blackrock_spire::OnCreatureCreate(Creature* pCreature) void instance_blackrock_spire::SetData(uint32 uiType, uint32 uiData) { - switch(uiType) + switch (uiType) { case TYPE_ROOM_EVENT: if (uiData == DONE) @@ -285,7 +285,7 @@ void instance_blackrock_spire::Load(const char* chrIn) std::istringstream loadStream(chrIn); loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3] >> m_auiEncounter[4]; - for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) + for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) { if (m_auiEncounter[i] == IN_PROGRESS) m_auiEncounter[i] = NOT_STARTED; @@ -296,7 +296,7 @@ void instance_blackrock_spire::Load(const char* chrIn) uint32 instance_blackrock_spire::GetData(uint32 uiType) { - switch(uiType) + switch (uiType) { case TYPE_ROOM_EVENT: return m_auiEncounter[0]; case TYPE_EMBERSEER: return m_auiEncounter[1]; @@ -360,7 +360,7 @@ void instance_blackrock_spire::OnCreatureEvade(Creature* pCreature) { switch (pCreature->GetEntry()) { - // Emberseer should evade if the incarcerators evade + // Emberseer should evade if the incarcerators evade case NPC_BLACKHAND_INCARCERATOR: if (Creature* pEmberseer = GetSingleCreatureFromStorage(NPC_PYROGUARD_EMBERSEER)) pEmberseer->AI()->EnterEvadeMode(); @@ -383,7 +383,7 @@ void instance_blackrock_spire::OnCreatureEnterCombat(Creature* pCreature) { switch (pCreature->GetEntry()) { - // Once one of the Incarcerators gets Aggro, the door should close + // Once one of the Incarcerators gets Aggro, the door should close case NPC_BLACKHAND_INCARCERATOR: SetData(TYPE_EMBERSEER, IN_PROGRESS); break; @@ -484,7 +484,7 @@ void instance_blackrock_spire::DoSendNextStadiumWave() { if (m_uiStadiumWaves < MAX_STADIUM_WAVES) { - // Send current wave mobs + // Send current wave mobs if (Creature* pNefarius = GetSingleCreatureFromStorage(NPC_LORD_VICTOR_NEFARIUS)) { float fX, fY, fZ; @@ -494,12 +494,12 @@ void instance_blackrock_spire::DoSendNextStadiumWave() continue; pNefarius->GetRandomPoint(aStadiumLocs[0].m_fX, aStadiumLocs[0].m_fY, aStadiumLocs[0].m_fZ, 7.0f, fX, fY, fZ); - fX = std::min(aStadiumLocs[0].m_fX, fX); // Halfcircle - suits better the rectangular form + fX = std::min(aStadiumLocs[0].m_fX, fX); // Halfcircle - suits better the rectangular form if (Creature* pTemp = pNefarius->SummonCreature(aStadiumEventNpcs[m_uiStadiumWaves][i], fX, fY, fZ, 0.0f, TEMPSUMMON_DEAD_DESPAWN, 0)) { // Get some point in the center of the stadium pTemp->GetRandomPoint(aStadiumLocs[2].m_fX, aStadiumLocs[2].m_fY, aStadiumLocs[2].m_fZ, 5.0f, fX, fY, fZ); - fX = std::min(aStadiumLocs[2].m_fX, fX); // Halfcircle - suits better the rectangular form + fX = std::min(aStadiumLocs[2].m_fX, fX);// Halfcircle - suits better the rectangular form pTemp->GetMotionMaster()->MovePoint(0, fX, fY, fZ); ++m_uiStadiumMobsAlive; @@ -514,7 +514,7 @@ void instance_blackrock_spire::DoSendNextStadiumWave() StartNextDialogueText(SAY_NEFARIUS_LOSE_4); else { - // Send Gyth + // Send Gyth if (Creature* pNefarius = GetSingleCreatureFromStorage(NPC_LORD_VICTOR_NEFARIUS)) { if (Creature* pTemp = pNefarius->SummonCreature(NPC_GYTH, aStadiumLocs[1].m_fX, aStadiumLocs[1].m_fY, aStadiumLocs[1].m_fZ, 0.0f, TEMPSUMMON_DEAD_DESPAWN, 0)) diff --git a/scripts/eastern_kingdoms/blackwing_lair/blackwing_lair.h b/scripts/eastern_kingdoms/blackwing_lair/blackwing_lair.h index 0730b2f01..e98c9dceb 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/blackwing_lair.h +++ b/scripts/eastern_kingdoms/blackwing_lair/blackwing_lair.h @@ -35,8 +35,8 @@ enum GO_DOOR_RAZORGORE_ENTER = 176964, GO_DOOR_RAZORGORE_EXIT = 176965, GO_DOOR_NEFARIAN = 176966, - //GO_DOOR_CHROMAGGUS_ENTER = 179115, - //GO_DOOR_CHROMAGGUS_SIDE = 179116, + // GO_DOOR_CHROMAGGUS_ENTER = 179115, + // GO_DOOR_CHROMAGGUS_SIDE = 179116, GO_DOOR_CHROMAGGUS_EXIT = 179117, GO_DOOR_VAELASTRASZ = 179364, GO_DOOR_LASHLAYER = 179365, @@ -46,7 +46,7 @@ enum }; // Coords used to spawn Nefarius at the throne -static const float aNefariusSpawnLoc[4] = {-7466.16f, -1040.80f, 412.053f, 2.14675f}; +static const float aNefariusSpawnLoc[4] = { -7466.16f, -1040.80f, 412.053f, 2.14675f}; class MANGOS_DLL_DECL instance_blackwing_lair : public ScriptedInstance { diff --git a/scripts/eastern_kingdoms/blackwing_lair/boss_chromaggus.cpp b/scripts/eastern_kingdoms/blackwing_lair/boss_chromaggus.cpp index 81ff986c3..63f061fc3 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/boss_chromaggus.cpp +++ b/scripts/eastern_kingdoms/blackwing_lair/boss_chromaggus.cpp @@ -173,7 +173,7 @@ struct MANGOS_DLL_DECL boss_chromaggusAI : public ScriptedAI { uint32 m_uiSpellAfflict = 0; - switch(urand(0, 4)) + switch (urand(0, 4)) { case 0: m_uiSpellAfflict = SPELL_BROODAF_BLUE; break; case 1: m_uiSpellAfflict = SPELL_BROODAF_BLACK; break; @@ -195,13 +195,13 @@ struct MANGOS_DLL_DECL boss_chromaggusAI : public ScriptedAI // Chromatic mutation if target is effected by all afflictions if (pUnit->HasAura(SPELL_BROODAF_BLUE, EFFECT_INDEX_0) - && pUnit->HasAura(SPELL_BROODAF_BLACK, EFFECT_INDEX_0) - && pUnit->HasAura(SPELL_BROODAF_RED, EFFECT_INDEX_0) - && pUnit->HasAura(SPELL_BROODAF_BRONZE, EFFECT_INDEX_0) - && pUnit->HasAura(SPELL_BROODAF_GREEN, EFFECT_INDEX_0)) + && pUnit->HasAura(SPELL_BROODAF_BLACK, EFFECT_INDEX_0) + && pUnit->HasAura(SPELL_BROODAF_RED, EFFECT_INDEX_0) + && pUnit->HasAura(SPELL_BROODAF_BRONZE, EFFECT_INDEX_0) + && pUnit->HasAura(SPELL_BROODAF_GREEN, EFFECT_INDEX_0)) { - //target->RemoveAllAuras(); - //DoCastSpellIfCan(target,SPELL_CHROMATIC_MUT_1); + // target->RemoveAllAuras(); + // DoCastSpellIfCan(target,SPELL_CHROMATIC_MUT_1); // Chromatic mutation is causing issues // Assuming it is caused by a lack of core support for Charm diff --git a/scripts/eastern_kingdoms/blackwing_lair/boss_nefarian.cpp b/scripts/eastern_kingdoms/blackwing_lair/boss_nefarian.cpp index 2b00d67c9..eed50a53b 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/boss_nefarian.cpp +++ b/scripts/eastern_kingdoms/blackwing_lair/boss_nefarian.cpp @@ -50,7 +50,7 @@ enum SPELL_VEIL_OF_SHADOW = 22687, // old spell id 7068 -> wrong SPELL_CLEAVE = 20691, SPELL_TAIL_LASH = 23364, - //SPELL_BONE_CONTRUST = 23363, //23362, 23361 Missing from DBC! + // SPELL_BONE_CONTRUST = 23363, // 23362, 23361 Missing from DBC! SPELL_MAGE = 23410, // wild magic SPELL_WARRIOR = 23397, // beserk @@ -84,12 +84,12 @@ struct MANGOS_DLL_DECL boss_nefarianAI : public ScriptedAI void Reset() { - m_uiShadowFlameTimer = 12000; // These times are probably wrong + m_uiShadowFlameTimer = 12000; // These times are probably wrong m_uiBellowingRoarTimer = 30000; m_uiVeilOfShadowTimer = 15000; m_uiCleaveTimer = 7000; m_uiTailLashTimer = 10000; - m_uiClassCallTimer = 35000; // 35-40 seconds + m_uiClassCallTimer = 35000; // 35-40 seconds m_bPhase3 = false; m_bHasEndYell = false; } @@ -196,11 +196,11 @@ struct MANGOS_DLL_DECL boss_nefarianAI : public ScriptedAI // ClassCall_Timer if (m_uiClassCallTimer < uiDiff) { - //Cast a random class call - //On official it is based on what classes are currently on the hostil list - //but we can't do that yet so just randomly call one + // Cast a random class call + // On official it is based on what classes are currently on the hostil list + // but we can't do that yet so just randomly call one - switch(urand(0, 8)) + switch (urand(0, 8)) { case 0: DoScriptText(SAY_MAGE, m_creature); diff --git a/scripts/eastern_kingdoms/blackwing_lair/boss_razorgore.cpp b/scripts/eastern_kingdoms/blackwing_lair/boss_razorgore.cpp index 58862b24b..ab75577a7 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/boss_razorgore.cpp +++ b/scripts/eastern_kingdoms/blackwing_lair/boss_razorgore.cpp @@ -68,7 +68,7 @@ struct MANGOS_DLL_DECL boss_razorgoreAI : public ScriptedAI { m_uiIntroVisualTimer = 5000; - m_uiCleaveTimer = 15000; // These times are probably wrong + m_uiCleaveTimer = 15000; // These times are probably wrong m_uiWarStompTimer = 35000; m_uiConflagrationTimer = 12000; m_uiFireballVolleyTimer = 7000; diff --git a/scripts/eastern_kingdoms/blackwing_lair/boss_victor_nefarius.cpp b/scripts/eastern_kingdoms/blackwing_lair/boss_victor_nefarius.cpp index f914803ce..b18ea38dc 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/boss_victor_nefarius.cpp +++ b/scripts/eastern_kingdoms/blackwing_lair/boss_victor_nefarius.cpp @@ -77,22 +77,22 @@ struct SpawnLocation static const SpawnLocation aNefarianLocs[4] = { - {-7599.32f, -1191.72f, 475.545f}, // opening where red/blue/black darknid spawner appear (ori 3.05433) - {-7526.27f, -1135.04f, 473.445f}, // same as above, closest to door (ori 5.75959) - {-7498.177f, -1273.277f, 481.649f}, // nefarian spawn location (ori 1.798) - {-7502.002f, -1256.503f, 476.758f}, // nefarian fly to this position + { -7599.32f, -1191.72f, 475.545f}, // opening where red/blue/black darknid spawner appear (ori 3.05433) + { -7526.27f, -1135.04f, 473.445f}, // same as above, closest to door (ori 5.75959) + { -7498.177f, -1273.277f, 481.649f}, // nefarian spawn location (ori 1.798) + { -7502.002f, -1256.503f, 476.758f}, // nefarian fly to this position }; static const uint32 aPossibleDrake[MAX_DRAKES] = {NPC_BRONZE_DRAKANOID, NPC_BLUE_DRAKANOID, NPC_RED_DRAKANOID, NPC_GREEN_DRAKANOID, NPC_BLACK_DRAKANOID}; -//This script is complicated -//Instead of morphing Victor Nefarius we will have him control phase 1 -//And then have him spawn "Nefarian" for phase 2 -//When phase 2 starts Victor Nefarius will go invisible and stop attacking -//If Nefarian reched home because nef killed the players then nef will trigger this guy to EnterEvadeMode -//and allow players to start the event over -//If nefarian dies then he will kill himself then he will be despawned in Nefarian script -//To prevent players from doing the event twice +// This script is complicated +// Instead of morphing Victor Nefarius we will have him control phase 1 +// And then have him spawn "Nefarian" for phase 2 +// When phase 2 starts Victor Nefarius will go invisible and stop attacking +// If Nefarian reched home because nef killed the players then nef will trigger this guy to EnterEvadeMode +// and allow players to start the event over +// If nefarian dies then he will kill himself then he will be despawned in Nefarian script +// To prevent players from doing the event twice // Dev note: Lord Victor Nefarius should despawn completely, then ~5 seconds later Nefarian should appear. @@ -328,7 +328,7 @@ struct MANGOS_DLL_DECL boss_victor_nefariusAI : public ScriptedAI, private Dialo // Add spawning mechanism if (m_uiAddSpawnTimer < uiDiff) { - //Spawn 2 random types of creatures at the 2 locations + // Spawn 2 random types of creatures at the 2 locations uint32 uiCreatureId = 0; // 1 in 3 chance it will be a chromatic @@ -339,13 +339,13 @@ struct MANGOS_DLL_DECL boss_victor_nefariusAI : public ScriptedAI, private Dialo uiCreatureId = urand(0, 2) ? m_uiDrakeTypeTwo : NPC_CHROMATIC_DRAKANOID; m_creature->SummonCreature(uiCreatureId, aNefarianLocs[1].m_fX, aNefarianLocs[1].m_fY, aNefarianLocs[1].m_fZ, 5.000, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 30000); - //Begin phase 2 by spawning Nefarian + // Begin phase 2 by spawning Nefarian if (m_uiSpawnedAdds >= MAX_DRAKE_SUMMONS) { - //Inturrupt any spell casting + // Inturrupt any spell casting m_creature->InterruptNonMeleeSpells(false); - //Make super invis + // Make super invis if (m_creature->GetVisibility() != VISIBILITY_OFF) m_creature->SetVisibility(VISIBILITY_OFF); @@ -372,7 +372,7 @@ bool GossipHello_boss_victor_nefarius(Player* pPlayer, Creature* pCreature) if (pCreature->GetMapId() != MAP_ID_BWL) return true; - pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_NEFARIUS_1 , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_NEFARIUS_1 , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXT_NEFARIUS_1, pCreature->GetObjectGuid()); return true; } @@ -382,16 +382,16 @@ bool GossipSelect_boss_victor_nefarius(Player* pPlayer, Creature* pCreature, uin if (pCreature->GetMapId() != MAP_ID_BWL) return true; - switch(uiAction) + switch (uiAction) { case GOSSIP_ACTION_INFO_DEF+1: pCreature->HandleEmote(EMOTE_ONESHOT_TALK); - pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_NEFARIUS_2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); + pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_NEFARIUS_2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXT_NEFARIUS_2, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+2: pCreature->HandleEmote(EMOTE_ONESHOT_TALK); - pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_NEFARIUS_3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3); + pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_NEFARIUS_3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXT_NEFARIUS_3, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+3: diff --git a/scripts/eastern_kingdoms/blackwing_lair/instance_blackwing_lair.cpp b/scripts/eastern_kingdoms/blackwing_lair/instance_blackwing_lair.cpp index 008e7d9e9..df2bd5a6b 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/instance_blackwing_lair.cpp +++ b/scripts/eastern_kingdoms/blackwing_lair/instance_blackwing_lair.cpp @@ -66,7 +66,7 @@ void instance_blackwing_lair::OnCreatureCreate(Creature* pCreature) void instance_blackwing_lair::OnObjectCreate(GameObject* pGo) { - switch(pGo->GetEntry()) + switch (pGo->GetEntry()) { case GO_DOOR_RAZORGORE_ENTER: case GO_ORB_OF_DOMINATION: @@ -103,7 +103,7 @@ void instance_blackwing_lair::OnObjectCreate(GameObject* pGo) void instance_blackwing_lair::SetData(uint32 uiType, uint32 uiData) { - switch(uiType) + switch (uiType) { case TYPE_RAZORGORE: m_auiEncounter[uiType] = uiData; @@ -147,7 +147,7 @@ void instance_blackwing_lair::SetData(uint32 uiType, uint32 uiData) break; if (uiData == SPECIAL) { - //handle missing spell 23362 + // handle missing spell 23362 Creature* pNefarius = GetSingleCreatureFromStorage(NPC_LORD_VICTOR_NEFARIUS); if (!pNefarius) break; @@ -183,8 +183,8 @@ void instance_blackwing_lair::SetData(uint32 uiType, uint32 uiData) std::ostringstream saveStream; saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2] << " " - << m_auiEncounter[3] << " " << m_auiEncounter[4] << " " << m_auiEncounter[5] << " " - << m_auiEncounter[6] << " " << m_auiEncounter[7]; + << m_auiEncounter[3] << " " << m_auiEncounter[4] << " " << m_auiEncounter[5] << " " + << m_auiEncounter[6] << " " << m_auiEncounter[7]; m_strInstData = saveStream.str(); @@ -205,9 +205,9 @@ void instance_blackwing_lair::Load(const char* chrIn) std::istringstream loadStream(chrIn); loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3] - >> m_auiEncounter[4] >> m_auiEncounter[5] >> m_auiEncounter[6] >> m_auiEncounter[7]; + >> m_auiEncounter[4] >> m_auiEncounter[5] >> m_auiEncounter[6] >> m_auiEncounter[7]; - for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) + for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) { if (m_auiEncounter[i] == IN_PROGRESS) m_auiEncounter[i] = NOT_STARTED; diff --git a/scripts/eastern_kingdoms/blasted_lands.cpp b/scripts/eastern_kingdoms/blasted_lands.cpp index a2a77027e..6f316b99f 100644 --- a/scripts/eastern_kingdoms/blasted_lands.cpp +++ b/scripts/eastern_kingdoms/blasted_lands.cpp @@ -45,13 +45,13 @@ bool GossipHello_npc_fallen_hero_of_horde(Player* pPlayer, Creature* pCreature) pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); if (pPlayer->GetQuestStatus(2784) == QUEST_STATUS_INCOMPLETE) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Why are you here?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Why are you here?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); if (pPlayer->GetQuestStatus(2801) == QUEST_STATUS_INCOMPLETE && pPlayer->GetTeam() == HORDE) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Continue story...", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Continue story...", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); if (pPlayer->GetQuestStatus(2801) == QUEST_STATUS_INCOMPLETE && pPlayer->GetTeam() == ALLIANCE) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Why are you here?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Why are you here?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); @@ -60,7 +60,7 @@ bool GossipHello_npc_fallen_hero_of_horde(Player* pPlayer, Creature* pCreature) bool GossipSelect_npc_fallen_hero_of_horde(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) { - switch(uiAction) + switch (uiAction) { case GOSSIP_ACTION_INFO_DEF+1: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_FALLEN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 11); diff --git a/scripts/eastern_kingdoms/burning_steppes.cpp b/scripts/eastern_kingdoms/burning_steppes.cpp index da7b1b576..4e437b3f8 100644 --- a/scripts/eastern_kingdoms/burning_steppes.cpp +++ b/scripts/eastern_kingdoms/burning_steppes.cpp @@ -39,13 +39,13 @@ struct MANGOS_DLL_DECL npc_ragged_johnAI : public ScriptedAI void Reset() {} - void MoveInLineOfSight(Unit *who) + void MoveInLineOfSight(Unit* who) { if (who->HasAura(16468, EFFECT_INDEX_0)) { if (who->GetTypeId() == TYPEID_PLAYER && m_creature->IsWithinDistInMap(who, 15) && who->isInAccessablePlaceFor(m_creature)) { - DoCastSpellIfCan(who,16472); + DoCastSpellIfCan(who, 16472); ((Player*)who)->AreaExploredOrEventHappens(4866); } } @@ -84,7 +84,7 @@ bool GossipHello_npc_ragged_john(Player* pPlayer, Creature* pCreature) bool GossipSelect_npc_ragged_john(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) { - switch(uiAction) + switch (uiAction) { case GOSSIP_ACTION_INFO_DEF: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "So what did you do?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); @@ -302,7 +302,7 @@ struct MANGOS_DLL_DECL npc_grark_lorkrubAI : public npc_escortAI, private Dialog void JustDidDialogueStep(int32 iEntry) { - switch(iEntry) + switch (iEntry) { case SAY_LEXLORT_1: m_creature->SetStandState(UNIT_STAND_STATE_KNEEL); @@ -428,7 +428,7 @@ bool QuestAccept_npc_grark_lorkrub(Player* pPlayer, Creature* pCreature, const Q bool EffectDummyCreature_spell_capture_grark(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) { - //always check spellid and effectindex + // always check spellid and effectindex if (uiSpellId == SPELL_CAPTURE_GRARK && uiEffIndex == EFFECT_INDEX_0) { // Note: this implementation needs additional research! There is a lot of guesswork involved in this! @@ -440,7 +440,7 @@ bool EffectDummyCreature_spell_capture_grark(Unit* pCaster, uint32 uiSpellId, Sp pCreatureTarget->SetFactionTemporary(FACTION_FRIENDLY, TEMPFACTION_RESTORE_RESPAWN); pCreatureTarget->AI()->EnterEvadeMode(); - //always return true when we are handling this spell and effect + // always return true when we are handling this spell and effect return true; } diff --git a/scripts/eastern_kingdoms/deadmines/boss_mr_smite.cpp b/scripts/eastern_kingdoms/deadmines/boss_mr_smite.cpp index a9b477c52..d85c57249 100644 --- a/scripts/eastern_kingdoms/deadmines/boss_mr_smite.cpp +++ b/scripts/eastern_kingdoms/deadmines/boss_mr_smite.cpp @@ -181,7 +181,7 @@ struct MANGOS_DLL_DECL boss_mr_smiteAI : public ScriptedAI m_uiEquipTimer = 0; } - switch(m_uiPhase) + switch (m_uiPhase) { case PHASE_EQUIP_START: PhaseEquipStart(); @@ -198,7 +198,7 @@ struct MANGOS_DLL_DECL boss_mr_smiteAI : public ScriptedAI } // the normal combat phases - switch(m_uiPhase) + switch (m_uiPhase) { case PHASE_1: { diff --git a/scripts/eastern_kingdoms/deadmines/instance_deadmines.cpp b/scripts/eastern_kingdoms/deadmines/instance_deadmines.cpp index 4dded539a..39e2323d2 100644 --- a/scripts/eastern_kingdoms/deadmines/instance_deadmines.cpp +++ b/scripts/eastern_kingdoms/deadmines/instance_deadmines.cpp @@ -39,7 +39,7 @@ void instance_deadmines::OnPlayerEnter(Player* pPlayer) { // Respawn the Mysterious chest if one of the players who enter the instance has the quest in his log if (pPlayer->GetQuestStatus(QUEST_FORTUNE_AWAITS) == QUEST_STATUS_COMPLETE && - !pPlayer->GetQuestRewardStatus(QUEST_FORTUNE_AWAITS)) + !pPlayer->GetQuestRewardStatus(QUEST_FORTUNE_AWAITS)) DoRespawnGameObject(GO_MYSTERIOUS_CHEST, HOUR); } @@ -51,7 +51,7 @@ void instance_deadmines::OnCreatureCreate(Creature* pCreature) void instance_deadmines::OnObjectCreate(GameObject* pGo) { - switch(pGo->GetEntry()) + switch (pGo->GetEntry()) { case GO_FACTORY_DOOR: if (m_auiEncounter[TYPE_RHAHKZOR] == DONE) @@ -87,7 +87,7 @@ void instance_deadmines::OnObjectCreate(GameObject* pGo) void instance_deadmines::OnCreatureDeath(Creature* pCreature) { - switch(pCreature->GetEntry()) + switch (pCreature->GetEntry()) { case NPC_RHAHKZOR: SetData(TYPE_RHAHKZOR, DONE); break; case NPC_SNEED: SetData(TYPE_SNEED, DONE); break; @@ -97,7 +97,7 @@ void instance_deadmines::OnCreatureDeath(Creature* pCreature) void instance_deadmines::SetData(uint32 uiType, uint32 uiData) { - switch(uiType) + switch (uiType) { case TYPE_RHAHKZOR: { diff --git a/scripts/eastern_kingdoms/eastern_plaguelands.cpp b/scripts/eastern_kingdoms/eastern_plaguelands.cpp index 92301bdf6..ae49e84b0 100644 --- a/scripts/eastern_kingdoms/eastern_plaguelands.cpp +++ b/scripts/eastern_kingdoms/eastern_plaguelands.cpp @@ -41,8 +41,8 @@ enum SAY_PEASANT_APPEAR_2 = -1000820, SAY_PEASANT_APPEAR_3 = -1000821, - //SPELL_DEATHS_DOOR = 23127, // damage spells cast on the peasants - //SPELL_SEETHING_PLAGUE = 23072, + // SPELL_DEATHS_DOOR = 23127, // damage spells cast on the peasants + // SPELL_SEETHING_PLAGUE = 23072, SPELL_ENTER_THE_LIGHT_DND = 23107, SPELL_BLESSING_OF_NORDRASSIL = 23108, @@ -50,7 +50,7 @@ enum NPC_PLAGUED_PEASANT = 14485, NPC_SCOURGE_ARCHER = 14489, NPC_SCOURGE_FOOTSOLDIER = 14486, - NPC_THE_CLEANER = 14503, // can be summoned if the priest has more players in the party for help. requires further research + NPC_THE_CLEANER = 14503, // can be summoned if the priest has more players in the party for help. requires further research QUEST_BALANCE_OF_LIGHT_AND_SHADOW = 7622, @@ -145,7 +145,7 @@ struct MANGOS_DLL_DECL npc_eris_havenfireAI : public ScriptedAI if (m_uiSaveCounter >= 50 && m_uiCurrentWave == 5) DoBalanceEventEnd(); // Phase ended - else if (m_uiSaveCounter + m_uiKillCounter == m_uiCurrentWave*MAX_PEASANTS) + else if (m_uiSaveCounter + m_uiKillCounter == m_uiCurrentWave * MAX_PEASANTS) DoHandlePhaseEnd(); } } @@ -165,7 +165,7 @@ struct MANGOS_DLL_DECL npc_eris_havenfireAI : public ScriptedAI DoScriptText(SAY_EVENT_FAIL_1, m_creature); m_uiSadEndTimer = 4000; } - else if (m_uiSaveCounter + m_uiKillCounter == m_uiCurrentWave*MAX_PEASANTS) + else if (m_uiSaveCounter + m_uiKillCounter == m_uiCurrentWave * MAX_PEASANTS) DoHandlePhaseEnd(); } } @@ -255,7 +255,7 @@ struct MANGOS_DLL_DECL npc_eris_havenfireAI : public ScriptedAI { if (m_uiEventTimer <= uiDiff) { - switch(m_uiPhase) + switch (m_uiPhase) { case 0: DoSummonWave(NPC_SCOURGE_ARCHER); diff --git a/scripts/eastern_kingdoms/eversong_woods.cpp b/scripts/eastern_kingdoms/eversong_woods.cpp index da4984b40..699a12b0b 100644 --- a/scripts/eastern_kingdoms/eversong_woods.cpp +++ b/scripts/eastern_kingdoms/eversong_woods.cpp @@ -60,7 +60,7 @@ const int32 uiSayId[4] = -1000322 }; -float fChallengerLoc[4][4]= +float fChallengerLoc[4][4] = { {10110.667f, -6628.059f, 4.100f, 2.708f}, {10093.919f, -6634.340f, 4.098f, 1.106f}, @@ -128,12 +128,12 @@ struct MANGOS_DLL_DECL npc_kelerun_bloodmournAI : public ScriptedAI void DoSpawnChallengers() { - for(uint8 i = 0; i < MAX_CHALLENGER; ++i) + for (uint8 i = 0; i < MAX_CHALLENGER; ++i) { if (Creature* pCreature = m_creature->SummonCreature(uiChallengerId[i], - fChallengerLoc[i][0], fChallengerLoc[i][1], - fChallengerLoc[i][2], fChallengerLoc[i][3], - TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 600000)) + fChallengerLoc[i][0], fChallengerLoc[i][1], + fChallengerLoc[i][2], fChallengerLoc[i][3], + TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 600000)) { m_aChallengerGuids[i] = pCreature->GetObjectGuid(); pCreature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); @@ -149,7 +149,7 @@ struct MANGOS_DLL_DECL npc_kelerun_bloodmournAI : public ScriptedAI { if (!m_playerGuid) { - //player are expected to use GO within a minute, if not, event will fail. + // player are expected to use GO within a minute, if not, event will fail. Reset(); return; } @@ -175,7 +175,7 @@ struct MANGOS_DLL_DECL npc_kelerun_bloodmournAI : public ScriptedAI ++m_uiChallengerCount; - //count starts at 0 + // count starts at 0 if (m_uiChallengerCount == MAX_CHALLENGER) { if (pPlayer && pPlayer->isAlive()) @@ -220,7 +220,7 @@ CreatureAI* GetAI_npc_kelerun_bloodmourn(Creature* pCreature) return new npc_kelerun_bloodmournAI(pCreature); } -//easiest way is to expect database to respawn GO at quest accept (quest_start_script) +// easiest way is to expect database to respawn GO at quest accept (quest_start_script) bool QuestAccept_npc_kelerun_bloodmourn(Player* pPlayer, Creature* pCreature, const Quest* pQuest) { if (pQuest->GetQuestId() == QUEST_SECOND_TRIAL) @@ -304,7 +304,7 @@ CreatureAI* GetAI_npc_prospector_anvilward(Creature* pCreature) bool GossipHello_npc_prospector_anvilward(Player* pPlayer, Creature* pCreature) { if (pPlayer->GetQuestStatus(QUEST_THE_DWARVEN_SPY) == QUEST_STATUS_INCOMPLETE) - pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_MOMENT, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_MOMENT, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXT_ID_MOMENT, pCreature->GetObjectGuid()); return true; @@ -312,10 +312,10 @@ bool GossipHello_npc_prospector_anvilward(Player* pPlayer, Creature* pCreature) bool GossipSelect_npc_prospector_anvilward(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) { - switch(uiAction) + switch (uiAction) { case GOSSIP_ACTION_INFO_DEF+1: - pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_SHOW, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); + pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_SHOW, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXT_ID_SHOW, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+2: @@ -398,9 +398,9 @@ struct MANGOS_DLL_DECL npc_apprentice_mirvedaAI : public ScriptedAI m_creature->SummonCreature(NPC_ANGERSHADE, 8745.0f, -7134.32f, 35.22f, 0.0f, TEMPSUMMON_CORPSE_DESPAWN, 4000); } - void UpdateAI (const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) { - //Return since we have no target + // Return since we have no target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -426,7 +426,7 @@ bool QuestAccept_unexpected_results(Player* pPlayer, Creature* pCreature, const CreatureAI* GetAI_npc_apprentice_mirvedaAI(Creature* pCreature) { - return new npc_apprentice_mirvedaAI (pCreature); + return new npc_apprentice_mirvedaAI(pCreature); } /*###### @@ -457,7 +457,7 @@ struct MANGOS_DLL_DECL npc_infused_crystalAI : public Scripted_NoMovementAI m_bFirstWave = true; m_uiWaveTimer = 1000; m_uiKilledCount = 0; - m_uiFinishTimer = 60*IN_MILLISECONDS; + m_uiFinishTimer = 60 * IN_MILLISECONDS; Reset(); } @@ -490,14 +490,14 @@ struct MANGOS_DLL_DECL npc_infused_crystalAI : public Scripted_NoMovementAI if (m_bFirstWave) { for (uint8 i = 0; i < 3; ++i) - m_creature->SummonCreature(NPC_ENRAGED_WRAITH, aSummonPos[i][0], aSummonPos[i][1], aSummonPos[i][2], aSummonPos[i][3], TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 5*MINUTE); + m_creature->SummonCreature(NPC_ENRAGED_WRAITH, aSummonPos[i][0], aSummonPos[i][1], aSummonPos[i][2], aSummonPos[i][3], TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 5 * MINUTE); m_uiWaveTimer = 29000; m_bFirstWave = false; } else { for (uint8 i = 3; i < 6; ++i) - m_creature->SummonCreature(NPC_ENRAGED_WRAITH, aSummonPos[i][0], aSummonPos[i][1], aSummonPos[i][2], aSummonPos[i][3], TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 5*MINUTE); + m_creature->SummonCreature(NPC_ENRAGED_WRAITH, aSummonPos[i][0], aSummonPos[i][1], aSummonPos[i][2], aSummonPos[i][3], TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 5 * MINUTE); m_uiWaveTimer = 0; } } @@ -528,7 +528,7 @@ struct MANGOS_DLL_DECL npc_infused_crystalAI : public Scripted_NoMovementAI CreatureAI* GetAI_npc_infused_crystalAI(Creature* pCreature) { - return new npc_infused_crystalAI (pCreature); + return new npc_infused_crystalAI(pCreature); } void AddSC_eversong_woods() diff --git a/scripts/eastern_kingdoms/ghostlands.cpp b/scripts/eastern_kingdoms/ghostlands.cpp index 3bc51bc1b..57b9bc203 100644 --- a/scripts/eastern_kingdoms/ghostlands.cpp +++ b/scripts/eastern_kingdoms/ghostlands.cpp @@ -76,7 +76,7 @@ struct MANGOS_DLL_DECL npc_ranger_lilathaAI : public npc_escortAI if (!pPlayer) return; - switch(i) + switch (i) { case 0: if (GameObject* pGoTemp = GetClosestGameObjectWithEntry(m_creature, GO_CAGE, 10.0f)) diff --git a/scripts/eastern_kingdoms/gnomeregan/boss_thermaplugg.cpp b/scripts/eastern_kingdoms/gnomeregan/boss_thermaplugg.cpp index 31b754eaa..3a68641c6 100644 --- a/scripts/eastern_kingdoms/gnomeregan/boss_thermaplugg.cpp +++ b/scripts/eastern_kingdoms/gnomeregan/boss_thermaplugg.cpp @@ -133,8 +133,8 @@ struct MANGOS_DLL_DECL boss_thermapluggAI : public ScriptedAI m_lSummonedBombGUIDs.push_back(pSummoned->GetObjectGuid()); // calculate point for falling down float fX, fY; - fX = 0.2*m_afSpawnPos[0] + 0.8*pSummoned->GetPositionX(); - fY = 0.2*m_afSpawnPos[1] + 0.8*pSummoned->GetPositionY(); + fX = 0.2 * m_afSpawnPos[0] + 0.8 * pSummoned->GetPositionX(); + fY = 0.2 * m_afSpawnPos[1] + 0.8 * pSummoned->GetPositionY(); pSummoned->GetMotionMaster()->MovePoint(1, fX, fY, m_afSpawnPos[2] - 2.0f); } } @@ -192,7 +192,7 @@ struct MANGOS_DLL_DECL boss_thermapluggAI : public ScriptedAI { if (DoCastSpellIfCan(m_creature, m_bIsPhaseTwo ? SPELL_ACTIVATE_BOMB_B : SPELL_ACTIVATE_BOMB_A) == CAST_OK) { - m_uiActivateBombTimer = (m_bIsPhaseTwo ? urand(6, 12) : urand(12, 17))*IN_MILLISECONDS; + m_uiActivateBombTimer = (m_bIsPhaseTwo ? urand(6, 12) : urand(12, 17)) * IN_MILLISECONDS; if (!urand(0, 5)) // TODO, chance/ place for this correct? DoScriptText(SAY_BOMB, m_creature); } @@ -213,8 +213,8 @@ struct MANGOS_DLL_DECL boss_thermapluggAI : public ScriptedAI float fX = 0.0f, fY = 0.0f; if (GameObject* pFace = m_creature->GetMap()->GetGameObject(m_asBombFaces[i].m_gnomeFaceGuid)) { - fX = 0.35*m_afSpawnPos[0] + 0.65*pFace->GetPositionX(); - fY = 0.35*m_afSpawnPos[1] + 0.65*pFace->GetPositionY(); + fX = 0.35 * m_afSpawnPos[0] + 0.65 * pFace->GetPositionX(); + fY = 0.35 * m_afSpawnPos[1] + 0.65 * pFace->GetPositionY(); } m_creature->SummonCreature(NPC_WALKING_BOMB, fX, fY, fBombSpawnZ, 0.0f, TEMPSUMMON_CORPSE_DESPAWN, 0); m_asBombFaces[i].m_uiBombTimer = urand(10000, 25000); // TODO diff --git a/scripts/eastern_kingdoms/gnomeregan/gnomeregan.cpp b/scripts/eastern_kingdoms/gnomeregan/gnomeregan.cpp index 07e4994ce..5586aae60 100644 --- a/scripts/eastern_kingdoms/gnomeregan/gnomeregan.cpp +++ b/scripts/eastern_kingdoms/gnomeregan/gnomeregan.cpp @@ -147,7 +147,7 @@ struct MANGOS_DLL_DECL npc_blastmaster_emi_shortfuseAI : public npc_escortAI void Reset() { - m_bDidAggroText = false; // Used for 'defend' text, is triggered when the npc is attacked + m_bDidAggroText = false; // Used for 'defend' text, is triggered when the npc is attacked if (!HasEscortState(STATE_ESCORT_ESCORTING)) { @@ -180,7 +180,7 @@ struct MANGOS_DLL_DECL npc_blastmaster_emi_shortfuseAI : public npc_escortAI if (GameObject* pDoor = m_pInstance->GetSingleGameObjectFromStorage(m_uiPhase > 20 ? GO_CAVE_IN_NORTH : GO_CAVE_IN_SOUTH)) { float fX, fY, fZ; - pDoor->GetNearPoint(pDoor, fX, fY, fZ, 0.0f, 2.0f, frand(0.0f, 2*M_PI_F)); + pDoor->GetNearPoint(pDoor, fX, fY, fZ, 0.0f, 2.0f, frand(0.0f, 2 * M_PI_F)); pSummoned->GetMotionMaster()->MovePoint(1, fX, fY, fZ); } break; @@ -295,7 +295,7 @@ struct MANGOS_DLL_DECL npc_blastmaster_emi_shortfuseAI : public npc_escortAI void WaypointReached(uint32 uiPointId) { - switch(uiPointId) + switch (uiPointId) { case 4: m_uiPhaseTimer = 1000; @@ -600,7 +600,7 @@ bool GossipHello_npc_blastmaster_emi_shortfuse(Player* pPlayer, Creature* pCreat { if (pInstance->GetData(TYPE_GRUBBIS) == NOT_STARTED || pInstance->GetData(TYPE_GRUBBIS) == FAIL) { - pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_START, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_START, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); } } @@ -609,7 +609,7 @@ bool GossipHello_npc_blastmaster_emi_shortfuse(Player* pPlayer, Creature* pCreat bool GossipSelect_npc_blastmaster_emi_shortfuse(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) { - if (uiAction == GOSSIP_ACTION_INFO_DEF+1) + if (uiAction == GOSSIP_ACTION_INFO_DEF + 1) { if (instance_gnomeregan* pInstance = (instance_gnomeregan*)pCreature->GetInstanceData()) { diff --git a/scripts/eastern_kingdoms/gnomeregan/instance_gnomeregan.cpp b/scripts/eastern_kingdoms/gnomeregan/instance_gnomeregan.cpp index 89f9179f3..ce4208f7f 100644 --- a/scripts/eastern_kingdoms/gnomeregan/instance_gnomeregan.cpp +++ b/scripts/eastern_kingdoms/gnomeregan/instance_gnomeregan.cpp @@ -48,7 +48,7 @@ void instance_gnomeregan::OnCreatureCreate(Creature* pCreature) void instance_gnomeregan::OnObjectCreate(GameObject* pGo) { - switch(pGo->GetEntry()) + switch (pGo->GetEntry()) { case GO_CAVE_IN_NORTH: case GO_CAVE_IN_SOUTH: @@ -75,7 +75,7 @@ static bool sortFromEastToWest(GameObject* pFirst, GameObject* pSecond) void instance_gnomeregan::SetData(uint32 uiType, uint32 uiData) { - switch(uiType) + switch (uiType) { case TYPE_GRUBBIS: m_auiEncounter[0] = uiData; @@ -220,7 +220,7 @@ void instance_gnomeregan::Load(const char* chrIn) std::istringstream loadStream(chrIn); loadStream >> m_auiEncounter[0] >> m_auiEncounter[1]; - for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) + for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) { if (m_auiEncounter[i] == IN_PROGRESS) m_auiEncounter[i] = NOT_STARTED; @@ -231,7 +231,7 @@ void instance_gnomeregan::Load(const char* chrIn) uint32 instance_gnomeregan::GetData(uint32 uiType) { - switch(uiType) + switch (uiType) { case TYPE_GRUBBIS: return m_auiEncounter[0]; case TYPE_THERMAPLUGG: return m_auiEncounter[1]; diff --git a/scripts/eastern_kingdoms/hinterlands.cpp b/scripts/eastern_kingdoms/hinterlands.cpp index 129b9f75d..18349ef79 100644 --- a/scripts/eastern_kingdoms/hinterlands.cpp +++ b/scripts/eastern_kingdoms/hinterlands.cpp @@ -29,7 +29,7 @@ EndContentData */ #include "precompiled.h" #include "escort_ai.h" - /*###### +/*###### ## npc_00x09hl ######*/ @@ -55,7 +55,7 @@ struct MANGOS_DLL_DECL npc_00x09hlAI : public npc_escortAI void WaypointReached(uint32 uiPointId) { - switch(uiPointId) + switch (uiPointId) { case 26: DoScriptText(SAY_OOX_AMBUSH, m_creature); @@ -73,10 +73,10 @@ struct MANGOS_DLL_DECL npc_00x09hlAI : public npc_escortAI void WaypointStart(uint32 uiPointId) { - switch(uiPointId) + switch (uiPointId) { case 27: - for(uint8 i = 0; i < 3; ++i) + for (uint8 i = 0; i < 3; ++i) { float fX, fY, fZ; m_creature->GetRandomPoint(147.927444f, -3851.513428f, 130.893f, 7.0f, fX, fY, fZ); @@ -85,7 +85,7 @@ struct MANGOS_DLL_DECL npc_00x09hlAI : public npc_escortAI } break; case 44: - for(uint8 i = 0; i < 3; ++i) + for (uint8 i = 0; i < 3; ++i) { float fX, fY, fZ; m_creature->GetRandomPoint(-141.151581f, -4291.213867f, 120.130f, 7.0f, fX, fY, fZ); @@ -208,7 +208,7 @@ struct MANGOS_DLL_DECL npc_rinjiAI : public npc_escortAI if (urand(0, 3)) return; - //only if attacked and escorter is not in combat? + // only if attacked and escorter is not in combat? DoScriptText(urand(0, 1) ? SAY_RIN_HELP_1 : SAY_RIN_HELP_2, m_creature); } } @@ -219,14 +219,14 @@ struct MANGOS_DLL_DECL npc_rinjiAI : public npc_escortAI m_iSpawnId = 1; m_creature->SummonCreature(NPC_RANGER, - m_afAmbushSpawn[m_iSpawnId].m_fX, m_afAmbushSpawn[m_iSpawnId].m_fY, m_afAmbushSpawn[m_iSpawnId].m_fZ, 0.0f, - TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 60000); + m_afAmbushSpawn[m_iSpawnId].m_fX, m_afAmbushSpawn[m_iSpawnId].m_fY, m_afAmbushSpawn[m_iSpawnId].m_fZ, 0.0f, + TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 60000); - for(int i = 0; i < 2; ++i) + for (int i = 0; i < 2; ++i) { m_creature->SummonCreature(NPC_OUTRUNNER, - m_afAmbushSpawn[m_iSpawnId].m_fX, m_afAmbushSpawn[m_iSpawnId].m_fY, m_afAmbushSpawn[m_iSpawnId].m_fZ, 0.0f, - TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 60000); + m_afAmbushSpawn[m_iSpawnId].m_fX, m_afAmbushSpawn[m_iSpawnId].m_fY, m_afAmbushSpawn[m_iSpawnId].m_fZ, 0.0f, + TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 60000); } } @@ -243,7 +243,7 @@ struct MANGOS_DLL_DECL npc_rinjiAI : public npc_escortAI if (!pPlayer) return; - switch(uiPointId) + switch (uiPointId) { case 1: DoScriptText(SAY_RIN_FREE, m_creature, pPlayer); @@ -265,7 +265,7 @@ struct MANGOS_DLL_DECL npc_rinjiAI : public npc_escortAI void UpdateEscortAI(const uint32 uiDiff) { - //Check if we have a current target + // Check if we have a current target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) { if (HasEscortState(STATE_ESCORT_ESCORTING) && m_uiPostEventCount) @@ -276,7 +276,7 @@ struct MANGOS_DLL_DECL npc_rinjiAI : public npc_escortAI if (Player* pPlayer = GetPlayerForEscort()) { - switch(m_uiPostEventCount) + switch (m_uiPostEventCount) { case 1: DoScriptText(SAY_RIN_PROGRESS_1, m_creature, pPlayer); diff --git a/scripts/eastern_kingdoms/karazhan/boss_curator.cpp b/scripts/eastern_kingdoms/karazhan/boss_curator.cpp index cfc9e1525..d047f714b 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_curator.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_curator.cpp @@ -67,7 +67,7 @@ struct MANGOS_DLL_DECL boss_curatorAI : public ScriptedAI { m_uiFlareTimer = 10000; m_uiHatefulBoltTimer = 15000; // This time may be wrong - m_uiBerserkTimer = 10*MINUTE*IN_MILLISECONDS; + m_uiBerserkTimer = 10 * MINUTE * IN_MILLISECONDS; m_bIsEnraged = false; m_creature->ApplySpellImmune(0, IMMUNITY_DAMAGE, SPELL_SCHOOL_MASK_ARCANE, true); @@ -158,22 +158,22 @@ struct MANGOS_DLL_DECL boss_curatorAI : public ScriptedAI // reduce mana by 10% of maximum if (int32 iMana = m_creature->GetMaxPower(POWER_MANA)) { - m_creature->ModifyPower(POWER_MANA, -(iMana/10)); + m_creature->ModifyPower(POWER_MANA, -(iMana / 10)); - //if this get's us below 10%, then we evocate (the 10th should be summoned now - if (m_creature->GetPower(POWER_MANA)*10 < m_creature->GetMaxPower(POWER_MANA)) + // if this get's us below 10%, then we evocate (the 10th should be summoned now + if (m_creature->GetPower(POWER_MANA) * 10 < m_creature->GetMaxPower(POWER_MANA)) { if (DoCastSpellIfCan(m_creature, SPELL_EVOCATION, CAST_INTERRUPT_PREVIOUS) == CAST_OK) { DoScriptText(SAY_EVOCATE, m_creature); - //this small delay should make first flare appear fast after evocate, and also prevent possible spawn flood + // this small delay should make first flare appear fast after evocate, and also prevent possible spawn flood m_uiFlareTimer = 1000; } return; } else { - switch(urand(0, 3)) + switch (urand(0, 3)) { case 0: DoScriptText(SAY_SUMMON1, m_creature); break; case 1: DoScriptText(SAY_SUMMON2, m_creature); break; diff --git a/scripts/eastern_kingdoms/karazhan/boss_maiden_of_virtue.cpp b/scripts/eastern_kingdoms/karazhan/boss_maiden_of_virtue.cpp index cf04c4e08..b9e0113a2 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_maiden_of_virtue.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_maiden_of_virtue.cpp @@ -65,7 +65,7 @@ struct MANGOS_DLL_DECL boss_maiden_of_virtueAI : public ScriptedAI void KilledUnit(Unit* pVictim) { - switch(urand(0, 5)) // 50% chance to say something out of 3 texts + switch (urand(0, 5)) // 50% chance to say something out of 3 texts { case 0: DoScriptText(SAY_SLAY1, m_creature); break; case 1: DoScriptText(SAY_SLAY2, m_creature); break; diff --git a/scripts/eastern_kingdoms/karazhan/boss_midnight.cpp b/scripts/eastern_kingdoms/karazhan/boss_midnight.cpp index 3e39b7e66..9f0dacdaf 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_midnight.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_midnight.cpp @@ -42,7 +42,7 @@ enum SPELL_MOUNT = 29770, SPELL_KNOCKDOWN = 29711, SPELL_SUMMON_ATTUMEN = 29714, - SPELL_SUMMON_ATTUMEN_MOUNTED= 29799, + SPELL_SUMMON_ATTUMEN_MOUNTED = 29799, // Attumen SPELL_SHADOWCLEAVE = 29832, @@ -204,7 +204,7 @@ struct MANGOS_DLL_DECL boss_attumenAI : public ScriptedAI uint32 m_uiCurseTimer; uint32 m_uiRandomYellTimer; uint32 m_uiKnockDown; - uint32 m_uiChargeTimer; //only when mounted + uint32 m_uiChargeTimer; // only when mounted bool m_bHasSummonRider; @@ -212,7 +212,7 @@ struct MANGOS_DLL_DECL boss_attumenAI : public ScriptedAI { m_uiCleaveTimer = urand(10000, 16000); m_uiCurseTimer = 30000; - m_uiRandomYellTimer = urand(30000, 60000); //Occasionally yell + m_uiRandomYellTimer = urand(30000, 60000); // Occasionally yell m_uiChargeTimer = 20000; m_uiKnockDown = urand(6000, 9000); @@ -322,7 +322,7 @@ CreatureAI* GetAI_boss_attumen(Creature* pCreature) bool EffectDummyCreature_spell_mount_attumen(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) { - //always check spellid and effectindex + // always check spellid and effectindex if (uiSpellId == SPELL_MOUNT && uiEffIndex == EFFECT_INDEX_0) { // Avoid possible DB errors @@ -333,7 +333,7 @@ bool EffectDummyCreature_spell_mount_attumen(Unit* pCaster, uint32 uiSpellId, Sp pMidnightAI->DoPrepareMount(pCreatureTarget); } - //always return true when we are handling this spell and effect + // always return true when we are handling this spell and effect return true; } diff --git a/scripts/eastern_kingdoms/karazhan/boss_moroes.cpp b/scripts/eastern_kingdoms/karazhan/boss_moroes.cpp index 62ee88f36..4c953a909 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_moroes.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_moroes.cpp @@ -46,10 +46,10 @@ enum static const float afLocations[MAX_ACTIVE_GUESTS][4] = { - {-10991.0f, -1884.33f, 81.73f, 0.614315f}, - {-10989.4f, -1885.88f, 81.73f, 0.904913f}, - {-10978.1f, -1887.07f, 81.73f, 2.035550f}, - {-10975.9f, -1885.81f, 81.73f, 2.253890f} + { -10991.0f, -1884.33f, 81.73f, 0.614315f}, + { -10989.4f, -1885.88f, 81.73f, 0.904913f}, + { -10978.1f, -1887.07f, 81.73f, 2.035550f}, + { -10975.9f, -1885.81f, 81.73f, 2.253890f} }; static const uint32 auiGuests[MAX_GUESTS] = @@ -103,7 +103,7 @@ struct MANGOS_DLL_DECL boss_moroesAI : public ScriptedAI void KilledUnit(Unit* pVictim) { - switch(urand(0, 2)) + switch (urand(0, 2)) { case 0: DoScriptText(SAY_KILL_1, m_creature); break; case 1: DoScriptText(SAY_KILL_2, m_creature); break; @@ -139,7 +139,7 @@ struct MANGOS_DLL_DECL boss_moroesAI : public ScriptedAI void DoSpawnGuests() { - //not if m_creature are dead, so avoid + // not if m_creature are dead, so avoid if (!m_creature->isAlive()) return; @@ -183,7 +183,7 @@ struct MANGOS_DLL_DECL boss_moroesAI : public ScriptedAI Map* pMap = m_creature->GetMap(); if (pMap->IsDungeon()) { - Map::PlayerList const &PlayerList = pMap->GetPlayers(); + Map::PlayerList const& PlayerList = pMap->GetPlayers(); if (PlayerList.isEmpty()) return; @@ -243,7 +243,7 @@ struct MANGOS_DLL_DECL boss_moroesAI : public ScriptedAI else m_uiVanishTimer -= uiDiff; - //Gouge highest aggro, and attack second highest + // Gouge highest aggro, and attack second highest if (m_uiGougeTimer < uiDiff) { if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_GOUGE) == CAST_OK) diff --git a/scripts/eastern_kingdoms/karazhan/boss_netherspite.cpp b/scripts/eastern_kingdoms/karazhan/boss_netherspite.cpp index 581feb77b..02124e9ad 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_netherspite.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_netherspite.cpp @@ -26,7 +26,7 @@ EndScriptData */ enum { - //netherspite spells + // netherspite spells SPELL_NETHERBURN = 30522, SPELL_VOID_ZONE = 37063, SPELL_NETHERBREATH = 38523, @@ -37,10 +37,10 @@ enum SPELL_FACE_RANDOM_TARGET = 38546, // triggered by spell 38684 - currently not used SPELL_PORTAL_ATTUNEMENT = 30425, - //void zone spells + // void zone spells SPELL_CONSUMPTION = 28865, - //beam buffs + // beam buffs SPELL_SERENITY_NS = 30467, SPELL_SERENITY_PLR = 30422, SPELL_DOMINANCE_NS = 30468, @@ -48,7 +48,7 @@ enum SPELL_PERSEVERENCE_NS = 30466, SPELL_PERSEVERENCE_PLR = 30421, - //beam debuffs + // beam debuffs SPELL_EXHAUSTION_SER = 38638, SPELL_EXHAUSTION_DOM = 38639, SPELL_EXHAUSTION_PER = 38637, @@ -68,11 +68,11 @@ enum SPELL_BLUE_PORTAL = 30491, SPELL_RED_PORTAL = 30487, - //emotes + // emotes EMOTE_PHASE_BEAM = -1532089, EMOTE_PHASE_BANISH = -1532090, - //npcs + // npcs NPC_PORTAL_GREEN = 17367, NPC_PORTAL_BLUE = 17368, NPC_PORTAL_RED = 17369, @@ -89,9 +89,9 @@ struct SpawnLocation // at first spawn portals got fixed coords, should be shuffled in subsequent beam phases static const SpawnLocation aPortalCoordinates[MAX_PORTALS] = { - {-11195.14f, -1616.375f, 278.3217f, 6.230825f}, - {-11108.13f, -1602.839f, 280.0323f, 3.717551f}, - {-11139.78f, -1681.278f, 278.3217f, 1.396263f}, + { -11195.14f, -1616.375f, 278.3217f, 6.230825f}, + { -11108.13f, -1602.839f, 280.0323f, 3.717551f}, + { -11139.78f, -1681.278f, 278.3217f, 1.396263f}, }; enum NetherspitePhases @@ -132,9 +132,9 @@ struct MANGOS_DLL_DECL boss_netherspiteAI : public ScriptedAI m_uiActivePhase = BEAM_PHASE; m_uiEmpowermentTimer = 10000; - m_uiEnrageTimer = 9*MINUTE*IN_MILLISECONDS; + m_uiEnrageTimer = 9 * MINUTE * IN_MILLISECONDS; m_uiVoidZoneTimer = 15000; - m_uiPhaseSwitchTimer = MINUTE*IN_MILLISECONDS; + m_uiPhaseSwitchTimer = MINUTE * IN_MILLISECONDS; SetCombatMovement(true); @@ -197,10 +197,10 @@ struct MANGOS_DLL_DECL boss_netherspiteAI : public ScriptedAI DoSummonPortals(); m_uiEmpowermentTimer = 10000; - m_uiPhaseSwitchTimer = MINUTE*IN_MILLISECONDS; + m_uiPhaseSwitchTimer = MINUTE * IN_MILLISECONDS; } - //reset threat every phase switch + // reset threat every phase switch DoResetThreat(); } diff --git a/scripts/eastern_kingdoms/karazhan/boss_nightbane.cpp b/scripts/eastern_kingdoms/karazhan/boss_nightbane.cpp index 6dd279542..29b2a77ba 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_nightbane.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_nightbane.cpp @@ -36,7 +36,7 @@ enum // ground phase spells SPELL_BELLOWING_ROAR = 39427, - SPELL_CHARRED_EARTH = 30129, //Also 30209 (Target Charred Earth) triggers this + SPELL_CHARRED_EARTH = 30129, // Also 30209 (Target Charred Earth) triggers this SPELL_SMOLDERING_BREATH = 30210, SPELL_TAIL_SWEEP = 25653, SPELL_CLEAVE = 30131, @@ -260,7 +260,7 @@ struct MANGOS_DLL_DECL boss_nightbaneAI : public npc_escortAI else m_uiCleavetimer -= uiDiff; - if (m_creature->GetHealthPercent() < 100 - 25*m_uiFlightPhase) + if (m_creature->GetHealthPercent() < 100 - 25 * m_uiFlightPhase) { // Start air phase movement (handled by creature_movement_template) SetCombatMovement(false); diff --git a/scripts/eastern_kingdoms/karazhan/boss_prince_malchezaar.cpp b/scripts/eastern_kingdoms/karazhan/boss_prince_malchezaar.cpp index 4c706a073..0551c58ba 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_prince_malchezaar.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_prince_malchezaar.cpp @@ -39,7 +39,7 @@ enum SAY_SUMMON2 = -1532101, SAY_DEATH = -1532102, - //Enfeeble is supposed to reduce hp to 1 and then heal player back to full when it ends + // Enfeeble is supposed to reduce hp to 1 and then heal player back to full when it ends SPELL_ENFEEBLE = 30843, // Enfeeble during phases 1 and 2 SPELL_ENFEEBLE_EFFECT = 41624, // purpose unk - cast during the transition from phase 2 to 3 SPELL_SHADOW_NOVA = 30852, // Shadownova used during all phases @@ -50,8 +50,8 @@ enum SPELL_SUMMON_AXES = 30891, // Summon 17650 SPELL_EQUIP_AXES = 30857, // Visual for axe equiping - transition to phase 2 SPELL_AMPLIFY_DAMAGE = 39095, // Amplifiy during phase 3 3 - //SPELL_CLEAVE = 30131, // spell not confirmed - //SPELL_INFERNAL_RELAY = 30834, // purpose unk + // SPELL_CLEAVE = 30131, // spell not confirmed + // SPELL_INFERNAL_RELAY = 30834, // purpose unk SPELL_INFERNAL_RELAY_SUMMON = 30835, // triggers 30836, which summons an infernal SPELL_HELLFIRE = 30859, // Infernal damage aura @@ -117,7 +117,7 @@ struct MANGOS_DLL_DECL boss_malchezaarAI : public ScriptedAI void KilledUnit(Unit* pVictim) { - switch(urand(0, 2)) + switch (urand(0, 2)) { case 0: DoScriptText(SAY_SLAY1, m_creature); break; case 1: DoScriptText(SAY_SLAY2, m_creature); break; @@ -229,7 +229,7 @@ struct MANGOS_DLL_DECL boss_malchezaarAI : public ScriptedAI // Reset Enfeebled targets if necessary DoHandleEnfeebleHealthReset(); - m_uiEnfeebleResetTimer=0; + m_uiEnfeebleResetTimer = 0; m_creature->RemoveAurasDueToSpell(SPELL_THRASH_AURA); m_uiShadowNovaTimer = m_uiEnfeebleTimer + 5000; @@ -317,7 +317,7 @@ struct MANGOS_DLL_DECL boss_malchezaarAI : public ScriptedAI if (m_uiEnfeebleResetTimer <= uiDiff) { DoHandleEnfeebleHealthReset(); - m_uiEnfeebleResetTimer=0; + m_uiEnfeebleResetTimer = 0; } else m_uiEnfeebleResetTimer -= uiDiff; diff --git a/scripts/eastern_kingdoms/karazhan/boss_shade_of_aran.cpp b/scripts/eastern_kingdoms/karazhan/boss_shade_of_aran.cpp index 21fc5021d..0a0904e25 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_shade_of_aran.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_shade_of_aran.cpp @@ -35,24 +35,24 @@ enum SAY_BLIZZARD2 = -1532079, SAY_EXPLOSION1 = -1532080, SAY_EXPLOSION2 = -1532081, - SAY_DRINK = -1532082, //Low Mana / AoE Pyroblast + SAY_DRINK = -1532082, // Low Mana / AoE Pyroblast SAY_ELEMENTALS = -1532083, SAY_KILL1 = -1532084, SAY_KILL2 = -1532085, SAY_TIMEOVER = -1532086, SAY_DEATH = -1532087, - SAY_ATIESH = -1532088, //Atiesh is equipped by a raid member + SAY_ATIESH = -1532088, // Atiesh is equipped by a raid member // basic spells SPELL_FROSTBOLT = 29954, SPELL_FIREBALL = 29953, SPELL_ARCANE_MISSILES = 29955, - //SPELL_DRAGONS_BREATH = 29964, // not used since 2.1.0 + // SPELL_DRAGONS_BREATH = 29964, // not used since 2.1.0 SPELL_CHAINS_OF_ICE = 29991, SPELL_COUNTERSPELL = 29961, - //SPELL_COMBUSTION = 29977, // spell not confirmed - //SPELL_PRESENCE_OF_MIND = 29976, // spell not confirmed - //SPELL_WATER_BREAK = 39177, // purpose unk + // SPELL_COMBUSTION = 29977, // spell not confirmed + // SPELL_PRESENCE_OF_MIND = 29976, // spell not confirmed + // SPELL_WATER_BREAK = 39177, // purpose unk // low mana spells SPELL_MASS_POLYMORPH = 29963, @@ -124,7 +124,7 @@ struct MANGOS_DLL_DECL boss_aranAI : public ScriptedAI m_uiSuperCastTimer = 35000; m_uiManaRecoveryTimer = 0; m_uiManaRecoveryStage = 0; - m_uiBerserkTimer = 12*MINUTE*IN_MILLISECONDS; + m_uiBerserkTimer = 12 * MINUTE * IN_MILLISECONDS; m_bElementalsSpawned = false; m_bIsDrinking = false; @@ -151,7 +151,7 @@ struct MANGOS_DLL_DECL boss_aranAI : public ScriptedAI void Aggro(Unit* pWho) { - switch(urand(0, 2)) + switch (urand(0, 2)) { case 0: DoScriptText(SAY_AGGRO1, m_creature); break; case 1: DoScriptText(SAY_AGGRO2, m_creature); break; @@ -206,7 +206,7 @@ struct MANGOS_DLL_DECL boss_aranAI : public ScriptedAI return; // Start drinking when below 20% mana - if (!m_bIsDrinking && m_creature->getPowerType() == POWER_MANA && (m_creature->GetPower(POWER_MANA)*100 / m_creature->GetMaxPower(POWER_MANA)) < 20) + if (!m_bIsDrinking && m_creature->getPowerType() == POWER_MANA && (m_creature->GetPower(POWER_MANA) * 100 / m_creature->GetMaxPower(POWER_MANA)) < 20) { if (DoCastSpellIfCan(m_creature, SPELL_MASS_POLYMORPH) == CAST_OK) { @@ -307,7 +307,7 @@ struct MANGOS_DLL_DECL boss_aranAI : public ScriptedAI { CanCastResult spellResult = CAST_OK; - switch(urand(0, 1)) + switch (urand(0, 1)) { case 0: spellResult = DoCastSpellIfCan(m_creature, SPELL_COUNTERSPELL); diff --git a/scripts/eastern_kingdoms/karazhan/boss_terestian_illhoof.cpp b/scripts/eastern_kingdoms/karazhan/boss_terestian_illhoof.cpp index 9f8b22a70..ddc995761 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_terestian_illhoof.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_terestian_illhoof.cpp @@ -86,7 +86,7 @@ struct MANGOS_DLL_DECL boss_terestianAI : public ScriptedAI m_uiSacrificeTimer = 30000; m_uiShadowboltTimer = 5000; m_uiSummonTimer = 10000; - m_uiBerserkTimer = 10*MINUTE*IN_MILLISECONDS; + m_uiBerserkTimer = 10 * MINUTE * IN_MILLISECONDS; m_bSummonedPortals = false; } @@ -115,7 +115,7 @@ struct MANGOS_DLL_DECL boss_terestianAI : public ScriptedAI void JustSummoned(Creature* pSummoned) { - switch(pSummoned->GetEntry()) + switch (pSummoned->GetEntry()) { case NPC_PORTAL: if (!m_bSummonedPortals) diff --git a/scripts/eastern_kingdoms/karazhan/bosses_opera.cpp b/scripts/eastern_kingdoms/karazhan/bosses_opera.cpp index 3c62e65bc..63dce04d7 100644 --- a/scripts/eastern_kingdoms/karazhan/bosses_opera.cpp +++ b/scripts/eastern_kingdoms/karazhan/bosses_opera.cpp @@ -526,7 +526,7 @@ struct MANGOS_DLL_DECL boss_roarAI : public ScriptedAI } }; -static const float afCycloneSpawnLoc[4] = {-10907.68f, -1778.651f, 90.56018f, 0.61f}; +static const float afCycloneSpawnLoc[4] = { -10907.68f, -1778.651f, 90.56018f, 0.61f}; struct MANGOS_DLL_DECL boss_croneAI : public ScriptedAI { @@ -783,8 +783,8 @@ enum SPELL_POISON_THRUST = 30822, /**** Other Misc. Spells ****/ - SPELL_FULL_HEALTH = 43979, // res effect on Julianne - SPELL_UNDYING_LOVE = 30951, // res effect on Romulo + SPELL_FULL_HEALTH = 43979, // res effect on Julianne + SPELL_UNDYING_LOVE = 30951, // res effect on Romulo }; enum OperaPhase @@ -794,7 +794,7 @@ enum OperaPhase PHASE_BOTH = 2, }; -static const float afRomuloSpawnLoc[4] = {-10893.62f, -1760.78f, 90.55f, 4.76f}; +static const float afRomuloSpawnLoc[4] = { -10893.62f, -1760.78f, 90.55f, 4.76f}; struct MANGOS_DLL_DECL boss_julianneAI : public ScriptedAI { @@ -1032,7 +1032,7 @@ struct MANGOS_DLL_DECL boss_julianneAI : public ScriptedAI bool EffectDummyCreature_spell_drink_poison(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) { - //always check spellid and effectindex + // always check spellid and effectindex if (uiSpellId == SPELL_DRINK_POISON && uiEffIndex == EFFECT_INDEX_0) { // Set fake death on poison @@ -1041,7 +1041,7 @@ bool EffectDummyCreature_spell_drink_poison(Unit* pCaster, uint32 uiSpellId, Spe DoScriptText(SAY_JULIANNE_DEATH01, pCreatureTarget); - //always return true when we are handling this spell and effect + // always return true when we are handling this spell and effect return true; } diff --git a/scripts/eastern_kingdoms/karazhan/instance_karazhan.cpp b/scripts/eastern_kingdoms/karazhan/instance_karazhan.cpp index f5ea7e9e1..c809ed560 100644 --- a/scripts/eastern_kingdoms/karazhan/instance_karazhan.cpp +++ b/scripts/eastern_kingdoms/karazhan/instance_karazhan.cpp @@ -103,7 +103,7 @@ void instance_karazhan::OnCreatureCreate(Creature* pCreature) void instance_karazhan::OnObjectCreate(GameObject* pGo) { - switch(pGo->GetEntry()) + switch (pGo->GetEntry()) { case GO_STAGE_DOOR_LEFT: case GO_STAGE_DOOR_RIGHT: @@ -128,7 +128,7 @@ void instance_karazhan::OnObjectCreate(GameObject* pGo) case GO_MASTERS_TERRACE_DOOR_2: break; - // Opera event backgrounds + // Opera event backgrounds case GO_OZ_BACKDROP: case GO_HOOD_BACKDROP: case GO_HOOD_HOUSE: @@ -151,7 +151,7 @@ void instance_karazhan::OnObjectCreate(GameObject* pGo) void instance_karazhan::SetData(uint32 uiType, uint32 uiData) { - switch(uiType) + switch (uiType) { case TYPE_ATTUMEN: m_auiEncounter[uiType] = uiData; @@ -221,7 +221,7 @@ void instance_karazhan::SetData(uint32 uiType, uint32 uiData) DoUseDoorOrButton(GO_MASTERS_TERRACE_DOOR_1); DoUseDoorOrButton(GO_MASTERS_TERRACE_DOOR_2); break; - // Store the event type for the Opera + // Store the event type for the Opera case TYPE_OPERA_PERFORMANCE: m_uiOperaEvent = uiData; break; @@ -234,9 +234,9 @@ void instance_karazhan::SetData(uint32 uiType, uint32 uiData) std::ostringstream saveStream; saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2] << " " - << m_auiEncounter[3] << " " << m_auiEncounter[4] << " " << m_auiEncounter[5] << " " - << m_auiEncounter[6] << " " << m_auiEncounter[7] << " " << m_auiEncounter[8] << " " - << m_auiEncounter[9] << " " << m_auiEncounter[10] << " " << m_uiOperaEvent; + << m_auiEncounter[3] << " " << m_auiEncounter[4] << " " << m_auiEncounter[5] << " " + << m_auiEncounter[6] << " " << m_auiEncounter[7] << " " << m_auiEncounter[8] << " " + << m_auiEncounter[9] << " " << m_auiEncounter[10] << " " << m_uiOperaEvent; m_strInstData = saveStream.str(); @@ -280,10 +280,10 @@ void instance_karazhan::Load(const char* chrIn) std::istringstream loadStream(chrIn); loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3] - >> m_auiEncounter[4] >> m_auiEncounter[5] >> m_auiEncounter[6] >> m_auiEncounter[7] - >> m_auiEncounter[8] >> m_auiEncounter[9] >> m_auiEncounter[10] >> m_uiOperaEvent; + >> m_auiEncounter[4] >> m_auiEncounter[5] >> m_auiEncounter[6] >> m_auiEncounter[7] + >> m_auiEncounter[8] >> m_auiEncounter[9] >> m_auiEncounter[10] >> m_uiOperaEvent; - for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) + for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) { if (m_auiEncounter[i] == IN_PROGRESS) // Do not load an encounter as "In Progress" - reset it instead. m_auiEncounter[i] = NOT_STARTED; @@ -327,22 +327,22 @@ void instance_karazhan::DoPrepareOperaStage(Creature* pOrganizer) case OPERA_EVENT_WIZARD_OZ: for (uint8 i = 0; i < MAX_OZ_OPERA_MOBS; ++i) pOrganizer->SummonCreature(aOperaLocOz[i].uiEntry, aOperaLocOz[i].fX, aOperaLocOz[i].fY, aOperaLocOz[i].fZ, aOperaLocOz[i].fO, TEMPSUMMON_DEAD_DESPAWN, 0); - DoRespawnGameObject(GO_OZ_BACKDROP, 12*HOUR); + DoRespawnGameObject(GO_OZ_BACKDROP, 12 * HOUR); for (GuidList::const_iterator itr = m_lOperaHayGuidList.begin(); itr != m_lOperaHayGuidList.end(); ++itr) - DoRespawnGameObject(*itr, 12*HOUR); + DoRespawnGameObject(*itr, 12 * HOUR); break; case OPERA_EVENT_RED_RIDING_HOOD: pOrganizer->SummonCreature(aOperaLocWolf.uiEntry, aOperaLocWolf.fX, aOperaLocWolf.fY, aOperaLocWolf.fZ, aOperaLocWolf.fO, TEMPSUMMON_DEAD_DESPAWN, 0); - DoRespawnGameObject(GO_HOOD_BACKDROP, 12*HOUR); - DoRespawnGameObject(GO_HOOD_HOUSE, 12*HOUR); + DoRespawnGameObject(GO_HOOD_BACKDROP, 12 * HOUR); + DoRespawnGameObject(GO_HOOD_HOUSE, 12 * HOUR); for (GuidList::const_iterator itr = m_lOperaTreeGuidList.begin(); itr != m_lOperaTreeGuidList.end(); ++itr) - DoRespawnGameObject(*itr, 12*HOUR); + DoRespawnGameObject(*itr, 12 * HOUR); break; case OPERA_EVENT_ROMULO_AND_JUL: pOrganizer->SummonCreature(aOperaLocJul.uiEntry, aOperaLocJul.fX, aOperaLocJul.fY, aOperaLocJul.fZ, aOperaLocJul.fO, TEMPSUMMON_DEAD_DESPAWN, 0); - DoRespawnGameObject(GO_RAJ_BACKDROP, 12*HOUR); - DoRespawnGameObject(GO_RAJ_MOON, 12*HOUR); - DoRespawnGameObject(GO_RAJ_BALCONY, 12*HOUR); + DoRespawnGameObject(GO_RAJ_BACKDROP, 12 * HOUR); + DoRespawnGameObject(GO_RAJ_MOON, 12 * HOUR); + DoRespawnGameObject(GO_RAJ_BALCONY, 12 * HOUR); break; } diff --git a/scripts/eastern_kingdoms/karazhan/karazhan.cpp b/scripts/eastern_kingdoms/karazhan/karazhan.cpp index 6ae9d9515..717f9ca5e 100644 --- a/scripts/eastern_kingdoms/karazhan/karazhan.cpp +++ b/scripts/eastern_kingdoms/karazhan/karazhan.cpp @@ -66,9 +66,9 @@ enum TEXT_ID_OPERA_2 = 8971, TEXT_ID_OPERA_WOLF_WIPE = 8975, TEXT_ID_OPERA_OZ_WIPE = 8781, // guesswork, not confirmed - //TEXT_ID_OPERA_JUL_WIPE = ????, // Item not found in DB: "The romantic plays are really tough, but you'll do better this time. You have TALENT. Ready?" + // TEXT_ID_OPERA_JUL_WIPE = ????, // Item not found in DB: "The romantic plays are really tough, but you'll do better this time. You have TALENT. Ready?" - //SPELL_SPOTLIGHT = 25824, // in creature_template_addon + // SPELL_SPOTLIGHT = 25824, // in creature_template_addon SPELL_TUXEDO = 32616, NPC_SPOTLIGHT = 19525, @@ -124,7 +124,7 @@ struct MANGOS_DLL_DECL npc_barnesAI : public npc_escortAI, private DialogueHelpe if (!m_pInstance) return; - switch(uiPointId) + switch (uiPointId) { case 0: DoCastSpellIfCan(m_creature, SPELL_TUXEDO); @@ -210,10 +210,10 @@ bool GossipHello_npc_barnes(Player* pPlayer, Creature* pCreature) bool GossipSelect_npc_barnes(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) { - switch(uiAction) + switch (uiAction) { case GOSSIP_ACTION_INFO_DEF+1: - pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_OPERA_2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); + pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_OPERA_2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); pPlayer->SEND_GOSSIP_MENU(TEXT_ID_OPERA_2, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+2: @@ -223,7 +223,7 @@ bool GossipSelect_npc_barnes(Player* pPlayer, Creature* pCreature, uint32 uiSend if (npc_barnesAI* pBarnesAI = dynamic_cast(pCreature->AI())) pBarnesAI->Start(false, NULL, NULL, true); break; - // GM gossip options + // GM gossip options case GOSSIP_ACTION_INFO_DEF+3: pPlayer->CLOSE_GOSSIP_MENU(); if (ScriptedInstance* pInstance = (ScriptedInstance*)pCreature->GetInstanceData()) @@ -305,21 +305,21 @@ enum // spells // Arcanagos - //SPELL_NOTIFY_FLEE = 30985, // not used - allow Medivh to return inside after the dragon has escaped - //SPELL_PREPARE_FIREBALL= 30970, // not used - allow Medivh to cast fireball + // SPELL_NOTIFY_FLEE = 30985, // not used - allow Medivh to return inside after the dragon has escaped + // SPELL_PREPARE_FIREBALL= 30970, // not used - allow Medivh to cast fireball SPELL_REFLECTION = 30969, - //SPELL_SHOOT_FIREBALL = 30968, // not used + // SPELL_SHOOT_FIREBALL = 30968, // not used SPELL_FIREBALL_REFLECT = 30971, // Medivh - //SPELL_FROST_BREATH = 30974, // not used + // SPELL_FROST_BREATH = 30974, // not used SPELL_CONFLAG_BLAST = 30977, // cast on Arcanagos SPELL_EVOCATION = 30972, // prepare the Conflagration Blast SPELL_FIREBALL = 30967, - //SPELL_FLY_TO_DEATH = 30936, // not used - inform the dragon to move to death Location + // SPELL_FLY_TO_DEATH = 30936, // not used - inform the dragon to move to death Location SPELL_MANA_SHIELD = 30973, - //NPC_ARCANAGOS_CREDIT = 17665, // purpose unk + // NPC_ARCANAGOS_CREDIT = 17665, // purpose unk QUEST_MASTERS_TERRACE = 9645, @@ -332,12 +332,12 @@ enum * the dummy spells usage is unk; for the moment they are not used * also all coords are guesswork */ -static const float afMedivhSpawnLoc[4] = {-11153.18f, -1889.65f, 91.47f, 2.07f}; -static const float afMedivhExitLoc[3] = {-11121.81f, -1881.24f, 91.47f}; +static const float afMedivhSpawnLoc[4] = { -11153.18f, -1889.65f, 91.47f, 2.07f}; +static const float afMedivhExitLoc[3] = { -11121.81f, -1881.24f, 91.47f}; -static const float afArcanagosSpawnLoc[4] = {-11242.66f, -1778.55f, 125.35f, 0.0f}; -static const float afArcanagosMoveLoc[3] = {-11170.28f, -1865.09f, 125.35f}; -static const float afArcanagosFleeLoc[3] = {-11003.70f, -1760.18f, 180.25f}; +static const float afArcanagosSpawnLoc[4] = { -11242.66f, -1778.55f, 125.35f, 0.0f}; +static const float afArcanagosMoveLoc[3] = { -11170.28f, -1865.09f, 125.35f}; +static const float afArcanagosFleeLoc[3] = { -11003.70f, -1760.18f, 180.25f}; static const DialogueEntry aMedivhDialogue[] = { @@ -477,7 +477,7 @@ struct MANGOS_DLL_DECL npc_image_arcanagosAI : public ScriptedAI void AttackStart(Unit* pWho) { } void MoveInLineOfSight(Unit* pWho) { } - void UpdateAI (const uint32 uiDiff) { } + void UpdateAI(const uint32 uiDiff) { } }; CreatureAI* GetAI_npc_image_arcanagosAI(Creature* pCreature) diff --git a/scripts/eastern_kingdoms/karazhan/karazhan.h b/scripts/eastern_kingdoms/karazhan/karazhan.h index f569e52d2..c39b609bc 100644 --- a/scripts/eastern_kingdoms/karazhan/karazhan.h +++ b/scripts/eastern_kingdoms/karazhan/karazhan.h @@ -90,7 +90,7 @@ struct OperaSpawns float fX, fY, fZ, fO; }; -static const OperaSpawns aOperaLocOz[MAX_OZ_OPERA_MOBS]= +static const OperaSpawns aOperaLocOz[MAX_OZ_OPERA_MOBS] = { {NPC_DOROTHEE, -10896.65f, -1757.62f, 90.55f, 4.86f}, {NPC_ROAR, -10889.53f, -1758.10f, 90.55f, 4.57f}, @@ -101,7 +101,7 @@ static const OperaSpawns aOperaLocOz[MAX_OZ_OPERA_MOBS]= static const OperaSpawns aOperaLocWolf = {NPC_GRANDMOTHER, -10892.01f, -1758.01f, 90.55f, 4.73f}; static const OperaSpawns aOperaLocJul = {NPC_JULIANNE, -10893.56f, -1760.43f, 90.55f, 4.55f}; -static const float afChroneSpawnLoc[4] = {-10893.11f, -1757.85f, 90.55f, 4.60f}; +static const float afChroneSpawnLoc[4] = { -10893.11f, -1757.85f, 90.55f, 4.60f}; class MANGOS_DLL_DECL instance_karazhan : public ScriptedInstance { @@ -123,7 +123,7 @@ class MANGOS_DLL_DECL instance_karazhan : public ScriptedInstance void DoPrepareOperaStage(Creature* pOrganizer); - void GetNightbaneTriggers(GuidList &lList, bool bGround) { lList = bGround ? m_lNightbaneGroundTriggers : m_lNightbaneAirTriggers; } + void GetNightbaneTriggers(GuidList& lList, bool bGround) { lList = bGround ? m_lNightbaneGroundTriggers : m_lNightbaneAirTriggers; } void Load(const char* chrIn); const char* Save() { return m_strInstData.c_str(); } diff --git a/scripts/eastern_kingdoms/loch_modan.cpp b/scripts/eastern_kingdoms/loch_modan.cpp index 0cf5d9161..c386f090c 100644 --- a/scripts/eastern_kingdoms/loch_modan.cpp +++ b/scripts/eastern_kingdoms/loch_modan.cpp @@ -39,7 +39,7 @@ bool GossipHello_npc_mountaineer_pebblebitty(Player* pPlayer, Creature* pCreatur pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); if (!pPlayer->GetQuestRewardStatus(3181) == 1) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Open the gate please, i need to get to Searing Gorge", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Open the gate please, i need to get to Searing Gorge", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); @@ -48,7 +48,7 @@ bool GossipHello_npc_mountaineer_pebblebitty(Player* pPlayer, Creature* pCreatur bool GossipSelect_npc_mountaineer_pebblebitty(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) { - switch(uiAction) + switch (uiAction) { case GOSSIP_ACTION_INFO_DEF+1: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "But i need to get there, now open the gate!", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); @@ -104,8 +104,8 @@ struct Location static const Location m_afAmbushSpawn[] = { - {-5691.93f,-3745.91f,319.159f, 2.21f}, - {-5706.98f,-3745.39f,318.728f, 1.04f} + { -5691.93f, -3745.91f, 319.159f, 2.21f}, + { -5706.98f, -3745.39f, 318.728f, 1.04f} }; struct MANGOS_DLL_DECL npc_miranAI: public npc_escortAI @@ -166,7 +166,7 @@ bool QuestAccept_npc_miran(Player* pPlayer, Creature* pCreature, const Quest* pQ { if (pQuest->GetQuestId() == QUEST_PROTECTING_THE_SHIPMENT) { - if (npc_miranAI* pEscortAI = dynamic_cast(pCreature->AI())) + if (npc_miranAI* pEscortAI = dynamic_cast(pCreature->AI())) pEscortAI->Start(false, pPlayer, pQuest); } return true; diff --git a/scripts/eastern_kingdoms/magisters_terrace/boss_felblood_kaelthas.cpp b/scripts/eastern_kingdoms/magisters_terrace/boss_felblood_kaelthas.cpp index 49fefa0ba..c37ef0f8d 100644 --- a/scripts/eastern_kingdoms/magisters_terrace/boss_felblood_kaelthas.cpp +++ b/scripts/eastern_kingdoms/magisters_terrace/boss_felblood_kaelthas.cpp @@ -191,7 +191,7 @@ struct MANGOS_DLL_DECL boss_felblood_kaelthasAI : public ScriptedAI, private Dia void MoveInLineOfSight(Unit* pWho) { if (!m_bHasTaunted && pWho->GetTypeId() == TYPEID_PLAYER && !((Player*)pWho)->isGameMaster() && - m_creature->IsWithinDistInMap(pWho, 40.0) && m_creature->IsWithinLOSInMap(pWho)) + m_creature->IsWithinDistInMap(pWho, 40.0) && m_creature->IsWithinLOSInMap(pWho)) { StartNextDialogueText(SAY_INTRO_1); m_creature->HandleEmote(EMOTE_STATE_TALK); @@ -541,7 +541,7 @@ struct MANGOS_DLL_DECL mob_felkael_phoenixAI : public ScriptedAI // ToDo: research if this is correct and how can this be done by spell if (m_uiBurnTimer < uiDiff) { - //spell Burn should possible do this, but it doesn't, so do this for now. + // spell Burn should possible do this, but it doesn't, so do this for now. uint32 uiDmg = urand(1650, 2050); if (uiDmg > m_creature->GetHealth()) DoSetFakeDeath(); diff --git a/scripts/eastern_kingdoms/magisters_terrace/boss_priestess_delrissa.cpp b/scripts/eastern_kingdoms/magisters_terrace/boss_priestess_delrissa.cpp index 3d3503da2..d960714ba 100644 --- a/scripts/eastern_kingdoms/magisters_terrace/boss_priestess_delrissa.cpp +++ b/scripts/eastern_kingdoms/magisters_terrace/boss_priestess_delrissa.cpp @@ -44,10 +44,10 @@ enum MAX_COMPANIONS = 8, }; -static const int32 aPlayerDeath[] = {-1585017, -1585018, -1585019, -1585020, -1585021}; +static const int32 aPlayerDeath[] = { -1585017, -1585018, -1585019, -1585020, -1585021}; static const uint32 aDelrissaLackeys[MAX_COMPANIONS] = {NPC_KAGANI, NPC_ELLRYS, NPC_ERAMAS, NPC_YAZZAI, NPC_SALARIS, NPC_GARAXXAS, NPC_APOKO, NPC_ZELFAN}; -static const float aLackeyLocations[MAX_DELRISSA_ADDS][4]= +static const float aLackeyLocations[MAX_DELRISSA_ADDS][4] = { {123.77f, 17.6007f, -19.921f, 4.98f}, {131.731f, 15.0827f, -19.921f, 4.98f}, @@ -116,7 +116,7 @@ struct MANGOS_DLL_DECL boss_priestess_delrissaAI : public ScriptedAI // Summon four random adds to help during the fight void DoInitializeCompanions() { - //can be called if creature are dead, so avoid + // can be called if creature are dead, so avoid if (!m_creature->isAlive()) return; @@ -792,7 +792,7 @@ struct MANGOS_DLL_DECL npc_yazzaiAI : public priestess_companion_commonAI if (m_uiBlinkTimer < uiDiff) { - //if anybody is in melee range than escape by blink + // if anybody is in melee range than escape by blink if (m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0, uint32(0), SELECT_FLAG_IN_MELEE_RANGE)) { if (DoCastSpellIfCan(m_creature, SPELL_BLINK) == CAST_OK) @@ -860,7 +860,7 @@ struct MANGOS_DLL_DECL npc_warlord_salarisAI : public priestess_companion_common { if (m_uiInterceptStunTimer < uiDiff) { - //if nobody is in melee range than try to use Intercept + // if nobody is in melee range than try to use Intercept if (!m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0, uint32(0), SELECT_FLAG_IN_MELEE_RANGE)) { if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0, SPELL_INTERCEPT_STUN, SELECT_FLAG_NOT_IN_MELEE_RANGE | SELECT_FLAG_IN_LOS)) diff --git a/scripts/eastern_kingdoms/magisters_terrace/boss_selin_fireheart.cpp b/scripts/eastern_kingdoms/magisters_terrace/boss_selin_fireheart.cpp index da1d8c779..d58955300 100644 --- a/scripts/eastern_kingdoms/magisters_terrace/boss_selin_fireheart.cpp +++ b/scripts/eastern_kingdoms/magisters_terrace/boss_selin_fireheart.cpp @@ -39,7 +39,7 @@ enum SPELL_DRAIN_LIFE_H = 46155, SPELL_FEL_EXPLOSION = 44314, SPELL_DRAIN_MANA = 46153, // Heroic only - //SPELL_FEL_CRYSTAL_DUMMY = 44329, // used by Selin to select a nearby Crystal - not used in script + // SPELL_FEL_CRYSTAL_DUMMY = 44329, // used by Selin to select a nearby Crystal - not used in script SPELL_MANA_RAGE = 44320, // This spell triggers 44321, which changes scale and regens mana Requires an entry in spell_script_target // Crystal spells and npcs @@ -176,7 +176,7 @@ struct MANGOS_DLL_DECL boss_selin_fireheartAI : public ScriptedAI if (!m_bDrainingCrystal) { - if (m_creature->GetPower(POWER_MANA)*100 / m_creature->GetMaxPower(POWER_MANA) < 10) + if (m_creature->GetPower(POWER_MANA) * 100 / m_creature->GetMaxPower(POWER_MANA) < 10) { if (m_uiDrainLifeTimer < uiDiff) { @@ -271,7 +271,7 @@ struct MANGOS_DLL_DECL mob_fel_crystalAI : public ScriptedAI { // Cosmetic spell if (m_sWretchedGuids.find(pWho->GetObjectGuid()) == m_sWretchedGuids.end() && pWho->IsWithinDist(m_creature, 5.0f) && pWho->isAlive() && - (pWho->GetEntry() == NPC_SKULER || pWho->GetEntry() == NPC_BRUISER || pWho->GetEntry() == NPC_HUSK)) + (pWho->GetEntry() == NPC_SKULER || pWho->GetEntry() == NPC_BRUISER || pWho->GetEntry() == NPC_HUSK)) { pWho->CastSpell(m_creature, SPELL_FEL_CRYSTAL_COSMETIC, false); m_sWretchedGuids.insert(pWho->GetObjectGuid()); diff --git a/scripts/eastern_kingdoms/magisters_terrace/boss_vexallus.cpp b/scripts/eastern_kingdoms/magisters_terrace/boss_vexallus.cpp index 46d26ff7b..4d4ea187f 100644 --- a/scripts/eastern_kingdoms/magisters_terrace/boss_vexallus.cpp +++ b/scripts/eastern_kingdoms/magisters_terrace/boss_vexallus.cpp @@ -33,26 +33,26 @@ enum SAY_KILL = -1585010, EMOTE_DISCHARGE_ENERGY = -1585011, - //is this text for real? + // is this text for real? //#define SAY_DEATH "What...happen...ed." - //Pure energy spell info + // Pure energy spell info SPELL_ENERGY_BOLT = 46156, SPELL_ENERGY_FEEDBACK = 44335, SPELL_ENERGY_PASSIVE = 44326, - //Vexallus spell info + // Vexallus spell info SPELL_CHAIN_LIGHTNING = 44318, - SPELL_CHAIN_LIGHTNING_H = 46380, //heroic spell + SPELL_CHAIN_LIGHTNING_H = 46380, // heroic spell SPELL_OVERLOAD = 44353, SPELL_ARCANE_SHOCK = 44319, - SPELL_ARCANE_SHOCK_H = 46381, //heroic spell + SPELL_ARCANE_SHOCK_H = 46381, // heroic spell - SPELL_SUMMON_PURE_ENERGY = 44322, //mod scale -10 - SPELL_SUMMON_PURE_ENERGY1_H = 46154, //mod scale -5 - SPELL_SUMMON_PURE_ENERGY2_H = 46159, //mod scale -5 + SPELL_SUMMON_PURE_ENERGY = 44322, // mod scale -10 + SPELL_SUMMON_PURE_ENERGY1_H = 46154, // mod scale -5 + SPELL_SUMMON_PURE_ENERGY2_H = 46159, // mod scale -5 - //Creatures + // Creatures NPC_PURE_ENERGY = 24745, }; @@ -131,7 +131,7 @@ struct MANGOS_DLL_DECL boss_vexallusAI : public ScriptedAI return; } - //used for check, when Vexallus cast adds 85%, 70%, 55%, 40%, 25% + // used for check, when Vexallus cast adds 85%, 70%, 55%, 40%, 25% if (m_creature->GetHealthPercent() <= float(100.0f - 15.0f * m_uiIntervalHealthAmount)) { DoScriptText(SAY_ENERGY, m_creature); diff --git a/scripts/eastern_kingdoms/magisters_terrace/instance_magisters_terrace.cpp b/scripts/eastern_kingdoms/magisters_terrace/instance_magisters_terrace.cpp index 07bf5c636..2969392f4 100644 --- a/scripts/eastern_kingdoms/magisters_terrace/instance_magisters_terrace.cpp +++ b/scripts/eastern_kingdoms/magisters_terrace/instance_magisters_terrace.cpp @@ -50,7 +50,7 @@ void instance_magisters_terrace::OnCreatureCreate(Creature* pCreature) case NPC_DELRISSA: case NPC_KALECGOS_DRAGON: case NPC_KAELTHAS: - // insert Delrissa adds here, for better handling + // insert Delrissa adds here, for better handling case NPC_KAGANI: case NPC_ELLRYS: case NPC_ERAMAS: @@ -205,7 +205,7 @@ void instance_magisters_terrace::Load(const char* chrIn) std::istringstream loadStream(chrIn); loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3]; - for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) + for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) { if (m_auiEncounter[i] == IN_PROGRESS) m_auiEncounter[i] = NOT_STARTED; diff --git a/scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.cpp b/scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.cpp index 2da04539a..f36a8f91a 100644 --- a/scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.cpp +++ b/scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.cpp @@ -66,7 +66,7 @@ struct MANGOS_DLL_DECL npc_kalecgosAI : public ScriptedAI { m_creature->SetLevitate(false); m_creature->SetFacingTo(afKaelLandPoint[3]); - m_uiTransformTimer = MINUTE*IN_MILLISECONDS; + m_uiTransformTimer = MINUTE * IN_MILLISECONDS; } } diff --git a/scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.h b/scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.h index ea3fb9706..9bcefbffa 100644 --- a/scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.h +++ b/scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.h @@ -37,12 +37,12 @@ enum GO_SELIN_ENCOUNTER_DOOR = 188065, // Assembly Chamber Door GO_KAEL_DOOR = 188064, - //GO_KAEL_STATUE_LEFT = 188165, // animation statues - they do not reset on fail - //GO_KAEL_STATUE_RIGHT = 188166, + // GO_KAEL_STATUE_LEFT = 188165, // animation statues - they do not reset on fail + // GO_KAEL_STATUE_RIGHT = 188166, GO_ESCAPE_QUEL_DANAS = 188173, }; -static const int32 aDelrissaAddDeath[MAX_DELRISSA_ADDS] = {-1585013, -1585014, -1585015, -1585016}; +static const int32 aDelrissaAddDeath[MAX_DELRISSA_ADDS] = { -1585013, -1585014, -1585015, -1585016}; class MANGOS_DLL_DECL instance_magisters_terrace : public ScriptedInstance { diff --git a/scripts/eastern_kingdoms/molten_core/boss_golemagg.cpp b/scripts/eastern_kingdoms/molten_core/boss_golemagg.cpp index 8338571c6..1a2ebe823 100644 --- a/scripts/eastern_kingdoms/molten_core/boss_golemagg.cpp +++ b/scripts/eastern_kingdoms/molten_core/boss_golemagg.cpp @@ -91,7 +91,7 @@ struct MANGOS_DLL_DECL boss_golemaggAI : public ScriptedAI if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) { if (DoCastSpellIfCan(pTarget, SPELL_PYROBLAST) == CAST_OK) - m_uiPyroblastTimer = 7*IN_MILLISECONDS; + m_uiPyroblastTimer = 7 * IN_MILLISECONDS; } } else @@ -110,7 +110,7 @@ struct MANGOS_DLL_DECL boss_golemaggAI : public ScriptedAI if (m_uiEarthquakeTimer < uiDiff) { if (DoCastSpellIfCan(m_creature, SPELL_EARTHQUAKE) == CAST_OK) - m_uiEarthquakeTimer = 3*IN_MILLISECONDS; + m_uiEarthquakeTimer = 3 * IN_MILLISECONDS; } else m_uiEarthquakeTimer -= uiDiff; @@ -120,7 +120,7 @@ struct MANGOS_DLL_DECL boss_golemaggAI : public ScriptedAI if (m_uiBuffTimer < uiDiff) { DoCastSpellIfCan(m_creature, SPELL_GOLEMAGG_TRUST); - m_uiBuffTimer = 1.5*IN_MILLISECONDS; + m_uiBuffTimer = 1.5 * IN_MILLISECONDS; } else m_uiBuffTimer -= uiDiff; @@ -142,7 +142,7 @@ struct MANGOS_DLL_DECL mob_core_ragerAI : public ScriptedAI void Reset() { - m_uiMangleTimer = 7*IN_MILLISECONDS; // These times are probably wrong + m_uiMangleTimer = 7 * IN_MILLISECONDS; // These times are probably wrong } void DamageTaken(Unit* pDoneBy, uint32& uiDamage) @@ -167,7 +167,7 @@ struct MANGOS_DLL_DECL mob_core_ragerAI : public ScriptedAI if (m_uiMangleTimer < uiDiff) { if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_MANGLE) == CAST_OK) - m_uiMangleTimer = 10*IN_MILLISECONDS; + m_uiMangleTimer = 10 * IN_MILLISECONDS; } else m_uiMangleTimer -= uiDiff; diff --git a/scripts/eastern_kingdoms/molten_core/boss_majordomo_executus.cpp b/scripts/eastern_kingdoms/molten_core/boss_majordomo_executus.cpp index 7c7f3071f..3bb16c2a5 100644 --- a/scripts/eastern_kingdoms/molten_core/boss_majordomo_executus.cpp +++ b/scripts/eastern_kingdoms/molten_core/boss_majordomo_executus.cpp @@ -121,12 +121,12 @@ struct MANGOS_DLL_DECL boss_majordomoAI : public ScriptedAI void JustReachedHome() { - if (!m_bHasEncounterFinished) // Normal reached home, FAIL + if (!m_bHasEncounterFinished) // Normal reached home, FAIL { if (m_pInstance) m_pInstance->SetData(TYPE_MAJORDOMO, FAIL); } - else // Finished the encounter, DONE + else // Finished the encounter, DONE { // Exit combat m_creature->RemoveAllAuras(); @@ -183,7 +183,7 @@ struct MANGOS_DLL_DECL boss_majordomoAI : public ScriptedAI if (pSummoned->GetEntry() == NPC_FLAMEWAKER_HEALER || pSummoned->GetEntry() == NPC_FLAMEWAKER_ELITE) { m_luiMajordomoAddsGUIDs.push_back(pSummoned->GetObjectGuid()); - pSummoned->SetRespawnDelay(2*HOUR); + pSummoned->SetRespawnDelay(2 * HOUR); } else if (pSummoned->GetEntry() == NPC_RAGNAROS) { @@ -198,7 +198,7 @@ struct MANGOS_DLL_DECL boss_majordomoAI : public ScriptedAI DoScriptText(SAY_ARRIVAL4_MAJ, m_creature); } - void CorpseRemoved(uint32 &uiRespawnDelay) + void CorpseRemoved(uint32& uiRespawnDelay) { uiRespawnDelay = urand(2 * HOUR, 3 * HOUR); @@ -260,7 +260,7 @@ struct MANGOS_DLL_DECL boss_majordomoAI : public ScriptedAI { switch (m_uiSpeech) { - // Majordomo retreat event + // Majordomo retreat event case 1: DoScriptText(SAY_DEFEAT_1, m_creature); m_uiSpeechTimer = 7500; @@ -289,7 +289,7 @@ struct MANGOS_DLL_DECL boss_majordomoAI : public ScriptedAI m_uiSpeech = 0; break; - // Ragnaros Summon Event + // Ragnaros Summon Event case 10: DoScriptText(SAY_SUMMON_1, m_creature); ++m_uiSpeech; @@ -318,7 +318,7 @@ struct MANGOS_DLL_DECL boss_majordomoAI : public ScriptedAI // Summon Ragnaros if (m_pInstance) if (GameObject* pGo = m_pInstance->GetSingleGameObjectFromStorage(GO_LAVA_STEAM)) - m_creature->SummonCreature(NPC_RAGNAROS, pGo->GetPositionX(), pGo->GetPositionY(), pGo->GetPositionZ(), fmod(m_creature->GetOrientation() + M_PI, 2*M_PI), TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 2*HOUR*IN_MILLISECONDS); + m_creature->SummonCreature(NPC_RAGNAROS, pGo->GetPositionX(), pGo->GetPositionY(), pGo->GetPositionZ(), fmod(m_creature->GetOrientation() + M_PI, 2 * M_PI), TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 2 * HOUR * IN_MILLISECONDS); ++m_uiSpeech; m_uiSpeechTimer = 8700; break; @@ -424,7 +424,7 @@ bool GossipHello_boss_majordomo(Player* pPlayer, Creature* pCreature) { if (pInstance->GetData(TYPE_RAGNAROS) == NOT_STARTED || pInstance->GetData(TYPE_RAGNAROS) == FAIL) { - pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_SUMMON_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_SUMMON_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); pPlayer->SEND_GOSSIP_MENU(TEXT_ID_SUMMON_1, pCreature->GetObjectGuid()); } } diff --git a/scripts/eastern_kingdoms/molten_core/boss_ragnaros.cpp b/scripts/eastern_kingdoms/molten_core/boss_ragnaros.cpp index d9cfd077c..37702ff81 100644 --- a/scripts/eastern_kingdoms/molten_core/boss_ragnaros.cpp +++ b/scripts/eastern_kingdoms/molten_core/boss_ragnaros.cpp @@ -86,8 +86,8 @@ struct MANGOS_DLL_DECL boss_ragnarosAI : public Scripted_NoMovementAI m_uiHammerTimer = 11000; // TODO wowwiki states 20-30s timer, but ~11s confirmed m_uiMagmaBlastTimer = 2000; m_uiElementalFireTimer = 3000; - m_uiSubmergeTimer = 3*MINUTE*IN_MILLISECONDS; - m_uiAttackTimer = 90*IN_MILLISECONDS; + m_uiSubmergeTimer = 3 * MINUTE * IN_MILLISECONDS; + m_uiAttackTimer = 90 * IN_MILLISECONDS; m_uiAddCount = 0; m_bHasYelledMagmaBurst = false; @@ -210,7 +210,7 @@ struct MANGOS_DLL_DECL boss_ragnarosAI : public Scripted_NoMovementAI // Become emerged again DoCastSpellIfCan(m_creature, SPELL_RAGNA_EMERGE); m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - m_uiSubmergeTimer = 3*MINUTE*IN_MILLISECONDS; + m_uiSubmergeTimer = 3 * MINUTE * IN_MILLISECONDS; m_uiMagmaBlastTimer = 3000; // Delay the magma blast after emerge m_bIsSubmerged = false; } @@ -266,7 +266,7 @@ struct MANGOS_DLL_DECL boss_ragnarosAI : public Scripted_NoMovementAI DoCastSpellIfCan(m_creature, SPELL_RAGNA_SUBMERGE, CAST_INTERRUPT_PREVIOUS); m_creature->HandleEmote(EMOTE_ONESHOT_SUBMERGE); m_bIsSubmerged = true; - m_uiAttackTimer = 90*IN_MILLISECONDS; + m_uiAttackTimer = 90 * IN_MILLISECONDS; m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); @@ -276,7 +276,7 @@ struct MANGOS_DLL_DECL boss_ragnarosAI : public Scripted_NoMovementAI // Summon 8 elementals at random points around the boss float fX, fY, fZ; - for(uint8 i = 0; i < MAX_ADDS_IN_SUBMERGE; ++i) + for (uint8 i = 0; i < MAX_ADDS_IN_SUBMERGE; ++i) { m_creature->GetRandomPoint(m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), 30.0f, fX, fY, fZ); m_creature->SummonCreature(NPC_SON_OF_FLAME, fX, fY, fZ, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 1000); @@ -317,7 +317,7 @@ struct MANGOS_DLL_DECL boss_ragnarosAI : public Scripted_NoMovementAI DoScriptText(SAY_MAGMABURST, m_creature); m_bHasYelledMagmaBurst = true; } - m_uiMagmaBlastTimer = 1000; // Spamm this! + m_uiMagmaBlastTimer = 1000; // Spamm this! } } } diff --git a/scripts/eastern_kingdoms/molten_core/boss_sulfuron_harbinger.cpp b/scripts/eastern_kingdoms/molten_core/boss_sulfuron_harbinger.cpp index 107a81115..737e73b64 100644 --- a/scripts/eastern_kingdoms/molten_core/boss_sulfuron_harbinger.cpp +++ b/scripts/eastern_kingdoms/molten_core/boss_sulfuron_harbinger.cpp @@ -103,7 +103,7 @@ struct MANGOS_DLL_DECL boss_sulfuronAI : public ScriptedAI if (!pList.empty()) { std::list::iterator i = pList.begin(); - advance(i, (rand()%pList.size())); + advance(i, (rand() % pList.size())); pTarget = (*i); } diff --git a/scripts/eastern_kingdoms/molten_core/instance_molten_core.cpp b/scripts/eastern_kingdoms/molten_core/instance_molten_core.cpp index f6684abca..371767ecb 100644 --- a/scripts/eastern_kingdoms/molten_core/instance_molten_core.cpp +++ b/scripts/eastern_kingdoms/molten_core/instance_molten_core.cpp @@ -55,7 +55,7 @@ void instance_molten_core::OnCreatureCreate(Creature* pCreature) { switch (pCreature->GetEntry()) { - // Bosses + // Bosses case NPC_GARR: case NPC_SULFURON: case NPC_MAJORDOMO: @@ -66,9 +66,9 @@ void instance_molten_core::OnCreatureCreate(Creature* pCreature) void instance_molten_core::OnObjectCreate(GameObject* pGo) { - switch(pGo->GetEntry()) + switch (pGo->GetEntry()) { - // Runes + // Runes case GO_RUNE_KRESS: case GO_RUNE_MOHN: case GO_RUNE_BLAZ: @@ -77,9 +77,9 @@ void instance_molten_core::OnObjectCreate(GameObject* pGo) case GO_RUNE_THERI: case GO_RUNE_KORO: - // Majordomo event chest + // Majordomo event chest case GO_CACHE_OF_THE_FIRE_LORD: - // Ragnaros GOs + // Ragnaros GOs case GO_LAVA_STEAM: case GO_LAVA_SPLASH: m_mGoEntryGuidStore[pGo->GetEntry()] = pGo->GetObjectGuid(); @@ -89,7 +89,7 @@ void instance_molten_core::OnObjectCreate(GameObject* pGo) void instance_molten_core::SetData(uint32 uiType, uint32 uiData) { - switch(uiType) + switch (uiType) { case TYPE_LUCIFRON: m_auiEncounter[uiType] = uiData; @@ -149,9 +149,9 @@ void instance_molten_core::SetData(uint32 uiType, uint32 uiData) std::ostringstream saveStream; saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2] << " " - << m_auiEncounter[3] << " " << m_auiEncounter[4] << " " << m_auiEncounter[5] << " " - << m_auiEncounter[6] << " " << m_auiEncounter[7] << " " << m_auiEncounter[8] << " " - << m_auiEncounter[9]; + << m_auiEncounter[3] << " " << m_auiEncounter[4] << " " << m_auiEncounter[5] << " " + << m_auiEncounter[6] << " " << m_auiEncounter[7] << " " << m_auiEncounter[8] << " " + << m_auiEncounter[9]; m_strInstData = saveStream.str(); @@ -180,7 +180,7 @@ void instance_molten_core::DoSpawnMajordomoIfCan(bool bByPlayerEnter) return; // Check if all rune bosses are done - for(uint8 i = TYPE_MAGMADAR; i < TYPE_MAJORDOMO; ++i) + for (uint8 i = TYPE_MAGMADAR; i < TYPE_MAJORDOMO; ++i) { if (m_auiEncounter[i] != DONE) return; @@ -193,7 +193,7 @@ void instance_molten_core::DoSpawnMajordomoIfCan(bool bByPlayerEnter) // Summon Majordomo // If Majordomo encounter isn't done, summon at encounter place, else near Ragnaros uint8 uiSummonPos = m_auiEncounter[TYPE_MAJORDOMO] == DONE ? 1 : 0; - if (Creature* pMajordomo = pPlayer->SummonCreature(m_aMajordomoLocations[uiSummonPos].m_uiEntry, m_aMajordomoLocations[uiSummonPos].m_fX, m_aMajordomoLocations[uiSummonPos].m_fY, m_aMajordomoLocations[uiSummonPos].m_fZ, m_aMajordomoLocations[uiSummonPos].m_fO, TEMPSUMMON_MANUAL_DESPAWN, 2*HOUR*IN_MILLISECONDS)) + if (Creature* pMajordomo = pPlayer->SummonCreature(m_aMajordomoLocations[uiSummonPos].m_uiEntry, m_aMajordomoLocations[uiSummonPos].m_fX, m_aMajordomoLocations[uiSummonPos].m_fY, m_aMajordomoLocations[uiSummonPos].m_fZ, m_aMajordomoLocations[uiSummonPos].m_fO, TEMPSUMMON_MANUAL_DESPAWN, 2 * HOUR * IN_MILLISECONDS)) { if (uiSummonPos) // Majordomo encounter already done, set faction { @@ -207,7 +207,7 @@ void instance_molten_core::DoSpawnMajordomoIfCan(bool bByPlayerEnter) DoScriptText(SAY_MAJORDOMO_SPAWN, pMajordomo); for (uint8 i = 0; i < MAX_MAJORDOMO_ADDS; ++i) - pMajordomo->SummonCreature(m_aBosspawnLocs[i].m_uiEntry, m_aBosspawnLocs[i].m_fX, m_aBosspawnLocs[i].m_fY, m_aBosspawnLocs[i].m_fZ, m_aBosspawnLocs[i].m_fO, TEMPSUMMON_MANUAL_DESPAWN, DAY*IN_MILLISECONDS); + pMajordomo->SummonCreature(m_aBosspawnLocs[i].m_uiEntry, m_aBosspawnLocs[i].m_fX, m_aBosspawnLocs[i].m_fY, m_aBosspawnLocs[i].m_fZ, m_aBosspawnLocs[i].m_fO, TEMPSUMMON_MANUAL_DESPAWN, DAY * IN_MILLISECONDS); } } } @@ -225,10 +225,10 @@ void instance_molten_core::Load(const char* chrIn) std::istringstream loadStream(chrIn); loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3] - >> m_auiEncounter[4] >> m_auiEncounter[5] >> m_auiEncounter[6] >> m_auiEncounter[7] - >> m_auiEncounter[8] >> m_auiEncounter[9]; + >> m_auiEncounter[4] >> m_auiEncounter[5] >> m_auiEncounter[6] >> m_auiEncounter[7] + >> m_auiEncounter[8] >> m_auiEncounter[9]; - for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) + for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) { if (m_auiEncounter[i] == IN_PROGRESS) m_auiEncounter[i] = NOT_STARTED; diff --git a/scripts/eastern_kingdoms/molten_core/molten_core.h b/scripts/eastern_kingdoms/molten_core/molten_core.h index d3cd6e408..cc63956f2 100644 --- a/scripts/eastern_kingdoms/molten_core/molten_core.h +++ b/scripts/eastern_kingdoms/molten_core/molten_core.h @@ -78,7 +78,7 @@ static sSpawnLocation m_aBosspawnLocs[MAX_MAJORDOMO_ADDS] = static sSpawnLocation m_aMajordomoLocations[2] = { {NPC_MAJORDOMO, 758.089f, -1176.71f, -118.640f, 3.12414f}, // Summon fight position - {NPC_MAJORDOMO, 847.103f, -816.153f, -229.775f, 4.344f} // Summon and teleport location (near Ragnaros) + {NPC_MAJORDOMO, 847.103f, -816.153f, -229.775f, 4.344f} // Summon and teleport location (near Ragnaros) }; class MANGOS_DLL_DECL instance_molten_core : public ScriptedInstance diff --git a/scripts/eastern_kingdoms/redridge_mountains.cpp b/scripts/eastern_kingdoms/redridge_mountains.cpp index 23b2bb86e..4d24f74a6 100644 --- a/scripts/eastern_kingdoms/redridge_mountains.cpp +++ b/scripts/eastern_kingdoms/redridge_mountains.cpp @@ -62,11 +62,11 @@ struct MANGOS_DLL_DECL npc_corporal_keeshan_escortAI : public npc_escortAI { switch (uiWP) { - case 27: //break outside + case 27: // break outside DoScriptText(SAY_CORPORAL_KEESHAN_3, m_creature); m_creature->SetStandState(UNIT_STAND_STATE_STAND); break; - case 54: //say goodbye + case 54: // say goodbye DoScriptText(SAY_CORPORAL_KEESHAN_5, m_creature); break; } @@ -76,11 +76,11 @@ struct MANGOS_DLL_DECL npc_corporal_keeshan_escortAI : public npc_escortAI { switch (uiWP) { - case 26: //break outside + case 26: // break outside m_creature->SetStandState(UNIT_STAND_STATE_SIT); DoScriptText(SAY_CORPORAL_KEESHAN_2, m_creature); break; - case 53: //quest_complete + case 53: // quest_complete DoScriptText(SAY_CORPORAL_KEESHAN_4, m_creature); if (Player* pPlayer = GetPlayerForEscort()) pPlayer->GroupEventHappens(QUEST_MISSING_IN_ACTION, m_creature); @@ -90,7 +90,7 @@ struct MANGOS_DLL_DECL npc_corporal_keeshan_escortAI : public npc_escortAI void UpdateEscortAI(const uint32 uiDiff) { - //Combat check + // Combat check if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp b/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp index 77a9a3cbe..873bc20d8 100644 --- a/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp +++ b/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp @@ -98,7 +98,7 @@ enum SpecialSurprise struct MANGOS_DLL_DECL npc_a_special_surpriseAI : public ScriptedAI { - npc_a_special_surpriseAI(Creature *pCreature) : ScriptedAI(pCreature) { Reset(); } + npc_a_special_surpriseAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } uint32 m_uiExecuteSpeech_Timer; uint32 m_uiExecuteSpeech_Counter; @@ -113,7 +113,7 @@ struct MANGOS_DLL_DECL npc_a_special_surpriseAI : public ScriptedAI bool MeetQuestCondition(Player* pPlayer) { - switch(m_creature->GetEntry()) + switch (m_creature->GetEntry()) { case 29061: // Ellen Stanbridge if (pPlayer->GetQuestStatus(12742) == QUEST_STATUS_INCOMPLETE) @@ -183,12 +183,12 @@ struct MANGOS_DLL_DECL npc_a_special_surpriseAI : public ScriptedAI return; } - //TODO: simplify text's selection + // TODO: simplify text's selection - switch(pPlayer->getRace()) + switch (pPlayer->getRace()) { case RACE_HUMAN: - switch(m_uiExecuteSpeech_Counter) + switch (m_uiExecuteSpeech_Counter) { case 0: DoScriptText(SAY_EXEC_START_1, m_creature, pPlayer); break; case 1: m_creature->SetStandState(UNIT_STAND_STATE_STAND); break; @@ -216,7 +216,7 @@ struct MANGOS_DLL_DECL npc_a_special_surpriseAI : public ScriptedAI } break; case RACE_ORC: - switch(m_uiExecuteSpeech_Counter) + switch (m_uiExecuteSpeech_Counter) { case 0: DoScriptText(SAY_EXEC_START_1, m_creature, pPlayer); break; case 1: m_creature->SetStandState(UNIT_STAND_STATE_STAND); break; @@ -244,7 +244,7 @@ struct MANGOS_DLL_DECL npc_a_special_surpriseAI : public ScriptedAI } break; case RACE_DWARF: - switch(m_uiExecuteSpeech_Counter) + switch (m_uiExecuteSpeech_Counter) { case 0: DoScriptText(SAY_EXEC_START_2, m_creature, pPlayer); break; case 1: m_creature->SetStandState(UNIT_STAND_STATE_STAND); break; @@ -272,7 +272,7 @@ struct MANGOS_DLL_DECL npc_a_special_surpriseAI : public ScriptedAI } break; case RACE_NIGHTELF: - switch(m_uiExecuteSpeech_Counter) + switch (m_uiExecuteSpeech_Counter) { case 0: DoScriptText(SAY_EXEC_START_1, m_creature, pPlayer); break; case 1: m_creature->SetStandState(UNIT_STAND_STATE_STAND); break; @@ -300,7 +300,7 @@ struct MANGOS_DLL_DECL npc_a_special_surpriseAI : public ScriptedAI } break; case RACE_UNDEAD: - switch(m_uiExecuteSpeech_Counter) + switch (m_uiExecuteSpeech_Counter) { case 0: DoScriptText(SAY_EXEC_START_1, m_creature, pPlayer); break; case 1: m_creature->SetStandState(UNIT_STAND_STATE_STAND); break; @@ -328,7 +328,7 @@ struct MANGOS_DLL_DECL npc_a_special_surpriseAI : public ScriptedAI } break; case RACE_TAUREN: - switch(m_uiExecuteSpeech_Counter) + switch (m_uiExecuteSpeech_Counter) { case 0: DoScriptText(SAY_EXEC_START_1, m_creature, pPlayer); break; case 1: m_creature->SetStandState(UNIT_STAND_STATE_STAND); break; @@ -356,7 +356,7 @@ struct MANGOS_DLL_DECL npc_a_special_surpriseAI : public ScriptedAI } break; case RACE_GNOME: - switch(m_uiExecuteSpeech_Counter) + switch (m_uiExecuteSpeech_Counter) { case 0: DoScriptText(SAY_EXEC_START_1, m_creature, pPlayer); break; case 1: m_creature->SetStandState(UNIT_STAND_STATE_STAND); break; @@ -384,7 +384,7 @@ struct MANGOS_DLL_DECL npc_a_special_surpriseAI : public ScriptedAI } break; case RACE_TROLL: - switch(m_uiExecuteSpeech_Counter) + switch (m_uiExecuteSpeech_Counter) { case 0: DoScriptText(SAY_EXEC_START_3, m_creature, pPlayer); break; case 1: m_creature->SetStandState(UNIT_STAND_STATE_STAND); break; @@ -412,14 +412,14 @@ struct MANGOS_DLL_DECL npc_a_special_surpriseAI : public ScriptedAI } break; case RACE_BLOODELF: - switch(m_uiExecuteSpeech_Counter) + switch (m_uiExecuteSpeech_Counter) { case 0: DoScriptText(SAY_EXEC_START_1, m_creature, pPlayer); break; case 1: m_creature->SetStandState(UNIT_STAND_STATE_STAND); break; case 2: DoScriptText(SAY_EXEC_PROG_1, m_creature, pPlayer); break; case 3: DoScriptText(SAY_EXEC_NAME_1, m_creature, pPlayer); break; case 4: DoScriptText(SAY_EXEC_RECOG_1, m_creature, pPlayer); break; - //case 5: //unknown + // case 5: // unknown case 6: DoScriptText(SAY_EXEC_THINK_3, m_creature, pPlayer); break; case 7: DoScriptText(SAY_EXEC_LISTEN_1, m_creature, pPlayer); break; case 8: @@ -440,7 +440,7 @@ struct MANGOS_DLL_DECL npc_a_special_surpriseAI : public ScriptedAI } break; case RACE_DRAENEI: - switch(m_uiExecuteSpeech_Counter) + switch (m_uiExecuteSpeech_Counter) { case 0: DoScriptText(SAY_EXEC_START_1, m_creature, pPlayer); break; case 1: m_creature->SetStandState(UNIT_STAND_STATE_STAND); break; @@ -559,7 +559,7 @@ struct MANGOS_DLL_DECL npc_death_knight_initiateAI : public ScriptedAI } } - void DamageTaken(Unit* pDoneBy, uint32 &uiDamage) + void DamageTaken(Unit* pDoneBy, uint32& uiDamage) { if (m_bIsDuelInProgress && uiDamage > m_creature->GetHealth()) { @@ -568,7 +568,7 @@ struct MANGOS_DLL_DECL npc_death_knight_initiateAI : public ScriptedAI if (Player* pPlayer = m_creature->GetMap()->GetPlayer(m_duelerGuid)) m_creature->CastSpell(pPlayer, SPELL_DUEL_VICTORY, true); - //possibly not evade, but instead have end sequenze + // possibly not evade, but instead have end sequenze EnterEvadeMode(); } } @@ -616,7 +616,7 @@ bool GossipHello_npc_death_knight_initiate(Player* pPlayer, Creature* pCreature) bool GossipSelect_npc_death_knight_initiate(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) { - if (uiAction == GOSSIP_ACTION_INFO_DEF+1) + if (uiAction == GOSSIP_ACTION_INFO_DEF + 1) { pPlayer->CLOSE_GOSSIP_MENU(); @@ -662,14 +662,14 @@ enum eKoltira NPC_HIGH_INQUISITOR_VALROTH = 29001, NPC_KOLTIRA_ALT = 28447, - //not sure about this id - //NPC_DEATH_KNIGHT_MOUNT = 29201, + // not sure about this id + // NPC_DEATH_KNIGHT_MOUNT = 29201, MODEL_DEATH_KNIGHT_MOUNT = 25278 }; struct MANGOS_DLL_DECL npc_koltira_deathweaverAI : public npc_escortAI { - npc_koltira_deathweaverAI(Creature *pCreature) : npc_escortAI(pCreature) { Reset(); } + npc_koltira_deathweaverAI(Creature* pCreature) : npc_escortAI(pCreature) { Reset(); } uint32 m_uiWave; uint32 m_uiWave_Timer; @@ -687,7 +687,7 @@ struct MANGOS_DLL_DECL npc_koltira_deathweaverAI : public npc_escortAI void WaypointReached(uint32 uiPointId) { - switch(uiPointId) + switch (uiPointId) { case 0: DoScriptText(SAY_BREAKOUT1, m_creature); @@ -697,7 +697,7 @@ struct MANGOS_DLL_DECL npc_koltira_deathweaverAI : public npc_escortAI break; case 2: m_creature->SetStandState(UNIT_STAND_STATE_STAND); - //m_creature->UpdateEntry(NPC_KOLTIRA_ALT); //unclear if we must update or not + // m_creature->UpdateEntry(NPC_KOLTIRA_ALT);// unclear if we must update or not DoCastSpellIfCan(m_creature, SPELL_KOLTIRA_TRANSFORM); break; case 3: @@ -729,7 +729,7 @@ struct MANGOS_DLL_DECL npc_koltira_deathweaverAI : public npc_escortAI void SummonAcolyte(uint32 uiAmount) { - for(uint32 i = 0; i < uiAmount; ++i) + for (uint32 i = 0; i < uiAmount; ++i) m_creature->SummonCreature(NPC_CRIMSON_ACOLYTE, 1642.329f, -6045.818f, 127.583f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); } @@ -739,7 +739,7 @@ struct MANGOS_DLL_DECL npc_koltira_deathweaverAI : public npc_escortAI { if (m_uiWave_Timer < uiDiff) { - switch(m_uiWave) + switch (m_uiWave) { case 0: DoScriptText(SAY_BREAKOUT3, m_creature); @@ -773,7 +773,7 @@ struct MANGOS_DLL_DECL npc_koltira_deathweaverAI : public npc_escortAI else { m_uiWave_Timer = 2500; - return; //return, we don't want m_uiWave to increment now + return; // return, we don't want m_uiWave to increment now } break; } @@ -827,8 +827,8 @@ enum SAY_START = -1609000, // 8 texts in total, GetTextId() generates random with this as base SAY_AGGRO = -1609008, // 8 texts in total, GetTextId() generates random with this as base - //SPELL_CHAINED_PESANT_LH = 54602, // not used. possible it determine side, where to go get "weapon" - //SPELL_CHAINED_PESANT_RH = 54610, + // SPELL_CHAINED_PESANT_LH = 54602, // not used. possible it determine side, where to go get "weapon" + // SPELL_CHAINED_PESANT_RH = 54610, SPELL_CHAINED_PESANT_CHEST = 54612, SPELL_CHAINED_PESANT_BREATH = 54613, SPELL_INITIATE_VISUAL = 51519, @@ -867,7 +867,7 @@ struct MANGOS_DLL_DECL npc_unworthy_initiate_anchorAI : public ScriptedAI if (pInitiate && pSource) { pInitiate->SetLootRecipient(pSource); - m_creature->CastSpell(pInitiate,SPELL_CHAINED_PESANT_BREATH,true); + m_creature->CastSpell(pInitiate, SPELL_CHAINED_PESANT_BREATH, true); } } @@ -956,7 +956,7 @@ struct MANGOS_DLL_DECL npc_unworthy_initiateAI : public ScriptedAI if (m_myAnchorGuid) return m_creature->GetMap()->GetCreature(m_myAnchorGuid); else - return GetClosestCreatureWithEntry(m_creature, NPC_ANCHOR, INTERACTION_DISTANCE*2); + return GetClosestCreatureWithEntry(m_creature, NPC_ANCHOR, INTERACTION_DISTANCE * 2); } void SetAnchor() diff --git a/scripts/eastern_kingdoms/scarlet_monastery/boss_herod.cpp b/scripts/eastern_kingdoms/scarlet_monastery/boss_herod.cpp index ff3cb58c3..9e8858aba 100644 --- a/scripts/eastern_kingdoms/scarlet_monastery/boss_herod.cpp +++ b/scripts/eastern_kingdoms/scarlet_monastery/boss_herod.cpp @@ -84,7 +84,7 @@ struct MANGOS_DLL_DECL boss_herodAI : public ScriptedAI void JustDied(Unit* pKiller) { - for(uint8 i = 0; i < 20; ++i) + for (uint8 i = 0; i < 20; ++i) m_creature->SummonCreature(NPC_SCARLET_TRAINEE, 1939.18f, -431.58f, 17.09f, 6.22f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 600000); } diff --git a/scripts/eastern_kingdoms/scarlet_monastery/boss_mograine_and_whitemane.cpp b/scripts/eastern_kingdoms/scarlet_monastery/boss_mograine_and_whitemane.cpp index fc16d2257..dbde8d1b6 100644 --- a/scripts/eastern_kingdoms/scarlet_monastery/boss_mograine_and_whitemane.cpp +++ b/scripts/eastern_kingdoms/scarlet_monastery/boss_mograine_and_whitemane.cpp @@ -26,23 +26,23 @@ EndScriptData */ enum { - //Mograine says + // Mograine says SAY_MO_AGGRO = -1189005, SAY_MO_KILL = -1189006, SAY_MO_RESSURECTED = -1189007, - //Whitemane says + // Whitemane says SAY_WH_INTRO = -1189008, SAY_WH_KILL = -1189009, SAY_WH_RESSURECT = -1189010, - //Mograine Spells + // Mograine Spells SPELL_CRUSADERSTRIKE = 14518, SPELL_HAMMEROFJUSTICE = 5589, SPELL_LAYONHANDS = 9257, SPELL_RETRIBUTIONAURA = 8990, - //Whitemanes Spells + // Whitemanes Spells SPELL_DEEPSLEEP = 9256, SPELL_SCARLETRESURRECTION = 9232, SPELL_DOMINATEMIND = 14515, @@ -77,7 +77,7 @@ struct MANGOS_DLL_DECL boss_scarlet_commander_mograineAI : public ScriptedAI m_bHeal = false; m_bFakeDeath = false; - //Incase wipe during phase that mograine fake death + // Incase wipe during phase that mograine fake death m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); m_creature->SetStandState(UNIT_STAND_STATE_STAND); @@ -95,7 +95,7 @@ struct MANGOS_DLL_DECL boss_scarlet_commander_mograineAI : public ScriptedAI void Aggro(Unit* pWho) { DoScriptText(SAY_MO_AGGRO, m_creature); - DoCastSpellIfCan(m_creature,SPELL_RETRIBUTIONAURA); + DoCastSpellIfCan(m_creature, SPELL_RETRIBUTIONAURA); m_creature->CallForHelp(VISIBLE_RANGE); } @@ -105,7 +105,7 @@ struct MANGOS_DLL_DECL boss_scarlet_commander_mograineAI : public ScriptedAI DoScriptText(SAY_MO_KILL, m_creature); } - void DamageTaken(Unit* pDoneBy, uint32 &uiDamage) + void DamageTaken(Unit* pDoneBy, uint32& uiDamage) { if (uiDamage < m_creature->GetHealth() || m_bHasDied) return; @@ -113,7 +113,7 @@ struct MANGOS_DLL_DECL boss_scarlet_commander_mograineAI : public ScriptedAI if (!m_pInstance) return; - //On first death, fake death and open door, as well as initiate whitemane if exist + // On first death, fake death and open door, as well as initiate whitemane if exist if (Creature* pWhitemane = m_pInstance->GetSingleCreatureFromStorage(NPC_WHITEMANE)) { m_pInstance->SetData(TYPE_MOGRAINE_AND_WHITE_EVENT, IN_PROGRESS); @@ -144,7 +144,7 @@ struct MANGOS_DLL_DECL boss_scarlet_commander_mograineAI : public ScriptedAI void SpellHit(Unit* pWho, const SpellEntry* pSpell) { - //When hit with ressurection say text + // When hit with ressurection say text if (pSpell->Id == SPELL_SCARLETRESURRECTION) { DoScriptText(SAY_MO_RESSURECTED, m_creature); @@ -162,7 +162,7 @@ struct MANGOS_DLL_DECL boss_scarlet_commander_mograineAI : public ScriptedAI if (m_bHasDied && !m_bHeal && m_pInstance && m_pInstance->GetData(TYPE_MOGRAINE_AND_WHITE_EVENT) == SPECIAL) { - //On ressurection, stop fake death and heal whitemane and resume fight + // On ressurection, stop fake death and heal whitemane and resume fight m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); m_creature->SetStandState(UNIT_STAND_STATE_STAND); // spell has script target on Whitemane @@ -177,11 +177,11 @@ struct MANGOS_DLL_DECL boss_scarlet_commander_mograineAI : public ScriptedAI m_bHeal = true; } - //This if-check to make sure mograine does not attack while fake death + // This if-check to make sure mograine does not attack while fake death if (m_bFakeDeath) return; - //m_uiCrusaderStrike_Timer + // m_uiCrusaderStrike_Timer if (m_uiCrusaderStrike_Timer < uiDiff) { if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_CRUSADERSTRIKE) == CAST_OK) @@ -190,7 +190,7 @@ struct MANGOS_DLL_DECL boss_scarlet_commander_mograineAI : public ScriptedAI else m_uiCrusaderStrike_Timer -= uiDiff; - //m_uiHammerOfJustice_Timer + // m_uiHammerOfJustice_Timer if (m_uiHammerOfJustice_Timer < uiDiff) { if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_HAMMEROFJUSTICE) == CAST_OK) @@ -252,10 +252,10 @@ struct MANGOS_DLL_DECL boss_high_inquisitor_whitemaneAI : public ScriptedAI void MoveInLineOfSight(Unit* pWho) { - //This needs to be empty because Whitemane should NOT aggro while fighting Mograine. Mograine will give us a target. + // This needs to be empty because Whitemane should NOT aggro while fighting Mograine. Mograine will give us a target. } - void DamageTaken(Unit* pDoneBy, uint32 &uiDamage) + void DamageTaken(Unit* pDoneBy, uint32& uiDamage) { if (uiDamage < m_creature->GetHealth()) return; @@ -263,7 +263,7 @@ struct MANGOS_DLL_DECL boss_high_inquisitor_whitemaneAI : public ScriptedAI if (!m_bCanResurrectCheck || m_bCanResurrect) { // prevent killing blow before rezzing commander - m_creature->SetHealth(uiDamage+1); + m_creature->SetHealth(uiDamage + 1); } } @@ -292,7 +292,7 @@ struct MANGOS_DLL_DECL boss_high_inquisitor_whitemaneAI : public ScriptedAI if (m_bCanResurrect) { - //When casting resuruction make sure to delay so on rez when reinstate battle deepsleep runs out + // When casting resuruction make sure to delay so on rez when reinstate battle deepsleep runs out if (m_uiWait_Timer < uiDiff) { // spell has script target on Mograine @@ -304,7 +304,7 @@ struct MANGOS_DLL_DECL boss_high_inquisitor_whitemaneAI : public ScriptedAI m_uiWait_Timer -= uiDiff; } - //Cast Deep sleep when health is less than 50% + // Cast Deep sleep when health is less than 50% if (!m_bCanResurrectCheck && m_creature->GetHealthPercent() <= 50.0f) { DoCastSpellIfCan(m_creature, SPELL_DEEPSLEEP, CAST_INTERRUPT_PREVIOUS); @@ -313,11 +313,11 @@ struct MANGOS_DLL_DECL boss_high_inquisitor_whitemaneAI : public ScriptedAI return; } - //while in "resurrect-mode", don't do anything + // while in "resurrect-mode", don't do anything if (m_bCanResurrect) return; - //If we are <75% hp cast healing spells at self or Mograine + // If we are <75% hp cast healing spells at self or Mograine if (m_uiHeal_Timer < uiDiff) { if (Unit* pTarget = DoSelectLowestHpFriendly(50.0f)) @@ -329,7 +329,7 @@ struct MANGOS_DLL_DECL boss_high_inquisitor_whitemaneAI : public ScriptedAI else m_uiHeal_Timer -= uiDiff; - //m_uiPowerWordShield_Timer + // m_uiPowerWordShield_Timer if (m_uiPowerWordShield_Timer < uiDiff) { if (DoCastSpellIfCan(m_creature, SPELL_POWERWORDSHIELD) == CAST_OK) @@ -338,7 +338,7 @@ struct MANGOS_DLL_DECL boss_high_inquisitor_whitemaneAI : public ScriptedAI else m_uiPowerWordShield_Timer -= uiDiff; - //m_uiHolySmite_Timer + // m_uiHolySmite_Timer if (m_uiHolySmite_Timer < uiDiff) { if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_HOLYSMITE) == CAST_OK) diff --git a/scripts/eastern_kingdoms/scarlet_monastery/instance_scarlet_monastery.cpp b/scripts/eastern_kingdoms/scarlet_monastery/instance_scarlet_monastery.cpp index 21de1d1a3..89d7fb4d4 100644 --- a/scripts/eastern_kingdoms/scarlet_monastery/instance_scarlet_monastery.cpp +++ b/scripts/eastern_kingdoms/scarlet_monastery/instance_scarlet_monastery.cpp @@ -36,7 +36,7 @@ void instance_scarlet_monastery::Initialize() void instance_scarlet_monastery::OnCreatureCreate(Creature* pCreature) { - switch(pCreature->GetEntry()) + switch (pCreature->GetEntry()) { case NPC_MOGRAINE: case NPC_WHITEMANE: diff --git a/scripts/eastern_kingdoms/scholomance/instance_scholomance.cpp b/scripts/eastern_kingdoms/scholomance/instance_scholomance.cpp index 155975a94..f2da3019d 100644 --- a/scripts/eastern_kingdoms/scholomance/instance_scholomance.cpp +++ b/scripts/eastern_kingdoms/scholomance/instance_scholomance.cpp @@ -61,7 +61,7 @@ void instance_scholomance::OnCreatureCreate(Creature* pCreature) void instance_scholomance::OnObjectCreate(GameObject* pGo) { - switch(pGo->GetEntry()) + switch (pGo->GetEntry()) { case GO_GATE_KIRTONOS: case GO_GATE_RAS: @@ -86,7 +86,7 @@ void instance_scholomance::OnObjectCreate(GameObject* pGo) void instance_scholomance::SetData(uint32 uiType, uint32 uiData) { - switch(uiType) + switch (uiType) { case TYPE_KIRTONOS: // This door is initially closed by DB-scripts, so only use it in case of FAIL, DONE, or on aggro after wipe @@ -143,8 +143,8 @@ void instance_scholomance::SetData(uint32 uiType, uint32 uiData) std::ostringstream saveStream; saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2] << " " - << m_auiEncounter[3] << " " << m_auiEncounter[4] << " " << m_auiEncounter[5] << " " - << m_auiEncounter[6] << " " << m_auiEncounter[7] << " " << m_auiEncounter[8] << " " << m_auiEncounter[9]; + << m_auiEncounter[3] << " " << m_auiEncounter[4] << " " << m_auiEncounter[5] << " " + << m_auiEncounter[6] << " " << m_auiEncounter[7] << " " << m_auiEncounter[8] << " " << m_auiEncounter[9]; m_strInstData = saveStream.str(); @@ -169,7 +169,7 @@ void instance_scholomance::DoSpawnGandlingIfCan(bool bByPlayerEnter) // Check if all the six bosses are done first if (m_auiEncounter[TYPE_MALICIA] == DONE && m_auiEncounter[TYPE_THEOLEN] == DONE && m_auiEncounter[TYPE_POLKELT] == DONE && - m_auiEncounter[TYPE_RAVENIAN] == DONE && m_auiEncounter[TYPE_ALEXEI_BAROV] == DONE && m_auiEncounter[TYPE_ILLUCIA_BAROV] == DONE) + m_auiEncounter[TYPE_RAVENIAN] == DONE && m_auiEncounter[TYPE_ALEXEI_BAROV] == DONE && m_auiEncounter[TYPE_ILLUCIA_BAROV] == DONE) { if (Creature* pGandling = pPlayer->SummonCreature(NPC_DARKMASTER_GANDLING, aGandlingSpawnLocs[0].m_fX, aGandlingSpawnLocs[0].m_fY, aGandlingSpawnLocs[0].m_fZ, aGandlingSpawnLocs[0].m_fO, TEMPSUMMON_DEAD_DESPAWN, 0)) { @@ -201,8 +201,8 @@ void instance_scholomance::HandlePortalEvent(uint32 uiEventId, uint32 uiData) else { if (uiData == IN_PROGRESS && !find->second.m_bIsActive || - uiData == FAIL && find->second.m_bIsActive || - uiData == DONE && find->second.m_bIsActive) + uiData == FAIL && find->second.m_bIsActive || + uiData == DONE && find->second.m_bIsActive) { find->second.m_bIsActive = !find->second.m_bIsActive; DoUseDoorOrButton(find->second.m_doorGuid); @@ -232,7 +232,7 @@ void instance_scholomance::Load(const char* chrIn) loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3] >> m_auiEncounter[4] >> m_auiEncounter[5] >> m_auiEncounter[6] >> m_auiEncounter[7] >> m_auiEncounter[8] >> m_auiEncounter[9]; - for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) + for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) if (m_auiEncounter[i] == IN_PROGRESS) m_auiEncounter[i] = NOT_STARTED; diff --git a/scripts/eastern_kingdoms/shadowfang_keep/boss_hummel.cpp b/scripts/eastern_kingdoms/shadowfang_keep/boss_hummel.cpp index d06459181..3361cd6a8 100644 --- a/scripts/eastern_kingdoms/shadowfang_keep/boss_hummel.cpp +++ b/scripts/eastern_kingdoms/shadowfang_keep/boss_hummel.cpp @@ -171,7 +171,7 @@ struct MANGOS_DLL_DECL npc_valentine_boss_managerAI : public ScriptedAI, private // I'm not sure if this unit flag should be used, but it's clear that the NPC shouldn't be attacked until the dialogue is finished pHummel->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); // WARNING: workaround -> faction should be set here - FIX THIS after the aura bug in core is fixed - //pHummel->SetFactionTemporary(FACTION_HOSTILE, TEMPFACTION_RESTORE_REACH_HOME | TEMPFACTION_RESTORE_RESPAWN); + // pHummel->SetFactionTemporary(FACTION_HOSTILE, TEMPFACTION_RESTORE_REACH_HOME | TEMPFACTION_RESTORE_RESPAWN); } StartNextDialogueText(QUEST_BEEN_SERVED); @@ -181,7 +181,7 @@ struct MANGOS_DLL_DECL npc_valentine_boss_managerAI : public ScriptedAI, private { pBaxter->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); // WARNING: workaround -> faction should be set here - FIX THIS after the aura bug in core is fixed - //pBaxter->SetFactionTemporary(FACTION_HOSTILE, TEMPFACTION_RESTORE_REACH_HOME | TEMPFACTION_RESTORE_RESPAWN); + // pBaxter->SetFactionTemporary(FACTION_HOSTILE, TEMPFACTION_RESTORE_REACH_HOME | TEMPFACTION_RESTORE_RESPAWN); if (GameObject* pVials = m_pInstance->GetSingleGameObjectFromStorage(GO_APOTHECARE_VIALS)) { @@ -199,7 +199,7 @@ struct MANGOS_DLL_DECL npc_valentine_boss_managerAI : public ScriptedAI, private { pFrye->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); // WARNING: workaround -> faction should be set here - FIX THIS after the aura bug in core is fixed - //pFrye->SetFactionTemporary(FACTION_HOSTILE, TEMPFACTION_RESTORE_REACH_HOME | TEMPFACTION_RESTORE_RESPAWN); + // pFrye->SetFactionTemporary(FACTION_HOSTILE, TEMPFACTION_RESTORE_REACH_HOME | TEMPFACTION_RESTORE_RESPAWN); if (GameObject* pChemistry = m_pInstance->GetSingleGameObjectFromStorage(GO_CHEMISTRY_SET)) { diff --git a/scripts/eastern_kingdoms/shadowfang_keep/instance_shadowfang_keep.cpp b/scripts/eastern_kingdoms/shadowfang_keep/instance_shadowfang_keep.cpp index ff9d81524..b19732cf9 100644 --- a/scripts/eastern_kingdoms/shadowfang_keep/instance_shadowfang_keep.cpp +++ b/scripts/eastern_kingdoms/shadowfang_keep/instance_shadowfang_keep.cpp @@ -37,7 +37,7 @@ void instance_shadowfang_keep::Initialize() void instance_shadowfang_keep::OnCreatureCreate(Creature* pCreature) { - switch(pCreature->GetEntry()) + switch (pCreature->GetEntry()) { case NPC_ASH: case NPC_ADA: @@ -62,14 +62,14 @@ void instance_shadowfang_keep::OnCreatureCreate(Creature* pCreature) void instance_shadowfang_keep::OnObjectCreate(GameObject* pGo) { - switch(pGo->GetEntry()) + switch (pGo->GetEntry()) { case GO_COURTYARD_DOOR: if (m_auiEncounter[0] == DONE) pGo->SetGoState(GO_STATE_ACTIVE); break; - // For this we ignore voidwalkers, because if the server restarts - // They won't be there, but Fenrus is dead so the door can't be opened! + // For this we ignore voidwalkers, because if the server restarts + // They won't be there, but Fenrus is dead so the door can't be opened! case GO_SORCERER_DOOR: if (m_auiEncounter[2] == DONE) pGo->SetGoState(GO_STATE_ACTIVE); @@ -91,10 +91,10 @@ void instance_shadowfang_keep::OnObjectCreate(GameObject* pGo) void instance_shadowfang_keep::OnCreatureDeath(Creature* pCreature) { - switch(pCreature->GetEntry()) + switch (pCreature->GetEntry()) { - // Remove lootable flag from Hummel - // Instance data is set to SPECIAL because the encounter depends on multiple bosses + // Remove lootable flag from Hummel + // Instance data is set to SPECIAL because the encounter depends on multiple bosses case NPC_HUMMEL: pCreature->RemoveFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE); DoScriptText(SAY_HUMMEL_DEATH, pCreature); @@ -108,7 +108,7 @@ void instance_shadowfang_keep::OnCreatureDeath(Creature* pCreature) void instance_shadowfang_keep::OnCreatureEvade(Creature* pCreature) { - switch(pCreature->GetEntry()) + switch (pCreature->GetEntry()) { case NPC_HUMMEL: case NPC_FRYE: @@ -125,14 +125,14 @@ void instance_shadowfang_keep::DoSpeech() if (pAda && pAda->isAlive() && pAsh && pAsh->isAlive()) { - DoScriptText(SAY_BOSS_DIE_AD,pAda); - DoScriptText(SAY_BOSS_DIE_AS,pAsh); + DoScriptText(SAY_BOSS_DIE_AD, pAda); + DoScriptText(SAY_BOSS_DIE_AS, pAsh); } } void instance_shadowfang_keep::SetData(uint32 uiType, uint32 uiData) { - switch(uiType) + switch (uiType) { case TYPE_FREE_NPC: if (uiData == DONE) @@ -197,7 +197,7 @@ void instance_shadowfang_keep::SetData(uint32 uiType, uint32 uiData) std::ostringstream saveStream; saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2] << " " << m_auiEncounter[3] - << " " << m_auiEncounter[4] << " " << m_auiEncounter[5] << " " << m_auiEncounter[6]; + << " " << m_auiEncounter[4] << " " << m_auiEncounter[5] << " " << m_auiEncounter[6]; m_strInstData = saveStream.str(); @@ -208,7 +208,7 @@ void instance_shadowfang_keep::SetData(uint32 uiType, uint32 uiData) uint32 instance_shadowfang_keep::GetData(uint32 uiType) { - switch(uiType) + switch (uiType) { case TYPE_FREE_NPC: return m_auiEncounter[0]; case TYPE_RETHILGORE: return m_auiEncounter[1]; @@ -234,9 +234,9 @@ void instance_shadowfang_keep::Load(const char* chrIn) std::istringstream loadStream(chrIn); loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3] - >> m_auiEncounter[4] >> m_auiEncounter[5] >> m_auiEncounter[6]; + >> m_auiEncounter[4] >> m_auiEncounter[5] >> m_auiEncounter[6]; - for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) + for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) { if (m_auiEncounter[i] == IN_PROGRESS) m_auiEncounter[i] = NOT_STARTED; diff --git a/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.cpp b/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.cpp index 322fbe0e1..6d78c8a6a 100644 --- a/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.cpp +++ b/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.cpp @@ -69,7 +69,7 @@ struct MANGOS_DLL_DECL npc_shadowfang_prisonerAI : public npc_escortAI void WaypointReached(uint32 uiPoint) { - switch(uiPoint) + switch (uiPoint) { case 0: if (m_uiNpcEntry == NPC_ASH) @@ -144,7 +144,7 @@ bool GossipHello_npc_shadowfang_prisoner(Player* pPlayer, Creature* pCreature) ScriptedInstance* pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); if (pInstance && pInstance->GetData(TYPE_FREE_NPC) != DONE && pInstance->GetData(TYPE_RETHILGORE) == DONE) - pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_DOOR, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_DOOR, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); return true; @@ -152,7 +152,7 @@ bool GossipHello_npc_shadowfang_prisoner(Player* pPlayer, Creature* pCreature) bool GossipSelect_npc_shadowfang_prisoner(Player* pPlayer, Creature* pCreature, uint32 /*uiSender*/, uint32 uiAction) { - if (uiAction == GOSSIP_ACTION_INFO_DEF+1) + if (uiAction == GOSSIP_ACTION_INFO_DEF + 1) { pPlayer->CLOSE_GOSSIP_MENU(); @@ -172,21 +172,21 @@ struct Waypoint }; // Cordinates for voidwalker spawns -static const Waypoint VWWaypoints[]= +static const Waypoint VWWaypoints[] = { - {-146.06f, 2172.84f, 127.953f}, // This is the initial location, in the middle of the room - {-159.547f, 2178.11f, 128.944f}, // When they come back up, they hit this point then walk back down - {-171.113f, 2182.69f, 129.255f}, - {-177.613f, 2175.59f, 128.161f}, - {-185.396f, 2178.35f, 126.413f}, - {-184.004f, 2188.31f, 124.122f}, - {-172.781f, 2188.71f, 121.611f}, - {-173.245f, 2176.93f, 119.085f}, - {-183.145f, 2176.04f, 116.995f}, - {-185.551f, 2185.77f, 114.784f}, - {-177.502f, 2190.75f, 112.681f}, - {-171.218f, 2182.61f, 110.314f}, - {-173.857f, 2175.1f, 109.255f} + { -146.06f, 2172.84f, 127.953f}, // This is the initial location, in the middle of the room + { -159.547f, 2178.11f, 128.944f}, // When they come back up, they hit this point then walk back down + { -171.113f, 2182.69f, 129.255f}, + { -177.613f, 2175.59f, 128.161f}, + { -185.396f, 2178.35f, 126.413f}, + { -184.004f, 2188.31f, 124.122f}, + { -172.781f, 2188.71f, 121.611f}, + { -173.245f, 2176.93f, 119.085f}, + { -183.145f, 2176.04f, 116.995f}, + { -185.551f, 2185.77f, 114.784f}, + { -177.502f, 2190.75f, 112.681f}, + { -171.218f, 2182.61f, 110.314f}, + { -173.857f, 2175.1f, 109.255f} }; enum @@ -223,7 +223,7 @@ struct MANGOS_DLL_DECL mob_arugal_voidwalkerAI : public ScriptedAI Creature* pLeader = m_creature->GetMap()->GetCreature(m_leaderGuid); if (pLeader && pLeader->isAlive()) { - m_creature->GetMotionMaster()->MoveFollow(pLeader, 1.0f, M_PI/2*m_uiPosition); + m_creature->GetMotionMaster()->MoveFollow(pLeader, 1.0f, M_PI / 2 * m_uiPosition); } else { @@ -231,7 +231,7 @@ struct MANGOS_DLL_DECL mob_arugal_voidwalkerAI : public ScriptedAI Creature* pNewLeader = NULL; uint8 uiHighestPosition = 0; GetCreatureListWithEntryInGrid(lVoidwalkerList, m_creature, NPC_VOIDWALKER, 50.0f); - for(std::list::iterator itr = lVoidwalkerList.begin(); itr != lVoidwalkerList.end(); ++itr) + for (std::list::iterator itr = lVoidwalkerList.begin(); itr != lVoidwalkerList.end(); ++itr) { if ((*itr)->isAlive()) { @@ -256,7 +256,7 @@ struct MANGOS_DLL_DECL mob_arugal_voidwalkerAI : public ScriptedAI m_bWPDone = true; } else - m_creature->GetMotionMaster()->MoveFollow(pNewLeader, 1.0f, M_PI/2*m_uiPosition); + m_creature->GetMotionMaster()->MoveFollow(pNewLeader, 1.0f, M_PI / 2 * m_uiPosition); } else { @@ -272,7 +272,7 @@ struct MANGOS_DLL_DECL mob_arugal_voidwalkerAI : public ScriptedAI if (m_bIsLeader && m_bWPDone) { m_creature->GetMotionMaster()->MovePoint(m_uiCurrentPoint, VWWaypoints[m_uiCurrentPoint].fX, - VWWaypoints[m_uiCurrentPoint].fY, VWWaypoints[m_uiCurrentPoint].fZ); + VWWaypoints[m_uiCurrentPoint].fY, VWWaypoints[m_uiCurrentPoint].fZ); m_bWPDone = false; } @@ -301,7 +301,7 @@ struct MANGOS_DLL_DECL mob_arugal_voidwalkerAI : public ScriptedAI if (uiMoveType != POINT_MOTION_TYPE || !m_bIsLeader) return; - switch(uiPointId) + switch (uiPointId) { case 1: if (m_bReverse) @@ -326,7 +326,7 @@ struct MANGOS_DLL_DECL mob_arugal_voidwalkerAI : public ScriptedAI void JustDied(Unit* /*pKiller*/) { if (m_pInstance) - m_pInstance->SetData(TYPE_VOIDWALKER,DONE); + m_pInstance->SetData(TYPE_VOIDWALKER, DONE); } void SetPosition(uint8 uiPosition, Creature* pLeader) @@ -355,7 +355,7 @@ struct MANGOS_DLL_DECL mob_arugal_voidwalkerAI : public ScriptedAI { std::list lVoidwalkerList; GetCreatureListWithEntryInGrid(lVoidwalkerList, m_creature, NPC_VOIDWALKER, 50.0f); - for(std::list::iterator itr = lVoidwalkerList.begin(); itr != lVoidwalkerList.end(); ++itr) + for (std::list::iterator itr = lVoidwalkerList.begin(); itr != lVoidwalkerList.end(); ++itr) { if ((*itr)->isAlive()) if (mob_arugal_voidwalkerAI* pVoidwalkerAI = dynamic_cast((*itr)->AI())) @@ -419,13 +419,13 @@ struct SpawnPoint }; // Cordinates for voidwalker spawns -static const SpawnPoint VWSpawns[]= +static const SpawnPoint VWSpawns[] = { - //fX fY fZ fO - {-155.352f, 2172.780f, 128.448f, 4.679f}, - {-147.059f, 2163.193f, 128.696f, 0.128f}, - {-148.869f, 2180.859f, 128.448f, 1.814f}, - {-140.203f, 2175.263f, 128.448f, 0.373f} + // fX fY fZ fO + { -155.352f, 2172.780f, 128.448f, 4.679f}, + { -147.059f, 2163.193f, 128.696f, 0.128f}, + { -148.869f, 2180.859f, 128.448f, 1.814f}, + { -140.203f, 2175.263f, 128.448f, 0.373f} }; // Roughly the height of Fenrus' room, @@ -488,7 +488,7 @@ struct MANGOS_DLL_DECL boss_arugalAI : public ScriptedAI if (m_uiSpeechTimer < uiDiff) { - switch(m_uiSpeechStep) + switch (m_uiSpeechStep) { case 1: DoScriptText(YELL_FENRUS, m_creature); @@ -518,7 +518,7 @@ struct MANGOS_DLL_DECL boss_arugalAI : public ScriptedAI for (uint8 i = 0; i < 4; ++i) { pVoidwalker = m_creature->SummonCreature(NPC_VOIDWALKER, VWSpawns[i].fX, - VWSpawns[i].fY, VWSpawns[i].fZ, VWSpawns[i].fO, TEMPSUMMON_DEAD_DESPAWN, 1); + VWSpawns[i].fY, VWSpawns[i].fZ, VWSpawns[i].fO, TEMPSUMMON_DEAD_DESPAWN, 1); if (!pVoidwalker) continue; @@ -622,7 +622,7 @@ struct MANGOS_DLL_DECL boss_arugalAI : public ScriptedAI if (m_creature->IsNonMeleeSpellCasted(false)) m_creature->InterruptNonMeleeSpells(false); - switch(posNewPosition) + switch (posNewPosition) { case POSITION_SPAWN_LEDGE: DoCastSpellIfCan(m_creature, SPELL_SHADOW_PORT_SPAWN_LEDGE, true); @@ -752,7 +752,7 @@ struct MANGOS_DLL_DECL npc_arugalAI : public ScriptedAI if (m_uiSpeechTimer < uiDiff) { - switch(m_uiSpeechStep) + switch (m_uiSpeechStep) { case 1: m_creature->SetVisibility(VISIBILITY_ON); @@ -764,7 +764,7 @@ struct MANGOS_DLL_DECL npc_arugalAI : public ScriptedAI break; case 3: // Make him die - if (Creature* pVincent = GetClosestCreatureWithEntry(m_creature,NPC_VINCENT,20.0f)) + if (Creature* pVincent = GetClosestCreatureWithEntry(m_creature, NPC_VINCENT, 20.0f)) pVincent->SetStandState(UNIT_STAND_STATE_DEAD); m_uiSpeechTimer = 10000; @@ -805,7 +805,7 @@ struct MANGOS_DLL_DECL npc_arugalAI : public ScriptedAI break; case 12: if (m_pInstance) - m_pInstance->SetData(TYPE_INTRO,DONE); + m_pInstance->SetData(TYPE_INTRO, DONE); m_creature->SetVisibility(VISIBILITY_OFF); m_uiSpeechStep = 0; diff --git a/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.h b/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.h index 6acda8f2e..4c35dd5af 100644 --- a/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.h +++ b/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.h @@ -22,21 +22,21 @@ enum NPC_ASH = 3850, NPC_ADA = 3849, - // NPC_ARUGAL = 10000, //"Arugal" says intro text, not used + // NPC_ARUGAL = 10000, //"Arugal" says intro text, not used NPC_ARCHMAGE_ARUGAL = 4275, //"Archmage Arugal" does Fenrus event - NPC_FENRUS = 4274, //used to summon Arugal in Fenrus event - NPC_VINCENT = 4444, //Vincent should be "dead" is Arugal is done the intro already + NPC_FENRUS = 4274, // used to summon Arugal in Fenrus event + NPC_VINCENT = 4444, // Vincent should be "dead" is Arugal is done the intro already NPC_HUMMEL = 36296, // Love is in the Air event NPC_FRYE = 36272, NPC_BAXTER = 36565, NPC_VALENTINE_BOSS_MGR = 36643, // controller npc for the apothecary event - NPC_APOTHECARY_GENERATOR= 36212, // the npc which summons the crazed apothecary + NPC_APOTHECARY_GENERATOR = 36212, // the npc which summons the crazed apothecary - GO_COURTYARD_DOOR = 18895, //door to open when talking to NPC's - GO_SORCERER_DOOR = 18972, //door to open when Fenrus the Devourer - GO_ARUGAL_DOOR = 18971, //door to open when Wolf Master Nandos - GO_ARUGAL_FOCUS = 18973, //this generates the lightning visual in the Fenrus event + GO_COURTYARD_DOOR = 18895, // door to open when talking to NPC's + GO_SORCERER_DOOR = 18972, // door to open when Fenrus the Devourer + GO_ARUGAL_DOOR = 18971, // door to open when Wolf Master Nandos + GO_ARUGAL_FOCUS = 18973, // this generates the lightning visual in the Fenrus event GO_APOTHECARE_VIALS = 190678, // move position for Baxter GO_CHEMISTRY_SET = 200335, // move position for Frye diff --git a/scripts/eastern_kingdoms/silverpine_forest.cpp b/scripts/eastern_kingdoms/silverpine_forest.cpp index 361491d86..02619f004 100644 --- a/scripts/eastern_kingdoms/silverpine_forest.cpp +++ b/scripts/eastern_kingdoms/silverpine_forest.cpp @@ -65,7 +65,7 @@ struct MANGOS_DLL_DECL npc_deathstalker_erlandAI : public npc_escortAI if (!pPlayer) return; - switch(i) + switch (i) { case 0: DoScriptText(SAY_START_2, m_creature, pPlayer); @@ -101,7 +101,7 @@ struct MANGOS_DLL_DECL npc_deathstalker_erlandAI : public npc_escortAI void Aggro(Unit* who) { - switch(urand(0, 2)) + switch (urand(0, 2)) { case 0: DoScriptText(SAY_AGGRO_1, m_creature, who); break; case 1: DoScriptText(SAY_AGGRO_2, m_creature, who); break; @@ -166,12 +166,12 @@ struct SpawnPoint SpawnPoint SpawnPoints[] = { - {-397.45f, 1509.56f, 18.87f, 4.73f}, - {-398.35f, 1510.75f, 18.87f, 4.76f}, - {-396.41f, 1511.06f, 18.87f, 4.74f} + { -397.45f, 1509.56f, 18.87f, 4.73f}, + { -398.35f, 1510.75f, 18.87f, 4.76f}, + { -396.41f, 1511.06f, 18.87f, 4.74f} }; -static float m_afMoveCoords[] = {-410.69f, 1498.04f, 19.77f}; +static float m_afMoveCoords[] = { -410.69f, 1498.04f, 19.77f}; struct MANGOS_DLL_DECL npc_deathstalker_faerleiaAI : public ScriptedAI { @@ -248,7 +248,7 @@ struct MANGOS_DLL_DECL npc_deathstalker_faerleiaAI : public ScriptedAI { if (m_uiWaveTimer < uiDiff) { - switch(m_uiWaveCount) + switch (m_uiWaveCount) { case 0: m_creature->SummonCreature(NPC_COUNCILMAN_SMITHERS, SpawnPoints[1].fX, SpawnPoints[1].fY, SpawnPoints[1].fZ, SpawnPoints[1].fO, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 20000); diff --git a/scripts/eastern_kingdoms/stormwind_city.cpp b/scripts/eastern_kingdoms/stormwind_city.cpp index 4d61fe41a..e24b10467 100644 --- a/scripts/eastern_kingdoms/stormwind_city.cpp +++ b/scripts/eastern_kingdoms/stormwind_city.cpp @@ -70,9 +70,9 @@ struct MANGOS_DLL_DECL npc_bartlebyAI : public ScriptedAI AttackStart(pAttacker); } - void DamageTaken(Unit* pDoneBy, uint32 &uiDamage) + void DamageTaken(Unit* pDoneBy, uint32& uiDamage) { - if (uiDamage > m_creature->GetHealth() || ((m_creature->GetHealth() - uiDamage)*100 / m_creature->GetMaxHealth() < 15)) + if (uiDamage > m_creature->GetHealth() || ((m_creature->GetHealth() - uiDamage) * 100 / m_creature->GetMaxHealth() < 15)) { uiDamage = 0; @@ -136,9 +136,9 @@ struct MANGOS_DLL_DECL npc_dashel_stonefistAI : public ScriptedAI AttackStart(pAttacker); } - void DamageTaken(Unit* pDoneBy, uint32 &uiDamage) + void DamageTaken(Unit* pDoneBy, uint32& uiDamage) { - if (uiDamage > m_creature->GetHealth() || ((m_creature->GetHealth() - uiDamage)*100 / m_creature->GetMaxHealth() < 15)) + if (uiDamage > m_creature->GetHealth() || ((m_creature->GetHealth() - uiDamage) * 100 / m_creature->GetMaxHealth() < 15)) { uiDamage = 0; @@ -189,7 +189,7 @@ bool GossipHello_npc_lady_katrana_prestor(Player* pPlayer, Creature* pCreature) bool GossipSelect_npc_lady_katrana_prestor(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) { - switch(uiAction) + switch (uiAction) { case GOSSIP_ACTION_INFO_DEF: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KAT_2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); @@ -243,8 +243,8 @@ static const DialogueEntry aIntroDialogue[] = {0, 0, 0}, }; -static const float aWindsorSpawnLoc[3] = {-9145.68f, 373.79f, 90.64f}; -static const float aWindsorMoveLoc[3] = {-9050.39f, 443.55f, 93.05f}; +static const float aWindsorSpawnLoc[3] = { -9145.68f, 373.79f, 90.64f}; +static const float aWindsorMoveLoc[3] = { -9050.39f, 443.55f, 93.05f}; struct MANGOS_DLL_DECL npc_squire_roweAI : public npc_escortAI, private DialogueHelper { @@ -297,7 +297,7 @@ struct MANGOS_DLL_DECL npc_squire_roweAI : public npc_escortAI, private Dialogue void WaypointReached(uint32 uiPointId) { - switch(uiPointId) + switch (uiPointId) { case 2: m_creature->SetStandState(UNIT_STAND_STATE_KNEEL); @@ -316,7 +316,7 @@ struct MANGOS_DLL_DECL npc_squire_roweAI : public npc_escortAI, private Dialogue void JustDidDialogueStep(int32 iEntry) { - switch(iEntry) + switch (iEntry) { case NPC_WINDSOR_MOUNT: { @@ -385,7 +385,7 @@ bool GossipHello_npc_squire_rowe(Player* pPlayer, Creature* pCreature) { // Allow gossip if quest 6402 is completed but not yet rewarded or 6402 is rewarded but 6403 isn't yet completed if ((pPlayer->GetQuestStatus(QUEST_STORMWIND_RENDEZVOUS) == QUEST_STATUS_COMPLETE && !pPlayer->GetQuestRewardStatus(QUEST_STORMWIND_RENDEZVOUS)) || - (pPlayer->GetQuestRewardStatus(QUEST_STORMWIND_RENDEZVOUS) && pPlayer->GetQuestStatus(QUEST_THE_GREAT_MASQUERADE) != QUEST_STATUS_COMPLETE)) + (pPlayer->GetQuestRewardStatus(QUEST_STORMWIND_RENDEZVOUS) && pPlayer->GetQuestStatus(QUEST_THE_GREAT_MASQUERADE) != QUEST_STATUS_COMPLETE)) { bool bIsEventInProgress = true; @@ -398,7 +398,7 @@ bool GossipHello_npc_squire_rowe(Player* pPlayer, Creature* pCreature) pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXT_ID_PROGRESS, pCreature->GetObjectGuid()); else { - pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_WINDSOR, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_WINDSOR, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXT_ID_START, pCreature->GetObjectGuid()); } } @@ -406,11 +406,11 @@ bool GossipHello_npc_squire_rowe(Player* pPlayer, Creature* pCreature) pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXT_ID_DEFAULT, pCreature->GetObjectGuid()); return true; - } +} bool GossipSelect_npc_squire_rowe(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) { - if (uiAction == GOSSIP_ACTION_INFO_DEF+1) + if (uiAction == GOSSIP_ACTION_INFO_DEF + 1) { if (npc_squire_roweAI* pRoweAI = dynamic_cast(pCreature->AI())) pRoweAI->Start(true, pPlayer, 0, true, false); @@ -477,7 +477,7 @@ enum GOSSIP_TEXT_ID_MASQUERADE = 5633, - //SPELL_ONYXIA_TRANSFORM = 20409, // removed from DBC + // SPELL_ONYXIA_TRANSFORM = 20409, // removed from DBC SPELL_WINDSOR_READ = 20358, SPELL_WINDSOR_DEATH = 20465, SPELL_ONYXIA_DESPAWN = 20466, @@ -494,25 +494,25 @@ enum static const float aGuardLocations[MAX_ROYAL_GUARDS][4] = { - {-8968.510f, 512.556f, 96.352f, 3.849f}, // guard right - left - {-8969.780f, 515.012f, 96.593f, 3.955f}, // guard right - middle - {-8972.410f, 518.228f, 96.594f, 4.281f}, // guard right - right - {-8965.170f, 508.565f, 96.352f, 3.825f}, // guard left - right - {-8962.960f, 506.583f, 96.593f, 3.802f}, // guard left - middle - {-8961.080f, 503.828f, 96.593f, 3.465f}, // guard left - left + { -8968.510f, 512.556f, 96.352f, 3.849f}, // guard right - left + { -8969.780f, 515.012f, 96.593f, 3.955f}, // guard right - middle + { -8972.410f, 518.228f, 96.594f, 4.281f}, // guard right - right + { -8965.170f, 508.565f, 96.352f, 3.825f}, // guard left - right + { -8962.960f, 506.583f, 96.593f, 3.802f}, // guard left - middle + { -8961.080f, 503.828f, 96.593f, 3.465f}, // guard left - left }; static const float aMoveLocations[10][3] = - { - {-8967.960f, 510.008f, 96.351f}, // Jonathan move - {-8959.440f, 505.424f, 96.595f}, // Guard Left - Middle kneel - {-8957.670f, 507.056f, 96.595f}, // Guard Left - Right kneel - {-8970.680f, 519.252f, 96.595f}, // Guard Right - Middle kneel - {-8969.100f, 520.395f, 96.595f}, // Guard Right - Left kneel - {-8974.590f, 516.213f, 96.590f}, // Jonathan kneel - {-8505.770f, 338.312f, 120.886f}, // Wrynn safe - {-8448.690f, 337.074f, 121.330f}, // Bolvar help - {-8448.279f, 338.398f, 121.329f} // Bolvar kneel +{ + { -8967.960f, 510.008f, 96.351f}, // Jonathan move + { -8959.440f, 505.424f, 96.595f}, // Guard Left - Middle kneel + { -8957.670f, 507.056f, 96.595f}, // Guard Left - Right kneel + { -8970.680f, 519.252f, 96.595f}, // Guard Right - Middle kneel + { -8969.100f, 520.395f, 96.595f}, // Guard Right - Left kneel + { -8974.590f, 516.213f, 96.590f}, // Jonathan kneel + { -8505.770f, 338.312f, 120.886f}, // Wrynn safe + { -8448.690f, 337.074f, 121.330f}, // Bolvar help + { -8448.279f, 338.398f, 121.329f} // Bolvar kneel }; static const DialogueEntry aMasqueradeDialogue[] = @@ -574,7 +574,7 @@ static const DialogueEntry aMasqueradeDialogue[] = {0, 0, 0}, }; -static const int32 aGuardSalute[MAX_GUARD_SALUTES] = {-1000842, -1000843, -1000844, -1000845, -1000846, -1000847, -1000848}; +static const int32 aGuardSalute[MAX_GUARD_SALUTES] = { -1000842, -1000843, -1000844, -1000845, -1000846, -1000847, -1000848}; struct MANGOS_DLL_DECL npc_reginald_windsorAI : public npc_escortAI, private DialogueHelper { @@ -611,8 +611,8 @@ struct MANGOS_DLL_DECL npc_reginald_windsorAI : public npc_escortAI, private Dia { // Note: this implementation is not the best; It should be better handled by the guard script if (m_bCanGuardSalute && (pWho->GetEntry() == NPC_GUARD_CITY || pWho->GetEntry() == NPC_GUARD_ROYAL || - pWho->GetEntry() == NPC_GUARD_PATROLLER) && pWho->IsWithinDistInMap(m_creature, 15.0f) && - m_sGuardsSalutedGuidSet.find(pWho->GetObjectGuid()) == m_sGuardsSalutedGuidSet.end() && pWho->IsWithinLOSInMap(m_creature)) + pWho->GetEntry() == NPC_GUARD_PATROLLER) && pWho->IsWithinDistInMap(m_creature, 15.0f) && + m_sGuardsSalutedGuidSet.find(pWho->GetObjectGuid()) == m_sGuardsSalutedGuidSet.end() && pWho->IsWithinLOSInMap(m_creature)) { DoScriptText(aGuardSalute[urand(0, MAX_GUARD_SALUTES - 1)], pWho); m_sGuardsSalutedGuidSet.insert(pWho->GetObjectGuid()); @@ -701,9 +701,9 @@ struct MANGOS_DLL_DECL npc_reginald_windsorAI : public npc_escortAI, private Dia if (!m_pScriptedMap) return; - switch(iEntry) + switch (iEntry) { - // Set orientation and prepare the npcs for the next event + // Set orientation and prepare the npcs for the next event case SAY_WINDSOR_GET_READY: m_creature->SetFacingTo(0.6f); break; @@ -998,7 +998,7 @@ bool GossipHello_npc_reginald_windsor(Player* pPlayer, Creature* pCreature) // Check if event is possible and also check the status of the quests if (bIsEventReady && pPlayer->GetQuestStatus(QUEST_THE_GREAT_MASQUERADE) != QUEST_STATUS_COMPLETE && pPlayer->GetQuestRewardStatus(QUEST_STORMWIND_RENDEZVOUS)) { - pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_REGINALD, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_REGINALD, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXT_ID_MASQUERADE, pCreature->GetObjectGuid()); } else @@ -1014,7 +1014,7 @@ bool GossipHello_npc_reginald_windsor(Player* pPlayer, Creature* pCreature) bool GossipSelect_npc_reginald_windsor(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) { - if (uiAction == GOSSIP_ACTION_INFO_DEF+1) + if (uiAction == GOSSIP_ACTION_INFO_DEF + 1) { if (npc_reginald_windsorAI* pReginaldAI = dynamic_cast(pCreature->AI())) pReginaldAI->DoStartKeepEvent(); diff --git a/scripts/eastern_kingdoms/stranglethorn_vale.cpp b/scripts/eastern_kingdoms/stranglethorn_vale.cpp index a66eeaba2..e61c7ff2e 100644 --- a/scripts/eastern_kingdoms/stranglethorn_vale.cpp +++ b/scripts/eastern_kingdoms/stranglethorn_vale.cpp @@ -99,9 +99,9 @@ struct MANGOS_DLL_DECL mob_yennikuAI : public ScriptedAI } }; -CreatureAI* GetAI_mob_yenniku(Creature *_Creature) +CreatureAI* GetAI_mob_yenniku(Creature* _Creature) { - return new mob_yennikuAI (_Creature); + return new mob_yennikuAI(_Creature); } /*###### diff --git a/scripts/eastern_kingdoms/stratholme/boss_cannon_master_willey.cpp b/scripts/eastern_kingdoms/stratholme/boss_cannon_master_willey.cpp index 2e610cc9a..c4625be4c 100644 --- a/scripts/eastern_kingdoms/stratholme/boss_cannon_master_willey.cpp +++ b/scripts/eastern_kingdoms/stratholme/boss_cannon_master_willey.cpp @@ -56,7 +56,7 @@ struct MANGOS_DLL_DECL boss_cannon_master_willeyAI : public ScriptedAI void UpdateAI(const uint32 uiDiff) { - //Return since we have no target + // Return since we have no target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/eastern_kingdoms/stratholme/boss_dathrohan_balnazzar.cpp b/scripts/eastern_kingdoms/stratholme/boss_dathrohan_balnazzar.cpp index 19c803495..c183ea3f0 100644 --- a/scripts/eastern_kingdoms/stratholme/boss_dathrohan_balnazzar.cpp +++ b/scripts/eastern_kingdoms/stratholme/boss_dathrohan_balnazzar.cpp @@ -29,15 +29,15 @@ enum SAY_TRANSFORM = -1329017, SAY_DEATH = -1329018, - //Dathrohan spells - SPELL_CRUSADERSHAMMER = 17286, //AOE stun + // Dathrohan spells + SPELL_CRUSADERSHAMMER = 17286, // AOE stun SPELL_CRUSADERSTRIKE = 17281, - SPELL_HOLYSTRIKE = 17284, //weapon dmg +3 + SPELL_HOLYSTRIKE = 17284, // weapon dmg +3 - //Transform - SPELL_BALNAZZARTRANSFORM = 17288, //restore full HP/mana, trigger spell Balnazzar Transform Stun + // Transform + SPELL_BALNAZZARTRANSFORM = 17288, // restore full HP/mana, trigger spell Balnazzar Transform Stun - //Balnazzar spells + // Balnazzar spells SPELL_SHADOWSHOCK = 17399, SPELL_MINDBLAST = 17287, SPELL_PSYCHICSCREAM = 13704, @@ -56,7 +56,7 @@ struct SummonDef float m_fX, m_fY, m_fZ, m_fOrient; }; -SummonDef m_aSummonPoint[]= +SummonDef m_aSummonPoint[] = { {NPC_SKELETAL_BERSERKER, 3460.356f, -3070.572f, 135.086f, 0.332f}, {NPC_SKELETAL_BERSERKER, 3465.289f, -3069.987f, 135.086f, 5.480f}, @@ -115,8 +115,8 @@ struct MANGOS_DLL_DECL boss_dathrohan_balnazzarAI : public ScriptedAI for (uint32 i = 0; i < countof(m_aSummonPoint); ++i) m_creature->SummonCreature(m_aSummonPoint[i].m_uiEntry, - m_aSummonPoint[i].m_fX, m_aSummonPoint[i].m_fY, m_aSummonPoint[i].m_fZ, m_aSummonPoint[i].m_fOrient, - TEMPSUMMON_TIMED_DESPAWN, HOUR*IN_MILLISECONDS); + m_aSummonPoint[i].m_fX, m_aSummonPoint[i].m_fY, m_aSummonPoint[i].m_fZ, m_aSummonPoint[i].m_fOrient, + TEMPSUMMON_TIMED_DESPAWN, HOUR * IN_MILLISECONDS); } void UpdateAI(const uint32 uiDiff) @@ -124,41 +124,45 @@ struct MANGOS_DLL_DECL boss_dathrohan_balnazzarAI : public ScriptedAI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - //START NOT TRANSFORMED + // START NOT TRANSFORMED if (!m_bTransformed) { - //MindBlast + // MindBlast if (m_uiMindBlast_Timer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_MINDBLAST); + DoCastSpellIfCan(m_creature->getVictim(), SPELL_MINDBLAST); m_uiMindBlast_Timer = urand(15000, 20000); - }else m_uiMindBlast_Timer -= uiDiff; + } + else m_uiMindBlast_Timer -= uiDiff; - //CrusadersHammer + // CrusadersHammer if (m_uiCrusadersHammer_Timer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_CRUSADERSHAMMER); + DoCastSpellIfCan(m_creature->getVictim(), SPELL_CRUSADERSHAMMER); m_uiCrusadersHammer_Timer = 12000; - }else m_uiCrusadersHammer_Timer -= uiDiff; + } + else m_uiCrusadersHammer_Timer -= uiDiff; - //CrusaderStrike + // CrusaderStrike if (m_uiCrusaderStrike_Timer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_CRUSADERSTRIKE); + DoCastSpellIfCan(m_creature->getVictim(), SPELL_CRUSADERSTRIKE); m_uiCrusaderStrike_Timer = 15000; - }else m_uiCrusaderStrike_Timer -= uiDiff; + } + else m_uiCrusaderStrike_Timer -= uiDiff; - //HolyStrike + // HolyStrike if (m_uiHolyStrike_Timer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_HOLYSTRIKE); + DoCastSpellIfCan(m_creature->getVictim(), SPELL_HOLYSTRIKE); m_uiHolyStrike_Timer = 15000; - }else m_uiHolyStrike_Timer -= uiDiff; + } + else m_uiHolyStrike_Timer -= uiDiff; - //BalnazzarTransform + // BalnazzarTransform if (m_creature->GetHealthPercent() < 40.0f) { - //restore hp, mana and stun + // restore hp, mana and stun if (DoCastSpellIfCan(m_creature, SPELL_BALNAZZARTRANSFORM) == CAST_OK) { m_creature->UpdateEntry(NPC_BALNAZZAR); @@ -169,44 +173,49 @@ struct MANGOS_DLL_DECL boss_dathrohan_balnazzarAI : public ScriptedAI } else { - //MindBlast + // MindBlast if (m_uiMindBlast_Timer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_MINDBLAST); + DoCastSpellIfCan(m_creature->getVictim(), SPELL_MINDBLAST); m_uiMindBlast_Timer = urand(15000, 20000); - }else m_uiMindBlast_Timer -= uiDiff; + } + else m_uiMindBlast_Timer -= uiDiff; - //ShadowShock + // ShadowShock if (m_uiShadowShock_Timer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_SHADOWSHOCK); + DoCastSpellIfCan(m_creature->getVictim(), SPELL_SHADOWSHOCK); m_uiShadowShock_Timer = 11000; - }else m_uiShadowShock_Timer -= uiDiff; + } + else m_uiShadowShock_Timer -= uiDiff; - //PsychicScream + // PsychicScream if (m_uiPsychicScream_Timer < uiDiff) { - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) - DoCastSpellIfCan(pTarget,SPELL_PSYCHICSCREAM); + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + DoCastSpellIfCan(pTarget, SPELL_PSYCHICSCREAM); m_uiPsychicScream_Timer = 20000; - }else m_uiPsychicScream_Timer -= uiDiff; + } + else m_uiPsychicScream_Timer -= uiDiff; - //DeepSleep + // DeepSleep if (m_uiDeepSleep_Timer < uiDiff) { - if (Unit *pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) - DoCastSpellIfCan(pTarget,SPELL_SLEEP); + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + DoCastSpellIfCan(pTarget, SPELL_SLEEP); m_uiDeepSleep_Timer = 15000; - }else m_uiDeepSleep_Timer -= uiDiff; + } + else m_uiDeepSleep_Timer -= uiDiff; - //MindControl + // MindControl if (m_uiMindControl_Timer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_MINDCONTROL); + DoCastSpellIfCan(m_creature->getVictim(), SPELL_MINDCONTROL); m_uiMindControl_Timer = 15000; - }else m_uiMindControl_Timer -= uiDiff; + } + else m_uiMindControl_Timer -= uiDiff; } DoMeleeAttackIfReady(); diff --git a/scripts/eastern_kingdoms/stratholme/boss_order_of_silver_hand.cpp b/scripts/eastern_kingdoms/stratholme/boss_order_of_silver_hand.cpp index 154287656..648feb345 100644 --- a/scripts/eastern_kingdoms/stratholme/boss_order_of_silver_hand.cpp +++ b/scripts/eastern_kingdoms/stratholme/boss_order_of_silver_hand.cpp @@ -116,7 +116,7 @@ struct MANGOS_DLL_DECL boss_silver_hand_bossesAI : public ScriptedAI { Unit* pTarget = NULL; - switch(m_aSilverHandAbility[uiIndex].m_uiTargetType) + switch (m_aSilverHandAbility[uiIndex].m_uiTargetType) { case TARGET_TYPE_SELF: pTarget = m_creature; @@ -143,7 +143,7 @@ struct MANGOS_DLL_DECL boss_silver_hand_bossesAI : public ScriptedAI void UpdateAI(const uint32 uiDiff) { - //Return since we have no target + // Return since we have no target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/eastern_kingdoms/stratholme/instance_stratholme.cpp b/scripts/eastern_kingdoms/stratholme/instance_stratholme.cpp index 62a18285f..c398a7d62 100644 --- a/scripts/eastern_kingdoms/stratholme/instance_stratholme.cpp +++ b/scripts/eastern_kingdoms/stratholme/instance_stratholme.cpp @@ -61,7 +61,7 @@ bool instance_stratholme::StartSlaugtherSquare() void instance_stratholme::OnCreatureCreate(Creature* pCreature) { - switch(pCreature->GetEntry()) + switch (pCreature->GetEntry()) { case NPC_BARON: case NPC_YSIDA_TRIGGER: @@ -93,13 +93,13 @@ void instance_stratholme::OnCreatureCreate(Creature* pCreature) void instance_stratholme::OnObjectCreate(GameObject* pGo) { - switch(pGo->GetEntry()) + switch (pGo->GetEntry()) { case GO_SERVICE_ENTRANCE: break; case GO_GAUNTLET_GATE1: // TODO - //weird, but unless flag is set, client will not respond as expected. DB bug? + // weird, but unless flag is set, client will not respond as expected. DB bug? pGo->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_LOCKED); break; @@ -152,10 +152,10 @@ void instance_stratholme::OnObjectCreate(GameObject* pGo) void instance_stratholme::SetData(uint32 uiType, uint32 uiData) { // TODO: Remove the hard-coded indexes from array accessing - switch(uiType) + switch (uiType) { case TYPE_BARON_RUN: - switch(uiData) + switch (uiData) { case IN_PROGRESS: if (m_auiEncounter[uiType] == IN_PROGRESS || m_auiEncounter[uiType] == FAIL) @@ -163,11 +163,11 @@ void instance_stratholme::SetData(uint32 uiType, uint32 uiData) DoOrSimulateScriptTextForThisInstance(SAY_ANNOUNCE_RUN_START, NPC_BARON); - m_uiBaronRunTimer = 45*MINUTE*IN_MILLISECONDS; + m_uiBaronRunTimer = 45 * MINUTE * IN_MILLISECONDS; debug_log("SD2: Instance Stratholme: Baron run in progress."); break; case FAIL: - //may add code to remove aura from players, but in theory the time should be up already and removed. + // may add code to remove aura from players, but in theory the time should be up already and removed. break; case DONE: m_uiBaronRunTimer = 0; @@ -197,7 +197,7 @@ void instance_stratholme::SetData(uint32 uiType, uint32 uiData) } uint32 uiCount = m_sAbomnationGUID.size(); - for(GuidSet::iterator itr = m_sAbomnationGUID.begin(); itr != m_sAbomnationGUID.end();) + for (GuidSet::iterator itr = m_sAbomnationGUID.begin(); itr != m_sAbomnationGUID.end();) { if (Creature* pAbom = instance->GetCreature(*itr)) { @@ -249,7 +249,7 @@ void instance_stratholme::SetData(uint32 uiType, uint32 uiData) // Summon 5 guards if (Creature* pBaron = GetSingleCreatureFromStorage(NPC_BARON)) { - for(uint8 i = 0; i < 5; ++i) + for (uint8 i = 0; i < 5; ++i) { float fX, fY, fZ; pBaron->GetRandomPoint(aStratholmeLocation[6].m_fX, aStratholmeLocation[6].m_fY, aStratholmeLocation[6].m_fZ, 5.0f, fX, fY, fZ); @@ -294,7 +294,7 @@ void instance_stratholme::SetData(uint32 uiType, uint32 uiData) { Map::PlayerList const& players = instance->GetPlayers(); - for(Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr) + for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr) { if (Player* pPlayer = itr->getSource()) { @@ -394,7 +394,7 @@ void instance_stratholme::SetData(uint32 uiType, uint32 uiData) std::ostringstream saveStream; saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2] << " " - << m_auiEncounter[3] << " " << m_auiEncounter[4] << " " << m_auiEncounter[5] << " " << m_auiEncounter[6]; + << m_auiEncounter[3] << " " << m_auiEncounter[4] << " " << m_auiEncounter[5] << " " << m_auiEncounter[6]; m_strInstData = saveStream.str(); @@ -415,7 +415,7 @@ void instance_stratholme::Load(const char* chrIn) std::istringstream loadStream(chrIn); loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3] - >> m_auiEncounter[4] >> m_auiEncounter[5] >> m_auiEncounter[6]; + >> m_auiEncounter[4] >> m_auiEncounter[5] >> m_auiEncounter[6]; for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) { @@ -436,7 +436,7 @@ void instance_stratholme::Load(const char* chrIn) uint32 instance_stratholme::GetData(uint32 uiType) { - switch(uiType) + switch (uiType) { case TYPE_BARON_RUN: case TYPE_BARONESS: @@ -483,7 +483,7 @@ void instance_stratholme::DoSortZiggurats() } // Sort Acolytes - for (std::list::iterator itr = lAcolytes.begin(); itr != lAcolytes.end(); ) + for (std::list::iterator itr = lAcolytes.begin(); itr != lAcolytes.end();) { bool bAlreadyIterated = false; for (uint8 i = 0; i < MAX_ZIGGURATS; ++i) @@ -509,7 +509,7 @@ void instance_stratholme::DoSortZiggurats() m_luiAcolyteGUIDs.push_back((*itr)->GetObjectGuid()); // Sort Crystal - for (GuidList::iterator itr = m_luiCrystalGUIDs.begin(); itr != m_luiCrystalGUIDs.end(); ) + for (GuidList::iterator itr = m_luiCrystalGUIDs.begin(); itr != m_luiCrystalGUIDs.end();) { Creature* pCrystal = instance->GetCreature(*itr); if (!pCrystal) @@ -546,7 +546,7 @@ void instance_stratholme::OnCreatureEnterCombat(Creature* pCreature) case NPC_MALEKI_THE_PALLID: SetData(TYPE_PALLID, IN_PROGRESS); break; case NPC_NERUBENKAN: SetData(TYPE_NERUB, IN_PROGRESS); break; case NPC_RAMSTEIN: SetData(TYPE_RAMSTEIN, IN_PROGRESS); break; - // TODO - uncomment when proper working within core! case NPC_BARON: SetData(TYPE_BARON, IN_PROGRESS); break; + // TODO - uncomment when proper working within core! case NPC_BARON: SetData(TYPE_BARON, IN_PROGRESS); break; case NPC_ABOM_BILE: case NPC_ABOM_VENOM: @@ -570,7 +570,7 @@ void instance_stratholme::OnCreatureEvade(Creature* pCreature) case NPC_MALEKI_THE_PALLID: SetData(TYPE_PALLID, FAIL); break; case NPC_NERUBENKAN: SetData(TYPE_NERUB, FAIL); break; case NPC_RAMSTEIN: SetData(TYPE_RAMSTEIN, FAIL); break; - // TODO - uncomment when proper working within core! case NPC_BARON: SetData(TYPE_BARON, FAIL); break; + // TODO - uncomment when proper working within core! case NPC_BARON: SetData(TYPE_BARON, FAIL); break; case NPC_ABOM_BILE: case NPC_ABOM_VENOM: @@ -629,7 +629,7 @@ void instance_stratholme::OnCreatureDeath(Creature* pCreature) break; - // Timmy spawn support + // Timmy spawn support case NPC_CRIMSON_INITIATE: case NPC_CRIMSON_GALLANT: case NPC_CRIMSON_GUARDSMAN: @@ -693,12 +693,12 @@ void instance_stratholme::Update(uint32 uiDiff) if (m_uiBaronRunTimer) { - if (m_uiYellCounter == 0 && m_uiBaronRunTimer <= 10*MINUTE*IN_MILLISECONDS) + if (m_uiYellCounter == 0 && m_uiBaronRunTimer <= 10 * MINUTE * IN_MILLISECONDS) { DoOrSimulateScriptTextForThisInstance(SAY_ANNOUNCE_RUN_10_MIN, NPC_BARON); ++m_uiYellCounter; } - else if (m_uiYellCounter == 1 && m_uiBaronRunTimer <= 5*MINUTE*IN_MILLISECONDS) + else if (m_uiYellCounter == 1 && m_uiBaronRunTimer <= 5 * MINUTE * IN_MILLISECONDS) { DoOrSimulateScriptTextForThisInstance(SAY_ANNOUNCE_RUN_5_MIN, NPC_BARON); ++m_uiYellCounter; diff --git a/scripts/eastern_kingdoms/stratholme/stratholme.cpp b/scripts/eastern_kingdoms/stratholme/stratholme.cpp index ab21843f2..b358e6e74 100644 --- a/scripts/eastern_kingdoms/stratholme/stratholme.cpp +++ b/scripts/eastern_kingdoms/stratholme/stratholme.cpp @@ -65,9 +65,9 @@ bool GOUse_go_gauntlet_gate(Player* pPlayer, GameObject* pGo) if (pInstance->GetData(TYPE_BARON_RUN) != NOT_STARTED) return false; - if (Group *pGroup = pPlayer->GetGroup()) + if (Group* pGroup = pPlayer->GetGroup()) { - for(GroupReference *itr = pGroup->GetFirstMember(); itr != NULL; itr = itr->next()) + for (GroupReference* itr = pGroup->GetFirstMember(); itr != NULL; itr = itr->next()) { Player* pGroupie = itr->getSource(); if (!pGroupie) @@ -176,7 +176,7 @@ struct MANGOS_DLL_DECL mob_restless_soulAI : public ScriptedAI { pSummoned->CastSpell(pSummoned, SPELL_SOUL_FREED, false); - switch(urand(0, 3)) + switch (urand(0, 3)) { case 0: DoScriptText(SAY_ZAPPED0, pSummoned); break; case 1: DoScriptText(SAY_ZAPPED1, pSummoned); break; @@ -245,7 +245,7 @@ struct MANGOS_DLL_DECL mobs_spectral_ghostly_citizenAI : public ScriptedAI { if (m_bIsTagged) { - for(uint32 i = 0; i < 4; ++i) + for (uint32 i = 0; i < 4; ++i) { float x, y, z; m_creature->GetRandomPoint(m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), 20.0f, x, y, z); @@ -278,7 +278,7 @@ struct MANGOS_DLL_DECL mobs_spectral_ghostly_citizenAI : public ScriptedAI void ReceiveEmote(Player* pPlayer, uint32 uiEmote) { - switch(uiEmote) + switch (uiEmote) { case TEXTEMOTE_DANCE: EnterEvadeMode(); diff --git a/scripts/eastern_kingdoms/stratholme/stratholme.h b/scripts/eastern_kingdoms/stratholme/stratholme.h index edf38f348..e449c5afa 100644 --- a/scripts/eastern_kingdoms/stratholme/stratholme.h +++ b/scripts/eastern_kingdoms/stratholme/stratholme.h @@ -137,7 +137,7 @@ class MANGOS_DLL_DECL instance_stratholme : public ScriptedInstance protected: bool StartSlaugtherSquare(); void DoSortZiggurats(); - void ThazudinAcolyteJustDied( Creature* pCreature ); + void ThazudinAcolyteJustDied(Creature* pCreature); uint32 m_auiEncounter[MAX_ENCOUNTER]; std::string m_strInstData; diff --git a/scripts/eastern_kingdoms/sunken_temple/instance_sunken_temple.cpp b/scripts/eastern_kingdoms/sunken_temple/instance_sunken_temple.cpp index 6aea1b4fc..a69bc51ea 100644 --- a/scripts/eastern_kingdoms/sunken_temple/instance_sunken_temple.cpp +++ b/scripts/eastern_kingdoms/sunken_temple/instance_sunken_temple.cpp @@ -43,7 +43,7 @@ void instance_sunken_temple::Initialize() void instance_sunken_temple::OnObjectCreate(GameObject* pGo) { - switch(pGo->GetEntry()) + switch (pGo->GetEntry()) { case GO_JAMMALAN_BARRIER: if (m_auiEncounter[TYPE_PROTECTORS] == DONE) @@ -75,7 +75,7 @@ void instance_sunken_temple::OnObjectCreate(GameObject* pGo) void instance_sunken_temple::OnCreatureCreate(Creature* pCreature) { - switch(pCreature->GetEntry()) + switch (pCreature->GetEntry()) { case NPC_ZOLO: case NPC_GASHER: @@ -96,7 +96,7 @@ void instance_sunken_temple::OnCreatureEvade(Creature* pCreature) { switch (pCreature->GetEntry()) { - // Hakkar Event Mobs: On Wipe set as failed! + // Hakkar Event Mobs: On Wipe set as failed! case NPC_BLOODKEEPER: case NPC_HAKKARI_MINION: case NPC_SUPPRESSOR: @@ -118,7 +118,7 @@ void instance_sunken_temple::OnCreatureDeath(Creature* pCreature) m_bCanSummonBloodkeeper = true; break; - // Jammalain mini-bosses + // Jammalain mini-bosses case NPC_ZOLO: case NPC_GASHER: case NPC_LORO: @@ -132,7 +132,7 @@ void instance_sunken_temple::OnCreatureDeath(Creature* pCreature) void instance_sunken_temple::SetData(uint32 uiType, uint32 uiData) { - switch(uiType) + switch (uiType) { case TYPE_ATALARION: if (uiData == SPECIAL) @@ -166,12 +166,12 @@ void instance_sunken_temple::SetData(uint32 uiType, uint32 uiData) switch (m_uiFlameCounter) { - // Yells on each flame - // TODO It might be possible that these yells should be ordered randomly, however this is the seen state + // Yells on each flame + // TODO It might be possible that these yells should be ordered randomly, however this is the seen state case 1: DoScriptText(SAY_AVATAR_BRAZIER_1, pShade); break; case 2: DoScriptText(SAY_AVATAR_BRAZIER_2, pShade); break; case 3: DoScriptText(SAY_AVATAR_BRAZIER_3, pShade); break; - // Summon the avatar of all flames are used + // Summon the avatar of all flames are used case MAX_FLAMES: DoScriptText(SAY_AVATAR_BRAZIER_4, pShade); pShade->CastSpell(pShade, SPELL_SUMMON_AVATAR, true); @@ -214,7 +214,7 @@ void instance_sunken_temple::SetData(uint32 uiType, uint32 uiData) // Respawn circles for (GuidVector::const_iterator itr = m_vuiCircleGUIDs.begin(); itr != m_vuiCircleGUIDs.end(); ++itr) - DoRespawnGameObject(*itr, 30*MINUTE); + DoRespawnGameObject(*itr, 30 * MINUTE); } else if (uiData == FAIL) { @@ -271,7 +271,7 @@ void instance_sunken_temple::DoSpawnAtalarionIfCan() // Spawn the big green lights for (GuidList::const_iterator itr = m_luiBigLightGUIDs.begin(); itr != m_luiBigLightGUIDs.end(); ++itr) - DoRespawnGameObject(*itr, 30*MINUTE); + DoRespawnGameObject(*itr, 30 * MINUTE); } bool instance_sunken_temple::ProcessStatueEvent(uint32 uiEventId) @@ -320,7 +320,7 @@ void instance_sunken_temple::Load(const char* chrIn) std::istringstream loadStream(chrIn); loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3] >> m_auiEncounter[4]; - for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) + for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) { // Here a bit custom, to have proper mechanics for the statue events if (m_auiEncounter[i] != DONE) diff --git a/scripts/eastern_kingdoms/sunken_temple/sunken_temple.cpp b/scripts/eastern_kingdoms/sunken_temple/sunken_temple.cpp index 2784307b7..78489892e 100644 --- a/scripts/eastern_kingdoms/sunken_temple/sunken_temple.cpp +++ b/scripts/eastern_kingdoms/sunken_temple/sunken_temple.cpp @@ -45,8 +45,8 @@ bool AreaTrigger_at_shade_of_eranikus(Player* pPlayer, AreaTriggerEntry const* p { // Only do stuff, if the player has finished the PreQuest if (pPlayer->GetQuestRewardStatus(QUEST_THE_CHARGE_OF_DRAGONFLIGHTS) && - !pPlayer->GetQuestRewardStatus(QUEST_ERANIKUS_TYRANT_OF_DREAMS) && - pPlayer->GetQuestStatus(QUEST_ERANIKUS_TYRANT_OF_DREAMS) != QUEST_STATUS_COMPLETE) + !pPlayer->GetQuestRewardStatus(QUEST_ERANIKUS_TYRANT_OF_DREAMS) && + pPlayer->GetQuestStatus(QUEST_ERANIKUS_TYRANT_OF_DREAMS) != QUEST_STATUS_COMPLETE) { if (pInstance->GetData(TYPE_MALFURION) != DONE) { diff --git a/scripts/eastern_kingdoms/sunken_temple/sunken_temple.h b/scripts/eastern_kingdoms/sunken_temple/sunken_temple.h index 23609d17b..2e017ad4b 100644 --- a/scripts/eastern_kingdoms/sunken_temple/sunken_temple.h +++ b/scripts/eastern_kingdoms/sunken_temple/sunken_temple.h @@ -90,16 +90,16 @@ struct SummonLocations static const SummonLocations aSunkenTempleLocation[] = { - {-466.5130f, 95.19820f, -189.646f, 0.0349f}, // Atalarion summon loc - {-466.8673f,272.31204f, -90.7441f, 3.5255f}, // Shade of hakkar summon loc - {-660.5277f, -16.7117f, -90.8357f, 1.6055f} // Malfurion summon loc + { -466.5130f, 95.19820f, -189.646f, 0.0349f}, // Atalarion summon loc + { -466.8673f, 272.31204f, -90.7441f, 3.5255f}, // Shade of hakkar summon loc + { -660.5277f, -16.7117f, -90.8357f, 1.6055f} // Malfurion summon loc }; // Summon location for the suppressors static const SummonLocations aHakkariDoorLocations[2] = { - {-420.629f, 276.682f, -90.827f}, - {-512.015f, 276.134f, -90.827f} + { -420.629f, 276.682f, -90.827f}, + { -512.015f, 276.134f, -90.827f} }; class MANGOS_DLL_DECL instance_sunken_temple : public ScriptedInstance diff --git a/scripts/eastern_kingdoms/sunwell_plateau/boss_brutallus.cpp b/scripts/eastern_kingdoms/sunwell_plateau/boss_brutallus.cpp index a52d1d81f..939974b1f 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/boss_brutallus.cpp +++ b/scripts/eastern_kingdoms/sunwell_plateau/boss_brutallus.cpp @@ -124,7 +124,7 @@ struct MANGOS_DLL_DECL boss_brutallusAI : public ScriptedAI, private DialogueHel m_uiSlashTimer = 11000; m_uiStompTimer = 30000; m_uiBurnTimer = 20000; - m_uiBerserkTimer = 6*MINUTE*IN_MILLISECONDS; + m_uiBerserkTimer = 6 * MINUTE * IN_MILLISECONDS; m_uiLoveTimer = urand(10000, 17000); m_uiMadrigosaSpellTimer = 0; @@ -151,7 +151,7 @@ struct MANGOS_DLL_DECL boss_brutallusAI : public ScriptedAI, private DialogueHel if (pVictim->GetEntry() == NPC_MADRIGOSA) return; - switch(urand(0, 2)) + switch (urand(0, 2)) { case 0: DoScriptText(YELL_KILL1, m_creature); break; case 1: DoScriptText(YELL_KILL2, m_creature); break; @@ -389,7 +389,7 @@ struct MANGOS_DLL_DECL boss_brutallusAI : public ScriptedAI, private DialogueHel if (m_uiLoveTimer < uiDiff) { - switch(urand(0, 2)) + switch (urand(0, 2)) { case 0: DoScriptText(YELL_LOVE1, m_creature); break; case 1: DoScriptText(YELL_LOVE2, m_creature); break; @@ -474,8 +474,8 @@ bool AreaTrigger_at_madrigosa(Player* pPlayer, AreaTriggerEntry const* pAt) { if (ScriptedInstance* pInstance = (ScriptedInstance*)pPlayer->GetInstanceData()) { - //this simply set encounter state, and trigger ice barrier become active - //bosses can start pre-event based on this new state + // this simply set encounter state, and trigger ice barrier become active + // bosses can start pre-event based on this new state if (pInstance->GetData(TYPE_BRUTALLUS) == NOT_STARTED) { pInstance->SetData(TYPE_BRUTALLUS, SPECIAL); diff --git a/scripts/eastern_kingdoms/sunwell_plateau/boss_eredar_twins.cpp b/scripts/eastern_kingdoms/sunwell_plateau/boss_eredar_twins.cpp index 5b5987f86..5086596f4 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/boss_eredar_twins.cpp +++ b/scripts/eastern_kingdoms/sunwell_plateau/boss_eredar_twins.cpp @@ -112,7 +112,7 @@ struct MANGOS_DLL_DECL boss_alythessAI : public ScriptedAI void Reset() { - m_uiEnrageTimer = 6*MINUTE*IN_MILLISECONDS; + m_uiEnrageTimer = 6 * MINUTE * IN_MILLISECONDS; m_uiPyrogenicsTimer = 20000; m_uiFlameTouchedTimer = 30000; m_uiConflagrationTimer = urand(25000, 30000); @@ -207,7 +207,7 @@ struct MANGOS_DLL_DECL boss_alythessAI : public ScriptedAI if (DoCastSpellIfCan(m_creature, SPELL_TWINS_ENRAGE) == CAST_OK) { DoScriptText(SAY_ALYTHESS_BERSERK, m_creature); - m_uiEnrageTimer = 6*MINUTE*IN_MILLISECONDS; + m_uiEnrageTimer = 6 * MINUTE * IN_MILLISECONDS; } } else @@ -287,7 +287,7 @@ struct MANGOS_DLL_DECL boss_sacrolashAI : public ScriptedAI void Reset() { - m_uiEnrageTimer = 6*MINUTE*IN_MILLISECONDS; + m_uiEnrageTimer = 6 * MINUTE * IN_MILLISECONDS; m_uiDarkTouchedTimer = 30000; m_uiShadowNovaTimer = 15000; m_uiConfoundingBlowTimer = 30000; @@ -354,7 +354,7 @@ struct MANGOS_DLL_DECL boss_sacrolashAI : public ScriptedAI std::vector m_vRangeTargets; ThreatList const& tList = m_creature->getThreatManager().getThreatList(); - for (ThreatList::const_iterator iter = tList.begin();iter != tList.end(); ++iter) + for (ThreatList::const_iterator iter = tList.begin(); iter != tList.end(); ++iter) { if (Unit* pTempTarget = m_creature->GetMap()->GetUnit((*iter)->getUnitGuid())) { @@ -390,7 +390,7 @@ struct MANGOS_DLL_DECL boss_sacrolashAI : public ScriptedAI if (DoCastSpellIfCan(m_creature, SPELL_TWINS_ENRAGE) == CAST_OK) { DoScriptText(SAY_SACROLASH_BERSERK, m_creature); - m_uiEnrageTimer = 6*MINUTE*IN_MILLISECONDS; + m_uiEnrageTimer = 6 * MINUTE * IN_MILLISECONDS; } } else @@ -450,7 +450,7 @@ struct MANGOS_DLL_DECL boss_sacrolashAI : public ScriptedAI if (m_uiSummonShadowImage < uiDiff) { // Summon 3 shadow images at the boss position - for(uint8 i = 0; i < 3; ++i) + for (uint8 i = 0; i < 3; ++i) m_creature->SummonCreature(NPC_SHADOW_IMAGE, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 3000); m_uiSummonShadowImage = urand(10000, 12000); @@ -547,17 +547,17 @@ struct MANGOS_DLL_DECL npc_shadow_imageAI : public ScriptedAI CreatureAI* GetAI_boss_alythess(Creature* pCreature) { - return new boss_alythessAI (pCreature); + return new boss_alythessAI(pCreature); } CreatureAI* GetAI_boss_sacrolash(Creature* pCreature) { - return new boss_sacrolashAI (pCreature); + return new boss_sacrolashAI(pCreature); } CreatureAI* GetAI_npc_shadow_image(Creature* pCreature) { - return new npc_shadow_imageAI (pCreature); + return new npc_shadow_imageAI(pCreature); } void AddSC_boss_eredar_twins() diff --git a/scripts/eastern_kingdoms/sunwell_plateau/boss_felmyst.cpp b/scripts/eastern_kingdoms/sunwell_plateau/boss_felmyst.cpp index b3ce4619b..a2eeb2c2a 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/boss_felmyst.cpp +++ b/scripts/eastern_kingdoms/sunwell_plateau/boss_felmyst.cpp @@ -93,7 +93,7 @@ struct MANGOS_DLL_DECL boss_felmystAI : public ScriptedAI DoCastSpellIfCan(m_creature, SPELL_FELBLAZE_VISUAL); m_uiPhase = PHASE_GROUND; - m_uiBerserkTimer = 10*MINUTE*IN_MILLISECONDS; + m_uiBerserkTimer = 10 * MINUTE * IN_MILLISECONDS; // Ground Phase m_uiCorrosionTimer = 30000; diff --git a/scripts/eastern_kingdoms/sunwell_plateau/boss_kalecgos.cpp b/scripts/eastern_kingdoms/sunwell_plateau/boss_kalecgos.cpp index 9eaa506b2..ca9bf6abc 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/boss_kalecgos.cpp +++ b/scripts/eastern_kingdoms/sunwell_plateau/boss_kalecgos.cpp @@ -26,7 +26,7 @@ EndScriptData */ enum { - //kalecgos dragon form + // kalecgos dragon form SAY_EVIL_AGGRO = -1580000, SAY_EVIL_SPELL_1 = -1580001, SAY_EVIL_SPELL_2 = -1580002, @@ -34,7 +34,7 @@ enum SAY_EVIL_SLAY_2 = -1580004, SAY_EVIL_ENRAGE = -1580005, - //kalecgos humanoid form + // kalecgos humanoid form SAY_GOOD_AGGRO = -1580006, SAY_GOOD_NEAR_DEATH_20 = -1580007, SAY_GOOD_NEAR_DEATH_10 = -1580008, @@ -48,7 +48,7 @@ enum SAY_SATH_SLAY_2 = -1580015, SAY_SATH_ENRAGE = -1580016, - //Kalecgos + // Kalecgos SPELL_SPECTRAL_BLAST = 44869, SPELL_SPECTRAL_REALM_EJECT = 44845, // pull the players ouside the spectral realm in case of wipe SPELL_ARCANE_BUFFET = 45018, @@ -60,7 +60,7 @@ enum SPELL_HEROIC_STRIKE = 45026, SPELL_REVITALIZE = 45027, - //Sathrovarr + // Sathrovarr SPELL_SPECTRAL_INVISIBILITY = 44801, SPELL_CORRUPTING_STRIKE = 45029, SPELL_CURSE_OF_BOUNDLESS_AGONY = 45032, @@ -70,11 +70,11 @@ enum SPELL_SPECTRAL_REALM_AURA = 46021, SPELL_SPECTRAL_EXHAUSTION = 44867, - //Misc + // Misc SPELL_BANISH = 44836 }; -static const uint32 aWildMagicSpells[6]= {44978, 45001, 45002, 45004, 45006, 45010}; +static const uint32 aWildMagicSpells[6] = {44978, 45001, 45002, 45004, 45006, 45010}; struct MANGOS_DLL_DECL boss_kalecgosAI : public ScriptedAI { @@ -147,7 +147,7 @@ struct MANGOS_DLL_DECL boss_kalecgosAI : public ScriptedAI m_pInstance->SetData(TYPE_KALECGOS, IN_PROGRESS); } - void DamageTaken(Unit* pDoneBy, uint32 &uiDamage) + void DamageTaken(Unit* pDoneBy, uint32& uiDamage) { if (uiDamage > m_creature->GetHealth()) { @@ -349,7 +349,7 @@ struct MANGOS_DLL_DECL boss_sathrovarrAI : public ScriptedAI pKalec->AI()->AttackStart(m_creature); } - void DamageTaken(Unit* pDoneBy, uint32 &uiDamage) + void DamageTaken(Unit* pDoneBy, uint32& uiDamage) { if (uiDamage > m_creature->GetHealth()) { @@ -484,7 +484,7 @@ struct MANGOS_DLL_DECL boss_kalecgos_humanoidAI : public ScriptedAI void Reset() { - //TODO: Times! + // TODO: Times! m_uiRevitalizeTimer = 30000; m_uiHeroicStrikeTimer = 8000; diff --git a/scripts/eastern_kingdoms/sunwell_plateau/boss_kiljaeden.cpp b/scripts/eastern_kingdoms/sunwell_plateau/boss_kiljaeden.cpp index 4573d49a5..86dc36118 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/boss_kiljaeden.cpp +++ b/scripts/eastern_kingdoms/sunwell_plateau/boss_kiljaeden.cpp @@ -139,13 +139,13 @@ static const DialogueEntry aPhaseDialogue[] = {SAY_KALECGOS_AWAKE_1, NPC_KALECGOS, 6000}, {SAY_ANVEENA_IMPRISONED, NPC_ANVEENA, 5000}, {SAY_PHASE_3, NPC_KILJAEDEN, 6000}, - {SAY_KALECGOS_ORB_1, NPC_KALECGOS, 0}, // phase 2 transition end + {SAY_KALECGOS_ORB_1, NPC_KALECGOS, 0}, // phase 2 transition end {PHASE_ARMAGEDDON, 0, 2000}, {EVENT_SWITCH_PHASE_3, 0, 14000}, {SAY_KALECGOS_AWAKE_2, NPC_KALECGOS, 7000}, {SAY_ANVEENA_LOST, NPC_ANVEENA, 7000}, {SAY_PHASE_4, NPC_KILJAEDEN, 6000}, - {EVENT_DRAGON_ORB, 0, 0}, // phase 3 transition end + {EVENT_DRAGON_ORB, 0, 0}, // phase 3 transition end {PHASE_SACRIFICE, 0, 2000}, {EVENT_SWITCH_PHASE_4, 0, 5000}, {SAY_KALECGOS_AWAKE_4, NPC_KALECGOS, 10000}, @@ -154,7 +154,7 @@ static const DialogueEntry aPhaseDialogue[] = {SAY_ANVEENA_SACRIFICE, NPC_ANVEENA, 5000}, {SAY_PHASE_5, NPC_KILJAEDEN, 13000}, {SAY_KALECGOS_ORB_4, NPC_KALECGOS, 5000}, - {SAY_KALECGOS_ENCOURAGE, NPC_KALECGOS, 0}, // phase 4 transition end + {SAY_KALECGOS_ENCOURAGE, NPC_KALECGOS, 0}, // phase 4 transition end {0, 0, 0}, }; @@ -251,7 +251,7 @@ struct MANGOS_DLL_DECL npc_kiljaeden_controllerAI : public Scripted_NoMovementAI m_creature->SummonCreature(NPC_VELEN, aOutroLocations[1].m_fX, aOutroLocations[1].m_fY, aOutroLocations[1].m_fZ, aOutroLocations[1].m_fO, TEMPSUMMON_CORPSE_DESPAWN, 0); break; case NPC_LIADRIN: - m_creature->SummonCreature(NPC_LIADRIN, aOutroLocations[2].m_fX, aOutroLocations[2].m_fY, aOutroLocations[2].m_fZ, aOutroLocations[2].m_fO, TEMPSUMMON_TIMED_DESPAWN, 4*MINUTE*IN_MILLISECONDS); + m_creature->SummonCreature(NPC_LIADRIN, aOutroLocations[2].m_fX, aOutroLocations[2].m_fY, aOutroLocations[2].m_fZ, aOutroLocations[2].m_fO, TEMPSUMMON_TIMED_DESPAWN, 4 * MINUTE * IN_MILLISECONDS); break; case SPELL_CALL_ENTROPIUS: if (Creature* pVelen = m_pInstance->GetSingleCreatureFromStorage(NPC_VELEN)) @@ -286,7 +286,7 @@ struct MANGOS_DLL_DECL npc_kiljaeden_controllerAI : public Scripted_NoMovementAI void JustSummoned(Creature* pSummoned) { - switch(pSummoned->GetEntry()) + switch (pSummoned->GetEntry()) { case NPC_VELEN: pSummoned->GetMotionMaster()->MovePoint(0, aOutroLocations[3].m_fX, aOutroLocations[3].m_fY, aOutroLocations[3].m_fZ); @@ -455,10 +455,10 @@ struct MANGOS_DLL_DECL boss_kiljaedenAI : public Scripted_NoMovementAI, private // Start the movement of the shadow orb - calculate new position based on the angle between the boss and orb float fX, fY, fAng; - fAng = m_creature->GetAngle(pSummoned) + M_PI_F/8; + fAng = m_creature->GetAngle(pSummoned) + M_PI_F / 8; // Normalize angle - if (fAng > 2*M_PI_F) - fAng = fAng - 2*M_PI_F; + if (fAng > 2 * M_PI_F) + fAng = fAng - 2 * M_PI_F; m_creature->GetNearPoint2D(fX, fY, 25.0f, fAng); @@ -664,7 +664,7 @@ struct MANGOS_DLL_DECL boss_kiljaedenAI : public Scripted_NoMovementAI, private { // Get some random coords for the Orb float fX, fY, fZ; - m_creature->GetNearPoint2D(fX, fY, 25.0f, frand(0, 2*M_PI_F)); + m_creature->GetNearPoint2D(fX, fY, 25.0f, frand(0, 2 * M_PI_F)); fZ = frand(35.0f, 45.0f); m_creature->SummonCreature(NPC_SHIELD_ORB, fX, fY, fZ, 0, TEMPSUMMON_CORPSE_DESPAWN, 0); @@ -733,10 +733,10 @@ struct MANGOS_DLL_DECL npc_shield_orbAI : public ScriptedAI { // Calculate new position based on the angle between the boss and self float fX, fY, fAng; - fAng = pSummoner->GetAngle(m_creature) + M_PI_F/8; + fAng = pSummoner->GetAngle(m_creature) + M_PI_F / 8; // Normalize angle - if (fAng > 2*M_PI_F) - fAng = fAng - 2*M_PI_F; + if (fAng > 2 * M_PI_F) + fAng = fAng - 2 * M_PI_F; pSummoner->GetNearPoint2D(fX, fY, 25.0f, fAng); @@ -751,17 +751,17 @@ struct MANGOS_DLL_DECL npc_shield_orbAI : public ScriptedAI void UpdateAI(const uint32 uiDiff) { } }; -CreatureAI* GetAI_boss_kiljaeden(Creature *pCreature) +CreatureAI* GetAI_boss_kiljaeden(Creature* pCreature) { return new boss_kiljaedenAI(pCreature); } -CreatureAI* GetAI_npc_kiljaeden_controller(Creature *pCreature) +CreatureAI* GetAI_npc_kiljaeden_controller(Creature* pCreature) { return new npc_kiljaeden_controllerAI(pCreature); } -CreatureAI* GetAI_npc_shield_orb(Creature *pCreature) +CreatureAI* GetAI_npc_shield_orb(Creature* pCreature) { return new npc_shield_orbAI(pCreature); } @@ -771,18 +771,18 @@ void AddSC_boss_kiljaeden() Script* pNewScript; pNewScript = new Script; - pNewScript->Name="boss_kiljaeden"; + pNewScript->Name = "boss_kiljaeden"; pNewScript->GetAI = &GetAI_boss_kiljaeden; pNewScript->pEffectAuraDummy = &EffectAuraDummy_spell_aura_dummy_darkness_of_souls; pNewScript->RegisterSelf(); pNewScript = new Script; - pNewScript->Name="npc_kiljaeden_controller"; + pNewScript->Name = "npc_kiljaeden_controller"; pNewScript->GetAI = &GetAI_npc_kiljaeden_controller; pNewScript->RegisterSelf(); pNewScript = new Script; - pNewScript->Name="npc_shield_orb"; + pNewScript->Name = "npc_shield_orb"; pNewScript->GetAI = &GetAI_npc_shield_orb; pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/sunwell_plateau/boss_muru.cpp b/scripts/eastern_kingdoms/sunwell_plateau/boss_muru.cpp index 7960938db..845e71f9d 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/boss_muru.cpp +++ b/scripts/eastern_kingdoms/sunwell_plateau/boss_muru.cpp @@ -85,10 +85,10 @@ struct MANGOS_DLL_DECL boss_muruAI : public Scripted_NoMovementAI void Reset() { - m_uiDarknessTimer = 45000; - m_uiSummonHumanoidsTimer = 15000; - m_uiDarkFiendsTimer = 0; - m_bIsTransition = false; + m_uiDarknessTimer = 45000; + m_uiSummonHumanoidsTimer = 15000; + m_uiDarkFiendsTimer = 0; + m_bIsTransition = false; } void Aggro(Unit* pWho) @@ -106,7 +106,7 @@ struct MANGOS_DLL_DECL boss_muruAI : public Scripted_NoMovementAI m_pInstance->SetData(TYPE_MURU, FAIL); } - void DamageTaken(Unit* pDoneBy, uint32 &uiDamage) + void DamageTaken(Unit* pDoneBy, uint32& uiDamage) { if (uiDamage > m_creature->GetHealth()) { @@ -202,7 +202,7 @@ struct MANGOS_DLL_DECL boss_muruAI : public Scripted_NoMovementAI if (m_uiSummonHumanoidsTimer < uiDiff) { DoSummonHumanoids(); - m_uiSummonHumanoidsTimer = 1*MINUTE*IN_MILLISECONDS; + m_uiSummonHumanoidsTimer = 1 * MINUTE * IN_MILLISECONDS; } else m_uiSummonHumanoidsTimer -= uiDiff; @@ -342,11 +342,11 @@ struct MANGOS_DLL_DECL npc_portal_targetAI : public Scripted_NoMovementAI // They could use the EffectDummyCreature to handle this, but this makes code easier switch (pSpell->Id) { - // Init sentinel summon timer + // Init sentinel summon timer case SPELL_OPEN_PORTAL: m_uiSentinelTimer = 5000; break; - // Start transition effect + // Start transition effect case SPELL_OPEN_ALL_PORTALS: m_uiTransformTimer = 2000; break; @@ -384,7 +384,7 @@ struct MANGOS_DLL_DECL npc_portal_targetAI : public Scripted_NoMovementAI } // Summon Entropius when reached half of the transition - if (m_uiTransformCount == MAX_TRANSFORM_CASTS/2) + if (m_uiTransformCount == MAX_TRANSFORM_CASTS / 2) { if (Creature* pMuru = m_pInstance->GetSingleCreatureFromStorage(NPC_MURU)) pMuru->CastSpell(pMuru, SPELL_SUMMON_ENTROPIUS, false); @@ -424,22 +424,22 @@ struct MANGOS_DLL_DECL npc_void_sentinel_summonerAI : public Scripted_NoMovement void UpdateAI(const uint32 uiDiff) { } }; -CreatureAI* GetAI_boss_muru(Creature *pCreature) +CreatureAI* GetAI_boss_muru(Creature* pCreature) { return new boss_muruAI(pCreature); } -CreatureAI* GetAI_boss_entropius(Creature *pCreature) +CreatureAI* GetAI_boss_entropius(Creature* pCreature) { return new boss_entropiusAI(pCreature); } -CreatureAI* GetAI_npc_portal_target(Creature *pCreature) +CreatureAI* GetAI_npc_portal_target(Creature* pCreature) { return new npc_portal_targetAI(pCreature); } -CreatureAI* GetAI_npc_void_sentinel_summoner(Creature *pCreature) +CreatureAI* GetAI_npc_void_sentinel_summoner(Creature* pCreature) { return new npc_void_sentinel_summonerAI(pCreature); } @@ -449,22 +449,22 @@ void AddSC_boss_muru() Script* pNewScript; pNewScript = new Script; - pNewScript->Name="boss_muru"; + pNewScript->Name = "boss_muru"; pNewScript->GetAI = &GetAI_boss_muru; pNewScript->RegisterSelf(); pNewScript = new Script; - pNewScript->Name="boss_entropius"; + pNewScript->Name = "boss_entropius"; pNewScript->GetAI = &GetAI_boss_entropius; pNewScript->RegisterSelf(); pNewScript = new Script; - pNewScript->Name="npc_portal_target"; + pNewScript->Name = "npc_portal_target"; pNewScript->GetAI = &GetAI_npc_portal_target; pNewScript->RegisterSelf(); pNewScript = new Script; - pNewScript->Name="npc_void_sentinel_summoner"; + pNewScript->Name = "npc_void_sentinel_summoner"; pNewScript->GetAI = &GetAI_npc_void_sentinel_summoner; pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/sunwell_plateau/instance_sunwell_plateau.cpp b/scripts/eastern_kingdoms/sunwell_plateau/instance_sunwell_plateau.cpp index bcfcc4e6d..96d03e475 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/instance_sunwell_plateau.cpp +++ b/scripts/eastern_kingdoms/sunwell_plateau/instance_sunwell_plateau.cpp @@ -59,7 +59,7 @@ void instance_sunwell_plateau::Initialize() bool instance_sunwell_plateau::IsEncounterInProgress() const { - for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) + for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) { if (m_auiEncounter[i] == IN_PROGRESS) return true; @@ -84,7 +84,7 @@ void instance_sunwell_plateau::OnPlayerEnter(Player* pPlayer) void instance_sunwell_plateau::OnCreatureCreate(Creature* pCreature) { - switch(pCreature->GetEntry()) + switch (pCreature->GetEntry()) { case NPC_KALECGOS_DRAGON: case NPC_KALECGOS_HUMAN: @@ -139,7 +139,7 @@ void instance_sunwell_plateau::OnCreatureEvade(Creature* pCreature) void instance_sunwell_plateau::OnObjectCreate(GameObject* pGo) { - switch(pGo->GetEntry()) + switch (pGo->GetEntry()) { case GO_FORCEFIELD: case GO_BOSS_COLLISION_1: @@ -182,7 +182,7 @@ void instance_sunwell_plateau::OnObjectCreate(GameObject* pGo) void instance_sunwell_plateau::SetData(uint32 uiType, uint32 uiData) { - switch(uiType) + switch (uiType) { case TYPE_KALECGOS: m_auiEncounter[uiType] = uiData; @@ -235,7 +235,7 @@ void instance_sunwell_plateau::SetData(uint32 uiType, uint32 uiData) DoUseDoorOrButton(GO_THIRD_GATE); } else if (uiData == IN_PROGRESS) - m_uiMuruBerserkTimer = 10*MINUTE*IN_MILLISECONDS; + m_uiMuruBerserkTimer = 10 * MINUTE * IN_MILLISECONDS; break; case TYPE_KILJAEDEN: m_auiEncounter[uiType] = uiData; @@ -268,7 +268,7 @@ void instance_sunwell_plateau::SetData(uint32 uiType, uint32 uiData) std::ostringstream saveStream; saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2] << " " - << m_auiEncounter[3] << " " << m_auiEncounter[4] << " " << m_auiEncounter[5]; + << m_auiEncounter[3] << " " << m_auiEncounter[4] << " " << m_auiEncounter[5]; m_strInstData = saveStream.str(); @@ -313,7 +313,7 @@ void instance_sunwell_plateau::Update(uint32 uiDiff) else if (Creature* pMuru = GetSingleCreatureFromStorage(NPC_MURU)) pMuru->CastSpell(pMuru, SPELL_MURU_BERSERK, true); - m_uiMuruBerserkTimer = 10*MINUTE*IN_MILLISECONDS; + m_uiMuruBerserkTimer = 10 * MINUTE * IN_MILLISECONDS; } else m_uiMuruBerserkTimer -= uiDiff; @@ -353,9 +353,9 @@ void instance_sunwell_plateau::Load(const char* in) std::istringstream loadStream(in); loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> - m_auiEncounter[3] >> m_auiEncounter[4] >> m_auiEncounter[5]; + m_auiEncounter[3] >> m_auiEncounter[4] >> m_auiEncounter[5]; - for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) + for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) { if (m_auiEncounter[i] == IN_PROGRESS) m_auiEncounter[i] = NOT_STARTED; @@ -371,7 +371,7 @@ void instance_sunwell_plateau::JustDidDialogueStep(int32 iEntry) case NPC_KALECGOS: if (Creature* pTrigger = GetSingleCreatureFromStorage(NPC_FLIGHT_TRIGGER_LEFT)) { - if (Creature* pKalec = pTrigger->SummonCreature(NPC_KALECGOS, pTrigger->GetPositionX(), pTrigger->GetPositionY(), pTrigger->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN, 1*MINUTE*IN_MILLISECONDS)) + if (Creature* pKalec = pTrigger->SummonCreature(NPC_KALECGOS, pTrigger->GetPositionX(), pTrigger->GetPositionY(), pTrigger->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN, 1 * MINUTE * IN_MILLISECONDS)) { pKalec->SetWalk(false); pKalec->SetLevitate(true); diff --git a/scripts/eastern_kingdoms/swamp_of_sorrows.cpp b/scripts/eastern_kingdoms/swamp_of_sorrows.cpp index 6c01a1e9a..8b182fa09 100644 --- a/scripts/eastern_kingdoms/swamp_of_sorrows.cpp +++ b/scripts/eastern_kingdoms/swamp_of_sorrows.cpp @@ -70,20 +70,20 @@ struct MANGOS_DLL_DECL npc_galen_goodwardAI : public npc_escortAI switch (uiPointId) { case 0: + { + GameObject* pCage = NULL; + if (m_galensCageGuid) + pCage = m_creature->GetMap()->GetGameObject(m_galensCageGuid); + else + pCage = GetClosestGameObjectWithEntry(m_creature, GO_GALENS_CAGE, INTERACTION_DISTANCE); + + if (pCage) { - GameObject* pCage = NULL; - if (m_galensCageGuid) - pCage = m_creature->GetMap()->GetGameObject(m_galensCageGuid); - else - pCage = GetClosestGameObjectWithEntry(m_creature, GO_GALENS_CAGE, INTERACTION_DISTANCE); - - if (pCage) - { - pCage->UseDoorOrButton(); - m_galensCageGuid = pCage->GetObjectGuid(); - } - break; + pCage->UseDoorOrButton(); + m_galensCageGuid = pCage->GetObjectGuid(); } + break; + } case 21: DoScriptText(EMOTE_DISAPPEAR, m_creature); break; diff --git a/scripts/eastern_kingdoms/tirisfal_glades.cpp b/scripts/eastern_kingdoms/tirisfal_glades.cpp index cff10fbd4..38d195909 100644 --- a/scripts/eastern_kingdoms/tirisfal_glades.cpp +++ b/scripts/eastern_kingdoms/tirisfal_glades.cpp @@ -65,7 +65,7 @@ bool GOUse_go_mausoleum_trigger(Player* pPlayer, GameObject* pGo) if (GameObject* pDoor = GetClosestGameObjectWithEntry(pPlayer, GO_DOOR, 30.0f)) { pGo->SetGoState(GO_STATE_ACTIVE); - pDoor->RemoveFlag(GAMEOBJECT_FLAGS,GO_FLAG_INTERACT_COND); + pDoor->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_INTERACT_COND); return true; } @@ -115,9 +115,9 @@ struct MANGOS_DLL_DECL npc_calvin_montagueAI : public ScriptedAI AttackStart(pAttacker); } - void DamageTaken(Unit* pDoneBy, uint32 &uiDamage) + void DamageTaken(Unit* pDoneBy, uint32& uiDamage) { - if (uiDamage > m_creature->GetHealth() || ((m_creature->GetHealth() - uiDamage)*100 / m_creature->GetMaxHealth() < 15)) + if (uiDamage > m_creature->GetHealth() || ((m_creature->GetHealth() - uiDamage) * 100 / m_creature->GetMaxHealth() < 15)) { uiDamage = 0; @@ -143,7 +143,7 @@ struct MANGOS_DLL_DECL npc_calvin_montagueAI : public ScriptedAI return; } - switch(m_uiPhase) + switch (m_uiPhase) { case 1: DoScriptText(SAY_COMPLETE, m_creature); @@ -153,7 +153,7 @@ struct MANGOS_DLL_DECL npc_calvin_montagueAI : public ScriptedAI if (Player* pPlayer = m_creature->GetMap()->GetPlayer(m_playerGuid)) pPlayer->AreaExploredOrEventHappens(QUEST_590); - m_creature->CastSpell(m_creature,SPELL_DRINK,true); + m_creature->CastSpell(m_creature, SPELL_DRINK, true); ++m_uiPhase; break; case 3: diff --git a/scripts/eastern_kingdoms/uldaman/boss_archaedas.cpp b/scripts/eastern_kingdoms/uldaman/boss_archaedas.cpp index e80356294..9a8b150e0 100644 --- a/scripts/eastern_kingdoms/uldaman/boss_archaedas.cpp +++ b/scripts/eastern_kingdoms/uldaman/boss_archaedas.cpp @@ -122,13 +122,13 @@ struct MANGOS_DLL_DECL boss_archaedasAI : public ScriptedAI { if (m_uiAwakeningTimer <= uiDiff) { - switch(m_uiSubevent) + switch (m_uiSubevent) { case 0: DoCastSpellIfCan(m_creature, SPELL_ARCHAEDAS_AWAKEN_VISUAL); break; case 1: - DoScriptText(SAY_AGGRO,m_creature,NULL); + DoScriptText(SAY_AGGRO, m_creature, NULL); m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); break; case 2: @@ -168,7 +168,7 @@ struct MANGOS_DLL_DECL boss_archaedasAI : public ScriptedAI m_uiAwakeDwarfTimer -= uiDiff; } - //Awake Earthen Guardians + // Awake Earthen Guardians if (!m_bGuardiansAwaken && m_creature->GetHealthPercent() <= 66.0f) { if (Creature* pGuard = m_pInstance->GetClosestDwarfNotInCombat(m_creature, PHASE_ARCHA_2)) diff --git a/scripts/eastern_kingdoms/uldaman/instance_uldaman.cpp b/scripts/eastern_kingdoms/uldaman/instance_uldaman.cpp index 1047d8284..c1fc06d14 100644 --- a/scripts/eastern_kingdoms/uldaman/instance_uldaman.cpp +++ b/scripts/eastern_kingdoms/uldaman/instance_uldaman.cpp @@ -39,7 +39,7 @@ void instance_uldaman::Initialize() void instance_uldaman::OnObjectCreate(GameObject* pGo) { - switch(pGo->GetEntry()) + switch (pGo->GetEntry()) { case GO_TEMPLE_DOOR_UPPER: if (m_auiEncounter[0] == DONE) @@ -61,7 +61,7 @@ void instance_uldaman::OnObjectCreate(GameObject* pGo) void instance_uldaman::OnCreatureCreate(Creature* pCreature) { - switch(pCreature->GetEntry()) + switch (pCreature->GetEntry()) { case NPC_HALLSHAPER: case NPC_CUSTODIAN: @@ -82,7 +82,7 @@ void instance_uldaman::OnCreatureCreate(Creature* pCreature) void instance_uldaman::SetData(uint32 uiType, uint32 uiData) { - switch(uiType) + switch (uiType) { case TYPE_ALTAR_EVENT: if (uiData == DONE) @@ -148,7 +148,7 @@ void instance_uldaman::Load(const char* chrIn) std::istringstream loadStream(chrIn); loadStream >> m_auiEncounter[0] >> m_auiEncounter[1]; - for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) + for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) { if (m_auiEncounter[i] == IN_PROGRESS) m_auiEncounter[i] = NOT_STARTED; @@ -159,17 +159,17 @@ void instance_uldaman::Load(const char* chrIn) void instance_uldaman::SetData64(uint32 uiData, uint64 uiGuid) { - switch(uiData) + switch (uiData) { case DATA_EVENT_STARTER: m_playerGuid = ObjectGuid(uiGuid); - break; + break; } } uint32 instance_uldaman::GetData(uint32 uiType) { - switch(uiType) + switch (uiType) { case TYPE_ARCHAEDAS: return m_auiEncounter[1]; @@ -179,7 +179,7 @@ uint32 instance_uldaman::GetData(uint32 uiType) uint64 instance_uldaman::GetData64(uint32 uiData) { - switch(uiData) + switch (uiData) { case DATA_EVENT_STARTER: return m_playerGuid.GetRawValue(); @@ -227,7 +227,7 @@ Creature* instance_uldaman::GetClosestDwarfNotInCombat(Creature* pSearcher, uint if (pTemp && pTemp->isAlive() && !pTemp->getVictim()) { - switch(uiPhase) + switch (uiPhase) { case PHASE_ARCHA_1: if (pTemp->GetEntry() != NPC_CUSTODIAN && pTemp->GetEntry() != NPC_HALLSHAPER) @@ -266,7 +266,7 @@ void instance_uldaman::Update(uint32 uiDiff) if (!m_mKeeperMap.empty()) { - for(std::map::iterator itr = m_mKeeperMap.begin(); itr != m_mKeeperMap.end(); ++itr) + for (std::map::iterator itr = m_mKeeperMap.begin(); itr != m_mKeeperMap.end(); ++itr) { // died earlier if (!itr->second) diff --git a/scripts/eastern_kingdoms/undercity.cpp b/scripts/eastern_kingdoms/undercity.cpp index 8a5c5a803..c71558192 100644 --- a/scripts/eastern_kingdoms/undercity.cpp +++ b/scripts/eastern_kingdoms/undercity.cpp @@ -49,7 +49,7 @@ enum MAX_LAMENTERS = 4, }; -static const float aHighborneLoc[MAX_LAMENTERS][4]= +static const float aHighborneLoc[MAX_LAMENTERS][4] = { {1285.41f, 312.47f, -61.0f, 0.51f}, {1286.96f, 310.40f, -61.0f, 1.00f}, diff --git a/scripts/eastern_kingdoms/western_plaguelands.cpp b/scripts/eastern_kingdoms/western_plaguelands.cpp index 7d0c03ae2..c7653ddaf 100644 --- a/scripts/eastern_kingdoms/western_plaguelands.cpp +++ b/scripts/eastern_kingdoms/western_plaguelands.cpp @@ -39,52 +39,52 @@ struct MANGOS_DLL_DECL npc_the_scourge_cauldronAI : public ScriptedAI void DoDie() { - //summoner dies here + // summoner dies here m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); - //override any database `spawntimesecs` to prevent duplicated summons + // override any database `spawntimesecs` to prevent duplicated summons uint32 rTime = m_creature->GetRespawnDelay(); - if (rTime<600) + if (rTime < 600) m_creature->SetRespawnDelay(600); } - void MoveInLineOfSight(Unit *who) + void MoveInLineOfSight(Unit* who) { if (!who || who->GetTypeId() != TYPEID_PLAYER) return; if (who->GetTypeId() == TYPEID_PLAYER) { - switch(m_creature->GetAreaId()) + switch (m_creature->GetAreaId()) { - case 199: //felstone + case 199: // felstone if (((Player*)who)->GetQuestStatus(5216) == QUEST_STATUS_INCOMPLETE || - ((Player*)who)->GetQuestStatus(5229) == QUEST_STATUS_INCOMPLETE) + ((Player*)who)->GetQuestStatus(5229) == QUEST_STATUS_INCOMPLETE) { m_creature->SummonCreature(11075, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 600000); DoDie(); } break; - case 200: //dalson + case 200: // dalson if (((Player*)who)->GetQuestStatus(5219) == QUEST_STATUS_INCOMPLETE || - ((Player*)who)->GetQuestStatus(5231) == QUEST_STATUS_INCOMPLETE) + ((Player*)who)->GetQuestStatus(5231) == QUEST_STATUS_INCOMPLETE) { m_creature->SummonCreature(11077, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 600000); DoDie(); } break; - case 201: //gahrron + case 201: // gahrron if (((Player*)who)->GetQuestStatus(5225) == QUEST_STATUS_INCOMPLETE || - ((Player*)who)->GetQuestStatus(5235) == QUEST_STATUS_INCOMPLETE) + ((Player*)who)->GetQuestStatus(5235) == QUEST_STATUS_INCOMPLETE) { - m_creature->SummonCreature(11078, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,600000); + m_creature->SummonCreature(11078, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 600000); DoDie(); } break; - case 202: //writhing + case 202: // writhing if (((Player*)who)->GetQuestStatus(5222) == QUEST_STATUS_INCOMPLETE || - ((Player*)who)->GetQuestStatus(5233) == QUEST_STATUS_INCOMPLETE) + ((Player*)who)->GetQuestStatus(5233) == QUEST_STATUS_INCOMPLETE) { - m_creature->SummonCreature(11076, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,600000); + m_creature->SummonCreature(11076, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 600000); DoDie(); } break; diff --git a/scripts/eastern_kingdoms/westfall.cpp b/scripts/eastern_kingdoms/westfall.cpp index fe0d3cb9c..227d03c91 100644 --- a/scripts/eastern_kingdoms/westfall.cpp +++ b/scripts/eastern_kingdoms/westfall.cpp @@ -62,7 +62,7 @@ struct MANGOS_DLL_DECL npc_daphne_stilwellAI : public npc_escortAI { if (HasEscortState(STATE_ESCORT_ESCORTING)) { - switch(m_uiWPHolder) + switch (m_uiWPHolder) { case 7: DoScriptText(SAY_DS_DOWN_1, m_creature); break; case 8: DoScriptText(SAY_DS_DOWN_2, m_creature); break; @@ -79,7 +79,7 @@ struct MANGOS_DLL_DECL npc_daphne_stilwellAI : public npc_escortAI { m_uiWPHolder = uiPointId; - switch(uiPointId) + switch (uiPointId) { case 4: SetEquipmentSlots(false, EQUIP_NO_CHANGE, EQUIP_NO_CHANGE, EQUIP_ID_RIFLE); diff --git a/scripts/eastern_kingdoms/wetlands.cpp b/scripts/eastern_kingdoms/wetlands.cpp index 3a51a7d05..298e4d884 100644 --- a/scripts/eastern_kingdoms/wetlands.cpp +++ b/scripts/eastern_kingdoms/wetlands.cpp @@ -38,7 +38,7 @@ enum QUEST_MISSING_DIPLO_PT11 = 1249, FACTION_ENEMY = 168, SPELL_STEALTH = 1785, - SPELL_CALL_FRIENDS = 16457, //summons 1x friend + SPELL_CALL_FRIENDS = 16457, // summons 1x friend NPC_SLIMS_FRIEND = 4971, NPC_TAPOKE_SLIM_JAHN = 4962 }; @@ -57,7 +57,7 @@ struct MANGOS_DLL_DECL npc_tapoke_slim_jahnAI : public npc_escortAI void WaypointReached(uint32 uiPointId) { - switch(uiPointId) + switch (uiPointId) { case 2: if (m_creature->HasStealthAura()) @@ -75,7 +75,7 @@ struct MANGOS_DLL_DECL npc_tapoke_slim_jahnAI : public npc_escortAI if (HasEscortState(STATE_ESCORT_ESCORTING) && !m_bFriendSummoned && pPlayer) { - for(uint8 i = 0; i < 3; ++i) + for (uint8 i = 0; i < 3; ++i) m_creature->CastSpell(m_creature, SPELL_CALL_FRIENDS, true); m_bFriendSummoned = true; diff --git a/scripts/eastern_kingdoms/zulaman/boss_akilzon.cpp b/scripts/eastern_kingdoms/zulaman/boss_akilzon.cpp index 6868ee2c2..984e6b30c 100644 --- a/scripts/eastern_kingdoms/zulaman/boss_akilzon.cpp +++ b/scripts/eastern_kingdoms/zulaman/boss_akilzon.cpp @@ -75,7 +75,7 @@ struct MANGOS_DLL_DECL boss_akilzonAI : public ScriptedAI m_uiGustOfWindTimer = urand(20000, 30000); m_uiStormTimer = 50000; m_uiSummonEagleTimer = 65000; - m_uiBerserkTimer = 10*MINUTE*IN_MILLISECONDS; + m_uiBerserkTimer = 10 * MINUTE * IN_MILLISECONDS; } void Aggro(Unit* pWho) @@ -154,7 +154,7 @@ struct MANGOS_DLL_DECL boss_akilzonAI : public ScriptedAI { if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) { - if(DoCastSpellIfCan(pTarget, SPELL_ELECTRICAL_STORM) == CAST_OK) + if (DoCastSpellIfCan(pTarget, SPELL_ELECTRICAL_STORM) == CAST_OK) { DoScriptText(EMOTE_STORM, m_creature); m_uiStormTimer = 55000; @@ -257,7 +257,7 @@ struct MANGOS_DLL_DECL mob_soaring_eagleAI : public ScriptedAI if (Creature* pAzkil = m_pInstance->GetSingleCreatureFromStorage(NPC_AKILZON)) { float fX, fY, fZ; - pAzkil->GetRandomPoint(pAzkil->GetPositionX(), pAzkil->GetPositionY(), pAzkil->GetPositionZ()+15.0f, 30.0f, fX, fY, fZ); + pAzkil->GetRandomPoint(pAzkil->GetPositionX(), pAzkil->GetPositionY(), pAzkil->GetPositionZ() + 15.0f, 30.0f, fX, fY, fZ); m_creature->SetWalk(false); m_creature->GetMotionMaster()->MovePoint(1, fX, fY, fZ); diff --git a/scripts/eastern_kingdoms/zulaman/boss_halazzi.cpp b/scripts/eastern_kingdoms/zulaman/boss_halazzi.cpp index d95952e86..08840f974 100644 --- a/scripts/eastern_kingdoms/zulaman/boss_halazzi.cpp +++ b/scripts/eastern_kingdoms/zulaman/boss_halazzi.cpp @@ -41,8 +41,8 @@ enum // generic spells SPELL_BERSERK = 45078, SPELL_TRANSFORM_TO_ORIGINAL = 43311, - //SPELL_DUAL_WIELD = 42459, // spell not confirmed - //SPELL_TRANSFIGURE = 44054, // purpose unk + // SPELL_DUAL_WIELD = 42459, // spell not confirmed + // SPELL_TRANSFIGURE = 44054, // purpose unk // Phase single spells SPELL_SABER_LASH = 43267, @@ -57,7 +57,7 @@ enum SPELL_TRANSFORM_TO_LYNX_50 = 43271, SPELL_TRANSFORM_TO_LYNX_25 = 43272, SPELL_HALAZZI_TRANSFORM_DUMMY = 43615, - //SPELL_HALAZZI_TRANSFORM_VISUAL= 43293, + // SPELL_HALAZZI_TRANSFORM_VISUAL= 43293, // Phase spirits spells SPELL_FLAMESHOCK = 43303, @@ -107,7 +107,7 @@ struct MANGOS_DLL_DECL boss_halazziAI : public ScriptedAI m_uiSaberLashTimer = 20000; m_uiShockTimer = 10000; m_uiTotemTimer = 12000; - m_uiBerserkTimer = 10*MINUTE*IN_MILLISECONDS; + m_uiBerserkTimer = 10 * MINUTE * IN_MILLISECONDS; m_bHasTransformed = false; } @@ -180,7 +180,7 @@ struct MANGOS_DLL_DECL boss_halazziAI : public ScriptedAI uint32 uiSpellId = 0; // Each health level has it's own spell - but they all do the same thing - switch(m_uiPhaseCounter) + switch (m_uiPhaseCounter) { case 3: uiSpellId = SPELL_TRANSFORM_TO_LYNX_75; break; case 2: uiSpellId = SPELL_TRANSFORM_TO_LYNX_50; break; @@ -198,7 +198,7 @@ struct MANGOS_DLL_DECL boss_halazziAI : public ScriptedAI pLynx->ForcedDespawn(); // Set the proper health level - workaround for missing server side spell 43538 - m_creature->SetHealth(m_creature->GetMaxHealth()/4*m_uiPhaseCounter); + m_creature->SetHealth(m_creature->GetMaxHealth() / 4 * m_uiPhaseCounter); --m_uiPhaseCounter; m_uiPhase = m_uiPhaseCounter > 0 ? PHASE_SINGLE : PHASE_FINAL; @@ -231,7 +231,7 @@ struct MANGOS_DLL_DECL boss_halazziAI : public ScriptedAI if (m_uiPhase == PHASE_SINGLE || m_uiPhase == PHASE_FINAL) { // Split boss at 75%, 50% and 25% - if (!m_bHasTransformed && m_creature->GetHealthPercent() <= float(25*m_uiPhaseCounter)) + if (!m_bHasTransformed && m_creature->GetHealthPercent() <= float(25 * m_uiPhaseCounter)) { if (DoCastSpellIfCan(m_creature, SPELL_TRANSFIGURE_TO_TROLL) == CAST_OK) { @@ -318,7 +318,7 @@ struct MANGOS_DLL_DECL boss_spirit_lynxAI : public ScriptedAI void Reset() { - m_uiFrenzyTimer = urand(10000, 20000); //first frenzy after 10-20 seconds + m_uiFrenzyTimer = urand(10000, 20000); // first frenzy after 10-20 seconds m_uiShredArmorTimer = 4000; m_bHasUnited = false; } @@ -340,7 +340,7 @@ struct MANGOS_DLL_DECL boss_spirit_lynxAI : public ScriptedAI if (m_uiFrenzyTimer < uiDiff) { DoCastSpellIfCan(m_creature, SPELL_LYNX_FRENZY); - m_uiFrenzyTimer = urand(20000, 30000); //subsequent frenzys casted every 20-30 seconds + m_uiFrenzyTimer = urand(20000, 30000); // subsequent frenzys casted every 20-30 seconds } else m_uiFrenzyTimer -= uiDiff; diff --git a/scripts/eastern_kingdoms/zulaman/boss_janalai.cpp b/scripts/eastern_kingdoms/zulaman/boss_janalai.cpp index 1ded76f68..5ddd79084 100644 --- a/scripts/eastern_kingdoms/zulaman/boss_janalai.cpp +++ b/scripts/eastern_kingdoms/zulaman/boss_janalai.cpp @@ -37,29 +37,29 @@ enum SAY_EVENT_STRANGERS = -1568008, SAY_EVENT_FRIENDS = -1568009, - //Jan'alai + // Jan'alai SPELL_FLAME_BREATH = 43140, - SPELL_HATCH_ALL_EGGS = 43144, // triggers 42493 + SPELL_HATCH_ALL_EGGS = 43144, // triggers 42493 SPELL_TELEPORT_TO_CENTER = 43098, - SPELL_SUMMON_ALL_PLAYERS = 43096, // triggers 43097 + SPELL_SUMMON_ALL_PLAYERS = 43096, // triggers 43097 SPELL_ENRAGE = 44779, SPELL_BERSERK = 47008, SPELL_SUMMON_HATCHER_1 = 43962, SPELL_SUMMON_HATCHER_2 = 45340, - //Fire Bob Spells + // Fire Bob Spells SPELL_FIRE_BOMB_CHANNEL = 42621, - SPELL_FIRE_BOMB_THROW = 42628, // triggers 42629 - SPELL_FIRE_BOMB_EXPLODE = 42631, // triggers 42630 + SPELL_FIRE_BOMB_THROW = 42628, // triggers 42629 + SPELL_FIRE_BOMB_EXPLODE = 42631, // triggers 42630 - //NPCs + // NPCs NPC_FIRE_BOMB = 23920, NPC_AMANI_HATCHER_1 = 23818, NPC_AMANI_HATCHER_2 = 24504, NPC_HATCHLING = 23598, NPC_DRAGONHAWK_EGG = 23817, - //Hatcher Spells + // Hatcher Spells SPELL_HATCH_EGG_1 = 43734, SPELL_HATCH_EGG_2 = 42471, @@ -69,15 +69,15 @@ enum // Eggs spells SPELL_SUMMON_DRAGONHAWK = 42493, - MAX_EGGS_ON_SIDE = 20, // there are 20 eggs spawned on each side + MAX_EGGS_ON_SIDE = 20, // there are 20 eggs spawned on each side }; static const float afFireWallCoords[4][4] = { - {-10.13f, 1149.27f, 19.0f, M_PI_F}, - {-33.93f, 1123.90f, 19.0f, 0.5f*M_PI_F}, - {-54.80f, 1150.08f, 19.0f, 0.0f}, - {-33.93f, 1175.68f, 19.0f, 1.5f*M_PI_F} + { -10.13f, 1149.27f, 19.0f, M_PI_F}, + { -33.93f, 1123.90f, 19.0f, 0.5f * M_PI_F}, + { -54.80f, 1150.08f, 19.0f, 0.0f}, + { -33.93f, 1175.68f, 19.0f, 1.5f * M_PI_F} }; struct WaypointDef @@ -85,24 +85,24 @@ struct WaypointDef float m_fX, m_fY, m_fZ; }; -static const WaypointDef m_aHatcherRight[]= +static const WaypointDef m_aHatcherRight[] = { - {-74.783f, 1145.827f, 5.420f}, - {-54.476f, 1146.934f, 18.705f}, - {-56.957f, 1146.713f, 18.725f}, - {-45.428f, 1141.697f, 18.709f}, - {-34.002f, 1124.427f, 18.711f}, - {-34.085f, 1106.158f, 18.711f} + { -74.783f, 1145.827f, 5.420f}, + { -54.476f, 1146.934f, 18.705f}, + { -56.957f, 1146.713f, 18.725f}, + { -45.428f, 1141.697f, 18.709f}, + { -34.002f, 1124.427f, 18.711f}, + { -34.085f, 1106.158f, 18.711f} }; -static const WaypointDef m_aHatcherLeft[]= +static const WaypointDef m_aHatcherLeft[] = { - {-73.569f, 1154.960f, 5.510f}, - {-54.264f, 1153.968f, 18.705f}, - {-56.985f, 1153.373f, 18.608f}, - {-45.515f, 1158.356f, 18.709f}, - {-33.314f, 1174.816f, 18.709f}, - {-33.097f, 1195.359f, 18.709f} + { -73.569f, 1154.960f, 5.510f}, + { -54.264f, 1153.968f, 18.705f}, + { -56.985f, 1153.373f, 18.608f}, + { -45.515f, 1158.356f, 18.709f}, + { -33.314f, 1174.816f, 18.709f}, + { -33.097f, 1195.359f, 18.709f} }; struct MANGOS_DLL_DECL boss_janalaiAI : public ScriptedAI @@ -136,15 +136,15 @@ struct MANGOS_DLL_DECL boss_janalaiAI : public ScriptedAI void Reset() { m_uiFireBreathTimer = 8000; - m_uiEnrageTimer = 5*MINUTE*IN_MILLISECONDS; + m_uiEnrageTimer = 5 * MINUTE * IN_MILLISECONDS; m_uiHatcherTimer = 10000; - m_uiBerserkTimer = 10*MINUTE*IN_MILLISECONDS; + m_uiBerserkTimer = 10 * MINUTE * IN_MILLISECONDS; m_uiBombTimer = 30000; m_uiBombAuraTimer = 0; m_uiExplodeTimer = 0; m_uiEggsHatchedLeft = 0; - m_uiEggsHatchedRight= 0; + m_uiEggsHatchedRight = 0; m_bHasHatchedEggs = false; m_bIsEnraged = false; @@ -180,7 +180,7 @@ struct MANGOS_DLL_DECL boss_janalaiAI : public ScriptedAI void JustSummoned(Creature* pSummoned) { - switch(pSummoned->GetEntry()) + switch (pSummoned->GetEntry()) { case NPC_AMANI_HATCHER_1: m_hatcherOneGuid = pSummoned->GetObjectGuid(); @@ -364,7 +364,7 @@ struct MANGOS_DLL_DECL boss_janalaiAI : public ScriptedAI DoMeleeAttackIfReady(); - //check for reset ... exploit preventing ... pulled from his podest + // check for reset ... exploit preventing ... pulled from his podest EnterEvadeIfOutOfCombatArea(uiDiff); } }; diff --git a/scripts/eastern_kingdoms/zulaman/boss_malacrass.cpp b/scripts/eastern_kingdoms/zulaman/boss_malacrass.cpp index 657dcf301..24e16a26f 100644 --- a/scripts/eastern_kingdoms/zulaman/boss_malacrass.cpp +++ b/scripts/eastern_kingdoms/zulaman/boss_malacrass.cpp @@ -49,34 +49,34 @@ enum SPELL_SIPHON_SOUL = 43501, SPELL_DRAIN_POWER = 44131, - //for various powers he uses after using soul drain - //Death Knight + // for various powers he uses after using soul drain + // Death Knight SPELL_DK_DEATH_AND_DECAY = 61603, SPELL_DK_PLAGUE_STRIKE = 61600, SPELL_DK_MARK_OF_BLOOD = 61606, - //Druid + // Druid SPELL_DR_THORNS = 43420, SPELL_DR_LIFEBLOOM = 43421, SPELL_DR_MOONFIRE = 43545, - //Hunter + // Hunter SPELL_HU_EXPLOSIVE_TRAP = 43444, SPELL_HU_FREEZING_TRAP = 43447, SPELL_HU_SNAKE_TRAP = 43449, - //Mage + // Mage SPELL_MG_FIREBALL = 41383, SPELL_MG_FROST_NOVA = 43426, SPELL_MG_ICE_LANCE = 43427, SPELL_MG_FROSTBOLT = 43428, - //Paladin + // Paladin SPELL_PA_CONSECRATION = 43429, SPELL_PA_AVENGING_WRATH = 43430, SPELL_PA_HOLY_LIGHT = 43451, - //Priest + // Priest SPELL_PR_HEAL = 41372, SPELL_PR_MIND_BLAST = 41374, SPELL_PR_SW_DEATH = 41375, @@ -84,27 +84,27 @@ enum SPELL_PR_MIND_CONTROL = 43550, SPELL_PR_PAIN_SUPP = 44416, - //Rogue + // Rogue SPELL_RO_WOUND_POISON = 39665, SPELL_RO_BLIND = 43433, SPELL_RO_SLICE_DICE = 43547, - //Shaman + // Shaman SPELL_SH_CHAIN_LIGHT = 43435, SPELL_SH_FIRE_NOVA = 43436, SPELL_SH_HEALING_WAVE = 43548, - //Warlock + // Warlock SPELL_WL_CURSE_OF_DOOM = 43439, SPELL_WL_RAIN_OF_FIRE = 43440, SPELL_WL_UNSTABLE_AFFL = 35183, - //Warrior + // Warrior SPELL_WR_MORTAL_STRIKE = 43441, SPELL_WR_WHIRLWIND = 43442, SPELL_WR_SPELL_REFLECT = 43443, - //misc + // misc TARGET_TYPE_RANDOM = 0, TARGET_TYPE_VICTIM = 1, TARGET_TYPE_SELF = 2, @@ -113,7 +113,7 @@ enum MAX_ACTIVE_ADDS = 4 }; -//Adds positions +// Adds positions static const float m_aAddPositions[MAX_ACTIVE_ADDS][4] = { {128.279f, 921.279f, 33.889f, 1.527f}, @@ -123,7 +123,7 @@ static const float m_aAddPositions[MAX_ACTIVE_ADDS][4] = }; // Each position is a random of two spawns -static const uint32 aSpawnEntries[MAX_ACTIVE_ADDS][2]= +static const uint32 aSpawnEntries[MAX_ACTIVE_ADDS][2] = { {NPC_ALYSON, NPC_THURG}, {NPC_SLITHER, NPC_RADAAN}, @@ -141,60 +141,72 @@ struct PlayerAbilityStruct // Classes are in the same order as they are in DBC static PlayerAbilityStruct m_aMalacrassStolenAbility[][4] = { - { // 0* shadow priest - exception: it seems that the priest has two specs. We use this slot for the shadow priest + { + // 0* shadow priest - exception: it seems that the priest has two specs. We use this slot for the shadow priest {SPELL_PR_MIND_CONTROL, TARGET_TYPE_RANDOM, 15000, 30000}, {SPELL_PR_MIND_BLAST, TARGET_TYPE_RANDOM, 23000, 30000}, {SPELL_PR_SW_DEATH, TARGET_TYPE_RANDOM, 5000, 16000} }, - { // 1 warrior + { + // 1 warrior {SPELL_WR_SPELL_REFLECT, TARGET_TYPE_SELF, 2000, 30000}, {SPELL_WR_WHIRLWIND, TARGET_TYPE_SELF, 10000, 30000}, {SPELL_WR_MORTAL_STRIKE, TARGET_TYPE_VICTIM, 6000, 15000} }, - { // 2 paladin + { + // 2 paladin {SPELL_PA_CONSECRATION, TARGET_TYPE_SELF, 10000, 30000}, {SPELL_PA_HOLY_LIGHT, TARGET_TYPE_FRIENDLY, 17000, 30000}, {SPELL_PA_AVENGING_WRATH, TARGET_TYPE_SELF, 0, 30000} }, - { // 3 hunter + { + // 3 hunter {SPELL_HU_EXPLOSIVE_TRAP, TARGET_TYPE_SELF, 12000, 30000}, {SPELL_HU_FREEZING_TRAP, TARGET_TYPE_SELF, 3000, 30000}, {SPELL_HU_SNAKE_TRAP, TARGET_TYPE_SELF, 21000, 30000} }, - { // 4 rogue + { + // 4 rogue {SPELL_RO_WOUND_POISON, TARGET_TYPE_VICTIM, 3000, 17000}, {SPELL_RO_SLICE_DICE, TARGET_TYPE_SELF, 17000, 30000}, {SPELL_RO_BLIND, TARGET_TYPE_RANDOM, 12000, 30000} }, - { // 5 priest + { + // 5 priest {SPELL_PR_PAIN_SUPP, TARGET_TYPE_FRIENDLY, 24000, 30000}, {SPELL_PR_HEAL, TARGET_TYPE_FRIENDLY, 16000, 30000}, {SPELL_PR_PSYCHIC_SCREAM, TARGET_TYPE_RANDOM, 8000, 30000} }, - { // 6 death knight + { + // 6 death knight {SPELL_DK_DEATH_AND_DECAY, TARGET_TYPE_RANDOM, 25000, 30000}, {SPELL_DK_PLAGUE_STRIKE, TARGET_TYPE_VICTIM, 5000, 17000}, {SPELL_DK_MARK_OF_BLOOD, TARGET_TYPE_RANDOM, 14000, 30000} }, - { // 7 shaman + { + // 7 shaman {SPELL_SH_FIRE_NOVA, TARGET_TYPE_SELF, 25000, 30000}, {SPELL_SH_HEALING_WAVE, TARGET_TYPE_FRIENDLY, 15000, 30000}, {SPELL_SH_CHAIN_LIGHT, TARGET_TYPE_RANDOM, 4000, 16000} }, - { // 8 mage + { + // 8 mage {SPELL_MG_FIREBALL, TARGET_TYPE_RANDOM, 8000, 30000}, {SPELL_MG_FROSTBOLT, TARGET_TYPE_RANDOM, 25000, 30000}, {SPELL_MG_ICE_LANCE, TARGET_TYPE_RANDOM, 2000, 18000}, {SPELL_MG_FROST_NOVA, TARGET_TYPE_SELF, 17000, 30000} }, - { // 9 warlock + { + // 9 warlock {SPELL_WL_CURSE_OF_DOOM, TARGET_TYPE_RANDOM, 0, 30000}, {SPELL_WL_RAIN_OF_FIRE, TARGET_TYPE_RANDOM, 16000, 30000}, {SPELL_WL_UNSTABLE_AFFL, TARGET_TYPE_RANDOM, 8000, 13000} }, - { // 10 unused - no class in DBC here + { + // 10 unused - no class in DBC here }, - { // 11 druid + { + // 11 druid {SPELL_DR_LIFEBLOOM, TARGET_TYPE_FRIENDLY, 15000, 30000}, {SPELL_DR_THORNS, TARGET_TYPE_SELF, 0, 30000}, {SPELL_DR_MOONFIRE, TARGET_TYPE_RANDOM, 8000, 13000} @@ -243,7 +255,7 @@ struct MANGOS_DLL_DECL boss_malacrassAI : public ScriptedAI void DoInitializeAdds() { - //not if m_creature are dead, so avoid + // not if m_creature are dead, so avoid if (!m_creature->isAlive()) return; @@ -302,7 +314,7 @@ struct MANGOS_DLL_DECL boss_malacrassAI : public ScriptedAI void SummonedCreatureJustDied(Creature* pSummoned) { - switch(urand(0, 2)) + switch (urand(0, 2)) { case 0: DoScriptText(SAY_ADD_DIED1, m_creature); break; case 1: DoScriptText(SAY_ADD_DIED2, m_creature); break; @@ -336,7 +348,7 @@ struct MANGOS_DLL_DECL boss_malacrassAI : public ScriptedAI { Unit* pTarget = NULL; - switch(m_aMalacrassStolenAbility[m_uiPlayerClass][uiSpellIndex].m_uiTargetType) + switch (m_aMalacrassStolenAbility[m_uiPlayerClass][uiSpellIndex].m_uiTargetType) { case TARGET_TYPE_SELF: pTarget = m_creature; diff --git a/scripts/eastern_kingdoms/zulaman/boss_nalorakk.cpp b/scripts/eastern_kingdoms/zulaman/boss_nalorakk.cpp index 44e68ac9a..13422a5eb 100644 --- a/scripts/eastern_kingdoms/zulaman/boss_nalorakk.cpp +++ b/scripts/eastern_kingdoms/zulaman/boss_nalorakk.cpp @@ -38,7 +38,7 @@ enum SAY_SLAY2 = -1568022, SAY_DEATH = -1568023, - SPELL_BERSERK = 45078, //unsure, this increases damage, size and speed + SPELL_BERSERK = 45078, // unsure, this increases damage, size and speed // Defines for Troll form SPELL_BRUTAL_SWIPE = 42384, @@ -83,7 +83,7 @@ struct MANGOS_DLL_DECL boss_nalorakkAI : public ScriptedAI m_uiLaceratingSlashTimer = 6000; m_uiRendFleshTimer = 6000; m_uiDeafeningRoarTimer = 20000; - m_uiBerserkTimer = 10*MINUTE*IN_MILLISECONDS; + m_uiBerserkTimer = 10 * MINUTE * IN_MILLISECONDS; m_bIsInBearForm = false; } @@ -187,7 +187,7 @@ struct MANGOS_DLL_DECL boss_nalorakkAI : public ScriptedAI m_uiBerserkTimer -= uiDiff; } - //Spells for Troll Form (only to be casted if we NOT have bear phase aura) + // Spells for Troll Form (only to be casted if we NOT have bear phase aura) if (!m_bIsInBearForm) { // Brutal Swipe (some sources may say otherwise, but I've never seen this in Bear form) @@ -211,10 +211,10 @@ struct MANGOS_DLL_DECL boss_nalorakkAI : public ScriptedAI // Surge if (m_uiSurgeTimer < uiDiff) { - //select a random unit other than the main tank + // select a random unit other than the main tank Unit* pTtarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1); - //if there aren't other units, cast on the tank + // if there aren't other units, cast on the tank if (!pTtarget) pTtarget = m_creature->getVictim(); @@ -244,7 +244,7 @@ struct MANGOS_DLL_DECL boss_nalorakkAI : public ScriptedAI else m_uiChangeFormTimer -= uiDiff; } - //Spells for Bear Form (only to be casted if we have bear phase aura) + // Spells for Bear Form (only to be casted if we have bear phase aura) else { // Timer to yell and reset spell timers when bear aura expires diff --git a/scripts/eastern_kingdoms/zulaman/boss_zuljin.cpp b/scripts/eastern_kingdoms/zulaman/boss_zuljin.cpp index add076c9d..a952577e5 100644 --- a/scripts/eastern_kingdoms/zulaman/boss_zuljin.cpp +++ b/scripts/eastern_kingdoms/zulaman/boss_zuljin.cpp @@ -45,18 +45,18 @@ enum // Troll Form SPELL_WHIRLWIND = 17207, - SPELL_GRIEVOUS_THROW = 43093, //removes debuff after full healed + SPELL_GRIEVOUS_THROW = 43093, // removes debuff after full healed // Bear Form - SPELL_CREEPING_PARALYSIS = 43095, //should cast on the whole raid - SPELL_OVERPOWER = 43456, //use after melee attack dodged + SPELL_CREEPING_PARALYSIS = 43095, // should cast on the whole raid + SPELL_OVERPOWER = 43456, // use after melee attack dodged // Eagle Form - SPELL_ENERGY_STORM = 43983, //enemy area aura, trigger 42577 on vortexes which cast 43137 on targets - SPELL_SUMMON_CYCLONE = 43112, //summon four feather vortex - NPC_FEATHER_VORTEX = 24136, //ToDo: script via ACID - SPELL_CYCLONE_VISUAL = 43119, //trigger 43147 visual - SPELL_CYCLONE_PASSIVE = 43120, //trigger 43121 (4y aoe) every second + SPELL_ENERGY_STORM = 43983, // enemy area aura, trigger 42577 on vortexes which cast 43137 on targets + SPELL_SUMMON_CYCLONE = 43112, // summon four feather vortex + NPC_FEATHER_VORTEX = 24136, // ToDo: script via ACID + SPELL_CYCLONE_VISUAL = 43119, // trigger 43147 visual + SPELL_CYCLONE_PASSIVE = 43120, // trigger 43121 (4y aoe) every second // Lynx Form SPELL_CLAW_RAGE_HASTE = 42583, // Charges a random target and applies dummy effect 43149 on it @@ -64,11 +64,11 @@ enum SPELL_LYNX_RUSH_HASTE = 43152, // Charges 9 targets in a row - Dummy effect should apply 43153 // Dragonhawk Form - SPELL_FLAME_WHIRL = 43213, //trigger two spells + SPELL_FLAME_WHIRL = 43213, // trigger two spells SPELL_FLAME_BREATH = 43215, - SPELL_SUMMON_PILLAR = 43216, //summon 24187 + SPELL_SUMMON_PILLAR = 43216, // summon 24187 NPC_COLUMN_OF_FIRE = 24187, - SPELL_PILLAR_TRIGGER = 43218, //trigger 43217 + SPELL_PILLAR_TRIGGER = 43218, // trigger 43217 // Cosmetic SPELL_SPIRIT_DRAINED = 42520, @@ -108,7 +108,7 @@ static const BossPhase aZuljinPhases[] = {SPELL_SHAPE_OF_THE_DRAGONHAWK, SAY_DRAGONHAWK_TRANSFORM, EMOTE_DRAGONHAWK_SPIRIT, NPC_DRAGONHAWK_SPIRIT, PHASE_DRAGONHAWK} }; -//coords for going for changing form +// coords for going for changing form static const float fZuljinMoveLoc[3] = {120.148811f, 703.713684f, 45.111477f}; struct MANGOS_DLL_DECL boss_zuljinAI : public ScriptedAI @@ -231,7 +231,7 @@ struct MANGOS_DLL_DECL boss_zuljinAI : public ScriptedAI void JustSummoned(Creature* pSummoned) { - switch(pSummoned->GetEntry()) + switch (pSummoned->GetEntry()) { case NPC_FEATHER_VORTEX: pSummoned->CastSpell(pSummoned, SPELL_CYCLONE_VISUAL, true); @@ -337,7 +337,7 @@ struct MANGOS_DLL_DECL boss_zuljinAI : public ScriptedAI { case PHASE_TROLL: - if(m_uiWhirlwindTimer < uiDiff) + if (m_uiWhirlwindTimer < uiDiff) { if (DoCastSpellIfCan(m_creature, SPELL_WHIRLWIND) == CAST_OK) m_uiWhirlwindTimer = urand(15000, 20000); @@ -345,9 +345,9 @@ struct MANGOS_DLL_DECL boss_zuljinAI : public ScriptedAI else m_uiWhirlwindTimer -= uiDiff; - if(m_uiGrievousThrowTimer < uiDiff) + if (m_uiGrievousThrowTimer < uiDiff) { - if(Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) { if (DoCastSpellIfCan(pTarget, SPELL_GRIEVOUS_THROW) == CAST_OK) m_uiGrievousThrowTimer = 10000; @@ -359,7 +359,7 @@ struct MANGOS_DLL_DECL boss_zuljinAI : public ScriptedAI break; case PHASE_BEAR: - if(m_uiParalysisTimer < uiDiff) + if (m_uiParalysisTimer < uiDiff) { if (DoCastSpellIfCan(m_creature, SPELL_CREEPING_PARALYSIS) == CAST_OK) m_uiParalysisTimer = 27000; @@ -367,7 +367,7 @@ struct MANGOS_DLL_DECL boss_zuljinAI : public ScriptedAI else m_uiParalysisTimer -= uiDiff; - if(m_uiOverpowerTimer < uiDiff) + if (m_uiOverpowerTimer < uiDiff) { if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_OVERPOWER) == CAST_OK) m_uiOverpowerTimer = urand(12000, 16000); @@ -386,7 +386,7 @@ struct MANGOS_DLL_DECL boss_zuljinAI : public ScriptedAI break; case PHASE_DRAGONHAWK: - if(m_uiFlameWhirlTimer < uiDiff) + if (m_uiFlameWhirlTimer < uiDiff) { if (DoCastSpellIfCan(m_creature, SPELL_FLAME_WHIRL) == CAST_OK) m_uiFlameWhirlTimer = 15000; @@ -394,7 +394,7 @@ struct MANGOS_DLL_DECL boss_zuljinAI : public ScriptedAI else m_uiFlameWhirlTimer -= uiDiff; - if(m_uiPillarOfFireTimer < uiDiff) + if (m_uiPillarOfFireTimer < uiDiff) { if (DoCastSpellIfCan(m_creature, SPELL_SUMMON_PILLAR) == CAST_OK) m_uiPillarOfFireTimer = urand(17000, 22000); @@ -402,9 +402,9 @@ struct MANGOS_DLL_DECL boss_zuljinAI : public ScriptedAI else m_uiPillarOfFireTimer -= uiDiff; - if(m_uiFlameBreathTimer < uiDiff) + if (m_uiFlameBreathTimer < uiDiff) { - if(Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) { if (DoCastSpellIfCan(m_creature, SPELL_FLAME_BREATH) == CAST_OK) m_uiFlameBreathTimer = 15000; diff --git a/scripts/eastern_kingdoms/zulaman/instance_zulaman.cpp b/scripts/eastern_kingdoms/zulaman/instance_zulaman.cpp index fe6475ccd..d13c48b71 100644 --- a/scripts/eastern_kingdoms/zulaman/instance_zulaman.cpp +++ b/scripts/eastern_kingdoms/zulaman/instance_zulaman.cpp @@ -25,7 +25,7 @@ EndScriptData */ #include "zulaman.h" instance_zulaman::instance_zulaman(Map* pMap) : ScriptedInstance(pMap), - m_uiEventTimer(MINUTE*IN_MILLISECONDS), + m_uiEventTimer(MINUTE* IN_MILLISECONDS), m_uiGongCount(0), m_uiBearEventPhase(0), m_bIsBearPhaseInProgress(false) @@ -53,7 +53,7 @@ bool instance_zulaman::IsEncounterInProgress() const void instance_zulaman::OnCreatureCreate(Creature* pCreature) { - switch(pCreature->GetEntry()) + switch (pCreature->GetEntry()) { case NPC_AKILZON: case NPC_HALAZZI: @@ -65,7 +65,7 @@ void instance_zulaman::OnCreatureCreate(Creature* pCreature) case NPC_EAGLE_SPIRIT: case NPC_LYNX_SPIRIT: case NPC_DRAGONHAWK_SPIRIT: - // Insert Malacrass companions here for better handling + // Insert Malacrass companions here for better handling case NPC_ALYSON: case NPC_THURG: case NPC_SLITHER: @@ -100,7 +100,7 @@ void instance_zulaman::OnCreatureCreate(Creature* pCreature) void instance_zulaman::OnCreatureDeath(Creature* pCreature) { - switch(pCreature->GetEntry()) + switch (pCreature->GetEntry()) { case NPC_MEDICINE_MAN: case NPC_TRIBES_MAN: @@ -130,7 +130,7 @@ void instance_zulaman::OnCreatureDeath(Creature* pCreature) void instance_zulaman::OnCreatureEvade(Creature* pCreature) { - switch(pCreature->GetEntry()) + switch (pCreature->GetEntry()) { case NPC_MEDICINE_MAN: case NPC_TRIBES_MAN: @@ -150,7 +150,7 @@ void instance_zulaman::OnCreatureEvade(Creature* pCreature) void instance_zulaman::OnObjectCreate(GameObject* pGo) { - switch(pGo->GetEntry()) + switch (pGo->GetEntry()) { case GO_STRANGE_GONG: break; @@ -185,7 +185,7 @@ void instance_zulaman::OnObjectCreate(GameObject* pGo) void instance_zulaman::SetData(uint32 uiType, uint32 uiData) { - debug_log("SD2: Instance Zulaman: SetData received for type %u with data %u",uiType,uiData); + debug_log("SD2: Instance Zulaman: SetData received for type %u with data %u", uiType, uiData); switch (uiType) { @@ -312,8 +312,8 @@ void instance_zulaman::SetData(uint32 uiType, uint32 uiData) std::ostringstream saveStream; saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2] << " " - << m_auiEncounter[3] << " " << m_auiEncounter[4] << " " << m_auiEncounter[5] << " " - << m_auiEncounter[6] << " " << m_auiEncounter[7]; + << m_auiEncounter[3] << " " << m_auiEncounter[4] << " " << m_auiEncounter[5] << " " + << m_auiEncounter[6] << " " << m_auiEncounter[7]; m_strInstData = saveStream.str(); @@ -334,7 +334,7 @@ void instance_zulaman::Load(const char* chrIn) std::istringstream loadStream(chrIn); loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3] - >> m_auiEncounter[4] >> m_auiEncounter[5] >> m_auiEncounter[6] >> m_auiEncounter[7]; + >> m_auiEncounter[4] >> m_auiEncounter[5] >> m_auiEncounter[6] >> m_auiEncounter[7]; // Skip m_auiEncounter[7], to start the time event properly if needed for (uint8 i = 0; i < MAX_ENCOUNTER - 1; ++i) @@ -385,7 +385,7 @@ void instance_zulaman::SendNextBearWave(Unit* pTarget) { float fX, fY, fZ; pTemp->GetRandomPoint(35.31f, 1412.24f, 2.04f, 3.0f, fX, fY, fZ); - pTemp->GetMotionMaster()->MoveJump(fX, fY, fZ, pTemp->GetSpeed(MOVE_RUN)*2, 5.0f); + pTemp->GetMotionMaster()->MoveJump(fX, fY, fZ, pTemp->GetSpeed(MOVE_RUN) * 2, 5.0f); } } } @@ -458,7 +458,7 @@ void instance_zulaman::Update(uint32 uiDiff) SetData(TYPE_RUN_EVENT_TIME, m_auiEncounter[TYPE_RUN_EVENT_TIME]); debug_log("SD2: Instance Zulaman: minute decrease to %u.", m_auiEncounter[TYPE_RUN_EVENT_TIME]); - m_uiEventTimer = MINUTE*IN_MILLISECONDS; + m_uiEventTimer = MINUTE * IN_MILLISECONDS; } else m_uiEventTimer -= uiDiff; diff --git a/scripts/eastern_kingdoms/zulaman/zulaman.cpp b/scripts/eastern_kingdoms/zulaman/zulaman.cpp index d8305a5ea..ba768a8e6 100644 --- a/scripts/eastern_kingdoms/zulaman/zulaman.cpp +++ b/scripts/eastern_kingdoms/zulaman/zulaman.cpp @@ -57,45 +57,45 @@ struct MANGOS_DLL_DECL npc_forest_frogAI : public ScriptedAI if (m_pInstance) { uint32 cEntry = 0; - switch(urand(0, 10)) + switch (urand(0, 10)) { - case 0: cEntry = 24024; break; //Kraz // wrong here? - case 1: cEntry = 24397; break; //Mannuth - case 2: cEntry = 24403; break; //Deez - case 3: cEntry = 24404; break; //Galathryn - case 4: cEntry = 24405; break; //Adarrah - case 5: cEntry = 24406; break; //Fudgerick - case 6: cEntry = 24407; break; //Darwen - case 7: cEntry = 24445; break; //Mitzi - case 8: cEntry = 24448; break; //Christian - case 9: cEntry = 24453; break; //Brennan - case 10: cEntry = 24455; break; //Hollee + case 0: cEntry = 24024; break; // Kraz // wrong here? + case 1: cEntry = 24397; break; // Mannuth + case 2: cEntry = 24403; break; // Deez + case 3: cEntry = 24404; break; // Galathryn + case 4: cEntry = 24405; break; // Adarrah + case 5: cEntry = 24406; break; // Fudgerick + case 6: cEntry = 24407; break; // Darwen + case 7: cEntry = 24445; break; // Mitzi + case 8: cEntry = 24448; break; // Christian + case 9: cEntry = 24453; break; // Brennan + case 10: cEntry = 24455; break; // Hollee } if (!m_pInstance->GetData(TYPE_RAND_VENDOR_1)) if (!urand(0, 9)) - cEntry = 24408; //Gunter + cEntry = 24408; // Gunter if (!m_pInstance->GetData(TYPE_RAND_VENDOR_2)) if (!urand(0, 9)) - cEntry = 24409; //Kyren + cEntry = 24409; // Kyren if (cEntry) m_creature->UpdateEntry(cEntry); if (cEntry == 24408) - m_pInstance->SetData(TYPE_RAND_VENDOR_1,DONE); + m_pInstance->SetData(TYPE_RAND_VENDOR_1, DONE); if (cEntry == 24409) - m_pInstance->SetData(TYPE_RAND_VENDOR_2,DONE); + m_pInstance->SetData(TYPE_RAND_VENDOR_2, DONE); } } - void SpellHit(Unit *caster, const SpellEntry *spell) + void SpellHit(Unit* caster, const SpellEntry* spell) { if (spell->Id == SPELL_REMOVE_AMANI_CURSE && caster->GetTypeId() == TYPEID_PLAYER && m_creature->GetEntry() == NPC_FOREST_FROG) { - //increase or decrease chance of mojo? + // increase or decrease chance of mojo? if (!urand(0, 49)) DoCastSpellIfCan(caster, SPELL_PUSH_MOJO, CAST_TRIGGERED); else @@ -138,14 +138,14 @@ struct MANGOS_DLL_DECL npc_harrison_jones_zaAI : public npc_escortAI if (!m_pInstance) return; - switch(uiPointId) + switch (uiPointId) { case 1: DoScriptText(SAY_AT_GONG, m_creature); m_pInstance->DoToggleGameObjectFlags(GO_STRANGE_GONG, GO_FLAG_NO_INTERACT, false); - //Start bang gong for 2min + // Start bang gong for 2min m_creature->CastSpell(m_creature, SPELL_BANGING_THE_GONG, false); SetEscortPaused(true); break; @@ -154,7 +154,7 @@ struct MANGOS_DLL_DECL npc_harrison_jones_zaAI : public npc_escortAI break; case 4: m_pInstance->SetData(TYPE_EVENT_RUN, IN_PROGRESS); - //TODO: Spawn group of Amani'shi Savage and make them run to entrance + // TODO: Spawn group of Amani'shi Savage and make them run to entrance break; } } @@ -171,7 +171,7 @@ struct MANGOS_DLL_DECL npc_harrison_jones_zaAI : public npc_escortAI { SetEscortPaused(bOnHold); - //Stop banging gong if still + // Stop banging gong if still if (m_pInstance && m_pInstance->GetData(TYPE_EVENT_RUN) == SPECIAL && m_creature->HasAura(SPELL_BANGING_THE_GONG)) m_creature->RemoveAurasDueToSpell(SPELL_BANGING_THE_GONG); } @@ -185,7 +185,7 @@ bool GossipHello_npc_harrison_jones_za(Player* pPlayer, Creature* pCreature) pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); if (pInstance && pInstance->GetData(TYPE_EVENT_RUN) == NOT_STARTED) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_BEGIN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_BEGIN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); return true; @@ -193,7 +193,7 @@ bool GossipHello_npc_harrison_jones_za(Player* pPlayer, Creature* pCreature) bool GossipSelect_npc_harrison_jones_za(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) { - if (uiAction == GOSSIP_ACTION_INFO_DEF+1) + if (uiAction == GOSSIP_ACTION_INFO_DEF + 1) { if (npc_harrison_jones_zaAI* pHarrisonAI = dynamic_cast(pCreature->AI())) pHarrisonAI->StartEvent(); @@ -212,7 +212,7 @@ CreatureAI* GetAI_npc_harrison_jones_za(Creature* pCreature) ## go_strange_gong ######*/ -//Unsure how this Gong must work. Here we always return false to allow Mangos always process further. +// Unsure how this Gong must work. Here we always return false to allow Mangos always process further. bool GOUse_go_strange_gong(Player* pPlayer, GameObject* pGo) { ScriptedInstance* pInstance = (ScriptedInstance*)pGo->GetInstanceData(); diff --git a/scripts/eastern_kingdoms/zulgurub/boss_arlokk.cpp b/scripts/eastern_kingdoms/zulgurub/boss_arlokk.cpp index 70341fba9..6eb773c1e 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_arlokk.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_arlokk.cpp @@ -94,7 +94,7 @@ struct MANGOS_DLL_DECL boss_arlokkAI : public ScriptedAI if (m_pInstance) m_pInstance->SetData(TYPE_ARLOKK, FAIL); - //we should be summoned, so despawn + // we should be summoned, so despawn m_creature->ForcedDespawn(); } @@ -189,7 +189,7 @@ struct MANGOS_DLL_DECL boss_arlokkAI : public ScriptedAI if (DoCastSpellIfCan(m_creature, SPELL_GOUGE) == CAST_OK) { if (m_creature->getThreatManager().getThreat(m_creature->getVictim())) - m_creature->getThreatManager().modifyThreatPercent(m_creature->getVictim(),-80); + m_creature->getThreatManager().modifyThreatPercent(m_creature->getVictim(), -80); m_uiGougeTimer = urand(17000, 27000); } diff --git a/scripts/eastern_kingdoms/zulgurub/boss_hakkar.cpp b/scripts/eastern_kingdoms/zulgurub/boss_hakkar.cpp index 28637c8d9..786c24908 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_hakkar.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_hakkar.cpp @@ -71,7 +71,7 @@ struct MANGOS_DLL_DECL boss_hakkarAI : public ScriptedAI m_uiCorruptedBloodTimer = 25000; m_uiCauseInsanityTimer = 17000; m_uiWillOfHakkarTimer = 17000; - m_uiEnrageTimer = 10*MINUTE*IN_MILLISECONDS; + m_uiEnrageTimer = 10 * MINUTE * IN_MILLISECONDS; m_uiAspectOfJeklikTimer = 4000; m_uiAspectOfVenoxisTimer = 7000; @@ -80,7 +80,7 @@ struct MANGOS_DLL_DECL boss_hakkarAI : public ScriptedAI m_uiAspectOfArlokkTimer = 18000; } - void Aggro(Unit *who) + void Aggro(Unit* who) { DoScriptText(SAY_AGGRO, m_creature); @@ -158,7 +158,7 @@ struct MANGOS_DLL_DECL boss_hakkarAI : public ScriptedAI if (m_uiEnrageTimer < uiDiff) { if (DoCastSpellIfCan(m_creature, SPELL_ENRAGE) == CAST_OK) - m_uiEnrageTimer = 10*MINUTE*IN_MILLISECONDS; + m_uiEnrageTimer = 10 * MINUTE * IN_MILLISECONDS; } else m_uiEnrageTimer -= uiDiff; diff --git a/scripts/eastern_kingdoms/zulgurub/boss_jeklik.cpp b/scripts/eastern_kingdoms/zulgurub/boss_jeklik.cpp index becc1684c..c119216b6 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_jeklik.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_jeklik.cpp @@ -35,7 +35,7 @@ enum // Bat spells SPELL_CHARGE = 22911, SPELL_SONIC_BURST = 23918, - //SPELL_PSYHIC_SCREAM = 22884, // spell not confirmed - needs research + // SPELL_PSYHIC_SCREAM = 22884, // spell not confirmed - needs research SPELL_SWOOP = 23919, SPELL_SUMMON_FRENZIED_BATS = 23974, @@ -331,7 +331,7 @@ struct MANGOS_DLL_DECL npc_gurubashi_bat_riderAI : public ScriptedAI ScriptedAI::MoveInLineOfSight(pWho); } - void UpdateAI (const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/eastern_kingdoms/zulgurub/boss_jindo.cpp b/scripts/eastern_kingdoms/zulgurub/boss_jindo.cpp index 7ffe97bb9..61bdf4d77 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_jindo.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_jindo.cpp @@ -182,7 +182,7 @@ struct MANGOS_DLL_DECL mob_healing_wardAI : public ScriptedAI void AttackStart(Unit* pWho) {} void MoveInLineOfSight(Unit* pWho) {} - void UpdateAI (const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) { // Heal Timer if (m_uiHealTimer < uiDiff) diff --git a/scripts/eastern_kingdoms/zulgurub/boss_mandokir.cpp b/scripts/eastern_kingdoms/zulgurub/boss_mandokir.cpp index 4c18c55c8..dc4049825 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_mandokir.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_mandokir.cpp @@ -27,7 +27,7 @@ EndScriptData */ enum { NPC_OHGAN = 14988, - NPC_CHAINED_SPIRIT = 15117, //resing spirits + NPC_CHAINED_SPIRIT = 15117, // resing spirits SAY_AGGRO = -1309015, SAY_DING_KILL = -1309016, @@ -47,10 +47,10 @@ enum SPELL_SUMMON_PLAYER = 25104, SPELL_LEVEL_UP = 24312, - //Ohgans Spells + // Ohgans Spells SPELL_SUNDERARMOR = 24317, - //Chained Spirit Spells + // Chained Spirit Spells SPELL_REVIVE = 24341, POINT_DOWNSTAIRS = 1 @@ -61,27 +61,27 @@ struct SpawnLocations float fX, fY, fZ, fAng; }; -static SpawnLocations aSpirits[]= +static SpawnLocations aSpirits[] = { - {-12150.9f, -1956.24f, 133.407f, 2.57835f}, - {-12157.1f, -1972.78f, 133.947f, 2.64903f}, - {-12172.3f, -1982.63f, 134.061f, 1.48664f}, - {-12194.0f, -1979.54f, 132.194f, 1.45916f}, - {-12211.3f, -1978.49f, 133.580f, 1.35705f}, - {-12228.4f, -1977.10f, 132.728f, 1.25495f}, - {-12250.0f, -1964.78f, 135.066f, 0.92901f}, - {-12264.0f, -1953.08f, 134.072f, 0.62663f}, - {-12289.0f, -1924.00f, 132.620f, 5.37829f}, - {-12267.3f, -1902.26f, 131.328f, 5.32724f}, - {-12255.3f, -1893.53f, 134.026f, 5.06413f}, - {-12229.9f, -1891.39f, 134.704f, 4.40047f}, - {-12215.9f, -1889.09f, 137.273f, 4.70285f}, - {-12200.5f, -1890.69f, 135.777f, 4.84422f}, - {-12186.0f, -1890.12f, 134.261f, 4.36513f}, - {-12246.3f, -1890.09f, 135.475f, 4.73427f}, - {-12170.7f, -1894.85f, 133.852f, 3.51690f}, - {-12279.0f, -1931.92f, 136.130f, 0.04151f}, - {-12266.1f, -1940.72f, 132.606f, 0.70910f} + { -12150.9f, -1956.24f, 133.407f, 2.57835f}, + { -12157.1f, -1972.78f, 133.947f, 2.64903f}, + { -12172.3f, -1982.63f, 134.061f, 1.48664f}, + { -12194.0f, -1979.54f, 132.194f, 1.45916f}, + { -12211.3f, -1978.49f, 133.580f, 1.35705f}, + { -12228.4f, -1977.10f, 132.728f, 1.25495f}, + { -12250.0f, -1964.78f, 135.066f, 0.92901f}, + { -12264.0f, -1953.08f, 134.072f, 0.62663f}, + { -12289.0f, -1924.00f, 132.620f, 5.37829f}, + { -12267.3f, -1902.26f, 131.328f, 5.32724f}, + { -12255.3f, -1893.53f, 134.026f, 5.06413f}, + { -12229.9f, -1891.39f, 134.704f, 4.40047f}, + { -12215.9f, -1889.09f, 137.273f, 4.70285f}, + { -12200.5f, -1890.69f, 135.777f, 4.84422f}, + { -12186.0f, -1890.12f, 134.261f, 4.36513f}, + { -12246.3f, -1890.09f, 135.475f, 4.73427f}, + { -12170.7f, -1894.85f, 133.852f, 3.51690f}, + { -12279.0f, -1931.92f, 136.130f, 0.04151f}, + { -12266.1f, -1940.72f, 132.606f, 0.70910f} }; struct MANGOS_DLL_DECL boss_mandokirAI : public ScriptedAI @@ -124,13 +124,13 @@ struct MANGOS_DLL_DECL boss_mandokirAI : public ScriptedAI { DoScriptText(SAY_AGGRO, m_creature); - for(uint8 i = 0; i < countof(aSpirits); ++i) + for (uint8 i = 0; i < countof(aSpirits); ++i) m_creature->SummonCreature(NPC_CHAINED_SPIRIT, aSpirits[i].fX, aSpirits[i].fY, aSpirits[i].fZ, aSpirits[i].fAng, TEMPSUMMON_CORPSE_DESPAWN, 0); - //At combat start Mandokir is mounted so we must unmount it first + // At combat start Mandokir is mounted so we must unmount it first m_creature->Unmount(); - //And summon his raptor + // And summon his raptor m_creature->SummonCreature(NPC_OHGAN, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 35000); if (m_pInstance) @@ -190,7 +190,7 @@ struct MANGOS_DLL_DECL boss_mandokirAI : public ScriptedAI if (m_creature->isInCombat()) { - if (Creature *pSpirit = GetClosestCreatureWithEntry(pVictim, NPC_CHAINED_SPIRIT, 50.0f)) + if (Creature* pSpirit = GetClosestCreatureWithEntry(pVictim, NPC_CHAINED_SPIRIT, 50.0f)) pSpirit->CastSpell(pVictim, SPELL_REVIVE, false); } } @@ -225,9 +225,9 @@ struct MANGOS_DLL_DECL boss_mandokirAI : public ScriptedAI m_fTargetThreat = m_creature->getThreatManager().getThreat(pTarget); m_uiWatchTimer = 6000; - //Could use this instead of hard coded timer for the above (but no script access), - //but would still a hack since we should better use the dummy, at aura removal - //SpellDurationEntry* const pDuration = sSpellDurationStore.LookupEntry(pSpell->DurationIndex); + // Could use this instead of hard coded timer for the above (but no script access), + // but would still a hack since we should better use the dummy, at aura removal + // SpellDurationEntry* const pDuration = sSpellDurationStore.LookupEntry(pSpell->DurationIndex); } } @@ -250,12 +250,12 @@ struct MANGOS_DLL_DECL boss_mandokirAI : public ScriptedAI if (m_uiWatchTimer < uiDiff) { - //If someone is watched + // If someone is watched if (m_watchTargetGuid) { Player* pWatchTarget = m_creature->GetMap()->GetPlayer(m_watchTargetGuid); - //If threat is higher that previously saved, mandokir will act + // If threat is higher that previously saved, mandokir will act if (pWatchTarget && pWatchTarget->isAlive() && m_creature->getThreatManager().getThreat(pWatchTarget) > m_fTargetThreat) { if (!m_creature->IsWithinLOSInMap(pWatchTarget)) @@ -282,7 +282,7 @@ struct MANGOS_DLL_DECL boss_mandokirAI : public ScriptedAI if (!m_watchTargetGuid) { - //Cleave + // Cleave if (m_uiCleaveTimer < uiDiff) { if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_CLEAVE) == CAST_OK) @@ -291,7 +291,7 @@ struct MANGOS_DLL_DECL boss_mandokirAI : public ScriptedAI else m_uiCleaveTimer -= uiDiff; - //Whirlwind + // Whirlwind if (m_uiWhirlwindTimer < uiDiff) { if (DoCastSpellIfCan(m_creature, SPELL_WHIRLWIND) == CAST_OK) @@ -300,13 +300,13 @@ struct MANGOS_DLL_DECL boss_mandokirAI : public ScriptedAI else m_uiWhirlwindTimer -= uiDiff; - //If more then 3 targets in melee range mandokir will cast fear + // If more then 3 targets in melee range mandokir will cast fear if (m_uiFearTimer < uiDiff) { uint8 uiTargetInRangeCount = 0; ThreatList const& tList = m_creature->getThreatManager().getThreatList(); - for (ThreatList::const_iterator i = tList.begin();i != tList.end(); ++i) + for (ThreatList::const_iterator i = tList.begin(); i != tList.end(); ++i) { Unit* pTarget = m_creature->GetMap()->GetUnit((*i)->getUnitGuid()); @@ -322,7 +322,7 @@ struct MANGOS_DLL_DECL boss_mandokirAI : public ScriptedAI else m_uiFearTimer -= uiDiff; - //Mortal Strike if target below 50% hp + // Mortal Strike if target below 50% hp if (m_creature->getVictim()->GetHealthPercent() < 50.0f) { if (m_uiMortalStrikeTimer < uiDiff) @@ -339,7 +339,7 @@ struct MANGOS_DLL_DECL boss_mandokirAI : public ScriptedAI } }; -//Ohgan +// Ohgan struct MANGOS_DLL_DECL mob_ohganAI : public ScriptedAI { mob_ohganAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } diff --git a/scripts/eastern_kingdoms/zulgurub/boss_renataki.cpp b/scripts/eastern_kingdoms/zulgurub/boss_renataki.cpp index 1bd4063c8..2c42e2768 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_renataki.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_renataki.cpp @@ -95,7 +95,7 @@ struct MANGOS_DLL_DECL boss_renatakiAI : public ScriptedAI if (DoCastSpellIfCan(m_creature, SPELL_GOUGE) == CAST_OK) { if (m_creature->getThreatManager().getThreat(m_creature->getVictim())) - m_creature->getThreatManager().modifyThreatPercent(m_creature->getVictim(),-50); + m_creature->getThreatManager().modifyThreatPercent(m_creature->getVictim(), -50); m_uiGougeTimer = urand(7000, 20000); } diff --git a/scripts/eastern_kingdoms/zulgurub/boss_thekal.cpp b/scripts/eastern_kingdoms/zulgurub/boss_thekal.cpp index 0a673a966..66e97d86e 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_thekal.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_thekal.cpp @@ -45,7 +45,7 @@ enum SPELL_GREATER_HEAL = 24208, SPELL_DISARM = 22691, - //Zealot Lor'Khan Spells + // Zealot Lor'Khan Spells SPELL_SWEEPING_STRIKES = 18765, SPELL_SINISTER_STRIKE = 15667, SPELL_GOUGE = 24698, @@ -401,7 +401,7 @@ struct MANGOS_DLL_DECL mob_zealot_lorkhanAI : public boss_thekalBaseAI m_pInstance->SetData(TYPE_LORKHAN, SPECIAL); } - void UpdateAI (const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -458,14 +458,14 @@ struct MANGOS_DLL_DECL mob_zealot_lorkhanAI : public boss_thekalBaseAI Creature* pThekal = m_pInstance->GetSingleCreatureFromStorage(NPC_THEKAL); Creature* pZath = m_pInstance->GetSingleCreatureFromStorage(NPC_ZATH); - switch(urand(0, 1)) + switch (urand(0, 1)) { case 0: - if (pThekal && m_creature->IsWithinDistInMap(pThekal, 3*ATTACK_DISTANCE)) + if (pThekal && m_creature->IsWithinDistInMap(pThekal, 3 * ATTACK_DISTANCE)) DoCastSpellIfCan(pThekal, SPELL_GREATER_HEAL); break; case 1: - if (pZath && m_creature->IsWithinDistInMap(pZath, 3*ATTACK_DISTANCE)) + if (pZath && m_creature->IsWithinDistInMap(pZath, 3 * ATTACK_DISTANCE)) DoCastSpellIfCan(pZath, SPELL_GREATER_HEAL); break; } @@ -542,7 +542,7 @@ struct MANGOS_DLL_DECL mob_zealot_zathAI : public boss_thekalBaseAI m_pInstance->SetData(TYPE_ZATH, SPECIAL); } - void UpdateAI (const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -595,7 +595,7 @@ struct MANGOS_DLL_DECL mob_zealot_zathAI : public boss_thekalBaseAI if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_GOUGE) == CAST_OK) { if (m_creature->getThreatManager().getThreat(m_creature->getVictim())) - m_creature->getThreatManager().modifyThreatPercent(m_creature->getVictim(),-100); + m_creature->getThreatManager().modifyThreatPercent(m_creature->getVictim(), -100); m_uiGougeTimer = urand(17000, 27000); } @@ -630,13 +630,13 @@ struct MANGOS_DLL_DECL mob_zealot_zathAI : public boss_thekalBaseAI bool EffectDummyCreature_thekal_resurrection(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) { - //always check spellid and effectindex + // always check spellid and effectindex if (uiSpellId == SPELL_RESURRECT && uiEffIndex == EFFECT_INDEX_0) { if (boss_thekalBaseAI* pFakerAI = dynamic_cast(pCreatureTarget->AI())) pFakerAI->Revive(); - //always return true when we are handling this spell and effect + // always return true when we are handling this spell and effect return true; } diff --git a/scripts/eastern_kingdoms/zulgurub/instance_zulgurub.cpp b/scripts/eastern_kingdoms/zulgurub/instance_zulgurub.cpp index ee0c9baa4..41edf3350 100644 --- a/scripts/eastern_kingdoms/zulgurub/instance_zulgurub.cpp +++ b/scripts/eastern_kingdoms/zulgurub/instance_zulgurub.cpp @@ -52,7 +52,7 @@ void instance_zulgurub::DoYellAtTriggerIfCan(uint32 uiTriggerId) void instance_zulgurub::OnCreatureCreate(Creature* pCreature) { - switch(pCreature->GetEntry()) + switch (pCreature->GetEntry()) { case NPC_LORKHAN: case NPC_ZATH: @@ -89,7 +89,7 @@ void instance_zulgurub::OnObjectCreate(GameObject* pGo) void instance_zulgurub::SetData(uint32 uiType, uint32 uiData) { - switch(uiType) + switch (uiType) { case TYPE_JEKLIK: case TYPE_VENOXIS: @@ -109,7 +109,7 @@ void instance_zulgurub::SetData(uint32 uiType, uint32 uiData) if (GameObject* pEgg = instance->GetGameObject(*itr)) { // Note: this type of Gameobject needs to be respawned manually - pEgg->SetRespawnTime(2*DAY); + pEgg->SetRespawnTime(2 * DAY); pEgg->Respawn(); } } @@ -125,7 +125,7 @@ void instance_zulgurub::SetData(uint32 uiType, uint32 uiData) // Note: this gameobject should change flags - currently it despawns which isn't correct if (GameObject* pGong = GetSingleGameObjectFromStorage(GO_GONG_OF_BETHEKK)) { - pGong->SetRespawnTime(2*DAY); + pGong->SetRespawnTime(2 * DAY); pGong->Respawn(); } } @@ -154,8 +154,8 @@ void instance_zulgurub::SetData(uint32 uiType, uint32 uiData) std::ostringstream saveStream; saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2] << " " - << m_auiEncounter[3] << " " << m_auiEncounter[4] << " " << m_auiEncounter[5] << " " - << m_auiEncounter[6] << " " << m_auiEncounter[7]; + << m_auiEncounter[3] << " " << m_auiEncounter[4] << " " << m_auiEncounter[5] << " " + << m_auiEncounter[6] << " " << m_auiEncounter[7]; m_strInstData = saveStream.str(); @@ -173,8 +173,8 @@ void instance_zulgurub::DoLowerHakkarHitPoints() { pHakkar->SetMaxHealth(pHakkar->GetMaxHealth() - HP_LOSS_PER_PRIEST); pHakkar->SetHealth(pHakkar->GetHealth() - HP_LOSS_PER_PRIEST); - } - } + } + } } void instance_zulgurub::Load(const char* chrIn) @@ -189,9 +189,9 @@ void instance_zulgurub::Load(const char* chrIn) std::istringstream loadStream(chrIn); loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3] - >> m_auiEncounter[4] >> m_auiEncounter[5] >> m_auiEncounter[6] >> m_auiEncounter[7]; + >> m_auiEncounter[4] >> m_auiEncounter[5] >> m_auiEncounter[6] >> m_auiEncounter[7]; - for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) + for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) { if (m_auiEncounter[i] == IN_PROGRESS) m_auiEncounter[i] = NOT_STARTED; @@ -223,7 +223,7 @@ Creature* instance_zulgurub::SelectRandomPantherTrigger(bool bIsLeft) if (vTriggers.empty()) return NULL; - return vTriggers[urand(0, vTriggers.size()-1)]; + return vTriggers[urand(0, vTriggers.size() - 1)]; } InstanceData* GetInstanceData_instance_zulgurub(Map* pMap) diff --git a/scripts/eastern_kingdoms/zulgurub/zulgurub.h b/scripts/eastern_kingdoms/zulgurub/zulgurub.h index d71cd569b..784c64a43 100644 --- a/scripts/eastern_kingdoms/zulgurub/zulgurub.h +++ b/scripts/eastern_kingdoms/zulgurub/zulgurub.h @@ -41,7 +41,7 @@ enum AREATRIGGER_ALTAR = 3960, }; -static const float aMandokirDownstairsPos[3] = {-12196.30f, -1948.37f, 130.31f}; +static const float aMandokirDownstairsPos[3] = { -12196.30f, -1948.37f, 130.31f}; class MANGOS_DLL_DECL instance_zulgurub : public ScriptedInstance { diff --git a/scripts/examples/example_creature.cpp b/scripts/examples/example_creature.cpp index 7957535bc..a9cb5f724 100644 --- a/scripts/examples/example_creature.cpp +++ b/scripts/examples/example_creature.cpp @@ -114,7 +114,7 @@ struct MANGOS_DLL_DECL example_creatureAI : public ScriptedAI { m_creature->HandleEmote(uiTextEmote); - switch(uiTextEmote) + switch (uiTextEmote) { case TEXTEMOTE_DANCE: DoScriptText(SAY_DANCE, m_creature); @@ -136,7 +136,7 @@ struct MANGOS_DLL_DECL example_creatureAI : public ScriptedAI if (m_uiSayTimer < uiDiff) { // Random switch between 5 outcomes - switch(urand(0, 4)) + switch (urand(0, 4)) { case 0: DoScriptText(SAY_RANDOM_0, m_creature); break; case 1: DoScriptText(SAY_RANDOM_1, m_creature); break; @@ -145,7 +145,7 @@ struct MANGOS_DLL_DECL example_creatureAI : public ScriptedAI case 4: DoScriptText(SAY_RANDOM_4, m_creature); break; } - m_uiSayTimer = 45*IN_MILLISECONDS; // Say something agian in 45 seconds + m_uiSayTimer = 45 * IN_MILLISECONDS; // Say something agian in 45 seconds } else m_uiSayTimer -= uiDiff; @@ -155,7 +155,7 @@ struct MANGOS_DLL_DECL example_creatureAI : public ScriptedAI { DoCastSpellIfCan(m_creature, SPELL_BUFF); // Rebuff agian in 15 minutes - m_uiRebuffTimer = 15*MINUTE*IN_MILLISECONDS; + m_uiRebuffTimer = 15 * MINUTE * IN_MILLISECONDS; } else m_uiRebuffTimer -= uiDiff; @@ -170,7 +170,7 @@ struct MANGOS_DLL_DECL example_creatureAI : public ScriptedAI if (m_uiSpellOneTimer < uiDiff) { // Cast spell one on our current target. - if (rand()%50 > 10) + if (rand() % 50 > 10) DoCastSpellIfCan(m_creature->getVictim(), SPELL_ONE_ALT); else if (m_creature->IsWithinDist(m_creature->getVictim(), 25.0f)) DoCastSpellIfCan(m_creature->getVictim(), SPELL_ONE); @@ -185,7 +185,7 @@ struct MANGOS_DLL_DECL example_creatureAI : public ScriptedAI { // Cast spell two on self (AoE spell with only self-target) if we can if (DoCastSpellIfCan(m_creature, SPELL_TWO) == CAST_OK) - m_uiSpellTwoTimer = 37*IN_MILLISECONDS; // Only Update Timer, if we could start casting + m_uiSpellTwoTimer = 37 * IN_MILLISECONDS; // Only Update Timer, if we could start casting } else m_uiSpellTwoTimer -= uiDiff; @@ -265,7 +265,7 @@ bool GossipHello_example_creature(Player* pPlayer, Creature* pCreature) // In this case here the faction change could be handled by world-DB gossip, hence it should be handled there! bool GossipSelect_example_creature(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) { - if (uiAction == GOSSIP_ACTION_INFO_DEF+1) + if (uiAction == GOSSIP_ACTION_INFO_DEF + 1) { pPlayer->CLOSE_GOSSIP_MENU(); // Set our faction to hostile towards all diff --git a/scripts/examples/example_escort.cpp b/scripts/examples/example_escort.cpp index 4153366e5..9a89aeaae 100644 --- a/scripts/examples/example_escort.cpp +++ b/scripts/examples/example_escort.cpp @@ -80,14 +80,14 @@ struct MANGOS_DLL_DECL example_escortAI : public npc_escortAI break; case 3: DoScriptText(SAY_WP_2, m_creature); - m_creature->SummonCreature(NPC_FELBOAR, m_creature->GetPositionX()+5.0f, m_creature->GetPositionY()+7.0f, m_creature->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 3000); + m_creature->SummonCreature(NPC_FELBOAR, m_creature->GetPositionX() + 5.0f, m_creature->GetPositionY() + 7.0f, m_creature->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 3000); break; case 4: if (Player* pTmpPlayer = GetPlayerForEscort()) { - //pTmpPlayer is the target of the text + // pTmpPlayer is the target of the text DoScriptText(SAY_WP_3, m_creature, pTmpPlayer); - //pTmpPlayer is the source of the text + // pTmpPlayer is the source of the text DoScriptText(SAY_WP_4, pTmpPlayer); } break; @@ -115,7 +115,7 @@ struct MANGOS_DLL_DECL example_escortAI : public npc_escortAI // not a likely case, code here for the sake of example if (pKiller == m_creature) { - //This is actually a whisper. You control the text type in database + // This is actually a whisper. You control the text type in database DoScriptText(SAY_DEATH_1, m_creature, pTemp); } else @@ -147,7 +147,7 @@ struct MANGOS_DLL_DECL example_escortAI : public npc_escortAI } else { - //Out of combat but being escorted + // Out of combat but being escorted if (HasEscortState(STATE_ESCORT_ESCORTING)) { if (m_uiChatTimer < uiDiff) @@ -182,9 +182,9 @@ bool GossipHello_example_escort(Player* pPlayer, Creature* pCreature) pPlayer->TalkedToCreature(pCreature->GetEntry(), pCreature->GetObjectGuid()); pPlayer->PrepareGossipMenu(pCreature, pPlayer->GetDefaultGossipMenuForSource(pCreature)); - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); pPlayer->SendPreparedGossip(pCreature); @@ -195,7 +195,7 @@ bool GossipSelect_example_escort(Player* pPlayer, Creature* pCreature, uint32 ui { example_escortAI* pEscortAI = dynamic_cast(pCreature->AI()); - switch(uiAction) + switch (uiAction) { case GOSSIP_ACTION_INFO_DEF+1: pPlayer->CLOSE_GOSSIP_MENU(); diff --git a/scripts/examples/example_gossip_codebox.cpp b/scripts/examples/example_gossip_codebox.cpp index 5b6e55a93..0caa6623b 100644 --- a/scripts/examples/example_gossip_codebox.cpp +++ b/scripts/examples/example_gossip_codebox.cpp @@ -41,8 +41,8 @@ enum // This function is called when the player opens the gossip menubool bool GossipHello_example_gossip_codebox(Player* pPlayer, Creature* pCreature) { - pPlayer->ADD_GOSSIP_ITEM_EXTENDED(0, GOSSIP_ITEM_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1, "", 0, true); - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); + pPlayer->ADD_GOSSIP_ITEM_EXTENDED(0, GOSSIP_ITEM_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1, "", 0, true); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); pPlayer->PlayerTalkClass->SendGossipMenu(907, pCreature->GetObjectGuid()); @@ -52,7 +52,7 @@ bool GossipHello_example_gossip_codebox(Player* pPlayer, Creature* pCreature) // This function is called when the player clicks an option on the gossip menubool bool GossipSelect_example_gossip_codebox(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) { - if (uiAction == GOSSIP_ACTION_INFO_DEF+2) + if (uiAction == GOSSIP_ACTION_INFO_DEF + 2) { DoScriptText(SAY_NOT_INTERESTED, pCreature); pPlayer->CLOSE_GOSSIP_MENU(); @@ -67,20 +67,20 @@ bool GossipSelectWithCode_example_gossip_codebox(Player* pPlayer, Creature* pCre { switch (uiAction) { - case GOSSIP_ACTION_INFO_DEF+1: - if (std::strcmp(sCode, pPlayer->GetName()) != 0) - { - DoScriptText(SAY_WRONG, pCreature); - pCreature->CastSpell(pPlayer, SPELL_POLYMORPH, true); - } - else - { - DoScriptText(SAY_CORRECT, pCreature); - pCreature->CastSpell(pPlayer, SPELL_MARK_OF_THE_WILD, true); - } - pPlayer->CLOSE_GOSSIP_MENU(); + case GOSSIP_ACTION_INFO_DEF+1: + if (std::strcmp(sCode, pPlayer->GetName()) != 0) + { + DoScriptText(SAY_WRONG, pCreature); + pCreature->CastSpell(pPlayer, SPELL_POLYMORPH, true); + } + else + { + DoScriptText(SAY_CORRECT, pCreature); + pCreature->CastSpell(pPlayer, SPELL_MARK_OF_THE_WILD, true); + } + pPlayer->CLOSE_GOSSIP_MENU(); - return true; + return true; } } diff --git a/scripts/kalimdor/ashenvale.cpp b/scripts/kalimdor/ashenvale.cpp index f0cbe4a13..e7313679e 100644 --- a/scripts/kalimdor/ashenvale.cpp +++ b/scripts/kalimdor/ashenvale.cpp @@ -64,14 +64,14 @@ enum NPC_VORSHA = 12940 }; -static float m_afFirstNagaCoord[3][3]= +static float m_afFirstNagaCoord[3][3] = { {3603.504150f, 1122.631104f, 1.635f}, // rider {3589.293945f, 1148.664063f, 5.565f}, // sorceress {3609.925537f, 1168.759521f, -1.168f} // razortail }; -static float m_afSecondNagaCoord[3][3]= +static float m_afSecondNagaCoord[3][3] = { {3609.925537f, 1168.759521f, -1.168f}, // witch {3645.652100f, 1139.425415f, 1.322f}, // priest @@ -119,7 +119,7 @@ struct MANGOS_DLL_DECL npc_muglashAI : public npc_escortAI void WaypointReached(uint32 uiPointId) { - switch(uiPointId) + switch (uiPointId) { case 0: if (Player* pPlayer = GetPlayerForEscort()) @@ -129,9 +129,9 @@ struct MANGOS_DLL_DECL npc_muglashAI : public npc_escortAI if (Player* pPlayer = GetPlayerForEscort()) DoScriptText(SAY_MUG_BRAZIER, m_creature, pPlayer); - if (GameObject* pGo = GetClosestGameObjectWithEntry(m_creature, GO_NAGA_BRAZIER, INTERACTION_DISTANCE*2)) + if (GameObject* pGo = GetClosestGameObjectWithEntry(m_creature, GO_NAGA_BRAZIER, INTERACTION_DISTANCE * 2)) { - //some kind of event flag? Update to player/group only? + // some kind of event flag? Update to player/group only? pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NO_INTERACT); SetEscortPaused(true); } @@ -153,7 +153,7 @@ struct MANGOS_DLL_DECL npc_muglashAI : public npc_escortAI void DoWaveSummon() { - switch(m_uiWaveId) + switch (m_uiWaveId) { case 1: m_creature->SummonCreature(NPC_WRATH_RIDER, m_afFirstNagaCoord[0][0], m_afFirstNagaCoord[0][1], m_afFirstNagaCoord[0][2], 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 60000); @@ -226,7 +226,7 @@ CreatureAI* GetAI_npc_muglash(Creature* pCreature) bool GOUse_go_naga_brazier(Player* pPlayer, GameObject* pGo) { - if (Creature* pCreature = GetClosestCreatureWithEntry(pGo, NPC_MUGLASH, INTERACTION_DISTANCE*2)) + if (Creature* pCreature = GetClosestCreatureWithEntry(pGo, NPC_MUGLASH, INTERACTION_DISTANCE * 2)) { if (npc_muglashAI* pEscortAI = dynamic_cast(pCreature->AI())) { @@ -260,7 +260,7 @@ struct MANGOS_DLL_DECL npc_ruul_snowhoofAI : public npc_escortAI void WaypointReached(uint32 uiPointId) { - switch(uiPointId) + switch (uiPointId) { case 13: m_creature->SummonCreature(NPC_T_TOTEMIC, 3449.218018f, -587.825073f, 174.978867f, 4.714445f, TEMPSUMMON_DEAD_DESPAWN, 60000); @@ -346,7 +346,7 @@ struct MANGOS_DLL_DECL npc_torekAI : public npc_escortAI if (!pPlayer) return; - switch(uiPointId) + switch (uiPointId) { case 1: DoScriptText(SAY_MOVE, m_creature, pPlayer); @@ -355,10 +355,10 @@ struct MANGOS_DLL_DECL npc_torekAI : public npc_escortAI DoScriptText(SAY_PREPARE, m_creature, pPlayer); break; case 19: - //TODO: verify location and creatures amount. - m_creature->SummonCreature(NPC_DURIEL, 1776.73f, -2049.06f, 109.83f, 1.54f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,25000); - m_creature->SummonCreature(NPC_SILVERWING_SENTINEL, 1774.64f, -2049.41f, 109.83f, 1.40f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,25000); - m_creature->SummonCreature(NPC_SILVERWING_WARRIOR, 1778.73f, -2049.50f, 109.83f, 1.67f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,25000); + // TODO: verify location and creatures amount. + m_creature->SummonCreature(NPC_DURIEL, 1776.73f, -2049.06f, 109.83f, 1.54f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000); + m_creature->SummonCreature(NPC_SILVERWING_SENTINEL, 1774.64f, -2049.41f, 109.83f, 1.40f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000); + m_creature->SummonCreature(NPC_SILVERWING_WARRIOR, 1778.73f, -2049.50f, 109.83f, 1.67f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000); break; case 20: DoScriptText(SAY_WIN, m_creature, pPlayer); @@ -404,7 +404,7 @@ bool QuestAccept_npc_torek(Player* pPlayer, Creature* pCreature, const Quest* pQ { if (pQuest->GetQuestId() == QUEST_TOREK_ASSULT) { - //TODO: find companions, make them follow Torek, at any time (possibly done by mangos/database in future?) + // TODO: find companions, make them follow Torek, at any time (possibly done by mangos/database in future?) DoScriptText(SAY_READY, pCreature, pPlayer); if (npc_torekAI* pEscortAI = dynamic_cast(pCreature->AI())) @@ -487,19 +487,19 @@ struct MANGOS_DLL_DECL npc_feero_ironhandAI : public npc_escortAI void WaypointReached(uint32 uiPointId) { - switch(uiPointId) + switch (uiPointId) { case 14: // Prepare the first ambush DoScriptText(SAY_FIRST_AMBUSH_START, m_creature); for (uint8 i = 0; i < 4; ++i) - DoSpawnMob(NPC_DARK_STRAND_ASSASSIN, aSummonPositions[0][0], aSummonPositions[0][1] - M_PI_F/4 * i); + DoSpawnMob(NPC_DARK_STRAND_ASSASSIN, aSummonPositions[0][0], aSummonPositions[0][1] - M_PI_F / 4 * i); break; case 20: // Prepare the second ambush DoScriptText(SAY_SECOND_AMBUSH_START, m_creature); for (uint8 i = 0; i < 3; ++i) - DoSpawnMob(NPC_FORSAKEN_SCOUT, aSummonPositions[1][0], aSummonPositions[1][1] - M_PI_F/3 * i); + DoSpawnMob(NPC_FORSAKEN_SCOUT, aSummonPositions[1][0], aSummonPositions[1][1] - M_PI_F / 3 * i); break; case 29: // Final ambush @@ -544,7 +544,7 @@ struct MANGOS_DLL_DECL npc_feero_ironhandAI : public npc_escortAI if (!m_uiCreaturesCount) { - switch(pSummoned->GetEntry()) + switch (pSummoned->GetEntry()) { case NPC_DARK_STRAND_ASSASSIN: DoScriptText(SAY_FIRST_AMBUSH_END, m_creature); diff --git a/scripts/kalimdor/azshara.cpp b/scripts/kalimdor/azshara.cpp index 6ea899305..5bc25ba2b 100644 --- a/scripts/kalimdor/azshara.cpp +++ b/scripts/kalimdor/azshara.cpp @@ -49,20 +49,20 @@ enum NPC_DEPTH_CHARGE = 23025, SPELL_SUMMON_RIZZLE = 39866, - SPELL_BLACKJACK = 39865, //stuns player - SPELL_ESCAPE = 39871, //teleports to water + SPELL_BLACKJACK = 39865, // stuns player + SPELL_ESCAPE = 39871, // teleports to water SPELL_SWIM_SPEED = 40596, - SPELL_FROST_TRAP = 39902, //not used? + SPELL_FROST_TRAP = 39902, // not used? - SPELL_PERIODIC_GRENADE = 40553, //cannot tell who are supposed to have this aura - SPELL_FROST_GRENADE = 40525, //triggered by periodic grenade + SPELL_PERIODIC_GRENADE = 40553, // cannot tell who are supposed to have this aura + SPELL_FROST_GRENADE = 40525, // triggered by periodic grenade - SPELL_SUMMON_DEPTH_CHARGE = 39907, //summons the bomb creature - SPELL_TRAP = 39899, //knockback + SPELL_SUMMON_DEPTH_CHARGE = 39907, // summons the bomb creature + SPELL_TRAP = 39899, // knockback SPELL_PERIODIC_CHECK = 39888, - SPELL_SURRENDER = 39889, //should be triggered by periodic check, if player comes in certain distance with quest incomplete + SPELL_SURRENDER = 39889, // should be triggered by periodic check, if player comes in certain distance with quest incomplete SPELL_GIVE_MOONSTONE = 39886 }; @@ -102,10 +102,10 @@ struct MANGOS_DLL_DECL npc_rizzle_sprysprocketAI : public npc_escortAI void WaypointReached(uint32 uiPointId) { - switch(uiPointId) + switch (uiPointId) { case 0: - m_creature->CastSpell(m_creature,SPELL_PERIODIC_CHECK,true); + m_creature->CastSpell(m_creature, SPELL_PERIODIC_CHECK, true); break; } } @@ -122,17 +122,17 @@ struct MANGOS_DLL_DECL npc_rizzle_sprysprocketAI : public npc_escortAI } } - //this may be wrong (and doesn't work) + // this may be wrong (and doesn't work) void SpellHitTarget(Unit* pTarget, const SpellEntry* pSpell) { if (pTarget->GetTypeId() == TYPEID_PLAYER && pSpell->Id == SPELL_FROST_GRENADE) DoScriptText(SAY_WHISPER_CHILL, m_creature, pTarget); } - //this may be wrong + // this may be wrong void JustSummoned(Creature* pSummoned) { - //pSummoned->CastSpell(pSummoned,SPELL_PERIODIC_GRENADE,false,NULL,NULL,m_creature->GetObjectGuid()); + // pSummoned->CastSpell(pSummoned,SPELL_PERIODIC_GRENADE,false,NULL,NULL,m_creature->GetObjectGuid()); } void UpdateEscortAI(const uint32 uiDiff) @@ -147,14 +147,14 @@ struct MANGOS_DLL_DECL npc_rizzle_sprysprocketAI : public npc_escortAI return; } - switch(m_uiIntroPhase) + switch (m_uiIntroPhase) { case 0: DoScriptText(SAY_START, m_creature); DoScriptText(EMOTE_START, m_creature); break; case 1: - //teleports to water _before_ we Start() + // teleports to water _before_ we Start() m_creature->CastSpell(m_creature, SPELL_ESCAPE, false); break; case 2: @@ -188,7 +188,7 @@ CreatureAI* GetAI_npc_rizzle_sprysprocket(Creature* pCreature) bool GossipHello_npc_rizzle_sprysprocket(Player* pPlayer, Creature* pCreature) { if (pPlayer->GetQuestStatus(QUEST_MOONSTONE) == QUEST_STATUS_INCOMPLETE) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_MOONSTONE, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_MOONSTONE, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); return true; @@ -196,7 +196,7 @@ bool GossipHello_npc_rizzle_sprysprocket(Player* pPlayer, Creature* pCreature) bool GossipSelect_npc_rizzle_sprysprocket(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) { - if (uiAction == GOSSIP_ACTION_INFO_DEF+1) + if (uiAction == GOSSIP_ACTION_INFO_DEF + 1) { pPlayer->CLOSE_GOSSIP_MENU(); pPlayer->CastSpell(pPlayer, SPELL_GIVE_MOONSTONE, false); @@ -232,8 +232,8 @@ CreatureAI* GetAI_npc_depth_charge(Creature* pCreature) bool GOUse_go_southfury_moonstone(Player* pPlayer, GameObject* pGo) { - //implicitTarget=48 not implemented as of writing this code, and manual summon may be just ok for our purpose - //pPlayer->CastSpell(pPlayer,SPELL_SUMMON_RIZZLE,false); + // implicitTarget=48 not implemented as of writing this code, and manual summon may be just ok for our purpose + // pPlayer->CastSpell(pPlayer,SPELL_SUMMON_RIZZLE,false); if (Creature* pCreature = pPlayer->SummonCreature(NPC_RIZZLE, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_DEAD_DESPAWN, 0)) pCreature->CastSpell(pPlayer, SPELL_BLACKJACK, false); @@ -325,7 +325,7 @@ struct MANGOS_DLL_DECL mobs_spitelashesAI : public ScriptedAI // Creature get polymorphed into a sheep and after 5 secs despawns if (pCaster->GetTypeId() == TYPEID_PLAYER && ((Player*)pCaster)->GetQuestStatus(QUEST_FRAGMENTED_MAGIC) == QUEST_STATUS_INCOMPLETE && - (pSpell->Id==118 || pSpell->Id== 12824 || pSpell->Id== 12825 || pSpell->Id== 12826)) + (pSpell->Id == 118 || pSpell->Id == 12824 || pSpell->Id == 12825 || pSpell->Id == 12826)) m_uiMorphTimer = 5000; } @@ -333,7 +333,7 @@ struct MANGOS_DLL_DECL mobs_spitelashesAI : public ScriptedAI { Unit* pTarget = NULL; - switch(m_aSpitelashAbility[uiIndex].m_uiTargetType) + switch (m_aSpitelashAbility[uiIndex].m_uiTargetType) { case TARGET_TYPE_SELF: pTarget = m_creature; @@ -410,10 +410,10 @@ bool GossipHello_npc_loramus_thalipedes(Player* pPlayer, Creature* pCreature) pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); if (pPlayer->GetQuestStatus(2744) == QUEST_STATUS_INCOMPLETE) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Can you help me?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Can you help me?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); if (pPlayer->GetQuestStatus(3141) == QUEST_STATUS_INCOMPLETE) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Tell me your story", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Tell me your story", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); @@ -422,7 +422,7 @@ bool GossipHello_npc_loramus_thalipedes(Player* pPlayer, Creature* pCreature) bool GossipSelect_npc_loramus_thalipedes(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) { - switch(uiAction) + switch (uiAction) { case GOSSIP_ACTION_INFO_DEF+1: pPlayer->CLOSE_GOSSIP_MENU(); diff --git a/scripts/kalimdor/azuremyst_isle.cpp b/scripts/kalimdor/azuremyst_isle.cpp index 351158076..9076d8d04 100644 --- a/scripts/kalimdor/azuremyst_isle.cpp +++ b/scripts/kalimdor/azuremyst_isle.cpp @@ -84,10 +84,10 @@ struct MANGOS_DLL_DECL npc_draenei_survivorAI : public ScriptedAI void MoveInLineOfSight(Unit* pWho) { if (m_bCanSayHelp && pWho->GetTypeId() == TYPEID_PLAYER && m_creature->IsFriendlyTo(pWho) && - m_creature->IsWithinDistInMap(pWho, 25.0f)) + m_creature->IsWithinDistInMap(pWho, 25.0f)) { - //Random switch between 4 texts - switch(urand(0, 3)) + // Random switch between 4 texts + switch (urand(0, 3)) { case 0: DoScriptText(SAY_HELP1, m_creature, pWho); break; case 1: DoScriptText(SAY_HELP2, m_creature, pWho); break; @@ -128,7 +128,7 @@ struct MANGOS_DLL_DECL npc_draenei_survivorAI : public ScriptedAI if (pPlayer->GetTypeId() != TYPEID_PLAYER) return; - switch(urand(0, 3)) + switch (urand(0, 3)) { case 0: DoScriptText(SAY_HEAL1, m_creature, pPlayer); break; case 1: DoScriptText(SAY_HEAL2, m_creature, pPlayer); break; @@ -144,7 +144,8 @@ struct MANGOS_DLL_DECL npc_draenei_survivorAI : public ScriptedAI m_uiRunAwayTimer = 10000; m_uiSayThanksTimer = 0; - }else m_uiSayThanksTimer -= uiDiff; + } + else m_uiSayThanksTimer -= uiDiff; return; } @@ -163,7 +164,8 @@ struct MANGOS_DLL_DECL npc_draenei_survivorAI : public ScriptedAI { m_bCanSayHelp = true; m_uiSayHelpTimer = 20000; - }else m_uiSayHelpTimer -= uiDiff; + } + else m_uiSayHelpTimer -= uiDiff; } }; @@ -222,7 +224,7 @@ struct MANGOS_DLL_DECL npc_engineer_spark_overgrindAI : public ScriptedAI m_bIsTreeEvent = false; } - void Aggro(Unit *who) + void Aggro(Unit* who) { DoScriptText(SAY_ATTACK, m_creature, who); } @@ -241,7 +243,7 @@ struct MANGOS_DLL_DECL npc_engineer_spark_overgrindAI : public ScriptedAI } else if (m_bIsTreeEvent) { - //nothing here yet + // nothing here yet return; } @@ -296,7 +298,7 @@ struct MANGOS_DLL_DECL npc_injured_draeneiAI : public ScriptedAI { m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IN_COMBAT); m_creature->SetHealth(int(m_creature->GetMaxHealth()*.15)); - switch(urand(0, 1)) + switch (urand(0, 1)) { case 0: m_creature->SetStandState(UNIT_STAND_STATE_SIT); break; case 1: m_creature->SetStandState(UNIT_STAND_STATE_SLEEP); break; @@ -340,7 +342,7 @@ struct MANGOS_DLL_DECL npc_magwinAI : public npc_escortAI if (!pPlayer) return; - switch(uiPointId) + switch (uiPointId) { case 0: DoScriptText(SAY_START, m_creature, pPlayer); diff --git a/scripts/kalimdor/blackfathom_deeps/blackfathom_deeps.h b/scripts/kalimdor/blackfathom_deeps/blackfathom_deeps.h index e316c5812..6804ba709 100644 --- a/scripts/kalimdor/blackfathom_deeps/blackfathom_deeps.h +++ b/scripts/kalimdor/blackfathom_deeps/blackfathom_deeps.h @@ -29,23 +29,23 @@ enum GO_SHRINE_4 = 21121, }; - /* This is the spawn pattern for the event mobs - * D - * 0 3 - * 1 S 4 - * 2 5 - * E +/* This is the spawn pattern for the event mobs +* D +* 0 3 +* 1 S 4 +* 2 5 +* E - * This event spawns 4 sets of mobs - * The order in whitch the fires are lit doesn't matter +* This event spawns 4 sets of mobs +* The order in whitch the fires are lit doesn't matter - * First: 3 Snapjaws: Positions 0, 1, 5 - * Second: 2 Servants: Positions 1, 4 - * Third: 4 Crabs: Positions 0, 2, 3, 4 - * Fourth: 10 Murkshallows: Positions 2*0, 1, 2*2; 3, 2*4, 2*5 +* First: 3 Snapjaws: Positions 0, 1, 5 +* Second: 2 Servants: Positions 1, 4 +* Third: 4 Crabs: Positions 0, 2, 3, 4 +* Fourth: 10 Murkshallows: Positions 2*0, 1, 2*2; 3, 2*4, 2*5 - * On wipe the mobs don't despawn; they stay there until player returns - */ +* On wipe the mobs don't despawn; they stay there until player returns +*/ struct Locations { @@ -54,12 +54,12 @@ struct Locations static const Locations aSpawnLocations[6] = // Should be near the correct positions { - {-768.949f, -174.413f, -25.87f, 3.09f}, // Left side - {-768.888f, -164.238f, -25.87f, 3.09f}, - {-768.951f, -153.911f, -25.88f, 3.09f}, - {-867.782f, -174.352f, -25.87f, 6.27f}, // Right side - {-867.875f, -164.089f, -25.87f, 6.27f}, - {-867.859f, -153.927f, -25.88f, 6.27f} + { -768.949f, -174.413f, -25.87f, 3.09f}, // Left side + { -768.888f, -164.238f, -25.87f, 3.09f}, + { -768.951f, -153.911f, -25.88f, 3.09f}, + { -867.782f, -174.352f, -25.87f, 6.27f}, // Right side + { -867.875f, -164.089f, -25.87f, 6.27f}, + { -867.859f, -153.927f, -25.88f, 6.27f} }; struct PosCount diff --git a/scripts/kalimdor/blackfathom_deeps/instance_blackfathom_deeps.cpp b/scripts/kalimdor/blackfathom_deeps/instance_blackfathom_deeps.cpp index dc082cab7..7c352f4ba 100644 --- a/scripts/kalimdor/blackfathom_deeps/instance_blackfathom_deeps.cpp +++ b/scripts/kalimdor/blackfathom_deeps/instance_blackfathom_deeps.cpp @@ -49,7 +49,7 @@ void instance_blackfathom_deeps::OnCreatureCreate(Creature* pCreature) void instance_blackfathom_deeps::OnObjectCreate(GameObject* pGo) { - switch(pGo->GetEntry()) + switch (pGo->GetEntry()) { case GO_PORTAL_DOOR: if (m_auiEncounter[1] == DONE) @@ -109,7 +109,7 @@ void instance_blackfathom_deeps::DoSpawnMobs(uint8 uiWaveIndex) void instance_blackfathom_deeps::SetData(uint32 uiType, uint32 uiData) { - switch(uiType) + switch (uiType) { case TYPE_KELRIS: // EventAI must set instance data (1,3) at his death if (m_auiEncounter[0] != DONE && uiData == DONE) @@ -143,7 +143,7 @@ void instance_blackfathom_deeps::SetData(uint32 uiType, uint32 uiData) uint32 instance_blackfathom_deeps::GetData(uint32 uiType) { - switch(uiType) + switch (uiType) { case TYPE_KELRIS: return m_auiEncounter[0]; case TYPE_SHRINE: return m_auiEncounter[1]; @@ -165,7 +165,7 @@ void instance_blackfathom_deeps::Load(const char* chrIn) std::istringstream loadStream(chrIn); loadStream >> m_auiEncounter[0] >> m_auiEncounter[1]; - for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) + for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) { if (m_auiEncounter[i] == IN_PROGRESS) m_auiEncounter[i] = NOT_STARTED; diff --git a/scripts/kalimdor/bloodmyst_isle.cpp b/scripts/kalimdor/bloodmyst_isle.cpp index 33eb8749c..65fee7e88 100644 --- a/scripts/kalimdor/bloodmyst_isle.cpp +++ b/scripts/kalimdor/bloodmyst_isle.cpp @@ -49,7 +49,7 @@ struct MANGOS_DLL_DECL mob_webbed_creatureAI : public ScriptedAI { uint32 uiSpawnCreatureEntry = 0; - switch(urand(0, 2)) + switch (urand(0, 2)) { case 0: uiSpawnCreatureEntry = NPC_EXPEDITION_RESEARCHER; diff --git a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.cpp b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.cpp index eba264466..b9ef3d467 100644 --- a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.cpp +++ b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.cpp @@ -54,7 +54,7 @@ enum TEXT_ID_INN_4 = 12952, }; -bool GossipHello_npc_chromie(Player *pPlayer, Creature *pCreature) +bool GossipHello_npc_chromie(Player* pPlayer, Creature* pCreature) { if (pCreature->isQuestGiver()) pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); @@ -67,13 +67,13 @@ bool GossipHello_npc_chromie(Player *pPlayer, Creature *pCreature) if (m_pInstance->GetData(TYPE_GRAIN_EVENT) != DONE) { if (pPlayer->GetQuestRewardStatus(QUEST_DISPELLING_ILLUSIONS) && !pPlayer->HasItemCount(ITEM_ARCANE_DISRUPTOR, 1)) - pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_INN_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_INN_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); } pPlayer->SEND_GOSSIP_MENU(TEXT_ID_INN_1, pCreature->GetObjectGuid()); break; case NPC_CHROMIE_ENTRANCE: if (m_pInstance->GetData(TYPE_GRAIN_EVENT) == DONE && m_pInstance->GetData(TYPE_ARTHAS_INTRO_EVENT) == NOT_STARTED && pPlayer->GetQuestRewardStatus(QUEST_A_ROYAL_ESCORT)) - pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_ENTRANCE_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_ENTRANCE_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); pPlayer->SEND_GOSSIP_MENU(TEXT_ID_ENTRANCE_1, pCreature->GetObjectGuid()); break; } @@ -217,7 +217,7 @@ bool EffectAuraDummy_spell_aura_dummy_npc_crates_dummy(const Aura* pAura, bool b } // pTarget->ForcedDespawn(); // direct despawn has influence on visual effects, - // but despawning makes it impossible to multi-use the spell at the same place + // but despawning makes it impossible to multi-use the spell at the same place // perhaps some add. GO-Visual } } diff --git a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.h b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.h index 3772457aa..793a88332 100644 --- a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.h +++ b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.h @@ -128,12 +128,12 @@ class MANGOS_DLL_DECL instance_culling_of_stratholme : public ScriptedInstance void Update(uint32 uiDiff); - void GetStratAgiatedCitizenList(GuidList &lList){ lList = m_lAgiatedCitizenGUIDList; }; - void GetStratAgiatedResidentList(GuidList &lList){ lList = m_lAgiatedResidentGUIDList; }; + void GetStratAgiatedCitizenList(GuidList& lList) { lList = m_lAgiatedCitizenGUIDList; }; + void GetStratAgiatedResidentList(GuidList& lList) { lList = m_lAgiatedResidentGUIDList; }; - void GetCratesBunnyOrderedList(std::list &lList); + void GetCratesBunnyOrderedList(std::list& lList); Creature* GetStratIntroFootman(); - void GetResidentOrderedList(std::list &lList); + void GetResidentOrderedList(std::list& lList); void DoSpawnArthasIfNeeded(); void DoSpawnChromieIfNeeded(); uint8 GetInstancePosition(); diff --git a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/instance_culling_of_stratholme.cpp b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/instance_culling_of_stratholme.cpp index c7499d56e..5f5880eb0 100644 --- a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/instance_culling_of_stratholme.cpp +++ b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/instance_culling_of_stratholme.cpp @@ -67,7 +67,7 @@ void instance_culling_of_stratholme::Initialize() void instance_culling_of_stratholme::OnCreatureCreate(Creature* pCreature) { - switch(pCreature->GetEntry()) + switch (pCreature->GetEntry()) { case NPC_CHROMIE_ENTRANCE: case NPC_CHROMIE_END: @@ -106,7 +106,7 @@ void instance_culling_of_stratholme::OnCreatureCreate(Creature* pCreature) void instance_culling_of_stratholme::OnObjectCreate(GameObject* pGo) { - switch(pGo->GetEntry()) + switch (pGo->GetEntry()) { case GO_DOOR_BOOKCASE: if (m_auiEncounter[TYPE_EPOCH_EVENT] == DONE) @@ -129,7 +129,7 @@ void instance_culling_of_stratholme::DoChromieHurrySpeech() Map::PlayerList const& players = instance->GetPlayers(); if (!players.isEmpty()) { - for(Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr) + for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr) { if (Player* pPlayer = itr->getSource()) DoScriptText(SAY_CHROMIE_HURRY, pChromie, pPlayer); @@ -140,7 +140,7 @@ void instance_culling_of_stratholme::DoChromieHurrySpeech() void instance_culling_of_stratholme::SetData(uint32 uiType, uint32 uiData) { - switch(uiType) + switch (uiType) { case TYPE_GRAIN_EVENT: m_auiEncounter[uiType] = uiData; @@ -184,7 +184,7 @@ void instance_culling_of_stratholme::SetData(uint32 uiType, uint32 uiData) m_auiEncounter[uiType] = uiData; if (uiData == DONE) { - DoRespawnGameObject(instance->IsRegularDifficulty() ? GO_DARK_RUNED_CHEST : GO_DARK_RUNED_CHEST_H, 30*MINUTE); + DoRespawnGameObject(instance->IsRegularDifficulty() ? GO_DARK_RUNED_CHEST : GO_DARK_RUNED_CHEST_H, 30 * MINUTE); DoSpawnChromieIfNeeded(); } break; @@ -196,15 +196,15 @@ void instance_culling_of_stratholme::SetData(uint32 uiType, uint32 uiData) DoUpdateWorldState(WORLD_STATE_TIME_COUNTER, 0); } else - DoUpdateWorldState(WORLD_STATE_TIME_COUNTER, uiData/(MINUTE*IN_MILLISECONDS)); + DoUpdateWorldState(WORLD_STATE_TIME_COUNTER, uiData / (MINUTE * IN_MILLISECONDS)); break; case TYPE_INFINITE_CORRUPTER: m_auiEncounter[uiType] = uiData; - switch(uiData) + switch (uiData) { case IN_PROGRESS: if (!m_auiEncounter[TYPE_INFINITE_CORRUPTER_TIME]) - SetData(TYPE_INFINITE_CORRUPTER_TIME, MINUTE*25*IN_MILLISECONDS); + SetData(TYPE_INFINITE_CORRUPTER_TIME, MINUTE * 25 * IN_MILLISECONDS); DoUpdateWorldState(WORLD_STATE_TIME, 1);// Show Timer break; case DONE: @@ -229,8 +229,8 @@ void instance_culling_of_stratholme::SetData(uint32 uiType, uint32 uiData) std::ostringstream saveStream; saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2] << " " - << m_auiEncounter[3] << " " << m_auiEncounter[4] << " " << m_auiEncounter[5] << " " - << m_auiEncounter[6] << " " << m_auiEncounter[7] << " " << m_auiEncounter[8]; + << m_auiEncounter[3] << " " << m_auiEncounter[4] << " " << m_auiEncounter[5] << " " + << m_auiEncounter[6] << " " << m_auiEncounter[7] << " " << m_auiEncounter[8]; m_strInstData = saveStream.str(); @@ -251,9 +251,9 @@ void instance_culling_of_stratholme::Load(const char* chrIn) std::istringstream loadStream(chrIn); loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3] - >> m_auiEncounter[4] >> m_auiEncounter[5] >> m_auiEncounter[6] >> m_auiEncounter[7] >> m_auiEncounter[8]; + >> m_auiEncounter[4] >> m_auiEncounter[5] >> m_auiEncounter[6] >> m_auiEncounter[7] >> m_auiEncounter[8]; - for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) + for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) { if (i != TYPE_INFINITE_CORRUPTER_TIME) { @@ -334,7 +334,7 @@ static bool sortFromSouthToNorth(Creature* pFirst, Creature* pSecond) return pFirst && pSecond && pFirst->GetPositionX() < pSecond->GetPositionX(); } -void instance_culling_of_stratholme::GetCratesBunnyOrderedList(std::list &lList) +void instance_culling_of_stratholme::GetCratesBunnyOrderedList(std::list& lList) { std::list lCratesBunnyList; for (GuidList::const_iterator itr = m_luiCratesBunnyGUIDs.begin(); itr != m_luiCratesBunnyGUIDs.end(); ++itr) @@ -367,7 +367,7 @@ Creature* instance_culling_of_stratholme::GetStratIntroFootman() } } -void instance_culling_of_stratholme::GetResidentOrderedList(std::list &lList) +void instance_culling_of_stratholme::GetResidentOrderedList(std::list& lList) { std::list lResidentList; for (GuidList::const_iterator itr = m_luiResidentGUIDs.begin(); itr != m_luiResidentGUIDs.end(); ++itr) @@ -397,7 +397,7 @@ void instance_culling_of_stratholme::DoSpawnArthasIfNeeded() if (uiPosition && uiPosition <= MAX_ARTHAS_SPAWN_POS) { if (Player* pPlayer = GetPlayerInMap()) - pPlayer->SummonCreature(NPC_ARTHAS, m_aArthasSpawnLocs[uiPosition-1].m_fX, m_aArthasSpawnLocs[uiPosition-1].m_fY, m_aArthasSpawnLocs[uiPosition-1].m_fZ, m_aArthasSpawnLocs[uiPosition-1].m_fO, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10000); + pPlayer->SummonCreature(NPC_ARTHAS, m_aArthasSpawnLocs[uiPosition - 1].m_fX, m_aArthasSpawnLocs[uiPosition - 1].m_fY, m_aArthasSpawnLocs[uiPosition - 1].m_fZ, m_aArthasSpawnLocs[uiPosition - 1].m_fO, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10000); } } @@ -434,12 +434,12 @@ void instance_culling_of_stratholme::Update(uint32 uiDiff) else { m_auiEncounter[TYPE_INFINITE_CORRUPTER_TIME] -= uiDiff; - if (m_auiEncounter[TYPE_INFINITE_CORRUPTER_TIME]/IN_MILLISECONDS % 20 == 0) + if (m_auiEncounter[TYPE_INFINITE_CORRUPTER_TIME] / IN_MILLISECONDS % 20 == 0) SetData(TYPE_INFINITE_CORRUPTER_TIME, m_auiEncounter[TYPE_INFINITE_CORRUPTER_TIME]); } // This part is needed for a small "hurry up guys" note, TODO, verify 20min - if (m_auiEncounter[TYPE_INFINITE_CORRUPTER] == IN_PROGRESS && m_auiEncounter[TYPE_INFINITE_CORRUPTER_TIME] <= 24*MINUTE*IN_MILLISECONDS) + if (m_auiEncounter[TYPE_INFINITE_CORRUPTER] == IN_PROGRESS && m_auiEncounter[TYPE_INFINITE_CORRUPTER_TIME] <= 24 * MINUTE * IN_MILLISECONDS) SetData(TYPE_INFINITE_CORRUPTER, SPECIAL); } diff --git a/scripts/kalimdor/caverns_of_time/dark_portal/boss_temporus.cpp b/scripts/kalimdor/caverns_of_time/dark_portal/boss_temporus.cpp index cc385ec52..648566c91 100644 --- a/scripts/kalimdor/caverns_of_time/dark_portal/boss_temporus.cpp +++ b/scripts/kalimdor/caverns_of_time/dark_portal/boss_temporus.cpp @@ -84,7 +84,7 @@ struct MANGOS_DLL_DECL boss_temporusAI : public ScriptedAI // Despawn Time Keeper if (pWho->GetTypeId() == TYPEID_UNIT && pWho->GetEntry() == NPC_TIME_KEEPER) { - if (m_creature->IsWithinDistInMap(pWho,20.0f)) + if (m_creature->IsWithinDistInMap(pWho, 20.0f)) { if (DoCastSpellIfCan(pWho, SPELL_BANISH_HELPER) == CAST_OK) DoScriptText(SAY_BANISH, m_creature); diff --git a/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.cpp b/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.cpp index 6b2411eac..fccc121da 100644 --- a/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.cpp +++ b/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.cpp @@ -92,13 +92,13 @@ CreatureAI* GetAI_npc_medivh_black_morass(Creature* pCreature) bool EffectDummyCreature_npc_medivh_black_morass(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) { - //always check spellid and effectindex + // always check spellid and effectindex if ((uiSpellId == SPELL_CORRUPT && uiEffIndex == EFFECT_INDEX_0) || (uiSpellId == SPELL_CORRUPT_AEONUS && uiEffIndex == EFFECT_INDEX_0)) { if (instance_dark_portal* pInstance = (instance_dark_portal*)pCreatureTarget->GetInstanceData()) pInstance->SetData(TYPE_SHIELD, SPECIAL); - //always return true when we are handling this spell and effect + // always return true when we are handling this spell and effect return true; } @@ -124,7 +124,7 @@ struct RiftWaveData uint32 uiPortalMob[4]; // spawns for portal waves (in order) }; -static const RiftWaveData aPortalWaves[]= +static const RiftWaveData aPortalWaves[] = { {NPC_ASSASSIN, NPC_WHELP, NPC_CHRONOMANCER, 0}, {NPC_EXECUTIONER, NPC_CHRONOMANCER, NPC_WHELP, NPC_ASSASSIN}, @@ -335,13 +335,13 @@ CreatureAI* GetAI_npc_time_rift(Creature* pCreature) bool EffectDummyCreature_npc_time_rift_channel(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) { - //always check spellid and effectindex + // always check spellid and effectindex if (uiSpellId == SPELL_RIFT_PERIODIC && uiEffIndex == EFFECT_INDEX_0) { if (npc_time_riftAI* pTimeRiftAI = dynamic_cast(pCreatureTarget->AI())) pTimeRiftAI->DoSummon(); - //always return true when we are handling this spell and effect + // always return true when we are handling this spell and effect return true; } diff --git a/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.h b/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.h index 913810ef6..2ead7477c 100644 --- a/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.h +++ b/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.h @@ -85,16 +85,16 @@ struct PortalData float fX, fY, fZ, fOrient; }; -static const PortalData afPortalLocation[]= +static const PortalData afPortalLocation[] = { - {-2030.832f, 7024.944f, 23.07182f, 3.141593f}, - {-1961.734f, 7029.528f, 21.8114f, 2.129302f}, - {-1887.695f, 7106.557f, 22.0495f, 4.956735f}, - {-1930.911f, 7183.597f, 23.00764f, 3.595378f} + { -2030.832f, 7024.944f, 23.07182f, 3.141593f}, + { -1961.734f, 7029.528f, 21.8114f, 2.129302f}, + { -1887.695f, 7106.557f, 22.0495f, 4.956735f}, + { -1930.911f, 7183.597f, 23.00764f, 3.595378f} }; // Dark Crystal summon location -static const float fDarkPortalCrystalLoc[3] = {-2024.31f, 7127.75f, 22.65419f}; +static const float fDarkPortalCrystalLoc[3] = { -2024.31f, 7127.75f, 22.65419f}; static const int32 uiMedivhWeakYell[3] = {SAY_MEDIVH_WEAK75, SAY_MEDIVH_WEAK50, SAY_MEDIVH_WEAK25}; diff --git a/scripts/kalimdor/caverns_of_time/dark_portal/instance_dark_portal.cpp b/scripts/kalimdor/caverns_of_time/dark_portal/instance_dark_portal.cpp index 6789cabc8..bd494832d 100644 --- a/scripts/kalimdor/caverns_of_time/dark_portal/instance_dark_portal.cpp +++ b/scripts/kalimdor/caverns_of_time/dark_portal/instance_dark_portal.cpp @@ -106,7 +106,7 @@ void instance_dark_portal::OnCreatureCreate(Creature* pCreature) void instance_dark_portal::SetData(uint32 uiType, uint32 uiData) { - switch(uiType) + switch (uiType) { case TYPE_MEDIVH: { @@ -144,7 +144,7 @@ void instance_dark_portal::SetData(uint32 uiType, uint32 uiData) if (!players.isEmpty()) { - for(Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr) + for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr) { if (Player* pPlayer = itr->getSource()) { @@ -169,11 +169,11 @@ void instance_dark_portal::SetData(uint32 uiType, uint32 uiData) DoUpdateWorldState(WORLD_STATE_SHIELD, m_uiWorldStateShieldCount); // Yell at 75%, 50% and 25% shield - if (m_uiWorldStateShieldCount < 100-25*m_uiMedivhYellCount) + if (m_uiWorldStateShieldCount < 100 - 25 * m_uiMedivhYellCount) { if (Creature* pMedivh = GetSingleCreatureFromStorage(NPC_MEDIVH)) { - DoScriptText(uiMedivhWeakYell[m_uiMedivhYellCount-1], pMedivh); + DoScriptText(uiMedivhWeakYell[m_uiMedivhYellCount - 1], pMedivh); ++m_uiMedivhYellCount; } } @@ -198,7 +198,7 @@ void instance_dark_portal::SetData(uint32 uiType, uint32 uiData) // Set the delay to the next time rift from the point the rift summons it's guardian // ToDo: research if these timers are correct else if (uiData == SPECIAL) - m_uiNextPortalTimer = IsBossTimeRift() ? 0 : m_uiWorldStateRiftCount > 12 ? 90000 : 2*MINUTE*IN_MILLISECONDS; + m_uiNextPortalTimer = IsBossTimeRift() ? 0 : m_uiWorldStateRiftCount > 12 ? 90000 : 2 * MINUTE * IN_MILLISECONDS; m_auiEncounter[uiType] = uiData; return; @@ -223,7 +223,7 @@ void instance_dark_portal::SetData(uint32 uiType, uint32 uiData) std::ostringstream saveStream; saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2] << " " - << m_auiEncounter[3] << " " << m_auiEncounter[4] << " " << m_auiEncounter[5]; + << m_auiEncounter[3] << " " << m_auiEncounter[4] << " " << m_auiEncounter[5]; m_strInstData = saveStream.str(); @@ -252,9 +252,9 @@ void instance_dark_portal::Load(const char* chrIn) std::istringstream loadStream(chrIn); loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3] - >> m_auiEncounter[4] >> m_auiEncounter[5]; + >> m_auiEncounter[4] >> m_auiEncounter[5]; - for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) + for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) { if (m_auiEncounter[i] == IN_PROGRESS) m_auiEncounter[i] = NOT_STARTED; diff --git a/scripts/kalimdor/caverns_of_time/hyjal/boss_archimonde.cpp b/scripts/kalimdor/caverns_of_time/hyjal/boss_archimonde.cpp index 85c83904d..4ca3ce80f 100644 --- a/scripts/kalimdor/caverns_of_time/hyjal/boss_archimonde.cpp +++ b/scripts/kalimdor/caverns_of_time/hyjal/boss_archimonde.cpp @@ -42,7 +42,7 @@ enum // spells SPELL_DRAIN_TREE = 39140, // intro cosmetic spell - //SPELL_DRAIN_TREE_DUMMY = 39141, // purpose unk + // SPELL_DRAIN_TREE_DUMMY = 39141, // purpose unk SPELL_FINGER_DEATH = 31984, SPELL_FINGER_DEATH_SCRIPT = 32111, // targets whisps @@ -60,7 +60,7 @@ enum // summoned creatures NPC_DOOMFIRE = 18095, - //NPC_DOOMFIRE_SPIRIT = 18104, + // NPC_DOOMFIRE_SPIRIT = 18104, NPC_ANCIENT_WISP = 17946, NPC_CHANNEL_TARGET = 22418, // if he gets in range of 75.0f, then he gets enraged @@ -119,7 +119,7 @@ struct MANGOS_DLL_DECL boss_archimondeAI : public ScriptedAI m_uiFingerOfDeathTimer = 15000; m_uiHandOfDeathTimer = 2000; m_uiWispCount = 0; - m_uiEnrageTimer = 10*MINUTE*IN_MILLISECONDS; + m_uiEnrageTimer = 10 * MINUTE * IN_MILLISECONDS; m_bIsEnraged = false; m_bIsEpilogue = false; @@ -148,14 +148,14 @@ struct MANGOS_DLL_DECL boss_archimondeAI : public ScriptedAI if (pVictim->GetTypeId() != TYPEID_PLAYER) return; - switch(urand(0, 2)) + switch (urand(0, 2)) { case 0: DoScriptText(SAY_SLAY1, m_creature); break; case 1: DoScriptText(SAY_SLAY2, m_creature); break; case 2: DoScriptText(SAY_SLAY3, m_creature); break; } - switch(pVictim->getClass()) + switch (pVictim->getClass()) { case CLASS_PRIEST: case CLASS_PALADIN: @@ -259,7 +259,7 @@ struct MANGOS_DLL_DECL boss_archimondeAI : public ScriptedAI if (m_uiSummonWispTimer < uiDiff) { float fX, fY, fZ; - m_creature->GetNearPoint(m_creature, fX, fY, fZ, 0, 75.0f, urand(0, 1) ? frand(0, 2.8f) : frand(4.3f, M_PI_F*2)); + m_creature->GetNearPoint(m_creature, fX, fY, fZ, 0, 75.0f, urand(0, 1) ? frand(0, 2.8f) : frand(4.3f, M_PI_F * 2)); m_creature->SummonCreature(NPC_ANCIENT_WISP, fX, fY, fZ, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000); m_uiSummonWispTimer = urand(1000, 1500); } @@ -356,7 +356,7 @@ struct MANGOS_DLL_DECL npc_doomfire_spiritAI : public ScriptedAI { m_uiDoomfireLoadTimer = 1000; m_uiChangeTargetTimer = 1500; - m_fAngle = urand(0, M_PI_F*2); + m_fAngle = urand(0, M_PI_F * 2); } void UpdateAI(const uint32 uiDiff) @@ -381,7 +381,7 @@ struct MANGOS_DLL_DECL npc_doomfire_spiritAI : public ScriptedAI if (Creature* pDoomfire = m_creature->GetMap()->GetCreature(m_doomfireGuid)) { float fX, fY, fZ; - pDoomfire->GetNearPoint(pDoomfire, fX, fY, fZ, 0, 30.0f, m_fAngle + frand(0, M_PI_F*.5)); + pDoomfire->GetNearPoint(pDoomfire, fX, fY, fZ, 0, 30.0f, m_fAngle + frand(0, M_PI_F * .5)); pDoomfire->GetMotionMaster()->MovePoint(0, fX, fY, fZ); } diff --git a/scripts/kalimdor/caverns_of_time/hyjal/hyjal.cpp b/scripts/kalimdor/caverns_of_time/hyjal/hyjal.cpp index 07f44dbe2..663b655c5 100644 --- a/scripts/kalimdor/caverns_of_time/hyjal/hyjal.cpp +++ b/scripts/kalimdor/caverns_of_time/hyjal/hyjal.cpp @@ -98,7 +98,7 @@ bool GossipSelect_npc_jaina_proudmoore(Player* pPlayer, Creature* pCreature, uin { if (hyjalAI* pJainaAI = dynamic_cast(pCreature->AI())) { - switch(uiAction) + switch (uiAction) { case GOSSIP_ACTION_INFO_DEF + 1: pJainaAI->StartEvent(); @@ -170,7 +170,7 @@ bool GossipSelect_npc_thrall(Player* pPlayer, Creature* pCreature, uint32 uiSend { if (hyjalAI* pThrallAI = dynamic_cast(pCreature->AI())) { - switch(uiAction) + switch (uiAction) { case GOSSIP_ACTION_INFO_DEF + 1: pThrallAI->StartEvent(); diff --git a/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.cpp b/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.cpp index b70599959..9afb0797b 100644 --- a/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.cpp +++ b/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.cpp @@ -32,7 +32,7 @@ struct HyjalLocation // Locations for summoning waves // Must be even number -static const HyjalLocation aHyjalSpawnLoc[]= +static const HyjalLocation aHyjalSpawnLoc[] = { {BASE_ALLY, 4979.010f, -1709.134f, 1339.674f}, {BASE_ALLY, 4969.123f, -1705.904f, 1341.363f}, @@ -45,7 +45,7 @@ static const HyjalLocation aHyjalSpawnLoc[]= }; // used to inform the wave where to move -static const HyjalLocation aHyjalWaveMoveTo[]= +static const HyjalLocation aHyjalWaveMoveTo[] = { {BASE_ALLY, 5018.654f, -1752.074f, 1322.203f}, {BASE_HORDE, 5504.569f, -2688.489f, 1479.991f} @@ -58,7 +58,7 @@ struct HyjalYells int32 m_iTextId; // The text id to be yelled }; -static const HyjalYells aHyjalYell[]= +static const HyjalYells aHyjalYell[] = { {NPC_JAINA, ATTACKED, -1534000}, {NPC_JAINA, ATTACKED, -1534001}, @@ -89,7 +89,7 @@ struct HyjalWave }; // Waves that will be summoned in the Alliance Base -static const HyjalWave aHyjalWavesAlliance[]= +static const HyjalWave aHyjalWavesAlliance[] = { // Rage Winterchill Wave 1-8 {{NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, 0, 0, 0, 0, 0, 0, 0, 0}, 125000, false}, @@ -116,7 +116,7 @@ static const HyjalWave aHyjalWavesAlliance[]= }; // Waves that are summoned in the Horde base -static const HyjalWave aHyjalWavesHorde[]= +static const HyjalWave aHyjalWavesHorde[] = { // Kaz'Rogal Wave 1-8 {{NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_BANSH, NPC_BANSH, NPC_NECRO, NPC_NECRO, 0, 0, 0, 0, 0, 0}, 135000, false}, @@ -159,7 +159,7 @@ void hyjalAI::Reset() m_uiEnemyCount = 0; // Set base area based on creature entry - switch(m_creature->GetEntry()) + switch (m_creature->GetEntry()) { case NPC_JAINA: m_uiBase = BASE_ALLY; @@ -216,9 +216,9 @@ void hyjalAI::JustReachedHome() m_bIsSecondBossDead = m_uiBase ? m_pInstance->GetData(TYPE_AZGALOR) == DONE : m_pInstance->GetData(TYPE_ANETHERON) == DONE; } -void hyjalAI::Aggro(Unit *who) +void hyjalAI::Aggro(Unit* who) { - for(uint8 i = 0; i < MAX_SPELL; ++i) + for (uint8 i = 0; i < MAX_SPELL; ++i) if (m_aSpells[i].m_uiCooldown) m_uiSpellTimer[i] = m_aSpells[i].m_uiCooldown; @@ -230,7 +230,7 @@ void hyjalAI::SpawnCreatureForWave(uint32 uiMobEntry) HyjalLocation const* pSpawn = NULL; uint32 uiMaxCount = countof(aHyjalSpawnLoc); - uint32 uiRandId = urand(1, uiMaxCount/2); //unsafe, if array becomes uneven. + uint32 uiRandId = urand(1, uiMaxCount / 2); // unsafe, if array becomes uneven. uint32 uiJ = 0; @@ -314,7 +314,7 @@ void hyjalAI::SummonNextWave() m_uiEnemyCount = m_pInstance->GetData(TYPE_TRASH_COUNT); - for(uint8 i = 0; i < MAX_WAVE_MOB; ++i) + for (uint8 i = 0; i < MAX_WAVE_MOB; ++i) { if (pWaveData->m_auiMobEntry[i]) SpawnCreatureForWave(pWaveData->m_auiMobEntry[i]); @@ -322,7 +322,7 @@ void hyjalAI::SummonNextWave() if (!pWaveData->m_bIsBoss) { - uint32 stateValue = m_uiWaveCount+1; + uint32 stateValue = m_uiWaveCount + 1; if (m_bIsFirstBossDead) stateValue -= MAX_WAVES; // Subtract 9 from it to give the proper wave number if we are greater than 8 @@ -391,8 +391,8 @@ void hyjalAI::DoTalk(YellType pYellType) { if (aHyjalYell[i].uiCreatureEntry == m_creature->GetEntry() && aHyjalYell[i].m_pYellType == pYellType) { - //this would not be safe unless we knew these had two entries in m_aYell - if (pYellType == ATTACKED || pYellType== RALLY) + // this would not be safe unless we knew these had two entries in m_aYell + if (pYellType == ATTACKED || pYellType == RALLY) { if (!bGetNext && urand(0, 1)) { @@ -412,16 +412,16 @@ void hyjalAI::DoTalk(YellType pYellType) void hyjalAI::SpellHitTarget(Unit* pTarget, const SpellEntry* pSpell) { - //TODO: this spell should cause misc mobs to despawn - //if (pSpell->Id == SPELL_MASS_TELEPORT && pTarget->GetTypeId() != TYPEID_PLAYER) + // TODO: this spell should cause misc mobs to despawn + // if (pSpell->Id == SPELL_MASS_TELEPORT && pTarget->GetTypeId() != TYPEID_PLAYER) //{ - //despawn; + // despawn; //} } void hyjalAI::Retreat() { - //this will trigger ancient gem respawn + // this will trigger ancient gem respawn if (m_pInstance) m_pInstance->SetData(TYPE_RETREAT, SPECIAL); @@ -435,7 +435,7 @@ void hyjalAI::JustDied(Unit* pKiller) DoTalk(DEATH); m_creature->SetActiveObjectState(false); - //TODO: in case they die during boss encounter, then what? despawn boss? + // TODO: in case they die during boss encounter, then what? despawn boss? } void hyjalAI::UpdateAI(const uint32 uiDiff) @@ -478,7 +478,7 @@ void hyjalAI::UpdateAI(const uint32 uiDiff) if (m_uiCheckTimer < uiDiff) { - for(uint8 i = 0; i < 2; ++i) + for (uint8 i = 0; i < 2; ++i) { if (m_aBossGuid[i]) { @@ -520,7 +520,7 @@ void hyjalAI::UpdateAI(const uint32 uiDiff) if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - for(uint8 i = 0; i < MAX_SPELL; ++i) + for (uint8 i = 0; i < MAX_SPELL; ++i) { if (m_aSpells[i].m_uiSpellId) { @@ -531,7 +531,7 @@ void hyjalAI::UpdateAI(const uint32 uiDiff) Unit* pTarget = NULL; - switch(m_aSpells[i].m_pType) + switch (m_aSpells[i].m_pType) { case TARGETTYPE_SELF: pTarget = m_creature; break; case TARGETTYPE_RANDOM: pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0); break; diff --git a/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.h b/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.h index a6a515443..c2d365471 100644 --- a/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.h +++ b/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.h @@ -57,50 +57,50 @@ enum YellType struct MANGOS_DLL_DECL hyjalAI : public ScriptedAI { - hyjalAI(Creature* pCreature) : ScriptedAI(pCreature) - { - memset(m_aSpells, 0, sizeof(m_aSpells)); - m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - Reset(); - } + hyjalAI(Creature* pCreature) : ScriptedAI(pCreature) + { + memset(m_aSpells, 0, sizeof(m_aSpells)); + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } - // Generically used to reset our variables. Do *not* call in EnterEvadeMode as this may make problems if the raid is still in combat - void Reset(); + // Generically used to reset our variables. Do *not* call in EnterEvadeMode as this may make problems if the raid is still in combat + void Reset(); - // Send creature back to spawn location and evade. - void EnterEvadeMode(); + // Send creature back to spawn location and evade. + void EnterEvadeMode(); - // Called when creature reached home location after evade. - void JustReachedHome(); + // Called when creature reached home location after evade. + void JustReachedHome(); - // Used to reset cooldowns for our spells and to inform the raid that we're under attack - void Aggro(Unit* pWho); + // Used to reset cooldowns for our spells and to inform the raid that we're under attack + void Aggro(Unit* pWho); - // Called to summon waves, check for boss deaths and to cast our spells. - void UpdateAI(const uint32 uiDiff); + // Called to summon waves, check for boss deaths and to cast our spells. + void UpdateAI(const uint32 uiDiff); - // Called on death, informs the raid that they have failed. - void JustDied(Unit* pKiller); + // Called on death, informs the raid that they have failed. + void JustDied(Unit* pKiller); - // "Teleport" all friendly creatures away from the base. - void Retreat(); + // "Teleport" all friendly creatures away from the base. + void Retreat(); - // Summons a creature for that wave in that base - void SpawnCreatureForWave(uint32 uiMobEntry); + // Summons a creature for that wave in that base + void SpawnCreatureForWave(uint32 uiMobEntry); - void JustSummoned(Creature*); + void JustSummoned(Creature*); - // Summons the next wave, calls SummonCreature - void SummonNextWave(); + // Summons the next wave, calls SummonCreature + void SummonNextWave(); - // Begins the event by gossip click - void StartEvent(); + // Begins the event by gossip click + void StartEvent(); - // Searches for the appropriate yell and sound and uses it to inform the raid of various things - void DoTalk(YellType pYellType); + // Searches for the appropriate yell and sound and uses it to inform the raid of various things + void DoTalk(YellType pYellType); - // Used to filter who to despawn after mass teleport - void SpellHitTarget(Unit*, const SpellEntry*); + // Used to filter who to despawn after mass teleport + void SpellHitTarget(Unit*, const SpellEntry*); public: diff --git a/scripts/kalimdor/caverns_of_time/hyjal/instance_hyjal.cpp b/scripts/kalimdor/caverns_of_time/hyjal/instance_hyjal.cpp index 4df40eeca..5ca1d6f85 100644 --- a/scripts/kalimdor/caverns_of_time/hyjal/instance_hyjal.cpp +++ b/scripts/kalimdor/caverns_of_time/hyjal/instance_hyjal.cpp @@ -45,7 +45,7 @@ void instance_mount_hyjal::Initialize() bool instance_mount_hyjal::IsEncounterInProgress() const { - for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) + for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) if (m_auiEncounter[i] == IN_PROGRESS) return true; return false; @@ -102,7 +102,7 @@ void instance_mount_hyjal::OnCreatureDeath(Creature* pCreature) case NPC_AZGALOR: SetData(TYPE_AZGALOR, DONE); break; case NPC_ARCHIMONDE: SetData(TYPE_ARCHIMONDE, DONE); break; - // Trash Mobs summoned in waves + // Trash Mobs summoned in waves case NPC_NECRO: case NPC_ABOMI: case NPC_GHOUL: @@ -124,7 +124,7 @@ void instance_mount_hyjal::OnCreatureDeath(Creature* pCreature) void instance_mount_hyjal::SetData(uint32 uiType, uint32 uiData) { - switch(uiType) + switch (uiType) { case TYPE_WINTERCHILL: case TYPE_ANETHERON: @@ -150,9 +150,9 @@ void instance_mount_hyjal::SetData(uint32 uiType, uint32 uiData) { if (!lAncientGemGUIDList.empty()) { - for(GuidList::const_iterator itr = lAncientGemGUIDList.begin(); itr != lAncientGemGUIDList.end(); ++itr) + for (GuidList::const_iterator itr = lAncientGemGUIDList.begin(); itr != lAncientGemGUIDList.end(); ++itr) { - //don't know how long it expected + // don't know how long it expected DoRespawnGameObject(*itr, DAY); } } @@ -168,7 +168,7 @@ void instance_mount_hyjal::SetData(uint32 uiType, uint32 uiData) std::ostringstream saveStream; saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2] << " " - << m_auiEncounter[3] << " " << m_auiEncounter[4]; + << m_auiEncounter[3] << " " << m_auiEncounter[4]; m_strSaveData = saveStream.str(); @@ -194,7 +194,7 @@ void instance_mount_hyjal::DoSpawnArchimonde() uint32 instance_mount_hyjal::GetData(uint32 uiType) { - switch(uiType) + switch (uiType) { case TYPE_WINTERCHILL: case TYPE_ANETHERON: @@ -222,8 +222,8 @@ void instance_mount_hyjal::Load(const char* chrIn) std::istringstream loadStream(chrIn); loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3] >> m_auiEncounter[4]; - for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) - if (m_auiEncounter[i] == IN_PROGRESS) // Do not load an encounter as IN_PROGRESS - reset it instead. + for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) + if (m_auiEncounter[i] == IN_PROGRESS) // Do not load an encounter as IN_PROGRESS - reset it instead. m_auiEncounter[i] = NOT_STARTED; OUT_LOAD_INST_DATA_COMPLETE; diff --git a/scripts/kalimdor/caverns_of_time/old_hillsbrad/instance_old_hillsbrad.cpp b/scripts/kalimdor/caverns_of_time/old_hillsbrad/instance_old_hillsbrad.cpp index 47baf034b..6f5216057 100644 --- a/scripts/kalimdor/caverns_of_time/old_hillsbrad/instance_old_hillsbrad.cpp +++ b/scripts/kalimdor/caverns_of_time/old_hillsbrad/instance_old_hillsbrad.cpp @@ -54,7 +54,7 @@ void instance_old_hillsbrad::OnPlayerEnter(Player* pPlayer) void instance_old_hillsbrad::OnCreatureCreate(Creature* pCreature) { - switch(pCreature->GetEntry()) + switch (pCreature->GetEntry()) { case NPC_THRALL: case NPC_TARETHA: @@ -151,7 +151,7 @@ void instance_old_hillsbrad::HandleThrallRelocation() void instance_old_hillsbrad::SetData(uint32 uiType, uint32 uiData) { - switch(uiType) + switch (uiType) { case TYPE_BARREL_DIVERSION: m_auiEncounter[uiType] = uiData; @@ -177,7 +177,7 @@ void instance_old_hillsbrad::SetData(uint32 uiType, uint32 uiData) // set the houses on fire for (GuidList::const_iterator itr = m_lRoaringFlamesList.begin(); itr != m_lRoaringFlamesList.end(); ++itr) - DoRespawnGameObject(*itr, 30*MINUTE); + DoRespawnGameObject(*itr, 30 * MINUTE); // move the orcs outside the houses float fX, fY, fZ; @@ -249,8 +249,8 @@ void instance_old_hillsbrad::SetData(uint32 uiType, uint32 uiData) std::ostringstream saveStream; saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2] << " " - << m_auiEncounter[3] << " " << m_auiEncounter[4] << " " << m_auiEncounter[5] << " " - << m_auiEncounter[6]; + << m_auiEncounter[3] << " " << m_auiEncounter[4] << " " << m_auiEncounter[5] << " " + << m_auiEncounter[6]; m_strInstData = saveStream.str(); @@ -279,9 +279,9 @@ void instance_old_hillsbrad::Load(const char* chrIn) std::istringstream loadStream(chrIn); loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3] - >> m_auiEncounter[4] >> m_auiEncounter[5] >> m_auiEncounter[6]; + >> m_auiEncounter[4] >> m_auiEncounter[5] >> m_auiEncounter[6]; - for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) + for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) { if (m_auiEncounter[i] == IN_PROGRESS) m_auiEncounter[i] = NOT_STARTED; @@ -305,7 +305,7 @@ void instance_old_hillsbrad::UpdateLodgeQuestCredit() if (!players.isEmpty()) { - for(Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr) + for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr) { if (Player* pPlayer = itr->getSource()) pPlayer->KilledMonsterCredit(NPC_LODGE_QUEST_TRIGGER); diff --git a/scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.cpp b/scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.cpp index 25750e5d3..a50a7d420 100644 --- a/scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.cpp +++ b/scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.cpp @@ -52,8 +52,8 @@ bool GossipHello_npc_erozion(Player* pPlayer, Creature* pCreature) ScriptedInstance* pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - if (pInstance && pInstance->GetData(TYPE_BARREL_DIVERSION) != DONE && !pPlayer->HasItemCount(ITEM_ENTRY_BOMBS,1)) - pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_NEED_BOMBS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + if (pInstance && pInstance->GetData(TYPE_BARREL_DIVERSION) != DONE && !pPlayer->HasItemCount(ITEM_ENTRY_BOMBS, 1)) + pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_NEED_BOMBS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); // Need info, should have option to teleport or not /*if (!pPlayer->GetQuestRewardStatus(QUEST_ENTRY_RETURN) && pPlayer->GetQuestStatus(QUEST_ENTRY_RETURN) == QUEST_STATUS_COMPLETE) @@ -66,7 +66,7 @@ bool GossipHello_npc_erozion(Player* pPlayer, Creature* pCreature) bool GossipSelect_npc_erozion(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) { - if (uiAction == GOSSIP_ACTION_INFO_DEF+1) + if (uiAction == GOSSIP_ACTION_INFO_DEF + 1) { if (Item* pItem = pPlayer->StoreNewItemInInventorySlot(ITEM_ENTRY_BOMBS, 1)) pPlayer->SendNewItem(pItem, 1, true, false); @@ -74,7 +74,7 @@ bool GossipSelect_npc_erozion(Player* pPlayer, Creature* pCreature, uint32 uiSen pPlayer->SEND_GOSSIP_MENU(TEXT_ID_GOT_ITEM, pCreature->GetObjectGuid()); } - if (uiAction == GOSSIP_ACTION_INFO_DEF+2) + if (uiAction == GOSSIP_ACTION_INFO_DEF + 2) pPlayer->CLOSE_GOSSIP_MENU(); return true; @@ -289,7 +289,7 @@ struct MANGOS_DLL_DECL npc_thrall_old_hillsbradAI : public npc_escortAI, private void Aggro(Unit* pWho) { - switch(urand(0, 3)) + switch (urand(0, 3)) { case 0: DoScriptText(SAY_TH_RANDOM_AGGRO1, m_creature); break; case 1: DoScriptText(SAY_TH_RANDOM_AGGRO2, m_creature); break; @@ -306,7 +306,7 @@ struct MANGOS_DLL_DECL npc_thrall_old_hillsbradAI : public npc_escortAI, private void KilledUnit(Unit* pVictim) { - switch(urand(0, 2)) + switch (urand(0, 2)) { case 0: DoScriptText(SAY_TH_RANDOM_KILL1, m_creature); break; case 1: DoScriptText(SAY_TH_RANDOM_KILL2, m_creature); break; @@ -336,7 +336,7 @@ struct MANGOS_DLL_DECL npc_thrall_old_hillsbradAI : public npc_escortAI, private } } - void CorpseRemoved(uint32 &uiRespawnDelay) + void CorpseRemoved(uint32& uiRespawnDelay) { uiRespawnDelay = 0; @@ -401,7 +401,7 @@ struct MANGOS_DLL_DECL npc_thrall_old_hillsbradAI : public npc_escortAI, private } else if (m_pInstance->GetData(TYPE_EPOCH) != DONE) { - SetCurrentWaypoint(108); // inn + SetCurrentWaypoint(108); // inn m_creature->SetDisplayId(MODEL_THRALL_EQUIPPED); m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); m_lTarrenMillSoldiersGuids.clear(); @@ -422,7 +422,7 @@ struct MANGOS_DLL_DECL npc_thrall_old_hillsbradAI : public npc_escortAI, private { if (HasEscortState(STATE_ESCORT_ESCORTING)) { - switch(urand(0, 2)) + switch (urand(0, 2)) { case 0: DoScriptText(SAY_TH_LEAVE_COMBAT1, m_creature); break; case 1: DoScriptText(SAY_TH_LEAVE_COMBAT2, m_creature); break; @@ -435,9 +435,9 @@ struct MANGOS_DLL_DECL npc_thrall_old_hillsbradAI : public npc_escortAI, private void JustSummoned(Creature* pSummoned) { - switch(pSummoned->GetEntry()) + switch (pSummoned->GetEntry()) { - // Barn soldiers - also used for the first wave of Epoch adds + // Barn soldiers - also used for the first wave of Epoch adds case NPC_TARREN_MILL_GUARDSMAN: case NPC_TARREN_MILL_PROTECTOR: case NPC_TARREN_MILL_LOOKOUT: @@ -452,7 +452,7 @@ struct MANGOS_DLL_DECL npc_thrall_old_hillsbradAI : public npc_escortAI, private m_uiEpochAttackTimer = 7000; } break; - // Epoch wave spawns + // Epoch wave spawns case NPC_INFINITE_DEFILER: case NPC_INFINITE_SABOTEOR: case NPC_INFINITE_SLAYER: @@ -473,7 +473,7 @@ struct MANGOS_DLL_DECL npc_thrall_old_hillsbradAI : public npc_escortAI, private case NPC_SKARLOC_MOUNT: m_skarlocMountGuid = pSummoned->GetObjectGuid(); break; - // Church solider - used to yell + // Church solider - used to yell case NPC_CHURCH_LOOKOUT: if (!m_bHasChurchYelled) { @@ -482,7 +482,7 @@ struct MANGOS_DLL_DECL npc_thrall_old_hillsbradAI : public npc_escortAI, private } pSummoned->AI()->AttackStart(m_creature); break; - // Inn soldier - used to yell + // Inn soldier - used to yell case NPC_INN_LOOKOUT: if (!m_bHasInnYelled) { @@ -491,7 +491,7 @@ struct MANGOS_DLL_DECL npc_thrall_old_hillsbradAI : public npc_escortAI, private } pSummoned->AI()->AttackStart(m_creature); break; - // Spawned when Thrall is dead + // Spawned when Thrall is dead case NPC_IMAGE_OF_ERONZION: if (m_pInstance) DoScriptText(m_pInstance->GetThrallEventCount() < MAX_WIPE_COUNTER ? SAY_ERONZION_RESET_THRALL : SAY_ERONZION_RESET_LAST, pSummoned); @@ -506,7 +506,7 @@ struct MANGOS_DLL_DECL npc_thrall_old_hillsbradAI : public npc_escortAI, private pSummoned->SetLevitate(true); DoScriptText(SAY_EPOCH_ENTER1, pSummoned); break; - // Skarloc helpers - they have special behavior + // Skarloc helpers - they have special behavior case NPC_WARDEN: case NPC_VETERAN: if (m_pInstance && m_pInstance->GetData(TYPE_SKARLOC) == IN_PROGRESS) @@ -597,9 +597,9 @@ struct MANGOS_DLL_DECL npc_thrall_old_hillsbradAI : public npc_escortAI, private switch (pSummoned->GetEntry()) { - // Handle Skarloc movement for the intro part + // Handle Skarloc movement for the intro part case NPC_SKARLOC: - switch(uiPointId) + switch (uiPointId) { case 1: // summon mount @@ -615,7 +615,7 @@ struct MANGOS_DLL_DECL npc_thrall_old_hillsbradAI : public npc_escortAI, private break; } break; - // Handle infinite dragons transform on point reaches + // Handle infinite dragons transform on point reaches case NPC_TARREN_MILL_GUARDSMAN: if (uiPointId) { @@ -645,7 +645,7 @@ struct MANGOS_DLL_DECL npc_thrall_old_hillsbradAI : public npc_escortAI, private if (!m_pInstance) return; - switch(iEntry) + switch (iEntry) { case NPC_YOUNG_BLANCHY: // ToDo: deal with the horse animation! @@ -695,9 +695,9 @@ struct MANGOS_DLL_DECL npc_thrall_old_hillsbradAI : public npc_escortAI, private if (!m_pInstance) return; - switch(uiPoint) + switch (uiPoint) { - // *** Escort event - Part I - inside the keep *** + // *** Escort event - Part I - inside the keep *** case 0: m_pInstance->DoUseDoorOrButton(GO_PRISON_DOOR); break; @@ -729,7 +729,7 @@ struct MANGOS_DLL_DECL npc_thrall_old_hillsbradAI : public npc_escortAI, private m_creature->SetFacingToObject(pArmorer); DoScriptText(SAY_TH_ARMORY_2, m_creature); break; - // *** Escort event - Part I - outside the keep *** + // *** Escort event - Part I - outside the keep *** case 17: m_creature->SummonCreature(NPC_MAGE, 2186.909f, 139.8108f, 88.21628f, 5.75f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); m_creature->SummonCreature(NPC_WARDEN, 2187.943f, 141.6124f, 88.21628f, 5.73f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); @@ -754,7 +754,7 @@ struct MANGOS_DLL_DECL npc_thrall_old_hillsbradAI : public npc_escortAI, private m_creature->SummonCreature(NPC_VETERAN, 2108.486f, 189.9346f, 66.30494f, 2.68f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); m_creature->SummonCreature(NPC_VETERAN, 2112.387f, 195.4947f, 66.30494f, 2.39f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); break; - // *** Escort event - Part I - meet Skarloc *** + // *** Escort event - Part I - meet Skarloc *** case 31: m_pInstance->SetData(TYPE_SKARLOC, IN_PROGRESS); m_creature->SummonCreature(NPC_SKARLOC, 2000.201f, 277.9190f, 66.4911f, 6.11f, TEMPSUMMON_DEAD_DESPAWN, 0); @@ -788,7 +788,7 @@ struct MANGOS_DLL_DECL npc_thrall_old_hillsbradAI : public npc_escortAI, private SetEscortPaused(true); m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); break; - // *** Escort event - Part II - road *** + // *** Escort event - Part II - road *** case 35: if (Creature* pMount = m_creature->GetMap()->GetCreature(m_skarlocMountGuid)) { @@ -801,7 +801,7 @@ struct MANGOS_DLL_DECL npc_thrall_old_hillsbradAI : public npc_escortAI, private m_creature->SetFacingTo(5.33f); m_creature->Mount(MODEL_SKARLOC_MOUNT); break; - // *** Escort event - Part II - reached barn *** + // *** Escort event - Part II - reached barn *** case 64: m_creature->SummonCreature(NPC_SKARLOC_MOUNT, 2488.779f, 623.9724f, 58.07383f, 1.37f, TEMPSUMMON_TIMED_DESPAWN, 30000); m_creature->Unmount(); @@ -824,7 +824,7 @@ struct MANGOS_DLL_DECL npc_thrall_old_hillsbradAI : public npc_escortAI, private m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); m_pInstance->SetData(TYPE_ESCORT_BARN, DONE); break; - // *** Escort event - Part III - barn *** + // *** Escort event - Part III - barn *** case 70: SetRun(false); break; @@ -834,7 +834,7 @@ struct MANGOS_DLL_DECL npc_thrall_old_hillsbradAI : public npc_escortAI, private m_creature->SummonCreature(NPC_TARREN_MILL_GUARDSMAN, 2500.55f, 693.64f, 55.50f, 3.14f, TEMPSUMMON_DEAD_DESPAWN, 0); m_creature->SummonCreature(NPC_TARREN_MILL_GUARDSMAN, 2500.94f, 695.81f, 55.50f, 3.14f, TEMPSUMMON_DEAD_DESPAWN, 0); break; - // *** Escort event - Part III - start barn dialogue *** + // *** Escort event - Part III - start barn dialogue *** case 74: StartNextDialogueText(SAY_LOOKOUT_BARN_1); SetEscortPaused(true); @@ -842,7 +842,7 @@ struct MANGOS_DLL_DECL npc_thrall_old_hillsbradAI : public npc_escortAI, private case 75: DoScriptText(SAY_TH_HEAD_TOWN, m_creature); break; - // *** Escort event - Part III - church *** + // *** Escort event - Part III - church *** case 92: DoScriptText(SAY_TH_CHURCH_ENTER, m_creature); m_creature->SetFacingTo(1.0f); @@ -856,7 +856,7 @@ struct MANGOS_DLL_DECL npc_thrall_old_hillsbradAI : public npc_escortAI, private case 94: DoScriptText(SAY_TH_CHURCH_END, m_creature); break; - // *** Escort event - Part III - inside the inn *** + // *** Escort event - Part III - inside the inn *** case 105: m_creature->SummonCreature(NPC_INN_PROTECTOR, 2652.71f, 660.31f, 61.93f, 1.67f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); m_creature->SummonCreature(NPC_INN_LOOKOUT, 2648.96f, 662.59f, 61.93f, 0.79f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); @@ -864,7 +864,7 @@ struct MANGOS_DLL_DECL npc_thrall_old_hillsbradAI : public npc_escortAI, private m_creature->SummonCreature(NPC_INN_GUARDSMAN, 2656.39f, 659.77f, 61.93f, 2.61f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); SetRun(false); break; - // *** Escort event - Part III - meet Taretha *** + // *** Escort event - Part III - meet Taretha *** case 106: if (Creature* pTaretha = m_pInstance->GetSingleCreatureFromStorage(NPC_TARETHA)) DoScriptText(SAY_TA_ESCAPED, pTaretha, m_creature); @@ -878,13 +878,13 @@ struct MANGOS_DLL_DECL npc_thrall_old_hillsbradAI : public npc_escortAI, private pTaretha->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); SetEscortPaused(true); break; - // *** Escort event - Part IV - Epoch *** + // *** Escort event - Part IV - Epoch *** case 108: m_creature->SummonCreature(NPC_EPOCH, 2639.92f, 700.2587f, 65.13583f, 4.74f, TEMPSUMMON_DEAD_DESPAWN, 0); StartNextDialogueText(NPC_EPOCH); SetEscortPaused(true); break; - // *** Escort event - Part IV - Epoch - begin fight *** + // *** Escort event - Part IV - Epoch - begin fight *** case 116: if (Creature* pEpoch = m_pInstance->GetSingleCreatureFromStorage(NPC_EPOCH)) { @@ -901,7 +901,7 @@ struct MANGOS_DLL_DECL npc_thrall_old_hillsbradAI : public npc_escortAI, private ++m_uiEpochWaveId; SetEscortPaused(true); break; - // *** Escort event - Epilogue - run off *** + // *** Escort event - Epilogue - run off *** case 118: // return to position SetEscortPaused(true); @@ -926,7 +926,7 @@ struct MANGOS_DLL_DECL npc_thrall_old_hillsbradAI : public npc_escortAI, private if (!lPlayerList.isEmpty()) { - for(Map::PlayerList::const_iterator itr = lPlayerList.begin(); itr != lPlayerList.end(); ++itr) + for (Map::PlayerList::const_iterator itr = lPlayerList.begin(); itr != lPlayerList.end(); ++itr) { if (Player* pPlayer = itr->getSource()) pPlayer->KilledMonsterCredit(NPC_THRALL_QUEST_TRIGGER, m_creature->GetObjectGuid()); @@ -1027,19 +1027,19 @@ bool GossipHello_npc_thrall_old_hillsbrad(Player* pPlayer, Creature* pCreature) // Escort - barn to inn else if (pInstance->GetData(TYPE_ESCORT_BARN) == DONE) { - pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_TARREN_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3); + pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_TARREN_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); pPlayer->SEND_GOSSIP_MENU(TEXT_ID_TARREN, pCreature->GetObjectGuid()); } // Escort - after Skarloc is defeated else if (pInstance->GetData(TYPE_SKARLOC) == DONE) { - pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_SKARLOC_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); + pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_SKARLOC_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); pPlayer->SEND_GOSSIP_MENU(TEXT_ID_SKARLOC_1, pCreature->GetObjectGuid()); } // Event start - after Drake is defeated else if (pInstance->GetData(TYPE_DRAKE) == DONE) { - pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_START, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_START, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); pPlayer->SEND_GOSSIP_MENU(TEXT_ID_START, pCreature->GetObjectGuid()); } } @@ -1050,9 +1050,9 @@ bool GossipSelect_npc_thrall_old_hillsbrad(Player* pPlayer, Creature* pCreature, { instance_old_hillsbrad* pInstance = (instance_old_hillsbrad*)pCreature->GetInstanceData(); - switch(uiAction) + switch (uiAction) { - // Event start + // Event start case GOSSIP_ACTION_INFO_DEF+1: { pPlayer->CLOSE_GOSSIP_MENU(); @@ -1070,13 +1070,13 @@ bool GossipSelect_npc_thrall_old_hillsbrad(Player* pPlayer, Creature* pCreature, // Escort - after Skarloc case GOSSIP_ACTION_INFO_DEF+2: { - pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_SKARLOC_2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+20); + pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_SKARLOC_2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 20); pPlayer->SEND_GOSSIP_MENU(TEXT_ID_SKARLOC_2, pCreature->GetObjectGuid()); break; } case GOSSIP_ACTION_INFO_DEF+20: { - pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_SKARLOC_3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+21); + pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_SKARLOC_3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 21); pPlayer->SEND_GOSSIP_MENU(TEXT_ID_SKARLOC_3, pCreature->GetObjectGuid()); break; } @@ -1127,18 +1127,18 @@ enum SAY_ABOUT_TARETHA = -1560052, SAY_TH_EVENT_COMPLETE = -1560033, SAY_TA_FAREWELL = -1560053, - SAY_AFTER_WIPE = -1560058, // not sure when to use this one + SAY_AFTER_WIPE = -1560058, // not sure when to use this one - GOSSIP_ITEM_EPOCH_1 = -3560005, // "Strange wizard?" - TEXT_ID_EPOCH_1 = 9610, // Thank you for helping Thrall escape, friends. Now I only hope + GOSSIP_ITEM_EPOCH_1 = -3560005, // "Strange wizard?" + TEXT_ID_EPOCH_1 = 9610, // Thank you for helping Thrall escape, friends. Now I only hope - GOSSIP_ITEM_EPOCH_2 = -3560006, // "We'll get you out. Taretha. Don't worry. I doubt the wizard would wander too far away." - TEXT_ID_EPOCH_2 = 9613, // Yes, friends. This man was no wizard of + GOSSIP_ITEM_EPOCH_2 = -3560006, // "We'll get you out. Taretha. Don't worry. I doubt the wizard would wander too far away." + TEXT_ID_EPOCH_2 = 9613, // Yes, friends. This man was no wizard of SPELL_TELEPORT = 7791, - SPELL_MEMORY_WIPE = 33336, // hits Taretha and Thrall + SPELL_MEMORY_WIPE = 33336, // hits Taretha and Thrall SPELL_MEMORY_WP_RESUME = 33337, - SPELL_SHADOW_PRISON = 33071, // in creature_template_addon - remove from Taretha on event complete + SPELL_SHADOW_PRISON = 33071, // in creature_template_addon - remove from Taretha on event complete }; static const DialogueEntry aTarethaDialogue[] = @@ -1210,10 +1210,10 @@ struct MANGOS_DLL_DECL npc_tarethaAI : public npc_escortAI, private DialogueHelp if (!m_pInstance) return; - switch(iEntry) + switch (iEntry) { case SAY_TR_THEN_WHO: - m_creature->SummonCreature(NPC_EROZION, 2646.47f, 680.416f, 55.38f, 4.16f, TEMPSUMMON_TIMED_DESPAWN, 5*MINUTE*IN_MILLISECONDS); + m_creature->SummonCreature(NPC_EROZION, 2646.47f, 680.416f, 55.38f, 4.16f, TEMPSUMMON_TIMED_DESPAWN, 5 * MINUTE * IN_MILLISECONDS); break; case SPELL_MEMORY_WIPE: if (Creature* pErozion = m_pInstance->GetSingleCreatureFromStorage(NPC_EROZION)) @@ -1278,7 +1278,7 @@ bool GossipHello_npc_taretha(Player* pPlayer, Creature* pCreature) if (pInstance && pInstance->GetData(TYPE_ESCORT_INN) == DONE && pInstance->GetData(TYPE_EPOCH) != DONE) { - pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_EPOCH_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_EPOCH_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); pPlayer->SEND_GOSSIP_MENU(TEXT_ID_EPOCH_1, pCreature->GetObjectGuid()); } @@ -1289,13 +1289,13 @@ bool GossipSelect_npc_taretha(Player* pPlayer, Creature* pCreature, uint32 uiSen { instance_old_hillsbrad* pInstance = (instance_old_hillsbrad*)pCreature->GetInstanceData(); - if (uiAction == GOSSIP_ACTION_INFO_DEF+1) + if (uiAction == GOSSIP_ACTION_INFO_DEF + 1) { - pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_EPOCH_2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); + pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_EPOCH_2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); pPlayer->SEND_GOSSIP_MENU(TEXT_ID_EPOCH_2, pCreature->GetObjectGuid()); } - if (uiAction == GOSSIP_ACTION_INFO_DEF+2) + if (uiAction == GOSSIP_ACTION_INFO_DEF + 2) { pPlayer->CLOSE_GOSSIP_MENU(); diff --git a/scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.h b/scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.h index fa137b48b..98947b295 100644 --- a/scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.h +++ b/scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.h @@ -48,10 +48,10 @@ enum WORLD_STATE_OH = 2436, }; -static const float afInstanceLoc[][4]= +static const float afInstanceLoc[][4] = { {2104.51f, 91.96f, 53.14f, 0}, // right orcs outside loc - {2192.58f, 238.44f,52.44f, 0}, // left orcs outside loc + {2192.58f, 238.44f, 52.44f, 0}, // left orcs outside loc }; static const float aDrakeSummonLoc[4] = {2128.43f, 71.01f, 64.42f, 1.74f}; diff --git a/scripts/kalimdor/darkshore.cpp b/scripts/kalimdor/darkshore.cpp index c2d290b35..36f7bceb2 100644 --- a/scripts/kalimdor/darkshore.cpp +++ b/scripts/kalimdor/darkshore.cpp @@ -59,10 +59,10 @@ enum SPELL_SLEEP_VISUAL = 25148, SPELL_AWAKEN = 17536, QUEST_SLEEPER_AWAKENED = 5321, - NPC_LILADRIS = 11219 //attackers entries unknown + NPC_LILADRIS = 11219 // attackers entries unknown }; -//TODO: make concept similar as "ringo" -escort. Find a way to run the scripted attacks, _if_ player are choosing road. +// TODO: make concept similar as "ringo" -escort. Find a way to run the scripted attacks, _if_ player are choosing road. struct MANGOS_DLL_DECL npc_kerlonianAI : public FollowerAI { npc_kerlonianAI(Creature* pCreature) : FollowerAI(pCreature) { Reset(); } @@ -74,13 +74,13 @@ struct MANGOS_DLL_DECL npc_kerlonianAI : public FollowerAI m_uiFallAsleepTimer = urand(10000, 45000); } - void MoveInLineOfSight(Unit *pWho) + void MoveInLineOfSight(Unit* pWho) { FollowerAI::MoveInLineOfSight(pWho); if (!m_creature->getVictim() && !HasFollowState(STATE_FOLLOW_COMPLETE) && pWho->GetEntry() == NPC_LILADRIS) { - if (m_creature->IsWithinDistInMap(pWho, INTERACTION_DISTANCE*5)) + if (m_creature->IsWithinDistInMap(pWho, INTERACTION_DISTANCE * 5)) { if (Player* pPlayer = GetLeaderForFollower()) { @@ -105,14 +105,14 @@ struct MANGOS_DLL_DECL npc_kerlonianAI : public FollowerAI { SetFollowPaused(true); - switch(urand(0, 2)) + switch (urand(0, 2)) { case 0: DoScriptText(EMOTE_KER_SLEEP_1, m_creature); break; case 1: DoScriptText(EMOTE_KER_SLEEP_2, m_creature); break; case 2: DoScriptText(EMOTE_KER_SLEEP_3, m_creature); break; } - switch(urand(0, 3)) + switch (urand(0, 3)) { case 0: DoScriptText(SAY_KER_SLEEP_1, m_creature); break; case 1: DoScriptText(SAY_KER_SLEEP_2, m_creature); break; @@ -216,7 +216,7 @@ struct MANGOS_DLL_DECL npc_prospector_remtravelAI : public npc_escortAI if (!pPlayer) return; - switch(uiPointId) + switch (uiPointId) { case 0: DoScriptText(SAY_REM_START, m_creature, pPlayer); @@ -232,7 +232,7 @@ struct MANGOS_DLL_DECL npc_prospector_remtravelAI : public npc_escortAI DoScriptText(SAY_REM_RAMP1_2, m_creature, pPlayer); break; case 14: - //depend quest rewarded? + // depend quest rewarded? DoScriptText(SAY_REM_BOOK, m_creature, pPlayer); break; case 15: @@ -282,8 +282,8 @@ struct MANGOS_DLL_DECL npc_prospector_remtravelAI : public npc_escortAI void JustSummoned(Creature* pSummoned) { - //unsure if it should be any - //pSummoned->AI()->AttackStart(m_creature); + // unsure if it should be any + // pSummoned->AI()->AttackStart(m_creature); } }; @@ -359,7 +359,7 @@ CreatureAI* GetAI_npc_threshwackonator(Creature* pCreature) bool GossipHello_npc_threshwackonator(Player* pPlayer, Creature* pCreature) { if (pPlayer->GetQuestStatus(QUEST_GYROMAST_REV) == QUEST_STATUS_INCOMPLETE) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_INSERT_KEY, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_INSERT_KEY, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); return true; @@ -367,7 +367,7 @@ bool GossipHello_npc_threshwackonator(Player* pPlayer, Creature* pCreature) bool GossipSelect_npc_threshwackonator(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) { - if (uiAction == GOSSIP_ACTION_INFO_DEF+1) + if (uiAction == GOSSIP_ACTION_INFO_DEF + 1) { pPlayer->CLOSE_GOSSIP_MENU(); @@ -439,7 +439,7 @@ struct MANGOS_DLL_DECL npc_volcorAI : public npc_escortAI void Aggro(Unit* pWho) { // shouldn't always use text on agro - switch(urand(0, 4)) + switch (urand(0, 4)) { case 0: DoScriptText(SAY_AGGRO_1, m_creature); break; case 1: DoScriptText(SAY_AGGRO_2, m_creature); break; @@ -490,15 +490,15 @@ struct MANGOS_DLL_DECL npc_volcorAI : public npc_escortAI DoScriptText(SAY_START, m_creature); break; case 5: - m_creature->SummonCreature(NPC_BLACKWOOD_SHAMAN, aVolcorSpawnLocs[0].m_fX, aVolcorSpawnLocs[0].m_fY, aVolcorSpawnLocs[0].m_fZ, aVolcorSpawnLocs[0].m_fO, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,20000); - m_creature->SummonCreature(NPC_BLACKWOOD_URSA, aVolcorSpawnLocs[1].m_fX, aVolcorSpawnLocs[1].m_fY, aVolcorSpawnLocs[1].m_fZ, aVolcorSpawnLocs[1].m_fO, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,20000); + m_creature->SummonCreature(NPC_BLACKWOOD_SHAMAN, aVolcorSpawnLocs[0].m_fX, aVolcorSpawnLocs[0].m_fY, aVolcorSpawnLocs[0].m_fZ, aVolcorSpawnLocs[0].m_fO, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 20000); + m_creature->SummonCreature(NPC_BLACKWOOD_URSA, aVolcorSpawnLocs[1].m_fX, aVolcorSpawnLocs[1].m_fY, aVolcorSpawnLocs[1].m_fZ, aVolcorSpawnLocs[1].m_fO, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 20000); break; case 6: DoScriptText(SAY_FIRST_AMBUSH, m_creature); break; case 11: - m_creature->SummonCreature(NPC_BLACKWOOD_SHAMAN, aVolcorSpawnLocs[2].m_fX, aVolcorSpawnLocs[2].m_fY, aVolcorSpawnLocs[2].m_fZ, aVolcorSpawnLocs[2].m_fO, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,20000); - m_creature->SummonCreature(NPC_BLACKWOOD_URSA, aVolcorSpawnLocs[3].m_fX, aVolcorSpawnLocs[3].m_fY, aVolcorSpawnLocs[3].m_fZ, aVolcorSpawnLocs[3].m_fO, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,20000); + m_creature->SummonCreature(NPC_BLACKWOOD_SHAMAN, aVolcorSpawnLocs[2].m_fX, aVolcorSpawnLocs[2].m_fY, aVolcorSpawnLocs[2].m_fZ, aVolcorSpawnLocs[2].m_fO, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 20000); + m_creature->SummonCreature(NPC_BLACKWOOD_URSA, aVolcorSpawnLocs[3].m_fX, aVolcorSpawnLocs[3].m_fY, aVolcorSpawnLocs[3].m_fZ, aVolcorSpawnLocs[3].m_fO, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 20000); case 13: m_creature->SummonCreature(NPC_BLACKWOOD_URSA, aVolcorSpawnLocs[4].m_fX, aVolcorSpawnLocs[4].m_fY, aVolcorSpawnLocs[4].m_fZ, aVolcorSpawnLocs[4].m_fO, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 20000); m_creature->SummonCreature(NPC_BLACKWOOD_URSA, aVolcorSpawnLocs[5].m_fX, aVolcorSpawnLocs[5].m_fY, aVolcorSpawnLocs[5].m_fZ, aVolcorSpawnLocs[5].m_fO, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 20000); diff --git a/scripts/kalimdor/desolace.cpp b/scripts/kalimdor/desolace.cpp index f7d0f77d4..2b9054c3f 100644 --- a/scripts/kalimdor/desolace.cpp +++ b/scripts/kalimdor/desolace.cpp @@ -49,7 +49,7 @@ enum NPC_TAMED_KODO = 11627, SPELL_KODO_KOMBO_ITEM = 18153, - SPELL_KODO_KOMBO_PLAYER_BUFF = 18172, //spells here have unclear function, but using them at least for visual parts and checks + SPELL_KODO_KOMBO_PLAYER_BUFF = 18172, // spells here have unclear function, but using them at least for visual parts and checks SPELL_KODO_KOMBO_DESPAWN_BUFF = 18377, SPELL_KODO_KOMBO_GOSSIP = 18362 @@ -75,15 +75,15 @@ struct MANGOS_DLL_DECL npc_aged_dying_ancient_kodoAI : public ScriptedAI if (m_creature->IsWithinDistInMap(pWho, 10.0f)) { - switch(urand(0, 2)) + switch (urand(0, 2)) { case 0: DoScriptText(SAY_SMEED_HOME_1, pWho); break; case 1: DoScriptText(SAY_SMEED_HOME_2, pWho); break; case 2: DoScriptText(SAY_SMEED_HOME_3, pWho); break; } - //spell have no implemented effect (dummy), so useful to notify spellHit - m_creature->CastSpell(m_creature,SPELL_KODO_KOMBO_GOSSIP,true); + // spell have no implemented effect (dummy), so useful to notify spellHit + m_creature->CastSpell(m_creature, SPELL_KODO_KOMBO_GOSSIP, true); } } } @@ -99,7 +99,7 @@ struct MANGOS_DLL_DECL npc_aged_dying_ancient_kodoAI : public ScriptedAI void UpdateAI(const uint32 diff) { - //timer should always be == 0 unless we already updated entry of creature. Then not expect this updated to ever be in combat. + // timer should always be == 0 unless we already updated entry of creature. Then not expect this updated to ever be in combat. if (m_uiDespawnTimer && m_uiDespawnTimer <= diff) { if (!m_creature->getVictim() && m_creature->isAlive()) @@ -109,7 +109,8 @@ struct MANGOS_DLL_DECL npc_aged_dying_ancient_kodoAI : public ScriptedAI m_creature->Respawn(); return; } - } else m_uiDespawnTimer -= diff; + } + else m_uiDespawnTimer -= diff; if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -123,23 +124,23 @@ CreatureAI* GetAI_npc_aged_dying_ancient_kodo(Creature* pCreature) return new npc_aged_dying_ancient_kodoAI(pCreature); } -bool EffectDummyCreature_npc_aged_dying_ancient_kodo(Unit *pCaster, uint32 spellId, SpellEffectIndex effIndex, Creature *pCreatureTarget) +bool EffectDummyCreature_npc_aged_dying_ancient_kodo(Unit* pCaster, uint32 spellId, SpellEffectIndex effIndex, Creature* pCreatureTarget) { - //always check spellid and effectindex + // always check spellid and effectindex if (spellId == SPELL_KODO_KOMBO_ITEM && effIndex == EFFECT_INDEX_0) { - //no effect if player/creature already have aura from spells + // no effect if player/creature already have aura from spells if (pCaster->HasAura(SPELL_KODO_KOMBO_PLAYER_BUFF) || pCreatureTarget->HasAura(SPELL_KODO_KOMBO_DESPAWN_BUFF)) return true; if (pCreatureTarget->GetEntry() == NPC_AGED_KODO || - pCreatureTarget->GetEntry() == NPC_DYING_KODO || - pCreatureTarget->GetEntry() == NPC_ANCIENT_KODO) + pCreatureTarget->GetEntry() == NPC_DYING_KODO || + pCreatureTarget->GetEntry() == NPC_ANCIENT_KODO) { - pCaster->CastSpell(pCaster,SPELL_KODO_KOMBO_PLAYER_BUFF,true); + pCaster->CastSpell(pCaster, SPELL_KODO_KOMBO_PLAYER_BUFF, true); pCreatureTarget->UpdateEntry(NPC_TAMED_KODO); - pCreatureTarget->CastSpell(pCreatureTarget,SPELL_KODO_KOMBO_DESPAWN_BUFF,false); + pCreatureTarget->CastSpell(pCreatureTarget, SPELL_KODO_KOMBO_DESPAWN_BUFF, false); if (pCreatureTarget->GetMotionMaster()->GetCurrentMovementGeneratorType() == WAYPOINT_MOTION_TYPE) pCreatureTarget->GetMotionMaster()->MoveIdle(); @@ -147,7 +148,7 @@ bool EffectDummyCreature_npc_aged_dying_ancient_kodo(Unit *pCaster, uint32 spell pCreatureTarget->GetMotionMaster()->MoveFollow(pCaster, PET_FOLLOW_DIST, PET_FOLLOW_ANGLE); } - //always return true when we are handling this spell and effect + // always return true when we are handling this spell and effect return true; } return false; @@ -157,7 +158,7 @@ bool GossipHello_npc_aged_dying_ancient_kodo(Player* pPlayer, Creature* pCreatur { if (pPlayer->HasAura(SPELL_KODO_KOMBO_PLAYER_BUFF) && pCreature->HasAura(SPELL_KODO_KOMBO_DESPAWN_BUFF)) { - //the expected quest objective + // the expected quest objective pPlayer->TalkedToCreature(pCreature->GetEntry(), pCreature->GetObjectGuid()); pPlayer->RemoveAurasDueToSpell(SPELL_KODO_KOMBO_PLAYER_BUFF); @@ -265,11 +266,11 @@ struct SummonLocation static const SummonLocation aMarauderSpawn[] = { - {-1291.492f, 2644.650f, 111.556f}, - {-1306.730f, 2675.163f, 111.561f}, + { -1291.492f, 2644.650f, 111.556f}, + { -1306.730f, 2675.163f, 111.561f}, }; -static const SummonLocation aWranglerSpawn[] = {-1393.194f, 2429.465f, 88.689f}; +static const SummonLocation aWranglerSpawn[] = { -1393.194f, 2429.465f, 88.689f}; struct MANGOS_DLL_DECL npc_melizza_brimbuzzleAI : public npc_escortAI, private DialogueHelper { @@ -300,7 +301,7 @@ struct MANGOS_DLL_DECL npc_melizza_brimbuzzleAI : public npc_escortAI, private D void WaypointReached(uint32 uiPointId) { - switch(uiPointId) + switch (uiPointId) { case 1: if (Player* pPlayer = GetPlayerForEscort()) diff --git a/scripts/kalimdor/dire_maul/instance_dire_maul.cpp b/scripts/kalimdor/dire_maul/instance_dire_maul.cpp index e1f757f72..127a11266 100644 --- a/scripts/kalimdor/dire_maul/instance_dire_maul.cpp +++ b/scripts/kalimdor/dire_maul/instance_dire_maul.cpp @@ -37,13 +37,13 @@ void instance_dire_maul::Initialize() void instance_dire_maul::OnCreatureCreate(Creature* pCreature) { - switch(pCreature->GetEntry()) + switch (pCreature->GetEntry()) { - // East + // East case NPC_OLD_IRONBARK: break; - // West + // West case NPC_PRINCE_TORTHELDRIN: if (m_auiEncounter[TYPE_IMMOLTHAR] == DONE) pCreature->setFaction(FACTION_HOSTILE); @@ -58,7 +58,7 @@ void instance_dire_maul::OnCreatureCreate(Creature* pCreature) m_luiHighborneSummonerGUIDs.push_back(pCreature->GetObjectGuid()); return; - // North + // North case NPC_CHORUSH: case NPC_KING_GORDOK: case NPC_MIZZLE_THE_CRAFTY: @@ -72,9 +72,9 @@ void instance_dire_maul::OnCreatureCreate(Creature* pCreature) void instance_dire_maul::OnObjectCreate(GameObject* pGo) { - switch(pGo->GetEntry()) + switch (pGo->GetEntry()) { - // East + // East case GO_CONSERVATORY_DOOR: if (m_auiEncounter[TYPE_IRONBARK] == DONE) pGo->SetGoState(GO_STATE_ACTIVE); @@ -91,7 +91,7 @@ void instance_dire_maul::OnObjectCreate(GameObject* pGo) m_lFelvineShardGUIDs.push_back(pGo->GetObjectGuid()); break; - // West + // West case GO_CRYSTAL_GENERATOR_1: m_aCrystalGeneratorGuid[0] = pGo->GetObjectGuid(); if (m_auiEncounter[TYPE_PYLON_1] == DONE) @@ -135,9 +135,9 @@ void instance_dire_maul::OnObjectCreate(GameObject* pGo) void instance_dire_maul::SetData(uint32 uiType, uint32 uiData) { - switch(uiType) + switch (uiType) { - // East + // East case TYPE_ZEVRIM: if (uiData == DONE) { @@ -166,7 +166,7 @@ void instance_dire_maul::SetData(uint32 uiType, uint32 uiData) if (!m_lFelvineShardGUIDs.empty()) { - for(GuidList::const_iterator itr = m_lFelvineShardGUIDs.begin(); itr != m_lFelvineShardGUIDs.end(); ++itr) + for (GuidList::const_iterator itr = m_lFelvineShardGUIDs.begin(); itr != m_lFelvineShardGUIDs.end(); ++itr) DoRespawnGameObject(*itr); } } @@ -178,7 +178,7 @@ void instance_dire_maul::SetData(uint32 uiType, uint32 uiData) m_auiEncounter[uiType] = uiData; break; - // West + // West case TYPE_WARPWOOD: if (uiData == DONE) DoUseDoorOrButton(GO_WARPWOOD_DOOR); @@ -215,14 +215,14 @@ void instance_dire_maul::SetData(uint32 uiType, uint32 uiData) } break; - // North + // North case TYPE_KING_GORDOK: m_auiEncounter[uiType] = uiData; if (uiData == DONE) { // Apply Aura to players in the map Map::PlayerList const& players = instance->GetPlayers(); - for(Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr) + for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr) { if (Player* pPlayer = itr->getSource()) pPlayer->CastSpell(pPlayer, SPELL_KING_OF_GORDOK, true); @@ -260,13 +260,13 @@ void instance_dire_maul::OnCreatureEnterCombat(Creature* pCreature) { switch (pCreature->GetEntry()) { - // West - // - Handling of guards of generators + // West + // - Handling of guards of generators case NPC_ARCANE_ABERRATION: case NPC_MANA_REMNANT: SortPylonGuards(); break; - // - Set InstData for ImmolThar + // - Set InstData for ImmolThar case NPC_IMMOLTHAR: SetData(TYPE_IMMOLTHAR, IN_PROGRESS); break; @@ -277,8 +277,8 @@ void instance_dire_maul::OnCreatureDeath(Creature* pCreature) { switch (pCreature->GetEntry()) { - // East - // - Handling Zevrim and Old Ironbark for the door event + // East + // - Handling Zevrim and Old Ironbark for the door event case NPC_ZEVRIM_THORNHOOF: SetData(TYPE_ZEVRIM, DONE); break; @@ -286,13 +286,13 @@ void instance_dire_maul::OnCreatureDeath(Creature* pCreature) SetData(TYPE_IRONBARK, DONE); break; - // West - // - Handling of guards of generators + // West + // - Handling of guards of generators case NPC_ARCANE_ABERRATION: case NPC_MANA_REMNANT: PylonGuardJustDied(pCreature); break; - // - InstData settings + // - InstData settings case NPC_TENDRIS_WARPWOOD: SetData(TYPE_WARPWOOD, DONE); break; @@ -300,8 +300,8 @@ void instance_dire_maul::OnCreatureDeath(Creature* pCreature) SetData(TYPE_IMMOLTHAR, DONE); break; - // North - // - Handling of Ogre Boss (Assume boss can be handled in Acid) + // North + // - Handling of Ogre Boss (Assume boss can be handled in Acid) case NPC_KING_GORDOK: SetData(TYPE_KING_GORDOK, DONE); break; @@ -320,14 +320,14 @@ void instance_dire_maul::Load(const char* chrIn) std::istringstream loadStream(chrIn); loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> - m_auiEncounter[3] >> m_auiEncounter[4] >> m_auiEncounter[5] >> - m_auiEncounter[6] >> m_auiEncounter[7] >> m_auiEncounter[8] >> - m_auiEncounter[9] >> m_auiEncounter[10] >> m_auiEncounter[11]; + m_auiEncounter[3] >> m_auiEncounter[4] >> m_auiEncounter[5] >> + m_auiEncounter[6] >> m_auiEncounter[7] >> m_auiEncounter[8] >> + m_auiEncounter[9] >> m_auiEncounter[10] >> m_auiEncounter[11]; if (m_auiEncounter[TYPE_ALZZIN] >= DONE) - m_bWallDestroyed = true; + m_bWallDestroyed = true; - for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) + for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) { if (m_auiEncounter[i] == IN_PROGRESS) m_auiEncounter[i] = NOT_STARTED; diff --git a/scripts/kalimdor/durotar.cpp b/scripts/kalimdor/durotar.cpp index cef72d5d0..c421db2ec 100644 --- a/scripts/kalimdor/durotar.cpp +++ b/scripts/kalimdor/durotar.cpp @@ -47,7 +47,7 @@ struct MANGOS_DLL_DECL npc_lazy_peonAI : public ScriptedAI { npc_lazy_peonAI(Creature* pCreature) : ScriptedAI(pCreature) { - Reset (); + Reset(); m_uiStopSleepingTimer = urand(30000, 120000); // Set on spawn to a potential small timer, to get nice results for initial case } @@ -127,7 +127,7 @@ CreatureAI* GetAI_npc_lazy_peon(Creature* pCreature) bool EffectDummyCreature_lazy_peon_awake(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) { - //always check spellid and effectindex + // always check spellid and effectindex if (uiSpellId == SPELL_AWAKEN_PEON && uiEffIndex == EFFECT_INDEX_0) { if (!pCreatureTarget->HasAura(SPELL_PEON_SLEEP) || pCaster->GetTypeId() != TYPEID_PLAYER || pCreatureTarget->GetEntry() != NPC_SLEEPING_PEON) @@ -136,7 +136,7 @@ bool EffectDummyCreature_lazy_peon_awake(Unit* pCaster, uint32 uiSpellId, SpellE if (npc_lazy_peonAI* pPeonAI = dynamic_cast(pCreatureTarget->AI())) pPeonAI->StartLumbering(pCaster); - //always return true when we are handling this spell and effect + // always return true when we are handling this spell and effect return true; } diff --git a/scripts/kalimdor/dustwallow_marsh.cpp b/scripts/kalimdor/dustwallow_marsh.cpp index 044be6d3d..98f5169e6 100644 --- a/scripts/kalimdor/dustwallow_marsh.cpp +++ b/scripts/kalimdor/dustwallow_marsh.cpp @@ -40,8 +40,8 @@ enum { QUEST_WHATS_HAUNTING_WITCH_HILL = 11180, SPELL_SUMMON_RESTLESS_APPARITION = 42511, - SPELL_CONSUME_FLESH = 37933, //Risen Husk - SPELL_INTANGIBLE_PRESENCE = 43127, //Risen Spirit + SPELL_CONSUME_FLESH = 37933, // Risen Husk + SPELL_INTANGIBLE_PRESENCE = 43127, // Risen Spirit NPC_RISEN_HUSK = 23555, NPC_RISEN_SPIRIT = 23554 }; @@ -69,7 +69,7 @@ struct MANGOS_DLL_DECL mobs_risen_husk_spiritAI : public ScriptedAI m_pCreditPlayer->KilledMonsterCredit(pSummoned->GetEntry(), pSummoned->GetObjectGuid()); } - void DamageTaken(Unit* pDoneBy, uint32 &uiDamage) + void DamageTaken(Unit* pDoneBy, uint32& uiDamage) { if (uiDamage < m_creature->GetHealth()) return; @@ -92,7 +92,7 @@ struct MANGOS_DLL_DECL mobs_risen_husk_spiritAI : public ScriptedAI if (m_uiConsumeFlesh_Timer < uiDiff) { if (m_creature->GetEntry() == NPC_RISEN_HUSK) - DoCastSpellIfCan(m_creature->getVictim(),SPELL_CONSUME_FLESH); + DoCastSpellIfCan(m_creature->getVictim(), SPELL_CONSUME_FLESH); m_uiConsumeFlesh_Timer = 15000; } @@ -102,7 +102,7 @@ struct MANGOS_DLL_DECL mobs_risen_husk_spiritAI : public ScriptedAI if (m_uiIntangiblePresence_Timer < uiDiff) { if (m_creature->GetEntry() == NPC_RISEN_SPIRIT) - DoCastSpellIfCan(m_creature->getVictim(),SPELL_INTANGIBLE_PRESENCE); + DoCastSpellIfCan(m_creature->getVictim(), SPELL_INTANGIBLE_PRESENCE); m_uiIntangiblePresence_Timer = 20000; } @@ -152,7 +152,7 @@ struct MANGOS_DLL_DECL npc_restless_apparitionAI : public ScriptedAI if (m_uiTalk_Timer <= uiDiff) { - switch(urand(0, 7)) + switch (urand(0, 7)) { case 0: DoScriptText(SAY_RAND_1, m_creature); break; case 1: DoScriptText(SAY_RAND_2, m_creature); break; @@ -205,7 +205,7 @@ struct MANGOS_DLL_DECL npc_morokkAI : public npc_escortAI void WaypointReached(uint32 uiPointId) { - switch(uiPointId) + switch (uiPointId) { case 0: SetEscortPaused(true); @@ -233,7 +233,7 @@ struct MANGOS_DLL_DECL npc_morokkAI : public npc_escortAI AttackStart(pAttacker); } - void DamageTaken(Unit* pDoneBy, uint32 &uiDamage) + void DamageTaken(Unit* pDoneBy, uint32& uiDamage) { if (HasEscortState(STATE_ESCORT_ESCORTING)) { @@ -339,8 +339,8 @@ enum PHASE_COMPLETE = 3 }; -static float m_afSpawn[] = {-3383.501953f, -3203.383301f, 36.149f}; -static float m_afMoveTo[] = {-3371.414795f, -3212.179932f, 34.210f}; +static float m_afSpawn[] = { -3383.501953f, -3203.383301f, 36.149f}; +static float m_afMoveTo[] = { -3371.414795f, -3212.179932f, 34.210f}; struct MANGOS_DLL_DECL npc_ogronAI : public npc_escortAI { @@ -385,7 +385,7 @@ struct MANGOS_DLL_DECL npc_ogronAI : public npc_escortAI { if (!lCreatureList.empty()) { - for(std::list::iterator itr = lCreatureList.begin(); itr != lCreatureList.end(); ++itr) + for (std::list::iterator itr = lCreatureList.begin(); itr != lCreatureList.end(); ++itr) { if ((*itr)->GetEntry() == uiCreatureEntry && (*itr)->isAlive()) return (*itr); @@ -397,7 +397,7 @@ struct MANGOS_DLL_DECL npc_ogronAI : public npc_escortAI void WaypointReached(uint32 uiPointId) { - switch(uiPointId) + switch (uiPointId) { case 9: DoScriptText(SAY_OGR_SPOT, m_creature); @@ -424,9 +424,9 @@ struct MANGOS_DLL_DECL npc_ogronAI : public npc_escortAI { if (Creature* pCaldwell = GetCreature(NPC_CALDWELL)) { - //will this conversion work without compile warning/error? + // will this conversion work without compile warning/error? size_t iSize = lCreatureList.size(); - pSummoned->GetMotionMaster()->MoveFollow(pCaldwell, 0.5f, (M_PI/2)*(int)iSize); + pSummoned->GetMotionMaster()->MoveFollow(pCaldwell, 0.5f, (M_PI / 2) * (int)iSize); } } } @@ -435,7 +435,7 @@ struct MANGOS_DLL_DECL npc_ogronAI : public npc_escortAI { if (!lCreatureList.empty()) { - for(std::list::iterator itr = lCreatureList.begin(); itr != lCreatureList.end(); ++itr) + for (std::list::iterator itr = lCreatureList.begin(); itr != lCreatureList.end(); ++itr) { if ((*itr)->GetEntry() == NPC_REETHE) continue; @@ -459,11 +459,11 @@ struct MANGOS_DLL_DECL npc_ogronAI : public npc_escortAI { m_uiGlobalTimer = 5000; - switch(m_uiPhase) + switch (m_uiPhase) { case PHASE_INTRO: { - switch(m_uiPhaseCounter) + switch (m_uiPhaseCounter) { case 0: if (Creature* pReethe = GetCreature(NPC_REETHE)) @@ -501,7 +501,7 @@ struct MANGOS_DLL_DECL npc_ogronAI : public npc_escortAI } case PHASE_GUESTS: { - switch(m_uiPhaseCounter) + switch (m_uiPhaseCounter) { case 6: if (Creature* pCaldwell = GetCreature(NPC_CALDWELL)) @@ -542,7 +542,7 @@ struct MANGOS_DLL_DECL npc_ogronAI : public npc_escortAI } case PHASE_COMPLETE: { - switch(m_uiPhaseCounter) + switch (m_uiPhaseCounter) { case 12: if (Player* pPlayer = GetPlayerForEscort()) @@ -611,14 +611,14 @@ enum EMOTE_SURRENDER = -1000415, QUEST_MISSING_DIPLO_PT16 = 1324, - FACTION_HOSTILE = 168, //guessed, may be different + FACTION_HOSTILE = 168, // guessed, may be different - NPC_SENTRY = 5184, //helps hendel - NPC_JAINA = 4968, //appears once hendel gives up + NPC_SENTRY = 5184, // helps hendel + NPC_JAINA = 4968, // appears once hendel gives up NPC_TERVOSH = 4967 }; -//TODO: develop this further, end event not created +// TODO: develop this further, end event not created struct MANGOS_DLL_DECL npc_private_hendelAI : public ScriptedAI { npc_private_hendelAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } @@ -640,7 +640,7 @@ struct MANGOS_DLL_DECL npc_private_hendelAI : public ScriptedAI AttackStart(pAttacker); } - void DamageTaken(Unit* pDoneBy, uint32 &uiDamage) + void DamageTaken(Unit* pDoneBy, uint32& uiDamage) { if (uiDamage > m_creature->GetHealth() || m_creature->GetHealthPercent() < 20.0f) { diff --git a/scripts/kalimdor/felwood.cpp b/scripts/kalimdor/felwood.cpp index a4906f208..f3d7ae1a8 100644 --- a/scripts/kalimdor/felwood.cpp +++ b/scripts/kalimdor/felwood.cpp @@ -61,7 +61,7 @@ struct MANGOS_DLL_DECL npc_kittenAI : public FollowerAI pCreature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - //find a decent way to move to center of moonwell + // find a decent way to move to center of moonwell } m_uiMoonwellCooldown = 7500; @@ -74,7 +74,7 @@ struct MANGOS_DLL_DECL npc_kittenAI : public FollowerAI void MoveInLineOfSight(Unit* pWho) { - //should not have npcflag by default, so set when expected + // should not have npcflag by default, so set when expected if (!m_creature->getVictim() && !m_creature->HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP) && HasFollowState(STATE_FOLLOW_INPROGRESS) && pWho->GetEntry() == NPC_WINNA) { if (m_creature->IsWithinDistInMap(pWho, INTERACTION_DISTANCE)) @@ -111,7 +111,7 @@ CreatureAI* GetAI_npc_kitten(Creature* pCreature) bool EffectDummyCreature_npc_kitten(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) { - //always check spellid and effectindex + // always check spellid and effectindex if (uiSpellId == SPELL_CORRUPT_SABER_VISUAL && uiEffIndex == EFFECT_INDEX_0) { // Not nice way, however using UpdateEntry will not be correct. @@ -126,7 +126,7 @@ bool EffectDummyCreature_npc_kitten(Unit* pCaster, uint32 uiSpellId, SpellEffect if (Unit* pOwner = pCreatureTarget->GetOwner()) DoScriptText(EMOTE_SAB_FOLLOW, pCreatureTarget, pOwner); - //always return true when we are handling this spell and effect + // always return true when we are handling this spell and effect return true; } return false; @@ -137,7 +137,7 @@ bool GossipHello_npc_corrupt_saber(Player* pPlayer, Creature* pCreature) if (pPlayer->GetQuestStatus(QUEST_CORRUPT_SABER) == QUEST_STATUS_INCOMPLETE) { if (GetClosestCreatureWithEntry(pCreature, NPC_WINNA, INTERACTION_DISTANCE)) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_RELEASE, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_RELEASE, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); } pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); @@ -146,7 +146,7 @@ bool GossipHello_npc_corrupt_saber(Player* pPlayer, Creature* pCreature) bool GossipSelect_npc_corrupt_saber(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) { - if (uiAction == GOSSIP_ACTION_INFO_DEF+1) + if (uiAction == GOSSIP_ACTION_INFO_DEF + 1) { pPlayer->CLOSE_GOSSIP_MENU(); @@ -180,7 +180,7 @@ enum struct MANGOS_DLL_DECL npc_niby_the_almightyAI : public ScriptedAI { - npc_niby_the_almightyAI(Creature* pCreature) : ScriptedAI(pCreature){ Reset(); } + npc_niby_the_almightyAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } uint32 m_uiSummonTimer; uint8 m_uiSpeech; @@ -234,7 +234,7 @@ struct MANGOS_DLL_DECL npc_niby_the_almightyAI : public ScriptedAI } else { - //Skip Speech 5 + // Skip Speech 5 m_uiSummonTimer = 40000; ++m_uiSpeech; } @@ -344,7 +344,7 @@ struct MANGOS_DLL_DECL npc_kroshiusAI : public ScriptedAI { switch (m_uiPhase) { - case 1: // Revived + case 1: // Revived m_creature->SetStandState(UNIT_STAND_STATE_STAND); m_uiPhaseTimer = 1000; break; @@ -352,7 +352,7 @@ struct MANGOS_DLL_DECL npc_kroshiusAI : public ScriptedAI DoScriptText(SAY_KROSHIUS_REVIVE, m_creature); m_uiPhaseTimer = 3500; break; - case 3: // Attack + case 3: // Attack m_creature->setFaction(FACTION_HOSTILE); // TODO workaround will better idea m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE); diff --git a/scripts/kalimdor/feralas.cpp b/scripts/kalimdor/feralas.cpp index 04960e3ce..d3be188f2 100644 --- a/scripts/kalimdor/feralas.cpp +++ b/scripts/kalimdor/feralas.cpp @@ -54,30 +54,30 @@ struct MANGOS_DLL_DECL npc_oox22feAI : public npc_escortAI { switch (i) { - // First Ambush(3 Yetis) + // First Ambush(3 Yetis) case 11: - DoScriptText(SAY_OOX_AMBUSH,m_creature); + DoScriptText(SAY_OOX_AMBUSH, m_creature); m_creature->SummonCreature(NPC_YETI, -4841.01f, 1593.91f, 73.42f, 3.98f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10000); m_creature->SummonCreature(NPC_YETI, -4837.61f, 1568.58f, 78.21f, 3.13f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10000); m_creature->SummonCreature(NPC_YETI, -4841.89f, 1569.95f, 76.53f, 0.68f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10000); break; - //Second Ambush(3 Gorillas) + // Second Ambush(3 Gorillas) case 21: - DoScriptText(SAY_OOX_AMBUSH,m_creature); + DoScriptText(SAY_OOX_AMBUSH, m_creature); m_creature->SummonCreature(NPC_GORILLA, -4595.81f, 2005.99f, 53.08f, 3.74f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10000); m_creature->SummonCreature(NPC_GORILLA, -4597.53f, 2008.31f, 52.70f, 3.78f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10000); m_creature->SummonCreature(NPC_GORILLA, -4599.37f, 2010.59f, 52.77f, 3.84f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10000); break; - //Third Ambush(4 Gnolls) + // Third Ambush(4 Gnolls) case 30: - DoScriptText(SAY_OOX_AMBUSH,m_creature); + DoScriptText(SAY_OOX_AMBUSH, m_creature); m_creature->SummonCreature(NPC_WOODPAW_REAVER, -4425.14f, 2075.87f, 47.77f, 3.77f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10000); m_creature->SummonCreature(NPC_WOODPAW_BRUTE , -4426.68f, 2077.98f, 47.57f, 3.77f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10000); m_creature->SummonCreature(NPC_WOODPAW_MYSTIC, -4428.33f, 2080.24f, 47.43f, 3.87f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10000); m_creature->SummonCreature(NPC_WOODPAW_ALPHA , -4430.04f, 2075.54f, 46.83f, 3.81f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10000); break; case 37: - DoScriptText(SAY_OOX_END,m_creature); + DoScriptText(SAY_OOX_END, m_creature); // Award quest credit if (Player* pPlayer = GetPlayerForEscort()) pPlayer->GroupEventHappens(QUEST_RESCUE_OOX22FE, m_creature); @@ -93,11 +93,11 @@ struct MANGOS_DLL_DECL npc_oox22feAI : public npc_escortAI void Aggro(Unit* who) { - //For an small probability the npc says something when he get aggro - switch(urand(0, 9)) + // For an small probability the npc says something when he get aggro + switch (urand(0, 9)) { - case 0: DoScriptText(SAY_OOX_AGGRO1, m_creature); break; - case 1: DoScriptText(SAY_OOX_AGGRO2, m_creature); break; + case 0: DoScriptText(SAY_OOX_AGGRO1, m_creature); break; + case 1: DoScriptText(SAY_OOX_AGGRO2, m_creature); break; } } @@ -117,7 +117,7 @@ bool QuestAccept_npc_oox22fe(Player* pPlayer, Creature* pCreature, const Quest* if (pQuest->GetQuestId() == QUEST_RESCUE_OOX22FE) { DoScriptText(SAY_OOX_START, pCreature); - //change that the npc is not lying dead on the ground + // change that the npc is not lying dead on the ground pCreature->SetStandState(UNIT_STAND_STATE_STAND); if (pPlayer->GetTeam() == ALLIANCE) diff --git a/scripts/kalimdor/moonglade.cpp b/scripts/kalimdor/moonglade.cpp index 2609a0a22..6d4e2d6d6 100644 --- a/scripts/kalimdor/moonglade.cpp +++ b/scripts/kalimdor/moonglade.cpp @@ -63,8 +63,8 @@ struct MANGOS_DLL_DECL npc_clintar_dw_spiritAI : public npc_escortAI if (!pPlayer) return; - //visual details here probably need refinement - switch(i) + // visual details here probably need refinement + switch (i) { case 0: DoScriptText(SAY_START, m_creature, pPlayer); @@ -107,9 +107,9 @@ struct MANGOS_DLL_DECL npc_clintar_dw_spiritAI : public npc_escortAI if (HasEscortState(STATE_ESCORT_ESCORTING)) return; - //m_creature are expected to always be spawned, but not visible for player - //spell casted from quest_template.SrcSpell require this to be this way - //we handle the triggered spell to get a "hook" to our guy so he can be escorted on quest accept + // m_creature are expected to always be spawned, but not visible for player + // spell casted from quest_template.SrcSpell require this to be this way + // we handle the triggered spell to get a "hook" to our guy so he can be escorted on quest accept if (CreatureInfo const* pTemp = GetCreatureTemplateStore(m_creature->GetEntry())) m_creature->SetDisplayId(Creature::ChooseDisplayId(pTemp)); @@ -118,10 +118,10 @@ struct MANGOS_DLL_DECL npc_clintar_dw_spiritAI : public npc_escortAI m_creature->SetVisibility(VISIBILITY_OFF); } - //called only from EffectDummy + // called only from EffectDummy void DoStart(Unit* pStarter) { - //not the best way, maybe check in DummyEffect if this creature are "free" and not in escort. + // not the best way, maybe check in DummyEffect if this creature are "free" and not in escort. if (HasEscortState(STATE_ESCORT_ESCORTING)) return; @@ -141,10 +141,10 @@ CreatureAI* GetAI_npc_clintar_dw_spirit(Creature* pCreature) return new npc_clintar_dw_spiritAI(pCreature); } -//we expect this spell to be triggered from spell casted at questAccept -bool EffectDummyCreature_npc_clintar_dw_spirit(Unit *pCaster, uint32 spellId, SpellEffectIndex effIndex, Creature *pCreatureTarget) +// we expect this spell to be triggered from spell casted at questAccept +bool EffectDummyCreature_npc_clintar_dw_spirit(Unit* pCaster, uint32 spellId, SpellEffectIndex effIndex, Creature* pCreatureTarget) { - //always check spellid and effectindex + // always check spellid and effectindex if (spellId == SPELL_EMERALD_DREAM && effIndex == EFFECT_INDEX_0) { if (pCaster->GetTypeId() != TYPEID_PLAYER || pCaster->HasAura(SPELL_EMERALD_DREAM)) @@ -158,11 +158,11 @@ bool EffectDummyCreature_npc_clintar_dw_spirit(Unit *pCaster, uint32 spellId, Sp else return true; - //done here, escort can start + // done here, escort can start if (npc_clintar_dw_spiritAI* pSpiritAI = dynamic_cast(pCreatureTarget->AI())) pSpiritAI->DoStart(pCaster); - //always return true when we are handling this spell and effect + // always return true when we are handling this spell and effect return true; } return true; @@ -180,7 +180,7 @@ enum SPELL_REJUVENATION = 20664, SPELL_STARFIRE = 21668, SPELL_ERANIKUS_REDEEMED = 25846, // transform Eranikus - //SPELL_MOONGLADE_TRANQUILITY = unk, // spell which acts as a spotlight over Eranikus after he is redeemed + // SPELL_MOONGLADE_TRANQUILITY = unk, // spell which acts as a spotlight over Eranikus after he is redeemed NPC_ERANIKUS_TYRANT = 15491, NPC_NIGHTMARE_PHANTASM = 15629, // shadows summoned during the event - should cast 17228 and 21307 @@ -247,10 +247,10 @@ enum static const DialogueEntry aIntroDialogue[] = { - {NPC_REMULOS, 0, 14000}, // target player + {NPC_REMULOS, 0, 14000}, // target player {SAY_REMULOS_INTRO_4, NPC_REMULOS, 12000}, {SAY_REMULOS_INTRO_5, NPC_REMULOS, 5000}, - {SPELL_CONJURE_RIFT, 0, 13000}, // conjure rift spell + {SPELL_CONJURE_RIFT, 0, 13000}, // conjure rift spell {SAY_ERANIKUS_SPAWN, NPC_ERANIKUS_TYRANT, 11000}, {SAY_REMULOS_TAUNT_1, NPC_REMULOS, 5000}, {EMOTE_ERANIKUS_LAUGH, NPC_ERANIKUS_TYRANT, 3000}, @@ -258,8 +258,8 @@ static const DialogueEntry aIntroDialogue[] = {SAY_REMULOS_TAUNT_3, NPC_REMULOS, 12000}, {SAY_ERANIKUS_TAUNT_4, NPC_ERANIKUS_TYRANT, 6000}, {EMOTE_ERANIKUS_ATTACK, NPC_ERANIKUS_TYRANT, 7000}, - {NPC_ERANIKUS_TYRANT, 0, 0}, // target player - restart the escort and move Eranikus above the village - {SAY_REMULOS_DEFEND_2, NPC_REMULOS, 6000}, // face Eranikus + {NPC_ERANIKUS_TYRANT, 0, 0}, // target player - restart the escort and move Eranikus above the village + {SAY_REMULOS_DEFEND_2, NPC_REMULOS, 6000}, // face Eranikus {SAY_ERANIKUS_SHADOWS, NPC_ERANIKUS_TYRANT, 4000}, {SAY_REMULOS_DEFEND_3, NPC_REMULOS, 0}, {0, 0, 0}, @@ -338,13 +338,13 @@ struct MANGOS_DLL_DECL npc_keeper_remulosAI : public npc_escortAI, private Dialo void JustSummoned(Creature* pSummoned) { - switch(pSummoned->GetEntry()) + switch (pSummoned->GetEntry()) { case NPC_ERANIKUS_TYRANT: m_eranikusGuid = pSummoned->GetObjectGuid(); // Make Eranikus unattackable first // ToDo: uncomment the fly effect when it will be possible to cancel it properly - //pSummoned->SetByteValue(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_UNK_2); + // pSummoned->SetByteValue(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_UNK_2); pSummoned->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); pSummoned->SetLevitate(true); break; @@ -361,7 +361,7 @@ struct MANGOS_DLL_DECL npc_keeper_remulosAI : public npc_escortAI, private Dialo if (uiType != POINT_MOTION_TYPE || pSummoned->GetEntry() != NPC_ERANIKUS_TYRANT) return; - switch(uiPointId) + switch (uiPointId) { case POINT_ID_ERANIKUS_FLIGHT: // Set Eranikus to face Remulos @@ -387,7 +387,7 @@ struct MANGOS_DLL_DECL npc_keeper_remulosAI : public npc_escortAI, private Dialo void WaypointReached(uint32 uiPointId) { - switch(uiPointId) + switch (uiPointId) { case 0: if (Player* pPlayer = GetPlayerForEscort()) @@ -424,7 +424,7 @@ struct MANGOS_DLL_DECL npc_keeper_remulosAI : public npc_escortAI, private Dialo void JustDidDialogueStep(int32 iEntry) { - switch(iEntry) + switch (iEntry) { case NPC_REMULOS: if (Player* pPlayer = GetPlayerForEscort()) @@ -435,7 +435,7 @@ struct MANGOS_DLL_DECL npc_keeper_remulosAI : public npc_escortAI, private Dialo break; case SAY_ERANIKUS_SPAWN: // This big yellow emote was removed at some point in WotLK - //DoScriptText(EMOTE_SUMMON_ERANIKUS, pEranikus); + // DoScriptText(EMOTE_SUMMON_ERANIKUS, pEranikus); break; case NPC_ERANIKUS_TYRANT: if (Player* pPlayer = GetPlayerForEscort()) @@ -471,7 +471,7 @@ struct MANGOS_DLL_DECL npc_keeper_remulosAI : public npc_escortAI, private Dialo { if (m_uiOutroTimer <= uiDiff) { - switch(m_uiOutroPhase) + switch (m_uiOutroPhase) { case 0: DoScriptText(SAY_REMULOS_OUTRO_1, m_creature); @@ -480,7 +480,7 @@ struct MANGOS_DLL_DECL npc_keeper_remulosAI : public npc_escortAI, private Dialo case 1: // Despawn Remulos after the outro is finished - he will respawn automatically at his home position after a few min DoScriptText(SAY_REMULOS_OUTRO_2, m_creature); - m_creature->SetRespawnDelay(1*MINUTE); + m_creature->SetRespawnDelay(1 * MINUTE); m_creature->ForcedDespawn(3000); m_uiOutroTimer = 0; break; @@ -501,7 +501,7 @@ struct MANGOS_DLL_DECL npc_keeper_remulosAI : public npc_escortAI, private Dialo { // summon 3 shades inside the house for (uint8 i = 0; i < MAX_SHADOWS; ++i) - m_creature->SummonCreature(NPC_NIGHTMARE_PHANTASM, aShadowsLocations[i].m_fX, aShadowsLocations[i].m_fY, aShadowsLocations[i].m_fZ, 0,TEMPSUMMON_DEAD_DESPAWN, 0); + m_creature->SummonCreature(NPC_NIGHTMARE_PHANTASM, aShadowsLocations[i].m_fX, aShadowsLocations[i].m_fY, aShadowsLocations[i].m_fZ, 0, TEMPSUMMON_DEAD_DESPAWN, 0); if (Creature* pEranikus = m_creature->GetMap()->GetCreature(m_eranikusGuid)) DoScriptText(SAY_ERANIKUS_ATTACK_1, pEranikus); @@ -555,7 +555,7 @@ struct MANGOS_DLL_DECL npc_keeper_remulosAI : public npc_escortAI, private Dialo { if (Unit* pTarget = DoSelectLowestHpFriendly(DEFAULT_VISIBILITY_DISTANCE)) { - switch(urand(0, 2)) + switch (urand(0, 2)) { case 0: DoCastSpellIfCan(pTarget, SPELL_HEALING_TOUCH); break; case 1: DoCastSpellIfCan(pTarget, SPELL_REJUVENATION); break; @@ -603,12 +603,12 @@ bool QuestAccept_npc_keeper_remulos(Player* pPlayer, Creature* pCreature, const bool EffectDummyCreature_conjure_rift(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) { - //always check spellid and effectindex + // always check spellid and effectindex if (uiSpellId == SPELL_CONJURE_RIFT && uiEffIndex == EFFECT_INDEX_0) { pCaster->SummonCreature(NPC_ERANIKUS_TYRANT, aEranikusLocations[0].m_fX, aEranikusLocations[0].m_fY, aEranikusLocations[0].m_fZ, aEranikusLocations[0].m_fO, TEMPSUMMON_DEAD_DESPAWN, 0); - //always return true when we are handling this spell and effect + // always return true when we are handling this spell and effect return true; } @@ -728,7 +728,7 @@ struct MANGOS_DLL_DECL boss_eranikusAI : public ScriptedAI void JustSummoned(Creature* pSummoned) { - switch(pSummoned->GetEntry()) + switch (pSummoned->GetEntry()) { case NPC_TYRANDE_WHISPERWIND: m_tyrandeGuid = pSummoned->GetObjectGuid(); @@ -747,7 +747,7 @@ struct MANGOS_DLL_DECL boss_eranikusAI : public ScriptedAI void DoDespawnSummoned() { - for(GuidList::const_iterator itr = m_lPriestessList.begin(); itr != m_lPriestessList.end(); ++itr) + for (GuidList::const_iterator itr = m_lPriestessList.begin(); itr != m_lPriestessList.end(); ++itr) { if (Creature* pTemp = m_creature->GetMap()->GetCreature(*itr)) pTemp->ForcedDespawn(); @@ -759,7 +759,7 @@ struct MANGOS_DLL_DECL boss_eranikusAI : public ScriptedAI if (uiType != POINT_MOTION_TYPE) return; - switch(uiPointId) + switch (uiPointId) { case POINT_ID_TYRANDE_HEAL: if (pSummoned->GetEntry() == NPC_TYRANDE_WHISPERWIND) @@ -798,7 +798,7 @@ struct MANGOS_DLL_DECL boss_eranikusAI : public ScriptedAI { if (m_uiEventTimer <= uiDiff) { - switch(m_uiEventPhase) + switch (m_uiEventPhase) { case 0: // Eranikus is redeemed - make Tyrande kneel and stop casting @@ -812,7 +812,7 @@ struct MANGOS_DLL_DECL boss_eranikusAI : public ScriptedAI pRemulos->SetFacingToObject(m_creature); // Note: this emote was a world wide yellow emote before WotLK DoScriptText(EMOTE_ERANIKUS_REDEEM, m_creature); - //DoCastSpellIfCan(m_creature, SPELL_MOONGLADE_TRANQUILITY); // spell id unk for the moment + // DoCastSpellIfCan(m_creature, SPELL_MOONGLADE_TRANQUILITY); // spell id unk for the moment m_creature->SetStandState(UNIT_STAND_STATE_DEAD); m_uiEventTimer = 5000; break; @@ -884,7 +884,7 @@ struct MANGOS_DLL_DECL boss_eranikusAI : public ScriptedAI // Not sure if this should be handled by health percent, but this is the only reasonable way if (m_creature->GetHealthPercent() < m_uiHealthCheck) { - switch(m_uiHealthCheck) + switch (m_uiHealthCheck) { case 85: DoScriptText(SAY_ERANIKUS_ATTACK_3, m_creature); diff --git a/scripts/kalimdor/mulgore.cpp b/scripts/kalimdor/mulgore.cpp index b9901ca69..de670fdb9 100644 --- a/scripts/kalimdor/mulgore.cpp +++ b/scripts/kalimdor/mulgore.cpp @@ -106,7 +106,7 @@ struct MANGOS_DLL_DECL npc_kyle_the_frenziedAI : public ScriptedAI m_uiEventTimer = 5000; ++m_uiEventPhase; - switch(m_uiEventPhase) + switch (m_uiEventPhase) { case 1: if (Player* pPlayer = m_creature->GetMap()->GetPlayer(m_playerGuid)) @@ -120,7 +120,7 @@ struct MANGOS_DLL_DECL npc_kyle_the_frenziedAI : public ScriptedAI uint32 uiGameobjectEntry = pSpell->EffectMiscValue[EFFECT_INDEX_1]; - pGo = GetClosestGameObjectWithEntry(pPlayer, uiGameobjectEntry, 2*INTERACTION_DISTANCE); + pGo = GetClosestGameObjectWithEntry(pPlayer, uiGameobjectEntry, 2 * INTERACTION_DISTANCE); } if (pGo) diff --git a/scripts/kalimdor/onyxias_lair/boss_onyxia.cpp b/scripts/kalimdor/onyxias_lair/boss_onyxia.cpp index d4f9cbed9..0e5315ba7 100644 --- a/scripts/kalimdor/onyxias_lair/boss_onyxia.cpp +++ b/scripts/kalimdor/onyxias_lair/boss_onyxia.cpp @@ -43,7 +43,7 @@ enum SPELL_FIREBALL = 18392, SPELL_FIREBALL_H = 68926, - //Not much choise about these. We have to make own defintion on the direction/start-end point + // Not much choise about these. We have to make own defintion on the direction/start-end point SPELL_BREATH_NORTH_TO_SOUTH = 17086, // 20x in "array" SPELL_BREATH_SOUTH_TO_NORTH = 18351, // 11x in "array" @@ -58,7 +58,7 @@ enum SPELL_VISUAL_BREATH_A = 4880, // Only and all of the above Breath spells (and their triggered spells) have these visuals SPELL_VISUAL_BREATH_B = 4919, - //SPELL_BREATH = 21131, // 8x in "array", different initial cast than the other arrays + // SPELL_BREATH = 21131, // 8x in "array", different initial cast than the other arrays SPELL_BELLOWINGROAR = 18431, SPELL_HEATED_GROUND = 22191, // TODO @@ -83,23 +83,23 @@ struct OnyxiaMove float fX, fY, fZ; }; -static OnyxiaMove aMoveData[]= +static OnyxiaMove aMoveData[] = { - {0, 4, SPELL_BREATH_NORTH_TO_SOUTH, 22.8763f, -217.152f, -60.0548f}, //north - {1, 5, SPELL_BREATH_NE_TO_SW, 10.2191f, -247.912f, -60.896f}, //north-east - {2, 6, SPELL_BREATH_EAST_TO_WEST, -31.4963f, -250.123f, -60.1278f}, //east - {3, 7, SPELL_BREATH_SE_TO_NW, -63.5156f, -240.096f, -60.477f}, //south-east - {4, 0, SPELL_BREATH_SOUTH_TO_NORTH, -65.8444f, -213.809f, -60.2985f}, //south - {5, 1, SPELL_BREATH_SW_TO_NE, -58.2509f, -189.020f, -60.790f}, //south-west - {6, 2, SPELL_BREATH_WEST_TO_EAST, -33.5561f, -182.682f, -60.9457f}, //west - {7, 3, SPELL_BREATH_NW_TO_SE, 6.8951f, -180.246f, -60.896f}, //north-west + {0, 4, SPELL_BREATH_NORTH_TO_SOUTH, 22.8763f, -217.152f, -60.0548f}, // north + {1, 5, SPELL_BREATH_NE_TO_SW, 10.2191f, -247.912f, -60.896f}, // north-east + {2, 6, SPELL_BREATH_EAST_TO_WEST, -31.4963f, -250.123f, -60.1278f}, // east + {3, 7, SPELL_BREATH_SE_TO_NW, -63.5156f, -240.096f, -60.477f}, // south-east + {4, 0, SPELL_BREATH_SOUTH_TO_NORTH, -65.8444f, -213.809f, -60.2985f}, // south + {5, 1, SPELL_BREATH_SW_TO_NE, -58.2509f, -189.020f, -60.790f}, // south-west + {6, 2, SPELL_BREATH_WEST_TO_EAST, -33.5561f, -182.682f, -60.9457f}, // west + {7, 3, SPELL_BREATH_NW_TO_SE, 6.8951f, -180.246f, -60.896f}, // north-west }; -static const float afSpawnLocations[3][3]= +static const float afSpawnLocations[3][3] = { - {-30.127f, -254.463f, -89.440f}, // whelps - {-30.817f, -177.106f, -89.258f}, // whelps - {-126.57f, -214.609f, -71.446f} // guardians + { -30.127f, -254.463f, -89.440f}, // whelps + { -30.817f, -177.106f, -89.258f}, // whelps + { -126.57f, -214.609f, -71.446f} // guardians }; struct MANGOS_DLL_DECL boss_onyxiaAI : public ScriptedAI @@ -223,13 +223,13 @@ struct MANGOS_DLL_DECL boss_onyxiaAI : public ScriptedAI void SpellHit(Unit* pCaster, const SpellEntry* pSpell) { if (pSpell->Id == SPELL_BREATH_EAST_TO_WEST || - pSpell->Id == SPELL_BREATH_WEST_TO_EAST || - pSpell->Id == SPELL_BREATH_SE_TO_NW || - pSpell->Id == SPELL_BREATH_NW_TO_SE || - pSpell->Id == SPELL_BREATH_SW_TO_NE || - pSpell->Id == SPELL_BREATH_NE_TO_SW || - pSpell->Id == SPELL_BREATH_SOUTH_TO_NORTH || - pSpell->Id == SPELL_BREATH_NORTH_TO_SOUTH) + pSpell->Id == SPELL_BREATH_WEST_TO_EAST || + pSpell->Id == SPELL_BREATH_SE_TO_NW || + pSpell->Id == SPELL_BREATH_NW_TO_SE || + pSpell->Id == SPELL_BREATH_SW_TO_NE || + pSpell->Id == SPELL_BREATH_NE_TO_SW || + pSpell->Id == SPELL_BREATH_SOUTH_TO_NORTH || + pSpell->Id == SPELL_BREATH_NORTH_TO_SOUTH) { // This was sent with SendMonsterMove - which resulted in better speed than now if (m_pPointData = GetMoveData()) @@ -356,7 +356,7 @@ struct MANGOS_DLL_DECL boss_onyxiaAI : public ScriptedAI m_uiMovementTimer = 25000; // 3 possible actions - switch(urand(0, 2)) + switch (urand(0, 2)) { case 0: // breath if (m_pPointData = GetMoveData()) @@ -393,7 +393,7 @@ struct MANGOS_DLL_DECL boss_onyxiaAI : public ScriptedAI } } else - m_uiFireballTimer -= uiDiff; //engulfingflames is supposed to be activated by a fireball but haven't come by + m_uiFireballTimer -= uiDiff; // engulfingflames is supposed to be activated by a fireball but haven't come by if (m_bIsSummoningWhelps) { @@ -401,8 +401,8 @@ struct MANGOS_DLL_DECL boss_onyxiaAI : public ScriptedAI { if (m_uiWhelpTimer < uiDiff) { - m_creature->SummonCreature(NPC_ONYXIA_WHELP, afSpawnLocations[0][0], afSpawnLocations[0][1], afSpawnLocations[0][2], 0.0f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, MINUTE*IN_MILLISECONDS); - m_creature->SummonCreature(NPC_ONYXIA_WHELP, afSpawnLocations[1][0], afSpawnLocations[1][1], afSpawnLocations[1][2], 0.0f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, MINUTE*IN_MILLISECONDS); + m_creature->SummonCreature(NPC_ONYXIA_WHELP, afSpawnLocations[0][0], afSpawnLocations[0][1], afSpawnLocations[0][2], 0.0f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, MINUTE * IN_MILLISECONDS); + m_creature->SummonCreature(NPC_ONYXIA_WHELP, afSpawnLocations[1][0], afSpawnLocations[1][1], afSpawnLocations[1][2], 0.0f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, MINUTE * IN_MILLISECONDS); m_uiWhelpTimer = 500; } else diff --git a/scripts/kalimdor/onyxias_lair/instance_onyxias_lair.cpp b/scripts/kalimdor/onyxias_lair/instance_onyxias_lair.cpp index 6772476b5..46373f20d 100644 --- a/scripts/kalimdor/onyxias_lair/instance_onyxias_lair.cpp +++ b/scripts/kalimdor/onyxias_lair/instance_onyxias_lair.cpp @@ -43,7 +43,7 @@ bool instance_onyxias_lair::IsEncounterInProgress() const void instance_onyxias_lair::OnCreatureCreate(Creature* pCreature) { - switch(pCreature->GetEntry()) + switch (pCreature->GetEntry()) { case NPC_ONYXIA_TRIGGER: m_mNpcEntryGuidStore[NPC_ONYXIA_TRIGGER] = pCreature->GetObjectGuid(); diff --git a/scripts/kalimdor/orgrimmar.cpp b/scripts/kalimdor/orgrimmar.cpp index d7ea50404..242e81083 100644 --- a/scripts/kalimdor/orgrimmar.cpp +++ b/scripts/kalimdor/orgrimmar.cpp @@ -138,7 +138,7 @@ bool GossipHello_npc_thrall_warchief(Player* pPlayer, Creature* pCreature) pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); if (pPlayer->GetQuestStatus(QUEST_ID_WHAT_THE_WIND_CARRIES) == QUEST_STATUS_INCOMPLETE) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Please share your wisdom with me, Warchief.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Please share your wisdom with me, Warchief.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); return true; @@ -146,30 +146,30 @@ bool GossipHello_npc_thrall_warchief(Player* pPlayer, Creature* pCreature) bool GossipSelect_npc_thrall_warchief(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) { - switch(uiAction) + switch (uiAction) { case GOSSIP_ACTION_INFO_DEF+1: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "What discoveries?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "What discoveries?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); pPlayer->SEND_GOSSIP_MENU(5733, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+2: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Usurper?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Usurper?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); pPlayer->SEND_GOSSIP_MENU(5734, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+3: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "With all due respect, Warchief - why not allow them to be destroyed? Does this not strengthen our position?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+4); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "With all due respect, Warchief - why not allow them to be destroyed? Does this not strengthen our position?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4); pPlayer->SEND_GOSSIP_MENU(5735, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+4: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "I... I did not think of it that way, Warchief.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+5); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "I... I did not think of it that way, Warchief.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 5); pPlayer->SEND_GOSSIP_MENU(5736, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+5: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "I live only to serve, Warchief! My life is empty and meaningless without your guidance.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+6); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "I live only to serve, Warchief! My life is empty and meaningless without your guidance.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 6); pPlayer->SEND_GOSSIP_MENU(5737, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+6: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Of course, Warchief!", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+7); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Of course, Warchief!", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 7); pPlayer->SEND_GOSSIP_MENU(5738, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+7: diff --git a/scripts/kalimdor/razorfen_downs/razorfen_downs.cpp b/scripts/kalimdor/razorfen_downs/razorfen_downs.cpp index 87393c94a..532bb66f0 100644 --- a/scripts/kalimdor/razorfen_downs/razorfen_downs.cpp +++ b/scripts/kalimdor/razorfen_downs/razorfen_downs.cpp @@ -60,12 +60,12 @@ enum SPELL_IDOL_SHUTDOWN = 12774, // summon spells only exist in 1.x - //SPELL_SUMMON_1 = 12694, // NPC_WITHERED_BATTLE_BOAR - //SPELL_SUMMON_2 = 14802, // NPC_DEATHS_HEAD_GEOMANCER - //SPELL_SUMMON_3 = 14801, // NPC_WITHERED_QUILGUARD + // SPELL_SUMMON_1 = 12694, // NPC_WITHERED_BATTLE_BOAR + // SPELL_SUMMON_2 = 14802, // NPC_DEATHS_HEAD_GEOMANCER + // SPELL_SUMMON_3 = 14801, // NPC_WITHERED_QUILGUARD }; -static float m_fSpawnerCoord[3][4]= +static float m_fSpawnerCoord[3][4] = { {2582.79f, 954.392f, 52.4821f, 3.78736f}, {2569.42f, 956.380f, 52.2732f, 5.42797f}, @@ -101,7 +101,7 @@ struct MANGOS_DLL_DECL npc_belnistraszAI : public npc_escortAI { if (!m_bAggro) { - DoScriptText(urand(0,1) ? SAY_BELNISTRASZ_AGGRO_1 : SAY_BELNISTRASZ_AGGRO_1, m_creature, pAttacker); + DoScriptText(urand(0, 1) ? SAY_BELNISTRASZ_AGGRO_1 : SAY_BELNISTRASZ_AGGRO_1, m_creature, pAttacker); m_bAggro = true; } @@ -119,7 +119,7 @@ struct MANGOS_DLL_DECL npc_belnistraszAI : public npc_escortAI return; } - for(int i = 0; i < 4; ++i) + for (int i = 0; i < 4; ++i) { uint32 uiEntry = 0; @@ -128,7 +128,7 @@ struct MANGOS_DLL_DECL npc_belnistraszAI : public npc_escortAI float fX, fZ, fY; pSummoner->GetClosePoint(fX, fZ, fY, 0.0f, 2.0f, angle); - switch(i) + switch (i) { case 0: case 1: @@ -171,7 +171,7 @@ struct MANGOS_DLL_DECL npc_belnistraszAI : public npc_escortAI { if (m_uiRitualTimer < uiDiff) { - switch(m_uiRitualPhase) + switch (m_uiRitualPhase) { case 0: DoCastSpellIfCan(m_creature, SPELL_IDOL_SHUTDOWN); @@ -224,7 +224,7 @@ struct MANGOS_DLL_DECL npc_belnistraszAI : public npc_escortAI { if (!pGo->isSpawned()) { - pGo->SetRespawnTime(HOUR*IN_MILLISECONDS); + pGo->SetRespawnTime(HOUR * IN_MILLISECONDS); pGo->Refresh(); } } @@ -250,7 +250,7 @@ struct MANGOS_DLL_DECL npc_belnistraszAI : public npc_escortAI if (m_uiFireballTimer < uiDiff) { DoCastSpellIfCan(m_creature->getVictim(), SPELL_FIREBALL); - m_uiFireballTimer = urand(2000,3000); + m_uiFireballTimer = urand(2000, 3000); } else m_uiFireballTimer -= uiDiff; @@ -258,7 +258,7 @@ struct MANGOS_DLL_DECL npc_belnistraszAI : public npc_escortAI if (m_uiFrostNovaTimer < uiDiff) { DoCastSpellIfCan(m_creature->getVictim(), SPELL_FROST_NOVA); - m_uiFrostNovaTimer = urand(10000,15000); + m_uiFrostNovaTimer = urand(10000, 15000); } else m_uiFrostNovaTimer -= uiDiff; diff --git a/scripts/kalimdor/razorfen_kraul/instance_razorfen_kraul.cpp b/scripts/kalimdor/razorfen_kraul/instance_razorfen_kraul.cpp index 7e6f4395c..e5d8c45e6 100644 --- a/scripts/kalimdor/razorfen_kraul/instance_razorfen_kraul.cpp +++ b/scripts/kalimdor/razorfen_kraul/instance_razorfen_kraul.cpp @@ -37,7 +37,7 @@ void instance_razorfen_kraul::Initialize() void instance_razorfen_kraul::OnObjectCreate(GameObject* pGo) { - switch(pGo->GetEntry()) + switch (pGo->GetEntry()) { case GO_AGATHELOS_WARD: m_mGoEntryGuidStore[GO_AGATHELOS_WARD] = pGo->GetObjectGuid(); @@ -50,7 +50,7 @@ void instance_razorfen_kraul::OnObjectCreate(GameObject* pGo) void instance_razorfen_kraul::OnCreatureCreate(Creature* pCreature) { - switch(pCreature->GetEntry()) + switch (pCreature->GetEntry()) { case NPC_WARD_KEEPER: ++m_uiWardKeepersRemaining; @@ -60,7 +60,7 @@ void instance_razorfen_kraul::OnCreatureCreate(Creature* pCreature) void instance_razorfen_kraul::SetData(uint32 uiType, uint32 uiData) { - switch(uiType) + switch (uiType) { case TYPE_AGATHELOS: --m_uiWardKeepersRemaining; @@ -99,7 +99,7 @@ void instance_razorfen_kraul::Load(const char* chrIn) std::istringstream loadStream(chrIn); loadStream >> m_auiEncounter[0]; - for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) + for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) { if (m_auiEncounter[i] == IN_PROGRESS) m_auiEncounter[i] = NOT_STARTED; @@ -110,7 +110,7 @@ void instance_razorfen_kraul::Load(const char* chrIn) uint32 instance_razorfen_kraul::GetData(uint32 uiType) { - switch(uiType) + switch (uiType) { case TYPE_AGATHELOS: return m_auiEncounter[0]; diff --git a/scripts/kalimdor/razorfen_kraul/razorfen_kraul.cpp b/scripts/kalimdor/razorfen_kraul/razorfen_kraul.cpp index a1a634d6b..ba7a50b14 100644 --- a/scripts/kalimdor/razorfen_kraul/razorfen_kraul.cpp +++ b/scripts/kalimdor/razorfen_kraul/razorfen_kraul.cpp @@ -67,7 +67,7 @@ struct MANGOS_DLL_DECL npc_willix_the_importerAI : public npc_escortAI // Exact use of these texts remains unknown, it seems that he should only talk when he initiates the attack or he is the first who is attacked by a npc void Aggro(Unit* pWho) { - switch(urand(0, 6)) // Not always said + switch (urand(0, 6)) // Not always said { case 0: DoScriptText(SAY_WILLIX_AGGRO_1, m_creature, pWho); break; case 1: DoScriptText(SAY_WILLIX_AGGRO_2, m_creature, pWho); break; @@ -143,7 +143,7 @@ bool QuestAccept_npc_willix_the_importer(Player* pPlayer, Creature* pCreature, c } } - return true; + return true; } void AddSC_razorfen_kraul() diff --git a/scripts/kalimdor/ruins_of_ahnqiraj/boss_ayamiss.cpp b/scripts/kalimdor/ruins_of_ahnqiraj/boss_ayamiss.cpp index 9e665f3ba..87e07f08e 100644 --- a/scripts/kalimdor/ruins_of_ahnqiraj/boss_ayamiss.cpp +++ b/scripts/kalimdor/ruins_of_ahnqiraj/boss_ayamiss.cpp @@ -29,8 +29,8 @@ enum EMOTE_GENERIC_FRENZY = -1000002, SPELL_STINGER_SPRAY = 25749, - SPELL_POISON_STINGER = 25748, //only used in phase1 - //SPELL_SUMMON_SWARMER = 25844, //might be 25708 - spells were removed since 2.0.1 + SPELL_POISON_STINGER = 25748, // only used in phase1 + // SPELL_SUMMON_SWARMER = 25844, // might be 25708 - spells were removed since 2.0.1 SPELL_PARALYZE = 25725, SPELL_LASH = 25852, SPELL_FRENZY = 8269, @@ -54,10 +54,10 @@ struct SummonLocation // Spawn locations static const SummonLocation aAyamissSpawnLocs[] = { - {-9674.4707f, 1528.4133f, 22.457f}, // larva - {-9701.6005f, 1566.9993f, 24.118f}, // larva - {-9647.352f, 1578.062f, 55.32f}, // anchor point for swarmers - {-9717.18f, 1517.72f, 27.4677f}, // teleport location - need to be hardcoded because the player is teleported after the larva is summoned + { -9674.4707f, 1528.4133f, 22.457f}, // larva + { -9701.6005f, 1566.9993f, 24.118f}, // larva + { -9647.352f, 1578.062f, 55.32f}, // anchor point for swarmers + { -9717.18f, 1517.72f, 27.4677f}, // teleport location - need to be hardcoded because the player is teleported after the larva is summoned }; struct MANGOS_DLL_DECL boss_ayamissAI : public ScriptedAI diff --git a/scripts/kalimdor/ruins_of_ahnqiraj/boss_moam.cpp b/scripts/kalimdor/ruins_of_ahnqiraj/boss_moam.cpp index f97f6bee4..20ef9fdba 100644 --- a/scripts/kalimdor/ruins_of_ahnqiraj/boss_moam.cpp +++ b/scripts/kalimdor/ruins_of_ahnqiraj/boss_moam.cpp @@ -74,7 +74,7 @@ struct MANGOS_DLL_DECL boss_moamAI : public ScriptedAI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - switch(m_uiPhase) + switch (m_uiPhase) { case PHASE_ATTACKING: if (m_uiCheckoutManaTimer <= uiDiff) diff --git a/scripts/kalimdor/ruins_of_ahnqiraj/boss_ossirian.cpp b/scripts/kalimdor/ruins_of_ahnqiraj/boss_ossirian.cpp index 13c80b040..aff4c90ff 100644 --- a/scripts/kalimdor/ruins_of_ahnqiraj/boss_ossirian.cpp +++ b/scripts/kalimdor/ruins_of_ahnqiraj/boss_ossirian.cpp @@ -55,7 +55,7 @@ enum NPC_SAND_VORTEX = 15428, // tornado npc }; -static const float aCrystalSpawnPos[3] = {-9355.75f, 1905.43f, 85.55f}; +static const float aCrystalSpawnPos[3] = { -9355.75f, 1905.43f, 85.55f}; static const uint32 aWeaknessSpell[] = {SPELL_WEAKNESS_FIRE, SPELL_WEAKNESS_FROST, SPELL_WEAKNESS_NATURE, SPELL_WEAKNESS_ARCANE, SPELL_WEAKNESS_SHADOW}; struct MANGOS_DLL_DECL boss_ossirianAI : public ScriptedAI @@ -130,7 +130,7 @@ struct MANGOS_DLL_DECL boss_ossirianAI : public ScriptedAI // Respawn GO near crystal trigger if (GameObject* pCrystal = GetClosestGameObjectWithEntry(pOssirianTrigger, GO_OSSIRIAN_CRYSTAL, 10.0f)) - m_pInstance->DoRespawnGameObject(pCrystal->GetObjectGuid(), 5*MINUTE); + m_pInstance->DoRespawnGameObject(pCrystal->GetObjectGuid(), 5 * MINUTE); // Increase position ++m_uiCrystalPosition %= MAX_CRYSTAL_POSITIONS; @@ -140,7 +140,7 @@ struct MANGOS_DLL_DECL boss_ossirianAI : public ScriptedAI { if (pSummoned->GetEntry() == NPC_OSSIRIAN_TRIGGER) pSummoned->CastSpell(pSummoned, SPELL_SUMMON_CRYSTAL, true); - } + } void SpellHit(Unit* pCaster, const SpellEntry* pSpell) { diff --git a/scripts/kalimdor/ruins_of_ahnqiraj/boss_rajaxx.cpp b/scripts/kalimdor/ruins_of_ahnqiraj/boss_rajaxx.cpp index c8be438cf..52dc08c22 100644 --- a/scripts/kalimdor/ruins_of_ahnqiraj/boss_rajaxx.cpp +++ b/scripts/kalimdor/ruins_of_ahnqiraj/boss_rajaxx.cpp @@ -271,7 +271,7 @@ bool GossipHello_npc_general_andorov(Player* pPlayer, Creature* pCreature) return true; if (pInstance->GetData(TYPE_RAJAXX) == NOT_STARTED || pInstance->GetData(TYPE_RAJAXX) == FAIL) - pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_START, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_START, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_VENDOR, GOSSIP_ITEM_TRADE, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE); pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXT_ID_INTRO, pCreature->GetObjectGuid()); @@ -282,7 +282,7 @@ bool GossipHello_npc_general_andorov(Player* pPlayer, Creature* pCreature) bool GossipSelect_npc_general_andorov(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) { - if (uiAction == GOSSIP_ACTION_INFO_DEF+1) + if (uiAction == GOSSIP_ACTION_INFO_DEF + 1) { if (instance_ruins_of_ahnqiraj* pInstance = (instance_ruins_of_ahnqiraj*)pCreature->GetInstanceData()) { diff --git a/scripts/kalimdor/ruins_of_ahnqiraj/instance_ruins_of_ahnqiraj.cpp b/scripts/kalimdor/ruins_of_ahnqiraj/instance_ruins_of_ahnqiraj.cpp index 5f86be466..3622aa61b 100644 --- a/scripts/kalimdor/ruins_of_ahnqiraj/instance_ruins_of_ahnqiraj.cpp +++ b/scripts/kalimdor/ruins_of_ahnqiraj/instance_ruins_of_ahnqiraj.cpp @@ -45,7 +45,7 @@ void instance_ruins_of_ahnqiraj::OnPlayerEnter(Player* pPlayer) void instance_ruins_of_ahnqiraj::OnCreatureCreate(Creature* pCreature) { - switch(pCreature->GetEntry()) + switch (pCreature->GetEntry()) { case NPC_OSSIRIAN_TRIGGER: // Only store static spawned @@ -147,7 +147,7 @@ void instance_ruins_of_ahnqiraj::OnCreatureDeath(Creature* pCreature) void instance_ruins_of_ahnqiraj::SetData(uint32 uiType, uint32 uiData) { - switch(uiType) + switch (uiType) { case TYPE_KURINNAXX: if (uiData == DONE) @@ -186,7 +186,7 @@ void instance_ruins_of_ahnqiraj::SetData(uint32 uiType, uint32 uiData) std::ostringstream saveStream; saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2] - << " " << m_auiEncounter[3] << " " << m_auiEncounter[4] << " " << m_auiEncounter[5]; + << " " << m_auiEncounter[3] << " " << m_auiEncounter[4] << " " << m_auiEncounter[5]; m_strInstData = saveStream.str(); @@ -197,7 +197,7 @@ void instance_ruins_of_ahnqiraj::SetData(uint32 uiType, uint32 uiData) uint32 instance_ruins_of_ahnqiraj::GetData(uint32 uiType) { - if (uiType < MAX_ENCOUNTER) + if (uiType < MAX_ENCOUNTER) return m_auiEncounter[uiType]; return 0; @@ -231,7 +231,7 @@ void instance_ruins_of_ahnqiraj::Load(const char* chrIn) loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3] >> m_auiEncounter[4] >> m_auiEncounter[5]; - for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) + for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) { if (m_auiEncounter[i] == IN_PROGRESS) m_auiEncounter[i] = NOT_STARTED; @@ -249,7 +249,7 @@ void instance_ruins_of_ahnqiraj::Update(uint32 uiDiff) if (m_uiArmyDelayTimer <= uiDiff) { DoSendNextArmyWave(); - m_uiArmyDelayTimer = 2*MINUTE*IN_MILLISECONDS; + m_uiArmyDelayTimer = 2 * MINUTE * IN_MILLISECONDS; } else m_uiArmyDelayTimer -= uiDiff; @@ -334,7 +334,7 @@ void instance_ruins_of_ahnqiraj::DoSendNextArmyWave() } // on wowwiki it states that there were 3 min between the waves, but this was reduced in later patches - m_uiArmyDelayTimer = 2*MINUTE*IN_MILLISECONDS; + m_uiArmyDelayTimer = 2 * MINUTE * IN_MILLISECONDS; ++m_uiCurrentArmyWave; } diff --git a/scripts/kalimdor/ruins_of_ahnqiraj/ruins_of_ahnqiraj.cpp b/scripts/kalimdor/ruins_of_ahnqiraj/ruins_of_ahnqiraj.cpp index 9cb970517..9fec5872e 100644 --- a/scripts/kalimdor/ruins_of_ahnqiraj/ruins_of_ahnqiraj.cpp +++ b/scripts/kalimdor/ruins_of_ahnqiraj/ruins_of_ahnqiraj.cpp @@ -70,11 +70,11 @@ struct MANGOS_DLL_DECL mob_anubisath_guardianAI : public ScriptedAI void Reset() { - m_uiSpell1 = urand(0,1) ? SPELL_METEOR : SPELL_PLAGUE; - m_uiSpell2 = urand(0,1) ? SPELL_SHADOW_STORM : SPELL_THUNDER_CLAP; - m_uiSpell3 = urand(0,1) ? SPELL_REFLECT_ARFR : SPELL_REFLECT_FSSH; - m_uiSpell4 = urand(0,1) ? SPELL_ENRAGE : SPELL_EXPLODE; - m_uiSpell5 = urand(0,1) ? SPELL_SUMMON_ANUB_SWARMGUARD : SPELL_SUMMON_ANUB_WARRIOR; + m_uiSpell1 = urand(0, 1) ? SPELL_METEOR : SPELL_PLAGUE; + m_uiSpell2 = urand(0, 1) ? SPELL_SHADOW_STORM : SPELL_THUNDER_CLAP; + m_uiSpell3 = urand(0, 1) ? SPELL_REFLECT_ARFR : SPELL_REFLECT_FSSH; + m_uiSpell4 = urand(0, 1) ? SPELL_ENRAGE : SPELL_EXPLODE; + m_uiSpell5 = urand(0, 1) ? SPELL_SUMMON_ANUB_SWARMGUARD : SPELL_SUMMON_ANUB_WARRIOR; m_uiSpell1Timer = 10000; m_uiSpell2Timer = 20000; @@ -100,7 +100,7 @@ struct MANGOS_DLL_DECL mob_anubisath_guardianAI : public ScriptedAI --m_uiSummonCount; } - void DamageTaken(Unit* pDoneBy, uint32 &uiDamage) + void DamageTaken(Unit* pDoneBy, uint32& uiDamage) { // when we reach 10% of HP explode or enrage if (!m_bIsEnraged && m_creature->GetHealthPercent() < 10.0f) diff --git a/scripts/kalimdor/ruins_of_ahnqiraj/ruins_of_ahnqiraj.h b/scripts/kalimdor/ruins_of_ahnqiraj/ruins_of_ahnqiraj.h index 1d84d6c42..698125bcb 100644 --- a/scripts/kalimdor/ruins_of_ahnqiraj/ruins_of_ahnqiraj.h +++ b/scripts/kalimdor/ruins_of_ahnqiraj/ruins_of_ahnqiraj.h @@ -117,7 +117,7 @@ class MANGOS_DLL_DECL instance_ruins_of_ahnqiraj : public ScriptedInstance void SetData(uint32 uiType, uint32 uiData); uint32 GetData(uint32 uiType); - void GetKaldoreiGuidList(GuidList &lList) { lList = m_lKaldoreiGuidList; } + void GetKaldoreiGuidList(GuidList& lList) { lList = m_lKaldoreiGuidList; } void Update(uint32 uiDiff); diff --git a/scripts/kalimdor/silithus.cpp b/scripts/kalimdor/silithus.cpp index a9b877968..6b2e355ca 100644 --- a/scripts/kalimdor/silithus.cpp +++ b/scripts/kalimdor/silithus.cpp @@ -95,7 +95,7 @@ enum SPELL_GREEN_DRAGON_TRANSFORM = 25105, SPELL_RED_DRAGON_TRANSFORM = 25106, SPELL_BLUE_DRAGON_TRANSFORM = 25107, - //SPELL_BRONZE_DRAGON_TRANSFORM = 25108, // Spell was removed - exists only before 2.0.1 + // SPELL_BRONZE_DRAGON_TRANSFORM = 25108, // Spell was removed - exists only before 2.0.1 SPELL_MERITHRA_WAKE = 25145, // should trigger 25172 on targets SPELL_ARYGOS_VENGEANCE = 25149, @@ -194,25 +194,25 @@ struct EventLocations static EventLocations aEternalBoardNPCs[MAX_DRAGONS] = { - {-8029.301f, 1534.612f, 2.609f, 3.121f, NPC_FANDRAL_STAGHELM}, - {-8034.227f, 1536.580f, 2.609f, 6.161f, NPC_ARYGOS}, - {-8031.935f, 1532.658f, 2.609f, 1.012f, NPC_CAELESTRASZ}, - {-8034.106f, 1534.224f, 2.609f, 0.290f, NPC_MERITHRA_OF_THE_DREAM}, + { -8029.301f, 1534.612f, 2.609f, 3.121f, NPC_FANDRAL_STAGHELM}, + { -8034.227f, 1536.580f, 2.609f, 6.161f, NPC_ARYGOS}, + { -8031.935f, 1532.658f, 2.609f, 1.012f, NPC_CAELESTRASZ}, + { -8034.106f, 1534.224f, 2.609f, 0.290f, NPC_MERITHRA_OF_THE_DREAM}, }; static EventLocations aEternalBoardMovement[] = { - {-8159.951f, 1525.241f, 74.994f}, // 0 Flight position for dragons - {-8106.238f, 1525.948f, 2.639f}, // 1 Anachronos gate location - {-8103.861f, 1525.923f, 2.677f}, // 2 Fandral gate location - {-8107.387f, 1523.641f, 2.609f}, // 3 Shattered scepter - {-8100.921f, 1527.740f, 2.871f}, // 4 Fandral epilogue location - {-8115.270f, 1515.926f, 3.305f}, // 5 Anachronos gather broken scepter 1 - {-8116.879f, 1530.615f, 3.762f}, // 6 Anachronos gather broken scepter 2 - {-7997.790f, 1548.664f, 3.738f}, // 7 Fandral exit location - {-8061.933f, 1496.196f, 2.556f}, // 8 Anachronos launch location - {-8008.705f, 1446.063f, 44.104f}, // 9 Anachronos flight location - {-8085.748f, 1521.484f, 2.624f} // 10 Anchor point for the army summoning + { -8159.951f, 1525.241f, 74.994f}, // 0 Flight position for dragons + { -8106.238f, 1525.948f, 2.639f}, // 1 Anachronos gate location + { -8103.861f, 1525.923f, 2.677f}, // 2 Fandral gate location + { -8107.387f, 1523.641f, 2.609f}, // 3 Shattered scepter + { -8100.921f, 1527.740f, 2.871f}, // 4 Fandral epilogue location + { -8115.270f, 1515.926f, 3.305f}, // 5 Anachronos gather broken scepter 1 + { -8116.879f, 1530.615f, 3.762f}, // 6 Anachronos gather broken scepter 2 + { -7997.790f, 1548.664f, 3.738f}, // 7 Fandral exit location + { -8061.933f, 1496.196f, 2.556f}, // 8 Anachronos launch location + { -8008.705f, 1446.063f, 44.104f}, // 9 Anachronos flight location + { -8085.748f, 1521.484f, 2.624f} // 10 Anchor point for the army summoning }; struct MANGOS_DLL_DECL npc_anachronos_the_ancientAI : public ScriptedAI, private DialogueHelper @@ -245,7 +245,7 @@ struct MANGOS_DLL_DECL npc_anachronos_the_ancientAI : public ScriptedAI, private void JustDidDialogueStep(int32 iEntry) { - switch(iEntry) + switch (iEntry) { case NPC_ANACHRONOS_THE_ANCIENT: // Call the other dragons @@ -463,14 +463,14 @@ struct MANGOS_DLL_DECL npc_anachronos_the_ancientAI : public ScriptedAI, private { float fX, fY, fZ; // Summon kaldorei warriors - for(uint8 i = 0; i < MAX_KALDOREI; ++i) + for (uint8 i = 0; i < MAX_KALDOREI; ++i) { m_creature->GetRandomPoint(aEternalBoardMovement[10].m_fX, aEternalBoardMovement[10].m_fY, aEternalBoardMovement[10].m_fZ, 10.0f, fX, fY, fZ); m_creature->SummonCreature(NPC_KALDOREI_INFANTRY, fX, fY, fZ, 0.0f, TEMPSUMMON_CORPSE_DESPAWN, 0); } // Summon Qiraji warriors - for(uint8 i = 0; i < MAX_QIRAJI; ++i) + for (uint8 i = 0; i < MAX_QIRAJI; ++i) { m_creature->GetRandomPoint(aEternalBoardMovement[10].m_fX, aEternalBoardMovement[10].m_fY, aEternalBoardMovement[10].m_fZ, 15.0f, fX, fY, fZ); m_creature->SummonCreature(NPC_QIRAJI_WASP, fX, fY, fZ, 0.0f, TEMPSUMMON_CORPSE_DESPAWN, 0); @@ -495,7 +495,7 @@ struct MANGOS_DLL_DECL npc_anachronos_the_ancientAI : public ScriptedAI, private void JustSummoned(Creature* pSummoned) { // Also remove npc flags where needed - switch(pSummoned->GetEntry()) + switch (pSummoned->GetEntry()) { case NPC_FANDRAL_STAGHELM: m_fandralGuid = pSummoned->GetObjectGuid(); @@ -527,7 +527,7 @@ struct MANGOS_DLL_DECL npc_anachronos_the_ancientAI : public ScriptedAI, private if (uiType != POINT_MOTION_TYPE) return; - switch(uiPointId) + switch (uiPointId) { case POINT_ID_GATE: // Cast time stop when he reaches the gate @@ -548,7 +548,7 @@ struct MANGOS_DLL_DECL npc_anachronos_the_ancientAI : public ScriptedAI, private break; case POINT_ID_EXIT: // Spell was removed, manually change the display - //DoCastSpellIfCan(m_creature, SPELL_BRONZE_DRAGON_TRANSFORM); + // DoCastSpellIfCan(m_creature, SPELL_BRONZE_DRAGON_TRANSFORM); m_creature->SetDisplayId(DISPLAY_ID_BRONZE_DRAGON); m_uiEventTimer = 4000; break; @@ -562,7 +562,7 @@ struct MANGOS_DLL_DECL npc_anachronos_the_ancientAI : public ScriptedAI, private if (pSummoned->GetEntry() == NPC_FANDRAL_STAGHELM) { - switch(uiPointId) + switch (uiPointId) { case POINT_ID_EPILOGUE: // Face Anachronos and restart the dialogue @@ -580,7 +580,7 @@ struct MANGOS_DLL_DECL npc_anachronos_the_ancientAI : public ScriptedAI, private } else if (uiPointId == POINT_ID_DRAGON_ATTACK) { - switch(pSummoned->GetEntry()) + switch (pSummoned->GetEntry()) { case NPC_MERITHRA_OF_THE_DREAM: StartNextDialogueText(DATA_MERITHRA_ATTACK); @@ -600,7 +600,7 @@ struct MANGOS_DLL_DECL npc_anachronos_the_ancientAI : public ScriptedAI, private { if (m_uiEventTimer <= uiDiff) { - switch(m_uiEventStage) + switch (m_uiEventStage) { case 0: // Start the dialogue diff --git a/scripts/kalimdor/stonetalon_mountains.cpp b/scripts/kalimdor/stonetalon_mountains.cpp index 8bde11b35..1171d3a61 100644 --- a/scripts/kalimdor/stonetalon_mountains.cpp +++ b/scripts/kalimdor/stonetalon_mountains.cpp @@ -54,19 +54,19 @@ struct MANGOS_DLL_DECL npc_kayaAI : public npc_escortAI void WaypointReached(uint32 uiPointId) { - switch(uiPointId) + switch (uiPointId) { - //Ambush + // Ambush case 16: - //note about event here: - //apparently NPC say _after_ the ambush is over, and is most likely a bug at you-know-where. - //we simplify this, and make say when the ambush actually start. + // note about event here: + // apparently NPC say _after_ the ambush is over, and is most likely a bug at you-know-where. + // we simplify this, and make say when the ambush actually start. DoScriptText(SAY_AMBUSH, m_creature); m_creature->SummonCreature(NPC_GRIMTOTEM_RUFFIAN, -50.75f, -500.77f, -46.13f, 0.4f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 30000); m_creature->SummonCreature(NPC_GRIMTOTEM_BRUTE, -40.05f, -510.89f, -46.05f, 1.7f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 30000); m_creature->SummonCreature(NPC_GRIMTOTEM_SORCERER, -32.21f, -499.20f, -45.35f, 2.8f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 30000); break; - // Award quest credit + // Award quest credit case 18: DoScriptText(SAY_END, m_creature); @@ -84,12 +84,12 @@ CreatureAI* GetAI_npc_kaya(Creature* pCreature) bool QuestAccept_npc_kaya(Player* pPlayer, Creature* pCreature, Quest const* pQuest) { - //Casting Spell and Starting the Escort quest is buggy, so this is a hack. Use the spell when it is possible. + // Casting Spell and Starting the Escort quest is buggy, so this is a hack. Use the spell when it is possible. if (pQuest->GetQuestId() == QUEST_PROTECT_KAYA) { pCreature->setFaction(FACTION_ESCORT_H_PASSIVE); - DoScriptText(SAY_START,pCreature); + DoScriptText(SAY_START, pCreature); if (npc_kayaAI* pEscortAI = dynamic_cast(pCreature->AI())) pEscortAI->Start(false, pPlayer, pQuest); diff --git a/scripts/kalimdor/tanaris.cpp b/scripts/kalimdor/tanaris.cpp index 022e1c5f6..c3a1d92b6 100644 --- a/scripts/kalimdor/tanaris.cpp +++ b/scripts/kalimdor/tanaris.cpp @@ -73,8 +73,8 @@ struct MANGOS_DLL_DECL mob_aquementasAI : public ScriptedAI void SendItem(Unit* pReceiver) { if (((Player*)pReceiver)->HasItemCount(ITEM_BOOK_AQUOR, 1) && - ((Player*)pReceiver)->HasItemCount(ITEM_SILVERY_CLAWS, 11) && - ((Player*)pReceiver)->HasItemCount(ITEM_IRONTREE_HEART, 1)) + ((Player*)pReceiver)->HasItemCount(ITEM_SILVERY_CLAWS, 11) && + ((Player*)pReceiver)->HasItemCount(ITEM_IRONTREE_HEART, 1)) { if (Item* pItem = ((Player*)pReceiver)->StoreNewItemInInventorySlot(ITEM_SILVER_TOTEM, 1)) ((Player*)pReceiver)->SendNewItem(pItem, 1, true, false); @@ -166,7 +166,7 @@ struct MANGOS_DLL_DECL npc_custodian_of_timeAI : public npc_escortAI if (!pPlayer) return; - switch(uiPointId) + switch (uiPointId) { case 0: DoScriptText(WHISPER_CUSTODIAN_1, m_creature, pPlayer); break; case 1: DoScriptText(WHISPER_CUSTODIAN_2, m_creature, pPlayer); break; @@ -250,14 +250,14 @@ struct MANGOS_DLL_DECL npc_oox17tnAI : public npc_escortAI switch (i) { - //1. Ambush: 3 scorpions + // 1. Ambush: 3 scorpions case 22: DoScriptText(SAY_OOX_AMBUSH, m_creature); m_creature->SummonCreature(NPC_SCORPION, -8340.70f, -4448.17f, 9.17f, 3.10f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 30000); m_creature->SummonCreature(NPC_SCORPION, -8343.18f, -4444.35f, 9.44f, 2.35f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 30000); m_creature->SummonCreature(NPC_SCORPION, -8348.70f, -4457.80f, 9.58f, 2.02f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 30000); break; - //2. Ambush: 2 Rogues & 1 Shadow Mage + // 2. Ambush: 2 Rogues & 1 Shadow Mage case 28: DoScriptText(SAY_OOX_AMBUSH, m_creature); @@ -265,7 +265,7 @@ struct MANGOS_DLL_DECL npc_oox17tnAI : public npc_escortAI m_creature->SummonCreature(NPC_SHADOW_MAGE, -7486.41f, -4791.55f, 10.54f, 3.26f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 30000); if (Creature* pCreature = m_creature->SummonCreature(NPC_SCOFFLAW, -7488.47f, -4800.77f, 9.77f, 2.50f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 30000)) - DoScriptText(SAY_OOX17_AMBUSH_REPLY,pCreature); + DoScriptText(SAY_OOX17_AMBUSH_REPLY, pCreature); break; case 34: @@ -280,11 +280,11 @@ struct MANGOS_DLL_DECL npc_oox17tnAI : public npc_escortAI void Aggro(Unit* who) { - //For an small probability he say something when it aggros - switch(urand(0, 9)) + // For an small probability he say something when it aggros + switch (urand(0, 9)) { - case 0: DoScriptText(SAY_OOX_AGGRO1, m_creature); break; - case 1: DoScriptText(SAY_OOX_AGGRO2, m_creature); break; + case 0: DoScriptText(SAY_OOX_AGGRO1, m_creature); break; + case 1: DoScriptText(SAY_OOX_AGGRO2, m_creature); break; } } @@ -345,26 +345,26 @@ bool GossipHello_npc_stone_watcher_of_norgannon(Player* pPlayer, Creature* pCrea bool GossipSelect_npc_stone_watcher_of_norgannon(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) { - switch(uiAction) + switch (uiAction) { case GOSSIP_ACTION_INFO_DEF: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_NORGANNON_2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_NORGANNON_2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); pPlayer->SEND_GOSSIP_MENU(1675, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+1: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_NORGANNON_3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_NORGANNON_3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); pPlayer->SEND_GOSSIP_MENU(1676, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+2: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_NORGANNON_4, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_NORGANNON_4, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); pPlayer->SEND_GOSSIP_MENU(1677, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+3: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_NORGANNON_5, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+4); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_NORGANNON_5, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4); pPlayer->SEND_GOSSIP_MENU(1678, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+4: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_NORGANNON_6, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+5); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_NORGANNON_6, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 5); pPlayer->SEND_GOSSIP_MENU(1679, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+5: @@ -396,7 +396,7 @@ enum POINT_ID_TO_WATER = 1 }; -const float m_afToWaterLoc[] = {-7032.664551f, -4906.199219f, -1.606446f}; +const float m_afToWaterLoc[] = { -7032.664551f, -4906.199219f, -1.606446f}; struct MANGOS_DLL_DECL npc_toogaAI : public FollowerAI { @@ -452,7 +452,7 @@ struct MANGOS_DLL_DECL npc_toogaAI : public FollowerAI { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) { - //we are doing the post-event, or... + // we are doing the post-event, or... if (HasFollowState(STATE_FOLLOW_POSTEVENT)) { if (m_uiPostEventTimer < uiDiff) @@ -461,12 +461,12 @@ struct MANGOS_DLL_DECL npc_toogaAI : public FollowerAI if (!pTorta || !pTorta->isAlive()) { - //something happened, so just complete + // something happened, so just complete SetFollowComplete(); return; } - switch(m_uiPhasePostEvent) + switch (m_uiPhasePostEvent) { case 1: DoScriptText(SAY_TOOG_POST_1, m_creature); @@ -501,7 +501,7 @@ struct MANGOS_DLL_DECL npc_toogaAI : public FollowerAI { m_uiCheckSpeechTimer = 5000; - switch(urand(0, 50)) + switch (urand(0, 50)) { case 10: DoScriptText(SAY_TOOG_THIRST, m_creature); break; case 25: DoScriptText(SAY_TOOG_WORRIED, m_creature); break; diff --git a/scripts/kalimdor/teldrassil.cpp b/scripts/kalimdor/teldrassil.cpp index 8d749a0ea..3e2e2b7b0 100644 --- a/scripts/kalimdor/teldrassil.cpp +++ b/scripts/kalimdor/teldrassil.cpp @@ -47,7 +47,7 @@ struct MANGOS_DLL_DECL npc_mistAI : public FollowerAI void Reset() { } - void MoveInLineOfSight(Unit *pWho) + void MoveInLineOfSight(Unit* pWho) { FollowerAI::MoveInLineOfSight(pWho); @@ -71,11 +71,11 @@ struct MANGOS_DLL_DECL npc_mistAI : public FollowerAI pPlayer->GroupEventHappens(QUEST_MIST, m_creature); } - //The follow is over (and for later development, run off to the woods before really end) + // The follow is over (and for later development, run off to the woods before really end) SetFollowComplete(); } - //call not needed here, no known abilities + // call not needed here, no known abilities /*void UpdateFollowerAI(const uint32 uiDiff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_bug_trio.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_bug_trio.cpp index 491827c2b..f6be97510 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/boss_bug_trio.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_bug_trio.cpp @@ -212,7 +212,7 @@ struct MANGOS_DLL_DECL boss_yaujAI : public ScriptedAI { // Spawn 10 yauj brood on death float fX, fY, fZ; - for(int i = 0; i < 10; ++i) + for (int i = 0; i < 10; ++i) { m_creature->GetRandomPoint(m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), 10.0f, fX, fY, fZ); m_creature->SummonCreature(NPC_YAUJ_BROOD, fX, fY, fZ, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_cthun.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_cthun.cpp index d6f7e0d31..088a4a48c 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/boss_cthun.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_cthun.cpp @@ -30,7 +30,7 @@ enum // ***** Phase 1 ******** SPELL_EYE_BEAM = 26134, - //SPELL_DARK_GLARE = 26029, + // SPELL_DARK_GLARE = 26029, SPELL_ROTATE_TRIGGER = 26137, // phase switch spell - triggers 26009 or 26136. These trigger the Dark Glare spell - 26029 SPELL_ROTATE_360_LEFT = 26009, SPELL_ROTATE_360_RIGHT = 26136, @@ -40,18 +40,18 @@ enum SPELL_TRANSFORM = 26232, SPELL_CTHUN_VULNERABLE = 26235, SPELL_MOUTH_TENTACLE = 26332, // prepare target to teleport to stomach - //SPELL_DIGESTIVE_ACID_TELEPORT = 26220, // removed from DBC. stomach teleport spell + // SPELL_DIGESTIVE_ACID_TELEPORT = 26220, // removed from DBC. stomach teleport spell SPELL_EXIT_STOMACH_KNOCKBACK = 25383, // spell id is wrong - //SPELL_EXIT_STOMACH_JUMP = 26224, // removed from DBC. should make the player jump to the ceiling - //SPELL_EXIT_STOMACH_EFFECT = 26230, // removed from DBC. used to complete the eject effect from the stomach - //SPELL_PORT_OUT_STOMACH_EFFECT = 26648, // removed from DBC. used to kill players inside the stomach on evade + // SPELL_EXIT_STOMACH_JUMP = 26224, // removed from DBC. should make the player jump to the ceiling + // SPELL_EXIT_STOMACH_EFFECT = 26230, // removed from DBC. used to complete the eject effect from the stomach + // SPELL_PORT_OUT_STOMACH_EFFECT = 26648, // removed from DBC. used to kill players inside the stomach on evade SPELL_DIGESTIVE_ACID = 26476, // damage spell - should be handled by the map - //SPELL_EXIT_STOMACH = 26221, // summons 15800 + // SPELL_EXIT_STOMACH = 26221, // summons 15800 // ***** Summoned spells ***** // Giant Claw tentacles SPELL_GIANT_GROUND_RUPTURE = 26478, - //SPELL_MASSIVE_GROUND_RUPTURE = 26100, // spell not confirmed + // SPELL_MASSIVE_GROUND_RUPTURE = 26100, // spell not confirmed SPELL_GROUND_TREMOR = 6524, SPELL_HAMSTRING = 26211, SPELL_THRASH = 3391, @@ -80,10 +80,10 @@ enum static const float afCthunLocations[4][4] = { - {-8571.0f, 1990.0f, -98.0f, 1.22f}, // flesh tentacles locations - {-8525.0f, 1994.0f, -98.0f, 2.12f}, - {-8562.0f, 2037.0f, -70.0f, 5.05f}, // stomach teleport location - {-8545.6f, 1987.7f, -32.9f, 0.0f}, // stomach eject location + { -8571.0f, 1990.0f, -98.0f, 1.22f}, // flesh tentacles locations + { -8525.0f, 1994.0f, -98.0f, 2.12f}, + { -8562.0f, 2037.0f, -70.0f, 5.05f}, // stomach teleport location + { -8545.6f, 1987.7f, -32.9f, 0.0f}, // stomach eject location }; enum CThunPhase @@ -256,7 +256,7 @@ struct MANGOS_DLL_DECL boss_eye_of_cthunAI : public Scripted_NoMovementAI if (m_uiDarkGlareTimer < uiDiff) { - // Cast the rotation spell + // Cast the rotation spell if (DoCastSpellIfCan(m_creature, SPELL_ROTATE_TRIGGER) == CAST_OK) { // Remove the target focus but allow the boss to face the current victim @@ -312,7 +312,7 @@ struct MANGOS_DLL_DECL boss_eye_of_cthunAI : public Scripted_NoMovementAI float fX, fY, fZ; for (uint8 i = 0; i < MAX_EYE_TENTACLES; ++i) { - m_creature->GetNearPoint(m_creature, fX, fY, fZ, 0, 30.0f, M_PI_F/4*i); + m_creature->GetNearPoint(m_creature, fX, fY, fZ, 0, 30.0f, M_PI_F / 4 * i); m_creature->SummonCreature(NPC_EYE_TENTACLE, fX, fY, fZ, 0, TEMPSUMMON_DEAD_DESPAWN, 0); } @@ -450,7 +450,7 @@ struct MANGOS_DLL_DECL boss_cthunAI : public Scripted_NoMovementAI { switch (pSummoned->GetEntry()) { - // Handle portal despawn on tentacle kill + // Handle portal despawn on tentacle kill case NPC_EYE_TENTACLE: if (Creature* pPortal = GetClosestCreatureWithEntry(pSummoned, NPC_TENTACLE_PORTAL, 5.0f)) pPortal->ForcedDespawn(); @@ -460,7 +460,7 @@ struct MANGOS_DLL_DECL boss_cthunAI : public Scripted_NoMovementAI if (Creature* pPortal = GetClosestCreatureWithEntry(pSummoned, NPC_GIANT_TENTACLE_PORTAL, 5.0f)) pPortal->ForcedDespawn(); break; - // Handle the stomach tentacles kill + // Handle the stomach tentacles kill case NPC_FLESH_TENTACLE: ++m_uiFleshTentaclesKilled; if (m_uiFleshTentaclesKilled == MAX_FLESH_TENTACLES) @@ -645,7 +645,7 @@ struct MANGOS_DLL_DECL boss_cthunAI : public Scripted_NoMovementAI float fX, fY, fZ; for (uint8 i = 0; i < MAX_EYE_TENTACLES; ++i) { - m_creature->GetNearPoint(m_creature, fX, fY, fZ, 0, 30.0f, M_PI_F/4*i); + m_creature->GetNearPoint(m_creature, fX, fY, fZ, 0, 30.0f, M_PI_F / 4 * i); m_creature->SummonCreature(NPC_EYE_TENTACLE, fX, fY, fZ, 0, TEMPSUMMON_DEAD_DESPAWN, 0); } @@ -758,11 +758,11 @@ bool AreaTrigger_at_stomach_cthun(Player* pPlayer, AreaTriggerEntry const* pAt) return false; // Summon the exit trigger which should push the player outside the stomach - not used because missing eject spells - //if (!GetClosestCreatureWithEntry(pPlayer, NPC_EXIT_TRIGGER, 10.0f)) + // if (!GetClosestCreatureWithEntry(pPlayer, NPC_EXIT_TRIGGER, 10.0f)) // pPlayer->CastSpell(pPlayer, SPELL_EXIT_STOMACH, true); // Note: because of the missing spell id 26224, we will use basic jump movement - pPlayer->GetMotionMaster()->MoveJump(afCthunLocations[3][0], afCthunLocations[3][1], afCthunLocations[3][2], pPlayer->GetSpeed(MOVE_RUN)*5, 0); + pPlayer->GetMotionMaster()->MoveJump(afCthunLocations[3][0], afCthunLocations[3][1], afCthunLocations[3][2], pPlayer->GetSpeed(MOVE_RUN) * 5, 0); } else if (pAt->id == AREATRIGGER_STOMACH_2) { @@ -776,7 +776,7 @@ bool AreaTrigger_at_stomach_cthun(Player* pPlayer, AreaTriggerEntry const* pAt) // Teleport back to C'thun and remove the Digestive Acid pPlayer->RemoveAurasDueToSpell(SPELL_DIGESTIVE_ACID); - pPlayer->NearTeleportTo(pCthun->GetPositionX(), pCthun->GetPositionY(), pCthun->GetPositionZ() + 15.0f, frand(0, 2*M_PI_F)); + pPlayer->NearTeleportTo(pCthun->GetPositionX(), pCthun->GetPositionY(), pCthun->GetPositionZ() + 15.0f, frand(0, 2 * M_PI_F)); // Note: the real knockback spell id should be 26230 pPlayer->CastSpell(pPlayer, SPELL_EXIT_STOMACH_KNOCKBACK, true, NULL, NULL, pCthun->GetObjectGuid()); diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_ouro.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_ouro.cpp index 8b462d96d..426377f18 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/boss_ouro.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_ouro.cpp @@ -46,18 +46,18 @@ enum SPELL_QUAKE = 26093, // other spells - not used - //SPELL_SUMMON_SCARABS = 26060, // triggered after 30 secs - cast by the Dirt Mounds - //SPELL_DIRTMOUND_PASSIVE = 26092, // casts 26093 every 1 sec - removed from DBC - //SPELL_SET_OURO_HEALTH = 26075, // removed from DBC - //SPELL_SAVE_OURO_HEALTH = 26076, // removed from DBC - //SPELL_TELEPORT_TRIGGER = 26285, // removed from DBC - //SPELL_SUBMERGE_TRIGGER = 26104, // removed from DBC - //SPELL_SUMMON_OURO_MOUND = 26617, // removed from DBC - //SPELL_SCARABS_PERIODIC = 26619, // cast by the Dirt Mounds in order to spawn the scarabs - removed from DBC + // SPELL_SUMMON_SCARABS = 26060, // triggered after 30 secs - cast by the Dirt Mounds + // SPELL_DIRTMOUND_PASSIVE = 26092, // casts 26093 every 1 sec - removed from DBC + // SPELL_SET_OURO_HEALTH = 26075, // removed from DBC + // SPELL_SAVE_OURO_HEALTH = 26076, // removed from DBC + // SPELL_TELEPORT_TRIGGER = 26285, // removed from DBC + // SPELL_SUBMERGE_TRIGGER = 26104, // removed from DBC + // SPELL_SUMMON_OURO_MOUND = 26617, // removed from DBC + // SPELL_SCARABS_PERIODIC = 26619, // cast by the Dirt Mounds in order to spawn the scarabs - removed from DBC // summoned npcs NPC_OURO = 15517, - //NPC_OURO_SCARAB = 15718, // summoned by Dirt Mounds + // NPC_OURO_SCARAB = 15718, // summoned by Dirt Mounds NPC_OURO_TRIGGER = 15717, NPC_DIRT_MOUND = 15712, // summoned also by missing spell 26617 }; diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_sartura.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_sartura.cpp index 4d4d91903..df55fb1e1 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/boss_sartura.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_sartura.cpp @@ -68,7 +68,7 @@ struct MANGOS_DLL_DECL boss_sarturaAI : public ScriptedAI m_uiWhirlWindEndTimer = 15000; m_uiAggroResetTimer = urand(45000, 55000); m_uiAggroResetEndTimer = 5000; - m_uiEnrageHardTimer = 10*60000; + m_uiEnrageHardTimer = 10 * 60000; m_bIsWhirlWind = false; m_bAggroReset = false; @@ -290,7 +290,7 @@ struct MANGOS_DLL_DECL mob_sartura_royal_guardAI : public ScriptedAI // Remove remaining taunts, TODO if (m_bAggroReset) { - if (m_uiAggroResetEndTimer GetEntry()) { @@ -119,7 +119,7 @@ void instance_temple_of_ahnqiraj::OnObjectCreate(GameObject* pGo) void instance_temple_of_ahnqiraj::SetData(uint32 uiType, uint32 uiData) { - switch(uiType) + switch (uiType) { case TYPE_SKERAM: m_auiEncounter[uiType] = uiData; @@ -183,8 +183,8 @@ void instance_temple_of_ahnqiraj::SetData(uint32 uiType, uint32 uiData) std::ostringstream saveStream; saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2] << " " << m_auiEncounter[3] << " " - << m_auiEncounter[4] << " " << m_auiEncounter[5] << " " << m_auiEncounter[6] << " " << m_auiEncounter[7] << " " - << m_auiEncounter[8] << " " << m_auiEncounter[9]; + << m_auiEncounter[4] << " " << m_auiEncounter[5] << " " << m_auiEncounter[6] << " " << m_auiEncounter[7] << " " + << m_auiEncounter[8] << " " << m_auiEncounter[9]; m_strInstData = saveStream.str(); @@ -205,10 +205,10 @@ void instance_temple_of_ahnqiraj::Load(const char* chrIn) std::istringstream loadStream(chrIn); loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3] - >> m_auiEncounter[4] >> m_auiEncounter[5] >> m_auiEncounter[6] >> m_auiEncounter[7] - >> m_auiEncounter[8] >> m_auiEncounter[9]; + >> m_auiEncounter[4] >> m_auiEncounter[5] >> m_auiEncounter[6] >> m_auiEncounter[7] + >> m_auiEncounter[8] >> m_auiEncounter[9]; - for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) + for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) { if (m_auiEncounter[i] == IN_PROGRESS) m_auiEncounter[i] = NOT_STARTED; @@ -252,7 +252,7 @@ void instance_temple_of_ahnqiraj::Update(uint32 uiDiff) } } } - m_uiCthunWhisperTimer = urand(1.5*MINUTE*IN_MILLISECONDS, 5*MINUTE*IN_MILLISECONDS); + m_uiCthunWhisperTimer = urand(1.5 * MINUTE * IN_MILLISECONDS, 5 * MINUTE * IN_MILLISECONDS); } else m_uiCthunWhisperTimer -= uiDiff; diff --git a/scripts/kalimdor/temple_of_ahnqiraj/mob_anubisath_sentinel.cpp b/scripts/kalimdor/temple_of_ahnqiraj/mob_anubisath_sentinel.cpp index ab3a72dc8..e326c20c2 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/mob_anubisath_sentinel.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/mob_anubisath_sentinel.cpp @@ -73,7 +73,7 @@ struct MANGOS_DLL_DECL npc_anubisath_sentinelAI : public ScriptedAI void JustReachedHome() { - for(GuidList::const_iterator itr = m_lAssistList.begin(); itr != m_lAssistList.end(); ++itr) + for (GuidList::const_iterator itr = m_lAssistList.begin(); itr != m_lAssistList.end(); ++itr) { if (*itr == m_creature->GetObjectGuid()) continue; @@ -100,7 +100,7 @@ struct MANGOS_DLL_DECL npc_anubisath_sentinelAI : public ScriptedAI // this way will make it quite possible that sentinels get the same buff as others, need to fix that, it should be one unique each void SetAbility() { - switch(urand(0, 8)) + switch (urand(0, 8)) { case 0: m_uiMyAbility = SPELL_MENDING; break; case 1: m_uiMyAbility = SPELL_PERIODIC_KNOCK_AWAY; break; @@ -118,7 +118,7 @@ struct MANGOS_DLL_DECL npc_anubisath_sentinelAI : public ScriptedAI void DoTransferAbility() { - for(GuidList::const_iterator itr = m_lAssistList.begin(); itr != m_lAssistList.end(); ++itr) + for (GuidList::const_iterator itr = m_lAssistList.begin(); itr != m_lAssistList.end(); ++itr) { if (Creature* pBuddy = m_creature->GetMap()->GetCreature(*itr)) { @@ -138,7 +138,7 @@ struct MANGOS_DLL_DECL npc_anubisath_sentinelAI : public ScriptedAI { if (!m_lAssistList.empty()) { - for(GuidList::const_iterator itr = m_lAssistList.begin(); itr != m_lAssistList.end(); ++itr) + for (GuidList::const_iterator itr = m_lAssistList.begin(); itr != m_lAssistList.end(); ++itr) { if (*itr == m_creature->GetObjectGuid()) continue; diff --git a/scripts/kalimdor/temple_of_ahnqiraj/temple_of_ahnqiraj.h b/scripts/kalimdor/temple_of_ahnqiraj/temple_of_ahnqiraj.h index 7850c82f9..de87c082e 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/temple_of_ahnqiraj.h +++ b/scripts/kalimdor/temple_of_ahnqiraj/temple_of_ahnqiraj.h @@ -20,14 +20,14 @@ enum TYPE_CTHUN = 8, NPC_SKERAM = 15263, - //NPC_KRI = 15511, - //NPC_VEM = 15544, - //NPC_YAUJ = 15543, + // NPC_KRI = 15511, + // NPC_VEM = 15544, + // NPC_YAUJ = 15543, NPC_VEKLOR = 15276, NPC_VEKNILASH = 15275, NPC_MASTERS_EYE = 15963, NPC_OURO_SPAWNER = 15957, - //NPC_EYE_OF_CTHUN = 15589, + // NPC_EYE_OF_CTHUN = 15589, NPC_CTHUN = 15727, GO_SKERAM_GATE = 180636, diff --git a/scripts/kalimdor/the_barrens.cpp b/scripts/kalimdor/the_barrens.cpp index f7ee39071..353c3a22a 100644 --- a/scripts/kalimdor/the_barrens.cpp +++ b/scripts/kalimdor/the_barrens.cpp @@ -45,8 +45,8 @@ enum bool GossipHello_npc_beaten_corpse(Player* pPlayer, Creature* pCreature) { if (pPlayer->GetQuestStatus(QUEST_LOST_IN_BATTLE) == QUEST_STATUS_INCOMPLETE || - pPlayer->GetQuestStatus(QUEST_LOST_IN_BATTLE) == QUEST_STATUS_COMPLETE) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT,"Examine corpse in detail...",GOSSIP_SENDER_MAIN,GOSSIP_ACTION_INFO_DEF+1); + pPlayer->GetQuestStatus(QUEST_LOST_IN_BATTLE) == QUEST_STATUS_COMPLETE) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Examine corpse in detail...", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); pPlayer->SEND_GOSSIP_MENU(3557, pCreature->GetObjectGuid()); return true; @@ -54,7 +54,7 @@ bool GossipHello_npc_beaten_corpse(Player* pPlayer, Creature* pCreature) bool GossipSelect_npc_beaten_corpse(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) { - if (uiAction == GOSSIP_ACTION_INFO_DEF +1) + if (uiAction == GOSSIP_ACTION_INFO_DEF + 1) { pPlayer->SEND_GOSSIP_MENU(3558, pCreature->GetObjectGuid()); pPlayer->TalkedToCreature(pCreature->GetEntry(), pCreature->GetObjectGuid()); @@ -97,7 +97,7 @@ struct MANGOS_DLL_DECL npc_giltharesAI : public npc_escortAI if (!pPlayer) return; - switch(uiPointId) + switch (uiPointId) { case 16: DoScriptText(SAY_GIL_AT_LAST, m_creature, pPlayer); @@ -123,15 +123,15 @@ struct MANGOS_DLL_DECL npc_giltharesAI : public npc_escortAI void Aggro(Unit* pWho) { - //not always use + // not always use if (urand(0, 3)) return; - //only aggro text if not player and only in this area + // only aggro text if not player and only in this area if (pWho->GetTypeId() != TYPEID_PLAYER && m_creature->GetAreaId() == AREA_MERCHANT_COAST) { - //appears to be pretty much random (possible only if escorter not in combat with pWho yet?) - switch(urand(0, 3)) + // appears to be pretty much random (possible only if escorter not in combat with pWho yet?) + switch (urand(0, 3)) { case 0: DoScriptText(SAY_GIL_AGGRO_1, m_creature, pWho); break; case 1: DoScriptText(SAY_GIL_AGGRO_2, m_creature, pWho); break; @@ -274,16 +274,16 @@ enum MAX_CHALLENGERS = 6, }; -static const float aAffrayChallengerLoc[8][4]= +static const float aAffrayChallengerLoc[8][4] = { - {-1683.0f, -4326.0f, 2.79f, 0.00f}, - {-1682.0f, -4329.0f, 2.79f, 0.00f}, - {-1683.0f, -4330.0f, 2.79f, 0.00f}, - {-1680.0f, -4334.0f, 2.79f, 1.49f}, - {-1674.0f, -4326.0f, 2.79f, 3.49f}, - {-1677.0f, -4334.0f, 2.79f, 1.66f}, - {-1713.79f, -4342.09f, 6.05f, 6.15f}, // Big Will spawn loc - {-1682.31f, -4329.68f, 2.78f, 0.0f}, // Big Will move loc + { -1683.0f, -4326.0f, 2.79f, 0.00f}, + { -1682.0f, -4329.0f, 2.79f, 0.00f}, + { -1683.0f, -4330.0f, 2.79f, 0.00f}, + { -1680.0f, -4334.0f, 2.79f, 1.49f}, + { -1674.0f, -4326.0f, 2.79f, 3.49f}, + { -1677.0f, -4334.0f, 2.79f, 1.66f}, + { -1713.79f, -4342.09f, 6.05f, 6.15f}, // Big Will spawn loc + { -1682.31f, -4329.68f, 2.78f, 0.0f}, // Big Will move loc }; struct MANGOS_DLL_DECL npc_twiggy_flatheadAI : public ScriptedAI @@ -456,7 +456,7 @@ bool AreaTrigger_at_twiggy_flathead(Player* pPlayer, AreaTriggerEntry const* pAt if (npc_twiggy_flatheadAI* pTwiggyAI = dynamic_cast(pCreature->AI())) { if (pTwiggyAI->CanStartEvent(pPlayer)) - return false; //ok to let mangos process further + return false; // ok to let mangos process further } return true; @@ -514,7 +514,7 @@ struct MANGOS_DLL_DECL npc_wizzlecranks_shredderAI : public npc_escortAI void WaypointReached(uint32 uiPointId) { - switch(uiPointId) + switch (uiPointId) { case 0: if (Player* pPlayer = GetPlayerForEscort()) @@ -538,7 +538,7 @@ struct MANGOS_DLL_DECL npc_wizzlecranks_shredderAI : public npc_escortAI void WaypointStart(uint32 uiPointId) { - switch(uiPointId) + switch (uiPointId) { case 9: if (Player* pPlayer = GetPlayerForEscort()) @@ -569,7 +569,7 @@ struct MANGOS_DLL_DECL npc_wizzlecranks_shredderAI : public npc_escortAI { if (m_uiPostEventTimer < uiDiff) { - switch(m_uiPostEventCount) + switch (m_uiPostEventCount) { case 0: DoScriptText(SAY_PROGRESS_2, m_creature); diff --git a/scripts/kalimdor/thousand_needles.cpp b/scripts/kalimdor/thousand_needles.cpp index 087fdd162..b3e3c2fc8 100644 --- a/scripts/kalimdor/thousand_needles.cpp +++ b/scripts/kalimdor/thousand_needles.cpp @@ -44,7 +44,7 @@ enum NPC_GALAK_ASS = 10720 }; -const float m_afGalakLoc[] = {-4867.387695f, -1357.353760f, -48.226f}; +const float m_afGalakLoc[] = { -4867.387695f, -1357.353760f, -48.226f}; struct MANGOS_DLL_DECL npc_kanatiAI : public npc_escortAI { @@ -54,7 +54,7 @@ struct MANGOS_DLL_DECL npc_kanatiAI : public npc_escortAI void WaypointReached(uint32 uiPointId) { - switch(uiPointId) + switch (uiPointId) { case 0: DoScriptText(SAY_KAN_START, m_creature); @@ -69,10 +69,10 @@ struct MANGOS_DLL_DECL npc_kanatiAI : public npc_escortAI void DoSpawnGalak() { - for(int i = 0; i < 3; ++i) + for (int i = 0; i < 3; ++i) m_creature->SummonCreature(NPC_GALAK_ASS, - m_afGalakLoc[0], m_afGalakLoc[1], m_afGalakLoc[2], 0.0f, - TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000); + m_afGalakLoc[0], m_afGalakLoc[1], m_afGalakLoc[2], 0.0f, + TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000); } void JustSummoned(Creature* pSummoned) @@ -116,14 +116,14 @@ enum ID_AMBUSH_3 = 4 }; -float m_afBanditLoc[6][6]= +float m_afBanditLoc[6][6] = { - {-4905.479492f, -2062.732666f, 84.352f}, - {-4915.201172f, -2073.528320f, 84.733f}, - {-4878.883301f, -1986.947876f, 91.966f}, - {-4877.503906f, -1966.113403f, 91.859f}, - {-4767.985352f, -1873.169189f, 90.192f}, - {-4788.861328f, -1888.007813f, 89.888f} + { -4905.479492f, -2062.732666f, 84.352f}, + { -4915.201172f, -2073.528320f, 84.733f}, + { -4878.883301f, -1986.947876f, 91.966f}, + { -4877.503906f, -1966.113403f, 91.859f}, + { -4767.985352f, -1873.169189f, 90.192f}, + { -4788.861328f, -1888.007813f, 89.888f} }; struct MANGOS_DLL_DECL npc_lakota_windsongAI : public npc_escortAI @@ -134,7 +134,7 @@ struct MANGOS_DLL_DECL npc_lakota_windsongAI : public npc_escortAI void WaypointReached(uint32 uiPointId) { - switch(uiPointId) + switch (uiPointId) { case 8: DoScriptText(SAY_LAKO_LOOK_OUT, m_creature); @@ -157,10 +157,10 @@ struct MANGOS_DLL_DECL npc_lakota_windsongAI : public npc_escortAI void DoSpawnBandits(int uiAmbushId) { - for(int i = 0; i < 2; ++i) + for (int i = 0; i < 2; ++i) m_creature->SummonCreature(NPC_GRIM_BANDIT, - m_afBanditLoc[i+uiAmbushId][0], m_afBanditLoc[i+uiAmbushId][1], m_afBanditLoc[i+uiAmbushId][2], 0.0f, - TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 60000); + m_afBanditLoc[i + uiAmbushId][0], m_afBanditLoc[i + uiAmbushId][1], m_afBanditLoc[i + uiAmbushId][2], 0.0f, + TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 60000); } }; @@ -196,11 +196,11 @@ enum NPC_WYVERN = 4107 }; -float m_afWyvernLoc[3][3]= +float m_afWyvernLoc[3][3] = { - {-4990.606f, -906.057f, -5.343f}, - {-4970.241f, -927.378f, -4.951f}, - {-4985.364f, -952.528f, -5.199f} + { -4990.606f, -906.057f, -5.343f}, + { -4970.241f, -927.378f, -4.951f}, + { -4985.364f, -952.528f, -5.199f} }; struct MANGOS_DLL_DECL npc_paoka_swiftmountainAI : public npc_escortAI @@ -211,7 +211,7 @@ struct MANGOS_DLL_DECL npc_paoka_swiftmountainAI : public npc_escortAI void WaypointReached(uint32 uiPointId) { - switch(uiPointId) + switch (uiPointId) { case 15: DoScriptText(SAY_WYVERN, m_creature); @@ -229,10 +229,10 @@ struct MANGOS_DLL_DECL npc_paoka_swiftmountainAI : public npc_escortAI void DoSpawnWyvern() { - for(int i = 0; i < 3; ++i) + for (int i = 0; i < 3; ++i) m_creature->SummonCreature(NPC_WYVERN, - m_afWyvernLoc[i][0], m_afWyvernLoc[i][1], m_afWyvernLoc[i][2], 0.0f, - TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 60000); + m_afWyvernLoc[i][0], m_afWyvernLoc[i][1], m_afWyvernLoc[i][2], 0.0f, + TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 60000); } }; diff --git a/scripts/kalimdor/ungoro_crater.cpp b/scripts/kalimdor/ungoro_crater.cpp index aeefe27d7..527b5550d 100644 --- a/scripts/kalimdor/ungoro_crater.cpp +++ b/scripts/kalimdor/ungoro_crater.cpp @@ -53,7 +53,7 @@ struct MANGOS_DLL_DECL npc_ame01AI : public npc_escortAI void WaypointReached(uint32 uiPointId) { - switch(uiPointId) + switch (uiPointId) { case 0: DoScriptText(SAY_AME_START, m_creature); @@ -79,7 +79,7 @@ struct MANGOS_DLL_DECL npc_ame01AI : public npc_escortAI if (pPlayer->getVictim() && pPlayer->getVictim() == pWho) return; - switch(urand(0, 2)) + switch (urand(0, 2)) { case 0: DoScriptText(SAY_AME_AGGRO1, m_creature); break; case 1: DoScriptText(SAY_AME_AGGRO2, m_creature); break; @@ -164,7 +164,7 @@ struct MANGOS_DLL_DECL npc_ringoAI : public FollowerAI pSpraggle = NULL; } - void MoveInLineOfSight(Unit *pWho) + void MoveInLineOfSight(Unit* pWho) { FollowerAI::MoveInLineOfSight(pWho); @@ -196,7 +196,7 @@ struct MANGOS_DLL_DECL npc_ringoAI : public FollowerAI { SetFollowPaused(true); - switch(urand(0, 3)) + switch (urand(0, 3)) { case 0: DoScriptText(SAY_FAINT_1, m_creature); break; case 1: DoScriptText(SAY_FAINT_2, m_creature); break; @@ -205,7 +205,7 @@ struct MANGOS_DLL_DECL npc_ringoAI : public FollowerAI } } - //what does actually happen here? Emote? Aura? + // what does actually happen here? Emote? Aura? m_creature->SetStandState(UNIT_STAND_STATE_SLEEP); } @@ -216,7 +216,7 @@ struct MANGOS_DLL_DECL npc_ringoAI : public FollowerAI if (HasFollowState(STATE_FOLLOW_POSTEVENT)) return; - switch(urand(0, 3)) + switch (urand(0, 3)) { case 0: DoScriptText(SAY_WAKE_1, m_creature); break; case 1: DoScriptText(SAY_WAKE_2, m_creature); break; @@ -241,7 +241,7 @@ struct MANGOS_DLL_DECL npc_ringoAI : public FollowerAI return; } - switch(m_uiEndEventProgress) + switch (m_uiEndEventProgress) { case 1: DoScriptText(SAY_RIN_END_1, m_creature); diff --git a/scripts/kalimdor/wailing_caverns/instance_wailing_caverns.cpp b/scripts/kalimdor/wailing_caverns/instance_wailing_caverns.cpp index 60a8c8389..40fd5ef6f 100644 --- a/scripts/kalimdor/wailing_caverns/instance_wailing_caverns.cpp +++ b/scripts/kalimdor/wailing_caverns/instance_wailing_caverns.cpp @@ -38,7 +38,7 @@ void instance_wailing_caverns::OnPlayerEnter(Player* pPlayer) { // Respawn the Mysterious chest if one of the players who enter the instance has the quest in his log if (pPlayer->GetQuestStatus(QUEST_FORTUNE_AWAITS) == QUEST_STATUS_COMPLETE && - !pPlayer->GetQuestRewardStatus(QUEST_FORTUNE_AWAITS)) + !pPlayer->GetQuestRewardStatus(QUEST_FORTUNE_AWAITS)) DoRespawnGameObject(GO_MYSTERIOUS_CHEST, HOUR); } @@ -61,7 +61,7 @@ void instance_wailing_caverns::OnObjectCreate(GameObject* pGo) void instance_wailing_caverns::SetData(uint32 uiType, uint32 uiData) { - switch(uiType) + switch (uiType) { case TYPE_ANACONDRA: m_auiEncounter[0] = uiData; @@ -103,7 +103,7 @@ void instance_wailing_caverns::SetData(uint32 uiType, uint32 uiData) std::ostringstream saveStream; saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2] << " " - << m_auiEncounter[3] << " " << m_auiEncounter[4] << " " << m_auiEncounter[5]; + << m_auiEncounter[3] << " " << m_auiEncounter[4] << " " << m_auiEncounter[5]; m_strInstData = saveStream.str(); SaveToDB(); @@ -123,9 +123,9 @@ void instance_wailing_caverns::Load(const char* chrIn) std::istringstream loadStream(chrIn); loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] - >> m_auiEncounter[3] >> m_auiEncounter[4] >> m_auiEncounter[5]; + >> m_auiEncounter[3] >> m_auiEncounter[4] >> m_auiEncounter[5]; - for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) + for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) { if (m_auiEncounter[i] == IN_PROGRESS) m_auiEncounter[i] = NOT_STARTED; diff --git a/scripts/kalimdor/wailing_caverns/wailing_caverns.cpp b/scripts/kalimdor/wailing_caverns/wailing_caverns.cpp index a75952e0d..deae803a9 100644 --- a/scripts/kalimdor/wailing_caverns/wailing_caverns.cpp +++ b/scripts/kalimdor/wailing_caverns/wailing_caverns.cpp @@ -236,7 +236,7 @@ struct MANGOS_DLL_DECL npc_disciple_of_naralexAI : public npc_escortAI { switch (m_uiPoint) { - // Corner stop -> raptors + // Corner stop -> raptors case 7: switch (m_uiSubeventPhase) { @@ -255,7 +255,7 @@ struct MANGOS_DLL_DECL npc_disciple_of_naralexAI : public npc_escortAI break; } break; - // Circle stop -> vipers + // Circle stop -> vipers case 15: switch (m_uiSubeventPhase) { @@ -272,7 +272,7 @@ struct MANGOS_DLL_DECL npc_disciple_of_naralexAI : public npc_escortAI case 2: // Summon vipers at the first circle for (uint8 i = 0; i < 3; ++i) - DoSpawnMob(NPC_DEVIATE_VIPER, aSummonPositions[2][0], aSummonPositions[2][1] + 2*M_PI_F/3 * i); + DoSpawnMob(NPC_DEVIATE_VIPER, aSummonPositions[2][0], aSummonPositions[2][1] + 2 * M_PI_F / 3 * i); m_uiEventTimer = 0; ++m_uiSubeventPhase; break; @@ -289,7 +289,7 @@ struct MANGOS_DLL_DECL npc_disciple_of_naralexAI : public npc_escortAI break; } break; - // Chamber stop -> ritual and final boss + // Chamber stop -> ritual and final boss case 32: switch (m_uiSubeventPhase) { @@ -314,21 +314,21 @@ struct MANGOS_DLL_DECL npc_disciple_of_naralexAI : public npc_escortAI case 3: // First set of mobs for (uint8 i = 0; i < 3; ++i) - DoSpawnMob(NPC_DEVIATE_MOCCASIN, aSummonPositions[3][0], aSummonPositions[3][1] + M_PI_F /3 * i); + DoSpawnMob(NPC_DEVIATE_MOCCASIN, aSummonPositions[3][0], aSummonPositions[3][1] + M_PI_F / 3 * i); m_uiEventTimer = 20000; ++m_uiSubeventPhase; break; case 4: // Second set of mobs for (uint8 i = 0; i < 7; ++i) - DoSpawnMob(NPC_NIGHTMARE_ECTOPLASM, aSummonPositions[3][0], aSummonPositions[3][1] + M_PI_F /7 * i); + DoSpawnMob(NPC_NIGHTMARE_ECTOPLASM, aSummonPositions[3][0], aSummonPositions[3][1] + M_PI_F / 7 * i); m_uiEventTimer = 0; ++m_uiSubeventPhase; break; case 5: // Advance only when all mobs are dead if (Creature* pNaralex = m_pInstance->GetSingleCreatureFromStorage(NPC_NARALEX)) - DoScriptText(EMOTE_BREAK_THROUGH, pNaralex); + DoScriptText(EMOTE_BREAK_THROUGH, pNaralex); ++m_uiSubeventPhase; m_uiEventTimer = 10000; break; @@ -468,7 +468,7 @@ bool GossipSelect_npc_disciple_of_naralex(Player* pPlayer, Creature* pCreature, if (!m_pInstance) return false; - if (uiAction == GOSSIP_ACTION_INFO_DEF+1) + if (uiAction == GOSSIP_ACTION_INFO_DEF + 1) { if (npc_disciple_of_naralexAI* pEscortAI = dynamic_cast(pCreature->AI())) { diff --git a/scripts/kalimdor/winterspring.cpp b/scripts/kalimdor/winterspring.cpp index 3662095d0..5e49b9b03 100644 --- a/scripts/kalimdor/winterspring.cpp +++ b/scripts/kalimdor/winterspring.cpp @@ -96,32 +96,32 @@ static const DialogueEntry aIntroDialogue[] = { {SAY_REACH_ALTAR_1, NPC_RANSHALLA, 2000}, {SAY_REACH_ALTAR_2, NPC_RANSHALLA, 3000}, - {NPC_RANSHALLA, 0, 0}, // start the altar channeling + {NPC_RANSHALLA, 0, 0}, // start the altar channeling {SAY_PRIESTESS_ALTAR_3, NPC_PRIESTESS_DATA_2, 1000}, {SAY_PRIESTESS_ALTAR_4, NPC_PRIESTESS_DATA_1, 4000}, {SAY_RANSHALLA_ALTAR_5, NPC_RANSHALLA, 4000}, - {SAY_RANSHALLA_ALTAR_6, NPC_RANSHALLA, 4000}, // start the escort here + {SAY_RANSHALLA_ALTAR_6, NPC_RANSHALLA, 4000}, // start the escort here {SAY_PRIESTESS_ALTAR_7, NPC_PRIESTESS_DATA_2, 4000}, - {SAY_PRIESTESS_ALTAR_8, NPC_PRIESTESS_DATA_2, 5000}, // show the gem + {SAY_PRIESTESS_ALTAR_8, NPC_PRIESTESS_DATA_2, 5000}, // show the gem {GO_ELUNE_GEM, 0, 5000}, - {SAY_PRIESTESS_ALTAR_9, NPC_PRIESTESS_DATA_1, 4000}, // move priestess 1 near m_creature + {SAY_PRIESTESS_ALTAR_9, NPC_PRIESTESS_DATA_1, 4000}, // move priestess 1 near m_creature {NPC_PRIESTESS_DATA_1, 0, 3000}, {SAY_PRIESTESS_ALTAR_10, NPC_PRIESTESS_DATA_1, 5000}, {SAY_PRIESTESS_ALTAR_11, NPC_PRIESTESS_DATA_1, 4000}, {SAY_PRIESTESS_ALTAR_12, NPC_PRIESTESS_DATA_1, 5000}, - {SAY_PRIESTESS_ALTAR_13, NPC_PRIESTESS_DATA_1, 8000}, // summon voice and guard of elune + {SAY_PRIESTESS_ALTAR_13, NPC_PRIESTESS_DATA_1, 8000}, // summon voice and guard of elune {NPC_VOICE_ELUNE, 0, 12000}, - {SAY_VOICE_ALTAR_15, NPC_VOICE_ELUNE, 5000}, // move priestess 2 near m_creature + {SAY_VOICE_ALTAR_15, NPC_VOICE_ELUNE, 5000}, // move priestess 2 near m_creature {NPC_PRIESTESS_DATA_2, 0, 3000}, {SAY_PRIESTESS_ALTAR_16, NPC_PRIESTESS_DATA_2, 4000}, {SAY_PRIESTESS_ALTAR_17, NPC_PRIESTESS_DATA_2, 6000}, {SAY_PRIESTESS_ALTAR_18, NPC_PRIESTESS_DATA_1, 5000}, - {SAY_PRIESTESS_ALTAR_19, NPC_PRIESTESS_DATA_1, 3000}, // move the owlbeast + {SAY_PRIESTESS_ALTAR_19, NPC_PRIESTESS_DATA_1, 3000}, // move the owlbeast {NPC_GUARDIAN_ELUNE, 0, 2000}, - {SAY_PRIESTESS_ALTAR_20, NPC_PRIESTESS_DATA_1, 4000}, // move the first priestess up - {SAY_PRIESTESS_ALTAR_21, NPC_PRIESTESS_DATA_2, 10000}, // move second priestess up - {DATA_MOVE_PRIESTESS, 0, 6000}, // despawn the gem - {DATA_EVENT_END, 0, 2000}, // turn towards the player + {SAY_PRIESTESS_ALTAR_20, NPC_PRIESTESS_DATA_1, 4000}, // move the first priestess up + {SAY_PRIESTESS_ALTAR_21, NPC_PRIESTESS_DATA_2, 10000}, // move second priestess up + {DATA_MOVE_PRIESTESS, 0, 6000}, // despawn the gem + {DATA_EVENT_END, 0, 2000}, // turn towards the player {SAY_QUEST_END_2, NPC_RANSHALLA, 0}, {0, 0, 0}, }; @@ -171,7 +171,7 @@ struct MANGOS_DLL_DECL npc_ranshallaAI : public npc_escortAI, private DialogueHe DoScriptText(SAY_RANSHALLA_ALTAR_1, m_creature); else { - switch(urand(0, 1)) + switch (urand(0, 1)) { case 0: DoScriptText(SAY_AFTER_TORCH_1, m_creature); break; case 1: DoScriptText(SAY_AFTER_TORCH_2, m_creature); break; @@ -201,7 +201,7 @@ struct MANGOS_DLL_DECL npc_ranshallaAI : public npc_escortAI, private DialogueHe } // Yell and set escort to pause - switch(urand(0, 2)) + switch (urand(0, 2)) { case 0: DoScriptText(SAY_REACH_TORCH_1, m_creature); break; case 1: DoScriptText(SAY_REACH_TORCH_2, m_creature); break; @@ -240,7 +240,7 @@ struct MANGOS_DLL_DECL npc_ranshallaAI : public npc_escortAI, private DialogueHe void WaypointReached(uint32 uiPointId) { - switch(uiPointId) + switch (uiPointId) { case 3: DoScriptText(SAY_ENTER_OWL_THICKET, m_creature); @@ -257,23 +257,23 @@ struct MANGOS_DLL_DECL npc_ranshallaAI : public npc_escortAI, private DialogueHe SetEscortPaused(true); break; case 41: + { + // Search for all nearest lights and respawn them + std::list m_lEluneLights; + GetGameObjectListWithEntryInGrid(m_lEluneLights, m_creature, GO_ELUNE_LIGHT, 20.0f); + for (std::list::const_iterator itr = m_lEluneLights.begin(); itr != m_lEluneLights.end(); ++itr) { - // Search for all nearest lights and respawn them - std::list m_lEluneLights; - GetGameObjectListWithEntryInGrid(m_lEluneLights, m_creature, GO_ELUNE_LIGHT, 20.0f); - for (std::list::const_iterator itr = m_lEluneLights.begin(); itr != m_lEluneLights.end(); ++itr) - { - if ((*itr)->isSpawned()) - continue; - - (*itr)->SetRespawnTime(115); - (*itr)->Refresh(); - } - - if (GameObject* pAltar = m_creature->GetMap()->GetGameObject(m_altarGuid)) - m_creature->SetFacingToObject(pAltar); - break; + if ((*itr)->isSpawned()) + continue; + + (*itr)->SetRespawnTime(115); + (*itr)->Refresh(); } + + if (GameObject* pAltar = m_creature->GetMap()->GetGameObject(m_altarGuid)) + m_creature->SetFacingToObject(pAltar); + break; + } case 42: // Summon the 2 priestess SetEscortPaused(true); @@ -291,7 +291,7 @@ struct MANGOS_DLL_DECL npc_ranshallaAI : public npc_escortAI, private DialogueHe void JustDidDialogueStep(int32 iEntry) { - switch(iEntry) + switch (iEntry) { case NPC_RANSHALLA: // Start the altar channeling diff --git a/scripts/kalimdor/zulfarrak/instance_zulfarrak.cpp b/scripts/kalimdor/zulfarrak/instance_zulfarrak.cpp index c6f5f0b7a..e107be7a6 100644 --- a/scripts/kalimdor/zulfarrak/instance_zulfarrak.cpp +++ b/scripts/kalimdor/zulfarrak/instance_zulfarrak.cpp @@ -29,7 +29,7 @@ instance_zulfarrak::instance_zulfarrak(Map* pMap) : ScriptedInstance(pMap) Initialize(); } - void instance_zulfarrak::Initialize() +void instance_zulfarrak::Initialize() { memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); } @@ -46,7 +46,7 @@ void instance_zulfarrak::OnCreatureCreate(Creature* pCreature) void instance_zulfarrak::SetData(uint32 uiType, uint32 uiData) { - switch(uiType) + switch (uiType) { case TYPE_VELRATHA: case TYPE_GAHZRILLA: @@ -91,7 +91,7 @@ void instance_zulfarrak::Load(const char* chrIn) loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3] >> m_auiEncounter[4] >> m_auiEncounter[5] >> m_auiEncounter[6] >> m_auiEncounter[7]; - for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) + for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) { if (m_auiEncounter[i] == IN_PROGRESS) m_auiEncounter[i] = NOT_STARTED; diff --git a/scripts/kalimdor/zulfarrak/zulfarrak.cpp b/scripts/kalimdor/zulfarrak/zulfarrak.cpp index 8df718594..c7e94186f 100644 --- a/scripts/kalimdor/zulfarrak/zulfarrak.cpp +++ b/scripts/kalimdor/zulfarrak/zulfarrak.cpp @@ -43,20 +43,20 @@ enum }; #define GOSSIP_BLY "That's it! I'm tired of helping you out. It's time we settled things on the battlefield!" -//find Bly's gossip menus +// find Bly's gossip menus struct MANGOS_DLL_DECL npc_sergeant_blyAI : public ScriptedAI { npc_sergeant_blyAI(Creature* pCreature) : ScriptedAI(pCreature) { - //m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + // m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); Reset(); } - //ScriptedInstance* m_pInstance; + // ScriptedInstance* m_pInstance; uint32 m_uiShieldBashTimer; - uint32 m_uiRevengeTimer; //this is wrong, spell should never be used unless m_creature->getVictim() dodge, parry or block attack. Mangos support required. + uint32 m_uiRevengeTimer; // this is wrong, spell should never be used unless m_creature->getVictim() dodge, parry or block attack. Mangos support required. void Reset() { @@ -88,7 +88,7 @@ struct MANGOS_DLL_DECL npc_sergeant_blyAI : public ScriptedAI if (m_uiShieldBashTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_SHIELD_BASH); + DoCastSpellIfCan(m_creature->getVictim(), SPELL_SHIELD_BASH); m_uiShieldBashTimer = 15000; } else @@ -96,7 +96,7 @@ struct MANGOS_DLL_DECL npc_sergeant_blyAI : public ScriptedAI if (m_uiRevengeTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_REVENGE); + DoCastSpellIfCan(m_creature->getVictim(), SPELL_REVENGE); m_uiRevengeTimer = 10000; } else @@ -115,7 +115,7 @@ bool GossipHello_npc_sergeant_bly(Player* pPlayer, Creature* pCreature) { /*if (m_pInstance->GetData(0) == DONE) {*/ - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_BLY, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_BLY, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); pPlayer->SEND_GOSSIP_MENU(1517, pCreature->GetObjectGuid()); /*} else if (m_pInstance->GetData(0) == IN_PROGRESS) @@ -128,7 +128,7 @@ bool GossipHello_npc_sergeant_bly(Player* pPlayer, Creature* pCreature) bool GossipSelect_npc_sergeant_bly(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) { - if (uiAction == GOSSIP_ACTION_INFO_DEF+1) + if (uiAction == GOSSIP_ACTION_INFO_DEF + 1) { pPlayer->CLOSE_GOSSIP_MENU(); pCreature->setFaction(FACTION_HOSTILE); @@ -155,11 +155,11 @@ struct MANGOS_DLL_DECL npc_weegli_blastfuseAI : public ScriptedAI { npc_weegli_blastfuseAI(Creature* pCreature) : ScriptedAI(pCreature) { - //m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + // m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); Reset(); } - //ScriptedInstance* m_pInstance; + // ScriptedInstance* m_pInstance; void Reset() { @@ -195,25 +195,25 @@ CreatureAI* GetAI_npc_weegli_blastfuse(Creature* pCreature) bool GossipHello_npc_weegli_blastfuse(Player* pPlayer, Creature* pCreature) { - //event not implemented yet, this is only placeholder for future developement + // event not implemented yet, this is only placeholder for future developement /*if (m_pInstance->GetData(0) == DONE) { pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_WEEGLI, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - pPlayer->SEND_GOSSIP_MENU(1514, pCreature->GetObjectGuid());//if event can proceed to end + pPlayer->SEND_GOSSIP_MENU(1514, pCreature->GetObjectGuid());// if event can proceed to end } else if (m_pInstance->GetData(0) == IN_PROGRESS) - pPlayer->SEND_GOSSIP_MENU(1513, pCreature->GetObjectGuid());//if event are in progress + pPlayer->SEND_GOSSIP_MENU(1513, pCreature->GetObjectGuid());// if event are in progress else*/ - pPlayer->SEND_GOSSIP_MENU(1511, pCreature->GetObjectGuid()); //if event not started + pPlayer->SEND_GOSSIP_MENU(1511, pCreature->GetObjectGuid()); // if event not started return true; } bool GossipSelect_npc_weegli_blastfuse(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) { - if (uiAction == GOSSIP_ACTION_INFO_DEF+1) + if (uiAction == GOSSIP_ACTION_INFO_DEF + 1) { pPlayer->CLOSE_GOSSIP_MENU(); - //here we make him run to door, set the charge and run away off to nowhere + // here we make him run to door, set the charge and run away off to nowhere } return true; } diff --git a/scripts/northrend/azjol-nerub/ahnkahet/ahnkahet.h b/scripts/northrend/azjol-nerub/ahnkahet/ahnkahet.h index 0e0e13994..a964295fc 100644 --- a/scripts/northrend/azjol-nerub/ahnkahet/ahnkahet.h +++ b/scripts/northrend/azjol-nerub/ahnkahet/ahnkahet.h @@ -63,8 +63,8 @@ class MANGOS_DLL_DECL instance_ahnkahet : public ScriptedInstance ObjectGuid SelectRandomSwarmerEggGuid(); ObjectGuid SelectJedogaSacrificeControllerGuid() { return m_jedogaSacrificeController; } - void GetJedogaControllersList(GuidList &lList) { lList = m_lJedogaControllersGuidList; } - void GetJedogaEventControllersList(GuidList &lList) {lList = m_lJedogaEventControllersGuidList; } + void GetJedogaControllersList(GuidList& lList) { lList = m_lJedogaControllersGuidList; } + void GetJedogaEventControllersList(GuidList& lList) {lList = m_lJedogaEventControllersGuidList; } bool CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/); diff --git a/scripts/northrend/azjol-nerub/ahnkahet/boss_jedoga.cpp b/scripts/northrend/azjol-nerub/ahnkahet/boss_jedoga.cpp index 1950b1c6b..b136c2965 100644 --- a/scripts/northrend/azjol-nerub/ahnkahet/boss_jedoga.cpp +++ b/scripts/northrend/azjol-nerub/ahnkahet/boss_jedoga.cpp @@ -144,7 +144,7 @@ struct MANGOS_DLL_DECL boss_jedogaAI : public ScriptedAI void KilledUnit(Unit* pVictim) { - switch(urand(0, 2)) + switch (urand(0, 2)) { case 0: DoScriptText(SAY_SLAY_1, m_creature); break; case 1: DoScriptText(SAY_SLAY_2, m_creature); break; @@ -170,7 +170,7 @@ struct MANGOS_DLL_DECL boss_jedogaAI : public ScriptedAI { if (!m_bHasDoneIntro && pWho->GetTypeId() == TYPEID_PLAYER && m_creature->IsWithinDistInMap(pWho, 110.0f) && m_creature->IsWithinLOSInMap(pWho)) { - switch(urand(0, 4)) + switch (urand(0, 4)) { case 0: DoScriptText(SAY_PREACHING1, m_creature); break; case 1: DoScriptText(SAY_PREACHING2, m_creature); break; @@ -203,9 +203,9 @@ struct MANGOS_DLL_DECL boss_jedogaAI : public ScriptedAI float fDist = i < 7 ? 20.0f : 30.0f; float fAngle = 0; if (!j) - fAngle = i < 7 ? (i-2)*(3*M_PI_F/35) : (i-6)*(M_PI_F/16); + fAngle = i < 7 ? (i - 2) * (3 * M_PI_F / 35) : (i - 6) * (M_PI_F / 16); else - fAngle = i < 7 ? (i-10)*(3*M_PI_F/35) : 3*M_PI_F/2 - (i-6)*(M_PI_F/16); + fAngle = i < 7 ? (i - 10) * (3 * M_PI_F / 35) : 3 * M_PI_F / 2 - (i - 6) * (M_PI_F / 16); m_creature->GetNearPoint(m_creature, fX, fY, fZ, 0, fDist, fAngle); pVolunteer->GetMotionMaster()->MovePoint(POINT_ID_PREPARE, fX, fY, fZ); @@ -217,7 +217,7 @@ struct MANGOS_DLL_DECL boss_jedogaAI : public ScriptedAI m_creature->GetRandomPoint(aVolunteerPosition[0][0], aVolunteerPosition[0][1], aVolunteerPosition[0][2], 10.0f, fX, fY, fZ); if (Creature* pVolunteer = m_creature->SummonCreature(NPC_TWILIGHT_VOLUNTEER, fX, fY, fZ, 0, TEMPSUMMON_DEAD_DESPAWN, 0)) { - m_creature->GetNearPoint(m_creature, fX, fY, fZ, 0, 20.0f, 7*M_PI_F/4); + m_creature->GetNearPoint(m_creature, fX, fY, fZ, 0, 20.0f, 7 * M_PI_F / 4); pVolunteer->GetMotionMaster()->MovePoint(POINT_ID_PREPARE, fX, fY, fZ); } } @@ -273,7 +273,7 @@ struct MANGOS_DLL_DECL boss_jedogaAI : public ScriptedAI switch (uiPointId) { - // Prepare for combat + // Prepare for combat case POINT_ID_PREPARE: m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); @@ -282,14 +282,14 @@ struct MANGOS_DLL_DECL boss_jedogaAI : public ScriptedAI m_creature->SetLevitate(false); break; - // Prepare for sacrifice lift off + // Prepare for sacrifice lift off case POINT_ID_SACRIFICE: DoCastSpellIfCan(m_creature, SPELL_HOVER_FALL); m_creature->SetLevitate(true); m_creature->GetMotionMaster()->MovePoint(POINT_ID_LEVITATE, m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ() + 10.0f); break; - // Call a volunteer to sacrifice + // Call a volunteer to sacrifice case POINT_ID_LEVITATE: if (Creature* pVolunteer = m_creature->GetMap()->GetCreature(SelectRandomVolunteer())) { @@ -312,7 +312,7 @@ struct MANGOS_DLL_DECL boss_jedogaAI : public ScriptedAI } break; - // Resume combat + // Resume combat case POINT_ID_COMBAT: m_creature->RemoveAurasDueToSpell(SPELL_HOVER_FALL); m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); diff --git a/scripts/northrend/azjol-nerub/ahnkahet/boss_nadox.cpp b/scripts/northrend/azjol-nerub/ahnkahet/boss_nadox.cpp index 9609528c8..dc57efbd8 100644 --- a/scripts/northrend/azjol-nerub/ahnkahet/boss_nadox.cpp +++ b/scripts/northrend/azjol-nerub/ahnkahet/boss_nadox.cpp @@ -150,7 +150,7 @@ struct MANGOS_DLL_DECL boss_nadoxAI : public ScriptedAI void KilledUnit(Unit* pVictim) { - switch(urand(0, 2)) + switch (urand(0, 2)) { case 0: DoScriptText(SAY_SLAY_1, m_creature); break; case 1: DoScriptText(SAY_SLAY_2, m_creature); break; diff --git a/scripts/northrend/azjol-nerub/ahnkahet/boss_taldaram.cpp b/scripts/northrend/azjol-nerub/ahnkahet/boss_taldaram.cpp index 492cb1e45..8d783b317 100644 --- a/scripts/northrend/azjol-nerub/ahnkahet/boss_taldaram.cpp +++ b/scripts/northrend/azjol-nerub/ahnkahet/boss_taldaram.cpp @@ -106,7 +106,7 @@ struct MANGOS_DLL_DECL boss_taldaramAI : public ScriptedAI void KilledUnit(Unit* pVictim) { - switch(urand(0, 2)) + switch (urand(0, 2)) { case 0: DoScriptText(SAY_SLAY_1, m_creature); break; case 1: DoScriptText(SAY_SLAY_2, m_creature); break; @@ -185,7 +185,7 @@ struct MANGOS_DLL_DECL boss_taldaramAI : public ScriptedAI { pOrb->CastSpell(pOrb, m_bIsRegularMode ? SPELL_FLAME_SPHERE_PERIODIC : SPELL_FLAME_SPHERE_PERIODIC_H, true); - pOrb->GetNearPoint2D(fX, fY, 70.0f, (2*M_PI_F/3)*uiIndex); + pOrb->GetNearPoint2D(fX, fY, 70.0f, (2 * M_PI_F / 3)*uiIndex); pOrb->GetMotionMaster()->MovePoint(0, fX, fY, pOrb->GetPositionZ()); } ++uiIndex; @@ -241,7 +241,7 @@ struct MANGOS_DLL_DECL boss_taldaramAI : public ScriptedAI { if (m_uiVanishTimer <= uiDiff) { - if (DoCastSpellIfCan (m_creature, SPELL_VANISH) == CAST_OK) + if (DoCastSpellIfCan(m_creature, SPELL_VANISH) == CAST_OK) { DoScriptText(urand(0, 1) ? SAY_VANISH_1 : SAY_VANISH_2, m_creature); m_uiVanishTimer = 0; @@ -294,13 +294,13 @@ CreatureAI* GetAI_boss_taldaram(Creature* pCreature) bool EffectDummyCreature_spell_conjure_flame_orbs(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) { - //always check spellid and effectindex + // always check spellid and effectindex if (uiSpellId == SPELL_CONJURE_FLAME_SPHERE && uiEffIndex == EFFECT_INDEX_0) { if (boss_taldaramAI* pBossAI = dynamic_cast(pCreatureTarget->AI())) pBossAI->DoSetSpheresInMotion(); - //always return true when we are handling this spell and effect + // always return true when we are handling this spell and effect return true; } diff --git a/scripts/northrend/azjol-nerub/ahnkahet/boss_volazj.cpp b/scripts/northrend/azjol-nerub/ahnkahet/boss_volazj.cpp index 7d382617e..9d0dd61ea 100644 --- a/scripts/northrend/azjol-nerub/ahnkahet/boss_volazj.cpp +++ b/scripts/northrend/azjol-nerub/ahnkahet/boss_volazj.cpp @@ -93,7 +93,7 @@ struct MANGOS_DLL_DECL boss_volazjAI : public ScriptedAI void KilledUnit(Unit* pVictim) { - switch(urand(0, 2)) + switch (urand(0, 2)) { case 0: DoScriptText(SAY_SLAY_1, m_creature); break; case 1: DoScriptText(SAY_SLAY_2, m_creature); break; @@ -121,7 +121,7 @@ struct MANGOS_DLL_DECL boss_volazjAI : public ScriptedAI if (m_uiMindFlayTimer < uiDiff) { - if (DoCastSpellIfCan (m_creature->getVictim(), m_bIsRegularMode ? SPELL_MIND_FLAY : SPELL_MIND_FLAY_H) == CAST_OK) + if (DoCastSpellIfCan(m_creature->getVictim(), m_bIsRegularMode ? SPELL_MIND_FLAY : SPELL_MIND_FLAY_H) == CAST_OK) m_uiMindFlayTimer = urand(10000, 20000); } else diff --git a/scripts/northrend/azjol-nerub/ahnkahet/instance_ahnkahet.cpp b/scripts/northrend/azjol-nerub/ahnkahet/instance_ahnkahet.cpp index a07ebaf3b..a73600046 100644 --- a/scripts/northrend/azjol-nerub/ahnkahet/instance_ahnkahet.cpp +++ b/scripts/northrend/azjol-nerub/ahnkahet/instance_ahnkahet.cpp @@ -40,7 +40,7 @@ void instance_ahnkahet::Initialize() void instance_ahnkahet::OnCreatureCreate(Creature* pCreature) { - switch(pCreature->GetEntry()) + switch (pCreature->GetEntry()) { case NPC_ELDER_NADOX: case NPC_TALDARAM: @@ -70,7 +70,7 @@ void instance_ahnkahet::OnCreatureCreate(Creature* pCreature) void instance_ahnkahet::OnObjectCreate(GameObject* pGo) { - switch(pGo->GetEntry()) + switch (pGo->GetEntry()) { case GO_DOOR_TALDARAM: if (m_auiEncounter[TYPE_TALDARAM] == DONE) @@ -97,7 +97,7 @@ void instance_ahnkahet::SetData(uint32 uiType, uint32 uiData) { debug_log("SD2: Instance Ahn'Kahet: SetData received for type %u with data %u", uiType, uiData); - switch(uiType) + switch (uiType) { case TYPE_NADOX: m_auiEncounter[uiType] = uiData; @@ -169,7 +169,7 @@ void instance_ahnkahet::SetData(uint32 uiType, uint32 uiData) std::ostringstream saveStream; saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2] << " " << m_auiEncounter[3] - << " " << m_auiEncounter[4]; + << " " << m_auiEncounter[4]; m_strInstData = saveStream.str(); @@ -248,7 +248,7 @@ void instance_ahnkahet::Load(const char* chrIn) std::istringstream loadStream(chrIn); loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3] >> m_auiEncounter[4]; - for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) + for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) { if (m_auiEncounter[i] == IN_PROGRESS) m_auiEncounter[i] = NOT_STARTED; diff --git a/scripts/northrend/azjol-nerub/azjol-nerub/azjol-nerub.h b/scripts/northrend/azjol-nerub/azjol-nerub/azjol-nerub.h index be3752873..726e257b0 100644 --- a/scripts/northrend/azjol-nerub/azjol-nerub/azjol-nerub.h +++ b/scripts/northrend/azjol-nerub/azjol-nerub/azjol-nerub.h @@ -39,7 +39,7 @@ enum static const uint32 aWatchers[] = {NPC_GASHRA, NPC_NARJIL, NPC_SILTHIK}; // Used to sort the summont triggers -static const int aSortDistance[4] = {-90, 10, 20, 30}; +static const int aSortDistance[4] = { -90, 10, 20, 30}; class MANGOS_DLL_DECL instance_azjol_nerub : public ScriptedInstance { diff --git a/scripts/northrend/azjol-nerub/azjol-nerub/boss_anubarak.cpp b/scripts/northrend/azjol-nerub/azjol-nerub/boss_anubarak.cpp index c40b17613..d2c44b21f 100644 --- a/scripts/northrend/azjol-nerub/azjol-nerub/boss_anubarak.cpp +++ b/scripts/northrend/azjol-nerub/azjol-nerub/boss_anubarak.cpp @@ -106,7 +106,7 @@ struct MANGOS_DLL_DECL boss_anubarakAI : public ScriptedAI m_uiPoundTimer = 15000; m_uiDarterTimer = 5000; - m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE|UNIT_FLAG_NOT_SELECTABLE); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE); } void Aggro(Unit* pWho) @@ -119,7 +119,7 @@ struct MANGOS_DLL_DECL boss_anubarakAI : public ScriptedAI void KilledUnit(Unit* pVictim) { - switch(urand(0, 2)) + switch (urand(0, 2)) { case 0: DoScriptText(SAY_KILL_1, m_creature); break; case 1: DoScriptText(SAY_KILL_2, m_creature); break; @@ -221,12 +221,12 @@ struct MANGOS_DLL_DECL boss_anubarakAI : public ScriptedAI else m_uiPoundTimer -= uiDiff; - if (m_creature->GetHealthPercent() < 100 - 25*m_uiSubmergePhase) + if (m_creature->GetHealthPercent() < 100 - 25 * m_uiSubmergePhase) { DoCastSpellIfCan(m_creature, SPELL_IMPALE_AURA, CAST_TRIGGERED); DoCastSpellIfCan(m_creature, SPELL_SUBMERGE, CAST_TRIGGERED); DoScriptText(urand(0, 1) ? SAY_SUBMERGE_1 : SAY_SUBMERGE_2, m_creature); - m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE|UNIT_FLAG_NOT_SELECTABLE); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE); m_uiPhase = PHASE_SUBMERGED; m_bIsFirstWave = true; m_uiSummonTimer = 5000; @@ -298,7 +298,7 @@ struct MANGOS_DLL_DECL boss_anubarakAI : public ScriptedAI DoCastSpellIfCan(m_creature, SPELL_EMERGE, CAST_INTERRUPT_PREVIOUS); m_creature->RemoveAurasDueToSpell(SPELL_SUBMERGE); m_creature->RemoveAurasDueToSpell(SPELL_IMPALE_AURA); - m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE|UNIT_FLAG_NOT_SELECTABLE); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE); m_uiPhase = PHASE_GROUND; } else diff --git a/scripts/northrend/azjol-nerub/azjol-nerub/boss_hadronox.cpp b/scripts/northrend/azjol-nerub/azjol-nerub/boss_hadronox.cpp index a6c84e805..0e6245fd2 100644 --- a/scripts/northrend/azjol-nerub/azjol-nerub/boss_hadronox.cpp +++ b/scripts/northrend/azjol-nerub/azjol-nerub/boss_hadronox.cpp @@ -35,23 +35,23 @@ enum SPELL_WEB_GRAB_H = 59421, // Gauntlet end spells - send events 19101 and 19102 - //SPELL_WEB_FRONT_DOORS = 53177, - //SPELL_WEB_SIDE_DOORS = 53185, + // SPELL_WEB_FRONT_DOORS = 53177, + // SPELL_WEB_SIDE_DOORS = 53185, // Gauntlet summoned npcs - //NPC_ANUBAR_CHAMPION_1 = 29062, - //NPC_ANUBAR_CRYPT_FIEND_1 = 29063, - //NPC_ANUBAR_NECROMANCER_1 = 29064, - //NPC_ANUBAR_CHAMPION_2 = 29096, - //NPC_ANUBAR_CRYPT_FIEND_2 = 29097, - //NPC_ANUBAR_NECROMANCER_2 = 29098, + // NPC_ANUBAR_CHAMPION_1 = 29062, + // NPC_ANUBAR_CRYPT_FIEND_1 = 29063, + // NPC_ANUBAR_NECROMANCER_1 = 29064, + // NPC_ANUBAR_CHAMPION_2 = 29096, + // NPC_ANUBAR_CRYPT_FIEND_2 = 29097, + // NPC_ANUBAR_NECROMANCER_2 = 29098, }; - /* ##### Gauntlet description ##### - * This is the timed gauntlet - waves of non-elite spiders will spawn from the 3 doors located a little above the main room - * They will make their way down to fight Hadronox but she will head to the main room, fighting the spiders - * When Hadronox enters the main room, she will web the doors, and no more spiders will spawn. - */ +/* ##### Gauntlet description ##### + * This is the timed gauntlet - waves of non-elite spiders will spawn from the 3 doors located a little above the main room + * They will make their way down to fight Hadronox but she will head to the main room, fighting the spiders + * When Hadronox enters the main room, she will web the doors, and no more spiders will spawn. + */ /*###### ## boss_hadronox @@ -94,7 +94,7 @@ struct MANGOS_DLL_DECL boss_hadronoxAI : public ScriptedAI if (m_uiPierceTimer < uiDiff) { - if(DoCastSpellIfCan(m_creature->getVictim(), SPELL_PIERCE_ARMOR) == CAST_OK) + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_PIERCE_ARMOR) == CAST_OK) m_uiPierceTimer = 8000; } else diff --git a/scripts/northrend/azjol-nerub/azjol-nerub/boss_krikthir.cpp b/scripts/northrend/azjol-nerub/azjol-nerub/boss_krikthir.cpp index ede114568..86cb91e9a 100644 --- a/scripts/northrend/azjol-nerub/azjol-nerub/boss_krikthir.cpp +++ b/scripts/northrend/azjol-nerub/azjol-nerub/boss_krikthir.cpp @@ -89,7 +89,7 @@ struct MANGOS_DLL_DECL boss_krikthirAI : public ScriptedAI void KilledUnit(Unit* pVictim) { - switch(urand(0, 2)) + switch (urand(0, 2)) { case 0: DoScriptText(SAY_KILL_1, m_creature); break; case 1: DoScriptText(SAY_KILL_2, m_creature); break; @@ -97,11 +97,11 @@ struct MANGOS_DLL_DECL boss_krikthirAI : public ScriptedAI } } - void MoveInLineOfSight (Unit* pWho) + void MoveInLineOfSight(Unit* pWho) { if (!m_bIntroSpeech && m_creature->IsWithinDistInMap(pWho, DEFAULT_VISIBILITY_INSTANCE)) { - switch(urand(0, 2)) + switch (urand(0, 2)) { case 0: DoScriptText(SAY_PREFIGHT_1, m_creature); break; case 1: DoScriptText(SAY_PREFIGHT_2, m_creature); break; diff --git a/scripts/northrend/azjol-nerub/azjol-nerub/instance_azjol-nerub.cpp b/scripts/northrend/azjol-nerub/azjol-nerub/instance_azjol-nerub.cpp index 63b8e0e41..ddb74081d 100644 --- a/scripts/northrend/azjol-nerub/azjol-nerub/instance_azjol-nerub.cpp +++ b/scripts/northrend/azjol-nerub/azjol-nerub/instance_azjol-nerub.cpp @@ -38,7 +38,7 @@ void instance_azjol_nerub::Initialize() void instance_azjol_nerub::OnObjectCreate(GameObject* pGo) { - switch(pGo->GetEntry()) + switch (pGo->GetEntry()) { case GO_DOOR_KRIKTHIR: if (m_auiEncounter[TYPE_KRIKTHIR] == DONE) @@ -57,7 +57,7 @@ void instance_azjol_nerub::OnObjectCreate(GameObject* pGo) void instance_azjol_nerub::OnCreatureCreate(Creature* pCreature) { - switch(pCreature->GetEntry()) + switch (pCreature->GetEntry()) { case NPC_KRIKTHIR: case NPC_GASHRA: @@ -142,7 +142,7 @@ void instance_azjol_nerub::DoSendWatcherOrKrikthir() if (pAttacker) { - switch(urand(0, 2)) + switch (urand(0, 2)) { case 0: DoScriptText(SAY_SEND_GROUP_1, pKrikthir); break; case 1: DoScriptText(SAY_SEND_GROUP_2, pKrikthir); break; @@ -197,14 +197,14 @@ ObjectGuid instance_azjol_nerub::GetRandomAssassinTrigger() { // Get a random summon target if (m_vAssassinSummonTargetsVect.size() > 0) - return m_vAssassinSummonTargetsVect[urand(0, m_vAssassinSummonTargetsVect.size() -1)]; + return m_vAssassinSummonTargetsVect[urand(0, m_vAssassinSummonTargetsVect.size() - 1)]; else return ObjectGuid(); } void instance_azjol_nerub::SetData(uint32 uiType, uint32 uiData) { - switch(uiType) + switch (uiType) { case TYPE_KRIKTHIR: m_auiEncounter[uiType] = uiData; @@ -262,7 +262,7 @@ void instance_azjol_nerub::Load(const char* chrIn) std::istringstream loadStream(chrIn); loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2]; - for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) + for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) { if (m_auiEncounter[i] == IN_PROGRESS) m_auiEncounter[i] = NOT_STARTED; diff --git a/scripts/northrend/borean_tundra.cpp b/scripts/northrend/borean_tundra.cpp index f47c41dbe..b514622e1 100644 --- a/scripts/northrend/borean_tundra.cpp +++ b/scripts/northrend/borean_tundra.cpp @@ -85,7 +85,7 @@ struct MANGOS_DLL_DECL npc_nesingwary_trapperAI : public ScriptedAI { if (m_uiPhaseTimer <= uiDiff) { - switch(m_uiPhase) + switch (m_uiPhase) { case 1: if (GameObject* pTrap = m_creature->GetMap()->GetGameObject(m_trapGuid)) @@ -260,7 +260,7 @@ bool EffectAuraDummy_npc_oil_stained_wolf(const Aura* pAura, bool bApply) bool GOUse_go_caribou_trap(Player* pPlayer, GameObject* pGo) { float fX, fY, fZ; - pGo->GetClosePoint(fX, fY, fZ, pGo->GetObjectBoundingRadius(), 2*INTERACTION_DISTANCE, frand(0, M_PI_F*2)); + pGo->GetClosePoint(fX, fY, fZ, pGo->GetObjectBoundingRadius(), 2 * INTERACTION_DISTANCE, frand(0, M_PI_F * 2)); if (Creature* pCreature = pGo->SummonCreature(NPC_NESINGWARY_TRAPPER, fX, fY, fZ, pGo->GetOrientation(), TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 10000)) { @@ -331,7 +331,7 @@ struct MANGOS_DLL_DECL npc_sinkhole_kill_creditAI : public ScriptedAI { if (m_uiCartTimer <= uiDiff) { - switch(m_uiCartPhase) + switch (m_uiCartPhase) { case 0: DoCastSpellIfCan(m_creature, SPELL_SUMMON_EXPLOSIVES_CART_FIRE); @@ -423,7 +423,7 @@ struct MANGOS_DLL_DECL npc_lurgglbrAI : public npc_escortAI void WaypointStart(uint32 uiPointId) { - switch(uiPointId) + switch (uiPointId) { case 1: if (Player* pPlayer = GetPlayerForEscort()) @@ -437,7 +437,7 @@ struct MANGOS_DLL_DECL npc_lurgglbrAI : public npc_escortAI void WaypointReached(uint32 uiPointId) { - switch(uiPointId) + switch (uiPointId) { case 0: if (Player* pPlayer = GetPlayerForEscort()) @@ -474,7 +474,7 @@ struct MANGOS_DLL_DECL npc_lurgglbrAI : public npc_escortAI m_creature->SetFacingToObject(pPlayer); - switch(m_uiSpeech) + switch (m_uiSpeech) { case 0: DoScriptText(SAY_END_2, m_creature, pPlayer); diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp index 5fdb51467..903f5a56e 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp @@ -57,7 +57,7 @@ enum SPELL_PURSUING_SPIKES_FAIL = 66181, SPELL_PURSUING_SPIKES_DUMMY = 67470, // target selection spell SPELL_PURSUING_SPIKES_SPEED1 = 65920, - //SPELL_PURSUING_SPIKES_GROUND = 65921, // included in creature_template_addon + // SPELL_PURSUING_SPIKES_GROUND = 65921, // included in creature_template_addon SPELL_PURSUING_SPIKES_SPEED2 = 65922, SPELL_PURSUING_SPIKES_SPEED3 = 65923, SPELL_MARK = 67574, @@ -150,7 +150,7 @@ struct MANGOS_DLL_DECL boss_anubarak_trialAI : public ScriptedAI m_uiFreezingSlashTimer = 20000; m_uiPenetratingColdTimer = urand(15000, 25000); m_uiBurrowerSummonTimer = 10000; - m_uiBerserkTimer = 10*MINUTE*IN_MILLISECONDS; + m_uiBerserkTimer = 10 * MINUTE * IN_MILLISECONDS; m_vSpheresGuidVector.clear(); m_vSpheresGuidVector.resize(MAX_FROSTSPHERES, ObjectGuid()); @@ -514,13 +514,13 @@ CreatureAI* GetAI_npc_anubarak_trial_spike(Creature* pCreature) bool EffectDummyCreature_spell_dummy_permafrost(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) { - //always check spellid and effectindex + // always check spellid and effectindex if (uiSpellId == SPELL_PERMAFROST_DUMMY && uiEffIndex == EFFECT_INDEX_0) { if (npc_anubarak_trial_spikeAI* pSpikeAI = dynamic_cast(pCreatureTarget->AI())) pSpikeAI->PermafrostHit((Creature*)pCaster); - //always return true when we are handling this spell and effect + // always return true when we are handling this spell and effect return true; } @@ -547,7 +547,7 @@ struct MANGOS_DLL_DECL npc_anubarak_trial_frostsphereAI : public Scripted_NoMove void MoveInLineOfSight(Unit* pWho) { } void AttackStart(Unit* pWho) { } - void DamageTaken(Unit* pDoneBy, uint32 &uiDamage) + void DamageTaken(Unit* pDoneBy, uint32& uiDamage) { if (uiDamage < m_creature->GetHealth()) return; diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_jaraxxus.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_jaraxxus.cpp index 22943c4af..1c2925686 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_jaraxxus.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_jaraxxus.cpp @@ -85,7 +85,7 @@ struct MANGOS_DLL_DECL boss_jaraxxusAI : public ScriptedAI m_uiLegionFlameTimer = 10000; m_uiSummonTimer = 20000; m_uiNetherPowerTimer = urand(20000, 30000); - m_uiBerserkTimer = 10*MINUTE*IN_MILLISECONDS; + m_uiBerserkTimer = 10 * MINUTE * IN_MILLISECONDS; m_bVolcanoSummon = true; @@ -136,7 +136,7 @@ struct MANGOS_DLL_DECL boss_jaraxxusAI : public ScriptedAI void JustSummoned(Creature* pSummoned) { - switch(pSummoned->GetEntry()) + switch (pSummoned->GetEntry()) { case NPC_INFERNAL_VOLCANO: pSummoned->CastSpell(pSummoned, SPELL_ERUPTION, true, NULL, NULL, m_creature->GetObjectGuid()); @@ -145,7 +145,7 @@ struct MANGOS_DLL_DECL boss_jaraxxusAI : public ScriptedAI pSummoned->CastSpell(pSummoned, SPELL_NETHER_PORTAL, true, NULL, NULL, m_creature->GetObjectGuid()); break; } - } + } void MovementInform(uint32 uiMovementType, uint32 uiPointId) { @@ -198,12 +198,12 @@ struct MANGOS_DLL_DECL boss_jaraxxusAI : public ScriptedAI if (m_uiSummonTimer < uiDiff) { - if(m_bVolcanoSummon) + if (m_bVolcanoSummon) { if (DoCastSpellIfCan(m_creature, SPELL_NETHER_PORTAL_SUMMON) == CAST_OK) { // TODO missing emote? - //DoScriptText(EMOTE_PORTAL, m_creature); + // DoScriptText(EMOTE_PORTAL, m_creature); m_bVolcanoSummon = false; m_uiSummonTimer = 60000; } @@ -214,7 +214,7 @@ struct MANGOS_DLL_DECL boss_jaraxxusAI : public ScriptedAI if (DoCastSpellIfCan(m_creature, SPELL_INFERNAL_ERUPTION) == CAST_OK) { // TODO missing emote? - //DoScriptText(EMOTE_VOLCANO, m_creature); + // DoScriptText(EMOTE_VOLCANO, m_creature); m_bVolcanoSummon = true; m_uiSummonTimer = 60000; } diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp index 9ced6842e..32593f512 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp @@ -65,9 +65,9 @@ struct MANGOS_DLL_DECL npc_beast_combat_stalkerAI : public Scripted_NoMovementAI m_uiPhase = PHASE_GORMOK; if (m_creature->GetMap()->GetDifficulty() == RAID_DIFFICULTY_10MAN_NORMAL || m_creature->GetMap()->GetDifficulty() == RAID_DIFFICULTY_25MAN_NORMAL) - m_uiBerserkTimer = 15*MINUTE*IN_MILLISECONDS; + m_uiBerserkTimer = 15 * MINUTE * IN_MILLISECONDS; else - m_uiBerserkTimer = 9*MINUTE*IN_MILLISECONDS; + m_uiBerserkTimer = 9 * MINUTE * IN_MILLISECONDS; } void MoveInLineOfSight(Unit* pWho) {} @@ -117,7 +117,7 @@ struct MANGOS_DLL_DECL npc_beast_combat_stalkerAI : public Scripted_NoMovementAI // Next beasts are summoned only for heroic modes if (m_creature->GetMap()->GetDifficulty() == RAID_DIFFICULTY_10MAN_HEROIC || m_creature->GetMap()->GetDifficulty() == RAID_DIFFICULTY_25MAN_HEROIC) - m_uiNextBeastTimer = 150*IN_MILLISECONDS; // 2 min 30 + m_uiNextBeastTimer = 150 * IN_MILLISECONDS; // 2 min 30 m_uiAttackDelayTimer = 15000; // TODO, must be checked. } diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp index eb0ae055d..4d2e8b9c8 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp @@ -142,7 +142,7 @@ static const DialogueEntryTwoSide aTocDialogues[] = {SAY_LKING_ANUB_INTRO_2, NPC_THE_LICHKING_VISUAL, 0, 0, 18500}, {EVENT_DESTROY_FLOOR, 0, 0, 0, 2500}, {SAY_LKING_ANUB_INTRO_3, NPC_THE_LICHKING, 0, 0, 0}, - {0, 0, 0, 0 ,0} + {0, 0, 0, 0 , 0} }; instance_trial_of_the_crusader::instance_trial_of_the_crusader(Map* pMap) : ScriptedInstance(pMap), DialogueHelper(aTocDialogues), @@ -248,7 +248,7 @@ void instance_trial_of_the_crusader::OnPlayerEnter(Player* pPlayer) void instance_trial_of_the_crusader::SetData(uint32 uiType, uint32 uiData) { - switch(uiType) + switch (uiType) { case TYPE_WIPE_COUNT: if (IsHeroicDifficulty()) @@ -294,7 +294,7 @@ void instance_trial_of_the_crusader::SetData(uint32 uiType, uint32 uiData) } else if (uiData == DONE) { - DoRespawnGameObject(GO_CRUSADERS_CACHE, 60*MINUTE); + DoRespawnGameObject(GO_CRUSADERS_CACHE, 60 * MINUTE); StartNextDialogueText(SAY_VARIAN_PVP_A_WIN); } m_auiEncounter[uiType] = uiData; @@ -338,7 +338,7 @@ void instance_trial_of_the_crusader::SetData(uint32 uiType, uint32 uiData) std::ostringstream saveStream; saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2] << " " - << m_auiEncounter[3] << " " << m_auiEncounter[4] << " " << m_auiEncounter[5]; + << m_auiEncounter[3] << " " << m_auiEncounter[4] << " " << m_auiEncounter[5]; m_strInstData = saveStream.str(); @@ -367,9 +367,9 @@ void instance_trial_of_the_crusader::Load(const char* chrIn) std::istringstream loadStream(chrIn); loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3] - >> m_auiEncounter[4] >> m_auiEncounter[5]; + >> m_auiEncounter[4] >> m_auiEncounter[5]; - for(uint8 i = TYPE_NORTHREND_BEASTS; i < MAX_ENCOUNTER; ++i) + for (uint8 i = TYPE_NORTHREND_BEASTS; i < MAX_ENCOUNTER; ++i) if (m_auiEncounter[i] == IN_PROGRESS) // Do not load an encounter as "In Progress" - reset it instead. m_auiEncounter[i] = NOT_STARTED; @@ -411,19 +411,19 @@ void instance_trial_of_the_crusader::DoHandleEventEpilogue() pPlayer->SummonCreature(NPC_ARGENT_MAGE, aSpawnPositions[13][0], aSpawnPositions[13][1], aSpawnPositions[13][2], aSpawnPositions[13][3], TEMPSUMMON_CORPSE_DESPAWN, 0); - DoRespawnGameObject(GO_PORTAL_DALARAN, 60*MINUTE); + DoRespawnGameObject(GO_PORTAL_DALARAN, 60 * MINUTE); // Spawn the chest for heroic difficulty if (IsHeroicDifficulty()) { if (GetData(TYPE_WIPE_COUNT) == 0) - DoRespawnGameObject(Is25ManDifficulty() ? GO_TRIBUTE_CHEST_25H_50 : GO_TRIBUTE_CHEST_10H_50, 60*MINUTE); + DoRespawnGameObject(Is25ManDifficulty() ? GO_TRIBUTE_CHEST_25H_50 : GO_TRIBUTE_CHEST_10H_50, 60 * MINUTE); else if (GetData(TYPE_WIPE_COUNT) < 5) - DoRespawnGameObject(Is25ManDifficulty() ? GO_TRIBUTE_CHEST_25H_45 : GO_TRIBUTE_CHEST_10H_45, 60*MINUTE); + DoRespawnGameObject(Is25ManDifficulty() ? GO_TRIBUTE_CHEST_25H_45 : GO_TRIBUTE_CHEST_10H_45, 60 * MINUTE); else if (GetData(TYPE_WIPE_COUNT) < 25) - DoRespawnGameObject(Is25ManDifficulty() ? GO_TRIBUTE_CHEST_25H_25 : GO_TRIBUTE_CHEST_10H_25, 60*MINUTE); + DoRespawnGameObject(Is25ManDifficulty() ? GO_TRIBUTE_CHEST_25H_25 : GO_TRIBUTE_CHEST_10H_25, 60 * MINUTE); else - DoRespawnGameObject(Is25ManDifficulty() ? GO_TRIBUTE_CHEST_25H_01 : GO_TRIBUTE_CHEST_10H_01, 60*MINUTE); + DoRespawnGameObject(Is25ManDifficulty() ? GO_TRIBUTE_CHEST_25H_01 : GO_TRIBUTE_CHEST_10H_01, 60 * MINUTE); } } @@ -509,7 +509,7 @@ void instance_trial_of_the_crusader::JustDidDialogueStep(int32 iEntry) if (Creature* pLichKingVisual = GetSingleCreatureFromStorage(NPC_THE_LICHKING_VISUAL)) { pLichKingVisual->CastSpell(pLichKingVisual, SPELL_FROSTNOVA, true); - //pLichKingVisual->CastSpell(pLichKingVisual, SPELL_CORPSE_TELEPORT, true); // NYI + // pLichKingVisual->CastSpell(pLichKingVisual, SPELL_CORPSE_TELEPORT, true); // NYI pLichKingVisual->ForcedDespawn(); } diff --git a/scripts/northrend/dragonblight.cpp b/scripts/northrend/dragonblight.cpp index a7760675f..4292f8515 100644 --- a/scripts/northrend/dragonblight.cpp +++ b/scripts/northrend/dragonblight.cpp @@ -97,7 +97,7 @@ struct MANGOS_DLL_DECL npc_destructive_wardAI : public Scripted_NoMovementAI else m_uiSummonTimer = 0; - switch(m_uiStack) + switch (m_uiStack) { case 0: DoCastSpellIfCan(m_creature, SPELL_SUMMON_SMOLDERING_SKELETON, CAST_TRIGGERED); diff --git a/scripts/northrend/draktharon_keep/boss_novos.cpp b/scripts/northrend/draktharon_keep/boss_novos.cpp index 1975cf7e1..e04b54c17 100644 --- a/scripts/northrend/draktharon_keep/boss_novos.cpp +++ b/scripts/northrend/draktharon_keep/boss_novos.cpp @@ -65,8 +65,8 @@ enum // The Crystal Handlers are summoned around the two entrances of the room static const float aHandlerSummonPos[2][3] = { - {-342.894836f, -727.016846f, 28.581081f}, - {-410.644653f, -731.826904f, 28.580412f} + { -342.894836f, -727.016846f, 28.581081f}, + { -410.644653f, -731.826904f, 28.580412f} }; /*###### @@ -344,7 +344,7 @@ struct MANGOS_DLL_DECL npc_crystal_channel_targetAI : public ScriptedAI // The end of the stairs is approximately at 1/3 of the way between summoning-position and novos, height of Novos if (Creature* pNovos = m_pInstance->GetSingleCreatureFromStorage(NPC_NOVOS)) { - m_creature->GetRandomPoint(0.70*pNovos->GetPositionX() + 0.30*pSummoned->GetPositionX(), 0.70*pNovos->GetPositionY() + 0.30*pSummoned->GetPositionY(), pNovos->GetPositionZ() + 1.5f, 4.0f, fX, fY, fZ); + m_creature->GetRandomPoint(0.70 * pNovos->GetPositionX() + 0.30 * pSummoned->GetPositionX(), 0.70 * pNovos->GetPositionY() + 0.30 * pSummoned->GetPositionY(), pNovos->GetPositionZ() + 1.5f, 4.0f, fX, fY, fZ); pSummoned->GetMotionMaster()->MovePoint(1, fX, fY, fZ); } } diff --git a/scripts/northrend/draktharon_keep/boss_trollgore.cpp b/scripts/northrend/draktharon_keep/boss_trollgore.cpp index 0093a4844..85017f28c 100644 --- a/scripts/northrend/draktharon_keep/boss_trollgore.cpp +++ b/scripts/northrend/draktharon_keep/boss_trollgore.cpp @@ -43,7 +43,7 @@ enum SPELL_SUMMON_INVADER_1 = 49456, // summon 27709 SPELL_SUMMON_INVADER_2 = 49457, // summon 27753 - //SPELL_SUMMON_INVADER_3 = 49458, // summon 27754 + // SPELL_SUMMON_INVADER_3 = 49458, // summon 27754 SPELL_INVADER_TAUNT = 49405, // triggers 49406 MAX_CONSOME_STACKS = 10, @@ -166,7 +166,7 @@ struct MANGOS_DLL_DECL boss_trollgoreAI : public ScriptedAI else { // Summon 3 trolls in the air - for(uint8 i = 0; i < m_vTriggers.size(); ++i) + for (uint8 i = 0; i < m_vTriggers.size(); ++i) { if (Creature* pTrigger = m_creature->GetMap()->GetCreature(m_vTriggers[i])) pTrigger->CastSpell(pTrigger, roll_chance_i(30) ? SPELL_SUMMON_INVADER_1 : SPELL_SUMMON_INVADER_2, true, NULL, NULL, m_creature->GetObjectGuid()); diff --git a/scripts/northrend/draktharon_keep/draktharon_keep.h b/scripts/northrend/draktharon_keep/draktharon_keep.h index c31709167..f4ce5deac 100644 --- a/scripts/northrend/draktharon_keep/draktharon_keep.h +++ b/scripts/northrend/draktharon_keep/draktharon_keep.h @@ -43,7 +43,7 @@ enum }; static const uint32 aCrystalHandlerDeathSpells[MAX_CRYSTALS] = - {SPELL_CRYSTAL_HANDLER_DEATH_1, SPELL_CRYSTAL_HANDLER_DEATH_2, SPELL_CRYSTAL_HANDLER_DEATH_3, SPELL_CRYSTAL_HANDLER_DEATH_4}; +{SPELL_CRYSTAL_HANDLER_DEATH_1, SPELL_CRYSTAL_HANDLER_DEATH_2, SPELL_CRYSTAL_HANDLER_DEATH_3, SPELL_CRYSTAL_HANDLER_DEATH_4}; struct NovosCrystalInfo { diff --git a/scripts/northrend/draktharon_keep/instance_draktharon_keep.cpp b/scripts/northrend/draktharon_keep/instance_draktharon_keep.cpp index 970791df9..943ff32cd 100644 --- a/scripts/northrend/draktharon_keep/instance_draktharon_keep.cpp +++ b/scripts/northrend/draktharon_keep/instance_draktharon_keep.cpp @@ -225,7 +225,7 @@ bool instance_draktharon_keep::CheckAchievementCriteriaMeet(uint32 uiCriteriaId, void instance_draktharon_keep::SetData(uint32 uiType, uint32 uiData) { - switch(uiType) + switch (uiType) { case TYPE_TROLLGORE: if (uiData == IN_PROGRESS) @@ -311,7 +311,7 @@ void instance_draktharon_keep::Load(const char* chrIn) std::istringstream loadStream(chrIn); loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3]; - for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) + for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) { if (m_auiEncounter[i] == IN_PROGRESS) m_auiEncounter[i] = NOT_STARTED; @@ -322,7 +322,7 @@ void instance_draktharon_keep::Load(const char* chrIn) uint32 instance_draktharon_keep::GetData(uint32 uiType) { - switch(uiType) + switch (uiType) { case TYPE_TROLLGORE: return m_auiEncounter[uiType]; case TYPE_NOVOS: return m_auiEncounter[uiType]; diff --git a/scripts/northrend/gundrak/boss_eck.cpp b/scripts/northrend/gundrak/boss_eck.cpp index e35219296..acd94fa12 100644 --- a/scripts/northrend/gundrak/boss_eck.cpp +++ b/scripts/northrend/gundrak/boss_eck.cpp @@ -82,7 +82,7 @@ struct MANGOS_DLL_DECL boss_eckAI : public ScriptedAI } // As the Eck Spite spell has no dummy or similar effect, applying the residue aura has to be done with spellHitTarget - void SpellHitTarget (Unit* pUnit, const SpellEntry* pSpellEntry) + void SpellHitTarget(Unit* pUnit, const SpellEntry* pSpellEntry) { if (pSpellEntry->Id == SPELL_ECK_SPIT && pUnit->GetTypeId() == TYPEID_PLAYER && !pUnit->HasAura(SPELL_ECK_RESIDUE)) pUnit->CastSpell(pUnit, SPELL_ECK_RESIDUE, true); diff --git a/scripts/northrend/gundrak/boss_galdarah.cpp b/scripts/northrend/gundrak/boss_galdarah.cpp index 5469df424..cdd2a5f1e 100644 --- a/scripts/northrend/gundrak/boss_galdarah.cpp +++ b/scripts/northrend/gundrak/boss_galdarah.cpp @@ -107,7 +107,7 @@ struct MANGOS_DLL_DECL boss_galdarahAI : public ScriptedAI void KilledUnit(Unit* pVictim) { - switch(urand(0, 2)) + switch (urand(0, 2)) { case 0: DoScriptText(SAY_SLAY_1, m_creature); break; case 1: DoScriptText(SAY_SLAY_2, m_creature); break; @@ -192,7 +192,7 @@ struct MANGOS_DLL_DECL boss_galdarahAI : public ScriptedAI if (m_uiStampedeTimer < uiDiff) { - switch(urand(0, 2)) + switch (urand(0, 2)) { case 0: DoScriptText(SAY_SUMMON_1, m_creature); break; case 1: DoScriptText(SAY_SUMMON_2, m_creature); break; diff --git a/scripts/northrend/gundrak/boss_moorabi.cpp b/scripts/northrend/gundrak/boss_moorabi.cpp index 339a3d1bd..43dd68cb9 100644 --- a/scripts/northrend/gundrak/boss_moorabi.cpp +++ b/scripts/northrend/gundrak/boss_moorabi.cpp @@ -96,7 +96,7 @@ struct MANGOS_DLL_DECL boss_moorabiAI : public ScriptedAI void KilledUnit(Unit* pVictim) { - switch(urand(0, 2)) + switch (urand(0, 2)) { case 0: DoScriptText(SAY_SLAY_1, m_creature); break; case 1: DoScriptText(SAY_SLAY_2, m_creature); break; diff --git a/scripts/northrend/gundrak/boss_sladran.cpp b/scripts/northrend/gundrak/boss_sladran.cpp index 41d06b5b2..b23e6ccfc 100644 --- a/scripts/northrend/gundrak/boss_sladran.cpp +++ b/scripts/northrend/gundrak/boss_sladran.cpp @@ -132,7 +132,7 @@ struct MANGOS_DLL_DECL boss_sladranAI : public ScriptedAI void KilledUnit(Unit* pVictim) { - switch(urand(0, 2)) + switch (urand(0, 2)) { case 0: DoScriptText(SAY_SLAY_1, m_creature); break; case 1: DoScriptText(SAY_SLAY_2, m_creature); break; @@ -163,7 +163,7 @@ struct MANGOS_DLL_DECL boss_sladranAI : public ScriptedAI return NULL; std::list::iterator iter = lCreatureList.begin(); - advance(iter, urand(0, lCreatureList.size()-1)); + advance(iter, urand(0, lCreatureList.size() - 1)); return *iter; } @@ -176,7 +176,7 @@ struct MANGOS_DLL_DECL boss_sladranAI : public ScriptedAI if (m_uiPoisonNovaTimer < uiDiff) { DoScriptText(EMOTE_NOVA, m_creature); - DoCastSpellIfCan(m_creature->getVictim(),m_bIsRegularMode ? SPELL_POISON_NOVA : SPELL_POISON_NOVA_H); + DoCastSpellIfCan(m_creature->getVictim(), m_bIsRegularMode ? SPELL_POISON_NOVA : SPELL_POISON_NOVA_H); m_uiPoisonNovaTimer = 22000; } else diff --git a/scripts/northrend/gundrak/instance_gundrak.cpp b/scripts/northrend/gundrak/instance_gundrak.cpp index 498229270..3945ea3a1 100644 --- a/scripts/northrend/gundrak/instance_gundrak.cpp +++ b/scripts/northrend/gundrak/instance_gundrak.cpp @@ -31,7 +31,7 @@ bool GOUse_go_gundrak_altar(Player* pPlayer, GameObject* pGo) if (!pInstance) return false; - switch(pGo->GetEntry()) + switch (pGo->GetEntry()) { case GO_ALTAR_OF_SLADRAN: pInstance->SetData(TYPE_SLADRAN, SPECIAL); break; case GO_ALTAR_OF_MOORABI: pInstance->SetData(TYPE_MOORABI, SPECIAL); break; @@ -58,7 +58,7 @@ void instance_gundrak::Initialize() void instance_gundrak::OnCreatureCreate(Creature* pCreature) { - switch(pCreature->GetEntry()) + switch (pCreature->GetEntry()) { case NPC_SLADRAN: case NPC_ELEMENTAL: @@ -93,7 +93,7 @@ void instance_gundrak::OnCreatureCreate(Creature* pCreature) void instance_gundrak::OnObjectCreate(GameObject* pGo) { - switch(pGo->GetEntry()) + switch (pGo->GetEntry()) { case GO_ECK_DOOR: if (m_auiEncounter[TYPE_MOORABI] == DONE && !instance->IsRegularDifficulty()) @@ -125,7 +125,7 @@ void instance_gundrak::OnObjectCreate(GameObject* pGo) case GO_ALTAR_OF_COLOSSUS: if (m_auiEncounter[TYPE_COLOSSUS] == DONE) pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NO_INTERACT); - break; + break; case GO_SNAKE_KEY: case GO_TROLL_KEY: case GO_MAMMOTH_KEY: @@ -153,7 +153,7 @@ void instance_gundrak::Load(const char* chrIn) std::istringstream loadStream(chrIn); loadStream >> m_auiEncounter[TYPE_SLADRAN] >> m_auiEncounter[TYPE_MOORABI] >> m_auiEncounter[TYPE_COLOSSUS] >> m_auiEncounter[TYPE_GALDARAH] >> m_auiEncounter[TYPE_ECK]; - for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) + for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) { if (m_auiEncounter[i] == IN_PROGRESS) m_auiEncounter[i] = NOT_STARTED; @@ -170,7 +170,7 @@ void instance_gundrak::SetData(uint32 uiType, uint32 uiData) { debug_log("SD2: Instance Gundrak: SetData received for type %u with data %u", uiType, uiData); - switch(uiType) + switch (uiType) { case TYPE_SLADRAN: m_auiEncounter[TYPE_SLADRAN] = uiData; @@ -252,7 +252,7 @@ void instance_gundrak::SetData(uint32 uiType, uint32 uiData) std::ostringstream saveStream; saveStream << m_auiEncounter[TYPE_SLADRAN] << " " << m_auiEncounter[TYPE_MOORABI] << " " << m_auiEncounter[TYPE_COLOSSUS] << " " << m_auiEncounter[TYPE_GALDARAH] << " " - << m_auiEncounter[TYPE_ECK]; + << m_auiEncounter[TYPE_ECK]; m_strInstData = saveStream.str(); @@ -278,10 +278,10 @@ bool instance_gundrak::CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player case ACHIEV_CRIT_SHARE_LOVE: // Return true if all the players in the group got stampeled return m_uisShareLoveAchievPlayers.size() == MIN_LOVE_SHARE_PLAYERS; - // ToDo: enable this criteria when the script will be implemented - //case ACHIEV_CRIT_WHY_SNAKES: - // // Return true if not found in the set - // return m_uisWhySnakesAchievPlayers.find(pSource->GetGUIDLow()) == m_uisWhySnakesAchievPlayers.end(); + // ToDo: enable this criteria when the script will be implemented + // case ACHIEV_CRIT_WHY_SNAKES: + // // Return true if not found in the set + // return m_uisWhySnakesAchievPlayers.find(pSource->GetGUIDLow()) == m_uisWhySnakesAchievPlayers.end(); default: return false; @@ -427,7 +427,7 @@ void instance_gundrak::Update(uint32 uiDiff) { // Activate Bridge (and all other Keys) if we are on the last Key, and all other keys are already set if (m_auiEncounter[0] == SPECIAL && m_auiEncounter[1] == SPECIAL && m_auiEncounter[2] == SPECIAL - && m_mAltarInProgress.empty() && m_mBeamInProgress.empty() && m_mKeyInProgress.size() == 1) + && m_mAltarInProgress.empty() && m_mBeamInProgress.empty() && m_mKeyInProgress.size() == 1) { DoUseDoorOrButton(GO_COLLISION); DoUseDoorOrButton(GO_RHINO_KEY, 0, true); diff --git a/scripts/northrend/howling_fjord.cpp b/scripts/northrend/howling_fjord.cpp index 3a9c994d0..94e28dde5 100644 --- a/scripts/northrend/howling_fjord.cpp +++ b/scripts/northrend/howling_fjord.cpp @@ -85,7 +85,7 @@ struct MANGOS_DLL_DECL npc_ancient_male_vrykulAI : public ScriptedAI Creature* pFemale = GetClosestCreatureWithEntry(m_creature, NPC_FEMALE_VRYKUL, 10.0f); - switch(m_uiPhase) + switch (m_uiPhase) { case 0: DoScriptText(SAY_VRYKUL_CURSED, m_creature); @@ -127,7 +127,7 @@ CreatureAI* GetAI_npc_ancient_male_vrykul(Creature* pCreature) bool AreaTrigger_at_ancient_male_vrykul(Player* pPlayer, AreaTriggerEntry const* pAt) { if (pPlayer->isAlive() && pPlayer->GetQuestStatus(QUEST_ECHO_OF_YMIRON) == QUEST_STATUS_INCOMPLETE && - pPlayer->HasAura(SPELL_ECHO_OF_YMIRON)) + pPlayer->HasAura(SPELL_ECHO_OF_YMIRON)) { if (Creature* pCreature = GetClosestCreatureWithEntry(pPlayer, NPC_MALE_VRYKUL, 20.0f)) { @@ -201,7 +201,7 @@ struct MANGOS_DLL_DECL npc_daegarnAI : public ScriptedAI void SummonGladiator(uint32 uiEntry) { - m_creature->SummonCreature(uiEntry, afSummon[0], afSummon[1], afSummon[2], 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 20*IN_MILLISECONDS); + m_creature->SummonCreature(uiEntry, afSummon[0], afSummon[1], afSummon[2], 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 20 * IN_MILLISECONDS); } void SummonedMovementInform(Creature* pSummoned, uint32 uiMotionType, uint32 uiPointId) @@ -224,7 +224,7 @@ struct MANGOS_DLL_DECL npc_daegarnAI : public ScriptedAI uint32 uiEntry = 0; // will eventually reset the event if something goes wrong - switch(pSummoned->GetEntry()) + switch (pSummoned->GetEntry()) { case NPC_FIRJUS: uiEntry = NPC_JLARBORN; break; case NPC_JLARBORN: uiEntry = NPC_YOROS; break; @@ -287,10 +287,10 @@ struct MANGOS_DLL_DECL npc_silvermoon_harryAI : public ScriptedAI m_bHarryBeaten = false; // timers guessed - m_uiScorchTimer = 5*IN_MILLISECONDS; - m_uiBlastWaveTimer = 7*IN_MILLISECONDS; + m_uiScorchTimer = 5 * IN_MILLISECONDS; + m_uiBlastWaveTimer = 7 * IN_MILLISECONDS; - m_uiResetBeatenTimer = MINUTE*IN_MILLISECONDS; + m_uiResetBeatenTimer = MINUTE * IN_MILLISECONDS; if (m_creature->getFaction() != m_creature->GetCreatureInfo()->faction_A) m_creature->setFaction(m_creature->GetCreatureInfo()->faction_A); @@ -307,7 +307,7 @@ struct MANGOS_DLL_DECL npc_silvermoon_harryAI : public ScriptedAI void DamageTaken(Unit* pDoneBy, uint32& uiDamage) { - if (uiDamage > m_creature->GetHealth() || (m_creature->GetHealth() - uiDamage)*100 / m_creature->GetMaxHealth() < 20) + if (uiDamage > m_creature->GetHealth() || (m_creature->GetHealth() - uiDamage) * 100 / m_creature->GetMaxHealth() < 20) { if (Player* pPlayer = pDoneBy->GetCharmerOrOwnerPlayerOrPlayerItself()) { @@ -341,7 +341,7 @@ struct MANGOS_DLL_DECL npc_silvermoon_harryAI : public ScriptedAI if (m_uiResetBeatenTimer < uiDiff) EnterEvadeMode(); else - m_uiResetBeatenTimer-= uiDiff; + m_uiResetBeatenTimer -= uiDiff; } if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) @@ -350,7 +350,7 @@ struct MANGOS_DLL_DECL npc_silvermoon_harryAI : public ScriptedAI if (m_uiScorchTimer < uiDiff) { DoCastSpellIfCan(m_creature->getVictim(), SPELL_SCORCH); - m_uiScorchTimer = 10*IN_MILLISECONDS; + m_uiScorchTimer = 10 * IN_MILLISECONDS; } else m_uiScorchTimer -= uiDiff; @@ -358,7 +358,7 @@ struct MANGOS_DLL_DECL npc_silvermoon_harryAI : public ScriptedAI if (m_uiBlastWaveTimer < uiDiff) { DoCastSpellIfCan(m_creature, SPELL_BLAST_WAVE); - m_uiBlastWaveTimer = 50*IN_MILLISECONDS; + m_uiBlastWaveTimer = 50 * IN_MILLISECONDS; } else m_uiBlastWaveTimer -= uiDiff; @@ -398,7 +398,7 @@ bool GossipHello_npc_silvermoon_harry(Player* pPlayer, Creature* pCreature) bool GossipSelect_npc_silvermoon_harry(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) { - switch(uiAction) + switch (uiAction) { case GOSSIP_ACTION_TRADE: pPlayer->SEND_VENDORLIST(pCreature->GetObjectGuid()); diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_devourer_of_souls.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_devourer_of_souls.cpp index d739338b4..ebcacd10d 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_devourer_of_souls.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_devourer_of_souls.cpp @@ -74,12 +74,12 @@ enum static const int aTexts[6][3] = { - {SAY_MALE_1_AGGRO, SAY_FEMALE_AGGRO, 0}, // 0 - aggro + {SAY_MALE_1_AGGRO, SAY_FEMALE_AGGRO, 0}, // 0 - aggro {SAY_MALE_1_SLAY_1, SAY_FEMALE_SLAY_1, SAY_MALE_2_SLAY_1}, // 1 - slay1 {SAY_MALE_1_SLAY_2, SAY_FEMALE_SLAY_2, SAY_MALE_2_SLAY_2}, // 2 - slay2 {SAY_MALE_1_DEATH, SAY_FEMALE_DEATH, SAY_MALE_2_DEATH}, // 3 - death {SAY_MALE_1_SOUL_ATTACK, SAY_FEMALE_SOUL_ATTACK, SAY_MALE_2_SOUL_ATTACK}, // 4 - unleashing soul - {SAY_MALE_1_DARK_GLARE, SAY_FEMALE_DARK_GLARE, 0} // 5 - glare + {SAY_MALE_1_DARK_GLARE, SAY_FEMALE_DARK_GLARE, 0} // 5 - glare }; struct MANGOS_DLL_DECL boss_devourer_of_soulsAI : public ScriptedAI @@ -171,8 +171,8 @@ struct MANGOS_DLL_DECL boss_devourer_of_soulsAI : public ScriptedAI m_lWellGuids.push_back(pSummoned->GetObjectGuid()); pSummoned->CastSpell(pSummoned, SPELL_WELL_OF_SOULS_TRIGGER, true, NULL, NULL, m_creature->GetObjectGuid()); // Commented as of not stacking auras - //pSummoned->CastSpell(pSummoned, SPELL_WELL_OF_SOULS_VISUAL1, true); - //pSummoned->CastSpell(pSummoned, SPELL_WELL_OF_SOULS_VISUAL2, true); + // pSummoned->CastSpell(pSummoned, SPELL_WELL_OF_SOULS_VISUAL1, true); + // pSummoned->CastSpell(pSummoned, SPELL_WELL_OF_SOULS_VISUAL2, true); } else if (pSummoned->GetEntry() == NPC_UNLEASHED_SOUL) { @@ -190,13 +190,13 @@ struct MANGOS_DLL_DECL boss_devourer_of_soulsAI : public ScriptedAI { switch (pSpellEntry->Id) { - // If we hit a target with phantom blast, the achievement_criteria is failed + // If we hit a target with phantom blast, the achievement_criteria is failed case SPELL_PHANTOM_BLAST: case SPELL_PHANTOM_BLAST_H: if (m_pInstance) m_pInstance->SetData(TYPE_ACHIEV_PHANTOM_BLAST, FAIL); break; - // Might be placed somewhere else better, important is to note that this text is said after the 3s cast time + // Might be placed somewhere else better, important is to note that this text is said after the 3s cast time case SPELL_WAILING_SOULS: DoScriptText(aTexts[5][m_uiFace], m_creature); break; @@ -250,11 +250,11 @@ struct MANGOS_DLL_DECL boss_devourer_of_soulsAI : public ScriptedAI // Phantom Blast if (m_uiPhantomBlastTimer < uiDiff) { - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) - { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { if (DoCastSpellIfCan(pTarget, m_bIsRegularMode ? SPELL_PHANTOM_BLAST : SPELL_PHANTOM_BLAST_H) == CAST_OK) m_uiPhantomBlastTimer = urand(5000, 10000); // TODO - } + } } else m_uiPhantomBlastTimer -= uiDiff; diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/instance_forge_of_souls.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/instance_forge_of_souls.cpp index 83283935e..bc34d0bcd 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/instance_forge_of_souls.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/instance_forge_of_souls.cpp @@ -70,7 +70,7 @@ void instance_forge_of_souls::ProcessEventNpcs(Player* pPlayer, bool bChanged) for (uint8 i = 0; i < countof(aEventBeginLocations); ++i) { if (Creature* pSummon = pPlayer->SummonCreature(m_uiTeam == HORDE ? aEventBeginLocations[i].uiEntryHorde : aEventBeginLocations[i].uiEntryAlliance, - aEventBeginLocations[i].fSpawnX, aEventBeginLocations[i].fSpawnY, aEventBeginLocations[i].fSpawnZ, aEventBeginLocations[i].fSpawnO, TEMPSUMMON_DEAD_DESPAWN, 24*HOUR*IN_MILLISECONDS)) + aEventBeginLocations[i].fSpawnX, aEventBeginLocations[i].fSpawnY, aEventBeginLocations[i].fSpawnZ, aEventBeginLocations[i].fSpawnO, TEMPSUMMON_DEAD_DESPAWN, 24 * HOUR * IN_MILLISECONDS)) m_lEventMobGUIDs.push_back(pSummon->GetObjectGuid()); } } @@ -88,17 +88,18 @@ void instance_forge_of_souls::ProcessEventNpcs(Player* pPlayer, bool bChanged) for (uint8 i = 0; i < countof(aEventEndLocations); ++i) { pPlayer->SummonCreature(m_uiTeam == HORDE ? aEventEndLocations[i].uiEntryHorde : aEventEndLocations[i].uiEntryAlliance, - aEventEndLocations[i].fSpawnX, aEventEndLocations[i].fSpawnY, aEventEndLocations[i].fSpawnZ, aEventEndLocations[i].fStartO, TEMPSUMMON_DEAD_DESPAWN, 24*HOUR*IN_MILLISECONDS); + aEventEndLocations[i].fSpawnX, aEventEndLocations[i].fSpawnY, aEventEndLocations[i].fSpawnZ, aEventEndLocations[i].fStartO, TEMPSUMMON_DEAD_DESPAWN, 24 * HOUR * IN_MILLISECONDS); // TODO: Let the NPCs Move along their paths } } else - { // Summon at end, without event + { + // Summon at end, without event for (uint8 i = 0; i < countof(aEventEndLocations); ++i) { pPlayer->SummonCreature(m_uiTeam == HORDE ? aEventEndLocations[i].uiEntryHorde : aEventEndLocations[i].uiEntryAlliance, - aEventEndLocations[i].fEndX, aEventEndLocations[i].fEndY, aEventEndLocations[i].fEndZ, aEventEndLocations[i].fEndO, TEMPSUMMON_DEAD_DESPAWN, 24*HOUR*IN_MILLISECONDS); + aEventEndLocations[i].fEndX, aEventEndLocations[i].fEndY, aEventEndLocations[i].fEndZ, aEventEndLocations[i].fEndO, TEMPSUMMON_DEAD_DESPAWN, 24 * HOUR * IN_MILLISECONDS); } } } @@ -119,7 +120,7 @@ bool instance_forge_of_souls::CheckAchievementCriteriaMeet(uint32 uiCriteriaId, void instance_forge_of_souls::SetData(uint32 uiType, uint32 uiData) { - switch(uiType) + switch (uiType) { case TYPE_BRONJAHM: m_auiEncounter[0] = uiData; @@ -169,7 +170,7 @@ void instance_forge_of_souls::Load(const char* chrIn) std::istringstream loadStream(chrIn); loadStream >> m_auiEncounter[0] >> m_auiEncounter[1]; - for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) + for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) { if (m_auiEncounter[i] == IN_PROGRESS) m_auiEncounter[i] = NOT_STARTED; @@ -180,7 +181,7 @@ void instance_forge_of_souls::Load(const char* chrIn) uint32 instance_forge_of_souls::GetData(uint32 uiType) { - switch(uiType) + switch (uiType) { case TYPE_BRONJAHM: return m_auiEncounter[0]; diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/instance_pit_of_saron.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/instance_pit_of_saron.cpp index 7a9ae4b48..ccafa7ddb 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/instance_pit_of_saron.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/instance_pit_of_saron.cpp @@ -29,14 +29,14 @@ instance_pit_of_saron::instance_pit_of_saron(Map* pMap) : ScriptedInstance(pMap) Initialize(); } - void instance_pit_of_saron::Initialize() +void instance_pit_of_saron::Initialize() { memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); } void instance_pit_of_saron::OnCreatureCreate(Creature* pCreature) { - switch(pCreature->GetEntry()) + switch (pCreature->GetEntry()) { case NPC_TYRANNUS_INTRO: case NPC_GARFROST: @@ -51,7 +51,7 @@ void instance_pit_of_saron::OnCreatureCreate(Creature* pCreature) void instance_pit_of_saron::OnObjectCreate(GameObject* pGo) { - switch(pGo->GetEntry()) + switch (pGo->GetEntry()) { case GO_ICEWALL: if (m_auiEncounter[TYPE_GARFROST] == DONE && m_auiEncounter[TYPE_KRICK] == DONE) @@ -68,7 +68,7 @@ void instance_pit_of_saron::OnObjectCreate(GameObject* pGo) void instance_pit_of_saron::SetData(uint32 uiType, uint32 uiData) { - switch(uiType) + switch (uiType) { case TYPE_GARFROST: if (uiData == DONE && m_auiEncounter[TYPE_KRICK] == DONE) @@ -114,7 +114,7 @@ void instance_pit_of_saron::Load(const char* chrIn) std::istringstream loadStream(chrIn); loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2]; - for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) + for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) { if (m_auiEncounter[i] == IN_PROGRESS) m_auiEncounter[i] = NOT_STARTED; diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/blood_prince_council.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/blood_prince_council.cpp index 8ac157f0a..6aa900a31 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/blood_prince_council.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/blood_prince_council.cpp @@ -76,8 +76,8 @@ enum NPC_KINETIC_BOMB_TARGET = 38458, // shock vortex spells - in eventAI - //SPELL_SHOCK_VORTEX_AURA = 71945, - //SPELL_SHOCK_VORTEX_VISUAL = 72633, + // SPELL_SHOCK_VORTEX_AURA = 71945, + // SPELL_SHOCK_VORTEX_VISUAL = 72633, // kinetic bomb spells SPELL_KINETIC_BOMB_DMG = 72052, @@ -90,7 +90,7 @@ enum SPELL_SHADOW_LANCE = 71405, SPELL_EMP_SHADOW_LANCE = 71815, SPELL_SHADOW_RESONANCE = 71943, // summons 38369 - //SPELL_SHADOW_PRISON = 73001, // on heroic - not sure how to use + // SPELL_SHADOW_PRISON = 73001, // on heroic - not sure how to use // dark nucleus spells SPELL_SHADOW_RESONANCE_AURA = 71911, // purpose unk - maybe range check @@ -154,7 +154,7 @@ struct MANGOS_DLL_DECL npc_queen_lanathel_introAI : public ScriptedAI, private D { // The range distance is not sure if (!m_bEventStarted && pWho->GetTypeId() == TYPEID_PLAYER && !((Player*)pWho)->isGameMaster() && - pWho->IsWithinDistInMap(m_creature, 100.0f) && pWho->IsWithinLOSInMap(m_creature)) + pWho->IsWithinDistInMap(m_creature, 100.0f) && pWho->IsWithinLOSInMap(m_creature)) { StartNextDialogueText(SAY_COUNCIL_INTRO_1); m_bEventStarted = true; @@ -256,7 +256,7 @@ struct MANGOS_DLL_DECL npc_ball_of_flameAI : public ScriptedAI void MoveInLineOfSight(Unit* pWho) { if (!m_bHasFlamesCasted && pWho->GetTypeId() == TYPEID_PLAYER && pWho->GetGUIDLow() == m_uiTargetGuidLow && - pWho->IsWithinDist(m_creature, ATTACK_DISTANCE)) + pWho->IsWithinDist(m_creature, ATTACK_DISTANCE)) { if (DoCastSpellIfCan(m_creature, SPELL_FLAMES) == CAST_OK) { @@ -274,7 +274,7 @@ struct MANGOS_DLL_DECL npc_ball_of_flameAI : public ScriptedAI CreatureAI* GetAI_npc_ball_of_flame(Creature* pCreature) { - return new npc_ball_of_flameAI (pCreature); + return new npc_ball_of_flameAI(pCreature); }; /*###### @@ -291,7 +291,7 @@ struct MANGOS_DLL_DECL npc_kinetic_bombAI : public ScriptedAI DoCastSpellIfCan(m_creature, SPELL_KINETIC_BOMB_VISUAL, CAST_TRIGGERED); } - void DamageTaken(Unit* pDealer, uint32 &uiDamage) + void DamageTaken(Unit* pDealer, uint32& uiDamage) { // Note: this npc shouldn't take any damage - however this has an issue in the core, because the Unstanble spell doesn't proc on 0 damage uiDamage = 0; @@ -315,7 +315,7 @@ struct MANGOS_DLL_DECL npc_kinetic_bombAI : public ScriptedAI CreatureAI* GetAI_npc_kinetic_bomb(Creature* pCreature) { - return new npc_kinetic_bombAI (pCreature); + return new npc_kinetic_bombAI(pCreature); }; /*###### @@ -347,7 +347,7 @@ struct MANGOS_DLL_DECL npc_dark_nucleusAI : public ScriptedAI } } - void DamageTaken(Unit *pDealer, uint32 &uiDamage) + void DamageTaken(Unit* pDealer, uint32& uiDamage) { if (m_creature->getVictim() && pDealer != m_creature->getVictim()) { @@ -376,7 +376,7 @@ struct MANGOS_DLL_DECL npc_dark_nucleusAI : public ScriptedAI CreatureAI* GetAI_npc_dark_nucleus(Creature* pCreature) { - return new npc_dark_nucleusAI (pCreature); + return new npc_dark_nucleusAI(pCreature); }; /*###### @@ -503,7 +503,7 @@ struct MANGOS_DLL_DECL blood_prince_council_baseAI : public ScriptedAI m_bIsSaidSpecial = false; m_uiEmpowermentTimer = 0; m_uiSphereTimer = urand(5000, 15000); - m_uiBerserkTimer = 10*MINUTE*IN_MILLISECONDS; + m_uiBerserkTimer = 10 * MINUTE * IN_MILLISECONDS; } void EnterEvadeMode() @@ -518,7 +518,7 @@ struct MANGOS_DLL_DECL blood_prince_council_baseAI : public ScriptedAI ScriptedAI::EnterEvadeMode(); } - void DamageTaken(Unit* pDealer, uint32 &uiDamage) + void DamageTaken(Unit* pDealer, uint32& uiDamage) { // Damage is shared by the Blood Orb Control npc if (!m_uiEmpowermentTimer) diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_blood_queen_lanathel.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_blood_queen_lanathel.cpp index fd26e0124..792640867 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_blood_queen_lanathel.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_blood_queen_lanathel.cpp @@ -57,7 +57,7 @@ enum SPELL_BLOODBOLT_WHIRL = 71772, // others - //NPC_SWARMING_SHADOWS = 38163, // has aura 71267 (or 71277?) + // NPC_SWARMING_SHADOWS = 38163, // has aura 71267 (or 71277?) // encounter phases PHASE_GROUND = 1, @@ -100,9 +100,9 @@ struct MANGOS_DLL_DECL boss_blood_queen_lanathelAI : public ScriptedAI void Reset() { m_uiPhase = PHASE_GROUND; - m_uiPhaseTimer = 120000; // 2 min + m_uiPhaseTimer = 120000; // 2 min - m_uiEnrageTimer = 330000; // 5 min and 30 secs + m_uiEnrageTimer = 330000; // 5 min and 30 secs m_uiBloodMirrorTimer = 0; m_uiDeliriousSlashTimer = 20000; m_uiVampiricBiteTimer = 15000; @@ -328,7 +328,7 @@ CreatureAI* GetAI_boss_blood_queen_lanathel(Creature* pCreature) void AddSC_boss_blood_queen_lanathel() { - Script *pNewScript; + Script* pNewScript; pNewScript = new Script; pNewScript->Name = "boss_blood_queen_lanathel"; diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp index 09be435a8..fc2419078 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp @@ -73,19 +73,19 @@ enum SAY_OUTRO_HORDE_4 = -1631069, // intro event related - //SPELL_GRIP_OF_AGONY = 70572, - //SPELL_VEHICLE_HARDCODED = 46598, + // SPELL_GRIP_OF_AGONY = 70572, + // SPELL_VEHICLE_HARDCODED = 46598, // combat spells SPELL_BLOOD_POWER = 72371, - //SPELL_BLOOD_POWER_SCALE = 72370, // included in creature_template_addon - //SPELL_ZERO_POWER = 72242, // included in creature_template_addon + // SPELL_BLOOD_POWER_SCALE = 72370, // included in creature_template_addon + // SPELL_ZERO_POWER = 72242, // included in creature_template_addon - //SPELL_MARK_FALLEN_DAMAGE = 72256, // procs on Saurfang melee attack - 72255 - included in creature_template_addon + // SPELL_MARK_FALLEN_DAMAGE = 72256, // procs on Saurfang melee attack - 72255 - included in creature_template_addon SPELL_MARK_FALLEN_CHAMPION = 72293, // procs on target death - 72260 SPELL_REMOVE_MARKS = 72257, - //SPELL_RUNE_OF_BLOOD_PROC = 72408, // procs on Saurfang mele attack - 72409 - included in creature_template_addon + // SPELL_RUNE_OF_BLOOD_PROC = 72408, // procs on Saurfang mele attack - 72409 - included in creature_template_addon SPELL_RUNE_OF_BLOOD = 72410, SPELL_BLOOD_NOVA = 72378, @@ -111,7 +111,7 @@ enum POINT_ID_EVADE = 2, }; -static const float fIntroPosition[4] = {-491.30f, 2211.35f, 541.11f, 3.16f}; +static const float fIntroPosition[4] = { -491.30f, 2211.35f, 541.11f, 3.16f}; struct MANGOS_DLL_DECL boss_deathbringer_saurfangAI : public ScriptedAI { @@ -144,10 +144,10 @@ struct MANGOS_DLL_DECL boss_deathbringer_saurfangAI : public ScriptedAI m_uiBloodNovaTimer = 20000; m_uiBloodBeastsTimer = 40000; m_uiScentOfBloodTimer = 47000; - m_uiBerserkTimer = 8*MINUTE*IN_MILLISECONDS; + m_uiBerserkTimer = 8 * MINUTE * IN_MILLISECONDS; if (m_pInstance && m_pInstance->IsHeroicDifficulty()) - m_uiBerserkTimer = 6*MINUTE*IN_MILLISECONDS; + m_uiBerserkTimer = 6 * MINUTE * IN_MILLISECONDS; m_bIsFrenzied = false; @@ -163,7 +163,7 @@ struct MANGOS_DLL_DECL boss_deathbringer_saurfangAI : public ScriptedAI m_pInstance->SetData(TYPE_DEATHBRINGER_SAURFANG, IN_PROGRESS); } - void MoveInLineOfSight(Unit *pWho) + void MoveInLineOfSight(Unit* pWho) { if (!m_bIsIntroDone && pWho->GetTypeId() == TYPEID_PLAYER && !((Player*)pWho)->isGameMaster() && m_creature->GetDistance2d(pWho) < 50.0f) { diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_festergut.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_festergut.cpp index be103e3f8..03d11420b 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_festergut.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_festergut.cpp @@ -79,13 +79,13 @@ enum struct MANGOS_DLL_DECL boss_festergutAI : public ScriptedAI { - boss_festergutAI(Creature *pCreature) : ScriptedAI(pCreature) + boss_festergutAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (instance_icecrown_citadel*)pCreature->GetMap()->GetInstanceData(); Reset(); } - instance_icecrown_citadel *m_pInstance; + instance_icecrown_citadel* m_pInstance; uint32 m_uiBerserkTimer; uint32 m_uiGastricBloatTimer; @@ -102,10 +102,10 @@ struct MANGOS_DLL_DECL boss_festergutAI : public ScriptedAI m_uiVileGasTimer = 10000; } - void Aggro(Unit *pWho) + void Aggro(Unit* pWho) { DoScriptText(SAY_AGGRO, m_creature); - + DoCastSpellIfCan(m_creature, SPELL_GASTRIC_BLOAT, CAST_TRIGGERED); // not working as intended currently DoCastSpellIfCan(m_creature, SPELL_GASEOUS_BLIGHT_1, CAST_TRIGGERED); // DoT aura DoCastSpellIfCan(m_creature, SPELL_GASEUS_BLIGHT_DUMMY, CAST_TRIGGERED); // visual cast on dummy npc @@ -114,7 +114,7 @@ struct MANGOS_DLL_DECL boss_festergutAI : public ScriptedAI m_pInstance->SetData(TYPE_FESTERGUT, IN_PROGRESS); } - void KilledUnit(Unit *pVictim) + void KilledUnit(Unit* pVictim) { DoScriptText(urand(0, 1) ? SAY_SLAY_1 : SAY_SLAY_2, m_creature); } @@ -127,7 +127,7 @@ struct MANGOS_DLL_DECL boss_festergutAI : public ScriptedAI DoCastSpellIfCan(m_creature, SPELL_REMOVE_INOCULENT, CAST_TRIGGERED); } - void JustDied(Unit *pKiller) + void JustDied(Unit* pKiller) { if (m_pInstance) m_pInstance->SetData(TYPE_FESTERGUT, DONE); @@ -175,7 +175,7 @@ struct MANGOS_DLL_DECL boss_festergutAI : public ScriptedAI { if (m_pInstance) { - if (Creature *pProfessor = m_pInstance->GetSingleCreatureFromStorage(NPC_PROFESSOR_PUTRICIDE)) + if (Creature* pProfessor = m_pInstance->GetSingleCreatureFromStorage(NPC_PROFESSOR_PUTRICIDE)) DoScriptText(SAY_BLIGHT, pProfessor); } m_uiInhaleBlightTimer = 30000; @@ -219,7 +219,7 @@ CreatureAI* GetAI_boss_festergut(Creature* pCreature) void AddSC_boss_festergut() { - Script *pNewScript; + Script* pNewScript; pNewScript = new Script; pNewScript->Name = "boss_festergut"; diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lady_deathwhisper.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lady_deathwhisper.cpp index 7d659c4f0..710faaac3 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lady_deathwhisper.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lady_deathwhisper.cpp @@ -56,8 +56,8 @@ enum SPELL_DARK_EMPOWERMENT = 70896, // dummy - triggers 70901 - only on Adherents - transforms target into 38136 SPELL_DARK_TRANSFORMATION = 70895, // dummy - triggers 70900 - only on Fanatics - transforms target into 38135 SPELL_DARK_MARTYRDOM = 70897, // dummy - triggers 70903 on Adherents or 71236 on Fanatics - //SPELL_SUMMON_ADHERENT = 70820, // cast by the stalkers - only server side - //SPELL_SUMMON_FANATIC = 70819, // cast by the stalkers - only server side + // SPELL_SUMMON_ADHERENT = 70820, // cast by the stalkers - only server side + // SPELL_SUMMON_FANATIC = 70819, // cast by the stalkers - only server side // npcs NPC_CULT_ADHERENT = 37949, @@ -104,7 +104,7 @@ struct MANGOS_DLL_DECL boss_lady_deathwhisperAI : public ScriptedAI { m_bIsPhaseOne = true; m_bIsLeftSideSummon = roll_chance_i(50) ? true : false; - m_uiBerserkTimer = 10*MINUTE*IN_MILLISECONDS; + m_uiBerserkTimer = 10 * MINUTE * IN_MILLISECONDS; m_uiSummonWaveTimer = 10000; m_uiCultistBuffTimer = 0; m_uiDarkMartyrdomTimer = 30000; @@ -190,7 +190,7 @@ struct MANGOS_DLL_DECL boss_lady_deathwhisperAI : public ScriptedAI } // Wrapper to help sort the summoning stalkers - void DoSortSummoningStalkers(GuidList &lDeathwhisperStalkers) + void DoSortSummoningStalkers(GuidList& lDeathwhisperStalkers) { std::list lRightStalkers; std::list lLeftStalkers; @@ -247,7 +247,7 @@ struct MANGOS_DLL_DECL boss_lady_deathwhisperAI : public ScriptedAI if (vCultists.empty()) return NULL; - return vCultists[urand(0, vCultists.size()-1)]; + return vCultists[urand(0, vCultists.size() - 1)]; } // Wrapper to handle the adds summmoning @@ -358,7 +358,7 @@ struct MANGOS_DLL_DECL boss_lady_deathwhisperAI : public ScriptedAI DoSummonCultistWave(); m_uiCultistBuffTimer = 10000; m_uiDarkMartyrdomTimer = 40000; - m_uiSummonWaveTimer = m_pInstance->IsHeroicDifficulty() ? 45000: 60000; + m_uiSummonWaveTimer = m_pInstance->IsHeroicDifficulty() ? 45000 : 60000; } else m_uiSummonWaveTimer -= uiDiff; @@ -471,7 +471,7 @@ CreatureAI* GetAI_boss_lady_deathwhisper(Creature* pCreature) bool EffectDummyCreature_spell_mana_barrier(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) { - //always check spellid and effectindex + // always check spellid and effectindex if (uiSpellId == SPELL_MANA_BARRIER && uiEffIndex == EFFECT_INDEX_0) { uint32 uiDamage = pCreatureTarget->GetMaxHealth() - pCreatureTarget->GetHealth(); @@ -490,7 +490,7 @@ bool EffectDummyCreature_spell_mana_barrier(Unit* pCaster, uint32 uiSpellId, Spe pCreatureTarget->DealHeal(pCreatureTarget, uiDamage, GetSpellStore()->LookupEntry(SPELL_MANA_BARRIER)); pCreatureTarget->ModifyPower(POWER_MANA, -int32(uiDamage)); - //always return true when we are handling this spell and effect + // always return true when we are handling this spell and effect return true; } diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp index 6a87672a9..38dfb0a2b 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp @@ -92,7 +92,7 @@ struct MANGOS_DLL_DECL boss_lord_marrowgarAI : public ScriptedAI m_uiPhase = PHASE_NORMAL; m_uiChargesCount = 0; - m_uiBerserkTimer = 10*MINUTE*IN_MILLISECONDS; + m_uiBerserkTimer = 10 * MINUTE * IN_MILLISECONDS; m_uiBoneSliceTimer = 1000; m_uiColdflameTimer = 5000; m_uiBoneSpikeTimer = 15000; @@ -246,7 +246,7 @@ struct MANGOS_DLL_DECL boss_lord_marrowgarAI : public ScriptedAI else m_uiPhase = PHASE_BONE_STORM_CHARGE; - m_uiBoneStormColdflameTimer = 1000; + m_uiBoneStormColdflameTimer = 1000; } } else diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_professor_putricide.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_professor_putricide.cpp index 0c5fbbfa1..5ab7663e9 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_professor_putricide.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_professor_putricide.cpp @@ -71,8 +71,8 @@ enum SPELL_SLIME_PUDDLE = 70341, SPELL_SLIME_PUDDLE_SUMMON = 70342, SPELL_SLIME_PUDDLE_AURA = 70343, - // SPELL_SLIME_PUDDLE_TRIGGER = 71424, // trigger summon spell from target? - // SPELL_SLIME_PUDDLE_SUMMON_TRIG = 71425, +// SPELL_SLIME_PUDDLE_TRIGGER = 71424, // trigger summon spell from target? +// SPELL_SLIME_PUDDLE_SUMMON_TRIG = 71425, SPELL_GROW_STACKER = 70345, SPELL_GROW_STACKER_GROW_AURA = 70347, @@ -168,7 +168,7 @@ struct MANGOS_DLL_DECL boss_professor_putricideAI : public ScriptedAI DoScriptText(SAY_AGGRO, m_creature); } - void JustDied(Unit *pKiller) + void JustDied(Unit* pKiller) { if (m_pInstance) m_pInstance->SetData(TYPE_PROFESSOR_PUTRICIDE, DONE); @@ -203,7 +203,7 @@ struct MANGOS_DLL_DECL boss_professor_putricideAI : public ScriptedAI m_uiTransitionTimer = 15000; } - m_uiPhase = PHASE_TRANSITION_ONE; // waiting for entering phase 2 + m_uiPhase = PHASE_TRANSITION_ONE; // waiting for entering phase 2 } else if (m_uiPhase == PHASE_RUNNING_TWO) { @@ -219,7 +219,7 @@ struct MANGOS_DLL_DECL boss_professor_putricideAI : public ScriptedAI m_uiTransitionTimer = 15000; } - m_uiPhase = PHASE_TRANSITION_TWO; // waiting for entering phase 3 + m_uiPhase = PHASE_TRANSITION_TWO; // waiting for entering phase 3 } } } @@ -244,7 +244,7 @@ struct MANGOS_DLL_DECL boss_professor_putricideAI : public ScriptedAI m_uiEnrageTimer -= uiDiff; } - switch(m_uiPhase) + switch (m_uiPhase) { case PHASE_ONE: { @@ -274,7 +274,7 @@ struct MANGOS_DLL_DECL boss_professor_putricideAI : public ScriptedAI { if (m_uiUnboundPlagueTimer <= uiDiff) { - if (Unit *pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1, SPELL_UNBOUND_PLAGUE, SELECT_FLAG_PLAYER)) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1, SPELL_UNBOUND_PLAGUE, SELECT_FLAG_PLAYER)) { if (DoCastSpellIfCan(pTarget, SPELL_UNBOUND_PLAGUE) == CAST_OK) m_uiUnboundPlagueTimer = 70000; @@ -289,7 +289,7 @@ struct MANGOS_DLL_DECL boss_professor_putricideAI : public ScriptedAI { for (int i = 0; i < 2; ++i) { - if (Unit *pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0, SPELL_SLIME_PUDDLE_SUMMON, SELECT_FLAG_PLAYER)) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0, SPELL_SLIME_PUDDLE_SUMMON, SELECT_FLAG_PLAYER)) DoCastSpellIfCan(pTarget, SPELL_SLIME_PUDDLE, CAST_TRIGGERED); } m_uiPuddleTimer = 30000; @@ -361,7 +361,7 @@ struct MANGOS_DLL_DECL boss_professor_putricideAI : public ScriptedAI { if (m_uiUnboundPlagueTimer <= uiDiff) { - if (Unit *pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1, SPELL_UNBOUND_PLAGUE, SELECT_FLAG_PLAYER)) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1, SPELL_UNBOUND_PLAGUE, SELECT_FLAG_PLAYER)) { if (DoCastSpellIfCan(pTarget, SPELL_UNBOUND_PLAGUE) == CAST_OK) m_uiUnboundPlagueTimer = 70000; @@ -376,7 +376,7 @@ struct MANGOS_DLL_DECL boss_professor_putricideAI : public ScriptedAI { for (int i = 0; i < 2; ++i) { - if (Unit *pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0, SPELL_SLIME_PUDDLE_SUMMON, SELECT_FLAG_PLAYER)) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0, SPELL_SLIME_PUDDLE_SUMMON, SELECT_FLAG_PLAYER)) DoCastSpellIfCan(pTarget, SPELL_SLIME_PUDDLE, CAST_TRIGGERED); } @@ -436,7 +436,7 @@ struct MANGOS_DLL_DECL boss_professor_putricideAI : public ScriptedAI { if (m_uiUnboundPlagueTimer <= uiDiff) { - if (Unit *pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1, SPELL_UNBOUND_PLAGUE, SELECT_FLAG_PLAYER)) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1, SPELL_UNBOUND_PLAGUE, SELECT_FLAG_PLAYER)) { if (DoCastSpellIfCan(pTarget, SPELL_UNBOUND_PLAGUE) == CAST_OK) m_uiUnboundPlagueTimer = 70000; @@ -451,7 +451,7 @@ struct MANGOS_DLL_DECL boss_professor_putricideAI : public ScriptedAI { for (int i = 0; i < 2; ++i) { - if (Unit *pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1, SPELL_SLIME_PUDDLE_SUMMON, SELECT_FLAG_PLAYER)) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1, SPELL_SLIME_PUDDLE_SUMMON, SELECT_FLAG_PLAYER)) DoCastSpellIfCan(pTarget, SPELL_SLIME_PUDDLE, CAST_TRIGGERED); } m_uiPuddleTimer = 30000; @@ -491,7 +491,7 @@ CreatureAI* GetAI_boss_professor_putricide(Creature* pCreature) void AddSC_boss_professor_putricide() { - Script *pNewScript; + Script* pNewScript; pNewScript = new Script; pNewScript->Name = "boss_professor_putricide"; diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_rotface.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_rotface.cpp index e4b24e461..28bc97fcf 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_rotface.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_rotface.cpp @@ -48,7 +48,7 @@ enum SPELL_MUTATED_INFECTION_5 = 70006, // Slime Spray - // SPELL_SLIME_SPRAY_SUMMON = 70882, // precast of Slime Spray dmg spell +// SPELL_SLIME_SPRAY_SUMMON = 70882, // precast of Slime Spray dmg spell SPELL_SLIME_SPRAY = 69508, // Ooze Flood @@ -60,7 +60,7 @@ enum SPELL_STICKY_AURA = 69776, // aura on dummy Sticky Ooze NPC SPELL_WEAK_RADIATING_OOZE = 69750, SPELL_LITTLE_OOZE_COMBINE = 69537, // periodic check - // SPELL_MERGE = 69889, +// SPELL_MERGE = 69889, // Big Ooze SPELL_UNSTABLE_OOZE = 69558, // stacking buff @@ -104,7 +104,7 @@ struct MANGOS_DLL_DECL boss_rotfaceAI : public ScriptedAI m_uiInfectionsRate = 1; } - void Aggro(Unit *pWho) + void Aggro(Unit* pWho) { if (m_pInstance) m_pInstance->SetData(TYPE_ROTFACE, IN_PROGRESS); @@ -126,10 +126,10 @@ struct MANGOS_DLL_DECL boss_rotfaceAI : public ScriptedAI void KilledUnit(Unit* pVictim) { if (pVictim->GetTypeId() == TYPEID_PLAYER) - DoScriptText(urand(0,1) ? SAY_SLAY_1 : SAY_SLAY_2, m_creature, pVictim); + DoScriptText(urand(0, 1) ? SAY_SLAY_1 : SAY_SLAY_2, m_creature, pVictim); } - void JustDied(Unit *pKiller) + void JustDied(Unit* pKiller) { if (m_pInstance) m_pInstance->SetData(TYPE_ROTFACE, DONE); @@ -175,7 +175,7 @@ struct MANGOS_DLL_DECL boss_rotfaceAI : public ScriptedAI // Slime Flow if (m_uiSlimeFlowTimer <= uiDiff) { - if (Creature *pProfessor = m_pInstance->GetSingleCreatureFromStorage(NPC_PROFESSOR_PUTRICIDE)) + if (Creature* pProfessor = m_pInstance->GetSingleCreatureFromStorage(NPC_PROFESSOR_PUTRICIDE)) DoScriptText(urand(0, 1) ? SAY_SLIME_FLOW_1 : SAY_SLIME_FLOW_2, pProfessor); m_uiSlimeFlowTimer = 20000; @@ -195,7 +195,7 @@ CreatureAI* GetAI_boss_rotface(Creature* pCreature) struct MANGOS_DLL_DECL mob_little_oozeAI : public ScriptedAI { - mob_little_oozeAI(Creature *pCreature) : ScriptedAI(pCreature) + mob_little_oozeAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (instance_icecrown_citadel*)pCreature->GetInstanceData(); Reset(); @@ -214,7 +214,7 @@ struct MANGOS_DLL_DECL mob_little_oozeAI : public ScriptedAI m_creature->ForcedDespawn(); } - void Aggro(Unit *pWho) + void Aggro(Unit* pWho) { m_creature->AddThreat(pWho, 500000.0f); // not sure about the threat amount but should be very high DoCastSpellIfCan(m_creature, SPELL_WEAK_RADIATING_OOZE, CAST_TRIGGERED); @@ -246,13 +246,13 @@ CreatureAI* GetAI_mob_little_ooze(Creature* pCreature) struct MANGOS_DLL_DECL mob_big_oozeAI : public ScriptedAI { - mob_big_oozeAI(Creature *pCreature) : ScriptedAI(pCreature) + mob_big_oozeAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (instance_icecrown_citadel*)pCreature->GetInstanceData(); Reset(); } - instance_icecrown_citadel *m_pInstance; + instance_icecrown_citadel* m_pInstance; uint32 m_uiStickyOozeTimer; uint32 m_uiUnstableExplosionCheckTimer; @@ -267,7 +267,7 @@ struct MANGOS_DLL_DECL mob_big_oozeAI : public ScriptedAI m_creature->ForcedDespawn(); } - void Aggro(Unit *pWho) + void Aggro(Unit* pWho) { m_creature->AddThreat(pWho, 500000.0f); DoCastSpellIfCan(m_creature, SPELL_RADIATING_OOZE, CAST_TRIGGERED); @@ -287,14 +287,14 @@ struct MANGOS_DLL_DECL mob_big_oozeAI : public ScriptedAI { m_uiUnstableExplosionCheckTimer = 1000; - SpellAuraHolder* holder= m_creature->GetSpellAuraHolder(SPELL_UNSTABLE_OOZE); + SpellAuraHolder* holder = m_creature->GetSpellAuraHolder(SPELL_UNSTABLE_OOZE); if (holder && holder->GetStackAmount() >= 5) { if (DoCastSpellIfCan(m_creature, SPELL_UNSTABLE_EXPLOSION) == CAST_OK) { if (m_pInstance) { - if (Creature *pRotface = m_pInstance->GetSingleCreatureFromStorage(NPC_ROTFACE)) + if (Creature* pRotface = m_pInstance->GetSingleCreatureFromStorage(NPC_ROTFACE)) DoScriptText(SAY_OOZE_EXPLODE, pRotface); } } diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp index 01b3cc336..cf0f76572 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp @@ -60,7 +60,7 @@ enum SPELL_FROST_BOMB = 69846, // summons dummy target npc SPELL_FROST_BOMB_DMG = 69845, SPELL_FROST_BOMB_VISUAL = 70022, // circle mark - // SPELL_FROST_BOMB_OTHER = 70521, // no idea where it is used, wowhead says it is used by some other Sindragosa (37755) +// SPELL_FROST_BOMB_OTHER = 70521, // no idea where it is used, wowhead says it is used by some other Sindragosa (37755) // Phase 3 SPELL_MYSTIC_BUFFET = 70128, @@ -201,7 +201,7 @@ struct MANGOS_DLL_DECL boss_sindragosaAI : public ScriptedAI DoScriptText(urand(0, 1) ? SAY_SLAY_1 : SAY_SLAY_2, m_creature); } - void AttackStart(Unit *pWho) + void AttackStart(Unit* pWho) { ScriptedAI::AttackStart(pWho); @@ -268,7 +268,7 @@ struct MANGOS_DLL_DECL boss_sindragosaAI : public ScriptedAI SetFlying(false); SetCombatMovement(true); - if (Unit *pVictim = m_creature->getVictim()) + if (Unit* pVictim = m_creature->getVictim()) m_creature->GetMotionMaster()->MoveChase(pVictim); } } @@ -324,7 +324,7 @@ struct MANGOS_DLL_DECL boss_sindragosaAI : public ScriptedAI m_uiBerserkTimer -= uiDiff; } - switch(m_uiPhase) + switch (m_uiPhase) { case SINDRAGOSA_PHASE_THREE: { @@ -512,12 +512,12 @@ struct MANGOS_DLL_DECL npc_rimefang_iccAI : public ScriptedAI m_creature->SetWalk(bIsFlying); } - void Aggro(Unit *pWho) + void Aggro(Unit* pWho) { DoCastSpellIfCan(m_creature, SPELL_RIMEFANG_FROST_AURA, CAST_TRIGGERED); } - void AttackStart(Unit *pWho) + void AttackStart(Unit* pWho) { if (!m_bIsReady) { @@ -529,19 +529,19 @@ struct MANGOS_DLL_DECL npc_rimefang_iccAI : public ScriptedAI return; } - + ScriptedAI::AttackStart(pWho); } - void JustDied(Unit *pKiller) + void JustDied(Unit* pKiller) { if (!m_pInstance) return; - Creature *pSpinestalker = m_pInstance->GetSingleCreatureFromStorage(NPC_SPINESTALKER); + Creature* pSpinestalker = m_pInstance->GetSingleCreatureFromStorage(NPC_SPINESTALKER); if (!pSpinestalker || !pSpinestalker->isAlive()) { - if (Creature *pSindragosa = m_creature->SummonCreature(NPC_SINDRAGOSA, SindragosaPosition[7][0], SindragosaPosition[7][1], SindragosaPosition[7][2], 0.0f, TEMPSUMMON_MANUAL_DESPAWN, 0)) + if (Creature* pSindragosa = m_creature->SummonCreature(NPC_SINDRAGOSA, SindragosaPosition[7][0], SindragosaPosition[7][1], SindragosaPosition[7][2], 0.0f, TEMPSUMMON_MANUAL_DESPAWN, 0)) pSindragosa->SetInCombatWithZone(); } } @@ -583,7 +583,7 @@ struct MANGOS_DLL_DECL npc_rimefang_iccAI : public ScriptedAI SetFlying(false); SetCombatMovement(true); - if (Unit *pVictim = m_creature->getVictim()) + if (Unit* pVictim = m_creature->getVictim()) m_creature->GetMotionMaster()->MoveChase(pVictim); } else if (uiPointId == RIMEFANG_POINT_AIR) @@ -628,7 +628,7 @@ struct MANGOS_DLL_DECL npc_rimefang_iccAI : public ScriptedAI // Icy Blast if (m_uiIcyBlastTimer <= uiDiff) { - if (Unit *pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0, SPELL_RIMEFANG_ICY_BLAST, SELECT_FLAG_PLAYER)) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0, SPELL_RIMEFANG_ICY_BLAST, SELECT_FLAG_PLAYER)) { if (DoCastSpellIfCan(pTarget, SPELL_RIMEFANG_ICY_BLAST) == CAST_OK) { @@ -694,20 +694,20 @@ struct MANGOS_DLL_DECL npc_spinestalker_iccAI : public ScriptedAI m_creature->SetWalk(bIsFlying); } - void JustDied(Unit *pKiller) + void JustDied(Unit* pKiller) { if (!m_pInstance) return; - Creature *pRimefang = m_pInstance->GetSingleCreatureFromStorage(NPC_RIMEFANG); + Creature* pRimefang = m_pInstance->GetSingleCreatureFromStorage(NPC_RIMEFANG); if (!pRimefang || !pRimefang->isAlive()) { - if (Creature *pSindragosa = m_creature->SummonCreature(NPC_SINDRAGOSA, SindragosaPosition[7][0], SindragosaPosition[7][1], SindragosaPosition[7][2], 0.0f, TEMPSUMMON_MANUAL_DESPAWN, 0)) + if (Creature* pSindragosa = m_creature->SummonCreature(NPC_SINDRAGOSA, SindragosaPosition[7][0], SindragosaPosition[7][1], SindragosaPosition[7][2], 0.0f, TEMPSUMMON_MANUAL_DESPAWN, 0)) pSindragosa->SetInCombatWithZone(); } } - void AttackStart(Unit *pWho) + void AttackStart(Unit* pWho) { if (!m_bIsReady) { @@ -801,7 +801,7 @@ CreatureAI* GetAI_npc_spinestalker_icc(Creature* pCreature) */ struct MANGOS_DLL_DECL mob_frost_bombAI : public ScriptedAI { - mob_frost_bombAI(Creature *pCreature) : ScriptedAI(pCreature) + mob_frost_bombAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (instance_icecrown_citadel*)pCreature->GetInstanceData(); Reset(); @@ -817,7 +817,7 @@ struct MANGOS_DLL_DECL mob_frost_bombAI : public ScriptedAI m_uiFrostBombTimer = 6000; } - void AttackStart(Unit *pWho){} + void AttackStart(Unit* pWho) {} void UpdateAI(const uint32 uiDiff) { @@ -852,7 +852,7 @@ CreatureAI* GetAI_mob_frost_bomb(Creature* pCreature) void AddSC_boss_sindragosa() { - Script *pNewScript; + Script* pNewScript; pNewScript = new Script; pNewScript->Name = "boss_sindragosa"; diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_the_lich_king.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_the_lich_king.cpp index ca3eb81db..3336076f3 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_the_lich_king.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_the_lich_king.cpp @@ -286,7 +286,7 @@ struct MANGOS_DLL_DECL boss_the_lich_king_iccAI : public ScriptedAI m_uiVileSpiritsTimer = 20000; } - void Aggro(Unit *pWho) + void Aggro(Unit* pWho) { if (m_pInstance) m_pInstance->SetData(TYPE_LICH_KING, IN_PROGRESS); @@ -295,13 +295,13 @@ struct MANGOS_DLL_DECL boss_the_lich_king_iccAI : public ScriptedAI m_uiPhase = PHASE_ONE; } - void KilledUnit(Unit *pWho) + void KilledUnit(Unit* pWho) { if (pWho->GetTypeId() == TYPEID_PLAYER) DoScriptText(urand(0, 1) ? SAY_SLAY_1 : SAY_SLAY_2, m_creature); } - void JustDied(Unit *pKiller) + void JustDied(Unit* pKiller) { if (m_pInstance) m_pInstance->SetData(TYPE_LICH_KING, DONE); @@ -322,7 +322,7 @@ struct MANGOS_DLL_DECL boss_the_lich_king_iccAI : public ScriptedAI if (uiMovementType != POINT_MOTION_TYPE) return; - switch(uiData) + switch (uiData) { case POINT_CENTER_LAND: { @@ -385,7 +385,7 @@ struct MANGOS_DLL_DECL boss_the_lich_king_iccAI : public ScriptedAI } } - switch(m_uiPhase) + switch (m_uiPhase) { case PHASE_INTRO: { @@ -408,7 +408,7 @@ struct MANGOS_DLL_DECL boss_the_lich_king_iccAI : public ScriptedAI if (m_uiNecroticPlagueTimer < uiDiff) { // shouldn't be targeting players who already have Necrotic Plague on them - if (Unit *pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1, SPELL_NECROTIC_PLAGUE, SELECT_FLAG_PLAYER)) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1, SPELL_NECROTIC_PLAGUE, SELECT_FLAG_PLAYER)) { if (DoCastSpellIfCan(pTarget, SPELL_NECROTIC_PLAGUE) == CAST_OK) m_uiNecroticPlagueTimer = 30000; @@ -449,7 +449,7 @@ struct MANGOS_DLL_DECL boss_the_lich_king_iccAI : public ScriptedAI { if (m_uiShadowTrapTimer < uiDiff) { - if (Unit *pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1, SPELL_SHADOW_TRAP, SELECT_FLAG_PLAYER)) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1, SPELL_SHADOW_TRAP, SELECT_FLAG_PLAYER)) { if (DoCastSpellIfCan(pTarget, SPELL_SHADOW_TRAP) == CAST_OK) m_uiShadowTrapTimer = 15000; @@ -488,7 +488,7 @@ struct MANGOS_DLL_DECL boss_the_lich_king_iccAI : public ScriptedAI // Pain and Suffering if (m_uiPainSufferingTimer < uiDiff) { - if (Unit *pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0, SPELL_PAIN_AND_SUFFERING, SELECT_FLAG_PLAYER)) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0, SPELL_PAIN_AND_SUFFERING, SELECT_FLAG_PLAYER)) { if (DoCastSpellIfCan(pTarget, SPELL_PAIN_AND_SUFFERING) == CAST_OK) m_uiPainSufferingTimer = urand(1500, 3000); @@ -509,7 +509,7 @@ struct MANGOS_DLL_DECL boss_the_lich_king_iccAI : public ScriptedAI // Summon Raging Spirit if (m_uiRagingSpiritTimer < uiDiff) { - if (Unit *pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0, SPELL_RAGING_SPIRIT, SELECT_FLAG_PLAYER)) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0, SPELL_RAGING_SPIRIT, SELECT_FLAG_PLAYER)) { if (DoCastSpellIfCan(pTarget, SPELL_RAGING_SPIRIT, CAST_TRIGGERED) == CAST_OK) m_uiRagingSpiritTimer = (m_uiPhase == PHASE_TRANSITION_ONE ? 20000 : 15000); @@ -638,7 +638,7 @@ struct MANGOS_DLL_DECL boss_the_lich_king_iccAI : public ScriptedAI // Harvest Soul if (m_uiHarvestSoulTimer < uiDiff) { - Unit *pTarget = NULL; + Unit* pTarget = NULL; bool m_bIsHeroic = m_pInstance && m_pInstance->IsHeroicDifficulty(); if (m_bIsHeroic) pTarget = m_creature; @@ -651,7 +651,7 @@ struct MANGOS_DLL_DECL boss_the_lich_king_iccAI : public ScriptedAI { DoScriptText(SAY_HARVEST_SOUL, m_creature); m_uiHarvestSoulTimer = m_bIsHeroic ? 120000 : 70000; - + // TODO: prepare Frostmourne room - summon bombs and Tirion, or Tirion and the "bad spirit-guy" if (m_bIsHeroic) diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_valithria_dreamwalker.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_valithria_dreamwalker.cpp index 4947815fa..94d97ca07 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_valithria_dreamwalker.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_valithria_dreamwalker.cpp @@ -129,7 +129,7 @@ struct MANGOS_DLL_DECL boss_valithria_dreamwalkerAI : public ScriptedAI DoScriptText(SAY_PLAYER_DIES, m_creature, pVictim); } - void JustDied(Unit *pKiller) + void JustDied(Unit* pKiller) { DoScriptText(SAY_0_HEALTH, m_creature); diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_citadel.h b/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_citadel.h index 6973aa391..1d841011f 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_citadel.h +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_citadel.h @@ -81,14 +81,14 @@ enum GO_ORANGE_TUBE = 201617, GO_GREEN_TUBE = 201618, - //GO_BLOODWING_DOOR = 201920, // not used + // GO_BLOODWING_DOOR = 201920, // not used GO_CRIMSON_HALL_DOOR = 201376, // Council combat door GO_COUNCIL_DOOR_1 = 201377, GO_COUNCIL_DOOR_2 = 201378, GO_BLOODPRINCE_DOOR = 201746, // Lanathel combat door GO_ICECROWN_GRATE = 201755, // Lanathel trap door - //GO_FROSTWING_DOOR = 201919, // not used + // GO_FROSTWING_DOOR = 201919, // not used GO_GREEN_DRAGON_ENTRANCE = 201375, // Valithria combat door GO_GREEN_DRAGON_EXIT = 201374, GO_VALITHRIA_DOOR_1 = 201381, // Valithria event doors @@ -205,7 +205,7 @@ enum class MANGOS_DLL_DECL instance_icecrown_citadel : public ScriptedInstance, private DialogueHelper { public: - instance_icecrown_citadel(Map *pMap); + instance_icecrown_citadel(Map* pMap); void Initialize(); bool IsEncounterInProgress() const; @@ -228,7 +228,7 @@ class MANGOS_DLL_DECL instance_icecrown_citadel : public ScriptedInstance, priva bool IsHeroicDifficulty() { return instance->GetDifficulty() == RAID_DIFFICULTY_10MAN_HEROIC || instance->GetDifficulty() == RAID_DIFFICULTY_25MAN_HEROIC; } bool Is25ManDifficulty() { return instance->GetDifficulty() == RAID_DIFFICULTY_25MAN_NORMAL || instance->GetDifficulty() == RAID_DIFFICULTY_25MAN_HEROIC; } - void GetDeathwhisperStalkersList(GuidList &lList) { lList = m_lDeathwhisperStalkersGuids; } + void GetDeathwhisperStalkersList(GuidList& lList) { lList = m_lDeathwhisperStalkersGuids; } // Open Putricide door in a few seconds void DoPreparePutricideDoor() { m_uiPutricideValveTimer = 15000; } diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_citadel.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_citadel.cpp index b4b40088f..9a13fa88d 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_citadel.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_citadel.cpp @@ -56,7 +56,7 @@ static const DialogueEntry aCitadelDialogue[] = {0, 0, 0}, }; -instance_icecrown_citadel::instance_icecrown_citadel(Map *pMap) : ScriptedInstance(pMap), DialogueHelper(aCitadelDialogue), +instance_icecrown_citadel::instance_icecrown_citadel(Map* pMap) : ScriptedInstance(pMap), DialogueHelper(aCitadelDialogue), m_uiTeam(0), m_uiPutricideValveTimer(0), m_bHasMarrowgarIntroYelled(false), @@ -101,7 +101,7 @@ void instance_icecrown_citadel::DoHandleCitadelAreaTrigger(uint32 uiTriggerId, P } else if (uiTriggerId == AREATRIGGER_SINDRAGOSA_PLATFORM) { - if (Creature *pSindragosa = GetSingleCreatureFromStorage(NPC_SINDRAGOSA)) + if (Creature* pSindragosa = GetSingleCreatureFromStorage(NPC_SINDRAGOSA)) { if (pSindragosa->isAlive() && !pSindragosa->isInCombat()) pSindragosa->SetInCombatWithZone(); @@ -110,7 +110,7 @@ void instance_icecrown_citadel::DoHandleCitadelAreaTrigger(uint32 uiTriggerId, P { if (!m_bHasRimefangLanded) { - if (Creature *pRimefang = GetSingleCreatureFromStorage(NPC_RIMEFANG)) + if (Creature* pRimefang = GetSingleCreatureFromStorage(NPC_RIMEFANG)) { pRimefang->AI()->AttackStart(pPlayer); m_bHasRimefangLanded = true; @@ -119,7 +119,7 @@ void instance_icecrown_citadel::DoHandleCitadelAreaTrigger(uint32 uiTriggerId, P if (!m_bHasSpinestalkerLanded) { - if (Creature *pSpinestalker = GetSingleCreatureFromStorage(NPC_SPINESTALKER)) + if (Creature* pSpinestalker = GetSingleCreatureFromStorage(NPC_SPINESTALKER)) { pSpinestalker->AI()->AttackStart(pPlayer); m_bHasSpinestalkerLanded = true; @@ -135,9 +135,9 @@ void instance_icecrown_citadel::OnPlayerEnter(Player* pPlayer) m_uiTeam = pPlayer->GetTeam(); } -void instance_icecrown_citadel::OnCreatureCreate(Creature *pCreature) +void instance_icecrown_citadel::OnCreatureCreate(Creature* pCreature) { - switch(pCreature->GetEntry()) + switch (pCreature->GetEntry()) { case NPC_LORD_MARROWGAR: case NPC_LADY_DEATHWHISPER: @@ -157,17 +157,17 @@ void instance_icecrown_citadel::OnCreatureCreate(Creature *pCreature) case NPC_SPINESTALKER: case NPC_VALITHRIA_COMBAT_TRIGGER: case NPC_BLOOD_ORB_CONTROL: - m_mNpcEntryGuidStore[pCreature->GetEntry()] = pCreature->GetObjectGuid(); - break; + m_mNpcEntryGuidStore[pCreature->GetEntry()] = pCreature->GetObjectGuid(); + break; case NPC_DEATHWHISPER_SPAWN_STALKER: m_lDeathwhisperStalkersGuids.push_back(pCreature->GetObjectGuid()); return; } } -void instance_icecrown_citadel::OnObjectCreate(GameObject *pGo) +void instance_icecrown_citadel::OnObjectCreate(GameObject* pGo) { - switch(pGo->GetEntry()) + switch (pGo->GetEntry()) { case GO_ICEWALL_1: case GO_ICEWALL_2: @@ -295,7 +295,7 @@ void instance_icecrown_citadel::OnCreatureDeath(Creature* pCreature) void instance_icecrown_citadel::SetData(uint32 uiType, uint32 uiData) { - switch(uiType) + switch (uiType) { case TYPE_MARROWGAR: m_auiEncounter[uiType] = uiData; @@ -309,22 +309,22 @@ void instance_icecrown_citadel::SetData(uint32 uiType, uint32 uiData) DoUseDoorOrButton(GO_ORATORY_DOOR); } break; - case TYPE_LADY_DEATHWHISPER: + case TYPE_LADY_DEATHWHISPER: m_auiEncounter[uiType] = uiData; DoUseDoorOrButton(GO_ORATORY_DOOR); // ToDo: set the elevateor in motion when TYPE_LADY_DEATHWHISPER == DONE break; - case TYPE_GUNSHIP_BATTLE: + case TYPE_GUNSHIP_BATTLE: m_auiEncounter[uiType] = uiData; if (uiData == DONE) - DoRespawnGameObject(m_uiTeam == ALLIANCE ? GO_GUNSHIP_ARMORY_A : GO_GUNSHIP_ARMORY_H, 60*MINUTE); + DoRespawnGameObject(m_uiTeam == ALLIANCE ? GO_GUNSHIP_ARMORY_A : GO_GUNSHIP_ARMORY_H, 60 * MINUTE); break; - case TYPE_DEATHBRINGER_SAURFANG: + case TYPE_DEATHBRINGER_SAURFANG: m_auiEncounter[uiType] = uiData; if (uiData == DONE) { DoUseDoorOrButton(GO_SAURFANG_DOOR); - DoRespawnGameObject(GO_SAURFANG_CACHE, 60*MINUTE); + DoRespawnGameObject(GO_SAURFANG_CACHE, 60 * MINUTE); // Note: these doors may not be correct. In theory the doors should be already opened DoUseDoorOrButton(GO_SCIENTIST_DOOR); @@ -332,23 +332,23 @@ void instance_icecrown_citadel::SetData(uint32 uiType, uint32 uiData) DoUseDoorOrButton(GO_GREEN_DRAGON_ENTRANCE); } break; - case TYPE_FESTERGUT: + case TYPE_FESTERGUT: m_auiEncounter[uiType] = uiData; DoUseDoorOrButton(GO_ORANGE_PLAGUE); if (uiData == DONE) DoToggleGameObjectFlags(GO_ORANGE_VALVE, GO_FLAG_NO_INTERACT, false); break; - case TYPE_ROTFACE: + case TYPE_ROTFACE: m_auiEncounter[uiType] = uiData; DoUseDoorOrButton(GO_GREEN_PLAGUE); if (uiData == DONE) DoToggleGameObjectFlags(GO_GREEN_VALVE, GO_FLAG_NO_INTERACT, false); break; - case TYPE_PROFESSOR_PUTRICIDE: + case TYPE_PROFESSOR_PUTRICIDE: m_auiEncounter[uiType] = uiData; DoUseDoorOrButton(GO_SCIENTIST_DOOR); break; - case TYPE_BLOOD_PRINCE_COUNCIL: + case TYPE_BLOOD_PRINCE_COUNCIL: m_auiEncounter[uiType] = uiData; DoUseDoorOrButton(GO_CRIMSON_HALL_DOOR); if (uiData == DONE) @@ -357,13 +357,13 @@ void instance_icecrown_citadel::SetData(uint32 uiType, uint32 uiData) DoUseDoorOrButton(GO_COUNCIL_DOOR_2); } break; - case TYPE_QUEEN_LANATHEL: + case TYPE_QUEEN_LANATHEL: m_auiEncounter[uiType] = uiData; DoUseDoorOrButton(GO_BLOODPRINCE_DOOR); if (uiData == DONE) DoUseDoorOrButton(GO_ICECROWN_GRATE); break; - case TYPE_VALITHRIA: + case TYPE_VALITHRIA: m_auiEncounter[uiType] = uiData; DoUseDoorOrButton(GO_GREEN_DRAGON_ENTRANCE); // Side doors @@ -379,14 +379,14 @@ void instance_icecrown_citadel::SetData(uint32 uiType, uint32 uiData) { DoUseDoorOrButton(GO_GREEN_DRAGON_EXIT); DoUseDoorOrButton(GO_SINDRAGOSA_ENTRANCE); - DoRespawnGameObject(GO_DREAMWALKER_CACHE, 60*MINUTE); + DoRespawnGameObject(GO_DREAMWALKER_CACHE, 60 * MINUTE); } break; - case TYPE_SINDRAGOSA: + case TYPE_SINDRAGOSA: m_auiEncounter[uiType] = uiData; DoUseDoorOrButton(GO_SINDRAGOSA_ENTRANCE); break; - case TYPE_LICH_KING: + case TYPE_LICH_KING: m_auiEncounter[uiType] = uiData; break; default: @@ -401,9 +401,9 @@ void instance_icecrown_citadel::SetData(uint32 uiType, uint32 uiData) std::ostringstream saveStream; saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2] << " " - << m_auiEncounter[3] << " " << m_auiEncounter[4] << " " << m_auiEncounter[5] << " " - << m_auiEncounter[6] << " " << m_auiEncounter[7] << " " << m_auiEncounter[8] << " " - << m_auiEncounter[9] << " " << m_auiEncounter[10] << " " << m_auiEncounter[11]; + << m_auiEncounter[3] << " " << m_auiEncounter[4] << " " << m_auiEncounter[5] << " " + << m_auiEncounter[6] << " " << m_auiEncounter[7] << " " << m_auiEncounter[8] << " " + << m_auiEncounter[9] << " " << m_auiEncounter[10] << " " << m_auiEncounter[11]; m_strInstData = saveStream.str(); @@ -426,7 +426,7 @@ bool instance_icecrown_citadel::CheckAchievementCriteriaMeet(uint32 uiCriteriaId return false; } -void instance_icecrown_citadel::Load(const char *strIn) +void instance_icecrown_citadel::Load(const char* strIn) { if (!strIn) { @@ -438,8 +438,8 @@ void instance_icecrown_citadel::Load(const char *strIn) std::istringstream loadStream(strIn); loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3] - >> m_auiEncounter[4] >> m_auiEncounter[5] >> m_auiEncounter[6] >> m_auiEncounter[7] >> m_auiEncounter[8] - >> m_auiEncounter[9] >> m_auiEncounter[10] >> m_auiEncounter[11]; + >> m_auiEncounter[4] >> m_auiEncounter[5] >> m_auiEncounter[6] >> m_auiEncounter[7] >> m_auiEncounter[8] + >> m_auiEncounter[9] >> m_auiEncounter[10] >> m_auiEncounter[11]; for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) { @@ -480,7 +480,7 @@ InstanceData* GetInstanceData_instance_icecrown_citadel(Map* pMap) bool AreaTrigger_at_icecrown_citadel(Player* pPlayer, AreaTriggerEntry const* pAt) { if (pAt->id == AREATRIGGER_MARROWGAR_INTRO || pAt->id == AREATRIGGER_DEATHWHISPER_INTRO || - pAt->id == AREATRIGGER_SINDRAGOSA_PLATFORM) + pAt->id == AREATRIGGER_SINDRAGOSA_PLATFORM) { if (pPlayer->isGameMaster() || pPlayer->isDead()) return false; diff --git a/scripts/northrend/naxxramas/boss_anubrekhan.cpp b/scripts/northrend/naxxramas/boss_anubrekhan.cpp index 5f15d2f17..2da7e5dcd 100644 --- a/scripts/northrend/naxxramas/boss_anubrekhan.cpp +++ b/scripts/northrend/naxxramas/boss_anubrekhan.cpp @@ -40,16 +40,16 @@ enum EMOTE_INSECT_SWARM = -1533154, EMOTE_CORPSE_SCARABS = -1533155, - SPELL_IMPALE = 28783, //May be wrong spell id. Causes more dmg than I expect + SPELL_IMPALE = 28783, // May be wrong spell id. Causes more dmg than I expect SPELL_IMPALE_H = 56090, - SPELL_LOCUSTSWARM = 28785, //This is a self buff that triggers the dmg debuff + SPELL_LOCUSTSWARM = 28785, // This is a self buff that triggers the dmg debuff SPELL_LOCUSTSWARM_H = 54021, - //spellId invalid - //SPELL_SUMMONGUARD = 29508, //Summons 1 crypt guard at targeted location - spell doesn't exist in 3.x.x + // spellId invalid + // SPELL_SUMMONGUARD = 29508, // Summons 1 crypt guard at targeted location - spell doesn't exist in 3.x.x - SPELL_SELF_SPAWN_5 = 29105, //This spawns 5 corpse scarabs ontop of us (most likely the pPlayer casts this on death) - SPELL_SELF_SPAWN_10 = 28864, //This is used by the crypt guards when they die + SPELL_SELF_SPAWN_5 = 29105, // This spawns 5 corpse scarabs ontop of us (most likely the pPlayer casts this on death) + SPELL_SELF_SPAWN_10 = 28864, // This is used by the crypt guards when they die NPC_CRYPT_GUARD = 16573 }; @@ -61,7 +61,7 @@ static const DialogueEntry aIntroDialogue[] = {SAY_TAUNT2, NPC_ANUB_REKHAN, 11000}, {SAY_TAUNT3, NPC_ANUB_REKHAN, 10000}, {SAY_TAUNT4, NPC_ANUB_REKHAN, 0}, - {0,0,0} + {0, 0, 0} }; static const float aCryptGuardLoc[4] = {3333.5f, -3475.9f, 287.1f, 3.17f}; @@ -91,7 +91,7 @@ struct MANGOS_DLL_DECL boss_anubrekhanAI : public ScriptedAI { m_uiImpaleTimer = 15000; m_uiLocustSwarmTimer = 90000; - m_uiSummonTimer = m_bIsRegularMode ? 20000 : 0; // spawn a guardian only after 20 seconds in normal mode; in heroic there are already 2 Guards spawned + m_uiSummonTimer = m_bIsRegularMode ? 20000 : 0;// spawn a guardian only after 20 seconds in normal mode; in heroic there are already 2 Guards spawned } void KilledUnit(Unit* pVictim) @@ -108,7 +108,7 @@ struct MANGOS_DLL_DECL boss_anubrekhanAI : public ScriptedAI void Aggro(Unit* pWho) { - switch(urand(0, 2)) + switch (urand(0, 2)) { case 0: DoScriptText(SAY_AGGRO1, m_creature); break; case 1: DoScriptText(SAY_AGGRO2, m_creature); break; @@ -190,7 +190,7 @@ struct MANGOS_DLL_DECL boss_anubrekhanAI : public ScriptedAI // Locust Swarm if (m_uiLocustSwarmTimer < uiDiff) { - if (DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_LOCUSTSWARM :SPELL_LOCUSTSWARM_H) == CAST_OK) + if (DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_LOCUSTSWARM : SPELL_LOCUSTSWARM_H) == CAST_OK) { DoScriptText(EMOTE_INSECT_SWARM, m_creature); diff --git a/scripts/northrend/naxxramas/boss_faerlina.cpp b/scripts/northrend/naxxramas/boss_faerlina.cpp index 4c4b4591d..90da61a11 100644 --- a/scripts/northrend/naxxramas/boss_faerlina.cpp +++ b/scripts/northrend/naxxramas/boss_faerlina.cpp @@ -76,7 +76,7 @@ struct MANGOS_DLL_DECL boss_faerlinaAI : public ScriptedAI void Aggro(Unit* pWho) { - switch(urand(0, 3)) + switch (urand(0, 3)) { case 0: DoScriptText(SAY_AGGRO_1, m_creature); break; case 1: DoScriptText(SAY_AGGRO_2, m_creature); break; diff --git a/scripts/northrend/naxxramas/boss_four_horsemen.cpp b/scripts/northrend/naxxramas/boss_four_horsemen.cpp index c96bd40c9..adf0addb6 100644 --- a/scripts/northrend/naxxramas/boss_four_horsemen.cpp +++ b/scripts/northrend/naxxramas/boss_four_horsemen.cpp @@ -58,7 +58,7 @@ enum // ***** Spells ***** // all horsemen - //SPELL_SHIELDWALL = 29061, // not used in 3.x.x + // SPELL_SHIELDWALL = 29061, // not used in 3.x.x SPELL_BESERK = 26662, // Note: Berserk should be applied once 100 marks are casted. // Also spell 59450, which is missing from DBC, is required for the achiev @@ -90,10 +90,10 @@ enum SPELL_CONDEMNATION = 57377, // horseman spirits (not used in 3.x.x) - //NPC_SPIRIT_OF_BLAUMEUX = 16776, - //NPC_SPIRIT_OF_MOGRAINE = 16775, - //NPC_SPIRIT_OF_KORTHAZZ = 16778, - //NPC_SPIRIT_OF_ZELIREK = 16777 + // NPC_SPIRIT_OF_BLAUMEUX = 16776, + // NPC_SPIRIT_OF_MOGRAINE = 16775, + // NPC_SPIRIT_OF_KORTHAZZ = 16778, + // NPC_SPIRIT_OF_ZELIREK = 16777 }; static const float aHorseMenMoveCoords[4][3] = @@ -245,7 +245,7 @@ struct MANGOS_DLL_DECL boss_rivendare_naxxAI : public ScriptedAI void Aggro(Unit* pWho) { - switch(urand(0, 2)) + switch (urand(0, 2)) { case 0: DoScriptText(SAY_RIVE_AGGRO1, m_creature); break; case 1: DoScriptText(SAY_RIVE_AGGRO2, m_creature); break; diff --git a/scripts/northrend/naxxramas/boss_gluth.cpp b/scripts/northrend/naxxramas/boss_gluth.cpp index 1a08bd513..edc023655 100644 --- a/scripts/northrend/naxxramas/boss_gluth.cpp +++ b/scripts/northrend/naxxramas/boss_gluth.cpp @@ -36,10 +36,10 @@ enum SPELL_ENRAGE = 28371, SPELL_ENRAGE_H = 54427, SPELL_BERSERK = 26662, - //SPELL_TERRIFYING_ROAR = 29685, // no longer used in 3.x.x - //SPELL_SUMMON_ZOMBIE_CHOW = 28216, // removed from dbc: triggers 28217 every 6 secs - //SPELL_CALL_ALL_ZOMBIE_CHOW = 29681, // removed from dbc: triggers 29682 - //SPELL_ZOMBIE_CHOW_SEARCH = 28235, // removed from dbc: triggers 28236 every 3 secs + // SPELL_TERRIFYING_ROAR = 29685, // no longer used in 3.x.x + // SPELL_SUMMON_ZOMBIE_CHOW = 28216, // removed from dbc: triggers 28217 every 6 secs + // SPELL_CALL_ALL_ZOMBIE_CHOW = 29681, // removed from dbc: triggers 29682 + // SPELL_ZOMBIE_CHOW_SEARCH = 28235, // removed from dbc: triggers 28236 every 3 secs NPC_ZOMBIE_CHOW = 16360, // old vanilla summoning spell 28217 @@ -83,7 +83,7 @@ struct MANGOS_DLL_DECL boss_gluthAI : public ScriptedAI m_uiSummonTimer = 15000; m_uiZombieSearchTimer = 3000; - m_uiBerserkTimer = MINUTE*8*IN_MILLISECONDS; + m_uiBerserkTimer = MINUTE * 8 * IN_MILLISECONDS; } void JustDied(Unit* pKiller) @@ -104,7 +104,7 @@ struct MANGOS_DLL_DECL boss_gluthAI : public ScriptedAI if (pVictim->GetEntry() == NPC_ZOMBIE_CHOW) { DoScriptText(EMOTE_ZOMBIE, m_creature); - m_creature->SetHealth(m_creature->GetHealth() + m_creature->GetMaxHealth()*0.05f); + m_creature->SetHealth(m_creature->GetHealth() + m_creature->GetMaxHealth() * 0.05f); } } @@ -220,7 +220,7 @@ struct MANGOS_DLL_DECL boss_gluthAI : public ScriptedAI if (m_uiBerserkTimer < uiDiff) { if (DoCastSpellIfCan(m_creature, SPELL_BERSERK) == CAST_OK) - m_uiBerserkTimer = MINUTE*5*IN_MILLISECONDS; + m_uiBerserkTimer = MINUTE * 5 * IN_MILLISECONDS; } else m_uiBerserkTimer -= uiDiff; diff --git a/scripts/northrend/naxxramas/boss_gothik.cpp b/scripts/northrend/naxxramas/boss_gothik.cpp index 4da56bc03..5decd6cfc 100644 --- a/scripts/northrend/naxxramas/boss_gothik.cpp +++ b/scripts/northrend/naxxramas/boss_gothik.cpp @@ -107,15 +107,15 @@ struct MANGOS_DLL_DECL boss_gothikAI : public ScriptedAI m_uiPhase = PHASE_SPEECH; m_uiSpeech = 1; - m_uiTraineeTimer = 24*IN_MILLISECONDS; - m_uiDeathKnightTimer = 74*IN_MILLISECONDS; - m_uiRiderTimer = 134*IN_MILLISECONDS; - m_uiTeleportTimer = 20*IN_MILLISECONDS; - m_uiShadowboltTimer = 2*IN_MILLISECONDS; + m_uiTraineeTimer = 24 * IN_MILLISECONDS; + m_uiDeathKnightTimer = 74 * IN_MILLISECONDS; + m_uiRiderTimer = 134 * IN_MILLISECONDS; + m_uiTeleportTimer = 20 * IN_MILLISECONDS; + m_uiShadowboltTimer = 2 * IN_MILLISECONDS; m_uiHarvestSoulTimer = 2500; - m_uiPhaseTimer = 4*MINUTE*IN_MILLISECONDS + 7*IN_MILLISECONDS; // last summon at 4:04, next would be 4:09 - m_uiControlZoneTimer = urand(120*IN_MILLISECONDS,150*IN_MILLISECONDS); - m_uiSpeechTimer = 1*IN_MILLISECONDS; + m_uiPhaseTimer = 4 * MINUTE * IN_MILLISECONDS + 7 * IN_MILLISECONDS; // last summon at 4:04, next would be 4:09 + m_uiControlZoneTimer = urand(120 * IN_MILLISECONDS, 150 * IN_MILLISECONDS); + m_uiSpeechTimer = 1 * IN_MILLISECONDS; // Despawn Adds for (GuidList::const_iterator itr = m_lSummonedAddGuids.begin(); itr != m_lSummonedAddGuids.end(); itr++) @@ -165,7 +165,7 @@ struct MANGOS_DLL_DECL boss_gothikAI : public ScriptedAI if (lPlayers.isEmpty()) return false; - for(Map::PlayerList::const_iterator itr = lPlayers.begin(); itr != lPlayers.end(); ++itr) + for (Map::PlayerList::const_iterator itr = lPlayers.begin(); itr != lPlayers.end(); ++itr) { if (Player* pPlayer = itr->getSource()) { @@ -244,7 +244,7 @@ struct MANGOS_DLL_DECL boss_gothikAI : public ScriptedAI void SummonAdds(bool bRightSide, uint32 uiSummonEntry) { GuidList* plSummonPosGuids; - switch(uiSummonEntry) + switch (uiSummonEntry) { case NPC_UNREL_TRAINEE: plSummonPosGuids = &m_lTraineeSummonPosGuids; break; case NPC_UNREL_DEATH_KNIGHT: plSummonPosGuids = &m_lDeathKnightSummonPosGuids; break; @@ -280,9 +280,9 @@ struct MANGOS_DLL_DECL boss_gothikAI : public ScriptedAI { switch (pSummoned->GetEntry()) { - // Wrong caster, it expected to be pSummoned. - // Mangos deletes the spell event at caster death, so for delayed spell like this - // it's just a workaround. Does not affect other than the visual though (+ spell takes longer to "travel") + // Wrong caster, it expected to be pSummoned. + // Mangos deletes the spell event at caster death, so for delayed spell like this + // it's just a workaround. Does not affect other than the visual though (+ spell takes longer to "travel") case NPC_UNREL_TRAINEE: m_creature->CastSpell(pAnchor, SPELL_A_TO_ANCHOR_1, true, NULL, NULL, pSummoned->GetObjectGuid()); break; case NPC_UNREL_DEATH_KNIGHT: m_creature->CastSpell(pAnchor, SPELL_B_TO_ANCHOR_1, true, NULL, NULL, pSummoned->GetObjectGuid()); break; case NPC_UNREL_RIDER: m_creature->CastSpell(pAnchor, SPELL_C_TO_ANCHOR_1, true, NULL, NULL, pSummoned->GetObjectGuid()); break; @@ -300,11 +300,11 @@ struct MANGOS_DLL_DECL boss_gothikAI : public ScriptedAI case PHASE_SPEECH: if (m_uiSpeechTimer < uiDiff) { - switch(m_uiSpeech) + switch (m_uiSpeech) { - case 1: DoScriptText(SAY_SPEECH_1, m_creature); m_uiSpeechTimer = 4*IN_MILLISECONDS; break; - case 2: DoScriptText(SAY_SPEECH_2, m_creature); m_uiSpeechTimer = 6*IN_MILLISECONDS; break; - case 3: DoScriptText(SAY_SPEECH_3, m_creature); m_uiSpeechTimer = 5*IN_MILLISECONDS; break; + case 1: DoScriptText(SAY_SPEECH_1, m_creature); m_uiSpeechTimer = 4 * IN_MILLISECONDS; break; + case 2: DoScriptText(SAY_SPEECH_2, m_creature); m_uiSpeechTimer = 6 * IN_MILLISECONDS; break; + case 3: DoScriptText(SAY_SPEECH_3, m_creature); m_uiSpeechTimer = 5 * IN_MILLISECONDS; break; case 4: DoScriptText(SAY_SPEECH_4, m_creature); m_uiPhase = PHASE_BALCONY; break; } m_uiSpeech++; @@ -318,21 +318,21 @@ struct MANGOS_DLL_DECL boss_gothikAI : public ScriptedAI if (m_uiTraineeTimer < uiDiff) { SummonAdds(true, NPC_UNREL_TRAINEE); - m_uiTraineeTimer = 20*IN_MILLISECONDS; + m_uiTraineeTimer = 20 * IN_MILLISECONDS; } else m_uiTraineeTimer -= uiDiff; if (m_uiDeathKnightTimer < uiDiff) { SummonAdds(true, NPC_UNREL_DEATH_KNIGHT); - m_uiDeathKnightTimer = 25*IN_MILLISECONDS; + m_uiDeathKnightTimer = 25 * IN_MILLISECONDS; } else m_uiDeathKnightTimer -= uiDiff; if (m_uiRiderTimer < uiDiff) { SummonAdds(true, NPC_UNREL_RIDER); - m_uiRiderTimer = 30*IN_MILLISECONDS; + m_uiRiderTimer = 30 * IN_MILLISECONDS; } else m_uiRiderTimer -= uiDiff; @@ -340,7 +340,7 @@ struct MANGOS_DLL_DECL boss_gothikAI : public ScriptedAI if (m_uiPhaseTimer < uiDiff) { m_uiPhase = PHASE_STOP_SUMMONING; - m_uiPhaseTimer = 27*IN_MILLISECONDS; + m_uiPhaseTimer = 27 * IN_MILLISECONDS; } else m_uiPhaseTimer -= uiDiff; @@ -375,8 +375,8 @@ struct MANGOS_DLL_DECL boss_gothikAI : public ScriptedAI uint32 uiTeleportSpell = m_pInstance->IsInRightSideGothArea(m_creature) ? SPELL_TELEPORT_LEFT : SPELL_TELEPORT_RIGHT; if (DoCastSpellIfCan(m_creature, uiTeleportSpell) == CAST_OK) { - m_uiTeleportTimer = 20*IN_MILLISECONDS; - m_uiShadowboltTimer = 2*IN_MILLISECONDS; + m_uiTeleportTimer = 20 * IN_MILLISECONDS; + m_uiShadowboltTimer = 2 * IN_MILLISECONDS; } } else @@ -395,7 +395,7 @@ struct MANGOS_DLL_DECL boss_gothikAI : public ScriptedAI if (m_uiHarvestSoulTimer < uiDiff) { if (DoCastSpellIfCan(m_creature, SPELL_HARVESTSOUL) == CAST_OK) - m_uiHarvestSoulTimer = 15*IN_MILLISECONDS; + m_uiHarvestSoulTimer = 15 * IN_MILLISECONDS; } else m_uiHarvestSoulTimer -= uiDiff; @@ -459,7 +459,7 @@ bool EffectDummyCreature_spell_anchor(Unit* pCaster, uint32 uiSpellId, SpellEffe if (!pInstance) return true; - switch(uiSpellId) + switch (uiSpellId) { case SPELL_A_TO_ANCHOR_1: // trigger mobs at high right side case SPELL_B_TO_ANCHOR_1: @@ -489,7 +489,7 @@ bool EffectDummyCreature_spell_anchor(Unit* pCaster, uint32 uiSpellId, SpellEffe if (!lTargets.empty()) { std::list::iterator itr = lTargets.begin(); - uint32 uiPosition = urand(0, lTargets.size()-1); + uint32 uiPosition = urand(0, lTargets.size() - 1); advance(itr, uiPosition); if (Creature* pTarget = (*itr)) diff --git a/scripts/northrend/naxxramas/boss_grobbulus.cpp b/scripts/northrend/naxxramas/boss_grobbulus.cpp index 5a72245f3..5cf340c9d 100644 --- a/scripts/northrend/naxxramas/boss_grobbulus.cpp +++ b/scripts/northrend/naxxramas/boss_grobbulus.cpp @@ -67,12 +67,12 @@ struct MANGOS_DLL_DECL boss_grobbulusAI : public ScriptedAI void Reset() { - m_uiInjectionTimer = 12*IN_MILLISECONDS; - m_uiPoisonCloudTimer = urand (20*IN_MILLISECONDS, 25*IN_MILLISECONDS); - m_uiSlimeSprayTimer = urand(20*IN_MILLISECONDS, 30*IN_MILLISECONDS); - m_uiBerserkTimeSecs = m_bIsRegularMode ? 12*MINUTE : 9*MINUTE; - m_uiBerserkTimer = m_uiBerserkTimeSecs*IN_MILLISECONDS; - m_uiSlimeStreamTimer = 5*IN_MILLISECONDS; // The first few secs it is ok to be out of range + m_uiInjectionTimer = 12 * IN_MILLISECONDS; + m_uiPoisonCloudTimer = urand(20 * IN_MILLISECONDS, 25 * IN_MILLISECONDS); + m_uiSlimeSprayTimer = urand(20 * IN_MILLISECONDS, 30 * IN_MILLISECONDS); + m_uiBerserkTimeSecs = m_bIsRegularMode ? 12 * MINUTE : 9 * MINUTE; + m_uiBerserkTimer = m_uiBerserkTimeSecs * IN_MILLISECONDS; + m_uiSlimeStreamTimer = 5 * IN_MILLISECONDS; // The first few secs it is ok to be out of range } void Aggro(Unit* pWho) @@ -128,7 +128,7 @@ struct MANGOS_DLL_DECL boss_grobbulusAI : public ScriptedAI void SpellHitTarget(Unit* pTarget, const SpellEntry* pSpell) { if ((pSpell->Id == SPELL_SLIME_SPRAY || pSpell->Id == SPELL_SLIME_SPRAY_H) && pTarget->GetTypeId() == TYPEID_PLAYER) - m_creature->SummonCreature(NPC_FALLOUT_SLIME, pTarget->GetPositionX(), pTarget->GetPositionY(), pTarget->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 10*IN_MILLISECONDS); + m_creature->SummonCreature(NPC_FALLOUT_SLIME, pTarget->GetPositionX(), pTarget->GetPositionY(), pTarget->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 10 * IN_MILLISECONDS); } void UpdateAI(const uint32 uiDiff) @@ -143,7 +143,7 @@ struct MANGOS_DLL_DECL boss_grobbulusAI : public ScriptedAI { if (DoCastSpellIfCan(m_creature, SPELL_SLIME_STREAM) == CAST_OK) // Give some time, to re-reach grobbulus - m_uiSlimeStreamTimer = 3*IN_MILLISECONDS; + m_uiSlimeStreamTimer = 3 * IN_MILLISECONDS; } } else @@ -171,7 +171,7 @@ struct MANGOS_DLL_DECL boss_grobbulusAI : public ScriptedAI { if (DoCastSpellIfCan(m_creature->getVictim(), m_bIsRegularMode ? SPELL_SLIME_SPRAY : SPELL_SLIME_SPRAY_H) == CAST_OK) { - m_uiSlimeSprayTimer = urand(30*IN_MILLISECONDS, 60*IN_MILLISECONDS); + m_uiSlimeSprayTimer = urand(30 * IN_MILLISECONDS, 60 * IN_MILLISECONDS); DoScriptText(EMOTE_SPRAY_SLIME, m_creature); } } @@ -185,9 +185,9 @@ struct MANGOS_DLL_DECL boss_grobbulusAI : public ScriptedAI { // Timer dependend on time of encounter - on enrage time between 5-8s, heroic 2-5s (TODO no reliable source for heroic) if (m_bIsRegularMode) - m_uiInjectionTimer = urand(10*IN_MILLISECONDS, 13*IN_MILLISECONDS) - 5 * (m_uiBerserkTimeSecs*IN_MILLISECONDS - m_uiBerserkTimer) / m_uiBerserkTimeSecs; + m_uiInjectionTimer = urand(10 * IN_MILLISECONDS, 13 * IN_MILLISECONDS) - 5 * (m_uiBerserkTimeSecs * IN_MILLISECONDS - m_uiBerserkTimer) / m_uiBerserkTimeSecs; else - m_uiInjectionTimer = urand(10*IN_MILLISECONDS, 13*IN_MILLISECONDS) - 8 * (m_uiBerserkTimeSecs*IN_MILLISECONDS - m_uiBerserkTimer) / m_uiBerserkTimeSecs; + m_uiInjectionTimer = urand(10 * IN_MILLISECONDS, 13 * IN_MILLISECONDS) - 8 * (m_uiBerserkTimeSecs * IN_MILLISECONDS - m_uiBerserkTimer) / m_uiBerserkTimeSecs; } } else @@ -197,7 +197,7 @@ struct MANGOS_DLL_DECL boss_grobbulusAI : public ScriptedAI if (m_uiPoisonCloudTimer < uiDiff) { if (DoCastSpellIfCan(m_creature, SPELL_POISON_CLOUD) == CAST_OK) - m_uiPoisonCloudTimer = 15*IN_MILLISECONDS; + m_uiPoisonCloudTimer = 15 * IN_MILLISECONDS; } else m_uiPoisonCloudTimer -= uiDiff; diff --git a/scripts/northrend/naxxramas/boss_heigan.cpp b/scripts/northrend/naxxramas/boss_heigan.cpp index 4c11fedea..af97c9495 100644 --- a/scripts/northrend/naxxramas/boss_heigan.cpp +++ b/scripts/northrend/naxxramas/boss_heigan.cpp @@ -85,13 +85,13 @@ struct MANGOS_DLL_DECL boss_heiganAI : public ScriptedAI void Reset() { m_uiPhase = PHASE_GROUND; - m_uiTauntTimer = urand(20000,60000); // TODO, find information + m_uiTauntTimer = urand(20000, 60000); // TODO, find information ResetPhase(); } void Aggro(Unit* pWho) { - switch(urand(0, 2)) + switch (urand(0, 2)) { case 0: DoScriptText(SAY_AGGRO1, m_creature); break; case 1: DoScriptText(SAY_AGGRO2, m_creature); break; @@ -193,7 +193,7 @@ struct MANGOS_DLL_DECL boss_heiganAI : public ScriptedAI // Taunt if (m_uiTauntTimer < uiDiff) { - switch(urand(0, 3)) + switch (urand(0, 3)) { case 0: DoScriptText(SAY_TAUNT1, m_creature); break; case 1: DoScriptText(SAY_TAUNT2, m_creature); break; diff --git a/scripts/northrend/naxxramas/boss_kelthuzad.cpp b/scripts/northrend/naxxramas/boss_kelthuzad.cpp index 2f698a5dd..22e814938 100644 --- a/scripts/northrend/naxxramas/boss_kelthuzad.cpp +++ b/scripts/northrend/naxxramas/boss_kelthuzad.cpp @@ -30,9 +30,9 @@ EndScriptData */ enum { - SAY_SUMMON_MINIONS = -1533105, //start of phase 1 + SAY_SUMMON_MINIONS = -1533105, // start of phase 1 - EMOTE_PHASE2 = -1533135, //start of phase 2 + EMOTE_PHASE2 = -1533135, // start of phase 2 SAY_AGGRO1 = -1533094, SAY_AGGRO2 = -1533095, SAY_AGGRO3 = -1533096, @@ -46,8 +46,8 @@ enum SAY_CHAIN2 = -1533101, SAY_FROST_BLAST = -1533102, - SAY_REQUEST_AID = -1533103, //start of phase 3 - SAY_ANSWER_REQUEST = -1533104, //lich king answer + SAY_REQUEST_AID = -1533103, // start of phase 3 + SAY_ANSWER_REQUEST = -1533104, // lich king answer SAY_SPECIAL1_MANA_DET = -1533106, SAY_SPECIAL3_MANA_DET = -1533107, @@ -55,7 +55,7 @@ enum EMOTE_GUARDIAN = -1533134, // at each guardian summon - //spells to be casted + // spells to be casted SPELL_FROST_BOLT = 28478, SPELL_FROST_BOLT_H = 55802, SPELL_FROST_BOLT_NOVA = 28479, @@ -130,19 +130,19 @@ struct MANGOS_DLL_DECL boss_kelthuzadAI : public ScriptedAI void Reset() { - m_uiFrostBoltTimer = urand(1000, 60000); //It won't be more than a minute without cast it - m_uiFrostBoltNovaTimer = 15000; //Cast every 15 seconds - m_uiChainsTimer = urand(30000, 60000); //Cast no sooner than once every 30 seconds - m_uiManaDetonationTimer = 20000; //Seems to cast about every 20 seconds - m_uiShadowFissureTimer = 25000; //25 seconds - m_uiFrostBlastTimer = urand(30000, 60000); //Random time between 30-60 seconds - m_uiGuardiansTimer = 5000; //5 seconds for summoning each Guardian of Icecrown in phase 3 + m_uiFrostBoltTimer = urand(1000, 60000); // It won't be more than a minute without cast it + m_uiFrostBoltNovaTimer = 15000; // Cast every 15 seconds + m_uiChainsTimer = urand(30000, 60000); // Cast no sooner than once every 30 seconds + m_uiManaDetonationTimer = 20000; // Seems to cast about every 20 seconds + m_uiShadowFissureTimer = 25000; // 25 seconds + m_uiFrostBlastTimer = urand(30000, 60000); // Random time between 30-60 seconds + m_uiGuardiansTimer = 5000; // 5 seconds for summoning each Guardian of Icecrown in phase 3 m_uiLichKingAnswerTimer = 4000; m_uiGuardiansCount = 0; m_uiSummonIntroTimer = 0; m_uiIntroPackCount = 0; - m_uiPhase1Timer = 228000; //Phase 1 lasts "3 minutes and 48 seconds" + m_uiPhase1Timer = 228000; // Phase 1 lasts "3 minutes and 48 seconds" m_uiSoldierTimer = 5000; m_uiBansheeTimer = 5000; m_uiAbominationTimer = 5000; @@ -196,7 +196,7 @@ struct MANGOS_DLL_DECL boss_kelthuzadAI : public ScriptedAI { if (m_pInstance) { - for(GuidSet::const_iterator itr = m_lIntroMobsSet.begin(); itr != m_lIntroMobsSet.end(); ++itr) + for (GuidSet::const_iterator itr = m_lIntroMobsSet.begin(); itr != m_lIntroMobsSet.end(); ++itr) { if (Creature* pCreature = m_pInstance->instance->GetCreature(*itr)) pCreature->ForcedDespawn(); @@ -210,7 +210,7 @@ struct MANGOS_DLL_DECL boss_kelthuzadAI : public ScriptedAI { if (m_pInstance) { - for(GuidSet::const_iterator itr = m_lAddsSet.begin(); itr != m_lAddsSet.end(); ++itr) + for (GuidSet::const_iterator itr = m_lAddsSet.begin(); itr != m_lAddsSet.end(); ++itr) { if (Creature* pCreature = m_pInstance->instance->GetCreature(*itr)) { @@ -228,7 +228,7 @@ struct MANGOS_DLL_DECL boss_kelthuzadAI : public ScriptedAI float GetLocationAngle(uint32 uiId) { - switch(uiId) + switch (uiId) { case 1: return M_PI_F - M_F_ANGLE; // south case 2: return M_PI_F / 2 * 3 - M_F_ANGLE; // east @@ -247,7 +247,7 @@ struct MANGOS_DLL_DECL boss_kelthuzadAI : public ScriptedAI if (!m_pInstance) return; - float fAngle = GetLocationAngle(packId+1); + float fAngle = GetLocationAngle(packId + 1); float fX, fY, fZ; m_pInstance->GetChamberCenterCoords(fX, fY, fZ); @@ -261,7 +261,7 @@ struct MANGOS_DLL_DECL boss_kelthuzadAI : public ScriptedAI uint32 uiNpcEntry = NPC_SOUL_WEAVER; - for(uint8 uiI = 0; uiI < 14; ++uiI) + for (uint8 uiI = 0; uiI < 14; ++uiI) { if (uiI > 0) { @@ -300,7 +300,7 @@ struct MANGOS_DLL_DECL boss_kelthuzadAI : public ScriptedAI void JustSummoned(Creature* pSummoned) { - switch(pSummoned->GetEntry()) + switch (pSummoned->GetEntry()) { case NPC_GUARDIAN: { @@ -337,7 +337,7 @@ struct MANGOS_DLL_DECL boss_kelthuzadAI : public ScriptedAI void SummonedCreatureJustDied(Creature* pSummoned) { - switch(pSummoned->GetEntry()) + switch (pSummoned->GetEntry()) { case NPC_GUARDIAN: case NPC_SOLDIER_FROZEN: @@ -398,7 +398,7 @@ struct MANGOS_DLL_DECL boss_kelthuzadAI : public ScriptedAI DoScriptText(EMOTE_PHASE2, m_creature); - switch(urand(0, 2)) + switch (urand(0, 2)) { case 0: DoScriptText(SAY_AGGRO1, m_creature); break; case 1: DoScriptText(SAY_AGGRO2, m_creature); break; diff --git a/scripts/northrend/naxxramas/boss_loatheb.cpp b/scripts/northrend/naxxramas/boss_loatheb.cpp index 74aceb4fd..b28aec6f3 100644 --- a/scripts/northrend/naxxramas/boss_loatheb.cpp +++ b/scripts/northrend/naxxramas/boss_loatheb.cpp @@ -64,9 +64,9 @@ struct MANGOS_DLL_DECL boss_loathebAI : public ScriptedAI { m_uiDeathbloomTimer = 5000; m_uiNecroticAuraTimer = 12000; - m_uiInevitableDoomTimer = MINUTE*2*IN_MILLISECONDS; + m_uiInevitableDoomTimer = MINUTE * 2 * IN_MILLISECONDS; m_uiSummonTimer = urand(10000, 15000); // first seen in vid after approx 12s - m_uiBerserkTimer = MINUTE*12*IN_MILLISECONDS; // only in heroic, after 12min + m_uiBerserkTimer = MINUTE * 12 * IN_MILLISECONDS; // only in heroic, after 12min m_uiNecroticAuraCount = 0; } diff --git a/scripts/northrend/naxxramas/boss_maexxna.cpp b/scripts/northrend/naxxramas/boss_maexxna.cpp index 02eb3c4aa..d5ceb0f45 100644 --- a/scripts/northrend/naxxramas/boss_maexxna.cpp +++ b/scripts/northrend/naxxramas/boss_maexxna.cpp @@ -46,9 +46,9 @@ enum SPELL_FRENZY = 54123, SPELL_FRENZY_H = 54124, - //SPELL_SUMMON_SPIDERLING_1 = 29434, // removed from dbc. Summons 10 spiderlings - //SPELL_SUMMON_SPIDERLING_2 = 30076, // removed from dbc. Summons 3 spiderlings - //SPELL_SUMMON_WEB_WRAP = 28627, // removed from dbc. Summons one web wrap and transforms it into creature 17286 + // SPELL_SUMMON_SPIDERLING_1 = 29434, // removed from dbc. Summons 10 spiderlings + // SPELL_SUMMON_SPIDERLING_2 = 30076, // removed from dbc. Summons 3 spiderlings + // SPELL_SUMMON_WEB_WRAP = 28627, // removed from dbc. Summons one web wrap and transforms it into creature 17286 NPC_WEB_WRAP = 16486, NPC_SPIDERLING = 17055, @@ -100,7 +100,7 @@ struct MANGOS_DLL_DECL npc_web_wrapAI : public ScriptedAI uiEffectMiscValue = 400; // Note: normally we should use the Knockback effect to handle this, but because this doesn't behave as expected we'll just use Jump Movement - //pVictim->KnockBackFrom(m_creature, -fDist, uiEffectMiscValue * 0.1f); + // pVictim->KnockBackFrom(m_creature, -fDist, uiEffectMiscValue * 0.1f); float fSpeed = fDist * (uiEffectMiscValue * 0.01f); pVictim->GetMotionMaster()->MoveJump(m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), fSpeed, 0.0f); diff --git a/scripts/northrend/naxxramas/boss_noth.cpp b/scripts/northrend/naxxramas/boss_noth.cpp index ceab11a0e..ef9053d03 100644 --- a/scripts/northrend/naxxramas/boss_noth.cpp +++ b/scripts/northrend/naxxramas/boss_noth.cpp @@ -117,7 +117,7 @@ struct MANGOS_DLL_DECL boss_nothAI : public ScriptedAI void Aggro(Unit* pWho) { - switch(urand(0, 2)) + switch (urand(0, 2)) { case 0: DoScriptText(SAY_AGGRO1, m_creature); break; case 1: DoScriptText(SAY_AGGRO2, m_creature); break; @@ -176,7 +176,7 @@ struct MANGOS_DLL_DECL boss_nothAI : public ScriptedAI m_uiPhase = PHASE_BALCONY; ++m_uiPhaseSub; - switch(m_uiPhaseSub) // Set Duration of Skeleton phase + switch (m_uiPhaseSub) // Set Duration of Skeleton phase { case PHASE_SKELETON_1: m_uiPhaseTimer = 70000; break; case PHASE_SKELETON_2: m_uiPhaseTimer = 97000; break; @@ -228,8 +228,8 @@ struct MANGOS_DLL_DECL boss_nothAI : public ScriptedAI SPELL_SUMMON_WARRIOR_1, SPELL_SUMMON_WARRIOR_2, SPELL_SUMMON_WARRIOR_3 }; - for(uint8 i = 0; i < 2; ++i) - DoCastSpellIfCan(m_creature, auiSpellSummonPlaguedWarrior[urand(0,2)], CAST_TRIGGERED); + for (uint8 i = 0; i < 2; ++i) + DoCastSpellIfCan(m_creature, auiSpellSummonPlaguedWarrior[urand(0, 2)], CAST_TRIGGERED); } else { @@ -284,12 +284,12 @@ struct MANGOS_DLL_DECL boss_nothAI : public ScriptedAI }; // A bit unclear how many in each sub phase - switch(m_uiPhaseSub) + switch (m_uiPhaseSub) { case PHASE_SKELETON_1: { for (uint8 i = 0; i < (m_bIsRegularMode ? 2 : 4); ++i) - DoCastSpellIfCan(m_creature, auiSpellSummonPlaguedChampion[urand(0,9)], CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, auiSpellSummonPlaguedChampion[urand(0, 9)], CAST_TRIGGERED); break; } @@ -297,15 +297,15 @@ struct MANGOS_DLL_DECL boss_nothAI : public ScriptedAI { for (uint8 i = 0; i < (m_bIsRegularMode ? 1 : 2); ++i) { - DoCastSpellIfCan(m_creature, auiSpellSummonPlaguedChampion[urand(0,9)], CAST_TRIGGERED); - DoCastSpellIfCan(m_creature, auiSpellSummonPlaguedGuardian[urand(0,3)], CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, auiSpellSummonPlaguedChampion[urand(0, 9)], CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, auiSpellSummonPlaguedGuardian[urand(0, 3)], CAST_TRIGGERED); } break; } case PHASE_SKELETON_3: { for (uint8 i = 0; i < (m_bIsRegularMode ? 2 : 4); ++i) - DoCastSpellIfCan(m_creature, auiSpellSummonPlaguedGuardian[urand(0,3)], CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, auiSpellSummonPlaguedGuardian[urand(0, 3)], CAST_TRIGGERED); break; } diff --git a/scripts/northrend/naxxramas/boss_patchwerk.cpp b/scripts/northrend/naxxramas/boss_patchwerk.cpp index e9e84aa59..ab5b636d8 100644 --- a/scripts/northrend/naxxramas/boss_patchwerk.cpp +++ b/scripts/northrend/naxxramas/boss_patchwerk.cpp @@ -61,8 +61,8 @@ struct MANGOS_DLL_DECL boss_patchwerkAI : public ScriptedAI void Reset() { - m_uiHatefulStrikeTimer = 1000; //1 second - m_uiBerserkTimer = MINUTE*6*IN_MILLISECONDS; //6 minutes + m_uiHatefulStrikeTimer = 1000; // 1 second + m_uiBerserkTimer = MINUTE * 6 * IN_MILLISECONDS; // 6 minutes m_uiSlimeboltTimer = 10000; m_bEnraged = false; m_bBerserk = false; @@ -86,7 +86,7 @@ struct MANGOS_DLL_DECL boss_patchwerkAI : public ScriptedAI void Aggro(Unit* pWho) { - DoScriptText(urand(0, 1)?SAY_AGGRO1:SAY_AGGRO2, m_creature); + DoScriptText(urand(0, 1) ? SAY_AGGRO1 : SAY_AGGRO2, m_creature); if (m_pInstance) m_pInstance->SetData(TYPE_PATCHWERK, IN_PROGRESS); diff --git a/scripts/northrend/naxxramas/boss_razuvious.cpp b/scripts/northrend/naxxramas/boss_razuvious.cpp index 4875e84e5..0e7c74b0f 100644 --- a/scripts/northrend/naxxramas/boss_razuvious.cpp +++ b/scripts/northrend/naxxramas/boss_razuvious.cpp @@ -74,7 +74,7 @@ struct MANGOS_DLL_DECL boss_razuviousAI : public ScriptedAI if (urand(0, 3)) return; - switch(urand(0, 1)) + switch (urand(0, 1)) { case 0: DoScriptText(SAY_SLAY1, m_creature); break; case 1: DoScriptText(SAY_SLAY2, m_creature); break; @@ -93,7 +93,7 @@ struct MANGOS_DLL_DECL boss_razuviousAI : public ScriptedAI void Aggro(Unit* pWho) { - switch(urand(0, 2)) + switch (urand(0, 2)) { case 0: DoScriptText(SAY_AGGRO1, m_creature); break; case 1: DoScriptText(SAY_AGGRO2, m_creature); break; @@ -148,7 +148,7 @@ struct MANGOS_DLL_DECL boss_razuviousAI : public ScriptedAI // Random say if (m_uiCommandSoundTimer < uiDiff) { - switch(urand(0, 3)) + switch (urand(0, 3)) { case 0: DoScriptText(SAY_COMMAND1, m_creature); break; case 1: DoScriptText(SAY_COMMAND2, m_creature); break; diff --git a/scripts/northrend/naxxramas/boss_sapphiron.cpp b/scripts/northrend/naxxramas/boss_sapphiron.cpp index 502e17150..d566edeb8 100644 --- a/scripts/northrend/naxxramas/boss_sapphiron.cpp +++ b/scripts/northrend/naxxramas/boss_sapphiron.cpp @@ -116,7 +116,7 @@ struct MANGOS_DLL_DECL boss_sapphironAI : public ScriptedAI SetCombatMovement(true); m_creature->SetLevitate(false); - //m_creature->ApplySpellMod(SPELL_FROST_AURA, SPELLMOD_DURATION, -1); + // m_creature->ApplySpellMod(SPELL_FROST_AURA, SPELLMOD_DURATION, -1); } void Aggro(Unit* pWho) diff --git a/scripts/northrend/naxxramas/boss_thaddius.cpp b/scripts/northrend/naxxramas/boss_thaddius.cpp index 51e3d7aef..5cf314bff 100644 --- a/scripts/northrend/naxxramas/boss_thaddius.cpp +++ b/scripts/northrend/naxxramas/boss_thaddius.cpp @@ -38,7 +38,7 @@ enum SAY_STAL_SLAY = -1533024, SAY_STAL_DEATH = -1533025, - //Feugen + // Feugen SAY_FEUG_AGGRO = -1533026, SAY_FEUG_SLAY = -1533027, SAY_FEUG_DEATH = -1533028, @@ -47,7 +47,7 @@ enum EMOTE_LOSING_LINK = -1533149, EMOTE_TESLA_OVERLOAD = -1533150, - //Thaddus + // Thaddus SAY_AGGRO_1 = -1533030, SAY_AGGRO_2 = -1533031, SAY_AGGRO_3 = -1533032, @@ -72,7 +72,7 @@ enum SPELL_CLEAR_CHARGES = 63133, // TODO NYI, cast on death, most likely to remove remaining buffs // Stalagg & Feugen Spells - //SPELL_WARSTOMP = 28125, // Not used in Wotlk Version + // SPELL_WARSTOMP = 28125, // Not used in Wotlk Version SPELL_MAGNETIC_PULL_A = 28338, SPELL_MAGNETIC_PULL_B = 54517, // used by Feugen (wotlk) SPELL_STATIC_FIELD = 28135, @@ -87,7 +87,7 @@ enum SPELL_STALAGG_TESLA_PASSIVE = 28097, SPELL_SHOCK_OVERLOAD = 28159, SPELL_SHOCK = 28099, - }; +}; /************ ** boss_thaddius @@ -114,17 +114,17 @@ struct MANGOS_DLL_DECL boss_thaddiusAI : public Scripted_NoMovementAI void Reset() { - m_uiPolarityShiftTimer = 15*IN_MILLISECONDS; - m_uiChainLightningTimer = 8*IN_MILLISECONDS; - m_uiBallLightningTimer = 1*IN_MILLISECONDS; - m_uiBerserkTimer = 6*MINUTE*IN_MILLISECONDS; + m_uiPolarityShiftTimer = 15 * IN_MILLISECONDS; + m_uiChainLightningTimer = 8 * IN_MILLISECONDS; + m_uiBallLightningTimer = 1 * IN_MILLISECONDS; + m_uiBerserkTimer = 6 * MINUTE * IN_MILLISECONDS; m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); } void Aggro(Unit* pWho) { - switch (urand(0,2)) + switch (urand(0, 2)) { case 0: DoScriptText(SAY_AGGRO_1, m_creature); break; case 1: DoScriptText(SAY_AGGRO_2, m_creature); break; @@ -196,7 +196,7 @@ struct MANGOS_DLL_DECL boss_thaddiusAI : public Scripted_NoMovementAI if (m_uiBerserkTimer < uiDiff) { if (DoCastSpellIfCan(m_creature, SPELL_BESERK) == CAST_OK) // allow combat movement? - m_uiBerserkTimer = 10*MINUTE*IN_MILLISECONDS; + m_uiBerserkTimer = 10 * MINUTE * IN_MILLISECONDS; } else m_uiBerserkTimer -= uiDiff; @@ -208,7 +208,7 @@ struct MANGOS_DLL_DECL boss_thaddiusAI : public Scripted_NoMovementAI { DoScriptText(SAY_ELECT, m_creature); DoScriptText(EMOTE_POLARITY_SHIFT, m_creature); - m_uiPolarityShiftTimer = 30*IN_MILLISECONDS; + m_uiPolarityShiftTimer = 30 * IN_MILLISECONDS; } } else @@ -219,7 +219,7 @@ struct MANGOS_DLL_DECL boss_thaddiusAI : public Scripted_NoMovementAI { Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0); if (pTarget && DoCastSpellIfCan(pTarget, m_bIsRegularMode ? SPELL_CHAIN_LIGHTNING : SPELL_CHAIN_LIGHTNING_H) == CAST_OK) - m_uiChainLightningTimer = 15*IN_MILLISECONDS; + m_uiChainLightningTimer = 15 * IN_MILLISECONDS; } else m_uiChainLightningTimer -= uiDiff; @@ -231,7 +231,7 @@ struct MANGOS_DLL_DECL boss_thaddiusAI : public Scripted_NoMovementAI if (m_uiBallLightningTimer < uiDiff) { if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_BALL_LIGHTNING) == CAST_OK) - m_uiBallLightningTimer = 1*IN_MILLISECONDS; + m_uiBallLightningTimer = 1 * IN_MILLISECONDS; } else m_uiBallLightningTimer -= uiDiff; @@ -284,7 +284,7 @@ struct MANGOS_DLL_DECL npc_tesla_coilAI : public Scripted_NoMovementAI npc_tesla_coilAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { m_pInstance = (instance_naxxramas*)pCreature->GetInstanceData(); - m_uiSetupTimer = 1*IN_MILLISECONDS; + m_uiSetupTimer = 1 * IN_MILLISECONDS; m_uiOverloadTimer = 0; m_bReapply = false; Reset(); @@ -360,7 +360,7 @@ struct MANGOS_DLL_DECL npc_tesla_coilAI : public Scripted_NoMovementAI void SetOverloading() { - m_uiOverloadTimer = 14*IN_MILLISECONDS; // it takes some time to overload and activate Thaddius + m_uiOverloadTimer = 14 * IN_MILLISECONDS; // it takes some time to overload and activate Thaddius } void UpdateAI(const uint32 uiDiff) @@ -377,7 +377,7 @@ struct MANGOS_DLL_DECL npc_tesla_coilAI : public Scripted_NoMovementAI if (SetupChain()) m_uiSetupTimer = 0; else - m_uiSetupTimer = 5*IN_MILLISECONDS; + m_uiSetupTimer = 5 * IN_MILLISECONDS; } else m_uiSetupTimer -= uiDiff; @@ -428,7 +428,7 @@ struct MANGOS_DLL_DECL boss_thaddiusAddsAI : public ScriptedAI bool m_bBothDead; uint32 m_uiHoldTimer; - //uint32 m_uiWarStompTimer; + // uint32 m_uiWarStompTimer; uint32 m_uiReviveTimer; void Reset() @@ -436,9 +436,9 @@ struct MANGOS_DLL_DECL boss_thaddiusAddsAI : public ScriptedAI m_bFakeDeath = false; m_bBothDead = false; - m_uiReviveTimer = 5*IN_MILLISECONDS; - m_uiHoldTimer = 2*IN_MILLISECONDS; - //m_uiWarStompTimer = urand(8*IN_MILLISECONDS, 10*IN_MILLISECONDS); + m_uiReviveTimer = 5 * IN_MILLISECONDS; + m_uiHoldTimer = 2 * IN_MILLISECONDS; + // m_uiWarStompTimer = urand(8*IN_MILLISECONDS, 10*IN_MILLISECONDS); // We might Reset while faking death, so undo this m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); @@ -487,7 +487,7 @@ struct MANGOS_DLL_DECL boss_thaddiusAddsAI : public ScriptedAI { if (Creature* pTesla = m_pInstance->instance->GetCreature(*itr)) { - if (npc_tesla_coilAI* pTeslaAI = dynamic_cast (pTesla->AI())) + if (npc_tesla_coilAI* pTeslaAI = dynamic_cast(pTesla->AI())) pTeslaAI->ReApplyChain(m_creature->GetEntry()); } } @@ -500,7 +500,7 @@ struct MANGOS_DLL_DECL boss_thaddiusAddsAI : public ScriptedAI if (Creature* pOther = GetOtherAdd()) { - if (boss_thaddiusAddsAI* pOtherAI = dynamic_cast (pOther->AI())) + if (boss_thaddiusAddsAI* pOtherAI = dynamic_cast(pOther->AI())) { if (pOtherAI->IsCountingDead()) { @@ -548,7 +548,7 @@ struct MANGOS_DLL_DECL boss_thaddiusAddsAI : public ScriptedAI { if (Creature* pOther = GetOtherAdd()) { - if (boss_thaddiusAddsAI* pOtherAI = dynamic_cast (pOther->AI())) + if (boss_thaddiusAddsAI* pOtherAI = dynamic_cast(pOther->AI())) { if (!pOtherAI->IsCountingDead()) // Raid was to slow to kill the second add Revive(); @@ -563,7 +563,7 @@ struct MANGOS_DLL_DECL boss_thaddiusAddsAI : public ScriptedAI { if (Creature* pTesla = m_pInstance->instance->GetCreature(*itr)) { - if (npc_tesla_coilAI* pTeslaAI = dynamic_cast (pTesla->AI())) + if (npc_tesla_coilAI* pTeslaAI = dynamic_cast(pTesla->AI())) pTeslaAI->SetOverloading(); } } @@ -653,7 +653,7 @@ struct MANGOS_DLL_DECL boss_stalaggAI : public boss_thaddiusAddsAI void Reset() { boss_thaddiusAddsAI::Reset(); - m_uiPowerSurgeTimer = urand(10*IN_MILLISECONDS, 15*IN_MILLISECONDS); + m_uiPowerSurgeTimer = urand(10 * IN_MILLISECONDS, 15 * IN_MILLISECONDS); } void Aggro(Unit* pWho) @@ -664,7 +664,7 @@ struct MANGOS_DLL_DECL boss_stalaggAI : public boss_thaddiusAddsAI void JustDied(Unit* pKiller) { - DoScriptText(SAY_STAL_DEATH, m_creature); + DoScriptText(SAY_STAL_DEATH, m_creature); } void KilledUnit(Unit* pVictim) @@ -678,7 +678,7 @@ struct MANGOS_DLL_DECL boss_stalaggAI : public boss_thaddiusAddsAI if (m_uiPowerSurgeTimer < uiDiff) { if (DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_POWERSURGE : SPELL_POWERSURGE_H) == CAST_OK) - m_uiPowerSurgeTimer = urand(10*IN_MILLISECONDS, 15*IN_MILLISECONDS); + m_uiPowerSurgeTimer = urand(10 * IN_MILLISECONDS, 15 * IN_MILLISECONDS); } else m_uiPowerSurgeTimer -= uiDiff; @@ -701,13 +701,13 @@ struct MANGOS_DLL_DECL boss_feugenAI : public boss_thaddiusAddsAI Reset(); } uint32 m_uiStaticFieldTimer; - uint32 m_uiMagneticPullTimer; // TODO, missing + uint32 m_uiMagneticPullTimer; // TODO, missing void Reset() { boss_thaddiusAddsAI::Reset(); - m_uiStaticFieldTimer = urand(10*IN_MILLISECONDS, 15*IN_MILLISECONDS); - m_uiMagneticPullTimer = 20*IN_MILLISECONDS; + m_uiStaticFieldTimer = urand(10 * IN_MILLISECONDS, 15 * IN_MILLISECONDS); + m_uiMagneticPullTimer = 20 * IN_MILLISECONDS; } void Aggro(Unit* pWho) @@ -732,7 +732,7 @@ struct MANGOS_DLL_DECL boss_feugenAI : public boss_thaddiusAddsAI if (m_uiStaticFieldTimer < uiDiff) { if (DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_STATIC_FIELD : SPELL_STATIC_FIELD_H) == CAST_OK) - m_uiStaticFieldTimer = urand(10*IN_MILLISECONDS, 15*IN_MILLISECONDS); + m_uiStaticFieldTimer = urand(10 * IN_MILLISECONDS, 15 * IN_MILLISECONDS); } else m_uiStaticFieldTimer -= uiDiff; diff --git a/scripts/northrend/naxxramas/instance_naxxramas.cpp b/scripts/northrend/naxxramas/instance_naxxramas.cpp index ba914d636..611991e55 100644 --- a/scripts/northrend/naxxramas/instance_naxxramas.cpp +++ b/scripts/northrend/naxxramas/instance_naxxramas.cpp @@ -41,7 +41,7 @@ static const DialogueEntry aNaxxDialogue[] = {SAY_ZELI_TAUNT2, NPC_ZELIEK, 5000}, {SAY_KORT_TAUNT2, NPC_THANE, 7000}, {SAY_RIVE_TAUNT2, NPC_RIVENDARE, 0}, - {0,0,0} + {0, 0, 0} }; instance_naxxramas::instance_naxxramas(Map* pMap) : ScriptedInstance(pMap), @@ -67,7 +67,7 @@ void instance_naxxramas::Initialize() void instance_naxxramas::OnCreatureCreate(Creature* pCreature) { - switch(pCreature->GetEntry()) + switch (pCreature->GetEntry()) { case NPC_ANUB_REKHAN: case NPC_FAERLINA: @@ -91,9 +91,9 @@ void instance_naxxramas::OnCreatureCreate(Creature* pCreature) void instance_naxxramas::OnObjectCreate(GameObject* pGo) { - switch(pGo->GetEntry()) + switch (pGo->GetEntry()) { - // Arachnid Quarter + // Arachnid Quarter case GO_ARAC_ANUB_DOOR: break; case GO_ARAC_ANUB_GATE: @@ -113,7 +113,7 @@ void instance_naxxramas::OnObjectCreate(GameObject* pGo) pGo->SetGoState(GO_STATE_ACTIVE); break; - // Plague Quarter + // Plague Quarter case GO_PLAG_NOTH_ENTRY_DOOR: break; case GO_PLAG_NOTH_EXIT_DOOR: @@ -131,7 +131,7 @@ void instance_naxxramas::OnObjectCreate(GameObject* pGo) case GO_PLAG_LOAT_DOOR: break; - // Military Quarter + // Military Quarter case GO_MILI_GOTH_ENTRY_GATE: break; case GO_MILI_GOTH_EXIT_GATE: @@ -148,7 +148,7 @@ void instance_naxxramas::OnObjectCreate(GameObject* pGo) case GO_CHEST_HORSEMEN_HERO: break; - // Construct Quarter + // Construct Quarter case GO_CONS_PATH_EXIT_DOOR: if (m_auiEncounter[TYPE_PATCHWERK] == DONE) pGo->SetGoState(GO_STATE_ACTIVE); @@ -170,7 +170,7 @@ void instance_naxxramas::OnObjectCreate(GameObject* pGo) pGo->SetGoState(GO_STATE_READY); break; - // Frostwyrm Lair + // Frostwyrm Lair case GO_KELTHUZAD_WATERFALL_DOOR: if (m_auiEncounter[TYPE_SAPPHIRON] == DONE) pGo->SetGoState(GO_STATE_ACTIVE); @@ -178,7 +178,7 @@ void instance_naxxramas::OnObjectCreate(GameObject* pGo) case GO_KELTHUZAD_EXIT_DOOR: break; - // Eyes + // Eyes case GO_ARAC_EYE_RAMP: case GO_ARAC_EYE_BOSS: if (m_auiEncounter[TYPE_MAEXXNA] == DONE) @@ -200,7 +200,7 @@ void instance_naxxramas::OnObjectCreate(GameObject* pGo) pGo->SetGoState(GO_STATE_ACTIVE); break; - // Portals + // Portals case GO_ARAC_PORTAL: if (m_auiEncounter[TYPE_MAEXXNA] == DONE) pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NO_INTERACT); @@ -271,7 +271,7 @@ bool instance_naxxramas::IsEncounterInProgress() const void instance_naxxramas::SetData(uint32 uiType, uint32 uiData) { - switch(uiType) + switch (uiType) { case TYPE_ANUB_REKHAN: m_auiEncounter[uiType] = uiData; @@ -300,7 +300,7 @@ void instance_naxxramas::SetData(uint32 uiType, uint32 uiData) { DoUseDoorOrButton(GO_ARAC_EYE_RAMP); DoUseDoorOrButton(GO_ARAC_EYE_BOSS); - DoRespawnGameObject(GO_ARAC_PORTAL, 30*MINUTE); + DoRespawnGameObject(GO_ARAC_PORTAL, 30 * MINUTE); DoToggleGameObjectFlags(GO_ARAC_PORTAL, GO_FLAG_NO_INTERACT, false); m_uiTauntTimer = 5000; } @@ -331,7 +331,7 @@ void instance_naxxramas::SetData(uint32 uiType, uint32 uiData) { DoUseDoorOrButton(GO_PLAG_EYE_RAMP); DoUseDoorOrButton(GO_PLAG_EYE_BOSS); - DoRespawnGameObject(GO_PLAG_PORTAL, 30*MINUTE); + DoRespawnGameObject(GO_PLAG_PORTAL, 30 * MINUTE); DoToggleGameObjectFlags(GO_PLAG_PORTAL, GO_FLAG_NO_INTERACT, false); m_uiTauntTimer = 5000; } @@ -340,7 +340,7 @@ void instance_naxxramas::SetData(uint32 uiType, uint32 uiData) m_auiEncounter[uiType] = uiData; break; case TYPE_GOTHIK: - switch(uiData) + switch (uiData) { case IN_PROGRESS: DoUseDoorOrButton(GO_MILI_GOTH_ENTRY_GATE); @@ -387,9 +387,9 @@ void instance_naxxramas::SetData(uint32 uiType, uint32 uiData) { DoUseDoorOrButton(GO_MILI_EYE_RAMP); DoUseDoorOrButton(GO_MILI_EYE_BOSS); - DoRespawnGameObject(GO_MILI_PORTAL, 30*MINUTE); + DoRespawnGameObject(GO_MILI_PORTAL, 30 * MINUTE); DoToggleGameObjectFlags(GO_MILI_PORTAL, GO_FLAG_NO_INTERACT, false); - DoRespawnGameObject(instance->IsRegularDifficulty() ? GO_CHEST_HORSEMEN_NORM : GO_CHEST_HORSEMEN_HERO, 30*MINUTE); + DoRespawnGameObject(instance->IsRegularDifficulty() ? GO_CHEST_HORSEMEN_NORM : GO_CHEST_HORSEMEN_HERO, 30 * MINUTE); m_uiTauntTimer = 5000; } break; @@ -420,13 +420,13 @@ void instance_naxxramas::SetData(uint32 uiType, uint32 uiData) if (uiData != SPECIAL) DoUseDoorOrButton(GO_CONS_THAD_DOOR, uiData); // Uncomment when this achievement is implemented - //if (uiData == IN_PROGRESS) + // if (uiData == IN_PROGRESS) // SetSpecialAchievementCriteria(TYPE_ACHIEV_SHOCKING, true); if (uiData == DONE) { DoUseDoorOrButton(GO_CONS_EYE_RAMP); DoUseDoorOrButton(GO_CONS_EYE_BOSS); - DoRespawnGameObject(GO_CONS_PORTAL, 30*MINUTE); + DoRespawnGameObject(GO_CONS_PORTAL, 30 * MINUTE); DoToggleGameObjectFlags(GO_CONS_PORTAL, GO_FLAG_NO_INTERACT, false); m_uiTauntTimer = 5000; } @@ -434,7 +434,7 @@ void instance_naxxramas::SetData(uint32 uiType, uint32 uiData) case TYPE_SAPPHIRON: m_auiEncounter[uiType] = uiData; // Uncomment when achiev check implemented - //if (uiData == IN_PROGRESS) + // if (uiData == IN_PROGRESS) // SetSpecialAchievementCriteria(TYPE_ACHIEV_HUNDRED_CLUB, true); if (uiData == DONE) { @@ -459,10 +459,10 @@ void instance_naxxramas::SetData(uint32 uiType, uint32 uiData) std::ostringstream saveStream; saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2] << " " - << m_auiEncounter[3] << " " << m_auiEncounter[4] << " " << m_auiEncounter[5] << " " - << m_auiEncounter[6] << " " << m_auiEncounter[7] << " " << m_auiEncounter[8] << " " - << m_auiEncounter[9] << " " << m_auiEncounter[10] << " " << m_auiEncounter[11] << " " - << m_auiEncounter[12] << " " << m_auiEncounter[13] << " " << m_auiEncounter[14] << " " << m_auiEncounter[15]; + << m_auiEncounter[3] << " " << m_auiEncounter[4] << " " << m_auiEncounter[5] << " " + << m_auiEncounter[6] << " " << m_auiEncounter[7] << " " << m_auiEncounter[8] << " " + << m_auiEncounter[9] << " " << m_auiEncounter[10] << " " << m_auiEncounter[11] << " " + << m_auiEncounter[12] << " " << m_auiEncounter[13] << " " << m_auiEncounter[14] << " " << m_auiEncounter[15]; m_strInstData = saveStream.str(); @@ -483,11 +483,11 @@ void instance_naxxramas::Load(const char* chrIn) std::istringstream loadStream(chrIn); loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3] - >> m_auiEncounter[4] >> m_auiEncounter[5] >> m_auiEncounter[6] >> m_auiEncounter[7] - >> m_auiEncounter[8] >> m_auiEncounter[9] >> m_auiEncounter[10] >> m_auiEncounter[11] - >> m_auiEncounter[12] >> m_auiEncounter[13] >> m_auiEncounter[14] >> m_auiEncounter[15]; + >> m_auiEncounter[4] >> m_auiEncounter[5] >> m_auiEncounter[6] >> m_auiEncounter[7] + >> m_auiEncounter[8] >> m_auiEncounter[9] >> m_auiEncounter[10] >> m_auiEncounter[11] + >> m_auiEncounter[12] >> m_auiEncounter[13] >> m_auiEncounter[14] >> m_auiEncounter[15]; - for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) + for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) { if (m_auiEncounter[i] == IN_PROGRESS) m_auiEncounter[i] = NOT_STARTED; @@ -532,7 +532,7 @@ bool instance_naxxramas::CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Playe case ACHIEV_CRIT_GET_ENOUGH_N: case ACHIEV_CRIT_GET_ENOUGH_H: return m_abAchievCriteria[TYPE_ACHIEV_GET_ENOUGH]; - // 'The Immortal'(25m) or 'Undying'(10m) - (achievs 2186, 2187) + // 'The Immortal'(25m) or 'Undying'(10m) - (achievs 2186, 2187) case ACHIEV_CRIT_IMMORTAL_KEL: case ACHIEV_CRIT_IMMOORTAL_LOA: case ACHIEV_CRIT_IMMOORTAL_THAD: @@ -580,7 +580,7 @@ void instance_naxxramas::SetGothTriggers() if (!pGoth) return; - for(GuidList::const_iterator itr = m_lGothTriggerList.begin(); itr != m_lGothTriggerList.end(); ++itr) + for (GuidList::const_iterator itr = m_lGothTriggerList.begin(); itr != m_lGothTriggerList.end(); ++itr) { if (Creature* pTrigger = instance->GetCreature(*itr)) { @@ -618,7 +618,7 @@ Creature* instance_naxxramas::GetClosestAnchorForGoth(Creature* pSource, bool bR return NULL; } -void instance_naxxramas::GetGothSummonPointCreatures(std::list &lList, bool bRightSide) +void instance_naxxramas::GetGothSummonPointCreatures(std::list& lList, bool bRightSide) { for (UNORDERED_MAP::iterator itr = m_mGothTriggerMap.begin(); itr != m_mGothTriggerMap.end(); ++itr) { @@ -680,7 +680,7 @@ void instance_naxxramas::DoTaunt() if (m_auiEncounter[TYPE_THADDIUS] == DONE) ++uiWingsCleared; - switch(uiWingsCleared) + switch (uiWingsCleared) { case 1: DoOrSimulateScriptTextForThisInstance(SAY_KELTHUZAD_TAUNT1, NPC_KELTHUZAD); break; case 2: DoOrSimulateScriptTextForThisInstance(SAY_KELTHUZAD_TAUNT2, NPC_KELTHUZAD); break; diff --git a/scripts/northrend/naxxramas/naxxramas.h b/scripts/northrend/naxxramas/naxxramas.h index 164afcc14..86155f03a 100644 --- a/scripts/northrend/naxxramas/naxxramas.h +++ b/scripts/northrend/naxxramas/naxxramas.h @@ -91,7 +91,7 @@ enum // Gothik NPC_GOTHIK = 16060, - NPC_SUB_BOSS_TRIGGER = 16137, //summon locations + NPC_SUB_BOSS_TRIGGER = 16137, // summon locations NPC_UNREL_TRAINEE = 16124, NPC_UNREL_DEATH_KNIGHT = 16125, NPC_UNREL_RIDER = 16126, @@ -107,29 +107,29 @@ enum NPC_GUARDIAN = 16441, // Arachnid Quarter - GO_ARAC_ANUB_DOOR = 181126, //encounter door - GO_ARAC_ANUB_GATE = 181195, //open after boss is dead - GO_ARAC_FAER_WEB = 181235, //encounter door - GO_ARAC_FAER_DOOR = 194022, //after faerlina, to outer ring - GO_ARAC_MAEX_INNER_DOOR = 181197, //encounter door - GO_ARAC_MAEX_OUTER_DOOR = 181209, //right before maex + GO_ARAC_ANUB_DOOR = 181126, // encounter door + GO_ARAC_ANUB_GATE = 181195, // open after boss is dead + GO_ARAC_FAER_WEB = 181235, // encounter door + GO_ARAC_FAER_DOOR = 194022, // after faerlina, to outer ring + GO_ARAC_MAEX_INNER_DOOR = 181197, // encounter door + GO_ARAC_MAEX_OUTER_DOOR = 181209, // right before maex // Plague Quarter - GO_PLAG_SLIME01_DOOR = 181198, //not used - GO_PLAG_SLIME02_DOOR = 181199, //not used - GO_PLAG_NOTH_ENTRY_DOOR = 181200, //encounter door - GO_PLAG_NOTH_EXIT_DOOR = 181201, //exit, open when boss dead + GO_PLAG_SLIME01_DOOR = 181198, // not used + GO_PLAG_SLIME02_DOOR = 181199, // not used + GO_PLAG_NOTH_ENTRY_DOOR = 181200, // encounter door + GO_PLAG_NOTH_EXIT_DOOR = 181201, // exit, open when boss dead GO_PLAG_HEIG_ENTRY_DOOR = 181202, - GO_PLAG_HEIG_EXIT_DOOR = 181203, //exit, open when boss dead - GO_PLAG_LOAT_DOOR = 181241, //encounter door + GO_PLAG_HEIG_EXIT_DOOR = 181203, // exit, open when boss dead + GO_PLAG_LOAT_DOOR = 181241, // encounter door // Military Quarter - GO_MILI_GOTH_ENTRY_GATE = 181124, //used while encounter is in progress - GO_MILI_GOTH_EXIT_GATE = 181125, //exit, open at boss dead - GO_MILI_GOTH_COMBAT_GATE = 181170, //used while encounter is in progress - GO_MILI_HORSEMEN_DOOR = 181119, //encounter door + GO_MILI_GOTH_ENTRY_GATE = 181124, // used while encounter is in progress + GO_MILI_GOTH_EXIT_GATE = 181125, // exit, open at boss dead + GO_MILI_GOTH_COMBAT_GATE = 181170, // used while encounter is in progress + GO_MILI_HORSEMEN_DOOR = 181119, // encounter door - GO_CHEST_HORSEMEN_NORM = 181366, //four horsemen event, DoRespawnGameObject() when event == DONE + GO_CHEST_HORSEMEN_NORM = 181366, // four horsemen event, DoRespawnGameObject() when event == DONE GO_CHEST_HORSEMEN_HERO = 193426, // Construct Quarter @@ -235,15 +235,15 @@ class MANGOS_DLL_DECL instance_naxxramas : public ScriptedInstance // goth void SetGothTriggers(); Creature* GetClosestAnchorForGoth(Creature* pSource, bool bRightSide); - void GetGothSummonPointCreatures(std::list &lList, bool bRightSide); + void GetGothSummonPointCreatures(std::list& lList, bool bRightSide); bool IsInRightSideGothArea(Unit* pUnit); // thaddius - void GetThadTeslaCreatures(GuidList &lList){ lList = m_lThadTeslaCoilList; }; + void GetThadTeslaCreatures(GuidList& lList) { lList = m_lThadTeslaCoilList; }; // kel void SetChamberCenterCoords(float fX, float fY, float fZ); - void GetChamberCenterCoords(float &fX, float &fY, float &fZ) { fX = m_fChamberCenterX; fY = m_fChamberCenterY; fZ = m_fChamberCenterZ; } + void GetChamberCenterCoords(float& fX, float& fY, float& fZ) { fX = m_fChamberCenterX; fY = m_fChamberCenterY; fZ = m_fChamberCenterZ; } void DoTaunt(); protected: diff --git a/scripts/northrend/nexus/eye_of_eternity/boss_malygos.cpp b/scripts/northrend/nexus/eye_of_eternity/boss_malygos.cpp index a5e4ad216..d2dfde489 100644 --- a/scripts/northrend/nexus/eye_of_eternity/boss_malygos.cpp +++ b/scripts/northrend/nexus/eye_of_eternity/boss_malygos.cpp @@ -72,7 +72,7 @@ enum SPELL_SUMMON_ARCANE_BOMB = 56429, SPELL_ARCANE_BOMB = 56430, // triggers 56432 and 56431 on target hit SPELL_SURGE_OF_POWER_PULSE = 56505, // deep breath spell - //SPELL_ARCANE_PULSE = 57432, // purpose unk + // SPELL_ARCANE_PULSE = 57432, // purpose unk // transition spells SPELL_DESTROY_PLATFORM_PRE = 58842, @@ -97,8 +97,8 @@ enum SPELL_VORTEX_CHANNEL = 56237, // arcane overload - handled in core - //SPELL_ARCANE_OVERLOAD = 56432, - //SPELL_ARCANE_BOMB_DAMAGE = 56431, + // SPELL_ARCANE_OVERLOAD = 56432, + // SPELL_ARCANE_BOMB_DAMAGE = 56431, // static field SPELL_STATIC_FIELD = 57428, @@ -194,7 +194,7 @@ struct MANGOS_DLL_DECL boss_malygosAI : public ScriptedAI, private DialogueHelpe { m_uiPhase = PHASE_FLOOR; - m_uiBerserkTimer = 10*MINUTE*IN_MILLISECONDS; + m_uiBerserkTimer = 10 * MINUTE * IN_MILLISECONDS; m_uiVortexTimer = 60000; m_uiArcaneBreathTimer = 15000; m_uiPowerSparkTimer = 30000; @@ -262,7 +262,7 @@ struct MANGOS_DLL_DECL boss_malygosAI : public ScriptedAI, private DialogueHelpe void JustDied(Unit* pKiller) { DoScriptText(SAY_DEATH, m_creature); - m_creature->SummonCreature(NPC_ALEXSTRASZA, aAlextraszaSpawnPos[0], aAlextraszaSpawnPos[1], aAlextraszaSpawnPos[2], aAlextraszaSpawnPos[3], TEMPSUMMON_TIMED_DESPAWN, 5*MINUTE*IN_MILLISECONDS); + m_creature->SummonCreature(NPC_ALEXSTRASZA, aAlextraszaSpawnPos[0], aAlextraszaSpawnPos[1], aAlextraszaSpawnPos[2], aAlextraszaSpawnPos[3], TEMPSUMMON_TIMED_DESPAWN, 5 * MINUTE * IN_MILLISECONDS); if (m_pInstance) m_pInstance->SetData(TYPE_MALYGOS, DONE); diff --git a/scripts/northrend/nexus/eye_of_eternity/instance_eye_of_eternity.cpp b/scripts/northrend/nexus/eye_of_eternity/instance_eye_of_eternity.cpp index 441300914..f23a23125 100644 --- a/scripts/northrend/nexus/eye_of_eternity/instance_eye_of_eternity.cpp +++ b/scripts/northrend/nexus/eye_of_eternity/instance_eye_of_eternity.cpp @@ -56,7 +56,7 @@ bool instance_eye_of_eternity::IsEncounterInProgress() const void instance_eye_of_eternity::OnCreatureCreate(Creature* pCreature) { - switch(pCreature->GetEntry()) + switch (pCreature->GetEntry()) { case NPC_MALYGOS: case NPC_ALEXSTRASZA: @@ -115,11 +115,11 @@ void instance_eye_of_eternity::JustDidDialogueStep(int32 iEntry) case NPC_ALEXSTRASZAS_GIFT: if (Creature* pGift = GetSingleCreatureFromStorage(NPC_ALEXSTRASZAS_GIFT)) pGift->CastSpell(pGift, SPELL_ALEXSTRASZAS_GIFT_VISUAL, false); - DoRespawnGameObject(instance->IsRegularDifficulty() ? GO_ALEXSTRASZAS_GIFT : GO_ALEXSTRASZAS_GIFT_H, 30*MINUTE); + DoRespawnGameObject(instance->IsRegularDifficulty() ? GO_ALEXSTRASZAS_GIFT : GO_ALEXSTRASZAS_GIFT_H, 30 * MINUTE); break; case GO_PLATFORM: // ToDo: respawn the platform and the portal - DoRespawnGameObject(instance->IsRegularDifficulty() ? GO_HEART_OF_MAGIC : GO_HEART_OF_MAGIC_H, 30*MINUTE); + DoRespawnGameObject(instance->IsRegularDifficulty() ? GO_HEART_OF_MAGIC : GO_HEART_OF_MAGIC_H, 30 * MINUTE); break; } } diff --git a/scripts/northrend/nexus/nexus/boss_anomalus.cpp b/scripts/northrend/nexus/nexus/boss_anomalus.cpp index 2f431be28..e84721684 100644 --- a/scripts/northrend/nexus/nexus/boss_anomalus.cpp +++ b/scripts/northrend/nexus/nexus/boss_anomalus.cpp @@ -139,7 +139,7 @@ struct MANGOS_DLL_DECL boss_anomalusAI : public ScriptedAI void UpdateAI(const uint32 uiDiff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim() || m_creature->HasAura(SPELL_RIFT_SHIELD)) - return; + return; // Create additional Chaotic Rift at 50% HP if (!m_bChaoticRift && m_creature->GetHealthPercent() < 50.0f) diff --git a/scripts/northrend/nexus/nexus/boss_keristrasza.cpp b/scripts/northrend/nexus/nexus/boss_keristrasza.cpp index 50e201fd1..5e273a855 100644 --- a/scripts/northrend/nexus/nexus/boss_keristrasza.cpp +++ b/scripts/northrend/nexus/nexus/boss_keristrasza.cpp @@ -183,7 +183,7 @@ struct MANGOS_DLL_DECL boss_keristraszaAI : public ScriptedAI if (Group* pGroup = pPlayer->GetGroup()) { - for(GroupReference* pRef = pGroup->GetFirstMember(); pRef != NULL; pRef = pRef->next()) + for (GroupReference* pRef = pGroup->GetFirstMember(); pRef != NULL; pRef = pRef->next()) { if (Player* pMember = pRef->getSource()) { diff --git a/scripts/northrend/nexus/nexus/boss_telestra.cpp b/scripts/northrend/nexus/nexus/boss_telestra.cpp index 267575359..25290fcd9 100644 --- a/scripts/northrend/nexus/nexus/boss_telestra.cpp +++ b/scripts/northrend/nexus/nexus/boss_telestra.cpp @@ -145,11 +145,11 @@ struct MANGOS_DLL_DECL boss_telestraAI : public ScriptedAI DoScriptText(SAY_KILL, m_creature); } - void SpellHit(Unit* pCaster, const SpellEntry *pSpell) + void SpellHit(Unit* pCaster, const SpellEntry* pSpell) { - switch(pSpell->Id) + switch (pSpell->Id) { - // eventAi must make sure clones cast spells when each of them die + // eventAi must make sure clones cast spells when each of them die case SPELL_FIRE_DIES: case SPELL_ARCANE_DIES: case SPELL_FROST_DIES: @@ -192,7 +192,7 @@ struct MANGOS_DLL_DECL boss_telestraAI : public ScriptedAI void JustSummoned(Creature* pSummoned) { - switch(pSummoned->GetEntry()) + switch (pSummoned->GetEntry()) { case NPC_TELEST_FIRE: pSummoned->CastSpell(pSummoned, SPELL_FIRE_VISUAL, true); break; case NPC_TELEST_ARCANE: pSummoned->CastSpell(pSummoned, SPELL_ARCANE_VISUAL, true); break; @@ -208,7 +208,7 @@ struct MANGOS_DLL_DECL boss_telestraAI : public ScriptedAI if (m_bCanCheckAchiev) m_uiPersonalityTimer += uiDiff; - switch(m_uiPhase) + switch (m_uiPhase) { case PHASE_1: case PHASE_3: diff --git a/scripts/northrend/nexus/nexus/instance_nexus.cpp b/scripts/northrend/nexus/nexus/instance_nexus.cpp index 7a11840a4..b4125b3bb 100644 --- a/scripts/northrend/nexus/nexus/instance_nexus.cpp +++ b/scripts/northrend/nexus/nexus/instance_nexus.cpp @@ -31,7 +31,7 @@ bool GOUse_go_containment_sphere(Player* pPlayer, GameObject* pGo) if (!pInstance) return false; - switch(pGo->GetEntry()) + switch (pGo->GetEntry()) { case GO_CONTAINMENT_SPHERE_TELESTRA: pInstance->SetData(TYPE_TELESTRA, SPECIAL); break; case GO_CONTAINMENT_SPHERE_ANOMALUS: pInstance->SetData(TYPE_ANOMALUS, SPECIAL); break; @@ -193,7 +193,7 @@ void instance_nexus::Load(const char* chrIn) std::istringstream loadStream(chrIn); loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3]; - for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) + for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) { if (m_auiEncounter[i] == IN_PROGRESS) m_auiEncounter[i] = NOT_STARTED; diff --git a/scripts/northrend/nexus/oculus/boss_eregos.cpp b/scripts/northrend/nexus/oculus/boss_eregos.cpp index 830bcd038..d073375ca 100644 --- a/scripts/northrend/nexus/oculus/boss_eregos.cpp +++ b/scripts/northrend/nexus/oculus/boss_eregos.cpp @@ -101,7 +101,7 @@ struct MANGOS_DLL_DECL boss_eregosAI : public ScriptedAI void KilledUnit(Unit* pVictim) { - switch(urand(0, 2)) + switch (urand(0, 2)) { case 0: DoScriptText(SAY_KILL_1, m_creature); break; case 1: DoScriptText(SAY_KILL_2, m_creature); break; @@ -161,7 +161,7 @@ struct MANGOS_DLL_DECL boss_eregosAI : public ScriptedAI // This will summon an anomaly on each player coordinates DoCastSpellIfCan(m_creature, SPELL_PLANAR_ANOMALIES, CAST_TRIGGERED); - switch(urand(0, 2)) + switch (urand(0, 2)) { case 0: DoScriptText(SAY_ARCANE_SHIELD, m_creature); break; case 1: DoScriptText(SAY_FIRE_SHIELD, m_creature); break; diff --git a/scripts/northrend/nexus/oculus/boss_urom.cpp b/scripts/northrend/nexus/oculus/boss_urom.cpp index 355b21fb9..7a5148599 100644 --- a/scripts/northrend/nexus/oculus/boss_urom.cpp +++ b/scripts/northrend/nexus/oculus/boss_urom.cpp @@ -66,7 +66,7 @@ enum MAX_PLATFORMS = 3, }; -static uint32 uiTrashPacks[MAX_PLATFORMS][MAX_PLATFORMS]= +static uint32 uiTrashPacks[MAX_PLATFORMS][MAX_PLATFORMS] = { {NPC_PHANTASMAL_CLOUDSCRAPER, NPC_PHANTASMAL_MAMMOTH, NPC_PHANTASMAL_WOLF}, {NPC_PHANTASMAL_AIR, NPC_PHANTASMAL_FIRE, NPC_PHANTASMAL_WATER}, @@ -176,7 +176,7 @@ struct MANGOS_DLL_DECL boss_uromAI : public ScriptedAI void KilledUnit(Unit* pVictim) { - switch(urand(0, 2)) + switch (urand(0, 2)) { case 0: DoScriptText(SAY_KILL_1, m_creature); break; case 1: DoScriptText(SAY_KILL_2, m_creature); break; @@ -231,13 +231,13 @@ struct MANGOS_DLL_DECL boss_uromAI : public ScriptedAI // Summon the 3 mobs contained in the pack for (uint8 i = 0; i < MAX_PLATFORMS; ++i) { - m_creature->GetNearPoint(m_creature, fX, fY, fZ, 0, 10.0f, M_PI_F/2 * i); + m_creature->GetNearPoint(m_creature, fX, fY, fZ, 0, 10.0f, M_PI_F / 2 * i); m_creature->SummonCreature(uiTrashPacks[m_vuiTrashPacksIds[m_uiPlatformPhase]][i], fX, fY, fZ, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); } // Summon a fourth mob, which can be random - uint32 uiEntry = uiTrashPacks[m_vuiTrashPacksIds[m_uiPlatformPhase]][urand(0,2)]; - m_creature->GetNearPoint(m_creature, fX, fY, fZ, 0, 10.0f, M_PI_F/2 * 3); + uint32 uiEntry = uiTrashPacks[m_vuiTrashPacksIds[m_uiPlatformPhase]][urand(0, 2)]; + m_creature->GetNearPoint(m_creature, fX, fY, fZ, 0, 10.0f, M_PI_F / 2 * 3); m_creature->SummonCreature(uiEntry, fX, fY, fZ, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); } diff --git a/scripts/northrend/nexus/oculus/instance_oculus.cpp b/scripts/northrend/nexus/oculus/instance_oculus.cpp index c397afa03..cab4f7022 100644 --- a/scripts/northrend/nexus/oculus/instance_oculus.cpp +++ b/scripts/northrend/nexus/oculus/instance_oculus.cpp @@ -35,7 +35,7 @@ void instance_oculus::Initialize() memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); } -void instance_oculus::OnPlayerEnter(Player *pPlayer) +void instance_oculus::OnPlayerEnter(Player* pPlayer) { DoSpawnNextBossIfCan(); } @@ -54,7 +54,7 @@ void instance_oculus::OnCreatureCreate(Creature* pCreature) void instance_oculus::OnObjectCreate(GameObject* pGo) { - switch(pGo->GetEntry()) + switch (pGo->GetEntry()) { case GO_CACHE_EREGOS: case GO_CACHE_EREGOS_H: @@ -70,7 +70,7 @@ void instance_oculus::OnObjectCreate(GameObject* pGo) void instance_oculus::SetData(uint32 uiType, uint32 uiData) { - switch(uiType) + switch (uiType) { case TYPE_DRAKOS: m_auiEncounter[TYPE_DRAKOS] = uiData; @@ -193,7 +193,7 @@ void instance_oculus::DoSpawnNextBossIfCan() return; pPlayer->SummonCreature(NPC_UROM, aOculusBossSpawnLocs[0][0], aOculusBossSpawnLocs[0][1], aOculusBossSpawnLocs[0][2], aOculusBossSpawnLocs[0][3], TEMPSUMMON_DEAD_DESPAWN, 0); - } + } } void instance_oculus::Load(const char* chrIn) @@ -209,7 +209,7 @@ void instance_oculus::Load(const char* chrIn) std::istringstream loadStream(chrIn); loadStream >> m_auiEncounter[TYPE_DRAKOS] >> m_auiEncounter[TYPE_VAROS] >> m_auiEncounter[TYPE_UROM] >> m_auiEncounter[TYPE_EREGOS]; - for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) + for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) { if (m_auiEncounter[i] == IN_PROGRESS) m_auiEncounter[i] = NOT_STARTED; diff --git a/scripts/northrend/obsidian_sanctum/boss_sartharion.cpp b/scripts/northrend/obsidian_sanctum/boss_sartharion.cpp index 7e7cb0932..4b33ca5c9 100644 --- a/scripts/northrend/obsidian_sanctum/boss_sartharion.cpp +++ b/scripts/northrend/obsidian_sanctum/boss_sartharion.cpp @@ -26,7 +26,7 @@ EndScriptData */ enum { - //Sartharion Yell + // Sartharion Yell SAY_SARTHARION_AGGRO = -1615018, SAY_SARTHARION_BERSERK = -1615019, SAY_SARTHARION_BREATH = -1615020, @@ -49,7 +49,7 @@ enum WHISPER_HATCH_EGGS = -1615017, WHISPER_OPEN_PORTAL = -1615042, // whisper, shared by two dragons - //Sartharion Spells + // Sartharion Spells SPELL_BERSERK = 61632, // Increases the caster's attack speed by 150% and all damage it deals by 500% for 5 min. SPELL_CLEAVE = 56909, // Inflicts 35% weapon damage to an enemy and its nearest allies, affecting up to 10 targets. SPELL_FLAME_BREATH = 56908, // Inflicts 8750 to 11250 Fire damage to enemies in a cone in front of the caster. @@ -67,34 +67,34 @@ enum SPELL_TWILIGHT_SHIFT_REMOVAL = 61187, // leave phase SPELL_TWILIGHT_SHIFT_REMOVAL_ALL = 61190, // leave phase (probably version to make all leave) - //Mini bosses common spells + // Mini bosses common spells SPELL_TWILIGHT_RESIDUE = 61885, // makes immune to shadow damage, applied when leave phase - //Miniboses (Vesperon, Shadron, Tenebron) + // Miniboses (Vesperon, Shadron, Tenebron) SPELL_SHADOW_BREATH_H = 59126, // Inflicts 8788 to 10212 Fire damage to enemies in a cone in front of the caster. SPELL_SHADOW_BREATH = 57570, // Inflicts 6938 to 8062 Fire damage to enemies in a cone in front of the caster. SPELL_SHADOW_FISSURE_H = 59127, // Deals 9488 to 13512 Shadow damage to any enemy within the Shadow fissure after 5 sec. SPELL_SHADOW_FISSURE = 57579, // Deals 6188 to 8812 Shadow damage to any enemy within the Shadow fissure after 5 sec. - //Vesperon - //In portal is a disciple, when disciple killed remove Power_of_vesperon, portal open multiple times + // Vesperon + // In portal is a disciple, when disciple killed remove Power_of_vesperon, portal open multiple times NPC_ACOLYTE_OF_VESPERON = 31219, // Acolyte of Vesperon SPELL_POWER_OF_VESPERON = 61251, // Vesperon's presence decreases the maximum health of all enemies by 25%. SPELL_TWILIGHT_TORMENT_VESP = 57948, // (Shadow only) trigger 57935 then 57988 SPELL_TWILIGHT_TORMENT_VESP_ACO = 58853, // (Fire and Shadow) trigger 58835 then 57988 - //Shadron - //In portal is a disciple, when disciple killed remove Power_of_vesperon, portal open multiple times + // Shadron + // In portal is a disciple, when disciple killed remove Power_of_vesperon, portal open multiple times NPC_ACOLYTE_OF_SHADRON = 31218, // Acolyte of Shadron SPELL_POWER_OF_SHADRON = 58105, // Shadron's presence increases Fire damage taken by all enemies by 100%. SPELL_GIFT_OF_TWILIGTH_SHA = 57835, // TARGET_SCRIPT shadron SPELL_GIFT_OF_TWILIGTH_SAR = 58766, // TARGET_SCRIPT sartharion - //Tenebron - //in the portal spawns 6 eggs, if not killed in time (approx. 20s) they will hatch, whelps can cast 60708 + // Tenebron + // in the portal spawns 6 eggs, if not killed in time (approx. 20s) they will hatch, whelps can cast 60708 SPELL_POWER_OF_TENEBRON = 61248, // Tenebron's presence increases Shadow damage taken by all enemies by 100%. - //Tenebron, dummy spell + // Tenebron, dummy spell SPELL_SUMMON_TWILIGHT_WHELP = 58035, // doesn't work, will spawn NPC_TWILIGHT_WHELP SPELL_SUMMON_SARTHARION_TWILIGHT_WHELP = 58826, // doesn't work, will spawn NPC_SHARTHARION_TWILIGHT_WHELP @@ -103,12 +103,12 @@ enum SPELL_HATCH_EGGS_EFFECT_H = 59190, SPELL_HATCH_EGGS_EFFECT = 58685, - //Whelps + // Whelps NPC_TWILIGHT_WHELP = 30890, NPC_SHARTHARION_TWILIGHT_WHELP = 31214, SPELL_FADE_ARMOR = 60708, // Reduces the armor of an enemy by 1500 for 15s - //flame tsunami + // flame tsunami SPELL_FLAME_TSUNAMI = 57494, // the visual dummy SPELL_FLAME_TSUNAMI_LEAP = 60241, // SPELL_EFFECT_138 some leap effect, causing caster to move in direction SPELL_FLAME_TSUNAMI_DMG_AURA = 57492, // periodic damage, npc has this aura @@ -116,7 +116,7 @@ enum NPC_FLAME_TSUNAMI = 30616, // for the flame waves NPC_LAVA_BLAZE = 30643, // adds spawning from flame strike - //using these custom points for dragons start and end + // using these custom points for dragons start and end POINT_ID_INIT = 100, POINT_ID_LAND = 200 }; @@ -126,27 +126,27 @@ struct Waypoint float m_fX, m_fY, m_fZ; }; -//each dragons special points. First where fly to before connect to connon, second where land point is. -Waypoint m_aTene[]= +// each dragons special points. First where fly to before connect to connon, second where land point is. +Waypoint m_aTene[] = { - {3212.854f, 575.597f, 109.856f}, //init - {3246.425f, 565.367f, 61.249f} //end + {3212.854f, 575.597f, 109.856f}, // init + {3246.425f, 565.367f, 61.249f} // end }; -Waypoint m_aShad[]= +Waypoint m_aShad[] = { {3293.238f, 472.223f, 106.968f}, {3271.669f, 526.907f, 61.931f} }; -Waypoint m_aVesp[]= +Waypoint m_aVesp[] = { {3193.310f, 472.861f, 102.697f}, {3227.268f, 533.238f, 59.995f} }; -//points around raid "isle", counter clockwise. should probably be adjusted to be more alike -Waypoint m_aDragonCommon[]= +// points around raid "isle", counter clockwise. should probably be adjusted to be more alike +Waypoint m_aDragonCommon[] = { {3214.012f, 468.932f, 98.652f}, {3244.950f, 468.427f, 98.652f}, @@ -197,7 +197,7 @@ struct MANGOS_DLL_DECL boss_sartharionAI : public ScriptedAI m_bIsBerserk = false; m_bIsSoftEnraged = false; - m_uiEnrageTimer = MINUTE*15*IN_MILLISECONDS; + m_uiEnrageTimer = MINUTE * 15 * IN_MILLISECONDS; m_bIsHardEnraged = false; m_uiTenebronTimer = 30000; @@ -245,7 +245,7 @@ struct MANGOS_DLL_DECL boss_sartharionAI : public ScriptedAI void KilledUnit(Unit* pVictim) { - switch(urand(0, 2)) + switch (urand(0, 2)) { case 0: DoScriptText(SAY_SARTHARION_SLAY_1, m_creature); break; case 1: DoScriptText(SAY_SARTHARION_SLAY_2, m_creature); break; @@ -259,7 +259,7 @@ struct MANGOS_DLL_DECL boss_sartharionAI : public ScriptedAI Creature* pShad = m_pInstance->GetSingleCreatureFromStorage(NPC_SHADRON); Creature* pVesp = m_pInstance->GetSingleCreatureFromStorage(NPC_VESPERON); - //if at least one of the dragons are alive and are being called + // if at least one of the dragons are alive and are being called uint8 uiCountFetchableDragons = 0; if (pTene && pTene->isAlive() && !pTene->getVictim()) @@ -312,7 +312,7 @@ struct MANGOS_DLL_DECL boss_sartharionAI : public ScriptedAI int32 iTextId = 0; - switch(uiEntry) + switch (uiEntry) { case NPC_TENEBRON: iTextId = SAY_SARTHARION_CALL_TENEBRON; @@ -339,14 +339,14 @@ struct MANGOS_DLL_DECL boss_sartharionAI : public ScriptedAI if (pMap && pMap->IsDungeon()) { - Map::PlayerList const &PlayerList = pMap->GetPlayers(); + Map::PlayerList const& PlayerList = pMap->GetPlayers(); if (!PlayerList.isEmpty()) { for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i) { if (i->getSource()->isAlive()) - DoScriptText(WHISPER_LAVA_CHURN, m_creature,i->getSource()); + DoScriptText(WHISPER_LAVA_CHURN, m_creature, i->getSource()); } } } @@ -354,11 +354,11 @@ struct MANGOS_DLL_DECL boss_sartharionAI : public ScriptedAI void UpdateAI(const uint32 uiDiff) { - //Return since we have no target + // Return since we have no target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - //spell will target dragons, if they are still alive at 35% + // spell will target dragons, if they are still alive at 35% if (!m_bIsBerserk && m_creature->GetHealthPercent() < 35.0f) { DoScriptText(SAY_SARTHARION_BERSERK, m_creature); @@ -366,7 +366,7 @@ struct MANGOS_DLL_DECL boss_sartharionAI : public ScriptedAI m_bIsBerserk = true; } - //soft enrage + // soft enrage if (!m_bIsSoftEnraged && m_creature->GetHealthPercent() <= 10.0f) { // TODO @@ -429,7 +429,7 @@ struct MANGOS_DLL_DECL boss_sartharionAI : public ScriptedAI { DoCastSpellIfCan(pTarget, SPELL_LAVA_STRIKE); - switch(urand(0, 15)) + switch (urand(0, 15)) { case 0: DoScriptText(SAY_SARTHARION_SPECIAL_1, m_creature); break; case 1: DoScriptText(SAY_SARTHARION_SPECIAL_2, m_creature); break; @@ -515,7 +515,7 @@ enum VespText SAY_VESPERON_SPECIAL_2 = -1615040 }; -//to control each dragons common abilities +// to control each dragons common abilities struct MANGOS_DLL_DECL dummy_dragonAI : public ScriptedAI { dummy_dragonAI(Creature* pCreature) : ScriptedAI(pCreature) @@ -551,14 +551,14 @@ struct MANGOS_DLL_DECL dummy_dragonAI : public ScriptedAI debug_log("dummy_dragonAI: %s reached point %u", m_creature->GetName(), uiPointId); - //if healers messed up the raid and we was already initialized + // if healers messed up the raid and we was already initialized if (m_pInstance->GetData(TYPE_SARTHARION_EVENT) != IN_PROGRESS) { EnterEvadeMode(); return; } - //this is the end (!) + // this is the end (!) if (uiPointId == POINT_ID_LAND) { m_creature->GetMotionMaster()->Clear(); @@ -567,10 +567,10 @@ struct MANGOS_DLL_DECL dummy_dragonAI : public ScriptedAI return; } - //increase - m_uiWaypointId = uiPointId+1; + // increase + m_uiWaypointId = uiPointId + 1; - //if we have reached a point bigger or equal to count, it mean we must reset to point 0 + // if we have reached a point bigger or equal to count, it mean we must reset to point 0 if (m_uiWaypointId >= countof(m_aDragonCommon)) { if (!m_bCanMoveFree) @@ -582,14 +582,14 @@ struct MANGOS_DLL_DECL dummy_dragonAI : public ScriptedAI m_uiMoveNextTimer = 500; } - //used when open portal and spawn mobs in phase + // used when open portal and spawn mobs in phase void DoRaidWhisper(int32 iTextId) { Map* pMap = m_creature->GetMap(); if (pMap && pMap->IsDungeon()) { - Map::PlayerList const &PlayerList = pMap->GetPlayers(); + Map::PlayerList const& PlayerList = pMap->GetPlayers(); if (!PlayerList.isEmpty()) { @@ -604,13 +604,13 @@ struct MANGOS_DLL_DECL dummy_dragonAI : public ScriptedAI { int32 iTextId = 0; - //there are 4 portal spawn locations, each are expected to be spawned with negative spawntimesecs in database + // there are 4 portal spawn locations, each are expected to be spawned with negative spawntimesecs in database - //using a grid search here seem to be more efficient than caching all four guids - //in instance script and calculate range to each. - GameObject* pPortal = GetClosestGameObjectWithEntry(m_creature,GO_TWILIGHT_PORTAL,50.0f); + // using a grid search here seem to be more efficient than caching all four guids + // in instance script and calculate range to each. + GameObject* pPortal = GetClosestGameObjectWithEntry(m_creature, GO_TWILIGHT_PORTAL, 50.0f); - switch(m_creature->GetEntry()) + switch (m_creature->GetEntry()) { case NPC_TENEBRON: iTextId = WHISPER_HATCH_EGGS; @@ -623,26 +623,26 @@ struct MANGOS_DLL_DECL dummy_dragonAI : public ScriptedAI DoRaidWhisper(iTextId); - //By using SetRespawnTime() we will actually "spawn" the object with our defined time. - //Once time is up, portal will disappear again. + // By using SetRespawnTime() we will actually "spawn" the object with our defined time. + // Once time is up, portal will disappear again. if (pPortal && !pPortal->isSpawned()) { pPortal->SetRespawnTime(m_iPortalRespawnTime); pPortal->Refresh(); } - //Unclear what are expected to happen if one drake has a portal open already - //Refresh respawnTime so time again are set to 30secs? + // Unclear what are expected to happen if one drake has a portal open already + // Refresh respawnTime so time again are set to 30secs? } - //Removes each drakes unique debuff from players + // Removes each drakes unique debuff from players void RemoveDebuff(uint32 uiSpellId) { Map* pMap = m_creature->GetMap(); if (pMap && pMap->IsDungeon()) { - Map::PlayerList const &PlayerList = pMap->GetPlayers(); + Map::PlayerList const& PlayerList = pMap->GetPlayers(); if (PlayerList.isEmpty()) return; @@ -660,7 +660,7 @@ struct MANGOS_DLL_DECL dummy_dragonAI : public ScriptedAI int32 iTextId = 0; uint32 uiSpellId = 0; - switch(m_creature->GetEntry()) + switch (m_creature->GetEntry()) { case NPC_TENEBRON: iTextId = SAY_TENEBRON_DEATH; @@ -702,7 +702,7 @@ struct MANGOS_DLL_DECL dummy_dragonAI : public ScriptedAI if (m_uiMoveNextTimer <= uiDiff) { m_creature->GetMotionMaster()->MovePoint(m_uiWaypointId, - m_aDragonCommon[m_uiWaypointId].m_fX, m_aDragonCommon[m_uiWaypointId].m_fY, m_aDragonCommon[m_uiWaypointId].m_fZ); + m_aDragonCommon[m_uiWaypointId].m_fX, m_aDragonCommon[m_uiWaypointId].m_fY, m_aDragonCommon[m_uiWaypointId].m_fZ); debug_log("dummy_dragonAI: %s moving to point %u", m_creature->GetName(), m_uiWaypointId); m_uiMoveNextTimer = 0; @@ -745,7 +745,7 @@ struct MANGOS_DLL_DECL mob_tenebronAI : public dummy_dragonAI void UpdateAI(const uint32 uiDiff) { - //if no target, update dummy and return + // if no target, update dummy and return if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) { dummy_dragonAI::UpdateAI(uiDiff); @@ -809,7 +809,7 @@ struct MANGOS_DLL_DECL mob_shadronAI : public dummy_dragonAI void Aggro(Unit* pWho) { - DoScriptText(SAY_SHADRON_AGGRO,m_creature); + DoScriptText(SAY_SHADRON_AGGRO, m_creature); DoCastSpellIfCan(m_creature, SPELL_POWER_OF_SHADRON); } @@ -820,7 +820,7 @@ struct MANGOS_DLL_DECL mob_shadronAI : public dummy_dragonAI void UpdateAI(const uint32 uiDiff) { - //if no target, update dummy and return + // if no target, update dummy and return if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) { dummy_dragonAI::UpdateAI(uiDiff); @@ -878,7 +878,7 @@ struct MANGOS_DLL_DECL mob_vesperonAI : public dummy_dragonAI void Aggro(Unit* pWho) { - DoScriptText(SAY_VESPERON_AGGRO,m_creature); + DoScriptText(SAY_VESPERON_AGGRO, m_creature); DoCastSpellIfCan(m_creature, SPELL_POWER_OF_VESPERON); } @@ -889,7 +889,7 @@ struct MANGOS_DLL_DECL mob_vesperonAI : public dummy_dragonAI void UpdateAI(const uint32 uiDiff) { - //if no target, update dummy and return + // if no target, update dummy and return if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) { dummy_dragonAI::UpdateAI(uiDiff); @@ -944,7 +944,7 @@ struct MANGOS_DLL_DECL mob_acolyte_of_shadronAI : public ScriptedAI { if (m_pInstance) { - //if not solo figth, buff main boss, else place debuff on mini-boss. both spells TARGET_SCRIPT + // if not solo figth, buff main boss, else place debuff on mini-boss. both spells TARGET_SCRIPT if (m_pInstance->GetData(TYPE_SARTHARION_EVENT) == IN_PROGRESS) DoCastSpellIfCan(m_creature, SPELL_GIFT_OF_TWILIGTH_SAR); else @@ -960,7 +960,7 @@ struct MANGOS_DLL_DECL mob_acolyte_of_shadronAI : public ScriptedAI if (m_pInstance->GetData(TYPE_SARTHARION_EVENT) == IN_PROGRESS) { - //not solo fight, so main boss has deduff + // not solo fight, so main boss has deduff pDebuffTarget = m_pInstance->GetSingleCreatureFromStorage(NPC_SARTHARION); if (pDebuffTarget && pDebuffTarget->isAlive() && pDebuffTarget->HasAura(SPELL_GIFT_OF_TWILIGTH_SAR)) @@ -968,7 +968,7 @@ struct MANGOS_DLL_DECL mob_acolyte_of_shadronAI : public ScriptedAI } else { - //event not in progress, then solo fight and must remove debuff mini-boss + // event not in progress, then solo fight and must remove debuff mini-boss pDebuffTarget = m_pInstance->GetSingleCreatureFromStorage(NPC_SHADRON); if (pDebuffTarget && pDebuffTarget->isAlive() && pDebuffTarget->HasAura(SPELL_GIFT_OF_TWILIGTH_SHA)) @@ -1074,7 +1074,7 @@ struct MANGOS_DLL_DECL mob_twilight_whelpAI : public ScriptedAI void UpdateAI(const uint32 uiDiff) { - //Return since we have no target + // Return since we have no target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/northrend/obsidian_sanctum/instance_obsidian_sanctum.cpp b/scripts/northrend/obsidian_sanctum/instance_obsidian_sanctum.cpp index 1138bbe8d..fc5652f83 100644 --- a/scripts/northrend/obsidian_sanctum/instance_obsidian_sanctum.cpp +++ b/scripts/northrend/obsidian_sanctum/instance_obsidian_sanctum.cpp @@ -30,9 +30,9 @@ EndScriptData */ instance_obsidian_sanctum::instance_obsidian_sanctum(Map* pMap) : ScriptedInstance(pMap), m_uiAliveDragons(0) - { - Initialize(); - } +{ + Initialize(); +} void instance_obsidian_sanctum::Initialize() { @@ -41,10 +41,10 @@ void instance_obsidian_sanctum::Initialize() void instance_obsidian_sanctum::OnCreatureCreate(Creature* pCreature) { - switch(pCreature->GetEntry()) + switch (pCreature->GetEntry()) { - // The three dragons below set to active state once created. - // We must expect bigger raid to encounter main boss, and then three dragons must be active due to grid differences + // The three dragons below set to active state once created. + // We must expect bigger raid to encounter main boss, and then three dragons must be active due to grid differences case NPC_TENEBRON: case NPC_SHADRON: case NPC_VESPERON: diff --git a/scripts/northrend/ruby_sanctum/instance_ruby_sanctum.cpp b/scripts/northrend/ruby_sanctum/instance_ruby_sanctum.cpp index c741e4306..20fcea265 100644 --- a/scripts/northrend/ruby_sanctum/instance_ruby_sanctum.cpp +++ b/scripts/northrend/ruby_sanctum/instance_ruby_sanctum.cpp @@ -79,11 +79,11 @@ void instance_ruby_sanctum::OnObjectCreate(GameObject* pGo) switch (pGo->GetEntry()) { case GO_FLAME_WALLS: - if(m_auiEncounter[TYPE_SAVIANA] == DONE && m_auiEncounter[TYPE_BALTHARUS] == DONE) + if (m_auiEncounter[TYPE_SAVIANA] == DONE && m_auiEncounter[TYPE_BALTHARUS] == DONE) pGo->SetGoState(GO_STATE_ACTIVE); break; case GO_FIRE_FIELD: - if(m_auiEncounter[TYPE_BALTHARUS] == DONE) + if (m_auiEncounter[TYPE_BALTHARUS] == DONE) pGo->SetGoState(GO_STATE_ACTIVE); break; case GO_FLAME_RING: @@ -104,13 +104,13 @@ void instance_ruby_sanctum::OnObjectCreate(GameObject* pGo) // Wrapper to unlock the flame wall in from of Zarithrian void instance_ruby_sanctum::DoHandleZarithrianDoor() { - if(m_auiEncounter[TYPE_SAVIANA] == DONE && m_auiEncounter[TYPE_BALTHARUS] == DONE) + if (m_auiEncounter[TYPE_SAVIANA] == DONE && m_auiEncounter[TYPE_BALTHARUS] == DONE) DoUseDoorOrButton(GO_FLAME_WALLS); } void instance_ruby_sanctum::SetData(uint32 uiType, uint32 uiData) { - switch(uiType) + switch (uiType) { case TYPE_SAVIANA: m_auiEncounter[uiType] = uiData; diff --git a/scripts/northrend/ruby_sanctum/ruby_sanctum.h b/scripts/northrend/ruby_sanctum/ruby_sanctum.h index f2bf46229..6dc9df727 100644 --- a/scripts/northrend/ruby_sanctum/ruby_sanctum.h +++ b/scripts/northrend/ruby_sanctum/ruby_sanctum.h @@ -18,10 +18,10 @@ enum NPC_HALION_TWILIGHT = 40142, // Halion - Twilight Realm NPC NPC_HALION_CONTROLLER = 40146, - //NPC_SHADOW_PULSAR_N = 40083, // Halion event - Shadow orb - //NPC_SHADOW_PULSAR_S = 40100, - //NPC_ORB_CARRIER = 40081, - //NPC_ORB_ROTATION_FOCUS = 40091, + // NPC_SHADOW_PULSAR_N = 40083, // Halion event - Shadow orb + // NPC_SHADOW_PULSAR_S = 40100, + // NPC_ORB_CARRIER = 40081, + // NPC_ORB_ROTATION_FOCUS = 40091, NPC_SAVIANA = 39747, // minibosses NPC_BALTHARUS = 39751, @@ -30,9 +30,9 @@ enum NPC_XERESTRASZA = 40429, // friendly npc, used for some cinematic and quest NPC_ZARITHRIAN_SPAWN_STALKER = 39794, - //GO_HALION_PORTAL_1 = 202794, // Portals used in the Halion encounter - //GO_HALION_PORTAL_2 = 202795, - //GO_HALION_PORTAL_3 = 202796, + // GO_HALION_PORTAL_1 = 202794, // Portals used in the Halion encounter + // GO_HALION_PORTAL_2 = 202795, + // GO_HALION_PORTAL_3 = 202796, GO_FIRE_FIELD = 203005, // Xerestrasza flame door GO_FLAME_WALLS = 203006, // Zarithrian flame walls diff --git a/scripts/northrend/sholazar_basin.cpp b/scripts/northrend/sholazar_basin.cpp index 493b9cf3b..bf37a4a4c 100644 --- a/scripts/northrend/sholazar_basin.cpp +++ b/scripts/northrend/sholazar_basin.cpp @@ -70,7 +70,7 @@ struct MANGOS_DLL_DECL npc_heliceAI : public npc_escortAI void WaypointReached(uint32 uiPointId) { - switch(uiPointId) + switch (uiPointId) { case 2: { @@ -115,7 +115,7 @@ struct MANGOS_DLL_DECL npc_heliceAI : public npc_escortAI { if (m_bFirstBarrel) { - switch(m_uiExplodePhase) + switch (m_uiExplodePhase) { case 0: DoCastSpellIfCan(m_creature, SPELL_DETONATE_EXPLOSIVES_1); @@ -143,7 +143,7 @@ struct MANGOS_DLL_DECL npc_heliceAI : public npc_escortAI } else { - switch(m_uiExplodePhase) + switch (m_uiExplodePhase) { case 0: DoCastSpellIfCan(m_creature, SPELL_DETONATE_EXPLOSIVES_2); @@ -235,7 +235,7 @@ struct MANGOS_DLL_DECL npc_injured_rainspeakerAI : public npc_escortAI void WaypointReached(uint32 uiPointId) { - switch(uiPointId) + switch (uiPointId) { case 22: { @@ -355,7 +355,7 @@ bool GossipHello_npc_mosswalker_victim(Player* pPlayer, Creature* pCreature) if (pPlayer->GetQuestStatus(QUEST_MOSSWALKER_SAVIOR) == QUEST_STATUS_INCOMPLETE) { // doesn't appear they always emote - if (urand(0,3) == 0) + if (urand(0, 3) == 0) DoScriptText(EMOTE_PAIN, pCreature); pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_PULSE, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF); @@ -377,9 +377,9 @@ bool GossipSelect_npc_mosswalker_victim(Player* pPlayer, Creature* pCreature, ui else pCreature->SetLootRecipient(pPlayer); - if (urand(0,2)) // die + if (urand(0, 2)) // die { - switch(urand(0,5)) + switch (urand(0, 5)) { case 0: DoScriptText(SAY_DIE_1, pCreature, pPlayer); break; case 1: DoScriptText(SAY_DIE_2, pCreature, pPlayer); break; @@ -391,7 +391,7 @@ bool GossipSelect_npc_mosswalker_victim(Player* pPlayer, Creature* pCreature, ui } else // survive { - switch(urand(0,3)) + switch (urand(0, 3)) { case 0: DoScriptText(SAY_RESCUE_1, pCreature, pPlayer); break; case 1: DoScriptText(SAY_RESCUE_2, pCreature, pPlayer); break; @@ -422,8 +422,8 @@ void AddSC_sholazar_basin() pNewScript->Name = "npc_injured_rainspeaker"; pNewScript->GetAI = &GetAI_npc_injured_rainspeaker; pNewScript->pQuestAcceptNPC = &QuestAccept_npc_injured_rainspeaker; - //pNewScript->pGossipHello = &GossipHello_npc_injured_rainspeaker; - //pNewScript->pGossipSelect = &GossipSelect_npc_injured_rainspeaker; + // pNewScript->pGossipHello = &GossipHello_npc_injured_rainspeaker; + // pNewScript->pGossipSelect = &GossipSelect_npc_injured_rainspeaker; pNewScript->RegisterSelf(); pNewScript = new Script; diff --git a/scripts/northrend/ulduar/halls_of_lightning/boss_bjarngrim.cpp b/scripts/northrend/ulduar/halls_of_lightning/boss_bjarngrim.cpp index 355ee8c5d..09a23b9b9 100644 --- a/scripts/northrend/ulduar/halls_of_lightning/boss_bjarngrim.cpp +++ b/scripts/northrend/ulduar/halls_of_lightning/boss_bjarngrim.cpp @@ -26,7 +26,7 @@ EndScriptData */ enum { - //Yell + // Yell SAY_AGGRO = -1602000, SAY_SLAY_1 = -1602001, SAY_SLAY_2 = -1602002, @@ -54,9 +54,9 @@ enum SPELL_MORTAL_STRIKE = 16856, SPELL_SLAM = 52026, - //OTHER SPELLS - //SPELL_CHARGE_UP = 52098, // only used when starting walk from one platform to the other - //SPELL_TEMPORARY_ELECTRICAL_CHARGE = 52092, // triggered part of above + // OTHER SPELLS + // SPELL_CHARGE_UP = 52098, // only used when starting walk from one platform to the other + // SPELL_TEMPORARY_ELECTRICAL_CHARGE = 52092, // triggered part of above NPC_STORMFORGED_LIEUTENANT = 29240, SPELL_ARC_WELD = 59085, @@ -74,7 +74,7 @@ enum struct MANGOS_DLL_DECL boss_bjarngrimAI : public ScriptedAI { - boss_bjarngrimAI(Creature *pCreature) : ScriptedAI(pCreature) + boss_bjarngrimAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); @@ -128,7 +128,7 @@ struct MANGOS_DLL_DECL boss_bjarngrimAI : public ScriptedAI m_uiMortalStrike_Timer = 8000; m_uiSlam_Timer = 10000; - for(uint8 i = 0; i < 2; ++i) + for (uint8 i = 0; i < 2; ++i) { if (Creature* pStormforgedLieutenant = m_creature->GetMap()->GetCreature(m_aStormforgedLieutenantGuid[i])) { @@ -157,7 +157,7 @@ struct MANGOS_DLL_DECL boss_bjarngrimAI : public ScriptedAI void KilledUnit(Unit* pVictim) { - switch(urand(0, 2)) + switch (urand(0, 2)) { case 0: DoScriptText(SAY_SLAY_1, m_creature); break; case 1: DoScriptText(SAY_SLAY_2, m_creature); break; @@ -175,25 +175,25 @@ struct MANGOS_DLL_DECL boss_bjarngrimAI : public ScriptedAI void UpdateAI(const uint32 uiDiff) { - //Return since we have no target + // Return since we have no target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; // Change stance if (m_uiChangeStance_Timer < uiDiff) { - //wait for current spell to finish before change stance + // wait for current spell to finish before change stance if (m_creature->IsNonMeleeSpellCasted(false)) return; - int uiTempStance = rand()%(3-1); + int uiTempStance = rand() % (3 - 1); if (uiTempStance >= m_uiStance) ++uiTempStance; m_uiStance = uiTempStance; - switch(m_uiStance) + switch (m_uiStance) { case STANCE_DEFENSIVE: DoScriptText(SAY_DEFENSIVE_STANCE, m_creature); @@ -218,7 +218,7 @@ struct MANGOS_DLL_DECL boss_bjarngrimAI : public ScriptedAI else m_uiChangeStance_Timer -= uiDiff; - switch(m_uiStance) + switch (m_uiStance) { case STANCE_DEFENSIVE: { @@ -260,7 +260,7 @@ struct MANGOS_DLL_DECL boss_bjarngrimAI : public ScriptedAI { if (m_uiIntercept_Timer < uiDiff) { - //not much point is this, better random target and more often? + // not much point is this, better random target and more often? DoCastSpellIfCan(m_creature->getVictim(), SPELL_INTERCEPT); m_uiIntercept_Timer = urand(45000, 46000); } @@ -317,7 +317,7 @@ struct MANGOS_DLL_DECL boss_bjarngrimAI : public ScriptedAI struct MANGOS_DLL_DECL mob_stormforged_lieutenantAI : public ScriptedAI { - mob_stormforged_lieutenantAI(Creature *pCreature) : ScriptedAI(pCreature) + mob_stormforged_lieutenantAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); @@ -350,7 +350,7 @@ struct MANGOS_DLL_DECL mob_stormforged_lieutenantAI : public ScriptedAI void UpdateAI(const uint32 uiDiff) { - //Return since we have no target + // Return since we have no target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/northrend/ulduar/halls_of_lightning/boss_ionar.cpp b/scripts/northrend/ulduar/halls_of_lightning/boss_ionar.cpp index 7334bc2ff..f89808b28 100644 --- a/scripts/northrend/ulduar/halls_of_lightning/boss_ionar.cpp +++ b/scripts/northrend/ulduar/halls_of_lightning/boss_ionar.cpp @@ -43,7 +43,7 @@ enum SPELL_SUMMON_SPARK = 52746, SPELL_SPARK_DESPAWN = 52776, - //Spark of Ionar + // Spark of Ionar SPELL_SPARK_VISUAL_TRIGGER_N = 52667, SPELL_SPARK_VISUAL_TRIGGER_H = 59833, @@ -59,7 +59,7 @@ enum struct MANGOS_DLL_DECL boss_ionarAI : public ScriptedAI { - boss_ionarAI(Creature *pCreature) : ScriptedAI(pCreature) + boss_ionarAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); @@ -147,9 +147,9 @@ struct MANGOS_DLL_DECL boss_ionarAI : public ScriptedAI m_pInstance->SetData(TYPE_IONAR, DONE); } - void KilledUnit(Unit *victim) + void KilledUnit(Unit* victim) { - switch(urand(0, 2)) + switch (urand(0, 2)) { case 0: DoScriptText(SAY_SLAY_1, m_creature); break; case 1: DoScriptText(SAY_SLAY_2, m_creature); break; @@ -273,7 +273,7 @@ struct MANGOS_DLL_DECL boss_ionarAI : public ScriptedAI m_uiBallLightningTimer -= uiDiff; // Health check - if (m_creature->GetHealthPercent() < float(100 - 20*m_uiHealthAmountModifier)) + if (m_creature->GetHealthPercent() < float(100 - 20 * m_uiHealthAmountModifier)) { ++m_uiHealthAmountModifier; @@ -295,7 +295,7 @@ CreatureAI* GetAI_boss_ionar(Creature* pCreature) bool EffectDummyCreature_boss_ionar(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) { - //always check spellid and effectindex + // always check spellid and effectindex if (uiSpellId == SPELL_DISPERSE && uiEffIndex == EFFECT_INDEX_0) { if (pCreatureTarget->GetEntry() != NPC_IONAR) @@ -310,7 +310,7 @@ bool EffectDummyCreature_boss_ionar(Unit* pCaster, uint32 uiSpellId, SpellEffect if (pCreatureTarget->GetMotionMaster()->GetCurrentMovementGeneratorType() == CHASE_MOTION_TYPE) pCreatureTarget->GetMotionMaster()->MovementExpired(); - //always return true when we are handling this spell and effect + // always return true when we are handling this spell and effect return true; } else if (uiSpellId == SPELL_SPARK_DESPAWN && uiEffIndex == EFFECT_INDEX_0) @@ -318,7 +318,7 @@ bool EffectDummyCreature_boss_ionar(Unit* pCaster, uint32 uiSpellId, SpellEffect if (pCreatureTarget->GetEntry() != NPC_IONAR) return true; - if (boss_ionarAI* pIonarAI = dynamic_cast (pCreatureTarget->AI())) + if (boss_ionarAI* pIonarAI = dynamic_cast(pCreatureTarget->AI())) pIonarAI->DespawnSpark(); return true; @@ -332,7 +332,7 @@ bool EffectDummyCreature_boss_ionar(Unit* pCaster, uint32 uiSpellId, SpellEffect struct MANGOS_DLL_DECL mob_spark_of_ionarAI : public ScriptedAI { - mob_spark_of_ionarAI(Creature *pCreature) : ScriptedAI(pCreature) + mob_spark_of_ionarAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); Reset(); diff --git a/scripts/northrend/ulduar/halls_of_lightning/boss_loken.cpp b/scripts/northrend/ulduar/halls_of_lightning/boss_loken.cpp index 6f1ec2077..4a7d895d7 100644 --- a/scripts/northrend/ulduar/halls_of_lightning/boss_loken.cpp +++ b/scripts/northrend/ulduar/halls_of_lightning/boss_loken.cpp @@ -56,7 +56,7 @@ enum struct MANGOS_DLL_DECL boss_lokenAI : public ScriptedAI { - boss_lokenAI(Creature *pCreature) : ScriptedAI(pCreature) + boss_lokenAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); @@ -108,17 +108,17 @@ struct MANGOS_DLL_DECL boss_lokenAI : public ScriptedAI void KilledUnit(Unit* pVictim) { - switch(urand(0, 2)) + switch (urand(0, 2)) { - case 0: DoScriptText(SAY_SLAY_1, m_creature);break; - case 1: DoScriptText(SAY_SLAY_2, m_creature);break; - case 2: DoScriptText(SAY_SLAY_3, m_creature);break; + case 0: DoScriptText(SAY_SLAY_1, m_creature); break; + case 1: DoScriptText(SAY_SLAY_2, m_creature); break; + case 2: DoScriptText(SAY_SLAY_3, m_creature); break; } } void UpdateAI(const uint32 uiDiff) { - //Return since we have no target + // Return since we have no target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -156,10 +156,10 @@ struct MANGOS_DLL_DECL boss_lokenAI : public ScriptedAI { if (m_uiResumePulsingShockwave_Timer < uiDiff) { - //breaks at movement, can we assume when it's time, this spell is casted and also must stop movement? - //m_creature->CastSpell(m_creature, SPELL_PULSING_SHOCKWAVE_AURA, true); + // breaks at movement, can we assume when it's time, this spell is casted and also must stop movement? + // m_creature->CastSpell(m_creature, SPELL_PULSING_SHOCKWAVE_AURA, true); - //DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_PULSING_SHOCKWAVE_N : SPELL_PULSING_SHOCKWAVE_H); // need core support + // DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_PULSING_SHOCKWAVE_N : SPELL_PULSING_SHOCKWAVE_H); // need core support m_bIsAura = true; m_uiResumePulsingShockwave_Timer = 0; } @@ -179,11 +179,11 @@ struct MANGOS_DLL_DECL boss_lokenAI : public ScriptedAI if (m_uiLightningNova_Timer < uiDiff) { - switch(urand(0, 2)) + switch (urand(0, 2)) { - case 0: DoScriptText(SAY_NOVA_1, m_creature);break; - case 1: DoScriptText(SAY_NOVA_2, m_creature);break; - case 2: DoScriptText(SAY_NOVA_3, m_creature);break; + case 0: DoScriptText(SAY_NOVA_1, m_creature); break; + case 1: DoScriptText(SAY_NOVA_2, m_creature); break; + case 2: DoScriptText(SAY_NOVA_3, m_creature); break; } DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_LIGHTNING_NOVA_N : SPELL_LIGHTNING_NOVA_H); @@ -196,9 +196,9 @@ struct MANGOS_DLL_DECL boss_lokenAI : public ScriptedAI m_uiLightningNova_Timer -= uiDiff; // Health check - if (m_creature->GetHealthPercent() < float(100 - 25*m_uiHealthAmountModifier)) + if (m_creature->GetHealthPercent() < float(100 - 25 * m_uiHealthAmountModifier)) { - switch(m_uiHealthAmountModifier) + switch (m_uiHealthAmountModifier) { case 1: DoScriptText(SAY_75HEALTH, m_creature); break; case 2: DoScriptText(SAY_50HEALTH, m_creature); break; diff --git a/scripts/northrend/ulduar/halls_of_lightning/boss_volkhan.cpp b/scripts/northrend/ulduar/halls_of_lightning/boss_volkhan.cpp index 3b12817b0..9c2be1f52 100644 --- a/scripts/northrend/ulduar/halls_of_lightning/boss_volkhan.cpp +++ b/scripts/northrend/ulduar/halls_of_lightning/boss_volkhan.cpp @@ -43,14 +43,14 @@ enum SPELL_SHATTERING_STOMP = 52237, SPELL_SHATTERING_STOMP_H = 59529, - //unclear how "directions" of spells must be. Last, summoning GO, what is it for? Script depend on: - SPELL_TEMPER = 52238, //TARGET_SCRIPT boss->anvil - SPELL_TEMPER_DUMMY = 52654, //TARGET_SCRIPT anvil->boss - //SPELL_TEMPER_VISUAL = 52661, //summons GO + // unclear how "directions" of spells must be. Last, summoning GO, what is it for? Script depend on: + SPELL_TEMPER = 52238, // TARGET_SCRIPT boss->anvil + SPELL_TEMPER_DUMMY = 52654, // TARGET_SCRIPT anvil->boss + // SPELL_TEMPER_VISUAL = 52661, // summons GO SPELL_SUMMON_MOLTEN_GOLEM = 52405, - //Molten Golem + // Molten Golem SPELL_BLAST_WAVE = 23113, SPELL_IMMOLATION_STRIKE = 52433, SPELL_IMMOLATION_STRIKE_H = 59530, @@ -70,7 +70,7 @@ enum struct MANGOS_DLL_DECL boss_volkhanAI : public ScriptedAI { - boss_volkhanAI(Creature *pCreature) : ScriptedAI(pCreature) + boss_volkhanAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); @@ -124,7 +124,7 @@ struct MANGOS_DLL_DECL boss_volkhanAI : public ScriptedAI void KilledUnit(Unit* pVictim) { - switch(urand(0, 2)) + switch (urand(0, 2)) { case 0: DoScriptText(SAY_SLAY_1, m_creature); break; case 1: DoScriptText(SAY_SLAY_2, m_creature); break; @@ -137,7 +137,7 @@ struct MANGOS_DLL_DECL boss_volkhanAI : public ScriptedAI if (m_lGolemGUIDList.empty()) return; - for(GuidList::const_iterator itr = m_lGolemGUIDList.begin(); itr != m_lGolemGUIDList.end(); ++itr) + for (GuidList::const_iterator itr = m_lGolemGUIDList.begin(); itr != m_lGolemGUIDList.end(); ++itr) { if (Creature* pTemp = m_creature->GetMap()->GetCreature(*itr)) { @@ -154,11 +154,11 @@ struct MANGOS_DLL_DECL boss_volkhanAI : public ScriptedAI uint8 m_uiBrittleGolemsCount = 0; - for(GuidList::const_iterator itr = m_lGolemGUIDList.begin(); itr != m_lGolemGUIDList.end(); ++itr) + for (GuidList::const_iterator itr = m_lGolemGUIDList.begin(); itr != m_lGolemGUIDList.end(); ++itr) { if (Creature* pTemp = m_creature->GetMap()->GetCreature(*itr)) { - // only shatter brittle golems + // only shatter brittle golems if (pTemp->GetEntry() == NPC_BRITTLE_GOLEM) { pTemp->CastSpell(pTemp, m_bIsRegularMode ? SPELL_SHATTER : SPELL_SHATTER_H, true); @@ -197,7 +197,7 @@ struct MANGOS_DLL_DECL boss_volkhanAI : public ScriptedAI void UpdateAI(const uint32 uiDiff) { - //Return since we have no target + // Return since we have no target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -271,7 +271,7 @@ CreatureAI* GetAI_boss_volkhan(Creature* pCreature) bool EffectDummyCreature_boss_volkhan(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) { - //always check spellid and effectindex + // always check spellid and effectindex if (uiSpellId == SPELL_TEMPER_DUMMY && uiEffIndex == EFFECT_INDEX_0) { if (pCaster->GetEntry() != NPC_VOLKHAN_ANVIL || pCreatureTarget->GetEntry() != NPC_VOLKHAN) @@ -280,7 +280,7 @@ bool EffectDummyCreature_boss_volkhan(Unit* pCaster, uint32 uiSpellId, SpellEffe for (uint8 i = 0; i < MAX_GOLEM; ++i) pCreatureTarget->CastSpell(pCaster, SPELL_SUMMON_MOLTEN_GOLEM, true); - //always return true when we are handling this spell and effect + // always return true when we are handling this spell and effect return true; } @@ -293,7 +293,7 @@ bool EffectDummyCreature_boss_volkhan(Unit* pCaster, uint32 uiSpellId, SpellEffe bool EffectDummyCreature_npc_volkhan_anvil(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) { - //always check spellid and effectindex + // always check spellid and effectindex if (uiSpellId == SPELL_TEMPER && uiEffIndex == EFFECT_INDEX_0) { if (pCaster->GetEntry() != NPC_VOLKHAN || pCreatureTarget->GetEntry() != NPC_VOLKHAN_ANVIL) @@ -308,7 +308,7 @@ bool EffectDummyCreature_npc_volkhan_anvil(Unit* pCaster, uint32 uiSpellId, Spel pCaster->GetMotionMaster()->MoveChase(pCaster->getVictim()); } - //always return true when we are handling this spell and effect + // always return true when we are handling this spell and effect return true; } @@ -321,7 +321,7 @@ bool EffectDummyCreature_npc_volkhan_anvil(Unit* pCaster, uint32 uiSpellId, Spel struct MANGOS_DLL_DECL mob_molten_golemAI : public ScriptedAI { - mob_molten_golemAI(Creature *pCreature) : ScriptedAI(pCreature) + mob_molten_golemAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); @@ -356,7 +356,7 @@ struct MANGOS_DLL_DECL mob_molten_golemAI : public ScriptedAI m_creature->UpdateEntry(NPC_BRITTLE_GOLEM); } - void DamageTaken(Unit* pDoneBy, uint32 &uiDamage) + void DamageTaken(Unit* pDoneBy, uint32& uiDamage) { // Transform intro Brittle when damaged to 0 HP if (uiDamage >= m_creature->GetHealth()) @@ -382,7 +382,7 @@ struct MANGOS_DLL_DECL mob_molten_golemAI : public ScriptedAI void UpdateAI(const uint32 uiDiff) { - //Return since we have no target or if we are frozen + // Return since we have no target or if we are frozen if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/northrend/ulduar/halls_of_lightning/halls_of_lightning.h b/scripts/northrend/ulduar/halls_of_lightning/halls_of_lightning.h index 09b806d11..e560f4949 100644 --- a/scripts/northrend/ulduar/halls_of_lightning/halls_of_lightning.h +++ b/scripts/northrend/ulduar/halls_of_lightning/halls_of_lightning.h @@ -22,7 +22,7 @@ enum GO_VOLKHAN_DOOR = 191325, //_doors07 GO_IONAR_DOOR = 191326, //_doors05 - //GO_LOKEN_DOOR = 191324, //_doors02 + // GO_LOKEN_DOOR = 191324, //_doors02 GO_LOKEN_THRONE = 192654, ACHIEV_START_LOKEN_ID = 20384, diff --git a/scripts/northrend/ulduar/halls_of_lightning/instance_halls_of_lightning.cpp b/scripts/northrend/ulduar/halls_of_lightning/instance_halls_of_lightning.cpp index ff84f1c48..2f5c20646 100644 --- a/scripts/northrend/ulduar/halls_of_lightning/instance_halls_of_lightning.cpp +++ b/scripts/northrend/ulduar/halls_of_lightning/instance_halls_of_lightning.cpp @@ -44,7 +44,7 @@ void instance_halls_of_lightning::Initialize() void instance_halls_of_lightning::OnCreatureCreate(Creature* pCreature) { - switch(pCreature->GetEntry()) + switch (pCreature->GetEntry()) { case NPC_BJARNGRIM: case NPC_IONAR: @@ -56,7 +56,7 @@ void instance_halls_of_lightning::OnCreatureCreate(Creature* pCreature) void instance_halls_of_lightning::OnObjectCreate(GameObject* pGo) { - switch(pGo->GetEntry()) + switch (pGo->GetEntry()) { case GO_VOLKHAN_DOOR: if (m_auiEncounter[TYPE_VOLKHAN] == DONE) @@ -77,7 +77,7 @@ void instance_halls_of_lightning::OnObjectCreate(GameObject* pGo) void instance_halls_of_lightning::SetData(uint32 uiType, uint32 uiData) { - switch(uiType) + switch (uiType) { case TYPE_BJARNGRIM: m_auiEncounter[uiType] = uiData; @@ -101,7 +101,7 @@ void instance_halls_of_lightning::SetData(uint32 uiType, uint32 uiData) DoStartTimedAchievement(ACHIEVEMENT_CRITERIA_TYPE_KILL_CREATURE, ACHIEV_START_LOKEN_ID); if (uiData == DONE) { - //Appears to be type 5 GO with animation. Need to figure out how this work, code below only placeholder + // Appears to be type 5 GO with animation. Need to figure out how this work, code below only placeholder if (GameObject* pGlobe = GetSingleGameObjectFromStorage(GO_LOKEN_THRONE)) pGlobe->SetGoState(GO_STATE_ACTIVE); } @@ -152,7 +152,7 @@ void instance_halls_of_lightning::Load(const char* chrIn) std::istringstream loadStream(chrIn); loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3]; - for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) + for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) { if (m_auiEncounter[i] == IN_PROGRESS) m_auiEncounter[i] = NOT_STARTED; diff --git a/scripts/northrend/ulduar/halls_of_stone/boss_maiden_of_grief.cpp b/scripts/northrend/ulduar/halls_of_stone/boss_maiden_of_grief.cpp index 80c6f86d5..aeca1c982 100644 --- a/scripts/northrend/ulduar/halls_of_stone/boss_maiden_of_grief.cpp +++ b/scripts/northrend/ulduar/halls_of_stone/boss_maiden_of_grief.cpp @@ -79,19 +79,19 @@ struct MANGOS_DLL_DECL boss_maiden_of_griefAI : public ScriptedAI { DoScriptText(SAY_AGGRO, m_creature); - if(m_pInstance) + if (m_pInstance) m_pInstance->SetData(TYPE_MAIDEN, IN_PROGRESS); } void JustReachedHome() { - if(m_pInstance) + if (m_pInstance) m_pInstance->SetData(TYPE_MAIDEN, FAIL); } void KilledUnit(Unit* pVictim) { - switch(urand(0, 3)) + switch (urand(0, 3)) { case 0: DoScriptText(SAY_SLAY_1, m_creature); break; case 1: DoScriptText(SAY_SLAY_2, m_creature); break; @@ -118,7 +118,7 @@ struct MANGOS_DLL_DECL boss_maiden_of_griefAI : public ScriptedAI if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0, SPELL_PARTING_SORROW, SELECT_FLAG_PLAYER | SELECT_FLAG_POWER_MANA)) { if (DoCastSpellIfCan(pTarget, SPELL_PARTING_SORROW) == CAST_OK) - m_uiPartingSorrowTimer = 12000 + rand()%5000; + m_uiPartingSorrowTimer = 12000 + rand() % 5000; } } else diff --git a/scripts/northrend/ulduar/halls_of_stone/boss_sjonnir.cpp b/scripts/northrend/ulduar/halls_of_stone/boss_sjonnir.cpp index 1e0938085..71c514d14 100644 --- a/scripts/northrend/ulduar/halls_of_stone/boss_sjonnir.cpp +++ b/scripts/northrend/ulduar/halls_of_stone/boss_sjonnir.cpp @@ -98,11 +98,11 @@ struct MANGOS_DLL_DECL boss_sjonnirAI : public ScriptedAI void Reset() { - m_uiChainLightningTimer = urand(3000, 8000); // TODO timers weak + m_uiChainLightningTimer = urand(3000, 8000); // TODO timers weak m_uiLightningShieldTimer = urand(20000, 25000); m_uiStaticChargeTimer = urand(20000, 25000); m_uiLightningRingTimer = urand(30000, 35000); - m_uiFrenzyTimer = 4*MINUTE*IN_MILLISECONDS; // TODO no proper source for this "long" + m_uiFrenzyTimer = 4 * MINUTE * IN_MILLISECONDS; // TODO no proper source for this "long" m_uiHpCheck = 75; } @@ -148,7 +148,7 @@ struct MANGOS_DLL_DECL boss_sjonnirAI : public ScriptedAI void KilledUnit(Unit* pVictim) { - switch(urand(0, 2)) + switch (urand(0, 2)) { case 0: DoScriptText(SAY_SLAY_1, m_creature); break; case 1: DoScriptText(SAY_SLAY_2, m_creature); break; @@ -179,7 +179,7 @@ struct MANGOS_DLL_DECL boss_sjonnirAI : public ScriptedAI if (m_creature->GetHealthPercent() <= (float)m_uiHpCheck) { - switch(m_uiHpCheck) + switch (m_uiHpCheck) { case 75: if (DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_SUMMON_IRON_TROGG : SPELL_SUMMON_IRON_TROGG_H, CAST_TRIGGERED) == CAST_OK) diff --git a/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.cpp b/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.cpp index 4e640df2d..485bebf82 100644 --- a/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.cpp +++ b/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.cpp @@ -117,7 +117,7 @@ struct Location float fX, fY, fZ; }; -static Location SpawnLoc[]= +static Location SpawnLoc[] = { {946.992f, 397.016f, 208.374f}, {960.748f, 382.944f, 208.374f}, @@ -163,7 +163,7 @@ struct MANGOS_DLL_DECL npc_brann_hosAI : public npc_escortAI void KilledUnit(Unit* pVictim) // TODO - possible better as SummonedJustDied { - switch(urand(0, 2)) + switch (urand(0, 2)) { case 0: DoScriptText(SAY_KILL_1, m_creature); break; case 1: DoScriptText(SAY_KILL_2, m_creature); break; @@ -221,8 +221,8 @@ struct MANGOS_DLL_DECL npc_brann_hosAI : public npc_escortAI DoScriptText(SAY_ESCORT_START, m_creature); } - void WaypointReached(uint32 uiPointId) - { + void WaypointReached(uint32 uiPointId) + { switch (uiPointId) { case 13: // Before Tribunal Event, Continue with Gossip Interaction @@ -245,7 +245,7 @@ struct MANGOS_DLL_DECL npc_brann_hosAI : public npc_escortAI m_uiPhaseTimer = 1000; break; } - } + } void SpawnDwarf(uint32 uEntry) { @@ -282,7 +282,7 @@ struct MANGOS_DLL_DECL npc_brann_hosAI : public npc_escortAI { switch (m_uiStep) { - // Begin Event + // Begin Event case 0: // TODO, this is wrong, must be "using or similar" m_creature->SetStandState(UNIT_STAND_STATE_KNEEL); @@ -303,7 +303,7 @@ struct MANGOS_DLL_DECL npc_brann_hosAI : public npc_escortAI m_uiPhaseTimer = 8500; break; - // Activate Kaddrak + // Activate Kaddrak case 4: DoScriptText(SAY_EVENT_A_1, m_creature); m_uiPhaseTimer = 6500; @@ -327,7 +327,7 @@ struct MANGOS_DLL_DECL npc_brann_hosAI : public npc_escortAI m_uiPhaseTimer = 20000; break; - // Activate Marnak + // Activate Marnak case 9: DoScriptText(SAY_EVENT_B_1, m_creature); m_uiPhaseTimer = 6000; @@ -365,7 +365,7 @@ struct MANGOS_DLL_DECL npc_brann_hosAI : public npc_escortAI m_uiPhaseTimer = 20000; break; - // Activate Abedneum + // Activate Abedneum case 17: if (m_pInstance) m_pInstance->DoFaceSpeak(FACE_ABEDNEUM, SAY_EVENT_C_2_ABED); @@ -425,7 +425,7 @@ struct MANGOS_DLL_DECL npc_brann_hosAI : public npc_escortAI m_uiPhaseTimer = 10000; break; - // End Event + // End Event case 29: DoScriptText(SAY_EVENT_END_01, m_creature); m_creature->SetStandState(UNIT_STAND_STATE_STAND);// TODO TODO @@ -572,7 +572,7 @@ struct MANGOS_DLL_DECL npc_brann_hosAI : public npc_escortAI } // Respawn Handling: Relocate and Set Escort to WP 13 - void JustRespawned() + void JustRespawned() { if (!m_pInstance) return; @@ -593,7 +593,7 @@ struct MANGOS_DLL_DECL npc_brann_hosAI : public npc_escortAI SetCurrentWaypoint(13); } - } + } }; bool GossipHello_npc_brann_hos(Player* pPlayer, Creature* pCreature) @@ -623,11 +623,11 @@ bool GossipSelect_npc_brann_hos(Player* pPlayer, Creature* pCreature, uint32 uiS switch (uiAction) { case GOSSIP_ACTION_INFO_DEF + 1: - if (npc_brann_hosAI* pBrannAi = dynamic_cast (pCreature->AI())) + if (npc_brann_hosAI* pBrannAi = dynamic_cast(pCreature->AI())) pBrannAi->Start(false, pPlayer); break; case GOSSIP_ACTION_INFO_DEF + 2: - if (npc_brann_hosAI* pBrannAi = dynamic_cast (pCreature->AI())) + if (npc_brann_hosAI* pBrannAi = dynamic_cast(pCreature->AI())) pBrannAi->ContinueEvent(); break; } diff --git a/scripts/northrend/ulduar/halls_of_stone/instance_halls_of_stone.cpp b/scripts/northrend/ulduar/halls_of_stone/instance_halls_of_stone.cpp index 8fdbcb8e2..ea7f416ac 100644 --- a/scripts/northrend/ulduar/halls_of_stone/instance_halls_of_stone.cpp +++ b/scripts/northrend/ulduar/halls_of_stone/instance_halls_of_stone.cpp @@ -55,7 +55,7 @@ void instance_halls_of_stone::Initialize() void instance_halls_of_stone::OnCreatureCreate(Creature* pCreature) { - switch(pCreature->GetEntry()) + switch (pCreature->GetEntry()) { case NPC_KADDRAK: m_lKaddrakGUIDs.push_back(pCreature->GetObjectGuid()); break; case NPC_ABEDNEUM: m_lAbedneumGUIDs.push_back(pCreature->GetObjectGuid()); break; @@ -70,7 +70,7 @@ void instance_halls_of_stone::OnCreatureCreate(Creature* pCreature) void instance_halls_of_stone::OnObjectCreate(GameObject* pGo) { - switch(pGo->GetEntry()) + switch (pGo->GetEntry()) { case GO_TRIBUNAL_CHEST: case GO_TRIBUNAL_CHEST_H: @@ -328,7 +328,7 @@ void instance_halls_of_stone::Load(const char* chrIn) std::istringstream loadStream(chrIn); loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3]; - for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) + for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) { if (m_auiEncounter[i] == IN_PROGRESS) m_auiEncounter[i] = NOT_STARTED; @@ -353,7 +353,7 @@ void instance_halls_of_stone::ProcessFace(uint8 uiFace) if (Creature* pEye = instance->GetCreature(m_aFaces[uiFace].m_leftEyeGuid)) pEye->CastSpell(pEye, SPELL_SUMMON_DARK_MATTER_TARGET, true); // One should be enough.. - //if (Creature* pEye = instance->GetCreature(m_aFaces[uiFace].m_rightEyeGuid)) + // if (Creature* pEye = instance->GetCreature(m_aFaces[uiFace].m_rightEyeGuid)) // pEye->CastSpell(pEye, SPELL_SUMMON_DARK_MATTER_TARGET, true); m_aFaces[uiFace].m_uiTimer = 21000; // TODO, verify, was 3s+0..1s break; @@ -361,7 +361,7 @@ void instance_halls_of_stone::ProcessFace(uint8 uiFace) if (Creature* pEye = instance->GetCreature(m_aFaces[uiFace].m_leftEyeGuid)) pEye->CastSpell(pEye, SPELL_SUMMON_SEARING_GAZE_TARGET, true); // One should be enough.. - //if (Creature* pEye = instance->GetCreature(m_aFaces[uiFace].m_rightEyeGuid)) + // if (Creature* pEye = instance->GetCreature(m_aFaces[uiFace].m_rightEyeGuid)) // pEye->CastSpell(pEye, SPELL_SUMMON_SEARING_GAZE_TARGET, true); m_aFaces[uiFace].m_uiTimer = 21000; // TODO, verify, was 3s+0..2s break; diff --git a/scripts/northrend/ulduar/ulduar/assembly_of_iron.cpp b/scripts/northrend/ulduar/ulduar/assembly_of_iron.cpp index c8066b012..e8f11a12b 100644 --- a/scripts/northrend/ulduar/ulduar/assembly_of_iron.cpp +++ b/scripts/northrend/ulduar/ulduar/assembly_of_iron.cpp @@ -57,7 +57,7 @@ enum SPELL_SUPERCHARGE = 61920, SPELL_LIGHTNING_CHANNEL_PREFIGHT = 61942, // cast by Brundir on Steelbreaker SPELL_RUNE_OF_POWER_PREFIGHT = 61975, // cast by Molgeim on Stellbreaker - //SPELL_COUNCIL_KILL_CREDIT = 65195, // currently missing from DBC + // SPELL_COUNCIL_KILL_CREDIT = 65195, // currently missing from DBC // Steelbreaker SPELL_HIGH_VOLTAGE = 61890, // phase 1 spells @@ -238,7 +238,7 @@ struct MANGOS_DLL_DECL boss_brundirAI : public ScriptedAI case SPELL_CHAIN_LIGHTNING_H: case SPELL_LIGHTNING_WHIRL_DAMAGE: case SPELL_LIGHTNING_WHIRL_DAMAGE_H: - m_pInstance->SetSpecialAchievementCriteria(TYPE_ACHIEV_STUNNED, false); + m_pInstance->SetSpecialAchievementCriteria(TYPE_ACHIEV_STUNNED, false); break; } } @@ -250,7 +250,7 @@ struct MANGOS_DLL_DECL boss_brundirAI : public ScriptedAI switch (uiPointId) { - // After lift up follow a target and set the target change timer + // After lift up follow a target and set the target change timer case POINT_ID_LIFT_OFF: // TODO: the boss should follow without changing his Z position - missing core feature // Current implementation with move point is wrong @@ -262,7 +262,7 @@ struct MANGOS_DLL_DECL boss_brundirAI : public ScriptedAI m_uiTendrilsTargetTimer = 5000; m_uiTendrilsFollowTimer = 500; break; - // After reached the land remove all the auras and resume basic combat + // After reached the land remove all the auras and resume basic combat case POINT_ID_LAND: m_creature->SetLevitate(false); SetCombatMovement(true); @@ -302,7 +302,7 @@ struct MANGOS_DLL_DECL boss_brundirAI : public ScriptedAI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - switch(m_uiPhase) + switch (m_uiPhase) { case PHASE_CHARGE_TWO: diff --git a/scripts/northrend/ulduar/ulduar/boss_auriaya.cpp b/scripts/northrend/ulduar/ulduar/boss_auriaya.cpp index 7c85b613d..a3c852ecb 100644 --- a/scripts/northrend/ulduar/ulduar/boss_auriaya.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_auriaya.cpp @@ -59,8 +59,8 @@ enum SPELL_SEEPING_FERAL_ESSENCE = 64458, SPELL_SEEPING_FERAL_ESSENCE_H = 64676, - //NPC_SEEPING_FERAL_ESSENCE = 34098, // summoned by the feral defender on feign death - //NPC_GUARDIAN_SWARN = 34034, // summoned by spell + // NPC_SEEPING_FERAL_ESSENCE = 34098, // summoned by the feral defender on feign death + // NPC_GUARDIAN_SWARN = 34034, // summoned by spell NPC_FERAL_DEFENDER_STALKER = 34096, }; @@ -85,12 +85,12 @@ struct MANGOS_DLL_DECL boss_auriayaAI : public ScriptedAI void Reset() { - m_uiEnrageTimer = 10*MINUTE*IN_MILLISECONDS; + m_uiEnrageTimer = 10 * MINUTE * IN_MILLISECONDS; m_uiSwarmTimer = 50000; m_uiSonicScreechTimer = 58000; m_uiSentinelBlastTimer = 40000; m_uiTerrifyingScreechTimer = 38000; - m_uiDefenderTimer = 1*MINUTE*IN_MILLISECONDS; + m_uiDefenderTimer = 1 * MINUTE * IN_MILLISECONDS; } void JustDied(Unit* pKiller) @@ -189,7 +189,7 @@ struct MANGOS_DLL_DECL boss_auriayaAI : public ScriptedAI if (DoCastSpellIfCan(m_creature, SPELL_BERSERK) == CAST_OK) { DoScriptText(SAY_BERSERK, m_creature); - m_uiEnrageTimer = 10*MINUTE*IN_MILLISECONDS; + m_uiEnrageTimer = 10 * MINUTE * IN_MILLISECONDS; } } else @@ -258,7 +258,7 @@ struct MANGOS_DLL_DECL boss_feral_defenderAI : public ScriptedAI m_creature->SetHealth(0); m_creature->StopMoving(); m_creature->ClearComboPointHolders(); - //m_creature->RemoveAllAurasOnDeath(); // TODO Should only remove negative auras + // m_creature->RemoveAllAurasOnDeath(); // TODO Should only remove negative auras m_creature->ModifyAuraState(AURA_STATE_HEALTHLESS_20_PERCENT, false); m_creature->ModifyAuraState(AURA_STATE_HEALTHLESS_35_PERCENT, false); m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); diff --git a/scripts/northrend/ulduar/ulduar/boss_general_vezax.cpp b/scripts/northrend/ulduar/ulduar/boss_general_vezax.cpp index ad2d08567..b54a1abf9 100644 --- a/scripts/northrend/ulduar/ulduar/boss_general_vezax.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_general_vezax.cpp @@ -81,7 +81,7 @@ struct MANGOS_DLL_DECL boss_general_vezaxAI : public ScriptedAI void Reset() { - m_uiEnrageTimer = 10*MINUTE*IN_MILLISECONDS; + m_uiEnrageTimer = 10 * MINUTE * IN_MILLISECONDS; m_uiFlamesTimer = 8000; m_uiSaroniteVaporTimer = 30000; m_uiSurgeTimer = 60000; diff --git a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp index 0c6f982cd..211d4044c 100644 --- a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp +++ b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: instance_ulduar -SD%Complete: -SDComment: +SD%Complete: +SDComment: SDCategory: Ulduar EndScriptData */ @@ -113,16 +113,16 @@ void instance_ulduar::OnCreatureCreate(Creature* pCreature) default: return; - } - m_mNpcEntryGuidStore[pCreature->GetEntry()] = pCreature->GetObjectGuid(); + } + m_mNpcEntryGuidStore[pCreature->GetEntry()] = pCreature->GetObjectGuid(); } void instance_ulduar::OnObjectCreate(GameObject* pGo) { - switch(pGo->GetEntry()) + switch (pGo->GetEntry()) { - // ----------------- Doors & Other ----------------- - // The siege + // ----------------- Doors & Other ----------------- + // The siege case GO_SHIELD_WALL: break; case GO_LEVIATHAN_GATE: @@ -140,7 +140,7 @@ void instance_ulduar::OnObjectCreate(GameObject* pGo) pGo->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NO_INTERACT); break; - // Archivum + // Archivum case GO_IRON_ENTRANCE_DOOR: break; case GO_ARCHIVUM_DOOR: @@ -149,13 +149,13 @@ void instance_ulduar::OnObjectCreate(GameObject* pGo) break; case GO_ARCHIVUM_CONSOLE: case GO_UNIVERSE_FLOOR_ARCHIVUM: - // Celestial Planetarium + // Celestial Planetarium case GO_CELESTIAL_ACCES: case GO_CELESTIAL_DOOR: case GO_UNIVERSE_FLOOR_CELESTIAL: case GO_AZEROTH_GLOBE: break; - // Shattered Hallway + // Shattered Hallway case GO_KOLOGARN_BRIDGE: pGo->SetGoState(GO_STATE_ACTIVE); if (m_auiEncounter[TYPE_KOLOGARN] == DONE) @@ -164,8 +164,8 @@ void instance_ulduar::OnObjectCreate(GameObject* pGo) case GO_SHATTERED_DOOR: break; - // ----------------- The Keepers ----------------- - // Hodir + // ----------------- The Keepers ----------------- + // Hodir case GO_HODIR_EXIT: if (m_auiEncounter[TYPE_HODIR]) pGo->SetGoState(GO_STATE_ACTIVE); @@ -176,7 +176,7 @@ void instance_ulduar::OnObjectCreate(GameObject* pGo) break; case GO_HODIR_ENTER: break; - // Mimiron + // Mimiron case G0_MIMIRON_BUTTON: if (m_auiEncounter[TYPE_MIMIRON] == NOT_STARTED) pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NO_INTERACT); @@ -194,7 +194,7 @@ void instance_ulduar::OnObjectCreate(GameObject* pGo) case GO_MIMIRON_TEL7: case GO_MIMIRON_TEL8: case GO_MIMIRON_TEL9: - // Thorim + // Thorim case GO_DARK_IRON_PORTCULIS: case GO_RUNED_STONE_DOOR: case GO_THORIM_STONE_DOOR: @@ -204,7 +204,7 @@ void instance_ulduar::OnObjectCreate(GameObject* pGo) pGo->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NO_INTERACT); break; - // Prison + // Prison case GO_ANCIENT_GATE: DoOpenMadnessDoorIfCan(); break; @@ -219,30 +219,30 @@ void instance_ulduar::OnObjectCreate(GameObject* pGo) case GO_BRAIN_DOOR3: break; - // ----------------- Chests ----------------- - // Kologarn + // ----------------- Chests ----------------- + // Kologarn case GO_CACHE_OF_LIVING_STONE_10: case GO_CACHE_OF_LIVING_STONE_25: - // Hodir + // Hodir case GO_CACHE_OF_WINTER_10: case GO_CACHE_OF_WINTER_25: case GO_CACHE_OF_RARE_WINTER_10: case GO_CACHE_OF_RARE_WINTER_25: - // Thorim + // Thorim case GO_CACHE_OF_STORMS_10: case GO_CACHE_OF_STORMS_25: case GO_CACHE_OF_STORMS_10_H: case GO_CACHE_OF_STORMS_25_H: - // Mimiron + // Mimiron case GO_CACHE_OF_INOV_10: case GO_CACHE_OF_INOV_25: case GO_CACHE_OF_INOV_10_H: case GO_CACHE_OF_INOV_25_H: - // Alagon + // Alagon case GO_GIFT_OF_OBSERVER_10: case GO_GIFT_OF_OBSERVER_25: break; @@ -310,7 +310,7 @@ void instance_ulduar::SetData(uint32 uiType, uint32 uiData) DoUseDoorOrButton(GO_SHATTERED_DOOR); if (uiData == DONE) { - DoRespawnGameObject(instance->IsRegularDifficulty() ? GO_CACHE_OF_LIVING_STONE_10 : GO_CACHE_OF_LIVING_STONE_25, 30*MINUTE); + DoRespawnGameObject(instance->IsRegularDifficulty() ? GO_CACHE_OF_LIVING_STONE_10 : GO_CACHE_OF_LIVING_STONE_25, 30 * MINUTE); if (GameObject* pBridge = GetSingleGameObjectFromStorage(GO_KOLOGARN_BRIDGE)) pBridge->SetGoState(GO_STATE_READY); } @@ -323,7 +323,7 @@ void instance_ulduar::SetData(uint32 uiType, uint32 uiData) SetSpecialAchievementCriteria(TYPE_ACHIEV_NINE_LIVES, false); } break; - // Keepers + // Keepers case TYPE_MIMIRON: m_auiEncounter[uiType] = uiData; DoUseDoorOrButton(GO_MIMIRON_DOOR_1); @@ -332,7 +332,7 @@ void instance_ulduar::SetData(uint32 uiType, uint32 uiData) if (uiData == DONE) { if (GetData(TYPE_MIMIRON_HARD) != DONE) - DoRespawnGameObject(instance->IsRegularDifficulty() ? GO_CACHE_OF_INOV_10 : GO_CACHE_OF_INOV_25, 30*MINUTE); + DoRespawnGameObject(instance->IsRegularDifficulty() ? GO_CACHE_OF_INOV_10 : GO_CACHE_OF_INOV_25, 30 * MINUTE); SpawnFriendlyKeeper(NPC_MIMIRON_IMAGE); } break; @@ -343,7 +343,7 @@ void instance_ulduar::SetData(uint32 uiType, uint32 uiData) { DoUseDoorOrButton(GO_HODIR_ICE_WALL); DoUseDoorOrButton(GO_HODIR_EXIT); - DoRespawnGameObject(instance->IsRegularDifficulty() ? GO_CACHE_OF_WINTER_10 : GO_CACHE_OF_WINTER_25, 30*MINUTE); + DoRespawnGameObject(instance->IsRegularDifficulty() ? GO_CACHE_OF_WINTER_10 : GO_CACHE_OF_WINTER_25, 30 * MINUTE); SpawnFriendlyKeeper(NPC_HODIR_IMAGE); } break; @@ -355,7 +355,7 @@ void instance_ulduar::SetData(uint32 uiType, uint32 uiData) if (uiData == DONE) { if (GetData(TYPE_THORIM_HARD) != DONE) - DoRespawnGameObject(instance->IsRegularDifficulty() ? GO_CACHE_OF_STORMS_10 : GO_CACHE_OF_STORMS_25, 30*MINUTE); + DoRespawnGameObject(instance->IsRegularDifficulty() ? GO_CACHE_OF_STORMS_10 : GO_CACHE_OF_STORMS_25, 30 * MINUTE); SpawnFriendlyKeeper(NPC_THORIM_IMAGE); } break; @@ -364,7 +364,7 @@ void instance_ulduar::SetData(uint32 uiType, uint32 uiData) if (uiData == DONE) SpawnFriendlyKeeper(NPC_FREYA_IMAGE); break; - // Prison + // Prison case TYPE_VEZAX: m_auiEncounter[uiType] = uiData; if (uiData == DONE) @@ -375,17 +375,17 @@ void instance_ulduar::SetData(uint32 uiType, uint32 uiData) DoUseDoorOrButton(GO_YOGG_GATE); break; - // Celestial Planetarium + // Celestial Planetarium case TYPE_ALGALON: m_auiEncounter[uiType] = uiData; - //TODO: need to find the proper way to use these + // TODO: need to find the proper way to use these DoUseDoorOrButton(GO_CELESTIAL_DOOR); DoUseDoorOrButton(GO_UNIVERSE_FLOOR_CELESTIAL); if (uiData == DONE) - DoRespawnGameObject(instance->IsRegularDifficulty() ? GO_GIFT_OF_OBSERVER_10 : GO_GIFT_OF_OBSERVER_25, 30*MINUTE); + DoRespawnGameObject(instance->IsRegularDifficulty() ? GO_GIFT_OF_OBSERVER_10 : GO_GIFT_OF_OBSERVER_25, 30 * MINUTE); break; - // Hard modes + // Hard modes case TYPE_LEVIATHAN_HARD: m_auiHardBoss[0] = uiData; // TODO: add extra loot break; @@ -395,17 +395,17 @@ void instance_ulduar::SetData(uint32 uiType, uint32 uiData) case TYPE_HODIR_HARD: m_auiHardBoss[2] = uiData; if (uiData == DONE) - DoRespawnGameObject(instance->IsRegularDifficulty() ? GO_CACHE_OF_RARE_WINTER_10 : GO_CACHE_OF_RARE_WINTER_25, 30*MINUTE); + DoRespawnGameObject(instance->IsRegularDifficulty() ? GO_CACHE_OF_RARE_WINTER_10 : GO_CACHE_OF_RARE_WINTER_25, 30 * MINUTE); break; case TYPE_THORIM_HARD: m_auiHardBoss[3] = uiData; if (uiData == DONE) - DoRespawnGameObject(instance->IsRegularDifficulty() ? GO_CACHE_OF_STORMS_10_H : GO_CACHE_OF_STORMS_25_H, 30*MINUTE); + DoRespawnGameObject(instance->IsRegularDifficulty() ? GO_CACHE_OF_STORMS_10_H : GO_CACHE_OF_STORMS_25_H, 30 * MINUTE); break; case TYPE_MIMIRON_HARD: m_auiHardBoss[4] = uiData; if (uiData == DONE) - DoRespawnGameObject(instance->IsRegularDifficulty() ? GO_CACHE_OF_INOV_10_H : GO_CACHE_OF_INOV_25_H, 30*MINUTE); + DoRespawnGameObject(instance->IsRegularDifficulty() ? GO_CACHE_OF_INOV_10_H : GO_CACHE_OF_INOV_25_H, 30 * MINUTE); break; case TYPE_VEZAX_HARD: m_auiHardBoss[5] = uiData; // TODO: add extra loot @@ -414,7 +414,7 @@ void instance_ulduar::SetData(uint32 uiType, uint32 uiData) m_auiHardBoss[6] = uiData; // TODO: add extra loot break; - // Ulduar keepers + // Ulduar keepers case TYPE_KEEPER_HODIR: m_auiUlduarKeepers[0] = uiData; break; @@ -438,13 +438,13 @@ void instance_ulduar::SetData(uint32 uiType, uint32 uiData) // Save all encounters, hard bosses, keepers and teleporters std::ostringstream saveStream; saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2] << " " - << m_auiEncounter[3] << " " << m_auiEncounter[4] << " " << m_auiEncounter[5] << " " - << m_auiEncounter[6] << " " << m_auiEncounter[7] << " " << m_auiEncounter[8] << " " - << m_auiEncounter[9] << " " << m_auiEncounter[10] << " " << m_auiEncounter[11] << " " - << m_auiEncounter[12] << " " << m_auiEncounter[13] << " " << m_auiHardBoss[0] << " " - << m_auiHardBoss[1] << " " << m_auiHardBoss[2] << " " << m_auiHardBoss[2] << " " - << m_auiHardBoss[4] << " " << m_auiHardBoss[5] << " " << m_auiHardBoss[6] << " " - << m_auiUlduarKeepers[0] << " " << m_auiUlduarKeepers[1] << " " << m_auiUlduarKeepers[2] << " " << m_auiUlduarKeepers[3]; + << m_auiEncounter[3] << " " << m_auiEncounter[4] << " " << m_auiEncounter[5] << " " + << m_auiEncounter[6] << " " << m_auiEncounter[7] << " " << m_auiEncounter[8] << " " + << m_auiEncounter[9] << " " << m_auiEncounter[10] << " " << m_auiEncounter[11] << " " + << m_auiEncounter[12] << " " << m_auiEncounter[13] << " " << m_auiHardBoss[0] << " " + << m_auiHardBoss[1] << " " << m_auiHardBoss[2] << " " << m_auiHardBoss[2] << " " + << m_auiHardBoss[4] << " " << m_auiHardBoss[5] << " " << m_auiHardBoss[6] << " " + << m_auiUlduarKeepers[0] << " " << m_auiUlduarKeepers[1] << " " << m_auiUlduarKeepers[2] << " " << m_auiUlduarKeepers[3]; m_strInstData = saveStream.str(); @@ -460,17 +460,17 @@ bool instance_ulduar::CheckConditionCriteriaMeet(Player const* pSource, uint32 u return false; switch (uiInstanceConditionId) - { + { case TYPE_XT002_HARD: break; - } + } return false; } uint32 instance_ulduar::GetData(uint32 uiType) { switch (uiType) - { + { case TYPE_LEVIATHAN: return m_auiEncounter[0]; case TYPE_IGNIS: @@ -500,7 +500,7 @@ uint32 instance_ulduar::GetData(uint32 uiType) case TYPE_ALGALON: return m_auiEncounter[13]; - // Hard modes + // Hard modes case TYPE_LEVIATHAN_HARD: return m_auiHardBoss[0]; case TYPE_XT002_HARD: @@ -516,7 +516,7 @@ uint32 instance_ulduar::GetData(uint32 uiType) case TYPE_YOGGSARON_HARD: return m_auiHardBoss[6]; - // Ulduar Keepers + // Ulduar Keepers case TYPE_KEEPER_HODIR: return m_auiUlduarKeepers[0]; case TYPE_KEEPER_THORIM: @@ -525,7 +525,7 @@ uint32 instance_ulduar::GetData(uint32 uiType) return m_auiUlduarKeepers[2]; case TYPE_KEEPER_MIMIRON: return m_auiUlduarKeepers[3]; - } + } return 0; } @@ -537,7 +537,7 @@ void instance_ulduar::SpawnFriendlyKeeper(uint32 uiWho) if (!pPlayer) return; - switch(uiWho) + switch (uiWho) { case NPC_MIMIRON_IMAGE: pPlayer->SummonCreature(NPC_MIMIRON_IMAGE, m_aKeepersSpawnLocs[1].m_fX, m_aKeepersSpawnLocs[1].m_fY, m_aKeepersSpawnLocs[1].m_fZ, m_aKeepersSpawnLocs[1].m_fO, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10000); break; case NPC_HODIR_IMAGE: pPlayer->SummonCreature(NPC_HODIR_IMAGE, m_aKeepersSpawnLocs[2].m_fX, m_aKeepersSpawnLocs[2].m_fY, m_aKeepersSpawnLocs[2].m_fZ, m_aKeepersSpawnLocs[2].m_fO, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10000); break; @@ -548,7 +548,7 @@ void instance_ulduar::SpawnFriendlyKeeper(uint32 uiWho) void instance_ulduar::OnCreatureDeath(Creature* pCreature) { - switch(pCreature->GetEntry()) + switch (pCreature->GetEntry()) { case NPC_SANCTUM_SENTRY: if (GetData(TYPE_AURIAYA) == IN_PROGRESS) @@ -569,10 +569,10 @@ void instance_ulduar::Load(const char* strIn) std::istringstream loadStream(strIn); loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3] - >> m_auiEncounter[4] >> m_auiEncounter[5] >> m_auiEncounter[6] >> m_auiEncounter[7] >> m_auiEncounter[8] - >> m_auiEncounter[9] >> m_auiEncounter[10] >> m_auiEncounter[11] >> m_auiEncounter[12] >> m_auiEncounter[13] - >> m_auiHardBoss[0] >> m_auiHardBoss[1] >> m_auiHardBoss[2] >> m_auiHardBoss[3] >> m_auiHardBoss[4] >> m_auiHardBoss[5] >> m_auiHardBoss[6] - >> m_auiUlduarKeepers[0] >> m_auiUlduarKeepers[1] >> m_auiUlduarKeepers[2] >> m_auiUlduarKeepers[3]; + >> m_auiEncounter[4] >> m_auiEncounter[5] >> m_auiEncounter[6] >> m_auiEncounter[7] >> m_auiEncounter[8] + >> m_auiEncounter[9] >> m_auiEncounter[10] >> m_auiEncounter[11] >> m_auiEncounter[12] >> m_auiEncounter[13] + >> m_auiHardBoss[0] >> m_auiHardBoss[1] >> m_auiHardBoss[2] >> m_auiHardBoss[3] >> m_auiHardBoss[4] >> m_auiHardBoss[5] >> m_auiHardBoss[6] + >> m_auiUlduarKeepers[0] >> m_auiUlduarKeepers[1] >> m_auiUlduarKeepers[2] >> m_auiUlduarKeepers[3]; for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) { diff --git a/scripts/northrend/utgarde_keep/utgarde_keep/boss_ingvar.cpp b/scripts/northrend/utgarde_keep/utgarde_keep/boss_ingvar.cpp index dd1af1e20..2abdae1f1 100644 --- a/scripts/northrend/utgarde_keep/utgarde_keep/boss_ingvar.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_keep/boss_ingvar.cpp @@ -40,7 +40,7 @@ enum NPC_THROW_DUMMY = 23997, // the axe, moving to target NPC_GROUND_VISUAL = 24012, // has SPELL_SCOURGE_RES_BUBBLE aura - //phase 1 + // phase 1 SPELL_CLEAVE = 42724, SPELL_SMASH = 42669, @@ -52,7 +52,7 @@ enum SPELL_STAGGERING_ROAR = 42708, SPELL_STAGGERING_ROAR_H = 59708, - //phase 2 + // phase 2 SPELL_DARK_SMASH_H = 42723, SPELL_DREADFUL_ROAR = 42729, @@ -65,7 +65,7 @@ enum SPELL_SHADOW_AXE_PROC = 42750, // triggers 42751 SPELL_SHADOW_AXE_PROC_H = 59719, // triggers 59720 - //ressurection sequenze + // ressurection sequenze SPELL_ASTRAL_TELEPORT = 34427, // aura cast by Annhylde on spawn SPELL_SUMMON_BANSHEE = 42912, // summons Annhylde and sets a glow aura SPELL_FEIGN_DEATH = 42795, @@ -241,7 +241,7 @@ struct MANGOS_DLL_DECL boss_ingvarAI : public ScriptedAI { if (m_uiCleaveTimer < uiDiff) { - if (DoCastSpellIfCan(m_creature->getVictim(), m_bIsRegularMode? SPELL_WOE_STRIKE : SPELL_WOE_STRIKE_H) == CAST_OK) + if (DoCastSpellIfCan(m_creature->getVictim(), m_bIsRegularMode ? SPELL_WOE_STRIKE : SPELL_WOE_STRIKE_H) == CAST_OK) m_uiCleaveTimer = urand(2500, 7000); } else diff --git a/scripts/northrend/utgarde_keep/utgarde_keep/boss_keleseth.cpp b/scripts/northrend/utgarde_keep/utgarde_keep/boss_keleseth.cpp index ca3885413..54384ca05 100644 --- a/scripts/northrend/utgarde_keep/utgarde_keep/boss_keleseth.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_keep/boss_keleseth.cpp @@ -125,7 +125,7 @@ struct MANGOS_DLL_DECL mob_vrykul_skeletonAI : public ScriptedAI m_creature->SetFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_DEAD); m_creature->SetStandState(UNIT_STAND_STATE_DEAD); return; - } + } } void UpdateAI(const uint32 uiDiff) @@ -226,8 +226,8 @@ struct MANGOS_DLL_DECL boss_kelesethAI : public ScriptedAI void SummonAdds() { - for (uint8 i=0; i<4; ++i) - m_creature->SummonCreature(NPC_VRYKUL_SKELETON, fAddPosition[0]+rand()%7, fAddPosition[1]+rand()%7, fAddPosition[2], fAddPosition[3], TEMPSUMMON_DEAD_DESPAWN, 0); + for (uint8 i = 0; i < 4; ++i) + m_creature->SummonCreature(NPC_VRYKUL_SKELETON, fAddPosition[0] + rand() % 7, fAddPosition[1] + rand() % 7, fAddPosition[2], fAddPosition[3], TEMPSUMMON_DEAD_DESPAWN, 0); } void DespawnOrKillAdds(bool bDespawn) @@ -310,7 +310,7 @@ struct MANGOS_DLL_DECL boss_kelesethAI : public ScriptedAI { if (Unit* pTombTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) { - //DoCastSpellIfCan(pTombTarget, SPELL_SUMMON_FROST_TOMB); + // DoCastSpellIfCan(pTombTarget, SPELL_SUMMON_FROST_TOMB); float fPosX, fPosY, fPosZ; pTombTarget->GetPosition(fPosX, fPosY, fPosZ); diff --git a/scripts/northrend/utgarde_keep/utgarde_keep/boss_skarvald_and_dalronn.cpp b/scripts/northrend/utgarde_keep/utgarde_keep/boss_skarvald_and_dalronn.cpp index 0e6d63ac6..bace047c5 100644 --- a/scripts/northrend/utgarde_keep/utgarde_keep/boss_skarvald_and_dalronn.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_keep/boss_skarvald_and_dalronn.cpp @@ -44,14 +44,14 @@ enum NPC_DAL_GHOST = 27389, NPC_SKA_GHOST = 27390, - NPC_SKELETAL = 28878, //summoned guardian in heroic + NPC_SKELETAL = 28878, // summoned guardian in heroic - //skarvald + // skarvald SPELL_CHARGE = 43651, SPELL_STONE_STRIKE = 48583, SPELL_ENRAGE = 48193, - //dalronn + // dalronn SPELL_SHADOW_BOLT = 43649, SPELL_SHADOW_BOLT_H = 59575, @@ -132,7 +132,7 @@ struct MANGOS_DLL_DECL boss_s_and_d_dummyAI : public ScriptedAI if (pSummoned->GetEntry() == NPC_DAL_GHOST || pSummoned->GetEntry() == NPC_SKA_GHOST) m_ghostGuid = pSummoned->GetObjectGuid(); - Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_TOPAGGRO,1); + Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_TOPAGGRO, 1); if (m_creature->getVictim()) pSummoned->AI()->AttackStart(pTarget ? pTarget : m_creature->getVictim()); diff --git a/scripts/northrend/utgarde_keep/utgarde_keep/instance_utgarde_keep.cpp b/scripts/northrend/utgarde_keep/utgarde_keep/instance_utgarde_keep.cpp index 62ad27f5b..8ce19c7cf 100644 --- a/scripts/northrend/utgarde_keep/utgarde_keep/instance_utgarde_keep.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_keep/instance_utgarde_keep.cpp @@ -37,7 +37,7 @@ void instance_utgarde_keep::Initialize() void instance_utgarde_keep::OnCreatureCreate(Creature* pCreature) { - switch(pCreature->GetEntry()) + switch (pCreature->GetEntry()) { case NPC_KELESETH: case NPC_SKARVALD: @@ -91,7 +91,7 @@ void instance_utgarde_keep::OnCreatureDeath(Creature* pCreature) void instance_utgarde_keep::SetData(uint32 uiType, uint32 uiData) { - switch(uiType) + switch (uiType) { case TYPE_KELESETH: if (uiData == IN_PROGRESS) @@ -149,7 +149,7 @@ void instance_utgarde_keep::Load(const char* chrIn) std::istringstream loadStream(chrIn); loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3] >> m_auiEncounter[4] >> m_auiEncounter[5]; - for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) + for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) { if (m_auiEncounter[i] == IN_PROGRESS) m_auiEncounter[i] = NOT_STARTED; diff --git a/scripts/northrend/utgarde_keep/utgarde_keep/utgarde_keep.cpp b/scripts/northrend/utgarde_keep/utgarde_keep/utgarde_keep.cpp index f8d0753f8..867ae4d85 100644 --- a/scripts/northrend/utgarde_keep/utgarde_keep/utgarde_keep.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_keep/utgarde_keep.cpp @@ -64,13 +64,13 @@ struct MANGOS_DLL_DECL mob_dragonflayer_forge_masterAI : public ScriptedAI void SetMyForge() { - std::list lGOList; + std::list lGOList; uint32 uiGOBellow = 0; uint32 uiGOFire = 0; for (uint8 i = 0; i < MAX_FORGE; ++i) { - switch(i) + switch (i) { case 0: uiGOBellow = GO_BELLOW_1; break; case 1: uiGOBellow = GO_BELLOW_2; break; @@ -93,7 +93,7 @@ struct MANGOS_DLL_DECL mob_dragonflayer_forge_masterAI : public ScriptedAI else if (lGOList.front()->getLootState() == GO_ACTIVATED) lGOList.front()->ResetDoorOrButton(); - switch(lGOList.front()->GetEntry()) + switch (lGOList.front()->GetEntry()) { case GO_BELLOW_1: uiGOFire = GO_FORGEFIRE_1; m_uiForgeEncounterId = TYPE_BELLOW_1; break; case GO_BELLOW_2: uiGOFire = GO_FORGEFIRE_2; m_uiForgeEncounterId = TYPE_BELLOW_2; break; diff --git a/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_gortok.cpp b/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_gortok.cpp index 3e4fbb5c7..3e90ad844 100644 --- a/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_gortok.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_gortok.cpp @@ -139,7 +139,7 @@ CreatureAI* GetAI_boss_gortok(Creature* pCreature) bool EffectDummyCreature_spell_awaken_gortok(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) { - //always check spellid and effectindex + // always check spellid and effectindex if (uiSpellId == SPELL_AWAKEN_GORTOK && uiEffIndex == EFFECT_INDEX_0) { pCreatureTarget->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); @@ -152,7 +152,7 @@ bool EffectDummyCreature_spell_awaken_gortok(Unit* pCaster, uint32 uiSpellId, Sp pCreatureTarget->AI()->AttackStart(pStarter); } - //always return true when we are handling this spell and effect + // always return true when we are handling this spell and effect return true; } @@ -205,7 +205,7 @@ void AddSC_boss_gortok() pNewScript->RegisterSelf(); pNewScript = new Script; - pNewScript->Name="npc_gortok_subboss"; + pNewScript->Name = "npc_gortok_subboss"; pNewScript->pEffectAuraDummy = &EffectAuraDummy_spell_aura_dummy_awaken_subboss; pNewScript->RegisterSelf(); diff --git a/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_skadi.cpp b/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_skadi.cpp index 6808d0f26..692640486 100644 --- a/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_skadi.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_skadi.cpp @@ -98,7 +98,7 @@ struct MANGOS_DLL_DECL boss_skadiAI : public ScriptedAI void KilledUnit(Unit* pVictim) { - switch(urand(0, 2)) + switch (urand(0, 2)) { case 0: DoScriptText(SAY_KILL_1, m_creature); break; case 1: DoScriptText(SAY_KILL_2, m_creature); break; diff --git a/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_svala.cpp b/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_svala.cpp index 0a8ba7a6b..b47c3cec9 100644 --- a/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_svala.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_svala.cpp @@ -200,7 +200,7 @@ struct MANGOS_DLL_DECL boss_svalaAI : public ScriptedAI if (pVictim->GetEntry() == NPC_SCOURGE_HULK && m_pInstance) m_pInstance->SetSpecialAchievementCriteria(TYPE_ACHIEV_INCREDIBLE_HULK, true); - switch(urand(0, 2)) + switch (urand(0, 2)) { case 0: DoScriptText(SAY_SLAY_1, m_creature); break; case 1: DoScriptText(SAY_SLAY_2, m_creature); break; @@ -238,7 +238,7 @@ struct MANGOS_DLL_DECL boss_svalaAI : public ScriptedAI { m_uiIntroTimer = 10000; - switch(m_uiIntroCount) + switch (m_uiIntroCount) { case 0: DoScriptText(SAY_INTRO_1, m_creature); diff --git a/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_ymiron.cpp b/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_ymiron.cpp index 4a58fe3b3..c9007d18e 100644 --- a/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_ymiron.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_ymiron.cpp @@ -43,7 +43,7 @@ enum SPELL_FETID_ROT = 48291, SPELL_FETID_ROT_H = 59300, SPELL_SCREAMS_OF_THE_DEAD = 51750, // knockback players to summon boat - //SPELL_CHOOSE_SPIRIT = 48306, // boss chooses spirit + // SPELL_CHOOSE_SPIRIT = 48306, // boss chooses spirit // blessings SPELL_SPIRIT_BURST = 48529, // by Ranulf @@ -61,8 +61,8 @@ enum SPELL_SPIRIT_DIES = 48596, // cast by a boat spirit // by summoned creatures - //SPELL_SPIRIT_VISUAL = 48593, // avenging spirit summon visual - handled in eventAI - //SPELL_WITHER_TRIGG = 48584, // aura for avenging spirits - triggers 48585 on melee - handled in eventAI + // SPELL_SPIRIT_VISUAL = 48593, // avenging spirit summon visual - handled in eventAI + // SPELL_WITHER_TRIGG = 48584, // aura for avenging spirits - triggers 48585 on melee - handled in eventAI // spirit transforms SPELL_BJORN_TRANSFORM = 48308, @@ -71,8 +71,8 @@ enum SPELL_TORGYN_TRANSFORM = 48313, NPC_SPIRIT_FOUNT = 27339, - //NPC_AVENGING_SPIRIT = 27386, - //NPC_SPIRIT_SUMMONER = 27392, // summoned around the boss - triggers 48592 + // NPC_AVENGING_SPIRIT = 27386, + // NPC_SPIRIT_SUMMONER = 27392, // summoned around the boss - triggers 48592 MAX_BOATS = 4, @@ -172,7 +172,7 @@ struct MANGOS_DLL_DECL boss_ymironAI : public ScriptedAI void KilledUnit(Unit* pVictim) { - switch(urand(0, 3)) + switch (urand(0, 3)) { case 0: DoScriptText(SAY_SLAY_1, m_creature); break; case 1: DoScriptText(SAY_SLAY_2, m_creature); break; diff --git a/scripts/northrend/utgarde_keep/utgarde_pinnacle/instance_utgarde_pinnacle.cpp b/scripts/northrend/utgarde_keep/utgarde_pinnacle/instance_utgarde_pinnacle.cpp index 68635de01..06ecea95f 100644 --- a/scripts/northrend/utgarde_keep/utgarde_pinnacle/instance_utgarde_pinnacle.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_pinnacle/instance_utgarde_pinnacle.cpp @@ -41,7 +41,7 @@ void instance_pinnacle::Initialize() void instance_pinnacle::OnCreatureCreate(Creature* pCreature) { - switch(pCreature->GetEntry()) + switch (pCreature->GetEntry()) { case NPC_FURBOLG: case NPC_WORGEN: @@ -62,7 +62,7 @@ void instance_pinnacle::OnCreatureCreate(Creature* pCreature) void instance_pinnacle::OnObjectCreate(GameObject* pGo) { - switch(pGo->GetEntry()) + switch (pGo->GetEntry()) { case GO_DOOR_SKADI: if (m_auiEncounter[TYPE_SKADI] == DONE) @@ -184,7 +184,7 @@ void instance_pinnacle::Load(const char* chrIn) std::istringstream loadStream(chrIn); loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3]; - for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) + for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) { if (m_auiEncounter[i] == IN_PROGRESS) m_auiEncounter[i] = NOT_STARTED; @@ -217,7 +217,7 @@ bool instance_pinnacle::CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player void instance_pinnacle::OnCreatureEvade(Creature* pCreature) { - switch(pCreature->GetEntry()) + switch (pCreature->GetEntry()) { case NPC_FURBOLG: case NPC_WORGEN: @@ -230,7 +230,7 @@ void instance_pinnacle::OnCreatureEvade(Creature* pCreature) void instance_pinnacle::OnCreatureDeath(Creature* pCreature) { - switch(pCreature->GetEntry()) + switch (pCreature->GetEntry()) { case NPC_FURBOLG: case NPC_WORGEN: diff --git a/scripts/northrend/violet_hold/boss_erekem.cpp b/scripts/northrend/violet_hold/boss_erekem.cpp index bc6986cbb..532f73518 100644 --- a/scripts/northrend/violet_hold/boss_erekem.cpp +++ b/scripts/northrend/violet_hold/boss_erekem.cpp @@ -175,7 +175,7 @@ CreatureAI* GetAI_boss_erekem(Creature* pCreature) struct MANGOS_DLL_DECL npc_erekem_guardAI : public ScriptedAI { - npc_erekem_guardAI(Creature *pCreature) : ScriptedAI(pCreature) + npc_erekem_guardAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = ((instance_violet_hold*)pCreature->GetInstanceData()); Reset(); @@ -243,7 +243,7 @@ struct MANGOS_DLL_DECL npc_erekem_guardAI : public ScriptedAI CreatureAI* GetAI_npc_erekem_guard(Creature* pCreature) { - return new npc_erekem_guardAI (pCreature); + return new npc_erekem_guardAI(pCreature); } void AddSC_boss_erekem() diff --git a/scripts/northrend/violet_hold/instance_violet_hold.cpp b/scripts/northrend/violet_hold/instance_violet_hold.cpp index 911a97b1b..ea8c38870 100644 --- a/scripts/northrend/violet_hold/instance_violet_hold.cpp +++ b/scripts/northrend/violet_hold/instance_violet_hold.cpp @@ -81,7 +81,7 @@ void instance_violet_hold::ResetAll() pGhostBoss->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PASSIVE); } else if (Creature* pSummoner = GetSingleCreatureFromStorage(NPC_SINCLARI_ALT)) - pSummoner->SummonCreature(pData->uiGhostEntry, (*itr)->fX, (*itr)->fY, (*itr)->fZ, (*itr)->fO, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 600*IN_MILLISECONDS); + pSummoner->SummonCreature(pData->uiGhostEntry, (*itr)->fX, (*itr)->fY, (*itr)->fZ, (*itr)->fO, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 600 * IN_MILLISECONDS); // Respawn Erekem guards if (pData->uiType == TYPE_EREKEM) @@ -105,7 +105,7 @@ void instance_violet_hold::ResetAll() void instance_violet_hold::OnCreatureCreate(Creature* pCreature) { - switch(pCreature->GetEntry()) + switch (pCreature->GetEntry()) { case NPC_SINCLARI: case NPC_SINCLARI_ALT: @@ -151,7 +151,7 @@ void instance_violet_hold::OnCreatureCreate(Creature* pCreature) void instance_violet_hold::OnObjectCreate(GameObject* pGo) { - switch(pGo->GetEntry()) + switch (pGo->GetEntry()) { case GO_CELL_LAVANTHOR: m_mBossToCellMap.insert(BossToCellMap::value_type(NPC_LAVANTHOR, pGo->GetObjectGuid())); @@ -193,7 +193,7 @@ void instance_violet_hold::UpdateCellForBoss(uint32 uiBossEntry, bool bForceClos if (itrCellLower == itrCellUpper) return; - for(BossToCellMap::const_iterator itr = itrCellLower; itr != itrCellUpper; ++itr) + for (BossToCellMap::const_iterator itr = itrCellLower; itr != itrCellUpper; ++itr) { if (!bForceClosing) DoUseDoorOrButton(itr->second); @@ -239,7 +239,7 @@ void instance_violet_hold::SetData(uint32 uiType, uint32 uiData) if (m_auiEncounter[uiType] == DONE) return; - switch(uiData) + switch (uiData) { case IN_PROGRESS: // ToDo: enable the prison defense system when implemented @@ -276,13 +276,13 @@ void instance_violet_hold::SetData(uint32 uiType, uint32 uiData) DoUpdateWorldState(WORLD_STATE_SEAL, m_uiWorldStateSealCount); // Yell at 75%, 50% and 25% shield - if (m_uiWorldStateSealCount < 100-25*m_uiSealYellCount) + if (m_uiWorldStateSealCount < 100 - 25 * m_uiSealYellCount) { if (Creature* pSinclari = GetSingleCreatureFromStorage(NPC_SINCLARI_ALT)) { // ToDo: I'm not sure if the last yell should be at 25% or at 5%. Needs research ++m_uiSealYellCount; - DoScriptText(aSealWeakYell[m_uiSealYellCount-1], pSinclari); + DoScriptText(aSealWeakYell[m_uiSealYellCount - 1], pSinclari); } } @@ -351,9 +351,9 @@ void instance_violet_hold::SetData(uint32 uiType, uint32 uiData) std::ostringstream saveStream; saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2] << " " - << m_auiEncounter[3] << " " << m_auiEncounter[4] << " " << m_auiEncounter[5] << " " - << m_auiEncounter[6] << " " << m_auiEncounter[7] << " " << m_auiEncounter[8] << " " - << m_auiEncounter[9]; + << m_auiEncounter[3] << " " << m_auiEncounter[4] << " " << m_auiEncounter[5] << " " + << m_auiEncounter[6] << " " << m_auiEncounter[7] << " " << m_auiEncounter[8] << " " + << m_auiEncounter[9]; m_strInstData = saveStream.str(); @@ -381,10 +381,10 @@ void instance_violet_hold::Load(const char* chrIn) std::istringstream loadStream(chrIn); loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3] - >> m_auiEncounter[4] >> m_auiEncounter[5] >> m_auiEncounter[6] >> m_auiEncounter[7] - >> m_auiEncounter[8] >> m_auiEncounter[9]; + >> m_auiEncounter[4] >> m_auiEncounter[5] >> m_auiEncounter[6] >> m_auiEncounter[7] + >> m_auiEncounter[8] >> m_auiEncounter[9]; - for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) + for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) { if (m_auiEncounter[i] == IN_PROGRESS) m_auiEncounter[i] = NOT_STARTED; @@ -395,7 +395,7 @@ void instance_violet_hold::Load(const char* chrIn) void instance_violet_hold::SetIntroPortals(bool bDeactivate) { - for(GuidList::const_iterator itr = m_lIntroPortalList.begin(); itr != m_lIntroPortalList.end(); ++itr) + for (GuidList::const_iterator itr = m_lIntroPortalList.begin(); itr != m_lIntroPortalList.end(); ++itr) { if (Creature* pPortal = instance->GetCreature(*itr)) { @@ -415,7 +415,7 @@ void instance_violet_hold::SpawnPortal() { uint32 uiPortalEntry = pData->pPortalType == PORTAL_TYPE_NORM ? NPC_PORTAL : NPC_PORTAL_ELITE; - pController->SummonCreature(uiPortalEntry, pData->fX, pData->fY, pData->fZ, pData->fOrient, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 1800*IN_MILLISECONDS); + pController->SummonCreature(uiPortalEntry, pData->fX, pData->fY, pData->fZ, pData->fOrient, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 1800 * IN_MILLISECONDS); } } } @@ -472,7 +472,7 @@ void instance_violet_hold::SetRandomBosses() { uint32 uiPosition = urand(0, m_lRandomBossList.size() - 1); - for(std::list::iterator itr = m_lRandomBossList.begin(); itr != m_lRandomBossList.end(); ++itr, --uiPosition) + for (std::list::iterator itr = m_lRandomBossList.begin(); itr != m_lRandomBossList.end(); ++itr, --uiPosition) { if (!*itr) continue; @@ -505,7 +505,7 @@ void instance_violet_hold::SetRandomBosses() void instance_violet_hold::CallGuards(bool bRespawn) { - for(GuidList::const_iterator itr = m_lGuardsList.begin(); itr != m_lGuardsList.end(); ++itr) + for (GuidList::const_iterator itr = m_lGuardsList.begin(); itr != m_lGuardsList.end(); ++itr) { if (Creature* pGuard = instance->GetCreature(*itr)) { @@ -544,11 +544,11 @@ bool instance_violet_hold::CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Pla { switch (uiCriteriaId) { - // ToDo: uncomment these when they are implemented - //case ACHIEV_CRIT_DEFENSELES: - // return m_bIsDefenseless; - //case ACHIEV_CRIT_DEHYDRATATION: - // return m_bIsDehydratation; + // ToDo: uncomment these when they are implemented + // case ACHIEV_CRIT_DEFENSELES: + // return m_bIsDefenseless; + // case ACHIEV_CRIT_DEHYDRATATION: + // return m_bIsDehydratation; case ACHIEV_CRIT_VOID_DANCE: return m_bIsVoidDance; @@ -760,7 +760,7 @@ instance_violet_hold::~instance_violet_hold() for (std::vector::const_iterator itr = m_vRandomBosses.begin(); itr != m_vRandomBosses.end(); ++itr) { if (*itr) - delete (*itr); + delete(*itr); } } diff --git a/scripts/northrend/violet_hold/violet_hold.cpp b/scripts/northrend/violet_hold/violet_hold.cpp index c76ba9ed2..6ab505e7c 100644 --- a/scripts/northrend/violet_hold/violet_hold.cpp +++ b/scripts/northrend/violet_hold/violet_hold.cpp @@ -51,13 +51,13 @@ bool GOUse_go_activation_crystal(Player* pPlayer, GameObject* pGo) bool EffectDummyCreature_npc_door_seal(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) { - //always check spellid and effectindex + // always check spellid and effectindex if (uiSpellId == SPELL_DESTROY_DOOR_SEAL && uiEffIndex == EFFECT_INDEX_0) { if (instance_violet_hold* pInstance = (instance_violet_hold*)pCreatureTarget->GetInstanceData()) pInstance->SetData(TYPE_SEAL, SPECIAL); - //always return true when we are handling this spell and effect + // always return true when we are handling this spell and effect return true; } @@ -106,7 +106,7 @@ struct MANGOS_DLL_DECL npc_sinclariAI : public npc_escortAI if (!m_pInstance) return; - switch(uiPointId) + switch (uiPointId) { case 0: m_pInstance->ProcessActivationCrystal(m_creature, true); @@ -164,9 +164,9 @@ bool GossipHello_npc_sinclari(Player* pPlayer, Creature* pCreature) if (instance_violet_hold* pInstance = (instance_violet_hold*)pCreature->GetInstanceData()) { if (pInstance->GetData(TYPE_MAIN) != IN_PROGRESS) - pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_INTRO, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_INTRO, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); else - pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_TELEPORT, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3); + pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_TELEPORT, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); } pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXT_ID_INTRO, pCreature->GetObjectGuid()); @@ -175,13 +175,13 @@ bool GossipHello_npc_sinclari(Player* pPlayer, Creature* pCreature) bool GossipSelect_npc_sinclari(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) { - if (uiAction == GOSSIP_ACTION_INFO_DEF+1) + if (uiAction == GOSSIP_ACTION_INFO_DEF + 1) { if (instance_violet_hold* pInstance = (instance_violet_hold*)pCreature->GetInstanceData()) { if (pInstance->GetData(TYPE_MAIN) == NOT_STARTED) { - pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_START, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); + pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_START, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXT_ID_START, pCreature->GetObjectGuid()); } } @@ -189,7 +189,7 @@ bool GossipSelect_npc_sinclari(Player* pPlayer, Creature* pCreature, uint32 uiSe pPlayer->CLOSE_GOSSIP_MENU(); } - if (uiAction == GOSSIP_ACTION_INFO_DEF+2) + if (uiAction == GOSSIP_ACTION_INFO_DEF + 2) { if (instance_violet_hold* pInstance = (instance_violet_hold*)pCreature->GetInstanceData()) { @@ -207,7 +207,7 @@ bool GossipSelect_npc_sinclari(Player* pPlayer, Creature* pCreature, uint32 uiSe pPlayer->CLOSE_GOSSIP_MENU(); } - if (uiAction == GOSSIP_ACTION_INFO_DEF+3) + if (uiAction == GOSSIP_ACTION_INFO_DEF + 3) { pCreature->CastSpell(pPlayer, SPELL_TELEPORT_INSIDE, true); pPlayer->CLOSE_GOSSIP_MENU(); @@ -252,7 +252,7 @@ struct MANGOS_DLL_DECL npc_prison_event_controllerAI : public ScriptedAI void JustSummoned(Creature* pSummoned) { - switch(pSummoned->GetEntry()) + switch (pSummoned->GetEntry()) { case NPC_AZURE_CAPTAIN: DoScriptText(EMOTE_DRAGONFLIGHT_PORTAL, pSummoned); @@ -355,7 +355,7 @@ struct MANGOS_DLL_DECL npc_prison_event_controllerAI : public ScriptedAI { if (Creature* pAdd = m_pInstance->instance->GetCreature(*itr)) { - fMoveX = (pData->fX - pAdd->GetPositionX())*.25; + fMoveX = (pData->fX - pAdd->GetPositionX()) * .25; pAdd->GetMotionMaster()->MovePoint(0, pData->fX - fMoveX, pData->fY, pData->fZ); pAdd->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PASSIVE); } @@ -448,7 +448,7 @@ struct MANGOS_DLL_DECL npc_teleportation_portalAI : public ScriptedAI if (m_creature->GetEntry() == NPC_PORTAL_INTRO) { // ToDo: uncomment this when the information and DB data is confirmed. Right now the mobs may overrun the guards after a few min of fightning - //m_creature->SummonCreature(m_pInstance->GetRandomMobForIntroPortal(), 0, 0, 0, 0, TEMPSUMMON_DEAD_DESPAWN, 0); + // m_creature->SummonCreature(m_pInstance->GetRandomMobForIntroPortal(), 0, 0, 0, 0, TEMPSUMMON_DEAD_DESPAWN, 0); return; } @@ -459,9 +459,9 @@ struct MANGOS_DLL_DECL npc_teleportation_portalAI : public ScriptedAI { // Summon a guardian keeper or Cyanigosa if (m_uiMyPortalNumber == 18) - m_creature->SummonCreature(NPC_CYANIGOSA, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 600*IN_MILLISECONDS); + m_creature->SummonCreature(NPC_CYANIGOSA, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 600 * IN_MILLISECONDS); else - m_creature->SummonCreature(m_pInstance->GetRandomPortalEliteEntry(), 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 600*IN_MILLISECONDS); + m_creature->SummonCreature(m_pInstance->GetRandomPortalEliteEntry(), 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 600 * IN_MILLISECONDS); } else if (m_creature->GetEntry() == NPC_PORTAL_ELITE) { @@ -479,8 +479,8 @@ struct MANGOS_DLL_DECL npc_teleportation_portalAI : public ScriptedAI uint32 uiSummonId = aTrashPortalNpcs[i]; // Summon the trash pack around the portal - m_creature->GetNearPoint(m_creature, fX, fY, fZ, 0, 3.0f, M_PI_F/2*i); - pController->SummonCreature(uiSummonId, fX, fY, fZ, m_creature->GetOrientation(), TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 600*IN_MILLISECONDS); + m_creature->GetNearPoint(m_creature, fX, fY, fZ, 0, 3.0f, M_PI_F / 2 * i); + pController->SummonCreature(uiSummonId, fX, fY, fZ, m_creature->GetOrientation(), TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 600 * IN_MILLISECONDS); } // If this is a trash portal, set the current number in the @@ -488,7 +488,7 @@ struct MANGOS_DLL_DECL npc_teleportation_portalAI : public ScriptedAI pControllerAI->DoSetCurrentTrashPortal(m_uiMyPortalNumber); } else - pController->SummonCreature(NPC_AZURE_SABOTEUR, m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), m_creature->GetOrientation(), TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 600*IN_MILLISECONDS); + pController->SummonCreature(NPC_AZURE_SABOTEUR, m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), m_creature->GetOrientation(), TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 600 * IN_MILLISECONDS); m_creature->ForcedDespawn(5000); } @@ -568,7 +568,7 @@ struct MANGOS_DLL_DECL npc_teleportation_portalAI : public ScriptedAI if (m_uiCyanigosaMoveTimer <= uiDiff) { if (Creature* pCyanigosa = m_creature->GetMap()->GetCreature(m_cyanigosaGuid)) - pCyanigosa->GetMotionMaster()->MoveJump(afPortalLocation[8].fX, afPortalLocation[8].fY, afPortalLocation[8].fZ, pCyanigosa->GetSpeed(MOVE_RUN)*2, 10.0f); + pCyanigosa->GetMotionMaster()->MoveJump(afPortalLocation[8].fX, afPortalLocation[8].fY, afPortalLocation[8].fZ, pCyanigosa->GetSpeed(MOVE_RUN) * 2, 10.0f); m_uiCyanigosaMoveTimer = 0; } @@ -585,13 +585,13 @@ CreatureAI* GetAI_npc_teleportation_portal(Creature* pCreature) bool EffectDummyCreature_npc_teleportation_portal(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) { - //always check spellid and effectindex + // always check spellid and effectindex if (uiSpellId == SPELL_PORTAL_PERIODIC && uiEffIndex == EFFECT_INDEX_0) { if (npc_teleportation_portalAI* pPortalAI = dynamic_cast(pCreatureTarget->AI())) pPortalAI->DoSummon(); - //always return true when we are handling this spell and effect + // always return true when we are handling this spell and effect return true; } diff --git a/scripts/northrend/violet_hold/violet_hold.h b/scripts/northrend/violet_hold/violet_hold.h index 37dddf590..58f0c41fd 100644 --- a/scripts/northrend/violet_hold/violet_hold.h +++ b/scripts/northrend/violet_hold/violet_hold.h @@ -76,7 +76,7 @@ enum // used for intro NPC_AZURE_BINDER_INTRO = 31007, NPC_AZURE_INVADER_INTRO = 31008, - NPC_AZURE_SPELLBREAKER_INTRO= 31009, + NPC_AZURE_SPELLBREAKER_INTRO = 31009, NPC_AZURE_MAGE_SLAYER_INTRO = 31010, NPC_AZURE_SABOTEUR = 31079, @@ -152,17 +152,17 @@ struct PortalData float fX, fY, fZ, fOrient; }; -static const PortalData afPortalLocation[]= +static const PortalData afPortalLocation[] = { - {PORTAL_TYPE_NORM, 1936.07f, 803.198f, 53.3749f, 3.1241f}, //balcony - {PORTAL_TYPE_NORM, 1877.51f, 850.104f, 44.6599f, 4.7822f}, //erekem - {PORTAL_TYPE_NORM, 1890.64f, 753.471f, 48.7224f, 1.7104f}, //moragg - {PORTAL_TYPE_SQUAD, 1911.06f, 802.103f, 38.6465f, 2.8908f}, //below balcony - {PORTAL_TYPE_SQUAD, 1928.06f, 763.256f, 51.3167f, 2.3905f}, //bridge - {PORTAL_TYPE_SQUAD, 1924.26f, 847.661f, 47.1591f, 4.0202f}, //zuramat - {PORTAL_TYPE_NORM, 1914.16f, 832.527f, 38.6441f, 3.5160f}, //xevozz - {PORTAL_TYPE_NORM, 1857.30f, 764.145f, 38.6543f, 0.8339f}, //lavanthor - {PORTAL_TYPE_BOSS, 1890.73f, 803.309f, 38.4001f, 2.4139f}, //center + {PORTAL_TYPE_NORM, 1936.07f, 803.198f, 53.3749f, 3.1241f}, // balcony + {PORTAL_TYPE_NORM, 1877.51f, 850.104f, 44.6599f, 4.7822f}, // erekem + {PORTAL_TYPE_NORM, 1890.64f, 753.471f, 48.7224f, 1.7104f}, // moragg + {PORTAL_TYPE_SQUAD, 1911.06f, 802.103f, 38.6465f, 2.8908f}, // below balcony + {PORTAL_TYPE_SQUAD, 1928.06f, 763.256f, 51.3167f, 2.3905f}, // bridge + {PORTAL_TYPE_SQUAD, 1924.26f, 847.661f, 47.1591f, 4.0202f}, // zuramat + {PORTAL_TYPE_NORM, 1914.16f, 832.527f, 38.6441f, 3.5160f}, // xevozz + {PORTAL_TYPE_NORM, 1857.30f, 764.145f, 38.6543f, 0.8339f}, // lavanthor + {PORTAL_TYPE_BOSS, 1890.73f, 803.309f, 38.4001f, 2.4139f}, // center }; struct BossInformation @@ -259,7 +259,7 @@ class MANGOS_DLL_DECL instance_violet_hold : public ScriptedInstance bool IsNextPortalForTrash() { - if ((m_uiWorldStatePortalCount+1) % MAX_MINIBOSSES) + if ((m_uiWorldStatePortalCount + 1) % MAX_MINIBOSSES) return true; return false; diff --git a/scripts/northrend/zuldrak.cpp b/scripts/northrend/zuldrak.cpp index 3ca38d13c..701cb0e5d 100644 --- a/scripts/northrend/zuldrak.cpp +++ b/scripts/northrend/zuldrak.cpp @@ -63,7 +63,7 @@ struct MANGOS_DLL_DECL npc_gurgthockAI : public ScriptedAI void SummonedCreatureJustDied(Creature* pSummoned) { uint32 uiEntry = pSummoned->GetEntry(); - for(uint8 i = 0; i < 4; ++i) + for (uint8 i = 0; i < 4; ++i) { if (uiEntry == m_auiBosses[i]) { diff --git a/scripts/outland/auchindoun/auchenai_crypts/boss_exarch_maladaar.cpp b/scripts/outland/auchindoun/auchenai_crypts/boss_exarch_maladaar.cpp index d4d357318..08f1b87cc 100644 --- a/scripts/outland/auchindoun/auchenai_crypts/boss_exarch_maladaar.cpp +++ b/scripts/outland/auchindoun/auchenai_crypts/boss_exarch_maladaar.cpp @@ -31,7 +31,7 @@ EndContentData */ enum { - SPELL_STOLEN_SOUL_DISPEL= 33326, + SPELL_STOLEN_SOUL_DISPEL = 33326, SPELL_MOONFIRE = 37328, SPELL_FIREBALL = 37329, @@ -199,7 +199,7 @@ struct MANGOS_DLL_DECL boss_exarch_maladaarAI : public ScriptedAI void Aggro(Unit* pWho) { - switch(urand(0, 2)) + switch (urand(0, 2)) { case 0: DoScriptText(SAY_AGGRO_1, m_creature); break; case 1: DoScriptText(SAY_AGGRO_2, m_creature); break; @@ -211,7 +211,7 @@ struct MANGOS_DLL_DECL boss_exarch_maladaarAI : public ScriptedAI { if (pSummoned->GetEntry() == NPC_STOLEN_SOUL) { - //SPELL_STOLEN_SOUL_VISUAL has shapeshift effect, but not implemented feature in mangos for this spell. + // SPELL_STOLEN_SOUL_VISUAL has shapeshift effect, but not implemented feature in mangos for this spell. pSummoned->CastSpell(pSummoned, SPELL_STOLEN_SOUL_VISUAL, false); if (Player* pTarget = m_creature->GetMap()->GetPlayer(m_targetGuid)) diff --git a/scripts/outland/auchindoun/mana_tombs/boss_nexusprince_shaffar.cpp b/scripts/outland/auchindoun/mana_tombs/boss_nexusprince_shaffar.cpp index 22dc0cc76..bbfb29630 100644 --- a/scripts/outland/auchindoun/mana_tombs/boss_nexusprince_shaffar.cpp +++ b/scripts/outland/auchindoun/mana_tombs/boss_nexusprince_shaffar.cpp @@ -45,7 +45,7 @@ enum SPELL_FROSTNOVA = 32365, SPELL_ETHEREAL_BEACON = 32371, // Summons 18431 - //SPELL_ETHEREAL_BEACON_VISUAL = 32368, // included in creature_template_addon + // SPELL_ETHEREAL_BEACON_VISUAL = 32368, // included in creature_template_addon }; struct MANGOS_DLL_DECL boss_nexusprince_shaffarAI : public ScriptedAI @@ -86,7 +86,7 @@ struct MANGOS_DLL_DECL boss_nexusprince_shaffarAI : public ScriptedAI void Aggro(Unit* pWho) { - switch(urand(0, 2)) + switch (urand(0, 2)) { case 0: DoScriptText(SAY_AGGRO_1, m_creature); break; case 1: DoScriptText(SAY_AGGRO_2, m_creature); break; @@ -96,7 +96,7 @@ struct MANGOS_DLL_DECL boss_nexusprince_shaffarAI : public ScriptedAI void JustSummoned(Creature* pSummoned) { - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) pSummoned->AI()->AttackStart(pTarget); } @@ -143,7 +143,7 @@ struct MANGOS_DLL_DECL boss_nexusprince_shaffarAI : public ScriptedAI { if (DoCastSpellIfCan(m_creature, SPELL_BLINK) == CAST_OK) { - //expire movement, will prevent from running right back to victim after cast + // expire movement, will prevent from running right back to victim after cast //(but should MoveChase be used again at a certain time or should he not move?) if (m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() == CHASE_MOTION_TYPE) m_creature->GetMotionMaster()->MovementExpired(); @@ -158,7 +158,7 @@ struct MANGOS_DLL_DECL boss_nexusprince_shaffarAI : public ScriptedAI { if (DoCastSpellIfCan(m_creature, SPELL_ETHEREAL_BEACON) == CAST_OK) { - if (!urand(0,3)) + if (!urand(0, 3)) DoScriptText(SAY_SUMMON, m_creature); m_uiBeaconTimer = urand(45000, 75000); diff --git a/scripts/outland/auchindoun/mana_tombs/boss_pandemonius.cpp b/scripts/outland/auchindoun/mana_tombs/boss_pandemonius.cpp index 9bbb9d951..7a5192418 100644 --- a/scripts/outland/auchindoun/mana_tombs/boss_pandemonius.cpp +++ b/scripts/outland/auchindoun/mana_tombs/boss_pandemonius.cpp @@ -74,7 +74,7 @@ struct MANGOS_DLL_DECL boss_pandemoniusAI : public ScriptedAI void Aggro(Unit* pWho) { - switch(urand(0, 2)) + switch (urand(0, 2)) { case 0: DoScriptText(SAY_AGGRO_1, m_creature); break; case 1: DoScriptText(SAY_AGGRO_2, m_creature); break; diff --git a/scripts/outland/auchindoun/sethekk_halls/boss_anzu.cpp b/scripts/outland/auchindoun/sethekk_halls/boss_anzu.cpp index 5005a6c68..767b534de 100644 --- a/scripts/outland/auchindoun/sethekk_halls/boss_anzu.cpp +++ b/scripts/outland/auchindoun/sethekk_halls/boss_anzu.cpp @@ -139,7 +139,7 @@ struct MANGOS_DLL_DECL boss_anzuAI : public ScriptedAI float fX, fY, fZ, fAng; for (uint8 i = 0; i < 3; ++i) { - fAng = 2*M_PI_F/3*i; + fAng = 2 * M_PI_F / 3 * i; m_creature->GetNearPoint(m_creature, fX, fY, fZ, 0, 15.0f, fAng); m_creature->SummonCreature(aSpiritsEntries[i], fX, fY, fZ, fAng + M_PI_F, TEMPSUMMON_CORPSE_DESPAWN, 0); } diff --git a/scripts/outland/auchindoun/sethekk_halls/boss_darkweaver_syth.cpp b/scripts/outland/auchindoun/sethekk_halls/boss_darkweaver_syth.cpp index 8215cf79b..60577af28 100644 --- a/scripts/outland/auchindoun/sethekk_halls/boss_darkweaver_syth.cpp +++ b/scripts/outland/auchindoun/sethekk_halls/boss_darkweaver_syth.cpp @@ -87,7 +87,7 @@ struct MANGOS_DLL_DECL boss_darkweaver_sythAI : public ScriptedAI void Aggro(Unit* pWho) { - switch(urand(0, 2)) + switch (urand(0, 2)) { case 0: DoScriptText(SAY_AGGRO_1, m_creature); break; case 1: DoScriptText(SAY_AGGRO_2, m_creature); break; @@ -138,10 +138,10 @@ struct MANGOS_DLL_DECL boss_darkweaver_sythAI : public ScriptedAI if (m_creature->IsNonMeleeSpellCasted(false)) m_creature->InterruptNonMeleeSpells(false); - DoCastSpellIfCan(m_creature, SPELL_SUMMON_SYTH_ARCANE, CAST_TRIGGERED); //front - DoCastSpellIfCan(m_creature, SPELL_SUMMON_SYTH_FIRE, CAST_TRIGGERED); //back - DoCastSpellIfCan(m_creature, SPELL_SUMMON_SYTH_FROST, CAST_TRIGGERED); //left - DoCastSpellIfCan(m_creature, SPELL_SUMMON_SYTH_SHADOW, CAST_TRIGGERED); //right + DoCastSpellIfCan(m_creature, SPELL_SUMMON_SYTH_ARCANE, CAST_TRIGGERED); // front + DoCastSpellIfCan(m_creature, SPELL_SUMMON_SYTH_FIRE, CAST_TRIGGERED); // back + DoCastSpellIfCan(m_creature, SPELL_SUMMON_SYTH_FROST, CAST_TRIGGERED); // left + DoCastSpellIfCan(m_creature, SPELL_SUMMON_SYTH_SHADOW, CAST_TRIGGERED); // right } void UpdateAI(const uint32 uiDiff) diff --git a/scripts/outland/auchindoun/sethekk_halls/boss_talon_king_ikiss.cpp b/scripts/outland/auchindoun/sethekk_halls/boss_talon_king_ikiss.cpp index 49a2068dd..a2da14744 100644 --- a/scripts/outland/auchindoun/sethekk_halls/boss_talon_king_ikiss.cpp +++ b/scripts/outland/auchindoun/sethekk_halls/boss_talon_king_ikiss.cpp @@ -101,7 +101,7 @@ struct MANGOS_DLL_DECL boss_talon_king_ikissAI : public ScriptedAI void Aggro(Unit* pWho) { - switch(urand(0, 2)) + switch (urand(0, 2)) { case 0: DoScriptText(SAY_AGGRO_1, m_creature); break; case 1: DoScriptText(SAY_AGGRO_2, m_creature); break; diff --git a/scripts/outland/auchindoun/sethekk_halls/instance_sethekk_halls.cpp b/scripts/outland/auchindoun/sethekk_halls/instance_sethekk_halls.cpp index 1da01c816..8f15a7e02 100644 --- a/scripts/outland/auchindoun/sethekk_halls/instance_sethekk_halls.cpp +++ b/scripts/outland/auchindoun/sethekk_halls/instance_sethekk_halls.cpp @@ -63,7 +63,7 @@ void instance_sethekk_halls::OnObjectCreate(GameObject* pGo) void instance_sethekk_halls::SetData(uint32 uiType, uint32 uiData) { - switch(uiType) + switch (uiType) { case TYPE_SYTH: m_auiEncounter[uiType] = uiData; @@ -124,7 +124,7 @@ void instance_sethekk_halls::Load(const char* chrIn) std::istringstream loadStream(chrIn); loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2]; - for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) + for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) { if (m_auiEncounter[i] == IN_PROGRESS) m_auiEncounter[i] = NOT_STARTED; diff --git a/scripts/outland/auchindoun/shadow_labyrinth/boss_ambassador_hellmaw.cpp b/scripts/outland/auchindoun/shadow_labyrinth/boss_ambassador_hellmaw.cpp index d56f0ba2b..3654d56e2 100644 --- a/scripts/outland/auchindoun/shadow_labyrinth/boss_ambassador_hellmaw.cpp +++ b/scripts/outland/auchindoun/shadow_labyrinth/boss_ambassador_hellmaw.cpp @@ -68,7 +68,7 @@ struct MANGOS_DLL_DECL boss_ambassador_hellmawAI : public ScriptedAI { m_uiCorrosiveAcidTimer = urand(20000, 23000); m_uiFearTimer = urand(20000, 26000); - m_uiEnrageTimer = 3*MINUTE*IN_MILLISECONDS; + m_uiEnrageTimer = 3 * MINUTE * IN_MILLISECONDS; m_bIsEnraged = false; } @@ -80,7 +80,7 @@ struct MANGOS_DLL_DECL boss_ambassador_hellmawAI : public ScriptedAI void Aggro(Unit* pWho) { - switch(urand(0, 2)) + switch (urand(0, 2)) { case 0: DoScriptText(SAY_AGGRO_1, m_creature); break; case 1: DoScriptText(SAY_AGGRO_2, m_creature); break; diff --git a/scripts/outland/auchindoun/shadow_labyrinth/boss_blackheart_the_inciter.cpp b/scripts/outland/auchindoun/shadow_labyrinth/boss_blackheart_the_inciter.cpp index 217658e6f..39cd5e85a 100644 --- a/scripts/outland/auchindoun/shadow_labyrinth/boss_blackheart_the_inciter.cpp +++ b/scripts/outland/auchindoun/shadow_labyrinth/boss_blackheart_the_inciter.cpp @@ -89,7 +89,7 @@ struct MANGOS_DLL_DECL boss_blackheart_the_inciterAI : public ScriptedAI void Aggro(Unit* pWho) { - switch(urand(0, 2)) + switch (urand(0, 2)) { case 0: DoScriptText(SAY_AGGRO1, m_creature); break; case 1: DoScriptText(SAY_AGGRO2, m_creature); break; diff --git a/scripts/outland/auchindoun/shadow_labyrinth/boss_grandmaster_vorpil.cpp b/scripts/outland/auchindoun/shadow_labyrinth/boss_grandmaster_vorpil.cpp index 13c8e4ccd..e6daa9d98 100644 --- a/scripts/outland/auchindoun/shadow_labyrinth/boss_grandmaster_vorpil.cpp +++ b/scripts/outland/auchindoun/shadow_labyrinth/boss_grandmaster_vorpil.cpp @@ -67,13 +67,13 @@ struct SummonLocations // Summon locations for the void portals static const SummonLocations aVorpilLocation[MAX_PORTALS] = { - {-262.40f, -229.57f, 17.08f}, - {-260.35f, -297.56f, 17.08f}, - {-292.05f, -270.37f, 12.68f}, - {-301.64f, -255.97f, 12.68f} + { -262.40f, -229.57f, 17.08f}, + { -260.35f, -297.56f, 17.08f}, + { -292.05f, -270.37f, 12.68f}, + { -301.64f, -255.97f, 12.68f} }; -static const float aVorpilTeleportLoc[3] = {-253.06f, -264.02f, 17.08f}; +static const float aVorpilTeleportLoc[3] = { -253.06f, -264.02f, 17.08f}; static const uint32 aTravelerSummonSpells[5] = {SPELL_SUMMON_VOIDWALKER_A, SPELL_SUMMON_VOIDWALKER_B, SPELL_SUMMON_VOIDWALKER_C, SPELL_SUMMON_VOIDWALKER_D, SPELL_SUMMON_VOIDWALKER_E}; @@ -108,7 +108,7 @@ struct MANGOS_DLL_DECL boss_grandmaster_vorpilAI : public ScriptedAI void MoveInLineOfSight(Unit* pWho) { - //not sure about right radius + // not sure about right radius if (!m_bHasDoneIntro && pWho->GetTypeId() == TYPEID_PLAYER && pWho->IsWithinDistInMap(m_creature, 50.0f) && pWho->IsWithinLOSInMap(m_creature)) { DoScriptText(SAY_INTRO, m_creature); @@ -120,7 +120,7 @@ struct MANGOS_DLL_DECL boss_grandmaster_vorpilAI : public ScriptedAI void Aggro(Unit* pWho) { - switch(urand(0, 2)) + switch (urand(0, 2)) { case 0: DoScriptText(SAY_AGGRO_1, m_creature); break; case 1: DoScriptText(SAY_AGGRO_2, m_creature); break; @@ -174,7 +174,7 @@ struct MANGOS_DLL_DECL boss_grandmaster_vorpilAI : public ScriptedAI GuidVector vGuids; m_creature->FillGuidsListFromThreatList(vGuids); - for (GuidVector::const_iterator itr = vGuids.begin();itr != vGuids.end(); ++itr) + for (GuidVector::const_iterator itr = vGuids.begin(); itr != vGuids.end(); ++itr) { Unit* pTarget = m_creature->GetMap()->GetUnit(*itr); @@ -188,7 +188,7 @@ struct MANGOS_DLL_DECL boss_grandmaster_vorpilAI : public ScriptedAI void UpdateAI(const uint32 uiDiff) { - //Return since we have no target + // Return since we have no target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/outland/auchindoun/shadow_labyrinth/instance_shadow_labyrinth.cpp b/scripts/outland/auchindoun/shadow_labyrinth/instance_shadow_labyrinth.cpp index db2b6f515..fffba77a7 100644 --- a/scripts/outland/auchindoun/shadow_labyrinth/instance_shadow_labyrinth.cpp +++ b/scripts/outland/auchindoun/shadow_labyrinth/instance_shadow_labyrinth.cpp @@ -44,7 +44,7 @@ void instance_shadow_labyrinth::Initialize() void instance_shadow_labyrinth::OnObjectCreate(GameObject* pGo) { - switch(pGo->GetEntry()) + switch (pGo->GetEntry()) { case GO_REFECTORY_DOOR: if (m_auiEncounter[2] == DONE) @@ -64,7 +64,7 @@ void instance_shadow_labyrinth::OnObjectCreate(GameObject* pGo) void instance_shadow_labyrinth::OnCreatureCreate(Creature* pCreature) { - switch(pCreature->GetEntry()) + switch (pCreature->GetEntry()) { case NPC_VORPIL: case NPC_HELLMAW: @@ -79,7 +79,7 @@ void instance_shadow_labyrinth::OnCreatureCreate(Creature* pCreature) void instance_shadow_labyrinth::SetData(uint32 uiType, uint32 uiData) { - switch(uiType) + switch (uiType) { case TYPE_HELLMAW: m_auiEncounter[0] = uiData; @@ -142,7 +142,7 @@ void instance_shadow_labyrinth::SetData(uint32 uiType, uint32 uiData) std::ostringstream saveStream; saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " - << m_auiEncounter[2] << " " << m_auiEncounter[3] << " " << m_auiEncounter[4]; + << m_auiEncounter[2] << " " << m_auiEncounter[3] << " " << m_auiEncounter[4]; m_strInstData = saveStream.str(); @@ -153,7 +153,7 @@ void instance_shadow_labyrinth::SetData(uint32 uiType, uint32 uiData) uint32 instance_shadow_labyrinth::GetData(uint32 uiType) { - switch(uiType) + switch (uiType) { case TYPE_HELLMAW: return m_auiEncounter[0]; case TYPE_OVERSEER: return m_auiEncounter[1]; diff --git a/scripts/outland/auchindoun/shadow_labyrinth/shadow_labyrinth.h b/scripts/outland/auchindoun/shadow_labyrinth/shadow_labyrinth.h index 435ee00f1..9a49435ea 100644 --- a/scripts/outland/auchindoun/shadow_labyrinth/shadow_labyrinth.h +++ b/scripts/outland/auchindoun/shadow_labyrinth/shadow_labyrinth.h @@ -19,8 +19,8 @@ enum NPC_VORPIL = 18732, NPC_FEL_OVERSEER = 18796, - GO_REFECTORY_DOOR = 183296, //door opened when blackheart the inciter dies - GO_SCREAMING_HALL_DOOR = 183295, //door opened when grandmaster vorpil dies + GO_REFECTORY_DOOR = 183296, // door opened when blackheart the inciter dies + GO_SCREAMING_HALL_DOOR = 183295, // door opened when grandmaster vorpil dies SAY_HELLMAW_INTRO = -1555000, diff --git a/scripts/outland/black_temple/black_temple.h b/scripts/outland/black_temple/black_temple.h index 5290260da..542392f48 100644 --- a/scripts/outland/black_temple/black_temple.h +++ b/scripts/outland/black_temple/black_temple.h @@ -71,9 +71,9 @@ class MANGOS_DLL_DECL instance_black_temple : public ScriptedInstance void SetData(uint32 uiType, uint32 uiData); uint32 GetData(uint32 uiType); - void GetChannelersGuidList(GuidList &lList) { lList = m_lChannelersGuidList; } - void GetGeneratorGuidVector(GuidVector &vVector) { vVector = m_vCreatureGeneratorGuidVector; } - void GetGlaiveTargetGuidVector(GuidVector &vVector) { vVector = m_vGlaiveTargetGuidVector; } + void GetChannelersGuidList(GuidList& lList) { lList = m_lChannelersGuidList; } + void GetGeneratorGuidVector(GuidVector& vVector) { vVector = m_vCreatureGeneratorGuidVector; } + void GetGlaiveTargetGuidVector(GuidVector& vVector) { vVector = m_vGlaiveTargetGuidVector; } const char* Save() { return m_strInstData.c_str(); } void Load(const char* chrIn); diff --git a/scripts/outland/black_temple/boss_bloodboil.cpp b/scripts/outland/black_temple/boss_bloodboil.cpp index adead44ec..c41eaa6bd 100644 --- a/scripts/outland/black_temple/boss_bloodboil.cpp +++ b/scripts/outland/black_temple/boss_bloodboil.cpp @@ -99,8 +99,8 @@ struct MANGOS_DLL_DECL boss_gurtogg_bloodboilAI : public ScriptedAI m_uiFelAcidTimer = 25000; m_uiEjectTimer = 10000; m_uiStrikeTimer = 15000; - m_uiPhaseChangeTimer = MINUTE*IN_MILLISECONDS; - m_uiBerserkTimer = 10*MINUTE*IN_MILLISECONDS; + m_uiPhaseChangeTimer = MINUTE * IN_MILLISECONDS; + m_uiBerserkTimer = 10 * MINUTE * IN_MILLISECONDS; m_bIsPhase1 = true; } diff --git a/scripts/outland/black_temple/boss_illidan.cpp b/scripts/outland/black_temple/boss_illidan.cpp index 15a85ab5f..5a7f06ede 100644 --- a/scripts/outland/black_temple/boss_illidan.cpp +++ b/scripts/outland/black_temple/boss_illidan.cpp @@ -89,7 +89,7 @@ enum SPELL_FLAME_CRASH = 40832, // Summons an invis/unselect passive mob that has an uiAura of flame in a circle around him. SPELL_DRAW_SOUL = 40904, // 5k Shadow Damage in front of him. Heals Illidan for 100k health (script effect) SPELL_PARASITIC_SHADOWFIEND = 41917, // DoT of 3k Shadow every 2 seconds. Lasts 10 seconds. (Script effect: Summon 2 parasites once the debuff has ticked off) - //SPELL_SUMMON_PARASITICS = 41915, // Summons 2 Parasitic Shadowfiends on the target. Handled in core. + // SPELL_SUMMON_PARASITICS = 41915, // Summons 2 Parasitic Shadowfiends on the target. Handled in core. SPELL_AGONIZING_FLAMES = 40834, // triggers 40932 SPELL_FRENZY = 40683, // Increases damage by 50% and attack speed by 30%. 20 seconds, PHASE 5 ONLY @@ -165,14 +165,14 @@ enum /************** Creature Summons **************/ NPC_ILLIDARI_ELITE = 23226, // attacks Akama on the stairs NPC_FLAME_CRASH = 23336, // has aura 40836 - //NPC_PARASITIC_SHADOWFIEND = 23498, // has aura 41913 (in c_t_a) + // NPC_PARASITIC_SHADOWFIEND = 23498, // has aura 41913 (in c_t_a) NPC_BLADE_OF_AZZINOTH = 22996, // has aura 41997 and summons 22997 on spawn NPC_FLAME_OF_AZZINOTH = 22997, NPC_ILLIDAN_TARGET = 23070, // the eye blast target - has aura 40017 NPC_DEMON_FIRE = 23069, // has aura 40029 NPC_BLAZE = 23259, // has aura 40610 NPC_SHADOW_DEMON = 23375, - //NPC_CAGE_TRAP_DISTURB_TRIGGER = 23304, + // NPC_CAGE_TRAP_DISTURB_TRIGGER = 23304, GO_CAGE_TRAP = 185916, @@ -263,13 +263,13 @@ struct Locations float fX, fY, fZ; }; -static const Locations aCenterLoc[]= +static const Locations aCenterLoc[] = { {705.012f, 305.721f, 354.723f}, // front location {676.740f, 305.297f, 353.192f}, // center location }; -static const Locations aIllidariElitesPos[MAX_ILLIDARI_ELITES]= +static const Locations aIllidariElitesPos[MAX_ILLIDARI_ELITES] = { {743.9686f, 289.6447f, 311.1807f}, {753.8425f, 286.562f, 310.9353f}, @@ -283,7 +283,7 @@ static const Locations aIllidariElitesPos[MAX_ILLIDARI_ELITES]= {754.0332f, 325.8136f, 310.3195f}, }; -static const Locations aEyeBlastPos[]= +static const Locations aEyeBlastPos[] = { // spawn {650.600f, 258.124f, 352.996f}, // back left @@ -352,7 +352,7 @@ struct MANGOS_DLL_DECL boss_illidan_stormrageAI : public ScriptedAI, private Dia void Reset() { m_uiPhase = PHASE_AKAMA; - m_uiBerserkTimer = 25*MINUTE*IN_MILLISECONDS; + m_uiBerserkTimer = 25 * MINUTE * IN_MILLISECONDS; m_bHasSummonedElites = false; @@ -370,7 +370,7 @@ struct MANGOS_DLL_DECL boss_illidan_stormrageAI : public ScriptedAI, private Dia m_uiLandTimer = 0; m_uiLandStage = 0; - m_uiAgonizingFlamesTimer= 35000; + m_uiAgonizingFlamesTimer = 35000; m_uiTransformTimer = 0; m_uiShadowBlastTimer = urand(1000, 2000); @@ -1255,13 +1255,13 @@ bool GossipHello_npc_akama_illidan(Player* pPlayer, Creature* pCreature) // Before climbing the stairs if (pCreature->GetPositionZ() < 300.0f) { - pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_PREPARE, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); + pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_PREPARE, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); pPlayer->SEND_GOSSIP_MENU(TEXT_ID_AKAMA_ILLIDAN_PREPARE, pCreature->GetObjectGuid()); } // Before starting combat else { - pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_START_EVENT, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); + pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_START_EVENT, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); pPlayer->SEND_GOSSIP_MENU(TEXT_ID_AKAMA_ILLIDAN_START, pCreature->GetObjectGuid()); } @@ -1270,7 +1270,7 @@ bool GossipHello_npc_akama_illidan(Player* pPlayer, Creature* pCreature) bool GossipSelect_npc_akama_illidan(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) { - if (uiAction == GOSSIP_ACTION_INFO_DEF+1 || GOSSIP_ACTION_INFO_DEF+2) + if (uiAction == GOSSIP_ACTION_INFO_DEF + 1 || GOSSIP_ACTION_INFO_DEF + 2) { pPlayer->CLOSE_GOSSIP_MENU(); diff --git a/scripts/outland/black_temple/boss_mother_shahraz.cpp b/scripts/outland/black_temple/boss_mother_shahraz.cpp index 572b5973e..ea50c5172 100644 --- a/scripts/outland/black_temple/boss_mother_shahraz.cpp +++ b/scripts/outland/black_temple/boss_mother_shahraz.cpp @@ -51,7 +51,7 @@ enum SPELL_BERSERK = 45078, }; -static const uint32 aPrismaticAuras[]= +static const uint32 aPrismaticAuras[] = { 40880, // Shadow 40882, // Fire @@ -61,7 +61,7 @@ static const uint32 aPrismaticAuras[]= 40897, // Holy }; -static const uint32 aPeriodicBeams[]= {SPELL_SINFUL_PERIODIC, SPELL_SINISTER_PERIODIC, SPELL_VILE_PERIODIC, SPELL_WICKED_PERIODIC}; +static const uint32 aPeriodicBeams[] = {SPELL_SINFUL_PERIODIC, SPELL_SINISTER_PERIODIC, SPELL_VILE_PERIODIC, SPELL_WICKED_PERIODIC}; struct MANGOS_DLL_DECL boss_shahrazAI : public ScriptedAI { @@ -91,12 +91,12 @@ struct MANGOS_DLL_DECL boss_shahrazAI : public ScriptedAI m_uiFatalAttractionTimer = 25000; m_uiShriekTimer = 30000; m_uiRandomYellTimer = urand(70000, 110000); - m_uiBerserkTimer = 10*MINUTE*IN_MILLISECONDS; + m_uiBerserkTimer = 10 * MINUTE * IN_MILLISECONDS; m_bIsEnraged = false; // ToDo: Enable this when the core will properly support the damage split! We can't deal 70-80k damage only to one player. - //DoCastSpellIfCan(m_creature, SPELL_SABER_LASH_PROC); + // DoCastSpellIfCan(m_creature, SPELL_SABER_LASH_PROC); } void Aggro(Unit* pWho) diff --git a/scripts/outland/black_temple/boss_reliquary_of_souls.cpp b/scripts/outland/black_temple/boss_reliquary_of_souls.cpp index 74d9125ae..9dc9daed2 100644 --- a/scripts/outland/black_temple/boss_reliquary_of_souls.cpp +++ b/scripts/outland/black_temple/boss_reliquary_of_souls.cpp @@ -156,7 +156,7 @@ struct MANGOS_DLL_DECL boss_reliquary_of_soulsAI : public Scripted_NoMovementAI void MoveInLineOfSight(Unit* pWho) { if (m_uiPhase == PHASE_0_NOT_BEGUN && pWho->GetTypeId() == TYPEID_PLAYER && !((Player*)pWho)->isGameMaster() && - m_creature->IsWithinDistInMap(pWho, m_creature->GetAttackDistance(pWho)) && m_creature->IsWithinLOSInMap(pWho)) + m_creature->IsWithinDistInMap(pWho, m_creature->GetAttackDistance(pWho)) && m_creature->IsWithinLOSInMap(pWho)) { // Start phase 1 m_uiPhase = PHASE_1_SUFFERING; @@ -467,7 +467,7 @@ struct MANGOS_DLL_DECL boss_essence_of_desireAI : public essence_base_AI void KilledUnit(Unit* pVictim) { - switch(urand(0, 2)) + switch (urand(0, 2)) { case 0: DoScriptText(DESI_SAY_SLAY1, m_creature); break; case 1: DoScriptText(DESI_SAY_SLAY2, m_creature); break; diff --git a/scripts/outland/black_temple/boss_shade_of_akama.cpp b/scripts/outland/black_temple/boss_shade_of_akama.cpp index 36bb1a9be..992c1546c 100644 --- a/scripts/outland/black_temple/boss_shade_of_akama.cpp +++ b/scripts/outland/black_temple/boss_shade_of_akama.cpp @@ -49,7 +49,7 @@ enum // Other spells SPELL_SUMMON_DEFENDER = 40474, SPELL_SUMMON_SORCERER = 40476, - //SPELL_VERTEX_SHADE_BLACK = 39833, // used by the shade - in c_t_a + // SPELL_VERTEX_SHADE_BLACK = 39833, // used by the shade - in c_t_a SPELL_SHADE_SOUL_CHANNEL = 40401, // channel spell, used to banish the shade SPELL_SUMMON_SHADE_TRIGGER = 40955, @@ -61,7 +61,7 @@ enum NPC_ASH_SPIRITBIND = 23524, NPC_ASH_BROKEN = 23319, - //akama's phases + // akama's phases PHASE_CHANNEL = 1, PHASE_COMBAT = 2, PHASE_EPILOGUE = 3, @@ -69,7 +69,7 @@ enum MAX_CHANNELERS = 6, }; -static const uint32 auiRandSpawnEntry[]= +static const uint32 auiRandSpawnEntry[] = { NPC_ASH_ELEMENTAL, NPC_ASH_ROGUE, @@ -93,13 +93,13 @@ struct Location float m_fX, m_fY, m_fZ; }; -static const Location afAkamaWP[]= +static const Location afAkamaWP[] = { {516.885193f, 400.836060f, 112.784f}, {469.597443f, 402.264404f, 118.537f} }; -static const Location afBrokenSpawnLoc[]= +static const Location afBrokenSpawnLoc[] = { {541.375916f, 401.439575f, 112.784f}, // The place where Akama channels {534.130005f, 352.394531f, 112.784f}, // Behind a 'pillar' which is behind the east alcove @@ -191,7 +191,7 @@ struct MANGOS_DLL_DECL npc_akamaAI : public ScriptedAI, private DialogueHelper m_creature->GetMotionMaster()->MovePoint(PHASE_EPILOGUE, afAkamaWP[1].m_fX, afAkamaWP[1].m_fY, afAkamaWP[1].m_fZ); break; case NPC_ASH_SORCERER: - // Decrease the sorcerer counter + // Decrease the sorcerer counter m_lSorcerersGUIDList.remove(pVictim->GetObjectGuid()); break; case NPC_ASH_CHANNELER: @@ -229,10 +229,10 @@ struct MANGOS_DLL_DECL npc_akamaAI : public ScriptedAI, private DialogueHelper } } - void CorpseRemoved(uint32 &uiRespawnDelay) + void CorpseRemoved(uint32& uiRespawnDelay) { // Resapwn after 5 min - uiRespawnDelay = 5*MINUTE; + uiRespawnDelay = 5 * MINUTE; } void JustSummoned(Creature* pSummoned) @@ -391,10 +391,10 @@ struct MANGOS_DLL_DECL npc_akamaAI : public ScriptedAI, private DialogueHelper for (uint8 j = 0; j < 4; ++j) { fX = afBrokenSpawnLoc[i].m_fX; - fY = afBrokenSpawnLoc[i].m_fY + (j*7); + fY = afBrokenSpawnLoc[i].m_fY + (j * 7); fZ = afBrokenSpawnLoc[i].m_fZ; - m_creature->SummonCreature(NPC_ASH_BROKEN, fX, fY, fZ, 0, TEMPSUMMON_TIMED_DESPAWN, 10*MINUTE*IN_MILLISECONDS); + m_creature->SummonCreature(NPC_ASH_BROKEN, fX, fY, fZ, 0, TEMPSUMMON_TIMED_DESPAWN, 10 * MINUTE * IN_MILLISECONDS); } } @@ -409,7 +409,7 @@ struct MANGOS_DLL_DECL npc_akamaAI : public ScriptedAI, private DialogueHelper for (uint8 j = 0; j < 4; ++j) { pGenerator->GetRandomPoint(pGenerator->GetPositionX(), pGenerator->GetPositionY(), pGenerator->GetPositionZ(), 10.0f, fX, fY, fZ); - m_creature->SummonCreature(NPC_ASH_BROKEN, fX, fY, fZ, 0, TEMPSUMMON_TIMED_DESPAWN, 10*MINUTE*IN_MILLISECONDS); + m_creature->SummonCreature(NPC_ASH_BROKEN, fX, fY, fZ, 0, TEMPSUMMON_TIMED_DESPAWN, 10 * MINUTE * IN_MILLISECONDS); } } } @@ -500,7 +500,7 @@ bool GossipHello_npc_akama(Player* pPlayer, Creature* pCreature) bool GossipSelect_npc_akama(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) { - if (uiAction == GOSSIP_ACTION_INFO_DEF + 1) //Fight time + if (uiAction == GOSSIP_ACTION_INFO_DEF + 1) // Fight time { pPlayer->CLOSE_GOSSIP_MENU(); diff --git a/scripts/outland/black_temple/boss_supremus.cpp b/scripts/outland/black_temple/boss_supremus.cpp index a4308b168..2db2cad14 100644 --- a/scripts/outland/black_temple/boss_supremus.cpp +++ b/scripts/outland/black_temple/boss_supremus.cpp @@ -111,7 +111,7 @@ struct MANGOS_DLL_DECL boss_supremusAI : public ScriptedAI m_uiSummonFlameTimer = 20000; m_uiPhaseSwitchTimer = 60000; m_uiMoltenPunchTimer = 8000; - m_uiBerserkTimer = 15*MINUTE*IN_MILLISECONDS; + m_uiBerserkTimer = 15 * MINUTE * IN_MILLISECONDS; m_lastGazeTargetGuid.Clear(); @@ -232,7 +232,7 @@ struct MANGOS_DLL_DECL boss_supremusAI : public ScriptedAI DoCastSpellIfCan(m_creature, SPELL_SLOW_SELF, CAST_INTERRUPT_PREVIOUS); } - m_uiPhaseSwitchTimer = MINUTE*IN_MILLISECONDS; + m_uiPhaseSwitchTimer = MINUTE * IN_MILLISECONDS; DoResetThreat(); } else diff --git a/scripts/outland/black_temple/boss_teron_gorefiend.cpp b/scripts/outland/black_temple/boss_teron_gorefiend.cpp index 3ef0a6dbc..55aeb1924 100644 --- a/scripts/outland/black_temple/boss_teron_gorefiend.cpp +++ b/scripts/outland/black_temple/boss_teron_gorefiend.cpp @@ -53,12 +53,12 @@ enum SPELL_DESTROY_ALL_SPIRITS = 44659, // purpose unk // Spells - other - //SPELL_ATROPHY = 40327, // Shadowy Constructs use this when they get within melee range of a player + // SPELL_ATROPHY = 40327, // Shadowy Constructs use this when they get within melee range of a player SPELL_SHADOWY_CONSTRUCT = 40326, - //NPC_DOOM_BLOSSOM = 23123, // scripted in eventAI + // NPC_DOOM_BLOSSOM = 23123, // scripted in eventAI NPC_SHADOWY_CONSTRUCT = 23111, // scripted in eventAI - //NPC_VENGEFUL_SPIRIT = 23109, // npc controlled by the dead player + // NPC_VENGEFUL_SPIRIT = 23109, // npc controlled by the dead player }; struct MANGOS_DLL_DECL boss_teron_gorefiendAI : public ScriptedAI @@ -86,7 +86,7 @@ struct MANGOS_DLL_DECL boss_teron_gorefiendAI : public ScriptedAI m_uiSummonDoomBlossomTimer = urand(5000, 10000); m_uiShadowOfDeathTimer = 10000; m_uiCrushingShadowsTimer = 22000; - m_uiBerserkTimer = 10*MINUTE*IN_MILLISECONDS; + m_uiBerserkTimer = 10 * MINUTE * IN_MILLISECONDS; } void JustReachedHome() diff --git a/scripts/outland/black_temple/boss_warlord_najentus.cpp b/scripts/outland/black_temple/boss_warlord_najentus.cpp index 7095625bc..d915994ad 100644 --- a/scripts/outland/black_temple/boss_warlord_najentus.cpp +++ b/scripts/outland/black_temple/boss_warlord_najentus.cpp @@ -33,7 +33,7 @@ enum SAY_SLAY2 = -1564004, SAY_SPECIAL1 = -1564005, SAY_SPECIAL2 = -1564006, - SAY_ENRAGE1 = -1564007, //is this text actually in use? + SAY_ENRAGE1 = -1564007, // is this text actually in use? SAY_ENRAGE2 = -1564008, SAY_DEATH = -1564009, @@ -70,7 +70,7 @@ struct MANGOS_DLL_DECL boss_najentusAI : public ScriptedAI m_bIsShielded = false; m_uiNeedleSpineTimer = 10000; - m_uiEnrageTimer = MINUTE*8*IN_MILLISECONDS; + m_uiEnrageTimer = MINUTE * 8 * IN_MILLISECONDS; m_uiSpecialYellTimer = urand(45000, 120000); m_uiTidalShieldTimer = 60000; m_uiImpalingSpineTimer = 20000; @@ -129,17 +129,17 @@ struct MANGOS_DLL_DECL boss_najentusAI : public ScriptedAI // If shield expired after 45s, attack again if (m_bIsShielded && m_uiTidalShieldTimer < 16000 && !m_creature->HasAura(SPELL_TIDAL_SHIELD)) { - m_bIsShielded = false; + m_bIsShielded = false; - SetCombatMovement(true); - m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); + SetCombatMovement(true); + m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); } if (m_uiEnrageTimer < uiDiff) { if (DoCastSpellIfCan(m_creature, SPELL_BERSERK, CAST_INTERRUPT_PREVIOUS) == CAST_OK) { - m_uiEnrageTimer = MINUTE*8*IN_MILLISECONDS; + m_uiEnrageTimer = MINUTE * 8 * IN_MILLISECONDS; DoScriptText(SAY_ENRAGE2, m_creature); } } diff --git a/scripts/outland/black_temple/illidari_council.cpp b/scripts/outland/black_temple/illidari_council.cpp index 4abe44e77..47adaf2a7 100644 --- a/scripts/outland/black_temple/illidari_council.cpp +++ b/scripts/outland/black_temple/illidari_council.cpp @@ -26,7 +26,7 @@ EndScriptData */ enum { - //Speech'n'Sounds + // Speech'n'Sounds SAY_GATH_AGGRO = -1564069, SAY_GATH_SLAY = -1564085, SAY_GATH_SLAY_COMNT = -1564089, @@ -90,7 +90,7 @@ enum SPELL_VANISH = 41476, SPELL_BERSERK = 45078, - //SPELL_BALANCE_OF_POWER = 41341, // procs 41342 on damage - added in c_t_a + // SPELL_BALANCE_OF_POWER = 41341, // procs 41342 on damage - added in c_t_a SPELL_EMPYREAL_EQUIVALENCY = 41333, SPELL_EMPYREAL_BALANCE = 41499, }; @@ -139,7 +139,7 @@ struct MANGOS_DLL_DECL mob_blood_elf_council_voice_triggerAI : public ScriptedAI void StartVoiceEvent() { m_uiAggroYellTimer = 500; - m_uiEnrageTimer = 15*MINUTE*IN_MILLISECONDS; + m_uiEnrageTimer = 15 * MINUTE * IN_MILLISECONDS; } void UpdateAI(const uint32 uiDiff) @@ -322,7 +322,7 @@ struct MANGOS_DLL_DECL boss_illidari_councilAI : public ScriptedAI } // ##### Workaround for missing spell aura proc 41342 - Remove when this is implemented in core ##### - void DamageTaken(Unit* pDoneBy, uint32 &uiDamage) + void DamageTaken(Unit* pDoneBy, uint32& uiDamage) { if (pDoneBy == m_creature) return; @@ -505,7 +505,7 @@ struct MANGOS_DLL_DECL boss_high_nethermancer_zerevorAI : public boss_illidari_c if (m_uiDampenMagicTimer < uiDiff) { if (DoCastSpellIfCan(m_creature, SPELL_DAMPEN_MAGIC) == CAST_OK) - m_uiDampenMagicTimer = 110000; // Almost 2 minutes + m_uiDampenMagicTimer = 110000; // Almost 2 minutes } else m_uiDampenMagicTimer -= uiDiff; diff --git a/scripts/outland/black_temple/instance_black_temple.cpp b/scripts/outland/black_temple/instance_black_temple.cpp index 966ea2f43..25e3fdadc 100644 --- a/scripts/outland/black_temple/instance_black_temple.cpp +++ b/scripts/outland/black_temple/instance_black_temple.cpp @@ -64,7 +64,7 @@ bool instance_black_temple::IsEncounterInProgress() const void instance_black_temple::OnCreatureCreate(Creature* pCreature) { - switch(pCreature->GetEntry()) + switch (pCreature->GetEntry()) { case NPC_SPIRIT_OF_OLUM: case NPC_SPIRIT_OF_UDALO: @@ -100,7 +100,7 @@ void instance_black_temple::OnCreatureCreate(Creature* pCreature) void instance_black_temple::OnObjectCreate(GameObject* pGo) { - switch(pGo->GetEntry()) + switch (pGo->GetEntry()) { case GO_NAJENTUS_GATE: // Gate past Naj'entus (at the entrance to Supermoose's courtyards) if (m_auiEncounter[TYPE_NAJENTUS] == DONE) @@ -140,7 +140,7 @@ void instance_black_temple::OnObjectCreate(GameObject* pGo) void instance_black_temple::SetData(uint32 uiType, uint32 uiData) { - switch(uiType) + switch (uiType) { case TYPE_NAJENTUS: m_auiEncounter[uiType] = uiData; @@ -228,8 +228,8 @@ void instance_black_temple::SetData(uint32 uiType, uint32 uiData) std::ostringstream saveStream; saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2] << " " - << m_auiEncounter[3] << " " << m_auiEncounter[4] << " " << m_auiEncounter[5] << " " - << m_auiEncounter[6] << " " << m_auiEncounter[7] << " " << m_auiEncounter[8]; + << m_auiEncounter[3] << " " << m_auiEncounter[4] << " " << m_auiEncounter[5] << " " + << m_auiEncounter[6] << " " << m_auiEncounter[7] << " " << m_auiEncounter[8]; m_strInstData = saveStream.str(); @@ -278,7 +278,7 @@ void instance_black_temple::Load(const char* chrIn) std::istringstream loadStream(chrIn); loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3] - >> m_auiEncounter[4] >> m_auiEncounter[5] >> m_auiEncounter[6] >> m_auiEncounter[7] >> m_auiEncounter[8]; + >> m_auiEncounter[4] >> m_auiEncounter[5] >> m_auiEncounter[6] >> m_auiEncounter[7] >> m_auiEncounter[8]; for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) { diff --git a/scripts/outland/blades_edge_mountains.cpp b/scripts/outland/blades_edge_mountains.cpp index 44e8e920a..def7da666 100644 --- a/scripts/outland/blades_edge_mountains.cpp +++ b/scripts/outland/blades_edge_mountains.cpp @@ -33,7 +33,7 @@ EndContentData */ ## mobs_bladespire_ogre ######*/ -//TODO: add support for quest 10512 + creature abilities +// TODO: add support for quest 10512 + creature abilities struct MANGOS_DLL_DECL mobs_bladespire_ogreAI : public ScriptedAI { mobs_bladespire_ogreAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} @@ -113,7 +113,7 @@ struct MANGOS_DLL_DECL mobs_nether_drakeAI : public ScriptedAI ScriptedAI::MoveInLineOfSight(pWho); } - //in case creature was not summoned (not expected) + // in case creature was not summoned (not expected) void MovementInform(uint32 uiMoveType, uint32 uiPointId) { if (uiMoveType != POINT_MOTION_TYPE) @@ -179,7 +179,7 @@ struct MANGOS_DLL_DECL mobs_nether_drakeAI : public ScriptedAI break; case 4: m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - //take off to location above + // take off to location above m_creature->SetLevitate(true); m_creature->SetByteFlag(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_UNK_2); m_creature->GetMotionMaster()->MovePoint(1, m_creature->GetPositionX() + 50.0f, m_creature->GetPositionY(), m_creature->GetPositionZ() + 50.0f); @@ -191,7 +191,7 @@ struct MANGOS_DLL_DECL mobs_nether_drakeAI : public ScriptedAI else m_uiNihilSpeechTimer -= uiDiff; - //anything below here is not interesting for Nihil, so skip it + // anything below here is not interesting for Nihil, so skip it return; } @@ -259,7 +259,7 @@ struct MANGOS_DLL_DECL npc_daranelleAI : public ScriptedAI { DoScriptText(SAY_SPELL_INFLUENCE, m_creature, pWho); - //TODO: Move the below to updateAI and run if this statement == true + // TODO: Move the below to updateAI and run if this statement == true ((Player*)pWho)->KilledMonsterCredit(NPC_KALIRI_AURA_DISPEL, m_creature->GetObjectGuid()); pWho->RemoveAurasDueToSpell(SPELL_LASHHAN_CHANNEL); } diff --git a/scripts/outland/boss_doomlord_kazzak.cpp b/scripts/outland/boss_doomlord_kazzak.cpp index 4054ef2aa..d14c2f517 100644 --- a/scripts/outland/boss_doomlord_kazzak.cpp +++ b/scripts/outland/boss_doomlord_kazzak.cpp @@ -70,8 +70,8 @@ struct MANGOS_DLL_DECL boss_doomlordkazzakAI : public ScriptedAI m_uiVoidBoltTimer = 30000; m_uiMarkOfKazzakTimer = 25000; m_uiEnrageTimer = 60000; - m_uiGreatEnrageTimer = 3*MINUTE*IN_MILLISECONDS; - m_uiTwistedReflectionTimer = 33000; // Timer may be incorrect + m_uiGreatEnrageTimer = 3 * MINUTE * IN_MILLISECONDS; + m_uiTwistedReflectionTimer = 33000; // Timer may be incorrect } void JustRespawned() @@ -91,7 +91,7 @@ struct MANGOS_DLL_DECL boss_doomlordkazzakAI : public ScriptedAI if (pVictim->GetTypeId() != TYPEID_PLAYER) return; - switch(urand(0, 2)) + switch (urand(0, 2)) { case 0: DoScriptText(SAY_KILL1, m_creature); break; case 1: DoScriptText(SAY_KILL2, m_creature); break; diff --git a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_fathomlord_karathress.cpp b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_fathomlord_karathress.cpp index 8528ef361..215e7c8fe 100644 --- a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_fathomlord_karathress.cpp +++ b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_fathomlord_karathress.cpp @@ -36,13 +36,13 @@ enum SAY_SLAY3 = -1548028, SAY_DEATH = -1548029, - //Karathress spells + // Karathress spells SPELL_CATACLYSMIC_BOLT = 38441, SPELL_ENRAGE = 24318, // ToDo: spell needs to be confirmed SPELL_SEAR_NOVA = 38445, SPELL_BLESSING_OF_THE_TIDES = 38449, // cast by each of the advisors when the boss reaches 75% hp - //Sharkkis spells + // Sharkkis spells SPELL_LEECHING_THROW = 29436, SPELL_THE_BEAST_WITHIN = 38373, SPELL_HURL_TRIDENT = 38374, @@ -51,7 +51,7 @@ enum SPELL_SUMMON_FATHOM_SPOREBAT = 38431, SPELL_POWER_OF_SHARKKIS = 38455, // cast on Karathress, on death - //Tidalvess spells + // Tidalvess spells SPELL_FROST_SHOCK = 38234, SPELL_SPITFIRE_TOTEM = 38236, SPELL_POISON_CLEANSING_TOTEM = 38306, @@ -59,7 +59,7 @@ enum SPELL_WINDFURY_WEAPON = 32911, // triggers spell 32912 (Windfury) SPELL_POWER_OF_TIDALVESS = 38452, // cast on Karathress, on death - //Caribdis Spells + // Caribdis Spells SPELL_WATER_BOLT_VOLLEY = 38335, SPELL_TIDAL_SURGE = 38358, // triggers 38353 which then triggers 38357 SPELL_HEALING_WAVE = 38330, @@ -103,7 +103,7 @@ struct MANGOS_DLL_DECL boss_fathomlord_karathressAI : public ScriptedAI { m_uiCataclysmicBoltTimer = 10000; m_uiSearingNovaTimer = urand(20000, 30000); - m_uiEnrageTimer = 10*MINUTE*IN_MILLISECONDS; + m_uiEnrageTimer = 10 * MINUTE * IN_MILLISECONDS; m_bBlessingOfTides = false; } @@ -133,7 +133,7 @@ struct MANGOS_DLL_DECL boss_fathomlord_karathressAI : public ScriptedAI void KilledUnit(Unit* pVictim) { - switch(urand(0, 2)) + switch (urand(0, 2)) { case 0: DoScriptText(SAY_SLAY1, m_creature); break; case 1: DoScriptText(SAY_SLAY2, m_creature); break; @@ -148,8 +148,8 @@ struct MANGOS_DLL_DECL boss_fathomlord_karathressAI : public ScriptedAI if (m_pInstance) m_pInstance->SetData(TYPE_KARATHRESS_EVENT, DONE); - //support for quest 10944 - m_creature->SummonCreature(NPC_SEER_OLUM, afCoordsOlum[0], afCoordsOlum[1], afCoordsOlum[2], afCoordsOlum[3], TEMPSUMMON_TIMED_DESPAWN, 1*HOUR*IN_MILLISECONDS); + // support for quest 10944 + m_creature->SummonCreature(NPC_SEER_OLUM, afCoordsOlum[0], afCoordsOlum[1], afCoordsOlum[2], afCoordsOlum[3], TEMPSUMMON_TIMED_DESPAWN, 1 * HOUR * IN_MILLISECONDS); } void JustReachedHome() @@ -165,10 +165,10 @@ struct MANGOS_DLL_DECL boss_fathomlord_karathressAI : public ScriptedAI if (m_uiCataclysmicBoltTimer < uiDiff) { - //select a random unit other than the main tank + // select a random unit other than the main tank Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1); - //if there aren't other units, cast on the tank + // if there aren't other units, cast on the tank if (!pTarget) pTarget = m_creature->getVictim(); @@ -187,7 +187,7 @@ struct MANGOS_DLL_DECL boss_fathomlord_karathressAI : public ScriptedAI { if (Creature* pAdvisor = m_pInstance->GetSingleCreatureFromStorage(aAdvisors[i])) { - //stack max three times (one for each alive) + // stack max three times (one for each alive) if (pAdvisor->isAlive()) { pAdvisor->InterruptNonMeleeSpells(false); @@ -196,7 +196,7 @@ struct MANGOS_DLL_DECL boss_fathomlord_karathressAI : public ScriptedAI } } - //yell if we now have the aura + // yell if we now have the aura if (m_creature->HasAura(SPELL_BLESSING_OF_THE_TIDES)) DoScriptText(SAY_GAIN_BLESSING, m_creature); diff --git a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_hydross_the_unstable.cpp b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_hydross_the_unstable.cpp index 75ba3bd9e..fdd82ae5b 100644 --- a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_hydross_the_unstable.cpp +++ b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_hydross_the_unstable.cpp @@ -42,7 +42,7 @@ enum SPELL_ENRAGE = 27680, // ToDo: this spell need verification SPELL_BLUE_BEAM = 38015, SPELL_SUMMON_WATER_ELEMENT = 36459, // spawn elemental on OOC timer - //SPELL_ELEMENTAL_SPAWNIN = 25035, // already handled in eventAI + // SPELL_ELEMENTAL_SPAWNIN = 25035, // already handled in eventAI SPELL_PURIFY_ELEMENTAL = 36461, // purify elemental on OOC timer NPC_PURE_SPAWN = 22035, @@ -61,8 +61,8 @@ enum static const uint32 aMarkHydross[MAX_HYDROSS_MARKS] = {38215, 38216, 38217, 38218, 38231, 40584}; static const uint32 aMarkCorruption[MAX_HYDROSS_MARKS] = {38219, 38220, 38221, 38222, 38230, 40583}; -static const float aElementalCleanPoint[3] = {-231.48f, -343.05f, -1.58f}; -static const float aElementalExitPoint[3] = {-177.41f, -395.72f, -1.60f}; +static const float aElementalCleanPoint[3] = { -231.48f, -343.05f, -1.58f}; +static const float aElementalExitPoint[3] = { -177.41f, -395.72f, -1.60f}; struct MANGOS_DLL_DECL boss_hydross_the_unstableAI : public ScriptedAI { @@ -93,7 +93,7 @@ struct MANGOS_DLL_DECL boss_hydross_the_unstableAI : public ScriptedAI m_uiWaterTombTimer = 7000; m_uiVileSludgeTimer = 7000; m_uiMarkCount = 0; - m_uiEnrageTimer = 10*MINUTE*IN_MILLISECONDS; + m_uiEnrageTimer = 10 * MINUTE * IN_MILLISECONDS; m_bCorruptedForm = false; @@ -113,9 +113,9 @@ struct MANGOS_DLL_DECL boss_hydross_the_unstableAI : public ScriptedAI void KilledUnit(Unit* pVictim) { if (m_bCorruptedForm) - DoScriptText(urand(0,1) ? SAY_CORRUPT_SLAY1 : SAY_CORRUPT_SLAY2, m_creature); + DoScriptText(urand(0, 1) ? SAY_CORRUPT_SLAY1 : SAY_CORRUPT_SLAY2, m_creature); else - DoScriptText(urand(0,1) ? SAY_CLEAN_SLAY1 : SAY_CLEAN_SLAY2, m_creature); + DoScriptText(urand(0, 1) ? SAY_CLEAN_SLAY1 : SAY_CLEAN_SLAY2, m_creature); } void JustDied(Unit* pKiller) @@ -180,9 +180,9 @@ struct MANGOS_DLL_DECL boss_hydross_the_unstableAI : public ScriptedAI void DoSpawnAdds() { float fX, fY, fZ; - for(uint8 i = 0; i < MAX_HYDROSS_ADDS; ++i) + for (uint8 i = 0; i < MAX_HYDROSS_ADDS; ++i) { - m_creature->GetNearPoint(m_creature, fX, fY, fZ, 0, 10, M_PI_F/2*i); + m_creature->GetNearPoint(m_creature, fX, fY, fZ, 0, 10, M_PI_F / 2 * i); m_creature->SummonCreature(m_bCorruptedForm ? NPC_PURE_SPAWN : NPC_TAINTED_SPAWN, fX, fY, fZ, 0, TEMPSUMMON_DEAD_DESPAWN, 0); } } @@ -276,7 +276,7 @@ struct MANGOS_DLL_DECL boss_hydross_the_unstableAI : public ScriptedAI m_uiPosCheckTimer = 2000; } else - m_uiPosCheckTimer -=uiDiff; + m_uiPosCheckTimer -= uiDiff; } // clean form else @@ -321,7 +321,7 @@ struct MANGOS_DLL_DECL boss_hydross_the_unstableAI : public ScriptedAI m_uiPosCheckTimer = 2000; } else - m_uiPosCheckTimer -=uiDiff; + m_uiPosCheckTimer -= uiDiff; } // Apply mark debuff diff --git a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_lady_vashj.cpp b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_lady_vashj.cpp index dcd973d35..70ec7e019 100644 --- a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_lady_vashj.cpp +++ b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_lady_vashj.cpp @@ -87,8 +87,8 @@ static const float afElementPos[8][4] = {96.0f , -986.4f , 21.4f, 2.5f}, {54.4f , -1010.6f, 22.0f, 1.8f}, {9.8f , -1012.0f, 21.7f, 1.4f}, - {-35.0f, -987.6f , 21.5f, 0.8f}, - {-58.9f, -901.6f , 21.5f, 6.0f} + { -35.0f, -987.6f , 21.5f, 0.8f}, + { -58.9f, -901.6f , 21.5f, 6.0f} }; const float afCoilfangElitePos[3][4] = @@ -102,7 +102,7 @@ const float afCoilfangStriderPos[3][4] = { {66.427f, -948.778f, 41.262245f, 2.584f}, {7.513f , -959.538f, 41.300422f, 1.0346f}, - {-12.843f, -907.798f, 41.239620f, 6.087f} + { -12.843f, -907.798f, 41.239620f, 6.087f} }; struct MANGOS_DLL_DECL boss_lady_vashjAI : public ScriptedAI @@ -157,7 +157,7 @@ struct MANGOS_DLL_DECL boss_lady_vashjAI : public ScriptedAI void Aggro(Unit* pWho) { - switch(urand(0, 3)) + switch (urand(0, 3)) { case 0: DoScriptText(SAY_AGGRO1, m_creature); break; case 1: DoScriptText(SAY_AGGRO2, m_creature); break; @@ -228,7 +228,7 @@ struct MANGOS_DLL_DECL boss_lady_vashjAI : public ScriptedAI void KilledUnit(Unit* pVictim) { - switch(urand(0, 2)) + switch (urand(0, 2)) { case 0: DoScriptText(SAY_SLAY1, m_creature); break; case 1: DoScriptText(SAY_SLAY2, m_creature); break; @@ -253,10 +253,10 @@ struct MANGOS_DLL_DECL boss_lady_vashjAI : public ScriptedAI bool CanCastShootOrMultishot() { // It's not very clear how this should work - requires additional research! - if (DoCastSpellIfCan(m_creature->getVictim(), urand(0,1) ? SPELL_SHOOT : SPELL_MULTI_SHOT) == CAST_OK) + if (DoCastSpellIfCan(m_creature->getVictim(), urand(0, 1) ? SPELL_SHOOT : SPELL_MULTI_SHOT) == CAST_OK) { if (urand(0, 2)) - DoScriptText(urand(0,1) ? SAY_BOWSHOT1 : SAY_BOWSHOT2, m_creature); + DoScriptText(urand(0, 1) ? SAY_BOWSHOT1 : SAY_BOWSHOT2, m_creature); return true; } @@ -304,7 +304,7 @@ struct MANGOS_DLL_DECL boss_lady_vashjAI : public ScriptedAI if (m_uiStaticChargeTimer < uiDiff) { - if (Unit *pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0, SPELL_STATIC_CHARGE, SELECT_FLAG_IN_MELEE_RANGE)) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0, SPELL_STATIC_CHARGE, SELECT_FLAG_IN_MELEE_RANGE)) { if (DoCastSpellIfCan(pTarget, SPELL_STATIC_CHARGE) == CAST_OK) m_uiStaticChargeTimer = urand(10000, 30000); @@ -339,7 +339,7 @@ struct MANGOS_DLL_DECL boss_lady_vashjAI : public ScriptedAI // Phase 1 abilities if (m_uiPhase == PHASE_1) { - //m_uiPhase 2 begins when Vashj hits 70%. She will run to the middle of her platform and surround herself in a shield making her invulerable. + // m_uiPhase 2 begins when Vashj hits 70%. She will run to the middle of her platform and surround herself in a shield making her invulerable. if (m_creature->GetHealthPercent() <= 70.0f) { DoScriptText(SAY_PHASE2, m_creature); diff --git a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_leotheras_the_blind.cpp b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_leotheras_the_blind.cpp index f53ef5de4..dd64ab42f 100644 --- a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_leotheras_the_blind.cpp +++ b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_leotheras_the_blind.cpp @@ -48,15 +48,15 @@ enum SPELL_METAMORPHOSIS = 37673, // demon transform spell // Inner demons already scripted in eventAI - //SPELL_DEMON_ALIGNMENT = 37713, - //SPELL_SHADOW_BOLT = 39309, - //SPELL_DEMON_LINK = 37716, + // SPELL_DEMON_ALIGNMENT = 37713, + // SPELL_SHADOW_BOLT = 39309, + // SPELL_DEMON_LINK = 37716, - //FACTION_DEMON_1 = 1829, - //FACTION_DEMON_2 = 1830, - //FACTION_DEMON_3 = 1831, - //FACTION_DEMON_4 = 1832, - //FACTION_DEMON_5 = 1833, + // FACTION_DEMON_1 = 1829, + // FACTION_DEMON_2 = 1830, + // FACTION_DEMON_3 = 1831, + // FACTION_DEMON_4 = 1832, + // FACTION_DEMON_5 = 1833, NPC_INNER_DEMON = 21857, NPC_SHADOW_LEO = 21875 @@ -91,7 +91,7 @@ struct MANGOS_DLL_DECL boss_leotheras_the_blindAI : public ScriptedAI m_uiSwitchTimer = 60000; m_uiChaosBlastTimer = 0; m_uiFinalFormTimer = 0; - m_uiEnrageTimer = 10*MINUTE*IN_MILLISECONDS; + m_uiEnrageTimer = 10 * MINUTE * IN_MILLISECONDS; m_bDemonForm = false; m_bIsFinalForm = false; @@ -131,7 +131,7 @@ struct MANGOS_DLL_DECL boss_leotheras_the_blindAI : public ScriptedAI if (pVictim->GetTypeId() != TYPEID_PLAYER) return; - switch(urand(0, 2)) + switch (urand(0, 2)) { case 0: DoScriptText(m_bDemonForm ? SAY_DEMON_SLAY1 : SAY_NIGHTELF_SLAY1, m_creature); break; case 1: DoScriptText(m_bDemonForm ? SAY_DEMON_SLAY2 : SAY_NIGHTELF_SLAY2, m_creature); break; @@ -176,7 +176,7 @@ struct MANGOS_DLL_DECL boss_leotheras_the_blindAI : public ScriptedAI m_uiBanishTimer -= uiDiff; } - //Return since we have no target + // Return since we have no target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -264,7 +264,7 @@ struct MANGOS_DLL_DECL boss_leotheras_the_blindAI : public ScriptedAI if (m_creature->IsNonMeleeSpellCasted(false)) m_creature->InterruptNonMeleeSpells(false); - //switch to nightelf form + // switch to nightelf form m_creature->RemoveAurasDueToSpell(SPELL_METAMORPHOSIS); SetCombatMovement(true); @@ -292,7 +292,7 @@ struct MANGOS_DLL_DECL boss_leotheras_the_blindAI : public ScriptedAI if (m_creature->IsNonMeleeSpellCasted(false)) m_creature->InterruptNonMeleeSpells(false); - //switch to nightelf form + // switch to nightelf form m_creature->RemoveAurasDueToSpell(SPELL_METAMORPHOSIS); DoResetThreat(); diff --git a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_morogrim_tidewalker.cpp b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_morogrim_tidewalker.cpp index 66e9e9f50..a93680af4 100644 --- a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_morogrim_tidewalker.cpp +++ b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_morogrim_tidewalker.cpp @@ -43,7 +43,7 @@ enum SPELL_TIDAL_WAVE = 37730, SPELL_EARTHQUAKE = 37764, SPELL_WATERY_GRAVE = 38028, - //SPELL_WATERY_GRAVE_EXPLOSION = 38049, // spell purpose unk + // SPELL_WATERY_GRAVE_EXPLOSION = 38049, // spell purpose unk SPELL_SUMMON_MURLOC_A6 = 39813, SPELL_SUMMON_MURLOC_A7 = 39814, @@ -62,7 +62,7 @@ enum SPELL_SUMMON_GLOBULE_3 = 37860, SPELL_SUMMON_GLOBULE_4 = 37861, - SPELL_WATER_GLOBULE_NEW_TARGET = 39848, // spell requires additional research and probably core or script support + SPELL_WATER_GLOBULE_NEW_TARGET = 39848, // spell requires additional research and probably core or script support NPC_WATER_GLOBULE = 21913, NPC_TIDEWALKER_LURKER = 21920 @@ -111,7 +111,7 @@ struct MANGOS_DLL_DECL boss_morogrim_tidewalkerAI : public ScriptedAI void KilledUnit(Unit* pVictim) { - switch(urand(0, 2)) + switch (urand(0, 2)) { case 0: DoScriptText(SAY_SLAY1, m_creature); break; case 1: DoScriptText(SAY_SLAY2, m_creature); break; @@ -225,9 +225,9 @@ struct MANGOS_DLL_DECL boss_morogrim_tidewalkerAI : public ScriptedAI DoScriptText(EMOTE_WATERY_GLOBULES, m_creature); DoScriptText(urand(0, 1) ? SAY_SUMMON_BUBL1 : SAY_SUMMON_BUBL2, m_creature); - DoCastSpellIfCan(m_creature,SPELL_SUMMON_GLOBULE_2, CAST_TRIGGERED); - DoCastSpellIfCan(m_creature,SPELL_SUMMON_GLOBULE_3, CAST_TRIGGERED); - DoCastSpellIfCan(m_creature,SPELL_SUMMON_GLOBULE_4, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_SUMMON_GLOBULE_2, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_SUMMON_GLOBULE_3, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_SUMMON_GLOBULE_4, CAST_TRIGGERED); m_uiWateryGlobulesTimer = 25000; } @@ -270,12 +270,12 @@ struct MANGOS_DLL_DECL mob_water_globuleAI : public ScriptedAI CreatureAI* GetAI_boss_morogrim_tidewalker(Creature* pCreature) { - return new boss_morogrim_tidewalkerAI (pCreature); + return new boss_morogrim_tidewalkerAI(pCreature); } CreatureAI* GetAI_mob_water_globule(Creature* pCreature) { - return new mob_water_globuleAI (pCreature); + return new mob_water_globuleAI(pCreature); } void AddSC_boss_morogrim_tidewalker() diff --git a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_the_lurker_below.cpp b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_the_lurker_below.cpp index 9ebe8bef4..cbadfa339 100644 --- a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_the_lurker_below.cpp +++ b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_the_lurker_below.cpp @@ -58,7 +58,7 @@ struct AddsLocations }; // Coords are guesswork -static const AddsLocations aLurkerLoc[MAX_SUBMERGE_ADDS]= +static const AddsLocations aLurkerLoc[MAX_SUBMERGE_ADDS] = { {NPC_COILFANG_AMBUSHER, 2.855f, -459.823f, -19.18f}, {NPC_COILFANG_AMBUSHER, 12.458f, -466.042f, -19.18f}, @@ -92,7 +92,7 @@ struct MANGOS_DLL_DECL boss_the_lurker_belowAI : public Scripted_NoMovementAI void Reset() { m_uiPhase = PHASE_NORMAL; - m_uiPhaseChangeTimer= 90000; + m_uiPhaseChangeTimer = 90000; DoResetCombatTimers(); } @@ -192,7 +192,7 @@ struct MANGOS_DLL_DECL boss_the_lurker_belowAI : public Scripted_NoMovementAI DoSummonCoilfangNaga(); m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); m_uiPhase = PHASE_SUBMERGED; - m_uiPhaseChangeTimer = MINUTE*IN_MILLISECONDS; + m_uiPhaseChangeTimer = MINUTE * IN_MILLISECONDS; } } else @@ -260,7 +260,7 @@ struct MANGOS_DLL_DECL boss_the_lurker_belowAI : public Scripted_NoMovementAI m_uiPhase = PHASE_NORMAL; m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); m_creature->RemoveAurasDueToSpell(SPELL_SUBMERGE); - m_uiPhaseChangeTimer = 2*MINUTE*IN_MILLISECONDS; + m_uiPhaseChangeTimer = 2 * MINUTE * IN_MILLISECONDS; } else m_uiPhaseChangeTimer -= uiDiff; @@ -279,7 +279,7 @@ CreatureAI* GetAI_boss_the_lurker_below(Creature* pCreature) bool GOUse_go_strange_pool(Player* pPlayer, GameObject* pGo) { // There is some chance to fish The Lurker Below, sources are from 20s to 10minutes, average 5min => 20 tries, hence 5% - if (urand(0,99) < 5) + if (urand(0, 99) < 5) { if (ScriptedInstance* pInstance = (ScriptedInstance*)pGo->GetInstanceData()) { diff --git a/scripts/outland/coilfang_reservoir/serpent_shrine/instance_serpent_shrine.cpp b/scripts/outland/coilfang_reservoir/serpent_shrine/instance_serpent_shrine.cpp index c04f94ea5..73846ce8e 100644 --- a/scripts/outland/coilfang_reservoir/serpent_shrine/instance_serpent_shrine.cpp +++ b/scripts/outland/coilfang_reservoir/serpent_shrine/instance_serpent_shrine.cpp @@ -80,7 +80,7 @@ void instance_serpentshrine_cavern::OnCreatureCreate(Creature* pCreature) void instance_serpentshrine_cavern::OnObjectCreate(GameObject* pGo) { - switch(pGo->GetEntry()) + switch (pGo->GetEntry()) { case GO_SHIELD_GENERATOR_1: case GO_SHIELD_GENERATOR_2: @@ -142,7 +142,7 @@ void instance_serpentshrine_cavern::SetData(uint32 uiType, uint32 uiData) std::ostringstream saveStream; saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2] << " " - << m_auiEncounter[3] << " " << m_auiEncounter[4] << " " << m_auiEncounter[5]; + << m_auiEncounter[3] << " " << m_auiEncounter[4] << " " << m_auiEncounter[5]; m_strInstData = saveStream.str(); @@ -163,7 +163,7 @@ void instance_serpentshrine_cavern::Load(const char* chrIn) std::istringstream loadStream(chrIn); loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3] - >> m_auiEncounter[4] >> m_auiEncounter[5]; + >> m_auiEncounter[4] >> m_auiEncounter[5]; for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) { diff --git a/scripts/outland/coilfang_reservoir/serpent_shrine/serpent_shrine.h b/scripts/outland/coilfang_reservoir/serpent_shrine/serpent_shrine.h index d2318ce3b..8f43f7eae 100644 --- a/scripts/outland/coilfang_reservoir/serpent_shrine/serpent_shrine.h +++ b/scripts/outland/coilfang_reservoir/serpent_shrine/serpent_shrine.h @@ -17,7 +17,7 @@ enum TYPE_MOROGRIM_EVENT = 4, TYPE_THELURKER_EVENT = 5, - //NPC_KARATHRESS = 21214, + // NPC_KARATHRESS = 21214, NPC_CARIBDIS = 21964, NPC_SHARKKIS = 21966, NPC_TIDALVESS = 21965, @@ -33,15 +33,15 @@ enum GO_SHIELD_GENERATOR_4 = 185054, // Objects and doors no longer used since 2.4.0 - //GO_CONSOLE_HYDROSS = 185117, - //GO_CONSOLE_LURKER = 185118, - //GO_CONSOLE_LEOTHERAS = 185115, - //GO_CONSOLE_KARATHRESS = 185114, - //GO_CONSOLE_MOROGRIM = 185116, - //GO_CONSOLE_VASHJ = 184568, - //GO_BRIDGE_PART_1 = 184203, - //GO_BRIDGE_PART_2 = 184204, - //GO_BRIDGE_PART_3 = 184205, + // GO_CONSOLE_HYDROSS = 185117, + // GO_CONSOLE_LURKER = 185118, + // GO_CONSOLE_LEOTHERAS = 185115, + // GO_CONSOLE_KARATHRESS = 185114, + // GO_CONSOLE_MOROGRIM = 185116, + // GO_CONSOLE_VASHJ = 184568, + // GO_BRIDGE_PART_1 = 184203, + // GO_BRIDGE_PART_2 = 184204, + // GO_BRIDGE_PART_3 = 184205, SPELL_LEOTHERAS_BANISH = 37546, }; @@ -62,8 +62,8 @@ class MANGOS_DLL_DECL instance_serpentshrine_cavern : public ScriptedInstance void SetData(uint32 uiType, uint32 uiData); uint32 GetData(uint32 uiType); - void GetBeamHelpersGUIDList(GuidList &lList) { lList = m_lBeamHelpersGUIDList; } - void GetShieldGeneratorsGUIDList(GuidList &lList) { lList = m_lShieldGeneratorGUIDList; } + void GetBeamHelpersGUIDList(GuidList& lList) { lList = m_lBeamHelpersGUIDList; } + void GetShieldGeneratorsGUIDList(GuidList& lList) { lList = m_lShieldGeneratorGUIDList; } const char* Save() { return m_strInstData.c_str(); } void Load(const char* chrIn); diff --git a/scripts/outland/coilfang_reservoir/steam_vault/boss_hydromancer_thespia.cpp b/scripts/outland/coilfang_reservoir/steam_vault/boss_hydromancer_thespia.cpp index 4b7fc83ba..32f022666 100644 --- a/scripts/outland/coilfang_reservoir/steam_vault/boss_hydromancer_thespia.cpp +++ b/scripts/outland/coilfang_reservoir/steam_vault/boss_hydromancer_thespia.cpp @@ -90,7 +90,7 @@ struct MANGOS_DLL_DECL boss_thespiaAI : public ScriptedAI void Aggro(Unit* pWho) { - switch(urand(0, 2)) + switch (urand(0, 2)) { case 0: DoScriptText(SAY_AGGRO_1, m_creature); break; case 1: DoScriptText(SAY_AGGRO_2, m_creature); break; diff --git a/scripts/outland/coilfang_reservoir/steam_vault/boss_mekgineer_steamrigger.cpp b/scripts/outland/coilfang_reservoir/steam_vault/boss_mekgineer_steamrigger.cpp index 891d93c57..2fefc2cab 100644 --- a/scripts/outland/coilfang_reservoir/steam_vault/boss_mekgineer_steamrigger.cpp +++ b/scripts/outland/coilfang_reservoir/steam_vault/boss_mekgineer_steamrigger.cpp @@ -44,7 +44,7 @@ enum SPELL_SUPER_SHRINK_RAY = 31485, SPELL_SAW_BLADE = 31486, SPELL_ELECTRIFIED_NET = 35107, - //SPELL_ENRAGE_H = 1, //current enrage spell not known + // SPELL_ENRAGE_H = 1, // current enrage spell not known NPC_STEAMRIGGER_MECHANIC = 17951, @@ -62,9 +62,9 @@ struct SummonLocation // Spawn locations static const SummonLocation aSteamriggerSpawnLocs[] = { - {-316.101f, -166.444f, -7.66f}, - {-348.497f, -161.718f, -7.66f}, - {-331.161f, -112.212f, -7.66f}, + { -316.101f, -166.444f, -7.66f}, + { -348.497f, -161.718f, -7.66f}, + { -331.161f, -112.212f, -7.66f}, }; struct MANGOS_DLL_DECL boss_mekgineer_steamriggerAI : public ScriptedAI @@ -110,7 +110,7 @@ struct MANGOS_DLL_DECL boss_mekgineer_steamriggerAI : public ScriptedAI void KilledUnit(Unit* pVictim) { - switch(urand(0, 2)) + switch (urand(0, 2)) { case 0: DoScriptText(SAY_SLAY_1, m_creature); break; case 1: DoScriptText(SAY_SLAY_2, m_creature); break; @@ -120,7 +120,7 @@ struct MANGOS_DLL_DECL boss_mekgineer_steamriggerAI : public ScriptedAI void Aggro(Unit* pWho) { - switch(urand(0, 2)) + switch (urand(0, 2)) { case 0: DoScriptText(SAY_AGGRO_1, m_creature); break; case 1: DoScriptText(SAY_AGGRO_2, m_creature); break; @@ -197,7 +197,7 @@ struct MANGOS_DLL_DECL boss_mekgineer_steamriggerAI : public ScriptedAI m_uiMechanicTimer -= uiDiff; } - if (m_creature->GetHealthPercent() < (100 - 25*m_uiMechanicPhaseCount)) + if (m_creature->GetHealthPercent() < (100 - 25 * m_uiMechanicPhaseCount)) { SummonMechanichs(); ++m_uiMechanicPhaseCount; @@ -255,7 +255,7 @@ struct MANGOS_DLL_DECL mob_steamrigger_mechanicAI : public ScriptedAI { // Channel the repair spell on Steamrigger // This will also stop creature movement and will allow them to continue to follow the boss after channeling is finished or the boss is out of range - if (m_creature->IsWithinDistInMap(pWho, 2*INTERACTION_DISTANCE)) + if (m_creature->IsWithinDistInMap(pWho, 2 * INTERACTION_DISTANCE)) DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_REPAIR : SPELL_REPAIR_H); } } diff --git a/scripts/outland/coilfang_reservoir/steam_vault/boss_warlord_kalithresh.cpp b/scripts/outland/coilfang_reservoir/steam_vault/boss_warlord_kalithresh.cpp index 59f056856..0a7416393 100644 --- a/scripts/outland/coilfang_reservoir/steam_vault/boss_warlord_kalithresh.cpp +++ b/scripts/outland/coilfang_reservoir/steam_vault/boss_warlord_kalithresh.cpp @@ -78,7 +78,7 @@ struct MANGOS_DLL_DECL boss_warlord_kalithreshAI : public ScriptedAI void Aggro(Unit* pWho) { - switch(urand(0, 2)) + switch (urand(0, 2)) { case 0: DoScriptText(SAY_AGGRO1, m_creature); break; case 1: DoScriptText(SAY_AGGRO2, m_creature); break; diff --git a/scripts/outland/coilfang_reservoir/steam_vault/instance_steam_vault.cpp b/scripts/outland/coilfang_reservoir/steam_vault/instance_steam_vault.cpp index 5919b97dd..445986f48 100644 --- a/scripts/outland/coilfang_reservoir/steam_vault/instance_steam_vault.cpp +++ b/scripts/outland/coilfang_reservoir/steam_vault/instance_steam_vault.cpp @@ -57,7 +57,7 @@ void instance_steam_vault::Initialize() void instance_steam_vault::OnCreatureCreate(Creature* pCreature) { - switch(pCreature->GetEntry()) + switch (pCreature->GetEntry()) { case NPC_STEAMRIGGER: case NPC_KALITHRESH: @@ -71,7 +71,7 @@ void instance_steam_vault::OnCreatureCreate(Creature* pCreature) void instance_steam_vault::OnObjectCreate(GameObject* pGo) { - switch(pGo->GetEntry()) + switch (pGo->GetEntry()) { case GO_MAIN_CHAMBERS_DOOR: if (m_auiEncounter[TYPE_HYDROMANCER_THESPIA] == SPECIAL && m_auiEncounter[TYPE_MEKGINEER_STEAMRIGGER] == SPECIAL) @@ -178,7 +178,7 @@ void instance_steam_vault::Load(const char* chrIn) std::istringstream loadStream(chrIn); loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2]; - for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) + for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) { if (m_auiEncounter[i] == IN_PROGRESS) m_auiEncounter[i] = NOT_STARTED; diff --git a/scripts/outland/coilfang_reservoir/steam_vault/steam_vault.h b/scripts/outland/coilfang_reservoir/steam_vault/steam_vault.h index 8ab8a2cde..8de71dfd8 100644 --- a/scripts/outland/coilfang_reservoir/steam_vault/steam_vault.h +++ b/scripts/outland/coilfang_reservoir/steam_vault/steam_vault.h @@ -16,7 +16,7 @@ enum NPC_NAGA_DISTILLER = 17954, NPC_STEAMRIGGER = 17796, NPC_KALITHRESH = 17798, - //NPC_THESPIA = 17797, + // NPC_THESPIA = 17797, GO_MAIN_CHAMBERS_DOOR = 183049, GO_ACCESS_PANEL_HYDRO = 184125, diff --git a/scripts/outland/coilfang_reservoir/underbog/boss_hungarfen.cpp b/scripts/outland/coilfang_reservoir/underbog/boss_hungarfen.cpp index 1a3db2d02..ca3ffd952 100644 --- a/scripts/outland/coilfang_reservoir/underbog/boss_hungarfen.cpp +++ b/scripts/outland/coilfang_reservoir/underbog/boss_hungarfen.cpp @@ -53,7 +53,7 @@ struct MANGOS_DLL_DECL boss_hungarfenAI : public ScriptedAI void Reset() { m_bHasSpores = false; - m_uiMushroomTimer = 5000; // 1 mushroom after 5s, then one per 10s. This should be different in heroic mode + m_uiMushroomTimer = 5000; // 1 mushroom after 5s, then one per 10s. This should be different in heroic mode m_uiAcidGeyserTimer = 10000; } diff --git a/scripts/outland/gruuls_lair/boss_gruul.cpp b/scripts/outland/gruuls_lair/boss_gruul.cpp index 8d99e9783..5ddac1918 100644 --- a/scripts/outland/gruuls_lair/boss_gruul.cpp +++ b/scripts/outland/gruuls_lair/boss_gruul.cpp @@ -40,16 +40,16 @@ enum SPELL_GROWTH = 36300, SPELL_CAVE_IN = 36240, - SPELL_GROUND_SLAM = 33525, //AoE Ground Slam applying Ground Slam to everyone with a script effect (most likely the knock back, we can code it to a set knockback) + SPELL_GROUND_SLAM = 33525, // AoE Ground Slam applying Ground Slam to everyone with a script effect (most likely the knock back, we can code it to a set knockback) SPELL_REVERBERATION = 36297, SPELL_SHATTER = 33654, SPELL_SHATTER_EFFECT = 33671, SPELL_HURTFUL_STRIKE = 33813, - SPELL_STONED = 33652, //Spell is self cast by target + SPELL_STONED = 33652, // Spell is self cast by target SPELL_MAGNETIC_PULL = 28337, - SPELL_KNOCK_BACK = 24199 //Knockback spell until correct implementation is made + SPELL_KNOCK_BACK = 24199 // Knockback spell until correct implementation is made }; struct MANGOS_DLL_DECL boss_gruulAI : public ScriptedAI @@ -98,7 +98,7 @@ struct MANGOS_DLL_DECL boss_gruulAI : public ScriptedAI void KilledUnit(Unit* pVictim) { - switch(urand(0, 2)) + switch (urand(0, 2)) { case 0: DoScriptText(SAY_SLAY1, m_creature); break; case 1: DoScriptText(SAY_SLAY2, m_creature); break; @@ -116,13 +116,13 @@ struct MANGOS_DLL_DECL boss_gruulAI : public ScriptedAI void SpellHitTarget(Unit* pTarget, const SpellEntry* pSpell) { - //This to emulate effect1 (77) of SPELL_GROUND_SLAM, knock back to any direction - //It's initially wrong, since this will cause fall damage, which is by comments, not intended. + // This to emulate effect1 (77) of SPELL_GROUND_SLAM, knock back to any direction + // It's initially wrong, since this will cause fall damage, which is by comments, not intended. if (pSpell->Id == SPELL_GROUND_SLAM) { if (pTarget->GetTypeId() == TYPEID_PLAYER) { - switch(urand(0, 1)) + switch (urand(0, 1)) { case 0: pTarget->CastSpell(pTarget, SPELL_MAGNETIC_PULL, true, NULL, NULL, m_creature->GetObjectGuid()); break; case 1: pTarget->CastSpell(pTarget, SPELL_KNOCK_BACK, true, NULL, NULL, m_creature->GetObjectGuid()); break; @@ -130,21 +130,21 @@ struct MANGOS_DLL_DECL boss_gruulAI : public ScriptedAI } } - //this part should be in mangos + // this part should be in mangos if (pSpell->Id == SPELL_SHATTER) { - //this spell must have custom handling in mangos, dealing damage based on distance + // this spell must have custom handling in mangos, dealing damage based on distance pTarget->CastSpell(pTarget, SPELL_SHATTER_EFFECT, true); if (pTarget->HasAura(SPELL_STONED)) pTarget->RemoveAurasDueToSpell(SPELL_STONED); - //clear this, if we are still performing + // clear this, if we are still performing if (m_bPerformingGroundSlam) { m_bPerformingGroundSlam = false; - //and correct movement, if not already + // and correct movement, if not already if (m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() != CHASE_MOTION_TYPE) { if (m_creature->getVictim()) @@ -181,7 +181,7 @@ struct MANGOS_DLL_DECL boss_gruulAI : public ScriptedAI m_uiGroundSlamTimer = 120000; m_uiHurtfulStrikeTimer = 8000; - //Give a little time to the players to undo the damage from shatter + // Give a little time to the players to undo the damage from shatter if (m_uiReverberationTimer < 10000) m_uiReverberationTimer += 10000; } diff --git a/scripts/outland/gruuls_lair/boss_high_king_maulgar.cpp b/scripts/outland/gruuls_lair/boss_high_king_maulgar.cpp index 73e293db6..f3ea719c6 100644 --- a/scripts/outland/gruuls_lair/boss_high_king_maulgar.cpp +++ b/scripts/outland/gruuls_lair/boss_high_king_maulgar.cpp @@ -50,24 +50,24 @@ enum SPELL_DEATH_COIL = 33130, SPELL_SUMMON_WILD_FELHUNTER = 33131, - //Kiggler the Crazed Spells + // Kiggler the Crazed Spells SPELL_GREATER_POLYMORPH = 33173, SPELL_LIGHTNING_BOLT = 36152, SPELL_ARCANE_SHOCK = 33175, SPELL_ARCANE_EXPLOSION = 33237, - //Blindeye the Seer Spells + // Blindeye the Seer Spells SPELL_GREATER_PW_SHIELD = 33147, SPELL_HEAL = 33144, SPELL_PRAYEROFHEALING = 33152, - //Krosh Firehand Spells + // Krosh Firehand Spells SPELL_GREATER_FIREBALL = 33051, SPELL_SPELLSHIELD = 33054, SPELL_BLAST_WAVE = 33061, }; -//High King Maulgar AI +// High King Maulgar AI struct MANGOS_DLL_DECL boss_high_king_maulgarAI : public ScriptedAI { boss_high_king_maulgarAI(Creature* pCreature) : ScriptedAI(pCreature) @@ -106,7 +106,7 @@ struct MANGOS_DLL_DECL boss_high_king_maulgarAI : public ScriptedAI void KilledUnit(Unit* pVictim) { - switch(urand(0, 2)) + switch (urand(0, 2)) { case 0: DoScriptText(SAY_SLAY1, m_creature); break; case 1: DoScriptText(SAY_SLAY2, m_creature); break; @@ -133,7 +133,7 @@ struct MANGOS_DLL_DECL boss_high_king_maulgarAI : public ScriptedAI void EventCouncilDeath() { - switch(++m_uiCouncilDeathCount) + switch (++m_uiCouncilDeathCount) { case 1: DoScriptText(SAY_OGRE_DEATH1, m_creature); break; case 2: DoScriptText(SAY_OGRE_DEATH2, m_creature); break; @@ -233,7 +233,7 @@ struct MANGOS_DLL_DECL Council_Base_AI : public ScriptedAI } }; -//Olm The Summoner AI +// Olm The Summoner AI struct MANGOS_DLL_DECL boss_olm_the_summonerAI : public Council_Base_AI { boss_olm_the_summonerAI(Creature* pCreature) : Council_Base_AI(pCreature) {Reset();} @@ -282,7 +282,7 @@ struct MANGOS_DLL_DECL boss_olm_the_summonerAI : public Council_Base_AI } }; -//Kiggler The Crazed AI +// Kiggler The Crazed AI struct MANGOS_DLL_DECL boss_kiggler_the_crazedAI : public Council_Base_AI { boss_kiggler_the_crazedAI(Creature* pCreature) : Council_Base_AI(pCreature) {Reset();} @@ -309,7 +309,7 @@ struct MANGOS_DLL_DECL boss_kiggler_the_crazedAI : public Council_Base_AI if (pVictim->GetTypeId() != TYPEID_PLAYER) return; - m_creature->getThreatManager().modifyThreatPercent(pVictim,-75); + m_creature->getThreatManager().modifyThreatPercent(pVictim, -75); } } @@ -372,7 +372,7 @@ struct MANGOS_DLL_DECL boss_kiggler_the_crazedAI : public Council_Base_AI } }; -//Blindeye The Seer AI +// Blindeye The Seer AI struct MANGOS_DLL_DECL boss_blindeye_the_seerAI : public Council_Base_AI { boss_blindeye_the_seerAI(Creature* pCreature) : Council_Base_AI(pCreature) {Reset();} @@ -424,7 +424,7 @@ struct MANGOS_DLL_DECL boss_blindeye_the_seerAI : public Council_Base_AI } }; -//Krosh Firehand AI +// Krosh Firehand AI struct MANGOS_DLL_DECL boss_krosh_firehandAI : public Council_Base_AI { boss_krosh_firehandAI(Creature* pCreature) : Council_Base_AI(pCreature) {Reset();} @@ -508,17 +508,17 @@ CreatureAI* GetAI_boss_olm_the_summoner(Creature* pCreature) return new boss_olm_the_summonerAI(pCreature); } -CreatureAI *GetAI_boss_kiggler_the_crazed(Creature* pCreature) +CreatureAI* GetAI_boss_kiggler_the_crazed(Creature* pCreature) { return new boss_kiggler_the_crazedAI(pCreature); } -CreatureAI *GetAI_boss_blindeye_the_seer(Creature* pCreature) +CreatureAI* GetAI_boss_blindeye_the_seer(Creature* pCreature) { return new boss_blindeye_the_seerAI(pCreature); } -CreatureAI *GetAI_boss_krosh_firehand(Creature* pCreature) +CreatureAI* GetAI_boss_krosh_firehand(Creature* pCreature) { return new boss_krosh_firehandAI(pCreature); } diff --git a/scripts/outland/gruuls_lair/gruuls_lair.h b/scripts/outland/gruuls_lair/gruuls_lair.h index eab6d0c01..bd1291e90 100644 --- a/scripts/outland/gruuls_lair/gruuls_lair.h +++ b/scripts/outland/gruuls_lair/gruuls_lair.h @@ -19,16 +19,16 @@ enum // NPC GUIDs NPC_MAULGAR = 18831, - //NPC_BLINDEYE = 18836, - //NPC_KIGGLER = 18835, - //NPC_KROSH = 18832, - //NPC_OLM = 18834, + // NPC_BLINDEYE = 18836, + // NPC_KIGGLER = 18835, + // NPC_KROSH = 18832, + // NPC_OLM = 18834, }; class MANGOS_DLL_DECL instance_gruuls_lair : public ScriptedInstance { public: - instance_gruuls_lair(Map *pMap); + instance_gruuls_lair(Map* pMap); void Initialize(); bool IsEncounterInProgress() const; diff --git a/scripts/outland/gruuls_lair/instance_gruuls_lair.cpp b/scripts/outland/gruuls_lair/instance_gruuls_lair.cpp index 5f766aa8e..99774c930 100644 --- a/scripts/outland/gruuls_lair/instance_gruuls_lair.cpp +++ b/scripts/outland/gruuls_lair/instance_gruuls_lair.cpp @@ -29,7 +29,7 @@ EndScriptData */ 2 - Gruul event */ -instance_gruuls_lair::instance_gruuls_lair(Map *pMap) : ScriptedInstance(pMap), +instance_gruuls_lair::instance_gruuls_lair(Map* pMap) : ScriptedInstance(pMap), m_uiCouncilMembersDied(0) { Initialize(); @@ -134,7 +134,7 @@ void instance_gruuls_lair::Load(const char* chrIn) loadStream >> m_auiEncounter[0] >> m_auiEncounter[1]; - for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) + for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) if (m_auiEncounter[i] == IN_PROGRESS) m_auiEncounter[i] = NOT_STARTED; diff --git a/scripts/outland/hellfire_citadel/blood_furnace/blood_furnace.h b/scripts/outland/hellfire_citadel/blood_furnace/blood_furnace.h index 5490d8b76..1b7f560b1 100644 --- a/scripts/outland/hellfire_citadel/blood_furnace/blood_furnace.h +++ b/scripts/outland/hellfire_citadel/blood_furnace/blood_furnace.h @@ -42,7 +42,7 @@ enum }; // Random Magtheridon taunt -static const int32 aRandomTaunt[]= {-1544000, -1544001, -1544002, -1544003, -1544004, -1544005}; +static const int32 aRandomTaunt[] = { -1544000, -1544001, -1544002, -1544003, -1544004, -1544005}; struct BroggokEventInfo { diff --git a/scripts/outland/hellfire_citadel/blood_furnace/boss_broggok.cpp b/scripts/outland/hellfire_citadel/blood_furnace/boss_broggok.cpp index 888bf39a0..b400177b6 100644 --- a/scripts/outland/hellfire_citadel/blood_furnace/boss_broggok.cpp +++ b/scripts/outland/hellfire_citadel/blood_furnace/boss_broggok.cpp @@ -159,8 +159,8 @@ struct MANGOS_DLL_DECL mob_broggok_poisoncloudAI : public ScriptedAI mob_broggok_poisoncloudAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} void Reset() { } - void MoveInLineOfSight(Unit *who) { } - void AttackStart(Unit *who) { } + void MoveInLineOfSight(Unit* who) { } + void AttackStart(Unit* who) { } }; CreatureAI* GetAI_boss_broggok(Creature* pCreature) diff --git a/scripts/outland/hellfire_citadel/blood_furnace/boss_kelidan_the_breaker.cpp b/scripts/outland/hellfire_citadel/blood_furnace/boss_kelidan_the_breaker.cpp index a1ba11b68..2a8dc896c 100644 --- a/scripts/outland/hellfire_citadel/blood_furnace/boss_kelidan_the_breaker.cpp +++ b/scripts/outland/hellfire_citadel/blood_furnace/boss_kelidan_the_breaker.cpp @@ -242,7 +242,7 @@ struct MANGOS_DLL_DECL boss_kelidan_the_breakerAI : public ScriptedAI } } else - m_uiFirenovaTimer -=uiDiff; + m_uiFirenovaTimer -= uiDiff; } if (m_uiShadowVolleyTimer < uiDiff) @@ -251,7 +251,7 @@ struct MANGOS_DLL_DECL boss_kelidan_the_breakerAI : public ScriptedAI m_uiShadowVolleyTimer = urand(5000, 13000); } else - m_uiShadowVolleyTimer -=uiDiff; + m_uiShadowVolleyTimer -= uiDiff; if (m_uiCorruptionTimer < uiDiff) { @@ -259,7 +259,7 @@ struct MANGOS_DLL_DECL boss_kelidan_the_breakerAI : public ScriptedAI m_uiCorruptionTimer = urand(30000, 50000); } else - m_uiCorruptionTimer -=uiDiff; + m_uiCorruptionTimer -= uiDiff; if (m_uiBurningNovaTimer < uiDiff) { @@ -323,7 +323,7 @@ struct MANGOS_DLL_DECL mob_shadowmoon_channelerAI : public ScriptedAI { m_creature->InterruptNonMeleeSpells(false); - switch(urand(0, 2)) + switch (urand(0, 2)) { case 0: DoScriptText(SAY_ADD_AGGRO_1, m_creature); @@ -340,7 +340,7 @@ struct MANGOS_DLL_DECL mob_shadowmoon_channelerAI : public ScriptedAI return; if (Creature* pKelidan = m_pInstance->GetSingleCreatureFromStorage(NPC_KELIDAN_THE_BREAKER)) - if (boss_kelidan_the_breakerAI* pKelidanAI = dynamic_cast (pKelidan->AI())) + if (boss_kelidan_the_breakerAI* pKelidanAI = dynamic_cast(pKelidan->AI())) pKelidanAI->AddJustAggroed(pWho); } @@ -350,7 +350,7 @@ struct MANGOS_DLL_DECL mob_shadowmoon_channelerAI : public ScriptedAI return; if (Creature* pKelidan = m_pInstance->GetSingleCreatureFromStorage(NPC_KELIDAN_THE_BREAKER)) - if (boss_kelidan_the_breakerAI* pKelidanAI = dynamic_cast (pKelidan->AI())) + if (boss_kelidan_the_breakerAI* pKelidanAI = dynamic_cast(pKelidan->AI())) pKelidanAI->AddJustDied(pKiller); } @@ -360,7 +360,7 @@ struct MANGOS_DLL_DECL mob_shadowmoon_channelerAI : public ScriptedAI return; if (Creature* pKelidan = m_pInstance->GetSingleCreatureFromStorage(NPC_KELIDAN_THE_BREAKER)) - if (boss_kelidan_the_breakerAI* pKelidanAI = dynamic_cast (pKelidan->AI())) + if (boss_kelidan_the_breakerAI* pKelidanAI = dynamic_cast(pKelidan->AI())) pKelidanAI->AddJustReachedHome(); } @@ -378,7 +378,7 @@ struct MANGOS_DLL_DECL mob_shadowmoon_channelerAI : public ScriptedAI } } else - m_uiMarkOfShadowTimer -=uiDiff; + m_uiMarkOfShadowTimer -= uiDiff; if (m_uiShadowBoltTimer < uiDiff) { @@ -389,7 +389,7 @@ struct MANGOS_DLL_DECL mob_shadowmoon_channelerAI : public ScriptedAI } } else - m_uiShadowBoltTimer -=uiDiff; + m_uiShadowBoltTimer -= uiDiff; DoMeleeAttackIfReady(); } diff --git a/scripts/outland/hellfire_citadel/blood_furnace/instance_blood_furnace.cpp b/scripts/outland/hellfire_citadel/blood_furnace/instance_blood_furnace.cpp index a9b1db149..ddc39d6d4 100644 --- a/scripts/outland/hellfire_citadel/blood_furnace/instance_blood_furnace.cpp +++ b/scripts/outland/hellfire_citadel/blood_furnace/instance_blood_furnace.cpp @@ -94,7 +94,7 @@ void instance_blood_furnace::OnObjectCreate(GameObject* pGo) void instance_blood_furnace::SetData(uint32 uiType, uint32 uiData) { - switch(uiType) + switch (uiType) { case TYPE_THE_MAKER_EVENT: if (uiData == IN_PROGRESS) @@ -205,7 +205,7 @@ void instance_blood_furnace::DoNextBroggokEventPhase() m_aBroggokEvent[m_uiBroggokEventPhase].m_bIsCellOpened = true; - for(GuidSet::const_iterator itr = m_aBroggokEvent[m_uiBroggokEventPhase].m_sSortedOrcGuids.begin(); itr != m_aBroggokEvent[m_uiBroggokEventPhase].m_sSortedOrcGuids.end(); ++itr) + for (GuidSet::const_iterator itr = m_aBroggokEvent[m_uiBroggokEventPhase].m_sSortedOrcGuids.begin(); itr != m_aBroggokEvent[m_uiBroggokEventPhase].m_sSortedOrcGuids.end(); ++itr) { if (Creature* pOrc = instance->GetCreature(*itr)) { @@ -317,7 +317,7 @@ void instance_blood_furnace::Load(const char* chrIn) std::istringstream loadStream(chrIn); loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2]; - for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) + for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) if (m_auiEncounter[i] == IN_PROGRESS || m_auiEncounter[i] == FAIL) m_auiEncounter[i] = NOT_STARTED; diff --git a/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_nazan_and_vazruden.cpp b/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_nazan_and_vazruden.cpp index d3301bdfe..8daaacd5f 100644 --- a/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_nazan_and_vazruden.cpp +++ b/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_nazan_and_vazruden.cpp @@ -38,11 +38,11 @@ enum SPELL_SUMMON_VAZRUDEN = 30717, - //vazruden + // vazruden SPELL_REVENGE = 19130, SPELL_REVENGE_H = 40392, - //nazan + // nazan SPELL_FIREBALL = 30691, // This and the next while flying (dmg values will change in cata) SPELL_FIREBALL_B = 33793, SPELL_FIREBALL_H = 32491, @@ -55,7 +55,7 @@ enum SPELL_BELLOW_ROAR_H = 39427, - //misc + // misc POINT_ID_CENTER = 100, POINT_ID_FLYING = 101, POINT_ID_COMBAT = 102, @@ -63,8 +63,8 @@ enum NPC_NAZAN = 17536, }; -const float afCenterPos[3] = {-1399.401f, 1736.365f, 87.008f}; //moves here to drop off nazan -const float afCombatPos[3] = {-1413.848f, 1754.019f, 83.146f}; //moves here when decending +const float afCenterPos[3] = { -1399.401f, 1736.365f, 87.008f}; // moves here to drop off nazan +const float afCombatPos[3] = { -1413.848f, 1754.019f, 83.146f}; // moves here when decending struct MANGOS_DLL_DECL boss_vazrudenAI : public ScriptedAI { @@ -89,7 +89,7 @@ struct MANGOS_DLL_DECL boss_vazrudenAI : public ScriptedAI void Aggro(Unit* pWho) { - switch(urand(0, 2)) + switch (urand(0, 2)) { case 0: DoScriptText(SAY_AGGRO1, m_creature); break; case 1: DoScriptText(SAY_AGGRO2, m_creature); break; diff --git a/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_omor_the_unscarred.cpp b/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_omor_the_unscarred.cpp index 28598a245..19e4e3a68 100644 --- a/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_omor_the_unscarred.cpp +++ b/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_omor_the_unscarred.cpp @@ -80,7 +80,7 @@ struct MANGOS_DLL_DECL boss_omor_the_unscarredAI : public ScriptedAI void Aggro(Unit* pWho) { - switch(urand(0, 2)) + switch (urand(0, 2)) { case 0: DoScriptText(SAY_AGGRO_1, m_creature); break; case 1: DoScriptText(SAY_AGGRO_2, m_creature); break; @@ -128,7 +128,7 @@ struct MANGOS_DLL_DECL boss_omor_the_unscarredAI : public ScriptedAI { if (Player* pPlayer = m_creature->GetMap()->GetPlayer(m_playerGuid)) { - //if unit dosen't have this flag, then no pulling back (script will attempt cast, even if orbital strike was resisted) + // if unit dosen't have this flag, then no pulling back (script will attempt cast, even if orbital strike was resisted) if (pPlayer->HasMovementFlag(MOVEFLAG_FALLING)) DoCastSpellIfCan(pPlayer, SPELL_SHADOW_WHIP, CAST_INTERRUPT_PREVIOUS); } diff --git a/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_watchkeeper_gargolmar.cpp b/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_watchkeeper_gargolmar.cpp index 07851384d..169aba769 100644 --- a/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_watchkeeper_gargolmar.cpp +++ b/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_watchkeeper_gargolmar.cpp @@ -73,7 +73,7 @@ struct MANGOS_DLL_DECL boss_watchkeeper_gargolmarAI : public ScriptedAI void Aggro(Unit* pWho) { - switch(urand(0, 2)) + switch (urand(0, 2)) { case 0: DoScriptText(SAY_AGGRO_1, m_creature); break; case 1: DoScriptText(SAY_AGGRO_2, m_creature); break; @@ -133,7 +133,7 @@ struct MANGOS_DLL_DECL boss_watchkeeper_gargolmarAI : public ScriptedAI { if (m_uiRetaliationTimer < uiDiff) { - if (DoCastSpellIfCan(m_creature,SPELL_RETALIATION) == CAST_OK) + if (DoCastSpellIfCan(m_creature, SPELL_RETALIATION) == CAST_OK) m_uiRetaliationTimer = 30000; } else diff --git a/scripts/outland/hellfire_citadel/hellfire_ramparts/instance_hellfire_ramparts.cpp b/scripts/outland/hellfire_citadel/hellfire_ramparts/instance_hellfire_ramparts.cpp index 468a2467f..fe1ba4939 100644 --- a/scripts/outland/hellfire_citadel/hellfire_ramparts/instance_hellfire_ramparts.cpp +++ b/scripts/outland/hellfire_citadel/hellfire_ramparts/instance_hellfire_ramparts.cpp @@ -62,7 +62,7 @@ void instance_ramparts::OnObjectCreate(GameObject* pGo) void instance_ramparts::SetData(uint32 uiType, uint32 uiData) { - debug_log("SD2: Instance Ramparts: SetData received for type %u with data %u",uiType,uiData); + debug_log("SD2: Instance Ramparts: SetData received for type %u with data %u", uiType, uiData); switch (uiType) { @@ -128,7 +128,7 @@ void instance_ramparts::DoFailVazruden() pVazruden->Respawn(); else { - if (ScriptedAI* pVazrudenAI = dynamic_cast (pVazruden->AI())) + if (ScriptedAI* pVazrudenAI = dynamic_cast(pVazruden->AI())) pVazrudenAI->Reset(); } } diff --git a/scripts/outland/hellfire_citadel/magtheridons_lair/boss_magtheridon.cpp b/scripts/outland/hellfire_citadel/magtheridons_lair/boss_magtheridon.cpp index 4f9609056..377f1f431 100644 --- a/scripts/outland/hellfire_citadel/magtheridons_lair/boss_magtheridon.cpp +++ b/scripts/outland/hellfire_citadel/magtheridons_lair/boss_magtheridon.cpp @@ -42,8 +42,8 @@ enum SPELL_SHADOW_CAGE_DUMMY = 30205, // dummy aura - in creature_template_addon SPELL_BLASTNOVA = 30616, SPELL_CLEAVE = 30619, - //SPELL_QUAKE = 30657, // spell may be related but probably used in the recent versions of the script - //SPELL_QUAKE_TRIGGER = 30576, // spell removed from DBC - triggers 30571 + // SPELL_QUAKE = 30657, // spell may be related but probably used in the recent versions of the script + // SPELL_QUAKE_TRIGGER = 30576, // spell removed from DBC - triggers 30571 SPELL_QUAKE_KNOCKBACK = 30571, SPELL_BLAZE = 30541, // triggers 30542 SPELL_BERSERK = 27680, @@ -73,7 +73,7 @@ enum SPELL_FIRE_BLAST = 37110, // summons - //NPC_MAGS_ROOM = 17516, + // NPC_MAGS_ROOM = 17516, NPC_BURNING_ABYSS = 17454, NPC_RAID_TRIGGER = 17376, @@ -108,7 +108,7 @@ struct MANGOS_DLL_DECL boss_magtheridonAI : public ScriptedAI void Reset() { - m_uiBerserkTimer = 20*MINUTE*IN_MILLISECONDS; + m_uiBerserkTimer = 20 * MINUTE * IN_MILLISECONDS; m_uiQuakeTimer = 30000; m_uiBlazeTimer = urand(10000, 15000); m_uiBlastNovaTimer = 60000; @@ -228,8 +228,8 @@ struct MANGOS_DLL_DECL boss_magtheridonAI : public ScriptedAI m_uiQuakeTimer = 1000; ++m_uiQuakeCount; } - } - else + } + else { SetCombatMovement(true); m_creature->GetMotionMaster()->Clear(); diff --git a/scripts/outland/hellfire_citadel/magtheridons_lair/instance_magtheridons_lair.cpp b/scripts/outland/hellfire_citadel/magtheridons_lair/instance_magtheridons_lair.cpp index ed8fabdf4..36544ef3c 100644 --- a/scripts/outland/hellfire_citadel/magtheridons_lair/instance_magtheridons_lair.cpp +++ b/scripts/outland/hellfire_citadel/magtheridons_lair/instance_magtheridons_lair.cpp @@ -50,7 +50,7 @@ bool instance_magtheridons_lair::IsEncounterInProgress() const void instance_magtheridons_lair::OnCreatureCreate(Creature* pCreature) { - switch(pCreature->GetEntry()) + switch (pCreature->GetEntry()) { case NPC_MAGTHERIDON: m_mNpcEntryGuidStore[NPC_MAGTHERIDON] = pCreature->GetObjectGuid(); @@ -63,7 +63,7 @@ void instance_magtheridons_lair::OnCreatureCreate(Creature* pCreature) void instance_magtheridons_lair::OnObjectCreate(GameObject* pGo) { - switch(pGo->GetEntry()) + switch (pGo->GetEntry()) { case GO_DOODAD_HF_MAG_DOOR01: // event door m_mGoEntryGuidStore[GO_DOODAD_HF_MAG_DOOR01] = pGo->GetObjectGuid(); @@ -85,7 +85,7 @@ void instance_magtheridons_lair::OnObjectCreate(GameObject* pGo) void instance_magtheridons_lair::SetData(uint32 uiType, uint32 uiData) { - switch(uiType) + switch (uiType) { case TYPE_MAGTHERIDON_EVENT: switch (uiData) @@ -175,7 +175,7 @@ void instance_magtheridons_lair::SetData(uint32 uiType, uint32 uiData) if (pMagtheridon->isAlive()) { DoScriptText(EMOTE_EVENT_BEGIN, pMagtheridon); - m_uiCageBreakTimer = MINUTE*IN_MILLISECONDS; + m_uiCageBreakTimer = MINUTE * IN_MILLISECONDS; } } @@ -212,7 +212,7 @@ void instance_magtheridons_lair::Update(uint32 uiDiff) if (pMagtheridon->isAlive()) { DoScriptText(EMOTE_NEARLY_FREE, pMagtheridon); - m_uiCageBreakTimer = MINUTE*IN_MILLISECONDS; + m_uiCageBreakTimer = MINUTE * IN_MILLISECONDS; } } break; diff --git a/scripts/outland/hellfire_citadel/magtheridons_lair/magtheridons_lair.h b/scripts/outland/hellfire_citadel/magtheridons_lair/magtheridons_lair.h index d9333f2c5..884f68b3b 100644 --- a/scripts/outland/hellfire_citadel/magtheridons_lair/magtheridons_lair.h +++ b/scripts/outland/hellfire_citadel/magtheridons_lair/magtheridons_lair.h @@ -29,7 +29,7 @@ enum EMOTE_NEARLY_FREE = -1544016, }; -static const int32 aRandomTaunt[]= {-1544000, -1544001, -1544002, -1544003, -1544004, -1544005}; +static const int32 aRandomTaunt[] = { -1544000, -1544001, -1544002, -1544003, -1544004, -1544005}; class MANGOS_DLL_DECL instance_magtheridons_lair : public ScriptedInstance { diff --git a/scripts/outland/hellfire_citadel/shattered_halls/boss_nethekurse.cpp b/scripts/outland/hellfire_citadel/shattered_halls/boss_nethekurse.cpp index 9762fa8ce..a8c2500cb 100644 --- a/scripts/outland/hellfire_citadel/shattered_halls/boss_nethekurse.cpp +++ b/scripts/outland/hellfire_citadel/shattered_halls/boss_nethekurse.cpp @@ -35,20 +35,20 @@ struct Say int32 id; }; -static Say PeonAttacked[]= +static Say PeonAttacked[] = { - {-1540001}, - {-1540002}, - {-1540003}, - {-1540004}, + { -1540001}, + { -1540002}, + { -1540003}, + { -1540004}, }; -static Say PeonDies[]= +static Say PeonDies[] = { - {-1540005}, - {-1540006}, - {-1540007}, - {-1540008}, + { -1540005}, + { -1540006}, + { -1540007}, + { -1540008}, }; enum @@ -96,7 +96,7 @@ struct MANGOS_DLL_DECL boss_grand_warlock_nethekurseAI : public ScriptedAI bool m_bIsIntroEvent; bool m_bIsMainEvent; bool m_bSpinOnce; - //bool m_bHasTaunted; + // bool m_bHasTaunted; bool m_bPhase; uint32 m_uiPeonEngagedCount; @@ -115,7 +115,7 @@ struct MANGOS_DLL_DECL boss_grand_warlock_nethekurseAI : public ScriptedAI m_bIsIntroEvent = false; m_bIsMainEvent = false; - //m_bHasTaunted = false; + // m_bHasTaunted = false; m_bSpinOnce = false; m_bPhase = false; @@ -164,7 +164,7 @@ struct MANGOS_DLL_DECL boss_grand_warlock_nethekurseAI : public ScriptedAI void DoTauntPeons() { - switch(urand(0, 2)) + switch (urand(0, 2)) { case 0: DoScriptText(SAY_TAUNT_1, m_creature); break; case 1: DoScriptText(SAY_TAUNT_2, m_creature); break; @@ -226,7 +226,7 @@ struct MANGOS_DLL_DECL boss_grand_warlock_nethekurseAI : public ScriptedAI void Aggro(Unit* pWho) { - switch(urand(0, 2)) + switch (urand(0, 2)) { case 0: DoScriptText(SAY_AGGRO_1, m_creature); break; case 1: DoScriptText(SAY_AGGRO_2, m_creature); break; diff --git a/scripts/outland/hellfire_citadel/shattered_halls/boss_warbringer_omrogg.cpp b/scripts/outland/hellfire_citadel/shattered_halls/boss_warbringer_omrogg.cpp index 14095e274..4a543d784 100644 --- a/scripts/outland/hellfire_citadel/shattered_halls/boss_warbringer_omrogg.cpp +++ b/scripts/outland/hellfire_citadel/shattered_halls/boss_warbringer_omrogg.cpp @@ -52,50 +52,50 @@ struct Yell uint32 creature; }; -static Yell GoCombat[]= +static Yell GoCombat[] = { - {-1540018, NPC_LEFT_HEAD}, - {-1540019, NPC_LEFT_HEAD}, - {-1540020, NPC_LEFT_HEAD}, + { -1540018, NPC_LEFT_HEAD}, + { -1540019, NPC_LEFT_HEAD}, + { -1540020, NPC_LEFT_HEAD}, }; -static Yell GoCombatDelay[]= +static Yell GoCombatDelay[] = { - {-1540021, NPC_RIGHT_HEAD}, - {-1540022, NPC_RIGHT_HEAD}, - {-1540023, NPC_RIGHT_HEAD}, + { -1540021, NPC_RIGHT_HEAD}, + { -1540022, NPC_RIGHT_HEAD}, + { -1540023, NPC_RIGHT_HEAD}, }; -static Yell Threat[]= +static Yell Threat[] = { - {-1540024, NPC_LEFT_HEAD}, - {-1540025, NPC_RIGHT_HEAD}, - {-1540026, NPC_LEFT_HEAD}, - {-1540027, NPC_LEFT_HEAD}, + { -1540024, NPC_LEFT_HEAD}, + { -1540025, NPC_RIGHT_HEAD}, + { -1540026, NPC_LEFT_HEAD}, + { -1540027, NPC_LEFT_HEAD}, }; -static Yell ThreatDelay1[]= +static Yell ThreatDelay1[] = { - {-1540028, NPC_RIGHT_HEAD}, - {-1540029, NPC_LEFT_HEAD}, - {-1540030, NPC_RIGHT_HEAD}, - {-1540031, NPC_RIGHT_HEAD}, + { -1540028, NPC_RIGHT_HEAD}, + { -1540029, NPC_LEFT_HEAD}, + { -1540030, NPC_RIGHT_HEAD}, + { -1540031, NPC_RIGHT_HEAD}, }; -static Yell ThreatDelay2[]= +static Yell ThreatDelay2[] = { - {-1540032, NPC_LEFT_HEAD}, - {-1540033, NPC_RIGHT_HEAD}, - {-1540034, NPC_LEFT_HEAD}, - {-1540035, NPC_LEFT_HEAD}, + { -1540032, NPC_LEFT_HEAD}, + { -1540033, NPC_RIGHT_HEAD}, + { -1540034, NPC_LEFT_HEAD}, + { -1540035, NPC_LEFT_HEAD}, }; -static Yell Killing[]= +static Yell Killing[] = { - {-1540036, NPC_LEFT_HEAD}, - {-1540037, NPC_RIGHT_HEAD}, + { -1540036, NPC_LEFT_HEAD}, + { -1540037, NPC_RIGHT_HEAD}, }; -static Yell KillingDelay[]= +static Yell KillingDelay[] = { - {-1540038, NPC_RIGHT_HEAD}, - {-1000000, NPC_LEFT_HEAD}, + { -1540038, NPC_RIGHT_HEAD}, + { -1000000, NPC_LEFT_HEAD}, }; struct MANGOS_DLL_DECL mob_omrogg_headsAI : public ScriptedAI @@ -237,7 +237,7 @@ struct MANGOS_DLL_DECL boss_warbringer_omroggAI : public ScriptedAI Creature* pSource = (pLeftHead->GetEntry() == Killing[m_iKilling].creature ? pLeftHead : pRightHead); - switch(m_iKilling) + switch (m_iKilling) { case 0: DoScriptText(Killing[m_iKilling].id, pSource); diff --git a/scripts/outland/hellfire_citadel/shattered_halls/boss_warchief_kargath_bladefist.cpp b/scripts/outland/hellfire_citadel/shattered_halls/boss_warchief_kargath_bladefist.cpp index 033e3f634..732d290a9 100644 --- a/scripts/outland/hellfire_citadel/shattered_halls/boss_warchief_kargath_bladefist.cpp +++ b/scripts/outland/hellfire_citadel/shattered_halls/boss_warchief_kargath_bladefist.cpp @@ -96,7 +96,7 @@ struct MANGOS_DLL_DECL boss_warchief_kargath_bladefistAI : public ScriptedAI void Aggro(Unit* pWho) { - switch(urand(0, 2)) + switch (urand(0, 2)) { case 0: DoScriptText(SAY_AGGRO1, m_creature); break; case 1: DoScriptText(SAY_AGGRO2, m_creature); break; @@ -109,7 +109,7 @@ struct MANGOS_DLL_DECL boss_warchief_kargath_bladefistAI : public ScriptedAI void JustSummoned(Creature* pSummoned) { - switch(pSummoned->GetEntry()) + switch (pSummoned->GetEntry()) { case NPC_HEARTHEN_GUARD: case NPC_SHARPSHOOTER_GUARD: @@ -189,10 +189,10 @@ struct MANGOS_DLL_DECL boss_warchief_kargath_bladefistAI : public ScriptedAI void SpawnAssassin() { - m_creature->SummonCreature(NPC_SHATTERED_ASSASSIN, AssassEntrance[0], AssassEntrance[1]+8, AssassEntrance[2], 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 24000); - m_creature->SummonCreature(NPC_SHATTERED_ASSASSIN, AssassEntrance[0], AssassEntrance[1]-8, AssassEntrance[2], 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 24000); - m_creature->SummonCreature(NPC_SHATTERED_ASSASSIN, AssassExit[0], AssassExit[1]+8, AssassExit[2], 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 24000); - m_creature->SummonCreature(NPC_SHATTERED_ASSASSIN, AssassExit[0], AssassExit[1]-8, AssassExit[2], 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 24000); + m_creature->SummonCreature(NPC_SHATTERED_ASSASSIN, AssassEntrance[0], AssassEntrance[1] + 8, AssassEntrance[2], 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 24000); + m_creature->SummonCreature(NPC_SHATTERED_ASSASSIN, AssassEntrance[0], AssassEntrance[1] - 8, AssassEntrance[2], 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 24000); + m_creature->SummonCreature(NPC_SHATTERED_ASSASSIN, AssassExit[0], AssassExit[1] + 8, AssassExit[2], 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 24000); + m_creature->SummonCreature(NPC_SHATTERED_ASSASSIN, AssassExit[0], AssassExit[1] - 8, AssassExit[2], 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 24000); } void UpdateAI(const uint32 uiDiff) @@ -238,10 +238,10 @@ struct MANGOS_DLL_DECL boss_warchief_kargath_bladefistAI : public ScriptedAI { // move in bladedance float x, y, randx, randy; - randx = (rand()%40); - randy = (rand()%40); - x = 210+ randx ; - y = -60- randy ; + randx = (rand() % 40); + randy = (rand() % 40); + x = 210 + randx ; + y = -60 - randy ; m_creature->GetMotionMaster()->MovePoint(1, x, y, m_creature->GetPositionZ()); m_uiWaitTimer = 0; } diff --git a/scripts/outland/hellfire_citadel/shattered_halls/instance_shattered_halls.cpp b/scripts/outland/hellfire_citadel/shattered_halls/instance_shattered_halls.cpp index 84acfe256..5dd1cd0ab 100644 --- a/scripts/outland/hellfire_citadel/shattered_halls/instance_shattered_halls.cpp +++ b/scripts/outland/hellfire_citadel/shattered_halls/instance_shattered_halls.cpp @@ -25,7 +25,7 @@ EndScriptData */ #include "shattered_halls.h" instance_shattered_halls::instance_shattered_halls(Map* pMap) : ScriptedInstance(pMap), - m_uiExecutionTimer(55*MINUTE*IN_MILLISECONDS), + m_uiExecutionTimer(55 * MINUTE* IN_MILLISECONDS), m_uiTeam(0), m_uiExecutionStage(0) { @@ -43,12 +43,12 @@ void instance_shattered_halls::OnPlayerEnter(Player* pPlayer) if (instance->IsRegularDifficulty() || m_uiTeam) return; - m_uiTeam = pPlayer->GetTeam(); + m_uiTeam = pPlayer->GetTeam(); - if (m_uiTeam == ALLIANCE) + if (m_uiTeam == ALLIANCE) pPlayer->SummonCreature(aSoldiersLocs[1].m_uiAllianceEntry, aSoldiersLocs[1].m_fX, aSoldiersLocs[1].m_fY, aSoldiersLocs[1].m_fZ, aSoldiersLocs[1].m_fO, TEMPSUMMON_DEAD_DESPAWN, 0); - else - pPlayer->SummonCreature(aSoldiersLocs[0].m_uiHordeEntry, aSoldiersLocs[0].m_fX, aSoldiersLocs[0].m_fY, aSoldiersLocs[0].m_fZ, aSoldiersLocs[0].m_fO, TEMPSUMMON_DEAD_DESPAWN, 0); + else + pPlayer->SummonCreature(aSoldiersLocs[0].m_uiHordeEntry, aSoldiersLocs[0].m_fX, aSoldiersLocs[0].m_fY, aSoldiersLocs[0].m_fZ, aSoldiersLocs[0].m_fO, TEMPSUMMON_DEAD_DESPAWN, 0); } void instance_shattered_halls::OnObjectCreate(GameObject* pGo) @@ -91,7 +91,7 @@ void instance_shattered_halls::OnCreatureCreate(Creature* pCreature) void instance_shattered_halls::SetData(uint32 uiType, uint32 uiData) { - switch(uiType) + switch (uiType) { case TYPE_NETHEKURSE: m_auiEncounter[uiType] = uiData; @@ -124,7 +124,7 @@ void instance_shattered_halls::SetData(uint32 uiType, uint32 uiData) pPlayer->SummonCreature(m_uiTeam == ALLIANCE ? aSoldiersLocs[i].m_uiAllianceEntry : aSoldiersLocs[i].m_uiHordeEntry, aSoldiersLocs[i].m_fX, aSoldiersLocs[i].m_fY, aSoldiersLocs[i].m_fZ, aSoldiersLocs[i].m_fO, TEMPSUMMON_DEAD_DESPAWN, 0); // Summon the executioner for 80 min; ToDo: set the flags in DB - if (Creature* pExecutioner = pPlayer->SummonCreature(NPC_EXECUTIONER, afExecutionerLoc[0], afExecutionerLoc[1], afExecutionerLoc[2], afExecutionerLoc[3], TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 80*MINUTE*IN_MILLISECONDS, true)) + if (Creature* pExecutioner = pPlayer->SummonCreature(NPC_EXECUTIONER, afExecutionerLoc[0], afExecutionerLoc[1], afExecutionerLoc[2], afExecutionerLoc[3], TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 80 * MINUTE * IN_MILLISECONDS, true)) pExecutioner->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_NON_ATTACKABLE); // cast the execution spell @@ -167,7 +167,7 @@ void instance_shattered_halls::Load(const char* chrIn) std::istringstream loadStream(chrIn); loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3]; - for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) + for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) { if (m_auiEncounter[i] == IN_PROGRESS) m_auiEncounter[i] = NOT_STARTED; @@ -212,7 +212,7 @@ void instance_shattered_halls::Update(uint32 uiDiff) if (m_uiExecutionTimer < uiDiff) { - switch(m_uiExecutionStage) + switch (m_uiExecutionStage) { case 0: // Kill the officer @@ -224,14 +224,14 @@ void instance_shattered_halls::Update(uint32 uiDiff) // Set timer for the next execution DoCastGroupDebuff(SPELL_KARGATH_EXECUTIONER_2); - m_uiExecutionTimer = 10*MINUTE*IN_MILLISECONDS; + m_uiExecutionTimer = 10 * MINUTE * IN_MILLISECONDS; break; case 1: if (Creature* pSoldier = GetSingleCreatureFromStorage(m_uiTeam == ALLIANCE ? NPC_SOLDIER_ALLIANCE_2 : NPC_SOLDIER_HORDE_2)) pSoldier->DealDamage(pSoldier, pSoldier->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); DoCastGroupDebuff(SPELL_KARGATH_EXECUTIONER_3); - m_uiExecutionTimer = 15*MINUTE*IN_MILLISECONDS; + m_uiExecutionTimer = 15 * MINUTE * IN_MILLISECONDS; break; case 2: if (Creature* pSoldier = GetSingleCreatureFromStorage(m_uiTeam == ALLIANCE ? NPC_SOLDIER_ALLIANCE_3 : NPC_SOLDIER_HORDE_3)) diff --git a/scripts/outland/hellfire_citadel/shattered_halls/shattered_halls.h b/scripts/outland/hellfire_citadel/shattered_halls/shattered_halls.h index fc193b1b6..46425b2ec 100644 --- a/scripts/outland/hellfire_citadel/shattered_halls/shattered_halls.h +++ b/scripts/outland/hellfire_citadel/shattered_halls/shattered_halls.h @@ -39,7 +39,7 @@ enum SAY_KARGATH_EXECUTE_ALLY = -1540049, SAY_KARGATH_EXECUTE_HORDE = -1540050, - //AT_NETHEKURSE = 4524, // Area trigger used for the execution event + // AT_NETHEKURSE = 4524, // Area trigger used for the execution event }; struct SpawnLocation diff --git a/scripts/outland/hellfire_peninsula.cpp b/scripts/outland/hellfire_peninsula.cpp index ed83f4854..65f6332ef 100644 --- a/scripts/outland/hellfire_peninsula.cpp +++ b/scripts/outland/hellfire_peninsula.cpp @@ -152,7 +152,7 @@ struct MANGOS_DLL_DECL npc_ancestral_wolfAI : public npc_escortAI void WaypointReached(uint32 uiPointId) { - switch(uiPointId) + switch (uiPointId) { case 0: DoScriptText(EMOTE_WOLF_LIFT_HEAD, m_creature); @@ -187,21 +187,21 @@ enum QUEST_DEMONIAC = 10838, NPC_HELLFIRE_WARDLING = 22259, - NPC_BUTTRESS = 22267, //the 4x nodes - NPC_SPAWNER = 22260, //just a dummy, not used + NPC_BUTTRESS = 22267, // the 4x nodes + NPC_SPAWNER = 22260, // just a dummy, not used MAX_BUTTRESS = 4, - TIME_TOTAL = MINUTE*10*IN_MILLISECONDS, + TIME_TOTAL = MINUTE * 10 * IN_MILLISECONDS, - SPELL_SUMMONED_DEMON = 7741, //visual spawn-in for demon - SPELL_DEMONIAC_VISITATION = 38708, //create item + SPELL_SUMMONED_DEMON = 7741, // visual spawn-in for demon + SPELL_DEMONIAC_VISITATION = 38708, // create item - SPELL_BUTTRESS_APPERANCE = 38719, //visual on 4x bunnies + the flying ones - SPELL_SUCKER_CHANNEL = 38721, //channel to the 4x nodes + SPELL_BUTTRESS_APPERANCE = 38719, // visual on 4x bunnies + the flying ones + SPELL_SUCKER_CHANNEL = 38721, // channel to the 4x nodes SPELL_SUCKER_DESPAWN_MOB = 38691 }; -//script is basic support, details like end event are not implemented +// script is basic support, details like end event are not implemented struct MANGOS_DLL_DECL npc_demoniac_scryerAI : public ScriptedAI { npc_demoniac_scryerAI(Creature* pCreature) : ScriptedAI(pCreature) @@ -221,7 +221,7 @@ struct MANGOS_DLL_DECL npc_demoniac_scryerAI : public ScriptedAI void Reset() {} - //we don't want anything to happen when attacked + // we don't want anything to happen when attacked void AttackedBy(Unit* pEnemy) {} void AttackStart(Unit* pEnemy) {} @@ -231,11 +231,11 @@ struct MANGOS_DLL_DECL npc_demoniac_scryerAI : public ScriptedAI float fAngle = 0.0f; - switch(m_uiButtressCount) + switch (m_uiButtressCount) { case 1: fAngle = 0.0f; break; - case 2: fAngle = M_PI_F+M_PI_F/2; break; - case 3: fAngle = M_PI_F/2; break; + case 2: fAngle = M_PI_F + M_PI_F / 2; break; + case 3: fAngle = M_PI_F / 2; break; case 4: fAngle = M_PI_F; break; } diff --git a/scripts/outland/nagrand.cpp b/scripts/outland/nagrand.cpp index ccfe43dd4..6775c0c7a 100644 --- a/scripts/outland/nagrand.cpp +++ b/scripts/outland/nagrand.cpp @@ -60,7 +60,7 @@ struct MANGOS_DLL_DECL mob_lumpAI : public ScriptedAI void Reset() { - m_uiResetTimer = MINUTE*IN_MILLISECONDS; + m_uiResetTimer = MINUTE * IN_MILLISECONDS; m_uiSpearThrowTimer = 2000; } @@ -77,9 +77,9 @@ struct MANGOS_DLL_DECL mob_lumpAI : public ScriptedAI void DamageTaken(Unit* pDealer, uint32& uiDamage) { - if (m_creature->GetHealth() < uiDamage || (m_creature->GetHealth() - uiDamage)*100 / m_creature->GetMaxHealth() < 30) + if (m_creature->GetHealth() < uiDamage || (m_creature->GetHealth() - uiDamage) * 100 / m_creature->GetMaxHealth() < 30) { - uiDamage = 0; //Take 0 damage + uiDamage = 0; // Take 0 damage m_creature->RemoveAllAuras(); m_creature->DeleteThreatList(); @@ -169,8 +169,8 @@ enum NPC_MURK_PUTRIFIER = 18202 }; -static float m_afAmbushA[]= {-1568.805786f, 8533.873047f, 1.958f}; -static float m_afAmbushB[]= {-1491.554321f, 8506.483398f, 1.248f}; +static float m_afAmbushA[] = { -1568.805786f, 8533.873047f, 1.958f}; +static float m_afAmbushB[] = { -1491.554321f, 8506.483398f, 1.248f}; struct MANGOS_DLL_DECL npc_maghar_captiveAI : public npc_escortAI { @@ -194,7 +194,7 @@ struct MANGOS_DLL_DECL npc_maghar_captiveAI : public npc_escortAI void WaypointReached(uint32 uiPointId) { - switch(uiPointId) + switch (uiPointId) { case 7: DoScriptText(SAY_MAG_MORE, m_creature); @@ -202,10 +202,10 @@ struct MANGOS_DLL_DECL npc_maghar_captiveAI : public npc_escortAI if (Creature* pTemp = m_creature->SummonCreature(NPC_MURK_PUTRIFIER, m_afAmbushB[0], m_afAmbushB[1], m_afAmbushB[2], 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000)) DoScriptText(SAY_MAG_MORE_REPLY, pTemp); - m_creature->SummonCreature(NPC_MURK_PUTRIFIER, m_afAmbushB[0]-2.5f, m_afAmbushB[1]-2.5f, m_afAmbushB[2], 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000); + m_creature->SummonCreature(NPC_MURK_PUTRIFIER, m_afAmbushB[0] - 2.5f, m_afAmbushB[1] - 2.5f, m_afAmbushB[2], 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000); - m_creature->SummonCreature(NPC_MURK_SCAVENGER, m_afAmbushB[0]+2.5f, m_afAmbushB[1]+2.5f, m_afAmbushB[2], 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000); - m_creature->SummonCreature(NPC_MURK_SCAVENGER, m_afAmbushB[0]+2.5f, m_afAmbushB[1]-2.5f, m_afAmbushB[2], 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000); + m_creature->SummonCreature(NPC_MURK_SCAVENGER, m_afAmbushB[0] + 2.5f, m_afAmbushB[1] + 2.5f, m_afAmbushB[2], 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000); + m_creature->SummonCreature(NPC_MURK_SCAVENGER, m_afAmbushB[0] + 2.5f, m_afAmbushB[1] - 2.5f, m_afAmbushB[2], 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000); break; case 16: DoScriptText(SAY_MAG_COMPLETE, m_creature); @@ -290,8 +290,8 @@ bool QuestAccept_npc_maghar_captive(Player* pPlayer, Creature* pCreature, const DoScriptText(SAY_MAG_START, pCreature); - pCreature->SummonCreature(NPC_MURK_RAIDER, m_afAmbushA[0]+2.5f, m_afAmbushA[1]-2.5f, m_afAmbushA[2], 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000); - pCreature->SummonCreature(NPC_MURK_PUTRIFIER, m_afAmbushA[0]-2.5f, m_afAmbushA[1]+2.5f, m_afAmbushA[2], 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000); + pCreature->SummonCreature(NPC_MURK_RAIDER, m_afAmbushA[0] + 2.5f, m_afAmbushA[1] - 2.5f, m_afAmbushA[2], 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000); + pCreature->SummonCreature(NPC_MURK_PUTRIFIER, m_afAmbushA[0] - 2.5f, m_afAmbushA[1] + 2.5f, m_afAmbushA[2], 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000); pCreature->SummonCreature(NPC_MURK_BRUTE, m_afAmbushA[0], m_afAmbushA[1], m_afAmbushA[2], 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000); } } diff --git a/scripts/outland/netherstorm.cpp b/scripts/outland/netherstorm.cpp index 8da566f25..10f9e8489 100644 --- a/scripts/outland/netherstorm.cpp +++ b/scripts/outland/netherstorm.cpp @@ -102,8 +102,8 @@ struct MANGOS_DLL_DECL npc_manaforge_control_consoleAI : public ScriptedAI /*void SpellHit(Unit *caster, const SpellEntry *spell) { - //we have no way of telling the creature was hit by spell -> got aura applied after 10-12 seconds - //then no way for the mobs to actually stop the shutdown as intended. + // we have no way of telling the creature was hit by spell -> got aura applied after 10-12 seconds + // then no way for the mobs to actually stop the shutdown as intended. if (spell->Id == SPELL_INTERRUPT_1) ... }*/ @@ -116,7 +116,7 @@ struct MANGOS_DLL_DECL npc_manaforge_control_consoleAI : public ScriptedAI if (pPlayer) { - switch(m_creature->GetEntry()) + switch (m_creature->GetEntry()) { case NPC_BNAAR_C_CONSOLE: pPlayer->FailQuest(QUEST_SHUTDOWN_BNAAR_ALDOR); @@ -145,7 +145,7 @@ struct MANGOS_DLL_DECL npc_manaforge_control_consoleAI : public ScriptedAI { Creature* pAdd = NULL; - switch(pCreature->GetEntry()) + switch (pCreature->GetEntry()) { case NPC_BNAAR_C_CONSOLE: if (urand(0, 1)) @@ -202,7 +202,7 @@ struct MANGOS_DLL_DECL npc_manaforge_control_consoleAI : public ScriptedAI { Creature* pAdd = NULL; - switch(pCreature->GetEntry()) + switch (pCreature->GetEntry()) { case NPC_BNAAR_C_CONSOLE: if (pAdd = m_creature->SummonCreature(NPC_SUNFURY_TECH, 2946.52f, 4201.42f, 163.47f, 3.54f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000)) @@ -249,7 +249,7 @@ struct MANGOS_DLL_DECL npc_manaforge_control_consoleAI : public ScriptedAI return; } - switch(m_uiPhase) + switch (m_uiPhase) { case 1: DoScriptText(EMOTE_START, m_creature, pPlayer); @@ -320,30 +320,30 @@ bool GOUse_go_manaforge_control_console(Player* pPlayer, GameObject* pGo) Creature* pManaforge = NULL; - switch(pGo->GetAreaId()) + switch (pGo->GetAreaId()) { case 3726: // b'naar if ((pPlayer->GetQuestStatus(QUEST_SHUTDOWN_BNAAR_ALDOR) == QUEST_STATUS_INCOMPLETE - || pPlayer->GetQuestStatus(QUEST_SHUTDOWN_BNAAR_SCRYERS) == QUEST_STATUS_INCOMPLETE) - && pPlayer->HasItemCount(ITEM_BNAAR_ACESS_CRYSTAL, 1)) + || pPlayer->GetQuestStatus(QUEST_SHUTDOWN_BNAAR_SCRYERS) == QUEST_STATUS_INCOMPLETE) + && pPlayer->HasItemCount(ITEM_BNAAR_ACESS_CRYSTAL, 1)) pManaforge = pPlayer->SummonCreature(NPC_BNAAR_C_CONSOLE, 2918.95f, 4189.98f, 161.88f, 0.34f, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 125000); break; case 3730: // coruu if ((pPlayer->GetQuestStatus(QUEST_SHUTDOWN_CORUU_ALDOR) == QUEST_STATUS_INCOMPLETE - || pPlayer->GetQuestStatus(QUEST_SHUTDOWN_CORUU_SCRYERS) == QUEST_STATUS_INCOMPLETE) - && pPlayer->HasItemCount(ITEM_CORUU_ACESS_CRYSTAL, 1)) + || pPlayer->GetQuestStatus(QUEST_SHUTDOWN_CORUU_SCRYERS) == QUEST_STATUS_INCOMPLETE) + && pPlayer->HasItemCount(ITEM_CORUU_ACESS_CRYSTAL, 1)) pManaforge = pPlayer->SummonCreature(NPC_CORUU_C_CONSOLE, 2426.77f, 2750.38f, 133.24f, 2.14f, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 125000); break; case 3734: // duro if ((pPlayer->GetQuestStatus(QUEST_SHUTDOWN_DURO_ALDOR) == QUEST_STATUS_INCOMPLETE - || pPlayer->GetQuestStatus(QUEST_SHUTDOWN_DURO_SCRYERS) == QUEST_STATUS_INCOMPLETE) - && pPlayer->HasItemCount(ITEM_DURO_ACESS_CRYSTAL, 1)) + || pPlayer->GetQuestStatus(QUEST_SHUTDOWN_DURO_SCRYERS) == QUEST_STATUS_INCOMPLETE) + && pPlayer->HasItemCount(ITEM_DURO_ACESS_CRYSTAL, 1)) pManaforge = pPlayer->SummonCreature(NPC_DURO_C_CONSOLE, 2976.48f, 2183.29f, 163.20f, 1.85f, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 125000); break; case 3722: // ara if ((pPlayer->GetQuestStatus(QUEST_SHUTDOWN_ARA_ALDOR) == QUEST_STATUS_INCOMPLETE - || pPlayer->GetQuestStatus(QUEST_SHUTDOWN_ARA_SCRYERS) == QUEST_STATUS_INCOMPLETE) - && pPlayer->HasItemCount(ITEM_ARA_ACESS_CRYSTAL, 1)) + || pPlayer->GetQuestStatus(QUEST_SHUTDOWN_ARA_SCRYERS) == QUEST_STATUS_INCOMPLETE) + && pPlayer->HasItemCount(ITEM_ARA_ACESS_CRYSTAL, 1)) pManaforge = pPlayer->SummonCreature(NPC_ARA_C_CONSOLE, 4013.71f, 4028.76f, 192.10f, 1.25f, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 125000); break; } @@ -390,7 +390,7 @@ enum struct MANGOS_DLL_DECL npc_commander_dawnforgeAI : public ScriptedAI { - npc_commander_dawnforgeAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset (); } + npc_commander_dawnforgeAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } ObjectGuid m_playerGuid; ObjectGuid m_ardonisGuid; @@ -534,7 +534,7 @@ struct MANGOS_DLL_DECL npc_commander_dawnforgeAI : public ScriptedAI m_uiPhaseTimer = 6000; break; case 6: - switch(m_uiPhaseSubphase) + switch (m_uiPhaseSubphase) { case 0: TurnToPathaleonsImage(); @@ -550,7 +550,7 @@ struct MANGOS_DLL_DECL npc_commander_dawnforgeAI : public ScriptedAI } break; case 7: - switch(m_uiPhaseSubphase) + switch (m_uiPhaseSubphase) { case 0: DoScriptText(SAY_PATHALEON_THE_CALCULATOR_IMAGE_2, pPathaleon); @@ -639,7 +639,7 @@ struct MANGOS_DLL_DECL npc_bessyAI : public npc_escortAI void WaypointReached(uint32 uiPointId) { - switch(uiPointId) + switch (uiPointId) { case 3: m_creature->SummonCreature(NPC_TORMENTED_SOUL, 2449.67f, 2183.11f, 96.85f, 6.20f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000); @@ -680,7 +680,7 @@ bool QuestAccept_npc_bessy(Player* pPlayer, Creature* pCreature, const Quest* pQ CreatureAI* GetAI_npc_bessy(Creature* pCreature) { - return new npc_bessyAI(pCreature); + return new npc_bessyAI(pCreature); } /*###### @@ -735,7 +735,7 @@ struct MANGOS_DLL_DECL npc_maxx_a_million_escortAI : public npc_escortAI { case 1: // turn 90 degrees , towards doorway. - m_creature->SetFacingTo(m_creature->GetOrientation() + (M_PI_F/2)); + m_creature->SetFacingTo(m_creature->GetOrientation() + (M_PI_F / 2)); DoScriptText(SAY_START, m_creature); m_uiSubEventTimer = 3000; m_uiSubEvent = 1; @@ -788,7 +788,7 @@ struct MANGOS_DLL_DECL npc_maxx_a_million_escortAI : public npc_escortAI switch (m_uiSubEvent) { case 1: // Wait time before Say - if (Creature* pAlley = GetClosestCreatureWithEntry(m_creature, NPC_BOT_SPECIALIST_ALLEY, INTERACTION_DISTANCE*2)) + if (Creature* pAlley = GetClosestCreatureWithEntry(m_creature, NPC_BOT_SPECIALIST_ALLEY, INTERACTION_DISTANCE * 2)) { m_alleyGuid = pAlley->GetObjectGuid(); DoScriptText(SAY_ALLEY_FAREWELL, pAlley); @@ -901,7 +901,7 @@ enum SAY_FINISH_2 = -1000900, SPELL_ETHEREAL_TELEPORT = 34427, - SPELL_PROTECTORATE = 35679, // dummy aura applied on player + SPELL_PROTECTORATE = 35679, // dummy aura applied on player NPC_NEXUS_STALKER = 20474, NPC_ARCHON = 20458, @@ -966,7 +966,7 @@ struct MANGOS_DLL_DECL npc_protectorate_demolitionistAI : public npc_escortAI void WaypointReached(uint32 uiPointId) { - switch(uiPointId) + switch (uiPointId) { case 0: DoScriptText(SAY_INTRO, m_creature); @@ -1082,7 +1082,7 @@ struct MANGOS_DLL_DECL npc_captured_vanguardAI : public npc_escortAI void WaypointReached(uint32 uiPointId) { - switch(uiPointId) + switch (uiPointId) { case 15: if (Player* pPlayer = GetPlayerForEscort()) diff --git a/scripts/outland/shadowmoon_valley.cpp b/scripts/outland/shadowmoon_valley.cpp index eb612e534..44cba7c2c 100644 --- a/scripts/outland/shadowmoon_valley.cpp +++ b/scripts/outland/shadowmoon_valley.cpp @@ -329,7 +329,7 @@ struct MANGOS_DLL_DECL npc_dragonmaw_peonAI : public ScriptedAI m_uiEatTimer = 2000; m_uiPoisonTimer = 3000; - switch(urand(0, 4)) + switch (urand(0, 4)) { case 0: DoScriptText(SAY_PEON_1, m_creature); break; case 1: DoScriptText(SAY_PEON_2, m_creature); break; @@ -358,7 +358,7 @@ struct MANGOS_DLL_DECL npc_dragonmaw_peonAI : public ScriptedAI uint32 uiGameobjectEntry = pSpell->EffectMiscValue[EFFECT_INDEX_0]; // this can fail, but very low chance - pMutton = GetClosestGameObjectWithEntry(pPlayer, uiGameobjectEntry, 2*INTERACTION_DISTANCE); + pMutton = GetClosestGameObjectWithEntry(pPlayer, uiGameobjectEntry, 2 * INTERACTION_DISTANCE); } if (pMutton) @@ -454,10 +454,10 @@ enum QUEST_ESCAPE_COILSCAR = 10451, NPC_COILSKAR_ASSASSIN = 21044, - FACTION_EARTHEN = 1726 //guessed + FACTION_EARTHEN = 1726 // guessed }; -//this script needs verification +// this script needs verification struct MANGOS_DLL_DECL npc_wildaAI : public npc_escortAI { npc_wildaAI(Creature* pCreature) : npc_escortAI(pCreature) { Reset(); } @@ -476,7 +476,7 @@ struct MANGOS_DLL_DECL npc_wildaAI : public npc_escortAI if (!pPlayer) return; - switch(uiPointId) + switch (uiPointId) { case 13: DoScriptText(SAY_WIL_PROGRESS1, m_creature, pPlayer); @@ -534,10 +534,10 @@ struct MANGOS_DLL_DECL npc_wildaAI : public npc_escortAI pSummoned->AI()->AttackStart(m_creature); } - //this is very unclear, random say without no real relevance to script/event + // this is very unclear, random say without no real relevance to script/event void DoRandomSay() { - switch(urand(0, 2)) + switch (urand(0, 2)) { case 0: DoScriptText(SAY_WIL_PROGRESS2, m_creature); break; case 1: DoScriptText(SAY_WIL_PROGRESS4, m_creature); break; @@ -547,7 +547,7 @@ struct MANGOS_DLL_DECL npc_wildaAI : public npc_escortAI void DoSpawnAssassin() { - //unknown where they actually appear + // unknown where they actually appear float fX, fY, fZ; m_creature->GetRandomPoint(m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), 15.0f, fX, fY, fZ); @@ -556,15 +556,15 @@ struct MANGOS_DLL_DECL npc_wildaAI : public npc_escortAI void Aggro(Unit* pWho) { - //don't always use + // don't always use if (urand(0, 4)) return; - //only aggro text if not player + // only aggro text if not player if (pWho->GetTypeId() != TYPEID_PLAYER) { - //appears to be random - switch(urand(0, 3)) + // appears to be random + switch (urand(0, 3)) { case 0: DoScriptText(SAY_WIL_AGGRO1, m_creature, pWho); break; case 1: DoScriptText(SAY_WIL_AGGRO2, m_creature, pWho); break; @@ -577,7 +577,7 @@ struct MANGOS_DLL_DECL npc_wildaAI : public npc_escortAI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - //TODO: add more abilities + // TODO: add more abilities if (m_creature->GetHealthPercent() <= 30.0f) { if (m_uiHealingTimer < uiDiff) @@ -656,7 +656,7 @@ struct TorlothCinematic uint32 uiTimer; }; -static TorlothCinematic TorlothAnim[]= +static TorlothCinematic TorlothAnim[] = { {SAY_TORLOTH_DIALOGUE1, TORLOTH, 2000}, {SAY_ILLIDAN_DIALOGUE, LORD_ILLIDAN, 7000}, @@ -675,24 +675,24 @@ struct Location float fOrient; }; -static Location SpawnLocation[]= +static Location SpawnLocation[] = { - {-4615.8556f, 1342.2532f, 139.9f, 1.612f}, // Illidari Soldier - {-4598.9365f, 1377.3182f, 139.9f, 3.917f}, // Illidari Soldier - {-4598.4697f, 1360.8999f, 139.9f, 2.427f}, // Illidari Soldier - {-4589.3599f, 1369.1061f, 139.9f, 3.165f}, // Illidari Soldier - {-4608.3477f, 1386.0076f, 139.9f, 4.108f}, // Illidari Soldier - {-4633.1889f, 1359.8033f, 139.9f, 0.949f}, // Illidari Soldier - {-4623.5791f, 1351.4574f, 139.9f, 0.971f}, // Illidari Soldier - {-4607.2988f, 1351.6099f, 139.9f, 2.416f}, // Illidari Soldier - {-4633.7764f, 1376.0417f, 139.9f, 5.608f}, // Illidari Soldier - {-4600.2461f, 1369.1240f, 139.9f, 3.056f}, // Illidari Mind Breaker - {-4631.7808f, 1367.9459f, 139.9f, 0.020f}, // Illidari Mind Breaker - {-4600.2461f, 1369.1240f, 139.9f, 3.056f}, // Illidari Highlord - {-4631.7808f, 1367.9459f, 139.9f, 0.020f}, // Illidari Highlord - {-4615.5586f, 1353.0031f, 139.9f, 1.540f}, // Illidari Highlord - {-4616.4736f, 1384.2170f, 139.9f, 4.971f}, // Illidari Highlord - {-4627.1240f, 1378.8752f, 139.9f, 2.544f} // Torloth The Magnificent + { -4615.8556f, 1342.2532f, 139.9f, 1.612f}, // Illidari Soldier + { -4598.9365f, 1377.3182f, 139.9f, 3.917f}, // Illidari Soldier + { -4598.4697f, 1360.8999f, 139.9f, 2.427f}, // Illidari Soldier + { -4589.3599f, 1369.1061f, 139.9f, 3.165f}, // Illidari Soldier + { -4608.3477f, 1386.0076f, 139.9f, 4.108f}, // Illidari Soldier + { -4633.1889f, 1359.8033f, 139.9f, 0.949f}, // Illidari Soldier + { -4623.5791f, 1351.4574f, 139.9f, 0.971f}, // Illidari Soldier + { -4607.2988f, 1351.6099f, 139.9f, 2.416f}, // Illidari Soldier + { -4633.7764f, 1376.0417f, 139.9f, 5.608f}, // Illidari Soldier + { -4600.2461f, 1369.1240f, 139.9f, 3.056f}, // Illidari Mind Breaker + { -4631.7808f, 1367.9459f, 139.9f, 0.020f}, // Illidari Mind Breaker + { -4600.2461f, 1369.1240f, 139.9f, 3.056f}, // Illidari Highlord + { -4631.7808f, 1367.9459f, 139.9f, 0.020f}, // Illidari Highlord + { -4615.5586f, 1353.0031f, 139.9f, 1.540f}, // Illidari Highlord + { -4616.4736f, 1384.2170f, 139.9f, 4.971f}, // Illidari Highlord + { -4627.1240f, 1378.8752f, 139.9f, 2.544f} // Torloth The Magnificent }; struct WaveData @@ -705,7 +705,7 @@ struct WaveData int32 iTextId; }; -static WaveData WavesInfo[]= +static WaveData WavesInfo[] = { // Illidari Soldier {9, 0, NPC_ILLIDARI_SOLDIER, 10000, 7000, SAY_ILLIDAN_SUMMON1}, @@ -782,7 +782,7 @@ struct MANGOS_DLL_DECL mob_torlothAI : public ScriptedAI m_uiAnimationTimer = TorlothAnim[m_uiAnimationCount].uiTimer; - switch(m_uiAnimationCount) + switch (m_uiAnimationCount) { case 0: m_creature->SetStandState(UNIT_STAND_STATE_KNEEL); @@ -925,7 +925,7 @@ struct MANGOS_DLL_DECL npc_lord_illidan_stormrageAI : public Scripted_NoMovement uint8 uiFelguardCount = 0; uint8 uiDreadlordCount = 0; - for(uint8 i = 0; i < uiCount; ++i) + for (uint8 i = 0; i < uiCount; ++i) { float fLocX, fLocY, fLocZ, fOrient; fLocX = SpawnLocation[uiLocIndex + i].fLocX; @@ -939,7 +939,7 @@ struct MANGOS_DLL_DECL npc_lord_illidan_stormrageAI : public Scripted_NoMovement if (m_uiWaveCount) // only in first wave continue; - if (!urand(0,2) && uiFelguardCount < 2) + if (!urand(0, 2) && uiFelguardCount < 2) { pSpawn->SetDisplayId(MODEL_ID_FELGUARD); ++uiFelguardCount; @@ -1010,7 +1010,7 @@ struct MANGOS_DLL_DECL npc_lord_illidan_stormrageAI : public Scripted_NoMovement uint8 uiDeadMemberCount = 0; uint8 uiFailedMemberCount = 0; - for(GroupReference* pRef = pEventGroup->GetFirstMember(); pRef != NULL; pRef = pRef->next()) + for (GroupReference* pRef = pEventGroup->GetFirstMember(); pRef != NULL; pRef = pRef->next()) { if (Player* pMember = pRef->getSource()) { @@ -1041,7 +1041,7 @@ struct MANGOS_DLL_DECL npc_lord_illidan_stormrageAI : public Scripted_NoMovement if (pEventGroup->GetMembersCount() == uiDeadMemberCount) { - for(GroupReference* pRef = pEventGroup->GetFirstMember(); pRef != NULL; pRef = pRef->next()) + for (GroupReference* pRef = pEventGroup->GetFirstMember(); pRef != NULL; pRef = pRef->next()) { if (Player* pMember = pRef->getSource()) { @@ -1094,7 +1094,7 @@ struct MANGOS_DLL_DECL npc_lord_illidan_stormrageAI : public Scripted_NoMovement } }; -CreatureAI* GetAI_npc_lord_illidan_stormrage(Creature* (pCreature)) +CreatureAI* GetAI_npc_lord_illidan_stormrage(Creature * (pCreature)) { return new npc_lord_illidan_stormrageAI(pCreature); } @@ -1181,7 +1181,7 @@ bool EffectDummyCreature_npc_totem_of_spirits(Unit* pCaster, uint32 uiSpellId, S if (uiEffIndex != EFFECT_INDEX_0) return false; - switch(uiSpellId) + switch (uiSpellId) { case SPELL_EARTH_CAPTURED: { @@ -1229,7 +1229,7 @@ bool EffectAuraDummy_npc_totem_of_spirits(const Aura* pAura, bool bApply) return true; // Need to expect the enraged elementals to be caster of aura - switch(pCaster->GetEntry()) + switch (pCaster->GetEntry()) { case NPC_EARTH_SPIRIT: pCreature->CastSpell(pCreature, SPELL_EARTH_CAPTURED, true); @@ -1257,7 +1257,7 @@ bool ProcessEventId_event_spell_soul_captured_credit(uint32 uiEventId, Object* p if (!pOwner) return true; - switch(uiEventId) + switch (uiEventId) { case EVENT_EARTH: pOwner->KilledMonsterCredit(NPC_CREDIT_MARKER_EARTH); @@ -1301,17 +1301,17 @@ enum GOSSIP_TEXT_ID_ORONOK = 10421, // spells - some are already defined above - //SPELL_CHAIN_LIGHTNING = 16006, + // SPELL_CHAIN_LIGHTNING = 16006, SPELL_EARTHBIND_TOTEM = 15786, - //SPELL_FROST_SHOCK = 12548, - //SPELL_HEALING_WAVE = 12491, + // SPELL_FROST_SHOCK = 12548, + // SPELL_HEALING_WAVE = 12491, // npcs NPC_ORONOK_TORN_HEART = 21685, NPC_GROMTOR_SON_OF_ORONOK = 21687, NPC_BORAK_SON_OF_ORONOK = 21686, NPC_CYRUKH_THE_FIRELORD = 21181, - //NPC_EARTH_SPIRIT = 21050, + // NPC_EARTH_SPIRIT = 21050, NPC_REDEEMED_SPIRIT_OF_EARTH = 21739, NPC_REDEEMED_SPIRIT_OF_FIRE = 21740, NPC_REDEEMED_SPIRIT_OF_AIR = 21738, @@ -1353,13 +1353,13 @@ struct EventLocations const static EventLocations aDamnationLocations[] = { - {-3605.09f, 1885.47f, 47.24f, 1.81f}, // 0 fire spirit summon loc - {-3600.68f, 1886.58f, 47.24f, 1.81f}, // 1 earth spirit summon loc - {-3597.19f, 1887.46f, 47.24f, 1.77f}, // 2 water spirit summon loc - {-3593.18f, 1888.27f, 47.24f, 1.77f}, // 3 air spirit summon loc - {-3595.36f, 1869.78f, 47.24f}, // 4 fight ready move loc - {-3635.90f, 1860.94f, 52.93f}, // 5 elementals move loc - {-3599.71f, 1897.94f, 47.24f} // 6 epilogue move loc + { -3605.09f, 1885.47f, 47.24f, 1.81f}, // 0 fire spirit summon loc + { -3600.68f, 1886.58f, 47.24f, 1.81f}, // 1 earth spirit summon loc + { -3597.19f, 1887.46f, 47.24f, 1.77f}, // 2 water spirit summon loc + { -3593.18f, 1888.27f, 47.24f, 1.77f}, // 3 air spirit summon loc + { -3595.36f, 1869.78f, 47.24f}, // 4 fight ready move loc + { -3635.90f, 1860.94f, 52.93f}, // 5 elementals move loc + { -3599.71f, 1897.94f, 47.24f} // 6 epilogue move loc }; struct MANGOS_DLL_DECL npc_spawned_oronok_tornheartAI : public ScriptedAI, private DialogueHelper @@ -1397,7 +1397,7 @@ struct MANGOS_DLL_DECL npc_spawned_oronok_tornheartAI : public ScriptedAI, priva void JustDidDialogueStep(int32 iEntry) { - switch(iEntry) + switch (iEntry) { case NPC_CYRUKH_THE_FIRELORD: // Set them in motion @@ -1406,12 +1406,12 @@ struct MANGOS_DLL_DECL npc_spawned_oronok_tornheartAI : public ScriptedAI, priva if (Creature* pBorak = GetClosestCreatureWithEntry(m_creature, NPC_BORAK_SON_OF_ORONOK, 10.0f)) { m_borakGuid = pBorak->GetObjectGuid(); - pBorak->GetMotionMaster()->MoveFollow(m_creature, 5.0f, -M_PI_F/2); + pBorak->GetMotionMaster()->MoveFollow(m_creature, 5.0f, -M_PI_F / 2); } if (Creature* pGromtor = GetClosestCreatureWithEntry(m_creature, NPC_GROMTOR_SON_OF_ORONOK, 10.0f)) { m_gromtorGuid = pGromtor->GetObjectGuid(); - pGromtor->GetMotionMaster()->MoveFollow(m_creature, 5.0f, M_PI_F/2); + pGromtor->GetMotionMaster()->MoveFollow(m_creature, 5.0f, M_PI_F / 2); } break; case NPC_EARTHMENDER_TORLOK: @@ -1435,7 +1435,7 @@ struct MANGOS_DLL_DECL npc_spawned_oronok_tornheartAI : public ScriptedAI, priva case NPC_ORONOK_TORN_HEART: if (GameObject* pMark = GetClosestGameObjectWithEntry(m_creature, GO_MARK_OF_KAELTHAS, 30.0f)) { - pMark->SetRespawnTime(5*MINUTE); + pMark->SetRespawnTime(5 * MINUTE); pMark->Refresh(); } if (Creature* pBorak = m_creature->GetMap()->GetCreature(m_borakGuid)) @@ -1596,7 +1596,7 @@ bool GossipHello_npc_spawned_oronok_tornheart(Player* pPlayer, Creature* pCreatu { if (pPlayer->GetQuestStatus(QUEST_CIPHER_OF_DAMNATION) == QUEST_STATUS_INCOMPLETE) { - pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_FIGHT, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_FIGHT, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXT_ID_ORONOK, pCreature->GetObjectGuid()); } else @@ -1607,7 +1607,7 @@ bool GossipHello_npc_spawned_oronok_tornheart(Player* pPlayer, Creature* pCreatu bool GossipSelect_npc_spawned_oronok_tornheart(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) { - if (uiAction == GOSSIP_ACTION_INFO_DEF+1) + if (uiAction == GOSSIP_ACTION_INFO_DEF + 1) { // Note: this movement expects MMaps. DoScriptText(SAY_ORONOK_ELEMENTS, pCreature); diff --git a/scripts/outland/shattrath_city.cpp b/scripts/outland/shattrath_city.cpp index e2a0b3780..5c9db0bd3 100644 --- a/scripts/outland/shattrath_city.cpp +++ b/scripts/outland/shattrath_city.cpp @@ -79,7 +79,7 @@ struct MANGOS_DLL_DECL npc_dirty_larryAI : public ScriptedAI m_uiSayTimer = 1000; m_uiStep = 0; - //expect database to have correct faction (1194) and then only unit flags set/remove needed + // expect database to have correct faction (1194) and then only unit flags set/remove needed m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PASSIVE); } @@ -150,7 +150,7 @@ struct MANGOS_DLL_DECL npc_dirty_larryAI : public ScriptedAI return 0; } - switch(uiStep) + switch (uiStep) { case 1: DoScriptText(SAY_START, m_creature, pPlayer); @@ -190,7 +190,7 @@ struct MANGOS_DLL_DECL npc_dirty_larryAI : public ScriptedAI if (uiDamage < m_creature->GetHealth()) return; - //damage will kill, this is pretty much the same as 1%HP left + // damage will kill, this is pretty much the same as 1%HP left if (bEvent) { uiDamage = 0; @@ -230,7 +230,7 @@ bool GossipHello_npc_dirty_larry(Player* pPlayer, Creature* pCreature) pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); if (pPlayer->GetQuestStatus(QUEST_WHAT_BOOK) == QUEST_STATUS_INCOMPLETE) - pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_BOOK, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_BOOK, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); return true; @@ -238,7 +238,7 @@ bool GossipHello_npc_dirty_larry(Player* pPlayer, Creature* pCreature) bool GossipSelect_npc_dirty_larry(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) { - if (uiAction == GOSSIP_ACTION_INFO_DEF+1) + if (uiAction == GOSSIP_ACTION_INFO_DEF + 1) { if (npc_dirty_larryAI* pLarryAI = dynamic_cast(pCreature->AI())) pLarryAI->StartEvent(pPlayer); @@ -337,7 +337,7 @@ struct MANGOS_DLL_DECL npc_khadgars_servantAI : public npc_escortAI { if (!m_uiRandomTalkCooldown && pWho->GetTypeId() == TYPEID_UNIT && m_creature->IsWithinDistInMap(pWho, 10.0f)) { - switch(pWho->GetEntry()) + switch (pWho->GetEntry()) { case NPC_HAGGARD: if (Player* pPlayer = GetPlayerForEscort()) @@ -368,7 +368,7 @@ struct MANGOS_DLL_DECL npc_khadgars_servantAI : public npc_escortAI { m_uiPointId = uiPointId; - switch(uiPointId) + switch (uiPointId) { case 0: if (Creature* pKhadgar = GetClosestCreatureWithEntry(m_creature, NPC_KHADGAR, 10.0f)) @@ -415,11 +415,11 @@ struct MANGOS_DLL_DECL npc_khadgars_servantAI : public npc_escortAI if (!pPlayer) return; - switch(m_uiPointId) + switch (m_uiPointId) { - case 5: //to lower city + case 5: // to lower city { - switch(m_uiTalkCount) + switch (m_uiTalkCount) { case 1: DoScriptText(SAY_KHAD_SERV_1, m_creature, pPlayer); @@ -437,9 +437,9 @@ struct MANGOS_DLL_DECL npc_khadgars_servantAI : public npc_escortAI } break; } - case 24: //in lower city + case 24: // in lower city { - switch(m_uiTalkCount) + switch (m_uiTalkCount) { case 5: if (Creature* pShanir = GetClosestCreatureWithEntry(m_creature, NPC_SHANIR, 15.0f)) @@ -457,9 +457,9 @@ struct MANGOS_DLL_DECL npc_khadgars_servantAI : public npc_escortAI } break; } - case 50: //outside + case 50: // outside { - switch(m_uiTalkCount) + switch (m_uiTalkCount) { case 8: DoScriptText(SAY_KHAD_SERV_8, m_creature, pPlayer); @@ -477,9 +477,9 @@ struct MANGOS_DLL_DECL npc_khadgars_servantAI : public npc_escortAI } break; } - case 63: //scryer + case 63: // scryer { - switch(m_uiTalkCount) + switch (m_uiTalkCount) { case 12: DoScriptText(SAY_KHAD_SERV_12, m_creature, pPlayer); @@ -491,9 +491,9 @@ struct MANGOS_DLL_DECL npc_khadgars_servantAI : public npc_escortAI } break; } - case 74: //aldor + case 74: // aldor { - switch(m_uiTalkCount) + switch (m_uiTalkCount) { case 14: DoScriptText(SAY_KHAD_SERV_14, m_creature, pPlayer); @@ -511,9 +511,9 @@ struct MANGOS_DLL_DECL npc_khadgars_servantAI : public npc_escortAI } break; } - case 75: //a'dal + case 75: // a'dal { - switch(m_uiTalkCount) + switch (m_uiTalkCount) { case 18: DoScriptText(SAY_KHAD_SERV_18, m_creature, pPlayer); @@ -568,13 +568,13 @@ struct MANGOS_DLL_DECL npc_salsalabimAI : public ScriptedAI m_uiMagneticPullTimer = 15000; } - void DamageTaken(Unit* pDoneBy, uint32 &uiDamage) + void DamageTaken(Unit* pDoneBy, uint32& uiDamage) { if (pDoneBy->GetTypeId() == TYPEID_PLAYER) { if (m_creature->GetHealthPercent() < 20.0f) { - ((Player*)pDoneBy)->GroupEventHappens(QUEST_10004,m_creature); + ((Player*)pDoneBy)->GroupEventHappens(QUEST_10004, m_creature); uiDamage = 0; EnterEvadeMode(); } diff --git a/scripts/outland/tempest_keep/arcatraz/arcatraz.cpp b/scripts/outland/tempest_keep/arcatraz/arcatraz.cpp index a82b6e4a9..bd220d285 100644 --- a/scripts/outland/tempest_keep/arcatraz/arcatraz.cpp +++ b/scripts/outland/tempest_keep/arcatraz/arcatraz.cpp @@ -200,12 +200,12 @@ struct MANGOS_DLL_DECL npc_millhouse_manastormAI : public ScriptedAI, private Di { if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_PYROBLAST) == CAST_OK) { - m_uiPyroblastTimer = 40000; - DoScriptText(SAY_PYRO, m_creature); + m_uiPyroblastTimer = 40000; + DoScriptText(SAY_PYRO, m_creature); } } else - m_uiPyroblastTimer -=uiDiff; + m_uiPyroblastTimer -= uiDiff; if (m_uiFireballTimer < uiDiff) { @@ -213,7 +213,7 @@ struct MANGOS_DLL_DECL npc_millhouse_manastormAI : public ScriptedAI, private Di m_uiFireballTimer = 4000; } else - m_uiFireballTimer -=uiDiff; + m_uiFireballTimer -= uiDiff; if (m_uiFrostBoltTimer < uiDiff) { diff --git a/scripts/outland/tempest_keep/arcatraz/boss_harbinger_skyriss.cpp b/scripts/outland/tempest_keep/arcatraz/boss_harbinger_skyriss.cpp index fb3f1843e..c90149022 100644 --- a/scripts/outland/tempest_keep/arcatraz/boss_harbinger_skyriss.cpp +++ b/scripts/outland/tempest_keep/arcatraz/boss_harbinger_skyriss.cpp @@ -88,7 +88,7 @@ struct MANGOS_DLL_DECL boss_harbinger_skyrissAI : public ScriptedAI void KilledUnit(Unit* pVictim) { - //won't yell killing pet/other unit + // won't yell killing pet/other unit if (pVictim->GetTypeId() != TYPEID_PLAYER) return; @@ -107,7 +107,7 @@ struct MANGOS_DLL_DECL boss_harbinger_skyrissAI : public ScriptedAI return; // Check if creature is below 66% or 33%; Also don't allow it to split the third time - if (m_creature->GetHealthPercent() < 100-33*m_uiSplitPhase && m_creature->GetHealthPercent() > 5.0f) + if (m_creature->GetHealthPercent() < 100 - 33 * m_uiSplitPhase && m_creature->GetHealthPercent() > 5.0f) { DoCastSpellIfCan(m_creature, m_uiSplitPhase == 1 ? SPELL_66_ILLUSION : SPELL_33_ILLUSION, CAST_INTERRUPT_PREVIOUS); DoScriptText(SAY_IMAGE, m_creature); @@ -124,7 +124,7 @@ struct MANGOS_DLL_DECL boss_harbinger_skyrissAI : public ScriptedAI m_uiMindRendTimer = 8000; } else - m_uiMindRendTimer -=uiDiff; + m_uiMindRendTimer -= uiDiff; if (m_uiFearTimer < uiDiff) { @@ -139,7 +139,7 @@ struct MANGOS_DLL_DECL boss_harbinger_skyrissAI : public ScriptedAI } } else - m_uiFearTimer -=uiDiff; + m_uiFearTimer -= uiDiff; if (m_uiDominationTimer < uiDiff) { @@ -153,7 +153,7 @@ struct MANGOS_DLL_DECL boss_harbinger_skyrissAI : public ScriptedAI } } else - m_uiDominationTimer -=uiDiff; + m_uiDominationTimer -= uiDiff; if (!m_bIsRegularMode) { @@ -167,7 +167,7 @@ struct MANGOS_DLL_DECL boss_harbinger_skyrissAI : public ScriptedAI m_uiManaBurnTimer = urand(16000, 32000); } else - m_uiManaBurnTimer -=uiDiff; + m_uiManaBurnTimer -= uiDiff; } DoMeleeAttackIfReady(); diff --git a/scripts/outland/tempest_keep/arcatraz/instance_arcatraz.cpp b/scripts/outland/tempest_keep/arcatraz/instance_arcatraz.cpp index 3c31c85b6..f5939bdb5 100644 --- a/scripts/outland/tempest_keep/arcatraz/instance_arcatraz.cpp +++ b/scripts/outland/tempest_keep/arcatraz/instance_arcatraz.cpp @@ -111,7 +111,7 @@ void instance_arcatraz::OnPlayerEnter(Player* pPlayer) void instance_arcatraz::OnObjectCreate(GameObject* pGo) { - switch(pGo->GetEntry()) + switch (pGo->GetEntry()) { case GO_CORE_SECURITY_FIELD_ALPHA: if (m_auiEncounter[2] == DONE) @@ -171,7 +171,7 @@ void instance_arcatraz::OnCreatureCreate(Creature* pCreature) void instance_arcatraz::SetData(uint32 uiType, uint32 uiData) { - switch(uiType) + switch (uiType) { case TYPE_ENTRANCE: case TYPE_ZEREKETH: @@ -290,7 +290,7 @@ void instance_arcatraz::SetData(uint32 uiType, uint32 uiData) std::ostringstream saveStream; saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2] << " " - << m_auiEncounter[3] << " " << m_auiEncounter[4]; + << m_auiEncounter[3] << " " << m_auiEncounter[4]; m_strInstData = saveStream.str(); @@ -319,9 +319,9 @@ void instance_arcatraz::Load(const char* chrIn) std::istringstream loadStream(chrIn); loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3] - >> m_auiEncounter[4]; + >> m_auiEncounter[4]; - for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) + for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) { if (m_auiEncounter[i] == IN_PROGRESS) m_auiEncounter[i] = NOT_STARTED; diff --git a/scripts/outland/tempest_keep/botanica/boss_high_botanist_freywinn.cpp b/scripts/outland/tempest_keep/botanica/boss_high_botanist_freywinn.cpp index 33f28452e..71a13dd58 100644 --- a/scripts/outland/tempest_keep/botanica/boss_high_botanist_freywinn.cpp +++ b/scripts/outland/tempest_keep/botanica/boss_high_botanist_freywinn.cpp @@ -104,7 +104,7 @@ struct MANGOS_DLL_DECL boss_high_botanist_freywinnAI : public ScriptedAI // Wrapper to summon one seedling void DoSummonSeedling() { - switch(urand(0, 3)) + switch (urand(0, 3)) { case 0: DoCastSpellIfCan(m_creature, SPELL_PLANT_WHITE); break; case 1: DoCastSpellIfCan(m_creature, SPELL_PLANT_GREEN); break; @@ -132,7 +132,7 @@ struct MANGOS_DLL_DECL boss_high_botanist_freywinnAI : public ScriptedAI { if (DoCastSpellIfCan(m_creature, SPELL_TRANQUILITY) == CAST_OK) { - // Note: This should remove only negative auras + // Note: This should remove only negative auras m_creature->RemoveAllAuras(); DoCastSpellIfCan(m_creature, SPELL_TREE_FORM, CAST_TRIGGERED); diff --git a/scripts/outland/tempest_keep/botanica/boss_laj.cpp b/scripts/outland/tempest_keep/botanica/boss_laj.cpp index 92aeae53c..3e5e78641 100644 --- a/scripts/outland/tempest_keep/botanica/boss_laj.cpp +++ b/scripts/outland/tempest_keep/botanica/boss_laj.cpp @@ -76,7 +76,7 @@ struct MANGOS_DLL_DECL boss_lajAI : public ScriptedAI void DoTransform() { // Random transform into a different form - switch(urand(0, 4)) + switch (urand(0, 4)) { case 0: m_creature->SetDisplayId(MODEL_ID_DEFAULT); @@ -123,7 +123,7 @@ struct MANGOS_DLL_DECL boss_lajAI : public ScriptedAI void DoSummons() { - switch(urand(0, 3)) + switch (urand(0, 3)) { case 0: DoCastSpellIfCan(m_creature, SPELL_SUMMON_LASHER_1, CAST_TRIGGERED); diff --git a/scripts/outland/tempest_keep/botanica/boss_warp_splinter.cpp b/scripts/outland/tempest_keep/botanica/boss_warp_splinter.cpp index 2b16e0772..899534329 100644 --- a/scripts/outland/tempest_keep/botanica/boss_warp_splinter.cpp +++ b/scripts/outland/tempest_keep/botanica/boss_warp_splinter.cpp @@ -45,7 +45,7 @@ enum }; // Summon Saplings spells (too many to declare them above) -static const uint32 aSaplingsSummonSpells[10] = {34727,34730,34731,34732,34733,34734,34735,34736,34737,34739}; +static const uint32 aSaplingsSummonSpells[10] = {34727, 34730, 34731, 34732, 34733, 34734, 34735, 34736, 34737, 34739}; struct MANGOS_DLL_DECL boss_warp_splinterAI : public ScriptedAI { @@ -148,12 +148,12 @@ struct MANGOS_DLL_DECL boss_warp_splinterAI : public ScriptedAI #####*/ struct MANGOS_DLL_DECL npc_saplingAI : public ScriptedAI { - npc_saplingAI (Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } + npc_saplingAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } void Reset() { // ToDo: This one may need further reserch - //m_creature->SetSpeedRate(MOVE_RUN, 0.5f); + // m_creature->SetSpeedRate(MOVE_RUN, 0.5f); } void MoveInLineOfSight(Unit* pWho) { } diff --git a/scripts/outland/tempest_keep/the_eye/boss_alar.cpp b/scripts/outland/tempest_keep/the_eye/boss_alar.cpp index d12f562e4..991393884 100644 --- a/scripts/outland/tempest_keep/the_eye/boss_alar.cpp +++ b/scripts/outland/tempest_keep/the_eye/boss_alar.cpp @@ -39,7 +39,7 @@ enum SPELL_DIVE_BOMB = 35181, // dive bomb damage spell SPELL_BOMB_REBIRTH = 35369, // used after the dive bomb - to transform back to phoenis SPELL_CHARGE = 35412, // used while in Dive Bomb form - to charge a target - //SPELL_SUMMON_ADDS = 18814, // summons 3*19551 - Not sure if the spell is the right id + // SPELL_SUMMON_ADDS = 18814, // summons 3*19551 - Not sure if the spell is the right id SPELL_BERSERK = 27680, // this spell is used only during phase II NPC_EMBER_OF_ALAR = 19551, // scripted in Acid @@ -109,9 +109,9 @@ struct MANGOS_DLL_DECL boss_alarAI : public ScriptedAI m_uiRangeCheckTimer = 0; m_uiCurrentPlatformId = 0; m_uiPlatformMoveTimer = 35000; - m_uiFlameQuillsTimer = 170000; // at the 5th platform + m_uiFlameQuillsTimer = 170000; // at the 5th platform - m_uiBerserkTimer = 10*MINUTE*IN_MILLISECONDS; // only after phase 2 starts + m_uiBerserkTimer = 10 * MINUTE * IN_MILLISECONDS; // only after phase 2 starts m_uiFlamePatchTimer = 20000; m_uiDiveBombTimer = 30000; m_uiMeltArmorTimer = 10000; @@ -119,9 +119,9 @@ struct MANGOS_DLL_DECL boss_alarAI : public ScriptedAI m_bCanSummonEmber = true; } - void Aggro (Unit* pWho) + void Aggro(Unit* pWho) { - if(m_pInstance) + if (m_pInstance) m_pInstance->SetData(TYPE_ALAR, IN_PROGRESS); // The boss will always move to the first platform from the left side; also set the movement to idle to stop the DB movement @@ -131,13 +131,13 @@ struct MANGOS_DLL_DECL boss_alarAI : public ScriptedAI void JustReachedHome() { - if(m_pInstance) + if (m_pInstance) m_pInstance->SetData(TYPE_ALAR, FAIL); } void JustDied(Unit* pKiller) { - if(m_pInstance) + if (m_pInstance) m_pInstance->SetData(TYPE_ALAR, DONE); } @@ -253,7 +253,7 @@ struct MANGOS_DLL_DECL boss_alarAI : public ScriptedAI void UpdateAI(const uint32 uiDiff) { - if(!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; // Platform phase @@ -300,7 +300,7 @@ struct MANGOS_DLL_DECL boss_alarAI : public ScriptedAI if (m_uiBerserkTimer < uiDiff) { if (DoCastSpellIfCan(m_creature, SPELL_BERSERK) == CAST_OK) - m_uiBerserkTimer = 10*MINUTE*IN_MILLISECONDS; + m_uiBerserkTimer = 10 * MINUTE * IN_MILLISECONDS; } else m_uiBerserkTimer -= uiDiff; @@ -342,9 +342,9 @@ struct MANGOS_DLL_DECL boss_alarAI : public ScriptedAI } }; -CreatureAI* GetAI_boss_alar(Creature *pCreature) +CreatureAI* GetAI_boss_alar(Creature* pCreature) { - return new boss_alarAI (pCreature); + return new boss_alarAI(pCreature); } void AddSC_boss_alar() diff --git a/scripts/outland/tempest_keep/the_eye/boss_astromancer.cpp b/scripts/outland/tempest_keep/the_eye/boss_astromancer.cpp index f0d4436e9..e914cad05 100644 --- a/scripts/outland/tempest_keep/the_eye/boss_astromancer.cpp +++ b/scripts/outland/tempest_keep/the_eye/boss_astromancer.cpp @@ -43,13 +43,13 @@ enum SPELL_SOLARIAN_TRANSFORM = 39117, SPELL_VOID_BOLT = 39329, SPELL_MARK_OF_SOLARIAN = 33023, // acts as an enrage spell - //SPELL_ROTATE_ASTROMANCER = 33283, // purpose unk + // SPELL_ROTATE_ASTROMANCER = 33283, // purpose unk // summoned creatures NPC_SOLARIUM_AGENT = 18925, NPC_SOLARIUM_PRIEST = 18806, NPC_ASTROMANCER_SOLARIAN_SPOTLIGHT = 18928, - //NPC_ASTROMANCER_TRIGGER = 18932, // purpose unk + // NPC_ASTROMANCER_TRIGGER = 18932, // purpose unk // summoned spells SPELL_SPOTLIGHT = 25824, // visual aura on the spotlights @@ -133,7 +133,7 @@ struct MANGOS_DLL_DECL boss_high_astromancer_solarianAI : public ScriptedAI if (pVictim->GetTypeId() != TYPEID_PLAYER) return; - switch(urand(0, 2)) + switch (urand(0, 2)) { case 0: DoScriptText(SAY_KILL1, m_creature); break; case 1: DoScriptText(SAY_KILL2, m_creature); break; @@ -184,7 +184,7 @@ struct MANGOS_DLL_DECL boss_high_astromancer_solarianAI : public ScriptedAI void DoSummonSpotlight(float fRadius, float fAngle, uint8 uiRandPoint) { float fX, fY, fZ; - m_creature->GetNearPoint(m_creature, fX, fY, fZ, 0, fRadius, fAngle*uiRandPoint); + m_creature->GetNearPoint(m_creature, fX, fY, fZ, 0, fRadius, fAngle * uiRandPoint); m_creature->SummonCreature(NPC_ASTROMANCER_SOLARIAN_SPOTLIGHT, fX, fY, fZ, 0, TEMPSUMMON_TIMED_DESPAWN, 30000); } @@ -220,15 +220,15 @@ struct MANGOS_DLL_DECL boss_high_astromancer_solarianAI : public ScriptedAI { if (m_Phase == PHASE_SPLIT) { - // select two different numbers between 0 and 7 so we will get different spawn points for the spotlights + // select two different numbers between 0 and 7 so we will get different spawn points for the spotlights uint8 uiPos1 = urand(0, 7); uint8 uiPos2 = (uiPos1 + urand(1, 7)) % 8; // summon 3 spotlights m_vSpotLightsGuidVector.clear(); - DoSummonSpotlight(fSpotlightRadius[0], M_PI_F/2, urand(0, 3)); - DoSummonSpotlight(fSpotlightRadius[1], M_PI_F/4, uiPos1); - DoSummonSpotlight(fSpotlightRadius[1], M_PI_F/4, uiPos2); + DoSummonSpotlight(fSpotlightRadius[0], M_PI_F / 2, urand(0, 3)); + DoSummonSpotlight(fSpotlightRadius[1], M_PI_F / 4, uiPos1); + DoSummonSpotlight(fSpotlightRadius[1], M_PI_F / 4, uiPos2); m_creature->SetVisibility(VISIBILITY_OFF); diff --git a/scripts/outland/tempest_keep/the_eye/boss_kaelthas.cpp b/scripts/outland/tempest_keep/the_eye/boss_kaelthas.cpp index 0dc284dee..3eb085f06 100644 --- a/scripts/outland/tempest_keep/the_eye/boss_kaelthas.cpp +++ b/scripts/outland/tempest_keep/the_eye/boss_kaelthas.cpp @@ -27,7 +27,7 @@ EndScriptData */ enum { // ***** Event yells ******** - //kael'thas Speech + // kael'thas Speech SAY_INTRO = -1550016, SAY_INTRO_CAPERNIAN = -1550017, SAY_INTRO_TELONICUS = -1550018, @@ -49,25 +49,25 @@ enum SAY_DEATH = -1550034, EMOTE_PYROBLAST = -1550044, - //Thaladred the Darkener speech + // Thaladred the Darkener speech SAY_THALADRED_AGGRO = -1550035, SAY_THALADRED_DEATH = -1550036, EMOTE_THALADRED_GAZE = -1550037, - //Lord Sanguinar speech + // Lord Sanguinar speech SAY_SANGUINAR_AGGRO = -1550038, SAY_SANGUINAR_DEATH = -1550039, - //Grand Astromancer Capernian speech + // Grand Astromancer Capernian speech SAY_CAPERNIAN_AGGRO = -1550040, SAY_CAPERNIAN_DEATH = -1550041, - //Master Engineer Telonicus speech + // Master Engineer Telonicus speech SAY_TELONICUS_AGGRO = -1550042, SAY_TELONICUS_DEATH = -1550043, // ***** Kaelthas spells ******** - //Phase 2 spells + // Phase 2 spells SPELL_KAEL_PHASE_2 = 36709, // not sure if this is used in the right way SPELL_SUMMON_WEAPONS = 36976, SPELL_SUMMON_WEAPONA = 36958, @@ -79,7 +79,7 @@ enum SPELL_SUMMON_WEAPONG = 36964, SPELL_RESURRECTION = 36450, - //Phase 4 spells + // Phase 4 spells SPELL_FIREBALL = 36805, SPELL_PYROBLAST = 36819, SPELL_FLAME_STRIKE = 36735, // summons 21369 @@ -89,14 +89,14 @@ enum SPELL_PHOENIX_ANIMATION = 36723, // summons 21362 SPELL_MIND_CONTROL = 32830, - //Phase 5 spells + // Phase 5 spells SPELL_GAIN_POWER = 36091, SPELL_EXPLODE = 36092, - //SPELL_EXPLODE_1 = 36354, // it's not very clear what all these spells should do + // SPELL_EXPLODE_1 = 36354, // it's not very clear what all these spells should do SPELL_EXPLODE_2 = 36373, - //SPELL_EXPLODE_3 = 36375, - //SPELL_EXPLODE_4 = 36376, - //SPELL_KAEL_STUN = 36185, // purpose unk + // SPELL_EXPLODE_3 = 36375, + // SPELL_EXPLODE_4 = 36376, + // SPELL_KAEL_STUN = 36185, // purpose unk SPELL_FULLPOWER = 36187, SPELL_GRAVITY_LAPSE = 35941, SPELL_GRAVITY_LAPSE_KNOCKBACK = 34480, // cast by players - damage effect @@ -105,27 +105,27 @@ enum SPELL_NETHER_VAPOR_SUMMON = 35865, // script effect - probably related to 35879 // ***** Advisors spells ******** - //Thaladred the Darkener spells + // Thaladred the Darkener spells SPELL_PSYCHIC_BLOW = 36966, SPELL_SILENCE = 30225, SPELL_REND = 36965, - //Lord Sanguinar spells + // Lord Sanguinar spells SPELL_BELLOWING_ROAR = 44863, - //Grand Astromancer Capernian spells + // Grand Astromancer Capernian spells SPELL_CAPERNIAN_FIREBALL = 36971, SPELL_CONFLAGRATION = 37018, SPELL_ARCANE_BURST = 36970, - //Master Engineer Telonicus spells + // Master Engineer Telonicus spells SPELL_BOMB = 37036, SPELL_REMOTE_TOY = 37027, // ***** Other summons spells ******** - //Nether Vapor spell + // Nether Vapor spell SPELL_NETHER_VAPOR = 35858, - //Phoenix spell + // Phoenix spell SPELL_BURN = 36720, SPELL_EMBER_BLAST = 34341, SPELL_REBIRTH = 35369, @@ -153,7 +153,7 @@ enum MAX_MIND_CONTROL = 3, }; -static const uint32 m_auiSpellSummonWeapon[MAX_WEAPONS]= +static const uint32 m_auiSpellSummonWeapon[MAX_WEAPONS] = { SPELL_SUMMON_WEAPONA, SPELL_SUMMON_WEAPONB, SPELL_SUMMON_WEAPONC, SPELL_SUMMON_WEAPOND, SPELL_SUMMON_WEAPONE, SPELL_SUMMON_WEAPONF, SPELL_SUMMON_WEAPONG @@ -162,8 +162,8 @@ static const uint32 m_auiSpellSummonWeapon[MAX_WEAPONS]= // teleport spells for gravity lapse event static const uint32 m_auiSpellGravityLapseTeleport[] = { - 35966,35967,35968,35969,35970,35971,35972,35973,35974,35975,35976,35977,35978,35979,35980, - 35981,35982,35983,35984,35985,35986,35987,35988,35989,35990 + 35966, 35967, 35968, 35969, 35970, 35971, 35972, 35973, 35974, 35975, 35976, 35977, 35978, 35979, 35980, + 35981, 35982, 35983, 35984, 35985, 35986, 35987, 35988, 35989, 35990 }; static const float aCenterPos[3] = {795.00f, -0.46f, 48.72f}; @@ -240,7 +240,7 @@ struct MANGOS_DLL_DECL boss_kaelthasAI : public ScriptedAI void MoveInLineOfSight(Unit* pWho) { if (m_uiPhase == PHASE_0_NOT_BEGUN && pWho->GetTypeId() == TYPEID_PLAYER && !((Player*)pWho)->isGameMaster() && - m_creature->IsWithinDistInMap(pWho, m_creature->GetAttackDistance(pWho)) && m_creature->IsWithinLOSInMap(pWho)) + m_creature->IsWithinDistInMap(pWho, m_creature->GetAttackDistance(pWho)) && m_creature->IsWithinLOSInMap(pWho)) { DoScriptText(SAY_INTRO, m_creature); m_uiPhase = PHASE_1_ADVISOR; @@ -267,7 +267,7 @@ struct MANGOS_DLL_DECL boss_kaelthasAI : public ScriptedAI void KilledUnit(Unit* pUnit) { - switch(urand(0, 2)) + switch (urand(0, 2)) { case 0: DoScriptText(SAY_SLAY1, m_creature); break; case 1: DoScriptText(SAY_SLAY2, m_creature); break; @@ -381,7 +381,7 @@ struct MANGOS_DLL_DECL boss_kaelthasAI : public ScriptedAI { switch (m_uiPhase) { - // ***** Advisors phase ******** + // ***** Advisors phase ******** case PHASE_1_ADVISOR: { if (!m_uiPhaseTimer) @@ -392,7 +392,7 @@ struct MANGOS_DLL_DECL boss_kaelthasAI : public ScriptedAI if (!m_pInstance) return; - switch(m_uiPhaseSubphase) + switch (m_uiPhaseSubphase) { case 0: DoScriptText(SAY_INTRO_THALADRED, m_creature); @@ -449,7 +449,7 @@ struct MANGOS_DLL_DECL boss_kaelthasAI : public ScriptedAI } m_uiPhaseTimer = 0; break; - } + } ++m_uiPhaseSubphase; } @@ -662,7 +662,7 @@ struct MANGOS_DLL_DECL boss_kaelthasAI : public ScriptedAI case PHASE_5_WAITING: // Nothing here; wait for boss to arive at point break; - // ***** Phase 6 - explode the bridge ******** + // ***** Phase 6 - explode the bridge ******** case PHASE_6_FLYING: if (m_uiExplodeTimer) { @@ -703,13 +703,13 @@ struct MANGOS_DLL_DECL boss_kaelthasAI : public ScriptedAI bool EffectDummyCreature_kael_phase_2(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) { - //always check spellid and effectindex + // always check spellid and effectindex if (uiSpellId == SPELL_KAEL_PHASE_2 && uiEffIndex == EFFECT_INDEX_0) { if (boss_kaelthasAI* pKaelAI = dynamic_cast(pCreatureTarget->AI())) pKaelAI->AdvisorDefeated(pCaster->GetEntry()); - //always return true when we are handling this spell and effect + // always return true when we are handling this spell and effect return true; } @@ -755,7 +755,7 @@ struct MANGOS_DLL_DECL advisor_base_ai : public ScriptedAI } } - void DamageTaken(Unit* pDoneby, uint32 &uiDamage) + void DamageTaken(Unit* pDoneby, uint32& uiDamage) { // Allow fake death only in the first phase if (!m_bCanFakeDeath) @@ -1025,7 +1025,7 @@ struct MANGOS_DLL_DECL boss_grand_astromancer_capernianAI : public advisor_base_ else m_uiArcaneExplosionTimer -= uiDiff; - //Do NOT deal any melee damage. + // Do NOT deal any melee damage. } }; @@ -1048,7 +1048,7 @@ struct MANGOS_DLL_DECL boss_master_engineer_telonicusAI : public advisor_base_ai advisor_base_ai::Reset(); } - void Aggro(Unit *pWho) + void Aggro(Unit* pWho) { DoScriptText(SAY_TELONICUS_AGGRO, m_creature); } @@ -1198,7 +1198,7 @@ struct MANGOS_DLL_DECL mob_phoenix_tkAI : public ScriptedAI // ToDo: research if this is correct and how can this be done by spell if (m_uiCycleTimer < uiDiff) { - //spell Burn should possible do this, but it doesn't, so do this for now. + // spell Burn should possible do this, but it doesn't, so do this for now. uint32 uiDmg = urand(4500, 5500); if (uiDmg > m_creature->GetHealth()) DoSetFakeDeath(); diff --git a/scripts/outland/tempest_keep/the_eye/boss_void_reaver.cpp b/scripts/outland/tempest_keep/the_eye/boss_void_reaver.cpp index 1b48f7c68..65907ba39 100644 --- a/scripts/outland/tempest_keep/the_eye/boss_void_reaver.cpp +++ b/scripts/outland/tempest_keep/the_eye/boss_void_reaver.cpp @@ -62,7 +62,7 @@ struct MANGOS_DLL_DECL boss_void_reaverAI : public ScriptedAI m_uiPoundingTimer = 13000; m_uiArcaneOrbTimer = 3000; m_uiKnockAwayTimer = 30000; - m_uiBerserkTimer = 10*MINUTE*IN_MILLISECONDS; + m_uiBerserkTimer = 10 * MINUTE * IN_MILLISECONDS; } void KilledUnit(Unit* pVictim) @@ -70,7 +70,7 @@ struct MANGOS_DLL_DECL boss_void_reaverAI : public ScriptedAI if (pVictim->GetTypeId() != TYPEID_PLAYER) return; - switch(urand(0, 2)) + switch (urand(0, 2)) { case 0: DoScriptText(SAY_SLAY1, m_creature); break; case 1: DoScriptText(SAY_SLAY2, m_creature); break; diff --git a/scripts/outland/tempest_keep/the_eye/instance_the_eye.cpp b/scripts/outland/tempest_keep/the_eye/instance_the_eye.cpp index 395700276..e92d172c0 100644 --- a/scripts/outland/tempest_keep/the_eye/instance_the_eye.cpp +++ b/scripts/outland/tempest_keep/the_eye/instance_the_eye.cpp @@ -62,7 +62,7 @@ void instance_the_eye::OnCreatureCreate(Creature* pCreature) void instance_the_eye::OnObjectCreate(GameObject* pGo) { - switch(pGo->GetEntry()) + switch (pGo->GetEntry()) { case GO_ARCANE_DOOR_HORIZ_3: case GO_ARCANE_DOOR_HORIZ_4: diff --git a/scripts/outland/tempest_keep/the_eye/the_eye.h b/scripts/outland/tempest_keep/the_eye/the_eye.h index 849adbb99..6edf0ab92 100644 --- a/scripts/outland/tempest_keep/the_eye/the_eye.h +++ b/scripts/outland/tempest_keep/the_eye/the_eye.h @@ -15,7 +15,7 @@ enum TYPE_VOIDREAVER = 2, TYPE_KAELTHAS = 3, - //NPC_ASTROMANCER = 18805, + // NPC_ASTROMANCER = 18805, NPC_KAELTHAS = 19622, NPC_CAPERNIAN = 20062, @@ -25,10 +25,10 @@ enum GO_ARCANE_DOOR_HORIZ_3 = 184325, // combat doors for Kael GO_ARCANE_DOOR_HORIZ_4 = 184324, - //GO_RAID_DOOR_4 = 184329, // encounter doors - no longer used since 2.4.0 - //GO_RAID_DOOR_3 = 184327, - //GO_ARCANE_DOOR_VERT_3 = 184326, - //GO_ARCANE_DOOR_VERT_4 = 184328, + // GO_RAID_DOOR_4 = 184329, // encounter doors - no longer used since 2.4.0 + // GO_RAID_DOOR_3 = 184327, + // GO_ARCANE_DOOR_VERT_3 = 184326, + // GO_ARCANE_DOOR_VERT_4 = 184328, GO_KAEL_STATUE_LEFT = 184597, // cosmetic objects for Kael encounter GO_KAEL_STATUE_RIGHT = 184596, GO_BRIDGE_WINDOW = 184069, diff --git a/scripts/outland/tempest_keep/the_mechanar/boss_pathaleon_the_calculator.cpp b/scripts/outland/tempest_keep/the_mechanar/boss_pathaleon_the_calculator.cpp index 02d8ecde3..9796e64f4 100644 --- a/scripts/outland/tempest_keep/the_mechanar/boss_pathaleon_the_calculator.cpp +++ b/scripts/outland/tempest_keep/the_mechanar/boss_pathaleon_the_calculator.cpp @@ -113,7 +113,7 @@ struct MANGOS_DLL_DECL boss_pathaleon_the_calculatorAI : public ScriptedAI void UpdateAI(const uint32 uiDiff) { - //Return since we have no target + // Return since we have no target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -230,7 +230,7 @@ struct MANGOS_DLL_DECL mob_nether_wraithAI : public ScriptedAI } } else - m_uiArcaneMissilesTimer -=uiDiff; + m_uiArcaneMissilesTimer -= uiDiff; if (!m_bHasDetonated && m_creature->GetHealthPercent() < 10.0f) { diff --git a/scripts/outland/tempest_keep/the_mechanar/instance_mechanar.cpp b/scripts/outland/tempest_keep/the_mechanar/instance_mechanar.cpp index e9be3807a..d82e000ba 100644 --- a/scripts/outland/tempest_keep/the_mechanar/instance_mechanar.cpp +++ b/scripts/outland/tempest_keep/the_mechanar/instance_mechanar.cpp @@ -79,7 +79,7 @@ void instance_mechanar::OnObjectCreate(GameObject* pGo) void instance_mechanar::SetData(uint32 uiType, uint32 uiData) { - switch(uiType) + switch (uiType) { case TYPE_GYRO_KILL: case TYPE_IRON_HAND: @@ -104,7 +104,7 @@ void instance_mechanar::SetData(uint32 uiType, uint32 uiData) std::ostringstream saveStream; saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2] << " " - << m_auiEncounter[3] << " " << m_auiEncounter[4]; + << m_auiEncounter[3] << " " << m_auiEncounter[4]; m_strInstData = saveStream.str(); @@ -133,9 +133,9 @@ void instance_mechanar::Load(const char* chrIn) std::istringstream loadStream(chrIn); loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3] - >> m_auiEncounter[4]; + >> m_auiEncounter[4]; - for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) + for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) { if (m_auiEncounter[i] == IN_PROGRESS) m_auiEncounter[i] = NOT_STARTED; diff --git a/scripts/outland/tempest_keep/the_mechanar/mechanar.h b/scripts/outland/tempest_keep/the_mechanar/mechanar.h index fe4cfb060..7704dc732 100644 --- a/scripts/outland/tempest_keep/the_mechanar/mechanar.h +++ b/scripts/outland/tempest_keep/the_mechanar/mechanar.h @@ -20,7 +20,7 @@ enum NPC_GYRO_KILL = 19218, NPC_IRON_HAND = 19710, NPC_LORD_CAPACITUS = 19219, - //NPC_SEPETHREA = 19221, + // NPC_SEPETHREA = 19221, NPC_PATHALEON = 19220, // bridge event related diff --git a/scripts/outland/terokkar_forest.cpp b/scripts/outland/terokkar_forest.cpp index 8a6d05b68..06d6bb879 100644 --- a/scripts/outland/terokkar_forest.cpp +++ b/scripts/outland/terokkar_forest.cpp @@ -141,7 +141,7 @@ enum { NPC_FREED_WARRIOR = 22459, QUEST_TAKEN_IN_NIGHT = 10873 - //SPELL_FREE_WEBBED = 38950 + // SPELL_FREE_WEBBED = 38950 }; const uint32 netherwebVictims[6] = @@ -201,8 +201,8 @@ enum NPC_CABAL_SKIRMISHER = 21661 }; -static float m_afAmbushB1[]= {-2895.525879f, 5336.431641f, -11.800f}; -static float m_afAmbushB2[]= {-2890.604980f, 5331.938965f, -11.282f}; +static float m_afAmbushB1[] = { -2895.525879f, 5336.431641f, -11.800f}; +static float m_afAmbushB2[] = { -2890.604980f, 5331.938965f, -11.282f}; struct MANGOS_DLL_DECL npc_akunoAI : public npc_escortAI { @@ -217,7 +217,7 @@ struct MANGOS_DLL_DECL npc_akunoAI : public npc_escortAI void WaypointReached(uint32 uiPointId) { - switch(uiPointId) + switch (uiPointId) { case 5: DoScriptText(SAY_AKU_AMBUSH_A, m_creature); @@ -359,7 +359,7 @@ enum MAX_RESEARCHER = 4 }; -//Some details still missing from here, and will also have issues if followers evade for any reason. +// Some details still missing from here, and will also have issues if followers evade for any reason. struct MANGOS_DLL_DECL npc_letollAI : public npc_escortAI { npc_letollAI(Creature* pCreature) : npc_escortAI(pCreature) @@ -376,14 +376,14 @@ struct MANGOS_DLL_DECL npc_letollAI : public npc_escortAI void Reset() {} - //will make them follow, but will only work until they enter combat with any unit + // will make them follow, but will only work until they enter combat with any unit void SetFormation() { uint32 uiCount = 0; - for(std::list::iterator itr = m_lResearchersList.begin(); itr != m_lResearchersList.end(); ++itr) + for (std::list::iterator itr = m_lResearchersList.begin(); itr != m_lResearchersList.end(); ++itr) { - float fAngle = uiCount < MAX_RESEARCHER ? M_PI/MAX_RESEARCHER - (uiCount*2*M_PI/MAX_RESEARCHER) : 0.0f; + float fAngle = uiCount < MAX_RESEARCHER ? M_PI / MAX_RESEARCHER - (uiCount * 2 * M_PI / MAX_RESEARCHER) : 0.0f; if ((*itr)->isAlive() && !(*itr)->isInCombat()) (*itr)->GetMotionMaster()->MoveFollow(m_creature, 2.5f, fAngle); @@ -398,7 +398,7 @@ struct MANGOS_DLL_DECL npc_letollAI : public npc_escortAI { uint8 uiNum = 1; - for(std::list::iterator itr = m_lResearchersList.begin(); itr != m_lResearchersList.end(); ++itr) + for (std::list::iterator itr = m_lResearchersList.begin(); itr != m_lResearchersList.end(); ++itr) { if (uiListNum && uiListNum != uiNum) { @@ -429,7 +429,7 @@ struct MANGOS_DLL_DECL npc_letollAI : public npc_escortAI void WaypointReached(uint32 uiPointId) { - switch(uiPointId) + switch (uiPointId) { case 0: if (Player* pPlayer = GetPlayerForEscort()) @@ -477,7 +477,7 @@ struct MANGOS_DLL_DECL npc_letollAI : public npc_escortAI { m_uiEventTimer = 7000; - switch(m_uiEventCount) + switch (m_uiEventCount) { case 0: DoScriptText(SAY_LE_ALMOST, m_creature); @@ -634,7 +634,7 @@ struct MANGOS_DLL_DECL npc_mana_bomb_exp_triggerAI : public ScriptedAI if (m_uiEventCounter < 10) m_creature->CastSpell(m_creature, SPELL_MANA_BOMB_LIGHTNING, false); - switch(m_uiEventCounter) + switch (m_uiEventCounter) { case 5: if (pManaBomb) @@ -712,10 +712,10 @@ bool GOUse_go_veil_skith_cage(Player* pPlayer, GameObject* pGo) { std::list lChildrenList; GetCreatureListWithEntryInGrid(lChildrenList, pGo, NPC_CAPTIVE_CHILD, INTERACTION_DISTANCE); - for(std::list::const_iterator itr = lChildrenList.begin(); itr != lChildrenList.end(); ++itr) + for (std::list::const_iterator itr = lChildrenList.begin(); itr != lChildrenList.end(); ++itr) { pPlayer->KilledMonsterCredit(NPC_CAPTIVE_CHILD, (*itr)->GetObjectGuid()); - switch(urand(0,3)) + switch (urand(0, 3)) { case 0: DoScriptText(SAY_THANKS_1, *itr); break; case 1: DoScriptText(SAY_THANKS_2, *itr); break; @@ -801,7 +801,7 @@ struct MANGOS_DLL_DECL npc_isla_starmaneAI : public npc_escortAI { m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PASSIVE); DoScriptText(SAY_ISLA_START, m_creature); - if (GameObject* pCage = GetClosestGameObjectWithEntry(m_creature, GO_CAGE, 2*INTERACTION_DISTANCE)) + if (GameObject* pCage = GetClosestGameObjectWithEntry(m_creature, GO_CAGE, 2 * INTERACTION_DISTANCE)) pCage->Use(m_creature); } @@ -816,7 +816,7 @@ struct MANGOS_DLL_DECL npc_isla_starmaneAI : public npc_escortAI void WaypointReached(uint32 uiPointId) { - switch(uiPointId) + switch (uiPointId) { case 6: DoScriptText(SAY_ISLA_WAITING, m_creature); @@ -913,14 +913,14 @@ enum SAY_SKYWING_SUMMON = -1000801, SAY_SKYWING_END = -1000802, - //SPELL_TRANSFORM = ?????, // ToDo: research the transform spell id + // SPELL_TRANSFORM = ?????, // ToDo: research the transform spell id NPC_LUANGA_THE_IMPRISONER = 18533, QUEST_SKYWING = 10898 }; -static const float aLuangaSpawnCoords[3] = {-3507.203f, 4084.619f, 92.947f}; +static const float aLuangaSpawnCoords[3] = { -3507.203f, 4084.619f, 92.947f}; struct MANGOS_DLL_DECL npc_skywingAI : public npc_escortAI { @@ -933,7 +933,7 @@ struct MANGOS_DLL_DECL npc_skywingAI : public npc_escortAI switch (uiPointId) { case 6: - DoScriptText(SAY_SKYWING_TREE_DOWN ,m_creature); + DoScriptText(SAY_SKYWING_TREE_DOWN , m_creature); break; case 36: DoScriptText(SAY_SKYWING_TREE_UP, m_creature); diff --git a/scripts/outland/zangarmarsh.cpp b/scripts/outland/zangarmarsh.cpp index 0d30e7695..18f96ae52 100644 --- a/scripts/outland/zangarmarsh.cpp +++ b/scripts/outland/zangarmarsh.cpp @@ -65,9 +65,10 @@ struct MANGOS_DLL_DECL npc_cooshcooshAI : public ScriptedAI if (m_uiLightningBolt_Timer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_LIGHTNING_BOLT); + DoCastSpellIfCan(m_creature->getVictim(), SPELL_LIGHTNING_BOLT); m_uiLightningBolt_Timer = 5000; - }else m_uiLightningBolt_Timer -= uiDiff; + } + else m_uiLightningBolt_Timer -= uiDiff; DoMeleeAttackIfReady(); } @@ -105,7 +106,7 @@ struct MANGOS_DLL_DECL npc_kayra_longmaneAI : public npc_escortAI if (!pPlayer) return; - switch(i) + switch (i) { case 4: DoScriptText(SAY_AMBUSH1, m_creature, pPlayer); diff --git a/scripts/world/areatrigger_scripts.cpp b/scripts/world/areatrigger_scripts.cpp index 8de5010e6..8af0f4a8f 100644 --- a/scripts/world/areatrigger_scripts.cpp +++ b/scripts/world/areatrigger_scripts.cpp @@ -52,7 +52,7 @@ bool AreaTrigger_at_childrens_week_spot(Player* pPlayer, AreaTriggerEntry const* for (uint8 i = 0; i < 6; ++i) { if (pAt->id == TriggerOrphanSpell[i][0] && - pPlayer->GetMiniPet() && pPlayer->GetMiniPet()->GetEntry() == TriggerOrphanSpell[i][1]) + pPlayer->GetMiniPet() && pPlayer->GetMiniPet()->GetEntry() == TriggerOrphanSpell[i][1]) { pPlayer->CastSpell(pPlayer, TriggerOrphanSpell[i][2], true); return true; @@ -80,7 +80,7 @@ enum bool AreaTrigger_at_aldurthar_gate(Player* pPlayer, AreaTriggerEntry const* pAt) { - switch(pAt->id) + switch (pAt->id) { case TRIGGER_SOUTH: pPlayer->KilledMonsterCredit(NPC_SOUTH_GATE); break; case TRIGGER_CENTRAL: pPlayer->KilledMonsterCredit(NPC_CENTRAL_GATE); break; @@ -174,13 +174,13 @@ enum bool AreaTrigger_at_spearborn_encampment(Player* pPlayer, AreaTriggerEntry const* pAt) { if (pPlayer->GetQuestStatus(QUEST_MISTWHISPER_TREASURE) == QUEST_STATUS_INCOMPLETE && - pPlayer->GetReqKillOrCastCurrentCount(QUEST_MISTWHISPER_TREASURE, NPC_TARTEK) == 0) + pPlayer->GetReqKillOrCastCurrentCount(QUEST_MISTWHISPER_TREASURE, NPC_TARTEK) == 0) { // can only spawn one at a time, it's not a too good solution if (GetClosestCreatureWithEntry(pPlayer, NPC_TARTEK, 50.0f)) return false; - pPlayer->SummonCreature(NPC_TARTEK, pAt->x, pAt->y, pAt->z, 0.0f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, MINUTE*IN_MILLISECONDS); + pPlayer->SummonCreature(NPC_TARTEK, pAt->x, pAt->y, pAt->z, 0.0f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, MINUTE * IN_MILLISECONDS); } return false; @@ -206,7 +206,7 @@ bool AreaTrigger_at_warsong_farms(Player* pPlayer, AreaTriggerEntry const* pAt) { if (!pPlayer->isDead() && pPlayer->GetQuestStatus(QUEST_THE_WARSONG_FARMS) == QUEST_STATUS_INCOMPLETE) { - switch(pAt->id) + switch (pAt->id) { case AT_SLAUGHTERHOUSE: pPlayer->KilledMonsterCredit(NPC_CREDIT_SLAUGHTERHOUSE); break; case AT_GRAINERY: pPlayer->KilledMonsterCredit(NPC_CREDIT_GRAINERY); break; @@ -234,7 +234,7 @@ bool AreaTrigger_at_waygate(Player* pPlayer, AreaTriggerEntry const* pAt) { if (!pPlayer->isDead() && pPlayer->GetQuestStatus(QUEST_THE_MARKERS_OVERLOOK) == QUEST_STATUS_COMPLETE && pPlayer->GetQuestStatus(QUEST_THE_MARKERS_PERCH) == QUEST_STATUS_COMPLETE) { - switch(pAt->id) + switch (pAt->id) { case AT_WAYGATE_SHOLOZAR: pPlayer->CastSpell(pPlayer, SPELL_SHOLOZAR_TO_UNGORO_TELEPORT, false); break; case AT_WAYGATE_UNGORO: pPlayer->CastSpell(pPlayer, SPELL_UNGORO_TO_SHOLOZAR_TELEPORT, false); break; @@ -277,7 +277,7 @@ bool AreaTrigger_at_scent_larkorwi(Player* pPlayer, AreaTriggerEntry const* pAt) if (pPlayer->isAlive() && !pPlayer->isGameMaster() && pPlayer->GetQuestStatus(QUEST_SCENT_OF_LARKORWI) == QUEST_STATUS_INCOMPLETE) { if (!GetClosestCreatureWithEntry(pPlayer, NPC_LARKORWI_MATE, 25.0f, false, false)) - pPlayer->SummonCreature(NPC_LARKORWI_MATE, pAt->x, pAt->y, pAt->z, 3.3f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 2*MINUTE*IN_MILLISECONDS); + pPlayer->SummonCreature(NPC_LARKORWI_MATE, pAt->x, pAt->y, pAt->z, 3.3f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 2 * MINUTE * IN_MILLISECONDS); } return false; diff --git a/scripts/world/bosses_emerald_dragons.cpp b/scripts/world/bosses_emerald_dragons.cpp index 84b4222b5..6ab1afe0e 100644 --- a/scripts/world/bosses_emerald_dragons.cpp +++ b/scripts/world/bosses_emerald_dragons.cpp @@ -422,7 +422,7 @@ struct MANGOS_DLL_DECL boss_taerarAI : public boss_emerald_dragonAI if (m_uiShadesTimeoutTimer) { if (m_uiShadesTimeoutTimer <= uiDiff) - DoUnbanishBoss(); + DoUnbanishBoss(); else m_uiShadesTimeoutTimer -= uiDiff; @@ -472,7 +472,7 @@ struct MANGOS_DLL_DECL boss_shadeoftaerarAI : public ScriptedAI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - //PoisonCloud_Timer + // PoisonCloud_Timer if (m_uiPoisonCloud_Timer < uiDiff) { DoCastSpellIfCan(m_creature->getVictim(), SPELL_POSIONCLOUD); @@ -481,7 +481,7 @@ struct MANGOS_DLL_DECL boss_shadeoftaerarAI : public ScriptedAI else m_uiPoisonCloud_Timer -= uiDiff; - //PosionBreath_Timer + // PosionBreath_Timer if (m_uiPosionBreath_Timer < uiDiff) { DoCastSpellIfCan(m_creature->getVictim(), SPELL_POSIONBREATH); @@ -516,7 +516,7 @@ enum SPELL_LIGHTNING_WAVE = 24819, SPELL_SUMMON_DRUIDS = 24795, - //druid spells + // druid spells SPELL_MOONFIRE = 21669 }; @@ -544,7 +544,7 @@ struct MANGOS_DLL_DECL boss_ysondreAI : public boss_emerald_dragonAI { DoScriptText(SAY_SUMMON_DRUIDS, m_creature); - for(int i = 0; i < 10; ++i) + for (int i = 0; i < 10; ++i) DoCastSpellIfCan(m_creature, SPELL_SUMMON_DRUIDS, CAST_TRIGGERED); return true; @@ -583,7 +583,7 @@ struct MANGOS_DLL_DECL mob_dementeddruidsAI : public ScriptedAI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - //MoonFire_Timer + // MoonFire_Timer if (m_uiMoonFire_Timer < uiDiff) { DoCastSpellIfCan(m_creature->getVictim(), SPELL_MOONFIRE); diff --git a/scripts/world/go_scripts.cpp b/scripts/world/go_scripts.cpp index bf2807e06..ee6e176c8 100644 --- a/scripts/world/go_scripts.cpp +++ b/scripts/world/go_scripts.cpp @@ -78,8 +78,8 @@ enum const uint32 uiNpcPrisonEntry[] = { - 22810, 22811, 22812, 22813, 22814, 22815, //good guys - 20783, 20784, 20785, 20786, 20788, 20789, 20790 //bad guys + 22810, 22811, 22812, 22813, 22814, 22815, // good guys + 20783, 20784, 20785, 20786, 20788, 20789, 20790 // bad guys }; bool GOUse_go_ethereum_prison(Player* pPlayer, GameObject* pGo) @@ -87,8 +87,8 @@ bool GOUse_go_ethereum_prison(Player* pPlayer, GameObject* pGo) uint8 uiRandom = urand(0, countof(uiNpcPrisonEntry) - 1); if (Creature* pCreature = pPlayer->SummonCreature(uiNpcPrisonEntry[uiRandom], - pGo->GetPositionX(), pGo->GetPositionY(), pGo->GetPositionZ(), pGo->GetAngle(pPlayer), - TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000)) + pGo->GetPositionX(), pGo->GetPositionY(), pGo->GetPositionZ(), pGo->GetAngle(pPlayer), + TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000)) { if (!pCreature->IsHostileTo(pPlayer)) { @@ -96,7 +96,7 @@ bool GOUse_go_ethereum_prison(Player* pPlayer, GameObject* pGo) if (FactionTemplateEntry const* pFaction = pCreature->getFactionTemplateEntry()) { - switch(pFaction->faction) + switch (pFaction->faction) { case FACTION_LC: uiSpell = SPELL_REP_LC; break; case FACTION_SHAT: uiSpell = SPELL_REP_SHAT; break; @@ -107,9 +107,9 @@ bool GOUse_go_ethereum_prison(Player* pPlayer, GameObject* pGo) } if (uiSpell) - pCreature->CastSpell(pPlayer,uiSpell,false); + pCreature->CastSpell(pPlayer, uiSpell, false); else - error_log("SD2: go_ethereum_prison summoned creature (entry %u) but faction (%u) are not expected by script.",pCreature->GetEntry(),pCreature->getFaction()); + error_log("SD2: go_ethereum_prison summoned creature (entry %u) but faction (%u) are not expected by script.", pCreature->GetEntry(), pCreature->getFaction()); } } } @@ -131,8 +131,8 @@ bool GOUse_go_ethereum_stasis(Player* pPlayer, GameObject* pGo) uint8 uiRandom = urand(0, countof(uiNpcStasisEntry) - 1); pPlayer->SummonCreature(uiNpcStasisEntry[uiRandom], - pGo->GetPositionX(), pGo->GetPositionY(), pGo->GetPositionZ(), pGo->GetAngle(pPlayer), - TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); + pGo->GetPositionX(), pGo->GetPositionY(), pGo->GetPositionZ(), pGo->GetAngle(pPlayer), + TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); return false; } @@ -168,7 +168,7 @@ enum bool GOUse_go_mysterious_snow_mound(Player* pPlayer, GameObject* pGo) { - if (urand(0,1)) + if (urand(0, 1)) { pPlayer->CastSpell(pPlayer, SPELL_SUMMON_DEEP_JORMUNGAR, true); } @@ -203,10 +203,10 @@ bool GOUse_go_shrine_of_the_birds(Player* pPlayer, GameObject* pGo) { uint32 uiBirdEntry = 0; - float fX,fY,fZ; + float fX, fY, fZ; pGo->GetClosePoint(fX, fY, fZ, pGo->GetObjectBoundingRadius(), INTERACTION_DISTANCE); - switch(pGo->GetEntry()) + switch (pGo->GetEntry()) { case GO_SHRINE_HAWK: uiBirdEntry = NPC_HAWK_GUARD; @@ -240,7 +240,7 @@ bool GOUse_go_tele_to_dalaran_crystal(Player* pPlayer, GameObject* pGo) if (pPlayer->GetQuestRewardStatus(QUEST_TELE_CRYSTAL_FLAG)) return false; - //TODO: must send error message (what kind of message? On-screen?) + // TODO: must send error message (what kind of message? On-screen?) return true; } @@ -279,7 +279,7 @@ bool GOUse_go_andorhal_tower(Player* pPlayer, GameObject* pGo) if (pPlayer->GetQuestStatus(QUEST_ALL_ALONG_THE_WATCHTOWERS_ALLIANCE) == QUEST_STATUS_INCOMPLETE || pPlayer->GetQuestStatus(QUEST_ALL_ALONG_THE_WATCHTOWERS_HORDE) == QUEST_STATUS_INCOMPLETE) { uint32 uiKillCredit = 0; - switch(pGo->GetEntry()) + switch (pGo->GetEntry()) { case GO_ANDORHAL_TOWER_1: uiKillCredit = NPC_ANDORHAL_TOWER_1; break; case GO_ANDORHAL_TOWER_2: uiKillCredit = NPC_ANDORHAL_TOWER_2; break; @@ -309,9 +309,9 @@ bool GOUse_go_scourge_enclosure(Player* pPlayer, GameObject* pGo) GetCreatureListWithEntryInGrid(m_lResearchersList, pGo, NPC_GYMER_LOCK_DUMMY, 15.0f); if (!m_lResearchersList.empty()) { - for(std::list::iterator itr = m_lResearchersList.begin(); itr != m_lResearchersList.end(); ++itr) + for (std::list::iterator itr = m_lResearchersList.begin(); itr != m_lResearchersList.end(); ++itr) { - (*itr)->CastSpell((*itr),SPELL_GYMER_LOCK_EXPLOSION,true); + (*itr)->CastSpell((*itr), SPELL_GYMER_LOCK_EXPLOSION, true); } } pPlayer->KilledMonsterCredit(NPC_GYMER_LOCK_DUMMY); diff --git a/scripts/world/item_scripts.cpp b/scripts/world/item_scripts.cpp index 5371c6be1..fcdf64820 100644 --- a/scripts/world/item_scripts.cpp +++ b/scripts/world/item_scripts.cpp @@ -39,7 +39,7 @@ enum SPELL_ARCANE_CHARGES = 45072 }; -bool ItemUse_item_arcane_charges(Player* pPlayer, Item* pItem, const SpellCastTargets &pTargets) +bool ItemUse_item_arcane_charges(Player* pPlayer, Item* pItem, const SpellCastTargets& pTargets) { if (pPlayer->IsTaxiFlying()) return false; @@ -56,7 +56,7 @@ bool ItemUse_item_arcane_charges(Player* pPlayer, Item* pItem, const SpellCastTa # item_flying_machine #####*/ -bool ItemUse_item_flying_machine(Player* pPlayer, Item* pItem, const SpellCastTargets &pTargets) +bool ItemUse_item_flying_machine(Player* pPlayer, Item* pItem, const SpellCastTargets& pTargets) { uint32 itemId = pItem->GetEntry(); @@ -68,7 +68,7 @@ bool ItemUse_item_flying_machine(Player* pPlayer, Item* pItem, const SpellCastTa if (pPlayer->GetBaseSkillValue(SKILL_RIDING) == 300) return false; - debug_log("SD2: Player attempt to use item %u, but did not meet riding requirement",itemId); + debug_log("SD2: Player attempt to use item %u, but did not meet riding requirement", itemId); pPlayer->SendEquipError(EQUIP_ERR_CANT_EQUIP_SKILL, pItem, NULL); return true; } @@ -83,7 +83,7 @@ enum SPELL_GORDREKS_OINTMENT = 32578 }; -bool ItemUse_item_gor_dreks_ointment(Player* pPlayer, Item* pItem, const SpellCastTargets &pTargets) +bool ItemUse_item_gor_dreks_ointment(Player* pPlayer, Item* pItem, const SpellCastTargets& pTargets) { if (pTargets.getUnitTarget() && pTargets.getUnitTarget()->GetTypeId() == TYPEID_UNIT && pTargets.getUnitTarget()->HasAura(SPELL_GORDREKS_OINTMENT)) { @@ -109,7 +109,7 @@ enum ZONE_ID_HOWLING = 495 }; -bool ItemUse_item_petrov_cluster_bombs(Player* pPlayer, Item* pItem, const SpellCastTargets &pTargets) +bool ItemUse_item_petrov_cluster_bombs(Player* pPlayer, Item* pItem, const SpellCastTargets& pTargets) { if (pPlayer->GetZoneId() != ZONE_ID_HOWLING) return false; diff --git a/scripts/world/mob_generic_creature.cpp b/scripts/world/mob_generic_creature.cpp index 025616de2..1954bd0ac 100644 --- a/scripts/world/mob_generic_creature.cpp +++ b/scripts/world/mob_generic_creature.cpp @@ -29,54 +29,55 @@ struct MANGOS_DLL_DECL generic_creatureAI : public ScriptedAI { generic_creatureAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} - uint32 GlobalCooldown; //This variable acts like the global cooldown that players have (1.5 seconds) - uint32 BuffTimer; //This variable keeps track of buffs + uint32 GlobalCooldown; // This variable acts like the global cooldown that players have (1.5 seconds) + uint32 BuffTimer; // This variable keeps track of buffs bool IsSelfRooted; void Reset() { GlobalCooldown = 0; - BuffTimer = 0; //Rebuff as soon as we can + BuffTimer = 0; // Rebuff as soon as we can IsSelfRooted = false; } - void Aggro(Unit *who) + void Aggro(Unit* who) { - if (!m_creature->CanReachWithMeleeAttack(who)) - { - IsSelfRooted = true; - } + if (!m_creature->CanReachWithMeleeAttack(who)) + { + IsSelfRooted = true; + } } void UpdateAI(const uint32 diff) { - //Always decrease our global cooldown first + // Always decrease our global cooldown first if (GlobalCooldown > diff) GlobalCooldown -= diff; else GlobalCooldown = 0; - //Buff timer (only buff when we are alive and not in combat + // Buff timer (only buff when we are alive and not in combat if (!m_creature->isInCombat() && m_creature->isAlive()) if (BuffTimer < diff) { - //Find a spell that targets friendly and applies an aura (these are generally buffs) - SpellEntry const *info = SelectSpell(m_creature, -1, -1, SELECT_TARGET_ANY_FRIEND, 0, 0, 0, 0, SELECT_EFFECT_AURA); + // Find a spell that targets friendly and applies an aura (these are generally buffs) + SpellEntry const* info = SelectSpell(m_creature, -1, -1, SELECT_TARGET_ANY_FRIEND, 0, 0, 0, 0, SELECT_EFFECT_AURA); if (info && !GlobalCooldown) { - //Cast the buff spell + // Cast the buff spell DoCastSpell(m_creature, info); - //Set our global cooldown + // Set our global cooldown GlobalCooldown = GENERIC_CREATURE_COOLDOWN; - //Set our timer to 10 minutes before rebuff + // Set our timer to 10 minutes before rebuff BuffTimer = 600000; - }//Try agian in 30 seconds + }// Try agian in 30 seconds else BuffTimer = 30000; - }else BuffTimer -= diff; + } + else BuffTimer -= diff; - //Return since we have no target + // Return since we have no target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -84,31 +85,31 @@ struct MANGOS_DLL_DECL generic_creatureAI : public ScriptedAI if (m_creature->IsNonMeleeSpellCasted(false)) return; - //If we are within range melee the target + // If we are within range melee the target if (m_creature->CanReachWithMeleeAttack(m_creature->getVictim())) { - //Make sure our attack is ready + // Make sure our attack is ready if (m_creature->isAttackReady()) { bool Healing = false; - SpellEntry const *info = NULL; + SpellEntry const* info = NULL; - //Select a healing spell if less than 30% hp + // Select a healing spell if less than 30% hp if (m_creature->GetHealthPercent() < 30.0f) info = SelectSpell(m_creature, -1, -1, SELECT_TARGET_ANY_FRIEND, 0, 0, 0, 0, SELECT_EFFECT_HEALING); - //No healing spell available, select a hostile spell + // No healing spell available, select a hostile spell if (info) Healing = true; else info = SelectSpell(m_creature->getVictim(), -1, -1, SELECT_TARGET_ANY_ENEMY, 0, 0, 0, 0, SELECT_EFFECT_DONTCARE); - //50% chance if elite or higher, 20% chance if not, to replace our white hit with a spell + // 50% chance if elite or higher, 20% chance if not, to replace our white hit with a spell if (info && (rand() % (m_creature->GetCreatureInfo()->rank > 1 ? 2 : 5) == 0) && !GlobalCooldown) { - //Cast the spell + // Cast the spell if (Healing)DoCastSpell(m_creature, info); else DoCastSpell(m_creature->getVictim(), info); - //Set our global cooldown + // Set our global cooldown GlobalCooldown = GENERIC_CREATURE_COOLDOWN; } else m_creature->AttackerStateUpdate(m_creature->getVictim()); @@ -119,36 +120,36 @@ struct MANGOS_DLL_DECL generic_creatureAI : public ScriptedAI else { bool Healing = false; - SpellEntry const *info = NULL; + SpellEntry const* info = NULL; - //Select a healing spell if less than 30% hp ONLY 33% of the time + // Select a healing spell if less than 30% hp ONLY 33% of the time if (m_creature->GetHealthPercent() < 30.0f && !urand(0, 2)) info = SelectSpell(m_creature, -1, -1, SELECT_TARGET_ANY_FRIEND, 0, 0, 0, 0, SELECT_EFFECT_HEALING); - //No healing spell available, See if we can cast a ranged spell (Range must be greater than ATTACK_DISTANCE) + // No healing spell available, See if we can cast a ranged spell (Range must be greater than ATTACK_DISTANCE) if (info) Healing = true; else info = SelectSpell(m_creature->getVictim(), -1, -1, SELECT_TARGET_ANY_ENEMY, 0, 0, ATTACK_DISTANCE, 0, SELECT_EFFECT_DONTCARE); - //Found a spell, check if we arn't on cooldown + // Found a spell, check if we arn't on cooldown if (info && !GlobalCooldown) { - //If we are currently moving stop us and set the movement generator + // If we are currently moving stop us and set the movement generator if (!IsSelfRooted) { IsSelfRooted = true; } - //Cast spell - if (Healing) DoCastSpell(m_creature,info); - else DoCastSpell(m_creature->getVictim(),info); + // Cast spell + if (Healing) DoCastSpell(m_creature, info); + else DoCastSpell(m_creature->getVictim(), info); - //Set our global cooldown + // Set our global cooldown GlobalCooldown = GENERIC_CREATURE_COOLDOWN; - }//If no spells available and we arn't moving run to target + }// If no spells available and we arn't moving run to target else if (IsSelfRooted) { - //Cancel our current spell and then allow movement agian + // Cancel our current spell and then allow movement agian m_creature->InterruptNonMeleeSpells(false); IsSelfRooted = false; } diff --git a/scripts/world/npc_professions.cpp b/scripts/world/npc_professions.cpp index 7f8409ee0..04e4781b4 100644 --- a/scripts/world/npc_professions.cpp +++ b/scripts/world/npc_professions.cpp @@ -183,17 +183,17 @@ there is no difference here (except that default text is chosen with `gameobject # formulas to calculate unlearning cost ###*/ -int32 GetLearningCost(Player* pPlayer) //tailor, alchemy +int32 GetLearningCost(Player* pPlayer) // tailor, alchemy { return 200000; } -int32 GetUnlearnCostHigh(Player* pPlayer) //tailor, alchemy +int32 GetUnlearnCostHigh(Player* pPlayer) // tailor, alchemy { return 1500000; } -int32 GetUnlearnCostMedium(Player* pPlayer) //blacksmith, leatherwork +int32 GetUnlearnCostMedium(Player* pPlayer) // blacksmith, leatherwork { uint32 level = pPlayer->getLevel(); @@ -205,7 +205,7 @@ int32 GetUnlearnCostMedium(Player* pPlayer) //blacksmith, leathe return 1000000; } -int32 GetUnlearnCostLow(Player* pPlayer) //blacksmith +int32 GetUnlearnCostLow(Player* pPlayer) // blacksmith { if (pPlayer->getLevel() < 66) return 50000; @@ -224,23 +224,23 @@ bool EquippedOk(Player* pPlayer, uint32 spellId) if (!spell) return false; - for(int i=0; i<3; ++i) + for (int i = 0; i < 3; ++i) { uint32 reqSpell = spell->EffectTriggerSpell[i]; if (!reqSpell) continue; Item* pItem; - for(int j = EQUIPMENT_SLOT_START; j < EQUIPMENT_SLOT_END; ++j) + for (int j = EQUIPMENT_SLOT_START; j < EQUIPMENT_SLOT_END; ++j) { pItem = pPlayer->GetItemByPos(INVENTORY_SLOT_BAG_0, j); if (pItem) if (pItem->GetProto()->RequiredSpell == reqSpell) - { - //pPlayer has item equipped that require specialty. Not allow to unlearn, player has to unequip first - debug_log("SD2: player attempt to unlearn spell %u, but item %u is equipped.",reqSpell,pItem->GetProto()->ItemId); - return false; - } + { + // pPlayer has item equipped that require specialty. Not allow to unlearn, player has to unequip first + debug_log("SD2: player attempt to unlearn spell %u, but item %u is equipped.", reqSpell, pItem->GetProto()->ItemId); + return false; + } } } return true; @@ -251,90 +251,90 @@ void ProfessionUnlearnSpells(Player* pPlayer, uint32 type) switch (type) { case 36436: // S_UNLEARN_WEAPON - pPlayer->removeSpell(36125); // Light Earthforged Blade - pPlayer->removeSpell(36128); // Light Emberforged Hammer - pPlayer->removeSpell(36126); // Light Skyforged Axe + pPlayer->removeSpell(36125); // Light Earthforged Blade + pPlayer->removeSpell(36128); // Light Emberforged Hammer + pPlayer->removeSpell(36126); // Light Skyforged Axe break; case 36435: // S_UNLEARN_ARMOR - pPlayer->removeSpell(36122); // Earthforged Leggings - pPlayer->removeSpell(36129); // Heavy Earthforged Breastplate - pPlayer->removeSpell(36130); // Stormforged Hauberk - pPlayer->removeSpell(34533); // Breastplate of Kings - pPlayer->removeSpell(34529); // Nether Chain Shirt - pPlayer->removeSpell(34534); // Bulwark of Kings - pPlayer->removeSpell(36257); // Bulwark of the Ancient Kings - pPlayer->removeSpell(36256); // Embrace of the Twisting Nether - pPlayer->removeSpell(34530); // Twisting Nether Chain Shirt - pPlayer->removeSpell(36124); // Windforged Leggings + pPlayer->removeSpell(36122); // Earthforged Leggings + pPlayer->removeSpell(36129); // Heavy Earthforged Breastplate + pPlayer->removeSpell(36130); // Stormforged Hauberk + pPlayer->removeSpell(34533); // Breastplate of Kings + pPlayer->removeSpell(34529); // Nether Chain Shirt + pPlayer->removeSpell(34534); // Bulwark of Kings + pPlayer->removeSpell(36257); // Bulwark of the Ancient Kings + pPlayer->removeSpell(36256); // Embrace of the Twisting Nether + pPlayer->removeSpell(34530); // Twisting Nether Chain Shirt + pPlayer->removeSpell(36124); // Windforged Leggings break; case 36441: // S_UNLEARN_HAMMER - pPlayer->removeSpell(36262); // Dragonstrike - pPlayer->removeSpell(34546); // Dragonmaw - pPlayer->removeSpell(34545); // Drakefist Hammer - pPlayer->removeSpell(36136); // Lavaforged Warhammer - pPlayer->removeSpell(34547); // Thunder - pPlayer->removeSpell(34567); // Deep Thunder - pPlayer->removeSpell(36263); // Stormherald - pPlayer->removeSpell(36137); // Great Earthforged Hammer + pPlayer->removeSpell(36262); // Dragonstrike + pPlayer->removeSpell(34546); // Dragonmaw + pPlayer->removeSpell(34545); // Drakefist Hammer + pPlayer->removeSpell(36136); // Lavaforged Warhammer + pPlayer->removeSpell(34547); // Thunder + pPlayer->removeSpell(34567); // Deep Thunder + pPlayer->removeSpell(36263); // Stormherald + pPlayer->removeSpell(36137); // Great Earthforged Hammer break; case 36439: // S_UNLEARN_AXE - pPlayer->removeSpell(36260); // Wicked Edge of the Planes - pPlayer->removeSpell(34562); // Black Planar Edge - pPlayer->removeSpell(34541); // The Planar Edge - pPlayer->removeSpell(36134); // Stormforged Axe - pPlayer->removeSpell(36135); // Skyforged Great Axe - pPlayer->removeSpell(36261); // Bloodmoon - pPlayer->removeSpell(34543); // Lunar Crescent - pPlayer->removeSpell(34544); // Mooncleaver + pPlayer->removeSpell(36260); // Wicked Edge of the Planes + pPlayer->removeSpell(34562); // Black Planar Edge + pPlayer->removeSpell(34541); // The Planar Edge + pPlayer->removeSpell(36134); // Stormforged Axe + pPlayer->removeSpell(36135); // Skyforged Great Axe + pPlayer->removeSpell(36261); // Bloodmoon + pPlayer->removeSpell(34543); // Lunar Crescent + pPlayer->removeSpell(34544); // Mooncleaver break; case 36438: // S_UNLEARN_SWORD - pPlayer->removeSpell(36258); // Blazefury - pPlayer->removeSpell(34537); // Blazeguard - pPlayer->removeSpell(34535); // Fireguard - pPlayer->removeSpell(36131); // Windforged Rapier - pPlayer->removeSpell(36133); // Stoneforged Claymore - pPlayer->removeSpell(34538); // Lionheart Blade - pPlayer->removeSpell(34540); // Lionheart Champion - pPlayer->removeSpell(36259); // Lionheart Executioner + pPlayer->removeSpell(36258); // Blazefury + pPlayer->removeSpell(34537); // Blazeguard + pPlayer->removeSpell(34535); // Fireguard + pPlayer->removeSpell(36131); // Windforged Rapier + pPlayer->removeSpell(36133); // Stoneforged Claymore + pPlayer->removeSpell(34538); // Lionheart Blade + pPlayer->removeSpell(34540); // Lionheart Champion + pPlayer->removeSpell(36259); // Lionheart Executioner break; case 36434: // S_UNLEARN_DRAGON - pPlayer->removeSpell(36076); // Dragonstrike Leggings - pPlayer->removeSpell(36079); // Golden Dragonstrike Breastplate - pPlayer->removeSpell(35576); // Ebon Netherscale Belt - pPlayer->removeSpell(35577); // Ebon Netherscale Bracers - pPlayer->removeSpell(35575); // Ebon Netherscale Breastplate - pPlayer->removeSpell(35582); // Netherstrike Belt - pPlayer->removeSpell(35584); // Netherstrike Bracers - pPlayer->removeSpell(35580); // Netherstrike Breastplate + pPlayer->removeSpell(36076); // Dragonstrike Leggings + pPlayer->removeSpell(36079); // Golden Dragonstrike Breastplate + pPlayer->removeSpell(35576); // Ebon Netherscale Belt + pPlayer->removeSpell(35577); // Ebon Netherscale Bracers + pPlayer->removeSpell(35575); // Ebon Netherscale Breastplate + pPlayer->removeSpell(35582); // Netherstrike Belt + pPlayer->removeSpell(35584); // Netherstrike Bracers + pPlayer->removeSpell(35580); // Netherstrike Breastplate break; case 36328: // S_UNLEARN_ELEMENTAL - pPlayer->removeSpell(36074); // Blackstorm Leggings - pPlayer->removeSpell(36077); // Primalstorm Breastplate - pPlayer->removeSpell(35590); // Primalstrike Belt - pPlayer->removeSpell(35591); // Primalstrike Bracers - pPlayer->removeSpell(35589); // Primalstrike Vest + pPlayer->removeSpell(36074); // Blackstorm Leggings + pPlayer->removeSpell(36077); // Primalstorm Breastplate + pPlayer->removeSpell(35590); // Primalstrike Belt + pPlayer->removeSpell(35591); // Primalstrike Bracers + pPlayer->removeSpell(35589); // Primalstrike Vest break; case 36433: // S_UNLEARN_TRIBAL - pPlayer->removeSpell(35585); // Windhawk Hauberk - pPlayer->removeSpell(35587); // Windhawk Belt - pPlayer->removeSpell(35588); // Windhawk Bracers - pPlayer->removeSpell(36075); // Wildfeather Leggings - pPlayer->removeSpell(36078); // Living Crystal Breastplate + pPlayer->removeSpell(35585); // Windhawk Hauberk + pPlayer->removeSpell(35587); // Windhawk Belt + pPlayer->removeSpell(35588); // Windhawk Bracers + pPlayer->removeSpell(36075); // Wildfeather Leggings + pPlayer->removeSpell(36078); // Living Crystal Breastplate break; case 41299: // S_UNLEARN_SPELLFIRE - pPlayer->removeSpell(26752); // Spellfire Belt - pPlayer->removeSpell(26753); // Spellfire Gloves - pPlayer->removeSpell(26754); // Spellfire Robe + pPlayer->removeSpell(26752); // Spellfire Belt + pPlayer->removeSpell(26753); // Spellfire Gloves + pPlayer->removeSpell(26754); // Spellfire Robe break; case 41558: // S_UNLEARN_MOONCLOTH - pPlayer->removeSpell(26760); // Primal Mooncloth Belt - pPlayer->removeSpell(26761); // Primal Mooncloth Shoulders - pPlayer->removeSpell(26762); // Primal Mooncloth Robe + pPlayer->removeSpell(26760); // Primal Mooncloth Belt + pPlayer->removeSpell(26761); // Primal Mooncloth Shoulders + pPlayer->removeSpell(26762); // Primal Mooncloth Robe break; case 41559: // S_UNLEARN_SHADOWEAVE - pPlayer->removeSpell(26756); // Frozen Shadoweave Shoulders - pPlayer->removeSpell(26757); // Frozen Shadoweave Boots - pPlayer->removeSpell(26758); // Frozen Shadoweave Robe + pPlayer->removeSpell(26756); // Frozen Shadoweave Shoulders + pPlayer->removeSpell(26757); // Frozen Shadoweave Boots + pPlayer->removeSpell(26758); // Frozen Shadoweave Robe break; } } @@ -361,25 +361,25 @@ bool GossipHello_npc_prof_alchemy(Player* pPlayer, Creature* pCreature) uint32 eCreature = pCreature->GetEntry(); - if (pPlayer->HasSkill(SKILL_ALCHEMY) && pPlayer->GetBaseSkillValue(SKILL_ALCHEMY)>=350 && pPlayer->getLevel() > 67) + if (pPlayer->HasSkill(SKILL_ALCHEMY) && pPlayer->GetBaseSkillValue(SKILL_ALCHEMY) >= 350 && pPlayer->getLevel() > 67) { if (pPlayer->GetQuestRewardStatus(10899) || pPlayer->GetQuestRewardStatus(10902) || pPlayer->GetQuestRewardStatus(10897)) { switch (eCreature) { - case 22427: //Zarevhi + case 22427: // Zarevhi if (!HasAlchemySpell(pPlayer)) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LEARN_TRANSMUTE, GOSSIP_SENDER_LEARN, GOSSIP_ACTION_INFO_DEF + 1); if (pPlayer->HasSpell(S_TRANSMUTE)) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_UNLEARN_TRANSMUTE, GOSSIP_SENDER_UNLEARN, GOSSIP_ACTION_INFO_DEF + 4); break; - case 19052: //Lorokeem + case 19052: // Lorokeem if (!HasAlchemySpell(pPlayer)) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LEARN_ELIXIR, GOSSIP_SENDER_LEARN, GOSSIP_ACTION_INFO_DEF + 2); if (pPlayer->HasSpell(S_ELIXIR)) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_UNLEARN_ELIXIR, GOSSIP_SENDER_UNLEARN, GOSSIP_ACTION_INFO_DEF + 5); break; - case 17909: //Lauranna Thar'well + case 17909: // Lauranna Thar'well if (!HasAlchemySpell(pPlayer)) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LEARN_POTION, GOSSIP_SENDER_LEARN, GOSSIP_ACTION_INFO_DEF + 3); if (pPlayer->HasSpell(S_POTION)) @@ -395,7 +395,7 @@ bool GossipHello_npc_prof_alchemy(Player* pPlayer, Creature* pCreature) void SendActionMenu_npc_prof_alchemy(Player* pPlayer, Creature* pCreature, uint32 uiAction) { - switch(uiAction) + switch (uiAction) { case GOSSIP_ACTION_TRADE: pPlayer->SEND_VENDORLIST(pCreature->GetObjectGuid()); @@ -403,14 +403,15 @@ void SendActionMenu_npc_prof_alchemy(Player* pPlayer, Creature* pCreature, uint3 case GOSSIP_ACTION_TRAIN: pPlayer->SEND_TRAINERLIST(pCreature->GetObjectGuid()); break; - //Learn Alchemy + // Learn Alchemy case GOSSIP_ACTION_INFO_DEF + 1: if (!pPlayer->HasSpell(S_TRANSMUTE) && pPlayer->GetMoney() >= uint32(GetLearningCost(pPlayer))) { pPlayer->CastSpell(pPlayer, S_LEARN_TRANSMUTE, true); pPlayer->ModifyMoney(-GetLearningCost(pPlayer)); - } else - pPlayer->SendBuyError(BUY_ERR_NOT_ENOUGHT_MONEY, pCreature, 0, 0); + } + else + pPlayer->SendBuyError(BUY_ERR_NOT_ENOUGHT_MONEY, pCreature, 0, 0); pPlayer->CLOSE_GOSSIP_MENU(); break; case GOSSIP_ACTION_INFO_DEF + 2: @@ -418,8 +419,9 @@ void SendActionMenu_npc_prof_alchemy(Player* pPlayer, Creature* pCreature, uint3 { pPlayer->CastSpell(pPlayer, S_LEARN_ELIXIR, true); pPlayer->ModifyMoney(-GetLearningCost(pPlayer)); - } else - pPlayer->SendBuyError(BUY_ERR_NOT_ENOUGHT_MONEY, pCreature, 0, 0); + } + else + pPlayer->SendBuyError(BUY_ERR_NOT_ENOUGHT_MONEY, pCreature, 0, 0); pPlayer->CLOSE_GOSSIP_MENU(); break; case GOSSIP_ACTION_INFO_DEF + 3: @@ -427,18 +429,20 @@ void SendActionMenu_npc_prof_alchemy(Player* pPlayer, Creature* pCreature, uint3 { pPlayer->CastSpell(pPlayer, S_LEARN_POTION, true); pPlayer->ModifyMoney(-GetLearningCost(pPlayer)); - } else - pPlayer->SendBuyError(BUY_ERR_NOT_ENOUGHT_MONEY, pCreature, 0, 0); + } + else + pPlayer->SendBuyError(BUY_ERR_NOT_ENOUGHT_MONEY, pCreature, 0, 0); pPlayer->CLOSE_GOSSIP_MENU(); break; - //Unlearn Alchemy + // Unlearn Alchemy case GOSSIP_ACTION_INFO_DEF + 4: if (pPlayer->GetMoney() >= uint32(GetUnlearnCostHigh(pPlayer))) { pCreature->CastSpell(pPlayer, S_UNLEARN_TRANSMUTE, true); pPlayer->ModifyMoney(-GetUnlearnCostHigh(pPlayer)); - } else - pPlayer->SendBuyError(BUY_ERR_NOT_ENOUGHT_MONEY, pCreature, 0, 0); + } + else + pPlayer->SendBuyError(BUY_ERR_NOT_ENOUGHT_MONEY, pCreature, 0, 0); pPlayer->CLOSE_GOSSIP_MENU(); break; case GOSSIP_ACTION_INFO_DEF + 5: @@ -446,8 +450,9 @@ void SendActionMenu_npc_prof_alchemy(Player* pPlayer, Creature* pCreature, uint3 { pCreature->CastSpell(pPlayer, S_UNLEARN_ELIXIR, true); pPlayer->ModifyMoney(-GetUnlearnCostHigh(pPlayer)); - } else - pPlayer->SendBuyError(BUY_ERR_NOT_ENOUGHT_MONEY, pCreature, 0, 0); + } + else + pPlayer->SendBuyError(BUY_ERR_NOT_ENOUGHT_MONEY, pCreature, 0, 0); pPlayer->CLOSE_GOSSIP_MENU(); break; case GOSSIP_ACTION_INFO_DEF + 6: @@ -455,8 +460,9 @@ void SendActionMenu_npc_prof_alchemy(Player* pPlayer, Creature* pCreature, uint3 { pCreature->CastSpell(pPlayer, S_UNLEARN_POTION, true); pPlayer->ModifyMoney(-GetUnlearnCostHigh(pPlayer)); - } else - pPlayer->SendBuyError(BUY_ERR_NOT_ENOUGHT_MONEY, pCreature, 0, 0); + } + else + pPlayer->SendBuyError(BUY_ERR_NOT_ENOUGHT_MONEY, pCreature, 0, 0); pPlayer->CLOSE_GOSSIP_MENU(); break; } @@ -467,21 +473,21 @@ void SendConfirmLearn_npc_prof_alchemy(Player* pPlayer, Creature* pCreature, uin if (uiAction) { uint32 eCreature = pCreature->GetEntry(); - switch(eCreature) + switch (eCreature) { case 22427: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LEARN_TRANSMUTE, GOSSIP_SENDER_CHECK, uiAction); - //unknown textID () + // unknown textID () pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); break; case 19052: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LEARN_ELIXIR, GOSSIP_SENDER_CHECK, uiAction); - //unknown textID () + // unknown textID () pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); break; case 17909: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LEARN_POTION, GOSSIP_SENDER_CHECK, uiAction); - //unknown textID () + // unknown textID () pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); break; } @@ -493,21 +499,21 @@ void SendConfirmUnlearn_npc_prof_alchemy(Player* pPlayer, Creature* pCreature, u if (uiAction) { uint32 eCreature = pCreature->GetEntry(); - switch(eCreature) + switch (eCreature) { - case 22427: //Zarevhi - pPlayer->ADD_GOSSIP_ITEM_EXTENDED(0, GOSSIP_UNLEARN_TRANSMUTE, GOSSIP_SENDER_CHECK, uiAction, BOX_UNLEARN_ALCHEMY_SPEC, GetUnlearnCostHigh(pPlayer),false); - //unknown textID () + case 22427: // Zarevhi + pPlayer->ADD_GOSSIP_ITEM_EXTENDED(0, GOSSIP_UNLEARN_TRANSMUTE, GOSSIP_SENDER_CHECK, uiAction, BOX_UNLEARN_ALCHEMY_SPEC, GetUnlearnCostHigh(pPlayer), false); + // unknown textID () pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); break; - case 19052: //Lorokeem - pPlayer->ADD_GOSSIP_ITEM_EXTENDED(0, GOSSIP_UNLEARN_ELIXIR, GOSSIP_SENDER_CHECK, uiAction, BOX_UNLEARN_ALCHEMY_SPEC, GetUnlearnCostHigh(pPlayer),false); - //unknown textID () + case 19052: // Lorokeem + pPlayer->ADD_GOSSIP_ITEM_EXTENDED(0, GOSSIP_UNLEARN_ELIXIR, GOSSIP_SENDER_CHECK, uiAction, BOX_UNLEARN_ALCHEMY_SPEC, GetUnlearnCostHigh(pPlayer), false); + // unknown textID () pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); break; - case 17909: //Lauranna Thar'well - pPlayer->ADD_GOSSIP_ITEM_EXTENDED(0, GOSSIP_UNLEARN_POTION, GOSSIP_SENDER_CHECK, uiAction, BOX_UNLEARN_ALCHEMY_SPEC, GetUnlearnCostHigh(pPlayer),false); - //unknown textID () + case 17909: // Lauranna Thar'well + pPlayer->ADD_GOSSIP_ITEM_EXTENDED(0, GOSSIP_UNLEARN_POTION, GOSSIP_SENDER_CHECK, uiAction, BOX_UNLEARN_ALCHEMY_SPEC, GetUnlearnCostHigh(pPlayer), false); + // unknown textID () pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); break; } @@ -516,7 +522,7 @@ void SendConfirmUnlearn_npc_prof_alchemy(Player* pPlayer, Creature* pCreature, u bool GossipSelect_npc_prof_alchemy(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) { - switch(uiSender) + switch (uiSender) { case GOSSIP_SENDER_MAIN: SendActionMenu_npc_prof_alchemy(pPlayer, pCreature, uiAction); break; case GOSSIP_SENDER_LEARN: SendConfirmLearn_npc_prof_alchemy(pPlayer, pCreature, uiAction); break; @@ -547,48 +553,48 @@ bool GossipHello_npc_prof_blacksmith(Player* pPlayer, Creature* pCreature) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_TRAINER, GOSSIP_TEXT_TRAIN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRAIN); uint32 eCreature = pCreature->GetEntry(); - //WEAPONSMITH & ARMORSMITH - if (pPlayer->GetBaseSkillValue(SKILL_BLACKSMITHING)>=225) + // WEAPONSMITH & ARMORSMITH + if (pPlayer->GetBaseSkillValue(SKILL_BLACKSMITHING) >= 225) { switch (eCreature) { - case 11145: //Myolor Sunderfury - case 11176: //Krathok Moltenfist + case 11145: // Myolor Sunderfury + case 11176: // Krathok Moltenfist if (!pPlayer->HasSpell(S_ARMOR) && !pPlayer->HasSpell(S_WEAPON) && pPlayer->GetReputationRank(REP_ARMOR) == REP_FRIENDLY) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ARMOR_LEARN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); if (!pPlayer->HasSpell(S_WEAPON) && !pPlayer->HasSpell(S_ARMOR) && pPlayer->GetReputationRank(REP_WEAPON) == REP_FRIENDLY) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_WEAPON_LEARN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); break; - case 11146: //Ironus Coldsteel - case 11178: //Borgosh Corebender + case 11146: // Ironus Coldsteel + case 11178: // Borgosh Corebender if (pPlayer->HasSpell(S_WEAPON)) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_WEAPON_UNLEARN, GOSSIP_SENDER_UNLEARN, GOSSIP_ACTION_INFO_DEF + 3); break; - case 5164: //Grumnus Steelshaper - case 11177: //Okothos Ironrager + case 5164: // Grumnus Steelshaper + case 11177: // Okothos Ironrager if (pPlayer->HasSpell(S_ARMOR)) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ARMOR_UNLEARN, GOSSIP_SENDER_UNLEARN, GOSSIP_ACTION_INFO_DEF + 4); break; } } - //WEAPONSMITH SPEC - if (pPlayer->HasSpell(S_WEAPON) && pPlayer->getLevel() > 49 && pPlayer->GetBaseSkillValue(SKILL_BLACKSMITHING)>=250) + // WEAPONSMITH SPEC + if (pPlayer->HasSpell(S_WEAPON) && pPlayer->getLevel() > 49 && pPlayer->GetBaseSkillValue(SKILL_BLACKSMITHING) >= 250) { switch (eCreature) { - case 11191: //Lilith the Lithe + case 11191: // Lilith the Lithe if (!HasWeaponSub(pPlayer)) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LEARN_HAMMER, GOSSIP_SENDER_LEARN, GOSSIP_ACTION_INFO_DEF + 5); if (pPlayer->HasSpell(S_HAMMER)) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_UNLEARN_HAMMER, GOSSIP_SENDER_UNLEARN, GOSSIP_ACTION_INFO_DEF + 8); break; - case 11192: //Kilram + case 11192: // Kilram if (!HasWeaponSub(pPlayer)) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LEARN_AXE, GOSSIP_SENDER_LEARN, GOSSIP_ACTION_INFO_DEF + 6); if (pPlayer->HasSpell(S_AXE)) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_UNLEARN_AXE, GOSSIP_SENDER_UNLEARN, GOSSIP_ACTION_INFO_DEF + 9); break; - case 11193: //Seril Scourgebane + case 11193: // Seril Scourgebane if (!HasWeaponSub(pPlayer)) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LEARN_SWORD, GOSSIP_SENDER_LEARN, GOSSIP_ACTION_INFO_DEF + 7); if (pPlayer->HasSpell(S_SWORD)) @@ -603,7 +609,7 @@ bool GossipHello_npc_prof_blacksmith(Player* pPlayer, Creature* pCreature) void SendActionMenu_npc_prof_blacksmith(Player* pPlayer, Creature* pCreature, uint32 uiAction) { - switch(uiAction) + switch (uiAction) { case GOSSIP_ACTION_TRADE: pPlayer->SEND_VENDORLIST(pCreature->GetObjectGuid()); @@ -611,12 +617,12 @@ void SendActionMenu_npc_prof_blacksmith(Player* pPlayer, Creature* pCreature, ui case GOSSIP_ACTION_TRAIN: pPlayer->SEND_TRAINERLIST(pCreature->GetObjectGuid()); break; - //Learn Armor/Weapon + // Learn Armor/Weapon case GOSSIP_ACTION_INFO_DEF + 1: if (!pPlayer->HasSpell(S_ARMOR)) { pPlayer->CastSpell(pPlayer, S_LEARN_ARMOR, true); - //pCreature->CastSpell(pPlayer, S_REP_ARMOR, true); + // pCreature->CastSpell(pPlayer, S_REP_ARMOR, true); } pPlayer->CLOSE_GOSSIP_MENU(); break; @@ -624,18 +630,18 @@ void SendActionMenu_npc_prof_blacksmith(Player* pPlayer, Creature* pCreature, ui if (!pPlayer->HasSpell(S_WEAPON)) { pPlayer->CastSpell(pPlayer, S_LEARN_WEAPON, true); - //pCreature->CastSpell(pPlayer, S_REP_WEAPON, true); + // pCreature->CastSpell(pPlayer, S_REP_WEAPON, true); } pPlayer->CLOSE_GOSSIP_MENU(); break; - //Unlearn Armor/Weapon + // Unlearn Armor/Weapon case GOSSIP_ACTION_INFO_DEF + 3: if (HasWeaponSub(pPlayer)) { - //unknown textID (TALK_MUST_UNLEARN_WEAPON) + // unknown textID (TALK_MUST_UNLEARN_WEAPON) pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); } - else if (EquippedOk(pPlayer,S_UNLEARN_WEAPON)) + else if (EquippedOk(pPlayer, S_UNLEARN_WEAPON)) { if (pPlayer->GetMoney() >= uint32(GetUnlearnCostLow(pPlayer))) { @@ -644,17 +650,18 @@ void SendActionMenu_npc_prof_blacksmith(Player* pPlayer, Creature* pCreature, ui pPlayer->ModifyMoney(-GetUnlearnCostLow(pPlayer)); pCreature->CastSpell(pPlayer, S_REP_ARMOR, true); pPlayer->CLOSE_GOSSIP_MENU(); - } else - pPlayer->SendBuyError(BUY_ERR_NOT_ENOUGHT_MONEY, pCreature, 0, 0); + } + else + pPlayer->SendBuyError(BUY_ERR_NOT_ENOUGHT_MONEY, pCreature, 0, 0); } else { - pPlayer->SendEquipError(EQUIP_ERR_CANT_DO_RIGHT_NOW,NULL,NULL); + pPlayer->SendEquipError(EQUIP_ERR_CANT_DO_RIGHT_NOW, NULL, NULL); pPlayer->CLOSE_GOSSIP_MENU(); } break; case GOSSIP_ACTION_INFO_DEF + 4: - if (EquippedOk(pPlayer,S_UNLEARN_ARMOR)) + if (EquippedOk(pPlayer, S_UNLEARN_ARMOR)) { if (pPlayer->GetMoney() >= uint32(GetUnlearnCostLow(pPlayer))) { @@ -662,13 +669,15 @@ void SendActionMenu_npc_prof_blacksmith(Player* pPlayer, Creature* pCreature, ui ProfessionUnlearnSpells(pPlayer, S_UNLEARN_ARMOR); pPlayer->ModifyMoney(-GetUnlearnCostLow(pPlayer)); pCreature->CastSpell(pPlayer, S_REP_WEAPON, true); - } else - pPlayer->SendBuyError(BUY_ERR_NOT_ENOUGHT_MONEY, pCreature, 0, 0); - } else - pPlayer->SendEquipError(EQUIP_ERR_CANT_DO_RIGHT_NOW,NULL,NULL); + } + else + pPlayer->SendBuyError(BUY_ERR_NOT_ENOUGHT_MONEY, pCreature, 0, 0); + } + else + pPlayer->SendEquipError(EQUIP_ERR_CANT_DO_RIGHT_NOW, NULL, NULL); pPlayer->CLOSE_GOSSIP_MENU(); break; - //Learn Hammer/Axe/Sword + // Learn Hammer/Axe/Sword case GOSSIP_ACTION_INFO_DEF + 5: pPlayer->CastSpell(pPlayer, S_LEARN_HAMMER, true); pPlayer->CLOSE_GOSSIP_MENU(); @@ -681,47 +690,53 @@ void SendActionMenu_npc_prof_blacksmith(Player* pPlayer, Creature* pCreature, ui pPlayer->CastSpell(pPlayer, S_LEARN_SWORD, true); pPlayer->CLOSE_GOSSIP_MENU(); break; - //Unlearn Hammer/Axe/Sword + // Unlearn Hammer/Axe/Sword case GOSSIP_ACTION_INFO_DEF + 8: - if (EquippedOk(pPlayer,S_UNLEARN_HAMMER)) + if (EquippedOk(pPlayer, S_UNLEARN_HAMMER)) { if (pPlayer->GetMoney() >= uint32(GetUnlearnCostMedium(pPlayer))) { pPlayer->CastSpell(pPlayer, S_UNLEARN_HAMMER, true); ProfessionUnlearnSpells(pPlayer, S_UNLEARN_HAMMER); pPlayer->ModifyMoney(-GetUnlearnCostMedium(pPlayer)); - } else - pPlayer->SendBuyError(BUY_ERR_NOT_ENOUGHT_MONEY, pCreature, 0, 0); - } else - pPlayer->SendEquipError(EQUIP_ERR_CANT_DO_RIGHT_NOW,NULL,NULL); + } + else + pPlayer->SendBuyError(BUY_ERR_NOT_ENOUGHT_MONEY, pCreature, 0, 0); + } + else + pPlayer->SendEquipError(EQUIP_ERR_CANT_DO_RIGHT_NOW, NULL, NULL); pPlayer->CLOSE_GOSSIP_MENU(); break; case GOSSIP_ACTION_INFO_DEF + 9: - if (EquippedOk(pPlayer,S_UNLEARN_AXE)) + if (EquippedOk(pPlayer, S_UNLEARN_AXE)) { if (pPlayer->GetMoney() >= uint32(GetUnlearnCostMedium(pPlayer))) { pPlayer->CastSpell(pPlayer, S_UNLEARN_AXE, true); ProfessionUnlearnSpells(pPlayer, S_UNLEARN_AXE); pPlayer->ModifyMoney(-GetUnlearnCostMedium(pPlayer)); - } else - pPlayer->SendBuyError(BUY_ERR_NOT_ENOUGHT_MONEY, pCreature, 0, 0); - } else - pPlayer->SendEquipError(EQUIP_ERR_CANT_DO_RIGHT_NOW,NULL,NULL); + } + else + pPlayer->SendBuyError(BUY_ERR_NOT_ENOUGHT_MONEY, pCreature, 0, 0); + } + else + pPlayer->SendEquipError(EQUIP_ERR_CANT_DO_RIGHT_NOW, NULL, NULL); pPlayer->CLOSE_GOSSIP_MENU(); break; case GOSSIP_ACTION_INFO_DEF + 10: - if (EquippedOk(pPlayer,S_UNLEARN_SWORD)) + if (EquippedOk(pPlayer, S_UNLEARN_SWORD)) { if (pPlayer->GetMoney() >= uint32(GetUnlearnCostMedium(pPlayer))) { pPlayer->CastSpell(pPlayer, S_UNLEARN_SWORD, true); ProfessionUnlearnSpells(pPlayer, S_UNLEARN_SWORD); pPlayer->ModifyMoney(-GetUnlearnCostMedium(pPlayer)); - } else - pPlayer->SendBuyError(BUY_ERR_NOT_ENOUGHT_MONEY, pCreature, 0, 0); - } else - pPlayer->SendEquipError(EQUIP_ERR_CANT_DO_RIGHT_NOW,NULL,NULL); + } + else + pPlayer->SendBuyError(BUY_ERR_NOT_ENOUGHT_MONEY, pCreature, 0, 0); + } + else + pPlayer->SendEquipError(EQUIP_ERR_CANT_DO_RIGHT_NOW, NULL, NULL); pPlayer->CLOSE_GOSSIP_MENU(); break; } @@ -732,21 +747,21 @@ void SendConfirmLearn_npc_prof_blacksmith(Player* pPlayer, Creature* pCreature, if (uiAction) { uint32 eCreature = pCreature->GetEntry(); - switch(eCreature) + switch (eCreature) { case 11191: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LEARN_HAMMER, GOSSIP_SENDER_CHECK, uiAction); - //unknown textID (TALK_HAMMER_LEARN) + // unknown textID (TALK_HAMMER_LEARN) pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); break; case 11192: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LEARN_AXE, GOSSIP_SENDER_CHECK, uiAction); - //unknown textID (TALK_AXE_LEARN) + // unknown textID (TALK_AXE_LEARN) pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); break; case 11193: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LEARN_SWORD, GOSSIP_SENDER_CHECK, uiAction); - //unknown textID (TALK_SWORD_LEARN) + // unknown textID (TALK_SWORD_LEARN) pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); break; } @@ -758,30 +773,30 @@ void SendConfirmUnlearn_npc_prof_blacksmith(Player* pPlayer, Creature* pCreature if (uiAction) { uint32 eCreature = pCreature->GetEntry(); - switch(eCreature) + switch (eCreature) { - case 11146: //Ironus Coldsteel - case 11178: //Borgosh Corebender - case 5164: //Grumnus Steelshaper - case 11177: //Okothos Ironrager - pPlayer->ADD_GOSSIP_ITEM_EXTENDED(0, GOSSIP_UNLEARN_SMITH_SPEC, GOSSIP_SENDER_CHECK, uiAction, BOX_UNLEARN_ARMORORWEAPON, GetUnlearnCostLow(pPlayer),false); - //unknown textID (TALK_UNLEARN_AXEORWEAPON) + case 11146: // Ironus Coldsteel + case 11178: // Borgosh Corebender + case 5164: // Grumnus Steelshaper + case 11177: // Okothos Ironrager + pPlayer->ADD_GOSSIP_ITEM_EXTENDED(0, GOSSIP_UNLEARN_SMITH_SPEC, GOSSIP_SENDER_CHECK, uiAction, BOX_UNLEARN_ARMORORWEAPON, GetUnlearnCostLow(pPlayer), false); + // unknown textID (TALK_UNLEARN_AXEORWEAPON) pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); break; case 11191: - pPlayer->ADD_GOSSIP_ITEM_EXTENDED(0, GOSSIP_UNLEARN_HAMMER, GOSSIP_SENDER_CHECK, uiAction, BOX_UNLEARN_WEAPON_SPEC, GetUnlearnCostMedium(pPlayer),false); - //unknown textID (TALK_HAMMER_UNLEARN) + pPlayer->ADD_GOSSIP_ITEM_EXTENDED(0, GOSSIP_UNLEARN_HAMMER, GOSSIP_SENDER_CHECK, uiAction, BOX_UNLEARN_WEAPON_SPEC, GetUnlearnCostMedium(pPlayer), false); + // unknown textID (TALK_HAMMER_UNLEARN) pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); break; case 11192: - pPlayer->ADD_GOSSIP_ITEM_EXTENDED(0, GOSSIP_UNLEARN_AXE, GOSSIP_SENDER_CHECK, uiAction, BOX_UNLEARN_WEAPON_SPEC, GetUnlearnCostMedium(pPlayer),false); - //unknown textID (TALK_AXE_UNLEARN) + pPlayer->ADD_GOSSIP_ITEM_EXTENDED(0, GOSSIP_UNLEARN_AXE, GOSSIP_SENDER_CHECK, uiAction, BOX_UNLEARN_WEAPON_SPEC, GetUnlearnCostMedium(pPlayer), false); + // unknown textID (TALK_AXE_UNLEARN) pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); break; case 11193: - pPlayer->ADD_GOSSIP_ITEM_EXTENDED(0, GOSSIP_UNLEARN_SWORD, GOSSIP_SENDER_CHECK, uiAction, BOX_UNLEARN_WEAPON_SPEC, GetUnlearnCostMedium(pPlayer),false); - //unknown textID (TALK_SWORD_UNLEARN) + pPlayer->ADD_GOSSIP_ITEM_EXTENDED(0, GOSSIP_UNLEARN_SWORD, GOSSIP_SENDER_CHECK, uiAction, BOX_UNLEARN_WEAPON_SPEC, GetUnlearnCostMedium(pPlayer), false); + // unknown textID (TALK_SWORD_UNLEARN) pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); break; } @@ -790,7 +805,7 @@ void SendConfirmUnlearn_npc_prof_blacksmith(Player* pPlayer, Creature* pCreature bool GossipSelect_npc_prof_blacksmith(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) { - switch(uiSender) + switch (uiSender) { case GOSSIP_SENDER_MAIN: SendActionMenu_npc_prof_blacksmith(pPlayer, pCreature, uiAction); break; case GOSSIP_SENDER_LEARN: SendConfirmLearn_npc_prof_blacksmith(pPlayer, pCreature, uiAction); break; @@ -802,10 +817,10 @@ bool GossipSelect_npc_prof_blacksmith(Player* pPlayer, Creature* pCreature, uint /*bool QuestComplete_npc_prof_blacksmith(Player* pPlayer, Creature* pCreature, const Quest* pQuest) { - if ((pQuest->GetQuestId() == 5283) || (pQuest->GetQuestId() == 5301)) //armorsmith + if ((pQuest->GetQuestId() == 5283) || (pQuest->GetQuestId() == 5301)) // armorsmith pCreature->CastSpell(pPlayer, 17451, true); - if ((pQuest->GetQuestId() == 5284) || (pQuest->GetQuestId() == 5302)) //weaponsmith + if ((pQuest->GetQuestId() == 5284) || (pQuest->GetQuestId() == 5302)) // weaponsmith pCreature->CastSpell(pPlayer, 17452, true); return true; @@ -826,22 +841,22 @@ bool GossipHello_npc_prof_leather(Player* pPlayer, Creature* pCreature) uint32 eCreature = pCreature->GetEntry(); - if (pPlayer->HasSkill(SKILL_LEATHERWORKING) && pPlayer->GetBaseSkillValue(SKILL_LEATHERWORKING)>=250 && pPlayer->getLevel() > 49) + if (pPlayer->HasSkill(SKILL_LEATHERWORKING) && pPlayer->GetBaseSkillValue(SKILL_LEATHERWORKING) >= 250 && pPlayer->getLevel() > 49) { switch (eCreature) { - case 7866: //Peter Galen - case 7867: //Thorkaf Dragoneye + case 7866: // Peter Galen + case 7867: // Thorkaf Dragoneye if (pPlayer->HasSpell(S_DRAGON)) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_UNLEARN_DRAGON, GOSSIP_SENDER_UNLEARN, GOSSIP_ACTION_INFO_DEF + 1); break; - case 7868: //Sarah Tanner - case 7869: //Brumn Winterhoof + case 7868: // Sarah Tanner + case 7869: // Brumn Winterhoof if (pPlayer->HasSpell(S_ELEMENTAL)) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_UNLEARN_ELEMENTAL, GOSSIP_SENDER_UNLEARN, GOSSIP_ACTION_INFO_DEF + 2); break; - case 7870: //Caryssia Moonhunter - case 7871: //Se'Jib + case 7870: // Caryssia Moonhunter + case 7871: // Se'Jib if (pPlayer->HasSpell(S_TRIBAL)) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_UNLEARN_TRIBAL, GOSSIP_SENDER_UNLEARN, GOSSIP_ACTION_INFO_DEF + 3); break; @@ -854,7 +869,7 @@ bool GossipHello_npc_prof_leather(Player* pPlayer, Creature* pCreature) void SendActionMenu_npc_prof_leather(Player* pPlayer, Creature* pCreature, uint32 uiAction) { - switch(uiAction) + switch (uiAction) { case GOSSIP_ACTION_TRADE: pPlayer->SEND_VENDORLIST(pCreature->GetObjectGuid()); @@ -862,47 +877,53 @@ void SendActionMenu_npc_prof_leather(Player* pPlayer, Creature* pCreature, uint3 case GOSSIP_ACTION_TRAIN: pPlayer->SEND_TRAINERLIST(pCreature->GetObjectGuid()); break; - //Unlearn Leather + // Unlearn Leather case GOSSIP_ACTION_INFO_DEF + 1: - if (EquippedOk(pPlayer,S_UNLEARN_DRAGON)) + if (EquippedOk(pPlayer, S_UNLEARN_DRAGON)) { if (pPlayer->GetMoney() >= uint32(GetUnlearnCostMedium(pPlayer))) { pPlayer->CastSpell(pPlayer, S_UNLEARN_DRAGON, true); ProfessionUnlearnSpells(pPlayer, S_UNLEARN_DRAGON); pPlayer->ModifyMoney(-GetUnlearnCostMedium(pPlayer)); - } else - pPlayer->SendBuyError(BUY_ERR_NOT_ENOUGHT_MONEY, pCreature, 0, 0); - } else - pPlayer->SendEquipError(EQUIP_ERR_CANT_DO_RIGHT_NOW,NULL,NULL); + } + else + pPlayer->SendBuyError(BUY_ERR_NOT_ENOUGHT_MONEY, pCreature, 0, 0); + } + else + pPlayer->SendEquipError(EQUIP_ERR_CANT_DO_RIGHT_NOW, NULL, NULL); pPlayer->CLOSE_GOSSIP_MENU(); break; case GOSSIP_ACTION_INFO_DEF + 2: - if (EquippedOk(pPlayer,S_UNLEARN_ELEMENTAL)) + if (EquippedOk(pPlayer, S_UNLEARN_ELEMENTAL)) { if (pPlayer->GetMoney() >= uint32(GetUnlearnCostMedium(pPlayer))) { pPlayer->CastSpell(pPlayer, S_UNLEARN_ELEMENTAL, true); ProfessionUnlearnSpells(pPlayer, S_UNLEARN_ELEMENTAL); pPlayer->ModifyMoney(-GetUnlearnCostMedium(pPlayer)); - } else - pPlayer->SendBuyError(BUY_ERR_NOT_ENOUGHT_MONEY, pCreature, 0, 0); - } else - pPlayer->SendEquipError(EQUIP_ERR_CANT_DO_RIGHT_NOW,NULL,NULL); + } + else + pPlayer->SendBuyError(BUY_ERR_NOT_ENOUGHT_MONEY, pCreature, 0, 0); + } + else + pPlayer->SendEquipError(EQUIP_ERR_CANT_DO_RIGHT_NOW, NULL, NULL); pPlayer->CLOSE_GOSSIP_MENU(); break; case GOSSIP_ACTION_INFO_DEF + 3: - if (EquippedOk(pPlayer,S_UNLEARN_TRIBAL)) + if (EquippedOk(pPlayer, S_UNLEARN_TRIBAL)) { if (pPlayer->GetMoney() >= uint32(GetUnlearnCostMedium(pPlayer))) { pPlayer->CastSpell(pPlayer, S_UNLEARN_TRIBAL, true); ProfessionUnlearnSpells(pPlayer, S_UNLEARN_TRIBAL); pPlayer->ModifyMoney(-GetUnlearnCostMedium(pPlayer)); - } else - pPlayer->SendBuyError(BUY_ERR_NOT_ENOUGHT_MONEY, pCreature, 0, 0); - } else - pPlayer->SendEquipError(EQUIP_ERR_CANT_DO_RIGHT_NOW,NULL,NULL); + } + else + pPlayer->SendBuyError(BUY_ERR_NOT_ENOUGHT_MONEY, pCreature, 0, 0); + } + else + pPlayer->SendEquipError(EQUIP_ERR_CANT_DO_RIGHT_NOW, NULL, NULL); pPlayer->CLOSE_GOSSIP_MENU(); break; } @@ -913,24 +934,24 @@ void SendConfirmUnlearn_npc_prof_leather(Player* pPlayer, Creature* pCreature, u if (uiAction) { uint32 eCreature = pCreature->GetEntry(); - switch(eCreature) + switch (eCreature) { - case 7866: //Peter Galen - case 7867: //Thorkaf Dragoneye - pPlayer->ADD_GOSSIP_ITEM_EXTENDED(0, GOSSIP_UNLEARN_DRAGON, GOSSIP_SENDER_CHECK, uiAction, BOX_UNLEARN_LEATHER_SPEC, GetUnlearnCostMedium(pPlayer),false); - //unknown textID () + case 7866: // Peter Galen + case 7867: // Thorkaf Dragoneye + pPlayer->ADD_GOSSIP_ITEM_EXTENDED(0, GOSSIP_UNLEARN_DRAGON, GOSSIP_SENDER_CHECK, uiAction, BOX_UNLEARN_LEATHER_SPEC, GetUnlearnCostMedium(pPlayer), false); + // unknown textID () pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); break; - case 7868: //Sarah Tanner - case 7869: //Brumn Winterhoof - pPlayer->ADD_GOSSIP_ITEM_EXTENDED(0, GOSSIP_UNLEARN_ELEMENTAL, GOSSIP_SENDER_CHECK, uiAction, BOX_UNLEARN_LEATHER_SPEC, GetUnlearnCostMedium(pPlayer),false); - //unknown textID () + case 7868: // Sarah Tanner + case 7869: // Brumn Winterhoof + pPlayer->ADD_GOSSIP_ITEM_EXTENDED(0, GOSSIP_UNLEARN_ELEMENTAL, GOSSIP_SENDER_CHECK, uiAction, BOX_UNLEARN_LEATHER_SPEC, GetUnlearnCostMedium(pPlayer), false); + // unknown textID () pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); break; - case 7870: //Caryssia Moonhunter - case 7871: //Se'Jib - pPlayer->ADD_GOSSIP_ITEM_EXTENDED(0, GOSSIP_UNLEARN_TRIBAL, GOSSIP_SENDER_CHECK, uiAction, BOX_UNLEARN_LEATHER_SPEC, GetUnlearnCostMedium(pPlayer),false); - //unknown textID () + case 7870: // Caryssia Moonhunter + case 7871: // Se'Jib + pPlayer->ADD_GOSSIP_ITEM_EXTENDED(0, GOSSIP_UNLEARN_TRIBAL, GOSSIP_SENDER_CHECK, uiAction, BOX_UNLEARN_LEATHER_SPEC, GetUnlearnCostMedium(pPlayer), false); + // unknown textID () pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); break; } @@ -939,7 +960,7 @@ void SendConfirmUnlearn_npc_prof_leather(Player* pPlayer, Creature* pCreature, u bool GossipSelect_npc_prof_leather(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) { - switch(uiSender) + switch (uiSender) { case GOSSIP_SENDER_MAIN: SendActionMenu_npc_prof_leather(pPlayer, pCreature, uiAction); break; case GOSSIP_SENDER_UNLEARN: SendConfirmUnlearn_npc_prof_leather(pPlayer, pCreature, uiAction); break; @@ -969,26 +990,26 @@ bool GossipHello_npc_prof_tailor(Player* pPlayer, Creature* pCreature) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_TRAINER, GOSSIP_TEXT_TRAIN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRAIN); uint32 eCreature = pCreature->GetEntry(); - //TAILORING SPEC - if (pPlayer->HasSkill(SKILL_TAILORING) && pPlayer->GetBaseSkillValue(SKILL_TAILORING)>=350 && pPlayer->getLevel() > 59) + // TAILORING SPEC + if (pPlayer->HasSkill(SKILL_TAILORING) && pPlayer->GetBaseSkillValue(SKILL_TAILORING) >= 350 && pPlayer->getLevel() > 59) { if (pPlayer->GetQuestRewardStatus(10831) || pPlayer->GetQuestRewardStatus(10832) || pPlayer->GetQuestRewardStatus(10833)) { switch (eCreature) { - case 22213: //Gidge Spellweaver + case 22213: // Gidge Spellweaver if (!HasTailorSpell(pPlayer)) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LEARN_SPELLFIRE, GOSSIP_SENDER_LEARN, GOSSIP_ACTION_INFO_DEF + 1); if (pPlayer->HasSpell(S_SPELLFIRE)) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_UNLEARN_SPELLFIRE, GOSSIP_SENDER_UNLEARN, GOSSIP_ACTION_INFO_DEF + 4); break; - case 22208: //Nasmara Moonsong + case 22208: // Nasmara Moonsong if (!HasTailorSpell(pPlayer)) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LEARN_MOONCLOTH, GOSSIP_SENDER_LEARN, GOSSIP_ACTION_INFO_DEF + 2); if (pPlayer->HasSpell(S_MOONCLOTH)) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_UNLEARN_MOONCLOTH, GOSSIP_SENDER_UNLEARN, GOSSIP_ACTION_INFO_DEF + 5); break; - case 22212: //Andrion Darkspinner + case 22212: // Andrion Darkspinner if (!HasTailorSpell(pPlayer)) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LEARN_SHADOWEAVE, GOSSIP_SENDER_LEARN, GOSSIP_ACTION_INFO_DEF + 3); if (pPlayer->HasSpell(S_SHADOWEAVE)) @@ -1004,7 +1025,7 @@ bool GossipHello_npc_prof_tailor(Player* pPlayer, Creature* pCreature) void SendActionMenu_npc_prof_tailor(Player* pPlayer, Creature* pCreature, uint32 uiAction) { - switch(uiAction) + switch (uiAction) { case GOSSIP_ACTION_TRADE: pPlayer->SEND_VENDORLIST(pCreature->GetObjectGuid()); @@ -1012,14 +1033,15 @@ void SendActionMenu_npc_prof_tailor(Player* pPlayer, Creature* pCreature, uint32 case GOSSIP_ACTION_TRAIN: pPlayer->SEND_TRAINERLIST(pCreature->GetObjectGuid()); break; - //Learn Tailor + // Learn Tailor case GOSSIP_ACTION_INFO_DEF + 1: if (!pPlayer->HasSpell(S_SPELLFIRE) && pPlayer->GetMoney() >= uint32(GetLearningCost(pPlayer))) { pPlayer->CastSpell(pPlayer, S_LEARN_SPELLFIRE, true); pPlayer->ModifyMoney(-GetLearningCost(pPlayer)); - } else - pPlayer->SendBuyError(BUY_ERR_NOT_ENOUGHT_MONEY, pCreature, 0, 0); + } + else + pPlayer->SendBuyError(BUY_ERR_NOT_ENOUGHT_MONEY, pCreature, 0, 0); pPlayer->CLOSE_GOSSIP_MENU(); break; case GOSSIP_ACTION_INFO_DEF + 2: @@ -1027,8 +1049,9 @@ void SendActionMenu_npc_prof_tailor(Player* pPlayer, Creature* pCreature, uint32 { pPlayer->CastSpell(pPlayer, S_LEARN_MOONCLOTH, true); pPlayer->ModifyMoney(-GetLearningCost(pPlayer)); - } else - pPlayer->SendBuyError(BUY_ERR_NOT_ENOUGHT_MONEY, pCreature, 0, 0); + } + else + pPlayer->SendBuyError(BUY_ERR_NOT_ENOUGHT_MONEY, pCreature, 0, 0); pPlayer->CLOSE_GOSSIP_MENU(); break; case GOSSIP_ACTION_INFO_DEF + 3: @@ -1036,51 +1059,58 @@ void SendActionMenu_npc_prof_tailor(Player* pPlayer, Creature* pCreature, uint32 { pPlayer->CastSpell(pPlayer, S_LEARN_SHADOWEAVE, true); pPlayer->ModifyMoney(-GetLearningCost(pPlayer)); - } else - pPlayer->SendBuyError(BUY_ERR_NOT_ENOUGHT_MONEY, pCreature, 0, 0); + } + else + pPlayer->SendBuyError(BUY_ERR_NOT_ENOUGHT_MONEY, pCreature, 0, 0); pPlayer->CLOSE_GOSSIP_MENU(); break; - //Unlearn Tailor + // Unlearn Tailor case GOSSIP_ACTION_INFO_DEF + 4: - if (EquippedOk(pPlayer,S_UNLEARN_SPELLFIRE)) + if (EquippedOk(pPlayer, S_UNLEARN_SPELLFIRE)) { if (pPlayer->GetMoney() >= uint32(GetUnlearnCostHigh(pPlayer))) { pPlayer->CastSpell(pPlayer, S_UNLEARN_SPELLFIRE, true); ProfessionUnlearnSpells(pPlayer, S_UNLEARN_SPELLFIRE); pPlayer->ModifyMoney(-GetUnlearnCostHigh(pPlayer)); - } else - pPlayer->SendBuyError(BUY_ERR_NOT_ENOUGHT_MONEY, pCreature, 0, 0); - } else - pPlayer->SendEquipError(EQUIP_ERR_CANT_DO_RIGHT_NOW,NULL,NULL); + } + else + pPlayer->SendBuyError(BUY_ERR_NOT_ENOUGHT_MONEY, pCreature, 0, 0); + } + else + pPlayer->SendEquipError(EQUIP_ERR_CANT_DO_RIGHT_NOW, NULL, NULL); pPlayer->CLOSE_GOSSIP_MENU(); break; case GOSSIP_ACTION_INFO_DEF + 5: - if (EquippedOk(pPlayer,S_UNLEARN_MOONCLOTH)) + if (EquippedOk(pPlayer, S_UNLEARN_MOONCLOTH)) { if (pPlayer->GetMoney() >= uint32(GetUnlearnCostHigh(pPlayer))) { pPlayer->CastSpell(pPlayer, S_UNLEARN_MOONCLOTH, true); ProfessionUnlearnSpells(pPlayer, S_UNLEARN_MOONCLOTH); pPlayer->ModifyMoney(-GetUnlearnCostHigh(pPlayer)); - } else - pPlayer->SendBuyError(BUY_ERR_NOT_ENOUGHT_MONEY, pCreature, 0, 0); - } else - pPlayer->SendEquipError(EQUIP_ERR_CANT_DO_RIGHT_NOW,NULL,NULL); + } + else + pPlayer->SendBuyError(BUY_ERR_NOT_ENOUGHT_MONEY, pCreature, 0, 0); + } + else + pPlayer->SendEquipError(EQUIP_ERR_CANT_DO_RIGHT_NOW, NULL, NULL); pPlayer->CLOSE_GOSSIP_MENU(); break; case GOSSIP_ACTION_INFO_DEF + 6: - if (EquippedOk(pPlayer,S_UNLEARN_SHADOWEAVE)) + if (EquippedOk(pPlayer, S_UNLEARN_SHADOWEAVE)) { if (pPlayer->GetMoney() >= uint32(GetUnlearnCostHigh(pPlayer))) { pPlayer->CastSpell(pPlayer, S_UNLEARN_SHADOWEAVE, true); ProfessionUnlearnSpells(pPlayer, S_UNLEARN_SHADOWEAVE); pPlayer->ModifyMoney(-GetUnlearnCostHigh(pPlayer)); - } else - pPlayer->SendBuyError(BUY_ERR_NOT_ENOUGHT_MONEY, pCreature, 0, 0); - } else - pPlayer->SendEquipError(EQUIP_ERR_CANT_DO_RIGHT_NOW,NULL,NULL); + } + else + pPlayer->SendBuyError(BUY_ERR_NOT_ENOUGHT_MONEY, pCreature, 0, 0); + } + else + pPlayer->SendEquipError(EQUIP_ERR_CANT_DO_RIGHT_NOW, NULL, NULL); pPlayer->CLOSE_GOSSIP_MENU(); break; } @@ -1091,21 +1121,21 @@ void SendConfirmLearn_npc_prof_tailor(Player* pPlayer, Creature* pCreature, uint if (uiAction) { uint32 eCreature = pCreature->GetEntry(); - switch(eCreature) + switch (eCreature) { case 22213: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LEARN_SPELLFIRE, GOSSIP_SENDER_CHECK, uiAction); - //unknown textID () + // unknown textID () pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); break; case 22208: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LEARN_MOONCLOTH, GOSSIP_SENDER_CHECK, uiAction); - //unknown textID () + // unknown textID () pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); break; case 22212: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LEARN_SHADOWEAVE, GOSSIP_SENDER_CHECK, uiAction); - //unknown textID () + // unknown textID () pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); break; } @@ -1117,21 +1147,21 @@ void SendConfirmUnlearn_npc_prof_tailor(Player* pPlayer, Creature* pCreature, ui if (uiAction) { uint32 eCreature = pCreature->GetEntry(); - switch(eCreature) + switch (eCreature) { - case 22213: //Gidge Spellweaver - pPlayer->ADD_GOSSIP_ITEM_EXTENDED(0, GOSSIP_UNLEARN_SPELLFIRE, GOSSIP_SENDER_CHECK, uiAction, BOX_UNLEARN_TAILOR_SPEC, GetUnlearnCostHigh(pPlayer),false); - //unknown textID () + case 22213: // Gidge Spellweaver + pPlayer->ADD_GOSSIP_ITEM_EXTENDED(0, GOSSIP_UNLEARN_SPELLFIRE, GOSSIP_SENDER_CHECK, uiAction, BOX_UNLEARN_TAILOR_SPEC, GetUnlearnCostHigh(pPlayer), false); + // unknown textID () pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); break; - case 22208: //Nasmara Moonsong - pPlayer->ADD_GOSSIP_ITEM_EXTENDED(0, GOSSIP_UNLEARN_MOONCLOTH, GOSSIP_SENDER_CHECK, uiAction, BOX_UNLEARN_TAILOR_SPEC, GetUnlearnCostHigh(pPlayer),false); - //unknown textID () + case 22208: // Nasmara Moonsong + pPlayer->ADD_GOSSIP_ITEM_EXTENDED(0, GOSSIP_UNLEARN_MOONCLOTH, GOSSIP_SENDER_CHECK, uiAction, BOX_UNLEARN_TAILOR_SPEC, GetUnlearnCostHigh(pPlayer), false); + // unknown textID () pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); break; - case 22212: //Andrion Darkspinner - pPlayer->ADD_GOSSIP_ITEM_EXTENDED(0, GOSSIP_UNLEARN_SHADOWEAVE, GOSSIP_SENDER_CHECK, uiAction,BOX_UNLEARN_TAILOR_SPEC, GetUnlearnCostHigh(pPlayer),false); - //unknown textID () + case 22212: // Andrion Darkspinner + pPlayer->ADD_GOSSIP_ITEM_EXTENDED(0, GOSSIP_UNLEARN_SHADOWEAVE, GOSSIP_SENDER_CHECK, uiAction, BOX_UNLEARN_TAILOR_SPEC, GetUnlearnCostHigh(pPlayer), false); + // unknown textID () pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); break; } @@ -1140,7 +1170,7 @@ void SendConfirmUnlearn_npc_prof_tailor(Player* pPlayer, Creature* pCreature, ui bool GossipSelect_npc_prof_tailor(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) { - switch(uiSender) + switch (uiSender) { case GOSSIP_SENDER_MAIN: SendActionMenu_npc_prof_tailor(pPlayer, pCreature, uiAction); break; case GOSSIP_SENDER_LEARN: SendConfirmLearn_npc_prof_tailor(pPlayer, pCreature, uiAction); break; @@ -1198,6 +1228,6 @@ void AddSC_npc_professions() /*pNewScript = new Script; pNewScript->Name = "go_soothsaying_for_dummies"; pNewScript->pGOUse = &GOUse_go_soothsaying_for_dummies; - //pNewScript->pGossipSelect = &GossipSelect_go_soothsaying_for_dummies; + // pNewScript->pGossipSelect = &GossipSelect_go_soothsaying_for_dummies; pNewScript->RegisterSelf();*/ } diff --git a/scripts/world/npcs_special.cpp b/scripts/world/npcs_special.cpp index 842d0d1a9..af014b3d3 100644 --- a/scripts/world/npcs_special.cpp +++ b/scripts/world/npcs_special.cpp @@ -72,33 +72,33 @@ const float RANGE_GUARDS_MARK = 50.0f; SpawnAssociation m_aSpawnAssociations[] = { - {2614, 15241, SPAWNTYPE_ALARMBOT}, //Air Force Alarm Bot (Alliance) - {2615, 15242, SPAWNTYPE_ALARMBOT}, //Air Force Alarm Bot (Horde) - {21974, 21976, SPAWNTYPE_ALARMBOT}, //Air Force Alarm Bot (Area 52) - {21993, 15242, SPAWNTYPE_ALARMBOT}, //Air Force Guard Post (Horde - Bat Rider) - {21996, 15241, SPAWNTYPE_ALARMBOT}, //Air Force Guard Post (Alliance - Gryphon) - {21997, 21976, SPAWNTYPE_ALARMBOT}, //Air Force Guard Post (Goblin - Area 52 - Zeppelin) - {21999, 15241, SPAWNTYPE_TRIPWIRE_ROOFTOP}, //Air Force Trip Wire - Rooftop (Alliance) - {22001, 15242, SPAWNTYPE_TRIPWIRE_ROOFTOP}, //Air Force Trip Wire - Rooftop (Horde) - {22002, 15242, SPAWNTYPE_TRIPWIRE_ROOFTOP}, //Air Force Trip Wire - Ground (Horde) - {22003, 15241, SPAWNTYPE_TRIPWIRE_ROOFTOP}, //Air Force Trip Wire - Ground (Alliance) - {22063, 21976, SPAWNTYPE_TRIPWIRE_ROOFTOP}, //Air Force Trip Wire - Rooftop (Goblin - Area 52) - {22065, 22064, SPAWNTYPE_ALARMBOT}, //Air Force Guard Post (Ethereal - Stormspire) - {22066, 22067, SPAWNTYPE_ALARMBOT}, //Air Force Guard Post (Scryer - Dragonhawk) - {22068, 22064, SPAWNTYPE_TRIPWIRE_ROOFTOP}, //Air Force Trip Wire - Rooftop (Ethereal - Stormspire) - {22069, 22064, SPAWNTYPE_ALARMBOT}, //Air Force Alarm Bot (Stormspire) - {22070, 22067, SPAWNTYPE_TRIPWIRE_ROOFTOP}, //Air Force Trip Wire - Rooftop (Scryer) - {22071, 22067, SPAWNTYPE_ALARMBOT}, //Air Force Alarm Bot (Scryer) - {22078, 22077, SPAWNTYPE_ALARMBOT}, //Air Force Alarm Bot (Aldor) - {22079, 22077, SPAWNTYPE_ALARMBOT}, //Air Force Guard Post (Aldor - Gryphon) - {22080, 22077, SPAWNTYPE_TRIPWIRE_ROOFTOP}, //Air Force Trip Wire - Rooftop (Aldor) - {22086, 22085, SPAWNTYPE_ALARMBOT}, //Air Force Alarm Bot (Sporeggar) - {22087, 22085, SPAWNTYPE_ALARMBOT}, //Air Force Guard Post (Sporeggar - Spore Bat) - {22088, 22085, SPAWNTYPE_TRIPWIRE_ROOFTOP}, //Air Force Trip Wire - Rooftop (Sporeggar) - {22090, 22089, SPAWNTYPE_ALARMBOT}, //Air Force Guard Post (Toshley's Station - Flying Machine) - {22124, 22122, SPAWNTYPE_ALARMBOT}, //Air Force Alarm Bot (Cenarion) - {22125, 22122, SPAWNTYPE_ALARMBOT}, //Air Force Guard Post (Cenarion - Stormcrow) - {22126, 22122, SPAWNTYPE_ALARMBOT} //Air Force Trip Wire - Rooftop (Cenarion Expedition) + {2614, 15241, SPAWNTYPE_ALARMBOT}, // Air Force Alarm Bot (Alliance) + {2615, 15242, SPAWNTYPE_ALARMBOT}, // Air Force Alarm Bot (Horde) + {21974, 21976, SPAWNTYPE_ALARMBOT}, // Air Force Alarm Bot (Area 52) + {21993, 15242, SPAWNTYPE_ALARMBOT}, // Air Force Guard Post (Horde - Bat Rider) + {21996, 15241, SPAWNTYPE_ALARMBOT}, // Air Force Guard Post (Alliance - Gryphon) + {21997, 21976, SPAWNTYPE_ALARMBOT}, // Air Force Guard Post (Goblin - Area 52 - Zeppelin) + {21999, 15241, SPAWNTYPE_TRIPWIRE_ROOFTOP}, // Air Force Trip Wire - Rooftop (Alliance) + {22001, 15242, SPAWNTYPE_TRIPWIRE_ROOFTOP}, // Air Force Trip Wire - Rooftop (Horde) + {22002, 15242, SPAWNTYPE_TRIPWIRE_ROOFTOP}, // Air Force Trip Wire - Ground (Horde) + {22003, 15241, SPAWNTYPE_TRIPWIRE_ROOFTOP}, // Air Force Trip Wire - Ground (Alliance) + {22063, 21976, SPAWNTYPE_TRIPWIRE_ROOFTOP}, // Air Force Trip Wire - Rooftop (Goblin - Area 52) + {22065, 22064, SPAWNTYPE_ALARMBOT}, // Air Force Guard Post (Ethereal - Stormspire) + {22066, 22067, SPAWNTYPE_ALARMBOT}, // Air Force Guard Post (Scryer - Dragonhawk) + {22068, 22064, SPAWNTYPE_TRIPWIRE_ROOFTOP}, // Air Force Trip Wire - Rooftop (Ethereal - Stormspire) + {22069, 22064, SPAWNTYPE_ALARMBOT}, // Air Force Alarm Bot (Stormspire) + {22070, 22067, SPAWNTYPE_TRIPWIRE_ROOFTOP}, // Air Force Trip Wire - Rooftop (Scryer) + {22071, 22067, SPAWNTYPE_ALARMBOT}, // Air Force Alarm Bot (Scryer) + {22078, 22077, SPAWNTYPE_ALARMBOT}, // Air Force Alarm Bot (Aldor) + {22079, 22077, SPAWNTYPE_ALARMBOT}, // Air Force Guard Post (Aldor - Gryphon) + {22080, 22077, SPAWNTYPE_TRIPWIRE_ROOFTOP}, // Air Force Trip Wire - Rooftop (Aldor) + {22086, 22085, SPAWNTYPE_ALARMBOT}, // Air Force Alarm Bot (Sporeggar) + {22087, 22085, SPAWNTYPE_ALARMBOT}, // Air Force Guard Post (Sporeggar - Spore Bat) + {22088, 22085, SPAWNTYPE_TRIPWIRE_ROOFTOP}, // Air Force Trip Wire - Rooftop (Sporeggar) + {22090, 22089, SPAWNTYPE_ALARMBOT}, // Air Force Guard Post (Toshley's Station - Flying Machine) + {22124, 22122, SPAWNTYPE_ALARMBOT}, // Air Force Alarm Bot (Cenarion) + {22125, 22122, SPAWNTYPE_ALARMBOT}, // Air Force Guard Post (Cenarion - Stormcrow) + {22126, 22122, SPAWNTYPE_ALARMBOT} // Air Force Trip Wire - Rooftop (Cenarion Expedition) }; struct MANGOS_DLL_DECL npc_air_force_botsAI : public ScriptedAI @@ -181,7 +181,7 @@ struct MANGOS_DLL_DECL npc_air_force_botsAI : public ScriptedAI if (!pLastSpawnedGuard) m_spawnedGuid.Clear(); - switch(m_pSpawnAssoc->m_SpawnType) + switch (m_pSpawnAssoc->m_SpawnType) { case SPAWNTYPE_ALARMBOT: { @@ -381,7 +381,7 @@ struct MANGOS_DLL_DECL npc_dancing_flamesAI : public ScriptedAI pPlayer->RemoveSpellsCausingAura(SPELL_AURA_MOUNTED); } - switch(uiEmote) + switch (uiEmote) { case TEXTEMOTE_DANCE: DoCastSpellIfCan(pPlayer, SPELL_FIERY_SEDUCTION); break;// dance -> cast SPELL_FIERY_SEDUCTION case TEXTEMOTE_WAVE: m_creature->HandleEmote(EMOTE_ONESHOT_WAVE); break;// wave -> wave @@ -421,33 +421,33 @@ struct Location float x, y, z, o; }; -static Location AllianceCoords[]= +static Location AllianceCoords[] = { - {-3757.38f, -4533.05f, 14.16f, 3.62f}, // Top-far-right bunk as seen from entrance - {-3754.36f, -4539.13f, 14.16f, 5.13f}, // Top-far-left bunk - {-3749.54f, -4540.25f, 14.28f, 3.34f}, // Far-right bunk - {-3742.10f, -4536.85f, 14.28f, 3.64f}, // Right bunk near entrance - {-3755.89f, -4529.07f, 14.05f, 0.57f}, // Far-left bunk - {-3749.51f, -4527.08f, 14.07f, 5.26f}, // Mid-left bunk - {-3746.37f, -4525.35f, 14.16f, 5.22f}, // Left bunk near entrance + { -3757.38f, -4533.05f, 14.16f, 3.62f}, // Top-far-right bunk as seen from entrance + { -3754.36f, -4539.13f, 14.16f, 5.13f}, // Top-far-left bunk + { -3749.54f, -4540.25f, 14.28f, 3.34f}, // Far-right bunk + { -3742.10f, -4536.85f, 14.28f, 3.64f}, // Right bunk near entrance + { -3755.89f, -4529.07f, 14.05f, 0.57f}, // Far-left bunk + { -3749.51f, -4527.08f, 14.07f, 5.26f}, // Mid-left bunk + { -3746.37f, -4525.35f, 14.16f, 5.22f}, // Left bunk near entrance }; -//alliance run to where +// alliance run to where #define A_RUNTOX -3742.96f #define A_RUNTOY -4531.52f #define A_RUNTOZ 11.91f -static Location HordeCoords[]= +static Location HordeCoords[] = { - {-1013.75f, -3492.59f, 62.62f, 4.34f}, // Left, Behind - {-1017.72f, -3490.92f, 62.62f, 4.34f}, // Right, Behind - {-1015.77f, -3497.15f, 62.82f, 4.34f}, // Left, Mid - {-1019.51f, -3495.49f, 62.82f, 4.34f}, // Right, Mid - {-1017.25f, -3500.85f, 62.98f, 4.34f}, // Left, front - {-1020.95f, -3499.21f, 62.98f, 4.34f} // Right, Front + { -1013.75f, -3492.59f, 62.62f, 4.34f}, // Left, Behind + { -1017.72f, -3490.92f, 62.62f, 4.34f}, // Right, Behind + { -1015.77f, -3497.15f, 62.82f, 4.34f}, // Left, Mid + { -1019.51f, -3495.49f, 62.82f, 4.34f}, // Right, Mid + { -1017.25f, -3500.85f, 62.98f, 4.34f}, // Left, front + { -1020.95f, -3499.21f, 62.98f, 4.34f} // Right, Front }; -//horde run to where +// horde run to where #define H_RUNTOX -1016.44f #define H_RUNTOY -3508.48f #define H_RUNTOZ 62.96f @@ -461,9 +461,9 @@ const uint32 AllianceSoldierId[3] = const uint32 HordeSoldierId[3] = { - 12923, //12923 Injured Soldier - 12924, //12924 Badly injured Soldier - 12925 //12925 Critically injured Soldier + 12923, // 12923 Injured Soldier + 12924, // 12924 Badly injured Soldier + 12925 // 12925 Critically injured Soldier }; /*###### @@ -525,33 +525,34 @@ struct MANGOS_DLL_DECL npc_injured_patientAI : public ScriptedAI m_doctorGuid.Clear(); Coord = NULL; - //no select + // no select m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - //no regen health + // no regen health m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IN_COMBAT); - //to make them lay with face down + // to make them lay with face down m_creature->SetStandState(UNIT_STAND_STATE_DEAD); uint32 mobId = m_creature->GetEntry(); switch (mobId) - { //lower max health + { + // lower max health case 12923: - case 12938: //Injured Soldier + case 12938: // Injured Soldier m_creature->SetHealth(uint32(m_creature->GetMaxHealth()*.75)); break; case 12924: - case 12936: //Badly injured Soldier + case 12936: // Badly injured Soldier m_creature->SetHealth(uint32(m_creature->GetMaxHealth()*.50)); break; case 12925: - case 12937: //Critically injured Soldier + case 12937: // Critically injured Soldier m_creature->SetHealth(uint32(m_creature->GetMaxHealth()*.25)); break; } } - void SpellHit(Unit *caster, const SpellEntry *spell) + void SpellHit(Unit* caster, const SpellEntry* spell) { if (caster->GetTypeId() == TYPEID_PLAYER && m_creature->isAlive() && spell->Id == 20804) { @@ -566,18 +567,18 @@ struct MANGOS_DLL_DECL npc_injured_patientAI : public ScriptedAI } } } - //make not selectable + // make not selectable m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - //regen health + // regen health m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IN_COMBAT); - //stand up + // stand up m_creature->SetStandState(UNIT_STAND_STATE_STAND); - switch(urand(0, 2)) + switch (urand(0, 2)) { - case 0: DoScriptText(SAY_DOC1,m_creature); break; - case 1: DoScriptText(SAY_DOC2,m_creature); break; - case 2: DoScriptText(SAY_DOC3,m_creature); break; + case 0: DoScriptText(SAY_DOC1, m_creature); break; + case 1: DoScriptText(SAY_DOC2, m_creature); break; + case 2: DoScriptText(SAY_DOC3, m_creature); break; } m_creature->SetWalk(false); @@ -602,7 +603,7 @@ struct MANGOS_DLL_DECL npc_injured_patientAI : public ScriptedAI void UpdateAI(const uint32 diff) { - //lower HP on every world tick makes it a useful counter, not officlone though + // lower HP on every world tick makes it a useful counter, not officlone though uint32 uiHPLose = uint32(0.05f * diff); if (m_creature->isAlive() && m_creature->GetHealth() > 1 + uiHPLose) { @@ -646,14 +647,14 @@ void npc_doctorAI::BeginEvent(Player* pPlayer) PatientDiedCount = 0; PatientSavedCount = 0; - switch(m_creature->GetEntry()) + switch (m_creature->GetEntry()) { case DOCTOR_ALLIANCE: - for(uint8 i = 0; i < ALLIANCE_COORDS; ++i) + for (uint8 i = 0; i < ALLIANCE_COORDS; ++i) Coordinates.push_back(&AllianceCoords[i]); break; case DOCTOR_HORDE: - for(uint8 i = 0; i < HORDE_COORDS; ++i) + for (uint8 i = 0; i < HORDE_COORDS; ++i) Coordinates.push_back(&HordeCoords[i]); break; } @@ -698,7 +699,7 @@ void npc_doctorAI::PatientSaved(Creature* soldier, Player* pPlayer, Location* Po if (PatientSavedCount == 15) { - for(GuidList::const_iterator itr = Patients.begin(); itr != Patients.end(); ++itr) + for (GuidList::const_iterator itr = Patients.begin(); itr != Patients.end(); ++itr) { if (Creature* Patient = m_creature->GetMap()->GetCreature(*itr)) Patient->SetDeathState(JUST_DIED); @@ -736,10 +737,10 @@ void npc_doctorAI::UpdateAI(const uint32 diff) if (Coordinates.empty()) return; - std::vector::iterator itr = Coordinates.begin()+rand()%Coordinates.size(); + std::vector::iterator itr = Coordinates.begin() + rand() % Coordinates.size(); uint32 patientEntry = 0; - switch(m_creature->GetEntry()) + switch (m_creature->GetEntry()) { case DOCTOR_ALLIANCE: patientEntry = AllianceSoldierId[urand(0, 2)]; break; case DOCTOR_HORDE: patientEntry = HordeSoldierId[urand(0, 2)]; break; @@ -754,7 +755,7 @@ void npc_doctorAI::UpdateAI(const uint32 diff) if (Patient) { - //303, this flag appear to be required for client side item->spell to work (TARGET_SINGLE_FRIEND) + // 303, this flag appear to be required for client side item->spell to work (TARGET_SINGLE_FRIEND) Patient->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PVP_ATTACKABLE); Patients.push_back(Patient->GetObjectGuid()); @@ -773,7 +774,8 @@ void npc_doctorAI::UpdateAI(const uint32 diff) } SummonPatient_Timer = 10000; ++SummonPatientCount; - }else SummonPatient_Timer -= diff; + } + else SummonPatient_Timer -= diff; } } @@ -849,7 +851,7 @@ struct MANGOS_DLL_DECL npc_garments_of_questsAI : public npc_escortAI m_creature->SetStandState(UNIT_STAND_STATE_KNEEL); // expect database to have RegenHealth=0 - m_creature->SetHealth(int(m_creature->GetMaxHealth()*0.7)); + m_creature->SetHealth(int(m_creature->GetMaxHealth() * 0.7)); } void SpellHit(Unit* pCaster, const SpellEntry* pSpell) @@ -866,7 +868,7 @@ struct MANGOS_DLL_DECL npc_garments_of_questsAI : public npc_escortAI if (pCaster->GetTypeId() == TYPEID_PLAYER) { - switch(m_creature->GetEntry()) + switch (m_creature->GetEntry()) { case ENTRY_SHAYA: if (((Player*)pCaster)->GetQuestStatus(QUEST_MOON) == QUEST_STATUS_INCOMPLETE) @@ -972,7 +974,7 @@ struct MANGOS_DLL_DECL npc_garments_of_questsAI : public npc_escortAI { if (Player* pPlayer = m_creature->GetMap()->GetPlayer(m_playerGuid)) { - switch(m_creature->GetEntry()) + switch (m_creature->GetEntry()) { case ENTRY_SHAYA: DoScriptText(SAY_SHAYA_GOODBYE, m_creature, pPlayer); break; case ENTRY_ROBERTS: DoScriptText(SAY_ROBERTS_GOODBYE, m_creature, pPlayer); break; @@ -1026,7 +1028,7 @@ struct MANGOS_DLL_DECL npc_guardianAI : public ScriptedAI if (m_creature->isAttackReady()) { - m_creature->CastSpell(m_creature->getVictim(),SPELL_DEATHTOUCH, true); + m_creature->CastSpell(m_creature->getVictim(), SPELL_DEATHTOUCH, true); m_creature->resetAttackTimer(); } } @@ -1049,8 +1051,8 @@ enum { TEXT_ID_WHAT_TO_DO = 1853, - SPELL_TRICK_OR_TREAT = 24751, // create item or random buff - SPELL_TRICK_OR_TREATED = 24755, // buff player get when tricked or treated + SPELL_TRICK_OR_TREAT = 24751, // create item or random buff + SPELL_TRICK_OR_TREATED = 24755, // buff player get when tricked or treated }; #define GOSSIP_ITEM_TRICK_OR_TREAT "Trick or Treat!" @@ -1061,13 +1063,13 @@ bool GossipHello_npc_innkeeper(Player* pPlayer, Creature* pCreature) pPlayer->PrepareGossipMenu(pCreature, pPlayer->GetDefaultGossipMenuForSource(pCreature)); if (IsHolidayActive(HOLIDAY_HALLOWS_END) && !pPlayer->HasAura(SPELL_TRICK_OR_TREATED, EFFECT_INDEX_0)) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_TRICK_OR_TREAT, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_TRICK_OR_TREAT, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); // Should only apply to innkeeper close to start areas. if (AreaTableEntry const* pAreaEntry = GetAreaEntryByAreaID(pCreature->GetAreaId())) { if (pAreaEntry->flags & AREA_FLAG_LOWLEVEL) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_WHAT_TO_DO, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_WHAT_TO_DO, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); } pPlayer->TalkedToCreature(pCreature->GetEntry(), pCreature->GetObjectGuid()); @@ -1077,7 +1079,7 @@ bool GossipHello_npc_innkeeper(Player* pPlayer, Creature* pCreature) bool GossipSelect_npc_innkeeper(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) { - switch(uiAction) + switch (uiAction) { case GOSSIP_ACTION_INFO_DEF+1: pPlayer->SEND_GOSSIP_MENU(TEXT_ID_WHAT_TO_DO, pCreature->GetObjectGuid()); @@ -1114,55 +1116,55 @@ bool GossipHello_npc_mount_vendor(Player* pPlayer, Creature* pCreature) switch (vendor) { - case 384: //Katie Hunter - case 1460: //Unger Statforth - case 2357: //Merideth Carlson - case 4885: //Gregor MacVince + case 384: // Katie Hunter + case 1460: // Unger Statforth + case 2357: // Merideth Carlson + case 4885: // Gregor MacVince if (pPlayer->GetReputationRank(72) != REP_EXALTED && race != RACE_HUMAN) pPlayer->SEND_GOSSIP_MENU(5855, pCreature->GetObjectGuid()); else canBuy = true; break; - case 1261: //Veron Amberstill + case 1261: // Veron Amberstill if (pPlayer->GetReputationRank(47) != REP_EXALTED && race != RACE_DWARF) pPlayer->SEND_GOSSIP_MENU(5856, pCreature->GetObjectGuid()); else canBuy = true; break; - case 3362: //Ogunaro Wolfrunner + case 3362: // Ogunaro Wolfrunner if (pPlayer->GetReputationRank(76) != REP_EXALTED && race != RACE_ORC) pPlayer->SEND_GOSSIP_MENU(5841, pCreature->GetObjectGuid()); else canBuy = true; break; - case 3685: //Harb Clawhoof + case 3685: // Harb Clawhoof if (pPlayer->GetReputationRank(81) != REP_EXALTED && race != RACE_TAUREN) pPlayer->SEND_GOSSIP_MENU(5843, pCreature->GetObjectGuid()); else canBuy = true; break; - case 4730: //Lelanai + case 4730: // Lelanai if (pPlayer->GetReputationRank(69) != REP_EXALTED && race != RACE_NIGHTELF) pPlayer->SEND_GOSSIP_MENU(5844, pCreature->GetObjectGuid()); else canBuy = true; break; - case 4731: //Zachariah Post + case 4731: // Zachariah Post if (pPlayer->GetReputationRank(68) != REP_EXALTED && race != RACE_UNDEAD) pPlayer->SEND_GOSSIP_MENU(5840, pCreature->GetObjectGuid()); else canBuy = true; break; - case 7952: //Zjolnir + case 7952: // Zjolnir if (pPlayer->GetReputationRank(530) != REP_EXALTED && race != RACE_TROLL) pPlayer->SEND_GOSSIP_MENU(5842, pCreature->GetObjectGuid()); else canBuy = true; break; - case 7955: //Milli Featherwhistle + case 7955: // Milli Featherwhistle if (pPlayer->GetReputationRank(54) != REP_EXALTED && race != RACE_GNOME) pPlayer->SEND_GOSSIP_MENU(5857, pCreature->GetObjectGuid()); else canBuy = true; break; - case 16264: //Winaestra + case 16264: // Winaestra if (pPlayer->GetReputationRank(911) != REP_EXALTED && race != RACE_BLOODELF) pPlayer->SEND_GOSSIP_MENU(10305, pCreature->GetObjectGuid()); else canBuy = true; break; - case 17584: //Torallius the Pack Handler + case 17584: // Torallius the Pack Handler if (pPlayer->GetReputationRank(930) != REP_EXALTED && race != RACE_DRAENEI) pPlayer->SEND_GOSSIP_MENU(10239, pCreature->GetObjectGuid()); else canBuy = true; @@ -1190,15 +1192,15 @@ bool GossipSelect_npc_mount_vendor(Player* pPlayer, Creature* pCreature, uint32 ## npc_sayge ######*/ -#define SPELL_DMG 23768 //dmg -#define SPELL_RES 23769 //res -#define SPELL_ARM 23767 //arm -#define SPELL_SPI 23738 //spi -#define SPELL_INT 23766 //int -#define SPELL_STM 23737 //stm -#define SPELL_STR 23735 //str -#define SPELL_AGI 23736 //agi -#define SPELL_FORTUNE 23765 //faire fortune +#define SPELL_DMG 23768 // dmg +#define SPELL_RES 23769 // res +#define SPELL_ARM 23767 // arm +#define SPELL_SPI 23738 // spi +#define SPELL_INT 23766 // int +#define SPELL_STM 23737 // stm +#define SPELL_STR 23735 // str +#define SPELL_AGI 23736 // agi +#define SPELL_FORTUNE 23765 // faire fortune bool GossipHello_npc_sayge(Player* pPlayer, Creature* pCreature) { @@ -1206,17 +1208,17 @@ bool GossipHello_npc_sayge(Player* pPlayer, Creature* pCreature) pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); if (pPlayer->HasSpellCooldown(SPELL_INT) || - pPlayer->HasSpellCooldown(SPELL_ARM) || - pPlayer->HasSpellCooldown(SPELL_DMG) || - pPlayer->HasSpellCooldown(SPELL_RES) || - pPlayer->HasSpellCooldown(SPELL_STR) || - pPlayer->HasSpellCooldown(SPELL_AGI) || - pPlayer->HasSpellCooldown(SPELL_STM) || - pPlayer->HasSpellCooldown(SPELL_SPI)) + pPlayer->HasSpellCooldown(SPELL_ARM) || + pPlayer->HasSpellCooldown(SPELL_DMG) || + pPlayer->HasSpellCooldown(SPELL_RES) || + pPlayer->HasSpellCooldown(SPELL_STR) || + pPlayer->HasSpellCooldown(SPELL_AGI) || + pPlayer->HasSpellCooldown(SPELL_STM) || + pPlayer->HasSpellCooldown(SPELL_SPI)) pPlayer->SEND_GOSSIP_MENU(7393, pCreature->GetObjectGuid()); else { - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Yes", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Yes", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); pPlayer->SEND_GOSSIP_MENU(7339, pCreature->GetObjectGuid()); } @@ -1225,41 +1227,41 @@ bool GossipHello_npc_sayge(Player* pPlayer, Creature* pCreature) void SendAction_npc_sayge(Player* pPlayer, Creature* pCreature, uint32 uiAction) { - switch(uiAction) + switch (uiAction) { case GOSSIP_ACTION_INFO_DEF+1: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Slay the Man", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Turn him over to liege", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3); - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Confiscate the corn", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+4); - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Let him go and have the corn", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+5); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Slay the Man", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Turn him over to liege", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Confiscate the corn", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Let him go and have the corn", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 5); pPlayer->SEND_GOSSIP_MENU(7340, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+2: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Execute your friend painfully", GOSSIP_SENDER_MAIN+1, GOSSIP_ACTION_INFO_DEF); - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Execute your friend painlessly", GOSSIP_SENDER_MAIN+2, GOSSIP_ACTION_INFO_DEF); - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Let your friend go", GOSSIP_SENDER_MAIN+3, GOSSIP_ACTION_INFO_DEF); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Execute your friend painfully", GOSSIP_SENDER_MAIN + 1, GOSSIP_ACTION_INFO_DEF); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Execute your friend painlessly", GOSSIP_SENDER_MAIN + 2, GOSSIP_ACTION_INFO_DEF); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Let your friend go", GOSSIP_SENDER_MAIN + 3, GOSSIP_ACTION_INFO_DEF); pPlayer->SEND_GOSSIP_MENU(7341, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+3: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Confront the diplomat", GOSSIP_SENDER_MAIN+4, GOSSIP_ACTION_INFO_DEF); - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Show not so quiet defiance", GOSSIP_SENDER_MAIN+5, GOSSIP_ACTION_INFO_DEF); - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Remain quiet", GOSSIP_SENDER_MAIN+2, GOSSIP_ACTION_INFO_DEF); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Confront the diplomat", GOSSIP_SENDER_MAIN + 4, GOSSIP_ACTION_INFO_DEF); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Show not so quiet defiance", GOSSIP_SENDER_MAIN + 5, GOSSIP_ACTION_INFO_DEF); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Remain quiet", GOSSIP_SENDER_MAIN + 2, GOSSIP_ACTION_INFO_DEF); pPlayer->SEND_GOSSIP_MENU(7361, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+4: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Speak against your brother openly", GOSSIP_SENDER_MAIN+6, GOSSIP_ACTION_INFO_DEF); - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Help your brother in", GOSSIP_SENDER_MAIN+7, GOSSIP_ACTION_INFO_DEF); - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Keep your brother out without letting him know", GOSSIP_SENDER_MAIN+8, GOSSIP_ACTION_INFO_DEF); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Speak against your brother openly", GOSSIP_SENDER_MAIN + 6, GOSSIP_ACTION_INFO_DEF); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Help your brother in", GOSSIP_SENDER_MAIN + 7, GOSSIP_ACTION_INFO_DEF); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Keep your brother out without letting him know", GOSSIP_SENDER_MAIN + 8, GOSSIP_ACTION_INFO_DEF); pPlayer->SEND_GOSSIP_MENU(7362, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+5: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Take credit, keep gold", GOSSIP_SENDER_MAIN+5, GOSSIP_ACTION_INFO_DEF); - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Take credit, share the gold", GOSSIP_SENDER_MAIN+4, GOSSIP_ACTION_INFO_DEF); - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Let the knight take credit", GOSSIP_SENDER_MAIN+3, GOSSIP_ACTION_INFO_DEF); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Take credit, keep gold", GOSSIP_SENDER_MAIN + 5, GOSSIP_ACTION_INFO_DEF); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Take credit, share the gold", GOSSIP_SENDER_MAIN + 4, GOSSIP_ACTION_INFO_DEF); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Let the knight take credit", GOSSIP_SENDER_MAIN + 3, GOSSIP_ACTION_INFO_DEF); pPlayer->SEND_GOSSIP_MENU(7363, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Thanks", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+6); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Thanks", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 6); pPlayer->SEND_GOSSIP_MENU(7364, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF+6: @@ -1271,49 +1273,49 @@ void SendAction_npc_sayge(Player* pPlayer, Creature* pCreature, uint32 uiAction) bool GossipSelect_npc_sayge(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) { - switch(uiSender) + switch (uiSender) { case GOSSIP_SENDER_MAIN: SendAction_npc_sayge(pPlayer, pCreature, uiAction); break; case GOSSIP_SENDER_MAIN+1: pCreature->CastSpell(pPlayer, SPELL_DMG, false); - pPlayer->AddSpellCooldown(SPELL_DMG,0,time(NULL) + 7200); + pPlayer->AddSpellCooldown(SPELL_DMG, 0, time(NULL) + 7200); SendAction_npc_sayge(pPlayer, pCreature, uiAction); break; case GOSSIP_SENDER_MAIN+2: pCreature->CastSpell(pPlayer, SPELL_RES, false); - pPlayer->AddSpellCooldown(SPELL_RES,0,time(NULL) + 7200); + pPlayer->AddSpellCooldown(SPELL_RES, 0, time(NULL) + 7200); SendAction_npc_sayge(pPlayer, pCreature, uiAction); break; case GOSSIP_SENDER_MAIN+3: pCreature->CastSpell(pPlayer, SPELL_ARM, false); - pPlayer->AddSpellCooldown(SPELL_ARM,0,time(NULL) + 7200); + pPlayer->AddSpellCooldown(SPELL_ARM, 0, time(NULL) + 7200); SendAction_npc_sayge(pPlayer, pCreature, uiAction); break; case GOSSIP_SENDER_MAIN+4: pCreature->CastSpell(pPlayer, SPELL_SPI, false); - pPlayer->AddSpellCooldown(SPELL_SPI,0,time(NULL) + 7200); + pPlayer->AddSpellCooldown(SPELL_SPI, 0, time(NULL) + 7200); SendAction_npc_sayge(pPlayer, pCreature, uiAction); break; case GOSSIP_SENDER_MAIN+5: pCreature->CastSpell(pPlayer, SPELL_INT, false); - pPlayer->AddSpellCooldown(SPELL_INT,0,time(NULL) + 7200); + pPlayer->AddSpellCooldown(SPELL_INT, 0, time(NULL) + 7200); SendAction_npc_sayge(pPlayer, pCreature, uiAction); break; case GOSSIP_SENDER_MAIN+6: pCreature->CastSpell(pPlayer, SPELL_STM, false); - pPlayer->AddSpellCooldown(SPELL_STM,0,time(NULL) + 7200); + pPlayer->AddSpellCooldown(SPELL_STM, 0, time(NULL) + 7200); SendAction_npc_sayge(pPlayer, pCreature, uiAction); break; case GOSSIP_SENDER_MAIN+7: pCreature->CastSpell(pPlayer, SPELL_STR, false); - pPlayer->AddSpellCooldown(SPELL_STR,0,time(NULL) + 7200); + pPlayer->AddSpellCooldown(SPELL_STR, 0, time(NULL) + 7200); SendAction_npc_sayge(pPlayer, pCreature, uiAction); break; case GOSSIP_SENDER_MAIN+8: pCreature->CastSpell(pPlayer, SPELL_AGI, false); - pPlayer->AddSpellCooldown(SPELL_AGI,0,time(NULL) + 7200); + pPlayer->AddSpellCooldown(SPELL_AGI, 0, time(NULL) + 7200); SendAction_npc_sayge(pPlayer, pCreature, uiAction); break; } @@ -1380,31 +1382,31 @@ bool GossipHello_npc_tabard_vendor(Player* pPlayer, Creature* pCreature) bool m_bLostIllidari = false; bool m_bLostSummer = false; - //Tabard of the Blood Knight + // Tabard of the Blood Knight if (pPlayer->GetQuestRewardStatus(QUEST_TRUE_MASTERS_OF_LIGHT) && !pPlayer->HasItemCount(ITEM_TABARD_OF_THE_BLOOD_KNIGHT, 1, true)) m_bLostBloodKnight = true; - //Tabard of the Hand + // Tabard of the Hand if (pPlayer->GetQuestRewardStatus(QUEST_THE_UNWRITTEN_PROPHECY) && !pPlayer->HasItemCount(ITEM_TABARD_OF_THE_HAND, 1, true)) m_bLostHand = true; - //Tabard of the Protector + // Tabard of the Protector if (pPlayer->GetQuestRewardStatus(QUEST_INTO_THE_BREACH) && !pPlayer->HasItemCount(ITEM_TABARD_OF_THE_PROTECTOR, 1, true)) m_bLostProtector = true; - //Green Trophy Tabard of the Illidari - //Purple Trophy Tabard of the Illidari + // Green Trophy Tabard of the Illidari + // Purple Trophy Tabard of the Illidari if (pPlayer->GetQuestRewardStatus(QUEST_BATTLE_OF_THE_CRIMSON_WATCH) && - (!pPlayer->HasItemCount(ITEM_GREEN_TROPHY_TABARD_OF_THE_ILLIDARI, 1, true) && - !pPlayer->HasItemCount(ITEM_PURPLE_TROPHY_TABARD_OF_THE_ILLIDARI, 1, true) && - !pPlayer->HasItemCount(ITEM_OFFERING_OF_THE_SHATAR, 1, true))) + (!pPlayer->HasItemCount(ITEM_GREEN_TROPHY_TABARD_OF_THE_ILLIDARI, 1, true) && + !pPlayer->HasItemCount(ITEM_PURPLE_TROPHY_TABARD_OF_THE_ILLIDARI, 1, true) && + !pPlayer->HasItemCount(ITEM_OFFERING_OF_THE_SHATAR, 1, true))) m_bLostIllidari = true; - //Tabard of Summer Skies - //Tabard of Summer Flames + // Tabard of Summer Skies + // Tabard of Summer Flames if (pPlayer->GetQuestRewardStatus(QUEST_SHARDS_OF_AHUNE) && - !pPlayer->HasItemCount(ITEM_TABARD_OF_THE_SUMMER_SKIES, 1, true) && - !pPlayer->HasItemCount(ITEM_TABARD_OF_THE_SUMMER_FLAMES, 1, true)) + !pPlayer->HasItemCount(ITEM_TABARD_OF_THE_SUMMER_SKIES, 1, true) && + !pPlayer->HasItemCount(ITEM_TABARD_OF_THE_SUMMER_FLAMES, 1, true)) m_bLostSummer = true; if (m_bLostBloodKnight || m_bLostHand || m_bLostProtector || m_bLostIllidari || m_bLostSummer) @@ -1412,24 +1414,24 @@ bool GossipHello_npc_tabard_vendor(Player* pPlayer, Creature* pCreature) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_VENDOR, GOSSIP_TEXT_BROWSE_GOODS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE); if (m_bLostBloodKnight) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LOST_TABARD_OF_BLOOD_KNIGHT, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF +1); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LOST_TABARD_OF_BLOOD_KNIGHT, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); if (m_bLostHand) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LOST_TABARD_OF_THE_HAND, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF +2); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LOST_TABARD_OF_THE_HAND, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); if (m_bLostProtector) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LOST_TABARD_OF_THE_PROTECTOR, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LOST_TABARD_OF_THE_PROTECTOR, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); if (m_bLostIllidari) { - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LOST_GREEN_TROPHY_TABARD_OF_THE_ILLIDARI, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+4); - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LOST_PURPLE_TROPHY_TABARD_OF_THE_ILLIDARI, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+5); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LOST_GREEN_TROPHY_TABARD_OF_THE_ILLIDARI, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LOST_PURPLE_TROPHY_TABARD_OF_THE_ILLIDARI, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 5); } if (m_bLostSummer) { - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LOST_TABARD_OF_SUMMER_SKIES, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+6); - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LOST_TABARD_OF_SUMMER_FLAMES, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+7); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LOST_TABARD_OF_SUMMER_SKIES, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 6); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LOST_TABARD_OF_SUMMER_FLAMES, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 7); } pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); @@ -1442,7 +1444,7 @@ bool GossipHello_npc_tabard_vendor(Player* pPlayer, Creature* pCreature) bool GossipSelect_npc_tabard_vendor(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) { - switch(uiAction) + switch (uiAction) { case GOSSIP_ACTION_TRADE: pPlayer->SEND_VENDORLIST(pCreature->GetObjectGuid()); @@ -1597,7 +1599,7 @@ struct MANGOS_DLL_DECL npc_spring_rabbitAI : public ScriptedPetAI m_creature->SetFacingTo(m_fMoveAngle + M_PI_F * 0.5f); } - //m_creature->GetMotionMaster()->MoveRandom(); // does not move around current position, hence not usefull right now + // m_creature->GetMotionMaster()->MoveRandom(); // does not move around current position, hence not usefull right now m_creature->GetMotionMaster()->MoveIdle(); } @@ -1723,7 +1725,7 @@ struct MANGOS_DLL_DECL npc_redemption_targetAI : public ScriptedAI m_creature->RemoveFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_DEAD); m_creature->SetStandState(UNIT_STAND_STATE_STAND); m_uiHealTimer = 0; - m_uiEvadeTimer = 2*MINUTE*IN_MILLISECONDS; + m_uiEvadeTimer = 2 * MINUTE * IN_MILLISECONDS; } else m_uiHealTimer -= uiDiff; @@ -1749,13 +1751,13 @@ CreatureAI* GetAI_npc_redemption_target(Creature* pCreature) bool EffectDummyCreature_npc_redemption_target(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) { - //always check spellid and effectindex + // always check spellid and effectindex if ((uiSpellId == SPELL_SYMBOL_OF_LIFE || uiSpellId == SPELL_SHIMMERING_VESSEL) && uiEffIndex == EFFECT_INDEX_0) { if (npc_redemption_targetAI* pTargetAI = dynamic_cast(pCreatureTarget->AI())) pTargetAI->DoReviveSelf(pCaster->GetObjectGuid()); - //always return true when we are handling this spell and effect + // always return true when we are handling this spell and effect return true; } @@ -1808,7 +1810,7 @@ void AddSC_npcs_special() pNewScript->Name = "npc_innkeeper"; pNewScript->pGossipHello = &GossipHello_npc_innkeeper; pNewScript->pGossipSelect = &GossipSelect_npc_innkeeper; - pNewScript->RegisterSelf(false); // script and error report disabled, but script can be used for custom needs, adding ScriptName + pNewScript->RegisterSelf(false); // script and error report disabled, but script can be used for custom needs, adding ScriptName pNewScript = new Script; pNewScript->Name = "npc_mount_vendor"; diff --git a/scripts/world/spell_scripts.cpp b/scripts/world/spell_scripts.cpp index e39ea4db5..7f9c204a2 100644 --- a/scripts/world/spell_scripts.cpp +++ b/scripts/world/spell_scripts.cpp @@ -57,7 +57,7 @@ enum GO_RED_SNAPPER = 181616, NPC_ANGRY_MURLOC = 17102, ITEM_RED_SNAPPER = 23614, - //SPELL_SUMMON_TEST = 49214 // ! Just wrong spell name? It summon correct creature (17102)but does not appear to be used. + // SPELL_SUMMON_TEST = 49214 // ! Just wrong spell name? It summon correct creature (17102)but does not appear to be used. // quest 11472 SPELL_ANUNIAQS_NET = 21014, @@ -68,7 +68,7 @@ enum bool EffectDummyGameObj_spell_dummy_go(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, GameObject* pGOTarget) { - switch(uiSpellId) + switch (uiSpellId) { case SPELL_ANUNIAQS_NET: { @@ -102,7 +102,7 @@ bool EffectDummyGameObj_spell_dummy_go(Unit* pCaster, uint32 uiSpellId, SpellEff if (urand(0, 2)) { - if (Creature* pMurloc = pCaster->SummonCreature(NPC_ANGRY_MURLOC, pCaster->GetPositionX(), pCaster->GetPositionY()+20.0f, pCaster->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 10000)) + if (Creature* pMurloc = pCaster->SummonCreature(NPC_ANGRY_MURLOC, pCaster->GetPositionX(), pCaster->GetPositionY() + 20.0f, pCaster->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 10000)) pMurloc->AI()->AttackStart(pCaster); } else @@ -331,7 +331,7 @@ enum bool EffectAuraDummy_spell_aura_dummy_npc(const Aura* pAura, bool bApply) { - switch(pAura->GetId()) + switch (pAura->GetId()) { case SPELL_BLESSING_OF_PEACE: { @@ -345,7 +345,7 @@ bool EffectAuraDummy_spell_aura_dummy_npc(const Aura* pAura, bool bApply) if (bApply) { - switch(urand(0, 4)) + switch (urand(0, 4)) { case 0: DoScriptText(SAY_BLESS_1, pCreature); break; case 1: DoScriptText(SAY_BLESS_2, pCreature); break; @@ -392,7 +392,7 @@ bool EffectAuraDummy_spell_aura_dummy_npc(const Aura* pAura, bool bApply) if (pCreature->getStandState() == UNIT_STAND_STATE_KNEEL) pCreature->SetStandState(UNIT_STAND_STATE_STAND); - pCreature->ForcedDespawn(60*IN_MILLISECONDS); + pCreature->ForcedDespawn(60 * IN_MILLISECONDS); } return true; @@ -497,7 +497,7 @@ bool EffectAuraDummy_spell_aura_dummy_npc(const Aura* pAura, bool bApply) bool EffectDummyCreature_spell_dummy_npc(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) { - switch(uiSpellId) + switch (uiSpellId) { case SPELL_ADMINISTER_ANTIDOTE: { @@ -559,11 +559,11 @@ bool EffectDummyCreature_spell_dummy_npc(Unit* pCaster, uint32 uiSpellId, SpellE if (pCreatureTarget->getStandState() == UNIT_STAND_STATE_STAND) return true; - switch(urand(1,2)) + switch (urand(1, 2)) { case 1: { - switch(urand(1,3)) + switch (urand(1, 3)) { case 1: DoScriptText(SAY_RAND_ATTACK1, pCreatureTarget); break; case 2: DoScriptText(SAY_RAND_ATTACK2, pCreatureTarget); break; @@ -576,7 +576,7 @@ bool EffectDummyCreature_spell_dummy_npc(Unit* pCaster, uint32 uiSpellId, SpellE } case 2: { - switch(urand(1,3)) + switch (urand(1, 3)) { case 1: DoScriptText(SAY_RAND_WORK1, pCreatureTarget); break; case 2: DoScriptText(SAY_RAND_WORK2, pCreatureTarget); break; @@ -603,7 +603,7 @@ bool EffectDummyCreature_spell_dummy_npc(Unit* pCaster, uint32 uiSpellId, SpellE pCreatureTarget->UpdateEntry(NPC_OWLKIN_INOC); ((Player*)pCaster)->KilledMonsterCredit(NPC_OWLKIN_INOC); - //set despawn timer, since we want to remove creature after a short time + // set despawn timer, since we want to remove creature after a short time pCreatureTarget->ForcedDespawn(15000); return true; @@ -681,7 +681,7 @@ bool EffectDummyCreature_spell_dummy_npc(Unit* pCaster, uint32 uiSpellId, SpellE { uint32 uiNewEntry = 0; - switch(pCreatureTarget->GetEntry()) + switch (pCreatureTarget->GetEntry()) { case NPC_REANIMATED_FROSTWYRM: uiNewEntry = NPC_WEAK_REANIMATED_FROSTWYRM; break; case NPC_TURGID: uiNewEntry = NPC_WEAK_TURGID; break; @@ -752,7 +752,7 @@ bool EffectDummyCreature_spell_dummy_npc(Unit* pCaster, uint32 uiSpellId, SpellE { uint32 newSpellId = 0; - switch(pCreatureTarget->GetEntry()) + switch (pCreatureTarget->GetEntry()) { case NPC_COLLECT_A_TRON: newSpellId = SPELL_SUMMON_COLLECT_A_TRON; break; case NPC_DEFENDO_TANK: newSpellId = SPELL_SUMMON_DEFENDO_TANK; break; @@ -790,7 +790,7 @@ bool EffectDummyCreature_spell_dummy_npc(Unit* pCaster, uint32 uiSpellId, SpellE { if (uiEffIndex == EFFECT_INDEX_2) { - switch(urand(0,2)) + switch (urand(0, 2)) { case 0: { @@ -799,7 +799,7 @@ bool EffectDummyCreature_spell_dummy_npc(Unit* pCaster, uint32 uiSpellId, SpellE } case 1: { - for (int i = 0; i<2; ++i) + for (int i = 0; i < 2; ++i) { if (Creature* pSandGnome = pCaster->SummonCreature(NPC_SAND_GNOME, pCreatureTarget->GetPositionX(), pCreatureTarget->GetPositionY(), pCreatureTarget->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000)) pSandGnome->AI()->AttackStart(pCaster); @@ -808,7 +808,7 @@ bool EffectDummyCreature_spell_dummy_npc(Unit* pCaster, uint32 uiSpellId, SpellE } case 2: { - for (int i = 0; i<2; ++i) + for (int i = 0; i < 2; ++i) { if (Creature* pMatureBoneSifter = pCaster->SummonCreature(NPC_MATURE_BONE_SIFTER, pCreatureTarget->GetPositionX(), pCreatureTarget->GetPositionY(), pCreatureTarget->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000)) pMatureBoneSifter->AI()->AttackStart(pCaster); @@ -837,7 +837,7 @@ bool EffectDummyCreature_spell_dummy_npc(Unit* pCaster, uint32 uiSpellId, SpellE { if (uiEffIndex == EFFECT_INDEX_0) { - bool isMale = urand(0,1); + bool isMale = urand(0, 1); Player* pPlayer = pCreatureTarget->GetLootRecipient(); if (isMale) @@ -845,7 +845,7 @@ bool EffectDummyCreature_spell_dummy_npc(Unit* pCaster, uint32 uiSpellId, SpellE else DoScriptText(SAY_ITS_FEMALE, pCreatureTarget, pPlayer); - switch(pCreatureTarget->GetEntry()) + switch (pCreatureTarget->GetEntry()) { case NPC_FROST_LEOPARD: { @@ -882,7 +882,7 @@ bool EffectDummyCreature_spell_dummy_npc(Unit* pCaster, uint32 uiSpellId, SpellE { if (uiEffIndex == EFFECT_INDEX_0) { - for(int i = 0; i < 3; ++i) + for (int i = 0; i < 3; ++i) { if (irand(i, 2)) // 2-3 summons pCreatureTarget->SummonCreature(NPC_MINION_OF_GUROK, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_CORPSE_DESPAWN, 5000); @@ -910,7 +910,7 @@ bool EffectDummyCreature_spell_dummy_npc(Unit* pCaster, uint32 uiSpellId, SpellE pCreatureTarget->CastSpell(pCreatureTarget, SPELL_APPLE_FALLS_TO_GROUND, false); - if (Creature* pLuckyWilhelm = GetClosestCreatureWithEntry(pCreatureTarget, NPC_LUCKY_WILHELM, 2*INTERACTION_DISTANCE)) + if (Creature* pLuckyWilhelm = GetClosestCreatureWithEntry(pCreatureTarget, NPC_LUCKY_WILHELM, 2 * INTERACTION_DISTANCE)) DoScriptText(SAY_LUCKY_HIT_APPLE, pLuckyWilhelm); } return true; @@ -926,7 +926,7 @@ bool EffectDummyCreature_spell_dummy_npc(Unit* pCaster, uint32 uiSpellId, SpellE case 3: DoScriptText(SAY_LUCKY_HIT_3, pCreatureTarget); break; } - if (Creature* pDrostan = GetClosestCreatureWithEntry(pCreatureTarget, NPC_DROSTAN, 4*INTERACTION_DISTANCE)) + if (Creature* pDrostan = GetClosestCreatureWithEntry(pCreatureTarget, NPC_DROSTAN, 4 * INTERACTION_DISTANCE)) DoScriptText(urand(0, 1) ? SAY_DROSTAN_GOT_LUCKY_1 : SAY_DROSTAN_GOT_LUCKY_2, pDrostan); } return true; @@ -935,7 +935,7 @@ bool EffectDummyCreature_spell_dummy_npc(Unit* pCaster, uint32 uiSpellId, SpellE { if (uiEffIndex == EFFECT_INDEX_0) { - if (Creature* pDrostan = GetClosestCreatureWithEntry(pCreatureTarget, NPC_DROSTAN, 5*INTERACTION_DISTANCE)) + if (Creature* pDrostan = GetClosestCreatureWithEntry(pCreatureTarget, NPC_DROSTAN, 5 * INTERACTION_DISTANCE)) DoScriptText(urand(0, 1) ? SAY_DROSTAN_HIT_BIRD_1 : SAY_DROSTAN_HIT_BIRD_2, pDrostan); pCreatureTarget->DealDamage(pCreatureTarget, pCreatureTarget->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); @@ -949,7 +949,7 @@ bool EffectDummyCreature_spell_dummy_npc(Unit* pCaster, uint32 uiSpellId, SpellE if (pCreatureTarget->GetEntry() != NPC_CHILL_NYMPH || pCaster->GetTypeId() != TYPEID_PLAYER) return true; - switch(urand(0, 2)) + switch (urand(0, 2)) { case 0: DoScriptText(SAY_FREE_1, pCreatureTarget); break; case 1: DoScriptText(SAY_FREE_2, pCreatureTarget); break; @@ -961,7 +961,7 @@ bool EffectDummyCreature_spell_dummy_npc(Unit* pCaster, uint32 uiSpellId, SpellE pCreatureTarget->DeleteThreatList(); pCreatureTarget->AttackStop(true); pCreatureTarget->GetMotionMaster()->MoveFleeing(pCaster, 7); - pCreatureTarget->ForcedDespawn(7*IN_MILLISECONDS); + pCreatureTarget->ForcedDespawn(7 * IN_MILLISECONDS); } return true; } diff --git a/scripts/world/world_map_scripts.cpp b/scripts/world/world_map_scripts.cpp index 8dd8a9929..3cffa4e4a 100644 --- a/scripts/world/world_map_scripts.cpp +++ b/scripts/world/world_map_scripts.cpp @@ -77,7 +77,7 @@ struct MANGOS_DLL_DECL world_map_kalimdor : public ScriptedMap switch (pCreature->GetEntry()) { case NPC_GREYMIST_COASTRUNNNER: - if (pCreature->IsTemporarySummon()) // Only count the ones summoned for Murkdeep quest + if (pCreature->IsTemporarySummon()) // Only count the ones summoned for Murkdeep quest { ++m_uiMurkdeepAdds_KilledAddCount; @@ -102,7 +102,7 @@ struct MANGOS_DLL_DECL world_map_kalimdor : public ScriptedMap } break; case NPC_GREYMIST_WARRIOR: - if (pCreature->IsTemporarySummon()) // Only count the ones summoned for Murkdeep quest + if (pCreature->IsTemporarySummon()) // Only count the ones summoned for Murkdeep quest { ++m_uiMurkdeepAdds_KilledAddCount; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index a4c37e41a..4d182c6a2 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2745" + #define SD2_REVISION_NR "2746" #endif // __SD2_REVISION_NR_H__ diff --git a/sd2_revision_sql.h b/sd2_revision_sql.h index 997c33355..f47a90c17 100644 --- a/sd2_revision_sql.h +++ b/sd2_revision_sql.h @@ -1,5 +1,5 @@ #ifndef __SD2_REVISION_SQL_H__ #define __SD2_REVISION_SQL_H__ - #define REVISION_DB_SCRIPTDEV2 "required__scriptdev2" - #define REVISION_DB_SD2_MANGOS "required__mangos" +#define REVISION_DB_SCRIPTDEV2 "required__scriptdev2" +#define REVISION_DB_SD2_MANGOS "required__mangos" #endif // __SD2_REVISION_SQL_H__ diff --git a/system/system.cpp b/system/system.cpp index baaa44a4e..b7dd3ae29 100644 --- a/system/system.cpp +++ b/system/system.cpp @@ -24,7 +24,7 @@ SystemMgr& SystemMgr::Instance() void SystemMgr::LoadVersion() { - //Get Version information + // Get Version information QueryResult* pResult = SD2Database.PQuery("SELECT version FROM sd2_db_version LIMIT 1"); if (pResult) @@ -94,7 +94,8 @@ void SystemMgr::LoadScriptTexts() m_mTextDataMap[iId] = pTemp; ++uiCount; - } while (pResult->NextRow()); + } + while (pResult->NextRow()); delete pResult; @@ -156,7 +157,8 @@ void SystemMgr::LoadScriptTextsCustom() m_mTextDataMap[iId] = pTemp; ++uiCount; - } while (pResult->NextRow()); + } + while (pResult->NextRow()); delete pResult; @@ -229,7 +231,8 @@ void SystemMgr::LoadScriptWaypoints() m_mPointMoveMap[uiEntry].push_back(pTemp); ++uiNodeCount; - } while (pResult->NextRow()); + } + while (pResult->NextRow()); delete pResult; diff --git a/system/system.h b/system/system.h index 3c7547195..df66c7c89 100644 --- a/system/system.h +++ b/system/system.h @@ -6,9 +6,9 @@ #define SC_SYSTEM_H extern DatabaseType SD2Database; -extern std::string strSD2Version; //version info: database entry and revision +extern std::string strSD2Version; // version info: database entry and revision -#define TEXT_SOURCE_RANGE -1000000 //the amount of entries each text source has available +#define TEXT_SOURCE_RANGE -1000000 // the amount of entries each text source has available #define TEXT_SOURCE_TEXT_START TEXT_SOURCE_RANGE #define TEXT_SOURCE_TEXT_END TEXT_SOURCE_RANGE*2 + 1 @@ -47,18 +47,18 @@ class SystemMgr static SystemMgr& Instance(); - //Maps and lists + // Maps and lists typedef UNORDERED_MAP TextDataMap; typedef UNORDERED_MAP > PointMoveMap; - //Database + // Database void LoadVersion(); void LoadScriptTexts(); void LoadScriptTextsCustom(); void LoadScriptGossipTexts(); void LoadScriptWaypoints(); - //Retrive from storage + // Retrive from storage StringTextData const* GetTextData(int32 uiTextId) const { TextDataMap::const_iterator itr = m_mTextDataMap.find(uiTextId); @@ -69,7 +69,7 @@ class SystemMgr return &itr->second; } - std::vector const &GetPointMoveList(uint32 uiCreatureEntry) const + std::vector const& GetPointMoveList(uint32 uiCreatureEntry) const { static std::vector vEmpty; @@ -82,8 +82,8 @@ class SystemMgr } protected: - TextDataMap m_mTextDataMap; //additional data for text strings - PointMoveMap m_mPointMoveMap; //coordinates for waypoints + TextDataMap m_mTextDataMap; // additional data for text strings + PointMoveMap m_mPointMoveMap; // coordinates for waypoints }; #endif diff --git a/tool/git_id/git_id.cpp b/tool/git_id/git_id.cpp index 9da1bee89..8f3b37d0f 100644 --- a/tool/git_id/git_id.cpp +++ b/tool/git_id/git_id.cpp @@ -53,9 +53,10 @@ #define NUM_REMOTES 2 #define NUM_DATABASES 2 -char remotes[NUM_REMOTES][MAX_REMOTE] = { +char remotes[NUM_REMOTES][MAX_REMOTE] = +{ "git@github.com:scriptdev2/scriptdev2.git", - "git://github.com/scriptdev2/scriptdev2.git" // used for fetch if present + "git:// github.com/scriptdev2/scriptdev2.git" // used for fetch if present }; char remote_branch[MAX_REMOTE] = "master"; @@ -64,27 +65,32 @@ char rev_sql_file[MAX_PATH] = "sd2_revision_sql.h"; char sql_update_dir[MAX_PATH] = "sql/updates"; char new_index_file[MAX_PATH] = ".git/git_id_index"; -char databases[NUM_DATABASES][MAX_DB] = { +char databases[NUM_DATABASES][MAX_DB] = +{ "scriptdev2", "mangos" }; -char db_version_table[NUM_DATABASES][MAX_DB] = { +char db_version_table[NUM_DATABASES][MAX_DB] = +{ "sd2_db_version", "db_version", }; -char db_sql_file[NUM_DATABASES][MAX_PATH] = { +char db_sql_file[NUM_DATABASES][MAX_PATH] = +{ "sql/scriptdev2_script_full.sql", "sql/mangos_scriptname_full.sql", }; -char db_sql_rev_field[NUM_DATABASES][MAX_PATH] = { +char db_sql_rev_field[NUM_DATABASES][MAX_PATH] = +{ "REVISION_DB_SCRIPTDEV2", "REVISION_DB_SD2_MANGOS", }; -bool db_sql_rev_parent[NUM_DATABASES] = { +bool db_sql_rev_parent[NUM_DATABASES] = +{ true, true }; @@ -106,8 +112,8 @@ bool generate_makefile = false; // not need for cmak char origins[NUM_REMOTES][MAX_REMOTE]; int rev; -int last_sql_rev[NUM_DATABASES] = {0,0}; -int last_sql_nr[NUM_DATABASES] = {0,0}; +int last_sql_rev[NUM_DATABASES] = {0, 0}; +int last_sql_nr[NUM_DATABASES] = {0, 0}; char head_message[MAX_MSG]; char path_prefix[MAX_PATH] = ""; @@ -121,18 +127,18 @@ char new_index_cmd[MAX_CMD]; std::set new_sql_updates; -FILE *cmd_pipe; +FILE* cmd_pipe; bool find_path() { printf("+ finding path\n"); - char *ptr; + char* ptr; char cur_path[MAX_PATH]; getcwd(cur_path, MAX_PATH); size_t len = strlen(cur_path); - strncpy(base_path, cur_path, len+1); + strncpy(base_path, cur_path, len + 1); - if(cur_path[len-1] == '/' || cur_path[len-1] == '\\') + if (cur_path[len - 1] == '/' || cur_path[len - 1] == '\\') { // we're in root, don't bother return false; @@ -140,15 +146,15 @@ bool find_path() // don't count the root int count_fwd = 0, count_back = 0; - for(ptr = cur_path-1; ptr = strchr(ptr+1, '/'); count_fwd++); - for(ptr = cur_path-1; ptr = strchr(ptr+1, '\\'); count_back++); + for (ptr = cur_path - 1; ptr = strchr(ptr + 1, '/'); count_fwd++); + for (ptr = cur_path - 1; ptr = strchr(ptr + 1, '\\'); count_back++); int count = std::max(count_fwd, count_back); char path[MAX_PATH]; - for(int i = 0; i < count; i++) + for (int i = 0; i < count; i++) { snprintf(path, MAX_PATH, "%s.git", path_prefix); - if(0 == chdir(path)) + if (0 == chdir(path)) { chdir(cur_path); return true; @@ -156,11 +162,11 @@ bool find_path() strncat(path_prefix, "../", MAX_PATH); ptr = strrchr(base_path, '\\'); - if(ptr) *ptr = '\0'; + if (ptr) *ptr = '\0'; else { ptr = strrchr(base_path, '/'); - if(ptr) *ptr = '\0'; + if (ptr) *ptr = '\0'; } } @@ -170,17 +176,17 @@ bool find_path() bool find_origin() { printf("+ finding origin\n"); - if( (cmd_pipe = popen( "git remote -v", "r" )) == NULL ) + if ((cmd_pipe = popen("git remote -v", "r")) == NULL) return false; bool ret = false; - while(fgets(buffer, MAX_BUF, cmd_pipe)) + while (fgets(buffer, MAX_BUF, cmd_pipe)) { char name[256], remote[MAX_REMOTE]; sscanf(buffer, "%s %s", name, remote); - for(int i = 0; i < NUM_REMOTES; i++) + for (int i = 0; i < NUM_REMOTES; i++) { - if(strcmp(remote, remotes[i]) == 0) + if (strcmp(remote, remotes[i]) == 0) { strncpy(origins[i], name, MAX_REMOTE); ret = true; @@ -204,21 +210,21 @@ bool check_fwd() { printf("+ checking fast forward\n"); snprintf(cmd, MAX_CMD, "git log -n 1 --pretty=\"format:%%H\" %s/%s", (origins[1][0] ? origins[1] : origins[0]), remote_branch); - if( (cmd_pipe = popen( cmd, "r" )) == NULL ) + if ((cmd_pipe = popen(cmd, "r")) == NULL) return false; - if(!fgets(buffer, MAX_BUF, cmd_pipe)) return false; + if (!fgets(buffer, MAX_BUF, cmd_pipe)) return false; strncpy(origin_hash, buffer, MAX_HASH); pclose(cmd_pipe); - if( (cmd_pipe = popen( "git log --pretty=\"format:%H\"", "r" )) == NULL ) + if ((cmd_pipe = popen("git log --pretty=\"format:%H\"", "r")) == NULL) return false; bool found = false; - while(fgets(buffer, MAX_BUF, cmd_pipe)) + while (fgets(buffer, MAX_BUF, cmd_pipe)) { buffer[strlen(buffer) - 1] = '\0'; - if(strncmp(origin_hash, buffer, MAX_BUF) == 0) + if (strncmp(origin_hash, buffer, MAX_BUF) == 0) { found = true; break; @@ -226,23 +232,23 @@ bool check_fwd() } pclose(cmd_pipe); - if(!found) + if (!found) { // with fetch you still get the latest rev, you just rebase afterwards and push // without it you may not get the right rev - if(do_fetch) printf("WARNING: non-fastforward, use rebase!\n"); + if (do_fetch) printf("WARNING: non-fastforward, use rebase!\n"); else { printf("ERROR: non-fastforward, use rebase!\n"); return false; } } return true; } -int get_rev(const char *from_msg) +int get_rev(const char* from_msg) { // accept only the rev number format, not the sql update format char nr_str[256]; - if(sscanf(from_msg, "[" GIT_REV_PREFIX "%[0123456789]]", nr_str) != 1) return 0; + if (sscanf(from_msg, "[" GIT_REV_PREFIX "%[0123456789]]", nr_str) != 1) return 0; // ("[")+(REV_PREFIX)+("]")-1 - if(from_msg[strlen(nr_str)+strlen(GIT_REV_PREFIX)+2-1] != ']') return 0; + if (from_msg[strlen(nr_str) + strlen(GIT_REV_PREFIX) + 2 - 1] != ']') return 0; return atoi(nr_str); } @@ -251,26 +257,26 @@ bool find_rev() { printf("+ finding next revision number\n"); // find the highest rev number on either of the remotes - for(int i = 0; i < NUM_REMOTES; i++) + for (int i = 0; i < NUM_REMOTES; i++) { - if(!local && !origins[i][0]) continue; + if (!local && !origins[i][0]) continue; - if(local) snprintf(cmd, MAX_CMD, "git log HEAD --pretty=\"format:%%s\""); + if (local) snprintf(cmd, MAX_CMD, "git log HEAD --pretty=\"format:%%s\""); else sprintf(cmd, "git log %s/%s --pretty=\"format:%%s\"", origins[i], remote_branch); - if( (cmd_pipe = popen( cmd, "r" )) == NULL ) + if ((cmd_pipe = popen(cmd, "r")) == NULL) continue; int nr; - while(fgets(buffer, MAX_BUF, cmd_pipe)) + while (fgets(buffer, MAX_BUF, cmd_pipe)) { nr = get_rev(buffer); - if(nr >= rev) - rev = nr+1; + if (nr >= rev) + rev = nr + 1; } pclose(cmd_pipe); } - if(rev > 0) printf("Found " GIT_REV_FORMAT ".\n", rev); + if (rev > 0) printf("Found " GIT_REV_FORMAT ".\n", rev); return rev > 0; } @@ -290,7 +296,7 @@ std::string generateSqlHeader() std::ostringstream newData; newData << "#ifndef __SD2_REVISION_SQL_H__" << std::endl; newData << "#define __SD2_REVISION_SQL_H__" << std::endl; - for(int i = 0; i < NUM_DATABASES; ++i) + for (int i = 0; i < NUM_DATABASES; ++i) { newData << " #define " << db_sql_rev_field[i] << " \"required_" << last_sql_update[i] << "\"" << std::endl; } @@ -298,17 +304,17 @@ std::string generateSqlHeader() return newData.str(); } -void system_switch_index(const char *cmd) +void system_switch_index(const char* cmd) { // do the command for the original index and then for the new index // both need to be updated with the changes before commit // but the new index will contains only the desired changes // while the old may contain others system(cmd); - if(!use_new_index) return; - if(putenv(new_index_cmd) != 0) return; + if (!use_new_index) return; + if (putenv(new_index_cmd) != 0) return; system(cmd); - if(putenv(old_index_cmd) != 0) return; + if (putenv(old_index_cmd) != 0) return; } bool write_rev_nr() @@ -321,9 +327,9 @@ bool write_rev_nr() char prefixed_file[MAX_PATH]; snprintf(prefixed_file, MAX_PATH, "%s%s", path_prefix, rev_nr_file); - if(FILE* OutputFile = fopen(prefixed_file, "wb")) + if (FILE* OutputFile = fopen(prefixed_file, "wb")) { - fprintf(OutputFile,"%s", header.c_str()); + fprintf(OutputFile, "%s", header.c_str()); fclose(OutputFile); // add the file to both indices, to be committed later @@ -338,16 +344,16 @@ bool write_rev_nr() bool write_rev_sql() { - if(new_sql_updates.empty()) return true; + if (new_sql_updates.empty()) return true; printf("+ writing sd2_revision_sql.h\n"); std::string header = generateSqlHeader(); char prefixed_file[MAX_PATH]; snprintf(prefixed_file, MAX_PATH, "%s%s", path_prefix, rev_sql_file); - if(FILE* OutputFile = fopen(prefixed_file, "wb")) + if (FILE* OutputFile = fopen(prefixed_file, "wb")) { - fprintf(OutputFile,"%s", header.c_str()); + fprintf(OutputFile, "%s", header.c_str()); fclose(OutputFile); // add the file to both indices, to be committed later @@ -363,28 +369,28 @@ bool write_rev_sql() bool find_head_msg() { printf("+ finding last message on HEAD\n"); - if( (cmd_pipe = popen( "git log -n 1 --pretty=\"format:%s%n%n%b\"", "r" )) == NULL ) + if ((cmd_pipe = popen("git log -n 1 --pretty=\"format:%s%n%n%b\"", "r")) == NULL) return false; int poz = 0; - while(poz < 16384-1 && EOF != (head_message[poz++] = fgetc(cmd_pipe))); - head_message[poz-1] = '\0'; + while (poz < 16384 - 1 && EOF != (head_message[poz++] = fgetc(cmd_pipe))); + head_message[poz - 1] = '\0'; pclose(cmd_pipe); - if(int head_rev = get_rev(head_message)) + if (int head_rev = get_rev(head_message)) { - if(!allow_replace) + if (!allow_replace) { printf("Last commit on HEAD is " GIT_REV_FORMAT ". Use -r to replace it with " GIT_REV_FORMAT ".\n", head_rev, rev); return false; } // skip the rev number in the commit - char *p = strchr(head_message, ']'), *q = head_message; - assert(p && *(p+1)); - p+=2; - while(*p) *q = *p, p++, q++; + char* p = strchr(head_message, ']'), *q = head_message; + assert(p && *(p + 1)); + p += 2; + while (*p) *q = *p, p++, q++; *q = 0; return true; } @@ -397,14 +403,14 @@ bool amend_commit() printf("+ amending last commit\n"); // commit the contents of the (new) index - if(use_new_index && putenv(new_index_cmd) != 0) return false; + if (use_new_index && putenv(new_index_cmd) != 0) return false; snprintf(cmd, MAX_CMD, "git commit --amend -F-"); - if( (cmd_pipe = popen( cmd, "w" )) == NULL ) + if ((cmd_pipe = popen(cmd, "w")) == NULL) return false; fprintf(cmd_pipe, GIT_REV_FORMAT " %s", rev, head_message); pclose(cmd_pipe); - if(use_new_index && putenv(old_index_cmd) != 0) return false; + if (use_new_index && putenv(old_index_cmd) != 0) return false; return true; } @@ -420,21 +426,21 @@ struct sql_update_info bool has_table; }; -bool get_sql_update_info(const char *buffer, sql_update_info &info) +bool get_sql_update_info(const char* buffer, sql_update_info& info) { info.table[0] = '\0'; int dummy[2]; char dummyStr[MAX_BUF]; - if(sscanf(buffer, SQL_REV_SCAN "_%[^_]_%d_%d", &dummy[0], &dummyStr, &dummy[1]) == 3) + if (sscanf(buffer, SQL_REV_SCAN "_%[^_]_%d_%d", &dummy[0], &dummyStr, &dummy[1]) == 3) return false; - if(sscanf(buffer, SQL_REV_SCAN "_%[^.].sql", &info.rev, info.db) != 2) + if (sscanf(buffer, SQL_REV_SCAN "_%[^.].sql", &info.rev, info.db) != 2) { return false; } - for(info.db_idx = 0; info.db_idx < NUM_DATABASES; info.db_idx++) - if(strncmp(info.db, databases[info.db_idx], MAX_DB) == 0) break; + for (info.db_idx = 0; info.db_idx < NUM_DATABASES; info.db_idx++) + if (strncmp(info.db, databases[info.db_idx], MAX_DB) == 0) break; info.has_table = (info.table[0] != '\0'); return true; } @@ -444,24 +450,24 @@ bool find_sql_updates() printf("+ finding new sql updates on HEAD\n"); // add all updates from HEAD snprintf(cmd, MAX_CMD, "git show HEAD:%s", sql_update_dir); - if( (cmd_pipe = popen( cmd, "r" )) == NULL ) + if ((cmd_pipe = popen(cmd, "r")) == NULL) return false; // skip first two lines - if(!fgets(buffer, MAX_BUF, cmd_pipe)) { pclose(cmd_pipe); return false; } - if(!fgets(buffer, MAX_BUF, cmd_pipe)) { pclose(cmd_pipe); return false; } + if (!fgets(buffer, MAX_BUF, cmd_pipe)) { pclose(cmd_pipe); return false; } + if (!fgets(buffer, MAX_BUF, cmd_pipe)) { pclose(cmd_pipe); return false; } sql_update_info info; - while(fgets(buffer, MAX_BUF, cmd_pipe)) + while (fgets(buffer, MAX_BUF, cmd_pipe)) { buffer[strlen(buffer) - 1] = '\0'; - if(!get_sql_update_info(buffer, info)) continue; + if (!get_sql_update_info(buffer, info)) continue; - if(info.db_idx == NUM_DATABASES) + if (info.db_idx == NUM_DATABASES) { - if(info.rev > 0) printf("WARNING: incorrect database name for sql update %s\n", buffer); - continue; + if (info.rev > 0) printf("WARNING: incorrect database name for sql update %s\n", buffer); + continue; } new_sql_updates.insert(buffer); @@ -471,29 +477,29 @@ bool find_sql_updates() // remove updates from the last commit also found on origin snprintf(cmd, MAX_CMD, "git show %s:%s", origin_hash, sql_update_dir); - if( (cmd_pipe = popen( cmd, "r" )) == NULL ) + if ((cmd_pipe = popen(cmd, "r")) == NULL) return false; // skip first two lines - if(!fgets(buffer, MAX_BUF, cmd_pipe)) { pclose(cmd_pipe); return false; } - if(!fgets(buffer, MAX_BUF, cmd_pipe)) { pclose(cmd_pipe); return false; } + if (!fgets(buffer, MAX_BUF, cmd_pipe)) { pclose(cmd_pipe); return false; } + if (!fgets(buffer, MAX_BUF, cmd_pipe)) { pclose(cmd_pipe); return false; } - while(fgets(buffer, MAX_BUF, cmd_pipe)) + while (fgets(buffer, MAX_BUF, cmd_pipe)) { buffer[strlen(buffer) - 1] = '\0'; - if(!get_sql_update_info(buffer, info)) continue; + if (!get_sql_update_info(buffer, info)) continue; // find the old update with the highest rev for each database // (will be the required version for the new update) std::set::iterator itr = new_sql_updates.find(buffer); - if(itr != new_sql_updates.end() ) + if (itr != new_sql_updates.end()) { - if(info.rev > 0 && (info.rev > last_sql_rev[info.db_idx] || - (info.rev == last_sql_rev[info.db_idx] && info.nr > last_sql_nr[info.db_idx]))) + if (info.rev > 0 && (info.rev > last_sql_rev[info.db_idx] || + (info.rev == last_sql_rev[info.db_idx] && info.nr > last_sql_nr[info.db_idx]))) { last_sql_rev[info.db_idx] = info.rev; last_sql_nr[info.db_idx] = info.nr; - if(db_sql_rev_parent[info.db_idx]) + if (db_sql_rev_parent[info.db_idx]) snprintf(last_sql_update[info.db_idx], MAX_PATH, "_%s%s%s", info.db, info.has_table ? "_" : "", info.table); else sscanf(buffer, "%[^.]", last_sql_update[info.db_idx]); @@ -504,9 +510,9 @@ bool find_sql_updates() pclose(cmd_pipe); - if(!new_sql_updates.empty()) + if (!new_sql_updates.empty()) { - for(std::set::iterator itr = new_sql_updates.begin(); itr != new_sql_updates.end(); ++itr) + for (std::set::iterator itr = new_sql_updates.begin(); itr != new_sql_updates.end(); ++itr) printf("%s\n", itr->c_str()); } else @@ -515,14 +521,14 @@ bool find_sql_updates() return true; } -bool copy_file(const char *src_file, const char *dst_file) +bool copy_file(const char* src_file, const char* dst_file) { - FILE * fin = fopen( src_file, "rb" ); - if(!fin) return false; - FILE * fout = fopen( dst_file, "wb" ); - if(!fout) { fclose(fin); return false; } + FILE* fin = fopen(src_file, "rb"); + if (!fin) return false; + FILE* fout = fopen(dst_file, "wb"); + if (!fout) { fclose(fin); return false; } - for(char c = getc(fin); !feof(fin); putc(c, fout), c = getc(fin)); + for (char c = getc(fin); !feof(fin); putc(c, fout), c = getc(fin)); fclose(fin); fclose(fout); @@ -531,16 +537,16 @@ bool copy_file(const char *src_file, const char *dst_file) bool convert_sql_updates() { - if(new_sql_updates.empty()) return true; + if (new_sql_updates.empty()) return true; printf("+ converting sql updates\n"); // rename the sql update files and add the required update statement - for(std::set::iterator itr = new_sql_updates.begin(); itr != new_sql_updates.end(); ++itr) + for (std::set::iterator itr = new_sql_updates.begin(); itr != new_sql_updates.end(); ++itr) { sql_update_info info; - if(!get_sql_update_info(itr->c_str(), info)) return false; - if(info.db_idx == NUM_DATABASES) return false; + if (!get_sql_update_info(itr->c_str(), info)) return false; + if (info.db_idx == NUM_DATABASES) return false; // generating the new name should work for updates with or without a rev char src_file[MAX_PATH], new_name[MAX_PATH], new_req_name[MAX_PATH], dst_file[MAX_PATH]; @@ -548,18 +554,18 @@ bool convert_sql_updates() snprintf(new_name, MAX_PATH, SQL_REV_PRINT "_%s%s%s", rev, info.db, info.has_table ? "_" : "", info.table); snprintf(dst_file, MAX_PATH, "%s%s/%s.sql", path_prefix, sql_update_dir, new_name); - if(db_sql_rev_parent[info.db_idx]) + if (db_sql_rev_parent[info.db_idx]) snprintf(new_req_name, MAX_PATH, "_%s%s%s", info.db, info.has_table ? "_" : "", info.table); else strncpy(new_req_name, new_name, MAX_PATH); - FILE * fin = fopen( src_file, "r" ); - if(!fin) return false; + FILE* fin = fopen(src_file, "r"); + if (!fin) return false; std::ostringstream out_buff; // add the update requirements for non-parent-controlled revision sql update - if(!db_sql_rev_parent[info.db_idx]) + if (!db_sql_rev_parent[info.db_idx]) { // add the update requirements out_buff << "ALTER TABLE " << db_version_table[info.db_idx] @@ -568,12 +574,12 @@ bool convert_sql_updates() // skip the first one or two lines from the input // if it already contains update requirements - if(fgets(buffer, MAX_BUF, fin)) + if (fgets(buffer, MAX_BUF, fin)) { char dummy[MAX_BUF]; - if(sscanf(buffer, "ALTER TABLE %s CHANGE COLUMN required_%s required_%s bit", dummy, dummy, dummy) == 3) + if (sscanf(buffer, "ALTER TABLE %s CHANGE COLUMN required_%s required_%s bit", dummy, dummy, dummy) == 3) { - if(fgets(buffer, MAX_BUF, fin) && buffer[0] != '\n') + if (fgets(buffer, MAX_BUF, fin) && buffer[0] != '\n') out_buff << buffer; } else @@ -582,15 +588,15 @@ bool convert_sql_updates() } // copy the rest of the file - while(fgets(buffer, MAX_BUF, fin)) + while (fgets(buffer, MAX_BUF, fin)) out_buff << buffer; fclose(fin); - FILE * fout = fopen( dst_file, "w" ); - if(!fout) { fclose(fin); return false; } + FILE* fout = fopen(dst_file, "w"); + if (!fout) { fclose(fin); return false; } - fprintf(fout, "%s",out_buff.str().c_str()); + fprintf(fout, "%s", out_buff.str().c_str()); fclose(fout); @@ -599,7 +605,7 @@ bool convert_sql_updates() system_switch_index(cmd); // delete src file if it different by name from dst file - if(strncmp(src_file,dst_file,MAX_PATH)) + if (strncmp(src_file, dst_file, MAX_PATH)) { snprintf(cmd, MAX_CMD, "git rm --quiet %s", src_file); system_switch_index(cmd); @@ -614,30 +620,30 @@ bool convert_sql_updates() bool generate_sql_makefile() { - if(new_sql_updates.empty()) return true; + if (new_sql_updates.empty()) return true; // find all files in the update dir snprintf(cmd, MAX_CMD, "git show HEAD:%s", sql_update_dir); - if( (cmd_pipe = popen( cmd, "r" )) == NULL ) + if ((cmd_pipe = popen(cmd, "r")) == NULL) return false; // skip first two lines - if(!fgets(buffer, MAX_BUF, cmd_pipe)) { pclose(cmd_pipe); return false; } - if(!fgets(buffer, MAX_BUF, cmd_pipe)) { pclose(cmd_pipe); return false; } + if (!fgets(buffer, MAX_BUF, cmd_pipe)) { pclose(cmd_pipe); return false; } + if (!fgets(buffer, MAX_BUF, cmd_pipe)) { pclose(cmd_pipe); return false; } char newname[MAX_PATH]; std::set file_list; sql_update_info info; - while(fgets(buffer, MAX_BUF, cmd_pipe)) + while (fgets(buffer, MAX_BUF, cmd_pipe)) { buffer[strlen(buffer) - 1] = '\0'; - if(buffer[strlen(buffer) - 1] != '/' && - strncmp(buffer, "Makefile.am", MAX_BUF) != 0) + if (buffer[strlen(buffer) - 1] != '/' && + strncmp(buffer, "Makefile.am", MAX_BUF) != 0) { - if(new_sql_updates.find(buffer) != new_sql_updates.end()) + if (new_sql_updates.find(buffer) != new_sql_updates.end()) { - if(!get_sql_update_info(buffer, info)) return false; + if (!get_sql_update_info(buffer, info)) return false; snprintf(newname, MAX_PATH, SQL_REV_PRINT "_%s%s%s.sql", rev, info.db, info.has_table ? "_" : "", info.table); file_list.insert(newname); } @@ -651,41 +657,41 @@ bool generate_sql_makefile() // write the makefile char file_name[MAX_PATH]; snprintf(file_name, MAX_PATH, "%s%s/Makefile.am", path_prefix, sql_update_dir); - FILE *fout = fopen(file_name, "w"); - if(!fout) { pclose(cmd_pipe); return false; } + FILE* fout = fopen(file_name, "w"); + if (!fout) { pclose(cmd_pipe); return false; } fprintf(fout, - "# Copyright (C) 2005-2011 ScriptDev2 \n" - "#\n" - "# This program is free software; you can redistribute it and/or modify\n" - "# it under the terms of the GNU General Public License as published by\n" - "# the Free Software Foundation; either version 2 of the License, or\n" - "# (at your option) any later version.\n" - "#\n" - "# This program is distributed in the hope that it will be useful,\n" - "# but WITHOUT ANY WARRANTY; without even the implied warranty of\n" - "# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n" - "# GNU General Public License for more details.\n" - "#\n" - "# You should have received a copy of the GNU General Public License\n" - "# along with this program; if not, write to the Free Software\n" - "# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n" - "\n" - "## Process this file with automake to produce Makefile.in\n" - "\n" - "## Sub-directories to parse\n" - "\n" - "## Change installation location\n" - "# datadir = ScriptDev2/%s\n" - "pkgdatadir = $(datadir)/ScriptDev2/%s\n" - "\n" - "## Files to be installed\n" - "# Install basic SQL files to datadir\n" - "pkgdata_DATA = \\\n", - sql_update_dir, sql_update_dir - ); - - for(std::set::iterator itr = file_list.begin(), next; itr != file_list.end(); ++itr) + "# Copyright (C) 2005-2011 ScriptDev2 \n" + "#\n" + "# This program is free software; you can redistribute it and/or modify\n" + "# it under the terms of the GNU General Public License as published by\n" + "# the Free Software Foundation; either version 2 of the License, or\n" + "# (at your option) any later version.\n" + "#\n" + "# This program is distributed in the hope that it will be useful,\n" + "# but WITHOUT ANY WARRANTY; without even the implied warranty of\n" + "# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n" + "# GNU General Public License for more details.\n" + "#\n" + "# You should have received a copy of the GNU General Public License\n" + "# along with this program; if not, write to the Free Software\n" + "# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n" + "\n" + "## Process this file with automake to produce Makefile.in\n" + "\n" + "## Sub-directories to parse\n" + "\n" + "## Change installation location\n" + "# datadir = ScriptDev2/%s\n" + "pkgdatadir = $(datadir)/ScriptDev2/%s\n" + "\n" + "## Files to be installed\n" + "# Install basic SQL files to datadir\n" + "pkgdata_DATA = \\\n", + sql_update_dir, sql_update_dir + ); + + for (std::set::iterator itr = file_list.begin(), next; itr != file_list.end(); ++itr) { next = itr; ++next; fprintf(fout, "\t%s%s\n", itr->c_str(), next == file_list.end() ? "" : " \\"); @@ -701,14 +707,14 @@ bool generate_sql_makefile() bool change_sql_database() { - if(new_sql_updates.empty()) return true; + if (new_sql_updates.empty()) return true; printf("+ changing database sql files\n"); // rename the database files, copy their contents back // and change the required update line - for(int i = 0; i < NUM_DATABASES; i++) + for (int i = 0; i < NUM_DATABASES; i++) { - if(last_sql_update[i][0] == '\0') continue; + if (last_sql_update[i][0] == '\0') continue; char old_file[MAX_PATH], tmp_file[MAX_PATH], dummy[MAX_BUF]; @@ -717,29 +723,29 @@ bool change_sql_database() rename(old_file, tmp_file); - FILE *fin = fopen( tmp_file, "r" ); - if(!fin) return false; - FILE *fout = fopen( old_file, "w" ); - if(!fout) return false; + FILE* fin = fopen(tmp_file, "r"); + if (!fin) return false; + FILE* fout = fopen(old_file, "w"); + if (!fout) return false; snprintf(dummy, MAX_CMD, "CREATE TABLE `%s` (\n", db_version_table[i]); - while(fgets(buffer, MAX_BUF, fin)) + while (fgets(buffer, MAX_BUF, fin)) { fputs(buffer, fout); - if(strncmp(buffer, dummy, MAX_BUF) == 0) + if (strncmp(buffer, dummy, MAX_BUF) == 0) break; } - while(1) + while (1) { - if(!fgets(buffer, MAX_BUF, fin)) return false; - if(sscanf(buffer, " `required_%s`", dummy) == 1) break; + if (!fgets(buffer, MAX_BUF, fin)) return false; + if (sscanf(buffer, " `required_%s`", dummy) == 1) break; fputs(buffer, fout); } fprintf(fout, " `required_%s` bit(1) default NULL\n", last_sql_update[i]); - while(fgets(buffer, MAX_BUF, fin)) + while (fgets(buffer, MAX_BUF, fin)) fputs(buffer, fout); fclose(fin); @@ -755,26 +761,26 @@ bool change_sql_database() bool change_sql_history() { snprintf(cmd, MAX_CMD, "git log HEAD --pretty=\"format:%%H\""); - if( (cmd_pipe = popen( cmd, "r" )) == NULL ) + if ((cmd_pipe = popen(cmd, "r")) == NULL) return false; std::list hashes; - while(fgets(buffer, MAX_BUF, cmd_pipe)) + while (fgets(buffer, MAX_BUF, cmd_pipe)) { buffer[strlen(buffer) - 1] = '\0'; - if(strncmp(origin_hash, buffer, MAX_HASH) == 0) + if (strncmp(origin_hash, buffer, MAX_HASH) == 0) break; hashes.push_back(buffer); } pclose(cmd_pipe); - if(hashes.empty()) return false; // must have at least one commit - if(hashes.size() < 2) return true; // only one commit, ok but nothing to do + if (hashes.empty()) return false; // must have at least one commit + if (hashes.size() < 2) return true; // only one commit, ok but nothing to do snprintf(cmd, MAX_CMD, "git reset --hard %s", origin_hash); system(cmd); - for(std::list::reverse_iterator next = hashes.rbegin(), itr = next++; next != hashes.rend(); ++itr, ++next) + for (std::list::reverse_iterator next = hashes.rbegin(), itr = next++; next != hashes.rend(); ++itr, ++next) { // stage the changes from the orignal commit snprintf(cmd, MAX_CMD, "git cherry-pick -n %s", itr->c_str()); @@ -786,10 +792,10 @@ bool change_sql_history() // remove the newly added files snprintf(cmd, MAX_CMD, "git diff --cached --diff-filter=A --name-only %s%s", path_prefix, sql_update_dir); - if( (cmd_pipe = popen( cmd, "r" )) == NULL ) + if ((cmd_pipe = popen(cmd, "r")) == NULL) return false; - while(fgets(buffer, MAX_BUF, cmd_pipe)) + while (fgets(buffer, MAX_BUF, cmd_pipe)) { buffer[strlen(buffer) - 1] = '\0'; snprintf(cmd, MAX_CMD, "git rm -f --quiet %s%s", path_prefix, buffer); @@ -812,15 +818,16 @@ bool change_sql_history() bool prepare_new_index() { - if(!use_new_index) return true; + if (!use_new_index) return true; // only use a new index if there are staged changes that should be preserved - if( (cmd_pipe = popen( "git diff --cached", "r" )) == NULL ) { + if ((cmd_pipe = popen("git diff --cached", "r")) == NULL) + { use_new_index = false; return false; } - if(!fgets(buffer, MAX_BUF, cmd_pipe)) + if (!fgets(buffer, MAX_BUF, cmd_pipe)) { use_new_index = false; pclose(cmd_pipe); @@ -834,29 +841,29 @@ bool prepare_new_index() // copy the existing index file to a new one char src_file[MAX_PATH], dst_file[MAX_PATH]; - char *old_index = getenv("GIT_INDEX_FILE"); - if(old_index) strncpy(src_file, old_index, MAX_PATH); + char* old_index = getenv("GIT_INDEX_FILE"); + if (old_index) strncpy(src_file, old_index, MAX_PATH); else snprintf(src_file, MAX_PATH, "%s.git/index", path_prefix); snprintf(dst_file, MAX_PATH, "%s%s", path_prefix, new_index_file); - if(!copy_file(src_file, dst_file)) return false; + if (!copy_file(src_file, dst_file)) return false; // doesn't seem to work with path_prefix snprintf(new_index_cmd, MAX_CMD, "GIT_INDEX_FILE=%s/%s", base_path, new_index_file); - if(putenv(new_index_cmd) != 0) return false; + if (putenv(new_index_cmd) != 0) return false; // clear the new index system("git reset -q --mixed HEAD"); // revert to old index snprintf(old_index_cmd, MAX_CMD, "GIT_INDEX_FILE="); - if(putenv(old_index_cmd) != 0) return false; + if (putenv(old_index_cmd) != 0) return false; return true; } bool cleanup_new_index() { - if(!use_new_index) return true; + if (!use_new_index) return true; printf("+ cleaning up the new index\n"); char idx_file[MAX_PATH]; snprintf(idx_file, MAX_PATH, "%s%s", path_prefix, new_index_file); @@ -866,22 +873,22 @@ bool cleanup_new_index() #define DO(cmd) if(!cmd) { printf("FAILED\n"); return 1; } -int main(int argc, char *argv[]) +int main(int argc, char* argv[]) { - for(int i = 1; i < argc; i++) + for (int i = 1; i < argc; i++) { - if(argv[i] == NULL) continue; - if(strncmp(argv[i], "-r", 2) == 0 || strncmp(argv[i], "--replace", 9) == 0) + if (argv[i] == NULL) continue; + if (strncmp(argv[i], "-r", 2) == 0 || strncmp(argv[i], "--replace", 9) == 0) allow_replace = true; - else if(strncmp(argv[i], "-l", 2) == 0 || strncmp(argv[i], "--local", 7) == 0) + else if (strncmp(argv[i], "-l", 2) == 0 || strncmp(argv[i], "--local", 7) == 0) local = true; - else if(strncmp(argv[i], "-f", 2) == 0 || strncmp(argv[i], "--fetch", 7) == 0) + else if (strncmp(argv[i], "-f", 2) == 0 || strncmp(argv[i], "--fetch", 7) == 0) do_fetch = true; - else if(strncmp(argv[i], "-s", 2) == 0 || strncmp(argv[i], "--sql", 5) == 0) + else if (strncmp(argv[i], "-s", 2) == 0 || strncmp(argv[i], "--sql", 5) == 0) do_sql = true; - else if(strncmp(argv[i], "--branch=", 9) == 0) + else if (strncmp(argv[i], "--branch=", 9) == 0) snprintf(remote_branch, MAX_REMOTE, "%s", argv[i] + 9); - else if(strncmp(argv[i], "-h", 2) == 0 || strncmp(argv[i], "--help", 6) == 0) + else if (strncmp(argv[i], "-h", 2) == 0 || strncmp(argv[i], "--help", 6) == 0) { printf("Usage: git_id [OPTION]\n"); printf("Generates a new rev number and updates sd2_revision_nr.h and the commit message.\n"); @@ -905,31 +912,31 @@ int main(int argc, char *argv[]) return 1; } - DO( find_path() ); - if(!local) + DO(find_path()); + if (!local) { - DO( find_origin() ); - if(do_fetch) - DO( fetch_origin() ); - DO( check_fwd() ); + DO(find_origin()); + if (do_fetch) + DO(fetch_origin()); + DO(check_fwd()); } - DO( find_rev() ); - DO( find_head_msg() ); - if(do_sql) - DO( find_sql_updates() ); - DO( prepare_new_index() ); - DO( write_rev_nr() ); - if(do_sql) + DO(find_rev()); + DO(find_head_msg()); + if (do_sql) + DO(find_sql_updates()); + DO(prepare_new_index()); + DO(write_rev_nr()); + if (do_sql) { - DO( convert_sql_updates() ); + DO(convert_sql_updates()); if (generate_makefile) - DO( generate_sql_makefile() ); + DO(generate_sql_makefile()); // DO( change_sql_database() ); // Currently not supported - DO( write_rev_sql() ); + DO(write_rev_sql()); } - DO( amend_commit() ); - DO( cleanup_new_index() ); - //if(do_sql) + DO(amend_commit()); + DO(cleanup_new_index()); + // if(do_sql) // DO( change_sql_history() ); return 0; From ad88b4c125ff07fc04773416212dc8b42ce55584 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sun, 4 Nov 2012 09:29:00 +0200 Subject: [PATCH 0742/1172] [2747] Fix behavior of the Webbed Creature - Bloodmyst Isle --- scripts/kalimdor/bloodmyst_isle.cpp | 6 ++++-- sd2_revision_nr.h | 2 +- sql/scriptdev2_script_full.sql | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/scripts/kalimdor/bloodmyst_isle.cpp b/scripts/kalimdor/bloodmyst_isle.cpp index 65fee7e88..891c5cbc9 100644 --- a/scripts/kalimdor/bloodmyst_isle.cpp +++ b/scripts/kalimdor/bloodmyst_isle.cpp @@ -39,11 +39,13 @@ enum // possible creatures to be spawned (too many to be added to enum) const uint32 possibleSpawns[31] = {17322, 17661, 17496, 17522, 17340, 17352, 17333, 17524, 17654, 17348, 17339, 17345, 17359, 17353, 17336, 17550, 17330, 17701, 17321, 17325, 17320, 17683, 17342, 17715, 17334, 17341, 17338, 17337, 17346, 17344, 17327}; -struct MANGOS_DLL_DECL mob_webbed_creatureAI : public ScriptedAI +struct MANGOS_DLL_DECL mob_webbed_creatureAI : public Scripted_NoMovementAI { - mob_webbed_creatureAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } + mob_webbed_creatureAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { Reset(); } void Reset() { } + void AttackStart(Unit* pWho) { } + void MoveInLineOfSight(Unit* pWho) { } void JustDied(Unit* pKiller) { diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 4d182c6a2..bcd2bbf5e 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2746" + #define SD2_REVISION_NR "2747" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index f063885a6..034938187 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -7064,7 +7064,7 @@ INSERT INTO script_waypoint VALUES (23089, 8, 748.24, 318.78, 311.781, 0, ''), (23089, 9, 752.41, 304.31, 312.077, 0, 'escort paused - SAY_AKAMA_OPEN_DOOR_1'), (23089, 10, 770.27, 304.89, 312.35, 0, ''), -(23089, 11, 780.18, 305.26, 319.71 , 0, ''), +(23089, 11, 780.18, 305.26, 319.71, 0, ''), (23089, 12, 791.45, 289.27, 319.80, 0, ''), (23089, 13, 790.41, 262.70, 341.42, 0, ''), (23089, 14, 782.88, 250.20, 341.60, 0, ''), From 28b54c193795b27f37f5b9757c556e781c45c75f Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sun, 4 Nov 2012 12:11:00 +0200 Subject: [PATCH 0743/1172] [2748] Update Arcatraz entrance event Thanks to X-Savior for providing the proper data. --- .../outland/tempest_keep/arcatraz/arcatraz.h | 8 ++- .../arcatraz/instance_arcatraz.cpp | 50 ++++++++++--------- sd2_revision_nr.h | 2 +- 3 files changed, 35 insertions(+), 25 deletions(-) diff --git a/scripts/outland/tempest_keep/arcatraz/arcatraz.h b/scripts/outland/tempest_keep/arcatraz/arcatraz.h index 7ecd272a0..d3e8979bc 100644 --- a/scripts/outland/tempest_keep/arcatraz/arcatraz.h +++ b/scripts/outland/tempest_keep/arcatraz/arcatraz.h @@ -8,6 +8,7 @@ enum { MAX_ENCOUNTER = 10, + MAX_WARDENS = 7, TYPE_ENTRANCE = 0, TYPE_ZEREKETH = 1, @@ -32,6 +33,8 @@ enum // intro event related NPC_PROTEAN_NIGHTMARE = 20864, NPC_PROTEAN_HORROR = 20865, + NPC_ARCATRAZ_WARDEN = 20859, + NPC_ARCATRAZ_DEFENDER = 20857, // Harbinger Skyriss event related (trash mobs are scripted in ACID) NPC_BLAZING_TRICKSTER = 20905, // phase 1 @@ -71,7 +74,9 @@ static const SpawnLocation aSummonPosition[5] = static const float aDalliahStartPos[4] = {118.6038f, 96.84682f, 22.44115f, 1.012f}; static const float aSoccotharesStartPos[4] = {122.1035f, 192.7203f, 22.44115f, 5.235f}; + static const float aEntranceMoveLoc[3] = {82.020f, 0.306f, -11.026f}; +static const float aEntranceSpawnLoc[4] = {173.471f, -0.138f, -10.101f, 3.123f}; class MANGOS_DLL_DECL instance_arcatraz : public ScriptedInstance, private DialogueHelper { @@ -83,6 +88,7 @@ class MANGOS_DLL_DECL instance_arcatraz : public ScriptedInstance, private Dialo void OnPlayerEnter(Player* pPlayer); void OnObjectCreate(GameObject* pGo); void OnCreatureCreate(Creature* pCreature); + void OnCreatureDeath(Creature* pCreature); void SetData(uint32 uiType, uint32 uiData); uint32 GetData(uint32 uiType); @@ -100,9 +106,9 @@ class MANGOS_DLL_DECL instance_arcatraz : public ScriptedInstance, private Dialo uint32 m_uiResetDelayTimer; uint32 m_uiEntranceEventTimer; + uint8 m_uiKilledWardens; GuidList m_lSkyrissEventMobsGuidList; - std::queue m_qIntroEventMobsGuidQueue; }; #endif diff --git a/scripts/outland/tempest_keep/arcatraz/instance_arcatraz.cpp b/scripts/outland/tempest_keep/arcatraz/instance_arcatraz.cpp index f5939bdb5..0aceee3e8 100644 --- a/scripts/outland/tempest_keep/arcatraz/instance_arcatraz.cpp +++ b/scripts/outland/tempest_keep/arcatraz/instance_arcatraz.cpp @@ -88,7 +88,8 @@ static const DialogueEntry aArcatrazDialogue[] = instance_arcatraz::instance_arcatraz(Map* pMap) : ScriptedInstance(pMap), DialogueHelper(aArcatrazDialogue), m_uiEntranceEventTimer(0), - m_uiResetDelayTimer(0) + m_uiResetDelayTimer(0), + m_uiKilledWardens(0) { Initialize(); } @@ -160,12 +161,6 @@ void instance_arcatraz::OnCreatureCreate(Creature* pCreature) case NPC_BL_DRAKONAAR: m_lSkyrissEventMobsGuidList.push_back(pCreature->GetObjectGuid()); break; - case NPC_PROTEAN_HORROR: - case NPC_PROTEAN_NIGHTMARE: - // Only take the mobs from the entrance - if (pCreature->GetPositionY() > 0 && pCreature->GetPositionY() < 1.0f) - m_qIntroEventMobsGuidQueue.push(pCreature->GetObjectGuid()); - break; } } @@ -411,6 +406,21 @@ void instance_arcatraz::JustDidDialogueStep(int32 iEntry) } } +void instance_arcatraz::OnCreatureDeath(Creature* pCreature) +{ + if (pCreature->GetEntry() == NPC_ARCATRAZ_WARDEN || pCreature->GetEntry() == NPC_ARCATRAZ_DEFENDER) + { + ++m_uiKilledWardens; + + // Stop the intro spawns when the wardens are killed + if (m_uiKilledWardens == MAX_WARDENS) + { + SetData(TYPE_ENTRANCE, DONE); + m_uiEntranceEventTimer = 0; + } + } +} + void instance_arcatraz::Update(uint32 uiDiff) { DialogueUpdate(uiDiff); @@ -431,25 +441,19 @@ void instance_arcatraz::Update(uint32 uiDiff) { if (m_uiEntranceEventTimer <= uiDiff) { - // Move the intro creatures into combat positions - if (Creature* pTemp = instance->GetCreature(m_qIntroEventMobsGuidQueue.front())) - { - if (pTemp->isAlive()) - { - pTemp->SetWalk(false); - pTemp->GetMotionMaster()->MovePoint(0, aEntranceMoveLoc[0], aEntranceMoveLoc[1], aEntranceMoveLoc[2]); - } - m_qIntroEventMobsGuidQueue.pop(); - } + Player* pPlayer = GetPlayerInMap(); + if (!pPlayer) + return; + + uint32 uiEntry = urand(0, 10) ? NPC_PROTEAN_HORROR : NPC_PROTEAN_NIGHTMARE; - // When all intro creatures were moved, stop the timer - if (m_qIntroEventMobsGuidQueue.empty()) + // Summon and move the intro creatures into combat positions + if (Creature* pTemp = pPlayer->SummonCreature(uiEntry, aEntranceSpawnLoc[0], aEntranceSpawnLoc[1], aEntranceSpawnLoc[2], aEntranceSpawnLoc[3], TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 30000)) { - SetData(TYPE_ENTRANCE, DONE); - m_uiEntranceEventTimer = 0; + pTemp->SetWalk(false); + pTemp->GetMotionMaster()->MovePoint(0, aEntranceMoveLoc[0], aEntranceMoveLoc[1], aEntranceMoveLoc[2]); } - else - m_uiEntranceEventTimer = urand(10000, 15000); + m_uiEntranceEventTimer = urand(0, 10) ? urand(1000, 2000) : urand(5000, 7000); } else m_uiEntranceEventTimer -= uiDiff; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index bcd2bbf5e..e1d6b3eb1 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2747" + #define SD2_REVISION_NR "2748" #endif // __SD2_REVISION_NR_H__ From 341fbdc42d9d5c1822f9435c82156ae26bf6a35a Mon Sep 17 00:00:00 2001 From: antifreak Date: Sun, 4 Nov 2012 21:36:35 +0200 Subject: [PATCH 0744/1172] [2749] Implement script support for quest 10629 Signed-off-by: Xfurry --- scripts/outland/hellfire_peninsula.cpp | 100 ++++++++++++++++++++++++- sd2_revision_nr.h | 2 +- sd2_revision_sql.h | 4 +- sql/mangos_scriptname_full.sql | 1 + sql/updates/r2749_mangos.sql | 1 + 5 files changed, 104 insertions(+), 4 deletions(-) create mode 100644 sql/updates/r2749_mangos.sql diff --git a/scripts/outland/hellfire_peninsula.cpp b/scripts/outland/hellfire_peninsula.cpp index 65f6332ef..f1c381f05 100644 --- a/scripts/outland/hellfire_peninsula.cpp +++ b/scripts/outland/hellfire_peninsula.cpp @@ -17,7 +17,7 @@ /* ScriptData SDName: Hellfire_Peninsula SD%Complete: 100 -SDComment: Quest support: 9375, 9410, 9418, 10838 +SDComment: Quest support: 9375, 9410, 9418, 10629, 10838 SDCategory: Hellfire Peninsula EndScriptData */ @@ -26,10 +26,12 @@ npc_aeranas npc_ancestral_wolf npc_demoniac_scryer npc_wounded_blood_elf +npc_fel_guard_hound EndContentData */ #include "precompiled.h" #include "escort_ai.h" +#include "pet_ai.h" /*###### ## npc_aeranas @@ -439,6 +441,96 @@ bool QuestAccept_npc_wounded_blood_elf(Player* pPlayer, Creature* pCreature, con return true; } +/*###### +## npc_fel_guard_hound +######*/ + +enum +{ + SPELL_CREATE_POODAD = 37688, + SPELL_FAKE_DOG_SPART = 37692, + SPELL_INFORM_DOG = 37689, + + NPC_DERANGED_HELBOAR = 16863, +}; + +struct MANGOS_DLL_DECL npc_fel_guard_houndAI : public ScriptedPetAI +{ + npc_fel_guard_houndAI(Creature* pCreature) : ScriptedPetAI(pCreature) { Reset(); } + + uint32 m_uiPoodadTimer; + + bool m_bIsPooActive; + + void Reset() + { + m_uiPoodadTimer = 0; + m_bIsPooActive = false; + } + + void MovementInform(uint32 uiMoveType, uint32 uiPointId) + { + if (uiMoveType != POINT_MOTION_TYPE || !uiPointId) + return; + + if (DoCastSpellIfCan(m_creature, SPELL_FAKE_DOG_SPART) == CAST_OK) + m_uiPoodadTimer = 2000; + } + + // Function to allow the boar to move to target + void DoMoveToCorpse(Unit* pBoar) + { + if (!pBoar) + return; + + m_bIsPooActive = true; + m_creature->GetMotionMaster()->MovePoint(1, pBoar->GetPositionX(), pBoar->GetPositionY(), pBoar->GetPositionZ()); + } + + void UpdateAI(const uint32 uiDiff) + { + if (m_uiPoodadTimer) + { + if (m_uiPoodadTimer <= uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_CREATE_POODAD) == CAST_OK) + { + m_uiPoodadTimer = 0; + m_bIsPooActive = false; + } + } + else + m_uiPoodadTimer -= uiDiff; + } + + if (!m_bIsPooActive) + ScriptedPetAI::UpdateAI(uiDiff); + } +}; + +CreatureAI* GetAI_npc_fel_guard_hound(Creature* pCreature) +{ + return new npc_fel_guard_houndAI(pCreature); +} + +bool EffectDummyCreature_npc_fel_guard_hound(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) +{ + // always check spellid and effectindex + if (uiSpellId == SPELL_INFORM_DOG && uiEffIndex == EFFECT_INDEX_0) + { + if (pCaster->GetEntry() == NPC_DERANGED_HELBOAR) + { + if (npc_fel_guard_houndAI* pHoundAI = dynamic_cast(pCreatureTarget->AI())) + pHoundAI->DoMoveToCorpse(pCaster); + } + + // always return true when we are handling this spell and effect + return true; + } + + return false; +} + void AddSC_hellfire_peninsula() { Script* pNewScript; @@ -465,4 +557,10 @@ void AddSC_hellfire_peninsula() pNewScript->GetAI = &GetAI_npc_wounded_blood_elf; pNewScript->pQuestAcceptNPC = &QuestAccept_npc_wounded_blood_elf; pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_fel_guard_hound"; + pNewScript->GetAI = &GetAI_npc_fel_guard_hound; + pNewScript->pEffectDummyNPC = &EffectDummyCreature_npc_fel_guard_hound; + pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index e1d6b3eb1..a8e3ec527 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2748" + #define SD2_REVISION_NR "2749" #endif // __SD2_REVISION_NR_H__ diff --git a/sd2_revision_sql.h b/sd2_revision_sql.h index f47a90c17..997c33355 100644 --- a/sd2_revision_sql.h +++ b/sd2_revision_sql.h @@ -1,5 +1,5 @@ #ifndef __SD2_REVISION_SQL_H__ #define __SD2_REVISION_SQL_H__ -#define REVISION_DB_SCRIPTDEV2 "required__scriptdev2" -#define REVISION_DB_SD2_MANGOS "required__mangos" + #define REVISION_DB_SCRIPTDEV2 "required__scriptdev2" + #define REVISION_DB_SD2_MANGOS "required__mangos" #endif // __SD2_REVISION_SQL_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 0595b3d02..8304e4341 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -642,6 +642,7 @@ UPDATE creature_template SET ScriptName='npc_aeranas' WHERE entry=17085; UPDATE creature_template SET ScriptName='npc_ancestral_wolf' WHERE entry=17077; UPDATE creature_template SET ScriptName='npc_demoniac_scryer' WHERE entry=22258; UPDATE creature_template SET ScriptName='npc_wounded_blood_elf' WHERE entry=16993; +UPDATE creature_template SET ScriptName='npc_fel_guard_hound' WHERE entry=21847; /* HILLSBRAD FOOTHILLS */ diff --git a/sql/updates/r2749_mangos.sql b/sql/updates/r2749_mangos.sql new file mode 100644 index 000000000..6ded09da2 --- /dev/null +++ b/sql/updates/r2749_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_fel_guard_hound' WHERE entry=21847; From ac031068079d9cf5749785e98bf3eba08e76e4f5 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sun, 4 Nov 2012 21:44:04 +0200 Subject: [PATCH 0745/1172] [2750] Replace some movement parts with GetNearPoint in Illidan's script --- scripts/outland/black_temple/boss_illidan.cpp | 6 ++++-- sd2_revision_nr.h | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/scripts/outland/black_temple/boss_illidan.cpp b/scripts/outland/black_temple/boss_illidan.cpp index 5a7f06ede..15dac4e0e 100644 --- a/scripts/outland/black_temple/boss_illidan.cpp +++ b/scripts/outland/black_temple/boss_illidan.cpp @@ -569,7 +569,9 @@ struct MANGOS_DLL_DECL boss_illidan_stormrageAI : public ScriptedAI, private Dia pSummoned->CastSpell(pTarget, SPELL_PARALYZE, true); // Move towards target (which is stunned) - pSummoned->GetMotionMaster()->MovePoint(1, pTarget->GetPositionX(), pTarget->GetPositionY(), pTarget->GetPositionZ()); + float fX, fY, fZ; + pTarget->GetContactPoint(pSummoned, fX, fY, fZ); + pSummoned->GetMotionMaster()->MovePoint(1, fX, fY, fZ); } break; case NPC_MAIEV_SHADOWSONG: @@ -1123,7 +1125,7 @@ struct MANGOS_DLL_DECL npc_akama_illidanAI : public npc_escortAI, private Dialog if (Creature* pIllidan = m_pInstance->GetSingleCreatureFromStorage(NPC_ILLIDAN_STORMRAGE)) { float fX, fY, fZ; - m_creature->GetRandomPoint(pIllidan->GetPositionX(), pIllidan->GetPositionY(), pIllidan->GetPositionZ(), 5.0f, fX, fY, fZ); + pIllidan->GetContactPoint(m_creature, fX, fY, fZ); m_creature->GetMotionMaster()->MovePoint(100, fX, fY, fZ); } } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index a8e3ec527..3657854e3 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2749" + #define SD2_REVISION_NR "2750" #endif // __SD2_REVISION_NR_H__ From e910269c5f5491aee957c5f1931e8030e7125aa3 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Tue, 6 Nov 2012 00:52:43 +0100 Subject: [PATCH 0746/1172] [2751] Add some safety to an old script. Based on possible problems spotted by Undergarun Original solution found by rangar Signed-off-by: Schmoozerd --- scripts/kalimdor/tanaris.cpp | 17 ++++++++++------- sd2_revision_nr.h | 2 +- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/scripts/kalimdor/tanaris.cpp b/scripts/kalimdor/tanaris.cpp index c3a1d92b6..c2ee315ad 100644 --- a/scripts/kalimdor/tanaris.cpp +++ b/scripts/kalimdor/tanaris.cpp @@ -70,21 +70,24 @@ struct MANGOS_DLL_DECL mob_aquementasAI : public ScriptedAI m_creature->setFaction(FACTION_FRIENDLY); } - void SendItem(Unit* pReceiver) + void SendItem(Player* pReceiver) { - if (((Player*)pReceiver)->HasItemCount(ITEM_BOOK_AQUOR, 1) && - ((Player*)pReceiver)->HasItemCount(ITEM_SILVERY_CLAWS, 11) && - ((Player*)pReceiver)->HasItemCount(ITEM_IRONTREE_HEART, 1)) + if (pReceiver->HasItemCount(ITEM_BOOK_AQUOR, 1) && + pReceiver->HasItemCount(ITEM_SILVERY_CLAWS, 11) && + pReceiver->HasItemCount(ITEM_IRONTREE_HEART, 1) && + !pReceiver->HasItemCount(ITEM_SILVER_TOTEM, 1)) { - if (Item* pItem = ((Player*)pReceiver)->StoreNewItemInInventorySlot(ITEM_SILVER_TOTEM, 1)) - ((Player*)pReceiver)->SendNewItem(pItem, 1, true, false); + if (Item* pItem = pReceiver->StoreNewItemInInventorySlot(ITEM_SILVER_TOTEM, 1)) + pReceiver->SendNewItem(pItem, 1, true, false); } } void Aggro(Unit* pWho) { DoScriptText(AGGRO_YELL_AQUE, m_creature, pWho); - SendItem(pWho); + + if (pWho->GetTypeId() == TYPEID_PLAYER) + SendItem(static_cast(pWho)); } void UpdateAI(const uint32 uiDiff) diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 3657854e3..ceaea5655 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2750" + #define SD2_REVISION_NR "2751" #endif // __SD2_REVISION_NR_H__ From 4ba7f7e9eb3214ccf7ab8f787064439f6bc0a738 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Fri, 16 Nov 2012 00:45:34 +0200 Subject: [PATCH 0747/1172] [2752] Add script support for spell 44935 - used for quest 11521 --- scripts/world/spell_scripts.cpp | 24 ++++++++++++++++++++++++ sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 2 +- sql/updates/r2752_mangos.sql | 1 + 4 files changed, 27 insertions(+), 2 deletions(-) create mode 100644 sql/updates/r2752_mangos.sql diff --git a/scripts/world/spell_scripts.cpp b/scripts/world/spell_scripts.cpp index 7f9c204a2..f3b07a812 100644 --- a/scripts/world/spell_scripts.cpp +++ b/scripts/world/spell_scripts.cpp @@ -327,6 +327,12 @@ enum NPC_FRANCLORN_FORGEWRIGHT = 8888, NPC_GAERIYAN = 9299, NPC_GANJO = 26924, + + // quest 11521 + SPELL_EXPOSE_RAZORTHORN_ROOT = 44935, + SPELL_SUMMON_RAZORTHORN_ROOT = 44941, + NPC_RAZORTHORN_RAVAGER = 24922, + GO_RAZORTHORN_DIRT_MOUND = 187073, }; bool EffectAuraDummy_spell_aura_dummy_npc(const Aura* pAura, bool bApply) @@ -976,6 +982,24 @@ bool EffectDummyCreature_spell_dummy_npc(Unit* pCaster, uint32 uiSpellId, SpellE } return true; } + case SPELL_EXPOSE_RAZORTHORN_ROOT: + { + if (uiEffIndex == EFFECT_INDEX_0) + { + if (pCreatureTarget->GetEntry() != NPC_RAZORTHORN_RAVAGER) + return true; + + if (GameObject* pMound = GetClosestGameObjectWithEntry(pCreatureTarget, GO_RAZORTHORN_DIRT_MOUND, 20.0f)) + { + if (pMound->GetRespawnTime() != 0) + return true; + + pCreatureTarget->CastSpell(pCreatureTarget, SPELL_SUMMON_RAZORTHORN_ROOT, true); + pMound->SetLootState(GO_JUST_DEACTIVATED); + } + } + return true; + } } return false; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index ceaea5655..5fe2ce829 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2751" + #define SD2_REVISION_NR "2752" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 8304e4341..3fd6c439c 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -170,7 +170,7 @@ UPDATE creature_template SET ScriptName='spell_dummy_npc' WHERE entry IN ( -- kalimdor 9299,12296,12298, -- outland -16880,16518,16847,17157,17326,17654,18879,22105,24918,25084,25085, +16880,16518,16847,17157,17326,17654,18879,22105,24918,24922,25084,25085, -- northrend 23678,25752,25753,25758,25792,25793,26268,26270,26421,26616,26643,26841,26924,27122,27263,27264,27265,27808,28053,28054,28068,28093,28465,28600,29319,29327,29329,29330,29338,30146,32149); diff --git a/sql/updates/r2752_mangos.sql b/sql/updates/r2752_mangos.sql new file mode 100644 index 000000000..7c5fb4b8a --- /dev/null +++ b/sql/updates/r2752_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='spell_dummy_npc' WHERE entry=24922; From 5588d54479b86185ac680839bb3839aa772e36c5 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Fri, 16 Nov 2012 09:42:07 +0200 Subject: [PATCH 0748/1172] [2753] Order the spells in the proper order --- scripts/world/spell_scripts.cpp | 19 ++++++++++--------- sd2_revision_nr.h | 2 +- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/scripts/world/spell_scripts.cpp b/scripts/world/spell_scripts.cpp index f3b07a812..33e8d71f5 100644 --- a/scripts/world/spell_scripts.cpp +++ b/scripts/world/spell_scripts.cpp @@ -22,25 +22,26 @@ SDCategory: Spell EndScriptData */ /* ContentData -spell 34665 -spell 19512 spell 8913 +spell 19512 spell 21014 spell 29528 spell 29866 -spell 46770 +spell 34665 +spell 39246 +spell 43340 +spell 44935 +spell 45109 +spell 45111 spell 46023 +spell 46770 spell 47575 +spell 48218 spell 50706 -spell 45109 -spell 45111 -spell 39246 -spell 52090 spell 51331 spell 51332 spell 51366 -spell 43340 -spell 48218 +spell 52090 EndContentData */ #include "precompiled.h" diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 5fe2ce829..fef39aed8 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2752" + #define SD2_REVISION_NR "2753" #endif // __SD2_REVISION_NR_H__ From 50619a6f8fea072cc5416793c436e6f2eb75b743 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Fri, 16 Nov 2012 22:11:34 +0100 Subject: [PATCH 0749/1172] [2754] Add some override correctness --- base/escort_ai.h | 24 ++-- base/follower_ai.h | 14 +-- base/guard_ai.h | 12 +- include/sc_creature.h | 6 +- scripts/battlegrounds/battleground.cpp | 8 +- scripts/eastern_kingdoms/arathi_highlands.cpp | 8 +- .../blackrock_depths/blackrock_depths.cpp | 24 ++-- .../blackrock_depths/blackrock_depths.h | 20 +-- .../boss_ambassador_flamelash.cpp | 10 +- .../blackrock_depths/boss_coren_direbrew.cpp | 8 +- .../boss_emperor_dagran_thaurissan.cpp | 18 +-- .../boss_general_angerforge.cpp | 6 +- .../boss_high_interrogator_gerstahn.cpp | 4 +- .../blackrock_spire/blackrock_spire.h | 24 ++-- .../blackrock_spire/boss_gyth.cpp | 6 +- .../boss_overlord_wyrmthalak.cpp | 6 +- .../boss_pyroguard_emberseer.cpp | 8 +- .../blackwing_lair/blackwing_lair.h | 18 +-- .../boss_broodlord_lashlayer.cpp | 10 +- .../blackwing_lair/boss_chromaggus.cpp | 10 +- .../blackwing_lair/boss_ebonroc.cpp | 10 +- .../blackwing_lair/boss_firemaw.cpp | 10 +- .../blackwing_lair/boss_flamegor.cpp | 10 +- .../blackwing_lair/boss_nefarian.cpp | 12 +- .../blackwing_lair/boss_razorgore.cpp | 10 +- .../blackwing_lair/boss_vaelastrasz.cpp | 14 +-- .../blackwing_lair/boss_victor_nefarius.cpp | 18 +-- scripts/eastern_kingdoms/burning_steppes.cpp | 22 ++-- .../deadmines/boss_mr_smite.cpp | 10 +- .../eastern_kingdoms/deadmines/deadmines.h | 20 +-- .../eastern_kingdoms/eastern_plaguelands.cpp | 10 +- scripts/eastern_kingdoms/eversong_woods.cpp | 26 ++-- scripts/eastern_kingdoms/ghostlands.cpp | 6 +- .../gnomeregan/boss_thermaplugg.cpp | 20 +-- .../gnomeregan/gnomeregan.cpp | 20 +-- .../eastern_kingdoms/gnomeregan/gnomeregan.h | 14 +-- scripts/eastern_kingdoms/hinterlands.cpp | 22 ++-- .../eastern_kingdoms/isle_of_queldanas.cpp | 6 +- .../karazhan/boss_curator.cpp | 14 +-- .../karazhan/boss_maiden_of_virtue.cpp | 12 +- .../karazhan/boss_midnight.cpp | 26 ++-- .../eastern_kingdoms/karazhan/boss_moroes.cpp | 14 +-- .../karazhan/boss_netherspite.cpp | 12 +- .../karazhan/boss_nightbane.cpp | 18 +-- .../karazhan/boss_prince_malchezaar.cpp | 24 ++-- .../karazhan/boss_shade_of_aran.cpp | 24 ++-- .../karazhan/boss_terestian_illhoof.cpp | 30 ++--- .../karazhan/bosses_opera.cpp | 116 +++++++++--------- .../eastern_kingdoms/karazhan/karazhan.cpp | 32 ++--- scripts/eastern_kingdoms/karazhan/karazhan.h | 20 +-- scripts/eastern_kingdoms/loch_modan.cpp | 8 +- .../boss_felblood_kaelthas.cpp | 52 ++++---- .../boss_priestess_delrissa.cpp | 46 +++---- .../boss_selin_fireheart.cpp | 24 ++-- .../magisters_terrace/boss_vexallus.cpp | 22 ++-- .../magisters_terrace/magisters_terrace.cpp | 6 +- .../magisters_terrace/magisters_terrace.h | 16 +-- .../molten_core/boss_baron_geddon.cpp | 10 +- .../molten_core/boss_garr.cpp | 14 +-- .../molten_core/boss_gehennas.cpp | 10 +- .../molten_core/boss_golemagg.cpp | 16 +-- .../molten_core/boss_lucifron.cpp | 10 +- .../molten_core/boss_magmadar.cpp | 10 +- .../molten_core/boss_majordomo_executus.cpp | 22 ++-- .../molten_core/boss_ragnaros.cpp | 18 +-- .../molten_core/boss_shazzrah.cpp | 10 +- .../molten_core/boss_sulfuron_harbinger.cpp | 14 +-- .../molten_core/molten_core.h | 18 +-- .../eastern_kingdoms/redridge_mountains.cpp | 8 +- .../scarlet_enclave/ebon_hold.cpp | 36 +++--- .../scarlet_monastery/boss_arcanist_doan.cpp | 6 +- .../boss_headless_horseman.cpp | 10 +- .../scarlet_monastery/boss_herod.cpp | 16 +-- .../boss_mograine_and_whitemane.cpp | 28 ++--- .../scarlet_monastery/scarlet_monastery.h | 12 +- .../scholomance/boss_darkmaster_gandling.cpp | 4 +- .../scholomance/boss_jandice_barov.cpp | 6 +- .../scholomance/scholomance.h | 20 +-- .../shadowfang_keep/boss_hummel.cpp | 8 +- .../shadowfang_keep/shadowfang_keep.cpp | 40 +++--- .../shadowfang_keep/shadowfang_keep.h | 16 +-- .../eastern_kingdoms/silverpine_forest.cpp | 16 +-- scripts/eastern_kingdoms/stormwind_city.cpp | 38 +++--- .../eastern_kingdoms/stranglethorn_vale.cpp | 8 +- .../stratholme/boss_baroness_anastari.cpp | 4 +- .../stratholme/boss_cannon_master_willey.cpp | 6 +- .../stratholme/boss_dathrohan_balnazzar.cpp | 8 +- .../stratholme/boss_maleki_the_pallid.cpp | 4 +- .../stratholme/boss_order_of_silver_hand.cpp | 6 +- .../stratholme/stratholme.cpp | 20 +-- .../eastern_kingdoms/stratholme/stratholme.h | 20 +-- .../sunken_temple/sunken_temple.cpp | 4 +- .../sunken_temple/sunken_temple.h | 18 +-- .../sunwell_plateau/boss_brutallus.cpp | 26 ++-- .../sunwell_plateau/boss_eredar_twins.cpp | 32 ++--- .../sunwell_plateau/boss_felmyst.cpp | 18 +-- .../sunwell_plateau/boss_kalecgos.cpp | 38 +++--- .../sunwell_plateau/boss_kiljaeden.cpp | 42 +++---- .../sunwell_plateau/boss_muru.cpp | 38 +++--- .../sunwell_plateau/sunwell_plateau.h | 24 ++-- scripts/eastern_kingdoms/swamp_of_sorrows.cpp | 10 +- scripts/eastern_kingdoms/tirisfal_glades.cpp | 8 +- .../uldaman/boss_archaedas.cpp | 18 +-- scripts/eastern_kingdoms/uldaman/uldaman.h | 20 +-- scripts/eastern_kingdoms/undercity.cpp | 6 +- .../eastern_kingdoms/western_plaguelands.cpp | 4 +- scripts/eastern_kingdoms/westfall.cpp | 16 +-- scripts/eastern_kingdoms/wetlands.cpp | 12 +- .../eastern_kingdoms/zulaman/boss_akilzon.cpp | 22 ++-- .../eastern_kingdoms/zulaman/boss_halazzi.cpp | 24 ++-- .../eastern_kingdoms/zulaman/boss_janalai.cpp | 42 +++---- .../zulaman/boss_malacrass.cpp | 16 +-- .../zulaman/boss_nalorakk.cpp | 16 +-- .../eastern_kingdoms/zulaman/boss_zuljin.cpp | 20 +-- scripts/eastern_kingdoms/zulaman/zulaman.cpp | 8 +- scripts/eastern_kingdoms/zulaman/zulaman.h | 20 +-- .../eastern_kingdoms/zulgurub/boss_arlokk.cpp | 12 +- .../eastern_kingdoms/zulgurub/boss_hakkar.cpp | 6 +- .../zulgurub/boss_hazzarah.cpp | 6 +- .../eastern_kingdoms/zulgurub/boss_jeklik.cpp | 22 ++-- .../eastern_kingdoms/zulgurub/boss_jindo.cpp | 16 +-- .../zulgurub/boss_mandokir.cpp | 28 ++--- .../eastern_kingdoms/zulgurub/boss_marli.cpp | 10 +- .../zulgurub/boss_renataki.cpp | 6 +- .../eastern_kingdoms/zulgurub/boss_thekal.cpp | 24 ++-- .../zulgurub/boss_venoxis.cpp | 8 +- scripts/eastern_kingdoms/zulgurub/zulgurub.h | 16 +-- scripts/examples/example_creature.cpp | 8 +- scripts/examples/example_escort.cpp | 12 +- scripts/kalimdor/ashenvale.cpp | 34 ++--- scripts/kalimdor/azshara.cpp | 24 ++-- scripts/kalimdor/azuremyst_isle.cpp | 26 ++-- .../blackfathom_deeps/blackfathom_deeps.h | 18 +-- scripts/kalimdor/bloodmyst_isle.cpp | 8 +- scripts/kalimdor/boss_azuregos.cpp | 8 +- .../culling_of_stratholme.h | 18 +-- .../dark_portal/boss_aeonus.cpp | 12 +- .../dark_portal/boss_chrono_lord_deja.cpp | 12 +- .../dark_portal/boss_temporus.cpp | 12 +- .../dark_portal/dark_portal.cpp | 24 ++-- .../caverns_of_time/dark_portal/dark_portal.h | 20 +-- .../caverns_of_time/hyjal/boss_archimonde.cpp | 18 +-- .../kalimdor/caverns_of_time/hyjal/hyjal.h | 22 ++-- .../kalimdor/caverns_of_time/hyjal/hyjalAI.h | 16 +-- .../old_hillsbrad/old_hillsbrad.cpp | 36 +++--- .../old_hillsbrad/old_hillsbrad.h | 22 ++-- scripts/kalimdor/darkshore.cpp | 30 ++--- scripts/kalimdor/desolace.cpp | 26 ++-- scripts/kalimdor/dire_maul/dire_maul.h | 18 +-- scripts/kalimdor/durotar.cpp | 6 +- scripts/kalimdor/dustwallow_marsh.cpp | 38 +++--- scripts/kalimdor/felwood.cpp | 16 +-- scripts/kalimdor/feralas.cpp | 8 +- scripts/kalimdor/maraudon/boss_noxxion.cpp | 6 +- scripts/kalimdor/moonglade.cpp | 38 +++--- scripts/kalimdor/mulgore.cpp | 8 +- scripts/kalimdor/onyxias_lair/boss_onyxia.cpp | 22 ++-- scripts/kalimdor/onyxias_lair/onyxias_lair.h | 10 +- scripts/kalimdor/orgrimmar.cpp | 6 +- .../razorfen_downs/razorfen_downs.cpp | 10 +- .../razorfen_kraul/razorfen_kraul.cpp | 8 +- .../kalimdor/razorfen_kraul/razorfen_kraul.h | 14 +-- .../ruins_of_ahnqiraj/boss_ayamiss.cpp | 18 +-- .../kalimdor/ruins_of_ahnqiraj/boss_buru.cpp | 16 +-- .../ruins_of_ahnqiraj/boss_kurinnaxx.cpp | 6 +- .../kalimdor/ruins_of_ahnqiraj/boss_moam.cpp | 6 +- .../ruins_of_ahnqiraj/boss_ossirian.cpp | 16 +-- .../ruins_of_ahnqiraj/boss_rajaxx.cpp | 20 +-- .../ruins_of_ahnqiraj/ruins_of_ahnqiraj.cpp | 12 +- .../ruins_of_ahnqiraj/ruins_of_ahnqiraj.h | 22 ++-- scripts/kalimdor/silithus.cpp | 14 +-- scripts/kalimdor/stonetalon_mountains.cpp | 6 +- scripts/kalimdor/tanaris.cpp | 28 ++--- scripts/kalimdor/teldrassil.cpp | 6 +- .../temple_of_ahnqiraj/boss_bug_trio.cpp | 24 ++-- .../temple_of_ahnqiraj/boss_cthun.cpp | 36 +++--- .../temple_of_ahnqiraj/boss_fankriss.cpp | 12 +- .../temple_of_ahnqiraj/boss_huhuran.cpp | 10 +- .../kalimdor/temple_of_ahnqiraj/boss_ouro.cpp | 20 +-- .../temple_of_ahnqiraj/boss_sartura.cpp | 16 +-- .../temple_of_ahnqiraj/boss_skeram.cpp | 14 +-- .../temple_of_ahnqiraj/boss_twinemperors.cpp | 36 +++--- .../temple_of_ahnqiraj/boss_viscidus.cpp | 10 +- .../mob_anubisath_sentinel.cpp | 12 +- .../temple_of_ahnqiraj/temple_of_ahnqiraj.h | 18 +-- scripts/kalimdor/the_barrens.cpp | 36 +++--- scripts/kalimdor/thousand_needles.cpp | 20 +-- scripts/kalimdor/ungoro_crater.cpp | 14 +-- .../wailing_caverns/wailing_caverns.cpp | 18 +-- .../wailing_caverns/wailing_caverns.h | 16 +-- scripts/kalimdor/winterspring.cpp | 12 +- scripts/kalimdor/zulfarrak/zulfarrak.cpp | 16 +-- scripts/kalimdor/zulfarrak/zulfarrak.h | 16 +-- .../northrend/azjol-nerub/ahnkahet/ahnkahet.h | 18 +-- .../azjol-nerub/ahnkahet/boss_amanitar.cpp | 22 ++-- .../azjol-nerub/ahnkahet/boss_jedoga.cpp | 32 ++--- .../azjol-nerub/ahnkahet/boss_nadox.cpp | 22 ++-- .../azjol-nerub/ahnkahet/boss_taldaram.cpp | 20 +-- .../azjol-nerub/ahnkahet/boss_volazj.cpp | 10 +- .../azjol-nerub/azjol-nerub/azjol-nerub.h | 20 +-- .../azjol-nerub/azjol-nerub/boss_anubarak.cpp | 16 +-- .../azjol-nerub/azjol-nerub/boss_hadronox.cpp | 6 +- .../azjol-nerub/azjol-nerub/boss_krikthir.cpp | 14 +-- scripts/northrend/borean_tundra.cpp | 30 ++--- .../boss_anubarak_trial.cpp | 42 +++---- .../trial_of_the_crusader/boss_jaraxxus.cpp | 18 +-- .../boss_northrend_beasts.cpp | 48 ++++---- .../boss_twin_valkyr.cpp | 12 +- .../trial_of_the_crusader.cpp | 4 +- .../trial_of_the_crusader.h | 20 +-- scripts/northrend/dalaran.cpp | 8 +- scripts/northrend/dragonblight.cpp | 6 +- .../northrend/draktharon_keep/boss_novos.cpp | 30 ++--- .../draktharon_keep/boss_tharonja.cpp | 12 +- .../draktharon_keep/boss_trollgore.cpp | 16 +-- .../draktharon_keep/draktharon_keep.h | 20 +-- scripts/northrend/grizzly_hills.cpp | 4 +- scripts/northrend/gundrak/boss_colossus.cpp | 40 +++--- scripts/northrend/gundrak/boss_eck.cpp | 12 +- scripts/northrend/gundrak/boss_galdarah.cpp | 14 +-- scripts/northrend/gundrak/boss_moorabi.cpp | 10 +- scripts/northrend/gundrak/boss_sladran.cpp | 22 ++-- scripts/northrend/gundrak/gundrak.h | 20 +-- scripts/northrend/howling_fjord.cpp | 20 +-- .../forge_of_souls/boss_bronjahm.cpp | 20 +-- .../forge_of_souls/boss_devourer_of_souls.cpp | 16 +-- .../forge_of_souls/forge_of_souls.h | 18 +-- .../boss_forgemaster_garfrost.cpp | 12 +- .../frozen_halls/pit_of_saron/pit_of_saron.h | 14 +-- .../icecrown_citadel/blood_prince_council.cpp | 88 ++++++------- .../boss_blood_queen_lanathel.cpp | 14 +-- .../boss_deathbringer_saurfang.cpp | 20 +-- .../icecrown_citadel/boss_festergut.cpp | 12 +- .../boss_lady_deathwhisper.cpp | 16 +-- .../icecrown_citadel/boss_lord_marrowgar.cpp | 16 +-- .../boss_professor_putricide.cpp | 14 +-- .../icecrown_citadel/boss_rotface.cpp | 28 ++--- .../icecrown_citadel/boss_sindragosa.cpp | 50 ++++---- .../icecrown_citadel/boss_the_lich_king.cpp | 14 +-- .../boss_valithria_dreamwalker.cpp | 10 +- .../icecrown_citadel/icecrown_citadel.h | 24 ++-- .../northrend/naxxramas/boss_anubrekhan.cpp | 18 +-- scripts/northrend/naxxramas/boss_faerlina.cpp | 16 +-- .../naxxramas/boss_four_horsemen.cpp | 56 ++++----- scripts/northrend/naxxramas/boss_gluth.cpp | 16 +-- scripts/northrend/naxxramas/boss_gothik.cpp | 16 +-- .../northrend/naxxramas/boss_grobbulus.cpp | 12 +- scripts/northrend/naxxramas/boss_heigan.cpp | 12 +- .../northrend/naxxramas/boss_kelthuzad.cpp | 18 +-- scripts/northrend/naxxramas/boss_loatheb.cpp | 14 +-- scripts/northrend/naxxramas/boss_maexxna.cpp | 22 ++-- scripts/northrend/naxxramas/boss_noth.cpp | 16 +-- .../northrend/naxxramas/boss_patchwerk.cpp | 12 +- .../northrend/naxxramas/boss_razuvious.cpp | 12 +- .../northrend/naxxramas/boss_sapphiron.cpp | 14 +-- scripts/northrend/naxxramas/boss_thaddius.cpp | 50 ++++---- scripts/northrend/naxxramas/naxxramas.h | 24 ++-- .../nexus/eye_of_eternity/boss_malygos.cpp | 34 ++--- .../nexus/eye_of_eternity/eye_of_eternity.h | 12 +- .../northrend/nexus/nexus/boss_anomalus.cpp | 24 ++-- .../nexus/nexus/boss_keristrasza.cpp | 10 +- .../northrend/nexus/nexus/boss_ormorok.cpp | 12 +- .../northrend/nexus/nexus/boss_telestra.cpp | 18 +-- scripts/northrend/nexus/nexus/nexus.h | 16 +-- .../northrend/nexus/oculus/boss_eregos.cpp | 18 +-- scripts/northrend/nexus/oculus/boss_urom.cpp | 20 +-- scripts/northrend/nexus/oculus/oculus.h | 20 +-- .../obsidian_sanctum/boss_sartharion.cpp | 66 +++++----- .../obsidian_sanctum/obsidian_sanctum.h | 10 +- .../northrend/ruby_sanctum/boss_baltharus.cpp | 14 +-- .../northrend/ruby_sanctum/boss_saviana.cpp | 12 +- .../ruby_sanctum/boss_zarithrian.cpp | 12 +- scripts/northrend/ruby_sanctum/ruby_sanctum.h | 20 +-- scripts/northrend/sholazar_basin.cpp | 14 +-- .../halls_of_lightning/boss_bjarngrim.cpp | 16 +-- .../ulduar/halls_of_lightning/boss_ionar.cpp | 22 ++-- .../ulduar/halls_of_lightning/boss_loken.cpp | 10 +- .../halls_of_lightning/boss_volkhan.cpp | 26 ++-- .../halls_of_lightning/halls_of_lightning.h | 16 +-- .../halls_of_stone/boss_maiden_of_grief.cpp | 12 +- .../ulduar/halls_of_stone/boss_sjonnir.cpp | 14 +-- .../ulduar/halls_of_stone/halls_of_stone.cpp | 18 +-- .../ulduar/halls_of_stone/halls_of_stone.h | 16 +-- .../ulduar/ulduar/assembly_of_iron.cpp | 50 ++++---- .../northrend/ulduar/ulduar/boss_auriaya.cpp | 24 ++-- .../ulduar/ulduar/boss_general_vezax.cpp | 18 +-- scripts/northrend/ulduar/ulduar/ulduar.h | 22 ++-- .../utgarde_keep/utgarde_keep/boss_ingvar.cpp | 26 ++-- .../utgarde_keep/boss_keleseth.cpp | 26 ++-- .../boss_skarvald_and_dalronn.cpp | 24 ++-- .../utgarde_keep/utgarde_keep.cpp | 10 +- .../utgarde_keep/utgarde_keep/utgarde_keep.h | 18 +-- .../utgarde_pinnacle/boss_gortok.cpp | 12 +- .../utgarde_pinnacle/boss_skadi.cpp | 12 +- .../utgarde_pinnacle/boss_svala.cpp | 20 +-- .../utgarde_pinnacle/boss_ymiron.cpp | 16 +-- .../utgarde_pinnacle/utgarde_pinnacle.h | 20 +-- scripts/northrend/violet_hold/boss_erekem.cpp | 16 +-- .../northrend/violet_hold/boss_ichoron.cpp | 10 +- scripts/northrend/violet_hold/violet_hold.cpp | 28 ++--- scripts/northrend/violet_hold/violet_hold.h | 24 ++-- scripts/northrend/zuldrak.cpp | 4 +- .../auchenai_crypts/boss_exarch_maladaar.cpp | 22 ++-- .../auchenai_crypts/boss_shirrak.cpp | 6 +- .../mana_tombs/boss_nexusprince_shaffar.cpp | 14 +-- .../mana_tombs/boss_pandemonius.cpp | 10 +- .../auchindoun/sethekk_halls/boss_anzu.cpp | 12 +- .../sethekk_halls/boss_darkweaver_syth.cpp | 12 +- .../sethekk_halls/boss_talon_king_ikiss.cpp | 14 +-- .../auchindoun/sethekk_halls/sethekk_halls.h | 16 +-- .../boss_ambassador_hellmaw.cpp | 12 +- .../boss_blackheart_the_inciter.cpp | 12 +- .../boss_grandmaster_vorpil.cpp | 24 ++-- .../shadow_labyrinth/boss_murmur.cpp | 4 +- .../shadow_labyrinth/shadow_labyrinth.h | 14 +-- scripts/outland/black_temple/black_temple.h | 18 +-- .../outland/black_temple/boss_bloodboil.cpp | 12 +- scripts/outland/black_temple/boss_illidan.cpp | 92 +++++++------- .../black_temple/boss_mother_shahraz.cpp | 12 +- .../black_temple/boss_reliquary_of_souls.cpp | 52 ++++---- .../black_temple/boss_shade_of_akama.cpp | 52 ++++---- .../outland/black_temple/boss_supremus.cpp | 30 ++--- .../black_temple/boss_teron_gorefiend.cpp | 16 +-- .../black_temple/boss_warlord_najentus.cpp | 14 +-- .../outland/black_temple/illidari_council.cpp | 54 ++++---- scripts/outland/blades_edge_mountains.cpp | 18 +-- scripts/outland/boss_doomlord_kazzak.cpp | 12 +- scripts/outland/boss_doomwalker.cpp | 10 +- .../boss_fathomlord_karathress.cpp | 38 +++--- .../boss_hydross_the_unstable.cpp | 18 +-- .../serpent_shrine/boss_lady_vashj.cpp | 28 ++--- .../boss_leotheras_the_blind.cpp | 18 +-- .../boss_morogrim_tidewalker.cpp | 22 ++-- .../serpent_shrine/boss_the_lurker_below.cpp | 10 +- .../serpent_shrine/serpent_shrine.h | 20 +-- .../steam_vault/boss_hydromancer_thespia.cpp | 12 +- .../boss_mekgineer_steamrigger.cpp | 22 ++-- .../steam_vault/boss_warlord_kalithresh.cpp | 24 ++-- .../steam_vault/steam_vault.h | 16 +-- .../underbog/boss_hungarfen.cpp | 16 +-- scripts/outland/gruuls_lair/boss_gruul.cpp | 14 +-- .../gruuls_lair/boss_high_king_maulgar.cpp | 36 +++--- scripts/outland/gruuls_lair/gruuls_lair.h | 16 +-- .../blood_furnace/blood_furnace.h | 18 +-- .../blood_furnace/boss_broggok.cpp | 20 +-- .../boss_kelidan_the_breaker.cpp | 24 ++-- .../blood_furnace/boss_the_maker.cpp | 12 +- .../boss_nazan_and_vazruden.cpp | 26 ++-- .../boss_omor_the_unscarred.cpp | 12 +- .../boss_watchkeeper_gargolmar.cpp | 12 +- .../hellfire_ramparts/hellfire_ramparts.h | 10 +- .../magtheridons_lair/boss_magtheridon.cpp | 44 +++---- .../magtheridons_lair/magtheridons_lair.h | 14 +-- .../shattered_halls/boss_nethekurse.cpp | 35 +++--- .../boss_warbringer_omrogg.cpp | 18 +-- .../boss_warchief_kargath_bladefist.cpp | 16 +-- .../shattered_halls/shattered_halls.h | 22 ++-- scripts/outland/hellfire_peninsula.cpp | 34 ++--- scripts/outland/nagrand.cpp | 26 ++-- scripts/outland/netherstorm.cpp | 54 ++++---- scripts/outland/shadowmoon_valley.cpp | 74 +++++------ scripts/outland/shattrath_city.cpp | 24 ++-- .../tempest_keep/arcatraz/arcatraz.cpp | 26 ++-- .../outland/tempest_keep/arcatraz/arcatraz.h | 22 ++-- .../tempest_keep/arcatraz/boss_dalliah.cpp | 14 +-- .../arcatraz/boss_harbinger_skyriss.cpp | 12 +- .../arcatraz/boss_soccothrates.cpp | 18 +-- .../botanica/boss_high_botanist_freywinn.cpp | 14 +-- .../tempest_keep/botanica/boss_laj.cpp | 6 +- .../botanica/boss_warp_splinter.cpp | 18 +-- .../tempest_keep/the_eye/boss_alar.cpp | 20 +-- .../tempest_keep/the_eye/boss_astromancer.cpp | 20 +-- .../tempest_keep/the_eye/boss_kaelthas.cpp | 88 ++++++------- .../tempest_keep/the_eye/boss_void_reaver.cpp | 14 +-- .../outland/tempest_keep/the_eye/the_eye.h | 12 +- .../boss_nethermancer_sepethrea.cpp | 12 +- .../boss_pathaleon_the_calculator.cpp | 16 +-- .../tempest_keep/the_mechanar/mechanar.h | 20 +-- scripts/outland/terokkar_forest.cpp | 58 ++++----- scripts/outland/zangarmarsh.cpp | 8 +- scripts/world/bosses_emerald_dragons.cpp | 48 ++++---- scripts/world/guards.cpp | 8 +- scripts/world/mob_generic_creature.cpp | 6 +- scripts/world/npcs_special.cpp | 48 ++++---- sd2_revision_nr.h | 2 +- 385 files changed, 3675 insertions(+), 3676 deletions(-) diff --git a/base/escort_ai.h b/base/escort_ai.h index 47cd11965..04660d4ac 100644 --- a/base/escort_ai.h +++ b/base/escort_ai.h @@ -36,31 +36,31 @@ struct MANGOS_DLL_DECL npc_escortAI : public ScriptedAI explicit npc_escortAI(Creature* pCreature); ~npc_escortAI() {} - void GetAIInformation(ChatHandler& reader); + void GetAIInformation(ChatHandler& reader) override; - virtual void Aggro(Unit*); + virtual void Aggro(Unit*) override; - virtual void Reset() = 0; + virtual void Reset() override = 0; // CreatureAI functions - bool IsVisible(Unit*) const; + bool IsVisible(Unit*) const override; - void AttackStart(Unit*); + void AttackStart(Unit*) override; - void EnterCombat(Unit*); + void EnterCombat(Unit*) override; - void MoveInLineOfSight(Unit*); + void MoveInLineOfSight(Unit*) override; - void JustDied(Unit*); + void JustDied(Unit*) override; - void JustRespawned(); + void JustRespawned() override; - void EnterEvadeMode(); + void EnterEvadeMode() override; - void UpdateAI(const uint32); // the "internal" update, calls UpdateEscortAI() + void UpdateAI(const uint32) override; // the "internal" update, calls UpdateEscortAI() virtual void UpdateEscortAI(const uint32); // used when it's needed to add code in update (abilities, scripted events, etc) - void MovementInform(uint32, uint32); + void MovementInform(uint32, uint32) override; // EscortAI functions // void AddWaypoint(uint32 id, float x, float y, float z, uint32 WaitTimeMs = 0); diff --git a/base/follower_ai.h b/base/follower_ai.h index 346eca54f..8811c4562 100644 --- a/base/follower_ai.h +++ b/base/follower_ai.h @@ -24,19 +24,19 @@ class MANGOS_DLL_DECL FollowerAI : public ScriptedAI // virtual void WaypointReached(uint32 uiPointId) = 0; - void MovementInform(uint32 uiMotionType, uint32 uiPointId); + void MovementInform(uint32 uiMotionType, uint32 uiPointId) override; - void AttackStart(Unit*); + void AttackStart(Unit*) override; - void MoveInLineOfSight(Unit*); + void MoveInLineOfSight(Unit*) override; - void EnterEvadeMode(); + void EnterEvadeMode() override; - void JustDied(Unit*); + void JustDied(Unit*) override; - void JustRespawned(); + void JustRespawned() override; - void UpdateAI(const uint32); // the "internal" update, calls UpdateFollowerAI() + void UpdateAI(const uint32) override; // the "internal" update, calls UpdateFollowerAI() virtual void UpdateFollowerAI(const uint32); // used when it's needed to add code in update (abilities, scripted events, etc) void StartFollow(Player* pPlayer, uint32 uiFactionForFollower = 0, const Quest* pQuest = NULL); diff --git a/base/guard_ai.h b/base/guard_ai.h index 0de094e50..c681ccb2a 100644 --- a/base/guard_ai.h +++ b/base/guard_ai.h @@ -33,13 +33,13 @@ struct MANGOS_DLL_DECL guardAI : public ScriptedAI uint32 m_uiGlobalCooldown; // This variable acts like the global cooldown that players have (1.5 seconds) uint32 m_uiBuffTimer; // This variable keeps track of buffs - void Reset(); + void Reset() override; - void Aggro(Unit* pWho); + void Aggro(Unit* pWho) override; - void JustDied(Unit* pKiller); + void JustDied(Unit* pKiller) override; - void UpdateAI(const uint32 uiDiff); + void UpdateAI(const uint32 uiDiff) override; // Commonly used for guards in main cities void DoReplyToTextEmote(uint32 uiTextEmote); @@ -49,14 +49,14 @@ struct MANGOS_DLL_DECL guardAI_orgrimmar : public guardAI { guardAI_orgrimmar(Creature* pCreature) : guardAI(pCreature) {} - void ReceiveEmote(Player* pPlayer, uint32 uiTextEmote); + void ReceiveEmote(Player* pPlayer, uint32 uiTextEmote) override; }; struct MANGOS_DLL_DECL guardAI_stormwind : public guardAI { guardAI_stormwind(Creature* pCreature) : guardAI(pCreature) {} - void ReceiveEmote(Player* pPlayer, uint32 uiTextEmote); + void ReceiveEmote(Player* pPlayer, uint32 uiTextEmote) override; }; #endif diff --git a/include/sc_creature.h b/include/sc_creature.h index b5542308f..a45b6e9ee 100644 --- a/include/sc_creature.h +++ b/include/sc_creature.h @@ -85,7 +85,7 @@ struct MANGOS_DLL_DECL ScriptedAI : public CreatureAI void CorpseRemoved(uint32& uiRespawnDelay) override {} // Called when a summoned creature is killed - void SummonedCreatureJustDied(Creature* pSummoned) {} + void SummonedCreatureJustDied(Creature* pSummoned) override {} // Called at creature killing another unit void KilledUnit(Unit* pVictim) override {} @@ -227,10 +227,10 @@ struct MANGOS_DLL_DECL Scripted_NoMovementAI : public ScriptedAI { Scripted_NoMovementAI(Creature* pCreature) : ScriptedAI(pCreature) {} - void GetAIInformation(ChatHandler& reader); + void GetAIInformation(ChatHandler& reader) override; // Called at each attack of m_creature by any victim - void AttackStart(Unit* pWho); + void AttackStart(Unit* pWho) override; }; #endif diff --git a/scripts/battlegrounds/battleground.cpp b/scripts/battlegrounds/battleground.cpp index 2579c9a56..3b9e1d6e6 100644 --- a/scripts/battlegrounds/battleground.cpp +++ b/scripts/battlegrounds/battleground.cpp @@ -53,16 +53,16 @@ struct MANGOS_DLL_DECL npc_spirit_guideAI : public ScriptedAI Reset(); } - void Reset() {} + void Reset() override {} - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { // auto cast the whole time this spell if (!m_creature->GetCurrentSpell(CURRENT_CHANNELED_SPELL)) m_creature->CastSpell(m_creature, SPELL_SPIRIT_HEAL_CHANNEL, false); } - void CorpseRemoved(uint32&) + void CorpseRemoved(uint32&) override { // TODO: would be better to cast a dummy spell Map* pMap = m_creature->GetMap(); @@ -83,7 +83,7 @@ struct MANGOS_DLL_DECL npc_spirit_guideAI : public ScriptedAI } } - void SpellHitTarget(Unit* pUnit, const SpellEntry* pSpellEntry) + void SpellHitTarget(Unit* pUnit, const SpellEntry* pSpellEntry) override { if (pSpellEntry->Id == SPELL_SPIRIT_HEAL && pUnit->GetTypeId() == TYPEID_PLAYER && pUnit->HasAura(SPELL_WAITING_TO_RESURRECT)) diff --git a/scripts/eastern_kingdoms/arathi_highlands.cpp b/scripts/eastern_kingdoms/arathi_highlands.cpp index 6253f8378..9bb7a0147 100644 --- a/scripts/eastern_kingdoms/arathi_highlands.cpp +++ b/scripts/eastern_kingdoms/arathi_highlands.cpp @@ -53,9 +53,9 @@ struct MANGOS_DLL_DECL npc_professor_phizzlethorpeAI : public npc_escortAI { npc_professor_phizzlethorpeAI(Creature* pCreature) : npc_escortAI(pCreature) { Reset(); } - void Reset() { } + void Reset() override { } - void WaypointReached(uint32 uiPointId) + void WaypointReached(uint32 uiPointId) override { Player* pPlayer = GetPlayerForEscort(); @@ -85,12 +85,12 @@ struct MANGOS_DLL_DECL npc_professor_phizzlethorpeAI : public npc_escortAI } } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoScriptText(SAY_AGGRO, m_creature); } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { pSummoned->AI()->AttackStart(m_creature); } diff --git a/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.cpp b/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.cpp index fcb94ad58..cf27d60b1 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.cpp +++ b/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.cpp @@ -192,7 +192,7 @@ struct MANGOS_DLL_DECL npc_grimstoneAI : public npc_escortAI GuidList m_lSummonedGUIDList; - void Reset() + void Reset() override { m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); @@ -203,7 +203,7 @@ struct MANGOS_DLL_DECL npc_grimstoneAI : public npc_escortAI m_uiPhase = PHASE_MOBS; } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { if (!m_pInstance) return; @@ -230,7 +230,7 @@ struct MANGOS_DLL_DECL npc_grimstoneAI : public npc_escortAI } } - void SummonedCreatureJustDied(Creature* pSummoned) + void SummonedCreatureJustDied(Creature* pSummoned) override { ++m_uiMobDeadCount; @@ -270,7 +270,7 @@ struct MANGOS_DLL_DECL npc_grimstoneAI : public npc_escortAI m_creature->SummonCreature(uiEntry, fX, fY, fZ, 0, TEMPSUMMON_DEAD_DESPAWN, 0); } - void WaypointReached(uint32 uiPointId) + void WaypointReached(uint32 uiPointId) override { switch (uiPointId) { @@ -305,7 +305,7 @@ struct MANGOS_DLL_DECL npc_grimstoneAI : public npc_escortAI } } - void UpdateEscortAI(const uint32 uiDiff) + void UpdateEscortAI(const uint32 uiDiff) override { if (!m_pInstance) return; @@ -563,7 +563,7 @@ struct MANGOS_DLL_DECL npc_rocknotAI : public npc_escortAI uint32 m_uiBreakKegTimer; uint32 m_uiBreakDoorTimer; - void Reset() + void Reset() override { if (HasEscortState(STATE_ESCORT_ESCORTING)) return; @@ -578,7 +578,7 @@ struct MANGOS_DLL_DECL npc_rocknotAI : public npc_escortAI pGo->SetGoState(GOState(state)); } - void WaypointReached(uint32 uiPointId) + void WaypointReached(uint32 uiPointId) override { if (!m_pInstance) return; @@ -604,7 +604,7 @@ struct MANGOS_DLL_DECL npc_rocknotAI : public npc_escortAI } } - void UpdateEscortAI(const uint32 uiDiff) + void UpdateEscortAI(const uint32 uiDiff) override { if (!m_pInstance) return; @@ -736,13 +736,13 @@ struct MANGOS_DLL_DECL npc_marshal_windsorAI : public npc_escortAI uint8 m_uiEventPhase; - void Reset() + void Reset() override { if (!HasEscortState(STATE_ESCORT_ESCORTING)) m_uiEventPhase = 0; } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { switch (urand(0, 2)) { @@ -752,7 +752,7 @@ struct MANGOS_DLL_DECL npc_marshal_windsorAI : public npc_escortAI } } - void WaypointReached(uint32 uiPointId) + void WaypointReached(uint32 uiPointId) override { switch (uiPointId) { @@ -891,7 +891,7 @@ struct MANGOS_DLL_DECL npc_marshal_windsorAI : public npc_escortAI } } - void UpdateEscortAI(const uint32 uiDiff) + void UpdateEscortAI(const uint32 uiDiff) override { // Handle escort resume events if (m_pInstance && m_pInstance->GetData(TYPE_QUEST_JAIL_BREAK) == SPECIAL) diff --git a/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.h b/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.h index 91f23fcc6..e364e4c6e 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.h +++ b/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.h @@ -124,21 +124,21 @@ class MANGOS_DLL_DECL instance_blackrock_depths : public ScriptedInstance instance_blackrock_depths(Map* pMap); ~instance_blackrock_depths() {} - void Initialize(); + void Initialize() override; - void OnCreatureCreate(Creature* pCreature); - void OnCreatureEnterCombat(Creature* pCreature); - void OnCreatureDeath(Creature* pCreature); + void OnCreatureCreate(Creature* pCreature) override; + void OnCreatureEnterCombat(Creature* pCreature) override; + void OnCreatureDeath(Creature* pCreature) override; void OnCreatureEvade(Creature* pCreature); - void OnObjectCreate(GameObject* pGo); + void OnObjectCreate(GameObject* pGo) override; - void SetData(uint32 uiType, uint32 uiData); - uint32 GetData(uint32 uiType); + void SetData(uint32 uiType, uint32 uiData) override; + uint32 GetData(uint32 uiType) override; - const char* Save() { return m_strInstData.c_str(); } - void Load(const char* chrIn); + const char* Save() override { return m_strInstData.c_str(); } + void Load(const char* chrIn) override; - void Update(uint32 uiDiff); + void Update(uint32 uiDiff) override; // Arena Event void SetArenaCenterCoords(float fX, float fY, float fZ) { m_fArenaCenterX = fX; m_fArenaCenterY = fY; m_fArenaCenterZ = fZ; } diff --git a/scripts/eastern_kingdoms/blackrock_depths/boss_ambassador_flamelash.cpp b/scripts/eastern_kingdoms/blackrock_depths/boss_ambassador_flamelash.cpp index c5e174c42..ac718ef17 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/boss_ambassador_flamelash.cpp +++ b/scripts/eastern_kingdoms/blackrock_depths/boss_ambassador_flamelash.cpp @@ -41,7 +41,7 @@ struct MANGOS_DLL_DECL boss_ambassador_flamelashAI : public ScriptedAI int RandX; int RandY; - void Reset() + void Reset() override { m_uiSpiritTimer = 12000; } @@ -53,17 +53,17 @@ struct MANGOS_DLL_DECL boss_ambassador_flamelashAI : public ScriptedAI m_creature->SummonCreature(NPC_BURNING_SPIRIT, fX, fY, fZ, m_creature->GetAngle(fX, fY) + M_PI_F, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 60000); } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoCastSpellIfCan(m_creature, SPELL_FIREBLAST); } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { pSummoned->GetMotionMaster()->MovePoint(1, m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ()); } - void SummonedMovementInform(Creature* pSummoned, uint32 uiMotionType, uint32 uiPointId) + void SummonedMovementInform(Creature* pSummoned, uint32 uiMotionType, uint32 uiPointId) override { if (uiPointId != 1) return; @@ -71,7 +71,7 @@ struct MANGOS_DLL_DECL boss_ambassador_flamelashAI : public ScriptedAI pSummoned->CastSpell(m_creature, SPELL_BURNING_SPIRIT, true); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { // Return since we have no target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) diff --git a/scripts/eastern_kingdoms/blackrock_depths/boss_coren_direbrew.cpp b/scripts/eastern_kingdoms/blackrock_depths/boss_coren_direbrew.cpp index a97803808..4bf3c0a97 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/boss_coren_direbrew.cpp +++ b/scripts/eastern_kingdoms/blackrock_depths/boss_coren_direbrew.cpp @@ -66,7 +66,7 @@ struct MANGOS_DLL_DECL boss_coren_direbrewAI : public ScriptedAI uint32 m_uiSummonTimer; uint8 m_uiPhase; - void Reset() + void Reset() override { m_uiDisarmTimer = 10000; m_uiChargeTimer = 5000; @@ -74,14 +74,14 @@ struct MANGOS_DLL_DECL boss_coren_direbrewAI : public ScriptedAI m_uiPhase = 0; } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { // Spawn 3 minions on aggro for (uint8 i = 0; i < MAX_DIREBREW_MINIONS; ++i) DoCastSpellIfCan(m_creature, SPELL_SUMMON_DIREBREW_MINION, CAST_TRIGGERED); } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { switch (pSummoned->GetEntry()) { @@ -95,7 +95,7 @@ struct MANGOS_DLL_DECL boss_coren_direbrewAI : public ScriptedAI pSummoned->AI()->AttackStart(m_creature->getVictim()); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/eastern_kingdoms/blackrock_depths/boss_emperor_dagran_thaurissan.cpp b/scripts/eastern_kingdoms/blackrock_depths/boss_emperor_dagran_thaurissan.cpp index bd8457055..093940341 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/boss_emperor_dagran_thaurissan.cpp +++ b/scripts/eastern_kingdoms/blackrock_depths/boss_emperor_dagran_thaurissan.cpp @@ -48,20 +48,20 @@ struct MANGOS_DLL_DECL boss_emperor_dagran_thaurissanAI : public ScriptedAI uint32 m_uiAvatarOfFlame_Timer; // uint32 m_uiCounter; - void Reset() + void Reset() override { m_uiHandOfThaurissan_Timer = 4000; m_uiAvatarOfFlame_Timer = 25000; // m_uiCounter = 0; } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoScriptText(SAY_AGGRO, m_creature); m_creature->CallForHelp(VISIBLE_RANGE); } - void JustDied(Unit* pVictim) + void JustDied(Unit* pVictim) override { if (!m_pInstance) return; @@ -76,12 +76,12 @@ struct MANGOS_DLL_DECL boss_emperor_dagran_thaurissanAI : public ScriptedAI } } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { DoScriptText(SAY_SLAY, m_creature); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -155,7 +155,7 @@ struct MANGOS_DLL_DECL boss_moira_bronzebeardAI : public ScriptedAI uint32 m_uiShadowWordPain_Timer; uint32 m_uiSmite_Timer; - void Reset() + void Reset() override { m_uiHeal_Timer = 12000; // These times are probably wrong m_uiMindBlast_Timer = 16000; @@ -163,7 +163,7 @@ struct MANGOS_DLL_DECL boss_moira_bronzebeardAI : public ScriptedAI m_uiSmite_Timer = 8000; } - void AttackStart(Unit* pWho) + void AttackStart(Unit* pWho) override { if (m_creature->Attack(pWho, false)) { @@ -175,7 +175,7 @@ struct MANGOS_DLL_DECL boss_moira_bronzebeardAI : public ScriptedAI } } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) { @@ -188,7 +188,7 @@ struct MANGOS_DLL_DECL boss_moira_bronzebeardAI : public ScriptedAI } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { // Return since we have no target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) diff --git a/scripts/eastern_kingdoms/blackrock_depths/boss_general_angerforge.cpp b/scripts/eastern_kingdoms/blackrock_depths/boss_general_angerforge.cpp index d85600fd2..fbc516082 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/boss_general_angerforge.cpp +++ b/scripts/eastern_kingdoms/blackrock_depths/boss_general_angerforge.cpp @@ -43,7 +43,7 @@ struct MANGOS_DLL_DECL boss_general_angerforgeAI : public ScriptedAI uint32 m_uiAddsTimer; bool m_bSummonedMedics; - void Reset() + void Reset() override { m_uiMightyBlowTimer = 8000; m_uiHamStringTimer = 12000; @@ -59,13 +59,13 @@ struct MANGOS_DLL_DECL boss_general_angerforgeAI : public ScriptedAI m_creature->SummonCreature(uiEntry, fX, fY, fZ, 0.0f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 60000); } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) pSummoned->AI()->AttackStart(pTarget); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { // Return since we have no target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) diff --git a/scripts/eastern_kingdoms/blackrock_depths/boss_high_interrogator_gerstahn.cpp b/scripts/eastern_kingdoms/blackrock_depths/boss_high_interrogator_gerstahn.cpp index 0de778084..39fcfc030 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/boss_high_interrogator_gerstahn.cpp +++ b/scripts/eastern_kingdoms/blackrock_depths/boss_high_interrogator_gerstahn.cpp @@ -40,7 +40,7 @@ struct MANGOS_DLL_DECL boss_high_interrogator_gerstahnAI : public ScriptedAI uint32 m_uiPsychicScreamTimer; uint32 m_uiShadowShieldTimer; - void Reset() + void Reset() override { m_uiShadowWordPainTimer = 4000; m_uiManaBurnTimer = 14000; @@ -48,7 +48,7 @@ struct MANGOS_DLL_DECL boss_high_interrogator_gerstahnAI : public ScriptedAI m_uiShadowShieldTimer = 8000; } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { // Return since we have no target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) diff --git a/scripts/eastern_kingdoms/blackrock_spire/blackrock_spire.h b/scripts/eastern_kingdoms/blackrock_spire/blackrock_spire.h index 6ec0fb7aa..405b449b4 100644 --- a/scripts/eastern_kingdoms/blackrock_spire/blackrock_spire.h +++ b/scripts/eastern_kingdoms/blackrock_spire/blackrock_spire.h @@ -97,20 +97,20 @@ class MANGOS_DLL_DECL instance_blackrock_spire : public ScriptedInstance, privat instance_blackrock_spire(Map* pMap); ~instance_blackrock_spire() {} - void Initialize(); + void Initialize() override; - void OnObjectCreate(GameObject* pGo); - void OnCreatureCreate(Creature* pCreature); - void OnCreatureDeath(Creature* pCreature); + void OnObjectCreate(GameObject* pGo) override; + void OnCreatureCreate(Creature* pCreature) override; + void OnCreatureDeath(Creature* pCreature) override; void OnCreatureEvade(Creature* pCreature); - void OnCreatureEnterCombat(Creature* pCreature); + void OnCreatureEnterCombat(Creature* pCreature) override; - void SetData(uint32 uiType, uint32 uiData); - void SetData64(uint32 uiType, uint64 uiData); - uint32 GetData(uint32 uiType); + void SetData(uint32 uiType, uint32 uiData) override; + void SetData64(uint32 uiType, uint64 uiData) override; + uint32 GetData(uint32 uiType) override; - const char* Save() { return m_strInstData.c_str(); } - void Load(const char* chrIn); + const char* Save() override { return m_strInstData.c_str(); } + void Load(const char* chrIn) override; void DoUseEmberseerRunes(bool bReset = false); void DoProcessEmberseerEvent(); @@ -119,10 +119,10 @@ class MANGOS_DLL_DECL instance_blackrock_spire : public ScriptedInstance, privat void GetIncarceratorGUIDList(GuidList& lList) { lList = m_lIncarceratorGUIDList; } void GetRookeryEggGUIDList(GuidList& lList) { lList = m_lRookeryEggGUIDList; } - void Update(uint32 uiDiff); + void Update(uint32 uiDiff) override; private: - void JustDidDialogueStep(int32 iEntry); + void JustDidDialogueStep(int32 iEntry) override; void DoSendNextStadiumWave(); uint32 m_auiEncounter[MAX_ENCOUNTER]; diff --git a/scripts/eastern_kingdoms/blackrock_spire/boss_gyth.cpp b/scripts/eastern_kingdoms/blackrock_spire/boss_gyth.cpp index f00a8c2b1..a742f3ed6 100644 --- a/scripts/eastern_kingdoms/blackrock_spire/boss_gyth.cpp +++ b/scripts/eastern_kingdoms/blackrock_spire/boss_gyth.cpp @@ -55,7 +55,7 @@ struct MANGOS_DLL_DECL boss_gythAI : public ScriptedAI bool m_bSummonedRend; bool m_bHasChromaticChaos; - void Reset() + void Reset() override { uiCorrosiveAcidTimer = 8000; uiFreezeTimer = 11000; @@ -66,12 +66,12 @@ struct MANGOS_DLL_DECL boss_gythAI : public ScriptedAI DoCastSpellIfCan(m_creature, SPELL_REND_MOUNTS); } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { DoScriptText(EMOTE_KNOCKED_OFF, pSummoned); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { // Return since we have no target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) diff --git a/scripts/eastern_kingdoms/blackrock_spire/boss_overlord_wyrmthalak.cpp b/scripts/eastern_kingdoms/blackrock_spire/boss_overlord_wyrmthalak.cpp index d29f65b26..cbb8fdec7 100644 --- a/scripts/eastern_kingdoms/blackrock_spire/boss_overlord_wyrmthalak.cpp +++ b/scripts/eastern_kingdoms/blackrock_spire/boss_overlord_wyrmthalak.cpp @@ -51,7 +51,7 @@ struct MANGOS_DLL_DECL boss_overlordwyrmthalakAI : public ScriptedAI uint32 m_uiKnockawayTimer; bool m_bSummoned; - void Reset() + void Reset() override { m_uiBlastWaveTimer = 20000; m_uiShoutTimer = 2000; @@ -60,7 +60,7 @@ struct MANGOS_DLL_DECL boss_overlordwyrmthalakAI : public ScriptedAI m_bSummoned = false; } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { if (pSummoned->GetEntry() != NPC_SPIRESTONE_WARLORD && pSummoned->GetEntry() != NPC_SMOLDERTHORN_BERSERKER) return; @@ -72,7 +72,7 @@ struct MANGOS_DLL_DECL boss_overlordwyrmthalakAI : public ScriptedAI } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { // Return since we have no target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) diff --git a/scripts/eastern_kingdoms/blackrock_spire/boss_pyroguard_emberseer.cpp b/scripts/eastern_kingdoms/blackrock_spire/boss_pyroguard_emberseer.cpp index a4ca612af..0f1fb2897 100644 --- a/scripts/eastern_kingdoms/blackrock_spire/boss_pyroguard_emberseer.cpp +++ b/scripts/eastern_kingdoms/blackrock_spire/boss_pyroguard_emberseer.cpp @@ -66,7 +66,7 @@ struct MANGOS_DLL_DECL boss_pyroguard_emberseerAI : public ScriptedAI uint32 m_uiPyroBlastTimer; uint8 m_uiGrowingStacks; - void Reset() + void Reset() override { m_uiEncageTimer = 10000; m_uiFireNovaTimer = 6000; @@ -77,13 +77,13 @@ struct MANGOS_DLL_DECL boss_pyroguard_emberseerAI : public ScriptedAI m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { if (m_pInstance) m_pInstance->SetData(TYPE_EMBERSEER, DONE); } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_EMBERSEER, FAIL); @@ -118,7 +118,7 @@ struct MANGOS_DLL_DECL boss_pyroguard_emberseerAI : public ScriptedAI } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { // Cast Encage spell on OOC timer if (m_uiEncageTimer) diff --git a/scripts/eastern_kingdoms/blackwing_lair/blackwing_lair.h b/scripts/eastern_kingdoms/blackwing_lair/blackwing_lair.h index e98c9dceb..6bb7811f6 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/blackwing_lair.h +++ b/scripts/eastern_kingdoms/blackwing_lair/blackwing_lair.h @@ -54,18 +54,18 @@ class MANGOS_DLL_DECL instance_blackwing_lair : public ScriptedInstance instance_blackwing_lair(Map* pMap); ~instance_blackwing_lair() {} - void Initialize(); - bool IsEncounterInProgress() const; + void Initialize() override; + bool IsEncounterInProgress() const override; - void OnCreatureCreate(Creature* pCreature); - void OnObjectCreate(GameObject* pGo); - void OnCreatureDeath(Creature* pCreature); + void OnCreatureCreate(Creature* pCreature) override; + void OnObjectCreate(GameObject* pGo) override; + void OnCreatureDeath(Creature* pCreature) override; - void SetData(uint32 uiType, uint32 uiData); - uint32 GetData(uint32 uiType); + void SetData(uint32 uiType, uint32 uiData) override; + uint32 GetData(uint32 uiType) override; - const char* Save() { return m_strInstData.c_str(); } - void Load(const char* chrIn); + const char* Save() override { return m_strInstData.c_str(); } + void Load(const char* chrIn) override; protected: std::string m_strInstData; diff --git a/scripts/eastern_kingdoms/blackwing_lair/boss_broodlord_lashlayer.cpp b/scripts/eastern_kingdoms/blackwing_lair/boss_broodlord_lashlayer.cpp index 29b704867..074e7675c 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/boss_broodlord_lashlayer.cpp +++ b/scripts/eastern_kingdoms/blackwing_lair/boss_broodlord_lashlayer.cpp @@ -50,7 +50,7 @@ struct MANGOS_DLL_DECL boss_broodlordAI : public ScriptedAI uint32 m_uiMortalStrikeTimer; uint32 m_uiKnockAwayTimer; - void Reset() + void Reset() override { m_uiCleaveTimer = 8000; // These times are probably wrong m_uiBlastWaveTimer = 12000; @@ -58,7 +58,7 @@ struct MANGOS_DLL_DECL boss_broodlordAI : public ScriptedAI m_uiKnockAwayTimer = 30000; } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { if (m_pInstance) m_pInstance->SetData(TYPE_LASHLAYER, IN_PROGRESS); @@ -66,19 +66,19 @@ struct MANGOS_DLL_DECL boss_broodlordAI : public ScriptedAI DoScriptText(SAY_AGGRO, m_creature); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { if (m_pInstance) m_pInstance->SetData(TYPE_LASHLAYER, DONE); } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_LASHLAYER, FAIL); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/eastern_kingdoms/blackwing_lair/boss_chromaggus.cpp b/scripts/eastern_kingdoms/blackwing_lair/boss_chromaggus.cpp index 63f061fc3..f4fd45415 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/boss_chromaggus.cpp +++ b/scripts/eastern_kingdoms/blackwing_lair/boss_chromaggus.cpp @@ -92,7 +92,7 @@ struct MANGOS_DLL_DECL boss_chromaggusAI : public ScriptedAI uint32 m_uiFrenzyTimer; bool m_bEnraged; - void Reset() + void Reset() override { m_uiCurrentVulnerabilitySpell = 0; // We use this to store our last vulnerability spell so we can remove it later @@ -105,25 +105,25 @@ struct MANGOS_DLL_DECL boss_chromaggusAI : public ScriptedAI m_bEnraged = false; } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { if (m_pInstance) m_pInstance->SetData(TYPE_CHROMAGGUS, IN_PROGRESS); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { if (m_pInstance) m_pInstance->SetData(TYPE_CHROMAGGUS, DONE); } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_CHROMAGGUS, FAIL); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/eastern_kingdoms/blackwing_lair/boss_ebonroc.cpp b/scripts/eastern_kingdoms/blackwing_lair/boss_ebonroc.cpp index b68dfc3e9..26bd753c0 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/boss_ebonroc.cpp +++ b/scripts/eastern_kingdoms/blackwing_lair/boss_ebonroc.cpp @@ -46,32 +46,32 @@ struct MANGOS_DLL_DECL boss_ebonrocAI : public ScriptedAI uint32 m_uiWingBuffetTimer; uint32 m_uiShadowOfEbonrocTimer; - void Reset() + void Reset() override { m_uiShadowFlameTimer = 15000; // These times are probably wrong m_uiWingBuffetTimer = 30000; m_uiShadowOfEbonrocTimer = 45000; } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { if (m_pInstance) m_pInstance->SetData(TYPE_EBONROC, IN_PROGRESS); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { if (m_pInstance) m_pInstance->SetData(TYPE_EBONROC, DONE); } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_EBONROC, FAIL); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/eastern_kingdoms/blackwing_lair/boss_firemaw.cpp b/scripts/eastern_kingdoms/blackwing_lair/boss_firemaw.cpp index 0550af3ce..122cabda4 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/boss_firemaw.cpp +++ b/scripts/eastern_kingdoms/blackwing_lair/boss_firemaw.cpp @@ -46,32 +46,32 @@ struct MANGOS_DLL_DECL boss_firemawAI : public ScriptedAI uint32 m_uiWingBuffetTimer; uint32 m_uiFlameBuffetTimer; - void Reset() + void Reset() override { m_uiShadowFlameTimer = 30000; // These times are probably wrong m_uiWingBuffetTimer = 24000; m_uiFlameBuffetTimer = 5000; } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { if (m_pInstance) m_pInstance->SetData(TYPE_FIREMAW, IN_PROGRESS); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { if (m_pInstance) m_pInstance->SetData(TYPE_FIREMAW, DONE); } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_FIREMAW, FAIL); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/eastern_kingdoms/blackwing_lair/boss_flamegor.cpp b/scripts/eastern_kingdoms/blackwing_lair/boss_flamegor.cpp index efc1f5c04..4b91331e3 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/boss_flamegor.cpp +++ b/scripts/eastern_kingdoms/blackwing_lair/boss_flamegor.cpp @@ -48,32 +48,32 @@ struct MANGOS_DLL_DECL boss_flamegorAI : public ScriptedAI uint32 m_uiWingBuffetTimer; uint32 m_uiFrenzyTimer; - void Reset() + void Reset() override { m_uiShadowFlameTimer = 21000; // These times are probably wrong m_uiWingBuffetTimer = 35000; m_uiFrenzyTimer = 10000; } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { if (m_pInstance) m_pInstance->SetData(TYPE_FLAMEGOR, IN_PROGRESS); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { if (m_pInstance) m_pInstance->SetData(TYPE_FLAMEGOR, DONE); } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_FLAMEGOR, FAIL); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/eastern_kingdoms/blackwing_lair/boss_nefarian.cpp b/scripts/eastern_kingdoms/blackwing_lair/boss_nefarian.cpp index eed50a53b..bfd4054ec 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/boss_nefarian.cpp +++ b/scripts/eastern_kingdoms/blackwing_lair/boss_nefarian.cpp @@ -82,7 +82,7 @@ struct MANGOS_DLL_DECL boss_nefarianAI : public ScriptedAI bool m_bPhase3; bool m_bHasEndYell; - void Reset() + void Reset() override { m_uiShadowFlameTimer = 12000; // These times are probably wrong m_uiBellowingRoarTimer = 30000; @@ -94,7 +94,7 @@ struct MANGOS_DLL_DECL boss_nefarianAI : public ScriptedAI m_bHasEndYell = false; } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { if (urand(0, 4)) return; @@ -102,7 +102,7 @@ struct MANGOS_DLL_DECL boss_nefarianAI : public ScriptedAI DoScriptText(SAY_SLAY, m_creature, pVictim); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoScriptText(SAY_DEATH, m_creature); @@ -110,7 +110,7 @@ struct MANGOS_DLL_DECL boss_nefarianAI : public ScriptedAI m_pInstance->SetData(TYPE_NEFARIAN, DONE); } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) { @@ -129,7 +129,7 @@ struct MANGOS_DLL_DECL boss_nefarianAI : public ScriptedAI } } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoScriptText(SAY_AGGRO, m_creature); @@ -143,7 +143,7 @@ struct MANGOS_DLL_DECL boss_nefarianAI : public ScriptedAI DoCastSpellIfCan(m_creature, SPELL_SHADOWFLAME_INITIAL); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/eastern_kingdoms/blackwing_lair/boss_razorgore.cpp b/scripts/eastern_kingdoms/blackwing_lair/boss_razorgore.cpp index ab75577a7..bbddb5aad 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/boss_razorgore.cpp +++ b/scripts/eastern_kingdoms/blackwing_lair/boss_razorgore.cpp @@ -64,7 +64,7 @@ struct MANGOS_DLL_DECL boss_razorgoreAI : public ScriptedAI uint32 m_uiFireballVolleyTimer; uint32 m_uiConflagrationTimer; - void Reset() + void Reset() override { m_uiIntroVisualTimer = 5000; @@ -74,14 +74,14 @@ struct MANGOS_DLL_DECL boss_razorgoreAI : public ScriptedAI m_uiFireballVolleyTimer = 7000; } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { // TODO Temporarily add this InstData setting, must be started with Phase 1 which is not yet implemented if (m_pInstance) m_pInstance->SetData(TYPE_RAZORGORE, IN_PROGRESS); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { if (m_pInstance) m_pInstance->SetData(TYPE_RAZORGORE, DONE); @@ -89,13 +89,13 @@ struct MANGOS_DLL_DECL boss_razorgoreAI : public ScriptedAI DoScriptText(SAY_DEATH, m_creature); } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_RAZORGORE, FAIL); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { // Set visual on OOC timer if (m_uiIntroVisualTimer) diff --git a/scripts/eastern_kingdoms/blackwing_lair/boss_vaelastrasz.cpp b/scripts/eastern_kingdoms/blackwing_lair/boss_vaelastrasz.cpp index bb8581bbd..d664c7f72 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/boss_vaelastrasz.cpp +++ b/scripts/eastern_kingdoms/blackwing_lair/boss_vaelastrasz.cpp @@ -85,7 +85,7 @@ struct MANGOS_DLL_DECL boss_vaelastraszAI : public ScriptedAI uint32 m_uiTailSweepTimer; bool m_bHasYelled; - void Reset() + void Reset() override { m_playerGuid.Clear(); @@ -129,7 +129,7 @@ struct MANGOS_DLL_DECL boss_vaelastraszAI : public ScriptedAI m_uiSpeechNum = 0; } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { if (urand(0, 4)) return; @@ -137,7 +137,7 @@ struct MANGOS_DLL_DECL boss_vaelastraszAI : public ScriptedAI DoScriptText(SAY_KILLTARGET, m_creature, pVictim); } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { if (m_pInstance) m_pInstance->SetData(TYPE_VAELASTRASZ, IN_PROGRESS); @@ -146,19 +146,19 @@ struct MANGOS_DLL_DECL boss_vaelastraszAI : public ScriptedAI DoCastSpellIfCan(m_creature, SPELL_ESSENCE_OF_THE_RED); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { if (m_pInstance) m_pInstance->SetData(TYPE_VAELASTRASZ, DONE); } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_VAELASTRASZ, FAIL); } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { if (pSummoned->GetEntry() == NPC_LORD_VICTOR_NEFARIUS) { @@ -168,7 +168,7 @@ struct MANGOS_DLL_DECL boss_vaelastraszAI : public ScriptedAI } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (m_uiIntroTimer) { diff --git a/scripts/eastern_kingdoms/blackwing_lair/boss_victor_nefarius.cpp b/scripts/eastern_kingdoms/blackwing_lair/boss_victor_nefarius.cpp index b18ea38dc..f94499d81 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/boss_victor_nefarius.cpp +++ b/scripts/eastern_kingdoms/blackwing_lair/boss_victor_nefarius.cpp @@ -129,7 +129,7 @@ struct MANGOS_DLL_DECL boss_victor_nefariusAI : public ScriptedAI, private Dialo uint32 m_uiShadowCommandTimer; uint32 m_uiShadowBlinkTimer; - void Reset() + void Reset() override { // Check the map id because the same creature entry is involved in other scripted event in other instance if (m_creature->GetMapId() != MAP_ID_BWL) @@ -152,19 +152,19 @@ struct MANGOS_DLL_DECL boss_victor_nefariusAI : public ScriptedAI, private Dialo m_creature->SetVisibility(VISIBILITY_ON); } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { if (m_pInstance) m_pInstance->SetData(TYPE_NEFARIAN, IN_PROGRESS); } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_NEFARIAN, FAIL); } - void AttackStart(Unit* pWho) + void AttackStart(Unit* pWho) override { if (m_creature->Attack(pWho, false)) { @@ -177,7 +177,7 @@ struct MANGOS_DLL_DECL boss_victor_nefariusAI : public ScriptedAI, private Dialo } } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { if (m_creature->GetMapId() != MAP_ID_BWL) return; @@ -203,7 +203,7 @@ struct MANGOS_DLL_DECL boss_victor_nefariusAI : public ScriptedAI, private Dialo } } - void SummonedMovementInform(Creature* pSummoned, uint32 uiMotionType, uint32 uiPointId) + void SummonedMovementInform(Creature* pSummoned, uint32 uiMotionType, uint32 uiPointId) override { if (m_creature->GetMapId() != MAP_ID_BWL) return; @@ -216,7 +216,7 @@ struct MANGOS_DLL_DECL boss_victor_nefariusAI : public ScriptedAI, private Dialo } } - void SummonedCreatureJustDied(Creature* pSummoned) + void SummonedCreatureJustDied(Creature* pSummoned) override { if (m_creature->GetMapId() != MAP_ID_BWL) return; @@ -228,7 +228,7 @@ struct MANGOS_DLL_DECL boss_victor_nefariusAI : public ScriptedAI, private Dialo pSummoned->CastSpell(pSummoned, SPELL_SUMMON_DRAKONID_BONES, true); } - void JustDidDialogueStep(int32 iEntry) + void JustDidDialogueStep(int32 iEntry) override { // Start combat after the dialogue is finished if (iEntry == SPELL_SHADOWBLINK) @@ -246,7 +246,7 @@ struct MANGOS_DLL_DECL boss_victor_nefariusAI : public ScriptedAI, private Dialo StartNextDialogueText(SAY_GAMESBEGIN_1); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (m_creature->GetMapId() != MAP_ID_BWL) return; diff --git a/scripts/eastern_kingdoms/burning_steppes.cpp b/scripts/eastern_kingdoms/burning_steppes.cpp index 4e437b3f8..ddf1b9cae 100644 --- a/scripts/eastern_kingdoms/burning_steppes.cpp +++ b/scripts/eastern_kingdoms/burning_steppes.cpp @@ -37,9 +37,9 @@ struct MANGOS_DLL_DECL npc_ragged_johnAI : public ScriptedAI { npc_ragged_johnAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } - void Reset() {} + void Reset() override {} - void MoveInLineOfSight(Unit* who) + void MoveInLineOfSight(Unit* who) override { if (who->HasAura(16468, EFFECT_INDEX_0)) { @@ -209,7 +209,7 @@ struct MANGOS_DLL_DECL npc_grark_lorkrubAI : public npc_escortAI, private Dialog uint8 m_uiKilledCreatures; bool m_bIsFirstSearScale; - void Reset() + void Reset() override { if (!HasEscortState(STATE_ESCORT_ESCORTING)) { @@ -222,13 +222,13 @@ struct MANGOS_DLL_DECL npc_grark_lorkrubAI : public npc_escortAI, private Dialog } } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { if (!HasEscortState(STATE_ESCORT_ESCORTING)) DoScriptText(SAY_AGGRO, m_creature); } - void MoveInLineOfSight(Unit* pWho) + void MoveInLineOfSight(Unit* pWho) override { // No combat during escort if (HasEscortState(STATE_ESCORT_ESCORTING)) @@ -237,7 +237,7 @@ struct MANGOS_DLL_DECL npc_grark_lorkrubAI : public npc_escortAI, private Dialog npc_escortAI::MoveInLineOfSight(pWho); } - void WaypointReached(uint32 uiPointId) + void WaypointReached(uint32 uiPointId) override { switch (uiPointId) { @@ -300,7 +300,7 @@ struct MANGOS_DLL_DECL npc_grark_lorkrubAI : public npc_escortAI, private Dialog } } - void JustDidDialogueStep(int32 iEntry) + void JustDidDialogueStep(int32 iEntry) override { switch (iEntry) { @@ -337,7 +337,7 @@ struct MANGOS_DLL_DECL npc_grark_lorkrubAI : public npc_escortAI, private Dialog } } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { switch (pSummoned->GetEntry()) { @@ -363,7 +363,7 @@ struct MANGOS_DLL_DECL npc_grark_lorkrubAI : public npc_escortAI, private Dialog } } - void SummonedCreatureJustDied(Creature* pSummoned) + void SummonedCreatureJustDied(Creature* pSummoned) override { ++m_uiKilledCreatures; @@ -384,7 +384,7 @@ struct MANGOS_DLL_DECL npc_grark_lorkrubAI : public npc_escortAI, private Dialog } } - Creature* GetSpeakerByEntry(uint32 uiEntry) + Creature* GetSpeakerByEntry(uint32 uiEntry) override { switch (uiEntry) { @@ -397,7 +397,7 @@ struct MANGOS_DLL_DECL npc_grark_lorkrubAI : public npc_escortAI, private Dialog } } - void UpdateEscortAI(const uint32 uiDiff) + void UpdateEscortAI(const uint32 uiDiff) override { DialogueUpdate(uiDiff); diff --git a/scripts/eastern_kingdoms/deadmines/boss_mr_smite.cpp b/scripts/eastern_kingdoms/deadmines/boss_mr_smite.cpp index d85c57249..e96bb64c7 100644 --- a/scripts/eastern_kingdoms/deadmines/boss_mr_smite.cpp +++ b/scripts/eastern_kingdoms/deadmines/boss_mr_smite.cpp @@ -56,7 +56,7 @@ struct MANGOS_DLL_DECL boss_mr_smiteAI : public ScriptedAI uint32 m_uiEquipTimer; uint32 m_uiSlamTimer; - void Reset() + void Reset() override { m_uiPhase = PHASE_1; m_uiEquipTimer = 0; @@ -68,7 +68,7 @@ struct MANGOS_DLL_DECL boss_mr_smiteAI : public ScriptedAI SetEquipmentSlots(true); } - void AttackedBy(Unit* pAttacker) + void AttackedBy(Unit* pAttacker) override { if (m_creature->getVictim()) return; @@ -79,7 +79,7 @@ struct MANGOS_DLL_DECL boss_mr_smiteAI : public ScriptedAI AttackStart(pAttacker); } - void AttackStart(Unit* pWho) + void AttackStart(Unit* pWho) override { if (m_uiPhase > PHASE_3) return; @@ -94,7 +94,7 @@ struct MANGOS_DLL_DECL boss_mr_smiteAI : public ScriptedAI } } - void MovementInform(uint32 uiMotionType, uint32 uiPointId) + void MovementInform(uint32 uiMotionType, uint32 uiPointId) override { if (uiMotionType != POINT_MOTION_TYPE) return; @@ -165,7 +165,7 @@ struct MANGOS_DLL_DECL boss_mr_smiteAI : public ScriptedAI AttackStart(pVictim); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) { diff --git a/scripts/eastern_kingdoms/deadmines/deadmines.h b/scripts/eastern_kingdoms/deadmines/deadmines.h index 96215e59f..8fba022f6 100644 --- a/scripts/eastern_kingdoms/deadmines/deadmines.h +++ b/scripts/eastern_kingdoms/deadmines/deadmines.h @@ -42,22 +42,22 @@ class MANGOS_DLL_DECL instance_deadmines : public ScriptedInstance public: instance_deadmines(Map* pMap); - void Initialize(); + void Initialize() override; - void OnPlayerEnter(Player* pPlayer); + void OnPlayerEnter(Player* pPlayer) override; - void OnCreatureCreate(Creature* pCreature); - void OnObjectCreate(GameObject* pGo); + void OnCreatureCreate(Creature* pCreature) override; + void OnObjectCreate(GameObject* pGo) override; - void OnCreatureDeath(Creature* pCreature); + void OnCreatureDeath(Creature* pCreature) override; - void SetData(uint32 uiType, uint32 uiData); - uint32 GetData(uint32 uiType); + void SetData(uint32 uiType, uint32 uiData) override; + uint32 GetData(uint32 uiType) override; - const char* Save() { return m_strInstData.c_str(); } - void Load(const char* chrIn); + const char* Save() override { return m_strInstData.c_str(); } + void Load(const char* chrIn) override; - void Update(uint32 uiDiff); + void Update(uint32 uiDiff) override; private: uint32 m_auiEncounter[MAX_ENCOUNTER]; diff --git a/scripts/eastern_kingdoms/eastern_plaguelands.cpp b/scripts/eastern_kingdoms/eastern_plaguelands.cpp index ae49e84b0..99ebd3a61 100644 --- a/scripts/eastern_kingdoms/eastern_plaguelands.cpp +++ b/scripts/eastern_kingdoms/eastern_plaguelands.cpp @@ -89,7 +89,7 @@ struct MANGOS_DLL_DECL npc_eris_havenfireAI : public ScriptedAI ObjectGuid m_playerGuid; GuidList m_lSummonedGuidList; - void Reset() + void Reset() override { m_uiEventTimer = 0; m_uiSadEndTimer = 0; @@ -103,7 +103,7 @@ struct MANGOS_DLL_DECL npc_eris_havenfireAI : public ScriptedAI m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER); } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { switch (pSummoned->GetEntry()) { @@ -127,7 +127,7 @@ struct MANGOS_DLL_DECL npc_eris_havenfireAI : public ScriptedAI m_lSummonedGuidList.push_back(pSummoned->GetObjectGuid()); } - void SummonedMovementInform(Creature* pSummoned, uint32 uiMotionType, uint32 uiPointId) + void SummonedMovementInform(Creature* pSummoned, uint32 uiMotionType, uint32 uiPointId) override { if (uiMotionType != POINT_MOTION_TYPE || !uiPointId) return; @@ -150,7 +150,7 @@ struct MANGOS_DLL_DECL npc_eris_havenfireAI : public ScriptedAI } } - void SummonedCreatureJustDied(Creature* pSummoned) + void SummonedCreatureJustDied(Creature* pSummoned) override { if (pSummoned->GetEntry() == NPC_INJURED_PEASANT || pSummoned->GetEntry() == NPC_PLAGUED_PEASANT) { @@ -249,7 +249,7 @@ struct MANGOS_DLL_DECL npc_eris_havenfireAI : public ScriptedAI } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (m_uiEventTimer) { diff --git a/scripts/eastern_kingdoms/eversong_woods.cpp b/scripts/eastern_kingdoms/eversong_woods.cpp index 699a12b0b..6b21ab24f 100644 --- a/scripts/eastern_kingdoms/eversong_woods.cpp +++ b/scripts/eastern_kingdoms/eversong_woods.cpp @@ -88,7 +88,7 @@ struct MANGOS_DLL_DECL npc_kelerun_bloodmournAI : public ScriptedAI bool m_bIsEventInProgress; - void Reset() + void Reset() override { m_creature->SetUInt32Value(UNIT_NPC_FLAGS, m_uiNpcFlags); @@ -141,7 +141,7 @@ struct MANGOS_DLL_DECL npc_kelerun_bloodmournAI : public ScriptedAI } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (m_bIsEventInProgress) { @@ -270,10 +270,10 @@ struct MANGOS_DLL_DECL npc_prospector_anvilwardAI : public npc_escortAI // CreatureAI functions npc_prospector_anvilwardAI(Creature* pCreature) : npc_escortAI(pCreature) {Reset();} - void Reset() { } + void Reset() override { } // Pure Virtual Functions - void WaypointReached(uint32 uiPointId) + void WaypointReached(uint32 uiPointId) override { Player* pPlayer = GetPlayerForEscort(); @@ -351,14 +351,14 @@ struct MANGOS_DLL_DECL npc_apprentice_mirvedaAI : public ScriptedAI uint32 m_uiFireballTimer; ObjectGuid m_playerGuid; - void Reset() + void Reset() override { m_uiMobCount = 0; m_playerGuid.Clear(); m_uiFireballTimer = 0; } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { Player* pPlayer = m_creature->GetMap()->GetPlayer(m_playerGuid); @@ -366,13 +366,13 @@ struct MANGOS_DLL_DECL npc_apprentice_mirvedaAI : public ScriptedAI pPlayer->SendQuestFailed(QUEST_UNEXPECTED_RESULT); } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { pSummoned->AI()->AttackStart(m_creature); ++m_uiMobCount; } - void SummonedCreatureJustDied(Creature* pKilled) + void SummonedCreatureJustDied(Creature* pKilled) override { --m_uiMobCount; @@ -398,7 +398,7 @@ struct MANGOS_DLL_DECL npc_apprentice_mirvedaAI : public ScriptedAI m_creature->SummonCreature(NPC_ANGERSHADE, 8745.0f, -7134.32f, 35.22f, 0.0f, TEMPSUMMON_CORPSE_DESPAWN, 4000); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { // Return since we have no target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) @@ -466,14 +466,14 @@ struct MANGOS_DLL_DECL npc_infused_crystalAI : public Scripted_NoMovementAI uint8 m_uiKilledCount; uint32 m_uiFinishTimer; - void Reset() {} + void Reset() override {} - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { pSummoned->AI()->AttackStart(m_creature); } - void SummonedCreatureJustDied(Creature* pSummoned) + void SummonedCreatureJustDied(Creature* pSummoned) override { ++m_uiKilledCount; @@ -481,7 +481,7 @@ struct MANGOS_DLL_DECL npc_infused_crystalAI : public Scripted_NoMovementAI m_uiWaveTimer = std::min(m_uiWaveTimer, (uint32)10000); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (m_uiWaveTimer) { diff --git a/scripts/eastern_kingdoms/ghostlands.cpp b/scripts/eastern_kingdoms/ghostlands.cpp index 57b9bc203..347018b4e 100644 --- a/scripts/eastern_kingdoms/ghostlands.cpp +++ b/scripts/eastern_kingdoms/ghostlands.cpp @@ -55,7 +55,7 @@ struct MANGOS_DLL_DECL npc_ranger_lilathaAI : public npc_escortAI ObjectGuid m_goCageGuid; ObjectGuid m_heliosGuid; - void MoveInLineOfSight(Unit* pUnit) + void MoveInLineOfSight(Unit* pUnit) override { if (HasEscortState(STATE_ESCORT_ESCORTING)) { @@ -69,7 +69,7 @@ struct MANGOS_DLL_DECL npc_ranger_lilathaAI : public npc_escortAI npc_escortAI::MoveInLineOfSight(pUnit); } - void WaypointReached(uint32 i) + void WaypointReached(uint32 i) override { Player* pPlayer = GetPlayerForEscort(); @@ -126,7 +126,7 @@ struct MANGOS_DLL_DECL npc_ranger_lilathaAI : public npc_escortAI } } - void Reset() + void Reset() override { if (!HasEscortState(STATE_ESCORT_ESCORTING)) { diff --git a/scripts/eastern_kingdoms/gnomeregan/boss_thermaplugg.cpp b/scripts/eastern_kingdoms/gnomeregan/boss_thermaplugg.cpp index 3a68641c6..f223ea218 100644 --- a/scripts/eastern_kingdoms/gnomeregan/boss_thermaplugg.cpp +++ b/scripts/eastern_kingdoms/gnomeregan/boss_thermaplugg.cpp @@ -62,7 +62,7 @@ struct MANGOS_DLL_DECL boss_thermapluggAI : public ScriptedAI GuidList m_lSummonedBombGUIDs; GuidList m_lLandedBombGUIDs; - void Reset() + void Reset() override { m_uiKnockAwayTimer = urand(17000, 20000); m_uiActivateBombTimer = urand(10000, 15000); @@ -73,7 +73,7 @@ struct MANGOS_DLL_DECL boss_thermapluggAI : public ScriptedAI m_lLandedBombGUIDs.clear(); } - void GetAIInformation(ChatHandler& reader) + void GetAIInformation(ChatHandler& reader) override { reader.PSendSysMessage("Thermaplugg, currently phase %s", m_bIsPhaseTwo ? "two" : "one"); @@ -84,12 +84,12 @@ struct MANGOS_DLL_DECL boss_thermapluggAI : public ScriptedAI } } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { DoScriptText(SAY_SLAY, m_creature); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { if (m_pInstance) m_pInstance->SetData(TYPE_THERMAPLUGG, DONE); @@ -97,7 +97,7 @@ struct MANGOS_DLL_DECL boss_thermapluggAI : public ScriptedAI m_lSummonedBombGUIDs.clear(); } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoScriptText(SAY_AGGRO, m_creature); @@ -112,7 +112,7 @@ struct MANGOS_DLL_DECL boss_thermapluggAI : public ScriptedAI m_afSpawnPos[2] = m_creature->GetPositionZ(); } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_THERMAPLUGG, FAIL); @@ -126,7 +126,7 @@ struct MANGOS_DLL_DECL boss_thermapluggAI : public ScriptedAI m_lSummonedBombGUIDs.clear(); } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { if (pSummoned->GetEntry() == NPC_WALKING_BOMB) { @@ -139,18 +139,18 @@ struct MANGOS_DLL_DECL boss_thermapluggAI : public ScriptedAI } } - void SummonedMovementInform(Creature* pSummoned, uint32 uiMotionType, uint32 uiPointId) + void SummonedMovementInform(Creature* pSummoned, uint32 uiMotionType, uint32 uiPointId) override { if (pSummoned->GetEntry() == NPC_WALKING_BOMB && uiMotionType == POINT_MOTION_TYPE && uiPointId == 1) m_lLandedBombGUIDs.push_back(pSummoned->GetObjectGuid()); } - void SummonedCreatureDespawn(Creature* pSummoned) + void SummonedCreatureDespawn(Creature* pSummoned) override { m_lSummonedBombGUIDs.remove(pSummoned->GetObjectGuid()); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/eastern_kingdoms/gnomeregan/gnomeregan.cpp b/scripts/eastern_kingdoms/gnomeregan/gnomeregan.cpp index 5586aae60..cb7ebad1e 100644 --- a/scripts/eastern_kingdoms/gnomeregan/gnomeregan.cpp +++ b/scripts/eastern_kingdoms/gnomeregan/gnomeregan.cpp @@ -145,7 +145,7 @@ struct MANGOS_DLL_DECL npc_blastmaster_emi_shortfuseAI : public npc_escortAI bool m_bDidAggroText, m_bSouthernCaveInOpened, m_bNorthernCaveInOpened; GuidList m_luiSummonedMobGUIDs; - void Reset() + void Reset() override { m_bDidAggroText = false; // Used for 'defend' text, is triggered when the npc is attacked @@ -170,7 +170,7 @@ struct MANGOS_DLL_DECL npc_blastmaster_emi_shortfuseAI : public npc_escortAI } } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { switch (pSummoned->GetEntry()) { @@ -193,7 +193,7 @@ struct MANGOS_DLL_DECL npc_blastmaster_emi_shortfuseAI : public npc_escortAI m_luiSummonedMobGUIDs.push_back(pSummoned->GetObjectGuid()); } - void SummonedCreatureJustDied(Creature* pSummoned) + void SummonedCreatureJustDied(Creature* pSummoned) override { if (pSummoned->GetEntry() == NPC_GRUBBIS) { @@ -209,7 +209,7 @@ struct MANGOS_DLL_DECL npc_blastmaster_emi_shortfuseAI : public npc_escortAI return m_uiPhase == 11 || m_uiPhase == 13 || m_uiPhase == 26 || m_uiPhase == 28; } - void MoveInLineOfSight(Unit* pWho) + void MoveInLineOfSight(Unit* pWho) override { // In case we are preparing the explosive charges, we won't start attacking mobs if (IsPreparingExplosiveCharge()) @@ -218,7 +218,7 @@ struct MANGOS_DLL_DECL npc_blastmaster_emi_shortfuseAI : public npc_escortAI npc_escortAI::MoveInLineOfSight(pWho); } - void AttackStart(Unit* pWho) + void AttackStart(Unit* pWho) override { // In case we are preparing the explosive charges, we won't start attacking mobs if (IsPreparingExplosiveCharge()) @@ -227,7 +227,7 @@ struct MANGOS_DLL_DECL npc_blastmaster_emi_shortfuseAI : public npc_escortAI npc_escortAI::AttackStart(pWho); } - void AttackedBy(Unit* pAttacker) + void AttackedBy(Unit* pAttacker) override { // Possibility for Aggro-Text only once per combat if (m_bDidAggroText) @@ -239,7 +239,7 @@ struct MANGOS_DLL_DECL npc_blastmaster_emi_shortfuseAI : public npc_escortAI DoScriptText(urand(0, 1) ? SAY_AGGRO_1 : SAY_AGGRO_2, m_creature, pAttacker); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { if (!m_pInstance) return; @@ -270,7 +270,7 @@ struct MANGOS_DLL_DECL npc_blastmaster_emi_shortfuseAI : public npc_escortAI m_playerGuid = pPlayer->GetObjectGuid(); } - void WaypointStart(uint32 uiPointId) + void WaypointStart(uint32 uiPointId) override { switch (uiPointId) { @@ -293,7 +293,7 @@ struct MANGOS_DLL_DECL npc_blastmaster_emi_shortfuseAI : public npc_escortAI } } - void WaypointReached(uint32 uiPointId) + void WaypointReached(uint32 uiPointId) override { switch (uiPointId) { @@ -336,7 +336,7 @@ struct MANGOS_DLL_DECL npc_blastmaster_emi_shortfuseAI : public npc_escortAI } } - void UpdateEscortAI(uint32 const uiDiff) + void UpdateEscortAI(uint32 const uiDiff) override { // the phases are handled OOC (keeps them in sync with the waypoints) if (m_uiPhaseTimer && !m_creature->getVictim()) diff --git a/scripts/eastern_kingdoms/gnomeregan/gnomeregan.h b/scripts/eastern_kingdoms/gnomeregan/gnomeregan.h index e224e2df4..efebc12ae 100644 --- a/scripts/eastern_kingdoms/gnomeregan/gnomeregan.h +++ b/scripts/eastern_kingdoms/gnomeregan/gnomeregan.h @@ -57,20 +57,20 @@ class MANGOS_DLL_DECL instance_gnomeregan : public ScriptedInstance instance_gnomeregan(Map* pMap); ~instance_gnomeregan() {} - void Initialize(); + void Initialize() override; - void OnCreatureCreate(Creature* pCreature); - void OnObjectCreate(GameObject* pGo); + void OnCreatureCreate(Creature* pCreature) override; + void OnObjectCreate(GameObject* pGo) override; - void SetData(uint32 uiType, uint32 uiData); - uint32 GetData(uint32 uiType); + void SetData(uint32 uiType, uint32 uiData) override; + uint32 GetData(uint32 uiType) override; sBombFace* GetBombFaces(); void DoActivateBombFace(uint8 uiIndex); void DoDeactivateBombFace(uint8 uiIndex); - const char* Save() { return m_strInstData.c_str(); } - void Load(const char* chrIn); + const char* Save() override { return m_strInstData.c_str(); } + void Load(const char* chrIn) override; protected: uint32 m_auiEncounter[MAX_ENCOUNTER]; diff --git a/scripts/eastern_kingdoms/hinterlands.cpp b/scripts/eastern_kingdoms/hinterlands.cpp index 18349ef79..d56fdf95c 100644 --- a/scripts/eastern_kingdoms/hinterlands.cpp +++ b/scripts/eastern_kingdoms/hinterlands.cpp @@ -51,9 +51,9 @@ struct MANGOS_DLL_DECL npc_00x09hlAI : public npc_escortAI { npc_00x09hlAI(Creature* pCreature) : npc_escortAI(pCreature) { Reset(); } - void Reset() { } + void Reset() override { } - void WaypointReached(uint32 uiPointId) + void WaypointReached(uint32 uiPointId) override { switch (uiPointId) { @@ -71,7 +71,7 @@ struct MANGOS_DLL_DECL npc_00x09hlAI : public npc_escortAI } } - void WaypointStart(uint32 uiPointId) + void WaypointStart(uint32 uiPointId) override { switch (uiPointId) { @@ -96,7 +96,7 @@ struct MANGOS_DLL_DECL npc_00x09hlAI : public npc_escortAI } } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { if (pWho->GetEntry() == NPC_MARAUDING_OWL || pWho->GetEntry() == NPC_VILE_AMBUSHER) return; @@ -104,7 +104,7 @@ struct MANGOS_DLL_DECL npc_00x09hlAI : public npc_escortAI DoScriptText(urand(0, 1) ? SAY_OOX_AGGRO1 : SAY_OOX_AGGRO2, m_creature); } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { pSummoned->GetMotionMaster()->MovePoint(0, m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ()); } @@ -181,13 +181,13 @@ struct MANGOS_DLL_DECL npc_rinjiAI : public npc_escortAI uint32 m_uiPostEventTimer; int m_iSpawnId; - void Reset() + void Reset() override { m_uiPostEventCount = 0; m_uiPostEventTimer = 3000; } - void JustRespawned() + void JustRespawned() override { m_bIsByOutrunner = false; m_iSpawnId = 0; @@ -195,7 +195,7 @@ struct MANGOS_DLL_DECL npc_rinjiAI : public npc_escortAI npc_escortAI::JustRespawned(); } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { if (HasEscortState(STATE_ESCORT_ESCORTING)) { @@ -230,13 +230,13 @@ struct MANGOS_DLL_DECL npc_rinjiAI : public npc_escortAI } } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { m_creature->SetWalk(false); pSummoned->GetMotionMaster()->MovePoint(0, m_afAmbushMoveTo[m_iSpawnId].m_fX, m_afAmbushMoveTo[m_iSpawnId].m_fY, m_afAmbushMoveTo[m_iSpawnId].m_fZ); } - void WaypointReached(uint32 uiPointId) + void WaypointReached(uint32 uiPointId) override { Player* pPlayer = GetPlayerForEscort(); @@ -263,7 +263,7 @@ struct MANGOS_DLL_DECL npc_rinjiAI : public npc_escortAI } } - void UpdateEscortAI(const uint32 uiDiff) + void UpdateEscortAI(const uint32 uiDiff) override { // Check if we have a current target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) diff --git a/scripts/eastern_kingdoms/isle_of_queldanas.cpp b/scripts/eastern_kingdoms/isle_of_queldanas.cpp index 805ec970e..1c2bad2b3 100644 --- a/scripts/eastern_kingdoms/isle_of_queldanas.cpp +++ b/scripts/eastern_kingdoms/isle_of_queldanas.cpp @@ -46,14 +46,14 @@ struct MANGOS_DLL_DECL npc_converted_sentryAI : public ScriptedAI uint32 m_uiCreditTimer; - void Reset() + void Reset() override { m_uiCreditTimer = 2500; } - void MoveInLineOfSight(Unit* pWho) {} + void MoveInLineOfSight(Unit* pWho) override {} - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (m_uiCreditTimer) { diff --git a/scripts/eastern_kingdoms/karazhan/boss_curator.cpp b/scripts/eastern_kingdoms/karazhan/boss_curator.cpp index d047f714b..dbb944109 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_curator.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_curator.cpp @@ -63,7 +63,7 @@ struct MANGOS_DLL_DECL boss_curatorAI : public ScriptedAI bool m_bIsEnraged; - void Reset() + void Reset() override { m_uiFlareTimer = 10000; m_uiHatefulBoltTimer = 15000; // This time may be wrong @@ -73,12 +73,12 @@ struct MANGOS_DLL_DECL boss_curatorAI : public ScriptedAI m_creature->ApplySpellImmune(0, IMMUNITY_DAMAGE, SPELL_SCHOOL_MASK_ARCANE, true); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { DoScriptText(urand(0, 1) ? SAY_KILL1 : SAY_KILL2, m_creature); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoScriptText(SAY_DEATH, m_creature); @@ -86,7 +86,7 @@ struct MANGOS_DLL_DECL boss_curatorAI : public ScriptedAI m_pInstance->SetData(TYPE_CURATOR, DONE); } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoScriptText(SAY_AGGRO, m_creature); @@ -94,13 +94,13 @@ struct MANGOS_DLL_DECL boss_curatorAI : public ScriptedAI m_pInstance->SetData(TYPE_CURATOR, IN_PROGRESS); } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_CURATOR, FAIL); } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { if (pSummoned->GetEntry() == NPC_ASTRAL_FLARE) { @@ -114,7 +114,7 @@ struct MANGOS_DLL_DECL boss_curatorAI : public ScriptedAI } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/eastern_kingdoms/karazhan/boss_maiden_of_virtue.cpp b/scripts/eastern_kingdoms/karazhan/boss_maiden_of_virtue.cpp index b9e0113a2..7e95adf47 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_maiden_of_virtue.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_maiden_of_virtue.cpp @@ -55,7 +55,7 @@ struct MANGOS_DLL_DECL boss_maiden_of_virtueAI : public ScriptedAI uint32 m_uiHolywrathTimer; uint32 m_uiHolygroundTimer; - void Reset() + void Reset() override { m_uiRepentanceTimer = urand(25000, 40000); m_uiHolyfireTimer = urand(8000, 25000); @@ -63,7 +63,7 @@ struct MANGOS_DLL_DECL boss_maiden_of_virtueAI : public ScriptedAI m_uiHolygroundTimer = 3000; } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { switch (urand(0, 5)) // 50% chance to say something out of 3 texts { @@ -73,7 +73,7 @@ struct MANGOS_DLL_DECL boss_maiden_of_virtueAI : public ScriptedAI } } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoScriptText(SAY_DEATH, m_creature); @@ -81,7 +81,7 @@ struct MANGOS_DLL_DECL boss_maiden_of_virtueAI : public ScriptedAI m_pInstance->SetData(TYPE_MAIDEN, DONE); } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoScriptText(SAY_AGGRO, m_creature); @@ -89,13 +89,13 @@ struct MANGOS_DLL_DECL boss_maiden_of_virtueAI : public ScriptedAI m_pInstance->SetData(TYPE_MAIDEN, IN_PROGRESS); } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_MAIDEN, FAIL); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/eastern_kingdoms/karazhan/boss_midnight.cpp b/scripts/eastern_kingdoms/karazhan/boss_midnight.cpp index 9f0dacdaf..51e4f0ee7 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_midnight.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_midnight.cpp @@ -66,7 +66,7 @@ struct MANGOS_DLL_DECL boss_midnightAI : public ScriptedAI uint8 m_uiPhase; uint32 m_uiKnockDown; - void Reset() + void Reset() override { m_uiPhase = 0; m_uiKnockDown = urand(6000, 9000); @@ -74,13 +74,13 @@ struct MANGOS_DLL_DECL boss_midnightAI : public ScriptedAI SetCombatMovement(true); } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { if (m_pInstance) m_pInstance->SetData(TYPE_ATTUMEN, IN_PROGRESS); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { if (m_uiPhase == 1 && m_pInstance) { @@ -89,13 +89,13 @@ struct MANGOS_DLL_DECL boss_midnightAI : public ScriptedAI } } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_ATTUMEN, FAIL); } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { if (m_creature->getVictim()) pSummoned->AI()->AttackStart(m_creature->getVictim()); @@ -123,7 +123,7 @@ struct MANGOS_DLL_DECL boss_midnightAI : public ScriptedAI } } - void MovementInform(uint32 uiMoveType, uint32 uiPointId) + void MovementInform(uint32 uiMoveType, uint32 uiPointId) override { if (uiMoveType != POINT_MOTION_TYPE || !uiPointId || !m_pInstance) return; @@ -150,7 +150,7 @@ struct MANGOS_DLL_DECL boss_midnightAI : public ScriptedAI } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -208,7 +208,7 @@ struct MANGOS_DLL_DECL boss_attumenAI : public ScriptedAI bool m_bHasSummonRider; - void Reset() + void Reset() override { m_uiCleaveTimer = urand(10000, 16000); m_uiCurseTimer = 30000; @@ -219,18 +219,18 @@ struct MANGOS_DLL_DECL boss_attumenAI : public ScriptedAI m_bHasSummonRider = false; } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { DoScriptText(urand(0, 1) ? SAY_KILL1 : SAY_KILL2, m_creature); } - void SpellHit(Unit* pSource, const SpellEntry* pSpell) + void SpellHit(Unit* pSource, const SpellEntry* pSpell) override { if (pSpell->Mechanic == MECHANIC_DISARM) DoScriptText(SAY_DISARMED, m_creature); } - void JustDied(Unit* pVictim) + void JustDied(Unit* pVictim) override { DoScriptText(SAY_DEATH, m_creature); @@ -238,7 +238,7 @@ struct MANGOS_DLL_DECL boss_attumenAI : public ScriptedAI m_pInstance->SetData(TYPE_ATTUMEN, DONE); } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_ATTUMEN, FAIL); @@ -247,7 +247,7 @@ struct MANGOS_DLL_DECL boss_attumenAI : public ScriptedAI m_creature->ForcedDespawn(); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/eastern_kingdoms/karazhan/boss_moroes.cpp b/scripts/eastern_kingdoms/karazhan/boss_moroes.cpp index 4c953a909..bff43dd1a 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_moroes.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_moroes.cpp @@ -81,7 +81,7 @@ struct MANGOS_DLL_DECL boss_moroesAI : public ScriptedAI bool m_bEnrage; - void Reset() + void Reset() override { m_uiVanishTimer = 30000; m_uiBlindTimer = 35000; @@ -93,7 +93,7 @@ struct MANGOS_DLL_DECL boss_moroesAI : public ScriptedAI DoSpawnGuests(); } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoScriptText(SAY_AGGRO, m_creature); @@ -101,7 +101,7 @@ struct MANGOS_DLL_DECL boss_moroesAI : public ScriptedAI m_pInstance->SetData(TYPE_MOROES, IN_PROGRESS); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { switch (urand(0, 2)) { @@ -111,7 +111,7 @@ struct MANGOS_DLL_DECL boss_moroesAI : public ScriptedAI } } - void JustReachedHome() + void JustReachedHome() override { DoRemoveGarroteAura(); @@ -119,7 +119,7 @@ struct MANGOS_DLL_DECL boss_moroesAI : public ScriptedAI m_pInstance->SetData(TYPE_MOROES, FAIL); } - void JustDied(Unit* pVictim) + void JustDied(Unit* pVictim) override { DoScriptText(SAY_DEATH, m_creature); DoRemoveGarroteAura(); @@ -128,7 +128,7 @@ struct MANGOS_DLL_DECL boss_moroesAI : public ScriptedAI m_pInstance->SetData(TYPE_MOROES, DONE); } - void EnterEvadeMode() + void EnterEvadeMode() override { // Don't evade during vanish phase if (m_uiWaitTimer) @@ -196,7 +196,7 @@ struct MANGOS_DLL_DECL boss_moroesAI : public ScriptedAI } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/eastern_kingdoms/karazhan/boss_netherspite.cpp b/scripts/eastern_kingdoms/karazhan/boss_netherspite.cpp index 02124e9ad..30c3ddc08 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_netherspite.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_netherspite.cpp @@ -127,7 +127,7 @@ struct MANGOS_DLL_DECL boss_netherspiteAI : public ScriptedAI std::vector m_vPortalEntryList; - void Reset() + void Reset() override { m_uiActivePhase = BEAM_PHASE; @@ -146,7 +146,7 @@ struct MANGOS_DLL_DECL boss_netherspiteAI : public ScriptedAI m_vPortalEntryList[i] = auiPortals[i]; } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { if (m_pInstance) m_pInstance->SetData(TYPE_NETHERSPITE, IN_PROGRESS); @@ -155,13 +155,13 @@ struct MANGOS_DLL_DECL boss_netherspiteAI : public ScriptedAI DoCastSpellIfCan(m_creature, SPELL_NETHERBURN); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { if (m_pInstance) m_pInstance->SetData(TYPE_NETHERSPITE, DONE); } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_NETHERSPITE, FAIL); @@ -213,7 +213,7 @@ struct MANGOS_DLL_DECL boss_netherspiteAI : public ScriptedAI std::random_shuffle(m_vPortalEntryList.begin(), m_vPortalEntryList.end()); } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { switch (pSummoned->GetEntry()) { @@ -232,7 +232,7 @@ struct MANGOS_DLL_DECL boss_netherspiteAI : public ScriptedAI } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/eastern_kingdoms/karazhan/boss_nightbane.cpp b/scripts/eastern_kingdoms/karazhan/boss_nightbane.cpp index 29b2a77ba..5bff95f23 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_nightbane.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_nightbane.cpp @@ -81,7 +81,7 @@ struct MANGOS_DLL_DECL boss_nightbaneAI : public npc_escortAI uint32 m_uiSmokingBlastTimer; uint32 m_uiFireballBarrageTimer; - void Reset() + void Reset() override { m_uiPhase = PHASE_GROUND; m_uiFlightPhase = 1; @@ -105,18 +105,18 @@ struct MANGOS_DLL_DECL boss_nightbaneAI : public npc_escortAI m_uiFireballBarrageTimer = 10000; } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoScriptText(SAY_AGGRO, m_creature); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { if (m_pInstance) m_pInstance->SetData(TYPE_NIGHTBANE, DONE); } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_NIGHTBANE, FAIL); @@ -125,13 +125,13 @@ struct MANGOS_DLL_DECL boss_nightbaneAI : public npc_escortAI npc_escortAI::JustRespawned(); } - void EnterEvadeMode() + void EnterEvadeMode() override { // Use standard AI evade, in order to reset position ScriptedAI::EnterEvadeMode(); } - void WaypointReached(uint32 uiPointId) + void WaypointReached(uint32 uiPointId) override { // Set in combat after the intro is done if (uiPointId == 31) @@ -145,7 +145,7 @@ struct MANGOS_DLL_DECL boss_nightbaneAI : public npc_escortAI } } - void MovementInform(uint32 uiMotionType, uint32 uiPointId) + void MovementInform(uint32 uiMotionType, uint32 uiPointId) override { if (uiMotionType != POINT_MOTION_TYPE) return; @@ -171,7 +171,7 @@ struct MANGOS_DLL_DECL boss_nightbaneAI : public npc_escortAI } } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { if (m_creature->getVictim()) pSummoned->AI()->AttackStart(m_creature->getVictim()); @@ -208,7 +208,7 @@ struct MANGOS_DLL_DECL boss_nightbaneAI : public npc_escortAI } } - void UpdateEscortAI(const uint32 uiDiff) + void UpdateEscortAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/eastern_kingdoms/karazhan/boss_prince_malchezaar.cpp b/scripts/eastern_kingdoms/karazhan/boss_prince_malchezaar.cpp index 0551c58ba..6d721e50f 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_prince_malchezaar.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_prince_malchezaar.cpp @@ -91,7 +91,7 @@ struct MANGOS_DLL_DECL boss_malchezaarAI : public ScriptedAI uint8 m_uiPhase; - void Reset() + void Reset() override { for (uint8 i = 0; i < MAX_ENFEEBLE_TARGETS; ++i) { @@ -115,7 +115,7 @@ struct MANGOS_DLL_DECL boss_malchezaarAI : public ScriptedAI m_creature->SetAttackTime(BASE_ATTACK, ATTACK_TIMER_DEFAULT); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { switch (urand(0, 2)) { @@ -125,7 +125,7 @@ struct MANGOS_DLL_DECL boss_malchezaarAI : public ScriptedAI } } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoScriptText(SAY_DEATH, m_creature); @@ -136,7 +136,7 @@ struct MANGOS_DLL_DECL boss_malchezaarAI : public ScriptedAI m_pInstance->SetData(TYPE_MALCHEZZAR, DONE); } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoScriptText(SAY_AGGRO, m_creature); @@ -144,7 +144,7 @@ struct MANGOS_DLL_DECL boss_malchezaarAI : public ScriptedAI m_pInstance->SetData(TYPE_MALCHEZZAR, IN_PROGRESS); } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_MALCHEZZAR, FAIL); @@ -153,7 +153,7 @@ struct MANGOS_DLL_DECL boss_malchezaarAI : public ScriptedAI m_creature->RemoveGuardians(); } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { if (pSummoned->GetEntry() == NPC_NETHERSPITE_INFERNAL) pSummoned->CastSpell(pSummoned, SPELL_HELLFIRE, false); @@ -161,7 +161,7 @@ struct MANGOS_DLL_DECL boss_malchezaarAI : public ScriptedAI pSummoned->SetInCombatWithZone(); } - void SpellHitTarget(Unit* pTarget, SpellEntry const* pSpellEntry) + void SpellHitTarget(Unit* pTarget, SpellEntry const* pSpellEntry) override { // Target selection is already handled properly in core (doesn't affect tank) if (pSpellEntry->Id == SPELL_ENFEEBLE && pTarget->GetTypeId() == TYPEID_PLAYER) @@ -191,7 +191,7 @@ struct MANGOS_DLL_DECL boss_malchezaarAI : public ScriptedAI m_uiEnfeebleIndex = 0; } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -337,10 +337,10 @@ struct MANGOS_DLL_DECL npc_infernal_targetAI : public Scripted_NoMovementAI { npc_infernal_targetAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { Reset(); } - void Reset() { } - void MoveInLineOfSight(Unit* pWho) { } - void AttackStart(Unit* pWho) { } - void UpdateAI(const uint32 uiDiff) { } + void Reset() override { } + void MoveInLineOfSight(Unit* pWho) override { } + void AttackStart(Unit* pWho) override { } + void UpdateAI(const uint32 uiDiff) override { } }; CreatureAI* GetAI_npc_infernal_target(Creature* pCreature) diff --git a/scripts/eastern_kingdoms/karazhan/boss_shade_of_aran.cpp b/scripts/eastern_kingdoms/karazhan/boss_shade_of_aran.cpp index 0a0904e25..f2e105d4d 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_shade_of_aran.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_shade_of_aran.cpp @@ -114,7 +114,7 @@ struct MANGOS_DLL_DECL boss_aranAI : public ScriptedAI bool m_bIsDrinking; bool m_bDrinkInturrupted; - void Reset() + void Reset() override { m_uiLastSuperSpell = urand(SUPER_FLAME_WREATH, SUPER_ARCANE_EXPL); m_uiLastNormalSpell = urand(0, 2); @@ -133,12 +133,12 @@ struct MANGOS_DLL_DECL boss_aranAI : public ScriptedAI SetCombatMovement(true); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { DoScriptText(urand(0, 1) ? SAY_KILL1 : SAY_KILL2, m_creature); } - void JustDied(Unit* pVictim) + void JustDied(Unit* pVictim) override { DoScriptText(SAY_DEATH, m_creature); @@ -149,7 +149,7 @@ struct MANGOS_DLL_DECL boss_aranAI : public ScriptedAI m_pInstance->SetData(TYPE_ARAN, DONE); } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { switch (urand(0, 2)) { @@ -162,7 +162,7 @@ struct MANGOS_DLL_DECL boss_aranAI : public ScriptedAI m_pInstance->SetData(TYPE_ARAN, IN_PROGRESS); } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_ARAN, FAIL); @@ -171,7 +171,7 @@ struct MANGOS_DLL_DECL boss_aranAI : public ScriptedAI m_creature->RemoveGuardians(); } - void DamageTaken(Unit* pDoneBy, uint32& uiDamage) + void DamageTaken(Unit* pDoneBy, uint32& uiDamage) override { if (!m_bDrinkInturrupted && m_bIsDrinking && uiDamage > 0) { @@ -189,7 +189,7 @@ struct MANGOS_DLL_DECL boss_aranAI : public ScriptedAI } } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { switch (pSummoned->GetEntry()) { @@ -200,7 +200,7 @@ struct MANGOS_DLL_DECL boss_aranAI : public ScriptedAI } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -403,10 +403,10 @@ struct MANGOS_DLL_DECL npc_shade_of_aran_blizzardAI : public ScriptedAI { npc_shade_of_aran_blizzardAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } - void Reset() { } - void MoveInLineOfSight(Unit* pWho) { } - void AttackStart(Unit* pWho) { } - void UpdateAI(const uint32 uiDiff) { } + void Reset() override { } + void MoveInLineOfSight(Unit* pWho) override { } + void AttackStart(Unit* pWho) override { } + void UpdateAI(const uint32 uiDiff) override { } }; CreatureAI* GetAI_npc_shade_of_aran_blizzard(Creature* pCreature) diff --git a/scripts/eastern_kingdoms/karazhan/boss_terestian_illhoof.cpp b/scripts/eastern_kingdoms/karazhan/boss_terestian_illhoof.cpp index ddc995761..9669a22d7 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_terestian_illhoof.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_terestian_illhoof.cpp @@ -80,7 +80,7 @@ struct MANGOS_DLL_DECL boss_terestianAI : public ScriptedAI bool m_bSummonedPortals; - void Reset() + void Reset() override { m_uiSummonKilrekTimer = 0; m_uiSacrificeTimer = 30000; @@ -91,7 +91,7 @@ struct MANGOS_DLL_DECL boss_terestianAI : public ScriptedAI m_bSummonedPortals = false; } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoScriptText(SAY_AGGRO, m_creature); @@ -102,18 +102,18 @@ struct MANGOS_DLL_DECL boss_terestianAI : public ScriptedAI m_pInstance->SetData(TYPE_TERESTIAN, IN_PROGRESS); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { DoScriptText(urand(0, 1) ? SAY_SLAY1 : SAY_SLAY2, m_creature); } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_TERESTIAN, FAIL); } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { switch (pSummoned->GetEntry()) { @@ -134,7 +134,7 @@ struct MANGOS_DLL_DECL boss_terestianAI : public ScriptedAI } } - void SummonedCreatureJustDied(Creature* pSummoned) + void SummonedCreatureJustDied(Creature* pSummoned) override { switch (pSummoned->GetEntry()) { @@ -149,7 +149,7 @@ struct MANGOS_DLL_DECL boss_terestianAI : public ScriptedAI } } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoScriptText(SAY_DEATH, m_creature); @@ -157,7 +157,7 @@ struct MANGOS_DLL_DECL boss_terestianAI : public ScriptedAI m_pInstance->SetData(TYPE_TERESTIAN, DONE); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { // Respawn Kilrek if killed if (m_uiSummonKilrekTimer) @@ -233,18 +233,18 @@ struct MANGOS_DLL_DECL npc_fiendish_portalAI : public ScriptedAI uint32 m_uiSummonTimer; - void Reset() + void Reset() override { m_uiSummonTimer = 5000; } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { pSummoned->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_FIRE, true); pSummoned->SetInCombatWithZone(); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (m_uiSummonTimer < uiDiff) { @@ -261,10 +261,10 @@ struct MANGOS_DLL_DECL mob_demon_chainAI : public Scripted_NoMovementAI { mob_demon_chainAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { Reset(); } - void Reset() { } - void MoveInLineOfSight(Unit* pWho) { } - void AttackStart(Unit* pWho) { } - void UpdateAI(const uint32 uiDiff) { } + void Reset() override { } + void MoveInLineOfSight(Unit* pWho) override { } + void AttackStart(Unit* pWho) override { } + void UpdateAI(const uint32 uiDiff) override { } }; CreatureAI* GetAI_boss_terestian_illhoof(Creature* pCreature) diff --git a/scripts/eastern_kingdoms/karazhan/bosses_opera.cpp b/scripts/eastern_kingdoms/karazhan/bosses_opera.cpp index 63dce04d7..67f31ba7e 100644 --- a/scripts/eastern_kingdoms/karazhan/bosses_opera.cpp +++ b/scripts/eastern_kingdoms/karazhan/bosses_opera.cpp @@ -104,7 +104,7 @@ struct MANGOS_DLL_DECL boss_dorotheeAI : public ScriptedAI bool m_bTitoDied; - void Reset() + void Reset() override { m_uiIntroTimer = 2000; m_uiAggroTimer = 12000; @@ -116,7 +116,7 @@ struct MANGOS_DLL_DECL boss_dorotheeAI : public ScriptedAI m_bTitoDied = false; } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_OPERA, FAIL); @@ -124,12 +124,12 @@ struct MANGOS_DLL_DECL boss_dorotheeAI : public ScriptedAI m_creature->ForcedDespawn(); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoScriptText(SAY_DOROTHEE_DEATH, m_creature); } - void MoveInLineOfSight(Unit* pWho) + void MoveInLineOfSight(Unit* pWho) override { // Allow a short delay before attacking if (m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE)) @@ -138,13 +138,13 @@ struct MANGOS_DLL_DECL boss_dorotheeAI : public ScriptedAI ScriptedAI::MoveInLineOfSight(pWho); } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { if (m_creature->getVictim()) pSummoned->AI()->AttackStart(m_creature->getVictim()); } - void SummonedCreatureJustDied(Creature* pSummoned) + void SummonedCreatureJustDied(Creature* pSummoned) override { if (pSummoned->GetEntry() == NPC_TITO) { @@ -153,7 +153,7 @@ struct MANGOS_DLL_DECL boss_dorotheeAI : public ScriptedAI } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (m_uiIntroTimer) { @@ -232,14 +232,14 @@ struct MANGOS_DLL_DECL boss_strawmanAI : public ScriptedAI uint32 m_uiBrainBashTimer; uint32 m_uiBrainWipeTimer; - void Reset() + void Reset() override { m_uiAggroTimer = 27000; m_uiBrainBashTimer = 5000; m_uiBrainWipeTimer = 7000; } - void MoveInLineOfSight(Unit* pWho) + void MoveInLineOfSight(Unit* pWho) override { if (m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE)) return; @@ -247,7 +247,7 @@ struct MANGOS_DLL_DECL boss_strawmanAI : public ScriptedAI ScriptedAI::MoveInLineOfSight(pWho); } - void AttackStart(Unit* pWho) + void AttackStart(Unit* pWho) override { if (m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE)) return; @@ -255,13 +255,13 @@ struct MANGOS_DLL_DECL boss_strawmanAI : public ScriptedAI ScriptedAI::AttackStart(pWho); } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoCastSpellIfCan(m_creature, SPELL_CONFLAG_PROC); DoScriptText(SAY_STRAWMAN_AGGRO, m_creature); } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_OPERA, FAIL); @@ -269,17 +269,17 @@ struct MANGOS_DLL_DECL boss_strawmanAI : public ScriptedAI m_creature->ForcedDespawn(); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoScriptText(SAY_STRAWMAN_DEATH, m_creature); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { DoScriptText(SAY_STRAWMAN_SLAY, m_creature); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (m_uiAggroTimer) { @@ -333,19 +333,19 @@ struct MANGOS_DLL_DECL boss_tinheadAI : public ScriptedAI uint32 m_uiCleaveTimer; uint32 m_uiRustTimer; - void Reset() + void Reset() override { m_uiAggroTimer = 37000; m_uiCleaveTimer = 5000; m_uiRustTimer = 30000; } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoScriptText(SAY_TINHEAD_AGGRO, m_creature); } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_OPERA, FAIL); @@ -353,7 +353,7 @@ struct MANGOS_DLL_DECL boss_tinheadAI : public ScriptedAI m_creature->ForcedDespawn(); } - void MoveInLineOfSight(Unit* pWho) + void MoveInLineOfSight(Unit* pWho) override { if (m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE)) return; @@ -361,7 +361,7 @@ struct MANGOS_DLL_DECL boss_tinheadAI : public ScriptedAI ScriptedAI::MoveInLineOfSight(pWho); } - void AttackStart(Unit* pWho) + void AttackStart(Unit* pWho) override { if (m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE)) return; @@ -369,17 +369,17 @@ struct MANGOS_DLL_DECL boss_tinheadAI : public ScriptedAI ScriptedAI::AttackStart(pWho); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoScriptText(SAY_TINHEAD_DEATH, m_creature); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { DoScriptText(SAY_TINHEAD_SLAY, m_creature); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (m_uiAggroTimer) { @@ -434,7 +434,7 @@ struct MANGOS_DLL_DECL boss_roarAI : public ScriptedAI uint32 m_uiShredTimer; uint32 m_uiScreamTimer; - void Reset() + void Reset() override { m_uiAggroTimer = 17000; m_uiMangleTimer = 5000; @@ -442,7 +442,7 @@ struct MANGOS_DLL_DECL boss_roarAI : public ScriptedAI m_uiScreamTimer = 15000; } - void MoveInLineOfSight(Unit* pWho) + void MoveInLineOfSight(Unit* pWho) override { if (m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE)) return; @@ -450,7 +450,7 @@ struct MANGOS_DLL_DECL boss_roarAI : public ScriptedAI ScriptedAI::MoveInLineOfSight(pWho); } - void AttackStart(Unit* pWho) + void AttackStart(Unit* pWho) override { if (m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE)) return; @@ -458,12 +458,12 @@ struct MANGOS_DLL_DECL boss_roarAI : public ScriptedAI ScriptedAI::AttackStart(pWho); } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoScriptText(SAY_ROAR_AGGRO, m_creature); } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_OPERA, FAIL); @@ -471,17 +471,17 @@ struct MANGOS_DLL_DECL boss_roarAI : public ScriptedAI m_creature->ForcedDespawn(); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoScriptText(SAY_ROAR_DEATH, m_creature); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { DoScriptText(SAY_ROAR_SLAY, m_creature); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (m_uiAggroTimer) { @@ -540,12 +540,12 @@ struct MANGOS_DLL_DECL boss_croneAI : public ScriptedAI uint32 m_uiChainLightningTimer; - void Reset() + void Reset() override { m_uiChainLightningTimer = 10000; } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_OPERA, FAIL); @@ -553,7 +553,7 @@ struct MANGOS_DLL_DECL boss_croneAI : public ScriptedAI m_creature->ForcedDespawn(); } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoScriptText(urand(0, 1) ? SAY_CRONE_AGGRO : SAY_CRONE_AGGRO2, m_creature); @@ -561,7 +561,7 @@ struct MANGOS_DLL_DECL boss_croneAI : public ScriptedAI m_creature->SummonCreature(NPC_CYCLONE, afCycloneSpawnLoc[0], afCycloneSpawnLoc[1], afCycloneSpawnLoc[2], afCycloneSpawnLoc[3], TEMPSUMMON_DEAD_DESPAWN, 0); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoScriptText(SAY_CRONE_DEATH, m_creature); @@ -569,14 +569,14 @@ struct MANGOS_DLL_DECL boss_croneAI : public ScriptedAI m_pInstance->SetData(TYPE_OPERA, DONE); } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { pSummoned->CastSpell(pSummoned, SPELL_CYCLONE, true); pSummoned->CastSpell(pSummoned, SPELL_CYCLONE_VISUAL, true); pSummoned->GetMotionMaster()->MoveRandomAroundPoint(m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), 15.0f); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -680,19 +680,19 @@ struct MANGOS_DLL_DECL boss_bigbadwolfAI : public ScriptedAI uint32 m_uiFearTimer; uint32 m_uiSwipeTimer; - void Reset() + void Reset() override { m_uiRedRidingHoodTimer = 30000; m_uiFearTimer = urand(25000, 35000); m_uiSwipeTimer = 5000; } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoScriptText(SAY_WOLF_AGGRO, m_creature); } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_OPERA, FAIL); @@ -700,7 +700,7 @@ struct MANGOS_DLL_DECL boss_bigbadwolfAI : public ScriptedAI m_creature->ForcedDespawn(); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoPlaySoundToSet(m_creature, SOUND_WOLF_DEATH); @@ -708,7 +708,7 @@ struct MANGOS_DLL_DECL boss_bigbadwolfAI : public ScriptedAI m_pInstance->SetData(TYPE_OPERA, DONE); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -817,7 +817,7 @@ struct MANGOS_DLL_DECL boss_julianneAI : public ScriptedAI bool m_bIsFakingDeath; - void Reset() + void Reset() override { m_Phase = PHASE_JULIANNE; @@ -831,12 +831,12 @@ struct MANGOS_DLL_DECL boss_julianneAI : public ScriptedAI m_bIsFakingDeath = false; } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoScriptText(SAY_JULIANNE_AGGRO, m_creature); } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_OPERA, FAIL); @@ -844,7 +844,7 @@ struct MANGOS_DLL_DECL boss_julianneAI : public ScriptedAI m_creature->ForcedDespawn(); } - void DamageTaken(Unit* pDoneBy, uint32& uiDamage) + void DamageTaken(Unit* pDoneBy, uint32& uiDamage) override { if (uiDamage < m_creature->GetHealth()) return; @@ -873,7 +873,7 @@ struct MANGOS_DLL_DECL boss_julianneAI : public ScriptedAI } } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); @@ -881,7 +881,7 @@ struct MANGOS_DLL_DECL boss_julianneAI : public ScriptedAI m_pInstance->SetData(TYPE_OPERA, DONE); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { if (pVictim->GetTypeId() != TYPEID_PLAYER) return; @@ -889,7 +889,7 @@ struct MANGOS_DLL_DECL boss_julianneAI : public ScriptedAI DoScriptText(SAY_JULIANNE_SLAY, m_creature); } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { if (m_creature->getVictim()) pSummoned->AI()->AttackStart(m_creature->getVictim()); @@ -937,7 +937,7 @@ struct MANGOS_DLL_DECL boss_julianneAI : public ScriptedAI } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { // spawn Romulo on timer after fake death if (m_uiSummonRomuloTimer) @@ -1069,7 +1069,7 @@ struct MANGOS_DLL_DECL boss_romuloAI : public ScriptedAI bool m_bIsFakingDeath; - void Reset() + void Reset() override { m_Phase = PHASE_ROMULO; @@ -1083,7 +1083,7 @@ struct MANGOS_DLL_DECL boss_romuloAI : public ScriptedAI m_bIsFakingDeath = false; } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_OPERA, FAIL); @@ -1091,7 +1091,7 @@ struct MANGOS_DLL_DECL boss_romuloAI : public ScriptedAI m_creature->ForcedDespawn(); } - void DamageTaken(Unit* pDoneBy, uint32& uiDamage) + void DamageTaken(Unit* pDoneBy, uint32& uiDamage) override { if (uiDamage < m_creature->GetHealth()) return; @@ -1113,12 +1113,12 @@ struct MANGOS_DLL_DECL boss_romuloAI : public ScriptedAI } } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoScriptText(SAY_ROMULO_AGGRO, m_creature); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); @@ -1126,7 +1126,7 @@ struct MANGOS_DLL_DECL boss_romuloAI : public ScriptedAI m_pInstance->SetData(TYPE_OPERA, DONE); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { if (pVictim->GetTypeId() != TYPEID_PLAYER) return; @@ -1134,7 +1134,7 @@ struct MANGOS_DLL_DECL boss_romuloAI : public ScriptedAI DoScriptText(SAY_ROMULO_SLAY, m_creature); } - void SpellHit(Unit* pCaster, const SpellEntry* pSpell) + void SpellHit(Unit* pCaster, const SpellEntry* pSpell) override { // remove fake death on res if (pSpell->Id == SPELL_UNDYING_LOVE && pCaster->GetEntry() == NPC_JULIANNE) @@ -1172,7 +1172,7 @@ struct MANGOS_DLL_DECL boss_romuloAI : public ScriptedAI DoStartMovement(m_creature->getVictim()); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { // Resurrect both of them at the beginning of phase 3 if (m_uiResurrectTimer) diff --git a/scripts/eastern_kingdoms/karazhan/karazhan.cpp b/scripts/eastern_kingdoms/karazhan/karazhan.cpp index 717f9ca5e..f6aa47edf 100644 --- a/scripts/eastern_kingdoms/karazhan/karazhan.cpp +++ b/scripts/eastern_kingdoms/karazhan/karazhan.cpp @@ -108,18 +108,18 @@ struct MANGOS_DLL_DECL npc_barnesAI : public npc_escortAI, private DialogueHelpe ObjectGuid m_spotlightGuid; - void Reset() + void Reset() override { m_spotlightGuid.Clear(); } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { if (pSummoned->GetEntry() == NPC_SPOTLIGHT) m_spotlightGuid = pSummoned->GetObjectGuid(); } - void WaypointReached(uint32 uiPointId) + void WaypointReached(uint32 uiPointId) override { if (!m_pInstance) return; @@ -155,7 +155,7 @@ struct MANGOS_DLL_DECL npc_barnesAI : public npc_escortAI, private DialogueHelpe } } - void JustDidDialogueStep(int32 iEntry) + void JustDidDialogueStep(int32 iEntry) override { switch (iEntry) { @@ -370,12 +370,12 @@ struct MANGOS_DLL_DECL npc_image_of_medivhAI : public ScriptedAI, private Dialog ObjectGuid m_eventStarterGuid; - void Reset() { } + void Reset() override { } - void AttackStart(Unit* pWho) { } - void MoveInLineOfSight(Unit* pWho) { } + void AttackStart(Unit* pWho) override { } + void MoveInLineOfSight(Unit* pWho) override { } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { if (pSummoned->GetEntry() == NPC_IMAGE_OF_ARCANAGOS) { @@ -386,7 +386,7 @@ struct MANGOS_DLL_DECL npc_image_of_medivhAI : public ScriptedAI, private Dialog } } - void SummonedMovementInform(Creature* pSummoned, uint32 uiMotionType, uint32 uiPointId) + void SummonedMovementInform(Creature* pSummoned, uint32 uiMotionType, uint32 uiPointId) override { if (uiMotionType != POINT_MOTION_TYPE || pSummoned->GetEntry() != NPC_IMAGE_OF_ARCANAGOS) return; @@ -407,7 +407,7 @@ struct MANGOS_DLL_DECL npc_image_of_medivhAI : public ScriptedAI, private Dialog } } - void SpellHit(Unit* pCaster, const SpellEntry* pSpell) + void SpellHit(Unit* pCaster, const SpellEntry* pSpell) override { if (pSpell->Id == SPELL_FIREBALL_REFLECT && pCaster->GetEntry() == NPC_IMAGE_OF_ARCANAGOS) { @@ -416,7 +416,7 @@ struct MANGOS_DLL_DECL npc_image_of_medivhAI : public ScriptedAI, private Dialog } } - void JustDidDialogueStep(int32 iEntry) + void JustDidDialogueStep(int32 iEntry) override { if (!m_pInstance) return; @@ -459,9 +459,9 @@ struct MANGOS_DLL_DECL npc_image_arcanagosAI : public ScriptedAI { npc_image_arcanagosAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } - void Reset() { } + void Reset() override { } - void SpellHit(Unit* pCaster, const SpellEntry* pSpell) + void SpellHit(Unit* pCaster, const SpellEntry* pSpell) override { if (pSpell->Id == SPELL_FIREBALL && pCaster->GetEntry() == NPC_IMAGE_OF_MEDIVH) { @@ -475,9 +475,9 @@ struct MANGOS_DLL_DECL npc_image_arcanagosAI : public ScriptedAI } } - void AttackStart(Unit* pWho) { } - void MoveInLineOfSight(Unit* pWho) { } - void UpdateAI(const uint32 uiDiff) { } + void AttackStart(Unit* pWho) override { } + void MoveInLineOfSight(Unit* pWho) override { } + void UpdateAI(const uint32 uiDiff) override { } }; CreatureAI* GetAI_npc_image_arcanagosAI(Creature* pCreature) diff --git a/scripts/eastern_kingdoms/karazhan/karazhan.h b/scripts/eastern_kingdoms/karazhan/karazhan.h index c39b609bc..0efeb81d4 100644 --- a/scripts/eastern_kingdoms/karazhan/karazhan.h +++ b/scripts/eastern_kingdoms/karazhan/karazhan.h @@ -109,24 +109,24 @@ class MANGOS_DLL_DECL instance_karazhan : public ScriptedInstance instance_karazhan(Map* pMap); ~instance_karazhan() {} - void Initialize(); - bool IsEncounterInProgress() const; + void Initialize() override; + bool IsEncounterInProgress() const override; - void OnPlayerEnter(Player* pPlayer); - void OnCreatureCreate(Creature* pCreature); - void OnObjectCreate(GameObject* pGo); + void OnPlayerEnter(Player* pPlayer) override; + void OnCreatureCreate(Creature* pCreature) override; + void OnObjectCreate(GameObject* pGo) override; - void OnCreatureDeath(Creature* pCreature); + void OnCreatureDeath(Creature* pCreature) override; - void SetData(uint32 uiType, uint32 uiData); - uint32 GetData(uint32 uiType); + void SetData(uint32 uiType, uint32 uiData) override; + uint32 GetData(uint32 uiType) override; void DoPrepareOperaStage(Creature* pOrganizer); void GetNightbaneTriggers(GuidList& lList, bool bGround) { lList = bGround ? m_lNightbaneGroundTriggers : m_lNightbaneAirTriggers; } - void Load(const char* chrIn); - const char* Save() { return m_strInstData.c_str(); } + void Load(const char* chrIn) override; + const char* Save() override { return m_strInstData.c_str(); } private: uint32 m_auiEncounter[MAX_ENCOUNTER]; diff --git a/scripts/eastern_kingdoms/loch_modan.cpp b/scripts/eastern_kingdoms/loch_modan.cpp index c386f090c..46bb20b3f 100644 --- a/scripts/eastern_kingdoms/loch_modan.cpp +++ b/scripts/eastern_kingdoms/loch_modan.cpp @@ -117,13 +117,13 @@ struct MANGOS_DLL_DECL npc_miranAI: public npc_escortAI uint8 m_uiDwarves; - void Reset() + void Reset() override { if (!HasEscortState(STATE_ESCORT_ESCORTING)) m_uiDwarves = 0; } - void WaypointReached(uint32 uiPointId) + void WaypointReached(uint32 uiPointId) override { switch (uiPointId) { @@ -140,7 +140,7 @@ struct MANGOS_DLL_DECL npc_miranAI: public npc_escortAI } } - void SummonedCreatureJustDied(Creature* pSummoned) + void SummonedCreatureJustDied(Creature* pSummoned) override { if (pSummoned->GetEntry() == NPC_DARK_IRON_DWARF) { @@ -150,7 +150,7 @@ struct MANGOS_DLL_DECL npc_miranAI: public npc_escortAI } } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { if (pSummoned->GetEntry() == NPC_DARK_IRON_DWARF) { diff --git a/scripts/eastern_kingdoms/magisters_terrace/boss_felblood_kaelthas.cpp b/scripts/eastern_kingdoms/magisters_terrace/boss_felblood_kaelthas.cpp index c37ef0f8d..3ba7d8bf0 100644 --- a/scripts/eastern_kingdoms/magisters_terrace/boss_felblood_kaelthas.cpp +++ b/scripts/eastern_kingdoms/magisters_terrace/boss_felblood_kaelthas.cpp @@ -120,7 +120,7 @@ struct MANGOS_DLL_DECL boss_felblood_kaelthasAI : public ScriptedAI, private Dia bool m_bFirstGravityLapse; bool m_bHasTaunted; - void Reset() + void Reset() override { m_uiFireballTimer = 0; m_uiPhoenixTimer = 10000; @@ -139,26 +139,26 @@ struct MANGOS_DLL_DECL boss_felblood_kaelthasAI : public ScriptedAI, private Dia SetCombatMovement(true); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { if (m_pInstance) m_pInstance->SetData(TYPE_KAELTHAS, DONE); } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { if (m_pInstance) m_pInstance->SetData(TYPE_KAELTHAS, IN_PROGRESS); } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_KAELTHAS, FAIL); } // Boss has an interesting speech before killed, so we need to fake death (without stand state) and allow him to finish his theatre - void DamageTaken(Unit* pKiller, uint32& uiDamage) + void DamageTaken(Unit* pKiller, uint32& uiDamage) override { if (uiDamage < m_creature->GetHealth()) return; @@ -188,7 +188,7 @@ struct MANGOS_DLL_DECL boss_felblood_kaelthasAI : public ScriptedAI, private Dia m_creature->GetMotionMaster()->MoveIdle(); } - void MoveInLineOfSight(Unit* pWho) + void MoveInLineOfSight(Unit* pWho) override { if (!m_bHasTaunted && pWho->GetTypeId() == TYPEID_PLAYER && !((Player*)pWho)->isGameMaster() && m_creature->IsWithinDistInMap(pWho, 40.0) && m_creature->IsWithinLOSInMap(pWho)) @@ -206,7 +206,7 @@ struct MANGOS_DLL_DECL boss_felblood_kaelthasAI : public ScriptedAI, private Dia ScriptedAI::MoveInLineOfSight(pWho); } - void JustDidDialogueStep(int32 iEntry) + void JustDidDialogueStep(int32 iEntry) override { switch (iEntry) { @@ -233,7 +233,7 @@ struct MANGOS_DLL_DECL boss_felblood_kaelthasAI : public ScriptedAI, private Dia } } - void AttackStart(Unit* pWho) + void AttackStart(Unit* pWho) override { if (m_creature->Attack(pWho, true)) { @@ -244,7 +244,7 @@ struct MANGOS_DLL_DECL boss_felblood_kaelthasAI : public ScriptedAI, private Dia } } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { if (pSummoned->GetEntry() == NPC_FLAME_STRIKE_TRIGGER) pSummoned->CastSpell(pSummoned, SPELL_FLAME_STRIKE_DUMMY, false, NULL, NULL, m_creature->GetObjectGuid()); @@ -261,7 +261,7 @@ struct MANGOS_DLL_DECL boss_felblood_kaelthasAI : public ScriptedAI, private Dia } } - void SpellHitTarget(Unit* pTarget, const SpellEntry* pSpell) + void SpellHitTarget(Unit* pTarget, const SpellEntry* pSpell) override { // Handle Gravity Lapse on targets if (pSpell->Id == SPELL_GRAVITY_LAPSE && pTarget->GetTypeId() == TYPEID_PLAYER) @@ -291,7 +291,7 @@ struct MANGOS_DLL_DECL boss_felblood_kaelthasAI : public ScriptedAI, private Dia } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { DialogueUpdate(uiDiff); @@ -445,18 +445,18 @@ struct MANGOS_DLL_DECL mob_felkael_phoenixAI : public ScriptedAI bool m_bFakeDeath; - void Reset() + void Reset() override { m_uiBurnTimer = 2000; m_bFakeDeath = false; } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoCastSpellIfCan(m_creature, SPELL_PHOENIX_BURN); } - void EnterEvadeMode() + void EnterEvadeMode() override { // Don't evade during ember blast if (m_bFakeDeath) @@ -465,7 +465,7 @@ struct MANGOS_DLL_DECL mob_felkael_phoenixAI : public ScriptedAI ScriptedAI::EnterEvadeMode(); } - void DamageTaken(Unit* pKiller, uint32& uiDamage) + void DamageTaken(Unit* pKiller, uint32& uiDamage) override { if (uiDamage < m_creature->GetHealth()) return; @@ -505,7 +505,7 @@ struct MANGOS_DLL_DECL mob_felkael_phoenixAI : public ScriptedAI m_creature->SummonCreature(NPC_PHOENIX_EGG, 0, 0, 0, 0, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 10000); } - void SummonedCreatureDespawn(Creature* pSummoned) + void SummonedCreatureDespawn(Creature* pSummoned) override { m_creature->RemoveAurasDueToSpell(SPELL_EMBER_BLAST); m_creature->SetStandState(UNIT_STAND_STATE_STAND); @@ -523,14 +523,14 @@ struct MANGOS_DLL_DECL mob_felkael_phoenixAI : public ScriptedAI } } - void SummonedCreatureJustDied(Creature* pSummoned) + void SummonedCreatureJustDied(Creature* pSummoned) override { // Self kill if the egg is killed if (m_bFakeDeath) m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -566,10 +566,10 @@ struct MANGOS_DLL_DECL mob_felkael_phoenix_eggAI : public Scripted_NoMovementAI { mob_felkael_phoenix_eggAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { Reset(); } - void Reset() {} - void MoveInLineOfSight(Unit* pWho) {} - void AttackStart(Unit* pWho) {} - void UpdateAI(const uint32 uiDiff) {} + void Reset() override {} + void MoveInLineOfSight(Unit* pWho) override {} + void AttackStart(Unit* pWho) override {} + void UpdateAI(const uint32 uiDiff) override {} }; /*###### @@ -589,7 +589,7 @@ struct MANGOS_DLL_DECL mob_arcane_sphereAI : public ScriptedAI uint32 m_uiDespawnTimer; uint32 m_uiChangeTargetTimer; - void Reset() + void Reset() override { m_uiDespawnTimer = 30000; m_uiChangeTargetTimer = urand(6000, 12000); @@ -597,10 +597,10 @@ struct MANGOS_DLL_DECL mob_arcane_sphereAI : public ScriptedAI DoCastSpellIfCan(m_creature, SPELL_ARCANE_SPHERE_PASSIVE); } - void AttackStart(Unit* pWho) { } - void MoveInLineOfSight(Unit* pWho) { } + void AttackStart(Unit* pWho) override { } + void MoveInLineOfSight(Unit* pWho) override { } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { // Should despawn when aura 44251 expires if (m_uiDespawnTimer < uiDiff) diff --git a/scripts/eastern_kingdoms/magisters_terrace/boss_priestess_delrissa.cpp b/scripts/eastern_kingdoms/magisters_terrace/boss_priestess_delrissa.cpp index d960714ba..97957ece6 100644 --- a/scripts/eastern_kingdoms/magisters_terrace/boss_priestess_delrissa.cpp +++ b/scripts/eastern_kingdoms/magisters_terrace/boss_priestess_delrissa.cpp @@ -82,7 +82,7 @@ struct MANGOS_DLL_DECL boss_priestess_delrissaAI : public ScriptedAI uint32 m_uiMedallionTimer; uint8 m_uiPlayersKilled; - void Reset() + void Reset() override { m_uiHealTimer = 15000; m_uiRenewTimer = 10000; @@ -96,13 +96,13 @@ struct MANGOS_DLL_DECL boss_priestess_delrissaAI : public ScriptedAI DoInitializeCompanions(); } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_DELRISSA, FAIL); } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { if (pWho->GetTypeId() != TYPEID_PLAYER) return; @@ -153,7 +153,7 @@ struct MANGOS_DLL_DECL boss_priestess_delrissaAI : public ScriptedAI } } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { if (pVictim->GetTypeId() != TYPEID_PLAYER) return; @@ -166,7 +166,7 @@ struct MANGOS_DLL_DECL boss_priestess_delrissaAI : public ScriptedAI m_uiPlayersKilled = 0; } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoScriptText(SAY_DEATH, m_creature); @@ -180,7 +180,7 @@ struct MANGOS_DLL_DECL boss_priestess_delrissaAI : public ScriptedAI m_creature->RemoveFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -297,7 +297,7 @@ struct MANGOS_DLL_DECL priestess_companion_commonAI : public ScriptedAI uint32 m_uiMedallionTimer; bool m_bUsedPotion; - void Reset() + void Reset() override { m_bUsedPotion = false; @@ -309,7 +309,7 @@ struct MANGOS_DLL_DECL priestess_companion_commonAI : public ScriptedAI m_uiMedallionTimer = urand(1000, 2000); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { if (!m_pInstance) return; @@ -321,7 +321,7 @@ struct MANGOS_DLL_DECL priestess_companion_commonAI : public ScriptedAI // Return true to handle shared timers and MeleeAttack virtual bool UpdateCompanionAI(const uint32 uiDiff) { return true; } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { // Return since we have no target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) @@ -395,7 +395,7 @@ struct MANGOS_DLL_DECL npc_kagani_nightstrikeAI : public priestess_companion_com uint32 m_uiEviscerateTimer; uint32 m_uiVanishEndTimer; - void Reset() + void Reset() override { m_uiGougeTimer = 5500; m_uiKickTimer = 7000; @@ -406,7 +406,7 @@ struct MANGOS_DLL_DECL npc_kagani_nightstrikeAI : public priestess_companion_com priestess_companion_commonAI::Reset(); } - void EnterEvadeMode() + void EnterEvadeMode() override { if (m_uiVanishEndTimer) return; @@ -512,7 +512,7 @@ struct MANGOS_DLL_DECL npc_ellris_duskhallowAI : public priestess_companion_comm uint32 m_uiFearTimer; uint32 m_uiDeathCoilTimer; - void Reset() + void Reset() override { m_uiImmolateTimer = 6000; m_uiShadowBoltTimer = 3000; @@ -528,7 +528,7 @@ struct MANGOS_DLL_DECL npc_ellris_duskhallowAI : public priestess_companion_comm DoCastSpellIfCan(m_creature, SPELL_SUMMON_IMP); } - void AttackStart(Unit* pWho) + void AttackStart(Unit* pWho) override { if (m_creature->Attack(pWho, true)) { @@ -634,7 +634,7 @@ struct MANGOS_DLL_DECL npc_eramas_brightblazeAI : public priestess_companion_com uint32 m_uiKnockdownTimer; uint32 m_uiSnapKickTimer; - void Reset() + void Reset() override { m_uiKnockdownTimer = 6000; m_uiSnapKickTimer = 4500; @@ -703,7 +703,7 @@ struct MANGOS_DLL_DECL npc_yazzaiAI : public priestess_companion_commonAI uint32 m_uiFrostboltTimer; uint32 m_uiBlinkTimer; - void Reset() + void Reset() override { m_bHasIceBlocked = false; @@ -719,7 +719,7 @@ struct MANGOS_DLL_DECL npc_yazzaiAI : public priestess_companion_commonAI priestess_companion_commonAI::Reset(); } - void AttackStart(Unit* pWho) + void AttackStart(Unit* pWho) override { if (m_creature->Attack(pWho, true)) { @@ -839,7 +839,7 @@ struct MANGOS_DLL_DECL npc_warlord_salarisAI : public priestess_companion_common uint32 m_uiHamstringTimer; uint32 m_uiMortalStrikeTimer; - void Reset() + void Reset() override { m_uiInterceptStunTimer = 500; m_uiDisarmTimer = 6000; @@ -851,7 +851,7 @@ struct MANGOS_DLL_DECL npc_warlord_salarisAI : public priestess_companion_common priestess_companion_commonAI::Reset(); } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoCastSpellIfCan(m_creature, SPELL_BATTLE_SHOUT); } @@ -953,7 +953,7 @@ struct MANGOS_DLL_DECL npc_garaxxasAI : public priestess_companion_commonAI uint32 m_uiWingClipTimer; uint32 m_uiFreezingTrapTimer; - void Reset() + void Reset() override { m_uiAimedShotTimer = 6000; m_uiShootTimer = 2500; @@ -969,7 +969,7 @@ struct MANGOS_DLL_DECL npc_garaxxasAI : public priestess_companion_commonAI m_creature->SummonCreature(NPC_SLIVER, 0, 0, 0, 0, TEMPSUMMON_CORPSE_DESPAWN, 0); } - void AttackStart(Unit* pWho) + void AttackStart(Unit* pWho) override { if (m_creature->Attack(pWho, true)) { @@ -1083,7 +1083,7 @@ struct MANGOS_DLL_DECL npc_apokoAI : public priestess_companion_commonAI uint32 m_uiHealingWaveTimer; uint32 m_uiFrostShockTimer; - void Reset() + void Reset() override { m_uiTotemTimer = 0; m_uiWarStompTimer = 10000; @@ -1183,7 +1183,7 @@ struct MANGOS_DLL_DECL npc_zelfanAI : public priestess_companion_commonAI uint32 m_uiHighExplosiveSheepTimer; uint32 m_uiFelIronBombTimer; - void Reset() + void Reset() override { m_uiGoblinDragonGunTimer = 20000; m_uiRocketLaunchTimer = 7000; @@ -1194,7 +1194,7 @@ struct MANGOS_DLL_DECL npc_zelfanAI : public priestess_companion_commonAI priestess_companion_commonAI::Reset(); } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { if (m_creature->getVictim()) pSummoned->AI()->AttackStart(m_creature->getVictim()); diff --git a/scripts/eastern_kingdoms/magisters_terrace/boss_selin_fireheart.cpp b/scripts/eastern_kingdoms/magisters_terrace/boss_selin_fireheart.cpp index d58955300..acf477b47 100644 --- a/scripts/eastern_kingdoms/magisters_terrace/boss_selin_fireheart.cpp +++ b/scripts/eastern_kingdoms/magisters_terrace/boss_selin_fireheart.cpp @@ -73,7 +73,7 @@ struct MANGOS_DLL_DECL boss_selin_fireheartAI : public ScriptedAI ObjectGuid m_crystalGuid; - void Reset() + void Reset() override { m_uiDrainLifeTimer = urand(3000, 7000); m_uiDrainManaTimer = m_uiDrainLifeTimer + 5000; @@ -110,7 +110,7 @@ struct MANGOS_DLL_DECL boss_selin_fireheartAI : public ScriptedAI return false; } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoScriptText(SAY_AGGRO, m_creature); @@ -118,18 +118,18 @@ struct MANGOS_DLL_DECL boss_selin_fireheartAI : public ScriptedAI m_pInstance->SetData(TYPE_SELIN, IN_PROGRESS); } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_SELIN, FAIL); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { DoScriptText(urand(0, 1) ? SAY_KILL_1 : SAY_KILL_2, m_creature); } - void MovementInform(uint32 uiType, uint32 uiPointId) + void MovementInform(uint32 uiType, uint32 uiPointId) override { if (uiType != POINT_MOTION_TYPE || !uiPointId) return; @@ -152,7 +152,7 @@ struct MANGOS_DLL_DECL boss_selin_fireheartAI : public ScriptedAI } } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoScriptText(SAY_DEATH, m_creature); @@ -169,7 +169,7 @@ struct MANGOS_DLL_DECL boss_selin_fireheartAI : public ScriptedAI DoStartMovement(m_creature->getVictim()); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -259,15 +259,15 @@ struct MANGOS_DLL_DECL mob_fel_crystalAI : public ScriptedAI uint32 m_uiVisualTimer; - void Reset() + void Reset() override { m_uiVisualTimer = 1000; m_sWretchedGuids.clear(); } - void AttackStart(Unit* pWho) {} + void AttackStart(Unit* pWho) override {} - void MoveInLineOfSight(Unit* pWho) + void MoveInLineOfSight(Unit* pWho) override { // Cosmetic spell if (m_sWretchedGuids.find(pWho->GetObjectGuid()) == m_sWretchedGuids.end() && pWho->IsWithinDist(m_creature, 5.0f) && pWho->isAlive() && @@ -278,7 +278,7 @@ struct MANGOS_DLL_DECL mob_fel_crystalAI : public ScriptedAI } } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { if (ScriptedInstance* pInstance = (ScriptedInstance*)m_creature->GetInstanceData()) { @@ -293,7 +293,7 @@ struct MANGOS_DLL_DECL mob_fel_crystalAI : public ScriptedAI } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (m_uiVisualTimer) { diff --git a/scripts/eastern_kingdoms/magisters_terrace/boss_vexallus.cpp b/scripts/eastern_kingdoms/magisters_terrace/boss_vexallus.cpp index 4d4ea187f..d32bb9e66 100644 --- a/scripts/eastern_kingdoms/magisters_terrace/boss_vexallus.cpp +++ b/scripts/eastern_kingdoms/magisters_terrace/boss_vexallus.cpp @@ -74,7 +74,7 @@ struct MANGOS_DLL_DECL boss_vexallusAI : public ScriptedAI uint32 m_uiIntervalHealthAmount; bool m_bEnraged; - void Reset() + void Reset() override { m_uiChainLightningTimer = 8000; m_uiArcaneShockTimer = 5000; @@ -83,24 +83,24 @@ struct MANGOS_DLL_DECL boss_vexallusAI : public ScriptedAI m_bEnraged = false; } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { DoScriptText(SAY_KILL, m_creature); } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_VEXALLUS, FAIL); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { if (m_pInstance) m_pInstance->SetData(TYPE_VEXALLUS, DONE); } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoScriptText(SAY_AGGRO, m_creature); @@ -108,7 +108,7 @@ struct MANGOS_DLL_DECL boss_vexallusAI : public ScriptedAI m_pInstance->SetData(TYPE_VEXALLUS, IN_PROGRESS); } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) pSummoned->GetMotionMaster()->MoveFollow(pTarget, 0.0f, 0.0f); @@ -117,7 +117,7 @@ struct MANGOS_DLL_DECL boss_vexallusAI : public ScriptedAI pSummoned->CastSpell(pSummoned, SPELL_ENERGY_BOLT, true, NULL, NULL, m_creature->GetObjectGuid()); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -193,9 +193,9 @@ struct MANGOS_DLL_DECL mob_pure_energyAI : public ScriptedAI { mob_pure_energyAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} - void Reset() { } + void Reset() override { } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { if (m_creature->IsTemporarySummon()) { @@ -214,8 +214,8 @@ struct MANGOS_DLL_DECL mob_pure_energyAI : public ScriptedAI } } - void MoveInLineOfSight(Unit* pWho) { } - void AttackStart(Unit* pWho) { } + void MoveInLineOfSight(Unit* pWho) override { } + void AttackStart(Unit* pWho) override { } }; CreatureAI* GetAI_mob_pure_energy(Creature* pCreature) diff --git a/scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.cpp b/scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.cpp index f36a8f91a..5c276084f 100644 --- a/scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.cpp +++ b/scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.cpp @@ -49,7 +49,7 @@ struct MANGOS_DLL_DECL npc_kalecgosAI : public ScriptedAI uint32 m_uiTransformTimer; - void Reset() + void Reset() override { m_uiTransformTimer = 0; @@ -57,7 +57,7 @@ struct MANGOS_DLL_DECL npc_kalecgosAI : public ScriptedAI m_creature->GetMotionMaster()->MovePoint(1, afKaelLandPoint[0], afKaelLandPoint[1], afKaelLandPoint[2]); } - void MovementInform(uint32 uiType, uint32 uiPointId) + void MovementInform(uint32 uiType, uint32 uiPointId) override { if (uiType != POINT_MOTION_TYPE) return; @@ -70,7 +70,7 @@ struct MANGOS_DLL_DECL npc_kalecgosAI : public ScriptedAI } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (m_uiTransformTimer) { diff --git a/scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.h b/scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.h index 9bcefbffa..6cc74bdc6 100644 --- a/scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.h +++ b/scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.h @@ -49,18 +49,18 @@ class MANGOS_DLL_DECL instance_magisters_terrace : public ScriptedInstance public: instance_magisters_terrace(Map* pMap); - void Initialize(); + void Initialize() override; - void OnCreatureCreate(Creature* pCreature); - void OnObjectCreate(GameObject* pGo); + void OnCreatureCreate(Creature* pCreature) override; + void OnObjectCreate(GameObject* pGo) override; - void OnCreatureDeath(Creature* pCreature); + void OnCreatureDeath(Creature* pCreature) override; - uint32 GetData(uint32 uiType); - void SetData(uint32 uiType, uint32 uiData); + uint32 GetData(uint32 uiType) override; + void SetData(uint32 uiType, uint32 uiData) override; - const char* Save() { return m_strInstData.c_str(); } - void Load(const char* chrIn); + const char* Save() override { return m_strInstData.c_str(); } + void Load(const char* chrIn) override; private: uint32 m_auiEncounter[MAX_ENCOUNTER]; diff --git a/scripts/eastern_kingdoms/molten_core/boss_baron_geddon.cpp b/scripts/eastern_kingdoms/molten_core/boss_baron_geddon.cpp index 5e476b174..066fc531f 100644 --- a/scripts/eastern_kingdoms/molten_core/boss_baron_geddon.cpp +++ b/scripts/eastern_kingdoms/molten_core/boss_baron_geddon.cpp @@ -49,7 +49,7 @@ struct MANGOS_DLL_DECL boss_baron_geddonAI : public ScriptedAI uint32 m_uiIgniteManaTimer; uint32 m_uiLivingBombTimer; - void Reset() + void Reset() override { m_bIsArmageddon = false; m_uiInfernoTimer = 45000; @@ -57,25 +57,25 @@ struct MANGOS_DLL_DECL boss_baron_geddonAI : public ScriptedAI m_uiLivingBombTimer = 35000; } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { if (m_pInstance) m_pInstance->SetData(TYPE_GEDDON, IN_PROGRESS); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { if (m_pInstance) m_pInstance->SetData(TYPE_GEDDON, DONE); } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_GEDDON, NOT_STARTED); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/eastern_kingdoms/molten_core/boss_garr.cpp b/scripts/eastern_kingdoms/molten_core/boss_garr.cpp index 3a23c617c..81500aafe 100644 --- a/scripts/eastern_kingdoms/molten_core/boss_garr.cpp +++ b/scripts/eastern_kingdoms/molten_core/boss_garr.cpp @@ -51,31 +51,31 @@ struct MANGOS_DLL_DECL boss_garrAI : public ScriptedAI uint32 m_uiAntiMagicPulseTimer; uint32 m_uiMagmaShacklesTimer; - void Reset() + void Reset() override { m_uiAntiMagicPulseTimer = 25000; m_uiMagmaShacklesTimer = 15000; } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { if (m_pInstance) m_pInstance->SetData(TYPE_GARR, IN_PROGRESS); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { if (m_pInstance) m_pInstance->SetData(TYPE_GARR, DONE); } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_GARR, FAIL); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -115,13 +115,13 @@ struct MANGOS_DLL_DECL mob_fireswornAI : public ScriptedAI uint32 m_uiImmolateTimer; uint32 m_uiSeparationCheckTimer; - void Reset() + void Reset() override { m_uiImmolateTimer = urand(4000, 8000); // These times are probably wrong m_uiSeparationCheckTimer = 5000; } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/eastern_kingdoms/molten_core/boss_gehennas.cpp b/scripts/eastern_kingdoms/molten_core/boss_gehennas.cpp index 25aa81b2b..60acd5ce5 100644 --- a/scripts/eastern_kingdoms/molten_core/boss_gehennas.cpp +++ b/scripts/eastern_kingdoms/molten_core/boss_gehennas.cpp @@ -45,32 +45,32 @@ struct MANGOS_DLL_DECL boss_gehennasAI : public ScriptedAI uint32 m_uiRainOfFireTimer; uint32 m_uiGehennasCurseTimer; - void Reset() + void Reset() override { m_uiShadowBoltTimer = 6000; m_uiRainOfFireTimer = 10000; m_uiGehennasCurseTimer = 12000; } - void Aggro(Unit* pwho) + void Aggro(Unit* pwho) override { if (m_pInstance) m_pInstance->SetData(TYPE_GEHENNAS, IN_PROGRESS); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { if (m_pInstance) m_pInstance->SetData(TYPE_GEHENNAS, DONE); } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_GEHENNAS, FAIL); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/eastern_kingdoms/molten_core/boss_golemagg.cpp b/scripts/eastern_kingdoms/molten_core/boss_golemagg.cpp index 1a2ebe823..aba2ac2a4 100644 --- a/scripts/eastern_kingdoms/molten_core/boss_golemagg.cpp +++ b/scripts/eastern_kingdoms/molten_core/boss_golemagg.cpp @@ -52,7 +52,7 @@ struct MANGOS_DLL_DECL boss_golemaggAI : public ScriptedAI uint32 m_uiBuffTimer; bool m_bEnraged; - void Reset() + void Reset() override { m_uiPyroblastTimer = 7 * IN_MILLISECONDS; m_uiEarthquakeTimer = 3 * IN_MILLISECONDS; @@ -62,25 +62,25 @@ struct MANGOS_DLL_DECL boss_golemaggAI : public ScriptedAI m_creature->CastSpell(m_creature, SPELL_MAGMA_SPLASH, true); } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { if (m_pInstance) m_pInstance->SetData(TYPE_GOLEMAGG, IN_PROGRESS); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { if (m_pInstance) m_pInstance->SetData(TYPE_GOLEMAGG, DONE); } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_GOLEMAGG, FAIL); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -140,12 +140,12 @@ struct MANGOS_DLL_DECL mob_core_ragerAI : public ScriptedAI ScriptedInstance* m_pInstance; uint32 m_uiMangleTimer; - void Reset() + void Reset() override { m_uiMangleTimer = 7 * IN_MILLISECONDS; // These times are probably wrong } - void DamageTaken(Unit* pDoneBy, uint32& uiDamage) + void DamageTaken(Unit* pDoneBy, uint32& uiDamage) override { if (m_creature->GetHealthPercent() < 50.0f) { @@ -158,7 +158,7 @@ struct MANGOS_DLL_DECL mob_core_ragerAI : public ScriptedAI } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/eastern_kingdoms/molten_core/boss_lucifron.cpp b/scripts/eastern_kingdoms/molten_core/boss_lucifron.cpp index 2f9322bc9..17763c627 100644 --- a/scripts/eastern_kingdoms/molten_core/boss_lucifron.cpp +++ b/scripts/eastern_kingdoms/molten_core/boss_lucifron.cpp @@ -45,32 +45,32 @@ struct MANGOS_DLL_DECL boss_lucifronAI : public ScriptedAI uint32 m_uiLucifronCurseTimer; uint32 m_uiShadowShockTimer; - void Reset() + void Reset() override { m_uiImpendingDoomTimer = 10000; m_uiLucifronCurseTimer = 20000; m_uiShadowShockTimer = 6000; } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { if (m_pInstance) m_pInstance->SetData(TYPE_LUCIFRON, IN_PROGRESS); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { if (m_pInstance) m_pInstance->SetData(TYPE_LUCIFRON, DONE); } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_LUCIFRON, FAIL); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/eastern_kingdoms/molten_core/boss_magmadar.cpp b/scripts/eastern_kingdoms/molten_core/boss_magmadar.cpp index 629bd394c..53b0f9204 100644 --- a/scripts/eastern_kingdoms/molten_core/boss_magmadar.cpp +++ b/scripts/eastern_kingdoms/molten_core/boss_magmadar.cpp @@ -49,14 +49,14 @@ struct MANGOS_DLL_DECL boss_magmadarAI : public ScriptedAI uint32 m_uiPanicTimer; uint32 m_uiLavabombTimer; - void Reset() + void Reset() override { m_uiFrenzyTimer = 30000; m_uiPanicTimer = 7000; m_uiLavabombTimer = 12000; } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoCastSpellIfCan(m_creature, SPELL_MAGMASPIT, true); @@ -64,19 +64,19 @@ struct MANGOS_DLL_DECL boss_magmadarAI : public ScriptedAI m_pInstance->SetData(TYPE_MAGMADAR, IN_PROGRESS); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { if (m_pInstance) m_pInstance->SetData(TYPE_MAGMADAR, DONE); } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_MAGMADAR, NOT_STARTED); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/eastern_kingdoms/molten_core/boss_majordomo_executus.cpp b/scripts/eastern_kingdoms/molten_core/boss_majordomo_executus.cpp index 3bb16c2a5..3b8600795 100644 --- a/scripts/eastern_kingdoms/molten_core/boss_majordomo_executus.cpp +++ b/scripts/eastern_kingdoms/molten_core/boss_majordomo_executus.cpp @@ -87,7 +87,7 @@ struct MANGOS_DLL_DECL boss_majordomoAI : public ScriptedAI uint8 m_uiSpeech; GuidList m_luiMajordomoAddsGUIDs; - void Reset() + void Reset() override { m_uiMagicReflectionTimer = 30000; // Damage reflection first so we alternate m_uiDamageReflectionTimer = 15000; @@ -100,7 +100,7 @@ struct MANGOS_DLL_DECL boss_majordomoAI : public ScriptedAI m_uiSpeech = 0; } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { if (urand(0, 4)) return; @@ -108,7 +108,7 @@ struct MANGOS_DLL_DECL boss_majordomoAI : public ScriptedAI DoScriptText(SAY_SLAY, m_creature); } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { if (pWho->GetTypeId() == TYPEID_UNIT && pWho->GetEntry() == NPC_RAGNAROS) return; @@ -119,7 +119,7 @@ struct MANGOS_DLL_DECL boss_majordomoAI : public ScriptedAI m_pInstance->SetData(TYPE_MAJORDOMO, IN_PROGRESS); } - void JustReachedHome() + void JustReachedHome() override { if (!m_bHasEncounterFinished) // Normal reached home, FAIL { @@ -163,7 +163,7 @@ struct MANGOS_DLL_DECL boss_majordomoAI : public ScriptedAI m_uiSpeech = 10; } - void JustRespawned() + void JustRespawned() override { // Encounter finished, need special treatment if (m_bHasEncounterFinished) @@ -178,7 +178,7 @@ struct MANGOS_DLL_DECL boss_majordomoAI : public ScriptedAI } } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { if (pSummoned->GetEntry() == NPC_FLAMEWAKER_HEALER || pSummoned->GetEntry() == NPC_FLAMEWAKER_ELITE) { @@ -192,13 +192,13 @@ struct MANGOS_DLL_DECL boss_majordomoAI : public ScriptedAI } } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { if (pKiller->GetTypeId() == TYPEID_UNIT && pKiller->GetEntry() == NPC_RAGNAROS) DoScriptText(SAY_ARRIVAL4_MAJ, m_creature); } - void CorpseRemoved(uint32& uiRespawnDelay) + void CorpseRemoved(uint32& uiRespawnDelay) override { uiRespawnDelay = urand(2 * HOUR, 3 * HOUR); @@ -210,7 +210,7 @@ struct MANGOS_DLL_DECL boss_majordomoAI : public ScriptedAI } } - void SummonedCreatureJustDied(Creature* pSummoned) + void SummonedCreatureJustDied(Creature* pSummoned) override { if (pSummoned->GetEntry() == NPC_FLAMEWAKER_HEALER || pSummoned->GetEntry() == NPC_FLAMEWAKER_ELITE) { @@ -242,7 +242,7 @@ struct MANGOS_DLL_DECL boss_majordomoAI : public ScriptedAI m_luiMajordomoAddsGUIDs.clear(); } - void DamageTaken(Unit* pDealer, uint32& uiDamage) + void DamageTaken(Unit* pDealer, uint32& uiDamage) override { if (uiDamage > m_creature->GetHealth()) { @@ -251,7 +251,7 @@ struct MANGOS_DLL_DECL boss_majordomoAI : public ScriptedAI } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { // Handling of his combat-end speech and Ragnaros summoning if (m_uiSpeech) diff --git a/scripts/eastern_kingdoms/molten_core/boss_ragnaros.cpp b/scripts/eastern_kingdoms/molten_core/boss_ragnaros.cpp index 37702ff81..b3f120949 100644 --- a/scripts/eastern_kingdoms/molten_core/boss_ragnaros.cpp +++ b/scripts/eastern_kingdoms/molten_core/boss_ragnaros.cpp @@ -80,7 +80,7 @@ struct MANGOS_DLL_DECL boss_ragnarosAI : public Scripted_NoMovementAI bool m_bHasSubmergedOnce; bool m_bIsSubmerged; - void Reset() + void Reset() override { m_uiWrathOfRagnarosTimer = 30000; // TODO Research more, according to wowwiki 25s, but timers up to 34s confirmed m_uiHammerTimer = 11000; // TODO wowwiki states 20-30s timer, but ~11s confirmed @@ -95,7 +95,7 @@ struct MANGOS_DLL_DECL boss_ragnarosAI : public Scripted_NoMovementAI m_bIsSubmerged = false; } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { if (pVictim->GetTypeId() != TYPEID_PLAYER) return; @@ -106,13 +106,13 @@ struct MANGOS_DLL_DECL boss_ragnarosAI : public Scripted_NoMovementAI DoScriptText(SAY_KILL, m_creature); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { if (m_pInstance) m_pInstance->SetData(TYPE_RAGNAROS, DONE); } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { if (pWho->GetTypeId() == TYPEID_UNIT && pWho->GetEntry() == NPC_MAJORDOMO) return; @@ -123,7 +123,7 @@ struct MANGOS_DLL_DECL boss_ragnarosAI : public Scripted_NoMovementAI m_pInstance->SetData(TYPE_RAGNAROS, IN_PROGRESS); } - void EnterEvadeMode() + void EnterEvadeMode() override { if (m_pInstance) m_pInstance->SetData(TYPE_RAGNAROS, FAIL); @@ -135,7 +135,7 @@ struct MANGOS_DLL_DECL boss_ragnarosAI : public Scripted_NoMovementAI ScriptedAI::EnterEvadeMode(); } - void SummonedCreatureJustDied(Creature* pSummmoned) + void SummonedCreatureJustDied(Creature* pSummmoned) override { // If all Sons of Flame are dead, trigger emerge if (pSummmoned->GetEntry() == NPC_SON_OF_FLAME) @@ -148,7 +148,7 @@ struct MANGOS_DLL_DECL boss_ragnarosAI : public Scripted_NoMovementAI } } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { if (pSummoned->GetEntry() == NPC_SON_OF_FLAME) { @@ -161,14 +161,14 @@ struct MANGOS_DLL_DECL boss_ragnarosAI : public Scripted_NoMovementAI pSummoned->CastSpell(pSummoned, SPELL_INTENSE_HEAT, true, NULL, NULL, m_creature->GetObjectGuid()); } - void SpellHitTarget(Unit* pTarget, const SpellEntry* pSpell) + void SpellHitTarget(Unit* pTarget, const SpellEntry* pSpell) override { // As Majordomo is now killed, the last timer (until attacking) must be handled with ragnaros script if (pSpell->Id == SPELL_ELEMENTAL_FIRE_KILL && pTarget->GetTypeId() == TYPEID_UNIT && pTarget->GetEntry() == NPC_MAJORDOMO) m_uiEnterCombatTimer = 10000; } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (m_uiEnterCombatTimer) { diff --git a/scripts/eastern_kingdoms/molten_core/boss_shazzrah.cpp b/scripts/eastern_kingdoms/molten_core/boss_shazzrah.cpp index 3429bbf17..07b094e18 100644 --- a/scripts/eastern_kingdoms/molten_core/boss_shazzrah.cpp +++ b/scripts/eastern_kingdoms/molten_core/boss_shazzrah.cpp @@ -49,7 +49,7 @@ struct MANGOS_DLL_DECL boss_shazzrahAI : public ScriptedAI uint32 m_uiCounterspellTimer; uint32 m_uiBlinkTimer; - void Reset() + void Reset() override { m_uiArcaneExplosionTimer = 6000; m_uiShazzrahCurseTimer = 10000; @@ -58,25 +58,25 @@ struct MANGOS_DLL_DECL boss_shazzrahAI : public ScriptedAI m_uiBlinkTimer = 30000; } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { if (m_pInstance) m_pInstance->SetData(TYPE_SHAZZRAH, IN_PROGRESS); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { if (m_pInstance) m_pInstance->SetData(TYPE_SHAZZRAH, DONE); } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_SHAZZRAH, NOT_STARTED); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/eastern_kingdoms/molten_core/boss_sulfuron_harbinger.cpp b/scripts/eastern_kingdoms/molten_core/boss_sulfuron_harbinger.cpp index 737e73b64..ed91ca5c7 100644 --- a/scripts/eastern_kingdoms/molten_core/boss_sulfuron_harbinger.cpp +++ b/scripts/eastern_kingdoms/molten_core/boss_sulfuron_harbinger.cpp @@ -54,7 +54,7 @@ struct MANGOS_DLL_DECL boss_sulfuronAI : public ScriptedAI uint32 m_uiKnockdownTimer; uint32 m_uiFlamespearTimer; - void Reset() + void Reset() override { m_uiDarkstrikeTimer = 10000; m_uiDemoralizingShoutTimer = 15000; @@ -63,25 +63,25 @@ struct MANGOS_DLL_DECL boss_sulfuronAI : public ScriptedAI m_uiFlamespearTimer = 2000; } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { if (m_pInstance) m_pInstance->SetData(TYPE_SULFURON, IN_PROGRESS); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { if (m_pInstance) m_pInstance->SetData(TYPE_SULFURON, DONE); } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_SULFURON, FAIL); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -164,14 +164,14 @@ struct MANGOS_DLL_DECL mob_flamewaker_priestAI : public ScriptedAI ScriptedInstance* m_pInstance; - void Reset() + void Reset() override { m_uiHealTimer = urand(15000, 30000); m_uiShadowWordPainTimer = 2000; m_uiImmolateTimer = 8000; } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/eastern_kingdoms/molten_core/molten_core.h b/scripts/eastern_kingdoms/molten_core/molten_core.h index cc63956f2..4816bbf34 100644 --- a/scripts/eastern_kingdoms/molten_core/molten_core.h +++ b/scripts/eastern_kingdoms/molten_core/molten_core.h @@ -87,18 +87,18 @@ class MANGOS_DLL_DECL instance_molten_core : public ScriptedInstance instance_molten_core(Map* pMap); ~instance_molten_core() {} - void Initialize(); - bool IsEncounterInProgress() const; + void Initialize() override; + bool IsEncounterInProgress() const override; - void OnCreatureCreate(Creature* pCreature); - void OnObjectCreate(GameObject* pGo); - void OnPlayerEnter(Player* pPlayer); + void OnCreatureCreate(Creature* pCreature) override; + void OnObjectCreate(GameObject* pGo) override; + void OnPlayerEnter(Player* pPlayer) override; - void SetData(uint32 uiType, uint32 uiData); - uint32 GetData(uint32 uiType); + void SetData(uint32 uiType, uint32 uiData) override; + uint32 GetData(uint32 uiType) override; - const char* Save() { return m_strInstData.c_str(); } - void Load(const char* chrIn); + const char* Save() override { return m_strInstData.c_str(); } + void Load(const char* chrIn) override; protected: void DoSpawnMajordomoIfCan(bool bByPlayerEnter); diff --git a/scripts/eastern_kingdoms/redridge_mountains.cpp b/scripts/eastern_kingdoms/redridge_mountains.cpp index 4d24f74a6..fb28d5c2c 100644 --- a/scripts/eastern_kingdoms/redridge_mountains.cpp +++ b/scripts/eastern_kingdoms/redridge_mountains.cpp @@ -52,13 +52,13 @@ struct MANGOS_DLL_DECL npc_corporal_keeshan_escortAI : public npc_escortAI uint32 m_uiMockingBlowTimer; uint32 m_uiShieldBashTimer; - void Reset() + void Reset() override { m_uiMockingBlowTimer = 5000; m_uiShieldBashTimer = 8000; } - void WaypointStart(uint32 uiWP) + void WaypointStart(uint32 uiWP) override { switch (uiWP) { @@ -72,7 +72,7 @@ struct MANGOS_DLL_DECL npc_corporal_keeshan_escortAI : public npc_escortAI } } - void WaypointReached(uint32 uiWP) + void WaypointReached(uint32 uiWP) override { switch (uiWP) { @@ -88,7 +88,7 @@ struct MANGOS_DLL_DECL npc_corporal_keeshan_escortAI : public npc_escortAI } } - void UpdateEscortAI(const uint32 uiDiff) + void UpdateEscortAI(const uint32 uiDiff) override { // Combat check if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) diff --git a/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp b/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp index 873bc20d8..ff600d5a5 100644 --- a/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp +++ b/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp @@ -104,7 +104,7 @@ struct MANGOS_DLL_DECL npc_a_special_surpriseAI : public ScriptedAI uint32 m_uiExecuteSpeech_Counter; ObjectGuid m_playerGuid; - void Reset() + void Reset() override { m_uiExecuteSpeech_Timer = 0; m_uiExecuteSpeech_Counter = 0; @@ -160,7 +160,7 @@ struct MANGOS_DLL_DECL npc_a_special_surpriseAI : public ScriptedAI return false; } - void MoveInLineOfSight(Unit* pWho) + void MoveInLineOfSight(Unit* pWho) override { if (m_playerGuid || pWho->GetTypeId() != TYPEID_PLAYER || !pWho->IsWithinDist(m_creature, INTERACTION_DISTANCE)) return; @@ -169,7 +169,7 @@ struct MANGOS_DLL_DECL npc_a_special_surpriseAI : public ScriptedAI m_playerGuid = pWho->GetObjectGuid(); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (m_playerGuid && !m_creature->getVictim() && m_creature->isAlive()) { @@ -527,7 +527,7 @@ struct MANGOS_DLL_DECL npc_death_knight_initiateAI : public ScriptedAI uint32 m_uiDuelTimer; bool m_bIsDuelInProgress; - void Reset() + void Reset() override { if (m_creature->getFaction() != m_creature->GetCreatureInfo()->faction_A) m_creature->setFaction(m_creature->GetCreatureInfo()->faction_A); @@ -539,7 +539,7 @@ struct MANGOS_DLL_DECL npc_death_knight_initiateAI : public ScriptedAI m_bIsDuelInProgress = false; } - void AttackedBy(Unit* pAttacker) + void AttackedBy(Unit* pAttacker) override { if (m_creature->getVictim()) return; @@ -550,7 +550,7 @@ struct MANGOS_DLL_DECL npc_death_knight_initiateAI : public ScriptedAI AttackStart(pAttacker); } - void SpellHit(Unit* pCaster, const SpellEntry* pSpell) + void SpellHit(Unit* pCaster, const SpellEntry* pSpell) override { if (!m_bIsDuelInProgress && pSpell->Id == SPELL_DUEL_TRIGGERED && pCaster->GetTypeId() == TYPEID_PLAYER) { @@ -559,7 +559,7 @@ struct MANGOS_DLL_DECL npc_death_knight_initiateAI : public ScriptedAI } } - void DamageTaken(Unit* pDoneBy, uint32& uiDamage) + void DamageTaken(Unit* pDoneBy, uint32& uiDamage) override { if (m_bIsDuelInProgress && uiDamage > m_creature->GetHealth()) { @@ -573,7 +573,7 @@ struct MANGOS_DLL_DECL npc_death_knight_initiateAI : public ScriptedAI } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) { @@ -675,7 +675,7 @@ struct MANGOS_DLL_DECL npc_koltira_deathweaverAI : public npc_escortAI uint32 m_uiWave_Timer; ObjectGuid m_valrothGuid; - void Reset() + void Reset() override { if (!HasEscortState(STATE_ESCORT_ESCORTING)) { @@ -685,7 +685,7 @@ struct MANGOS_DLL_DECL npc_koltira_deathweaverAI : public npc_escortAI } } - void WaypointReached(uint32 uiPointId) + void WaypointReached(uint32 uiPointId) override { switch (uiPointId) { @@ -718,7 +718,7 @@ struct MANGOS_DLL_DECL npc_koltira_deathweaverAI : public npc_escortAI } } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { if (Player* pPlayer = GetPlayerForEscort()) pSummoned->AI()->AttackStart(pPlayer); @@ -733,7 +733,7 @@ struct MANGOS_DLL_DECL npc_koltira_deathweaverAI : public npc_escortAI m_creature->SummonCreature(NPC_CRIMSON_ACOLYTE, 1642.329f, -6045.818f, 127.583f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); } - void UpdateEscortAI(const uint32 uiDiff) + void UpdateEscortAI(const uint32 uiDiff) override { if (HasEscortState(STATE_ESCORT_PAUSED)) { @@ -857,7 +857,7 @@ struct MANGOS_DLL_DECL npc_unworthy_initiate_anchorAI : public ScriptedAI ObjectGuid m_myInitiateGuid; ObjectGuid m_myPrisonGuid; - void Reset() {} + void Reset() override {} void NotifyMe(Unit* pSource, GameObject* pGo) { @@ -910,7 +910,7 @@ struct MANGOS_DLL_DECL npc_unworthy_initiateAI : public ScriptedAI uint32 m_uiIcyTouch_Timer; uint32 m_uiPlagueStrike_Timer; - void Reset() + void Reset() override { if (m_creature->getFaction() != m_uiNormFaction) m_creature->setFaction(m_uiNormFaction); @@ -924,7 +924,7 @@ struct MANGOS_DLL_DECL npc_unworthy_initiateAI : public ScriptedAI m_uiPlagueStrike_Timer = 5000; } - void JustReachedHome() + void JustReachedHome() override { SetAnchor(); @@ -935,7 +935,7 @@ struct MANGOS_DLL_DECL npc_unworthy_initiateAI : public ScriptedAI } } - void JustRespawned() + void JustRespawned() override { if (Creature* pAnchor = GetAnchor()) { @@ -976,7 +976,7 @@ struct MANGOS_DLL_DECL npc_unworthy_initiateAI : public ScriptedAI m_uiAnchorCheckTimer = 5000; } - void SpellHit(Unit* pCaster, const SpellEntry* pSpell) + void SpellHit(Unit* pCaster, const SpellEntry* pSpell) override { if (pSpell->Id == SPELL_CHAINED_PESANT_BREATH) { @@ -990,7 +990,7 @@ struct MANGOS_DLL_DECL npc_unworthy_initiateAI : public ScriptedAI } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (m_uiAnchorCheckTimer) { diff --git a/scripts/eastern_kingdoms/scarlet_monastery/boss_arcanist_doan.cpp b/scripts/eastern_kingdoms/scarlet_monastery/boss_arcanist_doan.cpp index df052f9c7..a4f278d94 100644 --- a/scripts/eastern_kingdoms/scarlet_monastery/boss_arcanist_doan.cpp +++ b/scripts/eastern_kingdoms/scarlet_monastery/boss_arcanist_doan.cpp @@ -45,7 +45,7 @@ struct MANGOS_DLL_DECL boss_arcanist_doanAI : public ScriptedAI uint32 m_uiDetonationTimer; bool bShielded; - void Reset() + void Reset() override { m_uiPolymorphTimer = 15000; m_uiSilenceTimer = 7500; @@ -54,12 +54,12 @@ struct MANGOS_DLL_DECL boss_arcanist_doanAI : public ScriptedAI bShielded = false; } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoScriptText(SAY_AGGRO, m_creature); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/eastern_kingdoms/scarlet_monastery/boss_headless_horseman.cpp b/scripts/eastern_kingdoms/scarlet_monastery/boss_headless_horseman.cpp index a44b98924..1bef4eeb3 100644 --- a/scripts/eastern_kingdoms/scarlet_monastery/boss_headless_horseman.cpp +++ b/scripts/eastern_kingdoms/scarlet_monastery/boss_headless_horseman.cpp @@ -46,26 +46,26 @@ struct MANGOS_DLL_DECL boss_headless_horsemanAI : public ScriptedAI { boss_headless_horsemanAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} - void Reset() + void Reset() override { } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { m_creature->SetInCombatWithZone(); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { DoScriptText(SAY_SLAY, m_creature); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoScriptText(SAY_DEATH, m_creature); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/eastern_kingdoms/scarlet_monastery/boss_herod.cpp b/scripts/eastern_kingdoms/scarlet_monastery/boss_herod.cpp index 9e8858aba..530e3a2f2 100644 --- a/scripts/eastern_kingdoms/scarlet_monastery/boss_herod.cpp +++ b/scripts/eastern_kingdoms/scarlet_monastery/boss_herod.cpp @@ -52,7 +52,7 @@ struct MANGOS_DLL_DECL boss_herodAI : public ScriptedAI uint32 m_uiCleaveTimer; uint32 m_uiWhirlwindTimer; - void Reset() + void Reset() override { m_bTraineeSay = false; m_bEnrage = false; @@ -61,7 +61,7 @@ struct MANGOS_DLL_DECL boss_herodAI : public ScriptedAI m_uiWhirlwindTimer = 14500; } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoScriptText(SAY_AGGRO, m_creature); DoCastSpellIfCan(m_creature, SPELL_RUSHINGCHARGE); @@ -77,18 +77,18 @@ struct MANGOS_DLL_DECL boss_herodAI : public ScriptedAI } } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { DoScriptText(SAY_KILL, m_creature); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { for (uint8 i = 0; i < 20; ++i) m_creature->SummonCreature(NPC_SCARLET_TRAINEE, 1939.18f, -431.58f, 17.09f, 6.22f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 600000); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -143,10 +143,10 @@ struct MANGOS_DLL_DECL mob_scarlet_traineeAI : public npc_escortAI uint32 m_uiStartTimer; - void Reset() { } - void WaypointReached(uint32 /*uiPointId*/) {} + void Reset() override { } + void WaypointReached(uint32 /*uiPointId*/) override {} - void UpdateEscortAI(const uint32 uiDiff) + void UpdateEscortAI(const uint32 uiDiff) override { if (m_uiStartTimer) { diff --git a/scripts/eastern_kingdoms/scarlet_monastery/boss_mograine_and_whitemane.cpp b/scripts/eastern_kingdoms/scarlet_monastery/boss_mograine_and_whitemane.cpp index dbde8d1b6..921a2d1c7 100644 --- a/scripts/eastern_kingdoms/scarlet_monastery/boss_mograine_and_whitemane.cpp +++ b/scripts/eastern_kingdoms/scarlet_monastery/boss_mograine_and_whitemane.cpp @@ -68,7 +68,7 @@ struct MANGOS_DLL_DECL boss_scarlet_commander_mograineAI : public ScriptedAI bool m_bHeal; bool m_bFakeDeath; - void Reset() + void Reset() override { m_uiCrusaderStrike_Timer = 8400; m_uiHammerOfJustice_Timer = 9600; @@ -92,7 +92,7 @@ struct MANGOS_DLL_DECL boss_scarlet_commander_mograineAI : public ScriptedAI } } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoScriptText(SAY_MO_AGGRO, m_creature); DoCastSpellIfCan(m_creature, SPELL_RETRIBUTIONAURA); @@ -100,12 +100,12 @@ struct MANGOS_DLL_DECL boss_scarlet_commander_mograineAI : public ScriptedAI m_creature->CallForHelp(VISIBLE_RANGE); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { DoScriptText(SAY_MO_KILL, m_creature); } - void DamageTaken(Unit* pDoneBy, uint32& uiDamage) + void DamageTaken(Unit* pDoneBy, uint32& uiDamage) override { if (uiDamage < m_creature->GetHealth() || m_bHasDied) return; @@ -142,7 +142,7 @@ struct MANGOS_DLL_DECL boss_scarlet_commander_mograineAI : public ScriptedAI } } - void SpellHit(Unit* pWho, const SpellEntry* pSpell) + void SpellHit(Unit* pWho, const SpellEntry* pSpell) override { // When hit with ressurection say text if (pSpell->Id == SPELL_SCARLETRESURRECTION) @@ -155,7 +155,7 @@ struct MANGOS_DLL_DECL boss_scarlet_commander_mograineAI : public ScriptedAI } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -221,7 +221,7 @@ struct MANGOS_DLL_DECL boss_high_inquisitor_whitemaneAI : public ScriptedAI bool m_bCanResurrectCheck; bool m_bCanResurrect; - void Reset() + void Reset() override { m_uiWait_Timer = 7000; m_uiHeal_Timer = 10000; @@ -241,7 +241,7 @@ struct MANGOS_DLL_DECL boss_high_inquisitor_whitemaneAI : public ScriptedAI } } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) { @@ -250,12 +250,12 @@ struct MANGOS_DLL_DECL boss_high_inquisitor_whitemaneAI : public ScriptedAI } } - void MoveInLineOfSight(Unit* pWho) + void MoveInLineOfSight(Unit* pWho) override { // This needs to be empty because Whitemane should NOT aggro while fighting Mograine. Mograine will give us a target. } - void DamageTaken(Unit* pDoneBy, uint32& uiDamage) + void DamageTaken(Unit* pDoneBy, uint32& uiDamage) override { if (uiDamage < m_creature->GetHealth()) return; @@ -267,7 +267,7 @@ struct MANGOS_DLL_DECL boss_high_inquisitor_whitemaneAI : public ScriptedAI } } - void AttackStart(Unit* pWho) + void AttackStart(Unit* pWho) override { if (m_pInstance && (m_pInstance->GetData(TYPE_MOGRAINE_AND_WHITE_EVENT) == NOT_STARTED || m_pInstance->GetData(TYPE_MOGRAINE_AND_WHITE_EVENT) == FAIL)) return; @@ -275,17 +275,17 @@ struct MANGOS_DLL_DECL boss_high_inquisitor_whitemaneAI : public ScriptedAI ScriptedAI::AttackStart(pWho); } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoScriptText(SAY_WH_INTRO, m_creature); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { DoScriptText(SAY_WH_KILL, m_creature); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/eastern_kingdoms/scarlet_monastery/scarlet_monastery.h b/scripts/eastern_kingdoms/scarlet_monastery/scarlet_monastery.h index f13806402..afe7f6478 100644 --- a/scripts/eastern_kingdoms/scarlet_monastery/scarlet_monastery.h +++ b/scripts/eastern_kingdoms/scarlet_monastery/scarlet_monastery.h @@ -26,14 +26,14 @@ class MANGOS_DLL_DECL instance_scarlet_monastery : public ScriptedInstance public: instance_scarlet_monastery(Map* pMap); - void Initialize(); + void Initialize() override; - void OnCreatureCreate(Creature* pCreature); - void OnCreatureDeath(Creature* pCreature); - void OnObjectCreate(GameObject* pGo); + void OnCreatureCreate(Creature* pCreature) override; + void OnCreatureDeath(Creature* pCreature) override; + void OnObjectCreate(GameObject* pGo) override; - void SetData(uint32 uiType, uint32 uiData); - uint32 GetData(uint32 uiData); + void SetData(uint32 uiType, uint32 uiData) override; + uint32 GetData(uint32 uiData) override; private: uint32 m_auiEncounter[MAX_ENCOUNTER]; diff --git a/scripts/eastern_kingdoms/scholomance/boss_darkmaster_gandling.cpp b/scripts/eastern_kingdoms/scholomance/boss_darkmaster_gandling.cpp index 65ba208cb..fc9c070e5 100644 --- a/scripts/eastern_kingdoms/scholomance/boss_darkmaster_gandling.cpp +++ b/scripts/eastern_kingdoms/scholomance/boss_darkmaster_gandling.cpp @@ -47,7 +47,7 @@ struct MANGOS_DLL_DECL boss_darkmaster_gandlingAI : public ScriptedAI uint32 m_uiCurseTimer; uint32 m_uiTeleportTimer; - void Reset() + void Reset() override { m_uiArcaneMissilesTimer = 4500; m_uiShadowShieldTimer = 12000; @@ -55,7 +55,7 @@ struct MANGOS_DLL_DECL boss_darkmaster_gandlingAI : public ScriptedAI m_uiTeleportTimer = 16000; } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/eastern_kingdoms/scholomance/boss_jandice_barov.cpp b/scripts/eastern_kingdoms/scholomance/boss_jandice_barov.cpp index 4fb2e8cf6..d6023149f 100644 --- a/scripts/eastern_kingdoms/scholomance/boss_jandice_barov.cpp +++ b/scripts/eastern_kingdoms/scholomance/boss_jandice_barov.cpp @@ -38,14 +38,14 @@ struct MANGOS_DLL_DECL boss_jandicebarovAI : public ScriptedAI uint32 m_uiIllusionTimer; uint32 m_uiBanishTimer; - void Reset() + void Reset() override { m_uiCurseOfBloodTimer = 5000; m_uiIllusionTimer = 15000; m_uiBanishTimer = urand(9000, 13000); } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { pSummoned->ApplySpellImmune(0, IMMUNITY_DAMAGE, SPELL_SCHOOL_MASK_MAGIC, true); @@ -53,7 +53,7 @@ struct MANGOS_DLL_DECL boss_jandicebarovAI : public ScriptedAI pSummoned->AI()->AttackStart(pTarget); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { // Return since we have no target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) diff --git a/scripts/eastern_kingdoms/scholomance/scholomance.h b/scripts/eastern_kingdoms/scholomance/scholomance.h index 967d9f125..ee60f5bc9 100644 --- a/scripts/eastern_kingdoms/scholomance/scholomance.h +++ b/scripts/eastern_kingdoms/scholomance/scholomance.h @@ -84,23 +84,23 @@ class MANGOS_DLL_DECL instance_scholomance : public ScriptedInstance instance_scholomance(Map* pMap); ~instance_scholomance() {} - void Initialize(); + void Initialize() override; - void OnCreatureEnterCombat(Creature* pCreature); + void OnCreatureEnterCombat(Creature* pCreature) override; void OnCreatureEvade(Creature* pCreature); - void OnCreatureDeath(Creature* pCreature); + void OnCreatureDeath(Creature* pCreature) override; - void OnCreatureCreate(Creature* pCreature); - void OnObjectCreate(GameObject* pGo); - void OnPlayerEnter(Player* pPlayer); + void OnCreatureCreate(Creature* pCreature) override; + void OnObjectCreate(GameObject* pGo) override; + void OnPlayerEnter(Player* pPlayer) override; void HandlePortalEvent(uint32 uiEventId, uint32 uiData); - void SetData(uint32 uiType, uint32 uiData); - uint32 GetData(uint32 uiType); + void SetData(uint32 uiType, uint32 uiData) override; + uint32 GetData(uint32 uiType) override; - const char* Save() { return m_strInstData.c_str(); } - void Load(const char* chrIn); + const char* Save() override { return m_strInstData.c_str(); } + void Load(const char* chrIn) override; private: void DoSpawnGandlingIfCan(bool bByPlayerEnter); diff --git a/scripts/eastern_kingdoms/shadowfang_keep/boss_hummel.cpp b/scripts/eastern_kingdoms/shadowfang_keep/boss_hummel.cpp index 3361cd6a8..910215911 100644 --- a/scripts/eastern_kingdoms/shadowfang_keep/boss_hummel.cpp +++ b/scripts/eastern_kingdoms/shadowfang_keep/boss_hummel.cpp @@ -70,12 +70,12 @@ struct MANGOS_DLL_DECL npc_valentine_boss_managerAI : public ScriptedAI, private ObjectGuid m_EventStarterGuid; - void Reset() + void Reset() override { m_uiCrazedApothecaryTimer = 30000; } - void JustDidDialogueStep(int32 iEntry) + void JustDidDialogueStep(int32 iEntry) override { if (!m_pInstance) return; @@ -136,7 +136,7 @@ struct MANGOS_DLL_DECL npc_valentine_boss_managerAI : public ScriptedAI, private } } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { if (pSummoned->GetEntry() == NCP_CRAZED_APOTHECARY) { @@ -213,7 +213,7 @@ struct MANGOS_DLL_DECL npc_valentine_boss_managerAI : public ScriptedAI, private } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { DialogueUpdate(uiDiff); diff --git a/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.cpp b/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.cpp index 6d78c8a6a..19c7c9eb8 100644 --- a/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.cpp +++ b/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.cpp @@ -67,7 +67,7 @@ struct MANGOS_DLL_DECL npc_shadowfang_prisonerAI : public npc_escortAI ScriptedInstance* m_pInstance; uint32 m_uiNpcEntry; - void WaypointReached(uint32 uiPoint) + void WaypointReached(uint32 uiPoint) override { switch (uiPoint) { @@ -118,11 +118,11 @@ struct MANGOS_DLL_DECL npc_shadowfang_prisonerAI : public npc_escortAI } } - void Reset() {} + void Reset() override {} // Let's prevent Adamant from charging into Ashcrombe's cell // And beating the crap out of him and vice versa XD - void AttackStart(Unit* pWho) + void AttackStart(Unit* pWho) override { if (pWho) { @@ -214,7 +214,7 @@ struct MANGOS_DLL_DECL mob_arugal_voidwalkerAI : public ScriptedAI ScriptedInstance* m_pInstance; bool m_bIsLeader, m_bReverse, m_bWPDone; - void Reset() + void Reset() override { m_creature->SetWalk(true); m_uiDarkOffering = urand(4400, 12500); @@ -267,7 +267,7 @@ struct MANGOS_DLL_DECL mob_arugal_voidwalkerAI : public ScriptedAI } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (m_bIsLeader && m_bWPDone) { @@ -296,7 +296,7 @@ struct MANGOS_DLL_DECL mob_arugal_voidwalkerAI : public ScriptedAI DoMeleeAttackIfReady(); } - void MovementInform(uint32 uiMoveType, uint32 uiPointId) + void MovementInform(uint32 uiMoveType, uint32 uiPointId) override { if (uiMoveType != POINT_MOTION_TYPE || !m_bIsLeader) return; @@ -323,7 +323,7 @@ struct MANGOS_DLL_DECL mob_arugal_voidwalkerAI : public ScriptedAI SendWaypoint(); } - void JustDied(Unit* /*pKiller*/) + void JustDied(Unit* /*pKiller*/) override { if (m_pInstance) m_pInstance->SetData(TYPE_VOIDWALKER, DONE); @@ -369,7 +369,7 @@ struct MANGOS_DLL_DECL mob_arugal_voidwalkerAI : public ScriptedAI m_bReverse = bReverse; } - void EnterEvadeMode() + void EnterEvadeMode() override { m_creature->RemoveAllAuras(); m_creature->DeleteThreatList(); @@ -456,7 +456,7 @@ struct MANGOS_DLL_DECL boss_arugalAI : public ScriptedAI uint8 m_uiSpeechStep; bool m_bAttacking, m_bEventMode; - void Reset() + void Reset() override { m_uiTeleportTimer = urand(22000, 26000); m_uiCurseTimer = urand(20000, 30000); @@ -467,19 +467,19 @@ struct MANGOS_DLL_DECL boss_arugalAI : public ScriptedAI m_uiSpeechStep = 1; } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoScriptText(YELL_AGGRO, m_creature); DoCastSpellIfCan(pWho, SPELL_VOID_BOLT); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { if (pVictim->GetTypeId() == TYPEID_PLAYER) DoScriptText(YELL_KILLED_PLAYER, m_creature); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (m_bEventMode) { @@ -660,7 +660,7 @@ struct MANGOS_DLL_DECL boss_arugalAI : public ScriptedAI DoMeleeAttackIfReady(); } - void AttackStart(Unit* pWho) + void AttackStart(Unit* pWho) override { if (!m_bEventMode) ScriptedAI::AttackStart(pWho); @@ -734,7 +734,7 @@ struct MANGOS_DLL_DECL npc_arugalAI : public ScriptedAI uint8 m_uiSpeechStep; ScriptedInstance* m_pInstance; - void Reset() + void Reset() override { m_uiSpeechTimer = 0; m_uiSpeechStep = 0; @@ -745,7 +745,7 @@ struct MANGOS_DLL_DECL npc_arugalAI : public ScriptedAI m_uiSpeechStep = 1; } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_uiSpeechStep) return; @@ -820,7 +820,7 @@ struct MANGOS_DLL_DECL npc_arugalAI : public ScriptedAI m_uiSpeechTimer -= uiDiff; } - void AttackStart(Unit* /*who*/) { } + void AttackStart(Unit* /*who*/) override { } }; CreatureAI* GetAI_npc_arugal(Creature* pCreature) @@ -849,13 +849,13 @@ struct MANGOS_DLL_DECL npc_deathstalker_vincentAI : public ScriptedAI ScriptedInstance* m_pInstance; - void Reset() + void Reset() override { if (m_pInstance && m_pInstance->GetData(TYPE_INTRO) == DONE && !m_creature->GetByteValue(UNIT_FIELD_BYTES_1, 0)) m_creature->SetStandState(UNIT_STAND_STATE_DEAD); } - void DamageTaken(Unit* pDoneBy, uint32& uiDamage) + void DamageTaken(Unit* pDoneBy, uint32& uiDamage) override { if (pDoneBy) { @@ -875,7 +875,7 @@ struct MANGOS_DLL_DECL npc_deathstalker_vincentAI : public ScriptedAI } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (m_creature->isInCombat() && m_creature->getFaction() == FACTION_FRIENDLY) EnterEvadeMode(); @@ -883,7 +883,7 @@ struct MANGOS_DLL_DECL npc_deathstalker_vincentAI : public ScriptedAI ScriptedAI::UpdateAI(uiDiff); } - void EnterEvadeMode() + void EnterEvadeMode() override { m_creature->RemoveAllAuras(); m_creature->DeleteThreatList(); diff --git a/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.h b/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.h index 4c35dd5af..bc94829a9 100644 --- a/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.h +++ b/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.h @@ -51,20 +51,20 @@ class MANGOS_DLL_DECL instance_shadowfang_keep : public ScriptedInstance public: instance_shadowfang_keep(Map* pMap); - void Initialize(); + void Initialize() override; - void OnCreatureCreate(Creature* pCreature); - void OnObjectCreate(GameObject* pGo); + void OnCreatureCreate(Creature* pCreature) override; + void OnObjectCreate(GameObject* pGo) override; void DoSpeech(); - void OnCreatureDeath(Creature* pCreature); + void OnCreatureDeath(Creature* pCreature) override; void OnCreatureEvade(Creature* pCreature); - void SetData(uint32 uiType, uint32 uiData); - uint32 GetData(uint32 uiType); + void SetData(uint32 uiType, uint32 uiData) override; + uint32 GetData(uint32 uiType) override; - const char* Save() { return m_strInstData.c_str(); } - void Load(const char* chrIn); + const char* Save() override { return m_strInstData.c_str(); } + void Load(const char* chrIn) override; private: uint32 m_auiEncounter[MAX_ENCOUNTER]; diff --git a/scripts/eastern_kingdoms/silverpine_forest.cpp b/scripts/eastern_kingdoms/silverpine_forest.cpp index 02619f004..92b7f3876 100644 --- a/scripts/eastern_kingdoms/silverpine_forest.cpp +++ b/scripts/eastern_kingdoms/silverpine_forest.cpp @@ -58,7 +58,7 @@ struct MANGOS_DLL_DECL npc_deathstalker_erlandAI : public npc_escortAI { npc_deathstalker_erlandAI(Creature* pCreature) : npc_escortAI(pCreature) { Reset(); } - void WaypointReached(uint32 i) + void WaypointReached(uint32 i) override { Player* pPlayer = GetPlayerForEscort(); @@ -97,9 +97,9 @@ struct MANGOS_DLL_DECL npc_deathstalker_erlandAI : public npc_escortAI } } - void Reset() {} + void Reset() override {} - void Aggro(Unit* who) + void Aggro(Unit* who) override { switch (urand(0, 2)) { @@ -177,7 +177,7 @@ struct MANGOS_DLL_DECL npc_deathstalker_faerleiaAI : public ScriptedAI { npc_deathstalker_faerleiaAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } - void Reset() {} + void Reset() override {} ObjectGuid m_playerGuid; uint32 m_uiWaveTimer; @@ -203,7 +203,7 @@ struct MANGOS_DLL_DECL npc_deathstalker_faerleiaAI : public ScriptedAI m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { if (Player* pPlayer = m_creature->GetMap()->GetPlayer(m_playerGuid)) pPlayer->SendQuestFailed(QUEST_PYREWOOD_AMBUSH); @@ -211,7 +211,7 @@ struct MANGOS_DLL_DECL npc_deathstalker_faerleiaAI : public ScriptedAI FinishEvent(); } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { ++m_uiSummonCount; @@ -221,7 +221,7 @@ struct MANGOS_DLL_DECL npc_deathstalker_faerleiaAI : public ScriptedAI pSummoned->GetMotionMaster()->MovePoint(0, fX, fY, fZ); } - void SummonedCreatureJustDied(Creature* pKilled) + void SummonedCreatureJustDied(Creature* pKilled) override { --m_uiSummonCount; @@ -242,7 +242,7 @@ struct MANGOS_DLL_DECL npc_deathstalker_faerleiaAI : public ScriptedAI } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (m_bEventStarted && !m_uiSummonCount) { diff --git a/scripts/eastern_kingdoms/stormwind_city.cpp b/scripts/eastern_kingdoms/stormwind_city.cpp index e24b10467..746abc489 100644 --- a/scripts/eastern_kingdoms/stormwind_city.cpp +++ b/scripts/eastern_kingdoms/stormwind_city.cpp @@ -53,13 +53,13 @@ struct MANGOS_DLL_DECL npc_bartlebyAI : public ScriptedAI uint32 m_uiNormalFaction; - void Reset() + void Reset() override { if (m_creature->getFaction() != m_uiNormalFaction) m_creature->setFaction(m_uiNormalFaction); } - void AttackedBy(Unit* pAttacker) + void AttackedBy(Unit* pAttacker) override { if (m_creature->getVictim()) return; @@ -70,7 +70,7 @@ struct MANGOS_DLL_DECL npc_bartlebyAI : public ScriptedAI AttackStart(pAttacker); } - void DamageTaken(Unit* pDoneBy, uint32& uiDamage) + void DamageTaken(Unit* pDoneBy, uint32& uiDamage) override { if (uiDamage > m_creature->GetHealth() || ((m_creature->GetHealth() - uiDamage) * 100 / m_creature->GetMaxHealth() < 15)) { @@ -119,13 +119,13 @@ struct MANGOS_DLL_DECL npc_dashel_stonefistAI : public ScriptedAI uint32 m_uiNormalFaction; - void Reset() + void Reset() override { if (m_creature->getFaction() != m_uiNormalFaction) m_creature->setFaction(m_uiNormalFaction); } - void AttackedBy(Unit* pAttacker) + void AttackedBy(Unit* pAttacker) override { if (m_creature->getVictim()) return; @@ -136,7 +136,7 @@ struct MANGOS_DLL_DECL npc_dashel_stonefistAI : public ScriptedAI AttackStart(pAttacker); } - void DamageTaken(Unit* pDoneBy, uint32& uiDamage) + void DamageTaken(Unit* pDoneBy, uint32& uiDamage) override { if (uiDamage > m_creature->GetHealth() || ((m_creature->GetHealth() - uiDamage) * 100 / m_creature->GetMaxHealth() < 15)) { @@ -260,9 +260,9 @@ struct MANGOS_DLL_DECL npc_squire_roweAI : public npc_escortAI, private Dialogue ObjectGuid m_windsorGuid; ObjectGuid m_horseGuid; - void Reset() { } + void Reset() override { } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { if (pSummoned->GetEntry() == NPC_WINDSOR) { @@ -276,7 +276,7 @@ struct MANGOS_DLL_DECL npc_squire_roweAI : public npc_escortAI, private Dialogue m_horseGuid = pSummoned->GetObjectGuid(); } - void SummonedCreatureDespawn(Creature* pSummoned) + void SummonedCreatureDespawn(Creature* pSummoned) override { if (pSummoned->GetEntry() == NPC_WINDSOR) { @@ -285,7 +285,7 @@ struct MANGOS_DLL_DECL npc_squire_roweAI : public npc_escortAI, private Dialogue } } - void SummonedMovementInform(Creature* pSummoned, uint32 uiMotionType, uint32 uiPointId) + void SummonedMovementInform(Creature* pSummoned, uint32 uiMotionType, uint32 uiPointId) override { if (uiMotionType != POINT_MOTION_TYPE || !uiPointId || pSummoned->GetEntry() != NPC_WINDSOR) return; @@ -295,7 +295,7 @@ struct MANGOS_DLL_DECL npc_squire_roweAI : public npc_escortAI, private Dialogue StartNextDialogueText(NPC_WINDSOR); } - void WaypointReached(uint32 uiPointId) + void WaypointReached(uint32 uiPointId) override { switch (uiPointId) { @@ -314,7 +314,7 @@ struct MANGOS_DLL_DECL npc_squire_roweAI : public npc_escortAI, private Dialogue } } - void JustDidDialogueStep(int32 iEntry) + void JustDidDialogueStep(int32 iEntry) override { switch (iEntry) { @@ -362,7 +362,7 @@ struct MANGOS_DLL_DECL npc_squire_roweAI : public npc_escortAI, private Dialogue } } - Creature* GetSpeakerByEntry(uint32 uiEntry) + Creature* GetSpeakerByEntry(uint32 uiEntry) override { if (uiEntry == NPC_WINDSOR) return m_creature->GetMap()->GetCreature(m_windsorGuid); @@ -600,14 +600,14 @@ struct MANGOS_DLL_DECL npc_reginald_windsorAI : public npc_escortAI, private Dia GuidList m_lRoyalGuardsGuidList; GuidSet m_sGuardsSalutedGuidSet; - void Reset() + void Reset() override { m_uiGuardCheckTimer = 0; m_bIsKeepReady = false; m_bCanGuardSalute = false; } - void MoveInLineOfSight(Unit* pWho) + void MoveInLineOfSight(Unit* pWho) override { // Note: this implementation is not the best; It should be better handled by the guard script if (m_bCanGuardSalute && (pWho->GetEntry() == NPC_GUARD_CITY || pWho->GetEntry() == NPC_GUARD_ROYAL || @@ -619,7 +619,7 @@ struct MANGOS_DLL_DECL npc_reginald_windsorAI : public npc_escortAI, private Dia } } - void WaypointReached(uint32 uiPointId) + void WaypointReached(uint32 uiPointId) override { switch (uiPointId) { @@ -675,7 +675,7 @@ struct MANGOS_DLL_DECL npc_reginald_windsorAI : public npc_escortAI, private Dia } } - void SummonedMovementInform(Creature* pSummoned, uint32 uiMotionType, uint32 uiPointId) + void SummonedMovementInform(Creature* pSummoned, uint32 uiMotionType, uint32 uiPointId) override { if (uiMotionType != POINT_MOTION_TYPE || !uiPointId || pSummoned->GetEntry() != NPC_GUARD_ROYAL) return; @@ -696,7 +696,7 @@ struct MANGOS_DLL_DECL npc_reginald_windsorAI : public npc_escortAI, private Dia } } - void JustDidDialogueStep(int32 iEntry) + void JustDidDialogueStep(int32 iEntry) override { if (!m_pScriptedMap) return; @@ -940,7 +940,7 @@ struct MANGOS_DLL_DECL npc_reginald_windsorAI : public npc_escortAI, private Dia bool IsKeepEventReady() { return m_bIsKeepReady; } - void UpdateEscortAI(const uint32 uiDiff) + void UpdateEscortAI(const uint32 uiDiff) override { DialogueUpdate(uiDiff); diff --git a/scripts/eastern_kingdoms/stranglethorn_vale.cpp b/scripts/eastern_kingdoms/stranglethorn_vale.cpp index e61c7ff2e..02875d2df 100644 --- a/scripts/eastern_kingdoms/stranglethorn_vale.cpp +++ b/scripts/eastern_kingdoms/stranglethorn_vale.cpp @@ -46,9 +46,9 @@ struct MANGOS_DLL_DECL mob_yennikuAI : public ScriptedAI uint32 m_uiResetTimer; - void Reset() { m_uiResetTimer = 0; } + void Reset() override { m_uiResetTimer = 0; } - void SpellHit(Unit* pCaster, const SpellEntry* pSpell) + void SpellHit(Unit* pCaster, const SpellEntry* pSpell) override { if (pSpell->Id == SPELL_YENNIKUS_RELEASE && pCaster->GetTypeId() == TYPEID_PLAYER) { @@ -60,7 +60,7 @@ struct MANGOS_DLL_DECL mob_yennikuAI : public ScriptedAI } } - void EnterEvadeMode() + void EnterEvadeMode() override { if (m_uiResetTimer) { @@ -78,7 +78,7 @@ struct MANGOS_DLL_DECL mob_yennikuAI : public ScriptedAI ScriptedAI::EnterEvadeMode(); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (m_uiResetTimer) { diff --git a/scripts/eastern_kingdoms/stratholme/boss_baroness_anastari.cpp b/scripts/eastern_kingdoms/stratholme/boss_baroness_anastari.cpp index b396245d9..7d06502e1 100644 --- a/scripts/eastern_kingdoms/stratholme/boss_baroness_anastari.cpp +++ b/scripts/eastern_kingdoms/stratholme/boss_baroness_anastari.cpp @@ -41,7 +41,7 @@ struct MANGOS_DLL_DECL boss_baroness_anastariAI : public ScriptedAI uint32 m_uiSilenceTimer; uint32 m_uiPossessTimer; - void Reset() + void Reset() override { m_uiBansheeWailTimer = 0; m_uiBansheeCurseTimer = 10000; @@ -49,7 +49,7 @@ struct MANGOS_DLL_DECL boss_baroness_anastariAI : public ScriptedAI m_uiPossessTimer = 15000; } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/eastern_kingdoms/stratholme/boss_cannon_master_willey.cpp b/scripts/eastern_kingdoms/stratholme/boss_cannon_master_willey.cpp index c4625be4c..d5c990f43 100644 --- a/scripts/eastern_kingdoms/stratholme/boss_cannon_master_willey.cpp +++ b/scripts/eastern_kingdoms/stratholme/boss_cannon_master_willey.cpp @@ -40,7 +40,7 @@ struct MANGOS_DLL_DECL boss_cannon_master_willeyAI : public ScriptedAI uint32 m_uiShootTimer; uint32 m_uiSummonRiflemanTimer; - void Reset() + void Reset() override { m_uiShootTimer = 1000; m_uiPummelTimer = 7000; @@ -48,13 +48,13 @@ struct MANGOS_DLL_DECL boss_cannon_master_willeyAI : public ScriptedAI m_uiSummonRiflemanTimer = 15000; } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { if (m_creature->getVictim()) pSummoned->AI()->AttackStart(m_creature->getVictim()); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { // Return since we have no target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) diff --git a/scripts/eastern_kingdoms/stratholme/boss_dathrohan_balnazzar.cpp b/scripts/eastern_kingdoms/stratholme/boss_dathrohan_balnazzar.cpp index c183ea3f0..862391157 100644 --- a/scripts/eastern_kingdoms/stratholme/boss_dathrohan_balnazzar.cpp +++ b/scripts/eastern_kingdoms/stratholme/boss_dathrohan_balnazzar.cpp @@ -87,7 +87,7 @@ struct MANGOS_DLL_DECL boss_dathrohan_balnazzarAI : public ScriptedAI uint32 m_uiMindControl_Timer; bool m_bTransformed; - void Reset() + void Reset() override { m_uiCrusadersHammer_Timer = 8000; m_uiCrusaderStrike_Timer = 12000; @@ -104,12 +104,12 @@ struct MANGOS_DLL_DECL boss_dathrohan_balnazzarAI : public ScriptedAI } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoScriptText(SAY_AGGRO, m_creature); } - void JustDied(Unit* Victim) + void JustDied(Unit* Victim) override { DoScriptText(SAY_DEATH, m_creature); @@ -119,7 +119,7 @@ struct MANGOS_DLL_DECL boss_dathrohan_balnazzarAI : public ScriptedAI TEMPSUMMON_TIMED_DESPAWN, HOUR * IN_MILLISECONDS); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/eastern_kingdoms/stratholme/boss_maleki_the_pallid.cpp b/scripts/eastern_kingdoms/stratholme/boss_maleki_the_pallid.cpp index c53fdade4..f133c75a6 100644 --- a/scripts/eastern_kingdoms/stratholme/boss_maleki_the_pallid.cpp +++ b/scripts/eastern_kingdoms/stratholme/boss_maleki_the_pallid.cpp @@ -40,7 +40,7 @@ struct MANGOS_DLL_DECL boss_maleki_the_pallidAI : public ScriptedAI uint32 m_uiIceTombTimer; uint32 m_uiDrainLifeTimer; - void Reset() + void Reset() override { m_uiDrainManaTimer = 30000; m_uiFrostboltTimer = 0; @@ -48,7 +48,7 @@ struct MANGOS_DLL_DECL boss_maleki_the_pallidAI : public ScriptedAI m_uiDrainLifeTimer = 20000; } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/eastern_kingdoms/stratholme/boss_order_of_silver_hand.cpp b/scripts/eastern_kingdoms/stratholme/boss_order_of_silver_hand.cpp index 648feb345..4053d717f 100644 --- a/scripts/eastern_kingdoms/stratholme/boss_order_of_silver_hand.cpp +++ b/scripts/eastern_kingdoms/stratholme/boss_order_of_silver_hand.cpp @@ -87,13 +87,13 @@ struct MANGOS_DLL_DECL boss_silver_hand_bossesAI : public ScriptedAI UNORDERED_MAP m_mSpellTimers; - void Reset() + void Reset() override { for (UNORDERED_MAP::iterator itr = m_mSpellTimers.begin(); itr != m_mSpellTimers.end(); ++itr) itr->second = m_aSilverHandAbility[itr->first].m_uiInitialTimer; } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { if (m_pInstance) { @@ -141,7 +141,7 @@ struct MANGOS_DLL_DECL boss_silver_hand_bossesAI : public ScriptedAI return false; } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { // Return since we have no target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) diff --git a/scripts/eastern_kingdoms/stratholme/stratholme.cpp b/scripts/eastern_kingdoms/stratholme/stratholme.cpp index b358e6e74..eb2260760 100644 --- a/scripts/eastern_kingdoms/stratholme/stratholme.cpp +++ b/scripts/eastern_kingdoms/stratholme/stratholme.cpp @@ -151,14 +151,14 @@ struct MANGOS_DLL_DECL mob_restless_soulAI : public ScriptedAI uint32 m_uiDieTimer; bool m_bIsTagged; - void Reset() + void Reset() override { m_taggerGuid.Clear(); m_uiDieTimer = 5000; m_bIsTagged = false; } - void SpellHit(Unit* pCaster, const SpellEntry* pSpell) + void SpellHit(Unit* pCaster, const SpellEntry* pSpell) override { if (pCaster->GetTypeId() == TYPEID_PLAYER) { @@ -170,7 +170,7 @@ struct MANGOS_DLL_DECL mob_restless_soulAI : public ScriptedAI } } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { if (pSummoned->GetEntry() == NPC_FREED_SOUL) { @@ -186,13 +186,13 @@ struct MANGOS_DLL_DECL mob_restless_soulAI : public ScriptedAI } } - void JustDied(Unit* Killer) + void JustDied(Unit* Killer) override { if (m_bIsTagged) m_creature->SummonCreature(NPC_FREED_SOUL, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN, 300000); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (m_bIsTagged) { @@ -229,19 +229,19 @@ struct MANGOS_DLL_DECL mobs_spectral_ghostly_citizenAI : public ScriptedAI uint32 m_uiDieTimer; bool m_bIsTagged; - void Reset() + void Reset() override { m_uiDieTimer = 5000; m_bIsTagged = false; } - void SpellHit(Unit* pCaster, const SpellEntry* pSpell) + void SpellHit(Unit* pCaster, const SpellEntry* pSpell) override { if (!m_bIsTagged && pSpell->Id == SPELL_EGAN_BLASTER) m_bIsTagged = true; } - void JustDied(Unit* Killer) + void JustDied(Unit* Killer) override { if (m_bIsTagged) { @@ -258,7 +258,7 @@ struct MANGOS_DLL_DECL mobs_spectral_ghostly_citizenAI : public ScriptedAI } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (m_bIsTagged) { @@ -276,7 +276,7 @@ struct MANGOS_DLL_DECL mobs_spectral_ghostly_citizenAI : public ScriptedAI DoMeleeAttackIfReady(); } - void ReceiveEmote(Player* pPlayer, uint32 uiEmote) + void ReceiveEmote(Player* pPlayer, uint32 uiEmote) override { switch (uiEmote) { diff --git a/scripts/eastern_kingdoms/stratholme/stratholme.h b/scripts/eastern_kingdoms/stratholme/stratholme.h index e449c5afa..7f885d465 100644 --- a/scripts/eastern_kingdoms/stratholme/stratholme.h +++ b/scripts/eastern_kingdoms/stratholme/stratholme.h @@ -117,22 +117,22 @@ class MANGOS_DLL_DECL instance_stratholme : public ScriptedInstance instance_stratholme(Map* pMap); ~instance_stratholme() {} - void Initialize(); + void Initialize() override; - void OnCreatureCreate(Creature* pCreature); - void OnObjectCreate(GameObject* pGo); + void OnCreatureCreate(Creature* pCreature) override; + void OnObjectCreate(GameObject* pGo) override; - void SetData(uint32 uiType, uint32 uiData); - uint32 GetData(uint32 uiType); + void SetData(uint32 uiType, uint32 uiData) override; + uint32 GetData(uint32 uiType) override; - const char* Save() { return m_strInstData.c_str(); } - void Load(const char* chrIn); + const char* Save() override { return m_strInstData.c_str(); } + void Load(const char* chrIn) override; - void OnCreatureEnterCombat(Creature* pCreature); + void OnCreatureEnterCombat(Creature* pCreature) override; void OnCreatureEvade(Creature* pCreature); - void OnCreatureDeath(Creature* pCreature); + void OnCreatureDeath(Creature* pCreature) override; - void Update(uint32 uiDiff); + void Update(uint32 uiDiff) override; protected: bool StartSlaugtherSquare(); diff --git a/scripts/eastern_kingdoms/sunken_temple/sunken_temple.cpp b/scripts/eastern_kingdoms/sunken_temple/sunken_temple.cpp index 78489892e..1e0a4d84a 100644 --- a/scripts/eastern_kingdoms/sunken_temple/sunken_temple.cpp +++ b/scripts/eastern_kingdoms/sunken_temple/sunken_temple.cpp @@ -86,8 +86,8 @@ struct MANGOS_DLL_DECL npc_malfurionAI : public ScriptedAI uint32 m_uiSayTimer; uint32 m_uiSpeech; - void Reset() {} - void UpdateAI(const uint32 uiDiff) + void Reset() override {} + void UpdateAI(const uint32 uiDiff) override { // We are in Sunken Temple if (m_creature->GetMap()->IsDungeon()) diff --git a/scripts/eastern_kingdoms/sunken_temple/sunken_temple.h b/scripts/eastern_kingdoms/sunken_temple/sunken_temple.h index 2e017ad4b..50f69c035 100644 --- a/scripts/eastern_kingdoms/sunken_temple/sunken_temple.h +++ b/scripts/eastern_kingdoms/sunken_temple/sunken_temple.h @@ -108,23 +108,23 @@ class MANGOS_DLL_DECL instance_sunken_temple : public ScriptedInstance instance_sunken_temple(Map* pMap); ~instance_sunken_temple() {} - void Initialize(); + void Initialize() override; - void OnObjectCreate(GameObject* pGo); - void OnCreatureCreate(Creature* pCreature); + void OnObjectCreate(GameObject* pGo) override; + void OnCreatureCreate(Creature* pCreature) override; void OnCreatureEvade(Creature* pCreature); - void OnCreatureDeath(Creature* pCreature); + void OnCreatureDeath(Creature* pCreature) override; - void SetData(uint32 uiType, uint32 uiData); - uint32 GetData(uint32 uiType); + void SetData(uint32 uiType, uint32 uiData) override; + uint32 GetData(uint32 uiType) override; - void Update(uint32 uiDiff); + void Update(uint32 uiDiff) override; bool ProcessStatueEvent(uint32 uiEventId); - const char* Save() { return m_strInstData.c_str(); } - void Load(const char* chrIn); + const char* Save() override { return m_strInstData.c_str(); } + void Load(const char* chrIn) override; protected: void DoSpawnAtalarionIfCan(); diff --git a/scripts/eastern_kingdoms/sunwell_plateau/boss_brutallus.cpp b/scripts/eastern_kingdoms/sunwell_plateau/boss_brutallus.cpp index 939974b1f..9193ad3c1 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/boss_brutallus.cpp +++ b/scripts/eastern_kingdoms/sunwell_plateau/boss_brutallus.cpp @@ -119,7 +119,7 @@ struct MANGOS_DLL_DECL boss_brutallusAI : public ScriptedAI, private DialogueHel bool m_bCanDoMeleeAttack; bool m_bIsIntroInProgress; - void Reset() + void Reset() override { m_uiSlashTimer = 11000; m_uiStompTimer = 30000; @@ -133,7 +133,7 @@ struct MANGOS_DLL_DECL boss_brutallusAI : public ScriptedAI, private DialogueHel m_bIsIntroInProgress = false; } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { // Don't aggro when attacking Madrigosa if (pWho->GetEntry() == NPC_MADRIGOSA) @@ -145,7 +145,7 @@ struct MANGOS_DLL_DECL boss_brutallusAI : public ScriptedAI, private DialogueHel m_pInstance->SetData(TYPE_BRUTALLUS, IN_PROGRESS); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { // Don't yell for Madrigosa if (pVictim->GetEntry() == NPC_MADRIGOSA) @@ -159,7 +159,7 @@ struct MANGOS_DLL_DECL boss_brutallusAI : public ScriptedAI, private DialogueHel } } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoScriptText(YELL_DEATH, m_creature); DoCastSpellIfCan(m_creature, SPELL_SUMMON_DEATH_CLOUD, CAST_TRIGGERED); @@ -168,7 +168,7 @@ struct MANGOS_DLL_DECL boss_brutallusAI : public ScriptedAI, private DialogueHel m_pInstance->SetData(TYPE_BRUTALLUS, DONE); } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) { @@ -180,7 +180,7 @@ struct MANGOS_DLL_DECL boss_brutallusAI : public ScriptedAI, private DialogueHel } } - void GetAIInformation(ChatHandler& reader) + void GetAIInformation(ChatHandler& reader) override { if (m_pInstance) { @@ -197,21 +197,21 @@ struct MANGOS_DLL_DECL boss_brutallusAI : public ScriptedAI, private DialogueHel } } - void SummonedCreatureJustDied(Creature* pSummoned) + void SummonedCreatureJustDied(Creature* pSummoned) override { // Error log if Madrigosa dies if (pSummoned->GetEntry() == NPC_MADRIGOSA) error_log("SD2: Npc %u, %s, died unexpectedly. Felmyst won't be summoned anymore.", pSummoned->GetEntry(), pSummoned->GetName()); } - void SummonedCreatureDespawn(Creature* pSummoned) + void SummonedCreatureDespawn(Creature* pSummoned) override { // Yell of Madrigosa on death if (pSummoned->GetEntry() == NPC_MADRIGOSA) pSummoned->CastSpell(pSummoned, SPELL_SUMMON_FELBLAZE, true); } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { if (pSummoned->GetEntry() == NPC_MADRIGOSA) { @@ -223,7 +223,7 @@ struct MANGOS_DLL_DECL boss_brutallusAI : public ScriptedAI, private DialogueHel pSummoned->CastSpell(pSummoned, SPELL_BRUTALLUS_DEATH_CLOUD, true); } - void SummonedMovementInform(Creature* pSummoned, uint32 uiType, uint32 uiPointId) + void SummonedMovementInform(Creature* pSummoned, uint32 uiType, uint32 uiPointId) override { if (uiType != POINT_MOTION_TYPE || pSummoned->GetEntry() != NPC_MADRIGOSA) return; @@ -232,7 +232,7 @@ struct MANGOS_DLL_DECL boss_brutallusAI : public ScriptedAI, private DialogueHel pSummoned->SetLevitate(false); } - void SpellHitTarget(Unit* pTarget, const SpellEntry* pSpell) + void SpellHitTarget(Unit* pTarget, const SpellEntry* pSpell) override { // Fake death Madrigosa when charged if (pTarget->GetEntry() == NPC_MADRIGOSA && pSpell->Id == SPELL_CHARGE) @@ -256,7 +256,7 @@ struct MANGOS_DLL_DECL boss_brutallusAI : public ScriptedAI, private DialogueHel } } - void JustDidDialogueStep(int32 iEntry) + void JustDidDialogueStep(int32 iEntry) override { if (!m_pInstance) return; @@ -375,7 +375,7 @@ struct MANGOS_DLL_DECL boss_brutallusAI : public ScriptedAI, private DialogueHel DoMeleeAttackIfReady(); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { // Update only the intro related stuff if (m_pInstance->GetData(TYPE_BRUTALLUS) == SPECIAL) diff --git a/scripts/eastern_kingdoms/sunwell_plateau/boss_eredar_twins.cpp b/scripts/eastern_kingdoms/sunwell_plateau/boss_eredar_twins.cpp index 5086596f4..5507b2af6 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/boss_eredar_twins.cpp +++ b/scripts/eastern_kingdoms/sunwell_plateau/boss_eredar_twins.cpp @@ -110,7 +110,7 @@ struct MANGOS_DLL_DECL boss_alythessAI : public ScriptedAI uint32 m_uiFlameSearTimer; bool m_bDidIntro; - void Reset() + void Reset() override { m_uiEnrageTimer = 6 * MINUTE * IN_MILLISECONDS; m_uiPyrogenicsTimer = 20000; @@ -121,7 +121,7 @@ struct MANGOS_DLL_DECL boss_alythessAI : public ScriptedAI m_bDidIntro = false; } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) { @@ -137,7 +137,7 @@ struct MANGOS_DLL_DECL boss_alythessAI : public ScriptedAI } } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { if (m_pInstance) { @@ -146,7 +146,7 @@ struct MANGOS_DLL_DECL boss_alythessAI : public ScriptedAI } } - void AttackStart(Unit* pWho) + void AttackStart(Unit* pWho) override { if (m_creature->Attack(pWho, false)) { @@ -159,12 +159,12 @@ struct MANGOS_DLL_DECL boss_alythessAI : public ScriptedAI } } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { DoScriptText(urand(0, 1) ? SAY_ALYTHESS_KILL_1 : SAY_ALYTHESS_KILL_2, m_creature); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { if (m_pInstance) { @@ -187,7 +187,7 @@ struct MANGOS_DLL_DECL boss_alythessAI : public ScriptedAI } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (m_pInstance && m_pInstance->GetData(TYPE_EREDAR_TWINS) == SPECIAL) { @@ -285,7 +285,7 @@ struct MANGOS_DLL_DECL boss_sacrolashAI : public ScriptedAI uint32 m_uiShadowBladesTimer; uint32 m_uiSummonShadowImage; - void Reset() + void Reset() override { m_uiEnrageTimer = 6 * MINUTE * IN_MILLISECONDS; m_uiDarkTouchedTimer = 30000; @@ -295,7 +295,7 @@ struct MANGOS_DLL_DECL boss_sacrolashAI : public ScriptedAI m_uiSummonShadowImage = 10000; } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) { @@ -311,7 +311,7 @@ struct MANGOS_DLL_DECL boss_sacrolashAI : public ScriptedAI } } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { if (m_pInstance) { @@ -320,12 +320,12 @@ struct MANGOS_DLL_DECL boss_sacrolashAI : public ScriptedAI } } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { DoScriptText(urand(0, 1) ? SAY_SACROLASH_KILL_1 : SAY_SACROLASH_KILL_2, m_creature); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { if (m_pInstance) { @@ -369,7 +369,7 @@ struct MANGOS_DLL_DECL boss_sacrolashAI : public ScriptedAI return m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1); } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { if (pSummoned->GetEntry() == NPC_SHADOW_IMAGE) { @@ -380,7 +380,7 @@ struct MANGOS_DLL_DECL boss_sacrolashAI : public ScriptedAI } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -482,7 +482,7 @@ struct MANGOS_DLL_DECL npc_shadow_imageAI : public ScriptedAI uint32 m_uiAbilityTimer; uint8 m_uiDarkStrikes; - void Reset() + void Reset() override { // Choose only one spell for attack m_uiChosenAbility = urand(0, 1) ? SPELL_DARK_STRIKE : SPELL_SHADOWFURY; @@ -491,7 +491,7 @@ struct MANGOS_DLL_DECL npc_shadow_imageAI : public ScriptedAI m_uiSuicideTimer = 0; } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/eastern_kingdoms/sunwell_plateau/boss_felmyst.cpp b/scripts/eastern_kingdoms/sunwell_plateau/boss_felmyst.cpp index a2eeb2c2a..56b322e91 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/boss_felmyst.cpp +++ b/scripts/eastern_kingdoms/sunwell_plateau/boss_felmyst.cpp @@ -87,7 +87,7 @@ struct MANGOS_DLL_DECL boss_felmystAI : public ScriptedAI uint32 m_uiEncapsulateTimer; uint32 m_uiGasNovaTimer; - void Reset() + void Reset() override { // Transform into Felmyst dragon DoCastSpellIfCan(m_creature, SPELL_FELBLAZE_VISUAL); @@ -103,7 +103,7 @@ struct MANGOS_DLL_DECL boss_felmystAI : public ScriptedAI m_uiFlyPhaseTimer = 60000; // flight phase after 1 min } - void MoveInLineOfSight(Unit* pWho) + void MoveInLineOfSight(Unit* pWho) override { if (!m_bHasTransformed) { @@ -117,7 +117,7 @@ struct MANGOS_DLL_DECL boss_felmystAI : public ScriptedAI ScriptedAI::MoveInLineOfSight(pWho); } - void EnterEvadeMode() + void EnterEvadeMode() override { m_creature->RemoveAllAuras(); m_creature->DeleteThreatList(); @@ -134,7 +134,7 @@ struct MANGOS_DLL_DECL boss_felmystAI : public ScriptedAI Reset(); } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoCastSpellIfCan(m_creature, SPELL_NOXIOUS_FUMES); @@ -142,12 +142,12 @@ struct MANGOS_DLL_DECL boss_felmystAI : public ScriptedAI m_pInstance->SetData(TYPE_FELMYST, IN_PROGRESS); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { DoScriptText(urand(0, 1) ? SAY_KILL_1 : SAY_KILL_2, m_creature); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoScriptText(SAY_DEATH, m_creature); @@ -155,19 +155,19 @@ struct MANGOS_DLL_DECL boss_felmystAI : public ScriptedAI m_pInstance->SetData(TYPE_FELMYST, DONE); } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_FELMYST, FAIL); } - void SpellHitTarget(Unit* pTarget, const SpellEntry* pSpell) + void SpellHitTarget(Unit* pTarget, const SpellEntry* pSpell) override { if (pTarget->GetTypeId() == TYPEID_PLAYER && pSpell->Id == SPELL_ENCAPSULATE_CHANNEL) pTarget->CastSpell(pTarget, SPELL_ENCAPSULATE, true, NULL, NULL, m_creature->GetObjectGuid()); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/eastern_kingdoms/sunwell_plateau/boss_kalecgos.cpp b/scripts/eastern_kingdoms/sunwell_plateau/boss_kalecgos.cpp index ca9bf6abc..cfa448e6c 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/boss_kalecgos.cpp +++ b/scripts/eastern_kingdoms/sunwell_plateau/boss_kalecgos.cpp @@ -97,7 +97,7 @@ struct MANGOS_DLL_DECL boss_kalecgosAI : public ScriptedAI bool m_bIsBanished; bool m_bIsEnraged; - void Reset() + void Reset() override { m_uiArcaneBuffetTimer = 8000; m_uiTailLashTimer = 5000; @@ -111,7 +111,7 @@ struct MANGOS_DLL_DECL boss_kalecgosAI : public ScriptedAI m_bIsEnraged = false; } - void JustReachedHome() + void JustReachedHome() override { // Eject all players and set event to fail DoCastSpellIfCan(m_creature, SPELL_SPECTRAL_REALM_EJECT, CAST_TRIGGERED); @@ -120,7 +120,7 @@ struct MANGOS_DLL_DECL boss_kalecgosAI : public ScriptedAI m_pInstance->SetData(TYPE_KALECGOS, FAIL); } - void EnterEvadeMode() + void EnterEvadeMode() override { // Check if the boss is uncorrupted when evading if (m_bIsUncorrupted) @@ -139,7 +139,7 @@ struct MANGOS_DLL_DECL boss_kalecgosAI : public ScriptedAI ScriptedAI::EnterEvadeMode(); } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoScriptText(SAY_EVIL_AGGRO, m_creature); @@ -147,7 +147,7 @@ struct MANGOS_DLL_DECL boss_kalecgosAI : public ScriptedAI m_pInstance->SetData(TYPE_KALECGOS, IN_PROGRESS); } - void DamageTaken(Unit* pDoneBy, uint32& uiDamage) + void DamageTaken(Unit* pDoneBy, uint32& uiDamage) override { if (uiDamage > m_creature->GetHealth()) { @@ -164,7 +164,7 @@ struct MANGOS_DLL_DECL boss_kalecgosAI : public ScriptedAI } } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { DoScriptText(urand(0, 1) ? SAY_EVIL_SLAY_1 : SAY_EVIL_SLAY_2, m_creature); } @@ -192,7 +192,7 @@ struct MANGOS_DLL_DECL boss_kalecgosAI : public ScriptedAI m_uiExitTimer = 10000; } - void MovementInform(uint32 uiMotionType, uint32 uiPointId) + void MovementInform(uint32 uiMotionType, uint32 uiPointId) override { if (uiMotionType != POINT_MOTION_TYPE) return; @@ -206,7 +206,7 @@ struct MANGOS_DLL_DECL boss_kalecgosAI : public ScriptedAI } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (m_uiExitTimer) { @@ -324,7 +324,7 @@ struct MANGOS_DLL_DECL boss_sathrovarrAI : public ScriptedAI bool m_bIsBanished; bool m_bIsEnraged; - void Reset() + void Reset() override { // FIXME: Timers m_uiCorruptingStrikeTimer = 5000; @@ -337,7 +337,7 @@ struct MANGOS_DLL_DECL boss_sathrovarrAI : public ScriptedAI DoCastSpellIfCan(m_creature, SPELL_SPECTRAL_INVISIBILITY); } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoScriptText(SAY_SATH_AGGRO, m_creature); @@ -349,7 +349,7 @@ struct MANGOS_DLL_DECL boss_sathrovarrAI : public ScriptedAI pKalec->AI()->AttackStart(m_creature); } - void DamageTaken(Unit* pDoneBy, uint32& uiDamage) + void DamageTaken(Unit* pDoneBy, uint32& uiDamage) override { if (uiDamage > m_creature->GetHealth()) { @@ -372,7 +372,7 @@ struct MANGOS_DLL_DECL boss_sathrovarrAI : public ScriptedAI } } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { DoScriptText(urand(0, 1) ? SAY_SATH_SLAY_1 : SAY_SATH_SLAY_2, m_creature); @@ -384,7 +384,7 @@ struct MANGOS_DLL_DECL boss_sathrovarrAI : public ScriptedAI } } - void MoveInLineOfSight(Unit* pWho) + void MoveInLineOfSight(Unit* pWho) override { // !!! Workaround which ejects the players from the spectral realm !!! if (pWho->GetTypeId() == TYPEID_PLAYER && pWho->IsWithinLOSInMap(m_creature) && pWho->IsWithinDistInMap(m_creature, 75.0f)) @@ -399,12 +399,12 @@ struct MANGOS_DLL_DECL boss_sathrovarrAI : public ScriptedAI ScriptedAI::MoveInLineOfSight(pWho); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoScriptText(SAY_SATH_DEATH, m_creature); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -482,7 +482,7 @@ struct MANGOS_DLL_DECL boss_kalecgos_humanoidAI : public ScriptedAI bool m_bHasYelled10Percent; bool m_bHasYelled20Percent; - void Reset() + void Reset() override { // TODO: Times! m_uiRevitalizeTimer = 30000; @@ -494,12 +494,12 @@ struct MANGOS_DLL_DECL boss_kalecgos_humanoidAI : public ScriptedAI DoCastSpellIfCan(m_creature, SPELL_SPECTRAL_INVISIBILITY); } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoScriptText(SAY_GOOD_AGGRO, m_creature); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { if (m_pInstance) { @@ -510,7 +510,7 @@ struct MANGOS_DLL_DECL boss_kalecgos_humanoidAI : public ScriptedAI } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/eastern_kingdoms/sunwell_plateau/boss_kiljaeden.cpp b/scripts/eastern_kingdoms/sunwell_plateau/boss_kiljaeden.cpp index 86dc36118..28a7ec753 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/boss_kiljaeden.cpp +++ b/scripts/eastern_kingdoms/sunwell_plateau/boss_kiljaeden.cpp @@ -219,13 +219,13 @@ struct MANGOS_DLL_DECL npc_kiljaeden_controllerAI : public Scripted_NoMovementAI ObjectGuid m_EntropiusGuid; ObjectGuid m_PortalGuid; - void Reset() + void Reset() override { // Visual spell before the encounter starts DoCastSpellIfCan(m_creature, SPELL_ANVEENA_DRAIN); } - void JustDidDialogueStep(int32 iEntry) + void JustDidDialogueStep(int32 iEntry) override { if (!m_pInstance) return; @@ -284,7 +284,7 @@ struct MANGOS_DLL_DECL npc_kiljaeden_controllerAI : public Scripted_NoMovementAI } } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { switch (pSummoned->GetEntry()) { @@ -305,14 +305,14 @@ struct MANGOS_DLL_DECL npc_kiljaeden_controllerAI : public Scripted_NoMovementAI } } - void SummonedCreatureJustDied(Creature* pSummoned) + void SummonedCreatureJustDied(Creature* pSummoned) override { // Start outro dialogue when Kil'jaeden is killed if (pSummoned->GetEntry() == NPC_KILJAEDEN) StartNextDialogueText(NPC_KALECGOS); } - void SummonedMovementInform(Creature* pSummoned, uint32 uiType, uint32 uiPointId) + void SummonedMovementInform(Creature* pSummoned, uint32 uiType, uint32 uiPointId) override { if (uiType != POINT_MOTION_TYPE) return; @@ -351,7 +351,7 @@ struct MANGOS_DLL_DECL npc_kiljaeden_controllerAI : public Scripted_NoMovementAI } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { DialogueUpdate(uiDiff); } @@ -389,7 +389,7 @@ struct MANGOS_DLL_DECL boss_kiljaedenAI : public Scripted_NoMovementAI, private uint32 m_uiArmageddonTimer; - void Reset() + void Reset() override { m_uiPhase = PHASE_INFERNO; m_uiKalecSummonTimer = 35000; @@ -407,7 +407,7 @@ struct MANGOS_DLL_DECL boss_kiljaedenAI : public Scripted_NoMovementAI, private m_uiArmageddonTimer = 20000; } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { if (m_pInstance) m_pInstance->SetData(TYPE_KILJAEDEN, IN_PROGRESS); @@ -416,7 +416,7 @@ struct MANGOS_DLL_DECL boss_kiljaedenAI : public Scripted_NoMovementAI, private DoCastSpellIfCan(m_creature, SPELL_BIRTH); } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) { @@ -431,7 +431,7 @@ struct MANGOS_DLL_DECL boss_kiljaedenAI : public Scripted_NoMovementAI, private m_creature->ForcedDespawn(); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { if (pVictim->GetTypeId() != TYPEID_PLAYER) return; @@ -439,13 +439,13 @@ struct MANGOS_DLL_DECL boss_kiljaedenAI : public Scripted_NoMovementAI, private DoScriptText(urand(0, 1) ? SAY_SLAY_1 : SAY_SLAY_2, m_creature); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { if (m_pInstance) m_pInstance->SetData(TYPE_KILJAEDEN, DONE); } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { if (pSummoned->GetEntry() == NPC_KALECGOS) DoScriptText(SAY_KALECGOS_INTRO, pSummoned); @@ -468,18 +468,18 @@ struct MANGOS_DLL_DECL boss_kiljaedenAI : public Scripted_NoMovementAI, private } } - void SummonedCreatureJustDied(Creature* pSummoned) + void SummonedCreatureJustDied(Creature* pSummoned) override { if (pSummoned->GetEntry() == NPC_SHIELD_ORB) --m_uiShieldOrbCount; } - void GetAIInformation(ChatHandler& reader) + void GetAIInformation(ChatHandler& reader) override { reader.PSendSysMessage("Kil'jaeden is currently in phase %u", m_uiPhase); } - void JustDidDialogueStep(int32 iEntry) + void JustDidDialogueStep(int32 iEntry) override { if (!m_pInstance) return; @@ -560,7 +560,7 @@ struct MANGOS_DLL_DECL boss_kiljaedenAI : public Scripted_NoMovementAI, private m_pInstance->DoToggleGameObjectFlags(uiEntry, GO_FLAG_NO_INTERACT, false); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -721,10 +721,10 @@ struct MANGOS_DLL_DECL npc_shield_orbAI : public ScriptedAI instance_sunwell_plateau* m_pInstance; - void Reset() { } + void Reset() override { } // Handle circel movement around the boss - void MovementInform(uint32 uiMoveType, uint32 uiPointId) + void MovementInform(uint32 uiMoveType, uint32 uiPointId) override { if (uiMoveType != POINT_MOTION_TYPE || !uiPointId || !m_pInstance) return; @@ -746,9 +746,9 @@ struct MANGOS_DLL_DECL npc_shield_orbAI : public ScriptedAI } } - void AttackStart(Unit* pWho) {} - void MoveInLineOfSight(Unit* pWho) {} - void UpdateAI(const uint32 uiDiff) { } + void AttackStart(Unit* pWho) override {} + void MoveInLineOfSight(Unit* pWho) override {} + void UpdateAI(const uint32 uiDiff) override { } }; CreatureAI* GetAI_boss_kiljaeden(Creature* pCreature) diff --git a/scripts/eastern_kingdoms/sunwell_plateau/boss_muru.cpp b/scripts/eastern_kingdoms/sunwell_plateau/boss_muru.cpp index 845e71f9d..f043f09eb 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/boss_muru.cpp +++ b/scripts/eastern_kingdoms/sunwell_plateau/boss_muru.cpp @@ -83,7 +83,7 @@ struct MANGOS_DLL_DECL boss_muruAI : public Scripted_NoMovementAI uint32 m_uiDarkFiendsTimer; bool m_bIsTransition; - void Reset() + void Reset() override { m_uiDarknessTimer = 45000; m_uiSummonHumanoidsTimer = 15000; @@ -91,7 +91,7 @@ struct MANGOS_DLL_DECL boss_muruAI : public Scripted_NoMovementAI m_bIsTransition = false; } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { if (m_pInstance) m_pInstance->SetData(TYPE_MURU, IN_PROGRESS); @@ -100,13 +100,13 @@ struct MANGOS_DLL_DECL boss_muruAI : public Scripted_NoMovementAI DoCastSpellIfCan(m_creature, SPELL_OPEN_PORTAL_PERIODIC, CAST_TRIGGERED); } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_MURU, FAIL); } - void DamageTaken(Unit* pDoneBy, uint32& uiDamage) + void DamageTaken(Unit* pDoneBy, uint32& uiDamage) override { if (uiDamage > m_creature->GetHealth()) { @@ -126,7 +126,7 @@ struct MANGOS_DLL_DECL boss_muruAI : public Scripted_NoMovementAI } } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { switch (pSummoned->GetEntry()) { @@ -168,7 +168,7 @@ struct MANGOS_DLL_DECL boss_muruAI : public Scripted_NoMovementAI DoCastSpellIfCan(m_creature, SPELL_SUMMON_DARK_FIEND_8, CAST_TRIGGERED); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -225,18 +225,18 @@ struct MANGOS_DLL_DECL boss_entropiusAI : public ScriptedAI GuidList m_lSummonedCreaturesList; - void Reset() + void Reset() override { m_uiBlackHoleTimer = 15000; m_uiDarknessTimer = 20000; } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoCastSpellIfCan(m_creature, SPELL_NEGATIVE_ENERGY_ENT); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { if (m_pInstance) m_pInstance->SetData(TYPE_MURU, DONE); @@ -245,7 +245,7 @@ struct MANGOS_DLL_DECL boss_entropiusAI : public ScriptedAI DespawnSummonedCreatures(); } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { // Add the Darkness and Singularity into the list m_lSummonedCreaturesList.push_back(pSummoned->GetObjectGuid()); @@ -261,7 +261,7 @@ struct MANGOS_DLL_DECL boss_entropiusAI : public ScriptedAI } } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) { @@ -277,7 +277,7 @@ struct MANGOS_DLL_DECL boss_entropiusAI : public ScriptedAI m_creature->ForcedDespawn(); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -322,21 +322,21 @@ struct MANGOS_DLL_DECL npc_portal_targetAI : public Scripted_NoMovementAI uint32 m_uiTransformTimer; uint32 m_uiSentinelTimer; - void Reset() + void Reset() override { m_uiTransformCount = 0; m_uiTransformTimer = 0; m_uiSentinelTimer = 0; } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { // Cast a visual ball on the summoner if (pSummoned->GetEntry() == NPC_VOID_SENTINEL_SUMMONER) DoCastSpellIfCan(pSummoned, SPELL_SENTINEL_SUMMONER_VISUAL, CAST_TRIGGERED); } - void SpellHit(Unit* pCaster, const SpellEntry* pSpell) + void SpellHit(Unit* pCaster, const SpellEntry* pSpell) override { // These spells are dummies, but are used only to init the timers // They could use the EffectDummyCreature to handle this, but this makes code easier @@ -353,7 +353,7 @@ struct MANGOS_DLL_DECL npc_portal_targetAI : public Scripted_NoMovementAI } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (m_uiSentinelTimer) { @@ -406,9 +406,9 @@ struct MANGOS_DLL_DECL npc_void_sentinel_summonerAI : public Scripted_NoMovement instance_sunwell_plateau* m_pInstance; - void Reset() { } + void Reset() override { } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { if (pSummoned->GetEntry() == NPC_VOID_SENTINEL) { @@ -421,7 +421,7 @@ struct MANGOS_DLL_DECL npc_void_sentinel_summonerAI : public Scripted_NoMovement } } - void UpdateAI(const uint32 uiDiff) { } + void UpdateAI(const uint32 uiDiff) override { } }; CreatureAI* GetAI_boss_muru(Creature* pCreature) diff --git a/scripts/eastern_kingdoms/sunwell_plateau/sunwell_plateau.h b/scripts/eastern_kingdoms/sunwell_plateau/sunwell_plateau.h index 495633745..63c4360ed 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/sunwell_plateau.h +++ b/scripts/eastern_kingdoms/sunwell_plateau/sunwell_plateau.h @@ -85,25 +85,25 @@ class MANGOS_DLL_DECL instance_sunwell_plateau : public ScriptedInstance, privat instance_sunwell_plateau(Map* pMap); ~instance_sunwell_plateau() {} - void Initialize(); - bool IsEncounterInProgress() const; + void Initialize() override; + bool IsEncounterInProgress() const override; - void OnPlayerEnter(Player* pPlayer); - void OnObjectCreate(GameObject* pGo); - void OnCreatureCreate(Creature* pCreature); - void OnCreatureDeath(Creature* pCreature); + void OnPlayerEnter(Player* pPlayer) override; + void OnObjectCreate(GameObject* pGo) override; + void OnCreatureCreate(Creature* pCreature) override; + void OnCreatureDeath(Creature* pCreature) override; void OnCreatureEvade(Creature* pCreature); - void SetData(uint32 uiType, uint32 uiData); - uint32 GetData(uint32 uiType); + void SetData(uint32 uiType, uint32 uiData) override; + uint32 GetData(uint32 uiType) override; - void Update(uint32 uiDiff); + void Update(uint32 uiDiff) override; - const char* Save() { return m_strInstData.c_str(); } - void Load(const char* chrIn); + const char* Save() override { return m_strInstData.c_str(); } + void Load(const char* chrIn) override; protected: - void JustDidDialogueStep(int32 iEntry); + void JustDidDialogueStep(int32 iEntry) override; uint32 m_auiEncounter[MAX_ENCOUNTER]; std::string m_strInstData; diff --git a/scripts/eastern_kingdoms/swamp_of_sorrows.cpp b/scripts/eastern_kingdoms/swamp_of_sorrows.cpp index 8b182fa09..a09f16c29 100644 --- a/scripts/eastern_kingdoms/swamp_of_sorrows.cpp +++ b/scripts/eastern_kingdoms/swamp_of_sorrows.cpp @@ -54,18 +54,18 @@ struct MANGOS_DLL_DECL npc_galen_goodwardAI : public npc_escortAI ObjectGuid m_galensCageGuid; uint32 m_uiPeriodicSay; - void Reset() + void Reset() override { m_uiPeriodicSay = 6000; } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { if (HasEscortState(STATE_ESCORT_ESCORTING)) DoScriptText(urand(0, 1) ? SAY_ATTACKED_1 : SAY_ATTACKED_2, m_creature, pWho); } - void WaypointStart(uint32 uiPointId) + void WaypointStart(uint32 uiPointId) override { switch (uiPointId) { @@ -90,7 +90,7 @@ struct MANGOS_DLL_DECL npc_galen_goodwardAI : public npc_escortAI } } - void WaypointReached(uint32 uiPointId) + void WaypointReached(uint32 uiPointId) override { switch (uiPointId) { @@ -111,7 +111,7 @@ struct MANGOS_DLL_DECL npc_galen_goodwardAI : public npc_escortAI } } - void UpdateEscortAI(const uint32 uiDiff) + void UpdateEscortAI(const uint32 uiDiff) override { if (m_uiPeriodicSay < uiDiff) diff --git a/scripts/eastern_kingdoms/tirisfal_glades.cpp b/scripts/eastern_kingdoms/tirisfal_glades.cpp index 38d195909..23cec803a 100644 --- a/scripts/eastern_kingdoms/tirisfal_glades.cpp +++ b/scripts/eastern_kingdoms/tirisfal_glades.cpp @@ -97,7 +97,7 @@ struct MANGOS_DLL_DECL npc_calvin_montagueAI : public ScriptedAI uint32 m_uiPhaseTimer; ObjectGuid m_playerGuid; - void Reset() + void Reset() override { m_uiPhase = 0; m_uiPhaseTimer = 5000; @@ -107,7 +107,7 @@ struct MANGOS_DLL_DECL npc_calvin_montagueAI : public ScriptedAI m_creature->setFaction(m_uiNormFaction); } - void AttackedBy(Unit* pAttacker) + void AttackedBy(Unit* pAttacker) override { if (m_creature->getVictim() || m_creature->IsFriendlyTo(pAttacker)) return; @@ -115,7 +115,7 @@ struct MANGOS_DLL_DECL npc_calvin_montagueAI : public ScriptedAI AttackStart(pAttacker); } - void DamageTaken(Unit* pDoneBy, uint32& uiDamage) + void DamageTaken(Unit* pDoneBy, uint32& uiDamage) override { if (uiDamage > m_creature->GetHealth() || ((m_creature->GetHealth() - uiDamage) * 100 / m_creature->GetMaxHealth() < 15)) { @@ -131,7 +131,7 @@ struct MANGOS_DLL_DECL npc_calvin_montagueAI : public ScriptedAI } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (m_uiPhase) { diff --git a/scripts/eastern_kingdoms/uldaman/boss_archaedas.cpp b/scripts/eastern_kingdoms/uldaman/boss_archaedas.cpp index 9a8b150e0..120e234a3 100644 --- a/scripts/eastern_kingdoms/uldaman/boss_archaedas.cpp +++ b/scripts/eastern_kingdoms/uldaman/boss_archaedas.cpp @@ -57,7 +57,7 @@ struct MANGOS_DLL_DECL boss_archaedasAI : public ScriptedAI bool m_bGuardiansAwaken; bool m_bWardersAwaken; - void Reset() + void Reset() override { m_uiAwakeningTimer = 1000; m_uiSubevent = 0; @@ -69,31 +69,31 @@ struct MANGOS_DLL_DECL boss_archaedasAI : public ScriptedAI m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { if (m_pInstance) m_pInstance->SetData(TYPE_ARCHAEDAS, IN_PROGRESS); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { DoScriptText(SAY_UNIT_SLAIN, m_creature); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { // open door to vault (handled by instance script) if (m_pInstance) m_pInstance->SetData(TYPE_ARCHAEDAS, DONE); } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_ARCHAEDAS, FAIL); } - void SpellHitTarget(Unit* pTarget, const SpellEntry* pSpell) + void SpellHitTarget(Unit* pTarget, const SpellEntry* pSpell) override { if (pTarget->GetTypeId() != TYPEID_PLAYER) { @@ -110,7 +110,7 @@ struct MANGOS_DLL_DECL boss_archaedasAI : public ScriptedAI } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { // so many things are based in this script on instance data // so if we don't have access to it better do nothing @@ -205,11 +205,11 @@ struct MANGOS_DLL_DECL npc_archaeras_addAI : public ScriptedAI Reset(); } - void Reset() + void Reset() override { } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/eastern_kingdoms/uldaman/uldaman.h b/scripts/eastern_kingdoms/uldaman/uldaman.h index 7c543c1f6..feeeeffce 100644 --- a/scripts/eastern_kingdoms/uldaman/uldaman.h +++ b/scripts/eastern_kingdoms/uldaman/uldaman.h @@ -39,17 +39,17 @@ class MANGOS_DLL_DECL instance_uldaman : public ScriptedInstance instance_uldaman(Map* pMap); ~instance_uldaman() {} - void Initialize(); + void Initialize() override; - void OnObjectCreate(GameObject* pGo); - void OnCreatureCreate(Creature* pCreature); + void OnObjectCreate(GameObject* pGo) override; + void OnCreatureCreate(Creature* pCreature) override; - void Update(uint32 uiDiff); + void Update(uint32 uiDiff) override; - void SetData(uint32 uiType, uint32 uiData); - void SetData64(uint32 uiData, uint64 uiGuid); - uint32 GetData(uint32 uiType); - uint64 GetData64(uint32 uiData); + void SetData(uint32 uiType, uint32 uiData) override; + void SetData64(uint32 uiData, uint64 uiGuid) override; + uint32 GetData(uint32 uiType) override; + uint64 GetData64(uint32 uiData) override; void StartEvent(uint32 uiEventId, Player* pPlayer); @@ -57,8 +57,8 @@ class MANGOS_DLL_DECL instance_uldaman : public ScriptedInstance Creature* GetClosestDwarfNotInCombat(Creature* pSearcher, uint32 uiPhase); - const char* Save() { return m_strInstData.c_str(); } - void Load(const char* chrIn); + const char* Save() override { return m_strInstData.c_str(); } + void Load(const char* chrIn) override; protected: uint32 m_auiEncounter[MAX_ENCOUNTER]; diff --git a/scripts/eastern_kingdoms/undercity.cpp b/scripts/eastern_kingdoms/undercity.cpp index c71558192..977135c58 100644 --- a/scripts/eastern_kingdoms/undercity.cpp +++ b/scripts/eastern_kingdoms/undercity.cpp @@ -64,13 +64,13 @@ struct MANGOS_DLL_DECL npc_lady_sylvanas_windrunnerAI : public ScriptedAI uint32 m_uiLamentEventTimer; uint32 m_uiSummonTimer; - void Reset() + void Reset() override { m_uiLamentEventTimer = 0; m_uiSummonTimer = 0; } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { if (pSummoned->GetEntry() == NPC_HIGHBORNE_BUNNY) pSummoned->CastSpell(pSummoned, SPELL_RIBBON_OF_SOULS, false); @@ -90,7 +90,7 @@ struct MANGOS_DLL_DECL npc_lady_sylvanas_windrunnerAI : public ScriptedAI m_uiSummonTimer = 13000; } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (m_uiLamentEventTimer) { diff --git a/scripts/eastern_kingdoms/western_plaguelands.cpp b/scripts/eastern_kingdoms/western_plaguelands.cpp index c7653ddaf..3929612b0 100644 --- a/scripts/eastern_kingdoms/western_plaguelands.cpp +++ b/scripts/eastern_kingdoms/western_plaguelands.cpp @@ -35,7 +35,7 @@ struct MANGOS_DLL_DECL npc_the_scourge_cauldronAI : public ScriptedAI { npc_the_scourge_cauldronAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} - void Reset() {} + void Reset() override {} void DoDie() { @@ -47,7 +47,7 @@ struct MANGOS_DLL_DECL npc_the_scourge_cauldronAI : public ScriptedAI m_creature->SetRespawnDelay(600); } - void MoveInLineOfSight(Unit* who) + void MoveInLineOfSight(Unit* who) override { if (!who || who->GetTypeId() != TYPEID_PLAYER) return; diff --git a/scripts/eastern_kingdoms/westfall.cpp b/scripts/eastern_kingdoms/westfall.cpp index 227d03c91..8c9fe61d6 100644 --- a/scripts/eastern_kingdoms/westfall.cpp +++ b/scripts/eastern_kingdoms/westfall.cpp @@ -58,7 +58,7 @@ struct MANGOS_DLL_DECL npc_daphne_stilwellAI : public npc_escortAI uint32 m_uiWPHolder; uint32 m_uiShootTimer; - void Reset() + void Reset() override { if (HasEscortState(STATE_ESCORT_ESCORTING)) { @@ -75,7 +75,7 @@ struct MANGOS_DLL_DECL npc_daphne_stilwellAI : public npc_escortAI m_uiShootTimer = 0; } - void WaypointReached(uint32 uiPointId) + void WaypointReached(uint32 uiPointId) override { m_uiWPHolder = uiPointId; @@ -124,7 +124,7 @@ struct MANGOS_DLL_DECL npc_daphne_stilwellAI : public npc_escortAI } } - void AttackStart(Unit* pWho) + void AttackStart(Unit* pWho) override { if (!pWho) return; @@ -139,12 +139,12 @@ struct MANGOS_DLL_DECL npc_daphne_stilwellAI : public npc_escortAI } } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { pSummoned->AI()->AttackStart(m_creature); } - void UpdateEscortAI(const uint32 uiDiff) + void UpdateEscortAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -201,7 +201,7 @@ struct MANGOS_DLL_DECL npc_defias_traitorAI : public npc_escortAI { npc_defias_traitorAI(Creature* pCreature) : npc_escortAI(pCreature) { Reset(); } - void WaypointReached(uint32 uiPointId) + void WaypointReached(uint32 uiPointId) override { switch (uiPointId) { @@ -222,12 +222,12 @@ struct MANGOS_DLL_DECL npc_defias_traitorAI : public npc_escortAI } } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoScriptText(urand(0, 1) ? SAY_AGGRO_1 : SAY_AGGRO_2, m_creature, pWho); } - void Reset() { } + void Reset() override { } }; bool QuestAccept_npc_defias_traitor(Player* pPlayer, Creature* pCreature, const Quest* pQuest) diff --git a/scripts/eastern_kingdoms/wetlands.cpp b/scripts/eastern_kingdoms/wetlands.cpp index 298e4d884..eea4893ad 100644 --- a/scripts/eastern_kingdoms/wetlands.cpp +++ b/scripts/eastern_kingdoms/wetlands.cpp @@ -49,13 +49,13 @@ struct MANGOS_DLL_DECL npc_tapoke_slim_jahnAI : public npc_escortAI bool m_bFriendSummoned; - void Reset() + void Reset() override { if (!HasEscortState(STATE_ESCORT_ESCORTING)) m_bFriendSummoned = false; } - void WaypointReached(uint32 uiPointId) + void WaypointReached(uint32 uiPointId) override { switch (uiPointId) { @@ -69,7 +69,7 @@ struct MANGOS_DLL_DECL npc_tapoke_slim_jahnAI : public npc_escortAI } } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { Player* pPlayer = GetPlayerForEscort(); @@ -82,13 +82,13 @@ struct MANGOS_DLL_DECL npc_tapoke_slim_jahnAI : public npc_escortAI } } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { if (Player* pPlayer = GetPlayerForEscort()) pSummoned->AI()->AttackStart(pPlayer); } - void AttackedBy(Unit* pAttacker) + void AttackedBy(Unit* pAttacker) override { if (m_creature->getVictim()) return; @@ -99,7 +99,7 @@ struct MANGOS_DLL_DECL npc_tapoke_slim_jahnAI : public npc_escortAI AttackStart(pAttacker); } - void DamageTaken(Unit* pDoneBy, uint32& uiDamage) + void DamageTaken(Unit* pDoneBy, uint32& uiDamage) override { if (m_creature->GetHealthPercent() < 20.0f) { diff --git a/scripts/eastern_kingdoms/zulaman/boss_akilzon.cpp b/scripts/eastern_kingdoms/zulaman/boss_akilzon.cpp index 984e6b30c..0a9fa9675 100644 --- a/scripts/eastern_kingdoms/zulaman/boss_akilzon.cpp +++ b/scripts/eastern_kingdoms/zulaman/boss_akilzon.cpp @@ -68,7 +68,7 @@ struct MANGOS_DLL_DECL boss_akilzonAI : public ScriptedAI uint32 m_uiSummonEagleTimer; uint32 m_uiBerserkTimer; - void Reset() + void Reset() override { m_uiStaticDisruptTimer = urand(7000, 14000); m_uiCallLightTimer = urand(15000, 25000); @@ -78,7 +78,7 @@ struct MANGOS_DLL_DECL boss_akilzonAI : public ScriptedAI m_uiBerserkTimer = 10 * MINUTE * IN_MILLISECONDS; } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoScriptText(SAY_AGGRO, m_creature); @@ -86,12 +86,12 @@ struct MANGOS_DLL_DECL boss_akilzonAI : public ScriptedAI m_pInstance->SetData(TYPE_AKILZON, IN_PROGRESS); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { DoScriptText(urand(0, 1) ? SAY_SLAY1 : SAY_SLAY2, m_creature); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoScriptText(SAY_DEATH, m_creature); @@ -101,13 +101,13 @@ struct MANGOS_DLL_DECL boss_akilzonAI : public ScriptedAI m_pInstance->SetData(TYPE_AKILZON, DONE); } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_AKILZON, FAIL); } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { if (pSummoned->GetEntry() == NPC_SOARING_EAGLE) { @@ -126,7 +126,7 @@ struct MANGOS_DLL_DECL boss_akilzonAI : public ScriptedAI } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -221,14 +221,14 @@ struct MANGOS_DLL_DECL mob_soaring_eagleAI : public ScriptedAI uint32 m_uiReturnTimer; bool m_bCanMoveToRandom; - void Reset() + void Reset() override { m_uiEagleSwoopTimer = 0; m_uiReturnTimer = 800; m_bCanMoveToRandom = false; } - void AttackStart(Unit* pWho) + void AttackStart(Unit* pWho) override { if (!pWho) return; @@ -241,7 +241,7 @@ struct MANGOS_DLL_DECL mob_soaring_eagleAI : public ScriptedAI } } - void MovementInform(uint32 uiType, uint32 uiPointId) + void MovementInform(uint32 uiType, uint32 uiPointId) override { if (uiType != POINT_MOTION_TYPE || !uiPointId) return; @@ -264,7 +264,7 @@ struct MANGOS_DLL_DECL mob_soaring_eagleAI : public ScriptedAI } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/eastern_kingdoms/zulaman/boss_halazzi.cpp b/scripts/eastern_kingdoms/zulaman/boss_halazzi.cpp index 08840f974..eb160ea14 100644 --- a/scripts/eastern_kingdoms/zulaman/boss_halazzi.cpp +++ b/scripts/eastern_kingdoms/zulaman/boss_halazzi.cpp @@ -98,7 +98,7 @@ struct MANGOS_DLL_DECL boss_halazziAI : public ScriptedAI ObjectGuid m_spiritLynxGuid; - void Reset() + void Reset() override { m_uiPhase = PHASE_SINGLE; m_uiPhaseCounter = 3; @@ -112,7 +112,7 @@ struct MANGOS_DLL_DECL boss_halazziAI : public ScriptedAI m_bHasTransformed = false; } - void EnterEvadeMode() + void EnterEvadeMode() override { // Transform back on evade if (DoCastSpellIfCan(m_creature, SPELL_TRANSFORM_TO_ORIGINAL) == CAST_OK) @@ -121,13 +121,13 @@ struct MANGOS_DLL_DECL boss_halazziAI : public ScriptedAI ScriptedAI::EnterEvadeMode(); } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_HALAZZI, FAIL); } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoScriptText(SAY_AGGRO, m_creature); @@ -135,7 +135,7 @@ struct MANGOS_DLL_DECL boss_halazziAI : public ScriptedAI m_pInstance->SetData(TYPE_HALAZZI, IN_PROGRESS); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { if (pVictim->GetTypeId() != TYPEID_PLAYER) return; @@ -143,7 +143,7 @@ struct MANGOS_DLL_DECL boss_halazziAI : public ScriptedAI DoScriptText(urand(0, 1) ? SAY_KILL1 : SAY_KILL2, m_creature); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoScriptText(SAY_DEATH, m_creature); @@ -151,7 +151,7 @@ struct MANGOS_DLL_DECL boss_halazziAI : public ScriptedAI m_pInstance->SetData(TYPE_HALAZZI, DONE); } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { if (pSummoned->GetEntry() == NPC_SPIRIT_LYNX) { @@ -161,7 +161,7 @@ struct MANGOS_DLL_DECL boss_halazziAI : public ScriptedAI } } - void SpellHit(Unit* pCaster, const SpellEntry* pSpell) + void SpellHit(Unit* pCaster, const SpellEntry* pSpell) override { if (pSpell->Id == SPELL_TRANSFIGURE_TRANSFORM) { @@ -208,7 +208,7 @@ struct MANGOS_DLL_DECL boss_halazziAI : public ScriptedAI } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -316,14 +316,14 @@ struct MANGOS_DLL_DECL boss_spirit_lynxAI : public ScriptedAI uint32 m_uiShredArmorTimer; bool m_bHasUnited; - void Reset() + void Reset() override { m_uiFrenzyTimer = urand(10000, 20000); // first frenzy after 10-20 seconds m_uiShredArmorTimer = 4000; m_bHasUnited = false; } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { if (!m_pInstance) return; @@ -332,7 +332,7 @@ struct MANGOS_DLL_DECL boss_spirit_lynxAI : public ScriptedAI pHalazzi->AI()->KilledUnit(pVictim); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/eastern_kingdoms/zulaman/boss_janalai.cpp b/scripts/eastern_kingdoms/zulaman/boss_janalai.cpp index 5ddd79084..03d9cbb56 100644 --- a/scripts/eastern_kingdoms/zulaman/boss_janalai.cpp +++ b/scripts/eastern_kingdoms/zulaman/boss_janalai.cpp @@ -133,7 +133,7 @@ struct MANGOS_DLL_DECL boss_janalaiAI : public ScriptedAI ObjectGuid m_hatcherOneGuid; ObjectGuid m_hatcherTwoGuid; - void Reset() + void Reset() override { m_uiFireBreathTimer = 8000; m_uiEnrageTimer = 5 * MINUTE * IN_MILLISECONDS; @@ -151,13 +151,13 @@ struct MANGOS_DLL_DECL boss_janalaiAI : public ScriptedAI m_bIsFlameWall = false; } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_JANALAI, FAIL); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoScriptText(SAY_DEATH, m_creature); @@ -165,12 +165,12 @@ struct MANGOS_DLL_DECL boss_janalaiAI : public ScriptedAI m_pInstance->SetData(TYPE_JANALAI, DONE); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { DoScriptText(urand(0, 1) ? SAY_SLAY_1 : SAY_SLAY_2, m_creature); } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoScriptText(SAY_AGGRO, m_creature); @@ -178,7 +178,7 @@ struct MANGOS_DLL_DECL boss_janalaiAI : public ScriptedAI m_pInstance->SetData(TYPE_JANALAI, IN_PROGRESS); } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { switch (pSummoned->GetEntry()) { @@ -239,7 +239,7 @@ struct MANGOS_DLL_DECL boss_janalaiAI : public ScriptedAI m_bIsFlameWall = false; } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -390,7 +390,7 @@ struct MANGOS_DLL_DECL npc_amanishi_hatcherAI : public ScriptedAI uint8 m_uiEggsHatched; bool m_bWaypointEnd; - void Reset() + void Reset() override { m_uiWaypoint = 0; m_uiHatchlingTimer = 0; @@ -401,10 +401,10 @@ struct MANGOS_DLL_DECL npc_amanishi_hatcherAI : public ScriptedAI m_creature->SetWalk(false); } - void MoveInLineOfSight(Unit* pWho) { } - void AttackStart(Unit* pWho) { } + void MoveInLineOfSight(Unit* pWho) override { } + void AttackStart(Unit* pWho) override { } - void MovementInform(uint32 uiType, uint32 uiPointId) + void MovementInform(uint32 uiType, uint32 uiPointId) override { if (uiType != POINT_MOTION_TYPE) return; @@ -436,7 +436,7 @@ struct MANGOS_DLL_DECL npc_amanishi_hatcherAI : public ScriptedAI } } - void SpellHitTarget(Unit* pTarget, SpellEntry const* pSpell) + void SpellHitTarget(Unit* pTarget, SpellEntry const* pSpell) override { if ((pSpell->Id != SPELL_HATCH_EGG_1 && pSpell->Id != SPELL_HATCH_EGG_2) || pTarget->GetEntry() != NPC_DRAGONHAWK_EGG) return; @@ -455,7 +455,7 @@ struct MANGOS_DLL_DECL npc_amanishi_hatcherAI : public ScriptedAI } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_bWaypointEnd) return; @@ -488,11 +488,11 @@ struct MANGOS_DLL_DECL npc_dragonhawk_eggAI : public Scripted_NoMovementAI { npc_dragonhawk_eggAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) {Reset();} - void Reset() {} + void Reset() override {} - void AttackStart(Unit* pWho) {} - void MoveInLineOfSight(Unit* pWho) {} - void UpdateAI(const uint32 uiDiff) {} + void AttackStart(Unit* pWho) override {} + void MoveInLineOfSight(Unit* pWho) override {} + void UpdateAI(const uint32 uiDiff) override {} }; CreatureAI* GetAI_npc_dragonhawk_eggAI(Creature* pCreature) @@ -505,11 +505,11 @@ struct MANGOS_DLL_DECL npc_janalai_firebombAI : public Scripted_NoMovementAI { npc_janalai_firebombAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) {Reset();} - void Reset() {} + void Reset() override {} - void AttackStart(Unit* pWho) {} - void MoveInLineOfSight(Unit* pWho) {} - void UpdateAI(const uint32 uiDiff) {} + void AttackStart(Unit* pWho) override {} + void MoveInLineOfSight(Unit* pWho) override {} + void UpdateAI(const uint32 uiDiff) override {} }; CreatureAI* GetAI_npc_janalai_firebombAI(Creature* pCreature) diff --git a/scripts/eastern_kingdoms/zulaman/boss_malacrass.cpp b/scripts/eastern_kingdoms/zulaman/boss_malacrass.cpp index 24e16a26f..0ad653712 100644 --- a/scripts/eastern_kingdoms/zulaman/boss_malacrass.cpp +++ b/scripts/eastern_kingdoms/zulaman/boss_malacrass.cpp @@ -234,7 +234,7 @@ struct MANGOS_DLL_DECL boss_malacrassAI : public ScriptedAI std::vector m_vAddsEntryList; std::vector m_vPlayerSpellTimer; - void Reset() + void Reset() override { m_uiSpiritBoltsTimer = 30000; m_uiDrainPowerTimer = 0; @@ -247,7 +247,7 @@ struct MANGOS_DLL_DECL boss_malacrassAI : public ScriptedAI DoInitializeAdds(); } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_MALACRASS, FAIL); @@ -288,7 +288,7 @@ struct MANGOS_DLL_DECL boss_malacrassAI : public ScriptedAI } } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoScriptText(SAY_AGGRO, m_creature); @@ -296,7 +296,7 @@ struct MANGOS_DLL_DECL boss_malacrassAI : public ScriptedAI m_pInstance->SetData(TYPE_MALACRASS, IN_PROGRESS); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { if (pVictim->GetTypeId() != TYPEID_PLAYER) return; @@ -304,7 +304,7 @@ struct MANGOS_DLL_DECL boss_malacrassAI : public ScriptedAI DoScriptText(urand(0, 1) ? SAY_KILL1 : SAY_KILL2, m_creature); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoScriptText(SAY_DEATH, m_creature); @@ -312,7 +312,7 @@ struct MANGOS_DLL_DECL boss_malacrassAI : public ScriptedAI m_pInstance->SetData(TYPE_MALACRASS, DONE); } - void SummonedCreatureJustDied(Creature* pSummoned) + void SummonedCreatureJustDied(Creature* pSummoned) override { switch (urand(0, 2)) { @@ -322,7 +322,7 @@ struct MANGOS_DLL_DECL boss_malacrassAI : public ScriptedAI } } - void SpellHitTarget(Unit* pTarget, const SpellEntry* pSpell) + void SpellHitTarget(Unit* pTarget, const SpellEntry* pSpell) override { // Set the player's class when hit with soul siphon if (pTarget->GetTypeId() == TYPEID_PLAYER && pSpell->Id == SPELL_SIPHON_SOUL) @@ -373,7 +373,7 @@ struct MANGOS_DLL_DECL boss_malacrassAI : public ScriptedAI return false; } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/eastern_kingdoms/zulaman/boss_nalorakk.cpp b/scripts/eastern_kingdoms/zulaman/boss_nalorakk.cpp index 13422a5eb..8a7cdf1e0 100644 --- a/scripts/eastern_kingdoms/zulaman/boss_nalorakk.cpp +++ b/scripts/eastern_kingdoms/zulaman/boss_nalorakk.cpp @@ -74,7 +74,7 @@ struct MANGOS_DLL_DECL boss_nalorakkAI : public ScriptedAI uint8 m_uiCurrentWave; bool m_bIsInBearForm; - void Reset() + void Reset() override { m_uiChangeFormTimer = 45000; m_uiBrutalSwipeTimer = 12000; @@ -87,7 +87,7 @@ struct MANGOS_DLL_DECL boss_nalorakkAI : public ScriptedAI m_bIsInBearForm = false; } - void MoveInLineOfSight(Unit* pWho) + void MoveInLineOfSight(Unit* pWho) override { ScriptedAI::MoveInLineOfSight(pWho); @@ -102,7 +102,7 @@ struct MANGOS_DLL_DECL boss_nalorakkAI : public ScriptedAI } } - void MovementInform(uint32 uiMotionType, uint32 uiPointId) + void MovementInform(uint32 uiMotionType, uint32 uiPointId) override { if (uiMotionType != POINT_MOTION_TYPE) return; @@ -127,7 +127,7 @@ struct MANGOS_DLL_DECL boss_nalorakkAI : public ScriptedAI } // Nalorakk evades only after the trash waves are finished - void EnterEvadeMode() + void EnterEvadeMode() override { m_creature->RemoveAllAuras(); m_creature->DeleteThreatList(); @@ -143,7 +143,7 @@ struct MANGOS_DLL_DECL boss_nalorakkAI : public ScriptedAI Reset(); } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoScriptText(SAY_AGGRO, m_creature); @@ -151,12 +151,12 @@ struct MANGOS_DLL_DECL boss_nalorakkAI : public ScriptedAI m_pInstance->SetData(TYPE_NALORAKK, IN_PROGRESS); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { DoScriptText(urand(0, 1) ? SAY_SLAY1 : SAY_SLAY2, m_creature); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoScriptText(SAY_DEATH, m_creature); @@ -166,7 +166,7 @@ struct MANGOS_DLL_DECL boss_nalorakkAI : public ScriptedAI m_pInstance->SetData(TYPE_NALORAKK, DONE); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { // Return since we have no target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) diff --git a/scripts/eastern_kingdoms/zulaman/boss_zuljin.cpp b/scripts/eastern_kingdoms/zulaman/boss_zuljin.cpp index a952577e5..41b0583f7 100644 --- a/scripts/eastern_kingdoms/zulaman/boss_zuljin.cpp +++ b/scripts/eastern_kingdoms/zulaman/boss_zuljin.cpp @@ -144,7 +144,7 @@ struct MANGOS_DLL_DECL boss_zuljinAI : public ScriptedAI GuidList m_lSummonsList; - void Reset() + void Reset() override { m_uiHealthCheck = 80; m_uiPhase = PHASE_TROLL; @@ -167,7 +167,7 @@ struct MANGOS_DLL_DECL boss_zuljinAI : public ScriptedAI SetCombatMovement(true); } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoScriptText(SAY_AGGRO, m_creature); @@ -175,7 +175,7 @@ struct MANGOS_DLL_DECL boss_zuljinAI : public ScriptedAI m_pInstance->SetData(TYPE_ZULJIN, IN_PROGRESS); } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_ZULJIN, FAIL); @@ -194,12 +194,12 @@ struct MANGOS_DLL_DECL boss_zuljinAI : public ScriptedAI } } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { DoScriptText(urand(0, 1) ? SAY_KILL1 : SAY_KILL2, m_creature); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoScriptText(SAY_DEATH, m_creature); @@ -209,7 +209,7 @@ struct MANGOS_DLL_DECL boss_zuljinAI : public ScriptedAI m_pInstance->SetData(TYPE_ZULJIN, DONE); } - void MoveInLineOfSight(Unit* pWho) + void MoveInLineOfSight(Unit* pWho) override { if (!m_bHasTaunted && m_creature->IsWithinDistInMap(pWho, 60.0f)) { @@ -229,7 +229,7 @@ struct MANGOS_DLL_DECL boss_zuljinAI : public ScriptedAI } } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { switch (pSummoned->GetEntry()) { @@ -246,7 +246,7 @@ struct MANGOS_DLL_DECL boss_zuljinAI : public ScriptedAI } } - void MovementInform(uint32 uiMotionType, uint32 uiPointId) + void MovementInform(uint32 uiMotionType, uint32 uiPointId) override { if (uiMotionType != POINT_MOTION_TYPE || uiPointId != POINT_ID_CENTER) return; @@ -262,7 +262,7 @@ struct MANGOS_DLL_DECL boss_zuljinAI : public ScriptedAI pSpirit->CastSpell(m_creature, SPELL_SPIRIT_DRAIN, false); } - void SpellHit(Unit* pCaster, const SpellEntry* pSpell) + void SpellHit(Unit* pCaster, const SpellEntry* pSpell) override { if (pSpell->Id == SPELL_SPIRIT_DRAIN) { @@ -294,7 +294,7 @@ struct MANGOS_DLL_DECL boss_zuljinAI : public ScriptedAI } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim() || m_bIsInTransition) return; diff --git a/scripts/eastern_kingdoms/zulaman/zulaman.cpp b/scripts/eastern_kingdoms/zulaman/zulaman.cpp index ba768a8e6..863ce83ff 100644 --- a/scripts/eastern_kingdoms/zulaman/zulaman.cpp +++ b/scripts/eastern_kingdoms/zulaman/zulaman.cpp @@ -50,7 +50,7 @@ struct MANGOS_DLL_DECL npc_forest_frogAI : public ScriptedAI ScriptedInstance* m_pInstance; - void Reset() { } + void Reset() override { } void DoSpawnRandom() { @@ -91,7 +91,7 @@ struct MANGOS_DLL_DECL npc_forest_frogAI : public ScriptedAI } } - void SpellHit(Unit* caster, const SpellEntry* spell) + void SpellHit(Unit* caster, const SpellEntry* spell) override { if (spell->Id == SPELL_REMOVE_AMANI_CURSE && caster->GetTypeId() == TYPEID_PLAYER && m_creature->GetEntry() == NPC_FOREST_FROG) { @@ -133,7 +133,7 @@ struct MANGOS_DLL_DECL npc_harrison_jones_zaAI : public npc_escortAI ScriptedInstance* m_pInstance; - void WaypointReached(uint32 uiPointId) + void WaypointReached(uint32 uiPointId) override { if (!m_pInstance) return; @@ -159,7 +159,7 @@ struct MANGOS_DLL_DECL npc_harrison_jones_zaAI : public npc_escortAI } } - void Reset() { } + void Reset() override { } void StartEvent() { diff --git a/scripts/eastern_kingdoms/zulaman/zulaman.h b/scripts/eastern_kingdoms/zulaman/zulaman.h index bb6109b4b..e86e0cd90 100644 --- a/scripts/eastern_kingdoms/zulaman/zulaman.h +++ b/scripts/eastern_kingdoms/zulaman/zulaman.h @@ -153,25 +153,25 @@ class MANGOS_DLL_DECL instance_zulaman : public ScriptedInstance public: instance_zulaman(Map* pMap); - void Initialize(); - bool IsEncounterInProgress() const; + void Initialize() override; + bool IsEncounterInProgress() const override; - void OnCreatureCreate(Creature* pCreature); - void OnObjectCreate(GameObject* pGo); - void OnCreatureDeath(Creature* pCreature); + void OnCreatureCreate(Creature* pCreature) override; + void OnObjectCreate(GameObject* pGo) override; + void OnCreatureDeath(Creature* pCreature) override; void OnCreatureEvade(Creature* pCreature); - void SetData(uint32 uiType, uint32 uiData); - uint32 GetData(uint32 uiType); + void SetData(uint32 uiType, uint32 uiData) override; + uint32 GetData(uint32 uiType) override; - const char* Save() { return m_strInstData.c_str(); } - void Load(const char* chrIn); + const char* Save() override { return m_strInstData.c_str(); } + void Load(const char* chrIn) override; bool IsBearPhaseInProgress() { return m_bIsBearPhaseInProgress; } void SetBearEventProgress(bool bIsInProgress) { m_bIsBearPhaseInProgress = bIsInProgress; } void SendNextBearWave(Unit* pTarget); - void Update(uint32 uiDiff); + void Update(uint32 uiDiff) override; private: uint8 GetKilledPreBosses(); diff --git a/scripts/eastern_kingdoms/zulgurub/boss_arlokk.cpp b/scripts/eastern_kingdoms/zulgurub/boss_arlokk.cpp index 6eb773c1e..f10acfbc8 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_arlokk.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_arlokk.cpp @@ -64,7 +64,7 @@ struct MANGOS_DLL_DECL boss_arlokkAI : public ScriptedAI bool m_bIsPhaseTwo; - void Reset() + void Reset() override { m_uiShadowWordPainTimer = 8000; m_uiGougeTimer = 14000; @@ -84,12 +84,12 @@ struct MANGOS_DLL_DECL boss_arlokkAI : public ScriptedAI m_creature->SetVisibility(VISIBILITY_ON); } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoScriptText(SAY_AGGRO, m_creature); } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_ARLOKK, FAIL); @@ -98,7 +98,7 @@ struct MANGOS_DLL_DECL boss_arlokkAI : public ScriptedAI m_creature->ForcedDespawn(); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoScriptText(SAY_DEATH, m_creature); // Restore visibility in case of killed by dots @@ -109,14 +109,14 @@ struct MANGOS_DLL_DECL boss_arlokkAI : public ScriptedAI m_pInstance->SetData(TYPE_ARLOKK, DONE); } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { // Just attack a random target. The Marked player will attract them automatically if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) pSummoned->AI()->AttackStart(pTarget); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/eastern_kingdoms/zulgurub/boss_hakkar.cpp b/scripts/eastern_kingdoms/zulgurub/boss_hakkar.cpp index 786c24908..33f3dc1fe 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_hakkar.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_hakkar.cpp @@ -65,7 +65,7 @@ struct MANGOS_DLL_DECL boss_hakkarAI : public ScriptedAI uint32 m_uiAspectOfThekalTimer; uint32 m_uiAspectOfArlokkTimer; - void Reset() + void Reset() override { m_uiBloodSiphonTimer = 90000; m_uiCorruptedBloodTimer = 25000; @@ -80,7 +80,7 @@ struct MANGOS_DLL_DECL boss_hakkarAI : public ScriptedAI m_uiAspectOfArlokkTimer = 18000; } - void Aggro(Unit* who) + void Aggro(Unit* who) override { DoScriptText(SAY_AGGRO, m_creature); @@ -100,7 +100,7 @@ struct MANGOS_DLL_DECL boss_hakkarAI : public ScriptedAI } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/eastern_kingdoms/zulgurub/boss_hazzarah.cpp b/scripts/eastern_kingdoms/zulgurub/boss_hazzarah.cpp index b3f72e2c4..2e4e1e8b5 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_hazzarah.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_hazzarah.cpp @@ -42,7 +42,7 @@ struct MANGOS_DLL_DECL boss_hazzarahAI : public ScriptedAI uint32 m_uiEarthShockTimer; uint32 m_uiIllusionsTimer; - void Reset() + void Reset() override { m_uiManaBurnTimer = urand(4000, 10000); m_uiSleepTimer = urand(10000, 18000); @@ -50,13 +50,13 @@ struct MANGOS_DLL_DECL boss_hazzarahAI : public ScriptedAI m_uiIllusionsTimer = urand(10000, 18000); } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) pSummoned->AI()->AttackStart(pTarget); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/eastern_kingdoms/zulgurub/boss_jeklik.cpp b/scripts/eastern_kingdoms/zulgurub/boss_jeklik.cpp index c119216b6..907302c07 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_jeklik.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_jeklik.cpp @@ -86,7 +86,7 @@ struct MANGOS_DLL_DECL boss_jeklikAI : public ScriptedAI GuidList m_lBombRiderGuidsList; - void Reset() + void Reset() override { m_uiChargeTimer = 20000; m_uiSwoopTimer = 5000; @@ -103,7 +103,7 @@ struct MANGOS_DLL_DECL boss_jeklikAI : public ScriptedAI DoCastSpellIfCan(m_creature, SPELL_GREEN_CHANNELING); } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoScriptText(SAY_AGGRO, m_creature); @@ -112,7 +112,7 @@ struct MANGOS_DLL_DECL boss_jeklikAI : public ScriptedAI m_creature->SetLevitate(true); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoScriptText(SAY_DEATH, m_creature); DoDespawnBombRiders(); @@ -121,7 +121,7 @@ struct MANGOS_DLL_DECL boss_jeklikAI : public ScriptedAI m_pInstance->SetData(TYPE_JEKLIK, DONE); } - void JustReachedHome() + void JustReachedHome() override { DoDespawnBombRiders(); @@ -129,7 +129,7 @@ struct MANGOS_DLL_DECL boss_jeklikAI : public ScriptedAI m_pInstance->SetData(TYPE_JEKLIK, FAIL); } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { if (pSummoned->GetEntry() == NPC_FRENZIED_BAT) { @@ -158,7 +158,7 @@ struct MANGOS_DLL_DECL boss_jeklikAI : public ScriptedAI } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -292,7 +292,7 @@ struct MANGOS_DLL_DECL npc_gurubashi_bat_riderAI : public ScriptedAI uint32 m_uiInfectedBiteTimer; uint32 m_uiBattleCommandTimer; - void Reset() + void Reset() override { m_uiInfectedBiteTimer = 6500; m_uiBattleCommandTimer = 8000; @@ -302,7 +302,7 @@ struct MANGOS_DLL_DECL npc_gurubashi_bat_riderAI : public ScriptedAI DoCastSpellIfCan(m_creature, SPELL_TRASH); } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { // Don't attack if is summoned by Jeklik - the npc gets aggro because of the Liquid Fire if (m_bIsSummon) @@ -313,7 +313,7 @@ struct MANGOS_DLL_DECL npc_gurubashi_bat_riderAI : public ScriptedAI m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); } - void AttackStart(Unit* pWho) + void AttackStart(Unit* pWho) override { // Don't attack if is summoned by Jeklik if (m_bIsSummon) @@ -322,7 +322,7 @@ struct MANGOS_DLL_DECL npc_gurubashi_bat_riderAI : public ScriptedAI ScriptedAI::AttackStart(pWho); } - void MoveInLineOfSight(Unit* pWho) + void MoveInLineOfSight(Unit* pWho) override { // Don't attack if is summoned by Jeklik if (m_bIsSummon) @@ -331,7 +331,7 @@ struct MANGOS_DLL_DECL npc_gurubashi_bat_riderAI : public ScriptedAI ScriptedAI::MoveInLineOfSight(pWho); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/eastern_kingdoms/zulgurub/boss_jindo.cpp b/scripts/eastern_kingdoms/zulgurub/boss_jindo.cpp index 61bdf4d77..874d56e11 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_jindo.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_jindo.cpp @@ -65,7 +65,7 @@ struct MANGOS_DLL_DECL boss_jindoAI : public ScriptedAI uint32 m_uiDelusionsTimer; uint32 m_uiTeleportTimer; - void Reset() + void Reset() override { m_uiBrainWashTotemTimer = 20000; m_uiHealingWardTimer = 16000; @@ -74,18 +74,18 @@ struct MANGOS_DLL_DECL boss_jindoAI : public ScriptedAI m_uiTeleportTimer = 5000; } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoScriptText(SAY_AGGRO, m_creature); } - void SummonedCreatureJustDied(Creature* pSummoned) + void SummonedCreatureJustDied(Creature* pSummoned) override { if (pSummoned->GetEntry() == NPC_POWERFULL_HEALING_WARD) m_uiHealingWardTimer = 15000; // how long delay? } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -174,15 +174,15 @@ struct MANGOS_DLL_DECL mob_healing_wardAI : public ScriptedAI uint32 m_uiHealTimer; - void Reset() + void Reset() override { m_uiHealTimer = 3000; // Timer unknown, sources go over 1s, per tick to 3s, keep 3s as in original script } - void AttackStart(Unit* pWho) {} - void MoveInLineOfSight(Unit* pWho) {} + void AttackStart(Unit* pWho) override {} + void MoveInLineOfSight(Unit* pWho) override {} - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { // Heal Timer if (m_uiHealTimer < uiDiff) diff --git a/scripts/eastern_kingdoms/zulgurub/boss_mandokir.cpp b/scripts/eastern_kingdoms/zulgurub/boss_mandokir.cpp index dc4049825..bc1d7edcb 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_mandokir.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_mandokir.cpp @@ -106,7 +106,7 @@ struct MANGOS_DLL_DECL boss_mandokirAI : public ScriptedAI float m_fTargetThreat; ObjectGuid m_watchTargetGuid; - void Reset() + void Reset() override { m_uiWatchTimer = 33000; m_uiCleaveTimer = 7000; @@ -120,7 +120,7 @@ struct MANGOS_DLL_DECL boss_mandokirAI : public ScriptedAI m_fTargetThreat = 0.0f; } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoScriptText(SAY_AGGRO, m_creature); @@ -137,19 +137,19 @@ struct MANGOS_DLL_DECL boss_mandokirAI : public ScriptedAI m_pInstance->SetData(TYPE_OHGAN, IN_PROGRESS); } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_OHGAN, FAIL); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { if (m_pInstance) m_pInstance->SetData(TYPE_OHGAN, DONE); } - void EnterEvadeMode() + void EnterEvadeMode() override { m_creature->RemoveAllAuras(); m_creature->DeleteThreatList(); @@ -165,7 +165,7 @@ struct MANGOS_DLL_DECL boss_mandokirAI : public ScriptedAI Reset(); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { if (pVictim->GetTypeId() == TYPEID_PLAYER) { @@ -196,7 +196,7 @@ struct MANGOS_DLL_DECL boss_mandokirAI : public ScriptedAI } } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { if (pSummoned->GetEntry() == NPC_OHGAN) { @@ -205,7 +205,7 @@ struct MANGOS_DLL_DECL boss_mandokirAI : public ScriptedAI } } - void SummonedCreatureJustDied(Creature* pSummoned) + void SummonedCreatureJustDied(Creature* pSummoned) override { if (pSummoned->GetEntry() == NPC_OHGAN) { @@ -214,7 +214,7 @@ struct MANGOS_DLL_DECL boss_mandokirAI : public ScriptedAI } } - void SpellHitTarget(Unit* pTarget, const SpellEntry* pSpell) + void SpellHitTarget(Unit* pTarget, const SpellEntry* pSpell) override { if (pSpell->Id == SPELL_WATCH) { @@ -231,7 +231,7 @@ struct MANGOS_DLL_DECL boss_mandokirAI : public ScriptedAI } } - void MovementInform(uint32 uiMoveType, uint32 uiPointId) + void MovementInform(uint32 uiMoveType, uint32 uiPointId) override { if (uiMoveType != POINT_MOTION_TYPE || !m_pInstance) return; @@ -243,7 +243,7 @@ struct MANGOS_DLL_DECL boss_mandokirAI : public ScriptedAI } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -346,12 +346,12 @@ struct MANGOS_DLL_DECL mob_ohganAI : public ScriptedAI uint32 m_uiSunderArmorTimer; - void Reset() + void Reset() override { m_uiSunderArmorTimer = 5000; } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { if (pVictim->GetTypeId() == TYPEID_PLAYER) { @@ -363,7 +363,7 @@ struct MANGOS_DLL_DECL mob_ohganAI : public ScriptedAI } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/eastern_kingdoms/zulgurub/boss_marli.cpp b/scripts/eastern_kingdoms/zulgurub/boss_marli.cpp index db5d90de4..8b0ef8bb8 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_marli.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_marli.cpp @@ -72,7 +72,7 @@ struct MANGOS_DLL_DECL boss_marliAI : public ScriptedAI bool m_bIsInPhaseTwo; - void Reset() + void Reset() override { m_uiPoisonVolleyTimer = 15000; m_uiSpawnSpiderTimer = 55000; @@ -85,14 +85,14 @@ struct MANGOS_DLL_DECL boss_marliAI : public ScriptedAI m_bIsInPhaseTwo = false; } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoScriptText(SAY_AGGRO, m_creature); DoCastSpellIfCan(m_creature, SPELL_HATCH_EGGS); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoScriptText(SAY_DEATH, m_creature); @@ -100,13 +100,13 @@ struct MANGOS_DLL_DECL boss_marliAI : public ScriptedAI m_pInstance->SetData(TYPE_MARLI, DONE); } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_MARLI, FAIL); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/eastern_kingdoms/zulgurub/boss_renataki.cpp b/scripts/eastern_kingdoms/zulgurub/boss_renataki.cpp index 2c42e2768..9f5ad513a 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_renataki.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_renataki.cpp @@ -40,7 +40,7 @@ struct MANGOS_DLL_DECL boss_renatakiAI : public ScriptedAI uint32 m_uiGougeTimer; uint32 m_uiThousandBladesTimer; - void Reset() + void Reset() override { m_uiVanishTimer = urand(25000, 30000); m_uiAmbushTimer = 0; @@ -48,7 +48,7 @@ struct MANGOS_DLL_DECL boss_renatakiAI : public ScriptedAI m_uiThousandBladesTimer = urand(4000, 8000); } - void EnterEvadeMode() + void EnterEvadeMode() override { // If is vanished, don't evade if (m_uiAmbushTimer) @@ -57,7 +57,7 @@ struct MANGOS_DLL_DECL boss_renatakiAI : public ScriptedAI ScriptedAI::EnterEvadeMode(); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/eastern_kingdoms/zulgurub/boss_thekal.cpp b/scripts/eastern_kingdoms/zulgurub/boss_thekal.cpp index 66e97d86e..a133c322b 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_thekal.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_thekal.cpp @@ -71,7 +71,7 @@ struct MANGOS_DLL_DECL boss_thekalBaseAI : public ScriptedAI virtual void OnFakeingDeath() {} virtual void OnRevive() {} - void DamageTaken(Unit* pKiller, uint32& uiDamage) + void DamageTaken(Unit* pKiller, uint32& uiDamage) override { if (uiDamage < m_creature->GetHealth()) return; @@ -158,7 +158,7 @@ struct MANGOS_DLL_DECL boss_thekalAI : public boss_thekalBaseAI bool m_bEnraged; - void Reset() + void Reset() override { m_uiMortalCleaveTimer = 4000; m_uiSilenceTimer = 9000; @@ -176,12 +176,12 @@ struct MANGOS_DLL_DECL boss_thekalAI : public boss_thekalBaseAI Revive(true); } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoScriptText(SAY_AGGRO, m_creature); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoScriptText(SAY_DEATH, m_creature); @@ -197,7 +197,7 @@ struct MANGOS_DLL_DECL boss_thekalAI : public boss_thekalBaseAI pLorkhan->ForcedDespawn(); } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_THEKAL, FAIL); @@ -252,7 +252,7 @@ struct MANGOS_DLL_DECL boss_thekalAI : public boss_thekalBaseAI } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -373,7 +373,7 @@ struct MANGOS_DLL_DECL mob_zealot_lorkhanAI : public boss_thekalBaseAI uint32 m_uiDisarmTimer; uint32 m_uiResurrectTimer; - void Reset() + void Reset() override { m_uiShieldTimer = 1000; m_uiBloodLustTimer = 16000; @@ -387,7 +387,7 @@ struct MANGOS_DLL_DECL mob_zealot_lorkhanAI : public boss_thekalBaseAI Revive(true); } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { if (m_pInstance) m_pInstance->SetData(TYPE_LORKHAN, IN_PROGRESS); @@ -401,7 +401,7 @@ struct MANGOS_DLL_DECL mob_zealot_lorkhanAI : public boss_thekalBaseAI m_pInstance->SetData(TYPE_LORKHAN, SPECIAL); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -513,7 +513,7 @@ struct MANGOS_DLL_DECL mob_zealot_zathAI : public boss_thekalBaseAI uint32 m_uiBlindTimer; uint32 m_uiResurrectTimer; - void Reset() + void Reset() override { m_uiSweepingStrikesTimer = 13000; m_uiSinisterStrikeTimer = 8000; @@ -528,7 +528,7 @@ struct MANGOS_DLL_DECL mob_zealot_zathAI : public boss_thekalBaseAI Revive(true); } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { if (m_pInstance) m_pInstance->SetData(TYPE_ZATH, IN_PROGRESS); @@ -542,7 +542,7 @@ struct MANGOS_DLL_DECL mob_zealot_zathAI : public boss_thekalBaseAI m_pInstance->SetData(TYPE_ZATH, SPECIAL); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/eastern_kingdoms/zulgurub/boss_venoxis.cpp b/scripts/eastern_kingdoms/zulgurub/boss_venoxis.cpp index 1a803261e..c177d09bc 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_venoxis.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_venoxis.cpp @@ -68,7 +68,7 @@ struct MANGOS_DLL_DECL boss_venoxisAI : public ScriptedAI bool m_bPhaseTwo; bool m_bInBerserk; - void Reset() + void Reset() override { m_uiHolyWrathTimer = 40000; m_uiVenomSpitTimer = 5500; @@ -82,13 +82,13 @@ struct MANGOS_DLL_DECL boss_venoxisAI : public ScriptedAI m_bInBerserk = false; } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_VENOXIS, FAIL); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoScriptText(SAY_DEATH, m_creature); @@ -96,7 +96,7 @@ struct MANGOS_DLL_DECL boss_venoxisAI : public ScriptedAI m_pInstance->SetData(TYPE_VENOXIS, DONE); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/eastern_kingdoms/zulgurub/zulgurub.h b/scripts/eastern_kingdoms/zulgurub/zulgurub.h index 784c64a43..7a8b84f85 100644 --- a/scripts/eastern_kingdoms/zulgurub/zulgurub.h +++ b/scripts/eastern_kingdoms/zulgurub/zulgurub.h @@ -49,17 +49,17 @@ class MANGOS_DLL_DECL instance_zulgurub : public ScriptedInstance instance_zulgurub(Map* pMap); ~instance_zulgurub() {} - void Initialize(); - // IsEncounterInProgress() const { return false; } // not active in Zul'Gurub + void Initialize() override; + // IsEncounterInProgress() const override { return false; } // not active in Zul'Gurub - void OnCreatureCreate(Creature* pCreature); - void OnObjectCreate(GameObject* pGo); + void OnCreatureCreate(Creature* pCreature) override; + void OnObjectCreate(GameObject* pGo) override; - void SetData(uint32 uiType, uint32 uiData); - uint32 GetData(uint32 uiType); + void SetData(uint32 uiType, uint32 uiData) override; + uint32 GetData(uint32 uiType) override; - const char* Save() { return m_strInstData.c_str(); } - void Load(const char* chrIn); + const char* Save() override { return m_strInstData.c_str(); } + void Load(const char* chrIn) override; void DoYellAtTriggerIfCan(uint32 uiTriggerId); diff --git a/scripts/examples/example_creature.cpp b/scripts/examples/example_creature.cpp index a9cb5f724..73a14e0f8 100644 --- a/scripts/examples/example_creature.cpp +++ b/scripts/examples/example_creature.cpp @@ -90,7 +90,7 @@ struct MANGOS_DLL_DECL example_creatureAI : public ScriptedAI // *** HANDLED FUNCTION *** // This is called whenever the core decides we need to evade - void Reset() + void Reset() override { m_uiPhase = 1; // Start in phase 1 m_uiPhaseTimer = 60000; // 60 seconds @@ -102,7 +102,7 @@ struct MANGOS_DLL_DECL example_creatureAI : public ScriptedAI // *** HANDLED FUNCTION *** // Aggro is called when we enter combat, against an enemy, and haven't been in combat before - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { // Say some stuff DoScriptText(SAY_AGGRO, m_creature, pWho); @@ -110,7 +110,7 @@ struct MANGOS_DLL_DECL example_creatureAI : public ScriptedAI // *** HANDLED FUNCTION *** // Our Recive emote function - void ReceiveEmote(Player* pPlayer, uint32 uiTextEmote) + void ReceiveEmote(Player* pPlayer, uint32 uiTextEmote) override { m_creature->HandleEmote(uiTextEmote); @@ -127,7 +127,7 @@ struct MANGOS_DLL_DECL example_creatureAI : public ScriptedAI // *** HANDLED FUNCTION *** // Update AI is called Every single map update (roughly once every 100ms if a player is within the grid) - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { // Out of combat timers if (!m_creature->getVictim()) diff --git a/scripts/examples/example_escort.cpp b/scripts/examples/example_escort.cpp index 9a89aeaae..8bcdd27d7 100644 --- a/scripts/examples/example_escort.cpp +++ b/scripts/examples/example_escort.cpp @@ -59,19 +59,19 @@ struct MANGOS_DLL_DECL example_escortAI : public npc_escortAI uint32 m_uiChatTimer; // Is called after each combat, so usally only reset combat-stuff here - void Reset() + void Reset() override { m_uiDeathCoilTimer = 4000; m_uiChatTimer = 4000; } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { pSummoned->AI()->AttackStart(m_creature); } // Pure Virtual Functions (Have to be implemented) - void WaypointReached(uint32 uiWP) + void WaypointReached(uint32 uiWP) override { switch (uiWP) { @@ -94,7 +94,7 @@ struct MANGOS_DLL_DECL example_escortAI : public npc_escortAI } } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { if (HasEscortState(STATE_ESCORT_ESCORTING)) { @@ -106,7 +106,7 @@ struct MANGOS_DLL_DECL example_escortAI : public npc_escortAI } // Only overwrite if there is something special - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { if (HasEscortState(STATE_ESCORT_ESCORTING)) { @@ -129,7 +129,7 @@ struct MANGOS_DLL_DECL example_escortAI : public npc_escortAI npc_escortAI::JustDied(pKiller); } - void UpdateEscortAI(const uint32 uiDiff) + void UpdateEscortAI(const uint32 uiDiff) override { // Combat check if (m_creature->SelectHostileTarget() && m_creature->getVictim()) diff --git a/scripts/kalimdor/ashenvale.cpp b/scripts/kalimdor/ashenvale.cpp index e7313679e..b334de64c 100644 --- a/scripts/kalimdor/ashenvale.cpp +++ b/scripts/kalimdor/ashenvale.cpp @@ -94,7 +94,7 @@ struct MANGOS_DLL_DECL npc_muglashAI : public npc_escortAI uint32 m_uiWaveId; uint32 m_uiEventTimer; - void Reset() + void Reset() override { m_uiEventTimer = 10000; @@ -105,7 +105,7 @@ struct MANGOS_DLL_DECL npc_muglashAI : public npc_escortAI } } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { if (HasEscortState(STATE_ESCORT_PAUSED)) { @@ -117,7 +117,7 @@ struct MANGOS_DLL_DECL npc_muglashAI : public npc_escortAI } } - void WaypointReached(uint32 uiPointId) + void WaypointReached(uint32 uiPointId) override { switch (uiPointId) { @@ -175,12 +175,12 @@ struct MANGOS_DLL_DECL npc_muglashAI : public npc_escortAI } } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { pSummoned->AI()->AttackStart(m_creature); } - void UpdateEscortAI(const uint32 uiDiff) + void UpdateEscortAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) { @@ -256,9 +256,9 @@ struct MANGOS_DLL_DECL npc_ruul_snowhoofAI : public npc_escortAI { npc_ruul_snowhoofAI(Creature* pCreature) : npc_escortAI(pCreature) { Reset(); } - void Reset() {} + void Reset() override {} - void WaypointReached(uint32 uiPointId) + void WaypointReached(uint32 uiPointId) override { switch (uiPointId) { @@ -279,7 +279,7 @@ struct MANGOS_DLL_DECL npc_ruul_snowhoofAI : public npc_escortAI } } - void JustSummoned(Creature* summoned) + void JustSummoned(Creature* summoned) override { summoned->AI()->AttackStart(m_creature); } @@ -333,13 +333,13 @@ struct MANGOS_DLL_DECL npc_torekAI : public npc_escortAI uint32 m_uiRend_Timer; uint32 m_uiThunderclap_Timer; - void Reset() + void Reset() override { m_uiRend_Timer = 5000; m_uiThunderclap_Timer = 8000; } - void WaypointReached(uint32 uiPointId) + void WaypointReached(uint32 uiPointId) override { Player* pPlayer = GetPlayerForEscort(); @@ -370,12 +370,12 @@ struct MANGOS_DLL_DECL npc_torekAI : public npc_escortAI } } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { pSummoned->AI()->AttackStart(m_creature); } - void UpdateEscortAI(const uint32 uiDiff) + void UpdateEscortAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -476,7 +476,7 @@ struct MANGOS_DLL_DECL npc_feero_ironhandAI : public npc_escortAI uint8 m_uiCreaturesCount; bool m_bIsAttacked; - void Reset() + void Reset() override { if (!HasEscortState(STATE_ESCORT_ESCORTING)) { @@ -485,7 +485,7 @@ struct MANGOS_DLL_DECL npc_feero_ironhandAI : public npc_escortAI } } - void WaypointReached(uint32 uiPointId) + void WaypointReached(uint32 uiPointId) override { switch (uiPointId) { @@ -516,7 +516,7 @@ struct MANGOS_DLL_DECL npc_feero_ironhandAI : public npc_escortAI } } - void AttackedBy(Unit* pWho) + void AttackedBy(Unit* pWho) override { // Yell only at the first attack if (!m_bIsAttacked) @@ -538,7 +538,7 @@ struct MANGOS_DLL_DECL npc_feero_ironhandAI : public npc_escortAI m_creature->SummonCreature(uiEntry, fX, fY, fZ, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 20000); } - void SummonedCreatureJustDied(Creature* pSummoned) + void SummonedCreatureJustDied(Creature* pSummoned) override { --m_uiCreaturesCount; @@ -561,7 +561,7 @@ struct MANGOS_DLL_DECL npc_feero_ironhandAI : public npc_escortAI } } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { if (pSummoned->GetEntry() == NPC_FORSAKEN_SCOUT) { diff --git a/scripts/kalimdor/azshara.cpp b/scripts/kalimdor/azshara.cpp index 5bc25ba2b..699dd187f 100644 --- a/scripts/kalimdor/azshara.cpp +++ b/scripts/kalimdor/azshara.cpp @@ -86,7 +86,7 @@ struct MANGOS_DLL_DECL npc_rizzle_sprysprocketAI : public npc_escortAI uint32 m_uiIntroTimer; uint32 m_uiDepthChargeTimer; - void MoveInLineOfSight(Unit* pUnit) + void MoveInLineOfSight(Unit* pUnit) override { if (HasEscortState(STATE_ESCORT_ESCORTING) && pUnit->GetTypeId() == TYPEID_PLAYER) { @@ -100,7 +100,7 @@ struct MANGOS_DLL_DECL npc_rizzle_sprysprocketAI : public npc_escortAI npc_escortAI::MoveInLineOfSight(pUnit); } - void WaypointReached(uint32 uiPointId) + void WaypointReached(uint32 uiPointId) override { switch (uiPointId) { @@ -110,9 +110,9 @@ struct MANGOS_DLL_DECL npc_rizzle_sprysprocketAI : public npc_escortAI } } - void Reset() { } + void Reset() override { } - void SpellHit(Unit* pCaster, const SpellEntry* pSpell) + void SpellHit(Unit* pCaster, const SpellEntry* pSpell) override { if (pSpell->Id == SPELL_SURRENDER) { @@ -123,19 +123,19 @@ struct MANGOS_DLL_DECL npc_rizzle_sprysprocketAI : public npc_escortAI } // this may be wrong (and doesn't work) - void SpellHitTarget(Unit* pTarget, const SpellEntry* pSpell) + void SpellHitTarget(Unit* pTarget, const SpellEntry* pSpell) override { if (pTarget->GetTypeId() == TYPEID_PLAYER && pSpell->Id == SPELL_FROST_GRENADE) DoScriptText(SAY_WHISPER_CHILL, m_creature, pTarget); } // this may be wrong - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { // pSummoned->CastSpell(pSummoned,SPELL_PERIODIC_GRENADE,false,NULL,NULL,m_creature->GetObjectGuid()); } - void UpdateEscortAI(const uint32 uiDiff) + void UpdateEscortAI(const uint32 uiDiff) override { if (m_bIsIntro) { @@ -209,7 +209,7 @@ struct MANGOS_DLL_DECL npc_depth_chargeAI : public ScriptedAI { npc_depth_chargeAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } - void MoveInLineOfSight(Unit* pUnit) + void MoveInLineOfSight(Unit* pUnit) override { if (pUnit->GetTypeId() != TYPEID_PLAYER) return; @@ -218,7 +218,7 @@ struct MANGOS_DLL_DECL npc_depth_chargeAI : public ScriptedAI m_creature->CastSpell(pUnit, SPELL_TRAP, false); } - void Reset() { } + void Reset() override { } }; CreatureAI* GetAI_npc_depth_charge(Creature* pCreature) @@ -309,7 +309,7 @@ struct MANGOS_DLL_DECL mobs_spitelashesAI : public ScriptedAI UNORDERED_MAP m_mSpellTimers; - void Reset() + void Reset() override { m_uiMorphTimer = 0; @@ -317,7 +317,7 @@ struct MANGOS_DLL_DECL mobs_spitelashesAI : public ScriptedAI itr->second = m_aSpitelashAbility[itr->first].m_uiInitialTimer; } - void SpellHit(Unit* pCaster, const SpellEntry* pSpell) + void SpellHit(Unit* pCaster, const SpellEntry* pSpell) override { // If already hit by the polymorph return if (m_uiMorphTimer) @@ -358,7 +358,7 @@ struct MANGOS_DLL_DECL mobs_spitelashesAI : public ScriptedAI return false; } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/kalimdor/azuremyst_isle.cpp b/scripts/kalimdor/azuremyst_isle.cpp index 9076d8d04..5ed0c8bcc 100644 --- a/scripts/kalimdor/azuremyst_isle.cpp +++ b/scripts/kalimdor/azuremyst_isle.cpp @@ -63,7 +63,7 @@ struct MANGOS_DLL_DECL npc_draenei_survivorAI : public ScriptedAI bool m_bCanSayHelp; - void Reset() + void Reset() override { m_casterGuid.Clear(); @@ -81,7 +81,7 @@ struct MANGOS_DLL_DECL npc_draenei_survivorAI : public ScriptedAI m_creature->SetStandState(UNIT_STAND_STATE_SLEEP); } - void MoveInLineOfSight(Unit* pWho) + void MoveInLineOfSight(Unit* pWho) override { if (m_bCanSayHelp && pWho->GetTypeId() == TYPEID_PLAYER && m_creature->IsFriendlyTo(pWho) && m_creature->IsWithinDistInMap(pWho, 25.0f)) @@ -100,7 +100,7 @@ struct MANGOS_DLL_DECL npc_draenei_survivorAI : public ScriptedAI } } - void SpellHit(Unit* pCaster, const SpellEntry* pSpell) + void SpellHit(Unit* pCaster, const SpellEntry* pSpell) override { if (pSpell->IsFitToFamilyMask(UI64LIT(0x0000000000000000), 0x080000000)) { @@ -115,7 +115,7 @@ struct MANGOS_DLL_DECL npc_draenei_survivorAI : public ScriptedAI } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (m_uiSayThanksTimer) { @@ -213,7 +213,7 @@ struct MANGOS_DLL_DECL npc_engineer_spark_overgrindAI : public ScriptedAI bool m_bIsTreeEvent; - void Reset() + void Reset() override { m_creature->setFaction(m_uiNormFaction); m_creature->SetUInt32Value(UNIT_NPC_FLAGS, m_uiNpcFlags); @@ -224,12 +224,12 @@ struct MANGOS_DLL_DECL npc_engineer_spark_overgrindAI : public ScriptedAI m_bIsTreeEvent = false; } - void Aggro(Unit* who) + void Aggro(Unit* who) override { DoScriptText(SAY_ATTACK, m_creature, who); } - void UpdateAI(const uint32 diff) + void UpdateAI(const uint32 diff) override { if (!m_creature->isInCombat() && !m_bIsTreeEvent) { @@ -294,7 +294,7 @@ struct MANGOS_DLL_DECL npc_injured_draeneiAI : public ScriptedAI { npc_injured_draeneiAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} - void Reset() + void Reset() override { m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IN_COMBAT); m_creature->SetHealth(int(m_creature->GetMaxHealth()*.15)); @@ -305,9 +305,9 @@ struct MANGOS_DLL_DECL npc_injured_draeneiAI : public ScriptedAI } } - void MoveInLineOfSight(Unit* pWho) { } // ignore everyone around them (won't aggro anything) + void MoveInLineOfSight(Unit* pWho) override {} // ignore everyone around them (won't aggro anything) - void UpdateAI(const uint32 uiDiff) { } + void UpdateAI(const uint32 uiDiff) override {} }; CreatureAI* GetAI_npc_injured_draenei(Creature* pCreature) @@ -335,7 +335,7 @@ struct MANGOS_DLL_DECL npc_magwinAI : public npc_escortAI { npc_magwinAI(Creature* pCreature) : npc_escortAI(pCreature) { Reset(); } - void WaypointReached(uint32 uiPointId) + void WaypointReached(uint32 uiPointId) override { Player* pPlayer = GetPlayerForEscort(); @@ -361,12 +361,12 @@ struct MANGOS_DLL_DECL npc_magwinAI : public npc_escortAI } } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoScriptText(SAY_AGGRO, m_creature, pWho); } - void Reset() { } + void Reset() override { } }; bool QuestAccept_npc_magwin(Player* pPlayer, Creature* pCreature, const Quest* pQuest) diff --git a/scripts/kalimdor/blackfathom_deeps/blackfathom_deeps.h b/scripts/kalimdor/blackfathom_deeps/blackfathom_deeps.h index 6804ba709..8bb4b0614 100644 --- a/scripts/kalimdor/blackfathom_deeps/blackfathom_deeps.h +++ b/scripts/kalimdor/blackfathom_deeps/blackfathom_deeps.h @@ -91,19 +91,19 @@ class MANGOS_DLL_DECL instance_blackfathom_deeps : public ScriptedInstance instance_blackfathom_deeps(Map* pMap); ~instance_blackfathom_deeps() {} - void Initialize(); + void Initialize() override; - void OnCreatureCreate(Creature* pCreature); - void OnObjectCreate(GameObject* pGo); - void OnCreatureDeath(Creature* pCreature); + void OnCreatureCreate(Creature* pCreature) override; + void OnObjectCreate(GameObject* pGo) override; + void OnCreatureDeath(Creature* pCreature) override; - void Update(uint32 uiDiff); + void Update(uint32 uiDiff) override; - void SetData(uint32 uiType, uint32 uiData); - uint32 GetData(uint32 uiType); + void SetData(uint32 uiType, uint32 uiData) override; + uint32 GetData(uint32 uiType) override; - const char* Save() { return m_strInstData.c_str(); } - void Load(const char* chrIn); + const char* Save() override { return m_strInstData.c_str(); } + void Load(const char* chrIn) override; protected: void DoSpawnMobs(uint8 uiWaveIndex); diff --git a/scripts/kalimdor/bloodmyst_isle.cpp b/scripts/kalimdor/bloodmyst_isle.cpp index 891c5cbc9..172a14260 100644 --- a/scripts/kalimdor/bloodmyst_isle.cpp +++ b/scripts/kalimdor/bloodmyst_isle.cpp @@ -43,11 +43,11 @@ struct MANGOS_DLL_DECL mob_webbed_creatureAI : public Scripted_NoMovementAI { mob_webbed_creatureAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { Reset(); } - void Reset() { } - void AttackStart(Unit* pWho) { } - void MoveInLineOfSight(Unit* pWho) { } + void Reset() override { } + void AttackStart(Unit* pWho) override { } + void MoveInLineOfSight(Unit* pWho) override { } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { uint32 uiSpawnCreatureEntry = 0; diff --git a/scripts/kalimdor/boss_azuregos.cpp b/scripts/kalimdor/boss_azuregos.cpp index a792c814a..beaebfa93 100644 --- a/scripts/kalimdor/boss_azuregos.cpp +++ b/scripts/kalimdor/boss_azuregos.cpp @@ -50,7 +50,7 @@ struct MANGOS_DLL_DECL boss_azuregosAI : public ScriptedAI uint32 m_uiCleaveTimer; bool m_bEnraged; - void Reset() + void Reset() override { m_uiManaStormTimer = urand(5000, 17000); m_uiChillTimer = urand(10000, 30000); @@ -61,20 +61,20 @@ struct MANGOS_DLL_DECL boss_azuregosAI : public ScriptedAI m_bEnraged = false; } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { // Mark killed players with Mark of Frost if (pVictim->GetTypeId() == TYPEID_PLAYER) pVictim->CastSpell(pVictim, SPELL_MARK_OF_FROST_PLAYER, true, NULL, NULL, m_creature->GetObjectGuid()); } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { // Boss aura which triggers the stun effect on dead players who resurrect DoCastSpellIfCan(m_creature, SPELL_MARK_OF_FROST_AURA); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { // Return since we have no target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) diff --git a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.h b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.h index 793a88332..3622b6540 100644 --- a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.h +++ b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.h @@ -115,18 +115,18 @@ class MANGOS_DLL_DECL instance_culling_of_stratholme : public ScriptedInstance instance_culling_of_stratholme(Map* pMap); ~instance_culling_of_stratholme() {} - void Initialize(); + void Initialize() override; - void OnCreatureCreate(Creature* pCreature); - void OnObjectCreate(GameObject* pGo); + void OnCreatureCreate(Creature* pCreature) override; + void OnObjectCreate(GameObject* pGo) override; - void SetData(uint32 uiType, uint32 uiData); - uint32 GetData(uint32 uiType); + void SetData(uint32 uiType, uint32 uiData) override; + uint32 GetData(uint32 uiType) override; - const char* Save() { return m_strInstData.c_str(); } - void Load(const char* chrIn); + const char* Save() override { return m_strInstData.c_str(); } + void Load(const char* chrIn) override; - void Update(uint32 uiDiff); + void Update(uint32 uiDiff) override; void GetStratAgiatedCitizenList(GuidList& lList) { lList = m_lAgiatedCitizenGUIDList; }; void GetStratAgiatedResidentList(GuidList& lList) { lList = m_lAgiatedResidentGUIDList; }; @@ -140,7 +140,7 @@ class MANGOS_DLL_DECL instance_culling_of_stratholme : public ScriptedInstance void ArthasJustDied(); protected: - void OnPlayerEnter(Player* pPlayer); + void OnPlayerEnter(Player* pPlayer) override; void DoChromieHurrySpeech(); uint32 m_auiEncounter[MAX_ENCOUNTER]; diff --git a/scripts/kalimdor/caverns_of_time/dark_portal/boss_aeonus.cpp b/scripts/kalimdor/caverns_of_time/dark_portal/boss_aeonus.cpp index 91aeaa949..c6b3e1272 100644 --- a/scripts/kalimdor/caverns_of_time/dark_portal/boss_aeonus.cpp +++ b/scripts/kalimdor/caverns_of_time/dark_portal/boss_aeonus.cpp @@ -57,7 +57,7 @@ struct MANGOS_DLL_DECL boss_aeonusAI : public ScriptedAI uint32 m_uiFrenzyTimer; uint32 m_uiCleaveTimer; - void Reset() + void Reset() override { m_uiSandBreathTimer = urand(15000, 30000); m_uiTimeStopTimer = urand(10000, 15000); @@ -65,12 +65,12 @@ struct MANGOS_DLL_DECL boss_aeonusAI : public ScriptedAI m_uiCleaveTimer = urand(5000, 9000); } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoScriptText(SAY_AGGRO, m_creature); } - void MoveInLineOfSight(Unit* pWho) + void MoveInLineOfSight(Unit* pWho) override { // Despawn Time Keeper if (pWho->GetTypeId() == TYPEID_UNIT && pWho->GetEntry() == NPC_TIME_KEEPER) @@ -85,17 +85,17 @@ struct MANGOS_DLL_DECL boss_aeonusAI : public ScriptedAI ScriptedAI::MoveInLineOfSight(pWho); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoScriptText(SAY_DEATH, m_creature); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { DoScriptText(urand(0, 1) ? SAY_SLAY1 : SAY_SLAY2, m_creature); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { // Return since we have no target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) diff --git a/scripts/kalimdor/caverns_of_time/dark_portal/boss_chrono_lord_deja.cpp b/scripts/kalimdor/caverns_of_time/dark_portal/boss_chrono_lord_deja.cpp index bc30c19fe..2a77964c8 100644 --- a/scripts/kalimdor/caverns_of_time/dark_portal/boss_chrono_lord_deja.cpp +++ b/scripts/kalimdor/caverns_of_time/dark_portal/boss_chrono_lord_deja.cpp @@ -57,7 +57,7 @@ struct MANGOS_DLL_DECL boss_chrono_lord_dejaAI : public ScriptedAI uint32 m_uiAttractionTimer; uint32 m_uiArcaneDischargeTimer; - void Reset() + void Reset() override { m_uiArcaneBlastTimer = urand(18000, 23000); m_uiTimeLapseTimer = urand(10000, 15000); @@ -65,12 +65,12 @@ struct MANGOS_DLL_DECL boss_chrono_lord_dejaAI : public ScriptedAI m_uiAttractionTimer = urand(25000, 35000); } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoScriptText(SAY_AGGRO, m_creature); } - void MoveInLineOfSight(Unit* pWho) + void MoveInLineOfSight(Unit* pWho) override { // Despawn Time Keeper if (pWho->GetTypeId() == TYPEID_UNIT && pWho->GetEntry() == NPC_TIME_KEEPER) @@ -85,17 +85,17 @@ struct MANGOS_DLL_DECL boss_chrono_lord_dejaAI : public ScriptedAI ScriptedAI::MoveInLineOfSight(pWho); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { DoScriptText(urand(0, 1) ? SAY_SLAY1 : SAY_SLAY2, m_creature); } - void JustDied(Unit* pVictim) + void JustDied(Unit* pVictim) override { DoScriptText(SAY_DEATH, m_creature); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { // Return since we have no target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) diff --git a/scripts/kalimdor/caverns_of_time/dark_portal/boss_temporus.cpp b/scripts/kalimdor/caverns_of_time/dark_portal/boss_temporus.cpp index 648566c91..a21f86d13 100644 --- a/scripts/kalimdor/caverns_of_time/dark_portal/boss_temporus.cpp +++ b/scripts/kalimdor/caverns_of_time/dark_portal/boss_temporus.cpp @@ -56,7 +56,7 @@ struct MANGOS_DLL_DECL boss_temporusAI : public ScriptedAI uint32 m_uiMortalWoundTimer; uint32 m_uiWingBuffetTimer; - void Reset() + void Reset() override { m_uiHasteTimer = urand(15000, 23000); m_uiSpellReflectionTimer = 30000; @@ -64,22 +64,22 @@ struct MANGOS_DLL_DECL boss_temporusAI : public ScriptedAI m_uiWingBuffetTimer = urand(25000, 35000); } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoScriptText(SAY_AGGRO, m_creature); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { DoScriptText(urand(0, 1) ? SAY_SLAY1 : SAY_SLAY2, m_creature); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoScriptText(SAY_DEATH, m_creature); } - void MoveInLineOfSight(Unit* pWho) + void MoveInLineOfSight(Unit* pWho) override { // Despawn Time Keeper if (pWho->GetTypeId() == TYPEID_UNIT && pWho->GetEntry() == NPC_TIME_KEEPER) @@ -94,7 +94,7 @@ struct MANGOS_DLL_DECL boss_temporusAI : public ScriptedAI ScriptedAI::MoveInLineOfSight(pWho); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { // Return since we have no target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) diff --git a/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.cpp b/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.cpp index fccc121da..c18b97e28 100644 --- a/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.cpp +++ b/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.cpp @@ -50,11 +50,11 @@ struct MANGOS_DLL_DECL npc_medivh_black_morassAI : public ScriptedAI ScriptedInstance* m_pInstance; - void Reset() { } + void Reset() override { } - void AttackStart(Unit* pWho) { } + void AttackStart(Unit* pWho) override { } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { // The rift trash mobs are summoned by Medivh, so we can control the movement if (pSummoned->GetEntry() != NPC_TIME_RIFT && pSummoned->GetEntry() != NPC_COUNCIL_ENFORCER) @@ -66,7 +66,7 @@ struct MANGOS_DLL_DECL npc_medivh_black_morassAI : public ScriptedAI } } - void SummonedMovementInform(Creature* pSummoned, uint32 uiMotionType, uint32 uiPointId) + void SummonedMovementInform(Creature* pSummoned, uint32 uiMotionType, uint32 uiPointId) override { if (uiMotionType != POINT_MOTION_TYPE || !uiPointId) return; @@ -74,7 +74,7 @@ struct MANGOS_DLL_DECL npc_medivh_black_morassAI : public ScriptedAI pSummoned->CastSpell(m_creature, SPELL_CORRUPT, false); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { if (m_pInstance) m_pInstance->SetData(TYPE_MEDIVH, FAIL); @@ -82,7 +82,7 @@ struct MANGOS_DLL_DECL npc_medivh_black_morassAI : public ScriptedAI DoScriptText(SAY_DEATH, m_creature); } - void UpdateAI(const uint32 uiDiff) { } + void UpdateAI(const uint32 uiDiff) override { } }; CreatureAI* GetAI_npc_medivh_black_morass(Creature* pCreature) @@ -152,7 +152,7 @@ struct MANGOS_DLL_DECL npc_time_riftAI : public ScriptedAI uint8 m_uiRiftNumber; uint8 m_uiRiftWaveId; - void Reset() + void Reset() override { DoCastSpellIfCan(m_creature, SPELL_RIFT_PERIODIC); @@ -242,7 +242,7 @@ struct MANGOS_DLL_DECL npc_time_riftAI : public ScriptedAI } } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { switch (pSummoned->GetEntry()) { @@ -279,7 +279,7 @@ struct MANGOS_DLL_DECL npc_time_riftAI : public ScriptedAI } } - void SummonedCreatureJustDied(Creature* pSummoned) + void SummonedCreatureJustDied(Creature* pSummoned) override { switch (pSummoned->GetEntry()) { @@ -300,7 +300,7 @@ struct MANGOS_DLL_DECL npc_time_riftAI : public ScriptedAI } } - void SummonedCreatureDespawn(Creature* pSummoned) + void SummonedCreatureDespawn(Creature* pSummoned) override { switch (pSummoned->GetEntry()) { @@ -317,7 +317,7 @@ struct MANGOS_DLL_DECL npc_time_riftAI : public ScriptedAI } } - void SummonedMovementInform(Creature* pSummoned, uint32 uiMotionType, uint32 uiPointId) + void SummonedMovementInform(Creature* pSummoned, uint32 uiMotionType, uint32 uiPointId) override { if (uiMotionType != POINT_MOTION_TYPE || !uiPointId || pSummoned->GetEntry() != NPC_AEONUS) return; @@ -325,7 +325,7 @@ struct MANGOS_DLL_DECL npc_time_riftAI : public ScriptedAI pSummoned->CastSpell(pSummoned, SPELL_CORRUPT_AEONUS, false); } - void UpdateAI(const uint32 uiDiff) { } + void UpdateAI(const uint32 uiDiff) override { } }; CreatureAI* GetAI_npc_time_rift(Creature* pCreature) diff --git a/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.h b/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.h index 2ead7477c..4a58c3cc4 100644 --- a/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.h +++ b/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.h @@ -103,26 +103,26 @@ class MANGOS_DLL_DECL instance_dark_portal : public ScriptedInstance public: instance_dark_portal(Map* pMap); - void Initialize(); + void Initialize() override; - void OnPlayerEnter(Player* pPlayer); - void OnCreatureCreate(Creature* pCreature); + void OnPlayerEnter(Player* pPlayer) override; + void OnCreatureCreate(Creature* pCreature) override; - void OnCreatureEnterCombat(Creature* pCreature); + void OnCreatureEnterCombat(Creature* pCreature) override; void OnCreatureEvade(Creature* pCreature); - void OnCreatureDeath(Creature* pCreature); + void OnCreatureDeath(Creature* pCreature) override; - void SetData(uint32 uiType, uint32 uiData); - uint32 GetData(uint32 uiType); + void SetData(uint32 uiType, uint32 uiData) override; + uint32 GetData(uint32 uiType) override; - const char* Save() { return m_strInstData.c_str(); } - void Load(const char* chrIn); + const char* Save() override { return m_strInstData.c_str(); } + void Load(const char* chrIn) override; void DoHandleAreaTrigger(uint32 uiTriggerId); uint32 GetCurrentRiftId() { return m_uiWorldStateRiftCount; } - void Update(uint32 uiDiff); + void Update(uint32 uiDiff) override; private: bool IsBossTimeRift() { return m_uiWorldStateRiftCount == 6 || m_uiWorldStateRiftCount == 12; } diff --git a/scripts/kalimdor/caverns_of_time/hyjal/boss_archimonde.cpp b/scripts/kalimdor/caverns_of_time/hyjal/boss_archimonde.cpp index 4ca3ce80f..6d26ca714 100644 --- a/scripts/kalimdor/caverns_of_time/hyjal/boss_archimonde.cpp +++ b/scripts/kalimdor/caverns_of_time/hyjal/boss_archimonde.cpp @@ -109,7 +109,7 @@ struct MANGOS_DLL_DECL boss_archimondeAI : public ScriptedAI bool m_bIsEpilogue; bool m_bStartEpilogue; - void Reset() + void Reset() override { m_uiDrainNordrassilTimer = 10000; m_uiFearTimer = 40000; @@ -126,12 +126,12 @@ struct MANGOS_DLL_DECL boss_archimondeAI : public ScriptedAI m_bStartEpilogue = false; } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoScriptText(SAY_AGGRO, m_creature); } - void MoveInLineOfSight(Unit* pWho) + void MoveInLineOfSight(Unit* pWho) override { // If the boss reaches the tree during the fight, then he enrages - the distance is not very clear if (!m_bIsEnraged && pWho->GetEntry() == NPC_CHANNEL_TARGET && pWho->IsWithinDistInMap(m_creature, 75.0f)) @@ -143,7 +143,7 @@ struct MANGOS_DLL_DECL boss_archimondeAI : public ScriptedAI ScriptedAI::MoveInLineOfSight(pWho); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { if (pVictim->GetTypeId() != TYPEID_PLAYER) return; @@ -175,7 +175,7 @@ struct MANGOS_DLL_DECL boss_archimondeAI : public ScriptedAI } } - void JustReachedHome() + void JustReachedHome() override { // Start epilogue at 10% hp if (m_bIsEpilogue) @@ -190,7 +190,7 @@ struct MANGOS_DLL_DECL boss_archimondeAI : public ScriptedAI m_pInstance->SetData(TYPE_ARCHIMONDE, FAIL); } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { if (pSummoned->GetEntry() == NPC_ANCIENT_WISP) { @@ -208,7 +208,7 @@ struct MANGOS_DLL_DECL boss_archimondeAI : public ScriptedAI } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { // Intro timer if (m_uiDrainNordrassilTimer) @@ -352,14 +352,14 @@ struct MANGOS_DLL_DECL npc_doomfire_spiritAI : public ScriptedAI uint32 m_uiChangeTargetTimer; float m_fAngle; - void Reset() + void Reset() override { m_uiDoomfireLoadTimer = 1000; m_uiChangeTargetTimer = 1500; m_fAngle = urand(0, M_PI_F * 2); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (m_uiDoomfireLoadTimer) { diff --git a/scripts/kalimdor/caverns_of_time/hyjal/hyjal.h b/scripts/kalimdor/caverns_of_time/hyjal/hyjal.h index 4d34f0286..1813e27ee 100644 --- a/scripts/kalimdor/caverns_of_time/hyjal/hyjal.h +++ b/scripts/kalimdor/caverns_of_time/hyjal/hyjal.h @@ -57,23 +57,23 @@ class MANGOS_DLL_DECL instance_mount_hyjal : public ScriptedInstance public: instance_mount_hyjal(Map* pMap); - void Initialize(); - bool IsEncounterInProgress() const; + void Initialize() override; + bool IsEncounterInProgress() const override; - void OnPlayerEnter(Player* pPlayer); + void OnPlayerEnter(Player* pPlayer) override; - void OnCreatureCreate(Creature* pCreature); - void OnObjectCreate(GameObject* pGo); + void OnCreatureCreate(Creature* pCreature) override; + void OnObjectCreate(GameObject* pGo) override; - void OnCreatureEnterCombat(Creature* pCreature); + void OnCreatureEnterCombat(Creature* pCreature) override; void OnCreatureEvade(Creature* pCreature); - void OnCreatureDeath(Creature* pCreature); + void OnCreatureDeath(Creature* pCreature) override; - void SetData(uint32 uiType, uint32 uiData); - uint32 GetData(uint32 uiType); + void SetData(uint32 uiType, uint32 uiData) override; + uint32 GetData(uint32 uiType) override; - const char* Save() { return m_strSaveData.c_str(); } - void Load(const char* chrIn); + const char* Save() override { return m_strSaveData.c_str(); } + void Load(const char* chrIn) override; private: void DoSpawnArchimonde(); diff --git a/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.h b/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.h index c2d365471..1e8d88603 100644 --- a/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.h +++ b/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.h @@ -65,22 +65,22 @@ struct MANGOS_DLL_DECL hyjalAI : public ScriptedAI } // Generically used to reset our variables. Do *not* call in EnterEvadeMode as this may make problems if the raid is still in combat - void Reset(); + void Reset() override; // Send creature back to spawn location and evade. - void EnterEvadeMode(); + void EnterEvadeMode() override; // Called when creature reached home location after evade. - void JustReachedHome(); + void JustReachedHome() override; // Used to reset cooldowns for our spells and to inform the raid that we're under attack - void Aggro(Unit* pWho); + void Aggro(Unit* pWho) override; // Called to summon waves, check for boss deaths and to cast our spells. - void UpdateAI(const uint32 uiDiff); + void UpdateAI(const uint32 uiDiff) override; // Called on death, informs the raid that they have failed. - void JustDied(Unit* pKiller); + void JustDied(Unit* pKiller) override; // "Teleport" all friendly creatures away from the base. void Retreat(); @@ -88,7 +88,7 @@ struct MANGOS_DLL_DECL hyjalAI : public ScriptedAI // Summons a creature for that wave in that base void SpawnCreatureForWave(uint32 uiMobEntry); - void JustSummoned(Creature*); + void JustSummoned(Creature*) override; // Summons the next wave, calls SummonCreature void SummonNextWave(); @@ -100,7 +100,7 @@ struct MANGOS_DLL_DECL hyjalAI : public ScriptedAI void DoTalk(YellType pYellType); // Used to filter who to despawn after mass teleport - void SpellHitTarget(Unit*, const SpellEntry*); + void SpellHitTarget(Unit*, const SpellEntry*) override; public: diff --git a/scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.cpp b/scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.cpp index a50a7d420..0169e4dcb 100644 --- a/scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.cpp +++ b/scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.cpp @@ -263,7 +263,7 @@ struct MANGOS_DLL_DECL npc_thrall_old_hillsbradAI : public npc_escortAI, private GuidList m_lSkarlocAddsGuids; GuidList m_lTarrenMillSoldiersGuids; - void Reset() + void Reset() override { m_bIsLowHp = false; m_uiStrikeTimer = urand(3000, 7000); @@ -287,7 +287,7 @@ struct MANGOS_DLL_DECL npc_thrall_old_hillsbradAI : public npc_escortAI, private } } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { switch (urand(0, 3)) { @@ -304,7 +304,7 @@ struct MANGOS_DLL_DECL npc_thrall_old_hillsbradAI : public npc_escortAI, private } } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { switch (urand(0, 2)) { @@ -314,7 +314,7 @@ struct MANGOS_DLL_DECL npc_thrall_old_hillsbradAI : public npc_escortAI, private } } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { // fail, and relocation handled in instance script if (m_pInstance) @@ -336,7 +336,7 @@ struct MANGOS_DLL_DECL npc_thrall_old_hillsbradAI : public npc_escortAI, private } } - void CorpseRemoved(uint32& uiRespawnDelay) + void CorpseRemoved(uint32& uiRespawnDelay) override { uiRespawnDelay = 0; @@ -345,7 +345,7 @@ struct MANGOS_DLL_DECL npc_thrall_old_hillsbradAI : public npc_escortAI, private uiRespawnDelay = 12 * HOUR; } - void JustRespawned() + void JustRespawned() override { npc_escortAI::JustRespawned(); @@ -418,7 +418,7 @@ struct MANGOS_DLL_DECL npc_thrall_old_hillsbradAI : public npc_escortAI, private } } - void EnterEvadeMode() + void EnterEvadeMode() override { if (HasEscortState(STATE_ESCORT_ESCORTING)) { @@ -433,7 +433,7 @@ struct MANGOS_DLL_DECL npc_thrall_old_hillsbradAI : public npc_escortAI, private npc_escortAI::EnterEvadeMode(); } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { switch (pSummoned->GetEntry()) { @@ -527,7 +527,7 @@ struct MANGOS_DLL_DECL npc_thrall_old_hillsbradAI : public npc_escortAI, private } } - void SummonedCreatureJustDied(Creature* pSummoned) + void SummonedCreatureJustDied(Creature* pSummoned) override { switch (pSummoned->GetEntry()) { @@ -590,7 +590,7 @@ struct MANGOS_DLL_DECL npc_thrall_old_hillsbradAI : public npc_escortAI, private } } - void SummonedMovementInform(Creature* pSummoned, uint32 uiType, uint32 uiPointId) + void SummonedMovementInform(Creature* pSummoned, uint32 uiType, uint32 uiPointId) override { if (uiType != POINT_MOTION_TYPE) return; @@ -640,7 +640,7 @@ struct MANGOS_DLL_DECL npc_thrall_old_hillsbradAI : public npc_escortAI, private } } - void JustDidDialogueStep(int32 iEntry) + void JustDidDialogueStep(int32 iEntry) override { if (!m_pInstance) return; @@ -690,7 +690,7 @@ struct MANGOS_DLL_DECL npc_thrall_old_hillsbradAI : public npc_escortAI, private } } - void WaypointReached(uint32 uiPoint) + void WaypointReached(uint32 uiPoint) override { if (!m_pInstance) return; @@ -961,7 +961,7 @@ struct MANGOS_DLL_DECL npc_thrall_old_hillsbradAI : public npc_escortAI, private } } - void UpdateEscortAI(const uint32 uiDiff) + void UpdateEscortAI(const uint32 uiDiff) override { DialogueUpdate(uiDiff); @@ -1171,12 +1171,12 @@ struct MANGOS_DLL_DECL npc_tarethaAI : public npc_escortAI, private DialogueHelp bool m_bHasStartedEpilogue; - void Reset() + void Reset() override { m_bHasStartedEpilogue = false; } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { // Remove flags from the npc - the quest will be handled by the entrance version if (pSummoned->GetEntry() == NPC_EROZION) @@ -1187,7 +1187,7 @@ struct MANGOS_DLL_DECL npc_tarethaAI : public npc_escortAI, private DialogueHelp } } - void WaypointReached(uint32 uiPoint) + void WaypointReached(uint32 uiPoint) override { if (uiPoint == 7) { @@ -1205,7 +1205,7 @@ struct MANGOS_DLL_DECL npc_tarethaAI : public npc_escortAI, private DialogueHelp } } - void JustDidDialogueStep(int32 iEntry) + void JustDidDialogueStep(int32 iEntry) override { if (!m_pInstance) return; @@ -1247,7 +1247,7 @@ struct MANGOS_DLL_DECL npc_tarethaAI : public npc_escortAI, private DialogueHelp } } - void UpdateEscortAI(const uint32 uiDiff) + void UpdateEscortAI(const uint32 uiDiff) override { DialogueUpdate(uiDiff); diff --git a/scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.h b/scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.h index 98947b295..fc7ffbce2 100644 --- a/scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.h +++ b/scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.h @@ -62,25 +62,25 @@ class MANGOS_DLL_DECL instance_old_hillsbrad : public ScriptedInstance instance_old_hillsbrad(Map* pMap); ~instance_old_hillsbrad() {} - void Initialize(); + void Initialize() override; - void OnPlayerEnter(Player* pPlayer); - void OnCreatureCreate(Creature* pCreature); - void OnObjectCreate(GameObject* pGo); + void OnPlayerEnter(Player* pPlayer) override; + void OnCreatureCreate(Creature* pCreature) override; + void OnObjectCreate(GameObject* pGo) override; - void OnCreatureEnterCombat(Creature* pCreature); + void OnCreatureEnterCombat(Creature* pCreature) override; void OnCreatureEvade(Creature* pCreature); - void OnCreatureDeath(Creature* pCreature); + void OnCreatureDeath(Creature* pCreature) override; - void SetData(uint32 uiType, uint32 uiData); - uint32 GetData(uint32 uiType); + void SetData(uint32 uiType, uint32 uiData) override; + uint32 GetData(uint32 uiType) override; uint32 GetThrallEventCount() { return m_uiThrallEventCount; } - const char* Save() { return m_strInstData.c_str(); } - void Load(const char* chrIn); + const char* Save() override { return m_strInstData.c_str(); } + void Load(const char* chrIn) override; - void Update(uint32 uiDiff); + void Update(uint32 uiDiff) override; protected: void HandleThrallRelocation(); diff --git a/scripts/kalimdor/darkshore.cpp b/scripts/kalimdor/darkshore.cpp index 36f7bceb2..710d9b5da 100644 --- a/scripts/kalimdor/darkshore.cpp +++ b/scripts/kalimdor/darkshore.cpp @@ -69,12 +69,12 @@ struct MANGOS_DLL_DECL npc_kerlonianAI : public FollowerAI uint32 m_uiFallAsleepTimer; - void Reset() + void Reset() override { m_uiFallAsleepTimer = urand(10000, 45000); } - void MoveInLineOfSight(Unit* pWho) + void MoveInLineOfSight(Unit* pWho) override { FollowerAI::MoveInLineOfSight(pWho); @@ -95,7 +95,7 @@ struct MANGOS_DLL_DECL npc_kerlonianAI : public FollowerAI } } - void SpellHit(Unit* pCaster, const SpellEntry* pSpell) + void SpellHit(Unit* pCaster, const SpellEntry* pSpell) override { if (HasFollowState(STATE_FOLLOW_INPROGRESS | STATE_FOLLOW_PAUSED) && pSpell->Id == SPELL_AWAKEN) ClearSleeping(); @@ -134,7 +134,7 @@ struct MANGOS_DLL_DECL npc_kerlonianAI : public FollowerAI SetFollowPaused(false); } - void UpdateFollowerAI(const uint32 uiDiff) + void UpdateFollowerAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) { @@ -209,7 +209,7 @@ struct MANGOS_DLL_DECL npc_prospector_remtravelAI : public npc_escortAI { npc_prospector_remtravelAI(Creature* pCreature) : npc_escortAI(pCreature) { Reset(); } - void WaypointReached(uint32 uiPointId) + void WaypointReached(uint32 uiPointId) override { Player* pPlayer = GetPlayerForEscort(); @@ -272,15 +272,15 @@ struct MANGOS_DLL_DECL npc_prospector_remtravelAI : public npc_escortAI } } - void Reset() { } + void Reset() override { } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { if (urand(0, 1)) DoScriptText(SAY_REM_AGGRO, m_creature, pWho); } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { // unsure if it should be any // pSummoned->AI()->AttackStart(m_creature); @@ -324,9 +324,9 @@ struct MANGOS_DLL_DECL npc_threshwackonatorAI : public FollowerAI { npc_threshwackonatorAI(Creature* pCreature) : FollowerAI(pCreature) { Reset(); } - void Reset() {} + void Reset() override {} - void MoveInLineOfSight(Unit* pWho) + void MoveInLineOfSight(Unit* pWho) override { FollowerAI::MoveInLineOfSight(pWho); @@ -430,13 +430,13 @@ struct MANGOS_DLL_DECL npc_volcorAI : public npc_escortAI uint32 m_uiQuestId; - void Reset() + void Reset() override { if (!HasEscortState(STATE_ESCORT_ESCORTING)) m_uiQuestId = 0; } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { // shouldn't always use text on agro switch (urand(0, 4)) @@ -447,7 +447,7 @@ struct MANGOS_DLL_DECL npc_volcorAI : public npc_escortAI } } - void MoveInLineOfSight(Unit* pWho) + void MoveInLineOfSight(Unit* pWho) override { // No combat for this quest if (m_uiQuestId == QUEST_ESCAPE_THROUGH_STEALTH) @@ -456,7 +456,7 @@ struct MANGOS_DLL_DECL npc_volcorAI : public npc_escortAI npc_escortAI::MoveInLineOfSight(pWho); } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { pSummoned->AI()->AttackStart(m_creature); } @@ -482,7 +482,7 @@ struct MANGOS_DLL_DECL npc_volcorAI : public npc_escortAI Start(false, pPlayer, pQuest); } - void WaypointReached(uint32 uiPointId) + void WaypointReached(uint32 uiPointId) override { switch (uiPointId) { diff --git a/scripts/kalimdor/desolace.cpp b/scripts/kalimdor/desolace.cpp index 2b9054c3f..e7d69ede8 100644 --- a/scripts/kalimdor/desolace.cpp +++ b/scripts/kalimdor/desolace.cpp @@ -61,12 +61,12 @@ struct MANGOS_DLL_DECL npc_aged_dying_ancient_kodoAI : public ScriptedAI uint32 m_uiDespawnTimer; - void Reset() + void Reset() override { m_uiDespawnTimer = 0; } - void MoveInLineOfSight(Unit* pWho) + void MoveInLineOfSight(Unit* pWho) override { if (pWho->GetEntry() == NPC_SMEED) { @@ -88,7 +88,7 @@ struct MANGOS_DLL_DECL npc_aged_dying_ancient_kodoAI : public ScriptedAI } } - void SpellHit(Unit* pCaster, SpellEntry const* pSpell) + void SpellHit(Unit* pCaster, SpellEntry const* pSpell) override { if (pSpell->Id == SPELL_KODO_KOMBO_GOSSIP) { @@ -97,7 +97,7 @@ struct MANGOS_DLL_DECL npc_aged_dying_ancient_kodoAI : public ScriptedAI } } - void UpdateAI(const uint32 diff) + void UpdateAI(const uint32 diff) override { // timer should always be == 0 unless we already updated entry of creature. Then not expect this updated to ever be in combat. if (m_uiDespawnTimer && m_uiDespawnTimer <= diff) @@ -182,14 +182,14 @@ struct MANGOS_DLL_DECL npc_dalinda_malemAI : public npc_escortAI { npc_dalinda_malemAI(Creature* m_creature) : npc_escortAI(m_creature) { Reset(); } - void Reset() {} + void Reset() override {} - void JustStartedEscort() + void JustStartedEscort() override { m_creature->SetStandState(UNIT_STAND_STATE_STAND); } - void WaypointReached(uint32 uiPointId) + void WaypointReached(uint32 uiPointId) override { if (uiPointId == 18) { @@ -283,15 +283,15 @@ struct MANGOS_DLL_DECL npc_melizza_brimbuzzleAI : public npc_escortAI, private D uint32 m_uiNormalFaction; - void Reset() {} + void Reset() override {} - void JustStartedEscort() + void JustStartedEscort() override { if (GameObject* pCage = GetClosestGameObjectWithEntry(m_creature, GO_MELIZZAS_CAGE, INTERACTION_DISTANCE)) pCage->UseDoorOrButton(); } - Creature* GetSpeakerByEntry(uint32 uiEntry) + Creature* GetSpeakerByEntry(uint32 uiEntry) override { if (uiEntry == NPC_MELIZZA) return m_creature; @@ -299,7 +299,7 @@ struct MANGOS_DLL_DECL npc_melizza_brimbuzzleAI : public npc_escortAI, private D return NULL; } - void WaypointReached(uint32 uiPointId) + void WaypointReached(uint32 uiPointId) override { switch (uiPointId) { @@ -342,7 +342,7 @@ struct MANGOS_DLL_DECL npc_melizza_brimbuzzleAI : public npc_escortAI, private D } - void JustDidDialogueStep(int32 iEntry) + void JustDidDialogueStep(int32 iEntry) override { switch (iEntry) { @@ -370,7 +370,7 @@ struct MANGOS_DLL_DECL npc_melizza_brimbuzzleAI : public npc_escortAI, private D } } - void UpdateEscortAI(const uint32 uiDiff) + void UpdateEscortAI(const uint32 uiDiff) override { DialogueUpdate(uiDiff); diff --git a/scripts/kalimdor/dire_maul/dire_maul.h b/scripts/kalimdor/dire_maul/dire_maul.h index 3d7e4eb5f..7daf20d05 100644 --- a/scripts/kalimdor/dire_maul/dire_maul.h +++ b/scripts/kalimdor/dire_maul/dire_maul.h @@ -84,19 +84,19 @@ class MANGOS_DLL_DECL instance_dire_maul : public ScriptedInstance instance_dire_maul(Map* pMap); ~instance_dire_maul() {} - void Initialize(); + void Initialize() override; - void OnCreatureCreate(Creature* pCreature); - void OnObjectCreate(GameObject* pGo); + void OnCreatureCreate(Creature* pCreature) override; + void OnObjectCreate(GameObject* pGo) override; - void SetData(uint32 uiType, uint32 uiData); - uint32 GetData(uint32 uiType); + void SetData(uint32 uiType, uint32 uiData) override; + uint32 GetData(uint32 uiType) override; - void OnCreatureEnterCombat(Creature* pCreature); - void OnCreatureDeath(Creature* pCreature); + void OnCreatureEnterCombat(Creature* pCreature) override; + void OnCreatureDeath(Creature* pCreature) override; - const char* Save() { return m_strInstData.c_str(); } - void Load(const char* chrIn); + const char* Save() override { return m_strInstData.c_str(); } + void Load(const char* chrIn) override; protected: bool CheckAllGeneratorsDestroyed(); diff --git a/scripts/kalimdor/durotar.cpp b/scripts/kalimdor/durotar.cpp index c421db2ec..e0173259a 100644 --- a/scripts/kalimdor/durotar.cpp +++ b/scripts/kalimdor/durotar.cpp @@ -54,7 +54,7 @@ struct MANGOS_DLL_DECL npc_lazy_peonAI : public ScriptedAI uint32 m_uiResetSleepTimer; // Time, until the npc stops harvesting lumber uint32 m_uiStopSleepingTimer; // Time, until the npcs (re)starts working on its own - void Reset() + void Reset() override { m_uiResetSleepTimer = 0; m_uiStopSleepingTimer = urand(90000, 120000); // Sleeping aura has only 2min duration @@ -85,7 +85,7 @@ struct MANGOS_DLL_DECL npc_lazy_peonAI : public ScriptedAI error_log("SD2: No GameObject of entry %u was found in range or something really bad happened.", GO_LUMBERPILE); } - void MovementInform(uint32 uiMotionType, uint32 uiPointId) + void MovementInform(uint32 uiMotionType, uint32 uiPointId) override { if (uiMotionType != POINT_MOTION_TYPE || !uiPointId) return; @@ -95,7 +95,7 @@ struct MANGOS_DLL_DECL npc_lazy_peonAI : public ScriptedAI m_uiResetSleepTimer = uiPointId == 1 ? 80000 : urand(30000, 60000); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (m_uiResetSleepTimer) { diff --git a/scripts/kalimdor/dustwallow_marsh.cpp b/scripts/kalimdor/dustwallow_marsh.cpp index 98f5169e6..644a86017 100644 --- a/scripts/kalimdor/dustwallow_marsh.cpp +++ b/scripts/kalimdor/dustwallow_marsh.cpp @@ -55,7 +55,7 @@ struct MANGOS_DLL_DECL mobs_risen_husk_spiritAI : public ScriptedAI Player* m_pCreditPlayer; - void Reset() + void Reset() override { m_uiConsumeFlesh_Timer = 10000; m_uiIntangiblePresence_Timer = 5000; @@ -63,13 +63,13 @@ struct MANGOS_DLL_DECL mobs_risen_husk_spiritAI : public ScriptedAI m_pCreditPlayer = NULL; } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { if (m_pCreditPlayer) m_pCreditPlayer->KilledMonsterCredit(pSummoned->GetEntry(), pSummoned->GetObjectGuid()); } - void DamageTaken(Unit* pDoneBy, uint32& uiDamage) + void DamageTaken(Unit* pDoneBy, uint32& uiDamage) override { if (uiDamage < m_creature->GetHealth()) return; @@ -84,7 +84,7 @@ struct MANGOS_DLL_DECL mobs_risen_husk_spiritAI : public ScriptedAI } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -140,12 +140,12 @@ struct MANGOS_DLL_DECL npc_restless_apparitionAI : public ScriptedAI uint32 m_uiTalk_Timer; - void Reset() + void Reset() override { m_uiTalk_Timer = 1000; } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_uiTalk_Timer) return; @@ -201,9 +201,9 @@ struct MANGOS_DLL_DECL npc_morokkAI : public npc_escortAI bool m_bIsSuccess; - void Reset() {} + void Reset() override {} - void WaypointReached(uint32 uiPointId) + void WaypointReached(uint32 uiPointId) override { switch (uiPointId) { @@ -222,7 +222,7 @@ struct MANGOS_DLL_DECL npc_morokkAI : public npc_escortAI } } - void AttackedBy(Unit* pAttacker) + void AttackedBy(Unit* pAttacker) override { if (m_creature->getVictim()) return; @@ -233,7 +233,7 @@ struct MANGOS_DLL_DECL npc_morokkAI : public npc_escortAI AttackStart(pAttacker); } - void DamageTaken(Unit* pDoneBy, uint32& uiDamage) + void DamageTaken(Unit* pDoneBy, uint32& uiDamage) override { if (HasEscortState(STATE_ESCORT_ESCORTING)) { @@ -252,7 +252,7 @@ struct MANGOS_DLL_DECL npc_morokkAI : public npc_escortAI } } - void UpdateEscortAI(const uint32 uiDiff) + void UpdateEscortAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) { @@ -358,7 +358,7 @@ struct MANGOS_DLL_DECL npc_ogronAI : public npc_escortAI uint32 m_uiPhaseCounter; uint32 m_uiGlobalTimer; - void Reset() + void Reset() override { m_uiGlobalTimer = 5000; @@ -373,7 +373,7 @@ struct MANGOS_DLL_DECL npc_ogronAI : public npc_escortAI } } - void MoveInLineOfSight(Unit* pWho) + void MoveInLineOfSight(Unit* pWho) override { if (HasEscortState(STATE_ESCORT_ESCORTING) && pWho->GetEntry() == NPC_REETHE && lCreatureList.empty()) lCreatureList.push_back((Creature*)pWho); @@ -395,7 +395,7 @@ struct MANGOS_DLL_DECL npc_ogronAI : public npc_escortAI return NULL; } - void WaypointReached(uint32 uiPointId) + void WaypointReached(uint32 uiPointId) override { switch (uiPointId) { @@ -412,7 +412,7 @@ struct MANGOS_DLL_DECL npc_ogronAI : public npc_escortAI } } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { lCreatureList.push_back(pSummoned); @@ -449,7 +449,7 @@ struct MANGOS_DLL_DECL npc_ogronAI : public npc_escortAI } } - void UpdateEscortAI(const uint32 uiDiff) + void UpdateEscortAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) { @@ -623,13 +623,13 @@ struct MANGOS_DLL_DECL npc_private_hendelAI : public ScriptedAI { npc_private_hendelAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } - void Reset() + void Reset() override { if (m_creature->getFaction() != m_creature->GetCreatureInfo()->faction_A) m_creature->setFaction(m_creature->GetCreatureInfo()->faction_A); } - void AttackedBy(Unit* pAttacker) + void AttackedBy(Unit* pAttacker) override { if (m_creature->getVictim()) return; @@ -640,7 +640,7 @@ struct MANGOS_DLL_DECL npc_private_hendelAI : public ScriptedAI AttackStart(pAttacker); } - void DamageTaken(Unit* pDoneBy, uint32& uiDamage) + void DamageTaken(Unit* pDoneBy, uint32& uiDamage) override { if (uiDamage > m_creature->GetHealth() || m_creature->GetHealthPercent() < 20.0f) { diff --git a/scripts/kalimdor/felwood.cpp b/scripts/kalimdor/felwood.cpp index f3d7ae1a8..333ed60bb 100644 --- a/scripts/kalimdor/felwood.cpp +++ b/scripts/kalimdor/felwood.cpp @@ -70,9 +70,9 @@ struct MANGOS_DLL_DECL npc_kittenAI : public FollowerAI uint32 m_uiMoonwellCooldown; - void Reset() { } + void Reset() override { } - void MoveInLineOfSight(Unit* pWho) + void MoveInLineOfSight(Unit* pWho) override { // should not have npcflag by default, so set when expected if (!m_creature->getVictim() && !m_creature->HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP) && HasFollowState(STATE_FOLLOW_INPROGRESS) && pWho->GetEntry() == NPC_WINNA) @@ -82,7 +82,7 @@ struct MANGOS_DLL_DECL npc_kittenAI : public FollowerAI } } - void UpdateFollowerAI(const uint32 uiDiff) + void UpdateFollowerAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) { @@ -187,7 +187,7 @@ struct MANGOS_DLL_DECL npc_niby_the_almightyAI : public ScriptedAI bool m_bEventStarted; - void Reset() + void Reset() override { m_uiSummonTimer = 500; m_uiSpeech = 0; @@ -202,7 +202,7 @@ struct MANGOS_DLL_DECL npc_niby_the_almightyAI : public ScriptedAI m_creature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (m_bEventStarted) { @@ -301,7 +301,7 @@ struct MANGOS_DLL_DECL npc_kroshiusAI : public ScriptedAI uint8 m_uiPhase; - void Reset() + void Reset() override { m_uiKnockBackTimer = urand(5000, 8000); m_playerGuid.Clear(); @@ -328,12 +328,12 @@ struct MANGOS_DLL_DECL npc_kroshiusAI : public ScriptedAI // TODO: A visual Flame Circle around the mob still missing } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { m_uiPhase = 0; } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_uiPhase) return; diff --git a/scripts/kalimdor/feralas.cpp b/scripts/kalimdor/feralas.cpp index d3be188f2..0872c9168 100644 --- a/scripts/kalimdor/feralas.cpp +++ b/scripts/kalimdor/feralas.cpp @@ -50,7 +50,7 @@ struct MANGOS_DLL_DECL npc_oox22feAI : public npc_escortAI { npc_oox22feAI(Creature* pCreature) : npc_escortAI(pCreature) { Reset(); } - void WaypointReached(uint32 i) + void WaypointReached(uint32 i) override { switch (i) { @@ -85,13 +85,13 @@ struct MANGOS_DLL_DECL npc_oox22feAI : public npc_escortAI } } - void Reset() + void Reset() override { if (!HasEscortState(STATE_ESCORT_ESCORTING)) m_creature->SetStandState(UNIT_STAND_STATE_DEAD); } - void Aggro(Unit* who) + void Aggro(Unit* who) override { // For an small probability the npc says something when he get aggro switch (urand(0, 9)) @@ -101,7 +101,7 @@ struct MANGOS_DLL_DECL npc_oox22feAI : public npc_escortAI } } - void JustSummoned(Creature* summoned) + void JustSummoned(Creature* summoned) override { summoned->AI()->AttackStart(m_creature); } diff --git a/scripts/kalimdor/maraudon/boss_noxxion.cpp b/scripts/kalimdor/maraudon/boss_noxxion.cpp index 238744f14..532bb7036 100644 --- a/scripts/kalimdor/maraudon/boss_noxxion.cpp +++ b/scripts/kalimdor/maraudon/boss_noxxion.cpp @@ -39,20 +39,20 @@ struct MANGOS_DLL_DECL boss_noxxionAI : public ScriptedAI uint32 m_uiUppercutTimer; uint32 m_uiSummonTimer; - void Reset() + void Reset() override { m_uiToxicVolleyTimer = 7000; m_uiUppercutTimer = 16000; m_uiSummonTimer = 19000; } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) pSummoned->AI()->AttackStart(pTarget); } - void UpdateAI(const uint32 diff) + void UpdateAI(const uint32 diff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/kalimdor/moonglade.cpp b/scripts/kalimdor/moonglade.cpp index 6d4e2d6d6..8268f39ca 100644 --- a/scripts/kalimdor/moonglade.cpp +++ b/scripts/kalimdor/moonglade.cpp @@ -56,7 +56,7 @@ struct MANGOS_DLL_DECL npc_clintar_dw_spiritAI : public npc_escortAI { npc_clintar_dw_spiritAI(Creature* pCreature) : npc_escortAI(pCreature) { Reset(); } - void WaypointReached(uint32 i) + void WaypointReached(uint32 i) override { Player* pPlayer = GetPlayerForEscort(); @@ -97,12 +97,12 @@ struct MANGOS_DLL_DECL npc_clintar_dw_spiritAI : public npc_escortAI } } - void Aggro(Unit* who) + void Aggro(Unit* who) override { DoScriptText(urand(0, 1) ? SAY_AGGRO_1 : SAY_AGGRO_2, m_creature); } - void Reset() + void Reset() override { if (HasEscortState(STATE_ESCORT_ESCORTING)) return; @@ -130,7 +130,7 @@ struct MANGOS_DLL_DECL npc_clintar_dw_spiritAI : public npc_escortAI Start(false, pStarter && pStarter->GetTypeId() == TYPEID_PLAYER ? (Player*)pStarter : NULL); } - void JustSummoned(Creature* summoned) + void JustSummoned(Creature* summoned) override { summoned->AI()->AttackStart(m_creature); } @@ -318,7 +318,7 @@ struct MANGOS_DLL_DECL npc_keeper_remulosAI : public npc_escortAI, private Dialo bool m_bIsFirstWave; - void Reset() + void Reset() override { if (!HasEscortState(STATE_ESCORT_ESCORTING)) { @@ -336,7 +336,7 @@ struct MANGOS_DLL_DECL npc_keeper_remulosAI : public npc_escortAI, private Dialo } } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { switch (pSummoned->GetEntry()) { @@ -356,7 +356,7 @@ struct MANGOS_DLL_DECL npc_keeper_remulosAI : public npc_escortAI, private Dialo } } - void SummonedMovementInform(Creature* pSummoned, uint32 uiType, uint32 uiPointId) + void SummonedMovementInform(Creature* pSummoned, uint32 uiType, uint32 uiPointId) override { if (uiType != POINT_MOTION_TYPE || pSummoned->GetEntry() != NPC_ERANIKUS_TYRANT) return; @@ -376,7 +376,7 @@ struct MANGOS_DLL_DECL npc_keeper_remulosAI : public npc_escortAI, private Dialo } } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { // Make Eranikus evade in order to despawn all the summons if (Creature* pEranikus = m_creature->GetMap()->GetCreature(m_eranikusGuid)) @@ -385,7 +385,7 @@ struct MANGOS_DLL_DECL npc_keeper_remulosAI : public npc_escortAI, private Dialo npc_escortAI::JustDied(pKiller); } - void WaypointReached(uint32 uiPointId) + void WaypointReached(uint32 uiPointId) override { switch (uiPointId) { @@ -410,7 +410,7 @@ struct MANGOS_DLL_DECL npc_keeper_remulosAI : public npc_escortAI, private Dialo } } - Creature* GetSpeakerByEntry(uint32 uiEntry) + Creature* GetSpeakerByEntry(uint32 uiEntry) override { switch (uiEntry) { @@ -422,7 +422,7 @@ struct MANGOS_DLL_DECL npc_keeper_remulosAI : public npc_escortAI, private Dialo } } - void JustDidDialogueStep(int32 iEntry) + void JustDidDialogueStep(int32 iEntry) override { switch (iEntry) { @@ -463,7 +463,7 @@ struct MANGOS_DLL_DECL npc_keeper_remulosAI : public npc_escortAI, private Dialo m_uiOutroTimer = 3000; } - void UpdateEscortAI(const uint32 uiDiff) + void UpdateEscortAI(const uint32 uiDiff) override { DialogueUpdate(uiDiff); @@ -653,7 +653,7 @@ struct MANGOS_DLL_DECL boss_eranikusAI : public ScriptedAI ObjectGuid m_tyrandeGuid; GuidList m_lPriestessList; - void Reset() + void Reset() override { m_uiAcidBreathTimer = 10000; m_uiNoxiousBreathTimer = 3000; @@ -671,7 +671,7 @@ struct MANGOS_DLL_DECL boss_eranikusAI : public ScriptedAI SetCombatMovement(false); } - void EnterEvadeMode() + void EnterEvadeMode() override { if (m_creature->GetHealthPercent() < 20.0f) { @@ -708,7 +708,7 @@ struct MANGOS_DLL_DECL boss_eranikusAI : public ScriptedAI } } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { if (pVictim->GetTypeId() != TYPEID_PLAYER) return; @@ -726,7 +726,7 @@ struct MANGOS_DLL_DECL boss_eranikusAI : public ScriptedAI } } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { switch (pSummoned->GetEntry()) { @@ -754,7 +754,7 @@ struct MANGOS_DLL_DECL boss_eranikusAI : public ScriptedAI } } - void SummonedMovementInform(Creature* pSummoned, uint32 uiType, uint32 uiPointId) + void SummonedMovementInform(Creature* pSummoned, uint32 uiType, uint32 uiPointId) override { if (uiType != POINT_MOTION_TYPE) return; @@ -783,7 +783,7 @@ struct MANGOS_DLL_DECL boss_eranikusAI : public ScriptedAI } } - void MovementInform(uint32 uiType, uint32 uiPointId) + void MovementInform(uint32 uiType, uint32 uiPointId) override { if (uiType != POINT_MOTION_TYPE || uiPointId != POINT_ID_ERANIKUS_REDEEMED) return; @@ -792,7 +792,7 @@ struct MANGOS_DLL_DECL boss_eranikusAI : public ScriptedAI m_uiEventTimer = 11000; } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (m_uiEventTimer) { diff --git a/scripts/kalimdor/mulgore.cpp b/scripts/kalimdor/mulgore.cpp index de670fdb9..0edda6778 100644 --- a/scripts/kalimdor/mulgore.cpp +++ b/scripts/kalimdor/mulgore.cpp @@ -53,7 +53,7 @@ struct MANGOS_DLL_DECL npc_kyle_the_frenziedAI : public ScriptedAI uint32 m_uiEventTimer; uint8 m_uiEventPhase; - void Reset() + void Reset() override { m_bEvent = false; m_bIsMovingToLunch = false; @@ -65,7 +65,7 @@ struct MANGOS_DLL_DECL npc_kyle_the_frenziedAI : public ScriptedAI m_creature->UpdateEntry(NPC_KYLE_FRENZIED); } - void SpellHit(Unit* pCaster, SpellEntry const* pSpell) + void SpellHit(Unit* pCaster, SpellEntry const* pSpell) override { if (!m_creature->getVictim() && !m_bEvent && pSpell->Id == SPELL_LUNCH) { @@ -85,7 +85,7 @@ struct MANGOS_DLL_DECL npc_kyle_the_frenziedAI : public ScriptedAI } } - void MovementInform(uint32 uiType, uint32 uiPointId) + void MovementInform(uint32 uiType, uint32 uiPointId) override { if (uiType != POINT_MOTION_TYPE || !m_bEvent) return; @@ -94,7 +94,7 @@ struct MANGOS_DLL_DECL npc_kyle_the_frenziedAI : public ScriptedAI m_bIsMovingToLunch = false; } - void UpdateAI(const uint32 diff) + void UpdateAI(const uint32 diff) override { if (m_bEvent) { diff --git a/scripts/kalimdor/onyxias_lair/boss_onyxia.cpp b/scripts/kalimdor/onyxias_lair/boss_onyxia.cpp index 0e5315ba7..74fb22aec 100644 --- a/scripts/kalimdor/onyxias_lair/boss_onyxia.cpp +++ b/scripts/kalimdor/onyxias_lair/boss_onyxia.cpp @@ -137,7 +137,7 @@ struct MANGOS_DLL_DECL boss_onyxiaAI : public ScriptedAI bool m_bIsSummoningWhelps; - void Reset() + void Reset() override { if (!IsCombatMovement()) SetCombatMovement(true); @@ -164,7 +164,7 @@ struct MANGOS_DLL_DECL boss_onyxiaAI : public ScriptedAI m_bIsSummoningWhelps = false; } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoScriptText(SAY_AGGRO, m_creature); @@ -172,7 +172,7 @@ struct MANGOS_DLL_DECL boss_onyxiaAI : public ScriptedAI m_pInstance->SetData(TYPE_ONYXIA, IN_PROGRESS); } - void JustReachedHome() + void JustReachedHome() override { // in case evade in phase 2, see comments for hack where phase 2 is set m_creature->SetLevitate(false); @@ -182,13 +182,13 @@ struct MANGOS_DLL_DECL boss_onyxiaAI : public ScriptedAI m_pInstance->SetData(TYPE_ONYXIA, FAIL); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { if (m_pInstance) m_pInstance->SetData(TYPE_ONYXIA, DONE); } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { if (!m_pInstance) return; @@ -207,7 +207,7 @@ struct MANGOS_DLL_DECL boss_onyxiaAI : public ScriptedAI ++m_uiSummonCount; } - void SummonedMovementInform(Creature* pSummoned, uint32 uiMoveType, uint32 uiPointId) + void SummonedMovementInform(Creature* pSummoned, uint32 uiMoveType, uint32 uiPointId) override { if (uiMoveType != POINT_MOTION_TYPE || uiPointId != 1 || !m_creature->getVictim()) return; @@ -215,12 +215,12 @@ struct MANGOS_DLL_DECL boss_onyxiaAI : public ScriptedAI pSummoned->SetInCombatWithZone(); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { DoScriptText(SAY_KILL, m_creature); } - void SpellHit(Unit* pCaster, const SpellEntry* pSpell) + void SpellHit(Unit* pCaster, const SpellEntry* pSpell) override { if (pSpell->Id == SPELL_BREATH_EAST_TO_WEST || pSpell->Id == SPELL_BREATH_WEST_TO_EAST || @@ -248,7 +248,7 @@ struct MANGOS_DLL_DECL boss_onyxiaAI : public ScriptedAI return NULL; } - void MovementInform(uint32 uiMoveType, uint32 uiPointId) + void MovementInform(uint32 uiMoveType, uint32 uiPointId) override { if (uiMoveType != POINT_MOTION_TYPE || !m_pInstance) return; @@ -260,7 +260,7 @@ struct MANGOS_DLL_DECL boss_onyxiaAI : public ScriptedAI } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -439,7 +439,7 @@ struct MANGOS_DLL_DECL boss_onyxiaAI : public ScriptedAI } } - void SpellHitTarget(Unit* pTarget, const SpellEntry* pSpell) + void SpellHitTarget(Unit* pTarget, const SpellEntry* pSpell) override { // Check if players are hit by Onyxia's Deep Breath if (pTarget->GetTypeId() != TYPEID_PLAYER || !m_pInstance) diff --git a/scripts/kalimdor/onyxias_lair/onyxias_lair.h b/scripts/kalimdor/onyxias_lair/onyxias_lair.h index 4ecbd7c91..72076cebe 100644 --- a/scripts/kalimdor/onyxias_lair/onyxias_lair.h +++ b/scripts/kalimdor/onyxias_lair/onyxias_lair.h @@ -34,15 +34,15 @@ class MANGOS_DLL_DECL instance_onyxias_lair : public ScriptedInstance instance_onyxias_lair(Map* pMap); ~instance_onyxias_lair() {} - void Initialize(); + void Initialize() override; - bool IsEncounterInProgress() const; + bool IsEncounterInProgress() const override; - void OnCreatureCreate(Creature* pCreature); + void OnCreatureCreate(Creature* pCreature) override; - void SetData(uint32 uiType, uint32 uiData); + void SetData(uint32 uiType, uint32 uiData) override; - bool CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/); + bool CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/) override; protected: uint32 m_uiEncounter; diff --git a/scripts/kalimdor/orgrimmar.cpp b/scripts/kalimdor/orgrimmar.cpp index 242e81083..e60c7ebd9 100644 --- a/scripts/kalimdor/orgrimmar.cpp +++ b/scripts/kalimdor/orgrimmar.cpp @@ -46,7 +46,7 @@ struct MANGOS_DLL_DECL npc_shenthulAI : public ScriptedAI ObjectGuid m_playerGuid; - void Reset() + void Reset() override { m_uiSaluteTimer = 0; m_uiResetTimer = 0; @@ -54,7 +54,7 @@ struct MANGOS_DLL_DECL npc_shenthulAI : public ScriptedAI m_playerGuid.Clear(); } - void ReceiveEmote(Player* pPlayer, uint32 uiTextEmote) + void ReceiveEmote(Player* pPlayer, uint32 uiTextEmote) override { if (m_uiResetTimer && uiTextEmote == TEXTEMOTE_SALUTE && pPlayer->GetQuestStatus(QUEST_SHATTERED_SALUTE) == QUEST_STATUS_INCOMPLETE) { @@ -69,7 +69,7 @@ struct MANGOS_DLL_DECL npc_shenthulAI : public ScriptedAI m_uiSaluteTimer = 6000; } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (m_uiResetTimer) { diff --git a/scripts/kalimdor/razorfen_downs/razorfen_downs.cpp b/scripts/kalimdor/razorfen_downs/razorfen_downs.cpp index 532bb66f0..97f1323db 100644 --- a/scripts/kalimdor/razorfen_downs/razorfen_downs.cpp +++ b/scripts/kalimdor/razorfen_downs/razorfen_downs.cpp @@ -89,13 +89,13 @@ struct MANGOS_DLL_DECL npc_belnistraszAI : public npc_escortAI uint32 m_uiFireballTimer; uint32 m_uiFrostNovaTimer; - void Reset() + void Reset() override { m_uiFireballTimer = 1000; m_uiFrostNovaTimer = 6000; } - void AttackedBy(Unit* pAttacker) + void AttackedBy(Unit* pAttacker) override { if (HasEscortState(STATE_ESCORT_PAUSED)) { @@ -146,7 +146,7 @@ struct MANGOS_DLL_DECL npc_belnistraszAI : public npc_escortAI } } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { SpawnerSummon(pSummoned); } @@ -156,7 +156,7 @@ struct MANGOS_DLL_DECL npc_belnistraszAI : public npc_escortAI m_creature->SummonCreature(NPC_IDOL_ROOM_SPAWNER, m_fSpawnerCoord[iType][0], m_fSpawnerCoord[iType][1], m_fSpawnerCoord[iType][2], m_fSpawnerCoord[iType][3], TEMPSUMMON_TIMED_DESPAWN, 10000); } - void WaypointReached(uint32 uiPointId) + void WaypointReached(uint32 uiPointId) override { if (uiPointId == 24) { @@ -165,7 +165,7 @@ struct MANGOS_DLL_DECL npc_belnistraszAI : public npc_escortAI } } - void UpdateEscortAI(const uint32 uiDiff) + void UpdateEscortAI(const uint32 uiDiff) override { if (HasEscortState(STATE_ESCORT_PAUSED)) { diff --git a/scripts/kalimdor/razorfen_kraul/razorfen_kraul.cpp b/scripts/kalimdor/razorfen_kraul/razorfen_kraul.cpp index ba7a50b14..794db75ba 100644 --- a/scripts/kalimdor/razorfen_kraul/razorfen_kraul.cpp +++ b/scripts/kalimdor/razorfen_kraul/razorfen_kraul.cpp @@ -62,10 +62,10 @@ struct MANGOS_DLL_DECL npc_willix_the_importerAI : public npc_escortAI { npc_willix_the_importerAI(Creature* m_creature) : npc_escortAI(m_creature) { Reset(); } - void Reset() {} + void Reset() override {} // Exact use of these texts remains unknown, it seems that he should only talk when he initiates the attack or he is the first who is attacked by a npc - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { switch (urand(0, 6)) // Not always said { @@ -76,12 +76,12 @@ struct MANGOS_DLL_DECL npc_willix_the_importerAI : public npc_escortAI } } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { pSummoned->AI()->AttackStart(m_creature); } - void WaypointReached(uint32 uiPointId) + void WaypointReached(uint32 uiPointId) override { switch (uiPointId) { diff --git a/scripts/kalimdor/razorfen_kraul/razorfen_kraul.h b/scripts/kalimdor/razorfen_kraul/razorfen_kraul.h index 613bb3258..88288a94d 100644 --- a/scripts/kalimdor/razorfen_kraul/razorfen_kraul.h +++ b/scripts/kalimdor/razorfen_kraul/razorfen_kraul.h @@ -22,16 +22,16 @@ class MANGOS_DLL_DECL instance_razorfen_kraul : public ScriptedInstance instance_razorfen_kraul(Map* pMap); ~instance_razorfen_kraul() {} - void Initialize(); + void Initialize() override; - void OnObjectCreate(GameObject* pGo); - void OnCreatureCreate(Creature* pCreature); + void OnObjectCreate(GameObject* pGo) override; + void OnCreatureCreate(Creature* pCreature) override; - void SetData(uint32 uiType, uint32 uiData); - uint32 GetData(uint32 uiType); + void SetData(uint32 uiType, uint32 uiData) override; + uint32 GetData(uint32 uiType) override; - const char* Save() { return m_strInstData.c_str(); } - void Load(const char* chrIn); + const char* Save() override { return m_strInstData.c_str(); } + void Load(const char* chrIn) override; protected: uint32 m_auiEncounter[MAX_ENCOUNTER]; diff --git a/scripts/kalimdor/ruins_of_ahnqiraj/boss_ayamiss.cpp b/scripts/kalimdor/ruins_of_ahnqiraj/boss_ayamiss.cpp index 87e07f08e..81087fa83 100644 --- a/scripts/kalimdor/ruins_of_ahnqiraj/boss_ayamiss.cpp +++ b/scripts/kalimdor/ruins_of_ahnqiraj/boss_ayamiss.cpp @@ -78,7 +78,7 @@ struct MANGOS_DLL_DECL boss_ayamissAI : public ScriptedAI ObjectGuid m_paralyzeTarget; GuidList m_lSwarmersGuidList; - void Reset() + void Reset() override { m_uiStingerSprayTimer = urand(20000, 30000); m_uiPoisonStingerTimer = 5000; @@ -94,13 +94,13 @@ struct MANGOS_DLL_DECL boss_ayamissAI : public ScriptedAI SetCombatMovement(false); } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { m_creature->SetLevitate(true); m_creature->GetMotionMaster()->MovePoint(0, m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ() + 15.0f); } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { // store the swarmers for a future attack if (pSummoned->GetEntry() == NPC_SWARMER) @@ -118,7 +118,7 @@ struct MANGOS_DLL_DECL boss_ayamissAI : public ScriptedAI } } - void SummonedMovementInform(Creature* pSummoned, uint32 uiMotionType, uint32 uiPointId) + void SummonedMovementInform(Creature* pSummoned, uint32 uiMotionType, uint32 uiPointId) override { if (uiPointId != 1 || pSummoned->GetEntry() != NPC_LARVA) return; @@ -128,7 +128,7 @@ struct MANGOS_DLL_DECL boss_ayamissAI : public ScriptedAI pSummoned->CastSpell(pTarget, SPELL_FEED, true, NULL, NULL, m_creature->GetObjectGuid()); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -266,9 +266,9 @@ struct MANGOS_DLL_DECL npc_hive_zara_larvaAI : public ScriptedAI instance_ruins_of_ahnqiraj* m_pInstance; - void Reset() { } + void Reset() override { } - void AttackStart(Unit* pWho) + void AttackStart(Unit* pWho) override { // don't attack anything during the Ayamiss encounter if (m_pInstance) @@ -280,7 +280,7 @@ struct MANGOS_DLL_DECL npc_hive_zara_larvaAI : public ScriptedAI ScriptedAI::AttackStart(pWho); } - void MoveInLineOfSight(Unit* pWho) + void MoveInLineOfSight(Unit* pWho) override { // don't attack anything during the Ayamiss encounter if (m_pInstance) @@ -292,7 +292,7 @@ struct MANGOS_DLL_DECL npc_hive_zara_larvaAI : public ScriptedAI ScriptedAI::MoveInLineOfSight(pWho); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (m_pInstance) { diff --git a/scripts/kalimdor/ruins_of_ahnqiraj/boss_buru.cpp b/scripts/kalimdor/ruins_of_ahnqiraj/boss_buru.cpp index 8118174c9..d7f2b150a 100644 --- a/scripts/kalimdor/ruins_of_ahnqiraj/boss_buru.cpp +++ b/scripts/kalimdor/ruins_of_ahnqiraj/boss_buru.cpp @@ -60,7 +60,7 @@ struct MANGOS_DLL_DECL boss_buruAI : public ScriptedAI uint32 m_uiGatheringSpeedTimer; uint32 m_uiFullSpeedTimer; - void Reset() + void Reset() override { m_uiDismemberTimer = 5000; m_uiGatheringSpeedTimer = 9000; @@ -69,13 +69,13 @@ struct MANGOS_DLL_DECL boss_buruAI : public ScriptedAI m_uiPhase = PHASE_EGG; } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoScriptText(EMOTE_TARGET, m_creature, pWho); DoCastSpellIfCan(m_creature, SPELL_THORNS); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { // Attack a new random target when a player is killed if (pVictim->GetTypeId() == TYPEID_PLAYER) @@ -102,7 +102,7 @@ struct MANGOS_DLL_DECL boss_buruAI : public ScriptedAI m_uiGatheringSpeedTimer = 9000; } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -182,10 +182,10 @@ struct MANGOS_DLL_DECL npc_buru_eggAI : public Scripted_NoMovementAI ScriptedInstance* m_pInstance; - void Reset() + void Reset() override { } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { // The purpose of this is unk for the moment if (pSummoned->GetEntry() == NPC_BURU_EGG_TRIGGER) @@ -204,7 +204,7 @@ struct MANGOS_DLL_DECL npc_buru_eggAI : public Scripted_NoMovementAI } } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { // Explode and Summon hatchling DoCastSpellIfCan(m_creature, SPELL_EXPLODE, CAST_TRIGGERED); @@ -221,7 +221,7 @@ struct MANGOS_DLL_DECL npc_buru_eggAI : public Scripted_NoMovementAI } } - void UpdateAI(const uint32 uiDiff) { } + void UpdateAI(const uint32 uiDiff) override { } }; CreatureAI* GetAI_npc_buru_egg(Creature* pCreature) diff --git a/scripts/kalimdor/ruins_of_ahnqiraj/boss_kurinnaxx.cpp b/scripts/kalimdor/ruins_of_ahnqiraj/boss_kurinnaxx.cpp index c3ed80cd6..d25e205d4 100644 --- a/scripts/kalimdor/ruins_of_ahnqiraj/boss_kurinnaxx.cpp +++ b/scripts/kalimdor/ruins_of_ahnqiraj/boss_kurinnaxx.cpp @@ -48,7 +48,7 @@ struct MANGOS_DLL_DECL boss_kurinnaxxAI : public ScriptedAI ObjectGuid m_sandtrapGuid; - void Reset() + void Reset() override { m_bEnraged = false; @@ -59,7 +59,7 @@ struct MANGOS_DLL_DECL boss_kurinnaxxAI : public ScriptedAI m_uiTrapTriggerTimer = 0; } - void JustSummoned(GameObject* pGo) + void JustSummoned(GameObject* pGo) override { if (pGo->GetEntry() == GO_SAND_TRAP) { @@ -68,7 +68,7 @@ struct MANGOS_DLL_DECL boss_kurinnaxxAI : public ScriptedAI } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/kalimdor/ruins_of_ahnqiraj/boss_moam.cpp b/scripts/kalimdor/ruins_of_ahnqiraj/boss_moam.cpp index 20ef9fdba..54f9a974f 100644 --- a/scripts/kalimdor/ruins_of_ahnqiraj/boss_moam.cpp +++ b/scripts/kalimdor/ruins_of_ahnqiraj/boss_moam.cpp @@ -52,7 +52,7 @@ struct MANGOS_DLL_DECL boss_moamAI : public ScriptedAI uint32 m_uiCheckoutManaTimer; uint32 m_uiSummonManaFiendsTimer; - void Reset() + void Reset() override { m_uiTrampleTimer = 9000; m_uiManaDrainTimer = 3000; @@ -63,13 +63,13 @@ struct MANGOS_DLL_DECL boss_moamAI : public ScriptedAI m_creature->SetMaxPower(POWER_MANA, 0); } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoScriptText(EMOTE_AGGRO, m_creature); m_creature->SetMaxPower(POWER_MANA, m_creature->GetCreatureInfo()->maxmana); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/kalimdor/ruins_of_ahnqiraj/boss_ossirian.cpp b/scripts/kalimdor/ruins_of_ahnqiraj/boss_ossirian.cpp index aff4c90ff..f37aff97b 100644 --- a/scripts/kalimdor/ruins_of_ahnqiraj/boss_ossirian.cpp +++ b/scripts/kalimdor/ruins_of_ahnqiraj/boss_ossirian.cpp @@ -78,7 +78,7 @@ struct MANGOS_DLL_DECL boss_ossirianAI : public ScriptedAI bool m_bSaidIntro; - void Reset() + void Reset() override { m_uiCrystalPosition = 0; m_uiCycloneTimer = 20000; @@ -87,19 +87,19 @@ struct MANGOS_DLL_DECL boss_ossirianAI : public ScriptedAI m_uiSupremeTimer = 45000; } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoCastSpellIfCan(m_creature, SPELL_SUPREME, CAST_TRIGGERED); DoScriptText(SAY_AGGRO, m_creature); DoSpawnNextCrystal(); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoScriptText(SAY_DEATH, m_creature); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { DoScriptText(SAY_SLAY, m_creature); } @@ -136,13 +136,13 @@ struct MANGOS_DLL_DECL boss_ossirianAI : public ScriptedAI ++m_uiCrystalPosition %= MAX_CRYSTAL_POSITIONS; } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { if (pSummoned->GetEntry() == NPC_OSSIRIAN_TRIGGER) pSummoned->CastSpell(pSummoned, SPELL_SUMMON_CRYSTAL, true); } - void SpellHit(Unit* pCaster, const SpellEntry* pSpell) + void SpellHit(Unit* pCaster, const SpellEntry* pSpell) override { if (pCaster->GetTypeId() == TYPEID_UNIT && pCaster->GetEntry() == NPC_OSSIRIAN_TRIGGER) { @@ -167,7 +167,7 @@ struct MANGOS_DLL_DECL boss_ossirianAI : public ScriptedAI } } - void MoveInLineOfSight(Unit* pWho) + void MoveInLineOfSight(Unit* pWho) override { // TODO: Range guesswork if (!m_bSaidIntro && pWho->GetTypeId() == TYPEID_PLAYER && m_creature->IsWithinDistInMap(pWho, 75.0f, false)) @@ -182,7 +182,7 @@ struct MANGOS_DLL_DECL boss_ossirianAI : public ScriptedAI } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/kalimdor/ruins_of_ahnqiraj/boss_rajaxx.cpp b/scripts/kalimdor/ruins_of_ahnqiraj/boss_rajaxx.cpp index 52dc08c22..5dd2c38f9 100644 --- a/scripts/kalimdor/ruins_of_ahnqiraj/boss_rajaxx.cpp +++ b/scripts/kalimdor/ruins_of_ahnqiraj/boss_rajaxx.cpp @@ -93,14 +93,14 @@ struct MANGOS_DLL_DECL npc_general_andorovAI : public ScriptedAI, private Dialog uint8 m_uiPointId; - void Reset() + void Reset() override { m_uiCommandAuraTimer = urand(1000, 3000); m_uiBashTimer = urand(8000, 11000); m_uiStrikeTimer = urand(2000, 5000); } - void MoveInLineOfSight(Unit* pWho) + void MoveInLineOfSight(Unit* pWho) override { // If Rajaxx is in range attack him if (pWho->GetEntry() == NPC_RAJAXX && m_creature->IsWithinDistInMap(pWho, 50.0f)) @@ -109,7 +109,7 @@ struct MANGOS_DLL_DECL npc_general_andorovAI : public ScriptedAI, private Dialog ScriptedAI::MoveInLineOfSight(pWho); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { if (pKiller->GetEntry() != NPC_RAJAXX) return; @@ -122,7 +122,7 @@ struct MANGOS_DLL_DECL npc_general_andorovAI : public ScriptedAI, private Dialog } } - void JustDidDialogueStep(int32 iEntry) + void JustDidDialogueStep(int32 iEntry) override { // Start the event when the dialogue is finished if (iEntry == SAY_ANDOROV_ATTACK_START) @@ -132,7 +132,7 @@ struct MANGOS_DLL_DECL npc_general_andorovAI : public ScriptedAI, private Dialog } } - void MovementInform(uint32 uiType, uint32 uiPointId) + void MovementInform(uint32 uiType, uint32 uiPointId) override { if (uiType != POINT_MOTION_TYPE) return; @@ -161,7 +161,7 @@ struct MANGOS_DLL_DECL npc_general_andorovAI : public ScriptedAI, private Dialog } } - void EnterEvadeMode() + void EnterEvadeMode() override { if (!m_pInstance) return; @@ -209,7 +209,7 @@ struct MANGOS_DLL_DECL npc_general_andorovAI : public ScriptedAI, private Dialog StartNextDialogueText(SAY_ANDOROV_INTRO_1); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { DialogueUpdate(uiDiff); @@ -312,13 +312,13 @@ struct MANGOS_DLL_DECL npc_kaldorei_eliteAI : public ScriptedAI uint32 m_uiCleaveTimer; uint32 m_uiStrikeTimer; - void Reset() + void Reset() override { m_uiCleaveTimer = urand(2000, 4000); m_uiStrikeTimer = urand(8000, 11000); } - void EnterEvadeMode() + void EnterEvadeMode() override { if (!m_pInstance) return; @@ -342,7 +342,7 @@ struct MANGOS_DLL_DECL npc_kaldorei_eliteAI : public ScriptedAI Reset(); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/kalimdor/ruins_of_ahnqiraj/ruins_of_ahnqiraj.cpp b/scripts/kalimdor/ruins_of_ahnqiraj/ruins_of_ahnqiraj.cpp index 9fec5872e..44bf5bd24 100644 --- a/scripts/kalimdor/ruins_of_ahnqiraj/ruins_of_ahnqiraj.cpp +++ b/scripts/kalimdor/ruins_of_ahnqiraj/ruins_of_ahnqiraj.cpp @@ -68,7 +68,7 @@ struct MANGOS_DLL_DECL mob_anubisath_guardianAI : public ScriptedAI bool m_bIsEnraged; - void Reset() + void Reset() override { m_uiSpell1 = urand(0, 1) ? SPELL_METEOR : SPELL_PLAGUE; m_uiSpell2 = urand(0, 1) ? SPELL_SHADOW_STORM : SPELL_THUNDER_CLAP; @@ -83,24 +83,24 @@ struct MANGOS_DLL_DECL mob_anubisath_guardianAI : public ScriptedAI m_bIsEnraged = false; } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { // spell reflection DoCastSpellIfCan(m_creature, m_uiSpell3); } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { pSummoned->AI()->AttackStart(m_creature->getVictim()); ++m_uiSummonCount; } - void SummonedCreatureDespawn(Creature* pDespawned) + void SummonedCreatureDespawn(Creature* pDespawned) override { --m_uiSummonCount; } - void DamageTaken(Unit* pDoneBy, uint32& uiDamage) + void DamageTaken(Unit* pDoneBy, uint32& uiDamage) override { // when we reach 10% of HP explode or enrage if (!m_bIsEnraged && m_creature->GetHealthPercent() < 10.0f) @@ -116,7 +116,7 @@ struct MANGOS_DLL_DECL mob_anubisath_guardianAI : public ScriptedAI } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/kalimdor/ruins_of_ahnqiraj/ruins_of_ahnqiraj.h b/scripts/kalimdor/ruins_of_ahnqiraj/ruins_of_ahnqiraj.h index 698125bcb..7deb366bc 100644 --- a/scripts/kalimdor/ruins_of_ahnqiraj/ruins_of_ahnqiraj.h +++ b/scripts/kalimdor/ruins_of_ahnqiraj/ruins_of_ahnqiraj.h @@ -103,26 +103,26 @@ class MANGOS_DLL_DECL instance_ruins_of_ahnqiraj : public ScriptedInstance instance_ruins_of_ahnqiraj(Map* pMap); ~instance_ruins_of_ahnqiraj() {} - void Initialize(); + void Initialize() override; - // bool IsEncounterInProgress() const; // not active in AQ20 + // bool IsEncounterInProgress() const override; // not active in AQ20 - void OnCreatureCreate(Creature* pCreature); - void OnPlayerEnter(Player* pPlayer); + void OnCreatureCreate(Creature* pCreature) override; + void OnPlayerEnter(Player* pPlayer) override; - void OnCreatureEnterCombat(Creature* pCreature); + void OnCreatureEnterCombat(Creature* pCreature) override; void OnCreatureEvade(Creature* pCreature); - void OnCreatureDeath(Creature* pCreature); + void OnCreatureDeath(Creature* pCreature) override; - void SetData(uint32 uiType, uint32 uiData); - uint32 GetData(uint32 uiType); + void SetData(uint32 uiType, uint32 uiData) override; + uint32 GetData(uint32 uiType) override; void GetKaldoreiGuidList(GuidList& lList) { lList = m_lKaldoreiGuidList; } - void Update(uint32 uiDiff); + void Update(uint32 uiDiff) override; - const char* Save() { return m_strInstData.c_str(); } - void Load(const char* chrIn); + const char* Save() override { return m_strInstData.c_str(); } + void Load(const char* chrIn) override; private: void DoSapwnAndorovIfCan(); diff --git a/scripts/kalimdor/silithus.cpp b/scripts/kalimdor/silithus.cpp index 6b2e355ca..f9ffedc99 100644 --- a/scripts/kalimdor/silithus.cpp +++ b/scripts/kalimdor/silithus.cpp @@ -236,14 +236,14 @@ struct MANGOS_DLL_DECL npc_anachronos_the_ancientAI : public ScriptedAI, private GuidList m_lQirajiWarriorsList; - void Reset() + void Reset() override { // We summon the rest of the dragons on timer m_uiEventTimer = 100; m_uiEventStage = 0; } - void JustDidDialogueStep(int32 iEntry) + void JustDidDialogueStep(int32 iEntry) override { switch (iEntry) { @@ -430,7 +430,7 @@ struct MANGOS_DLL_DECL npc_anachronos_the_ancientAI : public ScriptedAI, private } } - Creature* GetSpeakerByEntry(uint32 uiEntry) + Creature* GetSpeakerByEntry(uint32 uiEntry) override { switch (uiEntry) { @@ -492,7 +492,7 @@ struct MANGOS_DLL_DECL npc_anachronos_the_ancientAI : public ScriptedAI, private } } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { // Also remove npc flags where needed switch (pSummoned->GetEntry()) @@ -522,7 +522,7 @@ struct MANGOS_DLL_DECL npc_anachronos_the_ancientAI : public ScriptedAI, private } } - void MovementInform(uint32 uiType, uint32 uiPointId) + void MovementInform(uint32 uiType, uint32 uiPointId) override { if (uiType != POINT_MOTION_TYPE) return; @@ -555,7 +555,7 @@ struct MANGOS_DLL_DECL npc_anachronos_the_ancientAI : public ScriptedAI, private } } - void SummonedMovementInform(Creature* pSummoned, uint32 uiType, uint32 uiPointId) + void SummonedMovementInform(Creature* pSummoned, uint32 uiType, uint32 uiPointId) override { if (uiType != POINT_MOTION_TYPE) return; @@ -592,7 +592,7 @@ struct MANGOS_DLL_DECL npc_anachronos_the_ancientAI : public ScriptedAI, private } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { DialogueUpdate(uiDiff); diff --git a/scripts/kalimdor/stonetalon_mountains.cpp b/scripts/kalimdor/stonetalon_mountains.cpp index 1171d3a61..be97af6c0 100644 --- a/scripts/kalimdor/stonetalon_mountains.cpp +++ b/scripts/kalimdor/stonetalon_mountains.cpp @@ -45,14 +45,14 @@ struct MANGOS_DLL_DECL npc_kayaAI : public npc_escortAI { npc_kayaAI(Creature* pCreature) : npc_escortAI(pCreature) { Reset(); } - void Reset() { } + void Reset() override { } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { pSummoned->AI()->AttackStart(m_creature); } - void WaypointReached(uint32 uiPointId) + void WaypointReached(uint32 uiPointId) override { switch (uiPointId) { diff --git a/scripts/kalimdor/tanaris.cpp b/scripts/kalimdor/tanaris.cpp index c2ee315ad..1e53b7c41 100644 --- a/scripts/kalimdor/tanaris.cpp +++ b/scripts/kalimdor/tanaris.cpp @@ -61,7 +61,7 @@ struct MANGOS_DLL_DECL mob_aquementasAI : public ScriptedAI uint32 m_uiFrostShockTimer; uint32 m_uiAquaJetTimer; - void Reset() + void Reset() override { m_uiSwitchFactionTimer = 10000; m_uiAquaJetTimer = 5000; @@ -82,7 +82,7 @@ struct MANGOS_DLL_DECL mob_aquementasAI : public ScriptedAI } } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoScriptText(AGGRO_YELL_AQUE, m_creature, pWho); @@ -90,7 +90,7 @@ struct MANGOS_DLL_DECL mob_aquementasAI : public ScriptedAI SendItem(static_cast(pWho)); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (m_uiSwitchFactionTimer) { @@ -162,7 +162,7 @@ struct MANGOS_DLL_DECL npc_custodian_of_timeAI : public npc_escortAI { npc_custodian_of_timeAI(Creature* pCreature) : npc_escortAI(pCreature) { Reset(); } - void WaypointReached(uint32 uiPointId) + void WaypointReached(uint32 uiPointId) override { Player* pPlayer = GetPlayerForEscort(); @@ -195,7 +195,7 @@ struct MANGOS_DLL_DECL npc_custodian_of_timeAI : public npc_escortAI } } - void MoveInLineOfSight(Unit* pWho) + void MoveInLineOfSight(Unit* pWho) override { if (HasEscortState(STATE_ESCORT_ESCORTING)) return; @@ -212,7 +212,7 @@ struct MANGOS_DLL_DECL npc_custodian_of_timeAI : public npc_escortAI } } - void Reset() { } + void Reset() override { } }; CreatureAI* GetAI_npc_custodian_of_time(Creature* pCreature) @@ -244,7 +244,7 @@ struct MANGOS_DLL_DECL npc_oox17tnAI : public npc_escortAI { npc_oox17tnAI(Creature* pCreature) : npc_escortAI(pCreature) { Reset(); } - void WaypointReached(uint32 i) + void WaypointReached(uint32 i) override { Player* pPlayer = GetPlayerForEscort(); @@ -279,9 +279,9 @@ struct MANGOS_DLL_DECL npc_oox17tnAI : public npc_escortAI } } - void Reset() { } + void Reset() override { } - void Aggro(Unit* who) + void Aggro(Unit* who) override { // For an small probability he say something when it aggros switch (urand(0, 9)) @@ -291,7 +291,7 @@ struct MANGOS_DLL_DECL npc_oox17tnAI : public npc_escortAI } } - void JustSummoned(Creature* summoned) + void JustSummoned(Creature* summoned) override { summoned->AI()->AttackStart(m_creature); } @@ -411,7 +411,7 @@ struct MANGOS_DLL_DECL npc_toogaAI : public FollowerAI Unit* pTorta; - void Reset() + void Reset() override { m_uiCheckSpeechTimer = 2500; m_uiPostEventTimer = 1000; @@ -420,7 +420,7 @@ struct MANGOS_DLL_DECL npc_toogaAI : public FollowerAI pTorta = NULL; } - void MoveInLineOfSight(Unit* pWho) + void MoveInLineOfSight(Unit* pWho) override { FollowerAI::MoveInLineOfSight(pWho); @@ -440,7 +440,7 @@ struct MANGOS_DLL_DECL npc_toogaAI : public FollowerAI } } - void MovementInform(uint32 uiMotionType, uint32 uiPointId) + void MovementInform(uint32 uiMotionType, uint32 uiPointId) override { FollowerAI::MovementInform(uiMotionType, uiPointId); @@ -451,7 +451,7 @@ struct MANGOS_DLL_DECL npc_toogaAI : public FollowerAI SetFollowComplete(); } - void UpdateFollowerAI(const uint32 uiDiff) + void UpdateFollowerAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) { diff --git a/scripts/kalimdor/teldrassil.cpp b/scripts/kalimdor/teldrassil.cpp index 3e2e2b7b0..79780f25f 100644 --- a/scripts/kalimdor/teldrassil.cpp +++ b/scripts/kalimdor/teldrassil.cpp @@ -45,9 +45,9 @@ struct MANGOS_DLL_DECL npc_mistAI : public FollowerAI { npc_mistAI(Creature* pCreature) : FollowerAI(pCreature) { Reset(); } - void Reset() { } + void Reset() override { } - void MoveInLineOfSight(Unit* pWho) + void MoveInLineOfSight(Unit* pWho) override { FollowerAI::MoveInLineOfSight(pWho); @@ -76,7 +76,7 @@ struct MANGOS_DLL_DECL npc_mistAI : public FollowerAI } // call not needed here, no known abilities - /*void UpdateFollowerAI(const uint32 uiDiff) + /*void UpdateFollowerAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_bug_trio.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_bug_trio.cpp index f6be97510..6088fa87c 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/boss_bug_trio.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_bug_trio.cpp @@ -56,13 +56,13 @@ struct MANGOS_DLL_DECL boss_kriAI : public ScriptedAI uint32 m_uiCleaveTimer; uint32 m_uiToxicVolleyTimer; - void Reset() + void Reset() override { m_uiCleaveTimer = urand(4000, 8000); m_uiToxicVolleyTimer = urand(6000, 12000); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { // poison cloud on death DoCastSpellIfCan(m_creature, SPELL_SUMMON_CLOUD, CAST_TRIGGERED); @@ -78,13 +78,13 @@ struct MANGOS_DLL_DECL boss_kriAI : public ScriptedAI } } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_BUG_TRIO, FAIL); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { // Return since we have no target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) @@ -125,13 +125,13 @@ struct MANGOS_DLL_DECL boss_vemAI : public ScriptedAI uint32 m_uiChargeTimer; uint32 m_uiKnockBackTimer; - void Reset() + void Reset() override { m_uiChargeTimer = urand(15000, 27000); m_uiKnockBackTimer = urand(8000, 20000); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { // Enrage the other bugs DoCastSpellIfCan(m_creature, SPELL_VENGEANCE, CAST_TRIGGERED); @@ -147,13 +147,13 @@ struct MANGOS_DLL_DECL boss_vemAI : public ScriptedAI } } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_BUG_TRIO, FAIL); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { // Return since we have no target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) @@ -202,13 +202,13 @@ struct MANGOS_DLL_DECL boss_yaujAI : public ScriptedAI uint32 m_uiHealTimer; uint32 m_uiFearTimer; - void Reset() + void Reset() override { m_uiHealTimer = urand(25000, 40000); m_uiFearTimer = urand(12000, 24000); } - void JustDied(Unit* Killer) + void JustDied(Unit* Killer) override { // Spawn 10 yauj brood on death float fX, fY, fZ; @@ -229,13 +229,13 @@ struct MANGOS_DLL_DECL boss_yaujAI : public ScriptedAI } } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_BUG_TRIO, FAIL); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { // Return since we have no target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_cthun.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_cthun.cpp index 088a4a48c..e16ba23aa 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/boss_cthun.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_cthun.cpp @@ -119,7 +119,7 @@ struct MANGOS_DLL_DECL boss_eye_of_cthunAI : public Scripted_NoMovementAI GuidList m_lEyeTentaclesList; - void Reset() + void Reset() override { m_Phase = PHASE_EYE_NORMAL; @@ -130,13 +130,13 @@ struct MANGOS_DLL_DECL boss_eye_of_cthunAI : public Scripted_NoMovementAI m_uiEyeTentacleTimer = 45000; } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { if (m_pInstance) m_pInstance->SetData(TYPE_CTHUN, IN_PROGRESS); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { // Allow the body to begin the transition if (m_pInstance) @@ -148,7 +148,7 @@ struct MANGOS_DLL_DECL boss_eye_of_cthunAI : public Scripted_NoMovementAI } } - void JustReachedHome() + void JustReachedHome() override { // Despawn Eye tentacles on evade DoDespawnEyeTentacles(); @@ -157,7 +157,7 @@ struct MANGOS_DLL_DECL boss_eye_of_cthunAI : public Scripted_NoMovementAI m_pInstance->SetData(TYPE_CTHUN, FAIL); } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { switch (pSummoned->GetEntry()) { @@ -173,14 +173,14 @@ struct MANGOS_DLL_DECL boss_eye_of_cthunAI : public Scripted_NoMovementAI } } - void SummonedCreatureJustDied(Creature* pSummoned) + void SummonedCreatureJustDied(Creature* pSummoned) override { // Despawn the tentacle portal - this applies to all the summoned tentacles if (Creature* pPortal = GetClosestCreatureWithEntry(pSummoned, NPC_TENTACLE_PORTAL, 5.0f)) pPortal->ForcedDespawn(); } - void SummonedCreatureDespawn(Creature* pSummoned) + void SummonedCreatureDespawn(Creature* pSummoned) override { // Used only after evade if (SelectHostileTarget()) @@ -231,7 +231,7 @@ struct MANGOS_DLL_DECL boss_eye_of_cthunAI : public Scripted_NoMovementAI return m_creature->SelectHostileTarget(); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!SelectHostileTarget()) return; @@ -358,7 +358,7 @@ struct MANGOS_DLL_DECL boss_cthunAI : public Scripted_NoMovementAI ObjectGuid m_stomachEnterTargetGuid; - void Reset() + void Reset() override { // Phase information m_Phase = PHASE_TRANSITION; @@ -381,7 +381,7 @@ struct MANGOS_DLL_DECL boss_cthunAI : public Scripted_NoMovementAI m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); } - void DamageTaken(Unit* pDealer, uint32& uiDamage) + void DamageTaken(Unit* pDealer, uint32& uiDamage) override { // Ignore damage reduction when vulnerable if (m_Phase == PHASE_CTHUN_WEAKENED) @@ -398,7 +398,7 @@ struct MANGOS_DLL_DECL boss_cthunAI : public Scripted_NoMovementAI uiDamage = 0; } - void EnterEvadeMode() + void EnterEvadeMode() override { // Kill any player from the stomach on evade - this is becuase C'thun cannot be soloed. for (GuidList::const_iterator itr = m_lPlayersInStomachList.begin(); itr != m_lPlayersInStomachList.end(); ++itr) @@ -411,13 +411,13 @@ struct MANGOS_DLL_DECL boss_cthunAI : public Scripted_NoMovementAI Scripted_NoMovementAI::EnterEvadeMode(); } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_CTHUN, FAIL); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { m_creature->SetActiveObjectState(false); @@ -425,7 +425,7 @@ struct MANGOS_DLL_DECL boss_cthunAI : public Scripted_NoMovementAI m_pInstance->SetData(TYPE_CTHUN, DONE); } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { switch (pSummoned->GetEntry()) { @@ -446,7 +446,7 @@ struct MANGOS_DLL_DECL boss_cthunAI : public Scripted_NoMovementAI } } - void SummonedCreatureJustDied(Creature* pSummoned) + void SummonedCreatureJustDied(Creature* pSummoned) override { switch (pSummoned->GetEntry()) { @@ -533,7 +533,7 @@ struct MANGOS_DLL_DECL boss_cthunAI : public Scripted_NoMovementAI return m_creature->SelectHostileTarget(); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!SelectHostileTarget()) return; @@ -688,7 +688,7 @@ struct MANGOS_DLL_DECL npc_giant_claw_tentacleAI : public Scripted_NoMovementAI uint32 m_uiHamstringTimer; uint32 m_uiDistCheckTimer; - void Reset() + void Reset() override { m_uiHamstringTimer = 2000; m_uiThrashTimer = 5000; @@ -697,7 +697,7 @@ struct MANGOS_DLL_DECL npc_giant_claw_tentacleAI : public Scripted_NoMovementAI DoCastSpellIfCan(m_creature, SPELL_GIANT_GROUND_RUPTURE); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { // Check if we have a target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_fankriss.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_fankriss.cpp index ea9529a24..244bd81c6 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/boss_fankriss.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_fankriss.cpp @@ -64,7 +64,7 @@ struct MANGOS_DLL_DECL boss_fankrissAI : public ScriptedAI ObjectGuid m_EntangleTargetGuid; - void Reset() + void Reset() override { m_uiMortalWoundTimer = urand(10000, 15000); m_uiSummonWormTimer = urand(30000, 50000); @@ -72,25 +72,25 @@ struct MANGOS_DLL_DECL boss_fankrissAI : public ScriptedAI m_uiEntangleSummonTimer = 0; } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { if (m_pInstance) m_pInstance->SetData(TYPE_FANKRISS, IN_PROGRESS); } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_FANKRISS, FAIL); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { if (m_pInstance) m_pInstance->SetData(TYPE_FANKRISS, DONE); } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { if (pSummoned->GetEntry() == NPC_SPAWN_FANKRISS) { @@ -104,7 +104,7 @@ struct MANGOS_DLL_DECL boss_fankrissAI : public ScriptedAI } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_huhuran.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_huhuran.cpp index 4686f0012..8fb4a7c19 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/boss_huhuran.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_huhuran.cpp @@ -53,7 +53,7 @@ struct MANGOS_DLL_DECL boss_huhuranAI : public ScriptedAI bool m_bIsBerserk; - void Reset() + void Reset() override { m_uiFrenzyTimer = urand(25000, 35000); m_uiWyvernTimer = urand(18000, 28000); @@ -62,25 +62,25 @@ struct MANGOS_DLL_DECL boss_huhuranAI : public ScriptedAI m_bIsBerserk = false; } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { if (m_pInstance) m_pInstance->SetData(TYPE_HUHURAN, IN_PROGRESS); } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_HUHURAN, FAIL); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { if (m_pInstance) m_pInstance->SetData(TYPE_HUHURAN, DONE); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { // Return since we have no target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_ouro.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_ouro.cpp index 426377f18..ffc261be8 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/boss_ouro.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_ouro.cpp @@ -84,7 +84,7 @@ struct MANGOS_DLL_DECL boss_ouroAI : public Scripted_NoMovementAI ObjectGuid m_ouroTriggerGuid; - void Reset() + void Reset() override { m_uiSweepTimer = urand(35000, 40000); m_uiSandBlastTimer = urand(30000, 45000); @@ -97,13 +97,13 @@ struct MANGOS_DLL_DECL boss_ouroAI : public Scripted_NoMovementAI m_bSubmerged = false; } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { if (m_pInstance) m_pInstance->SetData(TYPE_OURO, IN_PROGRESS); } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_OURO, FAIL); @@ -111,13 +111,13 @@ struct MANGOS_DLL_DECL boss_ouroAI : public Scripted_NoMovementAI m_creature->ForcedDespawn(); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { if (m_pInstance) m_pInstance->SetData(TYPE_OURO, DONE); } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { switch (pSummoned->GetEntry()) { @@ -130,7 +130,7 @@ struct MANGOS_DLL_DECL boss_ouroAI : public Scripted_NoMovementAI } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { // Return since we have no pTarget if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) @@ -260,13 +260,13 @@ struct MANGOS_DLL_DECL npc_ouro_spawnerAI : public Scripted_NoMovementAI uint32 m_uiQuakeTimer; bool m_bHasSummoned; - void Reset() + void Reset() override { m_uiQuakeTimer = 1000; m_bHasSummoned = false; } - void MoveInLineOfSight(Unit* pWho) + void MoveInLineOfSight(Unit* pWho) override { // Spawn Ouro on LoS check if (!m_bHasSummoned && pWho->GetTypeId() == TYPEID_PLAYER && !((Player*)pWho)->isGameMaster() && m_creature->IsWithinDistInMap(pWho, 50.0f)) @@ -278,7 +278,7 @@ struct MANGOS_DLL_DECL npc_ouro_spawnerAI : public Scripted_NoMovementAI ScriptedAI::MoveInLineOfSight(pWho); } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { // Despanw when Ouro is spawned if (pSummoned->GetEntry() == NPC_OURO) @@ -289,7 +289,7 @@ struct MANGOS_DLL_DECL npc_ouro_spawnerAI : public Scripted_NoMovementAI } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (m_bHasSummoned) { diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_sartura.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_sartura.cpp index df55fb1e1..cc45ac61f 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/boss_sartura.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_sartura.cpp @@ -61,7 +61,7 @@ struct MANGOS_DLL_DECL boss_sarturaAI : public ScriptedAI bool m_bIsWhirlWind; bool m_bAggroReset; - void Reset() + void Reset() override { m_uiWhirlWindTimer = 30000; m_uiWhirlWindRandomTimer = urand(3000, 7000); @@ -76,7 +76,7 @@ struct MANGOS_DLL_DECL boss_sarturaAI : public ScriptedAI m_bIsEnragedHard = false; } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoScriptText(SAY_AGGRO, m_creature); @@ -84,12 +84,12 @@ struct MANGOS_DLL_DECL boss_sarturaAI : public ScriptedAI m_pInstance->SetData(TYPE_SARTURA, IN_PROGRESS); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { DoScriptText(SAY_SLAY, m_creature); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoScriptText(SAY_DEATH, m_creature); @@ -97,13 +97,13 @@ struct MANGOS_DLL_DECL boss_sarturaAI : public ScriptedAI m_pInstance->SetData(TYPE_SARTURA, DONE); } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_SARTURA, FAIL); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -215,7 +215,7 @@ struct MANGOS_DLL_DECL mob_sartura_royal_guardAI : public ScriptedAI bool m_IsWhirlWind; bool m_bAggroReset; - void Reset() + void Reset() override { m_uiWhirlWindTimer = 30000; m_uiWhirlWindRandomTimer = urand(3000, 7000); @@ -228,7 +228,7 @@ struct MANGOS_DLL_DECL mob_sartura_royal_guardAI : public ScriptedAI m_bAggroReset = false; } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_skeram.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_skeram.cpp index f1aa7cdbb..a9c293980 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/boss_skeram.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_skeram.cpp @@ -69,7 +69,7 @@ struct MANGOS_DLL_DECL boss_skeramAI : public ScriptedAI bool m_bIsImage; - void Reset() + void Reset() override { m_uiArcaneExplosionTimer = urand(6000, 12000); m_uiFullFillmentTimer = 15000; @@ -81,7 +81,7 @@ struct MANGOS_DLL_DECL boss_skeramAI : public ScriptedAI m_creature->SetVisibility(VISIBILITY_ON); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { switch (urand(0, 2)) { @@ -91,7 +91,7 @@ struct MANGOS_DLL_DECL boss_skeramAI : public ScriptedAI } } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { if (!m_bIsImage) { @@ -105,7 +105,7 @@ struct MANGOS_DLL_DECL boss_skeramAI : public ScriptedAI m_creature->ForcedDespawn(); } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { if (m_bIsImage) return; @@ -121,7 +121,7 @@ struct MANGOS_DLL_DECL boss_skeramAI : public ScriptedAI m_pInstance->SetData(TYPE_SKERAM, IN_PROGRESS); } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_SKERAM, FAIL); @@ -130,7 +130,7 @@ struct MANGOS_DLL_DECL boss_skeramAI : public ScriptedAI m_creature->ForcedDespawn(); } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) pSummoned->AI()->AttackStart(pTarget); @@ -164,7 +164,7 @@ struct MANGOS_DLL_DECL boss_skeramAI : public ScriptedAI } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { // Return since we have no target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_twinemperors.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_twinemperors.cpp index c9c8d93d5..fd1a3aff0 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/boss_twinemperors.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_twinemperors.cpp @@ -77,7 +77,7 @@ struct MANGOS_DLL_DECL boss_twin_emperorsAI : public ScriptedAI uint32 m_uiBugAbilityTimer; uint32 m_uiTeleportTimer; - void Reset() + void Reset() override { m_uiTeleportTimer = 35000; m_uiBugAbilityTimer = urand(7000, 14000); @@ -85,7 +85,7 @@ struct MANGOS_DLL_DECL boss_twin_emperorsAI : public ScriptedAI } // Workaround for the shared health pool - void DamageTaken(Unit* pDoneBy, uint32& uiDamage) + void DamageTaken(Unit* pDoneBy, uint32& uiDamage) override { if (!m_pInstance) return; @@ -105,25 +105,25 @@ struct MANGOS_DLL_DECL boss_twin_emperorsAI : public ScriptedAI } } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { if (m_pInstance) m_pInstance->SetData(TYPE_TWINS, IN_PROGRESS); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { if (m_pInstance) m_pInstance->SetData(TYPE_TWINS, DONE); } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_TWINS, FAIL); } - void SpellHit(Unit* pCaster, const SpellEntry* pSpell) + void SpellHit(Unit* pCaster, const SpellEntry* pSpell) override { if (pSpell->Id == SPELL_TWIN_TELEPORT) { @@ -142,7 +142,7 @@ struct MANGOS_DLL_DECL boss_twin_emperorsAI : public ScriptedAI // Return true to handle shared timers and MeleeAttack virtual bool UpdateEmperorAI(const uint32 uiDiff) { return true; } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { // Return since we have no target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) @@ -188,7 +188,7 @@ struct MANGOS_DLL_DECL boss_veknilashAI : public boss_twin_emperorsAI uint32 m_uiUppercutTimer; uint32 m_uiUnbalancingStrikeTimer; - void Reset() + void Reset() override { boss_twin_emperorsAI::Reset(); @@ -196,7 +196,7 @@ struct MANGOS_DLL_DECL boss_veknilashAI : public boss_twin_emperorsAI m_uiUnbalancingStrikeTimer = urand(8000, 18000); } - void MoveInLineOfSight(Unit* pWho) + void MoveInLineOfSight(Unit* pWho) override { if (m_pInstance && m_pInstance->GetData(TYPE_TWINS) == IN_PROGRESS && pWho->GetEntry() == NPC_VEKLOR && pWho->IsWithinDistInMap(m_creature, 60.0f)) DoCastSpellIfCan(pWho, SPELL_HEAL_BROTHER); @@ -204,7 +204,7 @@ struct MANGOS_DLL_DECL boss_veknilashAI : public boss_twin_emperorsAI ScriptedAI::MoveInLineOfSight(pWho); } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { boss_twin_emperorsAI::Aggro(pWho); @@ -217,12 +217,12 @@ struct MANGOS_DLL_DECL boss_veknilashAI : public boss_twin_emperorsAI } } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { DoScriptText(SAY_VEKNILASH_SLAY, m_creature); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { boss_twin_emperorsAI::JustDied(pKiller); @@ -297,7 +297,7 @@ struct MANGOS_DLL_DECL boss_veklorAI : public boss_twin_emperorsAI uint32 m_uiBlizzardTimer; uint32 m_uiArcaneBurstTimer; - void Reset() + void Reset() override { boss_twin_emperorsAI::Reset(); @@ -306,7 +306,7 @@ struct MANGOS_DLL_DECL boss_veklorAI : public boss_twin_emperorsAI m_uiArcaneBurstTimer = 1000; } - void MoveInLineOfSight(Unit* pWho) + void MoveInLineOfSight(Unit* pWho) override { if (m_pInstance && m_pInstance->GetData(TYPE_TWINS) == IN_PROGRESS && pWho->GetEntry() == NPC_VEKNILASH && pWho->IsWithinDistInMap(m_creature, 60.0f)) DoCastSpellIfCan(pWho, SPELL_HEAL_BROTHER); @@ -314,7 +314,7 @@ struct MANGOS_DLL_DECL boss_veklorAI : public boss_twin_emperorsAI ScriptedAI::MoveInLineOfSight(pWho); } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { boss_twin_emperorsAI::Aggro(pWho); @@ -327,19 +327,19 @@ struct MANGOS_DLL_DECL boss_veklorAI : public boss_twin_emperorsAI } } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { DoScriptText(SAY_VEKLOR_SLAY, m_creature); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { boss_twin_emperorsAI::JustDied(pKiller); DoScriptText(SAY_VEKLOR_DEATH, m_creature); } - void AttackStart(Unit* pWho) + void AttackStart(Unit* pWho) override { if (m_creature->Attack(pWho, false)) { diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_viscidus.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_viscidus.cpp index ff0d0f2e4..36f0e7f16 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/boss_viscidus.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_viscidus.cpp @@ -66,13 +66,13 @@ struct MANGOS_DLL_DECL boss_viscidusAI : public ScriptedAI uint32 m_uiPoisonShockTimer; uint32 m_uiPoisonBoltVolleyTimer; - void Reset() + void Reset() override { m_uiPoisonShockTimer = urand(7000, 12000); m_uiPoisonBoltVolleyTimer = urand(10000, 15000); } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoCastSpellIfCan(m_creature, SPELL_TOXIN); @@ -80,19 +80,19 @@ struct MANGOS_DLL_DECL boss_viscidusAI : public ScriptedAI m_pInstance->SetData(TYPE_VISCIDUS, IN_PROGRESS); } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_VISCIDUS, FAIL); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { if (m_pInstance) m_pInstance->SetData(TYPE_VISCIDUS, DONE); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/kalimdor/temple_of_ahnqiraj/mob_anubisath_sentinel.cpp b/scripts/kalimdor/temple_of_ahnqiraj/mob_anubisath_sentinel.cpp index e326c20c2..f0cd8a577 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/mob_anubisath_sentinel.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/mob_anubisath_sentinel.cpp @@ -55,13 +55,13 @@ struct MANGOS_DLL_DECL npc_anubisath_sentinelAI : public ScriptedAI GuidList m_lAssistList; - void Reset() + void Reset() override { m_uiMyAbility = 0; m_bEnraged = false; } - void GetAIInformation(ChatHandler& reader) + void GetAIInformation(ChatHandler& reader) override { if (m_lAssistList.empty()) reader.PSendSysMessage("Anubisath Sentinel - group not assigned, will be assigned OnAggro"); @@ -71,7 +71,7 @@ struct MANGOS_DLL_DECL npc_anubisath_sentinelAI : public ScriptedAI reader.PSendSysMessage("Anubisath Sentinel - not correct number of mobs for group found. Number found %u, should be %u", m_lAssistList.size(), MAX_BUDDY); } - void JustReachedHome() + void JustReachedHome() override { for (GuidList::const_iterator itr = m_lAssistList.begin(); itr != m_lAssistList.end(); ++itr) { @@ -86,13 +86,13 @@ struct MANGOS_DLL_DECL npc_anubisath_sentinelAI : public ScriptedAI } } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { SetAbility(); InitSentinelsNear(pWho); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoTransferAbility(); } @@ -170,7 +170,7 @@ struct MANGOS_DLL_DECL npc_anubisath_sentinelAI : public ScriptedAI error_log("SD2: npc_anubisath_sentinel for %s found too few/too many buddies, expected %u.", m_creature->GetGuidStr().c_str(), MAX_BUDDY); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/kalimdor/temple_of_ahnqiraj/temple_of_ahnqiraj.h b/scripts/kalimdor/temple_of_ahnqiraj/temple_of_ahnqiraj.h index de87c082e..31e7049f3 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/temple_of_ahnqiraj.h +++ b/scripts/kalimdor/temple_of_ahnqiraj/temple_of_ahnqiraj.h @@ -70,22 +70,22 @@ class MANGOS_DLL_DECL instance_temple_of_ahnqiraj : public ScriptedInstance public: instance_temple_of_ahnqiraj(Map* pMap); - void Initialize(); + void Initialize() override; - bool IsEncounterInProgress() const; + bool IsEncounterInProgress() const override; - void OnCreatureCreate(Creature* pCreature); - void OnObjectCreate(GameObject* pGo); + void OnCreatureCreate(Creature* pCreature) override; + void OnObjectCreate(GameObject* pGo) override; - void SetData(uint32 uiType, uint32 uiData); - uint32 GetData(uint32 uiType); + void SetData(uint32 uiType, uint32 uiData) override; + uint32 GetData(uint32 uiType) override; void DoHandleTempleAreaTrigger(uint32 uiTriggerId); - const char* Save() { return m_strInstData.c_str(); } - void Load(const char* chrIn); + const char* Save() override { return m_strInstData.c_str(); } + void Load(const char* chrIn) override; - void Update(uint32 uiDiff); + void Update(uint32 uiDiff) override; private: uint32 m_auiEncounter[MAX_ENCOUNTER]; diff --git a/scripts/kalimdor/the_barrens.cpp b/scripts/kalimdor/the_barrens.cpp index 353c3a22a..ec9e3063e 100644 --- a/scripts/kalimdor/the_barrens.cpp +++ b/scripts/kalimdor/the_barrens.cpp @@ -88,9 +88,9 @@ struct MANGOS_DLL_DECL npc_giltharesAI : public npc_escortAI { npc_giltharesAI(Creature* pCreature) : npc_escortAI(pCreature) { Reset(); } - void Reset() { } + void Reset() override { } - void WaypointReached(uint32 uiPointId) + void WaypointReached(uint32 uiPointId) override { Player* pPlayer = GetPlayerForEscort(); @@ -121,7 +121,7 @@ struct MANGOS_DLL_DECL npc_giltharesAI : public npc_escortAI } } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { // not always use if (urand(0, 3)) @@ -180,13 +180,13 @@ struct MANGOS_DLL_DECL npc_taskmaster_fizzuleAI : public ScriptedAI uint32 m_uiResetTimer; uint8 m_uiFlareCount; - void Reset() + void Reset() override { m_uiResetTimer = 0; m_uiFlareCount = 0; } - void EnterEvadeMode() + void EnterEvadeMode() override { if (m_uiResetTimer) { @@ -204,7 +204,7 @@ struct MANGOS_DLL_DECL npc_taskmaster_fizzuleAI : public ScriptedAI ScriptedAI::EnterEvadeMode(); } - void SpellHit(Unit* pCaster, const SpellEntry* pSpell) + void SpellHit(Unit* pCaster, const SpellEntry* pSpell) override { if (pCaster->GetTypeId() == TYPEID_PLAYER && (pSpell->Id == SPELL_FLARE || pSpell->Id == SPELL_FOLLY)) { @@ -215,7 +215,7 @@ struct MANGOS_DLL_DECL npc_taskmaster_fizzuleAI : public ScriptedAI } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (m_uiResetTimer) { @@ -234,7 +234,7 @@ struct MANGOS_DLL_DECL npc_taskmaster_fizzuleAI : public ScriptedAI DoMeleeAttackIfReady(); } - void ReceiveEmote(Player* pPlayer, uint32 uiTextEmote) + void ReceiveEmote(Player* pPlayer, uint32 uiTextEmote) override { if (uiTextEmote == TEXTEMOTE_SALUTE) { @@ -300,7 +300,7 @@ struct MANGOS_DLL_DECL npc_twiggy_flatheadAI : public ScriptedAI ObjectGuid m_bigWillGuid; GuidVector m_vAffrayChallengerGuidsVector; - void Reset() + void Reset() override { m_bIsEventInProgress = false; @@ -346,7 +346,7 @@ struct MANGOS_DLL_DECL npc_twiggy_flatheadAI : public ScriptedAI pChallenger->AI()->AttackStart(pPlayer); } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { if (pSummoned->GetEntry() == NPC_BIG_WILL) { @@ -363,7 +363,7 @@ struct MANGOS_DLL_DECL npc_twiggy_flatheadAI : public ScriptedAI } } - void SummonedMovementInform(Creature* pSummoned, uint32 uiMoveType, uint32 uiPointId) + void SummonedMovementInform(Creature* pSummoned, uint32 uiMoveType, uint32 uiPointId) override { if (uiMoveType != POINT_MOTION_TYPE || !uiPointId || pSummoned->GetEntry() != NPC_BIG_WILL) return; @@ -377,7 +377,7 @@ struct MANGOS_DLL_DECL npc_twiggy_flatheadAI : public ScriptedAI } } - void SummonedCreatureJustDied(Creature* pSummoned) + void SummonedCreatureJustDied(Creature* pSummoned) override { if (pSummoned->GetEntry() == NPC_BIG_WILL) { @@ -391,7 +391,7 @@ struct MANGOS_DLL_DECL npc_twiggy_flatheadAI : public ScriptedAI } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_bIsEventInProgress) return; @@ -499,7 +499,7 @@ struct MANGOS_DLL_DECL npc_wizzlecranks_shredderAI : public npc_escortAI uint32 m_uiPostEventTimer; uint32 m_uiPostEventCount; - void Reset() + void Reset() override { if (!HasEscortState(STATE_ESCORT_ESCORTING)) { @@ -512,7 +512,7 @@ struct MANGOS_DLL_DECL npc_wizzlecranks_shredderAI : public npc_escortAI } } - void WaypointReached(uint32 uiPointId) + void WaypointReached(uint32 uiPointId) override { switch (uiPointId) { @@ -536,7 +536,7 @@ struct MANGOS_DLL_DECL npc_wizzlecranks_shredderAI : public npc_escortAI } } - void WaypointStart(uint32 uiPointId) + void WaypointStart(uint32 uiPointId) override { switch (uiPointId) { @@ -552,7 +552,7 @@ struct MANGOS_DLL_DECL npc_wizzlecranks_shredderAI : public npc_escortAI } } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { if (pSummoned->GetEntry() == NPC_PILOT_WIZZ) m_creature->SetStandState(UNIT_STAND_STATE_DEAD); @@ -561,7 +561,7 @@ struct MANGOS_DLL_DECL npc_wizzlecranks_shredderAI : public npc_escortAI pSummoned->AI()->AttackStart(m_creature); } - void UpdateEscortAI(const uint32 uiDiff) + void UpdateEscortAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) { diff --git a/scripts/kalimdor/thousand_needles.cpp b/scripts/kalimdor/thousand_needles.cpp index b3e3c2fc8..f9bf00dbe 100644 --- a/scripts/kalimdor/thousand_needles.cpp +++ b/scripts/kalimdor/thousand_needles.cpp @@ -50,9 +50,9 @@ struct MANGOS_DLL_DECL npc_kanatiAI : public npc_escortAI { npc_kanatiAI(Creature* pCreature) : npc_escortAI(pCreature) { Reset(); } - void Reset() { } + void Reset() override { } - void WaypointReached(uint32 uiPointId) + void WaypointReached(uint32 uiPointId) override { switch (uiPointId) { @@ -75,7 +75,7 @@ struct MANGOS_DLL_DECL npc_kanatiAI : public npc_escortAI TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000); } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { pSummoned->AI()->AttackStart(m_creature); } @@ -130,9 +130,9 @@ struct MANGOS_DLL_DECL npc_lakota_windsongAI : public npc_escortAI { npc_lakota_windsongAI(Creature* pCreature) : npc_escortAI(pCreature) { Reset(); } - void Reset() { } + void Reset() override { } - void WaypointReached(uint32 uiPointId) + void WaypointReached(uint32 uiPointId) override { switch (uiPointId) { @@ -207,9 +207,9 @@ struct MANGOS_DLL_DECL npc_paoka_swiftmountainAI : public npc_escortAI { npc_paoka_swiftmountainAI(Creature* pCreature) : npc_escortAI(pCreature) { Reset(); } - void Reset() { } + void Reset() override { } - void WaypointReached(uint32 uiPointId) + void WaypointReached(uint32 uiPointId) override { switch (uiPointId) { @@ -279,7 +279,7 @@ struct MANGOS_DLL_DECL npc_plucky_johnsonAI : public ScriptedAI uint32 m_uiNormFaction; uint32 m_uiResetTimer; - void Reset() + void Reset() override { m_uiResetTimer = 120000; @@ -292,7 +292,7 @@ struct MANGOS_DLL_DECL npc_plucky_johnsonAI : public ScriptedAI m_creature->CastSpell(m_creature, SPELL_PLUCKY_CHICKEN, false); } - void ReceiveEmote(Player* pPlayer, uint32 uiTextEmote) + void ReceiveEmote(Player* pPlayer, uint32 uiTextEmote) override { if (pPlayer->GetQuestStatus(QUEST_SCOOP) == QUEST_STATUS_INCOMPLETE) { @@ -318,7 +318,7 @@ struct MANGOS_DLL_DECL npc_plucky_johnsonAI : public ScriptedAI } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (m_creature->HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP)) { diff --git a/scripts/kalimdor/ungoro_crater.cpp b/scripts/kalimdor/ungoro_crater.cpp index 527b5550d..1c5e76c9b 100644 --- a/scripts/kalimdor/ungoro_crater.cpp +++ b/scripts/kalimdor/ungoro_crater.cpp @@ -49,9 +49,9 @@ struct MANGOS_DLL_DECL npc_ame01AI : public npc_escortAI { npc_ame01AI(Creature* pCreature) : npc_escortAI(pCreature) { Reset(); } - void Reset() {} + void Reset() override {} - void WaypointReached(uint32 uiPointId) + void WaypointReached(uint32 uiPointId) override { switch (uiPointId) { @@ -69,7 +69,7 @@ struct MANGOS_DLL_DECL npc_ame01AI : public npc_escortAI } } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { if (pWho->GetTypeId() == TYPEID_PLAYER) return; @@ -156,7 +156,7 @@ struct MANGOS_DLL_DECL npc_ringoAI : public FollowerAI Unit* pSpraggle; - void Reset() + void Reset() override { m_uiFaintTimer = urand(30000, 60000); m_uiEndEventProgress = 0; @@ -164,7 +164,7 @@ struct MANGOS_DLL_DECL npc_ringoAI : public FollowerAI pSpraggle = NULL; } - void MoveInLineOfSight(Unit* pWho) + void MoveInLineOfSight(Unit* pWho) override { FollowerAI::MoveInLineOfSight(pWho); @@ -184,7 +184,7 @@ struct MANGOS_DLL_DECL npc_ringoAI : public FollowerAI } } - void SpellHit(Unit* pCaster, const SpellEntry* pSpell) + void SpellHit(Unit* pCaster, const SpellEntry* pSpell) override { if (HasFollowState(STATE_FOLLOW_INPROGRESS | STATE_FOLLOW_PAUSED) && pSpell->Id == SPELL_REVIVE_RINGO) ClearFaint(); @@ -227,7 +227,7 @@ struct MANGOS_DLL_DECL npc_ringoAI : public FollowerAI SetFollowPaused(false); } - void UpdateFollowerAI(const uint32 uiDiff) + void UpdateFollowerAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) { diff --git a/scripts/kalimdor/wailing_caverns/wailing_caverns.cpp b/scripts/kalimdor/wailing_caverns/wailing_caverns.cpp index deae803a9..d3e1bfc05 100644 --- a/scripts/kalimdor/wailing_caverns/wailing_caverns.cpp +++ b/scripts/kalimdor/wailing_caverns/wailing_caverns.cpp @@ -95,7 +95,7 @@ struct MANGOS_DLL_DECL npc_disciple_of_naralexAI : public npc_escortAI uint32 m_uiPoint; uint8 m_uiSubeventPhase; - void Reset() + void Reset() override { m_uiSleepTimer = 5000; m_uiPotionTimer = 5000; @@ -114,7 +114,7 @@ struct MANGOS_DLL_DECL npc_disciple_of_naralexAI : public npc_escortAI } } - void JustRespawned() + void JustRespawned() override { npc_escortAI::JustRespawned(); @@ -123,7 +123,7 @@ struct MANGOS_DLL_DECL npc_disciple_of_naralexAI : public npc_escortAI m_pInstance->SetData(TYPE_DISCIPLE, FAIL); } - void AttackedBy(Unit* pAttacker) + void AttackedBy(Unit* pAttacker) override { if (!m_bIsFirstHit) { @@ -141,7 +141,7 @@ struct MANGOS_DLL_DECL npc_disciple_of_naralexAI : public npc_escortAI } // Overwrite the evade function, to change the combat stop function (keep casting some spells) - void EnterEvadeMode() + void EnterEvadeMode() override { // Do not stop casting at these points if (m_uiPoint == 15 || m_uiPoint == 32) @@ -158,7 +158,7 @@ struct MANGOS_DLL_DECL npc_disciple_of_naralexAI : public npc_escortAI npc_escortAI::EnterEvadeMode(); } - void JustStartedEscort() + void JustStartedEscort() override { DoScriptText(SAY_PREPARE, m_creature); @@ -166,7 +166,7 @@ struct MANGOS_DLL_DECL npc_disciple_of_naralexAI : public npc_escortAI m_pInstance->SetData(TYPE_DISCIPLE, IN_PROGRESS); } - void WaypointReached(uint32 uiPointId) + void WaypointReached(uint32 uiPointId) override { switch (uiPointId) { @@ -199,7 +199,7 @@ struct MANGOS_DLL_DECL npc_disciple_of_naralexAI : public npc_escortAI } } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { // Attack the disciple pSummoned->AI()->AttackStart(m_creature); @@ -207,7 +207,7 @@ struct MANGOS_DLL_DECL npc_disciple_of_naralexAI : public npc_escortAI ++m_uiSummonedAlive; } - void SummonedCreatureJustDied(Creature* pSummoned) + void SummonedCreatureJustDied(Creature* pSummoned) override { if (m_uiSummonedAlive == 0) return; // Actually if this happens, something went wrong before @@ -228,7 +228,7 @@ struct MANGOS_DLL_DECL npc_disciple_of_naralexAI : public npc_escortAI m_creature->SummonCreature(uiEntry, fX, fY, fZ, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 20000); } - void UpdateEscortAI(const uint32 uiDiff) + void UpdateEscortAI(const uint32 uiDiff) override { if (m_uiEventTimer) { diff --git a/scripts/kalimdor/wailing_caverns/wailing_caverns.h b/scripts/kalimdor/wailing_caverns/wailing_caverns.h index 7291ddf09..45f2b17b8 100644 --- a/scripts/kalimdor/wailing_caverns/wailing_caverns.h +++ b/scripts/kalimdor/wailing_caverns/wailing_caverns.h @@ -32,17 +32,17 @@ class MANGOS_DLL_DECL instance_wailing_caverns : public ScriptedInstance instance_wailing_caverns(Map* pMap); ~instance_wailing_caverns() {} - void Initialize(); + void Initialize() override; - void OnPlayerEnter(Player* pPlayer); - void OnCreatureCreate(Creature* pCreature); - void OnObjectCreate(GameObject* pGo); + void OnPlayerEnter(Player* pPlayer) override; + void OnCreatureCreate(Creature* pCreature) override; + void OnObjectCreate(GameObject* pGo) override; - void SetData(uint32 uiType, uint32 uiData); - uint32 GetData(uint32 uiType); + void SetData(uint32 uiType, uint32 uiData) override; + uint32 GetData(uint32 uiType) override; - const char* Save() { return m_strInstData.c_str(); } - void Load(const char* chrIn); + const char* Save() override { return m_strInstData.c_str(); } + void Load(const char* chrIn) override; protected: uint32 m_auiEncounter[MAX_ENCOUNTER]; diff --git a/scripts/kalimdor/winterspring.cpp b/scripts/kalimdor/winterspring.cpp index 5e49b9b03..0c62f73b6 100644 --- a/scripts/kalimdor/winterspring.cpp +++ b/scripts/kalimdor/winterspring.cpp @@ -159,7 +159,7 @@ struct MANGOS_DLL_DECL npc_ranshallaAI : public npc_escortAI, private DialogueHe ObjectGuid m_voiceEluneGuid; ObjectGuid m_altarGuid; - void Reset() + void Reset() override { m_uiDelayTimer = 0; } @@ -229,7 +229,7 @@ struct MANGOS_DLL_DECL npc_ranshallaAI : public npc_escortAI, private DialogueHe } } - void SummonedMovementInform(Creature* pSummoned, uint32 uiType, uint32 uiPointId) + void SummonedMovementInform(Creature* pSummoned, uint32 uiType, uint32 uiPointId) override { if (uiType != POINT_MOTION_TYPE || pSummoned->GetEntry() != NPC_PRIESTESS_ELUNE || uiPointId != 1) return; @@ -238,7 +238,7 @@ struct MANGOS_DLL_DECL npc_ranshallaAI : public npc_escortAI, private DialogueHe StartNextDialogueText(SAY_PRIESTESS_ALTAR_3); } - void WaypointReached(uint32 uiPointId) + void WaypointReached(uint32 uiPointId) override { switch (uiPointId) { @@ -289,7 +289,7 @@ struct MANGOS_DLL_DECL npc_ranshallaAI : public npc_escortAI, private DialogueHe } } - void JustDidDialogueStep(int32 iEntry) + void JustDidDialogueStep(int32 iEntry) override { switch (iEntry) { @@ -381,7 +381,7 @@ struct MANGOS_DLL_DECL npc_ranshallaAI : public npc_escortAI, private DialogueHe } } - Creature* GetSpeakerByEntry(uint32 uiEntry) + Creature* GetSpeakerByEntry(uint32 uiEntry) override { switch (uiEntry) { @@ -396,7 +396,7 @@ struct MANGOS_DLL_DECL npc_ranshallaAI : public npc_escortAI, private DialogueHe } - void UpdateEscortAI(const uint32 uiDiff) + void UpdateEscortAI(const uint32 uiDiff) override { DialogueUpdate(uiDiff); diff --git a/scripts/kalimdor/zulfarrak/zulfarrak.cpp b/scripts/kalimdor/zulfarrak/zulfarrak.cpp index c7e94186f..4dc73facd 100644 --- a/scripts/kalimdor/zulfarrak/zulfarrak.cpp +++ b/scripts/kalimdor/zulfarrak/zulfarrak.cpp @@ -58,7 +58,7 @@ struct MANGOS_DLL_DECL npc_sergeant_blyAI : public ScriptedAI uint32 m_uiShieldBashTimer; uint32 m_uiRevengeTimer; // this is wrong, spell should never be used unless m_creature->getVictim() dodge, parry or block attack. Mangos support required. - void Reset() + void Reset() override { m_uiShieldBashTimer = 5000; m_uiRevengeTimer = 8000; @@ -69,19 +69,19 @@ struct MANGOS_DLL_DECL npc_sergeant_blyAI : public ScriptedAI m_pInstance->SetData(0, NOT_STARTED);*/ } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { /*if (m_pInstance) m_pInstance->SetData(0, IN_PROGRESS);*/ } - void JustDied(Unit* pVictim) + void JustDied(Unit* pVictim) override { /*if (m_pInstance) m_pInstance->SetData(0, DONE);*/ } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -161,25 +161,25 @@ struct MANGOS_DLL_DECL npc_weegli_blastfuseAI : public ScriptedAI // ScriptedInstance* m_pInstance; - void Reset() + void Reset() override { /*if (m_pInstance) m_pInstance->SetData(0, NOT_STARTED);*/ } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { /*if (m_pInstance) m_pInstance->SetData(0, IN_PROGRESS);*/ } - void JustDied(Unit* pVictim) + void JustDied(Unit* pVictim) override { /*if (m_pInstance) m_pInstance->SetData(0, DONE);*/ } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/kalimdor/zulfarrak/zulfarrak.h b/scripts/kalimdor/zulfarrak/zulfarrak.h index 16c3454b5..3d1842ebb 100644 --- a/scripts/kalimdor/zulfarrak/zulfarrak.h +++ b/scripts/kalimdor/zulfarrak/zulfarrak.h @@ -36,19 +36,19 @@ class MANGOS_DLL_DECL instance_zulfarrak : public ScriptedInstance instance_zulfarrak(Map* pMap); ~instance_zulfarrak() {} - void Initialize(); + void Initialize() override; - void OnCreatureEnterCombat(Creature* pCreature); + void OnCreatureEnterCombat(Creature* pCreature) override; void OnCreatureEvade(Creature* pCreature); - void OnCreatureDeath(Creature* pCreature); + void OnCreatureDeath(Creature* pCreature) override; - void OnCreatureCreate(Creature* pCreature); + void OnCreatureCreate(Creature* pCreature) override; - void SetData(uint32 uiType, uint32 uiData); - uint32 GetData(uint32 uiType); + void SetData(uint32 uiType, uint32 uiData) override; + uint32 GetData(uint32 uiType) override; - const char* Save() { return m_strInstData.c_str(); } - void Load(const char* chrIn); + const char* Save() override { return m_strInstData.c_str(); } + void Load(const char* chrIn) override; protected: uint32 m_auiEncounter[MAX_ENCOUNTER]; diff --git a/scripts/northrend/azjol-nerub/ahnkahet/ahnkahet.h b/scripts/northrend/azjol-nerub/ahnkahet/ahnkahet.h index a964295fc..95f5313b2 100644 --- a/scripts/northrend/azjol-nerub/ahnkahet/ahnkahet.h +++ b/scripts/northrend/azjol-nerub/ahnkahet/ahnkahet.h @@ -49,15 +49,15 @@ class MANGOS_DLL_DECL instance_ahnkahet : public ScriptedInstance public: instance_ahnkahet(Map* pMap); - void Initialize(); + void Initialize() override; - void OnCreatureCreate(Creature* pCreature); - void OnObjectCreate(GameObject* pGo); + void OnCreatureCreate(Creature* pCreature) override; + void OnObjectCreate(GameObject* pGo) override; - void OnCreatureDeath(Creature* pCreature); + void OnCreatureDeath(Creature* pCreature) override; - void SetData(uint32 uiType, uint32 uiData); - uint32 GetData(uint32 uiType); + void SetData(uint32 uiType, uint32 uiData) override; + uint32 GetData(uint32 uiType) override; ObjectGuid SelectRandomGuardianEggGuid(); ObjectGuid SelectRandomSwarmerEggGuid(); @@ -66,10 +66,10 @@ class MANGOS_DLL_DECL instance_ahnkahet : public ScriptedInstance void GetJedogaControllersList(GuidList& lList) { lList = m_lJedogaControllersGuidList; } void GetJedogaEventControllersList(GuidList& lList) {lList = m_lJedogaEventControllersGuidList; } - bool CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/); + bool CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/) override; - const char* Save() { return m_strInstData.c_str(); } - void Load(const char* chrIn); + const char* Save() override { return m_strInstData.c_str(); } + void Load(const char* chrIn) override; private: uint32 m_auiEncounter[MAX_ENCOUNTER]; diff --git a/scripts/northrend/azjol-nerub/ahnkahet/boss_amanitar.cpp b/scripts/northrend/azjol-nerub/ahnkahet/boss_amanitar.cpp index ecb28eee9..740d3d8e4 100644 --- a/scripts/northrend/azjol-nerub/ahnkahet/boss_amanitar.cpp +++ b/scripts/northrend/azjol-nerub/ahnkahet/boss_amanitar.cpp @@ -66,7 +66,7 @@ struct MANGOS_DLL_DECL boss_amanitarAI : public ScriptedAI uint32 m_uiMiniTimer; uint32 m_uiMushroomTimer; - void Reset() + void Reset() override { m_uiBashTimer = urand(7000, 10000); m_uiVenomBoltTimer = urand(10000, 15000); @@ -75,7 +75,7 @@ struct MANGOS_DLL_DECL boss_amanitarAI : public ScriptedAI m_uiMushroomTimer = urand(10000, 20000); } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoSummonMushrooms(true); @@ -83,19 +83,19 @@ struct MANGOS_DLL_DECL boss_amanitarAI : public ScriptedAI m_pInstance->SetData(TYPE_AMANITAR, IN_PROGRESS); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { if (m_pInstance) m_pInstance->SetData(TYPE_AMANITAR, DONE); } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_AMANITAR, FAIL); } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { if (pSummoned->GetEntry() == NPC_POISONOUS_MUSHROOM) pSummoned->CastSpell(pSummoned, SPELL_POISON_MUSHROOM_VISUAL, true); @@ -106,7 +106,7 @@ struct MANGOS_DLL_DECL boss_amanitarAI : public ScriptedAI pSummoned->CastSpell(pSummoned, SPELL_MUSHROOM_FORM, true); } - void SummonedCreatureJustDied(Creature* pSummoned) + void SummonedCreatureJustDied(Creature* pSummoned) override { if (pSummoned->GetEntry() == NPC_POISONOUS_MUSHROOM) pSummoned->CastSpell(pSummoned, SPELL_POISON_CLOUD, true); @@ -132,7 +132,7 @@ struct MANGOS_DLL_DECL boss_amanitarAI : public ScriptedAI } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -199,11 +199,11 @@ struct MANGOS_DLL_DECL npc_amanitar_mushroomAI : public Scripted_NoMovementAI { npc_amanitar_mushroomAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { Reset(); } - void Reset() { } + void Reset() override { } - void AttackStart(Unit* pWho) { } - void MoveInLineOfSight(Unit* pWho) { } - void UpdateAI(const uint32 uiDiff) { } + void AttackStart(Unit* pWho) override { } + void MoveInLineOfSight(Unit* pWho) override { } + void UpdateAI(const uint32 uiDiff) override { } }; CreatureAI* GetAI_npc_amanitar_mushroom(Creature* pCreature) diff --git a/scripts/northrend/azjol-nerub/ahnkahet/boss_jedoga.cpp b/scripts/northrend/azjol-nerub/ahnkahet/boss_jedoga.cpp index b136c2965..579ceda06 100644 --- a/scripts/northrend/azjol-nerub/ahnkahet/boss_jedoga.cpp +++ b/scripts/northrend/azjol-nerub/ahnkahet/boss_jedoga.cpp @@ -107,7 +107,7 @@ struct MANGOS_DLL_DECL boss_jedogaAI : public ScriptedAI GuidList m_lVolunteerGuidList; - void Reset() + void Reset() override { m_uiThundershockTimer = 40000; m_uiCycloneStrikeTimer = 15000; @@ -133,7 +133,7 @@ struct MANGOS_DLL_DECL boss_jedogaAI : public ScriptedAI return *iter; } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoScriptText(SAY_AGGRO, m_creature); DoCallVolunteers(); @@ -142,7 +142,7 @@ struct MANGOS_DLL_DECL boss_jedogaAI : public ScriptedAI m_pInstance->SetData(TYPE_JEDOGA, IN_PROGRESS); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { switch (urand(0, 2)) { @@ -152,7 +152,7 @@ struct MANGOS_DLL_DECL boss_jedogaAI : public ScriptedAI } } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoScriptText(SAY_DEATH, m_creature); @@ -160,13 +160,13 @@ struct MANGOS_DLL_DECL boss_jedogaAI : public ScriptedAI m_pInstance->SetData(TYPE_JEDOGA, DONE); } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_JEDOGA, FAIL); } - void MoveInLineOfSight(Unit* pWho) + void MoveInLineOfSight(Unit* pWho) override { if (!m_bHasDoneIntro && pWho->GetTypeId() == TYPEID_PLAYER && m_creature->IsWithinDistInMap(pWho, 110.0f) && m_creature->IsWithinLOSInMap(pWho)) { @@ -222,7 +222,7 @@ struct MANGOS_DLL_DECL boss_jedogaAI : public ScriptedAI } } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { if (pSummoned->GetEntry() == NPC_TWILIGHT_VOLUNTEER) { @@ -232,7 +232,7 @@ struct MANGOS_DLL_DECL boss_jedogaAI : public ScriptedAI } } - void SummonedCreatureJustDied(Creature* pSummoned) + void SummonedCreatureJustDied(Creature* pSummoned) override { if (pSummoned->GetEntry() == NPC_TWILIGHT_VOLUNTEER) { @@ -248,7 +248,7 @@ struct MANGOS_DLL_DECL boss_jedogaAI : public ScriptedAI } } - void SummonedMovementInform(Creature* pSummoned, uint32 uiType, uint32 uiPointId) + void SummonedMovementInform(Creature* pSummoned, uint32 uiType, uint32 uiPointId) override { if (uiType != POINT_MOTION_TYPE || pSummoned->GetEntry() != NPC_TWILIGHT_VOLUNTEER) return; @@ -266,7 +266,7 @@ struct MANGOS_DLL_DECL boss_jedogaAI : public ScriptedAI } } - void MovementInform(uint32 uiMoveType, uint32 uiPointId) + void MovementInform(uint32 uiMoveType, uint32 uiPointId) override { if (uiMoveType != POINT_MOTION_TYPE) return; @@ -326,7 +326,7 @@ struct MANGOS_DLL_DECL boss_jedogaAI : public ScriptedAI } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (m_uiVisualTimer) { @@ -417,9 +417,9 @@ struct MANGOS_DLL_DECL npc_twilight_volunteerAI : public Scripted_NoMovementAI ScriptedInstance* m_pInstance; - void Reset() { } + void Reset() override { } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { // If it's not killed by Jedoga then set the achiev to fail if (pKiller->GetEntry() == NPC_JEDOGA_SHADOWSEEKER) @@ -429,9 +429,9 @@ struct MANGOS_DLL_DECL npc_twilight_volunteerAI : public Scripted_NoMovementAI m_pInstance->SetData(TYPE_JEDOGA, SPECIAL); } - void AttackStart(Unit* pWho) { } - void MoveInLineOfSight(Unit* pWho) { } - void UpdateAI(const uint32 uiDiff) { } + void AttackStart(Unit* pWho) override { } + void MoveInLineOfSight(Unit* pWho) override { } + void UpdateAI(const uint32 uiDiff) override { } }; CreatureAI* GetAI_npc_twilight_volunteer(Creature* pCreature) diff --git a/scripts/northrend/azjol-nerub/ahnkahet/boss_nadox.cpp b/scripts/northrend/azjol-nerub/ahnkahet/boss_nadox.cpp index dc57efbd8..2b079aa4a 100644 --- a/scripts/northrend/azjol-nerub/ahnkahet/boss_nadox.cpp +++ b/scripts/northrend/azjol-nerub/ahnkahet/boss_nadox.cpp @@ -63,11 +63,11 @@ struct MANGOS_DLL_DECL mob_ahnkahar_eggAI : public ScriptedAI ScriptedInstance* m_pInstance; - void Reset() {} - void MoveInLineOfSight(Unit* pWho) {} - void AttackStart(Unit* pWho) {} + void Reset() override {} + void MoveInLineOfSight(Unit* pWho) override {} + void AttackStart(Unit* pWho) override {} - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { if (pSummoned->GetEntry() == NPC_AHNKAHAR_GUARDIAN) { @@ -87,7 +87,7 @@ struct MANGOS_DLL_DECL mob_ahnkahar_eggAI : public ScriptedAI } } - void SummonedCreatureJustDied(Creature* pSummoned) + void SummonedCreatureJustDied(Creature* pSummoned) override { // If the Guardian is killed set the achiev criteria to false if (pSummoned->GetEntry() == NPC_AHNKAHAR_GUARDIAN) @@ -125,7 +125,7 @@ struct MANGOS_DLL_DECL boss_nadoxAI : public ScriptedAI uint32 m_uiBroodRageTimer; uint32 m_uiSummonTimer; - void Reset() + void Reset() override { m_bBerserk = false; m_bGuardianSummoned = false; @@ -134,7 +134,7 @@ struct MANGOS_DLL_DECL boss_nadoxAI : public ScriptedAI m_uiBroodRageTimer = 20000; } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoScriptText(SAY_AGGRO, m_creature); @@ -142,13 +142,13 @@ struct MANGOS_DLL_DECL boss_nadoxAI : public ScriptedAI m_pInstance->SetData(TYPE_NADOX, IN_PROGRESS); } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_NADOX, FAIL); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { switch (urand(0, 2)) { @@ -158,7 +158,7 @@ struct MANGOS_DLL_DECL boss_nadoxAI : public ScriptedAI } } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoScriptText(SAY_DEATH, m_creature); @@ -166,7 +166,7 @@ struct MANGOS_DLL_DECL boss_nadoxAI : public ScriptedAI m_pInstance->SetData(TYPE_NADOX, DONE); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/northrend/azjol-nerub/ahnkahet/boss_taldaram.cpp b/scripts/northrend/azjol-nerub/ahnkahet/boss_taldaram.cpp index 8d783b317..1409c9e2f 100644 --- a/scripts/northrend/azjol-nerub/ahnkahet/boss_taldaram.cpp +++ b/scripts/northrend/azjol-nerub/ahnkahet/boss_taldaram.cpp @@ -81,7 +81,7 @@ struct MANGOS_DLL_DECL boss_taldaramAI : public ScriptedAI GuidList m_lFlameOrbsGuidList; - void Reset() + void Reset() override { // Timers seem to be very random... m_uiBloodthirstTimer = urand(20000, 25000); @@ -91,7 +91,7 @@ struct MANGOS_DLL_DECL boss_taldaramAI : public ScriptedAI m_bIsFirstAggro = false; } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { // Aggro is called after the boss vanish expires. There is no need to call this multiple times if (m_bIsFirstAggro) @@ -104,7 +104,7 @@ struct MANGOS_DLL_DECL boss_taldaramAI : public ScriptedAI m_pInstance->SetData(TYPE_TALDARAM, IN_PROGRESS); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { switch (urand(0, 2)) { @@ -114,7 +114,7 @@ struct MANGOS_DLL_DECL boss_taldaramAI : public ScriptedAI } } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoScriptText(SAY_DEATH, m_creature); @@ -122,13 +122,13 @@ struct MANGOS_DLL_DECL boss_taldaramAI : public ScriptedAI m_pInstance->SetData(TYPE_TALDARAM, DONE); } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_TALDARAM, FAIL); } - void EnterEvadeMode() + void EnterEvadeMode() override { // Don't allow him to evade during vanish if (m_uiEmbraceTimer) @@ -148,7 +148,7 @@ struct MANGOS_DLL_DECL boss_taldaramAI : public ScriptedAI Reset(); } - void MovementInform(uint32 uiMoveType, uint32 uiPointId) + void MovementInform(uint32 uiMoveType, uint32 uiPointId) override { if (uiMoveType != POINT_MOTION_TYPE) return; @@ -161,7 +161,7 @@ struct MANGOS_DLL_DECL boss_taldaramAI : public ScriptedAI } } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { pSummoned->CastSpell(pSummoned, SPELL_FLAME_SPHERE_SPAWN_EFFECT, true); pSummoned->CastSpell(pSummoned, SPELL_FLAME_SPHERE_VISUAL, true); @@ -169,7 +169,7 @@ struct MANGOS_DLL_DECL boss_taldaramAI : public ScriptedAI m_lFlameOrbsGuidList.push_back(pSummoned->GetObjectGuid()); } - void SummonedCreatureDespawn(Creature* pSummoned) + void SummonedCreatureDespawn(Creature* pSummoned) override { pSummoned->CastSpell(pSummoned, SPELL_FLAME_SPHERE_DEATH_EFFECT, true); } @@ -192,7 +192,7 @@ struct MANGOS_DLL_DECL boss_taldaramAI : public ScriptedAI } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (m_uiVisualTimer) { diff --git a/scripts/northrend/azjol-nerub/ahnkahet/boss_volazj.cpp b/scripts/northrend/azjol-nerub/ahnkahet/boss_volazj.cpp index 9d0dd61ea..6392ba9ed 100644 --- a/scripts/northrend/azjol-nerub/ahnkahet/boss_volazj.cpp +++ b/scripts/northrend/azjol-nerub/ahnkahet/boss_volazj.cpp @@ -78,7 +78,7 @@ struct MANGOS_DLL_DECL boss_volazjAI : public ScriptedAI uint32 m_uiShadowBoltTimer; uint32 m_uiShiverTimer; - void Reset() + void Reset() override { m_uiCombatPhase = 1; m_uiMindFlayTimer = 10000; @@ -86,12 +86,12 @@ struct MANGOS_DLL_DECL boss_volazjAI : public ScriptedAI m_uiShiverTimer = 18000; } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoScriptText(SAY_AGGRO, m_creature); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { switch (urand(0, 2)) { @@ -101,12 +101,12 @@ struct MANGOS_DLL_DECL boss_volazjAI : public ScriptedAI } } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoScriptText(urand(0, 1) ? SAY_DEATH_1 : SAY_DEATH_2, m_creature); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/northrend/azjol-nerub/azjol-nerub/azjol-nerub.h b/scripts/northrend/azjol-nerub/azjol-nerub/azjol-nerub.h index 726e257b0..6674ce01f 100644 --- a/scripts/northrend/azjol-nerub/azjol-nerub/azjol-nerub.h +++ b/scripts/northrend/azjol-nerub/azjol-nerub/azjol-nerub.h @@ -46,28 +46,28 @@ class MANGOS_DLL_DECL instance_azjol_nerub : public ScriptedInstance public: instance_azjol_nerub(Map* pMap); - void Initialize(); + void Initialize() override; - void OnObjectCreate(GameObject* pGo); - void OnCreatureCreate(Creature* pCreature); + void OnObjectCreate(GameObject* pGo) override; + void OnCreatureCreate(Creature* pCreature) override; - void OnCreatureEnterCombat(Creature* pCreature); + void OnCreatureEnterCombat(Creature* pCreature) override; void OnCreatureEvade(Creature* pCreature); - void OnCreatureDeath(Creature* pCreature); + void OnCreatureDeath(Creature* pCreature) override; - void SetData(uint32 uiType, uint32 uiData); + void SetData(uint32 uiType, uint32 uiData) override; - bool CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/); + bool CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/) override; ObjectGuid GetRandomAssassinTrigger(); ObjectGuid GetGuardianTrigger() { return m_guardianSummonTarget; } ObjectGuid GetDarterTrigger() { return m_darterSummonTarget; } ObjectGuid GetAnubTrigger() { return m_anubSummonTarget; } - const char* Save() { return m_strInstData.c_str(); } - void Load(const char* chrIn); + const char* Save() override { return m_strInstData.c_str(); } + void Load(const char* chrIn) override; - void Update(uint32 uiDiff); + void Update(uint32 uiDiff) override; private: void DoSendWatcherOrKrikthir(); diff --git a/scripts/northrend/azjol-nerub/azjol-nerub/boss_anubarak.cpp b/scripts/northrend/azjol-nerub/azjol-nerub/boss_anubarak.cpp index d2c44b21f..8d98b8db3 100644 --- a/scripts/northrend/azjol-nerub/azjol-nerub/boss_anubarak.cpp +++ b/scripts/northrend/azjol-nerub/azjol-nerub/boss_anubarak.cpp @@ -96,7 +96,7 @@ struct MANGOS_DLL_DECL boss_anubarakAI : public ScriptedAI bool m_bIsFirstWave; bool m_bDoneIntro; - void Reset() + void Reset() override { m_uiPhase = PHASE_GROUND; m_uiSubmergePhase = 1; @@ -109,7 +109,7 @@ struct MANGOS_DLL_DECL boss_anubarakAI : public ScriptedAI m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE); } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoScriptText(SAY_AGGRO, m_creature); @@ -117,7 +117,7 @@ struct MANGOS_DLL_DECL boss_anubarakAI : public ScriptedAI m_pInstance->SetData(TYPE_ANUBARAK, IN_PROGRESS); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { switch (urand(0, 2)) { @@ -127,7 +127,7 @@ struct MANGOS_DLL_DECL boss_anubarakAI : public ScriptedAI } } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoScriptText(SAY_DEATH, m_creature); @@ -135,13 +135,13 @@ struct MANGOS_DLL_DECL boss_anubarakAI : public ScriptedAI m_pInstance->SetData(TYPE_ANUBARAK, DONE); } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_ANUBARAK, NOT_STARTED); } - void MoveInLineOfSight(Unit* pWho) + void MoveInLineOfSight(Unit* pWho) override { if (!m_bDoneIntro && m_creature->IsWithinDistInMap(pWho, 60.0f)) { @@ -152,7 +152,7 @@ struct MANGOS_DLL_DECL boss_anubarakAI : public ScriptedAI ScriptedAI::MoveInLineOfSight(pWho); } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { if (!m_pInstance) return; @@ -181,7 +181,7 @@ struct MANGOS_DLL_DECL boss_anubarakAI : public ScriptedAI } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/northrend/azjol-nerub/azjol-nerub/boss_hadronox.cpp b/scripts/northrend/azjol-nerub/azjol-nerub/boss_hadronox.cpp index 0e6245fd2..ef856428e 100644 --- a/scripts/northrend/azjol-nerub/azjol-nerub/boss_hadronox.cpp +++ b/scripts/northrend/azjol-nerub/azjol-nerub/boss_hadronox.cpp @@ -74,7 +74,7 @@ struct MANGOS_DLL_DECL boss_hadronoxAI : public ScriptedAI uint32 m_uiPierceTimer; uint32 m_uiGrabTimer; - void Reset() + void Reset() override { m_uiAcidTimer = urand(10000, 14000); m_uiLeechTimer = urand(3000, 9000); @@ -82,12 +82,12 @@ struct MANGOS_DLL_DECL boss_hadronoxAI : public ScriptedAI m_uiGrabTimer = urand(15000, 19000); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { m_creature->SetHealth(m_creature->GetHealth() + (m_creature->GetMaxHealth() * 0.1)); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/northrend/azjol-nerub/azjol-nerub/boss_krikthir.cpp b/scripts/northrend/azjol-nerub/azjol-nerub/boss_krikthir.cpp index 86cb91e9a..35f65e9db 100644 --- a/scripts/northrend/azjol-nerub/azjol-nerub/boss_krikthir.cpp +++ b/scripts/northrend/azjol-nerub/azjol-nerub/boss_krikthir.cpp @@ -72,7 +72,7 @@ struct MANGOS_DLL_DECL boss_krikthirAI : public ScriptedAI uint32 m_uiCurseTimer; uint32 m_uiMindFlayTimer; - void Reset() + void Reset() override { m_uiSwarmTimer = 15000; m_uiCurseTimer = 20000; @@ -82,12 +82,12 @@ struct MANGOS_DLL_DECL boss_krikthirAI : public ScriptedAI m_bFrenzy = false; } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoScriptText(SAY_AGGRO, m_creature); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { switch (urand(0, 2)) { @@ -97,7 +97,7 @@ struct MANGOS_DLL_DECL boss_krikthirAI : public ScriptedAI } } - void MoveInLineOfSight(Unit* pWho) + void MoveInLineOfSight(Unit* pWho) override { if (!m_bIntroSpeech && m_creature->IsWithinDistInMap(pWho, DEFAULT_VISIBILITY_INSTANCE)) { @@ -111,7 +111,7 @@ struct MANGOS_DLL_DECL boss_krikthirAI : public ScriptedAI } } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoScriptText(SAY_DEATH, m_creature); @@ -119,14 +119,14 @@ struct MANGOS_DLL_DECL boss_krikthirAI : public ScriptedAI m_pInstance->SetData(TYPE_KRIKTHIR, DONE); } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { uint32 uiEntry = pSummoned->GetEntry(); if (uiEntry == NPC_SKITTERING_SWARMER || uiEntry == NPC_SKITTERING_INFECTOR) pSummoned->AI()->AttackStart(m_creature->getVictim()); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/northrend/borean_tundra.cpp b/scripts/northrend/borean_tundra.cpp index b514622e1..a8be8e712 100644 --- a/scripts/northrend/borean_tundra.cpp +++ b/scripts/northrend/borean_tundra.cpp @@ -55,7 +55,7 @@ struct MANGOS_DLL_DECL npc_nesingwary_trapperAI : public ScriptedAI ObjectGuid m_playerGuid; ObjectGuid m_trapGuid; - void Reset() + void Reset() override { m_uiPhase = 0; m_uiPhaseTimer = 0; @@ -79,7 +79,7 @@ struct MANGOS_DLL_DECL npc_nesingwary_trapperAI : public ScriptedAI } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->getVictim() && m_uiPhase) { @@ -118,7 +118,7 @@ struct MANGOS_DLL_DECL npc_nesingwary_trapperAI : public ScriptedAI } } - void MovementInform(uint32 uiType, uint32 uiPointId) + void MovementInform(uint32 uiType, uint32 uiPointId) override { m_creature->HandleEmote(EMOTE_ONESHOT_LOOT); m_uiPhaseTimer = 2000; @@ -154,13 +154,13 @@ struct MANGOS_DLL_DECL npc_oil_stained_wolfAI : public ScriptedAI bool m_bCanCrapInPublic; uint32 m_uiPooTimer; - void Reset() + void Reset() override { m_bCanCrapInPublic = false; m_uiPooTimer = 0; } - void MovementInform(uint32 uiType, uint32 uiPointId) + void MovementInform(uint32 uiType, uint32 uiPointId) override { if (uiType != POINT_MOTION_TYPE) return; @@ -172,7 +172,7 @@ struct MANGOS_DLL_DECL npc_oil_stained_wolfAI : public ScriptedAI } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) { @@ -302,7 +302,7 @@ struct MANGOS_DLL_DECL npc_sinkhole_kill_creditAI : public ScriptedAI uint32 m_uiCartTimer; uint32 m_uiCartPhase; - void Reset() + void Reset() override { m_cartGuid.Clear(); m_wormGuid.Clear(); @@ -310,12 +310,12 @@ struct MANGOS_DLL_DECL npc_sinkhole_kill_creditAI : public ScriptedAI m_uiCartPhase = 0; } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { m_wormGuid = pSummoned->GetObjectGuid(); } - void JustSummoned(GameObject* pGo) + void JustSummoned(GameObject* pGo) override { // Go is not really needed, but ok to use as a check point so only one "event" can be processed at a time if (m_cartGuid) @@ -325,7 +325,7 @@ struct MANGOS_DLL_DECL npc_sinkhole_kill_creditAI : public ScriptedAI m_cartGuid = pGo->GetObjectGuid(); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (m_cartGuid) { @@ -403,7 +403,7 @@ struct MANGOS_DLL_DECL npc_lurgglbrAI : public npc_escortAI uint32 m_uiSayTimer; uint8 m_uiSpeech; - void Reset() + void Reset() override { if (!HasEscortState(STATE_ESCORT_ESCORTING)) { @@ -412,7 +412,7 @@ struct MANGOS_DLL_DECL npc_lurgglbrAI : public npc_escortAI } } - void JustStartedEscort() + void JustStartedEscort() override { if (GameObject* pCage = GetClosestGameObjectWithEntry(m_creature, GO_CAGE, INTERACTION_DISTANCE)) { @@ -421,7 +421,7 @@ struct MANGOS_DLL_DECL npc_lurgglbrAI : public npc_escortAI } } - void WaypointStart(uint32 uiPointId) + void WaypointStart(uint32 uiPointId) override { switch (uiPointId) { @@ -435,7 +435,7 @@ struct MANGOS_DLL_DECL npc_lurgglbrAI : public npc_escortAI } } - void WaypointReached(uint32 uiPointId) + void WaypointReached(uint32 uiPointId) override { switch (uiPointId) { @@ -456,7 +456,7 @@ struct MANGOS_DLL_DECL npc_lurgglbrAI : public npc_escortAI } } - void UpdateEscortAI(const uint32 uiDiff) + void UpdateEscortAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) { diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp index 903f5a56e..68555724b 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp @@ -143,7 +143,7 @@ struct MANGOS_DLL_DECL boss_anubarak_trialAI : public ScriptedAI ObjectGuid m_PursuingSpikesGuid; GuidVector m_vSpheresGuidVector; - void Reset() + void Reset() override { m_Phase = PHASE_GROUND; m_PhaseSwitchTimer = 80000; @@ -156,13 +156,13 @@ struct MANGOS_DLL_DECL boss_anubarak_trialAI : public ScriptedAI m_vSpheresGuidVector.resize(MAX_FROSTSPHERES, ObjectGuid()); } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_ANUBARAK, FAIL); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoScriptText(SAY_DEATH, m_creature); @@ -170,7 +170,7 @@ struct MANGOS_DLL_DECL boss_anubarak_trialAI : public ScriptedAI m_pInstance->SetData(TYPE_ANUBARAK, DONE); } - void MoveInLineOfSight(Unit* pWho) + void MoveInLineOfSight(Unit* pWho) override { if (!m_bDidIntroYell && pWho->GetTypeId() == TYPEID_PLAYER && !((Player*)pWho)->isGameMaster() && !m_creature->IsInEvadeMode() && pWho->IsWithinDistInMap(m_creature, 100) && pWho->IsWithinLOSInMap(m_creature)) @@ -188,7 +188,7 @@ struct MANGOS_DLL_DECL boss_anubarak_trialAI : public ScriptedAI ScriptedAI::MoveInLineOfSight(pWho); } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoScriptText(SAY_AGGRO, m_creature); @@ -207,7 +207,7 @@ struct MANGOS_DLL_DECL boss_anubarak_trialAI : public ScriptedAI m_pInstance->SetData(TYPE_ANUBARAK, IN_PROGRESS); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { if (pVictim->GetTypeId() != TYPEID_PLAYER) return; @@ -215,7 +215,7 @@ struct MANGOS_DLL_DECL boss_anubarak_trialAI : public ScriptedAI DoScriptText((urand(0, 1)) ? SAY_SLAY_1 : SAY_SLAY_2, m_creature); } - void SpellHit(Unit* pCaster, const SpellEntry* pSpell) + void SpellHit(Unit* pCaster, const SpellEntry* pSpell) override { if (pSpell->Id == SPELL_SUBMERGE) { @@ -237,7 +237,7 @@ struct MANGOS_DLL_DECL boss_anubarak_trialAI : public ScriptedAI } } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { switch (pSummoned->GetEntry()) { @@ -276,7 +276,7 @@ struct MANGOS_DLL_DECL boss_anubarak_trialAI : public ScriptedAI m_PursuingSpikesGuid.Clear(); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -410,7 +410,7 @@ struct MANGOS_DLL_DECL npc_anubarak_trial_spikeAI : public ScriptedAI PursuingSpikesPhases m_Phase; uint32 m_PhaseSwitchTimer; - void Reset() + void Reset() override { m_Phase = PHASE_NO_MOVEMENT; m_PhaseSwitchTimer = 5000; @@ -418,7 +418,7 @@ struct MANGOS_DLL_DECL npc_anubarak_trial_spikeAI : public ScriptedAI SetCombatMovement(false); } - void SpellHitTarget(Unit* pTarget, const SpellEntry* pSpell) + void SpellHitTarget(Unit* pTarget, const SpellEntry* pSpell) override { if (pSpell->Id == SPELL_PURSUING_SPIKES_DUMMY && pTarget->GetTypeId() == TYPEID_PLAYER) { @@ -465,7 +465,7 @@ struct MANGOS_DLL_DECL npc_anubarak_trial_spikeAI : public ScriptedAI m_creature->GetMotionMaster()->MoveIdle(); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -537,17 +537,17 @@ struct MANGOS_DLL_DECL npc_anubarak_trial_frostsphereAI : public Scripted_NoMove bool m_bPermafrost; - void Reset() + void Reset() override { m_bPermafrost = false; m_creature->GetMotionMaster()->MoveRandomAroundPoint(m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), 15.0f); } - void MoveInLineOfSight(Unit* pWho) { } - void AttackStart(Unit* pWho) { } + void MoveInLineOfSight(Unit* pWho) override { } + void AttackStart(Unit* pWho) override { } - void DamageTaken(Unit* pDoneBy, uint32& uiDamage) + void DamageTaken(Unit* pDoneBy, uint32& uiDamage) override { if (uiDamage < m_creature->GetHealth()) return; @@ -580,7 +580,7 @@ struct MANGOS_DLL_DECL npc_anubarak_trial_frostsphereAI : public Scripted_NoMove m_bPermafrost = true; } - void MovementInform(uint32 uiMotionType, uint32 uiPointId) + void MovementInform(uint32 uiMotionType, uint32 uiPointId) override { if (uiMotionType != POINT_MOTION_TYPE || !uiPointId) return; @@ -605,10 +605,10 @@ struct MANGOS_DLL_DECL npc_nerubian_borrowAI : public Scripted_NoMovementAI { npc_nerubian_borrowAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { Reset(); } - void Reset() { } - void MoveInLineOfSight(Unit* pWho) { } - void AttackStart(Unit* pWho) { } - void UpdateAI(const uint32 uiDiff) { } + void Reset() override { } + void MoveInLineOfSight(Unit* pWho) override { } + void AttackStart(Unit* pWho) override { } + void UpdateAI(const uint32 uiDiff) override { } }; CreatureAI* GetAI_npc_nerubian_borrow(Creature* pCreature) diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_jaraxxus.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_jaraxxus.cpp index 1c2925686..1b992e0de 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_jaraxxus.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_jaraxxus.cpp @@ -77,7 +77,7 @@ struct MANGOS_DLL_DECL boss_jaraxxusAI : public ScriptedAI uint32 m_uiBerserkTimer; bool m_bVolcanoSummon; - void Reset() + void Reset() override { m_uiFelFireballTimer = urand(20000, 25000); // maybe too early, and too often! m_uiFelLightningTimer = urand(5000, 8000); @@ -92,7 +92,7 @@ struct MANGOS_DLL_DECL boss_jaraxxusAI : public ScriptedAI DoCastSpellIfCan(m_creature, SPELL_JARAXXUS_HITTIN_YA); } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_JARAXXUS, FAIL); @@ -100,13 +100,13 @@ struct MANGOS_DLL_DECL boss_jaraxxusAI : public ScriptedAI m_creature->ForcedDespawn(); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { if (m_pInstance) m_pInstance->SetData(TYPE_JARAXXUS, DONE); } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { if (pWho->GetEntry() == NPC_FIZZLEBANG) return; @@ -118,7 +118,7 @@ struct MANGOS_DLL_DECL boss_jaraxxusAI : public ScriptedAI m_creature->SetInCombatWithZone(); } - void EnterEvadeMode() + void EnterEvadeMode() override { if (m_pInstance && m_pInstance->GetData(TYPE_JARAXXUS) != IN_PROGRESS) return; @@ -126,7 +126,7 @@ struct MANGOS_DLL_DECL boss_jaraxxusAI : public ScriptedAI ScriptedAI::EnterEvadeMode(); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { if (pVictim->GetEntry() == NPC_FIZZLEBANG) return; @@ -134,7 +134,7 @@ struct MANGOS_DLL_DECL boss_jaraxxusAI : public ScriptedAI DoScriptText(urand(0, 1) ? SAY_SLAY_1 : SAY_SLAY_2, m_creature); } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { switch (pSummoned->GetEntry()) { @@ -147,7 +147,7 @@ struct MANGOS_DLL_DECL boss_jaraxxusAI : public ScriptedAI } } - void MovementInform(uint32 uiMovementType, uint32 uiPointId) + void MovementInform(uint32 uiMovementType, uint32 uiPointId) override { if (uiMovementType != POINT_MOTION_TYPE) return; @@ -157,7 +157,7 @@ struct MANGOS_DLL_DECL boss_jaraxxusAI : public ScriptedAI m_creature->SetFacingToObject(pFizzlebang); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp index 32593f512..ef6563b67 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp @@ -57,7 +57,7 @@ struct MANGOS_DLL_DECL npc_beast_combat_stalkerAI : public Scripted_NoMovementAI uint32 m_uiNextBeastTimer; uint32 m_uiPhase; - void Reset() + void Reset() override { m_uiAttackDelayTimer = 0; m_uiNextBeastTimer = 0; @@ -70,14 +70,14 @@ struct MANGOS_DLL_DECL npc_beast_combat_stalkerAI : public Scripted_NoMovementAI m_uiBerserkTimer = 9 * MINUTE * IN_MILLISECONDS; } - void MoveInLineOfSight(Unit* pWho) {} + void MoveInLineOfSight(Unit* pWho) override {} - void DamageTaken(Unit* pDealer, uint32& uiDamage) + void DamageTaken(Unit* pDealer, uint32& uiDamage) override { uiDamage = 0; } - void EnterEvadeMode() + void EnterEvadeMode() override { if (m_pInstance) m_pInstance->SetData(TYPE_NORTHREND_BEASTS, FAIL); @@ -91,13 +91,13 @@ struct MANGOS_DLL_DECL npc_beast_combat_stalkerAI : public Scripted_NoMovementAI m_creature->ForcedDespawn(); } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { if (m_pInstance) m_pInstance->SetData(TYPE_NORTHREND_BEASTS, IN_PROGRESS); } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { switch (pSummoned->GetEntry()) { @@ -141,7 +141,7 @@ struct MANGOS_DLL_DECL npc_beast_combat_stalkerAI : public Scripted_NoMovementAI } } - void SummonedCreatureJustDied(Creature* pSummoned) + void SummonedCreatureJustDied(Creature* pSummoned) override { if (!m_pInstance) return; @@ -168,7 +168,7 @@ struct MANGOS_DLL_DECL npc_beast_combat_stalkerAI : public Scripted_NoMovementAI } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (m_uiNextBeastTimer) { @@ -239,17 +239,17 @@ struct MANGOS_DLL_DECL boss_gormokAI : public ScriptedAI ScriptedInstance* m_pInstance; - void Reset() {} + void Reset() override {} - void JustReachedHome() + void JustReachedHome() override { } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -277,17 +277,17 @@ struct MANGOS_DLL_DECL boss_acidmawAI : public ScriptedAI ScriptedInstance* m_pInstance; - void Reset() {} + void Reset() override {} - void JustReachedHome() + void JustReachedHome() override { } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -315,17 +315,17 @@ struct MANGOS_DLL_DECL boss_dreadscaleAI : public ScriptedAI ScriptedInstance* m_pInstance; - void Reset() {} + void Reset() override {} - void JustReachedHome() + void JustReachedHome() override { } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -358,17 +358,17 @@ struct MANGOS_DLL_DECL boss_icehowlAI : public ScriptedAI ScriptedInstance* m_pInstance; - void Reset() {} + void Reset() override {} - void JustReachedHome() + void JustReachedHome() override { } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp index ae5837009..26fcdc016 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp @@ -46,14 +46,14 @@ struct MANGOS_DLL_DECL boss_fjolaAI : public ScriptedAI ScriptedInstance* m_pInstance; - void Reset() {} + void Reset() override {} - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { m_creature->SetInCombatWithZone(); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -75,14 +75,14 @@ struct MANGOS_DLL_DECL boss_eydisAI : public ScriptedAI { boss_eydisAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} - void Reset() {} + void Reset() override {} - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { m_creature->SetInCombatWithZone(); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp index d0c2e1ff3..9ded90c07 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp @@ -111,9 +111,9 @@ struct MANGOS_DLL_DECL npc_barrett_ramseyAI : public ScriptedAI ScriptedInstance* m_pInstance; - void Reset() {} + void Reset() override {} - void MovementInform(uint32 uiType, uint32 uiPointId) + void MovementInform(uint32 uiType, uint32 uiPointId) override { if (uiType == POINT_MOTION_TYPE && uiPointId == 1) m_creature->ForcedDespawn(); diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h index d96e929e4..0e2c49cd1 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h @@ -132,29 +132,29 @@ class MANGOS_DLL_DECL instance_trial_of_the_crusader : public ScriptedInstance, public: instance_trial_of_the_crusader(Map* pMap); - void Initialize(); - bool IsEncounterInProgress() const; + void Initialize() override; + bool IsEncounterInProgress() const override; - void OnCreatureCreate(Creature* pCreature); - void OnObjectCreate(GameObject* pGo); + void OnCreatureCreate(Creature* pCreature) override; + void OnObjectCreate(GameObject* pGo) override; - void OnPlayerEnter(Player* pPlayer); + void OnPlayerEnter(Player* pPlayer) override; - void SetData(uint32 uiType, uint32 uiData); - uint32 GetData(uint32 uiType); + void SetData(uint32 uiType, uint32 uiData) override; + uint32 GetData(uint32 uiType) override; // Difficulty wrappers bool IsHeroicDifficulty() { return instance->GetDifficulty() == RAID_DIFFICULTY_10MAN_HEROIC || instance->GetDifficulty() == RAID_DIFFICULTY_25MAN_HEROIC; } bool Is25ManDifficulty() { return instance->GetDifficulty() == RAID_DIFFICULTY_25MAN_NORMAL || instance->GetDifficulty() == RAID_DIFFICULTY_25MAN_HEROIC; } - const char* Save() { return m_strInstData.c_str(); } - void Load(const char* chrIn); + const char* Save() override { return m_strInstData.c_str(); } + void Load(const char* chrIn) override; void Update(uint32 uiDiff) { DialogueUpdate(uiDiff); } private: void DoSummonRamsey(uint32 uiEntry); - void JustDidDialogueStep(int32 iEntry); + void JustDidDialogueStep(int32 iEntry) override; void DoHandleEventEpilogue(); uint32 m_auiEncounter[MAX_ENCOUNTER]; diff --git a/scripts/northrend/dalaran.cpp b/scripts/northrend/dalaran.cpp index 1eb3e31d5..cb5102ca6 100644 --- a/scripts/northrend/dalaran.cpp +++ b/scripts/northrend/dalaran.cpp @@ -40,7 +40,7 @@ struct MANGOS_DLL_DECL npc_dalaran_guardian_mageAI : public ScriptedAI { npc_dalaran_guardian_mageAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } - void MoveInLineOfSight(Unit* pWho) + void MoveInLineOfSight(Unit* pWho) override { if (m_creature->GetDistanceZ(pWho) > CREATURE_Z_ATTACK_RANGE) return; @@ -62,11 +62,11 @@ struct MANGOS_DLL_DECL npc_dalaran_guardian_mageAI : public ScriptedAI } } - void AttackedBy(Unit* /*pAttacker*/) {} + void AttackedBy(Unit* /*pAttacker*/) override {} - void Reset() {} + void Reset() override {} - void UpdateAI(const uint32 /*uiDiff*/) {} + void UpdateAI(const uint32 /*uiDiff*/) override {} }; CreatureAI* GetAI_npc_dalaran_guardian_mage(Creature* pCreature) diff --git a/scripts/northrend/dragonblight.cpp b/scripts/northrend/dragonblight.cpp index 4292f8515..9513cfdc9 100644 --- a/scripts/northrend/dragonblight.cpp +++ b/scripts/northrend/dragonblight.cpp @@ -73,14 +73,14 @@ struct MANGOS_DLL_DECL npc_destructive_wardAI : public Scripted_NoMovementAI bool m_bFirst; bool m_bCanPulse; - void Reset() { } + void Reset() override { } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { pSummoned->AI()->AttackStart(m_creature); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (m_bCanPulse) { diff --git a/scripts/northrend/draktharon_keep/boss_novos.cpp b/scripts/northrend/draktharon_keep/boss_novos.cpp index e04b54c17..7fddace28 100644 --- a/scripts/northrend/draktharon_keep/boss_novos.cpp +++ b/scripts/northrend/draktharon_keep/boss_novos.cpp @@ -105,7 +105,7 @@ struct MANGOS_DLL_DECL boss_novosAI : public Scripted_NoMovementAI uint8 m_uiLostCrystals; Phases m_uiPhase; - void Reset() + void Reset() override { m_uiSummonHandlerTimer = 25000; m_uiSummonShadowcasterTimer = 3000; @@ -134,7 +134,7 @@ struct MANGOS_DLL_DECL boss_novosAI : public Scripted_NoMovementAI m_uiPhase = PHASE_WAITING; } - void MoveInLineOfSight(Unit* pWho) + void MoveInLineOfSight(Unit* pWho) override { // An Add reached the ground, if its z-pos is near the z pos of Novos if (pWho->GetEntry() == NPC_HULKING_CORPSE || pWho->GetEntry() == NPC_FETID_TROLL_CORPSE || pWho->GetEntry() == NPC_RISON_SHADOWCASTER) @@ -148,7 +148,7 @@ struct MANGOS_DLL_DECL boss_novosAI : public Scripted_NoMovementAI ScriptedAI::MoveInLineOfSight(pWho); } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoScriptText(SAY_AGGRO, m_creature); @@ -163,12 +163,12 @@ struct MANGOS_DLL_DECL boss_novosAI : public Scripted_NoMovementAI m_pInstance->SetData(TYPE_NOVOS, IN_PROGRESS); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { DoScriptText(SAY_KILL, m_creature); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoScriptText(SAY_DEATH, m_creature); @@ -176,13 +176,13 @@ struct MANGOS_DLL_DECL boss_novosAI : public Scripted_NoMovementAI m_pInstance->SetData(TYPE_NOVOS, DONE); } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_NOVOS, FAIL); } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { switch (pSummoned->GetEntry()) { @@ -194,7 +194,7 @@ struct MANGOS_DLL_DECL boss_novosAI : public Scripted_NoMovementAI } } - void SummonedCreatureJustDied(Creature* pSummoned) + void SummonedCreatureJustDied(Creature* pSummoned) override { if (pSummoned->GetEntry() == NPC_CRYSTAL_HANDLER) { @@ -207,7 +207,7 @@ struct MANGOS_DLL_DECL boss_novosAI : public Scripted_NoMovementAI } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -329,12 +329,12 @@ struct MANGOS_DLL_DECL npc_crystal_channel_targetAI : public ScriptedAI instance_draktharon_keep* m_pInstance; - void Reset() {} - void MoveInLineOfSight(Unit* pWho) {} - void AttackStart(Unit* pWho) {} - void UpdateAI(const uint32 uiDiff) {} + void Reset() override {} + void MoveInLineOfSight(Unit* pWho) override {} + void AttackStart(Unit* pWho) override {} + void UpdateAI(const uint32 uiDiff) override {} - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { if (pSummoned->GetEntry() == NPC_HULKING_CORPSE || pSummoned->GetEntry() == NPC_FETID_TROLL_CORPSE || pSummoned->GetEntry() == NPC_RISON_SHADOWCASTER) { @@ -350,7 +350,7 @@ struct MANGOS_DLL_DECL npc_crystal_channel_targetAI : public ScriptedAI } } - void SummonedMovementInform(Creature* pSummoned, uint32 uiMotionType, uint32 uiPointId) + void SummonedMovementInform(Creature* pSummoned, uint32 uiMotionType, uint32 uiPointId) override { if (uiPointId != 1 || uiMotionType != POINT_MOTION_TYPE || (pSummoned->GetEntry() != NPC_HULKING_CORPSE && pSummoned->GetEntry() != NPC_FETID_TROLL_CORPSE && pSummoned->GetEntry() != NPC_RISON_SHADOWCASTER)) return; diff --git a/scripts/northrend/draktharon_keep/boss_tharonja.cpp b/scripts/northrend/draktharon_keep/boss_tharonja.cpp index 61d9fca43..f7281b417 100644 --- a/scripts/northrend/draktharon_keep/boss_tharonja.cpp +++ b/scripts/northrend/draktharon_keep/boss_tharonja.cpp @@ -95,7 +95,7 @@ struct MANGOS_DLL_DECL boss_tharonjaAI : public ScriptedAI uint32 m_uiPoisonCloudTimer; uint32 m_uiReturnFleshTimer; - void Reset() + void Reset() override { m_uiPhase = PHASE_SKELETAL; @@ -108,7 +108,7 @@ struct MANGOS_DLL_DECL boss_tharonjaAI : public ScriptedAI m_uiReturnFleshTimer = 26000; } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoScriptText(SAY_AGGRO, m_creature); @@ -116,12 +116,12 @@ struct MANGOS_DLL_DECL boss_tharonjaAI : public ScriptedAI m_pInstance->SetData(TYPE_THARONJA, IN_PROGRESS); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { DoScriptText(urand(0, 1) ? SAY_KILL_1 : SAY_KILL_2, m_creature); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoScriptText(SAY_DEATH, m_creature); @@ -135,7 +135,7 @@ struct MANGOS_DLL_DECL boss_tharonjaAI : public ScriptedAI m_pInstance->SetData(TYPE_THARONJA, DONE); } - void JustReachedHome() + void JustReachedHome() override { // Reset Display ID if (CreatureInfo const* pCreatureInfo = GetCreatureTemplateStore(NPC_THARONJA_SKELETAL)) @@ -149,7 +149,7 @@ struct MANGOS_DLL_DECL boss_tharonjaAI : public ScriptedAI m_pInstance->SetData(TYPE_THARONJA, FAIL); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/northrend/draktharon_keep/boss_trollgore.cpp b/scripts/northrend/draktharon_keep/boss_trollgore.cpp index 85017f28c..bd6624a89 100644 --- a/scripts/northrend/draktharon_keep/boss_trollgore.cpp +++ b/scripts/northrend/draktharon_keep/boss_trollgore.cpp @@ -75,7 +75,7 @@ struct MANGOS_DLL_DECL boss_trollgoreAI : public ScriptedAI GuidVector m_vTriggers; - void Reset() + void Reset() override { m_uiCorpseExplodeTimer = 20000; m_uiConsumeTimer = 15000; @@ -85,7 +85,7 @@ struct MANGOS_DLL_DECL boss_trollgoreAI : public ScriptedAI m_uiConsumeStacks = 0; } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoScriptText(SAY_AGGRO, m_creature); @@ -96,13 +96,13 @@ struct MANGOS_DLL_DECL boss_trollgoreAI : public ScriptedAI } } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { if (pVictim->GetCharmerOrOwnerPlayerOrPlayerItself()) DoScriptText(SAY_KILL, m_creature); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoScriptText(SAY_DEATH, m_creature); @@ -110,13 +110,13 @@ struct MANGOS_DLL_DECL boss_trollgoreAI : public ScriptedAI m_pInstance->SetData(TYPE_TROLLGORE, DONE); } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_TROLLGORE, FAIL); } - void SpellHit(Unit* pTarget, const SpellEntry* pSpell) + void SpellHit(Unit* pTarget, const SpellEntry* pSpell) override { if (pSpell->Id == SPELL_CONSUME_BUFF || pSpell->Id == SPELL_CONSUME_BUFF_H) { @@ -131,7 +131,7 @@ struct MANGOS_DLL_DECL boss_trollgoreAI : public ScriptedAI } } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { // This spell taunts the boss and the boss taunts back pSummoned->CastSpell(m_creature, SPELL_INVADER_TAUNT, true); @@ -174,7 +174,7 @@ struct MANGOS_DLL_DECL boss_trollgoreAI : public ScriptedAI } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/northrend/draktharon_keep/draktharon_keep.h b/scripts/northrend/draktharon_keep/draktharon_keep.h index f4ce5deac..dd49f1f63 100644 --- a/scripts/northrend/draktharon_keep/draktharon_keep.h +++ b/scripts/northrend/draktharon_keep/draktharon_keep.h @@ -58,25 +58,25 @@ class MANGOS_DLL_DECL instance_draktharon_keep : public ScriptedInstance instance_draktharon_keep(Map* pMap); ~instance_draktharon_keep() {} - void Initialize(); + void Initialize() override; - void SetData(uint32 uiType, uint32 uiData); - uint32 GetData(uint32 uiType); + void SetData(uint32 uiType, uint32 uiData) override; + uint32 GetData(uint32 uiType) override; - void OnCreatureEnterCombat(Creature* pCreature); + void OnCreatureEnterCombat(Creature* pCreature) override; void OnCreatureEvade(Creature* pCreature); - void OnCreatureDeath(Creature* pCreature); + void OnCreatureDeath(Creature* pCreature) override; - void OnCreatureCreate(Creature* pCreature); - void OnObjectCreate(GameObject* pGo); + void OnCreatureCreate(Creature* pCreature) override; + void OnObjectCreate(GameObject* pGo) override; void GetTrollgoreOutsideTriggers(GuidVector& vTriggers) { vTriggers = m_vTriggerGuids; } ObjectGuid GetTrollgoreCornerTrigger() { return m_trollgoreCornerTriggerGuid; } - bool CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/); + bool CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/) override; - const char* Save() { return m_strInstData.c_str(); } - void Load(const char* chrIn); + const char* Save() override { return m_strInstData.c_str(); } + void Load(const char* chrIn) override; Creature* GetNextCrystalTarget(Creature* pCrystalHandler, uint8& uiIndex); void DoHandleCrystal(uint8 uiIndex); diff --git a/scripts/northrend/grizzly_hills.cpp b/scripts/northrend/grizzly_hills.cpp index 3be7c5f52..dbfab6011 100644 --- a/scripts/northrend/grizzly_hills.cpp +++ b/scripts/northrend/grizzly_hills.cpp @@ -47,9 +47,9 @@ struct MANGOS_DLL_DECL npc_depleted_war_golemAI : public ScriptedPetAI { npc_depleted_war_golemAI(Creature* pCreature) : ScriptedPetAI(pCreature) { Reset(); } - void Reset() { } + void Reset() override { } - void OwnerKilledUnit(Unit* pVictim) + void OwnerKilledUnit(Unit* pVictim) override { if (pVictim->GetTypeId() == TYPEID_UNIT && pVictim->GetEntry() == NPC_LIGHTNING_SENTRY) { diff --git a/scripts/northrend/gundrak/boss_colossus.cpp b/scripts/northrend/gundrak/boss_colossus.cpp index 0922960d6..63b201368 100644 --- a/scripts/northrend/gundrak/boss_colossus.cpp +++ b/scripts/northrend/gundrak/boss_colossus.cpp @@ -71,18 +71,18 @@ struct MANGOS_DLL_DECL boss_drakkari_elementalAI : public ScriptedAI uint32 m_uiSurgeTimer; - void Reset() + void Reset() override { m_bIsFirstEmerge = true; m_uiSurgeTimer = urand(9000, 13000); } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_MOJO_VOLLEY : SPELL_MOJO_VOLLEY_H); } - void DamageTaken(Unit* pDoneBy, uint32& uiDamage) + void DamageTaken(Unit* pDoneBy, uint32& uiDamage) override { if (!m_bIsFirstEmerge) return; @@ -94,7 +94,7 @@ struct MANGOS_DLL_DECL boss_drakkari_elementalAI : public ScriptedAI } } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) { @@ -105,7 +105,7 @@ struct MANGOS_DLL_DECL boss_drakkari_elementalAI : public ScriptedAI m_creature->ForcedDespawn(); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { if (m_pInstance) { @@ -122,7 +122,7 @@ struct MANGOS_DLL_DECL boss_drakkari_elementalAI : public ScriptedAI m_creature->SetHealth(m_creature->GetMaxHealth()*.5); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -168,7 +168,7 @@ struct MANGOS_DLL_DECL boss_drakkari_colossusAI : public ScriptedAI uint32 m_uiColossusStartTimer; uint8 m_uiMojosGathered; - void Reset() + void Reset() override { m_bFirstEmerge = true; m_uiMightyBlowTimer = 10000; @@ -181,7 +181,7 @@ struct MANGOS_DLL_DECL boss_drakkari_colossusAI : public ScriptedAI m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_MORTAL_STRIKES : SPELL_MORTAL_STRIKES_H); @@ -189,19 +189,19 @@ struct MANGOS_DLL_DECL boss_drakkari_colossusAI : public ScriptedAI m_pInstance->SetData(TYPE_COLOSSUS, IN_PROGRESS); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { if (m_pInstance) m_pInstance->SetData(TYPE_COLOSSUS, DONE); } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_COLOSSUS, FAIL); } - void SpellHit(Unit* pCaster, const SpellEntry* pSpell) + void SpellHit(Unit* pCaster, const SpellEntry* pSpell) override { if (pSpell->Id == SPELL_MERGE) { @@ -216,7 +216,7 @@ struct MANGOS_DLL_DECL boss_drakkari_colossusAI : public ScriptedAI } } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { if (pSummoned->GetEntry() == NPC_ELEMENTAL) { @@ -233,7 +233,7 @@ struct MANGOS_DLL_DECL boss_drakkari_colossusAI : public ScriptedAI } } - void DamageTaken(Unit* pDoneBy, uint32& uiDamage) + void DamageTaken(Unit* pDoneBy, uint32& uiDamage) override { if (m_bFirstEmerge && m_creature->GetHealthPercent() < 50.0f) DoEmergeElemental(); @@ -268,7 +268,7 @@ struct MANGOS_DLL_DECL boss_drakkari_colossusAI : public ScriptedAI m_uiColossusStartTimer = 1000; } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (m_uiColossusStartTimer) { @@ -322,12 +322,12 @@ struct MANGOS_DLL_DECL npc_living_mojoAI : public ScriptedAI uint32 m_uiMojoWaveTimer; - void Reset() + void Reset() override { m_uiMojoWaveTimer = urand(10000, 13000); } - void AttackStart(Unit* pWho) + void AttackStart(Unit* pWho) override { // Don't attack if is part of the Colossus event if (m_bIsPartOfColossus) @@ -336,7 +336,7 @@ struct MANGOS_DLL_DECL npc_living_mojoAI : public ScriptedAI ScriptedAI::AttackStart(pWho); } - void MovementInform(uint32 uiType, uint32 uiPointId) + void MovementInform(uint32 uiType, uint32 uiPointId) override { if (uiType != POINT_MOTION_TYPE) return; @@ -357,7 +357,7 @@ struct MANGOS_DLL_DECL npc_living_mojoAI : public ScriptedAI } } - void EnterEvadeMode() + void EnterEvadeMode() override { if (!m_bIsPartOfColossus) ScriptedAI::EnterEvadeMode(); @@ -378,12 +378,12 @@ struct MANGOS_DLL_DECL npc_living_mojoAI : public ScriptedAI } } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_MOJO_PUDDLE : SPELL_MOJO_PUDDLE_H, CAST_TRIGGERED); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/northrend/gundrak/boss_eck.cpp b/scripts/northrend/gundrak/boss_eck.cpp index acd94fa12..0ea46e8fd 100644 --- a/scripts/northrend/gundrak/boss_eck.cpp +++ b/scripts/northrend/gundrak/boss_eck.cpp @@ -54,7 +54,7 @@ struct MANGOS_DLL_DECL boss_eckAI : public ScriptedAI uint32 m_uiBiteTimer; uint32 m_uiBerserkTimer; - void Reset() + void Reset() override { m_uiSpitTimer = urand(10000, 20000); m_uiSpringTimer = urand(15000, 25000); @@ -63,32 +63,32 @@ struct MANGOS_DLL_DECL boss_eckAI : public ScriptedAI m_bIsBerserk = false; } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { if (m_pInstance) m_pInstance->SetData(TYPE_ECK, IN_PROGRESS); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { if (m_pInstance) m_pInstance->SetData(TYPE_ECK, DONE); } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_ECK, FAIL); } // As the Eck Spite spell has no dummy or similar effect, applying the residue aura has to be done with spellHitTarget - void SpellHitTarget(Unit* pUnit, const SpellEntry* pSpellEntry) + void SpellHitTarget(Unit* pUnit, const SpellEntry* pSpellEntry) override { if (pSpellEntry->Id == SPELL_ECK_SPIT && pUnit->GetTypeId() == TYPEID_PLAYER && !pUnit->HasAura(SPELL_ECK_RESIDUE)) pUnit->CastSpell(pUnit, SPELL_ECK_RESIDUE, true); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/northrend/gundrak/boss_galdarah.cpp b/scripts/northrend/gundrak/boss_galdarah.cpp index cdd2a5f1e..d533e5b10 100644 --- a/scripts/northrend/gundrak/boss_galdarah.cpp +++ b/scripts/northrend/gundrak/boss_galdarah.cpp @@ -86,7 +86,7 @@ struct MANGOS_DLL_DECL boss_galdarahAI : public ScriptedAI uint32 m_uiEnrageTimer; uint8 m_uiAbilityCount; - void Reset() + void Reset() override { m_bIsTrollPhase = true; @@ -97,7 +97,7 @@ struct MANGOS_DLL_DECL boss_galdarahAI : public ScriptedAI m_uiAbilityCount = 0; } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoScriptText(SAY_AGGRO, m_creature); @@ -105,7 +105,7 @@ struct MANGOS_DLL_DECL boss_galdarahAI : public ScriptedAI m_pInstance->SetData(TYPE_GALDARAH , IN_PROGRESS); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { switch (urand(0, 2)) { @@ -115,13 +115,13 @@ struct MANGOS_DLL_DECL boss_galdarahAI : public ScriptedAI } } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_GALDARAH, FAIL); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoScriptText(SAY_DEATH, m_creature); @@ -129,7 +129,7 @@ struct MANGOS_DLL_DECL boss_galdarahAI : public ScriptedAI m_pInstance->SetData(TYPE_GALDARAH, DONE); } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { if (pSummoned->GetEntry() == NPC_RHINO_SPIRIT) { @@ -167,7 +167,7 @@ struct MANGOS_DLL_DECL boss_galdarahAI : public ScriptedAI m_uiSpecialAbilityTimer = 12000; } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/northrend/gundrak/boss_moorabi.cpp b/scripts/northrend/gundrak/boss_moorabi.cpp index 43dd68cb9..e1afa2655 100644 --- a/scripts/northrend/gundrak/boss_moorabi.cpp +++ b/scripts/northrend/gundrak/boss_moorabi.cpp @@ -74,7 +74,7 @@ struct MANGOS_DLL_DECL boss_moorabiAI : public ScriptedAI bool m_bMammothPhase; - void Reset() + void Reset() override { m_bMammothPhase = false; @@ -85,7 +85,7 @@ struct MANGOS_DLL_DECL boss_moorabiAI : public ScriptedAI m_uiPreviousTimer = 10000; } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoScriptText(SAY_AGGRO, m_creature); DoCastSpellIfCan(m_creature, SPELL_MOJO_FRENZY); @@ -94,7 +94,7 @@ struct MANGOS_DLL_DECL boss_moorabiAI : public ScriptedAI m_pInstance->SetData(TYPE_MOORABI, IN_PROGRESS); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { switch (urand(0, 2)) { @@ -104,7 +104,7 @@ struct MANGOS_DLL_DECL boss_moorabiAI : public ScriptedAI } } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoScriptText(SAY_DEATH, m_creature); @@ -112,7 +112,7 @@ struct MANGOS_DLL_DECL boss_moorabiAI : public ScriptedAI m_pInstance->SetData(TYPE_MOORABI, DONE); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/northrend/gundrak/boss_sladran.cpp b/scripts/northrend/gundrak/boss_sladran.cpp index b23e6ccfc..6e4ce141f 100644 --- a/scripts/northrend/gundrak/boss_sladran.cpp +++ b/scripts/northrend/gundrak/boss_sladran.cpp @@ -69,11 +69,11 @@ struct MANGOS_DLL_DECL mob_sladran_summon_targetAI : public ScriptedAI instance_gundrak* m_pInstance; - void Reset() {} - void MoveInLineOfSight(Unit* pWho) {} - void AttackStart(Unit* pWho) {} + void Reset() override {} + void MoveInLineOfSight(Unit* pWho) override {} + void AttackStart(Unit* pWho) override {} - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { if (!m_pInstance) return; @@ -86,7 +86,7 @@ struct MANGOS_DLL_DECL mob_sladran_summon_targetAI : public ScriptedAI } } - void UpdateAI(const uint32 diff) {} + void UpdateAI(const uint32 diff) override {} }; CreatureAI* GetAI_mob_sladran_summon_target(Creature* pCreature) @@ -114,7 +114,7 @@ struct MANGOS_DLL_DECL boss_sladranAI : public ScriptedAI uint32 m_uiPowerfulBiteTimer; uint32 m_uiVenomBoltTimer; - void Reset() + void Reset() override { m_uiSummonTimer = m_bIsRegularMode ? 5000 : 3000; m_uiPoisonNovaTimer = 22000; @@ -122,7 +122,7 @@ struct MANGOS_DLL_DECL boss_sladranAI : public ScriptedAI m_uiVenomBoltTimer = 15000; } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoScriptText(SAY_AGGRO, m_creature); @@ -130,7 +130,7 @@ struct MANGOS_DLL_DECL boss_sladranAI : public ScriptedAI m_pInstance->SetData(TYPE_SLADRAN, IN_PROGRESS); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { switch (urand(0, 2)) { @@ -140,7 +140,7 @@ struct MANGOS_DLL_DECL boss_sladranAI : public ScriptedAI } } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoScriptText(SAY_DEATH, m_creature); @@ -148,7 +148,7 @@ struct MANGOS_DLL_DECL boss_sladranAI : public ScriptedAI m_pInstance->SetData(TYPE_SLADRAN, DONE); } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_SLADRAN, FAIL); @@ -168,7 +168,7 @@ struct MANGOS_DLL_DECL boss_sladranAI : public ScriptedAI return *iter; } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/northrend/gundrak/gundrak.h b/scripts/northrend/gundrak/gundrak.h index e41a9ad1f..c8ecc69bf 100644 --- a/scripts/northrend/gundrak/gundrak.h +++ b/scripts/northrend/gundrak/gundrak.h @@ -75,23 +75,23 @@ class MANGOS_DLL_DECL instance_gundrak : public ScriptedInstance instance_gundrak(Map* pMap); ~instance_gundrak() {} - void Initialize(); + void Initialize() override; - void OnCreatureCreate(Creature* pCreature); - void OnObjectCreate(GameObject* pGo); + void OnCreatureCreate(Creature* pCreature) override; + void OnObjectCreate(GameObject* pGo) override; - void OnCreatureEnterCombat(Creature* pCreature); + void OnCreatureEnterCombat(Creature* pCreature) override; - void SetData(uint32 uiType, uint32 uiData); - uint32 GetData(uint32 uiType); + void SetData(uint32 uiType, uint32 uiData) override; + uint32 GetData(uint32 uiType) override; - const char* Save() { return m_strInstData.c_str(); } - void Load(const char* chrIn); + const char* Save() override { return m_strInstData.c_str(); } + void Load(const char* chrIn) override; void SetLessRabiAchievementCriteria(bool bIsMet) { m_bLessRabi = bIsMet; } - bool CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/); + bool CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/) override; - void Update(uint32 uiDiff); + void Update(uint32 uiDiff) override; protected: void DoAltarVisualEffect(uint8 uiType); diff --git a/scripts/northrend/howling_fjord.cpp b/scripts/northrend/howling_fjord.cpp index 94e28dde5..462288e6d 100644 --- a/scripts/northrend/howling_fjord.cpp +++ b/scripts/northrend/howling_fjord.cpp @@ -55,7 +55,7 @@ struct MANGOS_DLL_DECL npc_ancient_male_vrykulAI : public ScriptedAI uint32 m_uiPhase; uint32 m_uiPhaseTimer; - void Reset() + void Reset() override { m_bEventInProgress = false; m_uiPhase = 0; @@ -70,7 +70,7 @@ struct MANGOS_DLL_DECL npc_ancient_male_vrykulAI : public ScriptedAI m_bEventInProgress = true; } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_bEventInProgress) return; @@ -168,7 +168,7 @@ struct MANGOS_DLL_DECL npc_daegarnAI : public ScriptedAI bool m_bEventInProgress; ObjectGuid m_playerGuid; - void Reset() + void Reset() override { m_bEventInProgress = false; m_playerGuid.Clear(); @@ -184,7 +184,7 @@ struct MANGOS_DLL_DECL npc_daegarnAI : public ScriptedAI SummonGladiator(NPC_FIRJUS); } - void JustSummoned(Creature* pSummon) + void JustSummoned(Creature* pSummon) override { if (Player* pPlayer = m_creature->GetMap()->GetPlayer(m_playerGuid)) { @@ -204,7 +204,7 @@ struct MANGOS_DLL_DECL npc_daegarnAI : public ScriptedAI m_creature->SummonCreature(uiEntry, afSummon[0], afSummon[1], afSummon[2], 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 20 * IN_MILLISECONDS); } - void SummonedMovementInform(Creature* pSummoned, uint32 uiMotionType, uint32 uiPointId) + void SummonedMovementInform(Creature* pSummoned, uint32 uiMotionType, uint32 uiPointId) override { Player* pPlayer = m_creature->GetMap()->GetPlayer(m_playerGuid); @@ -219,7 +219,7 @@ struct MANGOS_DLL_DECL npc_daegarnAI : public ScriptedAI pSummoned->AI()->AttackStart(pPlayer); } - void SummonedCreatureDespawn(Creature* pSummoned) + void SummonedCreatureDespawn(Creature* pSummoned) override { uint32 uiEntry = 0; @@ -282,7 +282,7 @@ struct MANGOS_DLL_DECL npc_silvermoon_harryAI : public ScriptedAI uint32 m_uiScorchTimer; uint32 m_uiResetBeatenTimer; - void Reset() + void Reset() override { m_bHarryBeaten = false; @@ -296,7 +296,7 @@ struct MANGOS_DLL_DECL npc_silvermoon_harryAI : public ScriptedAI m_creature->setFaction(m_creature->GetCreatureInfo()->faction_A); } - void AttackedBy(Unit* pAttacker) + void AttackedBy(Unit* pAttacker) override { if (m_creature->getVictim()) return; @@ -305,7 +305,7 @@ struct MANGOS_DLL_DECL npc_silvermoon_harryAI : public ScriptedAI AttackStart(pAttacker); } - void DamageTaken(Unit* pDoneBy, uint32& uiDamage) + void DamageTaken(Unit* pDoneBy, uint32& uiDamage) override { if (uiDamage > m_creature->GetHealth() || (m_creature->GetHealth() - uiDamage) * 100 / m_creature->GetMaxHealth() < 20) { @@ -334,7 +334,7 @@ struct MANGOS_DLL_DECL npc_silvermoon_harryAI : public ScriptedAI return m_bHarryBeaten; } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (m_bHarryBeaten) { diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_bronjahm.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_bronjahm.cpp index f059e674e..b822e354e 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_bronjahm.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_bronjahm.cpp @@ -66,7 +66,7 @@ struct MANGOS_DLL_DECL boss_bronjahmAI : public ScriptedAI uint32 m_uiFearTimer; uint32 m_uiShadowboltTimer; - void Reset() + void Reset() override { m_uiPhase = 0; m_uiMagicsBaneTimer = urand(8000, 12000); @@ -76,7 +76,7 @@ struct MANGOS_DLL_DECL boss_bronjahmAI : public ScriptedAI SetCombatMovement(true); } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoScriptText(urand(0, 1) ? SAY_AGGRO_1 : SAY_AGGRO_2, m_creature); @@ -87,7 +87,7 @@ struct MANGOS_DLL_DECL boss_bronjahmAI : public ScriptedAI m_creature->RemoveAurasDueToSpell(SPELL_SOULSTORM_VISUAL_OOC); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { if (pVictim->GetTypeId() != TYPEID_PLAYER) return; @@ -96,7 +96,7 @@ struct MANGOS_DLL_DECL boss_bronjahmAI : public ScriptedAI DoScriptText(urand(0, 1) ? SAY_SLAY_1 : SAY_SLAY_2, m_creature); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoScriptText(SAY_DEATH, m_creature); @@ -104,13 +104,13 @@ struct MANGOS_DLL_DECL boss_bronjahmAI : public ScriptedAI m_pInstance->SetData(TYPE_BRONJAHM, DONE); } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_BRONJAHM, FAIL); } - void SpellHitTarget(Unit* pTarget, SpellEntry const* pSpellEntry) + void SpellHitTarget(Unit* pTarget, SpellEntry const* pSpellEntry) override { if (pTarget == m_creature && pSpellEntry->Id == SPELL_TELEPORT) { @@ -121,7 +121,7 @@ struct MANGOS_DLL_DECL boss_bronjahmAI : public ScriptedAI } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -219,18 +219,18 @@ struct MANGOS_DLL_DECL npc_corrupted_soul_fragmentAI : public ScriptedAI DoCastSpellIfCan(m_creature, SPELL_BANISH_VISUAL); } - void Reset() + void Reset() override { SetCombatMovement(true); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { if (instance_forge_of_souls* pInstance = (instance_forge_of_souls*)m_creature->GetInstanceData()) pInstance->SetGuid(DATA_SOULFRAGMENT_REMOVE, m_creature->GetObjectGuid()); } - void MoveInLineOfSight(Unit* pWho) + void MoveInLineOfSight(Unit* pWho) override { if (pWho->GetEntry() == NPC_BRONJAHM) { diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_devourer_of_souls.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_devourer_of_souls.cpp index ebcacd10d..b4cf09822 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_devourer_of_souls.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_devourer_of_souls.cpp @@ -104,7 +104,7 @@ struct MANGOS_DLL_DECL boss_devourer_of_soulsAI : public ScriptedAI GuidList m_lWellGuids; - void Reset() + void Reset() override { m_uiFace = FACE_NORMAL; @@ -116,14 +116,14 @@ struct MANGOS_DLL_DECL boss_devourer_of_soulsAI : public ScriptedAI m_uiEndPhaseTimer = 0; } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoScriptText(aTexts[0][m_uiFace], m_creature); if (m_pInstance) m_pInstance->SetData(TYPE_DEVOURER_OF_SOULS, IN_PROGRESS); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { if (pVictim->GetTypeId() != TYPEID_PLAYER) return; @@ -132,7 +132,7 @@ struct MANGOS_DLL_DECL boss_devourer_of_soulsAI : public ScriptedAI DoScriptText(aTexts[urand(1, 2)][m_uiFace], m_creature); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoScriptText(aTexts[3][m_uiFace], m_creature); @@ -147,7 +147,7 @@ struct MANGOS_DLL_DECL boss_devourer_of_soulsAI : public ScriptedAI m_lWellGuids.clear(); } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) { @@ -164,7 +164,7 @@ struct MANGOS_DLL_DECL boss_devourer_of_soulsAI : public ScriptedAI m_lWellGuids.clear(); } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { if (pSummoned->GetEntry() == NPC_WELL_OF_SOULS) { @@ -186,7 +186,7 @@ struct MANGOS_DLL_DECL boss_devourer_of_soulsAI : public ScriptedAI } } - void SpellHitTarget(Unit* pTarget, SpellEntry const* pSpellEntry) + void SpellHitTarget(Unit* pTarget, SpellEntry const* pSpellEntry) override { switch (pSpellEntry->Id) { @@ -203,7 +203,7 @@ struct MANGOS_DLL_DECL boss_devourer_of_soulsAI : public ScriptedAI } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->isInCombat()) return; diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/forge_of_souls.h b/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/forge_of_souls.h index da400abc0..577a3b64b 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/forge_of_souls.h +++ b/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/forge_of_souls.h @@ -94,20 +94,20 @@ class MANGOS_DLL_DECL instance_forge_of_souls : public ScriptedInstance instance_forge_of_souls(Map* pMap); ~instance_forge_of_souls() {} - void Initialize(); + void Initialize() override; - void OnCreatureCreate(Creature* pCreature); + void OnCreatureCreate(Creature* pCreature) override; - void SetData(uint32 uiType, uint32 uiData); - uint32 GetData(uint32 uiType); - void SetData64(uint32 uiType, uint64 uiData); + void SetData(uint32 uiType, uint32 uiData) override; + uint32 GetData(uint32 uiType) override; + void SetData64(uint32 uiType, uint64 uiData) override; - void OnPlayerEnter(Player* pPlayer); + void OnPlayerEnter(Player* pPlayer) override; void ProcessEventNpcs(Player* pPlayer, bool bChanged); - bool CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/); + bool CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/) override; - const char* Save() { return m_strInstData.c_str(); } - void Load(const char* chrIn); + const char* Save() override { return m_strInstData.c_str(); } + void Load(const char* chrIn) override; protected: uint32 m_auiEncounter[MAX_ENCOUNTER]; diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_forgemaster_garfrost.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_forgemaster_garfrost.cpp index c042caf2b..1c6b5e6c1 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_forgemaster_garfrost.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_forgemaster_garfrost.cpp @@ -74,7 +74,7 @@ struct MANGOS_DLL_DECL boss_forgemaster_garfrostAI : public ScriptedAI uint32 m_uiChillingWaveTimer; uint32 m_uiDeepFreezeTimer; - void Reset() + void Reset() override { m_uiThrowSaroniteTimer = 13000; m_uiChillingWaveTimer = 10000; @@ -83,23 +83,23 @@ struct MANGOS_DLL_DECL boss_forgemaster_garfrostAI : public ScriptedAI m_uiPhase = PHASE_NO_ENCHANTMENT; } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoScriptText(SAY_AGGRO, m_creature, pWho); DoCastSpellIfCan(m_creature, SPELL_PERMAFROST); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoScriptText(SAY_DEATH, m_creature, pKiller); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { DoScriptText(SAY_SLAY_1, m_creature); } - void MovementInform(uint32 uiMotionType, uint32 uiPointId) + void MovementInform(uint32 uiMotionType, uint32 uiPointId) override { // TODO Change to jump movement type when proper implemented if (uiMotionType != POINT_MOTION_TYPE) @@ -123,7 +123,7 @@ struct MANGOS_DLL_DECL boss_forgemaster_garfrostAI : public ScriptedAI } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/pit_of_saron.h b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/pit_of_saron.h index 27d3f3ce0..5af015bc4 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/pit_of_saron.h +++ b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/pit_of_saron.h @@ -44,16 +44,16 @@ class MANGOS_DLL_DECL instance_pit_of_saron : public ScriptedInstance instance_pit_of_saron(Map* pMap); ~instance_pit_of_saron() {} - void Initialize(); + void Initialize() override; - void OnCreatureCreate(Creature* pCreature); - void OnObjectCreate(GameObject* pGo); + void OnCreatureCreate(Creature* pCreature) override; + void OnObjectCreate(GameObject* pGo) override; - void SetData(uint32 uiType, uint32 uiData); - uint32 GetData(uint32 uiType); + void SetData(uint32 uiType, uint32 uiData) override; + uint32 GetData(uint32 uiType) override; - const char* Save() { return m_strInstData.c_str(); } - void Load(const char* chrIn); + const char* Save() override { return m_strInstData.c_str(); } + void Load(const char* chrIn) override; protected: uint32 m_auiEncounter[MAX_ENCOUNTER]; diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/blood_prince_council.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/blood_prince_council.cpp index 6aa900a31..7e3de923b 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/blood_prince_council.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/blood_prince_council.cpp @@ -144,13 +144,13 @@ struct MANGOS_DLL_DECL npc_queen_lanathel_introAI : public ScriptedAI, private D bool m_bEventStarted; - void Reset() + void Reset() override { // Flying animation m_creature->SetByteFlag(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_UNK_2); } - void MoveInLineOfSight(Unit* pWho) + void MoveInLineOfSight(Unit* pWho) override { // The range distance is not sure if (!m_bEventStarted && pWho->GetTypeId() == TYPEID_PLAYER && !((Player*)pWho)->isGameMaster() && @@ -161,7 +161,7 @@ struct MANGOS_DLL_DECL npc_queen_lanathel_introAI : public ScriptedAI, private D } } - void JustDidDialogueStep(int32 iEntry) + void JustDidDialogueStep(int32 iEntry) override { switch (iEntry) { @@ -194,7 +194,7 @@ struct MANGOS_DLL_DECL npc_queen_lanathel_introAI : public ScriptedAI, private D } } - void MovementInform(uint32 uiMoveType, uint32 uiPointId) + void MovementInform(uint32 uiMoveType, uint32 uiPointId) override { if (uiMoveType != POINT_MOTION_TYPE || !uiPointId) return; @@ -237,7 +237,7 @@ struct MANGOS_DLL_DECL npc_ball_of_flameAI : public ScriptedAI uint32 m_uiTargetGuidLow; - void Reset() + void Reset() override { m_bHasFlamesCasted = false; @@ -253,7 +253,7 @@ struct MANGOS_DLL_DECL npc_ball_of_flameAI : public ScriptedAI void DoInitializeTarget(uint32 uiGuid) { m_uiTargetGuidLow = uiGuid; } - void MoveInLineOfSight(Unit* pWho) + void MoveInLineOfSight(Unit* pWho) override { if (!m_bHasFlamesCasted && pWho->GetTypeId() == TYPEID_PLAYER && pWho->GetGUIDLow() == m_uiTargetGuidLow && pWho->IsWithinDist(m_creature, ATTACK_DISTANCE)) @@ -267,9 +267,9 @@ struct MANGOS_DLL_DECL npc_ball_of_flameAI : public ScriptedAI } } - void AttackStart(Unit* pWho) { } + void AttackStart(Unit* pWho) override { } - void UpdateAI(const uint32 uiDiff) { } + void UpdateAI(const uint32 uiDiff) override { } }; CreatureAI* GetAI_npc_ball_of_flame(Creature* pCreature) @@ -285,19 +285,19 @@ struct MANGOS_DLL_DECL npc_kinetic_bombAI : public ScriptedAI { npc_kinetic_bombAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } - void Reset() + void Reset() override { DoCastSpellIfCan(m_creature, SPELL_UNSTABLE, CAST_TRIGGERED); DoCastSpellIfCan(m_creature, SPELL_KINETIC_BOMB_VISUAL, CAST_TRIGGERED); } - void DamageTaken(Unit* pDealer, uint32& uiDamage) + void DamageTaken(Unit* pDealer, uint32& uiDamage) override { // Note: this npc shouldn't take any damage - however this has an issue in the core, because the Unstanble spell doesn't proc on 0 damage uiDamage = 0; } - void MovementInform(uint32 uiMoveType, uint32 uiPointId) + void MovementInform(uint32 uiMoveType, uint32 uiPointId) override { if (uiMoveType != POINT_MOTION_TYPE || !uiPointId) return; @@ -306,11 +306,11 @@ struct MANGOS_DLL_DECL npc_kinetic_bombAI : public ScriptedAI m_creature->ForcedDespawn(1000); } - void AttackStart(Unit* pWho) { } + void AttackStart(Unit* pWho) override { } - void MoveInLineOfSight(Unit* pWho) { } + void MoveInLineOfSight(Unit* pWho) override { } - void UpdateAI(const uint32 uiDiff) { } + void UpdateAI(const uint32 uiDiff) override { } }; CreatureAI* GetAI_npc_kinetic_bomb(Creature* pCreature) @@ -328,7 +328,7 @@ struct MANGOS_DLL_DECL npc_dark_nucleusAI : public ScriptedAI uint32 m_uiDistanceCheck; - void Reset() + void Reset() override { DoCastSpellIfCan(m_creature, SPELL_SHADOW_RESONANCE_AURA, CAST_TRIGGERED); DoCastSpellIfCan(m_creature, SPELL_SHADOW_RESONANCE_DMG, CAST_TRIGGERED); @@ -336,7 +336,7 @@ struct MANGOS_DLL_DECL npc_dark_nucleusAI : public ScriptedAI m_uiDistanceCheck = 1000; } - void AttackStart(Unit* pWho) + void AttackStart(Unit* pWho) override { if (m_creature->Attack(pWho, true)) { @@ -347,7 +347,7 @@ struct MANGOS_DLL_DECL npc_dark_nucleusAI : public ScriptedAI } } - void DamageTaken(Unit* pDealer, uint32& uiDamage) + void DamageTaken(Unit* pDealer, uint32& uiDamage) override { if (m_creature->getVictim() && pDealer != m_creature->getVictim()) { @@ -357,7 +357,7 @@ struct MANGOS_DLL_DECL npc_dark_nucleusAI : public ScriptedAI } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -396,18 +396,18 @@ struct MANGOS_DLL_DECL npc_blood_orb_controlAI : public Scripted_NoMovementAI uint8 m_uiLastResult; uint32 m_uiInvocationTimer; - void Reset() + void Reset() override { m_uiInvocationTimer = 30000; } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { if (m_pInstance) m_pInstance->SetData(TYPE_BLOOD_PRINCE_COUNCIL, IN_PROGRESS); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { if (m_pInstance) { @@ -425,13 +425,13 @@ struct MANGOS_DLL_DECL npc_blood_orb_controlAI : public Scripted_NoMovementAI } } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_BLOOD_PRINCE_COUNCIL, FAIL); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -498,7 +498,7 @@ struct MANGOS_DLL_DECL blood_prince_council_baseAI : public ScriptedAI bool m_bIsSaidSpecial; // 1st spell cast after being empowered is followed by special say - void Reset() + void Reset() override { m_bIsSaidSpecial = false; m_uiEmpowermentTimer = 0; @@ -506,7 +506,7 @@ struct MANGOS_DLL_DECL blood_prince_council_baseAI : public ScriptedAI m_uiBerserkTimer = 10 * MINUTE * IN_MILLISECONDS; } - void EnterEvadeMode() + void EnterEvadeMode() override { // Reset the health to 1 m_creature->SetHealth(1); @@ -518,7 +518,7 @@ struct MANGOS_DLL_DECL blood_prince_council_baseAI : public ScriptedAI ScriptedAI::EnterEvadeMode(); } - void DamageTaken(Unit* pDealer, uint32& uiDamage) + void DamageTaken(Unit* pDealer, uint32& uiDamage) override { // Damage is shared by the Blood Orb Control npc if (!m_uiEmpowermentTimer) @@ -533,7 +533,7 @@ struct MANGOS_DLL_DECL blood_prince_council_baseAI : public ScriptedAI // ##### End of workaround ##### } - void SpellHit(Unit* pCaster, const SpellEntry* pSpell) + void SpellHit(Unit* pCaster, const SpellEntry* pSpell) override { // When hit by the Invocation spell, then set the health of the blood control npc if (pSpell->Id == m_uiInvocationSpellEntry) @@ -545,7 +545,7 @@ struct MANGOS_DLL_DECL blood_prince_council_baseAI : public ScriptedAI } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { // On evade, reset the blood orb on Valanar if (m_uiResetTimer) @@ -614,25 +614,25 @@ struct MANGOS_DLL_DECL boss_valanar_iccAI : public blood_prince_council_baseAI uint32 m_uiVortexTimer; - void Reset() + void Reset() override { blood_prince_council_baseAI::Reset(); m_uiVortexTimer = urand(5000, 10000); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { if (pVictim->GetTypeId() == TYPEID_PLAYER) DoScriptText(urand(0, 1) ? SAY_VALANAR_SLAY_1 : SAY_VALANAR_SLAY_2, m_creature); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoScriptText(SAY_VALANAR_DEATH, m_creature); } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { if (pSummoned->GetEntry() == NPC_KINETIC_BOMB_TARGET) pSummoned->CastSpell(pSummoned->GetPositionX(), pSummoned->GetPositionY(), pSummoned->GetPositionZ() + 20.0f, SPELL_KINETIC_BOMB, true, NULL, NULL, m_creature->GetObjectGuid()); @@ -644,7 +644,7 @@ struct MANGOS_DLL_DECL boss_valanar_iccAI : public blood_prince_council_baseAI } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { blood_prince_council_baseAI::UpdateAI(uiDiff); @@ -706,7 +706,7 @@ struct MANGOS_DLL_DECL boss_keleseth_iccAI : public blood_prince_council_baseAI uint32 m_uiShadowLanceTimer; - void Reset() + void Reset() override { blood_prince_council_baseAI::Reset(); @@ -714,7 +714,7 @@ struct MANGOS_DLL_DECL boss_keleseth_iccAI : public blood_prince_council_baseAI m_uiSphereTimer = 4000; } - void AttackStart(Unit* pWho) + void AttackStart(Unit* pWho) override { if (m_creature->Attack(pWho, true)) { @@ -725,23 +725,23 @@ struct MANGOS_DLL_DECL boss_keleseth_iccAI : public blood_prince_council_baseAI } } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { if (pVictim->GetTypeId() == TYPEID_PLAYER) DoScriptText(urand(0, 1) ? SAY_KELESETH_SLAY_1 : SAY_KELESETH_SLAY_2, m_creature); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoScriptText(SAY_KELESETH_DEATH, m_creature); } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { pSummoned->SetInCombatWithZone(); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { blood_prince_council_baseAI::UpdateAI(uiDiff); @@ -795,25 +795,25 @@ struct MANGOS_DLL_DECL boss_taldaram_iccAI : public blood_prince_council_baseAI uint32 m_uiSparksTimer; - void Reset() + void Reset() override { blood_prince_council_baseAI::Reset(); m_uiSparksTimer = urand(8000, 15000); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { if (pVictim->GetTypeId() == TYPEID_PLAYER) DoScriptText(urand(0, 1) ? SAY_TALDARAM_SLAY_1 : SAY_TALDARAM_SLAY_2, m_creature); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoScriptText(SAY_TALDARAM_DEATH, m_creature); } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { // We need to initialize the target which is the ball of flame should follow if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0, uint32(0), SELECT_FLAG_NOT_IN_MELEE_RANGE | SELECT_FLAG_PLAYER)) @@ -826,7 +826,7 @@ struct MANGOS_DLL_DECL boss_taldaram_iccAI : public blood_prince_council_baseAI } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { blood_prince_council_baseAI::UpdateAI(uiDiff); diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_blood_queen_lanathel.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_blood_queen_lanathel.cpp index 792640867..591407d35 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_blood_queen_lanathel.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_blood_queen_lanathel.cpp @@ -97,7 +97,7 @@ struct MANGOS_DLL_DECL boss_blood_queen_lanathelAI : public ScriptedAI uint32 m_uiSwarmingShadowsTimer; uint32 m_uiDeliriousSlashTimer; - void Reset() + void Reset() override { m_uiPhase = PHASE_GROUND; m_uiPhaseTimer = 120000; // 2 min @@ -113,18 +113,18 @@ struct MANGOS_DLL_DECL boss_blood_queen_lanathelAI : public ScriptedAI m_creature->RemoveByteFlag(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_UNK_2); } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_QUEEN_LANATHEL, FAIL); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { DoScriptText(urand(0, 1) ? SAY_SLAY_1 : SAY_SLAY_2, m_creature); } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoScriptText(SAY_AGGRO, m_creature); DoCastSpellIfCan(m_creature, SPELL_SHROUD_OF_SORROW, CAST_TRIGGERED); @@ -138,7 +138,7 @@ struct MANGOS_DLL_DECL boss_blood_queen_lanathelAI : public ScriptedAI } } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoScriptText(SAY_DEATH, m_creature); @@ -146,7 +146,7 @@ struct MANGOS_DLL_DECL boss_blood_queen_lanathelAI : public ScriptedAI m_pInstance->SetData(TYPE_QUEEN_LANATHEL, DONE); } - void MovementInform(uint32 uiMovementType, uint32 uiPointId) + void MovementInform(uint32 uiMovementType, uint32 uiPointId) override { if (uiMovementType != POINT_MOTION_TYPE) return; @@ -191,7 +191,7 @@ struct MANGOS_DLL_DECL boss_blood_queen_lanathelAI : public ScriptedAI } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp index fc2419078..0deb4c319 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp @@ -137,7 +137,7 @@ struct MANGOS_DLL_DECL boss_deathbringer_saurfangAI : public ScriptedAI Powers m_powerBloodPower; - void Reset() + void Reset() override { m_uiRuneOfBloodTimer = 25000; m_uiBoilingBloodTimer = 19000; @@ -154,7 +154,7 @@ struct MANGOS_DLL_DECL boss_deathbringer_saurfangAI : public ScriptedAI m_creature->SetPower(m_powerBloodPower, 0); } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoScriptText(SAY_AGGRO, m_creature); DoCastSpellIfCan(m_creature, SPELL_BLOOD_POWER, CAST_TRIGGERED); @@ -163,7 +163,7 @@ struct MANGOS_DLL_DECL boss_deathbringer_saurfangAI : public ScriptedAI m_pInstance->SetData(TYPE_DEATHBRINGER_SAURFANG, IN_PROGRESS); } - void MoveInLineOfSight(Unit* pWho) + void MoveInLineOfSight(Unit* pWho) override { if (!m_bIsIntroDone && pWho->GetTypeId() == TYPEID_PLAYER && !((Player*)pWho)->isGameMaster() && m_creature->GetDistance2d(pWho) < 50.0f) { @@ -176,7 +176,7 @@ struct MANGOS_DLL_DECL boss_deathbringer_saurfangAI : public ScriptedAI ScriptedAI::MoveInLineOfSight(pWho); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { if (pVictim->GetTypeId() != TYPEID_PLAYER) return; @@ -185,7 +185,7 @@ struct MANGOS_DLL_DECL boss_deathbringer_saurfangAI : public ScriptedAI DoScriptText(urand(0, 1) ? SAY_SLAY_1 : SAY_SLAY_2, m_creature); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoScriptText(SAY_DEATH, m_creature); DoCastSpellIfCan(m_creature, SPELL_REMOVE_MARKS, CAST_TRIGGERED); @@ -194,13 +194,13 @@ struct MANGOS_DLL_DECL boss_deathbringer_saurfangAI : public ScriptedAI m_pInstance->SetData(TYPE_DEATHBRINGER_SAURFANG, DONE); } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_DEATHBRINGER_SAURFANG, FAIL); } - void EnterEvadeMode() + void EnterEvadeMode() override { m_creature->RemoveAllAuras(); m_creature->DeleteThreatList(); @@ -215,7 +215,7 @@ struct MANGOS_DLL_DECL boss_deathbringer_saurfangAI : public ScriptedAI Reset(); } - void MovementInform(uint32 uiMoveType, uint32 uiPointId) + void MovementInform(uint32 uiMoveType, uint32 uiPointId) override { if (uiMoveType != POINT_MOTION_TYPE) return; @@ -241,7 +241,7 @@ struct MANGOS_DLL_DECL boss_deathbringer_saurfangAI : public ScriptedAI } } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { pSummoned->CastSpell(pSummoned, SPELL_RESISTANT_SKIN, true); pSummoned->CastSpell(pSummoned, SPELL_BLOOD_LINK_BEAST, true); @@ -274,7 +274,7 @@ struct MANGOS_DLL_DECL boss_deathbringer_saurfangAI : public ScriptedAI return suitableTargets[urand(0, suitableTargets.size() - 1)]; } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_festergut.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_festergut.cpp index 03d11420b..2dd4612c4 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_festergut.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_festergut.cpp @@ -93,7 +93,7 @@ struct MANGOS_DLL_DECL boss_festergutAI : public ScriptedAI uint32 m_uiGasSporeTimer; uint32 m_uiVileGasTimer; - void Reset() + void Reset() override { m_uiBerserkTimer = 5 * MINUTE * IN_MILLISECONDS; m_uiGastricBloatTimer = 10000; @@ -102,7 +102,7 @@ struct MANGOS_DLL_DECL boss_festergutAI : public ScriptedAI m_uiVileGasTimer = 10000; } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoScriptText(SAY_AGGRO, m_creature); @@ -114,12 +114,12 @@ struct MANGOS_DLL_DECL boss_festergutAI : public ScriptedAI m_pInstance->SetData(TYPE_FESTERGUT, IN_PROGRESS); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { DoScriptText(urand(0, 1) ? SAY_SLAY_1 : SAY_SLAY_2, m_creature); } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_FESTERGUT, FAIL); @@ -127,7 +127,7 @@ struct MANGOS_DLL_DECL boss_festergutAI : public ScriptedAI DoCastSpellIfCan(m_creature, SPELL_REMOVE_INOCULENT, CAST_TRIGGERED); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { if (m_pInstance) m_pInstance->SetData(TYPE_FESTERGUT, DONE); @@ -136,7 +136,7 @@ struct MANGOS_DLL_DECL boss_festergutAI : public ScriptedAI DoCastSpellIfCan(m_creature, SPELL_REMOVE_INOCULENT, CAST_TRIGGERED); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lady_deathwhisper.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lady_deathwhisper.cpp index 710faaac3..6c88522fd 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lady_deathwhisper.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lady_deathwhisper.cpp @@ -100,7 +100,7 @@ struct MANGOS_DLL_DECL boss_lady_deathwhisperAI : public ScriptedAI GuidVector m_vLeftStalkersGuidVector; ObjectGuid m_middleStalkerGuid; - void Reset() + void Reset() override { m_bIsPhaseOne = true; m_bIsLeftSideSummon = roll_chance_i(50) ? true : false; @@ -130,7 +130,7 @@ struct MANGOS_DLL_DECL boss_lady_deathwhisperAI : public ScriptedAI } } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoScriptText(SAY_AGGRO, m_creature); DoCastSpellIfCan(m_creature, SPELL_MANA_BARRIER, CAST_TRIGGERED); @@ -146,7 +146,7 @@ struct MANGOS_DLL_DECL boss_lady_deathwhisperAI : public ScriptedAI } } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { if (pVictim->GetTypeId() != TYPEID_PLAYER) return; @@ -155,7 +155,7 @@ struct MANGOS_DLL_DECL boss_lady_deathwhisperAI : public ScriptedAI DoScriptText(urand(0, 1) ? SAY_SLAY_1 : SAY_SLAY_2, m_creature); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoScriptText(SAY_DEATH, m_creature); @@ -163,13 +163,13 @@ struct MANGOS_DLL_DECL boss_lady_deathwhisperAI : public ScriptedAI m_pInstance->SetData(TYPE_LADY_DEATHWHISPER, DONE); } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_LADY_DEATHWHISPER, FAIL); } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { switch (pSummoned->GetEntry()) { @@ -183,7 +183,7 @@ struct MANGOS_DLL_DECL boss_lady_deathwhisperAI : public ScriptedAI pSummoned->AI()->AttackStart(pTarget); } - void SummonedCreatureJustDied(Creature* pSummoned) + void SummonedCreatureJustDied(Creature* pSummoned) override { if (pSummoned->GetEntry() != NPC_VENGEFUL_SHADE) m_lCultistSpawnedGuidList.remove(pSummoned->GetObjectGuid()); @@ -303,7 +303,7 @@ struct MANGOS_DLL_DECL boss_lady_deathwhisperAI : public ScriptedAI m_bIsPhaseOne = false; } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp index 38dfb0a2b..9e12ef850 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp @@ -86,7 +86,7 @@ struct MANGOS_DLL_DECL boss_lord_marrowgarAI : public ScriptedAI uint32 m_uiBoneStormChargeTimer; uint32 m_uiBoneStormColdflameTimer; - void Reset() + void Reset() override { SetCombatMovement(true); @@ -101,7 +101,7 @@ struct MANGOS_DLL_DECL boss_lord_marrowgarAI : public ScriptedAI m_uiBoneStormColdflameTimer = 1000; } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoScriptText(SAY_AGGRO, m_creature); @@ -109,7 +109,7 @@ struct MANGOS_DLL_DECL boss_lord_marrowgarAI : public ScriptedAI m_pInstance->SetData(TYPE_MARROWGAR, IN_PROGRESS); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { if (pVictim->GetTypeId() != TYPEID_PLAYER) return; @@ -118,7 +118,7 @@ struct MANGOS_DLL_DECL boss_lord_marrowgarAI : public ScriptedAI DoScriptText(urand(0, 1) ? SAY_SLAY_1 : SAY_SLAY_2, m_creature); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoScriptText(SAY_DEATH, m_creature); @@ -126,13 +126,13 @@ struct MANGOS_DLL_DECL boss_lord_marrowgarAI : public ScriptedAI m_pInstance->SetData(TYPE_MARROWGAR, DONE); } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_MARROWGAR, FAIL); } - void MovementInform(uint32 uiType, uint32 uiPointId) + void MovementInform(uint32 uiType, uint32 uiPointId) override { if (uiType != POINT_MOTION_TYPE) return; @@ -144,7 +144,7 @@ struct MANGOS_DLL_DECL boss_lord_marrowgarAI : public ScriptedAI } } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { if (pSummoned->GetEntry() == NPC_COLDFLAME) { @@ -158,7 +158,7 @@ struct MANGOS_DLL_DECL boss_lord_marrowgarAI : public ScriptedAI } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_professor_putricide.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_professor_putricide.cpp index 5ab7663e9..ad45ebc94 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_professor_putricide.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_professor_putricide.cpp @@ -144,7 +144,7 @@ struct MANGOS_DLL_DECL boss_professor_putricideAI : public ScriptedAI uint32 m_uiUnboundPlagueTimer; uint32 m_uiChokingGasBombTimer; - void Reset() + void Reset() override { m_uiPhase = PHASE_ONE; m_uiHealthCheckTimer = 1000; @@ -155,12 +155,12 @@ struct MANGOS_DLL_DECL boss_professor_putricideAI : public ScriptedAI m_uiChokingGasBombTimer = urand(10000, 15000); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { DoScriptText(urand(0, 1) ? SAY_SLAY_1 : SAY_SLAY_2, m_creature); } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { if (m_pInstance) m_pInstance->SetData(TYPE_PROFESSOR_PUTRICIDE, IN_PROGRESS); @@ -168,7 +168,7 @@ struct MANGOS_DLL_DECL boss_professor_putricideAI : public ScriptedAI DoScriptText(SAY_AGGRO, m_creature); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { if (m_pInstance) m_pInstance->SetData(TYPE_PROFESSOR_PUTRICIDE, DONE); @@ -176,13 +176,13 @@ struct MANGOS_DLL_DECL boss_professor_putricideAI : public ScriptedAI DoScriptText(SAY_DEATH, m_creature); } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_PROFESSOR_PUTRICIDE, FAIL); } - void MovementInform(uint32 uiMovementType, uint32 uiData) + void MovementInform(uint32 uiMovementType, uint32 uiData) override { if (uiMovementType != POINT_MOTION_TYPE) return; @@ -224,7 +224,7 @@ struct MANGOS_DLL_DECL boss_professor_putricideAI : public ScriptedAI } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_rotface.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_rotface.cpp index 28bc97fcf..91ded4093 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_rotface.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_rotface.cpp @@ -96,7 +96,7 @@ struct MANGOS_DLL_DECL boss_rotfaceAI : public ScriptedAI uint32 m_uiMutatedInfectionTimer; uint32 m_uiInfectionsRate; - void Reset() + void Reset() override { m_uiSlimeSprayTimer = urand(17000, 23000); m_uiSlimeFlowTimer = 20000; @@ -104,7 +104,7 @@ struct MANGOS_DLL_DECL boss_rotfaceAI : public ScriptedAI m_uiInfectionsRate = 1; } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { if (m_pInstance) m_pInstance->SetData(TYPE_ROTFACE, IN_PROGRESS); @@ -115,7 +115,7 @@ struct MANGOS_DLL_DECL boss_rotfaceAI : public ScriptedAI DoCastSpellIfCan(m_creature, SPELL_OOZE_FLOOD_PERIODIC, CAST_TRIGGERED); } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_ROTFACE, FAIL); @@ -123,13 +123,13 @@ struct MANGOS_DLL_DECL boss_rotfaceAI : public ScriptedAI DoCastSpellIfCan(m_creature, SPELL_OOZE_FLOOD_REMOVE, CAST_TRIGGERED); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { if (pVictim->GetTypeId() == TYPEID_PLAYER) DoScriptText(urand(0, 1) ? SAY_SLAY_1 : SAY_SLAY_2, m_creature, pVictim); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { if (m_pInstance) m_pInstance->SetData(TYPE_ROTFACE, DONE); @@ -137,7 +137,7 @@ struct MANGOS_DLL_DECL boss_rotfaceAI : public ScriptedAI DoScriptText(SAY_DEATH, m_creature); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -204,24 +204,24 @@ struct MANGOS_DLL_DECL mob_little_oozeAI : public ScriptedAI instance_icecrown_citadel* m_pInstance; uint32 m_uiStickyOozeTimer; - void Reset() + void Reset() override { m_uiStickyOozeTimer = 5000; } - void EnterEvadeMode() + void EnterEvadeMode() override { m_creature->ForcedDespawn(); } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { m_creature->AddThreat(pWho, 500000.0f); // not sure about the threat amount but should be very high DoCastSpellIfCan(m_creature, SPELL_WEAK_RADIATING_OOZE, CAST_TRIGGERED); DoCastSpellIfCan(m_creature, SPELL_LITTLE_OOZE_COMBINE, CAST_TRIGGERED); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -256,18 +256,18 @@ struct MANGOS_DLL_DECL mob_big_oozeAI : public ScriptedAI uint32 m_uiStickyOozeTimer; uint32 m_uiUnstableExplosionCheckTimer; - void Reset() + void Reset() override { m_uiStickyOozeTimer = 5000; m_uiUnstableExplosionCheckTimer = 1000; } - void EnterEvadeMode() + void EnterEvadeMode() override { m_creature->ForcedDespawn(); } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { m_creature->AddThreat(pWho, 500000.0f); DoCastSpellIfCan(m_creature, SPELL_RADIATING_OOZE, CAST_TRIGGERED); @@ -275,7 +275,7 @@ struct MANGOS_DLL_DECL mob_big_oozeAI : public ScriptedAI DoCastSpellIfCan(m_creature, SPELL_BIG_OOZE_BUFF_COMB, CAST_TRIGGERED); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp index cf0f76572..8d07728ba 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp @@ -158,7 +158,7 @@ struct MANGOS_DLL_DECL boss_sindragosaAI : public ScriptedAI uint32 m_uiFrostBombTimer; uint32 m_uiIceTombSingleTimer; - void Reset() + void Reset() override { m_uiPhase = SINDRAGOSA_PHASE_OOC; m_uiPhaseTimer = 45000; @@ -182,13 +182,13 @@ struct MANGOS_DLL_DECL boss_sindragosaAI : public ScriptedAI m_creature->SetWalk(bIsFlying); } - void EnterEvadeMode() + void EnterEvadeMode() override { SetFlying(true); ScriptedAI::EnterEvadeMode(); } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_SINDRAGOSA, FAIL); @@ -196,12 +196,12 @@ struct MANGOS_DLL_DECL boss_sindragosaAI : public ScriptedAI m_creature->GetMotionMaster()->MovePoint(SINDRAGOSA_POINT_AIR_EAST, SindragosaPosition[8][0], SindragosaPosition[8][1], SindragosaPosition[8][2], false); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { DoScriptText(urand(0, 1) ? SAY_SLAY_1 : SAY_SLAY_2, m_creature); } - void AttackStart(Unit* pWho) + void AttackStart(Unit* pWho) override { ScriptedAI::AttackStart(pWho); @@ -216,13 +216,13 @@ struct MANGOS_DLL_DECL boss_sindragosaAI : public ScriptedAI } } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoScriptText(SAY_AGGRO, m_creature); // instance data set when sindragosa lands } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoScriptText(SAY_DEATH, m_creature); @@ -230,7 +230,7 @@ struct MANGOS_DLL_DECL boss_sindragosaAI : public ScriptedAI m_pInstance->SetData(TYPE_SINDRAGOSA, DONE); } - void MovementInform(uint32 uiMovementType, uint32 uiPointId) + void MovementInform(uint32 uiMovementType, uint32 uiPointId) override { if (uiMovementType != POINT_MOTION_TYPE) return; @@ -304,7 +304,7 @@ struct MANGOS_DLL_DECL boss_sindragosaAI : public ScriptedAI m_creature->CastSpell(x, y, z, SPELL_FROST_BOMB, false); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -490,7 +490,7 @@ struct MANGOS_DLL_DECL npc_rimefang_iccAI : public ScriptedAI bool m_bHasLanded; // landed after player entered areatrigger bool m_bIsReady; - void Reset() + void Reset() override { m_uiPhase = RIMEFANG_PHASE_GROUND; m_uiPhaseTimer = 25000; @@ -512,12 +512,12 @@ struct MANGOS_DLL_DECL npc_rimefang_iccAI : public ScriptedAI m_creature->SetWalk(bIsFlying); } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoCastSpellIfCan(m_creature, SPELL_RIMEFANG_FROST_AURA, CAST_TRIGGERED); } - void AttackStart(Unit* pWho) + void AttackStart(Unit* pWho) override { if (!m_bIsReady) { @@ -533,7 +533,7 @@ struct MANGOS_DLL_DECL npc_rimefang_iccAI : public ScriptedAI ScriptedAI::AttackStart(pWho); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { if (!m_pInstance) return; @@ -547,7 +547,7 @@ struct MANGOS_DLL_DECL npc_rimefang_iccAI : public ScriptedAI } // evade to point on platform - void EnterEvadeMode() + void EnterEvadeMode() override { m_creature->RemoveAllAuras(); m_creature->DeleteThreatList(); @@ -561,7 +561,7 @@ struct MANGOS_DLL_DECL npc_rimefang_iccAI : public ScriptedAI Reset(); } - void MovementInform(uint32 uiMovementType, uint32 uiPointId) + void MovementInform(uint32 uiMovementType, uint32 uiPointId) override { if (uiMovementType != POINT_MOTION_TYPE) return; @@ -592,7 +592,7 @@ struct MANGOS_DLL_DECL npc_rimefang_iccAI : public ScriptedAI } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -676,7 +676,7 @@ struct MANGOS_DLL_DECL npc_spinestalker_iccAI : public ScriptedAI bool m_bHasLanded; bool m_bIsReady; - void Reset() + void Reset() override { m_uiBellowingRoarTimer = urand(8000, 24000); m_uiTailSweepTimer = urand(4000, 8000); @@ -694,7 +694,7 @@ struct MANGOS_DLL_DECL npc_spinestalker_iccAI : public ScriptedAI m_creature->SetWalk(bIsFlying); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { if (!m_pInstance) return; @@ -707,7 +707,7 @@ struct MANGOS_DLL_DECL npc_spinestalker_iccAI : public ScriptedAI } } - void AttackStart(Unit* pWho) + void AttackStart(Unit* pWho) override { if (!m_bIsReady) { @@ -723,7 +723,7 @@ struct MANGOS_DLL_DECL npc_spinestalker_iccAI : public ScriptedAI ScriptedAI::AttackStart(pWho); } - void EnterEvadeMode() + void EnterEvadeMode() override { m_creature->RemoveAllAuras(); m_creature->DeleteThreatList(); @@ -737,7 +737,7 @@ struct MANGOS_DLL_DECL npc_spinestalker_iccAI : public ScriptedAI Reset(); } - void MovementInform(uint32 uiMovementType, uint32 uiPointId) + void MovementInform(uint32 uiMovementType, uint32 uiPointId) override { if (uiMovementType != POINT_MOTION_TYPE) return; @@ -755,7 +755,7 @@ struct MANGOS_DLL_DECL npc_spinestalker_iccAI : public ScriptedAI } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -810,16 +810,16 @@ struct MANGOS_DLL_DECL mob_frost_bombAI : public ScriptedAI instance_icecrown_citadel* m_pInstance; uint32 m_uiFrostBombTimer; - void Reset() + void Reset() override { SetCombatMovement(false); DoCastSpellIfCan(m_creature, SPELL_FROST_BOMB_VISUAL, CAST_TRIGGERED); m_uiFrostBombTimer = 6000; } - void AttackStart(Unit* pWho) {} + void AttackStart(Unit* pWho) override {} - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { // Frost Bomb (dmg) if (m_uiFrostBombTimer) diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_the_lich_king.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_the_lich_king.cpp index 3336076f3..35d366d0e 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_the_lich_king.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_the_lich_king.cpp @@ -265,7 +265,7 @@ struct MANGOS_DLL_DECL boss_the_lich_king_iccAI : public ScriptedAI uint32 m_uiFrostmournePhaseTimer; uint32 m_uiVileSpiritsTimer; - void Reset() + void Reset() override { // TODO: handling phases "intro" and "one" and aggroing depending on resetting encounter m_uiPhase = PHASE_INTRO; @@ -286,7 +286,7 @@ struct MANGOS_DLL_DECL boss_the_lich_king_iccAI : public ScriptedAI m_uiVileSpiritsTimer = 20000; } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { if (m_pInstance) m_pInstance->SetData(TYPE_LICH_KING, IN_PROGRESS); @@ -295,13 +295,13 @@ struct MANGOS_DLL_DECL boss_the_lich_king_iccAI : public ScriptedAI m_uiPhase = PHASE_ONE; } - void KilledUnit(Unit* pWho) + void KilledUnit(Unit* pWho) override { if (pWho->GetTypeId() == TYPEID_PLAYER) DoScriptText(urand(0, 1) ? SAY_SLAY_1 : SAY_SLAY_2, m_creature); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { if (m_pInstance) m_pInstance->SetData(TYPE_LICH_KING, DONE); @@ -311,13 +311,13 @@ struct MANGOS_DLL_DECL boss_the_lich_king_iccAI : public ScriptedAI // TODO: finish event, after around 8 seconds play cinematic } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_LICH_KING, FAIL); } - void MovementInform(uint32 uiMovementType, uint32 uiData) + void MovementInform(uint32 uiMovementType, uint32 uiData) override { if (uiMovementType != POINT_MOTION_TYPE) return; @@ -361,7 +361,7 @@ struct MANGOS_DLL_DECL boss_the_lich_king_iccAI : public ScriptedAI } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (m_uiPhase != PHASE_INTRO && m_uiPhase != PHASE_DEATH_AWAITS) { diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_valithria_dreamwalker.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_valithria_dreamwalker.cpp index 94d97ca07..25960c882 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_valithria_dreamwalker.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_valithria_dreamwalker.cpp @@ -112,24 +112,24 @@ struct MANGOS_DLL_DECL boss_valithria_dreamwalkerAI : public ScriptedAI instance_icecrown_citadel* m_pInstance; - void Reset() + void Reset() override { } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_VALITHRIA, FAIL); } // actually, when summoned creature kills a player - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { if (pVictim->GetTypeId() == TYPEID_PLAYER) DoScriptText(SAY_PLAYER_DIES, m_creature, pVictim); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoScriptText(SAY_0_HEALTH, m_creature); @@ -137,7 +137,7 @@ struct MANGOS_DLL_DECL boss_valithria_dreamwalkerAI : public ScriptedAI m_pInstance->SetData(TYPE_VALITHRIA, FAIL); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { } }; diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_citadel.h b/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_citadel.h index 1d841011f..afe553f69 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_citadel.h +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_citadel.h @@ -207,20 +207,20 @@ class MANGOS_DLL_DECL instance_icecrown_citadel : public ScriptedInstance, priva public: instance_icecrown_citadel(Map* pMap); - void Initialize(); - bool IsEncounterInProgress() const; + void Initialize() override; + bool IsEncounterInProgress() const override; - void OnPlayerEnter(Player* pPlayer); - void OnCreatureCreate(Creature* pCreature); - void OnObjectCreate(GameObject* pGo); + void OnPlayerEnter(Player* pPlayer) override; + void OnCreatureCreate(Creature* pCreature) override; + void OnObjectCreate(GameObject* pGo) override; - void OnCreatureDeath(Creature* pCreature); + void OnCreatureDeath(Creature* pCreature) override; - void SetData(uint32 uiType, uint32 uiData); - uint32 GetData(uint32 uiType); + void SetData(uint32 uiType, uint32 uiData) override; + uint32 GetData(uint32 uiType) override; - const char* Save() { return m_strInstData.c_str(); } - void Load(const char* strIn); + const char* Save() override { return m_strInstData.c_str(); } + void Load(const char* strIn) override; void DoHandleCitadelAreaTrigger(uint32 uiTriggerId, Player* pPlayer); @@ -233,9 +233,9 @@ class MANGOS_DLL_DECL instance_icecrown_citadel : public ScriptedInstance, priva // Open Putricide door in a few seconds void DoPreparePutricideDoor() { m_uiPutricideValveTimer = 15000; } - bool CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget = NULL, uint32 uiMiscvalue1 = 0); + bool CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget = NULL, uint32 uiMiscvalue1 = 0) override; - void Update(uint32 uiDiff); + void Update(uint32 uiDiff) override; private: std::string m_strInstData; diff --git a/scripts/northrend/naxxramas/boss_anubrekhan.cpp b/scripts/northrend/naxxramas/boss_anubrekhan.cpp index 2da7e5dcd..2278d2bc1 100644 --- a/scripts/northrend/naxxramas/boss_anubrekhan.cpp +++ b/scripts/northrend/naxxramas/boss_anubrekhan.cpp @@ -87,14 +87,14 @@ struct MANGOS_DLL_DECL boss_anubrekhanAI : public ScriptedAI uint32 m_uiSummonTimer; bool m_bHasTaunted; - void Reset() + void Reset() override { m_uiImpaleTimer = 15000; m_uiLocustSwarmTimer = 90000; m_uiSummonTimer = m_bIsRegularMode ? 20000 : 0;// spawn a guardian only after 20 seconds in normal mode; in heroic there are already 2 Guards spawned } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { // Force the player to spawn corpse scarabs via spell if (pVictim->GetTypeId() == TYPEID_PLAYER) @@ -106,7 +106,7 @@ struct MANGOS_DLL_DECL boss_anubrekhanAI : public ScriptedAI DoScriptText(SAY_SLAY, m_creature); } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { switch (urand(0, 2)) { @@ -119,19 +119,19 @@ struct MANGOS_DLL_DECL boss_anubrekhanAI : public ScriptedAI m_pInstance->SetData(TYPE_ANUB_REKHAN, IN_PROGRESS); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { if (m_pInstance) m_pInstance->SetData(TYPE_ANUB_REKHAN, DONE); } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_ANUB_REKHAN, FAIL); } - void MoveInLineOfSight(Unit* pWho) + void MoveInLineOfSight(Unit* pWho) override { if (!m_bHasTaunted && pWho->GetTypeId() == TYPEID_PLAYER && m_creature->IsWithinDistInMap(pWho, 110.0f) && m_creature->IsWithinLOSInMap(pWho)) { @@ -142,7 +142,7 @@ struct MANGOS_DLL_DECL boss_anubrekhanAI : public ScriptedAI ScriptedAI::MoveInLineOfSight(pWho); } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { if (pSummoned->GetEntry() == NPC_CRYPT_GUARD) DoScriptText(EMOTE_CRYPT_GUARD, pSummoned); @@ -151,7 +151,7 @@ struct MANGOS_DLL_DECL boss_anubrekhanAI : public ScriptedAI pSummoned->AI()->AttackStart(pTarget); } - void SummonedCreatureDespawn(Creature* pSummoned) + void SummonedCreatureDespawn(Creature* pSummoned) override { // If creature despawns on out of combat, skip this if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) @@ -164,7 +164,7 @@ struct MANGOS_DLL_DECL boss_anubrekhanAI : public ScriptedAI } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { m_introDialogue.DialogueUpdate(uiDiff); diff --git a/scripts/northrend/naxxramas/boss_faerlina.cpp b/scripts/northrend/naxxramas/boss_faerlina.cpp index 90da61a11..2fbc323c8 100644 --- a/scripts/northrend/naxxramas/boss_faerlina.cpp +++ b/scripts/northrend/naxxramas/boss_faerlina.cpp @@ -67,14 +67,14 @@ struct MANGOS_DLL_DECL boss_faerlinaAI : public ScriptedAI uint32 m_uiEnrageTimer; bool m_bHasTaunted; - void Reset() + void Reset() override { m_uiPoisonBoltVolleyTimer = 8000; m_uiRainOfFireTimer = 16000; m_uiEnrageTimer = 60000; } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { switch (urand(0, 3)) { @@ -88,7 +88,7 @@ struct MANGOS_DLL_DECL boss_faerlinaAI : public ScriptedAI m_pInstance->SetData(TYPE_FAERLINA, IN_PROGRESS); } - void MoveInLineOfSight(Unit* pWho) + void MoveInLineOfSight(Unit* pWho) override { if (!m_bHasTaunted && pWho->GetTypeId() == TYPEID_PLAYER && m_creature->IsWithinDistInMap(pWho, 80.0f) && m_creature->IsWithinLOSInMap(pWho)) { @@ -99,12 +99,12 @@ struct MANGOS_DLL_DECL boss_faerlinaAI : public ScriptedAI ScriptedAI::MoveInLineOfSight(pWho); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { DoScriptText(urand(0, 1) ? SAY_SLAY_1 : SAY_SLAY_2, m_creature); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoScriptText(SAY_DEATH, m_creature); @@ -112,7 +112,7 @@ struct MANGOS_DLL_DECL boss_faerlinaAI : public ScriptedAI m_pInstance->SetData(TYPE_FAERLINA, DONE); } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_FAERLINA, FAIL); @@ -120,7 +120,7 @@ struct MANGOS_DLL_DECL boss_faerlinaAI : public ScriptedAI // Widow's Embrace prevents frenzy and poison bolt, if it removes frenzy, next frenzy is sceduled in 60s // It is likely that this _should_ be handled with some dummy aura(s) - but couldn't find any - void SpellHit(Unit* pCaster, const SpellEntry* pSpellEntry) + void SpellHit(Unit* pCaster, const SpellEntry* pSpellEntry) override { // Check if we hit with Widow's Embrave if (pSpellEntry->Id == SPELL_WIDOWS_EMBRACE || pSpellEntry->Id == SPELL_WIDOWS_EMBRACE_H) @@ -147,7 +147,7 @@ struct MANGOS_DLL_DECL boss_faerlinaAI : public ScriptedAI } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/northrend/naxxramas/boss_four_horsemen.cpp b/scripts/northrend/naxxramas/boss_four_horsemen.cpp index adf0addb6..af4c05c32 100644 --- a/scripts/northrend/naxxramas/boss_four_horsemen.cpp +++ b/scripts/northrend/naxxramas/boss_four_horsemen.cpp @@ -121,7 +121,7 @@ struct MANGOS_DLL_DECL boss_lady_blaumeuxAI : public ScriptedAI uint32 m_uiVoidZoneTimer; uint32 m_uiShadowBoltTimer; - void Reset() + void Reset() override { m_uiMarkTimer = 20000; m_uiVoidZoneTimer = 15000; @@ -129,7 +129,7 @@ struct MANGOS_DLL_DECL boss_lady_blaumeuxAI : public ScriptedAI m_bIsCornerMovement = true; } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoScriptText(SAY_BLAU_AGGRO, m_creature); @@ -141,12 +141,12 @@ struct MANGOS_DLL_DECL boss_lady_blaumeuxAI : public ScriptedAI m_pInstance->SetData(TYPE_FOUR_HORSEMEN, IN_PROGRESS); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { DoScriptText(SAY_BLAU_SLAY, m_creature); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoScriptText(SAY_BLAU_DEATH, m_creature); @@ -154,13 +154,13 @@ struct MANGOS_DLL_DECL boss_lady_blaumeuxAI : public ScriptedAI m_pInstance->SetData(TYPE_FOUR_HORSEMEN, SPECIAL); } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_FOUR_HORSEMEN, FAIL); } - void MovementInform(uint32 uiMotionType, uint32 uiPointId) + void MovementInform(uint32 uiMotionType, uint32 uiPointId) override { if (uiMotionType != POINT_MOTION_TYPE || !uiPointId) return; @@ -171,7 +171,7 @@ struct MANGOS_DLL_DECL boss_lady_blaumeuxAI : public ScriptedAI m_creature->GetMotionMaster()->MoveIdle(); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -236,14 +236,14 @@ struct MANGOS_DLL_DECL boss_rivendare_naxxAI : public ScriptedAI uint32 m_uiMarkTimer; uint32 m_uiUnholyShadowTimer; - void Reset() + void Reset() override { m_uiMarkTimer = 20000; m_uiUnholyShadowTimer = 15000; m_bIsCornerMovement = true; } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { switch (urand(0, 2)) { @@ -260,12 +260,12 @@ struct MANGOS_DLL_DECL boss_rivendare_naxxAI : public ScriptedAI m_pInstance->SetData(TYPE_FOUR_HORSEMEN, IN_PROGRESS); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { DoScriptText(urand(0, 1) ? SAY_RIVE_SLAY1 : SAY_RIVE_SLAY2, m_creature); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoScriptText(SAY_RIVE_DEATH, m_creature); @@ -273,13 +273,13 @@ struct MANGOS_DLL_DECL boss_rivendare_naxxAI : public ScriptedAI m_pInstance->SetData(TYPE_FOUR_HORSEMEN, SPECIAL); } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_FOUR_HORSEMEN, FAIL); } - void MovementInform(uint32 uiMotionType, uint32 uiPointId) + void MovementInform(uint32 uiMotionType, uint32 uiPointId) override { if (uiMotionType != POINT_MOTION_TYPE || !uiPointId) return; @@ -292,7 +292,7 @@ struct MANGOS_DLL_DECL boss_rivendare_naxxAI : public ScriptedAI m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -342,14 +342,14 @@ struct MANGOS_DLL_DECL boss_thane_korthazzAI : public ScriptedAI uint32 m_uiMarkTimer; uint32 m_uiMeteorTimer; - void Reset() + void Reset() override { m_uiMarkTimer = 20000; m_uiMeteorTimer = 30000; m_bIsCornerMovement = true; } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoScriptText(SAY_KORT_AGGRO, m_creature); @@ -361,12 +361,12 @@ struct MANGOS_DLL_DECL boss_thane_korthazzAI : public ScriptedAI m_pInstance->SetData(TYPE_FOUR_HORSEMEN, IN_PROGRESS); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { DoScriptText(SAY_KORT_SLAY, m_creature); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoScriptText(SAY_KORT_DEATH, m_creature); @@ -374,13 +374,13 @@ struct MANGOS_DLL_DECL boss_thane_korthazzAI : public ScriptedAI m_pInstance->SetData(TYPE_FOUR_HORSEMEN, SPECIAL); } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_FOUR_HORSEMEN, FAIL); } - void MovementInform(uint32 uiMotionType, uint32 uiPointId) + void MovementInform(uint32 uiMotionType, uint32 uiPointId) override { if (uiMotionType != POINT_MOTION_TYPE || !uiPointId) return; @@ -393,7 +393,7 @@ struct MANGOS_DLL_DECL boss_thane_korthazzAI : public ScriptedAI m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -444,7 +444,7 @@ struct MANGOS_DLL_DECL boss_sir_zeliekAI : public ScriptedAI uint32 m_uiHolyWrathTimer; uint32 m_uiHolyBoltTimer; - void Reset() + void Reset() override { m_uiMarkTimer = 20000; m_uiHolyWrathTimer = 12000; @@ -452,7 +452,7 @@ struct MANGOS_DLL_DECL boss_sir_zeliekAI : public ScriptedAI m_bIsCornerMovement = true; } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoScriptText(SAY_ZELI_AGGRO, m_creature); @@ -464,12 +464,12 @@ struct MANGOS_DLL_DECL boss_sir_zeliekAI : public ScriptedAI m_pInstance->SetData(TYPE_FOUR_HORSEMEN, IN_PROGRESS); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { DoScriptText(SAY_ZELI_SLAY, m_creature); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoScriptText(SAY_ZELI_DEATH, m_creature); @@ -477,13 +477,13 @@ struct MANGOS_DLL_DECL boss_sir_zeliekAI : public ScriptedAI m_pInstance->SetData(TYPE_FOUR_HORSEMEN, SPECIAL); } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_FOUR_HORSEMEN, FAIL); } - void MovementInform(uint32 uiMotionType, uint32 uiPointId) + void MovementInform(uint32 uiMotionType, uint32 uiPointId) override { if (uiMotionType != POINT_MOTION_TYPE || !uiPointId) return; @@ -494,7 +494,7 @@ struct MANGOS_DLL_DECL boss_sir_zeliekAI : public ScriptedAI m_creature->GetMotionMaster()->MoveIdle(); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/northrend/naxxramas/boss_gluth.cpp b/scripts/northrend/naxxramas/boss_gluth.cpp index edc023655..86fafd5ca 100644 --- a/scripts/northrend/naxxramas/boss_gluth.cpp +++ b/scripts/northrend/naxxramas/boss_gluth.cpp @@ -75,7 +75,7 @@ struct MANGOS_DLL_DECL boss_gluthAI : public ScriptedAI GuidList m_lZombieChowGuidList; - void Reset() + void Reset() override { m_uiMortalWoundTimer = 10000; m_uiDecimateTimer = 110000; @@ -86,19 +86,19 @@ struct MANGOS_DLL_DECL boss_gluthAI : public ScriptedAI m_uiBerserkTimer = MINUTE * 8 * IN_MILLISECONDS; } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { if (m_pInstance) m_pInstance->SetData(TYPE_GLUTH, DONE); } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { if (m_pInstance) m_pInstance->SetData(TYPE_GLUTH, IN_PROGRESS); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { // Restore 5% hp when killing a zombie if (pVictim->GetEntry() == NPC_ZOMBIE_CHOW) @@ -108,19 +108,19 @@ struct MANGOS_DLL_DECL boss_gluthAI : public ScriptedAI } } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_GLUTH, FAIL); } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { pSummoned->GetMotionMaster()->MoveFollow(m_creature, ATTACK_DISTANCE, 0); m_lZombieChowGuidList.push_back(pSummoned->GetObjectGuid()); } - void SummonedCreatureDespawn(Creature* pSummoned) + void SummonedCreatureDespawn(Creature* pSummoned) override { m_lZombieChowGuidList.remove(pSummoned->GetObjectGuid()); } @@ -152,7 +152,7 @@ struct MANGOS_DLL_DECL boss_gluthAI : public ScriptedAI } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/northrend/naxxramas/boss_gothik.cpp b/scripts/northrend/naxxramas/boss_gothik.cpp index 5decd6cfc..2b39d6104 100644 --- a/scripts/northrend/naxxramas/boss_gothik.cpp +++ b/scripts/northrend/naxxramas/boss_gothik.cpp @@ -99,7 +99,7 @@ struct MANGOS_DLL_DECL boss_gothikAI : public ScriptedAI uint32 m_uiControlZoneTimer; uint32 m_uiSpeechTimer; - void Reset() + void Reset() override { // Remove immunity m_creature->ApplySpellImmune(0, IMMUNITY_DAMAGE, SPELL_SCHOOL_MASK_ALL, false); @@ -130,7 +130,7 @@ struct MANGOS_DLL_DECL boss_gothikAI : public ScriptedAI m_lRiderSummonPosGuids.clear(); } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { if (!m_pInstance) return; @@ -177,13 +177,13 @@ struct MANGOS_DLL_DECL boss_gothikAI : public ScriptedAI return false; } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { if (pVictim->GetTypeId() == TYPEID_PLAYER) DoScriptText(SAY_KILL, m_creature); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoScriptText(SAY_DEATH, m_creature); @@ -191,7 +191,7 @@ struct MANGOS_DLL_DECL boss_gothikAI : public ScriptedAI m_pInstance->SetData(TYPE_GOTHIK, DONE); } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_GOTHIK, FAIL); @@ -262,14 +262,14 @@ struct MANGOS_DLL_DECL boss_gothikAI : public ScriptedAI } } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { m_lSummonedAddGuids.push_back(pSummoned->GetObjectGuid()); if (!IsCentralDoorClosed()) pSummoned->SetInCombatWithZone(); } - void SummonedCreatureJustDied(Creature* pSummoned) + void SummonedCreatureJustDied(Creature* pSummoned) override { m_lSummonedAddGuids.remove(pSummoned->GetObjectGuid()); @@ -290,7 +290,7 @@ struct MANGOS_DLL_DECL boss_gothikAI : public ScriptedAI } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/northrend/naxxramas/boss_grobbulus.cpp b/scripts/northrend/naxxramas/boss_grobbulus.cpp index 5cf340c9d..43c8d8fcb 100644 --- a/scripts/northrend/naxxramas/boss_grobbulus.cpp +++ b/scripts/northrend/naxxramas/boss_grobbulus.cpp @@ -65,7 +65,7 @@ struct MANGOS_DLL_DECL boss_grobbulusAI : public ScriptedAI uint32 m_uiBerserkTimer; uint32 m_uiSlimeStreamTimer; - void Reset() + void Reset() override { m_uiInjectionTimer = 12 * IN_MILLISECONDS; m_uiPoisonCloudTimer = urand(20 * IN_MILLISECONDS, 25 * IN_MILLISECONDS); @@ -75,19 +75,19 @@ struct MANGOS_DLL_DECL boss_grobbulusAI : public ScriptedAI m_uiSlimeStreamTimer = 5 * IN_MILLISECONDS; // The first few secs it is ok to be out of range } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { if (m_pInstance) m_pInstance->SetData(TYPE_GROBBULUS, IN_PROGRESS); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { if (m_pInstance) m_pInstance->SetData(TYPE_GROBBULUS, DONE); } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_GROBBULUS, FAIL); @@ -125,13 +125,13 @@ struct MANGOS_DLL_DECL boss_grobbulusAI : public ScriptedAI return false; } - void SpellHitTarget(Unit* pTarget, const SpellEntry* pSpell) + void SpellHitTarget(Unit* pTarget, const SpellEntry* pSpell) override { if ((pSpell->Id == SPELL_SLIME_SPRAY || pSpell->Id == SPELL_SLIME_SPRAY_H) && pTarget->GetTypeId() == TYPEID_PLAYER) m_creature->SummonCreature(NPC_FALLOUT_SLIME, pTarget->GetPositionX(), pTarget->GetPositionY(), pTarget->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 10 * IN_MILLISECONDS); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/northrend/naxxramas/boss_heigan.cpp b/scripts/northrend/naxxramas/boss_heigan.cpp index af97c9495..8e25adc23 100644 --- a/scripts/northrend/naxxramas/boss_heigan.cpp +++ b/scripts/northrend/naxxramas/boss_heigan.cpp @@ -82,14 +82,14 @@ struct MANGOS_DLL_DECL boss_heiganAI : public ScriptedAI m_uiPhaseTimer = m_uiPhase == PHASE_GROUND ? 90000 : 45000; } - void Reset() + void Reset() override { m_uiPhase = PHASE_GROUND; m_uiTauntTimer = urand(20000, 60000); // TODO, find information ResetPhase(); } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { switch (urand(0, 2)) { @@ -102,12 +102,12 @@ struct MANGOS_DLL_DECL boss_heiganAI : public ScriptedAI m_pInstance->SetData(TYPE_HEIGAN, IN_PROGRESS); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { DoScriptText(SAY_SLAY, m_creature); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoScriptText(SAY_DEATH, m_creature); @@ -115,13 +115,13 @@ struct MANGOS_DLL_DECL boss_heiganAI : public ScriptedAI m_pInstance->SetData(TYPE_HEIGAN, DONE); } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_HEIGAN, FAIL); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/northrend/naxxramas/boss_kelthuzad.cpp b/scripts/northrend/naxxramas/boss_kelthuzad.cpp index 22e814938..af164a83b 100644 --- a/scripts/northrend/naxxramas/boss_kelthuzad.cpp +++ b/scripts/northrend/naxxramas/boss_kelthuzad.cpp @@ -128,7 +128,7 @@ struct MANGOS_DLL_DECL boss_kelthuzadAI : public ScriptedAI GuidSet m_lIntroMobsSet; GuidSet m_lAddsSet; - void Reset() + void Reset() override { m_uiFrostBoltTimer = urand(1000, 60000); // It won't be more than a minute without cast it m_uiFrostBoltNovaTimer = 15000; // Cast every 15 seconds @@ -157,7 +157,7 @@ struct MANGOS_DLL_DECL boss_kelthuzadAI : public ScriptedAI SetCombatMovement(false); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { if (pVictim->GetTypeId() != TYPEID_PLAYER) return; @@ -166,7 +166,7 @@ struct MANGOS_DLL_DECL boss_kelthuzadAI : public ScriptedAI DoScriptText(urand(0, 1) ? SAY_SLAY1 : SAY_SLAY2, m_creature); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoScriptText(SAY_DEATH, m_creature); DespawnAdds(); @@ -175,7 +175,7 @@ struct MANGOS_DLL_DECL boss_kelthuzadAI : public ScriptedAI m_pInstance->SetData(TYPE_KELTHUZAD, DONE); } - void JustReachedHome() + void JustReachedHome() override { DespawnIntroCreatures(); DespawnAdds(); @@ -184,7 +184,7 @@ struct MANGOS_DLL_DECL boss_kelthuzadAI : public ScriptedAI m_pInstance->SetData(TYPE_KELTHUZAD, NOT_STARTED); } - void MoveInLineOfSight(Unit* pWho) + void MoveInLineOfSight(Unit* pWho) override { if (m_pInstance && m_pInstance->GetData(TYPE_KELTHUZAD) != IN_PROGRESS) return; @@ -298,7 +298,7 @@ struct MANGOS_DLL_DECL boss_kelthuzadAI : public ScriptedAI m_creature->SummonCreature(uiType, fX, fY, fZ, 0.0f, TEMPSUMMON_CORPSE_DESPAWN, 5000); } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { switch (pSummoned->GetEntry()) { @@ -335,7 +335,7 @@ struct MANGOS_DLL_DECL boss_kelthuzadAI : public ScriptedAI } } - void SummonedCreatureJustDied(Creature* pSummoned) + void SummonedCreatureJustDied(Creature* pSummoned) override { switch (pSummoned->GetEntry()) { @@ -355,13 +355,13 @@ struct MANGOS_DLL_DECL boss_kelthuzadAI : public ScriptedAI } } - void SummonedMovementInform(Creature* pSummoned, uint32 uiMotionType, uint32 uiPointId) + void SummonedMovementInform(Creature* pSummoned, uint32 uiMotionType, uint32 uiPointId) override { if (uiMotionType == POINT_MOTION_TYPE && uiPointId == 0) pSummoned->SetInCombatWithZone(); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/northrend/naxxramas/boss_loatheb.cpp b/scripts/northrend/naxxramas/boss_loatheb.cpp index b28aec6f3..7f5eb4bc7 100644 --- a/scripts/northrend/naxxramas/boss_loatheb.cpp +++ b/scripts/northrend/naxxramas/boss_loatheb.cpp @@ -60,7 +60,7 @@ struct MANGOS_DLL_DECL boss_loathebAI : public ScriptedAI uint32 m_uiBerserkTimer; uint8 m_uiNecroticAuraCount; // Used for emotes, 5min check - void Reset() + void Reset() override { m_uiDeathbloomTimer = 5000; m_uiNecroticAuraTimer = 12000; @@ -70,25 +70,25 @@ struct MANGOS_DLL_DECL boss_loathebAI : public ScriptedAI m_uiNecroticAuraCount = 0; } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { if (m_pInstance) m_pInstance->SetData(TYPE_LOATHEB, IN_PROGRESS); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { if (m_pInstance) m_pInstance->SetData(TYPE_LOATHEB, DONE); } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_LOATHEB, NOT_STARTED); } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { if (pSummoned->GetEntry() != NPC_SPORE) return; @@ -97,13 +97,13 @@ struct MANGOS_DLL_DECL boss_loathebAI : public ScriptedAI pSummoned->AddThreat(pTarget); } - void SummonedCreatureJustDied(Creature* pSummoned) + void SummonedCreatureJustDied(Creature* pSummoned) override { if (pSummoned->GetEntry() == NPC_SPORE && m_pInstance) m_pInstance->SetSpecialAchievementCriteria(TYPE_ACHIEV_SPORE_LOSER, false); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/northrend/naxxramas/boss_maexxna.cpp b/scripts/northrend/naxxramas/boss_maexxna.cpp index d5ceb0f45..27b9955fd 100644 --- a/scripts/northrend/naxxramas/boss_maexxna.cpp +++ b/scripts/northrend/naxxramas/boss_maexxna.cpp @@ -71,13 +71,13 @@ struct MANGOS_DLL_DECL npc_web_wrapAI : public ScriptedAI ObjectGuid m_victimGuid; uint32 m_uiWebWrapTimer; - void Reset() + void Reset() override { m_uiWebWrapTimer = 0; } - void MoveInLineOfSight(Unit* pWho) {} - void AttackStart(Unit* pWho) {} + void MoveInLineOfSight(Unit* pWho) override {} + void AttackStart(Unit* pWho) override {} void SetVictim(Unit* pVictim) { @@ -110,7 +110,7 @@ struct MANGOS_DLL_DECL npc_web_wrapAI : public ScriptedAI } } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { if (m_victimGuid) { @@ -122,7 +122,7 @@ struct MANGOS_DLL_DECL npc_web_wrapAI : public ScriptedAI } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (m_uiWebWrapTimer) { @@ -159,7 +159,7 @@ struct MANGOS_DLL_DECL boss_maexxnaAI : public ScriptedAI uint32 m_uiSummonSpiderlingTimer; bool m_bEnraged; - void Reset() + void Reset() override { m_uiWebWrapTimer = 15000; m_uiWebSprayTimer = 40000; @@ -169,25 +169,25 @@ struct MANGOS_DLL_DECL boss_maexxnaAI : public ScriptedAI m_bEnraged = false; } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { if (m_pInstance) m_pInstance->SetData(TYPE_MAEXXNA, IN_PROGRESS); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { if (m_pInstance) m_pInstance->SetData(TYPE_MAEXXNA, DONE); } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_MAEXXNA, FAIL); } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { if (pSummoned->GetEntry() == NPC_WEB_WRAP) { @@ -230,7 +230,7 @@ struct MANGOS_DLL_DECL boss_maexxnaAI : public ScriptedAI m_creature->SummonCreature(NPC_SPIDERLING, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 60000); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/northrend/naxxramas/boss_noth.cpp b/scripts/northrend/naxxramas/boss_noth.cpp index ef9053d03..671c22e70 100644 --- a/scripts/northrend/naxxramas/boss_noth.cpp +++ b/scripts/northrend/naxxramas/boss_noth.cpp @@ -104,7 +104,7 @@ struct MANGOS_DLL_DECL boss_nothAI : public ScriptedAI uint32 m_uiCurseTimer; uint32 m_uiSummonTimer; - void Reset() + void Reset() override { m_uiPhase = PHASE_GROUND; m_uiPhaseSub = PHASE_GROUND; @@ -115,7 +115,7 @@ struct MANGOS_DLL_DECL boss_nothAI : public ScriptedAI m_uiSummonTimer = 12000; } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { switch (urand(0, 2)) { @@ -128,17 +128,17 @@ struct MANGOS_DLL_DECL boss_nothAI : public ScriptedAI m_pInstance->SetData(TYPE_NOTH, IN_PROGRESS); } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { pSummoned->SetInCombatWithZone(); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { DoScriptText(urand(0, 1) ? SAY_SLAY1 : SAY_SLAY2, m_creature); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoScriptText(SAY_DEATH, m_creature); @@ -146,19 +146,19 @@ struct MANGOS_DLL_DECL boss_nothAI : public ScriptedAI m_pInstance->SetData(TYPE_NOTH, DONE); } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_NOTH, FAIL); } - void SpellHit(Unit* pCaster, const SpellEntry* pSpell) + void SpellHit(Unit* pCaster, const SpellEntry* pSpell) override { if (pCaster == m_creature && pSpell->Effect[EFFECT_INDEX_0] == SPELL_EFFECT_LEAP) DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_CRIPPLE : SPELL_CRIPPLE_H); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/northrend/naxxramas/boss_patchwerk.cpp b/scripts/northrend/naxxramas/boss_patchwerk.cpp index ab5b636d8..e95f95a20 100644 --- a/scripts/northrend/naxxramas/boss_patchwerk.cpp +++ b/scripts/northrend/naxxramas/boss_patchwerk.cpp @@ -59,7 +59,7 @@ struct MANGOS_DLL_DECL boss_patchwerkAI : public ScriptedAI bool m_bEnraged; bool m_bBerserk; - void Reset() + void Reset() override { m_uiHatefulStrikeTimer = 1000; // 1 second m_uiBerserkTimer = MINUTE * 6 * IN_MILLISECONDS; // 6 minutes @@ -68,7 +68,7 @@ struct MANGOS_DLL_DECL boss_patchwerkAI : public ScriptedAI m_bBerserk = false; } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { if (urand(0, 4)) return; @@ -76,7 +76,7 @@ struct MANGOS_DLL_DECL boss_patchwerkAI : public ScriptedAI DoScriptText(SAY_SLAY, m_creature); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoScriptText(SAY_DEATH, m_creature); @@ -84,7 +84,7 @@ struct MANGOS_DLL_DECL boss_patchwerkAI : public ScriptedAI m_pInstance->SetData(TYPE_PATCHWERK, DONE); } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoScriptText(urand(0, 1) ? SAY_AGGRO1 : SAY_AGGRO2, m_creature); @@ -92,7 +92,7 @@ struct MANGOS_DLL_DECL boss_patchwerkAI : public ScriptedAI m_pInstance->SetData(TYPE_PATCHWERK, IN_PROGRESS); } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_PATCHWERK, FAIL); @@ -136,7 +136,7 @@ struct MANGOS_DLL_DECL boss_patchwerkAI : public ScriptedAI DoCastSpellIfCan(pTarget, m_bIsRegularMode ? SPELL_HATEFULSTRIKE : SPELL_HATEFULSTRIKE_H); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/northrend/naxxramas/boss_razuvious.cpp b/scripts/northrend/naxxramas/boss_razuvious.cpp index 0e7c74b0f..ef60c7377 100644 --- a/scripts/northrend/naxxramas/boss_razuvious.cpp +++ b/scripts/northrend/naxxramas/boss_razuvious.cpp @@ -61,7 +61,7 @@ struct MANGOS_DLL_DECL boss_razuviousAI : public ScriptedAI uint32 m_uiJaggedKnifeTimer; uint32 m_uiCommandSoundTimer; - void Reset() + void Reset() override { m_uiUnbalancingStrikeTimer = 30000; // 30 seconds m_uiDisruptingShoutTimer = 15000; // 15 seconds @@ -69,7 +69,7 @@ struct MANGOS_DLL_DECL boss_razuviousAI : public ScriptedAI m_uiCommandSoundTimer = 40000; // 40 seconds } - void KilledUnit(Unit* Victim) + void KilledUnit(Unit* Victim) override { if (urand(0, 3)) return; @@ -81,7 +81,7 @@ struct MANGOS_DLL_DECL boss_razuviousAI : public ScriptedAI } } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoScriptText(SAY_DEATH, m_creature); @@ -91,7 +91,7 @@ struct MANGOS_DLL_DECL boss_razuviousAI : public ScriptedAI m_pInstance->SetData(TYPE_RAZUVIOUS, DONE); } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { switch (urand(0, 2)) { @@ -104,13 +104,13 @@ struct MANGOS_DLL_DECL boss_razuviousAI : public ScriptedAI m_pInstance->SetData(TYPE_RAZUVIOUS, IN_PROGRESS); } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_RAZUVIOUS, FAIL); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/northrend/naxxramas/boss_sapphiron.cpp b/scripts/northrend/naxxramas/boss_sapphiron.cpp index d566edeb8..23b553568 100644 --- a/scripts/northrend/naxxramas/boss_sapphiron.cpp +++ b/scripts/northrend/naxxramas/boss_sapphiron.cpp @@ -100,7 +100,7 @@ struct MANGOS_DLL_DECL boss_sapphironAI : public ScriptedAI uint32 m_uiIceboltCount; Phases m_Phase; - void Reset() + void Reset() override { m_uiCleaveTimer = 5000; m_uiTailSweepTimer = 12000; @@ -119,7 +119,7 @@ struct MANGOS_DLL_DECL boss_sapphironAI : public ScriptedAI // m_creature->ApplySpellMod(SPELL_FROST_AURA, SPELLMOD_DURATION, -1); } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_FROST_AURA : SPELL_FROST_AURA_H); @@ -127,19 +127,19 @@ struct MANGOS_DLL_DECL boss_sapphironAI : public ScriptedAI m_pInstance->SetData(TYPE_SAPPHIRON, IN_PROGRESS); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { if (m_pInstance) m_pInstance->SetData(TYPE_SAPPHIRON, DONE); } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_SAPPHIRON, FAIL); } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { if (pSummoned->GetEntry() == NPC_YOU_KNOW_WHO) { @@ -148,7 +148,7 @@ struct MANGOS_DLL_DECL boss_sapphironAI : public ScriptedAI } } - void MovementInform(uint32 uiType, uint32 uiPointId) + void MovementInform(uint32 uiType, uint32 uiPointId) override { if (uiType == POINT_MOTION_TYPE && m_Phase == PHASE_LIFT_OFF) { @@ -163,7 +163,7 @@ struct MANGOS_DLL_DECL boss_sapphironAI : public ScriptedAI } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/northrend/naxxramas/boss_thaddius.cpp b/scripts/northrend/naxxramas/boss_thaddius.cpp index 5cf314bff..be326c6ca 100644 --- a/scripts/northrend/naxxramas/boss_thaddius.cpp +++ b/scripts/northrend/naxxramas/boss_thaddius.cpp @@ -112,7 +112,7 @@ struct MANGOS_DLL_DECL boss_thaddiusAI : public Scripted_NoMovementAI uint32 m_uiBallLightningTimer; uint32 m_uiBerserkTimer; - void Reset() + void Reset() override { m_uiPolarityShiftTimer = 15 * IN_MILLISECONDS; m_uiChainLightningTimer = 8 * IN_MILLISECONDS; @@ -122,7 +122,7 @@ struct MANGOS_DLL_DECL boss_thaddiusAI : public Scripted_NoMovementAI m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { switch (urand(0, 2)) { @@ -135,7 +135,7 @@ struct MANGOS_DLL_DECL boss_thaddiusAI : public Scripted_NoMovementAI m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) { @@ -157,7 +157,7 @@ struct MANGOS_DLL_DECL boss_thaddiusAI : public Scripted_NoMovementAI } } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { if (pVictim->GetTypeId() != TYPEID_PLAYER) return; @@ -165,7 +165,7 @@ struct MANGOS_DLL_DECL boss_thaddiusAI : public Scripted_NoMovementAI DoScriptText(SAY_SLAY, m_creature); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoScriptText(SAY_DEATH, m_creature); @@ -184,7 +184,7 @@ struct MANGOS_DLL_DECL boss_thaddiusAI : public Scripted_NoMovementAI } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_pInstance) return; @@ -297,10 +297,10 @@ struct MANGOS_DLL_DECL npc_tesla_coilAI : public Scripted_NoMovementAI uint32 m_uiSetupTimer; uint32 m_uiOverloadTimer; - void Reset() {} - void MoveInLineOfSight(Unit* pWho) {} + void Reset() override {} + void MoveInLineOfSight(Unit* pWho) override {} - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoScriptText(EMOTE_LOSING_LINK, m_creature); } @@ -308,7 +308,7 @@ struct MANGOS_DLL_DECL npc_tesla_coilAI : public Scripted_NoMovementAI // Overwrite this function here to // * Keep Chain spells casted when evading after useless EnterCombat caused by 'buffing' the add // * To not remove the Passive spells when evading after ie killed a player - void EnterEvadeMode() + void EnterEvadeMode() override { m_creature->DeleteThreatList(); m_creature->CombatStop(); @@ -363,7 +363,7 @@ struct MANGOS_DLL_DECL npc_tesla_coilAI : public Scripted_NoMovementAI m_uiOverloadTimer = 14 * IN_MILLISECONDS; // it takes some time to overload and activate Thaddius } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { m_creature->SelectHostileTarget(); @@ -431,7 +431,7 @@ struct MANGOS_DLL_DECL boss_thaddiusAddsAI : public ScriptedAI // uint32 m_uiWarStompTimer; uint32 m_uiReviveTimer; - void Reset() + void Reset() override { m_bFakeDeath = false; m_bBothDead = false; @@ -457,7 +457,7 @@ struct MANGOS_DLL_DECL boss_thaddiusAddsAI : public ScriptedAI } } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { if (!m_pInstance) return; @@ -471,7 +471,7 @@ struct MANGOS_DLL_DECL boss_thaddiusAddsAI : public ScriptedAI } } - void JustRespawned() + void JustRespawned() override { Reset(); // Needed to reset the flags properly @@ -493,7 +493,7 @@ struct MANGOS_DLL_DECL boss_thaddiusAddsAI : public ScriptedAI } } - void JustReachedHome() + void JustReachedHome() override { if (!m_pInstance) return; @@ -537,7 +537,7 @@ struct MANGOS_DLL_DECL boss_thaddiusAddsAI : public ScriptedAI virtual void UpdateAddAI(const uint32 uiDiff) {} // Used for Add-specific spells - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (m_bBothDead) // This is the case while fighting Thaddius return; @@ -605,7 +605,7 @@ struct MANGOS_DLL_DECL boss_thaddiusAddsAI : public ScriptedAI DoMeleeAttackIfReady(); } - void DamageTaken(Unit* pKiller, uint32& uiDamage) + void DamageTaken(Unit* pKiller, uint32& uiDamage) override { if (uiDamage < m_creature->GetHealth()) return; @@ -650,24 +650,24 @@ struct MANGOS_DLL_DECL boss_stalaggAI : public boss_thaddiusAddsAI } uint32 m_uiPowerSurgeTimer; - void Reset() + void Reset() override { boss_thaddiusAddsAI::Reset(); m_uiPowerSurgeTimer = urand(10 * IN_MILLISECONDS, 15 * IN_MILLISECONDS); } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoScriptText(SAY_STAL_AGGRO, m_creature); boss_thaddiusAddsAI::Aggro(pWho); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoScriptText(SAY_STAL_DEATH, m_creature); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { if (pVictim->GetTypeId() == TYPEID_PLAYER) DoScriptText(SAY_STAL_SLAY, m_creature); @@ -703,25 +703,25 @@ struct MANGOS_DLL_DECL boss_feugenAI : public boss_thaddiusAddsAI uint32 m_uiStaticFieldTimer; uint32 m_uiMagneticPullTimer; // TODO, missing - void Reset() + void Reset() override { boss_thaddiusAddsAI::Reset(); m_uiStaticFieldTimer = urand(10 * IN_MILLISECONDS, 15 * IN_MILLISECONDS); m_uiMagneticPullTimer = 20 * IN_MILLISECONDS; } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoScriptText(SAY_FEUG_AGGRO, m_creature); boss_thaddiusAddsAI::Aggro(pWho); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoScriptText(SAY_FEUG_DEATH, m_creature); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { if (pVictim->GetTypeId() == TYPEID_PLAYER) DoScriptText(SAY_FEUG_SLAY, m_creature); diff --git a/scripts/northrend/naxxramas/naxxramas.h b/scripts/northrend/naxxramas/naxxramas.h index 86155f03a..d114eb5d8 100644 --- a/scripts/northrend/naxxramas/naxxramas.h +++ b/scripts/northrend/naxxramas/naxxramas.h @@ -208,26 +208,26 @@ class MANGOS_DLL_DECL instance_naxxramas : public ScriptedInstance instance_naxxramas(Map* pMap); ~instance_naxxramas() {} - void Initialize(); + void Initialize() override; - bool IsEncounterInProgress() const; + bool IsEncounterInProgress() const override; - void OnCreatureCreate(Creature* pCreature); - void OnObjectCreate(GameObject* pGo); + void OnCreatureCreate(Creature* pCreature) override; + void OnObjectCreate(GameObject* pGo) override; - void OnPlayerDeath(Player* pPlayer); - void OnCreatureDeath(Creature* pCreature); + void OnPlayerDeath(Player* pPlayer) override; + void OnCreatureDeath(Creature* pCreature) override; - void SetData(uint32 uiType, uint32 uiData); - uint32 GetData(uint32 uiType); + void SetData(uint32 uiType, uint32 uiData) override; + uint32 GetData(uint32 uiType) override; void SetSpecialAchievementCriteria(uint32 uiType, bool bIsMet); - bool CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/); + bool CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/) override; - const char* Save() { return m_strInstData.c_str(); } - void Load(const char* chrIn); + const char* Save() override { return m_strInstData.c_str(); } + void Load(const char* chrIn) override; - void Update(uint32 uiDiff); + void Update(uint32 uiDiff) override; // Heigan void DoTriggerHeiganTraps(Creature* pHeigan, uint32 uiAreaIndex); diff --git a/scripts/northrend/nexus/eye_of_eternity/boss_malygos.cpp b/scripts/northrend/nexus/eye_of_eternity/boss_malygos.cpp index d2dfde489..6997977bb 100644 --- a/scripts/northrend/nexus/eye_of_eternity/boss_malygos.cpp +++ b/scripts/northrend/nexus/eye_of_eternity/boss_malygos.cpp @@ -190,7 +190,7 @@ struct MANGOS_DLL_DECL boss_malygosAI : public ScriptedAI, private DialogueHelpe uint32 m_uiStaticFieldTimer; uint32 m_uiSurgeOfPowerTimer; - void Reset() + void Reset() override { m_uiPhase = PHASE_FLOOR; @@ -214,7 +214,7 @@ struct MANGOS_DLL_DECL boss_malygosAI : public ScriptedAI, private DialogueHelpe SetCombatMovement(false); } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoScriptText(SAY_AGGRO, m_creature); @@ -222,7 +222,7 @@ struct MANGOS_DLL_DECL boss_malygosAI : public ScriptedAI, private DialogueHelpe m_pInstance->SetData(TYPE_MALYGOS, IN_PROGRESS); } - void MoveInLineOfSight(Unit* pWho) + void MoveInLineOfSight(Unit* pWho) override { if (!m_bHasDoneIntro && pWho->GetTypeId() == TYPEID_PLAYER && !((Player*)pWho)->isGameMaster() && m_creature->IsWithinDistInMap(pWho, 110.0f)) { @@ -233,7 +233,7 @@ struct MANGOS_DLL_DECL boss_malygosAI : public ScriptedAI, private DialogueHelpe ScriptedAI::MoveInLineOfSight(pWho); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { uint8 uiTextId = 0; switch (m_uiPhase) @@ -259,7 +259,7 @@ struct MANGOS_DLL_DECL boss_malygosAI : public ScriptedAI, private DialogueHelpe } } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoScriptText(SAY_DEATH, m_creature); m_creature->SummonCreature(NPC_ALEXSTRASZA, aAlextraszaSpawnPos[0], aAlextraszaSpawnPos[1], aAlextraszaSpawnPos[2], aAlextraszaSpawnPos[3], TEMPSUMMON_TIMED_DESPAWN, 5 * MINUTE * IN_MILLISECONDS); @@ -268,13 +268,13 @@ struct MANGOS_DLL_DECL boss_malygosAI : public ScriptedAI, private DialogueHelpe m_pInstance->SetData(TYPE_MALYGOS, DONE); } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_MALYGOS, FAIL); } - void MovementInform(uint32 uiMoveType, uint32 uiPointId) + void MovementInform(uint32 uiMoveType, uint32 uiPointId) override { if (uiMoveType != POINT_MOTION_TYPE) return; @@ -288,7 +288,7 @@ struct MANGOS_DLL_DECL boss_malygosAI : public ScriptedAI, private DialogueHelpe } } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { switch (pSummoned->GetEntry()) { @@ -313,7 +313,7 @@ struct MANGOS_DLL_DECL boss_malygosAI : public ScriptedAI, private DialogueHelpe } } - void SummonedCreatureJustDied(Creature* pSummoned) + void SummonedCreatureJustDied(Creature* pSummoned) override { if (pSummoned->GetEntry() == NPC_NEXUS_LORD || pSummoned->GetEntry() == NPC_SCION_OF_ETERNITY) { @@ -335,14 +335,14 @@ struct MANGOS_DLL_DECL boss_malygosAI : public ScriptedAI, private DialogueHelpe } } - void SpellHit(Unit* pCaster, const SpellEntry* pSpell) + void SpellHit(Unit* pCaster, const SpellEntry* pSpell) override { // Handle yell on Power Spark hit if (pSpell->Id == SPELL_POWER_SPARK_MALYGOS && pCaster->GetEntry() == NPC_POWER_SPARK) DoScriptText(SAY_SPARK_BUFF, m_creature); } - void JustDidDialogueStep(int32 iEntry) + void JustDidDialogueStep(int32 iEntry) override { switch (iEntry) { @@ -395,7 +395,7 @@ struct MANGOS_DLL_DECL boss_malygosAI : public ScriptedAI, private DialogueHelpe } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { DialogueUpdate(uiDiff); @@ -568,12 +568,12 @@ struct MANGOS_DLL_DECL npc_power_sparkAI : public ScriptedAI { npc_power_sparkAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } - void Reset() + void Reset() override { DoCastSpellIfCan(m_creature, SPELL_POWER_SPARK_VISUAL); } - void MoveInLineOfSight(Unit* pWho) + void MoveInLineOfSight(Unit* pWho) override { if (pWho->GetEntry() == NPC_MALYGOS && m_creature->CanReachWithMeleeAttack(pWho)) { @@ -582,14 +582,14 @@ struct MANGOS_DLL_DECL npc_power_sparkAI : public ScriptedAI } } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoCastSpellIfCan(m_creature, SPELL_POWER_SPARK_PLAYERS, CAST_TRIGGERED); } - void AttackStart(Unit* pWho) { } + void AttackStart(Unit* pWho) override { } - void UpdateAI(const uint32 uiDiff) { } + void UpdateAI(const uint32 uiDiff) override { } }; CreatureAI* GetAI_npc_power_spark(Creature* pCreature) diff --git a/scripts/northrend/nexus/eye_of_eternity/eye_of_eternity.h b/scripts/northrend/nexus/eye_of_eternity/eye_of_eternity.h index 39c1556c0..60255bcb2 100644 --- a/scripts/northrend/nexus/eye_of_eternity/eye_of_eternity.h +++ b/scripts/northrend/nexus/eye_of_eternity/eye_of_eternity.h @@ -40,19 +40,19 @@ class MANGOS_DLL_DECL instance_eye_of_eternity : public ScriptedInstance, privat instance_eye_of_eternity(Map* pMap); ~instance_eye_of_eternity() {} - void Initialize(); + void Initialize() override; - bool IsEncounterInProgress() const; + bool IsEncounterInProgress() const override; - void OnCreatureCreate(Creature* pCreature); - void OnObjectCreate(GameObject* pGo); + void OnCreatureCreate(Creature* pCreature) override; + void OnObjectCreate(GameObject* pGo) override; - void SetData(uint32 uiType, uint32 uiData); + void SetData(uint32 uiType, uint32 uiData) override; void Update(uint32 uiDiff) { DialogueUpdate(uiDiff); } protected: - void JustDidDialogueStep(int32 iEntry); + void JustDidDialogueStep(int32 iEntry) override; uint32 m_uiEncounter; }; diff --git a/scripts/northrend/nexus/nexus/boss_anomalus.cpp b/scripts/northrend/nexus/nexus/boss_anomalus.cpp index e84721684..bde570657 100644 --- a/scripts/northrend/nexus/nexus/boss_anomalus.cpp +++ b/scripts/northrend/nexus/nexus/boss_anomalus.cpp @@ -75,7 +75,7 @@ struct MANGOS_DLL_DECL boss_anomalusAI : public ScriptedAI uint32 m_uiCreateRiftTimer; uint8 m_uiChaoticRiftCount; - void Reset() + void Reset() override { m_bChaoticRift = false; m_uiSparkTimer = 5000; @@ -83,7 +83,7 @@ struct MANGOS_DLL_DECL boss_anomalusAI : public ScriptedAI m_uiChaoticRiftCount = 0; } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoScriptText(SAY_AGGRO, m_creature); @@ -91,7 +91,7 @@ struct MANGOS_DLL_DECL boss_anomalusAI : public ScriptedAI m_pInstance->SetData(TYPE_ANOMALUS, IN_PROGRESS); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoScriptText(SAY_DEATH, m_creature); @@ -99,13 +99,13 @@ struct MANGOS_DLL_DECL boss_anomalusAI : public ScriptedAI m_pInstance->SetData(TYPE_ANOMALUS, DONE); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { if (urand(0, 1)) DoScriptText(SAY_KILL, m_creature); } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { if (pSummoned->GetEntry() == NPC_CHAOTIC_RIFT) { @@ -118,7 +118,7 @@ struct MANGOS_DLL_DECL boss_anomalusAI : public ScriptedAI } } - void SummonedCreatureJustDied(Creature* pSummoned) + void SummonedCreatureJustDied(Creature* pSummoned) override { if (pSummoned->GetEntry() == NPC_CHAOTIC_RIFT) { @@ -136,7 +136,7 @@ struct MANGOS_DLL_DECL boss_anomalusAI : public ScriptedAI } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim() || m_creature->HasAura(SPELL_RIFT_SHIELD)) return; @@ -196,19 +196,19 @@ struct MANGOS_DLL_DECL mob_chaotic_riftAI : public Scripted_NoMovementAI uint32 m_uiChargedRemoveTimer; - void Reset() + void Reset() override { m_uiChargedRemoveTimer = 0; } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { // Auras are applied on aggro because there are many npcs with this entry in the instance DoCastSpellIfCan(m_creature, SPELL_RIFT_AURA, CAST_TRIGGERED); DoCastSpellIfCan(m_creature, SPELL_RIFT_SUMMON_AURA, CAST_TRIGGERED); } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { if (pSummoned->GetEntry() == NPC_CRAZED_MANA_WRAITH) { @@ -217,7 +217,7 @@ struct MANGOS_DLL_DECL mob_chaotic_riftAI : public Scripted_NoMovementAI } } - void SpellHit(Unit* pCaster, const SpellEntry* pSpell) + void SpellHit(Unit* pCaster, const SpellEntry* pSpell) override { // When hit with Charge Rift cast the Charged Rift spells if (pSpell->Id == SPELL_CHARGE_RIFT) @@ -228,7 +228,7 @@ struct MANGOS_DLL_DECL mob_chaotic_riftAI : public Scripted_NoMovementAI } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/northrend/nexus/nexus/boss_keristrasza.cpp b/scripts/northrend/nexus/nexus/boss_keristrasza.cpp index 5e273a855..b10265c08 100644 --- a/scripts/northrend/nexus/nexus/boss_keristrasza.cpp +++ b/scripts/northrend/nexus/nexus/boss_keristrasza.cpp @@ -73,7 +73,7 @@ struct MANGOS_DLL_DECL boss_keristraszaAI : public ScriptedAI bool m_bIsEnraged; - void Reset() + void Reset() override { uiCrystalChainTimer = 30000; uiTailSweepTimer = urand(5000, 7500); @@ -93,7 +93,7 @@ struct MANGOS_DLL_DECL boss_keristraszaAI : public ScriptedAI } } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoScriptText(SAY_AGGRO, m_creature); @@ -103,7 +103,7 @@ struct MANGOS_DLL_DECL boss_keristraszaAI : public ScriptedAI m_pInstance->SetData(TYPE_KERISTRASZA, IN_PROGRESS); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoScriptText(SAY_DEATH, m_creature); @@ -111,13 +111,13 @@ struct MANGOS_DLL_DECL boss_keristraszaAI : public ScriptedAI m_pInstance->SetData(TYPE_KERISTRASZA, DONE); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { if (urand(0, 1)) DoScriptText(SAY_KILL, m_creature); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/northrend/nexus/nexus/boss_ormorok.cpp b/scripts/northrend/nexus/nexus/boss_ormorok.cpp index bd7e5bb21..6d001c350 100644 --- a/scripts/northrend/nexus/nexus/boss_ormorok.cpp +++ b/scripts/northrend/nexus/nexus/boss_ormorok.cpp @@ -71,7 +71,7 @@ struct MANGOS_DLL_DECL boss_ormorokAI : public ScriptedAI uint32 m_uiCrystalSpikeTimer; uint32 m_uiTanglerTimer; - void Reset() + void Reset() override { m_bIsEnraged = false; @@ -81,12 +81,12 @@ struct MANGOS_DLL_DECL boss_ormorokAI : public ScriptedAI m_uiTanglerTimer = 20000; } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoScriptText(SAY_AGGRO, m_creature); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoScriptText(SAY_DEATH, m_creature); @@ -94,19 +94,19 @@ struct MANGOS_DLL_DECL boss_ormorokAI : public ScriptedAI m_pInstance->SetData(TYPE_ORMOROK, DONE); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { if (urand(0, 1)) DoScriptText(SAY_KILL, m_creature); } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1)) pSummoned->AI()->AttackStart(pTarget); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/northrend/nexus/nexus/boss_telestra.cpp b/scripts/northrend/nexus/nexus/boss_telestra.cpp index 25290fcd9..4ec4abe3b 100644 --- a/scripts/northrend/nexus/nexus/boss_telestra.cpp +++ b/scripts/northrend/nexus/nexus/boss_telestra.cpp @@ -93,7 +93,7 @@ struct MANGOS_DLL_DECL boss_telestraAI : public ScriptedAI bool m_bCanCheckAchiev; - void Reset() + void Reset() override { m_uiPhase = PHASE_1; m_uiCloneDeadCount = 0; @@ -106,12 +106,12 @@ struct MANGOS_DLL_DECL boss_telestraAI : public ScriptedAI m_bCanCheckAchiev = false; } - void JustReachedHome() + void JustReachedHome() override { m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); } - void AttackStart(Unit* pWho) + void AttackStart(Unit* pWho) override { if (m_creature->Attack(pWho, true)) { @@ -123,7 +123,7 @@ struct MANGOS_DLL_DECL boss_telestraAI : public ScriptedAI } } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoScriptText(SAY_AGGRO, m_creature); @@ -131,7 +131,7 @@ struct MANGOS_DLL_DECL boss_telestraAI : public ScriptedAI m_pInstance->SetData(TYPE_TELESTRA, IN_PROGRESS); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoScriptText(SAY_DEATH, m_creature); @@ -139,13 +139,13 @@ struct MANGOS_DLL_DECL boss_telestraAI : public ScriptedAI m_pInstance->SetData(TYPE_TELESTRA, DONE); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { if (urand(0, 1)) DoScriptText(SAY_KILL, m_creature); } - void SpellHit(Unit* pCaster, const SpellEntry* pSpell) + void SpellHit(Unit* pCaster, const SpellEntry* pSpell) override { switch (pSpell->Id) { @@ -190,7 +190,7 @@ struct MANGOS_DLL_DECL boss_telestraAI : public ScriptedAI } } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { switch (pSummoned->GetEntry()) { @@ -200,7 +200,7 @@ struct MANGOS_DLL_DECL boss_telestraAI : public ScriptedAI } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/northrend/nexus/nexus/nexus.h b/scripts/northrend/nexus/nexus/nexus.h index 431de8acf..6038e5fa7 100644 --- a/scripts/northrend/nexus/nexus/nexus.h +++ b/scripts/northrend/nexus/nexus/nexus.h @@ -40,20 +40,20 @@ class MANGOS_DLL_DECL instance_nexus : public ScriptedInstance public: instance_nexus(Map* pMap); - void Initialize(); + void Initialize() override; - void OnObjectCreate(GameObject* pGo); - void OnCreatureCreate(Creature* pCreature); + void OnObjectCreate(GameObject* pGo) override; + void OnCreatureCreate(Creature* pCreature) override; - uint32 GetData(uint32 uiType); - void SetData(uint32 uiType, uint32 uiData); + uint32 GetData(uint32 uiType) override; + void SetData(uint32 uiType, uint32 uiData) override; void SetSpecialAchievementCriteria(uint32 uiType, bool bIsMet); - bool CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/); + bool CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/) override; - const char* Save() { return m_strInstData.c_str(); } + const char* Save() override { return m_strInstData.c_str(); } - void Load(const char* chrIn); + void Load(const char* chrIn) override; private: uint32 m_auiEncounter[MAX_ENCOUNTER]; diff --git a/scripts/northrend/nexus/oculus/boss_eregos.cpp b/scripts/northrend/nexus/oculus/boss_eregos.cpp index d073375ca..a9e9be640 100644 --- a/scripts/northrend/nexus/oculus/boss_eregos.cpp +++ b/scripts/northrend/nexus/oculus/boss_eregos.cpp @@ -71,7 +71,7 @@ struct MANGOS_DLL_DECL boss_eregosAI : public ScriptedAI uint32 m_uiSummonWhelpsTimer; float m_fHpPercent; - void Reset() + void Reset() override { m_uiArcaneBarrageTimer = 0; m_uiArcaneVolleyTimer = 20000; @@ -80,7 +80,7 @@ struct MANGOS_DLL_DECL boss_eregosAI : public ScriptedAI m_fHpPercent = 60.0f; } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoScriptText(SAY_AGGRO, m_creature); @@ -88,7 +88,7 @@ struct MANGOS_DLL_DECL boss_eregosAI : public ScriptedAI m_pInstance->SetData(TYPE_EREGOS, IN_PROGRESS); } - void AttackStart(Unit* pWho) + void AttackStart(Unit* pWho) override { if (m_creature->Attack(pWho, false)) { @@ -99,7 +99,7 @@ struct MANGOS_DLL_DECL boss_eregosAI : public ScriptedAI } } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { switch (urand(0, 2)) { @@ -109,7 +109,7 @@ struct MANGOS_DLL_DECL boss_eregosAI : public ScriptedAI } } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoScriptText(SAY_DEATH, m_creature); @@ -117,13 +117,13 @@ struct MANGOS_DLL_DECL boss_eregosAI : public ScriptedAI m_pInstance->SetData(TYPE_EREGOS, DONE); } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_EREGOS, FAIL); } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { if (pSummoned->GetEntry() == NPC_PLANAR_ANOMALY) { @@ -140,13 +140,13 @@ struct MANGOS_DLL_DECL boss_eregosAI : public ScriptedAI } } - void SummonedCreatureDespawn(Creature* pSummoned) + void SummonedCreatureDespawn(Creature* pSummoned) override { if (pSummoned->GetEntry() == NPC_PLANAR_ANOMALY) pSummoned->CastSpell(pSummoned, SPELL_PLANAR_BLAST, true); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/northrend/nexus/oculus/boss_urom.cpp b/scripts/northrend/nexus/oculus/boss_urom.cpp index 7a5148599..ab7508edd 100644 --- a/scripts/northrend/nexus/oculus/boss_urom.cpp +++ b/scripts/northrend/nexus/oculus/boss_urom.cpp @@ -106,7 +106,7 @@ struct MANGOS_DLL_DECL boss_uromAI : public ScriptedAI std::vector m_vuiTrashPacksIds; - void Reset() + void Reset() override { m_bIsPlatformPhase = true; m_uiPlatformPhase = 0; @@ -127,13 +127,13 @@ struct MANGOS_DLL_DECL boss_uromAI : public ScriptedAI m_uiArcaneShieldTimer = 1000; } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { if (m_pInstance) m_pInstance->SetData(TYPE_UROM, IN_PROGRESS); } - void AttackStart(Unit* pWho) + void AttackStart(Unit* pWho) override { if (m_uiPlatformPhase < MAX_PLATFORMS) { @@ -174,7 +174,7 @@ struct MANGOS_DLL_DECL boss_uromAI : public ScriptedAI } } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { switch (urand(0, 2)) { @@ -184,7 +184,7 @@ struct MANGOS_DLL_DECL boss_uromAI : public ScriptedAI } } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoScriptText(SAY_DEATH, m_creature); @@ -192,13 +192,13 @@ struct MANGOS_DLL_DECL boss_uromAI : public ScriptedAI m_pInstance->SetData(TYPE_UROM, DONE); } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_UROM, FAIL); } - void EnterEvadeMode() + void EnterEvadeMode() override { // Don't evade while casting explosion if (m_uiExplosionExpireTimer) @@ -218,7 +218,7 @@ struct MANGOS_DLL_DECL boss_uromAI : public ScriptedAI ScriptedAI::EnterEvadeMode(); } - void JustSummoned(Creature* pSummon) + void JustSummoned(Creature* pSummon) override { if (Unit* pTarget = m_creature->GetMap()->GetUnit(m_attackTarget)) pSummon->AI()->AttackStart(pTarget); @@ -241,7 +241,7 @@ struct MANGOS_DLL_DECL boss_uromAI : public ScriptedAI m_creature->SummonCreature(uiEntry, fX, fY, fZ, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); } - void SpellHit(Unit* pCaster, const SpellEntry* pSpell) + void SpellHit(Unit* pCaster, const SpellEntry* pSpell) override { switch (pSpell->Id) { @@ -254,7 +254,7 @@ struct MANGOS_DLL_DECL boss_uromAI : public ScriptedAI } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { // Set the Arcane Shield on out of combat timer if (m_uiArcaneShieldTimer) diff --git a/scripts/northrend/nexus/oculus/oculus.h b/scripts/northrend/nexus/oculus/oculus.h index a65e79cca..bcc58f4c4 100644 --- a/scripts/northrend/nexus/oculus/oculus.h +++ b/scripts/northrend/nexus/oculus/oculus.h @@ -65,21 +65,21 @@ class MANGOS_DLL_DECL instance_oculus : public ScriptedInstance public: instance_oculus(Map* pMap); - void Initialize(); + void Initialize() override; - void OnPlayerEnter(Player* pPlayer); - void OnCreatureCreate(Creature* pCreature); - void OnObjectCreate(GameObject* pGo); + void OnPlayerEnter(Player* pPlayer) override; + void OnCreatureCreate(Creature* pCreature) override; + void OnObjectCreate(GameObject* pGo) override; - void OnCreatureEnterCombat(Creature* pCreature); + void OnCreatureEnterCombat(Creature* pCreature) override; void OnCreatureEvade(Creature* pCreature); - void OnCreatureDeath(Creature* pCreature); + void OnCreatureDeath(Creature* pCreature) override; - void SetData(uint32 uiType, uint32 uiData); - uint32 GetData(uint32 uiType); + void SetData(uint32 uiType, uint32 uiData) override; + uint32 GetData(uint32 uiType) override; - const char* Save() { return strInstData.c_str(); } - void Load(const char* chrIn); + const char* Save() override { return strInstData.c_str(); } + void Load(const char* chrIn) override; protected: void DoSpawnNextBossIfCan(); diff --git a/scripts/northrend/obsidian_sanctum/boss_sartharion.cpp b/scripts/northrend/obsidian_sanctum/boss_sartharion.cpp index 4b33ca5c9..f9226db68 100644 --- a/scripts/northrend/obsidian_sanctum/boss_sartharion.cpp +++ b/scripts/northrend/obsidian_sanctum/boss_sartharion.cpp @@ -192,7 +192,7 @@ struct MANGOS_DLL_DECL boss_sartharionAI : public ScriptedAI bool m_bHasCalledShadron; bool m_bHasCalledVesperon; - void Reset() + void Reset() override { m_bIsBerserk = false; m_bIsSoftEnraged = false; @@ -218,13 +218,13 @@ struct MANGOS_DLL_DECL boss_sartharionAI : public ScriptedAI m_creature->RemoveAurasDueToSpell(SPELL_TWILIGHT_REVENGE); } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_SARTHARION_EVENT, FAIL); } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoScriptText(SAY_SARTHARION_AGGRO, m_creature); @@ -235,7 +235,7 @@ struct MANGOS_DLL_DECL boss_sartharionAI : public ScriptedAI } } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoScriptText(SAY_SARTHARION_DEATH, m_creature); @@ -243,7 +243,7 @@ struct MANGOS_DLL_DECL boss_sartharionAI : public ScriptedAI m_pInstance->SetData(TYPE_SARTHARION_EVENT, DONE); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { switch (urand(0, 2)) { @@ -352,7 +352,7 @@ struct MANGOS_DLL_DECL boss_sartharionAI : public ScriptedAI } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { // Return since we have no target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) @@ -533,7 +533,7 @@ struct MANGOS_DLL_DECL dummy_dragonAI : public ScriptedAI int32 m_iPortalRespawnTime; bool m_bCanMoveFree; - void Reset() + void Reset() override { if (m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE)) m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); @@ -544,7 +544,7 @@ struct MANGOS_DLL_DECL dummy_dragonAI : public ScriptedAI m_bCanMoveFree = false; } - void MovementInform(uint32 uiType, uint32 uiPointId) + void MovementInform(uint32 uiType, uint32 uiPointId) override { if (!m_pInstance || uiType != POINT_MOTION_TYPE) return; @@ -655,7 +655,7 @@ struct MANGOS_DLL_DECL dummy_dragonAI : public ScriptedAI } } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { int32 iTextId = 0; uint32 uiSpellId = 0; @@ -695,7 +695,7 @@ struct MANGOS_DLL_DECL dummy_dragonAI : public ScriptedAI } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (m_bCanMoveFree && m_uiMoveNextTimer) { @@ -725,25 +725,25 @@ struct MANGOS_DLL_DECL mob_tenebronAI : public dummy_dragonAI uint32 m_uiShadowFissureTimer; uint32 m_uiHatchEggTimer; - void Reset() + void Reset() override { m_uiShadowBreathTimer = 20000; m_uiShadowFissureTimer = 5000; m_uiHatchEggTimer = 30000; } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoScriptText(SAY_TENEBRON_AGGRO, m_creature); DoCastSpellIfCan(m_creature, SPELL_POWER_OF_TENEBRON); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { DoScriptText(urand(0, 1) ? SAY_TENEBRON_SLAY_1 : SAY_TENEBRON_SLAY_2, m_creature); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { // if no target, update dummy and return if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) @@ -794,7 +794,7 @@ struct MANGOS_DLL_DECL mob_shadronAI : public dummy_dragonAI uint32 m_uiShadowFissureTimer; uint32 m_uiAcolyteShadronTimer; - void Reset() + void Reset() override { m_uiShadowBreathTimer = 20000; m_uiShadowFissureTimer = 5000; @@ -807,18 +807,18 @@ struct MANGOS_DLL_DECL mob_shadronAI : public dummy_dragonAI m_creature->RemoveAurasDueToSpell(SPELL_GIFT_OF_TWILIGTH_SHA); } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoScriptText(SAY_SHADRON_AGGRO, m_creature); DoCastSpellIfCan(m_creature, SPELL_POWER_OF_SHADRON); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { DoScriptText(urand(0, 1) ? SAY_SHADRON_SLAY_1 : SAY_SHADRON_SLAY_2, m_creature); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { // if no target, update dummy and return if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) @@ -869,25 +869,25 @@ struct MANGOS_DLL_DECL mob_vesperonAI : public dummy_dragonAI uint32 m_uiShadowFissureTimer; uint32 m_uiAcolyteVesperonTimer; - void Reset() + void Reset() override { m_uiShadowBreathTimer = 20000; m_uiShadowFissureTimer = 5000; m_uiAcolyteVesperonTimer = 60000; } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoScriptText(SAY_VESPERON_AGGRO, m_creature); DoCastSpellIfCan(m_creature, SPELL_POWER_OF_VESPERON); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { DoScriptText(urand(0, 1) ? SAY_VESPERON_SLAY_1 : SAY_VESPERON_SLAY_2, m_creature); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { // if no target, update dummy and return if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) @@ -940,7 +940,7 @@ struct MANGOS_DLL_DECL mob_acolyte_of_shadronAI : public ScriptedAI ScriptedInstance* m_pInstance; - void Reset() + void Reset() override { if (m_pInstance) { @@ -952,7 +952,7 @@ struct MANGOS_DLL_DECL mob_acolyte_of_shadronAI : public ScriptedAI } } - void JustDied(Unit* killer) + void JustDied(Unit* killer) override { if (m_pInstance) { @@ -977,7 +977,7 @@ struct MANGOS_DLL_DECL mob_acolyte_of_shadronAI : public ScriptedAI } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -1005,12 +1005,12 @@ struct MANGOS_DLL_DECL mob_acolyte_of_vesperonAI : public ScriptedAI ScriptedInstance* m_pInstance; - void Reset() + void Reset() override { DoCastSpellIfCan(m_creature, SPELL_TWILIGHT_TORMENT_VESP_ACO); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { // remove twilight torment on Vesperon if (m_pInstance) @@ -1022,7 +1022,7 @@ struct MANGOS_DLL_DECL mob_acolyte_of_vesperonAI : public ScriptedAI } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -1044,12 +1044,12 @@ struct MANGOS_DLL_DECL mob_twilight_eggsAI : public ScriptedAI { mob_twilight_eggsAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } - void Reset() + void Reset() override { } - void AttackStart(Unit* pWho) { } - void MoveInLineOfSight(Unit* pWho) { } + void AttackStart(Unit* pWho) override { } + void MoveInLineOfSight(Unit* pWho) override { } }; CreatureAI* GetAI_mob_twilight_eggs(Creature* pCreature) @@ -1067,12 +1067,12 @@ struct MANGOS_DLL_DECL mob_twilight_whelpAI : public ScriptedAI uint32 m_uiFadeArmorTimer; - void Reset() + void Reset() override { m_uiFadeArmorTimer = 1000; } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { // Return since we have no target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) diff --git a/scripts/northrend/obsidian_sanctum/obsidian_sanctum.h b/scripts/northrend/obsidian_sanctum/obsidian_sanctum.h index 1c740bfe1..8e0d2541c 100644 --- a/scripts/northrend/obsidian_sanctum/obsidian_sanctum.h +++ b/scripts/northrend/obsidian_sanctum/obsidian_sanctum.h @@ -36,14 +36,14 @@ class MANGOS_DLL_DECL instance_obsidian_sanctum : public ScriptedInstance public: instance_obsidian_sanctum(Map* pMap); - void Initialize(); + void Initialize() override; - void OnCreatureCreate(Creature* pCreature); + void OnCreatureCreate(Creature* pCreature) override; - void SetData(uint32 uiType, uint32 uiData); - uint32 GetData(uint32 uiType); + void SetData(uint32 uiType, uint32 uiData) override; + uint32 GetData(uint32 uiType) override; - bool CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/); + bool CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/) override; private: uint32 m_auiEncounter[MAX_ENCOUNTER]; diff --git a/scripts/northrend/ruby_sanctum/boss_baltharus.cpp b/scripts/northrend/ruby_sanctum/boss_baltharus.cpp index a1431721a..20401177e 100644 --- a/scripts/northrend/ruby_sanctum/boss_baltharus.cpp +++ b/scripts/northrend/ruby_sanctum/boss_baltharus.cpp @@ -71,11 +71,11 @@ struct MANGOS_DLL_DECL boss_baltharusAI : public ScriptedAI, private DialogueHel bool m_bHasDoneIntro; - void Reset() + void Reset() override { } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoScriptText(SAY_AGGRO, m_creature); @@ -83,7 +83,7 @@ struct MANGOS_DLL_DECL boss_baltharusAI : public ScriptedAI, private DialogueHel m_pInstance->SetData(TYPE_BALTHARUS, IN_PROGRESS); } - void MoveInLineOfSight(Unit* pWho) + void MoveInLineOfSight(Unit* pWho) override { if (!m_bHasDoneIntro && pWho->GetTypeId() == TYPEID_PLAYER && !((Player*)pWho)->isGameMaster()) { @@ -94,7 +94,7 @@ struct MANGOS_DLL_DECL boss_baltharusAI : public ScriptedAI, private DialogueHel ScriptedAI::MoveInLineOfSight(pWho); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { if (pVictim->GetTypeId() != TYPEID_PLAYER) return; @@ -103,7 +103,7 @@ struct MANGOS_DLL_DECL boss_baltharusAI : public ScriptedAI, private DialogueHel DoScriptText(urand(0, 1) ? SAY_SLAY_1 : SAY_SLAY_2, m_creature); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoScriptText(SAY_DEATH, m_creature); @@ -111,13 +111,13 @@ struct MANGOS_DLL_DECL boss_baltharusAI : public ScriptedAI, private DialogueHel m_pInstance->SetData(TYPE_BALTHARUS, DONE); } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_BALTHARUS, FAIL); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { DialogueUpdate(uiDiff); diff --git a/scripts/northrend/ruby_sanctum/boss_saviana.cpp b/scripts/northrend/ruby_sanctum/boss_saviana.cpp index cd72b996d..e778bf2ec 100644 --- a/scripts/northrend/ruby_sanctum/boss_saviana.cpp +++ b/scripts/northrend/ruby_sanctum/boss_saviana.cpp @@ -43,11 +43,11 @@ struct MANGOS_DLL_DECL boss_savianaAI : public ScriptedAI instance_ruby_sanctum* m_pInstance; - void Reset() + void Reset() override { } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoScriptText(SAY_AGGRO, m_creature); @@ -55,7 +55,7 @@ struct MANGOS_DLL_DECL boss_savianaAI : public ScriptedAI m_pInstance->SetData(TYPE_SAVIANA, IN_PROGRESS); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { if (pVictim->GetTypeId() != TYPEID_PLAYER) return; @@ -64,7 +64,7 @@ struct MANGOS_DLL_DECL boss_savianaAI : public ScriptedAI DoScriptText(urand(0, 1) ? SAY_SLAY_1 : SAY_SLAY_2, m_creature); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoPlaySoundToSet(m_creature, SOUND_DEATH); @@ -72,13 +72,13 @@ struct MANGOS_DLL_DECL boss_savianaAI : public ScriptedAI m_pInstance->SetData(TYPE_SAVIANA, DONE); } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_SAVIANA, FAIL); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/northrend/ruby_sanctum/boss_zarithrian.cpp b/scripts/northrend/ruby_sanctum/boss_zarithrian.cpp index 5e18c9fbc..d85a334cb 100644 --- a/scripts/northrend/ruby_sanctum/boss_zarithrian.cpp +++ b/scripts/northrend/ruby_sanctum/boss_zarithrian.cpp @@ -43,11 +43,11 @@ struct MANGOS_DLL_DECL boss_zarithrianAI : public ScriptedAI instance_ruby_sanctum* m_pInstance; - void Reset() + void Reset() override { } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoScriptText(SAY_AGGRO, m_creature); @@ -55,7 +55,7 @@ struct MANGOS_DLL_DECL boss_zarithrianAI : public ScriptedAI m_pInstance->SetData(TYPE_ZARITHRIAN, IN_PROGRESS); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { if (pVictim->GetTypeId() != TYPEID_PLAYER) return; @@ -64,7 +64,7 @@ struct MANGOS_DLL_DECL boss_zarithrianAI : public ScriptedAI DoScriptText(urand(0, 1) ? SAY_SLAY_1 : SAY_SLAY_2, m_creature); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoScriptText(SAY_DEATH, m_creature); @@ -72,13 +72,13 @@ struct MANGOS_DLL_DECL boss_zarithrianAI : public ScriptedAI m_pInstance->SetData(TYPE_ZARITHRIAN, DONE); } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_ZARITHRIAN, FAIL); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/northrend/ruby_sanctum/ruby_sanctum.h b/scripts/northrend/ruby_sanctum/ruby_sanctum.h index 6dc9df727..740590d5c 100644 --- a/scripts/northrend/ruby_sanctum/ruby_sanctum.h +++ b/scripts/northrend/ruby_sanctum/ruby_sanctum.h @@ -59,20 +59,20 @@ class MANGOS_DLL_DECL instance_ruby_sanctum : public ScriptedInstance public: instance_ruby_sanctum(Map* pMap); - void Initialize(); - bool IsEncounterInProgress() const; + void Initialize() override; + bool IsEncounterInProgress() const override; - void OnPlayerEnter(Player* pPlayer); - void OnCreatureCreate(Creature* pCreature); - void OnObjectCreate(GameObject* pGo); + void OnPlayerEnter(Player* pPlayer) override; + void OnCreatureCreate(Creature* pCreature) override; + void OnObjectCreate(GameObject* pGo) override; - void SetData(uint32 uiType, uint32 uiData); - uint32 GetData(uint32 uiType); + void SetData(uint32 uiType, uint32 uiData) override; + uint32 GetData(uint32 uiType) override; - void Update(uint32 uiDiff); + void Update(uint32 uiDiff) override; - const char* Save() { return strInstData.c_str(); } - void Load(const char* chrIn); + const char* Save() override { return strInstData.c_str(); } + void Load(const char* chrIn) override; protected: void DoHandleZarithrianDoor(); diff --git a/scripts/northrend/sholazar_basin.cpp b/scripts/northrend/sholazar_basin.cpp index bf37a4a4c..3948c7334 100644 --- a/scripts/northrend/sholazar_basin.cpp +++ b/scripts/northrend/sholazar_basin.cpp @@ -64,11 +64,11 @@ struct MANGOS_DLL_DECL npc_heliceAI : public npc_escortAI uint32 m_uiExplodePhase; bool m_bFirstBarrel; - void Reset() + void Reset() override { } - void WaypointReached(uint32 uiPointId) + void WaypointReached(uint32 uiPointId) override { switch (uiPointId) { @@ -102,7 +102,7 @@ struct MANGOS_DLL_DECL npc_heliceAI : public npc_escortAI } } - void UpdateEscortAI(const uint32 uiDiff) + void UpdateEscortAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) { @@ -222,9 +222,9 @@ struct MANGOS_DLL_DECL npc_injured_rainspeakerAI : public npc_escortAI { npc_injured_rainspeakerAI(Creature* pCreature) : npc_escortAI(pCreature) { Reset(); } - void Reset() { } + void Reset() override { } - void JustStartedEscort() + void JustStartedEscort() override { if (Player* pPlayer = GetPlayerForEscort()) { @@ -233,7 +233,7 @@ struct MANGOS_DLL_DECL npc_injured_rainspeakerAI : public npc_escortAI } } - void WaypointReached(uint32 uiPointId) + void WaypointReached(uint32 uiPointId) override { switch (uiPointId) { @@ -263,7 +263,7 @@ struct MANGOS_DLL_DECL npc_injured_rainspeakerAI : public npc_escortAI } } - void UpdateEscortAI(const uint32 uiDiff) + void UpdateEscortAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/northrend/ulduar/halls_of_lightning/boss_bjarngrim.cpp b/scripts/northrend/ulduar/halls_of_lightning/boss_bjarngrim.cpp index 09a23b9b9..6093b9d74 100644 --- a/scripts/northrend/ulduar/halls_of_lightning/boss_bjarngrim.cpp +++ b/scripts/northrend/ulduar/halls_of_lightning/boss_bjarngrim.cpp @@ -107,7 +107,7 @@ struct MANGOS_DLL_DECL boss_bjarngrimAI : public ScriptedAI ObjectGuid m_aStormforgedLieutenantGuid[2]; // TODO - not filled yet. - void Reset() + void Reset() override { m_bIsChangingStance = false; @@ -147,7 +147,7 @@ struct MANGOS_DLL_DECL boss_bjarngrimAI : public ScriptedAI m_pInstance->SetData(TYPE_BJARNGRIM, NOT_STARTED); } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoScriptText(SAY_AGGRO, m_creature); @@ -155,7 +155,7 @@ struct MANGOS_DLL_DECL boss_bjarngrimAI : public ScriptedAI m_pInstance->SetData(TYPE_BJARNGRIM, IN_PROGRESS); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { switch (urand(0, 2)) { @@ -165,7 +165,7 @@ struct MANGOS_DLL_DECL boss_bjarngrimAI : public ScriptedAI } } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoScriptText(SAY_DEATH, m_creature); @@ -173,7 +173,7 @@ struct MANGOS_DLL_DECL boss_bjarngrimAI : public ScriptedAI m_pInstance->SetData(TYPE_BJARNGRIM, DONE); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { // Return since we have no target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) @@ -330,13 +330,13 @@ struct MANGOS_DLL_DECL mob_stormforged_lieutenantAI : public ScriptedAI uint32 m_uiArcWeld_Timer; uint32 m_uiRenewSteel_Timer; - void Reset() + void Reset() override { m_uiArcWeld_Timer = urand(20000, 21000); m_uiRenewSteel_Timer = urand(10000, 11000); } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { if (m_pInstance) { @@ -348,7 +348,7 @@ struct MANGOS_DLL_DECL mob_stormforged_lieutenantAI : public ScriptedAI } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { // Return since we have no target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) diff --git a/scripts/northrend/ulduar/halls_of_lightning/boss_ionar.cpp b/scripts/northrend/ulduar/halls_of_lightning/boss_ionar.cpp index f89808b28..85566912c 100644 --- a/scripts/northrend/ulduar/halls_of_lightning/boss_ionar.cpp +++ b/scripts/northrend/ulduar/halls_of_lightning/boss_ionar.cpp @@ -82,7 +82,7 @@ struct MANGOS_DLL_DECL boss_ionarAI : public ScriptedAI uint32 m_uiHealthAmountModifier; - void Reset() + void Reset() override { m_bIsSplitPhase = true; m_bIsDesperseCasting = false; @@ -98,7 +98,7 @@ struct MANGOS_DLL_DECL boss_ionarAI : public ScriptedAI m_creature->SetVisibility(VISIBILITY_ON); } - void AttackedBy(Unit* pAttacker) + void AttackedBy(Unit* pAttacker) override { if (m_creature->getVictim()) return; @@ -109,7 +109,7 @@ struct MANGOS_DLL_DECL boss_ionarAI : public ScriptedAI AttackStart(pAttacker); } - void Aggro(Unit* who) + void Aggro(Unit* who) override { DoScriptText(SAY_AGGRO, m_creature); @@ -117,7 +117,7 @@ struct MANGOS_DLL_DECL boss_ionarAI : public ScriptedAI m_pInstance->SetData(TYPE_IONAR, IN_PROGRESS); } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_IONAR, FAIL); @@ -125,7 +125,7 @@ struct MANGOS_DLL_DECL boss_ionarAI : public ScriptedAI DespawnSpark(); } - void AttackStart(Unit* pWho) + void AttackStart(Unit* pWho) override { if (m_creature->Attack(pWho, true)) { @@ -138,7 +138,7 @@ struct MANGOS_DLL_DECL boss_ionarAI : public ScriptedAI } } - void JustDied(Unit* killer) + void JustDied(Unit* killer) override { DoScriptText(SAY_DEATH, m_creature); DespawnSpark(); @@ -147,7 +147,7 @@ struct MANGOS_DLL_DECL boss_ionarAI : public ScriptedAI m_pInstance->SetData(TYPE_IONAR, DONE); } - void KilledUnit(Unit* victim) + void KilledUnit(Unit* victim) override { switch (urand(0, 2)) { @@ -195,7 +195,7 @@ struct MANGOS_DLL_DECL boss_ionarAI : public ScriptedAI ++m_uiSparkAtHomeCount; } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { if (pSummoned->GetEntry() == NPC_SPARK_OF_IONAR) { @@ -208,7 +208,7 @@ struct MANGOS_DLL_DECL boss_ionarAI : public ScriptedAI } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -340,9 +340,9 @@ struct MANGOS_DLL_DECL mob_spark_of_ionarAI : public ScriptedAI ScriptedInstance* m_pInstance; - void Reset() { } + void Reset() override { } - void MovementInform(uint32 uiType, uint32 uiPointId) + void MovementInform(uint32 uiType, uint32 uiPointId) override { if (uiType != POINT_MOTION_TYPE || !m_pInstance) return; diff --git a/scripts/northrend/ulduar/halls_of_lightning/boss_loken.cpp b/scripts/northrend/ulduar/halls_of_lightning/boss_loken.cpp index 4a7d895d7..c6efe2c09 100644 --- a/scripts/northrend/ulduar/halls_of_lightning/boss_loken.cpp +++ b/scripts/northrend/ulduar/halls_of_lightning/boss_loken.cpp @@ -75,7 +75,7 @@ struct MANGOS_DLL_DECL boss_lokenAI : public ScriptedAI uint32 m_uiHealthAmountModifier; - void Reset() + void Reset() override { m_bIsAura = false; @@ -90,7 +90,7 @@ struct MANGOS_DLL_DECL boss_lokenAI : public ScriptedAI m_pInstance->SetData(TYPE_LOKEN, NOT_STARTED); } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoScriptText(SAY_AGGRO, m_creature); @@ -98,7 +98,7 @@ struct MANGOS_DLL_DECL boss_lokenAI : public ScriptedAI m_pInstance->SetData(TYPE_LOKEN, IN_PROGRESS); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoScriptText(SAY_DEATH, m_creature); @@ -106,7 +106,7 @@ struct MANGOS_DLL_DECL boss_lokenAI : public ScriptedAI m_pInstance->SetData(TYPE_LOKEN, DONE); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { switch (urand(0, 2)) { @@ -116,7 +116,7 @@ struct MANGOS_DLL_DECL boss_lokenAI : public ScriptedAI } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { // Return since we have no target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) diff --git a/scripts/northrend/ulduar/halls_of_lightning/boss_volkhan.cpp b/scripts/northrend/ulduar/halls_of_lightning/boss_volkhan.cpp index 9c2be1f52..96c5744c4 100644 --- a/scripts/northrend/ulduar/halls_of_lightning/boss_volkhan.cpp +++ b/scripts/northrend/ulduar/halls_of_lightning/boss_volkhan.cpp @@ -88,7 +88,7 @@ struct MANGOS_DLL_DECL boss_volkhanAI : public ScriptedAI uint32 m_uiHeatTimer; uint32 m_uiTemperTimer; - void Reset() + void Reset() override { m_bHasShattered = false; @@ -97,7 +97,7 @@ struct MANGOS_DLL_DECL boss_volkhanAI : public ScriptedAI m_uiTemperTimer = 10000; } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoScriptText(SAY_AGGRO, m_creature); @@ -105,7 +105,7 @@ struct MANGOS_DLL_DECL boss_volkhanAI : public ScriptedAI m_pInstance->SetData(TYPE_VOLKHAN, IN_PROGRESS); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoScriptText(SAY_DEATH, m_creature); DespawnGolems(); @@ -114,7 +114,7 @@ struct MANGOS_DLL_DECL boss_volkhanAI : public ScriptedAI m_pInstance->SetData(TYPE_VOLKHAN, DONE); } - void JustReachedHome() + void JustReachedHome() override { DespawnGolems(); @@ -122,7 +122,7 @@ struct MANGOS_DLL_DECL boss_volkhanAI : public ScriptedAI m_pInstance->SetData(TYPE_VOLKHAN, FAIL); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { switch (urand(0, 2)) { @@ -175,7 +175,7 @@ struct MANGOS_DLL_DECL boss_volkhanAI : public ScriptedAI } } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { if (pSummoned->GetEntry() == NPC_MOLTEN_GOLEM) { @@ -186,7 +186,7 @@ struct MANGOS_DLL_DECL boss_volkhanAI : public ScriptedAI } } - void MovementInform(uint32 uiMoveType, uint32 uiPointId) + void MovementInform(uint32 uiMoveType, uint32 uiPointId) override { if (uiMoveType != POINT_MOTION_TYPE || !uiPointId) return; @@ -195,7 +195,7 @@ struct MANGOS_DLL_DECL boss_volkhanAI : public ScriptedAI SetCombatMovement(true); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { // Return since we have no target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) @@ -335,13 +335,13 @@ struct MANGOS_DLL_DECL mob_molten_golemAI : public ScriptedAI uint32 m_uiBlastTimer; uint32 m_uiImmolationTimer; - void Reset() + void Reset() override { m_uiBlastTimer = 20000; m_uiImmolationTimer = 5000; } - void EnterEvadeMode() + void EnterEvadeMode() override { // Evade but keep the current location m_creature->RemoveAllAuras(); @@ -356,7 +356,7 @@ struct MANGOS_DLL_DECL mob_molten_golemAI : public ScriptedAI m_creature->UpdateEntry(NPC_BRITTLE_GOLEM); } - void DamageTaken(Unit* pDoneBy, uint32& uiDamage) + void DamageTaken(Unit* pDoneBy, uint32& uiDamage) override { // Transform intro Brittle when damaged to 0 HP if (uiDamage >= m_creature->GetHealth()) @@ -370,7 +370,7 @@ struct MANGOS_DLL_DECL mob_molten_golemAI : public ScriptedAI } } - void SpellHit(Unit* pCaster, const SpellEntry* pSpell) + void SpellHit(Unit* pCaster, const SpellEntry* pSpell) override { // This is the dummy effect of the spells - Note: should be handled as a dummy effect in core if (pSpell->Id == SPELL_SHATTER || pSpell->Id == SPELL_SHATTER_H) @@ -380,7 +380,7 @@ struct MANGOS_DLL_DECL mob_molten_golemAI : public ScriptedAI } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { // Return since we have no target or if we are frozen if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) diff --git a/scripts/northrend/ulduar/halls_of_lightning/halls_of_lightning.h b/scripts/northrend/ulduar/halls_of_lightning/halls_of_lightning.h index e560f4949..49dddba04 100644 --- a/scripts/northrend/ulduar/halls_of_lightning/halls_of_lightning.h +++ b/scripts/northrend/ulduar/halls_of_lightning/halls_of_lightning.h @@ -35,18 +35,18 @@ class MANGOS_DLL_DECL instance_halls_of_lightning : public ScriptedInstance public: instance_halls_of_lightning(Map* pMap); - void Initialize(); + void Initialize() override; - void OnCreatureCreate(Creature* pCreature); - void OnObjectCreate(GameObject* pGo); + void OnCreatureCreate(Creature* pCreature) override; + void OnObjectCreate(GameObject* pGo) override; - void SetData(uint32 uiType, uint32 uiData); - uint32 GetData(uint32 uiType); + void SetData(uint32 uiType, uint32 uiData) override; + uint32 GetData(uint32 uiType) override; - bool CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/); + bool CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/) override; - const char* Save() { return m_strInstData.c_str(); } - void Load(const char* chrIn); + const char* Save() override { return m_strInstData.c_str(); } + void Load(const char* chrIn) override; private: uint32 m_auiEncounter[MAX_ENCOUNTER]; diff --git a/scripts/northrend/ulduar/halls_of_stone/boss_maiden_of_grief.cpp b/scripts/northrend/ulduar/halls_of_stone/boss_maiden_of_grief.cpp index aeca1c982..2651f7b81 100644 --- a/scripts/northrend/ulduar/halls_of_stone/boss_maiden_of_grief.cpp +++ b/scripts/northrend/ulduar/halls_of_stone/boss_maiden_of_grief.cpp @@ -67,7 +67,7 @@ struct MANGOS_DLL_DECL boss_maiden_of_griefAI : public ScriptedAI uint32 m_uiPillarTimer; uint32 m_uiPartingSorrowTimer; - void Reset() + void Reset() override { m_uiStormTimer = 5000; m_uiShockTimer = 10000; @@ -75,7 +75,7 @@ struct MANGOS_DLL_DECL boss_maiden_of_griefAI : public ScriptedAI m_uiPartingSorrowTimer = 12000; } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoScriptText(SAY_AGGRO, m_creature); @@ -83,13 +83,13 @@ struct MANGOS_DLL_DECL boss_maiden_of_griefAI : public ScriptedAI m_pInstance->SetData(TYPE_MAIDEN, IN_PROGRESS); } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_MAIDEN, FAIL); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { switch (urand(0, 3)) { @@ -100,7 +100,7 @@ struct MANGOS_DLL_DECL boss_maiden_of_griefAI : public ScriptedAI } } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoScriptText(SAY_DEATH, m_creature); @@ -108,7 +108,7 @@ struct MANGOS_DLL_DECL boss_maiden_of_griefAI : public ScriptedAI m_pInstance->SetData(TYPE_MAIDEN, DONE); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/northrend/ulduar/halls_of_stone/boss_sjonnir.cpp b/scripts/northrend/ulduar/halls_of_stone/boss_sjonnir.cpp index 71c514d14..2a5cf11ac 100644 --- a/scripts/northrend/ulduar/halls_of_stone/boss_sjonnir.cpp +++ b/scripts/northrend/ulduar/halls_of_stone/boss_sjonnir.cpp @@ -96,7 +96,7 @@ struct MANGOS_DLL_DECL boss_sjonnirAI : public ScriptedAI uint8 m_uiHpCheck; - void Reset() + void Reset() override { m_uiChainLightningTimer = urand(3000, 8000); // TODO timers weak m_uiLightningShieldTimer = urand(20000, 25000); @@ -107,7 +107,7 @@ struct MANGOS_DLL_DECL boss_sjonnirAI : public ScriptedAI m_uiHpCheck = 75; } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoScriptText(SAY_AGGRO, m_creature); @@ -118,7 +118,7 @@ struct MANGOS_DLL_DECL boss_sjonnirAI : public ScriptedAI m_pInstance->SetData(TYPE_SJONNIR, IN_PROGRESS); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoScriptText(SAY_DEATH, m_creature); @@ -126,13 +126,13 @@ struct MANGOS_DLL_DECL boss_sjonnirAI : public ScriptedAI m_pInstance->SetData(TYPE_SJONNIR, DONE); } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_SJONNIR, FAIL); } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { if (pSummoned->GetEntry() == NPC_IRON_TROGG || pSummoned->GetEntry() == NPC_IRON_DWARF || pSummoned->GetEntry() == NPC_MALFORMED_OOZE) { @@ -146,7 +146,7 @@ struct MANGOS_DLL_DECL boss_sjonnirAI : public ScriptedAI pSummoned->AI()->AttackStart(m_creature); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { switch (urand(0, 2)) { @@ -172,7 +172,7 @@ struct MANGOS_DLL_DECL boss_sjonnirAI : public ScriptedAI return false; } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.cpp b/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.cpp index 485bebf82..57cad4afb 100644 --- a/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.cpp +++ b/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.cpp @@ -148,7 +148,7 @@ struct MANGOS_DLL_DECL npc_brann_hosAI : public npc_escortAI GuidList m_luiDwarfGUIDs; - void Reset() + void Reset() override { if (!HasEscortState(STATE_ESCORT_ESCORTING)) { @@ -161,7 +161,7 @@ struct MANGOS_DLL_DECL npc_brann_hosAI : public npc_escortAI } } - void KilledUnit(Unit* pVictim) // TODO - possible better as SummonedJustDied + void KilledUnit(Unit* pVictim) override // TODO - possible better as SummonedJustDied { switch (urand(0, 2)) { @@ -171,7 +171,7 @@ struct MANGOS_DLL_DECL npc_brann_hosAI : public npc_escortAI } } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoScriptText(SAY_DEATH, m_creature); @@ -191,7 +191,7 @@ struct MANGOS_DLL_DECL npc_brann_hosAI : public npc_escortAI m_luiDwarfGUIDs.clear(); } - void AttackStart(Unit* pWho) + void AttackStart(Unit* pWho) override { if (!pWho) return; @@ -213,7 +213,7 @@ struct MANGOS_DLL_DECL npc_brann_hosAI : public npc_escortAI m_bHasContinued = true; } - void JustStartedEscort() + void JustStartedEscort() override { if (m_pInstance) m_pInstance->SetData(TYPE_TRIBUNAL, IN_PROGRESS); @@ -221,7 +221,7 @@ struct MANGOS_DLL_DECL npc_brann_hosAI : public npc_escortAI DoScriptText(SAY_ESCORT_START, m_creature); } - void WaypointReached(uint32 uiPointId) + void WaypointReached(uint32 uiPointId) override { switch (uiPointId) { @@ -269,14 +269,14 @@ struct MANGOS_DLL_DECL npc_brann_hosAI : public npc_escortAI } } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { m_luiDwarfGUIDs.push_back(pSummoned->GetObjectGuid()); pSummoned->AI()->AttackStart(m_creature); } - void UpdateEscortAI(const uint32 uiDiff) + void UpdateEscortAI(const uint32 uiDiff) override { if (m_uiPhaseTimer && m_uiPhaseTimer <= uiDiff) { @@ -572,7 +572,7 @@ struct MANGOS_DLL_DECL npc_brann_hosAI : public npc_escortAI } // Respawn Handling: Relocate and Set Escort to WP 13 - void JustRespawned() + void JustRespawned() override { if (!m_pInstance) return; diff --git a/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.h b/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.h index f4633c3d4..be2e0cc26 100644 --- a/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.h +++ b/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.h @@ -64,18 +64,18 @@ class MANGOS_DLL_DECL instance_halls_of_stone : public ScriptedInstance { public: instance_halls_of_stone(Map* pMap); - void Initialize(); + void Initialize() override; - void OnCreatureCreate(Creature* pCreature); - void OnObjectCreate(GameObject* pGo); + void OnCreatureCreate(Creature* pCreature) override; + void OnObjectCreate(GameObject* pGo) override; - void SetData(uint32 uiType, uint32 uiData); - uint32 GetData(uint32 uiType); + void SetData(uint32 uiType, uint32 uiData) override; + uint32 GetData(uint32 uiType) override; - const char* Save() { return m_strInstData.c_str(); } - void Load(const char* chrIn); + const char* Save() override { return m_strInstData.c_str(); } + void Load(const char* chrIn) override; - void Update(uint32 uiDiff); + void Update(uint32 uiDiff) override; void ActivateFace(uint8 uiFace, bool bAfterEvent); void DoFaceSpeak(uint8 uiFace, int32 iTextId); diff --git a/scripts/northrend/ulduar/ulduar/assembly_of_iron.cpp b/scripts/northrend/ulduar/ulduar/assembly_of_iron.cpp index e8f11a12b..0aa4bdcd2 100644 --- a/scripts/northrend/ulduar/ulduar/assembly_of_iron.cpp +++ b/scripts/northrend/ulduar/ulduar/assembly_of_iron.cpp @@ -136,7 +136,7 @@ struct MANGOS_DLL_DECL boss_brundirAI : public ScriptedAI ObjectGuid m_followTargetGuid; - void Reset() + void Reset() override { m_uiPhase = PHASE_NO_CHARGE; m_uiVisualTimer = 5000; @@ -151,7 +151,7 @@ struct MANGOS_DLL_DECL boss_brundirAI : public ScriptedAI m_creature->SetLevitate(false); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { if (!m_pInstance) return; @@ -169,7 +169,7 @@ struct MANGOS_DLL_DECL boss_brundirAI : public ScriptedAI DoScriptText(urand(0, 1) ? SAY_BRUNDIR_DEATH_1 : SAY_BRUNDIR_DEATH_2, m_creature); } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoScriptText(SAY_BRUNDIR_AGGRO, m_creature); @@ -180,18 +180,18 @@ struct MANGOS_DLL_DECL boss_brundirAI : public ScriptedAI DoCastSpellIfCan(m_creature, SPELL_BERSERK, CAST_TRIGGERED); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { DoScriptText(urand(0, 1) ? SAY_BRUNDIR_SLAY_1 : SAY_BRUNDIR_SLAY_2, m_creature); } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_ASSEMBLY, FAIL); } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { if (pSummoned->GetEntry() == NPC_OVERLOAD_VISUAL) { @@ -202,7 +202,7 @@ struct MANGOS_DLL_DECL boss_brundirAI : public ScriptedAI } } - void SpellHit(Unit* pCaster, const SpellEntry* pSpell) + void SpellHit(Unit* pCaster, const SpellEntry* pSpell) override { // Increase the phase when hit with the supercharge spell by his brothers if (pSpell->Id == SPELL_SUPERCHARGE) @@ -223,7 +223,7 @@ struct MANGOS_DLL_DECL boss_brundirAI : public ScriptedAI } } - void SpellHitTarget(Unit* pTarget, const SpellEntry* pSpell) + void SpellHitTarget(Unit* pTarget, const SpellEntry* pSpell) override { if (pTarget->GetTypeId() != TYPEID_PLAYER) return; @@ -243,7 +243,7 @@ struct MANGOS_DLL_DECL boss_brundirAI : public ScriptedAI } } - void MovementInform(uint32 uiMoveType, uint32 uiPointId) + void MovementInform(uint32 uiMoveType, uint32 uiPointId) override { if (uiMoveType != POINT_MOTION_TYPE || !uiPointId) return; @@ -285,7 +285,7 @@ struct MANGOS_DLL_DECL boss_brundirAI : public ScriptedAI } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { // Pre fight visual spell if (m_uiVisualTimer) @@ -438,7 +438,7 @@ struct MANGOS_DLL_DECL boss_molgeimAI : public ScriptedAI uint32 m_uiRuneDeathTimer; uint32 m_uiRuneSummonTimer; - void Reset() + void Reset() override { m_uiPhase = PHASE_NO_CHARGE; m_uiVisualTimer = 5000; @@ -448,7 +448,7 @@ struct MANGOS_DLL_DECL boss_molgeimAI : public ScriptedAI m_uiRuneDeathTimer = 30000; } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { if (!m_pInstance) return; @@ -466,7 +466,7 @@ struct MANGOS_DLL_DECL boss_molgeimAI : public ScriptedAI DoScriptText(urand(0, 1) ? SAY_MOLGEIM_DEATH_1 : SAY_MOLGEIM_DEATH_2, m_creature); } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoScriptText(SAY_MOLGEIM_AGGRO, m_creature); @@ -477,18 +477,18 @@ struct MANGOS_DLL_DECL boss_molgeimAI : public ScriptedAI DoCastSpellIfCan(m_creature, SPELL_BERSERK, CAST_TRIGGERED); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { DoScriptText(urand(0, 1) ? SAY_MOLGEIM_SLAY_1 : SAY_MOLGEIM_SLAY_2, m_creature); } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_ASSEMBLY, FAIL); } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { if (pSummoned->GetEntry() == NPC_RUNE_OF_SUMMONING) pSummoned->CastSpell(pSummoned, SPELL_RUNE_OF_SUMMONING_AURA, true, NULL, NULL, m_creature->GetObjectGuid()); @@ -503,7 +503,7 @@ struct MANGOS_DLL_DECL boss_molgeimAI : public ScriptedAI } } - void SpellHit(Unit* pCaster, const SpellEntry* pSpell) + void SpellHit(Unit* pCaster, const SpellEntry* pSpell) override { // Increase the phase when hit with the supercharge spell by his brothers if (pSpell->Id == SPELL_SUPERCHARGE) @@ -521,7 +521,7 @@ struct MANGOS_DLL_DECL boss_molgeimAI : public ScriptedAI } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { // Pre fight visual spell if (m_uiVisualTimer) @@ -618,7 +618,7 @@ struct MANGOS_DLL_DECL boss_steelbreakerAI : public ScriptedAI uint32 m_uiDisruptionTimer; uint32 m_uiPowerTimer; - void Reset() + void Reset() override { m_uiPhase = PHASE_NO_CHARGE; m_uiFusionPunchTimer = 15000; @@ -626,7 +626,7 @@ struct MANGOS_DLL_DECL boss_steelbreakerAI : public ScriptedAI m_uiPowerTimer = 10000; } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { if (!m_pInstance) return; @@ -644,7 +644,7 @@ struct MANGOS_DLL_DECL boss_steelbreakerAI : public ScriptedAI DoScriptText(urand(0, 1) ? SAY_STEEL_DEATH_1 : SAY_STEEL_DEATH_2, m_creature); } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoScriptText(SAY_STEEL_AGGRO, m_creature); @@ -655,18 +655,18 @@ struct MANGOS_DLL_DECL boss_steelbreakerAI : public ScriptedAI DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_HIGH_VOLTAGE : SPELL_HIGH_VOLTAGE_H, CAST_TRIGGERED); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { DoScriptText(urand(0, 1) ? SAY_STEEL_SLAY_1 : SAY_STEEL_SLAY_2, m_creature); } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_ASSEMBLY, FAIL); } - void SpellHit(Unit* pCaster, const SpellEntry* pSpell) + void SpellHit(Unit* pCaster, const SpellEntry* pSpell) override { // Increase the phase when hit with the supercharge spell by his brothers if (pSpell->Id == SPELL_SUPERCHARGE) @@ -687,7 +687,7 @@ struct MANGOS_DLL_DECL boss_steelbreakerAI : public ScriptedAI } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/northrend/ulduar/ulduar/boss_auriaya.cpp b/scripts/northrend/ulduar/ulduar/boss_auriaya.cpp index a3c852ecb..e45c83ef5 100644 --- a/scripts/northrend/ulduar/ulduar/boss_auriaya.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_auriaya.cpp @@ -83,7 +83,7 @@ struct MANGOS_DLL_DECL boss_auriayaAI : public ScriptedAI uint32 m_uiTerrifyingScreechTimer; uint32 m_uiDefenderTimer; - void Reset() + void Reset() override { m_uiEnrageTimer = 10 * MINUTE * IN_MILLISECONDS; m_uiSwarmTimer = 50000; @@ -93,7 +93,7 @@ struct MANGOS_DLL_DECL boss_auriayaAI : public ScriptedAI m_uiDefenderTimer = 1 * MINUTE * IN_MILLISECONDS; } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoScriptText(SAY_DEATH, m_creature); @@ -101,7 +101,7 @@ struct MANGOS_DLL_DECL boss_auriayaAI : public ScriptedAI m_pInstance->SetData(TYPE_AURIAYA, DONE); } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { if (m_pInstance) m_pInstance->SetData(TYPE_AURIAYA, IN_PROGRESS); @@ -109,25 +109,25 @@ struct MANGOS_DLL_DECL boss_auriayaAI : public ScriptedAI DoScriptText(SAY_AGGRO, m_creature); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { DoScriptText(urand(0, 1) ? SAY_SLAY_1 : SAY_SLAY_2, m_creature); } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_AURIAYA, FAIL); } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { // Summon the feral defender if (pSummoned->GetEntry() == NPC_FERAL_DEFENDER_STALKER) DoCastSpellIfCan(pSummoned, SPELL_ACTIVATE_FERAL_DEFENDER, CAST_INTERRUPT_PREVIOUS); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -221,7 +221,7 @@ struct MANGOS_DLL_DECL boss_feral_defenderAI : public ScriptedAI uint32 m_uiReviveDelayTimer; uint32 m_uiKilledCount; - void Reset() + void Reset() override { m_uiReviveDelayTimer = 0; m_uiPounceTimer = 5000; @@ -231,14 +231,14 @@ struct MANGOS_DLL_DECL boss_feral_defenderAI : public ScriptedAI DoCastSpellIfCan(m_creature, SPELL_FERAL_ESSENCE); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { // Set achiev criteria to true if (m_pInstance) m_pInstance->SetSpecialAchievementCriteria(TYPE_ACHIEV_NINE_LIVES, true); } - void DamageTaken(Unit* pDoneBy, uint32& uiDamage) + void DamageTaken(Unit* pDoneBy, uint32& uiDamage) override { // If we don't have the feral essence anymore then ignore this if (m_uiKilledCount >= 8) // 9-1 == 8 @@ -276,13 +276,13 @@ struct MANGOS_DLL_DECL boss_feral_defenderAI : public ScriptedAI } } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { // Cast seeping feral essence on the summoned pSummoned->CastSpell(pSummoned, m_bIsRegularMode ? SPELL_SEEPING_FERAL_ESSENCE : SPELL_SEEPING_FERAL_ESSENCE_H, true, NULL, NULL, m_creature->GetObjectGuid()); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/northrend/ulduar/ulduar/boss_general_vezax.cpp b/scripts/northrend/ulduar/ulduar/boss_general_vezax.cpp index b54a1abf9..de2883298 100644 --- a/scripts/northrend/ulduar/ulduar/boss_general_vezax.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_general_vezax.cpp @@ -79,7 +79,7 @@ struct MANGOS_DLL_DECL boss_general_vezaxAI : public ScriptedAI GuidList m_lVaporsGuids; - void Reset() + void Reset() override { m_uiEnrageTimer = 10 * MINUTE * IN_MILLISECONDS; m_uiFlamesTimer = 8000; @@ -91,7 +91,7 @@ struct MANGOS_DLL_DECL boss_general_vezaxAI : public ScriptedAI m_uiVaporsGathered = 0; } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { if (m_pInstance) { @@ -104,13 +104,13 @@ struct MANGOS_DLL_DECL boss_general_vezaxAI : public ScriptedAI DoScriptText(SAY_AGGRO, m_creature); } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_VEZAX, FAIL); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { if (m_pInstance) m_pInstance->SetData(TYPE_VEZAX, DONE); @@ -118,12 +118,12 @@ struct MANGOS_DLL_DECL boss_general_vezaxAI : public ScriptedAI DoScriptText(SAY_DEATH, m_creature); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { DoScriptText(urand(0, 1) ? SAY_SLAY_1 : SAY_SLAY_2, m_creature); } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { if (pSummoned->GetEntry() == NPC_SARONITE_VAPOR) { @@ -138,7 +138,7 @@ struct MANGOS_DLL_DECL boss_general_vezaxAI : public ScriptedAI pSummoned->setFaction(14); } - void SummonedCreatureJustDied(Creature* pSummoned) + void SummonedCreatureJustDied(Creature* pSummoned) override { // decrease the number of vapors when they die if (pSummoned->GetEntry() == NPC_SARONITE_VAPOR) @@ -156,7 +156,7 @@ struct MANGOS_DLL_DECL boss_general_vezaxAI : public ScriptedAI } } - void SummonedMovementInform(Creature* pSummoned, uint32 uiMoveType, uint32 uiPointId) + void SummonedMovementInform(Creature* pSummoned, uint32 uiMoveType, uint32 uiPointId) override { if (uiMoveType != POINT_MOTION_TYPE || uiPointId != 0 || pSummoned->GetEntry() != NPC_SARONITE_VAPOR) return; @@ -192,7 +192,7 @@ struct MANGOS_DLL_DECL boss_general_vezaxAI : public ScriptedAI } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/northrend/ulduar/ulduar/ulduar.h b/scripts/northrend/ulduar/ulduar/ulduar.h index 493e5abb8..62cb27fd2 100644 --- a/scripts/northrend/ulduar/ulduar/ulduar.h +++ b/scripts/northrend/ulduar/ulduar/ulduar.h @@ -226,23 +226,23 @@ class MANGOS_DLL_DECL instance_ulduar : public ScriptedInstance instance_ulduar(Map* pMap); ~instance_ulduar() {} - void Initialize(); - bool IsEncounterInProgress() const; + void Initialize() override; + bool IsEncounterInProgress() const override; - void OnCreatureCreate(Creature* pCreature); - void OnCreatureDeath(Creature* pCreature); - void OnObjectCreate(GameObject* pGo); + void OnCreatureCreate(Creature* pCreature) override; + void OnCreatureDeath(Creature* pCreature) override; + void OnObjectCreate(GameObject* pGo) override; - void SetData(uint32 uiType, uint32 uiData); - uint32 GetData(uint32 uiType); + void SetData(uint32 uiType, uint32 uiData) override; + uint32 GetData(uint32 uiType) override; - const char* Save() { return m_strInstData.c_str(); } - void Load(const char* chrIn); + const char* Save() override { return m_strInstData.c_str(); } + void Load(const char* chrIn) override; void SetSpecialAchievementCriteria(uint32 uiType, bool bIsMet); - bool CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/); + bool CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/) override; // Dummy, leave till correct solution for hardmode found - bool CheckConditionCriteriaMeet(Player const* pSource, uint32 uiMapId, uint32 uiInstanceConditionId); + bool CheckConditionCriteriaMeet(Player const* pSource, uint32 uiMapId, uint32 uiInstanceConditionId) override; void DoOpenMadnessDoorIfCan(); diff --git a/scripts/northrend/utgarde_keep/utgarde_keep/boss_ingvar.cpp b/scripts/northrend/utgarde_keep/utgarde_keep/boss_ingvar.cpp index 2abdae1f1..a21283583 100644 --- a/scripts/northrend/utgarde_keep/utgarde_keep/boss_ingvar.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_keep/boss_ingvar.cpp @@ -102,7 +102,7 @@ struct MANGOS_DLL_DECL boss_ingvarAI : public ScriptedAI uint32 m_uiStaggeringRoarTimer; uint32 m_uiEnrageTimer; - void Reset() + void Reset() override { m_bIsResurrected = false; m_bIsFakingDeath = false; @@ -113,7 +113,7 @@ struct MANGOS_DLL_DECL boss_ingvarAI : public ScriptedAI m_uiEnrageTimer = 30000; } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { // don't yell for her if (pWho->GetEntry() == NPC_ANNHYLDE) @@ -123,7 +123,7 @@ struct MANGOS_DLL_DECL boss_ingvarAI : public ScriptedAI DoScriptText(SAY_AGGRO_FIRST, m_creature); } - void DamageTaken(Unit* pDealer, uint32& uiDamage) + void DamageTaken(Unit* pDealer, uint32& uiDamage) override { if (m_bIsResurrected) return; @@ -148,7 +148,7 @@ struct MANGOS_DLL_DECL boss_ingvarAI : public ScriptedAI } } - void SpellHit(Unit* pCaster, const SpellEntry* pSpell) + void SpellHit(Unit* pCaster, const SpellEntry* pSpell) override { if (pSpell->Id == SPELL_TRANSFORM) { @@ -160,7 +160,7 @@ struct MANGOS_DLL_DECL boss_ingvarAI : public ScriptedAI } } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { switch (pSummoned->GetEntry()) { @@ -184,18 +184,18 @@ struct MANGOS_DLL_DECL boss_ingvarAI : public ScriptedAI } } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoScriptText(SAY_DEATH_SECOND, m_creature); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { if (urand(0, 1)) DoScriptText(m_bIsResurrected ? SAY_KILL_SECOND : SAY_KILL_FIRST, m_creature); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim() || m_bIsFakingDeath) return; @@ -301,17 +301,17 @@ struct MANGOS_DLL_DECL npc_annhyldeAI : public ScriptedAI uint32 m_uiResurrectTimer; uint8 m_uiResurrectPhase; - void Reset() + void Reset() override { m_uiResurrectTimer = 0; m_uiResurrectPhase = 0; } // No attacking - void MoveInLineOfSight(Unit*) {} - void AttackStart(Unit*) {} + void MoveInLineOfSight(Unit*) override {} + void AttackStart(Unit*) override {} - void MovementInform(uint32 uiMotionType, uint32 uiPointId) + void MovementInform(uint32 uiMotionType, uint32 uiPointId) override { if (uiMotionType != POINT_MOTION_TYPE || uiPointId != POINT_ID_ANNHYLDE) return; @@ -320,7 +320,7 @@ struct MANGOS_DLL_DECL npc_annhyldeAI : public ScriptedAI m_uiResurrectTimer = 3000; } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (m_uiResurrectTimer) { diff --git a/scripts/northrend/utgarde_keep/utgarde_keep/boss_keleseth.cpp b/scripts/northrend/utgarde_keep/utgarde_keep/boss_keleseth.cpp index 54384ca05..2f35d5683 100644 --- a/scripts/northrend/utgarde_keep/utgarde_keep/boss_keleseth.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_keep/boss_keleseth.cpp @@ -71,13 +71,13 @@ struct MANGOS_DLL_DECL mob_vrykul_skeletonAI : public ScriptedAI uint32 m_uiCastTimer; uint32 m_uiReviveTimer; - void Reset() + void Reset() override { m_uiReviveTimer = 0; m_uiCastTimer = urand(5000, 10000); // taken out of thin air } - void MoveInLineOfSight(Unit* pWho) + void MoveInLineOfSight(Unit* pWho) override { if (!pWho || m_uiReviveTimer) return; @@ -85,7 +85,7 @@ struct MANGOS_DLL_DECL mob_vrykul_skeletonAI : public ScriptedAI ScriptedAI::MoveInLineOfSight(pWho); } - void AttackStart(Unit* pWho) + void AttackStart(Unit* pWho) override { if (!pWho || m_uiReviveTimer) return; @@ -106,7 +106,7 @@ struct MANGOS_DLL_DECL mob_vrykul_skeletonAI : public ScriptedAI m_uiReviveTimer = 0; } - void DamageTaken(Unit* pDoneBy, uint32& uiDamage) + void DamageTaken(Unit* pDoneBy, uint32& uiDamage) override { if (m_uiReviveTimer) { @@ -128,7 +128,7 @@ struct MANGOS_DLL_DECL mob_vrykul_skeletonAI : public ScriptedAI } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -194,7 +194,7 @@ struct MANGOS_DLL_DECL boss_kelesethAI : public ScriptedAI GuidList m_lSummonedAddGuids; - void Reset() + void Reset() override { // timers need confirmation m_uiFrostTombTimer = 20000; @@ -204,7 +204,7 @@ struct MANGOS_DLL_DECL boss_kelesethAI : public ScriptedAI DespawnOrKillAdds(true); } - void AttackStart(Unit* pWho) + void AttackStart(Unit* pWho) override { if (m_creature->Attack(pWho, true)) { @@ -216,7 +216,7 @@ struct MANGOS_DLL_DECL boss_kelesethAI : public ScriptedAI } } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoScriptText(SAY_AGGRO, m_creature); @@ -249,7 +249,7 @@ struct MANGOS_DLL_DECL boss_kelesethAI : public ScriptedAI m_lSummonedAddGuids.clear(); } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { if (pSummoned->GetEntry() == NPC_VRYKUL_SKELETON) { @@ -261,7 +261,7 @@ struct MANGOS_DLL_DECL boss_kelesethAI : public ScriptedAI pSummoned->ApplySpellImmune(0, IMMUNITY_DAMAGE, SPELL_SCHOOL_MASK_FROST, true); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoScriptText(SAY_DEATH, m_creature); @@ -271,18 +271,18 @@ struct MANGOS_DLL_DECL boss_kelesethAI : public ScriptedAI DespawnOrKillAdds(false); } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_KELESETH, FAIL); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { DoScriptText(SAY_KILL, m_creature); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/northrend/utgarde_keep/utgarde_keep/boss_skarvald_and_dalronn.cpp b/scripts/northrend/utgarde_keep/utgarde_keep/boss_skarvald_and_dalronn.cpp index bace047c5..011f7dba2 100644 --- a/scripts/northrend/utgarde_keep/utgarde_keep/boss_skarvald_and_dalronn.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_keep/boss_skarvald_and_dalronn.cpp @@ -95,9 +95,9 @@ struct MANGOS_DLL_DECL boss_s_and_d_dummyAI : public ScriptedAI return m_pInstance->GetSingleCreatureFromStorage(m_creature->GetEntry() == NPC_DALRONN ? NPC_SKARVALD : NPC_DALRONN); } - void Reset() { } + void Reset() override { } - void JustReachedHome() + void JustReachedHome() override { if (Creature* pBuddy = GetBuddy()) { @@ -112,7 +112,7 @@ struct MANGOS_DLL_DECL boss_s_and_d_dummyAI : public ScriptedAI } } - void EnterCombat(Unit* pWho) + void EnterCombat(Unit* pWho) override { if (!pWho) return; @@ -126,7 +126,7 @@ struct MANGOS_DLL_DECL boss_s_and_d_dummyAI : public ScriptedAI Aggro(pWho); } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { // EventAI can probably handle ghosts if (pSummoned->GetEntry() == NPC_DAL_GHOST || pSummoned->GetEntry() == NPC_SKA_GHOST) @@ -138,7 +138,7 @@ struct MANGOS_DLL_DECL boss_s_and_d_dummyAI : public ScriptedAI pSummoned->AI()->AttackStart(pTarget ? pTarget : m_creature->getVictim()); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { if (Creature* pBuddy = GetBuddy()) { @@ -175,7 +175,7 @@ struct MANGOS_DLL_DECL boss_skarvaldAI : public boss_s_and_d_dummyAI uint32 m_uiEnrageTimer; uint32 m_uiStoneStrikeTimer; - void Reset() + void Reset() override { m_uiYellDelayTimer = 0; m_uiChargeTimer = urand(2000, 6000); @@ -183,18 +183,18 @@ struct MANGOS_DLL_DECL boss_skarvaldAI : public boss_s_and_d_dummyAI m_uiStoneStrikeTimer = 8000; } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoScriptText(m_aYell[0].m_iTextId, m_creature); m_uiYellDelayTimer = 5000; } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { DoScriptText(SAY_SKA_KILL, m_creature); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -259,19 +259,19 @@ struct MANGOS_DLL_DECL boss_dalronnAI : public boss_s_and_d_dummyAI uint32 m_uiShadowBoltTimer; uint32 m_uiSkeletonTimer; - void Reset() + void Reset() override { m_uiDebilitateTimer = urand(5000, 10000); m_uiShadowBoltTimer = urand(2500, 6000); m_uiSkeletonTimer = urand(25000, 35000); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { DoScriptText(SAY_DAL_KILL, m_creature); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/northrend/utgarde_keep/utgarde_keep/utgarde_keep.cpp b/scripts/northrend/utgarde_keep/utgarde_keep/utgarde_keep.cpp index 867ae4d85..20ac8e7de 100644 --- a/scripts/northrend/utgarde_keep/utgarde_keep/utgarde_keep.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_keep/utgarde_keep.cpp @@ -57,7 +57,7 @@ struct MANGOS_DLL_DECL mob_dragonflayer_forge_masterAI : public ScriptedAI uint32 m_uiForgeEncounterId; uint32 m_uiBurningBrandTimer; - void Reset() + void Reset() override { m_uiBurningBrandTimer = 2000; } @@ -110,23 +110,23 @@ struct MANGOS_DLL_DECL mob_dragonflayer_forge_masterAI : public ScriptedAI } } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { SetMyForge(); } - void JustReachedHome() + void JustReachedHome() override { SetMyForge(); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { if (m_pInstance) m_pInstance->SetData(m_uiForgeEncounterId, DONE); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/northrend/utgarde_keep/utgarde_keep/utgarde_keep.h b/scripts/northrend/utgarde_keep/utgarde_keep/utgarde_keep.h index 29a909eef..323c355a2 100644 --- a/scripts/northrend/utgarde_keep/utgarde_keep/utgarde_keep.h +++ b/scripts/northrend/utgarde_keep/utgarde_keep/utgarde_keep.h @@ -39,20 +39,20 @@ class MANGOS_DLL_DECL instance_utgarde_keep : public ScriptedInstance instance_utgarde_keep(Map* pMap); ~instance_utgarde_keep() {} - void Initialize(); + void Initialize() override; - void OnCreatureCreate(Creature* pCreature); - void OnObjectCreate(GameObject* pGo); + void OnCreatureCreate(Creature* pCreature) override; + void OnObjectCreate(GameObject* pGo) override; - void OnCreatureDeath(Creature* pCreature); + void OnCreatureDeath(Creature* pCreature) override; - void SetData(uint32 uiType, uint32 uiData); - uint32 GetData(uint32 uiType); + void SetData(uint32 uiType, uint32 uiData) override; + uint32 GetData(uint32 uiType) override; - const char* Save() { return m_strInstData.c_str(); } - void Load(const char* chrIn); + const char* Save() override { return m_strInstData.c_str(); } + void Load(const char* chrIn) override; - bool CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/); + bool CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/) override; protected: uint32 m_auiEncounter[MAX_ENCOUNTER]; diff --git a/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_gortok.cpp b/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_gortok.cpp index 3e90ad844..b256dc479 100644 --- a/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_gortok.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_gortok.cpp @@ -62,7 +62,7 @@ struct MANGOS_DLL_DECL boss_gortokAI : public ScriptedAI uint32 m_uiImpaleTimer; uint32 m_uiArcingSmashTimer; - void Reset() + void Reset() override { m_uiRoarTimer = 10000; m_uiImpaleTimer = 15000; @@ -72,17 +72,17 @@ struct MANGOS_DLL_DECL boss_gortokAI : public ScriptedAI m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoScriptText(SAY_AGGRO, m_creature); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { DoScriptText(urand(0, 1) ? SAY_SLAY_1 : SAY_SLAY_2, m_creature); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoScriptText(SAY_DEATH, m_creature); @@ -90,13 +90,13 @@ struct MANGOS_DLL_DECL boss_gortokAI : public ScriptedAI m_pInstance->SetData(TYPE_GORTOK, DONE); } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_GORTOK, FAIL); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_skadi.cpp b/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_skadi.cpp index 692640486..363f89faf 100644 --- a/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_skadi.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_skadi.cpp @@ -78,25 +78,25 @@ struct MANGOS_DLL_DECL boss_skadiAI : public ScriptedAI uint32 m_uiWhirlwind; uint32 m_uiPoisonedSpear; - void Reset() + void Reset() override { m_uiCrush = 15000; m_uiWhirlwind = 23000; m_uiPoisonedSpear = 10000; } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_SKADI, NOT_STARTED); } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoScriptText(SAY_AGGRO, m_creature); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { switch (urand(0, 2)) { @@ -106,7 +106,7 @@ struct MANGOS_DLL_DECL boss_skadiAI : public ScriptedAI } } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoScriptText(SAY_DEATH, m_creature); @@ -114,7 +114,7 @@ struct MANGOS_DLL_DECL boss_skadiAI : public ScriptedAI m_pInstance->SetData(TYPE_SKADI, DONE); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_svala.cpp b/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_svala.cpp index b47c3cec9..cff52524d 100644 --- a/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_svala.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_svala.cpp @@ -100,7 +100,7 @@ struct MANGOS_DLL_DECL boss_svalaAI : public ScriptedAI ObjectGuid m_ritualTargetGuid; - void Reset() + void Reset() override { pArthas = NULL; @@ -123,7 +123,7 @@ struct MANGOS_DLL_DECL boss_svalaAI : public ScriptedAI } } - void JustReachedHome() + void JustReachedHome() override { DoMoveToPosition(); @@ -131,7 +131,7 @@ struct MANGOS_DLL_DECL boss_svalaAI : public ScriptedAI m_pInstance->SetData(TYPE_SVALA, FAIL); } - void MoveInLineOfSight(Unit* pWho) + void MoveInLineOfSight(Unit* pWho) override { if (!m_bIsIntroDone) { @@ -152,13 +152,13 @@ struct MANGOS_DLL_DECL boss_svalaAI : public ScriptedAI ScriptedAI::MoveInLineOfSight(pWho); } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { m_creature->SetLevitate(false); DoScriptText(SAY_AGGRO, m_creature); } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { if (pSummoned->GetEntry() == NPC_ARTHAS_IMAGE) { @@ -176,13 +176,13 @@ struct MANGOS_DLL_DECL boss_svalaAI : public ScriptedAI } } - void SummonedCreatureDespawn(Creature* pDespawned) + void SummonedCreatureDespawn(Creature* pDespawned) override { if (pDespawned->GetEntry() == NPC_ARTHAS_IMAGE) pArthas = NULL; } - void SpellHit(Unit* pCaster, const SpellEntry* pSpell) + void SpellHit(Unit* pCaster, const SpellEntry* pSpell) override { if (pSpell->Id == SPELL_TRANSFORMING) { @@ -194,7 +194,7 @@ struct MANGOS_DLL_DECL boss_svalaAI : public ScriptedAI } } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { // set achiev to true if boss kills a hulk if (pVictim->GetEntry() == NPC_SCOURGE_HULK && m_pInstance) @@ -208,7 +208,7 @@ struct MANGOS_DLL_DECL boss_svalaAI : public ScriptedAI } } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoScriptText(SAY_DEATH, m_creature); @@ -225,7 +225,7 @@ struct MANGOS_DLL_DECL boss_svalaAI : public ScriptedAI m_creature->GetMotionMaster()->MovePoint(0, fX, fY, fZ + 5.0f); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) { diff --git a/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_ymiron.cpp b/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_ymiron.cpp index c9007d18e..534b635d4 100644 --- a/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_ymiron.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_ymiron.cpp @@ -138,7 +138,7 @@ struct MANGOS_DLL_DECL boss_ymironAI : public ScriptedAI std::vector m_vuiBoatPhases; - void Reset() + void Reset() override { m_uiFetidRotTimer = urand(8000, 13000); m_uiBaneTimer = urand(18000, 23000); @@ -162,7 +162,7 @@ struct MANGOS_DLL_DECL boss_ymironAI : public ScriptedAI std::random_shuffle(m_vuiBoatPhases.begin(), m_vuiBoatPhases.end()); } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoScriptText(SAY_AGGRO, m_creature); @@ -170,7 +170,7 @@ struct MANGOS_DLL_DECL boss_ymironAI : public ScriptedAI m_pInstance->SetData(TYPE_YMIRON, IN_PROGRESS); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { switch (urand(0, 3)) { @@ -181,7 +181,7 @@ struct MANGOS_DLL_DECL boss_ymironAI : public ScriptedAI } } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoScriptText(SAY_DEATH, m_creature); @@ -196,7 +196,7 @@ struct MANGOS_DLL_DECL boss_ymironAI : public ScriptedAI m_pInstance->SetData(TYPE_YMIRON, DONE); } - void JustReachedHome() + void JustReachedHome() override { DoResetSpirits(); @@ -236,13 +236,13 @@ struct MANGOS_DLL_DECL boss_ymironAI : public ScriptedAI ++m_uiBoats; } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { if (pSummoned->GetEntry() == NPC_SPIRIT_FOUNT) DoCastSpellIfCan(pSummoned, SPELL_SPIRIT_FOUNT_BEAM, CAST_INTERRUPT_PREVIOUS); } - void MovementInform(uint32 uiMotionType, uint32 uiPointId) + void MovementInform(uint32 uiMotionType, uint32 uiPointId) override { if (uiMotionType != POINT_MOTION_TYPE || !uiPointId) return; @@ -256,7 +256,7 @@ struct MANGOS_DLL_DECL boss_ymironAI : public ScriptedAI } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/northrend/utgarde_keep/utgarde_pinnacle/utgarde_pinnacle.h b/scripts/northrend/utgarde_keep/utgarde_pinnacle/utgarde_pinnacle.h index a16f154ad..99a5f1340 100644 --- a/scripts/northrend/utgarde_keep/utgarde_pinnacle/utgarde_pinnacle.h +++ b/scripts/northrend/utgarde_keep/utgarde_pinnacle/utgarde_pinnacle.h @@ -61,27 +61,27 @@ class MANGOS_DLL_DECL instance_pinnacle : public ScriptedInstance public: instance_pinnacle(Map* pMap); - void Initialize(); + void Initialize() override; - void OnCreatureCreate(Creature* pCreature); - void OnObjectCreate(GameObject* pGo); + void OnCreatureCreate(Creature* pCreature) override; + void OnObjectCreate(GameObject* pGo) override; void OnCreatureEvade(Creature* pCreature); - void OnCreatureDeath(Creature* pCreature); + void OnCreatureDeath(Creature* pCreature) override; - void SetData(uint32 uiType, uint32 uiData); - uint32 GetData(uint32 uiType); + void SetData(uint32 uiType, uint32 uiData) override; + uint32 GetData(uint32 uiType) override; void SetSpecialAchievementCriteria(uint32 uiType, bool bIsMet); - bool CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/); + bool CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/) override; void SetGortokEventStarter(ObjectGuid playerGuid) { m_gortokEventStarterGuid = playerGuid; } ObjectGuid GetGortokEventStarter() { return m_gortokEventStarterGuid; } - const char* Save() { return m_strInstData.c_str(); } - void Load(const char* chrIn); + const char* Save() override { return m_strInstData.c_str(); } + void Load(const char* chrIn) override; - void Update(uint32 uiDiff); + void Update(uint32 uiDiff) override; private: uint32 m_auiEncounter[MAX_ENCOUNTER]; diff --git a/scripts/northrend/violet_hold/boss_erekem.cpp b/scripts/northrend/violet_hold/boss_erekem.cpp index 532f73518..fc172008f 100644 --- a/scripts/northrend/violet_hold/boss_erekem.cpp +++ b/scripts/northrend/violet_hold/boss_erekem.cpp @@ -71,7 +71,7 @@ struct MANGOS_DLL_DECL boss_erekemAI : public ScriptedAI uint32 m_uiSpecialSpellTimer; uint8 m_uiGuardiansDead; - void Reset() + void Reset() override { m_uiSpecialSpellTimer = 0; m_uiEarthShieldTimer = urand(2000, 3000); @@ -81,17 +81,17 @@ struct MANGOS_DLL_DECL boss_erekemAI : public ScriptedAI m_uiGuardiansDead = 0; } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoScriptText(SAY_AGGRO, m_creature); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoScriptText(SAY_DEATH, m_creature); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { switch (urand(0, 2)) { @@ -111,7 +111,7 @@ struct MANGOS_DLL_DECL boss_erekemAI : public ScriptedAI DoCastSpellIfCan(m_creature, SPELL_BLOODLUST, CAST_INTERRUPT_PREVIOUS); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -187,14 +187,14 @@ struct MANGOS_DLL_DECL npc_erekem_guardAI : public ScriptedAI uint32 m_uiHowlingScreechTimer; uint32 m_uiStrikeTimer; - void Reset() + void Reset() override { m_uiGushingWoundTimer = urand(9000, 14000); m_uiHowlingScreechTimer = urand(8000, 12000); m_uiStrikeTimer = urand(5000, 7000); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { if (!m_pInstance) return; @@ -208,7 +208,7 @@ struct MANGOS_DLL_DECL npc_erekem_guardAI : public ScriptedAI } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/northrend/violet_hold/boss_ichoron.cpp b/scripts/northrend/violet_hold/boss_ichoron.cpp index b0fc22a1c..691cae80a 100644 --- a/scripts/northrend/violet_hold/boss_ichoron.cpp +++ b/scripts/northrend/violet_hold/boss_ichoron.cpp @@ -76,26 +76,26 @@ struct MANGOS_DLL_DECL boss_ichoronAI : public ScriptedAI uint32 m_uiWaterBlastTimer; bool m_bIsFrenzy; - void Reset() + void Reset() override { m_uiWaterBoltVolleyTimer = urand(10000, 12000); m_uiWaterBlastTimer = 10000; m_bIsFrenzy = false; } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoScriptText(SAY_AGGRO, m_creature); DoCastSpellIfCan(m_creature, SPELL_PROTECTIVE_BUBBLE); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoScriptText(SAY_DEATH, m_creature); } - void KilledUnit(Unit* pWho) + void KilledUnit(Unit* pWho) override { if (pWho->GetTypeId() != TYPEID_PLAYER) return; @@ -108,7 +108,7 @@ struct MANGOS_DLL_DECL boss_ichoronAI : public ScriptedAI } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/northrend/violet_hold/violet_hold.cpp b/scripts/northrend/violet_hold/violet_hold.cpp index 6ab505e7c..f55055c2b 100644 --- a/scripts/northrend/violet_hold/violet_hold.cpp +++ b/scripts/northrend/violet_hold/violet_hold.cpp @@ -96,12 +96,12 @@ struct MANGOS_DLL_DECL npc_sinclariAI : public npc_escortAI bool m_bIsEpilogue; - void Reset() + void Reset() override { m_bIsEpilogue = false; } - void WaypointReached(uint32 uiPointId) + void WaypointReached(uint32 uiPointId) override { if (!m_pInstance) return; @@ -135,7 +135,7 @@ struct MANGOS_DLL_DECL npc_sinclariAI : public npc_escortAI } } - void JustRespawned() + void JustRespawned() override { if (m_pInstance && m_pInstance->GetData(TYPE_MAIN) != DONE) m_pInstance->SetData(TYPE_MAIN, NOT_STARTED); @@ -143,7 +143,7 @@ struct MANGOS_DLL_DECL npc_sinclariAI : public npc_escortAI npc_escortAI::JustRespawned(); // Needed, to reset escort state, waypoints, etc } - void UpdateEscortAI(const uint32 uiDiff) + void UpdateEscortAI(const uint32 uiDiff) override { // Say outro after event is finished if (m_pInstance && m_pInstance->GetData(TYPE_MAIN) == DONE && !m_bIsEpilogue) @@ -238,7 +238,7 @@ struct MANGOS_DLL_DECL npc_prison_event_controllerAI : public ScriptedAI ObjectGuid m_currentSaboteurGuid; - void Reset() + void Reset() override { m_uiCurrentTrashPortalId = 0; m_uiSaboteurPhase = 0; @@ -250,7 +250,7 @@ struct MANGOS_DLL_DECL npc_prison_event_controllerAI : public ScriptedAI void DoSetCurrentTrashPortal(uint8 uiPortalId) { m_uiCurrentTrashPortalId = uiPortalId; } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { switch (pSummoned->GetEntry()) { @@ -286,7 +286,7 @@ struct MANGOS_DLL_DECL npc_prison_event_controllerAI : public ScriptedAI } } - void SummonedMovementInform(Creature* pSummoned, uint32 uiMotionType, uint32 uiPointId) + void SummonedMovementInform(Creature* pSummoned, uint32 uiMotionType, uint32 uiPointId) override { if (uiMotionType != POINT_MOTION_TYPE && !uiPointId) return; @@ -303,7 +303,7 @@ struct MANGOS_DLL_DECL npc_prison_event_controllerAI : public ScriptedAI pSummoned->CastSpell(pSummoned, SPELL_DESTROY_DOOR_SEAL, false); } - void SummonedCreatureJustDied(Creature* pSummoned) + void SummonedCreatureJustDied(Creature* pSummoned) override { switch (pSummoned->GetEntry()) { @@ -365,7 +365,7 @@ struct MANGOS_DLL_DECL npc_prison_event_controllerAI : public ScriptedAI } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (m_uiSaboteurTimer) { @@ -428,7 +428,7 @@ struct MANGOS_DLL_DECL npc_teleportation_portalAI : public ScriptedAI ObjectGuid m_cyanigosaGuid; - void Reset() + void Reset() override { DoCastSpellIfCan(m_creature, SPELL_PORTAL_PERIODIC); @@ -507,7 +507,7 @@ struct MANGOS_DLL_DECL npc_teleportation_portalAI : public ScriptedAI } } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { switch (pSummoned->GetEntry()) { @@ -535,7 +535,7 @@ struct MANGOS_DLL_DECL npc_teleportation_portalAI : public ScriptedAI } } - void SummonedCreatureJustDied(Creature* pSummoned) + void SummonedCreatureJustDied(Creature* pSummoned) override { switch (pSummoned->GetEntry()) { @@ -549,7 +549,7 @@ struct MANGOS_DLL_DECL npc_teleportation_portalAI : public ScriptedAI } } - void SummonedCreatureDespawn(Creature* pSummoned) + void SummonedCreatureDespawn(Creature* pSummoned) override { switch (pSummoned->GetEntry()) { @@ -561,7 +561,7 @@ struct MANGOS_DLL_DECL npc_teleportation_portalAI : public ScriptedAI } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (m_uiCyanigosaMoveTimer) { diff --git a/scripts/northrend/violet_hold/violet_hold.h b/scripts/northrend/violet_hold/violet_hold.h index 58f0c41fd..bab659e06 100644 --- a/scripts/northrend/violet_hold/violet_hold.h +++ b/scripts/northrend/violet_hold/violet_hold.h @@ -194,10 +194,10 @@ class MANGOS_DLL_DECL instance_violet_hold : public ScriptedInstance instance_violet_hold(Map* pMap); ~instance_violet_hold(); // Destructor used to free m_vRandomBosses - void Initialize(); + void Initialize() override; - void OnCreatureCreate(Creature* pCreature); - void OnObjectCreate(GameObject* pGo); + void OnCreatureCreate(Creature* pCreature) override; + void OnObjectCreate(GameObject* pGo) override; void UpdateCellForBoss(uint32 uiBossEntry, bool bForceClosing = false); @@ -226,21 +226,21 @@ class MANGOS_DLL_DECL instance_violet_hold : public ScriptedInstance void GetErekemGuardList(GuidList& lList) { lList = m_lErekemGuardList; } void GetIchoronTriggerList(GuidList& lList) { lList = m_lIchoronTargetsList; } - void OnPlayerEnter(Player* pPlayer); + void OnPlayerEnter(Player* pPlayer) override; - void OnCreatureEnterCombat(Creature* pCreature); + void OnCreatureEnterCombat(Creature* pCreature) override; void OnCreatureEvade(Creature* pCreature); - void OnCreatureDeath(Creature* pCreature); + void OnCreatureDeath(Creature* pCreature) override; - void SetData(uint32 uiType, uint32 uiData); - uint32 GetData(uint32 uiType); + void SetData(uint32 uiType, uint32 uiData) override; + uint32 GetData(uint32 uiType) override; - bool CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/); + bool CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/) override; - const char* Save() { return m_strInstData.c_str(); } - void Load(const char* chrIn); + const char* Save() override { return m_strInstData.c_str(); } + void Load(const char* chrIn) override; - void Update(uint32 uiDiff); + void Update(uint32 uiDiff) override; typedef std::multimap BossToCellMap; diff --git a/scripts/northrend/zuldrak.cpp b/scripts/northrend/zuldrak.cpp index 701cb0e5d..37ba8ce2d 100644 --- a/scripts/northrend/zuldrak.cpp +++ b/scripts/northrend/zuldrak.cpp @@ -55,12 +55,12 @@ struct MANGOS_DLL_DECL npc_gurgthockAI : public ScriptedAI m_playerGuid = pPlayer->GetObjectGuid(); } - void Reset() + void Reset() override { m_playerGuid.Clear(); } - void SummonedCreatureJustDied(Creature* pSummoned) + void SummonedCreatureJustDied(Creature* pSummoned) override { uint32 uiEntry = pSummoned->GetEntry(); for (uint8 i = 0; i < 4; ++i) diff --git a/scripts/outland/auchindoun/auchenai_crypts/boss_exarch_maladaar.cpp b/scripts/outland/auchindoun/auchenai_crypts/boss_exarch_maladaar.cpp index 08f1b87cc..f2724f77a 100644 --- a/scripts/outland/auchindoun/auchenai_crypts/boss_exarch_maladaar.cpp +++ b/scripts/outland/auchindoun/auchenai_crypts/boss_exarch_maladaar.cpp @@ -54,7 +54,7 @@ struct MANGOS_DLL_DECL mob_stolen_soulAI : public ScriptedAI ObjectGuid m_targetGuid; - void Reset() + void Reset() override { m_uiSpellTimer = 1000; } @@ -66,13 +66,13 @@ struct MANGOS_DLL_DECL mob_stolen_soulAI : public ScriptedAI m_creature->SetDisplayId(pTarget->GetDisplayId()); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { if (Unit* pTarget = m_creature->GetMap()->GetUnit(m_targetGuid)) DoCastSpellIfCan(pTarget, SPELL_STOLEN_SOUL_DISPEL, CAST_TRIGGERED); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -175,7 +175,7 @@ struct MANGOS_DLL_DECL boss_exarch_maladaarAI : public ScriptedAI bool m_bHasTaunted; bool m_bHasSummonedAvatar; - void Reset() + void Reset() override { m_targetGuid.Clear(); @@ -186,7 +186,7 @@ struct MANGOS_DLL_DECL boss_exarch_maladaarAI : public ScriptedAI m_bHasSummonedAvatar = false; } - void MoveInLineOfSight(Unit* pWho) + void MoveInLineOfSight(Unit* pWho) override { if (!m_bHasTaunted && pWho->GetTypeId() == TYPEID_PLAYER && m_creature->IsWithinDistInMap(pWho, 150.0f) && m_creature->IsWithinLOSInMap(pWho)) { @@ -197,7 +197,7 @@ struct MANGOS_DLL_DECL boss_exarch_maladaarAI : public ScriptedAI ScriptedAI::MoveInLineOfSight(pWho); } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { switch (urand(0, 2)) { @@ -207,7 +207,7 @@ struct MANGOS_DLL_DECL boss_exarch_maladaarAI : public ScriptedAI } } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { if (pSummoned->GetEntry() == NPC_STOLEN_SOUL) { @@ -224,7 +224,7 @@ struct MANGOS_DLL_DECL boss_exarch_maladaarAI : public ScriptedAI } } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { if (urand(0, 1)) return; @@ -232,7 +232,7 @@ struct MANGOS_DLL_DECL boss_exarch_maladaarAI : public ScriptedAI DoScriptText(urand(0, 1) ? SAY_SLAY_1 : SAY_SLAY_2, m_creature); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoScriptText(SAY_DEATH, m_creature); @@ -240,13 +240,13 @@ struct MANGOS_DLL_DECL boss_exarch_maladaarAI : public ScriptedAI DoSpawnCreature(NPC_DORE, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN, 600000); } - void SpellHitTarget(Unit* pTarget, const SpellEntry* pSpell) + void SpellHitTarget(Unit* pTarget, const SpellEntry* pSpell) override { if (pSpell->Id == SPELL_STOLEN_SOUL && pTarget->GetTypeId() == TYPEID_PLAYER) DoSpawnCreature(NPC_STOLEN_SOUL, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 10000); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/outland/auchindoun/auchenai_crypts/boss_shirrak.cpp b/scripts/outland/auchindoun/auchenai_crypts/boss_shirrak.cpp index 1d41cf733..150848f3c 100644 --- a/scripts/outland/auchindoun/auchenai_crypts/boss_shirrak.cpp +++ b/scripts/outland/auchindoun/auchenai_crypts/boss_shirrak.cpp @@ -54,7 +54,7 @@ struct MANGOS_DLL_DECL boss_shirrakAI : public ScriptedAI ObjectGuid m_focusTargetGuid; - void Reset() + void Reset() override { m_uiCarnivorousBiteTimer = urand(4000, 7000); m_uiFocusFireTimer = 15000; @@ -64,14 +64,14 @@ struct MANGOS_DLL_DECL boss_shirrakAI : public ScriptedAI DoCastSpellIfCan(m_creature, SPELL_INHIBIT_MAGIC); } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { // The focus fire creature casts the focus fire visual if (pSummoned->GetEntry() == NPC_FOCUS_FIRE) pSummoned->CastSpell(pSummoned, SPELL_FOCUS_TARGET_VISUAL, true); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/outland/auchindoun/mana_tombs/boss_nexusprince_shaffar.cpp b/scripts/outland/auchindoun/mana_tombs/boss_nexusprince_shaffar.cpp index bbfb29630..e0a342bd9 100644 --- a/scripts/outland/auchindoun/mana_tombs/boss_nexusprince_shaffar.cpp +++ b/scripts/outland/auchindoun/mana_tombs/boss_nexusprince_shaffar.cpp @@ -64,7 +64,7 @@ struct MANGOS_DLL_DECL boss_nexusprince_shaffarAI : public ScriptedAI bool m_bHasTaunted; - void Reset() + void Reset() override { m_uiBlinkTimer = 30000; m_uiBeaconTimer = urand(12000, 15000); @@ -73,7 +73,7 @@ struct MANGOS_DLL_DECL boss_nexusprince_shaffarAI : public ScriptedAI m_uiFrostNovaTimer = urand(18000, 25000); } - void MoveInLineOfSight(Unit* pWho) + void MoveInLineOfSight(Unit* pWho) override { if (!m_bHasTaunted && pWho->GetTypeId() == TYPEID_PLAYER && m_creature->IsWithinDistInMap(pWho, 100.0f) && m_creature->IsWithinLOSInMap(pWho)) { @@ -84,7 +84,7 @@ struct MANGOS_DLL_DECL boss_nexusprince_shaffarAI : public ScriptedAI ScriptedAI::MoveInLineOfSight(pWho); } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { switch (urand(0, 2)) { @@ -94,23 +94,23 @@ struct MANGOS_DLL_DECL boss_nexusprince_shaffarAI : public ScriptedAI } } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) pSummoned->AI()->AttackStart(pTarget); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { DoScriptText(urand(0, 1) ? SAY_SLAY_1 : SAY_SLAY_2, m_creature); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoScriptText(SAY_DEAD, m_creature); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/outland/auchindoun/mana_tombs/boss_pandemonius.cpp b/scripts/outland/auchindoun/mana_tombs/boss_pandemonius.cpp index 7a5192418..925407819 100644 --- a/scripts/outland/auchindoun/mana_tombs/boss_pandemonius.cpp +++ b/scripts/outland/auchindoun/mana_tombs/boss_pandemonius.cpp @@ -55,24 +55,24 @@ struct MANGOS_DLL_DECL boss_pandemoniusAI : public ScriptedAI uint32 m_uiDarkShellTimer; uint8 m_uiVoidBlastCounter; - void Reset() + void Reset() override { m_uiVoidBlastTimer = urand(15000, 20000); m_uiDarkShellTimer = 15000; m_uiVoidBlastCounter = 0; } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoScriptText(SAY_DEATH, m_creature); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { DoScriptText(urand(0, 1) ? SAY_KILL_1 : SAY_KILL_2, m_creature); } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { switch (urand(0, 2)) { @@ -82,7 +82,7 @@ struct MANGOS_DLL_DECL boss_pandemoniusAI : public ScriptedAI } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/outland/auchindoun/sethekk_halls/boss_anzu.cpp b/scripts/outland/auchindoun/sethekk_halls/boss_anzu.cpp index 767b534de..7a0284038 100644 --- a/scripts/outland/auchindoun/sethekk_halls/boss_anzu.cpp +++ b/scripts/outland/auchindoun/sethekk_halls/boss_anzu.cpp @@ -68,7 +68,7 @@ struct MANGOS_DLL_DECL boss_anzuAI : public ScriptedAI GuidList m_lBirdsGuidList; - void Reset() + void Reset() override { m_uiFleshRipTimer = urand(9000, 10000); m_uiScreechTimer = 23000; @@ -77,7 +77,7 @@ struct MANGOS_DLL_DECL boss_anzuAI : public ScriptedAI m_fHealthCheck = 75.0f; } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { // Note: this should be moved to the intro event when implemented! DoSummonBirdHelpers(); @@ -86,7 +86,7 @@ struct MANGOS_DLL_DECL boss_anzuAI : public ScriptedAI m_pInstance->SetData(TYPE_ANZU, IN_PROGRESS); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DespawnBirdHelpers(); @@ -94,7 +94,7 @@ struct MANGOS_DLL_DECL boss_anzuAI : public ScriptedAI m_pInstance->SetData(TYPE_ANZU, DONE); } - void JustReachedHome() + void JustReachedHome() override { DespawnBirdHelpers(); m_creature->ForcedDespawn(); @@ -103,7 +103,7 @@ struct MANGOS_DLL_DECL boss_anzuAI : public ScriptedAI m_pInstance->SetData(TYPE_ANZU, FAIL); } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { if (pSummoned->GetEntry() == NPC_BROOD_OF_ANZU) { @@ -154,7 +154,7 @@ struct MANGOS_DLL_DECL boss_anzuAI : public ScriptedAI } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/outland/auchindoun/sethekk_halls/boss_darkweaver_syth.cpp b/scripts/outland/auchindoun/sethekk_halls/boss_darkweaver_syth.cpp index 60577af28..7874ea440 100644 --- a/scripts/outland/auchindoun/sethekk_halls/boss_darkweaver_syth.cpp +++ b/scripts/outland/auchindoun/sethekk_halls/boss_darkweaver_syth.cpp @@ -74,7 +74,7 @@ struct MANGOS_DLL_DECL boss_darkweaver_sythAI : public ScriptedAI float m_fHpCheck; - void Reset() + void Reset() override { m_uiFlameshockTimer = 18000; m_uiArcaneshockTimer = 19000; @@ -85,7 +85,7 @@ struct MANGOS_DLL_DECL boss_darkweaver_sythAI : public ScriptedAI m_fHpCheck = 90.0f; } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { switch (urand(0, 2)) { @@ -95,12 +95,12 @@ struct MANGOS_DLL_DECL boss_darkweaver_sythAI : public ScriptedAI } } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoScriptText(SAY_DEATH, m_creature); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { if (urand(0, 1)) return; @@ -108,7 +108,7 @@ struct MANGOS_DLL_DECL boss_darkweaver_sythAI : public ScriptedAI DoScriptText(urand(0, 1) ? SAY_SLAY_1 : SAY_SLAY_2, m_creature); } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { switch (pSummoned->GetEntry()) { @@ -144,7 +144,7 @@ struct MANGOS_DLL_DECL boss_darkweaver_sythAI : public ScriptedAI DoCastSpellIfCan(m_creature, SPELL_SUMMON_SYTH_SHADOW, CAST_TRIGGERED); // right } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/outland/auchindoun/sethekk_halls/boss_talon_king_ikiss.cpp b/scripts/outland/auchindoun/sethekk_halls/boss_talon_king_ikiss.cpp index a2da14744..5c3f8c788 100644 --- a/scripts/outland/auchindoun/sethekk_halls/boss_talon_king_ikiss.cpp +++ b/scripts/outland/auchindoun/sethekk_halls/boss_talon_king_ikiss.cpp @@ -73,7 +73,7 @@ struct MANGOS_DLL_DECL boss_talon_king_ikissAI : public ScriptedAI bool m_bBlink; bool m_bIntro; - void Reset() + void Reset() override { m_uiArcaneVolleyTimer = urand(5000, 12000); m_uiSheepTimer = 8000; @@ -85,7 +85,7 @@ struct MANGOS_DLL_DECL boss_talon_king_ikissAI : public ScriptedAI m_bManaShield = false; } - void MoveInLineOfSight(Unit* pWho) + void MoveInLineOfSight(Unit* pWho) override { if (!m_creature->getVictim() && pWho->isTargetableForAttack() && (m_creature->IsHostileTo(pWho)) && pWho->isInAccessablePlaceFor(m_creature)) { @@ -99,7 +99,7 @@ struct MANGOS_DLL_DECL boss_talon_king_ikissAI : public ScriptedAI ScriptedAI::MoveInLineOfSight(pWho); } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { switch (urand(0, 2)) { @@ -112,7 +112,7 @@ struct MANGOS_DLL_DECL boss_talon_king_ikissAI : public ScriptedAI m_pInstance->SetData(TYPE_IKISS, IN_PROGRESS); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoScriptText(SAY_DEATH, m_creature); @@ -120,18 +120,18 @@ struct MANGOS_DLL_DECL boss_talon_king_ikissAI : public ScriptedAI m_pInstance->SetData(TYPE_IKISS, DONE); } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_IKISS, FAIL); } - void KilledUnit(Unit* pVctim) + void KilledUnit(Unit* pVctim) override { DoScriptText(urand(0, 1) ? SAY_SLAY_1 : SAY_SLAY_2, m_creature); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/outland/auchindoun/sethekk_halls/sethekk_halls.h b/scripts/outland/auchindoun/sethekk_halls/sethekk_halls.h index 6ffa5aed9..8683528fd 100644 --- a/scripts/outland/auchindoun/sethekk_halls/sethekk_halls.h +++ b/scripts/outland/auchindoun/sethekk_halls/sethekk_halls.h @@ -41,18 +41,18 @@ class MANGOS_DLL_DECL instance_sethekk_halls : public ScriptedInstance instance_sethekk_halls(Map* pMap); ~instance_sethekk_halls() {} - void Initialize(); + void Initialize() override; - void OnCreatureCreate(Creature* pCreature); - void OnObjectCreate(GameObject* pGo); + void OnCreatureCreate(Creature* pCreature) override; + void OnObjectCreate(GameObject* pGo) override; - void SetData(uint32 uiType, uint32 uiData); - uint32 GetData(uint32 uiType); + void SetData(uint32 uiType, uint32 uiData) override; + uint32 GetData(uint32 uiType) override; - bool CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/); + bool CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/) override; - const char* Save() { return m_strInstData.c_str(); } - void Load(const char* chrIn); + const char* Save() override { return m_strInstData.c_str(); } + void Load(const char* chrIn) override; private: uint32 m_auiEncounter[MAX_ENCOUNTER]; diff --git a/scripts/outland/auchindoun/shadow_labyrinth/boss_ambassador_hellmaw.cpp b/scripts/outland/auchindoun/shadow_labyrinth/boss_ambassador_hellmaw.cpp index 3654d56e2..4486b1310 100644 --- a/scripts/outland/auchindoun/shadow_labyrinth/boss_ambassador_hellmaw.cpp +++ b/scripts/outland/auchindoun/shadow_labyrinth/boss_ambassador_hellmaw.cpp @@ -64,7 +64,7 @@ struct MANGOS_DLL_DECL boss_ambassador_hellmawAI : public ScriptedAI uint32 m_uiEnrageTimer; bool m_bIsEnraged; - void Reset() + void Reset() override { m_uiCorrosiveAcidTimer = urand(20000, 23000); m_uiFearTimer = urand(20000, 26000); @@ -72,13 +72,13 @@ struct MANGOS_DLL_DECL boss_ambassador_hellmawAI : public ScriptedAI m_bIsEnraged = false; } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_HELLMAW, FAIL); } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { switch (urand(0, 2)) { @@ -91,12 +91,12 @@ struct MANGOS_DLL_DECL boss_ambassador_hellmawAI : public ScriptedAI m_pInstance->SetData(TYPE_HELLMAW, IN_PROGRESS); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { DoScriptText(urand(0, 1) ? SAY_SLAY_1 : SAY_SLAY_2, m_creature); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoScriptText(SAY_DEATH, m_creature); @@ -104,7 +104,7 @@ struct MANGOS_DLL_DECL boss_ambassador_hellmawAI : public ScriptedAI m_pInstance->SetData(TYPE_HELLMAW, DONE); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/outland/auchindoun/shadow_labyrinth/boss_blackheart_the_inciter.cpp b/scripts/outland/auchindoun/shadow_labyrinth/boss_blackheart_the_inciter.cpp index 39cd5e85a..62f74688c 100644 --- a/scripts/outland/auchindoun/shadow_labyrinth/boss_blackheart_the_inciter.cpp +++ b/scripts/outland/auchindoun/shadow_labyrinth/boss_blackheart_the_inciter.cpp @@ -67,19 +67,19 @@ struct MANGOS_DLL_DECL boss_blackheart_the_inciterAI : public ScriptedAI uint32 m_uiChargeTimer; uint32 m_uiKnockbackTimer; - void Reset() + void Reset() override { m_uiInciteChaosTimer = 50000; m_uiChargeTimer = urand(30000, 37000); m_uiKnockbackTimer = urand(10000, 14000); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { DoScriptText(urand(0, 1) ? SAY_SLAY1 : SAY_SLAY2, m_creature); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoScriptText(SAY_DEATH, m_creature); @@ -87,7 +87,7 @@ struct MANGOS_DLL_DECL boss_blackheart_the_inciterAI : public ScriptedAI m_pInstance->SetData(TYPE_INCITER, DONE); } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { switch (urand(0, 2)) { @@ -100,13 +100,13 @@ struct MANGOS_DLL_DECL boss_blackheart_the_inciterAI : public ScriptedAI m_pInstance->SetData(TYPE_INCITER, IN_PROGRESS); } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_INCITER, FAIL); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { // Return since we have no pTarget if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) diff --git a/scripts/outland/auchindoun/shadow_labyrinth/boss_grandmaster_vorpil.cpp b/scripts/outland/auchindoun/shadow_labyrinth/boss_grandmaster_vorpil.cpp index e6daa9d98..13540a5c2 100644 --- a/scripts/outland/auchindoun/shadow_labyrinth/boss_grandmaster_vorpil.cpp +++ b/scripts/outland/auchindoun/shadow_labyrinth/boss_grandmaster_vorpil.cpp @@ -97,7 +97,7 @@ struct MANGOS_DLL_DECL boss_grandmaster_vorpilAI : public ScriptedAI uint32 m_uiBanishTimer; bool m_bHasDoneIntro; - void Reset() + void Reset() override { m_uiShadowBoltVolleyTimer = urand(13000, 19000); m_uiDrawShadowsTimer = urand(38000, 44000); @@ -106,7 +106,7 @@ struct MANGOS_DLL_DECL boss_grandmaster_vorpilAI : public ScriptedAI m_uiBanishTimer = urand(12000, 16000); } - void MoveInLineOfSight(Unit* pWho) + void MoveInLineOfSight(Unit* pWho) override { // not sure about right radius if (!m_bHasDoneIntro && pWho->GetTypeId() == TYPEID_PLAYER && pWho->IsWithinDistInMap(m_creature, 50.0f) && pWho->IsWithinLOSInMap(m_creature)) @@ -118,7 +118,7 @@ struct MANGOS_DLL_DECL boss_grandmaster_vorpilAI : public ScriptedAI ScriptedAI::MoveInLineOfSight(pWho); } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { switch (urand(0, 2)) { @@ -137,18 +137,18 @@ struct MANGOS_DLL_DECL boss_grandmaster_vorpilAI : public ScriptedAI m_pInstance->SetData(TYPE_VORPIL, IN_PROGRESS); } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_VORPIL, FAIL); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { DoScriptText(urand(0, 1) ? SAY_SLAY_1 : SAY_SLAY_2, m_creature); } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { if (pSummoned->GetEntry() == NPC_VOID_TRAVELER) pSummoned->GetMotionMaster()->MoveFollow(m_creature, 0.0f, 0.0f); @@ -157,7 +157,7 @@ struct MANGOS_DLL_DECL boss_grandmaster_vorpilAI : public ScriptedAI pSummoned->CastSpell(pSummoned, SPELL_VOID_PORTAL_VISUAL, true); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoScriptText(SAY_DEATH, m_creature); @@ -186,7 +186,7 @@ struct MANGOS_DLL_DECL boss_grandmaster_vorpilAI : public ScriptedAI } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { // Return since we have no target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) @@ -271,13 +271,13 @@ struct MANGOS_DLL_DECL npc_void_travelerAI : public ScriptedAI uint32 m_uiDeathTimer; - void Reset() + void Reset() override { m_uiDeathTimer = 0; m_bHasExploded = false; } - void MoveInLineOfSight(Unit* pWho) + void MoveInLineOfSight(Unit* pWho) override { if (!m_bHasExploded && pWho->GetEntry() == NPC_VORPIL && pWho->IsWithinDistInMap(m_creature, 3.0f)) { @@ -289,9 +289,9 @@ struct MANGOS_DLL_DECL npc_void_travelerAI : public ScriptedAI } } - void AttackStart(Unit* pWho) { } + void AttackStart(Unit* pWho) override { } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (m_uiDeathTimer) { diff --git a/scripts/outland/auchindoun/shadow_labyrinth/boss_murmur.cpp b/scripts/outland/auchindoun/shadow_labyrinth/boss_murmur.cpp index 0fcdc2f36..2e0e0b376 100644 --- a/scripts/outland/auchindoun/shadow_labyrinth/boss_murmur.cpp +++ b/scripts/outland/auchindoun/shadow_labyrinth/boss_murmur.cpp @@ -63,7 +63,7 @@ struct MANGOS_DLL_DECL boss_murmurAI : public Scripted_NoMovementAI uint32 m_uiSonicShockTimer; uint32 m_uiThunderingStormTimer; - void Reset() + void Reset() override { m_uiSonicBoomTimer = urand(21000, 35000); m_uiMurmursTouchTimer = urand(9000, 18000); @@ -76,7 +76,7 @@ struct MANGOS_DLL_DECL boss_murmurAI : public Scripted_NoMovementAI m_creature->SetHealth(uint32(m_creature->GetMaxHealth()*.4)); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { // Return since we have no target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) diff --git a/scripts/outland/auchindoun/shadow_labyrinth/shadow_labyrinth.h b/scripts/outland/auchindoun/shadow_labyrinth/shadow_labyrinth.h index 9a49435ea..52b35e8ba 100644 --- a/scripts/outland/auchindoun/shadow_labyrinth/shadow_labyrinth.h +++ b/scripts/outland/auchindoun/shadow_labyrinth/shadow_labyrinth.h @@ -32,16 +32,16 @@ class MANGOS_DLL_DECL instance_shadow_labyrinth : public ScriptedInstance public: instance_shadow_labyrinth(Map* pMap); - void Initialize(); + void Initialize() override; - void OnObjectCreate(GameObject* pGo); - void OnCreatureCreate(Creature* pCreature); + void OnObjectCreate(GameObject* pGo) override; + void OnCreatureCreate(Creature* pCreature) override; - void SetData(uint32 uiType, uint32 uiData); - uint32 GetData(uint32 uiType); + void SetData(uint32 uiType, uint32 uiData) override; + uint32 GetData(uint32 uiType) override; - const char* Save() { return m_strInstData.c_str(); } - void Load(const char* chrIn); + const char* Save() override { return m_strInstData.c_str(); } + void Load(const char* chrIn) override; private: uint32 m_auiEncounter[MAX_ENCOUNTER]; diff --git a/scripts/outland/black_temple/black_temple.h b/scripts/outland/black_temple/black_temple.h index 542392f48..dbe4f8edd 100644 --- a/scripts/outland/black_temple/black_temple.h +++ b/scripts/outland/black_temple/black_temple.h @@ -60,23 +60,23 @@ class MANGOS_DLL_DECL instance_black_temple : public ScriptedInstance public: instance_black_temple(Map* pMap); - void Initialize(); + void Initialize() override; - bool IsEncounterInProgress() const; + bool IsEncounterInProgress() const override; - void OnPlayerEnter(Player* pPlayer); - void OnCreatureCreate(Creature* pCreature); - void OnObjectCreate(GameObject* pGo); + void OnPlayerEnter(Player* pPlayer) override; + void OnCreatureCreate(Creature* pCreature) override; + void OnObjectCreate(GameObject* pGo) override; - void SetData(uint32 uiType, uint32 uiData); - uint32 GetData(uint32 uiType); + void SetData(uint32 uiType, uint32 uiData) override; + uint32 GetData(uint32 uiType) override; void GetChannelersGuidList(GuidList& lList) { lList = m_lChannelersGuidList; } void GetGeneratorGuidVector(GuidVector& vVector) { vVector = m_vCreatureGeneratorGuidVector; } void GetGlaiveTargetGuidVector(GuidVector& vVector) { vVector = m_vGlaiveTargetGuidVector; } - const char* Save() { return m_strInstData.c_str(); } - void Load(const char* chrIn); + const char* Save() override { return m_strInstData.c_str(); } + void Load(const char* chrIn) override; private: void DoOpenPreMotherDoor(); diff --git a/scripts/outland/black_temple/boss_bloodboil.cpp b/scripts/outland/black_temple/boss_bloodboil.cpp index c41eaa6bd..092087b79 100644 --- a/scripts/outland/black_temple/boss_bloodboil.cpp +++ b/scripts/outland/black_temple/boss_bloodboil.cpp @@ -89,7 +89,7 @@ struct MANGOS_DLL_DECL boss_gurtogg_bloodboilAI : public ScriptedAI bool m_bIsPhase1; - void Reset() + void Reset() override { m_uiBloodboilTimer = 10000; m_uiBloodboilCount = 0; @@ -105,13 +105,13 @@ struct MANGOS_DLL_DECL boss_gurtogg_bloodboilAI : public ScriptedAI m_bIsPhase1 = true; } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_BLOODBOIL, FAIL); } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoScriptText(SAY_AGGRO, m_creature); @@ -119,12 +119,12 @@ struct MANGOS_DLL_DECL boss_gurtogg_bloodboilAI : public ScriptedAI m_pInstance->SetData(TYPE_BLOODBOIL, IN_PROGRESS); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { DoScriptText(urand(0, 1) ? SAY_SLAY1 : SAY_SLAY2, m_creature); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { if (m_pInstance) m_pInstance->SetData(TYPE_BLOODBOIL, DONE); @@ -132,7 +132,7 @@ struct MANGOS_DLL_DECL boss_gurtogg_bloodboilAI : public ScriptedAI DoScriptText(SAY_DEATH, m_creature); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/outland/black_temple/boss_illidan.cpp b/scripts/outland/black_temple/boss_illidan.cpp index 15dac4e0e..1d410a643 100644 --- a/scripts/outland/black_temple/boss_illidan.cpp +++ b/scripts/outland/black_temple/boss_illidan.cpp @@ -349,7 +349,7 @@ struct MANGOS_DLL_DECL boss_illidan_stormrageAI : public ScriptedAI, private Dia GuidList m_lBladesGuidList; - void Reset() + void Reset() override { m_uiPhase = PHASE_AKAMA; m_uiBerserkTimer = 25 * MINUTE * IN_MILLISECONDS; @@ -391,27 +391,27 @@ struct MANGOS_DLL_DECL boss_illidan_stormrageAI : public ScriptedAI, private Dia SetEquipmentSlots(false, EQUIP_UNEQUIP, EQUIP_UNEQUIP, EQUIP_NO_CHANGE); } - void GetAIInformation(ChatHandler& reader) + void GetAIInformation(ChatHandler& reader) override { reader.PSendSysMessage("Boss Illidan, current uiPhase = %u", m_uiPhase); } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { if (m_pInstance) m_pInstance->SetData(TYPE_ILLIDAN, IN_PROGRESS); } // Do not attack using LoS function. The attack is triggered in script - void MoveInLineOfSight(Unit* pWho) { } + void MoveInLineOfSight(Unit* pWho) override { } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_ILLIDAN, FAIL); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); @@ -419,7 +419,7 @@ struct MANGOS_DLL_DECL boss_illidan_stormrageAI : public ScriptedAI, private Dia m_pInstance->SetData(TYPE_ILLIDAN, DONE); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { if (pVictim->GetTypeId() != TYPEID_PLAYER) return; @@ -427,7 +427,7 @@ struct MANGOS_DLL_DECL boss_illidan_stormrageAI : public ScriptedAI, private Dia DoScriptText(urand(0, 1) ? SAY_KILL1 : SAY_KILL2, m_creature); } - void DamageTaken(Unit* pDealer, uint32& uiDamage) + void DamageTaken(Unit* pDealer, uint32& uiDamage) override { if (uiDamage < m_creature->GetHealth()) return; @@ -460,7 +460,7 @@ struct MANGOS_DLL_DECL boss_illidan_stormrageAI : public ScriptedAI, private Dia } } - void JustDidDialogueStep(int32 iEntry) + void JustDidDialogueStep(int32 iEntry) override { switch (iEntry) { @@ -540,7 +540,7 @@ struct MANGOS_DLL_DECL boss_illidan_stormrageAI : public ScriptedAI, private Dia } } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { switch (pSummoned->GetEntry()) { @@ -625,7 +625,7 @@ struct MANGOS_DLL_DECL boss_illidan_stormrageAI : public ScriptedAI, private Dia return true; } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { DialogueUpdate(uiDiff); @@ -1023,7 +1023,7 @@ struct MANGOS_DLL_DECL npc_akama_illidanAI : public npc_escortAI, private Dialog bool m_bFightMinions; bool m_bIsIntroFinished; - void Reset() + void Reset() override { m_uiSummonMinionTimer = 2000; m_uiHealDelayTimer = 0; @@ -1036,7 +1036,7 @@ struct MANGOS_DLL_DECL npc_akama_illidanAI : public npc_escortAI, private Dialog } } - void MoveInLineOfSight(Unit* pWho) + void MoveInLineOfSight(Unit* pWho) override { if (HasEscortState(STATE_ESCORT_ESCORTING)) return; @@ -1046,7 +1046,7 @@ struct MANGOS_DLL_DECL npc_akama_illidanAI : public npc_escortAI, private Dialog Start(true); } - void AttackStart(Unit* pWho) + void AttackStart(Unit* pWho) override { // Don't attack Illidan again if (m_bIsIntroFinished && pWho->GetEntry() == NPC_ILLIDAN_STORMRAGE) @@ -1055,7 +1055,7 @@ struct MANGOS_DLL_DECL npc_akama_illidanAI : public npc_escortAI, private Dialog npc_escortAI::AttackStart(pWho); } - void EnterEvadeMode() + void EnterEvadeMode() override { // Called first when evading from Illidan if (!m_bIsIntroFinished) @@ -1074,7 +1074,7 @@ struct MANGOS_DLL_DECL npc_akama_illidanAI : public npc_escortAI, private Dialog npc_escortAI::EnterEvadeMode(); } - void WaypointReached(uint32 uiPointId) + void WaypointReached(uint32 uiPointId) override { switch (uiPointId) { @@ -1133,7 +1133,7 @@ struct MANGOS_DLL_DECL npc_akama_illidanAI : public npc_escortAI, private Dialog } } - void MovementInform(uint32 uiMoveType, uint32 uiPointId) + void MovementInform(uint32 uiMoveType, uint32 uiPointId) override { npc_escortAI::MovementInform(uiMoveType, uiPointId); @@ -1151,7 +1151,7 @@ struct MANGOS_DLL_DECL npc_akama_illidanAI : public npc_escortAI, private Dialog m_creature->ForcedDespawn(10000); } - void JustDidDialogueStep(int32 iEntry) + void JustDidDialogueStep(int32 iEntry) override { switch (iEntry) { @@ -1182,7 +1182,7 @@ struct MANGOS_DLL_DECL npc_akama_illidanAI : public npc_escortAI, private Dialog } } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { switch (pSummoned->GetEntry()) { @@ -1203,7 +1203,7 @@ struct MANGOS_DLL_DECL npc_akama_illidanAI : public npc_escortAI, private Dialog m_creature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); } - void UpdateEscortAI(const uint32 uiDiff) + void UpdateEscortAI(const uint32 uiDiff) override { DialogueUpdate(uiDiff); @@ -1305,7 +1305,7 @@ struct MANGOS_DLL_DECL boss_maievAI : public ScriptedAI, private DialogueHelper bool m_bHasYelledTrap; - void Reset() + void Reset() override { m_uiTauntTimer = urand(40000, 60000); m_uiShadowStriketimer = urand(4000, 8000); @@ -1316,7 +1316,7 @@ struct MANGOS_DLL_DECL boss_maievAI : public ScriptedAI, private DialogueHelper m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_SHADOW, true); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { // Dummy function - used to start the epilogue if (pVictim->GetEntry() == NPC_ILLIDAN_STORMRAGE) @@ -1324,7 +1324,7 @@ struct MANGOS_DLL_DECL boss_maievAI : public ScriptedAI, private DialogueHelper } // Custom evade - don't allow her to return to home position - void EnterEvadeMode() + void EnterEvadeMode() override { m_creature->RemoveAllAuras(); m_creature->DeleteThreatList(); @@ -1337,9 +1337,9 @@ struct MANGOS_DLL_DECL boss_maievAI : public ScriptedAI, private DialogueHelper } // Attack only by script - void MoveInLineOfSight(Unit* pWho) { } + void MoveInLineOfSight(Unit* pWho) override { } - void JustDidDialogueStep(int32 iEntry) + void JustDidDialogueStep(int32 iEntry) override { switch (iEntry) { @@ -1357,7 +1357,7 @@ struct MANGOS_DLL_DECL boss_maievAI : public ScriptedAI, private DialogueHelper } } - void SpellHit(Unit* pCaster, const SpellEntry* pSpell) + void SpellHit(Unit* pCaster, const SpellEntry* pSpell) override { if (pSpell->Id == SPELL_CAGE_TRAP) { @@ -1371,7 +1371,7 @@ struct MANGOS_DLL_DECL boss_maievAI : public ScriptedAI, private DialogueHelper } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { DialogueUpdate(uiDiff); @@ -1421,14 +1421,14 @@ struct MANGOS_DLL_DECL npc_cage_trap_triggerAI : public ScriptedAI bool m_bActive; - void Reset() + void Reset() override { m_bActive = false; } - void AttackStart(Unit* pWho) { } + void AttackStart(Unit* pWho) override { } - void MoveInLineOfSight(Unit* pWho) + void MoveInLineOfSight(Unit* pWho) override { if (!m_bActive && pWho->GetEntry() == NPC_ILLIDAN_STORMRAGE && m_creature->IsWithinDistInMap(pWho, 3.0f)) { @@ -1449,7 +1449,7 @@ struct MANGOS_DLL_DECL npc_cage_trap_triggerAI : public ScriptedAI } } - void UpdateAI(const uint32 uiDiff) { } + void UpdateAI(const uint32 uiDiff) override { } }; /*###### @@ -1465,7 +1465,7 @@ struct MANGOS_DLL_DECL npc_flame_of_azzinothAI : public ScriptedAI uint32 m_uiChargeTimer; uint32 m_uiWrathCheckTimer; - void Reset() + void Reset() override { m_uiFlameBlastTimer = 10000; m_uiSummonBlazeTimer = 0; @@ -1473,13 +1473,13 @@ struct MANGOS_DLL_DECL npc_flame_of_azzinothAI : public ScriptedAI m_uiWrathCheckTimer = 1000; } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { if (pSummoned->GetEntry() == NPC_BLAZE) pSummoned->CastSpell(pSummoned, SPELL_BLAZE_EFFECT, false); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -1570,23 +1570,23 @@ struct MANGOS_DLL_DECL npc_shadow_demonAI : public ScriptedAI ObjectGuid m_targetGuid; - void Reset() {} + void Reset() override {} - void AttackStart(Unit* pWho) + void AttackStart(Unit* pWho) override { // Function used to set target only - the npc doesn't really attack m_targetGuid = pWho->GetObjectGuid(); } - void MoveInLineOfSight(Unit* pWho) { } + void MoveInLineOfSight(Unit* pWho) override { } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { if (Player* pPlayer = m_creature->GetMap()->GetPlayer(m_targetGuid)) pPlayer->RemoveAurasDueToSpell(SPELL_PARALYZE); } - void MovementInform(uint32 uiMovementType, uint32 uiPointId) + void MovementInform(uint32 uiMovementType, uint32 uiPointId) override { if (uiMovementType != POINT_MOTION_TYPE || !uiPointId) return; @@ -1598,7 +1598,7 @@ struct MANGOS_DLL_DECL npc_shadow_demonAI : public ScriptedAI } } - void UpdateAI(const uint32 uiDiff) { } + void UpdateAI(const uint32 uiDiff) override { } }; /*###### @@ -1615,13 +1615,13 @@ struct MANGOS_DLL_DECL npc_blade_of_azzinothAI : public ScriptedAI ScriptedInstance* m_pInstance; - void Reset() {} + void Reset() override {} // Do-Nothing-But-Stand-There - void AttackStart(Unit* pWho) { } - void MoveInLineOfSight(Unit* pWho) { } + void AttackStart(Unit* pWho) override { } + void MoveInLineOfSight(Unit* pWho) override { } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { // Summon a Flame pear each blade if (pSummoned->GetEntry() == NPC_FLAME_OF_AZZINOTH) @@ -1631,7 +1631,7 @@ struct MANGOS_DLL_DECL npc_blade_of_azzinothAI : public ScriptedAI } } - void SummonedCreatureJustDied(Creature* pSummoned) + void SummonedCreatureJustDied(Creature* pSummoned) override { // Inform Illidan when a flame is killed if (pSummoned->GetEntry() == NPC_FLAME_OF_AZZINOTH) @@ -1648,7 +1648,7 @@ struct MANGOS_DLL_DECL npc_blade_of_azzinothAI : public ScriptedAI } } - void UpdateAI(const uint32 uiDiff) { } + void UpdateAI(const uint32 uiDiff) override { } }; CreatureAI* GetAI_boss_illidan_stormrage(Creature* pCreature) diff --git a/scripts/outland/black_temple/boss_mother_shahraz.cpp b/scripts/outland/black_temple/boss_mother_shahraz.cpp index ea50c5172..3b003d209 100644 --- a/scripts/outland/black_temple/boss_mother_shahraz.cpp +++ b/scripts/outland/black_temple/boss_mother_shahraz.cpp @@ -83,7 +83,7 @@ struct MANGOS_DLL_DECL boss_shahrazAI : public ScriptedAI bool m_bIsEnraged; - void Reset() + void Reset() override { m_uiBeamTimer = urand(5000, 10000); m_uiCurrentBeam = urand(0, 3); @@ -99,7 +99,7 @@ struct MANGOS_DLL_DECL boss_shahrazAI : public ScriptedAI // DoCastSpellIfCan(m_creature, SPELL_SABER_LASH_PROC); } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { if (m_pInstance) m_pInstance->SetData(TYPE_SHAHRAZ, IN_PROGRESS); @@ -107,18 +107,18 @@ struct MANGOS_DLL_DECL boss_shahrazAI : public ScriptedAI DoScriptText(SAY_AGGRO, m_creature); } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_SHAHRAZ, FAIL); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { DoScriptText(urand(0, 1) ? SAY_SLAY_1 : SAY_SLAY_2, m_creature); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { if (m_pInstance) m_pInstance->SetData(TYPE_SHAHRAZ, DONE); @@ -126,7 +126,7 @@ struct MANGOS_DLL_DECL boss_shahrazAI : public ScriptedAI DoScriptText(SAY_DEATH, m_creature); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/outland/black_temple/boss_reliquary_of_souls.cpp b/scripts/outland/black_temple/boss_reliquary_of_souls.cpp index 9dc9daed2..d6de2fa84 100644 --- a/scripts/outland/black_temple/boss_reliquary_of_souls.cpp +++ b/scripts/outland/black_temple/boss_reliquary_of_souls.cpp @@ -124,7 +124,7 @@ struct MANGOS_DLL_DECL boss_reliquary_of_soulsAI : public Scripted_NoMovementAI uint32 m_uiAnimationTimer; uint32 m_uiAnimResetTimer; - void Reset() + void Reset() override { m_uiPhase = PHASE_0_NOT_BEGUN; m_uiSoulDeathCount = 0; @@ -139,21 +139,21 @@ struct MANGOS_DLL_DECL boss_reliquary_of_soulsAI : public Scripted_NoMovementAI m_creature->HandleEmote(EMOTE_STATE_NONE); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { if (m_pInstance) m_pInstance->SetData(TYPE_RELIQUIARY, DONE); } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_RELIQUIARY, FAIL); } - void AttackStart(Unit* pWho) { } + void AttackStart(Unit* pWho) override { } - void MoveInLineOfSight(Unit* pWho) + void MoveInLineOfSight(Unit* pWho) override { if (m_uiPhase == PHASE_0_NOT_BEGUN && pWho->GetTypeId() == TYPEID_PLAYER && !((Player*)pWho)->isGameMaster() && m_creature->IsWithinDistInMap(pWho, m_creature->GetAttackDistance(pWho)) && m_creature->IsWithinLOSInMap(pWho)) @@ -175,7 +175,7 @@ struct MANGOS_DLL_DECL boss_reliquary_of_soulsAI : public Scripted_NoMovementAI } } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { switch (pSummoned->GetEntry()) { @@ -194,14 +194,14 @@ struct MANGOS_DLL_DECL boss_reliquary_of_soulsAI : public Scripted_NoMovementAI pSummoned->SetInCombatWithZone(); } - void SummonedCreatureJustDied(Creature* pSummoned) + void SummonedCreatureJustDied(Creature* pSummoned) override { // Self kill when the Essence of Anger is killed if (pSummoned->GetEntry() == NPC_ESSENCE_ANGER) m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); } - void SummonedMovementInform(Creature* pSummoned, uint32 uiMoveType, uint32 uiPointId) + void SummonedMovementInform(Creature* pSummoned, uint32 uiMoveType, uint32 uiPointId) override { if (uiMoveType != POINT_MOTION_TYPE || !uiPointId) return; @@ -242,7 +242,7 @@ struct MANGOS_DLL_DECL boss_reliquary_of_soulsAI : public Scripted_NoMovementAI } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { // Animation for opening the Reliquary if (m_uiAnimationTimer) @@ -335,7 +335,7 @@ struct MANGOS_DLL_DECL essence_base_AI : public ScriptedAI virtual void OnPhaseFinished() {} - void JustReachedHome() + void JustReachedHome() override { // Reset encounter and despawn Essence if (m_pInstance) @@ -347,7 +347,7 @@ struct MANGOS_DLL_DECL essence_base_AI : public ScriptedAI m_creature->ForcedDespawn(); } - void DamageTaken(Unit* pKiller, uint32& uiDamage) + void DamageTaken(Unit* pKiller, uint32& uiDamage) override { if (uiDamage < m_creature->GetHealth()) return; @@ -396,7 +396,7 @@ struct MANGOS_DLL_DECL boss_essence_of_sufferingAI : public essence_base_AI uint32 m_uiEnrageTimer; uint32 m_uiSoulDrainTimer; - void Reset() + void Reset() override { DoCastSpellIfCan(m_creature, SPELL_AURA_OF_SUFFERING, CAST_TRIGGERED); DoCastSpellIfCan(m_creature, SPELL_SUFFERING_PASSIVE, CAST_TRIGGERED); @@ -405,7 +405,7 @@ struct MANGOS_DLL_DECL boss_essence_of_sufferingAI : public essence_base_AI m_uiSoulDrainTimer = 20000; } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { DoScriptText(urand(0, 1) ? SUFF_SAY_SLAY1 : SUFF_SAY_SLAY2, m_creature); } @@ -415,7 +415,7 @@ struct MANGOS_DLL_DECL boss_essence_of_sufferingAI : public essence_base_AI DoScriptText(SUFF_SAY_RECAP, m_creature); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -456,7 +456,7 @@ struct MANGOS_DLL_DECL boss_essence_of_desireAI : public essence_base_AI uint32 m_uiDeadenTimer; uint32 m_uiSoulShockTimer; - void Reset() + void Reset() override { m_uiRuneShieldTimer = urand(10000, 15000); m_uiDeadenTimer = 15000; @@ -465,7 +465,7 @@ struct MANGOS_DLL_DECL boss_essence_of_desireAI : public essence_base_AI DoCastSpellIfCan(m_creature, SPELL_AURA_OF_DESIRE); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { switch (urand(0, 2)) { @@ -480,7 +480,7 @@ struct MANGOS_DLL_DECL boss_essence_of_desireAI : public essence_base_AI DoScriptText(DESI_SAY_RECAP, m_creature); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -534,7 +534,7 @@ struct MANGOS_DLL_DECL boss_essence_of_angerAI : public ScriptedAI uint32 m_uiSoulScreamTimer; uint32 m_uiSpiteTimer; - void Reset() + void Reset() override { m_uiSeetheTimer = 5000; m_uiSoulScreamTimer = 10000; @@ -543,17 +543,17 @@ struct MANGOS_DLL_DECL boss_essence_of_angerAI : public ScriptedAI DoCastSpellIfCan(m_creature, SPELL_AURA_OF_ANGER); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { DoScriptText(urand(0, 1) ? ANGER_SAY_SLAY1 : ANGER_SAY_SLAY2, m_creature); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoScriptText(ANGER_SAY_DEATH, m_creature); } - void JustReachedHome() + void JustReachedHome() override { // Reset encounter and despawn Essence if (m_pInstance) @@ -565,7 +565,7 @@ struct MANGOS_DLL_DECL boss_essence_of_angerAI : public ScriptedAI m_creature->ForcedDespawn(); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -615,12 +615,12 @@ struct MANGOS_DLL_DECL npc_enslaved_soulAI : public ScriptedAI ScriptedInstance* m_pInstance; - void Reset() + void Reset() override { DoCastSpellIfCan(m_creature, SPELL_ENSLAVED_SOUL_PASSIVE); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoCastSpellIfCan(m_creature, SPELL_SOUL_RELEASE, CAST_TRIGGERED); @@ -635,7 +635,7 @@ struct MANGOS_DLL_DECL npc_enslaved_soulAI : public ScriptedAI } } - void JustReachedHome() + void JustReachedHome() override { // Reset encounter and despawn the spirit if (m_pInstance) @@ -647,7 +647,7 @@ struct MANGOS_DLL_DECL npc_enslaved_soulAI : public ScriptedAI m_creature->ForcedDespawn(); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/outland/black_temple/boss_shade_of_akama.cpp b/scripts/outland/black_temple/boss_shade_of_akama.cpp index 992c1546c..068a781c9 100644 --- a/scripts/outland/black_temple/boss_shade_of_akama.cpp +++ b/scripts/outland/black_temple/boss_shade_of_akama.cpp @@ -137,7 +137,7 @@ struct MANGOS_DLL_DECL npc_akamaAI : public ScriptedAI, private DialogueHelper bool m_bHasYelledOnce; - void Reset() + void Reset() override { SetCombatMovement(false); @@ -161,7 +161,7 @@ struct MANGOS_DLL_DECL npc_akamaAI : public ScriptedAI, private DialogueHelper m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); } - void AttackedBy(Unit* pAttacker) + void AttackedBy(Unit* pAttacker) override { // When the Shade starts to attack Akama, switch to melee phase if (m_uiPhase == PHASE_CHANNEL && pAttacker->GetEntry() == NPC_SHADE_OF_AKAMA) @@ -179,7 +179,7 @@ struct MANGOS_DLL_DECL npc_akamaAI : public ScriptedAI, private DialogueHelper } } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { // Note: this is called from the Shade, Channeler and Sorcerer script // If the function is changed in the future, please review this. @@ -216,7 +216,7 @@ struct MANGOS_DLL_DECL npc_akamaAI : public ScriptedAI, private DialogueHelper } } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoScriptText(SAY_DEATH, m_creature); m_creature->SetCorpseDelay(30); @@ -229,13 +229,13 @@ struct MANGOS_DLL_DECL npc_akamaAI : public ScriptedAI, private DialogueHelper } } - void CorpseRemoved(uint32& uiRespawnDelay) + void CorpseRemoved(uint32& uiRespawnDelay) override { // Resapwn after 5 min uiRespawnDelay = 5 * MINUTE; } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { switch (pSummoned->GetEntry()) { @@ -273,7 +273,7 @@ struct MANGOS_DLL_DECL npc_akamaAI : public ScriptedAI, private DialogueHelper } } - void MovementInform(uint32 uiMoveType, uint32 uiPointId) + void MovementInform(uint32 uiMoveType, uint32 uiPointId) override { if (uiMoveType != POINT_MOTION_TYPE || !m_pInstance) return; @@ -305,7 +305,7 @@ struct MANGOS_DLL_DECL npc_akamaAI : public ScriptedAI, private DialogueHelper } } - void JustDidDialogueStep(int32 iEntry) + void JustDidDialogueStep(int32 iEntry) override { switch (iEntry) { @@ -415,7 +415,7 @@ struct MANGOS_DLL_DECL npc_akamaAI : public ScriptedAI, private DialogueHelper } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { switch (m_uiPhase) { @@ -525,25 +525,25 @@ struct MANGOS_DLL_DECL boss_shade_of_akamaAI : public ScriptedAI ScriptedInstance* m_pInstance; - void Reset() + void Reset() override { SetCombatMovement(false); m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_SHADE, FAIL); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { if (pVictim->GetEntry() == NPC_AKAMA) EnterEvadeMode(); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoCastSpellIfCan(m_creature, SPELL_SUMMON_SHADE_TRIGGER, CAST_TRIGGERED); @@ -557,7 +557,7 @@ struct MANGOS_DLL_DECL boss_shade_of_akamaAI : public ScriptedAI } } - void MovementInform(uint32 uiMoveType, uint32 uiPointId) + void MovementInform(uint32 uiMoveType, uint32 uiPointId) override { if (uiMoveType != POINT_MOTION_TYPE || !uiPointId || !m_pInstance) return; @@ -576,7 +576,7 @@ struct MANGOS_DLL_DECL boss_shade_of_akamaAI : public ScriptedAI } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -601,14 +601,14 @@ struct MANGOS_DLL_DECL mob_ashtongue_channelerAI : public ScriptedAI uint32 m_uiBanishTimer; - void Reset() + void Reset() override { m_uiBanishTimer = 5000; m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { if (!m_pInstance) return; @@ -618,10 +618,10 @@ struct MANGOS_DLL_DECL mob_ashtongue_channelerAI : public ScriptedAI pAkama->AI()->KilledUnit(m_creature); } - void AttackStart(Unit* pWho) {} - void MoveInLineOfSight(Unit* pWho) {} + void AttackStart(Unit* pWho) override {} + void MoveInLineOfSight(Unit* pWho) override {} - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (m_uiBanishTimer) { @@ -650,12 +650,12 @@ struct MANGOS_DLL_DECL mob_ashtongue_sorcererAI : public ScriptedAI ScriptedInstance* m_pInstance; - void Reset() {} + void Reset() override {} - void AttackStart(Unit* pWho) {} - void MoveInLineOfSight(Unit* pWho) {} + void AttackStart(Unit* pWho) override {} + void MoveInLineOfSight(Unit* pWho) override {} - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { if (!m_pInstance) return; @@ -665,7 +665,7 @@ struct MANGOS_DLL_DECL mob_ashtongue_sorcererAI : public ScriptedAI pAkama->AI()->KilledUnit(m_creature); } - void MovementInform(uint32 uiMoveType, uint32 uiPointId) + void MovementInform(uint32 uiMoveType, uint32 uiPointId) override { if (uiMoveType != POINT_MOTION_TYPE || !uiPointId) return; @@ -678,7 +678,7 @@ struct MANGOS_DLL_DECL mob_ashtongue_sorcererAI : public ScriptedAI } } - void UpdateAI(const uint32 uiDiff) {} + void UpdateAI(const uint32 uiDiff) override {} }; CreatureAI* GetAI_npc_akama_shade(Creature* pCreature) diff --git a/scripts/outland/black_temple/boss_supremus.cpp b/scripts/outland/black_temple/boss_supremus.cpp index 2db2cad14..c477f10f9 100644 --- a/scripts/outland/black_temple/boss_supremus.cpp +++ b/scripts/outland/black_temple/boss_supremus.cpp @@ -64,10 +64,10 @@ struct MANGOS_DLL_DECL molten_flameAI : public Scripted_NoMovementAI { molten_flameAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { Reset(); } - void Reset() {} - void AttackStart(Unit* pWho) {} - void MoveInLineOfSight(Unit* pWho) {} - void UpdateAI(const uint32 uiDiff) {} + void Reset() override {} + void AttackStart(Unit* pWho) override {} + void MoveInLineOfSight(Unit* pWho) override {} + void UpdateAI(const uint32 uiDiff) override {} }; // TODO Remove this 'script' when combat movement can be proper prevented from core-side @@ -75,10 +75,10 @@ struct MANGOS_DLL_DECL npc_volcanoAI : public Scripted_NoMovementAI { npc_volcanoAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { Reset(); } - void Reset() {} - void AttackStart(Unit* pWho) {} - void MoveInLineOfSight(Unit* pWho) {} - void UpdateAI(const uint32 uiDiff) {} + void Reset() override {} + void AttackStart(Unit* pWho) override {} + void MoveInLineOfSight(Unit* pWho) override {} + void UpdateAI(const uint32 uiDiff) override {} }; struct MANGOS_DLL_DECL boss_supremusAI : public ScriptedAI @@ -105,7 +105,7 @@ struct MANGOS_DLL_DECL boss_supremusAI : public ScriptedAI GuidList m_lSummonedGUIDs; - void Reset() + void Reset() override { m_uiHatefulStrikeTimer = 5000; m_uiSummonFlameTimer = 20000; @@ -118,19 +118,19 @@ struct MANGOS_DLL_DECL boss_supremusAI : public ScriptedAI m_bTankPhase = true; } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_SUPREMUS, NOT_STARTED); } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { if (m_pInstance) m_pInstance->SetData(TYPE_SUPREMUS, IN_PROGRESS); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { if (m_pInstance) m_pInstance->SetData(TYPE_SUPREMUS, DONE); @@ -142,7 +142,7 @@ struct MANGOS_DLL_DECL boss_supremusAI : public ScriptedAI } } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { if (pSummoned->GetEntry() == NPC_STALKER) { @@ -185,13 +185,13 @@ struct MANGOS_DLL_DECL boss_supremusAI : public ScriptedAI return pTarget; } - void KilledUnit(Unit* pKilled) + void KilledUnit(Unit* pKilled) override { if (!m_bTankPhase && pKilled->GetObjectGuid() == m_lastGazeTargetGuid) m_uiSwitchTargetTimer = 0; } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/outland/black_temple/boss_teron_gorefiend.cpp b/scripts/outland/black_temple/boss_teron_gorefiend.cpp index 55aeb1924..4a3b3f543 100644 --- a/scripts/outland/black_temple/boss_teron_gorefiend.cpp +++ b/scripts/outland/black_temple/boss_teron_gorefiend.cpp @@ -80,7 +80,7 @@ struct MANGOS_DLL_DECL boss_teron_gorefiendAI : public ScriptedAI bool m_bIntroDone; - void Reset() + void Reset() override { m_uiIncinerateTimer = urand(20000, 30000); m_uiSummonDoomBlossomTimer = urand(5000, 10000); @@ -89,13 +89,13 @@ struct MANGOS_DLL_DECL boss_teron_gorefiendAI : public ScriptedAI m_uiBerserkTimer = 10 * MINUTE * IN_MILLISECONDS; } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_GOREFIEND, FAIL); } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoScriptText(SAY_AGGRO, m_creature); @@ -103,7 +103,7 @@ struct MANGOS_DLL_DECL boss_teron_gorefiendAI : public ScriptedAI m_pInstance->SetData(TYPE_GOREFIEND, IN_PROGRESS); } - void MoveInLineOfSight(Unit* pWho) + void MoveInLineOfSight(Unit* pWho) override { if (!m_bIntroDone && pWho->GetTypeId() == TYPEID_PLAYER && m_creature->IsWithinDistInMap(pWho, 60.0f)) { @@ -114,7 +114,7 @@ struct MANGOS_DLL_DECL boss_teron_gorefiendAI : public ScriptedAI ScriptedAI::MoveInLineOfSight(pWho); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { if (pVictim->GetTypeId() != TYPEID_PLAYER) return; @@ -122,7 +122,7 @@ struct MANGOS_DLL_DECL boss_teron_gorefiendAI : public ScriptedAI DoScriptText(urand(0, 1) ? SAY_SLAY1 : SAY_SLAY2, m_creature); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { if (m_pInstance) m_pInstance->SetData(TYPE_GOREFIEND, DONE); @@ -130,7 +130,7 @@ struct MANGOS_DLL_DECL boss_teron_gorefiendAI : public ScriptedAI DoScriptText(SAY_DEATH, m_creature); } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { if (pSummoned->GetEntry() == NPC_SHADOWY_CONSTRUCT) pSummoned->CastSpell(pSummoned, SPELL_SHADOWY_CONSTRUCT, true); @@ -138,7 +138,7 @@ struct MANGOS_DLL_DECL boss_teron_gorefiendAI : public ScriptedAI pSummoned->SetInCombatWithZone(); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/outland/black_temple/boss_warlord_najentus.cpp b/scripts/outland/black_temple/boss_warlord_najentus.cpp index d915994ad..e8f962b2b 100644 --- a/scripts/outland/black_temple/boss_warlord_najentus.cpp +++ b/scripts/outland/black_temple/boss_warlord_najentus.cpp @@ -65,7 +65,7 @@ struct MANGOS_DLL_DECL boss_najentusAI : public ScriptedAI bool m_bIsShielded; - void Reset() + void Reset() override { m_bIsShielded = false; @@ -78,18 +78,18 @@ struct MANGOS_DLL_DECL boss_najentusAI : public ScriptedAI SetCombatMovement(true); } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_NAJENTUS, NOT_STARTED); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { DoScriptText(urand(0, 1) ? SAY_SLAY1 : SAY_SLAY2, m_creature); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { if (m_pInstance) m_pInstance->SetData(TYPE_NAJENTUS, DONE); @@ -97,7 +97,7 @@ struct MANGOS_DLL_DECL boss_najentusAI : public ScriptedAI DoScriptText(SAY_DEATH, m_creature); } - void SpellHit(Unit* pCaster, const SpellEntry* pSpell) + void SpellHit(Unit* pCaster, const SpellEntry* pSpell) override { if (m_bIsShielded && pSpell->Id == SPELL_HURL_SPINE) { @@ -113,7 +113,7 @@ struct MANGOS_DLL_DECL boss_najentusAI : public ScriptedAI } } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { if (m_pInstance) m_pInstance->SetData(TYPE_NAJENTUS, IN_PROGRESS); @@ -121,7 +121,7 @@ struct MANGOS_DLL_DECL boss_najentusAI : public ScriptedAI DoScriptText(SAY_AGGRO, m_creature); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/outland/black_temple/illidari_council.cpp b/scripts/outland/black_temple/illidari_council.cpp index 47adaf2a7..0005a60d7 100644 --- a/scripts/outland/black_temple/illidari_council.cpp +++ b/scripts/outland/black_temple/illidari_council.cpp @@ -130,7 +130,7 @@ struct MANGOS_DLL_DECL mob_blood_elf_council_voice_triggerAI : public ScriptedAI uint32 m_uiEnrageTimer; uint32 m_uiAggroYellTimer; - void Reset() + void Reset() override { m_uiEnrageTimer = 0; m_uiAggroYellTimer = 0; @@ -142,7 +142,7 @@ struct MANGOS_DLL_DECL mob_blood_elf_council_voice_triggerAI : public ScriptedAI m_uiEnrageTimer = 15 * MINUTE * IN_MILLISECONDS; } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { m_councilDialogue.DialogueUpdate(uiDiff); @@ -197,7 +197,7 @@ struct MANGOS_DLL_DECL mob_illidari_councilAI : public ScriptedAI bool m_bEventBegun; bool m_bEventEnd; - void Reset() + void Reset() override { m_bEventBegun = false; m_bEventEnd = false; @@ -246,7 +246,7 @@ struct MANGOS_DLL_DECL mob_illidari_councilAI : public ScriptedAI m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { // Make the council members health equal every 2-3 secs if (m_bEventBegun && !m_bEventEnd) @@ -275,7 +275,7 @@ struct MANGOS_DLL_DECL boss_illidari_councilAI : public ScriptedAI ScriptedInstance* m_pInstance; - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { if (m_pInstance) { @@ -291,7 +291,7 @@ struct MANGOS_DLL_DECL boss_illidari_councilAI : public ScriptedAI } } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { if (m_pInstance) { @@ -305,7 +305,7 @@ struct MANGOS_DLL_DECL boss_illidari_councilAI : public ScriptedAI } } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) { @@ -322,7 +322,7 @@ struct MANGOS_DLL_DECL boss_illidari_councilAI : public ScriptedAI } // ##### Workaround for missing spell aura proc 41342 - Remove when this is implemented in core ##### - void DamageTaken(Unit* pDoneBy, uint32& uiDamage) + void DamageTaken(Unit* pDoneBy, uint32& uiDamage) override { if (pDoneBy == m_creature) return; @@ -358,7 +358,7 @@ struct MANGOS_DLL_DECL boss_gathios_the_shattererAI : public boss_illidari_counc uint32 m_uiBlessingTimer; uint32 m_uiJudgmentTimer; - void Reset() + void Reset() override { m_uiConsecrationTimer = 40000; m_uiHammerOfJusticeTimer = 10000; @@ -368,19 +368,19 @@ struct MANGOS_DLL_DECL boss_gathios_the_shattererAI : public boss_illidari_counc m_uiJudgmentTimer = 0; } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { DoScriptText(SAY_GATH_SLAY, m_creature); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoScriptText(SAY_GATH_DEATH, m_creature); boss_illidari_councilAI::JustDied(pKiller); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -465,7 +465,7 @@ struct MANGOS_DLL_DECL boss_high_nethermancer_zerevorAI : public boss_illidari_c uint32 m_uiDampenMagicTimer; uint32 m_uiArcaneExplosionTimer; - void Reset() + void Reset() override { m_uiBlizzardTimer = urand(10000, 20000); m_uiFlamestrikeTimer = urand(10000, 20000); @@ -474,7 +474,7 @@ struct MANGOS_DLL_DECL boss_high_nethermancer_zerevorAI : public boss_illidari_c m_uiArcaneExplosionTimer = 13000; } - void AttackStart(Unit* pWho) + void AttackStart(Unit* pWho) override { if (m_creature->Attack(pWho, true)) { @@ -485,19 +485,19 @@ struct MANGOS_DLL_DECL boss_high_nethermancer_zerevorAI : public boss_illidari_c } } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { DoScriptText(SAY_ZERE_SLAY, m_creature); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoScriptText(SAY_ZERE_DEATH, m_creature); boss_illidari_councilAI::JustDied(pKiller); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -569,7 +569,7 @@ struct MANGOS_DLL_DECL boss_lady_malandeAI : public boss_illidari_councilAI uint32 m_uiDivineWrathTimer; uint32 m_uiReflectiveShieldTimer; - void Reset() + void Reset() override { m_uiEmpoweredSmiteTimer = 10000; m_uiCircleOfHealingTimer = 20000; @@ -577,7 +577,7 @@ struct MANGOS_DLL_DECL boss_lady_malandeAI : public boss_illidari_councilAI m_uiReflectiveShieldTimer = 0; } - void AttackStart(Unit* pWho) + void AttackStart(Unit* pWho) override { if (m_creature->Attack(pWho, true)) { @@ -588,19 +588,19 @@ struct MANGOS_DLL_DECL boss_lady_malandeAI : public boss_illidari_councilAI } } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { DoScriptText(SAY_MALA_SLAY, m_creature); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoScriptText(SAY_MALA_DEATH, m_creature); boss_illidari_councilAI::JustDied(pKiller); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -660,7 +660,7 @@ struct MANGOS_DLL_DECL boss_veras_darkshadowAI : public boss_illidari_councilAI uint32 m_uiVanishEndtimer; uint32 m_uiEnvenomTimer; - void Reset() + void Reset() override { m_uiDeadlyPoisonTimer = 1000; m_uiVanishTimer = urand(30000, 40000); @@ -668,19 +668,19 @@ struct MANGOS_DLL_DECL boss_veras_darkshadowAI : public boss_illidari_councilAI m_uiVanishEndtimer = 0; } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { DoScriptText(SAY_VERA_SLAY, m_creature); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoScriptText(SAY_VERA_DEATH, m_creature); boss_illidari_councilAI::JustDied(pKiller); } - void EnterEvadeMode() + void EnterEvadeMode() override { if (m_uiVanishEndtimer) return; @@ -688,7 +688,7 @@ struct MANGOS_DLL_DECL boss_veras_darkshadowAI : public boss_illidari_councilAI ScriptedAI::EnterEvadeMode(); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/outland/blades_edge_mountains.cpp b/scripts/outland/blades_edge_mountains.cpp index def7da666..2bd0dbca4 100644 --- a/scripts/outland/blades_edge_mountains.cpp +++ b/scripts/outland/blades_edge_mountains.cpp @@ -38,9 +38,9 @@ struct MANGOS_DLL_DECL mobs_bladespire_ogreAI : public ScriptedAI { mobs_bladespire_ogreAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} - void Reset() { } + void Reset() override { } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -94,7 +94,7 @@ struct MANGOS_DLL_DECL mobs_nether_drakeAI : public ScriptedAI uint32 m_uiManaBurnTimer; uint32 m_uiIntangiblePresenceTimer; - void Reset() + void Reset() override { m_bIsNihil = false; m_uiNihilSpeechTimer = 3000; @@ -105,7 +105,7 @@ struct MANGOS_DLL_DECL mobs_nether_drakeAI : public ScriptedAI m_uiIntangiblePresenceTimer = 15000; } - void MoveInLineOfSight(Unit* pWho) + void MoveInLineOfSight(Unit* pWho) override { if (m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE)) return; @@ -114,7 +114,7 @@ struct MANGOS_DLL_DECL mobs_nether_drakeAI : public ScriptedAI } // in case creature was not summoned (not expected) - void MovementInform(uint32 uiMoveType, uint32 uiPointId) + void MovementInform(uint32 uiMoveType, uint32 uiPointId) override { if (uiMoveType != POINT_MOTION_TYPE) return; @@ -123,7 +123,7 @@ struct MANGOS_DLL_DECL mobs_nether_drakeAI : public ScriptedAI m_creature->ForcedDespawn(); } - void SpellHit(Unit* pCaster, const SpellEntry* pSpell) + void SpellHit(Unit* pCaster, const SpellEntry* pSpell) override { if (pSpell->Id == SPELL_T_PHASE_MODULATOR && pCaster->GetTypeId() == TYPEID_PLAYER) { @@ -157,7 +157,7 @@ struct MANGOS_DLL_DECL mobs_nether_drakeAI : public ScriptedAI } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (m_bIsNihil) { @@ -249,9 +249,9 @@ struct MANGOS_DLL_DECL npc_daranelleAI : public ScriptedAI { npc_daranelleAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} - void Reset() { } + void Reset() override { } - void MoveInLineOfSight(Unit* pWho) + void MoveInLineOfSight(Unit* pWho) override { if (pWho->GetTypeId() == TYPEID_PLAYER) { diff --git a/scripts/outland/boss_doomlord_kazzak.cpp b/scripts/outland/boss_doomlord_kazzak.cpp index d14c2f517..bcf79e6b1 100644 --- a/scripts/outland/boss_doomlord_kazzak.cpp +++ b/scripts/outland/boss_doomlord_kazzak.cpp @@ -62,7 +62,7 @@ struct MANGOS_DLL_DECL boss_doomlordkazzakAI : public ScriptedAI uint32 m_uiGreatEnrageTimer; uint32 m_uiTwistedReflectionTimer; - void Reset() + void Reset() override { m_uiShadowVolleyTimer = urand(6000, 10000); m_uiCleaveTimer = 7000; @@ -74,18 +74,18 @@ struct MANGOS_DLL_DECL boss_doomlordkazzakAI : public ScriptedAI m_uiTwistedReflectionTimer = 33000; // Timer may be incorrect } - void JustRespawned() + void JustRespawned() override { DoScriptText(SAY_INTRO, m_creature); } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoScriptText(urand(0, 1) ? SAY_AGGRO1 : SAY_AGGRO2, m_creature); DoCastSpellIfCan(m_creature, SPELL_CAPTURE_SOUL, CAST_TRIGGERED); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { // When Kazzak kills a player (not pets/totems), he regens some health if (pVictim->GetTypeId() != TYPEID_PLAYER) @@ -99,12 +99,12 @@ struct MANGOS_DLL_DECL boss_doomlordkazzakAI : public ScriptedAI } } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoScriptText(SAY_DEATH, m_creature); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { // Return since we have no target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) diff --git a/scripts/outland/boss_doomwalker.cpp b/scripts/outland/boss_doomwalker.cpp index 5b39a3daf..3bc2be18e 100644 --- a/scripts/outland/boss_doomwalker.cpp +++ b/scripts/outland/boss_doomwalker.cpp @@ -55,7 +55,7 @@ struct MANGOS_DLL_DECL boss_doomwalkerAI : public ScriptedAI bool m_bHasEnrage; - void Reset() + void Reset() override { m_uiArmorTimer = urand(5000, 13000); m_uiChainTimer = urand(10000, 30000); @@ -65,7 +65,7 @@ struct MANGOS_DLL_DECL boss_doomwalkerAI : public ScriptedAI m_bHasEnrage = false; } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { if (pVictim->GetTypeId() != TYPEID_PLAYER) return; @@ -84,18 +84,18 @@ struct MANGOS_DLL_DECL boss_doomwalkerAI : public ScriptedAI } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoScriptText(SAY_DEATH, m_creature); } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoCastSpellIfCan(m_creature, SPELL_MARK_OF_DEATH_AURA, CAST_TRIGGERED); DoScriptText(SAY_AGGRO, m_creature); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_fathomlord_karathress.cpp b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_fathomlord_karathress.cpp index 215e7c8fe..ceae073e4 100644 --- a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_fathomlord_karathress.cpp +++ b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_fathomlord_karathress.cpp @@ -99,7 +99,7 @@ struct MANGOS_DLL_DECL boss_fathomlord_karathressAI : public ScriptedAI bool m_bBlessingOfTides; - void Reset() + void Reset() override { m_uiCataclysmicBoltTimer = 10000; m_uiSearingNovaTimer = urand(20000, 30000); @@ -107,7 +107,7 @@ struct MANGOS_DLL_DECL boss_fathomlord_karathressAI : public ScriptedAI m_bBlessingOfTides = false; } - void SpellHit(Unit* pCaster, const SpellEntry* pSpell) + void SpellHit(Unit* pCaster, const SpellEntry* pSpell) override { switch (pSpell->Id) { @@ -123,7 +123,7 @@ struct MANGOS_DLL_DECL boss_fathomlord_karathressAI : public ScriptedAI } } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { if (m_pInstance) m_pInstance->SetData(TYPE_KARATHRESS_EVENT, IN_PROGRESS); @@ -131,7 +131,7 @@ struct MANGOS_DLL_DECL boss_fathomlord_karathressAI : public ScriptedAI DoScriptText(SAY_AGGRO, m_creature); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { switch (urand(0, 2)) { @@ -141,7 +141,7 @@ struct MANGOS_DLL_DECL boss_fathomlord_karathressAI : public ScriptedAI } } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoScriptText(SAY_DEATH, m_creature); @@ -152,13 +152,13 @@ struct MANGOS_DLL_DECL boss_fathomlord_karathressAI : public ScriptedAI m_creature->SummonCreature(NPC_SEER_OLUM, afCoordsOlum[0], afCoordsOlum[1], afCoordsOlum[2], afCoordsOlum[3], TEMPSUMMON_TIMED_DESPAWN, 1 * HOUR * IN_MILLISECONDS); } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_KARATHRESS_EVENT, FAIL); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -240,7 +240,7 @@ struct MANGOS_DLL_DECL boss_fathomguard_sharkkisAI : public ScriptedAI uint32 m_uiMultiTossTimer; uint32 m_uiPetTimer; - void Reset() + void Reset() override { m_uiHurlTridentTimer = 2500; m_uiLeechingThrowTimer = 20000; @@ -250,25 +250,25 @@ struct MANGOS_DLL_DECL boss_fathomguard_sharkkisAI : public ScriptedAI m_uiPetTimer = 10000; } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoCastSpellIfCan(m_creature, SPELL_POWER_OF_SHARKKIS, CAST_TRIGGERED); } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { if (m_creature->getVictim()) pSummoned->AI()->AttackStart(m_creature->getVictim()); } - void SummonedCreatureJustDied(Creature* pSummoned) + void SummonedCreatureJustDied(Creature* pSummoned) override { // resummon the pet in 10 secs if (pSummoned->IsPet()) m_uiPetTimer = 10000; } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -338,19 +338,19 @@ struct MANGOS_DLL_DECL boss_fathomguard_tidalvessAI : public ScriptedAI uint32 m_uiWindfuryTimer; uint32 m_uiTotemTimer; - void Reset() + void Reset() override { m_uiFrostShockTimer = 25000; m_uiWindfuryTimer = 0; m_uiTotemTimer = urand(2000, 5000); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoCastSpellIfCan(m_creature, SPELL_POWER_OF_TIDALVESS, CAST_TRIGGERED); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -404,7 +404,7 @@ struct MANGOS_DLL_DECL boss_fathomguard_caribdisAI : public ScriptedAI uint32 m_uiHealTimer; uint32 m_uiCycloneTimer; - void Reset() + void Reset() override { m_uiWaterBoltVolleyTimer = 35000; m_uiTidalSurgeTimer = urand(15000, 20000); @@ -412,19 +412,19 @@ struct MANGOS_DLL_DECL boss_fathomguard_caribdisAI : public ScriptedAI m_uiCycloneTimer = urand(10000, 15000); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoCastSpellIfCan(m_creature, SPELL_POWER_OF_CARIBDIS, CAST_TRIGGERED); } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { // ToDo: research if this creature should follow the summoner or a random target if (pSummoned->GetEntry() == NPC_CYCLONE) pSummoned->CastSpell(pSummoned, SPELL_CYCLONE, true); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_hydross_the_unstable.cpp b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_hydross_the_unstable.cpp index fdd82ae5b..d31684660 100644 --- a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_hydross_the_unstable.cpp +++ b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_hydross_the_unstable.cpp @@ -84,7 +84,7 @@ struct MANGOS_DLL_DECL boss_hydross_the_unstableAI : public ScriptedAI uint8 m_uiMarkCount; bool m_bCorruptedForm; - void Reset() + void Reset() override { m_uiBeamInitTimer = 5000; m_uiElementalTimer = 20000; @@ -102,7 +102,7 @@ struct MANGOS_DLL_DECL boss_hydross_the_unstableAI : public ScriptedAI m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_NATURE, false); } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoScriptText(SAY_AGGRO, m_creature); @@ -110,7 +110,7 @@ struct MANGOS_DLL_DECL boss_hydross_the_unstableAI : public ScriptedAI m_pInstance->SetData(TYPE_HYDROSS_EVENT, IN_PROGRESS); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { if (m_bCorruptedForm) DoScriptText(urand(0, 1) ? SAY_CORRUPT_SLAY1 : SAY_CORRUPT_SLAY2, m_creature); @@ -118,7 +118,7 @@ struct MANGOS_DLL_DECL boss_hydross_the_unstableAI : public ScriptedAI DoScriptText(urand(0, 1) ? SAY_CLEAN_SLAY1 : SAY_CLEAN_SLAY2, m_creature); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoScriptText(m_bCorruptedForm ? SAY_CORRUPT_DEATH : SAY_CLEAN_DEATH, m_creature); @@ -126,13 +126,13 @@ struct MANGOS_DLL_DECL boss_hydross_the_unstableAI : public ScriptedAI m_pInstance->SetData(TYPE_HYDROSS_EVENT, DONE); } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_HYDROSS_EVENT, FAIL); } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { switch (pSummoned->GetEntry()) { @@ -152,7 +152,7 @@ struct MANGOS_DLL_DECL boss_hydross_the_unstableAI : public ScriptedAI pSummoned->AI()->AttackStart(m_creature->getVictim()); } - void SummonedMovementInform(Creature* pSummoned, uint32 uiMotionType, uint32 uiPointId) + void SummonedMovementInform(Creature* pSummoned, uint32 uiMotionType, uint32 uiPointId) override { if (uiMotionType != POINT_MOTION_TYPE) return; @@ -166,7 +166,7 @@ struct MANGOS_DLL_DECL boss_hydross_the_unstableAI : public ScriptedAI pSummoned->ForcedDespawn(); } - void SpellHitTarget(Unit* pTarget, const SpellEntry* pSpell) + void SpellHitTarget(Unit* pTarget, const SpellEntry* pSpell) override { // Purify elementals and make them go to exit if (pSpell->Id == SPELL_PURIFY_ELEMENTAL) @@ -208,7 +208,7 @@ struct MANGOS_DLL_DECL boss_hydross_the_unstableAI : public ScriptedAI } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) { diff --git a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_lady_vashj.cpp b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_lady_vashj.cpp index 70ec7e019..b80c5c22c 100644 --- a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_lady_vashj.cpp +++ b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_lady_vashj.cpp @@ -132,7 +132,7 @@ struct MANGOS_DLL_DECL boss_lady_vashjAI : public ScriptedAI bool m_bEntangle; - void Reset() + void Reset() override { SetCombatMovement(true); @@ -155,7 +155,7 @@ struct MANGOS_DLL_DECL boss_lady_vashjAI : public ScriptedAI m_uiSummonSporebatStaticTimer = 30000; } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { switch (urand(0, 3)) { @@ -169,7 +169,7 @@ struct MANGOS_DLL_DECL boss_lady_vashjAI : public ScriptedAI m_pInstance->SetData(TYPE_LADYVASHJ_EVENT, IN_PROGRESS); } - void MovementInform(uint32 uiType, uint32 uiPointId) + void MovementInform(uint32 uiType, uint32 uiPointId) override { if (uiType != POINT_MOTION_TYPE) return; @@ -193,7 +193,7 @@ struct MANGOS_DLL_DECL boss_lady_vashjAI : public ScriptedAI } } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { switch (pSummoned->GetEntry()) { @@ -209,14 +209,14 @@ struct MANGOS_DLL_DECL boss_lady_vashjAI : public ScriptedAI } } - void SummonedCreatureJustDied(Creature* pSummoned) + void SummonedCreatureJustDied(Creature* pSummoned) override { // Set the timer when summoned killed if (pSummoned->GetEntry() == NPC_TAINTED_ELEMENTAL) m_uiTaintedElementalTimer = 50000; } - void SummonedCreatureDespawn(Creature* pSummoned) + void SummonedCreatureDespawn(Creature* pSummoned) override { // Set the timer when summoned despawned, if not already killed if (pSummoned->GetEntry() == NPC_TAINTED_ELEMENTAL) @@ -226,7 +226,7 @@ struct MANGOS_DLL_DECL boss_lady_vashjAI : public ScriptedAI } } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { switch (urand(0, 2)) { @@ -236,7 +236,7 @@ struct MANGOS_DLL_DECL boss_lady_vashjAI : public ScriptedAI } } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoScriptText(SAY_DEATH, m_creature); @@ -244,7 +244,7 @@ struct MANGOS_DLL_DECL boss_lady_vashjAI : public ScriptedAI m_pInstance->SetData(TYPE_LADYVASHJ_EVENT, DONE); } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_LADYVASHJ_EVENT, FAIL); @@ -287,7 +287,7 @@ struct MANGOS_DLL_DECL boss_lady_vashjAI : public ScriptedAI } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -454,17 +454,17 @@ struct MANGOS_DLL_DECL mob_enchanted_elementalAI : public ScriptedAI Reset(); } - void Reset() { } + void Reset() override { } - void MoveInLineOfSight(Unit* pWho) + void MoveInLineOfSight(Unit* pWho) override { // Buff Lady Vashj on range check - spell has script target if (pWho->GetEntry() == NPC_LADYVASHJ && pWho->IsWithinDistInMap(m_creature, INTERACTION_DISTANCE) && pWho->IsWithinLOSInMap(m_creature)) DoCastSpellIfCan(m_creature, SPELL_SURGE, CAST_TRIGGERED); } - void AttackStart(Unit* pWho) { } - void UpdateAI(const uint32 uiDiff) { } + void AttackStart(Unit* pWho) override { } + void UpdateAI(const uint32 uiDiff) override { } }; bool GOUse_go_shield_generator(Player* pPlayer, GameObject* pGo) diff --git a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_leotheras_the_blind.cpp b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_leotheras_the_blind.cpp index dd64ab42f..006eb0f39 100644 --- a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_leotheras_the_blind.cpp +++ b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_leotheras_the_blind.cpp @@ -83,7 +83,7 @@ struct MANGOS_DLL_DECL boss_leotheras_the_blindAI : public ScriptedAI bool m_bDemonForm; bool m_bIsFinalForm; - void Reset() + void Reset() override { m_uiBanishTimer = 10000; m_uiWhirlwindTimer = 18500; @@ -100,7 +100,7 @@ struct MANGOS_DLL_DECL boss_leotheras_the_blindAI : public ScriptedAI SetCombatMovement(true); } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoScriptText(SAY_AGGRO, m_creature); @@ -108,7 +108,7 @@ struct MANGOS_DLL_DECL boss_leotheras_the_blindAI : public ScriptedAI m_pInstance->SetData(TYPE_LEOTHERAS_EVENT, IN_PROGRESS); } - void AttackStart(Unit* pWho) + void AttackStart(Unit* pWho) override { // Don't attack while banished if (m_creature->HasAura(SPELL_LEOTHERAS_BANISH)) @@ -117,7 +117,7 @@ struct MANGOS_DLL_DECL boss_leotheras_the_blindAI : public ScriptedAI ScriptedAI::AttackStart(pWho); } - void MoveInLineOfSight(Unit* pWho) + void MoveInLineOfSight(Unit* pWho) override { // Don't attack while banished if (m_creature->HasAura(SPELL_LEOTHERAS_BANISH)) @@ -126,7 +126,7 @@ struct MANGOS_DLL_DECL boss_leotheras_the_blindAI : public ScriptedAI ScriptedAI::MoveInLineOfSight(pWho); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { if (pVictim->GetTypeId() != TYPEID_PLAYER) return; @@ -139,7 +139,7 @@ struct MANGOS_DLL_DECL boss_leotheras_the_blindAI : public ScriptedAI } } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { if (pSummoned->GetEntry() == NPC_SHADOW_LEO) { @@ -148,7 +148,7 @@ struct MANGOS_DLL_DECL boss_leotheras_the_blindAI : public ScriptedAI } } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoScriptText(SAY_DEATH, m_creature); @@ -156,13 +156,13 @@ struct MANGOS_DLL_DECL boss_leotheras_the_blindAI : public ScriptedAI m_pInstance->SetData(TYPE_LEOTHERAS_EVENT, DONE); } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_LEOTHERAS_EVENT, FAIL); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { // Banish the boss before combat if (m_uiBanishTimer) diff --git a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_morogrim_tidewalker.cpp b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_morogrim_tidewalker.cpp index a93680af4..4d6ce00ed 100644 --- a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_morogrim_tidewalker.cpp +++ b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_morogrim_tidewalker.cpp @@ -88,7 +88,7 @@ struct MANGOS_DLL_DECL boss_morogrim_tidewalkerAI : public ScriptedAI bool m_bIsPhase2; - void Reset() + void Reset() override { m_uiTidalWaveTimer = 10000; m_uiWateryGraveTimer = 30000; @@ -101,7 +101,7 @@ struct MANGOS_DLL_DECL boss_morogrim_tidewalkerAI : public ScriptedAI DoCastSpellIfCan(m_creature, SPELL_DOUBLE_ATTACK); } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoScriptText(SAY_AGGRO, m_creature); @@ -109,7 +109,7 @@ struct MANGOS_DLL_DECL boss_morogrim_tidewalkerAI : public ScriptedAI m_pInstance->SetData(TYPE_MOROGRIM_EVENT, IN_PROGRESS); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { switch (urand(0, 2)) { @@ -119,7 +119,7 @@ struct MANGOS_DLL_DECL boss_morogrim_tidewalkerAI : public ScriptedAI } } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoScriptText(SAY_DEATH, m_creature); @@ -127,13 +127,13 @@ struct MANGOS_DLL_DECL boss_morogrim_tidewalkerAI : public ScriptedAI m_pInstance->SetData(TYPE_MOROGRIM_EVENT, DONE); } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_MOROGRIM_EVENT, FAIL); } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { if (pSummoned->GetEntry() == NPC_TIDEWALKER_LURKER) { @@ -147,7 +147,7 @@ struct MANGOS_DLL_DECL boss_morogrim_tidewalkerAI : public ScriptedAI } } - void SpellHitTarget(Unit* pTarget, const SpellEntry* pSpell) + void SpellHitTarget(Unit* pTarget, const SpellEntry* pSpell) override { // Handle watery grave teleport - each player hit has his own teleport spell if (pSpell->Id == SPELL_WATERY_GRAVE && pTarget->GetTypeId() == TYPEID_PLAYER) @@ -157,7 +157,7 @@ struct MANGOS_DLL_DECL boss_morogrim_tidewalkerAI : public ScriptedAI } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -246,17 +246,17 @@ struct MANGOS_DLL_DECL mob_water_globuleAI : public ScriptedAI uint32 m_uiTargetTimer; - void Reset() + void Reset() override { m_uiTargetTimer = 10000; } - void MoveInLineOfSight(Unit* pWho) + void MoveInLineOfSight(Unit* pWho) override { // ToDo: cast damage spell here, after proper checks are done } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (m_uiTargetTimer < uiDiff) { diff --git a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_the_lurker_below.cpp b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_the_lurker_below.cpp index cbadfa339..b0d3b8b77 100644 --- a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_the_lurker_below.cpp +++ b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_the_lurker_below.cpp @@ -89,7 +89,7 @@ struct MANGOS_DLL_DECL boss_the_lurker_belowAI : public Scripted_NoMovementAI uint32 m_uiSpoutTimer; uint32 m_uiSpoutEndTimer; - void Reset() + void Reset() override { m_uiPhase = PHASE_NORMAL; m_uiPhaseChangeTimer = 90000; @@ -105,7 +105,7 @@ struct MANGOS_DLL_DECL boss_the_lurker_belowAI : public Scripted_NoMovementAI m_uiSpoutEndTimer = 23000; } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_THELURKER_EVENT, FAIL); @@ -113,13 +113,13 @@ struct MANGOS_DLL_DECL boss_the_lurker_belowAI : public Scripted_NoMovementAI m_creature->ForcedDespawn(); } - void JustDied(Unit* pVictim) + void JustDied(Unit* pVictim) override { if (m_pInstance) m_pInstance->SetData(TYPE_THELURKER_EVENT, DONE); } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { // Allow the adds to attack pSummoned->SetInCombatWithZone(); @@ -160,7 +160,7 @@ struct MANGOS_DLL_DECL boss_the_lurker_belowAI : public Scripted_NoMovementAI return m_creature->SelectHostileTarget(); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!SelectHostileTarget()) return; diff --git a/scripts/outland/coilfang_reservoir/serpent_shrine/serpent_shrine.h b/scripts/outland/coilfang_reservoir/serpent_shrine/serpent_shrine.h index 8f43f7eae..e62513782 100644 --- a/scripts/outland/coilfang_reservoir/serpent_shrine/serpent_shrine.h +++ b/scripts/outland/coilfang_reservoir/serpent_shrine/serpent_shrine.h @@ -51,22 +51,22 @@ class MANGOS_DLL_DECL instance_serpentshrine_cavern : public ScriptedInstance public: instance_serpentshrine_cavern(Map* pMap); - void Initialize(); - bool IsEncounterInProgress() const; + void Initialize() override; + bool IsEncounterInProgress() const override; - void OnCreatureCreate(Creature* pCreature); - void OnCreatureEnterCombat(Creature* pCreature); - void OnCreatureDeath(Creature* pCreature); - void OnObjectCreate(GameObject* pGo); + void OnCreatureCreate(Creature* pCreature) override; + void OnCreatureEnterCombat(Creature* pCreature) override; + void OnCreatureDeath(Creature* pCreature) override; + void OnObjectCreate(GameObject* pGo) override; - void SetData(uint32 uiType, uint32 uiData); - uint32 GetData(uint32 uiType); + void SetData(uint32 uiType, uint32 uiData) override; + uint32 GetData(uint32 uiType) override; void GetBeamHelpersGUIDList(GuidList& lList) { lList = m_lBeamHelpersGUIDList; } void GetShieldGeneratorsGUIDList(GuidList& lList) { lList = m_lShieldGeneratorGUIDList; } - const char* Save() { return m_strInstData.c_str(); } - void Load(const char* chrIn); + const char* Save() override { return m_strInstData.c_str(); } + void Load(const char* chrIn) override; private: uint32 m_auiEncounter[MAX_ENCOUNTER]; diff --git a/scripts/outland/coilfang_reservoir/steam_vault/boss_hydromancer_thespia.cpp b/scripts/outland/coilfang_reservoir/steam_vault/boss_hydromancer_thespia.cpp index 32f022666..4a342abf6 100644 --- a/scripts/outland/coilfang_reservoir/steam_vault/boss_hydromancer_thespia.cpp +++ b/scripts/outland/coilfang_reservoir/steam_vault/boss_hydromancer_thespia.cpp @@ -62,20 +62,20 @@ struct MANGOS_DLL_DECL boss_thespiaAI : public ScriptedAI uint32 m_uiLungBurstTimer; uint32 m_uiEnvelopingWindsTimer; - void Reset() + void Reset() override { m_uiLightningCloudTimer = 15000; m_uiLungBurstTimer = urand(15000, 18000); m_uiEnvelopingWindsTimer = urand(20000, 25000); } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_HYDROMANCER_THESPIA, FAIL); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoScriptText(SAY_DEAD, m_creature); @@ -83,12 +83,12 @@ struct MANGOS_DLL_DECL boss_thespiaAI : public ScriptedAI m_pInstance->SetData(TYPE_HYDROMANCER_THESPIA, DONE); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { DoScriptText(urand(0, 1) ? SAY_SLAY_1 : SAY_SLAY_2, m_creature); } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { switch (urand(0, 2)) { @@ -101,7 +101,7 @@ struct MANGOS_DLL_DECL boss_thespiaAI : public ScriptedAI m_pInstance->SetData(TYPE_HYDROMANCER_THESPIA, IN_PROGRESS); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/outland/coilfang_reservoir/steam_vault/boss_mekgineer_steamrigger.cpp b/scripts/outland/coilfang_reservoir/steam_vault/boss_mekgineer_steamrigger.cpp index 2fefc2cab..8830c01a1 100644 --- a/scripts/outland/coilfang_reservoir/steam_vault/boss_mekgineer_steamrigger.cpp +++ b/scripts/outland/coilfang_reservoir/steam_vault/boss_mekgineer_steamrigger.cpp @@ -85,7 +85,7 @@ struct MANGOS_DLL_DECL boss_mekgineer_steamriggerAI : public ScriptedAI uint32 m_uiMechanicTimer; uint8 m_uiMechanicPhaseCount; - void Reset() + void Reset() override { m_uiShrinkTimer = 20000; m_uiSawBladeTimer = 15000; @@ -94,13 +94,13 @@ struct MANGOS_DLL_DECL boss_mekgineer_steamriggerAI : public ScriptedAI m_uiMechanicPhaseCount = 1; } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_MEKGINEER_STEAMRIGGER, FAIL); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoScriptText(SAY_DEATH, m_creature); @@ -108,7 +108,7 @@ struct MANGOS_DLL_DECL boss_mekgineer_steamriggerAI : public ScriptedAI m_pInstance->SetData(TYPE_MEKGINEER_STEAMRIGGER, DONE); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { switch (urand(0, 2)) { @@ -118,7 +118,7 @@ struct MANGOS_DLL_DECL boss_mekgineer_steamriggerAI : public ScriptedAI } } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { switch (urand(0, 2)) { @@ -131,7 +131,7 @@ struct MANGOS_DLL_DECL boss_mekgineer_steamriggerAI : public ScriptedAI m_pInstance->SetData(TYPE_MEKGINEER_STEAMRIGGER, IN_PROGRESS); } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { if (pSummoned->GetEntry() == NPC_STEAMRIGGER_MECHANIC) pSummoned->GetMotionMaster()->MoveFollow(m_creature, 0, 0); @@ -146,7 +146,7 @@ struct MANGOS_DLL_DECL boss_mekgineer_steamriggerAI : public ScriptedAI m_creature->SummonCreature(NPC_STEAMRIGGER_MECHANIC, aSteamriggerSpawnLocs[i].m_fX, aSteamriggerSpawnLocs[i].m_fY, aSteamriggerSpawnLocs[i].m_fZ, 0, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 240000); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -226,12 +226,12 @@ struct MANGOS_DLL_DECL mob_steamrigger_mechanicAI : public ScriptedAI bool m_bCanStartAttack; - void Reset() + void Reset() override { m_bCanStartAttack = false; } - void AttackStart(Unit* pWho) + void AttackStart(Unit* pWho) override { // Trigger attack only for players if (pWho->GetTypeId() != TYPEID_PLAYER) @@ -242,7 +242,7 @@ struct MANGOS_DLL_DECL mob_steamrigger_mechanicAI : public ScriptedAI m_bCanStartAttack = true; } - void MoveInLineOfSight(Unit* pWho) + void MoveInLineOfSight(Unit* pWho) override { // Return if already in combat if (m_bCanStartAttack) @@ -261,7 +261,7 @@ struct MANGOS_DLL_DECL mob_steamrigger_mechanicAI : public ScriptedAI } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/outland/coilfang_reservoir/steam_vault/boss_warlord_kalithresh.cpp b/scripts/outland/coilfang_reservoir/steam_vault/boss_warlord_kalithresh.cpp index 0a7416393..f1826ac4b 100644 --- a/scripts/outland/coilfang_reservoir/steam_vault/boss_warlord_kalithresh.cpp +++ b/scripts/outland/coilfang_reservoir/steam_vault/boss_warlord_kalithresh.cpp @@ -62,7 +62,7 @@ struct MANGOS_DLL_DECL boss_warlord_kalithreshAI : public ScriptedAI bool m_bHasTaunted; - void Reset() + void Reset() override { m_uiReflectionTimer = 15000; m_uiImpaleTimer = urand(7000, 14000); @@ -70,13 +70,13 @@ struct MANGOS_DLL_DECL boss_warlord_kalithreshAI : public ScriptedAI m_uiRageCastTimer = 0; } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_WARLORD_KALITHRESH, FAIL); } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { switch (urand(0, 2)) { @@ -89,12 +89,12 @@ struct MANGOS_DLL_DECL boss_warlord_kalithreshAI : public ScriptedAI m_pInstance->SetData(TYPE_WARLORD_KALITHRESH, IN_PROGRESS); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { DoScriptText(urand(0, 1) ? SAY_SLAY1 : SAY_SLAY2, m_creature); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoScriptText(SAY_DEATH, m_creature); @@ -102,7 +102,7 @@ struct MANGOS_DLL_DECL boss_warlord_kalithreshAI : public ScriptedAI m_pInstance->SetData(TYPE_WARLORD_KALITHRESH, DONE); } - void MoveInLineOfSight(Unit* pWho) + void MoveInLineOfSight(Unit* pWho) override { if (!m_bHasTaunted && m_creature->IsWithinDistInMap(pWho, 40.0f)) { @@ -113,7 +113,7 @@ struct MANGOS_DLL_DECL boss_warlord_kalithreshAI : public ScriptedAI ScriptedAI::MoveInLineOfSight(pWho); } - void MovementInform(uint32 uiMoveType, uint32 uiPointId) + void MovementInform(uint32 uiMoveType, uint32 uiPointId) override { if (uiMoveType != POINT_MOTION_TYPE || !uiPointId) return; @@ -122,7 +122,7 @@ struct MANGOS_DLL_DECL boss_warlord_kalithreshAI : public ScriptedAI m_uiRageCastTimer = 1000; } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -226,14 +226,14 @@ struct MANGOS_DLL_DECL mob_naga_distillerAI : public Scripted_NoMovementAI { mob_naga_distillerAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { Reset(); } - void Reset() + void Reset() override { m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); } - void MoveInLineOfSight(Unit* pWho) { } - void AttackStart(Unit* pWho) { } - void UpdateAI(const uint32 uiDiff) { } + void MoveInLineOfSight(Unit* pWho) override { } + void AttackStart(Unit* pWho) override { } + void UpdateAI(const uint32 uiDiff) override { } }; CreatureAI* GetAI_boss_warlord_kalithresh(Creature* pCreature) diff --git a/scripts/outland/coilfang_reservoir/steam_vault/steam_vault.h b/scripts/outland/coilfang_reservoir/steam_vault/steam_vault.h index 8de71dfd8..4ae5e3a6b 100644 --- a/scripts/outland/coilfang_reservoir/steam_vault/steam_vault.h +++ b/scripts/outland/coilfang_reservoir/steam_vault/steam_vault.h @@ -28,18 +28,18 @@ class MANGOS_DLL_DECL instance_steam_vault : public ScriptedInstance public: instance_steam_vault(Map* pMap); - void Initialize(); + void Initialize() override; - void OnCreatureCreate(Creature* pCreature); - void OnObjectCreate(GameObject* pGo); + void OnCreatureCreate(Creature* pCreature) override; + void OnObjectCreate(GameObject* pGo) override; - void OnCreatureDeath(Creature* pCreature); + void OnCreatureDeath(Creature* pCreature) override; - void SetData(uint32 uiType, uint32 uiData); - uint32 GetData(uint32 uiType); + void SetData(uint32 uiType, uint32 uiData) override; + uint32 GetData(uint32 uiType) override; - const char* Save() { return m_strInstData.c_str(); } - void Load(const char* chrIn); + const char* Save() override { return m_strInstData.c_str(); } + void Load(const char* chrIn) override; private: uint32 m_auiEncounter[MAX_ENCOUNTER]; diff --git a/scripts/outland/coilfang_reservoir/underbog/boss_hungarfen.cpp b/scripts/outland/coilfang_reservoir/underbog/boss_hungarfen.cpp index ca3ffd952..dfcdf9f36 100644 --- a/scripts/outland/coilfang_reservoir/underbog/boss_hungarfen.cpp +++ b/scripts/outland/coilfang_reservoir/underbog/boss_hungarfen.cpp @@ -50,24 +50,24 @@ struct MANGOS_DLL_DECL boss_hungarfenAI : public ScriptedAI uint32 m_uiMushroomTimer; uint32 m_uiAcidGeyserTimer; - void Reset() + void Reset() override { m_bHasSpores = false; m_uiMushroomTimer = 5000; // 1 mushroom after 5s, then one per 10s. This should be different in heroic mode m_uiAcidGeyserTimer = 10000; } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoCastSpellIfCan(m_creature, SPELL_DESPAWN_MUSHROOMS, CAST_TRIGGERED); } - void JustReachedHome() + void JustReachedHome() override { DoCastSpellIfCan(m_creature, SPELL_DESPAWN_MUSHROOMS, CAST_TRIGGERED); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -117,7 +117,7 @@ struct MANGOS_DLL_DECL mob_underbog_mushroomAI : public ScriptedAI uint32 m_uiShrinkTimer; uint32 m_uiSporeTimer; - void Reset() + void Reset() override { m_uiGrowTimer = 1000; m_uiSporeTimer = 15000; @@ -126,10 +126,10 @@ struct MANGOS_DLL_DECL mob_underbog_mushroomAI : public ScriptedAI DoCastSpellIfCan(m_creature, SPELL_PUTRID_MUSHROOM); } - void MoveInLineOfSight(Unit* pWho) { return; } - void AttackStart(Unit* pWho) { return; } + void MoveInLineOfSight(Unit* pWho) override { return; } + void AttackStart(Unit* pWho) override { return; } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (m_uiSporeTimer) { diff --git a/scripts/outland/gruuls_lair/boss_gruul.cpp b/scripts/outland/gruuls_lair/boss_gruul.cpp index 5ddac1918..657247dab 100644 --- a/scripts/outland/gruuls_lair/boss_gruul.cpp +++ b/scripts/outland/gruuls_lair/boss_gruul.cpp @@ -71,7 +71,7 @@ struct MANGOS_DLL_DECL boss_gruulAI : public ScriptedAI bool m_bPerformingGroundSlam; - void Reset() + void Reset() override { m_uiGrowthTimer = 30000; m_uiCaveInTimer = 27000; @@ -82,7 +82,7 @@ struct MANGOS_DLL_DECL boss_gruulAI : public ScriptedAI m_bPerformingGroundSlam = false; } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoScriptText(SAY_AGGRO, m_creature); @@ -90,13 +90,13 @@ struct MANGOS_DLL_DECL boss_gruulAI : public ScriptedAI m_pInstance->SetData(TYPE_GRUUL_EVENT, IN_PROGRESS); } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_GRUUL_EVENT, FAIL); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { switch (urand(0, 2)) { @@ -106,7 +106,7 @@ struct MANGOS_DLL_DECL boss_gruulAI : public ScriptedAI } } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoScriptText(SAY_DEATH, m_creature); @@ -114,7 +114,7 @@ struct MANGOS_DLL_DECL boss_gruulAI : public ScriptedAI m_pInstance->SetData(TYPE_GRUUL_EVENT, DONE); } - void SpellHitTarget(Unit* pTarget, const SpellEntry* pSpell) + void SpellHitTarget(Unit* pTarget, const SpellEntry* pSpell) override { // This to emulate effect1 (77) of SPELL_GROUND_SLAM, knock back to any direction // It's initially wrong, since this will cause fall damage, which is by comments, not intended. @@ -154,7 +154,7 @@ struct MANGOS_DLL_DECL boss_gruulAI : public ScriptedAI } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/outland/gruuls_lair/boss_high_king_maulgar.cpp b/scripts/outland/gruuls_lair/boss_high_king_maulgar.cpp index f3ea719c6..41956223d 100644 --- a/scripts/outland/gruuls_lair/boss_high_king_maulgar.cpp +++ b/scripts/outland/gruuls_lair/boss_high_king_maulgar.cpp @@ -87,7 +87,7 @@ struct MANGOS_DLL_DECL boss_high_king_maulgarAI : public ScriptedAI bool m_bPhase2; - void Reset() + void Reset() override { m_uiArcingSmashTimer = urand(8000, 14000); m_uiMightyBlowTimer = urand(15000, 25000); @@ -98,13 +98,13 @@ struct MANGOS_DLL_DECL boss_high_king_maulgarAI : public ScriptedAI m_bPhase2 = false; } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_MAULGAR_EVENT, FAIL); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { switch (urand(0, 2)) { @@ -114,7 +114,7 @@ struct MANGOS_DLL_DECL boss_high_king_maulgarAI : public ScriptedAI } } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoScriptText(SAY_DEATH, m_creature); @@ -123,7 +123,7 @@ struct MANGOS_DLL_DECL boss_high_king_maulgarAI : public ScriptedAI m_pInstance->SetData(TYPE_MAULGAR_EVENT, SPECIAL); } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoScriptText(SAY_AGGRO, m_creature); @@ -142,7 +142,7 @@ struct MANGOS_DLL_DECL boss_high_king_maulgarAI : public ScriptedAI } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -216,7 +216,7 @@ struct MANGOS_DLL_DECL Council_Base_AI : public ScriptedAI ScriptedInstance* m_pInstance; - void JustDied(Unit* pVictim) + void JustDied(Unit* pVictim) override { if (!m_pInstance) return; @@ -242,14 +242,14 @@ struct MANGOS_DLL_DECL boss_olm_the_summonerAI : public Council_Base_AI uint32 m_uiDeathCoilTimer; uint32 m_uiSummonTimer; - void Reset() + void Reset() override { m_uiDarkDecayTimer = 18000; m_uiDeathCoilTimer = 14000; m_uiSummonTimer = 10000; } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -292,7 +292,7 @@ struct MANGOS_DLL_DECL boss_kiggler_the_crazedAI : public Council_Base_AI uint32 m_uiArcaneShockTimer; uint32 m_uiArcaneExplosionTimer; - void Reset() + void Reset() override { m_uiGreatherPolymorphTimer = 15000; m_uiLightningBoltTimer = 10000; @@ -300,7 +300,7 @@ struct MANGOS_DLL_DECL boss_kiggler_the_crazedAI : public Council_Base_AI m_uiArcaneExplosionTimer = 30000; } - void SpellHitTarget(Unit* pVictim, const SpellEntry* pSpell) + void SpellHitTarget(Unit* pVictim, const SpellEntry* pSpell) override { // Spell currently not supported by core. Knock back effect should lower threat // Workaround in script: @@ -313,7 +313,7 @@ struct MANGOS_DLL_DECL boss_kiggler_the_crazedAI : public Council_Base_AI } } - void AttackStart(Unit* pWho) + void AttackStart(Unit* pWho) override { if (!pWho) return; @@ -328,7 +328,7 @@ struct MANGOS_DLL_DECL boss_kiggler_the_crazedAI : public Council_Base_AI } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -381,14 +381,14 @@ struct MANGOS_DLL_DECL boss_blindeye_the_seerAI : public Council_Base_AI uint32 m_uiHealTimer; uint32 m_uiPrayerofHealingTimer; - void Reset() + void Reset() override { m_uiGreaterPowerWordShieldTimer = 5000; m_uiHealTimer = urand(25000, 40000); m_uiPrayerofHealingTimer = urand(45000, 55000); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -433,14 +433,14 @@ struct MANGOS_DLL_DECL boss_krosh_firehandAI : public Council_Base_AI uint32 m_uiSpellShieldTimer; uint32 m_uiBlastWaveTimer; - void Reset() + void Reset() override { m_uiGreaterFireballTimer = 4000; m_uiSpellShieldTimer = 1000; m_uiBlastWaveTimer = 12000; } - void AttackStart(Unit* pWho) + void AttackStart(Unit* pWho) override { if (!pWho) return; @@ -455,7 +455,7 @@ struct MANGOS_DLL_DECL boss_krosh_firehandAI : public Council_Base_AI } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/outland/gruuls_lair/gruuls_lair.h b/scripts/outland/gruuls_lair/gruuls_lair.h index bd1291e90..d50a9d83e 100644 --- a/scripts/outland/gruuls_lair/gruuls_lair.h +++ b/scripts/outland/gruuls_lair/gruuls_lair.h @@ -30,17 +30,17 @@ class MANGOS_DLL_DECL instance_gruuls_lair : public ScriptedInstance public: instance_gruuls_lair(Map* pMap); - void Initialize(); - bool IsEncounterInProgress() const; + void Initialize() override; + bool IsEncounterInProgress() const override; - void OnCreatureCreate(Creature* pCreature); - void OnObjectCreate(GameObject* pGo); + void OnCreatureCreate(Creature* pCreature) override; + void OnObjectCreate(GameObject* pGo) override; - void SetData(uint32 uiType, uint32 uiData); - uint32 GetData(uint32 uiType); + void SetData(uint32 uiType, uint32 uiData) override; + uint32 GetData(uint32 uiType) override; - const char* Save() { return m_strSaveData.c_str(); } - void Load(const char* chrIn); + const char* Save() override { return m_strSaveData.c_str(); } + void Load(const char* chrIn) override; private: uint32 m_auiEncounter[MAX_ENCOUNTER]; diff --git a/scripts/outland/hellfire_citadel/blood_furnace/blood_furnace.h b/scripts/outland/hellfire_citadel/blood_furnace/blood_furnace.h index 1b7f560b1..17dabd48a 100644 --- a/scripts/outland/hellfire_citadel/blood_furnace/blood_furnace.h +++ b/scripts/outland/hellfire_citadel/blood_furnace/blood_furnace.h @@ -59,21 +59,21 @@ class MANGOS_DLL_DECL instance_blood_furnace : public ScriptedInstance public: instance_blood_furnace(Map* pMap); - void Initialize(); + void Initialize() override; - void OnCreatureCreate(Creature* pCreature); - void OnObjectCreate(GameObject* pGo); + void OnCreatureCreate(Creature* pCreature) override; + void OnObjectCreate(GameObject* pGo) override; - void OnCreatureDeath(Creature* pCreature); + void OnCreatureDeath(Creature* pCreature) override; void OnCreatureEvade(Creature* pCreature); - void SetData(uint32 uiType, uint32 uiData); - uint32 GetData(uint32 uiType); + void SetData(uint32 uiType, uint32 uiData) override; + uint32 GetData(uint32 uiType) override; - void Update(uint32 uiDiff); + void Update(uint32 uiDiff) override; - void Load(const char* chrIn); - const char* Save() { return m_strInstData.c_str(); } + void Load(const char* chrIn) override; + const char* Save() override { return m_strInstData.c_str(); } void GetMovementDistanceForIndex(uint32 uiIndex, float& dx, float& dy); diff --git a/scripts/outland/hellfire_citadel/blood_furnace/boss_broggok.cpp b/scripts/outland/hellfire_citadel/blood_furnace/boss_broggok.cpp index b400177b6..56bf02c54 100644 --- a/scripts/outland/hellfire_citadel/blood_furnace/boss_broggok.cpp +++ b/scripts/outland/hellfire_citadel/blood_furnace/boss_broggok.cpp @@ -55,14 +55,14 @@ struct MANGOS_DLL_DECL boss_broggokAI : public ScriptedAI uint32 m_uiPoisonSpawnTimer; uint32 m_uiPoisonBoltTimer; - void Reset() + void Reset() override { m_uiAcidSprayTimer = 10000; m_uiPoisonSpawnTimer = 5000; m_uiPoisonBoltTimer = 7000; } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoScriptText(SAY_AGGRO, m_creature); @@ -70,7 +70,7 @@ struct MANGOS_DLL_DECL boss_broggokAI : public ScriptedAI m_pInstance->SetData(TYPE_BROGGOK_EVENT, IN_PROGRESS); } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { // ToDo: set correct flags and data in DB!!! pSummoned->setFaction(16); @@ -79,13 +79,13 @@ struct MANGOS_DLL_DECL boss_broggokAI : public ScriptedAI pSummoned->CastSpell(pSummoned, SPELL_POISON, false, NULL, NULL, m_creature->GetObjectGuid()); } - void JustDied(Unit* pWho) + void JustDied(Unit* pWho) override { if (m_pInstance) m_pInstance->SetData(TYPE_BROGGOK_EVENT, DONE); } - void EnterEvadeMode() + void EnterEvadeMode() override { m_creature->RemoveAllAuras(); m_creature->DeleteThreatList(); @@ -112,7 +112,7 @@ struct MANGOS_DLL_DECL boss_broggokAI : public ScriptedAI } // Reset Orientation - void MovementInform(uint32 uiMotionType, uint32 uiPointId) + void MovementInform(uint32 uiMotionType, uint32 uiPointId) override { if (uiMotionType != POINT_MOTION_TYPE || uiPointId != POINT_EVENT_COMBAT) return; @@ -121,7 +121,7 @@ struct MANGOS_DLL_DECL boss_broggokAI : public ScriptedAI m_creature->SetFacingToObject(pFrontDoor); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -158,9 +158,9 @@ struct MANGOS_DLL_DECL mob_broggok_poisoncloudAI : public ScriptedAI { mob_broggok_poisoncloudAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} - void Reset() { } - void MoveInLineOfSight(Unit* who) { } - void AttackStart(Unit* who) { } + void Reset() override { } + void MoveInLineOfSight(Unit* who) override { } + void AttackStart(Unit* who) override { } }; CreatureAI* GetAI_boss_broggok(Creature* pCreature) diff --git a/scripts/outland/hellfire_citadel/blood_furnace/boss_kelidan_the_breaker.cpp b/scripts/outland/hellfire_citadel/blood_furnace/boss_kelidan_the_breaker.cpp index 2a8dc896c..12007425e 100644 --- a/scripts/outland/hellfire_citadel/blood_furnace/boss_kelidan_the_breaker.cpp +++ b/scripts/outland/hellfire_citadel/blood_furnace/boss_kelidan_the_breaker.cpp @@ -94,7 +94,7 @@ struct MANGOS_DLL_DECL boss_kelidan_the_breakerAI : public ScriptedAI GuidVector m_vAddGuids; - void Reset() + void Reset() override { m_uiShadowVolleyTimer = 1000; m_uiBurningNovaTimer = 15000; @@ -103,7 +103,7 @@ struct MANGOS_DLL_DECL boss_kelidan_the_breakerAI : public ScriptedAI m_uiKilledAdds = 0; } - void MoveInLineOfSight(Unit* pWho) + void MoveInLineOfSight(Unit* pWho) override { if (!m_bDidMagtheridonYell && pWho->GetTypeId() == TYPEID_PLAYER && !((Player*)pWho)->isGameMaster() && m_creature->_IsWithinDist(pWho, 73.0f, false)) { @@ -116,12 +116,12 @@ struct MANGOS_DLL_DECL boss_kelidan_the_breakerAI : public ScriptedAI ScriptedAI::MoveInLineOfSight(pWho); } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoScriptText(SAY_WAKE, m_creature); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { if (urand(0, 1)) return; @@ -129,7 +129,7 @@ struct MANGOS_DLL_DECL boss_kelidan_the_breakerAI : public ScriptedAI DoScriptText(urand(0, 1) ? SAY_KILL_1 : SAY_KILL_2, m_creature); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoScriptText(SAY_DIE, m_creature); @@ -137,7 +137,7 @@ struct MANGOS_DLL_DECL boss_kelidan_the_breakerAI : public ScriptedAI m_pInstance->SetData(TYPE_KELIDAN_EVENT, DONE); } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_KELIDAN_EVENT, FAIL); @@ -218,7 +218,7 @@ struct MANGOS_DLL_DECL boss_kelidan_the_breakerAI : public ScriptedAI } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (m_uiSetupAddsTimer) { @@ -313,13 +313,13 @@ struct MANGOS_DLL_DECL mob_shadowmoon_channelerAI : public ScriptedAI uint32 m_uiShadowBoltTimer; uint32 m_uiMarkOfShadowTimer; - void Reset() + void Reset() override { m_uiShadowBoltTimer = urand(1000, 2000); m_uiMarkOfShadowTimer = urand(5000, 7000); } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { m_creature->InterruptNonMeleeSpells(false); @@ -344,7 +344,7 @@ struct MANGOS_DLL_DECL mob_shadowmoon_channelerAI : public ScriptedAI pKelidanAI->AddJustAggroed(pWho); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { if (!m_pInstance) return; @@ -354,7 +354,7 @@ struct MANGOS_DLL_DECL mob_shadowmoon_channelerAI : public ScriptedAI pKelidanAI->AddJustDied(pKiller); } - void JustReachedHome() + void JustReachedHome() override { if (!m_pInstance) return; @@ -364,7 +364,7 @@ struct MANGOS_DLL_DECL mob_shadowmoon_channelerAI : public ScriptedAI pKelidanAI->AddJustReachedHome(); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/outland/hellfire_citadel/blood_furnace/boss_the_maker.cpp b/scripts/outland/hellfire_citadel/blood_furnace/boss_the_maker.cpp index f4c599af4..7e3d1dc8c 100644 --- a/scripts/outland/hellfire_citadel/blood_furnace/boss_the_maker.cpp +++ b/scripts/outland/hellfire_citadel/blood_furnace/boss_the_maker.cpp @@ -57,7 +57,7 @@ struct MANGOS_DLL_DECL boss_the_makerAI : public ScriptedAI uint32 m_uiDominationTimer; uint32 m_uiKnockdownTimer; - void Reset() + void Reset() override { m_uiAcidSprayTimer = 15000; m_uiExplodingBreakerTimer = 6000; @@ -65,7 +65,7 @@ struct MANGOS_DLL_DECL boss_the_makerAI : public ScriptedAI m_uiKnockdownTimer = 10000; } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { switch (urand(0, 2)) { @@ -78,18 +78,18 @@ struct MANGOS_DLL_DECL boss_the_makerAI : public ScriptedAI m_pInstance->SetData(TYPE_THE_MAKER_EVENT, IN_PROGRESS); } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_THE_MAKER_EVENT, FAIL); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { DoScriptText(urand(0, 1) ? SAY_KILL_1 : SAY_KILL_2, m_creature); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoScriptText(SAY_DIE, m_creature); @@ -97,7 +97,7 @@ struct MANGOS_DLL_DECL boss_the_makerAI : public ScriptedAI m_pInstance->SetData(TYPE_THE_MAKER_EVENT, DONE); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_nazan_and_vazruden.cpp b/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_nazan_and_vazruden.cpp index 8daaacd5f..73c5127af 100644 --- a/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_nazan_and_vazruden.cpp +++ b/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_nazan_and_vazruden.cpp @@ -81,13 +81,13 @@ struct MANGOS_DLL_DECL boss_vazrudenAI : public ScriptedAI uint32 m_uiRevengeTimer; bool m_bHealthBelow; - void Reset() + void Reset() override { m_bHealthBelow = false; m_uiRevengeTimer = urand(5500, 8400); } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { switch (urand(0, 2)) { @@ -97,7 +97,7 @@ struct MANGOS_DLL_DECL boss_vazrudenAI : public ScriptedAI } } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoScriptText(SAY_DEATH, m_creature); @@ -105,13 +105,13 @@ struct MANGOS_DLL_DECL boss_vazrudenAI : public ScriptedAI m_pInstance->SetData(TYPE_VAZRUDEN, DONE); } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_VAZRUDEN, FAIL); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { DoScriptText(urand(0, 1) ? SAY_KILL1 : SAY_KILL2, m_creature); } @@ -126,7 +126,7 @@ struct MANGOS_DLL_DECL boss_vazrudenAI : public ScriptedAI } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -182,7 +182,7 @@ struct MANGOS_DLL_DECL boss_vazruden_heraldAI : public ScriptedAI ObjectGuid m_lastSeenPlayerGuid; ObjectGuid m_vazrudenGuid; - void Reset() + void Reset() override { if (m_creature->GetEntry() != NPC_VAZRUDEN_HERALD) m_creature->UpdateEntry(NPC_VAZRUDEN_HERALD); @@ -204,7 +204,7 @@ struct MANGOS_DLL_DECL boss_vazruden_heraldAI : public ScriptedAI m_creature->SetLevitate(true); } - void MoveInLineOfSight(Unit* pWho) + void MoveInLineOfSight(Unit* pWho) override { if (m_bIsEventInProgress && !m_lastSeenPlayerGuid && pWho->GetTypeId() == TYPEID_PLAYER && pWho->isAlive() && !((Player*)pWho)->isGameMaster()) { @@ -218,7 +218,7 @@ struct MANGOS_DLL_DECL boss_vazruden_heraldAI : public ScriptedAI ScriptedAI::MoveInLineOfSight(pWho); } - void MovementInform(uint32 uiType, uint32 uiPointId) + void MovementInform(uint32 uiType, uint32 uiPointId) override { if (!m_pInstance) return; @@ -300,7 +300,7 @@ struct MANGOS_DLL_DECL boss_vazruden_heraldAI : public ScriptedAI m_creature->GetMotionMaster()->MoveIdle(); } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { if (pSummoned->GetEntry() != NPC_VAZRUDEN) return; @@ -314,19 +314,19 @@ struct MANGOS_DLL_DECL boss_vazruden_heraldAI : public ScriptedAI m_pInstance->SetData(TYPE_VAZRUDEN, IN_PROGRESS); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { if (m_pInstance) m_pInstance->SetData(TYPE_NAZAN, DONE); } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_NAZAN, FAIL); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) { diff --git a/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_omor_the_unscarred.cpp b/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_omor_the_unscarred.cpp index 19e4e3a68..cca692f34 100644 --- a/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_omor_the_unscarred.cpp +++ b/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_omor_the_unscarred.cpp @@ -64,7 +64,7 @@ struct MANGOS_DLL_DECL boss_omor_the_unscarredAI : public ScriptedAI ObjectGuid m_playerGuid; bool m_bCanPullBack; - void Reset() + void Reset() override { DoScriptText(SAY_WIPE, m_creature); @@ -78,7 +78,7 @@ struct MANGOS_DLL_DECL boss_omor_the_unscarredAI : public ScriptedAI m_bCanPullBack = false; } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { switch (urand(0, 2)) { @@ -88,7 +88,7 @@ struct MANGOS_DLL_DECL boss_omor_the_unscarredAI : public ScriptedAI } } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { if (urand(0, 1)) return; @@ -96,7 +96,7 @@ struct MANGOS_DLL_DECL boss_omor_the_unscarredAI : public ScriptedAI DoScriptText(SAY_KILL_1, m_creature); } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { DoScriptText(SAY_SUMMON, m_creature); @@ -104,12 +104,12 @@ struct MANGOS_DLL_DECL boss_omor_the_unscarredAI : public ScriptedAI pSummoned->AI()->AttackStart(pTarget); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoScriptText(SAY_DIE, m_creature); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_watchkeeper_gargolmar.cpp b/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_watchkeeper_gargolmar.cpp index 169aba769..03d36ef4e 100644 --- a/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_watchkeeper_gargolmar.cpp +++ b/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_watchkeeper_gargolmar.cpp @@ -60,7 +60,7 @@ struct MANGOS_DLL_DECL boss_watchkeeper_gargolmarAI : public ScriptedAI bool m_bHasTaunted; bool m_bYelledForHeal; - void Reset() + void Reset() override { m_uiSurgeTimer = urand(2400, 6100); m_uiMortalWoundTimer = urand(3500, 14400); @@ -71,7 +71,7 @@ struct MANGOS_DLL_DECL boss_watchkeeper_gargolmarAI : public ScriptedAI m_bYelledForHeal = false; } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { switch (urand(0, 2)) { @@ -81,7 +81,7 @@ struct MANGOS_DLL_DECL boss_watchkeeper_gargolmarAI : public ScriptedAI } } - void MoveInLineOfSight(Unit* pWho) + void MoveInLineOfSight(Unit* pWho) override { if (!m_bHasTaunted && m_creature->IsWithinDistInMap(pWho, 60.0f)) { @@ -92,17 +92,17 @@ struct MANGOS_DLL_DECL boss_watchkeeper_gargolmarAI : public ScriptedAI ScriptedAI::MoveInLineOfSight(pWho); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { DoScriptText(urand(0, 1) ? SAY_KILL_1 : SAY_KILL_2, m_creature); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoScriptText(SAY_DIE, m_creature); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/outland/hellfire_citadel/hellfire_ramparts/hellfire_ramparts.h b/scripts/outland/hellfire_citadel/hellfire_ramparts/hellfire_ramparts.h index 6695af03b..98ae28b65 100644 --- a/scripts/outland/hellfire_citadel/hellfire_ramparts/hellfire_ramparts.h +++ b/scripts/outland/hellfire_citadel/hellfire_ramparts/hellfire_ramparts.h @@ -25,13 +25,13 @@ class MANGOS_DLL_DECL instance_ramparts : public ScriptedInstance public: instance_ramparts(Map* pMap); - void Initialize(); + void Initialize() override; - void OnCreatureCreate(Creature* pCreature); - void OnObjectCreate(GameObject* pGo); + void OnCreatureCreate(Creature* pCreature) override; + void OnObjectCreate(GameObject* pGo) override; - void SetData(uint32 uiType, uint32 uiData); - uint32 GetData(uint32 uiType); + void SetData(uint32 uiType, uint32 uiData) override; + uint32 GetData(uint32 uiType) override; // No need to save and load this instance (only one encounter needs special handling, no doors used) diff --git a/scripts/outland/hellfire_citadel/magtheridons_lair/boss_magtheridon.cpp b/scripts/outland/hellfire_citadel/magtheridons_lair/boss_magtheridon.cpp index 377f1f431..244feb190 100644 --- a/scripts/outland/hellfire_citadel/magtheridons_lair/boss_magtheridon.cpp +++ b/scripts/outland/hellfire_citadel/magtheridons_lair/boss_magtheridon.cpp @@ -106,7 +106,7 @@ struct MANGOS_DLL_DECL boss_magtheridonAI : public ScriptedAI bool m_bIsPhase3; - void Reset() + void Reset() override { m_uiBerserkTimer = 20 * MINUTE * IN_MILLISECONDS; m_uiQuakeTimer = 30000; @@ -124,7 +124,7 @@ struct MANGOS_DLL_DECL boss_magtheridonAI : public ScriptedAI m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoScriptText(EMOTE_FREED, m_creature); DoScriptText(urand(0, 1) ? SAY_AGGRO_1 : SAY_AGGRO_2, m_creature); @@ -132,12 +132,12 @@ struct MANGOS_DLL_DECL boss_magtheridonAI : public ScriptedAI m_creature->RemoveAurasDueToSpell(SPELL_SHADOW_CAGE_DUMMY); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { DoScriptText(SAY_PLAYER_KILLED, m_creature); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { if (m_pInstance) m_pInstance->SetData(TYPE_MAGTHERIDON_EVENT, DONE); @@ -145,20 +145,20 @@ struct MANGOS_DLL_DECL boss_magtheridonAI : public ScriptedAI DoScriptText(SAY_DEATH, m_creature); } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_MAGTHERIDON_EVENT, FAIL); } - void SpellHit(Unit* pCaster, const SpellEntry* pSpell) + void SpellHit(Unit* pCaster, const SpellEntry* pSpell) override { // When banished by the cubes if (pSpell->Id == SPELL_SHADOW_CAGE) DoScriptText(SAY_BANISH, m_creature); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -318,7 +318,7 @@ struct MANGOS_DLL_DECL mob_hellfire_channelerAI : public ScriptedAI uint32 m_uiFearTimer; uint32 m_uiInfernalTimer; - void Reset() + void Reset() override { m_uiShadowGraspTimer = 10000; m_uiShadowBoltVolleyTimer = urand(8000, 10000); @@ -327,7 +327,7 @@ struct MANGOS_DLL_DECL mob_hellfire_channelerAI : public ScriptedAI m_uiInfernalTimer = urand(10000, 50000); } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { m_creature->InterruptNonMeleeSpells(false); @@ -336,32 +336,32 @@ struct MANGOS_DLL_DECL mob_hellfire_channelerAI : public ScriptedAI } // Don't attack on LoS check - void MoveInLineOfSight(Unit* pWho) { } + void MoveInLineOfSight(Unit* pWho) override { } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoCastSpellIfCan(m_creature, SPELL_SOUL_TRANSFER, CAST_TRIGGERED); } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_CHANNELER_EVENT, FAIL); } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { if (m_creature->getVictim()) pSummoned->AI()->AttackStart(m_creature->getVictim()); } - void SummonedCreatureDespawn(Creature* pSummoned) + void SummonedCreatureDespawn(Creature* pSummoned) override { if (pSummoned->GetEntry() == NPC_BURNING_ABYSS) m_uiInfernalTimer = urand(10000, 15000); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { // Channel spell on Magtheridon, on OOC timer if (m_uiShadowGraspTimer) @@ -465,15 +465,15 @@ struct MANGOS_DLL_DECL npc_target_triggerAI : public Scripted_NoMovementAI uint32 m_uiDebrisTimer; - void Reset() + void Reset() override { m_uiDebrisTimer = 0; } - void AttackStart(Unit* pWho) {} - void MoveInLineOfSight(Unit* pWho) {} + void AttackStart(Unit* pWho) override {} + void MoveInLineOfSight(Unit* pWho) override {} - void SpellHit(Unit* pCaster, const SpellEntry* pSpell) + void SpellHit(Unit* pCaster, const SpellEntry* pSpell) override { // Workaround for missing core support for this type of dummy aura if (pSpell->Id == SPELL_QUAKE_EFFECT) @@ -483,7 +483,7 @@ struct MANGOS_DLL_DECL npc_target_triggerAI : public Scripted_NoMovementAI } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { // Cast debris damage after 5 seconds (on visual removal) if (m_uiDebrisTimer) @@ -507,13 +507,13 @@ struct MANGOS_DLL_DECL mob_abyssalAI : public ScriptedAI uint32 m_uiFireBlastTimer; uint32 m_uiDespawnTimer; - void Reset() + void Reset() override { m_uiDespawnTimer = 60000; m_uiFireBlastTimer = 6000; } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/outland/hellfire_citadel/magtheridons_lair/magtheridons_lair.h b/scripts/outland/hellfire_citadel/magtheridons_lair/magtheridons_lair.h index 884f68b3b..c792d827b 100644 --- a/scripts/outland/hellfire_citadel/magtheridons_lair/magtheridons_lair.h +++ b/scripts/outland/hellfire_citadel/magtheridons_lair/magtheridons_lair.h @@ -36,17 +36,17 @@ class MANGOS_DLL_DECL instance_magtheridons_lair : public ScriptedInstance public: instance_magtheridons_lair(Map* pMap); - void Initialize(); + void Initialize() override; - bool IsEncounterInProgress() const; + bool IsEncounterInProgress() const override; - void OnCreatureCreate(Creature* pCreature); - void OnObjectCreate(GameObject* pGo); + void OnCreatureCreate(Creature* pCreature) override; + void OnObjectCreate(GameObject* pGo) override; - void SetData(uint32 uiType, uint32 uiData); - uint32 GetData(uint32 uiType); + void SetData(uint32 uiType, uint32 uiData) override; + uint32 GetData(uint32 uiType) override; - void Update(uint32 uiDiff); + void Update(uint32 uiDiff) override; private: uint32 m_auiEncounter[MAX_ENCOUNTER]; diff --git a/scripts/outland/hellfire_citadel/shattered_halls/boss_nethekurse.cpp b/scripts/outland/hellfire_citadel/shattered_halls/boss_nethekurse.cpp index a8c2500cb..851c8c1e8 100644 --- a/scripts/outland/hellfire_citadel/shattered_halls/boss_nethekurse.cpp +++ b/scripts/outland/hellfire_citadel/shattered_halls/boss_nethekurse.cpp @@ -109,7 +109,7 @@ struct MANGOS_DLL_DECL boss_grand_warlock_nethekurseAI : public ScriptedAI ObjectGuid m_lastEventInvokerGuid; - void Reset() + void Reset() override { m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); @@ -158,7 +158,6 @@ struct MANGOS_DLL_DECL boss_grand_warlock_nethekurseAI : public ScriptedAI if (pKiller) AttackStart(pKiller); - } } @@ -186,7 +185,7 @@ struct MANGOS_DLL_DECL boss_grand_warlock_nethekurseAI : public ScriptedAI AttackStart(pEnemy); } - void AttackStart(Unit* pWho) + void AttackStart(Unit* pWho) override { if (m_bIsIntroEvent || !m_bIsMainEvent) return; @@ -204,7 +203,7 @@ struct MANGOS_DLL_DECL boss_grand_warlock_nethekurseAI : public ScriptedAI } } - void MoveInLineOfSight(Unit* pWho) + void MoveInLineOfSight(Unit* pWho) override { if (!m_bIntroOnce && pWho->GetTypeId() == TYPEID_PLAYER && !((Player*)pWho)->isGameMaster() && m_creature->IsWithinDistInMap(pWho, 50.0f) && m_creature->IsWithinLOSInMap(pWho)) { @@ -224,7 +223,7 @@ struct MANGOS_DLL_DECL boss_grand_warlock_nethekurseAI : public ScriptedAI ScriptedAI::MoveInLineOfSight(pWho); } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { switch (urand(0, 2)) { @@ -234,7 +233,7 @@ struct MANGOS_DLL_DECL boss_grand_warlock_nethekurseAI : public ScriptedAI } } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { // ToDo: this should be done in DB pSummoned->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); @@ -243,12 +242,12 @@ struct MANGOS_DLL_DECL boss_grand_warlock_nethekurseAI : public ScriptedAI pSummoned->CastSpell(pSummoned, SPELL_CONSUMPTION, false, NULL, NULL, m_creature->GetObjectGuid()); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { DoScriptText(urand(0, 1) ? SAY_SLAY_1 : SAY_SLAY_2, m_creature); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoScriptText(SAY_DIE, m_creature); @@ -258,7 +257,7 @@ struct MANGOS_DLL_DECL boss_grand_warlock_nethekurseAI : public ScriptedAI m_pInstance->SetData(TYPE_NETHEKURSE, DONE); } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_NETHEKURSE, FAIL); @@ -272,7 +271,7 @@ struct MANGOS_DLL_DECL boss_grand_warlock_nethekurseAI : public ScriptedAI } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (m_bIsIntroEvent) { @@ -349,18 +348,18 @@ struct MANGOS_DLL_DECL mob_fel_orc_convertAI : public ScriptedAI ScriptedInstance* m_pInstance; uint32 m_uiHemorrhageTimer; - void Reset() + void Reset() override { m_creature->SetNoCallAssistance(true); // we don't want any assistance (WE R HEROZ!) m_uiHemorrhageTimer = 3000; } - void MoveInLineOfSight(Unit* pWho) + void MoveInLineOfSight(Unit* pWho) override { return; } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { if (m_pInstance) { @@ -378,7 +377,7 @@ struct MANGOS_DLL_DECL mob_fel_orc_convertAI : public ScriptedAI } } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { if (m_pInstance) { @@ -393,7 +392,7 @@ struct MANGOS_DLL_DECL mob_fel_orc_convertAI : public ScriptedAI } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -415,9 +414,9 @@ struct MANGOS_DLL_DECL mob_lesser_shadow_fissureAI : public Scripted_NoMovementA { mob_lesser_shadow_fissureAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { Reset(); } - void Reset() { } - void MoveInLineOfSight(Unit* pWho) { } - void AttackStart(Unit* pWho) { } + void Reset() override { } + void MoveInLineOfSight(Unit* pWho) override { } + void AttackStart(Unit* pWho) override { } }; CreatureAI* GetAI_boss_grand_warlock_nethekurse(Creature* pCreature) diff --git a/scripts/outland/hellfire_citadel/shattered_halls/boss_warbringer_omrogg.cpp b/scripts/outland/hellfire_citadel/shattered_halls/boss_warbringer_omrogg.cpp index 4a543d784..36a00890e 100644 --- a/scripts/outland/hellfire_citadel/shattered_halls/boss_warbringer_omrogg.cpp +++ b/scripts/outland/hellfire_citadel/shattered_halls/boss_warbringer_omrogg.cpp @@ -105,7 +105,7 @@ struct MANGOS_DLL_DECL mob_omrogg_headsAI : public ScriptedAI uint32 m_uiDeathTimer; bool m_bDeathYell; - void Reset() + void Reset() override { m_uiDeathTimer = 2000; m_bDeathYell = false; @@ -116,7 +116,7 @@ struct MANGOS_DLL_DECL mob_omrogg_headsAI : public ScriptedAI m_bDeathYell = true; } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_bDeathYell) return; @@ -164,7 +164,7 @@ struct MANGOS_DLL_DECL boss_warbringer_omroggAI : public ScriptedAI uint32 m_uiThunderClapTimer; uint32 m_uiResetThreatTimer; - void Reset() + void Reset() override { m_bAggroYell = false; m_bThreatYell = false; @@ -198,7 +198,7 @@ struct MANGOS_DLL_DECL boss_warbringer_omroggAI : public ScriptedAI m_bThreatYell = true; } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { m_creature->SummonCreature(NPC_LEFT_HEAD, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_DEAD_DESPAWN, 0); m_creature->SummonCreature(NPC_RIGHT_HEAD, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_DEAD_DESPAWN, 0); @@ -217,7 +217,7 @@ struct MANGOS_DLL_DECL boss_warbringer_omroggAI : public ScriptedAI m_pInstance->SetData(TYPE_OMROGG, IN_PROGRESS); } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { if (pSummoned->GetEntry() == NPC_LEFT_HEAD) m_leftHeadGuid = pSummoned->GetObjectGuid(); @@ -225,7 +225,7 @@ struct MANGOS_DLL_DECL boss_warbringer_omroggAI : public ScriptedAI m_rightHeadGuid = pSummoned->GetObjectGuid(); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { Creature* pLeftHead = m_creature->GetMap()->GetCreature(m_leftHeadGuid); Creature* pRightHead = m_creature->GetMap()->GetCreature(m_rightHeadGuid); @@ -251,7 +251,7 @@ struct MANGOS_DLL_DECL boss_warbringer_omroggAI : public ScriptedAI } } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { Creature* pLeftHead = m_creature->GetMap()->GetCreature(m_leftHeadGuid); Creature* pRightHead = m_creature->GetMap()->GetCreature(m_rightHeadGuid); @@ -269,7 +269,7 @@ struct MANGOS_DLL_DECL boss_warbringer_omroggAI : public ScriptedAI m_pInstance->SetData(TYPE_OMROGG, DONE); } - void JustReachedHome() + void JustReachedHome() override { if (Creature* pLeftHead = m_creature->GetMap()->GetCreature(m_leftHeadGuid)) { @@ -287,7 +287,7 @@ struct MANGOS_DLL_DECL boss_warbringer_omroggAI : public ScriptedAI m_pInstance->SetData(TYPE_OMROGG, FAIL); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (m_uiDelayTimer < uiDiff) { diff --git a/scripts/outland/hellfire_citadel/shattered_halls/boss_warchief_kargath_bladefist.cpp b/scripts/outland/hellfire_citadel/shattered_halls/boss_warchief_kargath_bladefist.cpp index 732d290a9..2b0b708d9 100644 --- a/scripts/outland/hellfire_citadel/shattered_halls/boss_warchief_kargath_bladefist.cpp +++ b/scripts/outland/hellfire_citadel/shattered_halls/boss_warchief_kargath_bladefist.cpp @@ -80,7 +80,7 @@ struct MANGOS_DLL_DECL boss_warchief_kargath_bladefistAI : public ScriptedAI uint32 m_uiTargetNum; - void Reset() + void Reset() override { m_creature->SetSpeedRate(MOVE_RUN, 2.0f); @@ -94,7 +94,7 @@ struct MANGOS_DLL_DECL boss_warchief_kargath_bladefistAI : public ScriptedAI m_uiAssassinsTimer = 5000; } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { switch (urand(0, 2)) { @@ -107,7 +107,7 @@ struct MANGOS_DLL_DECL boss_warchief_kargath_bladefistAI : public ScriptedAI m_pInstance->SetData(TYPE_BLADEFIST, IN_PROGRESS); } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { switch (pSummoned->GetEntry()) { @@ -125,13 +125,13 @@ struct MANGOS_DLL_DECL boss_warchief_kargath_bladefistAI : public ScriptedAI } } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { if (pVictim->GetTypeId() == TYPEID_PLAYER) DoScriptText(urand(0, 1) ? SAY_SLAY1 : SAY_SLAY2, m_creature); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoScriptText(SAY_DEATH, m_creature); DoDespawnAdds(); @@ -140,7 +140,7 @@ struct MANGOS_DLL_DECL boss_warchief_kargath_bladefistAI : public ScriptedAI m_pInstance->SetData(TYPE_BLADEFIST, DONE); } - void JustReachedHome() + void JustReachedHome() override { DoDespawnAdds(); @@ -148,7 +148,7 @@ struct MANGOS_DLL_DECL boss_warchief_kargath_bladefistAI : public ScriptedAI m_pInstance->SetData(TYPE_BLADEFIST, FAIL); } - void MovementInform(uint32 uiType, uint32 uiPointId) + void MovementInform(uint32 uiType, uint32 uiPointId) override { if (m_bInBlade) { @@ -195,7 +195,7 @@ struct MANGOS_DLL_DECL boss_warchief_kargath_bladefistAI : public ScriptedAI m_creature->SummonCreature(NPC_SHATTERED_ASSASSIN, AssassExit[0], AssassExit[1] - 8, AssassExit[2], 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 24000); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/outland/hellfire_citadel/shattered_halls/shattered_halls.h b/scripts/outland/hellfire_citadel/shattered_halls/shattered_halls.h index 46425b2ec..24b8883c9 100644 --- a/scripts/outland/hellfire_citadel/shattered_halls/shattered_halls.h +++ b/scripts/outland/hellfire_citadel/shattered_halls/shattered_halls.h @@ -64,24 +64,24 @@ class MANGOS_DLL_DECL instance_shattered_halls : public ScriptedInstance public: instance_shattered_halls(Map* pMap); - void Initialize(); + void Initialize() override; - void OnPlayerEnter(Player* pPlayer); + void OnPlayerEnter(Player* pPlayer) override; - void OnObjectCreate(GameObject* pGo); - void OnCreatureCreate(Creature* pCreature); + void OnObjectCreate(GameObject* pGo) override; + void OnCreatureCreate(Creature* pCreature) override; - void OnCreatureDeath(Creature* pCreature); + void OnCreatureDeath(Creature* pCreature) override; void OnCreatureEvade(Creature* pCreature); - void OnCreatureEnterCombat(Creature* pCreature); + void OnCreatureEnterCombat(Creature* pCreature) override; - void SetData(uint32 uiType, uint32 uiData); - uint32 GetData(uint32 uiType); + void SetData(uint32 uiType, uint32 uiData) override; + uint32 GetData(uint32 uiType) override; - const char* Save() { return m_strInstData.c_str(); } - void Load(const char* chrIn); + const char* Save() override { return m_strInstData.c_str(); } + void Load(const char* chrIn) override; - void Update(uint32 uiDiff); + void Update(uint32 uiDiff) override; void DoCastGroupDebuff(uint32 uiSpellId); diff --git a/scripts/outland/hellfire_peninsula.cpp b/scripts/outland/hellfire_peninsula.cpp index f1c381f05..bbf78ad8a 100644 --- a/scripts/outland/hellfire_peninsula.cpp +++ b/scripts/outland/hellfire_peninsula.cpp @@ -57,7 +57,7 @@ struct MANGOS_DLL_DECL npc_aeranasAI : public ScriptedAI uint32 m_uiEnvelopingWindsTimer; uint32 m_uiShockTimer; - void Reset() + void Reset() override { m_uiFactionTimer = 8000; m_uiEnvelopingWindsTimer = 9000; @@ -68,7 +68,7 @@ struct MANGOS_DLL_DECL npc_aeranasAI : public ScriptedAI DoScriptText(SAY_SUMMON, m_creature); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (m_uiFactionTimer) { @@ -147,12 +147,12 @@ struct MANGOS_DLL_DECL npc_ancestral_wolfAI : public npc_escortAI Reset(); } - void Reset() + void Reset() override { m_creature->CastSpell(m_creature, SPELL_ANCESTRAL_WOLF_BUFF, true); } - void WaypointReached(uint32 uiPointId) + void WaypointReached(uint32 uiPointId) override { switch (uiPointId) { @@ -221,11 +221,11 @@ struct MANGOS_DLL_DECL npc_demoniac_scryerAI : public ScriptedAI uint32 m_uiSpawnButtressTimer; uint32 m_uiButtressCount; - void Reset() {} + void Reset() override {} // we don't want anything to happen when attacked - void AttackedBy(Unit* pEnemy) {} - void AttackStart(Unit* pEnemy) {} + void AttackedBy(Unit* pEnemy) override {} + void AttackStart(Unit* pEnemy) override {} void DoSpawnButtress() { @@ -256,7 +256,7 @@ struct MANGOS_DLL_DECL npc_demoniac_scryerAI : public ScriptedAI m_creature->SummonCreature(NPC_HELLFIRE_WARDLING, fX, fY, fZ, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { if (pSummoned->GetEntry() == NPC_HELLFIRE_WARDLING) { @@ -273,13 +273,13 @@ struct MANGOS_DLL_DECL npc_demoniac_scryerAI : public ScriptedAI } } - void SpellHitTarget(Unit* pTarget, const SpellEntry* pSpell) + void SpellHitTarget(Unit* pTarget, const SpellEntry* pSpell) override { if (pTarget->GetEntry() == NPC_HELLFIRE_WARDLING && pSpell->Id == SPELL_SUCKER_DESPAWN_MOB) ((Creature*)pTarget)->ForcedDespawn(); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (m_bIsComplete || !m_creature->isAlive()) return; @@ -373,7 +373,7 @@ struct MANGOS_DLL_DECL npc_wounded_blood_elfAI : public npc_escortAI { npc_wounded_blood_elfAI(Creature* pCreature) : npc_escortAI(pCreature) {Reset();} - void WaypointReached(uint32 uiPointId) + void WaypointReached(uint32 uiPointId) override { Player* pPlayer = GetPlayerForEscort(); @@ -408,15 +408,15 @@ struct MANGOS_DLL_DECL npc_wounded_blood_elfAI : public npc_escortAI } } - void Reset() { } + void Reset() override { } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { if (HasEscortState(STATE_ESCORT_ESCORTING)) DoScriptText(SAY_ELF_AGGRO, m_creature); } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { pSummoned->AI()->AttackStart(m_creature); } @@ -462,13 +462,13 @@ struct MANGOS_DLL_DECL npc_fel_guard_houndAI : public ScriptedPetAI bool m_bIsPooActive; - void Reset() + void Reset() override { m_uiPoodadTimer = 0; m_bIsPooActive = false; } - void MovementInform(uint32 uiMoveType, uint32 uiPointId) + void MovementInform(uint32 uiMoveType, uint32 uiPointId) override { if (uiMoveType != POINT_MOTION_TYPE || !uiPointId) return; @@ -487,7 +487,7 @@ struct MANGOS_DLL_DECL npc_fel_guard_houndAI : public ScriptedPetAI m_creature->GetMotionMaster()->MovePoint(1, pBoar->GetPositionX(), pBoar->GetPositionY(), pBoar->GetPositionZ()); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (m_uiPoodadTimer) { diff --git a/scripts/outland/nagrand.cpp b/scripts/outland/nagrand.cpp index 6775c0c7a..8bf6c1c86 100644 --- a/scripts/outland/nagrand.cpp +++ b/scripts/outland/nagrand.cpp @@ -58,13 +58,13 @@ struct MANGOS_DLL_DECL mob_lumpAI : public ScriptedAI uint32 m_uiSpearThrowTimer; bool m_bReset; - void Reset() + void Reset() override { m_uiResetTimer = MINUTE * IN_MILLISECONDS; m_uiSpearThrowTimer = 2000; } - void AttackedBy(Unit* pAttacker) + void AttackedBy(Unit* pAttacker) override { if (m_creature->getVictim()) return; @@ -75,7 +75,7 @@ struct MANGOS_DLL_DECL mob_lumpAI : public ScriptedAI AttackStart(pAttacker); } - void DamageTaken(Unit* pDealer, uint32& uiDamage) + void DamageTaken(Unit* pDealer, uint32& uiDamage) override { if (m_creature->GetHealth() < uiDamage || (m_creature->GetHealth() - uiDamage) * 100 / m_creature->GetMaxHealth() < 30) { @@ -95,7 +95,7 @@ struct MANGOS_DLL_DECL mob_lumpAI : public ScriptedAI } } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { if (m_creature->HasAura(SPELL_VISUAL_SLEEP, EFFECT_INDEX_0)) m_creature->RemoveAurasDueToSpell(SPELL_VISUAL_SLEEP); @@ -106,7 +106,7 @@ struct MANGOS_DLL_DECL mob_lumpAI : public ScriptedAI DoScriptText(urand(0, 1) ? SAY_LUMP_AGGRO_1 : SAY_LUMP_AGGRO_2, m_creature, pWho); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { // Check if we waiting for a reset if (m_bReset) @@ -180,19 +180,19 @@ struct MANGOS_DLL_DECL npc_maghar_captiveAI : public npc_escortAI uint32 m_uiHealTimer; uint32 m_uiFrostShockTimer; - void Reset() + void Reset() override { m_uiChainLightningTimer = 1000; m_uiHealTimer = 0; m_uiFrostShockTimer = 6000; } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { m_creature->CastSpell(m_creature, SPELL_EARTHBIND_TOTEM, false); } - void WaypointReached(uint32 uiPointId) + void WaypointReached(uint32 uiPointId) override { switch (uiPointId) { @@ -218,7 +218,7 @@ struct MANGOS_DLL_DECL npc_maghar_captiveAI : public npc_escortAI } } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { if (pSummoned->GetEntry() == NPC_MURK_BRUTE) DoScriptText(SAY_MAG_NO_ESCAPE, pSummoned); @@ -230,7 +230,7 @@ struct MANGOS_DLL_DECL npc_maghar_captiveAI : public npc_escortAI pSummoned->GetMotionMaster()->MovePoint(0, m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ()); } - void SpellHitTarget(Unit* pTarget, const SpellEntry* pSpell) + void SpellHitTarget(Unit* pTarget, const SpellEntry* pSpell) override { if (pSpell->Id == SPELL_CHAIN_LIGHTNING) { @@ -241,7 +241,7 @@ struct MANGOS_DLL_DECL npc_maghar_captiveAI : public npc_escortAI } } - void UpdateEscortAI(const uint32 uiDiff) + void UpdateEscortAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -316,9 +316,9 @@ struct MANGOS_DLL_DECL npc_creditmarker_visit_with_ancestorsAI : public Scripted { npc_creditmarker_visit_with_ancestorsAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } - void Reset() {} + void Reset() override {} - void MoveInLineOfSight(Unit* pWho) + void MoveInLineOfSight(Unit* pWho) override { if (pWho->GetTypeId() == TYPEID_PLAYER && m_creature->IsWithinDistInMap(pWho, 30.0f)) { diff --git a/scripts/outland/netherstorm.cpp b/scripts/outland/netherstorm.cpp index 10f9e8489..88e7c24ce 100644 --- a/scripts/outland/netherstorm.cpp +++ b/scripts/outland/netherstorm.cpp @@ -90,7 +90,7 @@ struct MANGOS_DLL_DECL npc_manaforge_control_consoleAI : public ScriptedAI uint32 m_uiPhase; bool m_bWave; - void Reset() + void Reset() override { m_playerGuid.Clear(); m_consoleGuid.Clear(); @@ -100,7 +100,7 @@ struct MANGOS_DLL_DECL npc_manaforge_control_consoleAI : public ScriptedAI m_bWave = false; } - /*void SpellHit(Unit *caster, const SpellEntry *spell) + /*void SpellHit(Unit *caster, const SpellEntry *spell) override { // we have no way of telling the creature was hit by spell -> got aura applied after 10-12 seconds // then no way for the mobs to actually stop the shutdown as intended. @@ -108,7 +108,7 @@ struct MANGOS_DLL_DECL npc_manaforge_control_consoleAI : public ScriptedAI ... }*/ - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoScriptText(EMOTE_ABORT, m_creature); @@ -233,7 +233,7 @@ struct MANGOS_DLL_DECL npc_manaforge_control_consoleAI : public ScriptedAI } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (m_uiEventTimer < uiDiff) { @@ -401,7 +401,7 @@ struct MANGOS_DLL_DECL npc_commander_dawnforgeAI : public ScriptedAI uint32 m_uiPhaseTimer; bool m_bIsEvent; - void Reset() + void Reset() override { m_playerGuid.Clear(); m_ardonisGuid.Clear(); @@ -413,7 +413,7 @@ struct MANGOS_DLL_DECL npc_commander_dawnforgeAI : public ScriptedAI m_bIsEvent = false; } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { if (pSummoned->GetEntry() == NPC_PATHALEON_THE_CALCULATOR_IMAGE) m_pathaleonGuid = pSummoned->GetObjectGuid(); @@ -476,7 +476,7 @@ struct MANGOS_DLL_DECL npc_commander_dawnforgeAI : public ScriptedAI return false; } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { // Is event even running? if (!m_bIsEvent) @@ -637,7 +637,7 @@ struct MANGOS_DLL_DECL npc_bessyAI : public npc_escortAI { npc_bessyAI(Creature* pCreature) : npc_escortAI(pCreature) { Reset(); } - void WaypointReached(uint32 uiPointId) + void WaypointReached(uint32 uiPointId) override { switch (uiPointId) { @@ -657,12 +657,12 @@ struct MANGOS_DLL_DECL npc_bessyAI : public npc_escortAI } } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { pSummoned->AI()->AttackStart(m_creature); } - void Reset() {} + void Reset() override {} }; bool QuestAccept_npc_bessy(Player* pPlayer, Creature* pCreature, const Quest* pQuest) @@ -708,7 +708,7 @@ struct MANGOS_DLL_DECL npc_maxx_a_million_escortAI : public npc_escortAI ObjectGuid m_alleyGuid; ObjectGuid m_lastDraeneiMachineGuid; - void Reset() + void Reset() override { if (!HasEscortState(STATE_ESCORT_ESCORTING)) { @@ -729,7 +729,7 @@ struct MANGOS_DLL_DECL npc_maxx_a_million_escortAI : public npc_escortAI m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE); } - void WaypointReached(uint32 uiPoint) + void WaypointReached(uint32 uiPoint) override { switch (uiPoint) { @@ -765,7 +765,7 @@ struct MANGOS_DLL_DECL npc_maxx_a_million_escortAI : public npc_escortAI } } - void WaypointStart(uint32 uiPoint) + void WaypointStart(uint32 uiPoint) override { switch (uiPoint) { @@ -777,7 +777,7 @@ struct MANGOS_DLL_DECL npc_maxx_a_million_escortAI : public npc_escortAI } } - void UpdateEscortAI(const uint32 uiDiff) + void UpdateEscortAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) { @@ -862,9 +862,9 @@ struct MANGOS_DLL_DECL npc_zeppitAI : public ScriptedPetAI { npc_zeppitAI(Creature* pCreature) : ScriptedPetAI(pCreature) { Reset(); } - void Reset() { } + void Reset() override { } - void OwnerKilledUnit(Unit* pVictim) + void OwnerKilledUnit(Unit* pVictim) override { if (pVictim->GetTypeId() == TYPEID_UNIT && pVictim->GetEntry() == NPC_WARP_CHASER) { @@ -918,7 +918,7 @@ struct MANGOS_DLL_DECL npc_protectorate_demolitionistAI : public npc_escortAI uint32 m_uiEventTimer; uint8 m_uiEventStage; - void Reset() + void Reset() override { if (!HasEscortState(STATE_ESCORT_ESCORTING)) { @@ -927,15 +927,15 @@ struct MANGOS_DLL_DECL npc_protectorate_demolitionistAI : public npc_escortAI } } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoScriptText(urand(0, 1) ? SAY_ATTACKED_1 : SAY_ATTACKED_2, m_creature); } // No attack done by this npc - void AttackStart(Unit* pWho) { } + void AttackStart(Unit* pWho) override { } - void MoveInLineOfSight(Unit* pWho) + void MoveInLineOfSight(Unit* pWho) override { if (HasEscortState(STATE_ESCORT_ESCORTING)) return; @@ -954,7 +954,7 @@ struct MANGOS_DLL_DECL npc_protectorate_demolitionistAI : public npc_escortAI } } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { if (pSummoned->GetEntry() == NPC_NEXUS_STALKER) DoScriptText(SAY_NEXUS_PROTECT, pSummoned); @@ -964,7 +964,7 @@ struct MANGOS_DLL_DECL npc_protectorate_demolitionistAI : public npc_escortAI pSummoned->AI()->AttackStart(m_creature); } - void WaypointReached(uint32 uiPointId) + void WaypointReached(uint32 uiPointId) override { switch (uiPointId) { @@ -998,7 +998,7 @@ struct MANGOS_DLL_DECL npc_protectorate_demolitionistAI : public npc_escortAI } } - void UpdateEscortAI(const uint32 uiDiff) + void UpdateEscortAI(const uint32 uiDiff) override { if (m_uiEventTimer) { @@ -1068,19 +1068,19 @@ struct MANGOS_DLL_DECL npc_captured_vanguardAI : public npc_escortAI uint32 m_uiGlaiveTimer; uint32 m_uiHamstringTimer; - void Reset() + void Reset() override { m_uiGlaiveTimer = urand(4000, 8000); m_uiHamstringTimer = urand(8000, 13000); } - void JustReachedHome() + void JustReachedHome() override { // Happens only if the player helps the npc in the fight - otherwise he dies DoScriptText(SAY_VANGUARD_INTRO, m_creature); } - void WaypointReached(uint32 uiPointId) + void WaypointReached(uint32 uiPointId) override { switch (uiPointId) { @@ -1103,7 +1103,7 @@ struct MANGOS_DLL_DECL npc_captured_vanguardAI : public npc_escortAI } } - void UpdateEscortAI(const uint32 uiDiff) + void UpdateEscortAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/outland/shadowmoon_valley.cpp b/scripts/outland/shadowmoon_valley.cpp index 44cba7c2c..3a6d37592 100644 --- a/scripts/outland/shadowmoon_valley.cpp +++ b/scripts/outland/shadowmoon_valley.cpp @@ -66,7 +66,7 @@ struct MANGOS_DLL_DECL mob_mature_netherwing_drakeAI : public ScriptedAI uint32 m_uiCreditTimer; uint32 m_uiCastTimer; - void Reset() + void Reset() override { m_playerGuid.Clear(); @@ -75,7 +75,7 @@ struct MANGOS_DLL_DECL mob_mature_netherwing_drakeAI : public ScriptedAI m_uiCastTimer = 5000; } - void SpellHit(Unit* pCaster, SpellEntry const* pSpell) + void SpellHit(Unit* pCaster, SpellEntry const* pSpell) override { if (m_uiEatTimer || m_uiCreditTimer) return; @@ -87,7 +87,7 @@ struct MANGOS_DLL_DECL mob_mature_netherwing_drakeAI : public ScriptedAI } } - void MovementInform(uint32 uiMoveType, uint32 uiPointId) + void MovementInform(uint32 uiMoveType, uint32 uiPointId) override { if (uiMoveType != POINT_MOTION_TYPE) return; @@ -101,7 +101,7 @@ struct MANGOS_DLL_DECL mob_mature_netherwing_drakeAI : public ScriptedAI } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (m_uiEatTimer) { @@ -196,9 +196,9 @@ struct MANGOS_DLL_DECL mob_enslaved_netherwing_drakeAI : public ScriptedAI ObjectGuid m_playerGuid; uint32 m_uiFlyTimer; - void Reset() { } + void Reset() override { } - void SpellHit(Unit* pCaster, const SpellEntry* pSpell) + void SpellHit(Unit* pCaster, const SpellEntry* pSpell) override { if (pSpell->Id == SPELL_HIT_FORCE_OF_NELTHARAKU && !m_uiFlyTimer) { @@ -215,7 +215,7 @@ struct MANGOS_DLL_DECL mob_enslaved_netherwing_drakeAI : public ScriptedAI } } - void MovementInform(uint32 uiMoveType, uint32 uiPointId) + void MovementInform(uint32 uiMoveType, uint32 uiPointId) override { if (uiMoveType != POINT_MOTION_TYPE) return; @@ -224,7 +224,7 @@ struct MANGOS_DLL_DECL mob_enslaved_netherwing_drakeAI : public ScriptedAI m_creature->ForcedDespawn(); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) { @@ -298,7 +298,7 @@ struct MANGOS_DLL_DECL npc_dragonmaw_peonAI : public ScriptedAI uint32 m_uiMoveTimer; uint32 m_uiEatTimer; - void Reset() + void Reset() override { m_playerGuid.Clear(); m_uiPoisonTimer = 0; @@ -319,7 +319,7 @@ struct MANGOS_DLL_DECL npc_dragonmaw_peonAI : public ScriptedAI return true; } - void MovementInform(uint32 uiType, uint32 uiPointId) + void MovementInform(uint32 uiType, uint32 uiPointId) override { if (uiType != POINT_MOTION_TYPE) return; @@ -340,7 +340,7 @@ struct MANGOS_DLL_DECL npc_dragonmaw_peonAI : public ScriptedAI } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (m_uiMoveTimer) { @@ -464,12 +464,12 @@ struct MANGOS_DLL_DECL npc_wildaAI : public npc_escortAI uint32 m_uiHealingTimer; - void Reset() + void Reset() override { m_uiHealingTimer = 0; } - void WaypointReached(uint32 uiPointId) + void WaypointReached(uint32 uiPointId) override { Player* pPlayer = GetPlayerForEscort(); @@ -528,7 +528,7 @@ struct MANGOS_DLL_DECL npc_wildaAI : public npc_escortAI } } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { if (pSummoned->GetEntry() == NPC_COILSKAR_ASSASSIN) pSummoned->AI()->AttackStart(m_creature); @@ -554,7 +554,7 @@ struct MANGOS_DLL_DECL npc_wildaAI : public npc_escortAI m_creature->SummonCreature(NPC_COILSKAR_ASSASSIN, fX, fY, fZ, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { // don't always use if (urand(0, 4)) @@ -572,7 +572,7 @@ struct MANGOS_DLL_DECL npc_wildaAI : public npc_escortAI } } - void UpdateEscortAI(const uint32 uiDiff) + void UpdateEscortAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -741,7 +741,7 @@ struct MANGOS_DLL_DECL mob_torlothAI : public ScriptedAI uint8 m_uiAnimationCount; uint32 m_uiAnimationTimer; - void Reset() + void Reset() override { m_lordIllidanGuid.Clear(); m_playerGuid.Clear(); @@ -757,7 +757,7 @@ struct MANGOS_DLL_DECL mob_torlothAI : public ScriptedAI SetCombatMovement(false); } - void EnterEvadeMode() + void EnterEvadeMode() override { m_creature->ForcedDespawn(); } @@ -815,7 +815,7 @@ struct MANGOS_DLL_DECL mob_torlothAI : public ScriptedAI ++m_uiAnimationCount; } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { if (Player* pPlayer = pKiller->GetCharmerOrOwnerPlayerOrPlayerItself()) { @@ -829,7 +829,7 @@ struct MANGOS_DLL_DECL mob_torlothAI : public ScriptedAI } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (m_uiAnimationCount < 7) { @@ -896,7 +896,7 @@ struct MANGOS_DLL_DECL npc_lord_illidan_stormrageAI : public Scripted_NoMovement bool m_bEventFailed; bool m_bWaveAnnounced; - void Reset() + void Reset() override { m_playerGuid.Clear(); @@ -962,7 +962,7 @@ struct MANGOS_DLL_DECL npc_lord_illidan_stormrageAI : public Scripted_NoMovement m_uiAnnounceTimer = WavesInfo[m_uiWaveCount].uiYellTimer; } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { // increment mob count ++m_uiMobCount; @@ -989,7 +989,7 @@ struct MANGOS_DLL_DECL npc_lord_illidan_stormrageAI : public Scripted_NoMovement } } - void SummonedCreatureDespawn(Creature* pCreature) + void SummonedCreatureDespawn(Creature* pCreature) override { // decrement mob count --m_uiMobCount; @@ -1060,7 +1060,7 @@ struct MANGOS_DLL_DECL npc_lord_illidan_stormrageAI : public Scripted_NoMovement } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_playerGuid || !m_bEventStarted) return; @@ -1152,13 +1152,13 @@ struct MANGOS_DLL_DECL npc_totem_of_spiritsAI : public ScriptedPetAI { npc_totem_of_spiritsAI(Creature* pCreature) : ScriptedPetAI(pCreature) { Reset(); } - void Reset() {} + void Reset() override {} - void MoveInLineOfSight(Unit* pWho) {} - void UpdateAI(const uint32 uiDiff) {} - void AttackedBy(Unit* pAttacker) {} + void MoveInLineOfSight(Unit* pWho) override {} + void UpdateAI(const uint32 uiDiff) override {} + void AttackedBy(Unit* pAttacker) override {} - void OwnerKilledUnit(Unit* pVictim) + void OwnerKilledUnit(Unit* pVictim) override { if (pVictim->GetTypeId() != TYPEID_UNIT) return; @@ -1385,7 +1385,7 @@ struct MANGOS_DLL_DECL npc_spawned_oronok_tornheartAI : public ScriptedAI, priva bool m_bHasAttackStart; - void Reset() + void Reset() override { m_uiLightningTimer = 15000; m_uiTotemTimer = 10000; @@ -1395,7 +1395,7 @@ struct MANGOS_DLL_DECL npc_spawned_oronok_tornheartAI : public ScriptedAI, priva m_bHasAttackStart = false; } - void JustDidDialogueStep(int32 iEntry) + void JustDidDialogueStep(int32 iEntry) override { switch (iEntry) { @@ -1447,7 +1447,7 @@ struct MANGOS_DLL_DECL npc_spawned_oronok_tornheartAI : public ScriptedAI, priva } } - Creature* GetSpeakerByEntry(uint32 uiEntry) + Creature* GetSpeakerByEntry(uint32 uiEntry) override { switch (uiEntry) { @@ -1461,7 +1461,7 @@ struct MANGOS_DLL_DECL npc_spawned_oronok_tornheartAI : public ScriptedAI, priva } } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { if (!m_bHasAttackStart && pWho->GetEntry() == NPC_EARTH_SPIRIT) { @@ -1476,7 +1476,7 @@ struct MANGOS_DLL_DECL npc_spawned_oronok_tornheartAI : public ScriptedAI, priva } } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { switch (pSummoned->GetEntry()) { @@ -1489,7 +1489,7 @@ struct MANGOS_DLL_DECL npc_spawned_oronok_tornheartAI : public ScriptedAI, priva } } - void EnterEvadeMode() + void EnterEvadeMode() override { m_creature->RemoveAllAuras(); m_creature->DeleteThreatList(); @@ -1515,7 +1515,7 @@ struct MANGOS_DLL_DECL npc_spawned_oronok_tornheartAI : public ScriptedAI, priva } } - void MovementInform(uint32 uiMotionType, uint32 uiPointId) + void MovementInform(uint32 uiMotionType, uint32 uiPointId) override { if (uiMotionType != POINT_MOTION_TYPE) return; @@ -1541,7 +1541,7 @@ struct MANGOS_DLL_DECL npc_spawned_oronok_tornheartAI : public ScriptedAI, priva } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { DialogueUpdate(uiDiff); diff --git a/scripts/outland/shattrath_city.cpp b/scripts/outland/shattrath_city.cpp index 5c9db0bd3..d8858977f 100644 --- a/scripts/outland/shattrath_city.cpp +++ b/scripts/outland/shattrath_city.cpp @@ -65,7 +65,7 @@ struct MANGOS_DLL_DECL npc_dirty_larryAI : public ScriptedAI uint32 m_uiSayTimer; uint32 m_uiStep; - void Reset() + void Reset() override { m_creature->SetUInt32Value(UNIT_NPC_FLAGS, m_uiNpcFlags); @@ -174,7 +174,7 @@ struct MANGOS_DLL_DECL npc_dirty_larryAI : public ScriptedAI } } - void AttackedBy(Unit* pAttacker) + void AttackedBy(Unit* pAttacker) override { if (m_creature->getVictim()) return; @@ -185,7 +185,7 @@ struct MANGOS_DLL_DECL npc_dirty_larryAI : public ScriptedAI AttackStart(pAttacker); } - void DamageTaken(Unit* pDoneBy, uint32& uiDamage) + void DamageTaken(Unit* pDoneBy, uint32& uiDamage) override { if (uiDamage < m_creature->GetHealth()) return; @@ -207,7 +207,7 @@ struct MANGOS_DLL_DECL npc_dirty_larryAI : public ScriptedAI } } - void UpdateAI(const uint32 diff) + void UpdateAI(const uint32 diff) override { if (bEvent && !bActiveAttack) { @@ -325,7 +325,7 @@ struct MANGOS_DLL_DECL npc_khadgars_servantAI : public npc_escortAI uint32 m_uiTalkCount; uint32 m_uiRandomTalkCooldown; - void Reset() + void Reset() override { m_uiTalkTimer = 2500; m_uiTalkCount = 0; @@ -333,7 +333,7 @@ struct MANGOS_DLL_DECL npc_khadgars_servantAI : public npc_escortAI m_uiRandomTalkCooldown = 0; } - void MoveInLineOfSight(Unit* pWho) + void MoveInLineOfSight(Unit* pWho) override { if (!m_uiRandomTalkCooldown && pWho->GetTypeId() == TYPEID_UNIT && m_creature->IsWithinDistInMap(pWho, 10.0f)) { @@ -358,13 +358,13 @@ struct MANGOS_DLL_DECL npc_khadgars_servantAI : public npc_escortAI } } - void WaypointStart(uint32 uiPointId) + void WaypointStart(uint32 uiPointId) override { if (uiPointId == 2) DoScriptText(SAY_KHAD_SERV_0, m_creature); } - void WaypointReached(uint32 uiPointId) + void WaypointReached(uint32 uiPointId) override { m_uiPointId = uiPointId; @@ -393,7 +393,7 @@ struct MANGOS_DLL_DECL npc_khadgars_servantAI : public npc_escortAI } } - void UpdateEscortAI(const uint32 uiDiff) + void UpdateEscortAI(const uint32 uiDiff) override { if (m_uiRandomTalkCooldown) { @@ -563,12 +563,12 @@ struct MANGOS_DLL_DECL npc_salsalabimAI : public ScriptedAI uint32 m_uiMagneticPullTimer; - void Reset() + void Reset() override { m_uiMagneticPullTimer = 15000; } - void DamageTaken(Unit* pDoneBy, uint32& uiDamage) + void DamageTaken(Unit* pDoneBy, uint32& uiDamage) override { if (pDoneBy->GetTypeId() == TYPEID_PLAYER) { @@ -581,7 +581,7 @@ struct MANGOS_DLL_DECL npc_salsalabimAI : public ScriptedAI } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/outland/tempest_keep/arcatraz/arcatraz.cpp b/scripts/outland/tempest_keep/arcatraz/arcatraz.cpp index bd220d285..1a7f8818c 100644 --- a/scripts/outland/tempest_keep/arcatraz/arcatraz.cpp +++ b/scripts/outland/tempest_keep/arcatraz/arcatraz.cpp @@ -102,7 +102,7 @@ struct MANGOS_DLL_DECL npc_millhouse_manastormAI : public ScriptedAI, private Di uint32 m_uiConeColtTimer; uint32 m_uiArcaneMissileTimer; - void Reset() + void Reset() override { m_bHasLowHp = false; m_uiPyroblastTimer = urand(6000, 9000); @@ -115,7 +115,7 @@ struct MANGOS_DLL_DECL npc_millhouse_manastormAI : public ScriptedAI, private Di StartNextDialogueText(NPC_MILLHOUSE); } - void AttackStart(Unit* pWho) + void AttackStart(Unit* pWho) override { if (m_creature->Attack(pWho, true)) { @@ -126,12 +126,12 @@ struct MANGOS_DLL_DECL npc_millhouse_manastormAI : public ScriptedAI, private Di } } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { DoScriptText(urand(0, 1) ? SAY_KILL_1 : SAY_KILL_2, m_creature); } - void JustDied(Unit* pVictim) + void JustDied(Unit* pVictim) override { DoScriptText(SAY_DEATH, m_creature); @@ -140,7 +140,7 @@ struct MANGOS_DLL_DECL npc_millhouse_manastormAI : public ScriptedAI, private Di ->FailQuest();*/ } - void EnterEvadeMode() + void EnterEvadeMode() override { m_creature->RemoveAllAuras(); m_creature->DeleteThreatList(); @@ -156,7 +156,7 @@ struct MANGOS_DLL_DECL npc_millhouse_manastormAI : public ScriptedAI, private Di Reset(); } - void JustDidDialogueStep(int32 iEntry) + void JustDidDialogueStep(int32 iEntry) override { switch (iEntry) { @@ -183,7 +183,7 @@ struct MANGOS_DLL_DECL npc_millhouse_manastormAI : public ScriptedAI, private Di } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { DialogueUpdate(uiDiff); @@ -279,15 +279,15 @@ struct MANGOS_DLL_DECL npc_warden_mellicharAI : public ScriptedAI uint32 m_uiIntroTimer; ObjectGuid m_targetPlayerGuid; - void Reset() + void Reset() override { m_uiIntroTimer = 5000; m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); } - void AttackStart(Unit* pWho) {} + void AttackStart(Unit* pWho) override {} - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { m_creature->InterruptNonMeleeSpells(false); m_creature->SetFacingToObject(pWho); @@ -302,7 +302,7 @@ struct MANGOS_DLL_DECL npc_warden_mellicharAI : public ScriptedAI m_pInstance->SetData(TYPE_HARBINGERSKYRISS, IN_PROGRESS); } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { pSummoned->CastSpell(pSummoned, SPELL_SIMPLE_TELEPORT, false); @@ -313,7 +313,7 @@ struct MANGOS_DLL_DECL npc_warden_mellicharAI : public ScriptedAI } } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { if (m_pInstance) { @@ -325,7 +325,7 @@ struct MANGOS_DLL_DECL npc_warden_mellicharAI : public ScriptedAI } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { // Set the visual intro on OOC timer if (m_uiIntroTimer) diff --git a/scripts/outland/tempest_keep/arcatraz/arcatraz.h b/scripts/outland/tempest_keep/arcatraz/arcatraz.h index d3e8979bc..256203b4b 100644 --- a/scripts/outland/tempest_keep/arcatraz/arcatraz.h +++ b/scripts/outland/tempest_keep/arcatraz/arcatraz.h @@ -83,23 +83,23 @@ class MANGOS_DLL_DECL instance_arcatraz : public ScriptedInstance, private Dialo public: instance_arcatraz(Map* pMap); - void Initialize(); + void Initialize() override; - void OnPlayerEnter(Player* pPlayer); - void OnObjectCreate(GameObject* pGo); - void OnCreatureCreate(Creature* pCreature); - void OnCreatureDeath(Creature* pCreature); + void OnPlayerEnter(Player* pPlayer) override; + void OnObjectCreate(GameObject* pGo) override; + void OnCreatureCreate(Creature* pCreature) override; + void OnCreatureDeath(Creature* pCreature) override; - void SetData(uint32 uiType, uint32 uiData); - uint32 GetData(uint32 uiType); + void SetData(uint32 uiType, uint32 uiData) override; + uint32 GetData(uint32 uiType) override; - const char* Save() { return m_strInstData.c_str(); } - void Load(const char* chrIn); + const char* Save() override { return m_strInstData.c_str(); } + void Load(const char* chrIn) override; - void Update(uint32 uiDiff); + void Update(uint32 uiDiff) override; private: - void JustDidDialogueStep(int32 iEntry); + void JustDidDialogueStep(int32 iEntry) override; uint32 m_auiEncounter[MAX_ENCOUNTER]; std::string m_strInstData; diff --git a/scripts/outland/tempest_keep/arcatraz/boss_dalliah.cpp b/scripts/outland/tempest_keep/arcatraz/boss_dalliah.cpp index e681d816a..d58f815b5 100644 --- a/scripts/outland/tempest_keep/arcatraz/boss_dalliah.cpp +++ b/scripts/outland/tempest_keep/arcatraz/boss_dalliah.cpp @@ -65,7 +65,7 @@ struct MANGOS_DLL_DECL boss_dalliahAI : public ScriptedAI bool m_bHasTaunted; - void Reset() + void Reset() override { m_uiGiftDoomsayerTimer = urand(4000, 7000); m_uiHealTimer = 0; @@ -75,7 +75,7 @@ struct MANGOS_DLL_DECL boss_dalliahAI : public ScriptedAI m_bHasTaunted = false; } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoScriptText(SAY_AGGRO, m_creature); @@ -83,12 +83,12 @@ struct MANGOS_DLL_DECL boss_dalliahAI : public ScriptedAI m_pInstance->SetData(TYPE_DALLIAH, IN_PROGRESS); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { DoScriptText(urand(0, 1) ? SAY_KILL_1 : SAY_KILL_2, m_creature); } - void JustDied(Unit* pWho) + void JustDied(Unit* pWho) override { DoScriptText(SAY_DEATH, m_creature); @@ -96,7 +96,7 @@ struct MANGOS_DLL_DECL boss_dalliahAI : public ScriptedAI m_pInstance->SetData(TYPE_DALLIAH, DONE); } - void EnterEvadeMode() + void EnterEvadeMode() override { m_creature->RemoveAllAuras(); m_creature->DeleteThreatList(); @@ -115,7 +115,7 @@ struct MANGOS_DLL_DECL boss_dalliahAI : public ScriptedAI Reset(); } - void MovementInform(uint32 uiMoveType, uint32 uiPointId) + void MovementInform(uint32 uiMoveType, uint32 uiPointId) override { if (uiMoveType != POINT_MOTION_TYPE) return; @@ -125,7 +125,7 @@ struct MANGOS_DLL_DECL boss_dalliahAI : public ScriptedAI m_creature->SetFacingTo(aDalliahStartPos[3]); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/outland/tempest_keep/arcatraz/boss_harbinger_skyriss.cpp b/scripts/outland/tempest_keep/arcatraz/boss_harbinger_skyriss.cpp index c90149022..3a2cdda04 100644 --- a/scripts/outland/tempest_keep/arcatraz/boss_harbinger_skyriss.cpp +++ b/scripts/outland/tempest_keep/arcatraz/boss_harbinger_skyriss.cpp @@ -63,7 +63,7 @@ struct MANGOS_DLL_DECL boss_harbinger_skyrissAI : public ScriptedAI uint32 m_uiDominationTimer; uint32 m_uiManaBurnTimer; - void Reset() + void Reset() override { m_uiSplitPhase = 1; m_uiMindRendTimer = 3000; @@ -72,7 +72,7 @@ struct MANGOS_DLL_DECL boss_harbinger_skyrissAI : public ScriptedAI m_uiManaBurnTimer = 25000; } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoScriptText(SAY_DEATH, m_creature); @@ -80,13 +80,13 @@ struct MANGOS_DLL_DECL boss_harbinger_skyrissAI : public ScriptedAI m_pInstance->SetData(TYPE_HARBINGERSKYRISS, DONE); } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_HARBINGERSKYRISS, FAIL); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { // won't yell killing pet/other unit if (pVictim->GetTypeId() != TYPEID_PLAYER) @@ -95,13 +95,13 @@ struct MANGOS_DLL_DECL boss_harbinger_skyrissAI : public ScriptedAI DoScriptText(urand(0, 1) ? SAY_KILL_1 : SAY_KILL_2, m_creature); } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { if (m_creature->getVictim()) pSummoned->AI()->AttackStart(m_creature->getVictim()); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/outland/tempest_keep/arcatraz/boss_soccothrates.cpp b/scripts/outland/tempest_keep/arcatraz/boss_soccothrates.cpp index 8e98b3289..b618d7c30 100644 --- a/scripts/outland/tempest_keep/arcatraz/boss_soccothrates.cpp +++ b/scripts/outland/tempest_keep/arcatraz/boss_soccothrates.cpp @@ -85,7 +85,7 @@ struct MANGOS_DLL_DECL boss_soccothratesAI : public ScriptedAI, private Dialogue bool m_bHasYelledIntro; - void Reset() + void Reset() override { m_uiFelfireShockTimer = urand(10000, 13000); m_uiKnockAwayTimer = urand(22000, 25000); @@ -95,7 +95,7 @@ struct MANGOS_DLL_DECL boss_soccothratesAI : public ScriptedAI, private Dialogue DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_IMMOLATION : SPELL_IMMOLATION_H); } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoScriptText(SAY_AGGRO, m_creature); @@ -103,7 +103,7 @@ struct MANGOS_DLL_DECL boss_soccothratesAI : public ScriptedAI, private Dialogue m_pInstance->SetData(TYPE_SOCCOTHRATES, IN_PROGRESS); } - void MoveInLineOfSight(Unit* pWho) + void MoveInLineOfSight(Unit* pWho) override { if (!m_bHasYelledIntro && pWho->GetTypeId() == TYPEID_PLAYER && m_creature->IsWithinDistInMap(pWho, 75.0f) && m_creature->IsWithinLOSInMap(pWho)) { @@ -114,12 +114,12 @@ struct MANGOS_DLL_DECL boss_soccothratesAI : public ScriptedAI, private Dialogue ScriptedAI::MoveInLineOfSight(pWho); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { DoScriptText(SAY_KILL, m_creature); } - void JustDied(Unit* pWho) + void JustDied(Unit* pWho) override { DoScriptText(SAY_DEATH, m_creature); @@ -127,7 +127,7 @@ struct MANGOS_DLL_DECL boss_soccothratesAI : public ScriptedAI, private Dialogue m_pInstance->SetData(TYPE_SOCCOTHRATES, DONE); } - void EnterEvadeMode() + void EnterEvadeMode() override { m_creature->RemoveAllAuras(); m_creature->DeleteThreatList(); @@ -146,7 +146,7 @@ struct MANGOS_DLL_DECL boss_soccothratesAI : public ScriptedAI, private Dialogue Reset(); } - void MovementInform(uint32 uiMoveType, uint32 uiPointId) + void MovementInform(uint32 uiMoveType, uint32 uiPointId) override { if (uiMoveType != POINT_MOTION_TYPE) return; @@ -156,7 +156,7 @@ struct MANGOS_DLL_DECL boss_soccothratesAI : public ScriptedAI, private Dialogue m_creature->SetFacingTo(aSoccotharesStartPos[3]); } - void JustDidDialogueStep(int32 iEntry) + void JustDidDialogueStep(int32 iEntry) override { // Move each of them to their places if (iEntry == SAY_SOCCOTHRATES_INTRO_7) @@ -171,7 +171,7 @@ struct MANGOS_DLL_DECL boss_soccothratesAI : public ScriptedAI, private Dialogue } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { DialogueUpdate(uiDiff); diff --git a/scripts/outland/tempest_keep/botanica/boss_high_botanist_freywinn.cpp b/scripts/outland/tempest_keep/botanica/boss_high_botanist_freywinn.cpp index 71a13dd58..72f4c04b1 100644 --- a/scripts/outland/tempest_keep/botanica/boss_high_botanist_freywinn.cpp +++ b/scripts/outland/tempest_keep/botanica/boss_high_botanist_freywinn.cpp @@ -54,7 +54,7 @@ struct MANGOS_DLL_DECL boss_high_botanist_freywinnAI : public ScriptedAI uint8 m_uiFrayerAddsCount; bool m_bCanMoveFree; - void Reset() + void Reset() override { m_uiSummonSeedlingTimer = 6000; m_uiTreeFormTimer = 30000; @@ -64,12 +64,12 @@ struct MANGOS_DLL_DECL boss_high_botanist_freywinnAI : public ScriptedAI m_bCanMoveFree = true; } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoScriptText(SAY_AGGRO, m_creature); } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { if (pSummoned->GetEntry() == NPC_FRAYER_PROTECTOR) ++m_uiFrayerAddsCount; @@ -79,7 +79,7 @@ struct MANGOS_DLL_DECL boss_high_botanist_freywinnAI : public ScriptedAI pSummoned->AI()->AttackStart(m_creature->getVictim()); } - void SummonedCreatureJustDied(Creature* pSummoned) + void SummonedCreatureJustDied(Creature* pSummoned) override { if (pSummoned->GetEntry() == NPC_FRAYER_PROTECTOR) { @@ -113,17 +113,17 @@ struct MANGOS_DLL_DECL boss_high_botanist_freywinnAI : public ScriptedAI } } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { DoScriptText(urand(0, 1) ? SAY_KILL_1 : SAY_KILL_2, m_creature); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoScriptText(SAY_DEATH, m_creature); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/outland/tempest_keep/botanica/boss_laj.cpp b/scripts/outland/tempest_keep/botanica/boss_laj.cpp index 3e5e78641..010d3d8b4 100644 --- a/scripts/outland/tempest_keep/botanica/boss_laj.cpp +++ b/scripts/outland/tempest_keep/botanica/boss_laj.cpp @@ -57,7 +57,7 @@ struct MANGOS_DLL_DECL boss_lajAI : public ScriptedAI uint32 m_uiAllergicTimer; uint32 m_uiTrashTimer; - void Reset() + void Reset() override { m_creature->SetDisplayId(MODEL_ID_DEFAULT); m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_SHADOW, true); @@ -144,13 +144,13 @@ struct MANGOS_DLL_DECL boss_lajAI : public ScriptedAI } } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) pSummoned->AI()->AttackStart(pTarget); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/outland/tempest_keep/botanica/boss_warp_splinter.cpp b/scripts/outland/tempest_keep/botanica/boss_warp_splinter.cpp index 899534329..2208cb5a7 100644 --- a/scripts/outland/tempest_keep/botanica/boss_warp_splinter.cpp +++ b/scripts/outland/tempest_keep/botanica/boss_warp_splinter.cpp @@ -67,29 +67,29 @@ struct MANGOS_DLL_DECL boss_warp_splinterAI : public ScriptedAI std::vector m_vSummonSpells; - void Reset() + void Reset() override { m_uiWarStompTimer = urand(6000, 7000); m_uiSummonTreantsTimer = urand(25000, 35000); m_uiArcaneVolleyTimer = urand(12000, 14500); } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoScriptText(SAY_AGGRO, m_creature); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { DoScriptText(urand(0, 1) ? SAY_SLAY_1 : SAY_SLAY_2, m_creature); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoScriptText(SAY_DEATH, m_creature); } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { if (pSummoned->GetEntry() == NPC_SAPLING) pSummoned->GetMotionMaster()->MoveFollow(m_creature, 0, 0); @@ -107,7 +107,7 @@ struct MANGOS_DLL_DECL boss_warp_splinterAI : public ScriptedAI DoScriptText(urand(0, 1) ? SAY_SUMMON_1 : SAY_SUMMON_2, m_creature); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -150,14 +150,14 @@ struct MANGOS_DLL_DECL npc_saplingAI : public ScriptedAI { npc_saplingAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } - void Reset() + void Reset() override { // ToDo: This one may need further reserch // m_creature->SetSpeedRate(MOVE_RUN, 0.5f); } - void MoveInLineOfSight(Unit* pWho) { } - void UpdateAI(const uint32 uiDiff) + void MoveInLineOfSight(Unit* pWho) override { } + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/outland/tempest_keep/the_eye/boss_alar.cpp b/scripts/outland/tempest_keep/the_eye/boss_alar.cpp index 991393884..cae5add08 100644 --- a/scripts/outland/tempest_keep/the_eye/boss_alar.cpp +++ b/scripts/outland/tempest_keep/the_eye/boss_alar.cpp @@ -100,7 +100,7 @@ struct MANGOS_DLL_DECL boss_alarAI : public ScriptedAI bool m_bCanSummonEmber; - void Reset() + void Reset() override { // Start phase one and move to the closest platform m_uiPhase = PHASE_ONE; @@ -119,7 +119,7 @@ struct MANGOS_DLL_DECL boss_alarAI : public ScriptedAI m_bCanSummonEmber = true; } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { if (m_pInstance) m_pInstance->SetData(TYPE_ALAR, IN_PROGRESS); @@ -129,19 +129,19 @@ struct MANGOS_DLL_DECL boss_alarAI : public ScriptedAI m_creature->GetMotionMaster()->MovePoint(POINT_ID_PLATFORM, aPlatformLocation[m_uiCurrentPlatformId].m_fX, aPlatformLocation[m_uiCurrentPlatformId].m_fY, aPlatformLocation[m_uiCurrentPlatformId].m_fZ); } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_ALAR, FAIL); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { if (m_pInstance) m_pInstance->SetData(TYPE_ALAR, DONE); } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { if (pSummoned->GetEntry() == NPC_FLAME_PATCH) pSummoned->CastSpell(pSummoned, SPELL_FLAME_PATCH, true); @@ -152,7 +152,7 @@ struct MANGOS_DLL_DECL boss_alarAI : public ScriptedAI } } - void SummonedCreatureJustDied(Creature* pSummoned) + void SummonedCreatureJustDied(Creature* pSummoned) override { // drain 3% of boss health when the ember dies if (pSummoned->GetEntry() == NPC_EMBER_OF_ALAR) @@ -163,7 +163,7 @@ struct MANGOS_DLL_DECL boss_alarAI : public ScriptedAI } } - void EnterEvadeMode() + void EnterEvadeMode() override { // Don't evade if the boss has the ember blast invisibility aura if (m_creature->HasAura(SPELL_EMBER_BLAST)) @@ -172,7 +172,7 @@ struct MANGOS_DLL_DECL boss_alarAI : public ScriptedAI ScriptedAI::EnterEvadeMode(); } - void MovementInform(uint32 uiMotionType, uint32 uiPointId) + void MovementInform(uint32 uiMotionType, uint32 uiPointId) override { if (uiMotionType != POINT_MOTION_TYPE) return; @@ -216,7 +216,7 @@ struct MANGOS_DLL_DECL boss_alarAI : public ScriptedAI } } - void DamageTaken(Unit* pKiller, uint32& uiDamage) + void DamageTaken(Unit* pKiller, uint32& uiDamage) override { // Only init fake in phase one if (m_uiPhase != PHASE_ONE) @@ -251,7 +251,7 @@ struct MANGOS_DLL_DECL boss_alarAI : public ScriptedAI } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/outland/tempest_keep/the_eye/boss_astromancer.cpp b/scripts/outland/tempest_keep/the_eye/boss_astromancer.cpp index e914cad05..43e608e8a 100644 --- a/scripts/outland/tempest_keep/the_eye/boss_astromancer.cpp +++ b/scripts/outland/tempest_keep/the_eye/boss_astromancer.cpp @@ -105,7 +105,7 @@ struct MANGOS_DLL_DECL boss_high_astromancer_solarianAI : public ScriptedAI GuidVector m_vSpotLightsGuidVector; - void Reset() + void Reset() override { m_uiArcaneMissilesTimer = 0; m_uiWrathOfTheAstromancerTimer = urand(15000, 25000); @@ -128,7 +128,7 @@ struct MANGOS_DLL_DECL boss_high_astromancer_solarianAI : public ScriptedAI SetCombatMovement(true); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { if (pVictim->GetTypeId() != TYPEID_PLAYER) return; @@ -141,7 +141,7 @@ struct MANGOS_DLL_DECL boss_high_astromancer_solarianAI : public ScriptedAI } } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoScriptText(SAY_DEATH, m_creature); @@ -149,7 +149,7 @@ struct MANGOS_DLL_DECL boss_high_astromancer_solarianAI : public ScriptedAI m_pInstance->SetData(TYPE_SOLARIAN, DONE); } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoScriptText(SAY_AGGRO, m_creature); @@ -157,13 +157,13 @@ struct MANGOS_DLL_DECL boss_high_astromancer_solarianAI : public ScriptedAI m_pInstance->SetData(TYPE_SOLARIAN, IN_PROGRESS); } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_SOLARIAN, FAIL); } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { switch (pSummoned->GetEntry()) { @@ -188,7 +188,7 @@ struct MANGOS_DLL_DECL boss_high_astromancer_solarianAI : public ScriptedAI m_creature->SummonCreature(NPC_ASTROMANCER_SOLARIAN_SPOTLIGHT, fX, fY, fZ, 0, TEMPSUMMON_TIMED_DESPAWN, 30000); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -412,14 +412,14 @@ struct MANGOS_DLL_DECL mob_solarium_priestAI : public ScriptedAI uint32 m_uiHolySmiteTimer; uint32 m_uiAoESilenceTimer; - void Reset() + void Reset() override { m_uiHealTimer = 9000; m_uiHolySmiteTimer = 1; m_uiAoESilenceTimer = 15000; } - void AttackStart(Unit* pWho) + void AttackStart(Unit* pWho) override { if (m_creature->Attack(pWho, true)) { @@ -430,7 +430,7 @@ struct MANGOS_DLL_DECL mob_solarium_priestAI : public ScriptedAI } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/outland/tempest_keep/the_eye/boss_kaelthas.cpp b/scripts/outland/tempest_keep/the_eye/boss_kaelthas.cpp index 3eb085f06..cae4e4510 100644 --- a/scripts/outland/tempest_keep/the_eye/boss_kaelthas.cpp +++ b/scripts/outland/tempest_keep/the_eye/boss_kaelthas.cpp @@ -202,7 +202,7 @@ struct MANGOS_DLL_DECL boss_kaelthasAI : public ScriptedAI uint8 m_uiPhase; uint8 m_uiPhaseSubphase; - void Reset() + void Reset() override { // Phases m_uiPhase = PHASE_0_NOT_BEGUN; @@ -231,13 +231,13 @@ struct MANGOS_DLL_DECL boss_kaelthasAI : public ScriptedAI SetCombatMovement(true); } - void GetAIInformation(ChatHandler& reader) + void GetAIInformation(ChatHandler& reader) override { reader.PSendSysMessage("Kael'thas is currently in phase %u", m_uiPhase); } // Custom Move in LoS function - void MoveInLineOfSight(Unit* pWho) + void MoveInLineOfSight(Unit* pWho) override { if (m_uiPhase == PHASE_0_NOT_BEGUN && pWho->GetTypeId() == TYPEID_PLAYER && !((Player*)pWho)->isGameMaster() && m_creature->IsWithinDistInMap(pWho, m_creature->GetAttackDistance(pWho)) && m_creature->IsWithinLOSInMap(pWho)) @@ -254,7 +254,7 @@ struct MANGOS_DLL_DECL boss_kaelthasAI : public ScriptedAI } } - void AttackStart(Unit* pWho) + void AttackStart(Unit* pWho) override { if (m_creature->Attack(pWho, true)) { @@ -265,7 +265,7 @@ struct MANGOS_DLL_DECL boss_kaelthasAI : public ScriptedAI } } - void KilledUnit(Unit* pUnit) + void KilledUnit(Unit* pUnit) override { switch (urand(0, 2)) { @@ -275,7 +275,7 @@ struct MANGOS_DLL_DECL boss_kaelthasAI : public ScriptedAI } } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoScriptText(SAY_DEATH, m_creature); @@ -283,13 +283,13 @@ struct MANGOS_DLL_DECL boss_kaelthasAI : public ScriptedAI m_pInstance->SetData(TYPE_KAELTHAS, DONE); } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_KAELTHAS, FAIL); } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { if (pSummoned->GetEntry() == NPC_FLAME_STRIKE_TRIGGER) pSummoned->CastSpell(pSummoned, SPELL_FLAME_STRIKE_DUMMY, false, NULL, NULL, m_creature->GetObjectGuid()); @@ -300,7 +300,7 @@ struct MANGOS_DLL_DECL boss_kaelthasAI : public ScriptedAI pSummoned->SetInCombatWithZone(); } - void SpellHit(Unit* pCaster, const SpellEntry* pSpell) + void SpellHit(Unit* pCaster, const SpellEntry* pSpell) override { // Handle summon weapons event if (pSpell->Id == SPELL_SUMMON_WEAPONS) @@ -313,7 +313,7 @@ struct MANGOS_DLL_DECL boss_kaelthasAI : public ScriptedAI } } - void SpellHitTarget(Unit* pTarget, const SpellEntry* pSpell) + void SpellHitTarget(Unit* pTarget, const SpellEntry* pSpell) override { // Handle gravity lapse teleport - each player hit has his own teleport spell if (pSpell->Id == SPELL_GRAVITY_LAPSE && pTarget->GetTypeId() == TYPEID_PLAYER) @@ -325,7 +325,7 @@ struct MANGOS_DLL_DECL boss_kaelthasAI : public ScriptedAI } } - void MovementInform(uint32 uiMotionType, uint32 uiPointId) + void MovementInform(uint32 uiMotionType, uint32 uiPointId) override { if (uiMotionType != POINT_MOTION_TYPE || !uiPointId) return; @@ -377,7 +377,7 @@ struct MANGOS_DLL_DECL boss_kaelthasAI : public ScriptedAI m_uiPhaseTimer = 1000; } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { switch (m_uiPhase) { @@ -733,7 +733,7 @@ struct MANGOS_DLL_DECL advisor_base_ai : public ScriptedAI bool m_bFakeDeath; bool m_bCanFakeDeath; - void Reset() + void Reset() override { m_bCanFakeDeath = true; m_bFakeDeath = false; @@ -743,7 +743,7 @@ struct MANGOS_DLL_DECL advisor_base_ai : public ScriptedAI m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); } - void JustReachedHome() + void JustReachedHome() override { // Reset Kael if needed if (m_pInstance) @@ -755,7 +755,7 @@ struct MANGOS_DLL_DECL advisor_base_ai : public ScriptedAI } } - void DamageTaken(Unit* pDoneby, uint32& uiDamage) + void DamageTaken(Unit* pDoneby, uint32& uiDamage) override { // Allow fake death only in the first phase if (!m_bCanFakeDeath) @@ -790,7 +790,7 @@ struct MANGOS_DLL_DECL advisor_base_ai : public ScriptedAI DoCastSpellIfCan(m_creature, SPELL_KAEL_PHASE_2, CAST_TRIGGERED); } - void SpellHit(Unit* pCaster, const SpellEntry* pSpell) + void SpellHit(Unit* pCaster, const SpellEntry* pSpell) override { // Remove fake death if (pSpell->Id == SPELL_RESURRECTION && pCaster->GetEntry() == NPC_KAELTHAS) @@ -821,7 +821,7 @@ struct MANGOS_DLL_DECL boss_thaladred_the_darkenerAI : public advisor_base_ai uint32 m_uiSilenceTimer; uint32 m_uiPsychicBlowTimer; - void Reset() + void Reset() override { m_uiGazeTimer = 0; m_uiRendTimer = urand(4000, 8000); @@ -831,18 +831,18 @@ struct MANGOS_DLL_DECL boss_thaladred_the_darkenerAI : public advisor_base_ai advisor_base_ai::Reset(); } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoScriptText(SAY_THALADRED_AGGRO, m_creature); m_creature->TauntApply(pWho); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoScriptText(SAY_THALADRED_DEATH, m_creature); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -902,24 +902,24 @@ struct MANGOS_DLL_DECL boss_lord_sanguinarAI : public advisor_base_ai uint32 m_uiFearTimer; - void Reset() + void Reset() override { m_uiFearTimer = 10000; advisor_base_ai::Reset(); } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoScriptText(SAY_SANGUINAR_AGGRO, m_creature); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoScriptText(SAY_SANGUINAR_DEATH, m_creature); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -952,7 +952,7 @@ struct MANGOS_DLL_DECL boss_grand_astromancer_capernianAI : public advisor_base_ uint32 m_uiConflagrationTimer; uint32 m_uiArcaneExplosionTimer; - void Reset() + void Reset() override { m_uiFireballTimer = 2000; m_uiConflagrationTimer = 20000; @@ -961,7 +961,7 @@ struct MANGOS_DLL_DECL boss_grand_astromancer_capernianAI : public advisor_base_ advisor_base_ai::Reset(); } - void AttackStart(Unit* pWho) + void AttackStart(Unit* pWho) override { if (m_creature->Attack(pWho, true)) { @@ -973,17 +973,17 @@ struct MANGOS_DLL_DECL boss_grand_astromancer_capernianAI : public advisor_base_ } } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoScriptText(SAY_CAPERNIAN_AGGRO, m_creature); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoScriptText(SAY_CAPERNIAN_DEATH, m_creature); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -1040,7 +1040,7 @@ struct MANGOS_DLL_DECL boss_master_engineer_telonicusAI : public advisor_base_ai uint32 m_uiBombTimer; uint32 m_uiRemoteToyTimer; - void Reset() + void Reset() override { m_uiBombTimer = 10000; m_uiRemoteToyTimer = 5000; @@ -1048,17 +1048,17 @@ struct MANGOS_DLL_DECL boss_master_engineer_telonicusAI : public advisor_base_ai advisor_base_ai::Reset(); } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoScriptText(SAY_TELONICUS_AGGRO, m_creature); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoScriptText(SAY_TELONICUS_DEATH, m_creature); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -1102,18 +1102,18 @@ struct MANGOS_DLL_DECL mob_phoenix_tkAI : public ScriptedAI bool m_bFakeDeath; - void Reset() + void Reset() override { m_uiCycleTimer = 2000; m_bFakeDeath = false; } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoCastSpellIfCan(m_creature, SPELL_BURN); } - void EnterEvadeMode() + void EnterEvadeMode() override { // Don't evade during ember blast if (m_bFakeDeath) @@ -1122,7 +1122,7 @@ struct MANGOS_DLL_DECL mob_phoenix_tkAI : public ScriptedAI ScriptedAI::EnterEvadeMode(); } - void DamageTaken(Unit* pKiller, uint32& uiDamage) + void DamageTaken(Unit* pKiller, uint32& uiDamage) override { if (uiDamage < m_creature->GetHealth()) return; @@ -1162,7 +1162,7 @@ struct MANGOS_DLL_DECL mob_phoenix_tkAI : public ScriptedAI m_creature->SummonCreature(NPC_PHOENIX_EGG, 0, 0, 0, 0, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 15000); } - void SummonedCreatureDespawn(Creature* pSummoned) + void SummonedCreatureDespawn(Creature* pSummoned) override { // Remove fake death if the egg despawns after 15 secs m_creature->RemoveAurasDueToSpell(SPELL_EMBER_BLAST); @@ -1180,14 +1180,14 @@ struct MANGOS_DLL_DECL mob_phoenix_tkAI : public ScriptedAI } } - void SummonedCreatureJustDied(Creature* pSummoned) + void SummonedCreatureJustDied(Creature* pSummoned) override { // Self kill if the egg is killed if (m_bFakeDeath) m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -1223,10 +1223,10 @@ struct MANGOS_DLL_DECL mob_phoenix_egg_tkAI : public Scripted_NoMovementAI { mob_phoenix_egg_tkAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { Reset(); } - void Reset() { } - void MoveInLineOfSight(Unit* pWho) { } - void AttackStart(Unit* pWho) { } - void UpdateAI(const uint32 uiDiff) { } + void Reset() override { } + void MoveInLineOfSight(Unit* pWho) override { } + void AttackStart(Unit* pWho) override { } + void UpdateAI(const uint32 uiDiff) override { } }; CreatureAI* GetAI_boss_kaelthas(Creature* pCreature) diff --git a/scripts/outland/tempest_keep/the_eye/boss_void_reaver.cpp b/scripts/outland/tempest_keep/the_eye/boss_void_reaver.cpp index 65907ba39..9d73f16c4 100644 --- a/scripts/outland/tempest_keep/the_eye/boss_void_reaver.cpp +++ b/scripts/outland/tempest_keep/the_eye/boss_void_reaver.cpp @@ -57,7 +57,7 @@ struct MANGOS_DLL_DECL boss_void_reaverAI : public ScriptedAI uint32 m_uiKnockAwayTimer; uint32 m_uiBerserkTimer; - void Reset() + void Reset() override { m_uiPoundingTimer = 13000; m_uiArcaneOrbTimer = 3000; @@ -65,7 +65,7 @@ struct MANGOS_DLL_DECL boss_void_reaverAI : public ScriptedAI m_uiBerserkTimer = 10 * MINUTE * IN_MILLISECONDS; } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { if (pVictim->GetTypeId() != TYPEID_PLAYER) return; @@ -78,7 +78,7 @@ struct MANGOS_DLL_DECL boss_void_reaverAI : public ScriptedAI } } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoScriptText(SAY_DEATH, m_creature); @@ -86,7 +86,7 @@ struct MANGOS_DLL_DECL boss_void_reaverAI : public ScriptedAI m_pInstance->SetData(TYPE_VOIDREAVER, DONE); } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoScriptText(SAY_AGGRO, m_creature); @@ -94,19 +94,19 @@ struct MANGOS_DLL_DECL boss_void_reaverAI : public ScriptedAI m_pInstance->SetData(TYPE_VOIDREAVER, IN_PROGRESS); } - void JustReachedHome() + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_VOIDREAVER, NOT_STARTED); } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { // Cast the Arcane Orb missile on the npc, not on player DoCastSpellIfCan(pSummoned, SPELL_ARCANE_ORB_MISSILE, CAST_TRIGGERED); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/outland/tempest_keep/the_eye/the_eye.h b/scripts/outland/tempest_keep/the_eye/the_eye.h index 6edf0ab92..845b81d2b 100644 --- a/scripts/outland/tempest_keep/the_eye/the_eye.h +++ b/scripts/outland/tempest_keep/the_eye/the_eye.h @@ -41,14 +41,14 @@ class MANGOS_DLL_DECL instance_the_eye : public ScriptedInstance public: instance_the_eye(Map* pMap); - void Initialize(); - bool IsEncounterInProgress() const; + void Initialize() override; + bool IsEncounterInProgress() const override; - void OnCreatureCreate(Creature* pCreature); - void OnObjectCreate(GameObject* pGo); + void OnCreatureCreate(Creature* pCreature) override; + void OnObjectCreate(GameObject* pGo) override; - void SetData(uint32 uiType, uint32 uiData); - uint32 GetData(uint32 uiType); + void SetData(uint32 uiType, uint32 uiData) override; + uint32 GetData(uint32 uiType) override; // No Save or Load needed to current knowledge diff --git a/scripts/outland/tempest_keep/the_mechanar/boss_nethermancer_sepethrea.cpp b/scripts/outland/tempest_keep/the_mechanar/boss_nethermancer_sepethrea.cpp index 9003aae93..9ee815b53 100644 --- a/scripts/outland/tempest_keep/the_mechanar/boss_nethermancer_sepethrea.cpp +++ b/scripts/outland/tempest_keep/the_mechanar/boss_nethermancer_sepethrea.cpp @@ -59,25 +59,25 @@ struct MANGOS_DLL_DECL boss_nethermancer_sepethreaAI : public ScriptedAI uint32 m_uiArcaneBlastTimer; uint32 m_uiDragonsBreathTimer; - void Reset() + void Reset() override { m_uiFrostAttackTimer = urand(8000, 17000); m_uiArcaneBlastTimer = urand(14000, 25000); m_uiDragonsBreathTimer = urand(20000, 26000); } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoScriptText(SAY_AGGRO, m_creature); DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_SUMMON_RAGING_FLAMES : SPELL_SUMMON_RAGING_FLAMES_H); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { DoScriptText(urand(0, 1) ? SAY_SLAY1 : SAY_SLAY2, m_creature); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoScriptText(SAY_DEATH, m_creature); @@ -85,7 +85,7 @@ struct MANGOS_DLL_DECL boss_nethermancer_sepethreaAI : public ScriptedAI m_pInstance->SetData(TYPE_SEPETHREA, DONE); } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { if (pSummoned->GetEntry() == NPC_RAGING_FLAMES) { @@ -98,7 +98,7 @@ struct MANGOS_DLL_DECL boss_nethermancer_sepethreaAI : public ScriptedAI } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { // Return since we have no target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) diff --git a/scripts/outland/tempest_keep/the_mechanar/boss_pathaleon_the_calculator.cpp b/scripts/outland/tempest_keep/the_mechanar/boss_pathaleon_the_calculator.cpp index 9796e64f4..4bd53c80a 100644 --- a/scripts/outland/tempest_keep/the_mechanar/boss_pathaleon_the_calculator.cpp +++ b/scripts/outland/tempest_keep/the_mechanar/boss_pathaleon_the_calculator.cpp @@ -76,7 +76,7 @@ struct MANGOS_DLL_DECL boss_pathaleon_the_calculatorAI : public ScriptedAI uint32 m_uiArcaneExplosionTimer; bool m_bIsEnraged; - void Reset() + void Reset() override { m_uiSummonTimer = urand(12000, 23000); m_uiAngerTimer = urand(31000, 42000); @@ -87,17 +87,17 @@ struct MANGOS_DLL_DECL boss_pathaleon_the_calculatorAI : public ScriptedAI m_bIsEnraged = false; } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoScriptText(SAY_AGGRO, m_creature); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { DoScriptText(urand(0, 1) ? SAY_SLAY_1 : SAY_SLAY_2, m_creature); } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { DoScriptText(SAY_DEATH, m_creature); @@ -105,13 +105,13 @@ struct MANGOS_DLL_DECL boss_pathaleon_the_calculatorAI : public ScriptedAI m_pInstance->SetData(TYPE_PATHALEON, DONE); } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { if (m_creature->getVictim()) pSummoned->AI()->AttackStart(m_creature->getVictim()); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { // Return since we have no target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) @@ -206,13 +206,13 @@ struct MANGOS_DLL_DECL mob_nether_wraithAI : public ScriptedAI uint32 m_uiArcaneMissilesTimer; bool m_bHasDetonated; - void Reset() + void Reset() override { m_uiArcaneMissilesTimer = urand(1000, 4000); m_bHasDetonated = false; } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/outland/tempest_keep/the_mechanar/mechanar.h b/scripts/outland/tempest_keep/the_mechanar/mechanar.h index 7704dc732..715546b7b 100644 --- a/scripts/outland/tempest_keep/the_mechanar/mechanar.h +++ b/scripts/outland/tempest_keep/the_mechanar/mechanar.h @@ -89,21 +89,21 @@ class MANGOS_DLL_DECL instance_mechanar : public ScriptedInstance public: instance_mechanar(Map* pMap); - void Initialize(); + void Initialize() override; - void OnPlayerEnter(Player* pPlayer); - void OnObjectCreate(GameObject* pGo); - void OnCreatureCreate(Creature* pCreature); + void OnPlayerEnter(Player* pPlayer) override; + void OnObjectCreate(GameObject* pGo) override; + void OnCreatureCreate(Creature* pCreature) override; - void OnCreatureDeath(Creature* pCreature); + void OnCreatureDeath(Creature* pCreature) override; - void SetData(uint32 uiType, uint32 uiData); - uint32 GetData(uint32 uiType); + void SetData(uint32 uiType, uint32 uiData) override; + uint32 GetData(uint32 uiType) override; - const char* Save() { return m_strInstData.c_str(); } - void Load(const char* chrIn); + const char* Save() override { return m_strInstData.c_str(); } + void Load(const char* chrIn) override; - void Update(uint32 uiDiff); + void Update(uint32 uiDiff) override; private: void DoSpawnBridgeWave(); diff --git a/scripts/outland/terokkar_forest.cpp b/scripts/outland/terokkar_forest.cpp index 06d6bb879..382fca4cf 100644 --- a/scripts/outland/terokkar_forest.cpp +++ b/scripts/outland/terokkar_forest.cpp @@ -62,7 +62,7 @@ struct MANGOS_DLL_DECL mob_unkor_the_ruthlessAI : public ScriptedAI uint32 m_uiPulverizeTimer; uint32 m_uiFriendlyTimer; - void Reset() + void Reset() override { m_bCanDoQuest = false; m_uiUnfriendlyTimer = 0; @@ -82,7 +82,7 @@ struct MANGOS_DLL_DECL mob_unkor_the_ruthlessAI : public ScriptedAI m_uiUnfriendlyTimer = 60000; } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { // Reset npc on timer if (m_uiUnfriendlyTimer) @@ -157,10 +157,10 @@ struct MANGOS_DLL_DECL mob_netherweb_victimAI : public ScriptedAI Reset(); } - void Reset() { } - void MoveInLineOfSight(Unit* pWho) { } + void Reset() override { } + void MoveInLineOfSight(Unit* pWho) override { } - void JustDied(Unit* pKiller) + void JustDied(Unit* pKiller) override { if (Player* pPlayer = pKiller->GetCharmerOrOwnerPlayerOrPlayerItself()) { @@ -210,12 +210,12 @@ struct MANGOS_DLL_DECL npc_akunoAI : public npc_escortAI uint32 m_uiChainLightningTimer; - void Reset() + void Reset() override { m_uiChainLightningTimer = 1000; } - void WaypointReached(uint32 uiPointId) + void WaypointReached(uint32 uiPointId) override { switch (uiPointId) { @@ -244,12 +244,12 @@ struct MANGOS_DLL_DECL npc_akunoAI : public npc_escortAI } } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { pSummoned->AI()->AttackStart(m_creature); } - void UpdateEscortAI(const uint32 uiDiff) + void UpdateEscortAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -302,9 +302,9 @@ struct MANGOS_DLL_DECL npc_hungry_nether_rayAI : public ScriptedPetAI { npc_hungry_nether_rayAI(Creature* pCreature) : ScriptedPetAI(pCreature) { Reset(); } - void Reset() { } + void Reset() override { } - void OwnerKilledUnit(Unit* pVictim) + void OwnerKilledUnit(Unit* pVictim) override { if (pVictim->GetTypeId() == TYPEID_UNIT && pVictim->GetEntry() == NPC_BLACK_WARP_CHASER) { @@ -374,7 +374,7 @@ struct MANGOS_DLL_DECL npc_letollAI : public npc_escortAI uint32 m_uiEventTimer; uint32 m_uiEventCount; - void Reset() {} + void Reset() override {} // will make them follow, but will only work until they enter combat with any unit void SetFormation() @@ -414,7 +414,7 @@ struct MANGOS_DLL_DECL npc_letollAI : public npc_escortAI return NULL; } - void JustStartedEscort() + void JustStartedEscort() override { m_uiEventTimer = 5000; m_uiEventCount = 0; @@ -427,7 +427,7 @@ struct MANGOS_DLL_DECL npc_letollAI : public npc_escortAI SetFormation(); } - void WaypointReached(uint32 uiPointId) + void WaypointReached(uint32 uiPointId) override { switch (uiPointId) { @@ -451,13 +451,13 @@ struct MANGOS_DLL_DECL npc_letollAI : public npc_escortAI } } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { if (pWho->isInCombat() && pWho->GetTypeId() == TYPEID_UNIT && pWho->GetEntry() == NPC_BONE_SIFTER) DoScriptText(SAY_LE_HELP_HIM, m_creature); } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { Player* pPlayer = GetPlayerForEscort(); @@ -467,7 +467,7 @@ struct MANGOS_DLL_DECL npc_letollAI : public npc_escortAI pSummoned->AI()->AttackStart(m_creature); } - void UpdateEscortAI(const uint32 uiDiff) + void UpdateEscortAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) { @@ -602,7 +602,7 @@ struct MANGOS_DLL_DECL npc_mana_bomb_exp_triggerAI : public ScriptedAI uint32 m_uiEventTimer; uint32 m_uiEventCounter; - void Reset() + void Reset() override { pManaBomb = NULL; m_bIsActivated = false; @@ -622,7 +622,7 @@ struct MANGOS_DLL_DECL npc_mana_bomb_exp_triggerAI : public ScriptedAI pManaBomb = pGo; } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_bIsActivated) return; @@ -734,9 +734,9 @@ struct MANGOS_DLL_DECL npc_captive_child : public ScriptedAI { npc_captive_child(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } - void Reset() {} + void Reset() override {} - void MovementInform(uint32 uiMotionType, uint32 uiPointId) + void MovementInform(uint32 uiMotionType, uint32 uiPointId) override { if (uiMotionType == POINT_MOTION_TYPE) m_creature->ForcedDespawn(); // we only have one waypoint @@ -786,7 +786,7 @@ struct MANGOS_DLL_DECL npc_isla_starmaneAI : public npc_escortAI uint32 m_uiMoonfireTimer; uint32 m_uiWrathTimer; - void Reset() + void Reset() override { m_uiPeriodicTalkTimer = urand(20000, 40000); m_uiEntanglingRootsTimer = 100; @@ -797,7 +797,7 @@ struct MANGOS_DLL_DECL npc_isla_starmaneAI : public npc_escortAI m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PASSIVE); } - void JustStartedEscort() + void JustStartedEscort() override { m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PASSIVE); DoScriptText(SAY_ISLA_START, m_creature); @@ -805,7 +805,7 @@ struct MANGOS_DLL_DECL npc_isla_starmaneAI : public npc_escortAI pCage->Use(m_creature); } - void WaypointStart(uint32 uiPointId) + void WaypointStart(uint32 uiPointId) override { switch (uiPointId) { @@ -814,7 +814,7 @@ struct MANGOS_DLL_DECL npc_isla_starmaneAI : public npc_escortAI } } - void WaypointReached(uint32 uiPointId) + void WaypointReached(uint32 uiPointId) override { switch (uiPointId) { @@ -833,7 +833,7 @@ struct MANGOS_DLL_DECL npc_isla_starmaneAI : public npc_escortAI } } - void UpdateEscortAI(const uint32 uiDiff) + void UpdateEscortAI(const uint32 uiDiff) override { if (!HasEscortState(STATE_ESCORT_ESCORTING)) { @@ -926,9 +926,9 @@ struct MANGOS_DLL_DECL npc_skywingAI : public npc_escortAI { npc_skywingAI(Creature* pCreature) : npc_escortAI(pCreature) { Reset(); } - void Reset() {} + void Reset() override {} - void WaypointReached(uint32 uiPointId) + void WaypointReached(uint32 uiPointId) override { switch (uiPointId) { @@ -960,7 +960,7 @@ struct MANGOS_DLL_DECL npc_skywingAI : public npc_escortAI } } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { pSummoned->AI()->AttackStart(m_creature); } diff --git a/scripts/outland/zangarmarsh.cpp b/scripts/outland/zangarmarsh.cpp index 18f96ae52..8a695c6b0 100644 --- a/scripts/outland/zangarmarsh.cpp +++ b/scripts/outland/zangarmarsh.cpp @@ -50,7 +50,7 @@ struct MANGOS_DLL_DECL npc_cooshcooshAI : public ScriptedAI uint32 m_uiNormFaction; uint32 m_uiLightningBolt_Timer; - void Reset() + void Reset() override { m_uiLightningBolt_Timer = 2000; @@ -58,7 +58,7 @@ struct MANGOS_DLL_DECL npc_cooshcooshAI : public ScriptedAI m_creature->setFaction(m_uiNormFaction); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -99,7 +99,7 @@ struct MANGOS_DLL_DECL npc_kayra_longmaneAI : public npc_escortAI { npc_kayra_longmaneAI(Creature* pCreature) : npc_escortAI(pCreature) { Reset(); } - void WaypointReached(uint32 i) + void WaypointReached(uint32 i) override { Player* pPlayer = GetPlayerForEscort(); @@ -131,7 +131,7 @@ struct MANGOS_DLL_DECL npc_kayra_longmaneAI : public npc_escortAI } } - void Reset() { } + void Reset() override { } }; bool QuestAccept_npc_kayra_longmane(Player* pPlayer, Creature* pCreature, const Quest* pQuest) diff --git a/scripts/world/bosses_emerald_dragons.cpp b/scripts/world/bosses_emerald_dragons.cpp index 6ab1afe0e..3814f7c8c 100644 --- a/scripts/world/bosses_emerald_dragons.cpp +++ b/scripts/world/bosses_emerald_dragons.cpp @@ -62,7 +62,7 @@ struct MANGOS_DLL_DECL boss_emerald_dragonAI : public ScriptedAI uint32 m_uiNoxiousBreathTimer; uint32 m_uiTailsweepTimer; - void Reset() + void Reset() override { m_uiEventCounter = 1; @@ -71,21 +71,21 @@ struct MANGOS_DLL_DECL boss_emerald_dragonAI : public ScriptedAI m_uiTailsweepTimer = 4000; } - void EnterCombat(Unit* pEnemy) + void EnterCombat(Unit* pEnemy) override { DoCastSpellIfCan(m_creature, SPELL_MARK_OF_NATURE_AURA, CAST_TRIGGERED); ScriptedAI::EnterCombat(pEnemy); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { // Mark killed players with Mark of Nature if (pVictim->GetTypeId() == TYPEID_PLAYER) pVictim->CastSpell(pVictim, SPELL_MARK_OF_NATURE_PLAYER, true, NULL, NULL, m_creature->GetObjectGuid()); } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) pSummoned->AI()->AttackStart(pTarget); @@ -100,7 +100,7 @@ struct MANGOS_DLL_DECL boss_emerald_dragonAI : public ScriptedAI // Return true to handle shared timers and MeleeAttack virtual bool UpdateDragonAI(const uint32 uiDiff) { return true; } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { // Return since we have no target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) @@ -163,19 +163,19 @@ struct MANGOS_DLL_DECL boss_emerissAI : public boss_emerald_dragonAI uint32 m_uiVolatileInfectionTimer; - void Reset() + void Reset() override { boss_emerald_dragonAI::Reset(); m_uiVolatileInfectionTimer = 12000; } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoScriptText(SAY_EMERISS_AGGRO, m_creature); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* pVictim) override { // summon a mushroom on the spot the player dies if (pVictim->GetTypeId() == TYPEID_PLAYER) @@ -242,7 +242,7 @@ struct MANGOS_DLL_DECL boss_lethonAI : public boss_emerald_dragonAI { boss_lethonAI(Creature* pCreature) : boss_emerald_dragonAI(pCreature) {} - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoScriptText(SAY_LETHON_AGGRO, m_creature); // Shadow bolt wirl is a periodic aura which triggers a set of shadowbolts every 2 secs; may need some core tunning @@ -262,7 +262,7 @@ struct MANGOS_DLL_DECL boss_lethonAI : public boss_emerald_dragonAI } // Need this code here, as SPELL_DRAW_SPIRIT has no Script- or Dummyeffect - void SpellHitTarget(Unit* pTarget, const SpellEntry* pSpell) + void SpellHitTarget(Unit* pTarget, const SpellEntry* pSpell) override { // Summon a shade for each player hit if (pTarget->GetTypeId() == TYPEID_PLAYER && pSpell->Id == SPELL_DRAW_SPIRIT) @@ -275,7 +275,7 @@ struct MANGOS_DLL_DECL boss_lethonAI : public boss_emerald_dragonAI } } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* pSummoned) override { // Move the shade to lethon if (pSummoned->GetEntry() == NPC_SPIRIT_SHADE) @@ -291,12 +291,12 @@ struct MANGOS_DLL_DECL npc_spirit_shadeAI : public ScriptedAI bool m_bHasHealed; - void Reset() + void Reset() override { m_bHasHealed = false; } - void MoveInLineOfSight(Unit* pWho) + void MoveInLineOfSight(Unit* pWho) override { if (!m_bHasHealed && pWho->GetEntry() == NPC_LETHON && pWho->IsWithinDistInMap(m_creature, 3.0f)) { @@ -308,9 +308,9 @@ struct MANGOS_DLL_DECL npc_spirit_shadeAI : public ScriptedAI } } - void AttackStart(Unit* pWho) { } + void AttackStart(Unit* pWho) override { } - void UpdateAI(const uint32 uiDiff) { } + void UpdateAI(const uint32 uiDiff) override { } }; CreatureAI* GetAI_boss_lethon(Creature* pCreature) @@ -354,7 +354,7 @@ struct MANGOS_DLL_DECL boss_taerarAI : public boss_emerald_dragonAI uint32 m_uiShadesTimeoutTimer; uint8 m_uiShadesDead; - void Reset() + void Reset() override { boss_emerald_dragonAI::Reset(); @@ -368,7 +368,7 @@ struct MANGOS_DLL_DECL boss_taerarAI : public boss_emerald_dragonAI m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoScriptText(SAY_TAERAR_AGGRO, m_creature); } @@ -395,7 +395,7 @@ struct MANGOS_DLL_DECL boss_taerarAI : public boss_emerald_dragonAI return false; } - void SummonedCreatureJustDied(Creature* pSummoned) + void SummonedCreatureJustDied(Creature* pSummoned) override { if (pSummoned->GetEntry() == NPC_SHADE_OF_TAERAR) { @@ -461,13 +461,13 @@ struct MANGOS_DLL_DECL boss_shadeoftaerarAI : public ScriptedAI uint32 m_uiPoisonCloud_Timer; uint32 m_uiPosionBreath_Timer; - void Reset() + void Reset() override { m_uiPoisonCloud_Timer = 8000; m_uiPosionBreath_Timer = 12000; } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -527,14 +527,14 @@ struct MANGOS_DLL_DECL boss_ysondreAI : public boss_emerald_dragonAI uint32 m_uiLightningWaveTimer; - void Reset() + void Reset() override { boss_emerald_dragonAI::Reset(); m_uiLightningWaveTimer = 12000; } - void Aggro(Unit* pWho) + void Aggro(Unit* pWho) override { DoScriptText(SAY_YSONDRE_AGGRO, m_creature); } @@ -573,12 +573,12 @@ struct MANGOS_DLL_DECL mob_dementeddruidsAI : public ScriptedAI uint32 m_uiMoonFire_Timer; - void Reset() + void Reset() override { m_uiMoonFire_Timer = 3000; } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/world/guards.cpp b/scripts/world/guards.cpp index fa0fceec8..f7e8c1ce9 100644 --- a/scripts/world/guards.cpp +++ b/scripts/world/guards.cpp @@ -125,7 +125,7 @@ struct MANGOS_DLL_DECL guard_shattrath_aldorAI : public guardAI ObjectGuid m_playerGuid; bool m_bCanTeleport; - void Reset() + void Reset() override { m_uiBanish_Timer = 5000; m_uiExile_Timer = 8500; @@ -133,7 +133,7 @@ struct MANGOS_DLL_DECL guard_shattrath_aldorAI : public guardAI m_bCanTeleport = false; } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -192,7 +192,7 @@ struct MANGOS_DLL_DECL guard_shattrath_scryerAI : public guardAI ObjectGuid m_playerGuid; bool m_bCanTeleport; - void Reset() + void Reset() override { m_uiBanish_Timer = 5000; m_uiExile_Timer = 8500; @@ -200,7 +200,7 @@ struct MANGOS_DLL_DECL guard_shattrath_scryerAI : public guardAI m_bCanTeleport = false; } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/world/mob_generic_creature.cpp b/scripts/world/mob_generic_creature.cpp index 1954bd0ac..20b92b680 100644 --- a/scripts/world/mob_generic_creature.cpp +++ b/scripts/world/mob_generic_creature.cpp @@ -33,14 +33,14 @@ struct MANGOS_DLL_DECL generic_creatureAI : public ScriptedAI uint32 BuffTimer; // This variable keeps track of buffs bool IsSelfRooted; - void Reset() + void Reset() override { GlobalCooldown = 0; BuffTimer = 0; // Rebuff as soon as we can IsSelfRooted = false; } - void Aggro(Unit* who) + void Aggro(Unit* who) override { if (!m_creature->CanReachWithMeleeAttack(who)) { @@ -48,7 +48,7 @@ struct MANGOS_DLL_DECL generic_creatureAI : public ScriptedAI } } - void UpdateAI(const uint32 diff) + void UpdateAI(const uint32 diff) override { // Always decrease our global cooldown first if (GlobalCooldown > diff) diff --git a/scripts/world/npcs_special.cpp b/scripts/world/npcs_special.cpp index af014b3d3..8da8f477c 100644 --- a/scripts/world/npcs_special.cpp +++ b/scripts/world/npcs_special.cpp @@ -135,7 +135,7 @@ struct MANGOS_DLL_DECL npc_air_force_botsAI : public ScriptedAI SpawnAssociation* m_pSpawnAssoc; ObjectGuid m_spawnedGuid; - void Reset() { } + void Reset() override { } Creature* SummonGuard() { @@ -162,7 +162,7 @@ struct MANGOS_DLL_DECL npc_air_force_botsAI : public ScriptedAI return NULL; } - void MoveInLineOfSight(Unit* pWho) + void MoveInLineOfSight(Unit* pWho) override { if (!m_pSpawnAssoc) return; @@ -268,7 +268,7 @@ struct MANGOS_DLL_DECL npc_chicken_cluckAI : public ScriptedAI uint32 m_uiResetFlagTimer; - void Reset() + void Reset() override { m_uiResetFlagTimer = 120000; @@ -276,7 +276,7 @@ struct MANGOS_DLL_DECL npc_chicken_cluckAI : public ScriptedAI m_creature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER); } - void ReceiveEmote(Player* pPlayer, uint32 uiEmote) + void ReceiveEmote(Player* pPlayer, uint32 uiEmote) override { if (uiEmote == TEXTEMOTE_CHICKEN) { @@ -310,7 +310,7 @@ struct MANGOS_DLL_DECL npc_chicken_cluckAI : public ScriptedAI } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { // Reset flags after a certain time has passed so that the next player has to start the 'event' again if (m_creature->HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER)) @@ -366,9 +366,9 @@ struct MANGOS_DLL_DECL npc_dancing_flamesAI : public ScriptedAI { npc_dancing_flamesAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} - void Reset() {} + void Reset() override {} - void ReceiveEmote(Player* pPlayer, uint32 uiEmote) + void ReceiveEmote(Player* pPlayer, uint32 uiEmote) override { m_creature->SetFacingToObject(pPlayer); @@ -486,7 +486,7 @@ struct MANGOS_DLL_DECL npc_doctorAI : public ScriptedAI GuidList Patients; std::vector Coordinates; - void Reset() + void Reset() override { m_playerGuid.Clear(); @@ -506,7 +506,7 @@ struct MANGOS_DLL_DECL npc_doctorAI : public ScriptedAI void BeginEvent(Player* pPlayer); void PatientDied(Location* Point); void PatientSaved(Creature* soldier, Player* pPlayer, Location* Point); - void UpdateAI(const uint32 diff); + void UpdateAI(const uint32 diff) override; }; /*##### @@ -520,7 +520,7 @@ struct MANGOS_DLL_DECL npc_injured_patientAI : public ScriptedAI ObjectGuid m_doctorGuid; Location* Coord; - void Reset() + void Reset() override { m_doctorGuid.Clear(); Coord = NULL; @@ -552,7 +552,7 @@ struct MANGOS_DLL_DECL npc_injured_patientAI : public ScriptedAI } } - void SpellHit(Unit* caster, const SpellEntry* spell) + void SpellHit(Unit* caster, const SpellEntry* spell) override { if (caster->GetTypeId() == TYPEID_PLAYER && m_creature->isAlive() && spell->Id == 20804) { @@ -601,7 +601,7 @@ struct MANGOS_DLL_DECL npc_injured_patientAI : public ScriptedAI } } - void UpdateAI(const uint32 diff) + void UpdateAI(const uint32 diff) override { // lower HP on every world tick makes it a useful counter, not officlone though uint32 uiHPLose = uint32(0.05f * diff); @@ -840,7 +840,7 @@ struct MANGOS_DLL_DECL npc_garments_of_questsAI : public npc_escortAI uint32 m_uiRunAwayTimer; - void Reset() + void Reset() override { m_playerGuid.Clear(); @@ -854,7 +854,7 @@ struct MANGOS_DLL_DECL npc_garments_of_questsAI : public npc_escortAI m_creature->SetHealth(int(m_creature->GetMaxHealth() * 0.7)); } - void SpellHit(Unit* pCaster, const SpellEntry* pSpell) + void SpellHit(Unit* pCaster, const SpellEntry* pSpell) override { if (pSpell->Id == SPELL_LESSER_HEAL_R2 || pSpell->Id == SPELL_FORTITUDE_R1) { @@ -964,9 +964,9 @@ struct MANGOS_DLL_DECL npc_garments_of_questsAI : public npc_escortAI } } - void WaypointReached(uint32 uiPointId) {} + void WaypointReached(uint32 uiPointId) override {} - void UpdateEscortAI(const uint32 uiDiff) + void UpdateEscortAI(const uint32 uiDiff) override { if (m_bCanRun && !m_creature->isInCombat()) { @@ -1016,12 +1016,12 @@ struct MANGOS_DLL_DECL npc_guardianAI : public ScriptedAI { npc_guardianAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} - void Reset() + void Reset() override { m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); } - void UpdateAI(const uint32 diff) + void UpdateAI(const uint32 diff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -1508,7 +1508,7 @@ struct MANGOS_DLL_DECL npc_spring_rabbitAI : public ScriptedPetAI uint32 m_uiStepTimer; float m_fMoveAngle; - void Reset() + void Reset() override { m_uiStep = 0; m_uiStepTimer = 0; @@ -1546,7 +1546,7 @@ struct MANGOS_DLL_DECL npc_spring_rabbitAI : public ScriptedPetAI } // Event Starts when two rabbits see each other - void MoveInLineOfSight(Unit* pWho) + void MoveInLineOfSight(Unit* pWho) override { if (m_creature->getVictim()) return; @@ -1579,7 +1579,7 @@ struct MANGOS_DLL_DECL npc_spring_rabbitAI : public ScriptedPetAI return false; } - void MovementInform(uint32 uiMovementType, uint32 uiData) + void MovementInform(uint32 uiMovementType, uint32 uiData) override { if (uiMovementType != POINT_MOTION_TYPE || uiData != 1) return; @@ -1604,7 +1604,7 @@ struct MANGOS_DLL_DECL npc_spring_rabbitAI : public ScriptedPetAI } // Overwrite ScriptedPetAI::UpdateAI, to prevent re-following while the event is active! - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (!m_partnerGuid || !m_uiStepTimer) { @@ -1686,7 +1686,7 @@ struct MANGOS_DLL_DECL npc_redemption_targetAI : public ScriptedAI ObjectGuid m_playerGuid; - void Reset() + void Reset() override { m_uiEvadeTimer = 0; m_uiHealTimer = 0; @@ -1707,7 +1707,7 @@ struct MANGOS_DLL_DECL npc_redemption_targetAI : public ScriptedAI m_uiHealTimer = 2000; } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (m_uiHealTimer) { diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index fef39aed8..0e7241406 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2753" + #define SD2_REVISION_NR "2754" #endif // __SD2_REVISION_NR_H__ From 629644f69fc8715aaa5041782405c1eac6d9601d Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Sun, 18 Nov 2012 01:02:41 +0100 Subject: [PATCH 0750/1172] Add forgotten SQL_guide html file --- docs/SQL_guide.html | 1154 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 1154 insertions(+) create mode 100644 docs/SQL_guide.html diff --git a/docs/SQL_guide.html b/docs/SQL_guide.html new file mode 100644 index 000000000..bc528524c --- /dev/null +++ b/docs/SQL_guide.html @@ -0,0 +1,1154 @@ + + + + + +[GUIDE] Introduction to Database content for SD2 + + + + + +
+
+
+

This guide is intended to help people

+
    +
  • +

    +to understand which information of the database is used with SD2 +

    +
  • +
  • +

    +who want to contribute their patches as complete as possible +

    +
  • +
+

All sql-related files are located in the ScriptDev2/sql and subsequent directories.

+
+
+
+

1. SQL-Files

+
+
+

1.1. Files that contain full SD2-Database content

+

For a script we usually have to take care of these files:

+
    +
  • +

    +mangos_scriptname_full.sql +

    +

    This file is applied to the world database (default: mangos), and contains the ScriptNames

    +
  • +
  • +

    +scriptdev2_script_full.sql +

    +

    This file is applied to the sd2 database (default: scriptdev2), and contains texts, gossip-items and waypoints

    +
  • +
+
+
+

1.2. Patchfiles for incremental Updates

+

Patches for the databases are stored in the files:

+
    +
  • +

    +Updates/rXXXX_mangos.sql +

    +

    This file contains the changes that should be done with the patch to the world-databse

    +
  • +
  • +

    +Updates/rXXXX_scriptdev2.sql +

    +

    This file contains the changes that should be done with the patch to the scriptdev2-database

    +
  • +
+
+
+
+
+

2. World-Database

+
+
+

2.1. ScriptNames of NPCs:

+

If we need to assign a ScriptName to a NPC (GameObject-Scripts are similar) the statement is:

+
+
+
UPDATE creature_template SET ScriptName='npc_and_his_name' WHERE entry=XYZ;
+
+

or

+
+
+
UPDATE creature_template SET ScriptName='npc_something_identifying' WHERE entry IN (XYZ, ZYX);
+
+

Remark: For creatures with many difficulty entries, only the one for normal difficulty needs the ScriptName.

+
+
+

2.2. ScriptNames for scripted_areatrigger:

+

For Areatriggers (or scripted_event_id) we usally cannot use UPDATE, hence we need to DELETE possible old entries first:

+
+
+
DELETE FROM scripted_areatrigger WHERE entry=XYZ;
+INSERT INTO scripted_areatrigger VALUES (XYZ, at_some_place);
+
+
+
+
+
+

3. ScriptDev2-Database

+
+
+

3.1. entry-Format for texts and for gossip-texts:

+

The to be used entry is a combination of the number depending on the map and a counter.

+
    +
  • +

    +This is for texts: -1<MapId><three-digit-counter> +

    +
  • +
  • +

    +For gossip-texts: -3<MapId><three-digit-counter> +

    +

    where <MapId> is the ID of the map for instances, or 000 for all other maps.

    +
  • +
+
+

3.1.1. Example: Text on WorldMap

+

Let’s say we want to add a new text to a NPC on Kalimdor (no instance), +then we need to look which is the last text entry of the format -1000XYZ +(this one can be found in scriptdev2_script_full.sql).

+

On the moment where I write this guide this is:

+
+
+
(-1000589,'Kroshius live? Kroshius crush!',0,1,0,0,'SAY_KROSHIUS_REVIVE');
+
+

so our first text entry will be -1000590.

+
+
+

3.1.2. Example: Gossip-Item in Instance

+

Let’s say we want to add a new gossip item to a NPC in Culling of Stratholme, this map has the ID 595. +At this moment there is already some gossip_text, and the last one is

+
+
+
(-3595005,'So how does the Infinite Dragonflight plan to interfere?','chromie GOSSIP_ITEM_INN_3');
+
+

so our first gossip-text entry will be -3595006.

+
+
+
+

3.2. Format for texts

+

The format is (entry,content_default,sound,type,language,emote,comment) with these meanings:

+
+
+entry +
+
+

+should now be clear ;) +

+
+
+content_default +
+
+

+is the text (in english) enclosed with '.
+ There are a few placeholders that can be used: +
+

+
+ + + + + + + + + + + + + + + + + + + + +
+%s +
+
+

+self, is the name of the Unit saying the text
+The $-placeholders work only if you use DoScriptText with a target. +

+
+$N, $n +
+
+

+the [N, n]ame of the target +

+
+$C, $c +
+
+

+the [C, c]lass of the target +

+
+$R, $r +
+
+

+the [R, r]ace of the target +

+
+$GA:B; +
+
+

+if the target is male then A else B is displayed, Example: +

+
+
+
'Time to teach you a lesson in manners, little $Gboy:girl;!'
+
+

Remember to escape ' with \', Example:

+
+
+
'That \'s my favourite chocolate bar'.
+
+
+
+
+sound +
+
+

+is the sound ID that shall be played on saying, they are stored in SoundEntries.dbc +

+
+
+

Sound Ids are stored within the SoundEntries.dbc file. Within that dbc file you will find a reference to the actual file that is played. We cannot help you with reading these files so please do not ask how.

+
+
+— Ntsc +
+
+
+type +
+
+

+is the type of the text, there are these possibilities: +

+
+
+
0 CHAT_TYPE_SAY - 'white' text
+1 CHAT_TYPE_YELL - 'red' text
+2 CHAT_TYPE_TEXT_EMOTE - 'yellow' emote-text (no <Name>... )
+3 CHAT_TYPE_BOSS_EMOTE - 'big yellow' emote-text displayed in the center of the screen
+4 CHAT_TYPE_WHISPER - whisper, needs a target
+5 CHAT_TYPE_BOSS_WHISPER - whipser, needs a target
+6 CHAT_TYPE_ZONE_YELL - 'red' text, displayed to everyone in the zone
+
+
+
+language +
+
+

+is the language of the text (like LANG_GNOMISH), see enum Language in game/SharedDefines.h — usually zero (LANG_UNIVERSAL) +

+
+
+emote +
+
+

+is the emote the npc shall perform on saying the text, can be found in enum Emote in game/SharedDefines.h +

+
+
+comment +
+
+

+is a comment to this text, usually the used enum of the script, like SAY_KROSHIUS_REVIVE, if this enum is not identifying the npc, then the name of the npc is put before. +

+
+
+
+
+

3.3. Format for gossip-texts

+

The format for gossip texts is (entry,content_default,comment)
+The fields have the same meaning as for script-texts.

+
+
+

3.4. Format for waypoints

+

The format for waypoints is (entry,pointid,location_x,location_y,location_z,waittime,point_comment) with these meanings:

+
+
+entry +
+
+

+is the entry of the scripted NPC +

+
+
+pointid +
+
+

+is the ID of the point, usally starting with 01, and increasing +

+
+
+location_* +
+
+

+describes the position of the waypoint +

+
+
+waittime +
+
+

+is the time, the mob will wait after reaching this waypoint, before he continues to go to the next +

+
+
+point_comment +
+
+

+is used to note if something special is happening at this point, like quest credit +

+
+
+
+
+
+
+

4. Creating the Patch

+
+

There are different ways to get to a patch, I prefer this workflow:

+
+

4.1. For the scriptdev2 database (patch files):

+

Open scriptdev2_script_full.txt
+scroll to the right place for the needed SQL-statements, to note the entry.
+(for texts depending on mapId, and to the last counter, for waypoints behind the last inserted waypoint)

+
+

4.1.1. Example for normal world text:

+

Assume the last entry in your map (here world-map) was:

+
+
+
(-1000589,'Kroshius live? Kroshius crush!',0,1,0,0,'SAY_KROSHIUS_REVIVE');
+
+

Now create a new file: Updates/r0000_scriptdev2.sql +Add there:

+
+
+
DELETE FROM script_texts WHERE entry=-1000590;
+INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES
+(-1000590,'My fancy aggro-text',0,1,0,0,'boss_hogger SAY_AGGRO');
+
+

or

+
+
+
DELETE FROM script_texts WHERE entry BETWEEN -1000592 AND -1000590;
+INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES
+(-1000590,'My fancy aggro-text1',0,1,0,0,'boss_hogger SAY_AGGRO1'),
+(-1000591,'My fancy aggro-text2',0,1,0,0,'boss_hogger SAY_AGGRO2'),
+(-1000592,'My fancy aggro-text3',0,1,0,0,'boss_hogger SAY_AGGRO3');
+
+

Hint: the INSERT statements can also be copied from the scriptdev2_script_full.sql

+
+
+

4.1.2. Example for waypoints:

+

The required SQL code to add a waypoint is:

+
+
+
DELETE FROM script_waypoint WHERE entry=<MyNpcEntry>;
+INSERT INTO script_waypoint VALUES
+(<MyNpcEntry>, 1, 4013.51,6390.33, 29.970, 0, '<MyNPCName> - start escort'),
+(<MyNpcEntry>, 2, 4060.51,6400.33, 20.970, 0, '<MyNPCName> - finish escort');
+
+

When the Update file is done, append an additional empty line
+And test these lines for correctness!

+
+
+
+

4.2. For the scriptdev2 database (full files):

+

If everything works alright, and you finally intend to prepare the full-patch, copy the SQL-Code that is needed to the proper place in scriptdev2_script_full.sql, +(for a new npc add an empty line), and change the semicolon to a comma:

+
+

4.2.1. Example for world text:

+
+
+
(-1000589,'Kroshius live? Kroshius crush!',0,1,0,0,'SAY_KROSHIUS_REVIVE'),
+
+(-1000590,'My fancy aggro-text',0,1,0,0,'boss_hogger SAY_AGGRO');
+
+

The waypoints are added behind the last waypoint, after an empty line.

+
+
+
+

4.3. For the world database:

+

Create a new file: Updates/r0000_mangos.sql
+In this file put the needed statements for your ScriptNames, append an empty line, convert lineendings to Unix, and then test it for correctness.

+

If everything is alright, open mangos_scriptname_full.sql and go to the right place (this is usally sorted alphabetically by zone).
+Insert the needed statement where it fits (usally again ordered alphabetically)

+

After this is done, Create a patch including the (untracked) files in Update/
+then you have all information in the created patch, and anyone who wants to test your patch just needs to apply the created files from Updates/

+
+
+
+
+

+ + + From 7399fb3383b4ce206e4982f7cce4116d1d5ced8d Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sun, 18 Nov 2012 01:25:35 +0100 Subject: [PATCH 0751/1172] [2755] ScriptDev2 Milestone 0.6 Requires (C)MaNGOS 12026, Expects C-MaNGOS v17.0 [12270] Thanks to all who contributed! --- docs/ChangeLog.html | 937 +++++++++++++++++++++ docs/ChangeLog.txt | 49 ++ docs/ToDo.txt | 33 +- docs/aaa_Overview.html | 15 +- docs/aaa_Overview.txt | 5 + sd2_revision_nr.h | 2 +- sql/updates/{ => 0.6}/r1543_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r1544_mangos.sql | 0 sql/updates/{ => 0.6}/r1545_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r1548_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r1549_mangos.sql | 0 sql/updates/{ => 0.6}/r1549_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r1551_mangos.sql | 0 sql/updates/{ => 0.6}/r1554_mangos.sql | 0 sql/updates/{ => 0.6}/r1554_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r1555_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r1556_mangos.sql | 0 sql/updates/{ => 0.6}/r1557_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r1563_mangos.sql | 0 sql/updates/{ => 0.6}/r1567_mangos.sql | 0 sql/updates/{ => 0.6}/r1567_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r1570_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r1577_mangos.sql | 0 sql/updates/{ => 0.6}/r1577_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r1583_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r1584_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r1587_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r1589_mangos.sql | 0 sql/updates/{ => 0.6}/r1590_mangos.sql | 0 sql/updates/{ => 0.6}/r1591_mangos.sql | 0 sql/updates/{ => 0.6}/r1592_mangos.sql | 0 sql/updates/{ => 0.6}/r1593_mangos.sql | 0 sql/updates/{ => 0.6}/r1594_mangos.sql | 0 sql/updates/{ => 0.6}/r1595_mangos.sql | 0 sql/updates/{ => 0.6}/r1596_mangos.sql | 0 sql/updates/{ => 0.6}/r1599_mangos.sql | 0 sql/updates/{ => 0.6}/r1600_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r1602_mangos.sql | 0 sql/updates/{ => 0.6}/r1604_mangos.sql | 0 sql/updates/{ => 0.6}/r1605_mangos.sql | 0 sql/updates/{ => 0.6}/r1607_mangos.sql | 0 sql/updates/{ => 0.6}/r1608_mangos.sql | 0 sql/updates/{ => 0.6}/r1615_mangos.sql | 0 sql/updates/{ => 0.6}/r1615_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r1616_mangos.sql | 0 sql/updates/{ => 0.6}/r1617_mangos.sql | 0 sql/updates/{ => 0.6}/r1621_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r1622_mangos.sql | 0 sql/updates/{ => 0.6}/r1622_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r1624_mangos.sql | 0 sql/updates/{ => 0.6}/r1624_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r1627_mangos.sql | 0 sql/updates/{ => 0.6}/r1627_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r1629_mangos.sql | 0 sql/updates/{ => 0.6}/r1629_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r1632_mangos.sql | 0 sql/updates/{ => 0.6}/r1636_mangos.sql | 0 sql/updates/{ => 0.6}/r1637_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r1642_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r1644_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r1647_mangos.sql | 0 sql/updates/{ => 0.6}/r1647_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r1650_mangos.sql | 0 sql/updates/{ => 0.6}/r1651_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r1652_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r1653_mangos.sql | 0 sql/updates/{ => 0.6}/r1658_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r1660_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r1661_mangos.sql | 0 sql/updates/{ => 0.6}/r1662_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r1665_mangos.sql | 0 sql/updates/{ => 0.6}/r1667_mangos.sql | 0 sql/updates/{ => 0.6}/r1667_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r1668_mangos.sql | 0 sql/updates/{ => 0.6}/r1671_mangos.sql | 0 sql/updates/{ => 0.6}/r1671_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r1679_mangos.sql | 0 sql/updates/{ => 0.6}/r1680_mangos.sql | 0 sql/updates/{ => 0.6}/r1681_mangos.sql | 0 sql/updates/{ => 0.6}/r1683_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r1685_mangos.sql | 0 sql/updates/{ => 0.6}/r1685_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r1687_mangos.sql | 0 sql/updates/{ => 0.6}/r1691_mangos.sql | 0 sql/updates/{ => 0.6}/r1694_mangos.sql | 0 sql/updates/{ => 0.6}/r1698_mangos.sql | 0 sql/updates/{ => 0.6}/r1704_mangos.sql | 0 sql/updates/{ => 0.6}/r1705_mangos.sql | 0 sql/updates/{ => 0.6}/r1705_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r1706_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r1711_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r1715_mangos.sql | 0 sql/updates/{ => 0.6}/r1715_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r1720_mangos.sql | 0 sql/updates/{ => 0.6}/r1720_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r1726_mangos.sql | 0 sql/updates/{ => 0.6}/r1727_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r1728_mangos.sql | 0 sql/updates/{ => 0.6}/r1729_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r1734_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r1736_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r1737_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r1741_mangos.sql | 0 sql/updates/{ => 0.6}/r1750_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r1751_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r1752_mangos.sql | 0 sql/updates/{ => 0.6}/r1753_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r1754_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r1759_mangos.sql | 0 sql/updates/{ => 0.6}/r1763_mangos.sql | 0 sql/updates/{ => 0.6}/r1767_mangos.sql | 0 sql/updates/{ => 0.6}/r1771_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r1777_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r1780_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r1782_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r1783_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r1784_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r1785_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r1786_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r1789_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r1791_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r1797_mangos.sql | 0 sql/updates/{ => 0.6}/r1798_mangos.sql | 0 sql/updates/{ => 0.6}/r1800_mangos.sql | 0 sql/updates/{ => 0.6}/r1800_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r1807_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r1810_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r1813_mangos.sql | 0 sql/updates/{ => 0.6}/r1816_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r1818_mangos.sql | 0 sql/updates/{ => 0.6}/r1818_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r1819_mangos.sql | 0 sql/updates/{ => 0.6}/r1822_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r1824_mangos.sql | 0 sql/updates/{ => 0.6}/r1825_mangos.sql | 0 sql/updates/{ => 0.6}/r1825_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r1826_mangos.sql | 0 sql/updates/{ => 0.6}/r1826_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r1827_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r1828_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r1829_mangos.sql | 0 sql/updates/{ => 0.6}/r1830_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r1831_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r1836_mangos.sql | 0 sql/updates/{ => 0.6}/r1842_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r1843_mangos.sql | 0 sql/updates/{ => 0.6}/r1843_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r1844_mangos.sql | 0 sql/updates/{ => 0.6}/r1845_mangos.sql | 0 sql/updates/{ => 0.6}/r1845_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r1850_mangos.sql | 0 sql/updates/{ => 0.6}/r1850_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r1851_mangos.sql | 0 sql/updates/{ => 0.6}/r1852_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r1853_mangos.sql | 0 sql/updates/{ => 0.6}/r1855_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r1858_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r1859_mangos.sql | 0 sql/updates/{ => 0.6}/r1860_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r1862_mangos.sql | 0 sql/updates/{ => 0.6}/r1863_mangos.sql | 0 sql/updates/{ => 0.6}/r1864_mangos.sql | 0 sql/updates/{ => 0.6}/r1864_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r1865_mangos.sql | 0 sql/updates/{ => 0.6}/r1865_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r1866_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r1868_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r1869_mangos.sql | 0 sql/updates/{ => 0.6}/r1871_mangos.sql | 0 sql/updates/{ => 0.6}/r1875_mangos.sql | 0 sql/updates/{ => 0.6}/r1875_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r1876_mangos.sql | 0 sql/updates/{ => 0.6}/r1876_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r1878_mangos.sql | 0 sql/updates/{ => 0.6}/r1881_mangos.sql | 0 sql/updates/{ => 0.6}/r1882_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r1886_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r1888_mangos.sql | 0 sql/updates/{ => 0.6}/r1888_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r1889_mangos.sql | 0 sql/updates/{ => 0.6}/r1889_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r1890_mangos.sql | 0 sql/updates/{ => 0.6}/r1890_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r1891_mangos.sql | 0 sql/updates/{ => 0.6}/r1899_mangos.sql | 0 sql/updates/{ => 0.6}/r1899_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r1908_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r1913_mangos.sql | 0 sql/updates/{ => 0.6}/r1914_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r1918_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r1921_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r1924_mangos.sql | 0 sql/updates/{ => 0.6}/r1924_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r1936_mangos.sql | 0 sql/updates/{ => 0.6}/r1940_mangos.sql | 0 sql/updates/{ => 0.6}/r1946_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r1949_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r1951_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r1954_mangos.sql | 0 sql/updates/{ => 0.6}/r1962_mangos.sql | 0 sql/updates/{ => 0.6}/r1962_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r1963_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r1965_mangos.sql | 0 sql/updates/{ => 0.6}/r1965_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r1968_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r1972_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r1973_mangos.sql | 0 sql/updates/{ => 0.6}/r1974_mangos.sql | 0 sql/updates/{ => 0.6}/r1975_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r1979_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r1982_mangos.sql | 0 sql/updates/{ => 0.6}/r1982_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r1984_mangos.sql | 0 sql/updates/{ => 0.6}/r1984_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r1987_mangos.sql | 0 sql/updates/{ => 0.6}/r1990_mangos.sql | 0 sql/updates/{ => 0.6}/r1990_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r1992_mangos.sql | 0 sql/updates/{ => 0.6}/r1992_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r1993_mangos.sql | 0 sql/updates/{ => 0.6}/r1993_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2004_mangos.sql | 0 sql/updates/{ => 0.6}/r2008_mangos.sql | 0 sql/updates/{ => 0.6}/r2008_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2009_mangos.sql | 0 sql/updates/{ => 0.6}/r2009_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2010_mangos.sql | 0 sql/updates/{ => 0.6}/r2013_mangos.sql | 0 sql/updates/{ => 0.6}/r2013_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2015_mangos.sql | 0 sql/updates/{ => 0.6}/r2017_mangos.sql | 0 sql/updates/{ => 0.6}/r2018_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2020_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2021_mangos.sql | 0 sql/updates/{ => 0.6}/r2024_mangos.sql | 0 sql/updates/{ => 0.6}/r2025_mangos.sql | 0 sql/updates/{ => 0.6}/r2028_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2031_mangos.sql | 0 sql/updates/{ => 0.6}/r2031_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2033_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2036_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2037_mangos.sql | 0 sql/updates/{ => 0.6}/r2038_mangos.sql | 0 sql/updates/{ => 0.6}/r2039_mangos.sql | 0 sql/updates/{ => 0.6}/r2043_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2044_mangos.sql | 0 sql/updates/{ => 0.6}/r2044_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2050_mangos.sql | 0 sql/updates/{ => 0.6}/r2051_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2057_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2059_mangos.sql | 0 sql/updates/{ => 0.6}/r2059_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2061_mangos.sql | 0 sql/updates/{ => 0.6}/r2064_mangos.sql | 0 sql/updates/{ => 0.6}/r2064_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2070_mangos.sql | 0 sql/updates/{ => 0.6}/r2072_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2073_mangos.sql | 0 sql/updates/{ => 0.6}/r2073_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2074_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2075_mangos.sql | 0 sql/updates/{ => 0.6}/r2076_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2077_mangos.sql | 0 sql/updates/{ => 0.6}/r2077_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2080_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2092_mangos.sql | 0 sql/updates/{ => 0.6}/r2092_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2101_mangos.sql | 0 sql/updates/{ => 0.6}/r2101_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2107_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2112_mangos.sql | 0 sql/updates/{ => 0.6}/r2112_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2113_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2114_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2116_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2130_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2134_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2138_mangos.sql | 0 sql/updates/{ => 0.6}/r2139_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2146_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2147_mangos.sql | 0 sql/updates/{ => 0.6}/r2147_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2162_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2181_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2212_mangos.sql | 0 sql/updates/{ => 0.6}/r2212_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2220_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2227_mangos.sql | 0 sql/updates/{ => 0.6}/r2229_mangos.sql | 0 sql/updates/{ => 0.6}/r2235_mangos.sql | 0 sql/updates/{ => 0.6}/r2235_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2239_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2242_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2243_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2245_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2246_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2247_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2248_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2249_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2250_mangos.sql | 0 sql/updates/{ => 0.6}/r2250_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2252_mangos.sql | 0 sql/updates/{ => 0.6}/r2254_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2255_mangos.sql | 0 sql/updates/{ => 0.6}/r2263_mangos.sql | 0 sql/updates/{ => 0.6}/r2268_mangos.sql | 0 sql/updates/{ => 0.6}/r2268_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2270_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2273_mangos.sql | 0 sql/updates/{ => 0.6}/r2277_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2284_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2286_mangos.sql | 0 sql/updates/{ => 0.6}/r2289_mangos.sql | 0 sql/updates/{ => 0.6}/r2289_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2298_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2300_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2305_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2306_mangos.sql | 0 sql/updates/{ => 0.6}/r2307_mangos.sql | 0 sql/updates/{ => 0.6}/r2309_mangos.sql | 0 sql/updates/{ => 0.6}/r2309_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2310_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2313_mangos.sql | 0 sql/updates/{ => 0.6}/r2313_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2314_mangos.sql | 0 sql/updates/{ => 0.6}/r2314_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2318_mangos.sql | 0 sql/updates/{ => 0.6}/r2318_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2320_mangos.sql | 0 sql/updates/{ => 0.6}/r2321_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2323_mangos.sql | 0 sql/updates/{ => 0.6}/r2324_mangos.sql | 0 sql/updates/{ => 0.6}/r2325_mangos.sql | 0 sql/updates/{ => 0.6}/r2325_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2326_mangos.sql | 0 sql/updates/{ => 0.6}/r2328_mangos.sql | 0 sql/updates/{ => 0.6}/r2345_mangos.sql | 0 sql/updates/{ => 0.6}/r2347_mangos.sql | 0 sql/updates/{ => 0.6}/r2348_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2355_mangos.sql | 0 sql/updates/{ => 0.6}/r2357_mangos.sql | 0 sql/updates/{ => 0.6}/r2359_mangos.sql | 0 sql/updates/{ => 0.6}/r2359_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2360_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2361_mangos.sql | 0 sql/updates/{ => 0.6}/r2364_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2369_mangos.sql | 0 sql/updates/{ => 0.6}/r2370_mangos.sql | 0 sql/updates/{ => 0.6}/r2371_mangos.sql | 0 sql/updates/{ => 0.6}/r2372_mangos.sql | 0 sql/updates/{ => 0.6}/r2373_mangos.sql | 0 sql/updates/{ => 0.6}/r2374_mangos.sql | 0 sql/updates/{ => 0.6}/r2374_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2375_mangos.sql | 0 sql/updates/{ => 0.6}/r2383_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2385_mangos.sql | 0 sql/updates/{ => 0.6}/r2385_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2387_mangos.sql | 0 sql/updates/{ => 0.6}/r2397_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2399_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2400_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2409_mangos.sql | 0 sql/updates/{ => 0.6}/r2409_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2416_mangos.sql | 0 sql/updates/{ => 0.6}/r2422_mangos.sql | 0 sql/updates/{ => 0.6}/r2445_mangos.sql | 0 sql/updates/{ => 0.6}/r2446_mangos.sql | 0 sql/updates/{ => 0.6}/r2447_mangos.sql | 0 sql/updates/{ => 0.6}/r2447_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2448_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2450_mangos.sql | 0 sql/updates/{ => 0.6}/r2450_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2459_mangos.sql | 0 sql/updates/{ => 0.6}/r2461_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2462_mangos.sql | 0 sql/updates/{ => 0.6}/r2462_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2463_mangos.sql | 0 sql/updates/{ => 0.6}/r2472_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2479_mangos.sql | 0 sql/updates/{ => 0.6}/r2480_mangos.sql | 0 sql/updates/{ => 0.6}/r2481_mangos.sql | 0 sql/updates/{ => 0.6}/r2482_mangos.sql | 0 sql/updates/{ => 0.6}/r2484_mangos.sql | 0 sql/updates/{ => 0.6}/r2484_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2488_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2490_mangos.sql | 0 sql/updates/{ => 0.6}/r2490_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2491_mangos.sql | 0 sql/updates/{ => 0.6}/r2491_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2492_mangos.sql | 0 sql/updates/{ => 0.6}/r2493_mangos.sql | 0 sql/updates/{ => 0.6}/r2494_mangos.sql | 0 sql/updates/{ => 0.6}/r2495_mangos.sql | 0 sql/updates/{ => 0.6}/r2496_mangos.sql | 0 sql/updates/{ => 0.6}/r2497_mangos.sql | 0 sql/updates/{ => 0.6}/r2498_mangos.sql | 0 sql/updates/{ => 0.6}/r2499_mangos.sql | 0 sql/updates/{ => 0.6}/r2501_mangos.sql | 0 sql/updates/{ => 0.6}/r2502_mangos.sql | 0 sql/updates/{ => 0.6}/r2503_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2504_mangos.sql | 0 sql/updates/{ => 0.6}/r2509_mangos.sql | 0 sql/updates/{ => 0.6}/r2510_mangos.sql | 0 sql/updates/{ => 0.6}/r2511_mangos.sql | 0 sql/updates/{ => 0.6}/r2512_mangos.sql | 0 sql/updates/{ => 0.6}/r2514_mangos.sql | 0 sql/updates/{ => 0.6}/r2516_mangos.sql | 0 sql/updates/{ => 0.6}/r2518_mangos.sql | 0 sql/updates/{ => 0.6}/r2519_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2525_mangos.sql | 0 sql/updates/{ => 0.6}/r2528_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2532_mangos.sql | 0 sql/updates/{ => 0.6}/r2534_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2537_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2538_mangos.sql | 0 sql/updates/{ => 0.6}/r2539_mangos.sql | 0 sql/updates/{ => 0.6}/r2541_mangos.sql | 0 sql/updates/{ => 0.6}/r2541_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2542_mangos.sql | 0 sql/updates/{ => 0.6}/r2543_mangos.sql | 0 sql/updates/{ => 0.6}/r2544_mangos.sql | 0 sql/updates/{ => 0.6}/r2547_mangos.sql | 0 sql/updates/{ => 0.6}/r2548_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2552_mangos.sql | 0 sql/updates/{ => 0.6}/r2553_mangos.sql | 0 sql/updates/{ => 0.6}/r2553_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2556_mangos.sql | 0 sql/updates/{ => 0.6}/r2557_mangos.sql | 0 sql/updates/{ => 0.6}/r2559_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2561_mangos.sql | 0 sql/updates/{ => 0.6}/r2562_mangos.sql | 0 sql/updates/{ => 0.6}/r2563_mangos.sql | 0 sql/updates/{ => 0.6}/r2566_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2567_mangos.sql | 0 sql/updates/{ => 0.6}/r2567_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2568_mangos.sql | 0 sql/updates/{ => 0.6}/r2571_mangos.sql | 0 sql/updates/{ => 0.6}/r2573_mangos.sql | 0 sql/updates/{ => 0.6}/r2574_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2575_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2576_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2578_mangos.sql | 0 sql/updates/{ => 0.6}/r2580_mangos.sql | 0 sql/updates/{ => 0.6}/r2581_mangos.sql | 0 sql/updates/{ => 0.6}/r2582_mangos.sql | 0 sql/updates/{ => 0.6}/r2584_mangos.sql | 0 sql/updates/{ => 0.6}/r2584_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2585_mangos.sql | 0 sql/updates/{ => 0.6}/r2586_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2590_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2591_mangos.sql | 0 sql/updates/{ => 0.6}/r2595_mangos.sql | 0 sql/updates/{ => 0.6}/r2597_mangos.sql | 0 sql/updates/{ => 0.6}/r2597_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2598_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2601_mangos.sql | 0 sql/updates/{ => 0.6}/r2601_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2603_mangos.sql | 0 sql/updates/{ => 0.6}/r2604_mangos.sql | 0 sql/updates/{ => 0.6}/r2604_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2606_mangos.sql | 0 sql/updates/{ => 0.6}/r2606_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2608_mangos.sql | 0 sql/updates/{ => 0.6}/r2608_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2610_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2611_mangos.sql | 0 sql/updates/{ => 0.6}/r2611_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2612_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2615_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2616_mangos.sql | 0 sql/updates/{ => 0.6}/r2616_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2618_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2619_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2620_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2623_mangos.sql | 0 sql/updates/{ => 0.6}/r2625_mangos.sql | 0 sql/updates/{ => 0.6}/r2625_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2626_mangos.sql | 0 sql/updates/{ => 0.6}/r2626_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2630_mangos.sql | 0 sql/updates/{ => 0.6}/r2630_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2632_mangos.sql | 0 sql/updates/{ => 0.6}/r2635_mangos.sql | 0 sql/updates/{ => 0.6}/r2635_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2637_mangos.sql | 0 sql/updates/{ => 0.6}/r2638_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2641_mangos.sql | 0 sql/updates/{ => 0.6}/r2641_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2647_mangos.sql | 0 sql/updates/{ => 0.6}/r2648_mangos.sql | 0 sql/updates/{ => 0.6}/r2649_mangos.sql | 0 sql/updates/{ => 0.6}/r2649_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2650_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2651_mangos.sql | 0 sql/updates/{ => 0.6}/r2651_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2652_mangos.sql | 0 sql/updates/{ => 0.6}/r2652_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2653_mangos.sql | 0 sql/updates/{ => 0.6}/r2655_mangos.sql | 0 sql/updates/{ => 0.6}/r2656_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2657_mangos.sql | 0 sql/updates/{ => 0.6}/r2657_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2658_mangos.sql | 0 sql/updates/{ => 0.6}/r2658_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2659_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2661_mangos.sql | 0 sql/updates/{ => 0.6}/r2661_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2668_mangos.sql | 0 sql/updates/{ => 0.6}/r2669_mangos.sql | 0 sql/updates/{ => 0.6}/r2670_mangos.sql | 0 sql/updates/{ => 0.6}/r2671_mangos.sql | 0 sql/updates/{ => 0.6}/r2671_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2673_mangos.sql | 0 sql/updates/{ => 0.6}/r2673_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2674_mangos.sql | 0 sql/updates/{ => 0.6}/r2674_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2679_mangos.sql | 0 sql/updates/{ => 0.6}/r2683_mangos.sql | 0 sql/updates/{ => 0.6}/r2685_mangos.sql | 0 sql/updates/{ => 0.6}/r2687_mangos.sql | 0 sql/updates/{ => 0.6}/r2688_mangos.sql | 0 sql/updates/{ => 0.6}/r2689_mangos.sql | 0 sql/updates/{ => 0.6}/r2690_mangos.sql | 0 sql/updates/{ => 0.6}/r2692_mangos.sql | 0 sql/updates/{ => 0.6}/r2693_mangos.sql | 0 sql/updates/{ => 0.6}/r2695_mangos.sql | 0 sql/updates/{ => 0.6}/r2695_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2696_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2697_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2700_mangos.sql | 0 sql/updates/{ => 0.6}/r2701_mangos.sql | 0 sql/updates/{ => 0.6}/r2702_mangos.sql | 0 sql/updates/{ => 0.6}/r2702_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2703_mangos.sql | 0 sql/updates/{ => 0.6}/r2704_mangos.sql | 0 sql/updates/{ => 0.6}/r2704_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2706_mangos.sql | 0 sql/updates/{ => 0.6}/r2707_mangos.sql | 0 sql/updates/{ => 0.6}/r2708_mangos.sql | 0 sql/updates/{ => 0.6}/r2710_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2712_mangos.sql | 0 sql/updates/{ => 0.6}/r2718_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2720_mangos.sql | 0 sql/updates/{ => 0.6}/r2721_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2722_mangos.sql | 0 sql/updates/{ => 0.6}/r2722_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2730_mangos.sql | 0 sql/updates/{ => 0.6}/r2731_mangos.sql | 0 sql/updates/{ => 0.6}/r2731_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2734_mangos.sql | 0 sql/updates/{ => 0.6}/r2734_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2737_mangos.sql | 0 sql/updates/{ => 0.6}/r2740_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2742_mangos.sql | 0 sql/updates/{ => 0.6}/r2742_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2743_mangos.sql | 0 sql/updates/{ => 0.6}/r2743_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2745_mangos.sql | 0 sql/updates/{ => 0.6}/r2745_scriptdev2.sql | 0 sql/updates/{ => 0.6}/r2749_mangos.sql | 0 sql/updates/{ => 0.6}/r2752_mangos.sql | 0 561 files changed, 1026 insertions(+), 15 deletions(-) create mode 100644 docs/ChangeLog.html create mode 100644 docs/ChangeLog.txt rename sql/updates/{ => 0.6}/r1543_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r1544_mangos.sql (100%) rename sql/updates/{ => 0.6}/r1545_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r1548_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r1549_mangos.sql (100%) rename sql/updates/{ => 0.6}/r1549_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r1551_mangos.sql (100%) rename sql/updates/{ => 0.6}/r1554_mangos.sql (100%) rename sql/updates/{ => 0.6}/r1554_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r1555_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r1556_mangos.sql (100%) rename sql/updates/{ => 0.6}/r1557_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r1563_mangos.sql (100%) rename sql/updates/{ => 0.6}/r1567_mangos.sql (100%) rename sql/updates/{ => 0.6}/r1567_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r1570_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r1577_mangos.sql (100%) rename sql/updates/{ => 0.6}/r1577_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r1583_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r1584_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r1587_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r1589_mangos.sql (100%) rename sql/updates/{ => 0.6}/r1590_mangos.sql (100%) rename sql/updates/{ => 0.6}/r1591_mangos.sql (100%) rename sql/updates/{ => 0.6}/r1592_mangos.sql (100%) rename sql/updates/{ => 0.6}/r1593_mangos.sql (100%) rename sql/updates/{ => 0.6}/r1594_mangos.sql (100%) rename sql/updates/{ => 0.6}/r1595_mangos.sql (100%) rename sql/updates/{ => 0.6}/r1596_mangos.sql (100%) rename sql/updates/{ => 0.6}/r1599_mangos.sql (100%) rename sql/updates/{ => 0.6}/r1600_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r1602_mangos.sql (100%) rename sql/updates/{ => 0.6}/r1604_mangos.sql (100%) rename sql/updates/{ => 0.6}/r1605_mangos.sql (100%) rename sql/updates/{ => 0.6}/r1607_mangos.sql (100%) rename sql/updates/{ => 0.6}/r1608_mangos.sql (100%) rename sql/updates/{ => 0.6}/r1615_mangos.sql (100%) rename sql/updates/{ => 0.6}/r1615_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r1616_mangos.sql (100%) rename sql/updates/{ => 0.6}/r1617_mangos.sql (100%) rename sql/updates/{ => 0.6}/r1621_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r1622_mangos.sql (100%) rename sql/updates/{ => 0.6}/r1622_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r1624_mangos.sql (100%) rename sql/updates/{ => 0.6}/r1624_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r1627_mangos.sql (100%) rename sql/updates/{ => 0.6}/r1627_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r1629_mangos.sql (100%) rename sql/updates/{ => 0.6}/r1629_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r1632_mangos.sql (100%) rename sql/updates/{ => 0.6}/r1636_mangos.sql (100%) rename sql/updates/{ => 0.6}/r1637_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r1642_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r1644_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r1647_mangos.sql (100%) rename sql/updates/{ => 0.6}/r1647_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r1650_mangos.sql (100%) rename sql/updates/{ => 0.6}/r1651_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r1652_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r1653_mangos.sql (100%) rename sql/updates/{ => 0.6}/r1658_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r1660_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r1661_mangos.sql (100%) rename sql/updates/{ => 0.6}/r1662_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r1665_mangos.sql (100%) rename sql/updates/{ => 0.6}/r1667_mangos.sql (100%) rename sql/updates/{ => 0.6}/r1667_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r1668_mangos.sql (100%) rename sql/updates/{ => 0.6}/r1671_mangos.sql (100%) rename sql/updates/{ => 0.6}/r1671_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r1679_mangos.sql (100%) rename sql/updates/{ => 0.6}/r1680_mangos.sql (100%) rename sql/updates/{ => 0.6}/r1681_mangos.sql (100%) rename sql/updates/{ => 0.6}/r1683_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r1685_mangos.sql (100%) rename sql/updates/{ => 0.6}/r1685_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r1687_mangos.sql (100%) rename sql/updates/{ => 0.6}/r1691_mangos.sql (100%) rename sql/updates/{ => 0.6}/r1694_mangos.sql (100%) rename sql/updates/{ => 0.6}/r1698_mangos.sql (100%) rename sql/updates/{ => 0.6}/r1704_mangos.sql (100%) rename sql/updates/{ => 0.6}/r1705_mangos.sql (100%) rename sql/updates/{ => 0.6}/r1705_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r1706_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r1711_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r1715_mangos.sql (100%) rename sql/updates/{ => 0.6}/r1715_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r1720_mangos.sql (100%) rename sql/updates/{ => 0.6}/r1720_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r1726_mangos.sql (100%) rename sql/updates/{ => 0.6}/r1727_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r1728_mangos.sql (100%) rename sql/updates/{ => 0.6}/r1729_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r1734_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r1736_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r1737_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r1741_mangos.sql (100%) rename sql/updates/{ => 0.6}/r1750_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r1751_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r1752_mangos.sql (100%) rename sql/updates/{ => 0.6}/r1753_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r1754_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r1759_mangos.sql (100%) rename sql/updates/{ => 0.6}/r1763_mangos.sql (100%) rename sql/updates/{ => 0.6}/r1767_mangos.sql (100%) rename sql/updates/{ => 0.6}/r1771_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r1777_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r1780_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r1782_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r1783_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r1784_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r1785_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r1786_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r1789_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r1791_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r1797_mangos.sql (100%) rename sql/updates/{ => 0.6}/r1798_mangos.sql (100%) rename sql/updates/{ => 0.6}/r1800_mangos.sql (100%) rename sql/updates/{ => 0.6}/r1800_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r1807_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r1810_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r1813_mangos.sql (100%) rename sql/updates/{ => 0.6}/r1816_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r1818_mangos.sql (100%) rename sql/updates/{ => 0.6}/r1818_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r1819_mangos.sql (100%) rename sql/updates/{ => 0.6}/r1822_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r1824_mangos.sql (100%) rename sql/updates/{ => 0.6}/r1825_mangos.sql (100%) rename sql/updates/{ => 0.6}/r1825_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r1826_mangos.sql (100%) rename sql/updates/{ => 0.6}/r1826_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r1827_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r1828_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r1829_mangos.sql (100%) rename sql/updates/{ => 0.6}/r1830_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r1831_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r1836_mangos.sql (100%) rename sql/updates/{ => 0.6}/r1842_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r1843_mangos.sql (100%) rename sql/updates/{ => 0.6}/r1843_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r1844_mangos.sql (100%) rename sql/updates/{ => 0.6}/r1845_mangos.sql (100%) rename sql/updates/{ => 0.6}/r1845_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r1850_mangos.sql (100%) rename sql/updates/{ => 0.6}/r1850_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r1851_mangos.sql (100%) rename sql/updates/{ => 0.6}/r1852_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r1853_mangos.sql (100%) rename sql/updates/{ => 0.6}/r1855_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r1858_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r1859_mangos.sql (100%) rename sql/updates/{ => 0.6}/r1860_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r1862_mangos.sql (100%) rename sql/updates/{ => 0.6}/r1863_mangos.sql (100%) rename sql/updates/{ => 0.6}/r1864_mangos.sql (100%) rename sql/updates/{ => 0.6}/r1864_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r1865_mangos.sql (100%) rename sql/updates/{ => 0.6}/r1865_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r1866_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r1868_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r1869_mangos.sql (100%) rename sql/updates/{ => 0.6}/r1871_mangos.sql (100%) rename sql/updates/{ => 0.6}/r1875_mangos.sql (100%) rename sql/updates/{ => 0.6}/r1875_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r1876_mangos.sql (100%) rename sql/updates/{ => 0.6}/r1876_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r1878_mangos.sql (100%) rename sql/updates/{ => 0.6}/r1881_mangos.sql (100%) rename sql/updates/{ => 0.6}/r1882_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r1886_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r1888_mangos.sql (100%) rename sql/updates/{ => 0.6}/r1888_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r1889_mangos.sql (100%) rename sql/updates/{ => 0.6}/r1889_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r1890_mangos.sql (100%) rename sql/updates/{ => 0.6}/r1890_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r1891_mangos.sql (100%) rename sql/updates/{ => 0.6}/r1899_mangos.sql (100%) rename sql/updates/{ => 0.6}/r1899_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r1908_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r1913_mangos.sql (100%) rename sql/updates/{ => 0.6}/r1914_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r1918_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r1921_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r1924_mangos.sql (100%) rename sql/updates/{ => 0.6}/r1924_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r1936_mangos.sql (100%) rename sql/updates/{ => 0.6}/r1940_mangos.sql (100%) rename sql/updates/{ => 0.6}/r1946_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r1949_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r1951_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r1954_mangos.sql (100%) rename sql/updates/{ => 0.6}/r1962_mangos.sql (100%) rename sql/updates/{ => 0.6}/r1962_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r1963_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r1965_mangos.sql (100%) rename sql/updates/{ => 0.6}/r1965_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r1968_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r1972_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r1973_mangos.sql (100%) rename sql/updates/{ => 0.6}/r1974_mangos.sql (100%) rename sql/updates/{ => 0.6}/r1975_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r1979_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r1982_mangos.sql (100%) rename sql/updates/{ => 0.6}/r1982_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r1984_mangos.sql (100%) rename sql/updates/{ => 0.6}/r1984_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r1987_mangos.sql (100%) rename sql/updates/{ => 0.6}/r1990_mangos.sql (100%) rename sql/updates/{ => 0.6}/r1990_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r1992_mangos.sql (100%) rename sql/updates/{ => 0.6}/r1992_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r1993_mangos.sql (100%) rename sql/updates/{ => 0.6}/r1993_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2004_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2008_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2008_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2009_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2009_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2010_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2013_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2013_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2015_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2017_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2018_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2020_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2021_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2024_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2025_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2028_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2031_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2031_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2033_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2036_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2037_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2038_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2039_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2043_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2044_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2044_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2050_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2051_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2057_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2059_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2059_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2061_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2064_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2064_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2070_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2072_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2073_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2073_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2074_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2075_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2076_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2077_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2077_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2080_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2092_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2092_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2101_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2101_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2107_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2112_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2112_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2113_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2114_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2116_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2130_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2134_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2138_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2139_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2146_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2147_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2147_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2162_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2181_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2212_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2212_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2220_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2227_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2229_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2235_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2235_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2239_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2242_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2243_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2245_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2246_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2247_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2248_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2249_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2250_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2250_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2252_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2254_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2255_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2263_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2268_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2268_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2270_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2273_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2277_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2284_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2286_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2289_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2289_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2298_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2300_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2305_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2306_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2307_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2309_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2309_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2310_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2313_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2313_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2314_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2314_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2318_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2318_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2320_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2321_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2323_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2324_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2325_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2325_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2326_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2328_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2345_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2347_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2348_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2355_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2357_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2359_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2359_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2360_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2361_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2364_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2369_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2370_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2371_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2372_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2373_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2374_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2374_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2375_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2383_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2385_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2385_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2387_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2397_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2399_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2400_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2409_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2409_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2416_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2422_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2445_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2446_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2447_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2447_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2448_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2450_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2450_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2459_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2461_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2462_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2462_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2463_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2472_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2479_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2480_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2481_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2482_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2484_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2484_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2488_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2490_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2490_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2491_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2491_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2492_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2493_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2494_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2495_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2496_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2497_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2498_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2499_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2501_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2502_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2503_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2504_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2509_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2510_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2511_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2512_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2514_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2516_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2518_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2519_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2525_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2528_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2532_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2534_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2537_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2538_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2539_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2541_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2541_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2542_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2543_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2544_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2547_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2548_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2552_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2553_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2553_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2556_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2557_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2559_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2561_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2562_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2563_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2566_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2567_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2567_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2568_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2571_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2573_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2574_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2575_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2576_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2578_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2580_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2581_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2582_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2584_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2584_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2585_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2586_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2590_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2591_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2595_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2597_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2597_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2598_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2601_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2601_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2603_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2604_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2604_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2606_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2606_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2608_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2608_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2610_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2611_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2611_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2612_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2615_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2616_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2616_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2618_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2619_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2620_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2623_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2625_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2625_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2626_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2626_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2630_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2630_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2632_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2635_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2635_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2637_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2638_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2641_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2641_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2647_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2648_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2649_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2649_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2650_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2651_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2651_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2652_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2652_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2653_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2655_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2656_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2657_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2657_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2658_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2658_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2659_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2661_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2661_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2668_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2669_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2670_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2671_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2671_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2673_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2673_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2674_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2674_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2679_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2683_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2685_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2687_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2688_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2689_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2690_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2692_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2693_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2695_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2695_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2696_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2697_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2700_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2701_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2702_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2702_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2703_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2704_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2704_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2706_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2707_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2708_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2710_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2712_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2718_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2720_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2721_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2722_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2722_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2730_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2731_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2731_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2734_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2734_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2737_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2740_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2742_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2742_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2743_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2743_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2745_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2745_scriptdev2.sql (100%) rename sql/updates/{ => 0.6}/r2749_mangos.sql (100%) rename sql/updates/{ => 0.6}/r2752_mangos.sql (100%) diff --git a/docs/ChangeLog.html b/docs/ChangeLog.html new file mode 100644 index 000000000..41907f49e --- /dev/null +++ b/docs/ChangeLog.html @@ -0,0 +1,937 @@ + + + + + +ScriptDev2 Milestones + + + + + +
+
+
+ +

Supports:

+
+
+
+
+

1. Milestone ScriptDev2 - 0.6

+
+
+

1.1. General

+
    +
  • +

    +Added distinct script library support for all the server versions +

    +
  • +
  • +

    +Unified instance handling and added some generic patterns +

    +
  • +
  • +

    +Added support for spell scripts +

    +
  • +
  • +

    +Added support for world scripts for more complicated events +

    +
  • +
  • +

    +Codestyle cleanup on all scripts +

    +
  • +
  • +

    +Convert many old scripts to EventAI +

    +
  • +
  • +

    +Convert many old gossip scripts to DB-gossip system +

    +
  • +
  • +

    +Added script placeholders for future 4.x content +

    +
  • +
  • +

    +Implemented various missing quest scripts and similar events +

    +
  • +
+
+
+

1.2. WotLK content

+
    +
  • +

    +Added script content for the following dungeons: Azjol Nerub, Ahn-Kahet, Drak’tharon Keep, Gundrak, Halls of Stone, Oculus, Utgarde Keep, Utgarde Pinnacle, Violet Hold, Nexus +

    +
  • +
  • +

    +Finished raid script for Naxxramas and Onyxia +

    +
  • +
  • +

    +Added partial script content for the following: Eye of Eternity, Ruby Sanctum, Trial of the Crusader, Ulduar, Death Knight area quests. +

    +
  • +
  • +

    +Added some basic script support for all bosses in Icecrown Citadel +

    +
  • +
  • +

    +Implemented Year event boss - Apothecary Hummel +

    +
  • +
+
+
+

1.3. TBC content

+
    +
  • +

    +Cleanup and improve all the existing scripts by removing workarounds and adding missing content for all dungeons and raids. +

    +
  • +
  • +

    +Added script for the following dungeons or bosses: Arcatraz, Blood Furnace, Sunwell Plateau, A’lar, The Lurker Below, Malacras, Zul’jin. +

    +
  • +
  • +

    +Improve scripts for: Auchenai Crypts, Sethekk Halls, Shadow Labyrinth, Black Morass, Old Hillsbrad Foothills, Steamvault, Shattered Halls, Botanica, Mechanar, Karazhan, Black Temple, The Eye, Serperntshrine Cavern, Zul’Aman. +

    +
  • +
  • +

    +Properly downgraded Naxxramas and Onyxia for TBC and Classic versions +

    +
  • +
  • +

    +Implemented Year event boss - Coren Direbrew +

    +
  • +
+
+
+

1.4. Classic content

+
    +
  • +

    +Implemented epic quests script for the opening of Ahn’Qiraj and Onyxia events. +

    +
  • +
  • +

    +Cleanup and improve all the existing scripts by removing workarounds and adding missing content for all dungeons and raids. +

    +
  • +
  • +

    +Added or substantially improved script for the following dungeons: Blackrock Depths, Deathmines, Dire Maul, Gnomeregan, Razorfen Kraul, Shadowfang Keep, Sunken Temple, Wailing Caverns, Uldaman, Ruins of AQ +

    +
  • +
  • +

    +Improve script for the following dungeons: Blackrock Spire, Blackfathom Deeps, Marauudon, Scholomance, Stratholme, Blackwing Lair, Molten Core, Emerald Dragons, Temple of AQ, Zul’Gurub +

    +
  • +
  • +

    +Properly downgraded Lord Kazzak for Classic version +

    +
  • +
+
+

1.4.1. Statistics

+
    +
  • +

    +Total number of changes: over 1300 revisions (1300 commits) +

    +
  • +
  • +

    +Lots of bugs from forum and issues from github fixed +

    +
  • +
+
+
+
+
+
+

+ + + diff --git a/docs/ChangeLog.txt b/docs/ChangeLog.txt new file mode 100644 index 000000000..61c8b02a1 --- /dev/null +++ b/docs/ChangeLog.txt @@ -0,0 +1,49 @@ += ScriptDev2 Milestones = + +*Current Version: <>* + +*Supports:* + +* Classic (1.12.1), see https://github.com/scriptdev2/scriptdev2-classic +* TBC (2.4.3), see https://github.com/scriptdev2/scriptdev2-tbc +* WotLK (3.3.5a), see https://github.com/scriptdev2/scriptdev2 +* Cata (4.3.4), see https://github.com/scriptdev2/scriptdev2-cata + +[[currentMS]] +== Milestone ScriptDev2 - 0.6 == + +=== General === +* Added distinct script library support for all the server versions +* Unified instance handling and added some generic patterns +* Added support for spell scripts +* Added support for world scripts for more complicated events +* Codestyle cleanup on all scripts +* Convert many old scripts to EventAI +* Convert many old gossip scripts to DB-gossip system +* Added script placeholders for future 4.x content +* Implemented various missing quest scripts and similar events + +=== WotLK content === +* Added script content for the following dungeons: Azjol Nerub, Ahn-Kahet, Drak'tharon Keep, Gundrak, Halls of Stone, Oculus, Utgarde Keep, Utgarde Pinnacle, Violet Hold, Nexus +* Finished raid script for Naxxramas and Onyxia +* Added partial script content for the following: Eye of Eternity, Ruby Sanctum, Trial of the Crusader, Ulduar, Death Knight area quests. +* Added some basic script support for all bosses in Icecrown Citadel +* Implemented Year event boss - Apothecary Hummel + +=== TBC content === +* Cleanup and improve all the existing scripts by removing workarounds and adding missing content for all dungeons and raids. +* Added script for the following dungeons or bosses: Arcatraz, Blood Furnace, Sunwell Plateau, A'lar, The Lurker Below, Malacras, Zul'jin. +* Improve scripts for: Auchenai Crypts, Sethekk Halls, Shadow Labyrinth, Black Morass, Old Hillsbrad Foothills, Steamvault, Shattered Halls, Botanica, Mechanar, Karazhan, Black Temple, The Eye, Serperntshrine Cavern, Zul'Aman. +* Properly downgraded Naxxramas and Onyxia for TBC and Classic versions +* Implemented Year event boss - Coren Direbrew + +=== Classic content === +* Implemented epic quests script for the opening of Ahn'Qiraj and Onyxia events. +* Cleanup and improve all the existing scripts by removing workarounds and adding missing content for all dungeons and raids. +* Added or substantially improved script for the following dungeons: Blackrock Depths, Deathmines, Dire Maul, Gnomeregan, Razorfen Kraul, Shadowfang Keep, Sunken Temple, Wailing Caverns, Uldaman, Ruins of AQ +* Improve script for the following dungeons: Blackrock Spire, Blackfathom Deeps, Marauudon, Scholomance, Stratholme, Blackwing Lair, Molten Core, Emerald Dragons, Temple of AQ, Zul'Gurub +* Properly downgraded Lord Kazzak for Classic version + +==== Statistics ==== +* Total number of changes: over 1300 revisions (1300 commits) +* Lots of bugs from forum and issues from github fixed diff --git a/docs/ToDo.txt b/docs/ToDo.txt index 5df315da0..bae8bc7c3 100644 --- a/docs/ToDo.txt +++ b/docs/ToDo.txt @@ -1,14 +1,27 @@ ---- TO DO --- -Simple list of things we need to do. += ScriptDev2 TODO Points = ---- ScriptDev2 Framework --- -Move all text out of C++ code and into SD2 database. +== Cataclysm content == +* Start implementing 4.x scripts for dungeons and quests ---- Scripting with Priorities --- -1) Boss AI and Boss Event scripts -2) Specific NPC AI, Gossip, Quest, Event scripts -3) Spell and Item scripts +== WotLK content == +* Implement missing scripts for the Death Knigh area quests +* Implement script for Ruby Sanctum +* Finish script for Ulduar, Trial of the Crusader, Icecrown Citadel, Eye of Eternity and Obsidian Sanctum +* Implement dungeon scripts for Halls of Reflection, Trial of the Champion, Pit of Saron and Culling of Stratholme (requires core proper waipoint movement support) +* Finish dungeon scripts for Utgarde Pinnacle, Ahn'kahet and Azjol Nerub +* Implement Year event bosses - Ahune, Headless Horseman +* Implement various missing quest scripts ---- Core Problems --- +== TBC content == +* Various quests which still require script (examples: 5821, 5943, 9729, 9879, 9446, 10310, 10512, 10584, 11085, 10985) +* Karazhan - Missing scripts: Chess event +* Hyjal Summit - Optimize game event. +* Black Temple - Teron Gorefiend script improvement (requires core proper mind control support) +* Sunwell Plateau - Felmyst - phase II script missing -- Spell scripts are only scriptable within the core. Spell scripts should be done in SD2 since they are very specialized. \ No newline at end of file +== Classic content == +* Various quests which still require script (examples: 660, 667, 1222, 1270, 3367, 5721) +* Zul'farrak (requires core proper waipoint movement support). +* Blackwing Lair - Razorgore (requires core proper mind control support). +* Ruins of AQ - Add missing script parts for Buru and Ossirian +* Temple of AQ - Add missing script part for Viscidus diff --git a/docs/aaa_Overview.html b/docs/aaa_Overview.html index 65bf61b37..c8f68e400 100644 --- a/docs/aaa_Overview.html +++ b/docs/aaa_Overview.html @@ -751,7 +751,14 @@

2. Basic Installation instructions

- +

3. ScriptDev2 ChangeLog and TODO list

+
+

See Changelog for basic points reached with the last milestones

+

See TODO List for rough points that the SD2-Team wants to be adressed in the next milestones

+
+
+
+

Easy use of Git - Look here if you are new to Git

Normal use of Git - Look here if you want to do basic work with Git

@@ -759,14 +766,14 @@
-

4. Database content used with SD2

+

5. Database content used with SD2

Guide for SD2 SQL-Files - Look here for an overview how to manipulate the database content in SD2

Text-tables.txt - Manual like documentation for the tables `script_texts` and `custom_texts`

-

5. Old documentation files

+

6. Old documentation files

@@ -792,7 +799,7 @@

5. Old documentation files


diff --git a/docs/aaa_Overview.txt b/docs/aaa_Overview.txt index f7a5e1c2d..a9c618062 100644 --- a/docs/aaa_Overview.txt +++ b/docs/aaa_Overview.txt @@ -12,6 +12,11 @@ Basic Installation instructions See link:How_to_install.html[How to install] for basic instructions +ScriptDev2 ChangeLog and TODO list +---------------------------------- +See link:ChangeLog.html[Changelog] for basic points reached with the last milestones + +See link:ToDo.html[TODO List] for rough points that the SD2-Team wants to be adressed in the next milestones Various Guides related to Git ----------------------------- diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 0e7241406..1e3f9f449 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2754" + #define SD2_REVISION_NR "2755" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/updates/r1543_scriptdev2.sql b/sql/updates/0.6/r1543_scriptdev2.sql similarity index 100% rename from sql/updates/r1543_scriptdev2.sql rename to sql/updates/0.6/r1543_scriptdev2.sql diff --git a/sql/updates/r1544_mangos.sql b/sql/updates/0.6/r1544_mangos.sql similarity index 100% rename from sql/updates/r1544_mangos.sql rename to sql/updates/0.6/r1544_mangos.sql diff --git a/sql/updates/r1545_scriptdev2.sql b/sql/updates/0.6/r1545_scriptdev2.sql similarity index 100% rename from sql/updates/r1545_scriptdev2.sql rename to sql/updates/0.6/r1545_scriptdev2.sql diff --git a/sql/updates/r1548_scriptdev2.sql b/sql/updates/0.6/r1548_scriptdev2.sql similarity index 100% rename from sql/updates/r1548_scriptdev2.sql rename to sql/updates/0.6/r1548_scriptdev2.sql diff --git a/sql/updates/r1549_mangos.sql b/sql/updates/0.6/r1549_mangos.sql similarity index 100% rename from sql/updates/r1549_mangos.sql rename to sql/updates/0.6/r1549_mangos.sql diff --git a/sql/updates/r1549_scriptdev2.sql b/sql/updates/0.6/r1549_scriptdev2.sql similarity index 100% rename from sql/updates/r1549_scriptdev2.sql rename to sql/updates/0.6/r1549_scriptdev2.sql diff --git a/sql/updates/r1551_mangos.sql b/sql/updates/0.6/r1551_mangos.sql similarity index 100% rename from sql/updates/r1551_mangos.sql rename to sql/updates/0.6/r1551_mangos.sql diff --git a/sql/updates/r1554_mangos.sql b/sql/updates/0.6/r1554_mangos.sql similarity index 100% rename from sql/updates/r1554_mangos.sql rename to sql/updates/0.6/r1554_mangos.sql diff --git a/sql/updates/r1554_scriptdev2.sql b/sql/updates/0.6/r1554_scriptdev2.sql similarity index 100% rename from sql/updates/r1554_scriptdev2.sql rename to sql/updates/0.6/r1554_scriptdev2.sql diff --git a/sql/updates/r1555_scriptdev2.sql b/sql/updates/0.6/r1555_scriptdev2.sql similarity index 100% rename from sql/updates/r1555_scriptdev2.sql rename to sql/updates/0.6/r1555_scriptdev2.sql diff --git a/sql/updates/r1556_mangos.sql b/sql/updates/0.6/r1556_mangos.sql similarity index 100% rename from sql/updates/r1556_mangos.sql rename to sql/updates/0.6/r1556_mangos.sql diff --git a/sql/updates/r1557_scriptdev2.sql b/sql/updates/0.6/r1557_scriptdev2.sql similarity index 100% rename from sql/updates/r1557_scriptdev2.sql rename to sql/updates/0.6/r1557_scriptdev2.sql diff --git a/sql/updates/r1563_mangos.sql b/sql/updates/0.6/r1563_mangos.sql similarity index 100% rename from sql/updates/r1563_mangos.sql rename to sql/updates/0.6/r1563_mangos.sql diff --git a/sql/updates/r1567_mangos.sql b/sql/updates/0.6/r1567_mangos.sql similarity index 100% rename from sql/updates/r1567_mangos.sql rename to sql/updates/0.6/r1567_mangos.sql diff --git a/sql/updates/r1567_scriptdev2.sql b/sql/updates/0.6/r1567_scriptdev2.sql similarity index 100% rename from sql/updates/r1567_scriptdev2.sql rename to sql/updates/0.6/r1567_scriptdev2.sql diff --git a/sql/updates/r1570_scriptdev2.sql b/sql/updates/0.6/r1570_scriptdev2.sql similarity index 100% rename from sql/updates/r1570_scriptdev2.sql rename to sql/updates/0.6/r1570_scriptdev2.sql diff --git a/sql/updates/r1577_mangos.sql b/sql/updates/0.6/r1577_mangos.sql similarity index 100% rename from sql/updates/r1577_mangos.sql rename to sql/updates/0.6/r1577_mangos.sql diff --git a/sql/updates/r1577_scriptdev2.sql b/sql/updates/0.6/r1577_scriptdev2.sql similarity index 100% rename from sql/updates/r1577_scriptdev2.sql rename to sql/updates/0.6/r1577_scriptdev2.sql diff --git a/sql/updates/r1583_scriptdev2.sql b/sql/updates/0.6/r1583_scriptdev2.sql similarity index 100% rename from sql/updates/r1583_scriptdev2.sql rename to sql/updates/0.6/r1583_scriptdev2.sql diff --git a/sql/updates/r1584_scriptdev2.sql b/sql/updates/0.6/r1584_scriptdev2.sql similarity index 100% rename from sql/updates/r1584_scriptdev2.sql rename to sql/updates/0.6/r1584_scriptdev2.sql diff --git a/sql/updates/r1587_scriptdev2.sql b/sql/updates/0.6/r1587_scriptdev2.sql similarity index 100% rename from sql/updates/r1587_scriptdev2.sql rename to sql/updates/0.6/r1587_scriptdev2.sql diff --git a/sql/updates/r1589_mangos.sql b/sql/updates/0.6/r1589_mangos.sql similarity index 100% rename from sql/updates/r1589_mangos.sql rename to sql/updates/0.6/r1589_mangos.sql diff --git a/sql/updates/r1590_mangos.sql b/sql/updates/0.6/r1590_mangos.sql similarity index 100% rename from sql/updates/r1590_mangos.sql rename to sql/updates/0.6/r1590_mangos.sql diff --git a/sql/updates/r1591_mangos.sql b/sql/updates/0.6/r1591_mangos.sql similarity index 100% rename from sql/updates/r1591_mangos.sql rename to sql/updates/0.6/r1591_mangos.sql diff --git a/sql/updates/r1592_mangos.sql b/sql/updates/0.6/r1592_mangos.sql similarity index 100% rename from sql/updates/r1592_mangos.sql rename to sql/updates/0.6/r1592_mangos.sql diff --git a/sql/updates/r1593_mangos.sql b/sql/updates/0.6/r1593_mangos.sql similarity index 100% rename from sql/updates/r1593_mangos.sql rename to sql/updates/0.6/r1593_mangos.sql diff --git a/sql/updates/r1594_mangos.sql b/sql/updates/0.6/r1594_mangos.sql similarity index 100% rename from sql/updates/r1594_mangos.sql rename to sql/updates/0.6/r1594_mangos.sql diff --git a/sql/updates/r1595_mangos.sql b/sql/updates/0.6/r1595_mangos.sql similarity index 100% rename from sql/updates/r1595_mangos.sql rename to sql/updates/0.6/r1595_mangos.sql diff --git a/sql/updates/r1596_mangos.sql b/sql/updates/0.6/r1596_mangos.sql similarity index 100% rename from sql/updates/r1596_mangos.sql rename to sql/updates/0.6/r1596_mangos.sql diff --git a/sql/updates/r1599_mangos.sql b/sql/updates/0.6/r1599_mangos.sql similarity index 100% rename from sql/updates/r1599_mangos.sql rename to sql/updates/0.6/r1599_mangos.sql diff --git a/sql/updates/r1600_scriptdev2.sql b/sql/updates/0.6/r1600_scriptdev2.sql similarity index 100% rename from sql/updates/r1600_scriptdev2.sql rename to sql/updates/0.6/r1600_scriptdev2.sql diff --git a/sql/updates/r1602_mangos.sql b/sql/updates/0.6/r1602_mangos.sql similarity index 100% rename from sql/updates/r1602_mangos.sql rename to sql/updates/0.6/r1602_mangos.sql diff --git a/sql/updates/r1604_mangos.sql b/sql/updates/0.6/r1604_mangos.sql similarity index 100% rename from sql/updates/r1604_mangos.sql rename to sql/updates/0.6/r1604_mangos.sql diff --git a/sql/updates/r1605_mangos.sql b/sql/updates/0.6/r1605_mangos.sql similarity index 100% rename from sql/updates/r1605_mangos.sql rename to sql/updates/0.6/r1605_mangos.sql diff --git a/sql/updates/r1607_mangos.sql b/sql/updates/0.6/r1607_mangos.sql similarity index 100% rename from sql/updates/r1607_mangos.sql rename to sql/updates/0.6/r1607_mangos.sql diff --git a/sql/updates/r1608_mangos.sql b/sql/updates/0.6/r1608_mangos.sql similarity index 100% rename from sql/updates/r1608_mangos.sql rename to sql/updates/0.6/r1608_mangos.sql diff --git a/sql/updates/r1615_mangos.sql b/sql/updates/0.6/r1615_mangos.sql similarity index 100% rename from sql/updates/r1615_mangos.sql rename to sql/updates/0.6/r1615_mangos.sql diff --git a/sql/updates/r1615_scriptdev2.sql b/sql/updates/0.6/r1615_scriptdev2.sql similarity index 100% rename from sql/updates/r1615_scriptdev2.sql rename to sql/updates/0.6/r1615_scriptdev2.sql diff --git a/sql/updates/r1616_mangos.sql b/sql/updates/0.6/r1616_mangos.sql similarity index 100% rename from sql/updates/r1616_mangos.sql rename to sql/updates/0.6/r1616_mangos.sql diff --git a/sql/updates/r1617_mangos.sql b/sql/updates/0.6/r1617_mangos.sql similarity index 100% rename from sql/updates/r1617_mangos.sql rename to sql/updates/0.6/r1617_mangos.sql diff --git a/sql/updates/r1621_scriptdev2.sql b/sql/updates/0.6/r1621_scriptdev2.sql similarity index 100% rename from sql/updates/r1621_scriptdev2.sql rename to sql/updates/0.6/r1621_scriptdev2.sql diff --git a/sql/updates/r1622_mangos.sql b/sql/updates/0.6/r1622_mangos.sql similarity index 100% rename from sql/updates/r1622_mangos.sql rename to sql/updates/0.6/r1622_mangos.sql diff --git a/sql/updates/r1622_scriptdev2.sql b/sql/updates/0.6/r1622_scriptdev2.sql similarity index 100% rename from sql/updates/r1622_scriptdev2.sql rename to sql/updates/0.6/r1622_scriptdev2.sql diff --git a/sql/updates/r1624_mangos.sql b/sql/updates/0.6/r1624_mangos.sql similarity index 100% rename from sql/updates/r1624_mangos.sql rename to sql/updates/0.6/r1624_mangos.sql diff --git a/sql/updates/r1624_scriptdev2.sql b/sql/updates/0.6/r1624_scriptdev2.sql similarity index 100% rename from sql/updates/r1624_scriptdev2.sql rename to sql/updates/0.6/r1624_scriptdev2.sql diff --git a/sql/updates/r1627_mangos.sql b/sql/updates/0.6/r1627_mangos.sql similarity index 100% rename from sql/updates/r1627_mangos.sql rename to sql/updates/0.6/r1627_mangos.sql diff --git a/sql/updates/r1627_scriptdev2.sql b/sql/updates/0.6/r1627_scriptdev2.sql similarity index 100% rename from sql/updates/r1627_scriptdev2.sql rename to sql/updates/0.6/r1627_scriptdev2.sql diff --git a/sql/updates/r1629_mangos.sql b/sql/updates/0.6/r1629_mangos.sql similarity index 100% rename from sql/updates/r1629_mangos.sql rename to sql/updates/0.6/r1629_mangos.sql diff --git a/sql/updates/r1629_scriptdev2.sql b/sql/updates/0.6/r1629_scriptdev2.sql similarity index 100% rename from sql/updates/r1629_scriptdev2.sql rename to sql/updates/0.6/r1629_scriptdev2.sql diff --git a/sql/updates/r1632_mangos.sql b/sql/updates/0.6/r1632_mangos.sql similarity index 100% rename from sql/updates/r1632_mangos.sql rename to sql/updates/0.6/r1632_mangos.sql diff --git a/sql/updates/r1636_mangos.sql b/sql/updates/0.6/r1636_mangos.sql similarity index 100% rename from sql/updates/r1636_mangos.sql rename to sql/updates/0.6/r1636_mangos.sql diff --git a/sql/updates/r1637_scriptdev2.sql b/sql/updates/0.6/r1637_scriptdev2.sql similarity index 100% rename from sql/updates/r1637_scriptdev2.sql rename to sql/updates/0.6/r1637_scriptdev2.sql diff --git a/sql/updates/r1642_scriptdev2.sql b/sql/updates/0.6/r1642_scriptdev2.sql similarity index 100% rename from sql/updates/r1642_scriptdev2.sql rename to sql/updates/0.6/r1642_scriptdev2.sql diff --git a/sql/updates/r1644_scriptdev2.sql b/sql/updates/0.6/r1644_scriptdev2.sql similarity index 100% rename from sql/updates/r1644_scriptdev2.sql rename to sql/updates/0.6/r1644_scriptdev2.sql diff --git a/sql/updates/r1647_mangos.sql b/sql/updates/0.6/r1647_mangos.sql similarity index 100% rename from sql/updates/r1647_mangos.sql rename to sql/updates/0.6/r1647_mangos.sql diff --git a/sql/updates/r1647_scriptdev2.sql b/sql/updates/0.6/r1647_scriptdev2.sql similarity index 100% rename from sql/updates/r1647_scriptdev2.sql rename to sql/updates/0.6/r1647_scriptdev2.sql diff --git a/sql/updates/r1650_mangos.sql b/sql/updates/0.6/r1650_mangos.sql similarity index 100% rename from sql/updates/r1650_mangos.sql rename to sql/updates/0.6/r1650_mangos.sql diff --git a/sql/updates/r1651_scriptdev2.sql b/sql/updates/0.6/r1651_scriptdev2.sql similarity index 100% rename from sql/updates/r1651_scriptdev2.sql rename to sql/updates/0.6/r1651_scriptdev2.sql diff --git a/sql/updates/r1652_scriptdev2.sql b/sql/updates/0.6/r1652_scriptdev2.sql similarity index 100% rename from sql/updates/r1652_scriptdev2.sql rename to sql/updates/0.6/r1652_scriptdev2.sql diff --git a/sql/updates/r1653_mangos.sql b/sql/updates/0.6/r1653_mangos.sql similarity index 100% rename from sql/updates/r1653_mangos.sql rename to sql/updates/0.6/r1653_mangos.sql diff --git a/sql/updates/r1658_scriptdev2.sql b/sql/updates/0.6/r1658_scriptdev2.sql similarity index 100% rename from sql/updates/r1658_scriptdev2.sql rename to sql/updates/0.6/r1658_scriptdev2.sql diff --git a/sql/updates/r1660_scriptdev2.sql b/sql/updates/0.6/r1660_scriptdev2.sql similarity index 100% rename from sql/updates/r1660_scriptdev2.sql rename to sql/updates/0.6/r1660_scriptdev2.sql diff --git a/sql/updates/r1661_mangos.sql b/sql/updates/0.6/r1661_mangos.sql similarity index 100% rename from sql/updates/r1661_mangos.sql rename to sql/updates/0.6/r1661_mangos.sql diff --git a/sql/updates/r1662_scriptdev2.sql b/sql/updates/0.6/r1662_scriptdev2.sql similarity index 100% rename from sql/updates/r1662_scriptdev2.sql rename to sql/updates/0.6/r1662_scriptdev2.sql diff --git a/sql/updates/r1665_mangos.sql b/sql/updates/0.6/r1665_mangos.sql similarity index 100% rename from sql/updates/r1665_mangos.sql rename to sql/updates/0.6/r1665_mangos.sql diff --git a/sql/updates/r1667_mangos.sql b/sql/updates/0.6/r1667_mangos.sql similarity index 100% rename from sql/updates/r1667_mangos.sql rename to sql/updates/0.6/r1667_mangos.sql diff --git a/sql/updates/r1667_scriptdev2.sql b/sql/updates/0.6/r1667_scriptdev2.sql similarity index 100% rename from sql/updates/r1667_scriptdev2.sql rename to sql/updates/0.6/r1667_scriptdev2.sql diff --git a/sql/updates/r1668_mangos.sql b/sql/updates/0.6/r1668_mangos.sql similarity index 100% rename from sql/updates/r1668_mangos.sql rename to sql/updates/0.6/r1668_mangos.sql diff --git a/sql/updates/r1671_mangos.sql b/sql/updates/0.6/r1671_mangos.sql similarity index 100% rename from sql/updates/r1671_mangos.sql rename to sql/updates/0.6/r1671_mangos.sql diff --git a/sql/updates/r1671_scriptdev2.sql b/sql/updates/0.6/r1671_scriptdev2.sql similarity index 100% rename from sql/updates/r1671_scriptdev2.sql rename to sql/updates/0.6/r1671_scriptdev2.sql diff --git a/sql/updates/r1679_mangos.sql b/sql/updates/0.6/r1679_mangos.sql similarity index 100% rename from sql/updates/r1679_mangos.sql rename to sql/updates/0.6/r1679_mangos.sql diff --git a/sql/updates/r1680_mangos.sql b/sql/updates/0.6/r1680_mangos.sql similarity index 100% rename from sql/updates/r1680_mangos.sql rename to sql/updates/0.6/r1680_mangos.sql diff --git a/sql/updates/r1681_mangos.sql b/sql/updates/0.6/r1681_mangos.sql similarity index 100% rename from sql/updates/r1681_mangos.sql rename to sql/updates/0.6/r1681_mangos.sql diff --git a/sql/updates/r1683_scriptdev2.sql b/sql/updates/0.6/r1683_scriptdev2.sql similarity index 100% rename from sql/updates/r1683_scriptdev2.sql rename to sql/updates/0.6/r1683_scriptdev2.sql diff --git a/sql/updates/r1685_mangos.sql b/sql/updates/0.6/r1685_mangos.sql similarity index 100% rename from sql/updates/r1685_mangos.sql rename to sql/updates/0.6/r1685_mangos.sql diff --git a/sql/updates/r1685_scriptdev2.sql b/sql/updates/0.6/r1685_scriptdev2.sql similarity index 100% rename from sql/updates/r1685_scriptdev2.sql rename to sql/updates/0.6/r1685_scriptdev2.sql diff --git a/sql/updates/r1687_mangos.sql b/sql/updates/0.6/r1687_mangos.sql similarity index 100% rename from sql/updates/r1687_mangos.sql rename to sql/updates/0.6/r1687_mangos.sql diff --git a/sql/updates/r1691_mangos.sql b/sql/updates/0.6/r1691_mangos.sql similarity index 100% rename from sql/updates/r1691_mangos.sql rename to sql/updates/0.6/r1691_mangos.sql diff --git a/sql/updates/r1694_mangos.sql b/sql/updates/0.6/r1694_mangos.sql similarity index 100% rename from sql/updates/r1694_mangos.sql rename to sql/updates/0.6/r1694_mangos.sql diff --git a/sql/updates/r1698_mangos.sql b/sql/updates/0.6/r1698_mangos.sql similarity index 100% rename from sql/updates/r1698_mangos.sql rename to sql/updates/0.6/r1698_mangos.sql diff --git a/sql/updates/r1704_mangos.sql b/sql/updates/0.6/r1704_mangos.sql similarity index 100% rename from sql/updates/r1704_mangos.sql rename to sql/updates/0.6/r1704_mangos.sql diff --git a/sql/updates/r1705_mangos.sql b/sql/updates/0.6/r1705_mangos.sql similarity index 100% rename from sql/updates/r1705_mangos.sql rename to sql/updates/0.6/r1705_mangos.sql diff --git a/sql/updates/r1705_scriptdev2.sql b/sql/updates/0.6/r1705_scriptdev2.sql similarity index 100% rename from sql/updates/r1705_scriptdev2.sql rename to sql/updates/0.6/r1705_scriptdev2.sql diff --git a/sql/updates/r1706_scriptdev2.sql b/sql/updates/0.6/r1706_scriptdev2.sql similarity index 100% rename from sql/updates/r1706_scriptdev2.sql rename to sql/updates/0.6/r1706_scriptdev2.sql diff --git a/sql/updates/r1711_scriptdev2.sql b/sql/updates/0.6/r1711_scriptdev2.sql similarity index 100% rename from sql/updates/r1711_scriptdev2.sql rename to sql/updates/0.6/r1711_scriptdev2.sql diff --git a/sql/updates/r1715_mangos.sql b/sql/updates/0.6/r1715_mangos.sql similarity index 100% rename from sql/updates/r1715_mangos.sql rename to sql/updates/0.6/r1715_mangos.sql diff --git a/sql/updates/r1715_scriptdev2.sql b/sql/updates/0.6/r1715_scriptdev2.sql similarity index 100% rename from sql/updates/r1715_scriptdev2.sql rename to sql/updates/0.6/r1715_scriptdev2.sql diff --git a/sql/updates/r1720_mangos.sql b/sql/updates/0.6/r1720_mangos.sql similarity index 100% rename from sql/updates/r1720_mangos.sql rename to sql/updates/0.6/r1720_mangos.sql diff --git a/sql/updates/r1720_scriptdev2.sql b/sql/updates/0.6/r1720_scriptdev2.sql similarity index 100% rename from sql/updates/r1720_scriptdev2.sql rename to sql/updates/0.6/r1720_scriptdev2.sql diff --git a/sql/updates/r1726_mangos.sql b/sql/updates/0.6/r1726_mangos.sql similarity index 100% rename from sql/updates/r1726_mangos.sql rename to sql/updates/0.6/r1726_mangos.sql diff --git a/sql/updates/r1727_scriptdev2.sql b/sql/updates/0.6/r1727_scriptdev2.sql similarity index 100% rename from sql/updates/r1727_scriptdev2.sql rename to sql/updates/0.6/r1727_scriptdev2.sql diff --git a/sql/updates/r1728_mangos.sql b/sql/updates/0.6/r1728_mangos.sql similarity index 100% rename from sql/updates/r1728_mangos.sql rename to sql/updates/0.6/r1728_mangos.sql diff --git a/sql/updates/r1729_scriptdev2.sql b/sql/updates/0.6/r1729_scriptdev2.sql similarity index 100% rename from sql/updates/r1729_scriptdev2.sql rename to sql/updates/0.6/r1729_scriptdev2.sql diff --git a/sql/updates/r1734_scriptdev2.sql b/sql/updates/0.6/r1734_scriptdev2.sql similarity index 100% rename from sql/updates/r1734_scriptdev2.sql rename to sql/updates/0.6/r1734_scriptdev2.sql diff --git a/sql/updates/r1736_scriptdev2.sql b/sql/updates/0.6/r1736_scriptdev2.sql similarity index 100% rename from sql/updates/r1736_scriptdev2.sql rename to sql/updates/0.6/r1736_scriptdev2.sql diff --git a/sql/updates/r1737_scriptdev2.sql b/sql/updates/0.6/r1737_scriptdev2.sql similarity index 100% rename from sql/updates/r1737_scriptdev2.sql rename to sql/updates/0.6/r1737_scriptdev2.sql diff --git a/sql/updates/r1741_mangos.sql b/sql/updates/0.6/r1741_mangos.sql similarity index 100% rename from sql/updates/r1741_mangos.sql rename to sql/updates/0.6/r1741_mangos.sql diff --git a/sql/updates/r1750_scriptdev2.sql b/sql/updates/0.6/r1750_scriptdev2.sql similarity index 100% rename from sql/updates/r1750_scriptdev2.sql rename to sql/updates/0.6/r1750_scriptdev2.sql diff --git a/sql/updates/r1751_scriptdev2.sql b/sql/updates/0.6/r1751_scriptdev2.sql similarity index 100% rename from sql/updates/r1751_scriptdev2.sql rename to sql/updates/0.6/r1751_scriptdev2.sql diff --git a/sql/updates/r1752_mangos.sql b/sql/updates/0.6/r1752_mangos.sql similarity index 100% rename from sql/updates/r1752_mangos.sql rename to sql/updates/0.6/r1752_mangos.sql diff --git a/sql/updates/r1753_scriptdev2.sql b/sql/updates/0.6/r1753_scriptdev2.sql similarity index 100% rename from sql/updates/r1753_scriptdev2.sql rename to sql/updates/0.6/r1753_scriptdev2.sql diff --git a/sql/updates/r1754_scriptdev2.sql b/sql/updates/0.6/r1754_scriptdev2.sql similarity index 100% rename from sql/updates/r1754_scriptdev2.sql rename to sql/updates/0.6/r1754_scriptdev2.sql diff --git a/sql/updates/r1759_mangos.sql b/sql/updates/0.6/r1759_mangos.sql similarity index 100% rename from sql/updates/r1759_mangos.sql rename to sql/updates/0.6/r1759_mangos.sql diff --git a/sql/updates/r1763_mangos.sql b/sql/updates/0.6/r1763_mangos.sql similarity index 100% rename from sql/updates/r1763_mangos.sql rename to sql/updates/0.6/r1763_mangos.sql diff --git a/sql/updates/r1767_mangos.sql b/sql/updates/0.6/r1767_mangos.sql similarity index 100% rename from sql/updates/r1767_mangos.sql rename to sql/updates/0.6/r1767_mangos.sql diff --git a/sql/updates/r1771_scriptdev2.sql b/sql/updates/0.6/r1771_scriptdev2.sql similarity index 100% rename from sql/updates/r1771_scriptdev2.sql rename to sql/updates/0.6/r1771_scriptdev2.sql diff --git a/sql/updates/r1777_scriptdev2.sql b/sql/updates/0.6/r1777_scriptdev2.sql similarity index 100% rename from sql/updates/r1777_scriptdev2.sql rename to sql/updates/0.6/r1777_scriptdev2.sql diff --git a/sql/updates/r1780_scriptdev2.sql b/sql/updates/0.6/r1780_scriptdev2.sql similarity index 100% rename from sql/updates/r1780_scriptdev2.sql rename to sql/updates/0.6/r1780_scriptdev2.sql diff --git a/sql/updates/r1782_scriptdev2.sql b/sql/updates/0.6/r1782_scriptdev2.sql similarity index 100% rename from sql/updates/r1782_scriptdev2.sql rename to sql/updates/0.6/r1782_scriptdev2.sql diff --git a/sql/updates/r1783_scriptdev2.sql b/sql/updates/0.6/r1783_scriptdev2.sql similarity index 100% rename from sql/updates/r1783_scriptdev2.sql rename to sql/updates/0.6/r1783_scriptdev2.sql diff --git a/sql/updates/r1784_scriptdev2.sql b/sql/updates/0.6/r1784_scriptdev2.sql similarity index 100% rename from sql/updates/r1784_scriptdev2.sql rename to sql/updates/0.6/r1784_scriptdev2.sql diff --git a/sql/updates/r1785_scriptdev2.sql b/sql/updates/0.6/r1785_scriptdev2.sql similarity index 100% rename from sql/updates/r1785_scriptdev2.sql rename to sql/updates/0.6/r1785_scriptdev2.sql diff --git a/sql/updates/r1786_scriptdev2.sql b/sql/updates/0.6/r1786_scriptdev2.sql similarity index 100% rename from sql/updates/r1786_scriptdev2.sql rename to sql/updates/0.6/r1786_scriptdev2.sql diff --git a/sql/updates/r1789_scriptdev2.sql b/sql/updates/0.6/r1789_scriptdev2.sql similarity index 100% rename from sql/updates/r1789_scriptdev2.sql rename to sql/updates/0.6/r1789_scriptdev2.sql diff --git a/sql/updates/r1791_scriptdev2.sql b/sql/updates/0.6/r1791_scriptdev2.sql similarity index 100% rename from sql/updates/r1791_scriptdev2.sql rename to sql/updates/0.6/r1791_scriptdev2.sql diff --git a/sql/updates/r1797_mangos.sql b/sql/updates/0.6/r1797_mangos.sql similarity index 100% rename from sql/updates/r1797_mangos.sql rename to sql/updates/0.6/r1797_mangos.sql diff --git a/sql/updates/r1798_mangos.sql b/sql/updates/0.6/r1798_mangos.sql similarity index 100% rename from sql/updates/r1798_mangos.sql rename to sql/updates/0.6/r1798_mangos.sql diff --git a/sql/updates/r1800_mangos.sql b/sql/updates/0.6/r1800_mangos.sql similarity index 100% rename from sql/updates/r1800_mangos.sql rename to sql/updates/0.6/r1800_mangos.sql diff --git a/sql/updates/r1800_scriptdev2.sql b/sql/updates/0.6/r1800_scriptdev2.sql similarity index 100% rename from sql/updates/r1800_scriptdev2.sql rename to sql/updates/0.6/r1800_scriptdev2.sql diff --git a/sql/updates/r1807_scriptdev2.sql b/sql/updates/0.6/r1807_scriptdev2.sql similarity index 100% rename from sql/updates/r1807_scriptdev2.sql rename to sql/updates/0.6/r1807_scriptdev2.sql diff --git a/sql/updates/r1810_scriptdev2.sql b/sql/updates/0.6/r1810_scriptdev2.sql similarity index 100% rename from sql/updates/r1810_scriptdev2.sql rename to sql/updates/0.6/r1810_scriptdev2.sql diff --git a/sql/updates/r1813_mangos.sql b/sql/updates/0.6/r1813_mangos.sql similarity index 100% rename from sql/updates/r1813_mangos.sql rename to sql/updates/0.6/r1813_mangos.sql diff --git a/sql/updates/r1816_scriptdev2.sql b/sql/updates/0.6/r1816_scriptdev2.sql similarity index 100% rename from sql/updates/r1816_scriptdev2.sql rename to sql/updates/0.6/r1816_scriptdev2.sql diff --git a/sql/updates/r1818_mangos.sql b/sql/updates/0.6/r1818_mangos.sql similarity index 100% rename from sql/updates/r1818_mangos.sql rename to sql/updates/0.6/r1818_mangos.sql diff --git a/sql/updates/r1818_scriptdev2.sql b/sql/updates/0.6/r1818_scriptdev2.sql similarity index 100% rename from sql/updates/r1818_scriptdev2.sql rename to sql/updates/0.6/r1818_scriptdev2.sql diff --git a/sql/updates/r1819_mangos.sql b/sql/updates/0.6/r1819_mangos.sql similarity index 100% rename from sql/updates/r1819_mangos.sql rename to sql/updates/0.6/r1819_mangos.sql diff --git a/sql/updates/r1822_scriptdev2.sql b/sql/updates/0.6/r1822_scriptdev2.sql similarity index 100% rename from sql/updates/r1822_scriptdev2.sql rename to sql/updates/0.6/r1822_scriptdev2.sql diff --git a/sql/updates/r1824_mangos.sql b/sql/updates/0.6/r1824_mangos.sql similarity index 100% rename from sql/updates/r1824_mangos.sql rename to sql/updates/0.6/r1824_mangos.sql diff --git a/sql/updates/r1825_mangos.sql b/sql/updates/0.6/r1825_mangos.sql similarity index 100% rename from sql/updates/r1825_mangos.sql rename to sql/updates/0.6/r1825_mangos.sql diff --git a/sql/updates/r1825_scriptdev2.sql b/sql/updates/0.6/r1825_scriptdev2.sql similarity index 100% rename from sql/updates/r1825_scriptdev2.sql rename to sql/updates/0.6/r1825_scriptdev2.sql diff --git a/sql/updates/r1826_mangos.sql b/sql/updates/0.6/r1826_mangos.sql similarity index 100% rename from sql/updates/r1826_mangos.sql rename to sql/updates/0.6/r1826_mangos.sql diff --git a/sql/updates/r1826_scriptdev2.sql b/sql/updates/0.6/r1826_scriptdev2.sql similarity index 100% rename from sql/updates/r1826_scriptdev2.sql rename to sql/updates/0.6/r1826_scriptdev2.sql diff --git a/sql/updates/r1827_scriptdev2.sql b/sql/updates/0.6/r1827_scriptdev2.sql similarity index 100% rename from sql/updates/r1827_scriptdev2.sql rename to sql/updates/0.6/r1827_scriptdev2.sql diff --git a/sql/updates/r1828_scriptdev2.sql b/sql/updates/0.6/r1828_scriptdev2.sql similarity index 100% rename from sql/updates/r1828_scriptdev2.sql rename to sql/updates/0.6/r1828_scriptdev2.sql diff --git a/sql/updates/r1829_mangos.sql b/sql/updates/0.6/r1829_mangos.sql similarity index 100% rename from sql/updates/r1829_mangos.sql rename to sql/updates/0.6/r1829_mangos.sql diff --git a/sql/updates/r1830_scriptdev2.sql b/sql/updates/0.6/r1830_scriptdev2.sql similarity index 100% rename from sql/updates/r1830_scriptdev2.sql rename to sql/updates/0.6/r1830_scriptdev2.sql diff --git a/sql/updates/r1831_scriptdev2.sql b/sql/updates/0.6/r1831_scriptdev2.sql similarity index 100% rename from sql/updates/r1831_scriptdev2.sql rename to sql/updates/0.6/r1831_scriptdev2.sql diff --git a/sql/updates/r1836_mangos.sql b/sql/updates/0.6/r1836_mangos.sql similarity index 100% rename from sql/updates/r1836_mangos.sql rename to sql/updates/0.6/r1836_mangos.sql diff --git a/sql/updates/r1842_scriptdev2.sql b/sql/updates/0.6/r1842_scriptdev2.sql similarity index 100% rename from sql/updates/r1842_scriptdev2.sql rename to sql/updates/0.6/r1842_scriptdev2.sql diff --git a/sql/updates/r1843_mangos.sql b/sql/updates/0.6/r1843_mangos.sql similarity index 100% rename from sql/updates/r1843_mangos.sql rename to sql/updates/0.6/r1843_mangos.sql diff --git a/sql/updates/r1843_scriptdev2.sql b/sql/updates/0.6/r1843_scriptdev2.sql similarity index 100% rename from sql/updates/r1843_scriptdev2.sql rename to sql/updates/0.6/r1843_scriptdev2.sql diff --git a/sql/updates/r1844_mangos.sql b/sql/updates/0.6/r1844_mangos.sql similarity index 100% rename from sql/updates/r1844_mangos.sql rename to sql/updates/0.6/r1844_mangos.sql diff --git a/sql/updates/r1845_mangos.sql b/sql/updates/0.6/r1845_mangos.sql similarity index 100% rename from sql/updates/r1845_mangos.sql rename to sql/updates/0.6/r1845_mangos.sql diff --git a/sql/updates/r1845_scriptdev2.sql b/sql/updates/0.6/r1845_scriptdev2.sql similarity index 100% rename from sql/updates/r1845_scriptdev2.sql rename to sql/updates/0.6/r1845_scriptdev2.sql diff --git a/sql/updates/r1850_mangos.sql b/sql/updates/0.6/r1850_mangos.sql similarity index 100% rename from sql/updates/r1850_mangos.sql rename to sql/updates/0.6/r1850_mangos.sql diff --git a/sql/updates/r1850_scriptdev2.sql b/sql/updates/0.6/r1850_scriptdev2.sql similarity index 100% rename from sql/updates/r1850_scriptdev2.sql rename to sql/updates/0.6/r1850_scriptdev2.sql diff --git a/sql/updates/r1851_mangos.sql b/sql/updates/0.6/r1851_mangos.sql similarity index 100% rename from sql/updates/r1851_mangos.sql rename to sql/updates/0.6/r1851_mangos.sql diff --git a/sql/updates/r1852_scriptdev2.sql b/sql/updates/0.6/r1852_scriptdev2.sql similarity index 100% rename from sql/updates/r1852_scriptdev2.sql rename to sql/updates/0.6/r1852_scriptdev2.sql diff --git a/sql/updates/r1853_mangos.sql b/sql/updates/0.6/r1853_mangos.sql similarity index 100% rename from sql/updates/r1853_mangos.sql rename to sql/updates/0.6/r1853_mangos.sql diff --git a/sql/updates/r1855_scriptdev2.sql b/sql/updates/0.6/r1855_scriptdev2.sql similarity index 100% rename from sql/updates/r1855_scriptdev2.sql rename to sql/updates/0.6/r1855_scriptdev2.sql diff --git a/sql/updates/r1858_scriptdev2.sql b/sql/updates/0.6/r1858_scriptdev2.sql similarity index 100% rename from sql/updates/r1858_scriptdev2.sql rename to sql/updates/0.6/r1858_scriptdev2.sql diff --git a/sql/updates/r1859_mangos.sql b/sql/updates/0.6/r1859_mangos.sql similarity index 100% rename from sql/updates/r1859_mangos.sql rename to sql/updates/0.6/r1859_mangos.sql diff --git a/sql/updates/r1860_scriptdev2.sql b/sql/updates/0.6/r1860_scriptdev2.sql similarity index 100% rename from sql/updates/r1860_scriptdev2.sql rename to sql/updates/0.6/r1860_scriptdev2.sql diff --git a/sql/updates/r1862_mangos.sql b/sql/updates/0.6/r1862_mangos.sql similarity index 100% rename from sql/updates/r1862_mangos.sql rename to sql/updates/0.6/r1862_mangos.sql diff --git a/sql/updates/r1863_mangos.sql b/sql/updates/0.6/r1863_mangos.sql similarity index 100% rename from sql/updates/r1863_mangos.sql rename to sql/updates/0.6/r1863_mangos.sql diff --git a/sql/updates/r1864_mangos.sql b/sql/updates/0.6/r1864_mangos.sql similarity index 100% rename from sql/updates/r1864_mangos.sql rename to sql/updates/0.6/r1864_mangos.sql diff --git a/sql/updates/r1864_scriptdev2.sql b/sql/updates/0.6/r1864_scriptdev2.sql similarity index 100% rename from sql/updates/r1864_scriptdev2.sql rename to sql/updates/0.6/r1864_scriptdev2.sql diff --git a/sql/updates/r1865_mangos.sql b/sql/updates/0.6/r1865_mangos.sql similarity index 100% rename from sql/updates/r1865_mangos.sql rename to sql/updates/0.6/r1865_mangos.sql diff --git a/sql/updates/r1865_scriptdev2.sql b/sql/updates/0.6/r1865_scriptdev2.sql similarity index 100% rename from sql/updates/r1865_scriptdev2.sql rename to sql/updates/0.6/r1865_scriptdev2.sql diff --git a/sql/updates/r1866_scriptdev2.sql b/sql/updates/0.6/r1866_scriptdev2.sql similarity index 100% rename from sql/updates/r1866_scriptdev2.sql rename to sql/updates/0.6/r1866_scriptdev2.sql diff --git a/sql/updates/r1868_scriptdev2.sql b/sql/updates/0.6/r1868_scriptdev2.sql similarity index 100% rename from sql/updates/r1868_scriptdev2.sql rename to sql/updates/0.6/r1868_scriptdev2.sql diff --git a/sql/updates/r1869_mangos.sql b/sql/updates/0.6/r1869_mangos.sql similarity index 100% rename from sql/updates/r1869_mangos.sql rename to sql/updates/0.6/r1869_mangos.sql diff --git a/sql/updates/r1871_mangos.sql b/sql/updates/0.6/r1871_mangos.sql similarity index 100% rename from sql/updates/r1871_mangos.sql rename to sql/updates/0.6/r1871_mangos.sql diff --git a/sql/updates/r1875_mangos.sql b/sql/updates/0.6/r1875_mangos.sql similarity index 100% rename from sql/updates/r1875_mangos.sql rename to sql/updates/0.6/r1875_mangos.sql diff --git a/sql/updates/r1875_scriptdev2.sql b/sql/updates/0.6/r1875_scriptdev2.sql similarity index 100% rename from sql/updates/r1875_scriptdev2.sql rename to sql/updates/0.6/r1875_scriptdev2.sql diff --git a/sql/updates/r1876_mangos.sql b/sql/updates/0.6/r1876_mangos.sql similarity index 100% rename from sql/updates/r1876_mangos.sql rename to sql/updates/0.6/r1876_mangos.sql diff --git a/sql/updates/r1876_scriptdev2.sql b/sql/updates/0.6/r1876_scriptdev2.sql similarity index 100% rename from sql/updates/r1876_scriptdev2.sql rename to sql/updates/0.6/r1876_scriptdev2.sql diff --git a/sql/updates/r1878_mangos.sql b/sql/updates/0.6/r1878_mangos.sql similarity index 100% rename from sql/updates/r1878_mangos.sql rename to sql/updates/0.6/r1878_mangos.sql diff --git a/sql/updates/r1881_mangos.sql b/sql/updates/0.6/r1881_mangos.sql similarity index 100% rename from sql/updates/r1881_mangos.sql rename to sql/updates/0.6/r1881_mangos.sql diff --git a/sql/updates/r1882_scriptdev2.sql b/sql/updates/0.6/r1882_scriptdev2.sql similarity index 100% rename from sql/updates/r1882_scriptdev2.sql rename to sql/updates/0.6/r1882_scriptdev2.sql diff --git a/sql/updates/r1886_scriptdev2.sql b/sql/updates/0.6/r1886_scriptdev2.sql similarity index 100% rename from sql/updates/r1886_scriptdev2.sql rename to sql/updates/0.6/r1886_scriptdev2.sql diff --git a/sql/updates/r1888_mangos.sql b/sql/updates/0.6/r1888_mangos.sql similarity index 100% rename from sql/updates/r1888_mangos.sql rename to sql/updates/0.6/r1888_mangos.sql diff --git a/sql/updates/r1888_scriptdev2.sql b/sql/updates/0.6/r1888_scriptdev2.sql similarity index 100% rename from sql/updates/r1888_scriptdev2.sql rename to sql/updates/0.6/r1888_scriptdev2.sql diff --git a/sql/updates/r1889_mangos.sql b/sql/updates/0.6/r1889_mangos.sql similarity index 100% rename from sql/updates/r1889_mangos.sql rename to sql/updates/0.6/r1889_mangos.sql diff --git a/sql/updates/r1889_scriptdev2.sql b/sql/updates/0.6/r1889_scriptdev2.sql similarity index 100% rename from sql/updates/r1889_scriptdev2.sql rename to sql/updates/0.6/r1889_scriptdev2.sql diff --git a/sql/updates/r1890_mangos.sql b/sql/updates/0.6/r1890_mangos.sql similarity index 100% rename from sql/updates/r1890_mangos.sql rename to sql/updates/0.6/r1890_mangos.sql diff --git a/sql/updates/r1890_scriptdev2.sql b/sql/updates/0.6/r1890_scriptdev2.sql similarity index 100% rename from sql/updates/r1890_scriptdev2.sql rename to sql/updates/0.6/r1890_scriptdev2.sql diff --git a/sql/updates/r1891_mangos.sql b/sql/updates/0.6/r1891_mangos.sql similarity index 100% rename from sql/updates/r1891_mangos.sql rename to sql/updates/0.6/r1891_mangos.sql diff --git a/sql/updates/r1899_mangos.sql b/sql/updates/0.6/r1899_mangos.sql similarity index 100% rename from sql/updates/r1899_mangos.sql rename to sql/updates/0.6/r1899_mangos.sql diff --git a/sql/updates/r1899_scriptdev2.sql b/sql/updates/0.6/r1899_scriptdev2.sql similarity index 100% rename from sql/updates/r1899_scriptdev2.sql rename to sql/updates/0.6/r1899_scriptdev2.sql diff --git a/sql/updates/r1908_scriptdev2.sql b/sql/updates/0.6/r1908_scriptdev2.sql similarity index 100% rename from sql/updates/r1908_scriptdev2.sql rename to sql/updates/0.6/r1908_scriptdev2.sql diff --git a/sql/updates/r1913_mangos.sql b/sql/updates/0.6/r1913_mangos.sql similarity index 100% rename from sql/updates/r1913_mangos.sql rename to sql/updates/0.6/r1913_mangos.sql diff --git a/sql/updates/r1914_scriptdev2.sql b/sql/updates/0.6/r1914_scriptdev2.sql similarity index 100% rename from sql/updates/r1914_scriptdev2.sql rename to sql/updates/0.6/r1914_scriptdev2.sql diff --git a/sql/updates/r1918_scriptdev2.sql b/sql/updates/0.6/r1918_scriptdev2.sql similarity index 100% rename from sql/updates/r1918_scriptdev2.sql rename to sql/updates/0.6/r1918_scriptdev2.sql diff --git a/sql/updates/r1921_scriptdev2.sql b/sql/updates/0.6/r1921_scriptdev2.sql similarity index 100% rename from sql/updates/r1921_scriptdev2.sql rename to sql/updates/0.6/r1921_scriptdev2.sql diff --git a/sql/updates/r1924_mangos.sql b/sql/updates/0.6/r1924_mangos.sql similarity index 100% rename from sql/updates/r1924_mangos.sql rename to sql/updates/0.6/r1924_mangos.sql diff --git a/sql/updates/r1924_scriptdev2.sql b/sql/updates/0.6/r1924_scriptdev2.sql similarity index 100% rename from sql/updates/r1924_scriptdev2.sql rename to sql/updates/0.6/r1924_scriptdev2.sql diff --git a/sql/updates/r1936_mangos.sql b/sql/updates/0.6/r1936_mangos.sql similarity index 100% rename from sql/updates/r1936_mangos.sql rename to sql/updates/0.6/r1936_mangos.sql diff --git a/sql/updates/r1940_mangos.sql b/sql/updates/0.6/r1940_mangos.sql similarity index 100% rename from sql/updates/r1940_mangos.sql rename to sql/updates/0.6/r1940_mangos.sql diff --git a/sql/updates/r1946_scriptdev2.sql b/sql/updates/0.6/r1946_scriptdev2.sql similarity index 100% rename from sql/updates/r1946_scriptdev2.sql rename to sql/updates/0.6/r1946_scriptdev2.sql diff --git a/sql/updates/r1949_scriptdev2.sql b/sql/updates/0.6/r1949_scriptdev2.sql similarity index 100% rename from sql/updates/r1949_scriptdev2.sql rename to sql/updates/0.6/r1949_scriptdev2.sql diff --git a/sql/updates/r1951_scriptdev2.sql b/sql/updates/0.6/r1951_scriptdev2.sql similarity index 100% rename from sql/updates/r1951_scriptdev2.sql rename to sql/updates/0.6/r1951_scriptdev2.sql diff --git a/sql/updates/r1954_mangos.sql b/sql/updates/0.6/r1954_mangos.sql similarity index 100% rename from sql/updates/r1954_mangos.sql rename to sql/updates/0.6/r1954_mangos.sql diff --git a/sql/updates/r1962_mangos.sql b/sql/updates/0.6/r1962_mangos.sql similarity index 100% rename from sql/updates/r1962_mangos.sql rename to sql/updates/0.6/r1962_mangos.sql diff --git a/sql/updates/r1962_scriptdev2.sql b/sql/updates/0.6/r1962_scriptdev2.sql similarity index 100% rename from sql/updates/r1962_scriptdev2.sql rename to sql/updates/0.6/r1962_scriptdev2.sql diff --git a/sql/updates/r1963_scriptdev2.sql b/sql/updates/0.6/r1963_scriptdev2.sql similarity index 100% rename from sql/updates/r1963_scriptdev2.sql rename to sql/updates/0.6/r1963_scriptdev2.sql diff --git a/sql/updates/r1965_mangos.sql b/sql/updates/0.6/r1965_mangos.sql similarity index 100% rename from sql/updates/r1965_mangos.sql rename to sql/updates/0.6/r1965_mangos.sql diff --git a/sql/updates/r1965_scriptdev2.sql b/sql/updates/0.6/r1965_scriptdev2.sql similarity index 100% rename from sql/updates/r1965_scriptdev2.sql rename to sql/updates/0.6/r1965_scriptdev2.sql diff --git a/sql/updates/r1968_scriptdev2.sql b/sql/updates/0.6/r1968_scriptdev2.sql similarity index 100% rename from sql/updates/r1968_scriptdev2.sql rename to sql/updates/0.6/r1968_scriptdev2.sql diff --git a/sql/updates/r1972_scriptdev2.sql b/sql/updates/0.6/r1972_scriptdev2.sql similarity index 100% rename from sql/updates/r1972_scriptdev2.sql rename to sql/updates/0.6/r1972_scriptdev2.sql diff --git a/sql/updates/r1973_mangos.sql b/sql/updates/0.6/r1973_mangos.sql similarity index 100% rename from sql/updates/r1973_mangos.sql rename to sql/updates/0.6/r1973_mangos.sql diff --git a/sql/updates/r1974_mangos.sql b/sql/updates/0.6/r1974_mangos.sql similarity index 100% rename from sql/updates/r1974_mangos.sql rename to sql/updates/0.6/r1974_mangos.sql diff --git a/sql/updates/r1975_scriptdev2.sql b/sql/updates/0.6/r1975_scriptdev2.sql similarity index 100% rename from sql/updates/r1975_scriptdev2.sql rename to sql/updates/0.6/r1975_scriptdev2.sql diff --git a/sql/updates/r1979_scriptdev2.sql b/sql/updates/0.6/r1979_scriptdev2.sql similarity index 100% rename from sql/updates/r1979_scriptdev2.sql rename to sql/updates/0.6/r1979_scriptdev2.sql diff --git a/sql/updates/r1982_mangos.sql b/sql/updates/0.6/r1982_mangos.sql similarity index 100% rename from sql/updates/r1982_mangos.sql rename to sql/updates/0.6/r1982_mangos.sql diff --git a/sql/updates/r1982_scriptdev2.sql b/sql/updates/0.6/r1982_scriptdev2.sql similarity index 100% rename from sql/updates/r1982_scriptdev2.sql rename to sql/updates/0.6/r1982_scriptdev2.sql diff --git a/sql/updates/r1984_mangos.sql b/sql/updates/0.6/r1984_mangos.sql similarity index 100% rename from sql/updates/r1984_mangos.sql rename to sql/updates/0.6/r1984_mangos.sql diff --git a/sql/updates/r1984_scriptdev2.sql b/sql/updates/0.6/r1984_scriptdev2.sql similarity index 100% rename from sql/updates/r1984_scriptdev2.sql rename to sql/updates/0.6/r1984_scriptdev2.sql diff --git a/sql/updates/r1987_mangos.sql b/sql/updates/0.6/r1987_mangos.sql similarity index 100% rename from sql/updates/r1987_mangos.sql rename to sql/updates/0.6/r1987_mangos.sql diff --git a/sql/updates/r1990_mangos.sql b/sql/updates/0.6/r1990_mangos.sql similarity index 100% rename from sql/updates/r1990_mangos.sql rename to sql/updates/0.6/r1990_mangos.sql diff --git a/sql/updates/r1990_scriptdev2.sql b/sql/updates/0.6/r1990_scriptdev2.sql similarity index 100% rename from sql/updates/r1990_scriptdev2.sql rename to sql/updates/0.6/r1990_scriptdev2.sql diff --git a/sql/updates/r1992_mangos.sql b/sql/updates/0.6/r1992_mangos.sql similarity index 100% rename from sql/updates/r1992_mangos.sql rename to sql/updates/0.6/r1992_mangos.sql diff --git a/sql/updates/r1992_scriptdev2.sql b/sql/updates/0.6/r1992_scriptdev2.sql similarity index 100% rename from sql/updates/r1992_scriptdev2.sql rename to sql/updates/0.6/r1992_scriptdev2.sql diff --git a/sql/updates/r1993_mangos.sql b/sql/updates/0.6/r1993_mangos.sql similarity index 100% rename from sql/updates/r1993_mangos.sql rename to sql/updates/0.6/r1993_mangos.sql diff --git a/sql/updates/r1993_scriptdev2.sql b/sql/updates/0.6/r1993_scriptdev2.sql similarity index 100% rename from sql/updates/r1993_scriptdev2.sql rename to sql/updates/0.6/r1993_scriptdev2.sql diff --git a/sql/updates/r2004_mangos.sql b/sql/updates/0.6/r2004_mangos.sql similarity index 100% rename from sql/updates/r2004_mangos.sql rename to sql/updates/0.6/r2004_mangos.sql diff --git a/sql/updates/r2008_mangos.sql b/sql/updates/0.6/r2008_mangos.sql similarity index 100% rename from sql/updates/r2008_mangos.sql rename to sql/updates/0.6/r2008_mangos.sql diff --git a/sql/updates/r2008_scriptdev2.sql b/sql/updates/0.6/r2008_scriptdev2.sql similarity index 100% rename from sql/updates/r2008_scriptdev2.sql rename to sql/updates/0.6/r2008_scriptdev2.sql diff --git a/sql/updates/r2009_mangos.sql b/sql/updates/0.6/r2009_mangos.sql similarity index 100% rename from sql/updates/r2009_mangos.sql rename to sql/updates/0.6/r2009_mangos.sql diff --git a/sql/updates/r2009_scriptdev2.sql b/sql/updates/0.6/r2009_scriptdev2.sql similarity index 100% rename from sql/updates/r2009_scriptdev2.sql rename to sql/updates/0.6/r2009_scriptdev2.sql diff --git a/sql/updates/r2010_mangos.sql b/sql/updates/0.6/r2010_mangos.sql similarity index 100% rename from sql/updates/r2010_mangos.sql rename to sql/updates/0.6/r2010_mangos.sql diff --git a/sql/updates/r2013_mangos.sql b/sql/updates/0.6/r2013_mangos.sql similarity index 100% rename from sql/updates/r2013_mangos.sql rename to sql/updates/0.6/r2013_mangos.sql diff --git a/sql/updates/r2013_scriptdev2.sql b/sql/updates/0.6/r2013_scriptdev2.sql similarity index 100% rename from sql/updates/r2013_scriptdev2.sql rename to sql/updates/0.6/r2013_scriptdev2.sql diff --git a/sql/updates/r2015_mangos.sql b/sql/updates/0.6/r2015_mangos.sql similarity index 100% rename from sql/updates/r2015_mangos.sql rename to sql/updates/0.6/r2015_mangos.sql diff --git a/sql/updates/r2017_mangos.sql b/sql/updates/0.6/r2017_mangos.sql similarity index 100% rename from sql/updates/r2017_mangos.sql rename to sql/updates/0.6/r2017_mangos.sql diff --git a/sql/updates/r2018_scriptdev2.sql b/sql/updates/0.6/r2018_scriptdev2.sql similarity index 100% rename from sql/updates/r2018_scriptdev2.sql rename to sql/updates/0.6/r2018_scriptdev2.sql diff --git a/sql/updates/r2020_scriptdev2.sql b/sql/updates/0.6/r2020_scriptdev2.sql similarity index 100% rename from sql/updates/r2020_scriptdev2.sql rename to sql/updates/0.6/r2020_scriptdev2.sql diff --git a/sql/updates/r2021_mangos.sql b/sql/updates/0.6/r2021_mangos.sql similarity index 100% rename from sql/updates/r2021_mangos.sql rename to sql/updates/0.6/r2021_mangos.sql diff --git a/sql/updates/r2024_mangos.sql b/sql/updates/0.6/r2024_mangos.sql similarity index 100% rename from sql/updates/r2024_mangos.sql rename to sql/updates/0.6/r2024_mangos.sql diff --git a/sql/updates/r2025_mangos.sql b/sql/updates/0.6/r2025_mangos.sql similarity index 100% rename from sql/updates/r2025_mangos.sql rename to sql/updates/0.6/r2025_mangos.sql diff --git a/sql/updates/r2028_scriptdev2.sql b/sql/updates/0.6/r2028_scriptdev2.sql similarity index 100% rename from sql/updates/r2028_scriptdev2.sql rename to sql/updates/0.6/r2028_scriptdev2.sql diff --git a/sql/updates/r2031_mangos.sql b/sql/updates/0.6/r2031_mangos.sql similarity index 100% rename from sql/updates/r2031_mangos.sql rename to sql/updates/0.6/r2031_mangos.sql diff --git a/sql/updates/r2031_scriptdev2.sql b/sql/updates/0.6/r2031_scriptdev2.sql similarity index 100% rename from sql/updates/r2031_scriptdev2.sql rename to sql/updates/0.6/r2031_scriptdev2.sql diff --git a/sql/updates/r2033_scriptdev2.sql b/sql/updates/0.6/r2033_scriptdev2.sql similarity index 100% rename from sql/updates/r2033_scriptdev2.sql rename to sql/updates/0.6/r2033_scriptdev2.sql diff --git a/sql/updates/r2036_scriptdev2.sql b/sql/updates/0.6/r2036_scriptdev2.sql similarity index 100% rename from sql/updates/r2036_scriptdev2.sql rename to sql/updates/0.6/r2036_scriptdev2.sql diff --git a/sql/updates/r2037_mangos.sql b/sql/updates/0.6/r2037_mangos.sql similarity index 100% rename from sql/updates/r2037_mangos.sql rename to sql/updates/0.6/r2037_mangos.sql diff --git a/sql/updates/r2038_mangos.sql b/sql/updates/0.6/r2038_mangos.sql similarity index 100% rename from sql/updates/r2038_mangos.sql rename to sql/updates/0.6/r2038_mangos.sql diff --git a/sql/updates/r2039_mangos.sql b/sql/updates/0.6/r2039_mangos.sql similarity index 100% rename from sql/updates/r2039_mangos.sql rename to sql/updates/0.6/r2039_mangos.sql diff --git a/sql/updates/r2043_scriptdev2.sql b/sql/updates/0.6/r2043_scriptdev2.sql similarity index 100% rename from sql/updates/r2043_scriptdev2.sql rename to sql/updates/0.6/r2043_scriptdev2.sql diff --git a/sql/updates/r2044_mangos.sql b/sql/updates/0.6/r2044_mangos.sql similarity index 100% rename from sql/updates/r2044_mangos.sql rename to sql/updates/0.6/r2044_mangos.sql diff --git a/sql/updates/r2044_scriptdev2.sql b/sql/updates/0.6/r2044_scriptdev2.sql similarity index 100% rename from sql/updates/r2044_scriptdev2.sql rename to sql/updates/0.6/r2044_scriptdev2.sql diff --git a/sql/updates/r2050_mangos.sql b/sql/updates/0.6/r2050_mangos.sql similarity index 100% rename from sql/updates/r2050_mangos.sql rename to sql/updates/0.6/r2050_mangos.sql diff --git a/sql/updates/r2051_scriptdev2.sql b/sql/updates/0.6/r2051_scriptdev2.sql similarity index 100% rename from sql/updates/r2051_scriptdev2.sql rename to sql/updates/0.6/r2051_scriptdev2.sql diff --git a/sql/updates/r2057_scriptdev2.sql b/sql/updates/0.6/r2057_scriptdev2.sql similarity index 100% rename from sql/updates/r2057_scriptdev2.sql rename to sql/updates/0.6/r2057_scriptdev2.sql diff --git a/sql/updates/r2059_mangos.sql b/sql/updates/0.6/r2059_mangos.sql similarity index 100% rename from sql/updates/r2059_mangos.sql rename to sql/updates/0.6/r2059_mangos.sql diff --git a/sql/updates/r2059_scriptdev2.sql b/sql/updates/0.6/r2059_scriptdev2.sql similarity index 100% rename from sql/updates/r2059_scriptdev2.sql rename to sql/updates/0.6/r2059_scriptdev2.sql diff --git a/sql/updates/r2061_mangos.sql b/sql/updates/0.6/r2061_mangos.sql similarity index 100% rename from sql/updates/r2061_mangos.sql rename to sql/updates/0.6/r2061_mangos.sql diff --git a/sql/updates/r2064_mangos.sql b/sql/updates/0.6/r2064_mangos.sql similarity index 100% rename from sql/updates/r2064_mangos.sql rename to sql/updates/0.6/r2064_mangos.sql diff --git a/sql/updates/r2064_scriptdev2.sql b/sql/updates/0.6/r2064_scriptdev2.sql similarity index 100% rename from sql/updates/r2064_scriptdev2.sql rename to sql/updates/0.6/r2064_scriptdev2.sql diff --git a/sql/updates/r2070_mangos.sql b/sql/updates/0.6/r2070_mangos.sql similarity index 100% rename from sql/updates/r2070_mangos.sql rename to sql/updates/0.6/r2070_mangos.sql diff --git a/sql/updates/r2072_scriptdev2.sql b/sql/updates/0.6/r2072_scriptdev2.sql similarity index 100% rename from sql/updates/r2072_scriptdev2.sql rename to sql/updates/0.6/r2072_scriptdev2.sql diff --git a/sql/updates/r2073_mangos.sql b/sql/updates/0.6/r2073_mangos.sql similarity index 100% rename from sql/updates/r2073_mangos.sql rename to sql/updates/0.6/r2073_mangos.sql diff --git a/sql/updates/r2073_scriptdev2.sql b/sql/updates/0.6/r2073_scriptdev2.sql similarity index 100% rename from sql/updates/r2073_scriptdev2.sql rename to sql/updates/0.6/r2073_scriptdev2.sql diff --git a/sql/updates/r2074_scriptdev2.sql b/sql/updates/0.6/r2074_scriptdev2.sql similarity index 100% rename from sql/updates/r2074_scriptdev2.sql rename to sql/updates/0.6/r2074_scriptdev2.sql diff --git a/sql/updates/r2075_mangos.sql b/sql/updates/0.6/r2075_mangos.sql similarity index 100% rename from sql/updates/r2075_mangos.sql rename to sql/updates/0.6/r2075_mangos.sql diff --git a/sql/updates/r2076_scriptdev2.sql b/sql/updates/0.6/r2076_scriptdev2.sql similarity index 100% rename from sql/updates/r2076_scriptdev2.sql rename to sql/updates/0.6/r2076_scriptdev2.sql diff --git a/sql/updates/r2077_mangos.sql b/sql/updates/0.6/r2077_mangos.sql similarity index 100% rename from sql/updates/r2077_mangos.sql rename to sql/updates/0.6/r2077_mangos.sql diff --git a/sql/updates/r2077_scriptdev2.sql b/sql/updates/0.6/r2077_scriptdev2.sql similarity index 100% rename from sql/updates/r2077_scriptdev2.sql rename to sql/updates/0.6/r2077_scriptdev2.sql diff --git a/sql/updates/r2080_scriptdev2.sql b/sql/updates/0.6/r2080_scriptdev2.sql similarity index 100% rename from sql/updates/r2080_scriptdev2.sql rename to sql/updates/0.6/r2080_scriptdev2.sql diff --git a/sql/updates/r2092_mangos.sql b/sql/updates/0.6/r2092_mangos.sql similarity index 100% rename from sql/updates/r2092_mangos.sql rename to sql/updates/0.6/r2092_mangos.sql diff --git a/sql/updates/r2092_scriptdev2.sql b/sql/updates/0.6/r2092_scriptdev2.sql similarity index 100% rename from sql/updates/r2092_scriptdev2.sql rename to sql/updates/0.6/r2092_scriptdev2.sql diff --git a/sql/updates/r2101_mangos.sql b/sql/updates/0.6/r2101_mangos.sql similarity index 100% rename from sql/updates/r2101_mangos.sql rename to sql/updates/0.6/r2101_mangos.sql diff --git a/sql/updates/r2101_scriptdev2.sql b/sql/updates/0.6/r2101_scriptdev2.sql similarity index 100% rename from sql/updates/r2101_scriptdev2.sql rename to sql/updates/0.6/r2101_scriptdev2.sql diff --git a/sql/updates/r2107_scriptdev2.sql b/sql/updates/0.6/r2107_scriptdev2.sql similarity index 100% rename from sql/updates/r2107_scriptdev2.sql rename to sql/updates/0.6/r2107_scriptdev2.sql diff --git a/sql/updates/r2112_mangos.sql b/sql/updates/0.6/r2112_mangos.sql similarity index 100% rename from sql/updates/r2112_mangos.sql rename to sql/updates/0.6/r2112_mangos.sql diff --git a/sql/updates/r2112_scriptdev2.sql b/sql/updates/0.6/r2112_scriptdev2.sql similarity index 100% rename from sql/updates/r2112_scriptdev2.sql rename to sql/updates/0.6/r2112_scriptdev2.sql diff --git a/sql/updates/r2113_scriptdev2.sql b/sql/updates/0.6/r2113_scriptdev2.sql similarity index 100% rename from sql/updates/r2113_scriptdev2.sql rename to sql/updates/0.6/r2113_scriptdev2.sql diff --git a/sql/updates/r2114_scriptdev2.sql b/sql/updates/0.6/r2114_scriptdev2.sql similarity index 100% rename from sql/updates/r2114_scriptdev2.sql rename to sql/updates/0.6/r2114_scriptdev2.sql diff --git a/sql/updates/r2116_scriptdev2.sql b/sql/updates/0.6/r2116_scriptdev2.sql similarity index 100% rename from sql/updates/r2116_scriptdev2.sql rename to sql/updates/0.6/r2116_scriptdev2.sql diff --git a/sql/updates/r2130_scriptdev2.sql b/sql/updates/0.6/r2130_scriptdev2.sql similarity index 100% rename from sql/updates/r2130_scriptdev2.sql rename to sql/updates/0.6/r2130_scriptdev2.sql diff --git a/sql/updates/r2134_scriptdev2.sql b/sql/updates/0.6/r2134_scriptdev2.sql similarity index 100% rename from sql/updates/r2134_scriptdev2.sql rename to sql/updates/0.6/r2134_scriptdev2.sql diff --git a/sql/updates/r2138_mangos.sql b/sql/updates/0.6/r2138_mangos.sql similarity index 100% rename from sql/updates/r2138_mangos.sql rename to sql/updates/0.6/r2138_mangos.sql diff --git a/sql/updates/r2139_scriptdev2.sql b/sql/updates/0.6/r2139_scriptdev2.sql similarity index 100% rename from sql/updates/r2139_scriptdev2.sql rename to sql/updates/0.6/r2139_scriptdev2.sql diff --git a/sql/updates/r2146_scriptdev2.sql b/sql/updates/0.6/r2146_scriptdev2.sql similarity index 100% rename from sql/updates/r2146_scriptdev2.sql rename to sql/updates/0.6/r2146_scriptdev2.sql diff --git a/sql/updates/r2147_mangos.sql b/sql/updates/0.6/r2147_mangos.sql similarity index 100% rename from sql/updates/r2147_mangos.sql rename to sql/updates/0.6/r2147_mangos.sql diff --git a/sql/updates/r2147_scriptdev2.sql b/sql/updates/0.6/r2147_scriptdev2.sql similarity index 100% rename from sql/updates/r2147_scriptdev2.sql rename to sql/updates/0.6/r2147_scriptdev2.sql diff --git a/sql/updates/r2162_scriptdev2.sql b/sql/updates/0.6/r2162_scriptdev2.sql similarity index 100% rename from sql/updates/r2162_scriptdev2.sql rename to sql/updates/0.6/r2162_scriptdev2.sql diff --git a/sql/updates/r2181_scriptdev2.sql b/sql/updates/0.6/r2181_scriptdev2.sql similarity index 100% rename from sql/updates/r2181_scriptdev2.sql rename to sql/updates/0.6/r2181_scriptdev2.sql diff --git a/sql/updates/r2212_mangos.sql b/sql/updates/0.6/r2212_mangos.sql similarity index 100% rename from sql/updates/r2212_mangos.sql rename to sql/updates/0.6/r2212_mangos.sql diff --git a/sql/updates/r2212_scriptdev2.sql b/sql/updates/0.6/r2212_scriptdev2.sql similarity index 100% rename from sql/updates/r2212_scriptdev2.sql rename to sql/updates/0.6/r2212_scriptdev2.sql diff --git a/sql/updates/r2220_scriptdev2.sql b/sql/updates/0.6/r2220_scriptdev2.sql similarity index 100% rename from sql/updates/r2220_scriptdev2.sql rename to sql/updates/0.6/r2220_scriptdev2.sql diff --git a/sql/updates/r2227_mangos.sql b/sql/updates/0.6/r2227_mangos.sql similarity index 100% rename from sql/updates/r2227_mangos.sql rename to sql/updates/0.6/r2227_mangos.sql diff --git a/sql/updates/r2229_mangos.sql b/sql/updates/0.6/r2229_mangos.sql similarity index 100% rename from sql/updates/r2229_mangos.sql rename to sql/updates/0.6/r2229_mangos.sql diff --git a/sql/updates/r2235_mangos.sql b/sql/updates/0.6/r2235_mangos.sql similarity index 100% rename from sql/updates/r2235_mangos.sql rename to sql/updates/0.6/r2235_mangos.sql diff --git a/sql/updates/r2235_scriptdev2.sql b/sql/updates/0.6/r2235_scriptdev2.sql similarity index 100% rename from sql/updates/r2235_scriptdev2.sql rename to sql/updates/0.6/r2235_scriptdev2.sql diff --git a/sql/updates/r2239_scriptdev2.sql b/sql/updates/0.6/r2239_scriptdev2.sql similarity index 100% rename from sql/updates/r2239_scriptdev2.sql rename to sql/updates/0.6/r2239_scriptdev2.sql diff --git a/sql/updates/r2242_scriptdev2.sql b/sql/updates/0.6/r2242_scriptdev2.sql similarity index 100% rename from sql/updates/r2242_scriptdev2.sql rename to sql/updates/0.6/r2242_scriptdev2.sql diff --git a/sql/updates/r2243_scriptdev2.sql b/sql/updates/0.6/r2243_scriptdev2.sql similarity index 100% rename from sql/updates/r2243_scriptdev2.sql rename to sql/updates/0.6/r2243_scriptdev2.sql diff --git a/sql/updates/r2245_scriptdev2.sql b/sql/updates/0.6/r2245_scriptdev2.sql similarity index 100% rename from sql/updates/r2245_scriptdev2.sql rename to sql/updates/0.6/r2245_scriptdev2.sql diff --git a/sql/updates/r2246_scriptdev2.sql b/sql/updates/0.6/r2246_scriptdev2.sql similarity index 100% rename from sql/updates/r2246_scriptdev2.sql rename to sql/updates/0.6/r2246_scriptdev2.sql diff --git a/sql/updates/r2247_scriptdev2.sql b/sql/updates/0.6/r2247_scriptdev2.sql similarity index 100% rename from sql/updates/r2247_scriptdev2.sql rename to sql/updates/0.6/r2247_scriptdev2.sql diff --git a/sql/updates/r2248_scriptdev2.sql b/sql/updates/0.6/r2248_scriptdev2.sql similarity index 100% rename from sql/updates/r2248_scriptdev2.sql rename to sql/updates/0.6/r2248_scriptdev2.sql diff --git a/sql/updates/r2249_scriptdev2.sql b/sql/updates/0.6/r2249_scriptdev2.sql similarity index 100% rename from sql/updates/r2249_scriptdev2.sql rename to sql/updates/0.6/r2249_scriptdev2.sql diff --git a/sql/updates/r2250_mangos.sql b/sql/updates/0.6/r2250_mangos.sql similarity index 100% rename from sql/updates/r2250_mangos.sql rename to sql/updates/0.6/r2250_mangos.sql diff --git a/sql/updates/r2250_scriptdev2.sql b/sql/updates/0.6/r2250_scriptdev2.sql similarity index 100% rename from sql/updates/r2250_scriptdev2.sql rename to sql/updates/0.6/r2250_scriptdev2.sql diff --git a/sql/updates/r2252_mangos.sql b/sql/updates/0.6/r2252_mangos.sql similarity index 100% rename from sql/updates/r2252_mangos.sql rename to sql/updates/0.6/r2252_mangos.sql diff --git a/sql/updates/r2254_scriptdev2.sql b/sql/updates/0.6/r2254_scriptdev2.sql similarity index 100% rename from sql/updates/r2254_scriptdev2.sql rename to sql/updates/0.6/r2254_scriptdev2.sql diff --git a/sql/updates/r2255_mangos.sql b/sql/updates/0.6/r2255_mangos.sql similarity index 100% rename from sql/updates/r2255_mangos.sql rename to sql/updates/0.6/r2255_mangos.sql diff --git a/sql/updates/r2263_mangos.sql b/sql/updates/0.6/r2263_mangos.sql similarity index 100% rename from sql/updates/r2263_mangos.sql rename to sql/updates/0.6/r2263_mangos.sql diff --git a/sql/updates/r2268_mangos.sql b/sql/updates/0.6/r2268_mangos.sql similarity index 100% rename from sql/updates/r2268_mangos.sql rename to sql/updates/0.6/r2268_mangos.sql diff --git a/sql/updates/r2268_scriptdev2.sql b/sql/updates/0.6/r2268_scriptdev2.sql similarity index 100% rename from sql/updates/r2268_scriptdev2.sql rename to sql/updates/0.6/r2268_scriptdev2.sql diff --git a/sql/updates/r2270_scriptdev2.sql b/sql/updates/0.6/r2270_scriptdev2.sql similarity index 100% rename from sql/updates/r2270_scriptdev2.sql rename to sql/updates/0.6/r2270_scriptdev2.sql diff --git a/sql/updates/r2273_mangos.sql b/sql/updates/0.6/r2273_mangos.sql similarity index 100% rename from sql/updates/r2273_mangos.sql rename to sql/updates/0.6/r2273_mangos.sql diff --git a/sql/updates/r2277_scriptdev2.sql b/sql/updates/0.6/r2277_scriptdev2.sql similarity index 100% rename from sql/updates/r2277_scriptdev2.sql rename to sql/updates/0.6/r2277_scriptdev2.sql diff --git a/sql/updates/r2284_scriptdev2.sql b/sql/updates/0.6/r2284_scriptdev2.sql similarity index 100% rename from sql/updates/r2284_scriptdev2.sql rename to sql/updates/0.6/r2284_scriptdev2.sql diff --git a/sql/updates/r2286_mangos.sql b/sql/updates/0.6/r2286_mangos.sql similarity index 100% rename from sql/updates/r2286_mangos.sql rename to sql/updates/0.6/r2286_mangos.sql diff --git a/sql/updates/r2289_mangos.sql b/sql/updates/0.6/r2289_mangos.sql similarity index 100% rename from sql/updates/r2289_mangos.sql rename to sql/updates/0.6/r2289_mangos.sql diff --git a/sql/updates/r2289_scriptdev2.sql b/sql/updates/0.6/r2289_scriptdev2.sql similarity index 100% rename from sql/updates/r2289_scriptdev2.sql rename to sql/updates/0.6/r2289_scriptdev2.sql diff --git a/sql/updates/r2298_scriptdev2.sql b/sql/updates/0.6/r2298_scriptdev2.sql similarity index 100% rename from sql/updates/r2298_scriptdev2.sql rename to sql/updates/0.6/r2298_scriptdev2.sql diff --git a/sql/updates/r2300_scriptdev2.sql b/sql/updates/0.6/r2300_scriptdev2.sql similarity index 100% rename from sql/updates/r2300_scriptdev2.sql rename to sql/updates/0.6/r2300_scriptdev2.sql diff --git a/sql/updates/r2305_scriptdev2.sql b/sql/updates/0.6/r2305_scriptdev2.sql similarity index 100% rename from sql/updates/r2305_scriptdev2.sql rename to sql/updates/0.6/r2305_scriptdev2.sql diff --git a/sql/updates/r2306_mangos.sql b/sql/updates/0.6/r2306_mangos.sql similarity index 100% rename from sql/updates/r2306_mangos.sql rename to sql/updates/0.6/r2306_mangos.sql diff --git a/sql/updates/r2307_mangos.sql b/sql/updates/0.6/r2307_mangos.sql similarity index 100% rename from sql/updates/r2307_mangos.sql rename to sql/updates/0.6/r2307_mangos.sql diff --git a/sql/updates/r2309_mangos.sql b/sql/updates/0.6/r2309_mangos.sql similarity index 100% rename from sql/updates/r2309_mangos.sql rename to sql/updates/0.6/r2309_mangos.sql diff --git a/sql/updates/r2309_scriptdev2.sql b/sql/updates/0.6/r2309_scriptdev2.sql similarity index 100% rename from sql/updates/r2309_scriptdev2.sql rename to sql/updates/0.6/r2309_scriptdev2.sql diff --git a/sql/updates/r2310_scriptdev2.sql b/sql/updates/0.6/r2310_scriptdev2.sql similarity index 100% rename from sql/updates/r2310_scriptdev2.sql rename to sql/updates/0.6/r2310_scriptdev2.sql diff --git a/sql/updates/r2313_mangos.sql b/sql/updates/0.6/r2313_mangos.sql similarity index 100% rename from sql/updates/r2313_mangos.sql rename to sql/updates/0.6/r2313_mangos.sql diff --git a/sql/updates/r2313_scriptdev2.sql b/sql/updates/0.6/r2313_scriptdev2.sql similarity index 100% rename from sql/updates/r2313_scriptdev2.sql rename to sql/updates/0.6/r2313_scriptdev2.sql diff --git a/sql/updates/r2314_mangos.sql b/sql/updates/0.6/r2314_mangos.sql similarity index 100% rename from sql/updates/r2314_mangos.sql rename to sql/updates/0.6/r2314_mangos.sql diff --git a/sql/updates/r2314_scriptdev2.sql b/sql/updates/0.6/r2314_scriptdev2.sql similarity index 100% rename from sql/updates/r2314_scriptdev2.sql rename to sql/updates/0.6/r2314_scriptdev2.sql diff --git a/sql/updates/r2318_mangos.sql b/sql/updates/0.6/r2318_mangos.sql similarity index 100% rename from sql/updates/r2318_mangos.sql rename to sql/updates/0.6/r2318_mangos.sql diff --git a/sql/updates/r2318_scriptdev2.sql b/sql/updates/0.6/r2318_scriptdev2.sql similarity index 100% rename from sql/updates/r2318_scriptdev2.sql rename to sql/updates/0.6/r2318_scriptdev2.sql diff --git a/sql/updates/r2320_mangos.sql b/sql/updates/0.6/r2320_mangos.sql similarity index 100% rename from sql/updates/r2320_mangos.sql rename to sql/updates/0.6/r2320_mangos.sql diff --git a/sql/updates/r2321_scriptdev2.sql b/sql/updates/0.6/r2321_scriptdev2.sql similarity index 100% rename from sql/updates/r2321_scriptdev2.sql rename to sql/updates/0.6/r2321_scriptdev2.sql diff --git a/sql/updates/r2323_mangos.sql b/sql/updates/0.6/r2323_mangos.sql similarity index 100% rename from sql/updates/r2323_mangos.sql rename to sql/updates/0.6/r2323_mangos.sql diff --git a/sql/updates/r2324_mangos.sql b/sql/updates/0.6/r2324_mangos.sql similarity index 100% rename from sql/updates/r2324_mangos.sql rename to sql/updates/0.6/r2324_mangos.sql diff --git a/sql/updates/r2325_mangos.sql b/sql/updates/0.6/r2325_mangos.sql similarity index 100% rename from sql/updates/r2325_mangos.sql rename to sql/updates/0.6/r2325_mangos.sql diff --git a/sql/updates/r2325_scriptdev2.sql b/sql/updates/0.6/r2325_scriptdev2.sql similarity index 100% rename from sql/updates/r2325_scriptdev2.sql rename to sql/updates/0.6/r2325_scriptdev2.sql diff --git a/sql/updates/r2326_mangos.sql b/sql/updates/0.6/r2326_mangos.sql similarity index 100% rename from sql/updates/r2326_mangos.sql rename to sql/updates/0.6/r2326_mangos.sql diff --git a/sql/updates/r2328_mangos.sql b/sql/updates/0.6/r2328_mangos.sql similarity index 100% rename from sql/updates/r2328_mangos.sql rename to sql/updates/0.6/r2328_mangos.sql diff --git a/sql/updates/r2345_mangos.sql b/sql/updates/0.6/r2345_mangos.sql similarity index 100% rename from sql/updates/r2345_mangos.sql rename to sql/updates/0.6/r2345_mangos.sql diff --git a/sql/updates/r2347_mangos.sql b/sql/updates/0.6/r2347_mangos.sql similarity index 100% rename from sql/updates/r2347_mangos.sql rename to sql/updates/0.6/r2347_mangos.sql diff --git a/sql/updates/r2348_scriptdev2.sql b/sql/updates/0.6/r2348_scriptdev2.sql similarity index 100% rename from sql/updates/r2348_scriptdev2.sql rename to sql/updates/0.6/r2348_scriptdev2.sql diff --git a/sql/updates/r2355_mangos.sql b/sql/updates/0.6/r2355_mangos.sql similarity index 100% rename from sql/updates/r2355_mangos.sql rename to sql/updates/0.6/r2355_mangos.sql diff --git a/sql/updates/r2357_mangos.sql b/sql/updates/0.6/r2357_mangos.sql similarity index 100% rename from sql/updates/r2357_mangos.sql rename to sql/updates/0.6/r2357_mangos.sql diff --git a/sql/updates/r2359_mangos.sql b/sql/updates/0.6/r2359_mangos.sql similarity index 100% rename from sql/updates/r2359_mangos.sql rename to sql/updates/0.6/r2359_mangos.sql diff --git a/sql/updates/r2359_scriptdev2.sql b/sql/updates/0.6/r2359_scriptdev2.sql similarity index 100% rename from sql/updates/r2359_scriptdev2.sql rename to sql/updates/0.6/r2359_scriptdev2.sql diff --git a/sql/updates/r2360_scriptdev2.sql b/sql/updates/0.6/r2360_scriptdev2.sql similarity index 100% rename from sql/updates/r2360_scriptdev2.sql rename to sql/updates/0.6/r2360_scriptdev2.sql diff --git a/sql/updates/r2361_mangos.sql b/sql/updates/0.6/r2361_mangos.sql similarity index 100% rename from sql/updates/r2361_mangos.sql rename to sql/updates/0.6/r2361_mangos.sql diff --git a/sql/updates/r2364_scriptdev2.sql b/sql/updates/0.6/r2364_scriptdev2.sql similarity index 100% rename from sql/updates/r2364_scriptdev2.sql rename to sql/updates/0.6/r2364_scriptdev2.sql diff --git a/sql/updates/r2369_mangos.sql b/sql/updates/0.6/r2369_mangos.sql similarity index 100% rename from sql/updates/r2369_mangos.sql rename to sql/updates/0.6/r2369_mangos.sql diff --git a/sql/updates/r2370_mangos.sql b/sql/updates/0.6/r2370_mangos.sql similarity index 100% rename from sql/updates/r2370_mangos.sql rename to sql/updates/0.6/r2370_mangos.sql diff --git a/sql/updates/r2371_mangos.sql b/sql/updates/0.6/r2371_mangos.sql similarity index 100% rename from sql/updates/r2371_mangos.sql rename to sql/updates/0.6/r2371_mangos.sql diff --git a/sql/updates/r2372_mangos.sql b/sql/updates/0.6/r2372_mangos.sql similarity index 100% rename from sql/updates/r2372_mangos.sql rename to sql/updates/0.6/r2372_mangos.sql diff --git a/sql/updates/r2373_mangos.sql b/sql/updates/0.6/r2373_mangos.sql similarity index 100% rename from sql/updates/r2373_mangos.sql rename to sql/updates/0.6/r2373_mangos.sql diff --git a/sql/updates/r2374_mangos.sql b/sql/updates/0.6/r2374_mangos.sql similarity index 100% rename from sql/updates/r2374_mangos.sql rename to sql/updates/0.6/r2374_mangos.sql diff --git a/sql/updates/r2374_scriptdev2.sql b/sql/updates/0.6/r2374_scriptdev2.sql similarity index 100% rename from sql/updates/r2374_scriptdev2.sql rename to sql/updates/0.6/r2374_scriptdev2.sql diff --git a/sql/updates/r2375_mangos.sql b/sql/updates/0.6/r2375_mangos.sql similarity index 100% rename from sql/updates/r2375_mangos.sql rename to sql/updates/0.6/r2375_mangos.sql diff --git a/sql/updates/r2383_scriptdev2.sql b/sql/updates/0.6/r2383_scriptdev2.sql similarity index 100% rename from sql/updates/r2383_scriptdev2.sql rename to sql/updates/0.6/r2383_scriptdev2.sql diff --git a/sql/updates/r2385_mangos.sql b/sql/updates/0.6/r2385_mangos.sql similarity index 100% rename from sql/updates/r2385_mangos.sql rename to sql/updates/0.6/r2385_mangos.sql diff --git a/sql/updates/r2385_scriptdev2.sql b/sql/updates/0.6/r2385_scriptdev2.sql similarity index 100% rename from sql/updates/r2385_scriptdev2.sql rename to sql/updates/0.6/r2385_scriptdev2.sql diff --git a/sql/updates/r2387_mangos.sql b/sql/updates/0.6/r2387_mangos.sql similarity index 100% rename from sql/updates/r2387_mangos.sql rename to sql/updates/0.6/r2387_mangos.sql diff --git a/sql/updates/r2397_scriptdev2.sql b/sql/updates/0.6/r2397_scriptdev2.sql similarity index 100% rename from sql/updates/r2397_scriptdev2.sql rename to sql/updates/0.6/r2397_scriptdev2.sql diff --git a/sql/updates/r2399_scriptdev2.sql b/sql/updates/0.6/r2399_scriptdev2.sql similarity index 100% rename from sql/updates/r2399_scriptdev2.sql rename to sql/updates/0.6/r2399_scriptdev2.sql diff --git a/sql/updates/r2400_scriptdev2.sql b/sql/updates/0.6/r2400_scriptdev2.sql similarity index 100% rename from sql/updates/r2400_scriptdev2.sql rename to sql/updates/0.6/r2400_scriptdev2.sql diff --git a/sql/updates/r2409_mangos.sql b/sql/updates/0.6/r2409_mangos.sql similarity index 100% rename from sql/updates/r2409_mangos.sql rename to sql/updates/0.6/r2409_mangos.sql diff --git a/sql/updates/r2409_scriptdev2.sql b/sql/updates/0.6/r2409_scriptdev2.sql similarity index 100% rename from sql/updates/r2409_scriptdev2.sql rename to sql/updates/0.6/r2409_scriptdev2.sql diff --git a/sql/updates/r2416_mangos.sql b/sql/updates/0.6/r2416_mangos.sql similarity index 100% rename from sql/updates/r2416_mangos.sql rename to sql/updates/0.6/r2416_mangos.sql diff --git a/sql/updates/r2422_mangos.sql b/sql/updates/0.6/r2422_mangos.sql similarity index 100% rename from sql/updates/r2422_mangos.sql rename to sql/updates/0.6/r2422_mangos.sql diff --git a/sql/updates/r2445_mangos.sql b/sql/updates/0.6/r2445_mangos.sql similarity index 100% rename from sql/updates/r2445_mangos.sql rename to sql/updates/0.6/r2445_mangos.sql diff --git a/sql/updates/r2446_mangos.sql b/sql/updates/0.6/r2446_mangos.sql similarity index 100% rename from sql/updates/r2446_mangos.sql rename to sql/updates/0.6/r2446_mangos.sql diff --git a/sql/updates/r2447_mangos.sql b/sql/updates/0.6/r2447_mangos.sql similarity index 100% rename from sql/updates/r2447_mangos.sql rename to sql/updates/0.6/r2447_mangos.sql diff --git a/sql/updates/r2447_scriptdev2.sql b/sql/updates/0.6/r2447_scriptdev2.sql similarity index 100% rename from sql/updates/r2447_scriptdev2.sql rename to sql/updates/0.6/r2447_scriptdev2.sql diff --git a/sql/updates/r2448_scriptdev2.sql b/sql/updates/0.6/r2448_scriptdev2.sql similarity index 100% rename from sql/updates/r2448_scriptdev2.sql rename to sql/updates/0.6/r2448_scriptdev2.sql diff --git a/sql/updates/r2450_mangos.sql b/sql/updates/0.6/r2450_mangos.sql similarity index 100% rename from sql/updates/r2450_mangos.sql rename to sql/updates/0.6/r2450_mangos.sql diff --git a/sql/updates/r2450_scriptdev2.sql b/sql/updates/0.6/r2450_scriptdev2.sql similarity index 100% rename from sql/updates/r2450_scriptdev2.sql rename to sql/updates/0.6/r2450_scriptdev2.sql diff --git a/sql/updates/r2459_mangos.sql b/sql/updates/0.6/r2459_mangos.sql similarity index 100% rename from sql/updates/r2459_mangos.sql rename to sql/updates/0.6/r2459_mangos.sql diff --git a/sql/updates/r2461_scriptdev2.sql b/sql/updates/0.6/r2461_scriptdev2.sql similarity index 100% rename from sql/updates/r2461_scriptdev2.sql rename to sql/updates/0.6/r2461_scriptdev2.sql diff --git a/sql/updates/r2462_mangos.sql b/sql/updates/0.6/r2462_mangos.sql similarity index 100% rename from sql/updates/r2462_mangos.sql rename to sql/updates/0.6/r2462_mangos.sql diff --git a/sql/updates/r2462_scriptdev2.sql b/sql/updates/0.6/r2462_scriptdev2.sql similarity index 100% rename from sql/updates/r2462_scriptdev2.sql rename to sql/updates/0.6/r2462_scriptdev2.sql diff --git a/sql/updates/r2463_mangos.sql b/sql/updates/0.6/r2463_mangos.sql similarity index 100% rename from sql/updates/r2463_mangos.sql rename to sql/updates/0.6/r2463_mangos.sql diff --git a/sql/updates/r2472_scriptdev2.sql b/sql/updates/0.6/r2472_scriptdev2.sql similarity index 100% rename from sql/updates/r2472_scriptdev2.sql rename to sql/updates/0.6/r2472_scriptdev2.sql diff --git a/sql/updates/r2479_mangos.sql b/sql/updates/0.6/r2479_mangos.sql similarity index 100% rename from sql/updates/r2479_mangos.sql rename to sql/updates/0.6/r2479_mangos.sql diff --git a/sql/updates/r2480_mangos.sql b/sql/updates/0.6/r2480_mangos.sql similarity index 100% rename from sql/updates/r2480_mangos.sql rename to sql/updates/0.6/r2480_mangos.sql diff --git a/sql/updates/r2481_mangos.sql b/sql/updates/0.6/r2481_mangos.sql similarity index 100% rename from sql/updates/r2481_mangos.sql rename to sql/updates/0.6/r2481_mangos.sql diff --git a/sql/updates/r2482_mangos.sql b/sql/updates/0.6/r2482_mangos.sql similarity index 100% rename from sql/updates/r2482_mangos.sql rename to sql/updates/0.6/r2482_mangos.sql diff --git a/sql/updates/r2484_mangos.sql b/sql/updates/0.6/r2484_mangos.sql similarity index 100% rename from sql/updates/r2484_mangos.sql rename to sql/updates/0.6/r2484_mangos.sql diff --git a/sql/updates/r2484_scriptdev2.sql b/sql/updates/0.6/r2484_scriptdev2.sql similarity index 100% rename from sql/updates/r2484_scriptdev2.sql rename to sql/updates/0.6/r2484_scriptdev2.sql diff --git a/sql/updates/r2488_scriptdev2.sql b/sql/updates/0.6/r2488_scriptdev2.sql similarity index 100% rename from sql/updates/r2488_scriptdev2.sql rename to sql/updates/0.6/r2488_scriptdev2.sql diff --git a/sql/updates/r2490_mangos.sql b/sql/updates/0.6/r2490_mangos.sql similarity index 100% rename from sql/updates/r2490_mangos.sql rename to sql/updates/0.6/r2490_mangos.sql diff --git a/sql/updates/r2490_scriptdev2.sql b/sql/updates/0.6/r2490_scriptdev2.sql similarity index 100% rename from sql/updates/r2490_scriptdev2.sql rename to sql/updates/0.6/r2490_scriptdev2.sql diff --git a/sql/updates/r2491_mangos.sql b/sql/updates/0.6/r2491_mangos.sql similarity index 100% rename from sql/updates/r2491_mangos.sql rename to sql/updates/0.6/r2491_mangos.sql diff --git a/sql/updates/r2491_scriptdev2.sql b/sql/updates/0.6/r2491_scriptdev2.sql similarity index 100% rename from sql/updates/r2491_scriptdev2.sql rename to sql/updates/0.6/r2491_scriptdev2.sql diff --git a/sql/updates/r2492_mangos.sql b/sql/updates/0.6/r2492_mangos.sql similarity index 100% rename from sql/updates/r2492_mangos.sql rename to sql/updates/0.6/r2492_mangos.sql diff --git a/sql/updates/r2493_mangos.sql b/sql/updates/0.6/r2493_mangos.sql similarity index 100% rename from sql/updates/r2493_mangos.sql rename to sql/updates/0.6/r2493_mangos.sql diff --git a/sql/updates/r2494_mangos.sql b/sql/updates/0.6/r2494_mangos.sql similarity index 100% rename from sql/updates/r2494_mangos.sql rename to sql/updates/0.6/r2494_mangos.sql diff --git a/sql/updates/r2495_mangos.sql b/sql/updates/0.6/r2495_mangos.sql similarity index 100% rename from sql/updates/r2495_mangos.sql rename to sql/updates/0.6/r2495_mangos.sql diff --git a/sql/updates/r2496_mangos.sql b/sql/updates/0.6/r2496_mangos.sql similarity index 100% rename from sql/updates/r2496_mangos.sql rename to sql/updates/0.6/r2496_mangos.sql diff --git a/sql/updates/r2497_mangos.sql b/sql/updates/0.6/r2497_mangos.sql similarity index 100% rename from sql/updates/r2497_mangos.sql rename to sql/updates/0.6/r2497_mangos.sql diff --git a/sql/updates/r2498_mangos.sql b/sql/updates/0.6/r2498_mangos.sql similarity index 100% rename from sql/updates/r2498_mangos.sql rename to sql/updates/0.6/r2498_mangos.sql diff --git a/sql/updates/r2499_mangos.sql b/sql/updates/0.6/r2499_mangos.sql similarity index 100% rename from sql/updates/r2499_mangos.sql rename to sql/updates/0.6/r2499_mangos.sql diff --git a/sql/updates/r2501_mangos.sql b/sql/updates/0.6/r2501_mangos.sql similarity index 100% rename from sql/updates/r2501_mangos.sql rename to sql/updates/0.6/r2501_mangos.sql diff --git a/sql/updates/r2502_mangos.sql b/sql/updates/0.6/r2502_mangos.sql similarity index 100% rename from sql/updates/r2502_mangos.sql rename to sql/updates/0.6/r2502_mangos.sql diff --git a/sql/updates/r2503_scriptdev2.sql b/sql/updates/0.6/r2503_scriptdev2.sql similarity index 100% rename from sql/updates/r2503_scriptdev2.sql rename to sql/updates/0.6/r2503_scriptdev2.sql diff --git a/sql/updates/r2504_mangos.sql b/sql/updates/0.6/r2504_mangos.sql similarity index 100% rename from sql/updates/r2504_mangos.sql rename to sql/updates/0.6/r2504_mangos.sql diff --git a/sql/updates/r2509_mangos.sql b/sql/updates/0.6/r2509_mangos.sql similarity index 100% rename from sql/updates/r2509_mangos.sql rename to sql/updates/0.6/r2509_mangos.sql diff --git a/sql/updates/r2510_mangos.sql b/sql/updates/0.6/r2510_mangos.sql similarity index 100% rename from sql/updates/r2510_mangos.sql rename to sql/updates/0.6/r2510_mangos.sql diff --git a/sql/updates/r2511_mangos.sql b/sql/updates/0.6/r2511_mangos.sql similarity index 100% rename from sql/updates/r2511_mangos.sql rename to sql/updates/0.6/r2511_mangos.sql diff --git a/sql/updates/r2512_mangos.sql b/sql/updates/0.6/r2512_mangos.sql similarity index 100% rename from sql/updates/r2512_mangos.sql rename to sql/updates/0.6/r2512_mangos.sql diff --git a/sql/updates/r2514_mangos.sql b/sql/updates/0.6/r2514_mangos.sql similarity index 100% rename from sql/updates/r2514_mangos.sql rename to sql/updates/0.6/r2514_mangos.sql diff --git a/sql/updates/r2516_mangos.sql b/sql/updates/0.6/r2516_mangos.sql similarity index 100% rename from sql/updates/r2516_mangos.sql rename to sql/updates/0.6/r2516_mangos.sql diff --git a/sql/updates/r2518_mangos.sql b/sql/updates/0.6/r2518_mangos.sql similarity index 100% rename from sql/updates/r2518_mangos.sql rename to sql/updates/0.6/r2518_mangos.sql diff --git a/sql/updates/r2519_scriptdev2.sql b/sql/updates/0.6/r2519_scriptdev2.sql similarity index 100% rename from sql/updates/r2519_scriptdev2.sql rename to sql/updates/0.6/r2519_scriptdev2.sql diff --git a/sql/updates/r2525_mangos.sql b/sql/updates/0.6/r2525_mangos.sql similarity index 100% rename from sql/updates/r2525_mangos.sql rename to sql/updates/0.6/r2525_mangos.sql diff --git a/sql/updates/r2528_scriptdev2.sql b/sql/updates/0.6/r2528_scriptdev2.sql similarity index 100% rename from sql/updates/r2528_scriptdev2.sql rename to sql/updates/0.6/r2528_scriptdev2.sql diff --git a/sql/updates/r2532_mangos.sql b/sql/updates/0.6/r2532_mangos.sql similarity index 100% rename from sql/updates/r2532_mangos.sql rename to sql/updates/0.6/r2532_mangos.sql diff --git a/sql/updates/r2534_scriptdev2.sql b/sql/updates/0.6/r2534_scriptdev2.sql similarity index 100% rename from sql/updates/r2534_scriptdev2.sql rename to sql/updates/0.6/r2534_scriptdev2.sql diff --git a/sql/updates/r2537_scriptdev2.sql b/sql/updates/0.6/r2537_scriptdev2.sql similarity index 100% rename from sql/updates/r2537_scriptdev2.sql rename to sql/updates/0.6/r2537_scriptdev2.sql diff --git a/sql/updates/r2538_mangos.sql b/sql/updates/0.6/r2538_mangos.sql similarity index 100% rename from sql/updates/r2538_mangos.sql rename to sql/updates/0.6/r2538_mangos.sql diff --git a/sql/updates/r2539_mangos.sql b/sql/updates/0.6/r2539_mangos.sql similarity index 100% rename from sql/updates/r2539_mangos.sql rename to sql/updates/0.6/r2539_mangos.sql diff --git a/sql/updates/r2541_mangos.sql b/sql/updates/0.6/r2541_mangos.sql similarity index 100% rename from sql/updates/r2541_mangos.sql rename to sql/updates/0.6/r2541_mangos.sql diff --git a/sql/updates/r2541_scriptdev2.sql b/sql/updates/0.6/r2541_scriptdev2.sql similarity index 100% rename from sql/updates/r2541_scriptdev2.sql rename to sql/updates/0.6/r2541_scriptdev2.sql diff --git a/sql/updates/r2542_mangos.sql b/sql/updates/0.6/r2542_mangos.sql similarity index 100% rename from sql/updates/r2542_mangos.sql rename to sql/updates/0.6/r2542_mangos.sql diff --git a/sql/updates/r2543_mangos.sql b/sql/updates/0.6/r2543_mangos.sql similarity index 100% rename from sql/updates/r2543_mangos.sql rename to sql/updates/0.6/r2543_mangos.sql diff --git a/sql/updates/r2544_mangos.sql b/sql/updates/0.6/r2544_mangos.sql similarity index 100% rename from sql/updates/r2544_mangos.sql rename to sql/updates/0.6/r2544_mangos.sql diff --git a/sql/updates/r2547_mangos.sql b/sql/updates/0.6/r2547_mangos.sql similarity index 100% rename from sql/updates/r2547_mangos.sql rename to sql/updates/0.6/r2547_mangos.sql diff --git a/sql/updates/r2548_scriptdev2.sql b/sql/updates/0.6/r2548_scriptdev2.sql similarity index 100% rename from sql/updates/r2548_scriptdev2.sql rename to sql/updates/0.6/r2548_scriptdev2.sql diff --git a/sql/updates/r2552_mangos.sql b/sql/updates/0.6/r2552_mangos.sql similarity index 100% rename from sql/updates/r2552_mangos.sql rename to sql/updates/0.6/r2552_mangos.sql diff --git a/sql/updates/r2553_mangos.sql b/sql/updates/0.6/r2553_mangos.sql similarity index 100% rename from sql/updates/r2553_mangos.sql rename to sql/updates/0.6/r2553_mangos.sql diff --git a/sql/updates/r2553_scriptdev2.sql b/sql/updates/0.6/r2553_scriptdev2.sql similarity index 100% rename from sql/updates/r2553_scriptdev2.sql rename to sql/updates/0.6/r2553_scriptdev2.sql diff --git a/sql/updates/r2556_mangos.sql b/sql/updates/0.6/r2556_mangos.sql similarity index 100% rename from sql/updates/r2556_mangos.sql rename to sql/updates/0.6/r2556_mangos.sql diff --git a/sql/updates/r2557_mangos.sql b/sql/updates/0.6/r2557_mangos.sql similarity index 100% rename from sql/updates/r2557_mangos.sql rename to sql/updates/0.6/r2557_mangos.sql diff --git a/sql/updates/r2559_scriptdev2.sql b/sql/updates/0.6/r2559_scriptdev2.sql similarity index 100% rename from sql/updates/r2559_scriptdev2.sql rename to sql/updates/0.6/r2559_scriptdev2.sql diff --git a/sql/updates/r2561_mangos.sql b/sql/updates/0.6/r2561_mangos.sql similarity index 100% rename from sql/updates/r2561_mangos.sql rename to sql/updates/0.6/r2561_mangos.sql diff --git a/sql/updates/r2562_mangos.sql b/sql/updates/0.6/r2562_mangos.sql similarity index 100% rename from sql/updates/r2562_mangos.sql rename to sql/updates/0.6/r2562_mangos.sql diff --git a/sql/updates/r2563_mangos.sql b/sql/updates/0.6/r2563_mangos.sql similarity index 100% rename from sql/updates/r2563_mangos.sql rename to sql/updates/0.6/r2563_mangos.sql diff --git a/sql/updates/r2566_scriptdev2.sql b/sql/updates/0.6/r2566_scriptdev2.sql similarity index 100% rename from sql/updates/r2566_scriptdev2.sql rename to sql/updates/0.6/r2566_scriptdev2.sql diff --git a/sql/updates/r2567_mangos.sql b/sql/updates/0.6/r2567_mangos.sql similarity index 100% rename from sql/updates/r2567_mangos.sql rename to sql/updates/0.6/r2567_mangos.sql diff --git a/sql/updates/r2567_scriptdev2.sql b/sql/updates/0.6/r2567_scriptdev2.sql similarity index 100% rename from sql/updates/r2567_scriptdev2.sql rename to sql/updates/0.6/r2567_scriptdev2.sql diff --git a/sql/updates/r2568_mangos.sql b/sql/updates/0.6/r2568_mangos.sql similarity index 100% rename from sql/updates/r2568_mangos.sql rename to sql/updates/0.6/r2568_mangos.sql diff --git a/sql/updates/r2571_mangos.sql b/sql/updates/0.6/r2571_mangos.sql similarity index 100% rename from sql/updates/r2571_mangos.sql rename to sql/updates/0.6/r2571_mangos.sql diff --git a/sql/updates/r2573_mangos.sql b/sql/updates/0.6/r2573_mangos.sql similarity index 100% rename from sql/updates/r2573_mangos.sql rename to sql/updates/0.6/r2573_mangos.sql diff --git a/sql/updates/r2574_scriptdev2.sql b/sql/updates/0.6/r2574_scriptdev2.sql similarity index 100% rename from sql/updates/r2574_scriptdev2.sql rename to sql/updates/0.6/r2574_scriptdev2.sql diff --git a/sql/updates/r2575_scriptdev2.sql b/sql/updates/0.6/r2575_scriptdev2.sql similarity index 100% rename from sql/updates/r2575_scriptdev2.sql rename to sql/updates/0.6/r2575_scriptdev2.sql diff --git a/sql/updates/r2576_scriptdev2.sql b/sql/updates/0.6/r2576_scriptdev2.sql similarity index 100% rename from sql/updates/r2576_scriptdev2.sql rename to sql/updates/0.6/r2576_scriptdev2.sql diff --git a/sql/updates/r2578_mangos.sql b/sql/updates/0.6/r2578_mangos.sql similarity index 100% rename from sql/updates/r2578_mangos.sql rename to sql/updates/0.6/r2578_mangos.sql diff --git a/sql/updates/r2580_mangos.sql b/sql/updates/0.6/r2580_mangos.sql similarity index 100% rename from sql/updates/r2580_mangos.sql rename to sql/updates/0.6/r2580_mangos.sql diff --git a/sql/updates/r2581_mangos.sql b/sql/updates/0.6/r2581_mangos.sql similarity index 100% rename from sql/updates/r2581_mangos.sql rename to sql/updates/0.6/r2581_mangos.sql diff --git a/sql/updates/r2582_mangos.sql b/sql/updates/0.6/r2582_mangos.sql similarity index 100% rename from sql/updates/r2582_mangos.sql rename to sql/updates/0.6/r2582_mangos.sql diff --git a/sql/updates/r2584_mangos.sql b/sql/updates/0.6/r2584_mangos.sql similarity index 100% rename from sql/updates/r2584_mangos.sql rename to sql/updates/0.6/r2584_mangos.sql diff --git a/sql/updates/r2584_scriptdev2.sql b/sql/updates/0.6/r2584_scriptdev2.sql similarity index 100% rename from sql/updates/r2584_scriptdev2.sql rename to sql/updates/0.6/r2584_scriptdev2.sql diff --git a/sql/updates/r2585_mangos.sql b/sql/updates/0.6/r2585_mangos.sql similarity index 100% rename from sql/updates/r2585_mangos.sql rename to sql/updates/0.6/r2585_mangos.sql diff --git a/sql/updates/r2586_scriptdev2.sql b/sql/updates/0.6/r2586_scriptdev2.sql similarity index 100% rename from sql/updates/r2586_scriptdev2.sql rename to sql/updates/0.6/r2586_scriptdev2.sql diff --git a/sql/updates/r2590_scriptdev2.sql b/sql/updates/0.6/r2590_scriptdev2.sql similarity index 100% rename from sql/updates/r2590_scriptdev2.sql rename to sql/updates/0.6/r2590_scriptdev2.sql diff --git a/sql/updates/r2591_mangos.sql b/sql/updates/0.6/r2591_mangos.sql similarity index 100% rename from sql/updates/r2591_mangos.sql rename to sql/updates/0.6/r2591_mangos.sql diff --git a/sql/updates/r2595_mangos.sql b/sql/updates/0.6/r2595_mangos.sql similarity index 100% rename from sql/updates/r2595_mangos.sql rename to sql/updates/0.6/r2595_mangos.sql diff --git a/sql/updates/r2597_mangos.sql b/sql/updates/0.6/r2597_mangos.sql similarity index 100% rename from sql/updates/r2597_mangos.sql rename to sql/updates/0.6/r2597_mangos.sql diff --git a/sql/updates/r2597_scriptdev2.sql b/sql/updates/0.6/r2597_scriptdev2.sql similarity index 100% rename from sql/updates/r2597_scriptdev2.sql rename to sql/updates/0.6/r2597_scriptdev2.sql diff --git a/sql/updates/r2598_scriptdev2.sql b/sql/updates/0.6/r2598_scriptdev2.sql similarity index 100% rename from sql/updates/r2598_scriptdev2.sql rename to sql/updates/0.6/r2598_scriptdev2.sql diff --git a/sql/updates/r2601_mangos.sql b/sql/updates/0.6/r2601_mangos.sql similarity index 100% rename from sql/updates/r2601_mangos.sql rename to sql/updates/0.6/r2601_mangos.sql diff --git a/sql/updates/r2601_scriptdev2.sql b/sql/updates/0.6/r2601_scriptdev2.sql similarity index 100% rename from sql/updates/r2601_scriptdev2.sql rename to sql/updates/0.6/r2601_scriptdev2.sql diff --git a/sql/updates/r2603_mangos.sql b/sql/updates/0.6/r2603_mangos.sql similarity index 100% rename from sql/updates/r2603_mangos.sql rename to sql/updates/0.6/r2603_mangos.sql diff --git a/sql/updates/r2604_mangos.sql b/sql/updates/0.6/r2604_mangos.sql similarity index 100% rename from sql/updates/r2604_mangos.sql rename to sql/updates/0.6/r2604_mangos.sql diff --git a/sql/updates/r2604_scriptdev2.sql b/sql/updates/0.6/r2604_scriptdev2.sql similarity index 100% rename from sql/updates/r2604_scriptdev2.sql rename to sql/updates/0.6/r2604_scriptdev2.sql diff --git a/sql/updates/r2606_mangos.sql b/sql/updates/0.6/r2606_mangos.sql similarity index 100% rename from sql/updates/r2606_mangos.sql rename to sql/updates/0.6/r2606_mangos.sql diff --git a/sql/updates/r2606_scriptdev2.sql b/sql/updates/0.6/r2606_scriptdev2.sql similarity index 100% rename from sql/updates/r2606_scriptdev2.sql rename to sql/updates/0.6/r2606_scriptdev2.sql diff --git a/sql/updates/r2608_mangos.sql b/sql/updates/0.6/r2608_mangos.sql similarity index 100% rename from sql/updates/r2608_mangos.sql rename to sql/updates/0.6/r2608_mangos.sql diff --git a/sql/updates/r2608_scriptdev2.sql b/sql/updates/0.6/r2608_scriptdev2.sql similarity index 100% rename from sql/updates/r2608_scriptdev2.sql rename to sql/updates/0.6/r2608_scriptdev2.sql diff --git a/sql/updates/r2610_scriptdev2.sql b/sql/updates/0.6/r2610_scriptdev2.sql similarity index 100% rename from sql/updates/r2610_scriptdev2.sql rename to sql/updates/0.6/r2610_scriptdev2.sql diff --git a/sql/updates/r2611_mangos.sql b/sql/updates/0.6/r2611_mangos.sql similarity index 100% rename from sql/updates/r2611_mangos.sql rename to sql/updates/0.6/r2611_mangos.sql diff --git a/sql/updates/r2611_scriptdev2.sql b/sql/updates/0.6/r2611_scriptdev2.sql similarity index 100% rename from sql/updates/r2611_scriptdev2.sql rename to sql/updates/0.6/r2611_scriptdev2.sql diff --git a/sql/updates/r2612_scriptdev2.sql b/sql/updates/0.6/r2612_scriptdev2.sql similarity index 100% rename from sql/updates/r2612_scriptdev2.sql rename to sql/updates/0.6/r2612_scriptdev2.sql diff --git a/sql/updates/r2615_scriptdev2.sql b/sql/updates/0.6/r2615_scriptdev2.sql similarity index 100% rename from sql/updates/r2615_scriptdev2.sql rename to sql/updates/0.6/r2615_scriptdev2.sql diff --git a/sql/updates/r2616_mangos.sql b/sql/updates/0.6/r2616_mangos.sql similarity index 100% rename from sql/updates/r2616_mangos.sql rename to sql/updates/0.6/r2616_mangos.sql diff --git a/sql/updates/r2616_scriptdev2.sql b/sql/updates/0.6/r2616_scriptdev2.sql similarity index 100% rename from sql/updates/r2616_scriptdev2.sql rename to sql/updates/0.6/r2616_scriptdev2.sql diff --git a/sql/updates/r2618_scriptdev2.sql b/sql/updates/0.6/r2618_scriptdev2.sql similarity index 100% rename from sql/updates/r2618_scriptdev2.sql rename to sql/updates/0.6/r2618_scriptdev2.sql diff --git a/sql/updates/r2619_scriptdev2.sql b/sql/updates/0.6/r2619_scriptdev2.sql similarity index 100% rename from sql/updates/r2619_scriptdev2.sql rename to sql/updates/0.6/r2619_scriptdev2.sql diff --git a/sql/updates/r2620_scriptdev2.sql b/sql/updates/0.6/r2620_scriptdev2.sql similarity index 100% rename from sql/updates/r2620_scriptdev2.sql rename to sql/updates/0.6/r2620_scriptdev2.sql diff --git a/sql/updates/r2623_mangos.sql b/sql/updates/0.6/r2623_mangos.sql similarity index 100% rename from sql/updates/r2623_mangos.sql rename to sql/updates/0.6/r2623_mangos.sql diff --git a/sql/updates/r2625_mangos.sql b/sql/updates/0.6/r2625_mangos.sql similarity index 100% rename from sql/updates/r2625_mangos.sql rename to sql/updates/0.6/r2625_mangos.sql diff --git a/sql/updates/r2625_scriptdev2.sql b/sql/updates/0.6/r2625_scriptdev2.sql similarity index 100% rename from sql/updates/r2625_scriptdev2.sql rename to sql/updates/0.6/r2625_scriptdev2.sql diff --git a/sql/updates/r2626_mangos.sql b/sql/updates/0.6/r2626_mangos.sql similarity index 100% rename from sql/updates/r2626_mangos.sql rename to sql/updates/0.6/r2626_mangos.sql diff --git a/sql/updates/r2626_scriptdev2.sql b/sql/updates/0.6/r2626_scriptdev2.sql similarity index 100% rename from sql/updates/r2626_scriptdev2.sql rename to sql/updates/0.6/r2626_scriptdev2.sql diff --git a/sql/updates/r2630_mangos.sql b/sql/updates/0.6/r2630_mangos.sql similarity index 100% rename from sql/updates/r2630_mangos.sql rename to sql/updates/0.6/r2630_mangos.sql diff --git a/sql/updates/r2630_scriptdev2.sql b/sql/updates/0.6/r2630_scriptdev2.sql similarity index 100% rename from sql/updates/r2630_scriptdev2.sql rename to sql/updates/0.6/r2630_scriptdev2.sql diff --git a/sql/updates/r2632_mangos.sql b/sql/updates/0.6/r2632_mangos.sql similarity index 100% rename from sql/updates/r2632_mangos.sql rename to sql/updates/0.6/r2632_mangos.sql diff --git a/sql/updates/r2635_mangos.sql b/sql/updates/0.6/r2635_mangos.sql similarity index 100% rename from sql/updates/r2635_mangos.sql rename to sql/updates/0.6/r2635_mangos.sql diff --git a/sql/updates/r2635_scriptdev2.sql b/sql/updates/0.6/r2635_scriptdev2.sql similarity index 100% rename from sql/updates/r2635_scriptdev2.sql rename to sql/updates/0.6/r2635_scriptdev2.sql diff --git a/sql/updates/r2637_mangos.sql b/sql/updates/0.6/r2637_mangos.sql similarity index 100% rename from sql/updates/r2637_mangos.sql rename to sql/updates/0.6/r2637_mangos.sql diff --git a/sql/updates/r2638_scriptdev2.sql b/sql/updates/0.6/r2638_scriptdev2.sql similarity index 100% rename from sql/updates/r2638_scriptdev2.sql rename to sql/updates/0.6/r2638_scriptdev2.sql diff --git a/sql/updates/r2641_mangos.sql b/sql/updates/0.6/r2641_mangos.sql similarity index 100% rename from sql/updates/r2641_mangos.sql rename to sql/updates/0.6/r2641_mangos.sql diff --git a/sql/updates/r2641_scriptdev2.sql b/sql/updates/0.6/r2641_scriptdev2.sql similarity index 100% rename from sql/updates/r2641_scriptdev2.sql rename to sql/updates/0.6/r2641_scriptdev2.sql diff --git a/sql/updates/r2647_mangos.sql b/sql/updates/0.6/r2647_mangos.sql similarity index 100% rename from sql/updates/r2647_mangos.sql rename to sql/updates/0.6/r2647_mangos.sql diff --git a/sql/updates/r2648_mangos.sql b/sql/updates/0.6/r2648_mangos.sql similarity index 100% rename from sql/updates/r2648_mangos.sql rename to sql/updates/0.6/r2648_mangos.sql diff --git a/sql/updates/r2649_mangos.sql b/sql/updates/0.6/r2649_mangos.sql similarity index 100% rename from sql/updates/r2649_mangos.sql rename to sql/updates/0.6/r2649_mangos.sql diff --git a/sql/updates/r2649_scriptdev2.sql b/sql/updates/0.6/r2649_scriptdev2.sql similarity index 100% rename from sql/updates/r2649_scriptdev2.sql rename to sql/updates/0.6/r2649_scriptdev2.sql diff --git a/sql/updates/r2650_scriptdev2.sql b/sql/updates/0.6/r2650_scriptdev2.sql similarity index 100% rename from sql/updates/r2650_scriptdev2.sql rename to sql/updates/0.6/r2650_scriptdev2.sql diff --git a/sql/updates/r2651_mangos.sql b/sql/updates/0.6/r2651_mangos.sql similarity index 100% rename from sql/updates/r2651_mangos.sql rename to sql/updates/0.6/r2651_mangos.sql diff --git a/sql/updates/r2651_scriptdev2.sql b/sql/updates/0.6/r2651_scriptdev2.sql similarity index 100% rename from sql/updates/r2651_scriptdev2.sql rename to sql/updates/0.6/r2651_scriptdev2.sql diff --git a/sql/updates/r2652_mangos.sql b/sql/updates/0.6/r2652_mangos.sql similarity index 100% rename from sql/updates/r2652_mangos.sql rename to sql/updates/0.6/r2652_mangos.sql diff --git a/sql/updates/r2652_scriptdev2.sql b/sql/updates/0.6/r2652_scriptdev2.sql similarity index 100% rename from sql/updates/r2652_scriptdev2.sql rename to sql/updates/0.6/r2652_scriptdev2.sql diff --git a/sql/updates/r2653_mangos.sql b/sql/updates/0.6/r2653_mangos.sql similarity index 100% rename from sql/updates/r2653_mangos.sql rename to sql/updates/0.6/r2653_mangos.sql diff --git a/sql/updates/r2655_mangos.sql b/sql/updates/0.6/r2655_mangos.sql similarity index 100% rename from sql/updates/r2655_mangos.sql rename to sql/updates/0.6/r2655_mangos.sql diff --git a/sql/updates/r2656_scriptdev2.sql b/sql/updates/0.6/r2656_scriptdev2.sql similarity index 100% rename from sql/updates/r2656_scriptdev2.sql rename to sql/updates/0.6/r2656_scriptdev2.sql diff --git a/sql/updates/r2657_mangos.sql b/sql/updates/0.6/r2657_mangos.sql similarity index 100% rename from sql/updates/r2657_mangos.sql rename to sql/updates/0.6/r2657_mangos.sql diff --git a/sql/updates/r2657_scriptdev2.sql b/sql/updates/0.6/r2657_scriptdev2.sql similarity index 100% rename from sql/updates/r2657_scriptdev2.sql rename to sql/updates/0.6/r2657_scriptdev2.sql diff --git a/sql/updates/r2658_mangos.sql b/sql/updates/0.6/r2658_mangos.sql similarity index 100% rename from sql/updates/r2658_mangos.sql rename to sql/updates/0.6/r2658_mangos.sql diff --git a/sql/updates/r2658_scriptdev2.sql b/sql/updates/0.6/r2658_scriptdev2.sql similarity index 100% rename from sql/updates/r2658_scriptdev2.sql rename to sql/updates/0.6/r2658_scriptdev2.sql diff --git a/sql/updates/r2659_scriptdev2.sql b/sql/updates/0.6/r2659_scriptdev2.sql similarity index 100% rename from sql/updates/r2659_scriptdev2.sql rename to sql/updates/0.6/r2659_scriptdev2.sql diff --git a/sql/updates/r2661_mangos.sql b/sql/updates/0.6/r2661_mangos.sql similarity index 100% rename from sql/updates/r2661_mangos.sql rename to sql/updates/0.6/r2661_mangos.sql diff --git a/sql/updates/r2661_scriptdev2.sql b/sql/updates/0.6/r2661_scriptdev2.sql similarity index 100% rename from sql/updates/r2661_scriptdev2.sql rename to sql/updates/0.6/r2661_scriptdev2.sql diff --git a/sql/updates/r2668_mangos.sql b/sql/updates/0.6/r2668_mangos.sql similarity index 100% rename from sql/updates/r2668_mangos.sql rename to sql/updates/0.6/r2668_mangos.sql diff --git a/sql/updates/r2669_mangos.sql b/sql/updates/0.6/r2669_mangos.sql similarity index 100% rename from sql/updates/r2669_mangos.sql rename to sql/updates/0.6/r2669_mangos.sql diff --git a/sql/updates/r2670_mangos.sql b/sql/updates/0.6/r2670_mangos.sql similarity index 100% rename from sql/updates/r2670_mangos.sql rename to sql/updates/0.6/r2670_mangos.sql diff --git a/sql/updates/r2671_mangos.sql b/sql/updates/0.6/r2671_mangos.sql similarity index 100% rename from sql/updates/r2671_mangos.sql rename to sql/updates/0.6/r2671_mangos.sql diff --git a/sql/updates/r2671_scriptdev2.sql b/sql/updates/0.6/r2671_scriptdev2.sql similarity index 100% rename from sql/updates/r2671_scriptdev2.sql rename to sql/updates/0.6/r2671_scriptdev2.sql diff --git a/sql/updates/r2673_mangos.sql b/sql/updates/0.6/r2673_mangos.sql similarity index 100% rename from sql/updates/r2673_mangos.sql rename to sql/updates/0.6/r2673_mangos.sql diff --git a/sql/updates/r2673_scriptdev2.sql b/sql/updates/0.6/r2673_scriptdev2.sql similarity index 100% rename from sql/updates/r2673_scriptdev2.sql rename to sql/updates/0.6/r2673_scriptdev2.sql diff --git a/sql/updates/r2674_mangos.sql b/sql/updates/0.6/r2674_mangos.sql similarity index 100% rename from sql/updates/r2674_mangos.sql rename to sql/updates/0.6/r2674_mangos.sql diff --git a/sql/updates/r2674_scriptdev2.sql b/sql/updates/0.6/r2674_scriptdev2.sql similarity index 100% rename from sql/updates/r2674_scriptdev2.sql rename to sql/updates/0.6/r2674_scriptdev2.sql diff --git a/sql/updates/r2679_mangos.sql b/sql/updates/0.6/r2679_mangos.sql similarity index 100% rename from sql/updates/r2679_mangos.sql rename to sql/updates/0.6/r2679_mangos.sql diff --git a/sql/updates/r2683_mangos.sql b/sql/updates/0.6/r2683_mangos.sql similarity index 100% rename from sql/updates/r2683_mangos.sql rename to sql/updates/0.6/r2683_mangos.sql diff --git a/sql/updates/r2685_mangos.sql b/sql/updates/0.6/r2685_mangos.sql similarity index 100% rename from sql/updates/r2685_mangos.sql rename to sql/updates/0.6/r2685_mangos.sql diff --git a/sql/updates/r2687_mangos.sql b/sql/updates/0.6/r2687_mangos.sql similarity index 100% rename from sql/updates/r2687_mangos.sql rename to sql/updates/0.6/r2687_mangos.sql diff --git a/sql/updates/r2688_mangos.sql b/sql/updates/0.6/r2688_mangos.sql similarity index 100% rename from sql/updates/r2688_mangos.sql rename to sql/updates/0.6/r2688_mangos.sql diff --git a/sql/updates/r2689_mangos.sql b/sql/updates/0.6/r2689_mangos.sql similarity index 100% rename from sql/updates/r2689_mangos.sql rename to sql/updates/0.6/r2689_mangos.sql diff --git a/sql/updates/r2690_mangos.sql b/sql/updates/0.6/r2690_mangos.sql similarity index 100% rename from sql/updates/r2690_mangos.sql rename to sql/updates/0.6/r2690_mangos.sql diff --git a/sql/updates/r2692_mangos.sql b/sql/updates/0.6/r2692_mangos.sql similarity index 100% rename from sql/updates/r2692_mangos.sql rename to sql/updates/0.6/r2692_mangos.sql diff --git a/sql/updates/r2693_mangos.sql b/sql/updates/0.6/r2693_mangos.sql similarity index 100% rename from sql/updates/r2693_mangos.sql rename to sql/updates/0.6/r2693_mangos.sql diff --git a/sql/updates/r2695_mangos.sql b/sql/updates/0.6/r2695_mangos.sql similarity index 100% rename from sql/updates/r2695_mangos.sql rename to sql/updates/0.6/r2695_mangos.sql diff --git a/sql/updates/r2695_scriptdev2.sql b/sql/updates/0.6/r2695_scriptdev2.sql similarity index 100% rename from sql/updates/r2695_scriptdev2.sql rename to sql/updates/0.6/r2695_scriptdev2.sql diff --git a/sql/updates/r2696_scriptdev2.sql b/sql/updates/0.6/r2696_scriptdev2.sql similarity index 100% rename from sql/updates/r2696_scriptdev2.sql rename to sql/updates/0.6/r2696_scriptdev2.sql diff --git a/sql/updates/r2697_scriptdev2.sql b/sql/updates/0.6/r2697_scriptdev2.sql similarity index 100% rename from sql/updates/r2697_scriptdev2.sql rename to sql/updates/0.6/r2697_scriptdev2.sql diff --git a/sql/updates/r2700_mangos.sql b/sql/updates/0.6/r2700_mangos.sql similarity index 100% rename from sql/updates/r2700_mangos.sql rename to sql/updates/0.6/r2700_mangos.sql diff --git a/sql/updates/r2701_mangos.sql b/sql/updates/0.6/r2701_mangos.sql similarity index 100% rename from sql/updates/r2701_mangos.sql rename to sql/updates/0.6/r2701_mangos.sql diff --git a/sql/updates/r2702_mangos.sql b/sql/updates/0.6/r2702_mangos.sql similarity index 100% rename from sql/updates/r2702_mangos.sql rename to sql/updates/0.6/r2702_mangos.sql diff --git a/sql/updates/r2702_scriptdev2.sql b/sql/updates/0.6/r2702_scriptdev2.sql similarity index 100% rename from sql/updates/r2702_scriptdev2.sql rename to sql/updates/0.6/r2702_scriptdev2.sql diff --git a/sql/updates/r2703_mangos.sql b/sql/updates/0.6/r2703_mangos.sql similarity index 100% rename from sql/updates/r2703_mangos.sql rename to sql/updates/0.6/r2703_mangos.sql diff --git a/sql/updates/r2704_mangos.sql b/sql/updates/0.6/r2704_mangos.sql similarity index 100% rename from sql/updates/r2704_mangos.sql rename to sql/updates/0.6/r2704_mangos.sql diff --git a/sql/updates/r2704_scriptdev2.sql b/sql/updates/0.6/r2704_scriptdev2.sql similarity index 100% rename from sql/updates/r2704_scriptdev2.sql rename to sql/updates/0.6/r2704_scriptdev2.sql diff --git a/sql/updates/r2706_mangos.sql b/sql/updates/0.6/r2706_mangos.sql similarity index 100% rename from sql/updates/r2706_mangos.sql rename to sql/updates/0.6/r2706_mangos.sql diff --git a/sql/updates/r2707_mangos.sql b/sql/updates/0.6/r2707_mangos.sql similarity index 100% rename from sql/updates/r2707_mangos.sql rename to sql/updates/0.6/r2707_mangos.sql diff --git a/sql/updates/r2708_mangos.sql b/sql/updates/0.6/r2708_mangos.sql similarity index 100% rename from sql/updates/r2708_mangos.sql rename to sql/updates/0.6/r2708_mangos.sql diff --git a/sql/updates/r2710_scriptdev2.sql b/sql/updates/0.6/r2710_scriptdev2.sql similarity index 100% rename from sql/updates/r2710_scriptdev2.sql rename to sql/updates/0.6/r2710_scriptdev2.sql diff --git a/sql/updates/r2712_mangos.sql b/sql/updates/0.6/r2712_mangos.sql similarity index 100% rename from sql/updates/r2712_mangos.sql rename to sql/updates/0.6/r2712_mangos.sql diff --git a/sql/updates/r2718_scriptdev2.sql b/sql/updates/0.6/r2718_scriptdev2.sql similarity index 100% rename from sql/updates/r2718_scriptdev2.sql rename to sql/updates/0.6/r2718_scriptdev2.sql diff --git a/sql/updates/r2720_mangos.sql b/sql/updates/0.6/r2720_mangos.sql similarity index 100% rename from sql/updates/r2720_mangos.sql rename to sql/updates/0.6/r2720_mangos.sql diff --git a/sql/updates/r2721_scriptdev2.sql b/sql/updates/0.6/r2721_scriptdev2.sql similarity index 100% rename from sql/updates/r2721_scriptdev2.sql rename to sql/updates/0.6/r2721_scriptdev2.sql diff --git a/sql/updates/r2722_mangos.sql b/sql/updates/0.6/r2722_mangos.sql similarity index 100% rename from sql/updates/r2722_mangos.sql rename to sql/updates/0.6/r2722_mangos.sql diff --git a/sql/updates/r2722_scriptdev2.sql b/sql/updates/0.6/r2722_scriptdev2.sql similarity index 100% rename from sql/updates/r2722_scriptdev2.sql rename to sql/updates/0.6/r2722_scriptdev2.sql diff --git a/sql/updates/r2730_mangos.sql b/sql/updates/0.6/r2730_mangos.sql similarity index 100% rename from sql/updates/r2730_mangos.sql rename to sql/updates/0.6/r2730_mangos.sql diff --git a/sql/updates/r2731_mangos.sql b/sql/updates/0.6/r2731_mangos.sql similarity index 100% rename from sql/updates/r2731_mangos.sql rename to sql/updates/0.6/r2731_mangos.sql diff --git a/sql/updates/r2731_scriptdev2.sql b/sql/updates/0.6/r2731_scriptdev2.sql similarity index 100% rename from sql/updates/r2731_scriptdev2.sql rename to sql/updates/0.6/r2731_scriptdev2.sql diff --git a/sql/updates/r2734_mangos.sql b/sql/updates/0.6/r2734_mangos.sql similarity index 100% rename from sql/updates/r2734_mangos.sql rename to sql/updates/0.6/r2734_mangos.sql diff --git a/sql/updates/r2734_scriptdev2.sql b/sql/updates/0.6/r2734_scriptdev2.sql similarity index 100% rename from sql/updates/r2734_scriptdev2.sql rename to sql/updates/0.6/r2734_scriptdev2.sql diff --git a/sql/updates/r2737_mangos.sql b/sql/updates/0.6/r2737_mangos.sql similarity index 100% rename from sql/updates/r2737_mangos.sql rename to sql/updates/0.6/r2737_mangos.sql diff --git a/sql/updates/r2740_scriptdev2.sql b/sql/updates/0.6/r2740_scriptdev2.sql similarity index 100% rename from sql/updates/r2740_scriptdev2.sql rename to sql/updates/0.6/r2740_scriptdev2.sql diff --git a/sql/updates/r2742_mangos.sql b/sql/updates/0.6/r2742_mangos.sql similarity index 100% rename from sql/updates/r2742_mangos.sql rename to sql/updates/0.6/r2742_mangos.sql diff --git a/sql/updates/r2742_scriptdev2.sql b/sql/updates/0.6/r2742_scriptdev2.sql similarity index 100% rename from sql/updates/r2742_scriptdev2.sql rename to sql/updates/0.6/r2742_scriptdev2.sql diff --git a/sql/updates/r2743_mangos.sql b/sql/updates/0.6/r2743_mangos.sql similarity index 100% rename from sql/updates/r2743_mangos.sql rename to sql/updates/0.6/r2743_mangos.sql diff --git a/sql/updates/r2743_scriptdev2.sql b/sql/updates/0.6/r2743_scriptdev2.sql similarity index 100% rename from sql/updates/r2743_scriptdev2.sql rename to sql/updates/0.6/r2743_scriptdev2.sql diff --git a/sql/updates/r2745_mangos.sql b/sql/updates/0.6/r2745_mangos.sql similarity index 100% rename from sql/updates/r2745_mangos.sql rename to sql/updates/0.6/r2745_mangos.sql diff --git a/sql/updates/r2745_scriptdev2.sql b/sql/updates/0.6/r2745_scriptdev2.sql similarity index 100% rename from sql/updates/r2745_scriptdev2.sql rename to sql/updates/0.6/r2745_scriptdev2.sql diff --git a/sql/updates/r2749_mangos.sql b/sql/updates/0.6/r2749_mangos.sql similarity index 100% rename from sql/updates/r2749_mangos.sql rename to sql/updates/0.6/r2749_mangos.sql diff --git a/sql/updates/r2752_mangos.sql b/sql/updates/0.6/r2752_mangos.sql similarity index 100% rename from sql/updates/r2752_mangos.sql rename to sql/updates/0.6/r2752_mangos.sql From 5a374a635f9991aa7082329dbf469ac02c9313f5 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Mon, 20 Jun 2011 23:41:39 +0300 Subject: [PATCH 0752/1172] [2756] Add support for Death Comes From On High quest (Eye of Acherus) Work based on old patches. Thanks to the unknown original authors! Note: Due to some limitations in mangos spell system, there are a bunch of hacks in the script. Signed-off-by: Schmoozerd --- .../scarlet_enclave/ebon_hold.cpp | 90 ++++++++++++++++++- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 + sql/scriptdev2_script_full.sql | 5 +- sql/updates/r2756_mangos.sql | 1 + sql/updates/r2756_scriptdev2.sql | 4 + 6 files changed, 100 insertions(+), 3 deletions(-) create mode 100644 sql/updates/r2756_mangos.sql create mode 100644 sql/updates/r2756_scriptdev2.sql diff --git a/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp b/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp index ff600d5a5..42ea7582b 100644 --- a/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp +++ b/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp @@ -17,7 +17,7 @@ /* ScriptData SDName: Ebon_Hold SD%Complete: 80 -SDComment: Quest support: 12848, 12733, 12739(and 12742 to 12750), 12727 +SDComment: Quest support: 12848, 12733, 12739(and 12742 to 12750), 12727, 12641 SDCategory: Ebon Hold EndScriptData */ @@ -27,6 +27,7 @@ npc_death_knight_initiate npc_unworthy_initiate_anchor npc_unworthy_initiate go_acherus_soul_prison +npc_eye_of_acherus EndContentData */ #include "precompiled.h" @@ -1090,6 +1091,88 @@ bool GOUse_go_acherus_soul_prison(Player* pPlayer, GameObject* pGo) return false; } +/*###### +## npc_eye_of_acherus +######*/ + +enum +{ + SPELL_EYE_CONTROL = 51852, // player control aura + SPELL_EYE_VISUAL = 51892, + SPELL_EYE_FLIGHT = 51890, // player flight control + SPELL_EYE_FLIGHT_BOOST = 51923, // flight boost to reach new avalon + + EMOTE_DESTIANTION = -1609089, + EMOTE_CONTROL = -1609090, + + POINT_EYE_DESTINATION = 0 +}; + +// movement destination coords +static const float aEyeDestination[3] = {1750.8276f, -5873.788f, 147.2266f}; + +struct MANGOS_DLL_DECL npc_eye_of_acherusAI : public ScriptedAI +{ + npc_eye_of_acherusAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_bIsInitialized = false; + m_creature->SetPhaseMask(3, true); // HACK as mangos cannot handle auras proberly, also HACK below + Reset(); + } + + bool m_bIsInitialized; + + void Reset() override {} + + void JustDied(Unit* pKiller) override + { + m_creature->CastSpell(m_creature, 52694, true); // HACK - Remove this when mangos supports proper spell casting + } + + void MovementInform(uint32 uiType, uint32 uiPointId) override + { + if (uiType != POINT_MOTION_TYPE || uiPointId != POINT_EYE_DESTINATION) + return; + + if (Player* pPlayer = m_creature->GetCharmerOrOwnerPlayerOrPlayerItself()) + DoScriptText(EMOTE_CONTROL, m_creature, pPlayer); + + DoCastSpellIfCan(m_creature, SPELL_EYE_FLIGHT, CAST_TRIGGERED); + } + + void AttackStart(Unit* pWho) override {} + + void UpdateAI(const uint32 uiDiff) override + { + if (m_bIsInitialized) + return; + + if (Player* pPlayer = m_creature->GetCharmerOrOwnerPlayerOrPlayerItself()) + { + m_creature->SetPhaseMask(2, true); // HACK remove when summon spells and auras are implemented properly in mangos + + DoScriptText(EMOTE_DESTIANTION, m_creature, pPlayer); + + DoCastSpellIfCan(m_creature, SPELL_EYE_VISUAL, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_EYE_FLIGHT_BOOST, CAST_TRIGGERED); + // Update Speed for Eye + m_creature->UpdateSpeed(MOVE_FLIGHT, true, pPlayer->GetSpeed(MOVE_FLIGHT)); + + //m_creature->RemoveSplineFlag(SPLINEFLAG_WALKMODE); + m_creature->GetMotionMaster()->MovePoint(POINT_EYE_DESTINATION, aEyeDestination[0], aEyeDestination[1], aEyeDestination[2]); + + m_bIsInitialized = true; + } + else + m_creature->ForcedDespawn(); + } +}; + +CreatureAI* GetAI_npc_eye_of_acherus(Creature* pCreature) +{ + return new npc_eye_of_acherusAI(pCreature); +} + void AddSC_ebon_hold() { Script* pNewScript; @@ -1126,4 +1209,9 @@ void AddSC_ebon_hold() pNewScript->Name = "go_acherus_soul_prison"; pNewScript->pGOUse = &GOUse_go_acherus_soul_prison; pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_eye_of_acherus"; + pNewScript->GetAI = &GetAI_npc_eye_of_acherus; + pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 1e3f9f449..fecd484c4 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2755" + #define SD2_REVISION_NR "2756" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 3fd6c439c..b57ba94d6 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -540,6 +540,7 @@ UPDATE creature_template SET ScriptName='npc_unworthy_initiate' WHERE entry IN ( UPDATE gameobject_template SET ScriptName='go_acherus_soul_prison' WHERE entry IN (191577,191580,191581,191582,191583,191584,191585,191586,191587,191588,191589,191590); UPDATE creature_template SET ScriptName='npc_a_special_surprise' WHERE entry IN (29032,29061,29065,29067,29068,29070,29074,29072,29073,29071); UPDATE creature_template SET ScriptName='npc_koltira_deathweaver' WHERE entry=28912; +UPDATE creature_template SET ScriptName='npc_eye_of_acherus' WHERE entry=28511; /* ELWYNN FOREST */ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 034938187..89ec039bb 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -3713,7 +3713,10 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1609085,'Stay in the anti-magic field! Make them come to you!',0,0,0,0,'koltira SAY_BREAKOUT7'), (-1609086,'The death of the High Inquisitor of New Avalon will not go unnoticed. You need to get out of here at once! Go, before more of them show up. I\'ll be fine on my own.',0,0,0,0,'koltira SAY_BREAKOUT8'), (-1609087,'I\'ll draw their fire, you make your escape behind me.',0,0,0,0,'koltira SAY_BREAKOUT9'), -(-1609088,'Your High Inquisitor is nothing more than a pile of meat, Crusaders! There are none beyond the grasp of the Scourge!',0,1,0,0,'koltira SAY_BREAKOUT10'); +(-1609088,'Your High Inquisitor is nothing more than a pile of meat, Crusaders! There are none beyond the grasp of the Scourge!',0,1,0,0,'koltira SAY_BREAKOUT10'), + +(-1609089,'The Eye of Acherus launches towards its destination',0,3,0,0,'eye of acherus EMOTE_DESTIANTION'), +(-1609090,'The Eye of Acherus is in your control',0,3,0,0,'eye of acherus EMOTE_CONTROL'); -- -1 615 000 OBSIDIAN SANCTUM INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES diff --git a/sql/updates/r2756_mangos.sql b/sql/updates/r2756_mangos.sql new file mode 100644 index 000000000..0d7642068 --- /dev/null +++ b/sql/updates/r2756_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_eye_of_acherus' WHERE entry=28511; diff --git a/sql/updates/r2756_scriptdev2.sql b/sql/updates/r2756_scriptdev2.sql new file mode 100644 index 000000000..8c65e1fac --- /dev/null +++ b/sql/updates/r2756_scriptdev2.sql @@ -0,0 +1,4 @@ +DELETE FROM script_texts WHERE entry IN (-1609089, -1609090); +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1609089,'The Eye of Acherus launches towards its destination',0,3,0,0,'eye of acherus EMOTE_DESTIANTION'), +(-1609090,'The Eye of Acherus is in your control',0,3,0,0,'eye of acherus EMOTE_CONTROL'); From 506669785425e3273d8d9939e79437d8cae59e64 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Tue, 20 Nov 2012 23:10:15 +0100 Subject: [PATCH 0753/1172] Forgotten ToDo.html --- docs/ToDo.html | 867 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 867 insertions(+) create mode 100644 docs/ToDo.html diff --git a/docs/ToDo.html b/docs/ToDo.html new file mode 100644 index 000000000..c5ac45217 --- /dev/null +++ b/docs/ToDo.html @@ -0,0 +1,867 @@ + + + + + +ScriptDev2 TODO Points + + + + + +
+
+

1. Cataclysm content

+
+
    +
  • +

    +Start implementing 4.x scripts for dungeons and quests +

    +
  • +
+
+
+
+

2. WotLK content

+
+
    +
  • +

    +Implement missing scripts for the Death Knigh area quests +

    +
  • +
  • +

    +Implement script for Ruby Sanctum +

    +
  • +
  • +

    +Finish script for Ulduar, Trial of the Crusader, Icecrown Citadel, Eye of Eternity and Obsidian Sanctum +

    +
  • +
  • +

    +Implement dungeon scripts for Halls of Reflection, Trial of the Champion, Pit of Saron and Culling of Stratholme (requires core proper waipoint movement support) +

    +
  • +
  • +

    +Finish dungeon scripts for Utgarde Pinnacle, Ahn’kahet and Azjol Nerub +

    +
  • +
  • +

    +Implement Year event bosses - Ahune, Headless Horseman +

    +
  • +
  • +

    +Implement various missing quest scripts +

    +
  • +
+
+
+
+

3. TBC content

+
+
    +
  • +

    +Various quests which still require script (examples: 5821, 5943, 9729, 9879, 9446, 10310, 10512, 10584, 11085, 10985) +

    +
  • +
  • +

    +Karazhan - Missing scripts: Chess event +

    +
  • +
  • +

    +Hyjal Summit - Optimize game event. +

    +
  • +
  • +

    +Black Temple - Teron Gorefiend script improvement (requires core proper mind control support) +

    +
  • +
  • +

    +Sunwell Plateau - Felmyst - phase II script missing +

    +
  • +
+
+
+
+

4. Classic content

+
+
    +
  • +

    +Various quests which still require script (examples: 660, 667, 1222, 1270, 3367, 5721) +

    +
  • +
  • +

    +Zul’farrak (requires core proper waipoint movement support). +

    +
  • +
  • +

    +Blackwing Lair - Razorgore (requires core proper mind control support). +

    +
  • +
  • +

    +Ruins of AQ - Add missing script parts for Buru and Ossirian +

    +
  • +
  • +

    +Temple of AQ - Add missing script part for Viscidus +

    +
  • +
+
+
+
+

+ + + From cd5bee7a7c3a910e63ad8f7030d190453fdc73b1 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Tue, 21 Jun 2011 00:59:27 +0300 Subject: [PATCH 0754/1172] [2757] Add placeholder for world map ebon hold --- VC100/100ScriptDev2.vcxproj | 2 + VC100/100ScriptDev2.vcxproj.filters | 6 +++ VC90/90ScriptDev2.vcproj | 8 +++ .../scarlet_enclave/ebon_hold.cpp | 1 + .../scarlet_enclave/world_map_ebon_hold.cpp | 49 +++++++++++++++++++ .../scarlet_enclave/world_map_ebon_hold.h | 19 +++++++ sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 5 +- sql/updates/r2757_mangos.sql | 3 ++ system/ScriptLoader.cpp | 2 + 10 files changed, 94 insertions(+), 3 deletions(-) create mode 100644 scripts/eastern_kingdoms/scarlet_enclave/world_map_ebon_hold.cpp create mode 100644 scripts/eastern_kingdoms/scarlet_enclave/world_map_ebon_hold.h create mode 100644 sql/updates/r2757_mangos.sql diff --git a/VC100/100ScriptDev2.vcxproj b/VC100/100ScriptDev2.vcxproj index f060551a1..52ebdb817 100644 --- a/VC100/100ScriptDev2.vcxproj +++ b/VC100/100ScriptDev2.vcxproj @@ -299,6 +299,7 @@ + @@ -682,6 +683,7 @@ + diff --git a/VC100/100ScriptDev2.vcxproj.filters b/VC100/100ScriptDev2.vcxproj.filters index 187e43315..0b6e58044 100644 --- a/VC100/100ScriptDev2.vcxproj.filters +++ b/VC100/100ScriptDev2.vcxproj.filters @@ -567,6 +567,9 @@ scripts\eastern_kingdoms\scarlet_enclave + + scripts\eastern_kingdoms\scarlet_enclave + scripts\eastern_kingdoms\scarlet_monastery @@ -1689,6 +1692,9 @@ scripts\eastern_kingdoms\molten_core + + scripts\eastern_kingdoms\scarlet_enclave + scripts\eastern_kingdoms\scarlet_monastery diff --git a/VC90/90ScriptDev2.vcproj b/VC90/90ScriptDev2.vcproj index 2e580761a..7c8d8fce3 100644 --- a/VC90/90ScriptDev2.vcproj +++ b/VC90/90ScriptDev2.vcproj @@ -810,6 +810,14 @@ RelativePath="..\scripts\eastern_kingdoms\scarlet_enclave\ebon_hold.cpp" > + + + + + * 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: world_map_ebon_hold +SD%Complete: 0 +SDComment: +SDCategory: Ebon Hold +EndScriptData */ + +#include "precompiled.h" +#include "world_map_ebon_hold.h" + +world_map_ebon_hold::world_map_ebon_hold(Map* pMap) : ScriptedInstance(pMap), + m_uiBattleEncounter(0) +{ + Initialize(); +} + +void world_map_ebon_hold::Initialize() {} + + +InstanceData* GetInstance_world_map_ebon_hold(Map* pMap) +{ + return new world_map_ebon_hold(pMap); +} + +void AddSC_world_map_ebon_hold() +{ + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "world_map_ebon_hold"; + pNewScript->GetInstanceData = &GetInstance_world_map_ebon_hold; + pNewScript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/scarlet_enclave/world_map_ebon_hold.h b/scripts/eastern_kingdoms/scarlet_enclave/world_map_ebon_hold.h new file mode 100644 index 000000000..f008690ea --- /dev/null +++ b/scripts/eastern_kingdoms/scarlet_enclave/world_map_ebon_hold.h @@ -0,0 +1,19 @@ +/* Copyright (C) 2006 - 2012 ScriptDev2 + * This program is free software licensed under GPL version 2 + * Please see the included DOCS/LICENSE.TXT for more information */ + +#ifndef DEF_EBON_HOLD_H +#define DEF_EBON_HOLD_H + +class MANGOS_DLL_DECL world_map_ebon_hold : public ScriptedInstance +{ + public: + world_map_ebon_hold(Map* pMap); + + void Initialize() override; + + protected: + uint32 m_uiBattleEncounter; // Store state of the battle around "The Light of Dawn" +}; + +#endif diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index fecd484c4..e019c3ccc 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2756" + #define SD2_REVISION_NR "2757" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index b57ba94d6..b4ecd6407 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -177,12 +177,13 @@ UPDATE creature_template SET ScriptName='spell_dummy_npc' WHERE entry IN ( UPDATE gameobject_template SET ScriptName='spell_dummy_go' WHERE entry IN (181616,186949); /* WORLD MAP SCRIPTS */ -DELETE FROM world_template WHERE map IN (0, 1, 530, 571); +DELETE FROM world_template WHERE map IN (0, 1, 530, 571, 609); INSERT INTO world_template VALUES (0, 'world_map_eastern_kingdoms'), (1, 'world_map_kalimdor'), (530, 'world_map_outland'), -(571, 'world_map_northrend'); +(571, 'world_map_northrend'), +(609, 'world_map_ebon_hold'); /* */ /* ZONE */ diff --git a/sql/updates/r2757_mangos.sql b/sql/updates/r2757_mangos.sql new file mode 100644 index 000000000..8ce5af829 --- /dev/null +++ b/sql/updates/r2757_mangos.sql @@ -0,0 +1,3 @@ +DELETE FROM world_template WHERE map=609; +INSERT INTO world_template VALUES +(609, 'world_map_ebon_hold'); diff --git a/system/ScriptLoader.cpp b/system/ScriptLoader.cpp index c6b699dd1..4342d62b5 100644 --- a/system/ScriptLoader.cpp +++ b/system/ScriptLoader.cpp @@ -26,6 +26,7 @@ extern void AddSC_npc_professions(); extern void AddSC_npcs_special(); extern void AddSC_spell_scripts(); extern void AddSC_world_map_scripts(); +extern void AddSC_world_map_ebon_hold(); // eastern kingdoms extern void AddSC_blackrock_depths(); // blackrock_depths @@ -486,6 +487,7 @@ void AddScripts() AddSC_npcs_special(); AddSC_spell_scripts(); AddSC_world_map_scripts(); + AddSC_world_map_ebon_hold(); // eastern kingdoms AddSC_blackrock_depths(); // blackrock_depths From 2e86b1efcb0cdbb77b1b4bc221d9b552b8de7b93 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Tue, 16 Aug 2011 17:18:43 +0200 Subject: [PATCH 0755/1172] [2758] Implement script for Scarlet Ghoul (quest Gift that keeps on giving 12698) --- .../scarlet_enclave/ebon_hold.cpp | 131 +++++++++++++++++- .../scarlet_enclave/world_map_ebon_hold.cpp | 20 +++ .../scarlet_enclave/world_map_ebon_hold.h | 5 + sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 + sql/scriptdev2_script_full.sql | 10 +- sql/updates/r2758_mangos.sql | 1 + sql/updates/r2758_scriptdev2.sql | 8 ++ 8 files changed, 175 insertions(+), 3 deletions(-) create mode 100644 sql/updates/r2758_mangos.sql create mode 100644 sql/updates/r2758_scriptdev2.sql diff --git a/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp b/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp index ebe723c05..09a12775d 100644 --- a/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp +++ b/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp @@ -17,7 +17,7 @@ /* ScriptData SDName: Ebon_Hold SD%Complete: 80 -SDComment: Quest support: 12848, 12733, 12739(and 12742 to 12750), 12727, 12641 +SDComment: Quest support: 12641, 12698, 12733, 12739(and 12742 to 12750), 12727, 12848 SDCategory: Ebon Hold EndScriptData */ @@ -28,11 +28,13 @@ npc_unworthy_initiate_anchor npc_unworthy_initiate go_acherus_soul_prison npc_eye_of_acherus +npc_scarlet_ghoul EndContentData */ #include "precompiled.h" #include "escort_ai.h" #include "world_map_ebon_hold.h" +#include "pet_ai.h" /*###### ## npc_a_special_surprise @@ -1174,6 +1176,127 @@ CreatureAI* GetAI_npc_eye_of_acherus(Creature* pCreature) return new npc_eye_of_acherusAI(pCreature); } +/*###### +## npc_scarlet_ghoul +######*/ + +enum +{ + SAY_GHUL_SPAWN_1 = -1609091, + SAY_GHUL_SPAWN_2 = -1609092, + SAY_GHUL_SPAWN_3 = -1609093, + SAY_GHUL_SPAWN_4 = -1609094, + SAY_GHUL_SPAWN_5 = -1609095, + SAY_GOTHIK_THROW_IN_PIT = -1609096, // TODO: Unclear if there exist more texts + + SPELL_GHOUL_SUMMONED = 52500, + SPELL_GOTHIK_GHOUL_PING = 52514, + SPELL_QUEST_CREDIT = 52517, + SPELL_GHOUL_UNSUMMON = 52555, + + NPC_GOTHIK = 28658, +}; + +static const float aPitPosition[3] = {2380.13f, -5783.06f, 151.367f}; + +struct MANGOS_DLL_DECL npc_scarlet_ghoulAI : public ScriptedPetAI +{ + npc_scarlet_ghoulAI(Creature* pCreature) : ScriptedPetAI(pCreature) + { + m_bGotHit = false; + m_bIsJumping = false; + m_bDidInitText = false; + m_uiUnsummonTimer = 0; + DoCastSpellIfCan(m_creature, SPELL_GHOUL_SUMMONED); + Reset(); + } + + bool m_bGotHit; + bool m_bIsJumping; + bool m_bDidInitText; + uint32 m_uiUnsummonTimer; + + void Reset() override {} + + void MovementInform(uint32 uiMotionType, uint32 uiPointId) override + { + if (uiMotionType == EFFECT_MOTION_TYPE && uiPointId == 1) + { + m_uiUnsummonTimer = 1000; + DoCastSpellIfCan(m_creature, SPELL_GHOUL_UNSUMMON); + m_creature->GetMotionMaster()->MoveIdle(); + } + } + + void JustDied(Unit* pKiller) override + { + DoCastSpellIfCan(m_creature, SPELL_GHOUL_UNSUMMON, CAST_TRIGGERED); + } + + void UpdateAI(const uint32 uiDiff) override + { + if (!m_bDidInitText) + { + Unit* pOwner = m_creature->GetCharmerOrOwner(); + DoScriptText(SAY_GHUL_SPAWN_1 - urand(0, 4), m_creature, pOwner); + + m_bDidInitText = true; + } + + if (m_uiUnsummonTimer) + { + if (m_uiUnsummonTimer <= uiDiff) + { + m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + if (m_creature->IsPet()) + ((Pet*)m_creature)->Unsummon(PET_SAVE_AS_DELETED); + return; + } + else + m_uiUnsummonTimer -= uiDiff; + } + + if (m_bIsJumping) + return; + + ScriptedPetAI::UpdateAI(uiDiff); + } +}; + +bool EffectDummyCreature_npc_scarlet_ghoul(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) +{ + if (uiSpellId == SPELL_GOTHIK_GHOUL_PING && uiEffIndex == EFFECT_INDEX_0) + { + if (npc_scarlet_ghoulAI* pGhoulAi = dynamic_cast(pCreatureTarget->AI())) + { + if (!pGhoulAi->m_bGotHit) // First hit + { + pCreatureTarget->CastSpell(pCreatureTarget, 52517, false); + pGhoulAi->m_bGotHit = true; + } + else // Second hit + { + world_map_ebon_hold* pInstance = static_cast(pCreatureTarget->GetInstanceData()); + if (pCaster && pInstance && pInstance->CanAndToggleGothikYell()) + DoScriptText(SAY_GOTHIK_THROW_IN_PIT, pCaster); + + float fX, fY, fZ; + pCreatureTarget->GetRandomPoint(aPitPosition[0], aPitPosition[1], aPitPosition[2], 10.0f, fX, fY, fZ); + pGhoulAi->m_bIsJumping = true; + pCreatureTarget->GetMotionMaster()->MoveJump(fX, fY, fZ, 24.21229f, 6.0f, 1); + } + } + return true; + } + + return false; +} + +CreatureAI* GetAI_npc_scarlet_ghoul(Creature* pCreature) +{ + return new npc_scarlet_ghoulAI(pCreature); +} + void AddSC_ebon_hold() { Script* pNewScript; @@ -1215,4 +1338,10 @@ void AddSC_ebon_hold() pNewScript->Name = "npc_eye_of_acherus"; pNewScript->GetAI = &GetAI_npc_eye_of_acherus; pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_scarlet_ghoul"; + pNewScript->GetAI = &GetAI_npc_scarlet_ghoul; + pNewScript->pEffectDummyNPC = &EffectDummyCreature_npc_scarlet_ghoul; + pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/scarlet_enclave/world_map_ebon_hold.cpp b/scripts/eastern_kingdoms/scarlet_enclave/world_map_ebon_hold.cpp index bb6cefcbe..81335422f 100644 --- a/scripts/eastern_kingdoms/scarlet_enclave/world_map_ebon_hold.cpp +++ b/scripts/eastern_kingdoms/scarlet_enclave/world_map_ebon_hold.cpp @@ -25,6 +25,7 @@ EndScriptData */ #include "world_map_ebon_hold.h" world_map_ebon_hold::world_map_ebon_hold(Map* pMap) : ScriptedInstance(pMap), + m_uiGothikYellTimer(0), m_uiBattleEncounter(0) { Initialize(); @@ -32,6 +33,25 @@ world_map_ebon_hold::world_map_ebon_hold(Map* pMap) : ScriptedInstance(pMap), void world_map_ebon_hold::Initialize() {} +void world_map_ebon_hold::Update(uint32 uiDiff) +{ + if (m_uiGothikYellTimer) + { + if (m_uiGothikYellTimer <= uiDiff) + m_uiGothikYellTimer = 0; + else + m_uiGothikYellTimer -= uiDiff; + } +} + +bool world_map_ebon_hold::CanAndToggleGothikYell() +{ + if (m_uiGothikYellTimer) + return false; + + m_uiGothikYellTimer = 2000; + return true; +} InstanceData* GetInstance_world_map_ebon_hold(Map* pMap) { diff --git a/scripts/eastern_kingdoms/scarlet_enclave/world_map_ebon_hold.h b/scripts/eastern_kingdoms/scarlet_enclave/world_map_ebon_hold.h index f008690ea..a994ee371 100644 --- a/scripts/eastern_kingdoms/scarlet_enclave/world_map_ebon_hold.h +++ b/scripts/eastern_kingdoms/scarlet_enclave/world_map_ebon_hold.h @@ -12,7 +12,12 @@ class MANGOS_DLL_DECL world_map_ebon_hold : public ScriptedInstance void Initialize() override; + void Update(uint32 uiDiff) override; + + bool CanAndToggleGothikYell(); + protected: + uint32 m_uiGothikYellTimer; // Timer to check if Gothik can yell (related q 12698) uint32 m_uiBattleEncounter; // Store state of the battle around "The Light of Dawn" }; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index e019c3ccc..815a1253d 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2757" + #define SD2_REVISION_NR "2758" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index b4ecd6407..6b92603e7 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -542,6 +542,7 @@ UPDATE gameobject_template SET ScriptName='go_acherus_soul_prison' WHERE entry I UPDATE creature_template SET ScriptName='npc_a_special_surprise' WHERE entry IN (29032,29061,29065,29067,29068,29070,29074,29072,29073,29071); UPDATE creature_template SET ScriptName='npc_koltira_deathweaver' WHERE entry=28912; UPDATE creature_template SET ScriptName='npc_eye_of_acherus' WHERE entry=28511; +UPDATE creature_template SET ScriptName='npc_scarlet_ghoul' WHERE entry=28845; /* ELWYNN FOREST */ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 89ec039bb..ef7a71f62 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -3716,7 +3716,15 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1609088,'Your High Inquisitor is nothing more than a pile of meat, Crusaders! There are none beyond the grasp of the Scourge!',0,1,0,0,'koltira SAY_BREAKOUT10'), (-1609089,'The Eye of Acherus launches towards its destination',0,3,0,0,'eye of acherus EMOTE_DESTIANTION'), -(-1609090,'The Eye of Acherus is in your control',0,3,0,0,'eye of acherus EMOTE_CONTROL'); +(-1609090,'The Eye of Acherus is in your control',0,3,0,0,'eye of acherus EMOTE_CONTROL'), + +(-1609091,'Mommy?',0,0,0,434,'scarlet ghoul SAY_GHUL_SPAWN_1'), +(-1609092,'GIVE ME BRAINS!',0,0,0,434,'scarlet ghoul SAY_GHUL_SPAWN_2'), +(-1609093,'Must feed...',0,0,0,434,'scarlet ghoul SAY_GHUL_SPAWN_3'), +(-1609094,'So hungry...',0,0,0,434,'scarlet ghoul SAY_GHUL_SPAWN_4'), +(-1609095,'$gPoppy:Mama;!',0,0,0,434,'scarlet ghoul SAY_GHUL_SPAWN_5'), +(-1609096,'It puts the ghoul in the pit or else it gets the lash!',0,0,0,25,'gothik the harvester SAY_GOTHIK_THROW_IN_PIT'); + -- -1 615 000 OBSIDIAN SANCTUM INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES diff --git a/sql/updates/r2758_mangos.sql b/sql/updates/r2758_mangos.sql new file mode 100644 index 000000000..ee8d476d1 --- /dev/null +++ b/sql/updates/r2758_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_scarlet_ghoul' WHERE entry=28845; diff --git a/sql/updates/r2758_scriptdev2.sql b/sql/updates/r2758_scriptdev2.sql new file mode 100644 index 000000000..b6e3b42af --- /dev/null +++ b/sql/updates/r2758_scriptdev2.sql @@ -0,0 +1,8 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1609096 AND -1609091; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1609091,'Mommy?',0,0,0,434,'scarlet ghoul SAY_GHUL_SPAWN_1'), +(-1609092,'GIVE ME BRAINS!',0,0,0,434,'scarlet ghoul SAY_GHUL_SPAWN_2'), +(-1609093,'Must feed...',0,0,0,434,'scarlet ghoul SAY_GHUL_SPAWN_3'), +(-1609094,'So hungry...',0,0,0,434,'scarlet ghoul SAY_GHUL_SPAWN_4'), +(-1609095,'$gPoppy:Mama;!',0,0,0,434,'scarlet ghoul SAY_GHUL_SPAWN_5'), +(-1609096,'It puts the ghoul in the pit or else it gets the lash!',0,0,0,25,'gothik the harvester SAY_GOTHIK_THROW_IN_PIT'); From 03c285b5676834f5f521565b92e02f41af7ddec1 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Thu, 22 Nov 2012 01:56:21 +0100 Subject: [PATCH 0756/1172] [2759] Allow GO_TYPE_TRAPDOORS to be handled with DoUseDoorOrButton Thanks to Herr_Trigger pointing to the related error message --- include/sc_instance.cpp | 2 +- sd2_revision_nr.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/sc_instance.cpp b/include/sc_instance.cpp index 4340c2280..37720cc26 100644 --- a/include/sc_instance.cpp +++ b/include/sc_instance.cpp @@ -18,7 +18,7 @@ void ScriptedInstance::DoUseDoorOrButton(ObjectGuid guid, uint32 uiWithRestoreTi if (GameObject* pGo = instance->GetGameObject(guid)) { - if (pGo->GetGoType() == GAMEOBJECT_TYPE_DOOR || pGo->GetGoType() == GAMEOBJECT_TYPE_BUTTON) + if (pGo->GetGoType() == GAMEOBJECT_TYPE_DOOR || pGo->GetGoType() == GAMEOBJECT_TYPE_BUTTON || pGo->GetGoType() == GAMEOBJECT_TYPE_TRAPDOOR) { if (pGo->getLootState() == GO_READY) pGo->UseDoorOrButton(uiWithRestoreTime, bUseAlternativeState); diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 815a1253d..9afd3e64c 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2758" + #define SD2_REVISION_NR "2759" #endif // __SD2_REVISION_NR_H__ From b2ab33968a517148c42733bd8aecd12944b5b3b9 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Thu, 22 Nov 2012 01:59:37 +0100 Subject: [PATCH 0757/1172] [2760] Toggle Gundrak and BossNovos scripts to cast spells properly This expects C-Mangos 12277+ Note that for Novos the spells were already cast properly, but before without proper visual --- scripts/northrend/draktharon_keep/boss_novos.cpp | 4 ++-- scripts/northrend/gundrak/instance_gundrak.cpp | 2 +- sd2_revision_nr.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/northrend/draktharon_keep/boss_novos.cpp b/scripts/northrend/draktharon_keep/boss_novos.cpp index 7fddace28..82415adaa 100644 --- a/scripts/northrend/draktharon_keep/boss_novos.cpp +++ b/scripts/northrend/draktharon_keep/boss_novos.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: Boss_Novos -SD%Complete: 80% -SDComment: Summon Timers are vague, many visual spells fail (LoS) +SD%Complete: 90% +SDComment: Summon Timers are vague SDCategory: Drak'Tharon Keep EndScriptData */ diff --git a/scripts/northrend/gundrak/instance_gundrak.cpp b/scripts/northrend/gundrak/instance_gundrak.cpp index 3945ea3a1..037010562 100644 --- a/scripts/northrend/gundrak/instance_gundrak.cpp +++ b/scripts/northrend/gundrak/instance_gundrak.cpp @@ -365,7 +365,7 @@ void instance_gundrak::DoAltarVisualEffect(uint8 uiType) uint32 auiFireBeamSpells[3] = {SPELL_BEAM_SNAKE, SPELL_BEAM_ELEMENTAL, SPELL_BEAM_MAMMOTH}; // Cast from Caster to Target - pCaster->CastSpell(pTarget, auiFireBeamSpells[uiIndex], true); + pCaster->CastSpell(pTarget, auiFireBeamSpells[uiIndex], false); } void instance_gundrak::Update(uint32 uiDiff) diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 9afd3e64c..417737a84 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2759" + #define SD2_REVISION_NR "2760" #endif // __SD2_REVISION_NR_H__ From eed918a29cbc3e3d917434fca8549133c86c884f Mon Sep 17 00:00:00 2001 From: Xfurry Date: Thu, 22 Nov 2012 02:10:32 +0100 Subject: [PATCH 0758/1172] [2761] Implement script for quest 12801 "The Light of Dawn" Script based on original work done by ckegg Also note that this is still a rough version, that needs further improvement Signed-off-by: Schmoozerd --- .../scarlet_enclave/ebon_hold.cpp | 1425 ++++++++++++++++- .../scarlet_enclave/world_map_ebon_hold.cpp | 214 +++ .../scarlet_enclave/world_map_ebon_hold.h | 130 ++ sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 2 + sql/scriptdev2_script_full.sql | 98 +- sql/updates/r2761_mangos.sql | 2 + sql/updates/r2761_scriptdev2.sql | 97 ++ 8 files changed, 1966 insertions(+), 4 deletions(-) create mode 100644 sql/updates/r2761_mangos.sql create mode 100644 sql/updates/r2761_scriptdev2.sql diff --git a/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp b/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp index 09a12775d..78e34e7f1 100644 --- a/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp +++ b/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: Ebon_Hold -SD%Complete: 80 -SDComment: Quest support: 12641, 12698, 12733, 12739(and 12742 to 12750), 12727, 12848 +SD%Complete: 95 +SDComment: Quest support: 12641, 12698, 12733, 12739(and 12742 to 12750), 12727, 12801, 12848 SDCategory: Ebon Hold EndScriptData */ @@ -29,6 +29,8 @@ npc_unworthy_initiate go_acherus_soul_prison npc_eye_of_acherus npc_scarlet_ghoul +npc_highlord_darion_mograine +npc_fellow_death_knight EndContentData */ #include "precompiled.h" @@ -1297,6 +1299,1413 @@ CreatureAI* GetAI_npc_scarlet_ghoul(Creature* pCreature) return new npc_scarlet_ghoulAI(pCreature); } +/*###### +## npc_highlord_darion_mograine +######*/ + +enum LightOfDawn +{ + // yells + SAY_LIGHT_OF_DAWN_INTRO_1 = -1609201, // Highlord Darion Mograine + SAY_LIGHT_OF_DAWN_INTRO_2 = -1609202, + + SAY_LIGHT_OF_DAWN_PREPARE_1 = -1609203, + SAY_LIGHT_OF_DAWN_PREPARE_2 = -1609204, + SAY_LIGHT_OF_DAWN_PREPARE_3 = -1609205, + SAY_LIGHT_OF_DAWN_PREPARE_4 = -1609206, + + SAY_LIGHT_OF_DAWN_STAND_1 = -1609207, // Korfax + SAY_LIGHT_OF_DAWN_STAND_2 = -1609208, // Lord Maxwell Tyrosus + + SAY_LIGHT_OF_DAWN_BATTLE_1 = -1609209, // Highlord Darion Mograine + SAY_LIGHT_OF_DAWN_BATTLE_2 = -1609210, + SAY_LIGHT_OF_DAWN_BATTLE_3 = -1609211, + SAY_LIGHT_OF_DAWN_BATTLE_4 = -1609212, + SAY_LIGHT_OF_DAWN_BATTLE_5 = -1609213, + SAY_LIGHT_OF_DAWN_BATTLE_6 = -1609214, + SAY_LIGHT_OF_DAWN_BATTLE_7 = -1609215, + SAY_LIGHT_OF_DAWN_BATTLE_8 = -1609216, + SAY_LIGHT_OF_DAWN_BATTLE_9 = -1609217, + SAY_LIGHT_OF_DAWN_BATTLE_10 = -1609218, + SAY_LIGHT_OF_DAWN_BATTLE_11 = -1609219, + SAY_LIGHT_OF_DAWN_BATTLE_12 = -1609220, + SAY_LIGHT_OF_DAWN_BATTLE_13 = -1609221, + SAY_LIGHT_OF_DAWN_BATTLE_14 = -1609222, + SAY_LIGHT_OF_DAWN_BATTLE_15 = -1609223, + SAY_LIGHT_OF_DAWN_BATTLE_16 = -1609224, + + SAY_LIGHT_OF_DAWN_OUTRO_1 = -1609225, // Highlord Tirion Fordring + SAY_LIGHT_OF_DAWN_OUTRO_2 = -1609226, + SAY_LIGHT_OF_DAWN_OUTRO_3 = -1609227, // Highlord Darion Mograine + SAY_LIGHT_OF_DAWN_OUTRO_4 = -1609228, // Highlord Tirion Fordring + SAY_LIGHT_OF_DAWN_OUTRO_5 = -1609229, + SAY_LIGHT_OF_DAWN_OUTRO_6 = -1609230, + SAY_LIGHT_OF_DAWN_OUTRO_7 = -1609231, // Highlord Darion Mograine + + SAY_LIGHT_OF_DAWN_VISION_1 = -1609232, // Highlord Alexandros Mograine + SAY_LIGHT_OF_DAWN_VISION_2 = -1609233, // Highlord Darion Mograine + SAY_LIGHT_OF_DAWN_VISION_3 = -1609234, + SAY_LIGHT_OF_DAWN_VISION_4 = -1609235, // Darion Mograine + SAY_LIGHT_OF_DAWN_VISION_5 = -1609236, + SAY_LIGHT_OF_DAWN_VISION_6 = -1609237, // Highlord Alexandros Mograine + SAY_LIGHT_OF_DAWN_VISION_7 = -1609238, // Darion Mograine + SAY_LIGHT_OF_DAWN_VISION_8 = -1609239, // Highlord Alexandros Mograine + SAY_LIGHT_OF_DAWN_VISION_9 = -1609240, // Darion Mograine + SAY_LIGHT_OF_DAWN_VISION_10 = -1609241, // Highlord Alexandros Mograine + SAY_LIGHT_OF_DAWN_VISION_11 = -1609242, + + SAY_LIGHT_OF_DAWN_KING_VISIT_1 = -1609243, // The Lich King + SAY_LIGHT_OF_DAWN_KING_VISIT_2 = -1609245, + SAY_LIGHT_OF_DAWN_KING_VISIT_3 = -1609244, // Highlord Darion Mograine + SAY_LIGHT_OF_DAWN_KING_VISIT_4 = -1609246, // The Lich King + SAY_LIGHT_OF_DAWN_KING_VISIT_5 = -1609247, // Highlord Tirion Fordring + SAY_LIGHT_OF_DAWN_KING_VISIT_6 = -1609248, // The Lich King + SAY_LIGHT_OF_DAWN_KING_VISIT_7 = -1609249, + SAY_LIGHT_OF_DAWN_KING_VISIT_8 = -1609250, // Lord Maxwell Tyrosus + SAY_LIGHT_OF_DAWN_KING_VISIT_9 = -1609251, // The Lich King + SAY_LIGHT_OF_DAWN_KING_VISIT_10 = -1609252, // Highlord Darion Mograine + SAY_LIGHT_OF_DAWN_KING_VISIT_11 = -1609253, + SAY_LIGHT_OF_DAWN_KING_VISIT_12 = -1609254, // Highlord Tirion Fordring + SAY_LIGHT_OF_DAWN_KING_VISIT_13 = -1609255, // The Lich King + SAY_LIGHT_OF_DAWN_KING_VISIT_14 = -1609256, // Highlord Tirion Fordring + SAY_LIGHT_OF_DAWN_KING_VISIT_15 = -1609257, // The Lich King + SAY_LIGHT_OF_DAWN_KING_VISIT_16 = -1609258, + SAY_LIGHT_OF_DAWN_KING_VISIT_17 = -1609259, + + SAY_LIGHT_OF_DAWN_EPILOGUE_1 = -1609260, // Highlord Tirion Fordring + SAY_LIGHT_OF_DAWN_EPILOGUE_2 = -1609261, + SAY_LIGHT_OF_DAWN_EPILOGUE_3 = -1609262, + SAY_LIGHT_OF_DAWN_EPILOGUE_4 = -1609263, + SAY_LIGHT_OF_DAWN_EPILOGUE_5 = -1609264, + SAY_LIGHT_OF_DAWN_EPILOGUE_6 = -1609265, + SAY_LIGHT_OF_DAWN_EPILOGUE_7 = -1609266, + SAY_LIGHT_OF_DAWN_EPILOGUE_8 = -1609267, + SAY_LIGHT_OF_DAWN_EPILOGUE_9 = -1609268, // Highlord Darion Mograine + + // Emotes + EMOTE_LIGHT_OF_DAWN_ARMY_RISE = -1609269, // Emotes + EMOTE_LIGHT_OF_DAWN_ARMY_MARCH = -1609270, + EMOTE_LIGHT_OF_DAWN_TIRION = -1609271, + EMOTE_LIGHT_OF_DAWN_FLEE = -1609272, + EMOTE_LIGHT_OF_DAWN_KNEEL = -1609273, + EMOTE_LIGHT_OF_DAWN_ALEXANDROS = -1609274, + EMOTE_LIGHT_OF_DAWN_SHADE = -1609275, + EMOTE_LIGHT_OF_DAWN_HUG = -1609276, + EMOTE_LIGHT_OF_DAWN_LICH_KING = -1609277, + EMOTE_LIGHT_OF_DAWN_ANGRY = -1609278, + EMOTE_LIGHT_OF_DAWN_CAST_SPELL = -1609279, + EMOTE_LIGHT_OF_DAWN_GRASP = -1609280, + EMOTE_LIGHT_OF_DAWN_POWERFULL = -1609281, + EMOTE_LIGHT_OF_DAWN_ASHBRINGER = -1609282, + EMOTE_LIGHT_OF_DAWN_COLAPSE = -1609283, + EMOTE_LIGHT_OF_DAWN_CHARGE = -1609284, + EMOTE_LIGHT_OF_DAWN_KING_LEAVE = -1609285, + EMOTE_LIGHT_OF_DAWN_LIGHT = -1609286, + + // Spells + // Highlord Darion Mograine + SPELL_HERO_AGGRO_AURA = 53627, + SPELL_SCOURGE_AGGRO_AURA = 53624, + SPELL_ANTI_MAGIC_ZONE_DARION = 52893, + SPELL_DEATH_STRIKE = 53639, + SPELL_DEATH_EMBRACE = 53635, + SPELL_ICY_TOUCH_DARION = 49723, + SPELL_PLAGUE_STRIKE_KNIGHTS = 50688, + SPELL_THE_MIGHT_OF_MOGRAINE = 53642, // on players when battle begins + SPELL_UNHOLY_BLIGHT = 53640, + + SPELL_BIRTH = 53603, // ground shake + SPELL_THE_LIGHT_OF_DAWN = 53658, // light globe + SPELL_THE_LIGHT_OF_DAWN_AURA = 53644, // cast when Tirion arives + SPELL_ALEXANDROS_MOGRAINE_SPAWN = 53667, // spawn effect for Alexandros + SPELL_MOGRAINE_CHARGE = 53679, // charge to the Lich King + SPELL_ASHBRINGER = 53701, // throw Ashbringer to Tirion + SPELL_THE_LIGHT_OF_DAWN_CREDIT = 53606, // quest credit + + // Lich King spells + SPELL_APOCALYPSE = 53210, // knocks back all enemies + SPELL_APOCALYPSE_STUN = 53745, // stuns all enemies + SPELL_TELEPORT_VISUAL = 52233, // on leave + SPELL_SOUL_FEAST_ALEX = 53677, // on Alexandros + SPELL_SOUL_FEAST_TIRION = 53685, // on Tirion + SPELL_ICEBOUND_VISAGE = 53274, // ice effect + SPELL_REBUKE = 53680, // knockback + + // Highlord Tirion Fordring + //EQUIP_HIGHLORD_TIRION_FORDRING = 13262, + SPELL_LAY_ON_HANDS = 53778, // heal effect + SPELL_REBIRTH_OF_THE_ASHBRINGER = 53702, // globe sphere + SPELL_TIRION_CHARGE = 53705, // on the lich king + + POINT_MOVE_CHAPEL = 100, // Use high entries to not conflict with escortAI waypoints + POINT_MOVE_OTHER = 101, + POINT_MOVE_RETURN_BATTLE = 102, + + // others + QUEST_ID_LIGHT_OF_DAWN = 12801, + + GOSSIP_ITEM_READY = -3609001 +}; + +struct MANGOS_DLL_DECL npc_highlord_darion_mograineAI : public npc_escortAI +{ + npc_highlord_darion_mograineAI(Creature* pCreature) : npc_escortAI(pCreature) + { + m_pInstance = (world_map_ebon_hold*)pCreature->GetInstanceData(); + Reset(); + } + + world_map_ebon_hold* m_pInstance; + + // event timers + uint8 m_uiIntroYell; + uint32 m_uiPrepareTimer; + + uint32 m_uiEventStep; + uint32 m_uiEventTimer; + uint32 m_uiFightTimer; + + uint8 m_uiLightWarriorsDead; + uint8 m_uiScourgeWarriorsDead; + + // spell timers + uint32 m_uiAntimagicZoneTimer; + uint32 m_uiDeathStrikeTimer; + uint32 m_uiDeathEmbraceTimer; + uint32 m_uiIcyTouchTimer; + uint32 m_uiUnholyBlightTimer; + uint32 m_uiFightSpeechTimer; + + uint32 m_uiSpawncheck; + uint32 m_uiTargetcheck; + + // others + GuidList m_lDefendersGUIDs; // light of dawn defenders + GuidList m_lAttackersGUIDs; // scourge attackers + + void Reset() override + { + // reset only when event is not in progress + if (!HasEscortState(STATE_ESCORT_ESCORTING)) + { + m_uiIntroYell = 0; + m_uiPrepareTimer = 5 * MINUTE * IN_MILLISECONDS; + + m_uiEventStep = 0; + m_uiEventTimer = 3000; + m_uiFightTimer = 0; + + m_uiLightWarriorsDead = 0; + m_uiScourgeWarriorsDead = 0; + + m_uiAntimagicZoneTimer = urand(1000, 5000); + m_uiDeathStrikeTimer = urand(5000, 10000); + m_uiDeathEmbraceTimer = urand(5000, 10000); + m_uiIcyTouchTimer = urand(5000, 10000); + m_uiUnholyBlightTimer = urand(5000, 10000); + m_uiFightSpeechTimer = 15000; + } + } + + void GetAIInformation(ChatHandler& reader) override + { + npc_escortAI::GetAIInformation(reader); + + if (m_pInstance) + reader.PSendSysMessage("Current state for TYPE_BATTLE: %u", m_pInstance->GetData(TYPE_BATTLE)); + + reader.PSendSysMessage("Current Event step: %u (%s)", m_uiEventStep, m_uiEventStep == 0 ? "Not-Started" : m_uiEventStep < 7 ? "Intro" : m_uiEventStep < 10 ? "Battle" : "Outro"); + reader.PSendSysMessage("Event-processing is %s, Fighting is %s", reader.GetOnOffStr(m_uiEventTimer), reader.GetOnOffStr(m_uiFightTimer)); + } + + void Aggro(Unit* pWho) override + { + // cast aggro aura + DoCastSpellIfCan(m_creature, SPELL_HERO_AGGRO_AURA); + } + + void JustSummoned(Creature* pSummoned) override + { + // store summoned guid for easy handle + switch (pSummoned->GetEntry()) + { + case NPC_VOLATILE_GHOUL: + case NPC_WARRIOR_OF_THE_FROZEN_WASTES: + m_lAttackersGUIDs.push_back(pSummoned->GetObjectGuid()); + // make the scourge attack only during the battle + if (m_creature->isInCombat()) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + pSummoned->AI()->AttackStart(pTarget); + } + break; + case NPC_DEFENDER_OF_THE_LIGHT: + m_lDefendersGUIDs.push_back(pSummoned->GetObjectGuid()); + break; + } + + // set respawn delay + pSummoned->SetRespawnDelay(DAY); + } + + void SummonedCreatureJustDied(Creature* pSummoned) override + { + // if battle has ended return + if (m_pInstance->GetData(TYPE_BATTLE) != IN_PROGRESS) + return; + + // should we count the 2 behemots and 5 abominations as well? + switch (pSummoned->GetEntry()) + { + case NPC_VOLATILE_GHOUL: + case NPC_WARRIOR_OF_THE_FROZEN_WASTES: + ++m_uiScourgeWarriorsDead; + m_lAttackersGUIDs.remove(pSummoned->GetObjectGuid()); + + if (m_pInstance) + m_pInstance->DoUpdateBattleWorldState(WORLD_STATE_FORCES_SCOURGE, MAX_FORCES_SCOURGE - m_uiScourgeWarriorsDead); + + // if 5 soldiers are dead summon others + if (m_uiScourgeWarriorsDead % MAX_WARRIORS_SUMMONED_PER_TURN == 0) + { + DoCastSpellIfCan(m_creature, SPELL_BIRTH); + + float fX, fY, fZ; + // Actually this is some sort of cheat - but so many scourge numbers fall (currently), that I think it is ok to increase the summon amount + for (uint8 i = 0; i < MAX_WARRIORS_SUMMONED_PER_TURN + 1; ++i) + { + uint32 uiSummonEntry = urand(0, 1) ? NPC_VOLATILE_GHOUL : NPC_WARRIOR_OF_THE_FROZEN_WASTES; + m_creature->GetRandomPoint(aEventLocations[1].m_fX, aEventLocations[1].m_fY, aEventLocations[1].m_fZ, 30.0f, fX, fY, fZ); + m_creature->SummonCreature(uiSummonEntry, fX, fY, fZ, 0.0f, TEMPSUMMON_CORPSE_DESPAWN, 5000); + } + } + break; + case NPC_DEFENDER_OF_THE_LIGHT: + ++m_uiLightWarriorsDead; + m_lDefendersGUIDs.remove(pSummoned->GetObjectGuid()); + + if (m_pInstance) + m_pInstance->DoUpdateBattleWorldState(WORLD_STATE_FORCES_LIGHT, MAX_FORCES_LIGHT - m_uiLightWarriorsDead); + + // if 5 light soldiers are dead summon others + if (m_uiLightWarriorsDead % MAX_WARRIORS_SUMMONED_PER_TURN == 0) + { + float fX, fY, fZ; + for (uint8 i = 0; i < MAX_WARRIORS_SUMMONED_PER_TURN; i++) + { + m_creature->GetRandomPoint(aEventLocations[1].m_fX, aEventLocations[1].m_fY, aEventLocations[1].m_fZ, 30.0f, fX, fY, fZ); + m_creature->SummonCreature(NPC_DEFENDER_OF_THE_LIGHT, fX, fY, fZ, 0.0f, TEMPSUMMON_CORPSE_DESPAWN, 5000); + } + } + break; + } + } + + void SummonedMovementInform(Creature* pSummoned, uint32 uiType, uint32 uiPointId) override + { + if (uiType != POINT_MOTION_TYPE || uiPointId != POINT_MOVE_CHAPEL) + return; + + if (!m_pInstance) + return; + + switch (pSummoned->GetEntry()) + { + // hug father + case NPC_DARION_MOGRAINE: + if (Creature* pAlexandros = m_pInstance->GetSingleCreatureFromStorage(NPC_HIGHLORD_ALEXANDROS_MOGRAINE)) + DoScriptText(EMOTE_LIGHT_OF_DAWN_HUG, pSummoned, pAlexandros); + break; + case NPC_HIGHLORD_TIRION_FORDRING: + // tirions stops the battle and brings the DK in front of the chapel + DoScriptText(SAY_LIGHT_OF_DAWN_OUTRO_2, pSummoned); + m_pInstance->SetData(TYPE_BATTLE, DONE); + + // scourge fighters die + for (GuidList::const_iterator itr = m_lAttackersGUIDs.begin(); itr != m_lAttackersGUIDs.end(); ++itr) + { + if (Creature* pTemp = m_creature->GetMap()->GetCreature(*itr)) + { + pTemp->CastSpell(pTemp, SPELL_THE_LIGHT_OF_DAWN_DAMAGE, true); + pTemp->DealDamage(pTemp, pTemp->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + } + } + + // light fighters despawn + for (GuidList::const_iterator itr = m_lDefendersGUIDs.begin(); itr != m_lDefendersGUIDs.end(); ++itr) + { + if (Creature* pTemp = m_creature->GetMap()->GetCreature(*itr)) + pTemp->ForcedDespawn(); + } + + // despawn big units + m_pInstance->DoDespawnArmy(); + + // facing and mount + pSummoned->Unmount(); + pSummoned->SetFacingTo(aEventLocations[1].m_fO); + + m_creature->Unmount(); + + if (!HasEscortState(STATE_ESCORT_PAUSED)) + { + SetEscortPaused(true); // In case something didn't go as expected + SetCurrentWaypoint(5); + m_uiEventTimer = 60000; // Another failsafe + } + SetEscortPaused(false); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PASSIVE); + SetRun(false); + m_creature->AI()->EnterEvadeMode(); + + DoCastSpellIfCan(m_creature, SPELL_THE_LIGHT_OF_DAWN); + + // death knights are defeated + if (Creature* pKoltira = m_pInstance->GetSingleCreatureFromStorage(NPC_KOLTIRA_DEATHWEAVER)) + pKoltira->AI()->EnterEvadeMode(); + if (Creature* pThassarian = m_pInstance->GetSingleCreatureFromStorage(NPC_THASSARIAN)) + pThassarian->AI()->EnterEvadeMode(); + // Orbaz flees -> despawn + if (Creature* pOrbaz = m_pInstance->GetSingleCreatureFromStorage(NPC_ORBAZ_BLOODBANE)) + { + DoScriptText(EMOTE_LIGHT_OF_DAWN_FLEE, pOrbaz); + pOrbaz->AI()->EnterEvadeMode(); + pOrbaz->ForcedDespawn(30000); + } + + // ligth champs evade to their summon points + for (uint8 i = 0; i < MAX_LIGHT_CHAMPIONS; i++) + { + if (Creature* pTemp = m_pInstance->GetSingleCreatureFromStorage(aLightArmySpawnLoc[i].m_uiEntry)) + { + // normally it shouldn't happen + if (!pTemp->isAlive()) + pTemp->Respawn(); + else + pTemp->AI()->EnterEvadeMode(); + + pTemp->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PASSIVE); + pTemp->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + } + } + + // clear defenders list + m_lDefendersGUIDs.clear(); + + // spawn soldiers + for (uint8 i = 0; i < MAX_LIGHT_GUARDS; ++i) + { + if (Creature* pGuard = m_creature->SummonCreature(NPC_DEFENDER_OF_THE_LIGHT, aGuardsSpawnLoc[i].m_fX, aGuardsSpawnLoc[i].m_fY, aGuardsSpawnLoc[i].m_fZ, aGuardsSpawnLoc[i].m_fO, TEMPSUMMON_CORPSE_DESPAWN, 0)) + { + // make guard passive and with weapon + pGuard->SetFacingToObject(m_creature); + // should be 2 handed when the DB data is correct + pGuard->HandleEmoteCommand(EMOTE_STATE_READY2H); + pGuard->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + pGuard->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PASSIVE); + } + } + + break; + } + } + + void MovementInform(uint32 uiMotionType, uint32 uiPointId) + { + if (uiPointId < POINT_MOVE_CHAPEL || uiPointId > 10 * POINT_MOVE_RETURN_BATTLE) + { + npc_escortAI::MovementInform(uiMotionType, uiPointId); + return; + } + + if (uiMotionType == POINT_MOTION_TYPE && uiPointId == POINT_MOVE_RETURN_BATTLE) + { + SetCombatMovement(false); + DoStartMovement(m_creature->getVictim()); + } + } + + void JustRespawned() override + { + m_creature->SetActiveObjectState(false); + + if (m_pInstance) + m_pInstance->SetData(TYPE_BATTLE, NOT_STARTED); + + npc_escortAI::JustRespawned(); + } + + void WaypointReached(uint32 uiPoint) override + { + if (!m_pInstance) + return; + + switch (uiPoint) + { + case 0: + // summon light champions + for (uint8 i = 0; i < MAX_LIGHT_CHAMPIONS; i++) + m_creature->SummonCreature(aLightArmySpawnLoc[i].m_uiEntry, aLightArmySpawnLoc[i].m_fX, aLightArmySpawnLoc[i].m_fY, aLightArmySpawnLoc[i].m_fZ, aLightArmySpawnLoc[i].m_fO, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 5 * MINUTE * IN_MILLISECONDS); + + // summon light soldiers + float fX, fY, fZ; + for (uint8 i = 0; i < 5 * MAX_WARRIORS_SUMMONED_PER_TURN; ++i) + { + m_creature->GetRandomPoint(aEventLocations[1].m_fX, aEventLocations[1].m_fY, aEventLocations[1].m_fZ, 30.0f, fX, fY, fZ); + m_creature->SummonCreature(NPC_DEFENDER_OF_THE_LIGHT, fX, fY, fZ, 0.0f, TEMPSUMMON_CORPSE_DESPAWN, 5000); + } + break; + case 2: + // yell dawn 1 + if (Creature* pKorfax = m_pInstance->GetSingleCreatureFromStorage(NPC_KORFAX_CHAMPION_OF_THE_LIGHT)) + DoScriptText(SAY_LIGHT_OF_DAWN_STAND_1, pKorfax); + break; + case 3: + // yell dawn 2 + if (Creature* pMaxwell = m_pInstance->GetSingleCreatureFromStorage(NPC_LORD_MAXWELL_TYROSUS)) + DoScriptText(SAY_LIGHT_OF_DAWN_STAND_2, pMaxwell); + + DoCastSpellIfCan(m_creature, SPELL_THE_MIGHT_OF_MOGRAINE); + // max fight timer + m_uiFightTimer = 5 * MINUTE * IN_MILLISECONDS; + break; + case 4: + // start the battle + SetEscortPaused(true); + + // start attacking someone + if (Creature* pChamp = m_pInstance->GetSingleCreatureFromStorage(aLightArmySpawnLoc[urand(0, MAX_LIGHT_CHAMPIONS - 1)].m_uiEntry)) + m_creature->AI()->AttackStart(pChamp); + + // make army attack + for (GuidList::const_iterator itr = m_lAttackersGUIDs.begin(); itr != m_lAttackersGUIDs.end(); ++itr) + { + if (Creature* pTemp = m_creature->GetMap()->GetCreature(*itr)) + { + if (Creature* pChamp = m_pInstance->GetSingleCreatureFromStorage(aLightArmySpawnLoc[urand(0, MAX_LIGHT_CHAMPIONS - 1)].m_uiEntry)) + m_creature->AI()->AttackStart(pTemp); + } + } + + // need to make sure that all defenders attack + for (GuidList::const_iterator itr = m_lDefendersGUIDs.begin(); itr != m_lDefendersGUIDs.end(); ++itr) + { + if (Creature* pTemp = m_creature->GetMap()->GetCreature(*itr)) + pTemp->AI()->AttackStart(m_creature); + } + break; + case 5: + // battle finished - remove light of dawn aura + DoScriptText(EMOTE_LIGHT_OF_DAWN_KNEEL, m_creature); + DoScriptText(SAY_LIGHT_OF_DAWN_OUTRO_3, m_creature); + + if (m_creature->HasAura(SPELL_THE_LIGHT_OF_DAWN)) + m_creature->RemoveAurasDueToSpell(SPELL_THE_LIGHT_OF_DAWN); + + m_creature->SetStandState(UNIT_STAND_STATE_KNEEL); + + if (Creature* pTirion = m_pInstance->GetSingleCreatureFromStorage(NPC_HIGHLORD_TIRION_FORDRING)) + m_creature->SetFacingToObject(pTirion); + + // update guards facing + for (GuidList::const_iterator itr = m_lDefendersGUIDs.begin(); itr != m_lDefendersGUIDs.end(); ++itr) + { + if (Creature* pTemp = m_creature->GetMap()->GetCreature(*itr)) + pTemp->SetFacingToObject(m_creature); + } + + // escort paused and start cinematic + m_uiEventTimer = 10000; + SetEscortPaused(true); + break; + } + } + + // override evade function to always check for targets while in battle + void EnterEvadeMode() override + { + if (!m_pInstance) + return; + + // if evade while the battle is in progress start attacking another target + if (m_pInstance->GetData(TYPE_BATTLE) == IN_PROGRESS) + { + // attack random champion + if (Creature* pChamp = m_pInstance->GetSingleCreatureFromStorage(aLightArmySpawnLoc[urand(0, MAX_LIGHT_CHAMPIONS - 1)].m_uiEntry)) + m_creature->AI()->AttackStart(pChamp); + } + else + npc_escortAI::EnterEvadeMode(); + } + + void DoSendQuestCredit() + { + Map::PlayerList const& PlayerList = m_creature->GetMap()->GetPlayers(); + + for (Map::PlayerList::const_iterator itr = PlayerList.begin(); itr != PlayerList.end(); ++itr) + { + Player* pPlayer = itr->getSource(); + if (pPlayer && pPlayer->GetQuestStatus(QUEST_ID_LIGHT_OF_DAWN) == QUEST_STATUS_INCOMPLETE && pPlayer->isAlive() && m_creature->IsWithinDistInMap(pPlayer, 50.0f)) + pPlayer->CastSpell(pPlayer, SPELL_THE_LIGHT_OF_DAWN_CREDIT, true); + } + } + + void UpdateEscortAI(const uint32 uiDiff) override + { + if (m_pInstance->GetData(TYPE_BATTLE) == SPECIAL) + { + // intro event and battle timer + if (m_uiIntroYell == 0 && m_uiPrepareTimer < 3 * MINUTE * IN_MILLISECONDS) + { + DoScriptText(SAY_LIGHT_OF_DAWN_INTRO_1, m_creature); + ++m_uiIntroYell; + } + else if (m_uiIntroYell == 1 && m_uiPrepareTimer < 2 * MINUTE * IN_MILLISECONDS) + { + DoScriptText(SAY_LIGHT_OF_DAWN_INTRO_2, m_creature); + ++m_uiIntroYell; + } + + // battle prepare timer + if (m_uiPrepareTimer < uiDiff) + { + if (m_pInstance) + m_pInstance->SetData(TYPE_BATTLE, IN_PROGRESS); + } + else + { + m_uiPrepareTimer -= uiDiff; + + if (m_uiPrepareTimer / IN_MILLISECONDS % 60 == 0) + { + if (m_pInstance) + m_pInstance->DoUpdateBattleWorldState(WORLD_STATE_BATTLE_TIMER_TIME, m_uiPrepareTimer / (MINUTE * IN_MILLISECONDS)); + } + } + } + else if (m_pInstance->GetData(TYPE_BATTLE) == IN_PROGRESS || m_pInstance->GetData(TYPE_BATTLE) == DONE) + { + if (m_uiEventTimer) + { + if (m_uiEventTimer <= uiDiff) + { + if (!m_pInstance) + return; + + switch (m_uiEventStep) + { + case 0: + DoScriptText(SAY_LIGHT_OF_DAWN_PREPARE_1, m_creature); + m_uiEventTimer = 5000; + break; + case 1: + DoScriptText(SAY_LIGHT_OF_DAWN_PREPARE_2, m_creature); + m_uiEventTimer = 10000; + break; + case 2: + DoScriptText(SAY_LIGHT_OF_DAWN_PREPARE_3, m_creature); + m_uiEventTimer = 3000; + break; + case 3: + DoScriptText(EMOTE_LIGHT_OF_DAWN_ARMY_RISE, m_creature); + case 4: + case 5: + // summon army takes about 20 secs and it's done on a few stages; no break between them + if (DoCastSpellIfCan(m_creature, SPELL_BIRTH) == CAST_OK) + { + float fX, fY, fZ; + for (uint8 i = 0; i < MAX_WARRIORS_SUMMONED_PER_TURN; ++i) + { + // Note: missing spawn effect for them! + uint32 uiSummonEntry = urand(0, 1) ? NPC_VOLATILE_GHOUL : NPC_WARRIOR_OF_THE_FROZEN_WASTES; + m_creature->GetRandomPoint(m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), 50.0f, fX, fY, fZ); + m_creature->SummonCreature(uiSummonEntry, fX, fY, fZ, 0.0f, TEMPSUMMON_CORPSE_DESPAWN, 0); + } + + m_uiEventTimer = 6000; + } + break; + case 6: + DoScriptText(SAY_LIGHT_OF_DAWN_PREPARE_4, m_creature); + m_uiEventTimer = 2000; + break; + case 7: + // send army emote + for (GuidList::const_iterator itr = m_lAttackersGUIDs.begin(); itr != m_lAttackersGUIDs.end(); ++itr) + { + if (Creature* pTemp = m_creature->GetMap()->GetCreature(*itr)) + { + //pTemp->SetFacingToObject(m_creature); + pTemp->HandleEmoteCommand(EMOTE_ONESHOT_BATTLEROAR); + } + } + m_uiEventTimer = 6000; + break; + case 8: + // start attack (escort) + DoScriptText(EMOTE_LIGHT_OF_DAWN_ARMY_MARCH, m_creature); + m_creature->SetActiveObjectState(true); + Start(true); + + // move the companions as well + float fX, fY, fZ; + if (Creature* pKoltira = m_pInstance->GetSingleCreatureFromStorage(NPC_KOLTIRA_DEATHWEAVER)) + { + pKoltira->SetWalk(false); + m_creature->GetRandomPoint(aEventLocations[1].m_fX, aEventLocations[1].m_fY, aEventLocations[1].m_fZ, 30.0f, fX, fY, fZ); + pKoltira->GetMotionMaster()->MovePoint(0, fX, fY, fZ); + } + if (Creature* pThassarian = m_pInstance->GetSingleCreatureFromStorage(NPC_THASSARIAN)) + { + pThassarian->SetWalk(false); + m_creature->GetRandomPoint(aEventLocations[1].m_fX, aEventLocations[1].m_fY, aEventLocations[1].m_fZ, 30.0f, fX, fY, fZ); + pThassarian->GetMotionMaster()->MovePoint(0, fX, fY, fZ); + } + if (Creature* pOrbaz = m_pInstance->GetSingleCreatureFromStorage(NPC_ORBAZ_BLOODBANE)) + { + pOrbaz->SetWalk(false); + m_creature->GetRandomPoint(aEventLocations[1].m_fX, aEventLocations[1].m_fY, aEventLocations[1].m_fZ, 30.0f, fX, fY, fZ); + pOrbaz->GetMotionMaster()->MovePoint(0, fX, fY, fZ); + } + + // move army + for (GuidList::const_iterator itr = m_lAttackersGUIDs.begin(); itr != m_lAttackersGUIDs.end(); ++itr) + { + if (Creature* pTemp = m_creature->GetMap()->GetCreature(*itr)) + { + pTemp->SetWalk(false); + m_creature->GetRandomPoint(aEventLocations[1].m_fX, aEventLocations[1].m_fY, aEventLocations[1].m_fZ, 30.0f, fX, fY, fZ); + pTemp->GetMotionMaster()->MovePoint(0, fX, fY, fZ); + } + } + // move big units + m_pInstance->DoMoveArmy(); + m_uiEventTimer = 0; + break; + case 9: + // after the battle + if (Creature* pTirion = m_pInstance->GetSingleCreatureFromStorage(NPC_HIGHLORD_TIRION_FORDRING)) + DoScriptText(SAY_LIGHT_OF_DAWN_OUTRO_4, pTirion); + m_uiEventTimer = 21000; + break; + case 10: + if (Creature* pTirion = m_pInstance->GetSingleCreatureFromStorage(NPC_HIGHLORD_TIRION_FORDRING)) + DoScriptText(SAY_LIGHT_OF_DAWN_OUTRO_5, pTirion); + m_uiEventTimer = 13000; + break; + case 11: + if (Creature* pTirion = m_pInstance->GetSingleCreatureFromStorage(NPC_HIGHLORD_TIRION_FORDRING)) + DoScriptText(SAY_LIGHT_OF_DAWN_OUTRO_6, pTirion); + m_uiEventTimer = 13000; + break; + case 12: + m_creature->SetStandState(UNIT_STAND_STATE_STAND); + DoScriptText(SAY_LIGHT_OF_DAWN_OUTRO_7, m_creature); + m_uiEventTimer = 7000; + break; + case 13: + // start Alexandros vision + if (Creature* pAlexandros = m_creature->SummonCreature(NPC_HIGHLORD_ALEXANDROS_MOGRAINE, aEventLocations[4].m_fX, aEventLocations[4].m_fY, aEventLocations[4].m_fZ, aEventLocations[4].m_fO, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 3000)) + { + DoScriptText(EMOTE_LIGHT_OF_DAWN_ALEXANDROS, pAlexandros); + pAlexandros->CastSpell(pAlexandros, SPELL_ALEXANDROS_MOGRAINE_SPAWN, true); + } + m_uiEventTimer = 4000; + break; + case 14: + if (Creature* pAlexandros = m_pInstance->GetSingleCreatureFromStorage(NPC_HIGHLORD_ALEXANDROS_MOGRAINE)) + { + pAlexandros->GetMotionMaster()->MovePoint(POINT_MOVE_OTHER, aEventLocations[5].m_fX, aEventLocations[5].m_fY, aEventLocations[5].m_fZ); + DoScriptText(SAY_LIGHT_OF_DAWN_VISION_1, pAlexandros); + m_creature->SetFacingToObject(pAlexandros); + } + m_uiEventTimer = 2000; + break; + case 15: + DoScriptText(SAY_LIGHT_OF_DAWN_VISION_2, m_creature); + m_uiEventTimer = 4000; + break; + case 16: + DoScriptText(SAY_LIGHT_OF_DAWN_VISION_3, m_creature); + m_creature->SetStandState(UNIT_STAND_STATE_KNEEL); + // summon young Darion for 1 min + if (Creature* pDarion = m_creature->SummonCreature(NPC_DARION_MOGRAINE, aEventLocations[6].m_fX, aEventLocations[6].m_fY, aEventLocations[6].m_fZ, aEventLocations[6].m_fO, TEMPSUMMON_TIMED_DESPAWN, 1 * MINUTE * IN_MILLISECONDS)) + DoScriptText(EMOTE_LIGHT_OF_DAWN_SHADE, pDarion); + m_uiEventTimer = 3000; + break; + case 17: + if (Creature* pDarion = m_pInstance->GetSingleCreatureFromStorage(NPC_DARION_MOGRAINE)) + DoScriptText(SAY_LIGHT_OF_DAWN_VISION_4, pDarion); + m_uiEventTimer = 3000; + break; + case 18: + // young darion runs to father + if (Creature* pDarion = m_pInstance->GetSingleCreatureFromStorage(NPC_DARION_MOGRAINE)) + { + pDarion->SetWalk(false); + pDarion->GetMotionMaster()->MovePoint(POINT_MOVE_CHAPEL, aEventLocations[7].m_fX, aEventLocations[7].m_fY, aEventLocations[7].m_fZ); + } + m_uiEventTimer = 5000; + break; + case 19: + if (Creature* pDarion = m_pInstance->GetSingleCreatureFromStorage(NPC_DARION_MOGRAINE)) + DoScriptText(SAY_LIGHT_OF_DAWN_VISION_5, pDarion); + m_uiEventTimer = 5000; + break; + case 20: + if (Creature* pAlexandros = m_pInstance->GetSingleCreatureFromStorage(NPC_HIGHLORD_ALEXANDROS_MOGRAINE)) + DoScriptText(SAY_LIGHT_OF_DAWN_VISION_6, pAlexandros); + m_uiEventTimer = 8000; + break; + case 21: + if (Creature* pDarion = m_pInstance->GetSingleCreatureFromStorage(NPC_DARION_MOGRAINE)) + DoScriptText(SAY_LIGHT_OF_DAWN_VISION_7, pDarion); + m_uiEventTimer = 8000; + break; + case 22: + if (Creature* pAlexandros = m_pInstance->GetSingleCreatureFromStorage(NPC_HIGHLORD_ALEXANDROS_MOGRAINE)) + DoScriptText(SAY_LIGHT_OF_DAWN_VISION_8, pAlexandros); + + // move Tirion to the point where the light of dawn is + if (Creature* pTirion = m_pInstance->GetSingleCreatureFromStorage(NPC_HIGHLORD_TIRION_FORDRING)) + { + pTirion->SetWalk(true); + if (GameObject* pLight = m_pInstance->GetSingleGameObjectFromStorage(GO_LIGHT_OF_DAWN)) + pTirion->GetMotionMaster()->MovePoint(POINT_MOVE_OTHER, pLight->GetPositionX(), pLight->GetPositionY(), pLight->GetPositionZ()); + } + m_uiEventTimer = 15000; + break; + case 23: + if (Creature* pDarion = m_pInstance->GetSingleCreatureFromStorage(NPC_DARION_MOGRAINE)) + DoScriptText(SAY_LIGHT_OF_DAWN_VISION_9, pDarion); + m_uiEventTimer = 11000; + break; + case 24: + if (Creature* pAlexandros = m_pInstance->GetSingleCreatureFromStorage(NPC_HIGHLORD_ALEXANDROS_MOGRAINE)) + DoScriptText(SAY_LIGHT_OF_DAWN_VISION_10, pAlexandros); + m_uiEventTimer = 29000; + break; + case 25: + if (Creature* pAlexandros = m_pInstance->GetSingleCreatureFromStorage(NPC_HIGHLORD_ALEXANDROS_MOGRAINE)) + DoScriptText(SAY_LIGHT_OF_DAWN_VISION_11, pAlexandros); + m_uiEventTimer = 6000; + break; + case 26: + // Lich king visit + if (Creature* pLichKing = m_creature->SummonCreature(NPC_THE_LICH_KING, aEventLocations[8].m_fX, aEventLocations[8].m_fY, aEventLocations[8].m_fZ, aEventLocations[8].m_fO, TEMPSUMMON_CORPSE_DESPAWN, 5000)) + DoScriptText(SAY_LIGHT_OF_DAWN_KING_VISIT_1, pLichKing); + if (Creature* pAlexandros = m_pInstance->GetSingleCreatureFromStorage(NPC_HIGHLORD_ALEXANDROS_MOGRAINE)) + DoScriptText(EMOTE_LIGHT_OF_DAWN_LICH_KING, pAlexandros); + m_uiEventTimer = 2000; + break; + case 27: + // the LK feasts on Alexandros + if (Creature* pLichKing = m_pInstance->GetSingleCreatureFromStorage(NPC_THE_LICH_KING)) + { + DoScriptText(SAY_LIGHT_OF_DAWN_KING_VISIT_2, pLichKing); + if (Creature* pAlexandros = m_pInstance->GetSingleCreatureFromStorage(NPC_HIGHLORD_ALEXANDROS_MOGRAINE)) + pLichKing->CastSpell(pAlexandros, SPELL_SOUL_FEAST_ALEX, false); + } + m_uiEventTimer = 2000; + break; + case 28: + if (Creature* pAlexandros = m_pInstance->GetSingleCreatureFromStorage(NPC_HIGHLORD_ALEXANDROS_MOGRAINE)) + pAlexandros->ForcedDespawn(); + m_uiEventTimer = 2000; + break; + case 29: + m_creature->SetStandState(UNIT_STAND_STATE_STAND); + DoScriptText(EMOTE_LIGHT_OF_DAWN_ANGRY, m_creature); + DoScriptText(SAY_LIGHT_OF_DAWN_KING_VISIT_3, m_creature); + m_uiEventTimer = 3000; + break; + case 30: + // the LK moves forward + if (Creature* pLichKing = m_pInstance->GetSingleCreatureFromStorage(NPC_THE_LICH_KING)) + { + pLichKing->CastSpell(pLichKing, SPELL_ICEBOUND_VISAGE, true); + pLichKing->GetMotionMaster()->MovePoint(POINT_MOVE_CHAPEL, aEventLocations[9].m_fX, aEventLocations[9].m_fY, aEventLocations[9].m_fZ); + } + m_uiEventTimer = 5000; + break; + case 31: + // darion charges + DoCastSpellIfCan(m_creature, SPELL_MOGRAINE_CHARGE); + m_uiEventTimer = 3000; + break; + case 32: + // the LK kicks darion + if (Creature* pLichKing = m_pInstance->GetSingleCreatureFromStorage(NPC_THE_LICH_KING)) + { + DoScriptText(SAY_LIGHT_OF_DAWN_KING_VISIT_4, pLichKing); + pLichKing->CastSpell(m_creature, SPELL_APOCALYPSE, true); + } + // workaround because kick doesn't work + m_creature->SetStandState(UNIT_STAND_STATE_DEAD); + m_creature->GetMap()->CreatureRelocation(m_creature, aEventLocations[10].m_fX, aEventLocations[10].m_fY, aEventLocations[10].m_fZ, aEventLocations[10].m_fO); + //m_creature->SendMonsterMove(aEventLocations[10].m_fX, aEventLocations[10].m_fY, aEventLocations[10].m_fZ, SPLINETYPE_NORMAL, m_creature->GetSplineFlags(), 1); + m_uiEventTimer = 4000; + break; + case 33: + m_creature->SetStandState(UNIT_STAND_STATE_KNEEL); + if (Creature* pLichKing = m_pInstance->GetSingleCreatureFromStorage(NPC_THE_LICH_KING)) + m_creature->SetFacingToObject(pLichKing); + if (Creature* pTirion = m_pInstance->GetSingleCreatureFromStorage(NPC_HIGHLORD_TIRION_FORDRING)) + DoScriptText(SAY_LIGHT_OF_DAWN_KING_VISIT_5, pTirion); + m_uiEventTimer = 8000; + break; + case 34: + if (Creature* pLichKing = m_pInstance->GetSingleCreatureFromStorage(NPC_THE_LICH_KING)) + DoScriptText(SAY_LIGHT_OF_DAWN_KING_VISIT_6, pLichKing); + m_uiEventTimer = 15000; + break; + case 35: + if (Creature* pLichKing = m_pInstance->GetSingleCreatureFromStorage(NPC_THE_LICH_KING)) + DoScriptText(SAY_LIGHT_OF_DAWN_KING_VISIT_7, pLichKing); + m_uiEventTimer = 17000; + break; + case 36: + // the LK feasts on tirion + if (Creature* pLichKing = m_pInstance->GetSingleCreatureFromStorage(NPC_THE_LICH_KING)) + { + DoScriptText(EMOTE_LIGHT_OF_DAWN_CAST_SPELL, pLichKing); + if (Creature* pTirion = m_pInstance->GetSingleCreatureFromStorage(NPC_HIGHLORD_TIRION_FORDRING)) + { + DoScriptText(EMOTE_LIGHT_OF_DAWN_GRASP, pTirion); + pLichKing->CastSpell(pLichKing, SPELL_SOUL_FEAST_TIRION, false); + } + } + m_uiEventTimer = 2000; + break; + case 37: + // the light champions attack the LK + if (Creature* pMaxwell = m_pInstance->GetSingleCreatureFromStorage(NPC_LORD_MAXWELL_TYROSUS)) + DoScriptText(SAY_LIGHT_OF_DAWN_KING_VISIT_8, pMaxwell); + if (Creature* pLichKing = m_pInstance->GetSingleCreatureFromStorage(NPC_THE_LICH_KING)) + { + for (GuidList::const_iterator itr = m_lDefendersGUIDs.begin(); itr != m_lDefendersGUIDs.end(); ++itr) + { + if (Creature* pTemp = m_creature->GetMap()->GetCreature(*itr)) + { + pTemp->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PASSIVE); + pTemp->SetWalk(false); + // attack interrupts LK spell casting + //pTemp->AI()->AttackStart(pLichKing); + } + } + for (uint8 i = 0; i < MAX_LIGHT_CHAMPIONS; i++) + { + if (Creature* pTemp = m_pInstance->GetSingleCreatureFromStorage(aLightArmySpawnLoc[i].m_uiEntry)) + { + pTemp->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PASSIVE); + pTemp->SetWalk(false); + // attack interrupts LK spell casting + //pTemp->AI()->AttackStart(pLichKing); + } + } + } + m_uiEventTimer = 6000; + break; + case 38: + // the LK throws away all the attackers + if (Creature* pLichKing = m_pInstance->GetSingleCreatureFromStorage(NPC_THE_LICH_KING)) + { + DoScriptText(EMOTE_LIGHT_OF_DAWN_POWERFULL, pLichKing); + DoScriptText(SAY_LIGHT_OF_DAWN_KING_VISIT_9, pLichKing); + pLichKing->CastSpell(pLichKing, SPELL_APOCALYPSE, true); + } + // despawn guards + for (GuidList::const_iterator itr = m_lDefendersGUIDs.begin(); itr != m_lDefendersGUIDs.end(); ++itr) + { + if (Creature* pTemp = m_creature->GetMap()->GetCreature(*itr)) + pTemp->DealDamage(pTemp, pTemp->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + } + // workaround for the light champions + for (uint8 i = 0; i < MAX_LIGHT_CHAMPIONS; i++) + { + if (Creature* pTemp = m_pInstance->GetSingleCreatureFromStorage(aLightArmySpawnLoc[i].m_uiEntry)) + { + uint32 uiPoint = urand(0, 1) ? 14 : 15; + pTemp->SetStandState(UNIT_STAND_STATE_DEAD); + pTemp->CombatStop(); + pTemp->GetRandomPoint(aEventLocations[uiPoint].m_fX, aEventLocations[uiPoint].m_fY, aEventLocations[uiPoint].m_fZ, 10.0f, fX, fY, fZ); + pTemp->GetMap()->CreatureRelocation(m_creature, fX, fY, fZ, aEventLocations[10].m_fO); + //pTemp->SendMonsterMove(fX, fY, fZ, SPLINETYPE_NORMAL, m_creature->GetSplineFlags(), 1); + } + } + m_uiEventTimer = 5000; + break; + case 39: + // make champions stand + for (uint8 i = 0; i < MAX_LIGHT_CHAMPIONS; i++) + { + if (Creature* pTemp = m_pInstance->GetSingleCreatureFromStorage(aLightArmySpawnLoc[i].m_uiEntry)) + pTemp->SetStandState(UNIT_STAND_STATE_STAND); + } + m_uiEventTimer = 1000; + break; + case 40: + DoScriptText(SAY_LIGHT_OF_DAWN_KING_VISIT_10, m_creature); + m_uiEventTimer = 5000; + break; + case 41: + // darion throws the ashbringer to tirion + DoScriptText(SAY_LIGHT_OF_DAWN_KING_VISIT_11, m_creature); + m_creature->SetStandState(UNIT_STAND_STATE_STAND); + m_uiEventTimer = 1000; + break; + case 42: + DoScriptText(EMOTE_LIGHT_OF_DAWN_ASHBRINGER, m_creature); + DoCastSpellIfCan(m_creature, SPELL_ASHBRINGER); + m_uiEventTimer = 5000; + break; + case 43: + // darion colapses while tirion is engulfed in light + DoScriptText(EMOTE_LIGHT_OF_DAWN_COLAPSE, m_creature); + m_creature->SetStandState(UNIT_STAND_STATE_DEAD); + if (Creature* pTirion = m_pInstance->GetSingleCreatureFromStorage(NPC_HIGHLORD_TIRION_FORDRING)) + pTirion->CastSpell(pTirion, SPELL_REBIRTH_OF_THE_ASHBRINGER, true); + m_pInstance->DoRespawnGameObject(GO_LIGHT_OF_DAWN, 5 * MINUTE); + if (Creature* pLichKing = m_pInstance->GetSingleCreatureFromStorage(NPC_THE_LICH_KING)) + pLichKing->InterruptNonMeleeSpells(false); + m_uiEventTimer = 2000; + break; + case 44: + // rebirth of the ashbringer + if (Creature* pTirion = m_pInstance->GetSingleCreatureFromStorage(NPC_HIGHLORD_TIRION_FORDRING)) + { + if (pTirion->HasAura(SPELL_REBIRTH_OF_THE_ASHBRINGER)) + pTirion->RemoveAurasDueToSpell(SPELL_REBIRTH_OF_THE_ASHBRINGER); + pTirion->HandleEmoteCommand(EMOTE_ONESHOT_ROAR); + } + m_uiEventTimer = 2500; + break; + case 45: + if (Creature* pTirion = m_pInstance->GetSingleCreatureFromStorage(NPC_HIGHLORD_TIRION_FORDRING)) + DoScriptText(SAY_LIGHT_OF_DAWN_KING_VISIT_12, pTirion); + m_uiEventTimer = 4000; + break; + case 46: + if (Creature* pLichKing = m_pInstance->GetSingleCreatureFromStorage(NPC_THE_LICH_KING)) + DoScriptText(SAY_LIGHT_OF_DAWN_KING_VISIT_13, pLichKing); + m_uiEventTimer = 5000; + break; + case 47: + if (Creature* pTirion = m_pInstance->GetSingleCreatureFromStorage(NPC_HIGHLORD_TIRION_FORDRING)) + DoScriptText(SAY_LIGHT_OF_DAWN_KING_VISIT_14, pTirion); + m_uiEventTimer = 1000; + break; + case 48: + // tirion charges to the LK + if (Creature* pTirion = m_pInstance->GetSingleCreatureFromStorage(NPC_HIGHLORD_TIRION_FORDRING)) + { + DoScriptText(EMOTE_LIGHT_OF_DAWN_CHARGE, pTirion); + pTirion->CastSpell(pTirion, SPELL_TIRION_CHARGE, true); + } + m_uiEventTimer = 2000; + break; + case 49: + // move the LK back in front of tirion; + if (Creature* pLichKing = m_pInstance->GetSingleCreatureFromStorage(NPC_THE_LICH_KING)) + { + DoScriptText(SAY_LIGHT_OF_DAWN_KING_VISIT_15, pLichKing); + pLichKing->GetMotionMaster()->MovePoint(POINT_MOVE_CHAPEL, aEventLocations[8].m_fX, aEventLocations[8].m_fY, aEventLocations[8].m_fZ); + // make him not aggressive + pLichKing->DeleteThreatList(); + } + if (Creature* pTirion = m_pInstance->GetSingleCreatureFromStorage(NPC_HIGHLORD_TIRION_FORDRING)) + pTirion->DeleteThreatList(); + m_uiEventTimer = 1000; + break; + case 50: + if (Creature* pLichKing = m_pInstance->GetSingleCreatureFromStorage(NPC_THE_LICH_KING)) + pLichKing->HandleEmoteCommand(EMOTE_ONESHOT_KNEEL); + m_uiEventTimer = 3000; + break; + case 51: + if (Creature* pLichKing = m_pInstance->GetSingleCreatureFromStorage(NPC_THE_LICH_KING)) + DoScriptText(SAY_LIGHT_OF_DAWN_KING_VISIT_16, pLichKing); + m_uiEventTimer = 10000; + break; + case 52: + if (Creature* pLichKing = m_pInstance->GetSingleCreatureFromStorage(NPC_THE_LICH_KING)) + DoScriptText(SAY_LIGHT_OF_DAWN_KING_VISIT_17, pLichKing); + m_uiEventTimer = 10000; + break; + case 53: + // the lich king teleports to leave + if (Creature* pLichKing = m_pInstance->GetSingleCreatureFromStorage(NPC_THE_LICH_KING)) + pLichKing->CastSpell(pLichKing, SPELL_TELEPORT_VISUAL, false); + if (Creature* pTirion = m_pInstance->GetSingleCreatureFromStorage(NPC_HIGHLORD_TIRION_FORDRING)) + { + pTirion->SetWalk(false); + pTirion->GetMotionMaster()->MovePoint(POINT_MOVE_OTHER, aEventLocations[11].m_fX, aEventLocations[11].m_fY, aEventLocations[11].m_fZ); + } + m_uiEventTimer = 2000; + break; + case 54: + // the lich king leaves + if (Creature* pLichKing = m_pInstance->GetSingleCreatureFromStorage(NPC_THE_LICH_KING)) + { + DoScriptText(EMOTE_LIGHT_OF_DAWN_KING_LEAVE, pLichKing); + pLichKing->ForcedDespawn(); + } + m_uiEventTimer = 7000; + break; + case 55: + // tirion reaches darion and starts the epilogue + if (Creature* pTirion = m_pInstance->GetSingleCreatureFromStorage(NPC_HIGHLORD_TIRION_FORDRING)) + { + pTirion->CastSpell(m_creature, SPELL_LAY_ON_HANDS, true); + DoScriptText(SAY_LIGHT_OF_DAWN_EPILOGUE_1, pTirion); + } + m_creature->SetStandState(UNIT_STAND_STATE_KNEEL); + m_uiEventTimer = 3000; + break; + case 56: + // tirion moves near the light of dawn object + if (Creature* pTirion = m_pInstance->GetSingleCreatureFromStorage(NPC_HIGHLORD_TIRION_FORDRING)) + { + pTirion->SetWalk(true); + pTirion->GetMotionMaster()->MovePoint(POINT_MOVE_OTHER, aEventLocations[12].m_fX, aEventLocations[12].m_fY, aEventLocations[12].m_fZ); + } + m_uiEventTimer = 5000; + break; + case 57: + if (Creature* pTirion = m_pInstance->GetSingleCreatureFromStorage(NPC_HIGHLORD_TIRION_FORDRING)) + { + pTirion->SetFacingToObject(m_creature); + m_creature->SetFacingToObject(pTirion); + DoScriptText(SAY_LIGHT_OF_DAWN_EPILOGUE_2, pTirion); + } + m_uiEventTimer = 15000; + break; + case 58: + if (Creature* pTirion = m_pInstance->GetSingleCreatureFromStorage(NPC_HIGHLORD_TIRION_FORDRING)) + DoScriptText(SAY_LIGHT_OF_DAWN_EPILOGUE_3, pTirion); + m_uiEventTimer = 7000; + break; + case 59: + if (Creature* pTirion = m_pInstance->GetSingleCreatureFromStorage(NPC_HIGHLORD_TIRION_FORDRING)) + DoScriptText(SAY_LIGHT_OF_DAWN_EPILOGUE_4, pTirion); + m_uiEventTimer = 10000; + break; + case 60: + if (Creature* pTirion = m_pInstance->GetSingleCreatureFromStorage(NPC_HIGHLORD_TIRION_FORDRING)) + DoScriptText(SAY_LIGHT_OF_DAWN_EPILOGUE_5, pTirion); + m_uiEventTimer = 11000; + break; + case 61: + if (Creature* pTirion = m_pInstance->GetSingleCreatureFromStorage(NPC_HIGHLORD_TIRION_FORDRING)) + DoScriptText(SAY_LIGHT_OF_DAWN_EPILOGUE_6, pTirion); + m_uiEventTimer = 10000; + break; + case 62: + if (Creature* pTirion = m_pInstance->GetSingleCreatureFromStorage(NPC_HIGHLORD_TIRION_FORDRING)) + DoScriptText(SAY_LIGHT_OF_DAWN_EPILOGUE_7, pTirion); + m_uiEventTimer = 8000; + break; + case 63: + if (Creature* pTirion = m_pInstance->GetSingleCreatureFromStorage(NPC_HIGHLORD_TIRION_FORDRING)) + DoScriptText(SAY_LIGHT_OF_DAWN_EPILOGUE_8, pTirion); + m_uiEventTimer = 10000; + break; + case 64: + m_creature->SetStandState(UNIT_STAND_STATE_STAND); + DoScriptText(SAY_LIGHT_OF_DAWN_EPILOGUE_9, m_creature); + m_uiEventTimer = 10000; + break; + case 65: + // send credit then in 5 min despawn + DoSendQuestCredit(); + m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER); + m_uiEventTimer = 5 * MINUTE * IN_MILLISECONDS; + break; + case 66: + m_creature->ForcedDespawn(); + m_creature->Respawn(); + m_uiEventTimer = 0; + break; + } + + ++m_uiEventStep; + } + else + m_uiEventTimer -= uiDiff; + } + + // Handle battle events + if (m_uiFightTimer) + { + // on blizz the battle takes about 4 min, time in which about 100 light warriors die + if (m_uiFightTimer <= uiDiff || m_uiLightWarriorsDead >= 100) + { + // summon Tirion and move him to the chapel + if (Creature* pTirion = m_creature->SummonCreature(NPC_HIGHLORD_TIRION_FORDRING, aEventLocations[0].m_fX, aEventLocations[0].m_fY, aEventLocations[0].m_fZ, aEventLocations[0].m_fO, TEMPSUMMON_CORPSE_DESPAWN, 5000, true)) + { + // this spell should be triggered by some npc + //pTirion->CastSpell(pTirion, SPELL_THE_LIGHT_OF_DAWN_AURA, true); + DoScriptText(SAY_LIGHT_OF_DAWN_OUTRO_1, pTirion); + DoScriptText(EMOTE_LIGHT_OF_DAWN_TIRION, pTirion); + pTirion->SetWalk(false); + pTirion->GetMotionMaster()->MovePoint(POINT_MOVE_CHAPEL, aEventLocations[1].m_fX, aEventLocations[1].m_fY, aEventLocations[1].m_fZ); + + m_uiFightTimer = 0; + } + } + else + m_uiFightTimer -= uiDiff; + + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + // battle sounds + if (m_uiFightSpeechTimer < uiDiff) + { + switch (urand(0, 15)) + { + case 0: DoScriptText(SAY_LIGHT_OF_DAWN_BATTLE_1, m_creature); break; + case 1: DoScriptText(SAY_LIGHT_OF_DAWN_BATTLE_2, m_creature); break; + case 2: DoScriptText(SAY_LIGHT_OF_DAWN_BATTLE_3, m_creature); break; + case 3: DoScriptText(SAY_LIGHT_OF_DAWN_BATTLE_4, m_creature); break; + case 4: DoScriptText(SAY_LIGHT_OF_DAWN_BATTLE_5, m_creature); break; + case 5: DoScriptText(SAY_LIGHT_OF_DAWN_BATTLE_6, m_creature); break; + case 6: DoScriptText(SAY_LIGHT_OF_DAWN_BATTLE_7, m_creature); break; + case 7: DoScriptText(SAY_LIGHT_OF_DAWN_BATTLE_8, m_creature); break; + case 8: DoScriptText(SAY_LIGHT_OF_DAWN_BATTLE_9, m_creature); break; + case 9: DoScriptText(SAY_LIGHT_OF_DAWN_BATTLE_10, m_creature); break; + case 10: DoScriptText(SAY_LIGHT_OF_DAWN_BATTLE_11, m_creature); break; + case 11: DoScriptText(SAY_LIGHT_OF_DAWN_BATTLE_12, m_creature); break; + case 12: DoScriptText(SAY_LIGHT_OF_DAWN_BATTLE_13, m_creature); break; + case 13: DoScriptText(SAY_LIGHT_OF_DAWN_BATTLE_14, m_creature); break; + case 14: DoScriptText(SAY_LIGHT_OF_DAWN_BATTLE_15, m_creature); break; + case 15: DoScriptText(SAY_LIGHT_OF_DAWN_BATTLE_16, m_creature); break; + } + m_uiFightSpeechTimer = urand(15000, 20000); + } + else + m_uiFightSpeechTimer -= uiDiff; + + // make sure that darion always stays in the area + if (!m_creature->IsWithinDist2d(aEventLocations[1].m_fX, aEventLocations[1].m_fY, 50.0f)) + { + SetCombatMovement(false); + m_creature->GetMotionMaster()->MovePoint(POINT_MOVE_RETURN_BATTLE, aEventLocations[1].m_fX, aEventLocations[1].m_fY, aEventLocations[1].m_fZ); + } + + // Darion spells + if (m_uiAntimagicZoneTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_ANTI_MAGIC_ZONE_DARION) == CAST_OK) + m_uiAntimagicZoneTimer = urand(85000, 90000); + } + else + m_uiAntimagicZoneTimer -= uiDiff; + + if (m_uiDeathStrikeTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_DEATH_STRIKE) == CAST_OK) + m_uiDeathStrikeTimer = urand(5000, 10000); + } + else + m_uiDeathStrikeTimer -= uiDiff; + + if (m_uiDeathEmbraceTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_DEATH_EMBRACE) == CAST_OK) + m_uiDeathEmbraceTimer = urand(5000, 10000); + } + else + m_uiDeathEmbraceTimer -= uiDiff; + + if (m_uiIcyTouchTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_ICY_TOUCH_DARION) == CAST_OK) + m_uiIcyTouchTimer = urand(5000, 10000); + } + else + m_uiIcyTouchTimer -= uiDiff; + + if (m_uiUnholyBlightTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_UNHOLY_BLIGHT) == CAST_OK) + m_uiUnholyBlightTimer = urand(5000, 10000); + } + else + m_uiUnholyBlightTimer -= uiDiff; + + DoMeleeAttackIfReady(); + } + } + } +}; + +bool GossipHello_npc_highlord_darion_mograine(Player* pPlayer, Creature* pCreature) +{ + if (pCreature->isQuestGiver()) + pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); + + if (pPlayer->GetQuestStatus(QUEST_ID_LIGHT_OF_DAWN) == QUEST_STATUS_INCOMPLETE) + pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_READY, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); + + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); + + return true; +} + +bool GossipSelect_npc_highlord_darion_mograine(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + if (uiAction == GOSSIP_ACTION_INFO_DEF + 1) + { + if (world_map_ebon_hold* pInstance = (world_map_ebon_hold*)pCreature->GetInstanceData()) + { + // set data to special in order to start the event + pInstance->SetData(TYPE_BATTLE, SPECIAL); + pPlayer->CLOSE_GOSSIP_MENU(); + + return true; + } + } + pPlayer->CLOSE_GOSSIP_MENU(); + + return false; +} + +CreatureAI* GetAI_npc_highlord_darion_mograine(Creature* pCreature) +{ + return new npc_highlord_darion_mograineAI(pCreature); +} + +struct MANGOS_DLL_DECL npc_fellow_death_knightAI : public ScriptedAI +{ + npc_fellow_death_knightAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (world_map_ebon_hold*)pCreature->GetInstanceData(); + Reset(); + } + + world_map_ebon_hold* m_pInstance; + + uint32 m_uiIcyTouchTimer; + uint32 m_uiBloodStrikeTimer; + uint32 m_uiPlagueStrikeTimer; + + void Reset() override + { + m_uiBloodStrikeTimer = urand(5000, 10000); + m_uiIcyTouchTimer = urand(5000, 10000); + m_uiPlagueStrikeTimer = urand(5000, 10000); + } + + void Aggro(Unit* pWho) override + { + DoCastSpellIfCan(m_creature, SPELL_HERO_AGGRO_AURA); + } + + void MovementInform(uint32 uiType, uint32 uiPointId) override + { + if (uiType != POINT_MOTION_TYPE || uiPointId != POINT_MOVE_CHAPEL) + return; + + // make the death knights kneel + if (m_creature->HasAura(SPELL_THE_LIGHT_OF_DAWN)) + m_creature->RemoveAurasDueToSpell(SPELL_THE_LIGHT_OF_DAWN); + + m_creature->SetStandState(UNIT_STAND_STATE_KNEEL); + + if (Creature* pTirion = m_pInstance->GetSingleCreatureFromStorage(NPC_HIGHLORD_TIRION_FORDRING)) + m_creature->SetFacingToObject(pTirion); + } + + void EnterEvadeMode() override + { + if (!m_creature->isAlive()) + return; + + if (!m_pInstance) + return; + + // if evade while the battle is in progress start attacking another target + if (m_pInstance->GetData(TYPE_BATTLE) == IN_PROGRESS) + { + if (Creature* pDarion = m_pInstance->GetSingleCreatureFromStorage(NPC_HIGHLORD_DARION_MOGRAINE)) + { + if (Unit* pTarget = pDarion->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + m_creature->AI()->AttackStart(pTarget); + } + } + else + { + m_creature->RemoveAllAuras(); + m_creature->DeleteThreatList(); + m_creature->CombatStop(true); + m_creature->LoadCreatureAddon(true); + m_creature->SetLootRecipient(NULL); + + Reset(); + + if (m_creature->GetEntry() != NPC_ORBAZ_BLOODBANE) + { + // cast light of dawn + m_creature->Unmount(); + m_creature->CastSpell(m_creature, SPELL_THE_LIGHT_OF_DAWN, true); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PASSIVE); + } + + // move to chapel points + switch (m_creature->GetEntry()) + { + case NPC_THASSARIAN: + m_creature->GetMotionMaster()->MovePoint(POINT_MOVE_CHAPEL, aEventLocations[3].m_fX, aEventLocations[3].m_fY, aEventLocations[3].m_fZ); + break; + case NPC_KOLTIRA_DEATHWEAVER: + m_creature->GetMotionMaster()->MovePoint(POINT_MOVE_CHAPEL, aEventLocations[2].m_fX, aEventLocations[2].m_fY, aEventLocations[2].m_fZ); + break; + case NPC_ORBAZ_BLOODBANE: + m_creature->GetMotionMaster()->MoveTargetedHome(); + break; + } + } + } + + void UpdateAI(const uint32 uiDiff) override + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_uiPlagueStrikeTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_PLAGUE_STRIKE_KNIGHTS) == CAST_OK) + m_uiPlagueStrikeTimer = urand(5000, 10000); + } + else + m_uiPlagueStrikeTimer -= uiDiff; + + if (m_uiIcyTouchTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_ICY_TOUCH_DARION) == CAST_OK) + m_uiIcyTouchTimer = urand(5000, 10000); + } + else + m_uiIcyTouchTimer -= uiDiff; + + if (m_uiBloodStrikeTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_BLOOD_STRIKE) == CAST_OK) + m_uiBloodStrikeTimer = urand(5000, 10000); + } + else + m_uiBloodStrikeTimer -= uiDiff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_npc_fellow_death_knight(Creature* pCreature) +{ + return new npc_fellow_death_knightAI(pCreature); +} + void AddSC_ebon_hold() { Script* pNewScript; @@ -1344,4 +2753,16 @@ void AddSC_ebon_hold() pNewScript->GetAI = &GetAI_npc_scarlet_ghoul; pNewScript->pEffectDummyNPC = &EffectDummyCreature_npc_scarlet_ghoul; pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_highlord_darion_mograine"; + pNewScript->GetAI = &GetAI_npc_highlord_darion_mograine; + pNewScript->pGossipHello = &GossipHello_npc_highlord_darion_mograine; + pNewScript->pGossipSelect = &GossipSelect_npc_highlord_darion_mograine; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_fellow_death_knight"; + pNewScript->GetAI = &GetAI_npc_fellow_death_knight; + pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/scarlet_enclave/world_map_ebon_hold.cpp b/scripts/eastern_kingdoms/scarlet_enclave/world_map_ebon_hold.cpp index 81335422f..43c3c9e5f 100644 --- a/scripts/eastern_kingdoms/scarlet_enclave/world_map_ebon_hold.cpp +++ b/scripts/eastern_kingdoms/scarlet_enclave/world_map_ebon_hold.cpp @@ -33,6 +33,220 @@ world_map_ebon_hold::world_map_ebon_hold(Map* pMap) : ScriptedInstance(pMap), void world_map_ebon_hold::Initialize() {} +void world_map_ebon_hold::OnCreatureCreate(Creature* pCreature) +{ + switch (pCreature->GetEntry()) + { + case NPC_HIGHLORD_DARION_MOGRAINE: + case NPC_KOLTIRA_DEATHWEAVER: + case NPC_ORBAZ_BLOODBANE: + case NPC_THASSARIAN: + + case NPC_HIGHLORD_TIRION_FORDRING: + case NPC_KORFAX_CHAMPION_OF_THE_LIGHT: + case NPC_LORD_MAXWELL_TYROSUS: + case NPC_LEONID_BARTHALOMEW_THE_REVERED: + case NPC_DUKE_NICHOLAS_ZVERENHOFF: + case NPC_COMMANDER_ELIGOR_DAWNBRINGER: + case NPC_RIMBLAT_EARTHSHATTER: + case NPC_RAYNE: + + case NPC_THE_LICH_KING: + case NPC_HIGHLORD_ALEXANDROS_MOGRAINE: + case NPC_DARION_MOGRAINE: + m_mNpcEntryGuidStore[pCreature->GetEntry()] = pCreature->GetObjectGuid(); + break; + + // Behemots and abominations are spawned by default on the map so they need to be handled here + case NPC_FLESH_BEHEMOTH: + case NPC_RAMPAGING_ABOMINATION: + m_lArmyGuids.push_back(pCreature->GetObjectGuid()); + break; + } +} + +void world_map_ebon_hold::OnCreatureDeath(Creature* pCreature) +{ + if (GetData(TYPE_BATTLE) != IN_PROGRESS) + return; + + switch (pCreature->GetEntry()) + { + // resummon the behemots or abominations if they die + case NPC_FLESH_BEHEMOTH: + case NPC_RAMPAGING_ABOMINATION: + m_lArmyGuids.remove(pCreature->GetObjectGuid());// if remove respawning on reset won't work! (are there any spawned by default?) ?? - unclear related to ResetBattle() + if (Creature* pTemp = pCreature->SummonCreature(pCreature->GetEntry(), pCreature->GetPositionX(), pCreature->GetPositionY(), pCreature->GetPositionZ(), pCreature->GetOrientation(), TEMPSUMMON_CORPSE_DESPAWN, 0)) + { + // the new summoned mob should attack + Creature* pDarion = GetSingleCreatureFromStorage(NPC_HIGHLORD_DARION_MOGRAINE); + if (pDarion && pDarion->getVictim()) + pTemp->AI()->AttackStart(pDarion->getVictim()); + } + pCreature->ForcedDespawn(1000); + break; + } +} + +void world_map_ebon_hold::OnCreatureEvade(Creature* pCreature) +{ + if (GetData(TYPE_BATTLE) != IN_PROGRESS) + return; + + switch (pCreature->GetEntry()) + { + // don't let the scourge evade while the battle is running + case NPC_FLESH_BEHEMOTH: + case NPC_RAMPAGING_ABOMINATION: + case NPC_VOLATILE_GHOUL: + case NPC_WARRIOR_OF_THE_FROZEN_WASTES: + if (Creature* pDarion = GetSingleCreatureFromStorage(NPC_HIGHLORD_DARION_MOGRAINE)) + { + if (!pDarion->isInCombat()) + return; + + if (Unit* pTarget = pDarion->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + pCreature->AI()->AttackStart(pTarget); + } + case NPC_KORFAX_CHAMPION_OF_THE_LIGHT: + case NPC_LORD_MAXWELL_TYROSUS: + case NPC_COMMANDER_ELIGOR_DAWNBRINGER: + case NPC_LEONID_BARTHALOMEW_THE_REVERED: + case NPC_DUKE_NICHOLAS_ZVERENHOFF: + case NPC_RIMBLAT_EARTHSHATTER: + case NPC_RAYNE: + case NPC_DEFENDER_OF_THE_LIGHT: + if (Creature* pDarion = GetSingleCreatureFromStorage(NPC_HIGHLORD_DARION_MOGRAINE)) + pCreature->AI()->AttackStart(pDarion); + break; + } +} + +void world_map_ebon_hold::OnObjectCreate(GameObject* pGo) +{ + if (pGo->GetEntry() == GO_LIGHT_OF_DAWN) + m_mGoEntryGuidStore[GO_LIGHT_OF_DAWN] = pGo->GetObjectGuid(); +} + +void world_map_ebon_hold::SetData(uint32 uiType, uint32 uiData) +{ + if (uiType == TYPE_BATTLE) + { + switch (uiData) + { + case NOT_STARTED: + // update world states to default + DoUpdateBattleWorldState(WORLD_STATE_FORCES_SHOW, 1); + DoUpdateBattleWorldState(WORLD_STATE_FORCES_LIGHT, MAX_FORCES_LIGHT); + DoUpdateBattleWorldState(WORLD_STATE_FORCES_SCOURGE, MAX_FORCES_SCOURGE); + + DoUpdateBattleWorldState(WORLD_STATE_BATTLE_TIMER_SHOW, 0); + DoUpdateBattleWorldState(WORLD_STATE_BATTLE_BEGIN, 0); + + DoResetBattle(); + break; + case SPECIAL: + // display timer + DoUpdateBattleWorldState(WORLD_STATE_BATTLE_TIMER_SHOW, 1); + DoUpdateBattleWorldState(WORLD_STATE_BATTLE_TIMER_TIME, MAX_BATTLE_INTRO_TIMER); + + // update world states to also show the army + DoUpdateBattleWorldState(WORLD_STATE_FORCES_SHOW, 1); + DoUpdateBattleWorldState(WORLD_STATE_FORCES_LIGHT, MAX_FORCES_LIGHT); + DoUpdateBattleWorldState(WORLD_STATE_FORCES_SCOURGE, MAX_FORCES_SCOURGE); + break; + case IN_PROGRESS: + DoUpdateBattleWorldState(WORLD_STATE_BATTLE_TIMER_SHOW, 0); + DoUpdateBattleWorldState(WORLD_STATE_BATTLE_BEGIN, 1); + break; + } + + m_uiBattleEncounter = uiData; + } +} + +uint32 world_map_ebon_hold::GetData(uint32 uiType) +{ + if (uiType == TYPE_BATTLE) + return m_uiBattleEncounter; + + return 0; +} + +void world_map_ebon_hold::DoUpdateBattleWorldState(uint32 uiStateId, uint32 uiStateData) +{ + Map::PlayerList const& lPlayers = instance->GetPlayers(); + + for (Map::PlayerList::const_iterator itr = lPlayers.begin(); itr != lPlayers.end(); ++itr) + { + if (Player* pPlayer = itr->getSource()) + { + // we need to manually check the phase mask because the value from DBC is not used yet + if (pPlayer->HasAura(SPELL_CHAPTER_IV) || pPlayer->isGameMaster()) + pPlayer->SendUpdateWorldState(uiStateId, uiStateData); + } + } +} + +void world_map_ebon_hold::DoResetBattle() +{ + // reset all npcs to the original state + if (Creature* pKoltira = GetSingleCreatureFromStorage(NPC_KOLTIRA_DEATHWEAVER)) + pKoltira->Respawn(); + if (Creature* pThassarian = GetSingleCreatureFromStorage(NPC_THASSARIAN)) + pThassarian->Respawn(); + if (Creature* pOrbaz = GetSingleCreatureFromStorage(NPC_ORBAZ_BLOODBANE)) + pOrbaz->Respawn(); + + // respawn all abominations + for (GuidList::const_iterator itr = m_lArmyGuids.begin(); itr != m_lArmyGuids.end(); ++itr) + { + if (Creature* pTemp = instance->GetCreature(*itr)) + pTemp->Respawn(); + } + + // despawn the argent dawn + for (uint8 i = 0; i < MAX_LIGHT_CHAMPIONS; i++) + { + if (Creature* pTemp = GetSingleCreatureFromStorage(aLightArmySpawnLoc[i].m_uiEntry)) + pTemp->ForcedDespawn(); + } + + if (Creature* pTirion = GetSingleCreatureFromStorage(NPC_HIGHLORD_TIRION_FORDRING)) + pTirion->ForcedDespawn(); +} + +void world_map_ebon_hold::DoMoveArmy() +{ + // move all the army to the chapel + float fX, fY, fZ; + for (GuidList::const_iterator itr = m_lArmyGuids.begin(); itr != m_lArmyGuids.end(); ++itr) + { + if (Creature* pTemp = instance->GetCreature(*itr)) + { + pTemp->SetWalk(false); + pTemp->GetRandomPoint(aEventLocations[1].m_fX, aEventLocations[1].m_fY, aEventLocations[1].m_fZ, 30.0f, fX, fY, fZ); + pTemp->GetMotionMaster()->MovePoint(0, fX, fY, fZ); + } + } +} + +void world_map_ebon_hold::DoDespawnArmy() +{ + // despawn all army units when the battle is finished + for (GuidList::const_iterator itr = m_lArmyGuids.begin(); itr != m_lArmyGuids.end(); ++itr) + { + if (Creature* pTemp = instance->GetCreature(*itr)) + { + if (pTemp->isAlive()) + { + pTemp->CastSpell(pTemp, SPELL_THE_LIGHT_OF_DAWN_DAMAGE, true); + pTemp->DealDamage(pTemp, pTemp->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + } + } + } +} + void world_map_ebon_hold::Update(uint32 uiDiff) { if (m_uiGothikYellTimer) diff --git a/scripts/eastern_kingdoms/scarlet_enclave/world_map_ebon_hold.h b/scripts/eastern_kingdoms/scarlet_enclave/world_map_ebon_hold.h index a994ee371..620917c28 100644 --- a/scripts/eastern_kingdoms/scarlet_enclave/world_map_ebon_hold.h +++ b/scripts/eastern_kingdoms/scarlet_enclave/world_map_ebon_hold.h @@ -5,6 +5,118 @@ #ifndef DEF_EBON_HOLD_H #define DEF_EBON_HOLD_H +enum +{ + TYPE_BATTLE = 0, + + // npcs + // death knights + NPC_HIGHLORD_DARION_MOGRAINE = 29173, + NPC_KOLTIRA_DEATHWEAVER = 29199, + NPC_ORBAZ_BLOODBANE = 29204, + NPC_THASSARIAN = 29200, + + // scourge warriors - summond during the event + NPC_FLESH_BEHEMOTH = 29190, + NPC_RAMPAGING_ABOMINATION = 29186, + NPC_VOLATILE_GHOUL = 29219, + NPC_WARRIOR_OF_THE_FROZEN_WASTES = 29206, + + // argent dawn commanders + NPC_HIGHLORD_TIRION_FORDRING = 29175, + NPC_KORFAX_CHAMPION_OF_THE_LIGHT = 29176, + NPC_LORD_MAXWELL_TYROSUS = 29178, + NPC_COMMANDER_ELIGOR_DAWNBRINGER = 29177, + NPC_LEONID_BARTHALOMEW_THE_REVERED = 29179, + NPC_DUKE_NICHOLAS_ZVERENHOFF = 29180, + NPC_RIMBLAT_EARTHSHATTER = 29182, + NPC_RAYNE = 29181, + + // argent warriors + NPC_DEFENDER_OF_THE_LIGHT = 29174, + + // cinematic + NPC_THE_LICH_KING = 29183, + NPC_HIGHLORD_ALEXANDROS_MOGRAINE = 29227, + NPC_DARION_MOGRAINE = 29228, + + // object + GO_LIGHT_OF_DAWN = 191330, + + // spells + SPELL_THE_LIGHT_OF_DAWN_DAMAGE = 53645, // kill each scourge + SPELL_CHAPTER_IV = 53405, // phase aura + + // variables + MAX_LIGHT_CHAMPIONS = 7, // the number of the light champions + MAX_WARRIORS_SUMMONED_PER_TURN = 5, // summoned warriors (light and death) per turn + MAX_LIGHT_GUARDS = 4, // guards summond for the outro + + // event variables + MAX_BATTLE_INTRO_TIMER = 5, + MAX_FORCES_LIGHT = 300, + MAX_FORCES_SCOURGE = 10000, + + // world states + // basically world states should be shown to all players with phase mask = 128 as stated in DBC + // because we don't have the possibility to do that we'll just iterate through the players and set the phase mask manually based on the battle status + WORLD_STATE_FORCES_SHOW = 3592, // show the remaining units + WORLD_STATE_FORCES_SCOURGE = 3591, + WORLD_STATE_FORCES_LIGHT = 3590, + WORLD_STATE_BATTLE_TIMER_SHOW = 3603, // countdown timer + WORLD_STATE_BATTLE_TIMER_TIME = 3604, + WORLD_STATE_BATTLE_BEGIN = 3605, // battle has begun +}; + +struct sSpawnLocation +{ + float m_fX, m_fY, m_fZ, m_fO; + uint32 m_uiEntry; +}; + +// light champions +static sSpawnLocation aLightArmySpawnLoc[MAX_LIGHT_CHAMPIONS] = +{ + {2285.80f, -5308.82f, 87.04f, 1.67f, NPC_KORFAX_CHAMPION_OF_THE_LIGHT}, + {2276.96f, -5309.36f, 86.66f, 1.61f, NPC_LORD_MAXWELL_TYROSUS}, + {2279.82f, -5322.61f, 88.95f, 1.54f, NPC_LEONID_BARTHALOMEW_THE_REVERED}, + {2287.96f, -5313.96f, 88.27f, 1.63f, NPC_DUKE_NICHOLAS_ZVERENHOFF}, + {2276.84f, -5313.78f, 87.62f, 1.61f, NPC_COMMANDER_ELIGOR_DAWNBRINGER}, + {2275.80f, -5322.51f, 88.62f, 1.68f, NPC_RAYNE}, + {2282.47f, -5319.84f, 88.83f, 1.74f, NPC_RIMBLAT_EARTHSHATTER} +}; + +// four guards spawned for the outro +static sSpawnLocation aGuardsSpawnLoc[MAX_LIGHT_GUARDS] = +{ + {2287.581f, -5284.991f, 82.535f, 2.60f}, + {2287.856f, -5281.127f, 82.225f, 3.44f}, + {2275.964f, -5282.389f, 82.301f, 5.80f}, + {2275.471f, -5277.668f, 82.058f, 5.79f} +}; + +// Tirion is spawned at the edge of the battle and runs toward the chapel +// When he reach the chapel he cast some powerfull light spell and the battle ends +static sSpawnLocation aEventLocations[] = +{ + {2181.36f, -5234.03f, 83.15f, 0.0f}, // 0 Tirion spawn location + {2281.39f, -5299.98f, 85.07f, 1.61f}, // 1 Tirion move location + {2289.259f, -5280.350f, 82.11f, 0.0f}, // 2 Koltira chapel loc + {2273.289f, -5273.675f, 81.70f, 0.0f}, // 3 Thassarian chapel loc + {2281.198f, -5257.397f, 80.22f, 4.66f}, // 4 Alexandros summon location + {2281.156f, -5259.934f, 80.64f, 0.0f}, // 5 Alexandros move loc + {2281.294f, -5281.895f, 82.44f, 1.35f}, // 6 Young Darion spawn + {2281.093f, -5263.013f, 81.12f, 0.0f}, // 7 Young Darion move + {2281.313f, -5250.282f, 79.32f, 4.69f}, // 8 Lich King spawn + {2281.523f, -5261.058f, 80.87f, 0.0f}, // 9 Lich King move + {2259.963f, -5299.262f, 82.16f, 0.99f}, // 10 Darion relocation on Lich King kick + {2261.234f, -5296.016f, 82.16f, 0.0f}, // 11 Tirion goes to Darion + {2273.071f, -5293.428f, 83.06f, 0.0f}, // 12 Tirion final point + {2282.579f, -5270.912f, 81.83f, 1.28f}, // 13 workaround - Lich King attack + {2307.055f, -5292.831f, 81.99f, 0.0f}, // 14 workaround - Lich King kick + {2252.441f, -5311.426f, 82.16f, 0.0f}, // 15 workaround - Lich King kick +}; + class MANGOS_DLL_DECL world_map_ebon_hold : public ScriptedInstance { public: @@ -12,13 +124,31 @@ class MANGOS_DLL_DECL world_map_ebon_hold : public ScriptedInstance void Initialize() override; + void OnCreatureCreate(Creature* pCreature) override; + void OnCreatureDeath(Creature* pCreature) override; + void OnCreatureEvade(Creature* pCreature) override; + void OnObjectCreate(GameObject* pGo) override; + + void SetData(uint32 uiType, uint32 uiData) override; + uint32 GetData(uint32 uiType) override; + void Update(uint32 uiDiff) override; bool CanAndToggleGothikYell(); + void DoUpdateBattleWorldState(uint32 uiStateId, uint32 uiStateData); + + // Move the behemots and abominations and make them attack + void DoMoveArmy(); + void DoDespawnArmy(); + protected: + void DoResetBattle(); + uint32 m_uiGothikYellTimer; // Timer to check if Gothik can yell (related q 12698) uint32 m_uiBattleEncounter; // Store state of the battle around "The Light of Dawn" + + GuidList m_lArmyGuids; }; #endif diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 417737a84..d2b5392b2 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2760" + #define SD2_REVISION_NR "2761" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 6b92603e7..584aac4bb 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -543,6 +543,8 @@ UPDATE creature_template SET ScriptName='npc_a_special_surprise' WHERE entry IN UPDATE creature_template SET ScriptName='npc_koltira_deathweaver' WHERE entry=28912; UPDATE creature_template SET ScriptName='npc_eye_of_acherus' WHERE entry=28511; UPDATE creature_template SET ScriptName='npc_scarlet_ghoul' WHERE entry=28845; +UPDATE creature_template SET ScriptName='npc_highlord_darion_mograine' WHERE entry=29173; +UPDATE creature_template SET ScriptName='npc_fellow_death_knight' WHERE entry IN (29199, 29204, 29200); /* ELWYNN FOREST */ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index ef7a71f62..6552c60ce 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -3723,7 +3723,94 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1609093,'Must feed...',0,0,0,434,'scarlet ghoul SAY_GHUL_SPAWN_3'), (-1609094,'So hungry...',0,0,0,434,'scarlet ghoul SAY_GHUL_SPAWN_4'), (-1609095,'$gPoppy:Mama;!',0,0,0,434,'scarlet ghoul SAY_GHUL_SPAWN_5'), -(-1609096,'It puts the ghoul in the pit or else it gets the lash!',0,0,0,25,'gothik the harvester SAY_GOTHIK_THROW_IN_PIT'); +(-1609096,'It puts the ghoul in the pit or else it gets the lash!',0,0,0,25,'gothik the harvester SAY_GOTHIK_THROW_IN_PIT'), + +(-1609201, 'Soldiers of the Scourge, stand ready! Prepare to unleash your fury upon the Argent Dawn!',14677,1,0,0,'Highlord Darion Mograine'), +(-1609202, 'The sky weeps at the devastation of these lands! Soon, Azeroth\'s futile tears will rain down upon us!',14678,1,0,0,'Highlord Darion Mograine'), +(-1609203, 'Death knights of Acherus, the death march begins!',14681,1,0,0,'Highlord Darion Mograine'), +(-1609204, 'Soldiers of the Scourge, death knights of Acherus, minions of the darkness: hear the call of the Highlord!',14679,1,0,22,'Highlord Darion Mograine'), +(-1609205, 'RISE!',14680,1,0,15,'Highlord Darion Mograine'), +(-1609206, 'The skies turn red with the blood of the fallen! The Lich King watches over us, minions! Leave only ashes and misery in your destructive wake!',14682,1,0,25,'Highlord Darion Mograine'), +(-1609207, 'Scourge armies approach!',0,1,0,0,'Korfax, Champion of the Light'), +(-1609208, 'Stand fast, brothers and sisters! The Light will prevail!',14487,1,0,0,'Lord Maxwell Tyrosus'), +(-1609209, 'Kneel before the Highlord!',14683,0,0,0,'Highlord Darion Mograine'), +(-1609210, 'You stand no chance!',14684,0,0,0,'Highlord Darion Mograine'), +(-1609211, 'The Scourge will destroy this place!',14685,0,0,0,'Highlord Darion Mograine'), +(-1609212, 'Your life is forfeit.',14686,0,0,0,'Highlord Darion Mograine'), +(-1609213, 'Life is meaningless without suffering.',14687,0,0,0,'Highlord Darion Mograine'), +(-1609214, 'How much longer will your forces hold out?',14688,0,0,0,'Highlord Darion Mograine'), +(-1609215, 'The Argent Dawn is finished!"',14689,0,0,0,'Highlord Darion Mograine'), +(-1609216, 'Spare no one!',14690,0,0,0,'Highlord Darion Mograine'), +(-1609217, 'What is this?! My... I cannot strike...',14691,0,0,0,'Highlord Darion Mograine'), +(-1609218, 'Obey me, blade!',14692,1,0,0,'Highlord Darion Mograine'), +(-1609219, 'You will do as I command! I am in control here!',14693,0,0,0,'Highlord Darion Mograine'), +(-1609220, 'I can not... the blade fights me.',14694,0,0,0,'Highlord Darion Mograine'), +(-1609221, 'What is happening to me?',14695,0,0,0,'Highlord Darion Mograine'), +(-1609222, 'Power...wanes...',14696,0,0,0,'Highlord Darion Mograine'), +(-1609223, 'Ashbringer defies me...',14697,0,0,0,'Highlord Darion Mograine'), +(-1609224, 'Minions, come to my aid!',14698,0,0,0,'Highlord Darion Mograine'), +(-1609225, 'You cannot win, Darion!',14584,1,0,0,'Highlord Tirion Fordring'), +(-1609226, 'Bring them before the chapel!',14585,1,0,0,'Highlord Tirion Fordring'), +(-1609227, 'Stand down, death knights. We have lost... The Light... This place... No hope...',14699,0,0,68,'Highlord Darion Mograine'), +(-1609228, 'Have you learned nothing, boy? You have become all that your father fought against! Like that coward, Arthas, you allowed yourself to be consumed by the darkness...the hate... Feeding upon the misery of those you tortured and killed!',14586,0,0,1,'Highlord Tirion Fordring'), +(-1609229, 'Your master knows what lies beneath the chapel. It is why he dares not show his face! He\'s sent you and your death knights to meet their doom, Darion.',14587,0,0,25,'Highlord Tirion Fordring'), +(-1609230, 'What you are feeling right now is the anguish of a thousand lost souls! Souls that you and your master brought here! The Light will tear you apart, Darion!',14588,0,0,1,'Highlord Tirion Fordring'), +(-1609231, 'Save your breath, old man. It might be the last you ever draw.',14700,0,0,25,'Highlord Darion Mograine'), +(-1609232, 'My son! My dear, beautiful boy!',14493,0,0,0,'Highlord Alexandros Mograine'), +(-1609233, 'Father!',14701,0,0,5,'Highlord Darion Mograine'), +(-1609234, 'Argh...what...is...',14702,0,0,68,'Highlord Darion Mograine'), +(-1609235, 'Father, you have returned!',14703,0,0,0,'Darion Mograine'), +(-1609236, 'You have been gone a long time, father. I thought...',14704,0,0,0,'Darion Mograine'), +(-1609237, 'Nothing could have kept me away from here, Darion. Not from my home and family.',14494,0,0,1,'Highlord Alexandros Mograine'), +(-1609238, 'Father, I wish to join you in the war against the undead. I want to fight! I can sit idle no longer!',14705,0,0,6,'Darion Mograine'), +(-1609239, 'Darion Mograine, you are barely of age to hold a sword, let alone battle the undead hordes of Lordaeron! I couldn\'t bear losing you. Even the thought...',14495,0,0,1,'Highlord Alexandros Mograine'), +(-1609240, 'If I die, father, I would rather it be on my feet, standing in defiance against the undead legions! If I die, father, I die with you!',14706,0,0,6,'Darion Mograine'), +(-1609241, 'My son, there will come a day when you will command the Ashbringer and, with it, mete justice across this land. I have no doubt that when that day finally comes, you will bring pride to our people and that Lordaeron will be a better place because of you. But, my son, that day is not today.',14496,0,0,1,'Highlord Alexandros Mograine'), +(-1609242, 'Do not forget...',14497,0,0,6,'Highlord Alexandros Mograine'), +(-1609243, 'Touching...',14803,1,0,0,'The Lich King'), +(-1609244, 'You have\'ve betrayed me! You betrayed us all you monster! Face the might of Mograine!',14707,1,0,0,'Highlord Darion Mograine'), +(-1609245, 'He\'s mine now...',14805,0,0,0,'The Lich King'), +(-1609246, 'Pathetic...',14804,0,0,0,'The Lich King'), +(-1609247, 'You\'re a damned monster, Arthas!',14589,0,0,25,'Highlord Tirion Fordring'), +(-1609248, 'You were right, Fordring. I did send them in to die. Their lives are meaningless, but yours...',14806,0,0,1,'The Lich King'), +(-1609249, 'How simple it was to draw the great Tirion Fordring out of hiding. You\'ve left yourself exposed, paladin. Nothing will save you...',14807,0,0,1,'The Lich King'), +(-1609250, 'ATTACK!!!',14488,1,0,0,'Lord Maxwell Tyrosus'), +(-1609251, 'APOCALYPSE!',14808,1,0,0,'The Lich King'), +(-1609252, 'That day is not today...',14708,0,0,0,'Highlord Darion Mograine'), +(-1609253, 'Tirion!',14709,1,0,0,'Highlord Darion Mograine'), +(-1609254, 'ARTHAS!!!!',14591,1,0,0,'Highlord Tirion Fordring'), +(-1609255, 'What is this?',14809,1,0,0,'The Lich King'), +(-1609256, 'Your end.',14592,1,0,0,'Highlord Tirion Fordring'), +(-1609257, 'Impossible...',14810,1,0,0,'The Lich King'), +(-1609258, 'This... isn\'t... over...',14811,1,0,25,'The Lich King'), +(-1609259, 'When next we meet it won\'t be on holy ground, paladin.',14812,1,0,1,'The Lich King'), +(-1609260, 'Rise, Darion, and listen...',14593,0,0,0,'Highlord Tirion Fordring'), +(-1609261, 'We have all been witness to a terrible tragedy. The blood of good men has been shed upon this soil! Honorable knights, slain defending their lives - our lives!',14594,0,0,0,'Highlord Tirion Fordring'), +(-1609262, 'And while such things can never be forgotten, we must remain vigilant in our cause!',14595,0,0,0,'Highlord Tirion Fordring'), +(-1609263, 'The Lich King must answer for what he has done and must not be allowed to cause further destruction to our world.',14596,0,0,0,'Highlord Tirion Fordring'), +(-1609264, 'I make a promise to you now, brothers and sisters: The Lich King will be defeated! On this day, I call for a union.',14597,0,0,0,'Highlord Tirion Fordring'), +(-1609265, 'The Argent Dawn and the Order of the Silver Hand will come together as one! We will succeed where so many before us have failed!',14598,0,0,0,'Highlord Tirion Fordring'), +(-1609266, 'We will take the fight to Arthas and tear down the walls of Icecrown!',14599,0,0,15,'Highlord Tirion Fordring'), +(-1609267, 'The Argent Crusade comes for you, Arthas!',14600,1,0,15,'Highlord Tirion Fordring'), +(-1609268, 'So too do the Knights of the Ebon Blade... While our kind has no place in your world, we will fight to bring an end to the Lich King. This I vow!',14710,0,0,1,'Highlord Darion Mograine'), +(-1609269, 'Thousands of Scourge rise up at the Highlord\'s command.',0,3,0,0,''), +(-1609270, 'The army marches towards Light\'s Hope Chapel.',0,3,0,0,''), +(-1609271, 'After over a hundred Defenders of the Light fall, Highlord Tirion Fordring arrives.',0,3,0,0,''), +(-1609272, '%s flee',0,2,0,0,'Orbaz'), +(-1609273, '%s kneels in defeat before Tirion Fordring.',0,3,0,0,'Highlord Darion Mograine'), +(-1609274, '%s arrives.',0,2,0,0,'Highlord Alexandros Mograine'), +(-1609275, '%s becomes a shade of his past, and walks up to his father.',0,2,0,0,'Highlord Darion Mograine'), +(-1609276, '%s hugs his father.',0,2,0,0,'Darion Mograine'), +(-1609277, '%s disappears, and the Lich King appears.',0,2,0,0,'Alexandros'), +(-1609278, '%s becomes himself again...and is now angry.',0,2,0,0,'Highlord Darion Mograine'), +(-1609279, '%s casts a spell on Tirion.',0,2,0,0,'The Lich King'), +(-1609280, '%s gasps for air.',0,2,0,0,'Highlord Tirion Fordring'), +(-1609281, '%s casts a powerful spell, killing the Defenders and knocking back the others.',0,2,0,0,'The Lich King'), +(-1609282, '%s throws the Corrupted Ashbringer to Tirion, who catches it. Tirion becomes awash with Light, and the Ashbringer is cleansed.',0,2,0,0,'Highlord Darion Mograine'), +(-1609283, '%s collapses.',0,2,0,0,'Highlord Darion Mograine'), +(-1609284, '%s charges towards the Lich King, Ashbringer in hand and strikes the Lich King.',0,2,0,0,'Highlord Tirion Fordring'), +(-1609285, '%s disappears. Tirion walks over to where Darion lay',0,2,0,0,'The Lich King'), +(-1609286, 'Light washes over the chapel -- the Light of Dawn is uncovered.',0,2,0,0,''); -- -1 615 000 OBSIDIAN SANCTUM @@ -6595,6 +6682,15 @@ INSERT INTO script_waypoint VALUES (8516, 24,2575.60, 950.138, 52.8460, 0, ''), (8516, 25,2575.60, 950.138, 52.8460, 0, ''); +DELETE FROM `script_waypoint` WHERE entry=29173; +INSERT INTO `script_waypoint` VALUES +(29173, 0, 2411.322, -5152.227, 83.777, 0,''), +(29173, 1, 2386.443, -5177.385, 74.049, 0,''), +(29173, 2, 2357.140, -5209.571, 79.642, 0,'SAY_LIGHT_OF_DAWN_STAND_1'), +(29173, 3, 2342.683, -5232.791, 85.259, 0,'SAY_LIGHT_OF_DAWN_STAND_2'), +(29173, 4, 2281.354, -5278.533, 82.227, 0,'Start battle'), +(29173, 5, 2280.302, -5284.489, 82.657, 600000,'Go in front of the chapel for outro'); + DELETE FROM script_waypoint WHERE entry=11832; INSERT INTO script_waypoint VALUES (11832, 0, 7848.385645, -2216.356670, 470.888333, 15000, 'SAY_REMULOS_INTRO_1'), diff --git a/sql/updates/r2761_mangos.sql b/sql/updates/r2761_mangos.sql new file mode 100644 index 000000000..abb49c1c0 --- /dev/null +++ b/sql/updates/r2761_mangos.sql @@ -0,0 +1,2 @@ +UPDATE creature_template SET ScriptName='npc_highlord_darion_mograine' WHERE entry=29173; +UPDATE creature_template SET ScriptName='npc_fellow_death_knight' WHERE entry IN (29199, 29204, 29200); diff --git a/sql/updates/r2761_scriptdev2.sql b/sql/updates/r2761_scriptdev2.sql new file mode 100644 index 000000000..64d4632ce --- /dev/null +++ b/sql/updates/r2761_scriptdev2.sql @@ -0,0 +1,97 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1609286 AND -1609201; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1609201, 'Soldiers of the Scourge, stand ready! Prepare to unleash your fury upon the Argent Dawn!',14677,1,0,0,'Highlord Darion Mograine'), +(-1609202, 'The sky weeps at the devastation of these lands! Soon, Azeroth\'s futile tears will rain down upon us!',14678,1,0,0,'Highlord Darion Mograine'), +(-1609203, 'Death knights of Acherus, the death march begins!',14681,1,0,0,'Highlord Darion Mograine'), +(-1609204, 'Soldiers of the Scourge, death knights of Acherus, minions of the darkness: hear the call of the Highlord!',14679,1,0,22,'Highlord Darion Mograine'), +(-1609205, 'RISE!',14680,1,0,15,'Highlord Darion Mograine'), +(-1609206, 'The skies turn red with the blood of the fallen! The Lich King watches over us, minions! Leave only ashes and misery in your destructive wake!',14682,1,0,25,'Highlord Darion Mograine'), +(-1609207, 'Scourge armies approach!',0,1,0,0,'Korfax, Champion of the Light'), +(-1609208, 'Stand fast, brothers and sisters! The Light will prevail!',14487,1,0,0,'Lord Maxwell Tyrosus'), +(-1609209, 'Kneel before the Highlord!',14683,0,0,0,'Highlord Darion Mograine'), +(-1609210, 'You stand no chance!',14684,0,0,0,'Highlord Darion Mograine'), +(-1609211, 'The Scourge will destroy this place!',14685,0,0,0,'Highlord Darion Mograine'), +(-1609212, 'Your life is forfeit.',14686,0,0,0,'Highlord Darion Mograine'), +(-1609213, 'Life is meaningless without suffering.',14687,0,0,0,'Highlord Darion Mograine'), +(-1609214, 'How much longer will your forces hold out?',14688,0,0,0,'Highlord Darion Mograine'), +(-1609215, 'The Argent Dawn is finished!"',14689,0,0,0,'Highlord Darion Mograine'), +(-1609216, 'Spare no one!',14690,0,0,0,'Highlord Darion Mograine'), +(-1609217, 'What is this?! My... I cannot strike...',14691,0,0,0,'Highlord Darion Mograine'), +(-1609218, 'Obey me, blade!',14692,1,0,0,'Highlord Darion Mograine'), +(-1609219, 'You will do as I command! I am in control here!',14693,0,0,0,'Highlord Darion Mograine'), +(-1609220, 'I can not... the blade fights me.',14694,0,0,0,'Highlord Darion Mograine'), +(-1609221, 'What is happening to me?',14695,0,0,0,'Highlord Darion Mograine'), +(-1609222, 'Power...wanes...',14696,0,0,0,'Highlord Darion Mograine'), +(-1609223, 'Ashbringer defies me...',14697,0,0,0,'Highlord Darion Mograine'), +(-1609224, 'Minions, come to my aid!',14698,0,0,0,'Highlord Darion Mograine'), +(-1609225, 'You cannot win, Darion!',14584,1,0,0,'Highlord Tirion Fordring'), +(-1609226, 'Bring them before the chapel!',14585,1,0,0,'Highlord Tirion Fordring'), +(-1609227, 'Stand down, death knights. We have lost... The Light... This place... No hope...',14699,0,0,68,'Highlord Darion Mograine'), +(-1609228, 'Have you learned nothing, boy? You have become all that your father fought against! Like that coward, Arthas, you allowed yourself to be consumed by the darkness...the hate... Feeding upon the misery of those you tortured and killed!',14586,0,0,1,'Highlord Tirion Fordring'), +(-1609229, 'Your master knows what lies beneath the chapel. It is why he dares not show his face! He\'s sent you and your death knights to meet their doom, Darion.',14587,0,0,25,'Highlord Tirion Fordring'), +(-1609230, 'What you are feeling right now is the anguish of a thousand lost souls! Souls that you and your master brought here! The Light will tear you apart, Darion!',14588,0,0,1,'Highlord Tirion Fordring'), +(-1609231, 'Save your breath, old man. It might be the last you ever draw.',14700,0,0,25,'Highlord Darion Mograine'), +(-1609232, 'My son! My dear, beautiful boy!',14493,0,0,0,'Highlord Alexandros Mograine'), +(-1609233, 'Father!',14701,0,0,5,'Highlord Darion Mograine'), +(-1609234, 'Argh...what...is...',14702,0,0,68,'Highlord Darion Mograine'), +(-1609235, 'Father, you have returned!',14703,0,0,0,'Darion Mograine'), +(-1609236, 'You have been gone a long time, father. I thought...',14704,0,0,0,'Darion Mograine'), +(-1609237, 'Nothing could have kept me away from here, Darion. Not from my home and family.',14494,0,0,1,'Highlord Alexandros Mograine'), +(-1609238, 'Father, I wish to join you in the war against the undead. I want to fight! I can sit idle no longer!',14705,0,0,6,'Darion Mograine'), +(-1609239, 'Darion Mograine, you are barely of age to hold a sword, let alone battle the undead hordes of Lordaeron! I couldn\'t bear losing you. Even the thought...',14495,0,0,1,'Highlord Alexandros Mograine'), +(-1609240, 'If I die, father, I would rather it be on my feet, standing in defiance against the undead legions! If I die, father, I die with you!',14706,0,0,6,'Darion Mograine'), +(-1609241, 'My son, there will come a day when you will command the Ashbringer and, with it, mete justice across this land. I have no doubt that when that day finally comes, you will bring pride to our people and that Lordaeron will be a better place because of you. But, my son, that day is not today.',14496,0,0,1,'Highlord Alexandros Mograine'), +(-1609242, 'Do not forget...',14497,0,0,6,'Highlord Alexandros Mograine'), +(-1609243, 'Touching...',14803,1,0,0,'The Lich King'), +(-1609244, 'You have\'ve betrayed me! You betrayed us all you monster! Face the might of Mograine!',14707,1,0,0,'Highlord Darion Mograine'), +(-1609245, 'He\'s mine now...',14805,0,0,0,'The Lich King'), +(-1609246, 'Pathetic...',14804,0,0,0,'The Lich King'), +(-1609247, 'You\'re a damned monster, Arthas!',14589,0,0,25,'Highlord Tirion Fordring'), +(-1609248, 'You were right, Fordring. I did send them in to die. Their lives are meaningless, but yours...',14806,0,0,1,'The Lich King'), +(-1609249, 'How simple it was to draw the great Tirion Fordring out of hiding. You\'ve left yourself exposed, paladin. Nothing will save you...',14807,0,0,1,'The Lich King'), +(-1609250, 'ATTACK!!!',14488,1,0,0,'Lord Maxwell Tyrosus'), +(-1609251, 'APOCALYPSE!',14808,1,0,0,'The Lich King'), +(-1609252, 'That day is not today...',14708,0,0,0,'Highlord Darion Mograine'), +(-1609253, 'Tirion!',14709,1,0,0,'Highlord Darion Mograine'), +(-1609254, 'ARTHAS!!!!',14591,1,0,0,'Highlord Tirion Fordring'), +(-1609255, 'What is this?',14809,1,0,0,'The Lich King'), +(-1609256, 'Your end.',14592,1,0,0,'Highlord Tirion Fordring'), +(-1609257, 'Impossible...',14810,1,0,0,'The Lich King'), +(-1609258, 'This... isn\'t... over...',14811,1,0,25,'The Lich King'), +(-1609259, 'When next we meet it won\'t be on holy ground, paladin.',14812,1,0,1,'The Lich King'), +(-1609260, 'Rise, Darion, and listen...',14593,0,0,0,'Highlord Tirion Fordring'), +(-1609261, 'We have all been witness to a terrible tragedy. The blood of good men has been shed upon this soil! Honorable knights, slain defending their lives - our lives!',14594,0,0,0,'Highlord Tirion Fordring'), +(-1609262, 'And while such things can never be forgotten, we must remain vigilant in our cause!',14595,0,0,0,'Highlord Tirion Fordring'), +(-1609263, 'The Lich King must answer for what he has done and must not be allowed to cause further destruction to our world.',14596,0,0,0,'Highlord Tirion Fordring'), +(-1609264, 'I make a promise to you now, brothers and sisters: The Lich King will be defeated! On this day, I call for a union.',14597,0,0,0,'Highlord Tirion Fordring'), +(-1609265, 'The Argent Dawn and the Order of the Silver Hand will come together as one! We will succeed where so many before us have failed!',14598,0,0,0,'Highlord Tirion Fordring'), +(-1609266, 'We will take the fight to Arthas and tear down the walls of Icecrown!',14599,0,0,15,'Highlord Tirion Fordring'), +(-1609267, 'The Argent Crusade comes for you, Arthas!',14600,1,0,15,'Highlord Tirion Fordring'), +(-1609268, 'So too do the Knights of the Ebon Blade... While our kind has no place in your world, we will fight to bring an end to the Lich King. This I vow!',14710,0,0,1,'Highlord Darion Mograine'), +(-1609269, 'Thousands of Scourge rise up at the Highlord\'s command.',0,3,0,0,''), +(-1609270, 'The army marches towards Light\'s Hope Chapel.',0,3,0,0,''), +(-1609271, 'After over a hundred Defenders of the Light fall, Highlord Tirion Fordring arrives.',0,3,0,0,''), +(-1609272, '%s flee',0,2,0,0,'Orbaz'), +(-1609273, '%s kneels in defeat before Tirion Fordring.',0,3,0,0,'Highlord Darion Mograine'), +(-1609274, '%s arrives.',0,2,0,0,'Highlord Alexandros Mograine'), +(-1609275, '%s becomes a shade of his past, and walks up to his father.',0,2,0,0,'Highlord Darion Mograine'), +(-1609276, '%s hugs his father.',0,2,0,0,'Darion Mograine'), +(-1609277, '%s disappears, and the Lich King appears.',0,2,0,0,'Alexandros'), +(-1609278, '%s becomes himself again...and is now angry.',0,2,0,0,'Highlord Darion Mograine'), +(-1609279, '%s casts a spell on Tirion.',0,2,0,0,'The Lich King'), +(-1609280, '%s gasps for air.',0,2,0,0,'Highlord Tirion Fordring'), +(-1609281, '%s casts a powerful spell, killing the Defenders and knocking back the others.',0,2,0,0,'The Lich King'), +(-1609282, '%s throws the Corrupted Ashbringer to Tirion, who catches it. Tirion becomes awash with Light, and the Ashbringer is cleansed.',0,2,0,0,'Highlord Darion Mograine'), +(-1609283, '%s collapses.',0,2,0,0,'Highlord Darion Mograine'), +(-1609284, '%s charges towards the Lich King, Ashbringer in hand and strikes the Lich King.',0,2,0,0,'Highlord Tirion Fordring'), +(-1609285, '%s disappears. Tirion walks over to where Darion lay',0,2,0,0,'The Lich King'), +(-1609286, 'Light washes over the chapel -- the Light of Dawn is uncovered.',0,2,0,0,''); + +DELETE FROM `script_waypoint` WHERE entry=29173; +INSERT INTO `script_waypoint` VALUES +(29173, 0, 2411.322, -5152.227, 83.777, 0,''), +(29173, 1, 2386.443, -5177.385, 74.049, 0,''), +(29173, 2, 2357.140, -5209.571, 79.642, 0,'SAY_LIGHT_OF_DAWN_STAND_1'), +(29173, 3, 2342.683, -5232.791, 85.259, 0,'SAY_LIGHT_OF_DAWN_STAND_2'), +(29173, 4, 2281.354, -5278.533, 82.227, 0,'Start battle'), +(29173, 5, 2280.302, -5284.489, 82.657, 600000,'Go in front of the chapel for outro'); From c68d6e4029ff848c1a950d29832bc9689d86ff81 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Fri, 23 Nov 2012 16:10:25 +0100 Subject: [PATCH 0759/1172] [2762] Use own SD2 Error log file. Requires C-MaNGOS 12280 Update your configuration file. Please be so kind to forward errors of the SD2Errors log file to the SD2-Team You can find C-MaNGOS at github.com/cmangos --- ScriptMgr.cpp | 53 +++++++++++-------- base/escort_ai.cpp | 6 +-- base/follower_ai.cpp | 2 +- config.h | 2 +- include/sc_creature.cpp | 8 +-- include/sc_instance.cpp | 10 ++-- include/sc_instance.h | 2 +- scriptdev2.conf.dist.in | 5 +- .../instance_blackrock_spire.cpp | 2 +- .../boss_selin_fireheart.cpp | 2 +- .../shadowfang_keep/boss_hummel.cpp | 4 +- .../sunwell_plateau/boss_brutallus.cpp | 2 +- .../zulaman/instance_zulaman.cpp | 2 +- scripts/eastern_kingdoms/zulaman/zulaman.cpp | 2 +- .../caverns_of_time/hyjal/hyjalAI.cpp | 2 +- scripts/kalimdor/durotar.cpp | 2 +- .../temple_of_ahnqiraj/boss_cthun.cpp | 2 +- .../mob_anubisath_sentinel.cpp | 2 +- .../ahnkahet/instance_ahnkahet.cpp | 2 +- .../instance_trial_of_the_crusader.cpp | 2 +- .../northrend/gundrak/instance_gundrak.cpp | 2 +- .../instance_icecrown_citadel.cpp | 2 +- .../naxxramas/instance_naxxramas.cpp | 2 +- .../northrend/nexus/nexus/instance_nexus.cpp | 2 +- .../halls_of_lightning/boss_volkhan.cpp | 2 +- .../utgarde_keep/utgarde_keep.cpp | 2 +- .../instance_utgarde_pinnacle.cpp | 2 +- .../instance_shadow_labyrinth.cpp | 2 +- .../black_temple/instance_black_temple.cpp | 2 +- .../blood_furnace/instance_blood_furnace.cpp | 2 +- scripts/outland/hellfire_peninsula.cpp | 2 +- scripts/outland/shadowmoon_valley.cpp | 2 +- scripts/outland/shattrath_city.cpp | 2 +- scripts/world/go_scripts.cpp | 2 +- scripts/world/npcs_special.cpp | 2 +- sd2_revision_nr.h | 2 +- sql/scriptdev2_script_full.sql | 2 +- sql/updates/r2762_scriptdev2.sql | 1 + system/system.cpp | 2 +- 39 files changed, 82 insertions(+), 69 deletions(-) create mode 100644 sql/updates/r2762_scriptdev2.sql diff --git a/ScriptMgr.cpp b/ScriptMgr.cpp index 3f2faddcd..9e837b9e7 100644 --- a/ScriptMgr.cpp +++ b/ScriptMgr.cpp @@ -27,7 +27,7 @@ void LoadDatabase() if (strSD2DBinfo.empty()) { - error_log("SD2: Missing Scriptdev2 database info from configuration file. Load database aborted."); + script_error_log("Missing Scriptdev2 database info from configuration file. Load database aborted."); return; } @@ -45,12 +45,11 @@ void LoadDatabase() } else { - error_log("SD2: Unable to connect to Database. Load database aborted."); + script_error_log("Unable to connect to Database. Load database aborted."); return; } SD2Database.HaltDelayThread(); - } struct TSpellSummary @@ -72,6 +71,8 @@ void FreeScriptLibrary() m_scripts.clear(); num_sc_scripts = 0; + + setScriptLibraryErrorFile(NULL, NULL); } MANGOS_DLL_EXPORT @@ -89,14 +90,22 @@ void InitScriptLibrary() outstring_log(""); // Get configuration file + bool configFailure = false; if (!SD2Config.SetSource(_SCRIPTDEV2_CONFIG)) - error_log("SD2: Unable to open configuration file. Database will be unaccessible. Configuration values will use default."); + configFailure = true; else outstring_log("SD2: Using configuration file %s", _SCRIPTDEV2_CONFIG); + // Set SD2 Error Log File + std::string sd2LogFile = SD2Config.GetStringDefault("SD2ErrorLogFile", "SD2Errors.log"); + setScriptLibraryErrorFile(sd2LogFile.c_str(), "SD2"); + + if (configFailure) + script_error_log("Unable to open configuration file. Database will be unaccessible. Configuration values will use default."); + // Check config file version if (SD2Config.GetIntDefault("ConfVersion", 0) != SD2_CONF_VERSION) - error_log("SD2: Configuration file version doesn't match expected version. Some config variables may be wrong or missing."); + script_error_log("Configuration file version doesn't match expected version. Some config variables may be wrong or missing."); outstring_log(""); @@ -119,7 +128,7 @@ void InitScriptLibrary() for (uint32 i = 1; i < GetScriptIdsCount(); ++i) { if (!m_scripts[i]) - error_log("SD2: No script found for ScriptName '%s'.", GetScriptName(i)); + script_error_log("No script found for ScriptName '%s'.", GetScriptName(i)); } outstring_log(">> Loaded %i C++ Scripts.", num_sc_scripts); @@ -139,14 +148,14 @@ void DoScriptText(int32 iTextEntry, WorldObject* pSource, Unit* pTarget) { if (!pSource) { - error_log("SD2: DoScriptText entry %i, invalid Source pointer.", iTextEntry); + script_error_log("DoScriptText entry %i, invalid Source pointer.", iTextEntry); return; } if (iTextEntry >= 0) { - error_log("SD2: DoScriptText with source entry %u (TypeId=%u, guid=%u) attempts to process text entry %i, but text entry must be negative.", - pSource->GetEntry(), pSource->GetTypeId(), pSource->GetGUIDLow(), iTextEntry); + script_error_log("DoScriptText with source entry %u (TypeId=%u, guid=%u) attempts to process text entry %i, but text entry must be negative.", + pSource->GetEntry(), pSource->GetTypeId(), pSource->GetGUIDLow(), iTextEntry); return; } @@ -154,8 +163,8 @@ void DoScriptText(int32 iTextEntry, WorldObject* pSource, Unit* pTarget) const StringTextData* pData = pSystemMgr.GetTextData(iTextEntry); if (!pData) { - error_log("SD2: DoScriptText with source entry %u (TypeId=%u, guid=%u) could not find text entry %i.", - pSource->GetEntry(), pSource->GetTypeId(), pSource->GetGUIDLow(), iTextEntry); + script_error_log("DoScriptText with source entry %u (TypeId=%u, guid=%u) could not find text entry %i.", + pSource->GetEntry(), pSource->GetTypeId(), pSource->GetGUIDLow(), iTextEntry); return; } @@ -179,7 +188,7 @@ void DoScriptText(int32 iTextEntry, WorldObject* pSource, Unit* pTarget) pSource->PlayDirectSound(pData->uiSoundId); } else - error_log("SD2: DoScriptText entry %i tried to process invalid sound id %u.", iTextEntry, pData->uiSoundId); + script_error_log("DoScriptText entry %i tried to process invalid sound id %u.", iTextEntry, pData->uiSoundId); } if (pData->uiEmote) @@ -187,7 +196,7 @@ void DoScriptText(int32 iTextEntry, WorldObject* pSource, Unit* pTarget) if (pSource->GetTypeId() == TYPEID_UNIT || pSource->GetTypeId() == TYPEID_PLAYER) ((Unit*)pSource)->HandleEmote(pData->uiEmote); else - error_log("SD2: DoScriptText entry %i tried to process emote for invalid TypeId (%u).", iTextEntry, pSource->GetTypeId()); + script_error_log("DoScriptText entry %i tried to process emote for invalid TypeId (%u).", iTextEntry, pSource->GetTypeId()); } switch (pData->uiType) @@ -209,7 +218,7 @@ void DoScriptText(int32 iTextEntry, WorldObject* pSource, Unit* pTarget) if (pTarget && pTarget->GetTypeId() == TYPEID_PLAYER) pSource->MonsterWhisper(iTextEntry, pTarget); else - error_log("SD2: DoScriptText entry %i cannot whisper without target unit (TYPEID_PLAYER).", iTextEntry); + script_error_log("DoScriptText entry %i cannot whisper without target unit (TYPEID_PLAYER).", iTextEntry); break; } @@ -218,7 +227,7 @@ void DoScriptText(int32 iTextEntry, WorldObject* pSource, Unit* pTarget) if (pTarget && pTarget->GetTypeId() == TYPEID_PLAYER) pSource->MonsterWhisper(iTextEntry, pTarget, true); else - error_log("SD2: DoScriptText entry %i cannot whisper without target unit (TYPEID_PLAYER).", iTextEntry); + script_error_log("DoScriptText entry %i cannot whisper without target unit (TYPEID_PLAYER).", iTextEntry); break; } @@ -241,27 +250,27 @@ void DoOrSimulateScriptTextForMap(int32 iTextEntry, uint32 uiCreatureEntry, Map* { if (!pMap) { - error_log("SD2: DoOrSimulateScriptTextForMap entry %i, invalid Map pointer.", iTextEntry); + script_error_log("DoOrSimulateScriptTextForMap entry %i, invalid Map pointer.", iTextEntry); return; } if (iTextEntry >= 0) { - error_log("SD2: DoOrSimulateScriptTextForMap with source entry %u for map %u attempts to process text entry %i, but text entry must be negative.", uiCreatureEntry, pMap->GetId(), iTextEntry); + script_error_log("DoOrSimulateScriptTextForMap with source entry %u for map %u attempts to process text entry %i, but text entry must be negative.", uiCreatureEntry, pMap->GetId(), iTextEntry); return; } CreatureInfo const* pInfo = GetCreatureTemplateStore(uiCreatureEntry); if (!pInfo) { - error_log("SD2: DoOrSimulateScriptTextForMap has invalid source entry %u for map %u.", uiCreatureEntry, pMap->GetId()); + script_error_log("DoOrSimulateScriptTextForMap has invalid source entry %u for map %u.", uiCreatureEntry, pMap->GetId()); return; } const StringTextData* pData = pSystemMgr.GetTextData(iTextEntry); if (!pData) { - error_log("SD2: DoOrSimulateScriptTextForMap with source entry %u for map %u could not find text entry %i.", uiCreatureEntry, pMap->GetId(), iTextEntry); + script_error_log("DoOrSimulateScriptTextForMap with source entry %u for map %u could not find text entry %i.", uiCreatureEntry, pMap->GetId(), iTextEntry); return; } @@ -270,7 +279,7 @@ void DoOrSimulateScriptTextForMap(int32 iTextEntry, uint32 uiCreatureEntry, Map* if (pData->uiType != CHAT_TYPE_ZONE_YELL) { - error_log("SD2: DoSimulateScriptTextForMap entry %i has not supported chat type %u.", iTextEntry, pData->uiType); + script_error_log("DoSimulateScriptTextForMap entry %i has not supported chat type %u.", iTextEntry, pData->uiType); return; } @@ -279,7 +288,7 @@ void DoOrSimulateScriptTextForMap(int32 iTextEntry, uint32 uiCreatureEntry, Map* if (GetSoundEntriesStore()->LookupEntry(pData->uiSoundId)) pMap->PlayDirectSoundToMap(pData->uiSoundId); else - error_log("SD2: DoOrSimulateScriptTextForMap entry %i tried to process invalid sound id %u.", iTextEntry, pData->uiSoundId); + script_error_log("DoOrSimulateScriptTextForMap entry %i tried to process invalid sound id %u.", iTextEntry, pData->uiSoundId); } if (pCreatureSource) // If provided pointer for sayer, use direct version @@ -301,7 +310,7 @@ void Script::RegisterSelf(bool bReportError) else { if (bReportError) - error_log("SD2: Script registering but ScriptName %s is not assigned in database. Script will not be used.", Name.c_str()); + script_error_log("Script registering but ScriptName %s is not assigned in database. Script will not be used.", Name.c_str()); delete this; } diff --git a/base/escort_ai.cpp b/base/escort_ai.cpp index deae456d4..1eeadc0c0 100644 --- a/base/escort_ai.cpp +++ b/base/escort_ai.cpp @@ -385,7 +385,7 @@ void npc_escortAI::MovementInform(uint32 uiMoveType, uint32 uiPointId) // Make sure that we are still on the right waypoint if (CurrentWP->uiId != uiPointId) { - error_log("SD2: EscortAI for Npc %u reached waypoint out of order %u, expected %u.", m_creature->GetEntry(), uiPointId, CurrentWP->uiId); + script_error_log("EscortAI for Npc %u reached waypoint out of order %u, expected %u.", m_creature->GetEntry(), uiPointId, CurrentWP->uiId); return; } @@ -489,13 +489,13 @@ void npc_escortAI::Start(bool bRun, const Player* pPlayer, const Quest* pQuest, { if (m_creature->getVictim()) { - error_log("SD2: EscortAI attempt to Start while in combat."); + script_error_log("EscortAI attempt to Start while in combat."); return; } if (HasEscortState(STATE_ESCORT_ESCORTING)) { - error_log("SD2: EscortAI attempt to Start while already escorting."); + script_error_log("EscortAI attempt to Start while already escorting."); return; } diff --git a/base/follower_ai.cpp b/base/follower_ai.cpp index a80c0c233..253afa5e7 100644 --- a/base/follower_ai.cpp +++ b/base/follower_ai.cpp @@ -283,7 +283,7 @@ void FollowerAI::StartFollow(Player* pLeader, uint32 uiFactionForFollower, const if (HasFollowState(STATE_FOLLOW_INPROGRESS)) { - error_log("SD2: FollowerAI attempt to StartFollow while already following."); + script_error_log("FollowerAI attempt to StartFollow while already following."); return; } diff --git a/config.h b/config.h index 826e01849..f66e4b47f 100644 --- a/config.h +++ b/config.h @@ -25,7 +25,7 @@ // Format is YYYYMMDDRR where RR is the change in the conf file // for that day. -#define SD2_CONF_VERSION 2010062001 +#define SD2_CONF_VERSION 2012112301 #ifdef WIN32 #define MANGOS_DLL_EXPORT extern "C" __declspec(dllexport) diff --git a/include/sc_creature.cpp b/include/sc_creature.cpp index a91fcd938..b57f50909 100644 --- a/include/sc_creature.cpp +++ b/include/sc_creature.cpp @@ -187,7 +187,7 @@ void ScriptedAI::DoPlaySoundToSet(WorldObject* pSource, uint32 uiSoundId) if (!GetSoundEntriesStore()->LookupEntry(uiSoundId)) { - error_log("SD2: Invalid soundId %u used in DoPlaySoundToSet (Source: TypeId %u, GUID %u)", uiSoundId, pSource->GetTypeId(), pSource->GetGUIDLow()); + script_error_log("Invalid soundId %u used in DoPlaySoundToSet (Source: TypeId %u, GUID %u)", uiSoundId, pSource->GetTypeId(), pSource->GetGUIDLow()); return; } @@ -401,7 +401,7 @@ void ScriptedAI::DoResetThreat() { if (!m_creature->CanHaveThreatList() || m_creature->getThreatManager().isThreatListEmpty()) { - error_log("SD2: DoResetThreat called for creature that either cannot have threat list or has empty threat list (m_creature entry = %d)", m_creature->GetEntry()); + script_error_log("DoResetThreat called for creature that either cannot have threat list or has empty threat list (m_creature entry = %d)", m_creature->GetEntry()); return; } @@ -422,7 +422,7 @@ void ScriptedAI::DoTeleportPlayer(Unit* pUnit, float fX, float fY, float fZ, flo if (pUnit->GetTypeId() != TYPEID_PLAYER) { - error_log("SD2: %s tried to teleport non-player (%s) to x: %f y:%f z: %f o: %f. Aborted.", m_creature->GetGuidStr().c_str(), pUnit->GetGuidStr().c_str(), fX, fY, fZ, fO); + script_error_log("%s tried to teleport non-player (%s) to x: %f y:%f z: %f o: %f. Aborted.", m_creature->GetGuidStr().c_str(), pUnit->GetGuidStr().c_str(), fX, fY, fZ, fO); return; } @@ -570,7 +570,7 @@ bool ScriptedAI::EnterEvadeIfOutOfCombatArea(const uint32 uiDiff) return false; break; default: - error_log("SD2: EnterEvadeIfOutOfCombatArea used for creature entry %u, but does not have any definition.", m_creature->GetEntry()); + script_error_log("EnterEvadeIfOutOfCombatArea used for creature entry %u, but does not have any definition.", m_creature->GetEntry()); return false; } diff --git a/include/sc_instance.cpp b/include/sc_instance.cpp index 37720cc26..d4a34a43f 100644 --- a/include/sc_instance.cpp +++ b/include/sc_instance.cpp @@ -26,7 +26,7 @@ void ScriptedInstance::DoUseDoorOrButton(ObjectGuid guid, uint32 uiWithRestoreTi pGo->ResetDoorOrButton(); } else - error_log("SD2: Script call DoUseDoorOrButton, but gameobject entry %u is type %u.", pGo->GetEntry(), pGo->GetGoType()); + script_error_log("Script call DoUseDoorOrButton, but gameobject entry %u is type %u.", pGo->GetEntry(), pGo->GetGoType()); } } @@ -38,7 +38,7 @@ void ScriptedInstance::DoUseDoorOrButton(uint32 uiEntry, uint32 uiWithRestoreTim DoUseDoorOrButton(find->second, uiWithRestoreTime, bUseAlternativeState); else // Output log, possible reason is not added GO to storage, or not yet loaded - debug_log("SD2: Script call DoUseDoorOrButton(by Entry), but no gameobject of entry %u was created yet, or it was not stored by script for map %u.", uiEntry, instance->GetId()); + script_error_log("Script call DoUseDoorOrButton(by Entry), but no gameobject of entry %u was created yet, or it was not stored by script for map %u.", uiEntry, instance->GetId()); } /** @@ -75,7 +75,7 @@ void ScriptedInstance::DoToggleGameObjectFlags(uint32 uiEntry, uint32 uiGOflags, DoToggleGameObjectFlags(find->second, uiGOflags, bApply); else // Output log, possible reason is not added GO to storage, or not yet loaded - debug_log("SD2: Script call ToogleTameObjectFlags (by Entry), but no gameobject of entry %u was created yet, or it was not stored by script for map %u.", uiEntry, instance->GetId()); + script_error_log("Script call ToogleTameObjectFlags (by Entry), but no gameobject of entry %u was created yet, or it was not stored by script for map %u.", uiEntry, instance->GetId()); } /** @@ -108,7 +108,7 @@ void ScriptedInstance::DoRespawnGameObject(uint32 uiEntry, uint32 uiTimeToDespaw DoRespawnGameObject(find->second, uiTimeToDespawn); else // Output log, possible reason is not added GO to storage, or not yet loaded; - debug_log("SD2: Script call DoRespawnGameObject(by Entry), but no gameobject of entry %u was created yet, or it was not stored by script for map %u.", uiEntry, instance->GetId()); + script_error_log(" Script call DoRespawnGameObject(by Entry), but no gameobject of entry %u was created yet, or it was not stored by script for map %u.", uiEntry, instance->GetId()); } /** @@ -266,7 +266,7 @@ void DialogueHelper::StartNextDialogueText(int32 iTextEntry) if (!bFound) { - error_log("SD2: Script call DialogueHelper::StartNextDialogueText, but textEntry %i is not in provided dialogue (on map id %u)", iTextEntry, m_pInstance ? m_pInstance->instance->GetId() : 0); + script_error_log("Script call DialogueHelper::StartNextDialogueText, but textEntry %i is not in provided dialogue (on map id %u)", iTextEntry, m_pInstance ? m_pInstance->instance->GetId() : 0); return; } diff --git a/include/sc_instance.h b/include/sc_instance.h index 752ecfca5..7e271a706 100644 --- a/include/sc_instance.h +++ b/include/sc_instance.h @@ -21,7 +21,7 @@ enum EncounterState #define OUT_SAVE_INST_DATA_COMPLETE debug_log("SD2: Saving Instance Data for Instance %s (Map %d, Instance Id %d) completed.", instance->GetMapName(), instance->GetId(), instance->GetInstanceId()) #define OUT_LOAD_INST_DATA(a) debug_log("SD2: Loading Instance Data for Instance %s (Map %d, Instance Id %d). Input is '%s'", instance->GetMapName(), instance->GetId(), instance->GetInstanceId(), a) #define OUT_LOAD_INST_DATA_COMPLETE debug_log("SD2: Instance Data Load for Instance %s (Map %d, Instance Id: %d) is complete.", instance->GetMapName(), instance->GetId(), instance->GetInstanceId()) -#define OUT_LOAD_INST_DATA_FAIL error_log("SD2: Unable to load Instance Data for Instance %s (Map %d, Instance Id: %d).", instance->GetMapName(), instance->GetId(), instance->GetInstanceId()) +#define OUT_LOAD_INST_DATA_FAIL script_error_log("Unable to load Instance Data for Instance %s (Map %d, Instance Id: %d).", instance->GetMapName(), instance->GetId(), instance->GetInstanceId()) class MANGOS_DLL_DECL ScriptedInstance : public InstanceData { diff --git a/scriptdev2.conf.dist.in b/scriptdev2.conf.dist.in index b25d9d9df..a97fde04f 100644 --- a/scriptdev2.conf.dist.in +++ b/scriptdev2.conf.dist.in @@ -2,7 +2,7 @@ # This file must be placed within the directory which holds mangosd.conf and realmd.conf [ScriptDev2Conf] -ConfVersion=2010062001 +ConfVersion=2012112301 # Database connection settings for the world server. # Default: hostname;port;username;password;database @@ -11,3 +11,6 @@ ConfVersion=2010062001 # .;/path/to/unix_socket;username;password;database - use Unix sockets at Unix/Linux # Unix sockets: experimental, not tested ScriptDev2DatabaseInfo = "127.0.0.1;3306;mangos;mangos;scriptdev2" + +# Log File for SD2-Errors +SD2ErrorLogFile = "SD2Errors.log" diff --git a/scripts/eastern_kingdoms/blackrock_spire/instance_blackrock_spire.cpp b/scripts/eastern_kingdoms/blackrock_spire/instance_blackrock_spire.cpp index 2de91da0c..22701784c 100644 --- a/scripts/eastern_kingdoms/blackrock_spire/instance_blackrock_spire.cpp +++ b/scripts/eastern_kingdoms/blackrock_spire/instance_blackrock_spire.cpp @@ -397,7 +397,7 @@ void instance_blackrock_spire::DoProcessEmberseerEvent() if (m_lIncarceratorGUIDList.empty()) { - error_log("SD2: Npc %u couldn't be found. Please check your DB content!", NPC_BLACKHAND_INCARCERATOR); + script_error_log("Npc %u couldn't be found. Please check your DB content!", NPC_BLACKHAND_INCARCERATOR); return; } diff --git a/scripts/eastern_kingdoms/magisters_terrace/boss_selin_fireheart.cpp b/scripts/eastern_kingdoms/magisters_terrace/boss_selin_fireheart.cpp index acf477b47..f77da9a83 100644 --- a/scripts/eastern_kingdoms/magisters_terrace/boss_selin_fireheart.cpp +++ b/scripts/eastern_kingdoms/magisters_terrace/boss_selin_fireheart.cpp @@ -147,7 +147,7 @@ struct MANGOS_DLL_DECL boss_selin_fireheartAI : public ScriptedAI else { // Make an error message in case something weird happened here - error_log("SD2: Selin Fireheart unable to drain crystal as the crystal is either dead or deleted.."); + script_error_log("Selin Fireheart unable to drain crystal as the crystal is either dead or deleted.."); m_bDrainingCrystal = false; } } diff --git a/scripts/eastern_kingdoms/shadowfang_keep/boss_hummel.cpp b/scripts/eastern_kingdoms/shadowfang_keep/boss_hummel.cpp index 910215911..2d5bdeffe 100644 --- a/scripts/eastern_kingdoms/shadowfang_keep/boss_hummel.cpp +++ b/scripts/eastern_kingdoms/shadowfang_keep/boss_hummel.cpp @@ -191,7 +191,7 @@ struct MANGOS_DLL_DECL npc_valentine_boss_managerAI : public ScriptedAI, private pBaxter->GetMotionMaster()->MovePoint(1, fX, fY, fZ); } else - error_log("SD2: Gameobject %u couldn't be found or something really bad happened.", GO_APOTHECARE_VIALS); + script_error_log("Gameobject %u couldn't be found or something really bad happened.", GO_APOTHECARE_VIALS); } // Move Frye to position @@ -209,7 +209,7 @@ struct MANGOS_DLL_DECL npc_valentine_boss_managerAI : public ScriptedAI, private pFrye->GetMotionMaster()->MovePoint(1, fX, fY, fZ); } else - error_log("SD2: Gameobject %u couldn't be found or something really bad happened.", GO_CHEMISTRY_SET); + script_error_log("Gameobject %u couldn't be found or something really bad happened.", GO_CHEMISTRY_SET); } } diff --git a/scripts/eastern_kingdoms/sunwell_plateau/boss_brutallus.cpp b/scripts/eastern_kingdoms/sunwell_plateau/boss_brutallus.cpp index 9193ad3c1..8c3f9c115 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/boss_brutallus.cpp +++ b/scripts/eastern_kingdoms/sunwell_plateau/boss_brutallus.cpp @@ -201,7 +201,7 @@ struct MANGOS_DLL_DECL boss_brutallusAI : public ScriptedAI, private DialogueHel { // Error log if Madrigosa dies if (pSummoned->GetEntry() == NPC_MADRIGOSA) - error_log("SD2: Npc %u, %s, died unexpectedly. Felmyst won't be summoned anymore.", pSummoned->GetEntry(), pSummoned->GetName()); + script_error_log("Npc %u, %s, died unexpectedly. Felmyst won't be summoned anymore.", pSummoned->GetEntry(), pSummoned->GetName()); } void SummonedCreatureDespawn(Creature* pSummoned) override diff --git a/scripts/eastern_kingdoms/zulaman/instance_zulaman.cpp b/scripts/eastern_kingdoms/zulaman/instance_zulaman.cpp index d13c48b71..2a5dbc95e 100644 --- a/scripts/eastern_kingdoms/zulaman/instance_zulaman.cpp +++ b/scripts/eastern_kingdoms/zulaman/instance_zulaman.cpp @@ -295,7 +295,7 @@ void instance_zulaman::SetData(uint32 uiType, uint32 uiData) break; default: - error_log("SD2: Instance Zulaman: ERROR SetData = %u for type %u does not exist/not implemented.", uiType, uiData); + script_error_log("Instance Zulaman: ERROR SetData = %u for type %u does not exist/not implemented.", uiType, uiData); return; } diff --git a/scripts/eastern_kingdoms/zulaman/zulaman.cpp b/scripts/eastern_kingdoms/zulaman/zulaman.cpp index 863ce83ff..6017d7931 100644 --- a/scripts/eastern_kingdoms/zulaman/zulaman.cpp +++ b/scripts/eastern_kingdoms/zulaman/zulaman.cpp @@ -228,7 +228,7 @@ bool GOUse_go_strange_gong(Player* pPlayer, GameObject* pGo) pHarrisonAI->SetHoldState(false); } else - error_log("SD2: Instance Zulaman: go_strange_gong failed"); + script_error_log("Instance Zulaman: go_strange_gong failed"); pGo->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NO_INTERACT); return false; diff --git a/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.cpp b/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.cpp index 9afb0797b..1d436a4c7 100644 --- a/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.cpp +++ b/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.cpp @@ -308,7 +308,7 @@ void hyjalAI::SummonNextWave() if (!pWaveData) { - error_log("SD2: hyjalAI not able to obtain wavedata for SummonNextWave."); + script_error_log("hyjalAI not able to obtain wavedata for SummonNextWave."); return; } diff --git a/scripts/kalimdor/durotar.cpp b/scripts/kalimdor/durotar.cpp index e0173259a..5b74f7f73 100644 --- a/scripts/kalimdor/durotar.cpp +++ b/scripts/kalimdor/durotar.cpp @@ -82,7 +82,7 @@ struct MANGOS_DLL_DECL npc_lazy_peonAI : public ScriptedAI m_creature->GetMotionMaster()->MovePoint(2, fX, fY, fZ); } else - error_log("SD2: No GameObject of entry %u was found in range or something really bad happened.", GO_LUMBERPILE); + script_error_log("No GameObject of entry %u was found in range or something really bad happened.", GO_LUMBERPILE); } void MovementInform(uint32 uiMotionType, uint32 uiPointId) override diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_cthun.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_cthun.cpp index e16ba23aa..f686e10ce 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/boss_cthun.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_cthun.cpp @@ -144,7 +144,7 @@ struct MANGOS_DLL_DECL boss_eye_of_cthunAI : public Scripted_NoMovementAI if (Creature* pCthun = m_pInstance->GetSingleCreatureFromStorage(NPC_CTHUN)) pCthun->AI()->AttackStart(pKiller); else - error_log("SD2: C'thun could not be found. Please check your database!"); + script_error_log("C'thun could not be found. Please check your database!"); } } diff --git a/scripts/kalimdor/temple_of_ahnqiraj/mob_anubisath_sentinel.cpp b/scripts/kalimdor/temple_of_ahnqiraj/mob_anubisath_sentinel.cpp index f0cd8a577..e4c986dd5 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/mob_anubisath_sentinel.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/mob_anubisath_sentinel.cpp @@ -167,7 +167,7 @@ struct MANGOS_DLL_DECL npc_anubisath_sentinelAI : public ScriptedAI } if (m_lAssistList.size() != MAX_BUDDY) - error_log("SD2: npc_anubisath_sentinel for %s found too few/too many buddies, expected %u.", m_creature->GetGuidStr().c_str(), MAX_BUDDY); + script_error_log("npc_anubisath_sentinel for %s found too few/too many buddies, expected %u.", m_creature->GetGuidStr().c_str(), MAX_BUDDY); } void UpdateAI(const uint32 uiDiff) override diff --git a/scripts/northrend/azjol-nerub/ahnkahet/instance_ahnkahet.cpp b/scripts/northrend/azjol-nerub/ahnkahet/instance_ahnkahet.cpp index a73600046..07162b600 100644 --- a/scripts/northrend/azjol-nerub/ahnkahet/instance_ahnkahet.cpp +++ b/scripts/northrend/azjol-nerub/ahnkahet/instance_ahnkahet.cpp @@ -158,7 +158,7 @@ void instance_ahnkahet::SetData(uint32 uiType, uint32 uiData) break; default: - error_log("SD2: Instance Ahn'Kahet: ERROR SetData = %u for type %u does not exist/not implemented.", uiType, uiData); + script_error_log("Instance Ahn'Kahet: ERROR SetData = %u for type %u does not exist/not implemented.", uiType, uiData); break; } diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp index 4d2e8b9c8..bda223071 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp @@ -328,7 +328,7 @@ void instance_trial_of_the_crusader::SetData(uint32 uiType, uint32 uiData) m_auiEncounter[uiType] = uiData; break; default: - error_log("SD2: Instance Trial of The Crusader: ERROR SetData = %u for type %u does not exist/not implemented.", uiType, uiData); + script_error_log("Instance Trial of The Crusader: ERROR SetData = %u for type %u does not exist/not implemented.", uiType, uiData); return; } diff --git a/scripts/northrend/gundrak/instance_gundrak.cpp b/scripts/northrend/gundrak/instance_gundrak.cpp index 037010562..b7be8a357 100644 --- a/scripts/northrend/gundrak/instance_gundrak.cpp +++ b/scripts/northrend/gundrak/instance_gundrak.cpp @@ -242,7 +242,7 @@ void instance_gundrak::SetData(uint32 uiType, uint32 uiData) m_uisShareLoveAchievPlayers.insert(uiData); break; default: - error_log("SD2: Instance Gundrak: ERROR SetData = %u for type %u does not exist/not implemented.", uiType, uiData); + script_error_log("Instance Gundrak: ERROR SetData = %u for type %u does not exist/not implemented.", uiType, uiData); return; } diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_citadel.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_citadel.cpp index 9a13fa88d..ea7fd7651 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_citadel.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_citadel.cpp @@ -390,7 +390,7 @@ void instance_icecrown_citadel::SetData(uint32 uiType, uint32 uiData) m_auiEncounter[uiType] = uiData; break; default: - error_log("SD2: Instance Icecrown Citadel: ERROR SetData = %u for type %u does not exist/not implemented.", uiType, uiData); + script_error_log("Instance Icecrown Citadel: ERROR SetData = %u for type %u does not exist/not implemented.", uiType, uiData); return; } diff --git a/scripts/northrend/naxxramas/instance_naxxramas.cpp b/scripts/northrend/naxxramas/instance_naxxramas.cpp index 611991e55..23ec5985e 100644 --- a/scripts/northrend/naxxramas/instance_naxxramas.cpp +++ b/scripts/northrend/naxxramas/instance_naxxramas.cpp @@ -639,7 +639,7 @@ bool instance_naxxramas::IsInRightSideGothArea(Unit* pUnit) if (GameObject* pCombatGate = GetSingleGameObjectFromStorage(GO_MILI_GOTH_COMBAT_GATE)) return (pCombatGate->GetPositionY() >= pUnit->GetPositionY()); - error_log("SD2: left/right side check, Gothik combat area failed."); + script_error_log("left/right side check, Gothik combat area failed."); return true; } diff --git a/scripts/northrend/nexus/nexus/instance_nexus.cpp b/scripts/northrend/nexus/nexus/instance_nexus.cpp index b4125b3bb..5951d92a0 100644 --- a/scripts/northrend/nexus/nexus/instance_nexus.cpp +++ b/scripts/northrend/nexus/nexus/instance_nexus.cpp @@ -126,7 +126,7 @@ void instance_nexus::SetData(uint32 uiType, uint32 uiData) m_sIntenseColdFailPlayers.insert(uiData); break; default: - error_log("SD2: Instance Nexus: ERROR SetData = %u for type %u does not exist/not implemented.", uiType, uiData); + script_error_log("Instance Nexus: ERROR SetData = %u for type %u does not exist/not implemented.", uiType, uiData); return; } diff --git a/scripts/northrend/ulduar/halls_of_lightning/boss_volkhan.cpp b/scripts/northrend/ulduar/halls_of_lightning/boss_volkhan.cpp index 96c5744c4..b92ff06be 100644 --- a/scripts/northrend/ulduar/halls_of_lightning/boss_volkhan.cpp +++ b/scripts/northrend/ulduar/halls_of_lightning/boss_volkhan.cpp @@ -244,7 +244,7 @@ struct MANGOS_DLL_DECL boss_volkhanAI : public ScriptedAI m_creature->GetMotionMaster()->MovePoint(1, fX, fY, fZ); } else - error_log("SD2: Npc %u couldn't be found or something really bad happened.", NPC_VOLKHAN_ANVIL); + script_error_log("Npc %u couldn't be found or something really bad happened.", NPC_VOLKHAN_ANVIL); } m_uiTemperTimer = 30000; } diff --git a/scripts/northrend/utgarde_keep/utgarde_keep/utgarde_keep.cpp b/scripts/northrend/utgarde_keep/utgarde_keep/utgarde_keep.cpp index 20ac8e7de..d99744910 100644 --- a/scripts/northrend/utgarde_keep/utgarde_keep/utgarde_keep.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_keep/utgarde_keep.cpp @@ -84,7 +84,7 @@ struct MANGOS_DLL_DECL mob_dragonflayer_forge_masterAI : public ScriptedAI if (!lGOList.empty()) { if (lGOList.size() != MAX_FORGE) - error_log("SD2: mob_dragonflayer_forge_master expected %u in lGOList, but does not match.", MAX_FORGE); + script_error_log("mob_dragonflayer_forge_master expected %u in lGOList, but does not match.", MAX_FORGE); lGOList.sort(ObjectDistanceOrder(m_creature)); diff --git a/scripts/northrend/utgarde_keep/utgarde_pinnacle/instance_utgarde_pinnacle.cpp b/scripts/northrend/utgarde_keep/utgarde_pinnacle/instance_utgarde_pinnacle.cpp index 06ecea95f..aeae7d1fd 100644 --- a/scripts/northrend/utgarde_keep/utgarde_pinnacle/instance_utgarde_pinnacle.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_pinnacle/instance_utgarde_pinnacle.cpp @@ -144,7 +144,7 @@ void instance_pinnacle::SetData(uint32 uiType, uint32 uiData) m_auiEncounter[uiType] = uiData; break; default: - error_log("SD2: Instance Pinnacle: SetData = %u for type %u does not exist/not implemented.", uiType, uiData); + script_error_log("Instance Pinnacle: SetData = %u for type %u does not exist/not implemented.", uiType, uiData); return; } diff --git a/scripts/outland/auchindoun/shadow_labyrinth/instance_shadow_labyrinth.cpp b/scripts/outland/auchindoun/shadow_labyrinth/instance_shadow_labyrinth.cpp index fffba77a7..b1772eebc 100644 --- a/scripts/outland/auchindoun/shadow_labyrinth/instance_shadow_labyrinth.cpp +++ b/scripts/outland/auchindoun/shadow_labyrinth/instance_shadow_labyrinth.cpp @@ -88,7 +88,7 @@ void instance_shadow_labyrinth::SetData(uint32 uiType, uint32 uiData) case TYPE_OVERSEER: if (uiData != DONE) { - error_log("SD2: Shadow Labyrinth: TYPE_OVERSEER did not expect other data than DONE"); + script_error_log("Shadow Labyrinth: TYPE_OVERSEER did not expect other data than DONE"); return; } if (m_uiFelOverseerCount) diff --git a/scripts/outland/black_temple/instance_black_temple.cpp b/scripts/outland/black_temple/instance_black_temple.cpp index 25e3fdadc..9aef178c9 100644 --- a/scripts/outland/black_temple/instance_black_temple.cpp +++ b/scripts/outland/black_temple/instance_black_temple.cpp @@ -218,7 +218,7 @@ void instance_black_temple::SetData(uint32 uiType, uint32 uiData) m_auiEncounter[uiType] = uiData; break; default: - error_log("SD2: Instance Black Temple: ERROR SetData = %u for type %u does not exist/not implemented.", uiType, uiData); + script_error_log("Instance Black Temple: ERROR SetData = %u for type %u does not exist/not implemented.", uiType, uiData); return; } diff --git a/scripts/outland/hellfire_citadel/blood_furnace/instance_blood_furnace.cpp b/scripts/outland/hellfire_citadel/blood_furnace/instance_blood_furnace.cpp index ddc39d6d4..8fa779ee7 100644 --- a/scripts/outland/hellfire_citadel/blood_furnace/instance_blood_furnace.cpp +++ b/scripts/outland/hellfire_citadel/blood_furnace/instance_blood_furnace.cpp @@ -162,7 +162,7 @@ void instance_blood_furnace::SetData(uint32 uiType, uint32 uiData) m_auiEncounter[uiType] = uiData; break; default: - error_log("SD2: Instance Blood Furnace SetData with Type %u Data %u, but this is not implemented.", uiType, uiData); + script_error_log("Instance Blood Furnace SetData with Type %u Data %u, but this is not implemented.", uiType, uiData); return; } diff --git a/scripts/outland/hellfire_peninsula.cpp b/scripts/outland/hellfire_peninsula.cpp index bbf78ad8a..1a536e7e3 100644 --- a/scripts/outland/hellfire_peninsula.cpp +++ b/scripts/outland/hellfire_peninsula.cpp @@ -142,7 +142,7 @@ struct MANGOS_DLL_DECL npc_ancestral_wolfAI : public npc_escortAI if (pCreature->GetOwner() && pCreature->GetOwner()->GetTypeId() == TYPEID_PLAYER) Start(false, (Player*)pCreature->GetOwner()); else - error_log("SD2: npc_ancestral_wolf can not obtain owner or owner is not a player."); + script_error_log("npc_ancestral_wolf can not obtain owner or owner is not a player."); Reset(); } diff --git a/scripts/outland/shadowmoon_valley.cpp b/scripts/outland/shadowmoon_valley.cpp index 3a6d37592..b5c9e29ee 100644 --- a/scripts/outland/shadowmoon_valley.cpp +++ b/scripts/outland/shadowmoon_valley.cpp @@ -1510,7 +1510,7 @@ struct MANGOS_DLL_DECL npc_spawned_oronok_tornheartAI : public ScriptedAI, priva } else { - error_log("SD2: Npc %u couldn't be found or something really bad happened. Epilogue event for quest %u will stop.", NPC_CYRUKH_THE_FIRELORD, QUEST_CIPHER_OF_DAMNATION); + script_error_log("Npc %u couldn't be found or something really bad happened. Epilogue event for quest %u will stop.", NPC_CYRUKH_THE_FIRELORD, QUEST_CIPHER_OF_DAMNATION); m_creature->GetMotionMaster()->MoveTargetedHome(); } } diff --git a/scripts/outland/shattrath_city.cpp b/scripts/outland/shattrath_city.cpp index d8858977f..91d3effa7 100644 --- a/scripts/outland/shattrath_city.cpp +++ b/scripts/outland/shattrath_city.cpp @@ -315,7 +315,7 @@ struct MANGOS_DLL_DECL npc_khadgars_servantAI : public npc_escortAI if (pCreature->GetOwner() && pCreature->GetOwner()->GetTypeId() == TYPEID_PLAYER) Start(false, (Player*)pCreature->GetOwner()); else - error_log("SD2: npc_khadgars_servant can not obtain owner or owner is not a player."); + script_error_log("npc_khadgars_servant can not obtain owner or owner is not a player."); Reset(); } diff --git a/scripts/world/go_scripts.cpp b/scripts/world/go_scripts.cpp index ee6e176c8..46d7de513 100644 --- a/scripts/world/go_scripts.cpp +++ b/scripts/world/go_scripts.cpp @@ -109,7 +109,7 @@ bool GOUse_go_ethereum_prison(Player* pPlayer, GameObject* pGo) if (uiSpell) pCreature->CastSpell(pPlayer, uiSpell, false); else - error_log("SD2: go_ethereum_prison summoned creature (entry %u) but faction (%u) are not expected by script.", pCreature->GetEntry(), pCreature->getFaction()); + script_error_log("go_ethereum_prison summoned creature (entry %u) but faction (%u) are not expected by script.", pCreature->GetEntry(), pCreature->getFaction()); } } } diff --git a/scripts/world/npcs_special.cpp b/scripts/world/npcs_special.cpp index 8da8f477c..e5934f164 100644 --- a/scripts/world/npcs_special.cpp +++ b/scripts/world/npcs_special.cpp @@ -745,7 +745,7 @@ void npc_doctorAI::UpdateAI(const uint32 diff) case DOCTOR_ALLIANCE: patientEntry = AllianceSoldierId[urand(0, 2)]; break; case DOCTOR_HORDE: patientEntry = HordeSoldierId[urand(0, 2)]; break; default: - error_log("SD2: Invalid entry for Triage doctor. Please check your database"); + script_error_log("Invalid entry for Triage doctor. Please check your database"); return; } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index d2b5392b2..3378c98c3 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2761" + #define SD2_REVISION_NR "2762" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 6552c60ce..11a556d8d 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -3,7 +3,7 @@ -- DELETE FROM sd2_db_version; -INSERT INTO sd2_db_version (version) VALUES ('ScriptDev2 (for MaNGOS 12026+) '); +INSERT INTO sd2_db_version (version) VALUES ('ScriptDev2 (for C-MaNGOS 12280+) '); -- -- Below contains data for table `script_texts` mainly used in C++ parts. diff --git a/sql/updates/r2762_scriptdev2.sql b/sql/updates/r2762_scriptdev2.sql new file mode 100644 index 000000000..2af19e71d --- /dev/null +++ b/sql/updates/r2762_scriptdev2.sql @@ -0,0 +1 @@ +UPDATE sd2_db_version SET version='ScriptDev2 (for C-MaNGOS 12280+) '; diff --git a/system/system.cpp b/system/system.cpp index b7dd3ae29..52eb81905 100644 --- a/system/system.cpp +++ b/system/system.cpp @@ -36,7 +36,7 @@ void SystemMgr::LoadVersion() delete pResult; } else - error_log("SD2: Missing `sd2_db_version` information."); + script_error_log("Missing `sd2_db_version` information."); // Setup version info and display it if (strSD2Version.empty()) From 9d2fb427cea416bc380045c465c896eb7948a3ba Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sat, 24 Nov 2012 03:51:23 +0200 Subject: [PATCH 0760/1172] [2763] Add script support for quest 12687 - Into the Realm of Shadows --- .../scarlet_enclave/ebon_hold.cpp | 148 ++++++++++++++- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 + sql/scriptdev2_script_full.sql | 176 +++++++++--------- sql/updates/r2763_mangos.sql | 1 + sql/updates/r2763_scriptdev2.sql | 4 + 6 files changed, 243 insertions(+), 89 deletions(-) create mode 100644 sql/updates/r2763_mangos.sql create mode 100644 sql/updates/r2763_scriptdev2.sql diff --git a/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp b/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp index 78e34e7f1..6540c50ee 100644 --- a/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp +++ b/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp @@ -17,7 +17,7 @@ /* ScriptData SDName: Ebon_Hold SD%Complete: 95 -SDComment: Quest support: 12641, 12698, 12733, 12739(and 12742 to 12750), 12727, 12801, 12848 +SDComment: Quest support: 12641, 12687, 12698, 12727, 12733, 12739(and 12742 to 12750), 12801, 12848 SDCategory: Ebon Hold EndScriptData */ @@ -31,6 +31,7 @@ npc_eye_of_acherus npc_scarlet_ghoul npc_highlord_darion_mograine npc_fellow_death_knight +npc_acherus_deathcharger EndContentData */ #include "precompiled.h" @@ -2706,6 +2707,145 @@ CreatureAI* GetAI_npc_fellow_death_knight(Creature* pCreature) return new npc_fellow_death_knightAI(pCreature); } +/*###### +## npc_acherus_deathcharger +######*/ + +enum +{ + EMOTE_HORSE_READY = -1609287, + SAY_RACE_FINISHED = -1609288, + + SPELL_HORSEMAN_SLAIN = 52692, + SPELL_RACE_COMPLETE = 52361, + + NPC_DARK_RIDER_OF_ACHERUS = 28768, + NPC_SALANAR_THE_HORSEMAN = 28788, + + FACTION_FRIENDLY = 35, +}; + +struct MANGOS_DLL_DECL npc_acherus_deathchargerAI : public ScriptedAI +{ + npc_acherus_deathchargerAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } + + bool m_bIsRiderDead; + + uint8 m_uiQuestEndStage; + uint32 m_uiQuestEndTimer; + + ObjectGuid m_salaranGuid; + + void Reset() override + { + m_bIsRiderDead = false; + m_uiQuestEndStage = 0; + m_uiQuestEndTimer = 0; + + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + } + + void EnterEvadeMode() override + { + if (m_bIsRiderDead) + { + m_creature->RemoveAllAuras(); + m_creature->DeleteThreatList(); + m_creature->CombatStop(true); + m_creature->LoadCreatureAddon(true); + m_creature->SetLootRecipient(NULL); + + // Stop movemnet + m_creature->GetMotionMaster()->Clear(); + m_creature->GetMotionMaster()->MoveIdle(); + + // Prepare to be mounted + DoScriptText(EMOTE_HORSE_READY, m_creature); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + m_creature->SetFactionTemporary(FACTION_FRIENDLY, TEMPFACTION_RESTORE_RESPAWN); + } + else + ScriptedAI::EnterEvadeMode(); + } + + void JustSummoned(Creature* pSummoned) override + { + if (pSummoned->GetEntry() == NPC_SALANAR_THE_HORSEMAN) + { + float fX, fY, fZ; + m_creature->GetContactPoint(pSummoned, fX, fY, fZ, INTERACTION_DISTANCE); + pSummoned->GetMotionMaster()->MovePoint(1, fX, fY, fZ); + + m_salaranGuid = pSummoned->GetObjectGuid(); + m_uiQuestEndTimer = 4000; + } + } + + void SummonedCreatureJustDied(Creature* pSummoned) override + { + // Initial vehicle rider - handled in DB + if (pSummoned->GetEntry() == NPC_DARK_RIDER_OF_ACHERUS) + { + m_bIsRiderDead = true; + DoCastSpellIfCan(m_creature, SPELL_HORSEMAN_SLAIN, CAST_TRIGGERED); + } + } + + void UpdateAI(const uint32 uiDiff) override + { + if (m_uiQuestEndTimer) + { + if (m_uiQuestEndTimer <= uiDiff) + { + switch (m_uiQuestEndStage) + { + case 0: + if (Creature* pSalaran = m_creature->GetMap()->GetCreature(m_salaranGuid)) + DoScriptText(SAY_RACE_FINISHED, pSalaran); + + m_uiQuestEndTimer = 5000; + break; + case 1: + // Cast completion spell on player + Creature* pSalaran = m_creature->GetMap()->GetCreature(m_salaranGuid); + Player* pPlayer = m_creature->GetCharmerOrOwnerPlayerOrPlayerItself(); + if (!pPlayer || !pSalaran) + return; + + pSalaran->CastSpell(pPlayer, SPELL_RACE_COMPLETE, true); + pSalaran->ForcedDespawn(1000); + m_creature->ForcedDespawn(1000); + m_uiQuestEndTimer = 0; + break; + } + ++m_uiQuestEndStage; + } + else + m_uiQuestEndTimer -= uiDiff; + } + } +}; + +CreatureAI* GetAI_npc_acherus_deathcharger(Creature* pCreature) +{ + return new npc_acherus_deathchargerAI(pCreature); +} + +bool EffectDummyCreature_npc_acherus_deathcharger(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) +{ + // always check spellid and effectindex + if (uiSpellId == SPELL_HORSEMAN_SLAIN && uiEffIndex == EFFECT_INDEX_0) + { + // Make horse evade + pCreatureTarget->AI()->EnterEvadeMode(); + + // always return true when we are handling this spell and effect + return true; + } + + return false; +} + void AddSC_ebon_hold() { Script* pNewScript; @@ -2765,4 +2905,10 @@ void AddSC_ebon_hold() pNewScript->Name = "npc_fellow_death_knight"; pNewScript->GetAI = &GetAI_npc_fellow_death_knight; pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_acherus_deathcharger"; + pNewScript->GetAI = &GetAI_npc_acherus_deathcharger; + pNewScript->pEffectDummyNPC = &EffectDummyCreature_npc_acherus_deathcharger; + pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 3378c98c3..92d29e754 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2762" + #define SD2_REVISION_NR "2763" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 584aac4bb..97ce5def3 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -545,6 +545,7 @@ UPDATE creature_template SET ScriptName='npc_eye_of_acherus' WHERE entry=28511; UPDATE creature_template SET ScriptName='npc_scarlet_ghoul' WHERE entry=28845; UPDATE creature_template SET ScriptName='npc_highlord_darion_mograine' WHERE entry=29173; UPDATE creature_template SET ScriptName='npc_fellow_death_knight' WHERE entry IN (29199, 29204, 29200); +UPDATE creature_template SET ScriptName='npc_acherus_deathcharger' WHERE entry=28782; /* ELWYNN FOREST */ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 11a556d8d..294fd4a80 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -3725,93 +3725,95 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1609095,'$gPoppy:Mama;!',0,0,0,434,'scarlet ghoul SAY_GHUL_SPAWN_5'), (-1609096,'It puts the ghoul in the pit or else it gets the lash!',0,0,0,25,'gothik the harvester SAY_GOTHIK_THROW_IN_PIT'), -(-1609201, 'Soldiers of the Scourge, stand ready! Prepare to unleash your fury upon the Argent Dawn!',14677,1,0,0,'Highlord Darion Mograine'), -(-1609202, 'The sky weeps at the devastation of these lands! Soon, Azeroth\'s futile tears will rain down upon us!',14678,1,0,0,'Highlord Darion Mograine'), -(-1609203, 'Death knights of Acherus, the death march begins!',14681,1,0,0,'Highlord Darion Mograine'), -(-1609204, 'Soldiers of the Scourge, death knights of Acherus, minions of the darkness: hear the call of the Highlord!',14679,1,0,22,'Highlord Darion Mograine'), -(-1609205, 'RISE!',14680,1,0,15,'Highlord Darion Mograine'), -(-1609206, 'The skies turn red with the blood of the fallen! The Lich King watches over us, minions! Leave only ashes and misery in your destructive wake!',14682,1,0,25,'Highlord Darion Mograine'), -(-1609207, 'Scourge armies approach!',0,1,0,0,'Korfax, Champion of the Light'), -(-1609208, 'Stand fast, brothers and sisters! The Light will prevail!',14487,1,0,0,'Lord Maxwell Tyrosus'), -(-1609209, 'Kneel before the Highlord!',14683,0,0,0,'Highlord Darion Mograine'), -(-1609210, 'You stand no chance!',14684,0,0,0,'Highlord Darion Mograine'), -(-1609211, 'The Scourge will destroy this place!',14685,0,0,0,'Highlord Darion Mograine'), -(-1609212, 'Your life is forfeit.',14686,0,0,0,'Highlord Darion Mograine'), -(-1609213, 'Life is meaningless without suffering.',14687,0,0,0,'Highlord Darion Mograine'), -(-1609214, 'How much longer will your forces hold out?',14688,0,0,0,'Highlord Darion Mograine'), -(-1609215, 'The Argent Dawn is finished!"',14689,0,0,0,'Highlord Darion Mograine'), -(-1609216, 'Spare no one!',14690,0,0,0,'Highlord Darion Mograine'), -(-1609217, 'What is this?! My... I cannot strike...',14691,0,0,0,'Highlord Darion Mograine'), -(-1609218, 'Obey me, blade!',14692,1,0,0,'Highlord Darion Mograine'), -(-1609219, 'You will do as I command! I am in control here!',14693,0,0,0,'Highlord Darion Mograine'), -(-1609220, 'I can not... the blade fights me.',14694,0,0,0,'Highlord Darion Mograine'), -(-1609221, 'What is happening to me?',14695,0,0,0,'Highlord Darion Mograine'), -(-1609222, 'Power...wanes...',14696,0,0,0,'Highlord Darion Mograine'), -(-1609223, 'Ashbringer defies me...',14697,0,0,0,'Highlord Darion Mograine'), -(-1609224, 'Minions, come to my aid!',14698,0,0,0,'Highlord Darion Mograine'), -(-1609225, 'You cannot win, Darion!',14584,1,0,0,'Highlord Tirion Fordring'), -(-1609226, 'Bring them before the chapel!',14585,1,0,0,'Highlord Tirion Fordring'), -(-1609227, 'Stand down, death knights. We have lost... The Light... This place... No hope...',14699,0,0,68,'Highlord Darion Mograine'), -(-1609228, 'Have you learned nothing, boy? You have become all that your father fought against! Like that coward, Arthas, you allowed yourself to be consumed by the darkness...the hate... Feeding upon the misery of those you tortured and killed!',14586,0,0,1,'Highlord Tirion Fordring'), -(-1609229, 'Your master knows what lies beneath the chapel. It is why he dares not show his face! He\'s sent you and your death knights to meet their doom, Darion.',14587,0,0,25,'Highlord Tirion Fordring'), -(-1609230, 'What you are feeling right now is the anguish of a thousand lost souls! Souls that you and your master brought here! The Light will tear you apart, Darion!',14588,0,0,1,'Highlord Tirion Fordring'), -(-1609231, 'Save your breath, old man. It might be the last you ever draw.',14700,0,0,25,'Highlord Darion Mograine'), -(-1609232, 'My son! My dear, beautiful boy!',14493,0,0,0,'Highlord Alexandros Mograine'), -(-1609233, 'Father!',14701,0,0,5,'Highlord Darion Mograine'), -(-1609234, 'Argh...what...is...',14702,0,0,68,'Highlord Darion Mograine'), -(-1609235, 'Father, you have returned!',14703,0,0,0,'Darion Mograine'), -(-1609236, 'You have been gone a long time, father. I thought...',14704,0,0,0,'Darion Mograine'), -(-1609237, 'Nothing could have kept me away from here, Darion. Not from my home and family.',14494,0,0,1,'Highlord Alexandros Mograine'), -(-1609238, 'Father, I wish to join you in the war against the undead. I want to fight! I can sit idle no longer!',14705,0,0,6,'Darion Mograine'), -(-1609239, 'Darion Mograine, you are barely of age to hold a sword, let alone battle the undead hordes of Lordaeron! I couldn\'t bear losing you. Even the thought...',14495,0,0,1,'Highlord Alexandros Mograine'), -(-1609240, 'If I die, father, I would rather it be on my feet, standing in defiance against the undead legions! If I die, father, I die with you!',14706,0,0,6,'Darion Mograine'), -(-1609241, 'My son, there will come a day when you will command the Ashbringer and, with it, mete justice across this land. I have no doubt that when that day finally comes, you will bring pride to our people and that Lordaeron will be a better place because of you. But, my son, that day is not today.',14496,0,0,1,'Highlord Alexandros Mograine'), -(-1609242, 'Do not forget...',14497,0,0,6,'Highlord Alexandros Mograine'), -(-1609243, 'Touching...',14803,1,0,0,'The Lich King'), -(-1609244, 'You have\'ve betrayed me! You betrayed us all you monster! Face the might of Mograine!',14707,1,0,0,'Highlord Darion Mograine'), -(-1609245, 'He\'s mine now...',14805,0,0,0,'The Lich King'), -(-1609246, 'Pathetic...',14804,0,0,0,'The Lich King'), -(-1609247, 'You\'re a damned monster, Arthas!',14589,0,0,25,'Highlord Tirion Fordring'), -(-1609248, 'You were right, Fordring. I did send them in to die. Their lives are meaningless, but yours...',14806,0,0,1,'The Lich King'), -(-1609249, 'How simple it was to draw the great Tirion Fordring out of hiding. You\'ve left yourself exposed, paladin. Nothing will save you...',14807,0,0,1,'The Lich King'), -(-1609250, 'ATTACK!!!',14488,1,0,0,'Lord Maxwell Tyrosus'), -(-1609251, 'APOCALYPSE!',14808,1,0,0,'The Lich King'), -(-1609252, 'That day is not today...',14708,0,0,0,'Highlord Darion Mograine'), -(-1609253, 'Tirion!',14709,1,0,0,'Highlord Darion Mograine'), -(-1609254, 'ARTHAS!!!!',14591,1,0,0,'Highlord Tirion Fordring'), -(-1609255, 'What is this?',14809,1,0,0,'The Lich King'), -(-1609256, 'Your end.',14592,1,0,0,'Highlord Tirion Fordring'), -(-1609257, 'Impossible...',14810,1,0,0,'The Lich King'), -(-1609258, 'This... isn\'t... over...',14811,1,0,25,'The Lich King'), -(-1609259, 'When next we meet it won\'t be on holy ground, paladin.',14812,1,0,1,'The Lich King'), -(-1609260, 'Rise, Darion, and listen...',14593,0,0,0,'Highlord Tirion Fordring'), -(-1609261, 'We have all been witness to a terrible tragedy. The blood of good men has been shed upon this soil! Honorable knights, slain defending their lives - our lives!',14594,0,0,0,'Highlord Tirion Fordring'), -(-1609262, 'And while such things can never be forgotten, we must remain vigilant in our cause!',14595,0,0,0,'Highlord Tirion Fordring'), -(-1609263, 'The Lich King must answer for what he has done and must not be allowed to cause further destruction to our world.',14596,0,0,0,'Highlord Tirion Fordring'), -(-1609264, 'I make a promise to you now, brothers and sisters: The Lich King will be defeated! On this day, I call for a union.',14597,0,0,0,'Highlord Tirion Fordring'), -(-1609265, 'The Argent Dawn and the Order of the Silver Hand will come together as one! We will succeed where so many before us have failed!',14598,0,0,0,'Highlord Tirion Fordring'), -(-1609266, 'We will take the fight to Arthas and tear down the walls of Icecrown!',14599,0,0,15,'Highlord Tirion Fordring'), -(-1609267, 'The Argent Crusade comes for you, Arthas!',14600,1,0,15,'Highlord Tirion Fordring'), -(-1609268, 'So too do the Knights of the Ebon Blade... While our kind has no place in your world, we will fight to bring an end to the Lich King. This I vow!',14710,0,0,1,'Highlord Darion Mograine'), -(-1609269, 'Thousands of Scourge rise up at the Highlord\'s command.',0,3,0,0,''), -(-1609270, 'The army marches towards Light\'s Hope Chapel.',0,3,0,0,''), -(-1609271, 'After over a hundred Defenders of the Light fall, Highlord Tirion Fordring arrives.',0,3,0,0,''), -(-1609272, '%s flee',0,2,0,0,'Orbaz'), -(-1609273, '%s kneels in defeat before Tirion Fordring.',0,3,0,0,'Highlord Darion Mograine'), -(-1609274, '%s arrives.',0,2,0,0,'Highlord Alexandros Mograine'), -(-1609275, '%s becomes a shade of his past, and walks up to his father.',0,2,0,0,'Highlord Darion Mograine'), -(-1609276, '%s hugs his father.',0,2,0,0,'Darion Mograine'), -(-1609277, '%s disappears, and the Lich King appears.',0,2,0,0,'Alexandros'), -(-1609278, '%s becomes himself again...and is now angry.',0,2,0,0,'Highlord Darion Mograine'), -(-1609279, '%s casts a spell on Tirion.',0,2,0,0,'The Lich King'), -(-1609280, '%s gasps for air.',0,2,0,0,'Highlord Tirion Fordring'), -(-1609281, '%s casts a powerful spell, killing the Defenders and knocking back the others.',0,2,0,0,'The Lich King'), -(-1609282, '%s throws the Corrupted Ashbringer to Tirion, who catches it. Tirion becomes awash with Light, and the Ashbringer is cleansed.',0,2,0,0,'Highlord Darion Mograine'), -(-1609283, '%s collapses.',0,2,0,0,'Highlord Darion Mograine'), -(-1609284, '%s charges towards the Lich King, Ashbringer in hand and strikes the Lich King.',0,2,0,0,'Highlord Tirion Fordring'), -(-1609285, '%s disappears. Tirion walks over to where Darion lay',0,2,0,0,'The Lich King'), -(-1609286, 'Light washes over the chapel -- the Light of Dawn is uncovered.',0,2,0,0,''); - +(-1609201,'Soldiers of the Scourge, stand ready! Prepare to unleash your fury upon the Argent Dawn!',14677,1,0,0,'Highlord Darion Mograine'), +(-1609202,'The sky weeps at the devastation of these lands! Soon, Azeroth\'s futile tears will rain down upon us!',14678,1,0,0,'Highlord Darion Mograine'), +(-1609203,'Death knights of Acherus, the death march begins!',14681,1,0,0,'Highlord Darion Mograine'), +(-1609204,'Soldiers of the Scourge, death knights of Acherus, minions of the darkness: hear the call of the Highlord!',14679,1,0,22,'Highlord Darion Mograine'), +(-1609205,'RISE!',14680,1,0,15,'Highlord Darion Mograine'), +(-1609206,'The skies turn red with the blood of the fallen! The Lich King watches over us, minions! Leave only ashes and misery in your destructive wake!',14682,1,0,25,'Highlord Darion Mograine'), +(-1609207,'Scourge armies approach!',0,1,0,0,'Korfax, Champion of the Light'), +(-1609208,'Stand fast, brothers and sisters! The Light will prevail!',14487,1,0,0,'Lord Maxwell Tyrosus'), +(-1609209,'Kneel before the Highlord!',14683,0,0,0,'Highlord Darion Mograine'), +(-1609210,'You stand no chance!',14684,0,0,0,'Highlord Darion Mograine'), +(-1609211,'The Scourge will destroy this place!',14685,0,0,0,'Highlord Darion Mograine'), +(-1609212,'Your life is forfeit.',14686,0,0,0,'Highlord Darion Mograine'), +(-1609213,'Life is meaningless without suffering.',14687,0,0,0,'Highlord Darion Mograine'), +(-1609214,'How much longer will your forces hold out?',14688,0,0,0,'Highlord Darion Mograine'), +(-1609215,'The Argent Dawn is finished!"',14689,0,0,0,'Highlord Darion Mograine'), +(-1609216,'Spare no one!',14690,0,0,0,'Highlord Darion Mograine'), +(-1609217,'What is this?! My... I cannot strike...',14691,0,0,0,'Highlord Darion Mograine'), +(-1609218,'Obey me, blade!',14692,1,0,0,'Highlord Darion Mograine'), +(-1609219,'You will do as I command! I am in control here!',14693,0,0,0,'Highlord Darion Mograine'), +(-1609220,'I can not... the blade fights me.',14694,0,0,0,'Highlord Darion Mograine'), +(-1609221,'What is happening to me?',14695,0,0,0,'Highlord Darion Mograine'), +(-1609222,'Power...wanes...',14696,0,0,0,'Highlord Darion Mograine'), +(-1609223,'Ashbringer defies me...',14697,0,0,0,'Highlord Darion Mograine'), +(-1609224,'Minions, come to my aid!',14698,0,0,0,'Highlord Darion Mograine'), +(-1609225,'You cannot win, Darion!',14584,1,0,0,'Highlord Tirion Fordring'), +(-1609226,'Bring them before the chapel!',14585,1,0,0,'Highlord Tirion Fordring'), +(-1609227,'Stand down, death knights. We have lost... The Light... This place... No hope...',14699,0,0,68,'Highlord Darion Mograine'), +(-1609228,'Have you learned nothing, boy? You have become all that your father fought against! Like that coward, Arthas, you allowed yourself to be consumed by the darkness...the hate... Feeding upon the misery of those you tortured and killed!',14586,0,0,1,'Highlord Tirion Fordring'), +(-1609229,'Your master knows what lies beneath the chapel. It is why he dares not show his face! He\'s sent you and your death knights to meet their doom, Darion.',14587,0,0,25,'Highlord Tirion Fordring'), +(-1609230,'What you are feeling right now is the anguish of a thousand lost souls! Souls that you and your master brought here! The Light will tear you apart, Darion!',14588,0,0,1,'Highlord Tirion Fordring'), +(-1609231,'Save your breath, old man. It might be the last you ever draw.',14700,0,0,25,'Highlord Darion Mograine'), +(-1609232,'My son! My dear, beautiful boy!',14493,0,0,0,'Highlord Alexandros Mograine'), +(-1609233,'Father!',14701,0,0,5,'Highlord Darion Mograine'), +(-1609234,'Argh...what...is...',14702,0,0,68,'Highlord Darion Mograine'), +(-1609235,'Father, you have returned!',14703,0,0,0,'Darion Mograine'), +(-1609236,'You have been gone a long time, father. I thought...',14704,0,0,0,'Darion Mograine'), +(-1609237,'Nothing could have kept me away from here, Darion. Not from my home and family.',14494,0,0,1,'Highlord Alexandros Mograine'), +(-1609238,'Father, I wish to join you in the war against the undead. I want to fight! I can sit idle no longer!',14705,0,0,6,'Darion Mograine'), +(-1609239,'Darion Mograine, you are barely of age to hold a sword, let alone battle the undead hordes of Lordaeron! I couldn\'t bear losing you. Even the thought...',14495,0,0,1,'Highlord Alexandros Mograine'), +(-1609240,'If I die, father, I would rather it be on my feet, standing in defiance against the undead legions! If I die, father, I die with you!',14706,0,0,6,'Darion Mograine'), +(-1609241,'My son, there will come a day when you will command the Ashbringer and, with it, mete justice across this land. I have no doubt that when that day finally comes, you will bring pride to our people and that Lordaeron will be a better place because of you. But, my son, that day is not today.',14496,0,0,1,'Highlord Alexandros Mograine'), +(-1609242,'Do not forget...',14497,0,0,6,'Highlord Alexandros Mograine'), +(-1609243,'Touching...',14803,1,0,0,'The Lich King'), +(-1609244,'You have\'ve betrayed me! You betrayed us all you monster! Face the might of Mograine!',14707,1,0,0,'Highlord Darion Mograine'), +(-1609245,'He\'s mine now...',14805,0,0,0,'The Lich King'), +(-1609246,'Pathetic...',14804,0,0,0,'The Lich King'), +(-1609247,'You\'re a damned monster, Arthas!',14589,0,0,25,'Highlord Tirion Fordring'), +(-1609248,'You were right, Fordring. I did send them in to die. Their lives are meaningless, but yours...',14806,0,0,1,'The Lich King'), +(-1609249,'How simple it was to draw the great Tirion Fordring out of hiding. You\'ve left yourself exposed, paladin. Nothing will save you...',14807,0,0,1,'The Lich King'), +(-1609250,'ATTACK!!!',14488,1,0,0,'Lord Maxwell Tyrosus'), +(-1609251,'APOCALYPSE!',14808,1,0,0,'The Lich King'), +(-1609252,'That day is not today...',14708,0,0,0,'Highlord Darion Mograine'), +(-1609253,'Tirion!',14709,1,0,0,'Highlord Darion Mograine'), +(-1609254,'ARTHAS!!!!',14591,1,0,0,'Highlord Tirion Fordring'), +(-1609255,'What is this?',14809,1,0,0,'The Lich King'), +(-1609256,'Your end.',14592,1,0,0,'Highlord Tirion Fordring'), +(-1609257,'Impossible...',14810,1,0,0,'The Lich King'), +(-1609258,'This... isn\'t... over...',14811,1,0,25,'The Lich King'), +(-1609259,'When next we meet it won\'t be on holy ground, paladin.',14812,1,0,1,'The Lich King'), +(-1609260,'Rise, Darion, and listen...',14593,0,0,0,'Highlord Tirion Fordring'), +(-1609261,'We have all been witness to a terrible tragedy. The blood of good men has been shed upon this soil! Honorable knights, slain defending their lives - our lives!',14594,0,0,0,'Highlord Tirion Fordring'), +(-1609262,'And while such things can never be forgotten, we must remain vigilant in our cause!',14595,0,0,0,'Highlord Tirion Fordring'), +(-1609263,'The Lich King must answer for what he has done and must not be allowed to cause further destruction to our world.',14596,0,0,0,'Highlord Tirion Fordring'), +(-1609264,'I make a promise to you now, brothers and sisters: The Lich King will be defeated! On this day, I call for a union.',14597,0,0,0,'Highlord Tirion Fordring'), +(-1609265,'The Argent Dawn and the Order of the Silver Hand will come together as one! We will succeed where so many before us have failed!',14598,0,0,0,'Highlord Tirion Fordring'), +(-1609266,'We will take the fight to Arthas and tear down the walls of Icecrown!',14599,0,0,15,'Highlord Tirion Fordring'), +(-1609267,'The Argent Crusade comes for you, Arthas!',14600,1,0,15,'Highlord Tirion Fordring'), +(-1609268,'So too do the Knights of the Ebon Blade... While our kind has no place in your world, we will fight to bring an end to the Lich King. This I vow!',14710,0,0,1,'Highlord Darion Mograine'), +(-1609269,'Thousands of Scourge rise up at the Highlord\'s command.',0,3,0,0,''), +(-1609270,'The army marches towards Light\'s Hope Chapel.',0,3,0,0,''), +(-1609271,'After over a hundred Defenders of the Light fall, Highlord Tirion Fordring arrives.',0,3,0,0,''), +(-1609272,'%s flee',0,2,0,0,'Orbaz'), +(-1609273,'%s kneels in defeat before Tirion Fordring.',0,3,0,0,'Highlord Darion Mograine'), +(-1609274,'%s arrives.',0,2,0,0,'Highlord Alexandros Mograine'), +(-1609275,'%s becomes a shade of his past, and walks up to his father.',0,2,0,0,'Highlord Darion Mograine'), +(-1609276,'%s hugs his father.',0,2,0,0,'Darion Mograine'), +(-1609277,'%s disappears, and the Lich King appears.',0,2,0,0,'Alexandros'), +(-1609278,'%s becomes himself again...and is now angry.',0,2,0,0,'Highlord Darion Mograine'), +(-1609279,'%s casts a spell on Tirion.',0,2,0,0,'The Lich King'), +(-1609280,'%s gasps for air.',0,2,0,0,'Highlord Tirion Fordring'), +(-1609281,'%s casts a powerful spell, killing the Defenders and knocking back the others.',0,2,0,0,'The Lich King'), +(-1609282,'%s throws the Corrupted Ashbringer to Tirion, who catches it. Tirion becomes awash with Light, and the Ashbringer is cleansed.',0,2,0,0,'Highlord Darion Mograine'), +(-1609283,'%s collapses.',0,2,0,0,'Highlord Darion Mograine'), +(-1609284,'%s charges towards the Lich King, Ashbringer in hand and strikes the Lich King.',0,2,0,0,'Highlord Tirion Fordring'), +(-1609285,'%s disappears. Tirion walks over to where Darion lay',0,2,0,0,'The Lich King'), +(-1609286,'Light washes over the chapel -- the Light of Dawn is uncovered.',0,2,0,0,''), + +(-1609287,'%s rears up, beckoning you to ride it.',0,2,0,0,'Acherus Deathcharger EMOTE_HORSE_READY'), +(-1609288,'Impressive, death knight. Return to me in the world of the living for your reward.',0,0,0,2,'Salanar the Horseman SAY_RACE_FINISHED'); -- -1 615 000 OBSIDIAN SANCTUM INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES diff --git a/sql/updates/r2763_mangos.sql b/sql/updates/r2763_mangos.sql new file mode 100644 index 000000000..1cb445c9e --- /dev/null +++ b/sql/updates/r2763_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_acherus_deathcharger' WHERE entry=28782; diff --git a/sql/updates/r2763_scriptdev2.sql b/sql/updates/r2763_scriptdev2.sql new file mode 100644 index 000000000..e4a117066 --- /dev/null +++ b/sql/updates/r2763_scriptdev2.sql @@ -0,0 +1,4 @@ +DELETE FROM script_texts WHERE entry IN (-1609287,-1609288); +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1609287,'%s rears up, beckoning you to ride it.',0,2,0,0,'Acherus Deathcharger EMOTE_HORSE_READY'), +(-1609288,'Impressive, death knight. Return to me in the world of the living for your reward.',0,0,0,2,'Salanar the Horseman SAY_RACE_FINISHED'); From e0f1f336b7a46585e6a71255dab078e5c7af46df Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sat, 24 Nov 2012 12:22:38 +0200 Subject: [PATCH 0761/1172] [2764] Fix text entries for previous commit --- scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp | 4 ++-- sd2_revision_nr.h | 2 +- sql/scriptdev2_script_full.sql | 8 ++++---- sql/updates/r2764_scriptdev2.sql | 5 +++++ 4 files changed, 12 insertions(+), 7 deletions(-) create mode 100644 sql/updates/r2764_scriptdev2.sql diff --git a/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp b/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp index 6540c50ee..50dcdac1a 100644 --- a/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp +++ b/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp @@ -2713,8 +2713,8 @@ CreatureAI* GetAI_npc_fellow_death_knight(Creature* pCreature) enum { - EMOTE_HORSE_READY = -1609287, - SAY_RACE_FINISHED = -1609288, + EMOTE_HORSE_READY = -1609097, + SAY_RACE_FINISHED = -1609098, SPELL_HORSEMAN_SLAIN = 52692, SPELL_RACE_COMPLETE = 52361, diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 92d29e754..00869e92e 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2763" + #define SD2_REVISION_NR "2764" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 294fd4a80..e8b32b33e 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -3725,6 +3725,9 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1609095,'$gPoppy:Mama;!',0,0,0,434,'scarlet ghoul SAY_GHUL_SPAWN_5'), (-1609096,'It puts the ghoul in the pit or else it gets the lash!',0,0,0,25,'gothik the harvester SAY_GOTHIK_THROW_IN_PIT'), +(-1609097,'%s rears up, beckoning you to ride it.',0,2,0,0,'Acherus Deathcharger EMOTE_HORSE_READY'), +(-1609098,'Impressive, death knight. Return to me in the world of the living for your reward.',0,0,0,2,'Salanar the Horseman SAY_RACE_FINISHED'), + (-1609201,'Soldiers of the Scourge, stand ready! Prepare to unleash your fury upon the Argent Dawn!',14677,1,0,0,'Highlord Darion Mograine'), (-1609202,'The sky weeps at the devastation of these lands! Soon, Azeroth\'s futile tears will rain down upon us!',14678,1,0,0,'Highlord Darion Mograine'), (-1609203,'Death knights of Acherus, the death march begins!',14681,1,0,0,'Highlord Darion Mograine'), @@ -3810,10 +3813,7 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1609283,'%s collapses.',0,2,0,0,'Highlord Darion Mograine'), (-1609284,'%s charges towards the Lich King, Ashbringer in hand and strikes the Lich King.',0,2,0,0,'Highlord Tirion Fordring'), (-1609285,'%s disappears. Tirion walks over to where Darion lay',0,2,0,0,'The Lich King'), -(-1609286,'Light washes over the chapel -- the Light of Dawn is uncovered.',0,2,0,0,''), - -(-1609287,'%s rears up, beckoning you to ride it.',0,2,0,0,'Acherus Deathcharger EMOTE_HORSE_READY'), -(-1609288,'Impressive, death knight. Return to me in the world of the living for your reward.',0,0,0,2,'Salanar the Horseman SAY_RACE_FINISHED'); +(-1609286,'Light washes over the chapel -- the Light of Dawn is uncovered.',0,2,0,0,''); -- -1 615 000 OBSIDIAN SANCTUM INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES diff --git a/sql/updates/r2764_scriptdev2.sql b/sql/updates/r2764_scriptdev2.sql new file mode 100644 index 000000000..46a52b00e --- /dev/null +++ b/sql/updates/r2764_scriptdev2.sql @@ -0,0 +1,5 @@ +DELETE FROM script_texts WHERE entry IN (-1609287,-1609288); +DELETE FROM script_texts WHERE entry IN (-1609097,-1609098); +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1609097,'%s rears up, beckoning you to ride it.',0,2,0,0,'Acherus Deathcharger EMOTE_HORSE_READY'), +(-1609098,'Impressive, death knight. Return to me in the world of the living for your reward.',0,0,0,2,'Salanar the Horseman SAY_RACE_FINISHED'); From f7dd5712805cceac5301802015e4e3eed51375c3 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sat, 24 Nov 2012 13:53:28 +0200 Subject: [PATCH 0762/1172] [2765] Fix some gossip items for the Ebon Hold quests --- .../eastern_kingdoms/scarlet_enclave/ebon_hold.cpp | 14 ++++++++------ sd2_revision_nr.h | 2 +- sql/scriptdev2_script_full.sql | 5 +++++ sql/updates/r2765_scriptdev2.sql | 4 ++++ 4 files changed, 18 insertions(+), 7 deletions(-) create mode 100644 sql/updates/r2765_scriptdev2.sql diff --git a/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp b/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp index 50dcdac1a..c9a72c188 100644 --- a/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp +++ b/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp @@ -515,6 +515,9 @@ enum SPELL_DUEL_VICTORY = 52994, SPELL_DUEL_FLAG = 52991, + GOSSIP_ITEM_ACCEPT_DUEL = -3609000, + GOSSIP_TEXT_ID_DUEL = 13433, + QUEST_DEATH_CHALLENGE = 12733, FACTION_HOSTILE = 2068 }; @@ -524,8 +527,6 @@ int32 m_auiRandomSay[] = SAY_DUEL_A, SAY_DUEL_B, SAY_DUEL_C, SAY_DUEL_D, SAY_DUEL_E, SAY_DUEL_F, SAY_DUEL_G, SAY_DUEL_H, SAY_DUEL_I }; -#define GOSSIP_ACCEPT_DUEL "I challenge you, death knight!" - struct MANGOS_DLL_DECL npc_death_knight_initiateAI : public ScriptedAI { npc_death_knight_initiateAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } @@ -614,8 +615,8 @@ bool GossipHello_npc_death_knight_initiate(Player* pPlayer, Creature* pCreature) { if (pPlayer->GetQuestStatus(QUEST_DEATH_CHALLENGE) == QUEST_STATUS_INCOMPLETE) { - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ACCEPT_DUEL, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); - pPlayer->SEND_GOSSIP_MENU(13433, pCreature->GetObjectGuid()); + pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_ACCEPT_DUEL, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXT_ID_DUEL, pCreature->GetObjectGuid()); return true; } return false; @@ -1445,7 +1446,8 @@ enum LightOfDawn // others QUEST_ID_LIGHT_OF_DAWN = 12801, - GOSSIP_ITEM_READY = -3609001 + GOSSIP_ITEM_READY = -3609001, + GOSSIP_TEXT_ID_READY = 13485, }; struct MANGOS_DLL_DECL npc_highlord_darion_mograineAI : public npc_escortAI @@ -2549,7 +2551,7 @@ bool GossipHello_npc_highlord_darion_mograine(Player* pPlayer, Creature* pCreatu if (pPlayer->GetQuestStatus(QUEST_ID_LIGHT_OF_DAWN) == QUEST_STATUS_INCOMPLETE) pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_READY, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXT_ID_READY, pCreature->GetObjectGuid()); return true; } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 00869e92e..89059451d 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2764" + #define SD2_REVISION_NR "2765" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index e8b32b33e..b37fe8715 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -4575,6 +4575,11 @@ INSERT INTO gossip_texts (entry,content_default,comment) VALUES (-3608001,'Get your people to safety, we\'ll keep the Blue Dragonflight\'s forces at bay.','sinclari GOSSIP_ITEM_START'), (-3608002,'I\'m not fighting, so send me in now!','sinclari GOSSIP_ITEM_TELEPORT'); +-- -3 609 000 EBON HOLD (DK START) +INSERT INTO gossip_texts (entry,content_default,comment) VALUES +(-3609000,'I challenge you, death knight!','Death Knight Initiate GOSSIP_ITEM_ACCEPT_DUEL'), +(-3609001,'I am ready, Highlord. Let the siege of Light\'s Hope begin!','Highlord Darion Mograine GOSSIP_ITEM_READY'); + -- -3 649 000 TRIAL OF CRUSADER INSERT INTO gossip_texts (entry,content_default,comment) VALUES (-3649000,'Yes. We are prepared for the challenges ahead of us.','barrett GOSSIP_ITEM_BEAST_INIT'), diff --git a/sql/updates/r2765_scriptdev2.sql b/sql/updates/r2765_scriptdev2.sql new file mode 100644 index 000000000..8482a5a32 --- /dev/null +++ b/sql/updates/r2765_scriptdev2.sql @@ -0,0 +1,4 @@ +DELETE FROM gossip_texts WHERE entry IN (-3609000, -3609001); +INSERT INTO gossip_texts (entry,content_default,comment) VALUES +(-3609000,'I challenge you, death knight!','Death Knight Initiate GOSSIP_ITEM_ACCEPT_DUEL'), +(-3609001,'I am ready, Highlord. Let the siege of Light\'s Hope begin!','Highlord Darion Mograine GOSSIP_ITEM_READY'); From 86eed7689e76789c84fa5eebdf5e14445bb1baea Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sat, 24 Nov 2012 22:34:28 +0200 Subject: [PATCH 0763/1172] [2766] Update for quest 12801 - The Light of Dawn --- .../scarlet_enclave/ebon_hold.cpp | 265 +++++++++++------- .../scarlet_enclave/world_map_ebon_hold.cpp | 21 +- .../scarlet_enclave/world_map_ebon_hold.h | 27 +- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 + sql/updates/r2766_mangos.sql | 1 + 6 files changed, 199 insertions(+), 118 deletions(-) create mode 100644 sql/updates/r2766_mangos.sql diff --git a/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp b/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp index c9a72c188..73a791703 100644 --- a/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp +++ b/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp @@ -1327,14 +1327,15 @@ enum LightOfDawn SAY_LIGHT_OF_DAWN_BATTLE_6 = -1609214, SAY_LIGHT_OF_DAWN_BATTLE_7 = -1609215, SAY_LIGHT_OF_DAWN_BATTLE_8 = -1609216, - SAY_LIGHT_OF_DAWN_BATTLE_9 = -1609217, - SAY_LIGHT_OF_DAWN_BATTLE_10 = -1609218, - SAY_LIGHT_OF_DAWN_BATTLE_11 = -1609219, - SAY_LIGHT_OF_DAWN_BATTLE_12 = -1609220, - SAY_LIGHT_OF_DAWN_BATTLE_13 = -1609221, - SAY_LIGHT_OF_DAWN_BATTLE_14 = -1609222, - SAY_LIGHT_OF_DAWN_BATTLE_15 = -1609223, - SAY_LIGHT_OF_DAWN_BATTLE_16 = -1609224, + SAY_LIGHT_OF_DAWN_BATTLE_9 = -1609224, + + SAY_LIGHT_OF_DAWN_BATTLE_10 = -1609217, // Battle end yells + SAY_LIGHT_OF_DAWN_BATTLE_11 = -1609218, + SAY_LIGHT_OF_DAWN_BATTLE_12 = -1609219, + SAY_LIGHT_OF_DAWN_BATTLE_13 = -1609220, + SAY_LIGHT_OF_DAWN_BATTLE_14 = -1609221, + SAY_LIGHT_OF_DAWN_BATTLE_15 = -1609222, + SAY_LIGHT_OF_DAWN_BATTLE_16 = -1609223, SAY_LIGHT_OF_DAWN_OUTRO_1 = -1609225, // Highlord Tirion Fordring SAY_LIGHT_OF_DAWN_OUTRO_2 = -1609226, @@ -1417,8 +1418,8 @@ enum LightOfDawn SPELL_UNHOLY_BLIGHT = 53640, SPELL_BIRTH = 53603, // ground shake - SPELL_THE_LIGHT_OF_DAWN = 53658, // light globe - SPELL_THE_LIGHT_OF_DAWN_AURA = 53644, // cast when Tirion arives + SPELL_THE_LIGHT_OF_DAWN_DUMMY = 53658, // light globe + SPELL_THE_LIGHT_OF_DAWN_DAMAGE_LOSS = 53645, // cast by the scourge units SPELL_ALEXANDROS_MOGRAINE_SPAWN = 53667, // spawn effect for Alexandros SPELL_MOGRAINE_CHARGE = 53679, // charge to the Lich King SPELL_ASHBRINGER = 53701, // throw Ashbringer to Tirion @@ -1427,6 +1428,7 @@ enum LightOfDawn // Lich King spells SPELL_APOCALYPSE = 53210, // knocks back all enemies SPELL_APOCALYPSE_STUN = 53745, // stuns all enemies + SPELL_POST_APOCALYPSE = 53211, // after apocalypse - not sure where to use it SPELL_TELEPORT_VISUAL = 52233, // on leave SPELL_SOUL_FEAST_ALEX = 53677, // on Alexandros SPELL_SOUL_FEAST_TIRION = 53685, // on Tirion @@ -1468,6 +1470,8 @@ struct MANGOS_DLL_DECL npc_highlord_darion_mograineAI : public npc_escortAI uint32 m_uiEventTimer; uint32 m_uiFightTimer; + bool m_bIsBattleEnd; + uint8 m_uiLightWarriorsDead; uint8 m_uiScourgeWarriorsDead; @@ -1498,6 +1502,8 @@ struct MANGOS_DLL_DECL npc_highlord_darion_mograineAI : public npc_escortAI m_uiEventTimer = 3000; m_uiFightTimer = 0; + m_bIsBattleEnd = false; + m_uiLightWarriorsDead = 0; m_uiScourgeWarriorsDead = 0; @@ -1533,6 +1539,8 @@ struct MANGOS_DLL_DECL npc_highlord_darion_mograineAI : public npc_escortAI switch (pSummoned->GetEntry()) { case NPC_VOLATILE_GHOUL: + pSummoned->CastSpell(pSummoned, SPELL_BIRTH, true); + // no break; case NPC_WARRIOR_OF_THE_FROZEN_WASTES: m_lAttackersGUIDs.push_back(pSummoned->GetObjectGuid()); // make the scourge attack only during the battle @@ -1571,8 +1579,6 @@ struct MANGOS_DLL_DECL npc_highlord_darion_mograineAI : public npc_escortAI // if 5 soldiers are dead summon others if (m_uiScourgeWarriorsDead % MAX_WARRIORS_SUMMONED_PER_TURN == 0) { - DoCastSpellIfCan(m_creature, SPELL_BIRTH); - float fX, fY, fZ; // Actually this is some sort of cheat - but so many scourge numbers fall (currently), that I think it is ok to increase the summon amount for (uint8 i = 0; i < MAX_WARRIORS_SUMMONED_PER_TURN + 1; ++i) @@ -1624,14 +1630,11 @@ struct MANGOS_DLL_DECL npc_highlord_darion_mograineAI : public npc_escortAI DoScriptText(SAY_LIGHT_OF_DAWN_OUTRO_2, pSummoned); m_pInstance->SetData(TYPE_BATTLE, DONE); - // scourge fighters die + // scourge fighters die, if not already dead for (GuidList::const_iterator itr = m_lAttackersGUIDs.begin(); itr != m_lAttackersGUIDs.end(); ++itr) { if (Creature* pTemp = m_creature->GetMap()->GetCreature(*itr)) - { - pTemp->CastSpell(pTemp, SPELL_THE_LIGHT_OF_DAWN_DAMAGE, true); pTemp->DealDamage(pTemp, pTemp->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); - } } // light fighters despawn @@ -1649,6 +1652,7 @@ struct MANGOS_DLL_DECL npc_highlord_darion_mograineAI : public npc_escortAI pSummoned->SetFacingTo(aEventLocations[1].m_fO); m_creature->Unmount(); + m_bIsBattleEnd = false; if (!HasEscortState(STATE_ESCORT_PAUSED)) { @@ -1656,12 +1660,13 @@ struct MANGOS_DLL_DECL npc_highlord_darion_mograineAI : public npc_escortAI SetCurrentWaypoint(5); m_uiEventTimer = 60000; // Another failsafe } + SetEscortPaused(false); m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PASSIVE); SetRun(false); m_creature->AI()->EnterEvadeMode(); - DoCastSpellIfCan(m_creature, SPELL_THE_LIGHT_OF_DAWN); + DoCastSpellIfCan(m_creature, SPELL_THE_LIGHT_OF_DAWN_DUMMY); // death knights are defeated if (Creature* pKoltira = m_pInstance->GetSingleCreatureFromStorage(NPC_KOLTIRA_DEATHWEAVER)) @@ -1802,8 +1807,8 @@ struct MANGOS_DLL_DECL npc_highlord_darion_mograineAI : public npc_escortAI DoScriptText(EMOTE_LIGHT_OF_DAWN_KNEEL, m_creature); DoScriptText(SAY_LIGHT_OF_DAWN_OUTRO_3, m_creature); - if (m_creature->HasAura(SPELL_THE_LIGHT_OF_DAWN)) - m_creature->RemoveAurasDueToSpell(SPELL_THE_LIGHT_OF_DAWN); + if (m_creature->HasAura(SPELL_THE_LIGHT_OF_DAWN_DUMMY)) + m_creature->RemoveAurasDueToSpell(SPELL_THE_LIGHT_OF_DAWN_DUMMY); m_creature->SetStandState(UNIT_STAND_STATE_KNEEL); @@ -1913,21 +1918,18 @@ struct MANGOS_DLL_DECL npc_highlord_darion_mograineAI : public npc_escortAI DoScriptText(EMOTE_LIGHT_OF_DAWN_ARMY_RISE, m_creature); case 4: case 5: + { // summon army takes about 20 secs and it's done on a few stages; no break between them - if (DoCastSpellIfCan(m_creature, SPELL_BIRTH) == CAST_OK) + float fX, fY, fZ; + for (uint8 i = 0; i < MAX_WARRIORS_SUMMONED_PER_TURN; ++i) { - float fX, fY, fZ; - for (uint8 i = 0; i < MAX_WARRIORS_SUMMONED_PER_TURN; ++i) - { - // Note: missing spawn effect for them! - uint32 uiSummonEntry = urand(0, 1) ? NPC_VOLATILE_GHOUL : NPC_WARRIOR_OF_THE_FROZEN_WASTES; - m_creature->GetRandomPoint(m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), 50.0f, fX, fY, fZ); - m_creature->SummonCreature(uiSummonEntry, fX, fY, fZ, 0.0f, TEMPSUMMON_CORPSE_DESPAWN, 0); - } - - m_uiEventTimer = 6000; + uint32 uiSummonEntry = urand(0, 1) ? NPC_VOLATILE_GHOUL : NPC_WARRIOR_OF_THE_FROZEN_WASTES; + m_creature->GetRandomPoint(m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), 50.0f, fX, fY, fZ); + m_creature->SummonCreature(uiSummonEntry, fX, fY, fZ, 4.7f, TEMPSUMMON_CORPSE_DESPAWN, 0); } + m_uiEventTimer = 6000; break; + } case 6: DoScriptText(SAY_LIGHT_OF_DAWN_PREPARE_4, m_creature); m_uiEventTimer = 2000; @@ -1937,10 +1939,7 @@ struct MANGOS_DLL_DECL npc_highlord_darion_mograineAI : public npc_escortAI for (GuidList::const_iterator itr = m_lAttackersGUIDs.begin(); itr != m_lAttackersGUIDs.end(); ++itr) { if (Creature* pTemp = m_creature->GetMap()->GetCreature(*itr)) - { - //pTemp->SetFacingToObject(m_creature); pTemp->HandleEmoteCommand(EMOTE_ONESHOT_BATTLEROAR); - } } m_uiEventTimer = 6000; break; @@ -2141,12 +2140,10 @@ struct MANGOS_DLL_DECL npc_highlord_darion_mograineAI : public npc_escortAI if (Creature* pLichKing = m_pInstance->GetSingleCreatureFromStorage(NPC_THE_LICH_KING)) { DoScriptText(SAY_LIGHT_OF_DAWN_KING_VISIT_4, pLichKing); - pLichKing->CastSpell(m_creature, SPELL_APOCALYPSE, true); + // Note: this should be cast by the LK - spell bug + m_creature->CastSpell(m_creature, SPELL_REBUKE, true); } - // workaround because kick doesn't work m_creature->SetStandState(UNIT_STAND_STATE_DEAD); - m_creature->GetMap()->CreatureRelocation(m_creature, aEventLocations[10].m_fX, aEventLocations[10].m_fY, aEventLocations[10].m_fZ, aEventLocations[10].m_fO); - //m_creature->SendMonsterMove(aEventLocations[10].m_fX, aEventLocations[10].m_fY, aEventLocations[10].m_fZ, SPLINETYPE_NORMAL, m_creature->GetSplineFlags(), 1); m_uiEventTimer = 4000; break; case 33: @@ -2175,7 +2172,8 @@ struct MANGOS_DLL_DECL npc_highlord_darion_mograineAI : public npc_escortAI if (Creature* pTirion = m_pInstance->GetSingleCreatureFromStorage(NPC_HIGHLORD_TIRION_FORDRING)) { DoScriptText(EMOTE_LIGHT_OF_DAWN_GRASP, pTirion); - pLichKing->CastSpell(pLichKing, SPELL_SOUL_FEAST_TIRION, false); + pLichKing->CastSpell(pTirion, SPELL_SOUL_FEAST_TIRION, false); + pLichKing->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PASSIVE); } } m_uiEventTimer = 2000; @@ -2186,13 +2184,16 @@ struct MANGOS_DLL_DECL npc_highlord_darion_mograineAI : public npc_escortAI DoScriptText(SAY_LIGHT_OF_DAWN_KING_VISIT_8, pMaxwell); if (Creature* pLichKing = m_pInstance->GetSingleCreatureFromStorage(NPC_THE_LICH_KING)) { + float fX, fY, fZ; + pLichKing->GetContactPoint(m_creature, fX, fY, fZ); for (GuidList::const_iterator itr = m_lDefendersGUIDs.begin(); itr != m_lDefendersGUIDs.end(); ++itr) { if (Creature* pTemp = m_creature->GetMap()->GetCreature(*itr)) { pTemp->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PASSIVE); pTemp->SetWalk(false); - // attack interrupts LK spell casting + pTemp->GetMotionMaster()->MovePoint(0, fX, fY, fZ); + // attack gives us some issues //pTemp->AI()->AttackStart(pLichKing); } } @@ -2202,7 +2203,8 @@ struct MANGOS_DLL_DECL npc_highlord_darion_mograineAI : public npc_escortAI { pTemp->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PASSIVE); pTemp->SetWalk(false); - // attack interrupts LK spell casting + pTemp->GetMotionMaster()->MovePoint(0, fX, fY, fZ); + // attack gives us some issues //pTemp->AI()->AttackStart(pLichKing); } } @@ -2217,36 +2219,31 @@ struct MANGOS_DLL_DECL npc_highlord_darion_mograineAI : public npc_escortAI DoScriptText(SAY_LIGHT_OF_DAWN_KING_VISIT_9, pLichKing); pLichKing->CastSpell(pLichKing, SPELL_APOCALYPSE, true); } - // despawn guards - for (GuidList::const_iterator itr = m_lDefendersGUIDs.begin(); itr != m_lDefendersGUIDs.end(); ++itr) - { - if (Creature* pTemp = m_creature->GetMap()->GetCreature(*itr)) - pTemp->DealDamage(pTemp, pTemp->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); - } - // workaround for the light champions - for (uint8 i = 0; i < MAX_LIGHT_CHAMPIONS; i++) + m_uiEventTimer = 1000; + break; + case 39: + if (Creature* pLichKing = m_pInstance->GetSingleCreatureFromStorage(NPC_THE_LICH_KING)) { - if (Creature* pTemp = m_pInstance->GetSingleCreatureFromStorage(aLightArmySpawnLoc[i].m_uiEntry)) + pLichKing->CastSpell(pLichKing, SPELL_POST_APOCALYPSE, true); + + // despawn guards + for (GuidList::const_iterator itr = m_lDefendersGUIDs.begin(); itr != m_lDefendersGUIDs.end(); ++itr) + { + if (Creature* pTemp = m_creature->GetMap()->GetCreature(*itr)) + pTemp->DealDamage(pTemp, pTemp->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + } + // workaround for the light champions - spell doesn't work right + for (uint8 i = 0; i < MAX_LIGHT_CHAMPIONS; i++) { - uint32 uiPoint = urand(0, 1) ? 14 : 15; - pTemp->SetStandState(UNIT_STAND_STATE_DEAD); - pTemp->CombatStop(); - pTemp->GetRandomPoint(aEventLocations[uiPoint].m_fX, aEventLocations[uiPoint].m_fY, aEventLocations[uiPoint].m_fZ, 10.0f, fX, fY, fZ); - pTemp->GetMap()->CreatureRelocation(m_creature, fX, fY, fZ, aEventLocations[10].m_fO); - //pTemp->SendMonsterMove(fX, fY, fZ, SPLINETYPE_NORMAL, m_creature->GetSplineFlags(), 1); + if (Creature* pTemp = m_pInstance->GetSingleCreatureFromStorage(aLightArmySpawnLoc[i].m_uiEntry)) + { + pTemp->SetStandState(UNIT_STAND_STATE_DEAD); + pTemp->KnockBackFrom(pLichKing, 50, float(urand(44, 87))/10); + } } } m_uiEventTimer = 5000; break; - case 39: - // make champions stand - for (uint8 i = 0; i < MAX_LIGHT_CHAMPIONS; i++) - { - if (Creature* pTemp = m_pInstance->GetSingleCreatureFromStorage(aLightArmySpawnLoc[i].m_uiEntry)) - pTemp->SetStandState(UNIT_STAND_STATE_STAND); - } - m_uiEventTimer = 1000; - break; case 40: DoScriptText(SAY_LIGHT_OF_DAWN_KING_VISIT_10, m_creature); m_uiEventTimer = 5000; @@ -2260,6 +2257,7 @@ struct MANGOS_DLL_DECL npc_highlord_darion_mograineAI : public npc_escortAI case 42: DoScriptText(EMOTE_LIGHT_OF_DAWN_ASHBRINGER, m_creature); DoCastSpellIfCan(m_creature, SPELL_ASHBRINGER); + SetEquipmentSlots(false, EQUIP_UNEQUIP, EQUIP_UNEQUIP, EQUIP_NO_CHANGE); m_uiEventTimer = 5000; break; case 43: @@ -2313,8 +2311,6 @@ struct MANGOS_DLL_DECL npc_highlord_darion_mograineAI : public npc_escortAI { DoScriptText(SAY_LIGHT_OF_DAWN_KING_VISIT_15, pLichKing); pLichKing->GetMotionMaster()->MovePoint(POINT_MOVE_CHAPEL, aEventLocations[8].m_fX, aEventLocations[8].m_fY, aEventLocations[8].m_fZ); - // make him not aggressive - pLichKing->DeleteThreatList(); } if (Creature* pTirion = m_pInstance->GetSingleCreatureFromStorage(NPC_HIGHLORD_TIRION_FORDRING)) pTirion->DeleteThreatList(); @@ -2341,8 +2337,19 @@ struct MANGOS_DLL_DECL npc_highlord_darion_mograineAI : public npc_escortAI pLichKing->CastSpell(pLichKing, SPELL_TELEPORT_VISUAL, false); if (Creature* pTirion = m_pInstance->GetSingleCreatureFromStorage(NPC_HIGHLORD_TIRION_FORDRING)) { + float fX, fY, fZ; pTirion->SetWalk(false); - pTirion->GetMotionMaster()->MovePoint(POINT_MOVE_OTHER, aEventLocations[11].m_fX, aEventLocations[11].m_fY, aEventLocations[11].m_fZ); + m_creature->GetContactPoint(pTirion, fX, fY, fZ, INTERACTION_DISTANCE); + pTirion->GetMotionMaster()->MovePoint(POINT_MOVE_OTHER, fX, fY, fZ); + } + // make champions stand + for (uint8 i = 0; i < MAX_LIGHT_CHAMPIONS; i++) + { + if (Creature* pTemp = m_pInstance->GetSingleCreatureFromStorage(aLightArmySpawnLoc[i].m_uiEntry)) + { + pTemp->SetStandState(UNIT_STAND_STATE_STAND); + pTemp->SetFacingToObject(m_creature); + } } m_uiEventTimer = 2000; break; @@ -2370,7 +2377,7 @@ struct MANGOS_DLL_DECL npc_highlord_darion_mograineAI : public npc_escortAI if (Creature* pTirion = m_pInstance->GetSingleCreatureFromStorage(NPC_HIGHLORD_TIRION_FORDRING)) { pTirion->SetWalk(true); - pTirion->GetMotionMaster()->MovePoint(POINT_MOVE_OTHER, aEventLocations[12].m_fX, aEventLocations[12].m_fY, aEventLocations[12].m_fZ); + pTirion->GetMotionMaster()->MovePoint(POINT_MOVE_OTHER, aEventLocations[10].m_fX, aEventLocations[10].m_fY, aEventLocations[10].m_fZ); } m_uiEventTimer = 5000; break; @@ -2419,14 +2426,25 @@ struct MANGOS_DLL_DECL npc_highlord_darion_mograineAI : public npc_escortAI m_uiEventTimer = 10000; break; case 65: - // send credit then in 5 min despawn + // send credit then in 5 min reset DoSendQuestCredit(); m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER); m_uiEventTimer = 5 * MINUTE * IN_MILLISECONDS; break; case 66: - m_creature->ForcedDespawn(); - m_creature->Respawn(); + m_pInstance->SetData(TYPE_BATTLE, NOT_STARTED); + if (Creature* pKoltira = m_pInstance->GetSingleCreatureFromStorage(NPC_KOLTIRA_DEATHWEAVER)) + pKoltira->ForcedDespawn(); + if (Creature* pThassarian = m_pInstance->GetSingleCreatureFromStorage(NPC_THASSARIAN)) + pThassarian->ForcedDespawn(); + if (Creature* pTirion = m_pInstance->GetSingleCreatureFromStorage(NPC_HIGHLORD_TIRION_FORDRING)) + pTirion->ForcedDespawn(); + for (uint8 i = 0; i < MAX_LIGHT_CHAMPIONS; i++) + { + if (Creature* pTemp = m_pInstance->GetSingleCreatureFromStorage(aLightArmySpawnLoc[i].m_uiEntry)) + pTemp->ForcedDespawn(); + } + SetEscortPaused(false); m_uiEventTimer = 0; break; } @@ -2437,6 +2455,27 @@ struct MANGOS_DLL_DECL npc_highlord_darion_mograineAI : public npc_escortAI m_uiEventTimer -= uiDiff; } + // Battle end yells + if (m_bIsBattleEnd) + { + if (m_uiFightSpeechTimer < uiDiff) + { + switch (urand(0, 6)) + { + case 0: DoScriptText(SAY_LIGHT_OF_DAWN_BATTLE_10, m_creature); break; + case 1: DoScriptText(SAY_LIGHT_OF_DAWN_BATTLE_11, m_creature); break; + case 2: DoScriptText(SAY_LIGHT_OF_DAWN_BATTLE_12, m_creature); break; + case 3: DoScriptText(SAY_LIGHT_OF_DAWN_BATTLE_13, m_creature); break; + case 4: DoScriptText(SAY_LIGHT_OF_DAWN_BATTLE_14, m_creature); break; + case 5: DoScriptText(SAY_LIGHT_OF_DAWN_BATTLE_15, m_creature); break; + case 6: DoScriptText(SAY_LIGHT_OF_DAWN_BATTLE_16, m_creature); break; + } + m_uiFightSpeechTimer = urand(5000, 7000); + } + else + m_uiFightSpeechTimer -= uiDiff; + } + // Handle battle events if (m_uiFightTimer) { @@ -2446,14 +2485,22 @@ struct MANGOS_DLL_DECL npc_highlord_darion_mograineAI : public npc_escortAI // summon Tirion and move him to the chapel if (Creature* pTirion = m_creature->SummonCreature(NPC_HIGHLORD_TIRION_FORDRING, aEventLocations[0].m_fX, aEventLocations[0].m_fY, aEventLocations[0].m_fZ, aEventLocations[0].m_fO, TEMPSUMMON_CORPSE_DESPAWN, 5000, true)) { - // this spell should be triggered by some npc - //pTirion->CastSpell(pTirion, SPELL_THE_LIGHT_OF_DAWN_AURA, true); + // decrease Darion's damage + DoCastSpellIfCan(m_creature, SPELL_THE_LIGHT_OF_DAWN_DAMAGE_LOSS, CAST_TRIGGERED); + + // Damage the scourge army + if (m_pInstance) + m_pInstance->DoEnableHolyTraps(); + DoScriptText(SAY_LIGHT_OF_DAWN_OUTRO_1, pTirion); DoScriptText(EMOTE_LIGHT_OF_DAWN_TIRION, pTirion); + pTirion->SetWalk(false); pTirion->GetMotionMaster()->MovePoint(POINT_MOVE_CHAPEL, aEventLocations[1].m_fX, aEventLocations[1].m_fY, aEventLocations[1].m_fZ); m_uiFightTimer = 0; + m_uiFightSpeechTimer = 1000; + m_bIsBattleEnd = true; } } else @@ -2465,24 +2512,17 @@ struct MANGOS_DLL_DECL npc_highlord_darion_mograineAI : public npc_escortAI // battle sounds if (m_uiFightSpeechTimer < uiDiff) { - switch (urand(0, 15)) + switch (urand(0, 8)) { - case 0: DoScriptText(SAY_LIGHT_OF_DAWN_BATTLE_1, m_creature); break; - case 1: DoScriptText(SAY_LIGHT_OF_DAWN_BATTLE_2, m_creature); break; - case 2: DoScriptText(SAY_LIGHT_OF_DAWN_BATTLE_3, m_creature); break; - case 3: DoScriptText(SAY_LIGHT_OF_DAWN_BATTLE_4, m_creature); break; - case 4: DoScriptText(SAY_LIGHT_OF_DAWN_BATTLE_5, m_creature); break; - case 5: DoScriptText(SAY_LIGHT_OF_DAWN_BATTLE_6, m_creature); break; - case 6: DoScriptText(SAY_LIGHT_OF_DAWN_BATTLE_7, m_creature); break; - case 7: DoScriptText(SAY_LIGHT_OF_DAWN_BATTLE_8, m_creature); break; - case 8: DoScriptText(SAY_LIGHT_OF_DAWN_BATTLE_9, m_creature); break; - case 9: DoScriptText(SAY_LIGHT_OF_DAWN_BATTLE_10, m_creature); break; - case 10: DoScriptText(SAY_LIGHT_OF_DAWN_BATTLE_11, m_creature); break; - case 11: DoScriptText(SAY_LIGHT_OF_DAWN_BATTLE_12, m_creature); break; - case 12: DoScriptText(SAY_LIGHT_OF_DAWN_BATTLE_13, m_creature); break; - case 13: DoScriptText(SAY_LIGHT_OF_DAWN_BATTLE_14, m_creature); break; - case 14: DoScriptText(SAY_LIGHT_OF_DAWN_BATTLE_15, m_creature); break; - case 15: DoScriptText(SAY_LIGHT_OF_DAWN_BATTLE_16, m_creature); break; + case 0: DoScriptText(SAY_LIGHT_OF_DAWN_BATTLE_1, m_creature); break; + case 1: DoScriptText(SAY_LIGHT_OF_DAWN_BATTLE_2, m_creature); break; + case 2: DoScriptText(SAY_LIGHT_OF_DAWN_BATTLE_3, m_creature); break; + case 3: DoScriptText(SAY_LIGHT_OF_DAWN_BATTLE_4, m_creature); break; + case 4: DoScriptText(SAY_LIGHT_OF_DAWN_BATTLE_5, m_creature); break; + case 5: DoScriptText(SAY_LIGHT_OF_DAWN_BATTLE_6, m_creature); break; + case 6: DoScriptText(SAY_LIGHT_OF_DAWN_BATTLE_7, m_creature); break; + case 7: DoScriptText(SAY_LIGHT_OF_DAWN_BATTLE_8, m_creature); break; + case 8: DoScriptText(SAY_LIGHT_OF_DAWN_BATTLE_9, m_creature); break; } m_uiFightSpeechTimer = urand(15000, 20000); } @@ -2548,8 +2588,12 @@ bool GossipHello_npc_highlord_darion_mograine(Player* pPlayer, Creature* pCreatu if (pCreature->isQuestGiver()) pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); - if (pPlayer->GetQuestStatus(QUEST_ID_LIGHT_OF_DAWN) == QUEST_STATUS_INCOMPLETE) - pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_READY, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); + // Only allow start battle after reset + if (world_map_ebon_hold* pInstance = (world_map_ebon_hold*)pCreature->GetInstanceData()) + { + if (pPlayer->GetQuestStatus(QUEST_ID_LIGHT_OF_DAWN) == QUEST_STATUS_INCOMPLETE && pInstance->GetData(TYPE_BATTLE) == NOT_STARTED) + pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_READY, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); + } pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXT_ID_READY, pCreature->GetObjectGuid()); @@ -2611,8 +2655,8 @@ struct MANGOS_DLL_DECL npc_fellow_death_knightAI : public ScriptedAI return; // make the death knights kneel - if (m_creature->HasAura(SPELL_THE_LIGHT_OF_DAWN)) - m_creature->RemoveAurasDueToSpell(SPELL_THE_LIGHT_OF_DAWN); + if (m_creature->HasAura(SPELL_THE_LIGHT_OF_DAWN_DUMMY)) + m_creature->RemoveAurasDueToSpell(SPELL_THE_LIGHT_OF_DAWN_DUMMY); m_creature->SetStandState(UNIT_STAND_STATE_KNEEL); @@ -2637,7 +2681,7 @@ struct MANGOS_DLL_DECL npc_fellow_death_knightAI : public ScriptedAI m_creature->AI()->AttackStart(pTarget); } } - else + else if (m_pInstance->GetData(TYPE_BATTLE) == DONE) { m_creature->RemoveAllAuras(); m_creature->DeleteThreatList(); @@ -2650,9 +2694,11 @@ struct MANGOS_DLL_DECL npc_fellow_death_knightAI : public ScriptedAI if (m_creature->GetEntry() != NPC_ORBAZ_BLOODBANE) { // cast light of dawn - m_creature->Unmount(); - m_creature->CastSpell(m_creature, SPELL_THE_LIGHT_OF_DAWN, true); - m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PASSIVE); + if (DoCastSpellIfCan(m_creature, SPELL_THE_LIGHT_OF_DAWN_DUMMY, CAST_TRIGGERED) == CAST_OK) + { + m_creature->Unmount(); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PASSIVE); + } } // move to chapel points @@ -2669,6 +2715,8 @@ struct MANGOS_DLL_DECL npc_fellow_death_knightAI : public ScriptedAI break; } } + else + ScriptedAI::EnterEvadeMode(); } void UpdateAI(const uint32 uiDiff) override @@ -2709,6 +2757,22 @@ CreatureAI* GetAI_npc_fellow_death_knight(Creature* pCreature) return new npc_fellow_death_knightAI(pCreature); } +// TODO Remove this 'script' when combat can be proper prevented from core-side +struct MANGOS_DLL_DECL npc_lich_king_light_dawnAI : public ScriptedAI +{ + npc_lich_king_light_dawnAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } + + void Reset() override { } + void MoveInLineOfSight(Unit* pWho) override { } + void AttackStart(Unit* pWho) override { } + void UpdateAI(const uint32 uiDiff) override { } +}; + +CreatureAI* GetAI_npc_lich_king_light_dawn(Creature* pCreature) +{ + return new npc_lich_king_light_dawnAI(pCreature); +} + /*###### ## npc_acherus_deathcharger ######*/ @@ -2908,6 +2972,11 @@ void AddSC_ebon_hold() pNewScript->GetAI = &GetAI_npc_fellow_death_knight; pNewScript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "npc_lich_king_light_dawn"; + pNewScript->GetAI = &GetAI_npc_lich_king_light_dawn; + pNewScript->RegisterSelf(); + pNewScript = new Script; pNewScript->Name = "npc_acherus_deathcharger"; pNewScript->GetAI = &GetAI_npc_acherus_deathcharger; diff --git a/scripts/eastern_kingdoms/scarlet_enclave/world_map_ebon_hold.cpp b/scripts/eastern_kingdoms/scarlet_enclave/world_map_ebon_hold.cpp index 43c3c9e5f..6a6165f96 100644 --- a/scripts/eastern_kingdoms/scarlet_enclave/world_map_ebon_hold.cpp +++ b/scripts/eastern_kingdoms/scarlet_enclave/world_map_ebon_hold.cpp @@ -124,8 +124,16 @@ void world_map_ebon_hold::OnCreatureEvade(Creature* pCreature) void world_map_ebon_hold::OnObjectCreate(GameObject* pGo) { - if (pGo->GetEntry() == GO_LIGHT_OF_DAWN) - m_mGoEntryGuidStore[GO_LIGHT_OF_DAWN] = pGo->GetObjectGuid(); + switch (pGo->GetEntry()) + { + case GO_LIGHT_OF_DAWN: + m_mGoEntryGuidStore[pGo->GetEntry()] = pGo->GetObjectGuid(); + break; + case GO_HOLY_LIGHTNING_1: + case GO_HOLY_LIGHTNING_2: + m_lLightTrapsGuids.push_back(pGo->GetObjectGuid()); + break; + } } void world_map_ebon_hold::SetData(uint32 uiType, uint32 uiData) @@ -239,14 +247,17 @@ void world_map_ebon_hold::DoDespawnArmy() if (Creature* pTemp = instance->GetCreature(*itr)) { if (pTemp->isAlive()) - { - pTemp->CastSpell(pTemp, SPELL_THE_LIGHT_OF_DAWN_DAMAGE, true); pTemp->DealDamage(pTemp, pTemp->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); - } } } } +void world_map_ebon_hold::DoEnableHolyTraps() +{ + for (GuidList::const_iterator itr = m_lLightTrapsGuids.begin(); itr != m_lLightTrapsGuids.end(); ++itr) + DoRespawnGameObject(*itr, 25); +} + void world_map_ebon_hold::Update(uint32 uiDiff) { if (m_uiGothikYellTimer) diff --git a/scripts/eastern_kingdoms/scarlet_enclave/world_map_ebon_hold.h b/scripts/eastern_kingdoms/scarlet_enclave/world_map_ebon_hold.h index 620917c28..cbba7bd2d 100644 --- a/scripts/eastern_kingdoms/scarlet_enclave/world_map_ebon_hold.h +++ b/scripts/eastern_kingdoms/scarlet_enclave/world_map_ebon_hold.h @@ -42,9 +42,10 @@ enum // object GO_LIGHT_OF_DAWN = 191330, + GO_HOLY_LIGHTNING_1 = 191301, + GO_HOLY_LIGHTNING_2 = 191302, // spells - SPELL_THE_LIGHT_OF_DAWN_DAMAGE = 53645, // kill each scourge SPELL_CHAPTER_IV = 53405, // phase aura // variables @@ -99,22 +100,17 @@ static sSpawnLocation aGuardsSpawnLoc[MAX_LIGHT_GUARDS] = // When he reach the chapel he cast some powerfull light spell and the battle ends static sSpawnLocation aEventLocations[] = { - {2181.36f, -5234.03f, 83.15f, 0.0f}, // 0 Tirion spawn location - {2281.39f, -5299.98f, 85.07f, 1.61f}, // 1 Tirion move location + {2165.711f, -5266.124f, 95.50f, 0.13f}, // 0 Tirion spawn location + {2281.390f, -5299.98f, 85.07f, 1.61f}, // 1 Tirion move location {2289.259f, -5280.350f, 82.11f, 0.0f}, // 2 Koltira chapel loc {2273.289f, -5273.675f, 81.70f, 0.0f}, // 3 Thassarian chapel loc - {2281.198f, -5257.397f, 80.22f, 4.66f}, // 4 Alexandros summon location - {2281.156f, -5259.934f, 80.64f, 0.0f}, // 5 Alexandros move loc - {2281.294f, -5281.895f, 82.44f, 1.35f}, // 6 Young Darion spawn - {2281.093f, -5263.013f, 81.12f, 0.0f}, // 7 Young Darion move - {2281.313f, -5250.282f, 79.32f, 4.69f}, // 8 Lich King spawn + {2280.159f, -5263.561f, 81.15f, 4.70f}, // 4 Alexandros summon location + {2279.927f, -5265.84f, 81.39f, 0.0f}, // 5 Alexandros move loc + {2280.538f, -5280.103f, 82.41f, 1.60f}, // 6 Young Darion spawn + {2279.895f, -5269.334f, 81.73f, 0.0f}, // 7 Young Darion move + {2280.304f, -5257.205f, 80.09f, 4.62f}, // 8 Lich King spawn {2281.523f, -5261.058f, 80.87f, 0.0f}, // 9 Lich King move - {2259.963f, -5299.262f, 82.16f, 0.99f}, // 10 Darion relocation on Lich King kick - {2261.234f, -5296.016f, 82.16f, 0.0f}, // 11 Tirion goes to Darion - {2273.071f, -5293.428f, 83.06f, 0.0f}, // 12 Tirion final point - {2282.579f, -5270.912f, 81.83f, 1.28f}, // 13 workaround - Lich King attack - {2307.055f, -5292.831f, 81.99f, 0.0f}, // 14 workaround - Lich King kick - {2252.441f, -5311.426f, 82.16f, 0.0f}, // 15 workaround - Lich King kick + {2273.071f, -5293.428f, 83.06f, 0.0f}, // 10 Tirion final point }; class MANGOS_DLL_DECL world_map_ebon_hold : public ScriptedInstance @@ -138,6 +134,8 @@ class MANGOS_DLL_DECL world_map_ebon_hold : public ScriptedInstance void DoUpdateBattleWorldState(uint32 uiStateId, uint32 uiStateData); + void DoEnableHolyTraps(); + // Move the behemots and abominations and make them attack void DoMoveArmy(); void DoDespawnArmy(); @@ -149,6 +147,7 @@ class MANGOS_DLL_DECL world_map_ebon_hold : public ScriptedInstance uint32 m_uiBattleEncounter; // Store state of the battle around "The Light of Dawn" GuidList m_lArmyGuids; + GuidList m_lLightTrapsGuids; }; #endif diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 89059451d..b4ae8dace 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2765" + #define SD2_REVISION_NR "2766" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 97ce5def3..88f2dece8 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -545,6 +545,7 @@ UPDATE creature_template SET ScriptName='npc_eye_of_acherus' WHERE entry=28511; UPDATE creature_template SET ScriptName='npc_scarlet_ghoul' WHERE entry=28845; UPDATE creature_template SET ScriptName='npc_highlord_darion_mograine' WHERE entry=29173; UPDATE creature_template SET ScriptName='npc_fellow_death_knight' WHERE entry IN (29199, 29204, 29200); +UPDATE creature_template SET ScriptName='npc_lich_king_light_dawn' WHERE entry=29183; UPDATE creature_template SET ScriptName='npc_acherus_deathcharger' WHERE entry=28782; /* ELWYNN FOREST */ diff --git a/sql/updates/r2766_mangos.sql b/sql/updates/r2766_mangos.sql new file mode 100644 index 000000000..4fb6f9969 --- /dev/null +++ b/sql/updates/r2766_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_lich_king_light_dawn' WHERE entry=29183; From 8a057604e22147b7a97e18ce97d02628ff1c92a0 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Sun, 25 Nov 2012 12:10:05 +0100 Subject: [PATCH 0764/1172] [2767] Support library doors in Dire Maul * Also fix range pylon sorting due to biiig Pylons * Also change some Do..GO instance storage functions to only display debug log if the GO was not yet stored Note: The door handling is sort of vague, but should essentially be correct, especially unclear if the northern door to the library requires similar handling --- include/sc_instance.cpp | 10 +++---- scripts/kalimdor/dire_maul/dire_maul.h | 7 +++++ .../kalimdor/dire_maul/instance_dire_maul.cpp | 27 +++++++++++++++++-- sd2_revision_nr.h | 2 +- 4 files changed, 38 insertions(+), 8 deletions(-) diff --git a/include/sc_instance.cpp b/include/sc_instance.cpp index d4a34a43f..ce50257f9 100644 --- a/include/sc_instance.cpp +++ b/include/sc_instance.cpp @@ -38,7 +38,7 @@ void ScriptedInstance::DoUseDoorOrButton(uint32 uiEntry, uint32 uiWithRestoreTim DoUseDoorOrButton(find->second, uiWithRestoreTime, bUseAlternativeState); else // Output log, possible reason is not added GO to storage, or not yet loaded - script_error_log("Script call DoUseDoorOrButton(by Entry), but no gameobject of entry %u was created yet, or it was not stored by script for map %u.", uiEntry, instance->GetId()); + debug_log("SD2: Script call DoUseDoorOrButton(by Entry), but no gameobject of entry %u was created yet, or it was not stored by script for map %u.", uiEntry, instance->GetId()); } /** @@ -75,7 +75,7 @@ void ScriptedInstance::DoToggleGameObjectFlags(uint32 uiEntry, uint32 uiGOflags, DoToggleGameObjectFlags(find->second, uiGOflags, bApply); else // Output log, possible reason is not added GO to storage, or not yet loaded - script_error_log("Script call ToogleTameObjectFlags (by Entry), but no gameobject of entry %u was created yet, or it was not stored by script for map %u.", uiEntry, instance->GetId()); + debug_log("SD2: Script call ToogleTameObjectFlags (by Entry), but no gameobject of entry %u was created yet, or it was not stored by script for map %u.", uiEntry, instance->GetId()); } /** @@ -108,7 +108,7 @@ void ScriptedInstance::DoRespawnGameObject(uint32 uiEntry, uint32 uiTimeToDespaw DoRespawnGameObject(find->second, uiTimeToDespawn); else // Output log, possible reason is not added GO to storage, or not yet loaded; - script_error_log(" Script call DoRespawnGameObject(by Entry), but no gameobject of entry %u was created yet, or it was not stored by script for map %u.", uiEntry, instance->GetId()); + debug_log("SD2: Script call DoRespawnGameObject(by Entry), but no gameobject of entry %u was created yet, or it was not stored by script for map %u.", uiEntry, instance->GetId()); } /** @@ -156,7 +156,7 @@ GameObject* ScriptedInstance::GetSingleGameObjectFromStorage(uint32 uiEntry) return instance->GetGameObject(find->second); // Output log, possible reason is not added GO to map, or not yet loaded; - debug_log("SD2: Script requested gameobject with entry %u, but no gameobject of this entry was created yet, or it was not stored by script for map %u.", uiEntry, instance->GetId()); + script_error_log("Script requested gameobject with entry %u, but no gameobject of this entry was created yet, or it was not stored by script for map %u.", uiEntry, instance->GetId()); return NULL; } @@ -170,7 +170,7 @@ Creature* ScriptedInstance::GetSingleCreatureFromStorage(uint32 uiEntry, bool bS // Output log, possible reason is not added GO to map, or not yet loaded; if (!bSkipDebugLog) - debug_log("SD2: Script requested creature with entry %u, but no npc of this entry was created yet, or it was not stored by script for map %u.", uiEntry, instance->GetId()); + script_error_log("Script requested creature with entry %u, but no npc of this entry was created yet, or it was not stored by script for map %u.", uiEntry, instance->GetId()); return NULL; } diff --git a/scripts/kalimdor/dire_maul/dire_maul.h b/scripts/kalimdor/dire_maul/dire_maul.h index 7daf20d05..a9ec9364f 100644 --- a/scripts/kalimdor/dire_maul/dire_maul.h +++ b/scripts/kalimdor/dire_maul/dire_maul.h @@ -55,6 +55,7 @@ enum GO_CRYSTAL_GENERATOR_5 = 179505, GO_FORCEFIELD = 179503, GO_WARPWOOD_DOOR = 177221, + GO_WEST_LIBRARY_DOOR = 179550, // North NPC_GUARD_MOLDAR = 14326, @@ -69,6 +70,7 @@ enum GO_KNOTS_CACHE = 179501, GO_KNOTS_BALL_AND_CHAIN = 179511, GO_GORDOK_TRIBUTE = 179564, + GO_NORTH_LIBRARY_DOOR = 179549, SAY_FREE_IMMOLTHAR = -1429000, SAY_KILL_IMMOLTHAR = -1429001, @@ -86,6 +88,8 @@ class MANGOS_DLL_DECL instance_dire_maul : public ScriptedInstance void Initialize() override; + void OnPlayerEnter(Player* pPlayer) override; + void OnCreatureCreate(Creature* pCreature) override; void OnObjectCreate(GameObject* pGo) override; @@ -117,6 +121,9 @@ class MANGOS_DLL_DECL instance_dire_maul : public ScriptedInstance GuidList m_luiHighborneSummonerGUIDs; GuidList m_lGeneratorGuardGUIDs; std::set m_sSortedGeneratorGuards[MAX_GENERATORS]; + + // North + bool m_bDoNorthBeforeWest; }; #endif diff --git a/scripts/kalimdor/dire_maul/instance_dire_maul.cpp b/scripts/kalimdor/dire_maul/instance_dire_maul.cpp index 127a11266..6d6f08658 100644 --- a/scripts/kalimdor/dire_maul/instance_dire_maul.cpp +++ b/scripts/kalimdor/dire_maul/instance_dire_maul.cpp @@ -25,7 +25,8 @@ EndScriptData */ #include "dire_maul.h" instance_dire_maul::instance_dire_maul(Map* pMap) : ScriptedInstance(pMap), - m_bWallDestroyed(false) + m_bWallDestroyed(false), + m_bDoNorthBeforeWest(false) { Initialize(); } @@ -35,6 +36,19 @@ void instance_dire_maul::Initialize() memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); } +void instance_dire_maul::OnPlayerEnter(Player* pPlayer) +{ + // figure where to enter to set library doors accordingly + // Enter DM North first + if (pPlayer->IsWithinDist2d(260.0f, -20.0f, 20.0f) && m_auiEncounter[TYPE_WARPWOOD] != DONE) + m_bDoNorthBeforeWest = true; + else + m_bDoNorthBeforeWest = false; + + DoToggleGameObjectFlags(GO_WEST_LIBRARY_DOOR, GO_FLAG_NO_INTERACT, m_bDoNorthBeforeWest); + DoToggleGameObjectFlags(GO_WEST_LIBRARY_DOOR, GO_FLAG_LOCKED, !m_bDoNorthBeforeWest); +} + void instance_dire_maul::OnCreatureCreate(Creature* pCreature) { switch (pCreature->GetEntry()) @@ -127,6 +141,15 @@ void instance_dire_maul::OnObjectCreate(GameObject* pGo) if (m_auiEncounter[TYPE_WARPWOOD] == DONE) pGo->SetGoState(GO_STATE_ACTIVE); break; + case GO_WEST_LIBRARY_DOOR: + pGo->SetFlag(GAMEOBJECT_FLAGS, m_bDoNorthBeforeWest ? GO_FLAG_NO_INTERACT : GO_FLAG_LOCKED); + pGo->RemoveFlag(GAMEOBJECT_FLAGS, m_bDoNorthBeforeWest ? GO_FLAG_LOCKED : GO_FLAG_NO_INTERACT); + break; + + // North + case GO_NORTH_LIBRARY_DOOR: + break; + default: return; } @@ -394,7 +417,7 @@ void instance_dire_maul::SortPylonGuards() continue; } - if (pGuard->IsWithinDistInMap(pGenerator, 20.0f)) + if (pGuard->IsWithinDist2d(pGenerator->GetPositionX(), pGenerator->GetPositionY(), 20.0f)) { m_sSortedGeneratorGuards[i].insert(pGuard->GetGUIDLow()); m_lGeneratorGuardGUIDs.erase(itr++); diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index b4ae8dace..763926f41 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2766" + #define SD2_REVISION_NR "2767" #endif // __SD2_REVISION_NR_H__ From 4de904b54bc2dbbeb8a3d4df462fb32702bb206b Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Thu, 6 Dec 2012 02:32:04 +0100 Subject: [PATCH 0765/1172] [2768] Use SetFactionTemporary on a larger scale. Requires C-MaNGOS 12292 * Change all escort/ follow scripts to use SetFactionTemporary with RESTORE_RESPAWN to simplify and unify code * Change a few (not all) other scripts as well to use SetFactionTemporary instead of setFaction to have better scope control. * Use TOGGLE_FLAG modifiers to handle required UNIT_FLAG changes on faction change of DireMaul, Prince Tortheldrin so that he works properly now * Improve script for Aquementas a little bit, so that he will work if attacked by a player's pet --- base/escort_ai.cpp | 3 --- base/follower_ai.cpp | 5 +---- scripts/eastern_kingdoms/arathi_highlands.cpp | 2 +- .../blackrock_depths/blackrock_depths.cpp | 2 +- .../boss_emperor_dagran_thaurissan.cpp | 2 +- .../instance_blackrock_spire.cpp | 2 +- .../blackwing_lair/boss_vaelastrasz.cpp | 2 +- scripts/eastern_kingdoms/ghostlands.cpp | 2 +- .../gnomeregan/gnomeregan.cpp | 2 +- scripts/eastern_kingdoms/hinterlands.cpp | 2 +- .../molten_core/boss_majordomo_executus.cpp | 2 +- .../molten_core/instance_molten_core.cpp | 2 +- .../scarlet_enclave/ebon_hold.cpp | 12 ++--------- .../shadowfang_keep/shadowfang_keep.cpp | 2 +- scripts/eastern_kingdoms/stormwind_city.cpp | 20 ++++--------------- .../sunwell_plateau/boss_kalecgos.cpp | 2 +- scripts/eastern_kingdoms/swamp_of_sorrows.cpp | 2 +- scripts/eastern_kingdoms/tirisfal_glades.cpp | 8 +------- scripts/eastern_kingdoms/wetlands.cpp | 3 +-- scripts/examples/example_creature.cpp | 2 +- scripts/kalimdor/ashenvale.cpp | 6 +++--- scripts/kalimdor/azuremyst_isle.cpp | 7 ++----- scripts/kalimdor/darkshore.cpp | 4 ++-- scripts/kalimdor/desolace.cpp | 9 +++------ .../kalimdor/dire_maul/instance_dire_maul.cpp | 4 ++-- scripts/kalimdor/dustwallow_marsh.cpp | 10 +++------- scripts/kalimdor/felwood.cpp | 11 +--------- scripts/kalimdor/feralas.cpp | 4 ++-- .../razorfen_downs/razorfen_downs.cpp | 2 +- .../razorfen_kraul/razorfen_kraul.cpp | 2 +- scripts/kalimdor/stonetalon_mountains.cpp | 2 +- scripts/kalimdor/tanaris.cpp | 11 +++++----- scripts/kalimdor/the_barrens.cpp | 4 ++-- scripts/kalimdor/thousand_needles.cpp | 13 ++++-------- scripts/kalimdor/ungoro_crater.cpp | 4 ++-- .../wailing_caverns/wailing_caverns.cpp | 2 +- scripts/kalimdor/winterspring.cpp | 2 +- scripts/kalimdor/zulfarrak/zulfarrak.cpp | 4 +--- scripts/northrend/borean_tundra.cpp | 2 +- scripts/northrend/howling_fjord.cpp | 8 +------- scripts/outland/hellfire_peninsula.cpp | 5 ++--- scripts/outland/nagrand.cpp | 2 +- scripts/outland/netherstorm.cpp | 14 ++----------- scripts/outland/shadowmoon_valley.cpp | 2 +- scripts/outland/terokkar_forest.cpp | 6 +++--- sd2_revision_nr.h | 2 +- sql/scriptdev2_script_full.sql | 2 +- sql/updates/r2768_scriptdev2.sql | 1 + 48 files changed, 75 insertions(+), 149 deletions(-) create mode 100644 sql/updates/r2768_scriptdev2.sql diff --git a/base/escort_ai.cpp b/base/escort_ai.cpp index 1eeadc0c0..7514f8ebe 100644 --- a/base/escort_ai.cpp +++ b/base/escort_ai.cpp @@ -207,9 +207,6 @@ void npc_escortAI::JustRespawned() // add a small delay before going to first waypoint, normal in near all cases m_uiWPWaitTimer = 2500; - if (m_creature->getFaction() != m_creature->GetCreatureInfo()->faction_A) - m_creature->setFaction(m_creature->GetCreatureInfo()->faction_A); - Reset(); } diff --git a/base/follower_ai.cpp b/base/follower_ai.cpp index 253afa5e7..faac23877 100644 --- a/base/follower_ai.cpp +++ b/base/follower_ai.cpp @@ -153,9 +153,6 @@ void FollowerAI::JustRespawned() if (!IsCombatMovement()) SetCombatMovement(true); - if (m_creature->getFaction() != m_creature->GetCreatureInfo()->faction_A) - m_creature->setFaction(m_creature->GetCreatureInfo()->faction_A); - Reset(); } @@ -291,7 +288,7 @@ void FollowerAI::StartFollow(Player* pLeader, uint32 uiFactionForFollower, const m_leaderGuid = pLeader->GetObjectGuid(); if (uiFactionForFollower) - m_creature->setFaction(uiFactionForFollower); + m_creature->SetFactionTemporary(uiFactionForFollower, TEMPFACTION_RESTORE_RESPAWN); m_pQuestForFollow = pQuest; diff --git a/scripts/eastern_kingdoms/arathi_highlands.cpp b/scripts/eastern_kingdoms/arathi_highlands.cpp index 9bb7a0147..ba432e42b 100644 --- a/scripts/eastern_kingdoms/arathi_highlands.cpp +++ b/scripts/eastern_kingdoms/arathi_highlands.cpp @@ -100,7 +100,7 @@ bool QuestAccept_npc_professor_phizzlethorpe(Player* pPlayer, Creature* pCreatur { if (pQuest->GetQuestId() == QUEST_SUNKEN_TREASURE) { - pCreature->setFaction(FACTION_ESCORT_N_NEUTRAL_PASSIVE); + pCreature->SetFactionTemporary(FACTION_ESCORT_N_NEUTRAL_PASSIVE, TEMPFACTION_RESTORE_RESPAWN); DoScriptText(SAY_PROGRESS_1, pCreature, pPlayer); if (npc_professor_phizzlethorpeAI* pEscortAI = dynamic_cast(pCreature->AI())) diff --git a/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.cpp b/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.cpp index cf27d60b1..e51ff3822 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.cpp +++ b/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.cpp @@ -630,7 +630,7 @@ struct MANGOS_DLL_DECL npc_rocknotAI : public npc_escortAI // spell by trap has effect61, this indicate the bar go hostile if (Creature* pTmp = m_pInstance->GetSingleCreatureFromStorage(NPC_PHALANX)) - pTmp->setFaction(14); + pTmp->SetFactionTemporary(14, TEMPFACTION_NONE); // for later, this event(s) has alot more to it. // optionally, DONE can trigger bar to go hostile. diff --git a/scripts/eastern_kingdoms/blackrock_depths/boss_emperor_dagran_thaurissan.cpp b/scripts/eastern_kingdoms/blackrock_depths/boss_emperor_dagran_thaurissan.cpp index 093940341..b6ca6edd1 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/boss_emperor_dagran_thaurissan.cpp +++ b/scripts/eastern_kingdoms/blackrock_depths/boss_emperor_dagran_thaurissan.cpp @@ -70,7 +70,7 @@ struct MANGOS_DLL_DECL boss_emperor_dagran_thaurissanAI : public ScriptedAI { if (pPrincess->isAlive()) { - pPrincess->setFaction(FACTION_NEUTRAL); + pPrincess->SetFactionTemporary(FACTION_NEUTRAL, TEMPFACTION_NONE); pPrincess->AI()->EnterEvadeMode(); } } diff --git a/scripts/eastern_kingdoms/blackrock_spire/instance_blackrock_spire.cpp b/scripts/eastern_kingdoms/blackrock_spire/instance_blackrock_spire.cpp index 22701784c..2b6fa9e3a 100644 --- a/scripts/eastern_kingdoms/blackrock_spire/instance_blackrock_spire.cpp +++ b/scripts/eastern_kingdoms/blackrock_spire/instance_blackrock_spire.cpp @@ -574,7 +574,7 @@ bool AreaTrigger_at_blackrock_spire(Player* pPlayer, AreaTriggerEntry const* pAt // Summon Nefarius and Rend for the dialogue event // Note: Nefarius and Rend need to be hostile and not attackable if (Creature* pNefarius = pPlayer->SummonCreature(NPC_LORD_VICTOR_NEFARIUS, aStadiumLocs[3].m_fX, aStadiumLocs[3].m_fY, aStadiumLocs[3].m_fZ, aStadiumLocs[3].m_fO, TEMPSUMMON_CORPSE_DESPAWN, 0)) - pNefarius->setFaction(FACTION_BLACK_DRAGON); + pNefarius->SetFactionTemporary(FACTION_BLACK_DRAGON, TEMPFACTION_NONE); if (Creature* pRend = pPlayer->SummonCreature(NPC_REND_BLACKHAND, aStadiumLocs[4].m_fX, aStadiumLocs[4].m_fY, aStadiumLocs[4].m_fZ, aStadiumLocs[4].m_fO, TEMPSUMMON_CORPSE_DESPAWN, 0)) pRend->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE); diff --git a/scripts/eastern_kingdoms/blackwing_lair/boss_vaelastrasz.cpp b/scripts/eastern_kingdoms/blackwing_lair/boss_vaelastrasz.cpp index d664c7f72..511518c90 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/boss_vaelastrasz.cpp +++ b/scripts/eastern_kingdoms/blackwing_lair/boss_vaelastrasz.cpp @@ -224,7 +224,7 @@ struct MANGOS_DLL_DECL boss_vaelastraszAI : public ScriptedAI ++m_uiSpeechNum; break; case 2: - m_creature->setFaction(FACTION_HOSTILE); + m_creature->SetFactionTemporary(FACTION_HOSTILE, TEMPFACTION_RESTORE_RESPAWN); if (m_playerGuid) { diff --git a/scripts/eastern_kingdoms/ghostlands.cpp b/scripts/eastern_kingdoms/ghostlands.cpp index 347018b4e..0b36e42b1 100644 --- a/scripts/eastern_kingdoms/ghostlands.cpp +++ b/scripts/eastern_kingdoms/ghostlands.cpp @@ -145,7 +145,7 @@ bool QuestAccept_npc_ranger_lilatha(Player* pPlayer, Creature* pCreature, const { if (pQuest->GetQuestId() == QUEST_CATACOMBS) { - pCreature->setFaction(FACTION_SMOON_E); + pCreature->SetFactionTemporary(FACTION_SMOON_E, TEMPFACTION_RESTORE_RESPAWN); if (npc_ranger_lilathaAI* pEscortAI = dynamic_cast(pCreature->AI())) pEscortAI->Start(false, pPlayer, pQuest); diff --git a/scripts/eastern_kingdoms/gnomeregan/gnomeregan.cpp b/scripts/eastern_kingdoms/gnomeregan/gnomeregan.cpp index cb7ebad1e..8acbb02ac 100644 --- a/scripts/eastern_kingdoms/gnomeregan/gnomeregan.cpp +++ b/scripts/eastern_kingdoms/gnomeregan/gnomeregan.cpp @@ -347,7 +347,7 @@ struct MANGOS_DLL_DECL npc_blastmaster_emi_shortfuseAI : public npc_escortAI { case 1: DoScriptText(SAY_START, m_creature); - m_creature->setFaction(FACTION_ESCORT_N_NEUTRAL_PASSIVE); + m_creature->SetFactionTemporary(FACTION_ESCORT_N_NEUTRAL_PASSIVE, TEMPFACTION_RESTORE_RESPAWN); m_creature->SetUInt32Value(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_NONE); m_creature->SetUInt32Value(UNIT_DYNAMIC_FLAGS, 0); m_uiPhaseTimer = 5000; diff --git a/scripts/eastern_kingdoms/hinterlands.cpp b/scripts/eastern_kingdoms/hinterlands.cpp index d56fdf95c..6827547f0 100644 --- a/scripts/eastern_kingdoms/hinterlands.cpp +++ b/scripts/eastern_kingdoms/hinterlands.cpp @@ -115,7 +115,7 @@ bool QuestAccept_npc_00x09hl(Player* pPlayer, Creature* pCreature, const Quest* if (pQuest->GetQuestId() == QUEST_RESQUE_OOX_09) { pCreature->SetStandState(UNIT_STAND_STATE_STAND); - pCreature->setFaction((pPlayer->GetTeam() == ALLIANCE) ? FACTION_ESCORT_A_PASSIVE : FACTION_ESCORT_H_PASSIVE); + pCreature->SetFactionTemporary(pPlayer->GetTeam() == ALLIANCE ? FACTION_ESCORT_A_PASSIVE : FACTION_ESCORT_H_PASSIVE, TEMPFACTION_RESTORE_RESPAWN); DoScriptText(SAY_OOX_START, pCreature, pPlayer); diff --git a/scripts/eastern_kingdoms/molten_core/boss_majordomo_executus.cpp b/scripts/eastern_kingdoms/molten_core/boss_majordomo_executus.cpp index 3b8600795..ed4b0d7c4 100644 --- a/scripts/eastern_kingdoms/molten_core/boss_majordomo_executus.cpp +++ b/scripts/eastern_kingdoms/molten_core/boss_majordomo_executus.cpp @@ -136,7 +136,7 @@ struct MANGOS_DLL_DECL boss_majordomoAI : public ScriptedAI // Set friendly m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE); - m_creature->setFaction(FACTION_MAJORDOMO_FRIENDLY); + m_creature->SetFactionTemporary(FACTION_MAJORDOMO_FRIENDLY, TEMPFACTION_RESTORE_RESPAWN); // Reset orientation m_creature->SetFacingTo(m_aMajordomoLocations[0].m_fO); diff --git a/scripts/eastern_kingdoms/molten_core/instance_molten_core.cpp b/scripts/eastern_kingdoms/molten_core/instance_molten_core.cpp index 371767ecb..b0a9470a4 100644 --- a/scripts/eastern_kingdoms/molten_core/instance_molten_core.cpp +++ b/scripts/eastern_kingdoms/molten_core/instance_molten_core.cpp @@ -197,7 +197,7 @@ void instance_molten_core::DoSpawnMajordomoIfCan(bool bByPlayerEnter) { if (uiSummonPos) // Majordomo encounter already done, set faction { - pMajordomo->setFaction(FACTION_MAJORDOMO_FRIENDLY); + pMajordomo->SetFactionTemporary(FACTION_MAJORDOMO_FRIENDLY, TEMPFACTION_RESTORE_RESPAWN); pMajordomo->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE); pMajordomo->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); } diff --git a/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp b/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp index 73a791703..e2c6ed668 100644 --- a/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp +++ b/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp @@ -537,9 +537,6 @@ struct MANGOS_DLL_DECL npc_death_knight_initiateAI : public ScriptedAI void Reset() override { - if (m_creature->getFaction() != m_creature->GetCreatureInfo()->faction_A) - m_creature->setFaction(m_creature->GetCreatureInfo()->faction_A); - m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_UNK_15); m_duelerGuid.Clear(); @@ -589,7 +586,7 @@ struct MANGOS_DLL_DECL npc_death_knight_initiateAI : public ScriptedAI { if (m_uiDuelTimer < uiDiff) { - m_creature->setFaction(FACTION_HOSTILE); + m_creature->SetFactionTemporary(FACTION_HOSTILE, TEMPFACTION_RESTORE_COMBAT_STOP | TEMPFACTION_RESTORE_RESPAWN); if (Player* pPlayer = m_creature->GetMap()->GetPlayer(m_duelerGuid)) AttackStart(pPlayer); @@ -904,12 +901,10 @@ struct MANGOS_DLL_DECL npc_unworthy_initiateAI : public ScriptedAI { npc_unworthy_initiateAI(Creature* pCreature) : ScriptedAI(pCreature) { - m_uiNormFaction = pCreature->getFaction(); Reset(); } ObjectGuid m_myAnchorGuid; - uint32 m_uiNormFaction; uint32 m_uiAnchorCheckTimer; uint32 m_uiPhase; uint32 m_uiPhaseTimer; @@ -920,9 +915,6 @@ struct MANGOS_DLL_DECL npc_unworthy_initiateAI : public ScriptedAI void Reset() override { - if (m_creature->getFaction() != m_uiNormFaction) - m_creature->setFaction(m_uiNormFaction); - m_uiAnchorCheckTimer = 5000; m_uiPhase = PHASE_INACTIVE_OR_COMBAT; m_uiPhaseTimer = 7500; @@ -1059,7 +1051,7 @@ struct MANGOS_DLL_DECL npc_unworthy_initiateAI : public ScriptedAI } else { - m_creature->setFaction(FACTION_MONSTER); + m_creature->SetFactionTemporary(FACTION_MONSTER, TEMPFACTION_RESTORE_COMBAT_STOP | TEMPFACTION_RESTORE_RESPAWN); m_uiPhase = PHASE_INACTIVE_OR_COMBAT; diff --git a/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.cpp b/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.cpp index 19c7c9eb8..ce8615512 100644 --- a/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.cpp +++ b/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.cpp @@ -869,7 +869,7 @@ struct MANGOS_DLL_DECL npc_deathstalker_vincentAI : public ScriptedAI if (uiDamage >= m_creature->GetHealth()) { m_creature->GetHealth() > 1 ? uiDamage = m_creature->GetHealth() - 1 : uiDamage = 0; - m_creature->setFaction(FACTION_FRIENDLY); + m_creature->SetFactionTemporary(FACTION_FRIENDLY, TEMPFACTION_NONE); EnterEvadeMode(); DoScriptText(SAY_VINCENT_DIE, m_creature); } diff --git a/scripts/eastern_kingdoms/stormwind_city.cpp b/scripts/eastern_kingdoms/stormwind_city.cpp index 746abc489..f9ba6b5f4 100644 --- a/scripts/eastern_kingdoms/stormwind_city.cpp +++ b/scripts/eastern_kingdoms/stormwind_city.cpp @@ -47,17 +47,12 @@ struct MANGOS_DLL_DECL npc_bartlebyAI : public ScriptedAI { npc_bartlebyAI(Creature* pCreature) : ScriptedAI(pCreature) { - m_uiNormalFaction = pCreature->getFaction(); Reset(); } uint32 m_uiNormalFaction; - void Reset() override - { - if (m_creature->getFaction() != m_uiNormalFaction) - m_creature->setFaction(m_uiNormalFaction); - } + void Reset() override {} void AttackedBy(Unit* pAttacker) override { @@ -88,7 +83,7 @@ bool QuestAccept_npc_bartleby(Player* pPlayer, Creature* pCreature, const Quest* { if (pQuest->GetQuestId() == QUEST_BEAT) { - pCreature->setFaction(FACTION_ENEMY); + pCreature->SetFactionTemporary(FACTION_ENEMY, TEMPFACTION_RESTORE_RESPAWN | TEMPFACTION_RESTORE_COMBAT_STOP); pCreature->AI()->AttackStart(pPlayer); } return true; @@ -113,17 +108,10 @@ struct MANGOS_DLL_DECL npc_dashel_stonefistAI : public ScriptedAI { npc_dashel_stonefistAI(Creature* pCreature) : ScriptedAI(pCreature) { - m_uiNormalFaction = pCreature->getFaction(); Reset(); } - uint32 m_uiNormalFaction; - - void Reset() override - { - if (m_creature->getFaction() != m_uiNormalFaction) - m_creature->setFaction(m_uiNormalFaction); - } + void Reset() override {} void AttackedBy(Unit* pAttacker) override { @@ -154,7 +142,7 @@ bool QuestAccept_npc_dashel_stonefist(Player* pPlayer, Creature* pCreature, cons { if (pQuest->GetQuestId() == QUEST_MISSING_DIPLO_PT8) { - pCreature->setFaction(FACTION_HOSTILE); + pCreature->SetFactionTemporary(FACTION_HOSTILE, TEMPFACTION_RESTORE_COMBAT_STOP | TEMPFACTION_RESTORE_RESPAWN); pCreature->AI()->AttackStart(pPlayer); } return true; diff --git a/scripts/eastern_kingdoms/sunwell_plateau/boss_kalecgos.cpp b/scripts/eastern_kingdoms/sunwell_plateau/boss_kalecgos.cpp index cfa448e6c..009721130 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/boss_kalecgos.cpp +++ b/scripts/eastern_kingdoms/sunwell_plateau/boss_kalecgos.cpp @@ -186,7 +186,7 @@ struct MANGOS_DLL_DECL boss_kalecgosAI : public ScriptedAI pKalec->ForcedDespawn(); EnterEvadeMode(); - m_creature->setFaction(35); + m_creature->SetFactionTemporary(35, TEMPFACTION_RESTORE_RESPAWN); m_creature->GetMotionMaster()->MoveIdle(); DoScriptText(SAY_GOOD_PLRWIN, m_creature); m_uiExitTimer = 10000; diff --git a/scripts/eastern_kingdoms/swamp_of_sorrows.cpp b/scripts/eastern_kingdoms/swamp_of_sorrows.cpp index a09f16c29..4020e49ad 100644 --- a/scripts/eastern_kingdoms/swamp_of_sorrows.cpp +++ b/scripts/eastern_kingdoms/swamp_of_sorrows.cpp @@ -138,7 +138,7 @@ bool QuestAccept_npc_galen_goodward(Player* pPlayer, Creature* pCreature, const if (npc_galen_goodwardAI* pEscortAI = dynamic_cast(pCreature->AI())) { pEscortAI->Start(false, pPlayer, pQuest); - pCreature->setFaction(FACTION_ESCORT_N_NEUTRAL_ACTIVE); + pCreature->SetFactionTemporary(FACTION_ESCORT_N_NEUTRAL_ACTIVE, TEMPFACTION_RESTORE_RESPAWN); DoScriptText(SAY_QUEST_ACCEPTED, pCreature); } } diff --git a/scripts/eastern_kingdoms/tirisfal_glades.cpp b/scripts/eastern_kingdoms/tirisfal_glades.cpp index 23cec803a..77ecab263 100644 --- a/scripts/eastern_kingdoms/tirisfal_glades.cpp +++ b/scripts/eastern_kingdoms/tirisfal_glades.cpp @@ -88,11 +88,9 @@ struct MANGOS_DLL_DECL npc_calvin_montagueAI : public ScriptedAI { npc_calvin_montagueAI(Creature* pCreature) : ScriptedAI(pCreature) { - m_uiNormFaction = pCreature->getFaction(); Reset(); } - uint32 m_uiNormFaction; uint32 m_uiPhase; uint32 m_uiPhaseTimer; ObjectGuid m_playerGuid; @@ -102,9 +100,6 @@ struct MANGOS_DLL_DECL npc_calvin_montagueAI : public ScriptedAI m_uiPhase = 0; m_uiPhaseTimer = 5000; m_playerGuid.Clear(); - - if (m_creature->getFaction() != m_uiNormFaction) - m_creature->setFaction(m_uiNormFaction); } void AttackedBy(Unit* pAttacker) override @@ -121,7 +116,6 @@ struct MANGOS_DLL_DECL npc_calvin_montagueAI : public ScriptedAI { uiDamage = 0; - m_creature->setFaction(m_uiNormFaction); m_creature->CombatStop(true); m_uiPhase = 1; @@ -180,7 +174,7 @@ bool QuestAccept_npc_calvin_montague(Player* pPlayer, Creature* pCreature, const { if (pQuest->GetQuestId() == QUEST_590) { - pCreature->setFaction(FACTION_HOSTILE); + pCreature->SetFactionTemporary(FACTION_HOSTILE, TEMPFACTION_RESTORE_COMBAT_STOP | TEMPFACTION_RESTORE_RESPAWN); pCreature->AI()->AttackStart(pPlayer); } return true; diff --git a/scripts/eastern_kingdoms/wetlands.cpp b/scripts/eastern_kingdoms/wetlands.cpp index eea4893ad..63efc4d71 100644 --- a/scripts/eastern_kingdoms/wetlands.cpp +++ b/scripts/eastern_kingdoms/wetlands.cpp @@ -64,7 +64,7 @@ struct MANGOS_DLL_DECL npc_tapoke_slim_jahnAI : public npc_escortAI m_creature->RemoveSpellsCausingAura(SPELL_AURA_MOD_STEALTH); SetRun(); - m_creature->setFaction(FACTION_ENEMY); + m_creature->SetFactionTemporary(FACTION_ENEMY, TEMPFACTION_RESTORE_RESPAWN | TEMPFACTION_RESTORE_COMBAT_STOP); break; } } @@ -109,7 +109,6 @@ struct MANGOS_DLL_DECL npc_tapoke_slim_jahnAI : public npc_escortAI uiDamage = 0; - m_creature->setFaction(m_creature->GetCreatureInfo()->faction_A); m_creature->RemoveAllAuras(); m_creature->DeleteThreatList(); m_creature->CombatStop(true); diff --git a/scripts/examples/example_creature.cpp b/scripts/examples/example_creature.cpp index 73a14e0f8..a5f285f5f 100644 --- a/scripts/examples/example_creature.cpp +++ b/scripts/examples/example_creature.cpp @@ -269,7 +269,7 @@ bool GossipSelect_example_creature(Player* pPlayer, Creature* pCreature, uint32 { pPlayer->CLOSE_GOSSIP_MENU(); // Set our faction to hostile towards all - pCreature->setFaction(FACTION_WORGEN); + pCreature->SetFactionTemporary(FACTION_WORGEN, TEMPFACTION_RESTORE_RESPAWN); pCreature->AI()->AttackStart(pPlayer); } diff --git a/scripts/kalimdor/ashenvale.cpp b/scripts/kalimdor/ashenvale.cpp index b334de64c..f1d3e18a5 100644 --- a/scripts/kalimdor/ashenvale.cpp +++ b/scripts/kalimdor/ashenvale.cpp @@ -210,7 +210,7 @@ bool QuestAccept_npc_muglash(Player* pPlayer, Creature* pCreature, const Quest* if (npc_muglashAI* pEscortAI = dynamic_cast(pCreature->AI())) { DoScriptText(SAY_MUG_START1, pCreature); - pCreature->setFaction(FACTION_ESCORT_H_PASSIVE); + pCreature->SetFactionTemporary(FACTION_ESCORT_H_PASSIVE, TEMPFACTION_RESTORE_RESPAWN); pEscortAI->Start(false, pPlayer, pQuest); } @@ -289,7 +289,7 @@ bool QuestAccept_npc_ruul_snowhoof(Player* pPlayer, Creature* pCreature, const Q { if (pQuest->GetQuestId() == QUEST_FREEDOM_TO_RUUL) { - pCreature->setFaction(FACTION_ESCORT_N_NEUTRAL_PASSIVE); + pCreature->SetFactionTemporary(FACTION_ESCORT_N_NEUTRAL_PASSIVE, TEMPFACTION_RESTORE_RESPAWN); pCreature->SetStandState(UNIT_STAND_STATE_STAND); if (npc_ruul_snowhoofAI* pEscortAI = dynamic_cast(pCreature->AI())) @@ -587,7 +587,7 @@ bool QuestAccept_npc_feero_ironhand(Player* pPlayer, Creature* pCreature, const if (pQuest->GetQuestId() == QUEST_SUPPLIES_TO_AUBERDINE) { DoScriptText(SAY_QUEST_START, pCreature, pPlayer); - pCreature->setFaction(FACTION_ESCORT_A_NEUTRAL_PASSIVE); + pCreature->SetFactionTemporary(FACTION_ESCORT_A_NEUTRAL_PASSIVE, TEMPFACTION_RESTORE_RESPAWN); if (npc_feero_ironhandAI* pEscortAI = dynamic_cast(pCreature->AI())) pEscortAI->Start(true, pPlayer, pQuest, true); diff --git a/scripts/kalimdor/azuremyst_isle.cpp b/scripts/kalimdor/azuremyst_isle.cpp index 5ed0c8bcc..08988c845 100644 --- a/scripts/kalimdor/azuremyst_isle.cpp +++ b/scripts/kalimdor/azuremyst_isle.cpp @@ -197,7 +197,6 @@ struct MANGOS_DLL_DECL npc_engineer_spark_overgrindAI : public ScriptedAI { npc_engineer_spark_overgrindAI(Creature* pCreature) : ScriptedAI(pCreature) { - m_uiNormFaction = pCreature->getFaction(); m_uiNpcFlags = pCreature->GetUInt32Value(UNIT_NPC_FLAGS); Reset(); @@ -206,7 +205,6 @@ struct MANGOS_DLL_DECL npc_engineer_spark_overgrindAI : public ScriptedAI } uint32 m_uiNpcFlags; - uint32 m_uiNormFaction; uint32 m_uiDynamiteTimer; uint32 m_uiEmoteTimer; @@ -215,7 +213,6 @@ struct MANGOS_DLL_DECL npc_engineer_spark_overgrindAI : public ScriptedAI void Reset() override { - m_creature->setFaction(m_uiNormFaction); m_creature->SetUInt32Value(UNIT_NPC_FLAGS, m_uiNpcFlags); m_uiDynamiteTimer = 8000; @@ -280,7 +277,7 @@ bool GossipSelect_npc_engineer_spark_overgrind(Player* pPlayer, Creature* pCreat if (uiAction == GOSSIP_ACTION_INFO_DEF) { pPlayer->CLOSE_GOSSIP_MENU(); - pCreature->setFaction(FACTION_HOSTILE); + pCreature->SetFactionTemporary(FACTION_HOSTILE, TEMPFACTION_RESTORE_COMBAT_STOP | TEMPFACTION_RESTORE_RESPAWN); pCreature->AI()->AttackStart(pPlayer); } return true; @@ -373,7 +370,7 @@ bool QuestAccept_npc_magwin(Player* pPlayer, Creature* pCreature, const Quest* p { if (pQuest->GetQuestId() == QUEST_A_CRY_FOR_HELP) { - pCreature->setFaction(10); + pCreature->SetFactionTemporary(FACTION_ESCORT_A_NEUTRAL_PASSIVE, TEMPFACTION_RESTORE_RESPAWN); if (npc_magwinAI* pEscortAI = dynamic_cast(pCreature->AI())) pEscortAI->Start(false, pPlayer, pQuest); diff --git a/scripts/kalimdor/darkshore.cpp b/scripts/kalimdor/darkshore.cpp index 710d9b5da..f83d6113b 100644 --- a/scripts/kalimdor/darkshore.cpp +++ b/scripts/kalimdor/darkshore.cpp @@ -296,7 +296,7 @@ bool QuestAccept_npc_prospector_remtravel(Player* pPlayer, Creature* pCreature, { if (pQuest->GetQuestId() == QUEST_ABSENT_MINDED_PT2) { - pCreature->setFaction(FACTION_ESCORT_A_NEUTRAL_PASSIVE); + pCreature->SetFactionTemporary(FACTION_ESCORT_A_NEUTRAL_PASSIVE, TEMPFACTION_RESTORE_RESPAWN); if (npc_prospector_remtravelAI* pEscortAI = dynamic_cast(pCreature->AI())) pEscortAI->Start(false, pPlayer, pQuest, true); @@ -342,7 +342,7 @@ struct MANGOS_DLL_DECL npc_threshwackonatorAI : public FollowerAI void DoAtEnd() { - m_creature->setFaction(FACTION_HOSTILE); + m_creature->SetFactionTemporary(FACTION_HOSTILE, TEMPFACTION_RESTORE_RESPAWN); if (Player* pHolder = GetLeaderForFollower()) m_creature->AI()->AttackStart(pHolder); diff --git a/scripts/kalimdor/desolace.cpp b/scripts/kalimdor/desolace.cpp index e7d69ede8..898878099 100644 --- a/scripts/kalimdor/desolace.cpp +++ b/scripts/kalimdor/desolace.cpp @@ -211,7 +211,7 @@ bool QuestAccept_npc_dalinda_malem(Player* pPlayer, Creature* pCreature, const Q if (npc_dalinda_malemAI* pEscortAI = dynamic_cast(pCreature->AI())) { // TODO This faction change needs confirmation, also possible that we need to drop her PASSIVE flag - pCreature->setFaction(FACTION_ESCORT_A_NEUTRAL_PASSIVE); + pCreature->SetFactionTemporary(FACTION_ESCORT_A_NEUTRAL_PASSIVE, TEMPFACTION_RESTORE_RESPAWN | TEMPFACTION_TOGGLE_PASSIVE); pEscortAI->Start(false, pPlayer, pQuest); } } @@ -277,12 +277,9 @@ struct MANGOS_DLL_DECL npc_melizza_brimbuzzleAI : public npc_escortAI, private D npc_melizza_brimbuzzleAI(Creature* m_creature) : npc_escortAI(m_creature), DialogueHelper(aIntroDialogue) { - m_uiNormalFaction = m_creature->getFaction(); Reset(); } - uint32 m_uiNormalFaction; - void Reset() override {} void JustStartedEscort() override @@ -307,7 +304,7 @@ struct MANGOS_DLL_DECL npc_melizza_brimbuzzleAI : public npc_escortAI, private D if (Player* pPlayer = GetPlayerForEscort()) DoScriptText(SAY_MELIZZA_START, m_creature, pPlayer); - m_creature->setFaction(FACTION_ESCORT_N_NEUTRAL_PASSIVE); + m_creature->SetFactionTemporary(FACTION_ESCORT_N_NEUTRAL_PASSIVE, TEMPFACTION_RESTORE_RESPAWN); break; case 4: for (uint8 i = 0; i < MAX_MARAUDERS; ++i) @@ -356,7 +353,7 @@ struct MANGOS_DLL_DECL npc_melizza_brimbuzzleAI : public npc_escortAI, private D pPlayer->GroupEventHappens(QUEST_GET_ME_OUT_OF_HERE, m_creature); } - m_creature->setFaction(m_uiNormalFaction); + m_creature->ClearTemporaryFaction(); SetRun(true); SetEscortPaused(false); break; diff --git a/scripts/kalimdor/dire_maul/instance_dire_maul.cpp b/scripts/kalimdor/dire_maul/instance_dire_maul.cpp index 6d6f08658..774d926db 100644 --- a/scripts/kalimdor/dire_maul/instance_dire_maul.cpp +++ b/scripts/kalimdor/dire_maul/instance_dire_maul.cpp @@ -60,7 +60,7 @@ void instance_dire_maul::OnCreatureCreate(Creature* pCreature) // West case NPC_PRINCE_TORTHELDRIN: if (m_auiEncounter[TYPE_IMMOLTHAR] == DONE) - pCreature->setFaction(FACTION_HOSTILE); + pCreature->SetFactionTemporary(FACTION_HOSTILE, TEMPFACTION_RESTORE_RESPAWN | TEMPFACTION_TOGGLE_OOC_NOT_ATTACK); break; case NPC_ARCANE_ABERRATION: case NPC_MANA_REMNANT: @@ -213,7 +213,7 @@ void instance_dire_maul::SetData(uint32 uiType, uint32 uiData) if (Creature* pPrince = GetSingleCreatureFromStorage(NPC_PRINCE_TORTHELDRIN)) { DoScriptText(SAY_FREE_IMMOLTHAR, pPrince); - pPrince->setFaction(FACTION_HOSTILE); + pPrince->SetFactionTemporary(FACTION_HOSTILE, TEMPFACTION_RESTORE_RESPAWN | TEMPFACTION_TOGGLE_OOC_NOT_ATTACK); // Despawn Chest-Aura if (GameObject* pChestAura = GetSingleGameObjectFromStorage(GO_PRINCES_CHEST_AURA)) pChestAura->Use(pPrince); diff --git a/scripts/kalimdor/dustwallow_marsh.cpp b/scripts/kalimdor/dustwallow_marsh.cpp index 644a86017..473d6c8c2 100644 --- a/scripts/kalimdor/dustwallow_marsh.cpp +++ b/scripts/kalimdor/dustwallow_marsh.cpp @@ -585,7 +585,7 @@ bool QuestAccept_npc_ogron(Player* pPlayer, Creature* pCreature, const Quest* pQ if (npc_ogronAI* pEscortAI = dynamic_cast(pCreature->AI())) { pEscortAI->Start(false, pPlayer, pQuest, true); - pCreature->setFaction(FACTION_ESCORT_N_FRIEND_PASSIVE); + pCreature->SetFactionTemporary(FACTION_ESCORT_N_FRIEND_PASSIVE, TEMPFACTION_RESTORE_RESPAWN); DoScriptText(SAY_OGR_START, pCreature, pPlayer); } } @@ -623,11 +623,7 @@ struct MANGOS_DLL_DECL npc_private_hendelAI : public ScriptedAI { npc_private_hendelAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } - void Reset() override - { - if (m_creature->getFaction() != m_creature->GetCreatureInfo()->faction_A) - m_creature->setFaction(m_creature->GetCreatureInfo()->faction_A); - } + void Reset() override {} void AttackedBy(Unit* pAttacker) override { @@ -658,7 +654,7 @@ struct MANGOS_DLL_DECL npc_private_hendelAI : public ScriptedAI bool QuestAccept_npc_private_hendel(Player* pPlayer, Creature* pCreature, const Quest* pQuest) { if (pQuest->GetQuestId() == QUEST_MISSING_DIPLO_PT16) - pCreature->setFaction(FACTION_HOSTILE); + pCreature->SetFactionTemporary(FACTION_HOSTILE, TEMPFACTION_RESTORE_COMBAT_STOP | TEMPFACTION_RESTORE_RESPAWN); return true; } diff --git a/scripts/kalimdor/felwood.cpp b/scripts/kalimdor/felwood.cpp index 333ed60bb..e0bd6c3d5 100644 --- a/scripts/kalimdor/felwood.cpp +++ b/scripts/kalimdor/felwood.cpp @@ -307,13 +307,7 @@ struct MANGOS_DLL_DECL npc_kroshiusAI : public ScriptedAI m_playerGuid.Clear(); if (!m_uiPhase) - { - m_creature->setFaction(m_creature->GetCreatureInfo()->faction_A); - // TODO: Workaround? till better solution - m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE); - m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PASSIVE); m_creature->SetStandState(UNIT_STAND_STATE_DEAD); - } } void DoRevive(Player* pSource) @@ -353,10 +347,7 @@ struct MANGOS_DLL_DECL npc_kroshiusAI : public ScriptedAI m_uiPhaseTimer = 3500; break; case 3: // Attack - m_creature->setFaction(FACTION_HOSTILE); - // TODO workaround will better idea - m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE); - m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PASSIVE); + m_creature->SetFactionTemporary(FACTION_HOSTILE, TEMPFACTION_RESTORE_COMBAT_STOP | TEMPFACTION_RESTORE_RESPAWN | TEMPFACTION_TOGGLE_OOC_NOT_ATTACK | TEMPFACTION_TOGGLE_PASSIVE); if (Player* pPlayer = m_creature->GetMap()->GetPlayer(m_playerGuid)) { if (m_creature->IsWithinDistInMap(pPlayer, 30.0f)) diff --git a/scripts/kalimdor/feralas.cpp b/scripts/kalimdor/feralas.cpp index 0872c9168..b9a952921 100644 --- a/scripts/kalimdor/feralas.cpp +++ b/scripts/kalimdor/feralas.cpp @@ -121,10 +121,10 @@ bool QuestAccept_npc_oox22fe(Player* pPlayer, Creature* pCreature, const Quest* pCreature->SetStandState(UNIT_STAND_STATE_STAND); if (pPlayer->GetTeam() == ALLIANCE) - pCreature->setFaction(FACTION_ESCORT_A_PASSIVE); + pCreature->SetFactionTemporary(FACTION_ESCORT_A_PASSIVE, TEMPFACTION_RESTORE_RESPAWN); if (pPlayer->GetTeam() == HORDE) - pCreature->setFaction(FACTION_ESCORT_H_PASSIVE); + pCreature->SetFactionTemporary(FACTION_ESCORT_H_PASSIVE, TEMPFACTION_RESTORE_RESPAWN); if (npc_oox22feAI* pEscortAI = dynamic_cast(pCreature->AI())) pEscortAI->Start(false, pPlayer, pQuest); diff --git a/scripts/kalimdor/razorfen_downs/razorfen_downs.cpp b/scripts/kalimdor/razorfen_downs/razorfen_downs.cpp index 97f1323db..089b132a8 100644 --- a/scripts/kalimdor/razorfen_downs/razorfen_downs.cpp +++ b/scripts/kalimdor/razorfen_downs/razorfen_downs.cpp @@ -280,7 +280,7 @@ bool QuestAccept_npc_belnistrasz(Player* pPlayer, Creature* pCreature, const Que { pEscortAI->Start(true, pPlayer, pQuest); DoScriptText(SAY_BELNISTRASZ_READY, pCreature, pPlayer); - pCreature->setFaction(FACTION_ESCORT_N_NEUTRAL_ACTIVE); + pCreature->SetFactionTemporary(FACTION_ESCORT_N_NEUTRAL_ACTIVE, TEMPFACTION_RESTORE_RESPAWN); } } diff --git a/scripts/kalimdor/razorfen_kraul/razorfen_kraul.cpp b/scripts/kalimdor/razorfen_kraul/razorfen_kraul.cpp index 794db75ba..3786780d1 100644 --- a/scripts/kalimdor/razorfen_kraul/razorfen_kraul.cpp +++ b/scripts/kalimdor/razorfen_kraul/razorfen_kraul.cpp @@ -139,7 +139,7 @@ bool QuestAccept_npc_willix_the_importer(Player* pPlayer, Creature* pCreature, c // After 4.0.1 set run = true pEscortAI->Start(false, pPlayer, pQuest); DoScriptText(SAY_WILLIX_READY, pCreature, pPlayer); - pCreature->setFaction(FACTION_ESCORT_N_NEUTRAL_PASSIVE); + pCreature->SetFactionTemporary(FACTION_ESCORT_N_NEUTRAL_PASSIVE, TEMPFACTION_RESTORE_RESPAWN); } } diff --git a/scripts/kalimdor/stonetalon_mountains.cpp b/scripts/kalimdor/stonetalon_mountains.cpp index be97af6c0..77a0534a1 100644 --- a/scripts/kalimdor/stonetalon_mountains.cpp +++ b/scripts/kalimdor/stonetalon_mountains.cpp @@ -88,7 +88,7 @@ bool QuestAccept_npc_kaya(Player* pPlayer, Creature* pCreature, Quest const* pQu if (pQuest->GetQuestId() == QUEST_PROTECT_KAYA) { - pCreature->setFaction(FACTION_ESCORT_H_PASSIVE); + pCreature->SetFactionTemporary(FACTION_ESCORT_H_PASSIVE, TEMPFACTION_RESTORE_RESPAWN); DoScriptText(SAY_START, pCreature); if (npc_kayaAI* pEscortAI = dynamic_cast(pCreature->AI())) diff --git a/scripts/kalimdor/tanaris.cpp b/scripts/kalimdor/tanaris.cpp index 1e53b7c41..1db0426cf 100644 --- a/scripts/kalimdor/tanaris.cpp +++ b/scripts/kalimdor/tanaris.cpp @@ -67,7 +67,7 @@ struct MANGOS_DLL_DECL mob_aquementasAI : public ScriptedAI m_uiAquaJetTimer = 5000; m_uiFrostShockTimer = 1000; - m_creature->setFaction(FACTION_FRIENDLY); + m_creature->setFaction(FACTION_FRIENDLY); // TODO: Either do this way, or might require a DB change } void SendItem(Player* pReceiver) @@ -86,8 +86,9 @@ struct MANGOS_DLL_DECL mob_aquementasAI : public ScriptedAI { DoScriptText(AGGRO_YELL_AQUE, m_creature, pWho); - if (pWho->GetTypeId() == TYPEID_PLAYER) - SendItem(static_cast(pWho)); + Player* pInvokedPlayer = pWho->GetCharmerOrOwnerPlayerOrPlayerItself(); + if (pInvokedPlayer) + SendItem(pInvokedPlayer); } void UpdateAI(const uint32 uiDiff) override @@ -311,10 +312,10 @@ bool QuestAccept_npc_oox17tn(Player* pPlayer, Creature* pCreature, const Quest* pCreature->SetStandState(UNIT_STAND_STATE_STAND); if (pPlayer->GetTeam() == ALLIANCE) - pCreature->setFaction(FACTION_ESCORT_A_PASSIVE); + pCreature->SetFactionTemporary(FACTION_ESCORT_A_PASSIVE, TEMPFACTION_RESTORE_RESPAWN); if (pPlayer->GetTeam() == HORDE) - pCreature->setFaction(FACTION_ESCORT_H_PASSIVE); + pCreature->SetFactionTemporary(FACTION_ESCORT_H_PASSIVE, TEMPFACTION_RESTORE_RESPAWN); if (npc_oox17tnAI* pEscortAI = dynamic_cast(pCreature->AI())) pEscortAI->Start(false, pPlayer, pQuest); diff --git a/scripts/kalimdor/the_barrens.cpp b/scripts/kalimdor/the_barrens.cpp index ec9e3063e..a44fea12a 100644 --- a/scripts/kalimdor/the_barrens.cpp +++ b/scripts/kalimdor/the_barrens.cpp @@ -151,7 +151,7 @@ bool QuestAccept_npc_gilthares(Player* pPlayer, Creature* pCreature, const Quest { if (pQuest->GetQuestId() == QUEST_FREE_FROM_HOLD) { - pCreature->setFaction(FACTION_ESCORT_H_NEUTRAL_ACTIVE); + pCreature->SetFactionTemporary(FACTION_ESCORT_H_NEUTRAL_ACTIVE, TEMPFACTION_RESTORE_RESPAWN); pCreature->SetStandState(UNIT_STAND_STATE_STAND); DoScriptText(SAY_GIL_START, pCreature, pPlayer); @@ -608,7 +608,7 @@ bool QuestAccept_npc_wizzlecranks_shredder(Player* pPlayer, Creature* pCreature, if (pQuest->GetQuestId() == QUEST_ESCAPE) { DoScriptText(SAY_START, pCreature); - pCreature->setFaction(FACTION_RATCHET); + pCreature->SetFactionTemporary(FACTION_RATCHET, TEMPFACTION_RESTORE_RESPAWN); if (npc_wizzlecranks_shredderAI* pEscortAI = dynamic_cast(pCreature->AI())) pEscortAI->Start(true, pPlayer, pQuest); diff --git a/scripts/kalimdor/thousand_needles.cpp b/scripts/kalimdor/thousand_needles.cpp index f9bf00dbe..6074498d4 100644 --- a/scripts/kalimdor/thousand_needles.cpp +++ b/scripts/kalimdor/thousand_needles.cpp @@ -174,7 +174,7 @@ bool QuestAccept_npc_lakota_windsong(Player* pPlayer, Creature* pCreature, const if (pQuest->GetQuestId() == QUEST_FREE_AT_LAST) { DoScriptText(SAY_LAKO_START, pCreature, pPlayer); - pCreature->setFaction(FACTION_ESCORT_H_NEUTRAL_ACTIVE); + pCreature->SetFactionTemporary(FACTION_ESCORT_H_NEUTRAL_ACTIVE, TEMPFACTION_RESTORE_RESPAWN); if (npc_lakota_windsongAI* pEscortAI = dynamic_cast(pCreature->AI())) pEscortAI->Start(false, pPlayer, pQuest); @@ -246,7 +246,7 @@ bool QuestAccept_npc_paoka_swiftmountain(Player* pPlayer, Creature* pCreature, c if (pQuest->GetQuestId() == QUEST_HOMEWARD) { DoScriptText(SAY_START, pCreature, pPlayer); - pCreature->setFaction(FACTION_ESCORT_H_NEUTRAL_ACTIVE); + pCreature->SetFactionTemporary(FACTION_ESCORT_H_NEUTRAL_ACTIVE, TEMPFACTION_RESTORE_RESPAWN); if (npc_paoka_swiftmountainAI* pEscortAI = dynamic_cast(pCreature->AI())) pEscortAI->Start(false, pPlayer, pQuest); @@ -272,20 +272,15 @@ struct MANGOS_DLL_DECL npc_plucky_johnsonAI : public ScriptedAI { npc_plucky_johnsonAI(Creature* pCreature) : ScriptedAI(pCreature) { - m_uiNormFaction = pCreature->getFaction(); Reset(); } - uint32 m_uiNormFaction; uint32 m_uiResetTimer; void Reset() override { m_uiResetTimer = 120000; - if (m_creature->getFaction() != m_uiNormFaction) - m_creature->setFaction(m_uiNormFaction); - if (m_creature->HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP)) m_creature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); @@ -298,7 +293,7 @@ struct MANGOS_DLL_DECL npc_plucky_johnsonAI : public ScriptedAI { if (uiTextEmote == TEXTEMOTE_BECKON) { - m_creature->setFaction(FACTION_FRIENDLY); + m_creature->SetFactionTemporary(FACTION_FRIENDLY, TEMPFACTION_RESTORE_RESPAWN | TEMPFACTION_RESTORE_COMBAT_STOP); m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); m_creature->CastSpell(m_creature, SPELL_PLUCKY_HUMAN, false); } @@ -310,7 +305,7 @@ struct MANGOS_DLL_DECL npc_plucky_johnsonAI : public ScriptedAI return; else { - m_creature->setFaction(FACTION_FRIENDLY); + m_creature->SetFactionTemporary(FACTION_FRIENDLY, TEMPFACTION_RESTORE_RESPAWN | TEMPFACTION_RESTORE_COMBAT_STOP); m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); m_creature->CastSpell(m_creature, SPELL_PLUCKY_HUMAN, false); m_creature->HandleEmote(EMOTE_ONESHOT_WAVE); diff --git a/scripts/kalimdor/ungoro_crater.cpp b/scripts/kalimdor/ungoro_crater.cpp index 1c5e76c9b..d4a404183 100644 --- a/scripts/kalimdor/ungoro_crater.cpp +++ b/scripts/kalimdor/ungoro_crater.cpp @@ -98,9 +98,9 @@ bool QuestAccept_npc_ame01(Player* pPlayer, Creature* pCreature, const Quest* pQ pCreature->SetStandState(UNIT_STAND_STATE_STAND); if (pPlayer->GetTeam() == ALLIANCE) - pCreature->setFaction(FACTION_ESCORT_A_PASSIVE); + pCreature->SetFactionTemporary(FACTION_ESCORT_A_PASSIVE, TEMPFACTION_RESTORE_RESPAWN); else if (pPlayer->GetTeam() == HORDE) - pCreature->setFaction(FACTION_ESCORT_H_PASSIVE); + pCreature->SetFactionTemporary(FACTION_ESCORT_H_PASSIVE, TEMPFACTION_RESTORE_RESPAWN); pAmeAI->Start(false, pPlayer, pQuest); } diff --git a/scripts/kalimdor/wailing_caverns/wailing_caverns.cpp b/scripts/kalimdor/wailing_caverns/wailing_caverns.cpp index d3e1bfc05..4a15105f8 100644 --- a/scripts/kalimdor/wailing_caverns/wailing_caverns.cpp +++ b/scripts/kalimdor/wailing_caverns/wailing_caverns.cpp @@ -473,7 +473,7 @@ bool GossipSelect_npc_disciple_of_naralex(Player* pPlayer, Creature* pCreature, if (npc_disciple_of_naralexAI* pEscortAI = dynamic_cast(pCreature->AI())) { pEscortAI->Start(false, pPlayer); // Note: after 4.0.3 set him run = true - pCreature->setFaction(FACTION_ESCORT_N_ACTIVE); + pCreature->SetFactionTemporary(FACTION_ESCORT_N_ACTIVE, TEMPFACTION_RESTORE_RESPAWN); } pPlayer->CLOSE_GOSSIP_MENU(); } diff --git a/scripts/kalimdor/winterspring.cpp b/scripts/kalimdor/winterspring.cpp index 0c62f73b6..338065e36 100644 --- a/scripts/kalimdor/winterspring.cpp +++ b/scripts/kalimdor/winterspring.cpp @@ -429,7 +429,7 @@ bool QuestAccept_npc_ranshalla(Player* pPlayer, Creature* pCreature, const Quest if (pQuest->GetQuestId() == QUEST_GUARDIANS_ALTAR) { DoScriptText(SAY_QUEST_START, pCreature); - pCreature->setFaction(FACTION_ESCORT_A_NEUTRAL_PASSIVE); + pCreature->SetFactionTemporary(FACTION_ESCORT_A_NEUTRAL_PASSIVE, TEMPFACTION_RESTORE_RESPAWN); if (npc_ranshallaAI* pEscortAI = dynamic_cast(pCreature->AI())) pEscortAI->Start(false, pPlayer, pQuest, true); diff --git a/scripts/kalimdor/zulfarrak/zulfarrak.cpp b/scripts/kalimdor/zulfarrak/zulfarrak.cpp index 4dc73facd..49abe00c5 100644 --- a/scripts/kalimdor/zulfarrak/zulfarrak.cpp +++ b/scripts/kalimdor/zulfarrak/zulfarrak.cpp @@ -63,8 +63,6 @@ struct MANGOS_DLL_DECL npc_sergeant_blyAI : public ScriptedAI m_uiShieldBashTimer = 5000; m_uiRevengeTimer = 8000; - m_creature->setFaction(FACTION_FRIENDLY); - /*if (m_pInstance) m_pInstance->SetData(0, NOT_STARTED);*/ } @@ -131,7 +129,7 @@ bool GossipSelect_npc_sergeant_bly(Player* pPlayer, Creature* pCreature, uint32 if (uiAction == GOSSIP_ACTION_INFO_DEF + 1) { pPlayer->CLOSE_GOSSIP_MENU(); - pCreature->setFaction(FACTION_HOSTILE); + pCreature->SetFactionTemporary(FACTION_HOSTILE, TEMPFACTION_RESTORE_COMBAT_STOP | TEMPFACTION_RESTORE_RESPAWN); pCreature->AI()->AttackStart(pPlayer); } return true; diff --git a/scripts/northrend/borean_tundra.cpp b/scripts/northrend/borean_tundra.cpp index a8be8e712..8d207a6e4 100644 --- a/scripts/northrend/borean_tundra.cpp +++ b/scripts/northrend/borean_tundra.cpp @@ -505,7 +505,7 @@ bool QuestAccept_npc_lurgglbr(Player* pPlayer, Creature* pCreature, const Quest* { if (npc_lurgglbrAI* pEscortAI = dynamic_cast(pCreature->AI())) { - pCreature->setFaction(FACTION_ESCORT_N_NEUTRAL_PASSIVE); + pCreature->SetFactionTemporary(FACTION_ESCORT_N_NEUTRAL_PASSIVE, TEMPFACTION_RESTORE_RESPAWN); pEscortAI->Start(false, pPlayer, pQuest); } } diff --git a/scripts/northrend/howling_fjord.cpp b/scripts/northrend/howling_fjord.cpp index 462288e6d..fd639d98b 100644 --- a/scripts/northrend/howling_fjord.cpp +++ b/scripts/northrend/howling_fjord.cpp @@ -291,9 +291,6 @@ struct MANGOS_DLL_DECL npc_silvermoon_harryAI : public ScriptedAI m_uiBlastWaveTimer = 7 * IN_MILLISECONDS; m_uiResetBeatenTimer = MINUTE * IN_MILLISECONDS; - - if (m_creature->getFaction() != m_creature->GetCreatureInfo()->faction_A) - m_creature->setFaction(m_creature->GetCreatureInfo()->faction_A); } void AttackedBy(Unit* pAttacker) override @@ -319,9 +316,6 @@ struct MANGOS_DLL_DECL npc_silvermoon_harryAI : public ScriptedAI m_creature->DeleteThreatList(); m_creature->CombatStop(true); - if (m_creature->getFaction() != m_creature->GetCreatureInfo()->faction_A) - m_creature->setFaction(m_creature->GetCreatureInfo()->faction_A); - DoScriptText(SAY_BEATEN, m_creature); m_bHarryBeaten = true; } @@ -407,7 +401,7 @@ bool GossipSelect_npc_silvermoon_harry(Player* pPlayer, Creature* pCreature, uin pPlayer->CLOSE_GOSSIP_MENU(); DoScriptText(SAY_AGGRO, pCreature, pPlayer); - pCreature->setFaction(FACTION_HOSTILE_SH); + pCreature->SetFactionTemporary(FACTION_HOSTILE_SH, TEMPFACTION_RESTORE_RESPAWN | TEMPFACTION_RESTORE_COMBAT_STOP); pCreature->AI()->AttackStart(pPlayer); break; case GOSSIP_ACTION_INFO_DEF+2: diff --git a/scripts/outland/hellfire_peninsula.cpp b/scripts/outland/hellfire_peninsula.cpp index 1a536e7e3..2765095e9 100644 --- a/scripts/outland/hellfire_peninsula.cpp +++ b/scripts/outland/hellfire_peninsula.cpp @@ -74,7 +74,7 @@ struct MANGOS_DLL_DECL npc_aeranasAI : public ScriptedAI { if (m_uiFactionTimer <= uiDiff) { - m_creature->setFaction(FACTION_HOSTILE); + m_creature->SetFactionTemporary(FACTION_HOSTILE, TEMPFACTION_RESTORE_RESPAWN | TEMPFACTION_RESTORE_COMBAT_STOP); m_uiFactionTimer = 0; } else @@ -86,7 +86,6 @@ struct MANGOS_DLL_DECL npc_aeranasAI : public ScriptedAI if (m_creature->GetHealthPercent() < 30.0f) { - m_creature->setFaction(FACTION_FRIENDLY); m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER); m_creature->RemoveAllAuras(); m_creature->DeleteThreatList(); @@ -432,7 +431,7 @@ bool QuestAccept_npc_wounded_blood_elf(Player* pPlayer, Creature* pCreature, con if (pQuest->GetQuestId() == QUEST_ROAD_TO_FALCON_WATCH) { // Change faction so mobs attack - pCreature->setFaction(FACTION_ESCORT_H_PASSIVE); + pCreature->SetFactionTemporary(FACTION_ESCORT_H_PASSIVE, TEMPFACTION_RESTORE_RESPAWN); if (npc_wounded_blood_elfAI* pEscortAI = dynamic_cast(pCreature->AI())) pEscortAI->Start(false, pPlayer, pQuest); diff --git a/scripts/outland/nagrand.cpp b/scripts/outland/nagrand.cpp index 8bf6c1c86..adc3040a1 100644 --- a/scripts/outland/nagrand.cpp +++ b/scripts/outland/nagrand.cpp @@ -284,7 +284,7 @@ bool QuestAccept_npc_maghar_captive(Player* pPlayer, Creature* pCreature, const if (npc_maghar_captiveAI* pEscortAI = dynamic_cast(pCreature->AI())) { pCreature->SetStandState(UNIT_STAND_STATE_STAND); - pCreature->setFaction(FACTION_ESCORT_H_NEUTRAL_ACTIVE); + pCreature->SetFactionTemporary(FACTION_ESCORT_H_NEUTRAL_ACTIVE, TEMPFACTION_RESTORE_RESPAWN); pEscortAI->Start(false, pPlayer, pQuest); diff --git a/scripts/outland/netherstorm.cpp b/scripts/outland/netherstorm.cpp index 88e7c24ce..05a639011 100644 --- a/scripts/outland/netherstorm.cpp +++ b/scripts/outland/netherstorm.cpp @@ -669,8 +669,7 @@ bool QuestAccept_npc_bessy(Player* pPlayer, Creature* pCreature, const Quest* pQ { if (pQuest->GetQuestId() == QUEST_COWS_COME_HOME) { - pCreature->setFaction(FACTION_ESCORT_N_NEUTRAL_PASSIVE); - pCreature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + pCreature->SetFactionTemporary(FACTION_ESCORT_N_NEUTRAL_PASSIVE, TEMPFACTION_RESTORE_RESPAWN | TEMPFACTION_TOGGLE_NON_ATTACKABLE); if (npc_bessyAI* pBessyAI = dynamic_cast(pCreature->AI())) pBessyAI->Start(true, pPlayer, pQuest); @@ -719,14 +718,7 @@ struct MANGOS_DLL_DECL npc_maxx_a_million_escortAI : public npc_escortAI // Reset fields, that were changed on escort-start m_creature->HandleEmote(EMOTE_STATE_STUN); - // Faction is reset with npc_escortAI::JustRespawned(); - - // Unclear how these flags are set/removed in relation to the faction change at start of escort. - // Workaround here, so that the flags are removed during escort (and while not in evade mode) - m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE + UNIT_FLAG_PASSIVE); } - else - m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE); } void WaypointReached(uint32 uiPoint) override @@ -835,11 +827,9 @@ bool QuestAccept_npc_maxx_a_million(Player* pPlayer, Creature* pCreature, const if (npc_maxx_a_million_escortAI* pEscortAI = dynamic_cast(pCreature->AI())) { // Set Faction to Escort Faction - pCreature->setFaction(FACTION_ESCORT_N_NEUTRAL_PASSIVE); + pCreature->SetFactionTemporary(FACTION_ESCORT_N_NEUTRAL_PASSIVE, TEMPFACTION_RESTORE_RESPAWN | TEMPFACTION_TOGGLE_OOC_NOT_ATTACK | TEMPFACTION_TOGGLE_PASSIVE); // Set emote-state to 0 (is EMOTE_STATE_STUN by default) pCreature->HandleEmote(EMOTE_ONESHOT_NONE); - // Remove unit_flags (see comment in JustReachedHome) - pCreature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE + UNIT_FLAG_PASSIVE); pEscortAI->Start(false, pPlayer, pQuest, true); } diff --git a/scripts/outland/shadowmoon_valley.cpp b/scripts/outland/shadowmoon_valley.cpp index b5c9e29ee..b70314017 100644 --- a/scripts/outland/shadowmoon_valley.cpp +++ b/scripts/outland/shadowmoon_valley.cpp @@ -603,7 +603,7 @@ bool QuestAccept_npc_wilda(Player* pPlayer, Creature* pCreature, const Quest* pQ if (pQuest->GetQuestId() == QUEST_ESCAPE_COILSCAR) { DoScriptText(SAY_WIL_START, pCreature, pPlayer); - pCreature->setFaction(FACTION_EARTHEN); + pCreature->SetFactionTemporary(FACTION_EARTHEN, TEMPFACTION_RESTORE_RESPAWN); if (npc_wildaAI* pEscortAI = dynamic_cast(pCreature->AI())) pEscortAI->Start(false, pPlayer, pQuest); diff --git a/scripts/outland/terokkar_forest.cpp b/scripts/outland/terokkar_forest.cpp index 382fca4cf..5679ccec1 100644 --- a/scripts/outland/terokkar_forest.cpp +++ b/scripts/outland/terokkar_forest.cpp @@ -273,7 +273,7 @@ bool QuestAccept_npc_akuno(Player* pPlayer, Creature* pCreature, const Quest* pQ if (npc_akunoAI* pEscortAI = dynamic_cast(pCreature->AI())) { pCreature->SetStandState(UNIT_STAND_STATE_STAND); - pCreature->setFaction(FACTION_ESCORT_N_NEUTRAL_ACTIVE); + pCreature->SetFactionTemporary(FACTION_ESCORT_N_NEUTRAL_ACTIVE, TEMPFACTION_RESTORE_RESPAWN); DoScriptText(SAY_AKU_START, pCreature); pEscortAI->Start(false, pPlayer, pQuest); @@ -564,7 +564,7 @@ bool QuestAccept_npc_letoll(Player* pPlayer, Creature* pCreature, const Quest* p if (npc_letollAI* pEscortAI = dynamic_cast(pCreature->AI())) { DoScriptText(SAY_LE_START, pCreature); - pCreature->setFaction(FACTION_ESCORT_N_NEUTRAL_PASSIVE); + pCreature->SetFactionTemporary(FACTION_ESCORT_N_NEUTRAL_PASSIVE, TEMPFACTION_RESTORE_RESPAWN); pEscortAI->Start(false, pPlayer, pQuest, true); } @@ -888,7 +888,7 @@ bool QuestAccept_npc_isla_starmane(Player* pPlayer, Creature* pCreature, const Q { if (npc_isla_starmaneAI* pEscortAI = dynamic_cast(pCreature->AI())) { - pCreature->setFaction(pPlayer->GetTeam() == ALLIANCE ? FACTION_ESCORT_A_NEUTRAL_ACTIVE : FACTION_ESCORT_H_NEUTRAL_ACTIVE); + pCreature->SetFactionTemporary(pPlayer->GetTeam() == ALLIANCE ? FACTION_ESCORT_A_NEUTRAL_ACTIVE : FACTION_ESCORT_H_NEUTRAL_ACTIVE, TEMPFACTION_RESTORE_RESPAWN); pEscortAI->Start(false, pPlayer, pQuest); } } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 763926f41..e6b67cbb1 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2767" + #define SD2_REVISION_NR "2768" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index b37fe8715..95b572ab1 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -3,7 +3,7 @@ -- DELETE FROM sd2_db_version; -INSERT INTO sd2_db_version (version) VALUES ('ScriptDev2 (for C-MaNGOS 12280+) '); +INSERT INTO sd2_db_version (version) VALUES ('ScriptDev2 (for C-MaNGOS 12292+) '); -- -- Below contains data for table `script_texts` mainly used in C++ parts. diff --git a/sql/updates/r2768_scriptdev2.sql b/sql/updates/r2768_scriptdev2.sql new file mode 100644 index 000000000..4ea4d2ae3 --- /dev/null +++ b/sql/updates/r2768_scriptdev2.sql @@ -0,0 +1 @@ +UPDATE sd2_db_version SET version='ScriptDev2 (for C-MaNGOS 12292+) '; From 568de8ca78b7bca1d59eaf16ad79004846a4977e Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Fri, 7 Dec 2012 19:31:08 +0100 Subject: [PATCH 0766/1172] [2769] Fix various warnings --- base/escort_ai.cpp | 11 +++---- base/escort_ai.h | 2 +- base/follower_ai.cpp | 5 ++- base/guard_ai.h | 2 +- include/sc_creature.h | 32 +++++++++---------- include/sc_instance.cpp | 18 +++++------ include/sc_instance.h | 4 +-- scripts/eastern_kingdoms/arathi_highlands.cpp | 2 +- .../blackrock_depths/blackrock_depths.cpp | 2 +- .../boss_emperor_dagran_thaurissan.cpp | 2 +- .../instance_blackrock_depths.cpp | 3 +- .../boss_pyroguard_emberseer.cpp | 2 +- .../instance_blackrock_spire.cpp | 4 +-- .../boss_broodlord_lashlayer.cpp | 2 +- .../blackwing_lair/boss_chromaggus.cpp | 2 +- .../blackwing_lair/boss_ebonroc.cpp | 2 +- .../blackwing_lair/boss_firemaw.cpp | 2 +- .../blackwing_lair/boss_flamegor.cpp | 2 +- .../blackwing_lair/boss_nefarian.cpp | 2 +- .../blackwing_lair/boss_razorgore.cpp | 2 +- .../blackwing_lair/boss_vaelastrasz.cpp | 2 +- .../blackwing_lair/boss_victor_nefarius.cpp | 4 +-- scripts/eastern_kingdoms/eversong_woods.cpp | 2 +- .../gnomeregan/boss_thermaplugg.cpp | 4 +-- .../gnomeregan/gnomeregan.cpp | 2 +- .../karazhan/boss_curator.cpp | 4 +-- .../karazhan/boss_maiden_of_virtue.cpp | 4 +-- .../karazhan/boss_midnight.cpp | 4 +-- .../eastern_kingdoms/karazhan/boss_moroes.cpp | 4 +-- .../karazhan/boss_netherspite.cpp | 2 +- .../karazhan/boss_nightbane.cpp | 2 +- .../karazhan/boss_prince_malchezaar.cpp | 4 +-- .../karazhan/boss_shade_of_aran.cpp | 2 +- .../karazhan/boss_terestian_illhoof.cpp | 4 +-- .../karazhan/bosses_opera.cpp | 22 ++++++------- .../karazhan/instance_karazhan.cpp | 4 +-- .../boss_felblood_kaelthas.cpp | 2 +- .../boss_priestess_delrissa.cpp | 8 ++--- .../boss_selin_fireheart.cpp | 10 +++--- .../magisters_terrace/boss_vexallus.cpp | 10 +++--- .../magisters_terrace/magisters_terrace.cpp | 2 +- .../molten_core/boss_baron_geddon.cpp | 2 +- .../molten_core/boss_garr.cpp | 2 +- .../molten_core/boss_gehennas.cpp | 2 +- .../molten_core/boss_golemagg.cpp | 2 +- .../molten_core/boss_lucifron.cpp | 2 +- .../molten_core/boss_magmadar.cpp | 2 +- .../molten_core/boss_majordomo_executus.cpp | 4 +-- .../molten_core/boss_ragnaros.cpp | 2 +- .../molten_core/boss_shazzrah.cpp | 2 +- .../molten_core/boss_sulfuron_harbinger.cpp | 2 +- .../molten_core/instance_molten_core.cpp | 12 +++++++ .../molten_core/molten_core.h | 12 ------- .../scarlet_enclave/ebon_hold.cpp | 17 +++++----- .../boss_headless_horseman.cpp | 4 +-- .../scarlet_monastery/boss_herod.cpp | 4 +-- .../boss_mograine_and_whitemane.cpp | 4 +-- .../scholomance/instance_scholomance.cpp | 6 ++-- .../eastern_kingdoms/silverpine_forest.cpp | 2 +- .../sunken_temple/instance_sunken_temple.cpp | 8 ++--- .../sunwell_plateau/boss_brutallus.cpp | 2 +- .../sunwell_plateau/boss_eredar_twins.cpp | 8 ++--- .../sunwell_plateau/boss_felmyst.cpp | 4 +-- .../sunwell_plateau/boss_kalecgos.cpp | 6 ++-- .../sunwell_plateau/boss_kiljaeden.cpp | 2 +- .../sunwell_plateau/boss_muru.cpp | 2 +- .../instance_sunwell_plateau.cpp | 4 +-- .../uldaman/boss_archaedas.cpp | 4 +-- .../uldaman/instance_uldaman.cpp | 4 +-- .../eastern_kingdoms/zulaman/boss_akilzon.cpp | 4 +-- .../eastern_kingdoms/zulaman/boss_halazzi.cpp | 2 +- .../eastern_kingdoms/zulaman/boss_janalai.cpp | 4 +-- .../zulaman/boss_malacrass.cpp | 4 +-- .../zulaman/boss_nalorakk.cpp | 4 +-- .../eastern_kingdoms/zulaman/boss_zuljin.cpp | 11 +++---- .../eastern_kingdoms/zulgurub/boss_arlokk.cpp | 2 +- .../eastern_kingdoms/zulgurub/boss_jeklik.cpp | 2 +- .../zulgurub/boss_mandokir.cpp | 2 +- .../eastern_kingdoms/zulgurub/boss_marli.cpp | 2 +- .../eastern_kingdoms/zulgurub/boss_thekal.cpp | 2 +- .../zulgurub/boss_venoxis.cpp | 2 +- scripts/examples/example_creature.cpp | 4 +-- scripts/examples/example_escort.cpp | 4 +-- scripts/examples/example_gossip_codebox.cpp | 2 +- scripts/examples/example_misc.cpp | 6 ++-- .../dark_portal/boss_aeonus.cpp | 4 +-- .../dark_portal/boss_chrono_lord_deja.cpp | 2 +- .../dark_portal/boss_temporus.cpp | 4 +-- .../dark_portal/dark_portal.cpp | 8 ++--- .../caverns_of_time/dark_portal/dark_portal.h | 3 +- .../dark_portal/instance_dark_portal.cpp | 6 ++-- .../kalimdor/caverns_of_time/hyjal/hyjalAI.h | 2 +- .../old_hillsbrad/instance_old_hillsbrad.cpp | 2 +- .../old_hillsbrad/old_hillsbrad.cpp | 4 +-- scripts/kalimdor/desolace.cpp | 6 ++-- scripts/kalimdor/felwood.cpp | 2 +- scripts/kalimdor/moonglade.cpp | 2 +- scripts/kalimdor/onyxias_lair/boss_onyxia.cpp | 13 +++++--- .../kalimdor/ruins_of_ahnqiraj/boss_buru.cpp | 2 +- .../ruins_of_ahnqiraj/boss_ossirian.cpp | 4 +-- .../ruins_of_ahnqiraj/boss_rajaxx.cpp | 7 ++-- scripts/kalimdor/silithus.cpp | 2 +- .../temple_of_ahnqiraj/boss_bug_trio.cpp | 4 +-- .../temple_of_ahnqiraj/boss_cthun.cpp | 2 +- .../temple_of_ahnqiraj/boss_fankriss.cpp | 2 +- .../temple_of_ahnqiraj/boss_huhuran.cpp | 2 +- .../kalimdor/temple_of_ahnqiraj/boss_ouro.cpp | 2 +- .../temple_of_ahnqiraj/boss_sartura.cpp | 4 +-- .../temple_of_ahnqiraj/boss_skeram.cpp | 4 +-- .../temple_of_ahnqiraj/boss_twinemperors.cpp | 6 ++-- .../temple_of_ahnqiraj/boss_viscidus.cpp | 2 +- .../instance_temple_of_ahnqiraj.cpp | 6 ++-- .../mob_anubisath_sentinel.cpp | 2 +- .../azjol-nerub/ahnkahet/boss_amanitar.cpp | 2 +- .../azjol-nerub/ahnkahet/boss_jedoga.cpp | 4 +-- .../azjol-nerub/ahnkahet/boss_nadox.cpp | 4 +-- .../azjol-nerub/ahnkahet/boss_taldaram.cpp | 4 +-- .../azjol-nerub/ahnkahet/boss_volazj.cpp | 4 +-- .../ahnkahet/instance_ahnkahet.cpp | 4 +-- .../azjol-nerub/azjol-nerub/boss_anubarak.cpp | 4 +-- .../azjol-nerub/azjol-nerub/boss_hadronox.cpp | 2 +- .../azjol-nerub/azjol-nerub/boss_krikthir.cpp | 4 +-- .../azjol-nerub/instance_azjol-nerub.cpp | 4 +-- .../boss_anubarak_trial.cpp | 2 +- .../trial_of_the_crusader/boss_jaraxxus.cpp | 2 +- .../northrend/draktharon_keep/boss_novos.cpp | 4 +-- .../draktharon_keep/boss_tharonja.cpp | 4 +-- .../draktharon_keep/boss_trollgore.cpp | 2 +- scripts/northrend/gundrak/boss_colossus.cpp | 6 ++-- scripts/northrend/gundrak/boss_eck.cpp | 2 +- scripts/northrend/gundrak/boss_galdarah.cpp | 4 +-- scripts/northrend/gundrak/boss_moorabi.cpp | 4 +-- scripts/northrend/gundrak/boss_sladran.cpp | 4 +-- .../forge_of_souls/boss_bronjahm.cpp | 4 +-- .../forge_of_souls/boss_devourer_of_souls.cpp | 2 +- .../boss_forgemaster_garfrost.cpp | 2 +- .../icecrown_citadel/blood_prince_council.cpp | 8 ++--- .../boss_blood_queen_lanathel.cpp | 4 +-- .../boss_deathbringer_saurfang.cpp | 5 ++- .../icecrown_citadel/boss_festergut.cpp | 4 +-- .../boss_lady_deathwhisper.cpp | 2 +- .../icecrown_citadel/boss_lord_marrowgar.cpp | 2 +- .../boss_professor_putricide.cpp | 4 +-- .../icecrown_citadel/boss_rotface.cpp | 2 +- .../icecrown_citadel/boss_sindragosa.cpp | 8 ++--- .../icecrown_citadel/boss_the_lich_king.cpp | 2 +- .../boss_valithria_dreamwalker.cpp | 2 +- .../northrend/naxxramas/boss_anubrekhan.cpp | 2 +- scripts/northrend/naxxramas/boss_faerlina.cpp | 4 +-- .../naxxramas/boss_four_horsemen.cpp | 16 +++++----- scripts/northrend/naxxramas/boss_gluth.cpp | 2 +- scripts/northrend/naxxramas/boss_gothik.cpp | 2 +- .../northrend/naxxramas/boss_grobbulus.cpp | 5 ++- scripts/northrend/naxxramas/boss_heigan.cpp | 4 +-- .../northrend/naxxramas/boss_kelthuzad.cpp | 2 +- scripts/northrend/naxxramas/boss_loatheb.cpp | 2 +- scripts/northrend/naxxramas/boss_maexxna.cpp | 4 +-- scripts/northrend/naxxramas/boss_noth.cpp | 4 +-- .../northrend/naxxramas/boss_patchwerk.cpp | 4 +-- .../northrend/naxxramas/boss_razuvious.cpp | 2 +- .../northrend/naxxramas/boss_sapphiron.cpp | 2 +- scripts/northrend/naxxramas/boss_thaddius.cpp | 6 ++-- .../naxxramas/instance_naxxramas.cpp | 4 +-- .../nexus/eye_of_eternity/boss_malygos.cpp | 6 ++-- .../northrend/nexus/nexus/boss_anomalus.cpp | 4 +-- .../nexus/nexus/boss_keristrasza.cpp | 4 +-- .../northrend/nexus/nexus/boss_ormorok.cpp | 4 +-- .../northrend/nexus/nexus/boss_telestra.cpp | 4 +-- .../northrend/nexus/oculus/boss_eregos.cpp | 4 +-- scripts/northrend/nexus/oculus/boss_urom.cpp | 4 +-- .../obsidian_sanctum/boss_sartharion.cpp | 14 ++++---- .../northrend/ruby_sanctum/boss_baltharus.cpp | 2 +- .../northrend/ruby_sanctum/boss_saviana.cpp | 2 +- .../ruby_sanctum/boss_zarithrian.cpp | 2 +- .../halls_of_lightning/boss_bjarngrim.cpp | 4 +-- .../ulduar/halls_of_lightning/boss_loken.cpp | 4 +-- .../halls_of_lightning/boss_volkhan.cpp | 4 +-- .../halls_of_stone/boss_maiden_of_grief.cpp | 4 +-- .../ulduar/halls_of_stone/boss_sjonnir.cpp | 4 +-- .../ulduar/halls_of_stone/halls_of_stone.cpp | 4 +-- .../ulduar/ulduar/assembly_of_iron.cpp | 12 +++---- .../northrend/ulduar/ulduar/boss_auriaya.cpp | 6 ++-- .../ulduar/ulduar/boss_general_vezax.cpp | 4 +-- .../utgarde_keep/utgarde_keep/boss_ingvar.cpp | 4 +-- .../utgarde_keep/boss_keleseth.cpp | 4 +-- .../boss_skarvald_and_dalronn.cpp | 6 ++-- .../utgarde_keep/utgarde_keep.cpp | 2 +- .../utgarde_pinnacle/boss_gortok.cpp | 4 +-- .../utgarde_pinnacle/boss_skadi.cpp | 4 +-- .../utgarde_pinnacle/boss_svala.cpp | 2 +- .../utgarde_pinnacle/boss_ymiron.cpp | 4 +-- scripts/northrend/violet_hold/boss_erekem.cpp | 6 ++-- .../northrend/violet_hold/boss_ichoron.cpp | 2 +- .../violet_hold/instance_violet_hold.cpp | 12 +++---- .../auchenai_crypts/boss_exarch_maladaar.cpp | 6 ++-- .../mana_tombs/boss_nexusprince_shaffar.cpp | 4 +-- .../mana_tombs/boss_pandemonius.cpp | 4 +-- .../auchindoun/sethekk_halls/boss_anzu.cpp | 2 +- .../sethekk_halls/boss_darkweaver_syth.cpp | 4 +-- .../sethekk_halls/boss_talon_king_ikiss.cpp | 2 +- .../boss_ambassador_hellmaw.cpp | 4 +-- .../boss_blackheart_the_inciter.cpp | 4 +-- .../boss_grandmaster_vorpil.cpp | 4 +-- .../outland/black_temple/boss_bloodboil.cpp | 4 +-- scripts/outland/black_temple/boss_illidan.cpp | 7 ++-- .../black_temple/boss_mother_shahraz.cpp | 4 +-- .../black_temple/boss_reliquary_of_souls.cpp | 12 +++---- .../black_temple/boss_shade_of_akama.cpp | 8 ++--- .../outland/black_temple/boss_supremus.cpp | 2 +- .../black_temple/boss_teron_gorefiend.cpp | 2 +- .../black_temple/boss_warlord_najentus.cpp | 4 +-- .../outland/black_temple/illidari_council.cpp | 10 +++--- scripts/outland/boss_doomlord_kazzak.cpp | 2 +- scripts/outland/boss_doomwalker.cpp | 2 +- .../boss_fathomlord_karathress.cpp | 10 +++--- .../boss_hydross_the_unstable.cpp | 4 +-- .../serpent_shrine/boss_lady_vashj.cpp | 4 +-- .../boss_leotheras_the_blind.cpp | 2 +- .../boss_morogrim_tidewalker.cpp | 4 +-- .../steam_vault/boss_hydromancer_thespia.cpp | 4 +-- .../boss_mekgineer_steamrigger.cpp | 4 +-- .../steam_vault/boss_warlord_kalithresh.cpp | 4 +-- .../underbog/boss_hungarfen.cpp | 2 +- scripts/outland/gruuls_lair/boss_gruul.cpp | 4 +-- .../gruuls_lair/boss_high_king_maulgar.cpp | 4 +-- .../boss_kelidan_the_breaker.cpp | 4 +-- .../blood_furnace/boss_the_maker.cpp | 4 +-- .../boss_nazan_and_vazruden.cpp | 6 ++-- .../boss_omor_the_unscarred.cpp | 4 +-- .../boss_watchkeeper_gargolmar.cpp | 4 +-- .../magtheridons_lair/boss_magtheridon.cpp | 6 ++-- .../instance_magtheridons_lair.cpp | 4 +-- .../shattered_halls/boss_nethekurse.cpp | 4 +-- .../boss_warbringer_omrogg.cpp | 4 +-- .../boss_warchief_kargath_bladefist.cpp | 2 +- scripts/outland/netherstorm.cpp | 2 +- .../tempest_keep/arcatraz/arcatraz.cpp | 4 +-- .../tempest_keep/arcatraz/boss_dalliah.cpp | 2 +- .../arcatraz/boss_harbinger_skyriss.cpp | 2 +- .../arcatraz/boss_soccothrates.cpp | 2 +- .../arcatraz/instance_arcatraz.cpp | 2 +- .../botanica/boss_high_botanist_freywinn.cpp | 4 +-- .../botanica/boss_warp_splinter.cpp | 4 +-- .../tempest_keep/the_eye/boss_alar.cpp | 2 +- .../tempest_keep/the_eye/boss_astromancer.cpp | 2 +- .../tempest_keep/the_eye/boss_kaelthas.cpp | 10 +++--- .../tempest_keep/the_eye/boss_void_reaver.cpp | 5 ++- .../boss_nethermancer_sepethrea.cpp | 4 +-- .../boss_pathaleon_the_calculator.cpp | 4 +-- scripts/world/mob_generic_creature.cpp | 2 ++ sd2_revision_nr.h | 2 +- 251 files changed, 526 insertions(+), 536 deletions(-) diff --git a/base/escort_ai.cpp b/base/escort_ai.cpp index 7514f8ebe..90bf429ae 100644 --- a/base/escort_ai.cpp +++ b/base/escort_ai.cpp @@ -22,12 +22,11 @@ enum }; npc_escortAI::npc_escortAI(Creature* pCreature) : ScriptedAI(pCreature), - m_playerGuid(), - m_uiPlayerCheckTimer(1000), m_uiWPWaitTimer(2500), + m_uiPlayerCheckTimer(1000), m_uiEscortState(STATE_ESCORT_NONE), - m_bIsRunning(false), m_pQuestForEscort(NULL), + m_bIsRunning(false), m_bCanInstantRespawn(false), m_bCanReturnToStart(false) {} @@ -91,9 +90,7 @@ void npc_escortAI::EnterCombat(Unit* pEnemy) Aggro(pEnemy); } -void npc_escortAI::Aggro(Unit* pEnemy) -{ -} +void npc_escortAI::Aggro(Unit* /*pEnemy*/) {} // see followerAI bool npc_escortAI::AssistPlayerInCombat(Unit* pWho) @@ -171,7 +168,7 @@ void npc_escortAI::MoveInLineOfSight(Unit* pWho) } } -void npc_escortAI::JustDied(Unit* pKiller) +void npc_escortAI::JustDied(Unit* /*pKiller*/) { if (!HasEscortState(STATE_ESCORT_ESCORTING) || !m_playerGuid || !m_pQuestForEscort) return; diff --git a/base/escort_ai.h b/base/escort_ai.h index 04660d4ac..ca4f5a92e 100644 --- a/base/escort_ai.h +++ b/base/escort_ai.h @@ -66,7 +66,7 @@ struct MANGOS_DLL_DECL npc_escortAI : public ScriptedAI // void AddWaypoint(uint32 id, float x, float y, float z, uint32 WaitTimeMs = 0); virtual void WaypointReached(uint32 uiPointId) = 0; - virtual void WaypointStart(uint32 uiPointId) {} + virtual void WaypointStart(uint32 /*uiPointId*/) {} void Start(bool bRun = false, const Player* pPlayer = NULL, const Quest* pQuest = NULL, bool bInstantRespawn = false, bool bCanLoopPath = false); diff --git a/base/follower_ai.cpp b/base/follower_ai.cpp index faac23877..57e66f2d4 100644 --- a/base/follower_ai.cpp +++ b/base/follower_ai.cpp @@ -20,10 +20,9 @@ enum }; FollowerAI::FollowerAI(Creature* pCreature) : ScriptedAI(pCreature), - m_leaderGuid(), - m_pQuestForFollow(NULL), m_uiUpdateFollowTimer(2500), - m_uiFollowState(STATE_FOLLOW_NONE) + m_uiFollowState(STATE_FOLLOW_NONE), + m_pQuestForFollow(NULL) {} void FollowerAI::AttackStart(Unit* pWho) diff --git a/base/guard_ai.h b/base/guard_ai.h index c681ccb2a..4b650fea0 100644 --- a/base/guard_ai.h +++ b/base/guard_ai.h @@ -37,7 +37,7 @@ struct MANGOS_DLL_DECL guardAI : public ScriptedAI void Aggro(Unit* pWho) override; - void JustDied(Unit* pKiller) override; + void JustDied(Unit* /*pKiller*/) override; void UpdateAI(const uint32 uiDiff) override; diff --git a/include/sc_creature.h b/include/sc_creature.h index a45b6e9ee..d146f074a 100644 --- a/include/sc_creature.h +++ b/include/sc_creature.h @@ -73,40 +73,40 @@ struct MANGOS_DLL_DECL ScriptedAI : public CreatureAI // void HealBy(Unit* pHealer, uint32 uiAmountHealed) override {} // Called at any Damage to any victim (before damage apply) - void DamageDeal(Unit* pDoneTo, uint32& uiDamage) override {} + void DamageDeal(Unit* /*pDoneTo*/, uint32& /*uiDamage*/) override {} // Called at any Damage from any attacker (before damage apply) - void DamageTaken(Unit* pDealer, uint32& uiDamage) override {} + void DamageTaken(Unit* /*pDealer*/, uint32& /*uiDamage*/) override {} // Called at creature death - void JustDied(Unit* pKiller) override {} + void JustDied(Unit* /*pKiller*/) override {} // Called when the corpse of this creature gets removed - void CorpseRemoved(uint32& uiRespawnDelay) override {} + void CorpseRemoved(uint32& /*uiRespawnDelay*/) override {} // Called when a summoned creature is killed - void SummonedCreatureJustDied(Creature* pSummoned) override {} + void SummonedCreatureJustDied(Creature* /*pSummoned*/) override {} // Called at creature killing another unit - void KilledUnit(Unit* pVictim) override {} + void KilledUnit(Unit* /*pVictim*/) override {} // Called when owner of m_creature (if m_creature is PROTECTOR_PET) kills a unit - void OwnerKilledUnit(Unit* pVictim) override {} + void OwnerKilledUnit(Unit* /*pVictim*/) override {} // Called when the creature successfully summons a creature - void JustSummoned(Creature* pSummoned) override {} + void JustSummoned(Creature* /*pSummoned*/) override {} // Called when the creature successfully summons a gameobject - void JustSummoned(GameObject* pGo) override {} + void JustSummoned(GameObject* /*pGo*/) override {} // Called when a summoned creature gets TemporarySummon::UnSummon ed - void SummonedCreatureDespawn(Creature* pSummoned) override {} + void SummonedCreatureDespawn(Creature* /*pSummoned*/) override {} // Called when hit by a spell - void SpellHit(Unit* pCaster, const SpellEntry* pSpell) override {} + void SpellHit(Unit* /*pCaster*/, const SpellEntry* /*pSpell*/) override {} // Called when spell hits creature's target - void SpellHitTarget(Unit* pTarget, const SpellEntry* pSpell) override {} + void SpellHitTarget(Unit* /*pTarget*/, const SpellEntry* /*pSpell*/) override {} // Called when the creature is target of hostile action: swing, hostile spell landed, fear/etc) /// This will by default result in reattacking, if the creature has no victim @@ -116,13 +116,13 @@ struct MANGOS_DLL_DECL ScriptedAI : public CreatureAI void JustRespawned() override; // Called at waypoint reached or point movement finished - void MovementInform(uint32 uiMovementType, uint32 uiData) override {} + void MovementInform(uint32 /*uiMovementType*/, uint32 /*uiData*/) override {} // Called if a temporary summoned of m_creature reach a move point - void SummonedMovementInform(Creature* pSummoned, uint32 uiMotionType, uint32 uiData) override {} + void SummonedMovementInform(Creature* /*pSummoned*/, uint32 /*uiMotionType*/, uint32 /*uiData*/) override {} // Called at text emote receive from player - void ReceiveEmote(Player* pPlayer, uint32 uiEmote) override {} + void ReceiveEmote(Player* /*pPlayer*/, uint32 /*uiEmote*/) override {} // Called at each attack of m_creature by any victim void AttackStart(Unit* pWho) override; @@ -159,7 +159,7 @@ struct MANGOS_DLL_DECL ScriptedAI : public CreatureAI * This is a SD2 internal function * Called by default on creature EnterCombat with an enemy */ - virtual void Aggro(Unit*) {} + virtual void Aggro(Unit* /*pWho*/) {} // ************* // AI Helper Functions diff --git a/include/sc_instance.cpp b/include/sc_instance.cpp index ce50257f9..481c358d2 100644 --- a/include/sc_instance.cpp +++ b/include/sc_instance.cpp @@ -203,14 +203,14 @@ void ScriptedInstance::DoStartTimedAchievement(AchievementCriteriaTypes criteria @param pDialogueArray The static const array of DialogueEntry holding the information about the dialogue. This array MUST be terminated by {0,0,0} */ DialogueHelper::DialogueHelper(DialogueEntry const* pDialogueArray) : - m_pDialogueArray(pDialogueArray), - m_pDialogueTwoSideArray(NULL), m_pInstance(NULL), + m_pDialogueArray(pDialogueArray), m_pCurrentEntry(NULL), + m_pDialogueTwoSideArray(NULL), m_pCurrentEntryTwoSide(NULL), m_uiTimer(0), - m_bCanSimulate(false), - m_bIsFirstSide(true) + m_bIsFirstSide(true), + m_bCanSimulate(false) {} /** @@ -219,14 +219,14 @@ DialogueHelper::DialogueHelper(DialogueEntry const* pDialogueArray) : @param pDialogueTwoSideArray The static const array of DialogueEntryTwoSide holding the information about the dialogue. This array MUST be terminated by {0,0,0,0,0} */ DialogueHelper::DialogueHelper(DialogueEntryTwoSide const* pDialogueTwoSideArray) : - m_pDialogueArray(NULL), - m_pDialogueTwoSideArray(pDialogueTwoSideArray), m_pInstance(NULL), + m_pDialogueArray(NULL), m_pCurrentEntry(NULL), + m_pDialogueTwoSideArray(pDialogueTwoSideArray), m_pCurrentEntryTwoSide(NULL), m_uiTimer(0), - m_bCanSimulate(false), - m_bIsFirstSide(true) + m_bIsFirstSide(true), + m_bCanSimulate(false) {} /** @@ -277,7 +277,7 @@ void DialogueHelper::StartNextDialogueText(int32 iTextEntry) void DialogueHelper::DoNextDialogueStep() { // Last Dialogue Entry done? - if (m_pCurrentEntry && !m_pCurrentEntry->iTextEntry || m_pCurrentEntryTwoSide && !m_pCurrentEntryTwoSide->iTextEntry) + if ((m_pCurrentEntry && !m_pCurrentEntry->iTextEntry) || (m_pCurrentEntryTwoSide && !m_pCurrentEntryTwoSide->iTextEntry)) { m_uiTimer = 0; return; diff --git a/include/sc_instance.h b/include/sc_instance.h index 7e271a706..2bab4960e 100644 --- a/include/sc_instance.h +++ b/include/sc_instance.h @@ -113,9 +113,9 @@ class DialogueHelper protected: /// Will be called when a dialogue step was done - virtual void JustDidDialogueStep(int32 iEntry) {} + virtual void JustDidDialogueStep(int32 /*iEntry*/) {} /// Will be called to get a speaker, MUST be implemented if not used in instances - virtual Creature* GetSpeakerByEntry(uint32 uiEntry) { return NULL; } + virtual Creature* GetSpeakerByEntry(uint32 /*uiEntry*/) { return NULL; } private: void DoNextDialogueStep(); diff --git a/scripts/eastern_kingdoms/arathi_highlands.cpp b/scripts/eastern_kingdoms/arathi_highlands.cpp index ba432e42b..4e5e5ae11 100644 --- a/scripts/eastern_kingdoms/arathi_highlands.cpp +++ b/scripts/eastern_kingdoms/arathi_highlands.cpp @@ -85,7 +85,7 @@ struct MANGOS_DLL_DECL npc_professor_phizzlethorpeAI : public npc_escortAI } } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { DoScriptText(SAY_AGGRO, m_creature); } diff --git a/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.cpp b/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.cpp index e51ff3822..45f8659f0 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.cpp +++ b/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.cpp @@ -442,7 +442,7 @@ bool EffectDummyCreature_spell_banner_of_provocation(Unit* pCaster, uint32 uiSpe { instance_blackrock_depths* pInstance = (instance_blackrock_depths*)pCreatureTarget->GetInstanceData(); if (pInstance && pInstance->GetData(TYPE_RING_OF_LAW) != DONE && pInstance->GetData(TYPE_RING_OF_LAW) != SPECIAL) - pInstance->SetData(TYPE_RING_OF_LAW, pInstance->GetData(TYPE_RING_OF_LAW) == IN_PROGRESS ? SPECIAL : DATA_BANNER_BEFORE_EVENT); + pInstance->SetData(TYPE_RING_OF_LAW, pInstance->GetData(TYPE_RING_OF_LAW) == IN_PROGRESS ? uint32(SPECIAL) : uint32(DATA_BANNER_BEFORE_EVENT)); return true; } diff --git a/scripts/eastern_kingdoms/blackrock_depths/boss_emperor_dagran_thaurissan.cpp b/scripts/eastern_kingdoms/blackrock_depths/boss_emperor_dagran_thaurissan.cpp index b6ca6edd1..07bbc97fa 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/boss_emperor_dagran_thaurissan.cpp +++ b/scripts/eastern_kingdoms/blackrock_depths/boss_emperor_dagran_thaurissan.cpp @@ -76,7 +76,7 @@ struct MANGOS_DLL_DECL boss_emperor_dagran_thaurissanAI : public ScriptedAI } } - void KilledUnit(Unit* pVictim) override + void KilledUnit(Unit* /*pVictim*/) override { DoScriptText(SAY_SLAY, m_creature); } diff --git a/scripts/eastern_kingdoms/blackrock_depths/instance_blackrock_depths.cpp b/scripts/eastern_kingdoms/blackrock_depths/instance_blackrock_depths.cpp index 233ec2318..1bc29c1ce 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/instance_blackrock_depths.cpp +++ b/scripts/eastern_kingdoms/blackrock_depths/instance_blackrock_depths.cpp @@ -136,7 +136,8 @@ void instance_blackrock_depths::SetData(uint32 uiType, uint32 uiData) // Activate vault constructs for (GuidSet::const_iterator itr = m_sVaultNpcGuids.begin(); itr != m_sVaultNpcGuids.end(); ++itr) { - if (pConstruct = instance->GetCreature(*itr)) + pConstruct = instance->GetCreature(*itr); + if (pConstruct) pConstruct->RemoveAurasDueToSpell(SPELL_STONED); } diff --git a/scripts/eastern_kingdoms/blackrock_spire/boss_pyroguard_emberseer.cpp b/scripts/eastern_kingdoms/blackrock_spire/boss_pyroguard_emberseer.cpp index 0f1fb2897..d5d56e831 100644 --- a/scripts/eastern_kingdoms/blackrock_spire/boss_pyroguard_emberseer.cpp +++ b/scripts/eastern_kingdoms/blackrock_spire/boss_pyroguard_emberseer.cpp @@ -77,7 +77,7 @@ struct MANGOS_DLL_DECL boss_pyroguard_emberseerAI : public ScriptedAI m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { if (m_pInstance) m_pInstance->SetData(TYPE_EMBERSEER, DONE); diff --git a/scripts/eastern_kingdoms/blackrock_spire/instance_blackrock_spire.cpp b/scripts/eastern_kingdoms/blackrock_spire/instance_blackrock_spire.cpp index 2b6fa9e3a..f3c0772ca 100644 --- a/scripts/eastern_kingdoms/blackrock_spire/instance_blackrock_spire.cpp +++ b/scripts/eastern_kingdoms/blackrock_spire/instance_blackrock_spire.cpp @@ -81,8 +81,8 @@ static const DialogueEntry aStadiumDialogue[] = instance_blackrock_spire::instance_blackrock_spire(Map* pMap) : ScriptedInstance(pMap), DialogueHelper(aStadiumDialogue), m_uiStadiumEventTimer(0), - m_uiStadiumMobsAlive(0), - m_uiStadiumWaves(0) + m_uiStadiumWaves(0), + m_uiStadiumMobsAlive(0) { Initialize(); } diff --git a/scripts/eastern_kingdoms/blackwing_lair/boss_broodlord_lashlayer.cpp b/scripts/eastern_kingdoms/blackwing_lair/boss_broodlord_lashlayer.cpp index 074e7675c..b4c9c79c2 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/boss_broodlord_lashlayer.cpp +++ b/scripts/eastern_kingdoms/blackwing_lair/boss_broodlord_lashlayer.cpp @@ -66,7 +66,7 @@ struct MANGOS_DLL_DECL boss_broodlordAI : public ScriptedAI DoScriptText(SAY_AGGRO, m_creature); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { if (m_pInstance) m_pInstance->SetData(TYPE_LASHLAYER, DONE); diff --git a/scripts/eastern_kingdoms/blackwing_lair/boss_chromaggus.cpp b/scripts/eastern_kingdoms/blackwing_lair/boss_chromaggus.cpp index f4fd45415..26776bbae 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/boss_chromaggus.cpp +++ b/scripts/eastern_kingdoms/blackwing_lair/boss_chromaggus.cpp @@ -111,7 +111,7 @@ struct MANGOS_DLL_DECL boss_chromaggusAI : public ScriptedAI m_pInstance->SetData(TYPE_CHROMAGGUS, IN_PROGRESS); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { if (m_pInstance) m_pInstance->SetData(TYPE_CHROMAGGUS, DONE); diff --git a/scripts/eastern_kingdoms/blackwing_lair/boss_ebonroc.cpp b/scripts/eastern_kingdoms/blackwing_lair/boss_ebonroc.cpp index 26bd753c0..e96023747 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/boss_ebonroc.cpp +++ b/scripts/eastern_kingdoms/blackwing_lair/boss_ebonroc.cpp @@ -59,7 +59,7 @@ struct MANGOS_DLL_DECL boss_ebonrocAI : public ScriptedAI m_pInstance->SetData(TYPE_EBONROC, IN_PROGRESS); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { if (m_pInstance) m_pInstance->SetData(TYPE_EBONROC, DONE); diff --git a/scripts/eastern_kingdoms/blackwing_lair/boss_firemaw.cpp b/scripts/eastern_kingdoms/blackwing_lair/boss_firemaw.cpp index 122cabda4..c6d35ca5d 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/boss_firemaw.cpp +++ b/scripts/eastern_kingdoms/blackwing_lair/boss_firemaw.cpp @@ -59,7 +59,7 @@ struct MANGOS_DLL_DECL boss_firemawAI : public ScriptedAI m_pInstance->SetData(TYPE_FIREMAW, IN_PROGRESS); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { if (m_pInstance) m_pInstance->SetData(TYPE_FIREMAW, DONE); diff --git a/scripts/eastern_kingdoms/blackwing_lair/boss_flamegor.cpp b/scripts/eastern_kingdoms/blackwing_lair/boss_flamegor.cpp index 4b91331e3..7cb7b9331 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/boss_flamegor.cpp +++ b/scripts/eastern_kingdoms/blackwing_lair/boss_flamegor.cpp @@ -61,7 +61,7 @@ struct MANGOS_DLL_DECL boss_flamegorAI : public ScriptedAI m_pInstance->SetData(TYPE_FLAMEGOR, IN_PROGRESS); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { if (m_pInstance) m_pInstance->SetData(TYPE_FLAMEGOR, DONE); diff --git a/scripts/eastern_kingdoms/blackwing_lair/boss_nefarian.cpp b/scripts/eastern_kingdoms/blackwing_lair/boss_nefarian.cpp index bfd4054ec..9f0d195a6 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/boss_nefarian.cpp +++ b/scripts/eastern_kingdoms/blackwing_lair/boss_nefarian.cpp @@ -102,7 +102,7 @@ struct MANGOS_DLL_DECL boss_nefarianAI : public ScriptedAI DoScriptText(SAY_SLAY, m_creature, pVictim); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoScriptText(SAY_DEATH, m_creature); diff --git a/scripts/eastern_kingdoms/blackwing_lair/boss_razorgore.cpp b/scripts/eastern_kingdoms/blackwing_lair/boss_razorgore.cpp index bbddb5aad..ec0fc22b7 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/boss_razorgore.cpp +++ b/scripts/eastern_kingdoms/blackwing_lair/boss_razorgore.cpp @@ -81,7 +81,7 @@ struct MANGOS_DLL_DECL boss_razorgoreAI : public ScriptedAI m_pInstance->SetData(TYPE_RAZORGORE, IN_PROGRESS); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { if (m_pInstance) m_pInstance->SetData(TYPE_RAZORGORE, DONE); diff --git a/scripts/eastern_kingdoms/blackwing_lair/boss_vaelastrasz.cpp b/scripts/eastern_kingdoms/blackwing_lair/boss_vaelastrasz.cpp index 511518c90..67949c170 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/boss_vaelastrasz.cpp +++ b/scripts/eastern_kingdoms/blackwing_lair/boss_vaelastrasz.cpp @@ -146,7 +146,7 @@ struct MANGOS_DLL_DECL boss_vaelastraszAI : public ScriptedAI DoCastSpellIfCan(m_creature, SPELL_ESSENCE_OF_THE_RED); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { if (m_pInstance) m_pInstance->SetData(TYPE_VAELASTRASZ, DONE); diff --git a/scripts/eastern_kingdoms/blackwing_lair/boss_victor_nefarius.cpp b/scripts/eastern_kingdoms/blackwing_lair/boss_victor_nefarius.cpp index f94499d81..4b580bcd8 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/boss_victor_nefarius.cpp +++ b/scripts/eastern_kingdoms/blackwing_lair/boss_victor_nefarius.cpp @@ -332,11 +332,11 @@ struct MANGOS_DLL_DECL boss_victor_nefariusAI : public ScriptedAI, private Dialo uint32 uiCreatureId = 0; // 1 in 3 chance it will be a chromatic - uiCreatureId = urand(0, 2) ? m_uiDrakeTypeOne : NPC_CHROMATIC_DRAKANOID; + uiCreatureId = urand(0, 2) ? m_uiDrakeTypeOne : uint32(NPC_CHROMATIC_DRAKANOID); m_creature->SummonCreature(uiCreatureId, aNefarianLocs[0].m_fX, aNefarianLocs[0].m_fY, aNefarianLocs[0].m_fZ, 5.000f, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 30000); // 1 in 3 chance it will be a chromatic - uiCreatureId = urand(0, 2) ? m_uiDrakeTypeTwo : NPC_CHROMATIC_DRAKANOID; + uiCreatureId = urand(0, 2) ? m_uiDrakeTypeTwo : uint32(NPC_CHROMATIC_DRAKANOID); m_creature->SummonCreature(uiCreatureId, aNefarianLocs[1].m_fX, aNefarianLocs[1].m_fY, aNefarianLocs[1].m_fZ, 5.000, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 30000); // Begin phase 2 by spawning Nefarian diff --git a/scripts/eastern_kingdoms/eversong_woods.cpp b/scripts/eastern_kingdoms/eversong_woods.cpp index 6b21ab24f..dcba2200a 100644 --- a/scripts/eastern_kingdoms/eversong_woods.cpp +++ b/scripts/eastern_kingdoms/eversong_woods.cpp @@ -358,7 +358,7 @@ struct MANGOS_DLL_DECL npc_apprentice_mirvedaAI : public ScriptedAI m_uiFireballTimer = 0; } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { Player* pPlayer = m_creature->GetMap()->GetPlayer(m_playerGuid); diff --git a/scripts/eastern_kingdoms/gnomeregan/boss_thermaplugg.cpp b/scripts/eastern_kingdoms/gnomeregan/boss_thermaplugg.cpp index f223ea218..2dfaa0f2c 100644 --- a/scripts/eastern_kingdoms/gnomeregan/boss_thermaplugg.cpp +++ b/scripts/eastern_kingdoms/gnomeregan/boss_thermaplugg.cpp @@ -84,12 +84,12 @@ struct MANGOS_DLL_DECL boss_thermapluggAI : public ScriptedAI } } - void KilledUnit(Unit* pVictim) override + void KilledUnit(Unit* /*pVictim*/) override { DoScriptText(SAY_SLAY, m_creature); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { if (m_pInstance) m_pInstance->SetData(TYPE_THERMAPLUGG, DONE); diff --git a/scripts/eastern_kingdoms/gnomeregan/gnomeregan.cpp b/scripts/eastern_kingdoms/gnomeregan/gnomeregan.cpp index 8acbb02ac..24dabd0d6 100644 --- a/scripts/eastern_kingdoms/gnomeregan/gnomeregan.cpp +++ b/scripts/eastern_kingdoms/gnomeregan/gnomeregan.cpp @@ -239,7 +239,7 @@ struct MANGOS_DLL_DECL npc_blastmaster_emi_shortfuseAI : public npc_escortAI DoScriptText(urand(0, 1) ? SAY_AGGRO_1 : SAY_AGGRO_2, m_creature, pAttacker); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { if (!m_pInstance) return; diff --git a/scripts/eastern_kingdoms/karazhan/boss_curator.cpp b/scripts/eastern_kingdoms/karazhan/boss_curator.cpp index dbb944109..896e3e597 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_curator.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_curator.cpp @@ -73,12 +73,12 @@ struct MANGOS_DLL_DECL boss_curatorAI : public ScriptedAI m_creature->ApplySpellImmune(0, IMMUNITY_DAMAGE, SPELL_SCHOOL_MASK_ARCANE, true); } - void KilledUnit(Unit* pVictim) override + void KilledUnit(Unit* /*pVictim*/) override { DoScriptText(urand(0, 1) ? SAY_KILL1 : SAY_KILL2, m_creature); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoScriptText(SAY_DEATH, m_creature); diff --git a/scripts/eastern_kingdoms/karazhan/boss_maiden_of_virtue.cpp b/scripts/eastern_kingdoms/karazhan/boss_maiden_of_virtue.cpp index 7e95adf47..29a13ce9d 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_maiden_of_virtue.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_maiden_of_virtue.cpp @@ -63,7 +63,7 @@ struct MANGOS_DLL_DECL boss_maiden_of_virtueAI : public ScriptedAI m_uiHolygroundTimer = 3000; } - void KilledUnit(Unit* pVictim) override + void KilledUnit(Unit* /*pVictim*/) override { switch (urand(0, 5)) // 50% chance to say something out of 3 texts { @@ -73,7 +73,7 @@ struct MANGOS_DLL_DECL boss_maiden_of_virtueAI : public ScriptedAI } } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoScriptText(SAY_DEATH, m_creature); diff --git a/scripts/eastern_kingdoms/karazhan/boss_midnight.cpp b/scripts/eastern_kingdoms/karazhan/boss_midnight.cpp index 51e4f0ee7..c91dd568d 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_midnight.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_midnight.cpp @@ -80,7 +80,7 @@ struct MANGOS_DLL_DECL boss_midnightAI : public ScriptedAI m_pInstance->SetData(TYPE_ATTUMEN, IN_PROGRESS); } - void KilledUnit(Unit* pVictim) override + void KilledUnit(Unit* /*pVictim*/) override { if (m_uiPhase == 1 && m_pInstance) { @@ -219,7 +219,7 @@ struct MANGOS_DLL_DECL boss_attumenAI : public ScriptedAI m_bHasSummonRider = false; } - void KilledUnit(Unit* pVictim) override + void KilledUnit(Unit* /*pVictim*/) override { DoScriptText(urand(0, 1) ? SAY_KILL1 : SAY_KILL2, m_creature); } diff --git a/scripts/eastern_kingdoms/karazhan/boss_moroes.cpp b/scripts/eastern_kingdoms/karazhan/boss_moroes.cpp index bff43dd1a..b0224885c 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_moroes.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_moroes.cpp @@ -101,7 +101,7 @@ struct MANGOS_DLL_DECL boss_moroesAI : public ScriptedAI m_pInstance->SetData(TYPE_MOROES, IN_PROGRESS); } - void KilledUnit(Unit* pVictim) override + void KilledUnit(Unit* /*pVictim*/) override { switch (urand(0, 2)) { @@ -168,7 +168,7 @@ struct MANGOS_DLL_DECL boss_moroesAI : public ScriptedAI for (uint8 i = 0; i < MAX_ACTIVE_GUESTS; ++i) { // If we already have the creature on the map, then don't summon it - if (Creature* pAdd = m_pInstance->GetSingleCreatureFromStorage(m_vGuestsEntryList[i], true)) + if (m_pInstance->GetSingleCreatureFromStorage(m_vGuestsEntryList[i], true)) continue; m_creature->SummonCreature(m_vGuestsEntryList[i], afLocations[i][0], afLocations[i][1], afLocations[i][2], afLocations[i][3], TEMPSUMMON_CORPSE_DESPAWN, 0); diff --git a/scripts/eastern_kingdoms/karazhan/boss_netherspite.cpp b/scripts/eastern_kingdoms/karazhan/boss_netherspite.cpp index 30c3ddc08..b9632c496 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_netherspite.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_netherspite.cpp @@ -155,7 +155,7 @@ struct MANGOS_DLL_DECL boss_netherspiteAI : public ScriptedAI DoCastSpellIfCan(m_creature, SPELL_NETHERBURN); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { if (m_pInstance) m_pInstance->SetData(TYPE_NETHERSPITE, DONE); diff --git a/scripts/eastern_kingdoms/karazhan/boss_nightbane.cpp b/scripts/eastern_kingdoms/karazhan/boss_nightbane.cpp index 5bff95f23..84adff3a8 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_nightbane.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_nightbane.cpp @@ -110,7 +110,7 @@ struct MANGOS_DLL_DECL boss_nightbaneAI : public npc_escortAI DoScriptText(SAY_AGGRO, m_creature); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { if (m_pInstance) m_pInstance->SetData(TYPE_NIGHTBANE, DONE); diff --git a/scripts/eastern_kingdoms/karazhan/boss_prince_malchezaar.cpp b/scripts/eastern_kingdoms/karazhan/boss_prince_malchezaar.cpp index 6d721e50f..62e09eb8b 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_prince_malchezaar.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_prince_malchezaar.cpp @@ -115,7 +115,7 @@ struct MANGOS_DLL_DECL boss_malchezaarAI : public ScriptedAI m_creature->SetAttackTime(BASE_ATTACK, ATTACK_TIMER_DEFAULT); } - void KilledUnit(Unit* pVictim) override + void KilledUnit(Unit* /*pVictim*/) override { switch (urand(0, 2)) { @@ -125,7 +125,7 @@ struct MANGOS_DLL_DECL boss_malchezaarAI : public ScriptedAI } } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoScriptText(SAY_DEATH, m_creature); diff --git a/scripts/eastern_kingdoms/karazhan/boss_shade_of_aran.cpp b/scripts/eastern_kingdoms/karazhan/boss_shade_of_aran.cpp index f2e105d4d..02b741874 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_shade_of_aran.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_shade_of_aran.cpp @@ -133,7 +133,7 @@ struct MANGOS_DLL_DECL boss_aranAI : public ScriptedAI SetCombatMovement(true); } - void KilledUnit(Unit* pVictim) override + void KilledUnit(Unit* /*pVictim*/) override { DoScriptText(urand(0, 1) ? SAY_KILL1 : SAY_KILL2, m_creature); } diff --git a/scripts/eastern_kingdoms/karazhan/boss_terestian_illhoof.cpp b/scripts/eastern_kingdoms/karazhan/boss_terestian_illhoof.cpp index 9669a22d7..85d862279 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_terestian_illhoof.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_terestian_illhoof.cpp @@ -102,7 +102,7 @@ struct MANGOS_DLL_DECL boss_terestianAI : public ScriptedAI m_pInstance->SetData(TYPE_TERESTIAN, IN_PROGRESS); } - void KilledUnit(Unit* pVictim) override + void KilledUnit(Unit* /*pVictim*/) override { DoScriptText(urand(0, 1) ? SAY_SLAY1 : SAY_SLAY2, m_creature); } @@ -149,7 +149,7 @@ struct MANGOS_DLL_DECL boss_terestianAI : public ScriptedAI } } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoScriptText(SAY_DEATH, m_creature); diff --git a/scripts/eastern_kingdoms/karazhan/bosses_opera.cpp b/scripts/eastern_kingdoms/karazhan/bosses_opera.cpp index 67f31ba7e..75eb360de 100644 --- a/scripts/eastern_kingdoms/karazhan/bosses_opera.cpp +++ b/scripts/eastern_kingdoms/karazhan/bosses_opera.cpp @@ -124,7 +124,7 @@ struct MANGOS_DLL_DECL boss_dorotheeAI : public ScriptedAI m_creature->ForcedDespawn(); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoScriptText(SAY_DOROTHEE_DEATH, m_creature); } @@ -269,12 +269,12 @@ struct MANGOS_DLL_DECL boss_strawmanAI : public ScriptedAI m_creature->ForcedDespawn(); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoScriptText(SAY_STRAWMAN_DEATH, m_creature); } - void KilledUnit(Unit* pVictim) override + void KilledUnit(Unit* /*pVictim*/) override { DoScriptText(SAY_STRAWMAN_SLAY, m_creature); } @@ -369,12 +369,12 @@ struct MANGOS_DLL_DECL boss_tinheadAI : public ScriptedAI ScriptedAI::AttackStart(pWho); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoScriptText(SAY_TINHEAD_DEATH, m_creature); } - void KilledUnit(Unit* pVictim) override + void KilledUnit(Unit* /*pVictim*/) override { DoScriptText(SAY_TINHEAD_SLAY, m_creature); } @@ -471,12 +471,12 @@ struct MANGOS_DLL_DECL boss_roarAI : public ScriptedAI m_creature->ForcedDespawn(); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoScriptText(SAY_ROAR_DEATH, m_creature); } - void KilledUnit(Unit* pVictim) override + void KilledUnit(Unit* /*pVictim*/) override { DoScriptText(SAY_ROAR_SLAY, m_creature); } @@ -561,7 +561,7 @@ struct MANGOS_DLL_DECL boss_croneAI : public ScriptedAI m_creature->SummonCreature(NPC_CYCLONE, afCycloneSpawnLoc[0], afCycloneSpawnLoc[1], afCycloneSpawnLoc[2], afCycloneSpawnLoc[3], TEMPSUMMON_DEAD_DESPAWN, 0); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoScriptText(SAY_CRONE_DEATH, m_creature); @@ -700,7 +700,7 @@ struct MANGOS_DLL_DECL boss_bigbadwolfAI : public ScriptedAI m_creature->ForcedDespawn(); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoPlaySoundToSet(m_creature, SOUND_WOLF_DEATH); @@ -873,7 +873,7 @@ struct MANGOS_DLL_DECL boss_julianneAI : public ScriptedAI } } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); @@ -1118,7 +1118,7 @@ struct MANGOS_DLL_DECL boss_romuloAI : public ScriptedAI DoScriptText(SAY_ROMULO_AGGRO, m_creature); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); diff --git a/scripts/eastern_kingdoms/karazhan/instance_karazhan.cpp b/scripts/eastern_kingdoms/karazhan/instance_karazhan.cpp index c809ed560..5b2ae5a53 100644 --- a/scripts/eastern_kingdoms/karazhan/instance_karazhan.cpp +++ b/scripts/eastern_kingdoms/karazhan/instance_karazhan.cpp @@ -39,8 +39,8 @@ EndScriptData */ */ instance_karazhan::instance_karazhan(Map* pMap) : ScriptedInstance(pMap), - m_uiOzDeathCount(0), - m_uiOperaEvent(0) + m_uiOperaEvent(0), + m_uiOzDeathCount(0) { Initialize(); } diff --git a/scripts/eastern_kingdoms/magisters_terrace/boss_felblood_kaelthas.cpp b/scripts/eastern_kingdoms/magisters_terrace/boss_felblood_kaelthas.cpp index 3ba7d8bf0..0af52ff2c 100644 --- a/scripts/eastern_kingdoms/magisters_terrace/boss_felblood_kaelthas.cpp +++ b/scripts/eastern_kingdoms/magisters_terrace/boss_felblood_kaelthas.cpp @@ -139,7 +139,7 @@ struct MANGOS_DLL_DECL boss_felblood_kaelthasAI : public ScriptedAI, private Dia SetCombatMovement(true); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { if (m_pInstance) m_pInstance->SetData(TYPE_KAELTHAS, DONE); diff --git a/scripts/eastern_kingdoms/magisters_terrace/boss_priestess_delrissa.cpp b/scripts/eastern_kingdoms/magisters_terrace/boss_priestess_delrissa.cpp index 97957ece6..ca309e4c6 100644 --- a/scripts/eastern_kingdoms/magisters_terrace/boss_priestess_delrissa.cpp +++ b/scripts/eastern_kingdoms/magisters_terrace/boss_priestess_delrissa.cpp @@ -145,7 +145,7 @@ struct MANGOS_DLL_DECL boss_priestess_delrissaAI : public ScriptedAI for (uint8 i = 0; i < MAX_DELRISSA_ADDS; ++i) { // If we already have the creature on the map, then don't summon it - if (Creature* pAdd = m_pInstance->GetSingleCreatureFromStorage(m_vuiLackeyEnties[i], true)) + if (m_pInstance->GetSingleCreatureFromStorage(m_vuiLackeyEnties[i], true)) continue; m_creature->SummonCreature(m_vuiLackeyEnties[i], aLackeyLocations[i][0], aLackeyLocations[i][1], aLackeyLocations[i][2], aLackeyLocations[i][3], TEMPSUMMON_CORPSE_DESPAWN, 0); @@ -166,7 +166,7 @@ struct MANGOS_DLL_DECL boss_priestess_delrissaAI : public ScriptedAI m_uiPlayersKilled = 0; } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoScriptText(SAY_DEATH, m_creature); @@ -319,7 +319,7 @@ struct MANGOS_DLL_DECL priestess_companion_commonAI : public ScriptedAI } // Return true to handle shared timers and MeleeAttack - virtual bool UpdateCompanionAI(const uint32 uiDiff) { return true; } + virtual bool UpdateCompanionAI(const uint32 /*uiDiff*/) { return true; } void UpdateAI(const uint32 uiDiff) override { @@ -851,7 +851,7 @@ struct MANGOS_DLL_DECL npc_warlord_salarisAI : public priestess_companion_common priestess_companion_commonAI::Reset(); } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { DoCastSpellIfCan(m_creature, SPELL_BATTLE_SHOUT); } diff --git a/scripts/eastern_kingdoms/magisters_terrace/boss_selin_fireheart.cpp b/scripts/eastern_kingdoms/magisters_terrace/boss_selin_fireheart.cpp index f77da9a83..cf80f5ce5 100644 --- a/scripts/eastern_kingdoms/magisters_terrace/boss_selin_fireheart.cpp +++ b/scripts/eastern_kingdoms/magisters_terrace/boss_selin_fireheart.cpp @@ -110,7 +110,7 @@ struct MANGOS_DLL_DECL boss_selin_fireheartAI : public ScriptedAI return false; } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { DoScriptText(SAY_AGGRO, m_creature); @@ -124,7 +124,7 @@ struct MANGOS_DLL_DECL boss_selin_fireheartAI : public ScriptedAI m_pInstance->SetData(TYPE_SELIN, FAIL); } - void KilledUnit(Unit* pVictim) override + void KilledUnit(Unit* /*pVictim*/) override { DoScriptText(urand(0, 1) ? SAY_KILL_1 : SAY_KILL_2, m_creature); } @@ -152,7 +152,7 @@ struct MANGOS_DLL_DECL boss_selin_fireheartAI : public ScriptedAI } } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoScriptText(SAY_DEATH, m_creature); @@ -265,7 +265,7 @@ struct MANGOS_DLL_DECL mob_fel_crystalAI : public ScriptedAI m_sWretchedGuids.clear(); } - void AttackStart(Unit* pWho) override {} + void AttackStart(Unit* /*pWho*/) override {} void MoveInLineOfSight(Unit* pWho) override { @@ -278,7 +278,7 @@ struct MANGOS_DLL_DECL mob_fel_crystalAI : public ScriptedAI } } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { if (ScriptedInstance* pInstance = (ScriptedInstance*)m_creature->GetInstanceData()) { diff --git a/scripts/eastern_kingdoms/magisters_terrace/boss_vexallus.cpp b/scripts/eastern_kingdoms/magisters_terrace/boss_vexallus.cpp index d32bb9e66..d4975d9a1 100644 --- a/scripts/eastern_kingdoms/magisters_terrace/boss_vexallus.cpp +++ b/scripts/eastern_kingdoms/magisters_terrace/boss_vexallus.cpp @@ -83,7 +83,7 @@ struct MANGOS_DLL_DECL boss_vexallusAI : public ScriptedAI m_bEnraged = false; } - void KilledUnit(Unit* pVictim) override + void KilledUnit(Unit* /*pVictim*/) override { DoScriptText(SAY_KILL, m_creature); } @@ -94,13 +94,13 @@ struct MANGOS_DLL_DECL boss_vexallusAI : public ScriptedAI m_pInstance->SetData(TYPE_VEXALLUS, FAIL); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { if (m_pInstance) m_pInstance->SetData(TYPE_VEXALLUS, DONE); } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { DoScriptText(SAY_AGGRO, m_creature); @@ -214,8 +214,8 @@ struct MANGOS_DLL_DECL mob_pure_energyAI : public ScriptedAI } } - void MoveInLineOfSight(Unit* pWho) override { } - void AttackStart(Unit* pWho) override { } + void MoveInLineOfSight(Unit* /*pWho*/) override {} + void AttackStart(Unit* /*pWho*/) override {} }; CreatureAI* GetAI_mob_pure_energy(Creature* pCreature) diff --git a/scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.cpp b/scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.cpp index 5c276084f..25d972093 100644 --- a/scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.cpp +++ b/scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.cpp @@ -96,7 +96,7 @@ CreatureAI* GetAI_npc_kalecgos(Creature* pCreature) return new npc_kalecgosAI(pCreature); } -bool ProcessEventId_event_go_scrying_orb(uint32 uiEventId, Object* pSource, Object* pTarget, bool bIsStart) +bool ProcessEventId_event_go_scrying_orb(uint32 /*uiEventId*/, Object* pSource, Object* /*pTarget*/, bool bIsStart) { if (bIsStart && pSource->GetTypeId() == TYPEID_PLAYER) { diff --git a/scripts/eastern_kingdoms/molten_core/boss_baron_geddon.cpp b/scripts/eastern_kingdoms/molten_core/boss_baron_geddon.cpp index 066fc531f..51687ea60 100644 --- a/scripts/eastern_kingdoms/molten_core/boss_baron_geddon.cpp +++ b/scripts/eastern_kingdoms/molten_core/boss_baron_geddon.cpp @@ -63,7 +63,7 @@ struct MANGOS_DLL_DECL boss_baron_geddonAI : public ScriptedAI m_pInstance->SetData(TYPE_GEDDON, IN_PROGRESS); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { if (m_pInstance) m_pInstance->SetData(TYPE_GEDDON, DONE); diff --git a/scripts/eastern_kingdoms/molten_core/boss_garr.cpp b/scripts/eastern_kingdoms/molten_core/boss_garr.cpp index 81500aafe..bdbcef624 100644 --- a/scripts/eastern_kingdoms/molten_core/boss_garr.cpp +++ b/scripts/eastern_kingdoms/molten_core/boss_garr.cpp @@ -63,7 +63,7 @@ struct MANGOS_DLL_DECL boss_garrAI : public ScriptedAI m_pInstance->SetData(TYPE_GARR, IN_PROGRESS); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { if (m_pInstance) m_pInstance->SetData(TYPE_GARR, DONE); diff --git a/scripts/eastern_kingdoms/molten_core/boss_gehennas.cpp b/scripts/eastern_kingdoms/molten_core/boss_gehennas.cpp index 60acd5ce5..892331b68 100644 --- a/scripts/eastern_kingdoms/molten_core/boss_gehennas.cpp +++ b/scripts/eastern_kingdoms/molten_core/boss_gehennas.cpp @@ -58,7 +58,7 @@ struct MANGOS_DLL_DECL boss_gehennasAI : public ScriptedAI m_pInstance->SetData(TYPE_GEHENNAS, IN_PROGRESS); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { if (m_pInstance) m_pInstance->SetData(TYPE_GEHENNAS, DONE); diff --git a/scripts/eastern_kingdoms/molten_core/boss_golemagg.cpp b/scripts/eastern_kingdoms/molten_core/boss_golemagg.cpp index aba2ac2a4..6ce932a0d 100644 --- a/scripts/eastern_kingdoms/molten_core/boss_golemagg.cpp +++ b/scripts/eastern_kingdoms/molten_core/boss_golemagg.cpp @@ -68,7 +68,7 @@ struct MANGOS_DLL_DECL boss_golemaggAI : public ScriptedAI m_pInstance->SetData(TYPE_GOLEMAGG, IN_PROGRESS); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { if (m_pInstance) m_pInstance->SetData(TYPE_GOLEMAGG, DONE); diff --git a/scripts/eastern_kingdoms/molten_core/boss_lucifron.cpp b/scripts/eastern_kingdoms/molten_core/boss_lucifron.cpp index 17763c627..b6a210032 100644 --- a/scripts/eastern_kingdoms/molten_core/boss_lucifron.cpp +++ b/scripts/eastern_kingdoms/molten_core/boss_lucifron.cpp @@ -58,7 +58,7 @@ struct MANGOS_DLL_DECL boss_lucifronAI : public ScriptedAI m_pInstance->SetData(TYPE_LUCIFRON, IN_PROGRESS); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { if (m_pInstance) m_pInstance->SetData(TYPE_LUCIFRON, DONE); diff --git a/scripts/eastern_kingdoms/molten_core/boss_magmadar.cpp b/scripts/eastern_kingdoms/molten_core/boss_magmadar.cpp index 53b0f9204..4e98c045d 100644 --- a/scripts/eastern_kingdoms/molten_core/boss_magmadar.cpp +++ b/scripts/eastern_kingdoms/molten_core/boss_magmadar.cpp @@ -64,7 +64,7 @@ struct MANGOS_DLL_DECL boss_magmadarAI : public ScriptedAI m_pInstance->SetData(TYPE_MAGMADAR, IN_PROGRESS); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { if (m_pInstance) m_pInstance->SetData(TYPE_MAGMADAR, DONE); diff --git a/scripts/eastern_kingdoms/molten_core/boss_majordomo_executus.cpp b/scripts/eastern_kingdoms/molten_core/boss_majordomo_executus.cpp index ed4b0d7c4..4a4e0d8ca 100644 --- a/scripts/eastern_kingdoms/molten_core/boss_majordomo_executus.cpp +++ b/scripts/eastern_kingdoms/molten_core/boss_majordomo_executus.cpp @@ -100,7 +100,7 @@ struct MANGOS_DLL_DECL boss_majordomoAI : public ScriptedAI m_uiSpeech = 0; } - void KilledUnit(Unit* pVictim) override + void KilledUnit(Unit* /*pVictim*/) override { if (urand(0, 4)) return; @@ -154,7 +154,7 @@ struct MANGOS_DLL_DECL boss_majordomoAI : public ScriptedAI m_creature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); // Prevent possible exploits with double summoning - if (Creature* pRagnaros = m_creature->GetMap()->GetCreature(m_ragnarosGuid)) + if (m_creature->GetMap()->GetCreature(m_ragnarosGuid)) return; DoScriptText(SAY_SUMMON_0, m_creature, pPlayer); diff --git a/scripts/eastern_kingdoms/molten_core/boss_ragnaros.cpp b/scripts/eastern_kingdoms/molten_core/boss_ragnaros.cpp index b3f120949..e5f1214c3 100644 --- a/scripts/eastern_kingdoms/molten_core/boss_ragnaros.cpp +++ b/scripts/eastern_kingdoms/molten_core/boss_ragnaros.cpp @@ -106,7 +106,7 @@ struct MANGOS_DLL_DECL boss_ragnarosAI : public Scripted_NoMovementAI DoScriptText(SAY_KILL, m_creature); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { if (m_pInstance) m_pInstance->SetData(TYPE_RAGNAROS, DONE); diff --git a/scripts/eastern_kingdoms/molten_core/boss_shazzrah.cpp b/scripts/eastern_kingdoms/molten_core/boss_shazzrah.cpp index 07b094e18..dc0d6ac51 100644 --- a/scripts/eastern_kingdoms/molten_core/boss_shazzrah.cpp +++ b/scripts/eastern_kingdoms/molten_core/boss_shazzrah.cpp @@ -64,7 +64,7 @@ struct MANGOS_DLL_DECL boss_shazzrahAI : public ScriptedAI m_pInstance->SetData(TYPE_SHAZZRAH, IN_PROGRESS); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { if (m_pInstance) m_pInstance->SetData(TYPE_SHAZZRAH, DONE); diff --git a/scripts/eastern_kingdoms/molten_core/boss_sulfuron_harbinger.cpp b/scripts/eastern_kingdoms/molten_core/boss_sulfuron_harbinger.cpp index ed91ca5c7..4c722f1d9 100644 --- a/scripts/eastern_kingdoms/molten_core/boss_sulfuron_harbinger.cpp +++ b/scripts/eastern_kingdoms/molten_core/boss_sulfuron_harbinger.cpp @@ -69,7 +69,7 @@ struct MANGOS_DLL_DECL boss_sulfuronAI : public ScriptedAI m_pInstance->SetData(TYPE_SULFURON, IN_PROGRESS); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { if (m_pInstance) m_pInstance->SetData(TYPE_SULFURON, DONE); diff --git a/scripts/eastern_kingdoms/molten_core/instance_molten_core.cpp b/scripts/eastern_kingdoms/molten_core/instance_molten_core.cpp index b0a9470a4..c0930411f 100644 --- a/scripts/eastern_kingdoms/molten_core/instance_molten_core.cpp +++ b/scripts/eastern_kingdoms/molten_core/instance_molten_core.cpp @@ -24,6 +24,18 @@ EndScriptData */ #include "precompiled.h" #include "molten_core.h" +static sSpawnLocation m_aBosspawnLocs[MAX_MAJORDOMO_ADDS] = +{ + {NPC_FLAMEWAKER_ELITE, 737.945f, -1156.48f, -118.945f, 4.46804f}, + {NPC_FLAMEWAKER_ELITE, 752.520f, -1191.02f, -118.218f, 2.49582f}, + {NPC_FLAMEWAKER_ELITE, 752.953f, -1163.94f, -118.869f, 3.70010f}, + {NPC_FLAMEWAKER_ELITE, 738.814f, -1197.40f, -118.018f, 1.83260f}, + {NPC_FLAMEWAKER_HEALER, 746.939f, -1194.87f, -118.016f, 2.21657f}, + {NPC_FLAMEWAKER_HEALER, 747.132f, -1158.87f, -118.897f, 4.03171f}, + {NPC_FLAMEWAKER_HEALER, 757.116f, -1170.12f, -118.793f, 3.40339f}, + {NPC_FLAMEWAKER_HEALER, 755.910f, -1184.46f, -118.449f, 2.80998f} +}; + instance_molten_core::instance_molten_core(Map* pMap) : ScriptedInstance(pMap) { Initialize(); diff --git a/scripts/eastern_kingdoms/molten_core/molten_core.h b/scripts/eastern_kingdoms/molten_core/molten_core.h index 4816bbf34..95d6c8b2d 100644 --- a/scripts/eastern_kingdoms/molten_core/molten_core.h +++ b/scripts/eastern_kingdoms/molten_core/molten_core.h @@ -63,18 +63,6 @@ struct sSpawnLocation float m_fX, m_fY, m_fZ, m_fO; }; -static sSpawnLocation m_aBosspawnLocs[MAX_MAJORDOMO_ADDS] = -{ - {NPC_FLAMEWAKER_ELITE, 737.945f, -1156.48f, -118.945f, 4.46804f}, - {NPC_FLAMEWAKER_ELITE, 752.520f, -1191.02f, -118.218f, 2.49582f}, - {NPC_FLAMEWAKER_ELITE, 752.953f, -1163.94f, -118.869f, 3.70010f}, - {NPC_FLAMEWAKER_ELITE, 738.814f, -1197.40f, -118.018f, 1.83260f}, - {NPC_FLAMEWAKER_HEALER, 746.939f, -1194.87f, -118.016f, 2.21657f}, - {NPC_FLAMEWAKER_HEALER, 747.132f, -1158.87f, -118.897f, 4.03171f}, - {NPC_FLAMEWAKER_HEALER, 757.116f, -1170.12f, -118.793f, 3.40339f}, - {NPC_FLAMEWAKER_HEALER, 755.910f, -1184.46f, -118.449f, 2.80998f} -}; - static sSpawnLocation m_aMajordomoLocations[2] = { {NPC_MAJORDOMO, 758.089f, -1176.71f, -118.640f, 3.12414f}, // Summon fight position diff --git a/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp b/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp index e2c6ed668..b98cc2860 100644 --- a/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp +++ b/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp @@ -1123,7 +1123,7 @@ struct MANGOS_DLL_DECL npc_eye_of_acherusAI : public ScriptedAI void Reset() override {} - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { m_creature->CastSpell(m_creature, 52694, true); // HACK - Remove this when mangos supports proper spell casting } @@ -1224,7 +1224,7 @@ struct MANGOS_DLL_DECL npc_scarlet_ghoulAI : public ScriptedPetAI } } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoCastSpellIfCan(m_creature, SPELL_GHOUL_UNSUMMON, CAST_TRIGGERED); } @@ -1780,18 +1780,17 @@ struct MANGOS_DLL_DECL npc_highlord_darion_mograineAI : public npc_escortAI // make army attack for (GuidList::const_iterator itr = m_lAttackersGUIDs.begin(); itr != m_lAttackersGUIDs.end(); ++itr) { - if (Creature* pTemp = m_creature->GetMap()->GetCreature(*itr)) - { - if (Creature* pChamp = m_pInstance->GetSingleCreatureFromStorage(aLightArmySpawnLoc[urand(0, MAX_LIGHT_CHAMPIONS - 1)].m_uiEntry)) - m_creature->AI()->AttackStart(pTemp); - } + Creature* pAttacker = m_creature->GetMap()->GetCreature(*itr); + Creature* pChamp = m_pInstance->GetSingleCreatureFromStorage(aLightArmySpawnLoc[urand(0, MAX_LIGHT_CHAMPIONS - 1)].m_uiEntry); + if (pAttacker && pChamp) + pAttacker->AI()->AttackStart(pChamp); } // need to make sure that all defenders attack for (GuidList::const_iterator itr = m_lDefendersGUIDs.begin(); itr != m_lDefendersGUIDs.end(); ++itr) { - if (Creature* pTemp = m_creature->GetMap()->GetCreature(*itr)) - pTemp->AI()->AttackStart(m_creature); + if (Creature* pDefender = m_creature->GetMap()->GetCreature(*itr)) + pDefender->AI()->AttackStart(m_creature); } break; case 5: diff --git a/scripts/eastern_kingdoms/scarlet_monastery/boss_headless_horseman.cpp b/scripts/eastern_kingdoms/scarlet_monastery/boss_headless_horseman.cpp index 1bef4eeb3..182ac3d43 100644 --- a/scripts/eastern_kingdoms/scarlet_monastery/boss_headless_horseman.cpp +++ b/scripts/eastern_kingdoms/scarlet_monastery/boss_headless_horseman.cpp @@ -55,12 +55,12 @@ struct MANGOS_DLL_DECL boss_headless_horsemanAI : public ScriptedAI m_creature->SetInCombatWithZone(); } - void KilledUnit(Unit* pVictim) override + void KilledUnit(Unit* /*pVictim*/) override { DoScriptText(SAY_SLAY, m_creature); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoScriptText(SAY_DEATH, m_creature); } diff --git a/scripts/eastern_kingdoms/scarlet_monastery/boss_herod.cpp b/scripts/eastern_kingdoms/scarlet_monastery/boss_herod.cpp index 530e3a2f2..f8fde301d 100644 --- a/scripts/eastern_kingdoms/scarlet_monastery/boss_herod.cpp +++ b/scripts/eastern_kingdoms/scarlet_monastery/boss_herod.cpp @@ -77,12 +77,12 @@ struct MANGOS_DLL_DECL boss_herodAI : public ScriptedAI } } - void KilledUnit(Unit* pVictim) override + void KilledUnit(Unit* /*pVictim*/) override { DoScriptText(SAY_KILL, m_creature); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { for (uint8 i = 0; i < 20; ++i) m_creature->SummonCreature(NPC_SCARLET_TRAINEE, 1939.18f, -431.58f, 17.09f, 6.22f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 600000); diff --git a/scripts/eastern_kingdoms/scarlet_monastery/boss_mograine_and_whitemane.cpp b/scripts/eastern_kingdoms/scarlet_monastery/boss_mograine_and_whitemane.cpp index 921a2d1c7..d802a02ad 100644 --- a/scripts/eastern_kingdoms/scarlet_monastery/boss_mograine_and_whitemane.cpp +++ b/scripts/eastern_kingdoms/scarlet_monastery/boss_mograine_and_whitemane.cpp @@ -100,7 +100,7 @@ struct MANGOS_DLL_DECL boss_scarlet_commander_mograineAI : public ScriptedAI m_creature->CallForHelp(VISIBLE_RANGE); } - void KilledUnit(Unit* pVictim) override + void KilledUnit(Unit* /*pVictim*/) override { DoScriptText(SAY_MO_KILL, m_creature); } @@ -280,7 +280,7 @@ struct MANGOS_DLL_DECL boss_high_inquisitor_whitemaneAI : public ScriptedAI DoScriptText(SAY_WH_INTRO, m_creature); } - void KilledUnit(Unit* pVictim) override + void KilledUnit(Unit* /*pVictim*/) override { DoScriptText(SAY_WH_KILL, m_creature); } diff --git a/scripts/eastern_kingdoms/scholomance/instance_scholomance.cpp b/scripts/eastern_kingdoms/scholomance/instance_scholomance.cpp index f2da3019d..3b22f2b1d 100644 --- a/scripts/eastern_kingdoms/scholomance/instance_scholomance.cpp +++ b/scripts/eastern_kingdoms/scholomance/instance_scholomance.cpp @@ -200,9 +200,9 @@ void instance_scholomance::HandlePortalEvent(uint32 uiEventId, uint32 uiData) // Toggle door and event state in case of state-switch else { - if (uiData == IN_PROGRESS && !find->second.m_bIsActive || - uiData == FAIL && find->second.m_bIsActive || - uiData == DONE && find->second.m_bIsActive) + if ((uiData == IN_PROGRESS && !find->second.m_bIsActive) || + (uiData == FAIL && find->second.m_bIsActive) || + (uiData == DONE && find->second.m_bIsActive)) { find->second.m_bIsActive = !find->second.m_bIsActive; DoUseDoorOrButton(find->second.m_doorGuid); diff --git a/scripts/eastern_kingdoms/silverpine_forest.cpp b/scripts/eastern_kingdoms/silverpine_forest.cpp index 92b7f3876..7095ce0b3 100644 --- a/scripts/eastern_kingdoms/silverpine_forest.cpp +++ b/scripts/eastern_kingdoms/silverpine_forest.cpp @@ -203,7 +203,7 @@ struct MANGOS_DLL_DECL npc_deathstalker_faerleiaAI : public ScriptedAI m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { if (Player* pPlayer = m_creature->GetMap()->GetPlayer(m_playerGuid)) pPlayer->SendQuestFailed(QUEST_PYREWOOD_AMBUSH); diff --git a/scripts/eastern_kingdoms/sunken_temple/instance_sunken_temple.cpp b/scripts/eastern_kingdoms/sunken_temple/instance_sunken_temple.cpp index a69bc51ea..03220ec3a 100644 --- a/scripts/eastern_kingdoms/sunken_temple/instance_sunken_temple.cpp +++ b/scripts/eastern_kingdoms/sunken_temple/instance_sunken_temple.cpp @@ -25,13 +25,13 @@ EndScriptData */ #include "sunken_temple.h" instance_sunken_temple::instance_sunken_temple(Map* pMap) : ScriptedInstance(pMap), + m_uiProtectorsRemaining(0), m_uiStatueCounter(0), + m_uiFlameCounter(0), m_uiAvatarSummonTimer(0), m_uiSupressorTimer(0), - m_uiFlameCounter(0), - m_uiProtectorsRemaining(0), - m_bCanSummonBloodkeeper(false), - m_bIsFirstHakkarWave(false) + m_bIsFirstHakkarWave(false), + m_bCanSummonBloodkeeper(false) { Initialize(); } diff --git a/scripts/eastern_kingdoms/sunwell_plateau/boss_brutallus.cpp b/scripts/eastern_kingdoms/sunwell_plateau/boss_brutallus.cpp index 8c3f9c115..a5ea3ad44 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/boss_brutallus.cpp +++ b/scripts/eastern_kingdoms/sunwell_plateau/boss_brutallus.cpp @@ -159,7 +159,7 @@ struct MANGOS_DLL_DECL boss_brutallusAI : public ScriptedAI, private DialogueHel } } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoScriptText(YELL_DEATH, m_creature); DoCastSpellIfCan(m_creature, SPELL_SUMMON_DEATH_CLOUD, CAST_TRIGGERED); diff --git a/scripts/eastern_kingdoms/sunwell_plateau/boss_eredar_twins.cpp b/scripts/eastern_kingdoms/sunwell_plateau/boss_eredar_twins.cpp index 5507b2af6..6a97e5a6b 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/boss_eredar_twins.cpp +++ b/scripts/eastern_kingdoms/sunwell_plateau/boss_eredar_twins.cpp @@ -159,12 +159,12 @@ struct MANGOS_DLL_DECL boss_alythessAI : public ScriptedAI } } - void KilledUnit(Unit* pVictim) override + void KilledUnit(Unit* /*pVictim*/) override { DoScriptText(urand(0, 1) ? SAY_ALYTHESS_KILL_1 : SAY_ALYTHESS_KILL_2, m_creature); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { if (m_pInstance) { @@ -320,12 +320,12 @@ struct MANGOS_DLL_DECL boss_sacrolashAI : public ScriptedAI } } - void KilledUnit(Unit* pVictim) override + void KilledUnit(Unit* /*pVictim*/) override { DoScriptText(urand(0, 1) ? SAY_SACROLASH_KILL_1 : SAY_SACROLASH_KILL_2, m_creature); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { if (m_pInstance) { diff --git a/scripts/eastern_kingdoms/sunwell_plateau/boss_felmyst.cpp b/scripts/eastern_kingdoms/sunwell_plateau/boss_felmyst.cpp index 56b322e91..1a66d33e0 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/boss_felmyst.cpp +++ b/scripts/eastern_kingdoms/sunwell_plateau/boss_felmyst.cpp @@ -142,12 +142,12 @@ struct MANGOS_DLL_DECL boss_felmystAI : public ScriptedAI m_pInstance->SetData(TYPE_FELMYST, IN_PROGRESS); } - void KilledUnit(Unit* pVictim) override + void KilledUnit(Unit* /*pVictim*/) override { DoScriptText(urand(0, 1) ? SAY_KILL_1 : SAY_KILL_2, m_creature); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoScriptText(SAY_DEATH, m_creature); diff --git a/scripts/eastern_kingdoms/sunwell_plateau/boss_kalecgos.cpp b/scripts/eastern_kingdoms/sunwell_plateau/boss_kalecgos.cpp index 009721130..aed66d874 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/boss_kalecgos.cpp +++ b/scripts/eastern_kingdoms/sunwell_plateau/boss_kalecgos.cpp @@ -164,7 +164,7 @@ struct MANGOS_DLL_DECL boss_kalecgosAI : public ScriptedAI } } - void KilledUnit(Unit* pVictim) override + void KilledUnit(Unit* /*pVictim*/) override { DoScriptText(urand(0, 1) ? SAY_EVIL_SLAY_1 : SAY_EVIL_SLAY_2, m_creature); } @@ -399,7 +399,7 @@ struct MANGOS_DLL_DECL boss_sathrovarrAI : public ScriptedAI ScriptedAI::MoveInLineOfSight(pWho); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoScriptText(SAY_SATH_DEATH, m_creature); } @@ -499,7 +499,7 @@ struct MANGOS_DLL_DECL boss_kalecgos_humanoidAI : public ScriptedAI DoScriptText(SAY_GOOD_AGGRO, m_creature); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { if (m_pInstance) { diff --git a/scripts/eastern_kingdoms/sunwell_plateau/boss_kiljaeden.cpp b/scripts/eastern_kingdoms/sunwell_plateau/boss_kiljaeden.cpp index 28a7ec753..4d07164c3 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/boss_kiljaeden.cpp +++ b/scripts/eastern_kingdoms/sunwell_plateau/boss_kiljaeden.cpp @@ -439,7 +439,7 @@ struct MANGOS_DLL_DECL boss_kiljaedenAI : public Scripted_NoMovementAI, private DoScriptText(urand(0, 1) ? SAY_SLAY_1 : SAY_SLAY_2, m_creature); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { if (m_pInstance) m_pInstance->SetData(TYPE_KILJAEDEN, DONE); diff --git a/scripts/eastern_kingdoms/sunwell_plateau/boss_muru.cpp b/scripts/eastern_kingdoms/sunwell_plateau/boss_muru.cpp index f043f09eb..d2f27bdb6 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/boss_muru.cpp +++ b/scripts/eastern_kingdoms/sunwell_plateau/boss_muru.cpp @@ -236,7 +236,7 @@ struct MANGOS_DLL_DECL boss_entropiusAI : public ScriptedAI DoCastSpellIfCan(m_creature, SPELL_NEGATIVE_ENERGY_ENT); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { if (m_pInstance) m_pInstance->SetData(TYPE_MURU, DONE); diff --git a/scripts/eastern_kingdoms/sunwell_plateau/instance_sunwell_plateau.cpp b/scripts/eastern_kingdoms/sunwell_plateau/instance_sunwell_plateau.cpp index 96d03e475..945f5677e 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/instance_sunwell_plateau.cpp +++ b/scripts/eastern_kingdoms/sunwell_plateau/instance_sunwell_plateau.cpp @@ -42,10 +42,10 @@ static const DialogueEntry aFelmystOutroDialogue[] = }; instance_sunwell_plateau::instance_sunwell_plateau(Map* pMap) : ScriptedInstance(pMap), DialogueHelper(aFelmystOutroDialogue), - m_uiMuruBerserkTimer(0), m_uiDeceiversKilled(0), - m_uiKalecRespawnTimer(0), m_uiSpectralRealmTimer(5000), + m_uiKalecRespawnTimer(0), + m_uiMuruBerserkTimer(0), m_uiKiljaedenYellTimer(90000) { Initialize(); diff --git a/scripts/eastern_kingdoms/uldaman/boss_archaedas.cpp b/scripts/eastern_kingdoms/uldaman/boss_archaedas.cpp index 120e234a3..4f8040322 100644 --- a/scripts/eastern_kingdoms/uldaman/boss_archaedas.cpp +++ b/scripts/eastern_kingdoms/uldaman/boss_archaedas.cpp @@ -75,12 +75,12 @@ struct MANGOS_DLL_DECL boss_archaedasAI : public ScriptedAI m_pInstance->SetData(TYPE_ARCHAEDAS, IN_PROGRESS); } - void KilledUnit(Unit* pVictim) override + void KilledUnit(Unit* /*pVictim*/) override { DoScriptText(SAY_UNIT_SLAIN, m_creature); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { // open door to vault (handled by instance script) if (m_pInstance) diff --git a/scripts/eastern_kingdoms/uldaman/instance_uldaman.cpp b/scripts/eastern_kingdoms/uldaman/instance_uldaman.cpp index c1fc06d14..b539f4cd8 100644 --- a/scripts/eastern_kingdoms/uldaman/instance_uldaman.cpp +++ b/scripts/eastern_kingdoms/uldaman/instance_uldaman.cpp @@ -26,8 +26,8 @@ EndScriptData #include "uldaman.h" instance_uldaman::instance_uldaman(Map* pMap) : ScriptedInstance(pMap), - m_uiStoneKeepersFallen(0), - m_uiKeeperCooldown(5000) + m_uiKeeperCooldown(5000), + m_uiStoneKeepersFallen(0) { Initialize(); } diff --git a/scripts/eastern_kingdoms/zulaman/boss_akilzon.cpp b/scripts/eastern_kingdoms/zulaman/boss_akilzon.cpp index 0a9fa9675..3b04e841e 100644 --- a/scripts/eastern_kingdoms/zulaman/boss_akilzon.cpp +++ b/scripts/eastern_kingdoms/zulaman/boss_akilzon.cpp @@ -86,12 +86,12 @@ struct MANGOS_DLL_DECL boss_akilzonAI : public ScriptedAI m_pInstance->SetData(TYPE_AKILZON, IN_PROGRESS); } - void KilledUnit(Unit* pVictim) override + void KilledUnit(Unit* /*pVictim*/) override { DoScriptText(urand(0, 1) ? SAY_SLAY1 : SAY_SLAY2, m_creature); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoScriptText(SAY_DEATH, m_creature); diff --git a/scripts/eastern_kingdoms/zulaman/boss_halazzi.cpp b/scripts/eastern_kingdoms/zulaman/boss_halazzi.cpp index eb160ea14..6f0d6cd01 100644 --- a/scripts/eastern_kingdoms/zulaman/boss_halazzi.cpp +++ b/scripts/eastern_kingdoms/zulaman/boss_halazzi.cpp @@ -143,7 +143,7 @@ struct MANGOS_DLL_DECL boss_halazziAI : public ScriptedAI DoScriptText(urand(0, 1) ? SAY_KILL1 : SAY_KILL2, m_creature); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoScriptText(SAY_DEATH, m_creature); diff --git a/scripts/eastern_kingdoms/zulaman/boss_janalai.cpp b/scripts/eastern_kingdoms/zulaman/boss_janalai.cpp index 03d9cbb56..ce75145fc 100644 --- a/scripts/eastern_kingdoms/zulaman/boss_janalai.cpp +++ b/scripts/eastern_kingdoms/zulaman/boss_janalai.cpp @@ -157,7 +157,7 @@ struct MANGOS_DLL_DECL boss_janalaiAI : public ScriptedAI m_pInstance->SetData(TYPE_JANALAI, FAIL); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoScriptText(SAY_DEATH, m_creature); @@ -165,7 +165,7 @@ struct MANGOS_DLL_DECL boss_janalaiAI : public ScriptedAI m_pInstance->SetData(TYPE_JANALAI, DONE); } - void KilledUnit(Unit* pVictim) override + void KilledUnit(Unit* /*pVictim*/) override { DoScriptText(urand(0, 1) ? SAY_SLAY_1 : SAY_SLAY_2, m_creature); } diff --git a/scripts/eastern_kingdoms/zulaman/boss_malacrass.cpp b/scripts/eastern_kingdoms/zulaman/boss_malacrass.cpp index 0ad653712..364ff5324 100644 --- a/scripts/eastern_kingdoms/zulaman/boss_malacrass.cpp +++ b/scripts/eastern_kingdoms/zulaman/boss_malacrass.cpp @@ -280,7 +280,7 @@ struct MANGOS_DLL_DECL boss_malacrassAI : public ScriptedAI for (uint8 i = 0; i < MAX_ACTIVE_ADDS; ++i) { // If we already have the creature on the map, then don't summon it - if (Creature* pAdd = m_pInstance->GetSingleCreatureFromStorage(m_vAddsEntryList[i], true)) + if (m_pInstance->GetSingleCreatureFromStorage(m_vAddsEntryList[i], true)) continue; m_creature->SummonCreature(m_vAddsEntryList[i], m_aAddPositions[i][0], m_aAddPositions[i][1], m_aAddPositions[i][2], m_aAddPositions[i][3], TEMPSUMMON_CORPSE_DESPAWN, 0); @@ -304,7 +304,7 @@ struct MANGOS_DLL_DECL boss_malacrassAI : public ScriptedAI DoScriptText(urand(0, 1) ? SAY_KILL1 : SAY_KILL2, m_creature); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoScriptText(SAY_DEATH, m_creature); diff --git a/scripts/eastern_kingdoms/zulaman/boss_nalorakk.cpp b/scripts/eastern_kingdoms/zulaman/boss_nalorakk.cpp index 8a7cdf1e0..a512302b7 100644 --- a/scripts/eastern_kingdoms/zulaman/boss_nalorakk.cpp +++ b/scripts/eastern_kingdoms/zulaman/boss_nalorakk.cpp @@ -151,12 +151,12 @@ struct MANGOS_DLL_DECL boss_nalorakkAI : public ScriptedAI m_pInstance->SetData(TYPE_NALORAKK, IN_PROGRESS); } - void KilledUnit(Unit* pVictim) override + void KilledUnit(Unit* /*pVictim*/) override { DoScriptText(urand(0, 1) ? SAY_SLAY1 : SAY_SLAY2, m_creature); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoScriptText(SAY_DEATH, m_creature); diff --git a/scripts/eastern_kingdoms/zulaman/boss_zuljin.cpp b/scripts/eastern_kingdoms/zulaman/boss_zuljin.cpp index 41b0583f7..27f821c30 100644 --- a/scripts/eastern_kingdoms/zulaman/boss_zuljin.cpp +++ b/scripts/eastern_kingdoms/zulaman/boss_zuljin.cpp @@ -194,12 +194,12 @@ struct MANGOS_DLL_DECL boss_zuljinAI : public ScriptedAI } } - void KilledUnit(Unit* pVictim) override + void KilledUnit(Unit* /*pVictim*/) override { DoScriptText(urand(0, 1) ? SAY_KILL1 : SAY_KILL2, m_creature); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoScriptText(SAY_DEATH, m_creature); @@ -404,11 +404,8 @@ struct MANGOS_DLL_DECL boss_zuljinAI : public ScriptedAI if (m_uiFlameBreathTimer < uiDiff) { - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) - { - if (DoCastSpellIfCan(m_creature, SPELL_FLAME_BREATH) == CAST_OK) - m_uiFlameBreathTimer = 15000; - } + if (DoCastSpellIfCan(m_creature, SPELL_FLAME_BREATH) == CAST_OK) + m_uiFlameBreathTimer = 15000; } else m_uiFlameBreathTimer -= uiDiff; diff --git a/scripts/eastern_kingdoms/zulgurub/boss_arlokk.cpp b/scripts/eastern_kingdoms/zulgurub/boss_arlokk.cpp index f10acfbc8..382c292c7 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_arlokk.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_arlokk.cpp @@ -98,7 +98,7 @@ struct MANGOS_DLL_DECL boss_arlokkAI : public ScriptedAI m_creature->ForcedDespawn(); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoScriptText(SAY_DEATH, m_creature); // Restore visibility in case of killed by dots diff --git a/scripts/eastern_kingdoms/zulgurub/boss_jeklik.cpp b/scripts/eastern_kingdoms/zulgurub/boss_jeklik.cpp index 907302c07..e33c4c343 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_jeklik.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_jeklik.cpp @@ -112,7 +112,7 @@ struct MANGOS_DLL_DECL boss_jeklikAI : public ScriptedAI m_creature->SetLevitate(true); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoScriptText(SAY_DEATH, m_creature); DoDespawnBombRiders(); diff --git a/scripts/eastern_kingdoms/zulgurub/boss_mandokir.cpp b/scripts/eastern_kingdoms/zulgurub/boss_mandokir.cpp index bc1d7edcb..fe54cbdc5 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_mandokir.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_mandokir.cpp @@ -143,7 +143,7 @@ struct MANGOS_DLL_DECL boss_mandokirAI : public ScriptedAI m_pInstance->SetData(TYPE_OHGAN, FAIL); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { if (m_pInstance) m_pInstance->SetData(TYPE_OHGAN, DONE); diff --git a/scripts/eastern_kingdoms/zulgurub/boss_marli.cpp b/scripts/eastern_kingdoms/zulgurub/boss_marli.cpp index 8b0ef8bb8..177ecd26d 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_marli.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_marli.cpp @@ -92,7 +92,7 @@ struct MANGOS_DLL_DECL boss_marliAI : public ScriptedAI DoCastSpellIfCan(m_creature, SPELL_HATCH_EGGS); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoScriptText(SAY_DEATH, m_creature); diff --git a/scripts/eastern_kingdoms/zulgurub/boss_thekal.cpp b/scripts/eastern_kingdoms/zulgurub/boss_thekal.cpp index a133c322b..36c72e7d2 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_thekal.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_thekal.cpp @@ -181,7 +181,7 @@ struct MANGOS_DLL_DECL boss_thekalAI : public boss_thekalBaseAI DoScriptText(SAY_AGGRO, m_creature); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoScriptText(SAY_DEATH, m_creature); diff --git a/scripts/eastern_kingdoms/zulgurub/boss_venoxis.cpp b/scripts/eastern_kingdoms/zulgurub/boss_venoxis.cpp index c177d09bc..4ba2b238a 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_venoxis.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_venoxis.cpp @@ -88,7 +88,7 @@ struct MANGOS_DLL_DECL boss_venoxisAI : public ScriptedAI m_pInstance->SetData(TYPE_VENOXIS, FAIL); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoScriptText(SAY_DEATH, m_creature); diff --git a/scripts/examples/example_creature.cpp b/scripts/examples/example_creature.cpp index a5f285f5f..2c235a45c 100644 --- a/scripts/examples/example_creature.cpp +++ b/scripts/examples/example_creature.cpp @@ -110,7 +110,7 @@ struct MANGOS_DLL_DECL example_creatureAI : public ScriptedAI // *** HANDLED FUNCTION *** // Our Recive emote function - void ReceiveEmote(Player* pPlayer, uint32 uiTextEmote) override + void ReceiveEmote(Player* /*pPlayer*/, uint32 uiTextEmote) override { m_creature->HandleEmote(uiTextEmote); @@ -263,7 +263,7 @@ bool GossipHello_example_creature(Player* pPlayer, Creature* pCreature) // This function is called when the player clicks an option on the gossip menu // In this case here the faction change could be handled by world-DB gossip, hence it should be handled there! -bool GossipSelect_example_creature(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +bool GossipSelect_example_creature(Player* pPlayer, Creature* pCreature, uint32 /*uiSender*/, uint32 uiAction) { if (uiAction == GOSSIP_ACTION_INFO_DEF + 1) { diff --git a/scripts/examples/example_escort.cpp b/scripts/examples/example_escort.cpp index 8bcdd27d7..78d65af47 100644 --- a/scripts/examples/example_escort.cpp +++ b/scripts/examples/example_escort.cpp @@ -94,7 +94,7 @@ struct MANGOS_DLL_DECL example_escortAI : public npc_escortAI } } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { if (HasEscortState(STATE_ESCORT_ESCORTING)) { @@ -191,7 +191,7 @@ bool GossipHello_example_escort(Player* pPlayer, Creature* pCreature) return true; } -bool GossipSelect_example_escort(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +bool GossipSelect_example_escort(Player* pPlayer, Creature* pCreature, uint32 /*uiSender*/, uint32 uiAction) { example_escortAI* pEscortAI = dynamic_cast(pCreature->AI()); diff --git a/scripts/examples/example_gossip_codebox.cpp b/scripts/examples/example_gossip_codebox.cpp index 0caa6623b..0f6ee79d0 100644 --- a/scripts/examples/example_gossip_codebox.cpp +++ b/scripts/examples/example_gossip_codebox.cpp @@ -50,7 +50,7 @@ bool GossipHello_example_gossip_codebox(Player* pPlayer, Creature* pCreature) } // This function is called when the player clicks an option on the gossip menubool -bool GossipSelect_example_gossip_codebox(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +bool GossipSelect_example_gossip_codebox(Player* pPlayer, Creature* pCreature, uint32 /*uiSender*/, uint32 uiAction) { if (uiAction == GOSSIP_ACTION_INFO_DEF + 2) { diff --git a/scripts/examples/example_misc.cpp b/scripts/examples/example_misc.cpp index e9bd36723..464c50b40 100644 --- a/scripts/examples/example_misc.cpp +++ b/scripts/examples/example_misc.cpp @@ -28,20 +28,20 @@ enum SAY_HI = -1999925 }; -bool AreaTrigger_at_example(Player* pPlayer, AreaTriggerEntry const* pAt) +bool AreaTrigger_at_example(Player* pPlayer, AreaTriggerEntry const* /*pAt*/) { DoScriptText(SAY_HI, pPlayer); return true; } extern void LoadDatabase(); -bool ItemUse_example_item(Player* pPlayer, Item* pItem, SpellCastTargets const& scTargets) +bool ItemUse_example_item(Player* /*pPlayer*/, Item* /*pItem*/, SpellCastTargets const& /*scTargets*/) { LoadDatabase(); return true; } -bool GOUse_example_go_teleporter(Player* pPlayer, GameObject* pGo) +bool GOUse_example_go_teleporter(Player* pPlayer, GameObject* /*pGo*/) { pPlayer->TeleportTo(0, 1807.07f, 336.105f, 70.3975f, 0.0f); return false; diff --git a/scripts/kalimdor/caverns_of_time/dark_portal/boss_aeonus.cpp b/scripts/kalimdor/caverns_of_time/dark_portal/boss_aeonus.cpp index c6b3e1272..b7bb02462 100644 --- a/scripts/kalimdor/caverns_of_time/dark_portal/boss_aeonus.cpp +++ b/scripts/kalimdor/caverns_of_time/dark_portal/boss_aeonus.cpp @@ -85,12 +85,12 @@ struct MANGOS_DLL_DECL boss_aeonusAI : public ScriptedAI ScriptedAI::MoveInLineOfSight(pWho); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoScriptText(SAY_DEATH, m_creature); } - void KilledUnit(Unit* pVictim) override + void KilledUnit(Unit* /*pVictim*/) override { DoScriptText(urand(0, 1) ? SAY_SLAY1 : SAY_SLAY2, m_creature); } diff --git a/scripts/kalimdor/caverns_of_time/dark_portal/boss_chrono_lord_deja.cpp b/scripts/kalimdor/caverns_of_time/dark_portal/boss_chrono_lord_deja.cpp index 2a77964c8..2991aebda 100644 --- a/scripts/kalimdor/caverns_of_time/dark_portal/boss_chrono_lord_deja.cpp +++ b/scripts/kalimdor/caverns_of_time/dark_portal/boss_chrono_lord_deja.cpp @@ -85,7 +85,7 @@ struct MANGOS_DLL_DECL boss_chrono_lord_dejaAI : public ScriptedAI ScriptedAI::MoveInLineOfSight(pWho); } - void KilledUnit(Unit* pVictim) override + void KilledUnit(Unit* /*pVictim*/) override { DoScriptText(urand(0, 1) ? SAY_SLAY1 : SAY_SLAY2, m_creature); } diff --git a/scripts/kalimdor/caverns_of_time/dark_portal/boss_temporus.cpp b/scripts/kalimdor/caverns_of_time/dark_portal/boss_temporus.cpp index a21f86d13..bab77bb05 100644 --- a/scripts/kalimdor/caverns_of_time/dark_portal/boss_temporus.cpp +++ b/scripts/kalimdor/caverns_of_time/dark_portal/boss_temporus.cpp @@ -69,12 +69,12 @@ struct MANGOS_DLL_DECL boss_temporusAI : public ScriptedAI DoScriptText(SAY_AGGRO, m_creature); } - void KilledUnit(Unit* pVictim) override + void KilledUnit(Unit* /*pVictim*/) override { DoScriptText(urand(0, 1) ? SAY_SLAY1 : SAY_SLAY2, m_creature); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoScriptText(SAY_DEATH, m_creature); } diff --git a/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.cpp b/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.cpp index c18b97e28..dfee27cd3 100644 --- a/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.cpp +++ b/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.cpp @@ -74,7 +74,7 @@ struct MANGOS_DLL_DECL npc_medivh_black_morassAI : public ScriptedAI pSummoned->CastSpell(m_creature, SPELL_CORRUPT, false); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { if (m_pInstance) m_pInstance->SetData(TYPE_MEDIVH, FAIL); @@ -126,9 +126,9 @@ struct RiftWaveData static const RiftWaveData aPortalWaves[] = { - {NPC_ASSASSIN, NPC_WHELP, NPC_CHRONOMANCER, 0}, - {NPC_EXECUTIONER, NPC_CHRONOMANCER, NPC_WHELP, NPC_ASSASSIN}, - {NPC_EXECUTIONER, NPC_VANQUISHER, NPC_CHRONOMANCER, NPC_ASSASSIN} + {{NPC_ASSASSIN, NPC_WHELP, NPC_CHRONOMANCER, 0}}, + {{NPC_EXECUTIONER, NPC_CHRONOMANCER, NPC_WHELP, NPC_ASSASSIN}}, + {{NPC_EXECUTIONER, NPC_VANQUISHER, NPC_CHRONOMANCER, NPC_ASSASSIN}} }; struct MANGOS_DLL_DECL npc_time_riftAI : public ScriptedAI diff --git a/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.h b/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.h index 4a58c3cc4..13f733dd3 100644 --- a/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.h +++ b/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.h @@ -138,11 +138,10 @@ class MANGOS_DLL_DECL instance_dark_portal : public ScriptedInstance uint32 m_uiWorldStateShieldCount; bool m_bHasIntroYelled; + uint32 m_uiMedivhYellCount; uint32 m_uiNextPortalTimer; uint8 m_uiCurrentRiftId; - - uint32 m_uiMedivhYellCount; }; #endif diff --git a/scripts/kalimdor/caverns_of_time/dark_portal/instance_dark_portal.cpp b/scripts/kalimdor/caverns_of_time/dark_portal/instance_dark_portal.cpp index bd494832d..d6a6f3d4e 100644 --- a/scripts/kalimdor/caverns_of_time/dark_portal/instance_dark_portal.cpp +++ b/scripts/kalimdor/caverns_of_time/dark_portal/instance_dark_portal.cpp @@ -29,11 +29,11 @@ instance_dark_portal::instance_dark_portal(Map* pMap) : ScriptedInstance(pMap), m_uiWorldStateRiftCount(0), m_uiWorldStateShieldCount(100), + m_bHasIntroYelled(false), m_uiMedivhYellCount(1), - m_uiNextPortalTimer(0), - m_uiCurrentRiftId(0), - m_bHasIntroYelled(false) + m_uiNextPortalTimer(0), + m_uiCurrentRiftId(0) { Initialize(); } diff --git a/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.h b/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.h index 1e8d88603..b8b364f19 100644 --- a/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.h +++ b/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.h @@ -80,7 +80,7 @@ struct MANGOS_DLL_DECL hyjalAI : public ScriptedAI void UpdateAI(const uint32 uiDiff) override; // Called on death, informs the raid that they have failed. - void JustDied(Unit* pKiller) override; + void JustDied(Unit* /*pKiller*/) override; // "Teleport" all friendly creatures away from the base. void Retreat(); diff --git a/scripts/kalimdor/caverns_of_time/old_hillsbrad/instance_old_hillsbrad.cpp b/scripts/kalimdor/caverns_of_time/old_hillsbrad/instance_old_hillsbrad.cpp index 6f5216057..c4c9c6fbf 100644 --- a/scripts/kalimdor/caverns_of_time/old_hillsbrad/instance_old_hillsbrad.cpp +++ b/scripts/kalimdor/caverns_of_time/old_hillsbrad/instance_old_hillsbrad.cpp @@ -135,7 +135,7 @@ void instance_old_hillsbrad::HandleThrallRelocation() pThrall->Respawn(); // epoch failed, reloc to inn - if (GetData(TYPE_ESCORT_INN == DONE)) + if (GetData(TYPE_ESCORT_INN) == DONE) pThrall->GetMap()->CreatureRelocation(pThrall, 2660.57f, 659.173f, 61.9370f, 5.76f); // barn to inn failed, reloc to barn else if (GetData(TYPE_ESCORT_BARN) == DONE) diff --git a/scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.cpp b/scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.cpp index 0169e4dcb..f9ec418f1 100644 --- a/scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.cpp +++ b/scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.cpp @@ -304,7 +304,7 @@ struct MANGOS_DLL_DECL npc_thrall_old_hillsbradAI : public npc_escortAI, private } } - void KilledUnit(Unit* pVictim) override + void KilledUnit(Unit* /*pVictim*/) override { switch (urand(0, 2)) { @@ -314,7 +314,7 @@ struct MANGOS_DLL_DECL npc_thrall_old_hillsbradAI : public npc_escortAI, private } } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { // fail, and relocation handled in instance script if (m_pInstance) diff --git a/scripts/kalimdor/desolace.cpp b/scripts/kalimdor/desolace.cpp index 898878099..68bdde2da 100644 --- a/scripts/kalimdor/desolace.cpp +++ b/scripts/kalimdor/desolace.cpp @@ -270,7 +270,7 @@ static const SummonLocation aMarauderSpawn[] = { -1306.730f, 2675.163f, 111.561f}, }; -static const SummonLocation aWranglerSpawn[] = { -1393.194f, 2429.465f, 88.689f}; +static const SummonLocation wranglerSpawn = { -1393.194f, 2429.465f, 88.689f }; struct MANGOS_DLL_DECL npc_melizza_brimbuzzleAI : public npc_escortAI, private DialogueHelper { @@ -322,10 +322,10 @@ struct MANGOS_DLL_DECL npc_melizza_brimbuzzleAI : public npc_escortAI, private D for (uint8 i = 0; i < MAX_WRANGLERS; ++i) { float fX, fY, fZ; - m_creature->GetRandomPoint(aWranglerSpawn[0].m_fX, aWranglerSpawn[0].m_fY, aWranglerSpawn[0].m_fZ, 10.0f, fX, fY, fZ); + m_creature->GetRandomPoint(wranglerSpawn.m_fX, wranglerSpawn.m_fY, wranglerSpawn.m_fZ, 10.0f, fX, fY, fZ); m_creature->SummonCreature(NPC_MARAUDINE_BONEPAW, fX, fY, fZ, 0.0f, TEMPSUMMON_DEAD_DESPAWN, 0); - m_creature->GetRandomPoint(aWranglerSpawn[0].m_fX, aWranglerSpawn[0].m_fY, aWranglerSpawn[0].m_fZ, 10.0f, fX, fY, fZ); + m_creature->GetRandomPoint(wranglerSpawn.m_fX, wranglerSpawn.m_fY, wranglerSpawn.m_fZ, 10.0f, fX, fY, fZ); m_creature->SummonCreature(NPC_MARAUDINE_WRANGLER, fX, fY, fZ, 0.0f, TEMPSUMMON_DEAD_DESPAWN, 0); } break; diff --git a/scripts/kalimdor/felwood.cpp b/scripts/kalimdor/felwood.cpp index e0bd6c3d5..e1f4fccad 100644 --- a/scripts/kalimdor/felwood.cpp +++ b/scripts/kalimdor/felwood.cpp @@ -322,7 +322,7 @@ struct MANGOS_DLL_DECL npc_kroshiusAI : public ScriptedAI // TODO: A visual Flame Circle around the mob still missing } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { m_uiPhase = 0; } diff --git a/scripts/kalimdor/moonglade.cpp b/scripts/kalimdor/moonglade.cpp index 8268f39ca..74d744ca4 100644 --- a/scripts/kalimdor/moonglade.cpp +++ b/scripts/kalimdor/moonglade.cpp @@ -514,7 +514,7 @@ struct MANGOS_DLL_DECL npc_keeper_remulosAI : public npc_escortAI, private Dialo // Summon 3 shades per turn until the maximum summon turns are reached float fX, fY, fZ; // Randomize the summon point - uint8 uiSummonPoint = roll_chance_i(70) ? MAX_SHADOWS : urand(MAX_SHADOWS + 1, MAX_SHADOWS + 2); + uint8 uiSummonPoint = roll_chance_i(70) ? uint32(MAX_SHADOWS) : urand(MAX_SHADOWS + 1, MAX_SHADOWS + 2); if (m_uiSummonCount < MAX_SUMMON_TURNS) { diff --git a/scripts/kalimdor/onyxias_lair/boss_onyxia.cpp b/scripts/kalimdor/onyxias_lair/boss_onyxia.cpp index 74fb22aec..61bf2d3e8 100644 --- a/scripts/kalimdor/onyxias_lair/boss_onyxia.cpp +++ b/scripts/kalimdor/onyxias_lair/boss_onyxia.cpp @@ -182,7 +182,7 @@ struct MANGOS_DLL_DECL boss_onyxiaAI : public ScriptedAI m_pInstance->SetData(TYPE_ONYXIA, FAIL); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { if (m_pInstance) m_pInstance->SetData(TYPE_ONYXIA, DONE); @@ -215,7 +215,7 @@ struct MANGOS_DLL_DECL boss_onyxiaAI : public ScriptedAI pSummoned->SetInCombatWithZone(); } - void KilledUnit(Unit* pVictim) override + void KilledUnit(Unit* /*pVictim*/) override { DoScriptText(SAY_KILL, m_creature); } @@ -232,7 +232,8 @@ struct MANGOS_DLL_DECL boss_onyxiaAI : public ScriptedAI pSpell->Id == SPELL_BREATH_NORTH_TO_SOUTH) { // This was sent with SendMonsterMove - which resulted in better speed than now - if (m_pPointData = GetMoveData()) + m_pPointData = GetMoveData(); + if (m_pPointData) m_creature->GetMotionMaster()->MovePoint(m_pPointData->uiLocId, m_pPointData->fX, m_pPointData->fY, m_pPointData->fZ); } } @@ -359,7 +360,8 @@ struct MANGOS_DLL_DECL boss_onyxiaAI : public ScriptedAI switch (urand(0, 2)) { case 0: // breath - if (m_pPointData = GetMoveData()) + m_pPointData = GetMoveData(); + if (m_pPointData) { DoScriptText(EMOTE_BREATH, m_creature); DoCastSpellIfCan(m_creature, m_pPointData->uiSpellId, CAST_INTERRUPT_PREVIOUS); @@ -378,7 +380,8 @@ struct MANGOS_DLL_DECL boss_onyxiaAI : public ScriptedAI break; } - if (m_pPointData = GetMoveData()) + m_pPointData = GetMoveData(); + if (m_pPointData) m_creature->GetMotionMaster()->MovePoint(m_pPointData->uiLocId, m_pPointData->fX, m_pPointData->fY, m_pPointData->fZ); } else diff --git a/scripts/kalimdor/ruins_of_ahnqiraj/boss_buru.cpp b/scripts/kalimdor/ruins_of_ahnqiraj/boss_buru.cpp index d7f2b150a..c653ed50a 100644 --- a/scripts/kalimdor/ruins_of_ahnqiraj/boss_buru.cpp +++ b/scripts/kalimdor/ruins_of_ahnqiraj/boss_buru.cpp @@ -204,7 +204,7 @@ struct MANGOS_DLL_DECL npc_buru_eggAI : public Scripted_NoMovementAI } } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { // Explode and Summon hatchling DoCastSpellIfCan(m_creature, SPELL_EXPLODE, CAST_TRIGGERED); diff --git a/scripts/kalimdor/ruins_of_ahnqiraj/boss_ossirian.cpp b/scripts/kalimdor/ruins_of_ahnqiraj/boss_ossirian.cpp index f37aff97b..35e90d790 100644 --- a/scripts/kalimdor/ruins_of_ahnqiraj/boss_ossirian.cpp +++ b/scripts/kalimdor/ruins_of_ahnqiraj/boss_ossirian.cpp @@ -94,12 +94,12 @@ struct MANGOS_DLL_DECL boss_ossirianAI : public ScriptedAI DoSpawnNextCrystal(); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoScriptText(SAY_DEATH, m_creature); } - void KilledUnit(Unit* pVictim) override + void KilledUnit(Unit* /*pVictim*/) override { DoScriptText(SAY_SLAY, m_creature); } diff --git a/scripts/kalimdor/ruins_of_ahnqiraj/boss_rajaxx.cpp b/scripts/kalimdor/ruins_of_ahnqiraj/boss_rajaxx.cpp index 5dd2c38f9..aa5feb074 100644 --- a/scripts/kalimdor/ruins_of_ahnqiraj/boss_rajaxx.cpp +++ b/scripts/kalimdor/ruins_of_ahnqiraj/boss_rajaxx.cpp @@ -284,11 +284,8 @@ bool GossipSelect_npc_general_andorov(Player* pPlayer, Creature* pCreature, uint { if (uiAction == GOSSIP_ACTION_INFO_DEF + 1) { - if (instance_ruins_of_ahnqiraj* pInstance = (instance_ruins_of_ahnqiraj*)pCreature->GetInstanceData()) - { - if (npc_general_andorovAI* pAndorovAI = dynamic_cast(pCreature->AI())) - pAndorovAI->DoMoveToEventLocation(); - } + if (npc_general_andorovAI* pAndorovAI = dynamic_cast(pCreature->AI())) + pAndorovAI->DoMoveToEventLocation(); pPlayer->CLOSE_GOSSIP_MENU(); } diff --git a/scripts/kalimdor/silithus.cpp b/scripts/kalimdor/silithus.cpp index f9ffedc99..577f6dc59 100644 --- a/scripts/kalimdor/silithus.cpp +++ b/scripts/kalimdor/silithus.cpp @@ -654,7 +654,7 @@ bool QuestAcceptGO_crystalline_tear(Player* pPlayer, GameObject* pGo, const Ques if (pQuest->GetQuestId() == QUEST_A_PAWN_ON_THE_ETERNAL_BOARD) { // Check if event is already in progress first - if (Creature* pAnachronos = GetClosestCreatureWithEntry(pGo, NPC_ANACHRONOS_THE_ANCIENT, 90.0f)) + if (GetClosestCreatureWithEntry(pGo, NPC_ANACHRONOS_THE_ANCIENT, 90.0f)) return true; if (Creature* pAnachronos = pPlayer->SummonCreature(NPC_ANACHRONOS_THE_ANCIENT, pGo->GetPositionX(), pGo->GetPositionY(), pGo->GetPositionZ(), 3.75f, TEMPSUMMON_CORPSE_DESPAWN, 0)) diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_bug_trio.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_bug_trio.cpp index 6088fa87c..39b13cbbf 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/boss_bug_trio.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_bug_trio.cpp @@ -62,7 +62,7 @@ struct MANGOS_DLL_DECL boss_kriAI : public ScriptedAI m_uiToxicVolleyTimer = urand(6000, 12000); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { // poison cloud on death DoCastSpellIfCan(m_creature, SPELL_SUMMON_CLOUD, CAST_TRIGGERED); @@ -131,7 +131,7 @@ struct MANGOS_DLL_DECL boss_vemAI : public ScriptedAI m_uiKnockBackTimer = urand(8000, 20000); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { // Enrage the other bugs DoCastSpellIfCan(m_creature, SPELL_VENGEANCE, CAST_TRIGGERED); diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_cthun.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_cthun.cpp index f686e10ce..24dc44219 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/boss_cthun.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_cthun.cpp @@ -417,7 +417,7 @@ struct MANGOS_DLL_DECL boss_cthunAI : public Scripted_NoMovementAI m_pInstance->SetData(TYPE_CTHUN, FAIL); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { m_creature->SetActiveObjectState(false); diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_fankriss.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_fankriss.cpp index 244bd81c6..342880c0c 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/boss_fankriss.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_fankriss.cpp @@ -84,7 +84,7 @@ struct MANGOS_DLL_DECL boss_fankrissAI : public ScriptedAI m_pInstance->SetData(TYPE_FANKRISS, FAIL); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { if (m_pInstance) m_pInstance->SetData(TYPE_FANKRISS, DONE); diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_huhuran.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_huhuran.cpp index 8fb4a7c19..e7cae348f 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/boss_huhuran.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_huhuran.cpp @@ -74,7 +74,7 @@ struct MANGOS_DLL_DECL boss_huhuranAI : public ScriptedAI m_pInstance->SetData(TYPE_HUHURAN, FAIL); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { if (m_pInstance) m_pInstance->SetData(TYPE_HUHURAN, DONE); diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_ouro.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_ouro.cpp index ffc261be8..a9d380834 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/boss_ouro.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_ouro.cpp @@ -111,7 +111,7 @@ struct MANGOS_DLL_DECL boss_ouroAI : public Scripted_NoMovementAI m_creature->ForcedDespawn(); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { if (m_pInstance) m_pInstance->SetData(TYPE_OURO, DONE); diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_sartura.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_sartura.cpp index cc45ac61f..a9998806f 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/boss_sartura.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_sartura.cpp @@ -84,12 +84,12 @@ struct MANGOS_DLL_DECL boss_sarturaAI : public ScriptedAI m_pInstance->SetData(TYPE_SARTURA, IN_PROGRESS); } - void KilledUnit(Unit* pVictim) override + void KilledUnit(Unit* /*pVictim*/) override { DoScriptText(SAY_SLAY, m_creature); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoScriptText(SAY_DEATH, m_creature); diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_skeram.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_skeram.cpp index a9c293980..7a4378339 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/boss_skeram.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_skeram.cpp @@ -81,7 +81,7 @@ struct MANGOS_DLL_DECL boss_skeramAI : public ScriptedAI m_creature->SetVisibility(VISIBILITY_ON); } - void KilledUnit(Unit* pVictim) override + void KilledUnit(Unit* /*pVictim*/) override { switch (urand(0, 2)) { @@ -91,7 +91,7 @@ struct MANGOS_DLL_DECL boss_skeramAI : public ScriptedAI } } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { if (!m_bIsImage) { diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_twinemperors.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_twinemperors.cpp index fd1a3aff0..72440c038 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/boss_twinemperors.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_twinemperors.cpp @@ -111,7 +111,7 @@ struct MANGOS_DLL_DECL boss_twin_emperorsAI : public ScriptedAI m_pInstance->SetData(TYPE_TWINS, IN_PROGRESS); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { if (m_pInstance) m_pInstance->SetData(TYPE_TWINS, DONE); @@ -217,7 +217,7 @@ struct MANGOS_DLL_DECL boss_veknilashAI : public boss_twin_emperorsAI } } - void KilledUnit(Unit* pVictim) override + void KilledUnit(Unit* /*pVictim*/) override { DoScriptText(SAY_VEKNILASH_SLAY, m_creature); } @@ -327,7 +327,7 @@ struct MANGOS_DLL_DECL boss_veklorAI : public boss_twin_emperorsAI } } - void KilledUnit(Unit* pVictim) override + void KilledUnit(Unit* /*pVictim*/) override { DoScriptText(SAY_VEKLOR_SLAY, m_creature); } diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_viscidus.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_viscidus.cpp index 36f0e7f16..e86b27c0c 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/boss_viscidus.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_viscidus.cpp @@ -86,7 +86,7 @@ struct MANGOS_DLL_DECL boss_viscidusAI : public ScriptedAI m_pInstance->SetData(TYPE_VISCIDUS, FAIL); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { if (m_pInstance) m_pInstance->SetData(TYPE_VISCIDUS, DONE); diff --git a/scripts/kalimdor/temple_of_ahnqiraj/instance_temple_of_ahnqiraj.cpp b/scripts/kalimdor/temple_of_ahnqiraj/instance_temple_of_ahnqiraj.cpp index 547557634..aef40f5ad 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/instance_temple_of_ahnqiraj.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/instance_temple_of_ahnqiraj.cpp @@ -37,10 +37,10 @@ static const DialogueEntry aIntroDialogue[] = }; instance_temple_of_ahnqiraj::instance_temple_of_ahnqiraj(Map* pMap) : ScriptedInstance(pMap), - m_dialogueHelper(aIntroDialogue), - m_bIsEmperorsIntroDone(false), + m_uiBugTrioDeathCount(0), m_uiCthunWhisperTimer(90000), - m_uiBugTrioDeathCount(0) + m_bIsEmperorsIntroDone(false), + m_dialogueHelper(aIntroDialogue) { Initialize(); }; diff --git a/scripts/kalimdor/temple_of_ahnqiraj/mob_anubisath_sentinel.cpp b/scripts/kalimdor/temple_of_ahnqiraj/mob_anubisath_sentinel.cpp index e4c986dd5..6fc2785ae 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/mob_anubisath_sentinel.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/mob_anubisath_sentinel.cpp @@ -92,7 +92,7 @@ struct MANGOS_DLL_DECL npc_anubisath_sentinelAI : public ScriptedAI InitSentinelsNear(pWho); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoTransferAbility(); } diff --git a/scripts/northrend/azjol-nerub/ahnkahet/boss_amanitar.cpp b/scripts/northrend/azjol-nerub/ahnkahet/boss_amanitar.cpp index 740d3d8e4..c140d989d 100644 --- a/scripts/northrend/azjol-nerub/ahnkahet/boss_amanitar.cpp +++ b/scripts/northrend/azjol-nerub/ahnkahet/boss_amanitar.cpp @@ -83,7 +83,7 @@ struct MANGOS_DLL_DECL boss_amanitarAI : public ScriptedAI m_pInstance->SetData(TYPE_AMANITAR, IN_PROGRESS); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { if (m_pInstance) m_pInstance->SetData(TYPE_AMANITAR, DONE); diff --git a/scripts/northrend/azjol-nerub/ahnkahet/boss_jedoga.cpp b/scripts/northrend/azjol-nerub/ahnkahet/boss_jedoga.cpp index 579ceda06..8b495ecce 100644 --- a/scripts/northrend/azjol-nerub/ahnkahet/boss_jedoga.cpp +++ b/scripts/northrend/azjol-nerub/ahnkahet/boss_jedoga.cpp @@ -142,7 +142,7 @@ struct MANGOS_DLL_DECL boss_jedogaAI : public ScriptedAI m_pInstance->SetData(TYPE_JEDOGA, IN_PROGRESS); } - void KilledUnit(Unit* pVictim) override + void KilledUnit(Unit* /*pVictim*/) override { switch (urand(0, 2)) { @@ -152,7 +152,7 @@ struct MANGOS_DLL_DECL boss_jedogaAI : public ScriptedAI } } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoScriptText(SAY_DEATH, m_creature); diff --git a/scripts/northrend/azjol-nerub/ahnkahet/boss_nadox.cpp b/scripts/northrend/azjol-nerub/ahnkahet/boss_nadox.cpp index 2b079aa4a..a4d5622e2 100644 --- a/scripts/northrend/azjol-nerub/ahnkahet/boss_nadox.cpp +++ b/scripts/northrend/azjol-nerub/ahnkahet/boss_nadox.cpp @@ -148,7 +148,7 @@ struct MANGOS_DLL_DECL boss_nadoxAI : public ScriptedAI m_pInstance->SetData(TYPE_NADOX, FAIL); } - void KilledUnit(Unit* pVictim) override + void KilledUnit(Unit* /*pVictim*/) override { switch (urand(0, 2)) { @@ -158,7 +158,7 @@ struct MANGOS_DLL_DECL boss_nadoxAI : public ScriptedAI } } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoScriptText(SAY_DEATH, m_creature); diff --git a/scripts/northrend/azjol-nerub/ahnkahet/boss_taldaram.cpp b/scripts/northrend/azjol-nerub/ahnkahet/boss_taldaram.cpp index 1409c9e2f..2d7700fd0 100644 --- a/scripts/northrend/azjol-nerub/ahnkahet/boss_taldaram.cpp +++ b/scripts/northrend/azjol-nerub/ahnkahet/boss_taldaram.cpp @@ -104,7 +104,7 @@ struct MANGOS_DLL_DECL boss_taldaramAI : public ScriptedAI m_pInstance->SetData(TYPE_TALDARAM, IN_PROGRESS); } - void KilledUnit(Unit* pVictim) override + void KilledUnit(Unit* /*pVictim*/) override { switch (urand(0, 2)) { @@ -114,7 +114,7 @@ struct MANGOS_DLL_DECL boss_taldaramAI : public ScriptedAI } } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoScriptText(SAY_DEATH, m_creature); diff --git a/scripts/northrend/azjol-nerub/ahnkahet/boss_volazj.cpp b/scripts/northrend/azjol-nerub/ahnkahet/boss_volazj.cpp index 6392ba9ed..5128dcb2a 100644 --- a/scripts/northrend/azjol-nerub/ahnkahet/boss_volazj.cpp +++ b/scripts/northrend/azjol-nerub/ahnkahet/boss_volazj.cpp @@ -91,7 +91,7 @@ struct MANGOS_DLL_DECL boss_volazjAI : public ScriptedAI DoScriptText(SAY_AGGRO, m_creature); } - void KilledUnit(Unit* pVictim) override + void KilledUnit(Unit* /*pVictim*/) override { switch (urand(0, 2)) { @@ -101,7 +101,7 @@ struct MANGOS_DLL_DECL boss_volazjAI : public ScriptedAI } } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoScriptText(urand(0, 1) ? SAY_DEATH_1 : SAY_DEATH_2, m_creature); } diff --git a/scripts/northrend/azjol-nerub/ahnkahet/instance_ahnkahet.cpp b/scripts/northrend/azjol-nerub/ahnkahet/instance_ahnkahet.cpp index 07162b600..e56becc78 100644 --- a/scripts/northrend/azjol-nerub/ahnkahet/instance_ahnkahet.cpp +++ b/scripts/northrend/azjol-nerub/ahnkahet/instance_ahnkahet.cpp @@ -27,8 +27,8 @@ EndScriptData */ instance_ahnkahet::instance_ahnkahet(Map* pMap) : ScriptedInstance(pMap), m_bRespectElders(false), m_bVolunteerWork(false), - m_uiInitiatesKilled(0), - m_uiDevicesActivated(0) + m_uiDevicesActivated(0), + m_uiInitiatesKilled(0) { Initialize(); } diff --git a/scripts/northrend/azjol-nerub/azjol-nerub/boss_anubarak.cpp b/scripts/northrend/azjol-nerub/azjol-nerub/boss_anubarak.cpp index 8d98b8db3..2261a3b1f 100644 --- a/scripts/northrend/azjol-nerub/azjol-nerub/boss_anubarak.cpp +++ b/scripts/northrend/azjol-nerub/azjol-nerub/boss_anubarak.cpp @@ -117,7 +117,7 @@ struct MANGOS_DLL_DECL boss_anubarakAI : public ScriptedAI m_pInstance->SetData(TYPE_ANUBARAK, IN_PROGRESS); } - void KilledUnit(Unit* pVictim) override + void KilledUnit(Unit* /*pVictim*/) override { switch (urand(0, 2)) { @@ -127,7 +127,7 @@ struct MANGOS_DLL_DECL boss_anubarakAI : public ScriptedAI } } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoScriptText(SAY_DEATH, m_creature); diff --git a/scripts/northrend/azjol-nerub/azjol-nerub/boss_hadronox.cpp b/scripts/northrend/azjol-nerub/azjol-nerub/boss_hadronox.cpp index ef856428e..224e16dca 100644 --- a/scripts/northrend/azjol-nerub/azjol-nerub/boss_hadronox.cpp +++ b/scripts/northrend/azjol-nerub/azjol-nerub/boss_hadronox.cpp @@ -82,7 +82,7 @@ struct MANGOS_DLL_DECL boss_hadronoxAI : public ScriptedAI m_uiGrabTimer = urand(15000, 19000); } - void KilledUnit(Unit* pVictim) override + void KilledUnit(Unit* /*pVictim*/) override { m_creature->SetHealth(m_creature->GetHealth() + (m_creature->GetMaxHealth() * 0.1)); } diff --git a/scripts/northrend/azjol-nerub/azjol-nerub/boss_krikthir.cpp b/scripts/northrend/azjol-nerub/azjol-nerub/boss_krikthir.cpp index 35f65e9db..557bdebe8 100644 --- a/scripts/northrend/azjol-nerub/azjol-nerub/boss_krikthir.cpp +++ b/scripts/northrend/azjol-nerub/azjol-nerub/boss_krikthir.cpp @@ -87,7 +87,7 @@ struct MANGOS_DLL_DECL boss_krikthirAI : public ScriptedAI DoScriptText(SAY_AGGRO, m_creature); } - void KilledUnit(Unit* pVictim) override + void KilledUnit(Unit* /*pVictim*/) override { switch (urand(0, 2)) { @@ -111,7 +111,7 @@ struct MANGOS_DLL_DECL boss_krikthirAI : public ScriptedAI } } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoScriptText(SAY_DEATH, m_creature); diff --git a/scripts/northrend/azjol-nerub/azjol-nerub/instance_azjol-nerub.cpp b/scripts/northrend/azjol-nerub/azjol-nerub/instance_azjol-nerub.cpp index ddb74081d..78fa5be76 100644 --- a/scripts/northrend/azjol-nerub/azjol-nerub/instance_azjol-nerub.cpp +++ b/scripts/northrend/azjol-nerub/azjol-nerub/instance_azjol-nerub.cpp @@ -25,8 +25,8 @@ EndScriptData */ #include "azjol-nerub.h" instance_azjol_nerub::instance_azjol_nerub(Map* pMap) : ScriptedInstance(pMap), - m_bWatchHimDie(true), - m_uiWatcherTimer(0) + m_uiWatcherTimer(0), + m_bWatchHimDie(true) { Initialize(); } diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp index 68555724b..75be14edc 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp @@ -162,7 +162,7 @@ struct MANGOS_DLL_DECL boss_anubarak_trialAI : public ScriptedAI m_pInstance->SetData(TYPE_ANUBARAK, FAIL); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoScriptText(SAY_DEATH, m_creature); diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_jaraxxus.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_jaraxxus.cpp index 1b992e0de..af710096a 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_jaraxxus.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_jaraxxus.cpp @@ -100,7 +100,7 @@ struct MANGOS_DLL_DECL boss_jaraxxusAI : public ScriptedAI m_creature->ForcedDespawn(); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { if (m_pInstance) m_pInstance->SetData(TYPE_JARAXXUS, DONE); diff --git a/scripts/northrend/draktharon_keep/boss_novos.cpp b/scripts/northrend/draktharon_keep/boss_novos.cpp index 82415adaa..1cccf51c0 100644 --- a/scripts/northrend/draktharon_keep/boss_novos.cpp +++ b/scripts/northrend/draktharon_keep/boss_novos.cpp @@ -163,12 +163,12 @@ struct MANGOS_DLL_DECL boss_novosAI : public Scripted_NoMovementAI m_pInstance->SetData(TYPE_NOVOS, IN_PROGRESS); } - void KilledUnit(Unit* pVictim) override + void KilledUnit(Unit* /*pVictim*/) override { DoScriptText(SAY_KILL, m_creature); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoScriptText(SAY_DEATH, m_creature); diff --git a/scripts/northrend/draktharon_keep/boss_tharonja.cpp b/scripts/northrend/draktharon_keep/boss_tharonja.cpp index f7281b417..999630a5f 100644 --- a/scripts/northrend/draktharon_keep/boss_tharonja.cpp +++ b/scripts/northrend/draktharon_keep/boss_tharonja.cpp @@ -116,12 +116,12 @@ struct MANGOS_DLL_DECL boss_tharonjaAI : public ScriptedAI m_pInstance->SetData(TYPE_THARONJA, IN_PROGRESS); } - void KilledUnit(Unit* pVictim) override + void KilledUnit(Unit* /*pVictim*/) override { DoScriptText(urand(0, 1) ? SAY_KILL_1 : SAY_KILL_2, m_creature); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoScriptText(SAY_DEATH, m_creature); diff --git a/scripts/northrend/draktharon_keep/boss_trollgore.cpp b/scripts/northrend/draktharon_keep/boss_trollgore.cpp index bd6624a89..a138f9836 100644 --- a/scripts/northrend/draktharon_keep/boss_trollgore.cpp +++ b/scripts/northrend/draktharon_keep/boss_trollgore.cpp @@ -102,7 +102,7 @@ struct MANGOS_DLL_DECL boss_trollgoreAI : public ScriptedAI DoScriptText(SAY_KILL, m_creature); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoScriptText(SAY_DEATH, m_creature); diff --git a/scripts/northrend/gundrak/boss_colossus.cpp b/scripts/northrend/gundrak/boss_colossus.cpp index 63b201368..bac07caaa 100644 --- a/scripts/northrend/gundrak/boss_colossus.cpp +++ b/scripts/northrend/gundrak/boss_colossus.cpp @@ -105,7 +105,7 @@ struct MANGOS_DLL_DECL boss_drakkari_elementalAI : public ScriptedAI m_creature->ForcedDespawn(); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { if (m_pInstance) { @@ -189,7 +189,7 @@ struct MANGOS_DLL_DECL boss_drakkari_colossusAI : public ScriptedAI m_pInstance->SetData(TYPE_COLOSSUS, IN_PROGRESS); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { if (m_pInstance) m_pInstance->SetData(TYPE_COLOSSUS, DONE); @@ -378,7 +378,7 @@ struct MANGOS_DLL_DECL npc_living_mojoAI : public ScriptedAI } } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_MOJO_PUDDLE : SPELL_MOJO_PUDDLE_H, CAST_TRIGGERED); } diff --git a/scripts/northrend/gundrak/boss_eck.cpp b/scripts/northrend/gundrak/boss_eck.cpp index 0ea46e8fd..3cf14a2dc 100644 --- a/scripts/northrend/gundrak/boss_eck.cpp +++ b/scripts/northrend/gundrak/boss_eck.cpp @@ -69,7 +69,7 @@ struct MANGOS_DLL_DECL boss_eckAI : public ScriptedAI m_pInstance->SetData(TYPE_ECK, IN_PROGRESS); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { if (m_pInstance) m_pInstance->SetData(TYPE_ECK, DONE); diff --git a/scripts/northrend/gundrak/boss_galdarah.cpp b/scripts/northrend/gundrak/boss_galdarah.cpp index d533e5b10..8b49206cb 100644 --- a/scripts/northrend/gundrak/boss_galdarah.cpp +++ b/scripts/northrend/gundrak/boss_galdarah.cpp @@ -105,7 +105,7 @@ struct MANGOS_DLL_DECL boss_galdarahAI : public ScriptedAI m_pInstance->SetData(TYPE_GALDARAH , IN_PROGRESS); } - void KilledUnit(Unit* pVictim) override + void KilledUnit(Unit* /*pVictim*/) override { switch (urand(0, 2)) { @@ -121,7 +121,7 @@ struct MANGOS_DLL_DECL boss_galdarahAI : public ScriptedAI m_pInstance->SetData(TYPE_GALDARAH, FAIL); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoScriptText(SAY_DEATH, m_creature); diff --git a/scripts/northrend/gundrak/boss_moorabi.cpp b/scripts/northrend/gundrak/boss_moorabi.cpp index e1afa2655..06d91bb33 100644 --- a/scripts/northrend/gundrak/boss_moorabi.cpp +++ b/scripts/northrend/gundrak/boss_moorabi.cpp @@ -94,7 +94,7 @@ struct MANGOS_DLL_DECL boss_moorabiAI : public ScriptedAI m_pInstance->SetData(TYPE_MOORABI, IN_PROGRESS); } - void KilledUnit(Unit* pVictim) override + void KilledUnit(Unit* /*pVictim*/) override { switch (urand(0, 2)) { @@ -104,7 +104,7 @@ struct MANGOS_DLL_DECL boss_moorabiAI : public ScriptedAI } } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoScriptText(SAY_DEATH, m_creature); diff --git a/scripts/northrend/gundrak/boss_sladran.cpp b/scripts/northrend/gundrak/boss_sladran.cpp index 6e4ce141f..28763a3ae 100644 --- a/scripts/northrend/gundrak/boss_sladran.cpp +++ b/scripts/northrend/gundrak/boss_sladran.cpp @@ -130,7 +130,7 @@ struct MANGOS_DLL_DECL boss_sladranAI : public ScriptedAI m_pInstance->SetData(TYPE_SLADRAN, IN_PROGRESS); } - void KilledUnit(Unit* pVictim) override + void KilledUnit(Unit* /*pVictim*/) override { switch (urand(0, 2)) { @@ -140,7 +140,7 @@ struct MANGOS_DLL_DECL boss_sladranAI : public ScriptedAI } } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoScriptText(SAY_DEATH, m_creature); diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_bronjahm.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_bronjahm.cpp index b822e354e..8cbc51cce 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_bronjahm.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_bronjahm.cpp @@ -96,7 +96,7 @@ struct MANGOS_DLL_DECL boss_bronjahmAI : public ScriptedAI DoScriptText(urand(0, 1) ? SAY_SLAY_1 : SAY_SLAY_2, m_creature); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoScriptText(SAY_DEATH, m_creature); @@ -224,7 +224,7 @@ struct MANGOS_DLL_DECL npc_corrupted_soul_fragmentAI : public ScriptedAI SetCombatMovement(true); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { if (instance_forge_of_souls* pInstance = (instance_forge_of_souls*)m_creature->GetInstanceData()) pInstance->SetGuid(DATA_SOULFRAGMENT_REMOVE, m_creature->GetObjectGuid()); diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_devourer_of_souls.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_devourer_of_souls.cpp index b4cf09822..63c778d9f 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_devourer_of_souls.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_devourer_of_souls.cpp @@ -132,7 +132,7 @@ struct MANGOS_DLL_DECL boss_devourer_of_soulsAI : public ScriptedAI DoScriptText(aTexts[urand(1, 2)][m_uiFace], m_creature); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoScriptText(aTexts[3][m_uiFace], m_creature); diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_forgemaster_garfrost.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_forgemaster_garfrost.cpp index 1c6b5e6c1..9b226238f 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_forgemaster_garfrost.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_forgemaster_garfrost.cpp @@ -94,7 +94,7 @@ struct MANGOS_DLL_DECL boss_forgemaster_garfrostAI : public ScriptedAI DoScriptText(SAY_DEATH, m_creature, pKiller); } - void KilledUnit(Unit* pVictim) override + void KilledUnit(Unit* /*pVictim*/) override { DoScriptText(SAY_SLAY_1, m_creature); } diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/blood_prince_council.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/blood_prince_council.cpp index 7e3de923b..08ada0b7f 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/blood_prince_council.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/blood_prince_council.cpp @@ -407,7 +407,7 @@ struct MANGOS_DLL_DECL npc_blood_orb_controlAI : public Scripted_NoMovementAI m_pInstance->SetData(TYPE_BLOOD_PRINCE_COUNCIL, IN_PROGRESS); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { if (m_pInstance) { @@ -627,7 +627,7 @@ struct MANGOS_DLL_DECL boss_valanar_iccAI : public blood_prince_council_baseAI DoScriptText(urand(0, 1) ? SAY_VALANAR_SLAY_1 : SAY_VALANAR_SLAY_2, m_creature); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoScriptText(SAY_VALANAR_DEATH, m_creature); } @@ -731,7 +731,7 @@ struct MANGOS_DLL_DECL boss_keleseth_iccAI : public blood_prince_council_baseAI DoScriptText(urand(0, 1) ? SAY_KELESETH_SLAY_1 : SAY_KELESETH_SLAY_2, m_creature); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoScriptText(SAY_KELESETH_DEATH, m_creature); } @@ -808,7 +808,7 @@ struct MANGOS_DLL_DECL boss_taldaram_iccAI : public blood_prince_council_baseAI DoScriptText(urand(0, 1) ? SAY_TALDARAM_SLAY_1 : SAY_TALDARAM_SLAY_2, m_creature); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoScriptText(SAY_TALDARAM_DEATH, m_creature); } diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_blood_queen_lanathel.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_blood_queen_lanathel.cpp index 591407d35..4e4ffbfeb 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_blood_queen_lanathel.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_blood_queen_lanathel.cpp @@ -119,7 +119,7 @@ struct MANGOS_DLL_DECL boss_blood_queen_lanathelAI : public ScriptedAI m_pInstance->SetData(TYPE_QUEEN_LANATHEL, FAIL); } - void KilledUnit(Unit* pVictim) override + void KilledUnit(Unit* /*pVictim*/) override { DoScriptText(urand(0, 1) ? SAY_SLAY_1 : SAY_SLAY_2, m_creature); } @@ -138,7 +138,7 @@ struct MANGOS_DLL_DECL boss_blood_queen_lanathelAI : public ScriptedAI } } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoScriptText(SAY_DEATH, m_creature); diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp index 0deb4c319..4746fca3e 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp @@ -185,7 +185,7 @@ struct MANGOS_DLL_DECL boss_deathbringer_saurfangAI : public ScriptedAI DoScriptText(urand(0, 1) ? SAY_SLAY_1 : SAY_SLAY_2, m_creature); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoScriptText(SAY_DEATH, m_creature); DoCastSpellIfCan(m_creature, SPELL_REMOVE_MARKS, CAST_TRIGGERED); @@ -257,9 +257,8 @@ struct MANGOS_DLL_DECL boss_deathbringer_saurfangAI : public ScriptedAI // Search only for players which are not within 18 yards of the boss std::vector suitableTargets; ThreatList const& threatList = m_creature->getThreatManager().getThreatList(); - ThreatList::const_iterator itr = threatList.begin(); - for (itr; itr != threatList.end(); ++itr) + for (ThreatList::const_iterator itr = threatList.begin(); itr != threatList.end(); ++itr) { if (Unit* pTarget = m_creature->GetMap()->GetUnit((*itr)->getUnitGuid())) { diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_festergut.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_festergut.cpp index 2dd4612c4..4b5a95aee 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_festergut.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_festergut.cpp @@ -114,7 +114,7 @@ struct MANGOS_DLL_DECL boss_festergutAI : public ScriptedAI m_pInstance->SetData(TYPE_FESTERGUT, IN_PROGRESS); } - void KilledUnit(Unit* pVictim) override + void KilledUnit(Unit* /*pVictim*/) override { DoScriptText(urand(0, 1) ? SAY_SLAY_1 : SAY_SLAY_2, m_creature); } @@ -127,7 +127,7 @@ struct MANGOS_DLL_DECL boss_festergutAI : public ScriptedAI DoCastSpellIfCan(m_creature, SPELL_REMOVE_INOCULENT, CAST_TRIGGERED); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { if (m_pInstance) m_pInstance->SetData(TYPE_FESTERGUT, DONE); diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lady_deathwhisper.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lady_deathwhisper.cpp index 6c88522fd..4122a63d2 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lady_deathwhisper.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lady_deathwhisper.cpp @@ -155,7 +155,7 @@ struct MANGOS_DLL_DECL boss_lady_deathwhisperAI : public ScriptedAI DoScriptText(urand(0, 1) ? SAY_SLAY_1 : SAY_SLAY_2, m_creature); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoScriptText(SAY_DEATH, m_creature); diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp index 9e12ef850..947a90d8f 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp @@ -118,7 +118,7 @@ struct MANGOS_DLL_DECL boss_lord_marrowgarAI : public ScriptedAI DoScriptText(urand(0, 1) ? SAY_SLAY_1 : SAY_SLAY_2, m_creature); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoScriptText(SAY_DEATH, m_creature); diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_professor_putricide.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_professor_putricide.cpp index ad45ebc94..318b7b822 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_professor_putricide.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_professor_putricide.cpp @@ -155,7 +155,7 @@ struct MANGOS_DLL_DECL boss_professor_putricideAI : public ScriptedAI m_uiChokingGasBombTimer = urand(10000, 15000); } - void KilledUnit(Unit* pVictim) override + void KilledUnit(Unit* /*pVictim*/) override { DoScriptText(urand(0, 1) ? SAY_SLAY_1 : SAY_SLAY_2, m_creature); } @@ -168,7 +168,7 @@ struct MANGOS_DLL_DECL boss_professor_putricideAI : public ScriptedAI DoScriptText(SAY_AGGRO, m_creature); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { if (m_pInstance) m_pInstance->SetData(TYPE_PROFESSOR_PUTRICIDE, DONE); diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_rotface.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_rotface.cpp index 91ded4093..ff8d655d1 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_rotface.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_rotface.cpp @@ -129,7 +129,7 @@ struct MANGOS_DLL_DECL boss_rotfaceAI : public ScriptedAI DoScriptText(urand(0, 1) ? SAY_SLAY_1 : SAY_SLAY_2, m_creature, pVictim); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { if (m_pInstance) m_pInstance->SetData(TYPE_ROTFACE, DONE); diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp index 8d07728ba..6882b5548 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp @@ -196,7 +196,7 @@ struct MANGOS_DLL_DECL boss_sindragosaAI : public ScriptedAI m_creature->GetMotionMaster()->MovePoint(SINDRAGOSA_POINT_AIR_EAST, SindragosaPosition[8][0], SindragosaPosition[8][1], SindragosaPosition[8][2], false); } - void KilledUnit(Unit* pVictim) override + void KilledUnit(Unit* /*pVictim*/) override { DoScriptText(urand(0, 1) ? SAY_SLAY_1 : SAY_SLAY_2, m_creature); } @@ -222,7 +222,7 @@ struct MANGOS_DLL_DECL boss_sindragosaAI : public ScriptedAI // instance data set when sindragosa lands } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoScriptText(SAY_DEATH, m_creature); @@ -533,7 +533,7 @@ struct MANGOS_DLL_DECL npc_rimefang_iccAI : public ScriptedAI ScriptedAI::AttackStart(pWho); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { if (!m_pInstance) return; @@ -694,7 +694,7 @@ struct MANGOS_DLL_DECL npc_spinestalker_iccAI : public ScriptedAI m_creature->SetWalk(bIsFlying); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { if (!m_pInstance) return; diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_the_lich_king.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_the_lich_king.cpp index 35d366d0e..6593a66fc 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_the_lich_king.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_the_lich_king.cpp @@ -301,7 +301,7 @@ struct MANGOS_DLL_DECL boss_the_lich_king_iccAI : public ScriptedAI DoScriptText(urand(0, 1) ? SAY_SLAY_1 : SAY_SLAY_2, m_creature); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { if (m_pInstance) m_pInstance->SetData(TYPE_LICH_KING, DONE); diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_valithria_dreamwalker.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_valithria_dreamwalker.cpp index 25960c882..762a68c0d 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_valithria_dreamwalker.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_valithria_dreamwalker.cpp @@ -129,7 +129,7 @@ struct MANGOS_DLL_DECL boss_valithria_dreamwalkerAI : public ScriptedAI DoScriptText(SAY_PLAYER_DIES, m_creature, pVictim); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoScriptText(SAY_0_HEALTH, m_creature); diff --git a/scripts/northrend/naxxramas/boss_anubrekhan.cpp b/scripts/northrend/naxxramas/boss_anubrekhan.cpp index 2278d2bc1..d23dfd082 100644 --- a/scripts/northrend/naxxramas/boss_anubrekhan.cpp +++ b/scripts/northrend/naxxramas/boss_anubrekhan.cpp @@ -119,7 +119,7 @@ struct MANGOS_DLL_DECL boss_anubrekhanAI : public ScriptedAI m_pInstance->SetData(TYPE_ANUB_REKHAN, IN_PROGRESS); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { if (m_pInstance) m_pInstance->SetData(TYPE_ANUB_REKHAN, DONE); diff --git a/scripts/northrend/naxxramas/boss_faerlina.cpp b/scripts/northrend/naxxramas/boss_faerlina.cpp index 2fbc323c8..e01028fc0 100644 --- a/scripts/northrend/naxxramas/boss_faerlina.cpp +++ b/scripts/northrend/naxxramas/boss_faerlina.cpp @@ -99,12 +99,12 @@ struct MANGOS_DLL_DECL boss_faerlinaAI : public ScriptedAI ScriptedAI::MoveInLineOfSight(pWho); } - void KilledUnit(Unit* pVictim) override + void KilledUnit(Unit* /*pVictim*/) override { DoScriptText(urand(0, 1) ? SAY_SLAY_1 : SAY_SLAY_2, m_creature); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoScriptText(SAY_DEATH, m_creature); diff --git a/scripts/northrend/naxxramas/boss_four_horsemen.cpp b/scripts/northrend/naxxramas/boss_four_horsemen.cpp index af4c05c32..a0289df37 100644 --- a/scripts/northrend/naxxramas/boss_four_horsemen.cpp +++ b/scripts/northrend/naxxramas/boss_four_horsemen.cpp @@ -141,12 +141,12 @@ struct MANGOS_DLL_DECL boss_lady_blaumeuxAI : public ScriptedAI m_pInstance->SetData(TYPE_FOUR_HORSEMEN, IN_PROGRESS); } - void KilledUnit(Unit* pVictim) override + void KilledUnit(Unit* /*pVictim*/) override { DoScriptText(SAY_BLAU_SLAY, m_creature); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoScriptText(SAY_BLAU_DEATH, m_creature); @@ -260,12 +260,12 @@ struct MANGOS_DLL_DECL boss_rivendare_naxxAI : public ScriptedAI m_pInstance->SetData(TYPE_FOUR_HORSEMEN, IN_PROGRESS); } - void KilledUnit(Unit* pVictim) override + void KilledUnit(Unit* /*pVictim*/) override { DoScriptText(urand(0, 1) ? SAY_RIVE_SLAY1 : SAY_RIVE_SLAY2, m_creature); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoScriptText(SAY_RIVE_DEATH, m_creature); @@ -361,12 +361,12 @@ struct MANGOS_DLL_DECL boss_thane_korthazzAI : public ScriptedAI m_pInstance->SetData(TYPE_FOUR_HORSEMEN, IN_PROGRESS); } - void KilledUnit(Unit* pVictim) override + void KilledUnit(Unit* /*pVictim*/) override { DoScriptText(SAY_KORT_SLAY, m_creature); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoScriptText(SAY_KORT_DEATH, m_creature); @@ -464,12 +464,12 @@ struct MANGOS_DLL_DECL boss_sir_zeliekAI : public ScriptedAI m_pInstance->SetData(TYPE_FOUR_HORSEMEN, IN_PROGRESS); } - void KilledUnit(Unit* pVictim) override + void KilledUnit(Unit* /*pVictim*/) override { DoScriptText(SAY_ZELI_SLAY, m_creature); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoScriptText(SAY_ZELI_DEATH, m_creature); diff --git a/scripts/northrend/naxxramas/boss_gluth.cpp b/scripts/northrend/naxxramas/boss_gluth.cpp index 86fafd5ca..48291fb72 100644 --- a/scripts/northrend/naxxramas/boss_gluth.cpp +++ b/scripts/northrend/naxxramas/boss_gluth.cpp @@ -86,7 +86,7 @@ struct MANGOS_DLL_DECL boss_gluthAI : public ScriptedAI m_uiBerserkTimer = MINUTE * 8 * IN_MILLISECONDS; } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { if (m_pInstance) m_pInstance->SetData(TYPE_GLUTH, DONE); diff --git a/scripts/northrend/naxxramas/boss_gothik.cpp b/scripts/northrend/naxxramas/boss_gothik.cpp index 2b39d6104..c7e6fd9d9 100644 --- a/scripts/northrend/naxxramas/boss_gothik.cpp +++ b/scripts/northrend/naxxramas/boss_gothik.cpp @@ -183,7 +183,7 @@ struct MANGOS_DLL_DECL boss_gothikAI : public ScriptedAI DoScriptText(SAY_KILL, m_creature); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoScriptText(SAY_DEATH, m_creature); diff --git a/scripts/northrend/naxxramas/boss_grobbulus.cpp b/scripts/northrend/naxxramas/boss_grobbulus.cpp index 43c8d8fcb..bcd79fc6a 100644 --- a/scripts/northrend/naxxramas/boss_grobbulus.cpp +++ b/scripts/northrend/naxxramas/boss_grobbulus.cpp @@ -81,7 +81,7 @@ struct MANGOS_DLL_DECL boss_grobbulusAI : public ScriptedAI m_pInstance->SetData(TYPE_GROBBULUS, IN_PROGRESS); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { if (m_pInstance) m_pInstance->SetData(TYPE_GROBBULUS, DONE); @@ -101,9 +101,8 @@ struct MANGOS_DLL_DECL boss_grobbulusAI : public ScriptedAI std::vector suitableTargets; ThreatList const& threatList = m_creature->getThreatManager().getThreatList(); - ThreatList::const_iterator itr = threatList.begin(); - for (itr; itr != threatList.end(); ++itr) + for (ThreatList::const_iterator itr = threatList.begin(); itr != threatList.end(); ++itr) { if (Unit* pTarget = m_creature->GetMap()->GetUnit((*itr)->getUnitGuid())) { diff --git a/scripts/northrend/naxxramas/boss_heigan.cpp b/scripts/northrend/naxxramas/boss_heigan.cpp index 8e25adc23..a9cfbe53c 100644 --- a/scripts/northrend/naxxramas/boss_heigan.cpp +++ b/scripts/northrend/naxxramas/boss_heigan.cpp @@ -102,12 +102,12 @@ struct MANGOS_DLL_DECL boss_heiganAI : public ScriptedAI m_pInstance->SetData(TYPE_HEIGAN, IN_PROGRESS); } - void KilledUnit(Unit* pVictim) override + void KilledUnit(Unit* /*pVictim*/) override { DoScriptText(SAY_SLAY, m_creature); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoScriptText(SAY_DEATH, m_creature); diff --git a/scripts/northrend/naxxramas/boss_kelthuzad.cpp b/scripts/northrend/naxxramas/boss_kelthuzad.cpp index af164a83b..8a7b29011 100644 --- a/scripts/northrend/naxxramas/boss_kelthuzad.cpp +++ b/scripts/northrend/naxxramas/boss_kelthuzad.cpp @@ -166,7 +166,7 @@ struct MANGOS_DLL_DECL boss_kelthuzadAI : public ScriptedAI DoScriptText(urand(0, 1) ? SAY_SLAY1 : SAY_SLAY2, m_creature); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoScriptText(SAY_DEATH, m_creature); DespawnAdds(); diff --git a/scripts/northrend/naxxramas/boss_loatheb.cpp b/scripts/northrend/naxxramas/boss_loatheb.cpp index 7f5eb4bc7..d943ffcdd 100644 --- a/scripts/northrend/naxxramas/boss_loatheb.cpp +++ b/scripts/northrend/naxxramas/boss_loatheb.cpp @@ -76,7 +76,7 @@ struct MANGOS_DLL_DECL boss_loathebAI : public ScriptedAI m_pInstance->SetData(TYPE_LOATHEB, IN_PROGRESS); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { if (m_pInstance) m_pInstance->SetData(TYPE_LOATHEB, DONE); diff --git a/scripts/northrend/naxxramas/boss_maexxna.cpp b/scripts/northrend/naxxramas/boss_maexxna.cpp index 27b9955fd..6645b1650 100644 --- a/scripts/northrend/naxxramas/boss_maexxna.cpp +++ b/scripts/northrend/naxxramas/boss_maexxna.cpp @@ -110,7 +110,7 @@ struct MANGOS_DLL_DECL npc_web_wrapAI : public ScriptedAI } } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { if (m_victimGuid) { @@ -175,7 +175,7 @@ struct MANGOS_DLL_DECL boss_maexxnaAI : public ScriptedAI m_pInstance->SetData(TYPE_MAEXXNA, IN_PROGRESS); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { if (m_pInstance) m_pInstance->SetData(TYPE_MAEXXNA, DONE); diff --git a/scripts/northrend/naxxramas/boss_noth.cpp b/scripts/northrend/naxxramas/boss_noth.cpp index 671c22e70..c0bddd236 100644 --- a/scripts/northrend/naxxramas/boss_noth.cpp +++ b/scripts/northrend/naxxramas/boss_noth.cpp @@ -133,12 +133,12 @@ struct MANGOS_DLL_DECL boss_nothAI : public ScriptedAI pSummoned->SetInCombatWithZone(); } - void KilledUnit(Unit* pVictim) override + void KilledUnit(Unit* /*pVictim*/) override { DoScriptText(urand(0, 1) ? SAY_SLAY1 : SAY_SLAY2, m_creature); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoScriptText(SAY_DEATH, m_creature); diff --git a/scripts/northrend/naxxramas/boss_patchwerk.cpp b/scripts/northrend/naxxramas/boss_patchwerk.cpp index e95f95a20..bf2c27efd 100644 --- a/scripts/northrend/naxxramas/boss_patchwerk.cpp +++ b/scripts/northrend/naxxramas/boss_patchwerk.cpp @@ -68,7 +68,7 @@ struct MANGOS_DLL_DECL boss_patchwerkAI : public ScriptedAI m_bBerserk = false; } - void KilledUnit(Unit* pVictim) override + void KilledUnit(Unit* /*pVictim*/) override { if (urand(0, 4)) return; @@ -76,7 +76,7 @@ struct MANGOS_DLL_DECL boss_patchwerkAI : public ScriptedAI DoScriptText(SAY_SLAY, m_creature); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoScriptText(SAY_DEATH, m_creature); diff --git a/scripts/northrend/naxxramas/boss_razuvious.cpp b/scripts/northrend/naxxramas/boss_razuvious.cpp index ef60c7377..fe73b7e5d 100644 --- a/scripts/northrend/naxxramas/boss_razuvious.cpp +++ b/scripts/northrend/naxxramas/boss_razuvious.cpp @@ -81,7 +81,7 @@ struct MANGOS_DLL_DECL boss_razuviousAI : public ScriptedAI } } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoScriptText(SAY_DEATH, m_creature); diff --git a/scripts/northrend/naxxramas/boss_sapphiron.cpp b/scripts/northrend/naxxramas/boss_sapphiron.cpp index 23b553568..cfc844b67 100644 --- a/scripts/northrend/naxxramas/boss_sapphiron.cpp +++ b/scripts/northrend/naxxramas/boss_sapphiron.cpp @@ -127,7 +127,7 @@ struct MANGOS_DLL_DECL boss_sapphironAI : public ScriptedAI m_pInstance->SetData(TYPE_SAPPHIRON, IN_PROGRESS); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { if (m_pInstance) m_pInstance->SetData(TYPE_SAPPHIRON, DONE); diff --git a/scripts/northrend/naxxramas/boss_thaddius.cpp b/scripts/northrend/naxxramas/boss_thaddius.cpp index be326c6ca..4e99c6a2d 100644 --- a/scripts/northrend/naxxramas/boss_thaddius.cpp +++ b/scripts/northrend/naxxramas/boss_thaddius.cpp @@ -165,7 +165,7 @@ struct MANGOS_DLL_DECL boss_thaddiusAI : public Scripted_NoMovementAI DoScriptText(SAY_SLAY, m_creature); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoScriptText(SAY_DEATH, m_creature); @@ -662,7 +662,7 @@ struct MANGOS_DLL_DECL boss_stalaggAI : public boss_thaddiusAddsAI boss_thaddiusAddsAI::Aggro(pWho); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoScriptText(SAY_STAL_DEATH, m_creature); } @@ -716,7 +716,7 @@ struct MANGOS_DLL_DECL boss_feugenAI : public boss_thaddiusAddsAI boss_thaddiusAddsAI::Aggro(pWho); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoScriptText(SAY_FEUG_DEATH, m_creature); } diff --git a/scripts/northrend/naxxramas/instance_naxxramas.cpp b/scripts/northrend/naxxramas/instance_naxxramas.cpp index 23ec5985e..7c8252df4 100644 --- a/scripts/northrend/naxxramas/instance_naxxramas.cpp +++ b/scripts/northrend/naxxramas/instance_naxxramas.cpp @@ -47,10 +47,10 @@ static const DialogueEntry aNaxxDialogue[] = instance_naxxramas::instance_naxxramas(Map* pMap) : ScriptedInstance(pMap), m_uiTauntTimer(0), m_uiHorseMenKilled(0), - m_dialogueHelper(aNaxxDialogue), m_fChamberCenterX(0.0f), m_fChamberCenterY(0.0f), - m_fChamberCenterZ(0.0f) + m_fChamberCenterZ(0.0f), + m_dialogueHelper(aNaxxDialogue) { Initialize(); } diff --git a/scripts/northrend/nexus/eye_of_eternity/boss_malygos.cpp b/scripts/northrend/nexus/eye_of_eternity/boss_malygos.cpp index 6997977bb..573039fe1 100644 --- a/scripts/northrend/nexus/eye_of_eternity/boss_malygos.cpp +++ b/scripts/northrend/nexus/eye_of_eternity/boss_malygos.cpp @@ -233,7 +233,7 @@ struct MANGOS_DLL_DECL boss_malygosAI : public ScriptedAI, private DialogueHelpe ScriptedAI::MoveInLineOfSight(pWho); } - void KilledUnit(Unit* pVictim) override + void KilledUnit(Unit* /*pVictim*/) override { uint8 uiTextId = 0; switch (m_uiPhase) @@ -259,7 +259,7 @@ struct MANGOS_DLL_DECL boss_malygosAI : public ScriptedAI, private DialogueHelpe } } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoScriptText(SAY_DEATH, m_creature); m_creature->SummonCreature(NPC_ALEXSTRASZA, aAlextraszaSpawnPos[0], aAlextraszaSpawnPos[1], aAlextraszaSpawnPos[2], aAlextraszaSpawnPos[3], TEMPSUMMON_TIMED_DESPAWN, 5 * MINUTE * IN_MILLISECONDS); @@ -582,7 +582,7 @@ struct MANGOS_DLL_DECL npc_power_sparkAI : public ScriptedAI } } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoCastSpellIfCan(m_creature, SPELL_POWER_SPARK_PLAYERS, CAST_TRIGGERED); } diff --git a/scripts/northrend/nexus/nexus/boss_anomalus.cpp b/scripts/northrend/nexus/nexus/boss_anomalus.cpp index bde570657..36907b1e8 100644 --- a/scripts/northrend/nexus/nexus/boss_anomalus.cpp +++ b/scripts/northrend/nexus/nexus/boss_anomalus.cpp @@ -91,7 +91,7 @@ struct MANGOS_DLL_DECL boss_anomalusAI : public ScriptedAI m_pInstance->SetData(TYPE_ANOMALUS, IN_PROGRESS); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoScriptText(SAY_DEATH, m_creature); @@ -99,7 +99,7 @@ struct MANGOS_DLL_DECL boss_anomalusAI : public ScriptedAI m_pInstance->SetData(TYPE_ANOMALUS, DONE); } - void KilledUnit(Unit* pVictim) override + void KilledUnit(Unit* /*pVictim*/) override { if (urand(0, 1)) DoScriptText(SAY_KILL, m_creature); diff --git a/scripts/northrend/nexus/nexus/boss_keristrasza.cpp b/scripts/northrend/nexus/nexus/boss_keristrasza.cpp index b10265c08..9a50f8381 100644 --- a/scripts/northrend/nexus/nexus/boss_keristrasza.cpp +++ b/scripts/northrend/nexus/nexus/boss_keristrasza.cpp @@ -103,7 +103,7 @@ struct MANGOS_DLL_DECL boss_keristraszaAI : public ScriptedAI m_pInstance->SetData(TYPE_KERISTRASZA, IN_PROGRESS); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoScriptText(SAY_DEATH, m_creature); @@ -111,7 +111,7 @@ struct MANGOS_DLL_DECL boss_keristraszaAI : public ScriptedAI m_pInstance->SetData(TYPE_KERISTRASZA, DONE); } - void KilledUnit(Unit* pVictim) override + void KilledUnit(Unit* /*pVictim*/) override { if (urand(0, 1)) DoScriptText(SAY_KILL, m_creature); diff --git a/scripts/northrend/nexus/nexus/boss_ormorok.cpp b/scripts/northrend/nexus/nexus/boss_ormorok.cpp index 6d001c350..e48b3c6d2 100644 --- a/scripts/northrend/nexus/nexus/boss_ormorok.cpp +++ b/scripts/northrend/nexus/nexus/boss_ormorok.cpp @@ -86,7 +86,7 @@ struct MANGOS_DLL_DECL boss_ormorokAI : public ScriptedAI DoScriptText(SAY_AGGRO, m_creature); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoScriptText(SAY_DEATH, m_creature); @@ -94,7 +94,7 @@ struct MANGOS_DLL_DECL boss_ormorokAI : public ScriptedAI m_pInstance->SetData(TYPE_ORMOROK, DONE); } - void KilledUnit(Unit* pVictim) override + void KilledUnit(Unit* /*pVictim*/) override { if (urand(0, 1)) DoScriptText(SAY_KILL, m_creature); diff --git a/scripts/northrend/nexus/nexus/boss_telestra.cpp b/scripts/northrend/nexus/nexus/boss_telestra.cpp index 4ec4abe3b..0ad0b1f03 100644 --- a/scripts/northrend/nexus/nexus/boss_telestra.cpp +++ b/scripts/northrend/nexus/nexus/boss_telestra.cpp @@ -131,7 +131,7 @@ struct MANGOS_DLL_DECL boss_telestraAI : public ScriptedAI m_pInstance->SetData(TYPE_TELESTRA, IN_PROGRESS); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoScriptText(SAY_DEATH, m_creature); @@ -139,7 +139,7 @@ struct MANGOS_DLL_DECL boss_telestraAI : public ScriptedAI m_pInstance->SetData(TYPE_TELESTRA, DONE); } - void KilledUnit(Unit* pVictim) override + void KilledUnit(Unit* /*pVictim*/) override { if (urand(0, 1)) DoScriptText(SAY_KILL, m_creature); diff --git a/scripts/northrend/nexus/oculus/boss_eregos.cpp b/scripts/northrend/nexus/oculus/boss_eregos.cpp index a9e9be640..adb294d51 100644 --- a/scripts/northrend/nexus/oculus/boss_eregos.cpp +++ b/scripts/northrend/nexus/oculus/boss_eregos.cpp @@ -99,7 +99,7 @@ struct MANGOS_DLL_DECL boss_eregosAI : public ScriptedAI } } - void KilledUnit(Unit* pVictim) override + void KilledUnit(Unit* /*pVictim*/) override { switch (urand(0, 2)) { @@ -109,7 +109,7 @@ struct MANGOS_DLL_DECL boss_eregosAI : public ScriptedAI } } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoScriptText(SAY_DEATH, m_creature); diff --git a/scripts/northrend/nexus/oculus/boss_urom.cpp b/scripts/northrend/nexus/oculus/boss_urom.cpp index ab7508edd..ce317d35a 100644 --- a/scripts/northrend/nexus/oculus/boss_urom.cpp +++ b/scripts/northrend/nexus/oculus/boss_urom.cpp @@ -174,7 +174,7 @@ struct MANGOS_DLL_DECL boss_uromAI : public ScriptedAI } } - void KilledUnit(Unit* pVictim) override + void KilledUnit(Unit* /*pVictim*/) override { switch (urand(0, 2)) { @@ -184,7 +184,7 @@ struct MANGOS_DLL_DECL boss_uromAI : public ScriptedAI } } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoScriptText(SAY_DEATH, m_creature); diff --git a/scripts/northrend/obsidian_sanctum/boss_sartharion.cpp b/scripts/northrend/obsidian_sanctum/boss_sartharion.cpp index f9226db68..b47986450 100644 --- a/scripts/northrend/obsidian_sanctum/boss_sartharion.cpp +++ b/scripts/northrend/obsidian_sanctum/boss_sartharion.cpp @@ -235,7 +235,7 @@ struct MANGOS_DLL_DECL boss_sartharionAI : public ScriptedAI } } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoScriptText(SAY_SARTHARION_DEATH, m_creature); @@ -243,7 +243,7 @@ struct MANGOS_DLL_DECL boss_sartharionAI : public ScriptedAI m_pInstance->SetData(TYPE_SARTHARION_EVENT, DONE); } - void KilledUnit(Unit* pVictim) override + void KilledUnit(Unit* /*pVictim*/) override { switch (urand(0, 2)) { @@ -655,7 +655,7 @@ struct MANGOS_DLL_DECL dummy_dragonAI : public ScriptedAI } } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { int32 iTextId = 0; uint32 uiSpellId = 0; @@ -738,7 +738,7 @@ struct MANGOS_DLL_DECL mob_tenebronAI : public dummy_dragonAI DoCastSpellIfCan(m_creature, SPELL_POWER_OF_TENEBRON); } - void KilledUnit(Unit* pVictim) override + void KilledUnit(Unit* /*pVictim*/) override { DoScriptText(urand(0, 1) ? SAY_TENEBRON_SLAY_1 : SAY_TENEBRON_SLAY_2, m_creature); } @@ -813,7 +813,7 @@ struct MANGOS_DLL_DECL mob_shadronAI : public dummy_dragonAI DoCastSpellIfCan(m_creature, SPELL_POWER_OF_SHADRON); } - void KilledUnit(Unit* pVictim) override + void KilledUnit(Unit* /*pVictim*/) override { DoScriptText(urand(0, 1) ? SAY_SHADRON_SLAY_1 : SAY_SHADRON_SLAY_2, m_creature); } @@ -882,7 +882,7 @@ struct MANGOS_DLL_DECL mob_vesperonAI : public dummy_dragonAI DoCastSpellIfCan(m_creature, SPELL_POWER_OF_VESPERON); } - void KilledUnit(Unit* pVictim) override + void KilledUnit(Unit* /*pVictim*/) override { DoScriptText(urand(0, 1) ? SAY_VESPERON_SLAY_1 : SAY_VESPERON_SLAY_2, m_creature); } @@ -1010,7 +1010,7 @@ struct MANGOS_DLL_DECL mob_acolyte_of_vesperonAI : public ScriptedAI DoCastSpellIfCan(m_creature, SPELL_TWILIGHT_TORMENT_VESP_ACO); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { // remove twilight torment on Vesperon if (m_pInstance) diff --git a/scripts/northrend/ruby_sanctum/boss_baltharus.cpp b/scripts/northrend/ruby_sanctum/boss_baltharus.cpp index 20401177e..c4cbe2c97 100644 --- a/scripts/northrend/ruby_sanctum/boss_baltharus.cpp +++ b/scripts/northrend/ruby_sanctum/boss_baltharus.cpp @@ -103,7 +103,7 @@ struct MANGOS_DLL_DECL boss_baltharusAI : public ScriptedAI, private DialogueHel DoScriptText(urand(0, 1) ? SAY_SLAY_1 : SAY_SLAY_2, m_creature); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoScriptText(SAY_DEATH, m_creature); diff --git a/scripts/northrend/ruby_sanctum/boss_saviana.cpp b/scripts/northrend/ruby_sanctum/boss_saviana.cpp index e778bf2ec..4a7b0b67f 100644 --- a/scripts/northrend/ruby_sanctum/boss_saviana.cpp +++ b/scripts/northrend/ruby_sanctum/boss_saviana.cpp @@ -64,7 +64,7 @@ struct MANGOS_DLL_DECL boss_savianaAI : public ScriptedAI DoScriptText(urand(0, 1) ? SAY_SLAY_1 : SAY_SLAY_2, m_creature); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoPlaySoundToSet(m_creature, SOUND_DEATH); diff --git a/scripts/northrend/ruby_sanctum/boss_zarithrian.cpp b/scripts/northrend/ruby_sanctum/boss_zarithrian.cpp index d85a334cb..48b4a5a27 100644 --- a/scripts/northrend/ruby_sanctum/boss_zarithrian.cpp +++ b/scripts/northrend/ruby_sanctum/boss_zarithrian.cpp @@ -64,7 +64,7 @@ struct MANGOS_DLL_DECL boss_zarithrianAI : public ScriptedAI DoScriptText(urand(0, 1) ? SAY_SLAY_1 : SAY_SLAY_2, m_creature); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoScriptText(SAY_DEATH, m_creature); diff --git a/scripts/northrend/ulduar/halls_of_lightning/boss_bjarngrim.cpp b/scripts/northrend/ulduar/halls_of_lightning/boss_bjarngrim.cpp index 6093b9d74..c636c5379 100644 --- a/scripts/northrend/ulduar/halls_of_lightning/boss_bjarngrim.cpp +++ b/scripts/northrend/ulduar/halls_of_lightning/boss_bjarngrim.cpp @@ -155,7 +155,7 @@ struct MANGOS_DLL_DECL boss_bjarngrimAI : public ScriptedAI m_pInstance->SetData(TYPE_BJARNGRIM, IN_PROGRESS); } - void KilledUnit(Unit* pVictim) override + void KilledUnit(Unit* /*pVictim*/) override { switch (urand(0, 2)) { @@ -165,7 +165,7 @@ struct MANGOS_DLL_DECL boss_bjarngrimAI : public ScriptedAI } } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoScriptText(SAY_DEATH, m_creature); diff --git a/scripts/northrend/ulduar/halls_of_lightning/boss_loken.cpp b/scripts/northrend/ulduar/halls_of_lightning/boss_loken.cpp index c6efe2c09..e02731dec 100644 --- a/scripts/northrend/ulduar/halls_of_lightning/boss_loken.cpp +++ b/scripts/northrend/ulduar/halls_of_lightning/boss_loken.cpp @@ -98,7 +98,7 @@ struct MANGOS_DLL_DECL boss_lokenAI : public ScriptedAI m_pInstance->SetData(TYPE_LOKEN, IN_PROGRESS); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoScriptText(SAY_DEATH, m_creature); @@ -106,7 +106,7 @@ struct MANGOS_DLL_DECL boss_lokenAI : public ScriptedAI m_pInstance->SetData(TYPE_LOKEN, DONE); } - void KilledUnit(Unit* pVictim) override + void KilledUnit(Unit* /*pVictim*/) override { switch (urand(0, 2)) { diff --git a/scripts/northrend/ulduar/halls_of_lightning/boss_volkhan.cpp b/scripts/northrend/ulduar/halls_of_lightning/boss_volkhan.cpp index b92ff06be..16741f6cd 100644 --- a/scripts/northrend/ulduar/halls_of_lightning/boss_volkhan.cpp +++ b/scripts/northrend/ulduar/halls_of_lightning/boss_volkhan.cpp @@ -105,7 +105,7 @@ struct MANGOS_DLL_DECL boss_volkhanAI : public ScriptedAI m_pInstance->SetData(TYPE_VOLKHAN, IN_PROGRESS); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoScriptText(SAY_DEATH, m_creature); DespawnGolems(); @@ -122,7 +122,7 @@ struct MANGOS_DLL_DECL boss_volkhanAI : public ScriptedAI m_pInstance->SetData(TYPE_VOLKHAN, FAIL); } - void KilledUnit(Unit* pVictim) override + void KilledUnit(Unit* /*pVictim*/) override { switch (urand(0, 2)) { diff --git a/scripts/northrend/ulduar/halls_of_stone/boss_maiden_of_grief.cpp b/scripts/northrend/ulduar/halls_of_stone/boss_maiden_of_grief.cpp index 2651f7b81..14e19dc6b 100644 --- a/scripts/northrend/ulduar/halls_of_stone/boss_maiden_of_grief.cpp +++ b/scripts/northrend/ulduar/halls_of_stone/boss_maiden_of_grief.cpp @@ -89,7 +89,7 @@ struct MANGOS_DLL_DECL boss_maiden_of_griefAI : public ScriptedAI m_pInstance->SetData(TYPE_MAIDEN, FAIL); } - void KilledUnit(Unit* pVictim) override + void KilledUnit(Unit* /*pVictim*/) override { switch (urand(0, 3)) { @@ -100,7 +100,7 @@ struct MANGOS_DLL_DECL boss_maiden_of_griefAI : public ScriptedAI } } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoScriptText(SAY_DEATH, m_creature); diff --git a/scripts/northrend/ulduar/halls_of_stone/boss_sjonnir.cpp b/scripts/northrend/ulduar/halls_of_stone/boss_sjonnir.cpp index 2a5cf11ac..aed727ee2 100644 --- a/scripts/northrend/ulduar/halls_of_stone/boss_sjonnir.cpp +++ b/scripts/northrend/ulduar/halls_of_stone/boss_sjonnir.cpp @@ -118,7 +118,7 @@ struct MANGOS_DLL_DECL boss_sjonnirAI : public ScriptedAI m_pInstance->SetData(TYPE_SJONNIR, IN_PROGRESS); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoScriptText(SAY_DEATH, m_creature); @@ -146,7 +146,7 @@ struct MANGOS_DLL_DECL boss_sjonnirAI : public ScriptedAI pSummoned->AI()->AttackStart(m_creature); } - void KilledUnit(Unit* pVictim) override + void KilledUnit(Unit* /*pVictim*/) override { switch (urand(0, 2)) { diff --git a/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.cpp b/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.cpp index 57cad4afb..2915051e9 100644 --- a/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.cpp +++ b/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.cpp @@ -161,7 +161,7 @@ struct MANGOS_DLL_DECL npc_brann_hosAI : public npc_escortAI } } - void KilledUnit(Unit* pVictim) override // TODO - possible better as SummonedJustDied + void KilledUnit(Unit* /*pVictim*/) override // TODO - possible better as SummonedJustDied { switch (urand(0, 2)) { @@ -171,7 +171,7 @@ struct MANGOS_DLL_DECL npc_brann_hosAI : public npc_escortAI } } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoScriptText(SAY_DEATH, m_creature); diff --git a/scripts/northrend/ulduar/ulduar/assembly_of_iron.cpp b/scripts/northrend/ulduar/ulduar/assembly_of_iron.cpp index 0aa4bdcd2..cf5b09802 100644 --- a/scripts/northrend/ulduar/ulduar/assembly_of_iron.cpp +++ b/scripts/northrend/ulduar/ulduar/assembly_of_iron.cpp @@ -151,7 +151,7 @@ struct MANGOS_DLL_DECL boss_brundirAI : public ScriptedAI m_creature->SetLevitate(false); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { if (!m_pInstance) return; @@ -180,7 +180,7 @@ struct MANGOS_DLL_DECL boss_brundirAI : public ScriptedAI DoCastSpellIfCan(m_creature, SPELL_BERSERK, CAST_TRIGGERED); } - void KilledUnit(Unit* pVictim) override + void KilledUnit(Unit* /*pVictim*/) override { DoScriptText(urand(0, 1) ? SAY_BRUNDIR_SLAY_1 : SAY_BRUNDIR_SLAY_2, m_creature); } @@ -448,7 +448,7 @@ struct MANGOS_DLL_DECL boss_molgeimAI : public ScriptedAI m_uiRuneDeathTimer = 30000; } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { if (!m_pInstance) return; @@ -477,7 +477,7 @@ struct MANGOS_DLL_DECL boss_molgeimAI : public ScriptedAI DoCastSpellIfCan(m_creature, SPELL_BERSERK, CAST_TRIGGERED); } - void KilledUnit(Unit* pVictim) override + void KilledUnit(Unit* /*pVictim*/) override { DoScriptText(urand(0, 1) ? SAY_MOLGEIM_SLAY_1 : SAY_MOLGEIM_SLAY_2, m_creature); } @@ -626,7 +626,7 @@ struct MANGOS_DLL_DECL boss_steelbreakerAI : public ScriptedAI m_uiPowerTimer = 10000; } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { if (!m_pInstance) return; @@ -655,7 +655,7 @@ struct MANGOS_DLL_DECL boss_steelbreakerAI : public ScriptedAI DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_HIGH_VOLTAGE : SPELL_HIGH_VOLTAGE_H, CAST_TRIGGERED); } - void KilledUnit(Unit* pVictim) override + void KilledUnit(Unit* /*pVictim*/) override { DoScriptText(urand(0, 1) ? SAY_STEEL_SLAY_1 : SAY_STEEL_SLAY_2, m_creature); } diff --git a/scripts/northrend/ulduar/ulduar/boss_auriaya.cpp b/scripts/northrend/ulduar/ulduar/boss_auriaya.cpp index e45c83ef5..047e8f5fb 100644 --- a/scripts/northrend/ulduar/ulduar/boss_auriaya.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_auriaya.cpp @@ -93,7 +93,7 @@ struct MANGOS_DLL_DECL boss_auriayaAI : public ScriptedAI m_uiDefenderTimer = 1 * MINUTE * IN_MILLISECONDS; } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoScriptText(SAY_DEATH, m_creature); @@ -109,7 +109,7 @@ struct MANGOS_DLL_DECL boss_auriayaAI : public ScriptedAI DoScriptText(SAY_AGGRO, m_creature); } - void KilledUnit(Unit* pVictim) override + void KilledUnit(Unit* /*pVictim*/) override { DoScriptText(urand(0, 1) ? SAY_SLAY_1 : SAY_SLAY_2, m_creature); } @@ -231,7 +231,7 @@ struct MANGOS_DLL_DECL boss_feral_defenderAI : public ScriptedAI DoCastSpellIfCan(m_creature, SPELL_FERAL_ESSENCE); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { // Set achiev criteria to true if (m_pInstance) diff --git a/scripts/northrend/ulduar/ulduar/boss_general_vezax.cpp b/scripts/northrend/ulduar/ulduar/boss_general_vezax.cpp index de2883298..019c8ea0f 100644 --- a/scripts/northrend/ulduar/ulduar/boss_general_vezax.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_general_vezax.cpp @@ -110,7 +110,7 @@ struct MANGOS_DLL_DECL boss_general_vezaxAI : public ScriptedAI m_pInstance->SetData(TYPE_VEZAX, FAIL); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { if (m_pInstance) m_pInstance->SetData(TYPE_VEZAX, DONE); @@ -118,7 +118,7 @@ struct MANGOS_DLL_DECL boss_general_vezaxAI : public ScriptedAI DoScriptText(SAY_DEATH, m_creature); } - void KilledUnit(Unit* pVictim) override + void KilledUnit(Unit* /*pVictim*/) override { DoScriptText(urand(0, 1) ? SAY_SLAY_1 : SAY_SLAY_2, m_creature); } diff --git a/scripts/northrend/utgarde_keep/utgarde_keep/boss_ingvar.cpp b/scripts/northrend/utgarde_keep/utgarde_keep/boss_ingvar.cpp index a21283583..dfb6ebcd3 100644 --- a/scripts/northrend/utgarde_keep/utgarde_keep/boss_ingvar.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_keep/boss_ingvar.cpp @@ -184,12 +184,12 @@ struct MANGOS_DLL_DECL boss_ingvarAI : public ScriptedAI } } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoScriptText(SAY_DEATH_SECOND, m_creature); } - void KilledUnit(Unit* pVictim) override + void KilledUnit(Unit* /*pVictim*/) override { if (urand(0, 1)) DoScriptText(m_bIsResurrected ? SAY_KILL_SECOND : SAY_KILL_FIRST, m_creature); diff --git a/scripts/northrend/utgarde_keep/utgarde_keep/boss_keleseth.cpp b/scripts/northrend/utgarde_keep/utgarde_keep/boss_keleseth.cpp index 2f35d5683..9137c7e15 100644 --- a/scripts/northrend/utgarde_keep/utgarde_keep/boss_keleseth.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_keep/boss_keleseth.cpp @@ -261,7 +261,7 @@ struct MANGOS_DLL_DECL boss_kelesethAI : public ScriptedAI pSummoned->ApplySpellImmune(0, IMMUNITY_DAMAGE, SPELL_SCHOOL_MASK_FROST, true); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoScriptText(SAY_DEATH, m_creature); @@ -277,7 +277,7 @@ struct MANGOS_DLL_DECL boss_kelesethAI : public ScriptedAI m_pInstance->SetData(TYPE_KELESETH, FAIL); } - void KilledUnit(Unit* pVictim) override + void KilledUnit(Unit* /*pVictim*/) override { DoScriptText(SAY_KILL, m_creature); } diff --git a/scripts/northrend/utgarde_keep/utgarde_keep/boss_skarvald_and_dalronn.cpp b/scripts/northrend/utgarde_keep/utgarde_keep/boss_skarvald_and_dalronn.cpp index 011f7dba2..d0911b40f 100644 --- a/scripts/northrend/utgarde_keep/utgarde_keep/boss_skarvald_and_dalronn.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_keep/boss_skarvald_and_dalronn.cpp @@ -138,7 +138,7 @@ struct MANGOS_DLL_DECL boss_s_and_d_dummyAI : public ScriptedAI pSummoned->AI()->AttackStart(pTarget ? pTarget : m_creature->getVictim()); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { if (Creature* pBuddy = GetBuddy()) { @@ -189,7 +189,7 @@ struct MANGOS_DLL_DECL boss_skarvaldAI : public boss_s_and_d_dummyAI m_uiYellDelayTimer = 5000; } - void KilledUnit(Unit* pVictim) override + void KilledUnit(Unit* /*pVictim*/) override { DoScriptText(SAY_SKA_KILL, m_creature); } @@ -266,7 +266,7 @@ struct MANGOS_DLL_DECL boss_dalronnAI : public boss_s_and_d_dummyAI m_uiSkeletonTimer = urand(25000, 35000); } - void KilledUnit(Unit* pVictim) override + void KilledUnit(Unit* /*pVictim*/) override { DoScriptText(SAY_DAL_KILL, m_creature); } diff --git a/scripts/northrend/utgarde_keep/utgarde_keep/utgarde_keep.cpp b/scripts/northrend/utgarde_keep/utgarde_keep/utgarde_keep.cpp index d99744910..126b01103 100644 --- a/scripts/northrend/utgarde_keep/utgarde_keep/utgarde_keep.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_keep/utgarde_keep.cpp @@ -120,7 +120,7 @@ struct MANGOS_DLL_DECL mob_dragonflayer_forge_masterAI : public ScriptedAI SetMyForge(); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { if (m_pInstance) m_pInstance->SetData(m_uiForgeEncounterId, DONE); diff --git a/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_gortok.cpp b/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_gortok.cpp index b256dc479..40c065cee 100644 --- a/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_gortok.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_gortok.cpp @@ -77,12 +77,12 @@ struct MANGOS_DLL_DECL boss_gortokAI : public ScriptedAI DoScriptText(SAY_AGGRO, m_creature); } - void KilledUnit(Unit* pVictim) override + void KilledUnit(Unit* /*pVictim*/) override { DoScriptText(urand(0, 1) ? SAY_SLAY_1 : SAY_SLAY_2, m_creature); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoScriptText(SAY_DEATH, m_creature); diff --git a/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_skadi.cpp b/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_skadi.cpp index 363f89faf..718810eed 100644 --- a/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_skadi.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_skadi.cpp @@ -96,7 +96,7 @@ struct MANGOS_DLL_DECL boss_skadiAI : public ScriptedAI DoScriptText(SAY_AGGRO, m_creature); } - void KilledUnit(Unit* pVictim) override + void KilledUnit(Unit* /*pVictim*/) override { switch (urand(0, 2)) { @@ -106,7 +106,7 @@ struct MANGOS_DLL_DECL boss_skadiAI : public ScriptedAI } } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoScriptText(SAY_DEATH, m_creature); diff --git a/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_svala.cpp b/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_svala.cpp index cff52524d..bab10ad3e 100644 --- a/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_svala.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_svala.cpp @@ -208,7 +208,7 @@ struct MANGOS_DLL_DECL boss_svalaAI : public ScriptedAI } } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoScriptText(SAY_DEATH, m_creature); diff --git a/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_ymiron.cpp b/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_ymiron.cpp index 534b635d4..5a0b0a35f 100644 --- a/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_ymiron.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_ymiron.cpp @@ -170,7 +170,7 @@ struct MANGOS_DLL_DECL boss_ymironAI : public ScriptedAI m_pInstance->SetData(TYPE_YMIRON, IN_PROGRESS); } - void KilledUnit(Unit* pVictim) override + void KilledUnit(Unit* /*pVictim*/) override { switch (urand(0, 3)) { @@ -181,7 +181,7 @@ struct MANGOS_DLL_DECL boss_ymironAI : public ScriptedAI } } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoScriptText(SAY_DEATH, m_creature); diff --git a/scripts/northrend/violet_hold/boss_erekem.cpp b/scripts/northrend/violet_hold/boss_erekem.cpp index fc172008f..dcf0019df 100644 --- a/scripts/northrend/violet_hold/boss_erekem.cpp +++ b/scripts/northrend/violet_hold/boss_erekem.cpp @@ -86,12 +86,12 @@ struct MANGOS_DLL_DECL boss_erekemAI : public ScriptedAI DoScriptText(SAY_AGGRO, m_creature); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoScriptText(SAY_DEATH, m_creature); } - void KilledUnit(Unit* pVictim) override + void KilledUnit(Unit* /*pVictim*/) override { switch (urand(0, 2)) { @@ -194,7 +194,7 @@ struct MANGOS_DLL_DECL npc_erekem_guardAI : public ScriptedAI m_uiStrikeTimer = urand(5000, 7000); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { if (!m_pInstance) return; diff --git a/scripts/northrend/violet_hold/boss_ichoron.cpp b/scripts/northrend/violet_hold/boss_ichoron.cpp index 691cae80a..cb0b57774 100644 --- a/scripts/northrend/violet_hold/boss_ichoron.cpp +++ b/scripts/northrend/violet_hold/boss_ichoron.cpp @@ -90,7 +90,7 @@ struct MANGOS_DLL_DECL boss_ichoronAI : public ScriptedAI DoCastSpellIfCan(m_creature, SPELL_PROTECTIVE_BUBBLE); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoScriptText(SAY_DEATH, m_creature); } diff --git a/scripts/northrend/violet_hold/instance_violet_hold.cpp b/scripts/northrend/violet_hold/instance_violet_hold.cpp index ea8c38870..d1a90e659 100644 --- a/scripts/northrend/violet_hold/instance_violet_hold.cpp +++ b/scripts/northrend/violet_hold/instance_violet_hold.cpp @@ -29,16 +29,16 @@ instance_violet_hold::instance_violet_hold(Map* pMap) : ScriptedInstance(pMap), m_uiWorldStateSealCount(100), m_uiWorldStatePortalCount(0), - m_bIsVoidDance(false), - m_bIsDefenseless(false), - m_bIsDehydratation(false), + m_uiPortalId(0), + m_uiPortalTimer(0), + m_uiMaxCountPortalLoc(0), m_uiSealYellCount(0), m_uiEventResetTimer(0), - m_uiPortalId(0), - m_uiPortalTimer(0), - m_uiMaxCountPortalLoc(0) + m_bIsVoidDance(false), + m_bIsDefenseless(false), + m_bIsDehydratation(false) { Initialize(); } diff --git a/scripts/outland/auchindoun/auchenai_crypts/boss_exarch_maladaar.cpp b/scripts/outland/auchindoun/auchenai_crypts/boss_exarch_maladaar.cpp index f2724f77a..44f5b95aa 100644 --- a/scripts/outland/auchindoun/auchenai_crypts/boss_exarch_maladaar.cpp +++ b/scripts/outland/auchindoun/auchenai_crypts/boss_exarch_maladaar.cpp @@ -66,7 +66,7 @@ struct MANGOS_DLL_DECL mob_stolen_soulAI : public ScriptedAI m_creature->SetDisplayId(pTarget->GetDisplayId()); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { if (Unit* pTarget = m_creature->GetMap()->GetUnit(m_targetGuid)) DoCastSpellIfCan(pTarget, SPELL_STOLEN_SOUL_DISPEL, CAST_TRIGGERED); @@ -224,7 +224,7 @@ struct MANGOS_DLL_DECL boss_exarch_maladaarAI : public ScriptedAI } } - void KilledUnit(Unit* pVictim) override + void KilledUnit(Unit* /*pVictim*/) override { if (urand(0, 1)) return; @@ -232,7 +232,7 @@ struct MANGOS_DLL_DECL boss_exarch_maladaarAI : public ScriptedAI DoScriptText(urand(0, 1) ? SAY_SLAY_1 : SAY_SLAY_2, m_creature); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoScriptText(SAY_DEATH, m_creature); diff --git a/scripts/outland/auchindoun/mana_tombs/boss_nexusprince_shaffar.cpp b/scripts/outland/auchindoun/mana_tombs/boss_nexusprince_shaffar.cpp index e0a342bd9..4609ea0c3 100644 --- a/scripts/outland/auchindoun/mana_tombs/boss_nexusprince_shaffar.cpp +++ b/scripts/outland/auchindoun/mana_tombs/boss_nexusprince_shaffar.cpp @@ -100,12 +100,12 @@ struct MANGOS_DLL_DECL boss_nexusprince_shaffarAI : public ScriptedAI pSummoned->AI()->AttackStart(pTarget); } - void KilledUnit(Unit* pVictim) override + void KilledUnit(Unit* /*pVictim*/) override { DoScriptText(urand(0, 1) ? SAY_SLAY_1 : SAY_SLAY_2, m_creature); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoScriptText(SAY_DEAD, m_creature); } diff --git a/scripts/outland/auchindoun/mana_tombs/boss_pandemonius.cpp b/scripts/outland/auchindoun/mana_tombs/boss_pandemonius.cpp index 925407819..306e585de 100644 --- a/scripts/outland/auchindoun/mana_tombs/boss_pandemonius.cpp +++ b/scripts/outland/auchindoun/mana_tombs/boss_pandemonius.cpp @@ -62,12 +62,12 @@ struct MANGOS_DLL_DECL boss_pandemoniusAI : public ScriptedAI m_uiVoidBlastCounter = 0; } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoScriptText(SAY_DEATH, m_creature); } - void KilledUnit(Unit* pVictim) override + void KilledUnit(Unit* /*pVictim*/) override { DoScriptText(urand(0, 1) ? SAY_KILL_1 : SAY_KILL_2, m_creature); } diff --git a/scripts/outland/auchindoun/sethekk_halls/boss_anzu.cpp b/scripts/outland/auchindoun/sethekk_halls/boss_anzu.cpp index 7a0284038..329c62183 100644 --- a/scripts/outland/auchindoun/sethekk_halls/boss_anzu.cpp +++ b/scripts/outland/auchindoun/sethekk_halls/boss_anzu.cpp @@ -86,7 +86,7 @@ struct MANGOS_DLL_DECL boss_anzuAI : public ScriptedAI m_pInstance->SetData(TYPE_ANZU, IN_PROGRESS); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DespawnBirdHelpers(); diff --git a/scripts/outland/auchindoun/sethekk_halls/boss_darkweaver_syth.cpp b/scripts/outland/auchindoun/sethekk_halls/boss_darkweaver_syth.cpp index 7874ea440..f24682557 100644 --- a/scripts/outland/auchindoun/sethekk_halls/boss_darkweaver_syth.cpp +++ b/scripts/outland/auchindoun/sethekk_halls/boss_darkweaver_syth.cpp @@ -95,12 +95,12 @@ struct MANGOS_DLL_DECL boss_darkweaver_sythAI : public ScriptedAI } } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoScriptText(SAY_DEATH, m_creature); } - void KilledUnit(Unit* pVictim) override + void KilledUnit(Unit* /*pVictim*/) override { if (urand(0, 1)) return; diff --git a/scripts/outland/auchindoun/sethekk_halls/boss_talon_king_ikiss.cpp b/scripts/outland/auchindoun/sethekk_halls/boss_talon_king_ikiss.cpp index 5c3f8c788..fe468cf9d 100644 --- a/scripts/outland/auchindoun/sethekk_halls/boss_talon_king_ikiss.cpp +++ b/scripts/outland/auchindoun/sethekk_halls/boss_talon_king_ikiss.cpp @@ -112,7 +112,7 @@ struct MANGOS_DLL_DECL boss_talon_king_ikissAI : public ScriptedAI m_pInstance->SetData(TYPE_IKISS, IN_PROGRESS); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoScriptText(SAY_DEATH, m_creature); diff --git a/scripts/outland/auchindoun/shadow_labyrinth/boss_ambassador_hellmaw.cpp b/scripts/outland/auchindoun/shadow_labyrinth/boss_ambassador_hellmaw.cpp index 4486b1310..9bb277714 100644 --- a/scripts/outland/auchindoun/shadow_labyrinth/boss_ambassador_hellmaw.cpp +++ b/scripts/outland/auchindoun/shadow_labyrinth/boss_ambassador_hellmaw.cpp @@ -91,12 +91,12 @@ struct MANGOS_DLL_DECL boss_ambassador_hellmawAI : public ScriptedAI m_pInstance->SetData(TYPE_HELLMAW, IN_PROGRESS); } - void KilledUnit(Unit* pVictim) override + void KilledUnit(Unit* /*pVictim*/) override { DoScriptText(urand(0, 1) ? SAY_SLAY_1 : SAY_SLAY_2, m_creature); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoScriptText(SAY_DEATH, m_creature); diff --git a/scripts/outland/auchindoun/shadow_labyrinth/boss_blackheart_the_inciter.cpp b/scripts/outland/auchindoun/shadow_labyrinth/boss_blackheart_the_inciter.cpp index 62f74688c..5ab1fcf58 100644 --- a/scripts/outland/auchindoun/shadow_labyrinth/boss_blackheart_the_inciter.cpp +++ b/scripts/outland/auchindoun/shadow_labyrinth/boss_blackheart_the_inciter.cpp @@ -74,12 +74,12 @@ struct MANGOS_DLL_DECL boss_blackheart_the_inciterAI : public ScriptedAI m_uiKnockbackTimer = urand(10000, 14000); } - void KilledUnit(Unit* pVictim) override + void KilledUnit(Unit* /*pVictim*/) override { DoScriptText(urand(0, 1) ? SAY_SLAY1 : SAY_SLAY2, m_creature); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoScriptText(SAY_DEATH, m_creature); diff --git a/scripts/outland/auchindoun/shadow_labyrinth/boss_grandmaster_vorpil.cpp b/scripts/outland/auchindoun/shadow_labyrinth/boss_grandmaster_vorpil.cpp index 13540a5c2..0ce2b029d 100644 --- a/scripts/outland/auchindoun/shadow_labyrinth/boss_grandmaster_vorpil.cpp +++ b/scripts/outland/auchindoun/shadow_labyrinth/boss_grandmaster_vorpil.cpp @@ -143,7 +143,7 @@ struct MANGOS_DLL_DECL boss_grandmaster_vorpilAI : public ScriptedAI m_pInstance->SetData(TYPE_VORPIL, FAIL); } - void KilledUnit(Unit* pVictim) override + void KilledUnit(Unit* /*pVictim*/) override { DoScriptText(urand(0, 1) ? SAY_SLAY_1 : SAY_SLAY_2, m_creature); } @@ -157,7 +157,7 @@ struct MANGOS_DLL_DECL boss_grandmaster_vorpilAI : public ScriptedAI pSummoned->CastSpell(pSummoned, SPELL_VOID_PORTAL_VISUAL, true); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoScriptText(SAY_DEATH, m_creature); diff --git a/scripts/outland/black_temple/boss_bloodboil.cpp b/scripts/outland/black_temple/boss_bloodboil.cpp index 092087b79..9e04b781a 100644 --- a/scripts/outland/black_temple/boss_bloodboil.cpp +++ b/scripts/outland/black_temple/boss_bloodboil.cpp @@ -119,12 +119,12 @@ struct MANGOS_DLL_DECL boss_gurtogg_bloodboilAI : public ScriptedAI m_pInstance->SetData(TYPE_BLOODBOIL, IN_PROGRESS); } - void KilledUnit(Unit* pVictim) override + void KilledUnit(Unit* /*pVictim*/) override { DoScriptText(urand(0, 1) ? SAY_SLAY1 : SAY_SLAY2, m_creature); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { if (m_pInstance) m_pInstance->SetData(TYPE_BLOODBOIL, DONE); diff --git a/scripts/outland/black_temple/boss_illidan.cpp b/scripts/outland/black_temple/boss_illidan.cpp index 1d410a643..4a5b46dbc 100644 --- a/scripts/outland/black_temple/boss_illidan.cpp +++ b/scripts/outland/black_temple/boss_illidan.cpp @@ -411,7 +411,7 @@ struct MANGOS_DLL_DECL boss_illidan_stormrageAI : public ScriptedAI, private Dia m_pInstance->SetData(TYPE_ILLIDAN, FAIL); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); @@ -1529,9 +1529,8 @@ struct MANGOS_DLL_DECL npc_flame_of_azzinothAI : public ScriptedAI { std::vector suitableTargets; ThreatList const& threatList = m_creature->getThreatManager().getThreatList(); - ThreatList::const_iterator itr = threatList.begin(); - for (itr; itr != threatList.end(); ++itr) + for (ThreatList::const_iterator itr = threatList.begin(); itr != threatList.end(); ++itr) { if (Unit* pTarget = m_creature->GetMap()->GetUnit((*itr)->getUnitGuid())) { @@ -1580,7 +1579,7 @@ struct MANGOS_DLL_DECL npc_shadow_demonAI : public ScriptedAI void MoveInLineOfSight(Unit* pWho) override { } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { if (Player* pPlayer = m_creature->GetMap()->GetPlayer(m_targetGuid)) pPlayer->RemoveAurasDueToSpell(SPELL_PARALYZE); diff --git a/scripts/outland/black_temple/boss_mother_shahraz.cpp b/scripts/outland/black_temple/boss_mother_shahraz.cpp index 3b003d209..fcfc014d3 100644 --- a/scripts/outland/black_temple/boss_mother_shahraz.cpp +++ b/scripts/outland/black_temple/boss_mother_shahraz.cpp @@ -113,12 +113,12 @@ struct MANGOS_DLL_DECL boss_shahrazAI : public ScriptedAI m_pInstance->SetData(TYPE_SHAHRAZ, FAIL); } - void KilledUnit(Unit* pVictim) override + void KilledUnit(Unit* /*pVictim*/) override { DoScriptText(urand(0, 1) ? SAY_SLAY_1 : SAY_SLAY_2, m_creature); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { if (m_pInstance) m_pInstance->SetData(TYPE_SHAHRAZ, DONE); diff --git a/scripts/outland/black_temple/boss_reliquary_of_souls.cpp b/scripts/outland/black_temple/boss_reliquary_of_souls.cpp index d6de2fa84..12ee24df8 100644 --- a/scripts/outland/black_temple/boss_reliquary_of_souls.cpp +++ b/scripts/outland/black_temple/boss_reliquary_of_souls.cpp @@ -139,7 +139,7 @@ struct MANGOS_DLL_DECL boss_reliquary_of_soulsAI : public Scripted_NoMovementAI m_creature->HandleEmote(EMOTE_STATE_NONE); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { if (m_pInstance) m_pInstance->SetData(TYPE_RELIQUIARY, DONE); @@ -405,7 +405,7 @@ struct MANGOS_DLL_DECL boss_essence_of_sufferingAI : public essence_base_AI m_uiSoulDrainTimer = 20000; } - void KilledUnit(Unit* pVictim) override + void KilledUnit(Unit* /*pVictim*/) override { DoScriptText(urand(0, 1) ? SUFF_SAY_SLAY1 : SUFF_SAY_SLAY2, m_creature); } @@ -465,7 +465,7 @@ struct MANGOS_DLL_DECL boss_essence_of_desireAI : public essence_base_AI DoCastSpellIfCan(m_creature, SPELL_AURA_OF_DESIRE); } - void KilledUnit(Unit* pVictim) override + void KilledUnit(Unit* /*pVictim*/) override { switch (urand(0, 2)) { @@ -543,12 +543,12 @@ struct MANGOS_DLL_DECL boss_essence_of_angerAI : public ScriptedAI DoCastSpellIfCan(m_creature, SPELL_AURA_OF_ANGER); } - void KilledUnit(Unit* pVictim) override + void KilledUnit(Unit* /*pVictim*/) override { DoScriptText(urand(0, 1) ? ANGER_SAY_SLAY1 : ANGER_SAY_SLAY2, m_creature); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoScriptText(ANGER_SAY_DEATH, m_creature); } @@ -620,7 +620,7 @@ struct MANGOS_DLL_DECL npc_enslaved_soulAI : public ScriptedAI DoCastSpellIfCan(m_creature, SPELL_ENSLAVED_SOUL_PASSIVE); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoCastSpellIfCan(m_creature, SPELL_SOUL_RELEASE, CAST_TRIGGERED); diff --git a/scripts/outland/black_temple/boss_shade_of_akama.cpp b/scripts/outland/black_temple/boss_shade_of_akama.cpp index 068a781c9..a37e6936f 100644 --- a/scripts/outland/black_temple/boss_shade_of_akama.cpp +++ b/scripts/outland/black_temple/boss_shade_of_akama.cpp @@ -216,7 +216,7 @@ struct MANGOS_DLL_DECL npc_akamaAI : public ScriptedAI, private DialogueHelper } } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoScriptText(SAY_DEATH, m_creature); m_creature->SetCorpseDelay(30); @@ -543,7 +543,7 @@ struct MANGOS_DLL_DECL boss_shade_of_akamaAI : public ScriptedAI EnterEvadeMode(); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoCastSpellIfCan(m_creature, SPELL_SUMMON_SHADE_TRIGGER, CAST_TRIGGERED); @@ -608,7 +608,7 @@ struct MANGOS_DLL_DECL mob_ashtongue_channelerAI : public ScriptedAI m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { if (!m_pInstance) return; @@ -655,7 +655,7 @@ struct MANGOS_DLL_DECL mob_ashtongue_sorcererAI : public ScriptedAI void AttackStart(Unit* pWho) override {} void MoveInLineOfSight(Unit* pWho) override {} - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { if (!m_pInstance) return; diff --git a/scripts/outland/black_temple/boss_supremus.cpp b/scripts/outland/black_temple/boss_supremus.cpp index c477f10f9..692b30d3a 100644 --- a/scripts/outland/black_temple/boss_supremus.cpp +++ b/scripts/outland/black_temple/boss_supremus.cpp @@ -130,7 +130,7 @@ struct MANGOS_DLL_DECL boss_supremusAI : public ScriptedAI m_pInstance->SetData(TYPE_SUPREMUS, IN_PROGRESS); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { if (m_pInstance) m_pInstance->SetData(TYPE_SUPREMUS, DONE); diff --git a/scripts/outland/black_temple/boss_teron_gorefiend.cpp b/scripts/outland/black_temple/boss_teron_gorefiend.cpp index 4a3b3f543..2290b3d35 100644 --- a/scripts/outland/black_temple/boss_teron_gorefiend.cpp +++ b/scripts/outland/black_temple/boss_teron_gorefiend.cpp @@ -122,7 +122,7 @@ struct MANGOS_DLL_DECL boss_teron_gorefiendAI : public ScriptedAI DoScriptText(urand(0, 1) ? SAY_SLAY1 : SAY_SLAY2, m_creature); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { if (m_pInstance) m_pInstance->SetData(TYPE_GOREFIEND, DONE); diff --git a/scripts/outland/black_temple/boss_warlord_najentus.cpp b/scripts/outland/black_temple/boss_warlord_najentus.cpp index e8f962b2b..2872c4f2e 100644 --- a/scripts/outland/black_temple/boss_warlord_najentus.cpp +++ b/scripts/outland/black_temple/boss_warlord_najentus.cpp @@ -84,12 +84,12 @@ struct MANGOS_DLL_DECL boss_najentusAI : public ScriptedAI m_pInstance->SetData(TYPE_NAJENTUS, NOT_STARTED); } - void KilledUnit(Unit* pVictim) override + void KilledUnit(Unit* /*pVictim*/) override { DoScriptText(urand(0, 1) ? SAY_SLAY1 : SAY_SLAY2, m_creature); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { if (m_pInstance) m_pInstance->SetData(TYPE_NAJENTUS, DONE); diff --git a/scripts/outland/black_temple/illidari_council.cpp b/scripts/outland/black_temple/illidari_council.cpp index 0005a60d7..cadcf746d 100644 --- a/scripts/outland/black_temple/illidari_council.cpp +++ b/scripts/outland/black_temple/illidari_council.cpp @@ -291,7 +291,7 @@ struct MANGOS_DLL_DECL boss_illidari_councilAI : public ScriptedAI } } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { if (m_pInstance) { @@ -368,7 +368,7 @@ struct MANGOS_DLL_DECL boss_gathios_the_shattererAI : public boss_illidari_counc m_uiJudgmentTimer = 0; } - void KilledUnit(Unit* pVictim) override + void KilledUnit(Unit* /*pVictim*/) override { DoScriptText(SAY_GATH_SLAY, m_creature); } @@ -485,7 +485,7 @@ struct MANGOS_DLL_DECL boss_high_nethermancer_zerevorAI : public boss_illidari_c } } - void KilledUnit(Unit* pVictim) override + void KilledUnit(Unit* /*pVictim*/) override { DoScriptText(SAY_ZERE_SLAY, m_creature); } @@ -588,7 +588,7 @@ struct MANGOS_DLL_DECL boss_lady_malandeAI : public boss_illidari_councilAI } } - void KilledUnit(Unit* pVictim) override + void KilledUnit(Unit* /*pVictim*/) override { DoScriptText(SAY_MALA_SLAY, m_creature); } @@ -668,7 +668,7 @@ struct MANGOS_DLL_DECL boss_veras_darkshadowAI : public boss_illidari_councilAI m_uiVanishEndtimer = 0; } - void KilledUnit(Unit* pVictim) override + void KilledUnit(Unit* /*pVictim*/) override { DoScriptText(SAY_VERA_SLAY, m_creature); } diff --git a/scripts/outland/boss_doomlord_kazzak.cpp b/scripts/outland/boss_doomlord_kazzak.cpp index bcf79e6b1..b59cd760c 100644 --- a/scripts/outland/boss_doomlord_kazzak.cpp +++ b/scripts/outland/boss_doomlord_kazzak.cpp @@ -99,7 +99,7 @@ struct MANGOS_DLL_DECL boss_doomlordkazzakAI : public ScriptedAI } } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoScriptText(SAY_DEATH, m_creature); } diff --git a/scripts/outland/boss_doomwalker.cpp b/scripts/outland/boss_doomwalker.cpp index 3bc2be18e..26b7c4d91 100644 --- a/scripts/outland/boss_doomwalker.cpp +++ b/scripts/outland/boss_doomwalker.cpp @@ -84,7 +84,7 @@ struct MANGOS_DLL_DECL boss_doomwalkerAI : public ScriptedAI } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoScriptText(SAY_DEATH, m_creature); } diff --git a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_fathomlord_karathress.cpp b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_fathomlord_karathress.cpp index ceae073e4..fbc062430 100644 --- a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_fathomlord_karathress.cpp +++ b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_fathomlord_karathress.cpp @@ -131,7 +131,7 @@ struct MANGOS_DLL_DECL boss_fathomlord_karathressAI : public ScriptedAI DoScriptText(SAY_AGGRO, m_creature); } - void KilledUnit(Unit* pVictim) override + void KilledUnit(Unit* /*pVictim*/) override { switch (urand(0, 2)) { @@ -141,7 +141,7 @@ struct MANGOS_DLL_DECL boss_fathomlord_karathressAI : public ScriptedAI } } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoScriptText(SAY_DEATH, m_creature); @@ -250,7 +250,7 @@ struct MANGOS_DLL_DECL boss_fathomguard_sharkkisAI : public ScriptedAI m_uiPetTimer = 10000; } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoCastSpellIfCan(m_creature, SPELL_POWER_OF_SHARKKIS, CAST_TRIGGERED); } @@ -345,7 +345,7 @@ struct MANGOS_DLL_DECL boss_fathomguard_tidalvessAI : public ScriptedAI m_uiTotemTimer = urand(2000, 5000); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoCastSpellIfCan(m_creature, SPELL_POWER_OF_TIDALVESS, CAST_TRIGGERED); } @@ -412,7 +412,7 @@ struct MANGOS_DLL_DECL boss_fathomguard_caribdisAI : public ScriptedAI m_uiCycloneTimer = urand(10000, 15000); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoCastSpellIfCan(m_creature, SPELL_POWER_OF_CARIBDIS, CAST_TRIGGERED); } diff --git a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_hydross_the_unstable.cpp b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_hydross_the_unstable.cpp index d31684660..242c97664 100644 --- a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_hydross_the_unstable.cpp +++ b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_hydross_the_unstable.cpp @@ -110,7 +110,7 @@ struct MANGOS_DLL_DECL boss_hydross_the_unstableAI : public ScriptedAI m_pInstance->SetData(TYPE_HYDROSS_EVENT, IN_PROGRESS); } - void KilledUnit(Unit* pVictim) override + void KilledUnit(Unit* /*pVictim*/) override { if (m_bCorruptedForm) DoScriptText(urand(0, 1) ? SAY_CORRUPT_SLAY1 : SAY_CORRUPT_SLAY2, m_creature); @@ -118,7 +118,7 @@ struct MANGOS_DLL_DECL boss_hydross_the_unstableAI : public ScriptedAI DoScriptText(urand(0, 1) ? SAY_CLEAN_SLAY1 : SAY_CLEAN_SLAY2, m_creature); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoScriptText(m_bCorruptedForm ? SAY_CORRUPT_DEATH : SAY_CLEAN_DEATH, m_creature); diff --git a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_lady_vashj.cpp b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_lady_vashj.cpp index b80c5c22c..86f949530 100644 --- a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_lady_vashj.cpp +++ b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_lady_vashj.cpp @@ -226,7 +226,7 @@ struct MANGOS_DLL_DECL boss_lady_vashjAI : public ScriptedAI } } - void KilledUnit(Unit* pVictim) override + void KilledUnit(Unit* /*pVictim*/) override { switch (urand(0, 2)) { @@ -236,7 +236,7 @@ struct MANGOS_DLL_DECL boss_lady_vashjAI : public ScriptedAI } } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoScriptText(SAY_DEATH, m_creature); diff --git a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_leotheras_the_blind.cpp b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_leotheras_the_blind.cpp index 006eb0f39..220bb6a6d 100644 --- a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_leotheras_the_blind.cpp +++ b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_leotheras_the_blind.cpp @@ -148,7 +148,7 @@ struct MANGOS_DLL_DECL boss_leotheras_the_blindAI : public ScriptedAI } } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoScriptText(SAY_DEATH, m_creature); diff --git a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_morogrim_tidewalker.cpp b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_morogrim_tidewalker.cpp index 4d6ce00ed..3bf52f5c5 100644 --- a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_morogrim_tidewalker.cpp +++ b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_morogrim_tidewalker.cpp @@ -109,7 +109,7 @@ struct MANGOS_DLL_DECL boss_morogrim_tidewalkerAI : public ScriptedAI m_pInstance->SetData(TYPE_MOROGRIM_EVENT, IN_PROGRESS); } - void KilledUnit(Unit* pVictim) override + void KilledUnit(Unit* /*pVictim*/) override { switch (urand(0, 2)) { @@ -119,7 +119,7 @@ struct MANGOS_DLL_DECL boss_morogrim_tidewalkerAI : public ScriptedAI } } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoScriptText(SAY_DEATH, m_creature); diff --git a/scripts/outland/coilfang_reservoir/steam_vault/boss_hydromancer_thespia.cpp b/scripts/outland/coilfang_reservoir/steam_vault/boss_hydromancer_thespia.cpp index 4a342abf6..7fd497984 100644 --- a/scripts/outland/coilfang_reservoir/steam_vault/boss_hydromancer_thespia.cpp +++ b/scripts/outland/coilfang_reservoir/steam_vault/boss_hydromancer_thespia.cpp @@ -75,7 +75,7 @@ struct MANGOS_DLL_DECL boss_thespiaAI : public ScriptedAI m_pInstance->SetData(TYPE_HYDROMANCER_THESPIA, FAIL); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoScriptText(SAY_DEAD, m_creature); @@ -83,7 +83,7 @@ struct MANGOS_DLL_DECL boss_thespiaAI : public ScriptedAI m_pInstance->SetData(TYPE_HYDROMANCER_THESPIA, DONE); } - void KilledUnit(Unit* pVictim) override + void KilledUnit(Unit* /*pVictim*/) override { DoScriptText(urand(0, 1) ? SAY_SLAY_1 : SAY_SLAY_2, m_creature); } diff --git a/scripts/outland/coilfang_reservoir/steam_vault/boss_mekgineer_steamrigger.cpp b/scripts/outland/coilfang_reservoir/steam_vault/boss_mekgineer_steamrigger.cpp index 8830c01a1..c815007fd 100644 --- a/scripts/outland/coilfang_reservoir/steam_vault/boss_mekgineer_steamrigger.cpp +++ b/scripts/outland/coilfang_reservoir/steam_vault/boss_mekgineer_steamrigger.cpp @@ -100,7 +100,7 @@ struct MANGOS_DLL_DECL boss_mekgineer_steamriggerAI : public ScriptedAI m_pInstance->SetData(TYPE_MEKGINEER_STEAMRIGGER, FAIL); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoScriptText(SAY_DEATH, m_creature); @@ -108,7 +108,7 @@ struct MANGOS_DLL_DECL boss_mekgineer_steamriggerAI : public ScriptedAI m_pInstance->SetData(TYPE_MEKGINEER_STEAMRIGGER, DONE); } - void KilledUnit(Unit* pVictim) override + void KilledUnit(Unit* /*pVictim*/) override { switch (urand(0, 2)) { diff --git a/scripts/outland/coilfang_reservoir/steam_vault/boss_warlord_kalithresh.cpp b/scripts/outland/coilfang_reservoir/steam_vault/boss_warlord_kalithresh.cpp index f1826ac4b..c4278b9c6 100644 --- a/scripts/outland/coilfang_reservoir/steam_vault/boss_warlord_kalithresh.cpp +++ b/scripts/outland/coilfang_reservoir/steam_vault/boss_warlord_kalithresh.cpp @@ -89,12 +89,12 @@ struct MANGOS_DLL_DECL boss_warlord_kalithreshAI : public ScriptedAI m_pInstance->SetData(TYPE_WARLORD_KALITHRESH, IN_PROGRESS); } - void KilledUnit(Unit* pVictim) override + void KilledUnit(Unit* /*pVictim*/) override { DoScriptText(urand(0, 1) ? SAY_SLAY1 : SAY_SLAY2, m_creature); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoScriptText(SAY_DEATH, m_creature); diff --git a/scripts/outland/coilfang_reservoir/underbog/boss_hungarfen.cpp b/scripts/outland/coilfang_reservoir/underbog/boss_hungarfen.cpp index dfcdf9f36..e8e68a0df 100644 --- a/scripts/outland/coilfang_reservoir/underbog/boss_hungarfen.cpp +++ b/scripts/outland/coilfang_reservoir/underbog/boss_hungarfen.cpp @@ -57,7 +57,7 @@ struct MANGOS_DLL_DECL boss_hungarfenAI : public ScriptedAI m_uiAcidGeyserTimer = 10000; } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoCastSpellIfCan(m_creature, SPELL_DESPAWN_MUSHROOMS, CAST_TRIGGERED); } diff --git a/scripts/outland/gruuls_lair/boss_gruul.cpp b/scripts/outland/gruuls_lair/boss_gruul.cpp index 657247dab..7b21ae9bf 100644 --- a/scripts/outland/gruuls_lair/boss_gruul.cpp +++ b/scripts/outland/gruuls_lair/boss_gruul.cpp @@ -96,7 +96,7 @@ struct MANGOS_DLL_DECL boss_gruulAI : public ScriptedAI m_pInstance->SetData(TYPE_GRUUL_EVENT, FAIL); } - void KilledUnit(Unit* pVictim) override + void KilledUnit(Unit* /*pVictim*/) override { switch (urand(0, 2)) { @@ -106,7 +106,7 @@ struct MANGOS_DLL_DECL boss_gruulAI : public ScriptedAI } } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoScriptText(SAY_DEATH, m_creature); diff --git a/scripts/outland/gruuls_lair/boss_high_king_maulgar.cpp b/scripts/outland/gruuls_lair/boss_high_king_maulgar.cpp index 41956223d..ebcbcd863 100644 --- a/scripts/outland/gruuls_lair/boss_high_king_maulgar.cpp +++ b/scripts/outland/gruuls_lair/boss_high_king_maulgar.cpp @@ -104,7 +104,7 @@ struct MANGOS_DLL_DECL boss_high_king_maulgarAI : public ScriptedAI m_pInstance->SetData(TYPE_MAULGAR_EVENT, FAIL); } - void KilledUnit(Unit* pVictim) override + void KilledUnit(Unit* /*pVictim*/) override { switch (urand(0, 2)) { @@ -114,7 +114,7 @@ struct MANGOS_DLL_DECL boss_high_king_maulgarAI : public ScriptedAI } } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoScriptText(SAY_DEATH, m_creature); diff --git a/scripts/outland/hellfire_citadel/blood_furnace/boss_kelidan_the_breaker.cpp b/scripts/outland/hellfire_citadel/blood_furnace/boss_kelidan_the_breaker.cpp index 12007425e..89c00c998 100644 --- a/scripts/outland/hellfire_citadel/blood_furnace/boss_kelidan_the_breaker.cpp +++ b/scripts/outland/hellfire_citadel/blood_furnace/boss_kelidan_the_breaker.cpp @@ -121,7 +121,7 @@ struct MANGOS_DLL_DECL boss_kelidan_the_breakerAI : public ScriptedAI DoScriptText(SAY_WAKE, m_creature); } - void KilledUnit(Unit* pVictim) override + void KilledUnit(Unit* /*pVictim*/) override { if (urand(0, 1)) return; @@ -129,7 +129,7 @@ struct MANGOS_DLL_DECL boss_kelidan_the_breakerAI : public ScriptedAI DoScriptText(urand(0, 1) ? SAY_KILL_1 : SAY_KILL_2, m_creature); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoScriptText(SAY_DIE, m_creature); diff --git a/scripts/outland/hellfire_citadel/blood_furnace/boss_the_maker.cpp b/scripts/outland/hellfire_citadel/blood_furnace/boss_the_maker.cpp index 7e3d1dc8c..bc9c15644 100644 --- a/scripts/outland/hellfire_citadel/blood_furnace/boss_the_maker.cpp +++ b/scripts/outland/hellfire_citadel/blood_furnace/boss_the_maker.cpp @@ -84,12 +84,12 @@ struct MANGOS_DLL_DECL boss_the_makerAI : public ScriptedAI m_pInstance->SetData(TYPE_THE_MAKER_EVENT, FAIL); } - void KilledUnit(Unit* pVictim) override + void KilledUnit(Unit* /*pVictim*/) override { DoScriptText(urand(0, 1) ? SAY_KILL_1 : SAY_KILL_2, m_creature); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoScriptText(SAY_DIE, m_creature); diff --git a/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_nazan_and_vazruden.cpp b/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_nazan_and_vazruden.cpp index 73c5127af..c6e32688a 100644 --- a/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_nazan_and_vazruden.cpp +++ b/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_nazan_and_vazruden.cpp @@ -97,7 +97,7 @@ struct MANGOS_DLL_DECL boss_vazrudenAI : public ScriptedAI } } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoScriptText(SAY_DEATH, m_creature); @@ -111,7 +111,7 @@ struct MANGOS_DLL_DECL boss_vazrudenAI : public ScriptedAI m_pInstance->SetData(TYPE_VAZRUDEN, FAIL); } - void KilledUnit(Unit* pVictim) override + void KilledUnit(Unit* /*pVictim*/) override { DoScriptText(urand(0, 1) ? SAY_KILL1 : SAY_KILL2, m_creature); } @@ -314,7 +314,7 @@ struct MANGOS_DLL_DECL boss_vazruden_heraldAI : public ScriptedAI m_pInstance->SetData(TYPE_VAZRUDEN, IN_PROGRESS); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { if (m_pInstance) m_pInstance->SetData(TYPE_NAZAN, DONE); diff --git a/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_omor_the_unscarred.cpp b/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_omor_the_unscarred.cpp index cca692f34..5b02c53fd 100644 --- a/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_omor_the_unscarred.cpp +++ b/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_omor_the_unscarred.cpp @@ -88,7 +88,7 @@ struct MANGOS_DLL_DECL boss_omor_the_unscarredAI : public ScriptedAI } } - void KilledUnit(Unit* pVictim) override + void KilledUnit(Unit* /*pVictim*/) override { if (urand(0, 1)) return; @@ -104,7 +104,7 @@ struct MANGOS_DLL_DECL boss_omor_the_unscarredAI : public ScriptedAI pSummoned->AI()->AttackStart(pTarget); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoScriptText(SAY_DIE, m_creature); } diff --git a/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_watchkeeper_gargolmar.cpp b/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_watchkeeper_gargolmar.cpp index 03d36ef4e..127bad2ad 100644 --- a/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_watchkeeper_gargolmar.cpp +++ b/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_watchkeeper_gargolmar.cpp @@ -92,12 +92,12 @@ struct MANGOS_DLL_DECL boss_watchkeeper_gargolmarAI : public ScriptedAI ScriptedAI::MoveInLineOfSight(pWho); } - void KilledUnit(Unit* pVictim) override + void KilledUnit(Unit* /*pVictim*/) override { DoScriptText(urand(0, 1) ? SAY_KILL_1 : SAY_KILL_2, m_creature); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoScriptText(SAY_DIE, m_creature); } diff --git a/scripts/outland/hellfire_citadel/magtheridons_lair/boss_magtheridon.cpp b/scripts/outland/hellfire_citadel/magtheridons_lair/boss_magtheridon.cpp index 244feb190..d09ebefc6 100644 --- a/scripts/outland/hellfire_citadel/magtheridons_lair/boss_magtheridon.cpp +++ b/scripts/outland/hellfire_citadel/magtheridons_lair/boss_magtheridon.cpp @@ -132,12 +132,12 @@ struct MANGOS_DLL_DECL boss_magtheridonAI : public ScriptedAI m_creature->RemoveAurasDueToSpell(SPELL_SHADOW_CAGE_DUMMY); } - void KilledUnit(Unit* pVictim) override + void KilledUnit(Unit* /*pVictim*/) override { DoScriptText(SAY_PLAYER_KILLED, m_creature); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { if (m_pInstance) m_pInstance->SetData(TYPE_MAGTHERIDON_EVENT, DONE); @@ -338,7 +338,7 @@ struct MANGOS_DLL_DECL mob_hellfire_channelerAI : public ScriptedAI // Don't attack on LoS check void MoveInLineOfSight(Unit* pWho) override { } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoCastSpellIfCan(m_creature, SPELL_SOUL_TRANSFER, CAST_TRIGGERED); } diff --git a/scripts/outland/hellfire_citadel/magtheridons_lair/instance_magtheridons_lair.cpp b/scripts/outland/hellfire_citadel/magtheridons_lair/instance_magtheridons_lair.cpp index 36544ef3c..f0dc4f8a0 100644 --- a/scripts/outland/hellfire_citadel/magtheridons_lair/instance_magtheridons_lair.cpp +++ b/scripts/outland/hellfire_citadel/magtheridons_lair/instance_magtheridons_lair.cpp @@ -25,9 +25,9 @@ EndScriptData */ #include "magtheridons_lair.h" instance_magtheridons_lair::instance_magtheridons_lair(Map* pMap) : ScriptedInstance(pMap), + m_uiRandYellTimer(90000), m_uiCageBreakTimer(0), - m_uiCageBreakStage(0), - m_uiRandYellTimer(90000) + m_uiCageBreakStage(0) { Initialize(); } diff --git a/scripts/outland/hellfire_citadel/shattered_halls/boss_nethekurse.cpp b/scripts/outland/hellfire_citadel/shattered_halls/boss_nethekurse.cpp index 851c8c1e8..6ea52f618 100644 --- a/scripts/outland/hellfire_citadel/shattered_halls/boss_nethekurse.cpp +++ b/scripts/outland/hellfire_citadel/shattered_halls/boss_nethekurse.cpp @@ -242,12 +242,12 @@ struct MANGOS_DLL_DECL boss_grand_warlock_nethekurseAI : public ScriptedAI pSummoned->CastSpell(pSummoned, SPELL_CONSUMPTION, false, NULL, NULL, m_creature->GetObjectGuid()); } - void KilledUnit(Unit* pVictim) override + void KilledUnit(Unit* /*pVictim*/) override { DoScriptText(urand(0, 1) ? SAY_SLAY_1 : SAY_SLAY_2, m_creature); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoScriptText(SAY_DIE, m_creature); diff --git a/scripts/outland/hellfire_citadel/shattered_halls/boss_warbringer_omrogg.cpp b/scripts/outland/hellfire_citadel/shattered_halls/boss_warbringer_omrogg.cpp index 36a00890e..f918fce53 100644 --- a/scripts/outland/hellfire_citadel/shattered_halls/boss_warbringer_omrogg.cpp +++ b/scripts/outland/hellfire_citadel/shattered_halls/boss_warbringer_omrogg.cpp @@ -225,7 +225,7 @@ struct MANGOS_DLL_DECL boss_warbringer_omroggAI : public ScriptedAI m_rightHeadGuid = pSummoned->GetObjectGuid(); } - void KilledUnit(Unit* pVictim) override + void KilledUnit(Unit* /*pVictim*/) override { Creature* pLeftHead = m_creature->GetMap()->GetCreature(m_leftHeadGuid); Creature* pRightHead = m_creature->GetMap()->GetCreature(m_rightHeadGuid); @@ -251,7 +251,7 @@ struct MANGOS_DLL_DECL boss_warbringer_omroggAI : public ScriptedAI } } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { Creature* pLeftHead = m_creature->GetMap()->GetCreature(m_leftHeadGuid); Creature* pRightHead = m_creature->GetMap()->GetCreature(m_rightHeadGuid); diff --git a/scripts/outland/hellfire_citadel/shattered_halls/boss_warchief_kargath_bladefist.cpp b/scripts/outland/hellfire_citadel/shattered_halls/boss_warchief_kargath_bladefist.cpp index 2b0b708d9..480436a55 100644 --- a/scripts/outland/hellfire_citadel/shattered_halls/boss_warchief_kargath_bladefist.cpp +++ b/scripts/outland/hellfire_citadel/shattered_halls/boss_warchief_kargath_bladefist.cpp @@ -131,7 +131,7 @@ struct MANGOS_DLL_DECL boss_warchief_kargath_bladefistAI : public ScriptedAI DoScriptText(urand(0, 1) ? SAY_SLAY1 : SAY_SLAY2, m_creature); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoScriptText(SAY_DEATH, m_creature); DoDespawnAdds(); diff --git a/scripts/outland/netherstorm.cpp b/scripts/outland/netherstorm.cpp index 05a639011..4145b2229 100644 --- a/scripts/outland/netherstorm.cpp +++ b/scripts/outland/netherstorm.cpp @@ -108,7 +108,7 @@ struct MANGOS_DLL_DECL npc_manaforge_control_consoleAI : public ScriptedAI ... }*/ - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoScriptText(EMOTE_ABORT, m_creature); diff --git a/scripts/outland/tempest_keep/arcatraz/arcatraz.cpp b/scripts/outland/tempest_keep/arcatraz/arcatraz.cpp index 1a7f8818c..a01772710 100644 --- a/scripts/outland/tempest_keep/arcatraz/arcatraz.cpp +++ b/scripts/outland/tempest_keep/arcatraz/arcatraz.cpp @@ -126,7 +126,7 @@ struct MANGOS_DLL_DECL npc_millhouse_manastormAI : public ScriptedAI, private Di } } - void KilledUnit(Unit* pVictim) override + void KilledUnit(Unit* /*pVictim*/) override { DoScriptText(urand(0, 1) ? SAY_KILL_1 : SAY_KILL_2, m_creature); } @@ -313,7 +313,7 @@ struct MANGOS_DLL_DECL npc_warden_mellicharAI : public ScriptedAI } } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { if (m_pInstance) { diff --git a/scripts/outland/tempest_keep/arcatraz/boss_dalliah.cpp b/scripts/outland/tempest_keep/arcatraz/boss_dalliah.cpp index d58f815b5..b76fd4003 100644 --- a/scripts/outland/tempest_keep/arcatraz/boss_dalliah.cpp +++ b/scripts/outland/tempest_keep/arcatraz/boss_dalliah.cpp @@ -83,7 +83,7 @@ struct MANGOS_DLL_DECL boss_dalliahAI : public ScriptedAI m_pInstance->SetData(TYPE_DALLIAH, IN_PROGRESS); } - void KilledUnit(Unit* pVictim) override + void KilledUnit(Unit* /*pVictim*/) override { DoScriptText(urand(0, 1) ? SAY_KILL_1 : SAY_KILL_2, m_creature); } diff --git a/scripts/outland/tempest_keep/arcatraz/boss_harbinger_skyriss.cpp b/scripts/outland/tempest_keep/arcatraz/boss_harbinger_skyriss.cpp index 3a2cdda04..b16b420f4 100644 --- a/scripts/outland/tempest_keep/arcatraz/boss_harbinger_skyriss.cpp +++ b/scripts/outland/tempest_keep/arcatraz/boss_harbinger_skyriss.cpp @@ -72,7 +72,7 @@ struct MANGOS_DLL_DECL boss_harbinger_skyrissAI : public ScriptedAI m_uiManaBurnTimer = 25000; } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoScriptText(SAY_DEATH, m_creature); diff --git a/scripts/outland/tempest_keep/arcatraz/boss_soccothrates.cpp b/scripts/outland/tempest_keep/arcatraz/boss_soccothrates.cpp index b618d7c30..4a25ae84a 100644 --- a/scripts/outland/tempest_keep/arcatraz/boss_soccothrates.cpp +++ b/scripts/outland/tempest_keep/arcatraz/boss_soccothrates.cpp @@ -114,7 +114,7 @@ struct MANGOS_DLL_DECL boss_soccothratesAI : public ScriptedAI, private Dialogue ScriptedAI::MoveInLineOfSight(pWho); } - void KilledUnit(Unit* pVictim) override + void KilledUnit(Unit* /*pVictim*/) override { DoScriptText(SAY_KILL, m_creature); } diff --git a/scripts/outland/tempest_keep/arcatraz/instance_arcatraz.cpp b/scripts/outland/tempest_keep/arcatraz/instance_arcatraz.cpp index 0aceee3e8..deb712b72 100644 --- a/scripts/outland/tempest_keep/arcatraz/instance_arcatraz.cpp +++ b/scripts/outland/tempest_keep/arcatraz/instance_arcatraz.cpp @@ -87,8 +87,8 @@ static const DialogueEntry aArcatrazDialogue[] = }; instance_arcatraz::instance_arcatraz(Map* pMap) : ScriptedInstance(pMap), DialogueHelper(aArcatrazDialogue), - m_uiEntranceEventTimer(0), m_uiResetDelayTimer(0), + m_uiEntranceEventTimer(0), m_uiKilledWardens(0) { Initialize(); diff --git a/scripts/outland/tempest_keep/botanica/boss_high_botanist_freywinn.cpp b/scripts/outland/tempest_keep/botanica/boss_high_botanist_freywinn.cpp index 72f4c04b1..99cac2ba2 100644 --- a/scripts/outland/tempest_keep/botanica/boss_high_botanist_freywinn.cpp +++ b/scripts/outland/tempest_keep/botanica/boss_high_botanist_freywinn.cpp @@ -113,12 +113,12 @@ struct MANGOS_DLL_DECL boss_high_botanist_freywinnAI : public ScriptedAI } } - void KilledUnit(Unit* pVictim) override + void KilledUnit(Unit* /*pVictim*/) override { DoScriptText(urand(0, 1) ? SAY_KILL_1 : SAY_KILL_2, m_creature); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoScriptText(SAY_DEATH, m_creature); } diff --git a/scripts/outland/tempest_keep/botanica/boss_warp_splinter.cpp b/scripts/outland/tempest_keep/botanica/boss_warp_splinter.cpp index 2208cb5a7..653b8fbf6 100644 --- a/scripts/outland/tempest_keep/botanica/boss_warp_splinter.cpp +++ b/scripts/outland/tempest_keep/botanica/boss_warp_splinter.cpp @@ -79,12 +79,12 @@ struct MANGOS_DLL_DECL boss_warp_splinterAI : public ScriptedAI DoScriptText(SAY_AGGRO, m_creature); } - void KilledUnit(Unit* pVictim) override + void KilledUnit(Unit* /*pVictim*/) override { DoScriptText(urand(0, 1) ? SAY_SLAY_1 : SAY_SLAY_2, m_creature); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoScriptText(SAY_DEATH, m_creature); } diff --git a/scripts/outland/tempest_keep/the_eye/boss_alar.cpp b/scripts/outland/tempest_keep/the_eye/boss_alar.cpp index cae5add08..568b8e512 100644 --- a/scripts/outland/tempest_keep/the_eye/boss_alar.cpp +++ b/scripts/outland/tempest_keep/the_eye/boss_alar.cpp @@ -135,7 +135,7 @@ struct MANGOS_DLL_DECL boss_alarAI : public ScriptedAI m_pInstance->SetData(TYPE_ALAR, FAIL); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { if (m_pInstance) m_pInstance->SetData(TYPE_ALAR, DONE); diff --git a/scripts/outland/tempest_keep/the_eye/boss_astromancer.cpp b/scripts/outland/tempest_keep/the_eye/boss_astromancer.cpp index 43e608e8a..fcbdf1b73 100644 --- a/scripts/outland/tempest_keep/the_eye/boss_astromancer.cpp +++ b/scripts/outland/tempest_keep/the_eye/boss_astromancer.cpp @@ -141,7 +141,7 @@ struct MANGOS_DLL_DECL boss_high_astromancer_solarianAI : public ScriptedAI } } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoScriptText(SAY_DEATH, m_creature); diff --git a/scripts/outland/tempest_keep/the_eye/boss_kaelthas.cpp b/scripts/outland/tempest_keep/the_eye/boss_kaelthas.cpp index cae4e4510..54adeb726 100644 --- a/scripts/outland/tempest_keep/the_eye/boss_kaelthas.cpp +++ b/scripts/outland/tempest_keep/the_eye/boss_kaelthas.cpp @@ -275,7 +275,7 @@ struct MANGOS_DLL_DECL boss_kaelthasAI : public ScriptedAI } } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoScriptText(SAY_DEATH, m_creature); @@ -837,7 +837,7 @@ struct MANGOS_DLL_DECL boss_thaladred_the_darkenerAI : public advisor_base_ai m_creature->TauntApply(pWho); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoScriptText(SAY_THALADRED_DEATH, m_creature); } @@ -914,7 +914,7 @@ struct MANGOS_DLL_DECL boss_lord_sanguinarAI : public advisor_base_ai DoScriptText(SAY_SANGUINAR_AGGRO, m_creature); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoScriptText(SAY_SANGUINAR_DEATH, m_creature); } @@ -978,7 +978,7 @@ struct MANGOS_DLL_DECL boss_grand_astromancer_capernianAI : public advisor_base_ DoScriptText(SAY_CAPERNIAN_AGGRO, m_creature); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoScriptText(SAY_CAPERNIAN_DEATH, m_creature); } @@ -1053,7 +1053,7 @@ struct MANGOS_DLL_DECL boss_master_engineer_telonicusAI : public advisor_base_ai DoScriptText(SAY_TELONICUS_AGGRO, m_creature); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoScriptText(SAY_TELONICUS_DEATH, m_creature); } diff --git a/scripts/outland/tempest_keep/the_eye/boss_void_reaver.cpp b/scripts/outland/tempest_keep/the_eye/boss_void_reaver.cpp index 9d73f16c4..e50cbfc25 100644 --- a/scripts/outland/tempest_keep/the_eye/boss_void_reaver.cpp +++ b/scripts/outland/tempest_keep/the_eye/boss_void_reaver.cpp @@ -78,7 +78,7 @@ struct MANGOS_DLL_DECL boss_void_reaverAI : public ScriptedAI } } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoScriptText(SAY_DEATH, m_creature); @@ -129,9 +129,8 @@ struct MANGOS_DLL_DECL boss_void_reaverAI : public ScriptedAI // Search only for players which are not within 18 yards of the boss std::vector suitableTargets; ThreatList const& threatList = m_creature->getThreatManager().getThreatList(); - ThreatList::const_iterator itr = threatList.begin(); - for (itr; itr != threatList.end(); ++itr) + for (ThreatList::const_iterator itr = threatList.begin(); itr != threatList.end(); ++itr) { if (Unit* pTarget = m_creature->GetMap()->GetUnit((*itr)->getUnitGuid())) { diff --git a/scripts/outland/tempest_keep/the_mechanar/boss_nethermancer_sepethrea.cpp b/scripts/outland/tempest_keep/the_mechanar/boss_nethermancer_sepethrea.cpp index 9ee815b53..1c18dd7ef 100644 --- a/scripts/outland/tempest_keep/the_mechanar/boss_nethermancer_sepethrea.cpp +++ b/scripts/outland/tempest_keep/the_mechanar/boss_nethermancer_sepethrea.cpp @@ -72,12 +72,12 @@ struct MANGOS_DLL_DECL boss_nethermancer_sepethreaAI : public ScriptedAI DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_SUMMON_RAGING_FLAMES : SPELL_SUMMON_RAGING_FLAMES_H); } - void KilledUnit(Unit* pVictim) override + void KilledUnit(Unit* /*pVictim*/) override { DoScriptText(urand(0, 1) ? SAY_SLAY1 : SAY_SLAY2, m_creature); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoScriptText(SAY_DEATH, m_creature); diff --git a/scripts/outland/tempest_keep/the_mechanar/boss_pathaleon_the_calculator.cpp b/scripts/outland/tempest_keep/the_mechanar/boss_pathaleon_the_calculator.cpp index 4bd53c80a..b42fad041 100644 --- a/scripts/outland/tempest_keep/the_mechanar/boss_pathaleon_the_calculator.cpp +++ b/scripts/outland/tempest_keep/the_mechanar/boss_pathaleon_the_calculator.cpp @@ -92,12 +92,12 @@ struct MANGOS_DLL_DECL boss_pathaleon_the_calculatorAI : public ScriptedAI DoScriptText(SAY_AGGRO, m_creature); } - void KilledUnit(Unit* pVictim) override + void KilledUnit(Unit* /*pVictim*/) override { DoScriptText(urand(0, 1) ? SAY_SLAY_1 : SAY_SLAY_2, m_creature); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoScriptText(SAY_DEATH, m_creature); diff --git a/scripts/world/mob_generic_creature.cpp b/scripts/world/mob_generic_creature.cpp index 20b92b680..8a01a3c15 100644 --- a/scripts/world/mob_generic_creature.cpp +++ b/scripts/world/mob_generic_creature.cpp @@ -57,6 +57,7 @@ struct MANGOS_DLL_DECL generic_creatureAI : public ScriptedAI // Buff timer (only buff when we are alive and not in combat if (!m_creature->isInCombat() && m_creature->isAlive()) + { if (BuffTimer < diff) { // Find a spell that targets friendly and applies an aura (these are generally buffs) @@ -76,6 +77,7 @@ struct MANGOS_DLL_DECL generic_creatureAI : public ScriptedAI else BuffTimer = 30000; } else BuffTimer -= diff; + } // Return since we have no target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index e6b67cbb1..78e0cc150 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2768" + #define SD2_REVISION_NR "2769" #endif // __SD2_REVISION_NR_H__ From 1ec6efa75c088831f39df6bb80d2f3099ebfae35 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Fri, 7 Dec 2012 20:34:33 +0100 Subject: [PATCH 0767/1172] [2770] Fix more warnings --- .../instance_trial_of_the_crusader.cpp | 7 ++++--- scripts/northrend/naxxramas/instance_naxxramas.cpp | 4 ++-- scripts/northrend/violet_hold/instance_violet_hold.cpp | 2 +- scripts/northrend/violet_hold/violet_hold.h | 2 +- .../magtheridons_lair/boss_magtheridon.cpp | 4 ++-- sd2_revision_nr.h | 2 +- 6 files changed, 11 insertions(+), 10 deletions(-) diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp index bda223071..e0139e601 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp @@ -242,7 +242,7 @@ void instance_trial_of_the_crusader::OnPlayerEnter(Player* pPlayer) if (IsHeroicDifficulty()) { pPlayer->SendUpdateWorldState(WORLD_STATE_WIPES, 1); - pPlayer->SendUpdateWorldState(WORLD_STATE_WIPES_COUNT, MAX_WIPES_ALLOWED - GetData(TYPE_WIPE_COUNT) >= 0 ? MAX_WIPES_ALLOWED - GetData(TYPE_WIPE_COUNT) : 0); + pPlayer->SendUpdateWorldState(WORLD_STATE_WIPES_COUNT, MAX_WIPES_ALLOWED >= GetData(TYPE_WIPE_COUNT) ? MAX_WIPES_ALLOWED - GetData(TYPE_WIPE_COUNT) : 0); } } @@ -251,9 +251,10 @@ void instance_trial_of_the_crusader::SetData(uint32 uiType, uint32 uiData) switch (uiType) { case TYPE_WIPE_COUNT: - if (IsHeroicDifficulty()) - DoUpdateWorldState(WORLD_STATE_WIPES_COUNT, MAX_WIPES_ALLOWED - m_auiEncounter[TYPE_WIPE_COUNT] >= 0 ? MAX_WIPES_ALLOWED - m_auiEncounter[TYPE_WIPE_COUNT] : 0); + // Update data before updating worldstate m_auiEncounter[uiType] = uiData; + if (IsHeroicDifficulty()) + DoUpdateWorldState(WORLD_STATE_WIPES_COUNT, MAX_WIPES_ALLOWED >= GetData(TYPE_WIPE_COUNT) ? MAX_WIPES_ALLOWED - GetData(TYPE_WIPE_COUNT) : 0); break; case TYPE_NORTHREND_BEASTS: if (uiData == SPECIAL) diff --git a/scripts/northrend/naxxramas/instance_naxxramas.cpp b/scripts/northrend/naxxramas/instance_naxxramas.cpp index 7c8252df4..f0afa1cb1 100644 --- a/scripts/northrend/naxxramas/instance_naxxramas.cpp +++ b/scripts/northrend/naxxramas/instance_naxxramas.cpp @@ -45,11 +45,11 @@ static const DialogueEntry aNaxxDialogue[] = }; instance_naxxramas::instance_naxxramas(Map* pMap) : ScriptedInstance(pMap), - m_uiTauntTimer(0), - m_uiHorseMenKilled(0), m_fChamberCenterX(0.0f), m_fChamberCenterY(0.0f), m_fChamberCenterZ(0.0f), + m_uiTauntTimer(0), + m_uiHorseMenKilled(0), m_dialogueHelper(aNaxxDialogue) { Initialize(); diff --git a/scripts/northrend/violet_hold/instance_violet_hold.cpp b/scripts/northrend/violet_hold/instance_violet_hold.cpp index d1a90e659..2eeb60e46 100644 --- a/scripts/northrend/violet_hold/instance_violet_hold.cpp +++ b/scripts/northrend/violet_hold/instance_violet_hold.cpp @@ -228,7 +228,7 @@ void instance_violet_hold::OnPlayerEnter(Player* pPlayer) void instance_violet_hold::SetData(uint32 uiType, uint32 uiData) { - debug_log("SD2: instance_violet_hold: SetData got type % u, data %u.", uiType, uiData); + debug_log("SD2: instance_violet_hold: SetData got type %u, data %u.", uiType, uiData); switch (uiType) { diff --git a/scripts/northrend/violet_hold/violet_hold.h b/scripts/northrend/violet_hold/violet_hold.h index bab659e06..5201a4e84 100644 --- a/scripts/northrend/violet_hold/violet_hold.h +++ b/scripts/northrend/violet_hold/violet_hold.h @@ -281,8 +281,8 @@ class MANGOS_DLL_DECL instance_violet_hold : public ScriptedInstance uint32 m_uiEventResetTimer; bool m_bIsVoidDance; - bool m_bIsDehydratation; bool m_bIsDefenseless; + bool m_bIsDehydratation; BossToCellMap m_mBossToCellMap; diff --git a/scripts/outland/hellfire_citadel/magtheridons_lair/boss_magtheridon.cpp b/scripts/outland/hellfire_citadel/magtheridons_lair/boss_magtheridon.cpp index d09ebefc6..9a9a0cbe5 100644 --- a/scripts/outland/hellfire_citadel/magtheridons_lair/boss_magtheridon.cpp +++ b/scripts/outland/hellfire_citadel/magtheridons_lair/boss_magtheridon.cpp @@ -388,9 +388,9 @@ struct MANGOS_DLL_DECL mob_hellfire_channelerAI : public ScriptedAI if (m_uiDarkMendingTimer < uiDiff) { - if (Unit* pTarget = DoSelectLowestHpFriendly(50.0f)) + if (Unit* pTarget = DoSelectLowestHpFriendly(30.0f)) { - if (DoCastSpellIfCan(m_creature, SPELL_DARK_MENDING) == CAST_OK) + if (DoCastSpellIfCan(pTarget, SPELL_DARK_MENDING) == CAST_OK) m_uiDarkMendingTimer = urand(10000, 20000); } } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 78e0cc150..ee2abbd39 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2769" + #define SD2_REVISION_NR "2770" #endif // __SD2_REVISION_NR_H__ From 3fe0b6a48d1b070e50d82d7b569ff88907032472 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Sat, 8 Dec 2012 02:40:54 +0100 Subject: [PATCH 0768/1172] [2771] Fix entrance door inside Violet Hold Thanks to jududdar and Katy for pointing --- scripts/northrend/violet_hold/instance_violet_hold.cpp | 4 +--- sd2_revision_nr.h | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/scripts/northrend/violet_hold/instance_violet_hold.cpp b/scripts/northrend/violet_hold/instance_violet_hold.cpp index 2eeb60e46..1b68898bf 100644 --- a/scripts/northrend/violet_hold/instance_violet_hold.cpp +++ b/scripts/northrend/violet_hold/instance_violet_hold.cpp @@ -64,9 +64,6 @@ void instance_violet_hold::ResetAll() SetIntroPortals(false); // ToDo: reset the activation crystals when implemented - // open instance door - DoUseDoorOrButton(GO_PRISON_SEAL_DOOR); - for (std::vector::const_iterator itr = m_vRandomBosses.begin(); itr != m_vRandomBosses.end(); ++itr) { const BossInformation* pData = GetBossInformation((*itr)->uiEntry); @@ -255,6 +252,7 @@ void instance_violet_hold::SetData(uint32 uiType, uint32 uiData) if (Creature* pController = GetSingleCreatureFromStorage(NPC_EVENT_CONTROLLER)) pController->AI()->EnterEvadeMode(); // Reset the event (creature cleanup is handled in creature_linking) + DoUseDoorOrButton(GO_PRISON_SEAL_DOOR); // open instance door ResetAll(); m_uiEventResetTimer = 20000; // Timer may not be correct - 20 sec is default reset timer for blizz break; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index ee2abbd39..f3fe94571 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2770" + #define SD2_REVISION_NR "2771" #endif // __SD2_REVISION_NR_H__ From 2064f3c244c2fcf8d5241ff2752c7516a2220ed1 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Tue, 11 Dec 2012 17:10:54 +0100 Subject: [PATCH 0769/1172] [2772] Remove a few empty lines --- base/guard_ai.cpp | 1 - include/sc_grid_searchers.cpp | 1 - include/sc_instance.cpp | 1 - .../blackrock_spire/boss_overlord_wyrmthalak.cpp | 1 - .../blackrock_spire/instance_blackrock_spire.cpp | 1 - .../eastern_kingdoms/stratholme/boss_dathrohan_balnazzar.cpp | 1 - .../eastern_kingdoms/stratholme/boss_order_of_silver_hand.cpp | 1 - scripts/eastern_kingdoms/sunwell_plateau/boss_muru.cpp | 1 - scripts/eastern_kingdoms/westfall.cpp | 1 - scripts/kalimdor/azshara.cpp | 1 - .../kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.cpp | 1 - scripts/kalimdor/desolace.cpp | 2 -- scripts/kalimdor/razorfen_kraul/instance_razorfen_kraul.cpp | 1 - scripts/kalimdor/razorfen_kraul/razorfen_kraul.cpp | 1 - scripts/kalimdor/winterspring.cpp | 1 - scripts/northrend/azjol-nerub/azjol-nerub/boss_anubarak.cpp | 1 - scripts/northrend/azjol-nerub/azjol-nerub/boss_krikthir.cpp | 2 -- .../trial_of_the_crusader/boss_northrend_beasts.cpp | 1 - scripts/northrend/draktharon_keep/boss_novos.cpp | 1 - scripts/northrend/gundrak/boss_galdarah.cpp | 1 - .../icecrown_citadel/icecrown_citadel/boss_festergut.cpp | 1 - .../icecrown_citadel/icecrown_citadel/boss_rotface.cpp | 2 -- .../icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp | 1 - .../icecrown_citadel/icecrown_citadel/boss_the_lich_king.cpp | 3 --- .../icecrown_citadel/instance_icecrown_citadel.cpp | 1 - scripts/northrend/nexus/eye_of_eternity/boss_malygos.cpp | 1 - scripts/northrend/ruby_sanctum/instance_ruby_sanctum.cpp | 1 - .../northrend/ulduar/halls_of_stone/boss_maiden_of_grief.cpp | 1 - scripts/outland/boss_doomlord_kazzak.cpp | 1 - scripts/outland/boss_doomwalker.cpp | 1 - scripts/world/go_scripts.cpp | 1 - scripts/world/mob_generic_creature.cpp | 1 - sd2_revision_nr.h | 2 +- 33 files changed, 1 insertion(+), 38 deletions(-) diff --git a/base/guard_ai.cpp b/base/guard_ai.cpp index cfeed491c..a3792eb81 100644 --- a/base/guard_ai.cpp +++ b/base/guard_ai.cpp @@ -171,7 +171,6 @@ void guardAI::UpdateAI(const uint32 uiDiff) // Set our global cooldown m_uiGlobalCooldown = GENERIC_CREATURE_COOLDOWN; - } // If no spells available and we arn't moving run to target else if (m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() != CHASE_MOTION_TYPE) { diff --git a/include/sc_grid_searchers.cpp b/include/sc_grid_searchers.cpp index 8d62d6bd5..0db077a5f 100644 --- a/include/sc_grid_searchers.cpp +++ b/include/sc_grid_searchers.cpp @@ -9,7 +9,6 @@ #include "GridNotifiers.h" #include "GridNotifiersImpl.h" - // return closest GO in grid, with range from pSource GameObject* GetClosestGameObjectWithEntry(WorldObject* pSource, uint32 uiEntry, float fMaxSearchRange) { diff --git a/include/sc_instance.cpp b/include/sc_instance.cpp index 481c358d2..fc5e4dfcc 100644 --- a/include/sc_instance.cpp +++ b/include/sc_instance.cpp @@ -99,7 +99,6 @@ void ScriptedInstance::DoToggleGameObjectFlags(ObjectGuid guid, uint32 uiGOflags } } - /// Function that respawns a despawned GO that is stored in m_mGoEntryGuidStore void ScriptedInstance::DoRespawnGameObject(uint32 uiEntry, uint32 uiTimeToDespawn) { diff --git a/scripts/eastern_kingdoms/blackrock_spire/boss_overlord_wyrmthalak.cpp b/scripts/eastern_kingdoms/blackrock_spire/boss_overlord_wyrmthalak.cpp index cbb8fdec7..f25a83f08 100644 --- a/scripts/eastern_kingdoms/blackrock_spire/boss_overlord_wyrmthalak.cpp +++ b/scripts/eastern_kingdoms/blackrock_spire/boss_overlord_wyrmthalak.cpp @@ -32,7 +32,6 @@ enum NPC_SPIRESTONE_WARLORD = 9216, NPC_SMOLDERTHORN_BERSERKER = 9268 - }; const float afLocations[2][4] = diff --git a/scripts/eastern_kingdoms/blackrock_spire/instance_blackrock_spire.cpp b/scripts/eastern_kingdoms/blackrock_spire/instance_blackrock_spire.cpp index f3c0772ca..47121e774 100644 --- a/scripts/eastern_kingdoms/blackrock_spire/instance_blackrock_spire.cpp +++ b/scripts/eastern_kingdoms/blackrock_spire/instance_blackrock_spire.cpp @@ -476,7 +476,6 @@ void instance_blackrock_spire::JustDidDialogueStep(int32 iEntry) pNefarius->GetMotionMaster()->MovePoint(0, aStadiumLocs[6].m_fX, aStadiumLocs[6].m_fY, aStadiumLocs[6].m_fZ); } break; - } } diff --git a/scripts/eastern_kingdoms/stratholme/boss_dathrohan_balnazzar.cpp b/scripts/eastern_kingdoms/stratholme/boss_dathrohan_balnazzar.cpp index 862391157..1c306025a 100644 --- a/scripts/eastern_kingdoms/stratholme/boss_dathrohan_balnazzar.cpp +++ b/scripts/eastern_kingdoms/stratholme/boss_dathrohan_balnazzar.cpp @@ -101,7 +101,6 @@ struct MANGOS_DLL_DECL boss_dathrohan_balnazzarAI : public ScriptedAI if (m_creature->GetEntry() == NPC_BALNAZZAR) m_creature->UpdateEntry(NPC_DATHROHAN); - } void Aggro(Unit* pWho) override diff --git a/scripts/eastern_kingdoms/stratholme/boss_order_of_silver_hand.cpp b/scripts/eastern_kingdoms/stratholme/boss_order_of_silver_hand.cpp index 4053d717f..89158fc0a 100644 --- a/scripts/eastern_kingdoms/stratholme/boss_order_of_silver_hand.cpp +++ b/scripts/eastern_kingdoms/stratholme/boss_order_of_silver_hand.cpp @@ -163,7 +163,6 @@ struct MANGOS_DLL_DECL boss_silver_hand_bossesAI : public ScriptedAI DoMeleeAttackIfReady(); } - }; CreatureAI* GetAI_boss_silver_hand_bossesAI(Creature* pCreature) diff --git a/scripts/eastern_kingdoms/sunwell_plateau/boss_muru.cpp b/scripts/eastern_kingdoms/sunwell_plateau/boss_muru.cpp index d2f27bdb6..256345ca5 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/boss_muru.cpp +++ b/scripts/eastern_kingdoms/sunwell_plateau/boss_muru.cpp @@ -209,7 +209,6 @@ struct MANGOS_DLL_DECL boss_muruAI : public Scripted_NoMovementAI } }; - struct MANGOS_DLL_DECL boss_entropiusAI : public ScriptedAI { boss_entropiusAI(Creature* pCreature) : ScriptedAI(pCreature) diff --git a/scripts/eastern_kingdoms/westfall.cpp b/scripts/eastern_kingdoms/westfall.cpp index 8c9fe61d6..188a2e523 100644 --- a/scripts/eastern_kingdoms/westfall.cpp +++ b/scripts/eastern_kingdoms/westfall.cpp @@ -155,7 +155,6 @@ struct MANGOS_DLL_DECL npc_daphne_stilwellAI : public npc_escortAI if (!m_creature->CanReachWithMeleeAttack(m_creature->getVictim())) DoCastSpellIfCan(m_creature->getVictim(), SPELL_SHOOT); - } else m_uiShootTimer -= uiDiff; diff --git a/scripts/kalimdor/azshara.cpp b/scripts/kalimdor/azshara.cpp index 699dd187f..a507fd7cf 100644 --- a/scripts/kalimdor/azshara.cpp +++ b/scripts/kalimdor/azshara.cpp @@ -250,7 +250,6 @@ enum SPELL_POLYMORPH_BACKFIRE = 28406, // summons npc 16479 QUEST_FRAGMENTED_MAGIC = 9364, - // npc spells SPELL_DISARM = 6713, // warrior SPELL_SCREECH = 3589, // screamer diff --git a/scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.cpp b/scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.cpp index f9ec418f1..7bfe87e11 100644 --- a/scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.cpp +++ b/scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.cpp @@ -31,7 +31,6 @@ EndContentData */ #include "old_hillsbrad.h" #include "escort_ai.h" - /*###### ## npc_erozion ######*/ diff --git a/scripts/kalimdor/desolace.cpp b/scripts/kalimdor/desolace.cpp index 68bdde2da..16ee8363e 100644 --- a/scripts/kalimdor/desolace.cpp +++ b/scripts/kalimdor/desolace.cpp @@ -52,7 +52,6 @@ enum SPELL_KODO_KOMBO_PLAYER_BUFF = 18172, // spells here have unclear function, but using them at least for visual parts and checks SPELL_KODO_KOMBO_DESPAWN_BUFF = 18377, SPELL_KODO_KOMBO_GOSSIP = 18362 - }; struct MANGOS_DLL_DECL npc_aged_dying_ancient_kodoAI : public ScriptedAI @@ -336,7 +335,6 @@ struct MANGOS_DLL_DECL npc_melizza_brimbuzzleAI : public npc_escortAI, private D StartNextDialogueText(POINT_ID_EVENT_COMPLETE); break; } - } void JustDidDialogueStep(int32 iEntry) override diff --git a/scripts/kalimdor/razorfen_kraul/instance_razorfen_kraul.cpp b/scripts/kalimdor/razorfen_kraul/instance_razorfen_kraul.cpp index e5d8c45e6..6db4d3cd1 100644 --- a/scripts/kalimdor/razorfen_kraul/instance_razorfen_kraul.cpp +++ b/scripts/kalimdor/razorfen_kraul/instance_razorfen_kraul.cpp @@ -45,7 +45,6 @@ void instance_razorfen_kraul::OnObjectCreate(GameObject* pGo) pGo->SetGoState(GO_STATE_ACTIVE); break; } - } void instance_razorfen_kraul::OnCreatureCreate(Creature* pCreature) diff --git a/scripts/kalimdor/razorfen_kraul/razorfen_kraul.cpp b/scripts/kalimdor/razorfen_kraul/razorfen_kraul.cpp index 3786780d1..871363e66 100644 --- a/scripts/kalimdor/razorfen_kraul/razorfen_kraul.cpp +++ b/scripts/kalimdor/razorfen_kraul/razorfen_kraul.cpp @@ -121,7 +121,6 @@ struct MANGOS_DLL_DECL npc_willix_the_importerAI : public npc_escortAI SetEscortPaused(true); break; } - } }; diff --git a/scripts/kalimdor/winterspring.cpp b/scripts/kalimdor/winterspring.cpp index 338065e36..319992ebf 100644 --- a/scripts/kalimdor/winterspring.cpp +++ b/scripts/kalimdor/winterspring.cpp @@ -393,7 +393,6 @@ struct MANGOS_DLL_DECL npc_ranshallaAI : public npc_escortAI, private DialogueHe default: return NULL; } - } void UpdateEscortAI(const uint32 uiDiff) override diff --git a/scripts/northrend/azjol-nerub/azjol-nerub/boss_anubarak.cpp b/scripts/northrend/azjol-nerub/azjol-nerub/boss_anubarak.cpp index 2261a3b1f..8b0d34036 100644 --- a/scripts/northrend/azjol-nerub/azjol-nerub/boss_anubarak.cpp +++ b/scripts/northrend/azjol-nerub/azjol-nerub/boss_anubarak.cpp @@ -66,7 +66,6 @@ enum }; - /*###### ## boss_anubarak ######*/ diff --git a/scripts/northrend/azjol-nerub/azjol-nerub/boss_krikthir.cpp b/scripts/northrend/azjol-nerub/azjol-nerub/boss_krikthir.cpp index 557bdebe8..ca1c8436f 100644 --- a/scripts/northrend/azjol-nerub/azjol-nerub/boss_krikthir.cpp +++ b/scripts/northrend/azjol-nerub/azjol-nerub/boss_krikthir.cpp @@ -142,7 +142,6 @@ struct MANGOS_DLL_DECL boss_krikthirAI : public ScriptedAI { DoCastSpellIfCan(m_creature->getVictim(), m_bIsRegularMode ? SPELL_CURSE_OF_FATIGUE : SPELL_CURSE_OF_FATIGUE_H); m_uiCurseTimer = 20000; - } else m_uiCurseTimer -= uiDiff; @@ -160,7 +159,6 @@ struct MANGOS_DLL_DECL boss_krikthirAI : public ScriptedAI DoScriptText(urand(0, 1) ? SAY_SWARM_1 : SAY_SWARM_2, m_creature); DoCastSpellIfCan(m_creature, SPELL_SWARM); m_uiSwarmTimer = 15000; - } else m_uiSwarmTimer -= uiDiff; diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp index ef6563b67..b588c5632 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp @@ -410,5 +410,4 @@ void AddSC_northrend_beasts() pNewScript->Name = "boss_icehowl"; pNewScript->GetAI = &GetAI_boss_icehowl; pNewScript->RegisterSelf(); - } diff --git a/scripts/northrend/draktharon_keep/boss_novos.cpp b/scripts/northrend/draktharon_keep/boss_novos.cpp index 1cccf51c0..c2fd6d9ff 100644 --- a/scripts/northrend/draktharon_keep/boss_novos.cpp +++ b/scripts/northrend/draktharon_keep/boss_novos.cpp @@ -371,7 +371,6 @@ CreatureAI* GetAI_npc_crystal_channel_target(Creature* pCreature) return new npc_crystal_channel_targetAI(pCreature); } - // Handling of the dummy auras of Crystal Handler Death spells, on remove the Crystal needs to be opened bool EffectAuraDummy_npc_crystal_channel_target(const Aura* pAura, bool bApply) { diff --git a/scripts/northrend/gundrak/boss_galdarah.cpp b/scripts/northrend/gundrak/boss_galdarah.cpp index 8b49206cb..8d0992093 100644 --- a/scripts/northrend/gundrak/boss_galdarah.cpp +++ b/scripts/northrend/gundrak/boss_galdarah.cpp @@ -214,7 +214,6 @@ struct MANGOS_DLL_DECL boss_galdarahAI : public ScriptedAI } else m_uiSpecialAbilityTimer -= uiDiff; - } else { diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_festergut.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_festergut.cpp index 4b5a95aee..f87b4d9a1 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_festergut.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_festergut.cpp @@ -24,7 +24,6 @@ EndScriptData */ #include "precompiled.h" #include "icecrown_citadel.h" - enum { SPELL_BERSERK = 47008, diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_rotface.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_rotface.cpp index ff8d655d1..fd8d66c36 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_rotface.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_rotface.cpp @@ -192,7 +192,6 @@ CreatureAI* GetAI_boss_rotface(Creature* pCreature) return new boss_rotfaceAI(pCreature); } - struct MANGOS_DLL_DECL mob_little_oozeAI : public ScriptedAI { mob_little_oozeAI(Creature* pCreature) : ScriptedAI(pCreature) @@ -243,7 +242,6 @@ CreatureAI* GetAI_mob_little_ooze(Creature* pCreature) return new mob_little_oozeAI(pCreature); } - struct MANGOS_DLL_DECL mob_big_oozeAI : public ScriptedAI { mob_big_oozeAI(Creature* pCreature) : ScriptedAI(pCreature) diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp index 6882b5548..3398c3013 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp @@ -461,7 +461,6 @@ CreatureAI* GetAI_boss_sindragosa(Creature* pCreature) return new boss_sindragosaAI(pCreature); } - struct MANGOS_DLL_DECL npc_rimefang_iccAI : public ScriptedAI { npc_rimefang_iccAI(Creature* pCreature) : ScriptedAI(pCreature) diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_the_lich_king.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_the_lich_king.cpp index 6593a66fc..32bcacd15 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_the_lich_king.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_the_lich_king.cpp @@ -63,7 +63,6 @@ enum SAY_OUTRO_14 = -1631192, }; - enum { SPELL_BERSERK = 47008, @@ -193,7 +192,6 @@ enum NPC_SPIRIT_BOMB = 39189, }; - enum Phase { PHASE_INTRO = 0, // intro @@ -711,7 +709,6 @@ CreatureAI* GetAI_boss_the_lich_king_icc(Creature* pCreature) return new boss_the_lich_king_iccAI(pCreature); } - void AddSC_boss_the_lich_king() { Script* pNewScript; diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_citadel.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_citadel.cpp index ea7fd7651..efcd76dfc 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_citadel.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_citadel.cpp @@ -492,7 +492,6 @@ bool AreaTrigger_at_icecrown_citadel(Player* pPlayer, AreaTriggerEntry const* pA return false; } - bool ProcessEventId_event_gameobject_citadel_valve(uint32 uiEventId, Object* pSource, Object* pTarget, bool bIsStart) { if (bIsStart && pSource->GetTypeId() == TYPEID_PLAYER) diff --git a/scripts/northrend/nexus/eye_of_eternity/boss_malygos.cpp b/scripts/northrend/nexus/eye_of_eternity/boss_malygos.cpp index 573039fe1..87dd298d5 100644 --- a/scripts/northrend/nexus/eye_of_eternity/boss_malygos.cpp +++ b/scripts/northrend/nexus/eye_of_eternity/boss_malygos.cpp @@ -550,7 +550,6 @@ struct MANGOS_DLL_DECL boss_malygosAI : public ScriptedAI, private DialogueHelpe case PHASE_TRANSITION_2: // Nothing here - wait for transition to finish break; - } } }; diff --git a/scripts/northrend/ruby_sanctum/instance_ruby_sanctum.cpp b/scripts/northrend/ruby_sanctum/instance_ruby_sanctum.cpp index 20fcea265..90bdf4bb6 100644 --- a/scripts/northrend/ruby_sanctum/instance_ruby_sanctum.cpp +++ b/scripts/northrend/ruby_sanctum/instance_ruby_sanctum.cpp @@ -24,7 +24,6 @@ EndScriptData */ #include "precompiled.h" #include "ruby_sanctum.h" - instance_ruby_sanctum::instance_ruby_sanctum(Map* pMap) : ScriptedInstance(pMap), m_uiHalionSummonTimer(0), m_uiHalionSummonStage(0) diff --git a/scripts/northrend/ulduar/halls_of_stone/boss_maiden_of_grief.cpp b/scripts/northrend/ulduar/halls_of_stone/boss_maiden_of_grief.cpp index 14e19dc6b..01fdafa66 100644 --- a/scripts/northrend/ulduar/halls_of_stone/boss_maiden_of_grief.cpp +++ b/scripts/northrend/ulduar/halls_of_stone/boss_maiden_of_grief.cpp @@ -124,7 +124,6 @@ struct MANGOS_DLL_DECL boss_maiden_of_griefAI : public ScriptedAI else m_uiPartingSorrowTimer -= uiDiff; - if (m_uiStormTimer < uiDiff) { if (DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_STORM_OF_GRIEF : SPELL_STORM_OF_GRIEF_H) == CAST_OK) diff --git a/scripts/outland/boss_doomlord_kazzak.cpp b/scripts/outland/boss_doomlord_kazzak.cpp index b59cd760c..0064eaecf 100644 --- a/scripts/outland/boss_doomlord_kazzak.cpp +++ b/scripts/outland/boss_doomlord_kazzak.cpp @@ -199,7 +199,6 @@ struct MANGOS_DLL_DECL boss_doomlordkazzakAI : public ScriptedAI DoMeleeAttackIfReady(); } - }; CreatureAI* GetAI_boss_doomlordkazzak(Creature* pCreature) diff --git a/scripts/outland/boss_doomwalker.cpp b/scripts/outland/boss_doomwalker.cpp index 26b7c4d91..487b728d3 100644 --- a/scripts/outland/boss_doomwalker.cpp +++ b/scripts/outland/boss_doomwalker.cpp @@ -81,7 +81,6 @@ struct MANGOS_DLL_DECL boss_doomwalkerAI : public ScriptedAI case 1: DoScriptText(SAY_SLAY_2, m_creature); break; case 2: DoScriptText(SAY_SLAY_3, m_creature); break; } - } void JustDied(Unit* /*pKiller*/) override diff --git a/scripts/world/go_scripts.cpp b/scripts/world/go_scripts.cpp index 46d7de513..338e8a98c 100644 --- a/scripts/world/go_scripts.cpp +++ b/scripts/world/go_scripts.cpp @@ -300,7 +300,6 @@ enum { SPELL_GYMER_LOCK_EXPLOSION = 55529, NPC_GYMER_LOCK_DUMMY = 29928 - }; bool GOUse_go_scourge_enclosure(Player* pPlayer, GameObject* pGo) diff --git a/scripts/world/mob_generic_creature.cpp b/scripts/world/mob_generic_creature.cpp index 8a01a3c15..955ebc236 100644 --- a/scripts/world/mob_generic_creature.cpp +++ b/scripts/world/mob_generic_creature.cpp @@ -147,7 +147,6 @@ struct MANGOS_DLL_DECL generic_creatureAI : public ScriptedAI // Set our global cooldown GlobalCooldown = GENERIC_CREATURE_COOLDOWN; - }// If no spells available and we arn't moving run to target else if (IsSelfRooted) { diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index f3fe94571..381d38c10 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2771" + #define SD2_REVISION_NR "2772" #endif // __SD2_REVISION_NR_H__ From 7d5cff4bee9208afbe6aa1e23896ca8bce11b675 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Thu, 13 Dec 2012 23:42:42 +0100 Subject: [PATCH 0770/1172] [2773] Support hard-mode loot in Zul'Aman - Also fix compile * Fix compile with C-MaNGOS 13005, Requires 12308 * Add support for hard-mode checks in Zul'Aman, timed event - Each chest can now be checked with 1..4 if it's associated npc was resued first..forth (or 0 for none at all) --- .../zulaman/instance_zulaman.cpp | 45 +++++++++++++++++++ scripts/eastern_kingdoms/zulaman/zulaman.h | 3 +- .../ulduar/ulduar/instance_ulduar.cpp | 8 ++-- scripts/northrend/ulduar/ulduar/ulduar.h | 2 +- sd2_revision_nr.h | 2 +- sql/scriptdev2_script_full.sql | 2 +- sql/updates/r2773_scriptdev2.sql | 1 + 7 files changed, 55 insertions(+), 8 deletions(-) create mode 100644 sql/updates/r2773_scriptdev2.sql diff --git a/scripts/eastern_kingdoms/zulaman/instance_zulaman.cpp b/scripts/eastern_kingdoms/zulaman/instance_zulaman.cpp index 2a5dbc95e..5c4873138 100644 --- a/scripts/eastern_kingdoms/zulaman/instance_zulaman.cpp +++ b/scripts/eastern_kingdoms/zulaman/instance_zulaman.cpp @@ -393,6 +393,51 @@ void instance_zulaman::SendNextBearWave(Unit* pTarget) m_bIsBearPhaseInProgress = true; } +bool instance_zulaman::CheckConditionCriteriaMeet(Player const* pPlayer, uint32 uiInstanceConditionId, WorldObject const* pConditionSource, ConditionSource conditionSourceType) +{ + switch (uiInstanceConditionId) + { + case INSTANCE_CONDITION_ID_NORMAL_MODE: // Not rescued + case INSTANCE_CONDITION_ID_HARD_MODE: // Rescued as first + case INSTANCE_CONDITION_ID_HARD_MODE_2: // Rescued as first + case INSTANCE_CONDITION_ID_HARD_MODE_3: // Rescued as second + case INSTANCE_CONDITION_ID_HARD_MODE_4: // Rescued as third + { + if (!pConditionSource) + break; + + int32 index = -1; + switch (pConditionSource->GetEntry()) + { + case NPC_TANZAR: + case GO_TANZARS_TRUNK: + index = INDEX_NALORAKK; + break; + case NPC_KRAZ: + case GO_KRAZS_PACKAGE: + index = INDEX_JANALAI; + break; + case NPC_ASHLI: + case GO_ASHLIS_BAG: + index = INDEX_HALAZZI; + break; + case NPC_HARKOR: + case GO_HARKORS_SATCHEL: + index = INDEX_AKILZON; + break; + } + if (index < 0) + break; + + return m_aEventNpcInfo[index].uiSavePosition == uiInstanceConditionId; + } + } + + script_error_log("instance_zulaman::CheckConditionCriteriaMeet called with unsupported Id %u. Called with param plr %s, src %s, condition source type %u", + uiInstanceConditionId, pPlayer ? pPlayer->GetGuidStr().c_str() : "NULL", pConditionSource ? pConditionSource->GetGuidStr().c_str() : "NULL", conditionSourceType); + return false; +} + uint8 instance_zulaman::GetKilledPreBosses() { return (m_auiEncounter[TYPE_AKILZON] == DONE ? 1 : 0) + (m_auiEncounter[TYPE_NALORAKK] == DONE ? 1 : 0) + (m_auiEncounter[TYPE_JANALAI] == DONE ? 1 : 0) + (m_auiEncounter[TYPE_HALAZZI] == DONE ? 1 : 0); diff --git a/scripts/eastern_kingdoms/zulaman/zulaman.h b/scripts/eastern_kingdoms/zulaman/zulaman.h index e86e0cd90..b84b92a72 100644 --- a/scripts/eastern_kingdoms/zulaman/zulaman.h +++ b/scripts/eastern_kingdoms/zulaman/zulaman.h @@ -96,7 +96,6 @@ enum InstanceZA GO_WOODEN_DOOR = 186306, GO_FIRE_DOOR = 186859, - // unused, expected to be possible to handle within Database! GO_TANZARS_TRUNK = 186648, GO_KRAZS_PACKAGE = 186667, GO_ASHLIS_BAG = 186672, @@ -171,6 +170,8 @@ class MANGOS_DLL_DECL instance_zulaman : public ScriptedInstance void SetBearEventProgress(bool bIsInProgress) { m_bIsBearPhaseInProgress = bIsInProgress; } void SendNextBearWave(Unit* pTarget); + bool CheckConditionCriteriaMeet(Player const* pPlayer, uint32 uiInstanceConditionId, WorldObject const* pConditionSource, ConditionSource conditionSourceType) override; + void Update(uint32 uiDiff) override; private: diff --git a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp index 211d4044c..8e400fbb9 100644 --- a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp +++ b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp @@ -454,16 +454,16 @@ void instance_ulduar::SetData(uint32 uiType, uint32 uiData) } // TODO: implement all hard mode loot here! -bool instance_ulduar::CheckConditionCriteriaMeet(Player const* pSource, uint32 uiMapId, uint32 uiInstanceConditionId) +bool instance_ulduar::CheckConditionCriteriaMeet(Player const* pPlayer, uint32 uiInstanceConditionId, WorldObject const* pConditionSource, ConditionSource conditionSourceType) { - if (uiMapId != instance->GetId()) - return false; - switch (uiInstanceConditionId) { case TYPE_XT002_HARD: break; } + + script_error_log("instance_ulduar::CheckConditionCriteriaMeet called with unsupported Id %u. Called with param plr %s, src %s, condition source type %u", + uiInstanceConditionId, pPlayer ? pPlayer->GetGuidStr().c_str() : "NULL", pConditionSource ? pConditionSource->GetGuidStr().c_str() : "NULL", conditionSourceType); return false; } diff --git a/scripts/northrend/ulduar/ulduar/ulduar.h b/scripts/northrend/ulduar/ulduar/ulduar.h index 62cb27fd2..9471e1d07 100644 --- a/scripts/northrend/ulduar/ulduar/ulduar.h +++ b/scripts/northrend/ulduar/ulduar/ulduar.h @@ -242,7 +242,7 @@ class MANGOS_DLL_DECL instance_ulduar : public ScriptedInstance void SetSpecialAchievementCriteria(uint32 uiType, bool bIsMet); bool CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/) override; // Dummy, leave till correct solution for hardmode found - bool CheckConditionCriteriaMeet(Player const* pSource, uint32 uiMapId, uint32 uiInstanceConditionId) override; + bool CheckConditionCriteriaMeet(Player const* pPlayer, uint32 uiInstanceConditionId, WorldObject const* pConditionSource, ConditionSource conditionSourceType) override; void DoOpenMadnessDoorIfCan(); diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 381d38c10..ded5ae688 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2772" + #define SD2_REVISION_NR "2773" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 95b572ab1..15297d1da 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -3,7 +3,7 @@ -- DELETE FROM sd2_db_version; -INSERT INTO sd2_db_version (version) VALUES ('ScriptDev2 (for C-MaNGOS 12292+) '); +INSERT INTO sd2_db_version (version) VALUES ('ScriptDev2 (for C-MaNGOS 12308+) '); -- -- Below contains data for table `script_texts` mainly used in C++ parts. diff --git a/sql/updates/r2773_scriptdev2.sql b/sql/updates/r2773_scriptdev2.sql new file mode 100644 index 000000000..f695a183d --- /dev/null +++ b/sql/updates/r2773_scriptdev2.sql @@ -0,0 +1 @@ +UPDATE sd2_db_version SET version='ScriptDev2 (for C-MaNGOS 123 123 12308+) '; From a55180dde0409e200f72784c1735c6d2eb35f045 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Fri, 14 Dec 2012 00:19:49 +0100 Subject: [PATCH 0771/1172] [2774] Support Sartharion hard-mode loot --- .../instance_obsidian_sanctum.cpp | 15 +++++++++++++++ .../northrend/obsidian_sanctum/obsidian_sanctum.h | 1 + sd2_revision_nr.h | 2 +- 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/scripts/northrend/obsidian_sanctum/instance_obsidian_sanctum.cpp b/scripts/northrend/obsidian_sanctum/instance_obsidian_sanctum.cpp index fc5652f83..2874b11f8 100644 --- a/scripts/northrend/obsidian_sanctum/instance_obsidian_sanctum.cpp +++ b/scripts/northrend/obsidian_sanctum/instance_obsidian_sanctum.cpp @@ -91,6 +91,21 @@ bool instance_obsidian_sanctum::CheckAchievementCriteriaMeet(uint32 uiCriteriaId } } +bool instance_obsidian_sanctum::CheckConditionCriteriaMeet(Player const* pPlayer, uint32 uiInstanceConditionId, WorldObject const* pConditionSource, ConditionSource conditionSourceType) +{ + switch (uiInstanceConditionId) + { + case INSTANCE_CONDITION_ID_HARD_MODE: // Exactly one dragon alive on event start + case INSTANCE_CONDITION_ID_HARD_MODE_2: // Exactly two dragons alive on event start + case INSTANCE_CONDITION_ID_HARD_MODE_3: // All three dragons alive on event start + return m_uiAliveDragons == uiInstanceConditionId; + } + + script_error_log("instance_obsidian_sanctum::CheckConditionCriteriaMeet called with unsupported Id %u. Called with param plr %s, src %s, condition source type %u", + uiInstanceConditionId, pPlayer ? pPlayer->GetGuidStr().c_str() : "NULL", pConditionSource ? pConditionSource->GetGuidStr().c_str() : "NULL", conditionSourceType); + return false; +} + InstanceData* GetInstanceData_instance_obsidian_sanctum(Map* pMap) { return new instance_obsidian_sanctum(pMap); diff --git a/scripts/northrend/obsidian_sanctum/obsidian_sanctum.h b/scripts/northrend/obsidian_sanctum/obsidian_sanctum.h index 8e0d2541c..fba7a7a11 100644 --- a/scripts/northrend/obsidian_sanctum/obsidian_sanctum.h +++ b/scripts/northrend/obsidian_sanctum/obsidian_sanctum.h @@ -44,6 +44,7 @@ class MANGOS_DLL_DECL instance_obsidian_sanctum : public ScriptedInstance uint32 GetData(uint32 uiType) override; bool CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/) override; + bool CheckConditionCriteriaMeet(Player const* pPlayer, uint32 uiInstanceConditionId, WorldObject const* pConditionSource, ConditionSource conditionSourceType) override; private: uint32 m_auiEncounter[MAX_ENCOUNTER]; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index ded5ae688..fca16fe80 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2773" + #define SD2_REVISION_NR "2774" #endif // __SD2_REVISION_NR_H__ From da98ca9bdb3423a946dc89709472d00ac04003b6 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Fri, 14 Dec 2012 16:23:05 +0100 Subject: [PATCH 0772/1172] [2775] Fix Compile. Requires C-Mangos [12309] Also tune a few GetData functions --- .../blackrock_depths/blackrock_depths.h | 4 +-- .../instance_blackrock_depths.cpp | 2 +- .../blackrock_spire/blackrock_spire.h | 14 +++++----- .../instance_blackrock_spire.cpp | 27 ++++++++----------- .../blackwing_lair/blackwing_lair.h | 4 +-- .../instance_blackwing_lair.cpp | 2 +- .../eastern_kingdoms/deadmines/deadmines.h | 4 +-- .../deadmines/instance_deadmines.cpp | 2 +- .../eastern_kingdoms/gnomeregan/gnomeregan.h | 4 +-- .../gnomeregan/instance_gnomeregan.cpp | 2 +- .../karazhan/instance_karazhan.cpp | 25 +++++------------ scripts/eastern_kingdoms/karazhan/karazhan.h | 4 +-- .../instance_magisters_terrace.cpp | 2 +- .../magisters_terrace/magisters_terrace.h | 4 +-- .../molten_core/instance_molten_core.cpp | 2 +- .../molten_core/molten_core.h | 4 +-- .../scarlet_enclave/world_map_ebon_hold.cpp | 2 +- .../scarlet_enclave/world_map_ebon_hold.h | 2 +- .../instance_scarlet_monastery.cpp | 2 +- .../scarlet_monastery/scarlet_monastery.h | 2 +- .../scholomance/instance_scholomance.cpp | 2 +- .../scholomance/scholomance.h | 4 +-- .../instance_shadowfang_keep.cpp | 2 +- .../shadowfang_keep/shadowfang_keep.h | 4 +-- .../stratholme/instance_stratholme.cpp | 2 +- .../eastern_kingdoms/stratholme/stratholme.h | 4 +-- .../sunken_temple/instance_sunken_temple.cpp | 2 +- .../sunken_temple/sunken_temple.h | 4 +-- .../instance_sunwell_plateau.cpp | 2 +- .../sunwell_plateau/sunwell_plateau.h | 4 +-- .../uldaman/instance_uldaman.cpp | 4 +-- scripts/eastern_kingdoms/uldaman/uldaman.h | 6 ++--- .../zulaman/instance_zulaman.cpp | 4 +-- scripts/eastern_kingdoms/zulaman/zulaman.h | 6 ++--- .../zulgurub/instance_zulgurub.cpp | 2 +- scripts/eastern_kingdoms/zulgurub/zulgurub.h | 4 +-- .../blackfathom_deeps/blackfathom_deeps.h | 4 +-- .../instance_blackfathom_deeps.cpp | 2 +- .../culling_of_stratholme.h | 4 +-- .../instance_culling_of_stratholme.cpp | 2 +- .../caverns_of_time/dark_portal/dark_portal.h | 4 +-- .../dark_portal/instance_dark_portal.cpp | 2 +- .../kalimdor/caverns_of_time/hyjal/hyjal.h | 4 +-- .../caverns_of_time/hyjal/instance_hyjal.cpp | 2 +- .../old_hillsbrad/instance_old_hillsbrad.cpp | 2 +- .../old_hillsbrad/old_hillsbrad.h | 4 +-- scripts/kalimdor/dire_maul/dire_maul.h | 4 +-- .../kalimdor/dire_maul/instance_dire_maul.cpp | 2 +- .../onyxias_lair/instance_onyxias_lair.cpp | 2 +- scripts/kalimdor/onyxias_lair/onyxias_lair.h | 2 +- .../instance_razorfen_kraul.cpp | 2 +- .../kalimdor/razorfen_kraul/razorfen_kraul.h | 4 +-- .../instance_ruins_of_ahnqiraj.cpp | 2 +- .../ruins_of_ahnqiraj/ruins_of_ahnqiraj.h | 4 +-- .../instance_temple_of_ahnqiraj.cpp | 2 +- .../temple_of_ahnqiraj/temple_of_ahnqiraj.h | 4 +-- .../instance_wailing_caverns.cpp | 14 +++------- .../wailing_caverns/wailing_caverns.h | 4 +-- .../kalimdor/zulfarrak/instance_zulfarrak.cpp | 2 +- scripts/kalimdor/zulfarrak/zulfarrak.h | 4 +-- .../northrend/azjol-nerub/ahnkahet/ahnkahet.h | 6 ++--- .../ahnkahet/instance_ahnkahet.cpp | 4 +-- .../azjol-nerub/azjol-nerub/azjol-nerub.h | 4 +-- .../azjol-nerub/instance_azjol-nerub.cpp | 2 +- .../instance_trial_of_the_crusader.cpp | 2 +- .../trial_of_the_crusader.h | 4 +-- .../draktharon_keep/draktharon_keep.h | 6 ++--- .../instance_draktharon_keep.cpp | 4 +-- scripts/northrend/gundrak/gundrak.h | 6 ++--- .../northrend/gundrak/instance_gundrak.cpp | 4 +-- .../forge_of_souls/forge_of_souls.h | 6 ++--- .../instance_forge_of_souls.cpp | 4 +-- .../pit_of_saron/instance_pit_of_saron.cpp | 2 +- .../frozen_halls/pit_of_saron/pit_of_saron.h | 4 +-- .../icecrown_citadel/icecrown_citadel.h | 6 ++--- .../instance_icecrown_citadel.cpp | 4 +-- .../naxxramas/instance_naxxramas.cpp | 4 +-- scripts/northrend/naxxramas/naxxramas.h | 6 ++--- .../northrend/nexus/nexus/instance_nexus.cpp | 4 +-- scripts/northrend/nexus/nexus/nexus.h | 6 ++--- .../nexus/oculus/instance_oculus.cpp | 2 +- scripts/northrend/nexus/oculus/oculus.h | 4 +-- .../instance_obsidian_sanctum.cpp | 6 ++--- .../obsidian_sanctum/obsidian_sanctum.h | 6 ++--- .../ruby_sanctum/instance_ruby_sanctum.cpp | 2 +- scripts/northrend/ruby_sanctum/ruby_sanctum.h | 4 +-- .../halls_of_lightning/halls_of_lightning.h | 6 ++--- .../instance_halls_of_lightning.cpp | 4 +-- .../ulduar/halls_of_stone/halls_of_stone.h | 4 +-- .../instance_halls_of_stone.cpp | 2 +- .../ulduar/ulduar/instance_ulduar.cpp | 6 ++--- scripts/northrend/ulduar/ulduar/ulduar.h | 8 +++--- .../utgarde_keep/instance_utgarde_keep.cpp | 4 +-- .../utgarde_keep/utgarde_keep/utgarde_keep.h | 6 ++--- .../instance_utgarde_pinnacle.cpp | 4 +-- .../utgarde_pinnacle/utgarde_pinnacle.h | 6 ++--- .../violet_hold/instance_violet_hold.cpp | 4 +-- scripts/northrend/violet_hold/violet_hold.h | 6 ++--- .../sethekk_halls/instance_sethekk_halls.cpp | 4 +-- .../auchindoun/sethekk_halls/sethekk_halls.h | 6 ++--- .../instance_shadow_labyrinth.cpp | 2 +- .../shadow_labyrinth/shadow_labyrinth.h | 4 +-- scripts/outland/black_temple/black_temple.h | 4 +-- .../black_temple/instance_black_temple.cpp | 2 +- .../instance_serpent_shrine.cpp | 2 +- .../serpent_shrine/serpent_shrine.h | 4 +-- .../steam_vault/instance_steam_vault.cpp | 2 +- .../steam_vault/steam_vault.h | 4 +-- scripts/outland/gruuls_lair/gruuls_lair.h | 4 +-- .../gruuls_lair/instance_gruuls_lair.cpp | 2 +- .../blood_furnace/blood_furnace.h | 4 +-- .../blood_furnace/instance_blood_furnace.cpp | 2 +- .../hellfire_ramparts/hellfire_ramparts.h | 2 +- .../instance_hellfire_ramparts.cpp | 2 +- .../instance_magtheridons_lair.cpp | 2 +- .../magtheridons_lair/magtheridons_lair.h | 2 +- .../instance_shattered_halls.cpp | 2 +- .../shattered_halls/shattered_halls.h | 4 +-- .../outland/tempest_keep/arcatraz/arcatraz.h | 4 +-- .../arcatraz/instance_arcatraz.cpp | 2 +- .../tempest_keep/the_eye/instance_the_eye.cpp | 2 +- .../outland/tempest_keep/the_eye/the_eye.h | 2 +- .../the_mechanar/instance_mechanar.cpp | 2 +- .../tempest_keep/the_mechanar/mechanar.h | 4 +-- sd2_revision_nr.h | 2 +- 125 files changed, 240 insertions(+), 262 deletions(-) diff --git a/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.h b/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.h index e364e4c6e..afe4639ad 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.h +++ b/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.h @@ -133,9 +133,9 @@ class MANGOS_DLL_DECL instance_blackrock_depths : public ScriptedInstance void OnObjectCreate(GameObject* pGo) override; void SetData(uint32 uiType, uint32 uiData) override; - uint32 GetData(uint32 uiType) override; + uint32 GetData(uint32 uiType) const override; - const char* Save() override { return m_strInstData.c_str(); } + const char* Save() const override { return m_strInstData.c_str(); } void Load(const char* chrIn) override; void Update(uint32 uiDiff) override; diff --git a/scripts/eastern_kingdoms/blackrock_depths/instance_blackrock_depths.cpp b/scripts/eastern_kingdoms/blackrock_depths/instance_blackrock_depths.cpp index 1bc29c1ce..8dfaa8390 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/instance_blackrock_depths.cpp +++ b/scripts/eastern_kingdoms/blackrock_depths/instance_blackrock_depths.cpp @@ -238,7 +238,7 @@ void instance_blackrock_depths::SetData(uint32 uiType, uint32 uiData) } } -uint32 instance_blackrock_depths::GetData(uint32 uiType) +uint32 instance_blackrock_depths::GetData(uint32 uiType) const { switch (uiType) { diff --git a/scripts/eastern_kingdoms/blackrock_spire/blackrock_spire.h b/scripts/eastern_kingdoms/blackrock_spire/blackrock_spire.h index 405b449b4..cf1376cb3 100644 --- a/scripts/eastern_kingdoms/blackrock_spire/blackrock_spire.h +++ b/scripts/eastern_kingdoms/blackrock_spire/blackrock_spire.h @@ -10,11 +10,11 @@ enum MAX_ENCOUNTER = 5, MAX_ROOMS = 7, - TYPE_ROOM_EVENT = 1, - TYPE_EMBERSEER = 2, - TYPE_FLAMEWREATH = 3, // Only summon once per instance - TYPE_STADIUM = 4, - TYPE_VALTHALAK = 5, // Only summon once per instance + TYPE_ROOM_EVENT = 0, + TYPE_EMBERSEER = 1, + TYPE_FLAMEWREATH = 2, // Only summon once per instance + TYPE_STADIUM = 3, + TYPE_VALTHALAK = 4, // Only summon once per instance NPC_SCARSHIELD_INFILTRATOR = 10299, NPC_BLACKHAND_SUMMONER = 9818, @@ -107,9 +107,9 @@ class MANGOS_DLL_DECL instance_blackrock_spire : public ScriptedInstance, privat void SetData(uint32 uiType, uint32 uiData) override; void SetData64(uint32 uiType, uint64 uiData) override; - uint32 GetData(uint32 uiType) override; + uint32 GetData(uint32 uiType) const override; - const char* Save() override { return m_strInstData.c_str(); } + const char* Save() const override { return m_strInstData.c_str(); } void Load(const char* chrIn) override; void DoUseEmberseerRunes(bool bReset = false); diff --git a/scripts/eastern_kingdoms/blackrock_spire/instance_blackrock_spire.cpp b/scripts/eastern_kingdoms/blackrock_spire/instance_blackrock_spire.cpp index 47121e774..536e51aaa 100644 --- a/scripts/eastern_kingdoms/blackrock_spire/instance_blackrock_spire.cpp +++ b/scripts/eastern_kingdoms/blackrock_spire/instance_blackrock_spire.cpp @@ -169,11 +169,11 @@ void instance_blackrock_spire::SetData(uint32 uiType, uint32 uiData) case TYPE_ROOM_EVENT: if (uiData == DONE) DoUseDoorOrButton(GO_EMBERSEER_IN); - m_auiEncounter[0] = uiData; + m_auiEncounter[uiType] = uiData; break; case TYPE_EMBERSEER: // Don't set the same data twice - if (m_auiEncounter[1] == uiData) + if (m_auiEncounter[uiType] == uiData) break; // Combat door DoUseDoorOrButton(GO_DOORS); @@ -197,14 +197,14 @@ void instance_blackrock_spire::SetData(uint32 uiType, uint32 uiData) DoUseEmberseerRunes(); DoUseDoorOrButton(GO_EMBERSEER_OUT); } - m_auiEncounter[1] = uiData; + m_auiEncounter[uiType] = uiData; break; case TYPE_FLAMEWREATH: - m_auiEncounter[2] = uiData; + m_auiEncounter[uiType] = uiData; break; case TYPE_STADIUM: // Don't set the same data twice - if (m_auiEncounter[3] == uiData) + if (m_auiEncounter[uiType] == uiData) break; // Combat door DoUseDoorOrButton(GO_GYTH_ENTRY_DOOR); @@ -227,10 +227,10 @@ void instance_blackrock_spire::SetData(uint32 uiType, uint32 uiData) m_uiStadiumMobsAlive = 0; m_uiStadiumWaves = 0; } - m_auiEncounter[3] = uiData; + m_auiEncounter[uiType] = uiData; break; case TYPE_VALTHALAK: - m_auiEncounter[4] = uiData; + m_auiEncounter[uiType] = uiData; break; } @@ -294,16 +294,11 @@ void instance_blackrock_spire::Load(const char* chrIn) OUT_LOAD_INST_DATA_COMPLETE; } -uint32 instance_blackrock_spire::GetData(uint32 uiType) +uint32 instance_blackrock_spire::GetData(uint32 uiType) const { - switch (uiType) - { - case TYPE_ROOM_EVENT: return m_auiEncounter[0]; - case TYPE_EMBERSEER: return m_auiEncounter[1]; - case TYPE_FLAMEWREATH: return m_auiEncounter[2]; - case TYPE_STADIUM: return m_auiEncounter[3]; - case TYPE_VALTHALAK: return m_auiEncounter[4]; - } + if (uiType < MAX_ENCOUNTER) + return m_auiEncounter[uiType]; + return 0; } diff --git a/scripts/eastern_kingdoms/blackwing_lair/blackwing_lair.h b/scripts/eastern_kingdoms/blackwing_lair/blackwing_lair.h index 6bb7811f6..a19c47322 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/blackwing_lair.h +++ b/scripts/eastern_kingdoms/blackwing_lair/blackwing_lair.h @@ -62,9 +62,9 @@ class MANGOS_DLL_DECL instance_blackwing_lair : public ScriptedInstance void OnCreatureDeath(Creature* pCreature) override; void SetData(uint32 uiType, uint32 uiData) override; - uint32 GetData(uint32 uiType) override; + uint32 GetData(uint32 uiType) const override; - const char* Save() override { return m_strInstData.c_str(); } + const char* Save() const override { return m_strInstData.c_str(); } void Load(const char* chrIn) override; protected: diff --git a/scripts/eastern_kingdoms/blackwing_lair/instance_blackwing_lair.cpp b/scripts/eastern_kingdoms/blackwing_lair/instance_blackwing_lair.cpp index df2bd5a6b..89ef65304 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/instance_blackwing_lair.cpp +++ b/scripts/eastern_kingdoms/blackwing_lair/instance_blackwing_lair.cpp @@ -216,7 +216,7 @@ void instance_blackwing_lair::Load(const char* chrIn) OUT_LOAD_INST_DATA_COMPLETE; } -uint32 instance_blackwing_lair::GetData(uint32 uiType) +uint32 instance_blackwing_lair::GetData(uint32 uiType) const { if (uiType < MAX_ENCOUNTER) return m_auiEncounter[uiType]; diff --git a/scripts/eastern_kingdoms/deadmines/deadmines.h b/scripts/eastern_kingdoms/deadmines/deadmines.h index 8fba022f6..428108659 100644 --- a/scripts/eastern_kingdoms/deadmines/deadmines.h +++ b/scripts/eastern_kingdoms/deadmines/deadmines.h @@ -52,9 +52,9 @@ class MANGOS_DLL_DECL instance_deadmines : public ScriptedInstance void OnCreatureDeath(Creature* pCreature) override; void SetData(uint32 uiType, uint32 uiData) override; - uint32 GetData(uint32 uiType) override; + uint32 GetData(uint32 uiType) const override; - const char* Save() override { return m_strInstData.c_str(); } + const char* Save() const override { return m_strInstData.c_str(); } void Load(const char* chrIn) override; void Update(uint32 uiDiff) override; diff --git a/scripts/eastern_kingdoms/deadmines/instance_deadmines.cpp b/scripts/eastern_kingdoms/deadmines/instance_deadmines.cpp index 39e2323d2..c72289743 100644 --- a/scripts/eastern_kingdoms/deadmines/instance_deadmines.cpp +++ b/scripts/eastern_kingdoms/deadmines/instance_deadmines.cpp @@ -169,7 +169,7 @@ void instance_deadmines::SetData(uint32 uiType, uint32 uiData) } } -uint32 instance_deadmines::GetData(uint32 uiType) +uint32 instance_deadmines::GetData(uint32 uiType) const { if (uiType < MAX_ENCOUNTER) return m_auiEncounter[uiType]; diff --git a/scripts/eastern_kingdoms/gnomeregan/gnomeregan.h b/scripts/eastern_kingdoms/gnomeregan/gnomeregan.h index efebc12ae..39c00bcf4 100644 --- a/scripts/eastern_kingdoms/gnomeregan/gnomeregan.h +++ b/scripts/eastern_kingdoms/gnomeregan/gnomeregan.h @@ -63,13 +63,13 @@ class MANGOS_DLL_DECL instance_gnomeregan : public ScriptedInstance void OnObjectCreate(GameObject* pGo) override; void SetData(uint32 uiType, uint32 uiData) override; - uint32 GetData(uint32 uiType) override; + uint32 GetData(uint32 uiType) const override; sBombFace* GetBombFaces(); void DoActivateBombFace(uint8 uiIndex); void DoDeactivateBombFace(uint8 uiIndex); - const char* Save() override { return m_strInstData.c_str(); } + const char* Save() const override { return m_strInstData.c_str(); } void Load(const char* chrIn) override; protected: diff --git a/scripts/eastern_kingdoms/gnomeregan/instance_gnomeregan.cpp b/scripts/eastern_kingdoms/gnomeregan/instance_gnomeregan.cpp index ce4208f7f..613084b5e 100644 --- a/scripts/eastern_kingdoms/gnomeregan/instance_gnomeregan.cpp +++ b/scripts/eastern_kingdoms/gnomeregan/instance_gnomeregan.cpp @@ -229,7 +229,7 @@ void instance_gnomeregan::Load(const char* chrIn) OUT_LOAD_INST_DATA_COMPLETE; } -uint32 instance_gnomeregan::GetData(uint32 uiType) +uint32 instance_gnomeregan::GetData(uint32 uiType) const { switch (uiType) { diff --git a/scripts/eastern_kingdoms/karazhan/instance_karazhan.cpp b/scripts/eastern_kingdoms/karazhan/instance_karazhan.cpp index 5b2ae5a53..3e9bffe41 100644 --- a/scripts/eastern_kingdoms/karazhan/instance_karazhan.cpp +++ b/scripts/eastern_kingdoms/karazhan/instance_karazhan.cpp @@ -245,26 +245,15 @@ void instance_karazhan::SetData(uint32 uiType, uint32 uiData) } } -uint32 instance_karazhan::GetData(uint32 uiType) +uint32 instance_karazhan::GetData(uint32 uiType) const { - switch (uiType) - { - case TYPE_ATTUMEN: return m_auiEncounter[0]; - case TYPE_MOROES: return m_auiEncounter[1]; - case TYPE_MAIDEN: return m_auiEncounter[2]; - case TYPE_OPERA: return m_auiEncounter[3]; - case TYPE_CURATOR: return m_auiEncounter[4]; - case TYPE_TERESTIAN: return m_auiEncounter[5]; - case TYPE_ARAN: return m_auiEncounter[6]; - case TYPE_NETHERSPITE: return m_auiEncounter[7]; - case TYPE_CHESS: return m_auiEncounter[8]; - case TYPE_MALCHEZZAR: return m_auiEncounter[9]; - case TYPE_NIGHTBANE: return m_auiEncounter[10]; - case TYPE_OPERA_PERFORMANCE: return m_uiOperaEvent; + if (uiType < MAX_ENCOUNTER) + return m_auiEncounter[uiType]; - default: - return 0; - } + if (uiType == TYPE_OPERA_PERFORMANCE) + return m_uiOperaEvent; + + return 0; } void instance_karazhan::Load(const char* chrIn) diff --git a/scripts/eastern_kingdoms/karazhan/karazhan.h b/scripts/eastern_kingdoms/karazhan/karazhan.h index 0efeb81d4..548419da9 100644 --- a/scripts/eastern_kingdoms/karazhan/karazhan.h +++ b/scripts/eastern_kingdoms/karazhan/karazhan.h @@ -119,14 +119,14 @@ class MANGOS_DLL_DECL instance_karazhan : public ScriptedInstance void OnCreatureDeath(Creature* pCreature) override; void SetData(uint32 uiType, uint32 uiData) override; - uint32 GetData(uint32 uiType) override; + uint32 GetData(uint32 uiType) const override; void DoPrepareOperaStage(Creature* pOrganizer); void GetNightbaneTriggers(GuidList& lList, bool bGround) { lList = bGround ? m_lNightbaneGroundTriggers : m_lNightbaneAirTriggers; } void Load(const char* chrIn) override; - const char* Save() override { return m_strInstData.c_str(); } + const char* Save() const override { return m_strInstData.c_str(); } private: uint32 m_auiEncounter[MAX_ENCOUNTER]; diff --git a/scripts/eastern_kingdoms/magisters_terrace/instance_magisters_terrace.cpp b/scripts/eastern_kingdoms/magisters_terrace/instance_magisters_terrace.cpp index 2969392f4..750b17f71 100644 --- a/scripts/eastern_kingdoms/magisters_terrace/instance_magisters_terrace.cpp +++ b/scripts/eastern_kingdoms/magisters_terrace/instance_magisters_terrace.cpp @@ -214,7 +214,7 @@ void instance_magisters_terrace::Load(const char* chrIn) OUT_LOAD_INST_DATA_COMPLETE; } -uint32 instance_magisters_terrace::GetData(uint32 uiType) +uint32 instance_magisters_terrace::GetData(uint32 uiType) const { if (uiType < MAX_ENCOUNTER) return m_auiEncounter[uiType]; diff --git a/scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.h b/scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.h index 6cc74bdc6..a2996f1bb 100644 --- a/scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.h +++ b/scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.h @@ -56,10 +56,10 @@ class MANGOS_DLL_DECL instance_magisters_terrace : public ScriptedInstance void OnCreatureDeath(Creature* pCreature) override; - uint32 GetData(uint32 uiType) override; + uint32 GetData(uint32 uiType) const override; void SetData(uint32 uiType, uint32 uiData) override; - const char* Save() override { return m_strInstData.c_str(); } + const char* Save() const override { return m_strInstData.c_str(); } void Load(const char* chrIn) override; private: diff --git a/scripts/eastern_kingdoms/molten_core/instance_molten_core.cpp b/scripts/eastern_kingdoms/molten_core/instance_molten_core.cpp index c0930411f..64a206b6c 100644 --- a/scripts/eastern_kingdoms/molten_core/instance_molten_core.cpp +++ b/scripts/eastern_kingdoms/molten_core/instance_molten_core.cpp @@ -172,7 +172,7 @@ void instance_molten_core::SetData(uint32 uiType, uint32 uiData) } } -uint32 instance_molten_core::GetData(uint32 uiType) +uint32 instance_molten_core::GetData(uint32 uiType) const { if (uiType < MAX_ENCOUNTER) return m_auiEncounter[uiType]; diff --git a/scripts/eastern_kingdoms/molten_core/molten_core.h b/scripts/eastern_kingdoms/molten_core/molten_core.h index 95d6c8b2d..68507d58f 100644 --- a/scripts/eastern_kingdoms/molten_core/molten_core.h +++ b/scripts/eastern_kingdoms/molten_core/molten_core.h @@ -83,9 +83,9 @@ class MANGOS_DLL_DECL instance_molten_core : public ScriptedInstance void OnPlayerEnter(Player* pPlayer) override; void SetData(uint32 uiType, uint32 uiData) override; - uint32 GetData(uint32 uiType) override; + uint32 GetData(uint32 uiType) const override; - const char* Save() override { return m_strInstData.c_str(); } + const char* Save() const override { return m_strInstData.c_str(); } void Load(const char* chrIn) override; protected: diff --git a/scripts/eastern_kingdoms/scarlet_enclave/world_map_ebon_hold.cpp b/scripts/eastern_kingdoms/scarlet_enclave/world_map_ebon_hold.cpp index 6a6165f96..c0ccaa518 100644 --- a/scripts/eastern_kingdoms/scarlet_enclave/world_map_ebon_hold.cpp +++ b/scripts/eastern_kingdoms/scarlet_enclave/world_map_ebon_hold.cpp @@ -173,7 +173,7 @@ void world_map_ebon_hold::SetData(uint32 uiType, uint32 uiData) } } -uint32 world_map_ebon_hold::GetData(uint32 uiType) +uint32 world_map_ebon_hold::GetData(uint32 uiType) const { if (uiType == TYPE_BATTLE) return m_uiBattleEncounter; diff --git a/scripts/eastern_kingdoms/scarlet_enclave/world_map_ebon_hold.h b/scripts/eastern_kingdoms/scarlet_enclave/world_map_ebon_hold.h index cbba7bd2d..dc46e28e5 100644 --- a/scripts/eastern_kingdoms/scarlet_enclave/world_map_ebon_hold.h +++ b/scripts/eastern_kingdoms/scarlet_enclave/world_map_ebon_hold.h @@ -126,7 +126,7 @@ class MANGOS_DLL_DECL world_map_ebon_hold : public ScriptedInstance void OnObjectCreate(GameObject* pGo) override; void SetData(uint32 uiType, uint32 uiData) override; - uint32 GetData(uint32 uiType) override; + uint32 GetData(uint32 uiType) const override; void Update(uint32 uiDiff) override; diff --git a/scripts/eastern_kingdoms/scarlet_monastery/instance_scarlet_monastery.cpp b/scripts/eastern_kingdoms/scarlet_monastery/instance_scarlet_monastery.cpp index 89d7fb4d4..f0ed1f97e 100644 --- a/scripts/eastern_kingdoms/scarlet_monastery/instance_scarlet_monastery.cpp +++ b/scripts/eastern_kingdoms/scarlet_monastery/instance_scarlet_monastery.cpp @@ -75,7 +75,7 @@ void instance_scarlet_monastery::SetData(uint32 uiType, uint32 uiData) } } -uint32 instance_scarlet_monastery::GetData(uint32 uiData) +uint32 instance_scarlet_monastery::GetData(uint32 uiData) const { if (uiData == TYPE_MOGRAINE_AND_WHITE_EVENT) return m_auiEncounter[0]; diff --git a/scripts/eastern_kingdoms/scarlet_monastery/scarlet_monastery.h b/scripts/eastern_kingdoms/scarlet_monastery/scarlet_monastery.h index afe7f6478..3c5d780b4 100644 --- a/scripts/eastern_kingdoms/scarlet_monastery/scarlet_monastery.h +++ b/scripts/eastern_kingdoms/scarlet_monastery/scarlet_monastery.h @@ -33,7 +33,7 @@ class MANGOS_DLL_DECL instance_scarlet_monastery : public ScriptedInstance void OnObjectCreate(GameObject* pGo) override; void SetData(uint32 uiType, uint32 uiData) override; - uint32 GetData(uint32 uiData) override; + uint32 GetData(uint32 uiData) const override; private: uint32 m_auiEncounter[MAX_ENCOUNTER]; diff --git a/scripts/eastern_kingdoms/scholomance/instance_scholomance.cpp b/scripts/eastern_kingdoms/scholomance/instance_scholomance.cpp index 3b22f2b1d..acf8b3c23 100644 --- a/scripts/eastern_kingdoms/scholomance/instance_scholomance.cpp +++ b/scripts/eastern_kingdoms/scholomance/instance_scholomance.cpp @@ -210,7 +210,7 @@ void instance_scholomance::HandlePortalEvent(uint32 uiEventId, uint32 uiData) } } -uint32 instance_scholomance::GetData(uint32 uiType) +uint32 instance_scholomance::GetData(uint32 uiType) const { if (uiType < MAX_ENCOUNTER) return m_auiEncounter[uiType]; diff --git a/scripts/eastern_kingdoms/scholomance/scholomance.h b/scripts/eastern_kingdoms/scholomance/scholomance.h index ee60f5bc9..150eae5e0 100644 --- a/scripts/eastern_kingdoms/scholomance/scholomance.h +++ b/scripts/eastern_kingdoms/scholomance/scholomance.h @@ -97,9 +97,9 @@ class MANGOS_DLL_DECL instance_scholomance : public ScriptedInstance void HandlePortalEvent(uint32 uiEventId, uint32 uiData); void SetData(uint32 uiType, uint32 uiData) override; - uint32 GetData(uint32 uiType) override; + uint32 GetData(uint32 uiType) const override; - const char* Save() override { return m_strInstData.c_str(); } + const char* Save() const override { return m_strInstData.c_str(); } void Load(const char* chrIn) override; private: diff --git a/scripts/eastern_kingdoms/shadowfang_keep/instance_shadowfang_keep.cpp b/scripts/eastern_kingdoms/shadowfang_keep/instance_shadowfang_keep.cpp index b19732cf9..ada312608 100644 --- a/scripts/eastern_kingdoms/shadowfang_keep/instance_shadowfang_keep.cpp +++ b/scripts/eastern_kingdoms/shadowfang_keep/instance_shadowfang_keep.cpp @@ -206,7 +206,7 @@ void instance_shadowfang_keep::SetData(uint32 uiType, uint32 uiData) } } -uint32 instance_shadowfang_keep::GetData(uint32 uiType) +uint32 instance_shadowfang_keep::GetData(uint32 uiType) const { switch (uiType) { diff --git a/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.h b/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.h index bc94829a9..4fb9000dc 100644 --- a/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.h +++ b/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.h @@ -61,9 +61,9 @@ class MANGOS_DLL_DECL instance_shadowfang_keep : public ScriptedInstance void OnCreatureEvade(Creature* pCreature); void SetData(uint32 uiType, uint32 uiData) override; - uint32 GetData(uint32 uiType) override; + uint32 GetData(uint32 uiType) const override; - const char* Save() override { return m_strInstData.c_str(); } + const char* Save() const override { return m_strInstData.c_str(); } void Load(const char* chrIn) override; private: diff --git a/scripts/eastern_kingdoms/stratholme/instance_stratholme.cpp b/scripts/eastern_kingdoms/stratholme/instance_stratholme.cpp index c398a7d62..205eeee46 100644 --- a/scripts/eastern_kingdoms/stratholme/instance_stratholme.cpp +++ b/scripts/eastern_kingdoms/stratholme/instance_stratholme.cpp @@ -434,7 +434,7 @@ void instance_stratholme::Load(const char* chrIn) OUT_LOAD_INST_DATA_COMPLETE; } -uint32 instance_stratholme::GetData(uint32 uiType) +uint32 instance_stratholme::GetData(uint32 uiType) const { switch (uiType) { diff --git a/scripts/eastern_kingdoms/stratholme/stratholme.h b/scripts/eastern_kingdoms/stratholme/stratholme.h index 7f885d465..ce2881cd9 100644 --- a/scripts/eastern_kingdoms/stratholme/stratholme.h +++ b/scripts/eastern_kingdoms/stratholme/stratholme.h @@ -123,9 +123,9 @@ class MANGOS_DLL_DECL instance_stratholme : public ScriptedInstance void OnObjectCreate(GameObject* pGo) override; void SetData(uint32 uiType, uint32 uiData) override; - uint32 GetData(uint32 uiType) override; + uint32 GetData(uint32 uiType) const override; - const char* Save() override { return m_strInstData.c_str(); } + const char* Save() const override { return m_strInstData.c_str(); } void Load(const char* chrIn) override; void OnCreatureEnterCombat(Creature* pCreature) override; diff --git a/scripts/eastern_kingdoms/sunken_temple/instance_sunken_temple.cpp b/scripts/eastern_kingdoms/sunken_temple/instance_sunken_temple.cpp index 03220ec3a..73dd208bf 100644 --- a/scripts/eastern_kingdoms/sunken_temple/instance_sunken_temple.cpp +++ b/scripts/eastern_kingdoms/sunken_temple/instance_sunken_temple.cpp @@ -330,7 +330,7 @@ void instance_sunken_temple::Load(const char* chrIn) OUT_LOAD_INST_DATA_COMPLETE; } -uint32 instance_sunken_temple::GetData(uint32 uiType) +uint32 instance_sunken_temple::GetData(uint32 uiType) const { if (uiType < MAX_ENCOUNTER) return m_auiEncounter[uiType]; diff --git a/scripts/eastern_kingdoms/sunken_temple/sunken_temple.h b/scripts/eastern_kingdoms/sunken_temple/sunken_temple.h index 50f69c035..7749167ba 100644 --- a/scripts/eastern_kingdoms/sunken_temple/sunken_temple.h +++ b/scripts/eastern_kingdoms/sunken_temple/sunken_temple.h @@ -117,13 +117,13 @@ class MANGOS_DLL_DECL instance_sunken_temple : public ScriptedInstance void OnCreatureDeath(Creature* pCreature) override; void SetData(uint32 uiType, uint32 uiData) override; - uint32 GetData(uint32 uiType) override; + uint32 GetData(uint32 uiType) const override; void Update(uint32 uiDiff) override; bool ProcessStatueEvent(uint32 uiEventId); - const char* Save() override { return m_strInstData.c_str(); } + const char* Save() const override { return m_strInstData.c_str(); } void Load(const char* chrIn) override; protected: diff --git a/scripts/eastern_kingdoms/sunwell_plateau/instance_sunwell_plateau.cpp b/scripts/eastern_kingdoms/sunwell_plateau/instance_sunwell_plateau.cpp index 945f5677e..068182424 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/instance_sunwell_plateau.cpp +++ b/scripts/eastern_kingdoms/sunwell_plateau/instance_sunwell_plateau.cpp @@ -277,7 +277,7 @@ void instance_sunwell_plateau::SetData(uint32 uiType, uint32 uiData) } } -uint32 instance_sunwell_plateau::GetData(uint32 uiType) +uint32 instance_sunwell_plateau::GetData(uint32 uiType) const { if (uiType < MAX_ENCOUNTER) return m_auiEncounter[uiType]; diff --git a/scripts/eastern_kingdoms/sunwell_plateau/sunwell_plateau.h b/scripts/eastern_kingdoms/sunwell_plateau/sunwell_plateau.h index 63c4360ed..765385280 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/sunwell_plateau.h +++ b/scripts/eastern_kingdoms/sunwell_plateau/sunwell_plateau.h @@ -95,11 +95,11 @@ class MANGOS_DLL_DECL instance_sunwell_plateau : public ScriptedInstance, privat void OnCreatureEvade(Creature* pCreature); void SetData(uint32 uiType, uint32 uiData) override; - uint32 GetData(uint32 uiType) override; + uint32 GetData(uint32 uiType) const override; void Update(uint32 uiDiff) override; - const char* Save() override { return m_strInstData.c_str(); } + const char* Save() const override { return m_strInstData.c_str(); } void Load(const char* chrIn) override; protected: diff --git a/scripts/eastern_kingdoms/uldaman/instance_uldaman.cpp b/scripts/eastern_kingdoms/uldaman/instance_uldaman.cpp index b539f4cd8..5752cbc9b 100644 --- a/scripts/eastern_kingdoms/uldaman/instance_uldaman.cpp +++ b/scripts/eastern_kingdoms/uldaman/instance_uldaman.cpp @@ -167,7 +167,7 @@ void instance_uldaman::SetData64(uint32 uiData, uint64 uiGuid) } } -uint32 instance_uldaman::GetData(uint32 uiType) +uint32 instance_uldaman::GetData(uint32 uiType) const { switch (uiType) { @@ -177,7 +177,7 @@ uint32 instance_uldaman::GetData(uint32 uiType) return 0; } -uint64 instance_uldaman::GetData64(uint32 uiData) +uint64 instance_uldaman::GetData64(uint32 uiData) const { switch (uiData) { diff --git a/scripts/eastern_kingdoms/uldaman/uldaman.h b/scripts/eastern_kingdoms/uldaman/uldaman.h index feeeeffce..450996256 100644 --- a/scripts/eastern_kingdoms/uldaman/uldaman.h +++ b/scripts/eastern_kingdoms/uldaman/uldaman.h @@ -48,8 +48,8 @@ class MANGOS_DLL_DECL instance_uldaman : public ScriptedInstance void SetData(uint32 uiType, uint32 uiData) override; void SetData64(uint32 uiData, uint64 uiGuid) override; - uint32 GetData(uint32 uiType) override; - uint64 GetData64(uint32 uiData) override; + uint32 GetData(uint32 uiType) const override; + uint64 GetData64(uint32 uiData) const override; void StartEvent(uint32 uiEventId, Player* pPlayer); @@ -57,7 +57,7 @@ class MANGOS_DLL_DECL instance_uldaman : public ScriptedInstance Creature* GetClosestDwarfNotInCombat(Creature* pSearcher, uint32 uiPhase); - const char* Save() override { return m_strInstData.c_str(); } + const char* Save() const override { return m_strInstData.c_str(); } void Load(const char* chrIn) override; protected: diff --git a/scripts/eastern_kingdoms/zulaman/instance_zulaman.cpp b/scripts/eastern_kingdoms/zulaman/instance_zulaman.cpp index 5c4873138..e63fda880 100644 --- a/scripts/eastern_kingdoms/zulaman/instance_zulaman.cpp +++ b/scripts/eastern_kingdoms/zulaman/instance_zulaman.cpp @@ -350,7 +350,7 @@ void instance_zulaman::Load(const char* chrIn) OUT_LOAD_INST_DATA_COMPLETE; } -uint32 instance_zulaman::GetData(uint32 uiType) +uint32 instance_zulaman::GetData(uint32 uiType) const { switch (uiType) { @@ -393,7 +393,7 @@ void instance_zulaman::SendNextBearWave(Unit* pTarget) m_bIsBearPhaseInProgress = true; } -bool instance_zulaman::CheckConditionCriteriaMeet(Player const* pPlayer, uint32 uiInstanceConditionId, WorldObject const* pConditionSource, ConditionSource conditionSourceType) +bool instance_zulaman::CheckConditionCriteriaMeet(Player const* pPlayer, uint32 uiInstanceConditionId, WorldObject const* pConditionSource, uint32 conditionSourceType) const { switch (uiInstanceConditionId) { diff --git a/scripts/eastern_kingdoms/zulaman/zulaman.h b/scripts/eastern_kingdoms/zulaman/zulaman.h index b84b92a72..15e3c85b6 100644 --- a/scripts/eastern_kingdoms/zulaman/zulaman.h +++ b/scripts/eastern_kingdoms/zulaman/zulaman.h @@ -161,16 +161,16 @@ class MANGOS_DLL_DECL instance_zulaman : public ScriptedInstance void OnCreatureEvade(Creature* pCreature); void SetData(uint32 uiType, uint32 uiData) override; - uint32 GetData(uint32 uiType) override; + uint32 GetData(uint32 uiType) const override; - const char* Save() override { return m_strInstData.c_str(); } + const char* Save() const override { return m_strInstData.c_str(); } void Load(const char* chrIn) override; bool IsBearPhaseInProgress() { return m_bIsBearPhaseInProgress; } void SetBearEventProgress(bool bIsInProgress) { m_bIsBearPhaseInProgress = bIsInProgress; } void SendNextBearWave(Unit* pTarget); - bool CheckConditionCriteriaMeet(Player const* pPlayer, uint32 uiInstanceConditionId, WorldObject const* pConditionSource, ConditionSource conditionSourceType) override; + bool CheckConditionCriteriaMeet(Player const* pPlayer, uint32 uiInstanceConditionId, WorldObject const* pConditionSource, uint32 conditionSourceType) const override; void Update(uint32 uiDiff) override; diff --git a/scripts/eastern_kingdoms/zulgurub/instance_zulgurub.cpp b/scripts/eastern_kingdoms/zulgurub/instance_zulgurub.cpp index 41edf3350..e9e362d12 100644 --- a/scripts/eastern_kingdoms/zulgurub/instance_zulgurub.cpp +++ b/scripts/eastern_kingdoms/zulgurub/instance_zulgurub.cpp @@ -200,7 +200,7 @@ void instance_zulgurub::Load(const char* chrIn) OUT_LOAD_INST_DATA_COMPLETE; } -uint32 instance_zulgurub::GetData(uint32 uiType) +uint32 instance_zulgurub::GetData(uint32 uiType) const { if (uiType < MAX_ENCOUNTER) return m_auiEncounter[uiType]; diff --git a/scripts/eastern_kingdoms/zulgurub/zulgurub.h b/scripts/eastern_kingdoms/zulgurub/zulgurub.h index 7a8b84f85..f5a29c345 100644 --- a/scripts/eastern_kingdoms/zulgurub/zulgurub.h +++ b/scripts/eastern_kingdoms/zulgurub/zulgurub.h @@ -56,9 +56,9 @@ class MANGOS_DLL_DECL instance_zulgurub : public ScriptedInstance void OnObjectCreate(GameObject* pGo) override; void SetData(uint32 uiType, uint32 uiData) override; - uint32 GetData(uint32 uiType) override; + uint32 GetData(uint32 uiType) const override; - const char* Save() override { return m_strInstData.c_str(); } + const char* Save() const override { return m_strInstData.c_str(); } void Load(const char* chrIn) override; void DoYellAtTriggerIfCan(uint32 uiTriggerId); diff --git a/scripts/kalimdor/blackfathom_deeps/blackfathom_deeps.h b/scripts/kalimdor/blackfathom_deeps/blackfathom_deeps.h index 8bb4b0614..143b822d5 100644 --- a/scripts/kalimdor/blackfathom_deeps/blackfathom_deeps.h +++ b/scripts/kalimdor/blackfathom_deeps/blackfathom_deeps.h @@ -100,9 +100,9 @@ class MANGOS_DLL_DECL instance_blackfathom_deeps : public ScriptedInstance void Update(uint32 uiDiff) override; void SetData(uint32 uiType, uint32 uiData) override; - uint32 GetData(uint32 uiType) override; + uint32 GetData(uint32 uiType) const override; - const char* Save() override { return m_strInstData.c_str(); } + const char* Save() const override { return m_strInstData.c_str(); } void Load(const char* chrIn) override; protected: diff --git a/scripts/kalimdor/blackfathom_deeps/instance_blackfathom_deeps.cpp b/scripts/kalimdor/blackfathom_deeps/instance_blackfathom_deeps.cpp index 7c352f4ba..ba96e600e 100644 --- a/scripts/kalimdor/blackfathom_deeps/instance_blackfathom_deeps.cpp +++ b/scripts/kalimdor/blackfathom_deeps/instance_blackfathom_deeps.cpp @@ -141,7 +141,7 @@ void instance_blackfathom_deeps::SetData(uint32 uiType, uint32 uiData) } } -uint32 instance_blackfathom_deeps::GetData(uint32 uiType) +uint32 instance_blackfathom_deeps::GetData(uint32 uiType) const { switch (uiType) { diff --git a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.h b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.h index 3622b6540..fe7773b23 100644 --- a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.h +++ b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.h @@ -121,9 +121,9 @@ class MANGOS_DLL_DECL instance_culling_of_stratholme : public ScriptedInstance void OnObjectCreate(GameObject* pGo) override; void SetData(uint32 uiType, uint32 uiData) override; - uint32 GetData(uint32 uiType) override; + uint32 GetData(uint32 uiType) const override; - const char* Save() override { return m_strInstData.c_str(); } + const char* Save() const override { return m_strInstData.c_str(); } void Load(const char* chrIn) override; void Update(uint32 uiDiff) override; diff --git a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/instance_culling_of_stratholme.cpp b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/instance_culling_of_stratholme.cpp index 5f5880eb0..7b695a58c 100644 --- a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/instance_culling_of_stratholme.cpp +++ b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/instance_culling_of_stratholme.cpp @@ -296,7 +296,7 @@ void instance_culling_of_stratholme::OnPlayerEnter(Player* pPlayer) } } -uint32 instance_culling_of_stratholme::GetData(uint32 uiType) +uint32 instance_culling_of_stratholme::GetData(uint32 uiType) const { if (uiType < MAX_ENCOUNTER) return m_auiEncounter[uiType]; diff --git a/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.h b/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.h index 13f733dd3..201ae7312 100644 --- a/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.h +++ b/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.h @@ -113,9 +113,9 @@ class MANGOS_DLL_DECL instance_dark_portal : public ScriptedInstance void OnCreatureDeath(Creature* pCreature) override; void SetData(uint32 uiType, uint32 uiData) override; - uint32 GetData(uint32 uiType) override; + uint32 GetData(uint32 uiType) const override; - const char* Save() override { return m_strInstData.c_str(); } + const char* Save() const override { return m_strInstData.c_str(); } void Load(const char* chrIn) override; void DoHandleAreaTrigger(uint32 uiTriggerId); diff --git a/scripts/kalimdor/caverns_of_time/dark_portal/instance_dark_portal.cpp b/scripts/kalimdor/caverns_of_time/dark_portal/instance_dark_portal.cpp index d6a6f3d4e..e713c200c 100644 --- a/scripts/kalimdor/caverns_of_time/dark_portal/instance_dark_portal.cpp +++ b/scripts/kalimdor/caverns_of_time/dark_portal/instance_dark_portal.cpp @@ -232,7 +232,7 @@ void instance_dark_portal::SetData(uint32 uiType, uint32 uiData) } } -uint32 instance_dark_portal::GetData(uint32 uiType) +uint32 instance_dark_portal::GetData(uint32 uiType) const { if (uiType < MAX_ENCOUNTER) return m_auiEncounter[uiType]; diff --git a/scripts/kalimdor/caverns_of_time/hyjal/hyjal.h b/scripts/kalimdor/caverns_of_time/hyjal/hyjal.h index 1813e27ee..d51e170be 100644 --- a/scripts/kalimdor/caverns_of_time/hyjal/hyjal.h +++ b/scripts/kalimdor/caverns_of_time/hyjal/hyjal.h @@ -70,9 +70,9 @@ class MANGOS_DLL_DECL instance_mount_hyjal : public ScriptedInstance void OnCreatureDeath(Creature* pCreature) override; void SetData(uint32 uiType, uint32 uiData) override; - uint32 GetData(uint32 uiType) override; + uint32 GetData(uint32 uiType) const override; - const char* Save() override { return m_strSaveData.c_str(); } + const char* Save() const override { return m_strSaveData.c_str(); } void Load(const char* chrIn) override; private: diff --git a/scripts/kalimdor/caverns_of_time/hyjal/instance_hyjal.cpp b/scripts/kalimdor/caverns_of_time/hyjal/instance_hyjal.cpp index 5ca1d6f85..cc6cb0776 100644 --- a/scripts/kalimdor/caverns_of_time/hyjal/instance_hyjal.cpp +++ b/scripts/kalimdor/caverns_of_time/hyjal/instance_hyjal.cpp @@ -192,7 +192,7 @@ void instance_mount_hyjal::DoSpawnArchimonde() pPlayer->SummonCreature(NPC_ARCHIMONDE, aArchimondeSpawnLoc[0], aArchimondeSpawnLoc[1], aArchimondeSpawnLoc[2], aArchimondeSpawnLoc[3], TEMPSUMMON_DEAD_DESPAWN, 0); } -uint32 instance_mount_hyjal::GetData(uint32 uiType) +uint32 instance_mount_hyjal::GetData(uint32 uiType) const { switch (uiType) { diff --git a/scripts/kalimdor/caverns_of_time/old_hillsbrad/instance_old_hillsbrad.cpp b/scripts/kalimdor/caverns_of_time/old_hillsbrad/instance_old_hillsbrad.cpp index c4c9c6fbf..33e3691d0 100644 --- a/scripts/kalimdor/caverns_of_time/old_hillsbrad/instance_old_hillsbrad.cpp +++ b/scripts/kalimdor/caverns_of_time/old_hillsbrad/instance_old_hillsbrad.cpp @@ -259,7 +259,7 @@ void instance_old_hillsbrad::SetData(uint32 uiType, uint32 uiData) } } -uint32 instance_old_hillsbrad::GetData(uint32 uiType) +uint32 instance_old_hillsbrad::GetData(uint32 uiType) const { if (uiType < MAX_ENCOUNTER) return m_auiEncounter[uiType]; diff --git a/scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.h b/scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.h index fc7ffbce2..473215d74 100644 --- a/scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.h +++ b/scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.h @@ -73,11 +73,11 @@ class MANGOS_DLL_DECL instance_old_hillsbrad : public ScriptedInstance void OnCreatureDeath(Creature* pCreature) override; void SetData(uint32 uiType, uint32 uiData) override; - uint32 GetData(uint32 uiType) override; + uint32 GetData(uint32 uiType) const override; uint32 GetThrallEventCount() { return m_uiThrallEventCount; } - const char* Save() override { return m_strInstData.c_str(); } + const char* Save() const override { return m_strInstData.c_str(); } void Load(const char* chrIn) override; void Update(uint32 uiDiff) override; diff --git a/scripts/kalimdor/dire_maul/dire_maul.h b/scripts/kalimdor/dire_maul/dire_maul.h index a9ec9364f..f484203e7 100644 --- a/scripts/kalimdor/dire_maul/dire_maul.h +++ b/scripts/kalimdor/dire_maul/dire_maul.h @@ -94,12 +94,12 @@ class MANGOS_DLL_DECL instance_dire_maul : public ScriptedInstance void OnObjectCreate(GameObject* pGo) override; void SetData(uint32 uiType, uint32 uiData) override; - uint32 GetData(uint32 uiType) override; + uint32 GetData(uint32 uiType) const override; void OnCreatureEnterCombat(Creature* pCreature) override; void OnCreatureDeath(Creature* pCreature) override; - const char* Save() override { return m_strInstData.c_str(); } + const char* Save() const override { return m_strInstData.c_str(); } void Load(const char* chrIn) override; protected: diff --git a/scripts/kalimdor/dire_maul/instance_dire_maul.cpp b/scripts/kalimdor/dire_maul/instance_dire_maul.cpp index 774d926db..90617c618 100644 --- a/scripts/kalimdor/dire_maul/instance_dire_maul.cpp +++ b/scripts/kalimdor/dire_maul/instance_dire_maul.cpp @@ -271,7 +271,7 @@ void instance_dire_maul::SetData(uint32 uiType, uint32 uiData) } } -uint32 instance_dire_maul::GetData(uint32 uiType) +uint32 instance_dire_maul::GetData(uint32 uiType) const { if (uiType < MAX_ENCOUNTER) return m_auiEncounter[uiType]; diff --git a/scripts/kalimdor/onyxias_lair/instance_onyxias_lair.cpp b/scripts/kalimdor/onyxias_lair/instance_onyxias_lair.cpp index 46373f20d..b293938b0 100644 --- a/scripts/kalimdor/onyxias_lair/instance_onyxias_lair.cpp +++ b/scripts/kalimdor/onyxias_lair/instance_onyxias_lair.cpp @@ -72,7 +72,7 @@ void instance_onyxias_lair::SetData(uint32 uiType, uint32 uiData) // Currently no reason to save anything } -bool instance_onyxias_lair::CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/) +bool instance_onyxias_lair::CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/) const { switch (uiCriteriaId) { diff --git a/scripts/kalimdor/onyxias_lair/onyxias_lair.h b/scripts/kalimdor/onyxias_lair/onyxias_lair.h index 72076cebe..eb325c4a2 100644 --- a/scripts/kalimdor/onyxias_lair/onyxias_lair.h +++ b/scripts/kalimdor/onyxias_lair/onyxias_lair.h @@ -42,7 +42,7 @@ class MANGOS_DLL_DECL instance_onyxias_lair : public ScriptedInstance void SetData(uint32 uiType, uint32 uiData) override; - bool CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/) override; + bool CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/) const override; protected: uint32 m_uiEncounter; diff --git a/scripts/kalimdor/razorfen_kraul/instance_razorfen_kraul.cpp b/scripts/kalimdor/razorfen_kraul/instance_razorfen_kraul.cpp index 6db4d3cd1..24d7954b4 100644 --- a/scripts/kalimdor/razorfen_kraul/instance_razorfen_kraul.cpp +++ b/scripts/kalimdor/razorfen_kraul/instance_razorfen_kraul.cpp @@ -107,7 +107,7 @@ void instance_razorfen_kraul::Load(const char* chrIn) OUT_LOAD_INST_DATA_COMPLETE; } -uint32 instance_razorfen_kraul::GetData(uint32 uiType) +uint32 instance_razorfen_kraul::GetData(uint32 uiType) const { switch (uiType) { diff --git a/scripts/kalimdor/razorfen_kraul/razorfen_kraul.h b/scripts/kalimdor/razorfen_kraul/razorfen_kraul.h index 88288a94d..d638a8c96 100644 --- a/scripts/kalimdor/razorfen_kraul/razorfen_kraul.h +++ b/scripts/kalimdor/razorfen_kraul/razorfen_kraul.h @@ -28,9 +28,9 @@ class MANGOS_DLL_DECL instance_razorfen_kraul : public ScriptedInstance void OnCreatureCreate(Creature* pCreature) override; void SetData(uint32 uiType, uint32 uiData) override; - uint32 GetData(uint32 uiType) override; + uint32 GetData(uint32 uiType) const override; - const char* Save() override { return m_strInstData.c_str(); } + const char* Save() const override { return m_strInstData.c_str(); } void Load(const char* chrIn) override; protected: diff --git a/scripts/kalimdor/ruins_of_ahnqiraj/instance_ruins_of_ahnqiraj.cpp b/scripts/kalimdor/ruins_of_ahnqiraj/instance_ruins_of_ahnqiraj.cpp index 3622aa61b..5c51070ad 100644 --- a/scripts/kalimdor/ruins_of_ahnqiraj/instance_ruins_of_ahnqiraj.cpp +++ b/scripts/kalimdor/ruins_of_ahnqiraj/instance_ruins_of_ahnqiraj.cpp @@ -195,7 +195,7 @@ void instance_ruins_of_ahnqiraj::SetData(uint32 uiType, uint32 uiData) } } -uint32 instance_ruins_of_ahnqiraj::GetData(uint32 uiType) +uint32 instance_ruins_of_ahnqiraj::GetData(uint32 uiType) const { if (uiType < MAX_ENCOUNTER) return m_auiEncounter[uiType]; diff --git a/scripts/kalimdor/ruins_of_ahnqiraj/ruins_of_ahnqiraj.h b/scripts/kalimdor/ruins_of_ahnqiraj/ruins_of_ahnqiraj.h index 7deb366bc..e3fe2acbf 100644 --- a/scripts/kalimdor/ruins_of_ahnqiraj/ruins_of_ahnqiraj.h +++ b/scripts/kalimdor/ruins_of_ahnqiraj/ruins_of_ahnqiraj.h @@ -115,13 +115,13 @@ class MANGOS_DLL_DECL instance_ruins_of_ahnqiraj : public ScriptedInstance void OnCreatureDeath(Creature* pCreature) override; void SetData(uint32 uiType, uint32 uiData) override; - uint32 GetData(uint32 uiType) override; + uint32 GetData(uint32 uiType) const override; void GetKaldoreiGuidList(GuidList& lList) { lList = m_lKaldoreiGuidList; } void Update(uint32 uiDiff) override; - const char* Save() override { return m_strInstData.c_str(); } + const char* Save() const override { return m_strInstData.c_str(); } void Load(const char* chrIn) override; private: diff --git a/scripts/kalimdor/temple_of_ahnqiraj/instance_temple_of_ahnqiraj.cpp b/scripts/kalimdor/temple_of_ahnqiraj/instance_temple_of_ahnqiraj.cpp index aef40f5ad..e16179715 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/instance_temple_of_ahnqiraj.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/instance_temple_of_ahnqiraj.cpp @@ -217,7 +217,7 @@ void instance_temple_of_ahnqiraj::Load(const char* chrIn) OUT_LOAD_INST_DATA_COMPLETE; } -uint32 instance_temple_of_ahnqiraj::GetData(uint32 uiType) +uint32 instance_temple_of_ahnqiraj::GetData(uint32 uiType) const { if (uiType < MAX_ENCOUNTER) return m_auiEncounter[uiType]; diff --git a/scripts/kalimdor/temple_of_ahnqiraj/temple_of_ahnqiraj.h b/scripts/kalimdor/temple_of_ahnqiraj/temple_of_ahnqiraj.h index 31e7049f3..ffb00ded7 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/temple_of_ahnqiraj.h +++ b/scripts/kalimdor/temple_of_ahnqiraj/temple_of_ahnqiraj.h @@ -78,11 +78,11 @@ class MANGOS_DLL_DECL instance_temple_of_ahnqiraj : public ScriptedInstance void OnObjectCreate(GameObject* pGo) override; void SetData(uint32 uiType, uint32 uiData) override; - uint32 GetData(uint32 uiType) override; + uint32 GetData(uint32 uiType) const override; void DoHandleTempleAreaTrigger(uint32 uiTriggerId); - const char* Save() override { return m_strInstData.c_str(); } + const char* Save() const override { return m_strInstData.c_str(); } void Load(const char* chrIn) override; void Update(uint32 uiDiff) override; diff --git a/scripts/kalimdor/wailing_caverns/instance_wailing_caverns.cpp b/scripts/kalimdor/wailing_caverns/instance_wailing_caverns.cpp index 40fd5ef6f..f92da9999 100644 --- a/scripts/kalimdor/wailing_caverns/instance_wailing_caverns.cpp +++ b/scripts/kalimdor/wailing_caverns/instance_wailing_caverns.cpp @@ -134,17 +134,11 @@ void instance_wailing_caverns::Load(const char* chrIn) OUT_LOAD_INST_DATA_COMPLETE; } -uint32 instance_wailing_caverns::GetData(uint32 uiType) +uint32 instance_wailing_caverns::GetData(uint32 uiType) const { - switch (uiType) - { - case TYPE_ANACONDRA: return m_auiEncounter[0]; break; - case TYPE_COBRAHN: return m_auiEncounter[1]; break; - case TYPE_PYTHAS: return m_auiEncounter[2]; break; - case TYPE_SERPENTIS: return m_auiEncounter[3]; break; - case TYPE_DISCIPLE: return m_auiEncounter[4]; break; - case TYPE_MUTANUS: return m_auiEncounter[5]; break; - } + if (uiType < MAX_ENCOUNTER) + return m_auiEncounter[uiType]; + return 0; } diff --git a/scripts/kalimdor/wailing_caverns/wailing_caverns.h b/scripts/kalimdor/wailing_caverns/wailing_caverns.h index 45f2b17b8..0512fdc42 100644 --- a/scripts/kalimdor/wailing_caverns/wailing_caverns.h +++ b/scripts/kalimdor/wailing_caverns/wailing_caverns.h @@ -39,9 +39,9 @@ class MANGOS_DLL_DECL instance_wailing_caverns : public ScriptedInstance void OnObjectCreate(GameObject* pGo) override; void SetData(uint32 uiType, uint32 uiData) override; - uint32 GetData(uint32 uiType) override; + uint32 GetData(uint32 uiType) const override; - const char* Save() override { return m_strInstData.c_str(); } + const char* Save() const override { return m_strInstData.c_str(); } void Load(const char* chrIn) override; protected: diff --git a/scripts/kalimdor/zulfarrak/instance_zulfarrak.cpp b/scripts/kalimdor/zulfarrak/instance_zulfarrak.cpp index e107be7a6..6f23145df 100644 --- a/scripts/kalimdor/zulfarrak/instance_zulfarrak.cpp +++ b/scripts/kalimdor/zulfarrak/instance_zulfarrak.cpp @@ -100,7 +100,7 @@ void instance_zulfarrak::Load(const char* chrIn) OUT_LOAD_INST_DATA_COMPLETE; } -uint32 instance_zulfarrak::GetData(uint32 uiType) +uint32 instance_zulfarrak::GetData(uint32 uiType) const { if (uiType < MAX_ENCOUNTER) return m_auiEncounter[uiType]; diff --git a/scripts/kalimdor/zulfarrak/zulfarrak.h b/scripts/kalimdor/zulfarrak/zulfarrak.h index 3d1842ebb..1c1c3f7a9 100644 --- a/scripts/kalimdor/zulfarrak/zulfarrak.h +++ b/scripts/kalimdor/zulfarrak/zulfarrak.h @@ -45,9 +45,9 @@ class MANGOS_DLL_DECL instance_zulfarrak : public ScriptedInstance void OnCreatureCreate(Creature* pCreature) override; void SetData(uint32 uiType, uint32 uiData) override; - uint32 GetData(uint32 uiType) override; + uint32 GetData(uint32 uiType) const override; - const char* Save() override { return m_strInstData.c_str(); } + const char* Save() const override { return m_strInstData.c_str(); } void Load(const char* chrIn) override; protected: diff --git a/scripts/northrend/azjol-nerub/ahnkahet/ahnkahet.h b/scripts/northrend/azjol-nerub/ahnkahet/ahnkahet.h index 95f5313b2..cd3ea8124 100644 --- a/scripts/northrend/azjol-nerub/ahnkahet/ahnkahet.h +++ b/scripts/northrend/azjol-nerub/ahnkahet/ahnkahet.h @@ -57,7 +57,7 @@ class MANGOS_DLL_DECL instance_ahnkahet : public ScriptedInstance void OnCreatureDeath(Creature* pCreature) override; void SetData(uint32 uiType, uint32 uiData) override; - uint32 GetData(uint32 uiType) override; + uint32 GetData(uint32 uiType) const override; ObjectGuid SelectRandomGuardianEggGuid(); ObjectGuid SelectRandomSwarmerEggGuid(); @@ -66,9 +66,9 @@ class MANGOS_DLL_DECL instance_ahnkahet : public ScriptedInstance void GetJedogaControllersList(GuidList& lList) { lList = m_lJedogaControllersGuidList; } void GetJedogaEventControllersList(GuidList& lList) {lList = m_lJedogaEventControllersGuidList; } - bool CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/) override; + bool CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/) const override; - const char* Save() override { return m_strInstData.c_str(); } + const char* Save() const override { return m_strInstData.c_str(); } void Load(const char* chrIn) override; private: diff --git a/scripts/northrend/azjol-nerub/ahnkahet/instance_ahnkahet.cpp b/scripts/northrend/azjol-nerub/ahnkahet/instance_ahnkahet.cpp index e56becc78..f114d3023 100644 --- a/scripts/northrend/azjol-nerub/ahnkahet/instance_ahnkahet.cpp +++ b/scripts/northrend/azjol-nerub/ahnkahet/instance_ahnkahet.cpp @@ -221,7 +221,7 @@ ObjectGuid instance_ahnkahet::SelectRandomSwarmerEggGuid() return *iter; } -bool instance_ahnkahet::CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/) +bool instance_ahnkahet::CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/) const { switch (uiCriteriaId) { @@ -257,7 +257,7 @@ void instance_ahnkahet::Load(const char* chrIn) OUT_LOAD_INST_DATA_COMPLETE; } -uint32 instance_ahnkahet::GetData(uint32 uiType) +uint32 instance_ahnkahet::GetData(uint32 uiType) const { if (uiType < MAX_ENCOUNTER) return m_auiEncounter[uiType]; diff --git a/scripts/northrend/azjol-nerub/azjol-nerub/azjol-nerub.h b/scripts/northrend/azjol-nerub/azjol-nerub/azjol-nerub.h index 6674ce01f..0d17b3e02 100644 --- a/scripts/northrend/azjol-nerub/azjol-nerub/azjol-nerub.h +++ b/scripts/northrend/azjol-nerub/azjol-nerub/azjol-nerub.h @@ -57,14 +57,14 @@ class MANGOS_DLL_DECL instance_azjol_nerub : public ScriptedInstance void SetData(uint32 uiType, uint32 uiData) override; - bool CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/) override; + bool CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/) const override; ObjectGuid GetRandomAssassinTrigger(); ObjectGuid GetGuardianTrigger() { return m_guardianSummonTarget; } ObjectGuid GetDarterTrigger() { return m_darterSummonTarget; } ObjectGuid GetAnubTrigger() { return m_anubSummonTarget; } - const char* Save() override { return m_strInstData.c_str(); } + const char* Save() const override { return m_strInstData.c_str(); } void Load(const char* chrIn) override; void Update(uint32 uiDiff) override; diff --git a/scripts/northrend/azjol-nerub/azjol-nerub/instance_azjol-nerub.cpp b/scripts/northrend/azjol-nerub/azjol-nerub/instance_azjol-nerub.cpp index 78fa5be76..9e7d126d7 100644 --- a/scripts/northrend/azjol-nerub/azjol-nerub/instance_azjol-nerub.cpp +++ b/scripts/northrend/azjol-nerub/azjol-nerub/instance_azjol-nerub.cpp @@ -241,7 +241,7 @@ void instance_azjol_nerub::SetData(uint32 uiType, uint32 uiData) } } -bool instance_azjol_nerub::CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/) +bool instance_azjol_nerub::CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/) const { if (uiCriteriaId == ACHIEV_CRITERIA_WATCH_DIE) return m_bWatchHimDie; diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp index e0139e601..2369d847c 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp @@ -348,7 +348,7 @@ void instance_trial_of_the_crusader::SetData(uint32 uiType, uint32 uiData) } } -uint32 instance_trial_of_the_crusader::GetData(uint32 uiType) +uint32 instance_trial_of_the_crusader::GetData(uint32 uiType) const { if (uiType < MAX_ENCOUNTER) return m_auiEncounter[uiType]; diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h index 0e2c49cd1..1ad0ce464 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h @@ -141,13 +141,13 @@ class MANGOS_DLL_DECL instance_trial_of_the_crusader : public ScriptedInstance, void OnPlayerEnter(Player* pPlayer) override; void SetData(uint32 uiType, uint32 uiData) override; - uint32 GetData(uint32 uiType) override; + uint32 GetData(uint32 uiType) const override; // Difficulty wrappers bool IsHeroicDifficulty() { return instance->GetDifficulty() == RAID_DIFFICULTY_10MAN_HEROIC || instance->GetDifficulty() == RAID_DIFFICULTY_25MAN_HEROIC; } bool Is25ManDifficulty() { return instance->GetDifficulty() == RAID_DIFFICULTY_25MAN_NORMAL || instance->GetDifficulty() == RAID_DIFFICULTY_25MAN_HEROIC; } - const char* Save() override { return m_strInstData.c_str(); } + const char* Save() const override { return m_strInstData.c_str(); } void Load(const char* chrIn) override; void Update(uint32 uiDiff) { DialogueUpdate(uiDiff); } diff --git a/scripts/northrend/draktharon_keep/draktharon_keep.h b/scripts/northrend/draktharon_keep/draktharon_keep.h index dd49f1f63..6ea281f4a 100644 --- a/scripts/northrend/draktharon_keep/draktharon_keep.h +++ b/scripts/northrend/draktharon_keep/draktharon_keep.h @@ -61,7 +61,7 @@ class MANGOS_DLL_DECL instance_draktharon_keep : public ScriptedInstance void Initialize() override; void SetData(uint32 uiType, uint32 uiData) override; - uint32 GetData(uint32 uiType) override; + uint32 GetData(uint32 uiType) const override; void OnCreatureEnterCombat(Creature* pCreature) override; void OnCreatureEvade(Creature* pCreature); @@ -73,9 +73,9 @@ class MANGOS_DLL_DECL instance_draktharon_keep : public ScriptedInstance void GetTrollgoreOutsideTriggers(GuidVector& vTriggers) { vTriggers = m_vTriggerGuids; } ObjectGuid GetTrollgoreCornerTrigger() { return m_trollgoreCornerTriggerGuid; } - bool CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/) override; + bool CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/) const override; - const char* Save() override { return m_strInstData.c_str(); } + const char* Save() const override { return m_strInstData.c_str(); } void Load(const char* chrIn) override; Creature* GetNextCrystalTarget(Creature* pCrystalHandler, uint8& uiIndex); diff --git a/scripts/northrend/draktharon_keep/instance_draktharon_keep.cpp b/scripts/northrend/draktharon_keep/instance_draktharon_keep.cpp index 943ff32cd..dd51e3f90 100644 --- a/scripts/northrend/draktharon_keep/instance_draktharon_keep.cpp +++ b/scripts/northrend/draktharon_keep/instance_draktharon_keep.cpp @@ -211,7 +211,7 @@ Creature* instance_draktharon_keep::GetSummonDummy() return instance->GetCreature(m_vSummonDummyGuids[urand(0, m_vSummonDummyGuids.size() - 1)]); } -bool instance_draktharon_keep::CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/) +bool instance_draktharon_keep::CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/) const { switch (uiCriteriaId) { @@ -320,7 +320,7 @@ void instance_draktharon_keep::Load(const char* chrIn) OUT_LOAD_INST_DATA_COMPLETE; } -uint32 instance_draktharon_keep::GetData(uint32 uiType) +uint32 instance_draktharon_keep::GetData(uint32 uiType) const { switch (uiType) { diff --git a/scripts/northrend/gundrak/gundrak.h b/scripts/northrend/gundrak/gundrak.h index c8ecc69bf..bd2e15a96 100644 --- a/scripts/northrend/gundrak/gundrak.h +++ b/scripts/northrend/gundrak/gundrak.h @@ -83,13 +83,13 @@ class MANGOS_DLL_DECL instance_gundrak : public ScriptedInstance void OnCreatureEnterCombat(Creature* pCreature) override; void SetData(uint32 uiType, uint32 uiData) override; - uint32 GetData(uint32 uiType) override; + uint32 GetData(uint32 uiType) const override; - const char* Save() override { return m_strInstData.c_str(); } + const char* Save() const override { return m_strInstData.c_str(); } void Load(const char* chrIn) override; void SetLessRabiAchievementCriteria(bool bIsMet) { m_bLessRabi = bIsMet; } - bool CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/) override; + bool CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/) const override; void Update(uint32 uiDiff) override; diff --git a/scripts/northrend/gundrak/instance_gundrak.cpp b/scripts/northrend/gundrak/instance_gundrak.cpp index b7be8a357..990e4628f 100644 --- a/scripts/northrend/gundrak/instance_gundrak.cpp +++ b/scripts/northrend/gundrak/instance_gundrak.cpp @@ -261,7 +261,7 @@ void instance_gundrak::SetData(uint32 uiType, uint32 uiData) } } -uint32 instance_gundrak::GetData(uint32 uiType) +uint32 instance_gundrak::GetData(uint32 uiType) const { if (uiType < MAX_ENCOUNTER) return m_auiEncounter[uiType]; @@ -269,7 +269,7 @@ uint32 instance_gundrak::GetData(uint32 uiType) return 0; } -bool instance_gundrak::CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/) +bool instance_gundrak::CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/) const { switch (uiCriteriaId) { diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/forge_of_souls.h b/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/forge_of_souls.h index 577a3b64b..a835d49f3 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/forge_of_souls.h +++ b/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/forge_of_souls.h @@ -99,14 +99,14 @@ class MANGOS_DLL_DECL instance_forge_of_souls : public ScriptedInstance void OnCreatureCreate(Creature* pCreature) override; void SetData(uint32 uiType, uint32 uiData) override; - uint32 GetData(uint32 uiType) override; + uint32 GetData(uint32 uiType) const override; void SetData64(uint32 uiType, uint64 uiData) override; void OnPlayerEnter(Player* pPlayer) override; void ProcessEventNpcs(Player* pPlayer, bool bChanged); - bool CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/) override; + bool CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/) const override; - const char* Save() override { return m_strInstData.c_str(); } + const char* Save() const override { return m_strInstData.c_str(); } void Load(const char* chrIn) override; protected: diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/instance_forge_of_souls.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/instance_forge_of_souls.cpp index bc34d0bcd..689ed3061 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/instance_forge_of_souls.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/instance_forge_of_souls.cpp @@ -105,7 +105,7 @@ void instance_forge_of_souls::ProcessEventNpcs(Player* pPlayer, bool bChanged) } } -bool instance_forge_of_souls::CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/) +bool instance_forge_of_souls::CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/) const { switch (uiCriteriaId) { @@ -179,7 +179,7 @@ void instance_forge_of_souls::Load(const char* chrIn) OUT_LOAD_INST_DATA_COMPLETE; } -uint32 instance_forge_of_souls::GetData(uint32 uiType) +uint32 instance_forge_of_souls::GetData(uint32 uiType) const { switch (uiType) { diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/instance_pit_of_saron.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/instance_pit_of_saron.cpp index ccafa7ddb..dfbbf2153 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/instance_pit_of_saron.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/instance_pit_of_saron.cpp @@ -123,7 +123,7 @@ void instance_pit_of_saron::Load(const char* chrIn) OUT_LOAD_INST_DATA_COMPLETE; } -uint32 instance_pit_of_saron::GetData(uint32 uiType) +uint32 instance_pit_of_saron::GetData(uint32 uiType) const { if (uiType < MAX_ENCOUNTER) return m_auiEncounter[uiType]; diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/pit_of_saron.h b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/pit_of_saron.h index 5af015bc4..a3ba144ec 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/pit_of_saron.h +++ b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/pit_of_saron.h @@ -50,9 +50,9 @@ class MANGOS_DLL_DECL instance_pit_of_saron : public ScriptedInstance void OnObjectCreate(GameObject* pGo) override; void SetData(uint32 uiType, uint32 uiData) override; - uint32 GetData(uint32 uiType) override; + uint32 GetData(uint32 uiType) const override; - const char* Save() override { return m_strInstData.c_str(); } + const char* Save() const override { return m_strInstData.c_str(); } void Load(const char* chrIn) override; protected: diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_citadel.h b/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_citadel.h index afe553f69..ca0d3d14d 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_citadel.h +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_citadel.h @@ -217,9 +217,9 @@ class MANGOS_DLL_DECL instance_icecrown_citadel : public ScriptedInstance, priva void OnCreatureDeath(Creature* pCreature) override; void SetData(uint32 uiType, uint32 uiData) override; - uint32 GetData(uint32 uiType) override; + uint32 GetData(uint32 uiType) const override; - const char* Save() override { return m_strInstData.c_str(); } + const char* Save() const override { return m_strInstData.c_str(); } void Load(const char* strIn) override; void DoHandleCitadelAreaTrigger(uint32 uiTriggerId, Player* pPlayer); @@ -233,7 +233,7 @@ class MANGOS_DLL_DECL instance_icecrown_citadel : public ScriptedInstance, priva // Open Putricide door in a few seconds void DoPreparePutricideDoor() { m_uiPutricideValveTimer = 15000; } - bool CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget = NULL, uint32 uiMiscvalue1 = 0) override; + bool CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget = NULL, uint32 uiMiscvalue1 = 0) const override; void Update(uint32 uiDiff) override; diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_citadel.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_citadel.cpp index efcd76dfc..64e0c3d95 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_citadel.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_citadel.cpp @@ -412,7 +412,7 @@ void instance_icecrown_citadel::SetData(uint32 uiType, uint32 uiData) } } -uint32 instance_icecrown_citadel::GetData(uint32 uiType) +uint32 instance_icecrown_citadel::GetData(uint32 uiType) const { if (uiType < MAX_ENCOUNTER) return m_auiEncounter[uiType]; @@ -420,7 +420,7 @@ uint32 instance_icecrown_citadel::GetData(uint32 uiType) return 0; } -bool instance_icecrown_citadel::CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscvalue1) +bool instance_icecrown_citadel::CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscvalue1) const { // ToDo: return false; diff --git a/scripts/northrend/naxxramas/instance_naxxramas.cpp b/scripts/northrend/naxxramas/instance_naxxramas.cpp index f0afa1cb1..2f7456312 100644 --- a/scripts/northrend/naxxramas/instance_naxxramas.cpp +++ b/scripts/northrend/naxxramas/instance_naxxramas.cpp @@ -496,7 +496,7 @@ void instance_naxxramas::Load(const char* chrIn) OUT_LOAD_INST_DATA_COMPLETE; } -uint32 instance_naxxramas::GetData(uint32 uiType) +uint32 instance_naxxramas::GetData(uint32 uiType) const { if (uiType < MAX_ENCOUNTER) return m_auiEncounter[uiType]; @@ -510,7 +510,7 @@ void instance_naxxramas::SetSpecialAchievementCriteria(uint32 uiType, bool bIsMe m_abAchievCriteria[uiType] = bIsMet; } -bool instance_naxxramas::CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/) +bool instance_naxxramas::CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/) const { switch (uiCriteriaId) { diff --git a/scripts/northrend/naxxramas/naxxramas.h b/scripts/northrend/naxxramas/naxxramas.h index d114eb5d8..135509b02 100644 --- a/scripts/northrend/naxxramas/naxxramas.h +++ b/scripts/northrend/naxxramas/naxxramas.h @@ -219,12 +219,12 @@ class MANGOS_DLL_DECL instance_naxxramas : public ScriptedInstance void OnCreatureDeath(Creature* pCreature) override; void SetData(uint32 uiType, uint32 uiData) override; - uint32 GetData(uint32 uiType) override; + uint32 GetData(uint32 uiType) const override; void SetSpecialAchievementCriteria(uint32 uiType, bool bIsMet); - bool CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/) override; + bool CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/) const override; - const char* Save() override { return m_strInstData.c_str(); } + const char* Save() const override { return m_strInstData.c_str(); } void Load(const char* chrIn) override; void Update(uint32 uiDiff) override; diff --git a/scripts/northrend/nexus/nexus/instance_nexus.cpp b/scripts/northrend/nexus/nexus/instance_nexus.cpp index 5951d92a0..c7ad67610 100644 --- a/scripts/northrend/nexus/nexus/instance_nexus.cpp +++ b/scripts/northrend/nexus/nexus/instance_nexus.cpp @@ -84,7 +84,7 @@ void instance_nexus::OnCreatureCreate(Creature* pCreature) m_mNpcEntryGuidStore[NPC_KERISTRASZA] = pCreature->GetObjectGuid(); } -uint32 instance_nexus::GetData(uint32 uiType) +uint32 instance_nexus::GetData(uint32 uiType) const { if (uiType < MAX_ENCOUNTER) return m_auiEncounter[uiType]; @@ -163,7 +163,7 @@ void instance_nexus::SetSpecialAchievementCriteria(uint32 uiType, bool bIsMet) m_abAchievCriteria[uiType] = bIsMet; } -bool instance_nexus::CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/) +bool instance_nexus::CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/) const { switch (uiCriteriaId) { diff --git a/scripts/northrend/nexus/nexus/nexus.h b/scripts/northrend/nexus/nexus/nexus.h index 6038e5fa7..3aa8398ad 100644 --- a/scripts/northrend/nexus/nexus/nexus.h +++ b/scripts/northrend/nexus/nexus/nexus.h @@ -45,13 +45,13 @@ class MANGOS_DLL_DECL instance_nexus : public ScriptedInstance void OnObjectCreate(GameObject* pGo) override; void OnCreatureCreate(Creature* pCreature) override; - uint32 GetData(uint32 uiType) override; + uint32 GetData(uint32 uiType) const override; void SetData(uint32 uiType, uint32 uiData) override; void SetSpecialAchievementCriteria(uint32 uiType, bool bIsMet); - bool CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/) override; + bool CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/) const override; - const char* Save() override { return m_strInstData.c_str(); } + const char* Save() const override { return m_strInstData.c_str(); } void Load(const char* chrIn) override; diff --git a/scripts/northrend/nexus/oculus/instance_oculus.cpp b/scripts/northrend/nexus/oculus/instance_oculus.cpp index cab4f7022..b46fb1092 100644 --- a/scripts/northrend/nexus/oculus/instance_oculus.cpp +++ b/scripts/northrend/nexus/oculus/instance_oculus.cpp @@ -127,7 +127,7 @@ void instance_oculus::SetData(uint32 uiType, uint32 uiData) } } -uint32 instance_oculus::GetData(uint32 uiType) +uint32 instance_oculus::GetData(uint32 uiType) const { if (uiType < MAX_ENCOUNTER) return m_auiEncounter[uiType]; diff --git a/scripts/northrend/nexus/oculus/oculus.h b/scripts/northrend/nexus/oculus/oculus.h index bcc58f4c4..fadba36e1 100644 --- a/scripts/northrend/nexus/oculus/oculus.h +++ b/scripts/northrend/nexus/oculus/oculus.h @@ -76,9 +76,9 @@ class MANGOS_DLL_DECL instance_oculus : public ScriptedInstance void OnCreatureDeath(Creature* pCreature) override; void SetData(uint32 uiType, uint32 uiData) override; - uint32 GetData(uint32 uiType) override; + uint32 GetData(uint32 uiType) const override; - const char* Save() override { return strInstData.c_str(); } + const char* Save() const override { return strInstData.c_str(); } void Load(const char* chrIn) override; protected: diff --git a/scripts/northrend/obsidian_sanctum/instance_obsidian_sanctum.cpp b/scripts/northrend/obsidian_sanctum/instance_obsidian_sanctum.cpp index 2874b11f8..36b627194 100644 --- a/scripts/northrend/obsidian_sanctum/instance_obsidian_sanctum.cpp +++ b/scripts/northrend/obsidian_sanctum/instance_obsidian_sanctum.cpp @@ -65,7 +65,7 @@ void instance_obsidian_sanctum::SetData(uint32 uiType, uint32 uiData) // No need to save anything here } -uint32 instance_obsidian_sanctum::GetData(uint32 uiType) +uint32 instance_obsidian_sanctum::GetData(uint32 uiType) const { if (uiType == TYPE_SARTHARION_EVENT) return m_auiEncounter[0]; @@ -73,7 +73,7 @@ uint32 instance_obsidian_sanctum::GetData(uint32 uiType) return 0; } -bool instance_obsidian_sanctum::CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/) +bool instance_obsidian_sanctum::CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/) const { switch (uiCriteriaId) { @@ -91,7 +91,7 @@ bool instance_obsidian_sanctum::CheckAchievementCriteriaMeet(uint32 uiCriteriaId } } -bool instance_obsidian_sanctum::CheckConditionCriteriaMeet(Player const* pPlayer, uint32 uiInstanceConditionId, WorldObject const* pConditionSource, ConditionSource conditionSourceType) +bool instance_obsidian_sanctum::CheckConditionCriteriaMeet(Player const* pPlayer, uint32 uiInstanceConditionId, WorldObject const* pConditionSource, uint32 conditionSourceType) const { switch (uiInstanceConditionId) { diff --git a/scripts/northrend/obsidian_sanctum/obsidian_sanctum.h b/scripts/northrend/obsidian_sanctum/obsidian_sanctum.h index fba7a7a11..ae5df5df1 100644 --- a/scripts/northrend/obsidian_sanctum/obsidian_sanctum.h +++ b/scripts/northrend/obsidian_sanctum/obsidian_sanctum.h @@ -41,10 +41,10 @@ class MANGOS_DLL_DECL instance_obsidian_sanctum : public ScriptedInstance void OnCreatureCreate(Creature* pCreature) override; void SetData(uint32 uiType, uint32 uiData) override; - uint32 GetData(uint32 uiType) override; + uint32 GetData(uint32 uiType) const override; - bool CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/) override; - bool CheckConditionCriteriaMeet(Player const* pPlayer, uint32 uiInstanceConditionId, WorldObject const* pConditionSource, ConditionSource conditionSourceType) override; + bool CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/) const override; + bool CheckConditionCriteriaMeet(Player const* pPlayer, uint32 uiInstanceConditionId, WorldObject const* pConditionSource, uint32 conditionSourceType) const override; private: uint32 m_auiEncounter[MAX_ENCOUNTER]; diff --git a/scripts/northrend/ruby_sanctum/instance_ruby_sanctum.cpp b/scripts/northrend/ruby_sanctum/instance_ruby_sanctum.cpp index 90bdf4bb6..f22041ea4 100644 --- a/scripts/northrend/ruby_sanctum/instance_ruby_sanctum.cpp +++ b/scripts/northrend/ruby_sanctum/instance_ruby_sanctum.cpp @@ -157,7 +157,7 @@ void instance_ruby_sanctum::SetData(uint32 uiType, uint32 uiData) } } -uint32 instance_ruby_sanctum::GetData(uint32 uiType) +uint32 instance_ruby_sanctum::GetData(uint32 uiType) const { if (uiType < MAX_ENCOUNTER) return m_auiEncounter[uiType]; diff --git a/scripts/northrend/ruby_sanctum/ruby_sanctum.h b/scripts/northrend/ruby_sanctum/ruby_sanctum.h index 740590d5c..910c7b003 100644 --- a/scripts/northrend/ruby_sanctum/ruby_sanctum.h +++ b/scripts/northrend/ruby_sanctum/ruby_sanctum.h @@ -67,11 +67,11 @@ class MANGOS_DLL_DECL instance_ruby_sanctum : public ScriptedInstance void OnObjectCreate(GameObject* pGo) override; void SetData(uint32 uiType, uint32 uiData) override; - uint32 GetData(uint32 uiType) override; + uint32 GetData(uint32 uiType) const override; void Update(uint32 uiDiff) override; - const char* Save() override { return strInstData.c_str(); } + const char* Save() const override { return strInstData.c_str(); } void Load(const char* chrIn) override; protected: diff --git a/scripts/northrend/ulduar/halls_of_lightning/halls_of_lightning.h b/scripts/northrend/ulduar/halls_of_lightning/halls_of_lightning.h index 49dddba04..085ce66eb 100644 --- a/scripts/northrend/ulduar/halls_of_lightning/halls_of_lightning.h +++ b/scripts/northrend/ulduar/halls_of_lightning/halls_of_lightning.h @@ -41,11 +41,11 @@ class MANGOS_DLL_DECL instance_halls_of_lightning : public ScriptedInstance void OnObjectCreate(GameObject* pGo) override; void SetData(uint32 uiType, uint32 uiData) override; - uint32 GetData(uint32 uiType) override; + uint32 GetData(uint32 uiType) const override; - bool CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/) override; + bool CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/) const override; - const char* Save() override { return m_strInstData.c_str(); } + const char* Save() const override { return m_strInstData.c_str(); } void Load(const char* chrIn) override; private: diff --git a/scripts/northrend/ulduar/halls_of_lightning/instance_halls_of_lightning.cpp b/scripts/northrend/ulduar/halls_of_lightning/instance_halls_of_lightning.cpp index 2f5c20646..45bf81c9d 100644 --- a/scripts/northrend/ulduar/halls_of_lightning/instance_halls_of_lightning.cpp +++ b/scripts/northrend/ulduar/halls_of_lightning/instance_halls_of_lightning.cpp @@ -123,7 +123,7 @@ void instance_halls_of_lightning::SetData(uint32 uiType, uint32 uiData) } } -uint32 instance_halls_of_lightning::GetData(uint32 uiType) +uint32 instance_halls_of_lightning::GetData(uint32 uiType) const { if (uiType < MAX_ENCOUNTER) return m_auiEncounter[uiType]; @@ -131,7 +131,7 @@ uint32 instance_halls_of_lightning::GetData(uint32 uiType) return 0; } -bool instance_halls_of_lightning::CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/) +bool instance_halls_of_lightning::CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/) const { if (uiCriteriaId == ACHIEV_CRIT_RESISTANT) return m_bIsShatterResistant; diff --git a/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.h b/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.h index be2e0cc26..9c8a55118 100644 --- a/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.h +++ b/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.h @@ -70,9 +70,9 @@ class MANGOS_DLL_DECL instance_halls_of_stone : public ScriptedInstance void OnObjectCreate(GameObject* pGo) override; void SetData(uint32 uiType, uint32 uiData) override; - uint32 GetData(uint32 uiType) override; + uint32 GetData(uint32 uiType) const override; - const char* Save() override { return m_strInstData.c_str(); } + const char* Save() const override { return m_strInstData.c_str(); } void Load(const char* chrIn) override; void Update(uint32 uiDiff) override; diff --git a/scripts/northrend/ulduar/halls_of_stone/instance_halls_of_stone.cpp b/scripts/northrend/ulduar/halls_of_stone/instance_halls_of_stone.cpp index ea7f416ac..387cb287b 100644 --- a/scripts/northrend/ulduar/halls_of_stone/instance_halls_of_stone.cpp +++ b/scripts/northrend/ulduar/halls_of_stone/instance_halls_of_stone.cpp @@ -166,7 +166,7 @@ void instance_halls_of_stone::SetData(uint32 uiType, uint32 uiData) } } -uint32 instance_halls_of_stone::GetData(uint32 uiType) +uint32 instance_halls_of_stone::GetData(uint32 uiType) const { if (uiType < MAX_ENCOUNTER) return m_auiEncounter[uiType]; diff --git a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp index 8e400fbb9..548a5cf16 100644 --- a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp +++ b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp @@ -454,7 +454,7 @@ void instance_ulduar::SetData(uint32 uiType, uint32 uiData) } // TODO: implement all hard mode loot here! -bool instance_ulduar::CheckConditionCriteriaMeet(Player const* pPlayer, uint32 uiInstanceConditionId, WorldObject const* pConditionSource, ConditionSource conditionSourceType) +bool instance_ulduar::CheckConditionCriteriaMeet(Player const* pPlayer, uint32 uiInstanceConditionId, WorldObject const* pConditionSource, uint32 conditionSourceType) const { switch (uiInstanceConditionId) { @@ -467,7 +467,7 @@ bool instance_ulduar::CheckConditionCriteriaMeet(Player const* pPlayer, uint32 u return false; } -uint32 instance_ulduar::GetData(uint32 uiType) +uint32 instance_ulduar::GetData(uint32 uiType) const { switch (uiType) { @@ -589,7 +589,7 @@ void instance_ulduar::SetSpecialAchievementCriteria(uint32 uiType, bool bIsMet) m_abAchievCriteria[uiType] = bIsMet; } -bool instance_ulduar::CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/) +bool instance_ulduar::CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/) const { switch (uiCriteriaId) { diff --git a/scripts/northrend/ulduar/ulduar/ulduar.h b/scripts/northrend/ulduar/ulduar/ulduar.h index 9471e1d07..c44bb6213 100644 --- a/scripts/northrend/ulduar/ulduar/ulduar.h +++ b/scripts/northrend/ulduar/ulduar/ulduar.h @@ -234,15 +234,15 @@ class MANGOS_DLL_DECL instance_ulduar : public ScriptedInstance void OnObjectCreate(GameObject* pGo) override; void SetData(uint32 uiType, uint32 uiData) override; - uint32 GetData(uint32 uiType) override; + uint32 GetData(uint32 uiType) const override; - const char* Save() override { return m_strInstData.c_str(); } + const char* Save() const override { return m_strInstData.c_str(); } void Load(const char* chrIn) override; void SetSpecialAchievementCriteria(uint32 uiType, bool bIsMet); - bool CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/) override; + bool CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/) const override; // Dummy, leave till correct solution for hardmode found - bool CheckConditionCriteriaMeet(Player const* pPlayer, uint32 uiInstanceConditionId, WorldObject const* pConditionSource, ConditionSource conditionSourceType) override; + bool CheckConditionCriteriaMeet(Player const* pPlayer, uint32 uiInstanceConditionId, WorldObject const* pConditionSource, uint32 conditionSourceType) const override; void DoOpenMadnessDoorIfCan(); diff --git a/scripts/northrend/utgarde_keep/utgarde_keep/instance_utgarde_keep.cpp b/scripts/northrend/utgarde_keep/utgarde_keep/instance_utgarde_keep.cpp index 8ce19c7cf..6315fd9f1 100644 --- a/scripts/northrend/utgarde_keep/utgarde_keep/instance_utgarde_keep.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_keep/instance_utgarde_keep.cpp @@ -128,7 +128,7 @@ void instance_utgarde_keep::SetData(uint32 uiType, uint32 uiData) } } -uint32 instance_utgarde_keep::GetData(uint32 uiType) +uint32 instance_utgarde_keep::GetData(uint32 uiType) const { if (uiType < MAX_ENCOUNTER) return m_auiEncounter[uiType]; @@ -158,7 +158,7 @@ void instance_utgarde_keep::Load(const char* chrIn) OUT_LOAD_INST_DATA_COMPLETE; } -bool instance_utgarde_keep::CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/) +bool instance_utgarde_keep::CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/) const { if (uiCriteriaId == ACHIEV_CRIT_ON_THE_ROCKS) return !m_bKelesethAchievFailed; diff --git a/scripts/northrend/utgarde_keep/utgarde_keep/utgarde_keep.h b/scripts/northrend/utgarde_keep/utgarde_keep/utgarde_keep.h index 323c355a2..4df88d631 100644 --- a/scripts/northrend/utgarde_keep/utgarde_keep/utgarde_keep.h +++ b/scripts/northrend/utgarde_keep/utgarde_keep/utgarde_keep.h @@ -47,12 +47,12 @@ class MANGOS_DLL_DECL instance_utgarde_keep : public ScriptedInstance void OnCreatureDeath(Creature* pCreature) override; void SetData(uint32 uiType, uint32 uiData) override; - uint32 GetData(uint32 uiType) override; + uint32 GetData(uint32 uiType) const override; - const char* Save() override { return m_strInstData.c_str(); } + const char* Save() const override { return m_strInstData.c_str(); } void Load(const char* chrIn) override; - bool CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/) override; + bool CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/) const override; protected: uint32 m_auiEncounter[MAX_ENCOUNTER]; diff --git a/scripts/northrend/utgarde_keep/utgarde_pinnacle/instance_utgarde_pinnacle.cpp b/scripts/northrend/utgarde_keep/utgarde_pinnacle/instance_utgarde_pinnacle.cpp index aeae7d1fd..4b664be0b 100644 --- a/scripts/northrend/utgarde_keep/utgarde_pinnacle/instance_utgarde_pinnacle.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_pinnacle/instance_utgarde_pinnacle.cpp @@ -163,7 +163,7 @@ void instance_pinnacle::SetData(uint32 uiType, uint32 uiData) } } -uint32 instance_pinnacle::GetData(uint32 uiType) +uint32 instance_pinnacle::GetData(uint32 uiType) const { if (uiType < MAX_ENCOUNTER) return m_auiEncounter[uiType]; @@ -199,7 +199,7 @@ void instance_pinnacle::SetSpecialAchievementCriteria(uint32 uiType, bool bIsMet m_abAchievCriteria[uiType] = bIsMet; } -bool instance_pinnacle::CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/) +bool instance_pinnacle::CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/) const { switch (uiCriteriaId) { diff --git a/scripts/northrend/utgarde_keep/utgarde_pinnacle/utgarde_pinnacle.h b/scripts/northrend/utgarde_keep/utgarde_pinnacle/utgarde_pinnacle.h index 99a5f1340..7b45d82ee 100644 --- a/scripts/northrend/utgarde_keep/utgarde_pinnacle/utgarde_pinnacle.h +++ b/scripts/northrend/utgarde_keep/utgarde_pinnacle/utgarde_pinnacle.h @@ -70,15 +70,15 @@ class MANGOS_DLL_DECL instance_pinnacle : public ScriptedInstance void OnCreatureDeath(Creature* pCreature) override; void SetData(uint32 uiType, uint32 uiData) override; - uint32 GetData(uint32 uiType) override; + uint32 GetData(uint32 uiType) const override; void SetSpecialAchievementCriteria(uint32 uiType, bool bIsMet); - bool CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/) override; + bool CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/) const override; void SetGortokEventStarter(ObjectGuid playerGuid) { m_gortokEventStarterGuid = playerGuid; } ObjectGuid GetGortokEventStarter() { return m_gortokEventStarterGuid; } - const char* Save() override { return m_strInstData.c_str(); } + const char* Save() const override { return m_strInstData.c_str(); } void Load(const char* chrIn) override; void Update(uint32 uiDiff) override; diff --git a/scripts/northrend/violet_hold/instance_violet_hold.cpp b/scripts/northrend/violet_hold/instance_violet_hold.cpp index 1b68898bf..e012ede05 100644 --- a/scripts/northrend/violet_hold/instance_violet_hold.cpp +++ b/scripts/northrend/violet_hold/instance_violet_hold.cpp @@ -360,7 +360,7 @@ void instance_violet_hold::SetData(uint32 uiType, uint32 uiData) } } -uint32 instance_violet_hold::GetData(uint32 uiType) +uint32 instance_violet_hold::GetData(uint32 uiType) const { if (uiType < MAX_ENCOUNTER) return m_auiEncounter[uiType]; @@ -538,7 +538,7 @@ void instance_violet_hold::ProcessActivationCrystal(Unit* pUser, bool bIsIntro) // else, kill (and despawn?) certain trash mobs. Also boss affected, but not killed. } -bool instance_violet_hold::CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/) +bool instance_violet_hold::CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/) const { switch (uiCriteriaId) { diff --git a/scripts/northrend/violet_hold/violet_hold.h b/scripts/northrend/violet_hold/violet_hold.h index 5201a4e84..850884b19 100644 --- a/scripts/northrend/violet_hold/violet_hold.h +++ b/scripts/northrend/violet_hold/violet_hold.h @@ -233,11 +233,11 @@ class MANGOS_DLL_DECL instance_violet_hold : public ScriptedInstance void OnCreatureDeath(Creature* pCreature) override; void SetData(uint32 uiType, uint32 uiData) override; - uint32 GetData(uint32 uiType) override; + uint32 GetData(uint32 uiType) const override; - bool CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/) override; + bool CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/) const override; - const char* Save() override { return m_strInstData.c_str(); } + const char* Save() const override { return m_strInstData.c_str(); } void Load(const char* chrIn) override; void Update(uint32 uiDiff) override; diff --git a/scripts/outland/auchindoun/sethekk_halls/instance_sethekk_halls.cpp b/scripts/outland/auchindoun/sethekk_halls/instance_sethekk_halls.cpp index 8f15a7e02..1a37effb9 100644 --- a/scripts/outland/auchindoun/sethekk_halls/instance_sethekk_halls.cpp +++ b/scripts/outland/auchindoun/sethekk_halls/instance_sethekk_halls.cpp @@ -103,7 +103,7 @@ void instance_sethekk_halls::SetData(uint32 uiType, uint32 uiData) } } -uint32 instance_sethekk_halls::GetData(uint32 uiType) +uint32 instance_sethekk_halls::GetData(uint32 uiType) const { if (uiType < MAX_ENCOUNTER) return m_auiEncounter[uiType]; @@ -133,7 +133,7 @@ void instance_sethekk_halls::Load(const char* chrIn) OUT_LOAD_INST_DATA_COMPLETE; } -bool instance_sethekk_halls::CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/) +bool instance_sethekk_halls::CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/) const { if (uiCriteriaId != ACHIEV_CRITA_TURKEY_TIME) return false; diff --git a/scripts/outland/auchindoun/sethekk_halls/sethekk_halls.h b/scripts/outland/auchindoun/sethekk_halls/sethekk_halls.h index 8683528fd..d9d5ad3e0 100644 --- a/scripts/outland/auchindoun/sethekk_halls/sethekk_halls.h +++ b/scripts/outland/auchindoun/sethekk_halls/sethekk_halls.h @@ -47,11 +47,11 @@ class MANGOS_DLL_DECL instance_sethekk_halls : public ScriptedInstance void OnObjectCreate(GameObject* pGo) override; void SetData(uint32 uiType, uint32 uiData) override; - uint32 GetData(uint32 uiType) override; + uint32 GetData(uint32 uiType) const override; - bool CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/) override; + bool CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/) const override; - const char* Save() override { return m_strInstData.c_str(); } + const char* Save() const override { return m_strInstData.c_str(); } void Load(const char* chrIn) override; private: diff --git a/scripts/outland/auchindoun/shadow_labyrinth/instance_shadow_labyrinth.cpp b/scripts/outland/auchindoun/shadow_labyrinth/instance_shadow_labyrinth.cpp index b1772eebc..e112eff76 100644 --- a/scripts/outland/auchindoun/shadow_labyrinth/instance_shadow_labyrinth.cpp +++ b/scripts/outland/auchindoun/shadow_labyrinth/instance_shadow_labyrinth.cpp @@ -151,7 +151,7 @@ void instance_shadow_labyrinth::SetData(uint32 uiType, uint32 uiData) } } -uint32 instance_shadow_labyrinth::GetData(uint32 uiType) +uint32 instance_shadow_labyrinth::GetData(uint32 uiType) const { switch (uiType) { diff --git a/scripts/outland/auchindoun/shadow_labyrinth/shadow_labyrinth.h b/scripts/outland/auchindoun/shadow_labyrinth/shadow_labyrinth.h index 52b35e8ba..f0deeba24 100644 --- a/scripts/outland/auchindoun/shadow_labyrinth/shadow_labyrinth.h +++ b/scripts/outland/auchindoun/shadow_labyrinth/shadow_labyrinth.h @@ -38,9 +38,9 @@ class MANGOS_DLL_DECL instance_shadow_labyrinth : public ScriptedInstance void OnCreatureCreate(Creature* pCreature) override; void SetData(uint32 uiType, uint32 uiData) override; - uint32 GetData(uint32 uiType) override; + uint32 GetData(uint32 uiType) const override; - const char* Save() override { return m_strInstData.c_str(); } + const char* Save() const override { return m_strInstData.c_str(); } void Load(const char* chrIn) override; private: diff --git a/scripts/outland/black_temple/black_temple.h b/scripts/outland/black_temple/black_temple.h index dbe4f8edd..835d20c73 100644 --- a/scripts/outland/black_temple/black_temple.h +++ b/scripts/outland/black_temple/black_temple.h @@ -69,13 +69,13 @@ class MANGOS_DLL_DECL instance_black_temple : public ScriptedInstance void OnObjectCreate(GameObject* pGo) override; void SetData(uint32 uiType, uint32 uiData) override; - uint32 GetData(uint32 uiType) override; + uint32 GetData(uint32 uiType) const override; void GetChannelersGuidList(GuidList& lList) { lList = m_lChannelersGuidList; } void GetGeneratorGuidVector(GuidVector& vVector) { vVector = m_vCreatureGeneratorGuidVector; } void GetGlaiveTargetGuidVector(GuidVector& vVector) { vVector = m_vGlaiveTargetGuidVector; } - const char* Save() override { return m_strInstData.c_str(); } + const char* Save() const override { return m_strInstData.c_str(); } void Load(const char* chrIn) override; private: diff --git a/scripts/outland/black_temple/instance_black_temple.cpp b/scripts/outland/black_temple/instance_black_temple.cpp index 9aef178c9..7a8c3eaa1 100644 --- a/scripts/outland/black_temple/instance_black_temple.cpp +++ b/scripts/outland/black_temple/instance_black_temple.cpp @@ -238,7 +238,7 @@ void instance_black_temple::SetData(uint32 uiType, uint32 uiData) } } -uint32 instance_black_temple::GetData(uint32 uiType) +uint32 instance_black_temple::GetData(uint32 uiType) const { if (uiType < MAX_ENCOUNTER) return m_auiEncounter[uiType]; diff --git a/scripts/outland/coilfang_reservoir/serpent_shrine/instance_serpent_shrine.cpp b/scripts/outland/coilfang_reservoir/serpent_shrine/instance_serpent_shrine.cpp index 73846ce8e..af396d4fc 100644 --- a/scripts/outland/coilfang_reservoir/serpent_shrine/instance_serpent_shrine.cpp +++ b/scripts/outland/coilfang_reservoir/serpent_shrine/instance_serpent_shrine.cpp @@ -174,7 +174,7 @@ void instance_serpentshrine_cavern::Load(const char* chrIn) OUT_LOAD_INST_DATA_COMPLETE; } -uint32 instance_serpentshrine_cavern::GetData(uint32 uiType) +uint32 instance_serpentshrine_cavern::GetData(uint32 uiType) const { if (uiType < MAX_ENCOUNTER) return m_auiEncounter[uiType]; diff --git a/scripts/outland/coilfang_reservoir/serpent_shrine/serpent_shrine.h b/scripts/outland/coilfang_reservoir/serpent_shrine/serpent_shrine.h index e62513782..a42c8e14d 100644 --- a/scripts/outland/coilfang_reservoir/serpent_shrine/serpent_shrine.h +++ b/scripts/outland/coilfang_reservoir/serpent_shrine/serpent_shrine.h @@ -60,12 +60,12 @@ class MANGOS_DLL_DECL instance_serpentshrine_cavern : public ScriptedInstance void OnObjectCreate(GameObject* pGo) override; void SetData(uint32 uiType, uint32 uiData) override; - uint32 GetData(uint32 uiType) override; + uint32 GetData(uint32 uiType) const override; void GetBeamHelpersGUIDList(GuidList& lList) { lList = m_lBeamHelpersGUIDList; } void GetShieldGeneratorsGUIDList(GuidList& lList) { lList = m_lShieldGeneratorGUIDList; } - const char* Save() override { return m_strInstData.c_str(); } + const char* Save() const override { return m_strInstData.c_str(); } void Load(const char* chrIn) override; private: diff --git a/scripts/outland/coilfang_reservoir/steam_vault/instance_steam_vault.cpp b/scripts/outland/coilfang_reservoir/steam_vault/instance_steam_vault.cpp index 445986f48..4e578af22 100644 --- a/scripts/outland/coilfang_reservoir/steam_vault/instance_steam_vault.cpp +++ b/scripts/outland/coilfang_reservoir/steam_vault/instance_steam_vault.cpp @@ -157,7 +157,7 @@ void instance_steam_vault::SetData(uint32 uiType, uint32 uiData) } } -uint32 instance_steam_vault::GetData(uint32 uiType) +uint32 instance_steam_vault::GetData(uint32 uiType) const { if (uiType < MAX_ENCOUNTER) return m_auiEncounter[uiType]; diff --git a/scripts/outland/coilfang_reservoir/steam_vault/steam_vault.h b/scripts/outland/coilfang_reservoir/steam_vault/steam_vault.h index 4ae5e3a6b..544a79288 100644 --- a/scripts/outland/coilfang_reservoir/steam_vault/steam_vault.h +++ b/scripts/outland/coilfang_reservoir/steam_vault/steam_vault.h @@ -36,9 +36,9 @@ class MANGOS_DLL_DECL instance_steam_vault : public ScriptedInstance void OnCreatureDeath(Creature* pCreature) override; void SetData(uint32 uiType, uint32 uiData) override; - uint32 GetData(uint32 uiType) override; + uint32 GetData(uint32 uiType) const override; - const char* Save() override { return m_strInstData.c_str(); } + const char* Save() const override { return m_strInstData.c_str(); } void Load(const char* chrIn) override; private: diff --git a/scripts/outland/gruuls_lair/gruuls_lair.h b/scripts/outland/gruuls_lair/gruuls_lair.h index d50a9d83e..59b3998b4 100644 --- a/scripts/outland/gruuls_lair/gruuls_lair.h +++ b/scripts/outland/gruuls_lair/gruuls_lair.h @@ -37,9 +37,9 @@ class MANGOS_DLL_DECL instance_gruuls_lair : public ScriptedInstance void OnObjectCreate(GameObject* pGo) override; void SetData(uint32 uiType, uint32 uiData) override; - uint32 GetData(uint32 uiType) override; + uint32 GetData(uint32 uiType) const override; - const char* Save() override { return m_strSaveData.c_str(); } + const char* Save() const override { return m_strSaveData.c_str(); } void Load(const char* chrIn) override; private: diff --git a/scripts/outland/gruuls_lair/instance_gruuls_lair.cpp b/scripts/outland/gruuls_lair/instance_gruuls_lair.cpp index 99774c930..b83384029 100644 --- a/scripts/outland/gruuls_lair/instance_gruuls_lair.cpp +++ b/scripts/outland/gruuls_lair/instance_gruuls_lair.cpp @@ -112,7 +112,7 @@ void instance_gruuls_lair::SetData(uint32 uiType, uint32 uiData) } } -uint32 instance_gruuls_lair::GetData(uint32 uiType) +uint32 instance_gruuls_lair::GetData(uint32 uiType) const { if (uiType < MAX_ENCOUNTER) return m_auiEncounter[uiType]; diff --git a/scripts/outland/hellfire_citadel/blood_furnace/blood_furnace.h b/scripts/outland/hellfire_citadel/blood_furnace/blood_furnace.h index 17dabd48a..a9e903b57 100644 --- a/scripts/outland/hellfire_citadel/blood_furnace/blood_furnace.h +++ b/scripts/outland/hellfire_citadel/blood_furnace/blood_furnace.h @@ -68,12 +68,12 @@ class MANGOS_DLL_DECL instance_blood_furnace : public ScriptedInstance void OnCreatureEvade(Creature* pCreature); void SetData(uint32 uiType, uint32 uiData) override; - uint32 GetData(uint32 uiType) override; + uint32 GetData(uint32 uiType) const override; void Update(uint32 uiDiff) override; void Load(const char* chrIn) override; - const char* Save() override { return m_strInstData.c_str(); } + const char* Save() const override { return m_strInstData.c_str(); } void GetMovementDistanceForIndex(uint32 uiIndex, float& dx, float& dy); diff --git a/scripts/outland/hellfire_citadel/blood_furnace/instance_blood_furnace.cpp b/scripts/outland/hellfire_citadel/blood_furnace/instance_blood_furnace.cpp index 8fa779ee7..616efc3de 100644 --- a/scripts/outland/hellfire_citadel/blood_furnace/instance_blood_furnace.cpp +++ b/scripts/outland/hellfire_citadel/blood_furnace/instance_blood_furnace.cpp @@ -296,7 +296,7 @@ void instance_blood_furnace::Update(uint32 uiDiff) m_uiRandYellTimer -= uiDiff; } -uint32 instance_blood_furnace::GetData(uint32 uiType) +uint32 instance_blood_furnace::GetData(uint32 uiType) const { if (uiType < MAX_ENCOUNTER) return m_auiEncounter[uiType]; diff --git a/scripts/outland/hellfire_citadel/hellfire_ramparts/hellfire_ramparts.h b/scripts/outland/hellfire_citadel/hellfire_ramparts/hellfire_ramparts.h index 98ae28b65..ab72b03b6 100644 --- a/scripts/outland/hellfire_citadel/hellfire_ramparts/hellfire_ramparts.h +++ b/scripts/outland/hellfire_citadel/hellfire_ramparts/hellfire_ramparts.h @@ -31,7 +31,7 @@ class MANGOS_DLL_DECL instance_ramparts : public ScriptedInstance void OnObjectCreate(GameObject* pGo) override; void SetData(uint32 uiType, uint32 uiData) override; - uint32 GetData(uint32 uiType) override; + uint32 GetData(uint32 uiType) const override; // No need to save and load this instance (only one encounter needs special handling, no doors used) diff --git a/scripts/outland/hellfire_citadel/hellfire_ramparts/instance_hellfire_ramparts.cpp b/scripts/outland/hellfire_citadel/hellfire_ramparts/instance_hellfire_ramparts.cpp index fe1ba4939..65e2330a6 100644 --- a/scripts/outland/hellfire_citadel/hellfire_ramparts/instance_hellfire_ramparts.cpp +++ b/scripts/outland/hellfire_citadel/hellfire_ramparts/instance_hellfire_ramparts.cpp @@ -96,7 +96,7 @@ void instance_ramparts::SetData(uint32 uiType, uint32 uiData) } } -uint32 instance_ramparts::GetData(uint32 uiType) +uint32 instance_ramparts::GetData(uint32 uiType) const { if (uiType == TYPE_VAZRUDEN) return m_auiEncounter[0]; diff --git a/scripts/outland/hellfire_citadel/magtheridons_lair/instance_magtheridons_lair.cpp b/scripts/outland/hellfire_citadel/magtheridons_lair/instance_magtheridons_lair.cpp index f0dc4f8a0..37babaad2 100644 --- a/scripts/outland/hellfire_citadel/magtheridons_lair/instance_magtheridons_lair.cpp +++ b/scripts/outland/hellfire_citadel/magtheridons_lair/instance_magtheridons_lair.cpp @@ -189,7 +189,7 @@ void instance_magtheridons_lair::SetData(uint32 uiType, uint32 uiData) // Instance save isn't needed for this one } -uint32 instance_magtheridons_lair::GetData(uint32 uiType) +uint32 instance_magtheridons_lair::GetData(uint32 uiType) const { if (uiType < MAX_ENCOUNTER) return m_auiEncounter[uiType]; diff --git a/scripts/outland/hellfire_citadel/magtheridons_lair/magtheridons_lair.h b/scripts/outland/hellfire_citadel/magtheridons_lair/magtheridons_lair.h index c792d827b..caeb8d6bb 100644 --- a/scripts/outland/hellfire_citadel/magtheridons_lair/magtheridons_lair.h +++ b/scripts/outland/hellfire_citadel/magtheridons_lair/magtheridons_lair.h @@ -44,7 +44,7 @@ class MANGOS_DLL_DECL instance_magtheridons_lair : public ScriptedInstance void OnObjectCreate(GameObject* pGo) override; void SetData(uint32 uiType, uint32 uiData) override; - uint32 GetData(uint32 uiType) override; + uint32 GetData(uint32 uiType) const override; void Update(uint32 uiDiff) override; diff --git a/scripts/outland/hellfire_citadel/shattered_halls/instance_shattered_halls.cpp b/scripts/outland/hellfire_citadel/shattered_halls/instance_shattered_halls.cpp index 5dd1cd0ab..1bd71c41a 100644 --- a/scripts/outland/hellfire_citadel/shattered_halls/instance_shattered_halls.cpp +++ b/scripts/outland/hellfire_citadel/shattered_halls/instance_shattered_halls.cpp @@ -176,7 +176,7 @@ void instance_shattered_halls::Load(const char* chrIn) OUT_LOAD_INST_DATA_COMPLETE; } -uint32 instance_shattered_halls::GetData(uint32 uiType) +uint32 instance_shattered_halls::GetData(uint32 uiType) const { if (uiType < MAX_ENCOUNTER) return m_auiEncounter[uiType]; diff --git a/scripts/outland/hellfire_citadel/shattered_halls/shattered_halls.h b/scripts/outland/hellfire_citadel/shattered_halls/shattered_halls.h index 24b8883c9..844e9b66f 100644 --- a/scripts/outland/hellfire_citadel/shattered_halls/shattered_halls.h +++ b/scripts/outland/hellfire_citadel/shattered_halls/shattered_halls.h @@ -76,9 +76,9 @@ class MANGOS_DLL_DECL instance_shattered_halls : public ScriptedInstance void OnCreatureEnterCombat(Creature* pCreature) override; void SetData(uint32 uiType, uint32 uiData) override; - uint32 GetData(uint32 uiType) override; + uint32 GetData(uint32 uiType) const override; - const char* Save() override { return m_strInstData.c_str(); } + const char* Save() const override { return m_strInstData.c_str(); } void Load(const char* chrIn) override; void Update(uint32 uiDiff) override; diff --git a/scripts/outland/tempest_keep/arcatraz/arcatraz.h b/scripts/outland/tempest_keep/arcatraz/arcatraz.h index 256203b4b..8d238416e 100644 --- a/scripts/outland/tempest_keep/arcatraz/arcatraz.h +++ b/scripts/outland/tempest_keep/arcatraz/arcatraz.h @@ -91,9 +91,9 @@ class MANGOS_DLL_DECL instance_arcatraz : public ScriptedInstance, private Dialo void OnCreatureDeath(Creature* pCreature) override; void SetData(uint32 uiType, uint32 uiData) override; - uint32 GetData(uint32 uiType) override; + uint32 GetData(uint32 uiType) const override; - const char* Save() override { return m_strInstData.c_str(); } + const char* Save() const override { return m_strInstData.c_str(); } void Load(const char* chrIn) override; void Update(uint32 uiDiff) override; diff --git a/scripts/outland/tempest_keep/arcatraz/instance_arcatraz.cpp b/scripts/outland/tempest_keep/arcatraz/instance_arcatraz.cpp index deb712b72..616df27af 100644 --- a/scripts/outland/tempest_keep/arcatraz/instance_arcatraz.cpp +++ b/scripts/outland/tempest_keep/arcatraz/instance_arcatraz.cpp @@ -294,7 +294,7 @@ void instance_arcatraz::SetData(uint32 uiType, uint32 uiData) } } -uint32 instance_arcatraz::GetData(uint32 uiType) +uint32 instance_arcatraz::GetData(uint32 uiType) const { if (uiType < MAX_ENCOUNTER) return m_auiEncounter[uiType]; diff --git a/scripts/outland/tempest_keep/the_eye/instance_the_eye.cpp b/scripts/outland/tempest_keep/the_eye/instance_the_eye.cpp index e92d172c0..95dace5bb 100644 --- a/scripts/outland/tempest_keep/the_eye/instance_the_eye.cpp +++ b/scripts/outland/tempest_keep/the_eye/instance_the_eye.cpp @@ -115,7 +115,7 @@ void instance_the_eye::SetData(uint32 uiType, uint32 uiData) } } -uint32 instance_the_eye::GetData(uint32 uiType) +uint32 instance_the_eye::GetData(uint32 uiType) const { if (uiType < MAX_ENCOUNTER) return m_auiEncounter[uiType]; diff --git a/scripts/outland/tempest_keep/the_eye/the_eye.h b/scripts/outland/tempest_keep/the_eye/the_eye.h index 845b81d2b..8d5da1912 100644 --- a/scripts/outland/tempest_keep/the_eye/the_eye.h +++ b/scripts/outland/tempest_keep/the_eye/the_eye.h @@ -48,7 +48,7 @@ class MANGOS_DLL_DECL instance_the_eye : public ScriptedInstance void OnObjectCreate(GameObject* pGo) override; void SetData(uint32 uiType, uint32 uiData) override; - uint32 GetData(uint32 uiType) override; + uint32 GetData(uint32 uiType) const override; // No Save or Load needed to current knowledge diff --git a/scripts/outland/tempest_keep/the_mechanar/instance_mechanar.cpp b/scripts/outland/tempest_keep/the_mechanar/instance_mechanar.cpp index d82e000ba..4b5086a5b 100644 --- a/scripts/outland/tempest_keep/the_mechanar/instance_mechanar.cpp +++ b/scripts/outland/tempest_keep/the_mechanar/instance_mechanar.cpp @@ -113,7 +113,7 @@ void instance_mechanar::SetData(uint32 uiType, uint32 uiData) } } -uint32 instance_mechanar::GetData(uint32 uiType) +uint32 instance_mechanar::GetData(uint32 uiType) const { if (uiType < MAX_ENCOUNTER) return m_auiEncounter[uiType]; diff --git a/scripts/outland/tempest_keep/the_mechanar/mechanar.h b/scripts/outland/tempest_keep/the_mechanar/mechanar.h index 715546b7b..65e7ef307 100644 --- a/scripts/outland/tempest_keep/the_mechanar/mechanar.h +++ b/scripts/outland/tempest_keep/the_mechanar/mechanar.h @@ -98,9 +98,9 @@ class MANGOS_DLL_DECL instance_mechanar : public ScriptedInstance void OnCreatureDeath(Creature* pCreature) override; void SetData(uint32 uiType, uint32 uiData) override; - uint32 GetData(uint32 uiType) override; + uint32 GetData(uint32 uiType) const override; - const char* Save() override { return m_strInstData.c_str(); } + const char* Save() const override { return m_strInstData.c_str(); } void Load(const char* chrIn) override; void Update(uint32 uiDiff) override; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index fca16fe80..202312d21 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2774" + #define SD2_REVISION_NR "2775" #endif // __SD2_REVISION_NR_H__ From a75ee9e0a9d1dce04ff20a321d72186a039d575a Mon Sep 17 00:00:00 2001 From: kid10 Date: Sat, 15 Dec 2012 01:49:29 +0100 Subject: [PATCH 0773/1172] [2776] Fix two missing emotes and a typo with ToC25 texts --- sd2_revision_nr.h | 2 +- sql/scriptdev2_script_full.sql | 4 ++-- sql/updates/r2776_scriptdev2.sql | 2 ++ 3 files changed, 5 insertions(+), 3 deletions(-) create mode 100644 sql/updates/r2776_scriptdev2.sql diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 202312d21..faec3b89f 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2775" + #define SD2_REVISION_NR "2776" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 15297d1da..d58d08f95 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -4211,7 +4211,7 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1649008,'Tragic... They fought valiantly, but the beasts of Northrend triumphed. Let us observe a moment of silence for our fallen heroes.',16042,1,0,0,'tirion SAY_TIRION_BEAST_WIPE'), (-1649009,'Grand Warlock Wilfred Fizzlebang will summon forth your next challenge. Stand by for his entry!',16043,1,0,0,'tirion SAY_TIRION_JARAXXUS_INTRO_1'), -(-1649010,'Thank you, Highlord! Now challengers, I will begin the ritual of summoning! When I am done, a fearsome Doomguard will appear!',16268,1,0,0,'wilfred SAY_WILFRED_JARAXXUS_INTRO_1'), +(-1649010,'Thank you, Highlord. Now, challengers, I will begin the ritual of summoning. When I am done a fearsome doomguard will appear!',16268,1,0,2,'wilfred SAY_WILFRED_JARAXXUS_INTRO_1'), (-1649011,'Prepare for oblivion!',16269,1,0,0,'wilfred SAY_WILFRED_JARAXXUS_INTRO_2'), (-1649012,'Ah ha! Behold the absolute power of Wilfred Fizzlebang, master summoner! You are bound to ME, demon!',16270,1,0,0,'wilfred SAY_WILFRED_JARAXXUS_INTRO_3'), (-1649013,'Trifling gnome, your arrogance will be your undoing!',16143,1,0,0,'jaraxxus SAY_JARAXXUS_JARAXXAS_INTRO_1'), @@ -4240,7 +4240,7 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1649034,'You will have your challenge, Fordring.',16321,1,0,0,'lich_king SAY_LKING_ANUB_INTRO_1'), (-1649035,'Arthas! You are hopelessly outnumbered! Lay down Frostmourne and I will grant you a just death.',16052,1,0,0,'tirion SAY_TIRION_ABUN_INTRO_1'), -(-1649036,'The Nerubians built an empire beneath the frozen wastes of Northrend. An empire that you so foolishly built your structures upon. MY EMPIRE.',16322,1,0,0,'lich_king SAY_LKING_ANUB_INTRO_2'), +(-1649036,'The Nerubians built an empire beneath the frozen wastes of Northrend. An empire that you so foolishly built your structures upon. MY EMPIRE.',16322,1,0,11,'lich_king SAY_LKING_ANUB_INTRO_2'), (-1649037,'The souls of your fallen champions will be mine, Fordring.',16323,1,0,0,'lich_king SAY_LKING_ANUB_INTRO_3'), (-1649038,'Ahhh, our guests have arrived, just as the master promised.',16235,1,0,0,'anubarak SAY_ANUB_ANUB_INTRO_1'), diff --git a/sql/updates/r2776_scriptdev2.sql b/sql/updates/r2776_scriptdev2.sql new file mode 100644 index 000000000..d674617b7 --- /dev/null +++ b/sql/updates/r2776_scriptdev2.sql @@ -0,0 +1,2 @@ +UPDATE script_texts SET content_default='Thank you, Highlord. Now, challengers, I will begin the ritual of summoning. When I am done a fearsome doomguard will appear!', emote=2 WHERE entry=-1649010; +UPDATE script_texts SET emote=11 WHERE entry=-1649036; From 86b2bbce93baf3255e1b797ec7787a8f95635c8c Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Sun, 16 Dec 2012 05:07:21 +0100 Subject: [PATCH 0774/1172] [2777] Improve some static code. Also cleanup npc_doctor and npc_injured_patient script --- base/follower_ai.cpp | 1 - .../instance_blackrock_spire.cpp | 2 +- .../sunwell_plateau/boss_muru.cpp | 2 +- .../auchindoun/sethekk_halls/boss_anzu.cpp | 2 +- scripts/world/npcs_special.cpp | 155 ++++++++---------- sd2_revision_nr.h | 2 +- 6 files changed, 70 insertions(+), 94 deletions(-) diff --git a/base/follower_ai.cpp b/base/follower_ai.cpp index 57e66f2d4..e8bb957ef 100644 --- a/base/follower_ai.cpp +++ b/base/follower_ai.cpp @@ -326,7 +326,6 @@ Player* FollowerAI::GetLeaderForFollower() debug_log("SD2: FollowerAI GetLeader changed and returned new leader."); m_leaderGuid = pMember->GetObjectGuid(); return pMember; - break; } } } diff --git a/scripts/eastern_kingdoms/blackrock_spire/instance_blackrock_spire.cpp b/scripts/eastern_kingdoms/blackrock_spire/instance_blackrock_spire.cpp index 536e51aaa..56d831aec 100644 --- a/scripts/eastern_kingdoms/blackrock_spire/instance_blackrock_spire.cpp +++ b/scripts/eastern_kingdoms/blackrock_spire/instance_blackrock_spire.cpp @@ -426,7 +426,7 @@ void instance_blackrock_spire::DoUseEmberseerRunes(bool bReset) if (m_lEmberseerRunesGUIDList.empty()) return; - for (GuidList::const_iterator itr = m_lEmberseerRunesGUIDList.begin(); itr != m_lEmberseerRunesGUIDList.end(); itr++) + for (GuidList::const_iterator itr = m_lEmberseerRunesGUIDList.begin(); itr != m_lEmberseerRunesGUIDList.end(); ++itr) { if (bReset) { diff --git a/scripts/eastern_kingdoms/sunwell_plateau/boss_muru.cpp b/scripts/eastern_kingdoms/sunwell_plateau/boss_muru.cpp index 256345ca5..b38eabb80 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/boss_muru.cpp +++ b/scripts/eastern_kingdoms/sunwell_plateau/boss_muru.cpp @@ -372,7 +372,7 @@ struct MANGOS_DLL_DECL npc_portal_targetAI : public Scripted_NoMovementAI { // Alternate the visuals ++m_uiTransformCount; - DoCastSpellIfCan(m_creature, m_uiTransformCount % 2 ? SPELL_TRANSFORM_VISUAL_1 : SPELL_TRANSFORM_VISUAL_2, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, (m_uiTransformCount % 2) ? SPELL_TRANSFORM_VISUAL_1 : SPELL_TRANSFORM_VISUAL_2, CAST_TRIGGERED); if (m_uiTransformCount < MAX_TRANSFORM_CASTS) m_uiTransformTimer = 1000; diff --git a/scripts/outland/auchindoun/sethekk_halls/boss_anzu.cpp b/scripts/outland/auchindoun/sethekk_halls/boss_anzu.cpp index 329c62183..63a83db36 100644 --- a/scripts/outland/auchindoun/sethekk_halls/boss_anzu.cpp +++ b/scripts/outland/auchindoun/sethekk_halls/boss_anzu.cpp @@ -123,9 +123,9 @@ struct MANGOS_DLL_DECL boss_anzuAI : public ScriptedAI return; // Note: the birds should fly around the room for about 10 seconds before starting to attack the players - float fX, fY, fZ; if (GameObject* pClaw = m_pInstance->GetSingleGameObjectFromStorage(GO_RAVENS_CLAW)) { + float fX, fY, fZ; for (uint8 i = 0; i < MAX_BROODS; ++i) { m_creature->GetRandomPoint(pClaw->GetPositionX(), pClaw->GetPositionY(), pClaw->GetPositionZ(), 7.0f, fX, fY, fZ); diff --git a/scripts/world/npcs_special.cpp b/scripts/world/npcs_special.cpp index e5934f164..6d9090309 100644 --- a/scripts/world/npcs_special.cpp +++ b/scripts/world/npcs_special.cpp @@ -476,37 +476,37 @@ struct MANGOS_DLL_DECL npc_doctorAI : public ScriptedAI ObjectGuid m_playerGuid; - uint32 SummonPatient_Timer; - uint32 SummonPatientCount; - uint32 PatientDiedCount; - uint32 PatientSavedCount; + uint32 m_uiSummonPatientTimer; + uint32 m_uiSummonPatientCount; + uint32 m_uiPatientDiedCount; + uint32 m_uiPatientSavedCount; - bool Event; + bool m_bIsEventInProgress; - GuidList Patients; - std::vector Coordinates; + GuidList m_lPatientGuids; + std::vector m_vPatientSummonCoordinates; void Reset() override { m_playerGuid.Clear(); - SummonPatient_Timer = 10000; - SummonPatientCount = 0; - PatientDiedCount = 0; - PatientSavedCount = 0; + m_uiSummonPatientTimer = 10000; + m_uiSummonPatientCount = 0; + m_uiPatientDiedCount = 0; + m_uiPatientSavedCount = 0; - Patients.clear(); - Coordinates.clear(); + m_lPatientGuids.clear(); + m_vPatientSummonCoordinates.clear(); - Event = false; + m_bIsEventInProgress = false; m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); } void BeginEvent(Player* pPlayer); - void PatientDied(Location* Point); - void PatientSaved(Creature* soldier, Player* pPlayer, Location* Point); - void UpdateAI(const uint32 diff) override; + void PatientDied(Location* pPoint); + void PatientSaved(Creature* pSoldier, Player* pPlayer, Location* pPoint); + void UpdateAI(const uint32 uiDiff) override; }; /*##### @@ -518,12 +518,12 @@ struct MANGOS_DLL_DECL npc_injured_patientAI : public ScriptedAI npc_injured_patientAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} ObjectGuid m_doctorGuid; - Location* Coord; + Location* m_pCoord; void Reset() override { m_doctorGuid.Clear(); - Coord = NULL; + m_pCoord = NULL; // no select m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); @@ -532,9 +532,7 @@ struct MANGOS_DLL_DECL npc_injured_patientAI : public ScriptedAI // to make them lay with face down m_creature->SetStandState(UNIT_STAND_STATE_DEAD); - uint32 mobId = m_creature->GetEntry(); - - switch (mobId) + switch (m_creature->GetEntry()) { // lower max health case 12923: @@ -552,19 +550,17 @@ struct MANGOS_DLL_DECL npc_injured_patientAI : public ScriptedAI } } - void SpellHit(Unit* caster, const SpellEntry* spell) override + void SpellHit(Unit* pCaster, const SpellEntry* pSpell) override { - if (caster->GetTypeId() == TYPEID_PLAYER && m_creature->isAlive() && spell->Id == 20804) + if (pCaster->GetTypeId() == TYPEID_PLAYER && m_creature->isAlive() && pSpell->Id == 20804) { - if ((((Player*)caster)->GetQuestStatus(6624) == QUEST_STATUS_INCOMPLETE) || (((Player*)caster)->GetQuestStatus(6622) == QUEST_STATUS_INCOMPLETE)) + Player* pPlayer = static_cast(pCaster); + if (pPlayer->GetQuestStatus(6624) == QUEST_STATUS_INCOMPLETE || pPlayer->GetQuestStatus(6622) == QUEST_STATUS_INCOMPLETE) { - if (m_doctorGuid) + if (Creature* pDoctor = m_creature->GetMap()->GetCreature(m_doctorGuid)) { - if (Creature* pDoctor = m_creature->GetMap()->GetCreature(m_doctorGuid)) - { - if (npc_doctorAI* pDocAI = dynamic_cast(pDoctor->AI())) - pDocAI->PatientSaved(m_creature, (Player*)caster, Coord); - } + if (npc_doctorAI* pDocAI = dynamic_cast(pDoctor->AI())) + pDocAI->PatientSaved(m_creature, pPlayer, m_pCoord); } } // make not selectable @@ -583,9 +579,7 @@ struct MANGOS_DLL_DECL npc_injured_patientAI : public ScriptedAI m_creature->SetWalk(false); - uint32 mobId = m_creature->GetEntry(); - - switch (mobId) + switch (m_creature->GetEntry()) { case 12923: case 12924: @@ -601,10 +595,10 @@ struct MANGOS_DLL_DECL npc_injured_patientAI : public ScriptedAI } } - void UpdateAI(const uint32 diff) override + void UpdateAI(const uint32 uiDiff) override { // lower HP on every world tick makes it a useful counter, not officlone though - uint32 uiHPLose = uint32(0.05f * diff); + uint32 uiHPLose = uint32(0.05f * uiDiff); if (m_creature->isAlive() && m_creature->GetHealth() > 1 + uiHPLose) { m_creature->SetHealth(m_creature->GetHealth() - uiHPLose); @@ -617,13 +611,10 @@ struct MANGOS_DLL_DECL npc_injured_patientAI : public ScriptedAI m_creature->SetDeathState(JUST_DIED); m_creature->SetFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_DEAD); - if (m_doctorGuid) + if (Creature* pDoctor = m_creature->GetMap()->GetCreature(m_doctorGuid)) { - if (Creature* pDoctor = m_creature->GetMap()->GetCreature(m_doctorGuid)) - { - if (npc_doctorAI* pDocAI = dynamic_cast(pDoctor->AI())) - pDocAI->PatientDied(Coord); - } + if (npc_doctorAI* pDocAI = dynamic_cast(pDoctor->AI())) + pDocAI->PatientDied(m_pCoord); } } } @@ -642,36 +633,36 @@ void npc_doctorAI::BeginEvent(Player* pPlayer) { m_playerGuid = pPlayer->GetObjectGuid(); - SummonPatient_Timer = 10000; - SummonPatientCount = 0; - PatientDiedCount = 0; - PatientSavedCount = 0; + m_uiSummonPatientTimer = 10000; + m_uiSummonPatientCount = 0; + m_uiPatientDiedCount = 0; + m_uiPatientSavedCount = 0; switch (m_creature->GetEntry()) { case DOCTOR_ALLIANCE: for (uint8 i = 0; i < ALLIANCE_COORDS; ++i) - Coordinates.push_back(&AllianceCoords[i]); + m_vPatientSummonCoordinates.push_back(&AllianceCoords[i]); break; case DOCTOR_HORDE: for (uint8 i = 0; i < HORDE_COORDS; ++i) - Coordinates.push_back(&HordeCoords[i]); + m_vPatientSummonCoordinates.push_back(&HordeCoords[i]); break; } - Event = true; + m_bIsEventInProgress = true; m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); } -void npc_doctorAI::PatientDied(Location* Point) +void npc_doctorAI::PatientDied(Location* pPoint) { Player* pPlayer = m_creature->GetMap()->GetPlayer(m_playerGuid); - if (pPlayer && ((pPlayer->GetQuestStatus(6624) == QUEST_STATUS_INCOMPLETE) || (pPlayer->GetQuestStatus(6622) == QUEST_STATUS_INCOMPLETE))) + if (pPlayer && (pPlayer->GetQuestStatus(6624) == QUEST_STATUS_INCOMPLETE || pPlayer->GetQuestStatus(6622) == QUEST_STATUS_INCOMPLETE)) { - ++PatientDiedCount; + ++m_uiPatientDiedCount; - if (PatientDiedCount > 5 && Event) + if (m_uiPatientDiedCount > 5 && m_bIsEventInProgress) { if (pPlayer->GetQuestStatus(QUEST_TRIAGE_A) == QUEST_STATUS_INCOMPLETE) pPlayer->FailQuest(QUEST_TRIAGE_A); @@ -682,24 +673,24 @@ void npc_doctorAI::PatientDied(Location* Point) return; } - Coordinates.push_back(Point); + m_vPatientSummonCoordinates.push_back(pPoint); } else // If no player or player abandon quest in progress Reset(); } -void npc_doctorAI::PatientSaved(Creature* soldier, Player* pPlayer, Location* Point) +void npc_doctorAI::PatientSaved(Creature* soldier, Player* pPlayer, Location* pPoint) { if (pPlayer && m_playerGuid == pPlayer->GetObjectGuid()) { - if ((pPlayer->GetQuestStatus(QUEST_TRIAGE_A) == QUEST_STATUS_INCOMPLETE) || (pPlayer->GetQuestStatus(QUEST_TRIAGE_H) == QUEST_STATUS_INCOMPLETE)) + if (pPlayer->GetQuestStatus(QUEST_TRIAGE_A) == QUEST_STATUS_INCOMPLETE || pPlayer->GetQuestStatus(QUEST_TRIAGE_H) == QUEST_STATUS_INCOMPLETE) { - ++PatientSavedCount; + ++m_uiPatientSavedCount; - if (PatientSavedCount == 15) + if (m_uiPatientSavedCount == 15) { - for (GuidList::const_iterator itr = Patients.begin(); itr != Patients.end(); ++itr) + for (GuidList::const_iterator itr = m_lPatientGuids.begin(); itr != m_lPatientGuids.end(); ++itr) { if (Creature* Patient = m_creature->GetMap()->GetCreature(*itr)) Patient->SetDeathState(JUST_DIED); @@ -714,68 +705,54 @@ void npc_doctorAI::PatientSaved(Creature* soldier, Player* pPlayer, Location* Po return; } - Coordinates.push_back(Point); + m_vPatientSummonCoordinates.push_back(pPoint); } } } -void npc_doctorAI::UpdateAI(const uint32 diff) +void npc_doctorAI::UpdateAI(const uint32 uiDiff) { - if (Event && SummonPatientCount >= 20) + if (m_bIsEventInProgress && m_uiSummonPatientCount >= 20) { Reset(); return; } - if (Event) + if (m_bIsEventInProgress && !m_vPatientSummonCoordinates.empty()) { - if (SummonPatient_Timer < diff) + if (m_uiSummonPatientTimer < uiDiff) { - Creature* Patient = NULL; - Location* Point = NULL; - - if (Coordinates.empty()) - return; - - std::vector::iterator itr = Coordinates.begin() + rand() % Coordinates.size(); + std::vector::iterator itr = m_vPatientSummonCoordinates.begin() + urand(0, m_vPatientSummonCoordinates.size() - 1); uint32 patientEntry = 0; switch (m_creature->GetEntry()) { case DOCTOR_ALLIANCE: patientEntry = AllianceSoldierId[urand(0, 2)]; break; - case DOCTOR_HORDE: patientEntry = HordeSoldierId[urand(0, 2)]; break; + case DOCTOR_HORDE: patientEntry = HordeSoldierId[urand(0, 2)]; break; default: script_error_log("Invalid entry for Triage doctor. Please check your database"); return; } - Point = *itr; - - Patient = m_creature->SummonCreature(patientEntry, Point->x, Point->y, Point->z, Point->o, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); - - if (Patient) + if (Creature* Patient = m_creature->SummonCreature(patientEntry, (*itr)->x, (*itr)->y, (*itr)->z, (*itr)->o, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000)) { // 303, this flag appear to be required for client side item->spell to work (TARGET_SINGLE_FRIEND) Patient->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PVP_ATTACKABLE); - Patients.push_back(Patient->GetObjectGuid()); - - npc_injured_patientAI* pPatientAI = dynamic_cast(Patient->AI()); + m_lPatientGuids.push_back(Patient->GetObjectGuid()); - if (pPatientAI) + if (npc_injured_patientAI* pPatientAI = dynamic_cast(Patient->AI())) { pPatientAI->m_doctorGuid = m_creature->GetObjectGuid(); - - if (Point) - pPatientAI->Coord = Point; + pPatientAI->m_pCoord = *itr; + m_vPatientSummonCoordinates.erase(itr); } - - Coordinates.erase(itr); } - SummonPatient_Timer = 10000; - ++SummonPatientCount; + m_uiSummonPatientTimer = 10000; + ++m_uiSummonPatientCount; } - else SummonPatient_Timer -= diff; + else + m_uiSummonPatientTimer -= uiDiff; } } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index faec3b89f..a515737d2 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2776" + #define SD2_REVISION_NR "2777" #endif // __SD2_REVISION_NR_H__ From b06ec58b644a2ef190728d7c0da7d4a2c15d106d Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Mon, 17 Dec 2012 23:34:01 +0100 Subject: [PATCH 0775/1172] [2778] Use C-MaNGOS CreatureAI::SetCombatMovement functionality Note: Most likely the old wrapper DoStartMovement and DoStartNoMovement can be replaced now --- include/sc_creature.cpp | 11 ++--------- include/sc_creature.h | 10 ++++------ scripts/outland/tempest_keep/arcatraz/arcatraz.cpp | 3 ++- sd2_revision_nr.h | 2 +- 4 files changed, 9 insertions(+), 17 deletions(-) diff --git a/include/sc_creature.cpp b/include/sc_creature.cpp index b57f50909..c8aac89e3 100644 --- a/include/sc_creature.cpp +++ b/include/sc_creature.cpp @@ -20,14 +20,13 @@ struct TSpellSummary }* SpellSummary; ScriptedAI::ScriptedAI(Creature* pCreature) : CreatureAI(pCreature), - m_bCombatMovement(true), m_uiEvadeCheckCooldown(2500) {} /// This function shows if combat movement is enabled, overwrite for more info void ScriptedAI::GetAIInformation(ChatHandler& reader) { - reader.PSendSysMessage("ScriptedAI, combat movement is %s", reader.GetOnOffStr(m_bCombatMovement)); + reader.PSendSysMessage("ScriptedAI, combat movement is %s", reader.GetOnOffStr(IsCombatMovement())); } /// Return if the creature can "see" pWho @@ -84,8 +83,7 @@ void ScriptedAI::AttackStart(Unit* pWho) m_creature->SetInCombatWith(pWho); pWho->SetInCombatWith(m_creature); - if (IsCombatMovement()) - m_creature->GetMotionMaster()->MoveChase(pWho); + HandleMovementOnAttackStart(pWho); } } @@ -495,11 +493,6 @@ void ScriptedAI::SetEquipmentSlots(bool bLoadDefault, int32 iMainHand, int32 iOf m_creature->SetVirtualItem(VIRTUAL_ITEM_SLOT_2, iRanged); } -void ScriptedAI::SetCombatMovement(bool bCombatMove) -{ - m_bCombatMovement = bCombatMove; -} - // Hacklike storage used for misc creatures that are expected to evade of outside of a certain area. // It is assumed the information is found elswehere and can be handled by mangos. So far no luck finding such information/way to extract it. enum diff --git a/include/sc_creature.h b/include/sc_creature.h index d146f074a..489a37172 100644 --- a/include/sc_creature.h +++ b/include/sc_creature.h @@ -212,20 +212,18 @@ struct MANGOS_DLL_DECL ScriptedAI : public CreatureAI void SetEquipmentSlots(bool bLoadDefault, int32 iMainHand = EQUIP_NO_CHANGE, int32 iOffHand = EQUIP_NO_CHANGE, int32 iRanged = EQUIP_NO_CHANGE); - // Generally used to control if MoveChase() is to be used or not in AttackStart(). Some creatures do not chase victims - void SetCombatMovement(bool bCombatMove); - bool IsCombatMovement() { return m_bCombatMovement; } - bool EnterEvadeIfOutOfCombatArea(const uint32 uiDiff); private: - bool m_bCombatMovement; uint32 m_uiEvadeCheckCooldown; }; struct MANGOS_DLL_DECL Scripted_NoMovementAI : public ScriptedAI { - Scripted_NoMovementAI(Creature* pCreature) : ScriptedAI(pCreature) {} + Scripted_NoMovementAI(Creature* pCreature) : ScriptedAI(pCreature) + { + SetCombatMovement(false); + } void GetAIInformation(ChatHandler& reader) override; diff --git a/scripts/outland/tempest_keep/arcatraz/arcatraz.cpp b/scripts/outland/tempest_keep/arcatraz/arcatraz.cpp index a01772710..59bc87fe7 100644 --- a/scripts/outland/tempest_keep/arcatraz/arcatraz.cpp +++ b/scripts/outland/tempest_keep/arcatraz/arcatraz.cpp @@ -90,6 +90,7 @@ struct MANGOS_DLL_DECL npc_millhouse_manastormAI : public ScriptedAI, private Di m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); InitializeDialogueHelper(m_pInstance); Reset(); + m_attackDistance = 25.0f; } ScriptedInstance* m_pInstance; @@ -122,7 +123,7 @@ struct MANGOS_DLL_DECL npc_millhouse_manastormAI : public ScriptedAI, private Di m_creature->AddThreat(pWho); m_creature->SetInCombatWith(pWho); pWho->SetInCombatWith(m_creature); - DoStartMovement(pWho, 25.0f); + HandleMovementOnAttackStart(pWho); } } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index a515737d2..53855c308 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2777" + #define SD2_REVISION_NR "2778" #endif // __SD2_REVISION_NR_H__ From 04d2efe7ebd41429f9cdd88e782f6032cd26f41a Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Mon, 17 Dec 2012 23:39:42 +0100 Subject: [PATCH 0776/1172] [2779] Use Unit::RemoveAllAurasOnEvade. Requires C-MaNGOS [12316] --- base/escort_ai.cpp | 2 +- base/follower_ai.cpp | 2 +- include/sc_creature.cpp | 2 +- .../eastern_kingdoms/molten_core/boss_majordomo_executus.cpp | 2 +- scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp | 4 ++-- .../scarlet_monastery/boss_mograine_and_whitemane.cpp | 2 +- scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.cpp | 2 +- scripts/eastern_kingdoms/stranglethorn_vale.cpp | 2 +- scripts/eastern_kingdoms/sunwell_plateau/boss_felmyst.cpp | 2 +- scripts/eastern_kingdoms/sunwell_plateau/boss_kalecgos.cpp | 2 +- scripts/eastern_kingdoms/zulaman/boss_nalorakk.cpp | 2 +- scripts/eastern_kingdoms/zulgurub/boss_mandokir.cpp | 2 +- scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.cpp | 2 +- scripts/kalimdor/moonglade.cpp | 2 +- scripts/kalimdor/ruins_of_ahnqiraj/boss_rajaxx.cpp | 4 ++-- scripts/kalimdor/the_barrens.cpp | 2 +- scripts/northrend/azjol-nerub/ahnkahet/boss_taldaram.cpp | 2 +- scripts/northrend/howling_fjord.cpp | 2 +- .../icecrown_citadel/boss_deathbringer_saurfang.cpp | 2 +- .../icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp | 4 ++-- scripts/northrend/nexus/oculus/boss_urom.cpp | 2 +- scripts/northrend/ulduar/halls_of_lightning/boss_volkhan.cpp | 2 +- scripts/northrend/utgarde_keep/utgarde_keep/boss_keleseth.cpp | 2 +- scripts/outland/black_temple/boss_illidan.cpp | 2 +- .../outland/hellfire_citadel/blood_furnace/boss_broggok.cpp | 2 +- scripts/outland/shadowmoon_valley.cpp | 2 +- scripts/outland/tempest_keep/arcatraz/arcatraz.cpp | 2 +- scripts/outland/tempest_keep/arcatraz/boss_dalliah.cpp | 2 +- scripts/outland/tempest_keep/arcatraz/boss_soccothrates.cpp | 2 +- sd2_revision_nr.h | 2 +- sql/scriptdev2_script_full.sql | 2 +- sql/updates/r2773_scriptdev2.sql | 2 +- sql/updates/r2779_scriptdev2.sql | 1 + 33 files changed, 36 insertions(+), 35 deletions(-) create mode 100644 sql/updates/r2779_scriptdev2.sql diff --git a/base/escort_ai.cpp b/base/escort_ai.cpp index 90bf429ae..4b796aeb0 100644 --- a/base/escort_ai.cpp +++ b/base/escort_ai.cpp @@ -209,7 +209,7 @@ void npc_escortAI::JustRespawned() void npc_escortAI::EnterEvadeMode() { - m_creature->RemoveAllAuras(); + m_creature->RemoveAllAurasOnEvade(); m_creature->DeleteThreatList(); m_creature->CombatStop(true); m_creature->SetLootRecipient(NULL); diff --git a/base/follower_ai.cpp b/base/follower_ai.cpp index e8bb957ef..f16f17727 100644 --- a/base/follower_ai.cpp +++ b/base/follower_ai.cpp @@ -157,7 +157,7 @@ void FollowerAI::JustRespawned() void FollowerAI::EnterEvadeMode() { - m_creature->RemoveAllAuras(); + m_creature->RemoveAllAurasOnEvade(); m_creature->DeleteThreatList(); m_creature->CombatStop(true); m_creature->SetLootRecipient(NULL); diff --git a/include/sc_creature.cpp b/include/sc_creature.cpp index c8aac89e3..4fddaa3ed 100644 --- a/include/sc_creature.cpp +++ b/include/sc_creature.cpp @@ -123,7 +123,7 @@ void ScriptedAI::UpdateAI(const uint32 uiDiff) */ void ScriptedAI::EnterEvadeMode() { - m_creature->RemoveAllAuras(); + m_creature->RemoveAllAurasOnEvade(); m_creature->DeleteThreatList(); m_creature->CombatStop(true); diff --git a/scripts/eastern_kingdoms/molten_core/boss_majordomo_executus.cpp b/scripts/eastern_kingdoms/molten_core/boss_majordomo_executus.cpp index 4a4e0d8ca..82b4d408e 100644 --- a/scripts/eastern_kingdoms/molten_core/boss_majordomo_executus.cpp +++ b/scripts/eastern_kingdoms/molten_core/boss_majordomo_executus.cpp @@ -129,7 +129,7 @@ struct MANGOS_DLL_DECL boss_majordomoAI : public ScriptedAI else // Finished the encounter, DONE { // Exit combat - m_creature->RemoveAllAuras(); + m_creature->RemoveAllAurasOnEvade(); m_creature->DeleteThreatList(); m_creature->CombatStop(true); m_creature->SetLootRecipient(NULL); diff --git a/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp b/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp index b98cc2860..c97081216 100644 --- a/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp +++ b/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp @@ -2674,7 +2674,7 @@ struct MANGOS_DLL_DECL npc_fellow_death_knightAI : public ScriptedAI } else if (m_pInstance->GetData(TYPE_BATTLE) == DONE) { - m_creature->RemoveAllAuras(); + m_creature->RemoveAllAurasOnEvade(); m_creature->DeleteThreatList(); m_creature->CombatStop(true); m_creature->LoadCreatureAddon(true); @@ -2806,7 +2806,7 @@ struct MANGOS_DLL_DECL npc_acherus_deathchargerAI : public ScriptedAI { if (m_bIsRiderDead) { - m_creature->RemoveAllAuras(); + m_creature->RemoveAllAurasOnEvade(); m_creature->DeleteThreatList(); m_creature->CombatStop(true); m_creature->LoadCreatureAddon(true); diff --git a/scripts/eastern_kingdoms/scarlet_monastery/boss_mograine_and_whitemane.cpp b/scripts/eastern_kingdoms/scarlet_monastery/boss_mograine_and_whitemane.cpp index d802a02ad..337b79b6f 100644 --- a/scripts/eastern_kingdoms/scarlet_monastery/boss_mograine_and_whitemane.cpp +++ b/scripts/eastern_kingdoms/scarlet_monastery/boss_mograine_and_whitemane.cpp @@ -129,7 +129,7 @@ struct MANGOS_DLL_DECL boss_scarlet_commander_mograineAI : public ScriptedAI m_creature->InterruptNonMeleeSpells(false); m_creature->ClearComboPointHolders(); - m_creature->RemoveAllAuras(); + m_creature->RemoveAllAurasOnDeath(); m_creature->ClearAllReactives(); m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); diff --git a/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.cpp b/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.cpp index ce8615512..402fb09c0 100644 --- a/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.cpp +++ b/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.cpp @@ -371,7 +371,7 @@ struct MANGOS_DLL_DECL mob_arugal_voidwalkerAI : public ScriptedAI void EnterEvadeMode() override { - m_creature->RemoveAllAuras(); + m_creature->RemoveAllAurasOnEvade(); m_creature->DeleteThreatList(); m_creature->CombatStop(true); m_creature->LoadCreatureAddon(true); diff --git a/scripts/eastern_kingdoms/stranglethorn_vale.cpp b/scripts/eastern_kingdoms/stranglethorn_vale.cpp index 02875d2df..0cfd87207 100644 --- a/scripts/eastern_kingdoms/stranglethorn_vale.cpp +++ b/scripts/eastern_kingdoms/stranglethorn_vale.cpp @@ -64,7 +64,7 @@ struct MANGOS_DLL_DECL mob_yennikuAI : public ScriptedAI { if (m_uiResetTimer) { - m_creature->RemoveAllAuras(); + m_creature->RemoveAllAurasOnEvade(); m_creature->DeleteThreatList(); m_creature->CombatStop(true); m_creature->LoadCreatureAddon(true); diff --git a/scripts/eastern_kingdoms/sunwell_plateau/boss_felmyst.cpp b/scripts/eastern_kingdoms/sunwell_plateau/boss_felmyst.cpp index 1a66d33e0..ddeaf34b2 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/boss_felmyst.cpp +++ b/scripts/eastern_kingdoms/sunwell_plateau/boss_felmyst.cpp @@ -119,7 +119,7 @@ struct MANGOS_DLL_DECL boss_felmystAI : public ScriptedAI void EnterEvadeMode() override { - m_creature->RemoveAllAuras(); + m_creature->RemoveAllAurasOnEvade(); m_creature->DeleteThreatList(); m_creature->CombatStop(true); diff --git a/scripts/eastern_kingdoms/sunwell_plateau/boss_kalecgos.cpp b/scripts/eastern_kingdoms/sunwell_plateau/boss_kalecgos.cpp index aed66d874..13c9207dc 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/boss_kalecgos.cpp +++ b/scripts/eastern_kingdoms/sunwell_plateau/boss_kalecgos.cpp @@ -125,7 +125,7 @@ struct MANGOS_DLL_DECL boss_kalecgosAI : public ScriptedAI // Check if the boss is uncorrupted when evading if (m_bIsUncorrupted) { - m_creature->RemoveAllAuras(); + m_creature->RemoveAllAurasOnEvade(); m_creature->DeleteThreatList(); m_creature->CombatStop(true); m_creature->LoadCreatureAddon(true); diff --git a/scripts/eastern_kingdoms/zulaman/boss_nalorakk.cpp b/scripts/eastern_kingdoms/zulaman/boss_nalorakk.cpp index a512302b7..dc8c842a9 100644 --- a/scripts/eastern_kingdoms/zulaman/boss_nalorakk.cpp +++ b/scripts/eastern_kingdoms/zulaman/boss_nalorakk.cpp @@ -129,7 +129,7 @@ struct MANGOS_DLL_DECL boss_nalorakkAI : public ScriptedAI // Nalorakk evades only after the trash waves are finished void EnterEvadeMode() override { - m_creature->RemoveAllAuras(); + m_creature->RemoveAllAurasOnEvade(); m_creature->DeleteThreatList(); m_creature->CombatStop(true); m_creature->LoadCreatureAddon(true); diff --git a/scripts/eastern_kingdoms/zulgurub/boss_mandokir.cpp b/scripts/eastern_kingdoms/zulgurub/boss_mandokir.cpp index fe54cbdc5..025c644fa 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_mandokir.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_mandokir.cpp @@ -151,7 +151,7 @@ struct MANGOS_DLL_DECL boss_mandokirAI : public ScriptedAI void EnterEvadeMode() override { - m_creature->RemoveAllAuras(); + m_creature->RemoveAllAurasOnEvade(); m_creature->DeleteThreatList(); m_creature->CombatStop(true); m_creature->LoadCreatureAddon(true); diff --git a/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.cpp b/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.cpp index 1d436a4c7..1f1922ea7 100644 --- a/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.cpp +++ b/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.cpp @@ -197,7 +197,7 @@ void hyjalAI::Reset() void hyjalAI::EnterEvadeMode() { - m_creature->RemoveAllAuras(); + m_creature->RemoveAllAurasOnEvade(); m_creature->DeleteThreatList(); m_creature->CombatStop(true); diff --git a/scripts/kalimdor/moonglade.cpp b/scripts/kalimdor/moonglade.cpp index 74d744ca4..d96a67542 100644 --- a/scripts/kalimdor/moonglade.cpp +++ b/scripts/kalimdor/moonglade.cpp @@ -675,7 +675,7 @@ struct MANGOS_DLL_DECL boss_eranikusAI : public ScriptedAI { if (m_creature->GetHealthPercent() < 20.0f) { - m_creature->RemoveAllAuras(); + m_creature->RemoveAllAurasOnEvade(); m_creature->DeleteThreatList(); m_creature->CombatStop(true); m_creature->LoadCreatureAddon(true); diff --git a/scripts/kalimdor/ruins_of_ahnqiraj/boss_rajaxx.cpp b/scripts/kalimdor/ruins_of_ahnqiraj/boss_rajaxx.cpp index aa5feb074..39ab3dfc6 100644 --- a/scripts/kalimdor/ruins_of_ahnqiraj/boss_rajaxx.cpp +++ b/scripts/kalimdor/ruins_of_ahnqiraj/boss_rajaxx.cpp @@ -166,7 +166,7 @@ struct MANGOS_DLL_DECL npc_general_andorovAI : public ScriptedAI, private Dialog if (!m_pInstance) return; - m_creature->RemoveAllAuras(); + m_creature->RemoveAllAurasOnEvade(); m_creature->DeleteThreatList(); m_creature->CombatStop(true); @@ -320,7 +320,7 @@ struct MANGOS_DLL_DECL npc_kaldorei_eliteAI : public ScriptedAI if (!m_pInstance) return; - m_creature->RemoveAllAuras(); + m_creature->RemoveAllAurasOnEvade(); m_creature->DeleteThreatList(); m_creature->CombatStop(true); diff --git a/scripts/kalimdor/the_barrens.cpp b/scripts/kalimdor/the_barrens.cpp index a44fea12a..fb0b2c4a3 100644 --- a/scripts/kalimdor/the_barrens.cpp +++ b/scripts/kalimdor/the_barrens.cpp @@ -190,7 +190,7 @@ struct MANGOS_DLL_DECL npc_taskmaster_fizzuleAI : public ScriptedAI { if (m_uiResetTimer) { - m_creature->RemoveAllAuras(); + m_creature->RemoveAllAurasOnEvade(); m_creature->DeleteThreatList(); m_creature->CombatStop(true); m_creature->LoadCreatureAddon(true); diff --git a/scripts/northrend/azjol-nerub/ahnkahet/boss_taldaram.cpp b/scripts/northrend/azjol-nerub/ahnkahet/boss_taldaram.cpp index 2d7700fd0..86aec209a 100644 --- a/scripts/northrend/azjol-nerub/ahnkahet/boss_taldaram.cpp +++ b/scripts/northrend/azjol-nerub/ahnkahet/boss_taldaram.cpp @@ -134,7 +134,7 @@ struct MANGOS_DLL_DECL boss_taldaramAI : public ScriptedAI if (m_uiEmbraceTimer) return; - m_creature->RemoveAllAuras(); + m_creature->RemoveAllAurasOnEvade(); m_creature->DeleteThreatList(); m_creature->CombatStop(true); m_creature->LoadCreatureAddon(true); diff --git a/scripts/northrend/howling_fjord.cpp b/scripts/northrend/howling_fjord.cpp index fd639d98b..4ac5c782f 100644 --- a/scripts/northrend/howling_fjord.cpp +++ b/scripts/northrend/howling_fjord.cpp @@ -312,7 +312,7 @@ struct MANGOS_DLL_DECL npc_silvermoon_harryAI : public ScriptedAI { uiDamage = 0; // Take 0 damage - m_creature->RemoveAllAuras(); + m_creature->RemoveAllAurasOnDeath(); m_creature->DeleteThreatList(); m_creature->CombatStop(true); diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp index 4746fca3e..3148ec08f 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp @@ -202,7 +202,7 @@ struct MANGOS_DLL_DECL boss_deathbringer_saurfangAI : public ScriptedAI void EnterEvadeMode() override { - m_creature->RemoveAllAuras(); + m_creature->RemoveAllAurasOnEvade(); m_creature->DeleteThreatList(); m_creature->CombatStop(true); diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp index 3398c3013..e57f94f3a 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp @@ -548,7 +548,7 @@ struct MANGOS_DLL_DECL npc_rimefang_iccAI : public ScriptedAI // evade to point on platform void EnterEvadeMode() override { - m_creature->RemoveAllAuras(); + m_creature->RemoveAllAurasOnEvade(); m_creature->DeleteThreatList(); m_creature->CombatStop(true); @@ -724,7 +724,7 @@ struct MANGOS_DLL_DECL npc_spinestalker_iccAI : public ScriptedAI void EnterEvadeMode() override { - m_creature->RemoveAllAuras(); + m_creature->RemoveAllAurasOnEvade(); m_creature->DeleteThreatList(); m_creature->CombatStop(true); diff --git a/scripts/northrend/nexus/oculus/boss_urom.cpp b/scripts/northrend/nexus/oculus/boss_urom.cpp index ce317d35a..fcada215e 100644 --- a/scripts/northrend/nexus/oculus/boss_urom.cpp +++ b/scripts/northrend/nexus/oculus/boss_urom.cpp @@ -206,7 +206,7 @@ struct MANGOS_DLL_DECL boss_uromAI : public ScriptedAI if (m_bIsPlatformPhase) { - m_creature->RemoveAllAuras(); + m_creature->RemoveAllAurasOnEvade(); m_creature->DeleteThreatList(); m_creature->CombatStop(true); diff --git a/scripts/northrend/ulduar/halls_of_lightning/boss_volkhan.cpp b/scripts/northrend/ulduar/halls_of_lightning/boss_volkhan.cpp index 16741f6cd..c5bdaa7ee 100644 --- a/scripts/northrend/ulduar/halls_of_lightning/boss_volkhan.cpp +++ b/scripts/northrend/ulduar/halls_of_lightning/boss_volkhan.cpp @@ -344,7 +344,7 @@ struct MANGOS_DLL_DECL mob_molten_golemAI : public ScriptedAI void EnterEvadeMode() override { // Evade but keep the current location - m_creature->RemoveAllAuras(); + m_creature->RemoveAllAurasOnEvade(); m_creature->DeleteThreatList(); m_creature->CombatStop(true); m_creature->LoadCreatureAddon(true); diff --git a/scripts/northrend/utgarde_keep/utgarde_keep/boss_keleseth.cpp b/scripts/northrend/utgarde_keep/utgarde_keep/boss_keleseth.cpp index 9137c7e15..27277eb2f 100644 --- a/scripts/northrend/utgarde_keep/utgarde_keep/boss_keleseth.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_keep/boss_keleseth.cpp @@ -120,7 +120,7 @@ struct MANGOS_DLL_DECL mob_vrykul_skeletonAI : public ScriptedAI uiDamage = 0; m_uiReviveTimer = 6000; m_creature->SetHealth(0); - m_creature->RemoveAllAuras(); + m_creature->RemoveAllAurasOnDeath(); m_creature->GetMotionMaster()->Clear(); m_creature->SetFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_DEAD); m_creature->SetStandState(UNIT_STAND_STATE_DEAD); diff --git a/scripts/outland/black_temple/boss_illidan.cpp b/scripts/outland/black_temple/boss_illidan.cpp index 4a5b46dbc..8ef52af3d 100644 --- a/scripts/outland/black_temple/boss_illidan.cpp +++ b/scripts/outland/black_temple/boss_illidan.cpp @@ -1326,7 +1326,7 @@ struct MANGOS_DLL_DECL boss_maievAI : public ScriptedAI, private DialogueHelper // Custom evade - don't allow her to return to home position void EnterEvadeMode() override { - m_creature->RemoveAllAuras(); + m_creature->RemoveAllAurasOnEvade(); m_creature->DeleteThreatList(); m_creature->CombatStop(true); m_creature->LoadCreatureAddon(true); diff --git a/scripts/outland/hellfire_citadel/blood_furnace/boss_broggok.cpp b/scripts/outland/hellfire_citadel/blood_furnace/boss_broggok.cpp index 56bf02c54..fdc59cbc8 100644 --- a/scripts/outland/hellfire_citadel/blood_furnace/boss_broggok.cpp +++ b/scripts/outland/hellfire_citadel/blood_furnace/boss_broggok.cpp @@ -87,7 +87,7 @@ struct MANGOS_DLL_DECL boss_broggokAI : public ScriptedAI void EnterEvadeMode() override { - m_creature->RemoveAllAuras(); + m_creature->RemoveAllAurasOnEvade(); m_creature->DeleteThreatList(); m_creature->CombatStop(true); m_creature->LoadCreatureAddon(true); diff --git a/scripts/outland/shadowmoon_valley.cpp b/scripts/outland/shadowmoon_valley.cpp index b70314017..29513fcc8 100644 --- a/scripts/outland/shadowmoon_valley.cpp +++ b/scripts/outland/shadowmoon_valley.cpp @@ -1491,7 +1491,7 @@ struct MANGOS_DLL_DECL npc_spawned_oronok_tornheartAI : public ScriptedAI, priva void EnterEvadeMode() override { - m_creature->RemoveAllAuras(); + m_creature->RemoveAllAurasOnEvade(); m_creature->DeleteThreatList(); m_creature->CombatStop(true); m_creature->LoadCreatureAddon(true); diff --git a/scripts/outland/tempest_keep/arcatraz/arcatraz.cpp b/scripts/outland/tempest_keep/arcatraz/arcatraz.cpp index 59bc87fe7..ea892f015 100644 --- a/scripts/outland/tempest_keep/arcatraz/arcatraz.cpp +++ b/scripts/outland/tempest_keep/arcatraz/arcatraz.cpp @@ -143,7 +143,7 @@ struct MANGOS_DLL_DECL npc_millhouse_manastormAI : public ScriptedAI, private Di void EnterEvadeMode() override { - m_creature->RemoveAllAuras(); + m_creature->RemoveAllAurasOnEvade(); m_creature->DeleteThreatList(); m_creature->CombatStop(true); m_creature->LoadCreatureAddon(true); diff --git a/scripts/outland/tempest_keep/arcatraz/boss_dalliah.cpp b/scripts/outland/tempest_keep/arcatraz/boss_dalliah.cpp index b76fd4003..7e76ce70e 100644 --- a/scripts/outland/tempest_keep/arcatraz/boss_dalliah.cpp +++ b/scripts/outland/tempest_keep/arcatraz/boss_dalliah.cpp @@ -98,7 +98,7 @@ struct MANGOS_DLL_DECL boss_dalliahAI : public ScriptedAI void EnterEvadeMode() override { - m_creature->RemoveAllAuras(); + m_creature->RemoveAllAurasOnEvade(); m_creature->DeleteThreatList(); m_creature->CombatStop(true); m_creature->LoadCreatureAddon(true); diff --git a/scripts/outland/tempest_keep/arcatraz/boss_soccothrates.cpp b/scripts/outland/tempest_keep/arcatraz/boss_soccothrates.cpp index 4a25ae84a..7a540e1e1 100644 --- a/scripts/outland/tempest_keep/arcatraz/boss_soccothrates.cpp +++ b/scripts/outland/tempest_keep/arcatraz/boss_soccothrates.cpp @@ -129,7 +129,7 @@ struct MANGOS_DLL_DECL boss_soccothratesAI : public ScriptedAI, private Dialogue void EnterEvadeMode() override { - m_creature->RemoveAllAuras(); + m_creature->RemoveAllAurasOnEvade(); m_creature->DeleteThreatList(); m_creature->CombatStop(true); m_creature->LoadCreatureAddon(true); diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 53855c308..b6c4cecdf 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2778" + #define SD2_REVISION_NR "2779" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index d58d08f95..bb7f0dd05 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -3,7 +3,7 @@ -- DELETE FROM sd2_db_version; -INSERT INTO sd2_db_version (version) VALUES ('ScriptDev2 (for C-MaNGOS 12308+) '); +INSERT INTO sd2_db_version (version) VALUES ('ScriptDev2 (for C-MaNGOS 12316+) '); -- -- Below contains data for table `script_texts` mainly used in C++ parts. diff --git a/sql/updates/r2773_scriptdev2.sql b/sql/updates/r2773_scriptdev2.sql index f695a183d..813405d90 100644 --- a/sql/updates/r2773_scriptdev2.sql +++ b/sql/updates/r2773_scriptdev2.sql @@ -1 +1 @@ -UPDATE sd2_db_version SET version='ScriptDev2 (for C-MaNGOS 123 123 12308+) '; +UPDATE sd2_db_version SET version='ScriptDev2 (for C-MaNGOS 12308+) '; diff --git a/sql/updates/r2779_scriptdev2.sql b/sql/updates/r2779_scriptdev2.sql new file mode 100644 index 000000000..6f32983b1 --- /dev/null +++ b/sql/updates/r2779_scriptdev2.sql @@ -0,0 +1 @@ +UPDATE sd2_db_version SET version='ScriptDev2 (for C-MaNGOS 12316+) '; From e7828af1e90e89b3344f67bde2e66546b7052a4e Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Tue, 18 Dec 2012 03:13:56 +0100 Subject: [PATCH 0777/1172] [2780] Make random selection of Mini Bosses in Violet hold more simple --- .../violet_hold/instance_violet_hold.cpp | 53 +++++++------------ scripts/northrend/violet_hold/violet_hold.h | 2 +- sd2_revision_nr.h | 2 +- 3 files changed, 20 insertions(+), 37 deletions(-) diff --git a/scripts/northrend/violet_hold/instance_violet_hold.cpp b/scripts/northrend/violet_hold/instance_violet_hold.cpp index e012ede05..57a2d2bfe 100644 --- a/scripts/northrend/violet_hold/instance_violet_hold.cpp +++ b/scripts/northrend/violet_hold/instance_violet_hold.cpp @@ -116,7 +116,7 @@ void instance_violet_hold::OnCreatureCreate(Creature* pCreature) case NPC_XEVOZZ: case NPC_LAVANTHOR: case NPC_ZURAMAT: - m_lRandomBossList.push_back(pCreature->GetEntry()); + m_vRandomBossList.push_back(pCreature->GetEntry()); break; case NPC_PORTAL_INTRO: @@ -456,49 +456,32 @@ BossSpawn* instance_violet_hold::CreateBossSpawnByEntry(uint32 uiEntry) void instance_violet_hold::SetRandomBosses() { - if (m_vRandomBosses.empty()) - for (uint8 i = 0; i < MAX_MINIBOSSES; ++i) - { - if (m_auiEncounter[aBossInformation[i].uiType] == DONE) - m_vRandomBosses.push_back(CreateBossSpawnByEntry(aBossInformation[i].uiEntry)); - } - - if (m_vRandomBosses.size() >= 2) - return; - - while (m_lRandomBossList.size() > 2) + // Store bosses that are already done + for (uint8 i = 0; i < MAX_MINIBOSSES; ++i) { - uint32 uiPosition = urand(0, m_lRandomBossList.size() - 1); - - for (std::list::iterator itr = m_lRandomBossList.begin(); itr != m_lRandomBossList.end(); ++itr, --uiPosition) - { - if (!*itr) - continue; - - if (!uiPosition) - { - m_lRandomBossList.erase(itr); - break; - } - } + if (m_auiEncounter[aBossInformation[i].uiType] == DONE) + m_vRandomBosses.push_back(CreateBossSpawnByEntry(aBossInformation[i].uiEntry)); } - if (!m_vRandomBosses.empty()) + if (m_vRandomBosses.size() < 2) // Get some new random bosses { - for (std::list::const_iterator itr = m_lRandomBossList.begin(); itr != m_lRandomBossList.end(); ++itr) + std::random_shuffle(m_vRandomBossList.begin(), m_vRandomBossList.end()); + // two required, in case the first is already pushed to m_vRandomBosses + if (m_vRandomBossList.size() < 2) + script_error_log("instance_violet_hold, Mini Bosses are not properly spawned"); + else + m_vRandomBossList.resize(2); + + // Fill up some random bosses + for (std::vector::const_iterator itr = m_vRandomBossList.begin(); itr != m_vRandomBossList.end(); ++itr) { - if (m_vRandomBosses.at(0)->uiEntry != *itr) + if (m_vRandomBosses.empty() || m_vRandomBosses[0]->uiEntry != *itr) m_vRandomBosses.push_back(CreateBossSpawnByEntry(*itr)); } } - else - { - for (std::list::const_iterator itr = m_lRandomBossList.begin(); itr != m_lRandomBossList.end(); ++itr) - m_vRandomBosses.push_back(CreateBossSpawnByEntry(*itr)); - } - for (std::vector::const_iterator itr = m_vRandomBosses.begin(); itr != m_vRandomBosses.end(); ++itr) - debug_log("SD2: instance_violet_hold first random boss is entry %u", (*itr)->uiEntry); + for (uint8 i = 0; i < m_vRandomBosses.size(); ++i) + debug_log("SD2: instance_violet_hold random boss %u is entry %u", i, m_vRandomBosses[i]->uiEntry); } void instance_violet_hold::CallGuards(bool bRespawn) diff --git a/scripts/northrend/violet_hold/violet_hold.h b/scripts/northrend/violet_hold/violet_hold.h index 850884b19..692e35576 100644 --- a/scripts/northrend/violet_hold/violet_hold.h +++ b/scripts/northrend/violet_hold/violet_hold.h @@ -290,7 +290,7 @@ class MANGOS_DLL_DECL instance_violet_hold : public ScriptedInstance GuidList m_lGuardsList; GuidList m_lErekemGuardList; GuidList m_lIchoronTargetsList; - std::list m_lRandomBossList; + std::vector m_vRandomBossList; std::vector m_vRandomBosses; }; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index b6c4cecdf..7abc0c482 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2779" + #define SD2_REVISION_NR "2780" #endif // __SD2_REVISION_NR_H__ From 59091740267d5d623593bf2a2722cae7adb334d0 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Tue, 1 Jan 2013 15:23:16 +0200 Subject: [PATCH 0778/1172] [2781] Happy New Year 2013! --- CMakeLists.txt | 2 +- README | 2 +- ScriptMgr.cpp | 2 +- ScriptMgr.h | 2 +- base/escort_ai.cpp | 2 +- base/escort_ai.h | 2 +- base/follower_ai.cpp | 2 +- base/follower_ai.h | 2 +- base/guard_ai.cpp | 2 +- base/guard_ai.h | 2 +- base/pet_ai.cpp | 2 +- base/pet_ai.h | 2 +- config.h | 2 +- config.h.in | 2 +- include/precompiled.cpp | 2 +- include/precompiled.h | 2 +- include/sc_creature.cpp | 2 +- include/sc_creature.h | 2 +- include/sc_gossip.h | 2 +- include/sc_grid_searchers.cpp | 2 +- include/sc_grid_searchers.h | 2 +- include/sc_instance.cpp | 2 +- include/sc_instance.h | 2 +- scripts/battlegrounds/battleground.cpp | 2 +- scripts/eastern_kingdoms/alterac_mountains.cpp | 2 +- scripts/eastern_kingdoms/arathi_highlands.cpp | 2 +- .../eastern_kingdoms/blackrock_depths/blackrock_depths.cpp | 2 +- scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.h | 2 +- .../blackrock_depths/boss_ambassador_flamelash.cpp | 2 +- .../eastern_kingdoms/blackrock_depths/boss_coren_direbrew.cpp | 2 +- .../blackrock_depths/boss_emperor_dagran_thaurissan.cpp | 2 +- .../blackrock_depths/boss_general_angerforge.cpp | 2 +- .../blackrock_depths/boss_high_interrogator_gerstahn.cpp | 2 +- .../blackrock_depths/instance_blackrock_depths.cpp | 2 +- scripts/eastern_kingdoms/blackrock_spire/blackrock_spire.h | 2 +- scripts/eastern_kingdoms/blackrock_spire/boss_gyth.cpp | 2 +- .../blackrock_spire/boss_overlord_wyrmthalak.cpp | 2 +- .../blackrock_spire/boss_pyroguard_emberseer.cpp | 2 +- .../blackrock_spire/instance_blackrock_spire.cpp | 2 +- scripts/eastern_kingdoms/blackwing_lair/blackwing_lair.h | 2 +- .../blackwing_lair/boss_broodlord_lashlayer.cpp | 2 +- scripts/eastern_kingdoms/blackwing_lair/boss_chromaggus.cpp | 2 +- scripts/eastern_kingdoms/blackwing_lair/boss_ebonroc.cpp | 2 +- scripts/eastern_kingdoms/blackwing_lair/boss_firemaw.cpp | 2 +- scripts/eastern_kingdoms/blackwing_lair/boss_flamegor.cpp | 2 +- scripts/eastern_kingdoms/blackwing_lair/boss_nefarian.cpp | 2 +- scripts/eastern_kingdoms/blackwing_lair/boss_razorgore.cpp | 2 +- scripts/eastern_kingdoms/blackwing_lair/boss_vaelastrasz.cpp | 2 +- .../eastern_kingdoms/blackwing_lair/boss_victor_nefarius.cpp | 2 +- .../blackwing_lair/instance_blackwing_lair.cpp | 2 +- scripts/eastern_kingdoms/blasted_lands.cpp | 2 +- scripts/eastern_kingdoms/burning_steppes.cpp | 2 +- scripts/eastern_kingdoms/deadmines/boss_mr_smite.cpp | 2 +- scripts/eastern_kingdoms/deadmines/deadmines.cpp | 2 +- scripts/eastern_kingdoms/deadmines/deadmines.h | 2 +- scripts/eastern_kingdoms/deadmines/instance_deadmines.cpp | 2 +- scripts/eastern_kingdoms/dun_morogh.cpp | 2 +- scripts/eastern_kingdoms/eastern_plaguelands.cpp | 2 +- scripts/eastern_kingdoms/elwynn_forest.cpp | 2 +- scripts/eastern_kingdoms/eversong_woods.cpp | 2 +- scripts/eastern_kingdoms/ghostlands.cpp | 2 +- scripts/eastern_kingdoms/gnomeregan/boss_thermaplugg.cpp | 2 +- scripts/eastern_kingdoms/gnomeregan/gnomeregan.cpp | 2 +- scripts/eastern_kingdoms/gnomeregan/gnomeregan.h | 2 +- scripts/eastern_kingdoms/gnomeregan/instance_gnomeregan.cpp | 2 +- scripts/eastern_kingdoms/hinterlands.cpp | 2 +- scripts/eastern_kingdoms/ironforge.cpp | 2 +- scripts/eastern_kingdoms/isle_of_queldanas.cpp | 2 +- scripts/eastern_kingdoms/karazhan/boss_curator.cpp | 2 +- scripts/eastern_kingdoms/karazhan/boss_maiden_of_virtue.cpp | 2 +- scripts/eastern_kingdoms/karazhan/boss_midnight.cpp | 2 +- scripts/eastern_kingdoms/karazhan/boss_moroes.cpp | 2 +- scripts/eastern_kingdoms/karazhan/boss_netherspite.cpp | 2 +- scripts/eastern_kingdoms/karazhan/boss_nightbane.cpp | 2 +- scripts/eastern_kingdoms/karazhan/boss_prince_malchezaar.cpp | 2 +- scripts/eastern_kingdoms/karazhan/boss_shade_of_aran.cpp | 2 +- scripts/eastern_kingdoms/karazhan/boss_terestian_illhoof.cpp | 2 +- scripts/eastern_kingdoms/karazhan/bosses_opera.cpp | 2 +- scripts/eastern_kingdoms/karazhan/chess_event.cpp | 2 +- scripts/eastern_kingdoms/karazhan/instance_karazhan.cpp | 2 +- scripts/eastern_kingdoms/karazhan/karazhan.cpp | 2 +- scripts/eastern_kingdoms/karazhan/karazhan.h | 2 +- scripts/eastern_kingdoms/loch_modan.cpp | 2 +- .../magisters_terrace/boss_felblood_kaelthas.cpp | 2 +- .../magisters_terrace/boss_priestess_delrissa.cpp | 2 +- .../magisters_terrace/boss_selin_fireheart.cpp | 2 +- scripts/eastern_kingdoms/magisters_terrace/boss_vexallus.cpp | 2 +- .../magisters_terrace/instance_magisters_terrace.cpp | 2 +- .../eastern_kingdoms/magisters_terrace/magisters_terrace.cpp | 2 +- .../eastern_kingdoms/magisters_terrace/magisters_terrace.h | 2 +- scripts/eastern_kingdoms/molten_core/boss_baron_geddon.cpp | 2 +- scripts/eastern_kingdoms/molten_core/boss_garr.cpp | 2 +- scripts/eastern_kingdoms/molten_core/boss_gehennas.cpp | 2 +- scripts/eastern_kingdoms/molten_core/boss_golemagg.cpp | 2 +- scripts/eastern_kingdoms/molten_core/boss_lucifron.cpp | 2 +- scripts/eastern_kingdoms/molten_core/boss_magmadar.cpp | 2 +- .../eastern_kingdoms/molten_core/boss_majordomo_executus.cpp | 2 +- scripts/eastern_kingdoms/molten_core/boss_ragnaros.cpp | 2 +- scripts/eastern_kingdoms/molten_core/boss_shazzrah.cpp | 2 +- .../eastern_kingdoms/molten_core/boss_sulfuron_harbinger.cpp | 2 +- scripts/eastern_kingdoms/molten_core/instance_molten_core.cpp | 2 +- scripts/eastern_kingdoms/molten_core/molten_core.cpp | 2 +- scripts/eastern_kingdoms/molten_core/molten_core.h | 2 +- scripts/eastern_kingdoms/redridge_mountains.cpp | 2 +- scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp | 2 +- .../eastern_kingdoms/scarlet_enclave/world_map_ebon_hold.cpp | 2 +- .../eastern_kingdoms/scarlet_enclave/world_map_ebon_hold.h | 2 +- .../eastern_kingdoms/scarlet_monastery/boss_arcanist_doan.cpp | 2 +- .../scarlet_monastery/boss_headless_horseman.cpp | 2 +- scripts/eastern_kingdoms/scarlet_monastery/boss_herod.cpp | 2 +- .../scarlet_monastery/boss_mograine_and_whitemane.cpp | 2 +- .../scarlet_monastery/instance_scarlet_monastery.cpp | 2 +- .../eastern_kingdoms/scarlet_monastery/scarlet_monastery.h | 2 +- .../eastern_kingdoms/scholomance/boss_darkmaster_gandling.cpp | 2 +- scripts/eastern_kingdoms/scholomance/boss_jandice_barov.cpp | 2 +- scripts/eastern_kingdoms/scholomance/instance_scholomance.cpp | 2 +- scripts/eastern_kingdoms/scholomance/scholomance.h | 2 +- scripts/eastern_kingdoms/searing_gorge.cpp | 2 +- scripts/eastern_kingdoms/shadowfang_keep/boss_hummel.cpp | 2 +- .../shadowfang_keep/instance_shadowfang_keep.cpp | 2 +- scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.cpp | 2 +- scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.h | 2 +- scripts/eastern_kingdoms/silvermoon_city.cpp | 2 +- scripts/eastern_kingdoms/silverpine_forest.cpp | 2 +- scripts/eastern_kingdoms/stormwind_city.cpp | 2 +- scripts/eastern_kingdoms/stranglethorn_vale.cpp | 2 +- .../eastern_kingdoms/stratholme/boss_baroness_anastari.cpp | 2 +- .../eastern_kingdoms/stratholme/boss_cannon_master_willey.cpp | 2 +- .../eastern_kingdoms/stratholme/boss_dathrohan_balnazzar.cpp | 2 +- .../eastern_kingdoms/stratholme/boss_maleki_the_pallid.cpp | 2 +- .../eastern_kingdoms/stratholme/boss_order_of_silver_hand.cpp | 2 +- scripts/eastern_kingdoms/stratholme/instance_stratholme.cpp | 2 +- scripts/eastern_kingdoms/stratholme/stratholme.cpp | 2 +- scripts/eastern_kingdoms/stratholme/stratholme.h | 2 +- .../eastern_kingdoms/sunken_temple/instance_sunken_temple.cpp | 2 +- scripts/eastern_kingdoms/sunken_temple/sunken_temple.cpp | 2 +- scripts/eastern_kingdoms/sunken_temple/sunken_temple.h | 2 +- scripts/eastern_kingdoms/sunwell_plateau/boss_brutallus.cpp | 2 +- .../eastern_kingdoms/sunwell_plateau/boss_eredar_twins.cpp | 2 +- scripts/eastern_kingdoms/sunwell_plateau/boss_felmyst.cpp | 2 +- scripts/eastern_kingdoms/sunwell_plateau/boss_kalecgos.cpp | 2 +- scripts/eastern_kingdoms/sunwell_plateau/boss_kiljaeden.cpp | 2 +- scripts/eastern_kingdoms/sunwell_plateau/boss_muru.cpp | 2 +- .../sunwell_plateau/instance_sunwell_plateau.cpp | 2 +- scripts/eastern_kingdoms/sunwell_plateau/sunwell_plateau.h | 2 +- scripts/eastern_kingdoms/swamp_of_sorrows.cpp | 2 +- scripts/eastern_kingdoms/tirisfal_glades.cpp | 2 +- scripts/eastern_kingdoms/uldaman/boss_archaedas.cpp | 2 +- scripts/eastern_kingdoms/uldaman/instance_uldaman.cpp | 2 +- scripts/eastern_kingdoms/uldaman/uldaman.cpp | 2 +- scripts/eastern_kingdoms/uldaman/uldaman.h | 2 +- scripts/eastern_kingdoms/undercity.cpp | 2 +- scripts/eastern_kingdoms/western_plaguelands.cpp | 2 +- scripts/eastern_kingdoms/westfall.cpp | 2 +- scripts/eastern_kingdoms/wetlands.cpp | 2 +- scripts/eastern_kingdoms/zulaman/boss_akilzon.cpp | 2 +- scripts/eastern_kingdoms/zulaman/boss_halazzi.cpp | 2 +- scripts/eastern_kingdoms/zulaman/boss_janalai.cpp | 2 +- scripts/eastern_kingdoms/zulaman/boss_malacrass.cpp | 2 +- scripts/eastern_kingdoms/zulaman/boss_nalorakk.cpp | 2 +- scripts/eastern_kingdoms/zulaman/boss_zuljin.cpp | 2 +- scripts/eastern_kingdoms/zulaman/instance_zulaman.cpp | 2 +- scripts/eastern_kingdoms/zulaman/zulaman.cpp | 2 +- scripts/eastern_kingdoms/zulaman/zulaman.h | 2 +- scripts/eastern_kingdoms/zulgurub/boss_arlokk.cpp | 2 +- scripts/eastern_kingdoms/zulgurub/boss_hakkar.cpp | 2 +- scripts/eastern_kingdoms/zulgurub/boss_hazzarah.cpp | 2 +- scripts/eastern_kingdoms/zulgurub/boss_jeklik.cpp | 2 +- scripts/eastern_kingdoms/zulgurub/boss_jindo.cpp | 2 +- scripts/eastern_kingdoms/zulgurub/boss_mandokir.cpp | 2 +- scripts/eastern_kingdoms/zulgurub/boss_marli.cpp | 2 +- scripts/eastern_kingdoms/zulgurub/boss_renataki.cpp | 2 +- scripts/eastern_kingdoms/zulgurub/boss_thekal.cpp | 2 +- scripts/eastern_kingdoms/zulgurub/boss_venoxis.cpp | 2 +- scripts/eastern_kingdoms/zulgurub/instance_zulgurub.cpp | 2 +- scripts/eastern_kingdoms/zulgurub/zulgurub.h | 2 +- scripts/examples/example_creature.cpp | 2 +- scripts/examples/example_escort.cpp | 2 +- scripts/examples/example_gossip_codebox.cpp | 2 +- scripts/examples/example_misc.cpp | 2 +- scripts/kalimdor/ashenvale.cpp | 2 +- scripts/kalimdor/azshara.cpp | 2 +- scripts/kalimdor/azuremyst_isle.cpp | 2 +- scripts/kalimdor/blackfathom_deeps/blackfathom_deeps.h | 2 +- .../kalimdor/blackfathom_deeps/instance_blackfathom_deeps.cpp | 2 +- scripts/kalimdor/bloodmyst_isle.cpp | 2 +- scripts/kalimdor/boss_azuregos.cpp | 2 +- .../culling_of_stratholme/culling_of_stratholme.cpp | 2 +- .../culling_of_stratholme/culling_of_stratholme.h | 2 +- .../culling_of_stratholme/instance_culling_of_stratholme.cpp | 2 +- scripts/kalimdor/caverns_of_time/dark_portal/boss_aeonus.cpp | 2 +- .../caverns_of_time/dark_portal/boss_chrono_lord_deja.cpp | 2 +- .../kalimdor/caverns_of_time/dark_portal/boss_temporus.cpp | 2 +- scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.cpp | 2 +- scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.h | 2 +- .../caverns_of_time/dark_portal/instance_dark_portal.cpp | 2 +- scripts/kalimdor/caverns_of_time/hyjal/boss_archimonde.cpp | 2 +- scripts/kalimdor/caverns_of_time/hyjal/hyjal.cpp | 2 +- scripts/kalimdor/caverns_of_time/hyjal/hyjal.h | 2 +- scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.cpp | 2 +- scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.h | 2 +- scripts/kalimdor/caverns_of_time/hyjal/instance_hyjal.cpp | 2 +- .../caverns_of_time/old_hillsbrad/instance_old_hillsbrad.cpp | 2 +- .../kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.cpp | 2 +- .../kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.h | 2 +- scripts/kalimdor/darkshore.cpp | 2 +- scripts/kalimdor/desolace.cpp | 2 +- scripts/kalimdor/dire_maul/dire_maul.cpp | 2 +- scripts/kalimdor/dire_maul/dire_maul.h | 2 +- scripts/kalimdor/dire_maul/instance_dire_maul.cpp | 2 +- scripts/kalimdor/durotar.cpp | 2 +- scripts/kalimdor/dustwallow_marsh.cpp | 2 +- scripts/kalimdor/felwood.cpp | 2 +- scripts/kalimdor/feralas.cpp | 2 +- scripts/kalimdor/maraudon/boss_noxxion.cpp | 2 +- scripts/kalimdor/moonglade.cpp | 2 +- scripts/kalimdor/mulgore.cpp | 2 +- scripts/kalimdor/onyxias_lair/boss_onyxia.cpp | 2 +- scripts/kalimdor/onyxias_lair/instance_onyxias_lair.cpp | 2 +- scripts/kalimdor/onyxias_lair/onyxias_lair.h | 2 +- scripts/kalimdor/orgrimmar.cpp | 2 +- scripts/kalimdor/razorfen_downs/razorfen_downs.cpp | 2 +- scripts/kalimdor/razorfen_kraul/instance_razorfen_kraul.cpp | 2 +- scripts/kalimdor/razorfen_kraul/razorfen_kraul.cpp | 2 +- scripts/kalimdor/razorfen_kraul/razorfen_kraul.h | 2 +- scripts/kalimdor/ruins_of_ahnqiraj/boss_ayamiss.cpp | 2 +- scripts/kalimdor/ruins_of_ahnqiraj/boss_buru.cpp | 2 +- scripts/kalimdor/ruins_of_ahnqiraj/boss_kurinnaxx.cpp | 2 +- scripts/kalimdor/ruins_of_ahnqiraj/boss_moam.cpp | 2 +- scripts/kalimdor/ruins_of_ahnqiraj/boss_ossirian.cpp | 2 +- scripts/kalimdor/ruins_of_ahnqiraj/boss_rajaxx.cpp | 2 +- .../kalimdor/ruins_of_ahnqiraj/instance_ruins_of_ahnqiraj.cpp | 2 +- scripts/kalimdor/ruins_of_ahnqiraj/ruins_of_ahnqiraj.cpp | 2 +- scripts/kalimdor/ruins_of_ahnqiraj/ruins_of_ahnqiraj.h | 2 +- scripts/kalimdor/silithus.cpp | 2 +- scripts/kalimdor/stonetalon_mountains.cpp | 2 +- scripts/kalimdor/tanaris.cpp | 2 +- scripts/kalimdor/teldrassil.cpp | 2 +- scripts/kalimdor/temple_of_ahnqiraj/boss_bug_trio.cpp | 2 +- scripts/kalimdor/temple_of_ahnqiraj/boss_cthun.cpp | 2 +- scripts/kalimdor/temple_of_ahnqiraj/boss_fankriss.cpp | 2 +- scripts/kalimdor/temple_of_ahnqiraj/boss_huhuran.cpp | 2 +- scripts/kalimdor/temple_of_ahnqiraj/boss_ouro.cpp | 2 +- scripts/kalimdor/temple_of_ahnqiraj/boss_sartura.cpp | 2 +- scripts/kalimdor/temple_of_ahnqiraj/boss_skeram.cpp | 2 +- scripts/kalimdor/temple_of_ahnqiraj/boss_twinemperors.cpp | 2 +- scripts/kalimdor/temple_of_ahnqiraj/boss_viscidus.cpp | 2 +- .../temple_of_ahnqiraj/instance_temple_of_ahnqiraj.cpp | 2 +- .../kalimdor/temple_of_ahnqiraj/mob_anubisath_sentinel.cpp | 2 +- scripts/kalimdor/temple_of_ahnqiraj/temple_of_ahnqiraj.h | 2 +- scripts/kalimdor/the_barrens.cpp | 2 +- scripts/kalimdor/thousand_needles.cpp | 2 +- scripts/kalimdor/thunder_bluff.cpp | 2 +- scripts/kalimdor/ungoro_crater.cpp | 2 +- scripts/kalimdor/wailing_caverns/instance_wailing_caverns.cpp | 2 +- scripts/kalimdor/wailing_caverns/wailing_caverns.cpp | 2 +- scripts/kalimdor/wailing_caverns/wailing_caverns.h | 2 +- scripts/kalimdor/winterspring.cpp | 2 +- scripts/kalimdor/zulfarrak/boss_zumrah.cpp | 2 +- scripts/kalimdor/zulfarrak/instance_zulfarrak.cpp | 2 +- scripts/kalimdor/zulfarrak/zulfarrak.cpp | 2 +- scripts/kalimdor/zulfarrak/zulfarrak.h | 2 +- scripts/northrend/azjol-nerub/ahnkahet/ahnkahet.h | 2 +- scripts/northrend/azjol-nerub/ahnkahet/boss_amanitar.cpp | 2 +- scripts/northrend/azjol-nerub/ahnkahet/boss_jedoga.cpp | 2 +- scripts/northrend/azjol-nerub/ahnkahet/boss_nadox.cpp | 2 +- scripts/northrend/azjol-nerub/ahnkahet/boss_taldaram.cpp | 2 +- scripts/northrend/azjol-nerub/ahnkahet/boss_volazj.cpp | 2 +- scripts/northrend/azjol-nerub/ahnkahet/instance_ahnkahet.cpp | 2 +- scripts/northrend/azjol-nerub/azjol-nerub/azjol-nerub.h | 2 +- scripts/northrend/azjol-nerub/azjol-nerub/boss_anubarak.cpp | 2 +- scripts/northrend/azjol-nerub/azjol-nerub/boss_hadronox.cpp | 2 +- scripts/northrend/azjol-nerub/azjol-nerub/boss_krikthir.cpp | 2 +- .../azjol-nerub/azjol-nerub/instance_azjol-nerub.cpp | 2 +- scripts/northrend/borean_tundra.cpp | 2 +- .../trial_of_the_champion/boss_grand_champions.cpp | 2 +- .../trial_of_the_champion/instance_trial_of_the_champion.cpp | 2 +- .../trial_of_the_champion/trial_of_the_champion.cpp | 2 +- .../trial_of_the_champion/trial_of_the_champion.h | 2 +- .../trial_of_the_crusader/boss_anubarak_trial.cpp | 2 +- .../trial_of_the_crusader/boss_faction_champions.cpp | 2 +- .../trial_of_the_crusader/boss_jaraxxus.cpp | 2 +- .../trial_of_the_crusader/boss_northrend_beasts.cpp | 2 +- .../trial_of_the_crusader/boss_twin_valkyr.cpp | 2 +- .../trial_of_the_crusader/instance_trial_of_the_crusader.cpp | 2 +- .../trial_of_the_crusader/trial_of_the_crusader.cpp | 2 +- .../trial_of_the_crusader/trial_of_the_crusader.h | 2 +- scripts/northrend/dalaran.cpp | 2 +- scripts/northrend/dragonblight.cpp | 2 +- scripts/northrend/draktharon_keep/boss_novos.cpp | 2 +- scripts/northrend/draktharon_keep/boss_tharonja.cpp | 2 +- scripts/northrend/draktharon_keep/boss_trollgore.cpp | 2 +- scripts/northrend/draktharon_keep/draktharon_keep.h | 2 +- .../northrend/draktharon_keep/instance_draktharon_keep.cpp | 2 +- scripts/northrend/grizzly_hills.cpp | 2 +- scripts/northrend/gundrak/boss_colossus.cpp | 2 +- scripts/northrend/gundrak/boss_eck.cpp | 2 +- scripts/northrend/gundrak/boss_galdarah.cpp | 2 +- scripts/northrend/gundrak/boss_moorabi.cpp | 2 +- scripts/northrend/gundrak/boss_sladran.cpp | 2 +- scripts/northrend/gundrak/gundrak.h | 2 +- scripts/northrend/gundrak/instance_gundrak.cpp | 2 +- scripts/northrend/howling_fjord.cpp | 2 +- scripts/northrend/icecrown.cpp | 2 +- .../frozen_halls/forge_of_souls/boss_bronjahm.cpp | 2 +- .../frozen_halls/forge_of_souls/boss_devourer_of_souls.cpp | 2 +- .../frozen_halls/forge_of_souls/forge_of_souls.h | 2 +- .../frozen_halls/forge_of_souls/instance_forge_of_souls.cpp | 2 +- .../frozen_halls/halls_of_reflection/boss_falric.cpp | 2 +- .../frozen_halls/halls_of_reflection/boss_lich_king.cpp | 2 +- .../frozen_halls/halls_of_reflection/boss_marwyn.cpp | 2 +- .../frozen_halls/halls_of_reflection/halls_of_reflection.cpp | 2 +- .../frozen_halls/halls_of_reflection/halls_of_reflection.h | 2 +- .../halls_of_reflection/instance_halls_of_reflection.cpp | 2 +- .../frozen_halls/pit_of_saron/boss_forgemaster_garfrost.cpp | 2 +- .../frozen_halls/pit_of_saron/boss_krick_and_ick.cpp | 2 +- .../frozen_halls/pit_of_saron/boss_scourgelord_tyrannus.cpp | 2 +- .../frozen_halls/pit_of_saron/instance_pit_of_saron.cpp | 2 +- .../frozen_halls/pit_of_saron/pit_of_saron.cpp | 2 +- .../icecrown_citadel/frozen_halls/pit_of_saron/pit_of_saron.h | 2 +- .../icecrown_citadel/blood_prince_council.cpp | 2 +- .../icecrown_citadel/boss_blood_queen_lanathel.cpp | 2 +- .../icecrown_citadel/boss_deathbringer_saurfang.cpp | 2 +- .../icecrown_citadel/icecrown_citadel/boss_festergut.cpp | 2 +- .../icecrown_citadel/boss_lady_deathwhisper.cpp | 2 +- .../icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp | 2 +- .../icecrown_citadel/boss_professor_putricide.cpp | 2 +- .../icecrown_citadel/icecrown_citadel/boss_rotface.cpp | 2 +- .../icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp | 2 +- .../icecrown_citadel/icecrown_citadel/boss_the_lich_king.cpp | 2 +- .../icecrown_citadel/boss_valithria_dreamwalker.cpp | 2 +- .../icecrown_citadel/icecrown_citadel/gunship_battle.cpp | 2 +- .../icecrown_citadel/icecrown_citadel/icecrown_citadel.h | 2 +- .../icecrown_citadel/instance_icecrown_citadel.cpp | 2 +- scripts/northrend/naxxramas/boss_anubrekhan.cpp | 2 +- scripts/northrend/naxxramas/boss_faerlina.cpp | 2 +- scripts/northrend/naxxramas/boss_four_horsemen.cpp | 2 +- scripts/northrend/naxxramas/boss_gluth.cpp | 2 +- scripts/northrend/naxxramas/boss_gothik.cpp | 2 +- scripts/northrend/naxxramas/boss_grobbulus.cpp | 2 +- scripts/northrend/naxxramas/boss_heigan.cpp | 2 +- scripts/northrend/naxxramas/boss_kelthuzad.cpp | 2 +- scripts/northrend/naxxramas/boss_loatheb.cpp | 2 +- scripts/northrend/naxxramas/boss_maexxna.cpp | 2 +- scripts/northrend/naxxramas/boss_noth.cpp | 2 +- scripts/northrend/naxxramas/boss_patchwerk.cpp | 2 +- scripts/northrend/naxxramas/boss_razuvious.cpp | 2 +- scripts/northrend/naxxramas/boss_sapphiron.cpp | 2 +- scripts/northrend/naxxramas/boss_thaddius.cpp | 2 +- scripts/northrend/naxxramas/instance_naxxramas.cpp | 2 +- scripts/northrend/naxxramas/naxxramas.h | 2 +- scripts/northrend/nexus/eye_of_eternity/boss_malygos.cpp | 2 +- scripts/northrend/nexus/eye_of_eternity/eye_of_eternity.h | 2 +- .../nexus/eye_of_eternity/instance_eye_of_eternity.cpp | 2 +- scripts/northrend/nexus/nexus/boss_anomalus.cpp | 2 +- scripts/northrend/nexus/nexus/boss_keristrasza.cpp | 2 +- scripts/northrend/nexus/nexus/boss_ormorok.cpp | 2 +- scripts/northrend/nexus/nexus/boss_telestra.cpp | 2 +- scripts/northrend/nexus/nexus/instance_nexus.cpp | 2 +- scripts/northrend/nexus/nexus/nexus.h | 2 +- scripts/northrend/nexus/oculus/boss_eregos.cpp | 2 +- scripts/northrend/nexus/oculus/boss_urom.cpp | 2 +- scripts/northrend/nexus/oculus/instance_oculus.cpp | 2 +- scripts/northrend/nexus/oculus/oculus.h | 2 +- scripts/northrend/obsidian_sanctum/boss_sartharion.cpp | 2 +- .../northrend/obsidian_sanctum/instance_obsidian_sanctum.cpp | 2 +- scripts/northrend/obsidian_sanctum/obsidian_sanctum.h | 2 +- scripts/northrend/ruby_sanctum/boss_baltharus.cpp | 2 +- scripts/northrend/ruby_sanctum/boss_halion.cpp | 2 +- scripts/northrend/ruby_sanctum/boss_saviana.cpp | 2 +- scripts/northrend/ruby_sanctum/boss_zarithrian.cpp | 2 +- scripts/northrend/ruby_sanctum/instance_ruby_sanctum.cpp | 2 +- scripts/northrend/ruby_sanctum/ruby_sanctum.h | 2 +- scripts/northrend/sholazar_basin.cpp | 2 +- scripts/northrend/storm_peaks.cpp | 2 +- .../northrend/ulduar/halls_of_lightning/boss_bjarngrim.cpp | 2 +- scripts/northrend/ulduar/halls_of_lightning/boss_ionar.cpp | 2 +- scripts/northrend/ulduar/halls_of_lightning/boss_loken.cpp | 2 +- scripts/northrend/ulduar/halls_of_lightning/boss_volkhan.cpp | 2 +- .../northrend/ulduar/halls_of_lightning/halls_of_lightning.h | 2 +- .../ulduar/halls_of_lightning/instance_halls_of_lightning.cpp | 2 +- .../northrend/ulduar/halls_of_stone/boss_maiden_of_grief.cpp | 2 +- scripts/northrend/ulduar/halls_of_stone/boss_sjonnir.cpp | 2 +- scripts/northrend/ulduar/halls_of_stone/halls_of_stone.cpp | 2 +- scripts/northrend/ulduar/halls_of_stone/halls_of_stone.h | 2 +- .../ulduar/halls_of_stone/instance_halls_of_stone.cpp | 2 +- scripts/northrend/ulduar/ulduar/assembly_of_iron.cpp | 2 +- scripts/northrend/ulduar/ulduar/boss_algalon.cpp | 2 +- scripts/northrend/ulduar/ulduar/boss_auriaya.cpp | 2 +- scripts/northrend/ulduar/ulduar/boss_flame_leviathan.cpp | 2 +- scripts/northrend/ulduar/ulduar/boss_freya.cpp | 2 +- scripts/northrend/ulduar/ulduar/boss_general_vezax.cpp | 2 +- scripts/northrend/ulduar/ulduar/boss_hodir.cpp | 2 +- scripts/northrend/ulduar/ulduar/boss_ignis.cpp | 2 +- scripts/northrend/ulduar/ulduar/boss_kologarn.cpp | 2 +- scripts/northrend/ulduar/ulduar/boss_mimiron.cpp | 2 +- scripts/northrend/ulduar/ulduar/boss_razorscale.cpp | 2 +- scripts/northrend/ulduar/ulduar/boss_thorim.cpp | 2 +- scripts/northrend/ulduar/ulduar/boss_xt_002.cpp | 2 +- scripts/northrend/ulduar/ulduar/boss_yogg_saron.cpp | 2 +- scripts/northrend/ulduar/ulduar/instance_ulduar.cpp | 2 +- scripts/northrend/ulduar/ulduar/ulduar.cpp | 2 +- scripts/northrend/ulduar/ulduar/ulduar.h | 2 +- scripts/northrend/utgarde_keep/utgarde_keep/boss_ingvar.cpp | 2 +- scripts/northrend/utgarde_keep/utgarde_keep/boss_keleseth.cpp | 2 +- .../utgarde_keep/utgarde_keep/boss_skarvald_and_dalronn.cpp | 2 +- .../utgarde_keep/utgarde_keep/instance_utgarde_keep.cpp | 2 +- scripts/northrend/utgarde_keep/utgarde_keep/utgarde_keep.cpp | 2 +- scripts/northrend/utgarde_keep/utgarde_keep/utgarde_keep.h | 2 +- .../northrend/utgarde_keep/utgarde_pinnacle/boss_gortok.cpp | 2 +- .../northrend/utgarde_keep/utgarde_pinnacle/boss_skadi.cpp | 2 +- .../northrend/utgarde_keep/utgarde_pinnacle/boss_svala.cpp | 2 +- .../northrend/utgarde_keep/utgarde_pinnacle/boss_ymiron.cpp | 2 +- .../utgarde_pinnacle/instance_utgarde_pinnacle.cpp | 2 +- .../utgarde_keep/utgarde_pinnacle/utgarde_pinnacle.h | 2 +- scripts/northrend/vault_of_archavon/boss_archavon.cpp | 2 +- scripts/northrend/vault_of_archavon/boss_emalon.cpp | 2 +- scripts/northrend/vault_of_archavon/boss_koralon.cpp | 2 +- scripts/northrend/vault_of_archavon/boss_toravon.cpp | 2 +- .../vault_of_archavon/instance_vault_of_archavon.cpp | 2 +- scripts/northrend/vault_of_archavon/vault_of_archavon.h | 2 +- scripts/northrend/violet_hold/boss_erekem.cpp | 2 +- scripts/northrend/violet_hold/boss_ichoron.cpp | 2 +- scripts/northrend/violet_hold/instance_violet_hold.cpp | 2 +- scripts/northrend/violet_hold/violet_hold.cpp | 2 +- scripts/northrend/violet_hold/violet_hold.h | 2 +- scripts/northrend/zuldrak.cpp | 2 +- .../auchindoun/auchenai_crypts/boss_exarch_maladaar.cpp | 2 +- scripts/outland/auchindoun/auchenai_crypts/boss_shirrak.cpp | 2 +- .../auchindoun/mana_tombs/boss_nexusprince_shaffar.cpp | 2 +- scripts/outland/auchindoun/mana_tombs/boss_pandemonius.cpp | 2 +- scripts/outland/auchindoun/sethekk_halls/boss_anzu.cpp | 2 +- .../outland/auchindoun/sethekk_halls/boss_darkweaver_syth.cpp | 2 +- .../auchindoun/sethekk_halls/boss_talon_king_ikiss.cpp | 2 +- .../auchindoun/sethekk_halls/instance_sethekk_halls.cpp | 2 +- scripts/outland/auchindoun/sethekk_halls/sethekk_halls.h | 2 +- .../auchindoun/shadow_labyrinth/boss_ambassador_hellmaw.cpp | 2 +- .../shadow_labyrinth/boss_blackheart_the_inciter.cpp | 2 +- .../auchindoun/shadow_labyrinth/boss_grandmaster_vorpil.cpp | 2 +- scripts/outland/auchindoun/shadow_labyrinth/boss_murmur.cpp | 2 +- .../auchindoun/shadow_labyrinth/instance_shadow_labyrinth.cpp | 2 +- .../outland/auchindoun/shadow_labyrinth/shadow_labyrinth.h | 2 +- scripts/outland/black_temple/black_temple.cpp | 2 +- scripts/outland/black_temple/black_temple.h | 2 +- scripts/outland/black_temple/boss_bloodboil.cpp | 2 +- scripts/outland/black_temple/boss_illidan.cpp | 2 +- scripts/outland/black_temple/boss_mother_shahraz.cpp | 2 +- scripts/outland/black_temple/boss_reliquary_of_souls.cpp | 2 +- scripts/outland/black_temple/boss_shade_of_akama.cpp | 2 +- scripts/outland/black_temple/boss_supremus.cpp | 2 +- scripts/outland/black_temple/boss_teron_gorefiend.cpp | 2 +- scripts/outland/black_temple/boss_warlord_najentus.cpp | 2 +- scripts/outland/black_temple/illidari_council.cpp | 2 +- scripts/outland/black_temple/instance_black_temple.cpp | 2 +- scripts/outland/blades_edge_mountains.cpp | 2 +- scripts/outland/boss_doomlord_kazzak.cpp | 2 +- scripts/outland/boss_doomwalker.cpp | 2 +- .../serpent_shrine/boss_fathomlord_karathress.cpp | 2 +- .../serpent_shrine/boss_hydross_the_unstable.cpp | 2 +- .../coilfang_reservoir/serpent_shrine/boss_lady_vashj.cpp | 2 +- .../serpent_shrine/boss_leotheras_the_blind.cpp | 2 +- .../serpent_shrine/boss_morogrim_tidewalker.cpp | 2 +- .../serpent_shrine/boss_the_lurker_below.cpp | 2 +- .../serpent_shrine/instance_serpent_shrine.cpp | 2 +- .../coilfang_reservoir/serpent_shrine/serpent_shrine.h | 2 +- scripts/outland/coilfang_reservoir/slave_pens/boss_ahune.cpp | 2 +- .../steam_vault/boss_hydromancer_thespia.cpp | 2 +- .../steam_vault/boss_mekgineer_steamrigger.cpp | 2 +- .../steam_vault/boss_warlord_kalithresh.cpp | 2 +- .../coilfang_reservoir/steam_vault/instance_steam_vault.cpp | 2 +- scripts/outland/coilfang_reservoir/steam_vault/steam_vault.h | 2 +- .../outland/coilfang_reservoir/underbog/boss_hungarfen.cpp | 2 +- scripts/outland/gruuls_lair/boss_gruul.cpp | 2 +- scripts/outland/gruuls_lair/boss_high_king_maulgar.cpp | 2 +- scripts/outland/gruuls_lair/gruuls_lair.h | 2 +- scripts/outland/gruuls_lair/instance_gruuls_lair.cpp | 2 +- .../outland/hellfire_citadel/blood_furnace/blood_furnace.h | 2 +- .../outland/hellfire_citadel/blood_furnace/boss_broggok.cpp | 2 +- .../blood_furnace/boss_kelidan_the_breaker.cpp | 2 +- .../outland/hellfire_citadel/blood_furnace/boss_the_maker.cpp | 2 +- .../hellfire_citadel/blood_furnace/instance_blood_furnace.cpp | 2 +- .../hellfire_ramparts/boss_nazan_and_vazruden.cpp | 2 +- .../hellfire_ramparts/boss_omor_the_unscarred.cpp | 2 +- .../hellfire_ramparts/boss_watchkeeper_gargolmar.cpp | 2 +- .../hellfire_citadel/hellfire_ramparts/hellfire_ramparts.h | 2 +- .../hellfire_ramparts/instance_hellfire_ramparts.cpp | 2 +- .../hellfire_citadel/magtheridons_lair/boss_magtheridon.cpp | 2 +- .../magtheridons_lair/instance_magtheridons_lair.cpp | 2 +- .../hellfire_citadel/magtheridons_lair/magtheridons_lair.h | 2 +- .../hellfire_citadel/shattered_halls/boss_nethekurse.cpp | 2 +- .../shattered_halls/boss_warbringer_omrogg.cpp | 2 +- .../shattered_halls/boss_warchief_kargath_bladefist.cpp | 2 +- .../shattered_halls/instance_shattered_halls.cpp | 2 +- .../hellfire_citadel/shattered_halls/shattered_halls.h | 2 +- scripts/outland/hellfire_peninsula.cpp | 2 +- scripts/outland/nagrand.cpp | 2 +- scripts/outland/netherstorm.cpp | 2 +- scripts/outland/shadowmoon_valley.cpp | 2 +- scripts/outland/shattrath_city.cpp | 2 +- scripts/outland/tempest_keep/arcatraz/arcatraz.cpp | 2 +- scripts/outland/tempest_keep/arcatraz/arcatraz.h | 2 +- scripts/outland/tempest_keep/arcatraz/boss_dalliah.cpp | 2 +- .../outland/tempest_keep/arcatraz/boss_harbinger_skyriss.cpp | 2 +- scripts/outland/tempest_keep/arcatraz/boss_soccothrates.cpp | 2 +- scripts/outland/tempest_keep/arcatraz/instance_arcatraz.cpp | 2 +- .../tempest_keep/botanica/boss_high_botanist_freywinn.cpp | 2 +- scripts/outland/tempest_keep/botanica/boss_laj.cpp | 2 +- scripts/outland/tempest_keep/botanica/boss_warp_splinter.cpp | 2 +- scripts/outland/tempest_keep/the_eye/boss_alar.cpp | 2 +- scripts/outland/tempest_keep/the_eye/boss_astromancer.cpp | 2 +- scripts/outland/tempest_keep/the_eye/boss_kaelthas.cpp | 2 +- scripts/outland/tempest_keep/the_eye/boss_void_reaver.cpp | 2 +- scripts/outland/tempest_keep/the_eye/instance_the_eye.cpp | 2 +- scripts/outland/tempest_keep/the_eye/the_eye.h | 2 +- .../tempest_keep/the_mechanar/boss_nethermancer_sepethrea.cpp | 2 +- .../the_mechanar/boss_pathaleon_the_calculator.cpp | 2 +- .../outland/tempest_keep/the_mechanar/instance_mechanar.cpp | 2 +- scripts/outland/tempest_keep/the_mechanar/mechanar.h | 2 +- scripts/outland/terokkar_forest.cpp | 2 +- scripts/outland/zangarmarsh.cpp | 2 +- scripts/world/areatrigger_scripts.cpp | 2 +- scripts/world/bosses_emerald_dragons.cpp | 2 +- scripts/world/go_scripts.cpp | 2 +- scripts/world/guards.cpp | 2 +- scripts/world/item_scripts.cpp | 2 +- scripts/world/mob_generic_creature.cpp | 2 +- scripts/world/npc_professions.cpp | 2 +- scripts/world/npcs_special.cpp | 2 +- scripts/world/spell_scripts.cpp | 2 +- scripts/world/world_map_scripts.cpp | 2 +- scripts/world/world_map_scripts.h | 2 +- sd2_revision_nr.h | 2 +- system/MangosdRev.cpp | 2 +- system/ScriptLoader.cpp | 2 +- system/ScriptLoader.h | 2 +- system/system.cpp | 2 +- system/system.h | 2 +- tool/git_id/git_id.cpp | 4 ++-- 538 files changed, 539 insertions(+), 539 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0e96eba1f..b9a611f8f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,5 @@ # -# Copyright (C) 2005-2012 MaNGOS +# Copyright (C) 2005-2013 MaNGOS # # 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 diff --git a/README b/README index eb4be34e7..075c26e1b 100644 --- a/README +++ b/README @@ -1,6 +1,6 @@ == ScriptDev2 README == - Copyright (C) 2006 - 2012 ScriptDev2 + Copyright (C) 2006 - 2013 ScriptDev2 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 diff --git a/ScriptMgr.cpp b/ScriptMgr.cpp index 9e837b9e7..5c16c0cfa 100644 --- a/ScriptMgr.cpp +++ b/ScriptMgr.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/ScriptMgr.h b/ScriptMgr.h index 8c386fb8a..0200a90e2 100644 --- a/ScriptMgr.h +++ b/ScriptMgr.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/base/escort_ai.cpp b/base/escort_ai.cpp index 4b796aeb0..c5fb212e2 100644 --- a/base/escort_ai.cpp +++ b/base/escort_ai.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/base/escort_ai.h b/base/escort_ai.h index ca4f5a92e..93d4909e6 100644 --- a/base/escort_ai.h +++ b/base/escort_ai.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/base/follower_ai.cpp b/base/follower_ai.cpp index f16f17727..92c06d121 100644 --- a/base/follower_ai.cpp +++ b/base/follower_ai.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/base/follower_ai.h b/base/follower_ai.h index 8811c4562..3c8483472 100644 --- a/base/follower_ai.h +++ b/base/follower_ai.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/base/guard_ai.cpp b/base/guard_ai.cpp index a3792eb81..2e4a741ac 100644 --- a/base/guard_ai.cpp +++ b/base/guard_ai.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/base/guard_ai.h b/base/guard_ai.h index 4b650fea0..08a9a5421 100644 --- a/base/guard_ai.h +++ b/base/guard_ai.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/base/pet_ai.cpp b/base/pet_ai.cpp index 8784d43fc..4c204539c 100644 --- a/base/pet_ai.cpp +++ b/base/pet_ai.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/base/pet_ai.h b/base/pet_ai.h index a668db5ee..9f612ff3d 100644 --- a/base/pet_ai.h +++ b/base/pet_ai.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/config.h b/config.h index f66e4b47f..1a34f38b6 100644 --- a/config.h +++ b/config.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2005-2012 MaNGOS + * Copyright (C) 2005-2013 MaNGOS * * 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 diff --git a/config.h.in b/config.h.in index e7d3411c5..bc62fa277 100644 --- a/config.h.in +++ b/config.h.in @@ -1,5 +1,5 @@ /* - * Copyright (C) 2005-2012 MaNGOS + * Copyright (C) 2005-2013 MaNGOS * * 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 diff --git a/include/precompiled.cpp b/include/precompiled.cpp index 082bcd937..9589d835c 100644 --- a/include/precompiled.cpp +++ b/include/precompiled.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/include/precompiled.h b/include/precompiled.h index 611667ccd..bcc863fd1 100644 --- a/include/precompiled.h +++ b/include/precompiled.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/include/sc_creature.cpp b/include/sc_creature.cpp index 4fddaa3ed..512a86063 100644 --- a/include/sc_creature.cpp +++ b/include/sc_creature.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/include/sc_creature.h b/include/sc_creature.h index 489a37172..8d27a8069 100644 --- a/include/sc_creature.h +++ b/include/sc_creature.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/include/sc_gossip.h b/include/sc_gossip.h index 513cd7a1b..a3c263a34 100644 --- a/include/sc_gossip.h +++ b/include/sc_gossip.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/include/sc_grid_searchers.cpp b/include/sc_grid_searchers.cpp index 0db077a5f..05b455669 100644 --- a/include/sc_grid_searchers.cpp +++ b/include/sc_grid_searchers.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/include/sc_grid_searchers.h b/include/sc_grid_searchers.h index 400a426ad..e2a69f759 100644 --- a/include/sc_grid_searchers.h +++ b/include/sc_grid_searchers.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/include/sc_instance.cpp b/include/sc_instance.cpp index fc5e4dfcc..1601f4504 100644 --- a/include/sc_instance.cpp +++ b/include/sc_instance.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/include/sc_instance.h b/include/sc_instance.h index 2bab4960e..391657755 100644 --- a/include/sc_instance.h +++ b/include/sc_instance.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/battlegrounds/battleground.cpp b/scripts/battlegrounds/battleground.cpp index 3b9e1d6e6..c27434bd2 100644 --- a/scripts/battlegrounds/battleground.cpp +++ b/scripts/battlegrounds/battleground.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/alterac_mountains.cpp b/scripts/eastern_kingdoms/alterac_mountains.cpp index 7fa90cea5..e46aa0688 100644 --- a/scripts/eastern_kingdoms/alterac_mountains.cpp +++ b/scripts/eastern_kingdoms/alterac_mountains.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/arathi_highlands.cpp b/scripts/eastern_kingdoms/arathi_highlands.cpp index 4e5e5ae11..9a2837385 100644 --- a/scripts/eastern_kingdoms/arathi_highlands.cpp +++ b/scripts/eastern_kingdoms/arathi_highlands.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.cpp b/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.cpp index 45f8659f0..5a5fd345b 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.cpp +++ b/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.h b/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.h index afe4639ad..e4c68b6cc 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.h +++ b/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/eastern_kingdoms/blackrock_depths/boss_ambassador_flamelash.cpp b/scripts/eastern_kingdoms/blackrock_depths/boss_ambassador_flamelash.cpp index ac718ef17..51b66d795 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/boss_ambassador_flamelash.cpp +++ b/scripts/eastern_kingdoms/blackrock_depths/boss_ambassador_flamelash.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/blackrock_depths/boss_coren_direbrew.cpp b/scripts/eastern_kingdoms/blackrock_depths/boss_coren_direbrew.cpp index 4bf3c0a97..0a4a92c72 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/boss_coren_direbrew.cpp +++ b/scripts/eastern_kingdoms/blackrock_depths/boss_coren_direbrew.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/blackrock_depths/boss_emperor_dagran_thaurissan.cpp b/scripts/eastern_kingdoms/blackrock_depths/boss_emperor_dagran_thaurissan.cpp index 07bbc97fa..960296fad 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/boss_emperor_dagran_thaurissan.cpp +++ b/scripts/eastern_kingdoms/blackrock_depths/boss_emperor_dagran_thaurissan.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/blackrock_depths/boss_general_angerforge.cpp b/scripts/eastern_kingdoms/blackrock_depths/boss_general_angerforge.cpp index fbc516082..c989f7fce 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/boss_general_angerforge.cpp +++ b/scripts/eastern_kingdoms/blackrock_depths/boss_general_angerforge.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/blackrock_depths/boss_high_interrogator_gerstahn.cpp b/scripts/eastern_kingdoms/blackrock_depths/boss_high_interrogator_gerstahn.cpp index 39fcfc030..e69a3dd9f 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/boss_high_interrogator_gerstahn.cpp +++ b/scripts/eastern_kingdoms/blackrock_depths/boss_high_interrogator_gerstahn.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/blackrock_depths/instance_blackrock_depths.cpp b/scripts/eastern_kingdoms/blackrock_depths/instance_blackrock_depths.cpp index 8dfaa8390..28d8d645d 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/instance_blackrock_depths.cpp +++ b/scripts/eastern_kingdoms/blackrock_depths/instance_blackrock_depths.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/blackrock_spire/blackrock_spire.h b/scripts/eastern_kingdoms/blackrock_spire/blackrock_spire.h index cf1376cb3..8ece31ab5 100644 --- a/scripts/eastern_kingdoms/blackrock_spire/blackrock_spire.h +++ b/scripts/eastern_kingdoms/blackrock_spire/blackrock_spire.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/eastern_kingdoms/blackrock_spire/boss_gyth.cpp b/scripts/eastern_kingdoms/blackrock_spire/boss_gyth.cpp index a742f3ed6..364c03192 100644 --- a/scripts/eastern_kingdoms/blackrock_spire/boss_gyth.cpp +++ b/scripts/eastern_kingdoms/blackrock_spire/boss_gyth.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/blackrock_spire/boss_overlord_wyrmthalak.cpp b/scripts/eastern_kingdoms/blackrock_spire/boss_overlord_wyrmthalak.cpp index f25a83f08..04fe1760f 100644 --- a/scripts/eastern_kingdoms/blackrock_spire/boss_overlord_wyrmthalak.cpp +++ b/scripts/eastern_kingdoms/blackrock_spire/boss_overlord_wyrmthalak.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/blackrock_spire/boss_pyroguard_emberseer.cpp b/scripts/eastern_kingdoms/blackrock_spire/boss_pyroguard_emberseer.cpp index d5d56e831..125b05227 100644 --- a/scripts/eastern_kingdoms/blackrock_spire/boss_pyroguard_emberseer.cpp +++ b/scripts/eastern_kingdoms/blackrock_spire/boss_pyroguard_emberseer.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/blackrock_spire/instance_blackrock_spire.cpp b/scripts/eastern_kingdoms/blackrock_spire/instance_blackrock_spire.cpp index 56d831aec..471434133 100644 --- a/scripts/eastern_kingdoms/blackrock_spire/instance_blackrock_spire.cpp +++ b/scripts/eastern_kingdoms/blackrock_spire/instance_blackrock_spire.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/blackwing_lair/blackwing_lair.h b/scripts/eastern_kingdoms/blackwing_lair/blackwing_lair.h index a19c47322..5f7d92731 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/blackwing_lair.h +++ b/scripts/eastern_kingdoms/blackwing_lair/blackwing_lair.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/eastern_kingdoms/blackwing_lair/boss_broodlord_lashlayer.cpp b/scripts/eastern_kingdoms/blackwing_lair/boss_broodlord_lashlayer.cpp index b4c9c79c2..0888040d5 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/boss_broodlord_lashlayer.cpp +++ b/scripts/eastern_kingdoms/blackwing_lair/boss_broodlord_lashlayer.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/blackwing_lair/boss_chromaggus.cpp b/scripts/eastern_kingdoms/blackwing_lair/boss_chromaggus.cpp index 26776bbae..528d4494e 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/boss_chromaggus.cpp +++ b/scripts/eastern_kingdoms/blackwing_lair/boss_chromaggus.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/blackwing_lair/boss_ebonroc.cpp b/scripts/eastern_kingdoms/blackwing_lair/boss_ebonroc.cpp index e96023747..b48e8d87a 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/boss_ebonroc.cpp +++ b/scripts/eastern_kingdoms/blackwing_lair/boss_ebonroc.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/blackwing_lair/boss_firemaw.cpp b/scripts/eastern_kingdoms/blackwing_lair/boss_firemaw.cpp index c6d35ca5d..fd8b3714f 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/boss_firemaw.cpp +++ b/scripts/eastern_kingdoms/blackwing_lair/boss_firemaw.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/blackwing_lair/boss_flamegor.cpp b/scripts/eastern_kingdoms/blackwing_lair/boss_flamegor.cpp index 7cb7b9331..99c5daf86 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/boss_flamegor.cpp +++ b/scripts/eastern_kingdoms/blackwing_lair/boss_flamegor.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/blackwing_lair/boss_nefarian.cpp b/scripts/eastern_kingdoms/blackwing_lair/boss_nefarian.cpp index 9f0d195a6..a29d139ac 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/boss_nefarian.cpp +++ b/scripts/eastern_kingdoms/blackwing_lair/boss_nefarian.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/blackwing_lair/boss_razorgore.cpp b/scripts/eastern_kingdoms/blackwing_lair/boss_razorgore.cpp index ec0fc22b7..647bcfa5b 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/boss_razorgore.cpp +++ b/scripts/eastern_kingdoms/blackwing_lair/boss_razorgore.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/blackwing_lair/boss_vaelastrasz.cpp b/scripts/eastern_kingdoms/blackwing_lair/boss_vaelastrasz.cpp index 67949c170..3102a646e 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/boss_vaelastrasz.cpp +++ b/scripts/eastern_kingdoms/blackwing_lair/boss_vaelastrasz.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/blackwing_lair/boss_victor_nefarius.cpp b/scripts/eastern_kingdoms/blackwing_lair/boss_victor_nefarius.cpp index 4b580bcd8..9d10d5f59 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/boss_victor_nefarius.cpp +++ b/scripts/eastern_kingdoms/blackwing_lair/boss_victor_nefarius.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/blackwing_lair/instance_blackwing_lair.cpp b/scripts/eastern_kingdoms/blackwing_lair/instance_blackwing_lair.cpp index 89ef65304..68b01c93d 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/instance_blackwing_lair.cpp +++ b/scripts/eastern_kingdoms/blackwing_lair/instance_blackwing_lair.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/blasted_lands.cpp b/scripts/eastern_kingdoms/blasted_lands.cpp index 6f316b99f..20f3a69e2 100644 --- a/scripts/eastern_kingdoms/blasted_lands.cpp +++ b/scripts/eastern_kingdoms/blasted_lands.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/burning_steppes.cpp b/scripts/eastern_kingdoms/burning_steppes.cpp index ddf1b9cae..64d906ca6 100644 --- a/scripts/eastern_kingdoms/burning_steppes.cpp +++ b/scripts/eastern_kingdoms/burning_steppes.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/deadmines/boss_mr_smite.cpp b/scripts/eastern_kingdoms/deadmines/boss_mr_smite.cpp index e96bb64c7..c4b09f664 100644 --- a/scripts/eastern_kingdoms/deadmines/boss_mr_smite.cpp +++ b/scripts/eastern_kingdoms/deadmines/boss_mr_smite.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/deadmines/deadmines.cpp b/scripts/eastern_kingdoms/deadmines/deadmines.cpp index fbc959c81..b61820632 100644 --- a/scripts/eastern_kingdoms/deadmines/deadmines.cpp +++ b/scripts/eastern_kingdoms/deadmines/deadmines.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/deadmines/deadmines.h b/scripts/eastern_kingdoms/deadmines/deadmines.h index 428108659..defa609a7 100644 --- a/scripts/eastern_kingdoms/deadmines/deadmines.h +++ b/scripts/eastern_kingdoms/deadmines/deadmines.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/eastern_kingdoms/deadmines/instance_deadmines.cpp b/scripts/eastern_kingdoms/deadmines/instance_deadmines.cpp index c72289743..83d949bca 100644 --- a/scripts/eastern_kingdoms/deadmines/instance_deadmines.cpp +++ b/scripts/eastern_kingdoms/deadmines/instance_deadmines.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/dun_morogh.cpp b/scripts/eastern_kingdoms/dun_morogh.cpp index c1059fe40..7ed599272 100644 --- a/scripts/eastern_kingdoms/dun_morogh.cpp +++ b/scripts/eastern_kingdoms/dun_morogh.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/eastern_plaguelands.cpp b/scripts/eastern_kingdoms/eastern_plaguelands.cpp index 99ebd3a61..4a76ba211 100644 --- a/scripts/eastern_kingdoms/eastern_plaguelands.cpp +++ b/scripts/eastern_kingdoms/eastern_plaguelands.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/elwynn_forest.cpp b/scripts/eastern_kingdoms/elwynn_forest.cpp index c503ce467..c238f19d1 100644 --- a/scripts/eastern_kingdoms/elwynn_forest.cpp +++ b/scripts/eastern_kingdoms/elwynn_forest.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/eversong_woods.cpp b/scripts/eastern_kingdoms/eversong_woods.cpp index dcba2200a..0bff45eab 100644 --- a/scripts/eastern_kingdoms/eversong_woods.cpp +++ b/scripts/eastern_kingdoms/eversong_woods.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/ghostlands.cpp b/scripts/eastern_kingdoms/ghostlands.cpp index 0b36e42b1..bd11584cf 100644 --- a/scripts/eastern_kingdoms/ghostlands.cpp +++ b/scripts/eastern_kingdoms/ghostlands.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/gnomeregan/boss_thermaplugg.cpp b/scripts/eastern_kingdoms/gnomeregan/boss_thermaplugg.cpp index 2dfaa0f2c..94ad66f5c 100644 --- a/scripts/eastern_kingdoms/gnomeregan/boss_thermaplugg.cpp +++ b/scripts/eastern_kingdoms/gnomeregan/boss_thermaplugg.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/gnomeregan/gnomeregan.cpp b/scripts/eastern_kingdoms/gnomeregan/gnomeregan.cpp index 24dabd0d6..0082446dd 100644 --- a/scripts/eastern_kingdoms/gnomeregan/gnomeregan.cpp +++ b/scripts/eastern_kingdoms/gnomeregan/gnomeregan.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/gnomeregan/gnomeregan.h b/scripts/eastern_kingdoms/gnomeregan/gnomeregan.h index 39c00bcf4..b2a13b45e 100644 --- a/scripts/eastern_kingdoms/gnomeregan/gnomeregan.h +++ b/scripts/eastern_kingdoms/gnomeregan/gnomeregan.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/eastern_kingdoms/gnomeregan/instance_gnomeregan.cpp b/scripts/eastern_kingdoms/gnomeregan/instance_gnomeregan.cpp index 613084b5e..701e11d76 100644 --- a/scripts/eastern_kingdoms/gnomeregan/instance_gnomeregan.cpp +++ b/scripts/eastern_kingdoms/gnomeregan/instance_gnomeregan.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/hinterlands.cpp b/scripts/eastern_kingdoms/hinterlands.cpp index 6827547f0..a1058778a 100644 --- a/scripts/eastern_kingdoms/hinterlands.cpp +++ b/scripts/eastern_kingdoms/hinterlands.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/ironforge.cpp b/scripts/eastern_kingdoms/ironforge.cpp index 00da241ca..f0c63aac4 100644 --- a/scripts/eastern_kingdoms/ironforge.cpp +++ b/scripts/eastern_kingdoms/ironforge.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/isle_of_queldanas.cpp b/scripts/eastern_kingdoms/isle_of_queldanas.cpp index 1c2bad2b3..aab93c1ca 100644 --- a/scripts/eastern_kingdoms/isle_of_queldanas.cpp +++ b/scripts/eastern_kingdoms/isle_of_queldanas.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/karazhan/boss_curator.cpp b/scripts/eastern_kingdoms/karazhan/boss_curator.cpp index 896e3e597..2db55ca61 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_curator.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_curator.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/karazhan/boss_maiden_of_virtue.cpp b/scripts/eastern_kingdoms/karazhan/boss_maiden_of_virtue.cpp index 29a13ce9d..ac49ceb37 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_maiden_of_virtue.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_maiden_of_virtue.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/karazhan/boss_midnight.cpp b/scripts/eastern_kingdoms/karazhan/boss_midnight.cpp index c91dd568d..bcd5254b1 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_midnight.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_midnight.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/karazhan/boss_moroes.cpp b/scripts/eastern_kingdoms/karazhan/boss_moroes.cpp index b0224885c..282e1ae60 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_moroes.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_moroes.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/karazhan/boss_netherspite.cpp b/scripts/eastern_kingdoms/karazhan/boss_netherspite.cpp index b9632c496..a1b9b62fb 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_netherspite.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_netherspite.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/karazhan/boss_nightbane.cpp b/scripts/eastern_kingdoms/karazhan/boss_nightbane.cpp index 84adff3a8..23c80eb89 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_nightbane.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_nightbane.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/karazhan/boss_prince_malchezaar.cpp b/scripts/eastern_kingdoms/karazhan/boss_prince_malchezaar.cpp index 62e09eb8b..f2892dd1a 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_prince_malchezaar.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_prince_malchezaar.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/karazhan/boss_shade_of_aran.cpp b/scripts/eastern_kingdoms/karazhan/boss_shade_of_aran.cpp index 02b741874..a639ec21b 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_shade_of_aran.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_shade_of_aran.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/karazhan/boss_terestian_illhoof.cpp b/scripts/eastern_kingdoms/karazhan/boss_terestian_illhoof.cpp index 85d862279..97e77d8cc 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_terestian_illhoof.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_terestian_illhoof.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/karazhan/bosses_opera.cpp b/scripts/eastern_kingdoms/karazhan/bosses_opera.cpp index 75eb360de..a3f80df88 100644 --- a/scripts/eastern_kingdoms/karazhan/bosses_opera.cpp +++ b/scripts/eastern_kingdoms/karazhan/bosses_opera.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/karazhan/chess_event.cpp b/scripts/eastern_kingdoms/karazhan/chess_event.cpp index 7f1373f99..52515c4c1 100644 --- a/scripts/eastern_kingdoms/karazhan/chess_event.cpp +++ b/scripts/eastern_kingdoms/karazhan/chess_event.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/karazhan/instance_karazhan.cpp b/scripts/eastern_kingdoms/karazhan/instance_karazhan.cpp index 3e9bffe41..3204b36b8 100644 --- a/scripts/eastern_kingdoms/karazhan/instance_karazhan.cpp +++ b/scripts/eastern_kingdoms/karazhan/instance_karazhan.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/karazhan/karazhan.cpp b/scripts/eastern_kingdoms/karazhan/karazhan.cpp index f6aa47edf..e47f76df6 100644 --- a/scripts/eastern_kingdoms/karazhan/karazhan.cpp +++ b/scripts/eastern_kingdoms/karazhan/karazhan.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/karazhan/karazhan.h b/scripts/eastern_kingdoms/karazhan/karazhan.h index 548419da9..1ecb70b30 100644 --- a/scripts/eastern_kingdoms/karazhan/karazhan.h +++ b/scripts/eastern_kingdoms/karazhan/karazhan.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/eastern_kingdoms/loch_modan.cpp b/scripts/eastern_kingdoms/loch_modan.cpp index 46bb20b3f..54e92314d 100644 --- a/scripts/eastern_kingdoms/loch_modan.cpp +++ b/scripts/eastern_kingdoms/loch_modan.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/magisters_terrace/boss_felblood_kaelthas.cpp b/scripts/eastern_kingdoms/magisters_terrace/boss_felblood_kaelthas.cpp index 0af52ff2c..7bfd3c30f 100644 --- a/scripts/eastern_kingdoms/magisters_terrace/boss_felblood_kaelthas.cpp +++ b/scripts/eastern_kingdoms/magisters_terrace/boss_felblood_kaelthas.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/magisters_terrace/boss_priestess_delrissa.cpp b/scripts/eastern_kingdoms/magisters_terrace/boss_priestess_delrissa.cpp index ca309e4c6..d4c9c7a6d 100644 --- a/scripts/eastern_kingdoms/magisters_terrace/boss_priestess_delrissa.cpp +++ b/scripts/eastern_kingdoms/magisters_terrace/boss_priestess_delrissa.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/magisters_terrace/boss_selin_fireheart.cpp b/scripts/eastern_kingdoms/magisters_terrace/boss_selin_fireheart.cpp index cf80f5ce5..51be485d0 100644 --- a/scripts/eastern_kingdoms/magisters_terrace/boss_selin_fireheart.cpp +++ b/scripts/eastern_kingdoms/magisters_terrace/boss_selin_fireheart.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/magisters_terrace/boss_vexallus.cpp b/scripts/eastern_kingdoms/magisters_terrace/boss_vexallus.cpp index d4975d9a1..9c6223a42 100644 --- a/scripts/eastern_kingdoms/magisters_terrace/boss_vexallus.cpp +++ b/scripts/eastern_kingdoms/magisters_terrace/boss_vexallus.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/magisters_terrace/instance_magisters_terrace.cpp b/scripts/eastern_kingdoms/magisters_terrace/instance_magisters_terrace.cpp index 750b17f71..b78f452b5 100644 --- a/scripts/eastern_kingdoms/magisters_terrace/instance_magisters_terrace.cpp +++ b/scripts/eastern_kingdoms/magisters_terrace/instance_magisters_terrace.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.cpp b/scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.cpp index 25d972093..710fdd3f4 100644 --- a/scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.cpp +++ b/scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.h b/scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.h index a2996f1bb..2b08234e9 100644 --- a/scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.h +++ b/scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/eastern_kingdoms/molten_core/boss_baron_geddon.cpp b/scripts/eastern_kingdoms/molten_core/boss_baron_geddon.cpp index 51687ea60..24a22f540 100644 --- a/scripts/eastern_kingdoms/molten_core/boss_baron_geddon.cpp +++ b/scripts/eastern_kingdoms/molten_core/boss_baron_geddon.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/molten_core/boss_garr.cpp b/scripts/eastern_kingdoms/molten_core/boss_garr.cpp index bdbcef624..d13c20eb7 100644 --- a/scripts/eastern_kingdoms/molten_core/boss_garr.cpp +++ b/scripts/eastern_kingdoms/molten_core/boss_garr.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/molten_core/boss_gehennas.cpp b/scripts/eastern_kingdoms/molten_core/boss_gehennas.cpp index 892331b68..a824dcdb0 100644 --- a/scripts/eastern_kingdoms/molten_core/boss_gehennas.cpp +++ b/scripts/eastern_kingdoms/molten_core/boss_gehennas.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/molten_core/boss_golemagg.cpp b/scripts/eastern_kingdoms/molten_core/boss_golemagg.cpp index 6ce932a0d..6fb176585 100644 --- a/scripts/eastern_kingdoms/molten_core/boss_golemagg.cpp +++ b/scripts/eastern_kingdoms/molten_core/boss_golemagg.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/molten_core/boss_lucifron.cpp b/scripts/eastern_kingdoms/molten_core/boss_lucifron.cpp index b6a210032..1f3fa6357 100644 --- a/scripts/eastern_kingdoms/molten_core/boss_lucifron.cpp +++ b/scripts/eastern_kingdoms/molten_core/boss_lucifron.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/molten_core/boss_magmadar.cpp b/scripts/eastern_kingdoms/molten_core/boss_magmadar.cpp index 4e98c045d..8988e99ab 100644 --- a/scripts/eastern_kingdoms/molten_core/boss_magmadar.cpp +++ b/scripts/eastern_kingdoms/molten_core/boss_magmadar.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/molten_core/boss_majordomo_executus.cpp b/scripts/eastern_kingdoms/molten_core/boss_majordomo_executus.cpp index 82b4d408e..18cc38d48 100644 --- a/scripts/eastern_kingdoms/molten_core/boss_majordomo_executus.cpp +++ b/scripts/eastern_kingdoms/molten_core/boss_majordomo_executus.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/molten_core/boss_ragnaros.cpp b/scripts/eastern_kingdoms/molten_core/boss_ragnaros.cpp index e5f1214c3..248b3469c 100644 --- a/scripts/eastern_kingdoms/molten_core/boss_ragnaros.cpp +++ b/scripts/eastern_kingdoms/molten_core/boss_ragnaros.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/molten_core/boss_shazzrah.cpp b/scripts/eastern_kingdoms/molten_core/boss_shazzrah.cpp index dc0d6ac51..56d4c7282 100644 --- a/scripts/eastern_kingdoms/molten_core/boss_shazzrah.cpp +++ b/scripts/eastern_kingdoms/molten_core/boss_shazzrah.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/molten_core/boss_sulfuron_harbinger.cpp b/scripts/eastern_kingdoms/molten_core/boss_sulfuron_harbinger.cpp index 4c722f1d9..8fa9a88bc 100644 --- a/scripts/eastern_kingdoms/molten_core/boss_sulfuron_harbinger.cpp +++ b/scripts/eastern_kingdoms/molten_core/boss_sulfuron_harbinger.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/molten_core/instance_molten_core.cpp b/scripts/eastern_kingdoms/molten_core/instance_molten_core.cpp index 64a206b6c..36c1a1c06 100644 --- a/scripts/eastern_kingdoms/molten_core/instance_molten_core.cpp +++ b/scripts/eastern_kingdoms/molten_core/instance_molten_core.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/molten_core/molten_core.cpp b/scripts/eastern_kingdoms/molten_core/molten_core.cpp index 7145b2038..293595284 100644 --- a/scripts/eastern_kingdoms/molten_core/molten_core.cpp +++ b/scripts/eastern_kingdoms/molten_core/molten_core.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/molten_core/molten_core.h b/scripts/eastern_kingdoms/molten_core/molten_core.h index 68507d58f..5b1174f09 100644 --- a/scripts/eastern_kingdoms/molten_core/molten_core.h +++ b/scripts/eastern_kingdoms/molten_core/molten_core.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/eastern_kingdoms/redridge_mountains.cpp b/scripts/eastern_kingdoms/redridge_mountains.cpp index fb28d5c2c..45b925c45 100644 --- a/scripts/eastern_kingdoms/redridge_mountains.cpp +++ b/scripts/eastern_kingdoms/redridge_mountains.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp b/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp index c97081216..b96d9c042 100644 --- a/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp +++ b/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/scarlet_enclave/world_map_ebon_hold.cpp b/scripts/eastern_kingdoms/scarlet_enclave/world_map_ebon_hold.cpp index c0ccaa518..0cca286e4 100644 --- a/scripts/eastern_kingdoms/scarlet_enclave/world_map_ebon_hold.cpp +++ b/scripts/eastern_kingdoms/scarlet_enclave/world_map_ebon_hold.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/scarlet_enclave/world_map_ebon_hold.h b/scripts/eastern_kingdoms/scarlet_enclave/world_map_ebon_hold.h index dc46e28e5..476897391 100644 --- a/scripts/eastern_kingdoms/scarlet_enclave/world_map_ebon_hold.h +++ b/scripts/eastern_kingdoms/scarlet_enclave/world_map_ebon_hold.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/eastern_kingdoms/scarlet_monastery/boss_arcanist_doan.cpp b/scripts/eastern_kingdoms/scarlet_monastery/boss_arcanist_doan.cpp index a4f278d94..581239d8b 100644 --- a/scripts/eastern_kingdoms/scarlet_monastery/boss_arcanist_doan.cpp +++ b/scripts/eastern_kingdoms/scarlet_monastery/boss_arcanist_doan.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/scarlet_monastery/boss_headless_horseman.cpp b/scripts/eastern_kingdoms/scarlet_monastery/boss_headless_horseman.cpp index 182ac3d43..942e73c28 100644 --- a/scripts/eastern_kingdoms/scarlet_monastery/boss_headless_horseman.cpp +++ b/scripts/eastern_kingdoms/scarlet_monastery/boss_headless_horseman.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/scarlet_monastery/boss_herod.cpp b/scripts/eastern_kingdoms/scarlet_monastery/boss_herod.cpp index f8fde301d..947573d15 100644 --- a/scripts/eastern_kingdoms/scarlet_monastery/boss_herod.cpp +++ b/scripts/eastern_kingdoms/scarlet_monastery/boss_herod.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/scarlet_monastery/boss_mograine_and_whitemane.cpp b/scripts/eastern_kingdoms/scarlet_monastery/boss_mograine_and_whitemane.cpp index 337b79b6f..a1f763e05 100644 --- a/scripts/eastern_kingdoms/scarlet_monastery/boss_mograine_and_whitemane.cpp +++ b/scripts/eastern_kingdoms/scarlet_monastery/boss_mograine_and_whitemane.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/scarlet_monastery/instance_scarlet_monastery.cpp b/scripts/eastern_kingdoms/scarlet_monastery/instance_scarlet_monastery.cpp index f0ed1f97e..71f709ea7 100644 --- a/scripts/eastern_kingdoms/scarlet_monastery/instance_scarlet_monastery.cpp +++ b/scripts/eastern_kingdoms/scarlet_monastery/instance_scarlet_monastery.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/scarlet_monastery/scarlet_monastery.h b/scripts/eastern_kingdoms/scarlet_monastery/scarlet_monastery.h index 3c5d780b4..78b170ac0 100644 --- a/scripts/eastern_kingdoms/scarlet_monastery/scarlet_monastery.h +++ b/scripts/eastern_kingdoms/scarlet_monastery/scarlet_monastery.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/eastern_kingdoms/scholomance/boss_darkmaster_gandling.cpp b/scripts/eastern_kingdoms/scholomance/boss_darkmaster_gandling.cpp index fc9c070e5..55f9e0b34 100644 --- a/scripts/eastern_kingdoms/scholomance/boss_darkmaster_gandling.cpp +++ b/scripts/eastern_kingdoms/scholomance/boss_darkmaster_gandling.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/scholomance/boss_jandice_barov.cpp b/scripts/eastern_kingdoms/scholomance/boss_jandice_barov.cpp index d6023149f..cf70fcdde 100644 --- a/scripts/eastern_kingdoms/scholomance/boss_jandice_barov.cpp +++ b/scripts/eastern_kingdoms/scholomance/boss_jandice_barov.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/scholomance/instance_scholomance.cpp b/scripts/eastern_kingdoms/scholomance/instance_scholomance.cpp index acf8b3c23..d848fdf22 100644 --- a/scripts/eastern_kingdoms/scholomance/instance_scholomance.cpp +++ b/scripts/eastern_kingdoms/scholomance/instance_scholomance.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/scholomance/scholomance.h b/scripts/eastern_kingdoms/scholomance/scholomance.h index 150eae5e0..54d8083c7 100644 --- a/scripts/eastern_kingdoms/scholomance/scholomance.h +++ b/scripts/eastern_kingdoms/scholomance/scholomance.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/eastern_kingdoms/searing_gorge.cpp b/scripts/eastern_kingdoms/searing_gorge.cpp index b723081ff..3f66ef677 100644 --- a/scripts/eastern_kingdoms/searing_gorge.cpp +++ b/scripts/eastern_kingdoms/searing_gorge.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/shadowfang_keep/boss_hummel.cpp b/scripts/eastern_kingdoms/shadowfang_keep/boss_hummel.cpp index 2d5bdeffe..947c5800e 100644 --- a/scripts/eastern_kingdoms/shadowfang_keep/boss_hummel.cpp +++ b/scripts/eastern_kingdoms/shadowfang_keep/boss_hummel.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/shadowfang_keep/instance_shadowfang_keep.cpp b/scripts/eastern_kingdoms/shadowfang_keep/instance_shadowfang_keep.cpp index ada312608..dd7da92b8 100644 --- a/scripts/eastern_kingdoms/shadowfang_keep/instance_shadowfang_keep.cpp +++ b/scripts/eastern_kingdoms/shadowfang_keep/instance_shadowfang_keep.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.cpp b/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.cpp index 402fb09c0..7ec4a1133 100644 --- a/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.cpp +++ b/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.h b/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.h index 4fb9000dc..a79069522 100644 --- a/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.h +++ b/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/eastern_kingdoms/silvermoon_city.cpp b/scripts/eastern_kingdoms/silvermoon_city.cpp index d35c86413..24fd38329 100644 --- a/scripts/eastern_kingdoms/silvermoon_city.cpp +++ b/scripts/eastern_kingdoms/silvermoon_city.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/silverpine_forest.cpp b/scripts/eastern_kingdoms/silverpine_forest.cpp index 7095ce0b3..d98beac99 100644 --- a/scripts/eastern_kingdoms/silverpine_forest.cpp +++ b/scripts/eastern_kingdoms/silverpine_forest.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/stormwind_city.cpp b/scripts/eastern_kingdoms/stormwind_city.cpp index f9ba6b5f4..c9258f58b 100644 --- a/scripts/eastern_kingdoms/stormwind_city.cpp +++ b/scripts/eastern_kingdoms/stormwind_city.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/stranglethorn_vale.cpp b/scripts/eastern_kingdoms/stranglethorn_vale.cpp index 0cfd87207..b499c513a 100644 --- a/scripts/eastern_kingdoms/stranglethorn_vale.cpp +++ b/scripts/eastern_kingdoms/stranglethorn_vale.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/stratholme/boss_baroness_anastari.cpp b/scripts/eastern_kingdoms/stratholme/boss_baroness_anastari.cpp index 7d06502e1..a6d9d4aa5 100644 --- a/scripts/eastern_kingdoms/stratholme/boss_baroness_anastari.cpp +++ b/scripts/eastern_kingdoms/stratholme/boss_baroness_anastari.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/stratholme/boss_cannon_master_willey.cpp b/scripts/eastern_kingdoms/stratholme/boss_cannon_master_willey.cpp index d5c990f43..eac80e9b4 100644 --- a/scripts/eastern_kingdoms/stratholme/boss_cannon_master_willey.cpp +++ b/scripts/eastern_kingdoms/stratholme/boss_cannon_master_willey.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/stratholme/boss_dathrohan_balnazzar.cpp b/scripts/eastern_kingdoms/stratholme/boss_dathrohan_balnazzar.cpp index 1c306025a..0016cc963 100644 --- a/scripts/eastern_kingdoms/stratholme/boss_dathrohan_balnazzar.cpp +++ b/scripts/eastern_kingdoms/stratholme/boss_dathrohan_balnazzar.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/stratholme/boss_maleki_the_pallid.cpp b/scripts/eastern_kingdoms/stratholme/boss_maleki_the_pallid.cpp index f133c75a6..35c4241e5 100644 --- a/scripts/eastern_kingdoms/stratholme/boss_maleki_the_pallid.cpp +++ b/scripts/eastern_kingdoms/stratholme/boss_maleki_the_pallid.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/stratholme/boss_order_of_silver_hand.cpp b/scripts/eastern_kingdoms/stratholme/boss_order_of_silver_hand.cpp index 89158fc0a..cebf216dd 100644 --- a/scripts/eastern_kingdoms/stratholme/boss_order_of_silver_hand.cpp +++ b/scripts/eastern_kingdoms/stratholme/boss_order_of_silver_hand.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/stratholme/instance_stratholme.cpp b/scripts/eastern_kingdoms/stratholme/instance_stratholme.cpp index 205eeee46..11bea2ade 100644 --- a/scripts/eastern_kingdoms/stratholme/instance_stratholme.cpp +++ b/scripts/eastern_kingdoms/stratholme/instance_stratholme.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/stratholme/stratholme.cpp b/scripts/eastern_kingdoms/stratholme/stratholme.cpp index eb2260760..9c43aaef6 100644 --- a/scripts/eastern_kingdoms/stratholme/stratholme.cpp +++ b/scripts/eastern_kingdoms/stratholme/stratholme.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/stratholme/stratholme.h b/scripts/eastern_kingdoms/stratholme/stratholme.h index ce2881cd9..c45b5d1b7 100644 --- a/scripts/eastern_kingdoms/stratholme/stratholme.h +++ b/scripts/eastern_kingdoms/stratholme/stratholme.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/eastern_kingdoms/sunken_temple/instance_sunken_temple.cpp b/scripts/eastern_kingdoms/sunken_temple/instance_sunken_temple.cpp index 73dd208bf..1a1bf60d2 100644 --- a/scripts/eastern_kingdoms/sunken_temple/instance_sunken_temple.cpp +++ b/scripts/eastern_kingdoms/sunken_temple/instance_sunken_temple.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/sunken_temple/sunken_temple.cpp b/scripts/eastern_kingdoms/sunken_temple/sunken_temple.cpp index 1e0a4d84a..c908b75b7 100644 --- a/scripts/eastern_kingdoms/sunken_temple/sunken_temple.cpp +++ b/scripts/eastern_kingdoms/sunken_temple/sunken_temple.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/sunken_temple/sunken_temple.h b/scripts/eastern_kingdoms/sunken_temple/sunken_temple.h index 7749167ba..91e388613 100644 --- a/scripts/eastern_kingdoms/sunken_temple/sunken_temple.h +++ b/scripts/eastern_kingdoms/sunken_temple/sunken_temple.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/eastern_kingdoms/sunwell_plateau/boss_brutallus.cpp b/scripts/eastern_kingdoms/sunwell_plateau/boss_brutallus.cpp index a5ea3ad44..70467b9cc 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/boss_brutallus.cpp +++ b/scripts/eastern_kingdoms/sunwell_plateau/boss_brutallus.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/sunwell_plateau/boss_eredar_twins.cpp b/scripts/eastern_kingdoms/sunwell_plateau/boss_eredar_twins.cpp index 6a97e5a6b..a77aa1e24 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/boss_eredar_twins.cpp +++ b/scripts/eastern_kingdoms/sunwell_plateau/boss_eredar_twins.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/sunwell_plateau/boss_felmyst.cpp b/scripts/eastern_kingdoms/sunwell_plateau/boss_felmyst.cpp index ddeaf34b2..6a0178c19 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/boss_felmyst.cpp +++ b/scripts/eastern_kingdoms/sunwell_plateau/boss_felmyst.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/sunwell_plateau/boss_kalecgos.cpp b/scripts/eastern_kingdoms/sunwell_plateau/boss_kalecgos.cpp index 13c9207dc..c464f155f 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/boss_kalecgos.cpp +++ b/scripts/eastern_kingdoms/sunwell_plateau/boss_kalecgos.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/sunwell_plateau/boss_kiljaeden.cpp b/scripts/eastern_kingdoms/sunwell_plateau/boss_kiljaeden.cpp index 4d07164c3..ac9352c64 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/boss_kiljaeden.cpp +++ b/scripts/eastern_kingdoms/sunwell_plateau/boss_kiljaeden.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/sunwell_plateau/boss_muru.cpp b/scripts/eastern_kingdoms/sunwell_plateau/boss_muru.cpp index b38eabb80..4200445af 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/boss_muru.cpp +++ b/scripts/eastern_kingdoms/sunwell_plateau/boss_muru.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/sunwell_plateau/instance_sunwell_plateau.cpp b/scripts/eastern_kingdoms/sunwell_plateau/instance_sunwell_plateau.cpp index 068182424..f55ee204e 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/instance_sunwell_plateau.cpp +++ b/scripts/eastern_kingdoms/sunwell_plateau/instance_sunwell_plateau.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/sunwell_plateau/sunwell_plateau.h b/scripts/eastern_kingdoms/sunwell_plateau/sunwell_plateau.h index 765385280..2a207c9a9 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/sunwell_plateau.h +++ b/scripts/eastern_kingdoms/sunwell_plateau/sunwell_plateau.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/eastern_kingdoms/swamp_of_sorrows.cpp b/scripts/eastern_kingdoms/swamp_of_sorrows.cpp index 4020e49ad..8e4f46a9d 100644 --- a/scripts/eastern_kingdoms/swamp_of_sorrows.cpp +++ b/scripts/eastern_kingdoms/swamp_of_sorrows.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/tirisfal_glades.cpp b/scripts/eastern_kingdoms/tirisfal_glades.cpp index 77ecab263..a8081f9f2 100644 --- a/scripts/eastern_kingdoms/tirisfal_glades.cpp +++ b/scripts/eastern_kingdoms/tirisfal_glades.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/uldaman/boss_archaedas.cpp b/scripts/eastern_kingdoms/uldaman/boss_archaedas.cpp index 4f8040322..915329664 100644 --- a/scripts/eastern_kingdoms/uldaman/boss_archaedas.cpp +++ b/scripts/eastern_kingdoms/uldaman/boss_archaedas.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/uldaman/instance_uldaman.cpp b/scripts/eastern_kingdoms/uldaman/instance_uldaman.cpp index 5752cbc9b..0c3bc5921 100644 --- a/scripts/eastern_kingdoms/uldaman/instance_uldaman.cpp +++ b/scripts/eastern_kingdoms/uldaman/instance_uldaman.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/uldaman/uldaman.cpp b/scripts/eastern_kingdoms/uldaman/uldaman.cpp index 851f0eb60..4d2371b02 100644 --- a/scripts/eastern_kingdoms/uldaman/uldaman.cpp +++ b/scripts/eastern_kingdoms/uldaman/uldaman.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/uldaman/uldaman.h b/scripts/eastern_kingdoms/uldaman/uldaman.h index 450996256..6e9e90697 100644 --- a/scripts/eastern_kingdoms/uldaman/uldaman.h +++ b/scripts/eastern_kingdoms/uldaman/uldaman.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/eastern_kingdoms/undercity.cpp b/scripts/eastern_kingdoms/undercity.cpp index 977135c58..ab17b5f1e 100644 --- a/scripts/eastern_kingdoms/undercity.cpp +++ b/scripts/eastern_kingdoms/undercity.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/western_plaguelands.cpp b/scripts/eastern_kingdoms/western_plaguelands.cpp index 3929612b0..2f9d8f43f 100644 --- a/scripts/eastern_kingdoms/western_plaguelands.cpp +++ b/scripts/eastern_kingdoms/western_plaguelands.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/westfall.cpp b/scripts/eastern_kingdoms/westfall.cpp index 188a2e523..af9f6b40a 100644 --- a/scripts/eastern_kingdoms/westfall.cpp +++ b/scripts/eastern_kingdoms/westfall.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/wetlands.cpp b/scripts/eastern_kingdoms/wetlands.cpp index 63efc4d71..8dc4eb249 100644 --- a/scripts/eastern_kingdoms/wetlands.cpp +++ b/scripts/eastern_kingdoms/wetlands.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/zulaman/boss_akilzon.cpp b/scripts/eastern_kingdoms/zulaman/boss_akilzon.cpp index 3b04e841e..9f7edae53 100644 --- a/scripts/eastern_kingdoms/zulaman/boss_akilzon.cpp +++ b/scripts/eastern_kingdoms/zulaman/boss_akilzon.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/zulaman/boss_halazzi.cpp b/scripts/eastern_kingdoms/zulaman/boss_halazzi.cpp index 6f0d6cd01..c38a99e01 100644 --- a/scripts/eastern_kingdoms/zulaman/boss_halazzi.cpp +++ b/scripts/eastern_kingdoms/zulaman/boss_halazzi.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/zulaman/boss_janalai.cpp b/scripts/eastern_kingdoms/zulaman/boss_janalai.cpp index ce75145fc..ae9e12e38 100644 --- a/scripts/eastern_kingdoms/zulaman/boss_janalai.cpp +++ b/scripts/eastern_kingdoms/zulaman/boss_janalai.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/zulaman/boss_malacrass.cpp b/scripts/eastern_kingdoms/zulaman/boss_malacrass.cpp index 364ff5324..2a04ee001 100644 --- a/scripts/eastern_kingdoms/zulaman/boss_malacrass.cpp +++ b/scripts/eastern_kingdoms/zulaman/boss_malacrass.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/zulaman/boss_nalorakk.cpp b/scripts/eastern_kingdoms/zulaman/boss_nalorakk.cpp index dc8c842a9..c20560797 100644 --- a/scripts/eastern_kingdoms/zulaman/boss_nalorakk.cpp +++ b/scripts/eastern_kingdoms/zulaman/boss_nalorakk.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/zulaman/boss_zuljin.cpp b/scripts/eastern_kingdoms/zulaman/boss_zuljin.cpp index 27f821c30..46e7905d8 100644 --- a/scripts/eastern_kingdoms/zulaman/boss_zuljin.cpp +++ b/scripts/eastern_kingdoms/zulaman/boss_zuljin.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/zulaman/instance_zulaman.cpp b/scripts/eastern_kingdoms/zulaman/instance_zulaman.cpp index e63fda880..fc91c4971 100644 --- a/scripts/eastern_kingdoms/zulaman/instance_zulaman.cpp +++ b/scripts/eastern_kingdoms/zulaman/instance_zulaman.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/zulaman/zulaman.cpp b/scripts/eastern_kingdoms/zulaman/zulaman.cpp index 6017d7931..ea8867d94 100644 --- a/scripts/eastern_kingdoms/zulaman/zulaman.cpp +++ b/scripts/eastern_kingdoms/zulaman/zulaman.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/zulaman/zulaman.h b/scripts/eastern_kingdoms/zulaman/zulaman.h index 15e3c85b6..88c77a7ce 100644 --- a/scripts/eastern_kingdoms/zulaman/zulaman.h +++ b/scripts/eastern_kingdoms/zulaman/zulaman.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/eastern_kingdoms/zulgurub/boss_arlokk.cpp b/scripts/eastern_kingdoms/zulgurub/boss_arlokk.cpp index 382c292c7..02614ae89 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_arlokk.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_arlokk.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/zulgurub/boss_hakkar.cpp b/scripts/eastern_kingdoms/zulgurub/boss_hakkar.cpp index 33f3dc1fe..a2905b33a 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_hakkar.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_hakkar.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/zulgurub/boss_hazzarah.cpp b/scripts/eastern_kingdoms/zulgurub/boss_hazzarah.cpp index 2e4e1e8b5..ebe63e758 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_hazzarah.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_hazzarah.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/zulgurub/boss_jeklik.cpp b/scripts/eastern_kingdoms/zulgurub/boss_jeklik.cpp index e33c4c343..56bb5d539 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_jeklik.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_jeklik.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/zulgurub/boss_jindo.cpp b/scripts/eastern_kingdoms/zulgurub/boss_jindo.cpp index 874d56e11..e8adc40fd 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_jindo.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_jindo.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/zulgurub/boss_mandokir.cpp b/scripts/eastern_kingdoms/zulgurub/boss_mandokir.cpp index 025c644fa..956ce7166 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_mandokir.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_mandokir.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/zulgurub/boss_marli.cpp b/scripts/eastern_kingdoms/zulgurub/boss_marli.cpp index 177ecd26d..c54079cc9 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_marli.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_marli.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/zulgurub/boss_renataki.cpp b/scripts/eastern_kingdoms/zulgurub/boss_renataki.cpp index 9f5ad513a..f15da2f75 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_renataki.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_renataki.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/zulgurub/boss_thekal.cpp b/scripts/eastern_kingdoms/zulgurub/boss_thekal.cpp index 36c72e7d2..80efca0b0 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_thekal.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_thekal.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/zulgurub/boss_venoxis.cpp b/scripts/eastern_kingdoms/zulgurub/boss_venoxis.cpp index 4ba2b238a..964bee956 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_venoxis.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_venoxis.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/zulgurub/instance_zulgurub.cpp b/scripts/eastern_kingdoms/zulgurub/instance_zulgurub.cpp index e9e362d12..362e72f36 100644 --- a/scripts/eastern_kingdoms/zulgurub/instance_zulgurub.cpp +++ b/scripts/eastern_kingdoms/zulgurub/instance_zulgurub.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/zulgurub/zulgurub.h b/scripts/eastern_kingdoms/zulgurub/zulgurub.h index f5a29c345..0442f1142 100644 --- a/scripts/eastern_kingdoms/zulgurub/zulgurub.h +++ b/scripts/eastern_kingdoms/zulgurub/zulgurub.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/examples/example_creature.cpp b/scripts/examples/example_creature.cpp index 2c235a45c..6afe3a979 100644 --- a/scripts/examples/example_creature.cpp +++ b/scripts/examples/example_creature.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/examples/example_escort.cpp b/scripts/examples/example_escort.cpp index 78d65af47..a753ca112 100644 --- a/scripts/examples/example_escort.cpp +++ b/scripts/examples/example_escort.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/examples/example_gossip_codebox.cpp b/scripts/examples/example_gossip_codebox.cpp index 0f6ee79d0..4e7f2c7a3 100644 --- a/scripts/examples/example_gossip_codebox.cpp +++ b/scripts/examples/example_gossip_codebox.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/examples/example_misc.cpp b/scripts/examples/example_misc.cpp index 464c50b40..a0af083ac 100644 --- a/scripts/examples/example_misc.cpp +++ b/scripts/examples/example_misc.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/kalimdor/ashenvale.cpp b/scripts/kalimdor/ashenvale.cpp index f1d3e18a5..db6dd2bb0 100644 --- a/scripts/kalimdor/ashenvale.cpp +++ b/scripts/kalimdor/ashenvale.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/kalimdor/azshara.cpp b/scripts/kalimdor/azshara.cpp index a507fd7cf..69086147a 100644 --- a/scripts/kalimdor/azshara.cpp +++ b/scripts/kalimdor/azshara.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/kalimdor/azuremyst_isle.cpp b/scripts/kalimdor/azuremyst_isle.cpp index 08988c845..dd3f11190 100644 --- a/scripts/kalimdor/azuremyst_isle.cpp +++ b/scripts/kalimdor/azuremyst_isle.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/kalimdor/blackfathom_deeps/blackfathom_deeps.h b/scripts/kalimdor/blackfathom_deeps/blackfathom_deeps.h index 143b822d5..c4e75d98d 100644 --- a/scripts/kalimdor/blackfathom_deeps/blackfathom_deeps.h +++ b/scripts/kalimdor/blackfathom_deeps/blackfathom_deeps.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/kalimdor/blackfathom_deeps/instance_blackfathom_deeps.cpp b/scripts/kalimdor/blackfathom_deeps/instance_blackfathom_deeps.cpp index ba96e600e..5dcd69d15 100644 --- a/scripts/kalimdor/blackfathom_deeps/instance_blackfathom_deeps.cpp +++ b/scripts/kalimdor/blackfathom_deeps/instance_blackfathom_deeps.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/kalimdor/bloodmyst_isle.cpp b/scripts/kalimdor/bloodmyst_isle.cpp index 172a14260..3c9ec3dca 100644 --- a/scripts/kalimdor/bloodmyst_isle.cpp +++ b/scripts/kalimdor/bloodmyst_isle.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/kalimdor/boss_azuregos.cpp b/scripts/kalimdor/boss_azuregos.cpp index beaebfa93..5ee8403ac 100644 --- a/scripts/kalimdor/boss_azuregos.cpp +++ b/scripts/kalimdor/boss_azuregos.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.cpp b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.cpp index b9ef3d467..5213282ba 100644 --- a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.cpp +++ b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.h b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.h index fe7773b23..b6a976d82 100644 --- a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.h +++ b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/instance_culling_of_stratholme.cpp b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/instance_culling_of_stratholme.cpp index 7b695a58c..2da36f9c4 100644 --- a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/instance_culling_of_stratholme.cpp +++ b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/instance_culling_of_stratholme.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/kalimdor/caverns_of_time/dark_portal/boss_aeonus.cpp b/scripts/kalimdor/caverns_of_time/dark_portal/boss_aeonus.cpp index b7bb02462..e9e2690c7 100644 --- a/scripts/kalimdor/caverns_of_time/dark_portal/boss_aeonus.cpp +++ b/scripts/kalimdor/caverns_of_time/dark_portal/boss_aeonus.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/kalimdor/caverns_of_time/dark_portal/boss_chrono_lord_deja.cpp b/scripts/kalimdor/caverns_of_time/dark_portal/boss_chrono_lord_deja.cpp index 2991aebda..93b7fab8c 100644 --- a/scripts/kalimdor/caverns_of_time/dark_portal/boss_chrono_lord_deja.cpp +++ b/scripts/kalimdor/caverns_of_time/dark_portal/boss_chrono_lord_deja.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/kalimdor/caverns_of_time/dark_portal/boss_temporus.cpp b/scripts/kalimdor/caverns_of_time/dark_portal/boss_temporus.cpp index bab77bb05..62fe29cbd 100644 --- a/scripts/kalimdor/caverns_of_time/dark_portal/boss_temporus.cpp +++ b/scripts/kalimdor/caverns_of_time/dark_portal/boss_temporus.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.cpp b/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.cpp index dfee27cd3..61e729414 100644 --- a/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.cpp +++ b/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.h b/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.h index 201ae7312..e0cf18c45 100644 --- a/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.h +++ b/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/kalimdor/caverns_of_time/dark_portal/instance_dark_portal.cpp b/scripts/kalimdor/caverns_of_time/dark_portal/instance_dark_portal.cpp index e713c200c..787ac63f1 100644 --- a/scripts/kalimdor/caverns_of_time/dark_portal/instance_dark_portal.cpp +++ b/scripts/kalimdor/caverns_of_time/dark_portal/instance_dark_portal.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/kalimdor/caverns_of_time/hyjal/boss_archimonde.cpp b/scripts/kalimdor/caverns_of_time/hyjal/boss_archimonde.cpp index 6d26ca714..fb1018dd7 100644 --- a/scripts/kalimdor/caverns_of_time/hyjal/boss_archimonde.cpp +++ b/scripts/kalimdor/caverns_of_time/hyjal/boss_archimonde.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/kalimdor/caverns_of_time/hyjal/hyjal.cpp b/scripts/kalimdor/caverns_of_time/hyjal/hyjal.cpp index 663b655c5..738c0a846 100644 --- a/scripts/kalimdor/caverns_of_time/hyjal/hyjal.cpp +++ b/scripts/kalimdor/caverns_of_time/hyjal/hyjal.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/kalimdor/caverns_of_time/hyjal/hyjal.h b/scripts/kalimdor/caverns_of_time/hyjal/hyjal.h index d51e170be..539a1a6dc 100644 --- a/scripts/kalimdor/caverns_of_time/hyjal/hyjal.h +++ b/scripts/kalimdor/caverns_of_time/hyjal/hyjal.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.cpp b/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.cpp index 1f1922ea7..a689a257f 100644 --- a/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.cpp +++ b/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.h b/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.h index b8b364f19..9b0b4d4f3 100644 --- a/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.h +++ b/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/kalimdor/caverns_of_time/hyjal/instance_hyjal.cpp b/scripts/kalimdor/caverns_of_time/hyjal/instance_hyjal.cpp index cc6cb0776..894bef629 100644 --- a/scripts/kalimdor/caverns_of_time/hyjal/instance_hyjal.cpp +++ b/scripts/kalimdor/caverns_of_time/hyjal/instance_hyjal.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/kalimdor/caverns_of_time/old_hillsbrad/instance_old_hillsbrad.cpp b/scripts/kalimdor/caverns_of_time/old_hillsbrad/instance_old_hillsbrad.cpp index 33e3691d0..4d6345bad 100644 --- a/scripts/kalimdor/caverns_of_time/old_hillsbrad/instance_old_hillsbrad.cpp +++ b/scripts/kalimdor/caverns_of_time/old_hillsbrad/instance_old_hillsbrad.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.cpp b/scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.cpp index 7bfe87e11..962b221c7 100644 --- a/scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.cpp +++ b/scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.h b/scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.h index 473215d74..ce6954e55 100644 --- a/scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.h +++ b/scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/kalimdor/darkshore.cpp b/scripts/kalimdor/darkshore.cpp index f83d6113b..385ba30cf 100644 --- a/scripts/kalimdor/darkshore.cpp +++ b/scripts/kalimdor/darkshore.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/kalimdor/desolace.cpp b/scripts/kalimdor/desolace.cpp index 16ee8363e..7c1636cc2 100644 --- a/scripts/kalimdor/desolace.cpp +++ b/scripts/kalimdor/desolace.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/kalimdor/dire_maul/dire_maul.cpp b/scripts/kalimdor/dire_maul/dire_maul.cpp index 9f7a5b961..28d5ed68d 100644 --- a/scripts/kalimdor/dire_maul/dire_maul.cpp +++ b/scripts/kalimdor/dire_maul/dire_maul.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/kalimdor/dire_maul/dire_maul.h b/scripts/kalimdor/dire_maul/dire_maul.h index f484203e7..ef9f6a702 100644 --- a/scripts/kalimdor/dire_maul/dire_maul.h +++ b/scripts/kalimdor/dire_maul/dire_maul.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/kalimdor/dire_maul/instance_dire_maul.cpp b/scripts/kalimdor/dire_maul/instance_dire_maul.cpp index 90617c618..a6661530d 100644 --- a/scripts/kalimdor/dire_maul/instance_dire_maul.cpp +++ b/scripts/kalimdor/dire_maul/instance_dire_maul.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/kalimdor/durotar.cpp b/scripts/kalimdor/durotar.cpp index 5b74f7f73..e889f743b 100644 --- a/scripts/kalimdor/durotar.cpp +++ b/scripts/kalimdor/durotar.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/kalimdor/dustwallow_marsh.cpp b/scripts/kalimdor/dustwallow_marsh.cpp index 473d6c8c2..8225d12ab 100644 --- a/scripts/kalimdor/dustwallow_marsh.cpp +++ b/scripts/kalimdor/dustwallow_marsh.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/kalimdor/felwood.cpp b/scripts/kalimdor/felwood.cpp index e1f4fccad..c96341efa 100644 --- a/scripts/kalimdor/felwood.cpp +++ b/scripts/kalimdor/felwood.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/kalimdor/feralas.cpp b/scripts/kalimdor/feralas.cpp index b9a952921..6262aa55c 100644 --- a/scripts/kalimdor/feralas.cpp +++ b/scripts/kalimdor/feralas.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/kalimdor/maraudon/boss_noxxion.cpp b/scripts/kalimdor/maraudon/boss_noxxion.cpp index 532bb7036..23392f769 100644 --- a/scripts/kalimdor/maraudon/boss_noxxion.cpp +++ b/scripts/kalimdor/maraudon/boss_noxxion.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/kalimdor/moonglade.cpp b/scripts/kalimdor/moonglade.cpp index d96a67542..6467b223a 100644 --- a/scripts/kalimdor/moonglade.cpp +++ b/scripts/kalimdor/moonglade.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/kalimdor/mulgore.cpp b/scripts/kalimdor/mulgore.cpp index 0edda6778..b516d3ad3 100644 --- a/scripts/kalimdor/mulgore.cpp +++ b/scripts/kalimdor/mulgore.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/kalimdor/onyxias_lair/boss_onyxia.cpp b/scripts/kalimdor/onyxias_lair/boss_onyxia.cpp index 61bf2d3e8..107491523 100644 --- a/scripts/kalimdor/onyxias_lair/boss_onyxia.cpp +++ b/scripts/kalimdor/onyxias_lair/boss_onyxia.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/kalimdor/onyxias_lair/instance_onyxias_lair.cpp b/scripts/kalimdor/onyxias_lair/instance_onyxias_lair.cpp index b293938b0..0e9c7eb4b 100644 --- a/scripts/kalimdor/onyxias_lair/instance_onyxias_lair.cpp +++ b/scripts/kalimdor/onyxias_lair/instance_onyxias_lair.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/kalimdor/onyxias_lair/onyxias_lair.h b/scripts/kalimdor/onyxias_lair/onyxias_lair.h index eb325c4a2..0c44dc831 100644 --- a/scripts/kalimdor/onyxias_lair/onyxias_lair.h +++ b/scripts/kalimdor/onyxias_lair/onyxias_lair.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/kalimdor/orgrimmar.cpp b/scripts/kalimdor/orgrimmar.cpp index e60c7ebd9..57e3ac3fd 100644 --- a/scripts/kalimdor/orgrimmar.cpp +++ b/scripts/kalimdor/orgrimmar.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/kalimdor/razorfen_downs/razorfen_downs.cpp b/scripts/kalimdor/razorfen_downs/razorfen_downs.cpp index 089b132a8..554634850 100644 --- a/scripts/kalimdor/razorfen_downs/razorfen_downs.cpp +++ b/scripts/kalimdor/razorfen_downs/razorfen_downs.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/kalimdor/razorfen_kraul/instance_razorfen_kraul.cpp b/scripts/kalimdor/razorfen_kraul/instance_razorfen_kraul.cpp index 24d7954b4..94197ba78 100644 --- a/scripts/kalimdor/razorfen_kraul/instance_razorfen_kraul.cpp +++ b/scripts/kalimdor/razorfen_kraul/instance_razorfen_kraul.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/kalimdor/razorfen_kraul/razorfen_kraul.cpp b/scripts/kalimdor/razorfen_kraul/razorfen_kraul.cpp index 871363e66..cdc36651a 100644 --- a/scripts/kalimdor/razorfen_kraul/razorfen_kraul.cpp +++ b/scripts/kalimdor/razorfen_kraul/razorfen_kraul.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/kalimdor/razorfen_kraul/razorfen_kraul.h b/scripts/kalimdor/razorfen_kraul/razorfen_kraul.h index d638a8c96..c7c946f66 100644 --- a/scripts/kalimdor/razorfen_kraul/razorfen_kraul.h +++ b/scripts/kalimdor/razorfen_kraul/razorfen_kraul.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/kalimdor/ruins_of_ahnqiraj/boss_ayamiss.cpp b/scripts/kalimdor/ruins_of_ahnqiraj/boss_ayamiss.cpp index 81087fa83..bf6fe8268 100644 --- a/scripts/kalimdor/ruins_of_ahnqiraj/boss_ayamiss.cpp +++ b/scripts/kalimdor/ruins_of_ahnqiraj/boss_ayamiss.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/kalimdor/ruins_of_ahnqiraj/boss_buru.cpp b/scripts/kalimdor/ruins_of_ahnqiraj/boss_buru.cpp index c653ed50a..112fb568a 100644 --- a/scripts/kalimdor/ruins_of_ahnqiraj/boss_buru.cpp +++ b/scripts/kalimdor/ruins_of_ahnqiraj/boss_buru.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/kalimdor/ruins_of_ahnqiraj/boss_kurinnaxx.cpp b/scripts/kalimdor/ruins_of_ahnqiraj/boss_kurinnaxx.cpp index d25e205d4..b724a42d8 100644 --- a/scripts/kalimdor/ruins_of_ahnqiraj/boss_kurinnaxx.cpp +++ b/scripts/kalimdor/ruins_of_ahnqiraj/boss_kurinnaxx.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/kalimdor/ruins_of_ahnqiraj/boss_moam.cpp b/scripts/kalimdor/ruins_of_ahnqiraj/boss_moam.cpp index 54f9a974f..a28e64a3b 100644 --- a/scripts/kalimdor/ruins_of_ahnqiraj/boss_moam.cpp +++ b/scripts/kalimdor/ruins_of_ahnqiraj/boss_moam.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/kalimdor/ruins_of_ahnqiraj/boss_ossirian.cpp b/scripts/kalimdor/ruins_of_ahnqiraj/boss_ossirian.cpp index 35e90d790..50c73ca95 100644 --- a/scripts/kalimdor/ruins_of_ahnqiraj/boss_ossirian.cpp +++ b/scripts/kalimdor/ruins_of_ahnqiraj/boss_ossirian.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/kalimdor/ruins_of_ahnqiraj/boss_rajaxx.cpp b/scripts/kalimdor/ruins_of_ahnqiraj/boss_rajaxx.cpp index 39ab3dfc6..4e1e8646c 100644 --- a/scripts/kalimdor/ruins_of_ahnqiraj/boss_rajaxx.cpp +++ b/scripts/kalimdor/ruins_of_ahnqiraj/boss_rajaxx.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/kalimdor/ruins_of_ahnqiraj/instance_ruins_of_ahnqiraj.cpp b/scripts/kalimdor/ruins_of_ahnqiraj/instance_ruins_of_ahnqiraj.cpp index 5c51070ad..2b4c41a5d 100644 --- a/scripts/kalimdor/ruins_of_ahnqiraj/instance_ruins_of_ahnqiraj.cpp +++ b/scripts/kalimdor/ruins_of_ahnqiraj/instance_ruins_of_ahnqiraj.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/kalimdor/ruins_of_ahnqiraj/ruins_of_ahnqiraj.cpp b/scripts/kalimdor/ruins_of_ahnqiraj/ruins_of_ahnqiraj.cpp index 44bf5bd24..9bfe6c934 100644 --- a/scripts/kalimdor/ruins_of_ahnqiraj/ruins_of_ahnqiraj.cpp +++ b/scripts/kalimdor/ruins_of_ahnqiraj/ruins_of_ahnqiraj.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/kalimdor/ruins_of_ahnqiraj/ruins_of_ahnqiraj.h b/scripts/kalimdor/ruins_of_ahnqiraj/ruins_of_ahnqiraj.h index e3fe2acbf..4cd568196 100644 --- a/scripts/kalimdor/ruins_of_ahnqiraj/ruins_of_ahnqiraj.h +++ b/scripts/kalimdor/ruins_of_ahnqiraj/ruins_of_ahnqiraj.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/kalimdor/silithus.cpp b/scripts/kalimdor/silithus.cpp index 577f6dc59..1e727ccbb 100644 --- a/scripts/kalimdor/silithus.cpp +++ b/scripts/kalimdor/silithus.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/kalimdor/stonetalon_mountains.cpp b/scripts/kalimdor/stonetalon_mountains.cpp index 77a0534a1..b27a88e52 100644 --- a/scripts/kalimdor/stonetalon_mountains.cpp +++ b/scripts/kalimdor/stonetalon_mountains.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/kalimdor/tanaris.cpp b/scripts/kalimdor/tanaris.cpp index 1db0426cf..a7473ac30 100644 --- a/scripts/kalimdor/tanaris.cpp +++ b/scripts/kalimdor/tanaris.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/kalimdor/teldrassil.cpp b/scripts/kalimdor/teldrassil.cpp index 79780f25f..4bb702b3b 100644 --- a/scripts/kalimdor/teldrassil.cpp +++ b/scripts/kalimdor/teldrassil.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_bug_trio.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_bug_trio.cpp index 39b13cbbf..0528b11e8 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/boss_bug_trio.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_bug_trio.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_cthun.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_cthun.cpp index 24dc44219..1ece7b6c1 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/boss_cthun.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_cthun.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_fankriss.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_fankriss.cpp index 342880c0c..a7edf761a 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/boss_fankriss.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_fankriss.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_huhuran.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_huhuran.cpp index e7cae348f..eba61baad 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/boss_huhuran.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_huhuran.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_ouro.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_ouro.cpp index a9d380834..87d37c628 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/boss_ouro.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_ouro.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_sartura.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_sartura.cpp index a9998806f..d0a38b0fc 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/boss_sartura.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_sartura.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_skeram.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_skeram.cpp index 7a4378339..b39a8fd60 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/boss_skeram.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_skeram.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_twinemperors.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_twinemperors.cpp index 72440c038..f5ed211a7 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/boss_twinemperors.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_twinemperors.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_viscidus.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_viscidus.cpp index e86b27c0c..9d36ca21e 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/boss_viscidus.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_viscidus.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/kalimdor/temple_of_ahnqiraj/instance_temple_of_ahnqiraj.cpp b/scripts/kalimdor/temple_of_ahnqiraj/instance_temple_of_ahnqiraj.cpp index e16179715..6bfaf3e11 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/instance_temple_of_ahnqiraj.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/instance_temple_of_ahnqiraj.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/kalimdor/temple_of_ahnqiraj/mob_anubisath_sentinel.cpp b/scripts/kalimdor/temple_of_ahnqiraj/mob_anubisath_sentinel.cpp index 6fc2785ae..95e9f89de 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/mob_anubisath_sentinel.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/mob_anubisath_sentinel.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/kalimdor/temple_of_ahnqiraj/temple_of_ahnqiraj.h b/scripts/kalimdor/temple_of_ahnqiraj/temple_of_ahnqiraj.h index ffb00ded7..4979d1da5 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/temple_of_ahnqiraj.h +++ b/scripts/kalimdor/temple_of_ahnqiraj/temple_of_ahnqiraj.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/kalimdor/the_barrens.cpp b/scripts/kalimdor/the_barrens.cpp index fb0b2c4a3..a43fdbedf 100644 --- a/scripts/kalimdor/the_barrens.cpp +++ b/scripts/kalimdor/the_barrens.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/kalimdor/thousand_needles.cpp b/scripts/kalimdor/thousand_needles.cpp index 6074498d4..428720e38 100644 --- a/scripts/kalimdor/thousand_needles.cpp +++ b/scripts/kalimdor/thousand_needles.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/kalimdor/thunder_bluff.cpp b/scripts/kalimdor/thunder_bluff.cpp index 87c9e0f26..36e8e8f7f 100644 --- a/scripts/kalimdor/thunder_bluff.cpp +++ b/scripts/kalimdor/thunder_bluff.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/kalimdor/ungoro_crater.cpp b/scripts/kalimdor/ungoro_crater.cpp index d4a404183..7f216e34f 100644 --- a/scripts/kalimdor/ungoro_crater.cpp +++ b/scripts/kalimdor/ungoro_crater.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/kalimdor/wailing_caverns/instance_wailing_caverns.cpp b/scripts/kalimdor/wailing_caverns/instance_wailing_caverns.cpp index f92da9999..15d019efd 100644 --- a/scripts/kalimdor/wailing_caverns/instance_wailing_caverns.cpp +++ b/scripts/kalimdor/wailing_caverns/instance_wailing_caverns.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/kalimdor/wailing_caverns/wailing_caverns.cpp b/scripts/kalimdor/wailing_caverns/wailing_caverns.cpp index 4a15105f8..4ce7909af 100644 --- a/scripts/kalimdor/wailing_caverns/wailing_caverns.cpp +++ b/scripts/kalimdor/wailing_caverns/wailing_caverns.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/kalimdor/wailing_caverns/wailing_caverns.h b/scripts/kalimdor/wailing_caverns/wailing_caverns.h index 0512fdc42..8b2806762 100644 --- a/scripts/kalimdor/wailing_caverns/wailing_caverns.h +++ b/scripts/kalimdor/wailing_caverns/wailing_caverns.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/kalimdor/winterspring.cpp b/scripts/kalimdor/winterspring.cpp index 319992ebf..c65c8b236 100644 --- a/scripts/kalimdor/winterspring.cpp +++ b/scripts/kalimdor/winterspring.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/kalimdor/zulfarrak/boss_zumrah.cpp b/scripts/kalimdor/zulfarrak/boss_zumrah.cpp index 57de52393..fc4867d69 100644 --- a/scripts/kalimdor/zulfarrak/boss_zumrah.cpp +++ b/scripts/kalimdor/zulfarrak/boss_zumrah.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/kalimdor/zulfarrak/instance_zulfarrak.cpp b/scripts/kalimdor/zulfarrak/instance_zulfarrak.cpp index 6f23145df..4e7540eef 100644 --- a/scripts/kalimdor/zulfarrak/instance_zulfarrak.cpp +++ b/scripts/kalimdor/zulfarrak/instance_zulfarrak.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/kalimdor/zulfarrak/zulfarrak.cpp b/scripts/kalimdor/zulfarrak/zulfarrak.cpp index 49abe00c5..f5d0b98e9 100644 --- a/scripts/kalimdor/zulfarrak/zulfarrak.cpp +++ b/scripts/kalimdor/zulfarrak/zulfarrak.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/kalimdor/zulfarrak/zulfarrak.h b/scripts/kalimdor/zulfarrak/zulfarrak.h index 1c1c3f7a9..0ca08e921 100644 --- a/scripts/kalimdor/zulfarrak/zulfarrak.h +++ b/scripts/kalimdor/zulfarrak/zulfarrak.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/northrend/azjol-nerub/ahnkahet/ahnkahet.h b/scripts/northrend/azjol-nerub/ahnkahet/ahnkahet.h index cd3ea8124..28ce05f99 100644 --- a/scripts/northrend/azjol-nerub/ahnkahet/ahnkahet.h +++ b/scripts/northrend/azjol-nerub/ahnkahet/ahnkahet.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/northrend/azjol-nerub/ahnkahet/boss_amanitar.cpp b/scripts/northrend/azjol-nerub/ahnkahet/boss_amanitar.cpp index c140d989d..0f276aa79 100644 --- a/scripts/northrend/azjol-nerub/ahnkahet/boss_amanitar.cpp +++ b/scripts/northrend/azjol-nerub/ahnkahet/boss_amanitar.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/northrend/azjol-nerub/ahnkahet/boss_jedoga.cpp b/scripts/northrend/azjol-nerub/ahnkahet/boss_jedoga.cpp index 8b495ecce..1c8f500e7 100644 --- a/scripts/northrend/azjol-nerub/ahnkahet/boss_jedoga.cpp +++ b/scripts/northrend/azjol-nerub/ahnkahet/boss_jedoga.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/northrend/azjol-nerub/ahnkahet/boss_nadox.cpp b/scripts/northrend/azjol-nerub/ahnkahet/boss_nadox.cpp index a4d5622e2..e794bad26 100644 --- a/scripts/northrend/azjol-nerub/ahnkahet/boss_nadox.cpp +++ b/scripts/northrend/azjol-nerub/ahnkahet/boss_nadox.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/northrend/azjol-nerub/ahnkahet/boss_taldaram.cpp b/scripts/northrend/azjol-nerub/ahnkahet/boss_taldaram.cpp index 86aec209a..4a3aa2564 100644 --- a/scripts/northrend/azjol-nerub/ahnkahet/boss_taldaram.cpp +++ b/scripts/northrend/azjol-nerub/ahnkahet/boss_taldaram.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/northrend/azjol-nerub/ahnkahet/boss_volazj.cpp b/scripts/northrend/azjol-nerub/ahnkahet/boss_volazj.cpp index 5128dcb2a..73abb09da 100644 --- a/scripts/northrend/azjol-nerub/ahnkahet/boss_volazj.cpp +++ b/scripts/northrend/azjol-nerub/ahnkahet/boss_volazj.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/northrend/azjol-nerub/ahnkahet/instance_ahnkahet.cpp b/scripts/northrend/azjol-nerub/ahnkahet/instance_ahnkahet.cpp index f114d3023..5a2a5bcad 100644 --- a/scripts/northrend/azjol-nerub/ahnkahet/instance_ahnkahet.cpp +++ b/scripts/northrend/azjol-nerub/ahnkahet/instance_ahnkahet.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/northrend/azjol-nerub/azjol-nerub/azjol-nerub.h b/scripts/northrend/azjol-nerub/azjol-nerub/azjol-nerub.h index 0d17b3e02..49e0c393d 100644 --- a/scripts/northrend/azjol-nerub/azjol-nerub/azjol-nerub.h +++ b/scripts/northrend/azjol-nerub/azjol-nerub/azjol-nerub.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/northrend/azjol-nerub/azjol-nerub/boss_anubarak.cpp b/scripts/northrend/azjol-nerub/azjol-nerub/boss_anubarak.cpp index 8b0d34036..8378c327b 100644 --- a/scripts/northrend/azjol-nerub/azjol-nerub/boss_anubarak.cpp +++ b/scripts/northrend/azjol-nerub/azjol-nerub/boss_anubarak.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/northrend/azjol-nerub/azjol-nerub/boss_hadronox.cpp b/scripts/northrend/azjol-nerub/azjol-nerub/boss_hadronox.cpp index 224e16dca..d632d9c52 100644 --- a/scripts/northrend/azjol-nerub/azjol-nerub/boss_hadronox.cpp +++ b/scripts/northrend/azjol-nerub/azjol-nerub/boss_hadronox.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/northrend/azjol-nerub/azjol-nerub/boss_krikthir.cpp b/scripts/northrend/azjol-nerub/azjol-nerub/boss_krikthir.cpp index ca1c8436f..32685259c 100644 --- a/scripts/northrend/azjol-nerub/azjol-nerub/boss_krikthir.cpp +++ b/scripts/northrend/azjol-nerub/azjol-nerub/boss_krikthir.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/northrend/azjol-nerub/azjol-nerub/instance_azjol-nerub.cpp b/scripts/northrend/azjol-nerub/azjol-nerub/instance_azjol-nerub.cpp index 9e7d126d7..88b14de6d 100644 --- a/scripts/northrend/azjol-nerub/azjol-nerub/instance_azjol-nerub.cpp +++ b/scripts/northrend/azjol-nerub/azjol-nerub/instance_azjol-nerub.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/northrend/borean_tundra.cpp b/scripts/northrend/borean_tundra.cpp index 8d207a6e4..a7aa21dc0 100644 --- a/scripts/northrend/borean_tundra.cpp +++ b/scripts/northrend/borean_tundra.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_grand_champions.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_grand_champions.cpp index bd491f587..f0e1e2034 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_grand_champions.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_grand_champions.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/instance_trial_of_the_champion.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/instance_trial_of_the_champion.cpp index 3f03695c5..b1137a127 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/instance_trial_of_the_champion.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/instance_trial_of_the_champion.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.cpp index 4bfe346c8..ed82aa8d6 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.h b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.h index 39b55659b..c891b24d2 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.h +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp index 75be14edc..15b6447fe 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_faction_champions.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_faction_champions.cpp index 67f9078e4..c96032af5 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_faction_champions.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_faction_champions.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_jaraxxus.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_jaraxxus.cpp index af710096a..406a52af5 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_jaraxxus.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_jaraxxus.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp index b588c5632..90c9b142c 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp index 26fcdc016..9cdf4a05c 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp index 2369d847c..c03738a98 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp index 9ded90c07..6eb24d001 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h index 1ad0ce464..0e40a8435 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/northrend/dalaran.cpp b/scripts/northrend/dalaran.cpp index cb5102ca6..d8a30d5ea 100644 --- a/scripts/northrend/dalaran.cpp +++ b/scripts/northrend/dalaran.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/northrend/dragonblight.cpp b/scripts/northrend/dragonblight.cpp index 9513cfdc9..8c47d8616 100644 --- a/scripts/northrend/dragonblight.cpp +++ b/scripts/northrend/dragonblight.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/northrend/draktharon_keep/boss_novos.cpp b/scripts/northrend/draktharon_keep/boss_novos.cpp index c2fd6d9ff..e681eea0e 100644 --- a/scripts/northrend/draktharon_keep/boss_novos.cpp +++ b/scripts/northrend/draktharon_keep/boss_novos.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/northrend/draktharon_keep/boss_tharonja.cpp b/scripts/northrend/draktharon_keep/boss_tharonja.cpp index 999630a5f..964ba685a 100644 --- a/scripts/northrend/draktharon_keep/boss_tharonja.cpp +++ b/scripts/northrend/draktharon_keep/boss_tharonja.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/northrend/draktharon_keep/boss_trollgore.cpp b/scripts/northrend/draktharon_keep/boss_trollgore.cpp index a138f9836..592da4332 100644 --- a/scripts/northrend/draktharon_keep/boss_trollgore.cpp +++ b/scripts/northrend/draktharon_keep/boss_trollgore.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/northrend/draktharon_keep/draktharon_keep.h b/scripts/northrend/draktharon_keep/draktharon_keep.h index 6ea281f4a..72966f013 100644 --- a/scripts/northrend/draktharon_keep/draktharon_keep.h +++ b/scripts/northrend/draktharon_keep/draktharon_keep.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/northrend/draktharon_keep/instance_draktharon_keep.cpp b/scripts/northrend/draktharon_keep/instance_draktharon_keep.cpp index dd51e3f90..aa1ba2b45 100644 --- a/scripts/northrend/draktharon_keep/instance_draktharon_keep.cpp +++ b/scripts/northrend/draktharon_keep/instance_draktharon_keep.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/northrend/grizzly_hills.cpp b/scripts/northrend/grizzly_hills.cpp index dbfab6011..a5aef48a1 100644 --- a/scripts/northrend/grizzly_hills.cpp +++ b/scripts/northrend/grizzly_hills.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/northrend/gundrak/boss_colossus.cpp b/scripts/northrend/gundrak/boss_colossus.cpp index bac07caaa..9ad669e06 100644 --- a/scripts/northrend/gundrak/boss_colossus.cpp +++ b/scripts/northrend/gundrak/boss_colossus.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/northrend/gundrak/boss_eck.cpp b/scripts/northrend/gundrak/boss_eck.cpp index 3cf14a2dc..5b2654ed4 100644 --- a/scripts/northrend/gundrak/boss_eck.cpp +++ b/scripts/northrend/gundrak/boss_eck.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/northrend/gundrak/boss_galdarah.cpp b/scripts/northrend/gundrak/boss_galdarah.cpp index 8d0992093..c7be66de6 100644 --- a/scripts/northrend/gundrak/boss_galdarah.cpp +++ b/scripts/northrend/gundrak/boss_galdarah.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/northrend/gundrak/boss_moorabi.cpp b/scripts/northrend/gundrak/boss_moorabi.cpp index 06d91bb33..a0b523c27 100644 --- a/scripts/northrend/gundrak/boss_moorabi.cpp +++ b/scripts/northrend/gundrak/boss_moorabi.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/northrend/gundrak/boss_sladran.cpp b/scripts/northrend/gundrak/boss_sladran.cpp index 28763a3ae..62d36147c 100644 --- a/scripts/northrend/gundrak/boss_sladran.cpp +++ b/scripts/northrend/gundrak/boss_sladran.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/northrend/gundrak/gundrak.h b/scripts/northrend/gundrak/gundrak.h index bd2e15a96..cffc3794f 100644 --- a/scripts/northrend/gundrak/gundrak.h +++ b/scripts/northrend/gundrak/gundrak.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/northrend/gundrak/instance_gundrak.cpp b/scripts/northrend/gundrak/instance_gundrak.cpp index 990e4628f..761e0958e 100644 --- a/scripts/northrend/gundrak/instance_gundrak.cpp +++ b/scripts/northrend/gundrak/instance_gundrak.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/northrend/howling_fjord.cpp b/scripts/northrend/howling_fjord.cpp index 4ac5c782f..486707e63 100644 --- a/scripts/northrend/howling_fjord.cpp +++ b/scripts/northrend/howling_fjord.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/northrend/icecrown.cpp b/scripts/northrend/icecrown.cpp index 9250f03a0..52987a52f 100644 --- a/scripts/northrend/icecrown.cpp +++ b/scripts/northrend/icecrown.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_bronjahm.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_bronjahm.cpp index 8cbc51cce..282b805ca 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_bronjahm.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_bronjahm.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_devourer_of_souls.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_devourer_of_souls.cpp index 63c778d9f..b57fa5997 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_devourer_of_souls.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_devourer_of_souls.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/forge_of_souls.h b/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/forge_of_souls.h index a835d49f3..aea79cd80 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/forge_of_souls.h +++ b/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/forge_of_souls.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/instance_forge_of_souls.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/instance_forge_of_souls.cpp index 689ed3061..2277f1d2b 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/instance_forge_of_souls.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/instance_forge_of_souls.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/boss_falric.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/boss_falric.cpp index 396a7817b..221a0bea1 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/boss_falric.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/boss_falric.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/boss_lich_king.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/boss_lich_king.cpp index 670f6ac9e..26fd3d6ae 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/boss_lich_king.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/boss_lich_king.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/boss_marwyn.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/boss_marwyn.cpp index b8d03004f..429639aa0 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/boss_marwyn.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/boss_marwyn.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/halls_of_reflection.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/halls_of_reflection.cpp index 0600b7873..9e9bf72b4 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/halls_of_reflection.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/halls_of_reflection.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/halls_of_reflection.h b/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/halls_of_reflection.h index 5871a49a1..6b5f9ef47 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/halls_of_reflection.h +++ b/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/halls_of_reflection.h @@ -1,3 +1,3 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/instance_halls_of_reflection.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/instance_halls_of_reflection.cpp index 05e0621d5..da5c3bfdb 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/instance_halls_of_reflection.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/instance_halls_of_reflection.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_forgemaster_garfrost.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_forgemaster_garfrost.cpp index 9b226238f..b9c55d912 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_forgemaster_garfrost.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_forgemaster_garfrost.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_krick_and_ick.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_krick_and_ick.cpp index 0ef2ea4a1..c5a8bb200 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_krick_and_ick.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_krick_and_ick.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_scourgelord_tyrannus.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_scourgelord_tyrannus.cpp index e83052f1e..171dc8db6 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_scourgelord_tyrannus.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_scourgelord_tyrannus.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/instance_pit_of_saron.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/instance_pit_of_saron.cpp index dfbbf2153..fe0e391d3 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/instance_pit_of_saron.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/instance_pit_of_saron.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/pit_of_saron.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/pit_of_saron.cpp index ff1e719bc..3480a59ae 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/pit_of_saron.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/pit_of_saron.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/pit_of_saron.h b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/pit_of_saron.h index a3ba144ec..0b3bff94f 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/pit_of_saron.h +++ b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/pit_of_saron.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/blood_prince_council.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/blood_prince_council.cpp index 08ada0b7f..eca61683b 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/blood_prince_council.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/blood_prince_council.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_blood_queen_lanathel.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_blood_queen_lanathel.cpp index 4e4ffbfeb..a59c88aab 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_blood_queen_lanathel.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_blood_queen_lanathel.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp index 3148ec08f..305beead1 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_festergut.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_festergut.cpp index f87b4d9a1..3847a255c 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_festergut.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_festergut.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lady_deathwhisper.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lady_deathwhisper.cpp index 4122a63d2..9d7c44b70 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lady_deathwhisper.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lady_deathwhisper.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp index 947a90d8f..571df01a9 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_professor_putricide.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_professor_putricide.cpp index 318b7b822..f96f15321 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_professor_putricide.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_professor_putricide.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_rotface.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_rotface.cpp index fd8d66c36..f5b82c1d5 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_rotface.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_rotface.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp index e57f94f3a..3133aa589 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_the_lich_king.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_the_lich_king.cpp index 32bcacd15..80ad573e8 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_the_lich_king.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_the_lich_king.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_valithria_dreamwalker.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_valithria_dreamwalker.cpp index 762a68c0d..09e4e39d2 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_valithria_dreamwalker.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_valithria_dreamwalker.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/gunship_battle.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/gunship_battle.cpp index 67a1ce34a..499996995 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/gunship_battle.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/gunship_battle.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_citadel.h b/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_citadel.h index ca0d3d14d..4187c85f3 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_citadel.h +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_citadel.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_citadel.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_citadel.cpp index 64e0c3d95..78e3f3ce0 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_citadel.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_citadel.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/northrend/naxxramas/boss_anubrekhan.cpp b/scripts/northrend/naxxramas/boss_anubrekhan.cpp index d23dfd082..38615e43d 100644 --- a/scripts/northrend/naxxramas/boss_anubrekhan.cpp +++ b/scripts/northrend/naxxramas/boss_anubrekhan.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/northrend/naxxramas/boss_faerlina.cpp b/scripts/northrend/naxxramas/boss_faerlina.cpp index e01028fc0..54b6ec132 100644 --- a/scripts/northrend/naxxramas/boss_faerlina.cpp +++ b/scripts/northrend/naxxramas/boss_faerlina.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/northrend/naxxramas/boss_four_horsemen.cpp b/scripts/northrend/naxxramas/boss_four_horsemen.cpp index a0289df37..f154cfa2f 100644 --- a/scripts/northrend/naxxramas/boss_four_horsemen.cpp +++ b/scripts/northrend/naxxramas/boss_four_horsemen.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/northrend/naxxramas/boss_gluth.cpp b/scripts/northrend/naxxramas/boss_gluth.cpp index 48291fb72..1aa8ace72 100644 --- a/scripts/northrend/naxxramas/boss_gluth.cpp +++ b/scripts/northrend/naxxramas/boss_gluth.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/northrend/naxxramas/boss_gothik.cpp b/scripts/northrend/naxxramas/boss_gothik.cpp index c7e6fd9d9..5ac256627 100644 --- a/scripts/northrend/naxxramas/boss_gothik.cpp +++ b/scripts/northrend/naxxramas/boss_gothik.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/northrend/naxxramas/boss_grobbulus.cpp b/scripts/northrend/naxxramas/boss_grobbulus.cpp index bcd79fc6a..1732c85ed 100644 --- a/scripts/northrend/naxxramas/boss_grobbulus.cpp +++ b/scripts/northrend/naxxramas/boss_grobbulus.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/northrend/naxxramas/boss_heigan.cpp b/scripts/northrend/naxxramas/boss_heigan.cpp index a9cfbe53c..876fbd19f 100644 --- a/scripts/northrend/naxxramas/boss_heigan.cpp +++ b/scripts/northrend/naxxramas/boss_heigan.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/northrend/naxxramas/boss_kelthuzad.cpp b/scripts/northrend/naxxramas/boss_kelthuzad.cpp index 8a7b29011..79bd73edb 100644 --- a/scripts/northrend/naxxramas/boss_kelthuzad.cpp +++ b/scripts/northrend/naxxramas/boss_kelthuzad.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/northrend/naxxramas/boss_loatheb.cpp b/scripts/northrend/naxxramas/boss_loatheb.cpp index d943ffcdd..df5244616 100644 --- a/scripts/northrend/naxxramas/boss_loatheb.cpp +++ b/scripts/northrend/naxxramas/boss_loatheb.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/northrend/naxxramas/boss_maexxna.cpp b/scripts/northrend/naxxramas/boss_maexxna.cpp index 6645b1650..718e4ff1b 100644 --- a/scripts/northrend/naxxramas/boss_maexxna.cpp +++ b/scripts/northrend/naxxramas/boss_maexxna.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/northrend/naxxramas/boss_noth.cpp b/scripts/northrend/naxxramas/boss_noth.cpp index c0bddd236..1beac8a3d 100644 --- a/scripts/northrend/naxxramas/boss_noth.cpp +++ b/scripts/northrend/naxxramas/boss_noth.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/northrend/naxxramas/boss_patchwerk.cpp b/scripts/northrend/naxxramas/boss_patchwerk.cpp index bf2c27efd..c759c37db 100644 --- a/scripts/northrend/naxxramas/boss_patchwerk.cpp +++ b/scripts/northrend/naxxramas/boss_patchwerk.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/northrend/naxxramas/boss_razuvious.cpp b/scripts/northrend/naxxramas/boss_razuvious.cpp index fe73b7e5d..4a5846768 100644 --- a/scripts/northrend/naxxramas/boss_razuvious.cpp +++ b/scripts/northrend/naxxramas/boss_razuvious.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/northrend/naxxramas/boss_sapphiron.cpp b/scripts/northrend/naxxramas/boss_sapphiron.cpp index cfc844b67..5db6d7aa5 100644 --- a/scripts/northrend/naxxramas/boss_sapphiron.cpp +++ b/scripts/northrend/naxxramas/boss_sapphiron.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/northrend/naxxramas/boss_thaddius.cpp b/scripts/northrend/naxxramas/boss_thaddius.cpp index 4e99c6a2d..3157dd89a 100644 --- a/scripts/northrend/naxxramas/boss_thaddius.cpp +++ b/scripts/northrend/naxxramas/boss_thaddius.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/northrend/naxxramas/instance_naxxramas.cpp b/scripts/northrend/naxxramas/instance_naxxramas.cpp index 2f7456312..7c3240b71 100644 --- a/scripts/northrend/naxxramas/instance_naxxramas.cpp +++ b/scripts/northrend/naxxramas/instance_naxxramas.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/northrend/naxxramas/naxxramas.h b/scripts/northrend/naxxramas/naxxramas.h index 135509b02..00087e491 100644 --- a/scripts/northrend/naxxramas/naxxramas.h +++ b/scripts/northrend/naxxramas/naxxramas.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/northrend/nexus/eye_of_eternity/boss_malygos.cpp b/scripts/northrend/nexus/eye_of_eternity/boss_malygos.cpp index 87dd298d5..5ec12b754 100644 --- a/scripts/northrend/nexus/eye_of_eternity/boss_malygos.cpp +++ b/scripts/northrend/nexus/eye_of_eternity/boss_malygos.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/northrend/nexus/eye_of_eternity/eye_of_eternity.h b/scripts/northrend/nexus/eye_of_eternity/eye_of_eternity.h index 60255bcb2..76653f15b 100644 --- a/scripts/northrend/nexus/eye_of_eternity/eye_of_eternity.h +++ b/scripts/northrend/nexus/eye_of_eternity/eye_of_eternity.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/northrend/nexus/eye_of_eternity/instance_eye_of_eternity.cpp b/scripts/northrend/nexus/eye_of_eternity/instance_eye_of_eternity.cpp index f23a23125..0b2b42dbf 100644 --- a/scripts/northrend/nexus/eye_of_eternity/instance_eye_of_eternity.cpp +++ b/scripts/northrend/nexus/eye_of_eternity/instance_eye_of_eternity.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/northrend/nexus/nexus/boss_anomalus.cpp b/scripts/northrend/nexus/nexus/boss_anomalus.cpp index 36907b1e8..ae2d43061 100644 --- a/scripts/northrend/nexus/nexus/boss_anomalus.cpp +++ b/scripts/northrend/nexus/nexus/boss_anomalus.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/northrend/nexus/nexus/boss_keristrasza.cpp b/scripts/northrend/nexus/nexus/boss_keristrasza.cpp index 9a50f8381..542107742 100644 --- a/scripts/northrend/nexus/nexus/boss_keristrasza.cpp +++ b/scripts/northrend/nexus/nexus/boss_keristrasza.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/northrend/nexus/nexus/boss_ormorok.cpp b/scripts/northrend/nexus/nexus/boss_ormorok.cpp index e48b3c6d2..0392c6062 100644 --- a/scripts/northrend/nexus/nexus/boss_ormorok.cpp +++ b/scripts/northrend/nexus/nexus/boss_ormorok.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/northrend/nexus/nexus/boss_telestra.cpp b/scripts/northrend/nexus/nexus/boss_telestra.cpp index 0ad0b1f03..13fcd199f 100644 --- a/scripts/northrend/nexus/nexus/boss_telestra.cpp +++ b/scripts/northrend/nexus/nexus/boss_telestra.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/northrend/nexus/nexus/instance_nexus.cpp b/scripts/northrend/nexus/nexus/instance_nexus.cpp index c7ad67610..af91cd70c 100644 --- a/scripts/northrend/nexus/nexus/instance_nexus.cpp +++ b/scripts/northrend/nexus/nexus/instance_nexus.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/northrend/nexus/nexus/nexus.h b/scripts/northrend/nexus/nexus/nexus.h index 3aa8398ad..c3a108fad 100644 --- a/scripts/northrend/nexus/nexus/nexus.h +++ b/scripts/northrend/nexus/nexus/nexus.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/northrend/nexus/oculus/boss_eregos.cpp b/scripts/northrend/nexus/oculus/boss_eregos.cpp index adb294d51..7b957d9ca 100644 --- a/scripts/northrend/nexus/oculus/boss_eregos.cpp +++ b/scripts/northrend/nexus/oculus/boss_eregos.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/northrend/nexus/oculus/boss_urom.cpp b/scripts/northrend/nexus/oculus/boss_urom.cpp index fcada215e..b76d868af 100644 --- a/scripts/northrend/nexus/oculus/boss_urom.cpp +++ b/scripts/northrend/nexus/oculus/boss_urom.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/northrend/nexus/oculus/instance_oculus.cpp b/scripts/northrend/nexus/oculus/instance_oculus.cpp index b46fb1092..264416406 100644 --- a/scripts/northrend/nexus/oculus/instance_oculus.cpp +++ b/scripts/northrend/nexus/oculus/instance_oculus.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/northrend/nexus/oculus/oculus.h b/scripts/northrend/nexus/oculus/oculus.h index fadba36e1..3387a9500 100644 --- a/scripts/northrend/nexus/oculus/oculus.h +++ b/scripts/northrend/nexus/oculus/oculus.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/northrend/obsidian_sanctum/boss_sartharion.cpp b/scripts/northrend/obsidian_sanctum/boss_sartharion.cpp index b47986450..5539a04ce 100644 --- a/scripts/northrend/obsidian_sanctum/boss_sartharion.cpp +++ b/scripts/northrend/obsidian_sanctum/boss_sartharion.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/northrend/obsidian_sanctum/instance_obsidian_sanctum.cpp b/scripts/northrend/obsidian_sanctum/instance_obsidian_sanctum.cpp index 36b627194..8edd3a9b7 100644 --- a/scripts/northrend/obsidian_sanctum/instance_obsidian_sanctum.cpp +++ b/scripts/northrend/obsidian_sanctum/instance_obsidian_sanctum.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/northrend/obsidian_sanctum/obsidian_sanctum.h b/scripts/northrend/obsidian_sanctum/obsidian_sanctum.h index ae5df5df1..c2ac9e097 100644 --- a/scripts/northrend/obsidian_sanctum/obsidian_sanctum.h +++ b/scripts/northrend/obsidian_sanctum/obsidian_sanctum.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/northrend/ruby_sanctum/boss_baltharus.cpp b/scripts/northrend/ruby_sanctum/boss_baltharus.cpp index c4cbe2c97..53f51f32a 100644 --- a/scripts/northrend/ruby_sanctum/boss_baltharus.cpp +++ b/scripts/northrend/ruby_sanctum/boss_baltharus.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/northrend/ruby_sanctum/boss_halion.cpp b/scripts/northrend/ruby_sanctum/boss_halion.cpp index 3ebc8295f..66b350886 100644 --- a/scripts/northrend/ruby_sanctum/boss_halion.cpp +++ b/scripts/northrend/ruby_sanctum/boss_halion.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/northrend/ruby_sanctum/boss_saviana.cpp b/scripts/northrend/ruby_sanctum/boss_saviana.cpp index 4a7b0b67f..8dfbaab4b 100644 --- a/scripts/northrend/ruby_sanctum/boss_saviana.cpp +++ b/scripts/northrend/ruby_sanctum/boss_saviana.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/northrend/ruby_sanctum/boss_zarithrian.cpp b/scripts/northrend/ruby_sanctum/boss_zarithrian.cpp index 48b4a5a27..4911ab996 100644 --- a/scripts/northrend/ruby_sanctum/boss_zarithrian.cpp +++ b/scripts/northrend/ruby_sanctum/boss_zarithrian.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/northrend/ruby_sanctum/instance_ruby_sanctum.cpp b/scripts/northrend/ruby_sanctum/instance_ruby_sanctum.cpp index f22041ea4..381f98eb2 100644 --- a/scripts/northrend/ruby_sanctum/instance_ruby_sanctum.cpp +++ b/scripts/northrend/ruby_sanctum/instance_ruby_sanctum.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/northrend/ruby_sanctum/ruby_sanctum.h b/scripts/northrend/ruby_sanctum/ruby_sanctum.h index 910c7b003..850836187 100644 --- a/scripts/northrend/ruby_sanctum/ruby_sanctum.h +++ b/scripts/northrend/ruby_sanctum/ruby_sanctum.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/northrend/sholazar_basin.cpp b/scripts/northrend/sholazar_basin.cpp index 3948c7334..7500ded9f 100644 --- a/scripts/northrend/sholazar_basin.cpp +++ b/scripts/northrend/sholazar_basin.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/northrend/storm_peaks.cpp b/scripts/northrend/storm_peaks.cpp index 6689a0ce2..df23ed934 100644 --- a/scripts/northrend/storm_peaks.cpp +++ b/scripts/northrend/storm_peaks.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/northrend/ulduar/halls_of_lightning/boss_bjarngrim.cpp b/scripts/northrend/ulduar/halls_of_lightning/boss_bjarngrim.cpp index c636c5379..2b34152df 100644 --- a/scripts/northrend/ulduar/halls_of_lightning/boss_bjarngrim.cpp +++ b/scripts/northrend/ulduar/halls_of_lightning/boss_bjarngrim.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/northrend/ulduar/halls_of_lightning/boss_ionar.cpp b/scripts/northrend/ulduar/halls_of_lightning/boss_ionar.cpp index 85566912c..8d57c3189 100644 --- a/scripts/northrend/ulduar/halls_of_lightning/boss_ionar.cpp +++ b/scripts/northrend/ulduar/halls_of_lightning/boss_ionar.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/northrend/ulduar/halls_of_lightning/boss_loken.cpp b/scripts/northrend/ulduar/halls_of_lightning/boss_loken.cpp index e02731dec..29cf6d9fd 100644 --- a/scripts/northrend/ulduar/halls_of_lightning/boss_loken.cpp +++ b/scripts/northrend/ulduar/halls_of_lightning/boss_loken.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/northrend/ulduar/halls_of_lightning/boss_volkhan.cpp b/scripts/northrend/ulduar/halls_of_lightning/boss_volkhan.cpp index c5bdaa7ee..fe6878ca4 100644 --- a/scripts/northrend/ulduar/halls_of_lightning/boss_volkhan.cpp +++ b/scripts/northrend/ulduar/halls_of_lightning/boss_volkhan.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/northrend/ulduar/halls_of_lightning/halls_of_lightning.h b/scripts/northrend/ulduar/halls_of_lightning/halls_of_lightning.h index 085ce66eb..142abce65 100644 --- a/scripts/northrend/ulduar/halls_of_lightning/halls_of_lightning.h +++ b/scripts/northrend/ulduar/halls_of_lightning/halls_of_lightning.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/northrend/ulduar/halls_of_lightning/instance_halls_of_lightning.cpp b/scripts/northrend/ulduar/halls_of_lightning/instance_halls_of_lightning.cpp index 45bf81c9d..dd04ac53d 100644 --- a/scripts/northrend/ulduar/halls_of_lightning/instance_halls_of_lightning.cpp +++ b/scripts/northrend/ulduar/halls_of_lightning/instance_halls_of_lightning.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/northrend/ulduar/halls_of_stone/boss_maiden_of_grief.cpp b/scripts/northrend/ulduar/halls_of_stone/boss_maiden_of_grief.cpp index 01fdafa66..dad9a7845 100644 --- a/scripts/northrend/ulduar/halls_of_stone/boss_maiden_of_grief.cpp +++ b/scripts/northrend/ulduar/halls_of_stone/boss_maiden_of_grief.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/northrend/ulduar/halls_of_stone/boss_sjonnir.cpp b/scripts/northrend/ulduar/halls_of_stone/boss_sjonnir.cpp index aed727ee2..441f15d99 100644 --- a/scripts/northrend/ulduar/halls_of_stone/boss_sjonnir.cpp +++ b/scripts/northrend/ulduar/halls_of_stone/boss_sjonnir.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.cpp b/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.cpp index 2915051e9..468dbf149 100644 --- a/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.cpp +++ b/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.h b/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.h index 9c8a55118..eaf82dba8 100644 --- a/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.h +++ b/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/northrend/ulduar/halls_of_stone/instance_halls_of_stone.cpp b/scripts/northrend/ulduar/halls_of_stone/instance_halls_of_stone.cpp index 387cb287b..280b6df75 100644 --- a/scripts/northrend/ulduar/halls_of_stone/instance_halls_of_stone.cpp +++ b/scripts/northrend/ulduar/halls_of_stone/instance_halls_of_stone.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/northrend/ulduar/ulduar/assembly_of_iron.cpp b/scripts/northrend/ulduar/ulduar/assembly_of_iron.cpp index cf5b09802..3908fa802 100644 --- a/scripts/northrend/ulduar/ulduar/assembly_of_iron.cpp +++ b/scripts/northrend/ulduar/ulduar/assembly_of_iron.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/northrend/ulduar/ulduar/boss_algalon.cpp b/scripts/northrend/ulduar/ulduar/boss_algalon.cpp index d1ccfd97f..bcd05996a 100644 --- a/scripts/northrend/ulduar/ulduar/boss_algalon.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_algalon.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/northrend/ulduar/ulduar/boss_auriaya.cpp b/scripts/northrend/ulduar/ulduar/boss_auriaya.cpp index 047e8f5fb..21d0789bb 100644 --- a/scripts/northrend/ulduar/ulduar/boss_auriaya.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_auriaya.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/northrend/ulduar/ulduar/boss_flame_leviathan.cpp b/scripts/northrend/ulduar/ulduar/boss_flame_leviathan.cpp index 520d467cb..0bef1df4e 100644 --- a/scripts/northrend/ulduar/ulduar/boss_flame_leviathan.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_flame_leviathan.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/northrend/ulduar/ulduar/boss_freya.cpp b/scripts/northrend/ulduar/ulduar/boss_freya.cpp index b9d05399b..ef7530e56 100644 --- a/scripts/northrend/ulduar/ulduar/boss_freya.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_freya.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/northrend/ulduar/ulduar/boss_general_vezax.cpp b/scripts/northrend/ulduar/ulduar/boss_general_vezax.cpp index 019c8ea0f..78d0c4030 100644 --- a/scripts/northrend/ulduar/ulduar/boss_general_vezax.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_general_vezax.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/northrend/ulduar/ulduar/boss_hodir.cpp b/scripts/northrend/ulduar/ulduar/boss_hodir.cpp index fe826b053..2c25a41dd 100644 --- a/scripts/northrend/ulduar/ulduar/boss_hodir.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_hodir.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/northrend/ulduar/ulduar/boss_ignis.cpp b/scripts/northrend/ulduar/ulduar/boss_ignis.cpp index 172239919..4b4c23b64 100644 --- a/scripts/northrend/ulduar/ulduar/boss_ignis.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_ignis.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/northrend/ulduar/ulduar/boss_kologarn.cpp b/scripts/northrend/ulduar/ulduar/boss_kologarn.cpp index 3dd3c6ece..7dff7b709 100644 --- a/scripts/northrend/ulduar/ulduar/boss_kologarn.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_kologarn.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/northrend/ulduar/ulduar/boss_mimiron.cpp b/scripts/northrend/ulduar/ulduar/boss_mimiron.cpp index db78f3f07..80def03e4 100644 --- a/scripts/northrend/ulduar/ulduar/boss_mimiron.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_mimiron.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/northrend/ulduar/ulduar/boss_razorscale.cpp b/scripts/northrend/ulduar/ulduar/boss_razorscale.cpp index 3303f7d1c..0829694e1 100644 --- a/scripts/northrend/ulduar/ulduar/boss_razorscale.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_razorscale.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/northrend/ulduar/ulduar/boss_thorim.cpp b/scripts/northrend/ulduar/ulduar/boss_thorim.cpp index 9e101a02e..c6567bd7c 100644 --- a/scripts/northrend/ulduar/ulduar/boss_thorim.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_thorim.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/northrend/ulduar/ulduar/boss_xt_002.cpp b/scripts/northrend/ulduar/ulduar/boss_xt_002.cpp index 79c23242b..385adb05d 100644 --- a/scripts/northrend/ulduar/ulduar/boss_xt_002.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_xt_002.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/northrend/ulduar/ulduar/boss_yogg_saron.cpp b/scripts/northrend/ulduar/ulduar/boss_yogg_saron.cpp index 07219a9e9..ef25dca69 100644 --- a/scripts/northrend/ulduar/ulduar/boss_yogg_saron.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_yogg_saron.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp index 548a5cf16..2796aead6 100644 --- a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp +++ b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/northrend/ulduar/ulduar/ulduar.cpp b/scripts/northrend/ulduar/ulduar/ulduar.cpp index d21f3996e..982ef8dc6 100644 --- a/scripts/northrend/ulduar/ulduar/ulduar.cpp +++ b/scripts/northrend/ulduar/ulduar/ulduar.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/northrend/ulduar/ulduar/ulduar.h b/scripts/northrend/ulduar/ulduar/ulduar.h index c44bb6213..8ef072a86 100644 --- a/scripts/northrend/ulduar/ulduar/ulduar.h +++ b/scripts/northrend/ulduar/ulduar/ulduar.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/northrend/utgarde_keep/utgarde_keep/boss_ingvar.cpp b/scripts/northrend/utgarde_keep/utgarde_keep/boss_ingvar.cpp index dfb6ebcd3..166db27eb 100644 --- a/scripts/northrend/utgarde_keep/utgarde_keep/boss_ingvar.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_keep/boss_ingvar.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/northrend/utgarde_keep/utgarde_keep/boss_keleseth.cpp b/scripts/northrend/utgarde_keep/utgarde_keep/boss_keleseth.cpp index 27277eb2f..57fbac11e 100644 --- a/scripts/northrend/utgarde_keep/utgarde_keep/boss_keleseth.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_keep/boss_keleseth.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/northrend/utgarde_keep/utgarde_keep/boss_skarvald_and_dalronn.cpp b/scripts/northrend/utgarde_keep/utgarde_keep/boss_skarvald_and_dalronn.cpp index d0911b40f..f6f6e6bf1 100644 --- a/scripts/northrend/utgarde_keep/utgarde_keep/boss_skarvald_and_dalronn.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_keep/boss_skarvald_and_dalronn.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/northrend/utgarde_keep/utgarde_keep/instance_utgarde_keep.cpp b/scripts/northrend/utgarde_keep/utgarde_keep/instance_utgarde_keep.cpp index 6315fd9f1..07864d901 100644 --- a/scripts/northrend/utgarde_keep/utgarde_keep/instance_utgarde_keep.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_keep/instance_utgarde_keep.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/northrend/utgarde_keep/utgarde_keep/utgarde_keep.cpp b/scripts/northrend/utgarde_keep/utgarde_keep/utgarde_keep.cpp index 126b01103..f31b16c0a 100644 --- a/scripts/northrend/utgarde_keep/utgarde_keep/utgarde_keep.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_keep/utgarde_keep.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/northrend/utgarde_keep/utgarde_keep/utgarde_keep.h b/scripts/northrend/utgarde_keep/utgarde_keep/utgarde_keep.h index 4df88d631..74c76398f 100644 --- a/scripts/northrend/utgarde_keep/utgarde_keep/utgarde_keep.h +++ b/scripts/northrend/utgarde_keep/utgarde_keep/utgarde_keep.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_gortok.cpp b/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_gortok.cpp index 40c065cee..6b88c3cfe 100644 --- a/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_gortok.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_gortok.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_skadi.cpp b/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_skadi.cpp index 718810eed..adf644d37 100644 --- a/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_skadi.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_skadi.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_svala.cpp b/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_svala.cpp index bab10ad3e..b806b80a2 100644 --- a/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_svala.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_svala.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_ymiron.cpp b/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_ymiron.cpp index 5a0b0a35f..f5c1dcba7 100644 --- a/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_ymiron.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_ymiron.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/northrend/utgarde_keep/utgarde_pinnacle/instance_utgarde_pinnacle.cpp b/scripts/northrend/utgarde_keep/utgarde_pinnacle/instance_utgarde_pinnacle.cpp index 4b664be0b..3e7d35237 100644 --- a/scripts/northrend/utgarde_keep/utgarde_pinnacle/instance_utgarde_pinnacle.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_pinnacle/instance_utgarde_pinnacle.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/northrend/utgarde_keep/utgarde_pinnacle/utgarde_pinnacle.h b/scripts/northrend/utgarde_keep/utgarde_pinnacle/utgarde_pinnacle.h index 7b45d82ee..8b343cc21 100644 --- a/scripts/northrend/utgarde_keep/utgarde_pinnacle/utgarde_pinnacle.h +++ b/scripts/northrend/utgarde_keep/utgarde_pinnacle/utgarde_pinnacle.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/northrend/vault_of_archavon/boss_archavon.cpp b/scripts/northrend/vault_of_archavon/boss_archavon.cpp index 1981760a3..5a3b45660 100644 --- a/scripts/northrend/vault_of_archavon/boss_archavon.cpp +++ b/scripts/northrend/vault_of_archavon/boss_archavon.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/northrend/vault_of_archavon/boss_emalon.cpp b/scripts/northrend/vault_of_archavon/boss_emalon.cpp index b2256e7f8..e31ec112f 100644 --- a/scripts/northrend/vault_of_archavon/boss_emalon.cpp +++ b/scripts/northrend/vault_of_archavon/boss_emalon.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/northrend/vault_of_archavon/boss_koralon.cpp b/scripts/northrend/vault_of_archavon/boss_koralon.cpp index bb85eaf7a..addd69153 100644 --- a/scripts/northrend/vault_of_archavon/boss_koralon.cpp +++ b/scripts/northrend/vault_of_archavon/boss_koralon.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/northrend/vault_of_archavon/boss_toravon.cpp b/scripts/northrend/vault_of_archavon/boss_toravon.cpp index 442df58f9..64afd567a 100644 --- a/scripts/northrend/vault_of_archavon/boss_toravon.cpp +++ b/scripts/northrend/vault_of_archavon/boss_toravon.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/northrend/vault_of_archavon/instance_vault_of_archavon.cpp b/scripts/northrend/vault_of_archavon/instance_vault_of_archavon.cpp index 4aca719bf..54442c4fd 100644 --- a/scripts/northrend/vault_of_archavon/instance_vault_of_archavon.cpp +++ b/scripts/northrend/vault_of_archavon/instance_vault_of_archavon.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/northrend/vault_of_archavon/vault_of_archavon.h b/scripts/northrend/vault_of_archavon/vault_of_archavon.h index 5871a49a1..6b5f9ef47 100644 --- a/scripts/northrend/vault_of_archavon/vault_of_archavon.h +++ b/scripts/northrend/vault_of_archavon/vault_of_archavon.h @@ -1,3 +1,3 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/northrend/violet_hold/boss_erekem.cpp b/scripts/northrend/violet_hold/boss_erekem.cpp index dcf0019df..e6faafca6 100644 --- a/scripts/northrend/violet_hold/boss_erekem.cpp +++ b/scripts/northrend/violet_hold/boss_erekem.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/northrend/violet_hold/boss_ichoron.cpp b/scripts/northrend/violet_hold/boss_ichoron.cpp index cb0b57774..bb4834e15 100644 --- a/scripts/northrend/violet_hold/boss_ichoron.cpp +++ b/scripts/northrend/violet_hold/boss_ichoron.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/northrend/violet_hold/instance_violet_hold.cpp b/scripts/northrend/violet_hold/instance_violet_hold.cpp index 57a2d2bfe..087df2bc1 100644 --- a/scripts/northrend/violet_hold/instance_violet_hold.cpp +++ b/scripts/northrend/violet_hold/instance_violet_hold.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/northrend/violet_hold/violet_hold.cpp b/scripts/northrend/violet_hold/violet_hold.cpp index f55055c2b..a42023dc0 100644 --- a/scripts/northrend/violet_hold/violet_hold.cpp +++ b/scripts/northrend/violet_hold/violet_hold.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/northrend/violet_hold/violet_hold.h b/scripts/northrend/violet_hold/violet_hold.h index 692e35576..1cf24f4ce 100644 --- a/scripts/northrend/violet_hold/violet_hold.h +++ b/scripts/northrend/violet_hold/violet_hold.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/northrend/zuldrak.cpp b/scripts/northrend/zuldrak.cpp index 37ba8ce2d..8adc5dabc 100644 --- a/scripts/northrend/zuldrak.cpp +++ b/scripts/northrend/zuldrak.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/outland/auchindoun/auchenai_crypts/boss_exarch_maladaar.cpp b/scripts/outland/auchindoun/auchenai_crypts/boss_exarch_maladaar.cpp index 44f5b95aa..cf24e171f 100644 --- a/scripts/outland/auchindoun/auchenai_crypts/boss_exarch_maladaar.cpp +++ b/scripts/outland/auchindoun/auchenai_crypts/boss_exarch_maladaar.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/outland/auchindoun/auchenai_crypts/boss_shirrak.cpp b/scripts/outland/auchindoun/auchenai_crypts/boss_shirrak.cpp index 150848f3c..479a7081f 100644 --- a/scripts/outland/auchindoun/auchenai_crypts/boss_shirrak.cpp +++ b/scripts/outland/auchindoun/auchenai_crypts/boss_shirrak.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/outland/auchindoun/mana_tombs/boss_nexusprince_shaffar.cpp b/scripts/outland/auchindoun/mana_tombs/boss_nexusprince_shaffar.cpp index 4609ea0c3..d6839ac8f 100644 --- a/scripts/outland/auchindoun/mana_tombs/boss_nexusprince_shaffar.cpp +++ b/scripts/outland/auchindoun/mana_tombs/boss_nexusprince_shaffar.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/outland/auchindoun/mana_tombs/boss_pandemonius.cpp b/scripts/outland/auchindoun/mana_tombs/boss_pandemonius.cpp index 306e585de..572639bc9 100644 --- a/scripts/outland/auchindoun/mana_tombs/boss_pandemonius.cpp +++ b/scripts/outland/auchindoun/mana_tombs/boss_pandemonius.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/outland/auchindoun/sethekk_halls/boss_anzu.cpp b/scripts/outland/auchindoun/sethekk_halls/boss_anzu.cpp index 63a83db36..9b2b76ad5 100644 --- a/scripts/outland/auchindoun/sethekk_halls/boss_anzu.cpp +++ b/scripts/outland/auchindoun/sethekk_halls/boss_anzu.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/outland/auchindoun/sethekk_halls/boss_darkweaver_syth.cpp b/scripts/outland/auchindoun/sethekk_halls/boss_darkweaver_syth.cpp index f24682557..10c0fa655 100644 --- a/scripts/outland/auchindoun/sethekk_halls/boss_darkweaver_syth.cpp +++ b/scripts/outland/auchindoun/sethekk_halls/boss_darkweaver_syth.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/outland/auchindoun/sethekk_halls/boss_talon_king_ikiss.cpp b/scripts/outland/auchindoun/sethekk_halls/boss_talon_king_ikiss.cpp index fe468cf9d..b03c91361 100644 --- a/scripts/outland/auchindoun/sethekk_halls/boss_talon_king_ikiss.cpp +++ b/scripts/outland/auchindoun/sethekk_halls/boss_talon_king_ikiss.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/outland/auchindoun/sethekk_halls/instance_sethekk_halls.cpp b/scripts/outland/auchindoun/sethekk_halls/instance_sethekk_halls.cpp index 1a37effb9..7f10c4aab 100644 --- a/scripts/outland/auchindoun/sethekk_halls/instance_sethekk_halls.cpp +++ b/scripts/outland/auchindoun/sethekk_halls/instance_sethekk_halls.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/outland/auchindoun/sethekk_halls/sethekk_halls.h b/scripts/outland/auchindoun/sethekk_halls/sethekk_halls.h index d9d5ad3e0..ee45a0f3a 100644 --- a/scripts/outland/auchindoun/sethekk_halls/sethekk_halls.h +++ b/scripts/outland/auchindoun/sethekk_halls/sethekk_halls.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/outland/auchindoun/shadow_labyrinth/boss_ambassador_hellmaw.cpp b/scripts/outland/auchindoun/shadow_labyrinth/boss_ambassador_hellmaw.cpp index 9bb277714..aa424cd76 100644 --- a/scripts/outland/auchindoun/shadow_labyrinth/boss_ambassador_hellmaw.cpp +++ b/scripts/outland/auchindoun/shadow_labyrinth/boss_ambassador_hellmaw.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/outland/auchindoun/shadow_labyrinth/boss_blackheart_the_inciter.cpp b/scripts/outland/auchindoun/shadow_labyrinth/boss_blackheart_the_inciter.cpp index 5ab1fcf58..31cdbaf14 100644 --- a/scripts/outland/auchindoun/shadow_labyrinth/boss_blackheart_the_inciter.cpp +++ b/scripts/outland/auchindoun/shadow_labyrinth/boss_blackheart_the_inciter.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/outland/auchindoun/shadow_labyrinth/boss_grandmaster_vorpil.cpp b/scripts/outland/auchindoun/shadow_labyrinth/boss_grandmaster_vorpil.cpp index 0ce2b029d..4c364618e 100644 --- a/scripts/outland/auchindoun/shadow_labyrinth/boss_grandmaster_vorpil.cpp +++ b/scripts/outland/auchindoun/shadow_labyrinth/boss_grandmaster_vorpil.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/outland/auchindoun/shadow_labyrinth/boss_murmur.cpp b/scripts/outland/auchindoun/shadow_labyrinth/boss_murmur.cpp index 2e0e0b376..25010096d 100644 --- a/scripts/outland/auchindoun/shadow_labyrinth/boss_murmur.cpp +++ b/scripts/outland/auchindoun/shadow_labyrinth/boss_murmur.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/outland/auchindoun/shadow_labyrinth/instance_shadow_labyrinth.cpp b/scripts/outland/auchindoun/shadow_labyrinth/instance_shadow_labyrinth.cpp index e112eff76..1f7f77070 100644 --- a/scripts/outland/auchindoun/shadow_labyrinth/instance_shadow_labyrinth.cpp +++ b/scripts/outland/auchindoun/shadow_labyrinth/instance_shadow_labyrinth.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/outland/auchindoun/shadow_labyrinth/shadow_labyrinth.h b/scripts/outland/auchindoun/shadow_labyrinth/shadow_labyrinth.h index f0deeba24..728003640 100644 --- a/scripts/outland/auchindoun/shadow_labyrinth/shadow_labyrinth.h +++ b/scripts/outland/auchindoun/shadow_labyrinth/shadow_labyrinth.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/outland/black_temple/black_temple.cpp b/scripts/outland/black_temple/black_temple.cpp index 3ee252500..b739f4a7b 100644 --- a/scripts/outland/black_temple/black_temple.cpp +++ b/scripts/outland/black_temple/black_temple.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/outland/black_temple/black_temple.h b/scripts/outland/black_temple/black_temple.h index 835d20c73..6dc4d18dc 100644 --- a/scripts/outland/black_temple/black_temple.h +++ b/scripts/outland/black_temple/black_temple.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/outland/black_temple/boss_bloodboil.cpp b/scripts/outland/black_temple/boss_bloodboil.cpp index 9e04b781a..42df81cc8 100644 --- a/scripts/outland/black_temple/boss_bloodboil.cpp +++ b/scripts/outland/black_temple/boss_bloodboil.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/outland/black_temple/boss_illidan.cpp b/scripts/outland/black_temple/boss_illidan.cpp index 8ef52af3d..970fb297c 100644 --- a/scripts/outland/black_temple/boss_illidan.cpp +++ b/scripts/outland/black_temple/boss_illidan.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/outland/black_temple/boss_mother_shahraz.cpp b/scripts/outland/black_temple/boss_mother_shahraz.cpp index fcfc014d3..2c7affd37 100644 --- a/scripts/outland/black_temple/boss_mother_shahraz.cpp +++ b/scripts/outland/black_temple/boss_mother_shahraz.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/outland/black_temple/boss_reliquary_of_souls.cpp b/scripts/outland/black_temple/boss_reliquary_of_souls.cpp index 12ee24df8..b1296d37c 100644 --- a/scripts/outland/black_temple/boss_reliquary_of_souls.cpp +++ b/scripts/outland/black_temple/boss_reliquary_of_souls.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/outland/black_temple/boss_shade_of_akama.cpp b/scripts/outland/black_temple/boss_shade_of_akama.cpp index a37e6936f..ec5cb8717 100644 --- a/scripts/outland/black_temple/boss_shade_of_akama.cpp +++ b/scripts/outland/black_temple/boss_shade_of_akama.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/outland/black_temple/boss_supremus.cpp b/scripts/outland/black_temple/boss_supremus.cpp index 692b30d3a..8bc2e2cb8 100644 --- a/scripts/outland/black_temple/boss_supremus.cpp +++ b/scripts/outland/black_temple/boss_supremus.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/outland/black_temple/boss_teron_gorefiend.cpp b/scripts/outland/black_temple/boss_teron_gorefiend.cpp index 2290b3d35..5aeaf351a 100644 --- a/scripts/outland/black_temple/boss_teron_gorefiend.cpp +++ b/scripts/outland/black_temple/boss_teron_gorefiend.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/outland/black_temple/boss_warlord_najentus.cpp b/scripts/outland/black_temple/boss_warlord_najentus.cpp index 2872c4f2e..9c3b8b95a 100644 --- a/scripts/outland/black_temple/boss_warlord_najentus.cpp +++ b/scripts/outland/black_temple/boss_warlord_najentus.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/outland/black_temple/illidari_council.cpp b/scripts/outland/black_temple/illidari_council.cpp index cadcf746d..a9a42c15b 100644 --- a/scripts/outland/black_temple/illidari_council.cpp +++ b/scripts/outland/black_temple/illidari_council.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/outland/black_temple/instance_black_temple.cpp b/scripts/outland/black_temple/instance_black_temple.cpp index 7a8c3eaa1..4c195c77f 100644 --- a/scripts/outland/black_temple/instance_black_temple.cpp +++ b/scripts/outland/black_temple/instance_black_temple.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/outland/blades_edge_mountains.cpp b/scripts/outland/blades_edge_mountains.cpp index 2bd0dbca4..7864fed50 100644 --- a/scripts/outland/blades_edge_mountains.cpp +++ b/scripts/outland/blades_edge_mountains.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/outland/boss_doomlord_kazzak.cpp b/scripts/outland/boss_doomlord_kazzak.cpp index 0064eaecf..84c542ad7 100644 --- a/scripts/outland/boss_doomlord_kazzak.cpp +++ b/scripts/outland/boss_doomlord_kazzak.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/outland/boss_doomwalker.cpp b/scripts/outland/boss_doomwalker.cpp index 487b728d3..fc58d1471 100644 --- a/scripts/outland/boss_doomwalker.cpp +++ b/scripts/outland/boss_doomwalker.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_fathomlord_karathress.cpp b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_fathomlord_karathress.cpp index fbc062430..030746745 100644 --- a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_fathomlord_karathress.cpp +++ b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_fathomlord_karathress.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_hydross_the_unstable.cpp b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_hydross_the_unstable.cpp index 242c97664..23e714ea4 100644 --- a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_hydross_the_unstable.cpp +++ b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_hydross_the_unstable.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_lady_vashj.cpp b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_lady_vashj.cpp index 86f949530..363b26b0d 100644 --- a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_lady_vashj.cpp +++ b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_lady_vashj.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_leotheras_the_blind.cpp b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_leotheras_the_blind.cpp index 220bb6a6d..aaf1b5535 100644 --- a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_leotheras_the_blind.cpp +++ b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_leotheras_the_blind.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_morogrim_tidewalker.cpp b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_morogrim_tidewalker.cpp index 3bf52f5c5..a91e91928 100644 --- a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_morogrim_tidewalker.cpp +++ b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_morogrim_tidewalker.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_the_lurker_below.cpp b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_the_lurker_below.cpp index b0d3b8b77..de9ff6671 100644 --- a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_the_lurker_below.cpp +++ b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_the_lurker_below.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/outland/coilfang_reservoir/serpent_shrine/instance_serpent_shrine.cpp b/scripts/outland/coilfang_reservoir/serpent_shrine/instance_serpent_shrine.cpp index af396d4fc..ba458ad06 100644 --- a/scripts/outland/coilfang_reservoir/serpent_shrine/instance_serpent_shrine.cpp +++ b/scripts/outland/coilfang_reservoir/serpent_shrine/instance_serpent_shrine.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/outland/coilfang_reservoir/serpent_shrine/serpent_shrine.h b/scripts/outland/coilfang_reservoir/serpent_shrine/serpent_shrine.h index a42c8e14d..ddf8f2805 100644 --- a/scripts/outland/coilfang_reservoir/serpent_shrine/serpent_shrine.h +++ b/scripts/outland/coilfang_reservoir/serpent_shrine/serpent_shrine.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/outland/coilfang_reservoir/slave_pens/boss_ahune.cpp b/scripts/outland/coilfang_reservoir/slave_pens/boss_ahune.cpp index 708debcdd..7846fb2f8 100644 --- a/scripts/outland/coilfang_reservoir/slave_pens/boss_ahune.cpp +++ b/scripts/outland/coilfang_reservoir/slave_pens/boss_ahune.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/outland/coilfang_reservoir/steam_vault/boss_hydromancer_thespia.cpp b/scripts/outland/coilfang_reservoir/steam_vault/boss_hydromancer_thespia.cpp index 7fd497984..af91fe6c9 100644 --- a/scripts/outland/coilfang_reservoir/steam_vault/boss_hydromancer_thespia.cpp +++ b/scripts/outland/coilfang_reservoir/steam_vault/boss_hydromancer_thespia.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/outland/coilfang_reservoir/steam_vault/boss_mekgineer_steamrigger.cpp b/scripts/outland/coilfang_reservoir/steam_vault/boss_mekgineer_steamrigger.cpp index c815007fd..012166f9d 100644 --- a/scripts/outland/coilfang_reservoir/steam_vault/boss_mekgineer_steamrigger.cpp +++ b/scripts/outland/coilfang_reservoir/steam_vault/boss_mekgineer_steamrigger.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/outland/coilfang_reservoir/steam_vault/boss_warlord_kalithresh.cpp b/scripts/outland/coilfang_reservoir/steam_vault/boss_warlord_kalithresh.cpp index c4278b9c6..5af76fea2 100644 --- a/scripts/outland/coilfang_reservoir/steam_vault/boss_warlord_kalithresh.cpp +++ b/scripts/outland/coilfang_reservoir/steam_vault/boss_warlord_kalithresh.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/outland/coilfang_reservoir/steam_vault/instance_steam_vault.cpp b/scripts/outland/coilfang_reservoir/steam_vault/instance_steam_vault.cpp index 4e578af22..83ae23b60 100644 --- a/scripts/outland/coilfang_reservoir/steam_vault/instance_steam_vault.cpp +++ b/scripts/outland/coilfang_reservoir/steam_vault/instance_steam_vault.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/outland/coilfang_reservoir/steam_vault/steam_vault.h b/scripts/outland/coilfang_reservoir/steam_vault/steam_vault.h index 544a79288..6da760241 100644 --- a/scripts/outland/coilfang_reservoir/steam_vault/steam_vault.h +++ b/scripts/outland/coilfang_reservoir/steam_vault/steam_vault.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/outland/coilfang_reservoir/underbog/boss_hungarfen.cpp b/scripts/outland/coilfang_reservoir/underbog/boss_hungarfen.cpp index e8e68a0df..d59bbba0b 100644 --- a/scripts/outland/coilfang_reservoir/underbog/boss_hungarfen.cpp +++ b/scripts/outland/coilfang_reservoir/underbog/boss_hungarfen.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/outland/gruuls_lair/boss_gruul.cpp b/scripts/outland/gruuls_lair/boss_gruul.cpp index 7b21ae9bf..ff9440461 100644 --- a/scripts/outland/gruuls_lair/boss_gruul.cpp +++ b/scripts/outland/gruuls_lair/boss_gruul.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/outland/gruuls_lair/boss_high_king_maulgar.cpp b/scripts/outland/gruuls_lair/boss_high_king_maulgar.cpp index ebcbcd863..743ce6b4b 100644 --- a/scripts/outland/gruuls_lair/boss_high_king_maulgar.cpp +++ b/scripts/outland/gruuls_lair/boss_high_king_maulgar.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/outland/gruuls_lair/gruuls_lair.h b/scripts/outland/gruuls_lair/gruuls_lair.h index 59b3998b4..9dbab6c36 100644 --- a/scripts/outland/gruuls_lair/gruuls_lair.h +++ b/scripts/outland/gruuls_lair/gruuls_lair.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/outland/gruuls_lair/instance_gruuls_lair.cpp b/scripts/outland/gruuls_lair/instance_gruuls_lair.cpp index b83384029..b620907ab 100644 --- a/scripts/outland/gruuls_lair/instance_gruuls_lair.cpp +++ b/scripts/outland/gruuls_lair/instance_gruuls_lair.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/outland/hellfire_citadel/blood_furnace/blood_furnace.h b/scripts/outland/hellfire_citadel/blood_furnace/blood_furnace.h index a9e903b57..f784b544a 100644 --- a/scripts/outland/hellfire_citadel/blood_furnace/blood_furnace.h +++ b/scripts/outland/hellfire_citadel/blood_furnace/blood_furnace.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/outland/hellfire_citadel/blood_furnace/boss_broggok.cpp b/scripts/outland/hellfire_citadel/blood_furnace/boss_broggok.cpp index fdc59cbc8..2569734fd 100644 --- a/scripts/outland/hellfire_citadel/blood_furnace/boss_broggok.cpp +++ b/scripts/outland/hellfire_citadel/blood_furnace/boss_broggok.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/outland/hellfire_citadel/blood_furnace/boss_kelidan_the_breaker.cpp b/scripts/outland/hellfire_citadel/blood_furnace/boss_kelidan_the_breaker.cpp index 89c00c998..fe03ccf6f 100644 --- a/scripts/outland/hellfire_citadel/blood_furnace/boss_kelidan_the_breaker.cpp +++ b/scripts/outland/hellfire_citadel/blood_furnace/boss_kelidan_the_breaker.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/outland/hellfire_citadel/blood_furnace/boss_the_maker.cpp b/scripts/outland/hellfire_citadel/blood_furnace/boss_the_maker.cpp index bc9c15644..3b0adaf72 100644 --- a/scripts/outland/hellfire_citadel/blood_furnace/boss_the_maker.cpp +++ b/scripts/outland/hellfire_citadel/blood_furnace/boss_the_maker.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/outland/hellfire_citadel/blood_furnace/instance_blood_furnace.cpp b/scripts/outland/hellfire_citadel/blood_furnace/instance_blood_furnace.cpp index 616efc3de..4d6bc8675 100644 --- a/scripts/outland/hellfire_citadel/blood_furnace/instance_blood_furnace.cpp +++ b/scripts/outland/hellfire_citadel/blood_furnace/instance_blood_furnace.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_nazan_and_vazruden.cpp b/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_nazan_and_vazruden.cpp index c6e32688a..1ed4658e5 100644 --- a/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_nazan_and_vazruden.cpp +++ b/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_nazan_and_vazruden.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_omor_the_unscarred.cpp b/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_omor_the_unscarred.cpp index 5b02c53fd..8c0f0f20d 100644 --- a/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_omor_the_unscarred.cpp +++ b/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_omor_the_unscarred.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_watchkeeper_gargolmar.cpp b/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_watchkeeper_gargolmar.cpp index 127bad2ad..89e0a77ea 100644 --- a/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_watchkeeper_gargolmar.cpp +++ b/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_watchkeeper_gargolmar.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/outland/hellfire_citadel/hellfire_ramparts/hellfire_ramparts.h b/scripts/outland/hellfire_citadel/hellfire_ramparts/hellfire_ramparts.h index ab72b03b6..98f1c7e18 100644 --- a/scripts/outland/hellfire_citadel/hellfire_ramparts/hellfire_ramparts.h +++ b/scripts/outland/hellfire_citadel/hellfire_ramparts/hellfire_ramparts.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/outland/hellfire_citadel/hellfire_ramparts/instance_hellfire_ramparts.cpp b/scripts/outland/hellfire_citadel/hellfire_ramparts/instance_hellfire_ramparts.cpp index 65e2330a6..a9e97b6df 100644 --- a/scripts/outland/hellfire_citadel/hellfire_ramparts/instance_hellfire_ramparts.cpp +++ b/scripts/outland/hellfire_citadel/hellfire_ramparts/instance_hellfire_ramparts.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/outland/hellfire_citadel/magtheridons_lair/boss_magtheridon.cpp b/scripts/outland/hellfire_citadel/magtheridons_lair/boss_magtheridon.cpp index 9a9a0cbe5..c94469b10 100644 --- a/scripts/outland/hellfire_citadel/magtheridons_lair/boss_magtheridon.cpp +++ b/scripts/outland/hellfire_citadel/magtheridons_lair/boss_magtheridon.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/outland/hellfire_citadel/magtheridons_lair/instance_magtheridons_lair.cpp b/scripts/outland/hellfire_citadel/magtheridons_lair/instance_magtheridons_lair.cpp index 37babaad2..ab6ac725e 100644 --- a/scripts/outland/hellfire_citadel/magtheridons_lair/instance_magtheridons_lair.cpp +++ b/scripts/outland/hellfire_citadel/magtheridons_lair/instance_magtheridons_lair.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/outland/hellfire_citadel/magtheridons_lair/magtheridons_lair.h b/scripts/outland/hellfire_citadel/magtheridons_lair/magtheridons_lair.h index caeb8d6bb..65eb38277 100644 --- a/scripts/outland/hellfire_citadel/magtheridons_lair/magtheridons_lair.h +++ b/scripts/outland/hellfire_citadel/magtheridons_lair/magtheridons_lair.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/outland/hellfire_citadel/shattered_halls/boss_nethekurse.cpp b/scripts/outland/hellfire_citadel/shattered_halls/boss_nethekurse.cpp index 6ea52f618..bf753aeb3 100644 --- a/scripts/outland/hellfire_citadel/shattered_halls/boss_nethekurse.cpp +++ b/scripts/outland/hellfire_citadel/shattered_halls/boss_nethekurse.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/outland/hellfire_citadel/shattered_halls/boss_warbringer_omrogg.cpp b/scripts/outland/hellfire_citadel/shattered_halls/boss_warbringer_omrogg.cpp index f918fce53..377c058c7 100644 --- a/scripts/outland/hellfire_citadel/shattered_halls/boss_warbringer_omrogg.cpp +++ b/scripts/outland/hellfire_citadel/shattered_halls/boss_warbringer_omrogg.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/outland/hellfire_citadel/shattered_halls/boss_warchief_kargath_bladefist.cpp b/scripts/outland/hellfire_citadel/shattered_halls/boss_warchief_kargath_bladefist.cpp index 480436a55..75acf122a 100644 --- a/scripts/outland/hellfire_citadel/shattered_halls/boss_warchief_kargath_bladefist.cpp +++ b/scripts/outland/hellfire_citadel/shattered_halls/boss_warchief_kargath_bladefist.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/outland/hellfire_citadel/shattered_halls/instance_shattered_halls.cpp b/scripts/outland/hellfire_citadel/shattered_halls/instance_shattered_halls.cpp index 1bd71c41a..30f92ed07 100644 --- a/scripts/outland/hellfire_citadel/shattered_halls/instance_shattered_halls.cpp +++ b/scripts/outland/hellfire_citadel/shattered_halls/instance_shattered_halls.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/outland/hellfire_citadel/shattered_halls/shattered_halls.h b/scripts/outland/hellfire_citadel/shattered_halls/shattered_halls.h index 844e9b66f..96c660b0b 100644 --- a/scripts/outland/hellfire_citadel/shattered_halls/shattered_halls.h +++ b/scripts/outland/hellfire_citadel/shattered_halls/shattered_halls.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/outland/hellfire_peninsula.cpp b/scripts/outland/hellfire_peninsula.cpp index 2765095e9..85d0caf2f 100644 --- a/scripts/outland/hellfire_peninsula.cpp +++ b/scripts/outland/hellfire_peninsula.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/outland/nagrand.cpp b/scripts/outland/nagrand.cpp index adc3040a1..557ff9021 100644 --- a/scripts/outland/nagrand.cpp +++ b/scripts/outland/nagrand.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/outland/netherstorm.cpp b/scripts/outland/netherstorm.cpp index 4145b2229..6f1eaa172 100644 --- a/scripts/outland/netherstorm.cpp +++ b/scripts/outland/netherstorm.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/outland/shadowmoon_valley.cpp b/scripts/outland/shadowmoon_valley.cpp index 29513fcc8..6a6e7f5d9 100644 --- a/scripts/outland/shadowmoon_valley.cpp +++ b/scripts/outland/shadowmoon_valley.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/outland/shattrath_city.cpp b/scripts/outland/shattrath_city.cpp index 91d3effa7..edeb7fcbb 100644 --- a/scripts/outland/shattrath_city.cpp +++ b/scripts/outland/shattrath_city.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/outland/tempest_keep/arcatraz/arcatraz.cpp b/scripts/outland/tempest_keep/arcatraz/arcatraz.cpp index ea892f015..f5601d35b 100644 --- a/scripts/outland/tempest_keep/arcatraz/arcatraz.cpp +++ b/scripts/outland/tempest_keep/arcatraz/arcatraz.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/outland/tempest_keep/arcatraz/arcatraz.h b/scripts/outland/tempest_keep/arcatraz/arcatraz.h index 8d238416e..572070512 100644 --- a/scripts/outland/tempest_keep/arcatraz/arcatraz.h +++ b/scripts/outland/tempest_keep/arcatraz/arcatraz.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/outland/tempest_keep/arcatraz/boss_dalliah.cpp b/scripts/outland/tempest_keep/arcatraz/boss_dalliah.cpp index 7e76ce70e..8ff254caa 100644 --- a/scripts/outland/tempest_keep/arcatraz/boss_dalliah.cpp +++ b/scripts/outland/tempest_keep/arcatraz/boss_dalliah.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/outland/tempest_keep/arcatraz/boss_harbinger_skyriss.cpp b/scripts/outland/tempest_keep/arcatraz/boss_harbinger_skyriss.cpp index b16b420f4..d48a9422c 100644 --- a/scripts/outland/tempest_keep/arcatraz/boss_harbinger_skyriss.cpp +++ b/scripts/outland/tempest_keep/arcatraz/boss_harbinger_skyriss.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/outland/tempest_keep/arcatraz/boss_soccothrates.cpp b/scripts/outland/tempest_keep/arcatraz/boss_soccothrates.cpp index 7a540e1e1..e680ca5b5 100644 --- a/scripts/outland/tempest_keep/arcatraz/boss_soccothrates.cpp +++ b/scripts/outland/tempest_keep/arcatraz/boss_soccothrates.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/outland/tempest_keep/arcatraz/instance_arcatraz.cpp b/scripts/outland/tempest_keep/arcatraz/instance_arcatraz.cpp index 616df27af..a847851c4 100644 --- a/scripts/outland/tempest_keep/arcatraz/instance_arcatraz.cpp +++ b/scripts/outland/tempest_keep/arcatraz/instance_arcatraz.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/outland/tempest_keep/botanica/boss_high_botanist_freywinn.cpp b/scripts/outland/tempest_keep/botanica/boss_high_botanist_freywinn.cpp index 99cac2ba2..c7dd7d80e 100644 --- a/scripts/outland/tempest_keep/botanica/boss_high_botanist_freywinn.cpp +++ b/scripts/outland/tempest_keep/botanica/boss_high_botanist_freywinn.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/outland/tempest_keep/botanica/boss_laj.cpp b/scripts/outland/tempest_keep/botanica/boss_laj.cpp index 010d3d8b4..4c9e0cb96 100644 --- a/scripts/outland/tempest_keep/botanica/boss_laj.cpp +++ b/scripts/outland/tempest_keep/botanica/boss_laj.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/outland/tempest_keep/botanica/boss_warp_splinter.cpp b/scripts/outland/tempest_keep/botanica/boss_warp_splinter.cpp index 653b8fbf6..15ceef686 100644 --- a/scripts/outland/tempest_keep/botanica/boss_warp_splinter.cpp +++ b/scripts/outland/tempest_keep/botanica/boss_warp_splinter.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/outland/tempest_keep/the_eye/boss_alar.cpp b/scripts/outland/tempest_keep/the_eye/boss_alar.cpp index 568b8e512..67b7e6030 100644 --- a/scripts/outland/tempest_keep/the_eye/boss_alar.cpp +++ b/scripts/outland/tempest_keep/the_eye/boss_alar.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/outland/tempest_keep/the_eye/boss_astromancer.cpp b/scripts/outland/tempest_keep/the_eye/boss_astromancer.cpp index fcbdf1b73..86d864508 100644 --- a/scripts/outland/tempest_keep/the_eye/boss_astromancer.cpp +++ b/scripts/outland/tempest_keep/the_eye/boss_astromancer.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/outland/tempest_keep/the_eye/boss_kaelthas.cpp b/scripts/outland/tempest_keep/the_eye/boss_kaelthas.cpp index 54adeb726..266cd459f 100644 --- a/scripts/outland/tempest_keep/the_eye/boss_kaelthas.cpp +++ b/scripts/outland/tempest_keep/the_eye/boss_kaelthas.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/outland/tempest_keep/the_eye/boss_void_reaver.cpp b/scripts/outland/tempest_keep/the_eye/boss_void_reaver.cpp index e50cbfc25..7b3662f36 100644 --- a/scripts/outland/tempest_keep/the_eye/boss_void_reaver.cpp +++ b/scripts/outland/tempest_keep/the_eye/boss_void_reaver.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/outland/tempest_keep/the_eye/instance_the_eye.cpp b/scripts/outland/tempest_keep/the_eye/instance_the_eye.cpp index 95dace5bb..ecd46a634 100644 --- a/scripts/outland/tempest_keep/the_eye/instance_the_eye.cpp +++ b/scripts/outland/tempest_keep/the_eye/instance_the_eye.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/outland/tempest_keep/the_eye/the_eye.h b/scripts/outland/tempest_keep/the_eye/the_eye.h index 8d5da1912..8752c6475 100644 --- a/scripts/outland/tempest_keep/the_eye/the_eye.h +++ b/scripts/outland/tempest_keep/the_eye/the_eye.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/outland/tempest_keep/the_mechanar/boss_nethermancer_sepethrea.cpp b/scripts/outland/tempest_keep/the_mechanar/boss_nethermancer_sepethrea.cpp index 1c18dd7ef..50fbc6c6b 100644 --- a/scripts/outland/tempest_keep/the_mechanar/boss_nethermancer_sepethrea.cpp +++ b/scripts/outland/tempest_keep/the_mechanar/boss_nethermancer_sepethrea.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/outland/tempest_keep/the_mechanar/boss_pathaleon_the_calculator.cpp b/scripts/outland/tempest_keep/the_mechanar/boss_pathaleon_the_calculator.cpp index b42fad041..8d6d46afe 100644 --- a/scripts/outland/tempest_keep/the_mechanar/boss_pathaleon_the_calculator.cpp +++ b/scripts/outland/tempest_keep/the_mechanar/boss_pathaleon_the_calculator.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/outland/tempest_keep/the_mechanar/instance_mechanar.cpp b/scripts/outland/tempest_keep/the_mechanar/instance_mechanar.cpp index 4b5086a5b..1bac266f3 100644 --- a/scripts/outland/tempest_keep/the_mechanar/instance_mechanar.cpp +++ b/scripts/outland/tempest_keep/the_mechanar/instance_mechanar.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/outland/tempest_keep/the_mechanar/mechanar.h b/scripts/outland/tempest_keep/the_mechanar/mechanar.h index 65e7ef307..b3bbdfcaa 100644 --- a/scripts/outland/tempest_keep/the_mechanar/mechanar.h +++ b/scripts/outland/tempest_keep/the_mechanar/mechanar.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/outland/terokkar_forest.cpp b/scripts/outland/terokkar_forest.cpp index 5679ccec1..e92396cde 100644 --- a/scripts/outland/terokkar_forest.cpp +++ b/scripts/outland/terokkar_forest.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/outland/zangarmarsh.cpp b/scripts/outland/zangarmarsh.cpp index 8a695c6b0..c33a3cc89 100644 --- a/scripts/outland/zangarmarsh.cpp +++ b/scripts/outland/zangarmarsh.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/world/areatrigger_scripts.cpp b/scripts/world/areatrigger_scripts.cpp index 8af0f4a8f..f28e65ffb 100644 --- a/scripts/world/areatrigger_scripts.cpp +++ b/scripts/world/areatrigger_scripts.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/world/bosses_emerald_dragons.cpp b/scripts/world/bosses_emerald_dragons.cpp index 3814f7c8c..f60a84bfe 100644 --- a/scripts/world/bosses_emerald_dragons.cpp +++ b/scripts/world/bosses_emerald_dragons.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/world/go_scripts.cpp b/scripts/world/go_scripts.cpp index 338e8a98c..c3ced9a66 100644 --- a/scripts/world/go_scripts.cpp +++ b/scripts/world/go_scripts.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/world/guards.cpp b/scripts/world/guards.cpp index f7e8c1ce9..90e6b8589 100644 --- a/scripts/world/guards.cpp +++ b/scripts/world/guards.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/world/item_scripts.cpp b/scripts/world/item_scripts.cpp index fcdf64820..2de019280 100644 --- a/scripts/world/item_scripts.cpp +++ b/scripts/world/item_scripts.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/world/mob_generic_creature.cpp b/scripts/world/mob_generic_creature.cpp index 955ebc236..2b3d5c88d 100644 --- a/scripts/world/mob_generic_creature.cpp +++ b/scripts/world/mob_generic_creature.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/world/npc_professions.cpp b/scripts/world/npc_professions.cpp index 04e4781b4..f2692db62 100644 --- a/scripts/world/npc_professions.cpp +++ b/scripts/world/npc_professions.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/world/npcs_special.cpp b/scripts/world/npcs_special.cpp index 6d9090309..0de0606bd 100644 --- a/scripts/world/npcs_special.cpp +++ b/scripts/world/npcs_special.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/world/spell_scripts.cpp b/scripts/world/spell_scripts.cpp index 33e8d71f5..9704ef8d3 100644 --- a/scripts/world/spell_scripts.cpp +++ b/scripts/world/spell_scripts.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/world/world_map_scripts.cpp b/scripts/world/world_map_scripts.cpp index 3cffa4e4a..6955248fa 100644 --- a/scripts/world/world_map_scripts.cpp +++ b/scripts/world/world_map_scripts.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * 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 diff --git a/scripts/world/world_map_scripts.h b/scripts/world/world_map_scripts.h index 71bf4ecd5..27d41b262 100644 --- a/scripts/world/world_map_scripts.h +++ b/scripts/world/world_map_scripts.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 7abc0c482..872a2bcf2 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2780" + #define SD2_REVISION_NR "2781" #endif // __SD2_REVISION_NR_H__ diff --git a/system/MangosdRev.cpp b/system/MangosdRev.cpp index 62a73dc04..a7c8b1c66 100644 --- a/system/MangosdRev.cpp +++ b/system/MangosdRev.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/system/ScriptLoader.cpp b/system/ScriptLoader.cpp index 4342d62b5..15bcc807c 100644 --- a/system/ScriptLoader.cpp +++ b/system/ScriptLoader.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/system/ScriptLoader.h b/system/ScriptLoader.h index 8f27bae4f..8f2a11e37 100644 --- a/system/ScriptLoader.h +++ b/system/ScriptLoader.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/system/system.cpp b/system/system.cpp index 52eb81905..6a58780d9 100644 --- a/system/system.cpp +++ b/system/system.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/system/system.h b/system/system.h index df66c7c89..39b443d42 100644 --- a/system/system.h +++ b/system/system.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2012 ScriptDev2 +/* Copyright (C) 2006 - 2013 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/tool/git_id/git_id.cpp b/tool/git_id/git_id.cpp index 8f3b37d0f..9ebc97849 100644 --- a/tool/git_id/git_id.cpp +++ b/tool/git_id/git_id.cpp @@ -1,6 +1,6 @@ /* - * Copyright (C) 2005-2012 MaNGOS - * Copyright (C) 2005-2012 ScriptDev2 + * Copyright (C) 2005-2013 MaNGOS + * Copyright (C) 2005-2013 ScriptDev2 * * 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 From 51b3ace4ebeb35d07fd9f1f9226ebfded49be3d6 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Sun, 13 Jan 2013 00:37:54 +0100 Subject: [PATCH 0779/1172] [2782] Refix UBRS first room event. Also make the script independend from acid --- .../blackrock_spire/blackrock_spire.h | 2 +- .../instance_blackrock_spire.cpp | 48 +++++++++---------- sd2_revision_nr.h | 2 +- 3 files changed, 26 insertions(+), 26 deletions(-) diff --git a/scripts/eastern_kingdoms/blackrock_spire/blackrock_spire.h b/scripts/eastern_kingdoms/blackrock_spire/blackrock_spire.h index 8ece31ab5..cbdf6c650 100644 --- a/scripts/eastern_kingdoms/blackrock_spire/blackrock_spire.h +++ b/scripts/eastern_kingdoms/blackrock_spire/blackrock_spire.h @@ -101,12 +101,12 @@ class MANGOS_DLL_DECL instance_blackrock_spire : public ScriptedInstance, privat void OnObjectCreate(GameObject* pGo) override; void OnCreatureCreate(Creature* pCreature) override; + void OnCreatureDeath(Creature* pCreature) override; void OnCreatureEvade(Creature* pCreature); void OnCreatureEnterCombat(Creature* pCreature) override; void SetData(uint32 uiType, uint32 uiData) override; - void SetData64(uint32 uiType, uint64 uiData) override; uint32 GetData(uint32 uiType) const override; const char* Save() const override { return m_strInstData.c_str(); } diff --git a/scripts/eastern_kingdoms/blackrock_spire/instance_blackrock_spire.cpp b/scripts/eastern_kingdoms/blackrock_spire/instance_blackrock_spire.cpp index 471434133..ce6e0a24c 100644 --- a/scripts/eastern_kingdoms/blackrock_spire/instance_blackrock_spire.cpp +++ b/scripts/eastern_kingdoms/blackrock_spire/instance_blackrock_spire.cpp @@ -248,30 +248,6 @@ void instance_blackrock_spire::SetData(uint32 uiType, uint32 uiData) } } -void instance_blackrock_spire::SetData64(uint32 uiType, uint64 uiData) -{ - if (uiType == TYPE_ROOM_EVENT && GetData(TYPE_ROOM_EVENT) == IN_PROGRESS) - { - uint8 uiNotEmptyRoomsCount = 0; - for (uint8 i = 0; i < MAX_ROOMS; ++i) - { - if (m_aRoomRuneGuid[i]) // This check is used, to ensure which runes still need processing - { - m_alRoomEventMobGUIDSorted[i].remove(ObjectGuid(uiData)); - if (m_alRoomEventMobGUIDSorted[i].empty()) - { - DoUseDoorOrButton(m_aRoomRuneGuid[i]); - m_aRoomRuneGuid[i].Clear(); - } - else - ++uiNotEmptyRoomsCount; // found an not empty room - } - } - if (!uiNotEmptyRoomsCount) - SetData(TYPE_ROOM_EVENT, DONE); - } -} - void instance_blackrock_spire::Load(const char* chrIn) { if (!chrIn) @@ -327,6 +303,30 @@ void instance_blackrock_spire::OnCreatureDeath(Creature* pCreature) { switch (pCreature->GetEntry()) { + case NPC_BLACKHAND_SUMMONER: + case NPC_BLACKHAND_VETERAN: + // Handle Runes + if (m_auiEncounter[TYPE_ROOM_EVENT] == IN_PROGRESS) + { + uint8 uiNotEmptyRoomsCount = 0; + for (uint8 i = 0; i < MAX_ROOMS; ++i) + { + if (m_aRoomRuneGuid[i]) // This check is used, to ensure which runes still need processing + { + m_alRoomEventMobGUIDSorted[i].remove(pCreature->GetObjectGuid()); + if (m_alRoomEventMobGUIDSorted[i].empty()) + { + DoUseDoorOrButton(m_aRoomRuneGuid[i]); + m_aRoomRuneGuid[i].Clear(); + } + else + ++uiNotEmptyRoomsCount; // found an not empty room + } + } + if (!uiNotEmptyRoomsCount) + SetData(TYPE_ROOM_EVENT, DONE); + } + break; case NPC_DRAKKISATH: // Just open the doors, don't save anything because it's the last boss DoUseDoorOrButton(GO_DRAKKISATH_DOOR_1); diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 872a2bcf2..370dc68d5 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2781" + #define SD2_REVISION_NR "2782" #endif // __SD2_REVISION_NR_H__ From 60a15a656885dc828b6df256090e27b18b2bf9b6 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Thu, 17 Jan 2013 20:43:32 +0100 Subject: [PATCH 0780/1172] [2783] Use FixateTarget for Boss Sartura. Requires C-MaNGOS 12328 --- .../temple_of_ahnqiraj/boss_sartura.cpp | 141 ++++++++---------- sd2_revision_nr.h | 2 +- sql/scriptdev2_script_full.sql | 2 +- sql/updates/r2783_scriptdev2.sql | 1 + 4 files changed, 63 insertions(+), 83 deletions(-) create mode 100644 sql/updates/r2783_scriptdev2.sql diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_sartura.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_sartura.cpp index d0a38b0fc..bbd407186 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/boss_sartura.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_sartura.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: Boss_Sartura -SD%Complete: 85 -SDComment: Targeting currently doesn't work as expected +SD%Complete: 95 +SDComment: SDCategory: Temple of Ahn'Qiraj EndScriptData */ @@ -57,23 +57,17 @@ struct MANGOS_DLL_DECL boss_sarturaAI : public ScriptedAI uint32 m_uiEnrageHardTimer; bool m_bIsEnraged; - bool m_bIsEnragedHard; - bool m_bIsWhirlWind; - bool m_bAggroReset; void Reset() override { m_uiWhirlWindTimer = 30000; m_uiWhirlWindRandomTimer = urand(3000, 7000); - m_uiWhirlWindEndTimer = 15000; + m_uiWhirlWindEndTimer = 0; m_uiAggroResetTimer = urand(45000, 55000); - m_uiAggroResetEndTimer = 5000; + m_uiAggroResetEndTimer = 0; m_uiEnrageHardTimer = 10 * 60000; - m_bIsWhirlWind = false; - m_bAggroReset = false; m_bIsEnraged = false; - m_bIsEnragedHard = false; } void Aggro(Unit* pWho) override @@ -108,17 +102,13 @@ struct MANGOS_DLL_DECL boss_sarturaAI : public ScriptedAI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - if (m_bIsWhirlWind) + if (m_uiWhirlWindEndTimer) // Is in Whirlwind { // While whirlwind, switch to random targets often if (m_uiWhirlWindRandomTimer < uiDiff) { - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1)) - { - m_creature->AddThreat(pTarget); - m_creature->TauntApply(pTarget); - AttackStart(pTarget); - } + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + m_creature->FixateTarget(pTarget); m_uiWhirlWindRandomTimer = urand(3000, 7000); } @@ -126,49 +116,49 @@ struct MANGOS_DLL_DECL boss_sarturaAI : public ScriptedAI m_uiWhirlWindRandomTimer -= uiDiff; // End Whirlwind Phase - if (m_uiWhirlWindEndTimer < uiDiff) - m_bIsWhirlWind = false; + if (m_uiWhirlWindEndTimer <= uiDiff) + { + m_creature->FixateTarget(NULL); + m_uiWhirlWindEndTimer = 0; + m_uiWhirlWindTimer = urand(25000, 40000); + } else m_uiWhirlWindEndTimer -= uiDiff; } - else // if (!m_bIsWhirlWind) + else // if (!m_uiWhirlWindEndTimer) // Is not in whirlwind { // Enter Whirlwind Phase if (m_uiWhirlWindTimer < uiDiff) { if (DoCastSpellIfCan(m_creature, SPELL_WHIRLWIND) == CAST_OK) { - m_bIsWhirlWind = true; m_uiWhirlWindEndTimer = 15000; - m_uiWhirlWindTimer = urand(25000, 40000); + m_uiWhirlWindRandomTimer = 500; } } else m_uiWhirlWindTimer -= uiDiff; // Aquire a new target sometimes - if (m_uiAggroResetTimer < uiDiff) + if (!m_uiAggroResetEndTimer) // No random target picket { - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1)) + if (m_uiAggroResetTimer < uiDiff) { - m_creature->AddThreat(pTarget); - m_creature->TauntApply(pTarget); - AttackStart(pTarget); - } + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1)) + m_creature->FixateTarget(pTarget); - m_bAggroReset = true; - m_uiAggroResetTimer = urand(2000, 5000); + m_uiAggroResetEndTimer = 5000; + } + else + m_uiAggroResetTimer -= uiDiff; } - else - m_uiAggroResetTimer -= uiDiff; - - // Remove remaining taunts, TODO - if (m_bAggroReset) + else // Reset from recent random target { - if (m_uiAggroResetEndTimer < uiDiff) + // Remove remaining taunts + if (m_uiAggroResetEndTimer <= uiDiff) { - m_bAggroReset = false; - m_uiAggroResetEndTimer = 5000; + m_creature->FixateTarget(NULL); + m_uiAggroResetEndTimer = 0; m_uiAggroResetTimer = urand(35000, 45000); } else @@ -179,24 +169,24 @@ struct MANGOS_DLL_DECL boss_sarturaAI : public ScriptedAI // If she is 20% enrage if (!m_bIsEnraged && m_creature->GetHealthPercent() <= 20.0f) { - if (DoCastSpellIfCan(m_creature, SPELL_ENRAGE, m_bIsWhirlWind ? CAST_TRIGGERED : 0) == CAST_OK) + if (DoCastSpellIfCan(m_creature, SPELL_ENRAGE, m_uiWhirlWindEndTimer ? CAST_TRIGGERED : 0) == CAST_OK) m_bIsEnraged = true; } // After 10 minutes hard enrage - if (!m_bIsEnragedHard) + if (m_uiEnrageHardTimer) { - if (m_uiEnrageHardTimer < uiDiff) + if (m_uiEnrageHardTimer <= uiDiff) { - if (DoCastSpellIfCan(m_creature, SPELL_ENRAGEHARD, m_bIsWhirlWind ? CAST_TRIGGERED : 0) == CAST_OK) - m_bIsEnragedHard = true; + if (DoCastSpellIfCan(m_creature, SPELL_ENRAGEHARD, m_uiWhirlWindEndTimer ? CAST_TRIGGERED : 0) == CAST_OK) + m_uiEnrageHardTimer = 0; } else m_uiEnrageHardTimer -= uiDiff; } // No melee damage while in whirlwind - if (!m_bIsWhirlWind) + if (!m_uiWhirlWindEndTimer) DoMeleeAttackIfReady(); } }; @@ -212,20 +202,14 @@ struct MANGOS_DLL_DECL mob_sartura_royal_guardAI : public ScriptedAI uint32 m_uiAggroResetEndTimer; uint32 m_uiKnockBackTimer; - bool m_IsWhirlWind; - bool m_bAggroReset; - void Reset() override { m_uiWhirlWindTimer = 30000; m_uiWhirlWindRandomTimer = urand(3000, 7000); - m_uiWhirlWindEndTimer = 15000; + m_uiWhirlWindEndTimer = 0; m_uiAggroResetTimer = urand(45000, 55000); - m_uiAggroResetEndTimer = 5000; + m_uiAggroResetEndTimer = 0; m_uiKnockBackTimer = 10000; - - m_IsWhirlWind = false; - m_bAggroReset = false; } void UpdateAI(const uint32 uiDiff) override @@ -233,17 +217,13 @@ struct MANGOS_DLL_DECL mob_sartura_royal_guardAI : public ScriptedAI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - if (m_IsWhirlWind) + if (m_uiWhirlWindEndTimer) // Is in Whirlwind { // While whirlwind, switch to random targets often if (m_uiWhirlWindRandomTimer < uiDiff) { - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1)) - { - m_creature->AddThreat(pTarget); - m_creature->TauntApply(pTarget); - AttackStart(pTarget); - } + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + m_creature->FixateTarget(pTarget); m_uiWhirlWindRandomTimer = urand(3000, 7000); } @@ -251,49 +231,48 @@ struct MANGOS_DLL_DECL mob_sartura_royal_guardAI : public ScriptedAI m_uiWhirlWindRandomTimer -= uiDiff; // End Whirlwind Phase - if (m_uiWhirlWindEndTimer < uiDiff) - m_IsWhirlWind = false; + if (m_uiWhirlWindEndTimer <= uiDiff) + { + m_creature->FixateTarget(NULL); + m_uiWhirlWindEndTimer = 0; + m_uiWhirlWindTimer = urand(25000, 40000); + } else m_uiWhirlWindEndTimer -= uiDiff; } - else // if (!m_IsWhirlWind) + else // if (!m_uiWhirlWindEndTimer) // Is not in Whirlwind { // Enter Whirlwind Phase if (m_uiWhirlWindTimer < uiDiff) { if (DoCastSpellIfCan(m_creature, SPELL_WHIRLWIND_ADD) == CAST_OK) { - m_IsWhirlWind = true; m_uiWhirlWindEndTimer = 8000; - m_uiWhirlWindTimer = urand(25000, 40000); + m_uiWhirlWindRandomTimer = 500; } } else m_uiWhirlWindTimer -= uiDiff; // Aquire a new target sometimes - if (m_uiAggroResetTimer < uiDiff) + if (!m_uiAggroResetEndTimer) // No random target picket { - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1)) + if (m_uiAggroResetTimer < uiDiff) { - m_creature->AddThreat(pTarget); - m_creature->TauntApply(pTarget); - AttackStart(pTarget); - } + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1)) + m_creature->FixateTarget(pTarget); - m_bAggroReset = true; - m_uiAggroResetTimer = urand(2000, 5000); + m_uiAggroResetEndTimer = 5000; + } + else + m_uiAggroResetTimer -= uiDiff; } - else - m_uiAggroResetTimer -= uiDiff; - - // Remove remaining taunts, TODO - if (m_bAggroReset) + else // Reset from recent random target { - if (m_uiAggroResetEndTimer < uiDiff) + if (m_uiAggroResetEndTimer <= uiDiff) { - m_bAggroReset = false; - m_uiAggroResetEndTimer = 5000; + m_creature->FixateTarget(NULL); + m_uiAggroResetEndTimer = 0; m_uiAggroResetTimer = urand(30000, 40000); } else @@ -311,7 +290,7 @@ struct MANGOS_DLL_DECL mob_sartura_royal_guardAI : public ScriptedAI } // No melee damage while in whirlwind - if (!m_IsWhirlWind) + if (!m_uiWhirlWindEndTimer) DoMeleeAttackIfReady(); } }; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 370dc68d5..dfd8d942f 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2782" + #define SD2_REVISION_NR "2783" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index bb7f0dd05..546732e40 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -3,7 +3,7 @@ -- DELETE FROM sd2_db_version; -INSERT INTO sd2_db_version (version) VALUES ('ScriptDev2 (for C-MaNGOS 12316+) '); +INSERT INTO sd2_db_version (version) VALUES ('ScriptDev2 (for C-MaNGOS 12328+) '); -- -- Below contains data for table `script_texts` mainly used in C++ parts. diff --git a/sql/updates/r2783_scriptdev2.sql b/sql/updates/r2783_scriptdev2.sql new file mode 100644 index 000000000..d5495df52 --- /dev/null +++ b/sql/updates/r2783_scriptdev2.sql @@ -0,0 +1 @@ +UPDATE sd2_db_version SET version='ScriptDev2 (for C-MaNGOS 12328+) '; From 12c4bbc2af01cd4297ddc7d1f6d6ab94e21f73e7 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Thu, 17 Jan 2013 20:55:14 +0100 Subject: [PATCH 0781/1172] [2784] Use FixateTarget for Boss Supremus --- scripts/outland/black_temple/boss_supremus.cpp | 16 +++++----------- sd2_revision_nr.h | 2 +- 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/scripts/outland/black_temple/boss_supremus.cpp b/scripts/outland/black_temple/boss_supremus.cpp index 8bc2e2cb8..58071317c 100644 --- a/scripts/outland/black_temple/boss_supremus.cpp +++ b/scripts/outland/black_temple/boss_supremus.cpp @@ -17,7 +17,7 @@ /* ScriptData SDName: Boss_Supremus SD%Complete: 90 -SDComment: Fixating the target is hacky, unknown if other speed-changes happen, remove AI for trigger mobs in next step +SDComment: Unknown if other speed-changes happen, remove AI for trigger mobs in next step SDCategory: Black Temple EndScriptData */ @@ -99,8 +99,6 @@ struct MANGOS_DLL_DECL boss_supremusAI : public ScriptedAI uint32 m_uiBerserkTimer; uint32 m_uiMoltenPunchTimer; - ObjectGuid m_lastGazeTargetGuid; - bool m_bTankPhase; GuidList m_lSummonedGUIDs; @@ -113,8 +111,6 @@ struct MANGOS_DLL_DECL boss_supremusAI : public ScriptedAI m_uiMoltenPunchTimer = 8000; m_uiBerserkTimer = 15 * MINUTE * IN_MILLISECONDS; - m_lastGazeTargetGuid.Clear(); - m_bTankPhase = true; } @@ -187,7 +183,8 @@ struct MANGOS_DLL_DECL boss_supremusAI : public ScriptedAI void KilledUnit(Unit* pKilled) override { - if (!m_bTankPhase && pKilled->GetObjectGuid() == m_lastGazeTargetGuid) + // The current target is the fixated target - repick a new one + if (!m_bTankPhase && pKilled == m_creature->getVictim()) m_uiSwitchTargetTimer = 0; } @@ -222,6 +219,7 @@ struct MANGOS_DLL_DECL boss_supremusAI : public ScriptedAI { m_bTankPhase = true; m_creature->RemoveAurasDueToSpell(SPELL_SLOW_SELF); + m_creature->FixateTarget(NULL); } else { @@ -233,7 +231,6 @@ struct MANGOS_DLL_DECL boss_supremusAI : public ScriptedAI } m_uiPhaseSwitchTimer = MINUTE * IN_MILLISECONDS; - DoResetThreat(); } else m_uiPhaseSwitchTimer -= uiDiff; @@ -257,12 +254,9 @@ struct MANGOS_DLL_DECL boss_supremusAI : public ScriptedAI { if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) { - DoResetThreat(); - // This way to simulate some fixating is to be considered a hack - m_creature->AddThreat(pTarget, 5000000.0f); + m_creature->FixateTarget(pTarget); DoScriptText(EMOTE_NEW_TARGET, m_creature); m_uiSwitchTargetTimer = 10000; - m_lastGazeTargetGuid = pTarget->GetObjectGuid(); } } else diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index dfd8d942f..31b0a2db5 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2783" + #define SD2_REVISION_NR "2784" #endif // __SD2_REVISION_NR_H__ From 1385b30929bc91132c8e43c80f12264fb9fbc969 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Tue, 19 Feb 2013 22:05:24 +0200 Subject: [PATCH 0782/1172] [2785] Add script support for SSC water. Requires CMangos 12361 --- .../instance_serpent_shrine.cpp | 61 ++++++++++++++++--- .../serpent_shrine/serpent_shrine.h | 14 +++++ sd2_revision_nr.h | 2 +- sql/scriptdev2_script_full.sql | 2 +- sql/updates/r2785_scriptdev2.sql | 1 + 5 files changed, 69 insertions(+), 11 deletions(-) create mode 100644 sql/updates/r2785_scriptdev2.sql diff --git a/scripts/outland/coilfang_reservoir/serpent_shrine/instance_serpent_shrine.cpp b/scripts/outland/coilfang_reservoir/serpent_shrine/instance_serpent_shrine.cpp index ba458ad06..6f8562e71 100644 --- a/scripts/outland/coilfang_reservoir/serpent_shrine/instance_serpent_shrine.cpp +++ b/scripts/outland/coilfang_reservoir/serpent_shrine/instance_serpent_shrine.cpp @@ -75,6 +75,14 @@ void instance_serpentshrine_cavern::OnCreatureCreate(Creature* pCreature) case NPC_SHIELD_GENERATOR: m_lShieldGeneratorGUIDList.push_back(pCreature->GetObjectGuid()); break; + case NPC_COILFANG_PRIESTESS: + case NPC_COILFANG_SHATTERER: + case NPC_VASHJIR_HONOR_GUARD: + case NPC_GREYHEART_TECHNICIAN: + // Filter only the mobs spawned on the platforms + if (pCreature->GetPositionZ() > 0) + m_sPlatformMobsGUIDSet.insert(pCreature->GetObjectGuid()); + break; } } @@ -99,7 +107,7 @@ void instance_serpentshrine_cavern::SetData(uint32 uiType, uint32 uiData) m_auiEncounter[uiType] = uiData; break; case TYPE_LEOTHERAS_EVENT: - m_auiEncounter[1] = uiData; + m_auiEncounter[uiType] = uiData; if (uiData == FAIL) { for (GuidList::const_iterator itr = m_lSpellBindersGUIDList.begin(); itr != m_lSpellBindersGUIDList.end(); ++itr) @@ -182,6 +190,32 @@ uint32 instance_serpentshrine_cavern::GetData(uint32 uiType) const return 0; } +void instance_serpentshrine_cavern::SetData64(uint32 uiData, uint64 uiGuid) +{ + // Note: this is handled in Acid. The purpose is check which npc from the platform set is alive + // The function is triggered by eventAI on generic timer + if (uiData == DATA_WATERSTATE_EVENT) + { + if (m_sPlatformMobsGUIDSet.find(ObjectGuid(uiGuid)) != m_sPlatformMobsGUIDSet.end()) + m_sPlatformMobsAliveGUIDSet.insert(ObjectGuid(uiGuid)); + } +} + +bool instance_serpentshrine_cavern::CheckConditionCriteriaMeet(Player const* pPlayer, uint32 uiInstanceConditionId, WorldObject const* pConditionSource, uint32 conditionSourceType) const +{ + switch (uiInstanceConditionId) + { + case INSTANCE_CONDITION_ID_LURKER: + return GetData(TYPE_THELURKER_EVENT) != DONE; + case INSTANCE_CONDITION_ID_SCALDING_WATER: + return m_sPlatformMobsAliveGUIDSet.empty(); + } + + script_error_log("instance_serpentshrine_cavern::CheckConditionCriteriaMeet called with unsupported Id %u. Called with param plr %s, src %s, condition source type %u", + uiInstanceConditionId, pPlayer ? pPlayer->GetGuidStr().c_str() : "NULL", pConditionSource ? pConditionSource->GetGuidStr().c_str() : "NULL", conditionSourceType); + return false; +} + void instance_serpentshrine_cavern::OnCreatureEnterCombat(Creature* pCreature) { // Interrupt spell casting on aggro @@ -191,18 +225,27 @@ void instance_serpentshrine_cavern::OnCreatureEnterCombat(Creature* pCreature) void instance_serpentshrine_cavern::OnCreatureDeath(Creature* pCreature) { - if (pCreature->GetEntry() == NPC_GREYHEART_SPELLBINDER) + switch (pCreature->GetEntry()) { - ++m_uiSpellBinderCount; + case NPC_GREYHEART_SPELLBINDER: + ++m_uiSpellBinderCount; - if (m_uiSpellBinderCount == MAX_SPELLBINDERS) - { - if (Creature* pLeotheras = GetSingleCreatureFromStorage(NPC_LEOTHERAS)) + if (m_uiSpellBinderCount == MAX_SPELLBINDERS) { - pLeotheras->RemoveAurasDueToSpell(SPELL_LEOTHERAS_BANISH); - pLeotheras->SetInCombatWithZone(); + if (Creature* pLeotheras = GetSingleCreatureFromStorage(NPC_LEOTHERAS)) + { + pLeotheras->RemoveAurasDueToSpell(SPELL_LEOTHERAS_BANISH); + pLeotheras->SetInCombatWithZone(); + } } - } + break; + case NPC_COILFANG_PRIESTESS: + case NPC_COILFANG_SHATTERER: + case NPC_VASHJIR_HONOR_GUARD: + case NPC_GREYHEART_TECHNICIAN: + if (m_sPlatformMobsGUIDSet.find(pCreature->GetObjectGuid()) != m_sPlatformMobsGUIDSet.end()) + m_sPlatformMobsAliveGUIDSet.erase(pCreature->GetObjectGuid()); + break; } } diff --git a/scripts/outland/coilfang_reservoir/serpent_shrine/serpent_shrine.h b/scripts/outland/coilfang_reservoir/serpent_shrine/serpent_shrine.h index ddf8f2805..f83194db8 100644 --- a/scripts/outland/coilfang_reservoir/serpent_shrine/serpent_shrine.h +++ b/scripts/outland/coilfang_reservoir/serpent_shrine/serpent_shrine.h @@ -17,6 +17,8 @@ enum TYPE_MOROGRIM_EVENT = 4, TYPE_THELURKER_EVENT = 5, + DATA_WATERSTATE_EVENT = 1, // DO NOT CHANGE! Used by Acid. - used to check the mobs for the water event. + // NPC_KARATHRESS = 21214, NPC_CARIBDIS = 21964, NPC_SHARKKIS = 21966, @@ -27,6 +29,12 @@ enum NPC_HYDROSS_BEAM_HELPER = 21933, NPC_SHIELD_GENERATOR = 19870, + // waterstate event related + NPC_COILFANG_PRIESTESS = 21220, + NPC_COILFANG_SHATTERER = 21301, + NPC_VASHJIR_HONOR_GUARD = 21218, + NPC_GREYHEART_TECHNICIAN = 21263, + GO_SHIELD_GENERATOR_1 = 185051, GO_SHIELD_GENERATOR_2 = 185052, GO_SHIELD_GENERATOR_3 = 185053, @@ -62,6 +70,10 @@ class MANGOS_DLL_DECL instance_serpentshrine_cavern : public ScriptedInstance void SetData(uint32 uiType, uint32 uiData) override; uint32 GetData(uint32 uiType) const override; + void SetData64(uint32 uiType, uint64 uiGuid) override; + + bool CheckConditionCriteriaMeet(Player const* pPlayer, uint32 uiInstanceConditionId, WorldObject const* pConditionSource, uint32 conditionSourceType) const override; + void GetBeamHelpersGUIDList(GuidList& lList) { lList = m_lBeamHelpersGUIDList; } void GetShieldGeneratorsGUIDList(GuidList& lList) { lList = m_lShieldGeneratorGUIDList; } @@ -77,6 +89,8 @@ class MANGOS_DLL_DECL instance_serpentshrine_cavern : public ScriptedInstance GuidList m_lSpellBindersGUIDList; GuidList m_lBeamHelpersGUIDList; GuidList m_lShieldGeneratorGUIDList; + GuidSet m_sPlatformMobsGUIDSet; + GuidSet m_sPlatformMobsAliveGUIDSet; }; #endif diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 31b0a2db5..a984cf0fe 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2784" + #define SD2_REVISION_NR "2785" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 546732e40..fe44817d3 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -3,7 +3,7 @@ -- DELETE FROM sd2_db_version; -INSERT INTO sd2_db_version (version) VALUES ('ScriptDev2 (for C-MaNGOS 12328+) '); +INSERT INTO sd2_db_version (version) VALUES ('ScriptDev2 (for C-MaNGOS 12361+) '); -- -- Below contains data for table `script_texts` mainly used in C++ parts. diff --git a/sql/updates/r2785_scriptdev2.sql b/sql/updates/r2785_scriptdev2.sql new file mode 100644 index 000000000..fca8408f0 --- /dev/null +++ b/sql/updates/r2785_scriptdev2.sql @@ -0,0 +1 @@ +UPDATE sd2_db_version SET version='ScriptDev2 (for C-MaNGOS 12361+) '; From 9456f04fbadb03822124ae48824ad537603c3d85 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Wed, 20 Feb 2013 01:08:59 +0200 Subject: [PATCH 0783/1172] [2786] Allow Buru to use FixateTarget --- scripts/kalimdor/ruins_of_ahnqiraj/boss_buru.cpp | 9 +++++---- sd2_revision_nr.h | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/scripts/kalimdor/ruins_of_ahnqiraj/boss_buru.cpp b/scripts/kalimdor/ruins_of_ahnqiraj/boss_buru.cpp index 112fb568a..8f2507e7a 100644 --- a/scripts/kalimdor/ruins_of_ahnqiraj/boss_buru.cpp +++ b/scripts/kalimdor/ruins_of_ahnqiraj/boss_buru.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: Boss_Buru -SD%Complete: 50 -SDComment: Timers; Fixate for phase I target NYI; Kill eggs on transform NYI; Egg explode damage and Buru stun are missing +SD%Complete: 70 +SDComment: Timers; Kill eggs on transform NYI; Egg explode damage and Buru stun are missing SDCategory: Ruins of Ahn'Qiraj EndScriptData */ @@ -73,6 +73,7 @@ struct MANGOS_DLL_DECL boss_buruAI : public ScriptedAI { DoScriptText(EMOTE_TARGET, m_creature, pWho); DoCastSpellIfCan(m_creature, SPELL_THORNS); + m_creature->FixateTarget(pWho); } void KilledUnit(Unit* pVictim) override @@ -93,8 +94,7 @@ struct MANGOS_DLL_DECL boss_buruAI : public ScriptedAI if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0, uint32(0), SELECT_FLAG_PLAYER)) { - DoResetThreat(); - m_creature->AI()->AttackStart(pTarget); + m_creature->FixateTarget(pTarget); DoScriptText(EMOTE_TARGET, m_creature, pTarget); } @@ -145,6 +145,7 @@ struct MANGOS_DLL_DECL boss_buruAI : public ScriptedAI // Not sure of this but the boss should gain full speed in phase II DoCastSpellIfCan(m_creature, SPELL_FULL_SPEED, CAST_TRIGGERED); m_creature->RemoveAurasDueToSpell(SPELL_THORNS); + m_creature->FixateTarget(NULL); m_uiPhase = PHASE_TRANSFORM; } } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index a984cf0fe..2aae9ca78 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2785" + #define SD2_REVISION_NR "2786" #endif // __SD2_REVISION_NR_H__ From 51e2b4e3d05e7fada73c671b7762e5ba6373260b Mon Sep 17 00:00:00 2001 From: stfx Date: Thu, 21 Feb 2013 22:30:55 +0200 Subject: [PATCH 0784/1172] [2787] Update spell entry for quest 10898 Signed-off-by: Xfurry --- scripts/outland/terokkar_forest.cpp | 43 +++++++++++++++++++++++++++-- sd2_revision_nr.h | 2 +- 2 files changed, 41 insertions(+), 4 deletions(-) diff --git a/scripts/outland/terokkar_forest.cpp b/scripts/outland/terokkar_forest.cpp index e92396cde..523a07995 100644 --- a/scripts/outland/terokkar_forest.cpp +++ b/scripts/outland/terokkar_forest.cpp @@ -913,7 +913,8 @@ enum SAY_SKYWING_SUMMON = -1000801, SAY_SKYWING_END = -1000802, - // SPELL_TRANSFORM = ?????, // ToDo: research the transform spell id + SPELL_FEATHERY_CYCLONE_BURST = 39166, // triggered many times by server side spell - 39167 (channeled for 5 sec) + SPELL_RILAK_THE_REDEEMED = 39179, NPC_LUANGA_THE_IMPRISONER = 18533, @@ -926,7 +927,17 @@ struct MANGOS_DLL_DECL npc_skywingAI : public npc_escortAI { npc_skywingAI(Creature* pCreature) : npc_escortAI(pCreature) { Reset(); } - void Reset() override {} + uint32 m_uiCycloneTimer; + uint8 m_uiCycloneCounter; + + void Reset() override + { + if (!HasEscortState(STATE_ESCORT_ESCORTING)) + { + m_uiCycloneTimer = 0; + m_uiCycloneCounter = 0; + } + } void WaypointReached(uint32 uiPointId) override { @@ -950,7 +961,8 @@ struct MANGOS_DLL_DECL npc_skywingAI : public npc_escortAI m_creature->SummonCreature(NPC_LUANGA_THE_IMPRISONER, aLuangaSpawnCoords[0], aLuangaSpawnCoords[1], aLuangaSpawnCoords[2], 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); break; case 81: - // ToDo: implement transform spell here + // Start transformation + m_uiCycloneTimer = 100; break; case 82: DoScriptText(SAY_SKYWING_END, m_creature); @@ -964,6 +976,31 @@ struct MANGOS_DLL_DECL npc_skywingAI : public npc_escortAI { pSummoned->AI()->AttackStart(m_creature); } + + void UpdateEscortAI(const uint32 uiDiff) override + { + if (m_uiCycloneTimer) + { + if (m_uiCycloneTimer <= uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_FEATHERY_CYCLONE_BURST) == CAST_OK) + { + ++m_uiCycloneCounter; + + if (m_uiCycloneCounter == 30) + DoCastSpellIfCan(m_creature, SPELL_RILAK_THE_REDEEMED, CAST_TRIGGERED); + + // Only cast this spell 50 times + if (m_uiCycloneCounter == 50) + m_uiCycloneTimer = 0; + else + m_uiCycloneTimer = 100; + } + } + else + m_uiCycloneTimer -= uiDiff; + } + } }; bool QuestAccept_npc_skywing(Player* pPlayer, Creature* pCreature, const Quest* pQuest) diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 2aae9ca78..bba2caeab 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2786" + #define SD2_REVISION_NR "2787" #endif // __SD2_REVISION_NR_H__ From e5ccd93f3969306cf3871bd19ca1b38e85010089 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Thu, 21 Feb 2013 22:02:10 +0100 Subject: [PATCH 0785/1172] [2788] Rename TempSummon types, accordingly to C-MaNGOS commit [12358] * Rename TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT to TEMPSUMMON_TIMED_OOC_DESPAWN * Rename TEMPSUMMON_TIMED_OR_DEAD_DESPAWN to TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN * Rename TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN to TEMPSUMMON_TIMED_OOC_OR_CORPSE_DESPAW Note: Many of these types might be wrong, but this change will _not_ affect mechanics --- scripts/eastern_kingdoms/arathi_highlands.cpp | 4 +- .../boss_ambassador_flamelash.cpp | 2 +- .../boss_general_angerforge.cpp | 2 +- .../blackwing_lair/boss_victor_nefarius.cpp | 4 +- scripts/eastern_kingdoms/burning_steppes.cpp | 22 +++---- scripts/eastern_kingdoms/eversong_woods.cpp | 6 +- scripts/eastern_kingdoms/hinterlands.cpp | 4 +- .../karazhan/boss_curator.cpp | 2 +- .../karazhan/boss_shade_of_aran.cpp | 2 +- .../boss_felblood_kaelthas.cpp | 2 +- .../molten_core/boss_majordomo_executus.cpp | 2 +- .../molten_core/boss_ragnaros.cpp | 2 +- .../scarlet_enclave/ebon_hold.cpp | 4 +- .../scarlet_monastery/boss_herod.cpp | 2 +- scripts/eastern_kingdoms/tirisfal_glades.cpp | 2 +- .../eastern_kingdoms/western_plaguelands.cpp | 8 +-- scripts/eastern_kingdoms/westfall.cpp | 24 +++---- .../eastern_kingdoms/zulgurub/boss_arlokk.cpp | 4 +- .../eastern_kingdoms/zulgurub/boss_jindo.cpp | 4 +- .../zulgurub/boss_mandokir.cpp | 2 +- scripts/examples/example_escort.cpp | 2 +- scripts/kalimdor/ashenvale.cpp | 28 ++++---- scripts/kalimdor/bloodmyst_isle.cpp | 2 +- .../caverns_of_time/hyjal/boss_archimonde.cpp | 2 +- .../caverns_of_time/hyjal/hyjalAI.cpp | 2 +- .../old_hillsbrad/old_hillsbrad.cpp | 48 +++++++------- scripts/kalimdor/darkshore.cpp | 26 ++++---- scripts/kalimdor/dustwallow_marsh.cpp | 10 +-- scripts/kalimdor/moonglade.cpp | 2 +- scripts/kalimdor/onyxias_lair/boss_onyxia.cpp | 4 +- .../razorfen_downs/razorfen_downs.cpp | 4 +- .../razorfen_kraul/razorfen_kraul.cpp | 8 +-- .../ruins_of_ahnqiraj/boss_ayamiss.cpp | 2 +- .../temple_of_ahnqiraj/boss_bug_trio.cpp | 2 +- .../temple_of_ahnqiraj/boss_fankriss.cpp | 2 +- scripts/kalimdor/the_barrens.cpp | 8 +-- scripts/kalimdor/thousand_needles.cpp | 6 +- .../wailing_caverns/wailing_caverns.cpp | 2 +- scripts/northrend/borean_tundra.cpp | 2 +- scripts/northrend/howling_fjord.cpp | 2 +- .../northrend/naxxramas/boss_anubrekhan.cpp | 2 +- .../northrend/naxxramas/boss_grobbulus.cpp | 2 +- scripts/northrend/naxxramas/boss_maexxna.cpp | 6 +- scripts/northrend/nexus/oculus/boss_urom.cpp | 4 +- .../violet_hold/instance_violet_hold.cpp | 4 +- scripts/northrend/violet_hold/violet_hold.cpp | 8 +-- scripts/northrend/zuldrak.cpp | 2 +- .../auchenai_crypts/boss_exarch_maladaar.cpp | 2 +- .../auchindoun/sethekk_halls/boss_anzu.cpp | 2 +- .../boss_mekgineer_steamrigger.cpp | 4 +- .../boss_warchief_kargath_bladefist.cpp | 14 ++-- .../instance_shattered_halls.cpp | 2 +- scripts/outland/hellfire_peninsula.cpp | 10 +-- scripts/outland/nagrand.cpp | 14 ++-- scripts/outland/netherstorm.cpp | 66 +++++++++---------- scripts/outland/shadowmoon_valley.cpp | 2 +- .../arcatraz/instance_arcatraz.cpp | 2 +- .../tempest_keep/the_eye/boss_kaelthas.cpp | 2 +- scripts/outland/terokkar_forest.cpp | 14 ++-- scripts/outland/zangarmarsh.cpp | 8 +-- scripts/world/areatrigger_scripts.cpp | 4 +- scripts/world/go_scripts.cpp | 6 +- scripts/world/npcs_special.cpp | 4 +- scripts/world/spell_scripts.cpp | 8 +-- sd2_revision_nr.h | 2 +- 65 files changed, 231 insertions(+), 231 deletions(-) diff --git a/scripts/eastern_kingdoms/arathi_highlands.cpp b/scripts/eastern_kingdoms/arathi_highlands.cpp index 9a2837385..bfd5df44f 100644 --- a/scripts/eastern_kingdoms/arathi_highlands.cpp +++ b/scripts/eastern_kingdoms/arathi_highlands.cpp @@ -68,8 +68,8 @@ struct MANGOS_DLL_DECL npc_professor_phizzlethorpeAI : public npc_escortAI case 5: DoScriptText(SAY_PROGRESS_3, m_creature, pPlayer); break; case 8: DoScriptText(EMOTE_PROGRESS_4, m_creature); break; case 9: - m_creature->SummonCreature(ENTRY_VENGEFUL_SURGE, -2056.41f, -2144.01f, 20.59f, 5.70f, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 600000); - m_creature->SummonCreature(ENTRY_VENGEFUL_SURGE, -2050.17f, -2140.02f, 19.54f, 5.17f, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 600000); + m_creature->SummonCreature(ENTRY_VENGEFUL_SURGE, -2056.41f, -2144.01f, 20.59f, 5.70f, TEMPSUMMON_TIMED_OOC_OR_CORPSE_DESPAWN, 600000); + m_creature->SummonCreature(ENTRY_VENGEFUL_SURGE, -2050.17f, -2140.02f, 19.54f, 5.17f, TEMPSUMMON_TIMED_OOC_OR_CORPSE_DESPAWN, 600000); break; case 10: DoScriptText(SAY_PROGRESS_5, m_creature, pPlayer); break; case 11: diff --git a/scripts/eastern_kingdoms/blackrock_depths/boss_ambassador_flamelash.cpp b/scripts/eastern_kingdoms/blackrock_depths/boss_ambassador_flamelash.cpp index 51b66d795..e7ff1725c 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/boss_ambassador_flamelash.cpp +++ b/scripts/eastern_kingdoms/blackrock_depths/boss_ambassador_flamelash.cpp @@ -50,7 +50,7 @@ struct MANGOS_DLL_DECL boss_ambassador_flamelashAI : public ScriptedAI { float fX, fY, fZ; m_creature->GetRandomPoint(m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), 30.0f, fX, fY, fZ); - m_creature->SummonCreature(NPC_BURNING_SPIRIT, fX, fY, fZ, m_creature->GetAngle(fX, fY) + M_PI_F, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 60000); + m_creature->SummonCreature(NPC_BURNING_SPIRIT, fX, fY, fZ, m_creature->GetAngle(fX, fY) + M_PI_F, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 60000); } void Aggro(Unit* pWho) override diff --git a/scripts/eastern_kingdoms/blackrock_depths/boss_general_angerforge.cpp b/scripts/eastern_kingdoms/blackrock_depths/boss_general_angerforge.cpp index c989f7fce..594b5ba86 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/boss_general_angerforge.cpp +++ b/scripts/eastern_kingdoms/blackrock_depths/boss_general_angerforge.cpp @@ -56,7 +56,7 @@ struct MANGOS_DLL_DECL boss_general_angerforgeAI : public ScriptedAI { float fX, fY, fZ; m_creature->GetRandomPoint(m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), 20.0f, fX, fY, fZ); - m_creature->SummonCreature(uiEntry, fX, fY, fZ, 0.0f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 60000); + m_creature->SummonCreature(uiEntry, fX, fY, fZ, 0.0f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 60000); } void JustSummoned(Creature* pSummoned) override diff --git a/scripts/eastern_kingdoms/blackwing_lair/boss_victor_nefarius.cpp b/scripts/eastern_kingdoms/blackwing_lair/boss_victor_nefarius.cpp index 9d10d5f59..f320a81f9 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/boss_victor_nefarius.cpp +++ b/scripts/eastern_kingdoms/blackwing_lair/boss_victor_nefarius.cpp @@ -333,11 +333,11 @@ struct MANGOS_DLL_DECL boss_victor_nefariusAI : public ScriptedAI, private Dialo // 1 in 3 chance it will be a chromatic uiCreatureId = urand(0, 2) ? m_uiDrakeTypeOne : uint32(NPC_CHROMATIC_DRAKANOID); - m_creature->SummonCreature(uiCreatureId, aNefarianLocs[0].m_fX, aNefarianLocs[0].m_fY, aNefarianLocs[0].m_fZ, 5.000f, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 30000); + m_creature->SummonCreature(uiCreatureId, aNefarianLocs[0].m_fX, aNefarianLocs[0].m_fY, aNefarianLocs[0].m_fZ, 5.000f, TEMPSUMMON_TIMED_OOC_OR_CORPSE_DESPAWN, 30000); // 1 in 3 chance it will be a chromatic uiCreatureId = urand(0, 2) ? m_uiDrakeTypeTwo : uint32(NPC_CHROMATIC_DRAKANOID); - m_creature->SummonCreature(uiCreatureId, aNefarianLocs[1].m_fX, aNefarianLocs[1].m_fY, aNefarianLocs[1].m_fZ, 5.000, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 30000); + m_creature->SummonCreature(uiCreatureId, aNefarianLocs[1].m_fX, aNefarianLocs[1].m_fY, aNefarianLocs[1].m_fZ, 5.000, TEMPSUMMON_TIMED_OOC_OR_CORPSE_DESPAWN, 30000); // Begin phase 2 by spawning Nefarian if (m_uiSpawnedAdds >= MAX_DRAKE_SUMMONS) diff --git a/scripts/eastern_kingdoms/burning_steppes.cpp b/scripts/eastern_kingdoms/burning_steppes.cpp index 64d906ca6..413258fa0 100644 --- a/scripts/eastern_kingdoms/burning_steppes.cpp +++ b/scripts/eastern_kingdoms/burning_steppes.cpp @@ -251,24 +251,24 @@ struct MANGOS_DLL_DECL npc_grark_lorkrubAI : public npc_escortAI, private Dialog DoScriptText(SAY_FIRST_AMBUSH_START, m_creature); SetEscortPaused(true); - m_creature->SummonCreature(NPC_BLACKROCK_AMBUSHER, -7844.3f, -1521.6f, 139.2f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 20000); - m_creature->SummonCreature(NPC_BLACKROCK_AMBUSHER, -7860.4f, -1507.8f, 141.0f, 6.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 20000); - m_creature->SummonCreature(NPC_BLACKROCK_RAIDER, -7845.6f, -1508.1f, 138.8f, 6.1f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 20000); - m_creature->SummonCreature(NPC_BLACKROCK_RAIDER, -7859.8f, -1521.8f, 139.2f, 6.2f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 20000); + m_creature->SummonCreature(NPC_BLACKROCK_AMBUSHER, -7844.3f, -1521.6f, 139.2f, 0.0f, TEMPSUMMON_TIMED_OOC_DESPAWN, 20000); + m_creature->SummonCreature(NPC_BLACKROCK_AMBUSHER, -7860.4f, -1507.8f, 141.0f, 6.0f, TEMPSUMMON_TIMED_OOC_DESPAWN, 20000); + m_creature->SummonCreature(NPC_BLACKROCK_RAIDER, -7845.6f, -1508.1f, 138.8f, 6.1f, TEMPSUMMON_TIMED_OOC_DESPAWN, 20000); + m_creature->SummonCreature(NPC_BLACKROCK_RAIDER, -7859.8f, -1521.8f, 139.2f, 6.2f, TEMPSUMMON_TIMED_OOC_DESPAWN, 20000); break; case 24: DoScriptText(SAY_SEC_AMBUSH_START, m_creature); SetEscortPaused(true); - m_creature->SummonCreature(NPC_BLACKROCK_AMBUSHER, -8035.3f, -1222.2f, 135.5f, 5.1f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 20000); - m_creature->SummonCreature(NPC_FLAMESCALE_DRAGONSPAWN, -8037.5f, -1216.9f, 135.8f, 5.1f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 20000); - m_creature->SummonCreature(NPC_BLACKROCK_AMBUSHER, -8009.5f, -1222.1f, 139.2f, 3.9f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 20000); - m_creature->SummonCreature(NPC_FLAMESCALE_DRAGONSPAWN, -8007.1f, -1219.4f, 140.1f, 3.9f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 20000); + m_creature->SummonCreature(NPC_BLACKROCK_AMBUSHER, -8035.3f, -1222.2f, 135.5f, 5.1f, TEMPSUMMON_TIMED_OOC_DESPAWN, 20000); + m_creature->SummonCreature(NPC_FLAMESCALE_DRAGONSPAWN, -8037.5f, -1216.9f, 135.8f, 5.1f, TEMPSUMMON_TIMED_OOC_DESPAWN, 20000); + m_creature->SummonCreature(NPC_BLACKROCK_AMBUSHER, -8009.5f, -1222.1f, 139.2f, 3.9f, TEMPSUMMON_TIMED_OOC_DESPAWN, 20000); + m_creature->SummonCreature(NPC_FLAMESCALE_DRAGONSPAWN, -8007.1f, -1219.4f, 140.1f, 3.9f, TEMPSUMMON_TIMED_OOC_DESPAWN, 20000); break; case 28: - m_creature->SummonCreature(NPC_SEARSCALE_DRAKE, -7897.8f, -1123.1f, 233.4f, 3.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 60000); - m_creature->SummonCreature(NPC_SEARSCALE_DRAKE, -7898.8f, -1125.1f, 193.9f, 3.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 60000); - m_creature->SummonCreature(NPC_SEARSCALE_DRAKE, -7895.6f, -1119.5f, 194.5f, 3.1f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 60000); + m_creature->SummonCreature(NPC_SEARSCALE_DRAKE, -7897.8f, -1123.1f, 233.4f, 3.0f, TEMPSUMMON_TIMED_OOC_DESPAWN, 60000); + m_creature->SummonCreature(NPC_SEARSCALE_DRAKE, -7898.8f, -1125.1f, 193.9f, 3.0f, TEMPSUMMON_TIMED_OOC_DESPAWN, 60000); + m_creature->SummonCreature(NPC_SEARSCALE_DRAKE, -7895.6f, -1119.5f, 194.5f, 3.1f, TEMPSUMMON_TIMED_OOC_DESPAWN, 60000); break; case 30: { diff --git a/scripts/eastern_kingdoms/eversong_woods.cpp b/scripts/eastern_kingdoms/eversong_woods.cpp index 0bff45eab..ddf622ea6 100644 --- a/scripts/eastern_kingdoms/eversong_woods.cpp +++ b/scripts/eastern_kingdoms/eversong_woods.cpp @@ -133,7 +133,7 @@ struct MANGOS_DLL_DECL npc_kelerun_bloodmournAI : public ScriptedAI if (Creature* pCreature = m_creature->SummonCreature(uiChallengerId[i], fChallengerLoc[i][0], fChallengerLoc[i][1], fChallengerLoc[i][2], fChallengerLoc[i][3], - TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 600000)) + TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 600000)) { m_aChallengerGuids[i] = pCreature->GetObjectGuid(); pCreature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); @@ -490,14 +490,14 @@ struct MANGOS_DLL_DECL npc_infused_crystalAI : public Scripted_NoMovementAI if (m_bFirstWave) { for (uint8 i = 0; i < 3; ++i) - m_creature->SummonCreature(NPC_ENRAGED_WRAITH, aSummonPos[i][0], aSummonPos[i][1], aSummonPos[i][2], aSummonPos[i][3], TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 5 * MINUTE); + m_creature->SummonCreature(NPC_ENRAGED_WRAITH, aSummonPos[i][0], aSummonPos[i][1], aSummonPos[i][2], aSummonPos[i][3], TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 5 * MINUTE); m_uiWaveTimer = 29000; m_bFirstWave = false; } else { for (uint8 i = 3; i < 6; ++i) - m_creature->SummonCreature(NPC_ENRAGED_WRAITH, aSummonPos[i][0], aSummonPos[i][1], aSummonPos[i][2], aSummonPos[i][3], TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 5 * MINUTE); + m_creature->SummonCreature(NPC_ENRAGED_WRAITH, aSummonPos[i][0], aSummonPos[i][1], aSummonPos[i][2], aSummonPos[i][3], TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 5 * MINUTE); m_uiWaveTimer = 0; } } diff --git a/scripts/eastern_kingdoms/hinterlands.cpp b/scripts/eastern_kingdoms/hinterlands.cpp index a1058778a..a29a5917c 100644 --- a/scripts/eastern_kingdoms/hinterlands.cpp +++ b/scripts/eastern_kingdoms/hinterlands.cpp @@ -220,13 +220,13 @@ struct MANGOS_DLL_DECL npc_rinjiAI : public npc_escortAI m_creature->SummonCreature(NPC_RANGER, m_afAmbushSpawn[m_iSpawnId].m_fX, m_afAmbushSpawn[m_iSpawnId].m_fY, m_afAmbushSpawn[m_iSpawnId].m_fZ, 0.0f, - TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 60000); + TEMPSUMMON_TIMED_OOC_OR_CORPSE_DESPAWN, 60000); for (int i = 0; i < 2; ++i) { m_creature->SummonCreature(NPC_OUTRUNNER, m_afAmbushSpawn[m_iSpawnId].m_fX, m_afAmbushSpawn[m_iSpawnId].m_fY, m_afAmbushSpawn[m_iSpawnId].m_fZ, 0.0f, - TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 60000); + TEMPSUMMON_TIMED_OOC_OR_CORPSE_DESPAWN, 60000); } } diff --git a/scripts/eastern_kingdoms/karazhan/boss_curator.cpp b/scripts/eastern_kingdoms/karazhan/boss_curator.cpp index 2db55ca61..25c2091b7 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_curator.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_curator.cpp @@ -153,7 +153,7 @@ struct MANGOS_DLL_DECL boss_curatorAI : public ScriptedAI // summon Astral Flare float fX, fY, fZ; m_creature->GetRandomPoint(m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), 10.0f, fX, fY, fZ); - m_creature->SummonCreature(NPC_ASTRAL_FLARE, fX, fY, fZ, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); + m_creature->SummonCreature(NPC_ASTRAL_FLARE, fX, fY, fZ, 0, TEMPSUMMON_TIMED_OOC_DESPAWN, 5000); // reduce mana by 10% of maximum if (int32 iMana = m_creature->GetMaxPower(POWER_MANA)) diff --git a/scripts/eastern_kingdoms/karazhan/boss_shade_of_aran.cpp b/scripts/eastern_kingdoms/karazhan/boss_shade_of_aran.cpp index a639ec21b..17f4f5cfd 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_shade_of_aran.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_shade_of_aran.cpp @@ -380,7 +380,7 @@ struct MANGOS_DLL_DECL boss_aranAI : public ScriptedAI if (m_uiBerserkTimer <= uiDiff) { for (uint8 i = 0; i < MAX_SHADOWS_OF_ARAN; ++i) - DoSpawnCreature(NPC_SHADOW_OF_ARAN, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); + DoSpawnCreature(NPC_SHADOW_OF_ARAN, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_OOC_DESPAWN, 5000); DoScriptText(SAY_TIMEOVER, m_creature); m_uiBerserkTimer = 0; diff --git a/scripts/eastern_kingdoms/magisters_terrace/boss_felblood_kaelthas.cpp b/scripts/eastern_kingdoms/magisters_terrace/boss_felblood_kaelthas.cpp index 7bfd3c30f..a8c5dc3a4 100644 --- a/scripts/eastern_kingdoms/magisters_terrace/boss_felblood_kaelthas.cpp +++ b/scripts/eastern_kingdoms/magisters_terrace/boss_felblood_kaelthas.cpp @@ -502,7 +502,7 @@ struct MANGOS_DLL_DECL mob_felkael_phoenixAI : public ScriptedAI // Spawn egg and make invisible DoCastSpellIfCan(m_creature, SPELL_EMBER_BLAST, CAST_TRIGGERED); - m_creature->SummonCreature(NPC_PHOENIX_EGG, 0, 0, 0, 0, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 10000); + m_creature->SummonCreature(NPC_PHOENIX_EGG, 0, 0, 0, 0, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 10000); } void SummonedCreatureDespawn(Creature* pSummoned) override diff --git a/scripts/eastern_kingdoms/molten_core/boss_majordomo_executus.cpp b/scripts/eastern_kingdoms/molten_core/boss_majordomo_executus.cpp index 18cc38d48..78889bf39 100644 --- a/scripts/eastern_kingdoms/molten_core/boss_majordomo_executus.cpp +++ b/scripts/eastern_kingdoms/molten_core/boss_majordomo_executus.cpp @@ -318,7 +318,7 @@ struct MANGOS_DLL_DECL boss_majordomoAI : public ScriptedAI // Summon Ragnaros if (m_pInstance) if (GameObject* pGo = m_pInstance->GetSingleGameObjectFromStorage(GO_LAVA_STEAM)) - m_creature->SummonCreature(NPC_RAGNAROS, pGo->GetPositionX(), pGo->GetPositionY(), pGo->GetPositionZ(), fmod(m_creature->GetOrientation() + M_PI, 2 * M_PI), TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 2 * HOUR * IN_MILLISECONDS); + m_creature->SummonCreature(NPC_RAGNAROS, pGo->GetPositionX(), pGo->GetPositionY(), pGo->GetPositionZ(), fmod(m_creature->GetOrientation() + M_PI, 2 * M_PI), TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 2 * HOUR * IN_MILLISECONDS); ++m_uiSpeech; m_uiSpeechTimer = 8700; break; diff --git a/scripts/eastern_kingdoms/molten_core/boss_ragnaros.cpp b/scripts/eastern_kingdoms/molten_core/boss_ragnaros.cpp index 248b3469c..4e7740947 100644 --- a/scripts/eastern_kingdoms/molten_core/boss_ragnaros.cpp +++ b/scripts/eastern_kingdoms/molten_core/boss_ragnaros.cpp @@ -279,7 +279,7 @@ struct MANGOS_DLL_DECL boss_ragnarosAI : public Scripted_NoMovementAI for (uint8 i = 0; i < MAX_ADDS_IN_SUBMERGE; ++i) { m_creature->GetRandomPoint(m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), 30.0f, fX, fY, fZ); - m_creature->SummonCreature(NPC_SON_OF_FLAME, fX, fY, fZ, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 1000); + m_creature->SummonCreature(NPC_SON_OF_FLAME, fX, fY, fZ, 0.0f, TEMPSUMMON_TIMED_OOC_DESPAWN, 1000); } return; diff --git a/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp b/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp index b96d9c042..564a9537e 100644 --- a/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp +++ b/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp @@ -735,7 +735,7 @@ struct MANGOS_DLL_DECL npc_koltira_deathweaverAI : public npc_escortAI void SummonAcolyte(uint32 uiAmount) { for (uint32 i = 0; i < uiAmount; ++i) - m_creature->SummonCreature(NPC_CRIMSON_ACOLYTE, 1642.329f, -6045.818f, 127.583f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); + m_creature->SummonCreature(NPC_CRIMSON_ACOLYTE, 1642.329f, -6045.818f, 127.583f, 0.0f, TEMPSUMMON_TIMED_OOC_DESPAWN, 5000); } void UpdateEscortAI(const uint32 uiDiff) override @@ -763,7 +763,7 @@ struct MANGOS_DLL_DECL npc_koltira_deathweaverAI : public npc_escortAI break; case 3: DoScriptText(SAY_BREAKOUT6, m_creature); - m_creature->SummonCreature(NPC_HIGH_INQUISITOR_VALROTH, 1642.329f, -6045.818f, 127.583f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 1000); + m_creature->SummonCreature(NPC_HIGH_INQUISITOR_VALROTH, 1642.329f, -6045.818f, 127.583f, 0.0f, TEMPSUMMON_TIMED_OOC_DESPAWN, 1000); m_uiWave_Timer = 1000; break; case 4: diff --git a/scripts/eastern_kingdoms/scarlet_monastery/boss_herod.cpp b/scripts/eastern_kingdoms/scarlet_monastery/boss_herod.cpp index 947573d15..b56d419fa 100644 --- a/scripts/eastern_kingdoms/scarlet_monastery/boss_herod.cpp +++ b/scripts/eastern_kingdoms/scarlet_monastery/boss_herod.cpp @@ -85,7 +85,7 @@ struct MANGOS_DLL_DECL boss_herodAI : public ScriptedAI void JustDied(Unit* /*pKiller*/) override { for (uint8 i = 0; i < 20; ++i) - m_creature->SummonCreature(NPC_SCARLET_TRAINEE, 1939.18f, -431.58f, 17.09f, 6.22f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 600000); + m_creature->SummonCreature(NPC_SCARLET_TRAINEE, 1939.18f, -431.58f, 17.09f, 6.22f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 600000); } void UpdateAI(const uint32 uiDiff) override diff --git a/scripts/eastern_kingdoms/tirisfal_glades.cpp b/scripts/eastern_kingdoms/tirisfal_glades.cpp index a8081f9f2..b5564f7d1 100644 --- a/scripts/eastern_kingdoms/tirisfal_glades.cpp +++ b/scripts/eastern_kingdoms/tirisfal_glades.cpp @@ -50,7 +50,7 @@ bool GOUse_go_mausoleum_door(Player* pPlayer, GameObject* pGo) if (GameObject* pTrigger = GetClosestGameObjectWithEntry(pPlayer, GO_TRIGGER, 30.0f)) { pTrigger->SetGoState(GO_STATE_READY); - pPlayer->SummonCreature(NPC_ULAG, 2390.26f, 336.47f, 40.01f, 2.26f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 300000); + pPlayer->SummonCreature(NPC_ULAG, 2390.26f, 336.47f, 40.01f, 2.26f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 300000); return false; } diff --git a/scripts/eastern_kingdoms/western_plaguelands.cpp b/scripts/eastern_kingdoms/western_plaguelands.cpp index 2f9d8f43f..dbdbc9af6 100644 --- a/scripts/eastern_kingdoms/western_plaguelands.cpp +++ b/scripts/eastern_kingdoms/western_plaguelands.cpp @@ -60,7 +60,7 @@ struct MANGOS_DLL_DECL npc_the_scourge_cauldronAI : public ScriptedAI if (((Player*)who)->GetQuestStatus(5216) == QUEST_STATUS_INCOMPLETE || ((Player*)who)->GetQuestStatus(5229) == QUEST_STATUS_INCOMPLETE) { - m_creature->SummonCreature(11075, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 600000); + m_creature->SummonCreature(11075, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 600000); DoDie(); } break; @@ -68,7 +68,7 @@ struct MANGOS_DLL_DECL npc_the_scourge_cauldronAI : public ScriptedAI if (((Player*)who)->GetQuestStatus(5219) == QUEST_STATUS_INCOMPLETE || ((Player*)who)->GetQuestStatus(5231) == QUEST_STATUS_INCOMPLETE) { - m_creature->SummonCreature(11077, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 600000); + m_creature->SummonCreature(11077, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 600000); DoDie(); } break; @@ -76,7 +76,7 @@ struct MANGOS_DLL_DECL npc_the_scourge_cauldronAI : public ScriptedAI if (((Player*)who)->GetQuestStatus(5225) == QUEST_STATUS_INCOMPLETE || ((Player*)who)->GetQuestStatus(5235) == QUEST_STATUS_INCOMPLETE) { - m_creature->SummonCreature(11078, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 600000); + m_creature->SummonCreature(11078, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 600000); DoDie(); } break; @@ -84,7 +84,7 @@ struct MANGOS_DLL_DECL npc_the_scourge_cauldronAI : public ScriptedAI if (((Player*)who)->GetQuestStatus(5222) == QUEST_STATUS_INCOMPLETE || ((Player*)who)->GetQuestStatus(5233) == QUEST_STATUS_INCOMPLETE) { - m_creature->SummonCreature(11076, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 600000); + m_creature->SummonCreature(11076, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 600000); DoDie(); } break; diff --git a/scripts/eastern_kingdoms/westfall.cpp b/scripts/eastern_kingdoms/westfall.cpp index af9f6b40a..b8407f979 100644 --- a/scripts/eastern_kingdoms/westfall.cpp +++ b/scripts/eastern_kingdoms/westfall.cpp @@ -87,24 +87,24 @@ struct MANGOS_DLL_DECL npc_daphne_stilwellAI : public npc_escortAI m_creature->HandleEmote(EMOTE_STATE_USESTANDING_NOSHEATHE); break; case 7: - m_creature->SummonCreature(NPC_DEFIAS_RAIDER, -11450.836f, 1569.755f, 54.267f, 4.230f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); - m_creature->SummonCreature(NPC_DEFIAS_RAIDER, -11449.697f, 1569.124f, 54.421f, 4.206f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); - m_creature->SummonCreature(NPC_DEFIAS_RAIDER, -11448.237f, 1568.307f, 54.620f, 4.206f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); + m_creature->SummonCreature(NPC_DEFIAS_RAIDER, -11450.836f, 1569.755f, 54.267f, 4.230f, TEMPSUMMON_TIMED_OOC_DESPAWN, 30000); + m_creature->SummonCreature(NPC_DEFIAS_RAIDER, -11449.697f, 1569.124f, 54.421f, 4.206f, TEMPSUMMON_TIMED_OOC_DESPAWN, 30000); + m_creature->SummonCreature(NPC_DEFIAS_RAIDER, -11448.237f, 1568.307f, 54.620f, 4.206f, TEMPSUMMON_TIMED_OOC_DESPAWN, 30000); break; case 8: m_creature->SetSheath(SHEATH_STATE_RANGED); - m_creature->SummonCreature(NPC_DEFIAS_RAIDER, -11450.836f, 1569.755f, 54.267f, 4.230f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); - m_creature->SummonCreature(NPC_DEFIAS_RAIDER, -11449.697f, 1569.124f, 54.421f, 4.206f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); - m_creature->SummonCreature(NPC_DEFIAS_RAIDER, -11448.237f, 1568.307f, 54.620f, 4.206f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); - m_creature->SummonCreature(NPC_DEFIAS_RAIDER, -11448.037f, 1570.213f, 54.961f, 4.283f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); + m_creature->SummonCreature(NPC_DEFIAS_RAIDER, -11450.836f, 1569.755f, 54.267f, 4.230f, TEMPSUMMON_TIMED_OOC_DESPAWN, 30000); + m_creature->SummonCreature(NPC_DEFIAS_RAIDER, -11449.697f, 1569.124f, 54.421f, 4.206f, TEMPSUMMON_TIMED_OOC_DESPAWN, 30000); + m_creature->SummonCreature(NPC_DEFIAS_RAIDER, -11448.237f, 1568.307f, 54.620f, 4.206f, TEMPSUMMON_TIMED_OOC_DESPAWN, 30000); + m_creature->SummonCreature(NPC_DEFIAS_RAIDER, -11448.037f, 1570.213f, 54.961f, 4.283f, TEMPSUMMON_TIMED_OOC_DESPAWN, 30000); break; case 9: m_creature->SetSheath(SHEATH_STATE_RANGED); - m_creature->SummonCreature(NPC_DEFIAS_RAIDER, -11450.836f, 1569.755f, 54.267f, 4.230f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); - m_creature->SummonCreature(NPC_DEFIAS_RAIDER, -11449.697f, 1569.124f, 54.421f, 4.206f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); - m_creature->SummonCreature(NPC_DEFIAS_RAIDER, -11448.237f, 1568.307f, 54.620f, 4.206f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); - m_creature->SummonCreature(NPC_DEFIAS_RAIDER, -11448.037f, 1570.213f, 54.961f, 4.283f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); - m_creature->SummonCreature(NPC_DEFIAS_RAIDER, -11449.018f, 1570.738f, 54.828f, 4.220f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); + m_creature->SummonCreature(NPC_DEFIAS_RAIDER, -11450.836f, 1569.755f, 54.267f, 4.230f, TEMPSUMMON_TIMED_OOC_DESPAWN, 30000); + m_creature->SummonCreature(NPC_DEFIAS_RAIDER, -11449.697f, 1569.124f, 54.421f, 4.206f, TEMPSUMMON_TIMED_OOC_DESPAWN, 30000); + m_creature->SummonCreature(NPC_DEFIAS_RAIDER, -11448.237f, 1568.307f, 54.620f, 4.206f, TEMPSUMMON_TIMED_OOC_DESPAWN, 30000); + m_creature->SummonCreature(NPC_DEFIAS_RAIDER, -11448.037f, 1570.213f, 54.961f, 4.283f, TEMPSUMMON_TIMED_OOC_DESPAWN, 30000); + m_creature->SummonCreature(NPC_DEFIAS_RAIDER, -11449.018f, 1570.738f, 54.828f, 4.220f, TEMPSUMMON_TIMED_OOC_DESPAWN, 30000); break; case 10: SetRun(false); diff --git a/scripts/eastern_kingdoms/zulgurub/boss_arlokk.cpp b/scripts/eastern_kingdoms/zulgurub/boss_arlokk.cpp index 02614ae89..73ed9e319 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_arlokk.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_arlokk.cpp @@ -127,9 +127,9 @@ struct MANGOS_DLL_DECL boss_arlokkAI : public ScriptedAI if (m_pInstance) { if (Creature* pTrigger = m_pInstance->SelectRandomPantherTrigger(true)) - m_creature->SummonCreature(NPC_ZULIAN_PROWLER, pTrigger->GetPositionX(), pTrigger->GetPositionY(), pTrigger->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); + m_creature->SummonCreature(NPC_ZULIAN_PROWLER, pTrigger->GetPositionX(), pTrigger->GetPositionY(), pTrigger->GetPositionZ(), 0, TEMPSUMMON_TIMED_OOC_DESPAWN, 30000); if (Creature* pTrigger = m_pInstance->SelectRandomPantherTrigger(false)) - m_creature->SummonCreature(NPC_ZULIAN_PROWLER, pTrigger->GetPositionX(), pTrigger->GetPositionY(), pTrigger->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); + m_creature->SummonCreature(NPC_ZULIAN_PROWLER, pTrigger->GetPositionX(), pTrigger->GetPositionY(), pTrigger->GetPositionZ(), 0, TEMPSUMMON_TIMED_OOC_DESPAWN, 30000); } m_uiSummonTimer = 5000; diff --git a/scripts/eastern_kingdoms/zulgurub/boss_jindo.cpp b/scripts/eastern_kingdoms/zulgurub/boss_jindo.cpp index e8adc40fd..3524860b3 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_jindo.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_jindo.cpp @@ -132,7 +132,7 @@ struct MANGOS_DLL_DECL boss_jindoAI : public ScriptedAI { float fX, fY, fZ; m_creature->GetRandomPoint(pTarget->GetPositionX(), pTarget->GetPositionY(), pTarget->GetPositionZ(), 5.0f, fX, fY, fZ); - if (Creature* pSummoned = m_creature->SummonCreature(NPC_SHADE_OF_JINDO, fX, fY, fZ, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000)) + if (Creature* pSummoned = m_creature->SummonCreature(NPC_SHADE_OF_JINDO, fX, fY, fZ, 0, TEMPSUMMON_TIMED_OOC_DESPAWN, 15000)) pSummoned->AI()->AttackStart(pTarget); m_uiDelusionsTimer = urand(4000, 12000); @@ -153,7 +153,7 @@ struct MANGOS_DLL_DECL boss_jindoAI : public ScriptedAI for (uint8 i = 0; i < MAX_SKELETONS; ++i) { m_creature->GetRandomPoint(aPitTeleportLocs[0], aPitTeleportLocs[1], aPitTeleportLocs[2], 4.0f, fX, fY, fZ); - if (Creature* pSummoned = m_creature->SummonCreature(NPC_SACRIFICED_TROLL, fX, fY, fZ, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000)) + if (Creature* pSummoned = m_creature->SummonCreature(NPC_SACRIFICED_TROLL, fX, fY, fZ, 0.0f, TEMPSUMMON_TIMED_OOC_DESPAWN, 15000)) pSummoned->AI()->AttackStart(pTarget); } diff --git a/scripts/eastern_kingdoms/zulgurub/boss_mandokir.cpp b/scripts/eastern_kingdoms/zulgurub/boss_mandokir.cpp index 956ce7166..175bdc866 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_mandokir.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_mandokir.cpp @@ -131,7 +131,7 @@ struct MANGOS_DLL_DECL boss_mandokirAI : public ScriptedAI m_creature->Unmount(); // And summon his raptor - m_creature->SummonCreature(NPC_OHGAN, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 35000); + m_creature->SummonCreature(NPC_OHGAN, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_OOC_DESPAWN, 35000); if (m_pInstance) m_pInstance->SetData(TYPE_OHGAN, IN_PROGRESS); diff --git a/scripts/examples/example_escort.cpp b/scripts/examples/example_escort.cpp index a753ca112..28426f1b0 100644 --- a/scripts/examples/example_escort.cpp +++ b/scripts/examples/example_escort.cpp @@ -80,7 +80,7 @@ struct MANGOS_DLL_DECL example_escortAI : public npc_escortAI break; case 3: DoScriptText(SAY_WP_2, m_creature); - m_creature->SummonCreature(NPC_FELBOAR, m_creature->GetPositionX() + 5.0f, m_creature->GetPositionY() + 7.0f, m_creature->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 3000); + m_creature->SummonCreature(NPC_FELBOAR, m_creature->GetPositionX() + 5.0f, m_creature->GetPositionY() + 7.0f, m_creature->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_OOC_DESPAWN, 3000); break; case 4: if (Player* pTmpPlayer = GetPlayerForEscort()) diff --git a/scripts/kalimdor/ashenvale.cpp b/scripts/kalimdor/ashenvale.cpp index db6dd2bb0..6bffdb5f9 100644 --- a/scripts/kalimdor/ashenvale.cpp +++ b/scripts/kalimdor/ashenvale.cpp @@ -156,17 +156,17 @@ struct MANGOS_DLL_DECL npc_muglashAI : public npc_escortAI switch (m_uiWaveId) { case 1: - m_creature->SummonCreature(NPC_WRATH_RIDER, m_afFirstNagaCoord[0][0], m_afFirstNagaCoord[0][1], m_afFirstNagaCoord[0][2], 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 60000); - m_creature->SummonCreature(NPC_WRATH_SORCERESS, m_afFirstNagaCoord[1][0], m_afFirstNagaCoord[1][1], m_afFirstNagaCoord[1][2], 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 60000); - m_creature->SummonCreature(NPC_WRATH_RAZORTAIL, m_afFirstNagaCoord[2][0], m_afFirstNagaCoord[2][1], m_afFirstNagaCoord[2][2], 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 60000); + m_creature->SummonCreature(NPC_WRATH_RIDER, m_afFirstNagaCoord[0][0], m_afFirstNagaCoord[0][1], m_afFirstNagaCoord[0][2], 0.0f, TEMPSUMMON_TIMED_OOC_DESPAWN, 60000); + m_creature->SummonCreature(NPC_WRATH_SORCERESS, m_afFirstNagaCoord[1][0], m_afFirstNagaCoord[1][1], m_afFirstNagaCoord[1][2], 0.0f, TEMPSUMMON_TIMED_OOC_DESPAWN, 60000); + m_creature->SummonCreature(NPC_WRATH_RAZORTAIL, m_afFirstNagaCoord[2][0], m_afFirstNagaCoord[2][1], m_afFirstNagaCoord[2][2], 0.0f, TEMPSUMMON_TIMED_OOC_DESPAWN, 60000); break; case 2: - m_creature->SummonCreature(NPC_WRATH_PRIESTESS, m_afSecondNagaCoord[0][0], m_afSecondNagaCoord[0][1], m_afSecondNagaCoord[0][2], 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 60000); - m_creature->SummonCreature(NPC_WRATH_MYRMIDON, m_afSecondNagaCoord[1][0], m_afSecondNagaCoord[1][1], m_afSecondNagaCoord[1][2], 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 60000); - m_creature->SummonCreature(NPC_WRATH_SEAWITCH, m_afSecondNagaCoord[2][0], m_afSecondNagaCoord[2][1], m_afSecondNagaCoord[2][2], 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 60000); + m_creature->SummonCreature(NPC_WRATH_PRIESTESS, m_afSecondNagaCoord[0][0], m_afSecondNagaCoord[0][1], m_afSecondNagaCoord[0][2], 0.0f, TEMPSUMMON_TIMED_OOC_DESPAWN, 60000); + m_creature->SummonCreature(NPC_WRATH_MYRMIDON, m_afSecondNagaCoord[1][0], m_afSecondNagaCoord[1][1], m_afSecondNagaCoord[1][2], 0.0f, TEMPSUMMON_TIMED_OOC_DESPAWN, 60000); + m_creature->SummonCreature(NPC_WRATH_SEAWITCH, m_afSecondNagaCoord[2][0], m_afSecondNagaCoord[2][1], m_afSecondNagaCoord[2][2], 0.0f, TEMPSUMMON_TIMED_OOC_DESPAWN, 60000); break; case 3: - m_creature->SummonCreature(NPC_VORSHA, m_fVorshaCoord[0], m_fVorshaCoord[1], m_fVorshaCoord[2], 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 60000); + m_creature->SummonCreature(NPC_VORSHA, m_fVorshaCoord[0], m_fVorshaCoord[1], m_fVorshaCoord[2], 0.0f, TEMPSUMMON_TIMED_OOC_DESPAWN, 60000); break; case 4: SetEscortPaused(false); @@ -356,9 +356,9 @@ struct MANGOS_DLL_DECL npc_torekAI : public npc_escortAI break; case 19: // TODO: verify location and creatures amount. - m_creature->SummonCreature(NPC_DURIEL, 1776.73f, -2049.06f, 109.83f, 1.54f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000); - m_creature->SummonCreature(NPC_SILVERWING_SENTINEL, 1774.64f, -2049.41f, 109.83f, 1.40f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000); - m_creature->SummonCreature(NPC_SILVERWING_WARRIOR, 1778.73f, -2049.50f, 109.83f, 1.67f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000); + m_creature->SummonCreature(NPC_DURIEL, 1776.73f, -2049.06f, 109.83f, 1.54f, TEMPSUMMON_TIMED_OOC_DESPAWN, 25000); + m_creature->SummonCreature(NPC_SILVERWING_SENTINEL, 1774.64f, -2049.41f, 109.83f, 1.40f, TEMPSUMMON_TIMED_OOC_DESPAWN, 25000); + m_creature->SummonCreature(NPC_SILVERWING_WARRIOR, 1778.73f, -2049.50f, 109.83f, 1.67f, TEMPSUMMON_TIMED_OOC_DESPAWN, 25000); break; case 20: DoScriptText(SAY_WIN, m_creature, pPlayer); @@ -504,9 +504,9 @@ struct MANGOS_DLL_DECL npc_feero_ironhandAI : public npc_escortAI case 29: // Final ambush DoScriptText(SAY_FINAL_AMBUSH_START, m_creature); - m_creature->SummonCreature(NPC_BALIZAR_THE_UMBRAGE, aEliteSummonPositions[0][0], aEliteSummonPositions[0][1], aEliteSummonPositions[0][2], aEliteSummonPositions[0][3], TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 20000); - m_creature->SummonCreature(NPC_ALIGAR_THE_TORMENTOR, aEliteSummonPositions[1][0], aEliteSummonPositions[1][1], aEliteSummonPositions[1][2], aEliteSummonPositions[1][3], TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 20000); - m_creature->SummonCreature(NPC_CAEDAKAR_THE_VICIOUS, aEliteSummonPositions[2][0], aEliteSummonPositions[2][1], aEliteSummonPositions[2][2], aEliteSummonPositions[2][3], TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 20000); + m_creature->SummonCreature(NPC_BALIZAR_THE_UMBRAGE, aEliteSummonPositions[0][0], aEliteSummonPositions[0][1], aEliteSummonPositions[0][2], aEliteSummonPositions[0][3], TEMPSUMMON_TIMED_OOC_DESPAWN, 20000); + m_creature->SummonCreature(NPC_ALIGAR_THE_TORMENTOR, aEliteSummonPositions[1][0], aEliteSummonPositions[1][1], aEliteSummonPositions[1][2], aEliteSummonPositions[1][3], TEMPSUMMON_TIMED_OOC_DESPAWN, 20000); + m_creature->SummonCreature(NPC_CAEDAKAR_THE_VICIOUS, aEliteSummonPositions[2][0], aEliteSummonPositions[2][1], aEliteSummonPositions[2][2], aEliteSummonPositions[2][3], TEMPSUMMON_TIMED_OOC_DESPAWN, 20000); break; case 30: // Complete the quest @@ -535,7 +535,7 @@ struct MANGOS_DLL_DECL npc_feero_ironhandAI : public npc_escortAI float fX, fY, fZ; m_creature->GetNearPoint(m_creature, fX, fY, fZ, 0, fDistance, fAngle); - m_creature->SummonCreature(uiEntry, fX, fY, fZ, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 20000); + m_creature->SummonCreature(uiEntry, fX, fY, fZ, 0, TEMPSUMMON_TIMED_OOC_DESPAWN, 20000); } void SummonedCreatureJustDied(Creature* pSummoned) override diff --git a/scripts/kalimdor/bloodmyst_isle.cpp b/scripts/kalimdor/bloodmyst_isle.cpp index 3c9ec3dca..7af614a69 100644 --- a/scripts/kalimdor/bloodmyst_isle.cpp +++ b/scripts/kalimdor/bloodmyst_isle.cpp @@ -65,7 +65,7 @@ struct MANGOS_DLL_DECL mob_webbed_creatureAI : public Scripted_NoMovementAI } if (uiSpawnCreatureEntry) - m_creature->SummonCreature(uiSpawnCreatureEntry, 0.0f, 0.0f, 0.0f, m_creature->GetOrientation(), TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000); + m_creature->SummonCreature(uiSpawnCreatureEntry, 0.0f, 0.0f, 0.0f, m_creature->GetOrientation(), TEMPSUMMON_TIMED_OOC_DESPAWN, 25000); } }; diff --git a/scripts/kalimdor/caverns_of_time/hyjal/boss_archimonde.cpp b/scripts/kalimdor/caverns_of_time/hyjal/boss_archimonde.cpp index fb1018dd7..532f0a05d 100644 --- a/scripts/kalimdor/caverns_of_time/hyjal/boss_archimonde.cpp +++ b/scripts/kalimdor/caverns_of_time/hyjal/boss_archimonde.cpp @@ -260,7 +260,7 @@ struct MANGOS_DLL_DECL boss_archimondeAI : public ScriptedAI { float fX, fY, fZ; m_creature->GetNearPoint(m_creature, fX, fY, fZ, 0, 75.0f, urand(0, 1) ? frand(0, 2.8f) : frand(4.3f, M_PI_F * 2)); - m_creature->SummonCreature(NPC_ANCIENT_WISP, fX, fY, fZ, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000); + m_creature->SummonCreature(NPC_ANCIENT_WISP, fX, fY, fZ, 0, TEMPSUMMON_TIMED_OOC_DESPAWN, 15000); m_uiSummonWispTimer = urand(1000, 1500); } else diff --git a/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.cpp b/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.cpp index a689a257f..f27eae82f 100644 --- a/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.cpp +++ b/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.cpp @@ -249,7 +249,7 @@ void hyjalAI::SpawnCreatureForWave(uint32 uiMobEntry) } if (pSpawn) - m_creature->SummonCreature(uiMobEntry, pSpawn->m_fX, pSpawn->m_fY, pSpawn->m_fZ, 0.0f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 120000); + m_creature->SummonCreature(uiMobEntry, pSpawn->m_fX, pSpawn->m_fY, pSpawn->m_fZ, 0.0f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 120000); } void hyjalAI::JustSummoned(Creature* pSummoned) diff --git a/scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.cpp b/scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.cpp index 962b221c7..d2fe7be3d 100644 --- a/scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.cpp +++ b/scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.cpp @@ -730,28 +730,28 @@ struct MANGOS_DLL_DECL npc_thrall_old_hillsbradAI : public npc_escortAI, private break; // *** Escort event - Part I - outside the keep *** case 17: - m_creature->SummonCreature(NPC_MAGE, 2186.909f, 139.8108f, 88.21628f, 5.75f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); - m_creature->SummonCreature(NPC_WARDEN, 2187.943f, 141.6124f, 88.21628f, 5.73f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); - m_creature->SummonCreature(NPC_VETERAN, 2190.508f, 140.4597f, 88.21628f, 6.04f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); - m_creature->SummonCreature(NPC_VETERAN, 2189.543f, 139.0996f, 88.23965f, 0.21f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); + m_creature->SummonCreature(NPC_MAGE, 2186.909f, 139.8108f, 88.21628f, 5.75f, TEMPSUMMON_TIMED_OOC_DESPAWN, 5000); + m_creature->SummonCreature(NPC_WARDEN, 2187.943f, 141.6124f, 88.21628f, 5.73f, TEMPSUMMON_TIMED_OOC_DESPAWN, 5000); + m_creature->SummonCreature(NPC_VETERAN, 2190.508f, 140.4597f, 88.21628f, 6.04f, TEMPSUMMON_TIMED_OOC_DESPAWN, 5000); + m_creature->SummonCreature(NPC_VETERAN, 2189.543f, 139.0996f, 88.23965f, 0.21f, TEMPSUMMON_TIMED_OOC_DESPAWN, 5000); break; case 20: - m_creature->SummonCreature(NPC_MAGE, 2149.463f, 104.9756f, 73.63239f, 1.71f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); - m_creature->SummonCreature(NPC_SENTRY, 2147.642f, 105.0251f, 73.99422f, 1.52f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); - m_creature->SummonCreature(NPC_VETERAN, 2149.212f, 107.2005f, 74.15676f, 1.71f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); - m_creature->SummonCreature(NPC_WARDEN, 2147.328f, 106.7235f, 74.34447f, 1.69f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); + m_creature->SummonCreature(NPC_MAGE, 2149.463f, 104.9756f, 73.63239f, 1.71f, TEMPSUMMON_TIMED_OOC_DESPAWN, 5000); + m_creature->SummonCreature(NPC_SENTRY, 2147.642f, 105.0251f, 73.99422f, 1.52f, TEMPSUMMON_TIMED_OOC_DESPAWN, 5000); + m_creature->SummonCreature(NPC_VETERAN, 2149.212f, 107.2005f, 74.15676f, 1.71f, TEMPSUMMON_TIMED_OOC_DESPAWN, 5000); + m_creature->SummonCreature(NPC_WARDEN, 2147.328f, 106.7235f, 74.34447f, 1.69f, TEMPSUMMON_TIMED_OOC_DESPAWN, 5000); break; case 23: - m_creature->SummonCreature(NPC_MAGE, 2142.363f, 172.4260f, 66.30494f, 2.54f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); - m_creature->SummonCreature(NPC_SENTRY, 2138.177f, 168.6046f, 66.30494f, 2.47f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); - m_creature->SummonCreature(NPC_SENTRY, 2142.372f, 174.2907f, 66.30494f, 2.56f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); - m_creature->SummonCreature(NPC_VETERAN, 2140.146f, 169.2364f, 66.30494f, 2.49f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); + m_creature->SummonCreature(NPC_MAGE, 2142.363f, 172.4260f, 66.30494f, 2.54f, TEMPSUMMON_TIMED_OOC_DESPAWN, 5000); + m_creature->SummonCreature(NPC_SENTRY, 2138.177f, 168.6046f, 66.30494f, 2.47f, TEMPSUMMON_TIMED_OOC_DESPAWN, 5000); + m_creature->SummonCreature(NPC_SENTRY, 2142.372f, 174.2907f, 66.30494f, 2.56f, TEMPSUMMON_TIMED_OOC_DESPAWN, 5000); + m_creature->SummonCreature(NPC_VETERAN, 2140.146f, 169.2364f, 66.30494f, 2.49f, TEMPSUMMON_TIMED_OOC_DESPAWN, 5000); break; case 25: - m_creature->SummonCreature(NPC_MAGE, 2107.938f, 192.0753f, 66.30494f, 2.54f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); - m_creature->SummonCreature(NPC_MAGE, 2109.852f, 195.1403f, 66.30493f, 2.42f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); - m_creature->SummonCreature(NPC_VETERAN, 2108.486f, 189.9346f, 66.30494f, 2.68f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); - m_creature->SummonCreature(NPC_VETERAN, 2112.387f, 195.4947f, 66.30494f, 2.39f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); + m_creature->SummonCreature(NPC_MAGE, 2107.938f, 192.0753f, 66.30494f, 2.54f, TEMPSUMMON_TIMED_OOC_DESPAWN, 5000); + m_creature->SummonCreature(NPC_MAGE, 2109.852f, 195.1403f, 66.30493f, 2.42f, TEMPSUMMON_TIMED_OOC_DESPAWN, 5000); + m_creature->SummonCreature(NPC_VETERAN, 2108.486f, 189.9346f, 66.30494f, 2.68f, TEMPSUMMON_TIMED_OOC_DESPAWN, 5000); + m_creature->SummonCreature(NPC_VETERAN, 2112.387f, 195.4947f, 66.30494f, 2.39f, TEMPSUMMON_TIMED_OOC_DESPAWN, 5000); break; // *** Escort event - Part I - meet Skarloc *** case 31: @@ -847,20 +847,20 @@ struct MANGOS_DLL_DECL npc_thrall_old_hillsbradAI : public npc_escortAI, private m_creature->SetFacingTo(1.0f); break; case 93: - m_creature->SummonCreature(NPC_CHURCH_PROTECTOR, 2627.88f, 657.63f, 55.98f, 4.28f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 5000); - m_creature->SummonCreature(NPC_CHURCH_LOOKOUT, 2627.27f, 655.17f, 56.03f, 4.50f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 5000); - m_creature->SummonCreature(NPC_CHURCH_LOOKOUT, 2629.21f, 654.81f, 56.04f, 4.38f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 5000); - m_creature->SummonCreature(NPC_CHURCH_GUARDSMAN, 2629.98f, 656.96f, 55.96f, 4.34f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 5000); + m_creature->SummonCreature(NPC_CHURCH_PROTECTOR, 2627.88f, 657.63f, 55.98f, 4.28f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 5000); + m_creature->SummonCreature(NPC_CHURCH_LOOKOUT, 2627.27f, 655.17f, 56.03f, 4.50f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 5000); + m_creature->SummonCreature(NPC_CHURCH_LOOKOUT, 2629.21f, 654.81f, 56.04f, 4.38f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 5000); + m_creature->SummonCreature(NPC_CHURCH_GUARDSMAN, 2629.98f, 656.96f, 55.96f, 4.34f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 5000); break; case 94: DoScriptText(SAY_TH_CHURCH_END, m_creature); break; // *** Escort event - Part III - inside the inn *** case 105: - m_creature->SummonCreature(NPC_INN_PROTECTOR, 2652.71f, 660.31f, 61.93f, 1.67f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); - m_creature->SummonCreature(NPC_INN_LOOKOUT, 2648.96f, 662.59f, 61.93f, 0.79f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); - m_creature->SummonCreature(NPC_INN_LOOKOUT, 2657.36f, 662.34f, 61.93f, 2.68f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); - m_creature->SummonCreature(NPC_INN_GUARDSMAN, 2656.39f, 659.77f, 61.93f, 2.61f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); + m_creature->SummonCreature(NPC_INN_PROTECTOR, 2652.71f, 660.31f, 61.93f, 1.67f, TEMPSUMMON_TIMED_OOC_DESPAWN, 5000); + m_creature->SummonCreature(NPC_INN_LOOKOUT, 2648.96f, 662.59f, 61.93f, 0.79f, TEMPSUMMON_TIMED_OOC_DESPAWN, 5000); + m_creature->SummonCreature(NPC_INN_LOOKOUT, 2657.36f, 662.34f, 61.93f, 2.68f, TEMPSUMMON_TIMED_OOC_DESPAWN, 5000); + m_creature->SummonCreature(NPC_INN_GUARDSMAN, 2656.39f, 659.77f, 61.93f, 2.61f, TEMPSUMMON_TIMED_OOC_DESPAWN, 5000); SetRun(false); break; // *** Escort event - Part III - meet Taretha *** diff --git a/scripts/kalimdor/darkshore.cpp b/scripts/kalimdor/darkshore.cpp index 385ba30cf..e3f680210 100644 --- a/scripts/kalimdor/darkshore.cpp +++ b/scripts/kalimdor/darkshore.cpp @@ -225,8 +225,8 @@ struct MANGOS_DLL_DECL npc_prospector_remtravelAI : public npc_escortAI DoScriptText(SAY_REM_RAMP1_1, m_creature, pPlayer); break; case 6: - DoSpawnCreature(NPC_GRAVEL_SCOUT, -10.0f, 5.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); - DoSpawnCreature(NPC_GRAVEL_BONE, -10.0f, 7.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); + DoSpawnCreature(NPC_GRAVEL_SCOUT, -10.0f, 5.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_OOC_DESPAWN, 30000); + DoSpawnCreature(NPC_GRAVEL_BONE, -10.0f, 7.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_OOC_DESPAWN, 30000); break; case 9: DoScriptText(SAY_REM_RAMP1_2, m_creature, pPlayer); @@ -239,8 +239,8 @@ struct MANGOS_DLL_DECL npc_prospector_remtravelAI : public npc_escortAI DoScriptText(SAY_REM_TENT1_1, m_creature, pPlayer); break; case 16: - DoSpawnCreature(NPC_GRAVEL_SCOUT, -10.0f, 5.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); - DoSpawnCreature(NPC_GRAVEL_BONE, -10.0f, 7.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); + DoSpawnCreature(NPC_GRAVEL_SCOUT, -10.0f, 5.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_OOC_DESPAWN, 30000); + DoSpawnCreature(NPC_GRAVEL_BONE, -10.0f, 7.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_OOC_DESPAWN, 30000); break; case 17: DoScriptText(SAY_REM_TENT1_2, m_creature, pPlayer); @@ -255,9 +255,9 @@ struct MANGOS_DLL_DECL npc_prospector_remtravelAI : public npc_escortAI DoScriptText(SAY_REM_MOSS_PROGRESS, m_creature, pPlayer); break; case 29: - DoSpawnCreature(NPC_GRAVEL_SCOUT, -15.0f, 3.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); - DoSpawnCreature(NPC_GRAVEL_BONE, -15.0f, 5.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); - DoSpawnCreature(NPC_GRAVEL_GEO, -15.0f, 7.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); + DoSpawnCreature(NPC_GRAVEL_SCOUT, -15.0f, 3.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_OOC_DESPAWN, 30000); + DoSpawnCreature(NPC_GRAVEL_BONE, -15.0f, 5.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_OOC_DESPAWN, 30000); + DoSpawnCreature(NPC_GRAVEL_GEO, -15.0f, 7.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_OOC_DESPAWN, 30000); break; case 31: DoScriptText(SAY_REM_PROGRESS, m_creature, pPlayer); @@ -490,18 +490,18 @@ struct MANGOS_DLL_DECL npc_volcorAI : public npc_escortAI DoScriptText(SAY_START, m_creature); break; case 5: - m_creature->SummonCreature(NPC_BLACKWOOD_SHAMAN, aVolcorSpawnLocs[0].m_fX, aVolcorSpawnLocs[0].m_fY, aVolcorSpawnLocs[0].m_fZ, aVolcorSpawnLocs[0].m_fO, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 20000); - m_creature->SummonCreature(NPC_BLACKWOOD_URSA, aVolcorSpawnLocs[1].m_fX, aVolcorSpawnLocs[1].m_fY, aVolcorSpawnLocs[1].m_fZ, aVolcorSpawnLocs[1].m_fO, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 20000); + m_creature->SummonCreature(NPC_BLACKWOOD_SHAMAN, aVolcorSpawnLocs[0].m_fX, aVolcorSpawnLocs[0].m_fY, aVolcorSpawnLocs[0].m_fZ, aVolcorSpawnLocs[0].m_fO, TEMPSUMMON_TIMED_OOC_DESPAWN, 20000); + m_creature->SummonCreature(NPC_BLACKWOOD_URSA, aVolcorSpawnLocs[1].m_fX, aVolcorSpawnLocs[1].m_fY, aVolcorSpawnLocs[1].m_fZ, aVolcorSpawnLocs[1].m_fO, TEMPSUMMON_TIMED_OOC_DESPAWN, 20000); break; case 6: DoScriptText(SAY_FIRST_AMBUSH, m_creature); break; case 11: - m_creature->SummonCreature(NPC_BLACKWOOD_SHAMAN, aVolcorSpawnLocs[2].m_fX, aVolcorSpawnLocs[2].m_fY, aVolcorSpawnLocs[2].m_fZ, aVolcorSpawnLocs[2].m_fO, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 20000); - m_creature->SummonCreature(NPC_BLACKWOOD_URSA, aVolcorSpawnLocs[3].m_fX, aVolcorSpawnLocs[3].m_fY, aVolcorSpawnLocs[3].m_fZ, aVolcorSpawnLocs[3].m_fO, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 20000); + m_creature->SummonCreature(NPC_BLACKWOOD_SHAMAN, aVolcorSpawnLocs[2].m_fX, aVolcorSpawnLocs[2].m_fY, aVolcorSpawnLocs[2].m_fZ, aVolcorSpawnLocs[2].m_fO, TEMPSUMMON_TIMED_OOC_DESPAWN, 20000); + m_creature->SummonCreature(NPC_BLACKWOOD_URSA, aVolcorSpawnLocs[3].m_fX, aVolcorSpawnLocs[3].m_fY, aVolcorSpawnLocs[3].m_fZ, aVolcorSpawnLocs[3].m_fO, TEMPSUMMON_TIMED_OOC_DESPAWN, 20000); case 13: - m_creature->SummonCreature(NPC_BLACKWOOD_URSA, aVolcorSpawnLocs[4].m_fX, aVolcorSpawnLocs[4].m_fY, aVolcorSpawnLocs[4].m_fZ, aVolcorSpawnLocs[4].m_fO, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 20000); - m_creature->SummonCreature(NPC_BLACKWOOD_URSA, aVolcorSpawnLocs[5].m_fX, aVolcorSpawnLocs[5].m_fY, aVolcorSpawnLocs[5].m_fZ, aVolcorSpawnLocs[5].m_fO, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 20000); + m_creature->SummonCreature(NPC_BLACKWOOD_URSA, aVolcorSpawnLocs[4].m_fX, aVolcorSpawnLocs[4].m_fY, aVolcorSpawnLocs[4].m_fZ, aVolcorSpawnLocs[4].m_fO, TEMPSUMMON_TIMED_OOC_DESPAWN, 20000); + m_creature->SummonCreature(NPC_BLACKWOOD_URSA, aVolcorSpawnLocs[5].m_fX, aVolcorSpawnLocs[5].m_fY, aVolcorSpawnLocs[5].m_fZ, aVolcorSpawnLocs[5].m_fO, TEMPSUMMON_TIMED_OOC_DESPAWN, 20000); break; case 15: DoScriptText(SAY_END, m_creature); diff --git a/scripts/kalimdor/dustwallow_marsh.cpp b/scripts/kalimdor/dustwallow_marsh.cpp index 8225d12ab..94c7d5a65 100644 --- a/scripts/kalimdor/dustwallow_marsh.cpp +++ b/scripts/kalimdor/dustwallow_marsh.cpp @@ -489,10 +489,10 @@ struct MANGOS_DLL_DECL npc_ogronAI : public npc_escortAI if (Creature* pReethe = GetCreature(NPC_REETHE)) DoScriptText(SAY_OGR_RET_HEAR, pReethe); - m_creature->SummonCreature(NPC_CALDWELL, m_afSpawn[0], m_afSpawn[1], m_afSpawn[2], 0.0f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 300000); - m_creature->SummonCreature(NPC_HALLAN, m_afSpawn[0], m_afSpawn[1], m_afSpawn[2], 0.0f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 300000); - m_creature->SummonCreature(NPC_SKIRMISHER, m_afSpawn[0], m_afSpawn[1], m_afSpawn[2], 0.0f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 300000); - m_creature->SummonCreature(NPC_SKIRMISHER, m_afSpawn[0], m_afSpawn[1], m_afSpawn[2], 0.0f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 300000); + m_creature->SummonCreature(NPC_CALDWELL, m_afSpawn[0], m_afSpawn[1], m_afSpawn[2], 0.0f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 300000); + m_creature->SummonCreature(NPC_HALLAN, m_afSpawn[0], m_afSpawn[1], m_afSpawn[2], 0.0f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 300000); + m_creature->SummonCreature(NPC_SKIRMISHER, m_afSpawn[0], m_afSpawn[1], m_afSpawn[2], 0.0f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 300000); + m_creature->SummonCreature(NPC_SKIRMISHER, m_afSpawn[0], m_afSpawn[1], m_afSpawn[2], 0.0f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 300000); m_uiPhase = PHASE_GUESTS; break; @@ -681,7 +681,7 @@ bool AreaTrigger_at_nats_landing(Player* pPlayer, const AreaTriggerEntry* pAt) Creature* pShark = GetClosestCreatureWithEntry(pPlayer, NPC_LURKING_SHARK, 20.0f); if (!pShark) - pShark = pPlayer->SummonCreature(NPC_LURKING_SHARK, -4246.243f, -3922.356f, -7.488f, 5.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 100000); + pShark = pPlayer->SummonCreature(NPC_LURKING_SHARK, -4246.243f, -3922.356f, -7.488f, 5.0f, TEMPSUMMON_TIMED_OOC_DESPAWN, 100000); pShark->AI()->AttackStart(pPlayer); return false; diff --git a/scripts/kalimdor/moonglade.cpp b/scripts/kalimdor/moonglade.cpp index 6467b223a..cbe506793 100644 --- a/scripts/kalimdor/moonglade.cpp +++ b/scripts/kalimdor/moonglade.cpp @@ -82,7 +82,7 @@ struct MANGOS_DLL_DECL npc_clintar_dw_spiritAI : public npc_escortAI DoScriptText(SAY_RELIC2, m_creature, pPlayer); break; case 31: - m_creature->SummonCreature(NPC_ASPECT_OF_RAVEN, 7465.321f, -3088.515f, 429.006f, 5.550f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 10000); + m_creature->SummonCreature(NPC_ASPECT_OF_RAVEN, 7465.321f, -3088.515f, 429.006f, 5.550f, TEMPSUMMON_TIMED_OOC_DESPAWN, 10000); break; case 35: m_creature->HandleEmote(EMOTE_STATE_USESTANDING_NOSHEATHE); diff --git a/scripts/kalimdor/onyxias_lair/boss_onyxia.cpp b/scripts/kalimdor/onyxias_lair/boss_onyxia.cpp index 107491523..73c86ea16 100644 --- a/scripts/kalimdor/onyxias_lair/boss_onyxia.cpp +++ b/scripts/kalimdor/onyxias_lair/boss_onyxia.cpp @@ -404,8 +404,8 @@ struct MANGOS_DLL_DECL boss_onyxiaAI : public ScriptedAI { if (m_uiWhelpTimer < uiDiff) { - m_creature->SummonCreature(NPC_ONYXIA_WHELP, afSpawnLocations[0][0], afSpawnLocations[0][1], afSpawnLocations[0][2], 0.0f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, MINUTE * IN_MILLISECONDS); - m_creature->SummonCreature(NPC_ONYXIA_WHELP, afSpawnLocations[1][0], afSpawnLocations[1][1], afSpawnLocations[1][2], 0.0f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, MINUTE * IN_MILLISECONDS); + m_creature->SummonCreature(NPC_ONYXIA_WHELP, afSpawnLocations[0][0], afSpawnLocations[0][1], afSpawnLocations[0][2], 0.0f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, MINUTE * IN_MILLISECONDS); + m_creature->SummonCreature(NPC_ONYXIA_WHELP, afSpawnLocations[1][0], afSpawnLocations[1][1], afSpawnLocations[1][2], 0.0f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, MINUTE * IN_MILLISECONDS); m_uiWhelpTimer = 500; } else diff --git a/scripts/kalimdor/razorfen_downs/razorfen_downs.cpp b/scripts/kalimdor/razorfen_downs/razorfen_downs.cpp index 554634850..40e2aa83d 100644 --- a/scripts/kalimdor/razorfen_downs/razorfen_downs.cpp +++ b/scripts/kalimdor/razorfen_downs/razorfen_downs.cpp @@ -115,7 +115,7 @@ struct MANGOS_DLL_DECL npc_belnistraszAI : public npc_escortAI { if (m_uiRitualPhase > 7) { - pSummoner->SummonCreature(NPC_PLAGUEMAW_THE_ROTTING, pSummoner->GetPositionX(), pSummoner->GetPositionY(), pSummoner->GetPositionZ(), pSummoner->GetOrientation(), TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 60000); + pSummoner->SummonCreature(NPC_PLAGUEMAW_THE_ROTTING, pSummoner->GetPositionX(), pSummoner->GetPositionY(), pSummoner->GetPositionZ(), pSummoner->GetOrientation(), TEMPSUMMON_TIMED_OOC_DESPAWN, 60000); return; } @@ -142,7 +142,7 @@ struct MANGOS_DLL_DECL npc_belnistraszAI : public npc_escortAI break; } - pSummoner->SummonCreature(uiEntry, fX, fZ, fY, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 60000); + pSummoner->SummonCreature(uiEntry, fX, fZ, fY, 0.0f, TEMPSUMMON_TIMED_OOC_DESPAWN, 60000); } } diff --git a/scripts/kalimdor/razorfen_kraul/razorfen_kraul.cpp b/scripts/kalimdor/razorfen_kraul/razorfen_kraul.cpp index cdc36651a..6156fca89 100644 --- a/scripts/kalimdor/razorfen_kraul/razorfen_kraul.cpp +++ b/scripts/kalimdor/razorfen_kraul/razorfen_kraul.cpp @@ -97,8 +97,8 @@ struct MANGOS_DLL_DECL npc_willix_the_importerAI : public npc_escortAI case 14: DoScriptText(SAY_WILLIX_4, m_creature); // Summon 2 boars on the pathway - m_creature->SummonCreature(NPC_RAGING_AGAMAR, aBoarSpawn[0][0], aBoarSpawn[0][1], aBoarSpawn[0][2], 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000); - m_creature->SummonCreature(NPC_RAGING_AGAMAR, aBoarSpawn[1][0], aBoarSpawn[1][1], aBoarSpawn[1][2], 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000); + m_creature->SummonCreature(NPC_RAGING_AGAMAR, aBoarSpawn[0][0], aBoarSpawn[0][1], aBoarSpawn[0][2], 0, TEMPSUMMON_TIMED_OOC_DESPAWN, 25000); + m_creature->SummonCreature(NPC_RAGING_AGAMAR, aBoarSpawn[1][0], aBoarSpawn[1][1], aBoarSpawn[1][2], 0, TEMPSUMMON_TIMED_OOC_DESPAWN, 25000); break; case 25: DoScriptText(SAY_WILLIX_5, m_creature); @@ -109,8 +109,8 @@ struct MANGOS_DLL_DECL npc_willix_the_importerAI : public npc_escortAI case 44: DoScriptText(SAY_WILLIX_7, m_creature); // Summon 2 boars at the end - m_creature->SummonCreature(NPC_RAGING_AGAMAR, aBoarSpawn[2][0], aBoarSpawn[2][1], aBoarSpawn[2][2], 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000); - m_creature->SummonCreature(NPC_RAGING_AGAMAR, aBoarSpawn[3][0], aBoarSpawn[3][1], aBoarSpawn[3][2], 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000); + m_creature->SummonCreature(NPC_RAGING_AGAMAR, aBoarSpawn[2][0], aBoarSpawn[2][1], aBoarSpawn[2][2], 0, TEMPSUMMON_TIMED_OOC_DESPAWN, 25000); + m_creature->SummonCreature(NPC_RAGING_AGAMAR, aBoarSpawn[3][0], aBoarSpawn[3][1], aBoarSpawn[3][2], 0, TEMPSUMMON_TIMED_OOC_DESPAWN, 25000); break; case 45: DoScriptText(SAY_WILLIX_END, m_creature); diff --git a/scripts/kalimdor/ruins_of_ahnqiraj/boss_ayamiss.cpp b/scripts/kalimdor/ruins_of_ahnqiraj/boss_ayamiss.cpp index bf6fe8268..fa4fc119c 100644 --- a/scripts/kalimdor/ruins_of_ahnqiraj/boss_ayamiss.cpp +++ b/scripts/kalimdor/ruins_of_ahnqiraj/boss_ayamiss.cpp @@ -165,7 +165,7 @@ struct MANGOS_DLL_DECL boss_ayamissAI : public ScriptedAI // Summon a larva uint8 uiLoc = urand(0, 1); - m_creature->SummonCreature(NPC_LARVA, aAyamissSpawnLocs[uiLoc].m_fX, aAyamissSpawnLocs[uiLoc].m_fY, aAyamissSpawnLocs[uiLoc].m_fZ, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 30000); + m_creature->SummonCreature(NPC_LARVA, aAyamissSpawnLocs[uiLoc].m_fX, aAyamissSpawnLocs[uiLoc].m_fY, aAyamissSpawnLocs[uiLoc].m_fZ, 0, TEMPSUMMON_TIMED_OOC_OR_CORPSE_DESPAWN, 30000); } } else diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_bug_trio.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_bug_trio.cpp index 0528b11e8..56b8ea393 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/boss_bug_trio.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_bug_trio.cpp @@ -215,7 +215,7 @@ struct MANGOS_DLL_DECL boss_yaujAI : public ScriptedAI for (int i = 0; i < 10; ++i) { m_creature->GetRandomPoint(m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), 10.0f, fX, fY, fZ); - m_creature->SummonCreature(NPC_YAUJ_BROOD, fX, fY, fZ, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); + m_creature->SummonCreature(NPC_YAUJ_BROOD, fX, fY, fZ, 0.0f, TEMPSUMMON_TIMED_OOC_DESPAWN, 30000); } if (!m_pInstance) diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_fankriss.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_fankriss.cpp index a7edf761a..70c9427ca 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/boss_fankriss.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_fankriss.cpp @@ -154,7 +154,7 @@ struct MANGOS_DLL_DECL boss_fankrissAI : public ScriptedAI for (uint8 i = 0; i < 4; ++i) { m_creature->GetRandomPoint(pTarget->GetPositionX(), pTarget->GetPositionY(), pTarget->GetPositionZ(), 3.0f, fX, fY, fZ); - m_creature->SummonCreature(NPC_VEKNISS_HATCHLING, fX, fY, fZ, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 10000); + m_creature->SummonCreature(NPC_VEKNISS_HATCHLING, fX, fY, fZ, 0.0f, TEMPSUMMON_TIMED_OOC_DESPAWN, 10000); } m_uiEntangleSummonTimer = 0; } diff --git a/scripts/kalimdor/the_barrens.cpp b/scripts/kalimdor/the_barrens.cpp index a43fdbedf..db5c659df 100644 --- a/scripts/kalimdor/the_barrens.cpp +++ b/scripts/kalimdor/the_barrens.cpp @@ -333,7 +333,7 @@ struct MANGOS_DLL_DECL npc_twiggy_flatheadAI : public ScriptedAI m_vAffrayChallengerGuidsVector.reserve(MAX_CHALLENGERS); for (uint8 i = 0; i < MAX_CHALLENGERS; ++i) - m_creature->SummonCreature(NPC_AFFRAY_CHALLENGER, aAffrayChallengerLoc[i][0], aAffrayChallengerLoc[i][1], aAffrayChallengerLoc[i][2], aAffrayChallengerLoc[i][3], TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 600000); + m_creature->SummonCreature(NPC_AFFRAY_CHALLENGER, aAffrayChallengerLoc[i][0], aAffrayChallengerLoc[i][1], aAffrayChallengerLoc[i][2], aAffrayChallengerLoc[i][3], TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 600000); } void SetChallengerReady(Creature* pChallenger) @@ -426,7 +426,7 @@ struct MANGOS_DLL_DECL npc_twiggy_flatheadAI : public ScriptedAI m_uiEventTimer = 25000; break; case 2: - m_creature->SummonCreature(NPC_BIG_WILL, aAffrayChallengerLoc[6][0], aAffrayChallengerLoc[6][1], aAffrayChallengerLoc[6][2], aAffrayChallengerLoc[6][3], TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 300000); + m_creature->SummonCreature(NPC_BIG_WILL, aAffrayChallengerLoc[6][0], aAffrayChallengerLoc[6][1], aAffrayChallengerLoc[6][2], aAffrayChallengerLoc[6][3], TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 300000); m_uiEventTimer = 15000; ++m_uiStep; break; @@ -524,10 +524,10 @@ struct MANGOS_DLL_DECL npc_wizzlecranks_shredderAI : public npc_escortAI SetRun(false); break; case 17: - if (Creature* pTemp = m_creature->SummonCreature(NPC_MERCENARY, 1128.489f, -3037.611f, 92.701f, 1.472f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000)) + if (Creature* pTemp = m_creature->SummonCreature(NPC_MERCENARY, 1128.489f, -3037.611f, 92.701f, 1.472f, TEMPSUMMON_TIMED_OOC_DESPAWN, 120000)) { DoScriptText(SAY_MERCENARY, pTemp); - m_creature->SummonCreature(NPC_MERCENARY, 1160.172f, -2980.168f, 97.313f, 3.690f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000); + m_creature->SummonCreature(NPC_MERCENARY, 1160.172f, -2980.168f, 97.313f, 3.690f, TEMPSUMMON_TIMED_OOC_DESPAWN, 120000); } break; case 24: diff --git a/scripts/kalimdor/thousand_needles.cpp b/scripts/kalimdor/thousand_needles.cpp index 428720e38..556efaf73 100644 --- a/scripts/kalimdor/thousand_needles.cpp +++ b/scripts/kalimdor/thousand_needles.cpp @@ -72,7 +72,7 @@ struct MANGOS_DLL_DECL npc_kanatiAI : public npc_escortAI for (int i = 0; i < 3; ++i) m_creature->SummonCreature(NPC_GALAK_ASS, m_afGalakLoc[0], m_afGalakLoc[1], m_afGalakLoc[2], 0.0f, - TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000); + TEMPSUMMON_TIMED_OOC_DESPAWN, 25000); } void JustSummoned(Creature* pSummoned) override @@ -160,7 +160,7 @@ struct MANGOS_DLL_DECL npc_lakota_windsongAI : public npc_escortAI for (int i = 0; i < 2; ++i) m_creature->SummonCreature(NPC_GRIM_BANDIT, m_afBanditLoc[i + uiAmbushId][0], m_afBanditLoc[i + uiAmbushId][1], m_afBanditLoc[i + uiAmbushId][2], 0.0f, - TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 60000); + TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 60000); } }; @@ -232,7 +232,7 @@ struct MANGOS_DLL_DECL npc_paoka_swiftmountainAI : public npc_escortAI for (int i = 0; i < 3; ++i) m_creature->SummonCreature(NPC_WYVERN, m_afWyvernLoc[i][0], m_afWyvernLoc[i][1], m_afWyvernLoc[i][2], 0.0f, - TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 60000); + TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 60000); } }; diff --git a/scripts/kalimdor/wailing_caverns/wailing_caverns.cpp b/scripts/kalimdor/wailing_caverns/wailing_caverns.cpp index 4ce7909af..58300e95f 100644 --- a/scripts/kalimdor/wailing_caverns/wailing_caverns.cpp +++ b/scripts/kalimdor/wailing_caverns/wailing_caverns.cpp @@ -225,7 +225,7 @@ struct MANGOS_DLL_DECL npc_disciple_of_naralexAI : public npc_escortAI float fX, fY, fZ; m_creature->GetNearPoint(m_creature, fX, fY, fZ, 0, fDistance, fAngle); - m_creature->SummonCreature(uiEntry, fX, fY, fZ, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 20000); + m_creature->SummonCreature(uiEntry, fX, fY, fZ, 0, TEMPSUMMON_TIMED_OOC_DESPAWN, 20000); } void UpdateEscortAI(const uint32 uiDiff) override diff --git a/scripts/northrend/borean_tundra.cpp b/scripts/northrend/borean_tundra.cpp index a7aa21dc0..9529bead9 100644 --- a/scripts/northrend/borean_tundra.cpp +++ b/scripts/northrend/borean_tundra.cpp @@ -262,7 +262,7 @@ bool GOUse_go_caribou_trap(Player* pPlayer, GameObject* pGo) float fX, fY, fZ; pGo->GetClosePoint(fX, fY, fZ, pGo->GetObjectBoundingRadius(), 2 * INTERACTION_DISTANCE, frand(0, M_PI_F * 2)); - if (Creature* pCreature = pGo->SummonCreature(NPC_NESINGWARY_TRAPPER, fX, fY, fZ, pGo->GetOrientation(), TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 10000)) + if (Creature* pCreature = pGo->SummonCreature(NPC_NESINGWARY_TRAPPER, fX, fY, fZ, pGo->GetOrientation(), TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 10000)) { if (npc_nesingwary_trapperAI* pTrapperAI = dynamic_cast(pCreature->AI())) pTrapperAI->StartAction(pPlayer, pGo); diff --git a/scripts/northrend/howling_fjord.cpp b/scripts/northrend/howling_fjord.cpp index 486707e63..b1f762cdf 100644 --- a/scripts/northrend/howling_fjord.cpp +++ b/scripts/northrend/howling_fjord.cpp @@ -201,7 +201,7 @@ struct MANGOS_DLL_DECL npc_daegarnAI : public ScriptedAI void SummonGladiator(uint32 uiEntry) { - m_creature->SummonCreature(uiEntry, afSummon[0], afSummon[1], afSummon[2], 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 20 * IN_MILLISECONDS); + m_creature->SummonCreature(uiEntry, afSummon[0], afSummon[1], afSummon[2], 0.0f, TEMPSUMMON_TIMED_OOC_DESPAWN, 20 * IN_MILLISECONDS); } void SummonedMovementInform(Creature* pSummoned, uint32 uiMotionType, uint32 uiPointId) override diff --git a/scripts/northrend/naxxramas/boss_anubrekhan.cpp b/scripts/northrend/naxxramas/boss_anubrekhan.cpp index 38615e43d..6097939fb 100644 --- a/scripts/northrend/naxxramas/boss_anubrekhan.cpp +++ b/scripts/northrend/naxxramas/boss_anubrekhan.cpp @@ -208,7 +208,7 @@ struct MANGOS_DLL_DECL boss_anubrekhanAI : public ScriptedAI if (m_uiSummonTimer <= uiDiff) { // Workaround for the not existing spell - m_creature->SummonCreature(NPC_CRYPT_GUARD, aCryptGuardLoc[0], aCryptGuardLoc[1], aCryptGuardLoc[2], aCryptGuardLoc[3], TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 30000); + m_creature->SummonCreature(NPC_CRYPT_GUARD, aCryptGuardLoc[0], aCryptGuardLoc[1], aCryptGuardLoc[2], aCryptGuardLoc[3], TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 30000); m_uiSummonTimer = 0; } else diff --git a/scripts/northrend/naxxramas/boss_grobbulus.cpp b/scripts/northrend/naxxramas/boss_grobbulus.cpp index 1732c85ed..7e2e7a100 100644 --- a/scripts/northrend/naxxramas/boss_grobbulus.cpp +++ b/scripts/northrend/naxxramas/boss_grobbulus.cpp @@ -127,7 +127,7 @@ struct MANGOS_DLL_DECL boss_grobbulusAI : public ScriptedAI void SpellHitTarget(Unit* pTarget, const SpellEntry* pSpell) override { if ((pSpell->Id == SPELL_SLIME_SPRAY || pSpell->Id == SPELL_SLIME_SPRAY_H) && pTarget->GetTypeId() == TYPEID_PLAYER) - m_creature->SummonCreature(NPC_FALLOUT_SLIME, pTarget->GetPositionX(), pTarget->GetPositionY(), pTarget->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 10 * IN_MILLISECONDS); + m_creature->SummonCreature(NPC_FALLOUT_SLIME, pTarget->GetPositionX(), pTarget->GetPositionY(), pTarget->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_OOC_DESPAWN, 10 * IN_MILLISECONDS); } void UpdateAI(const uint32 uiDiff) override diff --git a/scripts/northrend/naxxramas/boss_maexxna.cpp b/scripts/northrend/naxxramas/boss_maexxna.cpp index 718e4ff1b..eecbeb546 100644 --- a/scripts/northrend/naxxramas/boss_maexxna.cpp +++ b/scripts/northrend/naxxramas/boss_maexxna.cpp @@ -211,13 +211,13 @@ struct MANGOS_DLL_DECL boss_maexxnaAI : public ScriptedAI return false; uint8 uiPos1 = urand(0, MAX_WEB_WRAP_POSITIONS - 1); - m_creature->SummonCreature(NPC_WEB_WRAP, aWebWrapLoc[uiPos1][0], aWebWrapLoc[uiPos1][1], aWebWrapLoc[uiPos1][2], 0, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 60000); + m_creature->SummonCreature(NPC_WEB_WRAP, aWebWrapLoc[uiPos1][0], aWebWrapLoc[uiPos1][1], aWebWrapLoc[uiPos1][2], 0, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 60000); // Summon a second web wrap on heroic if (!m_bIsRegularMode) { uint8 uiPos2 = (uiPos1 + urand(1, MAX_WEB_WRAP_POSITIONS - 1)) % MAX_WEB_WRAP_POSITIONS; - m_creature->SummonCreature(NPC_WEB_WRAP, aWebWrapLoc[uiPos2][0], aWebWrapLoc[uiPos2][1], aWebWrapLoc[uiPos2][2], 0, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 60000); + m_creature->SummonCreature(NPC_WEB_WRAP, aWebWrapLoc[uiPos2][0], aWebWrapLoc[uiPos2][1], aWebWrapLoc[uiPos2][2], 0, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 60000); } return true; @@ -227,7 +227,7 @@ struct MANGOS_DLL_DECL boss_maexxnaAI : public ScriptedAI void SummonSpiderlings() { for (uint8 i = 0; i < MAX_SPIDERLINGS; ++i) - m_creature->SummonCreature(NPC_SPIDERLING, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 60000); + m_creature->SummonCreature(NPC_SPIDERLING, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 60000); } void UpdateAI(const uint32 uiDiff) override diff --git a/scripts/northrend/nexus/oculus/boss_urom.cpp b/scripts/northrend/nexus/oculus/boss_urom.cpp index b76d868af..884110ca9 100644 --- a/scripts/northrend/nexus/oculus/boss_urom.cpp +++ b/scripts/northrend/nexus/oculus/boss_urom.cpp @@ -232,13 +232,13 @@ struct MANGOS_DLL_DECL boss_uromAI : public ScriptedAI for (uint8 i = 0; i < MAX_PLATFORMS; ++i) { m_creature->GetNearPoint(m_creature, fX, fY, fZ, 0, 10.0f, M_PI_F / 2 * i); - m_creature->SummonCreature(uiTrashPacks[m_vuiTrashPacksIds[m_uiPlatformPhase]][i], fX, fY, fZ, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); + m_creature->SummonCreature(uiTrashPacks[m_vuiTrashPacksIds[m_uiPlatformPhase]][i], fX, fY, fZ, 0.0f, TEMPSUMMON_TIMED_OOC_DESPAWN, 30000); } // Summon a fourth mob, which can be random uint32 uiEntry = uiTrashPacks[m_vuiTrashPacksIds[m_uiPlatformPhase]][urand(0, 2)]; m_creature->GetNearPoint(m_creature, fX, fY, fZ, 0, 10.0f, M_PI_F / 2 * 3); - m_creature->SummonCreature(uiEntry, fX, fY, fZ, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); + m_creature->SummonCreature(uiEntry, fX, fY, fZ, 0.0f, TEMPSUMMON_TIMED_OOC_DESPAWN, 30000); } void SpellHit(Unit* pCaster, const SpellEntry* pSpell) override diff --git a/scripts/northrend/violet_hold/instance_violet_hold.cpp b/scripts/northrend/violet_hold/instance_violet_hold.cpp index 087df2bc1..fc540904c 100644 --- a/scripts/northrend/violet_hold/instance_violet_hold.cpp +++ b/scripts/northrend/violet_hold/instance_violet_hold.cpp @@ -78,7 +78,7 @@ void instance_violet_hold::ResetAll() pGhostBoss->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PASSIVE); } else if (Creature* pSummoner = GetSingleCreatureFromStorage(NPC_SINCLARI_ALT)) - pSummoner->SummonCreature(pData->uiGhostEntry, (*itr)->fX, (*itr)->fY, (*itr)->fZ, (*itr)->fO, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 600 * IN_MILLISECONDS); + pSummoner->SummonCreature(pData->uiGhostEntry, (*itr)->fX, (*itr)->fY, (*itr)->fZ, (*itr)->fO, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 600 * IN_MILLISECONDS); // Respawn Erekem guards if (pData->uiType == TYPE_EREKEM) @@ -413,7 +413,7 @@ void instance_violet_hold::SpawnPortal() { uint32 uiPortalEntry = pData->pPortalType == PORTAL_TYPE_NORM ? NPC_PORTAL : NPC_PORTAL_ELITE; - pController->SummonCreature(uiPortalEntry, pData->fX, pData->fY, pData->fZ, pData->fOrient, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 1800 * IN_MILLISECONDS); + pController->SummonCreature(uiPortalEntry, pData->fX, pData->fY, pData->fZ, pData->fOrient, TEMPSUMMON_TIMED_OOC_OR_CORPSE_DESPAWN, 1800 * IN_MILLISECONDS); } } } diff --git a/scripts/northrend/violet_hold/violet_hold.cpp b/scripts/northrend/violet_hold/violet_hold.cpp index a42023dc0..b0427673a 100644 --- a/scripts/northrend/violet_hold/violet_hold.cpp +++ b/scripts/northrend/violet_hold/violet_hold.cpp @@ -459,9 +459,9 @@ struct MANGOS_DLL_DECL npc_teleportation_portalAI : public ScriptedAI { // Summon a guardian keeper or Cyanigosa if (m_uiMyPortalNumber == 18) - m_creature->SummonCreature(NPC_CYANIGOSA, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 600 * IN_MILLISECONDS); + m_creature->SummonCreature(NPC_CYANIGOSA, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 600 * IN_MILLISECONDS); else - m_creature->SummonCreature(m_pInstance->GetRandomPortalEliteEntry(), 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 600 * IN_MILLISECONDS); + m_creature->SummonCreature(m_pInstance->GetRandomPortalEliteEntry(), 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 600 * IN_MILLISECONDS); } else if (m_creature->GetEntry() == NPC_PORTAL_ELITE) { @@ -480,7 +480,7 @@ struct MANGOS_DLL_DECL npc_teleportation_portalAI : public ScriptedAI // Summon the trash pack around the portal m_creature->GetNearPoint(m_creature, fX, fY, fZ, 0, 3.0f, M_PI_F / 2 * i); - pController->SummonCreature(uiSummonId, fX, fY, fZ, m_creature->GetOrientation(), TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 600 * IN_MILLISECONDS); + pController->SummonCreature(uiSummonId, fX, fY, fZ, m_creature->GetOrientation(), TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 600 * IN_MILLISECONDS); } // If this is a trash portal, set the current number in the @@ -488,7 +488,7 @@ struct MANGOS_DLL_DECL npc_teleportation_portalAI : public ScriptedAI pControllerAI->DoSetCurrentTrashPortal(m_uiMyPortalNumber); } else - pController->SummonCreature(NPC_AZURE_SABOTEUR, m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), m_creature->GetOrientation(), TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 600 * IN_MILLISECONDS); + pController->SummonCreature(NPC_AZURE_SABOTEUR, m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), m_creature->GetOrientation(), TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 600 * IN_MILLISECONDS); m_creature->ForcedDespawn(5000); } diff --git a/scripts/northrend/zuldrak.cpp b/scripts/northrend/zuldrak.cpp index 8adc5dabc..07066de10 100644 --- a/scripts/northrend/zuldrak.cpp +++ b/scripts/northrend/zuldrak.cpp @@ -81,7 +81,7 @@ bool QuestAccept_npc_gurgthock(Player* pPlayer, Creature* pCreature, const Quest { if (pQuest->GetQuestId() == QUEST_FROM_BEYOND) { - pCreature->SummonCreature(m_auiBosses[urand(0, 3)], m_afSpawnLocation[0], m_afSpawnLocation[1], m_afSpawnLocation[2], 0.0f, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 600000); + pCreature->SummonCreature(m_auiBosses[urand(0, 3)], m_afSpawnLocation[0], m_afSpawnLocation[1], m_afSpawnLocation[2], 0.0f, TEMPSUMMON_TIMED_OOC_OR_CORPSE_DESPAWN, 600000); if (npc_gurgthockAI* pGurthockAI = dynamic_cast(pCreature->AI())) pGurthockAI->SetPlayer(pPlayer); diff --git a/scripts/outland/auchindoun/auchenai_crypts/boss_exarch_maladaar.cpp b/scripts/outland/auchindoun/auchenai_crypts/boss_exarch_maladaar.cpp index cf24e171f..b1466f472 100644 --- a/scripts/outland/auchindoun/auchenai_crypts/boss_exarch_maladaar.cpp +++ b/scripts/outland/auchindoun/auchenai_crypts/boss_exarch_maladaar.cpp @@ -243,7 +243,7 @@ struct MANGOS_DLL_DECL boss_exarch_maladaarAI : public ScriptedAI void SpellHitTarget(Unit* pTarget, const SpellEntry* pSpell) override { if (pSpell->Id == SPELL_STOLEN_SOUL && pTarget->GetTypeId() == TYPEID_PLAYER) - DoSpawnCreature(NPC_STOLEN_SOUL, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 10000); + DoSpawnCreature(NPC_STOLEN_SOUL, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_OOC_DESPAWN, 10000); } void UpdateAI(const uint32 uiDiff) override diff --git a/scripts/outland/auchindoun/sethekk_halls/boss_anzu.cpp b/scripts/outland/auchindoun/sethekk_halls/boss_anzu.cpp index 9b2b76ad5..593424a8b 100644 --- a/scripts/outland/auchindoun/sethekk_halls/boss_anzu.cpp +++ b/scripts/outland/auchindoun/sethekk_halls/boss_anzu.cpp @@ -129,7 +129,7 @@ struct MANGOS_DLL_DECL boss_anzuAI : public ScriptedAI for (uint8 i = 0; i < MAX_BROODS; ++i) { m_creature->GetRandomPoint(pClaw->GetPositionX(), pClaw->GetPositionY(), pClaw->GetPositionZ(), 7.0f, fX, fY, fZ); - m_creature->SummonCreature(NPC_BROOD_OF_ANZU, fX, fY, fZ, 0, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 30000); + m_creature->SummonCreature(NPC_BROOD_OF_ANZU, fX, fY, fZ, 0, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 30000); } } } diff --git a/scripts/outland/coilfang_reservoir/steam_vault/boss_mekgineer_steamrigger.cpp b/scripts/outland/coilfang_reservoir/steam_vault/boss_mekgineer_steamrigger.cpp index 012166f9d..e72d0958c 100644 --- a/scripts/outland/coilfang_reservoir/steam_vault/boss_mekgineer_steamrigger.cpp +++ b/scripts/outland/coilfang_reservoir/steam_vault/boss_mekgineer_steamrigger.cpp @@ -143,7 +143,7 @@ struct MANGOS_DLL_DECL boss_mekgineer_steamriggerAI : public ScriptedAI DoScriptText(SAY_MECHANICS, m_creature); for (uint8 i = 0; i < 3; ++i) - m_creature->SummonCreature(NPC_STEAMRIGGER_MECHANIC, aSteamriggerSpawnLocs[i].m_fX, aSteamriggerSpawnLocs[i].m_fY, aSteamriggerSpawnLocs[i].m_fZ, 0, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 240000); + m_creature->SummonCreature(NPC_STEAMRIGGER_MECHANIC, aSteamriggerSpawnLocs[i].m_fX, aSteamriggerSpawnLocs[i].m_fY, aSteamriggerSpawnLocs[i].m_fZ, 0, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 240000); } void UpdateAI(const uint32 uiDiff) override @@ -190,7 +190,7 @@ struct MANGOS_DLL_DECL boss_mekgineer_steamriggerAI : public ScriptedAI { if (m_uiMechanicTimer < uiDiff) { - m_creature->SummonCreature(NPC_STEAMRIGGER_MECHANIC, aSteamriggerSpawnLocs[2].m_fX, aSteamriggerSpawnLocs[2].m_fY, aSteamriggerSpawnLocs[2].m_fZ, 0, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 240000); + m_creature->SummonCreature(NPC_STEAMRIGGER_MECHANIC, aSteamriggerSpawnLocs[2].m_fX, aSteamriggerSpawnLocs[2].m_fY, aSteamriggerSpawnLocs[2].m_fZ, 0, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 240000); m_uiMechanicTimer = 20000; } else diff --git a/scripts/outland/hellfire_citadel/shattered_halls/boss_warchief_kargath_bladefist.cpp b/scripts/outland/hellfire_citadel/shattered_halls/boss_warchief_kargath_bladefist.cpp index 75acf122a..27d4922d2 100644 --- a/scripts/outland/hellfire_citadel/shattered_halls/boss_warchief_kargath_bladefist.cpp +++ b/scripts/outland/hellfire_citadel/shattered_halls/boss_warchief_kargath_bladefist.cpp @@ -189,10 +189,10 @@ struct MANGOS_DLL_DECL boss_warchief_kargath_bladefistAI : public ScriptedAI void SpawnAssassin() { - m_creature->SummonCreature(NPC_SHATTERED_ASSASSIN, AssassEntrance[0], AssassEntrance[1] + 8, AssassEntrance[2], 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 24000); - m_creature->SummonCreature(NPC_SHATTERED_ASSASSIN, AssassEntrance[0], AssassEntrance[1] - 8, AssassEntrance[2], 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 24000); - m_creature->SummonCreature(NPC_SHATTERED_ASSASSIN, AssassExit[0], AssassExit[1] + 8, AssassExit[2], 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 24000); - m_creature->SummonCreature(NPC_SHATTERED_ASSASSIN, AssassExit[0], AssassExit[1] - 8, AssassExit[2], 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 24000); + m_creature->SummonCreature(NPC_SHATTERED_ASSASSIN, AssassEntrance[0], AssassEntrance[1] + 8, AssassEntrance[2], 0, TEMPSUMMON_TIMED_OOC_DESPAWN, 24000); + m_creature->SummonCreature(NPC_SHATTERED_ASSASSIN, AssassEntrance[0], AssassEntrance[1] - 8, AssassEntrance[2], 0, TEMPSUMMON_TIMED_OOC_DESPAWN, 24000); + m_creature->SummonCreature(NPC_SHATTERED_ASSASSIN, AssassExit[0], AssassExit[1] + 8, AssassExit[2], 0, TEMPSUMMON_TIMED_OOC_DESPAWN, 24000); + m_creature->SummonCreature(NPC_SHATTERED_ASSASSIN, AssassExit[0], AssassExit[1] - 8, AssassExit[2], 0, TEMPSUMMON_TIMED_OOC_DESPAWN, 24000); } void UpdateAI(const uint32 uiDiff) override @@ -283,9 +283,9 @@ struct MANGOS_DLL_DECL boss_warchief_kargath_bladefistAI : public ScriptedAI { switch (urand(0, 2)) { - case 0: m_creature->SummonCreature(NPC_HEARTHEN_GUARD, AddsEntrance[0], AddsEntrance[1], AddsEntrance[2], 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 20000); break; - case 1: m_creature->SummonCreature(NPC_SHARPSHOOTER_GUARD, AddsEntrance[0], AddsEntrance[1], AddsEntrance[2], 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 20000); break; - case 2: m_creature->SummonCreature(NPC_REAVER_GUARD, AddsEntrance[0], AddsEntrance[1], AddsEntrance[2], 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 20000); break; + case 0: m_creature->SummonCreature(NPC_HEARTHEN_GUARD, AddsEntrance[0], AddsEntrance[1], AddsEntrance[2], 0.0f, TEMPSUMMON_TIMED_OOC_DESPAWN, 20000); break; + case 1: m_creature->SummonCreature(NPC_SHARPSHOOTER_GUARD, AddsEntrance[0], AddsEntrance[1], AddsEntrance[2], 0.0f, TEMPSUMMON_TIMED_OOC_DESPAWN, 20000); break; + case 2: m_creature->SummonCreature(NPC_REAVER_GUARD, AddsEntrance[0], AddsEntrance[1], AddsEntrance[2], 0.0f, TEMPSUMMON_TIMED_OOC_DESPAWN, 20000); break; } } diff --git a/scripts/outland/hellfire_citadel/shattered_halls/instance_shattered_halls.cpp b/scripts/outland/hellfire_citadel/shattered_halls/instance_shattered_halls.cpp index 30f92ed07..9d74bf769 100644 --- a/scripts/outland/hellfire_citadel/shattered_halls/instance_shattered_halls.cpp +++ b/scripts/outland/hellfire_citadel/shattered_halls/instance_shattered_halls.cpp @@ -124,7 +124,7 @@ void instance_shattered_halls::SetData(uint32 uiType, uint32 uiData) pPlayer->SummonCreature(m_uiTeam == ALLIANCE ? aSoldiersLocs[i].m_uiAllianceEntry : aSoldiersLocs[i].m_uiHordeEntry, aSoldiersLocs[i].m_fX, aSoldiersLocs[i].m_fY, aSoldiersLocs[i].m_fZ, aSoldiersLocs[i].m_fO, TEMPSUMMON_DEAD_DESPAWN, 0); // Summon the executioner for 80 min; ToDo: set the flags in DB - if (Creature* pExecutioner = pPlayer->SummonCreature(NPC_EXECUTIONER, afExecutionerLoc[0], afExecutionerLoc[1], afExecutionerLoc[2], afExecutionerLoc[3], TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 80 * MINUTE * IN_MILLISECONDS, true)) + if (Creature* pExecutioner = pPlayer->SummonCreature(NPC_EXECUTIONER, afExecutionerLoc[0], afExecutionerLoc[1], afExecutionerLoc[2], afExecutionerLoc[3], TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 80 * MINUTE * IN_MILLISECONDS, true)) pExecutioner->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_NON_ATTACKABLE); // cast the execution spell diff --git a/scripts/outland/hellfire_peninsula.cpp b/scripts/outland/hellfire_peninsula.cpp index 85d0caf2f..2c8196bf1 100644 --- a/scripts/outland/hellfire_peninsula.cpp +++ b/scripts/outland/hellfire_peninsula.cpp @@ -252,7 +252,7 @@ struct MANGOS_DLL_DECL npc_demoniac_scryerAI : public ScriptedAI float fX, fY, fZ; m_creature->GetRandomPoint(m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), 20.0f, fX, fY, fZ); - m_creature->SummonCreature(NPC_HELLFIRE_WARDLING, fX, fY, fZ, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); + m_creature->SummonCreature(NPC_HELLFIRE_WARDLING, fX, fY, fZ, 0.0f, TEMPSUMMON_TIMED_OOC_DESPAWN, 5000); } void JustSummoned(Creature* pSummoned) override @@ -387,8 +387,8 @@ struct MANGOS_DLL_DECL npc_wounded_blood_elfAI : public npc_escortAI case 9: DoScriptText(SAY_ELF_SUMMON1, m_creature, pPlayer); // Spawn two Haal'eshi Talonguard - DoSpawnCreature(NPC_WINDWALKER, -15, -15, 0, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); - DoSpawnCreature(NPC_WINDWALKER, -17, -17, 0, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); + DoSpawnCreature(NPC_WINDWALKER, -15, -15, 0, 0, TEMPSUMMON_TIMED_OOC_DESPAWN, 5000); + DoSpawnCreature(NPC_WINDWALKER, -17, -17, 0, 0, TEMPSUMMON_TIMED_OOC_DESPAWN, 5000); break; case 13: DoScriptText(SAY_ELF_RESTING, m_creature, pPlayer); @@ -396,8 +396,8 @@ struct MANGOS_DLL_DECL npc_wounded_blood_elfAI : public npc_escortAI case 14: DoScriptText(SAY_ELF_SUMMON2, m_creature, pPlayer); // Spawn two Haal'eshi Windwalker - DoSpawnCreature(NPC_WINDWALKER, -15, -15, 0, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); - DoSpawnCreature(NPC_WINDWALKER, -17, -17, 0, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); + DoSpawnCreature(NPC_WINDWALKER, -15, -15, 0, 0, TEMPSUMMON_TIMED_OOC_DESPAWN, 5000); + DoSpawnCreature(NPC_WINDWALKER, -17, -17, 0, 0, TEMPSUMMON_TIMED_OOC_DESPAWN, 5000); break; case 27: DoScriptText(SAY_ELF_COMPLETE, m_creature, pPlayer); diff --git a/scripts/outland/nagrand.cpp b/scripts/outland/nagrand.cpp index 557ff9021..d5c7337bd 100644 --- a/scripts/outland/nagrand.cpp +++ b/scripts/outland/nagrand.cpp @@ -199,13 +199,13 @@ struct MANGOS_DLL_DECL npc_maghar_captiveAI : public npc_escortAI case 7: DoScriptText(SAY_MAG_MORE, m_creature); - if (Creature* pTemp = m_creature->SummonCreature(NPC_MURK_PUTRIFIER, m_afAmbushB[0], m_afAmbushB[1], m_afAmbushB[2], 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000)) + if (Creature* pTemp = m_creature->SummonCreature(NPC_MURK_PUTRIFIER, m_afAmbushB[0], m_afAmbushB[1], m_afAmbushB[2], 0.0f, TEMPSUMMON_TIMED_OOC_DESPAWN, 25000)) DoScriptText(SAY_MAG_MORE_REPLY, pTemp); - m_creature->SummonCreature(NPC_MURK_PUTRIFIER, m_afAmbushB[0] - 2.5f, m_afAmbushB[1] - 2.5f, m_afAmbushB[2], 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000); + m_creature->SummonCreature(NPC_MURK_PUTRIFIER, m_afAmbushB[0] - 2.5f, m_afAmbushB[1] - 2.5f, m_afAmbushB[2], 0.0f, TEMPSUMMON_TIMED_OOC_DESPAWN, 25000); - m_creature->SummonCreature(NPC_MURK_SCAVENGER, m_afAmbushB[0] + 2.5f, m_afAmbushB[1] + 2.5f, m_afAmbushB[2], 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000); - m_creature->SummonCreature(NPC_MURK_SCAVENGER, m_afAmbushB[0] + 2.5f, m_afAmbushB[1] - 2.5f, m_afAmbushB[2], 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000); + m_creature->SummonCreature(NPC_MURK_SCAVENGER, m_afAmbushB[0] + 2.5f, m_afAmbushB[1] + 2.5f, m_afAmbushB[2], 0.0f, TEMPSUMMON_TIMED_OOC_DESPAWN, 25000); + m_creature->SummonCreature(NPC_MURK_SCAVENGER, m_afAmbushB[0] + 2.5f, m_afAmbushB[1] - 2.5f, m_afAmbushB[2], 0.0f, TEMPSUMMON_TIMED_OOC_DESPAWN, 25000); break; case 16: DoScriptText(SAY_MAG_COMPLETE, m_creature); @@ -290,9 +290,9 @@ bool QuestAccept_npc_maghar_captive(Player* pPlayer, Creature* pCreature, const DoScriptText(SAY_MAG_START, pCreature); - pCreature->SummonCreature(NPC_MURK_RAIDER, m_afAmbushA[0] + 2.5f, m_afAmbushA[1] - 2.5f, m_afAmbushA[2], 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000); - pCreature->SummonCreature(NPC_MURK_PUTRIFIER, m_afAmbushA[0] - 2.5f, m_afAmbushA[1] + 2.5f, m_afAmbushA[2], 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000); - pCreature->SummonCreature(NPC_MURK_BRUTE, m_afAmbushA[0], m_afAmbushA[1], m_afAmbushA[2], 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000); + pCreature->SummonCreature(NPC_MURK_RAIDER, m_afAmbushA[0] + 2.5f, m_afAmbushA[1] - 2.5f, m_afAmbushA[2], 0.0f, TEMPSUMMON_TIMED_OOC_DESPAWN, 25000); + pCreature->SummonCreature(NPC_MURK_PUTRIFIER, m_afAmbushA[0] - 2.5f, m_afAmbushA[1] + 2.5f, m_afAmbushA[2], 0.0f, TEMPSUMMON_TIMED_OOC_DESPAWN, 25000); + pCreature->SummonCreature(NPC_MURK_BRUTE, m_afAmbushA[0], m_afAmbushA[1], m_afAmbushA[2], 0.0f, TEMPSUMMON_TIMED_OOC_DESPAWN, 25000); } } return true; diff --git a/scripts/outland/netherstorm.cpp b/scripts/outland/netherstorm.cpp index 6f1eaa172..839ac4d68 100644 --- a/scripts/outland/netherstorm.cpp +++ b/scripts/outland/netherstorm.cpp @@ -150,47 +150,47 @@ struct MANGOS_DLL_DECL npc_manaforge_control_consoleAI : public ScriptedAI case NPC_BNAAR_C_CONSOLE: if (urand(0, 1)) { - if (pAdd = m_creature->SummonCreature(NPC_SUNFURY_TECH, 2933.68f, 4162.55f, 164.00f, 1.60f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000)) + if (pAdd = m_creature->SummonCreature(NPC_SUNFURY_TECH, 2933.68f, 4162.55f, 164.00f, 1.60f, TEMPSUMMON_TIMED_OOC_DESPAWN, 120000)) pAdd->GetMotionMaster()->MovePoint(0, 2927.36f, 4212.97f, 164.00f); } else { - if (pAdd = m_creature->SummonCreature(NPC_SUNFURY_TECH, 2927.36f, 4212.97f, 164.00f, 4.94f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000)) + if (pAdd = m_creature->SummonCreature(NPC_SUNFURY_TECH, 2927.36f, 4212.97f, 164.00f, 4.94f, TEMPSUMMON_TIMED_OOC_DESPAWN, 120000)) pAdd->GetMotionMaster()->MovePoint(0, 2933.68f, 4162.55f, 164.00f); } m_uiWaveTimer = 30000; break; case NPC_CORUU_C_CONSOLE: - if (pAdd = m_creature->SummonCreature(NPC_SUNFURY_TECH, 2445.21f, 2765.26f, 134.49f, 3.93f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000)) + if (pAdd = m_creature->SummonCreature(NPC_SUNFURY_TECH, 2445.21f, 2765.26f, 134.49f, 3.93f, TEMPSUMMON_TIMED_OOC_DESPAWN, 120000)) pAdd->GetMotionMaster()->MovePoint(0, 2424.21f, 2740.15f, 133.81f); - if (pAdd = m_creature->SummonCreature(NPC_SUNFURY_TECH, 2429.86f, 2731.85f, 134.53f, 1.31f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000)) + if (pAdd = m_creature->SummonCreature(NPC_SUNFURY_TECH, 2429.86f, 2731.85f, 134.53f, 1.31f, TEMPSUMMON_TIMED_OOC_DESPAWN, 120000)) pAdd->GetMotionMaster()->MovePoint(0, 2435.37f, 2766.04f, 133.81f); m_uiWaveTimer = 20000; break; case NPC_DURO_C_CONSOLE: - if (pAdd = m_creature->SummonCreature(NPC_SUNFURY_TECH, 2986.80f, 2205.36f, 165.37f, 3.74f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000)) + if (pAdd = m_creature->SummonCreature(NPC_SUNFURY_TECH, 2986.80f, 2205.36f, 165.37f, 3.74f, TEMPSUMMON_TIMED_OOC_DESPAWN, 120000)) pAdd->GetMotionMaster()->MovePoint(0, 2985.15f, 2197.32f, 164.79f); - if (pAdd = m_creature->SummonCreature(NPC_SUNFURY_TECH, 2952.91f, 2191.20f, 165.32f, 0.22f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000)) + if (pAdd = m_creature->SummonCreature(NPC_SUNFURY_TECH, 2952.91f, 2191.20f, 165.32f, 0.22f, TEMPSUMMON_TIMED_OOC_DESPAWN, 120000)) pAdd->GetMotionMaster()->MovePoint(0, 2060.01f, 2185.27f, 164.67f); m_uiWaveTimer = 15000; break; case NPC_ARA_C_CONSOLE: if (urand(0, 1)) { - if (pAdd = m_creature->SummonCreature(NPC_ARA_TECH, 4035.11f, 4038.97f, 194.27f, 2.57f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000)) + if (pAdd = m_creature->SummonCreature(NPC_ARA_TECH, 4035.11f, 4038.97f, 194.27f, 2.57f, TEMPSUMMON_TIMED_OOC_DESPAWN, 120000)) pAdd->GetMotionMaster()->MovePoint(0, 4003.42f, 4040.19f, 193.49f); - if (pAdd = m_creature->SummonCreature(NPC_ARA_TECH, 4033.66f, 4036.79f, 194.28f, 2.57f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000)) + if (pAdd = m_creature->SummonCreature(NPC_ARA_TECH, 4033.66f, 4036.79f, 194.28f, 2.57f, TEMPSUMMON_TIMED_OOC_DESPAWN, 120000)) pAdd->GetMotionMaster()->MovePoint(0, 4003.42f, 4040.19f, 193.49f); - if (pAdd = m_creature->SummonCreature(NPC_ARA_TECH, 4037.13f, 4037.30f, 194.23f, 2.57f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000)) + if (pAdd = m_creature->SummonCreature(NPC_ARA_TECH, 4037.13f, 4037.30f, 194.23f, 2.57f, TEMPSUMMON_TIMED_OOC_DESPAWN, 120000)) pAdd->GetMotionMaster()->MovePoint(0, 4003.42f, 4040.19f, 193.49f); } else { - if (pAdd = m_creature->SummonCreature(NPC_ARA_TECH, 3099.59f, 4049.30f, 194.22f, 0.05f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000)) + if (pAdd = m_creature->SummonCreature(NPC_ARA_TECH, 3099.59f, 4049.30f, 194.22f, 0.05f, TEMPSUMMON_TIMED_OOC_DESPAWN, 120000)) pAdd->GetMotionMaster()->MovePoint(0, 4028.01f, 4035.17f, 193.59f); - if (pAdd = m_creature->SummonCreature(NPC_ARA_TECH, 3999.72f, 4046.75f, 194.22f, 0.05f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000)) + if (pAdd = m_creature->SummonCreature(NPC_ARA_TECH, 3999.72f, 4046.75f, 194.22f, 0.05f, TEMPSUMMON_TIMED_OOC_DESPAWN, 120000)) pAdd->GetMotionMaster()->MovePoint(0, 4028.01f, 4035.17f, 193.59f); - if (pAdd = m_creature->SummonCreature(NPC_ARA_TECH, 3996.81f, 4048.26f, 194.22f, 0.05f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000)) + if (pAdd = m_creature->SummonCreature(NPC_ARA_TECH, 3996.81f, 4048.26f, 194.22f, 0.05f, TEMPSUMMON_TIMED_OOC_DESPAWN, 120000)) pAdd->GetMotionMaster()->MovePoint(0, 4028.01f, 4035.17f, 193.59f); } m_uiWaveTimer = 15000; @@ -205,29 +205,29 @@ struct MANGOS_DLL_DECL npc_manaforge_control_consoleAI : public ScriptedAI switch (pCreature->GetEntry()) { case NPC_BNAAR_C_CONSOLE: - if (pAdd = m_creature->SummonCreature(NPC_SUNFURY_TECH, 2946.52f, 4201.42f, 163.47f, 3.54f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000)) + if (pAdd = m_creature->SummonCreature(NPC_SUNFURY_TECH, 2946.52f, 4201.42f, 163.47f, 3.54f, TEMPSUMMON_TIMED_OOC_DESPAWN, 120000)) pAdd->GetMotionMaster()->MovePoint(0, 2927.49f, 4192.81f, 163.00f); break; case NPC_CORUU_C_CONSOLE: - if (pAdd = m_creature->SummonCreature(NPC_SUNFURY_TECH, 2453.88f, 2737.85f, 133.27f, 2.59f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000)) + if (pAdd = m_creature->SummonCreature(NPC_SUNFURY_TECH, 2453.88f, 2737.85f, 133.27f, 2.59f, TEMPSUMMON_TIMED_OOC_DESPAWN, 120000)) pAdd->GetMotionMaster()->MovePoint(0, 2433.96f, 2751.53f, 133.85f); - if (pAdd = m_creature->SummonCreature(NPC_SUNFURY_TECH, 2441.62f, 2735.32f, 134.49f, 1.97f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000)) + if (pAdd = m_creature->SummonCreature(NPC_SUNFURY_TECH, 2441.62f, 2735.32f, 134.49f, 1.97f, TEMPSUMMON_TIMED_OOC_DESPAWN, 120000)) pAdd->GetMotionMaster()->MovePoint(0, 2433.96f, 2751.53f, 133.85f); - if (pAdd = m_creature->SummonCreature(NPC_SUNFURY_TECH, 2450.73f, 2754.50f, 134.49f, 3.29f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000)) + if (pAdd = m_creature->SummonCreature(NPC_SUNFURY_TECH, 2450.73f, 2754.50f, 134.49f, 3.29f, TEMPSUMMON_TIMED_OOC_DESPAWN, 120000)) pAdd->GetMotionMaster()->MovePoint(0, 2433.96f, 2751.53f, 133.85f); break; case NPC_DURO_C_CONSOLE: - if (pAdd = m_creature->SummonCreature(NPC_SUNFURY_TECH, 2956.18f, 2202.85f, 165.32f, 5.45f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000)) + if (pAdd = m_creature->SummonCreature(NPC_SUNFURY_TECH, 2956.18f, 2202.85f, 165.32f, 5.45f, TEMPSUMMON_TIMED_OOC_DESPAWN, 120000)) pAdd->GetMotionMaster()->MovePoint(0, 2972.27f, 2193.22f, 164.48f); - if (pAdd = m_creature->SummonCreature(NPC_SUNFURY_TECH, 2975.30f, 2211.50f, 165.32f, 4.55f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000)) + if (pAdd = m_creature->SummonCreature(NPC_SUNFURY_TECH, 2975.30f, 2211.50f, 165.32f, 4.55f, TEMPSUMMON_TIMED_OOC_DESPAWN, 120000)) pAdd->GetMotionMaster()->MovePoint(0, 2972.27f, 2193.22f, 164.48f); - if (pAdd = m_creature->SummonCreature(NPC_SUNFURY_PROT, 2965.02f, 2217.45f, 164.16f, 4.96f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000)) + if (pAdd = m_creature->SummonCreature(NPC_SUNFURY_PROT, 2965.02f, 2217.45f, 164.16f, 4.96f, TEMPSUMMON_TIMED_OOC_DESPAWN, 120000)) pAdd->GetMotionMaster()->MovePoint(0, 2972.27f, 2193.22f, 164.48f); break; case NPC_ARA_C_CONSOLE: - if (pAdd = m_creature->SummonCreature(NPC_ARA_ENGI, 3994.51f, 4020.46f, 192.18f, 0.91f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000)) + if (pAdd = m_creature->SummonCreature(NPC_ARA_ENGI, 3994.51f, 4020.46f, 192.18f, 0.91f, TEMPSUMMON_TIMED_OOC_DESPAWN, 120000)) pAdd->GetMotionMaster()->MovePoint(0, 4008.35f, 4035.04f, 192.70f); - if (pAdd = m_creature->SummonCreature(NPC_ARA_GORKLONN, 4021.56f, 4059.35f, 193.59f, 4.44f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000)) + if (pAdd = m_creature->SummonCreature(NPC_ARA_GORKLONN, 4021.56f, 4059.35f, 193.59f, 4.44f, TEMPSUMMON_TIMED_OOC_DESPAWN, 120000)) pAdd->GetMotionMaster()->MovePoint(0, 4016.62f, 4039.89f, 193.46f); break; } @@ -326,25 +326,25 @@ bool GOUse_go_manaforge_control_console(Player* pPlayer, GameObject* pGo) if ((pPlayer->GetQuestStatus(QUEST_SHUTDOWN_BNAAR_ALDOR) == QUEST_STATUS_INCOMPLETE || pPlayer->GetQuestStatus(QUEST_SHUTDOWN_BNAAR_SCRYERS) == QUEST_STATUS_INCOMPLETE) && pPlayer->HasItemCount(ITEM_BNAAR_ACESS_CRYSTAL, 1)) - pManaforge = pPlayer->SummonCreature(NPC_BNAAR_C_CONSOLE, 2918.95f, 4189.98f, 161.88f, 0.34f, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 125000); + pManaforge = pPlayer->SummonCreature(NPC_BNAAR_C_CONSOLE, 2918.95f, 4189.98f, 161.88f, 0.34f, TEMPSUMMON_TIMED_OOC_OR_CORPSE_DESPAWN, 125000); break; case 3730: // coruu if ((pPlayer->GetQuestStatus(QUEST_SHUTDOWN_CORUU_ALDOR) == QUEST_STATUS_INCOMPLETE || pPlayer->GetQuestStatus(QUEST_SHUTDOWN_CORUU_SCRYERS) == QUEST_STATUS_INCOMPLETE) && pPlayer->HasItemCount(ITEM_CORUU_ACESS_CRYSTAL, 1)) - pManaforge = pPlayer->SummonCreature(NPC_CORUU_C_CONSOLE, 2426.77f, 2750.38f, 133.24f, 2.14f, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 125000); + pManaforge = pPlayer->SummonCreature(NPC_CORUU_C_CONSOLE, 2426.77f, 2750.38f, 133.24f, 2.14f, TEMPSUMMON_TIMED_OOC_OR_CORPSE_DESPAWN, 125000); break; case 3734: // duro if ((pPlayer->GetQuestStatus(QUEST_SHUTDOWN_DURO_ALDOR) == QUEST_STATUS_INCOMPLETE || pPlayer->GetQuestStatus(QUEST_SHUTDOWN_DURO_SCRYERS) == QUEST_STATUS_INCOMPLETE) && pPlayer->HasItemCount(ITEM_DURO_ACESS_CRYSTAL, 1)) - pManaforge = pPlayer->SummonCreature(NPC_DURO_C_CONSOLE, 2976.48f, 2183.29f, 163.20f, 1.85f, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 125000); + pManaforge = pPlayer->SummonCreature(NPC_DURO_C_CONSOLE, 2976.48f, 2183.29f, 163.20f, 1.85f, TEMPSUMMON_TIMED_OOC_OR_CORPSE_DESPAWN, 125000); break; case 3722: // ara if ((pPlayer->GetQuestStatus(QUEST_SHUTDOWN_ARA_ALDOR) == QUEST_STATUS_INCOMPLETE || pPlayer->GetQuestStatus(QUEST_SHUTDOWN_ARA_SCRYERS) == QUEST_STATUS_INCOMPLETE) && pPlayer->HasItemCount(ITEM_ARA_ACESS_CRYSTAL, 1)) - pManaforge = pPlayer->SummonCreature(NPC_ARA_C_CONSOLE, 4013.71f, 4028.76f, 192.10f, 1.25f, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 125000); + pManaforge = pPlayer->SummonCreature(NPC_ARA_C_CONSOLE, 4013.71f, 4028.76f, 192.10f, 1.25f, TEMPSUMMON_TIMED_OOC_OR_CORPSE_DESPAWN, 125000); break; } @@ -642,13 +642,13 @@ struct MANGOS_DLL_DECL npc_bessyAI : public npc_escortAI switch (uiPointId) { case 3: - m_creature->SummonCreature(NPC_TORMENTED_SOUL, 2449.67f, 2183.11f, 96.85f, 6.20f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000); - m_creature->SummonCreature(NPC_TORMENTED_SOUL, 2449.53f, 2184.43f, 96.36f, 6.27f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000); - m_creature->SummonCreature(NPC_TORMENTED_SOUL, 2449.85f, 2186.34f, 97.57f, 6.08f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000); + m_creature->SummonCreature(NPC_TORMENTED_SOUL, 2449.67f, 2183.11f, 96.85f, 6.20f, TEMPSUMMON_TIMED_OOC_DESPAWN, 25000); + m_creature->SummonCreature(NPC_TORMENTED_SOUL, 2449.53f, 2184.43f, 96.36f, 6.27f, TEMPSUMMON_TIMED_OOC_DESPAWN, 25000); + m_creature->SummonCreature(NPC_TORMENTED_SOUL, 2449.85f, 2186.34f, 97.57f, 6.08f, TEMPSUMMON_TIMED_OOC_DESPAWN, 25000); break; case 7: - m_creature->SummonCreature(NPC_SEVERED_SPIRIT, 2309.64f, 2186.24f, 92.25f, 6.06f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000); - m_creature->SummonCreature(NPC_SEVERED_SPIRIT, 2309.25f, 2183.46f, 91.75f, 6.22f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000); + m_creature->SummonCreature(NPC_SEVERED_SPIRIT, 2309.64f, 2186.24f, 92.25f, 6.06f, TEMPSUMMON_TIMED_OOC_DESPAWN, 25000); + m_creature->SummonCreature(NPC_SEVERED_SPIRIT, 2309.25f, 2183.46f, 91.75f, 6.22f, TEMPSUMMON_TIMED_OOC_DESPAWN, 25000); break; case 12: if (Player* pPlayer = GetPlayerForEscort()) @@ -997,12 +997,12 @@ struct MANGOS_DLL_DECL npc_protectorate_demolitionistAI : public npc_escortAI switch (m_uiEventStage) { case 0: - m_creature->SummonCreature(NPC_ARCHON, 3875.69f, 2308.72f, 115.80f, 1.48f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 30000); + m_creature->SummonCreature(NPC_ARCHON, 3875.69f, 2308.72f, 115.80f, 1.48f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 30000); m_uiEventTimer = 4000; break; case 1: - m_creature->SummonCreature(NPC_NEXUS_STALKER, 3884.06f, 2325.22f, 111.37f, 3.45f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 30000); - m_creature->SummonCreature(NPC_NEXUS_STALKER, 3861.54f, 2320.44f, 111.48f, 0.32f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 30000); + m_creature->SummonCreature(NPC_NEXUS_STALKER, 3884.06f, 2325.22f, 111.37f, 3.45f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 30000); + m_creature->SummonCreature(NPC_NEXUS_STALKER, 3861.54f, 2320.44f, 111.48f, 0.32f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 30000); m_uiEventTimer = 9000; break; case 2: diff --git a/scripts/outland/shadowmoon_valley.cpp b/scripts/outland/shadowmoon_valley.cpp index 6a6e7f5d9..55cb04f75 100644 --- a/scripts/outland/shadowmoon_valley.cpp +++ b/scripts/outland/shadowmoon_valley.cpp @@ -551,7 +551,7 @@ struct MANGOS_DLL_DECL npc_wildaAI : public npc_escortAI float fX, fY, fZ; m_creature->GetRandomPoint(m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), 15.0f, fX, fY, fZ); - m_creature->SummonCreature(NPC_COILSKAR_ASSASSIN, fX, fY, fZ, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); + m_creature->SummonCreature(NPC_COILSKAR_ASSASSIN, fX, fY, fZ, 0.0f, TEMPSUMMON_TIMED_OOC_DESPAWN, 5000); } void Aggro(Unit* pWho) override diff --git a/scripts/outland/tempest_keep/arcatraz/instance_arcatraz.cpp b/scripts/outland/tempest_keep/arcatraz/instance_arcatraz.cpp index a847851c4..4d1be9643 100644 --- a/scripts/outland/tempest_keep/arcatraz/instance_arcatraz.cpp +++ b/scripts/outland/tempest_keep/arcatraz/instance_arcatraz.cpp @@ -448,7 +448,7 @@ void instance_arcatraz::Update(uint32 uiDiff) uint32 uiEntry = urand(0, 10) ? NPC_PROTEAN_HORROR : NPC_PROTEAN_NIGHTMARE; // Summon and move the intro creatures into combat positions - if (Creature* pTemp = pPlayer->SummonCreature(uiEntry, aEntranceSpawnLoc[0], aEntranceSpawnLoc[1], aEntranceSpawnLoc[2], aEntranceSpawnLoc[3], TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 30000)) + if (Creature* pTemp = pPlayer->SummonCreature(uiEntry, aEntranceSpawnLoc[0], aEntranceSpawnLoc[1], aEntranceSpawnLoc[2], aEntranceSpawnLoc[3], TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 30000)) { pTemp->SetWalk(false); pTemp->GetMotionMaster()->MovePoint(0, aEntranceMoveLoc[0], aEntranceMoveLoc[1], aEntranceMoveLoc[2]); diff --git a/scripts/outland/tempest_keep/the_eye/boss_kaelthas.cpp b/scripts/outland/tempest_keep/the_eye/boss_kaelthas.cpp index 266cd459f..7b7c60cbe 100644 --- a/scripts/outland/tempest_keep/the_eye/boss_kaelthas.cpp +++ b/scripts/outland/tempest_keep/the_eye/boss_kaelthas.cpp @@ -1159,7 +1159,7 @@ struct MANGOS_DLL_DECL mob_phoenix_tkAI : public ScriptedAI // Spawn egg and make invisible DoCastSpellIfCan(m_creature, SPELL_EMBER_BLAST, CAST_TRIGGERED); - m_creature->SummonCreature(NPC_PHOENIX_EGG, 0, 0, 0, 0, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 15000); + m_creature->SummonCreature(NPC_PHOENIX_EGG, 0, 0, 0, 0, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 15000); } void SummonedCreatureDespawn(Creature* pSummoned) override diff --git a/scripts/outland/terokkar_forest.cpp b/scripts/outland/terokkar_forest.cpp index 523a07995..5c8cd0163 100644 --- a/scripts/outland/terokkar_forest.cpp +++ b/scripts/outland/terokkar_forest.cpp @@ -168,11 +168,11 @@ struct MANGOS_DLL_DECL mob_netherweb_victimAI : public ScriptedAI { if (!urand(0, 3)) { - m_creature->SummonCreature(NPC_FREED_WARRIOR, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 60000); + m_creature->SummonCreature(NPC_FREED_WARRIOR, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_OOC_DESPAWN, 60000); pPlayer->KilledMonsterCredit(NPC_FREED_WARRIOR, m_creature->GetObjectGuid()); } else - m_creature->SummonCreature(netherwebVictims[urand(0, 5)], 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 60000); + m_creature->SummonCreature(netherwebVictims[urand(0, 5)], 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_OOC_DESPAWN, 60000); } } } @@ -221,15 +221,15 @@ struct MANGOS_DLL_DECL npc_akunoAI : public npc_escortAI { case 5: DoScriptText(SAY_AKU_AMBUSH_A, m_creature); - m_creature->SummonCreature(NPC_CABAL_SKIRMISHER, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000); + m_creature->SummonCreature(NPC_CABAL_SKIRMISHER, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_OOC_DESPAWN, 25000); break; case 14: DoScriptText(SAY_AKU_AMBUSH_B, m_creature); - if (Creature* pTemp = m_creature->SummonCreature(NPC_CABAL_SKIRMISHER, m_afAmbushB1[0], m_afAmbushB1[1], m_afAmbushB1[2], 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000)) + if (Creature* pTemp = m_creature->SummonCreature(NPC_CABAL_SKIRMISHER, m_afAmbushB1[0], m_afAmbushB1[1], m_afAmbushB1[2], 0.0f, TEMPSUMMON_TIMED_OOC_DESPAWN, 25000)) DoScriptText(SAY_AKU_AMBUSH_B_REPLY, pTemp); - m_creature->SummonCreature(NPC_CABAL_SKIRMISHER, m_afAmbushB2[0], m_afAmbushB2[1], m_afAmbushB2[2], 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000); + m_creature->SummonCreature(NPC_CABAL_SKIRMISHER, m_afAmbushB2[0], m_afAmbushB2[1], m_afAmbushB2[2], 0.0f, TEMPSUMMON_TIMED_OOC_DESPAWN, 25000); break; case 15: SetRun(); @@ -524,7 +524,7 @@ struct MANGOS_DLL_DECL npc_letollAI : public npc_escortAI break; case 12: DoScriptText(SAY_LE_IN_YOUR_FACE, m_creature); - m_creature->SummonCreature(NPC_BONE_SIFTER, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); + m_creature->SummonCreature(NPC_BONE_SIFTER, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_OOC_DESPAWN, 30000); break; case 13: DoScriptText(EMOTE_LE_PICK_UP, m_creature); @@ -958,7 +958,7 @@ struct MANGOS_DLL_DECL npc_skywingAI : public npc_escortAI break; case 80: DoScriptText(SAY_SKYWING_SUMMON, m_creature); - m_creature->SummonCreature(NPC_LUANGA_THE_IMPRISONER, aLuangaSpawnCoords[0], aLuangaSpawnCoords[1], aLuangaSpawnCoords[2], 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); + m_creature->SummonCreature(NPC_LUANGA_THE_IMPRISONER, aLuangaSpawnCoords[0], aLuangaSpawnCoords[1], aLuangaSpawnCoords[2], 0, TEMPSUMMON_TIMED_OOC_DESPAWN, 30000); break; case 81: // Start transformation diff --git a/scripts/outland/zangarmarsh.cpp b/scripts/outland/zangarmarsh.cpp index c33a3cc89..1a13a26bb 100644 --- a/scripts/outland/zangarmarsh.cpp +++ b/scripts/outland/zangarmarsh.cpp @@ -110,8 +110,8 @@ struct MANGOS_DLL_DECL npc_kayra_longmaneAI : public npc_escortAI { case 4: DoScriptText(SAY_AMBUSH1, m_creature, pPlayer); - DoSpawnCreature(NPC_SLAVEBINDER, -10.0f, -5.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); - DoSpawnCreature(NPC_SLAVEBINDER, -8.0f, 5.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); + DoSpawnCreature(NPC_SLAVEBINDER, -10.0f, -5.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_OOC_DESPAWN, 30000); + DoSpawnCreature(NPC_SLAVEBINDER, -8.0f, 5.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_OOC_DESPAWN, 30000); break; case 5: DoScriptText(SAY_PROGRESS, m_creature, pPlayer); @@ -119,8 +119,8 @@ struct MANGOS_DLL_DECL npc_kayra_longmaneAI : public npc_escortAI break; case 16: DoScriptText(SAY_AMBUSH2, m_creature, pPlayer); - DoSpawnCreature(NPC_SLAVEBINDER, -10.0f, -5.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); - DoSpawnCreature(NPC_SLAVEBINDER, -8.0f, 5.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); + DoSpawnCreature(NPC_SLAVEBINDER, -10.0f, -5.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_OOC_DESPAWN, 30000); + DoSpawnCreature(NPC_SLAVEBINDER, -8.0f, 5.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_OOC_DESPAWN, 30000); break; case 17: DoScriptText(SAY_END, m_creature, pPlayer); diff --git a/scripts/world/areatrigger_scripts.cpp b/scripts/world/areatrigger_scripts.cpp index f28e65ffb..d285c866d 100644 --- a/scripts/world/areatrigger_scripts.cpp +++ b/scripts/world/areatrigger_scripts.cpp @@ -180,7 +180,7 @@ bool AreaTrigger_at_spearborn_encampment(Player* pPlayer, AreaTriggerEntry const if (GetClosestCreatureWithEntry(pPlayer, NPC_TARTEK, 50.0f)) return false; - pPlayer->SummonCreature(NPC_TARTEK, pAt->x, pAt->y, pAt->z, 0.0f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, MINUTE * IN_MILLISECONDS); + pPlayer->SummonCreature(NPC_TARTEK, pAt->x, pAt->y, pAt->z, 0.0f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, MINUTE * IN_MILLISECONDS); } return false; @@ -277,7 +277,7 @@ bool AreaTrigger_at_scent_larkorwi(Player* pPlayer, AreaTriggerEntry const* pAt) if (pPlayer->isAlive() && !pPlayer->isGameMaster() && pPlayer->GetQuestStatus(QUEST_SCENT_OF_LARKORWI) == QUEST_STATUS_INCOMPLETE) { if (!GetClosestCreatureWithEntry(pPlayer, NPC_LARKORWI_MATE, 25.0f, false, false)) - pPlayer->SummonCreature(NPC_LARKORWI_MATE, pAt->x, pAt->y, pAt->z, 3.3f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 2 * MINUTE * IN_MILLISECONDS); + pPlayer->SummonCreature(NPC_LARKORWI_MATE, pAt->x, pAt->y, pAt->z, 3.3f, TEMPSUMMON_TIMED_OOC_DESPAWN, 2 * MINUTE * IN_MILLISECONDS); } return false; diff --git a/scripts/world/go_scripts.cpp b/scripts/world/go_scripts.cpp index c3ced9a66..f41381e52 100644 --- a/scripts/world/go_scripts.cpp +++ b/scripts/world/go_scripts.cpp @@ -88,7 +88,7 @@ bool GOUse_go_ethereum_prison(Player* pPlayer, GameObject* pGo) if (Creature* pCreature = pPlayer->SummonCreature(uiNpcPrisonEntry[uiRandom], pGo->GetPositionX(), pGo->GetPositionY(), pGo->GetPositionZ(), pGo->GetAngle(pPlayer), - TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000)) + TEMPSUMMON_TIMED_OOC_DESPAWN, 30000)) { if (!pCreature->IsHostileTo(pPlayer)) { @@ -132,7 +132,7 @@ bool GOUse_go_ethereum_stasis(Player* pPlayer, GameObject* pGo) pPlayer->SummonCreature(uiNpcStasisEntry[uiRandom], pGo->GetPositionX(), pGo->GetPositionY(), pGo->GetPositionZ(), pGo->GetAngle(pPlayer), - TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); + TEMPSUMMON_TIMED_OOC_DESPAWN, 30000); return false; } @@ -220,7 +220,7 @@ bool GOUse_go_shrine_of_the_birds(Player* pPlayer, GameObject* pGo) } if (uiBirdEntry) - pPlayer->SummonCreature(uiBirdEntry, fX, fY, fZ, pGo->GetOrientation(), TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 60000); + pPlayer->SummonCreature(uiBirdEntry, fX, fY, fZ, pGo->GetOrientation(), TEMPSUMMON_TIMED_OOC_DESPAWN, 60000); return false; } diff --git a/scripts/world/npcs_special.cpp b/scripts/world/npcs_special.cpp index 0de0606bd..77f6636f3 100644 --- a/scripts/world/npcs_special.cpp +++ b/scripts/world/npcs_special.cpp @@ -139,7 +139,7 @@ struct MANGOS_DLL_DECL npc_air_force_botsAI : public ScriptedAI Creature* SummonGuard() { - Creature* pSummoned = m_creature->SummonCreature(m_pSpawnAssoc->m_uiSpawnedCreatureEntry, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 300000); + Creature* pSummoned = m_creature->SummonCreature(m_pSpawnAssoc->m_uiSpawnedCreatureEntry, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_OOC_DESPAWN, 300000); if (pSummoned) m_spawnedGuid = pSummoned->GetObjectGuid(); @@ -734,7 +734,7 @@ void npc_doctorAI::UpdateAI(const uint32 uiDiff) return; } - if (Creature* Patient = m_creature->SummonCreature(patientEntry, (*itr)->x, (*itr)->y, (*itr)->z, (*itr)->o, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000)) + if (Creature* Patient = m_creature->SummonCreature(patientEntry, (*itr)->x, (*itr)->y, (*itr)->z, (*itr)->o, TEMPSUMMON_TIMED_OOC_DESPAWN, 5000)) { // 303, this flag appear to be required for client side item->spell to work (TARGET_SINGLE_FRIEND) Patient->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PVP_ATTACKABLE); diff --git a/scripts/world/spell_scripts.cpp b/scripts/world/spell_scripts.cpp index 9704ef8d3..6a3116f01 100644 --- a/scripts/world/spell_scripts.cpp +++ b/scripts/world/spell_scripts.cpp @@ -85,7 +85,7 @@ bool EffectDummyGameObj_spell_dummy_go(Unit* pCaster, uint32 uiSpellId, SpellEff } else { - if (Creature* pShark = pCaster->SummonCreature(NPC_REEF_SHARK, pGOTarget->GetPositionX(), pGOTarget->GetPositionY(), pGOTarget->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000)) + if (Creature* pShark = pCaster->SummonCreature(NPC_REEF_SHARK, pGOTarget->GetPositionX(), pGOTarget->GetPositionY(), pGOTarget->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_OOC_DESPAWN, 30000)) pShark->AI()->AttackStart(pCaster); } @@ -103,7 +103,7 @@ bool EffectDummyGameObj_spell_dummy_go(Unit* pCaster, uint32 uiSpellId, SpellEff if (urand(0, 2)) { - if (Creature* pMurloc = pCaster->SummonCreature(NPC_ANGRY_MURLOC, pCaster->GetPositionX(), pCaster->GetPositionY() + 20.0f, pCaster->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 10000)) + if (Creature* pMurloc = pCaster->SummonCreature(NPC_ANGRY_MURLOC, pCaster->GetPositionX(), pCaster->GetPositionY() + 20.0f, pCaster->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_OOC_DESPAWN, 10000)) pMurloc->AI()->AttackStart(pCaster); } else @@ -808,7 +808,7 @@ bool EffectDummyCreature_spell_dummy_npc(Unit* pCaster, uint32 uiSpellId, SpellE { for (int i = 0; i < 2; ++i) { - if (Creature* pSandGnome = pCaster->SummonCreature(NPC_SAND_GNOME, pCreatureTarget->GetPositionX(), pCreatureTarget->GetPositionY(), pCreatureTarget->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000)) + if (Creature* pSandGnome = pCaster->SummonCreature(NPC_SAND_GNOME, pCreatureTarget->GetPositionX(), pCreatureTarget->GetPositionY(), pCreatureTarget->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_OOC_DESPAWN, 30000)) pSandGnome->AI()->AttackStart(pCaster); } break; @@ -817,7 +817,7 @@ bool EffectDummyCreature_spell_dummy_npc(Unit* pCaster, uint32 uiSpellId, SpellE { for (int i = 0; i < 2; ++i) { - if (Creature* pMatureBoneSifter = pCaster->SummonCreature(NPC_MATURE_BONE_SIFTER, pCreatureTarget->GetPositionX(), pCreatureTarget->GetPositionY(), pCreatureTarget->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000)) + if (Creature* pMatureBoneSifter = pCaster->SummonCreature(NPC_MATURE_BONE_SIFTER, pCreatureTarget->GetPositionX(), pCreatureTarget->GetPositionY(), pCreatureTarget->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_OOC_DESPAWN, 30000)) pMatureBoneSifter->AI()->AttackStart(pCaster); } break; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index bba2caeab..3ba8ff9ad 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2787" + #define SD2_REVISION_NR "2788" #endif // __SD2_REVISION_NR_H__ From 05d044f38e19399dddd1b23ee43220f4601e6121 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Fri, 22 Feb 2013 00:54:43 +0200 Subject: [PATCH 0786/1172] [2789] Add forgotten part of [2787] --- scripts/outland/terokkar_forest.cpp | 3 +++ sd2_revision_nr.h | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/outland/terokkar_forest.cpp b/scripts/outland/terokkar_forest.cpp index 5c8cd0163..23164a258 100644 --- a/scripts/outland/terokkar_forest.cpp +++ b/scripts/outland/terokkar_forest.cpp @@ -1000,6 +1000,9 @@ struct MANGOS_DLL_DECL npc_skywingAI : public npc_escortAI else m_uiCycloneTimer -= uiDiff; } + + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; } }; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 3ba8ff9ad..88f7a68fd 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2788" + #define SD2_REVISION_NR "2789" #endif // __SD2_REVISION_NR_H__ From b9c605c6693fc622c16be100d1e6e39ece43d90c Mon Sep 17 00:00:00 2001 From: Xfurry Date: Fri, 22 Feb 2013 01:05:09 +0200 Subject: [PATCH 0787/1172] [2790] Add script support for Baltharus - Ruby Sanctum --- .../northrend/ruby_sanctum/boss_baltharus.cpp | 188 +++++++++++++++++- .../ruby_sanctum/instance_ruby_sanctum.cpp | 4 + scripts/northrend/ruby_sanctum/ruby_sanctum.h | 4 + sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 + sql/updates/r2790_mangos.sql | 1 + 6 files changed, 192 insertions(+), 8 deletions(-) create mode 100644 sql/updates/r2790_mangos.sql diff --git a/scripts/northrend/ruby_sanctum/boss_baltharus.cpp b/scripts/northrend/ruby_sanctum/boss_baltharus.cpp index 53f51f32a..43cf8daad 100644 --- a/scripts/northrend/ruby_sanctum/boss_baltharus.cpp +++ b/scripts/northrend/ruby_sanctum/boss_baltharus.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: boss_baltharus -SD%Complete: 20 -SDComment: only yells +SD%Complete: 90 +SDComment: intro channeled spell NYI. SDCategory: Ruby Sanctum EndScriptData */ @@ -47,6 +47,16 @@ enum SAY_SPLIT = -1724014, SPELL_BARRIER_CHANNEL = 76221, // channeled on the tree + SPELL_BLADE_TEMPEST = 75125, + SPELL_CLEAVE = 40504, + SPELL_ENERVATING_BRAND = 74502, + SPELL_REPELLING_WAVE = 74509, + SPELL_ENERVATING_BRAND_PL = 74505, // spell triggerd on players by 74502 + SPELL_SIPHONED_MIGHT = 74507, // spell triggered on boss by 74505 + SPELL_SUMMON_CLONE = 74511, // summons 39899 + SPELL_SIMPLE_TELEPORT = 64195, // spell id not confirmed + + NPC_BALTHARUS_CLONE = 39899, }; static const DialogueEntry aIntroDialogue[] = @@ -56,23 +66,48 @@ static const DialogueEntry aIntroDialogue[] = {0, 0, 0}, }; -struct MANGOS_DLL_DECL boss_baltharusAI : public ScriptedAI, private DialogueHelper +/*###### +## boss_baltharus +######*/ + +struct MANGOS_DLL_DECL boss_baltharusAI : public ScriptedAI { boss_baltharusAI(Creature* pCreature) : ScriptedAI(pCreature), - DialogueHelper(aIntroDialogue) + m_introDialogue(aIntroDialogue) { m_pInstance = (instance_ruby_sanctum*)pCreature->GetInstanceData(); - InitializeDialogueHelper(m_pInstance); + m_introDialogue.InitializeDialogueHelper(m_pInstance); + + // Health check percent depends on difficulty + if (m_pInstance) + m_fHealthPercentCheck = m_pInstance->Is25ManDifficulty() ? 33.3f : 50; + else + script_error_log("Instance Ruby Sanctum: ERROR Failed to load instance data for this instace."); + m_bHasDoneIntro = false; Reset(); } instance_ruby_sanctum* m_pInstance; + DialogueHelper m_introDialogue; bool m_bHasDoneIntro; + uint8 m_uiPhase; + float m_fHealthPercentCheck; + + uint32 m_uiBladeTempestTimer; + uint32 m_uiEnervatingBrandTimer; + uint32 m_uiCleaveTimer; + uint32 m_uiSummonCloneTimer; + void Reset() override { + m_uiPhase = 1; + m_uiSummonCloneTimer = 0; + m_uiBladeTempestTimer = 15000; + m_uiEnervatingBrandTimer = 14000; + m_uiCleaveTimer = urand(10000, 12000); } void Aggro(Unit* pWho) override @@ -87,7 +122,7 @@ struct MANGOS_DLL_DECL boss_baltharusAI : public ScriptedAI, private DialogueHel { if (!m_bHasDoneIntro && pWho->GetTypeId() == TYPEID_PLAYER && !((Player*)pWho)->isGameMaster()) { - StartNextDialogueText(SAY_HELP); + m_introDialogue.StartNextDialogueText(SAY_HELP); m_bHasDoneIntro = true; } @@ -117,13 +152,142 @@ struct MANGOS_DLL_DECL boss_baltharusAI : public ScriptedAI, private DialogueHel m_pInstance->SetData(TYPE_BALTHARUS, FAIL); } + void JustSummoned(Creature* pSummoned) + { + if (pSummoned->GetEntry() == NPC_BALTHARUS_CLONE) + { + pSummoned->CastSpell(pSummoned, SPELL_SIMPLE_TELEPORT, true); + pSummoned->SetInCombatWithZone(); + } + } + + void SpellHitTarget(Unit* pTarget, SpellEntry const* pSpellEntry) override + { + if (pTarget->GetTypeId() == TYPEID_PLAYER && pSpellEntry->Id == SPELL_ENERVATING_BRAND_PL) + pTarget->CastSpell(m_creature, SPELL_SIPHONED_MIGHT, true); + } + void UpdateAI(const uint32 uiDiff) override { - DialogueUpdate(uiDiff); + m_introDialogue.DialogueUpdate(uiDiff); if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; + if (m_creature->GetHealthPercent() < 100 - m_fHealthPercentCheck * m_uiPhase) + { + if (DoCastSpellIfCan(m_creature, SPELL_REPELLING_WAVE, CAST_INTERRUPT_PREVIOUS) == CAST_OK) + { + m_uiSummonCloneTimer = 3000; + ++m_uiPhase; + } + } + + if (m_uiSummonCloneTimer) + { + if (m_uiSummonCloneTimer <= uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_SUMMON_CLONE) == CAST_OK) + { + DoScriptText(SAY_SPLIT, m_creature); + m_uiSummonCloneTimer = 0; + } + } + else + m_uiSummonCloneTimer -= uiDiff; + + // no other actions + return; + } + + if (m_uiBladeTempestTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_BLADE_TEMPEST) == CAST_OK) + m_uiBladeTempestTimer = 22000; + } + else + m_uiBladeTempestTimer -= uiDiff; + + if (m_uiEnervatingBrandTimer < uiDiff) + { + if (Unit *pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, SPELL_ENERVATING_BRAND) == CAST_OK) + m_uiEnervatingBrandTimer = 25000; + } + } + else + m_uiEnervatingBrandTimer -= uiDiff; + + if (m_uiCleaveTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_CLEAVE) == CAST_OK) + m_uiCleaveTimer = urand(17000, 20000); + } + else + m_uiCleaveTimer -= uiDiff; + + DoMeleeAttackIfReady(); + } +}; + +/*###### +## npc_baltharus_clone +######*/ + +struct MANGOS_DLL_DECL npc_baltharus_cloneAI : public ScriptedAI +{ + npc_baltharus_cloneAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } + + uint32 m_uiBladeTempestTimer; + uint32 m_uiEnervatingBrandTimer; + uint32 m_uiCleaveTimer; + + void Reset() override + { + m_uiBladeTempestTimer = 15000; + m_uiEnervatingBrandTimer = 14000; + m_uiCleaveTimer = urand(10000, 12000); + } + + void SpellHitTarget(Unit* pTarget, SpellEntry const* pSpellEntry) override + { + if (pTarget->GetTypeId() == TYPEID_PLAYER && pSpellEntry->Id == SPELL_ENERVATING_BRAND_PL) + pTarget->CastSpell(m_creature, SPELL_SIPHONED_MIGHT, true); + } + + void UpdateAI(const uint32 uiDiff) override + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_uiBladeTempestTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_BLADE_TEMPEST) == CAST_OK) + m_uiBladeTempestTimer = 22000; + } + else + m_uiBladeTempestTimer -= uiDiff; + + if (m_uiEnervatingBrandTimer < uiDiff) + { + if (Unit *pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, SPELL_ENERVATING_BRAND) == CAST_OK) + m_uiEnervatingBrandTimer = 25000; + } + } + else + m_uiEnervatingBrandTimer -= uiDiff; + + if (m_uiCleaveTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_CLEAVE) == CAST_OK) + m_uiCleaveTimer = urand(17000, 20000); + } + else + m_uiCleaveTimer -= uiDiff; + DoMeleeAttackIfReady(); } }; @@ -133,6 +297,11 @@ CreatureAI* GetAI_boss_baltharus(Creature* pCreature) return new boss_baltharusAI(pCreature); } +CreatureAI* GetAI_npc_baltharus_clone(Creature* pCreature) +{ + return new npc_baltharus_cloneAI(pCreature); +} + void AddSC_boss_baltharus() { Script* pNewScript; @@ -141,4 +310,9 @@ void AddSC_boss_baltharus() pNewScript->Name = "boss_baltharus"; pNewScript->GetAI = &GetAI_boss_baltharus; pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_baltharus_clone"; + pNewScript->GetAI = &GetAI_npc_baltharus_clone; + pNewScript->RegisterSelf(); } diff --git a/scripts/northrend/ruby_sanctum/instance_ruby_sanctum.cpp b/scripts/northrend/ruby_sanctum/instance_ruby_sanctum.cpp index 381f98eb2..cd6ea2358 100644 --- a/scripts/northrend/ruby_sanctum/instance_ruby_sanctum.cpp +++ b/scripts/northrend/ruby_sanctum/instance_ruby_sanctum.cpp @@ -122,6 +122,10 @@ void instance_ruby_sanctum::SetData(uint32 uiType, uint32 uiData) { DoHandleZarithrianDoor(); DoUseDoorOrButton(GO_FIRE_FIELD); + + // Start outro event by DB script + if (Creature* pXerestrasza = GetSingleCreatureFromStorage(NPC_XERESTRASZA)) + pXerestrasza->GetMotionMaster()->MoveWaypoint(); } break; case TYPE_ZARITHRIAN: diff --git a/scripts/northrend/ruby_sanctum/ruby_sanctum.h b/scripts/northrend/ruby_sanctum/ruby_sanctum.h index 850836187..4b1e56576 100644 --- a/scripts/northrend/ruby_sanctum/ruby_sanctum.h +++ b/scripts/northrend/ruby_sanctum/ruby_sanctum.h @@ -74,6 +74,10 @@ class MANGOS_DLL_DECL instance_ruby_sanctum : public ScriptedInstance const char* Save() const override { return strInstData.c_str(); } void Load(const char* chrIn) override; + // Difficulty wrappers + bool IsHeroicDifficulty() { return instance->GetDifficulty() == RAID_DIFFICULTY_10MAN_HEROIC || instance->GetDifficulty() == RAID_DIFFICULTY_25MAN_HEROIC; } + bool Is25ManDifficulty() { return instance->GetDifficulty() == RAID_DIFFICULTY_25MAN_NORMAL || instance->GetDifficulty() == RAID_DIFFICULTY_25MAN_HEROIC; } + protected: void DoHandleZarithrianDoor(); diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 88f7a68fd..91a58e32d 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2789" + #define SD2_REVISION_NR "2790" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 88f2dece8..5899cea4b 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -911,6 +911,7 @@ UPDATE instance_template SET ScriptName='instance_ruby_sanctum' WHERE map=724; UPDATE creature_template SET ScriptName='boss_baltharus' WHERE entry=39751; UPDATE creature_template SET ScriptName='boss_saviana' WHERE entry=39747; UPDATE creature_template SET ScriptName='boss_zarithrian' WHERE entry=39746; +UPDATE creature_template SET ScriptName='npc_baltharus_clone' WHERE entry=39899; /* RUINS OF AHN'QIRAJ */ UPDATE instance_template SET ScriptName='instance_ruins_of_ahnqiraj' WHERE map=509; diff --git a/sql/updates/r2790_mangos.sql b/sql/updates/r2790_mangos.sql new file mode 100644 index 000000000..bb68773d4 --- /dev/null +++ b/sql/updates/r2790_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_baltharus_clone' WHERE entry=39899; From 3048264b96cbeb0e45f873b51427397bdd4e2e0e Mon Sep 17 00:00:00 2001 From: Xfurry Date: Fri, 22 Feb 2013 23:24:54 +0200 Subject: [PATCH 0788/1172] [2791] Add script support for Saviana - Ruby Sanctum --- .../northrend/ruby_sanctum/boss_saviana.cpp | 125 +++++++++++++++++- sd2_revision_nr.h | 2 +- 2 files changed, 123 insertions(+), 4 deletions(-) diff --git a/scripts/northrend/ruby_sanctum/boss_saviana.cpp b/scripts/northrend/ruby_sanctum/boss_saviana.cpp index 8dfbaab4b..41c6f915b 100644 --- a/scripts/northrend/ruby_sanctum/boss_saviana.cpp +++ b/scripts/northrend/ruby_sanctum/boss_saviana.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: boss_saviana -SD%Complete: 20 -SDComment: only yells +SD%Complete: 100 +SDComment: Timers SDCategory: Ruby Sanctum EndScriptData */ @@ -31,8 +31,23 @@ enum SAY_SLAY_2 = -1724017, SAY_SPECIAL = -1724018, SOUND_DEATH = 17531, // On death it has only a screaming sound + + SPELL_ENRAGE = 78722, + SPELL_FLAME_BREATH = 74403, + SPELL_CONFLAGRATION_TARGET = 74452, // sets target for 74453 + //SPELL_FLAME_BEACON = 74453, + //SPELL_CONFLAGRATION_DUMMY = 74454, // unk effect + + PHASE_GROUND = 1, + PHASE_AIR = 2, + PHASE_TRANSITION = 3, + + POINT_AIR = 1, + POINT_GROUND = 2 }; +static const float aAirPositions[3] = {3155.51f, 683.844f, 90.50f}; + struct MANGOS_DLL_DECL boss_savianaAI : public ScriptedAI { boss_savianaAI(Creature* pCreature) : ScriptedAI(pCreature) @@ -43,8 +58,17 @@ struct MANGOS_DLL_DECL boss_savianaAI : public ScriptedAI instance_ruby_sanctum* m_pInstance; + uint8 m_uiPhase; + uint32 m_uiPhaseSwitchTimer; + uint32 m_uiFlameBreathTimer; + uint32 m_uiEnrageTimer; + void Reset() override { + m_uiPhase = PHASE_GROUND; + m_uiPhaseSwitchTimer = 28000; + m_uiEnrageTimer = urand(10000, 15000); + m_uiFlameBreathTimer = 10000; } void Aggro(Unit* pWho) override @@ -74,16 +98,111 @@ struct MANGOS_DLL_DECL boss_savianaAI : public ScriptedAI void JustReachedHome() override { + SetCombatMovement(true); + m_creature->SetLevitate(false); + m_creature->SetByteFlag(UNIT_FIELD_BYTES_1, 3, 0); + if (m_pInstance) m_pInstance->SetData(TYPE_SAVIANA, FAIL); } + void MovementInform(uint32 uiMoveType, uint32 uiPointId) override + { + if (uiMoveType != POINT_MOTION_TYPE) + return; + + switch (uiPointId) + { + case POINT_AIR: + if (DoCastSpellIfCan(m_creature, SPELL_CONFLAGRATION_TARGET) == CAST_OK) + { + m_uiPhaseSwitchTimer = 6000; + m_uiPhase = PHASE_AIR; + } + + break; + case POINT_GROUND: + m_uiPhase = PHASE_GROUND; + m_uiPhaseSwitchTimer = 38000; + + SetCombatMovement(true); + m_creature->SetLevitate(false); + m_creature->SetByteFlag(UNIT_FIELD_BYTES_1, 3, 0); + + if (m_creature->getVictim()) + m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); + + break; + } + } + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - DoMeleeAttackIfReady(); + switch (m_uiPhase) + { + case PHASE_GROUND: + + if (m_uiFlameBreathTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_FLAME_BREATH) == CAST_OK) + m_uiFlameBreathTimer = urand(20000, 25000); + } + else + m_uiFlameBreathTimer -= uiDiff; + + if (m_uiEnrageTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_ENRAGE) == CAST_OK) + { + DoScriptText(SAY_SPECIAL, m_creature); + m_uiEnrageTimer = urand(20000, 25000); + } + } + else + m_uiEnrageTimer -= uiDiff; + + if (m_uiPhaseSwitchTimer < uiDiff) + { + m_uiPhaseSwitchTimer = 0; + m_uiPhase = PHASE_TRANSITION; + + SetCombatMovement(false); + m_creature->SetByteValue(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_UNK_2); + m_creature->SetLevitate(true); + + m_creature->GetMotionMaster()->Clear(); + m_creature->GetMotionMaster()->MovePoint(POINT_AIR, aAirPositions[0], aAirPositions[1], aAirPositions[2]); + } + else + m_uiPhaseSwitchTimer -= uiDiff; + + DoMeleeAttackIfReady(); + + break; + case PHASE_AIR: + if (m_uiPhaseSwitchTimer) + { + if (m_uiPhaseSwitchTimer <= uiDiff) + { + m_uiPhase = PHASE_TRANSITION; + m_uiPhaseSwitchTimer = 0; + + float fX, fY, fZ; + m_creature->GetRespawnCoord(fX, fY, fZ); + m_creature->GetMotionMaster()->Clear(); + m_creature->GetMotionMaster()->MovePoint(POINT_GROUND, fX, fY, fZ); + } + else + m_uiPhaseSwitchTimer -= uiDiff; + } + break; + case PHASE_TRANSITION: + // nothing here + break; + } } }; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 91a58e32d..363bbee7c 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2790" + #define SD2_REVISION_NR "2791" #endif // __SD2_REVISION_NR_H__ From 9c793f060a3e08d198a4ad2d073bdecd971962d6 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sat, 23 Feb 2013 12:56:04 +0200 Subject: [PATCH 0789/1172] [2792] Add script support for Zarithrian - Ruby Sanctum --- include/sc_creature.cpp | 7 +- .../ruby_sanctum/boss_zarithrian.cpp | 64 ++++++++++++++++++- .../ruby_sanctum/instance_ruby_sanctum.cpp | 13 ++++ scripts/northrend/ruby_sanctum/ruby_sanctum.h | 4 ++ sd2_revision_nr.h | 2 +- 5 files changed, 86 insertions(+), 4 deletions(-) diff --git a/include/sc_creature.cpp b/include/sc_creature.cpp index 512a86063..b672fbecd 100644 --- a/include/sc_creature.cpp +++ b/include/sc_creature.cpp @@ -504,7 +504,8 @@ enum NPC_TALON_KING_IKISS = 18473, NPC_KARGATH_BLADEFIST = 16808, NPC_ANUBARAK = 29120, - NPC_SINDRAGOSA = 36853 + NPC_SINDRAGOSA = 36853, + NPC_ZARITHRIAN = 39746, }; bool ScriptedAI::EnterEvadeIfOutOfCombatArea(const uint32 uiDiff) @@ -562,6 +563,10 @@ bool ScriptedAI::EnterEvadeIfOutOfCombatArea(const uint32 uiDiff) if (fX > 4314.0f) return false; break; + case NPC_ZARITHRIAN: + if (fZ > 87.0f) + return false; + break; default: script_error_log("EnterEvadeIfOutOfCombatArea used for creature entry %u, but does not have any definition.", m_creature->GetEntry()); return false; diff --git a/scripts/northrend/ruby_sanctum/boss_zarithrian.cpp b/scripts/northrend/ruby_sanctum/boss_zarithrian.cpp index 4911ab996..f9caa3892 100644 --- a/scripts/northrend/ruby_sanctum/boss_zarithrian.cpp +++ b/scripts/northrend/ruby_sanctum/boss_zarithrian.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: boss_zarithrian -SD%Complete: 20 -SDComment: only texts +SD%Complete: 100 +SDComment: SDCategory: Ruby Sanctum EndScriptData */ @@ -31,6 +31,12 @@ enum SAY_SLAY_2 = -1724021, SAY_DEATH = -1724022, SAY_SUMMON = -1724023, + + SPELL_SUMMON_FLAMECALLER = 74398, + SPELL_CLEAVE_ARMOR = 74367, + SPELL_INTIMIDATING_ROAR = 74384, + + NPC_ONYX_FLAMECALLER = 39814, // handled in ACID }; struct MANGOS_DLL_DECL boss_zarithrianAI : public ScriptedAI @@ -43,8 +49,15 @@ struct MANGOS_DLL_DECL boss_zarithrianAI : public ScriptedAI instance_ruby_sanctum* m_pInstance; + uint32 m_uiCleaveArmorTimer; + uint32 m_uiIntimidatingRoarTimer; + uint32 m_uiCallFlamecallerTimer; + void Reset() override { + m_uiCleaveArmorTimer = 15000; + m_uiIntimidatingRoarTimer = 14000; + m_uiCallFlamecallerTimer = 15000; } void Aggro(Unit* pWho) override @@ -78,12 +91,59 @@ struct MANGOS_DLL_DECL boss_zarithrianAI : public ScriptedAI m_pInstance->SetData(TYPE_ZARITHRIAN, FAIL); } + void JustSummoned(Creature* pSummoned) override + { + if (pSummoned->GetEntry() == NPC_ONYX_FLAMECALLER) + pSummoned->SetInCombatWithZone(); + } + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; + if (m_uiCleaveArmorTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_CLEAVE_ARMOR) == CAST_OK) + m_uiCleaveArmorTimer = 15000; + } + else + m_uiCleaveArmorTimer -= uiDiff; + + if (m_uiIntimidatingRoarTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_INTIMIDATING_ROAR) == CAST_OK) + m_uiIntimidatingRoarTimer = 32000; + } + else + m_uiIntimidatingRoarTimer -= uiDiff; + + if (m_uiCallFlamecallerTimer < uiDiff) + { + if (!m_pInstance) + { + script_error_log("Instance Ruby Sanctum: ERROR Failed to load instance data for this instace."); + return; + } + + GuidList m_lStalkersGuidList; + m_pInstance->GetSpawnStalkersGuidList(m_lStalkersGuidList); + + for (GuidList::const_iterator itr = m_lStalkersGuidList.begin(); itr != m_lStalkersGuidList.end(); ++itr) + { + if (Creature* pStalker = m_creature->GetMap()->GetCreature(*itr)) + pStalker->CastSpell(pStalker, SPELL_SUMMON_FLAMECALLER, true, NULL, NULL, m_creature->GetObjectGuid()); + } + + DoScriptText(SAY_SUMMON, m_creature); + m_uiCallFlamecallerTimer = 45000; + } + else + m_uiCallFlamecallerTimer -= uiDiff; + DoMeleeAttackIfReady(); + + EnterEvadeIfOutOfCombatArea(uiDiff); } }; diff --git a/scripts/northrend/ruby_sanctum/instance_ruby_sanctum.cpp b/scripts/northrend/ruby_sanctum/instance_ruby_sanctum.cpp index cd6ea2358..43da532c0 100644 --- a/scripts/northrend/ruby_sanctum/instance_ruby_sanctum.cpp +++ b/scripts/northrend/ruby_sanctum/instance_ruby_sanctum.cpp @@ -65,11 +65,18 @@ void instance_ruby_sanctum::OnCreatureCreate(Creature* pCreature) { switch (pCreature->GetEntry()) { + case NPC_ZARITHRIAN: + if (m_auiEncounter[TYPE_SAVIANA] == DONE && m_auiEncounter[TYPE_BALTHARUS] == DONE) + pCreature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + // no break; case NPC_BALTHARUS: case NPC_XERESTRASZA: case NPC_HALION_CONTROLLER: m_mNpcEntryGuidStore[pCreature->GetEntry()] = pCreature->GetObjectGuid(); break; + case NPC_ZARITHRIAN_SPAWN_STALKER: + m_lSpawnStalkersGuidList.push_back(pCreature->GetObjectGuid()); + break; } } @@ -104,7 +111,13 @@ void instance_ruby_sanctum::OnObjectCreate(GameObject* pGo) void instance_ruby_sanctum::DoHandleZarithrianDoor() { if (m_auiEncounter[TYPE_SAVIANA] == DONE && m_auiEncounter[TYPE_BALTHARUS] == DONE) + { DoUseDoorOrButton(GO_FLAME_WALLS); + + // Also remove not_selectable unit flag + if (Creature* pZarithrian = GetSingleCreatureFromStorage(NPC_ZARITHRIAN)) + pZarithrian->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + } } void instance_ruby_sanctum::SetData(uint32 uiType, uint32 uiData) diff --git a/scripts/northrend/ruby_sanctum/ruby_sanctum.h b/scripts/northrend/ruby_sanctum/ruby_sanctum.h index 4b1e56576..15d962c54 100644 --- a/scripts/northrend/ruby_sanctum/ruby_sanctum.h +++ b/scripts/northrend/ruby_sanctum/ruby_sanctum.h @@ -71,6 +71,8 @@ class MANGOS_DLL_DECL instance_ruby_sanctum : public ScriptedInstance void Update(uint32 uiDiff) override; + void GetSpawnStalkersGuidList(GuidList& lList) { lList = m_lSpawnStalkersGuidList; } + const char* Save() const override { return strInstData.c_str(); } void Load(const char* chrIn) override; @@ -86,6 +88,8 @@ class MANGOS_DLL_DECL instance_ruby_sanctum : public ScriptedInstance uint32 m_uiHalionSummonTimer; uint32 m_uiHalionSummonStage; + + GuidList m_lSpawnStalkersGuidList; }; #endif diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 363bbee7c..de7a00861 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2791" + #define SD2_REVISION_NR "2792" #endif // __SD2_REVISION_NR_H__ From c822c6f557137c004c0fba300931e352ce802d4e Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sat, 23 Feb 2013 12:56:43 +0200 Subject: [PATCH 0790/1172] [2793] Add missing instance data check for Pyroguard Emberseer --- .../blackrock_spire/boss_pyroguard_emberseer.cpp | 6 ++++++ sd2_revision_nr.h | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/scripts/eastern_kingdoms/blackrock_spire/boss_pyroguard_emberseer.cpp b/scripts/eastern_kingdoms/blackrock_spire/boss_pyroguard_emberseer.cpp index 125b05227..5d7451caa 100644 --- a/scripts/eastern_kingdoms/blackrock_spire/boss_pyroguard_emberseer.cpp +++ b/scripts/eastern_kingdoms/blackrock_spire/boss_pyroguard_emberseer.cpp @@ -125,6 +125,12 @@ struct MANGOS_DLL_DECL boss_pyroguard_emberseerAI : public ScriptedAI { if (m_uiEncageTimer <= uiDiff) { + if (!m_pInstance) + { + script_error_log("Instance Blackrock Spire: ERROR Failed to load instance data for this instace."); + return; + } + GuidList m_lIncarceratorsGuid; m_pInstance->GetIncarceratorGUIDList(m_lIncarceratorsGuid); diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index de7a00861..f709f79bc 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2792" + #define SD2_REVISION_NR "2793" #endif // __SD2_REVISION_NR_H__ From bd3a0e0575319088090072feb6f14e0033c05398 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sat, 23 Feb 2013 15:47:57 +0200 Subject: [PATCH 0791/1172] [2794] Imporve [2791] Thanks rsa for pointing --- scripts/northrend/ruby_sanctum/boss_saviana.cpp | 12 ++++++------ sd2_revision_nr.h | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/scripts/northrend/ruby_sanctum/boss_saviana.cpp b/scripts/northrend/ruby_sanctum/boss_saviana.cpp index 41c6f915b..554b476ee 100644 --- a/scripts/northrend/ruby_sanctum/boss_saviana.cpp +++ b/scripts/northrend/ruby_sanctum/boss_saviana.cpp @@ -17,7 +17,7 @@ /* ScriptData SDName: boss_saviana SD%Complete: 100 -SDComment: Timers +SDComment: SDCategory: Ruby Sanctum EndScriptData */ @@ -31,12 +31,11 @@ enum SAY_SLAY_2 = -1724017, SAY_SPECIAL = -1724018, SOUND_DEATH = 17531, // On death it has only a screaming sound + EMOTE_ENRAGE = -1000003, SPELL_ENRAGE = 78722, SPELL_FLAME_BREATH = 74403, - SPELL_CONFLAGRATION_TARGET = 74452, // sets target for 74453 - //SPELL_FLAME_BEACON = 74453, - //SPELL_CONFLAGRATION_DUMMY = 74454, // unk effect + SPELL_CONFLAGRATION = 74452, // dummy targeting spell - effect handled in core PHASE_GROUND = 1, PHASE_AIR = 2, @@ -114,8 +113,9 @@ struct MANGOS_DLL_DECL boss_savianaAI : public ScriptedAI switch (uiPointId) { case POINT_AIR: - if (DoCastSpellIfCan(m_creature, SPELL_CONFLAGRATION_TARGET) == CAST_OK) + if (DoCastSpellIfCan(m_creature, SPELL_CONFLAGRATION) == CAST_OK) { + DoScriptText(SAY_SPECIAL, m_creature); m_uiPhaseSwitchTimer = 6000; m_uiPhase = PHASE_AIR; } @@ -157,7 +157,7 @@ struct MANGOS_DLL_DECL boss_savianaAI : public ScriptedAI { if (DoCastSpellIfCan(m_creature, SPELL_ENRAGE) == CAST_OK) { - DoScriptText(SAY_SPECIAL, m_creature); + DoScriptText(EMOTE_ENRAGE, m_creature); m_uiEnrageTimer = urand(20000, 25000); } } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index f709f79bc..5564484ff 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2793" + #define SD2_REVISION_NR "2794" #endif // __SD2_REVISION_NR_H__ From 5627f8ca29f5fc5a25daf3e5a8c9bec91609dc8d Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sun, 24 Feb 2013 00:48:09 +0200 Subject: [PATCH 0792/1172] [2795] Add support for VS2012 --- VC110/110ScriptDev2.vcxproj | 792 +++++++++++ VC110/110ScriptDev2.vcxproj.filters | 1904 +++++++++++++++++++++++++++ scriptVC110.sln | 25 + sd2_revision_nr.h | 2 +- 4 files changed, 2722 insertions(+), 1 deletion(-) create mode 100644 VC110/110ScriptDev2.vcxproj create mode 100644 VC110/110ScriptDev2.vcxproj.filters create mode 100644 scriptVC110.sln diff --git a/VC110/110ScriptDev2.vcxproj b/VC110/110ScriptDev2.vcxproj new file mode 100644 index 000000000..294ff4d5c --- /dev/null +++ b/VC110/110ScriptDev2.vcxproj @@ -0,0 +1,792 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + ScriptDev2 + {4295C8A9-79B7-4354-8064-F05FB9CA0C96} + ScriptDev2 + Win32Proj + + + + DynamicLibrary + MultiByte + v110 + + + DynamicLibrary + MultiByte + v110 + + + DynamicLibrary + MultiByte + v110 + + + DynamicLibrary + MultiByte + v110 + + + + + + + + + + + + + + + + + + + + + + + ..\..\..\..\bin\win32_debug\ + .\ScriptDev2__$(Platform)_$(Configuration)\ + true + ..\..\..\..\bin\x64_debug\ + .\ScriptDev2__$(Platform)_$(Configuration)\ + true + ..\..\..\..\bin\win32_release\ + .\ScriptDev2__$(Platform)_$(Configuration)\ + false + ..\..\..\..\bin\x64_release\ + .\ScriptDev2__$(Platform)_$(Configuration)\ + false + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + mangosscript + mangosscript + mangosscript + mangosscript + + + + Disabled + ..\..\..\..\dep\include\;..\..\..\shared\;..\..\..\framework\;..\..\..\game\;..\include\;..\base\;..\..\..\..\dep\ACE_wrappers\;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;MANGOS_DEBUG;_WINDOWS;_USRDLL;SCRIPT;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Use + precompiled.h + Level3 + ProgramDatabase + true + true + true + /Zm200 %(AdditionalOptions) + + + mangosd.lib;ACEd.lib;framework.lib;%(AdditionalDependencies) + ..\..\..\..\win\VC110\mangosd__Win32_Debug;..\..\..\..\win\VC110\framework__Win32_Debug;..\..\..\..\dep\lib\win32_debug\;%(AdditionalLibraryDirectories) + true + Windows + false + + + $(OutDir)mangosscript.lib + MachineX86 + + + + + X64 + + + Disabled + ..\..\..\..\dep\include\;..\..\..\shared\;..\..\..\framework\;..\..\..\game\;..\include\;..\base\;..\..\..\..\dep\ACE_wrappers\;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;MANGOS_DEBUG;_WINDOWS;_USRDLL;SCRIPT;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Use + precompiled.h + Level3 + ProgramDatabase + true + true + true + /Zm200 %(AdditionalOptions) + + + mangosd.lib;ACEd.lib;framework.lib;%(AdditionalDependencies) + ..\..\..\..\win\VC110\mangosd__x64_Debug;..\..\..\..\win\VC110\framework__x64_Debug;..\..\..\..\dep\lib\x64_Debug\;%(AdditionalLibraryDirectories) + true + Windows + false + + + $(OutDir)mangosscript.lib + MachineX64 + + + + + /Zm200 %(AdditionalOptions) + ..\..\..\..\dep\include\;..\..\..\shared\;..\..\..\framework\;..\..\..\game\;..\include\;..\base\;..\..\..\..\dep\ACE_wrappers\;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;_USRDLL;SCRIPT;_SECURE_SCL=0;%(PreprocessorDefinitions) + false + MultiThreadedDLL + Use + precompiled.h + Level3 + ProgramDatabase + true + true + true + + + mangosd.lib;ACE.lib;framework.lib;%(AdditionalDependencies) + ..\..\..\..\win\VC110\mangosd__Win32_Release;..\..\..\..\win\VC110\framework__Win32_Release;..\..\..\..\dep\lib\win32_release\;%(AdditionalLibraryDirectories) + true + Windows + true + true + false + + + $(OutDir)mangosscript.lib + + + + + X64 + + + /Zm200 %(AdditionalOptions) + ..\..\..\..\dep\include\;..\..\..\shared\;..\..\..\framework\;..\..\..\game\;..\include\;..\base\;..\..\..\..\dep\ACE_wrappers\;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;_USRDLL;SCRIPT;_SECURE_SCL=0;%(PreprocessorDefinitions) + MultiThreadedDLL + Use + precompiled.h + Level3 + ProgramDatabase + true + true + true + + + mangosd.lib;ACE.lib;framework.lib;%(AdditionalDependencies) + ..\..\..\..\win\VC110\mangosd__x64_Release;..\..\..\..\win\VC110\framework__x64_Release;..\..\..\..\dep\lib\x64_release\;%(AdditionalLibraryDirectories) + true + Windows + true + true + false + + + $(OutDir)mangosscript.lib + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Create + Create + Create + Create + + + + + + NotUsing + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Extracting revision + cd "$(SolutionDir)" +"$(SolutionDir)..\..\..\win\VC110\genrevision__Win32_$(Configuration)\genrevision.exe" + + .svn/entries;%(AdditionalInputs) + revision.h;%(Outputs) + Extracting revision + cd "$(SolutionDir)" +"$(SolutionDir)..\..\..\win\VC110\genrevision__Win32_$(Configuration)\genrevision.exe" + + .svn/entries;%(AdditionalInputs) + revision.h;%(Outputs) + Extracting revision + cd "$(SolutionDir)" +"$(SolutionDir)..\..\..\win\VC110\genrevision__Win32_$(Configuration)\genrevision.exe" + + .svn/entries;%(AdditionalInputs) + revision.h;%(Outputs) + Extracting revision + cd "$(SolutionDir)" +"$(SolutionDir)..\..\..\win\VC110\genrevision__Win32_$(Configuration)\genrevision.exe" + + .svn/entries;%(AdditionalInputs) + revision.h;%(Outputs) + + + + + + + + + \ No newline at end of file diff --git a/VC110/110ScriptDev2.vcxproj.filters b/VC110/110ScriptDev2.vcxproj.filters new file mode 100644 index 000000000..0b6e58044 --- /dev/null +++ b/VC110/110ScriptDev2.vcxproj.filters @@ -0,0 +1,1904 @@ + + + + + {3b1307a9-bc58-4773-9a93-0e9ceff55c82} + + + {b7b35df3-4231-4370-aed5-5859ab4c312e} + + + {ced0a1e2-6867-4f01-a762-390a3d1f01d3} + + + {af3d4b4d-a585-41c4-ba95-79669a614ea8} + + + {ca2551e0-68d0-4331-88f3-ab0cdaa2bf9a} + + + {45c59280-02fb-482f-859b-bd47cc230f0f} + + + {5631f38e-66c8-4efd-ad3a-2834fbb49a6e} + + + {31605090-12b9-4d42-a5e9-1cbfac8ab384} + + + {08fb5b22-710d-46d6-9893-f567aa75a5e6} + + + {cef5c3c5-f434-4b9f-9bad-8c106d46c755} + + + {66bc2cec-8372-4191-991c-1c23275fa13c} + + + {af465469-5a16-4908-aa08-39c77d02cd88} + + + {920d1832-b347-4afd-bd05-4c943e5555f0} + + + {6ffd42e5-ac49-4635-8087-77ad2b7b0866} + + + {dd4995a8-6d86-4f21-82bc-a18acc2c688f} + + + {2a3a25e5-51f1-4ab3-a1a0-1b9ec9c45d1a} + + + {7a028ad9-afa1-42ea-b147-20a40c5e716c} + + + {66401dac-d94c-4ed6-b912-229dda0906d6} + + + {385f26dc-dcaf-4022-921d-3a562617bf93} + + + {25be39dd-536d-450d-ac94-6372d37a4fae} + + + {1d718eaa-2a8d-4cb9-9abf-17fcf0d91f83} + + + {c929f54b-22dd-49b4-862c-92dfa9a2d1f7} + + + {60b91cfe-7dff-40de-9957-41f8d03144cc} + + + {22eca3e6-662f-4c53-9344-6e749c09c86b} + + + {070541ef-a813-43f5-a8a6-e6674fe1a47e} + + + {5cda7bda-399b-46b7-8bc2-5786f0202fa2} + + + {226d4dc8-830b-4249-b28a-313ac21080a9} + + + {404b30fd-bdaa-44d1-ab3a-384886ebb8ec} + + + {5833dbce-1fa8-49eb-b678-145a2d58a067} + + + {dc38d3fe-d1fe-49f2-bd8f-758cd270dd62} + + + {2552ab59-1f73-4778-a6db-6f03e405622d} + + + {8206776b-4d43-431d-bca5-5f6cff157ea4} + + + {02135a7c-33cc-444e-af90-48a5193e5a6f} + + + {014ada9a-13bf-4540-a0ce-5132bdc36fcf} + + + {9feb59d0-e6bd-4328-9a50-7ddb9852936e} + + + {00f03f8d-4af1-40d9-a95a-e2dc1a81ca7d} + + + {de2e959a-1ef4-41ef-9235-15a1f3f8a19d} + + + {8f8a60e0-223e-4517-918c-243e523a7892} + + + {416ccfc8-a1bb-43a5-b202-d7656981094a} + + + {ba031a13-787e-41da-bcaf-1986fdea8069} + + + {0412262e-b05b-4827-adef-97507204cb69} + + + {e775610e-fa3c-4355-9c4c-473a6a5e57d5} + + + {6c5f7fd4-671b-4cba-aa95-7758b93dc844} + + + {71e87e58-3b30-41e7-8f8a-16886508a4d9} + + + {3cf8e088-da94-4561-993f-2970908d6642} + + + {bc0156b2-6544-4ebc-9ed6-fe45ac1902a4} + + + {b59c73a8-c480-43b2-8a2e-65f5a54978eb} + + + {5eb6a84a-97e6-477e-97e3-23681f29f675} + + + {d7e0e45a-fd89-48a6-8d24-f4922058160e} + + + {71617682-fe62-4d7c-a2de-7181fb3f46f6} + + + {9c5d9a0f-8967-4cf6-a047-3b724f81dc29} + + + {42501e94-f91e-40be-a02a-472b5ca1e22c} + + + {aac6b8be-6055-4d7d-a50a-41650b8d464e} + + + {e7ee3113-f4d0-4e28-acc7-dc80f42d41df} + + + {e603d4b3-3c2f-4011-aa2b-040243163d3f} + + + {36c79ad7-420c-4909-8da3-c90d3cc83b31} + + + {d47410b0-3184-40e2-8704-cea9b97e20ed} + + + {1b2f0d99-82b0-4a96-aaac-c485830eb1b3} + + + {fd594031-4dc2-40de-b37b-93063ee6e3e9} + + + {ef27a557-e12d-4b02-9e86-c258329f201e} + + + {b7e4ad7d-8515-4981-ae27-9e542c223618} + + + {04b1d59c-38b6-4b5c-a50d-b9ff1d39bb30} + + + {ee364414-732a-4aad-820f-a5b73cb8b093} + + + {638d5426-652e-4d1f-9abe-3ed95d7e7e69} + + + {a21893a5-0f34-4a73-b0aa-49b175822834} + + + {728148f8-18a0-4606-a2ec-2c9eae4e5e7e} + + + {88c327d5-0768-465f-b954-30eca0d31f45} + + + {b20efa19-1e16-42e4-bc29-a9c8e282d17c} + + + {fec1fbfa-5119-4bb0-98bc-f8d4583521f7} + + + {1cb43523-dc33-4c49-a5b7-6e700fe0ecd6} + + + {7289cc07-6956-4b09-8dc5-753c82abe8c9} + + + {e834cf7b-88ad-4bae-9fc8-8e027136c63b} + + + {cfb08e82-63e6-49ca-bff2-533f8647797b} + + + {2be3084e-c5c0-4e2f-bbb4-2ebb22bfff19} + + + {6dc08e92-3e86-4a7f-bab9-9a8cec6a201b} + + + {01da56d1-ee04-455c-846c-4e53869314f6} + + + {5e79ca74-cd29-47ff-a08e-3fada858ddd7} + + + {32b92545-4821-4cc8-ae39-f631b0176d46} + + + {044e4dbc-e2fc-437c-b359-b6fb5a3439ff} + + + {4cbcf193-4d98-4518-a9c4-6c8b4bedbf44} + + + {5c32221e-3532-4c32-bdba-9a85213006af} + + + {2df99085-aee2-4202-b4d1-38a5cc35f3e2} + + + {0a109c31-6dd3-4030-8d6c-6c0e147481be} + + + {ddada980-2eed-4f2b-a9f7-dbb9cca7ca3d} + + + {d6843352-6425-48da-85b6-6b26f6217ba8} + + + {6a68396b-343f-4c79-938c-93741acdeb41} + + + {974fc97c-e585-442c-b35e-b21a17804619} + + + {ba709b56-d5db-4730-9591-79b8f9788ca1} + + + {1fa90250-9c5b-450c-be64-d9eee910c4a8} + + + {7b3c1c18-03e9-493e-a364-5beb1a6936eb} + + + {575420cc-581f-4d08-a9da-7814f221ab47} + + + {9c5997ee-accc-4737-815f-b031d422577b} + + + {579f2f5c-acf1-410a-bce6-d353d6912546} + + + {04e4571d-55ee-4f2e-ac4e-46fc2610341f} + + + {79a3e62b-bd96-4d16-8c23-bda17f968d19} + + + {ca7213e9-56c1-4084-a48b-19ff57dee433} + + + {2fd46769-c050-4e47-9533-461ef8695d6a} + + + {90f3df6a-a1d0-4a6e-b8d7-d1d993fc795b} + + + {e35abead-2389-4eb9-88bd-70e6fe5636b5} + + + + + base + + + base + + + base + + + base + + + scripts\battlegrounds + + + scripts\eastern_kingdoms + + + scripts\eastern_kingdoms + + + scripts\eastern_kingdoms + + + scripts\eastern_kingdoms + + + scripts\eastern_kingdoms + + + scripts\eastern_kingdoms + + + scripts\eastern_kingdoms + + + scripts\eastern_kingdoms + + + scripts\eastern_kingdoms + + + scripts\eastern_kingdoms + + + scripts\eastern_kingdoms + + + scripts\eastern_kingdoms + + + scripts\eastern_kingdoms + + + scripts\eastern_kingdoms + + + scripts\eastern_kingdoms + + + scripts\eastern_kingdoms + + + scripts\eastern_kingdoms + + + scripts\eastern_kingdoms + + + scripts\eastern_kingdoms + + + scripts\eastern_kingdoms + + + scripts\eastern_kingdoms + + + scripts\eastern_kingdoms + + + scripts\eastern_kingdoms + + + scripts\eastern_kingdoms + + + scripts\eastern_kingdoms + + + scripts\eastern_kingdoms\blackrock_depths + + + scripts\eastern_kingdoms\blackrock_depths + + + scripts\eastern_kingdoms\blackrock_depths + + + scripts\eastern_kingdoms\blackrock_depths + + + scripts\eastern_kingdoms\blackrock_depths + + + scripts\eastern_kingdoms\blackrock_depths + + + scripts\eastern_kingdoms\blackrock_depths + + + scripts\eastern_kingdoms\blackrock_spire + + + scripts\eastern_kingdoms\blackrock_spire + + + scripts\eastern_kingdoms\blackrock_spire + + + scripts\eastern_kingdoms\blackrock_spire + + + scripts\eastern_kingdoms\blackwing_lair + + + scripts\eastern_kingdoms\blackwing_lair + + + scripts\eastern_kingdoms\blackwing_lair + + + scripts\eastern_kingdoms\blackwing_lair + + + scripts\eastern_kingdoms\blackwing_lair + + + scripts\eastern_kingdoms\blackwing_lair + + + scripts\eastern_kingdoms\blackwing_lair + + + scripts\eastern_kingdoms\blackwing_lair + + + scripts\eastern_kingdoms\blackwing_lair + + + scripts\eastern_kingdoms\blackwing_lair + + + scripts\eastern_kingdoms\deadmines + + + scripts\eastern_kingdoms\deadmines + + + scripts\eastern_kingdoms\deadmines + + + scripts\eastern_kingdoms\gnomeregan + + + scripts\eastern_kingdoms\gnomeregan + + + scripts\eastern_kingdoms\gnomeregan + + + scripts\eastern_kingdoms\karazhan + + + scripts\eastern_kingdoms\karazhan + + + scripts\eastern_kingdoms\karazhan + + + scripts\eastern_kingdoms\karazhan + + + scripts\eastern_kingdoms\karazhan + + + scripts\eastern_kingdoms\karazhan + + + scripts\eastern_kingdoms\karazhan + + + scripts\eastern_kingdoms\karazhan + + + scripts\eastern_kingdoms\karazhan + + + scripts\eastern_kingdoms\karazhan + + + scripts\eastern_kingdoms\karazhan + + + scripts\eastern_kingdoms\karazhan + + + scripts\eastern_kingdoms\karazhan + + + scripts\eastern_kingdoms\magisters_terrace + + + scripts\eastern_kingdoms\magisters_terrace + + + scripts\eastern_kingdoms\magisters_terrace + + + scripts\eastern_kingdoms\magisters_terrace + + + scripts\eastern_kingdoms\magisters_terrace + + + scripts\eastern_kingdoms\magisters_terrace + + + scripts\eastern_kingdoms\molten_core + + + scripts\eastern_kingdoms\molten_core + + + scripts\eastern_kingdoms\molten_core + + + scripts\eastern_kingdoms\molten_core + + + scripts\eastern_kingdoms\molten_core + + + scripts\eastern_kingdoms\molten_core + + + scripts\eastern_kingdoms\molten_core + + + scripts\eastern_kingdoms\molten_core + + + scripts\eastern_kingdoms\molten_core + + + scripts\eastern_kingdoms\molten_core + + + scripts\eastern_kingdoms\molten_core + + + scripts\eastern_kingdoms\molten_core + + + scripts\eastern_kingdoms\scarlet_enclave + + + scripts\eastern_kingdoms\scarlet_enclave + + + scripts\eastern_kingdoms\scarlet_monastery + + + scripts\eastern_kingdoms\scarlet_monastery + + + scripts\eastern_kingdoms\scarlet_monastery + + + scripts\eastern_kingdoms\scarlet_monastery + + + scripts\eastern_kingdoms\scarlet_monastery + + + scripts\eastern_kingdoms\scholomance + + + scripts\eastern_kingdoms\scholomance + + + scripts\eastern_kingdoms\scholomance + + + scripts\eastern_kingdoms\shadowfang_keep + + + scripts\eastern_kingdoms\shadowfang_keep + + + scripts\eastern_kingdoms\shadowfang_keep + + + scripts\eastern_kingdoms\stratholme + + + scripts\eastern_kingdoms\stratholme + + + scripts\eastern_kingdoms\stratholme + + + scripts\eastern_kingdoms\stratholme + + + scripts\eastern_kingdoms\stratholme + + + scripts\eastern_kingdoms\stratholme + + + scripts\eastern_kingdoms\stratholme + + + scripts\eastern_kingdoms\sunken_temple + + + scripts\eastern_kingdoms\sunken_temple + + + scripts\eastern_kingdoms\sunwell_plateau + + + scripts\eastern_kingdoms\sunwell_plateau + + + scripts\eastern_kingdoms\sunwell_plateau + + + scripts\eastern_kingdoms\sunwell_plateau + + + scripts\eastern_kingdoms\sunwell_plateau + + + scripts\eastern_kingdoms\sunwell_plateau + + + scripts\eastern_kingdoms\sunwell_plateau + + + scripts\eastern_kingdoms\uldaman + + + scripts\eastern_kingdoms\uldaman + + + scripts\eastern_kingdoms\uldaman + + + scripts\eastern_kingdoms\zulaman + + + scripts\eastern_kingdoms\zulaman + + + scripts\eastern_kingdoms\zulaman + + + scripts\eastern_kingdoms\zulaman + + + scripts\eastern_kingdoms\zulaman + + + scripts\eastern_kingdoms\zulaman + + + scripts\eastern_kingdoms\zulaman + + + scripts\eastern_kingdoms\zulaman + + + scripts\eastern_kingdoms\zulgurub + + + scripts\eastern_kingdoms\zulgurub + + + scripts\eastern_kingdoms\zulgurub + + + scripts\eastern_kingdoms\zulgurub + + + scripts\eastern_kingdoms\zulgurub + + + scripts\eastern_kingdoms\zulgurub + + + scripts\eastern_kingdoms\zulgurub + + + scripts\eastern_kingdoms\zulgurub + + + scripts\eastern_kingdoms\zulgurub + + + scripts\eastern_kingdoms\zulgurub + + + scripts\eastern_kingdoms\zulgurub + + + scripts\examples + + + scripts\examples + + + scripts\examples + + + scripts\examples + + + scripts\kalimdor + + + scripts\kalimdor + + + scripts\kalimdor + + + scripts\kalimdor + + + scripts\kalimdor + + + scripts\kalimdor + + + scripts\kalimdor + + + scripts\kalimdor + + + scripts\kalimdor + + + scripts\kalimdor + + + scripts\kalimdor + + + scripts\kalimdor + + + scripts\kalimdor + + + scripts\kalimdor + + + scripts\kalimdor + + + scripts\kalimdor + + + scripts\kalimdor + + + scripts\kalimdor + + + scripts\kalimdor + + + scripts\kalimdor + + + scripts\kalimdor + + + scripts\kalimdor + + + scripts\kalimdor + + + scripts\kalimdor\blackfathom_deeps + + + scripts\kalimdor\caverns_of_time\culling_of_stratholme + + + scripts\kalimdor\caverns_of_time\culling_of_stratholme + + + scripts\kalimdor\caverns_of_time\dark_portal + + + scripts\kalimdor\caverns_of_time\dark_portal + + + scripts\kalimdor\caverns_of_time\dark_portal + + + scripts\kalimdor\caverns_of_time\dark_portal + + + scripts\kalimdor\caverns_of_time\dark_portal + + + scripts\kalimdor\caverns_of_time\hyjal + + + scripts\kalimdor\caverns_of_time\hyjal + + + scripts\kalimdor\caverns_of_time\hyjal + + + scripts\kalimdor\caverns_of_time\hyjal + + + scripts\kalimdor\caverns_of_time\old_hillsbrad + + + scripts\kalimdor\caverns_of_time\old_hillsbrad + + + scripts\kalimdor\dire_maul + + + scripts\kalimdor\dire_maul + + + scripts\kalimdor\maraudon + + + scripts\kalimdor\onyxias_lair + + + scripts\kalimdor\onyxias_lair + + + scripts\kalimdor\razorfen_downs + + + scripts\kalimdor\razorfen_kraul + + + scripts\kalimdor\razorfen_kraul + + + scripts\kalimdor\ruins_of_ahnqiraj + + + scripts\kalimdor\ruins_of_ahnqiraj + + + scripts\kalimdor\ruins_of_ahnqiraj + + + scripts\kalimdor\ruins_of_ahnqiraj + + + scripts\kalimdor\ruins_of_ahnqiraj + + + scripts\kalimdor\ruins_of_ahnqiraj + + + scripts\kalimdor\ruins_of_ahnqiraj + + + scripts\kalimdor\ruins_of_ahnqiraj + + + scripts\kalimdor\temple_of_ahnqiraj + + + scripts\kalimdor\temple_of_ahnqiraj + + + scripts\kalimdor\temple_of_ahnqiraj + + + scripts\kalimdor\temple_of_ahnqiraj + + + scripts\kalimdor\temple_of_ahnqiraj + + + scripts\kalimdor\temple_of_ahnqiraj + + + scripts\kalimdor\temple_of_ahnqiraj + + + scripts\kalimdor\temple_of_ahnqiraj + + + scripts\kalimdor\temple_of_ahnqiraj + + + scripts\kalimdor\temple_of_ahnqiraj + + + scripts\kalimdor\temple_of_ahnqiraj + + + scripts\kalimdor\wailing_caverns + + + scripts\kalimdor\wailing_caverns + + + scripts\kalimdor\zulfarrak + + + scripts\kalimdor\zulfarrak + + + scripts\kalimdor\zulfarrak + + + scripts\northrend + + + scripts\northrend + + + scripts\northrend + + + scripts\northrend + + + scripts\northrend + + + scripts\northrend + + + scripts\northrend + + + scripts\northrend + + + scripts\northrend + + + scripts\northrend\azjol-nerub\ahnkahet + + + scripts\northrend\azjol-nerub\ahnkahet + + + scripts\northrend\azjol-nerub\ahnkahet + + + scripts\northrend\azjol-nerub\ahnkahet + + + scripts\northrend\azjol-nerub\ahnkahet + + + scripts\northrend\azjol-nerub\ahnkahet + + + scripts\northrend\azjol-nerub\azjol-nerub + + + scripts\northrend\azjol-nerub\azjol-nerub + + + scripts\northrend\azjol-nerub\azjol-nerub + + + scripts\northrend\azjol-nerub\azjol-nerub + + + scripts\northrend\crusaders_coliseum\trial_of_the_champion + + + scripts\northrend\crusaders_coliseum\trial_of_the_champion + + + scripts\northrend\crusaders_coliseum\trial_of_the_champion + + + scripts\northrend\crusaders_coliseum\trial_of_the_crusader + + + scripts\northrend\crusaders_coliseum\trial_of_the_crusader + + + scripts\northrend\crusaders_coliseum\trial_of_the_crusader + + + scripts\northrend\crusaders_coliseum\trial_of_the_crusader + + + scripts\northrend\crusaders_coliseum\trial_of_the_crusader + + + scripts\northrend\crusaders_coliseum\trial_of_the_crusader + + + scripts\northrend\crusaders_coliseum\trial_of_the_crusader + + + scripts\northrend\draktharon_keep + + + scripts\northrend\draktharon_keep + + + scripts\northrend\draktharon_keep + + + scripts\northrend\draktharon_keep + + + scripts\northrend\gundrak + + + scripts\northrend\gundrak + + + scripts\northrend\gundrak + + + scripts\northrend\gundrak + + + scripts\northrend\gundrak + + + scripts\northrend\gundrak + + + scripts\northrend\naxxramas + + + scripts\northrend\naxxramas + + + scripts\northrend\naxxramas + + + scripts\northrend\naxxramas + + + scripts\northrend\naxxramas + + + scripts\northrend\naxxramas + + + scripts\northrend\naxxramas + + + scripts\northrend\naxxramas + + + scripts\northrend\naxxramas + + + scripts\northrend\naxxramas + + + scripts\northrend\naxxramas + + + scripts\northrend\naxxramas + + + scripts\northrend\naxxramas + + + scripts\northrend\naxxramas + + + scripts\northrend\naxxramas + + + scripts\northrend\naxxramas + + + scripts\northrend\nexus\eye_of_eternity + + + scripts\northrend\nexus\eye_of_eternity + + + scripts\northrend\nexus\nexus + + + scripts\northrend\nexus\nexus + + + scripts\northrend\nexus\nexus + + + scripts\northrend\nexus\nexus + + + scripts\northrend\nexus\nexus + + + scripts\northrend\nexus\oculus + + + scripts\northrend\nexus\oculus + + + scripts\northrend\nexus\oculus + + + scripts\northrend\obsidian_sanctum + + + scripts\northrend\obsidian_sanctum + + + scripts\northrend\ulduar\halls_of_lightning + + + scripts\northrend\ulduar\halls_of_lightning + + + scripts\northrend\ulduar\halls_of_lightning + + + scripts\northrend\ulduar\halls_of_lightning + + + scripts\northrend\ulduar\halls_of_lightning + + + scripts\northrend\ulduar\halls_of_stone + + + scripts\northrend\ulduar\halls_of_stone + + + scripts\northrend\ulduar\halls_of_stone + + + scripts\northrend\ulduar\halls_of_stone + + + scripts\northrend\ulduar\ulduar + + + scripts\northrend\ulduar\ulduar + + + scripts\northrend\ulduar\ulduar + + + scripts\northrend\ulduar\ulduar + + + scripts\northrend\ulduar\ulduar + + + scripts\northrend\ulduar\ulduar + + + scripts\northrend\ulduar\ulduar + + + scripts\northrend\ulduar\ulduar + + + scripts\northrend\ulduar\ulduar + + + scripts\northrend\ulduar\ulduar + + + scripts\northrend\ulduar\ulduar + + + scripts\northrend\ulduar\ulduar + + + scripts\northrend\ulduar\ulduar + + + scripts\northrend\ulduar\ulduar + + + scripts\northrend\ulduar\ulduar + + + scripts\northrend\ulduar\ulduar + + + scripts\northrend\utgarde_keep\utgarde_keep + + + scripts\northrend\utgarde_keep\utgarde_keep + + + scripts\northrend\utgarde_keep\utgarde_keep + + + scripts\northrend\utgarde_keep\utgarde_keep + + + scripts\northrend\utgarde_keep\utgarde_keep + + + scripts\northrend\utgarde_keep\utgarde_pinnacle + + + scripts\northrend\utgarde_keep\utgarde_pinnacle + + + scripts\northrend\utgarde_keep\utgarde_pinnacle + + + scripts\northrend\utgarde_keep\utgarde_pinnacle + + + scripts\northrend\utgarde_keep\utgarde_pinnacle + + + scripts\northrend\vault_of_archavon + + + scripts\northrend\vault_of_archavon + + + scripts\northrend\vault_of_archavon + + + scripts\northrend\vault_of_archavon + + + scripts\northrend\vault_of_archavon + + + scripts\northrend\violet_hold + + + scripts\northrend\violet_hold + + + scripts\northrend\violet_hold + + + scripts\northrend\violet_hold + + + scripts\northrend\icecrown_citadel\icecrown_citadel + + + scripts\northrend\icecrown_citadel\icecrown_citadel + + + scripts\northrend\icecrown_citadel\icecrown_citadel + + + scripts\northrend\icecrown_citadel\icecrown_citadel + + + scripts\northrend\icecrown_citadel\icecrown_citadel + + + scripts\northrend\icecrown_citadel\icecrown_citadel + + + scripts\northrend\icecrown_citadel\icecrown_citadel + + + scripts\northrend\icecrown_citadel\icecrown_citadel + + + scripts\northrend\icecrown_citadel\icecrown_citadel + + + scripts\northrend\icecrown_citadel\icecrown_citadel + + + scripts\northrend\icecrown_citadel\icecrown_citadel + + + scripts\northrend\icecrown_citadel\icecrown_citadel + + + scripts\northrend\icecrown_citadel\icecrown_citadel + + + scripts\northrend\icecrown_citadel\frozen_halls\pit_of_saron + + + scripts\northrend\icecrown_citadel\frozen_halls\pit_of_saron + + + scripts\northrend\icecrown_citadel\frozen_halls\pit_of_saron + + + scripts\northrend\icecrown_citadel\frozen_halls\pit_of_saron + + + scripts\northrend\icecrown_citadel\frozen_halls\pit_of_saron + + + scripts\northrend\icecrown_citadel\frozen_halls\halls_of_reflection + + + scripts\northrend\icecrown_citadel\frozen_halls\halls_of_reflection + + + scripts\northrend\icecrown_citadel\frozen_halls\halls_of_reflection + + + scripts\northrend\icecrown_citadel\frozen_halls\halls_of_reflection + + + scripts\northrend\icecrown_citadel\frozen_halls\halls_of_reflection + + + scripts\northrend\icecrown_citadel\frozen_halls\forge_of_souls + + + scripts\northrend\icecrown_citadel\frozen_halls\forge_of_souls + + + scripts\northrend\icecrown_citadel\frozen_halls\forge_of_souls + + + scripts\outland + + + scripts\outland + + + scripts\outland + + + scripts\outland + + + scripts\outland + + + scripts\outland + + + scripts\outland + + + scripts\outland + + + scripts\outland + + + scripts\outland + + + scripts\outland\auchindoun\auchenai_crypts + + + scripts\outland\auchindoun\auchenai_crypts + + + scripts\outland\auchindoun\mana_tombs + + + scripts\outland\auchindoun\mana_tombs + + + scripts\outland\auchindoun\sethekk_halls + + + scripts\outland\auchindoun\sethekk_halls + + + scripts\outland\auchindoun\sethekk_halls + + + scripts\outland\auchindoun\sethekk_halls + + + scripts\outland\auchindoun\shadow_labyrinth + + + scripts\outland\auchindoun\shadow_labyrinth + + + scripts\outland\auchindoun\shadow_labyrinth + + + scripts\outland\auchindoun\shadow_labyrinth + + + scripts\outland\auchindoun\shadow_labyrinth + + + scripts\outland\black_temple + + + scripts\outland\black_temple + + + scripts\outland\black_temple + + + scripts\outland\black_temple + + + scripts\outland\black_temple + + + scripts\outland\black_temple + + + scripts\outland\black_temple + + + scripts\outland\black_temple + + + scripts\outland\black_temple + + + scripts\outland\black_temple + + + scripts\outland\black_temple + + + scripts\outland\coilfang_reservoir\serpent_shrine + + + scripts\outland\coilfang_reservoir\serpent_shrine + + + scripts\outland\coilfang_reservoir\serpent_shrine + + + scripts\outland\coilfang_reservoir\serpent_shrine + + + scripts\outland\coilfang_reservoir\serpent_shrine + + + scripts\outland\coilfang_reservoir\serpent_shrine + + + scripts\outland\coilfang_reservoir\serpent_shrine + + + scripts\outland\coilfang_reservoir\slave_pens + + + scripts\outland\coilfang_reservoir\steam_vault + + + scripts\outland\coilfang_reservoir\steam_vault + + + scripts\outland\coilfang_reservoir\steam_vault + + + scripts\outland\coilfang_reservoir\steam_vault + + + scripts\outland\coilfang_reservoir\underbog + + + scripts\outland\gruuls_lair + + + scripts\outland\gruuls_lair + + + scripts\outland\gruuls_lair + + + scripts\outland\hellfire_citadel\blood_furnace + + + scripts\outland\hellfire_citadel\blood_furnace + + + scripts\outland\hellfire_citadel\blood_furnace + + + scripts\outland\hellfire_citadel\blood_furnace + + + scripts\outland\hellfire_citadel\hellfire_ramparts + + + scripts\outland\hellfire_citadel\hellfire_ramparts + + + scripts\outland\hellfire_citadel\hellfire_ramparts + + + scripts\outland\hellfire_citadel\hellfire_ramparts + + + scripts\outland\hellfire_citadel\magtheridons_lair + + + scripts\outland\hellfire_citadel\magtheridons_lair + + + scripts\outland\hellfire_citadel\shattered_halls + + + scripts\outland\hellfire_citadel\shattered_halls + + + scripts\outland\hellfire_citadel\shattered_halls + + + scripts\outland\hellfire_citadel\shattered_halls + + + scripts\outland\tempest_keep\arcatraz + + + scripts\outland\tempest_keep\arcatraz + + + scripts\outland\tempest_keep\arcatraz + + + scripts\outland\tempest_keep\arcatraz + + + scripts\outland\tempest_keep\arcatraz + + + scripts\outland\tempest_keep\botanica + + + scripts\outland\tempest_keep\botanica + + + scripts\outland\tempest_keep\botanica + + + scripts\outland\tempest_keep\the_eye + + + scripts\outland\tempest_keep\the_eye + + + scripts\outland\tempest_keep\the_eye + + + scripts\outland\tempest_keep\the_eye + + + scripts\outland\tempest_keep\the_eye + + + scripts\outland\tempest_keep\the_mechanar + + + scripts\outland\tempest_keep\the_mechanar + + + scripts\outland\tempest_keep\the_mechanar + + + scripts\world + + + scripts\world + + + scripts\world + + + scripts\world + + + scripts\world + + + scripts\world + + + scripts\world + + + scripts\world + + + scripts\world + + + scripts\world + + + include + + + include + + + include + + + include + + + system + + + system + + + system + + + + scripts\northrend\ruby_sanctum + + + scripts\northrend\ruby_sanctum + + + scripts\northrend\ruby_sanctum + + + scripts\northrend\ruby_sanctum + + + scripts\northrend\ruby_sanctum + + + + + base + + + base + + + base + + + base + + + scripts\eastern_kingdoms\blackrock_depths + + + scripts\eastern_kingdoms\blackrock_spire + + + scripts\eastern_kingdoms\blackwing_lair + + + scripts\eastern_kingdoms\deadmines + + + scripts\eastern_kingdoms\gnomeregan + + + scripts\eastern_kingdoms\karazhan + + + scripts\eastern_kingdoms\magisters_terrace + + + scripts\eastern_kingdoms\molten_core + + + scripts\eastern_kingdoms\scarlet_enclave + + + scripts\eastern_kingdoms\scarlet_monastery + + + scripts\eastern_kingdoms\scholomance + + + scripts\eastern_kingdoms\shadowfang_keep + + + scripts\eastern_kingdoms\stratholme + + + scripts\eastern_kingdoms\sunken_temple + + + scripts\eastern_kingdoms\sunwell_plateau + + + scripts\eastern_kingdoms\uldaman + + + scripts\eastern_kingdoms\zulaman + + + scripts\eastern_kingdoms\zulgurub + + + scripts\kalimdor\blackfathom_deeps + + + scripts\kalimdor\caverns_of_time\culling_of_stratholme + + + scripts\kalimdor\caverns_of_time\dark_portal + + + scripts\kalimdor\caverns_of_time\hyjal + + + scripts\kalimdor\caverns_of_time\hyjal + + + scripts\kalimdor\caverns_of_time\old_hillsbrad + + + scripts\kalimdor\dire_maul + + + scripts\kalimdor\onyxias_lair + + + scripts\kalimdor\razorfen_kraul + + + scripts\kalimdor\ruins_of_ahnqiraj + + + scripts\kalimdor\temple_of_ahnqiraj + + + scripts\kalimdor\wailing_caverns + + + scripts\kalimdor\zulfarrak + + + scripts\northrend\azjol-nerub\ahnkahet + + + scripts\northrend\azjol-nerub\azjol-nerub + + + scripts\northrend\crusaders_coliseum\trial_of_the_champion + + + scripts\northrend\crusaders_coliseum\trial_of_the_crusader + + + scripts\northrend\draktharon_keep + + + scripts\northrend\gundrak + + + scripts\northrend\icecrown_citadel\frozen_halls\forge_of_souls + + + scripts\northrend\icecrown_citadel\frozen_halls\halls_of_reflection + + + scripts\northrend\icecrown_citadel\frozen_halls\pit_of_saron + + + scripts\northrend\icecrown_citadel\icecrown_citadel + + + scripts\northrend\naxxramas + + + scripts\northrend\nexus\eye_of_eternity + + + scripts\northrend\nexus\nexus + + + scripts\northrend\nexus\oculus + + + scripts\northrend\obsidian_sanctum + + + scripts\northrend\ruby_sanctum + + + scripts\northrend\ulduar\halls_of_lightning + + + scripts\northrend\ulduar\halls_of_stone + + + scripts\northrend\ulduar\ulduar + + + scripts\northrend\utgarde_keep\utgarde_keep + + + scripts\northrend\utgarde_keep\utgarde_pinnacle + + + scripts\northrend\vault_of_archavon + + + scripts\northrend\violet_hold + + + scripts\outland\auchindoun\sethekk_halls + + + scripts\outland\auchindoun\shadow_labyrinth + + + scripts\outland\black_temple + + + scripts\outland\coilfang_reservoir\serpent_shrine + + + scripts\outland\coilfang_reservoir\steam_vault + + + scripts\outland\gruuls_lair + + + scripts\outland\hellfire_citadel\blood_furnace + + + scripts\outland\hellfire_citadel\hellfire_ramparts + + + scripts\outland\hellfire_citadel\magtheridons_lair + + + scripts\outland\hellfire_citadel\shattered_halls + + + scripts\outland\tempest_keep\arcatraz + + + scripts\outland\tempest_keep\the_eye + + + scripts\outland\tempest_keep\the_mechanar + + + scripts\world + + + include + + + include + + + include + + + include + + + include + + + system + + + system + + + + + + + + + + \ No newline at end of file diff --git a/scriptVC110.sln b/scriptVC110.sln new file mode 100644 index 000000000..3f7645b70 --- /dev/null +++ b/scriptVC110.sln @@ -0,0 +1,25 @@ +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2012 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ScriptDev2", "VC110\110ScriptDev2.vcxproj", "{4295C8A9-79B7-4354-8064-F05FB9CA0C96}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {4295C8A9-79B7-4354-8064-F05FB9CA0C96}.Debug|Win32.ActiveCfg = Debug|Win32 + {4295C8A9-79B7-4354-8064-F05FB9CA0C96}.Debug|Win32.Build.0 = Debug|Win32 + {4295C8A9-79B7-4354-8064-F05FB9CA0C96}.Debug|x64.ActiveCfg = Debug|x64 + {4295C8A9-79B7-4354-8064-F05FB9CA0C96}.Debug|x64.Build.0 = Debug|x64 + {4295C8A9-79B7-4354-8064-F05FB9CA0C96}.Release|Win32.ActiveCfg = Release|Win32 + {4295C8A9-79B7-4354-8064-F05FB9CA0C96}.Release|Win32.Build.0 = Release|Win32 + {4295C8A9-79B7-4354-8064-F05FB9CA0C96}.Release|x64.ActiveCfg = Release|x64 + {4295C8A9-79B7-4354-8064-F05FB9CA0C96}.Release|x64.Build.0 = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 5564484ff..3dc8789d7 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2794" + #define SD2_REVISION_NR "2795" #endif // __SD2_REVISION_NR_H__ From 6cb6e787bab98b71c3cc8f5c0261fffc773cd272 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sun, 24 Feb 2013 01:41:16 +0200 Subject: [PATCH 0793/1172] [2796] Add VS2012 support for git_id --- sd2_revision_nr.h | 2 +- tool/git_id/git_id_vc110.sln | 20 +++++ tool/git_id/git_id_vc110.vcxproj | 102 +++++++++++++++++++++++ tool/git_id/git_id_vc110.vcxproj.filters | 22 +++++ 4 files changed, 145 insertions(+), 1 deletion(-) create mode 100644 tool/git_id/git_id_vc110.sln create mode 100644 tool/git_id/git_id_vc110.vcxproj create mode 100644 tool/git_id/git_id_vc110.vcxproj.filters diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 3dc8789d7..e147ab3a3 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2795" + #define SD2_REVISION_NR "2796" #endif // __SD2_REVISION_NR_H__ diff --git a/tool/git_id/git_id_vc110.sln b/tool/git_id/git_id_vc110.sln new file mode 100644 index 000000000..3900fd907 --- /dev/null +++ b/tool/git_id/git_id_vc110.sln @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2012 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "git_id", "git_id_vc110.vcxproj", "{AD81BF86-050B-4605-8AF2-03C01967D784}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {AD81BF86-050B-4605-8AF2-03C01967D784}.Debug|Win32.ActiveCfg = Debug|Win32 + {AD81BF86-050B-4605-8AF2-03C01967D784}.Debug|Win32.Build.0 = Debug|Win32 + {AD81BF86-050B-4605-8AF2-03C01967D784}.Release|Win32.ActiveCfg = Release|Win32 + {AD81BF86-050B-4605-8AF2-03C01967D784}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/tool/git_id/git_id_vc110.vcxproj b/tool/git_id/git_id_vc110.vcxproj new file mode 100644 index 000000000..5a8d108d8 --- /dev/null +++ b/tool/git_id/git_id_vc110.vcxproj @@ -0,0 +1,102 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + git_id + {AD81BF86-050B-4605-8AF2-03C01967D784} + git_id + Win32Proj + + + + Application + Unicode + true + v110 + + + Application + Unicode + v110 + + + + + + + + + + + + + $(SolutionDir)$(Configuration)\ + $(Configuration)\ + true + $(SolutionDir)$(Configuration)\ + $(Configuration)\ + false + AllRules.ruleset + + + AllRules.ruleset + + + + + + Disabled + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + true + Console + false + + + MachineX86 + + + + + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + + + Level3 + ProgramDatabase + + + true + Console + true + true + false + + + MachineX86 + + + + + + + + + \ No newline at end of file diff --git a/tool/git_id/git_id_vc110.vcxproj.filters b/tool/git_id/git_id_vc110.vcxproj.filters new file mode 100644 index 000000000..158311880 --- /dev/null +++ b/tool/git_id/git_id_vc110.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + \ No newline at end of file From 6cc161b83157dab4fc2204bdffe07a5caeed3f14 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Sun, 24 Feb 2013 14:25:32 +0100 Subject: [PATCH 0794/1172] [2797] Fix tiny logic issue in Scarlet Monastary script. Thanks to Jethrogibbs for pointing --- .../boss_mograine_and_whitemane.cpp | 19 ++++++++++--------- sd2_revision_nr.h | 2 +- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/scripts/eastern_kingdoms/scarlet_monastery/boss_mograine_and_whitemane.cpp b/scripts/eastern_kingdoms/scarlet_monastery/boss_mograine_and_whitemane.cpp index a1f763e05..6000de74f 100644 --- a/scripts/eastern_kingdoms/scarlet_monastery/boss_mograine_and_whitemane.cpp +++ b/scripts/eastern_kingdoms/scarlet_monastery/boss_mograine_and_whitemane.cpp @@ -81,15 +81,6 @@ struct MANGOS_DLL_DECL boss_scarlet_commander_mograineAI : public ScriptedAI m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); m_creature->SetStandState(UNIT_STAND_STATE_STAND); - - if (!m_pInstance) - return; - - if (Creature* pWhitemane = m_pInstance->GetSingleCreatureFromStorage(NPC_WHITEMANE)) - { - if (m_creature->isAlive() && !pWhitemane->isAlive()) - pWhitemane->Respawn(); - } } void Aggro(Unit* pWho) override @@ -105,6 +96,16 @@ struct MANGOS_DLL_DECL boss_scarlet_commander_mograineAI : public ScriptedAI DoScriptText(SAY_MO_KILL, m_creature); } + void JustReachedHome() override + { + if (!m_pInstance) + return; + + Creature* pWhitemane = m_pInstance->GetSingleCreatureFromStorage(NPC_WHITEMANE); + if (pWhitemane && !pWhitemane->isAlive()) + pWhitemane->Respawn(); + } + void DamageTaken(Unit* pDoneBy, uint32& uiDamage) override { if (uiDamage < m_creature->GetHealth() || m_bHasDied) diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index e147ab3a3..8c5704832 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2796" + #define SD2_REVISION_NR "2797" #endif // __SD2_REVISION_NR_H__ From 65610ac73b79cbe706ea84c5c378e8ca0f3d2fe3 Mon Sep 17 00:00:00 2001 From: grz3s Date: Tue, 26 Feb 2013 10:03:14 +0200 Subject: [PATCH 0795/1172] [2798] Improve and fix quests 10458, 10480 and 10481 Signed-off-by: Xfurry --- scripts/outland/shadowmoon_valley.cpp | 102 +++++++++++++++++++------- sd2_revision_nr.h | 2 +- 2 files changed, 76 insertions(+), 28 deletions(-) diff --git a/scripts/outland/shadowmoon_valley.cpp b/scripts/outland/shadowmoon_valley.cpp index 55cb04f75..e758aaa10 100644 --- a/scripts/outland/shadowmoon_valley.cpp +++ b/scripts/outland/shadowmoon_valley.cpp @@ -1125,27 +1125,38 @@ enum // quest 10458, 10480, 10481 SPELL_ELEMENTAL_SIEVE = 36035, - NPC_TOTEM_OF_SPIRITS = 21071, - NPC_EARTH_SPIRIT = 21050, // to be killed - NPC_FIERY_SPIRIT = 21061, - NPC_WATER_SPIRIT = 21059, - NPC_AIR_SPIRIT = 21060, + SPELL_CALL_TO_THE_SPIRITS = 36206, + SPELL_EARTH_CAPTURED = 36025, // dummies (having visual effects) SPELL_FIERY_CAPTURED = 36115, SPELL_WATER_CAPTURED = 36170, SPELL_AIR_CAPTURED = 36181, + SPELL_EARTH_CAPTURED_CREDIT = 36108, // event 13513 SPELL_FIERY_CAPTURED_CREDIT = 36117, // event 13514 SPELL_WATER_CAPTURED_CREDIT = 36171, // event 13515 SPELL_AIR_CAPTURED_CREDIT = 36182, // event 13516 - EVENT_EARTH = 13513, - EVENT_FIERY = 13514, - EVENT_WATER = 13515, - EVENT_AIR = 13516, + + NPC_TOTEM_OF_SPIRITS = 21071, + NPC_EARTH_SPIRIT = 21050, // to be killed + NPC_FIERY_SPIRIT = 21061, + NPC_WATER_SPIRIT = 21059, + NPC_AIR_SPIRIT = 21060, + + NPC_EARTHEN_SOUL = 21073, // invisible souls summoned by the totem + NPC_FIERY_SOUL = 21097, + NPC_WATERY_SOUL = 21109, + NPC_AIRY_SOUL = 21116, + NPC_CREDIT_MARKER_EARTH = 21092, // quest objective npc's NPC_CREDIT_MARKER_FIERY = 21094, NPC_CREDIT_MARKER_WATER = 21095, NPC_CREDIT_MARKER_AIR = 21096, + + EVENT_EARTH = 13513, // credit events + EVENT_FIERY = 13514, + EVENT_WATER = 13515, + EVENT_AIR = 13516, }; struct MANGOS_DLL_DECL npc_totem_of_spiritsAI : public ScriptedPetAI @@ -1154,10 +1165,43 @@ struct MANGOS_DLL_DECL npc_totem_of_spiritsAI : public ScriptedPetAI void Reset() override {} - void MoveInLineOfSight(Unit* pWho) override {} void UpdateAI(const uint32 uiDiff) override {} void AttackedBy(Unit* pAttacker) override {} + void MoveInLineOfSight(Unit* pWho) override + { + if (pWho->GetTypeId() != TYPEID_UNIT) + return; + + // Use the LoS function to check for the souls in range due to the fact that pets do not support SummonedMovementInform() + uint32 uiEntry = pWho->GetEntry(); + if (uiEntry == NPC_EARTHEN_SOUL || uiEntry == NPC_FIERY_SOUL || uiEntry == NPC_WATERY_SOUL || uiEntry == NPC_AIRY_SOUL) + { + // Only when it's close to the totem + if (!pWho->IsWithinDistInMap(m_creature, 1.5f)) + return; + + switch (uiEntry) + { + case NPC_EARTHEN_SOUL: + pWho->CastSpell(m_creature, SPELL_EARTH_CAPTURED, true); + break; + case NPC_FIERY_SOUL: + pWho->CastSpell(m_creature, SPELL_FIERY_CAPTURED, true); + break; + case NPC_WATERY_SOUL: + pWho->CastSpell(m_creature, SPELL_WATER_CAPTURED, true); + break; + case NPC_AIRY_SOUL: + pWho->CastSpell(m_creature, SPELL_AIR_CAPTURED, true); + break; + } + + // Despawn the spirit soul after it's captured + ((Creature*)pWho)->ForcedDespawn(); + } + } + void OwnerKilledUnit(Unit* pVictim) override { if (pVictim->GetTypeId() != TYPEID_UNIT) @@ -1169,6 +1213,14 @@ struct MANGOS_DLL_DECL npc_totem_of_spiritsAI : public ScriptedPetAI if (uiEntry == NPC_EARTH_SPIRIT || uiEntry == NPC_FIERY_SPIRIT || uiEntry == NPC_WATER_SPIRIT || uiEntry == NPC_AIR_SPIRIT) pVictim->CastSpell(pVictim, SPELL_ELEMENTAL_SIEVE, true); } + + void JustSummoned(Creature* pSummoned) override + { + // After summoning the spirit soul, make it move towards the totem + float fX, fY, fZ; + m_creature->GetContactPoint(pSummoned, fX, fY, fZ); + pSummoned->GetMotionMaster()->MovePoint(1, fX, fY, fZ); + } }; CreatureAI* GetAI_npc_totem_of_spirits(Creature* pCreature) @@ -1185,22 +1237,22 @@ bool EffectDummyCreature_npc_totem_of_spirits(Unit* pCaster, uint32 uiSpellId, S { case SPELL_EARTH_CAPTURED: { - pCaster->CastSpell(pCaster, SPELL_EARTH_CAPTURED_CREDIT, true); + pCreatureTarget->CastSpell(pCreatureTarget, SPELL_EARTH_CAPTURED_CREDIT, true); return true; } case SPELL_FIERY_CAPTURED: { - pCaster->CastSpell(pCaster, SPELL_FIERY_CAPTURED_CREDIT, true); + pCreatureTarget->CastSpell(pCreatureTarget, SPELL_FIERY_CAPTURED_CREDIT, true); return true; } case SPELL_WATER_CAPTURED: { - pCaster->CastSpell(pCaster, SPELL_WATER_CAPTURED_CREDIT, true); + pCreatureTarget->CastSpell(pCreatureTarget, SPELL_WATER_CAPTURED_CREDIT, true); return true; } case SPELL_AIR_CAPTURED: { - pCaster->CastSpell(pCaster, SPELL_AIR_CAPTURED_CREDIT, true); + pCreatureTarget->CastSpell(pCreatureTarget, SPELL_AIR_CAPTURED_CREDIT, true); return true; } } @@ -1228,23 +1280,19 @@ bool EffectAuraDummy_npc_totem_of_spirits(const Aura* pAura, bool bApply) if (!pCreature || !pCreature->IsPet() || !pCaster) return true; - // Need to expect the enraged elementals to be caster of aura + // Summon the soul of the spirit and cast the visual + uint32 uiSoulEntry; switch (pCaster->GetEntry()) { - case NPC_EARTH_SPIRIT: - pCreature->CastSpell(pCreature, SPELL_EARTH_CAPTURED, true); - break; - case NPC_FIERY_SPIRIT: - pCreature->CastSpell(pCreature, SPELL_FIERY_CAPTURED, true); - break; - case NPC_WATER_SPIRIT: - pCreature->CastSpell(pCreature, SPELL_WATER_CAPTURED, true); - break; - case NPC_AIR_SPIRIT: - pCreature->CastSpell(pCreature, SPELL_AIR_CAPTURED, true); - break; + case NPC_EARTH_SPIRIT: uiSoulEntry = NPC_EARTHEN_SOUL; break; + case NPC_FIERY_SPIRIT: uiSoulEntry = NPC_FIERY_SOUL; break; + case NPC_WATER_SPIRIT: uiSoulEntry = NPC_WATERY_SOUL; break; + case NPC_AIR_SPIRIT: uiSoulEntry = NPC_AIRY_SOUL; break; } + pCreature->CastSpell(pCreature, SPELL_CALL_TO_THE_SPIRITS, true); + pCreature->SummonCreature(uiSoulEntry, pCaster->GetPositionX(), pCaster->GetPositionY(), pCaster->GetPositionZ(), 0, TEMPSUMMON_TIMED_OOC_OR_CORPSE_DESPAWN, 10000); + return true; } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 8c5704832..6e4d2c6c2 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2797" + #define SD2_REVISION_NR "2798" #endif // __SD2_REVISION_NR_H__ From fbd4fa4fb9bea7ec307b9ab429944ce5f5d355a3 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Fri, 1 Mar 2013 02:00:41 +0200 Subject: [PATCH 0796/1172] [2799] Add script support for Halion - The Twilight Destroyer Please note that the script is still in development so some parts of the encounter are not yet available --- .../northrend/ruby_sanctum/boss_halion.cpp | 502 +++++++++++++++++- .../ruby_sanctum/instance_ruby_sanctum.cpp | 64 ++- scripts/northrend/ruby_sanctum/ruby_sanctum.h | 22 +- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 2 + sql/updates/r2799_mangos.sql | 2 + 6 files changed, 577 insertions(+), 17 deletions(-) create mode 100644 sql/updates/r2799_mangos.sql diff --git a/scripts/northrend/ruby_sanctum/boss_halion.cpp b/scripts/northrend/ruby_sanctum/boss_halion.cpp index 66b350886..32ce11539 100644 --- a/scripts/northrend/ruby_sanctum/boss_halion.cpp +++ b/scripts/northrend/ruby_sanctum/boss_halion.cpp @@ -16,17 +16,19 @@ /* ScriptData SDName: boss_halion -SD%Complete: 20 -SDComment: only yells +SD%Complete: 50 +SDComment: Phase 3 and related transition NYI; Twilight portals NYI; Shadow Orbs NYI; Meteor Strikes NYI; Heroic abilities NYI. SDCategory: Ruby Sanctum EndScriptData */ #include "precompiled.h" +#include "ruby_sanctum.h" enum { SAY_AGGRO = -1724025, - SAY_SLAY = -1724026, // There is an additonal sound entry related to SLAY: 17502 + SAY_SLAY_1 = -1724026, + SOUND_SLAY_2 = 17502, // not sure if this one has a text SAY_DEATH = -1724027, SAY_BERSERK = -1724028, SAY_FIREBALL = -1724029, @@ -40,8 +42,502 @@ enum EMOTE_INTO_TWILLIGHT = -1724036, EMOTE_INTO_PHYSICAL = -1724037, EMOTE_REGENERATE = -1724038, + + // *** Spells *** + // General + SPELL_TWILIGHT_PRECISION = 78243, + SPELL_CLEAVE = 74524, + SPELL_TAIL_LASH = 74531, + SPELL_BERSERK = 26662, + + // Transitions + SPELL_TWILIGHT_PHASING = 74808, // Start phase 2 + SPELL_SUMMON_PORTAL = 74809, + SPELL_TWILIGHT_DIVISION = 75063, + SPELL_TWILIGHT_REALM = 74807, + SPELL_TWILIGHT_MENDING = 75509, + SPELL_LEAVE_TWILIGHT_REALM = 74812, // handled by GO 202796 + //share damage spell: 74810 - serverside spell + + // Real + SPELL_FLAME_BREATH = 74525, + SPELL_METEOR_SUMMON = 74637, // summons 40029 + SPELL_FIERY_COMBUSTION = 74562, // curse - triggers 74567 on self (player); on dispell triggers 74607 and 74610 + + // Twilight + SPELL_DARK_BREATH = 74806, + SPELL_DUSK_SHROUD = 75476, + SPELL_SOUL_CONSUMPTION = 74792, // curse - triggers 74795 on self (player); on dispell triggers 74799 and 74800 + + // Corporeality + SPELL_CORPOREALITY_EVEN = 74826, // Deals & receives normal damage + SPELL_CORPOREALITY_20I = 74827, // Damage dealt increased by 10% - Damage taken increased by 15% + SPELL_CORPOREALITY_40I = 74828, // Damage dealt increased by 30% - Damage taken increased by 50% + SPELL_CORPOREALITY_60I = 74829, // Damage dealt increased by 60% - Damage taken increased by 100% + SPELL_CORPOREALITY_80I = 74830, // Damage dealt increased by 100% - Damage taken increased by 200% + SPELL_CORPOREALITY_100I = 74831, // Damage dealt increased by 200% - Damage taken increased by 400% + SPELL_CORPOREALITY_20D = 74832, // Damage dealt reduced by 10% - Damage taken reduced by 15% + SPELL_CORPOREALITY_40D = 74833, // Damage dealt reduced by 30% - Damage taken reduced by 50% + SPELL_CORPOREALITY_60D = 74834, // Damage dealt reduced by 60% - Damage taken reduced by 100% + SPELL_CORPOREALITY_80D = 74835, // Damage dealt reduced by 100% - Damage taken reduced by 200% + SPELL_CORPOREALITY_100D = 74836, // Damage dealt reduced by 200% - Damage taken reduced by 400% + + // *** Other spells *** + //Combustion + SPELL_COMBUSTION_PERIODIC = 74629, // cast by npc 40001 + + // Consumption + SPELL_CONSUMPTION_PERIODIC = 74803, // cast by npc 40135 + + // Meteor + SPELL_METEOR_VISUAL = 74641, // cast by npc 40029 (all meteor spells) + SPELL_METEOR_IMPACT = 74648, // cast on visual aura expire + SPELL_METEOR_FLAME = 74713, + SPELL_METEOR_FLAME2 = 74718, // cast by the secondary strike npcs + SPELL_BIRTH = 40031, // cast by the meteor strike npcs + + // Cutter + SPELL_TWILIGHT_CUTTER = 74768, + SEPLL_TWILIGHT_PULSE = 78861, + SPELL_TRACK_ROTATION = 74758, // cast by 40081 on 40091 + + // Living Inferno + SPELL_BLAZING_AURA = 75885, // cast by 40681 + + // Living Ember + SPELL_AWAKEN_FLAMES = 75889, // cast by 40683 + + // Npcs + NPC_COMBUSTION = 40001, + NPC_METEOR_STRIKE_MAIN = 40029, // summons the other meteor strikes using serverside spells like 74680, 74681, 74682, 74683 + NPC_CONSUMPTION = 40135, + NPC_ORB_CARRIER = 40081, // vehicle for shadow orbs + NPC_ORB_ROTATION_FOCUS = 40091, + + NPC_METEOR_STRIKE_1 = 40041, // Npc 40029 summons the first 4 secondary meteor strike npcs, then each of them summons one 40055 npc using serverside spells 74687, 74688 + NPC_METEOR_STRIKE_2 = 40042, + NPC_METEOR_STRIKE_3 = 40043, + NPC_METEOR_STRIKE_4 = 40044, + NPC_METEOR_STRIKE_FLAME = 40055, // Each npc 40055 summons other 10 40055 npcs resulting in a total spawns of 40 40055 npcs. + + // Heroic npcs + NPC_LIVING_INFERNO = 40681, // summoned by 75879 (heroic version spell) + NPC_LIVING_EMBER = 40683, + + // *** Phases *** + PHASE_PHISYCAL_REALM = 1, + PHASE_TWILIGHT_REALM = 2, + PHASE_BOTH_REALMS = 3, +}; + +static const uint32 aShadowOrbs[4] = { NPC_SHADOW_ORB_1, NPC_SHADOW_ORB_2, NPC_SHADOW_ORB_3, NPC_SHADOW_ORB_4 }; +static const uint32 aMeteorStrikes[4] = { NPC_METEOR_STRIKE_1, NPC_METEOR_STRIKE_2, NPC_METEOR_STRIKE_3, NPC_METEOR_STRIKE_4 }; + +static const float aRotationFocusPosition[4] = {3113.711f, 533.5382f, 72.96f, 1.93f}; +static const float aOrbCarrierPosition1[3] = {3153.75f, 579.1875f, 70.47f}; +static const float aOrbCarrierPosition2[3] = {3153.75f, 487.1875f, 70.47f}; + + /*###### +## boss_halion_real +######*/ + +struct MANGOS_DLL_DECL boss_halion_realAI : public ScriptedAI +{ + boss_halion_realAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (instance_ruby_sanctum*)pCreature->GetInstanceData(); + Reset(); + } + + instance_ruby_sanctum* m_pInstance; + + uint8 m_uiPhase; + + uint32 m_uiTailLashTimer; + uint32 m_uiCleaveTimer; + uint32 m_uiFieryCombustionTimer; + uint32 m_uiMeteorTimer; + uint32 m_uiFlameBreathTimer; + uint32 m_uiBerserkTimer; + + void Reset() override + { + m_uiPhase = PHASE_PHISYCAL_REALM; + + m_uiTailLashTimer = 10000; + m_uiCleaveTimer = urand(5000, 10000); + m_uiFieryCombustionTimer = 15000; + m_uiMeteorTimer = 20000; + m_uiBerserkTimer = 8*MINUTE*IN_MILLISECONDS; + } + + void Aggro(Unit* /*pWho*/) override + { + if (m_pInstance) + m_pInstance->SetData(TYPE_HALION, IN_PROGRESS); + + DoScriptText(SAY_AGGRO, m_creature); + DoCastSpellIfCan(m_creature, SPELL_TWILIGHT_PRECISION, CAST_TRIGGERED); + } + + void KilledUnit(Unit* pVictim) override + { + if (pVictim->GetTypeId() == TYPEID_PLAYER) + { + switch (urand(0, 1)) + { + case 0: DoScriptText(SAY_SLAY_1, m_creature); break; + case 1: DoPlaySoundToSet(m_creature, SOUND_SLAY_2); break; + } + } + } + + void JustDied(Unit* /*pKiller*/) override + { + if (m_pInstance) + m_pInstance->SetData(TYPE_HALION, DONE); + + DoScriptText(SAY_DEATH,m_creature); + } + + void JustReachedHome() override + { + if (m_pInstance) + m_pInstance->SetData(TYPE_HALION, FAIL); + } + + void JustSummoned(Creature* pSummoned) override + { + switch (pSummoned->GetEntry()) + { + case NPC_COMBUSTION: + pSummoned->CastSpell(pSummoned, SPELL_COMBUSTION_PERIODIC, true); + break; + case NPC_METEOR_STRIKE_MAIN: + // ToDo: summon the other meteor strikes around this one + pSummoned->CastSpell(pSummoned, SPELL_BIRTH, true); + pSummoned->CastSpell(pSummoned, SPELL_METEOR_VISUAL, true); + break; + } + } + + void DoPrepareTwilightPhase() + { + if (!m_pInstance) + return; + + // Spawn the orbs and the carriers. Use the twilight Halion version to preserve the phase + if (Creature* pHalion = m_pInstance->GetSingleCreatureFromStorage(NPC_HALION_TWILIGHT)) + { + // Set current Halion hp + pHalion->SetHealth(m_creature->GetHealth()); + + // NOTE: the spawn coords seem to be totally off, compared to the actual map layout - requires additional research!!! + + // Spawn the rotation focus first + // pHalion->SummonCreature(NPC_ORB_ROTATION_FOCUS, aRotationFocusPosition[0], aRotationFocusPosition[1], aRotationFocusPosition[2], aRotationFocusPosition[3], TEMPSUMMON_DEAD_DESPAWN, 0); + + // Then spawn the orb carriers and the shadow orbs. ToDo: research if it's possible to make this dynamic + // pHalion->SummonCreature(NPC_ORB_CARRIER, aOrbCarrierPosition1[0], aOrbCarrierPosition1[1], aOrbCarrierPosition1[2], 0, TEMPSUMMON_DEAD_DESPAWN, 0); + // pHalion->SummonCreature(NPC_ORB_CARRIER, aOrbCarrierPosition2[0], aOrbCarrierPosition2[1], aOrbCarrierPosition2[2], 0, TEMPSUMMON_DEAD_DESPAWN, 0); + // pHalion->SummonCreature(NPC_SHADOW_ORB_1, aOrbCarrierPosition1[0], aOrbCarrierPosition1[1], aOrbCarrierPosition1[2], 0, TEMPSUMMON_DEAD_DESPAWN, 0); + // pHalion->SummonCreature(NPC_SHADOW_ORB_2, aOrbCarrierPosition2[0], aOrbCarrierPosition2[1], aOrbCarrierPosition2[2], 0, TEMPSUMMON_DEAD_DESPAWN, 0); + } + } + + void UpdateAI(const uint32 uiDiff) override + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_uiBerserkTimer) + { + if (m_uiBerserkTimer <= uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_BERSERK) == CAST_OK) + { + // Do the same for the Twilight halion + if (m_pInstance) + { + if (Creature* pHalion = m_pInstance->GetSingleCreatureFromStorage(NPC_HALION_TWILIGHT, true)) + pHalion->CastSpell(pHalion, SPELL_BERSERK, true); + } + + DoScriptText(SAY_BERSERK, m_creature); + m_uiBerserkTimer = 0; + } + } + else + m_uiBerserkTimer -= uiDiff; + } + + switch (m_uiPhase) + { + case PHASE_BOTH_REALMS: + // ToDo: handle corporeality + // no break; + case PHASE_PHISYCAL_REALM: + + if (m_uiTailLashTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_TAIL_LASH) == CAST_OK) + m_uiTailLashTimer = urand(15000, 25000); + } + else + m_uiTailLashTimer -= uiDiff; + + if (m_uiCleaveTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_CLEAVE) == CAST_OK) + m_uiCleaveTimer = urand(10000, 15000); + } + else + m_uiCleaveTimer -= uiDiff; + + if (m_uiFlameBreathTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_FLAME_BREATH) == CAST_OK) + m_uiFlameBreathTimer = urand(15000, 20000); + } + else + m_uiFlameBreathTimer -= uiDiff; + + if (m_uiFieryCombustionTimer < uiDiff) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0, SPELL_FIERY_COMBUSTION, SELECT_FLAG_PLAYER)) + { + if (DoCastSpellIfCan(pTarget, SPELL_FIERY_COMBUSTION) == CAST_OK) + m_uiFieryCombustionTimer = 25000; + } + } + else + m_uiFieryCombustionTimer -= uiDiff; + + if (m_uiMeteorTimer < uiDiff) + { + if (Unit *pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1)) + { + if (DoCastSpellIfCan(pTarget, SPELL_METEOR_SUMMON) == CAST_OK) + { + DoScriptText(SAY_FIREBALL, m_creature); + m_uiMeteorTimer = 40000; + } + } + } + else + m_uiMeteorTimer -= uiDiff; + + // Switch to phase 2 + if (m_creature->GetHealthPercent() < 75.0f && m_uiPhase == PHASE_PHISYCAL_REALM) + { + if (DoCastSpellIfCan(m_creature, SPELL_TWILIGHT_PHASING, CAST_INTERRUPT_PREVIOUS) == CAST_OK) + { + DoCastSpellIfCan(m_creature, SPELL_SUMMON_PORTAL, CAST_TRIGGERED); + DoScriptText(SAY_PHASE_2,m_creature); + DoPrepareTwilightPhase(); + m_uiPhase = PHASE_TWILIGHT_REALM; + } + } + + break; + case PHASE_TWILIGHT_REALM: + + // Switch to phase 3 + if (m_creature->GetHealthPercent() < 50.0f) + { + m_creature->RemoveAurasDueToSpell(SPELL_TWILIGHT_PHASING); + DoScriptText(SAY_PHASE_3, m_creature); + m_uiPhase = PHASE_BOTH_REALMS; + } + + break; + } + + DoMeleeAttackIfReady(); + } +}; + +/*###### +## boss_halion_twilight +######*/ + +struct MANGOS_DLL_DECL boss_halion_twilightAI : public ScriptedAI +{ + boss_halion_twilightAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (instance_ruby_sanctum*)pCreature->GetInstanceData(); + Reset(); + } + + instance_ruby_sanctum* m_pInstance; + + uint8 m_uiPhase; + uint32 m_uiTailLashTimer; + uint32 m_uiCleaveTimer; + uint32 m_uiDarkBreathTimer; + uint32 m_uiSoulConsumptionTimer; + + void Reset() override + { + m_uiPhase = PHASE_TWILIGHT_REALM; + m_uiTailLashTimer = 10000; + m_uiCleaveTimer = urand(5000, 10000); + m_uiDarkBreathTimer = 15000; + m_uiSoulConsumptionTimer = 20000; + } + + void Aggro(Unit* /*pWho*/) override + { + DoCastSpellIfCan(m_creature, SPELL_DUSK_SHROUD, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_TWILIGHT_PRECISION, CAST_TRIGGERED); + } + + void JustReachedHome() override + { + // Allow real Halion to evade + if (m_pInstance) + { + if (Creature* pHalion = m_pInstance->GetSingleCreatureFromStorage(NPC_HALION_REAL)) + pHalion->AI()->EnterEvadeMode(); + } + } + + void JustDied(Unit* /*pKiller*/) override + { + // ToDo: handle the damage sharing! + + DoScriptText(SAY_DEATH,m_creature); + } + + void KilledUnit(Unit* pVictim) override + { + if (pVictim->GetTypeId() == TYPEID_PLAYER) + { + switch (urand(0, 1)) + { + case 0: DoScriptText(SAY_SLAY_1, m_creature); break; + case 1: DoPlaySoundToSet(m_creature, SOUND_SLAY_2); break; + } + } + } + + void JustSummoned(Creature* pSummoned) override + { + switch (pSummoned->GetEntry()) + { + case NPC_CONSUMPTION: + pSummoned->CastSpell(pSummoned, SPELL_CONSUMPTION_PERIODIC, true); + break; + case NPC_SHADOW_ORB_1: + case NPC_SHADOW_ORB_2: + case NPC_SHADOW_ORB_3: + case NPC_SHADOW_ORB_4: + if (Creature* pCarrier = GetClosestCreatureWithEntry(pSummoned, NPC_ORB_CARRIER, 5.0f)) + pSummoned->CastSpell(pCarrier, SPELL_RIDE_VEHICLE_HARDCODED, true); + break; + case NPC_ORB_CARRIER: + pSummoned->CastSpell(pSummoned, SPELL_TRACK_ROTATION, true); + break; + } + } + + void UpdateAI(const uint32 uiDiff) override + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + switch (m_uiPhase) + { + case PHASE_PHISYCAL_REALM: + // nothing here - phase not handled by this npc + break; + case PHASE_BOTH_REALMS: + // ToDo: handle corporeality + // no break; + case PHASE_TWILIGHT_REALM: + + if (m_uiTailLashTimer < uiDiff) + { + if(DoCastSpellIfCan(m_creature, SPELL_TAIL_LASH) == CAST_OK) + m_uiTailLashTimer = urand(15000, 25000); + } + else + m_uiTailLashTimer -= uiDiff; + + if (m_uiCleaveTimer < uiDiff) + { + if(DoCastSpellIfCan(m_creature->getVictim(), SPELL_CLEAVE) == CAST_OK) + m_uiCleaveTimer = urand(10000, 15000); + } + else + m_uiCleaveTimer -= uiDiff; + + if (m_uiDarkBreathTimer < uiDiff) + { + if(DoCastSpellIfCan(m_creature->getVictim(), SPELL_DARK_BREATH) == CAST_OK) + m_uiDarkBreathTimer = urand(15000, 20000); + } + else + m_uiDarkBreathTimer -= uiDiff; + + if (m_uiSoulConsumptionTimer < uiDiff) + { + if (Unit *pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0, SPELL_SOUL_CONSUMPTION, SELECT_FLAG_PLAYER)) + { + if (DoCastSpellIfCan(pTarget, SPELL_SOUL_CONSUMPTION) == CAST_OK) + m_uiSoulConsumptionTimer = 25000; + } + } + else + m_uiSoulConsumptionTimer -= uiDiff; + + // Switch to phase 3 + if (m_creature->GetHealthPercent() < 50.0f && m_uiPhase == PHASE_TWILIGHT_REALM) + { + if (DoCastSpellIfCan(m_creature, SPELL_TWILIGHT_DIVISION, CAST_INTERRUPT_PREVIOUS) == CAST_OK) + { + if (m_pInstance) + { + // ToDo: Update world states and spawn the exit portals + + // Set the real Halion health, so it can also begin phase 3 + if (Creature* pHalion = m_pInstance->GetSingleCreatureFromStorage(NPC_HALION_REAL)) + pHalion->SetHealth(m_creature->GetHealth()); + } + + DoScriptText(SAY_PHASE_3,m_creature); + m_uiPhase = PHASE_BOTH_REALMS; + } + } + + break; + } + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_halion_real(Creature* pCreature) +{ + return new boss_halion_realAI(pCreature); +}; + +CreatureAI* GetAI_boss_halion_twilight(Creature* pCreature) +{ + return new boss_halion_twilightAI(pCreature); }; void AddSC_boss_halion() { + Script *pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_halion_real"; + pNewScript->GetAI = &GetAI_boss_halion_real; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "boss_halion_twilight"; + pNewScript->GetAI = &GetAI_boss_halion_twilight; + pNewScript->RegisterSelf(); } diff --git a/scripts/northrend/ruby_sanctum/instance_ruby_sanctum.cpp b/scripts/northrend/ruby_sanctum/instance_ruby_sanctum.cpp index 43da532c0..c18c982c3 100644 --- a/scripts/northrend/ruby_sanctum/instance_ruby_sanctum.cpp +++ b/scripts/northrend/ruby_sanctum/instance_ruby_sanctum.cpp @@ -26,7 +26,8 @@ EndScriptData */ instance_ruby_sanctum::instance_ruby_sanctum(Map* pMap) : ScriptedInstance(pMap), m_uiHalionSummonTimer(0), - m_uiHalionSummonStage(0) + m_uiHalionSummonStage(0), + m_uiHalionResetTimer(0) { Initialize(); } @@ -58,19 +59,26 @@ void instance_ruby_sanctum::OnPlayerEnter(Player* pPlayer) return; if (Creature* pSummoner = GetSingleCreatureFromStorage(NPC_HALION_CONTROLLER)) - pSummoner->SummonCreature(NPC_HALION_REAL, pSummoner->GetPositionX(), pSummoner->GetPositionY(), pSummoner->GetPositionZ(), pSummoner->GetOrientation(), TEMPSUMMON_DEAD_DESPAWN, 0); + pSummoner->SummonCreature(NPC_HALION_REAL, pSummoner->GetPositionX(), pSummoner->GetPositionY(), pSummoner->GetPositionZ(), 3.159f, TEMPSUMMON_DEAD_DESPAWN, 0); } void instance_ruby_sanctum::OnCreatureCreate(Creature* pCreature) { switch (pCreature->GetEntry()) { + case NPC_XERESTRASZA: + // Special case for Xerestrasza: she only needs to have questgiver flag if Baltharus is killed + if (m_auiEncounter[TYPE_BALTHARUS] != DONE) + pCreature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER); + m_mNpcEntryGuidStore[pCreature->GetEntry()] = pCreature->GetObjectGuid(); + break; case NPC_ZARITHRIAN: if (m_auiEncounter[TYPE_SAVIANA] == DONE && m_auiEncounter[TYPE_BALTHARUS] == DONE) pCreature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); // no break; case NPC_BALTHARUS: - case NPC_XERESTRASZA: + case NPC_HALION_REAL: + case NPC_HALION_TWILIGHT: case NPC_HALION_CONTROLLER: m_mNpcEntryGuidStore[pCreature->GetEntry()] = pCreature->GetObjectGuid(); break; @@ -101,6 +109,10 @@ void instance_ruby_sanctum::OnObjectCreate(GameObject* pGo) if (m_auiEncounter[TYPE_ZARITHRIAN] == DONE) pGo->SetGoState(GO_STATE_ACTIVE); break; + case GO_TWILIGHT_PORTAL_ENTER_1: + case GO_TWILIGHT_PORTAL_ENTER_2: + case GO_TWILIGHT_PORTAL_LEAVE: + break; default: return; } @@ -155,8 +167,35 @@ void instance_ruby_sanctum::SetData(uint32 uiType, uint32 uiData) } break; case TYPE_HALION: + // Don't set the same data twice + if (m_auiEncounter[uiType] == uiData) + return; m_auiEncounter[uiType] = uiData; DoUseDoorOrButton(GO_FLAME_RING); + switch (uiData) + { + case FAIL: + // Despawn the boss + if (Creature* pHalion = GetSingleCreatureFromStorage(NPC_HALION_REAL)) + pHalion->ForcedDespawn(); + if (Creature* pHalion = GetSingleCreatureFromStorage(NPC_HALION_TWILIGHT)) + pHalion->ForcedDespawn(); + // Note: rest of the cleanup is handled by creature_linking + + m_uiHalionResetTimer = 30000; + // no break; + case DONE: + // clear debuffs + if (Creature* pController = GetSingleCreatureFromStorage(NPC_HALION_CONTROLLER)) + pController->CastSpell(pController, SPELL_CLEAR_DEBUFFS, true); + + // Despawn the portals + if (GameObject* pPortal = GetSingleGameObjectFromStorage(GO_TWILIGHT_PORTAL_ENTER_1)) + pPortal->SetLootState(GO_JUST_DEACTIVATED); + + // ToDo: despawn the other portals as well, and disable world state + break; + } break; } @@ -211,7 +250,7 @@ void instance_ruby_sanctum::Update(uint32 uiDiff) // Spawn Halion if (Creature* pSummoner = GetSingleCreatureFromStorage(NPC_HALION_CONTROLLER)) { - if (Creature* pHalion = pSummoner->SummonCreature(NPC_HALION_REAL, pSummoner->GetPositionX(), pSummoner->GetPositionY(), pSummoner->GetPositionZ(), pSummoner->GetOrientation(), TEMPSUMMON_DEAD_DESPAWN, 0)) + if (Creature* pHalion = pSummoner->SummonCreature(NPC_HALION_REAL, pSummoner->GetPositionX(), pSummoner->GetPositionY(), pSummoner->GetPositionZ(), 3.159f, TEMPSUMMON_DEAD_DESPAWN, 0)) DoScriptText(SAY_HALION_SPAWN, pHalion); } m_uiHalionSummonTimer = 0; @@ -222,6 +261,23 @@ void instance_ruby_sanctum::Update(uint32 uiDiff) else m_uiHalionSummonTimer -= uiDiff; } + + // Resummon Halion if the encounter resets + if (m_uiHalionResetTimer) + { + if (m_uiHalionResetTimer <= uiDiff) + { + if (Creature* pSummoner = GetSingleCreatureFromStorage(NPC_HALION_CONTROLLER)) + pSummoner->SummonCreature(NPC_HALION_REAL, pSummoner->GetPositionX(), pSummoner->GetPositionY(), pSummoner->GetPositionZ(), 3.159f, TEMPSUMMON_DEAD_DESPAWN, 0); + + if (Creature* pHalion = GetSingleCreatureFromStorage(NPC_HALION_TWILIGHT)) + pHalion->Respawn(); + + m_uiHalionResetTimer = 0; + } + else + m_uiHalionResetTimer -= uiDiff; + } } void instance_ruby_sanctum::Load(const char* chrIn) diff --git a/scripts/northrend/ruby_sanctum/ruby_sanctum.h b/scripts/northrend/ruby_sanctum/ruby_sanctum.h index 15d962c54..25dd95826 100644 --- a/scripts/northrend/ruby_sanctum/ruby_sanctum.h +++ b/scripts/northrend/ruby_sanctum/ruby_sanctum.h @@ -18,10 +18,10 @@ enum NPC_HALION_TWILIGHT = 40142, // Halion - Twilight Realm NPC NPC_HALION_CONTROLLER = 40146, - // NPC_SHADOW_PULSAR_N = 40083, // Halion event - Shadow orb - // NPC_SHADOW_PULSAR_S = 40100, - // NPC_ORB_CARRIER = 40081, - // NPC_ORB_ROTATION_FOCUS = 40091, + NPC_SHADOW_ORB_1 = 40083, // shadow orbs for Halion encounter + NPC_SHADOW_ORB_2 = 40100, + NPC_SHADOW_ORB_3 = 40468, // heroic only + NPC_SHADOW_ORB_4 = 40469, // heroic only NPC_SAVIANA = 39747, // minibosses NPC_BALTHARUS = 39751, @@ -30,13 +30,14 @@ enum NPC_XERESTRASZA = 40429, // friendly npc, used for some cinematic and quest NPC_ZARITHRIAN_SPAWN_STALKER = 39794, - // GO_HALION_PORTAL_1 = 202794, // Portals used in the Halion encounter - // GO_HALION_PORTAL_2 = 202795, - // GO_HALION_PORTAL_3 = 202796, + GO_TWILIGHT_PORTAL_ENTER_1 = 202794, // Portals used in the Halion encounter + GO_TWILIGHT_PORTAL_ENTER_2 = 202795, + GO_TWILIGHT_PORTAL_LEAVE = 202796, GO_FIRE_FIELD = 203005, // Xerestrasza flame door GO_FLAME_WALLS = 203006, // Zarithrian flame walls GO_FLAME_RING = 203007, // Halion flame ring + GO_TWILIGHT_FLAME_RING = 203624, // Halion flame ring - twilight version GO_BURNING_TREE_1 = 203036, // Trees which burn when Halion appears GO_BURNING_TREE_2 = 203037, @@ -46,12 +47,14 @@ enum // Spells used to summon Halion SPELL_FIRE_PILLAR = 76006, SPELL_FIERY_EXPLOSION = 76010, + SPELL_CLEAR_DEBUFFS = 75396, // cast by the controller on encounter reset SAY_HALION_SPAWN = -1724024, // world state to show corporeality in Halion encounter - phase 3 - UPDATE_STATE_UI_SHOW = 5049, - UPDATE_STATE_UI_COUNT = 5050, + WORLD_STATE_CORP_PHYSICAL = 5049, + WORLD_STATE_CORP_TWILIGHT = 5050, + WORLD_STATE_CORPOREALITY = 5051, }; class MANGOS_DLL_DECL instance_ruby_sanctum : public ScriptedInstance @@ -88,6 +91,7 @@ class MANGOS_DLL_DECL instance_ruby_sanctum : public ScriptedInstance uint32 m_uiHalionSummonTimer; uint32 m_uiHalionSummonStage; + uint32 m_uiHalionResetTimer; GuidList m_lSpawnStalkersGuidList; }; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 6e4d2c6c2..c9451cf7c 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2798" + #define SD2_REVISION_NR "2799" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 5899cea4b..6b341d834 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -912,6 +912,8 @@ UPDATE creature_template SET ScriptName='boss_baltharus' WHERE entry=39751; UPDATE creature_template SET ScriptName='boss_saviana' WHERE entry=39747; UPDATE creature_template SET ScriptName='boss_zarithrian' WHERE entry=39746; UPDATE creature_template SET ScriptName='npc_baltharus_clone' WHERE entry=39899; +UPDATE creature_template SET ScriptName='boss_halion_real' WHERE entry=39863; +UPDATE creature_template SET ScriptName='boss_halion_twilight' WHERE entry=40142; /* RUINS OF AHN'QIRAJ */ UPDATE instance_template SET ScriptName='instance_ruins_of_ahnqiraj' WHERE map=509; diff --git a/sql/updates/r2799_mangos.sql b/sql/updates/r2799_mangos.sql new file mode 100644 index 000000000..4de80fe5a --- /dev/null +++ b/sql/updates/r2799_mangos.sql @@ -0,0 +1,2 @@ +UPDATE creature_template SET ScriptName='boss_halion_real' WHERE entry=39863; +UPDATE creature_template SET ScriptName='boss_halion_twilight' WHERE entry=40142; From 4aef0ea06143ff0704877f057e3ddfe3e946a9ce Mon Sep 17 00:00:00 2001 From: Xfurry Date: Fri, 1 Mar 2013 10:10:08 +0200 Subject: [PATCH 0797/1172] [2800] Cleanup some white spaces --- .../scarlet_enclave/ebon_hold.cpp | 2 +- .../zulaman/instance_zulaman.cpp | 2 +- .../instance_obsidian_sanctum.cpp | 2 +- .../northrend/ruby_sanctum/boss_baltharus.cpp | 4 ++-- .../northrend/ruby_sanctum/boss_halion.cpp | 24 +++++++++---------- .../ruby_sanctum/instance_ruby_sanctum.cpp | 2 +- .../ulduar/ulduar/instance_ulduar.cpp | 2 +- .../instance_serpent_shrine.cpp | 2 +- sd2_revision_nr.h | 2 +- sd2_revision_sql.h | 4 ++-- 10 files changed, 23 insertions(+), 23 deletions(-) diff --git a/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp b/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp index 564a9537e..af44fd317 100644 --- a/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp +++ b/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp @@ -2229,7 +2229,7 @@ struct MANGOS_DLL_DECL npc_highlord_darion_mograineAI : public npc_escortAI if (Creature* pTemp = m_pInstance->GetSingleCreatureFromStorage(aLightArmySpawnLoc[i].m_uiEntry)) { pTemp->SetStandState(UNIT_STAND_STATE_DEAD); - pTemp->KnockBackFrom(pLichKing, 50, float(urand(44, 87))/10); + pTemp->KnockBackFrom(pLichKing, 50, float(urand(44, 87)) / 10); } } } diff --git a/scripts/eastern_kingdoms/zulaman/instance_zulaman.cpp b/scripts/eastern_kingdoms/zulaman/instance_zulaman.cpp index fc91c4971..5f2247442 100644 --- a/scripts/eastern_kingdoms/zulaman/instance_zulaman.cpp +++ b/scripts/eastern_kingdoms/zulaman/instance_zulaman.cpp @@ -434,7 +434,7 @@ bool instance_zulaman::CheckConditionCriteriaMeet(Player const* pPlayer, uint32 } script_error_log("instance_zulaman::CheckConditionCriteriaMeet called with unsupported Id %u. Called with param plr %s, src %s, condition source type %u", - uiInstanceConditionId, pPlayer ? pPlayer->GetGuidStr().c_str() : "NULL", pConditionSource ? pConditionSource->GetGuidStr().c_str() : "NULL", conditionSourceType); + uiInstanceConditionId, pPlayer ? pPlayer->GetGuidStr().c_str() : "NULL", pConditionSource ? pConditionSource->GetGuidStr().c_str() : "NULL", conditionSourceType); return false; } diff --git a/scripts/northrend/obsidian_sanctum/instance_obsidian_sanctum.cpp b/scripts/northrend/obsidian_sanctum/instance_obsidian_sanctum.cpp index 8edd3a9b7..b1173bc5d 100644 --- a/scripts/northrend/obsidian_sanctum/instance_obsidian_sanctum.cpp +++ b/scripts/northrend/obsidian_sanctum/instance_obsidian_sanctum.cpp @@ -102,7 +102,7 @@ bool instance_obsidian_sanctum::CheckConditionCriteriaMeet(Player const* pPlayer } script_error_log("instance_obsidian_sanctum::CheckConditionCriteriaMeet called with unsupported Id %u. Called with param plr %s, src %s, condition source type %u", - uiInstanceConditionId, pPlayer ? pPlayer->GetGuidStr().c_str() : "NULL", pConditionSource ? pConditionSource->GetGuidStr().c_str() : "NULL", conditionSourceType); + uiInstanceConditionId, pPlayer ? pPlayer->GetGuidStr().c_str() : "NULL", pConditionSource ? pConditionSource->GetGuidStr().c_str() : "NULL", conditionSourceType); return false; } diff --git a/scripts/northrend/ruby_sanctum/boss_baltharus.cpp b/scripts/northrend/ruby_sanctum/boss_baltharus.cpp index 43cf8daad..8239d07e1 100644 --- a/scripts/northrend/ruby_sanctum/boss_baltharus.cpp +++ b/scripts/northrend/ruby_sanctum/boss_baltharus.cpp @@ -210,7 +210,7 @@ struct MANGOS_DLL_DECL boss_baltharusAI : public ScriptedAI if (m_uiEnervatingBrandTimer < uiDiff) { - if (Unit *pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) { if (DoCastSpellIfCan(pTarget, SPELL_ENERVATING_BRAND) == CAST_OK) m_uiEnervatingBrandTimer = 25000; @@ -271,7 +271,7 @@ struct MANGOS_DLL_DECL npc_baltharus_cloneAI : public ScriptedAI if (m_uiEnervatingBrandTimer < uiDiff) { - if (Unit *pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) { if (DoCastSpellIfCan(pTarget, SPELL_ENERVATING_BRAND) == CAST_OK) m_uiEnervatingBrandTimer = 25000; diff --git a/scripts/northrend/ruby_sanctum/boss_halion.cpp b/scripts/northrend/ruby_sanctum/boss_halion.cpp index 32ce11539..ed1fd5aec 100644 --- a/scripts/northrend/ruby_sanctum/boss_halion.cpp +++ b/scripts/northrend/ruby_sanctum/boss_halion.cpp @@ -137,7 +137,7 @@ static const float aRotationFocusPosition[4] = {3113.711f, 533.5382f, 72.96f, 1. static const float aOrbCarrierPosition1[3] = {3153.75f, 579.1875f, 70.47f}; static const float aOrbCarrierPosition2[3] = {3153.75f, 487.1875f, 70.47f}; - /*###### +/*###### ## boss_halion_real ######*/ @@ -168,7 +168,7 @@ struct MANGOS_DLL_DECL boss_halion_realAI : public ScriptedAI m_uiCleaveTimer = urand(5000, 10000); m_uiFieryCombustionTimer = 15000; m_uiMeteorTimer = 20000; - m_uiBerserkTimer = 8*MINUTE*IN_MILLISECONDS; + m_uiBerserkTimer = 8 * MINUTE * IN_MILLISECONDS; } void Aggro(Unit* /*pWho*/) override @@ -197,7 +197,7 @@ struct MANGOS_DLL_DECL boss_halion_realAI : public ScriptedAI if (m_pInstance) m_pInstance->SetData(TYPE_HALION, DONE); - DoScriptText(SAY_DEATH,m_creature); + DoScriptText(SAY_DEATH, m_creature); } void JustReachedHome() override @@ -315,7 +315,7 @@ struct MANGOS_DLL_DECL boss_halion_realAI : public ScriptedAI if (m_uiMeteorTimer < uiDiff) { - if (Unit *pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1)) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1)) { if (DoCastSpellIfCan(pTarget, SPELL_METEOR_SUMMON) == CAST_OK) { @@ -333,7 +333,7 @@ struct MANGOS_DLL_DECL boss_halion_realAI : public ScriptedAI if (DoCastSpellIfCan(m_creature, SPELL_TWILIGHT_PHASING, CAST_INTERRUPT_PREVIOUS) == CAST_OK) { DoCastSpellIfCan(m_creature, SPELL_SUMMON_PORTAL, CAST_TRIGGERED); - DoScriptText(SAY_PHASE_2,m_creature); + DoScriptText(SAY_PHASE_2, m_creature); DoPrepareTwilightPhase(); m_uiPhase = PHASE_TWILIGHT_REALM; } @@ -406,7 +406,7 @@ struct MANGOS_DLL_DECL boss_halion_twilightAI : public ScriptedAI { // ToDo: handle the damage sharing! - DoScriptText(SAY_DEATH,m_creature); + DoScriptText(SAY_DEATH, m_creature); } void KilledUnit(Unit* pVictim) override @@ -458,7 +458,7 @@ struct MANGOS_DLL_DECL boss_halion_twilightAI : public ScriptedAI if (m_uiTailLashTimer < uiDiff) { - if(DoCastSpellIfCan(m_creature, SPELL_TAIL_LASH) == CAST_OK) + if (DoCastSpellIfCan(m_creature, SPELL_TAIL_LASH) == CAST_OK) m_uiTailLashTimer = urand(15000, 25000); } else @@ -466,7 +466,7 @@ struct MANGOS_DLL_DECL boss_halion_twilightAI : public ScriptedAI if (m_uiCleaveTimer < uiDiff) { - if(DoCastSpellIfCan(m_creature->getVictim(), SPELL_CLEAVE) == CAST_OK) + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_CLEAVE) == CAST_OK) m_uiCleaveTimer = urand(10000, 15000); } else @@ -474,7 +474,7 @@ struct MANGOS_DLL_DECL boss_halion_twilightAI : public ScriptedAI if (m_uiDarkBreathTimer < uiDiff) { - if(DoCastSpellIfCan(m_creature->getVictim(), SPELL_DARK_BREATH) == CAST_OK) + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_DARK_BREATH) == CAST_OK) m_uiDarkBreathTimer = urand(15000, 20000); } else @@ -482,7 +482,7 @@ struct MANGOS_DLL_DECL boss_halion_twilightAI : public ScriptedAI if (m_uiSoulConsumptionTimer < uiDiff) { - if (Unit *pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0, SPELL_SOUL_CONSUMPTION, SELECT_FLAG_PLAYER)) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0, SPELL_SOUL_CONSUMPTION, SELECT_FLAG_PLAYER)) { if (DoCastSpellIfCan(pTarget, SPELL_SOUL_CONSUMPTION) == CAST_OK) m_uiSoulConsumptionTimer = 25000; @@ -505,7 +505,7 @@ struct MANGOS_DLL_DECL boss_halion_twilightAI : public ScriptedAI pHalion->SetHealth(m_creature->GetHealth()); } - DoScriptText(SAY_PHASE_3,m_creature); + DoScriptText(SAY_PHASE_3, m_creature); m_uiPhase = PHASE_BOTH_REALMS; } } @@ -529,7 +529,7 @@ CreatureAI* GetAI_boss_halion_twilight(Creature* pCreature) void AddSC_boss_halion() { - Script *pNewScript; + Script* pNewScript; pNewScript = new Script; pNewScript->Name = "boss_halion_real"; diff --git a/scripts/northrend/ruby_sanctum/instance_ruby_sanctum.cpp b/scripts/northrend/ruby_sanctum/instance_ruby_sanctum.cpp index c18c982c3..c35d04d08 100644 --- a/scripts/northrend/ruby_sanctum/instance_ruby_sanctum.cpp +++ b/scripts/northrend/ruby_sanctum/instance_ruby_sanctum.cpp @@ -75,7 +75,7 @@ void instance_ruby_sanctum::OnCreatureCreate(Creature* pCreature) case NPC_ZARITHRIAN: if (m_auiEncounter[TYPE_SAVIANA] == DONE && m_auiEncounter[TYPE_BALTHARUS] == DONE) pCreature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - // no break; + // no break; case NPC_BALTHARUS: case NPC_HALION_REAL: case NPC_HALION_TWILIGHT: diff --git a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp index 2796aead6..3b658731f 100644 --- a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp +++ b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp @@ -463,7 +463,7 @@ bool instance_ulduar::CheckConditionCriteriaMeet(Player const* pPlayer, uint32 u } script_error_log("instance_ulduar::CheckConditionCriteriaMeet called with unsupported Id %u. Called with param plr %s, src %s, condition source type %u", - uiInstanceConditionId, pPlayer ? pPlayer->GetGuidStr().c_str() : "NULL", pConditionSource ? pConditionSource->GetGuidStr().c_str() : "NULL", conditionSourceType); + uiInstanceConditionId, pPlayer ? pPlayer->GetGuidStr().c_str() : "NULL", pConditionSource ? pConditionSource->GetGuidStr().c_str() : "NULL", conditionSourceType); return false; } diff --git a/scripts/outland/coilfang_reservoir/serpent_shrine/instance_serpent_shrine.cpp b/scripts/outland/coilfang_reservoir/serpent_shrine/instance_serpent_shrine.cpp index 6f8562e71..c6c626452 100644 --- a/scripts/outland/coilfang_reservoir/serpent_shrine/instance_serpent_shrine.cpp +++ b/scripts/outland/coilfang_reservoir/serpent_shrine/instance_serpent_shrine.cpp @@ -212,7 +212,7 @@ bool instance_serpentshrine_cavern::CheckConditionCriteriaMeet(Player const* pPl } script_error_log("instance_serpentshrine_cavern::CheckConditionCriteriaMeet called with unsupported Id %u. Called with param plr %s, src %s, condition source type %u", - uiInstanceConditionId, pPlayer ? pPlayer->GetGuidStr().c_str() : "NULL", pConditionSource ? pConditionSource->GetGuidStr().c_str() : "NULL", conditionSourceType); + uiInstanceConditionId, pPlayer ? pPlayer->GetGuidStr().c_str() : "NULL", pConditionSource ? pConditionSource->GetGuidStr().c_str() : "NULL", conditionSourceType); return false; } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index c9451cf7c..cc55ee899 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2799" + #define SD2_REVISION_NR "2800" #endif // __SD2_REVISION_NR_H__ diff --git a/sd2_revision_sql.h b/sd2_revision_sql.h index 997c33355..f47a90c17 100644 --- a/sd2_revision_sql.h +++ b/sd2_revision_sql.h @@ -1,5 +1,5 @@ #ifndef __SD2_REVISION_SQL_H__ #define __SD2_REVISION_SQL_H__ - #define REVISION_DB_SCRIPTDEV2 "required__scriptdev2" - #define REVISION_DB_SD2_MANGOS "required__mangos" +#define REVISION_DB_SCRIPTDEV2 "required__scriptdev2" +#define REVISION_DB_SD2_MANGOS "required__mangos" #endif // __SD2_REVISION_SQL_H__ From 4bd14d481a082fb6482929674de3be6324c95c94 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sun, 3 Mar 2013 02:00:37 +0200 Subject: [PATCH 0798/1172] [2801] Improve script for Halls of Stone Add support for achievement 2155 - Abuse the Ooze Improve Tribunal event spell support This expects CMangos [12387] --- .../ulduar/halls_of_stone/boss_sjonnir.cpp | 49 ++++-- .../ulduar/halls_of_stone/halls_of_stone.cpp | 150 ++++++++++++++++-- .../ulduar/halls_of_stone/halls_of_stone.h | 17 ++ .../instance_halls_of_stone.cpp | 65 ++++++-- sd2_revision_nr.h | 2 +- sd2_revision_sql.h | 4 +- sql/mangos_scriptname_full.sql | 2 + sql/scriptdev2_script_full.sql | 5 + sql/updates/r2801_mangos.sql | 2 + sql/updates/r2801_scriptdev2.sql | 4 + 10 files changed, 259 insertions(+), 41 deletions(-) create mode 100644 sql/updates/r2801_mangos.sql create mode 100644 sql/updates/r2801_scriptdev2.sql diff --git a/scripts/northrend/ulduar/halls_of_stone/boss_sjonnir.cpp b/scripts/northrend/ulduar/halls_of_stone/boss_sjonnir.cpp index 441f15d99..c5a33ef80 100644 --- a/scripts/northrend/ulduar/halls_of_stone/boss_sjonnir.cpp +++ b/scripts/northrend/ulduar/halls_of_stone/boss_sjonnir.cpp @@ -62,13 +62,14 @@ enum // Cast at 15% hp when Bran repairs the machine SPELL_SUMMON_EARTHEN_DWARF = 50824, // left/right 50825, 50826 - SPELL_SUMMON_IRON_SLUDGE = 50747, // instakill TARGET_SCRIPT - SPELL_IRON_SLUDGE_SPAWN_VISUAL = 50777, + // Ooze and Sludge spells + SPELL_OOZE_COMBINE = 50741, // periodic aura - cast by 27981 + // SPELL_SUMMON_IRON_SLUDGE = 50747, // instakill TARGET_SCRIPT + // SPELL_IRON_SLUDGE_SPAWN_VISUAL = 50777, NPC_IRON_TROGG = 27979, NPC_IRON_DWARF = 27982, NPC_MALFORMED_OOZE = 27981, - NPC_IRON_SLUDGE = 28165, NPC_EARTHEN_DWARF = 27980, }; @@ -134,16 +135,43 @@ struct MANGOS_DLL_DECL boss_sjonnirAI : public ScriptedAI void JustSummoned(Creature* pSummoned) override { - if (pSummoned->GetEntry() == NPC_IRON_TROGG || pSummoned->GetEntry() == NPC_IRON_DWARF || pSummoned->GetEntry() == NPC_MALFORMED_OOZE) + switch (pSummoned->GetEntry()) { - float fX, fY, fZ; - pSummoned->GetRandomPoint(m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), 10.0f, fX, fY, fZ); + case NPC_EARTHEN_DWARF: + pSummoned->AI()->AttackStart(m_creature); + break; + case NPC_MALFORMED_OOZE: + { + pSummoned->CastSpell(pSummoned, SPELL_OOZE_COMBINE, true); + + // Always move to the center of the room + float fX, fY, fZ; + m_creature->GetRespawnCoord(fX, fY, fZ); + + pSummoned->SetWalk(false); + pSummoned->GetMotionMaster()->MovePoint(1, fX, fY, fZ); + break; + } + case NPC_IRON_TROGG: + case NPC_IRON_DWARF: + { + // Move to a random point around the room in order to start the attack + float fX, fY, fZ; + pSummoned->GetRandomPoint(m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), 10.0f, fX, fY, fZ); - pSummoned->SetWalk(false); - pSummoned->GetMotionMaster()->MovePoint(0, fX, fY, fZ); + pSummoned->SetWalk(false); + pSummoned->GetMotionMaster()->MovePoint(0, fX, fY, fZ); + break; + } } - else if (pSummoned->GetEntry() == NPC_EARTHEN_DWARF) - pSummoned->AI()->AttackStart(m_creature); + } + + void SummonedMovementInform(Creature* pSummoned, uint32 uiType, uint32 uiPointId) override + { + if (uiType != POINT_MOTION_TYPE || pSummoned->GetEntry() != NPC_MALFORMED_OOZE || !uiPointId) + return; + + pSummoned->GetMotionMaster()->MoveRandomAroundPoint(pSummoned->GetPositionX(), pSummoned->GetPositionY(), pSummoned->GetPositionZ(), 10.0f); } void KilledUnit(Unit* /*pVictim*/) override @@ -188,6 +216,7 @@ struct MANGOS_DLL_DECL boss_sjonnirAI : public ScriptedAI case 50: if (DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_SUMMON_MALFORMED_OOZE : SPELL_SUMMON_MALFORMED_OOZE_H, CAST_TRIGGERED) == CAST_OK) m_uiHpCheck = 15; + break; case 15: if (DoFrenzyIfCan()) m_uiHpCheck = 0; diff --git a/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.cpp b/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.cpp index 468dbf149..cbe627098 100644 --- a/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.cpp +++ b/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.cpp @@ -95,22 +95,27 @@ enum SAY_ENTRANCE_MEET = -1599064, + GOSSIP_ITEM_ID_START = -3599000, + GOSSIP_ITEM_ID_PROGRESS = -3599001, + TEXT_ID_START = 13100, TEXT_ID_PROGRESS = 13101, - SPELL_STEALTH = 58506, + // ToDo: use spells to summon the dwarfs + SPELL_SUMMON_PROTECTOR = 51780, // all spells are casted by stalker npcs 28130 + SPELL_SUMMON_STORMCALLER = 51050, + SPELL_SUMMON_CUSTODIAN = 51051, - SPELL_ACHIEVEMENT_CHECK = 59046, // Doesn't exist in client dbc + SPELL_STEALTH = 58506, - NPC_DARK_RUNE_PROTECTOR = 27983, - NPC_DARK_RUNE_STORMCALLER = 27984, - NPC_IRON_GOLEM_CUSTODIAN = 27985, + SPELL_ACHIEVEMENT_CHECK = 59046, // Doesn't exist in client dbc - QUEST_HALLS_OF_STONE = 13207, -}; + NPC_DARK_RUNE_PROTECTOR = 27983, + NPC_DARK_RUNE_STORMCALLER = 27984, + NPC_IRON_GOLEM_CUSTODIAN = 27985, -#define GOSSIP_ITEM_START "Brann, it would be our honor!" -#define GOSSIP_ITEM_PROGRESS "Let's move Brann, enough of the history lessons!" + QUEST_HALLS_OF_STONE = 13207, +}; struct Location { @@ -605,12 +610,12 @@ bool GossipHello_npc_brann_hos(Player* pPlayer, Creature* pCreature) { if (pInstance->GetData(TYPE_TRIBUNAL) == NOT_STARTED || pInstance->GetData(TYPE_TRIBUNAL) == FAIL) { - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_START, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); + pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_ID_START, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); pPlayer->SEND_GOSSIP_MENU(TEXT_ID_START, pCreature->GetObjectGuid()); } else if (pInstance->GetData(TYPE_TRIBUNAL) == IN_PROGRESS) { - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_PROGRESS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); + pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_ID_PROGRESS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); pPlayer->SEND_GOSSIP_MENU(TEXT_ID_PROGRESS, pCreature->GetObjectGuid()); } } @@ -641,6 +646,119 @@ CreatureAI* GetAI_npc_brann_hos(Creature* pCreature) return new npc_brann_hosAI(pCreature); } +enum +{ + SPELL_SUMMON_DARK_MATTER_TARGET = 51003, + SPELL_DARK_MATTER = 51012, + SPELL_DARK_MATTER_H = 59868, + NPC_DARK_MATTER_TARGET = 28237, + + SPELL_SEARING_GAZE = 51136, + SPELL_SEARING_GAZE_H = 59867, + // NPC_SEARING_GAZE_TARGET = 28265, +}; + +/*###### +## npc_dark_matter +######*/ + +struct MANGOS_DLL_DECL npc_dark_matterAI : public ScriptedAI +{ + npc_dark_matterAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); + Reset(); + } + + bool m_bIsRegularMode; + + uint32 m_uiSummonTimer; + + void Reset() override + { + m_uiSummonTimer = 0; + } + + void AttackStart(Unit* pWho) override { } + void MoveInLineOfSight(Unit* pWho) override { } + + void SpellHit(Unit* pCaster, const SpellEntry* pSpell) override + { + if (pSpell->Id == SPELL_DARK_MATTER_START) + m_uiSummonTimer = 5000; + } + + void JustSummoned(Creature* pSummoned) override + { + if (pSummoned->GetEntry() == NPC_DARK_MATTER_TARGET) + m_creature->GetMotionMaster()->MovePoint(1, pSummoned->GetPositionX(), pSummoned->GetPositionY(), pSummoned->GetPositionZ()); + } + + void MovementInform(uint32 uiMoveType, uint32 uiPointId) override + { + if (uiMoveType != POINT_MOTION_TYPE || !uiPointId) + return; + + // Cast the Dark Matter spell and despawn for reset + if (DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_DARK_MATTER : SPELL_DARK_MATTER_H) == CAST_OK) + { + m_creature->SetRespawnDelay(3); + m_creature->ForcedDespawn(1000); + } + } + + void UpdateAI(const uint32 uiDiff) override + { + if (m_uiSummonTimer) + { + if (m_uiSummonTimer <= uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_SUMMON_DARK_MATTER_TARGET) == CAST_OK) + m_uiSummonTimer = 0; + } + else + m_uiSummonTimer -= uiDiff; + } + } +}; + +CreatureAI* GetAI_npc_dark_matter(Creature* pCreature) +{ + return new npc_dark_matterAI(pCreature); +} + +/*###### +## npc_searing_gaze +######*/ + +// TODO Move this 'script' to eventAI when combat can be proper prevented from core-side +struct MANGOS_DLL_DECL npc_searing_gazeAI : public Scripted_NoMovementAI +{ + npc_searing_gazeAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) + { + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); + Reset(); + } + + bool m_bIsRegularMode; + + void Reset() override + { + DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_SEARING_GAZE : SPELL_SEARING_GAZE_H); + // despawn manually because of combat bug + m_creature->ForcedDespawn(30000); + } + + void AttackStart(Unit* pWho) override { } + void MoveInLineOfSight(Unit* pWho) override { } + void UpdateAI(const uint32 uiDiff) override { } +}; + +CreatureAI* GetAI_npc_searing_gaze(Creature* pCreature) +{ + return new npc_searing_gazeAI(pCreature); +} + void AddSC_halls_of_stone() { Script* pNewScript; @@ -651,4 +769,14 @@ void AddSC_halls_of_stone() pNewScript->pGossipHello = &GossipHello_npc_brann_hos; pNewScript->pGossipSelect = &GossipSelect_npc_brann_hos; pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_dark_matter"; + pNewScript->GetAI = &GetAI_npc_dark_matter; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_searing_gaze"; + pNewScript->GetAI = &GetAI_npc_searing_gaze; + pNewScript->RegisterSelf(); } diff --git a/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.h b/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.h index eaf82dba8..955eb59c8 100644 --- a/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.h +++ b/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.h @@ -21,6 +21,9 @@ enum NPC_MARNAK = 30897, NPC_TRIBUNAL_OF_AGES = 28234, NPC_WORLDTRIGGER = 22515, + NPC_DARK_MATTER = 28235, // used by the Tribunal event + NPC_LIGHTNING_STALKER = 28130, // used by the Tribunal event as spawn point for the dwarfs + NPC_IRON_SLUDGE = 28165, // checked in the Sjonnir achiev NPC_SJONNIR = 27978, GO_DOOR_MAIDEN = 191292, @@ -40,12 +43,19 @@ enum GO_SJONNIR_CONSOLE = 193906, + SPELL_DARK_MATTER_START = 51001, // Channeled spells used by the Tribunal event + MAX_FACES = 3, FACE_MARNAK = 0, FACE_ABEDNEUM = 1, FACE_KADDRAK = 2, + MAX_ACHIEV_SLUDGES = 5, + ACHIEV_START_MAIDEN_ID = 20383, + + ACHIEV_CRIT_BRANN = 7590, // Brann, achiev 2154 + ACHIEV_CRIT_ABUSE_OOZE = 7593, // Snonnir, achiev 2155 }; struct Face @@ -69,6 +79,8 @@ class MANGOS_DLL_DECL instance_halls_of_stone : public ScriptedInstance void OnCreatureCreate(Creature* pCreature) override; void OnObjectCreate(GameObject* pGo) override; + void OnCreatureDeath(Creature* pCreature) override; + void SetData(uint32 uiType, uint32 uiData) override; uint32 GetData(uint32 uiType) const override; @@ -77,6 +89,8 @@ class MANGOS_DLL_DECL instance_halls_of_stone : public ScriptedInstance void Update(uint32 uiDiff) override; + bool CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/) const override; + void ActivateFace(uint8 uiFace, bool bAfterEvent); void DoFaceSpeak(uint8 uiFace, int32 iTextId); @@ -88,6 +102,9 @@ class MANGOS_DLL_DECL instance_halls_of_stone : public ScriptedInstance Face m_aFaces[MAX_FACES]; std::string m_strInstData; + uint8 m_uiIronSludgeKilled; + bool m_bIsBrannSpankin; + GuidList m_lKaddrakGUIDs; GuidList m_lAbedneumGUIDs; GuidList m_lMarnakGUIDs; diff --git a/scripts/northrend/ulduar/halls_of_stone/instance_halls_of_stone.cpp b/scripts/northrend/ulduar/halls_of_stone/instance_halls_of_stone.cpp index 280b6df75..d375682a5 100644 --- a/scripts/northrend/ulduar/halls_of_stone/instance_halls_of_stone.cpp +++ b/scripts/northrend/ulduar/halls_of_stone/instance_halls_of_stone.cpp @@ -16,7 +16,7 @@ /* ScriptData SDName: Instance_Halls_of_Stone -SD%Complete: 10% +SD%Complete: 50% SDComment: SDCategory: Halls of Stone EndScriptData */ @@ -31,19 +31,17 @@ enum SPELL_GLARE_OF_THE_TRIBUNAL_H = 59870, // MARNAK - SPELL_SUMMON_DARK_MATTER_TARGET = 51003, - SPELL_DARK_MATTER = 51012, // Exact mechanics unknown - SPELL_DARK_MATTER_H = 59868, - // NPC_DARK_MATTER_TARGET = 28237, + // Spells are handled in individual script // ABEDNEUM - SPELL_SUMMON_SEARING_GAZE_TARGET = 51146, - SPELL_SEARING_GAZE = 51136, - SPELL_SEARING_GAZE_H = 59867, - // NPC_SEARING_GAZE_TARGET = 28265, + SPELL_SUMMON_SEARING_GAZE_TARGET = 51146, // The other spells are handled in individual script + + SPELL_KILL_TRIBUNAL_ADD = 51288, // Cleanup event on finish }; -instance_halls_of_stone::instance_halls_of_stone(Map* pMap) : ScriptedInstance(pMap) +instance_halls_of_stone::instance_halls_of_stone(Map* pMap) : ScriptedInstance(pMap), + m_bIsBrannSpankin(false), + m_uiIronSludgeKilled(0) { Initialize(); } @@ -62,8 +60,9 @@ void instance_halls_of_stone::OnCreatureCreate(Creature* pCreature) case NPC_MARNAK: m_lMarnakGUIDs.push_back(pCreature->GetObjectGuid()); break; case NPC_TRIBUNAL_OF_AGES: m_lTribunalGUIDs.push_back(pCreature->GetObjectGuid()); break; case NPC_WORLDTRIGGER: m_lWorldtriggerGUIDs.push_back(pCreature->GetObjectGuid()); break; + case NPC_DARK_MATTER: case NPC_SJONNIR: - m_mNpcEntryGuidStore[NPC_SJONNIR] = pCreature->GetObjectGuid(); + m_mNpcEntryGuidStore[pCreature->GetEntry()] = pCreature->GetObjectGuid(); break; } } @@ -111,6 +110,8 @@ void instance_halls_of_stone::SetData(uint32 uiType, uint32 uiData) { case IN_PROGRESS: SortFaces(); + // Uncomment when this achievement is implemented + // m_bIsBrannSpankin = true; break; case DONE: DoToggleGameObjectFlags(instance->IsRegularDifficulty() ? GO_TRIBUNAL_CHEST : GO_TRIBUNAL_CHEST_H, GO_FLAG_NO_INTERACT, false); @@ -132,8 +133,13 @@ void instance_halls_of_stone::SetData(uint32 uiType, uint32 uiData) { m_aFaces[i].m_bIsActive = false; m_aFaces[i].m_uiTimer = 1000; - // TODO - Kill NPCs // TODO - Check which stay red and how long (also find out how they get red..) + + // Cleanup when finished + if (Creature* pEye = instance->GetCreature(m_aFaces[i].m_leftEyeGuid)) + pEye->CastSpell(pEye, SPELL_KILL_TRIBUNAL_ADD, true); + if (Creature* pEye = instance->GetCreature(m_aFaces[i].m_rightEyeGuid)) + pEye->CastSpell(pEye, SPELL_KILL_TRIBUNAL_ADD, true); } break; } @@ -149,6 +155,8 @@ void instance_halls_of_stone::SetData(uint32 uiType, uint32 uiData) case TYPE_SJONNIR: m_auiEncounter[uiType] = uiData; DoUseDoorOrButton(GO_DOOR_SJONNIR); + if (uiData == IN_PROGRESS) + m_uiIronSludgeKilled = 0; break; } @@ -174,6 +182,20 @@ uint32 instance_halls_of_stone::GetData(uint32 uiType) const return 0; } +bool instance_halls_of_stone::CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/) const +{ + switch (uiCriteriaId) + { + case ACHIEV_CRIT_BRANN: + return m_bIsBrannSpankin; + case ACHIEV_CRIT_ABUSE_OOZE: + return m_uiIronSludgeKilled >= MAX_ACHIEV_SLUDGES; + + default: + return false; + } +} + struct SortHelper { SortHelper(WorldObject const* pRef): m_pRef(pRef) {} @@ -298,6 +320,12 @@ void instance_halls_of_stone::DoFaceSpeak(uint8 uiFace, int32 iTextId) DoScriptText(iTextId, pSpeaker); } +void instance_halls_of_stone::OnCreatureDeath(Creature* pCreature) +{ + if (pCreature->GetEntry() == NPC_IRON_SLUDGE && GetData(TYPE_SJONNIR) == IN_PROGRESS) + ++m_uiIronSludgeKilled; +} + void instance_halls_of_stone::Update(uint32 uiDiff) { if (m_auiEncounter[TYPE_TRIBUNAL] == IN_PROGRESS) @@ -347,15 +375,18 @@ void instance_halls_of_stone::ProcessFace(uint8 uiFace) pEye->CastSpell(pEye, instance->IsRegularDifficulty() ? SPELL_GLARE_OF_THE_TRIBUNAL : SPELL_GLARE_OF_THE_TRIBUNAL_H, true); if (Creature* pEye = instance->GetCreature(m_aFaces[uiFace].m_rightEyeGuid)) pEye->CastSpell(pEye, instance->IsRegularDifficulty() ? SPELL_GLARE_OF_THE_TRIBUNAL : SPELL_GLARE_OF_THE_TRIBUNAL_H, true, NULL, NULL, m_aFaces[uiFace].m_leftEyeGuid); - m_aFaces[uiFace].m_uiTimer = 1500; // TODO, verify + m_aFaces[uiFace].m_uiTimer = urand(1000, 2000); break; case FACE_MARNAK: - if (Creature* pEye = instance->GetCreature(m_aFaces[uiFace].m_leftEyeGuid)) - pEye->CastSpell(pEye, SPELL_SUMMON_DARK_MATTER_TARGET, true); + if (Creature* pDarkMatter = GetSingleCreatureFromStorage(NPC_DARK_MATTER)) + pDarkMatter->CastSpell(pDarkMatter, SPELL_DARK_MATTER_START, true); + // Note: Marnak doesn't cast anything directly. Keep this code for reference only. + // if (Creature* pEye = instance->GetCreature(m_aFaces[uiFace].m_leftEyeGuid)) + // pEye->CastSpell(pEye, SPELL_SUMMON_DARK_MATTER_TARGET, true); // One should be enough.. // if (Creature* pEye = instance->GetCreature(m_aFaces[uiFace].m_rightEyeGuid)) // pEye->CastSpell(pEye, SPELL_SUMMON_DARK_MATTER_TARGET, true); - m_aFaces[uiFace].m_uiTimer = 21000; // TODO, verify, was 3s+0..1s + m_aFaces[uiFace].m_uiTimer = urand(21000, 30000); break; case FACE_ABEDNEUM: if (Creature* pEye = instance->GetCreature(m_aFaces[uiFace].m_leftEyeGuid)) @@ -363,7 +394,7 @@ void instance_halls_of_stone::ProcessFace(uint8 uiFace) // One should be enough.. // if (Creature* pEye = instance->GetCreature(m_aFaces[uiFace].m_rightEyeGuid)) // pEye->CastSpell(pEye, SPELL_SUMMON_SEARING_GAZE_TARGET, true); - m_aFaces[uiFace].m_uiTimer = 21000; // TODO, verify, was 3s+0..2s + m_aFaces[uiFace].m_uiTimer = urand(15000, 20000); break; default: return; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index cc55ee899..cff338081 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2800" + #define SD2_REVISION_NR "2801" #endif // __SD2_REVISION_NR_H__ diff --git a/sd2_revision_sql.h b/sd2_revision_sql.h index f47a90c17..997c33355 100644 --- a/sd2_revision_sql.h +++ b/sd2_revision_sql.h @@ -1,5 +1,5 @@ #ifndef __SD2_REVISION_SQL_H__ #define __SD2_REVISION_SQL_H__ -#define REVISION_DB_SCRIPTDEV2 "required__scriptdev2" -#define REVISION_DB_SD2_MANGOS "required__mangos" + #define REVISION_DB_SCRIPTDEV2 "required__scriptdev2" + #define REVISION_DB_SD2_MANGOS "required__mangos" #endif // __SD2_REVISION_SQL_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 6b341d834..f0560a921 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -1205,6 +1205,8 @@ UPDATE instance_template SET ScriptName='instance_halls_of_stone' WHERE map=599; UPDATE creature_template SET ScriptName='boss_maiden_of_grief' WHERE entry=27975; UPDATE creature_template SET ScriptName='boss_sjonnir' WHERE entry=27978; UPDATE creature_template SET ScriptName='npc_brann_hos' WHERE entry=28070; +UPDATE creature_template SET ScriptName='npc_dark_matter' WHERE entry=28235; +UPDATE creature_template SET ScriptName='npc_searing_gaze' WHERE entry=28265; /* ULDUAR */ UPDATE instance_template SET ScriptName='instance_ulduar' WHERE map=603; diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index fe44817d3..e0d9f7666 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -4557,6 +4557,11 @@ INSERT INTO gossip_texts (entry,content_default,comment) VALUES (-3595004,'What was this decision?','chromie GOSSIP_ITEM_INN_2'), (-3595005,'So how does the Infinite Dragonflight plan to interfere?','chromie GOSSIP_ITEM_INN_3'); +-- -3 599 000 HALLS OF STONE +INSERT INTO gossip_texts (entry,content_default,comment) VALUES +(-3599000,'Brann, it would be our honor!','brann GOSSIP_ITEM_ID_START'), +(-3599001,'Let\'s move Brann, enough of the history lessons!','brann GOSSIP_ITEM_ID_PROGRESS'); + -- -3 603 000 ULDUAR INSERT INTO gossip_texts (entry,content_default,comment) VALUES (-3603000,'Teleport to the Expedition Base Camp.','GOSSIP_ITEM_TELE_BASE_CAMP'), diff --git a/sql/updates/r2801_mangos.sql b/sql/updates/r2801_mangos.sql new file mode 100644 index 000000000..ca24aa2c4 --- /dev/null +++ b/sql/updates/r2801_mangos.sql @@ -0,0 +1,2 @@ +UPDATE creature_template SET ScriptName='npc_dark_matter' WHERE entry=28235; +UPDATE creature_template SET ScriptName='npc_searing_gaze' WHERE entry=28265; diff --git a/sql/updates/r2801_scriptdev2.sql b/sql/updates/r2801_scriptdev2.sql new file mode 100644 index 000000000..8de4f70ce --- /dev/null +++ b/sql/updates/r2801_scriptdev2.sql @@ -0,0 +1,4 @@ +DELETE FROM gossip_texts WHERE entry IN (-3599000, -3599001); +INSERT INTO gossip_texts (entry,content_default,comment) VALUES +(-3599000,'Brann, it would be our honor!','brann GOSSIP_ITEM_ID_START'), +(-3599001,'Let\'s move Brann, enough of the history lessons!','brann GOSSIP_ITEM_ID_PROGRESS'); From 0b1baa07a1524e7b603bce2b891ffd24753fba9c Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sun, 3 Mar 2013 22:47:35 +0200 Subject: [PATCH 0799/1172] [2802] Slightly improve script for Slad'ran --- scripts/northrend/gundrak/boss_sladran.cpp | 101 ++++++------------ scripts/northrend/gundrak/gundrak.h | 4 + .../northrend/gundrak/instance_gundrak.cpp | 14 +++ sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 - sql/updates/r2802_mangos.sql | 1 + 6 files changed, 54 insertions(+), 69 deletions(-) create mode 100644 sql/updates/r2802_mangos.sql diff --git a/scripts/northrend/gundrak/boss_sladran.cpp b/scripts/northrend/gundrak/boss_sladran.cpp index 62d36147c..c368e6172 100644 --- a/scripts/northrend/gundrak/boss_sladran.cpp +++ b/scripts/northrend/gundrak/boss_sladran.cpp @@ -47,66 +47,37 @@ enum SPELL_SUMMON_VIPER = 55060, SPELL_SUMMON_CONSTRICTOR = 54969, + // Constrictor spells SPELL_GRIP_OF_SLADRAN = 55093, SPELL_GRIP_OF_SLADRAN_H = 61474, + // Snake Wrap spells - mechanics unk + SPELL_SNAKE_WRAP = 55099, + SPELL_SNAKE_WRAP_H = 61475, + SPELL_SNAKE_WRAP_SUMMON = 55126, + SPELL_SNAKE_WRAP_SUMMON_H = 61476, + SPELL_SNAKE_WRAP_EFFECT = 55128, + SPELL_SNAKE_WRAP_SNAKES = 55127, // kills all snakes + NPC_SLADRAN_CONSTRICTOR = 29713, NPC_SLADRAN_VIPER = 29680, NPC_SNAKE_WRAP = 29742, - NPC_SLADRAN_SUMMON_TARGET = 29682 }; -/*###### -## mob_sladran_summon_target -######*/ -struct MANGOS_DLL_DECL mob_sladran_summon_targetAI : public ScriptedAI -{ - mob_sladran_summon_targetAI(Creature* pCreature) : ScriptedAI(pCreature) - { - m_pInstance = (instance_gundrak*)pCreature->GetInstanceData(); - Reset(); - } - - instance_gundrak* m_pInstance; - - void Reset() override {} - void MoveInLineOfSight(Unit* pWho) override {} - void AttackStart(Unit* pWho) override {} - - void JustSummoned(Creature* pSummoned) override - { - if (!m_pInstance) - return; - - if (Creature* pSladran = m_pInstance->GetSingleCreatureFromStorage(NPC_SLADRAN)) - { - float fPosX, fPosY, fPosZ; - pSladran->GetPosition(fPosX, fPosY, fPosZ); - pSummoned->GetMotionMaster()->MovePoint(0, fPosX, fPosY, fPosZ); - } - } - - void UpdateAI(const uint32 diff) override {} -}; - -CreatureAI* GetAI_mob_sladran_summon_target(Creature* pCreature) -{ - return new mob_sladran_summon_targetAI(pCreature); -} - /*###### ## boss_sladran ######*/ + struct MANGOS_DLL_DECL boss_sladranAI : public ScriptedAI { boss_sladranAI(Creature* pCreature) : ScriptedAI(pCreature) { - m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_pInstance = (instance_gundrak*)pCreature->GetInstanceData(); m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); Reset(); } - ScriptedInstance* m_pInstance; + instance_gundrak* m_pInstance; bool m_bIsRegularMode; uint32 m_uiSummonTimer; @@ -154,18 +125,13 @@ struct MANGOS_DLL_DECL boss_sladranAI : public ScriptedAI m_pInstance->SetData(TYPE_SLADRAN, FAIL); } - Creature* SelectRandomCreatureOfEntryInRange(uint32 uiEntry, float fRange) + void JustSummoned(Creature* pSummoned) override { - std::list lCreatureList; - GetCreatureListWithEntryInGrid(lCreatureList, m_creature, uiEntry, fRange); - - if (lCreatureList.empty()) - return NULL; - - std::list::iterator iter = lCreatureList.begin(); - advance(iter, urand(0, lCreatureList.size() - 1)); + if (pSummoned->GetEntry() != NPC_SLADRAN_CONSTRICTOR && pSummoned->GetEntry() != NPC_SLADRAN_VIPER) + return; - return *iter; + pSummoned->SetWalk(false); + pSummoned->GetMotionMaster()->MovePoint(0, m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), false); } void UpdateAI(const uint32 uiDiff) override @@ -175,16 +141,21 @@ struct MANGOS_DLL_DECL boss_sladranAI : public ScriptedAI if (m_uiPoisonNovaTimer < uiDiff) { - DoScriptText(EMOTE_NOVA, m_creature); - DoCastSpellIfCan(m_creature->getVictim(), m_bIsRegularMode ? SPELL_POISON_NOVA : SPELL_POISON_NOVA_H); - m_uiPoisonNovaTimer = 22000; + if (DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_POISON_NOVA : SPELL_POISON_NOVA_H) == CAST_OK) + { + DoScriptText(EMOTE_NOVA, m_creature); + m_uiPoisonNovaTimer = 22000; + } } else m_uiPoisonNovaTimer -= uiDiff; if (m_uiSummonTimer < uiDiff) { - if (Creature* pSummonTarget = SelectRandomCreatureOfEntryInRange(NPC_SLADRAN_SUMMON_TARGET, 75.0f)) + if (!m_pInstance) + return; + + if (Creature* pSummonTarget = m_creature->GetMap()->GetCreature(m_pInstance->SelectRandomSladranTargetGuid())) { if (urand(0, 3)) { @@ -192,7 +163,7 @@ struct MANGOS_DLL_DECL boss_sladranAI : public ScriptedAI if (!urand(0, 4)) DoScriptText(SAY_SUMMON_CONSTRICTOR, m_creature); - pSummonTarget->CastSpell(pSummonTarget, SPELL_SUMMON_CONSTRICTOR, false); + pSummonTarget->CastSpell(pSummonTarget, SPELL_SUMMON_CONSTRICTOR, false, NULL, NULL, m_creature->GetObjectGuid()); } else { @@ -200,7 +171,7 @@ struct MANGOS_DLL_DECL boss_sladranAI : public ScriptedAI if (!urand(0, 4)) DoScriptText(SAY_SUMMON_SNAKE, m_creature); - pSummonTarget->CastSpell(pSummonTarget, SPELL_SUMMON_VIPER, false); + pSummonTarget->CastSpell(pSummonTarget, SPELL_SUMMON_VIPER, false, NULL, NULL, m_creature->GetObjectGuid()); } } @@ -211,8 +182,8 @@ struct MANGOS_DLL_DECL boss_sladranAI : public ScriptedAI if (m_uiPowerfulBiteTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), m_bIsRegularMode ? SPELL_POWERFUL_BITE : SPELL_POWERFUL_BITE_H); - m_uiPowerfulBiteTimer = 10000; + if (DoCastSpellIfCan(m_creature->getVictim(), m_bIsRegularMode ? SPELL_POWERFUL_BITE : SPELL_POWERFUL_BITE_H) == CAST_OK) + m_uiPowerfulBiteTimer = 10000; } else m_uiPowerfulBiteTimer -= uiDiff; @@ -220,9 +191,10 @@ struct MANGOS_DLL_DECL boss_sladranAI : public ScriptedAI if (m_uiVenomBoltTimer < uiDiff) { if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) - DoCastSpellIfCan(pTarget, m_bIsRegularMode ? SPELL_VENOM_BOLT : SPELL_VENOM_BOLT_H); - - m_uiVenomBoltTimer = 15000; + { + if (DoCastSpellIfCan(pTarget, m_bIsRegularMode ? SPELL_VENOM_BOLT : SPELL_VENOM_BOLT_H) == CAST_OK) + m_uiVenomBoltTimer = 15000; + } } else m_uiVenomBoltTimer -= uiDiff; @@ -244,9 +216,4 @@ void AddSC_boss_sladran() pNewScript->Name = "boss_sladran"; pNewScript->GetAI = &GetAI_boss_sladran; pNewScript->RegisterSelf(); - - pNewScript = new Script; - pNewScript->Name = "mob_sladran_summon_target"; - pNewScript->GetAI = &GetAI_mob_sladran_summon_target; - pNewScript->RegisterSelf(); } diff --git a/scripts/northrend/gundrak/gundrak.h b/scripts/northrend/gundrak/gundrak.h index cffc3794f..4bb3d00f6 100644 --- a/scripts/northrend/gundrak/gundrak.h +++ b/scripts/northrend/gundrak/gundrak.h @@ -34,6 +34,7 @@ enum NPC_GALDARAH = 29306, NPC_ECK = 29932, NPC_INVISIBLE_STALKER = 30298, // Caster and Target for visual spells on altar use + NPC_SLADRAN_SUMMON_T = 29682, GO_ECK_DOOR = 192632, GO_ECK_UNDERWATER_DOOR = 192569, @@ -88,6 +89,8 @@ class MANGOS_DLL_DECL instance_gundrak : public ScriptedInstance const char* Save() const override { return m_strInstData.c_str(); } void Load(const char* chrIn) override; + ObjectGuid SelectRandomSladranTargetGuid(); + void SetLessRabiAchievementCriteria(bool bIsMet) { m_bLessRabi = bIsMet; } bool CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/) const override; @@ -103,6 +106,7 @@ class MANGOS_DLL_DECL instance_gundrak : public ScriptedInstance TypeTimerMap m_mKeyInProgress; GuidList m_luiStalkerGUIDs; + GuidList m_lSummonTargetsGuids; GuidVector m_vStalkerCasterGuids; GuidVector m_vStalkerTargetGuids; GuidSet m_sColossusMojosGuids; diff --git a/scripts/northrend/gundrak/instance_gundrak.cpp b/scripts/northrend/gundrak/instance_gundrak.cpp index 761e0958e..ea4176070 100644 --- a/scripts/northrend/gundrak/instance_gundrak.cpp +++ b/scripts/northrend/gundrak/instance_gundrak.cpp @@ -69,6 +69,9 @@ void instance_gundrak::OnCreatureCreate(Creature* pCreature) case NPC_INVISIBLE_STALKER: m_luiStalkerGUIDs.push_back(pCreature->GetObjectGuid()); break; + case NPC_SLADRAN_SUMMON_T: + m_lSummonTargetsGuids.push_back(pCreature->GetObjectGuid()); + break; case NPC_LIVIN_MOJO: // Store only the Mojos used to activate the Colossus @@ -305,6 +308,17 @@ void instance_gundrak::OnCreatureEnterCombat(Creature* pCreature) } } +ObjectGuid instance_gundrak::SelectRandomSladranTargetGuid() +{ + if (m_lSummonTargetsGuids.empty()) + return ObjectGuid(); + + GuidList::iterator iter = m_lSummonTargetsGuids.begin(); + advance(iter, urand(0, m_lSummonTargetsGuids.size() - 1)); + + return *iter; +} + static bool sortFromEastToWest(Creature* pFirst, Creature* pSecond) { return pFirst && pSecond && pFirst->GetPositionY() < pSecond->GetPositionY(); diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index cff338081..7bf7a1648 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2801" + #define SD2_REVISION_NR "2802" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index f0560a921..2c028a092 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -599,7 +599,6 @@ UPDATE creature_template SET ScriptName='boss_eck' WHERE entry=29932; UPDATE creature_template SET ScriptName='boss_galdarah' WHERE entry=29306; UPDATE creature_template SET ScriptName='boss_moorabi' WHERE entry=29305; UPDATE creature_template SET ScriptName='boss_sladran' WHERE entry=29304; -UPDATE creature_template SET ScriptName='mob_sladran_summon_target' WHERE entry=29682; UPDATE gameobject_template SET ScriptName='go_gundrak_altar' WHERE entry IN (192518, 192519, 192520); UPDATE instance_template SET ScriptName='instance_gundrak' WHERE map=604; diff --git a/sql/updates/r2802_mangos.sql b/sql/updates/r2802_mangos.sql new file mode 100644 index 000000000..a78ab7677 --- /dev/null +++ b/sql/updates/r2802_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='' WHERE entry=29682; From d995d3d478753229be30e0a8a40a860bb0f191f9 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Tue, 5 Mar 2013 09:31:00 +0200 Subject: [PATCH 0800/1172] [2803] Update Tribunal of Ages event to blizzlike This will allow summoning using the spells, resulting in a better spawn position --- .../ulduar/halls_of_stone/halls_of_stone.cpp | 40 +++++++++++-------- .../ulduar/halls_of_stone/halls_of_stone.h | 8 ++++ .../instance_halls_of_stone.cpp | 9 +++++ sd2_revision_nr.h | 2 +- 4 files changed, 42 insertions(+), 17 deletions(-) diff --git a/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.cpp b/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.cpp index cbe627098..b9e01a0af 100644 --- a/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.cpp +++ b/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.cpp @@ -101,7 +101,6 @@ enum TEXT_ID_START = 13100, TEXT_ID_PROGRESS = 13101, - // ToDo: use spells to summon the dwarfs SPELL_SUMMON_PROTECTOR = 51780, // all spells are casted by stalker npcs 28130 SPELL_SUMMON_STORMCALLER = 51050, SPELL_SUMMON_CUSTODIAN = 51051, @@ -117,17 +116,6 @@ enum QUEST_HALLS_OF_STONE = 13207, }; -struct Location -{ - float fX, fY, fZ; -}; - -static Location SpawnLoc[] = -{ - {946.992f, 397.016f, 208.374f}, - {960.748f, 382.944f, 208.374f}, -}; - /*###### ## npc_brann_hos ######*/ @@ -254,23 +242,43 @@ struct MANGOS_DLL_DECL npc_brann_hosAI : public npc_escortAI void SpawnDwarf(uint32 uEntry) { + if (!m_pInstance) + return; + + // each case has an individual spawn stalker switch (uEntry) { case NPC_DARK_RUNE_PROTECTOR: { + Creature* pStalker = m_creature->GetMap()->GetCreature(m_pInstance->GetProtectorStalkerGuid()); + if (!pStalker) + return; + uint32 uiSpawnNumber = (m_bIsRegularMode ? 2 : 3); for (uint8 i = 0; i < uiSpawnNumber; ++i) - m_creature->SummonCreature(NPC_DARK_RUNE_PROTECTOR, SpawnLoc[0].fX, SpawnLoc[0].fY, SpawnLoc[0].fZ, 0.0f, TEMPSUMMON_DEAD_DESPAWN, 30000); - m_creature->SummonCreature(NPC_DARK_RUNE_STORMCALLER, SpawnLoc[0].fX, SpawnLoc[0].fY, SpawnLoc[0].fZ, 0.0f, TEMPSUMMON_DEAD_DESPAWN, 30000); + pStalker->CastSpell(pStalker, SPELL_SUMMON_PROTECTOR, true, NULL, NULL, m_creature->GetObjectGuid()); + pStalker->CastSpell(pStalker, SPELL_SUMMON_STORMCALLER, true, NULL, NULL, m_creature->GetObjectGuid()); break; } case NPC_DARK_RUNE_STORMCALLER: + { + Creature* pStalker = m_creature->GetMap()->GetCreature(m_pInstance->GeStormcallerStalkerGuid()); + if (!pStalker) + return; + for (uint8 i = 0; i < 2; ++i) - m_creature->SummonCreature(NPC_DARK_RUNE_STORMCALLER, SpawnLoc[1].fX, SpawnLoc[1].fY, SpawnLoc[1].fZ, 0.0f, TEMPSUMMON_DEAD_DESPAWN, 30000); + pStalker->CastSpell(pStalker, SPELL_SUMMON_STORMCALLER, true, NULL, NULL, m_creature->GetObjectGuid()); break; + } case NPC_IRON_GOLEM_CUSTODIAN: - m_creature->SummonCreature(NPC_IRON_GOLEM_CUSTODIAN, SpawnLoc[1].fX, SpawnLoc[1].fY, SpawnLoc[1].fZ, 0.0f, TEMPSUMMON_DEAD_DESPAWN, 30000); + { + Creature* pStalker = m_creature->GetMap()->GetCreature(m_pInstance->GetCustodianStalkerGuid()); + if (!pStalker) + return; + + pStalker->CastSpell(pStalker, SPELL_SUMMON_CUSTODIAN, true, NULL, NULL, m_creature->GetObjectGuid()); break; + } } } diff --git a/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.h b/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.h index 955eb59c8..68f741bbb 100644 --- a/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.h +++ b/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.h @@ -94,6 +94,10 @@ class MANGOS_DLL_DECL instance_halls_of_stone : public ScriptedInstance void ActivateFace(uint8 uiFace, bool bAfterEvent); void DoFaceSpeak(uint8 uiFace, int32 iTextId); + ObjectGuid GetProtectorStalkerGuid() { return m_protectorStalkerGuid; } + ObjectGuid GeStormcallerStalkerGuid() { return m_stormcallerStalkerGuid; } + ObjectGuid GetCustodianStalkerGuid() { return m_custodianStalkerGuid; } + private: void SortFaces(); void ProcessFace(uint8 uiFace); @@ -105,6 +109,10 @@ class MANGOS_DLL_DECL instance_halls_of_stone : public ScriptedInstance uint8 m_uiIronSludgeKilled; bool m_bIsBrannSpankin; + ObjectGuid m_protectorStalkerGuid; + ObjectGuid m_stormcallerStalkerGuid; + ObjectGuid m_custodianStalkerGuid; + GuidList m_lKaddrakGUIDs; GuidList m_lAbedneumGUIDs; GuidList m_lMarnakGUIDs; diff --git a/scripts/northrend/ulduar/halls_of_stone/instance_halls_of_stone.cpp b/scripts/northrend/ulduar/halls_of_stone/instance_halls_of_stone.cpp index d375682a5..3dcbbd8bd 100644 --- a/scripts/northrend/ulduar/halls_of_stone/instance_halls_of_stone.cpp +++ b/scripts/northrend/ulduar/halls_of_stone/instance_halls_of_stone.cpp @@ -60,6 +60,15 @@ void instance_halls_of_stone::OnCreatureCreate(Creature* pCreature) case NPC_MARNAK: m_lMarnakGUIDs.push_back(pCreature->GetObjectGuid()); break; case NPC_TRIBUNAL_OF_AGES: m_lTribunalGUIDs.push_back(pCreature->GetObjectGuid()); break; case NPC_WORLDTRIGGER: m_lWorldtriggerGUIDs.push_back(pCreature->GetObjectGuid()); break; + case NPC_LIGHTNING_STALKER: + // Sort the dwarf summoning stalkers + if (pCreature->GetPositionY() > 400.0f) + m_protectorStalkerGuid = pCreature->GetObjectGuid(); + else if (pCreature->GetPositionY() > 380.0f) + m_stormcallerStalkerGuid = pCreature->GetObjectGuid(); + else + m_custodianStalkerGuid = pCreature->GetObjectGuid(); + break; case NPC_DARK_MATTER: case NPC_SJONNIR: m_mNpcEntryGuidStore[pCreature->GetEntry()] = pCreature->GetObjectGuid(); diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 7bf7a1648..d839050e2 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2802" + #define SD2_REVISION_NR "2803" #endif // __SD2_REVISION_NR_H__ From 7d924255dc70177b98f2b5da88bb31eb9355cda4 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Tue, 5 Mar 2013 10:22:39 +0200 Subject: [PATCH 0801/1172] [2804] Add placeholder for Varos Cloudstrider - Oculus Also improve Oculus instance script by fixing Eregos spawn exploit and allow better handling of the Centrifuge Constructs in case of server restart --- VC100/100ScriptDev2.vcxproj | 1 + VC100/100ScriptDev2.vcxproj.filters | 3 + VC110/110ScriptDev2.vcxproj | 1 + VC110/110ScriptDev2.vcxproj.filters | 3 + VC90/90ScriptDev2.vcproj | 4 ++ scripts/northrend/nexus/oculus/boss_varos.cpp | 29 ++++++++++ .../nexus/oculus/instance_oculus.cpp | 56 ++++++++++++++----- scripts/northrend/nexus/oculus/oculus.h | 8 ++- sd2_revision_nr.h | 2 +- system/ScriptLoader.cpp | 2 + 10 files changed, 92 insertions(+), 17 deletions(-) create mode 100644 scripts/northrend/nexus/oculus/boss_varos.cpp diff --git a/VC100/100ScriptDev2.vcxproj b/VC100/100ScriptDev2.vcxproj index 52ebdb817..7526f0dcd 100644 --- a/VC100/100ScriptDev2.vcxproj +++ b/VC100/100ScriptDev2.vcxproj @@ -512,6 +512,7 @@ + diff --git a/VC100/100ScriptDev2.vcxproj.filters b/VC100/100ScriptDev2.vcxproj.filters index 0b6e58044..879cd8f40 100644 --- a/VC100/100ScriptDev2.vcxproj.filters +++ b/VC100/100ScriptDev2.vcxproj.filters @@ -1128,6 +1128,9 @@ scripts\northrend\nexus\oculus + + scripts\northrend\nexus\oculus + scripts\northrend\nexus\oculus diff --git a/VC110/110ScriptDev2.vcxproj b/VC110/110ScriptDev2.vcxproj index 294ff4d5c..0b9bb6674 100644 --- a/VC110/110ScriptDev2.vcxproj +++ b/VC110/110ScriptDev2.vcxproj @@ -517,6 +517,7 @@ + diff --git a/VC110/110ScriptDev2.vcxproj.filters b/VC110/110ScriptDev2.vcxproj.filters index 0b6e58044..879cd8f40 100644 --- a/VC110/110ScriptDev2.vcxproj.filters +++ b/VC110/110ScriptDev2.vcxproj.filters @@ -1128,6 +1128,9 @@ scripts\northrend\nexus\oculus + + scripts\northrend\nexus\oculus + scripts\northrend\nexus\oculus diff --git a/VC90/90ScriptDev2.vcproj b/VC90/90ScriptDev2.vcproj index 7c8d8fce3..9e99072e6 100644 --- a/VC90/90ScriptDev2.vcproj +++ b/VC90/90ScriptDev2.vcproj @@ -1853,6 +1853,10 @@ RelativePath="..\scripts\northrend\nexus\oculus\boss_urom.cpp" > + + diff --git a/scripts/northrend/nexus/oculus/boss_varos.cpp b/scripts/northrend/nexus/oculus/boss_varos.cpp new file mode 100644 index 000000000..253ea999b --- /dev/null +++ b/scripts/northrend/nexus/oculus/boss_varos.cpp @@ -0,0 +1,29 @@ +/* Copyright (C) 2006 - 2013 ScriptDev2 + * 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_varos +SD%Complete: 0 +SDComment: Placeholder +SDCategory: Oculus +EndScriptData */ + +#include "precompiled.h" + +void AddSC_boss_varos() +{ + +} diff --git a/scripts/northrend/nexus/oculus/instance_oculus.cpp b/scripts/northrend/nexus/oculus/instance_oculus.cpp index 264416406..d620b9235 100644 --- a/scripts/northrend/nexus/oculus/instance_oculus.cpp +++ b/scripts/northrend/nexus/oculus/instance_oculus.cpp @@ -17,15 +17,14 @@ /* ScriptData SDName: instance_oculus SD%Complete: 50 -SDComment: Spawn instance bosses and handle Varos pre event; Dialogue NYI +SDComment: Spawn instance bosses and handle Varos pre event; Dialogue handled by DBScripts SDCategory: Oculus EndScriptData */ #include "precompiled.h" #include "oculus.h" -instance_oculus::instance_oculus(Map* pMap) : ScriptedInstance(pMap), - m_uiConstructsDead(0) +instance_oculus::instance_oculus(Map* pMap) : ScriptedInstance(pMap) { Initialize(); } @@ -37,7 +36,16 @@ void instance_oculus::Initialize() void instance_oculus::OnPlayerEnter(Player* pPlayer) { + if (GetData(TYPE_EREGOS) == DONE) + return; + DoSpawnNextBossIfCan(); + + if (GetData(TYPE_DRAKOS) == DONE && GetData(TYPE_VAROS) == NOT_STARTED) + { + pPlayer->SendUpdateWorldState(WORLD_STATE_CONSTRUCTS, 1); + pPlayer->SendUpdateWorldState(WORLD_STATE_CONSTRUCTS_COUNT, m_sConstructsAliveGUIDSet.size()); + } } void instance_oculus::OnCreatureCreate(Creature* pCreature) @@ -80,12 +88,12 @@ void instance_oculus::SetData(uint32 uiType, uint32 uiData) for (GuidList::const_iterator itr = m_lCageDoorGUIDs.begin(); itr != m_lCageDoorGUIDs.end(); ++itr) DoUseDoorOrButton(*itr); - // Notes: There should also be a small dialogue here involving Belgaristrasz and Varos - // Also the Centrifuge Constructs and the related npcs should be summoned + // Notes: The dialogue is handled by DB script + // Also the Centrifuge Constructs and the related npcs should be summoned - requires additional research - // Activate the world state + // Activate the world state - the Centrifuge contructs should be loaded by now DoUpdateWorldState(WORLD_STATE_CONSTRUCTS, 1); - DoUpdateWorldState(WORLD_STATE_CONSTRUCTS_COUNT, MAX_CONSTRUCTS); + DoUpdateWorldState(WORLD_STATE_CONSTRUCTS_COUNT, m_sConstructsAliveGUIDSet.size()); DoStartTimedAchievement(ACHIEVEMENT_CRITERIA_TYPE_KILL_CREATURE, ACHIEV_START_EREGOS_ID); } @@ -94,22 +102,26 @@ void instance_oculus::SetData(uint32 uiType, uint32 uiData) m_auiEncounter[TYPE_VAROS] = uiData; if (uiData == DONE) { - // Note: Image of Belgaristrasz teleports here after the boss is dead and does some dialogue + // Note: Image of Belgaristrasz dialogue is handled by DB script DoSpawnNextBossIfCan(); DoUpdateWorldState(WORLD_STATE_CONSTRUCTS, 0); } break; case TYPE_UROM: m_auiEncounter[TYPE_UROM] = uiData; - // Note: Image of Belgaristrasz teleports to this boss after it's killed and does some dialogue; Right after this, Eregos appears + // Note: Image of Belgaristrasz dialogue is handled by DB script if (uiData == DONE) DoSpawnNextBossIfCan(); break; case TYPE_EREGOS: m_auiEncounter[TYPE_EREGOS] = uiData; - // Note: Image of Belgaristrasz teleports to the Cache location and does more dialogue + // Note: Image of Belgaristrasz teleports to the Cache location and does more dialogue - requires additional research if (uiData == DONE) + { + // The data about the cache isn't consistent, so it's better to handle both cases DoToggleGameObjectFlags(instance->IsRegularDifficulty() ? GO_CACHE_EREGOS : GO_CACHE_EREGOS_H, GO_FLAG_NO_INTERACT, false); + DoRespawnGameObject(instance->IsRegularDifficulty() ? GO_CACHE_EREGOS : GO_CACHE_EREGOS_H, 30 * MINUTE); + } break; } @@ -135,6 +147,24 @@ uint32 instance_oculus::GetData(uint32 uiType) const return 0; } +void instance_oculus::SetData64(uint32 uiData, uint64 uiGuid) +{ + // If Varos already completed, just ignore + if (GetData(TYPE_VAROS) == DONE) + return; + + // Note: this is handled in Acid. The purpose is check which Centrifuge Construct is alive, in case of server reset + // The function is triggered by eventAI on generic timer + if (uiData == DATA_CONSTRUCTS_EVENT) + { + m_sConstructsAliveGUIDSet.insert(ObjectGuid(uiGuid)); + + // Update world state in case of server reset + if (GetData(TYPE_DRAKOS) == DONE) + DoUpdateWorldState(WORLD_STATE_CONSTRUCTS_COUNT, m_sConstructsAliveGUIDSet.size()); + } +} + void instance_oculus::OnCreatureEnterCombat(Creature* pCreature) { switch (pCreature->GetEntry()) @@ -160,10 +190,10 @@ void instance_oculus::OnCreatureDeath(Creature* pCreature) case NPC_DRAKOS: SetData(TYPE_DRAKOS, DONE); break; case NPC_VAROS: SetData(TYPE_VAROS, DONE); break; case NPC_CENTRIFUGE_CONSTRUCT: - ++m_uiConstructsDead; - DoUpdateWorldState(WORLD_STATE_CONSTRUCTS_COUNT, MAX_CONSTRUCTS - m_uiConstructsDead); + m_sConstructsAliveGUIDSet.erase(pCreature->GetObjectGuid()); + DoUpdateWorldState(WORLD_STATE_CONSTRUCTS_COUNT, m_sConstructsAliveGUIDSet.size()); - if (m_uiConstructsDead == MAX_CONSTRUCTS) + if (m_sConstructsAliveGUIDSet.empty()) { if (Creature* pVaros = GetSingleCreatureFromStorage(NPC_VAROS)) pVaros->InterruptNonMeleeSpells(false); diff --git a/scripts/northrend/nexus/oculus/oculus.h b/scripts/northrend/nexus/oculus/oculus.h index 3387a9500..0d3b888c9 100644 --- a/scripts/northrend/nexus/oculus/oculus.h +++ b/scripts/northrend/nexus/oculus/oculus.h @@ -15,13 +15,14 @@ enum { MAX_ENCOUNTER = 4, - MAX_CONSTRUCTS = 10, TYPE_DRAKOS = 0, TYPE_VAROS = 1, TYPE_UROM = 2, TYPE_EREGOS = 3, + DATA_CONSTRUCTS_EVENT = 1, // DO NOT CHANGE! Used by Acid. - used to check the Centrifuge Constructs alive + NPC_DRAKOS = 27654, NPC_VAROS = 27447, NPC_UROM = 27655, @@ -78,6 +79,8 @@ class MANGOS_DLL_DECL instance_oculus : public ScriptedInstance void SetData(uint32 uiType, uint32 uiData) override; uint32 GetData(uint32 uiType) const override; + void SetData64(uint32 uiType, uint64 uiGuid) override; + const char* Save() const override { return strInstData.c_str(); } void Load(const char* chrIn) override; @@ -87,9 +90,8 @@ class MANGOS_DLL_DECL instance_oculus : public ScriptedInstance uint32 m_auiEncounter[MAX_ENCOUNTER]; std::string strInstData; - uint8 m_uiConstructsDead; - GuidList m_lCageDoorGUIDs; + GuidSet m_sConstructsAliveGUIDSet; }; #endif diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index d839050e2..2c6167940 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2803" + #define SD2_REVISION_NR "2804" #endif // __SD2_REVISION_NR_H__ diff --git a/system/ScriptLoader.cpp b/system/ScriptLoader.cpp index 15bcc807c..bb4483896 100644 --- a/system/ScriptLoader.cpp +++ b/system/ScriptLoader.cpp @@ -317,6 +317,7 @@ extern void AddSC_boss_telestra(); extern void AddSC_instance_nexus(); extern void AddSC_boss_eregos(); // nexus, oculus extern void AddSC_boss_urom(); +extern void AddSC_boss_varos(); extern void AddSC_instance_oculus(); extern void AddSC_boss_sartharion(); // obsidian_sanctum extern void AddSC_instance_obsidian_sanctum(); @@ -778,6 +779,7 @@ void AddScripts() AddSC_instance_nexus(); AddSC_boss_eregos(); // nexus, oculus AddSC_boss_urom(); + AddSC_boss_varos(); AddSC_instance_oculus(); AddSC_boss_sartharion(); // obsidian_sanctum AddSC_instance_obsidian_sanctum(); From c7072a906c2c350630182b7866295a1edeb8eeee Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Tue, 5 Mar 2013 15:47:58 +0100 Subject: [PATCH 0802/1172] Change patch-file's lineendings to LF --- .gitattributes | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitattributes b/.gitattributes index 9fa544d91..c544bf6b3 100644 --- a/.gitattributes +++ b/.gitattributes @@ -2,6 +2,7 @@ *.sln eol=crlf *.vcproj eol=crlf *.vcxproj* eol=crlf +*.patch eol=lf # Whitespace rules # strict (no trailing, no tabs) From 39b75013f7e9758f52e8d9df64aed5badfe64bba Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Tue, 5 Mar 2013 15:49:05 +0100 Subject: [PATCH 0803/1172] Fix a warning --- scripts/outland/shadowmoon_valley.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/outland/shadowmoon_valley.cpp b/scripts/outland/shadowmoon_valley.cpp index e758aaa10..4ee7b8a7e 100644 --- a/scripts/outland/shadowmoon_valley.cpp +++ b/scripts/outland/shadowmoon_valley.cpp @@ -1281,7 +1281,7 @@ bool EffectAuraDummy_npc_totem_of_spirits(const Aura* pAura, bool bApply) return true; // Summon the soul of the spirit and cast the visual - uint32 uiSoulEntry; + uint32 uiSoulEntry = 0; switch (pCaster->GetEntry()) { case NPC_EARTH_SPIRIT: uiSoulEntry = NPC_EARTHEN_SOUL; break; From ba434f90c5ed4f052dfc27b44c759895faad8dad Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Tue, 5 Mar 2013 15:51:12 +0100 Subject: [PATCH 0804/1172] [2805] Fix restarting event after a FAIL Thanks to Ulduar for pointing. Close #42 --- .../kalimdor/caverns_of_time/hyjal/hyjal.cpp | 18 +-- .../caverns_of_time/hyjal/hyjalAI.cpp | 119 +++++++++--------- .../kalimdor/caverns_of_time/hyjal/hyjalAI.h | 8 +- sd2_revision_nr.h | 2 +- 4 files changed, 73 insertions(+), 74 deletions(-) diff --git a/scripts/kalimdor/caverns_of_time/hyjal/hyjal.cpp b/scripts/kalimdor/caverns_of_time/hyjal/hyjal.cpp index 738c0a846..3d14d774e 100644 --- a/scripts/kalimdor/caverns_of_time/hyjal/hyjal.cpp +++ b/scripts/kalimdor/caverns_of_time/hyjal/hyjal.cpp @@ -71,14 +71,14 @@ bool GossipHello_npc_jaina_proudmoore(Player* pPlayer, Creature* pCreature) { if (hyjalAI* pJainaAI = dynamic_cast(pCreature->AI())) { - if (!pJainaAI->m_bIsEventInProgress) + if (!pJainaAI->IsEventInProgress()) { // Should not happen that jaina is here now, but for safe we check if (pInstance->GetData(TYPE_KAZROGAL) != DONE) { - if (pInstance->GetData(TYPE_WINTERCHILL) == NOT_STARTED) + if (pInstance->GetData(TYPE_WINTERCHILL) == NOT_STARTED || pInstance->GetData(TYPE_WINTERCHILL) == FAIL) pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_JAINA_BEGIN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); - else if (pInstance->GetData(TYPE_WINTERCHILL) == DONE && pInstance->GetData(TYPE_ANETHERON) == NOT_STARTED) + else if (pInstance->GetData(TYPE_WINTERCHILL) == DONE && (pInstance->GetData(TYPE_ANETHERON) == NOT_STARTED || pInstance->GetData(TYPE_ANETHERON) == FAIL)) pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_JAINA_ANATHERON, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); else if (pInstance->GetData(TYPE_ANETHERON) == DONE) pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_JAINA_SUCCCESS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); @@ -113,7 +113,7 @@ bool GossipSelect_npc_jaina_proudmoore(Player* pPlayer, Creature* pCreature, uin break; case GOSSIP_ACTION_INFO_DEF: pJainaAI->m_bDebugMode = !pJainaAI->m_bDebugMode; - debug_log("SD2: HyjalAI - Debug mode has been toggled"); + debug_log("SD2: HyjalAI - Debug mode has been toggled %s", pJainaAI->m_bDebugMode ? "on" : "off"); break; } } @@ -143,14 +143,14 @@ bool GossipHello_npc_thrall(Player* pPlayer, Creature* pCreature) { if (hyjalAI* pThrallAI = dynamic_cast(pCreature->AI())) { - if (!pThrallAI->m_bIsEventInProgress) + if (!pThrallAI->IsEventInProgress()) { // Only let them start the Horde phases if Anetheron is dead. - if (pInstance->GetData(TYPE_ANETHERON) == DONE) + if (pInstance->GetData(TYPE_ANETHERON) == DONE && pInstance->GetData(TYPE_ARCHIMONDE) != DONE) { - if (pInstance->GetData(TYPE_KAZROGAL) == NOT_STARTED) + if (pInstance->GetData(TYPE_KAZROGAL) == NOT_STARTED || pInstance->GetData(TYPE_KAZROGAL) == FAIL) pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_THRALL_BEGIN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); - else if (pInstance->GetData(TYPE_KAZROGAL) == DONE && pInstance->GetData(TYPE_AZGALOR) == NOT_STARTED) + else if (pInstance->GetData(TYPE_KAZROGAL) == DONE && (pInstance->GetData(TYPE_AZGALOR) == NOT_STARTED || pInstance->GetData(TYPE_AZGALOR) == FAIL)) pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_THRALL_AZGALOR, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); else if (pInstance->GetData(TYPE_AZGALOR) == DONE) pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_THRALL_SUCCESS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); @@ -185,7 +185,7 @@ bool GossipSelect_npc_thrall(Player* pPlayer, Creature* pCreature, uint32 uiSend break; case GOSSIP_ACTION_INFO_DEF: pThrallAI->m_bDebugMode = !pThrallAI->m_bDebugMode; - debug_log("SD2: HyjalAI - Debug mode has been toggled"); + debug_log("SD2: HyjalAI - Debug mode has been toggled %s", pThrallAI->m_bDebugMode ? "on" : "off"); break; } } diff --git a/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.cpp b/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.cpp index f27eae82f..1baff2ec6 100644 --- a/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.cpp +++ b/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.cpp @@ -144,14 +144,9 @@ static const HyjalWave aHyjalWavesHorde[] = void hyjalAI::Reset() { - // BossGuids - m_aBossGuid[0].Clear(); - m_aBossGuid[1].Clear(); - // Timers m_uiNextWaveTimer = 10000; m_uiWaveMoveTimer = 15000; - m_uiCheckTimer = 0; m_uiRetreatTimer = 25000; // Misc @@ -180,19 +175,35 @@ void hyjalAI::Reset() // Flags m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); + if (!m_pInstance) + return; + // Reset World States m_pInstance->DoUpdateWorldState(WORLD_STATE_WAVES, 0); m_pInstance->DoUpdateWorldState(WORLD_STATE_ENEMY, 0); m_pInstance->DoUpdateWorldState(WORLD_STATE_ENEMYCOUNT, 0); - if (!m_pInstance) - return; - - m_bIsFirstBossDead = m_uiBase ? m_pInstance->GetData(TYPE_KAZROGAL) == DONE : m_pInstance->GetData(TYPE_WINTERCHILL) == DONE; - m_bIsSecondBossDead = m_uiBase ? m_pInstance->GetData(TYPE_AZGALOR) == DONE : m_pInstance->GetData(TYPE_ANETHERON) == DONE; - // Reset Instance Data for trash count m_pInstance->SetData(TYPE_TRASH_COUNT, 0); + + m_bIsFirstBossDead = m_pInstance->GetData(m_uiBase ? TYPE_KAZROGAL : TYPE_WINTERCHILL) == DONE; + m_bIsSecondBossDead = m_pInstance->GetData(m_uiBase ? TYPE_AZGALOR : TYPE_ANETHERON) == DONE; +} + +bool hyjalAI::IsEventInProgress() const +{ + if (m_bIsEventInProgress) + return true; + + // The boss might still be around and alive + for (uint8 i = 0; i < 2; ++i) + { + Creature* pBoss = m_creature->GetMap()->GetCreature(m_aBossGuid[i]); + if (pBoss && pBoss->isAlive()) + return true; + } + + return false; } void hyjalAI::EnterEvadeMode() @@ -283,18 +294,37 @@ void hyjalAI::JustSummoned(Creature* pSummoned) // Check if creature is a boss. if (pSummoned->IsWorldBoss()) - { - if (!m_bIsFirstBossDead) - m_aBossGuid[0] = pSummoned->GetObjectGuid(); - else - m_aBossGuid[1] = pSummoned->GetObjectGuid(); - - m_uiCheckTimer = 5000; - } + m_aBossGuid[!m_bIsFirstBossDead ? 0 : 1] = pSummoned->GetObjectGuid(); else lWaveMobGUIDList.push_back(pSummoned->GetObjectGuid()); } +void hyjalAI::SummonedCreatureJustDied(Creature* pSummoned) +{ + if (!pSummoned->IsWorldBoss()) // Only do stuff when bosses die + return; + + if (m_aBossGuid[0] == pSummoned->GetObjectGuid()) + { + DoTalk(INCOMING); + m_bIsFirstBossDead = true; + } + else if (m_aBossGuid[1] == pSummoned->GetObjectGuid()) + { + DoTalk(SUCCESS); + m_bIsSecondBossDead = true; + } + + m_bIsEventInProgress = false; + + m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); + + // Reset world state for enemies to disable it + m_pInstance->DoUpdateWorldState(WORLD_STATE_ENEMY, 0); + + m_creature->SetActiveObjectState(false); +} + void hyjalAI::SummonNextWave() { // 1 in 4 chance we give a rally yell. Not sure if the chance is offilike. @@ -355,7 +385,6 @@ void hyjalAI::SummonNextWave() } m_uiWaveMoveTimer = 15000; - m_uiCheckTimer = 5000; ++m_uiWaveCount; } @@ -364,13 +393,15 @@ void hyjalAI::StartEvent() if (!m_pInstance) return; + if (IsEventInProgress()) + return; + DoTalk(BEGIN); m_bIsEventInProgress = true; m_bIsSummoningWaves = true; m_uiNextWaveTimer = 10000; - m_uiCheckTimer = 5000; m_creature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); @@ -476,47 +507,6 @@ void hyjalAI::UpdateAI(const uint32 uiDiff) m_uiNextWaveTimer -= uiDiff; } - if (m_uiCheckTimer < uiDiff) - { - for (uint8 i = 0; i < 2; ++i) - { - if (m_aBossGuid[i]) - { - Creature* pBoss = m_creature->GetMap()->GetCreature(m_aBossGuid[i]); - - if (pBoss && !pBoss->isAlive()) - { - if (m_aBossGuid[i] == m_aBossGuid[0]) - { - DoTalk(INCOMING); - m_bIsFirstBossDead = true; - } - else if (m_aBossGuid[i] == m_aBossGuid[1]) - { - DoTalk(SUCCESS); - m_bIsSecondBossDead = true; - } - - m_bIsEventInProgress = false; - m_uiCheckTimer = 0; - - m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); - - m_aBossGuid[i].Clear(); - - // Reset world state for enemies to disable it - m_pInstance->DoUpdateWorldState(WORLD_STATE_ENEMY, 0); - - m_creature->SetActiveObjectState(false); - } - } - } - - m_uiCheckTimer = 5000; - } - else - m_uiCheckTimer -= uiDiff; - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -551,3 +541,8 @@ void hyjalAI::UpdateAI(const uint32 uiDiff) DoMeleeAttackIfReady(); } + +void hyjalAI::JustRespawned() +{ + Reset(); +} diff --git a/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.h b/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.h index 9b0b4d4f3..f8dea38e9 100644 --- a/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.h +++ b/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.h @@ -82,6 +82,8 @@ struct MANGOS_DLL_DECL hyjalAI : public ScriptedAI // Called on death, informs the raid that they have failed. void JustDied(Unit* /*pKiller*/) override; + void JustRespawned() override; + // "Teleport" all friendly creatures away from the base. void Retreat(); @@ -90,6 +92,8 @@ struct MANGOS_DLL_DECL hyjalAI : public ScriptedAI void JustSummoned(Creature*) override; + void SummonedCreatureJustDied(Creature* pSummoned) override; + // Summons the next wave, calls SummonCreature void SummonNextWave(); @@ -102,8 +106,9 @@ struct MANGOS_DLL_DECL hyjalAI : public ScriptedAI // Used to filter who to despawn after mass teleport void SpellHitTarget(Unit*, const SpellEntry*) override; - public: + bool IsEventInProgress() const; + public: ScriptedInstance* m_pInstance; ObjectGuid m_aBossGuid[2]; @@ -111,7 +116,6 @@ struct MANGOS_DLL_DECL hyjalAI : public ScriptedAI uint32 m_uiNextWaveTimer; uint32 m_uiWaveCount; uint32 m_uiWaveMoveTimer; - uint32 m_uiCheckTimer; uint32 m_uiEnemyCount; uint32 m_uiRetreatTimer; uint32 m_uiBase; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 2c6167940..03c110e94 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2804" + #define SD2_REVISION_NR "2805" #endif // __SD2_REVISION_NR_H__ From 5d99327b5b77aabaf995dde575f4642f2b0da913 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Tue, 5 Mar 2013 16:00:54 +0100 Subject: [PATCH 0805/1172] [2806] Implement spell 37136 (related quest 10584) --- scripts/world/spell_scripts.cpp | 15 +++++++++++++++ sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 2 +- sql/updates/r2806_mangos.sql | 1 + 4 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 sql/updates/r2806_mangos.sql diff --git a/scripts/world/spell_scripts.cpp b/scripts/world/spell_scripts.cpp index 6a3116f01..db46335ee 100644 --- a/scripts/world/spell_scripts.cpp +++ b/scripts/world/spell_scripts.cpp @@ -28,6 +28,7 @@ spell 21014 spell 29528 spell 29866 spell 34665 +spell 37136 spell 39246 spell 43340 spell 44935 @@ -334,6 +335,10 @@ enum SPELL_SUMMON_RAZORTHORN_ROOT = 44941, NPC_RAZORTHORN_RAVAGER = 24922, GO_RAZORTHORN_DIRT_MOUND = 187073, + + // for quest 10584 + SPELL_PROTOVOLTAIC_MAGNETO_COLLECTOR= 37136, + NPC_ENCASED_ELECTROMENTAL = 21731, }; bool EffectAuraDummy_spell_aura_dummy_npc(const Aura* pAura, bool bApply) @@ -497,6 +502,16 @@ bool EffectAuraDummy_spell_aura_dummy_npc(const Aura* pAura, bool bApply) return false; } + case SPELL_PROTOVOLTAIC_MAGNETO_COLLECTOR: + { + if (pAura->GetEffIndex() != EFFECT_INDEX_0) + return true; + + Unit* pTarget = pAura->GetTarget(); + if (bApply && pTarget->GetTypeId() == TYPEID_UNIT) + ((Creature*)pTarget)->UpdateEntry(NPC_ENCASED_ELECTROMENTAL); + return true; + } } return false; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 03c110e94..80ca85aaf 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2805" + #define SD2_REVISION_NR "2806" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 2c028a092..653a660e4 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -170,7 +170,7 @@ UPDATE creature_template SET ScriptName='spell_dummy_npc' WHERE entry IN ( -- kalimdor 9299,12296,12298, -- outland -16880,16518,16847,17157,17326,17654,18879,22105,24918,24922,25084,25085, +16880,16518,16847,17157,17326,17654,18879,21729,22105,24918,24922,25084,25085, -- northrend 23678,25752,25753,25758,25792,25793,26268,26270,26421,26616,26643,26841,26924,27122,27263,27264,27265,27808,28053,28054,28068,28093,28465,28600,29319,29327,29329,29330,29338,30146,32149); diff --git a/sql/updates/r2806_mangos.sql b/sql/updates/r2806_mangos.sql new file mode 100644 index 000000000..0224a7a34 --- /dev/null +++ b/sql/updates/r2806_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='spell_dummy_npc' WHERE entry=21729; From 3f2ca2619dbdf05923bcb587d1ca6a52818ca3e4 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Tue, 5 Mar 2013 16:02:40 +0100 Subject: [PATCH 0806/1172] [2807] Fix a typo --- scripts/world/spell_scripts.cpp | 2 +- sd2_revision_nr.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/world/spell_scripts.cpp b/scripts/world/spell_scripts.cpp index db46335ee..8133f1e43 100644 --- a/scripts/world/spell_scripts.cpp +++ b/scripts/world/spell_scripts.cpp @@ -498,7 +498,7 @@ bool EffectAuraDummy_spell_aura_dummy_npc(const Aura* pAura, bool bApply) if (bApply) pCreature->m_AuraFlags |= UNIT_AURAFLAG_ALIVE_INVISIBLE; else - pCreature->m_AuraFlags |= ~UNIT_AURAFLAG_ALIVE_INVISIBLE; + pCreature->m_AuraFlags &= ~UNIT_AURAFLAG_ALIVE_INVISIBLE; return false; } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 80ca85aaf..58d485be4 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2806" + #define SD2_REVISION_NR "2807" #endif // __SD2_REVISION_NR_H__ From 22eb05e3ad6e224cc83e66de2549b40489b1fff7 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Tue, 5 Mar 2013 22:54:04 +0200 Subject: [PATCH 0807/1172] [2808] Add texts and basic script for Varos - Oculus Also fix an evade issue for Urom --- scripts/northrend/nexus/oculus/boss_urom.cpp | 6 ++ scripts/northrend/nexus/oculus/boss_varos.cpp | 91 ++++++++++++++++++- .../nexus/oculus/instance_oculus.cpp | 15 +-- scripts/northrend/nexus/oculus/oculus.h | 6 +- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 + sql/scriptdev2_script_full.sql | 15 ++- sql/updates/r2808_mangos.sql | 1 + sql/updates/r2808_scriptdev2.sql | 12 +++ 9 files changed, 126 insertions(+), 23 deletions(-) create mode 100644 sql/updates/r2808_mangos.sql create mode 100644 sql/updates/r2808_scriptdev2.sql diff --git a/scripts/northrend/nexus/oculus/boss_urom.cpp b/scripts/northrend/nexus/oculus/boss_urom.cpp index 884110ca9..23f471675 100644 --- a/scripts/northrend/nexus/oculus/boss_urom.cpp +++ b/scripts/northrend/nexus/oculus/boss_urom.cpp @@ -187,6 +187,7 @@ struct MANGOS_DLL_DECL boss_uromAI : public ScriptedAI void JustDied(Unit* /*pKiller*/) override { DoScriptText(SAY_DEATH, m_creature); + DoCastSpellIfCan(m_creature, SPELL_DEATH_SPELL, CAST_TRIGGERED); if (m_pInstance) m_pInstance->SetData(TYPE_UROM, DONE); @@ -215,7 +216,12 @@ struct MANGOS_DLL_DECL boss_uromAI : public ScriptedAI ResetPlatformVariables(); } else + { + // Teleport to home position, in order to override the movemaps + m_creature->NearTeleportTo(aOculusBossSpawnLocs[0][0], aOculusBossSpawnLocs[0][1], aOculusBossSpawnLocs[0][2], aOculusBossSpawnLocs[0][3]); + ScriptedAI::EnterEvadeMode(); + } } void JustSummoned(Creature* pSummon) override diff --git a/scripts/northrend/nexus/oculus/boss_varos.cpp b/scripts/northrend/nexus/oculus/boss_varos.cpp index 253ea999b..5f725ec88 100644 --- a/scripts/northrend/nexus/oculus/boss_varos.cpp +++ b/scripts/northrend/nexus/oculus/boss_varos.cpp @@ -16,14 +16,101 @@ /* ScriptData SDName: boss_varos -SD%Complete: 0 -SDComment: Placeholder +SD%Complete: 20 +SDComment: Basic script SDCategory: Oculus EndScriptData */ #include "precompiled.h" +#include "oculus.h" + +enum +{ + SAY_AGGRO = -1578020, + SAY_CALL_CAPTAIN_1 = -1578021, + SAY_CALL_CAPTAIN_2 = -1578022, + SAY_CALL_CAPTAIN_3 = -1578023, + SAY_KILL_1 = -1578026, + SAY_KILL_2 = -1578027, + SAY_DEATH = -1578028, + EMOTE_CAPTAIN = -1578029, + + // spells + SPELL_CENTRIFUGE_SHIELD = 50053, + SPELL_AMPLIFY_MAGIC = 51054, + SPELL_AMPLIFY_MAGIC_H = 59371, + SPELL_ENERGIZE_CORES = 50785, + SPELL_ENERGIZE_CORES_H = 59372, + SPELL_CALL_CAPTAIN_1 = 51008, // sends event 18455 + SPELL_CALL_CAPTAIN_2 = 51002, // sends event 12229 + SPELL_CALL_CAPTAIN_3 = 51006, // sends event 10665 + SPELL_CALL_CAPTAIN_4 = 51007, // sends event 18454 +}; + +struct MANGOS_DLL_DECL boss_varosAI : public ScriptedAI +{ + boss_varosAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); + Reset(); + } + + ScriptedInstance* m_pInstance; + bool m_bIsRegularMode; + + void Reset() override + { + } + + void Aggro(Unit* pWho) override + { + DoScriptText(SAY_AGGRO, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_VAROS, IN_PROGRESS); + } + + void KilledUnit(Unit* /*pVictim*/) override + { + DoScriptText(urand(0, 1) ? SAY_KILL_1 : SAY_KILL_2, m_creature); + } + + void JustDied(Unit* /*pKiller*/) override + { + DoScriptText(SAY_DEATH, m_creature); + DoCastSpellIfCan(m_creature, SPELL_DEATH_SPELL, CAST_TRIGGERED); + + if (m_pInstance) + m_pInstance->SetData(TYPE_VAROS, DONE); + } + + void JustReachedHome() override + { + if (m_pInstance) + m_pInstance->SetData(TYPE_VAROS, FAIL); + } + + void UpdateAI(const uint32 uiDiff) override + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_varos(Creature* pCreature) +{ + return new boss_varosAI(pCreature); +} void AddSC_boss_varos() { + Script* pNewScript; + pNewScript = new Script; + pNewScript->Name = "boss_varos"; + pNewScript->GetAI = &GetAI_boss_varos; + pNewScript->RegisterSelf(); } diff --git a/scripts/northrend/nexus/oculus/instance_oculus.cpp b/scripts/northrend/nexus/oculus/instance_oculus.cpp index d620b9235..e382efaea 100644 --- a/scripts/northrend/nexus/oculus/instance_oculus.cpp +++ b/scripts/northrend/nexus/oculus/instance_oculus.cpp @@ -167,20 +167,14 @@ void instance_oculus::SetData64(uint32 uiData, uint64 uiGuid) void instance_oculus::OnCreatureEnterCombat(Creature* pCreature) { - switch (pCreature->GetEntry()) - { - case NPC_DRAKOS: SetData(TYPE_DRAKOS, IN_PROGRESS); break; - case NPC_VAROS: SetData(TYPE_VAROS, IN_PROGRESS); break; - } + if (pCreature->GetEntry() == NPC_DRAKOS) + SetData(TYPE_DRAKOS, IN_PROGRESS); } void instance_oculus::OnCreatureEvade(Creature* pCreature) { - switch (pCreature->GetEntry()) - { - case NPC_DRAKOS: SetData(TYPE_DRAKOS, FAIL); break; - case NPC_VAROS: SetData(TYPE_VAROS, FAIL); break; - } + if (pCreature->GetEntry() == NPC_DRAKOS) + SetData(TYPE_DRAKOS, FAIL); } void instance_oculus::OnCreatureDeath(Creature* pCreature) @@ -188,7 +182,6 @@ void instance_oculus::OnCreatureDeath(Creature* pCreature) switch (pCreature->GetEntry()) { case NPC_DRAKOS: SetData(TYPE_DRAKOS, DONE); break; - case NPC_VAROS: SetData(TYPE_VAROS, DONE); break; case NPC_CENTRIFUGE_CONSTRUCT: m_sConstructsAliveGUIDSet.erase(pCreature->GetObjectGuid()); DoUpdateWorldState(WORLD_STATE_CONSTRUCTS_COUNT, m_sConstructsAliveGUIDSet.size()); diff --git a/scripts/northrend/nexus/oculus/oculus.h b/scripts/northrend/nexus/oculus/oculus.h index 0d3b888c9..bc2ff2090 100644 --- a/scripts/northrend/nexus/oculus/oculus.h +++ b/scripts/northrend/nexus/oculus/oculus.h @@ -41,11 +41,9 @@ enum GO_CACHE_EREGOS = 191349, GO_CACHE_EREGOS_H = 193603, + SPELL_DEATH_SPELL = 50415, // summons 28012 + // Instance event yells - SAY_BELGARISTRASZ_GREET = -1578021, - SAY_VAROS_INTRO = -1578020, - SAY_BELGARISTRASZ_UROM = -1578022, - SAY_BELGARISTRASZ_EREGOS = -1578023, SAY_EREGOS_SPAWN = -1578010, // world states to show how many constructs are still alive diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 58d485be4..0da5b3eea 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2807" + #define SD2_REVISION_NR "2808" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 653a660e4..7f6e12abd 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -873,6 +873,7 @@ UPDATE instance_template SET ScriptName='instance_nexus' WHERE map=576; UPDATE instance_template SET ScriptName='instance_oculus' WHERE map=578; UPDATE creature_template SET ScriptName='boss_eregos' WHERE entry=27656; UPDATE creature_template SET ScriptName='boss_urom' WHERE entry=27655; +UPDATE creature_template SET ScriptName='boss_varos' WHERE entry=27447; /* OBSIDIAN SANCTUM */ UPDATE instance_template SET ScriptName='instance_obsidian_sanctum' WHERE map=615; diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index e0d9f7666..6af5e3704 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -2910,13 +2910,18 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1578018,'Enjoy the fall!',13630,1,0,0,'eregos SAY_KILL_3'), (-1578019,'Savor this small victory, foolish little creatures. You and your dragon allies have won this battle. But we will win... the Nexus War.',13631,1,0,0,'eregos SAY_DEATH'), -(-1578020,'Intruders, your victory will be short-lived. I am Commander Varos Cloudstrider. My drakes control the skies and protect this conduit. I will see to it personally that the Oculus does not fall into your hands!',13648,6,0,0,'varos SAY_VAROS_INTRO'), -(-1578021,'Thank you for freeing us, mortals. Beware, the Blue Flight is alerted to your presence. Even now, Malygos sends Varos Cloudstrider and his ring guardians to defend the Oculus. You will need our help to stand a chance.',0,0,0,1,'belgaristrasz SAY_BELGARISTRASZ_GREET'), -(-1578022,'The trickster Mage-Lord Urom protects the third ring. He will appear alone and defenseless, but do not be fooled by appearances! Urom is a powerful conjurer who commands a menagerie of Phantasmal creatures. Seek him out above.',0,0,0,1,'belgaristrasz SAY_BELGARISTRASZ_UROM'), -(-1578023,'Your greatest challenge lies ahead. Ley-Guardian Eregos is a Blue dragon of immense power. You will find him flying above the uppermost ring.',0,0,0,1,'belgaristrasz SAY_BELGARISTRASZ_EREGOS'), +(-1578020,'There will be no mercy!',13649,1,0,0,'varos SAY_AGGRO'), +(-1578021,'Blast them! Destroy them!',13650,1,0,0,'varos SAY_CALL_CAPTAIN_1'), +(-1578022,'Take no prisoners! Attack!',13651,1,0,0,'varos SAY_CALL_CAPTAIN_2'), +(-1578023,'Strike now! Obliterate them!',13652,1,0,0,'varos SAY_CALL_CAPTAIN_3'), (-1578024,'Anomalies form as %s shifts into the Astral Plane!',0,3,0,0,'eregos EMOTE_ASTRAL_PLANE'), -(-1578025,'%s begins to cast Empowered Arcane Explosion!',0,3,0,0,'urom EMOTE_EXPLOSION'); +(-1578025,'%s begins to cast Empowered Arcane Explosion!',0,3,0,0,'urom EMOTE_EXPLOSION'), + +(-1578026,'You were warned!',13653,1,0,0,'varos SAY_KILL_1'), +(-1578027,'The Oculus is ours!',13654,1,0,0,'varos SAY_KILL_2'), +(-1578028,'They are... too strong! Underestimated their... fortitude.',13655,1,0,0,'varos SAY_DEATH'), +(-1578029,'%s calls an Azure Ring Captain!',0,3,0,0,'varos EMOTE_CAPTAIN'); -- -1 580 000 SUNWELL PLATEAU INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES diff --git a/sql/updates/r2808_mangos.sql b/sql/updates/r2808_mangos.sql new file mode 100644 index 000000000..ce4997a34 --- /dev/null +++ b/sql/updates/r2808_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='boss_varos' WHERE entry=27447; diff --git a/sql/updates/r2808_scriptdev2.sql b/sql/updates/r2808_scriptdev2.sql new file mode 100644 index 000000000..ecc5ea47a --- /dev/null +++ b/sql/updates/r2808_scriptdev2.sql @@ -0,0 +1,12 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1578023 AND -1578020; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1578020,'There will be no mercy!',13649,1,0,0,'varos SAY_AGGRO'), +(-1578021,'Blast them! Destroy them!',13650,1,0,0,'varos SAY_CALL_CAPTAIN_1'), +(-1578022,'Take no prisoners! Attack!',13651,1,0,0,'varos SAY_CALL_CAPTAIN_2'), +(-1578023,'Strike now! Obliterate them!',13652,1,0,0,'varos SAY_CALL_CAPTAIN_3'); +DELETE FROM script_texts WHERE entry BETWEEN -1578029 AND -1578026; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1578026,'You were warned!',13653,1,0,0,'varos SAY_KILL_1'), +(-1578027,'The Oculus is ours!',13654,1,0,0,'varos SAY_KILL_2'), +(-1578028,'They are... too strong! Underestimated their... fortitude.',13655,1,0,0,'varos SAY_DEATH'), +(-1578029,'%s calls an Azure Ring Captain!',0,3,0,0,'varos EMOTE_CAPTAIN'); From 459d795a941cbbf7aa580ef9a5fb3422f031c355 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Thu, 7 Mar 2013 00:24:16 +0200 Subject: [PATCH 0808/1172] [2809] Complete Varos script - Oculus --- scripts/northrend/nexus/oculus/boss_varos.cpp | 281 +++++++++++++++++- .../nexus/oculus/instance_oculus.cpp | 3 + scripts/northrend/nexus/oculus/oculus.h | 3 + sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 9 + sql/updates/r2809_mangos.sql | 9 + 6 files changed, 302 insertions(+), 5 deletions(-) create mode 100644 sql/updates/r2809_mangos.sql diff --git a/scripts/northrend/nexus/oculus/boss_varos.cpp b/scripts/northrend/nexus/oculus/boss_varos.cpp index 5f725ec88..a6b4157ff 100644 --- a/scripts/northrend/nexus/oculus/boss_varos.cpp +++ b/scripts/northrend/nexus/oculus/boss_varos.cpp @@ -16,13 +16,14 @@ /* ScriptData SDName: boss_varos -SD%Complete: 20 -SDComment: Basic script +SD%Complete: 90 +SDComment: Energize Cores spells requires additional research. SDCategory: Oculus EndScriptData */ #include "precompiled.h" #include "oculus.h" +#include "TemporarySummon.h" enum { @@ -45,22 +46,65 @@ enum SPELL_CALL_CAPTAIN_2 = 51002, // sends event 12229 SPELL_CALL_CAPTAIN_3 = 51006, // sends event 10665 SPELL_CALL_CAPTAIN_4 = 51007, // sends event 18454 + + // events + EVENT_ID_CALL_CAPTAIN_1 = 18455, + EVENT_ID_CALL_CAPTAIN_2 = 12229, + EVENT_ID_CALL_CAPTAIN_3 = 10665, + EVENT_ID_CALL_CAPTAIN_4 = 18454, + + MAX_CAPTAIN_EVENTS = 4, + + // other spells + SPELL_SUMMON_ARCANE_BEAM = 51014, + SPELL_ARCANE_BEAM_PERIODIC = 51019, + SPELL_ARCANE_BEAM_SPAWN = 51022, + + NPC_AZURE_RING_CAPTAIN = 28236, + NPC_ARCANE_BEAM = 28239, }; +struct CaptainData +{ + uint32 uiEventId; + float fX, fY, fZ, fO, fDestX, fDestY, fDestZ; +}; + +static const CaptainData aVarosCaptainData[4] = +{ + {EVENT_ID_CALL_CAPTAIN_1, 1205.74f, 1060.24f, 480.083f, 1.15f, 1239.198f, 1064.537f, 455.587f}, + {EVENT_ID_CALL_CAPTAIN_2, 1273.78f, 1159.366f, 454.617f, 4.79f, 1278.488f, 1119.482f, 455.634f}, // this one is guesswork + {EVENT_ID_CALL_CAPTAIN_3, 1356.845f, 1077.118f, 480.083f, 3.28f, 1331.333f, 1076.381f, 455.69f}, + {EVENT_ID_CALL_CAPTAIN_4, 1296.89f, 1002.76f, 480.083f, 1.71f, 1291.95f, 1024.354f, 455.739f}, +}; + +/*###### +## boss_varos +######*/ + struct MANGOS_DLL_DECL boss_varosAI : public ScriptedAI { boss_varosAI(Creature* pCreature) : ScriptedAI(pCreature) { - m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_pInstance = (instance_oculus*)pCreature->GetInstanceData(); m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); Reset(); } - ScriptedInstance* m_pInstance; + instance_oculus* m_pInstance; bool m_bIsRegularMode; + uint32 m_uiShieldTimer; + uint32 m_uiAmplifyMagicTimer; + uint32 m_uiEnergizeCoresTimer; + uint32 m_uiCallCaptainTimer; + void Reset() override { + m_uiShieldTimer = 2000; + m_uiAmplifyMagicTimer = urand(8000, 15000); + m_uiEnergizeCoresTimer = urand(5000, 7000); + m_uiCallCaptainTimer = urand(10000, 15000); } void Aggro(Unit* pWho) override @@ -93,9 +137,80 @@ struct MANGOS_DLL_DECL boss_varosAI : public ScriptedAI void UpdateAI(const uint32 uiDiff) override { + if (m_uiShieldTimer) + { + if (m_uiShieldTimer <= uiDiff) + { + if (!m_pInstance) + return; + + // Check for shield first + if (m_pInstance->IsShieldBroken()) + { + m_uiShieldTimer = 0; + return; + } + + if (DoCastSpellIfCan(m_creature, SPELL_CENTRIFUGE_SHIELD) == CAST_OK) + { + m_creature->ApplySpellImmune(0, IMMUNITY_DAMAGE, SPELL_SCHOOL_MASK_ALL, true); + m_uiShieldTimer = 0; + } + } + else + m_uiShieldTimer -= uiDiff; + } + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; + if (m_uiAmplifyMagicTimer < uiDiff) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, m_bIsRegularMode ? SPELL_AMPLIFY_MAGIC : SPELL_AMPLIFY_MAGIC_H) == CAST_OK) + m_uiAmplifyMagicTimer = urand(15000, 20000); + } + } + else + m_uiAmplifyMagicTimer -= uiDiff; + + if (m_uiEnergizeCoresTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_ENERGIZE_CORES : SPELL_ENERGIZE_CORES_H) == CAST_OK) + m_uiEnergizeCoresTimer = urand(5000, 7000); + } + else + m_uiEnergizeCoresTimer -= uiDiff; + + if (m_uiCallCaptainTimer < uiDiff) + { + // choose a random captain spell + uint32 uiSpellId = 0; + switch (urand(0, 3)) + { + case 0: uiSpellId = SPELL_CALL_CAPTAIN_1; break; + case 1: uiSpellId = SPELL_CALL_CAPTAIN_2; break; + case 2: uiSpellId = SPELL_CALL_CAPTAIN_3; break; + case 3: uiSpellId = SPELL_CALL_CAPTAIN_4; break; + } + + if (DoCastSpellIfCan(m_creature, uiSpellId) == CAST_OK) + { + switch (urand(0, 2)) + { + case 0: DoScriptText(SAY_CALL_CAPTAIN_1, m_creature); break; + case 1: DoScriptText(SAY_CALL_CAPTAIN_2, m_creature); break; + case 2: DoScriptText(SAY_CALL_CAPTAIN_3, m_creature); break; + } + + DoScriptText(EMOTE_CAPTAIN, m_creature); + m_uiCallCaptainTimer = urand(13000, 23000); + } + } + else + m_uiCallCaptainTimer -= uiDiff; + DoMeleeAttackIfReady(); } }; @@ -105,6 +220,144 @@ CreatureAI* GetAI_boss_varos(Creature* pCreature) return new boss_varosAI(pCreature); } +/*###### +## event_spell_call_captain +######*/ + +bool ProcessEventId_event_spell_call_captain(uint32 uiEventId, Object* pSource, Object* pTarget, bool bIsStart) +{ + if (bIsStart && pSource->GetTypeId() == TYPEID_UNIT) + { + Creature* pVaros = (Creature*)pSource; + if (!pVaros) + return false; + + // each guardian has it's own spawn position + for (uint8 i = 0; i < MAX_CAPTAIN_EVENTS; ++i) + { + if (uiEventId == aVarosCaptainData[i].uiEventId) + { + if (Creature* pGuardian = pVaros->SummonCreature(NPC_AZURE_RING_CAPTAIN, aVarosCaptainData[i].fX, aVarosCaptainData[i].fY, aVarosCaptainData[i].fZ, aVarosCaptainData[i].fO, TEMPSUMMON_DEAD_DESPAWN, 0)) + { + pGuardian->SetWalk(false); + pGuardian->GetMotionMaster()->MovePoint(1, aVarosCaptainData[i].fDestX, aVarosCaptainData[i].fDestY, aVarosCaptainData[i].fDestZ); + } + + return true; + } + } + } + + return false; +} + +/*###### +## npc_azure_ring_captain +######*/ + +struct MANGOS_DLL_DECL npc_azure_ring_captainAI : public ScriptedAI +{ + npc_azure_ring_captainAI(Creature* pCreature) : ScriptedAI(pCreature) + { + SetCombatMovement(false); + Reset(); + } + + ObjectGuid m_arcaneBeamGuid; + + void Reset() override { } + void AttackStart(Unit* pWho) override { } + void MoveInLineOfSight(Unit* pWho) override { } + + void JustSummoned(Creature* pSummoned) override + { + if (pSummoned->GetEntry() == NPC_ARCANE_BEAM) + { + pSummoned->CastSpell(pSummoned, SPELL_ARCANE_BEAM_PERIODIC, true); + pSummoned->CastSpell(pSummoned, SPELL_ARCANE_BEAM_SPAWN, true); + m_arcaneBeamGuid = pSummoned->GetObjectGuid(); + } + } + + void JustDied(Unit* /*pKiller*/) override + { + // Despawn the arcane beam in case of getting killed + if (Creature* pTemp = m_creature->GetMap()->GetCreature(m_arcaneBeamGuid)) + pTemp->ForcedDespawn(); + } + + void MovementInform(uint32 uiMoveType, uint32 uiPointId) override + { + if (uiMoveType != POINT_MOTION_TYPE || !uiPointId) + return; + + // Spawn arcane beam when the position is reached. Also prepare to despawn after the beam event is finished + if (DoCastSpellIfCan(m_creature, SPELL_SUMMON_ARCANE_BEAM) == CAST_OK) + m_creature->ForcedDespawn(11000); + } + + void UpdateAI(const uint32 uiDiff) override { } +}; + +CreatureAI* GetAI_npc_azure_ring_captain(Creature* pCreature) +{ + return new npc_azure_ring_captainAI(pCreature); +} + +/*###### +## npc_arcane_beam +######*/ + +struct MANGOS_DLL_DECL npc_arcane_beamAI : public ScriptedAI +{ + npc_arcane_beamAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } + + void Reset() override + { + // Start following the summoner (player) + if (m_creature->IsTemporarySummon()) + { + TemporarySummon* pTemporary = (TemporarySummon*)m_creature; + + if (Player* pSummoner = m_creature->GetMap()->GetPlayer(pTemporary->GetSummonerGuid())) + m_creature->GetMotionMaster()->MoveFollow(pSummoner, 0, 0); + } + + // despawn manually because of combat bug + m_creature->ForcedDespawn(10000); + } + + void AttackStart(Unit* pWho) override { } + void MoveInLineOfSight(Unit* pWho) override { } + void UpdateAI(const uint32 uiDiff) override { } +}; + +CreatureAI* GetAI_npc_arcane_beam(Creature* pCreature) +{ + return new npc_arcane_beamAI(pCreature); +} + +/*###### +## npc_centrifuge_core +######*/ + +// TODO Remove this 'script' when combat can be proper prevented from core-side +struct MANGOS_DLL_DECL npc_centrifuge_coreAI : public Scripted_NoMovementAI +{ + npc_centrifuge_coreAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { Reset(); } + + // Note: visual already handled in creature_template_addon + void Reset() override { } + void AttackStart(Unit* pWho) override { } + void MoveInLineOfSight(Unit* pWho) override { } + void UpdateAI(const uint32 uiDiff) override { } +}; + +CreatureAI* GetAI_npc_centrifuge_core(Creature* pCreature) +{ + return new npc_centrifuge_coreAI(pCreature); +} + void AddSC_boss_varos() { Script* pNewScript; @@ -113,4 +366,24 @@ void AddSC_boss_varos() pNewScript->Name = "boss_varos"; pNewScript->GetAI = &GetAI_boss_varos; pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "event_spell_call_captain"; + pNewScript->pProcessEventId = &ProcessEventId_event_spell_call_captain; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_azure_ring_captain"; + pNewScript->GetAI = &GetAI_npc_azure_ring_captain; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_arcane_beam"; + pNewScript->GetAI = &GetAI_npc_arcane_beam; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_centrifuge_core"; + pNewScript->GetAI = &GetAI_npc_centrifuge_core; + pNewScript->RegisterSelf(); } diff --git a/scripts/northrend/nexus/oculus/instance_oculus.cpp b/scripts/northrend/nexus/oculus/instance_oculus.cpp index e382efaea..48207698c 100644 --- a/scripts/northrend/nexus/oculus/instance_oculus.cpp +++ b/scripts/northrend/nexus/oculus/instance_oculus.cpp @@ -189,7 +189,10 @@ void instance_oculus::OnCreatureDeath(Creature* pCreature) if (m_sConstructsAliveGUIDSet.empty()) { if (Creature* pVaros = GetSingleCreatureFromStorage(NPC_VAROS)) + { + pVaros->ApplySpellImmune(0, IMMUNITY_DAMAGE, SPELL_SCHOOL_MASK_ALL, false); pVaros->InterruptNonMeleeSpells(false); + } } break; } diff --git a/scripts/northrend/nexus/oculus/oculus.h b/scripts/northrend/nexus/oculus/oculus.h index bc2ff2090..3f3e5effc 100644 --- a/scripts/northrend/nexus/oculus/oculus.h +++ b/scripts/northrend/nexus/oculus/oculus.h @@ -82,6 +82,9 @@ class MANGOS_DLL_DECL instance_oculus : public ScriptedInstance const char* Save() const override { return strInstData.c_str(); } void Load(const char* chrIn) override; + // Check Varos' shield + bool IsShieldBroken() { return m_sConstructsAliveGUIDSet.empty(); } + protected: void DoSpawnNextBossIfCan(); diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 0da5b3eea..56f4f8db9 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2808" + #define SD2_REVISION_NR "2809" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 7f6e12abd..aed4ea3b3 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -874,6 +874,15 @@ UPDATE instance_template SET ScriptName='instance_oculus' WHERE map=578; UPDATE creature_template SET ScriptName='boss_eregos' WHERE entry=27656; UPDATE creature_template SET ScriptName='boss_urom' WHERE entry=27655; UPDATE creature_template SET ScriptName='boss_varos' WHERE entry=27447; +UPDATE creature_template SET ScriptName='npc_azure_ring_captain' WHERE entry=28236; +UPDATE creature_template SET ScriptName='npc_arcane_beam' WHERE entry=28239; +UPDATE creature_template SET ScriptName='npc_centrifuge_core' WHERE entry=28183; +DELETE FROM scripted_event_id WHERE id IN (10665,12229,18454,18455); +INSERT INTO scripted_event_id VALUES +(10665,'event_spell_call_captain'), +(12229,'event_spell_call_captain'), +(18454,'event_spell_call_captain'), +(18455,'event_spell_call_captain'); /* OBSIDIAN SANCTUM */ UPDATE instance_template SET ScriptName='instance_obsidian_sanctum' WHERE map=615; diff --git a/sql/updates/r2809_mangos.sql b/sql/updates/r2809_mangos.sql new file mode 100644 index 000000000..e55dae7d1 --- /dev/null +++ b/sql/updates/r2809_mangos.sql @@ -0,0 +1,9 @@ +UPDATE creature_template SET ScriptName='npc_azure_ring_captain' WHERE entry=28236; +UPDATE creature_template SET ScriptName='npc_arcane_beam' WHERE entry=28239; +UPDATE creature_template SET ScriptName='npc_centrifuge_core' WHERE entry=28183; +DELETE FROM scripted_event_id WHERE id IN (10665,12229,18454,18455); +INSERT INTO scripted_event_id VALUES +(10665,'event_spell_call_captain'), +(12229,'event_spell_call_captain'), +(18454,'event_spell_call_captain'), +(18455,'event_spell_call_captain'); From 6efa84d0bf993d4ac0dc64f2ebf16ae06771ba80 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Thu, 7 Mar 2013 01:58:46 +0200 Subject: [PATCH 0809/1172] [2810] Add support for Planar Anomalies - Eregos, Oculus --- .../northrend/nexus/oculus/boss_eregos.cpp | 114 ++++++++++++++++-- scripts/northrend/nexus/oculus/oculus.h | 5 + sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 + sql/updates/r2810_mangos.sql | 1 + 5 files changed, 109 insertions(+), 14 deletions(-) create mode 100644 sql/updates/r2810_mangos.sql diff --git a/scripts/northrend/nexus/oculus/boss_eregos.cpp b/scripts/northrend/nexus/oculus/boss_eregos.cpp index 7b957d9ca..dab90649e 100644 --- a/scripts/northrend/nexus/oculus/boss_eregos.cpp +++ b/scripts/northrend/nexus/oculus/boss_eregos.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: boss_eregos -SD%Complete: 80 -SDComment: Planar anomalies might require additional script +SD%Complete: 90 +SDComment: Small adjustments may be required. SDCategory: Oculus EndScriptData */ @@ -49,10 +49,14 @@ enum SPELL_PLANAR_ANOMALY_AGGRO = 57971, SPELL_PLANAR_BLAST = 57976, - NPC_PLANAR_ANOMALY = 30879, // should cast 57976 on target range check + NPC_PLANAR_ANOMALY = 30879, NPC_GREATER_LEY_WHELP = 28276, }; +/*###### +## boss_eregos +######*/ + struct MANGOS_DLL_DECL boss_eregosAI : public ScriptedAI { boss_eregosAI(Creature* pCreature) : ScriptedAI(pCreature) @@ -71,6 +75,9 @@ struct MANGOS_DLL_DECL boss_eregosAI : public ScriptedAI uint32 m_uiSummonWhelpsTimer; float m_fHpPercent; + uint8 m_uiAnomalyTargetIndex; + GuidVector m_vAnomalyTargets; + void Reset() override { m_uiArcaneBarrageTimer = 0; @@ -78,6 +85,7 @@ struct MANGOS_DLL_DECL boss_eregosAI : public ScriptedAI m_uiEnrageTimer = 35000; m_uiSummonWhelpsTimer = urand(15000, 20000); m_fHpPercent = 60.0f; + m_uiAnomalyTargetIndex = 0; } void Aggro(Unit* pWho) override @@ -127,11 +135,17 @@ struct MANGOS_DLL_DECL boss_eregosAI : public ScriptedAI { if (pSummoned->GetEntry() == NPC_PLANAR_ANOMALY) { - pSummoned->CastSpell(pSummoned, SPELL_PLANAR_ANOMALY_AGGRO, false); + pSummoned->CastSpell(pSummoned, SPELL_PLANAR_ANOMALY_AGGRO, true); - // Note: This is wrong. Each summoned anomaly should follow an individual target - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + // If this happens then something is really wrong + if (m_vAnomalyTargets.empty()) + return; + + if (Unit* pTarget = m_creature->GetMap()->GetUnit(m_vAnomalyTargets[m_uiAnomalyTargetIndex])) pSummoned->GetMotionMaster()->MoveFollow(pTarget, 0, 0); + + if (m_uiAnomalyTargetIndex < m_vAnomalyTargets.size() - 1) + ++m_uiAnomalyTargetIndex; } else if (pSummoned->GetEntry() == NPC_GREATER_LEY_WHELP) { @@ -140,12 +154,6 @@ struct MANGOS_DLL_DECL boss_eregosAI : public ScriptedAI } } - void SummonedCreatureDespawn(Creature* pSummoned) override - { - if (pSummoned->GetEntry() == NPC_PLANAR_ANOMALY) - pSummoned->CastSpell(pSummoned, SPELL_PLANAR_BLAST, true); - } - void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) @@ -158,7 +166,21 @@ struct MANGOS_DLL_DECL boss_eregosAI : public ScriptedAI { if (DoCastSpellIfCan(m_creature, SPELL_PLANAR_SHIFT) == CAST_OK) { - // This will summon an anomaly on each player coordinates + // Get all the vehicle entries which are in combat with the boss + m_vAnomalyTargets.clear(); + m_uiAnomalyTargetIndex = 0; + + ThreatList const& threatList = m_creature->getThreatManager().getThreatList(); + for (ThreatList::const_iterator itr = threatList.begin(); itr != threatList.end(); ++itr) + { + if (Unit* pTarget = m_creature->GetMap()->GetUnit((*itr)->getUnitGuid())) + { + if (pTarget->GetEntry() == NPC_RUBY_DRAKE || pTarget->GetEntry() == NPC_AMBER_DRAKE || pTarget->GetEntry() == NPC_EMERALD_DRAKE) + m_vAnomalyTargets.push_back(pTarget->GetObjectGuid()); + } + } + + // This will summon an anomaly for each player (vehicle) DoCastSpellIfCan(m_creature, SPELL_PLANAR_ANOMALIES, CAST_TRIGGERED); switch (urand(0, 2)) @@ -223,6 +245,67 @@ CreatureAI* GetAI_boss_eregos(Creature* pCreature) return new boss_eregosAI(pCreature); } +/*###### +## npc_planar_anomaly +######*/ + +struct MANGOS_DLL_DECL npc_planar_anomalyAI : public ScriptedAI +{ + npc_planar_anomalyAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } + + uint32 m_uiPlanarBlastTimer; + bool m_bHasBlastCasted; + + void Reset() override + { + m_uiPlanarBlastTimer = 15000; + m_bHasBlastCasted = false; + } + + void AttackStart(Unit* pWho) override { } + + void MoveInLineOfSight(Unit* pWho) override + { + if (m_bHasBlastCasted) + return; + + // Check for the players mounted on the vehicles + if (pWho->GetTypeId() == TYPEID_PLAYER) + { + if (m_creature->IsWithinDistInMap(pWho, INTERACTION_DISTANCE)) + { + if (DoCastSpellIfCan(m_creature, SPELL_PLANAR_BLAST) == CAST_OK) + { + m_bHasBlastCasted = true; + m_creature->ForcedDespawn(1000); + } + } + } + } + + void UpdateAI(const uint32 uiDiff) override + { + if (m_bHasBlastCasted) + return; + + if (m_uiPlanarBlastTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_PLANAR_BLAST) == CAST_OK) + { + m_bHasBlastCasted = true; + m_creature->ForcedDespawn(1000); + } + } + else + m_uiPlanarBlastTimer -= uiDiff; + } +}; + +CreatureAI* GetAI_npc_planar_anomaly(Creature* pCreature) +{ + return new npc_planar_anomalyAI(pCreature); +} + void AddSC_boss_eregos() { Script* pNewScript; @@ -231,4 +314,9 @@ void AddSC_boss_eregos() pNewScript->Name = "boss_eregos"; pNewScript->GetAI = &GetAI_boss_eregos; pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_planar_anomaly"; + pNewScript->GetAI = &GetAI_npc_planar_anomaly; + pNewScript->RegisterSelf(); } diff --git a/scripts/northrend/nexus/oculus/oculus.h b/scripts/northrend/nexus/oculus/oculus.h index 3f3e5effc..c1efd4944 100644 --- a/scripts/northrend/nexus/oculus/oculus.h +++ b/scripts/northrend/nexus/oculus/oculus.h @@ -34,6 +34,11 @@ enum NPC_BELGARISTRASZ = 27658, // ruby NPC_IMAGE_OF_BELGARISTRASZ = 28012, + // Vehicle entries + NPC_EMERALD_DRAKE = 27692, + NPC_AMBER_DRAKE = 27755, + NPC_RUBY_DRAKE = 27756, + // Cages in which the friendly dragons are hold GO_DRAGON_CAGE_DOOR = 193995, diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 56f4f8db9..1239e06ec 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2809" + #define SD2_REVISION_NR "2810" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index aed4ea3b3..a290569fe 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -877,6 +877,7 @@ UPDATE creature_template SET ScriptName='boss_varos' WHERE entry=27447; UPDATE creature_template SET ScriptName='npc_azure_ring_captain' WHERE entry=28236; UPDATE creature_template SET ScriptName='npc_arcane_beam' WHERE entry=28239; UPDATE creature_template SET ScriptName='npc_centrifuge_core' WHERE entry=28183; +UPDATE creature_template SET ScriptName='npc_planar_anomaly' WHERE entry=30879; DELETE FROM scripted_event_id WHERE id IN (10665,12229,18454,18455); INSERT INTO scripted_event_id VALUES (10665,'event_spell_call_captain'), diff --git a/sql/updates/r2810_mangos.sql b/sql/updates/r2810_mangos.sql new file mode 100644 index 000000000..d39d93c2f --- /dev/null +++ b/sql/updates/r2810_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_planar_anomaly' WHERE entry=30879; From 1b29c8afaf1f445144982e0ae531194c29425305 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Thu, 7 Mar 2013 02:03:15 +0200 Subject: [PATCH 0810/1172] [2811] Set proper combat movement for Acherus Deathcharger --- scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp | 2 ++ sd2_revision_nr.h | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp b/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp index af44fd317..c59afadfc 100644 --- a/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp +++ b/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp @@ -2799,6 +2799,7 @@ struct MANGOS_DLL_DECL npc_acherus_deathchargerAI : public ScriptedAI m_uiQuestEndStage = 0; m_uiQuestEndTimer = 0; + SetCombatMovement(true); m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); } @@ -2817,6 +2818,7 @@ struct MANGOS_DLL_DECL npc_acherus_deathchargerAI : public ScriptedAI m_creature->GetMotionMaster()->MoveIdle(); // Prepare to be mounted + SetCombatMovement(false); DoScriptText(EMOTE_HORSE_READY, m_creature); m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); m_creature->SetFactionTemporary(FACTION_FRIENDLY, TEMPFACTION_RESTORE_RESPAWN); diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 1239e06ec..0cba1c223 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2810" + #define SD2_REVISION_NR "2811" #endif // __SD2_REVISION_NR_H__ From 87ad5ee2fc145e197cff4fc704c6010b07a69bf6 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Thu, 7 Mar 2013 02:20:42 +0200 Subject: [PATCH 0811/1172] [2812] Fix a typo from previous commit --- scripts/northrend/nexus/oculus/boss_varos.cpp | 2 +- sd2_revision_nr.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/northrend/nexus/oculus/boss_varos.cpp b/scripts/northrend/nexus/oculus/boss_varos.cpp index a6b4157ff..84a545b4c 100644 --- a/scripts/northrend/nexus/oculus/boss_varos.cpp +++ b/scripts/northrend/nexus/oculus/boss_varos.cpp @@ -73,7 +73,7 @@ struct CaptainData static const CaptainData aVarosCaptainData[4] = { {EVENT_ID_CALL_CAPTAIN_1, 1205.74f, 1060.24f, 480.083f, 1.15f, 1239.198f, 1064.537f, 455.587f}, - {EVENT_ID_CALL_CAPTAIN_2, 1273.78f, 1159.366f, 454.617f, 4.79f, 1278.488f, 1119.482f, 455.634f}, // this one is guesswork + {EVENT_ID_CALL_CAPTAIN_2, 1273.78f, 1159.366f, 480.083f, 4.79f, 1278.488f, 1119.482f, 455.634f}, // this one is guesswork {EVENT_ID_CALL_CAPTAIN_3, 1356.845f, 1077.118f, 480.083f, 3.28f, 1331.333f, 1076.381f, 455.69f}, {EVENT_ID_CALL_CAPTAIN_4, 1296.89f, 1002.76f, 480.083f, 1.71f, 1291.95f, 1024.354f, 455.739f}, }; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 0cba1c223..8a9952ea1 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2811" + #define SD2_REVISION_NR "2812" #endif // __SD2_REVISION_NR_H__ From 051736af1f1c452b0e4f3dd16b18af069fed4417 Mon Sep 17 00:00:00 2001 From: NeatElves Date: Thu, 7 Mar 2013 02:29:48 +0200 Subject: [PATCH 0812/1172] [2813] Add exception for quests 20439 and 24451 for Dalaran guards Signed-off-by: Xfurry --- scripts/northrend/dalaran.cpp | 19 +++++++++++++++---- sd2_revision_nr.h | 2 +- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/scripts/northrend/dalaran.cpp b/scripts/northrend/dalaran.cpp index d8a30d5ea..94cc4f490 100644 --- a/scripts/northrend/dalaran.cpp +++ b/scripts/northrend/dalaran.cpp @@ -29,11 +29,17 @@ EndContentData */ enum { - SPELL_TRESPASSER_H = 54029, - SPELL_TRESPASSER_A = 54028, + SPELL_TRESPASSER_H = 54029, + SPELL_TRESPASSER_A = 54028, - AREA_ID_SUNREAVER = 4616, - AREA_ID_SILVER_ENCLAVE = 4740 + // Exception auras - used for quests 20439 and 24451 + SPELL_COVENANT_DISGUISE_1 = 70971, + SPELL_COVENANT_DISGUISE_2 = 70972, + SPELL_SUNREAVER_DISGUISE_1 = 70973, + SPELL_SUNREAVER_DISGUISE_2 = 70974, + + AREA_ID_SUNREAVER = 4616, + AREA_ID_SILVER_ENCLAVE = 4740 }; struct MANGOS_DLL_DECL npc_dalaran_guardian_mageAI : public ScriptedAI @@ -47,6 +53,11 @@ struct MANGOS_DLL_DECL npc_dalaran_guardian_mageAI : public ScriptedAI if (pWho->isTargetableForAttack() && m_creature->IsHostileTo(pWho)) { + // exception for quests 20439 and 24451 + if (pWho->HasAura(SPELL_COVENANT_DISGUISE_1) || pWho->HasAura(SPELL_COVENANT_DISGUISE_2) || + pWho->HasAura(SPELL_SUNREAVER_DISGUISE_1) || pWho->HasAura(SPELL_SUNREAVER_DISGUISE_2)) + return; + if (m_creature->IsWithinDistInMap(pWho, m_creature->GetAttackDistance(pWho)) && m_creature->IsWithinLOSInMap(pWho)) { if (Player* pPlayer = pWho->GetCharmerOrOwnerPlayerOrPlayerItself()) diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 8a9952ea1..f955eb5a1 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2812" + #define SD2_REVISION_NR "2813" #endif // __SD2_REVISION_NR_H__ From a94bde45bcbbb8d4495ee9a115983957f4407cd0 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Thu, 7 Mar 2013 09:30:48 +0200 Subject: [PATCH 0813/1172] [2814] Add placeholder for Oculus This will handle vehicle related events --- VC100/100ScriptDev2.vcxproj | 1 + VC100/100ScriptDev2.vcxproj.filters | 3 +++ VC110/110ScriptDev2.vcxproj | 1 + VC110/110ScriptDev2.vcxproj.filters | 3 +++ VC90/90ScriptDev2.vcproj | 4 ++++ scripts/northrend/nexus/oculus/oculus.cpp | 29 +++++++++++++++++++++++ sd2_revision_nr.h | 2 +- system/ScriptLoader.cpp | 2 ++ 8 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 scripts/northrend/nexus/oculus/oculus.cpp diff --git a/VC100/100ScriptDev2.vcxproj b/VC100/100ScriptDev2.vcxproj index 7526f0dcd..a6acaa1e7 100644 --- a/VC100/100ScriptDev2.vcxproj +++ b/VC100/100ScriptDev2.vcxproj @@ -514,6 +514,7 @@ + diff --git a/VC100/100ScriptDev2.vcxproj.filters b/VC100/100ScriptDev2.vcxproj.filters index 879cd8f40..c3ad245ee 100644 --- a/VC100/100ScriptDev2.vcxproj.filters +++ b/VC100/100ScriptDev2.vcxproj.filters @@ -1134,6 +1134,9 @@ scripts\northrend\nexus\oculus + + scripts\northrend\nexus\oculus + scripts\northrend\obsidian_sanctum diff --git a/VC110/110ScriptDev2.vcxproj b/VC110/110ScriptDev2.vcxproj index 0b9bb6674..adbf2d729 100644 --- a/VC110/110ScriptDev2.vcxproj +++ b/VC110/110ScriptDev2.vcxproj @@ -519,6 +519,7 @@ + diff --git a/VC110/110ScriptDev2.vcxproj.filters b/VC110/110ScriptDev2.vcxproj.filters index 879cd8f40..c3ad245ee 100644 --- a/VC110/110ScriptDev2.vcxproj.filters +++ b/VC110/110ScriptDev2.vcxproj.filters @@ -1134,6 +1134,9 @@ scripts\northrend\nexus\oculus + + scripts\northrend\nexus\oculus + scripts\northrend\obsidian_sanctum diff --git a/VC90/90ScriptDev2.vcproj b/VC90/90ScriptDev2.vcproj index 9e99072e6..e4eb5b32e 100644 --- a/VC90/90ScriptDev2.vcproj +++ b/VC90/90ScriptDev2.vcproj @@ -1861,6 +1861,10 @@ RelativePath="..\scripts\northrend\nexus\oculus\instance_oculus.cpp" > + + diff --git a/scripts/northrend/nexus/oculus/oculus.cpp b/scripts/northrend/nexus/oculus/oculus.cpp new file mode 100644 index 000000000..294fa55ed --- /dev/null +++ b/scripts/northrend/nexus/oculus/oculus.cpp @@ -0,0 +1,29 @@ +/* Copyright (C) 2006 - 2013 ScriptDev2 + * 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: Oculus +SD%Complete: 0 +SDComment: Placeholder +SDCategory: Oculus +EndScriptData */ + +#include "precompiled.h" + +void AddSC_oculus() +{ + +} diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index f955eb5a1..c4d61cdbd 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2813" + #define SD2_REVISION_NR "2814" #endif // __SD2_REVISION_NR_H__ diff --git a/system/ScriptLoader.cpp b/system/ScriptLoader.cpp index bb4483896..1a78e0588 100644 --- a/system/ScriptLoader.cpp +++ b/system/ScriptLoader.cpp @@ -319,6 +319,7 @@ extern void AddSC_boss_eregos(); // nexus, oculus extern void AddSC_boss_urom(); extern void AddSC_boss_varos(); extern void AddSC_instance_oculus(); +extern void AddSC_oculus(); extern void AddSC_boss_sartharion(); // obsidian_sanctum extern void AddSC_instance_obsidian_sanctum(); extern void AddSC_boss_baltharus(); // ruby_sanctum @@ -781,6 +782,7 @@ void AddScripts() AddSC_boss_urom(); AddSC_boss_varos(); AddSC_instance_oculus(); + AddSC_oculus(); AddSC_boss_sartharion(); // obsidian_sanctum AddSC_instance_obsidian_sanctum(); AddSC_boss_baltharus(); // ruby_sanctum From 1890e38a98f95572a511f00d9b3c89f2169a68b5 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Fri, 8 Mar 2013 09:46:16 +0200 Subject: [PATCH 0814/1172] [2815] Implement script for Oculus drakes Now the Oculus instance should be fully playable Note: the passenger boarding wrappers should be used when available in core --- scripts/northrend/nexus/oculus/oculus.cpp | 130 +++++++++++++++++++++- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 + sql/scriptdev2_script_full.sql | 4 +- sql/updates/r2815_mangos.sql | 1 + sql/updates/r2815_scriptdev2.sql | 3 + 6 files changed, 137 insertions(+), 4 deletions(-) create mode 100644 sql/updates/r2815_mangos.sql create mode 100644 sql/updates/r2815_scriptdev2.sql diff --git a/scripts/northrend/nexus/oculus/oculus.cpp b/scripts/northrend/nexus/oculus/oculus.cpp index 294fa55ed..97d9e0a55 100644 --- a/scripts/northrend/nexus/oculus/oculus.cpp +++ b/scripts/northrend/nexus/oculus/oculus.cpp @@ -16,14 +16,140 @@ /* ScriptData SDName: Oculus -SD%Complete: 0 -SDComment: Placeholder +SD%Complete: 80 +SDComment: Make use of the passenger boarding wrappers when supported by the core. SDCategory: Oculus EndScriptData */ #include "precompiled.h" +#include "oculus.h" +#include "TemporarySummon.h" + +enum +{ + EMOTE_FLY_AWAY = -1578030, + + SPELL_RIDE_RUBY_DRAKE_QUE = 49463, + SPELL_RIDE_EMERAL_DRAKE_QUE = 49427, + SPELL_RIDE_AMBER_DRAKE_QUE = 49459, + + SPELL_DRAKE_FLAG_VISUAL = 53797, + SPELL_PARACHUTE = 50550, // triggers 50553 + SPELL_FLIGHT = 50296, + SPELL_SOAR = 50325, + SPELL_EVASIVE_AURA = 50248, +}; + +/*###### +## npc_oculus_drake +######*/ + +struct MANGOS_DLL_DECL npc_oculus_drakeAI : public ScriptedAI +{ + npc_oculus_drakeAI(Creature* pCreature) : ScriptedAI(pCreature) + { + if (m_creature->IsTemporarySummon()) + { + TemporarySummon* pTemporary = (TemporarySummon*)m_creature; + + uint32 uiMountSpell = 0; + switch (m_creature->GetEntry()) + { + case NPC_RUBY_DRAKE: uiMountSpell = SPELL_RIDE_RUBY_DRAKE_QUE; break; + case NPC_AMBER_DRAKE: uiMountSpell = SPELL_RIDE_AMBER_DRAKE_QUE; break; + case NPC_EMERALD_DRAKE: uiMountSpell = SPELL_RIDE_EMERAL_DRAKE_QUE; break; + } + + // Force player to mount + if (Player* pSummoner = m_creature->GetMap()->GetPlayer(pTemporary->GetSummonerGuid())) + { + pSummoner->CastSpell(pSummoner, uiMountSpell, true); + + // The dragon moves near the player after spawn + float fX, fY, fZ; + pSummoner->GetContactPoint(m_creature, fX, fY, fZ); + m_creature->GetMotionMaster()->MovePoint(0, fX, fY, fZ); + } + } + + SetCombatMovement(false); + Reset(); + } + + void Reset() override + { + DoCastSpellIfCan(m_creature, SPELL_SOAR, CAST_TRIGGERED | CAST_AURA_NOT_PRESENT); + + // Another aura for the Ruby drake + if (m_creature->GetEntry() == NPC_RUBY_DRAKE) + DoCastSpellIfCan(m_creature, SPELL_EVASIVE_AURA, CAST_TRIGGERED | CAST_AURA_NOT_PRESENT); + } + + void JustDied(Unit* /*pKiller*/) override + { + // Handle player parachute + if (m_creature->IsTemporarySummon()) + { + TemporarySummon* pTemporary = (TemporarySummon*)m_creature; + if (Player* pSummoner = m_creature->GetMap()->GetPlayer(pTemporary->GetSummonerGuid())) + { + pSummoner->RemoveAurasDueToSpell(SPELL_DRAKE_FLAG_VISUAL); + pSummoner->CastSpell(pSummoner, SPELL_PARACHUTE, true); + } + } + } + + // TODO: Temporary workaround - please remove when the boarding wrappers are implemented in core + void SpellHit(Unit* pCaster, const SpellEntry* pSpell) override + { + if (pCaster->GetTypeId() != TYPEID_PLAYER) + return; + + if (pSpell->Id == 49464 || pSpell->Id == 49346 || pSpell->Id == 49460) + DoCastSpellIfCan(m_creature, SPELL_FLIGHT, CAST_TRIGGERED); + } + + // TODO: Enable the wrappers below, when they will be properly supported by the core + /* + void PassengerBoarded(Unit* pPassenger, uint8 uiSeat) override + { + if (pPassenger->GetTypeId() != TYPEID_PLAYER) + return; + + // Set vehicle auras + DoCastSpellIfCan(m_creature, SPELL_FLIGHT, CAST_TRIGGERED); + + // Set passenger auras + pPassenger->CastSpell(pPassenger, SPELL_DRAKE_FLAG_VISUAL, true); + } + + void PassengerUnBoarded(Unit* pPassenger) override + { + pPassenger->RemoveAurasDueToSpell(SPELL_DRAKE_FLAG_VISUAL); + pPassenger->CastSpell(pPassenger, SPELL_PARACHUTE, true); + + DoScriptText(EMOTE_FLY_AWAY, m_creature); + + // The dragon runs away and despawns + float fX, fY, fZ; + m_creature->GetNearPoint(m_creature, fX, fY, fZ, 0, 20, frand(0, 2 * M_PI_F)); + m_creature->GetMotionMaster()->MovePoint(0, fX, fY, fZ + 20.0f); + m_creature->ForcedDespawn(5000); + } + */ +}; + +CreatureAI* GetAI_npc_oculus_drake(Creature* pCreature) +{ + return new npc_oculus_drakeAI(pCreature); +} void AddSC_oculus() { + Script* pNewScript; + pNewScript = new Script; + pNewScript->Name = "npc_oculus_drake"; + pNewScript->GetAI = &GetAI_npc_oculus_drake; + pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index c4d61cdbd..059b4a2ab 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2814" + #define SD2_REVISION_NR "2815" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index a290569fe..3c718ff47 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -878,6 +878,7 @@ UPDATE creature_template SET ScriptName='npc_azure_ring_captain' WHERE entry=282 UPDATE creature_template SET ScriptName='npc_arcane_beam' WHERE entry=28239; UPDATE creature_template SET ScriptName='npc_centrifuge_core' WHERE entry=28183; UPDATE creature_template SET ScriptName='npc_planar_anomaly' WHERE entry=30879; +UPDATE creature_template SET ScriptName='npc_oculus_drake' WHERE entry IN (27756, 27692, 27755); DELETE FROM scripted_event_id WHERE id IN (10665,12229,18454,18455); INSERT INTO scripted_event_id VALUES (10665,'event_spell_call_captain'), diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 6af5e3704..942b359f7 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -2921,7 +2921,9 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1578026,'You were warned!',13653,1,0,0,'varos SAY_KILL_1'), (-1578027,'The Oculus is ours!',13654,1,0,0,'varos SAY_KILL_2'), (-1578028,'They are... too strong! Underestimated their... fortitude.',13655,1,0,0,'varos SAY_DEATH'), -(-1578029,'%s calls an Azure Ring Captain!',0,3,0,0,'varos EMOTE_CAPTAIN'); +(-1578029,'%s calls an Azure Ring Captain!',0,3,0,0,'varos EMOTE_CAPTAIN'), + +(-1578030,'%s flies away.',0,2,0,0,'drakes EMOTE_FLY_AWAY'); -- -1 580 000 SUNWELL PLATEAU INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES diff --git a/sql/updates/r2815_mangos.sql b/sql/updates/r2815_mangos.sql new file mode 100644 index 000000000..8c70a8e80 --- /dev/null +++ b/sql/updates/r2815_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_oculus_drake' WHERE entry IN (27756, 27692, 27755); diff --git a/sql/updates/r2815_scriptdev2.sql b/sql/updates/r2815_scriptdev2.sql new file mode 100644 index 000000000..2ca1d3c5d --- /dev/null +++ b/sql/updates/r2815_scriptdev2.sql @@ -0,0 +1,3 @@ +DELETE FROM script_texts WHERE entry=-1578030; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1578030,'%s flies away.',0,2,0,0,'drakes EMOTE_FLY_AWAY'); From 8f811ea0fd91fa3e7b8cee658f273e67fc3c0109 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sat, 9 Mar 2013 02:08:29 +0200 Subject: [PATCH 0815/1172] [2816] Implement Crystal Spikes for Ormorok - Nexus --- .../northrend/nexus/nexus/boss_ormorok.cpp | 149 +++++++++++++++--- .../northrend/nexus/nexus/instance_nexus.cpp | 9 +- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 + sql/updates/r2816_mangos.sql | 1 + 5 files changed, 135 insertions(+), 27 deletions(-) create mode 100644 sql/updates/r2816_mangos.sql diff --git a/scripts/northrend/nexus/nexus/boss_ormorok.cpp b/scripts/northrend/nexus/nexus/boss_ormorok.cpp index 0392c6062..3d0d88cc6 100644 --- a/scripts/northrend/nexus/nexus/boss_ormorok.cpp +++ b/scripts/northrend/nexus/nexus/boss_ormorok.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: Boss_Ormorok -SD%Complete: 50% -SDComment: TODO: Correct timers. Research how spikes work, and attempt code it properly from mangos side. +SD%Complete: 90% +SDComment: Crystal spikes may need small adjustments. SDCategory: Nexus EndScriptData */ @@ -34,18 +34,34 @@ enum EMOTE_BOSS_GENERIC_FRENZY = -1000005, SPELL_REFLECTION = 47981, - SPELL_CRYSTAL_SPIKES = 47958, SPELL_CRYSTAL_SPIKES_H1 = 57082, SPELL_CRYSTAL_SPIKES_H2 = 57083, - SPELL_FRENZY = 48017, SPELL_FRENZY_H = 57086, - SPELL_TRAMPLE = 48016, SPELL_TRAMPLE_H = 57066, + SPELL_SUMMON_TANGLER_H = 61564, + + // crystal spike spells + SPELL_CRYSTAL_SPIKE_BACK = 47936, + SPELL_CRYSTAL_SPIKE_LEFT = 47942, + SPELL_CRYSTAL_SPIKE_RIGHT = 47943, + SPELL_CRYSTAL_SPIKE_AURA = 47941, + SPELL_CRYSTAL_SPIKE_PRE = 50442, + + //SPELL_CRYSTAL_SPIKE_DMG = 47944, + //SPELL_CRYSTAL_SPIKE_DMG_H = 57067, - SPELL_SUMMON_TANGLER_H = 61564 + // summons + NPC_CRYSTAL_SPIKE_INITIAL = 27101, + NPC_CRYSTAL_SPIKE_TRIGGER = 27079, + //NPC_CRYSTAL_SPIKE = 27099, // summoned by 47947 - handled in eventAI + NPC_CRYSTALLINE_TANGLER = 32665, + + GO_CRYSTAL_SPIKE = 188537, + + MAX_ALLOWED_SPIKES = 28, // this defines the maximum number of spikes summoned per turn }; /*###### @@ -70,15 +86,17 @@ struct MANGOS_DLL_DECL boss_ormorokAI : public ScriptedAI uint32 m_uiSpellReflectTimer; uint32 m_uiCrystalSpikeTimer; uint32 m_uiTanglerTimer; + uint8 m_uiSpikeCount; void Reset() override { m_bIsEnraged = false; - m_uiTrampleTimer = urand(10000, 35000); - m_uiSpellReflectTimer = urand(5000, 10000); - m_uiCrystalSpikeTimer = urand(15000, 30000); - m_uiTanglerTimer = 20000; + m_uiTrampleTimer = urand(10000, 15000); + m_uiSpellReflectTimer = urand(20000, 23000); + m_uiCrystalSpikeTimer = urand(10000, 15000); + m_uiTanglerTimer = urand(17000, 20000); + m_uiSpikeCount = 0; } void Aggro(Unit* pWho) override @@ -102,8 +120,25 @@ struct MANGOS_DLL_DECL boss_ormorokAI : public ScriptedAI void JustSummoned(Creature* pSummoned) override { - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1)) - pSummoned->AI()->AttackStart(pTarget); + switch (pSummoned->GetEntry()) + { + case NPC_CRYSTALLINE_TANGLER: + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1)) + pSummoned->AI()->AttackStart(pTarget); + break; + case NPC_CRYSTAL_SPIKE_TRIGGER: + pSummoned->CastSpell(pSummoned, SPELL_CRYSTAL_SPIKE_PRE, true); + ++m_uiSpikeCount; + // no break; + case NPC_CRYSTAL_SPIKE_INITIAL: + // Update orientation so we can always face the boss + pSummoned->SetFacingToObject(m_creature); + + // allow continuous summoning only until we reach the limit + if (m_uiSpikeCount < MAX_ALLOWED_SPIKES) + pSummoned->CastSpell(pSummoned, SPELL_CRYSTAL_SPIKE_AURA, true); + break; + } } void UpdateAI(const uint32 uiDiff) override @@ -113,35 +148,41 @@ struct MANGOS_DLL_DECL boss_ormorokAI : public ScriptedAI if (!m_bIsEnraged && m_creature->GetHealthPercent() < 25.0f) { - if (!m_creature->IsNonMeleeSpellCasted(false)) + if (DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_FRENZY : SPELL_FRENZY_H) == CAST_OK) { - m_bIsEnraged = true; DoScriptText(EMOTE_BOSS_GENERIC_FRENZY, m_creature); - DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_FRENZY : SPELL_FRENZY_H); + m_bIsEnraged = true; } } if (m_uiTrampleTimer < uiDiff) { - DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_TRAMPLE : SPELL_TRAMPLE_H); - m_uiTrampleTimer = urand(10000, 35000); + if (DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_TRAMPLE : SPELL_TRAMPLE_H) == CAST_OK) + m_uiTrampleTimer = urand(20000, 25000); } else m_uiTrampleTimer -= uiDiff; if (m_uiSpellReflectTimer < uiDiff) { - DoCastSpellIfCan(m_creature, SPELL_REFLECTION); - m_uiSpellReflectTimer = urand(25000, 40000); + if (DoCastSpellIfCan(m_creature, SPELL_REFLECTION) == CAST_OK) + m_uiSpellReflectTimer = urand(26000, 30000); } else m_uiSpellReflectTimer -= uiDiff; if (m_uiCrystalSpikeTimer < uiDiff) { - DoScriptText(SAY_ICESPIKE, m_creature); - DoCastSpellIfCan(m_creature, SPELL_CRYSTAL_SPIKES); - m_uiCrystalSpikeTimer = urand(15000, 30000); + uint32 uiSpikeSpell = SPELL_CRYSTAL_SPIKES; + if (!m_bIsRegularMode) + uiSpikeSpell = urand(0, 1) ? SPELL_CRYSTAL_SPIKES_H1 : SPELL_CRYSTAL_SPIKES_H2; + + if (DoCastSpellIfCan(m_creature, uiSpikeSpell) == CAST_OK) + { + DoScriptText(SAY_ICESPIKE, m_creature); + m_uiCrystalSpikeTimer = urand(13000, 15000); + m_uiSpikeCount = 0; + } } else m_uiCrystalSpikeTimer -= uiDiff; @@ -150,8 +191,8 @@ struct MANGOS_DLL_DECL boss_ormorokAI : public ScriptedAI { if (m_uiTanglerTimer < uiDiff) { - DoCastSpellIfCan(m_creature, SPELL_SUMMON_TANGLER_H); - m_uiTanglerTimer = urand(15000, 25000); + if (DoCastSpellIfCan(m_creature, SPELL_SUMMON_TANGLER_H) == CAST_OK) + m_uiTanglerTimer = urand(15000, 25000); } else m_uiTanglerTimer -= uiDiff; @@ -166,6 +207,60 @@ CreatureAI* GetAI_boss_ormorok(Creature* pCreature) return new boss_ormorokAI(pCreature); } +bool EffectDummyCreature_npc_crystal_spike_trigger(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) +{ + // always check spellid and effectindex + if (uiSpellId == SPELL_CRYSTAL_SPIKE_AURA && uiEffIndex == EFFECT_INDEX_0) + { + if (pCreatureTarget->GetEntry() == NPC_CRYSTAL_SPIKE_INITIAL || pCreatureTarget->GetEntry() == NPC_CRYSTAL_SPIKE_TRIGGER) + { + ScriptedInstance* pInstance = (ScriptedInstance*)pCreatureTarget->GetInstanceData(); + if (!pInstance) + return true; + + Creature* pOrmorok = pInstance->GetSingleCreatureFromStorage(NPC_ORMOROK); + if (!pOrmorok) + return true; + + // The following spells define the direction of the spike line + // All of the spells are targeting the back of the caster, but some take a small turn to left or right + // The exact algorithm is unk but we know that the chances of getting a straight line are about 75%. The other two directions are about 12.5% each + uint32 uiSpellId = 0; + if (roll_chance_i(75)) + uiSpellId = SPELL_CRYSTAL_SPIKE_BACK; + else + uiSpellId = urand(0, 1) ? SPELL_CRYSTAL_SPIKE_LEFT : SPELL_CRYSTAL_SPIKE_RIGHT; + + pCreatureTarget->CastSpell(pCreatureTarget, uiSpellId, true, NULL, NULL, pOrmorok->GetObjectGuid()); + // always return true when we are handling this spell and effect + return true; + } + } + + return false; +} + +bool EffectAuraDummy_spell_aura_dummy_crystal_spike_visual(const Aura* pAura, bool bApply) +{ + if (pAura->GetId() == SPELL_CRYSTAL_SPIKE_PRE && pAura->GetEffIndex() == EFFECT_INDEX_0 && !bApply) + { + if (Creature* pTarget = (Creature*)pAura->GetTarget()) + { + if (pTarget->GetEntry() != NPC_CRYSTAL_SPIKE_TRIGGER) + return true; + + // Use the Spike gameobject so we can summon the npc which actual does the damage + if (GameObject* pSpike = GetClosestGameObjectWithEntry(pTarget, GO_CRYSTAL_SPIKE, 10.0f)) + { + pSpike->Use(pTarget); + // Note: the following command should be handled in core by the trap GO code + pSpike->SetLootState(GO_JUST_DEACTIVATED); + } + } + } + return true; +} + void AddSC_boss_ormorok() { Script* pNewScript; @@ -174,4 +269,10 @@ void AddSC_boss_ormorok() pNewScript->Name = "boss_ormorok"; pNewScript->GetAI = &GetAI_boss_ormorok; pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_crystal_spike_trigger"; + pNewScript->pEffectDummyNPC = &EffectDummyCreature_npc_crystal_spike_trigger; + pNewScript->pEffectAuraDummy = &EffectAuraDummy_spell_aura_dummy_crystal_spike_visual; + pNewScript->RegisterSelf(); } diff --git a/scripts/northrend/nexus/nexus/instance_nexus.cpp b/scripts/northrend/nexus/nexus/instance_nexus.cpp index af91cd70c..52f211d08 100644 --- a/scripts/northrend/nexus/nexus/instance_nexus.cpp +++ b/scripts/northrend/nexus/nexus/instance_nexus.cpp @@ -80,8 +80,13 @@ void instance_nexus::OnObjectCreate(GameObject* pGo) void instance_nexus::OnCreatureCreate(Creature* pCreature) { - if (pCreature->GetEntry() == NPC_KERISTRASZA) - m_mNpcEntryGuidStore[NPC_KERISTRASZA] = pCreature->GetObjectGuid(); + switch (pCreature->GetEntry()) + { + case NPC_ORMOROK: + case NPC_KERISTRASZA: + m_mNpcEntryGuidStore[pCreature->GetEntry()] = pCreature->GetObjectGuid(); + break; + } } uint32 instance_nexus::GetData(uint32 uiType) const diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 059b4a2ab..e5a8d7838 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2815" + #define SD2_REVISION_NR "2816" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 3c718ff47..19a38b2e9 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -865,6 +865,7 @@ UPDATE creature_template SET ScriptName='boss_anomalus' WHERE entry=26763; UPDATE creature_template SET ScriptName='mob_chaotic_rift' WHERE entry=26918; UPDATE creature_template SET ScriptName='boss_keristrasza' WHERE entry=26723; UPDATE creature_template SET ScriptName='boss_ormorok' WHERE entry=26794; +UPDATE creature_template SET ScriptName='npc_crystal_spike_trigger' WHERE entry IN (27101, 27079); UPDATE creature_template SET ScriptName='boss_telestra' WHERE entry=26731; UPDATE gameobject_template SET ScriptName='go_containment_sphere' WHERE entry IN (188526, 188527, 188528); UPDATE instance_template SET ScriptName='instance_nexus' WHERE map=576; diff --git a/sql/updates/r2816_mangos.sql b/sql/updates/r2816_mangos.sql new file mode 100644 index 000000000..aadc5f7ca --- /dev/null +++ b/sql/updates/r2816_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_crystal_spike_trigger' WHERE entry IN (27101, 27079); From 5f6c7ad2f060df1dc221ccfa1b842c008df0849e Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sun, 10 Mar 2013 21:31:11 +0200 Subject: [PATCH 0816/1172] [2817] Implement script support for gauntlet event - Skadi, Utgarde Pinnacle This also implements achievements 1873 and 2156 --- .../utgarde_pinnacle/boss_skadi.cpp | 358 +++++++++++++++++- .../utgarde_pinnacle/boss_svala.cpp | 3 + .../instance_utgarde_pinnacle.cpp | 63 ++- .../utgarde_pinnacle/utgarde_pinnacle.h | 17 + sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 + sql/scriptdev2_script_full.sql | 2 +- sql/updates/r2817_mangos.sql | 1 + sql/updates/r2817_scriptdev2.sql | 1 + 9 files changed, 428 insertions(+), 20 deletions(-) create mode 100644 sql/updates/r2817_mangos.sql create mode 100644 sql/updates/r2817_scriptdev2.sql diff --git a/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_skadi.cpp b/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_skadi.cpp index adf644d37..1d4d37daa 100644 --- a/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_skadi.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_skadi.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: Boss_Skadi -SD%Complete: 30% -SDComment: Only combat abilities are implemented; Starts at trigger 4991 +SD%Complete: 80% +SDComment: The gauntlet movement needs to be random choosed for left and right. Event reset not implemented using the proper spell SDCategory: Utgarde Pinnacle EndScriptData */ @@ -38,24 +38,53 @@ enum SAY_DEATH = -1575028, SAY_DRAKE_DEATH = -1575029, EMOTE_HARPOON_RANGE = -1575030, + EMOTE_DEEP_BREATH = -1249004, // TODO: replace this ID with a generic one + // phase 1 spells + SPELL_RIDE_VEHICLE = 61791, + SPELL_FREEZING_CLOUD_LEFT = 47590, + SPELL_FREEZING_CLOUD_RIGHT = 47592, + SPELL_SKADI_TELEPORT = 61790, // teleport when Grauf is killed + SPELL_GAUNTLET_PERIODIC = 47546, // what is this? Unknown use/effect, but probably related - cast by each player + SPELL_SUMMON_GAUNTLET_MOBS = 48630, // tick every 30 sec + SPELL_SUMMON_GAUNTLET_MOBS_H = 59275, // tick every 25 sec + SPELL_LAUNCH_HARPOON = 48642, // this spell hit drake to reduce HP (force triggered from 48641) + + // phase 2 spells SPELL_CRUSH = 50234, SPELL_CRUSH_H = 59330, - SPELL_WHIRLWIND = 50228, SPELL_WHIRLWIND_H = 59322, - SPELL_POISONED_SPEAR = 50255, SPELL_POISONED_SPEAR_H = 59331, - // casted with base of creature 22515 (World Trigger), so we must make sure - // to use the close one by the door leading further in to instance. - SPELL_SUMMON_GAUNTLET_MOBS = 48630, // tick every 30 sec - SPELL_SUMMON_GAUNTLET_MOBS_H = 59275, // tick every 25 sec + MAX_INTRO_MOBS = 13, - SPELL_GAUNTLET_PERIODIC = 47546, // what is this? Unknown use/effect, but probably related + PHASE_GAUNTLET = 1, + PHASE_NORMAL_COMBAT = 2, +}; - SPELL_LAUNCH_HARPOON = 48642, // this spell hit drake to reduce HP (force triggered from 48641) +struct GauntletIntroData +{ + uint32 uiCreatureId; + float fX, fY, fZ; +}; + +static const GauntletIntroData aSkadiIntroData[MAX_INTRO_MOBS] = +{ + {NPC_YMIRJAR_WITCH_DOCTOR, 478.31f, -511.049f, 104.7242f}, + {NPC_YMIRJAR_HARPOONER, 482.25f, -514.1273f, 104.7234f}, + {NPC_YMIRJAR_HARPOONER, 481.3883f, -507.1089f, 104.7241f}, + {NPC_YMIRJAR_WARRIOR, 458.5323f, -516.2537f, 104.617f}, + {NPC_YMIRJAR_WARRIOR, 429.4242f, -517.5624f, 104.8936f}, + {NPC_YMIRJAR_WARRIOR, 427.4026f, -510.7716f, 104.8802f}, + {NPC_YMIRJAR_WARRIOR, 458.5323f, -510.2537f, 104.617f}, + {NPC_YMIRJAR_WARRIOR, 397.036f, -515.158f, 104.725f}, // the rest are guesswork but follow the same pattern + {NPC_YMIRJAR_WARRIOR, 397.036f, -507.158f, 104.725f}, + {NPC_YMIRJAR_WARRIOR, 360.297f, -508.927f, 104.662f}, + {NPC_YMIRJAR_WARRIOR, 360.297f, -516.927f, 104.662f}, + {NPC_YMIRJAR_WARRIOR, 328.324f, -513.387f, 104.577f}, + {NPC_YMIRJAR_WARRIOR, 328.324f, -504.387f, 104.577f}, }; /*###### @@ -66,23 +95,49 @@ struct MANGOS_DLL_DECL boss_skadiAI : public ScriptedAI { boss_skadiAI(Creature* pCreature) : ScriptedAI(pCreature) { - m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_pInstance = (instance_pinnacle*)pCreature->GetInstanceData(); m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); Reset(); } - ScriptedInstance* m_pInstance; + instance_pinnacle* m_pInstance; bool m_bIsRegularMode; uint32 m_uiCrush; uint32 m_uiWhirlwind; uint32 m_uiPoisonedSpear; + uint32 m_uiMountTimer; + uint8 m_uiPhase; + bool m_IntroMobs; void Reset() override { + m_uiMountTimer = 0; m_uiCrush = 15000; m_uiWhirlwind = 23000; m_uiPoisonedSpear = 10000; + m_uiPhase = PHASE_GAUNTLET; + m_IntroMobs = false; + + // Set immune during phase 1 + m_creature->ApplySpellImmune(0, IMMUNITY_DAMAGE, SPELL_SCHOOL_MASK_ALL, true); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_OOC_NOT_ATTACKABLE); + } + + void AttackStart(Unit* pWho) override + { + if (m_uiPhase == PHASE_GAUNTLET) + return; + + ScriptedAI::AttackStart(pWho); + } + + void MoveInLineOfSight(Unit* pWho) override + { + if (m_uiPhase == PHASE_GAUNTLET) + return; + + ScriptedAI::MoveInLineOfSight(pWho); } void JustReachedHome() override @@ -93,7 +148,8 @@ struct MANGOS_DLL_DECL boss_skadiAI : public ScriptedAI void Aggro(Unit* pWho) override { - DoScriptText(SAY_AGGRO, m_creature); + if (m_pInstance) + m_pInstance->SetData(TYPE_SKADI, IN_PROGRESS); } void KilledUnit(Unit* /*pVictim*/) override @@ -114,8 +170,95 @@ struct MANGOS_DLL_DECL boss_skadiAI : public ScriptedAI m_pInstance->SetData(TYPE_SKADI, DONE); } + void SpellHit(Unit* pCaster, const SpellEntry* pSpell) override + { + if (pSpell->Id == SPELL_SKADI_TELEPORT) + { + m_uiPhase = PHASE_NORMAL_COMBAT; + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_OOC_NOT_ATTACKABLE); + m_creature->ApplySpellImmune(0, IMMUNITY_DAMAGE, SPELL_SCHOOL_MASK_ALL, false); + } + } + + void JustSummoned(Creature* pSummon) override + { + // the intro mobs have predefined positions + if (m_IntroMobs) + return; + + // Move all the way to the entrance - the exact location is unk so use waypoint movement + switch (pSummon->GetEntry()) + { + case NPC_YMIRJAR_HARPOONER: + case NPC_YMIRJAR_WARRIOR: + case NPC_YMIRJAR_WITCH_DOCTOR: + pSummon->SetWalk(false); + pSummon->GetMotionMaster()->MoveWaypoint(); + break; + } + } + + void SummonedMovementInform(Creature* pSummoned, uint32 uiMotionType, uint32 uiPointId) override + { + if (uiMotionType != POINT_MOTION_TYPE || !uiPointId) + return; + + // called only for the intro mobs which are summoned directly + pSummoned->SetFacingTo(3.15f); + if (pSummoned->GetEntry() == NPC_YMIRJAR_WARRIOR) + pSummoned->HandleEmote(EMOTE_STATE_READY1H); + else + pSummoned->HandleEmote(EMOTE_STATE_READYTHROWN); + } + + void DoPrepareForGauntlet() + { + DoScriptText(SAY_AGGRO, m_creature); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_OOC_NOT_ATTACKABLE); + m_uiMountTimer = 3000; + + if (!m_pInstance) + return; + + // Prepare to periodic summon the mobs + if (Creature* pTrigger = m_creature->GetMap()->GetCreature(m_pInstance->GetSkadiMobsTrigger())) + { + pTrigger->CastSpell(pTrigger, m_bIsRegularMode ? SPELL_SUMMON_GAUNTLET_MOBS : SPELL_SUMMON_GAUNTLET_MOBS_H, true, NULL, NULL, m_creature->GetObjectGuid()); + + // Spawn the intro mobs + m_IntroMobs = true; + for (uint8 i = 0; i < MAX_INTRO_MOBS; ++i) + { + if (Creature* pYmirjar = m_creature->SummonCreature(aSkadiIntroData[i].uiCreatureId, pTrigger->GetPositionX(), pTrigger->GetPositionY(), pTrigger->GetPositionZ(), 0, TEMPSUMMON_DEAD_DESPAWN, 0)) + { + pYmirjar->SetWalk(false); + pYmirjar->GetMotionMaster()->MovePoint(1, aSkadiIntroData[i].fX, aSkadiIntroData[i].fY, aSkadiIntroData[i].fZ); + } + } + + m_IntroMobs = false; + } + } + void UpdateAI(const uint32 uiDiff) override { + if (m_uiMountTimer) + { + if (m_uiMountTimer <= uiDiff) + { + if (!m_pInstance) + return; + + if (Creature* pGrauf = m_pInstance->GetSingleCreatureFromStorage(NPC_GRAUF)) + { + if (DoCastSpellIfCan(pGrauf, SPELL_RIDE_VEHICLE) == CAST_OK) + m_uiMountTimer = 0; + } + } + else + m_uiMountTimer -= uiDiff; + } + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -155,12 +298,196 @@ CreatureAI* GetAI_boss_skadi(Creature* pCreature) return new boss_skadiAI(pCreature); } +/*###### +## npc_grauf +######*/ + +struct MANGOS_DLL_DECL npc_graufAI : public ScriptedAI +{ + npc_graufAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (instance_pinnacle*)pCreature->GetInstanceData(); + SetCombatMovement(false); + Reset(); + } + + instance_pinnacle* m_pInstance; + + uint32 m_uiFlightDelayTimer; + + void Reset() override + { + m_uiFlightDelayTimer = 0; + } + + void AttackStart(Unit* pWho) override { } + void MoveInLineOfSight(Unit* pWho) override { } + + void JustReachedHome() override + { + if (!m_pInstance) + return; + + // Handle the auras only when reached home in order to avoid vehicle complications + m_creature->RemoveAllAuras(); + + // Allow Skadi to evade + if (Creature* pSkadi = m_pInstance->GetSingleCreatureFromStorage(NPC_SKADI)) + pSkadi->AI()->EnterEvadeMode(); + + m_creature->SetLevitate(false); + m_creature->SetByteFlag(UNIT_FIELD_BYTES_1, 3, 0); + } + + void SpellHit(Unit* pCaster, const SpellEntry* pSpell) override + { + if (!m_pInstance) + return; + + if (pSpell->Id == SPELL_LAUNCH_HARPOON) + { + if (m_creature->GetHealth() < m_creature->GetMaxHealth() * 0.35f) + { + // Prepare phase 2 here, because the JustDied is called too late + if (Creature* pSkadi = m_pInstance->GetSingleCreatureFromStorage(NPC_SKADI)) + { + DoScriptText(SAY_DRAKE_DEATH, pSkadi); + // Exit vehicle before teleporting + m_creature->RemoveAllAuras(); + pSkadi->CastSpell(pSkadi, SPELL_SKADI_TELEPORT, true); + } + } + else if (urand(0, 1)) + { + if (Creature* pSkadi = m_pInstance->GetSingleCreatureFromStorage(NPC_SKADI)) + DoScriptText(urand(0, 1) ? SAY_DRAKE_HARPOON_1 : SAY_DRAKE_HARPOON_2, pSkadi); + } + + // Deal 35% damage on each harpoon hit + m_creature->DealDamage(m_creature, m_creature->GetMaxHealth() * 0.35f, NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NONE, NULL, false); + } + // TODO: Temporary workaround - please remove when the boarding wrappers are implemented in core + else if (pSpell->Id == SPELL_RIDE_VEHICLE && pCaster->GetEntry() == NPC_SKADI) + m_uiFlightDelayTimer = 2000; + } + + void MovementInform(uint32 uiType, uint32 uiPointId) override + { + if (uiType != WAYPOINT_MOTION_TYPE || !m_pInstance) + return; + + // Note: On blizz the left and right sides are randomly choosen. + // However because of the lack of waypoint movement scripting we'll use them alternatively + // Another note: the pointId in script = pointId - 1 from DB + switch (uiPointId) + { + case 8: + case 21: + // TODO: choose the left / right patch random when core will support this + DoScriptText(EMOTE_HARPOON_RANGE, m_creature); + + break; + case 10: // left breath + if (DoCastSpellIfCan(m_creature, SPELL_FREEZING_CLOUD_LEFT) == CAST_OK) + { + DoHandleBreathYell(); + DoScriptText(EMOTE_DEEP_BREATH, m_creature); + } + + // Set the achiev as failed once we get to breath area + m_pInstance->SetSpecialAchievementCriteria(TYPE_ACHIEV_LOVE_SKADI, false); + break; + case 13: // left breath end + m_creature->RemoveAurasDueToSpell(SPELL_FREEZING_CLOUD_LEFT); + break; + case 23: // right breath + if (DoCastSpellIfCan(m_creature, SPELL_FREEZING_CLOUD_RIGHT) == CAST_OK) + { + DoHandleBreathYell(); + DoScriptText(EMOTE_DEEP_BREATH, m_creature); + } + + // Set the achiev as failed once we get to breath area + m_pInstance->SetSpecialAchievementCriteria(TYPE_ACHIEV_LOVE_SKADI, false); + break; + case 26: // right breath end + m_creature->RemoveAurasDueToSpell(SPELL_FREEZING_CLOUD_RIGHT); + break; + } + } + + void DoHandleBreathYell() + { + if (!m_pInstance || !roll_chance_i(25)) + return; + + // Yell on drake breath + if (Creature* pSkadi = m_pInstance->GetSingleCreatureFromStorage(NPC_SKADI)) + { + switch (urand(0, 2)) + { + case 0: DoScriptText(SAY_DRAKEBREATH_1, pSkadi); break; + case 1: DoScriptText(SAY_DRAKEBREATH_2, pSkadi); break; + case 2: DoScriptText(SAY_DRAKEBREATH_3, pSkadi); break; + } + } + } + + // TODO: Enable the wrappers below, when they will be properly supported by the core + /* + void PassengerBoarded(Unit* pPassenger, uint8 uiSeat) override + { + if (pPassenger->GetEntry() == NPC_SKADI) + m_uiFlightDelayTimer = 2000; + } + */ + + void UpdateAI(const uint32 uiDiff) override + { + // Start the gauntlet flight + if (m_uiFlightDelayTimer) + { + if (m_uiFlightDelayTimer <= uiDiff) + { + m_creature->SetLevitate(true); + m_creature->SetWalk(false); + m_creature->SetByteValue(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_UNK_2); + m_creature->GetMotionMaster()->MoveWaypoint(); + m_uiFlightDelayTimer = 0; + } + else + m_uiFlightDelayTimer -= uiDiff; + } + } +}; + +CreatureAI* GetAI_npc_grauf(Creature* pCreature) +{ + return new npc_graufAI(pCreature); +} + +/*###### +## at_skadi +######*/ + bool AreaTrigger_at_skadi(Player* pPlayer, AreaTriggerEntry const* pAt) { + if (pPlayer->isGameMaster()) + return false; + if (ScriptedInstance* pInstance = (ScriptedInstance*)pPlayer->GetInstanceData()) { if (pInstance->GetData(TYPE_SKADI) == NOT_STARTED) + { pInstance->SetData(TYPE_SKADI, SPECIAL); + + // Start the gauntlet + if (Creature* pSkadi = pInstance->GetSingleCreatureFromStorage(NPC_SKADI)) + { + if (boss_skadiAI* pBossAI = dynamic_cast(pSkadi->AI())) + pBossAI->DoPrepareForGauntlet(); + } + } } return false; @@ -175,6 +502,11 @@ void AddSC_boss_skadi() pNewScript->GetAI = &GetAI_boss_skadi; pNewScript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "npc_grauf"; + pNewScript->GetAI = &GetAI_npc_grauf; + pNewScript->RegisterSelf(); + pNewScript = new Script; pNewScript->Name = "at_skadi"; pNewScript->pAreaTrigger = &AreaTrigger_at_skadi; diff --git a/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_svala.cpp b/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_svala.cpp index b806b80a2..d985a35fb 100644 --- a/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_svala.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_svala.cpp @@ -343,6 +343,9 @@ CreatureAI* GetAI_boss_svala(Creature* pCreature) bool AreaTrigger_at_svala_intro(Player* pPlayer, AreaTriggerEntry const* pAt) { + if (pPlayer->isGameMaster()) + return false; + if (ScriptedInstance* pInstance = (ScriptedInstance*)pPlayer->GetInstanceData()) { if (pInstance->GetData(TYPE_SVALA) == NOT_STARTED) diff --git a/scripts/northrend/utgarde_keep/utgarde_pinnacle/instance_utgarde_pinnacle.cpp b/scripts/northrend/utgarde_keep/utgarde_pinnacle/instance_utgarde_pinnacle.cpp index 3e7d35237..1cf540de0 100644 --- a/scripts/northrend/utgarde_keep/utgarde_pinnacle/instance_utgarde_pinnacle.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_pinnacle/instance_utgarde_pinnacle.cpp @@ -51,11 +51,20 @@ void instance_pinnacle::OnCreatureCreate(Creature* pCreature) case NPC_HALDOR: case NPC_RANULF: case NPC_TORGYN: + case NPC_SKADI: + case NPC_GRAUF: m_mNpcEntryGuidStore[pCreature->GetEntry()] = pCreature->GetObjectGuid(); break; case NPC_WORLD_TRIGGER: if (pCreature->GetPositionX() < 250.0f) m_gortokEventTriggerGuid = pCreature->GetObjectGuid(); + else if (pCreature->GetPositionX() > 400.0f && pCreature->GetPositionX() < 500.0f) + m_skadiMobsTriggerGuid = pCreature->GetObjectGuid(); + break; + case NPC_YMIRJAR_HARPOONER: + case NPC_YMIRJAR_WARRIOR: + case NPC_YMIRJAR_WITCH_DOCTOR: + m_lskadiGauntletMobsList.push_back(pCreature->GetObjectGuid()); break; } } @@ -99,7 +108,7 @@ void instance_pinnacle::SetData(uint32 uiType, uint32 uiData) m_uiGortokOrbTimer = 2000; } } - if (uiData == FAIL) + else if (uiData == FAIL) { if (Creature* pOrb = instance->GetCreature(m_gortokEventTriggerGuid)) { @@ -129,17 +138,55 @@ void instance_pinnacle::SetData(uint32 uiType, uint32 uiData) m_auiEncounter[uiType] = uiData; break; case TYPE_SKADI: - if (uiData == DONE) - DoUseDoorOrButton(GO_DOOR_SKADI); + // Don't process the event twice + if (m_auiEncounter[uiType] == uiData) + return; + switch (uiData) + { + case DONE: + DoUseDoorOrButton(GO_DOOR_SKADI); + break; + case SPECIAL: + // Prepare achievements + SetSpecialAchievementCriteria(TYPE_ACHIEV_LOVE_SKADI, true); + DoStartTimedAchievement(ACHIEVEMENT_CRITERIA_TYPE_KILL_CREATURE, ACHIEV_START_SKADI_ID); + + m_auiEncounter[uiType] = uiData; + return; + case FAIL: + // Handle Grauf evade - if event is in phase 1 + if (Creature* pGrauf = GetSingleCreatureFromStorage(NPC_GRAUF)) + pGrauf->AI()->EnterEvadeMode(); + + // no break; + case NOT_STARTED: + // Despawn all summons + for (GuidList::const_iterator itr = m_lskadiGauntletMobsList.begin(); itr != m_lskadiGauntletMobsList.end(); ++itr) + { + if (Creature* pYmirjar = instance->GetCreature(*itr)) + pYmirjar->ForcedDespawn(); + } + // Reset position + if (Creature* pGrauf = GetSingleCreatureFromStorage(NPC_GRAUF)) + pGrauf->GetMotionMaster()->MoveTargetedHome(); + + // no break; + case IN_PROGRESS: + + // Remove the summon aura on phase 2 or fail + if (Creature* pTrigger = instance->GetCreature(m_skadiMobsTriggerGuid)) + pTrigger->RemoveAllAuras(); + break; + } m_auiEncounter[uiType] = uiData; break; case TYPE_YMIRON: if (uiData == DONE) DoUseDoorOrButton(GO_DOOR_YMIRON); - if (uiData == IN_PROGRESS) + else if (uiData == IN_PROGRESS) SetSpecialAchievementCriteria(TYPE_ACHIEV_KINGS_BANE, true); - if (uiData == SPECIAL) + else if (uiData == SPECIAL) SetSpecialAchievementCriteria(TYPE_ACHIEV_KINGS_BANE, false); m_auiEncounter[uiType] = uiData; break; @@ -225,6 +272,12 @@ void instance_pinnacle::OnCreatureEvade(Creature* pCreature) case NPC_RHINO: SetData(TYPE_GORTOK, FAIL); break; + case NPC_YMIRJAR_WARRIOR: + case NPC_YMIRJAR_WITCH_DOCTOR: + case NPC_YMIRJAR_HARPOONER: + // Handle Skadi gauntlet reset. Used instead of using spell 49308 + SetData(TYPE_SKADI, FAIL); + break; } } diff --git a/scripts/northrend/utgarde_keep/utgarde_pinnacle/utgarde_pinnacle.h b/scripts/northrend/utgarde_keep/utgarde_pinnacle/utgarde_pinnacle.h index 8b343cc21..ab7a8dc26 100644 --- a/scripts/northrend/utgarde_keep/utgarde_pinnacle/utgarde_pinnacle.h +++ b/scripts/northrend/utgarde_keep/utgarde_pinnacle/utgarde_pinnacle.h @@ -25,6 +25,14 @@ enum NPC_WORLD_TRIGGER = 22515, + NPC_GRAUF = 26893, + NPC_SKADI = 26693, + NPC_YMIRJAR_WARRIOR = 26690, + NPC_YMIRJAR_WITCH_DOCTOR = 26691, + NPC_YMIRJAR_HARPOONER = 26692, + // NPC_FLAME_BREATH_TRIGGER = 28351, // triggers the freezing cloud spell in script + // NPC_WORLD_TRIGGER_LARGE = 23472, // only one spawn in this instance - casts 49308 during the gauntlet event + NPC_FURBOLG = 26684, NPC_WORGEN = 26683, NPC_JORMUNGAR = 26685, @@ -46,6 +54,11 @@ enum SPELL_ORB_VISUAL = 48044, SPELL_AWAKEN_SUBBOSS = 47669, SPELL_AWAKEN_GORTOK = 47670, + + // Skadi event spells + // The reset check spell is cast by npc 23472 every 7 seconds during the event + // If the spell doesn't hit any player then the event resets + // SPELL_GAUNTLET_RESET_CHECK = 49308, // for the moment we don't use this because of the lack of core support }; static const float aOrbPositions[2][3] = @@ -77,6 +90,7 @@ class MANGOS_DLL_DECL instance_pinnacle : public ScriptedInstance void SetGortokEventStarter(ObjectGuid playerGuid) { m_gortokEventStarterGuid = playerGuid; } ObjectGuid GetGortokEventStarter() { return m_gortokEventStarterGuid; } + ObjectGuid GetSkadiMobsTrigger() { return m_skadiMobsTriggerGuid; } const char* Save() const override { return m_strInstData.c_str(); } void Load(const char* chrIn) override; @@ -93,6 +107,9 @@ class MANGOS_DLL_DECL instance_pinnacle : public ScriptedInstance ObjectGuid m_gortokEventTriggerGuid; ObjectGuid m_gortokEventStarterGuid; + ObjectGuid m_skadiMobsTriggerGuid; + + GuidList m_lskadiGauntletMobsList; }; #endif diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index e5a8d7838..11be75ca7 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2816" + #define SD2_REVISION_NR "2817" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 19a38b2e9..fd9da63e9 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -1257,6 +1257,7 @@ UPDATE creature_template SET ScriptName='mob_vrykul_skeleton' WHERE entry=23970; UPDATE creature_template SET ScriptName='boss_gortok' WHERE entry=26687; UPDATE creature_template SET ScriptName='npc_gortok_subboss' WHERE entry IN (26683,26684,26685,26686); UPDATE creature_template SET ScriptName='boss_skadi' WHERE entry=26693; +UPDATE creature_template SET ScriptName='npc_grauf' WHERE entry=26893; UPDATE creature_template SET ScriptName='boss_svala' WHERE entry=29281; UPDATE creature_template SET ScriptName='boss_ymiron' WHERE entry=26861; UPDATE instance_template SET ScriptName='instance_pinnacle' WHERE map=575; diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 942b359f7..495d3402f 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -2832,7 +2832,7 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1575017,'An easy task!',13466,1,0,0,'gortok SAY_SLAY_2'), (-1575018,' ',13467,1,0,0,'gortok SAY_DEATH'), -(-1575019,'What mongrels dare intrude here? Look alive, my brothers! A feast for the one that brings me their heads!',13497,1,0,0,'skadi SAY_AGGRO'), +(-1575019,'What mongrels dare intrude here? Look alive, my brothers! A feast for the one that brings me their heads!',13497,1,0,22,'skadi SAY_AGGRO'), (-1575020,'Sear them to the bone!',13498,1,0,0,'skadi SAY_DRAKEBREATH_1'), (-1575021,'Go now! Leave nothing but ash in your wake!',13499,1,0,0,'skadi SAY_DRAKEBREATH_2'), (-1575022,'Cleanse our sacred halls with flame!',13500,1,0,0,'skadi SAY_DRAKEBREATH_3'), diff --git a/sql/updates/r2817_mangos.sql b/sql/updates/r2817_mangos.sql new file mode 100644 index 000000000..a7f4ab3f8 --- /dev/null +++ b/sql/updates/r2817_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_grauf' WHERE entry=26893; diff --git a/sql/updates/r2817_scriptdev2.sql b/sql/updates/r2817_scriptdev2.sql new file mode 100644 index 000000000..0dcab50cd --- /dev/null +++ b/sql/updates/r2817_scriptdev2.sql @@ -0,0 +1 @@ +UPDATE script_texts SET emote=22 WHERE entry=-1575019; From f4516a71b0a587c2f355032ce5dbb9b44dcc5915 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Mon, 11 Mar 2013 08:48:28 +0200 Subject: [PATCH 0817/1172] [2818] Fix some emote texts Also fix a unit flag from previous commit --- .../northrend/utgarde_keep/utgarde_pinnacle/boss_skadi.cpp | 7 +++++-- sd2_revision_nr.h | 2 +- sql/scriptdev2_script_full.sql | 6 ++++-- sql/updates/r2818_scriptdev2.sql | 4 ++++ 4 files changed, 14 insertions(+), 5 deletions(-) create mode 100644 sql/updates/r2818_scriptdev2.sql diff --git a/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_skadi.cpp b/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_skadi.cpp index 1d4d37daa..54f9b153f 100644 --- a/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_skadi.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_skadi.cpp @@ -38,7 +38,7 @@ enum SAY_DEATH = -1575028, SAY_DRAKE_DEATH = -1575029, EMOTE_HARPOON_RANGE = -1575030, - EMOTE_DEEP_BREATH = -1249004, // TODO: replace this ID with a generic one + EMOTE_DEEP_BREATH = -1575041, // phase 1 spells SPELL_RIDE_VEHICLE = 61791, @@ -214,7 +214,6 @@ struct MANGOS_DLL_DECL boss_skadiAI : public ScriptedAI void DoPrepareForGauntlet() { DoScriptText(SAY_AGGRO, m_creature); - m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_OOC_NOT_ATTACKABLE); m_uiMountTimer = 3000; if (!m_pInstance) @@ -252,7 +251,11 @@ struct MANGOS_DLL_DECL boss_skadiAI : public ScriptedAI if (Creature* pGrauf = m_pInstance->GetSingleCreatureFromStorage(NPC_GRAUF)) { if (DoCastSpellIfCan(pGrauf, SPELL_RIDE_VEHICLE) == CAST_OK) + { + // Maybe this flag should be set by the vehicle flags - requires research + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_OOC_NOT_ATTACKABLE); m_uiMountTimer = 0; + } } } else diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 11be75ca7..9cfacf4f2 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2817" + #define SD2_REVISION_NR "2818" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 495d3402f..c4c3b77f7 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -2854,7 +2854,9 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1575037,'You have failed your people!',13615,1,0,0,'ymiron SAY_SLAY_2'), (-1575038,'There is a reason I am king!',13616,1,0,0,'ymiron SAY_SLAY_3'), (-1575039,'Bleed no more!',13617,1,0,0,'ymiron SAY_SLAY_4'), -(-1575040,'What... awaits me... now?',13618,1,0,0,'ymiron SAY_DEATH'); +(-1575040,'What... awaits me... now?',13618,1,0,0,'ymiron SAY_DEATH'), + +(-1575041,'%s takes a deep breath.',0,3,0,0,'grauf EMOTE_DEEP_BREATH'); -- -1 576 000 NEXUS INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES @@ -3908,7 +3910,7 @@ INSERT INTO script_texts (entry,content_default,sound,type,LANGUAGE,emote,commen (-1616031,'This resolution pains me deeply, but the destruction, the monumental loss of life had to end. Regardless of Malygos\' recent transgressions, I will mourn his loss. He was once a guardian, a protector. This day, one of the world\'s mightiest has fallen.',14408,1,0,1,'alextrasza SAY_OUTRO_3'), (-1616032,'The red dragonflight will take on the burden of mending the devastation wrought on Azeroth. Return home to your people and rest. Tomorrow will bring you new challenges, and you must be ready to face them. Life...goes on.',14409,1,0,1,'alextrasza SAY_OUTRO_4'), (-1616033,'A Power Spark forms from a nearby rift!',0,3,0,0,'malygos SAY_EMOTE_SPARK'), -(-1616034,'%s takes a deep breath...',0,3,0,0,'malygos SAY_EMOTE_BREATH'); +(-1616034,'%s takes a deep breath.',0,3,0,0,'malygos SAY_EMOTE_BREATH'); -- -1 619 000 AHN'KAHET INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES diff --git a/sql/updates/r2818_scriptdev2.sql b/sql/updates/r2818_scriptdev2.sql new file mode 100644 index 000000000..788f31030 --- /dev/null +++ b/sql/updates/r2818_scriptdev2.sql @@ -0,0 +1,4 @@ +DELETE FROM script_texts WHERE entry IN (-1575041,-1616034); +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1575041,'%s takes a deep breath.',0,3,0,0,'grauf EMOTE_DEEP_BREATH'), +(-1616034,'%s takes a deep breath.',0,3,0,0,'malygos SAY_EMOTE_BREATH'); From 09a7bf260eb1bf6c40a3723de2bcc494329b7b81 Mon Sep 17 00:00:00 2001 From: tarwyn Date: Mon, 11 Mar 2013 09:02:35 +0200 Subject: [PATCH 0818/1172] [2819] Fix issue for quest 1249 Close #43 Signed-off-by: Xfurry --- scripts/eastern_kingdoms/wetlands.cpp | 4 +--- sd2_revision_nr.h | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/scripts/eastern_kingdoms/wetlands.cpp b/scripts/eastern_kingdoms/wetlands.cpp index 8dc4eb249..2d4694050 100644 --- a/scripts/eastern_kingdoms/wetlands.cpp +++ b/scripts/eastern_kingdoms/wetlands.cpp @@ -75,9 +75,7 @@ struct MANGOS_DLL_DECL npc_tapoke_slim_jahnAI : public npc_escortAI if (HasEscortState(STATE_ESCORT_ESCORTING) && !m_bFriendSummoned && pPlayer) { - for (uint8 i = 0; i < 3; ++i) - m_creature->CastSpell(m_creature, SPELL_CALL_FRIENDS, true); - + DoCastSpellIfCan(m_creature, SPELL_CALL_FRIENDS); m_bFriendSummoned = true; } } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 9cfacf4f2..d32c94575 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2818" + #define SD2_REVISION_NR "2819" #endif // __SD2_REVISION_NR_H__ From 511fa72efb1506cfe15a6556bdc09027ac20e7ee Mon Sep 17 00:00:00 2001 From: Xfurry Date: Mon, 11 Mar 2013 10:36:17 +0200 Subject: [PATCH 0819/1172] [2820] Use the new ScriptEffect call in SD2. Requires CMangos [12409] --- ScriptMgr.cpp | 11 +++++++++++ ScriptMgr.h | 5 +++-- sd2_revision_nr.h | 2 +- sql/scriptdev2_script_full.sql | 2 +- sql/updates/r2820_scriptdev2.sql | 1 + 5 files changed, 17 insertions(+), 4 deletions(-) create mode 100644 sql/updates/r2820_scriptdev2.sql diff --git a/ScriptMgr.cpp b/ScriptMgr.cpp index 5c16c0cfa..c2f6be53e 100644 --- a/ScriptMgr.cpp +++ b/ScriptMgr.cpp @@ -591,6 +591,17 @@ bool EffectDummyItem(Unit* pCaster, uint32 spellId, SpellEffectIndex effIndex, I return pTempScript->pEffectDummyItem(pCaster, spellId, effIndex, pTarget); } +MANGOS_DLL_EXPORT +bool EffectScriptEffectCreature(Unit* pCaster, uint32 spellId, SpellEffectIndex effIndex, Creature* pTarget) +{ + Script* pTempScript = m_scripts[pTarget->GetScriptId()]; + + if (!pTempScript || !pTempScript->pEffectScriptEffectNPC) + return false; + + return pTempScript->pEffectScriptEffectNPC(pCaster, spellId, effIndex, pTarget); +} + MANGOS_DLL_EXPORT bool AuraDummy(Aura const* pAura, bool bApply) { diff --git a/ScriptMgr.h b/ScriptMgr.h index 0200a90e2..6a8d75774 100644 --- a/ScriptMgr.h +++ b/ScriptMgr.h @@ -68,8 +68,8 @@ struct Script pQuestAcceptNPC(NULL), pQuestAcceptGO(NULL), pQuestAcceptItem(NULL), pQuestRewardedNPC(NULL), pQuestRewardedGO(NULL), pGOUse(NULL), pItemUse(NULL), pAreaTrigger(NULL), pProcessEventId(NULL), - pEffectDummyNPC(NULL), pEffectDummyGO(NULL), pEffectDummyItem(NULL), pEffectAuraDummy(NULL), - GetAI(NULL), GetInstanceData(NULL) + pEffectDummyNPC(NULL), pEffectDummyGO(NULL), pEffectDummyItem(NULL), pEffectScriptEffectNPC(NULL), + pEffectAuraDummy(NULL), GetAI(NULL), GetInstanceData(NULL) {} std::string Name; @@ -94,6 +94,7 @@ struct Script bool (*pEffectDummyNPC)(Unit*, uint32, SpellEffectIndex, Creature*); bool (*pEffectDummyGO)(Unit*, uint32, SpellEffectIndex, GameObject*); bool (*pEffectDummyItem)(Unit*, uint32, SpellEffectIndex, Item*); + bool (*pEffectScriptEffectNPC)(Unit*, uint32, SpellEffectIndex, Creature*); bool (*pEffectAuraDummy)(const Aura*, bool); CreatureAI* (*GetAI)(Creature*); diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index d32c94575..f9756c7f1 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2819" + #define SD2_REVISION_NR "2820" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index c4c3b77f7..c7429c023 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -3,7 +3,7 @@ -- DELETE FROM sd2_db_version; -INSERT INTO sd2_db_version (version) VALUES ('ScriptDev2 (for C-MaNGOS 12361+) '); +INSERT INTO sd2_db_version (version) VALUES ('ScriptDev2 (for C-MaNGOS 12409+) '); -- -- Below contains data for table `script_texts` mainly used in C++ parts. diff --git a/sql/updates/r2820_scriptdev2.sql b/sql/updates/r2820_scriptdev2.sql new file mode 100644 index 000000000..0d2e702c4 --- /dev/null +++ b/sql/updates/r2820_scriptdev2.sql @@ -0,0 +1 @@ +UPDATE sd2_db_version SET version='ScriptDev2 (for C-MaNGOS 12409+) '; From 090e1a1556bc907e3cd0c1c67dc6f112f25e8014 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Mon, 11 Mar 2013 21:12:06 +0200 Subject: [PATCH 0820/1172] [2821] Implement script for spell 21050 This will fix quest 6661 Thanks tarwyn and Nett118 for the info Close #22 --- scripts/world/spell_scripts.cpp | 22 ++++++++++++++++++++++ sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 2 +- sql/updates/r2821_mangos.sql | 1 + 4 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 sql/updates/r2821_mangos.sql diff --git a/scripts/world/spell_scripts.cpp b/scripts/world/spell_scripts.cpp index 8133f1e43..5897c4336 100644 --- a/scripts/world/spell_scripts.cpp +++ b/scripts/world/spell_scripts.cpp @@ -25,6 +25,7 @@ EndScriptData */ spell 8913 spell 19512 spell 21014 +spell 21050 spell 29528 spell 29866 spell 34665 @@ -339,6 +340,12 @@ enum // for quest 10584 SPELL_PROTOVOLTAIC_MAGNETO_COLLECTOR= 37136, NPC_ENCASED_ELECTROMENTAL = 21731, + + // quest 6661 + SPELL_MELODIOUS_RAPTURE = 21050, + SPELL_MELODIOUS_RAPTURE_VISUAL = 21051, + NPC_DEEPRUN_RAT = 13016, + NPC_ENTHRALLED_DEEPRUN_RAT = 13017, }; bool EffectAuraDummy_spell_aura_dummy_npc(const Aura* pAura, bool bApply) @@ -1016,6 +1023,21 @@ bool EffectDummyCreature_spell_dummy_npc(Unit* pCaster, uint32 uiSpellId, SpellE } return true; } + case SPELL_MELODIOUS_RAPTURE: + { + if (uiEffIndex == EFFECT_INDEX_0) + { + if (pCaster->GetTypeId() != TYPEID_PLAYER && pCreatureTarget->GetEntry() != NPC_DEEPRUN_RAT) + return true; + + pCreatureTarget->UpdateEntry(NPC_ENTHRALLED_DEEPRUN_RAT); + pCreatureTarget->CastSpell(pCreatureTarget, SPELL_MELODIOUS_RAPTURE_VISUAL, false); + pCreatureTarget->GetMotionMaster()->MoveFollow(pCaster, frand(0.5f, 3.0f), frand(M_PI_F * 0.8f, M_PI_F * 1.2f)); + + ((Player*)pCaster)->KilledMonsterCredit(NPC_ENTHRALLED_DEEPRUN_RAT); + } + return true; + } } return false; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index f9756c7f1..7e7934ef8 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2820" + #define SD2_REVISION_NR "2821" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index fd9da63e9..8db0e6ce3 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -166,7 +166,7 @@ UPDATE creature_template SET ScriptName='npc_redemption_target' WHERE entry IN ( /* SPELL */ UPDATE creature_template SET ScriptName='spell_dummy_npc' WHERE entry IN ( -- eastern kingdoms -1200,8888, +1200,8888,13016, -- kalimdor 9299,12296,12298, -- outland diff --git a/sql/updates/r2821_mangos.sql b/sql/updates/r2821_mangos.sql new file mode 100644 index 000000000..872467ffd --- /dev/null +++ b/sql/updates/r2821_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='spell_dummy_npc' WHERE entry=13016; From d879c0eec70ac39889649f286740f57b4ef8a0ba Mon Sep 17 00:00:00 2001 From: Xfurry Date: Mon, 11 Mar 2013 22:26:17 +0200 Subject: [PATCH 0821/1172] [2822] Fix some instance reload issues on Zul'Aman Thanks zkillertheman for pointing Close #44 --- .../eastern_kingdoms/zulaman/instance_zulaman.cpp | 12 +++++++++++- scripts/eastern_kingdoms/zulaman/zulaman.cpp | 8 ++++---- scripts/eastern_kingdoms/zulaman/zulaman.h | 1 + sd2_revision_nr.h | 2 +- sql/scriptdev2_script_full.sql | 4 ++++ sql/updates/r2822_scriptdev2.sql | 3 +++ 6 files changed, 24 insertions(+), 6 deletions(-) create mode 100644 sql/updates/r2822_scriptdev2.sql diff --git a/scripts/eastern_kingdoms/zulaman/instance_zulaman.cpp b/scripts/eastern_kingdoms/zulaman/instance_zulaman.cpp index 5f2247442..95a9fe909 100644 --- a/scripts/eastern_kingdoms/zulaman/instance_zulaman.cpp +++ b/scripts/eastern_kingdoms/zulaman/instance_zulaman.cpp @@ -51,6 +51,15 @@ bool instance_zulaman::IsEncounterInProgress() const return false; } +void instance_zulaman::OnPlayerEnter(Player* pPlayer) +{ + if (GetData(TYPE_EVENT_RUN) == IN_PROGRESS) + { + DoUpdateWorldState(WORLD_STATE_ID, 1); + DoUpdateWorldState(WORLD_STATE_COUNTER, GetData(TYPE_RUN_EVENT_TIME)); + } +} + void instance_zulaman::OnCreatureCreate(Creature* pCreature) { switch (pCreature->GetEntry()) @@ -155,7 +164,8 @@ void instance_zulaman::OnObjectCreate(GameObject* pGo) case GO_STRANGE_GONG: break; case GO_MASSIVE_GATE: - if (m_auiEncounter[TYPE_EVENT_RUN] == DONE || m_auiEncounter[TYPE_EVENT_RUN] == FAIL) + // The gate needs to be opened even if the event is still in progress + if (m_auiEncounter[TYPE_EVENT_RUN] == DONE || m_auiEncounter[TYPE_EVENT_RUN] == FAIL || m_auiEncounter[TYPE_EVENT_RUN] == IN_PROGRESS) pGo->SetGoState(GO_STATE_ACTIVE); break; case GO_WIND_DOOR: diff --git a/scripts/eastern_kingdoms/zulaman/zulaman.cpp b/scripts/eastern_kingdoms/zulaman/zulaman.cpp index ea8867d94..8f0629328 100644 --- a/scripts/eastern_kingdoms/zulaman/zulaman.cpp +++ b/scripts/eastern_kingdoms/zulaman/zulaman.cpp @@ -118,11 +118,11 @@ enum SAY_AT_GONG = -1568080, SAY_OPEN_ENTRANCE = -1568081, + GOSSIP_ITEM_ID_BEGIN = -3568000, + SPELL_BANGING_THE_GONG = 45225 }; -#define GOSSIP_ITEM_BEGIN "Thanks for the concern, but we intend to explore Zul'Aman." - struct MANGOS_DLL_DECL npc_harrison_jones_zaAI : public npc_escortAI { npc_harrison_jones_zaAI(Creature* pCreature) : npc_escortAI(pCreature) @@ -146,7 +146,7 @@ struct MANGOS_DLL_DECL npc_harrison_jones_zaAI : public npc_escortAI m_pInstance->DoToggleGameObjectFlags(GO_STRANGE_GONG, GO_FLAG_NO_INTERACT, false); // Start bang gong for 2min - m_creature->CastSpell(m_creature, SPELL_BANGING_THE_GONG, false); + DoCastSpellIfCan(m_creature, SPELL_BANGING_THE_GONG); SetEscortPaused(true); break; case 3: @@ -185,7 +185,7 @@ bool GossipHello_npc_harrison_jones_za(Player* pPlayer, Creature* pCreature) pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); if (pInstance && pInstance->GetData(TYPE_EVENT_RUN) == NOT_STARTED) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_BEGIN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); + pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_ID_BEGIN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); return true; diff --git a/scripts/eastern_kingdoms/zulaman/zulaman.h b/scripts/eastern_kingdoms/zulaman/zulaman.h index 88c77a7ce..3aeee9fcf 100644 --- a/scripts/eastern_kingdoms/zulaman/zulaman.h +++ b/scripts/eastern_kingdoms/zulaman/zulaman.h @@ -155,6 +155,7 @@ class MANGOS_DLL_DECL instance_zulaman : public ScriptedInstance void Initialize() override; bool IsEncounterInProgress() const override; + void OnPlayerEnter(Player* pPlayer) override; void OnCreatureCreate(Creature* pCreature) override; void OnObjectCreate(GameObject* pGo) override; void OnCreatureDeath(Creature* pCreature) override; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 7e7934ef8..3df011778 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2821" + #define SD2_REVISION_NR "2822" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index c7429c023..57c2b605e 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -4557,6 +4557,10 @@ INSERT INTO gossip_texts (entry,content_default,comment) VALUES (-3564001,'I\'m ready, Akama.','akama(illidan) GOSSIP_ITEM_PREPARE'), (-3564002,'We\'re ready to face Illidan.','akama(illidan) GOSSIP_ITEM_START_EVENT'); +-- -3 568 000 ZUL'AMAN +INSERT INTO gossip_texts (entry,content_default,comment) VALUES +(-3568000,'Thanks for the concern, but we intend to explore Zul\'Aman.','harrison jones GOSSIP_ITEM_BEGIN'); + -- -3 595 000 CULLING OF STRATHOLME INSERT INTO gossip_texts (entry,content_default,comment) VALUES (-3595000,'What do you think they\'re up to?','chromie GOSSIP_ITEM_ENTRANCE_1'), diff --git a/sql/updates/r2822_scriptdev2.sql b/sql/updates/r2822_scriptdev2.sql new file mode 100644 index 000000000..06bfa1c74 --- /dev/null +++ b/sql/updates/r2822_scriptdev2.sql @@ -0,0 +1,3 @@ +DELETE FROM gossip_texts WHERE entry=-3568000; +INSERT INTO gossip_texts (entry,content_default,comment) VALUES +(-3568000,'Thanks for the concern, but we intend to explore Zul\'Aman.','harrison jones GOSSIP_ITEM_BEGIN'); From f1d93eb9837a4c8b2763c94cdf80ec24237ae83b Mon Sep 17 00:00:00 2001 From: Xfurry Date: Tue, 12 Mar 2013 09:01:37 +0200 Subject: [PATCH 0822/1172] [2823] Implement script for Anub'arak's Impale target - Azjol Nerub --- .../azjol-nerub/azjol-nerub/boss_anubarak.cpp | 68 +++++++++++++++++++ sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 + sql/updates/r2823_mangos.sql | 1 + 4 files changed, 71 insertions(+), 1 deletion(-) create mode 100644 sql/updates/r2823_mangos.sql diff --git a/scripts/northrend/azjol-nerub/azjol-nerub/boss_anubarak.cpp b/scripts/northrend/azjol-nerub/azjol-nerub/boss_anubarak.cpp index 8378c327b..64c674354 100644 --- a/scripts/northrend/azjol-nerub/azjol-nerub/boss_anubarak.cpp +++ b/scripts/northrend/azjol-nerub/azjol-nerub/boss_anubarak.cpp @@ -55,6 +55,11 @@ enum SPELL_SUMMON_VENOMANCER = 53615, // summons 29217 SPELL_SUMMON_DARTER = 53599, // summons 29213 + // impale spells + SPELL_IMPALE_VISUAL = 53455, + SPELL_IMPALE = 53454, + SPELL_IMPALE_H = 59446, + NPC_ANUBAR_DARTER = 29213, NPC_ANUBAR_ASSASSIN = 29214, NPC_ANUBAR_GUARDIAN = 29216, @@ -175,6 +180,9 @@ struct MANGOS_DLL_DECL boss_anubarakAI : public ScriptedAI pSummoned->GetMotionMaster()->MovePoint(0, fX, fY, fZ); } break; + case NPC_IMPALE_TARGET: + pSummoned->CastSpell(pSummoned, SPELL_IMPALE_VISUAL, true); + break; default: break; } @@ -313,6 +321,61 @@ CreatureAI* GetAI_boss_anubarak(Creature* pCreature) return new boss_anubarakAI(pCreature); } +/*###### +## npc_impale_target +######*/ + +struct MANGOS_DLL_DECL npc_impale_targetAI : public Scripted_NoMovementAI +{ + npc_impale_targetAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); + Reset(); + } + + ScriptedInstance* m_pInstance; + bool m_bIsRegularMode; + + uint32 m_uiImpaleTimer; + + void Reset() override + { + m_uiImpaleTimer = 3000; + } + + void AttackStart(Unit* pWho) override { } + void MoveInLineOfSight(Unit* pWho) override { } + + void UpdateAI(const uint32 uiDiff) override + { + if (m_uiImpaleTimer) + { + if (m_uiImpaleTimer <= uiDiff) + { + if (!m_pInstance) + return; + + m_creature->RemoveAurasDueToSpell(SPELL_IMPALE_VISUAL); + + // The impale is cast by Anub on the impale target + if (Creature* pAnub = m_pInstance->GetSingleCreatureFromStorage(NPC_ANUBARAK)) + pAnub->CastSpell(m_creature, m_bIsRegularMode ? SPELL_IMPALE : SPELL_IMPALE_H, true); + + m_creature->ForcedDespawn(3000); + m_uiImpaleTimer = 0; + } + else + m_uiImpaleTimer -= uiDiff; + } + } +}; + +CreatureAI* GetAI_npc_impale_target(Creature* pCreature) +{ + return new npc_impale_targetAI(pCreature); +} + void AddSC_boss_anubarak() { Script* pNewScript; @@ -321,4 +384,9 @@ void AddSC_boss_anubarak() pNewScript->Name = "boss_anubarak"; pNewScript->GetAI = &GetAI_boss_anubarak; pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_impale_target"; + pNewScript->GetAI = &GetAI_npc_impale_target; + pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 3df011778..a90d00889 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2822" + #define SD2_REVISION_NR "2823" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 8db0e6ce3..6bba64638 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -251,6 +251,7 @@ UPDATE instance_template SET ScriptName='instance_ahnkahet' WHERE map=619; /* AZJOL-NERUB */ UPDATE creature_template SET ScriptName='boss_anubarak' WHERE entry=29120; +UPDATE creature_template SET ScriptName='npc_impale_target' WHERE entry=29184; UPDATE creature_template SET ScriptName='boss_hadronox' WHERE entry=28921; UPDATE creature_template SET ScriptName='boss_krikthir' WHERE entry=28684; UPDATE instance_template SET ScriptName='instance_azjol-nerub' WHERE map=601; diff --git a/sql/updates/r2823_mangos.sql b/sql/updates/r2823_mangos.sql new file mode 100644 index 000000000..e471353d1 --- /dev/null +++ b/sql/updates/r2823_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_impale_target' WHERE entry=29184; From 5b42ccf56e69787ba660b0e09e9a84d6a64b6539 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sat, 23 Mar 2013 02:58:25 +0200 Subject: [PATCH 0823/1172] [2824] Implement gauntlet event for Hadronox - Azjol-Nerub Also slightly improve script for Krik'thir This will also implement achievement 1297 - Hadronox Denied --- .../azjol-nerub/azjol-nerub/azjol-nerub.h | 21 +++ .../azjol-nerub/azjol-nerub/boss_hadronox.cpp | 177 ++++++++++++++++-- .../azjol-nerub/azjol-nerub/boss_krikthir.cpp | 26 +-- .../azjol-nerub/instance_azjol-nerub.cpp | 89 ++++++++- sd2_revision_nr.h | 2 +- sql/scriptdev2_script_full.sql | 8 +- sql/updates/r2824_scriptdev2.sql | 5 + 7 files changed, 296 insertions(+), 32 deletions(-) create mode 100644 sql/updates/r2824_scriptdev2.sql diff --git a/scripts/northrend/azjol-nerub/azjol-nerub/azjol-nerub.h b/scripts/northrend/azjol-nerub/azjol-nerub/azjol-nerub.h index 49e0c393d..d6b5e7d8a 100644 --- a/scripts/northrend/azjol-nerub/azjol-nerub/azjol-nerub.h +++ b/scripts/northrend/azjol-nerub/azjol-nerub/azjol-nerub.h @@ -14,6 +14,7 @@ enum TYPE_ANUBARAK = 2, NPC_KRIKTHIR = 28684, + NPC_HADRONOX = 28921, NPC_ANUBARAK = 29120, SAY_SEND_GROUP_1 = -1601004, @@ -23,17 +24,23 @@ enum NPC_GASHRA = 28730, NPC_NARJIL = 28729, NPC_SILTHIK = 28731, + NPC_ANUBAR_CRUSHER = 28922, NPC_WORLD_TRIGGER = 22515, + NPC_WORLD_TRIGGER_LARGE = 23472, GO_DOOR_KRIKTHIR = 192395, GO_DOOR_ANUBARAK_1 = 192396, GO_DOOR_ANUBARAK_2 = 192397, GO_DOOR_ANUBARAK_3 = 192398, + SAY_CRUSHER_AGGRO = -1601025, + SAY_CRUSHER_SPECIAL = -1601026, + ACHIEV_START_ANUB_ID = 20381, ACHIEV_CRITERIA_WATCH_DIE = 4240, // Krikthir, achiev 1296 + ACHIEV_CRITERIA_DENIED = 4244, // Hadronox, achiev 1297 }; static const uint32 aWatchers[] = {NPC_GASHRA, NPC_NARJIL, NPC_SILTHIK}; @@ -56,6 +63,7 @@ class MANGOS_DLL_DECL instance_azjol_nerub : public ScriptedInstance void OnCreatureDeath(Creature* pCreature) override; void SetData(uint32 uiType, uint32 uiData) override; + uint32 GetData(uint32 uiType) const override; bool CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/) const override; @@ -64,6 +72,11 @@ class MANGOS_DLL_DECL instance_azjol_nerub : public ScriptedInstance ObjectGuid GetDarterTrigger() { return m_darterSummonTarget; } ObjectGuid GetAnubTrigger() { return m_anubSummonTarget; } + void GetHadronoxTriggerList(GuidList& lList) { lList = m_lSpiderTriggersGuids; } + void ResetHadronoxTriggers(); + + void SetHadronoxDeniedAchievCriteria(bool bIsMet) { m_bHadronoxDenied = bIsMet; } + const char* Save() const override { return m_strInstData.c_str(); } void Load(const char* chrIn) override; @@ -77,6 +90,11 @@ class MANGOS_DLL_DECL instance_azjol_nerub : public ScriptedInstance std::string m_strInstData; ObjectGuid m_playerGuid; + + // Hadronox triggers + GuidList m_lSpiderTriggersGuids; + + // Anub triggers ObjectGuid m_darterSummonTarget; ObjectGuid m_guardianSummonTarget; ObjectGuid m_anubSummonTarget; @@ -84,7 +102,10 @@ class MANGOS_DLL_DECL instance_azjol_nerub : public ScriptedInstance GuidList m_lTriggerGuids; uint32 m_uiWatcherTimer; + uint32 m_uiGauntletEndTimer; bool m_bWatchHimDie; + bool m_bHadronoxDenied; + bool m_bGauntletStarted; }; #endif diff --git a/scripts/northrend/azjol-nerub/azjol-nerub/boss_hadronox.cpp b/scripts/northrend/azjol-nerub/azjol-nerub/boss_hadronox.cpp index d632d9c52..5b7a1412b 100644 --- a/scripts/northrend/azjol-nerub/azjol-nerub/boss_hadronox.cpp +++ b/scripts/northrend/azjol-nerub/azjol-nerub/boss_hadronox.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: Boss_Hadronox -SD%Complete: 50% -SDComment: Only basic abilities. Gauntlet event NYI +SD%Complete: 90% +SDComment: Some details and timers can be improved. SDCategory: Azjol'Nerub EndScriptData */ @@ -26,6 +26,9 @@ EndScriptData */ enum { + EMOTE_MOVE_TUNNEL = -1601013, + + SPELL_TAUNT = 53799, SPELL_PIERCE_ARMOR = 53418, SPELL_ACID_CLOUD = 53400, SPELL_ACID_CLOUD_H = 59419, @@ -34,19 +37,18 @@ enum SPELL_WEB_GRAB = 57731, SPELL_WEB_GRAB_H = 59421, - // Gauntlet end spells - send events 19101 and 19102 - // SPELL_WEB_FRONT_DOORS = 53177, - // SPELL_WEB_SIDE_DOORS = 53185, - - // Gauntlet summoned npcs - // NPC_ANUBAR_CHAMPION_1 = 29062, - // NPC_ANUBAR_CRYPT_FIEND_1 = 29063, - // NPC_ANUBAR_NECROMANCER_1 = 29064, - // NPC_ANUBAR_CHAMPION_2 = 29096, - // NPC_ANUBAR_CRYPT_FIEND_2 = 29097, - // NPC_ANUBAR_NECROMANCER_2 = 29098, + // Gauntlet spells + SPELL_SUMMON_CHAMPION = 53035, + SPELL_SUMMON_NECROMANCER = 53036, + SPELL_SUMMON_CRYPT_FIEND = 53037, + SPELL_WEB_FRONT_DOORS = 53177, // sends event 19101 + SPELL_WEB_SIDE_DOORS = 53185, // sends event 19102 - it seems that this isn't actually used here + + MAX_SPIDERS = 9, }; +static const uint32 aSpiderEntries[MAX_SPIDERS] = {28924, 28925, 29051, 29062, 29063, 29064, 29096, 29097, 29098}; + /* ##### Gauntlet description ##### * This is the timed gauntlet - waves of non-elite spiders will spawn from the 3 doors located a little above the main room * They will make their way down to fight Hadronox but she will head to the main room, fighting the spiders @@ -63,16 +65,20 @@ struct MANGOS_DLL_DECL boss_hadronoxAI : public ScriptedAI { m_pInstance = (instance_azjol_nerub*)pCreature->GetInstanceData(); m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); + m_uiGauntletStartTimer = 1000; Reset(); } instance_azjol_nerub* m_pInstance; bool m_bIsRegularMode; + uint32 m_uiGauntletStartTimer; + uint32 m_uiAcidTimer; uint32 m_uiLeechTimer; uint32 m_uiPierceTimer; uint32 m_uiGrabTimer; + uint32 m_uiTauntTimer; void Reset() override { @@ -80,6 +86,41 @@ struct MANGOS_DLL_DECL boss_hadronoxAI : public ScriptedAI m_uiLeechTimer = urand(3000, 9000); m_uiPierceTimer = urand(1000, 3000); m_uiGrabTimer = urand(15000, 19000); + m_uiTauntTimer = urand(2000, 5000); + } + + void Aggro(Unit* pWho) override + { + if (pWho->GetTypeId() == TYPEID_PLAYER && m_pInstance) + m_pInstance->SetData(TYPE_HADRONOX, IN_PROGRESS); + } + + void AttackStart(Unit* pWho) override + { + // No more attacks during the movement upstairs + if ((m_pInstance && m_pInstance->GetData(TYPE_HADRONOX) == SPECIAL) && pWho->GetTypeId() != TYPEID_PLAYER) + return; + + ScriptedAI::AttackStart(pWho); + } + + void MoveInLineOfSight(Unit* pWho) override + { + // Force the spiders to attack him + if (pWho->GetTypeId() == TYPEID_UNIT && m_creature->IsWithinDistInMap(pWho, 2 * ATTACK_DISTANCE) && !pWho->getVictim()) + { + for (uint8 i = 0; i < MAX_SPIDERS; ++i) + { + if (pWho->GetEntry() == aSpiderEntries[i]) + ((Creature*)pWho)->AI()->AttackStart(m_creature); + } + } + + // No more attacks during the movement upstairs + if ((m_pInstance && m_pInstance->GetData(TYPE_HADRONOX) == SPECIAL) && pWho->GetTypeId() != TYPEID_PLAYER) + return; + + ScriptedAI::MoveInLineOfSight(pWho); } void KilledUnit(Unit* /*pVictim*/) override @@ -87,15 +128,112 @@ struct MANGOS_DLL_DECL boss_hadronoxAI : public ScriptedAI m_creature->SetHealth(m_creature->GetHealth() + (m_creature->GetMaxHealth() * 0.1)); } + void JustDied(Unit* /*pKiller*/) override + { + if (m_pInstance) + m_pInstance->SetData(TYPE_HADRONOX, DONE); + } + + void EnterEvadeMode() override + { + m_creature->RemoveAllAurasOnEvade(); + m_creature->DeleteThreatList(); + m_creature->CombatStop(true); + m_creature->LoadCreatureAddon(true); + + m_creature->SetLootRecipient(NULL); + + Reset(); + + if (!m_creature->isAlive() || !m_pInstance) + return; + + // Moving upstairs, don't disturb + if (m_pInstance->GetData(TYPE_HADRONOX) == SPECIAL) + { + m_creature->GetMotionMaster()->MoveWaypoint(); + DoScriptText(EMOTE_MOVE_TUNNEL, m_creature); + } + // Stay upstairs if evade from players + else if (m_pInstance->GetData(TYPE_HADRONOX) == IN_PROGRESS) + m_creature->GetMotionMaster()->MovePoint(1, 530.42f, 560.003f, 733.0308f); + else + m_creature->GetMotionMaster()->MoveTargetedHome(); + } + + void MovementInform(uint32 uiMoveType, uint32 uiPointId) override + { + // Mark as failed if evaded while upstairs + if (uiMoveType == POINT_MOTION_TYPE && uiPointId) + { + if (m_pInstance) + m_pInstance->SetData(TYPE_HADRONOX, FAIL); + } + // Web the doors when upstairs + else if (uiMoveType == WAYPOINT_MOTION_TYPE && uiPointId == 10) + { + if (DoCastSpellIfCan(m_creature, SPELL_WEB_FRONT_DOORS, CAST_TRIGGERED) == CAST_OK) + { + // These should be handled by the scripted event + if (m_pInstance) + { + m_pInstance->SetData(TYPE_HADRONOX, IN_PROGRESS); + m_pInstance->ResetHadronoxTriggers(); + m_pInstance->SetHadronoxDeniedAchievCriteria(false); + } + + // No more movement + m_creature->GetMotionMaster()->MoveIdle(); + } + } + } + + void JustSummoned(Creature* pSummoned) override + { + // Allow the spawns to make a few steps so we can use move maps + pSummoned->SetWalk(false); + pSummoned->GetMotionMaster()->MoveWaypoint(); + } + void UpdateAI(const uint32 uiDiff) override { + if (m_uiGauntletStartTimer) + { + if (m_uiGauntletStartTimer <= uiDiff) + { + if (!m_pInstance) + { + script_error_log("Instance Azjol-Nerub: ERROR Failed to load instance data for this instace."); + return; + } + + GuidList m_lTriggersGuids; + m_pInstance->GetHadronoxTriggerList(m_lTriggersGuids); + + // Need to force the triggers to cast this with Hadronox Guid so we can control the summons better + for (GuidList::const_iterator itr = m_lTriggersGuids.begin(); itr != m_lTriggersGuids.end(); ++itr) + { + if (Creature* pTrigger = m_creature->GetMap()->GetCreature(*itr)) + { + pTrigger->CastSpell(pTrigger, SPELL_SUMMON_CHAMPION, true, NULL, NULL, m_creature->GetObjectGuid()); + pTrigger->CastSpell(pTrigger, SPELL_SUMMON_NECROMANCER, true, NULL, NULL, m_creature->GetObjectGuid()); + pTrigger->CastSpell(pTrigger, SPELL_SUMMON_CRYPT_FIEND, true, NULL, NULL, m_creature->GetObjectGuid()); + } + } + + m_uiGauntletStartTimer = 0; + } + else + m_uiGauntletStartTimer -= uiDiff; + } + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; if (m_uiPierceTimer < uiDiff) { if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_PIERCE_ARMOR) == CAST_OK) - m_uiPierceTimer = 8000; + m_uiPierceTimer = urand(8000, 15000); } else m_uiPierceTimer -= uiDiff; @@ -130,6 +268,17 @@ struct MANGOS_DLL_DECL boss_hadronoxAI : public ScriptedAI else m_uiGrabTimer -= uiDiff; + if (m_uiTauntTimer < uiDiff) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, SPELL_TAUNT) == CAST_OK) + m_uiTauntTimer = urand(7000, 14000); + } + } + else + m_uiTauntTimer -= uiDiff; + DoMeleeAttackIfReady(); } }; diff --git a/scripts/northrend/azjol-nerub/azjol-nerub/boss_krikthir.cpp b/scripts/northrend/azjol-nerub/azjol-nerub/boss_krikthir.cpp index 32685259c..f1075f99c 100644 --- a/scripts/northrend/azjol-nerub/azjol-nerub/boss_krikthir.cpp +++ b/scripts/northrend/azjol-nerub/azjol-nerub/boss_krikthir.cpp @@ -99,7 +99,7 @@ struct MANGOS_DLL_DECL boss_krikthirAI : public ScriptedAI void MoveInLineOfSight(Unit* pWho) override { - if (!m_bIntroSpeech && m_creature->IsWithinDistInMap(pWho, DEFAULT_VISIBILITY_INSTANCE)) + if (!m_bIntroSpeech && pWho->GetTypeId() == TYPEID_PLAYER && m_creature->IsWithinDistInMap(pWho, DEFAULT_VISIBILITY_INSTANCE) && m_creature->IsWithinLOSInMap(pWho)) { switch (urand(0, 2)) { @@ -133,32 +133,36 @@ struct MANGOS_DLL_DECL boss_krikthirAI : public ScriptedAI if (!m_bFrenzy && m_creature->GetHealthPercent() <= 10.0f) { - DoCastSpellIfCan(m_creature, SPELL_FRENZY); - DoScriptText(EMOTE_BOSS_GENERIC_FRENZY, m_creature); - m_bFrenzy = true; + if (DoCastSpellIfCan(m_creature, SPELL_FRENZY) == CAST_OK) + { + DoScriptText(EMOTE_BOSS_GENERIC_FRENZY, m_creature); + m_bFrenzy = true; + } } if (m_uiCurseTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), m_bIsRegularMode ? SPELL_CURSE_OF_FATIGUE : SPELL_CURSE_OF_FATIGUE_H); - m_uiCurseTimer = 20000; + if (DoCastSpellIfCan(m_creature->getVictim(), m_bIsRegularMode ? SPELL_CURSE_OF_FATIGUE : SPELL_CURSE_OF_FATIGUE_H) == CAST_OK) + m_uiCurseTimer = 20000; } else m_uiCurseTimer -= uiDiff; if (m_uiMindFlayTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), m_bIsRegularMode ? SPELL_MINDFLAY : SPELL_MINDFLAY_H); - m_uiMindFlayTimer = 8000; + if (DoCastSpellIfCan(m_creature->getVictim(), m_bIsRegularMode ? SPELL_MINDFLAY : SPELL_MINDFLAY_H) == CAST_OK) + m_uiMindFlayTimer = 8000; } else m_uiMindFlayTimer -= uiDiff; if (m_uiSwarmTimer < uiDiff) { - DoScriptText(urand(0, 1) ? SAY_SWARM_1 : SAY_SWARM_2, m_creature); - DoCastSpellIfCan(m_creature, SPELL_SWARM); - m_uiSwarmTimer = 15000; + if (DoCastSpellIfCan(m_creature, SPELL_SWARM) == CAST_OK) + { + DoScriptText(urand(0, 1) ? SAY_SWARM_1 : SAY_SWARM_2, m_creature); + m_uiSwarmTimer = 15000; + } } else m_uiSwarmTimer -= uiDiff; diff --git a/scripts/northrend/azjol-nerub/azjol-nerub/instance_azjol-nerub.cpp b/scripts/northrend/azjol-nerub/azjol-nerub/instance_azjol-nerub.cpp index 88b14de6d..ccdf3d2f9 100644 --- a/scripts/northrend/azjol-nerub/azjol-nerub/instance_azjol-nerub.cpp +++ b/scripts/northrend/azjol-nerub/azjol-nerub/instance_azjol-nerub.cpp @@ -26,7 +26,10 @@ EndScriptData */ instance_azjol_nerub::instance_azjol_nerub(Map* pMap) : ScriptedInstance(pMap), m_uiWatcherTimer(0), - m_bWatchHimDie(true) + m_uiGauntletEndTimer(0), + m_bWatchHimDie(true), + m_bHadronoxDenied(true), + m_bGauntletStarted(false) { Initialize(); } @@ -63,12 +66,16 @@ void instance_azjol_nerub::OnCreatureCreate(Creature* pCreature) case NPC_GASHRA: case NPC_NARJIL: case NPC_SILTHIK: + case NPC_HADRONOX: case NPC_ANUBARAK: m_mNpcEntryGuidStore[pCreature->GetEntry()] = pCreature->GetObjectGuid(); break; case NPC_WORLD_TRIGGER: m_lTriggerGuids.push_back(pCreature->GetObjectGuid()); break; + case NPC_WORLD_TRIGGER_LARGE: + m_lSpiderTriggersGuids.push_back(pCreature->GetObjectGuid()); + break; } } @@ -95,6 +102,32 @@ void instance_azjol_nerub::OnCreatureEnterCombat(Creature* pCreature) if (!m_playerGuid && pCreature->getVictim()) m_playerGuid = pCreature->getVictim()->GetCharmerOrOwnerPlayerOrPlayerItself()->GetObjectGuid(); } + else if (uiEntry == NPC_ANUBAR_CRUSHER) + { + // Only for the first try + if (m_bGauntletStarted) + return; + + DoScriptText(SAY_CRUSHER_AGGRO, pCreature); + + // Spawn 2 more crushers - note these are not the exact spawn coords, but we need to use this workaround for better movement + if (Creature* pCrusher = pCreature->SummonCreature(NPC_ANUBAR_CRUSHER, 485.25f, 611.46f, 771.42f, 4.74f, TEMPSUMMON_DEAD_DESPAWN, 0)) + { + pCrusher->SetWalk(false); + pCrusher->GetMotionMaster()->MovePoint(0, 517.51f, 561.439f, 734.0306f); + pCrusher->HandleEmote(EMOTE_STATE_READYUNARMED); + } + if (Creature* pCrusher = pCreature->SummonCreature(NPC_ANUBAR_CRUSHER, 575.21f, 611.47f, 771.46f, 3.59f, TEMPSUMMON_DEAD_DESPAWN, 0)) + { + pCrusher->SetWalk(false); + pCrusher->GetMotionMaster()->MovePoint(0, 543.414f, 551.728f, 732.0522f); + pCrusher->HandleEmote(EMOTE_STATE_READYUNARMED); + } + + // Spawn 2 more crushers and start the countdown + m_uiGauntletEndTimer = 2 * MINUTE * IN_MILLISECONDS; + m_bGauntletStarted = true; + } } void instance_azjol_nerub::OnCreatureEvade(Creature* pCreature) @@ -116,6 +149,28 @@ void instance_azjol_nerub::Update(uint32 uiDiff) else m_uiWatcherTimer -= uiDiff; } + + if (m_uiGauntletEndTimer) + { + if (m_uiGauntletEndTimer <= uiDiff) + { + if (GetData(TYPE_HADRONOX) == IN_PROGRESS) + { + m_uiGauntletEndTimer = 0; + return; + } + + SetData(TYPE_HADRONOX, SPECIAL); + + // Allow him to evade - this will start the waypoint movement + if (Creature* pHadronox = GetSingleCreatureFromStorage(NPC_HADRONOX)) + pHadronox->AI()->EnterEvadeMode(); + + m_uiGauntletEndTimer = 0; + } + else + m_uiGauntletEndTimer -= uiDiff; + } } void instance_azjol_nerub::DoSendWatcherOrKrikthir() @@ -202,6 +257,16 @@ ObjectGuid instance_azjol_nerub::GetRandomAssassinTrigger() return ObjectGuid(); } +void instance_azjol_nerub::ResetHadronoxTriggers() +{ + // Drop the summon auras from the triggers + for (GuidList::const_iterator itr = m_lSpiderTriggersGuids.begin(); itr != m_lSpiderTriggersGuids.end(); ++itr) + { + if (Creature* pTrigger = instance->GetCreature(*itr)) + pTrigger->RemoveAllAurasOnEvade(); + } +} + void instance_azjol_nerub::SetData(uint32 uiType, uint32 uiData) { switch (uiType) @@ -213,6 +278,8 @@ void instance_azjol_nerub::SetData(uint32 uiType, uint32 uiData) break; case TYPE_HADRONOX: m_auiEncounter[uiType] = uiData; + if (uiData == DONE) + ResetHadronoxTriggers(); break; case TYPE_ANUBARAK: m_auiEncounter[uiType] = uiData; @@ -241,12 +308,26 @@ void instance_azjol_nerub::SetData(uint32 uiType, uint32 uiData) } } +uint32 instance_azjol_nerub::GetData(uint32 uiType) const +{ + if (uiType < MAX_ENCOUNTER) + return m_auiEncounter[uiType]; + + return 0; +} + bool instance_azjol_nerub::CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/) const { - if (uiCriteriaId == ACHIEV_CRITERIA_WATCH_DIE) - return m_bWatchHimDie; + switch (uiCriteriaId) + { + case ACHIEV_CRITERIA_WATCH_DIE: + return m_bWatchHimDie; + case ACHIEV_CRITERIA_DENIED: + return m_bHadronoxDenied; - return false; + default: + return false; + } } void instance_azjol_nerub::Load(const char* chrIn) diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index a90d00889..8567d1682 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2823" + #define SD2_REVISION_NR "2824" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 57c2b605e..41093ad40 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -3202,7 +3202,8 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1601010,'They hunger.',14085,1,0,0,'krikthir SAY_SWARM_1'), (-1601011,'Dinner time, my pets.',14086,1,0,0,'krikthir SAY_SWARM_2'), (-1601012,'I should be grateful. But I long ago lost the capacity.',14087,1,0,0,'krikthir SAY_DEATH'), -(-1601013,'REUSE ME',0,0,0,0,'REUSE ME'), + +(-1601013,'%s moves up the tunnel!',0,3,0,0,'hadronox EMOTE_MOVE_TUNNEL'), (-1601014,'I was king of this empire once, long ago. In life I stood as champion. In death I returned as conqueror. Now I protect the kingdom once more. Ironic, yes?',14053,1,0,0,'anubarak SAY_INTRO'), (-1601015,'Eternal agony awaits you!',14054,1,0,0,'anubarak SAY_AGGRO'), @@ -3214,7 +3215,10 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1601021,'Your armor is useless against my locusts!',14060,1,0,0,'anubarak SAY_LOCUST_1'), (-1601022,'The pestilence upon you!',14068,1,0,0,'anubarak SAY_LOCUST_2'), (-1601023,'Uunak-hissss tik-k-k-k-k!',14067,1,0,0,'anubarak SAY_LOCUST_3'), -(-1601024,'Ahhh... RAAAAAGH! Never thought... I would be free of him...',14069,1,0,0,'anubarak SAY_DEATH'); +(-1601024,'Ahhh... RAAAAAGH! Never thought... I would be free of him...',14069,1,0,0,'anubarak SAY_DEATH'), + +(-1601025,'The gate has been breached! Quickly, divert forces to deal with these invaders!',0,1,0,0,'anub\'ar crusher SAY_AGGRO'), +(-1601026,'There\'s no time left! All remaining forces, attack the invaders!',0,1,0,0,'anub\'ar crusher SAY_SPECIAL'); -- -1 602 000 HALLS OF LIGHTNING INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES diff --git a/sql/updates/r2824_scriptdev2.sql b/sql/updates/r2824_scriptdev2.sql new file mode 100644 index 000000000..d44a9e24d --- /dev/null +++ b/sql/updates/r2824_scriptdev2.sql @@ -0,0 +1,5 @@ +DELETE FROM script_texts WHERE entry IN (-1601013, -1601025, -1601026); +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1601013,'%s moves up the tunnel!',0,3,0,0,'hadronox EMOTE_MOVE_TUNNEL'), +(-1601025,'The gate has been breached! Quickly, divert forces to deal with these invaders!',0,1,0,0,'anub\'ar crusher SAY_AGGRO'), +(-1601026,'There\'s no time left! All remaining forces, attack the invaders!',0,1,0,0,'anub\'ar crusher SAY_SPECIAL'); From 6b6391f732499685bb3972934d36f3733e95de9b Mon Sep 17 00:00:00 2001 From: evil-at-wow Date: Sat, 23 Mar 2013 15:52:53 +0100 Subject: [PATCH 0824/1172] Remove unused member that was left behind when introducing SetFactionTemporary in 4de904b54bc2dbbeb8a3d4df462fb32702bb206b. --- scripts/eastern_kingdoms/stormwind_city.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/scripts/eastern_kingdoms/stormwind_city.cpp b/scripts/eastern_kingdoms/stormwind_city.cpp index c9258f58b..ed674e6bc 100644 --- a/scripts/eastern_kingdoms/stormwind_city.cpp +++ b/scripts/eastern_kingdoms/stormwind_city.cpp @@ -50,8 +50,6 @@ struct MANGOS_DLL_DECL npc_bartlebyAI : public ScriptedAI Reset(); } - uint32 m_uiNormalFaction; - void Reset() override {} void AttackedBy(Unit* pAttacker) override From 2a8e75e7cf4bc5e2aefeac65ef7eafbb43950c12 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sun, 24 Mar 2013 00:59:22 +0200 Subject: [PATCH 0825/1172] [2825] Implement Insanity event for Herald Volazj - Ahn'kahet --- .../northrend/azjol-nerub/ahnkahet/ahnkahet.h | 27 +++ .../azjol-nerub/ahnkahet/boss_volazj.cpp | 181 ++++++++++++++--- .../ahnkahet/instance_ahnkahet.cpp | 190 ++++++++++++++++-- sd2_revision_nr.h | 2 +- 4 files changed, 355 insertions(+), 45 deletions(-) diff --git a/scripts/northrend/azjol-nerub/ahnkahet/ahnkahet.h b/scripts/northrend/azjol-nerub/ahnkahet/ahnkahet.h index 28ce05f99..79c0c9839 100644 --- a/scripts/northrend/azjol-nerub/ahnkahet/ahnkahet.h +++ b/scripts/northrend/azjol-nerub/ahnkahet/ahnkahet.h @@ -22,6 +22,8 @@ enum TYPE_VOLAZJ = 3, TYPE_AMANITAR = 4, + DATA_INSANITY_PLAYER = 1, + GO_DOOR_TALDARAM = 192236, GO_ANCIENT_DEVICE_L = 193093, GO_ANCIENT_DEVICE_R = 193094, @@ -35,6 +37,23 @@ enum NPC_JEDOGA_CONTROLLER = 30181, NPC_TWILIGHT_INITIATE = 30114, + NPC_HERALD_VOLAZJ = 29311, + NPC_TWISTED_VISAGE_1 = 30621, + NPC_TWISTED_VISAGE_2 = 30622, + NPC_TWISTED_VISAGE_3 = 30623, + NPC_TWISTED_VISAGE_4 = 30624, + NPC_TWISTED_VISAGE_5 = 30625, + + SPELL_TWISTED_VISAGE_DEATH = 57555, + SPELL_INSANITY_SWITCH = 57538, + SPELL_INSANITY_CLEAR = 57558, + + SPELL_INSANITY_PHASE_16 = 57508, + SPELL_INSANITY_PHASE_32 = 57509, + SPELL_INSANITY_PHASE_64 = 57510, + SPELL_INSANITY_PHASE_128 = 57511, + SPELL_INSANITY_PHASE_256 = 57512, + ACHIEV_START_VOLAZJ_ID = 20382, ACHIEV_CRIT_RESPECT_ELDERS = 7317, // Nadox, achiev 2038 @@ -54,11 +73,14 @@ class MANGOS_DLL_DECL instance_ahnkahet : public ScriptedInstance void OnCreatureCreate(Creature* pCreature) override; void OnObjectCreate(GameObject* pGo) override; + void OnCreatureEvade(Creature* pCreature) override; void OnCreatureDeath(Creature* pCreature) override; void SetData(uint32 uiType, uint32 uiData) override; uint32 GetData(uint32 uiType) const override; + void SetData64(uint32 uiType, uint64 uiGuid) override; + ObjectGuid SelectRandomGuardianEggGuid(); ObjectGuid SelectRandomSwarmerEggGuid(); ObjectGuid SelectJedogaSacrificeControllerGuid() { return m_jedogaSacrificeController; } @@ -72,6 +94,9 @@ class MANGOS_DLL_DECL instance_ahnkahet : public ScriptedInstance void Load(const char* chrIn) override; private: + void HandleInsanityClear(); + void HandleInsanitySwitch(Player* pPlayer); + uint32 m_auiEncounter[MAX_ENCOUNTER]; std::string m_strInstData; @@ -80,6 +105,7 @@ class MANGOS_DLL_DECL instance_ahnkahet : public ScriptedInstance uint8 m_uiDevicesActivated; uint8 m_uiInitiatesKilled; + uint8 m_uiTwistedVisageCount; ObjectGuid m_jedogaSacrificeController; @@ -87,6 +113,7 @@ class MANGOS_DLL_DECL instance_ahnkahet : public ScriptedInstance GuidList m_SwarmerEggList; GuidList m_lJedogaControllersGuidList; GuidList m_lJedogaEventControllersGuidList; + GuidList m_lInsanityPlayersGuidList; }; #endif diff --git a/scripts/northrend/azjol-nerub/ahnkahet/boss_volazj.cpp b/scripts/northrend/azjol-nerub/ahnkahet/boss_volazj.cpp index 73abb09da..3d7253f53 100644 --- a/scripts/northrend/azjol-nerub/ahnkahet/boss_volazj.cpp +++ b/scripts/northrend/azjol-nerub/ahnkahet/boss_volazj.cpp @@ -22,6 +22,8 @@ SDCategory: Ahn'kahet EndScriptData */ #include "precompiled.h" +#include "ahnkahet.h" +#include "TemporarySummon.h" enum { @@ -40,23 +42,34 @@ enum SPELL_SHIVER = 57949, SPELL_SHIVER_H = 59978, + SPELL_WHISPER_AGGRO = 60291, + SPELL_WHISPER_INSANITY = 60292, + SPELL_WHISPER_SLAY_1 = 60293, + SPELL_WHISPER_SLAY_2 = 60294, + SPELL_WHISPER_SLAY_3 = 60295, + SPELL_WHISPER_DEATH_1 = 60296, + SPELL_WHISPER_DEATH_2 = 60297, + SPELL_INSANITY = 57496, // start insanity phasing - SPELL_INSANITY_CLEAR = 57558, // clear all insanity phasing - SPELL_WHISPER_INSANITY = 60292, // whisper insanity to players - - /* Some notes about the Insanity spell */ - /* - Related spells: - 57561 - visual effect - 57538 - switch insanity phase when a visage is killed - 57507 to 57512 - phasing spells for players - 59982 - summon twisted visage - script effect - 57500 to 57504 - summon twisted visage in each phase - 57506, 57507 - clone spells for the twisted visages - 57551, 57555 - visuals for twisted visages - */ + SPELL_INSANITY_VISUAL = 57561, + + SPELL_TWISTED_VISAGE_SPAWN = 57506, + SPELL_TWISTED_VISAGE_SPAWN_H = 59982, + SPELL_TWISTED_VISAGE_EFFECT = 57507, + SPELL_TWISTED_VISAGE_PASSIVE = 57551, + + SPELL_SUMMON_VISAGE_1 = 57500, + SPELL_SUMMON_VISAGE_2 = 57501, + SPELL_SUMMON_VISAGE_3 = 57502, + SPELL_SUMMON_VISAGE_4 = 57503, + SPELL_SUMMON_VISAGE_5 = 57504, + + MAX_INSANITY_SPELLS = 5, }; +static const uint32 aInsanityPhaseSpells[MAX_INSANITY_SPELLS] = {SPELL_INSANITY_PHASE_16, SPELL_INSANITY_PHASE_32, SPELL_INSANITY_PHASE_64, SPELL_INSANITY_PHASE_128, SPELL_INSANITY_PHASE_256}; +static const uint32 aSpawnVisageSpells[MAX_INSANITY_SPELLS] = {SPELL_SUMMON_VISAGE_1, SPELL_SUMMON_VISAGE_2, SPELL_SUMMON_VISAGE_3, SPELL_SUMMON_VISAGE_4, SPELL_SUMMON_VISAGE_5}; + /*###### ## boss_volazj ######*/ @@ -78,32 +91,135 @@ struct MANGOS_DLL_DECL boss_volazjAI : public ScriptedAI uint32 m_uiShadowBoltTimer; uint32 m_uiShiverTimer; + uint8 m_uiInsanityIndex; + bool m_bIsInsanityInProgress; + void Reset() override { - m_uiCombatPhase = 1; - m_uiMindFlayTimer = 10000; - m_uiShadowBoltTimer = 5000; - m_uiShiverTimer = 18000; + m_uiCombatPhase = 1; + m_uiMindFlayTimer = 10000; + m_uiShadowBoltTimer = 5000; + m_uiShiverTimer = 18000; + + m_uiInsanityIndex = 0; + m_bIsInsanityInProgress = false; + + SetCombatMovement(true); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); } void Aggro(Unit* pWho) override { DoScriptText(SAY_AGGRO, m_creature); + DoCastSpellIfCan(m_creature, SPELL_WHISPER_AGGRO); + + if (m_pInstance) + { + m_pInstance->SetData(TYPE_VOLAZJ, IN_PROGRESS); + + // Start achievement only on first aggro + m_pInstance->DoStartTimedAchievement(ACHIEVEMENT_CRITERIA_TYPE_KILL_CREATURE, ACHIEV_START_VOLAZJ_ID); + } } void KilledUnit(Unit* /*pVictim*/) override { switch (urand(0, 2)) { - case 0: DoScriptText(SAY_SLAY_1, m_creature); break; - case 1: DoScriptText(SAY_SLAY_2, m_creature); break; - case 2: DoScriptText(SAY_SLAY_3, m_creature); break; + case 0: + DoScriptText(SAY_SLAY_1, m_creature); + DoCastSpellIfCan(m_creature, SPELL_WHISPER_SLAY_1); + break; + case 1: + DoScriptText(SAY_SLAY_2, m_creature); + DoCastSpellIfCan(m_creature, SPELL_WHISPER_SLAY_2); + break; + case 2: + DoScriptText(SAY_SLAY_3, m_creature); + DoCastSpellIfCan(m_creature, SPELL_WHISPER_SLAY_3); + break; } } void JustDied(Unit* /*pKiller*/) override { - DoScriptText(urand(0, 1) ? SAY_DEATH_1 : SAY_DEATH_2, m_creature); + if (urand(0, 1)) + { + DoScriptText(SAY_DEATH_1, m_creature); + DoCastSpellIfCan(m_creature, SPELL_WHISPER_DEATH_1, CAST_TRIGGERED); + } + else + { + DoScriptText(SAY_DEATH_2, m_creature); + DoCastSpellIfCan(m_creature, SPELL_WHISPER_DEATH_2, CAST_TRIGGERED); + } + + if (m_pInstance) + m_pInstance->SetData(TYPE_VOLAZJ, DONE); + } + + void EnterEvadeMode() override + { + if (m_pInstance && m_pInstance->GetData(TYPE_VOLAZJ) == SPECIAL) + return; + + ScriptedAI::EnterEvadeMode(); + } + + void JustReachedHome() override + { + if (m_pInstance) + m_pInstance->SetData(TYPE_VOLAZJ, FAIL); + } + + void JustSummoned(Creature* pSummoned) override + { + pSummoned->CastSpell(pSummoned, SPELL_TWISTED_VISAGE_PASSIVE, true); + + if (pSummoned->IsTemporarySummon()) + { + TemporarySummon* pTemporary = (TemporarySummon*)pSummoned; + + if (Player* pPlayer = m_creature->GetMap()->GetPlayer(pTemporary->GetSummonerGuid())) + { + pPlayer->CastSpell(pSummoned, SPELL_TWISTED_VISAGE_EFFECT, true); + pSummoned->CastSpell(pPlayer, m_bIsRegularMode ? SPELL_TWISTED_VISAGE_SPAWN : SPELL_TWISTED_VISAGE_SPAWN_H, true); + + pSummoned->AI()->AttackStart(pPlayer); + } + } + } + + void SpellHitTarget(Unit* pTarget, const SpellEntry* pSpell) override + { + if (pSpell->Id == SPELL_INSANITY && pTarget->GetTypeId() == TYPEID_PLAYER) + { + // Apply this only for the first target hit + if (!m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE)) + { + DoCastSpellIfCan(m_creature, SPELL_INSANITY_VISUAL, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_WHISPER_INSANITY, CAST_TRIGGERED); + + DoScriptText(SAY_INSANITY, m_creature); + + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + SetCombatMovement(false); + + if (m_pInstance) + m_pInstance->SetData(TYPE_VOLAZJ, SPECIAL); + + m_bIsInsanityInProgress = true; + } + + // Store the players in the instance, in order to better handle phasing + if (m_pInstance) + m_pInstance->SetData64(DATA_INSANITY_PLAYER, pTarget->GetObjectGuid()); + + // Phase and summon a Visage for each player + pTarget->CastSpell(pTarget, aInsanityPhaseSpells[m_uiInsanityIndex], true, 0, 0, m_creature->GetObjectGuid()); + pTarget->CastSpell(pTarget, aSpawnVisageSpells[m_uiInsanityIndex], true, 0, 0, m_creature->GetObjectGuid()); + ++m_uiInsanityIndex; + } } void UpdateAI(const uint32 uiDiff) override @@ -111,13 +227,28 @@ struct MANGOS_DLL_DECL boss_volazjAI : public ScriptedAI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - /* Note: Insanity is not yet implemented - this is just a placeholder - if (m_creature->GetHealthPercent() < 100 - m_uiCombatPhase*33) + // Check for Insanity + if (m_bIsInsanityInProgress) + { + if (!m_creature->HasAura(SPELL_INSANITY_VISUAL)) + { + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + SetCombatMovement(true); + m_bIsInsanityInProgress = false; + } + + // No other actions during insanity + return; + } + + if (m_creature->GetHealthPercent() < 100.0f - (float)m_uiCombatPhase * 33.4f) { if (DoCastSpellIfCan(m_creature, SPELL_INSANITY) == CAST_OK) + { + m_uiInsanityIndex = 0; ++m_uiCombatPhase; + } } - */ if (m_uiMindFlayTimer < uiDiff) { diff --git a/scripts/northrend/azjol-nerub/ahnkahet/instance_ahnkahet.cpp b/scripts/northrend/azjol-nerub/ahnkahet/instance_ahnkahet.cpp index 5a2a5bcad..8770068b1 100644 --- a/scripts/northrend/azjol-nerub/ahnkahet/instance_ahnkahet.cpp +++ b/scripts/northrend/azjol-nerub/ahnkahet/instance_ahnkahet.cpp @@ -23,12 +23,14 @@ EndScriptData */ #include "precompiled.h" #include "ahnkahet.h" +#include "TemporarySummon.h" instance_ahnkahet::instance_ahnkahet(Map* pMap) : ScriptedInstance(pMap), m_bRespectElders(false), m_bVolunteerWork(false), m_uiDevicesActivated(0), - m_uiInitiatesKilled(0) + m_uiInitiatesKilled(0), + m_uiTwistedVisageCount(0) { Initialize(); } @@ -45,6 +47,7 @@ void instance_ahnkahet::OnCreatureCreate(Creature* pCreature) case NPC_ELDER_NADOX: case NPC_TALDARAM: case NPC_JEDOGA_SHADOWSEEKER: + case NPC_HERALD_VOLAZJ: m_mNpcEntryGuidStore[pCreature->GetEntry()] = pCreature->GetObjectGuid(); break; case NPC_AHNKAHAR_GUARDIAN_EGG: @@ -65,6 +68,13 @@ void instance_ahnkahet::OnCreatureCreate(Creature* pCreature) // Used for Jedoga sacrifice m_jedogaSacrificeController = pCreature->GetObjectGuid(); break; + case NPC_TWISTED_VISAGE_1: + case NPC_TWISTED_VISAGE_2: + case NPC_TWISTED_VISAGE_3: + case NPC_TWISTED_VISAGE_4: + case NPC_TWISTED_VISAGE_5: + ++m_uiTwistedVisageCount; + break; } } @@ -103,9 +113,9 @@ void instance_ahnkahet::SetData(uint32 uiType, uint32 uiData) m_auiEncounter[uiType] = uiData; if (uiData == IN_PROGRESS) m_bRespectElders = true; - if (uiData == SPECIAL) + else if (uiData == SPECIAL) m_bRespectElders = false; - if (uiData == DONE) + else if (uiData == DONE) { DoToggleGameObjectFlags(GO_ANCIENT_DEVICE_L, GO_FLAG_NO_INTERACT, false); DoToggleGameObjectFlags(GO_ANCIENT_DEVICE_R, GO_FLAG_NO_INTERACT, false); @@ -133,7 +143,7 @@ void instance_ahnkahet::SetData(uint32 uiType, uint32 uiData) } } } - if (uiData == DONE) + else if (uiData == DONE) { m_auiEncounter[uiType] = uiData; DoUseDoorOrButton(GO_DOOR_TALDARAM); @@ -143,9 +153,9 @@ void instance_ahnkahet::SetData(uint32 uiType, uint32 uiData) m_auiEncounter[uiType] = uiData; if (uiData == IN_PROGRESS) m_bVolunteerWork = true; - if (uiData == SPECIAL) + else if (uiData == SPECIAL) m_bVolunteerWork = false; - if (uiData == FAIL) + else if (uiData == FAIL) m_uiInitiatesKilled = 0; break; case TYPE_AMANITAR: @@ -154,7 +164,10 @@ void instance_ahnkahet::SetData(uint32 uiType, uint32 uiData) case TYPE_VOLAZJ: m_auiEncounter[uiType] = uiData; if (uiData == IN_PROGRESS) - DoStartTimedAchievement(ACHIEVEMENT_CRITERIA_TYPE_KILL_CREATURE, ACHIEV_START_VOLAZJ_ID); + { + m_uiTwistedVisageCount = 0; + m_lInsanityPlayersGuidList.clear(); + } break; default: @@ -163,7 +176,7 @@ void instance_ahnkahet::SetData(uint32 uiType, uint32 uiData) } // For some encounters Special data needs to be saved - if (uiData == DONE || uiData == SPECIAL) + if (uiData == DONE || (uiData == SPECIAL && uiType == TYPE_TALDARAM)) { OUT_SAVE_INST_DATA; @@ -180,22 +193,108 @@ void instance_ahnkahet::SetData(uint32 uiType, uint32 uiData) void instance_ahnkahet::OnCreatureDeath(Creature* pCreature) { - if (pCreature->GetEntry() == NPC_TWILIGHT_INITIATE) + switch (pCreature->GetEntry()) { - ++m_uiInitiatesKilled; + case NPC_TWILIGHT_INITIATE: + ++m_uiInitiatesKilled; - // If all initiates are killed, then land Jedoga and stop the channeling - if (m_uiInitiatesKilled == MAX_INITIATES) - { - if (Creature* pJedoga = GetSingleCreatureFromStorage(NPC_JEDOGA_SHADOWSEEKER)) - pJedoga->GetMotionMaster()->MovePoint(1, aJedogaLandingLoc[0], aJedogaLandingLoc[1], aJedogaLandingLoc[2]); + // If all initiates are killed, then land Jedoga and stop the channeling + if (m_uiInitiatesKilled == MAX_INITIATES) + { + if (Creature* pJedoga = GetSingleCreatureFromStorage(NPC_JEDOGA_SHADOWSEEKER)) + pJedoga->GetMotionMaster()->MovePoint(1, aJedogaLandingLoc[0], aJedogaLandingLoc[1], aJedogaLandingLoc[2]); + + for (GuidList::const_iterator itr = m_lJedogaEventControllersGuidList.begin(); itr != m_lJedogaEventControllersGuidList.end(); ++itr) + { + if (Creature* pTemp = instance->GetCreature(*itr)) + pTemp->InterruptNonMeleeSpells(false); + } + } + + break; + case NPC_TWISTED_VISAGE_1: + case NPC_TWISTED_VISAGE_2: + case NPC_TWISTED_VISAGE_3: + case NPC_TWISTED_VISAGE_4: + case NPC_TWISTED_VISAGE_5: + pCreature->CastSpell(pCreature, SPELL_TWISTED_VISAGE_DEATH, true); - for (GuidList::const_iterator itr = m_lJedogaEventControllersGuidList.begin(); itr != m_lJedogaEventControllersGuidList.end(); ++itr) + --m_uiTwistedVisageCount; + + // When all Twisted Visages were killed or despawned switch back to combat phase + if (!m_uiTwistedVisageCount) { - if (Creature* pTemp = instance->GetCreature(*itr)) - pTemp->InterruptNonMeleeSpells(false); + // Clear Insanity + if (Creature* pVolazj = GetSingleCreatureFromStorage(NPC_HERALD_VOLAZJ)) + { + pVolazj->CastSpell(pVolazj, SPELL_INSANITY_CLEAR, true); + pVolazj->RemoveAllAuras(); + } + + // Clear insanity manually for now, because the spell won't hit phased players + HandleInsanityClear(); + + SetData(TYPE_VOLAZJ, IN_PROGRESS); } - } + else + { + // Switch Insanity + if (Creature* pVolazj = GetSingleCreatureFromStorage(NPC_HERALD_VOLAZJ)) + pVolazj->CastSpell(pVolazj, SPELL_INSANITY_SWITCH, true); + + // Handle insanity switch manually, because the boss can't hit phased players + if (pCreature->IsTemporarySummon()) + { + TemporarySummon* pTemporary = (TemporarySummon*)pCreature; + + // Switch insanity phase for the master player + if (Player* pPlayer = instance->GetPlayer(pTemporary->GetSummonerGuid())) + HandleInsanitySwitch(pPlayer); + } + } + break; + } +} + +void instance_ahnkahet::OnCreatureEvade(Creature* pCreature) +{ + switch (pCreature->GetEntry()) + { + case NPC_TWISTED_VISAGE_1: + case NPC_TWISTED_VISAGE_2: + case NPC_TWISTED_VISAGE_3: + case NPC_TWISTED_VISAGE_4: + case NPC_TWISTED_VISAGE_5: + --m_uiTwistedVisageCount; + + // When all Twisted Visages were killed or despawned switch back to combat phase + if (!m_uiTwistedVisageCount) + { + // Clear Insanity + if (Creature* pVolazj = GetSingleCreatureFromStorage(NPC_HERALD_VOLAZJ)) + { + pVolazj->CastSpell(pVolazj, SPELL_INSANITY_CLEAR, true); + pVolazj->RemoveAllAuras(); + } + + // Clear insanity manually for now, because the spell won't hit phased players + HandleInsanityClear(); + + SetData(TYPE_VOLAZJ, IN_PROGRESS); + } + + pCreature->ForcedDespawn(); + break; + } +} + +void instance_ahnkahet::SetData64(uint32 uiData, uint64 uiGuid) +{ + // Store all the players hit by the insanity spell in order to use them for the phasing switch / clear + if (uiData == DATA_INSANITY_PLAYER) + { + if (Player* pPlayer = instance->GetPlayer(ObjectGuid(uiGuid))) + m_lInsanityPlayersGuidList.push_back(pPlayer->GetObjectGuid()); } } @@ -221,6 +320,59 @@ ObjectGuid instance_ahnkahet::SelectRandomSwarmerEggGuid() return *iter; } +void instance_ahnkahet::HandleInsanityClear() +{ + for (GuidList::const_iterator itr = m_lInsanityPlayersGuidList.begin(); itr != m_lInsanityPlayersGuidList.end(); ++itr) + { + if (Player* pPlayer = instance->GetPlayer(*itr)) + pPlayer->RemoveSpellsCausingAura(SPELL_AURA_PHASE); + } +} + +void instance_ahnkahet::HandleInsanitySwitch(Player* pPhasedPlayer) +{ + // Get the phase aura id + std::list lAuraList = pPhasedPlayer->GetAurasByType(SPELL_AURA_PHASE); + if (lAuraList.empty()) + return; + + uint32 uiPhaseAura = (*lAuraList.begin())->GetId(); + + std::list lSamePhasePlayers; + std::vector vOtherPhasePlayers; + + // Sort the insanity players, into those which have same phase and others + for (GuidList::const_iterator itr = m_lInsanityPlayersGuidList.begin(); itr != m_lInsanityPlayersGuidList.end(); ++itr) + { + if (Player* pTemp = instance->GetPlayer(*itr)) + { + if (pTemp->HasAura(uiPhaseAura)) + lSamePhasePlayers.push_back(pTemp); + // Check only for alive players + else if (pTemp->isAlive()) + vOtherPhasePlayers.push_back(pTemp); + } + } + + // This shouldn't happen + if (vOtherPhasePlayers.empty()) + return; + + // Get the phase aura of the new selected player + Player* pNewPlayer = vOtherPhasePlayers[urand(0, vOtherPhasePlayers.size() - 1)]; + + // Get the phase aura id + std::list lNewAuraList = pNewPlayer->GetAurasByType(SPELL_AURA_PHASE); + if (lNewAuraList.empty()) + return; + + uint32 uiNewPhaseAura = (*lNewAuraList.begin())->GetId(); + + // Move the same phase players to the new phase + for (std::list::const_iterator itr = lSamePhasePlayers.begin(); itr != lSamePhasePlayers.end(); ++itr) + (*itr)->CastSpell((*itr), uiNewPhaseAura, true); +} + bool instance_ahnkahet::CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/) const { switch (uiCriteriaId) diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 8567d1682..b3f3cf8f5 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2824" + #define SD2_REVISION_NR "2825" #endif // __SD2_REVISION_NR_H__ From ce09be55232d40671ee642c81815b26af38d140b Mon Sep 17 00:00:00 2001 From: Xfurry Date: Mon, 25 Mar 2013 01:29:21 +0200 Subject: [PATCH 0826/1172] [2826] Allow Malygos to use combat phases 2 and 3 This will implement the related vehicle events. Please note that Phase 2 npcs may require additional work --- .../nexus/eye_of_eternity/boss_malygos.cpp | 117 +++++++++++++++--- .../nexus/eye_of_eternity/eye_of_eternity.h | 2 + .../instance_eye_of_eternity.cpp | 12 +- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 + sql/updates/r2826_mangos.sql | 1 + 6 files changed, 113 insertions(+), 22 deletions(-) create mode 100644 sql/updates/r2826_mangos.sql diff --git a/scripts/northrend/nexus/eye_of_eternity/boss_malygos.cpp b/scripts/northrend/nexus/eye_of_eternity/boss_malygos.cpp index 5ec12b754..5763f5d33 100644 --- a/scripts/northrend/nexus/eye_of_eternity/boss_malygos.cpp +++ b/scripts/northrend/nexus/eye_of_eternity/boss_malygos.cpp @@ -16,13 +16,14 @@ /* ScriptData SDName: boss_malygos -SD%Complete: 60 -SDComment: Only the first phase is playable. The rest of the script is disabled until vehicles are supported in core. Timers need adjustments. Movement in Phase 2 NYI. +SD%Complete: 80 +SDComment: Timers need adjustments; Vortex event NYI; Npc movement in Phase 2 NYI. SDCategory: Eye of Eternity EndScriptData */ #include "precompiled.h" #include "eye_of_eternity.h" +#include "TemporarySummon.h" enum { @@ -69,17 +70,16 @@ enum // phase 2 spells SPELL_ARCANE_STORM = 57459, // related to spell 61693 SPELL_ARCANE_STORM_H = 61694, - SPELL_SUMMON_ARCANE_BOMB = 56429, + SPELL_SUMMON_ARCANE_BOMB = 56429, // summons 30282 SPELL_ARCANE_BOMB = 56430, // triggers 56432 and 56431 on target hit SPELL_SURGE_OF_POWER_PULSE = 56505, // deep breath spell - // SPELL_ARCANE_PULSE = 57432, // purpose unk + // SPELL_ARCANE_PULSE = 57432, // purpose unk // transition spells SPELL_DESTROY_PLATFORM_PRE = 58842, SPELL_DESTROY_PLATFORM_BOOM = 59084, SPELL_DESTROY_PLATFORM_EVENT = 59099, SPELL_SUMMON_RED_DRAGON = 58846, - SPELL_RIDE_RED_DRAGON = 56072, // phase 3 spells SPELL_STATIC_FIELD_SUMMON = 57430, // cast on 1 or 3 targets based on difficulty @@ -97,17 +97,23 @@ enum SPELL_VORTEX_CHANNEL = 56237, // arcane overload - handled in core - // SPELL_ARCANE_OVERLOAD = 56432, - // SPELL_ARCANE_BOMB_DAMAGE = 56431, + // SPELL_ARCANE_OVERLOAD = 56432, + // SPELL_ARCANE_BOMB_KNOCKBACK = 56431, // static field SPELL_STATIC_FIELD = 57428, + // vehicle related + SPELL_SUMMON_DISC = 56378, // summons npc 30234 for players + SPELL_RIDE_RED_DRAGON = 56072, + SPELL_FLIGHT = 60534, // ToDo: check if id is correct! + // summoned npcs NPC_VORTEX = 30090, NPC_POWER_SPARK = 30084, NPC_NEXUS_LORD = 30245, + NPC_HOVER_DISK = 30248, NPC_SCION_OF_ETERNITY = 30249, NPC_ARCANE_OVERLOAD = 30282, @@ -307,9 +313,13 @@ struct MANGOS_DLL_DECL boss_malygosAI : public ScriptedAI, private DialogueHelpe break; case NPC_NEXUS_LORD: case NPC_SCION_OF_ETERNITY: - // ToDo: maybe add more code here in order to handle the discs + if (Creature* pDisk = GetClosestCreatureWithEntry(pSummoned, NPC_HOVER_DISK, 10.0f)) + pSummoned->CastSpell(pDisk, SPELL_RIDE_VEHICLE_HARDCODED, true); pSummoned->SetInCombatWithZone(); break; + case NPC_HOVER_DISK: + pSummoned->CastSpell(pSummoned, SPELL_FLIGHT, true); + break; } } @@ -317,6 +327,7 @@ struct MANGOS_DLL_DECL boss_malygosAI : public ScriptedAI, private DialogueHelpe { if (pSummoned->GetEntry() == NPC_NEXUS_LORD || pSummoned->GetEntry() == NPC_SCION_OF_ETERNITY) { + pSummoned->CastSpell(pSummoned, SPELL_SUMMON_DISC, true); ++m_uiAddsDeadCount; // When all adds are killed start phase 3 @@ -338,7 +349,7 @@ struct MANGOS_DLL_DECL boss_malygosAI : public ScriptedAI, private DialogueHelpe void SpellHit(Unit* pCaster, const SpellEntry* pSpell) override { // Handle yell on Power Spark hit - if (pSpell->Id == SPELL_POWER_SPARK_MALYGOS && pCaster->GetEntry() == NPC_POWER_SPARK) + if (pSpell->Id == SPELL_POWER_SPARK_MALYGOS && pCaster->GetEntry() == NPC_POWER_SPARK && m_uiPhase == PHASE_FLOOR) DoScriptText(SAY_SPARK_BUFF, m_creature); } @@ -367,7 +378,6 @@ struct MANGOS_DLL_DECL boss_malygosAI : public ScriptedAI, private DialogueHelpe pPlatform->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_UNK_11); } - // ToDo: maybe this requires more code after vehicles are implemented in core DoCastSpellIfCan(m_creature, SPELL_SUMMON_RED_DRAGON); break; case SAY_INTRO_PHASE_3: @@ -380,18 +390,19 @@ struct MANGOS_DLL_DECL boss_malygosAI : public ScriptedAI, private DialogueHelpe // Wrapper to spawn the adds in phase 2 void DoSpawnAdds() { - // Note: this might need some adjustments when vehicles are implemented float fX, fY, fZ; for (uint8 i = 0; i < m_uiMaxNexusLords; ++i) { - m_creature->GetRandomPoint(aCenterMovePos[0], aCenterMovePos[1], aCenterMovePos[2] + 30.0f, 50.0f, fX, fY, fZ); - m_creature->SummonCreature(NPC_NEXUS_LORD, fX, fY, fZ, 0, TEMPSUMMON_DEAD_DESPAWN, 0); + m_creature->GetRandomPoint(aCenterMovePos[0], aCenterMovePos[1], aCenterMovePos[2], 50.0f, fX, fY, fZ); + m_creature->SummonCreature(NPC_HOVER_DISK, fX, fY, fZ + 30.0f, 0, TEMPSUMMON_CORPSE_DESPAWN, 0); + m_creature->SummonCreature(NPC_NEXUS_LORD, fX, fY, fZ + 30.0f, 0, TEMPSUMMON_DEAD_DESPAWN, 0); } for (uint8 i = 0; i < m_uiMaxScions; ++i) { - m_creature->GetRandomPoint(aCenterMovePos[0], aCenterMovePos[1], aCenterMovePos[2] + 30.0f, 50.0f, fX, fY, fZ); - m_creature->SummonCreature(NPC_SCION_OF_ETERNITY, fX, fY, fZ, 0, TEMPSUMMON_DEAD_DESPAWN, 0); + m_creature->GetRandomPoint(aCenterMovePos[0], aCenterMovePos[1], aCenterMovePos[2], 50.0f, fX, fY, fZ); + m_creature->SummonCreature(NPC_HOVER_DISK, fX, fY, fZ + 30.0f, 0, TEMPSUMMON_CORPSE_DESPAWN, 0); + m_creature->SummonCreature(NPC_SCION_OF_ETERNITY, fX, fY, fZ + 30.0f, 0, TEMPSUMMON_DEAD_DESPAWN, 0); } } @@ -449,7 +460,6 @@ struct MANGOS_DLL_DECL boss_malygosAI : public ScriptedAI, private DialogueHelpe else m_uiPowerSparkTimer -= uiDiff; - /* ToDo: uncomment this when the core will support vehicles if (m_creature->GetHealthPercent() < 50.0f) { SetCombatMovement(false); @@ -462,7 +472,6 @@ struct MANGOS_DLL_DECL boss_malygosAI : public ScriptedAI, private DialogueHelpe StartNextDialogueText(SAY_END_PHASE_1); m_uiPhase = PHASE_TRANSITION_1; } - */ DoMeleeAttackIfReady(); @@ -596,6 +605,68 @@ CreatureAI* GetAI_npc_power_spark(Creature* pCreature) return new npc_power_sparkAI(pCreature); } +/*###### +## npc_wyrmrest_skytalon +######*/ + +struct MANGOS_DLL_DECL npc_wyrmrest_skytalonAI : public ScriptedAI +{ + npc_wyrmrest_skytalonAI(Creature* pCreature) : ScriptedAI(pCreature) + { + SetCombatMovement(false); + m_bHasMounted = false; + Reset(); + } + + bool m_bHasMounted; + + void Reset() override { } + + // TODO: Temporary workaround - please remove when the boarding wrappers are implemented in core + void SpellHit(Unit* pCaster, const SpellEntry* pSpell) override + { + if (pCaster->GetTypeId() != TYPEID_PLAYER) + return; + + if (pSpell->Id == 56071) + DoCastSpellIfCan(m_creature, SPELL_FLIGHT, CAST_TRIGGERED); + } + + // TODO: Enable the wrappers below, when they will be properly supported by the core + /* + void PassengerBoarded(Unit* pPassenger, uint8 uiSeat) override + { + if (pPassenger->GetTypeId() != TYPEID_PLAYER) + return; + + // Set vehicle auras + DoCastSpellIfCan(m_creature, SPELL_FLIGHT, CAST_TRIGGERED); + } + */ + + void UpdateAI(const uint32 uiDiff) override + { + if (!m_bHasMounted) + { + if (m_creature->IsTemporarySummon()) + { + TemporarySummon* pTemporary = (TemporarySummon*)m_creature; + + // Force player to mount + if (Player* pSummoner = m_creature->GetMap()->GetPlayer(pTemporary->GetSummonerGuid())) + pSummoner->CastSpell(m_creature, SPELL_RIDE_RED_DRAGON, true); + } + + m_bHasMounted = true; + } + } +}; + +CreatureAI* GetAI_npc_wyrmrest_skytalon(Creature* pCreature) +{ + return new npc_wyrmrest_skytalonAI(pCreature); +} + /*###### ## event_go_focusing_iris ######*/ @@ -617,9 +688,12 @@ bool ProcessEventId_event_go_focusing_iris(uint32 uiEventId, Object* pSource, Ob // Enter combat area - Move to ground point first, then start chasing target float fX, fY, fZ; - pTrigger->GetNearPoint(pTrigger, fX, fY, fZ, 0, 30.0f, pTrigger->GetAngle(pMalygos)); - pMalygos->GetMotionMaster()->MovePoint(POINT_ID_COMBAT, fX, fY, fZ); pMalygos->AI()->AttackStart((Player*)pSource); + pMalygos->GetMotionMaster()->MoveIdle(); + pMalygos->GetMotionMaster()->Clear(); + + pTrigger->GetNearPoint(pTrigger, fX, fY, fZ, 0, 30.0f, pTrigger->GetAngle(pMalygos)); + pMalygos->GetMotionMaster()->MovePoint(POINT_ID_COMBAT, fX, fY, fZ, false); return true; } @@ -640,6 +714,11 @@ void AddSC_boss_malygos() pNewScript->GetAI = &GetAI_npc_power_spark; pNewScript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "npc_wyrmrest_skytalon"; + pNewScript->GetAI = &GetAI_npc_wyrmrest_skytalon; + pNewScript->RegisterSelf(); + pNewScript = new Script; pNewScript->Name = "event_go_focusing_iris"; pNewScript->pProcessEventId = &ProcessEventId_event_go_focusing_iris; diff --git a/scripts/northrend/nexus/eye_of_eternity/eye_of_eternity.h b/scripts/northrend/nexus/eye_of_eternity/eye_of_eternity.h index 76653f15b..20a16528e 100644 --- a/scripts/northrend/nexus/eye_of_eternity/eye_of_eternity.h +++ b/scripts/northrend/nexus/eye_of_eternity/eye_of_eternity.h @@ -16,6 +16,8 @@ enum GO_EXIT_PORTAL = 193908, GO_PLATFORM = 193070, + GO_FOCUSING_IRIS = 193958, + GO_FOCUSING_IRIS_H = 193960, GO_HEART_OF_MAGIC = 194158, GO_HEART_OF_MAGIC_H = 194159, diff --git a/scripts/northrend/nexus/eye_of_eternity/instance_eye_of_eternity.cpp b/scripts/northrend/nexus/eye_of_eternity/instance_eye_of_eternity.cpp index 0b2b42dbf..d5d77e518 100644 --- a/scripts/northrend/nexus/eye_of_eternity/instance_eye_of_eternity.cpp +++ b/scripts/northrend/nexus/eye_of_eternity/instance_eye_of_eternity.cpp @@ -73,6 +73,8 @@ void instance_eye_of_eternity::OnObjectCreate(GameObject* pGo) { case GO_EXIT_PORTAL: case GO_PLATFORM: + case GO_FOCUSING_IRIS: + case GO_FOCUSING_IRIS_H: case GO_HEART_OF_MAGIC: case GO_HEART_OF_MAGIC_H: case GO_ALEXSTRASZAS_GIFT: @@ -96,7 +98,10 @@ void instance_eye_of_eternity::SetData(uint32 uiType, uint32 uiData) } else if (uiData == FAIL) { - // ToDo: respawn the platform and the portal + // ToDo: respawn the focus iris and the portal + + if (GameObject* pPlatform = GetSingleGameObjectFromStorage(GO_PLATFORM)) + pPlatform->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_UNK_11); } else if (uiData == DONE) StartNextDialogueText(NPC_ALEXSTRASZA); @@ -118,7 +123,10 @@ void instance_eye_of_eternity::JustDidDialogueStep(int32 iEntry) DoRespawnGameObject(instance->IsRegularDifficulty() ? GO_ALEXSTRASZAS_GIFT : GO_ALEXSTRASZAS_GIFT_H, 30 * MINUTE); break; case GO_PLATFORM: - // ToDo: respawn the platform and the portal + // ToDo: respawn the portal + if (GameObject* pPlatform = GetSingleGameObjectFromStorage(GO_PLATFORM)) + pPlatform->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_UNK_11); + // Spawn the Heart of Malygos DoRespawnGameObject(instance->IsRegularDifficulty() ? GO_HEART_OF_MAGIC : GO_HEART_OF_MAGIC_H, 30 * MINUTE); break; } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index b3f3cf8f5..cc2656b6f 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2825" + #define SD2_REVISION_NR "2826" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 6bba64638..0df693822 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -857,6 +857,7 @@ UPDATE creature_template SET ScriptName='npc_captured_vanguard' WHERE entry=2076 UPDATE instance_template SET ScriptName='instance_eye_of_eternity' WHERE map=616; UPDATE creature_template SET ScriptName='boss_malygos' WHERE entry=28859; UPDATE creature_template SET ScriptName='npc_power_spark' WHERE entry=30084; +UPDATE creature_template SET ScriptName='npc_wyrmrest_skytalon' WHERE entry=30161; DELETE FROM scripted_event_id WHERE id=20711; INSERT INTO scripted_event_id VALUES (20711,'event_go_focusing_iris'); diff --git a/sql/updates/r2826_mangos.sql b/sql/updates/r2826_mangos.sql new file mode 100644 index 000000000..0501c556e --- /dev/null +++ b/sql/updates/r2826_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_wyrmrest_skytalon' WHERE entry=30161; From 8a257affbbff6f4a24963066c8b7fea56ecfac34 Mon Sep 17 00:00:00 2001 From: tarwyn Date: Mon, 25 Mar 2013 23:22:42 +0200 Subject: [PATCH 0827/1172] [2827] Fix spell id for The Maker - Blood Furnace Close #46 Signed-off-by: Xfurry --- .../outland/hellfire_citadel/blood_furnace/boss_the_maker.cpp | 2 +- sd2_revision_nr.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/outland/hellfire_citadel/blood_furnace/boss_the_maker.cpp b/scripts/outland/hellfire_citadel/blood_furnace/boss_the_maker.cpp index 3b0adaf72..125836c12 100644 --- a/scripts/outland/hellfire_citadel/blood_furnace/boss_the_maker.cpp +++ b/scripts/outland/hellfire_citadel/blood_furnace/boss_the_maker.cpp @@ -37,7 +37,7 @@ enum SPELL_EXPLODING_BREAKER = 30925, SPELL_EXPLODING_BREAKER_H = 40059, SPELL_KNOCKDOWN = 20276, - SPELL_DOMINATION = 25772 // ??? + SPELL_DOMINATION = 30923 }; struct MANGOS_DLL_DECL boss_the_makerAI : public ScriptedAI diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index cc2656b6f..f198fd827 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2826" + #define SD2_REVISION_NR "2827" #endif // __SD2_REVISION_NR_H__ From fa9fc4e8b5a05c52390732d1c325070fda3526a1 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Tue, 26 Mar 2013 23:46:19 +0200 Subject: [PATCH 0828/1172] [2828] Update Forgemaster Garfrost to use Jump Movement --- .../pit_of_saron/boss_forgemaster_garfrost.cpp | 15 ++++++--------- sd2_revision_nr.h | 2 +- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_forgemaster_garfrost.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_forgemaster_garfrost.cpp index b9c55d912..0190c73c1 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_forgemaster_garfrost.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_forgemaster_garfrost.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: boss_forgemaster_garfrost -SD%Complete: 70 -SDComment: TODO movement to the forges currently workaround (need core support for Jump-MMGen) +SD%Complete: 90 +SDComment: Tyrannus outro event NYI. SDCategory: Pit of Saron EndScriptData */ @@ -54,8 +54,8 @@ enum static const float aGarfrostMoveLocs[2][3] = { - {719.785f, -230.227f, 527.033f}, {657.539f, -203.564f, 526.691f}, + {719.785f, -230.227f, 527.033f}, }; struct MANGOS_DLL_DECL boss_forgemaster_garfrostAI : public ScriptedAI @@ -101,8 +101,7 @@ struct MANGOS_DLL_DECL boss_forgemaster_garfrostAI : public ScriptedAI void MovementInform(uint32 uiMotionType, uint32 uiPointId) override { - // TODO Change to jump movement type when proper implemented - if (uiMotionType != POINT_MOTION_TYPE) + if (uiMotionType != EFFECT_MOTION_TYPE) return; if (uiPointId != PHASE_BLADE_ENCHANTMENT && uiPointId != PHASE_MACE_ENCHANTMENT) @@ -157,8 +156,7 @@ struct MANGOS_DLL_DECL boss_forgemaster_garfrostAI : public ScriptedAI DoCastSpellIfCan(m_creature, SPELL_THUNDERING_STOMP, CAST_INTERRUPT_PREVIOUS); SetCombatMovement(false); - // TODO This should actually be jump movement - m_creature->GetMotionMaster()->MovePoint(PHASE_BLADE_ENCHANTMENT, aGarfrostMoveLocs[0][0], aGarfrostMoveLocs[0][1], aGarfrostMoveLocs[0][2]); + m_creature->GetMotionMaster()->MoveJump(aGarfrostMoveLocs[0][0], aGarfrostMoveLocs[0][1], aGarfrostMoveLocs[0][2], 3 * m_creature->GetSpeed(MOVE_RUN), 10.0f, PHASE_BLADE_ENCHANTMENT); m_uiPhase = PHASE_MOVEMENT; // Stop further action @@ -173,8 +171,7 @@ struct MANGOS_DLL_DECL boss_forgemaster_garfrostAI : public ScriptedAI DoCastSpellIfCan(m_creature, SPELL_THUNDERING_STOMP, CAST_INTERRUPT_PREVIOUS); SetCombatMovement(false); - // TODO This should actually be jump movement - m_creature->GetMotionMaster()->MovePoint(PHASE_MACE_ENCHANTMENT, aGarfrostMoveLocs[1][0], aGarfrostMoveLocs[1][1], aGarfrostMoveLocs[1][2]); + m_creature->GetMotionMaster()->MoveJump(aGarfrostMoveLocs[1][0], aGarfrostMoveLocs[1][1], aGarfrostMoveLocs[1][2], 3 * m_creature->GetSpeed(MOVE_RUN), 10.0f, PHASE_MACE_ENCHANTMENT); m_uiPhase = PHASE_MOVEMENT; // Stop further action diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index f198fd827..cf20985ee 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2827" + #define SD2_REVISION_NR "2828" #endif // __SD2_REVISION_NR_H__ From 725d0c2740039f2e7796b2367bbb8458dcd77271 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Wed, 27 Mar 2013 19:04:41 +0100 Subject: [PATCH 0829/1172] [2829] Improve script of npc_kelerun_bloodmourn Fix scriptdev2/scriptdev2#48 - Thanks to tarwyn for pointing --- scripts/eastern_kingdoms/eversong_woods.cpp | 90 +++++++++++---------- sd2_revision_nr.h | 2 +- 2 files changed, 48 insertions(+), 44 deletions(-) diff --git a/scripts/eastern_kingdoms/eversong_woods.cpp b/scripts/eastern_kingdoms/eversong_woods.cpp index ddf622ea6..2747304f9 100644 --- a/scripts/eastern_kingdoms/eversong_woods.cpp +++ b/scripts/eastern_kingdoms/eversong_woods.cpp @@ -94,9 +94,6 @@ struct MANGOS_DLL_DECL npc_kelerun_bloodmournAI : public ScriptedAI m_playerGuid.Clear(); - for (uint8 i = 0; i < MAX_CHALLENGER; ++i) - m_aChallengerGuids[i].Clear(); - m_uiChallengerCount = 0; m_uiTimeOutTimer = 60000; @@ -104,6 +101,12 @@ struct MANGOS_DLL_DECL npc_kelerun_bloodmournAI : public ScriptedAI m_uiEngageTimer = 0; m_bIsEventInProgress = false; + for (uint8 i = 0; i < MAX_CHALLENGER; ++i) // Despawn challengers + { + if (Creature* pChallenger = m_creature->GetMap()->GetCreature(m_aChallengerGuids[i])) + pChallenger->ForcedDespawn(1000); + m_aChallengerGuids[i].Clear(); + } } void StartEvent() @@ -145,72 +148,73 @@ struct MANGOS_DLL_DECL npc_kelerun_bloodmournAI : public ScriptedAI { if (m_bIsEventInProgress) { - if (m_uiTimeOutTimer && m_uiTimeOutTimer < uiDiff) + if (m_uiTimeOutTimer) { - if (!m_playerGuid) + if (m_uiTimeOutTimer <= uiDiff) { - // player are expected to use GO within a minute, if not, event will fail. - Reset(); - return; + if (!m_playerGuid) // player are expected to use GO within a minute, if not, event will fail. + { + Reset(); + return; + } + m_uiTimeOutTimer = 0; } - - m_uiTimeOutTimer = 0; + else + m_uiTimeOutTimer -= uiDiff; } - else - m_uiTimeOutTimer -= uiDiff; if (m_uiCheckAliveStateTimer < uiDiff) { - if (Creature* pChallenger = m_creature->GetMap()->GetCreature(m_aChallengerGuids[m_uiChallengerCount])) + Creature* pChallenger = m_creature->GetMap()->GetCreature(m_aChallengerGuids[m_uiChallengerCount]); + if (pChallenger && !pChallenger->isAlive()) { - if (!pChallenger->isAlive()) + Player* pPlayer = m_creature->GetMap()->GetPlayer(m_playerGuid); + if (!pPlayer || !pPlayer->isAlive()) { - Player* pPlayer = m_creature->GetMap()->GetPlayer(m_playerGuid); - - if (pPlayer && !pPlayer->isAlive()) - { - Reset(); - return; - } - - ++m_uiChallengerCount; - - // count starts at 0 - if (m_uiChallengerCount == MAX_CHALLENGER) - { - if (pPlayer && pPlayer->isAlive()) - pPlayer->GroupEventHappens(QUEST_SECOND_TRIAL, m_creature); - - Reset(); - return; - } - else - m_uiEngageTimer = 15000; + Reset(); + return; } + + ++m_uiChallengerCount; + + // count starts at 0 + if (m_uiChallengerCount == MAX_CHALLENGER) + { + pPlayer->GroupEventHappens(QUEST_SECOND_TRIAL, m_creature); + Reset(); + return; + } + else + m_uiEngageTimer = 15000; } m_uiCheckAliveStateTimer = 2500; } else m_uiCheckAliveStateTimer -= uiDiff; - if (m_uiEngageTimer && m_uiEngageTimer < uiDiff) + if (m_uiEngageTimer) { - Player* pPlayer = m_creature->GetMap()->GetPlayer(m_playerGuid); - - if (pPlayer && pPlayer->isAlive()) + if (m_uiEngageTimer <= uiDiff) { + Player* pPlayer = m_creature->GetMap()->GetPlayer(m_playerGuid); + if (!pPlayer || !pPlayer->isAlive()) + { + Reset(); + return; + } + if (Creature* pCreature = m_creature->GetMap()->GetCreature(m_aChallengerGuids[m_uiChallengerCount])) { DoScriptText(uiSayId[m_uiChallengerCount], m_creature, pPlayer); pCreature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); pCreature->AI()->AttackStart(pPlayer); } - } - m_uiEngageTimer = 0; + m_uiEngageTimer = 0; + } + else + m_uiEngageTimer -= uiDiff; } - else - m_uiEngageTimer -= uiDiff; } } }; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index cf20985ee..b1804e869 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2828" + #define SD2_REVISION_NR "2829" #endif // __SD2_REVISION_NR_H__ From 9e71cb1a848a6c36fadfd2b9b92961696ccb6a8a Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Wed, 27 Mar 2013 19:05:26 +0100 Subject: [PATCH 0830/1172] Improve Nazan and Vazruden script (first part) --- .../boss_nazan_and_vazruden.cpp | 64 +++++++++++++------ .../instance_hellfire_ramparts.cpp | 8 ++- 2 files changed, 51 insertions(+), 21 deletions(-) diff --git a/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_nazan_and_vazruden.cpp b/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_nazan_and_vazruden.cpp index 1ed4658e5..5d2c08508 100644 --- a/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_nazan_and_vazruden.cpp +++ b/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_nazan_and_vazruden.cpp @@ -66,6 +66,7 @@ enum const float afCenterPos[3] = { -1399.401f, 1736.365f, 87.008f}; // moves here to drop off nazan const float afCombatPos[3] = { -1413.848f, 1754.019f, 83.146f}; // moves here when decending +// This is the summoned boss ("dismounted") that starts attacking the players struct MANGOS_DLL_DECL boss_vazrudenAI : public ScriptedAI { boss_vazrudenAI(Creature* pCreature) : ScriptedAI(pCreature) @@ -116,9 +117,9 @@ struct MANGOS_DLL_DECL boss_vazrudenAI : public ScriptedAI DoScriptText(urand(0, 1) ? SAY_KILL1 : SAY_KILL2, m_creature); } - void PrepareAndDescendMount() + void PrepareAndDescendMount(Creature* pHerald) { - if (Creature* pHerald = m_pInstance->GetSingleCreatureFromStorage(NPC_VAZRUDEN_HERALD)) + if (pHerald && pHerald->GetMotionMaster()->GetCurrentMovementGeneratorType() == WAYPOINT_MOTION_TYPE) { pHerald->SetWalk(false); pHerald->GetMotionMaster()->MovePoint(POINT_ID_COMBAT, afCombatPos[0], afCombatPos[1], afCombatPos[2]); @@ -126,18 +127,21 @@ struct MANGOS_DLL_DECL boss_vazrudenAI : public ScriptedAI } } - void UpdateAI(const uint32 uiDiff) override + void DamageTaken(Unit* pDealer, uint32& uiDamage) override { - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - if (!m_bHealthBelow && m_creature->GetHealthPercent() <= 30.0f) + if (!m_bHealthBelow && (float(m_creature->GetHealth() - uiDamage) / m_creature->GetMaxHealth()) < 0.30f) { if (m_pInstance) - PrepareAndDescendMount(); + PrepareAndDescendMount(m_pInstance->GetSingleCreatureFromStorage(NPC_VAZRUDEN_HERALD)); m_bHealthBelow = true; } + } + + void UpdateAI(const uint32 uiDiff) override + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; if (m_uiRevengeTimer < uiDiff) { @@ -156,9 +160,9 @@ CreatureAI* GetAI_boss_vazruden(Creature* pCreature) return new boss_vazrudenAI(pCreature); } -// Creature fly around platform by default. -// After "dropping off" Vazruden, transforms to mount (Nazan) and are then ready to fight when -// Vazruden reach 30% HP +// This is the flying mob ("mounted" on dragon) spawned initially +// This npc will morph into the "unmounted" dragon (nazan) after vazruden is summoned and continue flying +// Descent after Vazruden reach 30% HP struct MANGOS_DLL_DECL boss_vazruden_heraldAI : public ScriptedAI { boss_vazruden_heraldAI(Creature* pCreature) : ScriptedAI(pCreature) @@ -173,6 +177,7 @@ struct MANGOS_DLL_DECL boss_vazruden_heraldAI : public ScriptedAI bool m_bIsRegularMode; bool m_bIsEventInProgress; + bool m_bIsDescending; uint32 m_uiMovementTimer; uint32 m_uiFireballTimer; uint32 m_uiFireballBTimer; @@ -191,6 +196,7 @@ struct MANGOS_DLL_DECL boss_vazruden_heraldAI : public ScriptedAI m_uiMovementTimer = 0; m_bIsEventInProgress = false; + m_bIsDescending = false; m_lastSeenPlayerGuid.Clear(); m_vazrudenGuid.Clear(); m_uiFireballTimer = 0; @@ -218,6 +224,14 @@ struct MANGOS_DLL_DECL boss_vazruden_heraldAI : public ScriptedAI ScriptedAI::MoveInLineOfSight(pWho); } + void AttackStart(Unit* pWho) override + { + if (m_pInstance && m_pInstance->GetData(TYPE_NAZAN) != IN_PROGRESS) + return; + + ScriptedAI::AttackStart(pWho); + } + void MovementInform(uint32 uiType, uint32 uiPointId) override { if (!m_pInstance) @@ -276,6 +290,18 @@ struct MANGOS_DLL_DECL boss_vazruden_heraldAI : public ScriptedAI m_creature->GetMotionMaster()->MovePoint(POINT_ID_CENTER, afCenterPos[0], afCenterPos[1], afCenterPos[2]); } + void DoSplit() + { + m_creature->UpdateEntry(NPC_NAZAN); + + DoCastSpellIfCan(m_creature, SPELL_SUMMON_VAZRUDEN); + + m_uiMovementTimer = 3000; + + // Let him idle for now + m_creature->GetMotionMaster()->MoveIdle(); + } + void DoMoveToAir() { float fX, fY, fZ; @@ -288,16 +314,13 @@ struct MANGOS_DLL_DECL boss_vazruden_heraldAI : public ScriptedAI m_creature->GetMotionMaster()->MovePoint(POINT_ID_FLYING, fX, fY, fZ); } - void DoSplit() + void DoMoveToCombat() { - m_creature->UpdateEntry(NPC_NAZAN); - - DoCastSpellIfCan(m_creature, SPELL_SUMMON_VAZRUDEN); - - m_uiMovementTimer = 3000; + m_bIsDescending = true; + if (m_pInstance && m_pInstance->GetData(TYPE_NAZAN) == IN_PROGRESS) + return; - // Let him idle for now - m_creature->GetMotionMaster()->MoveIdle(); + // TODO, replace function in vazruden's AI } void JustSummoned(Creature* pSummoned) override @@ -378,6 +401,9 @@ struct MANGOS_DLL_DECL boss_vazruden_heraldAI : public ScriptedAI m_uiFireballBTimer -= uiDiff; } + if (!m_bIsDescending && m_creature->GetHealthPercent() < 20.0f) + DoMoveToCombat(); + return; } diff --git a/scripts/outland/hellfire_citadel/hellfire_ramparts/instance_hellfire_ramparts.cpp b/scripts/outland/hellfire_citadel/hellfire_ramparts/instance_hellfire_ramparts.cpp index a9e97b6df..da2f64cc5 100644 --- a/scripts/outland/hellfire_citadel/hellfire_ramparts/instance_hellfire_ramparts.cpp +++ b/scripts/outland/hellfire_citadel/hellfire_ramparts/instance_hellfire_ramparts.cpp @@ -67,6 +67,8 @@ void instance_ramparts::SetData(uint32 uiType, uint32 uiData) switch (uiType) { case TYPE_VAZRUDEN: + if (m_auiEncounter[0] == uiData) + return; if (uiData == DONE && m_auiEncounter[1] == DONE) DoRespawnGameObject(instance->IsRegularDifficulty() ? GO_FEL_IRON_CHEST : GO_FEL_IRON_CHEST_H, HOUR); if (uiData == FAIL && m_auiEncounter[0] != FAIL) @@ -74,7 +76,9 @@ void instance_ramparts::SetData(uint32 uiType, uint32 uiData) m_auiEncounter[0] = uiData; break; case TYPE_NAZAN: - if (uiData == SPECIAL) + if (m_auiEncounter[1] == uiData) + return; + if (uiData == SPECIAL) // SPECIAL set via ACID { ++m_uiSentryCounter; @@ -129,7 +133,7 @@ void instance_ramparts::DoFailVazruden() else { if (ScriptedAI* pVazrudenAI = dynamic_cast(pVazruden->AI())) - pVazrudenAI->Reset(); + pVazrudenAI->EnterEvadeMode(); } } From 1ad331c2ee8861c01b782be0997250056c9c383c Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Wed, 27 Mar 2013 19:16:26 +0100 Subject: [PATCH 0831/1172] [2830] Improve Nazan and Vazruden script (second part) Fix scriptdev2/scriptdev2#47 - Thanks to tarwyn and xfurry for pointing and supporting information Change: * Add support for nazan to dismount if his health drops below 20% * Fix Nazan not attacking while he is supposed to fly (previous commit) * Fix some possible FAIL glitches (previous commit) --- .../boss_nazan_and_vazruden.cpp | 190 +++++++++--------- sd2_revision_nr.h | 2 +- 2 files changed, 93 insertions(+), 99 deletions(-) diff --git a/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_nazan_and_vazruden.cpp b/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_nazan_and_vazruden.cpp index 5d2c08508..b4a0cb50b 100644 --- a/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_nazan_and_vazruden.cpp +++ b/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_nazan_and_vazruden.cpp @@ -66,100 +66,6 @@ enum const float afCenterPos[3] = { -1399.401f, 1736.365f, 87.008f}; // moves here to drop off nazan const float afCombatPos[3] = { -1413.848f, 1754.019f, 83.146f}; // moves here when decending -// This is the summoned boss ("dismounted") that starts attacking the players -struct MANGOS_DLL_DECL boss_vazrudenAI : public ScriptedAI -{ - boss_vazrudenAI(Creature* pCreature) : ScriptedAI(pCreature) - { - m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); - Reset(); - } - - ScriptedInstance* m_pInstance; - bool m_bIsRegularMode; - - uint32 m_uiRevengeTimer; - bool m_bHealthBelow; - - void Reset() override - { - m_bHealthBelow = false; - m_uiRevengeTimer = urand(5500, 8400); - } - - void Aggro(Unit* pWho) override - { - switch (urand(0, 2)) - { - 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 JustDied(Unit* /*pKiller*/) override - { - DoScriptText(SAY_DEATH, m_creature); - - if (m_pInstance) - m_pInstance->SetData(TYPE_VAZRUDEN, DONE); - } - - void JustReachedHome() override - { - if (m_pInstance) - m_pInstance->SetData(TYPE_VAZRUDEN, FAIL); - } - - void KilledUnit(Unit* /*pVictim*/) override - { - DoScriptText(urand(0, 1) ? SAY_KILL1 : SAY_KILL2, m_creature); - } - - void PrepareAndDescendMount(Creature* pHerald) - { - if (pHerald && pHerald->GetMotionMaster()->GetCurrentMovementGeneratorType() == WAYPOINT_MOTION_TYPE) - { - pHerald->SetWalk(false); - pHerald->GetMotionMaster()->MovePoint(POINT_ID_COMBAT, afCombatPos[0], afCombatPos[1], afCombatPos[2]); - DoScriptText(EMOTE_DESCEND, pHerald); - } - } - - void DamageTaken(Unit* pDealer, uint32& uiDamage) override - { - if (!m_bHealthBelow && (float(m_creature->GetHealth() - uiDamage) / m_creature->GetMaxHealth()) < 0.30f) - { - if (m_pInstance) - PrepareAndDescendMount(m_pInstance->GetSingleCreatureFromStorage(NPC_VAZRUDEN_HERALD)); - - m_bHealthBelow = true; - } - } - - void UpdateAI(const uint32 uiDiff) override - { - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - if (m_uiRevengeTimer < uiDiff) - { - if (DoCastSpellIfCan(m_creature->getVictim(), m_bIsRegularMode ? SPELL_REVENGE : SPELL_REVENGE_H) == CAST_OK) - m_uiRevengeTimer = urand(11400, 14300); - } - else - m_uiRevengeTimer -= uiDiff; - - DoMeleeAttackIfReady(); - } -}; - -CreatureAI* GetAI_boss_vazruden(Creature* pCreature) -{ - return new boss_vazrudenAI(pCreature); -} - // This is the flying mob ("mounted" on dragon) spawned initially // This npc will morph into the "unmounted" dragon (nazan) after vazruden is summoned and continue flying // Descent after Vazruden reach 30% HP @@ -316,11 +222,14 @@ struct MANGOS_DLL_DECL boss_vazruden_heraldAI : public ScriptedAI void DoMoveToCombat() { - m_bIsDescending = true; - if (m_pInstance && m_pInstance->GetData(TYPE_NAZAN) == IN_PROGRESS) + if (m_bIsDescending || !m_pInstance || m_pInstance->GetData(TYPE_NAZAN) == IN_PROGRESS) return; - // TODO, replace function in vazruden's AI + m_bIsDescending = true; + + m_creature->SetWalk(false); + m_creature->GetMotionMaster()->MovePoint(POINT_ID_COMBAT, afCombatPos[0], afCombatPos[1], afCombatPos[2]); + DoScriptText(EMOTE_DESCEND, m_creature); } void JustSummoned(Creature* pSummoned) override @@ -401,7 +310,7 @@ struct MANGOS_DLL_DECL boss_vazruden_heraldAI : public ScriptedAI m_uiFireballBTimer -= uiDiff; } - if (!m_bIsDescending && m_creature->GetHealthPercent() < 20.0f) + if (m_creature->GetHealthPercent() < 20.0f) DoMoveToCombat(); return; @@ -447,6 +356,91 @@ CreatureAI* GetAI_boss_vazruden_herald(Creature* pCreature) return new boss_vazruden_heraldAI(pCreature); } +// This is the summoned boss ("dismounted") that starts attacking the players +struct MANGOS_DLL_DECL boss_vazrudenAI : public ScriptedAI +{ + boss_vazrudenAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); + Reset(); + } + + ScriptedInstance* m_pInstance; + bool m_bIsRegularMode; + + uint32 m_uiRevengeTimer; + bool m_bHealthBelow; + + void Reset() override + { + m_bHealthBelow = false; + m_uiRevengeTimer = urand(5500, 8400); + } + + void Aggro(Unit* pWho) override + { + switch (urand(0, 2)) + { + 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 JustDied(Unit* /*pKiller*/) override + { + DoScriptText(SAY_DEATH, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_VAZRUDEN, DONE); + } + + void JustReachedHome() override + { + if (m_pInstance) + m_pInstance->SetData(TYPE_VAZRUDEN, FAIL); + } + + void KilledUnit(Unit* /*pVictim*/) override + { + DoScriptText(urand(0, 1) ? SAY_KILL1 : SAY_KILL2, m_creature); + } + + void DamageTaken(Unit* pDealer, uint32& uiDamage) override + { + if (!m_bHealthBelow && m_pInstance && (float(m_creature->GetHealth() - uiDamage) / m_creature->GetMaxHealth()) < 0.30f) + { + if (Creature* pNazan = m_pInstance->GetSingleCreatureFromStorage(NPC_VAZRUDEN_HERALD)) + if (boss_vazruden_heraldAI* pNazanAI = dynamic_cast(pNazan->AI())) + pNazanAI->DoMoveToCombat(); + + m_bHealthBelow = true; + } + } + + void UpdateAI(const uint32 uiDiff) override + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_uiRevengeTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), m_bIsRegularMode ? SPELL_REVENGE : SPELL_REVENGE_H) == CAST_OK) + m_uiRevengeTimer = urand(11400, 14300); + } + else + m_uiRevengeTimer -= uiDiff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_vazruden(Creature* pCreature) +{ + return new boss_vazrudenAI(pCreature); +} + void AddSC_boss_nazan_and_vazruden() { Script* pNewScript; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index b1804e869..e12d867f3 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2829" + #define SD2_REVISION_NR "2830" #endif // __SD2_REVISION_NR_H__ From 3ef8f906b2124519cbf73def4c4ce728c690943c Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Thu, 28 Mar 2013 04:11:47 +0100 Subject: [PATCH 0832/1172] [2831] Implement Solakar Flamewreath Event in UBRS (Rookery) --- .../blackrock_spire/blackrock_spire.h | 14 ++- .../instance_blackrock_spire.cpp | 114 +++++++++++++++++- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 + sql/scriptdev2_script_full.sql | 4 +- sql/updates/r2831_mangos.sql | 1 + sql/updates/r2831_scriptdev2.sql | 3 + 7 files changed, 127 insertions(+), 12 deletions(-) create mode 100644 sql/updates/r2831_mangos.sql create mode 100644 sql/updates/r2831_scriptdev2.sql diff --git a/scripts/eastern_kingdoms/blackrock_spire/blackrock_spire.h b/scripts/eastern_kingdoms/blackrock_spire/blackrock_spire.h index cbdf6c650..305653fff 100644 --- a/scripts/eastern_kingdoms/blackrock_spire/blackrock_spire.h +++ b/scripts/eastern_kingdoms/blackrock_spire/blackrock_spire.h @@ -7,19 +7,21 @@ enum { - MAX_ENCOUNTER = 5, + MAX_ENCOUNTER = 6, MAX_ROOMS = 7, TYPE_ROOM_EVENT = 0, TYPE_EMBERSEER = 1, TYPE_FLAMEWREATH = 2, // Only summon once per instance TYPE_STADIUM = 3, - TYPE_VALTHALAK = 4, // Only summon once per instance + TYPE_DRAKKISATH = 4, + TYPE_VALTHALAK = 5, // Only summon once per instance NPC_SCARSHIELD_INFILTRATOR = 10299, NPC_BLACKHAND_SUMMONER = 9818, NPC_BLACKHAND_VETERAN = 9819, NPC_PYROGUARD_EMBERSEER = 9816, + NPC_SOLAKAR_FLAMEWREATH = 10264, NPC_BLACKHAND_INCARCERATOR = 10316, NPC_LORD_VICTOR_NEFARIUS = 10162, NPC_REND_BLACKHAND = 10429, @@ -33,6 +35,7 @@ enum GO_EMBERSEER_IN = 175244, GO_DOORS = 175705, GO_EMBERSEER_OUT = 175153, + GO_FATHER_FLAME = 175245, GO_GYTH_ENTRY_DOOR = 164726, GO_GYTH_COMBAT_DOOR = 175185, GO_GYTH_EXIT_DOOR = 175186, @@ -117,17 +120,21 @@ class MANGOS_DLL_DECL instance_blackrock_spire : public ScriptedInstance, privat void DoSortRoomEventMobs(); void GetIncarceratorGUIDList(GuidList& lList) { lList = m_lIncarceratorGUIDList; } - void GetRookeryEggGUIDList(GuidList& lList) { lList = m_lRookeryEggGUIDList; } + + void StartflamewreathEventIfCan(); void Update(uint32 uiDiff) override; private: void JustDidDialogueStep(int32 iEntry) override; void DoSendNextStadiumWave(); + void DoSendNextFlamewreathWave(); uint32 m_auiEncounter[MAX_ENCOUNTER]; std::string m_strInstData; + uint32 m_uiFlamewreathEventTimer; + uint32 m_uiFlamewreathWaveCount; uint32 m_uiStadiumEventTimer; uint8 m_uiStadiumWaves; uint8 m_uiStadiumMobsAlive; @@ -136,7 +143,6 @@ class MANGOS_DLL_DECL instance_blackrock_spire : public ScriptedInstance, privat GuidList m_alRoomEventMobGUIDSorted[MAX_ROOMS]; GuidList m_lRoomEventMobGUIDList; GuidList m_lIncarceratorGUIDList; - GuidList m_lRookeryEggGUIDList; GuidList m_lEmberseerRunesGUIDList; }; diff --git a/scripts/eastern_kingdoms/blackrock_spire/instance_blackrock_spire.cpp b/scripts/eastern_kingdoms/blackrock_spire/instance_blackrock_spire.cpp index ce6e0a24c..6457f4fc9 100644 --- a/scripts/eastern_kingdoms/blackrock_spire/instance_blackrock_spire.cpp +++ b/scripts/eastern_kingdoms/blackrock_spire/instance_blackrock_spire.cpp @@ -47,8 +47,12 @@ enum // Emberseer event EMOTE_BEGIN = -1229000, - SPELL_EMBERSEER_GROWING = 16048, + + // Solakar Flamewreath Event + SAY_ROOKERY_EVENT_START = -1229020, + NPC_ROOKERY_GUARDIAN = 10258, + NPC_ROOKERY_HATCHER = 10683, }; /* Areatrigger @@ -79,7 +83,11 @@ static const DialogueEntry aStadiumDialogue[] = {0, 0, 0}, }; +static const float rookeryEventSpawnPos[3] = {43.7685f, -259.82f, 91.6483f}; + instance_blackrock_spire::instance_blackrock_spire(Map* pMap) : ScriptedInstance(pMap), DialogueHelper(aStadiumDialogue), + m_uiFlamewreathEventTimer(0), + m_uiFlamewreathWaveCount(0), m_uiStadiumEventTimer(0), m_uiStadiumWaves(0), m_uiStadiumMobsAlive(0) @@ -108,6 +116,7 @@ void instance_blackrock_spire::OnObjectCreate(GameObject* pGo) if (GetData(TYPE_EMBERSEER) == DONE) pGo->SetGoState(GO_STATE_ACTIVE); break; + case GO_FATHER_FLAME: case GO_GYTH_ENTRY_DOOR: case GO_GYTH_COMBAT_DOOR: case GO_DRAKKISATH_DOOR_1: @@ -126,8 +135,6 @@ void instance_blackrock_spire::OnObjectCreate(GameObject* pGo) case GO_ROOM_6_RUNE: m_aRoomRuneGuid[5] = pGo->GetObjectGuid(); return; case GO_ROOM_7_RUNE: m_aRoomRuneGuid[6] = pGo->GetObjectGuid(); return; - case GO_ROOKERY_EGG: m_lRookeryEggGUIDList.push_back(pGo->GetObjectGuid()); return; - case GO_EMBERSEER_RUNE_1: case GO_EMBERSEER_RUNE_2: case GO_EMBERSEER_RUNE_3: @@ -149,6 +156,7 @@ void instance_blackrock_spire::OnCreatureCreate(Creature* pCreature) switch (pCreature->GetEntry()) { case NPC_PYROGUARD_EMBERSEER: + case NPC_SOLAKAR_FLAMEWREATH: case NPC_LORD_VICTOR_NEFARIUS: case NPC_GYTH: case NPC_REND_BLACKHAND: @@ -200,6 +208,11 @@ void instance_blackrock_spire::SetData(uint32 uiType, uint32 uiData) m_auiEncounter[uiType] = uiData; break; case TYPE_FLAMEWREATH: + if (uiData == FAIL) + { + m_uiFlamewreathEventTimer = 0; + m_uiFlamewreathWaveCount = 0; + } m_auiEncounter[uiType] = uiData; break; case TYPE_STADIUM: @@ -229,6 +242,7 @@ void instance_blackrock_spire::SetData(uint32 uiType, uint32 uiData) } m_auiEncounter[uiType] = uiData; break; + case TYPE_DRAKKISATH: case TYPE_VALTHALAK: m_auiEncounter[uiType] = uiData; break; @@ -239,7 +253,7 @@ void instance_blackrock_spire::SetData(uint32 uiType, uint32 uiData) OUT_SAVE_INST_DATA; std::ostringstream saveStream; - saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2] << " " << m_auiEncounter[3] << " " << m_auiEncounter[4]; + saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2] << " " << m_auiEncounter[3] << " " << m_auiEncounter[4] << " " << m_auiEncounter[5]; m_strInstData = saveStream.str(); @@ -259,7 +273,7 @@ void instance_blackrock_spire::Load(const char* chrIn) OUT_LOAD_INST_DATA(chrIn); std::istringstream loadStream(chrIn); - loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3] >> m_auiEncounter[4]; + loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3] >> m_auiEncounter[4] >> m_auiEncounter[5]; for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) { @@ -327,8 +341,11 @@ void instance_blackrock_spire::OnCreatureDeath(Creature* pCreature) SetData(TYPE_ROOM_EVENT, DONE); } break; + case NPC_SOLAKAR_FLAMEWREATH: + SetData(TYPE_FLAMEWREATH, DONE); + break; case NPC_DRAKKISATH: - // Just open the doors, don't save anything because it's the last boss + SetData(TYPE_DRAKKISATH, DONE); DoUseDoorOrButton(GO_DRAKKISATH_DOOR_1); DoUseDoorOrButton(GO_DRAKKISATH_DOOR_2); break; @@ -360,6 +377,11 @@ void instance_blackrock_spire::OnCreatureEvade(Creature* pCreature) if (Creature* pEmberseer = GetSingleCreatureFromStorage(NPC_PYROGUARD_EMBERSEER)) pEmberseer->AI()->EnterEvadeMode(); break; + case NPC_SOLAKAR_FLAMEWREATH: + case NPC_ROOKERY_GUARDIAN: + case NPC_ROOKERY_HATCHER: + SetData(TYPE_FLAMEWREATH, FAIL); + break; case NPC_CHROMATIC_WHELP: case NPC_CHROMATIC_DRAGON: case NPC_BLACKHAND_HANDLER: @@ -530,6 +552,50 @@ void instance_blackrock_spire::DoSendNextStadiumWave() m_uiStadiumEventTimer = 60000; } +void instance_blackrock_spire::DoSendNextFlamewreathWave() +{ + GameObject* pSummoner = GetSingleGameObjectFromStorage(GO_FATHER_FLAME); + if (!pSummoner) + return; + + // TODO - The npcs would move nicer if they had DB waypoints, so i suggest to change their default movement to DB waypoints, and random movement when they reached their goal + + if (m_uiFlamewreathWaveCount < 6) // Send two adds (6 waves, then boss) + { + Creature* pSummoned = NULL; + for (uint8 i = 0; i < 2; ++i) + { + float fX, fY, fZ; + pSummoner->GetRandomPoint(rookeryEventSpawnPos[0], rookeryEventSpawnPos[1], rookeryEventSpawnPos[2], 2.5f, fX, fY, fZ); + // Summon Rookery Hatchers in first wave, else random + if (pSummoned = pSummoner->SummonCreature(urand(0, 1) && m_uiFlamewreathWaveCount ? NPC_ROOKERY_GUARDIAN : NPC_ROOKERY_HATCHER, + fX, fY, fZ, 0.0, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 300000)) + { + pSummoner->GetContactPoint(pSummoned, fX, fY, fZ); + pSummoned->GetMotionMaster()->MovePoint(1, fX, fY, pSummoner->GetPositionZ()); + } + } + if (pSummoned && m_uiFlamewreathWaveCount == 0) + DoScriptText(SAY_ROOKERY_EVENT_START, pSummoned); + + if (m_uiFlamewreathWaveCount < 4) + m_uiFlamewreathEventTimer = 30000; + else if (m_uiFlamewreathWaveCount < 6) + m_uiFlamewreathEventTimer = 40000; + else + m_uiFlamewreathEventTimer = 10000; + + ++m_uiFlamewreathWaveCount; + } + else // Send Flamewreath + { + if (Creature* pSolakar = pSummoner->SummonCreature(NPC_SOLAKAR_FLAMEWREATH, rookeryEventSpawnPos[0], rookeryEventSpawnPos[1], rookeryEventSpawnPos[2], 0.0f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, HOUR * IN_MILLISECONDS)) + pSolakar->GetMotionMaster()->MovePoint(1, pSummoner->GetPositionX(), pSummoner->GetPositionY(), pSummoner->GetPositionZ()); + SetData(TYPE_FLAMEWREATH, SPECIAL); + m_uiFlamewreathEventTimer = 0; + } +} + void instance_blackrock_spire::Update(uint32 uiDiff) { DialogueUpdate(uiDiff); @@ -541,6 +607,29 @@ void instance_blackrock_spire::Update(uint32 uiDiff) else m_uiStadiumEventTimer -= uiDiff; } + + if (m_uiFlamewreathEventTimer) + { + if (m_uiFlamewreathEventTimer <= uiDiff) + DoSendNextFlamewreathWave(); + else + m_uiFlamewreathEventTimer -= uiDiff; + } +} + +void instance_blackrock_spire::StartflamewreathEventIfCan() +{ + // Already done or currently in progress - or endboss done + if (m_auiEncounter[TYPE_FLAMEWREATH] == DONE || m_auiEncounter[TYPE_FLAMEWREATH] == IN_PROGRESS || m_auiEncounter[TYPE_DRAKKISATH] == DONE) + return; + + // Boss still around + if (GetSingleCreatureFromStorage(NPC_SOLAKAR_FLAMEWREATH, true)) + return; + + // Start summoning of mobs + m_uiFlamewreathEventTimer = 1; + m_uiFlamewreathWaveCount = 0; } InstanceData* GetInstanceData_instance_blackrock_spire(Map* pMap) @@ -592,6 +681,14 @@ bool ProcessEventId_event_spell_altar_emberseer(uint32 uiEventId, Object* pSourc return false; } +bool GOUse_go_father_flame(Player* pPlayer, GameObject* pGo) +{ + if (instance_blackrock_spire* pInstance = (instance_blackrock_spire*)pGo->GetInstanceData()) + pInstance->StartflamewreathEventIfCan(); + + return true; +} + void AddSC_instance_blackrock_spire() { Script* pNewScript; @@ -610,4 +707,9 @@ void AddSC_instance_blackrock_spire() pNewScript->Name = "event_spell_altar_emberseer"; pNewScript->pProcessEventId = &ProcessEventId_event_spell_altar_emberseer; pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "go_father_flame"; + pNewScript->pGOUse = &GOUse_go_father_flame; + pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index e12d867f3..8283d50f0 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2830" + #define SD2_REVISION_NR "2831" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 0df693822..e0e2c4b71 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -346,6 +346,7 @@ UPDATE creature_template SET ScriptName='boss_pyroguard_emberseer' WHERE entry=9 DELETE FROM scripted_event_id WHERE id=4884; INSERT INTO scripted_event_id VALUES (4884,'event_spell_altar_emberseer'); +UPDATE gameobject_template SET ScriptName='go_father_flame' WHERE entry=175245; /* BLACKWING LAIR */ UPDATE instance_template SET ScriptName='instance_blackwing_lair' WHERE map=469; diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 41093ad40..95f1c2243 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -1206,7 +1206,9 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1229017,'Taste in my power!',0,1,0,0,'nefarius SAY_BUFF_GYTH'), (-1229018,'Your victory shall be short lived. The days of both the Alliance and Horde are coming to an end. The next time we meet shall be the last.',0,1,0,1,'nefarius SAY_VICTORY'), -(-1229019,'%s is knocked off his drake!',0,2,0,0,'rend EMOTE_KNOCKED_OFF'); +(-1229019,'%s is knocked off his drake!',0,2,0,0,'rend EMOTE_KNOCKED_OFF'), + +(-1229020,'Intruders are destroying our eggs! Stop!!',0,1,0,0,'rookery hatcher - SAY_ROOKERY_EVENT_START'); -- -1 230 000 BLACKROCK DEPTHS INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES diff --git a/sql/updates/r2831_mangos.sql b/sql/updates/r2831_mangos.sql new file mode 100644 index 000000000..52f05db68 --- /dev/null +++ b/sql/updates/r2831_mangos.sql @@ -0,0 +1 @@ +UPDATE gameobject_template SET ScriptName='go_father_flame' WHERE entry=175245; diff --git a/sql/updates/r2831_scriptdev2.sql b/sql/updates/r2831_scriptdev2.sql new file mode 100644 index 000000000..bc20cb368 --- /dev/null +++ b/sql/updates/r2831_scriptdev2.sql @@ -0,0 +1,3 @@ +DELETE FROM script_texts WHERE entry=-1229020; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1229020,'Intruders are destroying our eggs! Stop!!',0,1,0,0,'rookery hatcher - SAY_ROOKERY_EVENT_START'); From 4d2e41e7094d1556a2bd870dbebdb850133ceee4 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Fri, 29 Mar 2013 00:08:05 +0200 Subject: [PATCH 0833/1172] [2832] Implement script for Ick and Krick - Pit of Saron --- .../boss_forgemaster_garfrost.cpp | 1 - .../pit_of_saron/boss_krick_and_ick.cpp | 389 +++++++++++++++++- .../pit_of_saron/instance_pit_of_saron.cpp | 92 ++++- .../frozen_halls/pit_of_saron/pit_of_saron.h | 15 +- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 3 + sql/scriptdev2_script_full.sql | 8 +- sql/updates/r2832_mangos.sql | 3 + sql/updates/r2832_scriptdev2.sql | 3 + 9 files changed, 494 insertions(+), 22 deletions(-) create mode 100644 sql/updates/r2832_mangos.sql create mode 100644 sql/updates/r2832_scriptdev2.sql diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_forgemaster_garfrost.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_forgemaster_garfrost.cpp index 0190c73c1..d1887bb94 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_forgemaster_garfrost.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_forgemaster_garfrost.cpp @@ -59,7 +59,6 @@ static const float aGarfrostMoveLocs[2][3] = }; struct MANGOS_DLL_DECL boss_forgemaster_garfrostAI : public ScriptedAI - { boss_forgemaster_garfrostAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_krick_and_ick.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_krick_and_ick.cpp index c5a8bb200..c7b2127da 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_krick_and_ick.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_krick_and_ick.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: boss_krick_and_ick -SD%Complete: 0% -SDComment: +SD%Complete: 95 +SDComment: Timers may need adjustments. SDCategory: Pit of Saron EndScriptData */ @@ -34,26 +34,387 @@ enum SAY_TARGET_1 = -1658029, SAY_TARGET_2 = -1658030, SAY_TARGET_3 = -1658031, + SAY_OUTRO_1 = -1658035, EMOTE_KRICK_MINES = -1658032, EMOTE_ICK_POISON = -1658033, EMOTE_ICK_CHASING = -1658034, - SAY_OUTRO_1 = -1658035, - SAY_JAINA_KRICK_1 = -1658036, - SAY_SYLVANAS_KRICK_1 = -1658037, - SAY_OUTRO_2 = -1658038, - SAY_JAINA_KRICK_2 = -1658039, - SAY_SYLVANAS_KRICK_2 = -1658040, - SAY_OUTRO_3 = -1658041, - SAY_TYRANNUS_KRICK_1 = -1658042, - SAY_OUTRO_4 = -1658043, - SAY_TYRANNUS_KRICK_2 = -1658044, - SAY_JAINA_KRICK_3 = -1658045, - SAY_SYLVANAS_KRICK_3 = -1658046, + // ick spells + SPELL_POISON_NOVA = 68989, + SPELL_MIGHTY_KICK = 69021, + SPELL_PURSUIT = 68987, + SPELL_EXPLOSIVE_BARRAGE_ICK = 69263, + + // krick spells + SPELL_TOXIC_WASTE = 69024, + SPELL_SHADOW_BOLT = 69028, + SPELL_EXPLOSIVE_BARRAGE_KRICK = 69012, // Triggers 69015 every 2 sec + + NPC_EXPLODING_ORB = 36610, + + // exploding orb spells + // SPELL_EXPLOSIVE_BARRAGE_SUMMON = 69015, + SPELL_EXPLODING_ORB_VISUAL = 69017, + SPELL_AUTO_GROW_AND_SPEED_BOOST = 69020, + SPELL_EXPLOSIVE_BARRAGE_DMG = 69019, + SPELL_HASTY_GROW = 44851, // Orb explodes after the 15th stack + + MAX_HASTY_GROW_STACKS = 15, +}; + +static const float afOutroNpcSpawnLoc[4] = {777.2274f, 119.5521f, 510.0363f, 6.05f}; +static const float afTyrannusTeleLoc[4] = {841.01f, 196.245f, 573.964f, 4.46f}; + +/*###### +## boss_ick +######*/ + +struct MANGOS_DLL_DECL boss_ickAI : public ScriptedAI +{ + boss_ickAI(Creature *pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (instance_pit_of_saron*)pCreature->GetInstanceData(); + m_uiMountTimer = 3000; + Reset(); + } + + instance_pit_of_saron* m_pInstance; + uint32 m_uiMountTimer; + + uint32 m_uiPoisonNovaTimer; + uint32 m_uiPursueTimer; + uint32 m_uiMightKickTimer; + uint32 m_uiToxicWasteTimer; + uint32 m_uiShadowboltTimer; + uint32 m_uiExplosivBarrageTimer; + uint32 m_uiCooldownTimer; + + void Reset() override + { + m_uiPoisonNovaTimer = urand(20000, 25000); + m_uiPursueTimer = 20000; + m_uiMightKickTimer = 1000; + m_uiToxicWasteTimer = urand(3000, 5000); + m_uiShadowboltTimer = urand(5000, 7000); + m_uiExplosivBarrageTimer = urand(30000, 35000); + m_uiCooldownTimer = 0; + } + + void Aggro(Unit* pWho) override + { + if (m_pInstance) + { + m_pInstance->SetData(TYPE_KRICK, IN_PROGRESS); + + // Say aggro and also put Krick in combat + if (Creature* pKrick = m_pInstance->GetSingleCreatureFromStorage(NPC_KRICK)) + { + DoScriptText(SAY_AGGRO, pKrick); + pKrick->AI()->AttackStart(pWho); + } + } + } + + void KilledUnit(Unit* pVictim) + { + if (m_pInstance) + { + if (Creature* pKrick = m_pInstance->GetSingleCreatureFromStorage(NPC_KRICK)) + DoScriptText(urand(0, 1) ? SAY_SLAY_1 : SAY_SLAY_2, pKrick); + } + } + + void JustDied(Unit* pKiller) override + { + if (m_pInstance) + { + m_pInstance->SetData(TYPE_KRICK, DONE); + + if (Creature* pKrick = m_pInstance->GetSingleCreatureFromStorage(NPC_KRICK)) + { + DoScriptText(SAY_OUTRO_1, pKrick); + pKrick->AI()->EnterEvadeMode(); + + // Summon Jaina or Sylvanas for epilogue + pKrick->SummonCreature(m_pInstance->GetPlayerTeam() == HORDE ? NPC_SYLVANAS_PART1 : NPC_JAINA_PART1, + afOutroNpcSpawnLoc[0], afOutroNpcSpawnLoc[1], afOutroNpcSpawnLoc[2], afOutroNpcSpawnLoc[3], TEMPSUMMON_TIMED_DESPAWN, 2 * MINUTE * IN_MILLISECONDS); + } + + if (Creature* pTyrannus = m_pInstance->GetSingleCreatureFromStorage(NPC_TYRANNUS_INTRO)) + pTyrannus->NearTeleportTo(afTyrannusTeleLoc[0], afTyrannusTeleLoc[1], afTyrannusTeleLoc[2], afTyrannusTeleLoc[3]); + } + } + + void JustReachedHome() override + { + if (m_pInstance) + m_pInstance->SetData(TYPE_KRICK, FAIL); + } + + void UpdateAI(const uint32 uiDiff) override + { + if (!m_pInstance) + return; + + // He needs to be mounted manually, not by vehicle_accessories + if (m_uiMountTimer) + { + if (m_uiMountTimer <= uiDiff) + { + if (Creature* pKrick = m_pInstance->GetSingleCreatureFromStorage(NPC_KRICK)) + pKrick->CastSpell(m_creature, SPELL_RIDE_VEHICLE_HARDCODED, true); + + m_uiMountTimer = 0; + } + else + m_uiMountTimer -= uiDiff; + } + + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + // Cooldown timer - we need to block all Krick spell during some events + if (m_uiCooldownTimer) + { + if (m_uiCooldownTimer <= uiDiff) + m_uiCooldownTimer = 0; + else + m_uiCooldownTimer -= uiDiff; + + return; + } + + if (m_uiPoisonNovaTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_POISON_NOVA) == CAST_OK) + { + if (Creature* pKrick = m_pInstance->GetSingleCreatureFromStorage(NPC_KRICK)) + { + DoScriptText(SAY_ORDER_BLOW, pKrick); + DoScriptText(EMOTE_ICK_POISON, pKrick); + } + + m_uiCooldownTimer = 5000; + m_uiPoisonNovaTimer = urand(20000, 25000); + } + } + else + m_uiPoisonNovaTimer -= uiDiff; + + if (m_uiPursueTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_PURSUIT) == CAST_OK) + { + if (Creature* pKrick = m_pInstance->GetSingleCreatureFromStorage(NPC_KRICK)) + { + switch (urand(0, 2)) + { + case 0: DoScriptText(SAY_TARGET_1, pKrick); break; + case 1: DoScriptText(SAY_TARGET_2, pKrick); break; + case 2: DoScriptText(SAY_TARGET_3, pKrick); break; + } + } + + m_uiCooldownTimer = 17000; + m_uiPursueTimer = urand(50000, 70000); + } + } + else + m_uiPursueTimer -= uiDiff; + + if (m_uiMightKickTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_MIGHTY_KICK) == CAST_OK) + m_uiMightKickTimer = 10000; + } + else + m_uiMightKickTimer -= uiDiff; + + if (m_uiToxicWasteTimer < uiDiff) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (Creature* pKrick = m_pInstance->GetSingleCreatureFromStorage(NPC_KRICK)) + pKrick->CastSpell(pTarget, SPELL_TOXIC_WASTE, true); + + m_uiToxicWasteTimer = urand(3000, 5000); + } + } + else + m_uiToxicWasteTimer -= uiDiff; + + if (m_uiShadowboltTimer < uiDiff) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (Creature* pKrick = m_pInstance->GetSingleCreatureFromStorage(NPC_KRICK)) + pKrick->CastSpell(pTarget, SPELL_SHADOW_BOLT, true); + + m_uiShadowboltTimer = urand(4000, 8000); + } + } + else + m_uiShadowboltTimer -= uiDiff; + + if (m_uiExplosivBarrageTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_EXPLOSIVE_BARRAGE_ICK) == CAST_OK) + { + if (Creature* pKrick = m_pInstance->GetSingleCreatureFromStorage(NPC_KRICK)) + { + pKrick->CastSpell(pKrick, SPELL_EXPLOSIVE_BARRAGE_KRICK, true); + + DoScriptText(SAY_ORDER_STOP, pKrick); + DoScriptText(EMOTE_KRICK_MINES, pKrick); + } + + m_uiCooldownTimer = 20000; + m_uiExplosivBarrageTimer = urand(25000, 30000); + } + } + else + m_uiExplosivBarrageTimer -= uiDiff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_ick(Creature* pCreature) +{ + return new boss_ickAI (pCreature); +} + +/*###### +## boss_krick +######*/ + +struct MANGOS_DLL_DECL boss_krickAI : public ScriptedAI +{ + boss_krickAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; + + void Reset() override { } + + void EnterEvadeMode() override + { + m_creature->RemoveAllAurasOnEvade(); + m_creature->DeleteThreatList(); + m_creature->CombatStop(true); + m_creature->LoadCreatureAddon(true); + + m_creature->SetLootRecipient(NULL); + + Reset(); + + // Don't handle movement. Boss is on vehicle so he doesn't have to go anywhere. On epilogue he needs to stay in place + } + + void JustSummoned(Creature* pSummoned) override + { + switch (pSummoned->GetEntry()) + { + case NPC_SYLVANAS_PART1: + case NPC_JAINA_PART1: + { + float fX, fY, fZ; + pSummoned->SetWalk(false); + m_creature->GetContactPoint(pSummoned, fX, fY, fZ, 2 * INTERACTION_DISTANCE); + pSummoned->GetMotionMaster()->MovePoint(1, fX, fY, fZ); + break; + } + case NPC_EXPLODING_ORB: + pSummoned->CastSpell(pSummoned, SPELL_EXPLODING_ORB_VISUAL, true); + pSummoned->CastSpell(pSummoned, SPELL_AUTO_GROW_AND_SPEED_BOOST, true); + break; + } + } + + void SummonedMovementInform(Creature* pSummoned, uint32 uiMotionType, uint32 uiPointId) override + { + if (uiMotionType != POINT_MOTION_TYPE || !uiPointId) + return; + + if (m_pInstance) + m_pInstance->SetData(TYPE_KRICK, SPECIAL); + } + + void UpdateAI(const uint32 uiDiff) override + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + } }; +CreatureAI* GetAI_boss_krick(Creature* pCreature) +{ + return new boss_krickAI(pCreature); +} + +/*###### +## npc_exploding_orb +######*/ + +struct MANGOS_DLL_DECL npc_exploding_orbAI : public Scripted_NoMovementAI +{ + npc_exploding_orbAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { Reset(); } + + uint8 m_uiGrowCount; + + void Reset() override + { + m_uiGrowCount = 0; + } + + void AttackStart(Unit* pWho) override { } + void MoveInLineOfSight(Unit* pWho) override { } + + void SpellHit(Unit* pCaster, const SpellEntry* pSpell) override + { + if (pSpell->Id == SPELL_HASTY_GROW) + { + ++m_uiGrowCount; + + if (m_uiGrowCount == MAX_HASTY_GROW_STACKS) + { + if (DoCastSpellIfCan(m_creature, SPELL_EXPLOSIVE_BARRAGE_DMG) == CAST_OK) + { + m_creature->RemoveAllAuras(); + m_creature->ForcedDespawn(1000); + } + } + } + } + + void UpdateAI(const uint32 uiDiff) override { } +}; + +CreatureAI* GetAI_npc_exploding_orb(Creature* pCreature) +{ + return new npc_exploding_orbAI(pCreature); +} + void AddSC_boss_krick_and_ick() { + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_ick"; + pNewScript->GetAI = &GetAI_boss_ick; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "boss_krick"; + pNewScript->GetAI = &GetAI_boss_krick; + pNewScript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "npc_exploding_orb"; + pNewScript->GetAI = &GetAI_npc_exploding_orb; + pNewScript->RegisterSelf(); } diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/instance_pit_of_saron.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/instance_pit_of_saron.cpp index fe0e391d3..1e862061d 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/instance_pit_of_saron.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/instance_pit_of_saron.cpp @@ -24,7 +24,44 @@ EndScriptData */ #include "precompiled.h" #include "pit_of_saron.h" -instance_pit_of_saron::instance_pit_of_saron(Map* pMap) : ScriptedInstance(pMap) +enum +{ + // Ick and Krick outro + SAY_JAINA_KRICK_1 = -1658036, + SAY_SYLVANAS_KRICK_1 = -1658037, + SAY_OUTRO_2 = -1658038, + SAY_JAINA_KRICK_2 = -1658039, + SAY_SYLVANAS_KRICK_2 = -1658040, + SAY_OUTRO_3 = -1658041, + SAY_TYRANNUS_KRICK_1 = -1658042, + SAY_OUTRO_4 = -1658043, + SAY_TYRANNUS_KRICK_2 = -1658044, + SAY_JAINA_KRICK_3 = -1658045, + SAY_SYLVANAS_KRICK_3 = -1658046, + + // Ick and Krick outro spells + SPELL_STRANGULATING = 69413, + SPELL_KRICK_KILL_CREDIT = 71308, + SPELL_SUICIDE = 7, +}; + +static const DialogueEntryTwoSide aPoSDialogues[] = +{ + // Ick and Krick outro + {SAY_JAINA_KRICK_1, NPC_JAINA_PART1, SAY_SYLVANAS_KRICK_1, NPC_SYLVANAS_PART1, 6000}, + {SAY_OUTRO_2, NPC_KRICK, 0, 0, 16000}, + {SAY_JAINA_KRICK_2, NPC_JAINA_PART1, SAY_SYLVANAS_KRICK_2, NPC_SYLVANAS_PART1, 7000}, + {SAY_OUTRO_3, NPC_KRICK, 0, 0, 7000}, + {SAY_TYRANNUS_KRICK_1, NPC_TYRANNUS_INTRO, 0, 0, 3000}, + {SPELL_STRANGULATING, 0, 0, 0, 3000}, + {SAY_OUTRO_4, NPC_KRICK, 0, 0, 3000}, + {SAY_TYRANNUS_KRICK_2, NPC_TYRANNUS_INTRO, 0, 0, 11000}, + {SAY_JAINA_KRICK_3, NPC_JAINA_PART1, SAY_SYLVANAS_KRICK_3, NPC_SYLVANAS_PART1, 0}, + {0, 0, 0}, +}; + +instance_pit_of_saron::instance_pit_of_saron(Map* pMap) : ScriptedInstance(pMap), DialogueHelper(aPoSDialogues), + m_uiTeam(TEAM_NONE) { Initialize(); } @@ -32,6 +69,16 @@ instance_pit_of_saron::instance_pit_of_saron(Map* pMap) : ScriptedInstance(pMap) void instance_pit_of_saron::Initialize() { memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); + InitializeDialogueHelper(this); +} + +void instance_pit_of_saron::OnPlayerEnter(Player* pPlayer) +{ + if (!m_uiTeam) // very first player to enter + { + m_uiTeam = pPlayer->GetTeam(); + SetDialogueSide(m_uiTeam == ALLIANCE); + } } void instance_pit_of_saron::OnCreatureCreate(Creature* pCreature) @@ -39,6 +86,8 @@ void instance_pit_of_saron::OnCreatureCreate(Creature* pCreature) switch (pCreature->GetEntry()) { case NPC_TYRANNUS_INTRO: + case NPC_JAINA_PART1: + case NPC_SYLVANAS_PART1: case NPC_GARFROST: case NPC_KRICK: case NPC_ICK: @@ -78,6 +127,12 @@ void instance_pit_of_saron::SetData(uint32 uiType, uint32 uiData) case TYPE_KRICK: if (uiData == DONE && m_auiEncounter[TYPE_GARFROST] == DONE) DoUseDoorOrButton(GO_ICEWALL); + if (uiData == SPECIAL) + { + // Used just to start the epilogue + StartNextDialogueText(SAY_JAINA_KRICK_1); + return; + } m_auiEncounter[uiType] = uiData; break; case TYPE_TYRANNUS: @@ -131,6 +186,41 @@ uint32 instance_pit_of_saron::GetData(uint32 uiType) const return 0; } +void instance_pit_of_saron::JustDidDialogueStep(int32 iEntry) +{ + switch (iEntry) + { + case SAY_OUTRO_3: + // Move Tyrannus into position + if (Creature* pTyrannus = GetSingleCreatureFromStorage(NPC_TYRANNUS_INTRO)) + { + pTyrannus->SetWalk(false); + pTyrannus->GetMotionMaster()->MovePoint(0, 835.5887f, 139.4345f, 530.9526f); + } + break; + case SPELL_STRANGULATING: + if (Creature* pKrick = GetSingleCreatureFromStorage(NPC_KRICK)) + { + pKrick->CastSpell(pKrick, SPELL_STRANGULATING, true); + pKrick->SetLevitate(true); + pKrick->GetMotionMaster()->MovePoint(0, pKrick->GetPositionX(), pKrick->GetPositionY(), pKrick->GetPositionZ() + 5.0f); + } + break; + case SAY_TYRANNUS_KRICK_2: + if (Creature* pKrick = GetSingleCreatureFromStorage(NPC_KRICK)) + { + pKrick->CastSpell(pKrick, SPELL_KRICK_KILL_CREDIT, true); + pKrick->CastSpell(pKrick, SPELL_SUICIDE, true); + } + break; + case SAY_JAINA_KRICK_3: + // Note: location needs to be confirmed + if (Creature* pTyrannus = GetSingleCreatureFromStorage(NPC_TYRANNUS_INTRO)) + pTyrannus->GetMotionMaster()->MovePoint(0, 948.649f, 152.921f, 672.42f); + break; + } +} + InstanceData* GetInstanceData_instance_pit_of_saron(Map* pMap) { return new instance_pit_of_saron(pMap); diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/pit_of_saron.h b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/pit_of_saron.h index 0b3bff94f..ecebbc5fa 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/pit_of_saron.h +++ b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/pit_of_saron.h @@ -36,9 +36,12 @@ enum GO_ICEWALL = 201885, // open after gafrost/krick GO_HALLS_OF_REFLECT_PORT = 201848, // unlocked by jaina/sylvanas at last outro + + ACHIEV_CRIT_DOESNT_GO_ELEVEN = 12993, // Garfrost, achiev 4524 + ACHIEV_CRIT_DONT_LOOK_UP = 12994, // Gauntlet, achiev 4525 }; -class MANGOS_DLL_DECL instance_pit_of_saron : public ScriptedInstance +class MANGOS_DLL_DECL instance_pit_of_saron : public ScriptedInstance, private DialogueHelper { public: instance_pit_of_saron(Map* pMap); @@ -49,15 +52,25 @@ class MANGOS_DLL_DECL instance_pit_of_saron : public ScriptedInstance void OnCreatureCreate(Creature* pCreature) override; void OnObjectCreate(GameObject* pGo) override; + void OnPlayerEnter(Player* pPlayer) override; + void SetData(uint32 uiType, uint32 uiData) override; uint32 GetData(uint32 uiType) const override; + uint32 GetPlayerTeam() { return m_uiTeam; } + const char* Save() const override { return m_strInstData.c_str(); } void Load(const char* chrIn) override; + void Update(uint32 uiDiff) { DialogueUpdate(uiDiff); } + protected: + void JustDidDialogueStep(int32 iEntry) override; + uint32 m_auiEncounter[MAX_ENCOUNTER]; std::string m_strInstData; + + uint32 m_uiTeam; // Team of first entered player, used to set if Jaina or Silvana to spawn }; #endif diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 8283d50f0..9b7bddb11 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2831" + #define SD2_REVISION_NR "2832" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index e0e2c4b71..1b5334b47 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -710,6 +710,9 @@ UPDATE instance_template SET ScriptName='instance_forge_of_souls' WHERE map=632; /* PIT OF SARON */ UPDATE instance_template SET ScriptName='instance_pit_of_saron' WHERE map=658; UPDATE creature_template SET ScriptName='boss_forgemaster_garfrost' WHERE entry=36494; +UPDATE creature_template SET ScriptName='boss_krick' WHERE entry=36477; +UPDATE creature_template SET ScriptName='boss_ick' WHERE entry=36476; +UPDATE creature_template SET ScriptName='npc_exploding_orb' WHERE entry=36610; /* ICECROWN */ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 95f1c2243..5ba2f74b7 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -4344,18 +4344,18 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1658033,'%s begins to unleash a toxic poison cloud!',0,3,0,0,'ick EMOTE_ICK_POISON'), (-1658034,'%s is chasing you!',0,5,0,0,'ick EMOTE_ICK_CHASING'), -- TODO emote type? -(-1658035,'Wait! Stop! Don\'t kill me, please! I\'ll tell you everything!',16934,1,0,0,'krick SAY_OUTRO_1'), +(-1658035,'Wait! Stop! Don\'t kill me, please! I\'ll tell you everything!',16934,1,0,431,'krick SAY_OUTRO_1'), (-1658036,'I\'m not so naive as to believe your appeal for clemency, but I will listen.',16611,1,0,0,'jaina SAY_JAINA_KRICK_1'), -(-1658037,'Why should the Banshee Queen spare your miserable life?',17033,1,0,0,'sylvanas SAY_SYLVANAS_KRICK_1'), +(-1658037,'Why should the Banshee Queen spare your miserable life?',17033,1,0,396,'sylvanas SAY_SYLVANAS_KRICK_1'), (-1658038,'What you seek is in the master\'s lair, but you must destroy Tyrannus to gain entry. Within the Halls of Reflection you will find Frostmourne. It... it holds the truth.',16935,1,0,0,'krick SAY_OUTRO_2'), (-1658039,'Frostmourne lies unguarded? Impossible!',16612,1,0,0,'jaina SAY_JAINA_KRICK_2'), -(-1658040,'Frostmourne? The Lich King is never without his blade! If you are lying to me...',17034,1,0,0,'sylvanas SAY_SYLVANAS_KRICK_2'), +(-1658040,'Frostmourne? The Lich King is never without his blade! If you are lying to me...',17034,1,0,15,'sylvanas SAY_SYLVANAS_KRICK_2'), (-1658041,'I swear it is true! Please, don\'t kill me!!',16936,1,0,0,'krick SAY_OUTRO_3'), (-1658042,'Worthless gnat! Death is all that awaits you!',16753,1,0,0,'tyrannus SAY_TYRANNUS_KRICK_1'), (-1658043,'Urg... no!!',16937,1,0,0,'krick SAY_OUTRO_4'), (-1658044,'Do not think that I shall permit you entry into my master\'s sanctum so easily. Pursue me if you dare.',16754,1,0,0,'tyrannus SAY_TYRANNUS_KRICK_2'), (-1658045,'What a cruel end. Come, heroes. We must see if the gnome\'s story is true. If we can separate Arthas from Frostmourne, we might have a chance at stopping him.',16613,1,0,0,'jaina SAY_JAINA_KRICK_3'), -(-1658046,'A fitting end for a traitor. Come, we must free the slaves and see what is within the Lich King\'s chamber for ourselves.',17035,1,0,0,'sylvanas SAY_SYLVANAS_KRICK_3'), +(-1658046,'A fitting end for a traitor. Come, we must free the slaves and see what is within the Lich King\'s chamber for ourselves.',17035,1,0,396,'sylvanas SAY_SYLVANAS_KRICK_3'), (-1658047,'Your pursuit shall be in vain, adventurers, for the Lich King has placed an army of undead at my command! Behold!',16755,1,0,0,'tyrannus SAY_TYRANNUS_AMBUSH_1'), (-1658048,'Persistent whelps! You will not reach the entrance of my lord\'s lair! Soldiers, destroy them!',16756,1,0,0,'tyrannus SAY_TYRANNUS_AMBUSH_2'), diff --git a/sql/updates/r2832_mangos.sql b/sql/updates/r2832_mangos.sql new file mode 100644 index 000000000..7fe65fe97 --- /dev/null +++ b/sql/updates/r2832_mangos.sql @@ -0,0 +1,3 @@ +UPDATE creature_template SET ScriptName='boss_krick' WHERE entry=36477; +UPDATE creature_template SET ScriptName='boss_ick' WHERE entry=36476; +UPDATE creature_template SET ScriptName='npc_exploding_orb' WHERE entry=36610; diff --git a/sql/updates/r2832_scriptdev2.sql b/sql/updates/r2832_scriptdev2.sql new file mode 100644 index 000000000..25534c1fa --- /dev/null +++ b/sql/updates/r2832_scriptdev2.sql @@ -0,0 +1,3 @@ +UPDATE script_texts SET emote=396 WHERE entry IN (-1658037, -1658046); +UPDATE script_texts SET emote=15 WHERE entry IN (-1658040); +UPDATE script_texts SET emote=431 WHERE entry IN (-1658035); From 63266bbde48c0bf0d8baca56581d65d605f261bd Mon Sep 17 00:00:00 2001 From: Xfurry Date: Fri, 29 Mar 2013 00:55:24 +0200 Subject: [PATCH 0834/1172] [2833] Implement achievement 4524 - Doesn't Go to Eleven --- .../boss_forgemaster_garfrost.cpp | 54 ++++++++++++++++++- .../pit_of_saron/instance_pit_of_saron.cpp | 25 +++++++++ .../frozen_halls/pit_of_saron/pit_of_saron.h | 9 ++++ sd2_revision_nr.h | 2 +- 4 files changed, 87 insertions(+), 3 deletions(-) diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_forgemaster_garfrost.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_forgemaster_garfrost.cpp index d1887bb94..5af646e38 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_forgemaster_garfrost.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_forgemaster_garfrost.cpp @@ -39,6 +39,8 @@ enum EMOTE_DEEP_FREEZE = -1658023, SPELL_PERMAFROST = 70326, + SPELL_PERMAFROST_AURA = 68786, + SPELL_PERMAFROST_AURA_H = 70336, SPELL_THROW_SARONITE = 68788, SPELL_THUNDERING_STOMP = 68771, SPELL_FORGE_FROZEN_BLADE = 68774, @@ -46,6 +48,8 @@ enum SPELL_FORGE_FROSTBORN_MACE = 68785, SPELL_DEEP_FREEZE = 70381, + MAX_PERMAFROST_STACK = 10, // the max allowed stacks for the achiev to pass + PHASE_NO_ENCHANTMENT = 1, PHASE_BLADE_ENCHANTMENT = 2, PHASE_MACE_ENCHANTMENT = 3, @@ -62,19 +66,23 @@ struct MANGOS_DLL_DECL boss_forgemaster_garfrostAI : public ScriptedAI { boss_forgemaster_garfrostAI(Creature* pCreature) : ScriptedAI(pCreature) { - m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_pInstance = (instance_pit_of_saron*)pCreature->GetInstanceData(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); Reset(); } - ScriptedInstance* m_pInstance; + instance_pit_of_saron* m_pInstance; + bool m_bIsRegularMode; uint32 m_uiThrowSaroniteTimer; uint32 m_uiPhase; uint32 m_uiChillingWaveTimer; uint32 m_uiDeepFreezeTimer; + uint32 m_uiCheckPermafrostTimer; void Reset() override { + m_uiCheckPermafrostTimer = 2000; m_uiThrowSaroniteTimer = 13000; m_uiChillingWaveTimer = 10000; m_uiDeepFreezeTimer = 10000; @@ -86,11 +94,17 @@ struct MANGOS_DLL_DECL boss_forgemaster_garfrostAI : public ScriptedAI { DoScriptText(SAY_AGGRO, m_creature, pWho); DoCastSpellIfCan(m_creature, SPELL_PERMAFROST); + + if (m_pInstance) + m_pInstance->SetData(TYPE_GARFROST, IN_PROGRESS); } void JustDied(Unit* pKiller) override { DoScriptText(SAY_DEATH, m_creature, pKiller); + + if (m_pInstance) + m_pInstance->SetData(TYPE_GARFROST, DONE); } void KilledUnit(Unit* /*pVictim*/) override @@ -98,6 +112,12 @@ struct MANGOS_DLL_DECL boss_forgemaster_garfrostAI : public ScriptedAI DoScriptText(SAY_SLAY_1, m_creature); } + void JustReachedHome() override + { + if (m_pInstance) + m_pInstance->SetData(TYPE_GARFROST, FAIL); + } + void MovementInform(uint32 uiMotionType, uint32 uiPointId) override { if (uiMotionType != EFFECT_MOTION_TYPE) @@ -126,6 +146,36 @@ struct MANGOS_DLL_DECL boss_forgemaster_garfrostAI : public ScriptedAI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; + if (m_uiCheckPermafrostTimer) + { + if (m_uiCheckPermafrostTimer <= uiDiff) + { + ThreatList playerList = m_creature->getThreatManager().getThreatList(); + for (ThreatList::const_iterator itr = playerList.begin(); itr != playerList.end(); ++itr) + { + if (Player* pTarget = m_creature->GetMap()->GetPlayer((*itr)->getUnitGuid())) + { + Aura* pAuraIntenseCold = pTarget->GetAura(m_bIsRegularMode ? SPELL_PERMAFROST_AURA : SPELL_PERMAFROST_AURA_H, EFFECT_INDEX_2); + + if (pAuraIntenseCold) + { + if (pAuraIntenseCold->GetStackAmount() > MAX_PERMAFROST_STACK) + { + if (m_pInstance) + m_pInstance->SetSpecialAchievementCriteria(TYPE_ACHIEV_DOESNT_GO_ELEVEN, false); + + m_uiCheckPermafrostTimer = 0; + return; + } + } + } + } + m_uiCheckPermafrostTimer = 1000; + } + else + m_uiCheckPermafrostTimer -= uiDiff; + } + // Do nothing more while moving if (m_uiPhase == PHASE_MOVEMENT) return; diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/instance_pit_of_saron.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/instance_pit_of_saron.cpp index 1e862061d..0c8ec361c 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/instance_pit_of_saron.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/instance_pit_of_saron.cpp @@ -70,6 +70,9 @@ void instance_pit_of_saron::Initialize() { memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); InitializeDialogueHelper(this); + + for (uint8 i = 0; i < MAX_SPECIAL_ACHIEV_CRITS; ++i) + m_abAchievCriteria[i] = false; } void instance_pit_of_saron::OnPlayerEnter(Player* pPlayer) @@ -122,6 +125,8 @@ void instance_pit_of_saron::SetData(uint32 uiType, uint32 uiData) case TYPE_GARFROST: if (uiData == DONE && m_auiEncounter[TYPE_KRICK] == DONE) DoUseDoorOrButton(GO_ICEWALL); + if (uiData == IN_PROGRESS) + SetSpecialAchievementCriteria(TYPE_ACHIEV_DOESNT_GO_ELEVEN, true); m_auiEncounter[uiType] = uiData; break; case TYPE_KRICK: @@ -186,6 +191,26 @@ uint32 instance_pit_of_saron::GetData(uint32 uiType) const return 0; } +void instance_pit_of_saron::SetSpecialAchievementCriteria(uint32 uiType, bool bIsMet) +{ + if (uiType < MAX_SPECIAL_ACHIEV_CRITS) + m_abAchievCriteria[uiType] = bIsMet; +} + +bool instance_pit_of_saron::CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/) const +{ + switch (uiCriteriaId) + { + case ACHIEV_CRIT_DOESNT_GO_ELEVEN: + return m_abAchievCriteria[TYPE_ACHIEV_DOESNT_GO_ELEVEN]; + case ACHIEV_CRIT_DONT_LOOK_UP: + return m_abAchievCriteria[TYPE_ACHIEV_DONT_LOOK_UP]; + + default: + return false; + } +} + void instance_pit_of_saron::JustDidDialogueStep(int32 iEntry) { switch (iEntry) diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/pit_of_saron.h b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/pit_of_saron.h index ecebbc5fa..2ceaca2f3 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/pit_of_saron.h +++ b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/pit_of_saron.h @@ -8,11 +8,15 @@ enum { MAX_ENCOUNTER = 3, + MAX_SPECIAL_ACHIEV_CRITS = 2, TYPE_GARFROST = 0, TYPE_KRICK = 1, TYPE_TYRANNUS = 2, + TYPE_ACHIEV_DOESNT_GO_ELEVEN = 0, + TYPE_ACHIEV_DONT_LOOK_UP = 1, + NPC_TYRANNUS_INTRO = 36794, NPC_GARFROST = 36494, NPC_KRICK = 36477, @@ -59,6 +63,9 @@ class MANGOS_DLL_DECL instance_pit_of_saron : public ScriptedInstance, private D uint32 GetPlayerTeam() { return m_uiTeam; } + void SetSpecialAchievementCriteria(uint32 uiType, bool bIsMet); + bool CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/) const override; + const char* Save() const override { return m_strInstData.c_str(); } void Load(const char* chrIn) override; @@ -70,6 +77,8 @@ class MANGOS_DLL_DECL instance_pit_of_saron : public ScriptedInstance, private D uint32 m_auiEncounter[MAX_ENCOUNTER]; std::string m_strInstData; + bool m_abAchievCriteria[MAX_SPECIAL_ACHIEV_CRITS]; + uint32 m_uiTeam; // Team of first entered player, used to set if Jaina or Silvana to spawn }; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 9b7bddb11..8af97e791 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2832" + #define SD2_REVISION_NR "2833" #endif // __SD2_REVISION_NR_H__ From 5cb84c8610ece9518d1a1bb065c88a4980ef32ae Mon Sep 17 00:00:00 2001 From: Xfurry Date: Fri, 29 Mar 2013 01:29:24 +0200 Subject: [PATCH 0835/1172] [2834] Optimize some achievement checks --- .../boss_forgemaster_garfrost.cpp | 6 ++-- .../nexus/nexus/boss_keristrasza.cpp | 34 +++++++++++-------- sd2_revision_nr.h | 2 +- 3 files changed, 23 insertions(+), 19 deletions(-) diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_forgemaster_garfrost.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_forgemaster_garfrost.cpp index 5af646e38..bc785e8c7 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_forgemaster_garfrost.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_forgemaster_garfrost.cpp @@ -39,7 +39,6 @@ enum EMOTE_DEEP_FREEZE = -1658023, SPELL_PERMAFROST = 70326, - SPELL_PERMAFROST_AURA = 68786, SPELL_PERMAFROST_AURA_H = 70336, SPELL_THROW_SARONITE = 68788, SPELL_THUNDERING_STOMP = 68771, @@ -146,7 +145,8 @@ struct MANGOS_DLL_DECL boss_forgemaster_garfrostAI : public ScriptedAI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - if (m_uiCheckPermafrostTimer) + // This needs to be checked only on heroic + if (!m_bIsRegularMode && m_uiCheckPermafrostTimer) { if (m_uiCheckPermafrostTimer <= uiDiff) { @@ -155,7 +155,7 @@ struct MANGOS_DLL_DECL boss_forgemaster_garfrostAI : public ScriptedAI { if (Player* pTarget = m_creature->GetMap()->GetPlayer((*itr)->getUnitGuid())) { - Aura* pAuraIntenseCold = pTarget->GetAura(m_bIsRegularMode ? SPELL_PERMAFROST_AURA : SPELL_PERMAFROST_AURA_H, EFFECT_INDEX_2); + Aura* pAuraIntenseCold = pTarget->GetAura(SPELL_PERMAFROST_AURA_H, EFFECT_INDEX_2); if (pAuraIntenseCold) { diff --git a/scripts/northrend/nexus/nexus/boss_keristrasza.cpp b/scripts/northrend/nexus/nexus/boss_keristrasza.cpp index 542107742..4f9e19076 100644 --- a/scripts/northrend/nexus/nexus/boss_keristrasza.cpp +++ b/scripts/northrend/nexus/nexus/boss_keristrasza.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: Boss_Keristrasza -SD%Complete: 65% -SDComment: timers tuning, add achievement +SD%Complete: 95% +SDComment: timers tuning SDCategory: Nexus EndScriptData */ @@ -122,29 +122,33 @@ struct MANGOS_DLL_DECL boss_keristraszaAI : public ScriptedAI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - if (uiCheckIntenseColdTimer < uiDiff) + // This needs to be checked only on heroic + if (!m_bIsRegularMode) { - ThreatList playerList = m_creature->getThreatManager().getThreatList(); - for (ThreatList::const_iterator itr = playerList.begin(); itr != playerList.end(); ++itr) + if (uiCheckIntenseColdTimer < uiDiff) { - if (Player* pTarget = m_creature->GetMap()->GetPlayer((*itr)->getUnitGuid())) + ThreatList playerList = m_creature->getThreatManager().getThreatList(); + for (ThreatList::const_iterator itr = playerList.begin(); itr != playerList.end(); ++itr) { - Aura* pAuraIntenseCold = pTarget->GetAura(SPELL_INTENSE_COLD_AURA, EFFECT_INDEX_0); - - if (pAuraIntenseCold) + if (Player* pTarget = m_creature->GetMap()->GetPlayer((*itr)->getUnitGuid())) { - if (pAuraIntenseCold->GetStackAmount() > MAX_INTENSE_COLD_STACK) + Aura* pAuraIntenseCold = pTarget->GetAura(SPELL_INTENSE_COLD_AURA, EFFECT_INDEX_0); + + if (pAuraIntenseCold) { - if (m_pInstance) - m_pInstance->SetData(TYPE_INTENSE_COLD_FAILED, pTarget->GetGUIDLow()); + if (pAuraIntenseCold->GetStackAmount() > MAX_INTENSE_COLD_STACK) + { + if (m_pInstance) + m_pInstance->SetData(TYPE_INTENSE_COLD_FAILED, pTarget->GetGUIDLow()); + } } } } + uiCheckIntenseColdTimer = 1000; } - uiCheckIntenseColdTimer = 1000; + else + uiCheckIntenseColdTimer -= uiDiff; } - else - uiCheckIntenseColdTimer -= uiDiff; if (!m_bIsEnraged && m_creature->GetHealthPercent() < 25.0f) { diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 8af97e791..9da8074b3 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2833" + #define SD2_REVISION_NR "2834" #endif // __SD2_REVISION_NR_H__ From 2983413ff65242f89f5a82b94b446f3a9c56eadb Mon Sep 17 00:00:00 2001 From: Xfurry Date: Fri, 29 Mar 2013 19:32:09 +0200 Subject: [PATCH 0836/1172] [2835] Implement intro support for Pit of Saron --- .../pit_of_saron/instance_pit_of_saron.cpp | 63 ++++++++++++++++++- .../pit_of_saron/pit_of_saron.cpp | 15 ----- .../frozen_halls/pit_of_saron/pit_of_saron.h | 26 +++++++- sd2_revision_nr.h | 2 +- sql/scriptdev2_script_full.sql | 6 +- sql/updates/r2835_scriptdev2.sql | 1 + 6 files changed, 91 insertions(+), 22 deletions(-) create mode 100644 sql/updates/r2835_scriptdev2.sql diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/instance_pit_of_saron.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/instance_pit_of_saron.cpp index 0c8ec361c..3d52bc4fb 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/instance_pit_of_saron.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/instance_pit_of_saron.cpp @@ -26,6 +26,26 @@ EndScriptData */ enum { + // Intro + SAY_TYRANNUS_INTRO_1 = -1658001, + SAY_JAINA_INTRO_1 = -1658002, + SAY_SYLVANAS_INTRO_1 = -1658003, + SAY_TYRANNUS_INTRO_2 = -1658004, + SAY_TYRANNUS_INTRO_3 = -1658005, + SAY_JAINA_INTRO_2 = -1658006, + SAY_SYLVANAS_INTRO_2 = -1658007, + SAY_TYRANNUS_INTRO_4 = -1658008, + SAY_JAINA_INTRO_3 = -1658009, + SAY_JAINA_INTRO_4 = -1658010, + SAY_SYLVANAS_INTRO_3 = -1658011, + SAY_JAINA_INTRO_5 = -1658012, + SAY_SYLVANAS_INTRO_4 = -1658013, + + // Intro spells + SPELL_NECROMATIC_POWER = 69347, + SPELL_FEIGN_DEATH = 28728, + SPELL_RAISE_DEAD = 69350, + // Ick and Krick outro SAY_JAINA_KRICK_1 = -1658036, SAY_SYLVANAS_KRICK_1 = -1658037, @@ -47,6 +67,19 @@ enum static const DialogueEntryTwoSide aPoSDialogues[] = { + // Instance intro + {NPC_TYRANNUS_INTRO, 0, 0, 0, 4000}, + {SAY_TYRANNUS_INTRO_1, NPC_TYRANNUS_INTRO, 0, 0, 6000}, + {SAY_TYRANNUS_INTRO_2, NPC_TYRANNUS_INTRO, 0, 0, 12000}, + {SAY_JAINA_INTRO_1, NPC_JAINA_PART1, SAY_SYLVANAS_INTRO_1, NPC_SYLVANAS_PART1, 5000}, // ToDo: move the soldiers to attack position + {SAY_TYRANNUS_INTRO_3, NPC_TYRANNUS_INTRO, 0, 0, 5000}, + {SPELL_NECROMATIC_POWER, 0, 0, 0, 3000}, + {SAY_JAINA_INTRO_2, NPC_JAINA_PART1, SAY_SYLVANAS_INTRO_2, NPC_SYLVANAS_PART1, 4000}, + {SAY_TYRANNUS_INTRO_4, NPC_TYRANNUS_INTRO, 0, 0, 4000}, // ToDo: send the solderis back to fight as zombies + {SAY_JAINA_INTRO_3, NPC_JAINA_PART1, 0, 0, 6000}, + {SAY_JAINA_INTRO_4, NPC_JAINA_PART1, SAY_SYLVANAS_INTRO_3, NPC_SYLVANAS_PART1, 5000}, + {SAY_JAINA_INTRO_5, NPC_JAINA_PART1, SAY_SYLVANAS_INTRO_4, NPC_SYLVANAS_PART1, 0}, + // Ick and Krick outro {SAY_JAINA_KRICK_1, NPC_JAINA_PART1, SAY_SYLVANAS_KRICK_1, NPC_SYLVANAS_PART1, 6000}, {SAY_OUTRO_2, NPC_KRICK, 0, 0, 16000}, @@ -81,6 +114,29 @@ void instance_pit_of_saron::OnPlayerEnter(Player* pPlayer) { m_uiTeam = pPlayer->GetTeam(); SetDialogueSide(m_uiTeam == ALLIANCE); + ProcessIntroEventNpcs(pPlayer); + StartNextDialogueText(NPC_TYRANNUS_INTRO); + } +} + +void instance_pit_of_saron::ProcessIntroEventNpcs(Player* pPlayer) +{ + if (!pPlayer) + return; + + if (m_auiEncounter[0] != DONE && m_auiEncounter[1] != DONE) + { + // Spawn Begin Mobs + for (uint8 i = 0; i < countof(aEventBeginLocations); ++i) + { + // ToDo: maybe despawn the intro npcs when the other events occur + if (Creature* pSummon = pPlayer->SummonCreature(m_uiTeam == HORDE ? aEventBeginLocations[i].uiEntryHorde : aEventBeginLocations[i].uiEntryAlliance, + aEventBeginLocations[i].fX, aEventBeginLocations[i].fY, aEventBeginLocations[i].fZ, aEventBeginLocations[i].fO, TEMPSUMMON_TIMED_DESPAWN, 24 * HOUR * IN_MILLISECONDS)) + { + pSummon->SetWalk(false); + pSummon->GetMotionMaster()->MovePoint(0, aEventBeginLocations[i].fMoveX, aEventBeginLocations[i].fMoveY, aEventBeginLocations[i].fMoveZ); + } + } } } @@ -215,6 +271,10 @@ void instance_pit_of_saron::JustDidDialogueStep(int32 iEntry) { switch (iEntry) { + case SPELL_NECROMATIC_POWER: + if (Creature* pTyrannus = GetSingleCreatureFromStorage(NPC_TYRANNUS_INTRO)) + pTyrannus->CastSpell(pTyrannus, SPELL_NECROMATIC_POWER, true); + break; case SAY_OUTRO_3: // Move Tyrannus into position if (Creature* pTyrannus = GetSingleCreatureFromStorage(NPC_TYRANNUS_INTRO)) @@ -238,10 +298,11 @@ void instance_pit_of_saron::JustDidDialogueStep(int32 iEntry) pKrick->CastSpell(pKrick, SPELL_SUICIDE, true); } break; + case SAY_JAINA_INTRO_3: case SAY_JAINA_KRICK_3: // Note: location needs to be confirmed if (Creature* pTyrannus = GetSingleCreatureFromStorage(NPC_TYRANNUS_INTRO)) - pTyrannus->GetMotionMaster()->MovePoint(0, 948.649f, 152.921f, 672.42f); + pTyrannus->GetMotionMaster()->MovePoint(0, afTyrannusHidePos[0], afTyrannusHidePos[1], afTyrannusHidePos[2]); break; } } diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/pit_of_saron.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/pit_of_saron.cpp index 3480a59ae..ed8c0a2f5 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/pit_of_saron.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/pit_of_saron.cpp @@ -29,21 +29,6 @@ EndContentData */ enum { - // Intro - SAY_TYRANNUS_INTRO_1 = -1658001, - SAY_JAINA_INTRO_1 = -1658002, - SAY_SYLVANAS_INTRO_1 = -1658003, - SAY_TYRANNUS_INTRO_2 = -1658004, - SAY_TYRANNUS_INTRO_3 = -1658005, - SAY_JAINA_INTRO_2 = -1658006, - SAY_SYLVANAS_INTRO_2 = -1658007, - SAY_TYRANNUS_INTRO_4 = -1658008, - SAY_JAINA_INTRO_3 = -1658009, - SAY_JAINA_INTRO_4 = -1658010, - SAY_SYLVANAS_INTRO_3 = -1658011, - SAY_JAINA_INTRO_5 = -1658012, - SAY_SYLVANAS_INTRO_4 = -1658013, - // Ambush and Gauntlet SAY_TYRANNUS_AMBUSH_1 = -1658047, SAY_TYRANNUS_AMBUSH_2 = -1658048, diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/pit_of_saron.h b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/pit_of_saron.h index 2ceaca2f3..f66153e4b 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/pit_of_saron.h +++ b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/pit_of_saron.h @@ -31,12 +31,15 @@ enum NPC_JAINA_PART2 = 38188, NPC_KILARA = 37583, NPC_ELANDRA = 37774, - NPC_KORALEN = 37779, - NPC_KORLAEN = 37582, + NPC_LORALEN = 37779, + NPC_KORELN = 37582, NPC_CHAMPION_1_HORDE = 37584, NPC_CHAMPION_2_HORDE = 37587, + NPC_CHAMPION_3_HORDE = 37588, NPC_CHAMPION_1_ALLIANCE = 37496, NPC_CHAMPION_2_ALLIANCE = 37497, + NPC_CHAMPION_3_ALLIANCE = 37498, + NPC_CORRUPTED_CHAMPION = 36796, GO_ICEWALL = 201885, // open after gafrost/krick GO_HALLS_OF_REFLECT_PORT = 201848, // unlocked by jaina/sylvanas at last outro @@ -45,6 +48,24 @@ enum ACHIEV_CRIT_DONT_LOOK_UP = 12994, // Gauntlet, achiev 4525 }; +struct EventNpcLocations +{ + uint32 uiEntryHorde, uiEntryAlliance; + float fX, fY, fZ, fO; + float fMoveX, fMoveY, fMoveZ; +}; + +const EventNpcLocations aEventBeginLocations[3] = +{ + {NPC_SYLVANAS_PART1, NPC_JAINA_PART1, 430.3012f, 212.204f, 530.1146f, 0.042f, 440.7882f, 213.7587f, 528.7103f}, + {NPC_KILARA, NPC_ELANDRA, 429.7142f, 212.3021f, 530.2822f, 0.14f, 438.9462f, 215.4271f, 528.7087f}, + {NPC_LORALEN, NPC_KORELN, 429.5675f, 211.7748f, 530.3246f, 5.972f, 438.5052f, 211.5399f, 528.7085f}, + // ToDo: add the soldiers here when proper waypoint movement is supported +}; + +// Note: this location needs to be confirmed +static const float afTyrannusHidePos[3] = {948.649f, 152.921f, 672.42f}; + class MANGOS_DLL_DECL instance_pit_of_saron : public ScriptedInstance, private DialogueHelper { public: @@ -73,6 +94,7 @@ class MANGOS_DLL_DECL instance_pit_of_saron : public ScriptedInstance, private D protected: void JustDidDialogueStep(int32 iEntry) override; + void ProcessIntroEventNpcs(Player* pPlayer); uint32 m_auiEncounter[MAX_ENCOUNTER]; std::string m_strInstData; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 9da8074b3..59f8b4909 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2834" + #define SD2_REVISION_NR "2835" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 5ba2f74b7..6b61a3744 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -4313,11 +4313,11 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1658004,'Hrmph, fodder. Not even fit to labor in the quarry. Relish these final moments for soon you will be nothing more than mindless undead.',16748,1,0,0,'tyrannus SAY_TYRANNUS_INTRO_2'), (-1658005,'Your last waking memory will be of agonizing pain.',16749,1,0,0,'tyrannus SAY_TYRANNUS_INTRO_3'), (-1658006,'No! You monster!',16627,1,0,0,'jaina SAY_JAINA_INTRO_2'), -(-1658007,'Pathetic weaklings!',17046,1,0,0,'sylvanas SAY_SYLVANAS_INTRO_2'), +(-1658007,'Pathetic weaklings!',17046,1,0,1,'sylvanas SAY_SYLVANAS_INTRO_2'), (-1658008,'Minions, destroy these interlopers!',16751,1,0,0,'tyrannus SAY_TYRANNUS_INTRO_4'), (-1658009,'I do what I must. Please forgive me, noble soldiers.',16628,1,0,0,'jaina SAY_JAINA_INTRO_3'), -(-1658010,'You will have to make your way across this quarry on your own.',16629,0,0,0,'jaina SAY_JAINA_INTRO_4'), -(-1658011,'You will have to battle your way through this cesspit on your own.',17047,0,0,0,'sylvanas SAY_SYLVANAS_INTRO_3'), +(-1658010,'You will have to make your way across this quarry on your own.',16629,0,0,1,'jaina SAY_JAINA_INTRO_4'), +(-1658011,'You will have to battle your way through this cesspit on your own.',17047,0,0,1,'sylvanas SAY_SYLVANAS_INTRO_3'), (-1658012,'Free any Alliance slaves that you come across. We will most certainly need their assistance in battling Tyrannus. I will gather reinforcements and join you on the other side of the quarry.',16630,0,0,0,'jaina SAY_JAINA_INTRO_5'), (-1658013,'Free any Horde slaves that you come across. We will most certainly need their assistance in battling Tyrannus. I will gather reinforcements and join you on the other side of the quarry.',17048,0,0,0,'sylvanas SAY_SYLVANAS_INTRO_4'), diff --git a/sql/updates/r2835_scriptdev2.sql b/sql/updates/r2835_scriptdev2.sql new file mode 100644 index 000000000..f82b94b60 --- /dev/null +++ b/sql/updates/r2835_scriptdev2.sql @@ -0,0 +1 @@ +UPDATE script_texts SET emote=1 WHERE entry IN (-1658007,-1658010,-1658011); From 66b5c32aa876392a2585da3dbcbaf553e22891df Mon Sep 17 00:00:00 2001 From: Xfurry Date: Fri, 29 Mar 2013 23:12:31 +0200 Subject: [PATCH 0837/1172] [2836] Implement outro for Garfrost - Pit of Saron --- .../boss_forgemaster_garfrost.cpp | 28 +++++++++++++++++-- .../pit_of_saron/instance_pit_of_saron.cpp | 18 ++++++++++-- .../frozen_halls/pit_of_saron/pit_of_saron.h | 14 ++++++++-- sd2_revision_nr.h | 2 +- sql/scriptdev2_script_full.sql | 4 +-- sql/updates/r2836_scriptdev2.sql | 1 + 6 files changed, 56 insertions(+), 11 deletions(-) create mode 100644 sql/updates/r2836_scriptdev2.sql diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_forgemaster_garfrost.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_forgemaster_garfrost.cpp index bc785e8c7..410fe1d43 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_forgemaster_garfrost.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_forgemaster_garfrost.cpp @@ -32,8 +32,6 @@ enum SAY_DEATH = -1658017, SAY_FORGE_1 = -1658018, SAY_FORGE_2 = -1658019, - SAY_TYRANNUS_GARFROST = -1658020, - SAY_GENERAL_GARFROST = -1658021, EMOTE_THROW_SARONITE = -1658022, EMOTE_DEEP_FREEZE = -1658023, @@ -61,6 +59,8 @@ static const float aGarfrostMoveLocs[2][3] = {719.785f, -230.227f, 527.033f}, }; +static const float afOutroNpcSpawnLoc[4] = {695.0146f, -123.7532f, 515.3067f, 4.59f}; + struct MANGOS_DLL_DECL boss_forgemaster_garfrostAI : public ScriptedAI { boss_forgemaster_garfrostAI(Creature* pCreature) : ScriptedAI(pCreature) @@ -103,7 +103,15 @@ struct MANGOS_DLL_DECL boss_forgemaster_garfrostAI : public ScriptedAI DoScriptText(SAY_DEATH, m_creature, pKiller); if (m_pInstance) + { m_pInstance->SetData(TYPE_GARFROST, DONE); + + // Summon Ironskull or Victus for outro + m_creature->SummonCreature(m_pInstance->GetPlayerTeam() == HORDE ? NPC_IRONSKULL_PART1 : NPC_VICTUS_PART1, + afOutroNpcSpawnLoc[0], afOutroNpcSpawnLoc[1], afOutroNpcSpawnLoc[2], afOutroNpcSpawnLoc[3], TEMPSUMMON_TIMED_DESPAWN, 2 * MINUTE * IN_MILLISECONDS); + + // ToDo: handle the other npcs movement + } } void KilledUnit(Unit* /*pVictim*/) override @@ -117,6 +125,22 @@ struct MANGOS_DLL_DECL boss_forgemaster_garfrostAI : public ScriptedAI m_pInstance->SetData(TYPE_GARFROST, FAIL); } + void JustSummoned(Creature* pSummoned) override + { + switch (pSummoned->GetEntry()) + { + case NPC_IRONSKULL_PART1: + case NPC_VICTUS_PART1: + { + float fX, fY, fZ; + pSummoned->SetWalk(false); + m_creature->GetContactPoint(pSummoned, fX, fY, fZ, 4 * INTERACTION_DISTANCE); + pSummoned->GetMotionMaster()->MovePoint(1, fX, fY, fZ); + break; + } + } + } + void MovementInform(uint32 uiMotionType, uint32 uiPointId) override { if (uiMotionType != EFFECT_MOTION_TYPE) diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/instance_pit_of_saron.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/instance_pit_of_saron.cpp index 3d52bc4fb..5c8b5c1cb 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/instance_pit_of_saron.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/instance_pit_of_saron.cpp @@ -46,6 +46,10 @@ enum SPELL_FEIGN_DEATH = 28728, SPELL_RAISE_DEAD = 69350, + // Garfrost outro + SAY_TYRANNUS_GARFROST = -1658020, + SAY_GENERAL_GARFROST = -1658021, + // Ick and Krick outro SAY_JAINA_KRICK_1 = -1658036, SAY_SYLVANAS_KRICK_1 = -1658037, @@ -80,6 +84,11 @@ static const DialogueEntryTwoSide aPoSDialogues[] = {SAY_JAINA_INTRO_4, NPC_JAINA_PART1, SAY_SYLVANAS_INTRO_3, NPC_SYLVANAS_PART1, 5000}, {SAY_JAINA_INTRO_5, NPC_JAINA_PART1, SAY_SYLVANAS_INTRO_4, NPC_SYLVANAS_PART1, 0}, + // Garfrost outro + {NPC_GARFROST, 0, 0, 0, 4000}, + {SAY_GENERAL_GARFROST, NPC_VICTUS_PART1, SAY_GENERAL_GARFROST, NPC_IRONSKULL_PART1, 2000}, + {SAY_TYRANNUS_GARFROST, NPC_TYRANNUS_INTRO, 0, 0, 0}, + // Ick and Krick outro {SAY_JAINA_KRICK_1, NPC_JAINA_PART1, SAY_SYLVANAS_KRICK_1, NPC_SYLVANAS_PART1, 6000}, {SAY_OUTRO_2, NPC_KRICK, 0, 0, 16000}, @@ -152,6 +161,8 @@ void instance_pit_of_saron::OnCreatureCreate(Creature* pCreature) case NPC_ICK: case NPC_TYRANNUS: case NPC_RIMEFANG: + case NPC_IRONSKULL_PART1: + case NPC_VICTUS_PART1: m_mNpcEntryGuidStore[pCreature->GetEntry()] = pCreature->GetObjectGuid(); break; } @@ -183,6 +194,8 @@ void instance_pit_of_saron::SetData(uint32 uiType, uint32 uiData) DoUseDoorOrButton(GO_ICEWALL); if (uiData == IN_PROGRESS) SetSpecialAchievementCriteria(TYPE_ACHIEV_DOESNT_GO_ELEVEN, true); + else if (uiData == DONE) + StartNextDialogueText(NPC_GARFROST); m_auiEncounter[uiType] = uiData; break; case TYPE_KRICK: @@ -280,7 +293,7 @@ void instance_pit_of_saron::JustDidDialogueStep(int32 iEntry) if (Creature* pTyrannus = GetSingleCreatureFromStorage(NPC_TYRANNUS_INTRO)) { pTyrannus->SetWalk(false); - pTyrannus->GetMotionMaster()->MovePoint(0, 835.5887f, 139.4345f, 530.9526f); + pTyrannus->GetMotionMaster()->MovePoint(0, afTyrannusMovePos[1][0], afTyrannusMovePos[1][1], afTyrannusMovePos[1][2]); } break; case SPELL_STRANGULATING: @@ -300,9 +313,8 @@ void instance_pit_of_saron::JustDidDialogueStep(int32 iEntry) break; case SAY_JAINA_INTRO_3: case SAY_JAINA_KRICK_3: - // Note: location needs to be confirmed if (Creature* pTyrannus = GetSingleCreatureFromStorage(NPC_TYRANNUS_INTRO)) - pTyrannus->GetMotionMaster()->MovePoint(0, afTyrannusHidePos[0], afTyrannusHidePos[1], afTyrannusHidePos[2]); + pTyrannus->GetMotionMaster()->MovePoint(0, afTyrannusMovePos[0][0], afTyrannusMovePos[0][1], afTyrannusMovePos[0][2]); break; } } diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/pit_of_saron.h b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/pit_of_saron.h index f66153e4b..f033eb2a1 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/pit_of_saron.h +++ b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/pit_of_saron.h @@ -40,6 +40,10 @@ enum NPC_CHAMPION_2_ALLIANCE = 37497, NPC_CHAMPION_3_ALLIANCE = 37498, NPC_CORRUPTED_CHAMPION = 36796, + NPC_IRONSKULL_PART1 = 37592, + NPC_IRONSKULL_PART2 = 37592, + NPC_VICTUS_PART1 = 37591, + NPC_VICTUS_PART2 = 37580, GO_ICEWALL = 201885, // open after gafrost/krick GO_HALLS_OF_REFLECT_PORT = 201848, // unlocked by jaina/sylvanas at last outro @@ -48,6 +52,13 @@ enum ACHIEV_CRIT_DONT_LOOK_UP = 12994, // Gauntlet, achiev 4525 }; +static const float afTyrannusMovePos[3][3] = +{ + {922.6365f, 145.877f, 643.2216f}, // Hide position + {835.5887f, 139.4345f, 530.9526f}, // Ick position + {906.9048f, -49.03813f, 618.8016f}, // Tunnel position +}; + struct EventNpcLocations { uint32 uiEntryHorde, uiEntryAlliance; @@ -63,9 +74,6 @@ const EventNpcLocations aEventBeginLocations[3] = // ToDo: add the soldiers here when proper waypoint movement is supported }; -// Note: this location needs to be confirmed -static const float afTyrannusHidePos[3] = {948.649f, 152.921f, 672.42f}; - class MANGOS_DLL_DECL instance_pit_of_saron : public ScriptedInstance, private DialogueHelper { public: diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 59f8b4909..e0efede30 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2835" + #define SD2_REVISION_NR "2836" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 6b61a3744..30f7f4f2c 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -4327,7 +4327,7 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1658017,'Garfrost hope giant underpants clean. Save boss great shame. For later.',16915,1,0,0,'garfrost SAY_DEATH'), (-1658018,'Axe too weak. Garfrost make better and CRUSH YOU!',16916,1,0,0,'garfrost SAY_FORGE_1'), (-1658019,'That one maybe not so good to eat now. Stupid Garfrost! BAD! BAD!',16917,1,0,0,'garfrost SAY_FORGE_2'), -(-1658020,'Another shall take his place. You waste your time.',16752,1,0,0,'tyrannus SAY_TYRANNUS_GARFROST'), +(-1658020,'Another shall take his place. You waste your time.',16752,6,0,0,'tyrannus SAY_TYRANNUS_GARFROST'), (-1658021,'The forgemaster is dead! Get geared up men, we have a Scourgelord to kill.',0,1,0,0,'victus_or_ironskull SAY_GENERAL_GARFROST'), (-1658022,'%s hurls a massive saronite boulder at you!',0,5,0,0,'garfrost EMOTE_THROW_SARONITE'), -- TODO emote only displayed to target (-1658023,'%s casts Deep Freeze at $N.',0,3,0,0,'garfrost EMOTE_DEEP_FREEZE'), @@ -4357,7 +4357,7 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1658045,'What a cruel end. Come, heroes. We must see if the gnome\'s story is true. If we can separate Arthas from Frostmourne, we might have a chance at stopping him.',16613,1,0,0,'jaina SAY_JAINA_KRICK_3'), (-1658046,'A fitting end for a traitor. Come, we must free the slaves and see what is within the Lich King\'s chamber for ourselves.',17035,1,0,396,'sylvanas SAY_SYLVANAS_KRICK_3'), -(-1658047,'Your pursuit shall be in vain, adventurers, for the Lich King has placed an army of undead at my command! Behold!',16755,1,0,0,'tyrannus SAY_TYRANNUS_AMBUSH_1'), +(-1658047,'Your pursuit shall be in vain, adventurers, for the Lich King has placed an army of undead at my command! Behold!',16755,6,0,0,'tyrannus SAY_TYRANNUS_AMBUSH_1'), (-1658048,'Persistent whelps! You will not reach the entrance of my lord\'s lair! Soldiers, destroy them!',16756,1,0,0,'tyrannus SAY_TYRANNUS_AMBUSH_2'), (-1658049,'Rimefang! Trap them within the tunnel! Bury them alive!',16757,1,0,0,'tyrannus SAY_GAUNTLET'), diff --git a/sql/updates/r2836_scriptdev2.sql b/sql/updates/r2836_scriptdev2.sql new file mode 100644 index 000000000..cf40248ef --- /dev/null +++ b/sql/updates/r2836_scriptdev2.sql @@ -0,0 +1 @@ +UPDATE script_texts SET type=6 WHERE entry IN (-1658020,-1658047); From 0e7baf9a2e3642c9b21a6501add60af76cdb225b Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sat, 30 Mar 2013 01:37:21 +0200 Subject: [PATCH 0838/1172] [2837] Implement ambush event - Pit of Saron --- .../pit_of_saron/instance_pit_of_saron.cpp | 132 ++++++++++++++++-- .../pit_of_saron/pit_of_saron.cpp | 118 +++++++++++++++- .../frozen_halls/pit_of_saron/pit_of_saron.h | 40 ++++++ sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 3 + sql/scriptdev2_script_full.sql | 4 +- sql/updates/r2837_mangos.sql | 3 + sql/updates/r2837_scriptdev2.sql | 1 + 8 files changed, 283 insertions(+), 20 deletions(-) create mode 100644 sql/updates/r2837_mangos.sql create mode 100644 sql/updates/r2837_scriptdev2.sql diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/instance_pit_of_saron.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/instance_pit_of_saron.cpp index 5c8b5c1cb..2ca318c2a 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/instance_pit_of_saron.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/instance_pit_of_saron.cpp @@ -67,6 +67,11 @@ enum SPELL_STRANGULATING = 69413, SPELL_KRICK_KILL_CREDIT = 71308, SPELL_SUICIDE = 7, + + // Ambush and Gauntlet + SAY_TYRANNUS_AMBUSH_1 = -1658047, + SAY_TYRANNUS_AMBUSH_2 = -1658048, + SAY_GAUNTLET = -1658049, }; static const DialogueEntryTwoSide aPoSDialogues[] = @@ -103,6 +108,8 @@ static const DialogueEntryTwoSide aPoSDialogues[] = }; instance_pit_of_saron::instance_pit_of_saron(Map* pMap) : ScriptedInstance(pMap), DialogueHelper(aPoSDialogues), + m_bIsAmbushStarted(false), + m_uiAmbushAggroCount(0), m_uiTeam(TEAM_NONE) { Initialize(); @@ -124,7 +131,6 @@ void instance_pit_of_saron::OnPlayerEnter(Player* pPlayer) m_uiTeam = pPlayer->GetTeam(); SetDialogueSide(m_uiTeam == ALLIANCE); ProcessIntroEventNpcs(pPlayer); - StartNextDialogueText(NPC_TYRANNUS_INTRO); } } @@ -133,18 +139,21 @@ void instance_pit_of_saron::ProcessIntroEventNpcs(Player* pPlayer) if (!pPlayer) return; - if (m_auiEncounter[0] != DONE && m_auiEncounter[1] != DONE) + // Not if the bosses are already killed + if (GetData(TYPE_GARFROST) == DONE || GetData(TYPE_KRICK) == DONE) + return; + + StartNextDialogueText(NPC_TYRANNUS_INTRO); + + // Spawn Begin Mobs + for (uint8 i = 0; i < countof(aEventBeginLocations); ++i) { - // Spawn Begin Mobs - for (uint8 i = 0; i < countof(aEventBeginLocations); ++i) + // ToDo: maybe despawn the intro npcs when the other events occur + if (Creature* pSummon = pPlayer->SummonCreature(m_uiTeam == HORDE ? aEventBeginLocations[i].uiEntryHorde : aEventBeginLocations[i].uiEntryAlliance, + aEventBeginLocations[i].fX, aEventBeginLocations[i].fY, aEventBeginLocations[i].fZ, aEventBeginLocations[i].fO, TEMPSUMMON_TIMED_DESPAWN, 24 * HOUR * IN_MILLISECONDS)) { - // ToDo: maybe despawn the intro npcs when the other events occur - if (Creature* pSummon = pPlayer->SummonCreature(m_uiTeam == HORDE ? aEventBeginLocations[i].uiEntryHorde : aEventBeginLocations[i].uiEntryAlliance, - aEventBeginLocations[i].fX, aEventBeginLocations[i].fY, aEventBeginLocations[i].fZ, aEventBeginLocations[i].fO, TEMPSUMMON_TIMED_DESPAWN, 24 * HOUR * IN_MILLISECONDS)) - { - pSummon->SetWalk(false); - pSummon->GetMotionMaster()->MovePoint(0, aEventBeginLocations[i].fMoveX, aEventBeginLocations[i].fMoveY, aEventBeginLocations[i].fMoveZ); - } + pSummon->SetWalk(false); + pSummon->GetMotionMaster()->MovePoint(0, aEventBeginLocations[i].fMoveX, aEventBeginLocations[i].fMoveY, aEventBeginLocations[i].fMoveZ); } } } @@ -165,6 +174,17 @@ void instance_pit_of_saron::OnCreatureCreate(Creature* pCreature) case NPC_VICTUS_PART1: m_mNpcEntryGuidStore[pCreature->GetEntry()] = pCreature->GetObjectGuid(); break; + case NPC_STALKER: + m_lTunnelStalkersGuidList.push_back(pCreature->GetObjectGuid()); + break; + case NPC_YMIRJAR_DEATHBRINGER: + case NPC_YMIRJAR_WRATHBRINGER: + case NPC_YMIRJAR_FLAMEBEARER: + case NPC_FALLEN_WARRIOR: + case NPC_COLDWRAITH: + if (pCreature->IsTemporarySummon()) + m_lAmbushNpcsGuidList.push_back(pCreature->GetObjectGuid()); + break; } } @@ -260,6 +280,70 @@ uint32 instance_pit_of_saron::GetData(uint32 uiType) const return 0; } +void instance_pit_of_saron::OnCreatureEnterCombat(Creature* pCreature) +{ + if (pCreature->GetEntry() == NPC_YMIRJAR_DEATHBRINGER) + { + ++m_uiAmbushAggroCount; + + // Summon the rest of the mobs at the 2nd ambush + if (m_uiAmbushAggroCount == 2) + { + Creature* pTyrannus = GetSingleCreatureFromStorage(NPC_TYRANNUS_INTRO); + if (!pTyrannus) + return; + + DoScriptText(SAY_TYRANNUS_AMBUSH_2, pTyrannus); + pTyrannus->SetWalk(false); + pTyrannus->GetMotionMaster()->MovePoint(0, afTyrannusMovePos[2][0], afTyrannusMovePos[2][1], afTyrannusMovePos[2][2]); + + // Spawn Mobs + for (uint8 i = 0; i < countof(aEventSecondAmbushLocations); ++i) + { + if (Creature* pSummon = pTyrannus->SummonCreature(aEventSecondAmbushLocations[i].uiEntryHorde, aEventSecondAmbushLocations[i].fX, aEventSecondAmbushLocations[i].fY, + aEventSecondAmbushLocations[i].fZ, aEventSecondAmbushLocations[i].fO, TEMPSUMMON_DEAD_DESPAWN, 0)) + { + pSummon->SetWalk(false); + pSummon->GetMotionMaster()->MovePoint(1, aEventSecondAmbushLocations[i].fMoveX, aEventSecondAmbushLocations[i].fMoveY, aEventSecondAmbushLocations[i].fMoveZ); + } + } + } + } +} + +void instance_pit_of_saron::OnCreatureDeath(Creature* pCreature) +{ + switch (pCreature->GetEntry()) + { + case NPC_YMIRJAR_DEATHBRINGER: + case NPC_YMIRJAR_WRATHBRINGER: + case NPC_YMIRJAR_FLAMEBEARER: + case NPC_FALLEN_WARRIOR: + case NPC_COLDWRAITH: + // Count only the summons + if (!pCreature->IsTemporarySummon()) + return; + + m_lAmbushNpcsGuidList.remove(pCreature->GetObjectGuid()); + + // If empty start tunnel event + if (m_lAmbushNpcsGuidList.empty()) + { + Creature* pTyrannus = GetSingleCreatureFromStorage(NPC_TYRANNUS_INTRO); + if (!pTyrannus) + return; + + DoScriptText(SAY_GAUNTLET, pTyrannus); + pTyrannus->SetWalk(false); + pTyrannus->GetMotionMaster()->MovePoint(0, afTyrannusMovePos[0][0], afTyrannusMovePos[0][1], afTyrannusMovePos[0][2]); + pTyrannus->ForcedDespawn(20000); + + // ToDo: start tunnel event + } + break; + } +} + void instance_pit_of_saron::SetSpecialAchievementCriteria(uint32 uiType, bool bIsMet) { if (uiType < MAX_SPECIAL_ACHIEV_CRITS) @@ -319,6 +403,32 @@ void instance_pit_of_saron::JustDidDialogueStep(int32 iEntry) } } +void instance_pit_of_saron::DoStartAmbushEvent() +{ + // This is started only once per instance + if (m_bIsAmbushStarted) + return; + + Creature* pTyrannus = GetSingleCreatureFromStorage(NPC_TYRANNUS_INTRO); + if (!pTyrannus) + return; + + DoScriptText(SAY_TYRANNUS_AMBUSH_1, pTyrannus); + + // Spawn Mobs + for (uint8 i = 0; i < countof(aEventFirstAmbushLocations); ++i) + { + if (Creature* pSummon = pTyrannus->SummonCreature(aEventFirstAmbushLocations[i].uiEntryHorde, aEventFirstAmbushLocations[i].fX, aEventFirstAmbushLocations[i].fY, + aEventFirstAmbushLocations[i].fZ, aEventFirstAmbushLocations[i].fO, TEMPSUMMON_DEAD_DESPAWN, 0)) + { + pSummon->SetWalk(false); + pSummon->GetMotionMaster()->MovePoint(1, aEventFirstAmbushLocations[i].fMoveX, aEventFirstAmbushLocations[i].fMoveY, aEventFirstAmbushLocations[i].fMoveZ); + } + } + + m_bIsAmbushStarted = true; +} + InstanceData* GetInstanceData_instance_pit_of_saron(Map* pMap) { return new instance_pit_of_saron(pMap); diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/pit_of_saron.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/pit_of_saron.cpp index ed8c0a2f5..6e206a3e0 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/pit_of_saron.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/pit_of_saron.cpp @@ -16,7 +16,7 @@ /* ScriptData SDName: pit_of_saron -SD%Complete: 0 +SD%Complete: 100 SDComment: SDCategory: Pit of Saron EndScriptData */ @@ -29,11 +29,6 @@ EndContentData */ enum { - // Ambush and Gauntlet - SAY_TYRANNUS_AMBUSH_1 = -1658047, - SAY_TYRANNUS_AMBUSH_2 = -1658048, - SAY_GAUNTLET = -1658049, - // Sindragosa outro SAY_GENERAL_OUTRO_1 = -1658061, SAY_GENERAL_OUTRO_2 = -1658062, @@ -42,9 +37,120 @@ enum SAY_JAINA_OUTRO_2 = -1658065, SAY_JAINA_OUTRO_3 = -1658066, SAY_SYLVANAS_OUTRO_2 = -1658067, + + // Ambush event + SPELL_EMPOWERED_SHADOW_BOLT = 69528, + SPELL_SUMMON_UNDEAD = 69516, +}; + +/*###### +## npc_ymirjar_deathbringer +######*/ + +struct MANGOS_DLL_DECL npc_ymirjar_deathbringerAI : public ScriptedAI +{ + npc_ymirjar_deathbringerAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } + + uint32 m_uiShadowBoltTimer; + + void Reset() override + { + m_uiShadowBoltTimer = urand(1000, 3000); + } + + void MovementInform(uint32 uiMotionType, uint32 uiPointId) override + { + if (uiMotionType != POINT_MOTION_TYPE || !uiPointId) + return; + + DoCastSpellIfCan(m_creature, SPELL_SUMMON_UNDEAD); + } + + void UpdateAI(const uint32 uiDiff) override + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_uiShadowBoltTimer < uiDiff) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, SPELL_EMPOWERED_SHADOW_BOLT) == CAST_OK) + m_uiShadowBoltTimer = urand(2000, 3000); + } + } + else + m_uiShadowBoltTimer -= uiDiff; + + DoMeleeAttackIfReady(); + } }; +CreatureAI* GetAI_npc_ymirjar_deathbringer(Creature* pCreature) +{ + return new npc_ymirjar_deathbringerAI(pCreature); +} + +bool EffectDummyCreature_spell_summon_undead(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) +{ + // always check spellid and effectindex + if (uiSpellId == SPELL_SUMMON_UNDEAD && uiEffIndex == EFFECT_INDEX_0) + { + if (pCreatureTarget->GetEntry() != NPC_YMIRJAR_DEATHBRINGER) + return true; + + float fX, fY, fZ; + for (uint8 i = 0; i < 4; ++i) + { + pCreatureTarget->GetNearPoint(pCreatureTarget, fX, fY, fZ, 0, frand(8.0f, 12.0f), M_PI_F * 0.5f * i); + pCreatureTarget->SummonCreature(i % 2 ? NPC_YMIRJAR_WRATHBRINGER : NPC_YMIRJAR_FLAMEBEARER, fX, fY, fZ, 3.75f, TEMPSUMMON_DEAD_DESPAWN, 0); + } + + // always return true when we are handling this spell and effect + return true; + } + + return false; +} + +/*###### +## at_pit_of_saron +######*/ + +bool AreaTrigger_at_pit_of_saron(Player* pPlayer, AreaTriggerEntry const* pAt) +{ + if (pAt->id == AREATRIGGER_ID_TUNNEL) + { + if (pPlayer->isGameMaster() || !pPlayer->isAlive()) + return false; + + instance_pit_of_saron* pInstance = (instance_pit_of_saron*)pPlayer->GetInstanceData(); + if (!pInstance) + return false; + + if (pInstance->GetData(TYPE_GARFROST) != DONE || pInstance->GetData(TYPE_KRICK) != DONE || + pInstance->GetData(TYPE_TYRANNUS) != NOT_STARTED) + return false; + + pInstance->DoStartAmbushEvent(); + return true; + } + + return false; +} + void AddSC_pit_of_saron() { + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "npc_ymirjar_deathbringer"; + pNewScript->GetAI = &GetAI_npc_ymirjar_deathbringer; + pNewScript->pEffectDummyNPC = &EffectDummyCreature_spell_summon_undead; + pNewScript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "at_pit_of_saron"; + pNewScript->pAreaTrigger = &AreaTrigger_at_pit_of_saron; + pNewScript->RegisterSelf(); } diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/pit_of_saron.h b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/pit_of_saron.h index f033eb2a1..0a863a383 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/pit_of_saron.h +++ b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/pit_of_saron.h @@ -45,9 +45,19 @@ enum NPC_VICTUS_PART1 = 37591, NPC_VICTUS_PART2 = 37580, + // ambush npcs + NPC_YMIRJAR_DEATHBRINGER = 36892, + NPC_YMIRJAR_WRATHBRINGER = 36840, + NPC_YMIRJAR_FLAMEBEARER = 36893, + NPC_FALLEN_WARRIOR = 36841, + NPC_COLDWRAITH = 36842, + NPC_STALKER = 32780, + GO_ICEWALL = 201885, // open after gafrost/krick GO_HALLS_OF_REFLECT_PORT = 201848, // unlocked by jaina/sylvanas at last outro + AREATRIGGER_ID_TUNNEL = 5578, + ACHIEV_CRIT_DOESNT_GO_ELEVEN = 12993, // Garfrost, achiev 4524 ACHIEV_CRIT_DONT_LOOK_UP = 12994, // Gauntlet, achiev 4525 }; @@ -74,6 +84,26 @@ const EventNpcLocations aEventBeginLocations[3] = // ToDo: add the soldiers here when proper waypoint movement is supported }; +const EventNpcLocations aEventFirstAmbushLocations[2] = +{ + {NPC_YMIRJAR_DEATHBRINGER, 0, 951.6696f, 53.06405f, 567.5153f, 1.51f, 914.7256f, 76.66406f, 553.8029f}, + {NPC_YMIRJAR_DEATHBRINGER, 0, 950.9911f, 60.26712f, 566.7658f, 1.79f, 883.1805f, 52.69792f, 527.6385f}, +}; + +const EventNpcLocations aEventSecondAmbushLocations[] = +{ + {NPC_FALLEN_WARRIOR, 0, 916.658f, -55.94097f, 591.6827f, 1.85f, 950.5694f, 31.85649f, 572.2693f}, + {NPC_FALLEN_WARRIOR, 0, 923.8055f, -55.63195f, 591.8663f, 1.85f, 941.3954f, 35.83769f, 571.4308f}, + {NPC_FALLEN_WARRIOR, 0, 936.0625f, -53.52778f, 592.0226f, 1.85f, 934.8011f, 8.024931f, 577.3419f}, + {NPC_FALLEN_WARRIOR, 0, 919.7518f, -68.39236f, 592.2916f, 1.85f, 932.5734f, -22.54153f, 587.403f}, + {NPC_FALLEN_WARRIOR, 0, 926.8993f, -68.08334f, 592.0798f, 1.85f, 922.6043f, -22.07627f, 585.6684f}, + {NPC_FALLEN_WARRIOR, 0, 939.1563f, -65.97916f, 592.2205f, 1.85f, 927.0928f, -32.97949f, 589.3028f}, + {NPC_COLDWRAITH, 0, 924.0261f, -62.3316f, 592.0191f, 2.01f, 929.4673f, 9.722589f, 577.4904f}, + {NPC_COLDWRAITH, 0, 936.4531f, -60.45486f, 592.1215f, 1.63f, 936.1395f, -4.003471f, 581.3139f}, + {NPC_COLDWRAITH, 0, 935.8055f, -72.76736f, 592.077f, 1.66f, 933.8441f, -47.83234f, 591.7538f}, + {NPC_COLDWRAITH, 0, 923.3785f, -74.6441f, 592.368f, 2.37f, 920.726f, -42.32272f, 589.9808f} +}; + class MANGOS_DLL_DECL instance_pit_of_saron : public ScriptedInstance, private DialogueHelper { public: @@ -86,12 +116,16 @@ class MANGOS_DLL_DECL instance_pit_of_saron : public ScriptedInstance, private D void OnObjectCreate(GameObject* pGo) override; void OnPlayerEnter(Player* pPlayer) override; + void OnCreatureEnterCombat(Creature* pCreature) override; + void OnCreatureDeath(Creature* pCreature) override; void SetData(uint32 uiType, uint32 uiData) override; uint32 GetData(uint32 uiType) const override; uint32 GetPlayerTeam() { return m_uiTeam; } + void DoStartAmbushEvent(); + void SetSpecialAchievementCriteria(uint32 uiType, bool bIsMet); bool CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/) const override; @@ -109,7 +143,13 @@ class MANGOS_DLL_DECL instance_pit_of_saron : public ScriptedInstance, private D bool m_abAchievCriteria[MAX_SPECIAL_ACHIEV_CRITS]; + bool m_bIsAmbushStarted; + + uint8 m_uiAmbushAggroCount; uint32 m_uiTeam; // Team of first entered player, used to set if Jaina or Silvana to spawn + + GuidList m_lTunnelStalkersGuidList; + GuidList m_lAmbushNpcsGuidList; }; #endif diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index e0efede30..a12ab3880 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2836" + #define SD2_REVISION_NR "2837" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 1b5334b47..168ea0c76 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -713,6 +713,9 @@ UPDATE creature_template SET ScriptName='boss_forgemaster_garfrost' WHERE entry= UPDATE creature_template SET ScriptName='boss_krick' WHERE entry=36477; UPDATE creature_template SET ScriptName='boss_ick' WHERE entry=36476; UPDATE creature_template SET ScriptName='npc_exploding_orb' WHERE entry=36610; +UPDATE creature_template SET ScriptName='npc_ymirjar_deathbringer' WHERE entry=36892; +DELETE FROM scripted_areatrigger WHERE entry=5578; +INSERT INTO scripted_areatrigger VALUES (5578,'at_pit_of_saron'); /* ICECROWN */ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 30f7f4f2c..38d44c71a 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -4358,8 +4358,8 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1658046,'A fitting end for a traitor. Come, we must free the slaves and see what is within the Lich King\'s chamber for ourselves.',17035,1,0,396,'sylvanas SAY_SYLVANAS_KRICK_3'), (-1658047,'Your pursuit shall be in vain, adventurers, for the Lich King has placed an army of undead at my command! Behold!',16755,6,0,0,'tyrannus SAY_TYRANNUS_AMBUSH_1'), -(-1658048,'Persistent whelps! You will not reach the entrance of my lord\'s lair! Soldiers, destroy them!',16756,1,0,0,'tyrannus SAY_TYRANNUS_AMBUSH_2'), -(-1658049,'Rimefang! Trap them within the tunnel! Bury them alive!',16757,1,0,0,'tyrannus SAY_GAUNTLET'), +(-1658048,'Persistent whelps! You will not reach the entrance of my lord\'s lair! Soldiers, destroy them!',16756,6,0,0,'tyrannus SAY_TYRANNUS_AMBUSH_2'), +(-1658049,'Rimefang! Trap them within the tunnel! Bury them alive!',16757,6,0,0,'tyrannus SAY_GAUNTLET'), (-1658050,'Alas, brave, brave adventurers, your meddling has reached its end. Do you hear the clatter of bone and steel coming up the tunnel behind you? That is the sound of your impending demise.',16758,1,0,0,'tyrannus SAY_PREFIGHT_1'), (-1658051,'Heroes! We will hold off the undead as long as we can, even to our dying breath. Deal with the Scourgelord!',0,1,0,0,'victus_or_ironskull SAY_GENERAL_TRASH'), diff --git a/sql/updates/r2837_mangos.sql b/sql/updates/r2837_mangos.sql new file mode 100644 index 000000000..727ebf74c --- /dev/null +++ b/sql/updates/r2837_mangos.sql @@ -0,0 +1,3 @@ +UPDATE creature_template SET ScriptName='npc_ymirjar_deathbringer' WHERE entry=36892; +DELETE FROM scripted_areatrigger WHERE entry=5578; +INSERT INTO scripted_areatrigger VALUES (5578,'at_pit_of_saron'); diff --git a/sql/updates/r2837_scriptdev2.sql b/sql/updates/r2837_scriptdev2.sql new file mode 100644 index 000000000..4487e190e --- /dev/null +++ b/sql/updates/r2837_scriptdev2.sql @@ -0,0 +1 @@ +UPDATE script_texts SET type=6 WHERE entry IN (-1658048,-1658049); From 53119ef103b44166e6735d128dabe85e895a441b Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sat, 30 Mar 2013 12:43:51 +0200 Subject: [PATCH 0839/1172] [2838] Implement tunnel event - Pit of Saron --- .../pit_of_saron/instance_pit_of_saron.cpp | 80 +++++++++++++++---- .../pit_of_saron/pit_of_saron.cpp | 47 +++++++++++ .../frozen_halls/pit_of_saron/pit_of_saron.h | 6 +- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 + sql/updates/r2838_mangos.sql | 1 + 6 files changed, 120 insertions(+), 17 deletions(-) create mode 100644 sql/updates/r2838_mangos.sql diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/instance_pit_of_saron.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/instance_pit_of_saron.cpp index 2ca318c2a..f7d818af4 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/instance_pit_of_saron.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/instance_pit_of_saron.cpp @@ -72,6 +72,10 @@ enum SAY_TYRANNUS_AMBUSH_1 = -1658047, SAY_TYRANNUS_AMBUSH_2 = -1658048, SAY_GAUNTLET = -1658049, + + // Gauntlet spells + SPELL_ICICLE_SUMMON = 69424, + SPELL_ACHIEVEMENT_CHECK = 72845 }; static const DialogueEntryTwoSide aPoSDialogues[] = @@ -110,7 +114,8 @@ static const DialogueEntryTwoSide aPoSDialogues[] = instance_pit_of_saron::instance_pit_of_saron(Map* pMap) : ScriptedInstance(pMap), DialogueHelper(aPoSDialogues), m_bIsAmbushStarted(false), m_uiAmbushAggroCount(0), - m_uiTeam(TEAM_NONE) + m_uiTeam(TEAM_NONE), + m_uiIciclesTimer(0) { Initialize(); } @@ -182,8 +187,13 @@ void instance_pit_of_saron::OnCreatureCreate(Creature* pCreature) case NPC_YMIRJAR_FLAMEBEARER: case NPC_FALLEN_WARRIOR: case NPC_COLDWRAITH: + case NPC_DISTURBED_REVENANT: + case NPC_SKELETON: + // Sort the ambush and the tunnel mobs if (pCreature->IsTemporarySummon()) m_lAmbushNpcsGuidList.push_back(pCreature->GetObjectGuid()); + else + m_lTunnelNpcGuidList.push_back(pCreature->GetObjectGuid()); break; } } @@ -320,25 +330,41 @@ void instance_pit_of_saron::OnCreatureDeath(Creature* pCreature) case NPC_YMIRJAR_FLAMEBEARER: case NPC_FALLEN_WARRIOR: case NPC_COLDWRAITH: - // Count only the summons + case NPC_DISTURBED_REVENANT: + case NPC_SKELETON: + // Check for tunnel event end - these mobs are not summoned if (!pCreature->IsTemporarySummon()) - return; - - m_lAmbushNpcsGuidList.remove(pCreature->GetObjectGuid()); + { + m_lTunnelNpcGuidList.remove(pCreature->GetObjectGuid()); - // If empty start tunnel event - if (m_lAmbushNpcsGuidList.empty()) + // If all mobs in the tunnel are clearned cast the achiev spell + if (m_lTunnelNpcGuidList.empty()) + { + pCreature->CastSpell(pCreature, SPELL_ACHIEVEMENT_CHECK, true); + m_uiIciclesTimer = 0; + // ToDo: start tyrannus intro event + } + } + // Check for the ambush event + else { - Creature* pTyrannus = GetSingleCreatureFromStorage(NPC_TYRANNUS_INTRO); - if (!pTyrannus) - return; + m_lAmbushNpcsGuidList.remove(pCreature->GetObjectGuid()); - DoScriptText(SAY_GAUNTLET, pTyrannus); - pTyrannus->SetWalk(false); - pTyrannus->GetMotionMaster()->MovePoint(0, afTyrannusMovePos[0][0], afTyrannusMovePos[0][1], afTyrannusMovePos[0][2]); - pTyrannus->ForcedDespawn(20000); + // If empty start tunnel event + if (m_lAmbushNpcsGuidList.empty()) + { + Creature* pTyrannus = GetSingleCreatureFromStorage(NPC_TYRANNUS_INTRO); + if (!pTyrannus) + return; + + DoScriptText(SAY_GAUNTLET, pTyrannus); + pTyrannus->SetWalk(false); + pTyrannus->GetMotionMaster()->MovePoint(0, afTyrannusMovePos[0][0], afTyrannusMovePos[0][1], afTyrannusMovePos[0][2]); + pTyrannus->ForcedDespawn(20000); - // ToDo: start tunnel event + m_uiIciclesTimer = urand(3000, 5000); + SetSpecialAchievementCriteria(TYPE_ACHIEV_DONT_LOOK_UP, true); + } } break; } @@ -429,6 +455,30 @@ void instance_pit_of_saron::DoStartAmbushEvent() m_bIsAmbushStarted = true; } +void instance_pit_of_saron::Update(uint32 uiDiff) +{ + DialogueUpdate(uiDiff); + + if (m_uiIciclesTimer) + { + if (m_uiIciclesTimer <= uiDiff) + { + for (GuidList::const_iterator itr = m_lTunnelStalkersGuidList.begin(); itr != m_lTunnelStalkersGuidList.end(); ++itr) + { + // Only 5% of the stalkers will actually spawn an icicle + if (roll_chance_i(95)) + continue; + + if (Creature* pStalker = instance->GetCreature(*itr)) + pStalker->CastSpell(pStalker, SPELL_ICICLE_SUMMON, true); + } + m_uiIciclesTimer = urand(3000, 5000); + } + else + m_uiIciclesTimer -= uiDiff; + } +} + InstanceData* GetInstanceData_instance_pit_of_saron(Map* pMap) { return new instance_pit_of_saron(pMap); diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/pit_of_saron.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/pit_of_saron.cpp index 6e206a3e0..5702b7600 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/pit_of_saron.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/pit_of_saron.cpp @@ -41,6 +41,11 @@ enum // Ambush event SPELL_EMPOWERED_SHADOW_BOLT = 69528, SPELL_SUMMON_UNDEAD = 69516, + + // Icicles + SPELL_ICICLE = 69426, + SPELL_ICICLE_DUMMY = 69428, + SPELL_ICE_SHARDS = 69425, }; /*###### @@ -113,6 +118,43 @@ bool EffectDummyCreature_spell_summon_undead(Unit* pCaster, uint32 uiSpellId, Sp return false; } +/*###### +## npc_collapsing_icicle +######*/ + +struct MANGOS_DLL_DECL npc_collapsing_icicleAI : public ScriptedAI +{ + npc_collapsing_icicleAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (instance_pit_of_saron*)pCreature->GetInstanceData(); + Reset(); + } + + instance_pit_of_saron* m_pInstance; + + void Reset() override + { + DoCastSpellIfCan(m_creature, SPELL_ICICLE_DUMMY, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_ICICLE, CAST_TRIGGERED); + } + + void SpellHitTarget(Unit* pTarget, const SpellEntry* pSpell) override + { + // Mark the achiev failed + if (pSpell->Id == SPELL_ICE_SHARDS && pTarget->GetTypeId() == TYPEID_PLAYER && m_pInstance) + m_pInstance->SetSpecialAchievementCriteria(TYPE_ACHIEV_DONT_LOOK_UP, false); + } + + void AttackStart(Unit* pWho) override { } + void MoveInLineOfSight(Unit* pWho) override { } + void UpdateAI(const uint32 uiDiff) override { } +}; + +CreatureAI* GetAI_npc_collapsing_icicle(Creature* pCreature) +{ + return new npc_collapsing_icicleAI(pCreature); +} + /*###### ## at_pit_of_saron ######*/ @@ -149,6 +191,11 @@ void AddSC_pit_of_saron() pNewScript->pEffectDummyNPC = &EffectDummyCreature_spell_summon_undead; pNewScript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "npc_collapsing_icicle"; + pNewScript->GetAI = &GetAI_npc_collapsing_icicle; + pNewScript->RegisterSelf(); + pNewScript = new Script; pNewScript->Name = "at_pit_of_saron"; pNewScript->pAreaTrigger = &AreaTrigger_at_pit_of_saron; diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/pit_of_saron.h b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/pit_of_saron.h index 0a863a383..6a6a780c8 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/pit_of_saron.h +++ b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/pit_of_saron.h @@ -51,6 +51,8 @@ enum NPC_YMIRJAR_FLAMEBEARER = 36893, NPC_FALLEN_WARRIOR = 36841, NPC_COLDWRAITH = 36842, + NPC_SKELETON = 36877, + NPC_DISTURBED_REVENANT = 36874, NPC_STALKER = 32780, GO_ICEWALL = 201885, // open after gafrost/krick @@ -132,7 +134,7 @@ class MANGOS_DLL_DECL instance_pit_of_saron : public ScriptedInstance, private D const char* Save() const override { return m_strInstData.c_str(); } void Load(const char* chrIn) override; - void Update(uint32 uiDiff) { DialogueUpdate(uiDiff); } + void Update(uint32 uiDiff); protected: void JustDidDialogueStep(int32 iEntry) override; @@ -147,8 +149,10 @@ class MANGOS_DLL_DECL instance_pit_of_saron : public ScriptedInstance, private D uint8 m_uiAmbushAggroCount; uint32 m_uiTeam; // Team of first entered player, used to set if Jaina or Silvana to spawn + uint32 m_uiIciclesTimer; GuidList m_lTunnelStalkersGuidList; + GuidList m_lTunnelNpcGuidList; GuidList m_lAmbushNpcsGuidList; }; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index a12ab3880..dbb215d71 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2837" + #define SD2_REVISION_NR "2838" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 168ea0c76..6e5fec8fb 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -714,6 +714,7 @@ UPDATE creature_template SET ScriptName='boss_krick' WHERE entry=36477; UPDATE creature_template SET ScriptName='boss_ick' WHERE entry=36476; UPDATE creature_template SET ScriptName='npc_exploding_orb' WHERE entry=36610; UPDATE creature_template SET ScriptName='npc_ymirjar_deathbringer' WHERE entry=36892; +UPDATE creature_template SET ScriptName='npc_collapsing_icicle' WHERE entry=36847; DELETE FROM scripted_areatrigger WHERE entry=5578; INSERT INTO scripted_areatrigger VALUES (5578,'at_pit_of_saron'); diff --git a/sql/updates/r2838_mangos.sql b/sql/updates/r2838_mangos.sql new file mode 100644 index 000000000..529040375 --- /dev/null +++ b/sql/updates/r2838_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_collapsing_icicle' WHERE entry=36847; From cd8be632787342fe55929d1078f57fdda280f2e6 Mon Sep 17 00:00:00 2001 From: stfx Date: Sat, 30 Mar 2013 21:54:22 +0100 Subject: [PATCH 0840/1172] [2839] Minor Deadmines improvements Close scriptdev2/scriptdev2#52 Changes: * Some spell improvements to Mr Smite * Improve Canon&Door event's timing Signed-off-by: Schmoozerd --- .../deadmines/boss_mr_smite.cpp | 8 +-- .../eastern_kingdoms/deadmines/deadmines.h | 1 + .../deadmines/instance_deadmines.cpp | 65 +++++++++++-------- sd2_revision_nr.h | 2 +- 4 files changed, 44 insertions(+), 32 deletions(-) diff --git a/scripts/eastern_kingdoms/deadmines/boss_mr_smite.cpp b/scripts/eastern_kingdoms/deadmines/boss_mr_smite.cpp index c4b09f664..28e69d13f 100644 --- a/scripts/eastern_kingdoms/deadmines/boss_mr_smite.cpp +++ b/scripts/eastern_kingdoms/deadmines/boss_mr_smite.cpp @@ -34,10 +34,10 @@ enum EQUIP_ID_HAMMER = 10756, SPELL_NIBLE_REFLEXES = 6433, // removed after phase 1 - SPELL_SMITE_SLAM = 6435, + SPELL_SMITE_SLAM = 6435, // only casted in phase 3 SPELL_SMITE_STOMP = 6432, - SPELL_SMITE_HAMMER = 6436, - SPELL_THRASH = 12787, // unclear, possible 3417 (only 10% proc chance) + SPELL_SMITE_HAMMER = 6436, // unclear, not casted in sniff + SPELL_THRASH = 12787, // only casted in phase 2; unclear, 3391 directly casted in sniff PHASE_1 = 1, PHASE_2 = 2, @@ -206,7 +206,7 @@ struct MANGOS_DLL_DECL boss_mr_smiteAI : public ScriptedAI { if (DoCastSpellIfCan(m_creature, SPELL_SMITE_STOMP) == CAST_OK) { - DoScriptText(SAY_PHASE_2, m_creature); + DoScriptText(m_creature->GetHealthPercent() < 33.0f ? SAY_PHASE_3 : SAY_PHASE_2, m_creature); m_uiPhase = PHASE_EQUIP_START; m_uiEquipTimer = 2500; diff --git a/scripts/eastern_kingdoms/deadmines/deadmines.h b/scripts/eastern_kingdoms/deadmines/deadmines.h index defa609a7..ba1458f9f 100644 --- a/scripts/eastern_kingdoms/deadmines/deadmines.h +++ b/scripts/eastern_kingdoms/deadmines/deadmines.h @@ -64,6 +64,7 @@ class MANGOS_DLL_DECL instance_deadmines : public ScriptedInstance std::string m_strInstData; uint32 m_uiIronDoorTimer; + uint32 m_uiDoorStep; }; #endif diff --git a/scripts/eastern_kingdoms/deadmines/instance_deadmines.cpp b/scripts/eastern_kingdoms/deadmines/instance_deadmines.cpp index 83d949bca..536ab772a 100644 --- a/scripts/eastern_kingdoms/deadmines/instance_deadmines.cpp +++ b/scripts/eastern_kingdoms/deadmines/instance_deadmines.cpp @@ -25,7 +25,8 @@ EndScriptData */ #include "deadmines.h" instance_deadmines::instance_deadmines(Map* pMap) : ScriptedInstance(pMap), - m_uiIronDoorTimer(0) + m_uiIronDoorTimer(0), + m_uiDoorStep(0) { Initialize(); } @@ -125,30 +126,9 @@ void instance_deadmines::SetData(uint32 uiType, uint32 uiData) } case TYPE_IRON_CLAD_DOOR: { + // delayed door animation to sync with Defias Cannon animation if (uiData == DONE) - { - DoUseDoorOrButton(GO_IRON_CLAD_DOOR, 0, true); - m_uiIronDoorTimer = 15000; - - if (Creature* pMrSmite = GetSingleCreatureFromStorage(NPC_MR_SMITE)) - DoScriptText(INST_SAY_ALARM1, pMrSmite); - - if (GameObject* pDoor = GetSingleGameObjectFromStorage(GO_IRON_CLAD_DOOR)) - { - // should be static spawns, fetch the closest ones at the pier - if (Creature* pi1 = GetClosestCreatureWithEntry(pDoor, NPC_PIRATE, 40.0f)) - { - pi1->SetWalk(false); - pi1->GetMotionMaster()->MovePoint(0, pDoor->GetPositionX(), pDoor->GetPositionY(), pDoor->GetPositionZ()); - } - - if (Creature* pi2 = GetClosestCreatureWithEntry(pDoor, NPC_SQUALLSHAPER, 40.0f)) - { - pi2->SetWalk(false); - pi2->GetMotionMaster()->MovePoint(0, pDoor->GetPositionX(), pDoor->GetPositionY(), pDoor->GetPositionZ()); - } - } - } + m_uiIronDoorTimer = 500; m_auiEncounter[uiType] = uiData; break; @@ -205,10 +185,41 @@ void instance_deadmines::Update(uint32 uiDiff) { if (m_uiIronDoorTimer <= uiDiff) { - if (Creature* pMrSmite = GetSingleCreatureFromStorage(NPC_MR_SMITE)) - DoScriptText(INST_SAY_ALARM2, pMrSmite); + switch (m_uiDoorStep) + { + case 0: + DoUseDoorOrButton(GO_IRON_CLAD_DOOR, 0, true); + + if (Creature* pMrSmite = GetSingleCreatureFromStorage(NPC_MR_SMITE)) + DoScriptText(INST_SAY_ALARM1, pMrSmite); + + if (GameObject* pDoor = GetSingleGameObjectFromStorage(GO_IRON_CLAD_DOOR)) + { + // should be static spawns, fetch the closest ones at the pier + if (Creature* pi1 = GetClosestCreatureWithEntry(pDoor, NPC_PIRATE, 40.0f)) + { + pi1->SetWalk(false); + pi1->GetMotionMaster()->MovePoint(0, pDoor->GetPositionX(), pDoor->GetPositionY(), pDoor->GetPositionZ()); + } + + if (Creature* pi2 = GetClosestCreatureWithEntry(pDoor, NPC_SQUALLSHAPER, 40.0f)) + { + pi2->SetWalk(false); + pi2->GetMotionMaster()->MovePoint(0, pDoor->GetPositionX(), pDoor->GetPositionY(), pDoor->GetPositionZ()); + } + } - m_uiIronDoorTimer = 0; + ++m_uiDoorStep; + m_uiIronDoorTimer = 15000; + break; + case 1: + if (Creature* pMrSmite = GetSingleCreatureFromStorage(NPC_MR_SMITE)) + DoScriptText(INST_SAY_ALARM2, pMrSmite); + + m_uiDoorStep = 0; + m_uiIronDoorTimer = 0; + break; + } } else m_uiIronDoorTimer -= uiDiff; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index dbb215d71..8c8614da0 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2838" + #define SD2_REVISION_NR "2839" #endif // __SD2_REVISION_NR_H__ From 35a1858599a33724a35aa7aafa5bc896ecd16d43 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sun, 31 Mar 2013 01:16:32 +0200 Subject: [PATCH 0841/1172] [2840] Implement intro and outro for Tyrannus - Pit of Saron --- .../boss_forgemaster_garfrost.cpp | 2 +- .../boss_scourgelord_tyrannus.cpp | 166 +++++++++++++++++- .../pit_of_saron/instance_pit_of_saron.cpp | 136 +++++++++++++- .../pit_of_saron/pit_of_saron.cpp | 9 - .../frozen_halls/pit_of_saron/pit_of_saron.h | 31 +++- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 2 + sql/scriptdev2_script_full.sql | 13 +- sql/updates/r2840_mangos.sql | 2 + sql/updates/r2840_scriptdev2.sql | 8 + 10 files changed, 342 insertions(+), 29 deletions(-) create mode 100644 sql/updates/r2840_mangos.sql create mode 100644 sql/updates/r2840_scriptdev2.sql diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_forgemaster_garfrost.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_forgemaster_garfrost.cpp index 410fe1d43..d3c0269e5 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_forgemaster_garfrost.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_forgemaster_garfrost.cpp @@ -135,7 +135,7 @@ struct MANGOS_DLL_DECL boss_forgemaster_garfrostAI : public ScriptedAI float fX, fY, fZ; pSummoned->SetWalk(false); m_creature->GetContactPoint(pSummoned, fX, fY, fZ, 4 * INTERACTION_DISTANCE); - pSummoned->GetMotionMaster()->MovePoint(1, fX, fY, fZ); + pSummoned->GetMotionMaster()->MovePoint(0, fX, fY, fZ); break; } } diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_scourgelord_tyrannus.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_scourgelord_tyrannus.cpp index 171dc8db6..580ada497 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_scourgelord_tyrannus.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_scourgelord_tyrannus.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: boss_scourgelord_tyrannus -SD%Complete: 0% -SDComment: +SD%Complete: 20 +SDComment: Basic script SDCategory: Pit of Saron EndScriptData */ @@ -26,9 +26,6 @@ EndScriptData */ enum { - SAY_PREFIGHT_1 = -1658050, - SAY_GENERAL_TRASH = -1658051, - SAY_PREFIGHT_2 = -1658052, SAY_AGGRO = -1658053, SAY_SLAY_1 = -1658054, SAY_SLAY_2 = -1658055, @@ -40,7 +37,166 @@ enum EMOTE_SMASH = -1658060, }; +static const float afRimefangExitPos[3] = {1248.29f, 145.924f, 733.914f}; + +/*###### +## boss_tyrannus +######*/ + +struct MANGOS_DLL_DECL boss_tyrannusAI : public ScriptedAI +{ + boss_tyrannusAI(Creature *pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (instance_pit_of_saron*)pCreature->GetInstanceData(); + Reset(); + } + + instance_pit_of_saron* m_pInstance; + + void Reset() override + { + } + + void Aggro(Unit* pWho) override + { + DoScriptText(SAY_AGGRO, m_creature); + + if (m_pInstance) + { + m_pInstance->SetData(TYPE_TYRANNUS, IN_PROGRESS); + + // Set Rimefang in combat + if (Creature* pRimefang = m_pInstance->GetSingleCreatureFromStorage(NPC_RIMEFANG)) + pRimefang->AI()->AttackStart(pWho); + } + } + + void KilledUnit(Unit* pVictim) + { + DoScriptText(urand(0, 1) ? SAY_SLAY_1 : SAY_SLAY_2, m_creature); + } + + void JustDied(Unit* pKiller) override + { + DoScriptText(SAY_DEATH, m_creature); + + if (m_pInstance) + { + m_pInstance->SetData(TYPE_TYRANNUS, DONE); + + // Move Rimefang out of the area + if (Creature* pRimefang = m_pInstance->GetSingleCreatureFromStorage(NPC_RIMEFANG)) + { + pRimefang->AI()->EnterEvadeMode(); + pRimefang->SetWalk(false); + pRimefang->ForcedDespawn(25000); + pRimefang->GetMotionMaster()->MovePoint(0, afRimefangExitPos[0], afRimefangExitPos[1], afRimefangExitPos[2]); + } + + // Move the general near the boss - ToDo: move the other freed slaves as well + if (Creature* pGeneral = m_pInstance->GetSingleCreatureFromStorage(m_pInstance->GetPlayerTeam() == HORDE ? NPC_IRONSKULL_PART2 : NPC_VICTUS_PART2)) + { + float fX, fY, fZ; + pGeneral->SetWalk(false); + m_creature->GetContactPoint(pGeneral, fX, fY, fZ, INTERACTION_DISTANCE); + pGeneral->GetMotionMaster()->MovePoint(0, fX, fY, fZ); + } + } + } + + void JustReachedHome() override + { + if (m_pInstance) + m_pInstance->SetData(TYPE_TYRANNUS, FAIL); + } + + void UpdateAI(const uint32 uiDiff) override + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_tyrannus(Creature* pCreature) +{ + return new boss_tyrannusAI (pCreature); +} + +/*###### +## boss_rimefang_pos +######*/ + +struct MANGOS_DLL_DECL boss_rimefang_posAI : public ScriptedAI +{ + boss_rimefang_posAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + SetCombatMovement(false); + m_uiMountTimer = 1000; + Reset(); + } + + ScriptedInstance* m_pInstance; + uint32 m_uiMountTimer; + + void Reset() override { } + + void EnterEvadeMode() override + { + m_creature->RemoveAllAurasOnEvade(); + m_creature->DeleteThreatList(); + m_creature->CombatStop(true); + m_creature->LoadCreatureAddon(true); + + m_creature->SetLootRecipient(NULL); + + Reset(); + + // Don't handle movement. + } + + void UpdateAI(const uint32 uiDiff) override + { + if (!m_pInstance) + return; + + // He needs to be mounted manually, not by vehicle_accessories + /*if (m_uiMountTimer) + { + if (m_uiMountTimer <= uiDiff) + { + if (Creature* pTyrannus = m_pInstance->GetSingleCreatureFromStorage(NPC_TYRANNUS)) + pTyrannus->CastSpell(m_creature, SPELL_RIDE_VEHICLE_HARDCODED, true); + + m_uiMountTimer = 0; + } + else + m_uiMountTimer -= uiDiff; + }*/ + + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + } +}; + +CreatureAI* GetAI_boss_rimefang_pos(Creature* pCreature) +{ + return new boss_rimefang_posAI(pCreature); +} + void AddSC_boss_tyrannus() { + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_tyrannus"; + pNewScript->GetAI = &GetAI_boss_tyrannus; + pNewScript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "boss_rimefang_pos"; + pNewScript->GetAI = &GetAI_boss_rimefang_pos; + pNewScript->RegisterSelf(); } diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/instance_pit_of_saron.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/instance_pit_of_saron.cpp index f7d818af4..3d75b61f0 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/instance_pit_of_saron.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/instance_pit_of_saron.cpp @@ -16,7 +16,7 @@ /* ScriptData SDName: instance_pit_of_saron -SD%Complete: 50% +SD%Complete: 80% SDComment: SDCategory: Pit of Saron EndScriptData */ @@ -75,7 +75,33 @@ enum // Gauntlet spells SPELL_ICICLE_SUMMON = 69424, - SPELL_ACHIEVEMENT_CHECK = 72845 + SPELL_ACHIEVEMENT_CHECK = 72845, + + // Tyrannus intro + SAY_PREFIGHT_1 = -1658050, + SAY_VICTUS_TRASH = -1658051, + SAY_IRONSKULL_TRASH = -1658068, + SAY_PREFIGHT_2 = -1658052, + + SPELL_EJECT_ALL_PASSENGERS = 50630, + // SPELL_CSA_DUMMY_EFFECT_1 = 56685, // What is this? + + // Sindragosa outro + SAY_VICTUS_OUTRO_1 = -1658061, + SAY_IRONSKULL_OUTRO_2 = -1658069, + SAY_GENERAL_OUTRO_2 = -1658062, + SAY_JAINA_OUTRO_1 = -1658063, + SAY_SYLVANAS_OUTRO_1 = -1658064, + SAY_JAINA_OUTRO_2 = -1658065, + SAY_JAINA_OUTRO_3 = -1658066, + SAY_SYLVANAS_OUTRO_2 = -1658067, + + SPELL_FROST_BOMB = 70521, + SPELL_CALL_OF_SYLVANAS_1 = 70636, // triggers 70639 + SPELL_CALL_OF_SYLVANAS_2 = 70638, + // SPELL_CALL_OF_SYLVANAS_3 = 70642, + SPELL_JAINAS_CALL_1 = 70527, // triggers 70525 + SPELL_JAINAS_CALL_2 = 70623, }; static const DialogueEntryTwoSide aPoSDialogues[] = @@ -94,7 +120,7 @@ static const DialogueEntryTwoSide aPoSDialogues[] = {SAY_JAINA_INTRO_5, NPC_JAINA_PART1, SAY_SYLVANAS_INTRO_4, NPC_SYLVANAS_PART1, 0}, // Garfrost outro - {NPC_GARFROST, 0, 0, 0, 4000}, + {NPC_GARFROST, 0, 0, 0, 4000}, // ToDo: move the freed slaves to position {SAY_GENERAL_GARFROST, NPC_VICTUS_PART1, SAY_GENERAL_GARFROST, NPC_IRONSKULL_PART1, 2000}, {SAY_TYRANNUS_GARFROST, NPC_TYRANNUS_INTRO, 0, 0, 0}, @@ -108,6 +134,23 @@ static const DialogueEntryTwoSide aPoSDialogues[] = {SAY_OUTRO_4, NPC_KRICK, 0, 0, 3000}, {SAY_TYRANNUS_KRICK_2, NPC_TYRANNUS_INTRO, 0, 0, 11000}, {SAY_JAINA_KRICK_3, NPC_JAINA_PART1, SAY_SYLVANAS_KRICK_3, NPC_SYLVANAS_PART1, 0}, + + // Tyrannus intro + {NPC_TYRANNUS, 0, 0, 0, 10000}, // ToDo: move the freed slaves to position + {SAY_PREFIGHT_1, NPC_TYRANNUS, 0, 0, 13000}, + {SAY_VICTUS_TRASH, NPC_VICTUS_PART2, SAY_IRONSKULL_TRASH, NPC_IRONSKULL_PART2, 9000}, + {SAY_PREFIGHT_2, NPC_TYRANNUS, 0, 0, 10000}, + {NPC_RIMEFANG, 0, 0, 0, 0}, + + // Tyrannus outro + {NPC_SINDRAGOSA, 0, 0, 0, 30000}, + {SAY_VICTUS_OUTRO_1, NPC_VICTUS_PART2, SAY_IRONSKULL_OUTRO_2, NPC_IRONSKULL_PART2, 17000}, + {SAY_GENERAL_OUTRO_2, NPC_VICTUS_PART2, SAY_GENERAL_OUTRO_2, NPC_IRONSKULL_PART2, 14000}, + {SAY_JAINA_OUTRO_1, NPC_JAINA_PART2, SAY_SYLVANAS_OUTRO_1, NPC_SYLVANAS_PART2, 1000}, + {SPELL_FROST_BOMB, 0, 0, 0, 7000}, + {NPC_JAINA_PART2, 0, 0, 0, 8000}, + {SAY_JAINA_OUTRO_2, NPC_JAINA_PART2, SAY_SYLVANAS_OUTRO_2, NPC_SYLVANAS_PART2, 15000}, + {SAY_JAINA_OUTRO_3, NPC_JAINA_PART2, 0, 0, 0}, {0, 0, 0}, }; @@ -177,6 +220,11 @@ void instance_pit_of_saron::OnCreatureCreate(Creature* pCreature) case NPC_RIMEFANG: case NPC_IRONSKULL_PART1: case NPC_VICTUS_PART1: + case NPC_IRONSKULL_PART2: + case NPC_VICTUS_PART2: + case NPC_JAINA_PART2: + case NPC_SYLVANAS_PART2: + case NPC_SINDRAGOSA: m_mNpcEntryGuidStore[pCreature->GetEntry()] = pCreature->GetObjectGuid(); break; case NPC_STALKER: @@ -241,6 +289,8 @@ void instance_pit_of_saron::SetData(uint32 uiType, uint32 uiData) break; case TYPE_TYRANNUS: m_auiEncounter[uiType] = uiData; + if (uiData == DONE) + StartNextDialogueText(NPC_SINDRAGOSA); break; default: return; @@ -342,7 +392,9 @@ void instance_pit_of_saron::OnCreatureDeath(Creature* pCreature) { pCreature->CastSpell(pCreature, SPELL_ACHIEVEMENT_CHECK, true); m_uiIciclesTimer = 0; - // ToDo: start tyrannus intro event + + // Start Tyrannus intro + StartNextDialogueText(NPC_TYRANNUS); } } // Check for the ambush event @@ -426,6 +478,82 @@ void instance_pit_of_saron::JustDidDialogueStep(int32 iEntry) if (Creature* pTyrannus = GetSingleCreatureFromStorage(NPC_TYRANNUS_INTRO)) pTyrannus->GetMotionMaster()->MovePoint(0, afTyrannusMovePos[0][0], afTyrannusMovePos[0][1], afTyrannusMovePos[0][2]); break; + case NPC_TYRANNUS: + { + Creature* pTyrannus = GetSingleCreatureFromStorage(NPC_TYRANNUS); + if (!pTyrannus) + return; + + // Spawn tunnel end event mobs + for (uint8 i = 0; i < countof(aEventTunnelEndLocations); ++i) + { + if (Creature* pSummon = pTyrannus->SummonCreature(m_uiTeam == HORDE ? aEventTunnelEndLocations[i].uiEntryHorde : aEventTunnelEndLocations[i].uiEntryAlliance, + aEventTunnelEndLocations[i].fX, aEventTunnelEndLocations[i].fY, aEventTunnelEndLocations[i].fZ, aEventTunnelEndLocations[i].fO, TEMPSUMMON_DEAD_DESPAWN, 0)) + { + pSummon->SetWalk(false); + pSummon->GetMotionMaster()->MovePoint(0, aEventTunnelEndLocations[i].fMoveX, aEventTunnelEndLocations[i].fMoveY, aEventTunnelEndLocations[i].fMoveZ); + } + } + break; + } + case NPC_RIMEFANG: + if (Creature* pRimefang = GetSingleCreatureFromStorage(NPC_RIMEFANG)) + { + pRimefang->CastSpell(pRimefang, SPELL_EJECT_ALL_PASSENGERS, true); + pRimefang->SetWalk(false); + pRimefang->GetMotionMaster()->MovePoint(0, afTyrannusMovePos[3][0], afTyrannusMovePos[3][1], afTyrannusMovePos[3][2]); + } + break; + case SAY_VICTUS_OUTRO_1: + { + Player* pPlayer = GetPlayerInMap(); + if (!pPlayer) + return; + + // Spawn Sindragosa + if (Creature* pSummon = pPlayer->SummonCreature(aEventOutroLocations[0].uiEntryHorde, aEventOutroLocations[0].fX, aEventOutroLocations[0].fY, + aEventOutroLocations[0].fZ, aEventOutroLocations[0].fO, TEMPSUMMON_TIMED_DESPAWN, 2 * MINUTE * IN_MILLISECONDS)) + { + pSummon->SetWalk(false); + pSummon->GetMotionMaster()->MovePoint(0, aEventOutroLocations[0].fMoveX, aEventOutroLocations[0].fMoveY, aEventOutroLocations[0].fMoveZ); + } + // Spawn Jaina or Sylvanas + if (Creature* pSummon = pPlayer->SummonCreature(m_uiTeam == HORDE ? aEventOutroLocations[1].uiEntryHorde : aEventOutroLocations[1].uiEntryAlliance, + aEventOutroLocations[1].fX, aEventOutroLocations[1].fY, aEventOutroLocations[1].fZ, aEventOutroLocations[1].fO, TEMPSUMMON_TIMED_DESPAWN, 24 * HOUR * IN_MILLISECONDS)) + { + pSummon->SetWalk(false); + pSummon->GetMotionMaster()->MovePoint(0, aEventOutroLocations[1].fMoveX, aEventOutroLocations[1].fMoveY, aEventOutroLocations[1].fMoveZ); + } + break; + } + case SAY_JAINA_OUTRO_1: + if (Creature* pTemp = GetSingleCreatureFromStorage(m_uiTeam == HORDE ? NPC_SYLVANAS_PART2 : NPC_JAINA_PART2)) + { + pTemp->CastSpell(pTemp, m_uiTeam == HORDE ? SPELL_CALL_OF_SYLVANAS_2 : SPELL_JAINAS_CALL_2, true); + pTemp->CastSpell(pTemp, m_uiTeam == HORDE ? SPELL_CALL_OF_SYLVANAS_2 : SPELL_JAINAS_CALL_2, true); + } + break; + case SPELL_FROST_BOMB: + if (Creature* pSindragosa = GetSingleCreatureFromStorage(NPC_SINDRAGOSA)) + pSindragosa->CastSpell(pSindragosa, SPELL_FROST_BOMB, true); + break; + case NPC_JAINA_PART2: + if (Creature* pSindragosa = GetSingleCreatureFromStorage(NPC_SINDRAGOSA)) + pSindragosa->GetMotionMaster()->MovePoint(0, 759.148f, 199.955f, 720.857f); + // Move in front + if (Creature* pTemp = GetSingleCreatureFromStorage(m_uiTeam == HORDE ? NPC_SYLVANAS_PART2 : NPC_JAINA_PART2)) + { + pTemp->SetWalk(true); + pTemp->GetMotionMaster()->MovePoint(0, 1057.76f, 111.927f, 628.4123f); + } + break; + case SAY_JAINA_OUTRO_2: + if (Creature* pTemp = GetSingleCreatureFromStorage(m_uiTeam == HORDE ? NPC_SYLVANAS_PART2 : NPC_JAINA_PART2)) + pTemp->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER); + + // ToDo: Jaina / Sylvanas should have some waypoint movement here and the door should be opened only when they get in front of it. + DoUseDoorOrButton(GO_HALLS_OF_REFLECT_PORT); + break; } } diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/pit_of_saron.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/pit_of_saron.cpp index 5702b7600..8370623b3 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/pit_of_saron.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/pit_of_saron.cpp @@ -29,15 +29,6 @@ EndContentData */ enum { - // Sindragosa outro - SAY_GENERAL_OUTRO_1 = -1658061, - SAY_GENERAL_OUTRO_2 = -1658062, - SAY_JAINA_OUTRO_1 = -1658063, - SAY_SYLVANAS_OUTRO_1 = -1658064, - SAY_JAINA_OUTRO_2 = -1658065, - SAY_JAINA_OUTRO_3 = -1658066, - SAY_SYLVANAS_OUTRO_2 = -1658067, - // Ambush event SPELL_EMPOWERED_SHADOW_BOLT = 69528, SPELL_SUMMON_UNDEAD = 69516, diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/pit_of_saron.h b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/pit_of_saron.h index 6a6a780c8..07862506f 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/pit_of_saron.h +++ b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/pit_of_saron.h @@ -17,6 +17,7 @@ enum TYPE_ACHIEV_DOESNT_GO_ELEVEN = 0, TYPE_ACHIEV_DONT_LOOK_UP = 1, + // Bosses NPC_TYRANNUS_INTRO = 36794, NPC_GARFROST = 36494, NPC_KRICK = 36477, @@ -25,6 +26,7 @@ enum NPC_RIMEFANG = 36661, NPC_SINDRAGOSA = 37755, + // Intro part npcs NPC_SYLVANAS_PART1 = 36990, NPC_SYLVANAS_PART2 = 38189, NPC_JAINA_PART1 = 36993, @@ -40,12 +42,20 @@ enum NPC_CHAMPION_2_ALLIANCE = 37497, NPC_CHAMPION_3_ALLIANCE = 37498, NPC_CORRUPTED_CHAMPION = 36796, + + // Enslaved npcs NPC_IRONSKULL_PART1 = 37592, - NPC_IRONSKULL_PART2 = 37592, + NPC_IRONSKULL_PART2 = 37581, NPC_VICTUS_PART1 = 37591, NPC_VICTUS_PART2 = 37580, - - // ambush npcs + NPC_FREE_HORDE_SLAVE_1 = 37577, + NPC_FREE_HORDE_SLAVE_2 = 37578, + NPC_FREE_HORDE_SLAVE_3 = 37579, + NPC_FREE_ALLIANCE_SLAVE_1 = 37572, + NPC_FREE_ALLIANCE_SLAVE_2 = 37575, + NPC_FREE_ALLIANCE_SLAVE_3 = 37576, + + // Ambush npcs NPC_YMIRJAR_DEATHBRINGER = 36892, NPC_YMIRJAR_WRATHBRINGER = 36840, NPC_YMIRJAR_FLAMEBEARER = 36893, @@ -64,11 +74,12 @@ enum ACHIEV_CRIT_DONT_LOOK_UP = 12994, // Gauntlet, achiev 4525 }; -static const float afTyrannusMovePos[3][3] = +static const float afTyrannusMovePos[4][3] = { {922.6365f, 145.877f, 643.2216f}, // Hide position {835.5887f, 139.4345f, 530.9526f}, // Ick position {906.9048f, -49.03813f, 618.8016f}, // Tunnel position + {966.3345f, 159.2058f, 665.0453f}, // Rimefang position }; struct EventNpcLocations @@ -106,6 +117,18 @@ const EventNpcLocations aEventSecondAmbushLocations[] = {NPC_COLDWRAITH, 0, 923.3785f, -74.6441f, 592.368f, 2.37f, 920.726f, -42.32272f, 589.9808f} }; +const EventNpcLocations aEventTunnelEndLocations[] = +{ + {NPC_IRONSKULL_PART2, NPC_VICTUS_PART2, 1071.45f, 48.23907f, 630.4871f, 1.68f, 1046.361f, 124.7031f, 628.2811f}, + // ToDo: add the freed slaves here when proper waypoint movement is supported +}; +const EventNpcLocations aEventOutroLocations[] = +{ + {NPC_SINDRAGOSA, 0, 842.8611f, 194.5556f, 531.6536f, 6.108f, 900.106f, 181.677f, 659.374f}, + {NPC_SYLVANAS_PART2, NPC_JAINA_PART2, 1062.85f, 100.075f, 631.0021f, 1.77f, 1062.85f, 100.075f, 631.0021f}, +}; + + class MANGOS_DLL_DECL instance_pit_of_saron : public ScriptedInstance, private DialogueHelper { public: diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 8c8614da0..91cd27028 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2839" + #define SD2_REVISION_NR "2840" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 6e5fec8fb..1640c453f 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -715,6 +715,8 @@ UPDATE creature_template SET ScriptName='boss_ick' WHERE entry=36476; UPDATE creature_template SET ScriptName='npc_exploding_orb' WHERE entry=36610; UPDATE creature_template SET ScriptName='npc_ymirjar_deathbringer' WHERE entry=36892; UPDATE creature_template SET ScriptName='npc_collapsing_icicle' WHERE entry=36847; +UPDATE creature_template SET ScriptName='boss_tyrannus' WHERE entry=36658; +UPDATE creature_template SET ScriptName='boss_rimefang_pos' WHERE entry=36661; DELETE FROM scripted_areatrigger WHERE entry=5578; INSERT INTO scripted_areatrigger VALUES (5578,'at_pit_of_saron'); diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 38d44c71a..7f08f4fbf 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -4362,7 +4362,7 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1658049,'Rimefang! Trap them within the tunnel! Bury them alive!',16757,6,0,0,'tyrannus SAY_GAUNTLET'), (-1658050,'Alas, brave, brave adventurers, your meddling has reached its end. Do you hear the clatter of bone and steel coming up the tunnel behind you? That is the sound of your impending demise.',16758,1,0,0,'tyrannus SAY_PREFIGHT_1'), -(-1658051,'Heroes! We will hold off the undead as long as we can, even to our dying breath. Deal with the Scourgelord!',0,1,0,0,'victus_or_ironskull SAY_GENERAL_TRASH'), +(-1658051,'Heroes! We will hold off the undead as long as we can, even to our dying breath. Deal with the Scourgelord!',17148,1,0,0,'victus SAY_VICTUS_TRASH'), (-1658052,'Ha, such an amusing gesture from the rabble. When I have finished with you, my master\'s blade will feast upon your souls. Die!',16759,1,0,0,'tyrannus SAY_PREFIGHT_2'), (-1658053,'I shall not fail The Lich King! Come and meet your end!',16760,1,0,0,'tyrannus SAY_AGGRO'), (-1658054,'Such a shameful display...',16761,1,0,0,'tyrannus SAY_SLAY_1'), @@ -4373,13 +4373,16 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1658059,'The frostwyrm %s gazes at $N and readies an icy attack!',0,3,0,0,'rimefang EMOTE_RIMEFANG_ICEBOLT'), (-1658060,'%s roars and swells with dark might!',0,3,0,0,'tyrannus EMOTE_SMASH'), -(-1658061,'Brave champions, we owe you our lives, our freedom... Though it be a tiny gesture in the face of this enormous debt, I pledge that from this day forth, all will know of your deeds, and the blazing path of light you cut through the shadow of this dark citadel.',0,1,0,0,'victus_or_ironskull SAY_GENERAL_OUTRO_1'), +(-1658061,'Brave champions, we owe you our lives, our freedom... Though it be a tiny gesture in the face of this enormous debt, I pledge that from this day forth, all will know of your deeds, and the blazing path of light you cut through the shadow of this dark citadel.',17149,1,0,0,'victus SAY_VICTUS_OUTRO_1'), (-1658062,'This day will stand as a testament not only to your valor, but to the fact that no foe, not even the Lich King himself, can stand when Alliance and Horde set aside their differences and ---',0,1,0,0,'victus_or_ironskull SAY_GENERAL_OUTRO_2'), -(-1658063,'Heroes, to me!',16614,0,0,0,'jaina SAY_JAINA_OUTRO_1'), -(-1658064,'Take cover behind me! Quickly!',17037,0,0,0,'sylvanas SAY_SYLVANAS_OUTRO_1'), +(-1658063,'Heroes, to me!',16614,0,0,5,'jaina SAY_JAINA_OUTRO_1'), +(-1658064,'Take cover behind me! Quickly!',17037,0,0,5,'sylvanas SAY_SYLVANAS_OUTRO_1'), (-1658065,'The Frost Queen is gone. We must keep moving - our objective is near.',16615,0,0,0,'jaina SAY_JAINA_OUTRO_2'), (-1658066,'I... I could not save them... Damn you, Arthas! DAMN YOU!',16616,0,0,0,'jaina SAY_JAINA_OUTRO_3'), -(-1658067,'I thought he\'d never shut up. At last, Sindragosa silenced that long-winded fool. To the Halls of Reflection, champions! Our objective is near... I can sense it.',17036,0,0,0,'sylvanas SAY_SYLVANAS_OUTRO_2'); +(-1658067,'I thought he\'d never shut up. At last, Sindragosa silenced that long-winded fool. To the Halls of Reflection, champions! Our objective is near... I can sense it.',17036,0,0,396,'sylvanas SAY_SYLVANAS_OUTRO_2'), + +(-1658068,'Heroes! We will hold off the undead as long as we can, even to our dying breath. Deal with the Scourgelord!',17150,1,0,0,'ironskull SAY_IRONSKULL_TRASH'), +(-1658069,'Brave champions, we owe you our lives, our freedom... Though it be a tiny gesture in the face of this enormous debt, I pledge that from this day forth, all will know of your deeds, and the blazing path of light you cut through the shadow of this dark citadel.',17151,1,0,0,'ironskull SAY_IRONSKULL_OUTRO_1'); -- -1 668 000 ICC: HALLS OF REFLECTION diff --git a/sql/updates/r2840_mangos.sql b/sql/updates/r2840_mangos.sql new file mode 100644 index 000000000..053198064 --- /dev/null +++ b/sql/updates/r2840_mangos.sql @@ -0,0 +1,2 @@ +UPDATE creature_template SET ScriptName='boss_tyrannus' WHERE entry=36658; +UPDATE creature_template SET ScriptName='boss_rimefang_pos' WHERE entry=36661; diff --git a/sql/updates/r2840_scriptdev2.sql b/sql/updates/r2840_scriptdev2.sql new file mode 100644 index 000000000..bf1fbaa47 --- /dev/null +++ b/sql/updates/r2840_scriptdev2.sql @@ -0,0 +1,8 @@ +UPDATE script_texts SET emote=5 WHERE entry IN (-1658063,-1658064); +UPDATE script_texts SET emote=396 WHERE entry IN (-1658067); +DELETE FROM script_texts WHERE entry IN (-1658051,-1658061,-1658068,-1658069); +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1658051,'Heroes! We will hold off the undead as long as we can, even to our dying breath. Deal with the Scourgelord!',17148,1,0,0,'victus SAY_VICTUS_TRASH'), +(-1658061,'Brave champions, we owe you our lives, our freedom... Though it be a tiny gesture in the face of this enormous debt, I pledge that from this day forth, all will know of your deeds, and the blazing path of light you cut through the shadow of this dark citadel.',17149,1,0,0,'victus SAY_VICTUS_OUTRO_1'), +(-1658068,'Heroes! We will hold off the undead as long as we can, even to our dying breath. Deal with the Scourgelord!',17150,1,0,0,'ironskull SAY_IRONSKULL_TRASH'), +(-1658069,'Brave champions, we owe you our lives, our freedom... Though it be a tiny gesture in the face of this enormous debt, I pledge that from this day forth, all will know of your deeds, and the blazing path of light you cut through the shadow of this dark citadel.',17151,1,0,0,'ironskull SAY_IRONSKULL_OUTRO_1'); From 8dae1889d82ff4b3b6e01e0d2c2e9db7e0255e64 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sun, 31 Mar 2013 12:19:23 +0300 Subject: [PATCH 0842/1172] [2841] Improve previous commits This will add some missing visuals to the Tyrannus outro --- .../pit_of_saron/boss_krick_and_ick.cpp | 2 +- .../boss_scourgelord_tyrannus.cpp | 4 +- .../pit_of_saron/instance_pit_of_saron.cpp | 39 ++++++++++++++++++- .../frozen_halls/pit_of_saron/pit_of_saron.h | 3 ++ sd2_revision_nr.h | 2 +- 5 files changed, 45 insertions(+), 5 deletions(-) diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_krick_and_ick.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_krick_and_ick.cpp index c7b2127da..f70c580e4 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_krick_and_ick.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_krick_and_ick.cpp @@ -75,7 +75,7 @@ struct MANGOS_DLL_DECL boss_ickAI : public ScriptedAI boss_ickAI(Creature *pCreature) : ScriptedAI(pCreature) { m_pInstance = (instance_pit_of_saron*)pCreature->GetInstanceData(); - m_uiMountTimer = 3000; + m_uiMountTimer = 1000; Reset(); } diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_scourgelord_tyrannus.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_scourgelord_tyrannus.cpp index 580ada497..e1ec0e785 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_scourgelord_tyrannus.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_scourgelord_tyrannus.cpp @@ -163,7 +163,7 @@ struct MANGOS_DLL_DECL boss_rimefang_posAI : public ScriptedAI return; // He needs to be mounted manually, not by vehicle_accessories - /*if (m_uiMountTimer) + if (m_uiMountTimer) { if (m_uiMountTimer <= uiDiff) { @@ -174,7 +174,7 @@ struct MANGOS_DLL_DECL boss_rimefang_posAI : public ScriptedAI } else m_uiMountTimer -= uiDiff; - }*/ + } if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/instance_pit_of_saron.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/instance_pit_of_saron.cpp index 3d75b61f0..4c0cf038b 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/instance_pit_of_saron.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/instance_pit_of_saron.cpp @@ -97,6 +97,8 @@ enum SAY_SYLVANAS_OUTRO_2 = -1658067, SPELL_FROST_BOMB = 70521, + SPELL_FROZEN_AFTERMATH = 70518, + SPELL_ARCANE_FORM = 70573, SPELL_CALL_OF_SYLVANAS_1 = 70636, // triggers 70639 SPELL_CALL_OF_SYLVANAS_2 = 70638, // SPELL_CALL_OF_SYLVANAS_3 = 70642, @@ -243,6 +245,15 @@ void instance_pit_of_saron::OnCreatureCreate(Creature* pCreature) else m_lTunnelNpcGuidList.push_back(pCreature->GetObjectGuid()); break; + case NPC_GENERAL_BUNNY: + if (pCreature->GetPositionY() < 130.0f) + { + if (pCreature->GetOrientation() != 0) + m_lArcaneShieldBunniesGuidList.push_back(pCreature->GetObjectGuid()); + else + m_lFrozenAftermathBunniesGuidList.push_back(pCreature->GetObjectGuid()); + } + break; } } @@ -447,6 +458,7 @@ void instance_pit_of_saron::JustDidDialogueStep(int32 iEntry) switch (iEntry) { case SPELL_NECROMATIC_POWER: + // Transfor all soldiers into undead if (Creature* pTyrannus = GetSingleCreatureFromStorage(NPC_TYRANNUS_INTRO)) pTyrannus->CastSpell(pTyrannus, SPELL_NECROMATIC_POWER, true); break; @@ -459,6 +471,7 @@ void instance_pit_of_saron::JustDidDialogueStep(int32 iEntry) } break; case SPELL_STRANGULATING: + // Strangulate Krick if (Creature* pKrick = GetSingleCreatureFromStorage(NPC_KRICK)) { pKrick->CastSpell(pKrick, SPELL_STRANGULATING, true); @@ -467,6 +480,7 @@ void instance_pit_of_saron::JustDidDialogueStep(int32 iEntry) } break; case SAY_TYRANNUS_KRICK_2: + // Kill Krick if (Creature* pKrick = GetSingleCreatureFromStorage(NPC_KRICK)) { pKrick->CastSpell(pKrick, SPELL_KRICK_KILL_CREDIT, true); @@ -475,6 +489,7 @@ void instance_pit_of_saron::JustDidDialogueStep(int32 iEntry) break; case SAY_JAINA_INTRO_3: case SAY_JAINA_KRICK_3: + // Move Tyrannus to a safe position if (Creature* pTyrannus = GetSingleCreatureFromStorage(NPC_TYRANNUS_INTRO)) pTyrannus->GetMotionMaster()->MovePoint(0, afTyrannusMovePos[0][0], afTyrannusMovePos[0][1], afTyrannusMovePos[0][2]); break; @@ -497,6 +512,7 @@ void instance_pit_of_saron::JustDidDialogueStep(int32 iEntry) break; } case NPC_RIMEFANG: + // Eject Tyrannus and prepare for combat if (Creature* pRimefang = GetSingleCreatureFromStorage(NPC_RIMEFANG)) { pRimefang->CastSpell(pRimefang, SPELL_EJECT_ALL_PASSENGERS, true); @@ -527,6 +543,13 @@ void instance_pit_of_saron::JustDidDialogueStep(int32 iEntry) break; } case SAY_JAINA_OUTRO_1: + // Visual effect + for (GuidList::const_iterator itr = m_lArcaneShieldBunniesGuidList.begin(); itr != m_lArcaneShieldBunniesGuidList.end(); ++itr) + { + if (Creature* pBunny = instance->GetCreature(*itr)) + pBunny->CastSpell(pBunny, SPELL_ARCANE_FORM, true); + } + // Teleport players if (Creature* pTemp = GetSingleCreatureFromStorage(m_uiTeam == HORDE ? NPC_SYLVANAS_PART2 : NPC_JAINA_PART2)) { pTemp->CastSpell(pTemp, m_uiTeam == HORDE ? SPELL_CALL_OF_SYLVANAS_2 : SPELL_JAINAS_CALL_2, true); @@ -534,13 +557,27 @@ void instance_pit_of_saron::JustDidDialogueStep(int32 iEntry) } break; case SPELL_FROST_BOMB: + // Frost bomb on the platform if (Creature* pSindragosa = GetSingleCreatureFromStorage(NPC_SINDRAGOSA)) pSindragosa->CastSpell(pSindragosa, SPELL_FROST_BOMB, true); + // Visual effect + for (GuidList::const_iterator itr = m_lFrozenAftermathBunniesGuidList.begin(); itr != m_lFrozenAftermathBunniesGuidList.end(); ++itr) + { + if (Creature* pBunny = instance->GetCreature(*itr)) + pBunny->CastSpell(pBunny, SPELL_FROZEN_AFTERMATH, true); + } break; case NPC_JAINA_PART2: + // Visual effect remove + for (GuidList::const_iterator itr = m_lArcaneShieldBunniesGuidList.begin(); itr != m_lArcaneShieldBunniesGuidList.end(); ++itr) + { + if (Creature* pBunny = instance->GetCreature(*itr)) + pBunny->RemoveAurasDueToSpell(SPELL_ARCANE_FORM); + } + // Sindragosa exit if (Creature* pSindragosa = GetSingleCreatureFromStorage(NPC_SINDRAGOSA)) pSindragosa->GetMotionMaster()->MovePoint(0, 759.148f, 199.955f, 720.857f); - // Move in front + // Jaina / Sylvanas starts moving (should use wp) if (Creature* pTemp = GetSingleCreatureFromStorage(m_uiTeam == HORDE ? NPC_SYLVANAS_PART2 : NPC_JAINA_PART2)) { pTemp->SetWalk(true); diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/pit_of_saron.h b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/pit_of_saron.h index 07862506f..8accbd788 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/pit_of_saron.h +++ b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/pit_of_saron.h @@ -64,6 +64,7 @@ enum NPC_SKELETON = 36877, NPC_DISTURBED_REVENANT = 36874, NPC_STALKER = 32780, + NPC_GENERAL_BUNNY = 24110, GO_ICEWALL = 201885, // open after gafrost/krick GO_HALLS_OF_REFLECT_PORT = 201848, // unlocked by jaina/sylvanas at last outro @@ -177,6 +178,8 @@ class MANGOS_DLL_DECL instance_pit_of_saron : public ScriptedInstance, private D GuidList m_lTunnelStalkersGuidList; GuidList m_lTunnelNpcGuidList; GuidList m_lAmbushNpcsGuidList; + GuidList m_lArcaneShieldBunniesGuidList; + GuidList m_lFrozenAftermathBunniesGuidList; }; #endif diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 91cd27028..a23d34f5c 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2840" + #define SD2_REVISION_NR "2841" #endif // __SD2_REVISION_NR_H__ From a2c53e44012a5494b8bcf0a4300b7bb612f006ff Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sun, 31 Mar 2013 17:54:17 +0300 Subject: [PATCH 0843/1172] [2842] Implement script for Scourgelord Tyrannus - Pit of Saron This will conclude the Pit of Saron implementation. There are however a few small things which still need to be implemented or fixed, but the main instance events are fully playable. Thank you for choosing SD2 and please don't forget to report any issues that you find! --- .../pit_of_saron/boss_krick_and_ick.cpp | 2 +- .../boss_scourgelord_tyrannus.cpp | 143 +++++++++++++++++- .../pit_of_saron/instance_pit_of_saron.cpp | 59 ++++---- .../pit_of_saron/pit_of_saron.cpp | 25 ++- .../frozen_halls/pit_of_saron/pit_of_saron.h | 11 +- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 6 +- sql/updates/r2842_mangos.sql | 3 + 8 files changed, 192 insertions(+), 59 deletions(-) create mode 100644 sql/updates/r2842_mangos.sql diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_krick_and_ick.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_krick_and_ick.cpp index f70c580e4..7d5993d52 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_krick_and_ick.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_krick_and_ick.cpp @@ -72,7 +72,7 @@ static const float afTyrannusTeleLoc[4] = {841.01f, 196.245f, 573.964f, 4.46f}; struct MANGOS_DLL_DECL boss_ickAI : public ScriptedAI { - boss_ickAI(Creature *pCreature) : ScriptedAI(pCreature) + boss_ickAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (instance_pit_of_saron*)pCreature->GetInstanceData(); m_uiMountTimer = 1000; diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_scourgelord_tyrannus.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_scourgelord_tyrannus.cpp index e1ec0e785..1022d0937 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_scourgelord_tyrannus.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_scourgelord_tyrannus.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: boss_scourgelord_tyrannus -SD%Complete: 20 -SDComment: Basic script +SD%Complete: 80 +SDComment: Icy Blast not fully implemented. SDCategory: Pit of Saron EndScriptData */ @@ -35,6 +35,21 @@ enum EMOTE_RIMEFANG_ICEBOLT = -1658059, EMOTE_SMASH = -1658060, + + // Tyrannus spells + SPELL_FORCEFUL_SMASH = 69155, + SPELL_OVERLORDS_BRAND = 69172, // triggers 69189 and 69190 from target + SPELL_UNHOLY_POWER = 69167, + SPELL_MARK_OF_RIMEFANG = 69275, + + // Rimefang spells + SPELL_HOARFROST = 69246, + SPELL_ICY_BLAST = 69232, + SPELL_KILLING_ICE = 72531, + + // Icy blast + SPELL_ICY_BLAST_AURA = 69238, + NPC_ICY_BLAST = 36731, }; static const float afRimefangExitPos[3] = {1248.29f, 145.924f, 733.914f}; @@ -45,16 +60,26 @@ static const float afRimefangExitPos[3] = {1248.29f, 145.924f, 733.914f}; struct MANGOS_DLL_DECL boss_tyrannusAI : public ScriptedAI { - boss_tyrannusAI(Creature *pCreature) : ScriptedAI(pCreature) + boss_tyrannusAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (instance_pit_of_saron*)pCreature->GetInstanceData(); + pCreature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); Reset(); } instance_pit_of_saron* m_pInstance; + uint32 m_uiForcefulSmashTimer; + uint32 m_uiOverlordsBrandTimer; + uint32 m_uiUnholyPowerTimer; + uint32 m_uiMarkOfRimefangTimer; + void Reset() override { + m_uiForcefulSmashTimer = 10000; + m_uiOverlordsBrandTimer = 9000; + m_uiUnholyPowerTimer = urand(30000, 35000); + m_uiMarkOfRimefangTimer = 20000; } void Aggro(Unit* pWho) override @@ -65,7 +90,7 @@ struct MANGOS_DLL_DECL boss_tyrannusAI : public ScriptedAI { m_pInstance->SetData(TYPE_TYRANNUS, IN_PROGRESS); - // Set Rimefang in combat + // Set Rimefang in combat - ToDo: research if it has some wp movement during combat if (Creature* pRimefang = m_pInstance->GetSingleCreatureFromStorage(NPC_RIMEFANG)) pRimefang->AI()->AttackStart(pWho); } @@ -115,6 +140,60 @@ struct MANGOS_DLL_DECL boss_tyrannusAI : public ScriptedAI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; + if (m_uiForcefulSmashTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_FORCEFUL_SMASH) == CAST_OK) + m_uiForcefulSmashTimer = 50000; + } + else + m_uiForcefulSmashTimer -= uiDiff; + + if (m_uiOverlordsBrandTimer < uiDiff) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1)) + { + if (DoCastSpellIfCan(pTarget, SPELL_OVERLORDS_BRAND) == CAST_OK) + m_uiOverlordsBrandTimer = urand(10000, 13000); + } + } + else + m_uiOverlordsBrandTimer -= uiDiff; + + if (m_uiUnholyPowerTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_UNHOLY_POWER) == CAST_OK) + { + DoScriptText(SAY_SMASH, m_creature); + DoScriptText(EMOTE_SMASH, m_creature); + m_uiUnholyPowerTimer = 60000; + } + } + else + m_uiUnholyPowerTimer -= uiDiff; + + if (m_uiMarkOfRimefangTimer < uiDiff) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, SPELL_MARK_OF_RIMEFANG) == CAST_OK) + { + DoScriptText(SAY_MARK, m_creature); + if (m_pInstance) + { + if (Creature* pRimefang = m_pInstance->GetSingleCreatureFromStorage(NPC_RIMEFANG)) + { + pRimefang->InterruptNonMeleeSpells(true); + pRimefang->CastSpell(pTarget, SPELL_HOARFROST, false); + DoScriptText(EMOTE_RIMEFANG_ICEBOLT, pRimefang, pTarget); + } + } + m_uiMarkOfRimefangTimer = urand(20000, 25000); + } + } + } + else + m_uiMarkOfRimefangTimer -= uiDiff; + DoMeleeAttackIfReady(); } }; @@ -132,16 +211,23 @@ struct MANGOS_DLL_DECL boss_rimefang_posAI : public ScriptedAI { boss_rimefang_posAI(Creature* pCreature) : ScriptedAI(pCreature) { - m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_pInstance = (instance_pit_of_saron*)pCreature->GetInstanceData(); SetCombatMovement(false); + m_bHasDoneIntro = false; m_uiMountTimer = 1000; Reset(); } - ScriptedInstance* m_pInstance; + instance_pit_of_saron* m_pInstance; uint32 m_uiMountTimer; - void Reset() override { } + uint32 m_uiIcyBlastTimer; + bool m_bHasDoneIntro; + + void Reset() override + { + m_uiIcyBlastTimer = 8000; + } void EnterEvadeMode() override { @@ -157,6 +243,37 @@ struct MANGOS_DLL_DECL boss_rimefang_posAI : public ScriptedAI // Don't handle movement. } + void AttackStart(Unit* pWho) override + { + // Don't attack unless Tyrannus is in combat + if (m_pInstance && m_pInstance->GetData(TYPE_TYRANNUS) != IN_PROGRESS) + return; + + ScriptedAI::AttackStart(pWho); + } + + void MoveInLineOfSight(Unit* pWho) override + { + if (!m_pInstance) + return; + + // Check if ambush is done + if (m_pInstance->GetData(TYPE_AMBUSH) != DONE) + return; + + // Start the intro when possible + if (!m_bHasDoneIntro && pWho->GetTypeId() == TYPEID_PLAYER && m_creature->IsWithinDistInMap(pWho, 85.0f) && m_creature->IsWithinLOSInMap(pWho)) + { + m_pInstance->SetData(TYPE_TYRANNUS, SPECIAL); + m_bHasDoneIntro = true; + return; + } + + // Check for out of range players - ToDo: confirm the distance + if (m_pInstance->GetData(TYPE_TYRANNUS) == IN_PROGRESS && pWho->GetTypeId() == TYPEID_PLAYER && !m_creature->IsWithinDistInMap(pWho, DEFAULT_VISIBILITY_INSTANCE)) + DoCastSpellIfCan(pWho, SPELL_KILLING_ICE); + } + void UpdateAI(const uint32 uiDiff) override { if (!m_pInstance) @@ -178,6 +295,18 @@ struct MANGOS_DLL_DECL boss_rimefang_posAI : public ScriptedAI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; + + if (m_uiIcyBlastTimer < uiDiff) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + // ToDo: research how to summon the Icy Blast npc and apply the slow aura + if (DoCastSpellIfCan(pTarget, SPELL_ICY_BLAST) == CAST_OK) + m_uiIcyBlastTimer = 8000; + } + } + else + m_uiIcyBlastTimer -= uiDiff; } }; diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/instance_pit_of_saron.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/instance_pit_of_saron.cpp index 4c0cf038b..8a9fef0bf 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/instance_pit_of_saron.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/instance_pit_of_saron.cpp @@ -157,7 +157,6 @@ static const DialogueEntryTwoSide aPoSDialogues[] = }; instance_pit_of_saron::instance_pit_of_saron(Map* pMap) : ScriptedInstance(pMap), DialogueHelper(aPoSDialogues), - m_bIsAmbushStarted(false), m_uiAmbushAggroCount(0), m_uiTeam(TEAM_NONE), m_uiIciclesTimer(0) @@ -237,13 +236,9 @@ void instance_pit_of_saron::OnCreatureCreate(Creature* pCreature) case NPC_YMIRJAR_FLAMEBEARER: case NPC_FALLEN_WARRIOR: case NPC_COLDWRAITH: - case NPC_DISTURBED_REVENANT: - case NPC_SKELETON: - // Sort the ambush and the tunnel mobs + // Sort only the temporary summons if (pCreature->IsTemporarySummon()) m_lAmbushNpcsGuidList.push_back(pCreature->GetObjectGuid()); - else - m_lTunnelNpcGuidList.push_back(pCreature->GetObjectGuid()); break; case NPC_GENERAL_BUNNY: if (pCreature->GetPositionY() < 130.0f) @@ -299,9 +294,28 @@ void instance_pit_of_saron::SetData(uint32 uiType, uint32 uiData) m_auiEncounter[uiType] = uiData; break; case TYPE_TYRANNUS: - m_auiEncounter[uiType] = uiData; if (uiData == DONE) StartNextDialogueText(NPC_SINDRAGOSA); + else if (uiData == SPECIAL) + { + // Used just to start the intro + StartNextDialogueText(NPC_TYRANNUS); + return; + } + m_auiEncounter[uiType] = uiData; + break; + case TYPE_AMBUSH: + if (uiData == DONE) + { + Creature* pTyrannus = GetSingleCreatureFromStorage(NPC_TYRANNUS); + if (!pTyrannus) + return; + + // ToDo: enable this when the achiev check spells are implemented + // pTyrannus->CastSpell(pTyrannus, SPELL_ACHIEVEMENT_CHECK, true); + m_uiIciclesTimer = 0; + } + m_auiEncounter[uiType] = uiData; break; default: return; @@ -312,7 +326,7 @@ void instance_pit_of_saron::SetData(uint32 uiType, uint32 uiData) OUT_SAVE_INST_DATA; std::ostringstream saveStream; - saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2]; + saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2] << " " << m_auiEncounter[3]; m_strInstData = saveStream.str(); @@ -332,7 +346,7 @@ void instance_pit_of_saron::Load(const char* chrIn) OUT_LOAD_INST_DATA(chrIn); std::istringstream loadStream(chrIn); - loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2]; + loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3]; for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) { @@ -391,25 +405,8 @@ void instance_pit_of_saron::OnCreatureDeath(Creature* pCreature) case NPC_YMIRJAR_FLAMEBEARER: case NPC_FALLEN_WARRIOR: case NPC_COLDWRAITH: - case NPC_DISTURBED_REVENANT: - case NPC_SKELETON: // Check for tunnel event end - these mobs are not summoned - if (!pCreature->IsTemporarySummon()) - { - m_lTunnelNpcGuidList.remove(pCreature->GetObjectGuid()); - - // If all mobs in the tunnel are clearned cast the achiev spell - if (m_lTunnelNpcGuidList.empty()) - { - pCreature->CastSpell(pCreature, SPELL_ACHIEVEMENT_CHECK, true); - m_uiIciclesTimer = 0; - - // Start Tyrannus intro - StartNextDialogueText(NPC_TYRANNUS); - } - } - // Check for the ambush event - else + if (pCreature->IsTemporarySummon()) { m_lAmbushNpcsGuidList.remove(pCreature->GetObjectGuid()); @@ -519,6 +516,8 @@ void instance_pit_of_saron::JustDidDialogueStep(int32 iEntry) pRimefang->SetWalk(false); pRimefang->GetMotionMaster()->MovePoint(0, afTyrannusMovePos[3][0], afTyrannusMovePos[3][1], afTyrannusMovePos[3][2]); } + if (Creature* pTyrannus = GetSingleCreatureFromStorage(NPC_TYRANNUS)) + pTyrannus->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); break; case SAY_VICTUS_OUTRO_1: { @@ -596,10 +595,6 @@ void instance_pit_of_saron::JustDidDialogueStep(int32 iEntry) void instance_pit_of_saron::DoStartAmbushEvent() { - // This is started only once per instance - if (m_bIsAmbushStarted) - return; - Creature* pTyrannus = GetSingleCreatureFromStorage(NPC_TYRANNUS_INTRO); if (!pTyrannus) return; @@ -616,8 +611,6 @@ void instance_pit_of_saron::DoStartAmbushEvent() pSummon->GetMotionMaster()->MovePoint(1, aEventFirstAmbushLocations[i].fMoveX, aEventFirstAmbushLocations[i].fMoveY, aEventFirstAmbushLocations[i].fMoveZ); } } - - m_bIsAmbushStarted = true; } void instance_pit_of_saron::Update(uint32 uiDiff) diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/pit_of_saron.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/pit_of_saron.cpp index 8370623b3..160bf9730 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/pit_of_saron.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/pit_of_saron.cpp @@ -152,20 +152,29 @@ CreatureAI* GetAI_npc_collapsing_icicle(Creature* pCreature) bool AreaTrigger_at_pit_of_saron(Player* pPlayer, AreaTriggerEntry const* pAt) { - if (pAt->id == AREATRIGGER_ID_TUNNEL) - { - if (pPlayer->isGameMaster() || !pPlayer->isAlive()) - return false; + if (pPlayer->isGameMaster() || !pPlayer->isAlive()) + return false; - instance_pit_of_saron* pInstance = (instance_pit_of_saron*)pPlayer->GetInstanceData(); - if (!pInstance) - return false; + instance_pit_of_saron* pInstance = (instance_pit_of_saron*)pPlayer->GetInstanceData(); + if (!pInstance) + return false; + if (pAt->id == AREATRIGGER_ID_TUNNEL_START) + { if (pInstance->GetData(TYPE_GARFROST) != DONE || pInstance->GetData(TYPE_KRICK) != DONE || - pInstance->GetData(TYPE_TYRANNUS) != NOT_STARTED) + pInstance->GetData(TYPE_AMBUSH) != NOT_STARTED) return false; pInstance->DoStartAmbushEvent(); + pInstance->SetData(TYPE_AMBUSH, IN_PROGRESS); + return true; + } + else if (pAt->id == AREATRIGGER_ID_TUNNEL_END) + { + if (pInstance->GetData(TYPE_AMBUSH) != IN_PROGRESS) + return false; + + pInstance->SetData(TYPE_AMBUSH, DONE); return true; } diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/pit_of_saron.h b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/pit_of_saron.h index 8accbd788..b9df43705 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/pit_of_saron.h +++ b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/pit_of_saron.h @@ -7,12 +7,13 @@ enum { - MAX_ENCOUNTER = 3, + MAX_ENCOUNTER = 4, MAX_SPECIAL_ACHIEV_CRITS = 2, TYPE_GARFROST = 0, TYPE_KRICK = 1, TYPE_TYRANNUS = 2, + TYPE_AMBUSH = 3, TYPE_ACHIEV_DOESNT_GO_ELEVEN = 0, TYPE_ACHIEV_DONT_LOOK_UP = 1, @@ -61,15 +62,14 @@ enum NPC_YMIRJAR_FLAMEBEARER = 36893, NPC_FALLEN_WARRIOR = 36841, NPC_COLDWRAITH = 36842, - NPC_SKELETON = 36877, - NPC_DISTURBED_REVENANT = 36874, NPC_STALKER = 32780, NPC_GENERAL_BUNNY = 24110, GO_ICEWALL = 201885, // open after gafrost/krick GO_HALLS_OF_REFLECT_PORT = 201848, // unlocked by jaina/sylvanas at last outro - AREATRIGGER_ID_TUNNEL = 5578, + AREATRIGGER_ID_TUNNEL_START = 5578, + AREATRIGGER_ID_TUNNEL_END = 5581, ACHIEV_CRIT_DOESNT_GO_ELEVEN = 12993, // Garfrost, achiev 4524 ACHIEV_CRIT_DONT_LOOK_UP = 12994, // Gauntlet, achiev 4525 @@ -169,14 +169,11 @@ class MANGOS_DLL_DECL instance_pit_of_saron : public ScriptedInstance, private D bool m_abAchievCriteria[MAX_SPECIAL_ACHIEV_CRITS]; - bool m_bIsAmbushStarted; - uint8 m_uiAmbushAggroCount; uint32 m_uiTeam; // Team of first entered player, used to set if Jaina or Silvana to spawn uint32 m_uiIciclesTimer; GuidList m_lTunnelStalkersGuidList; - GuidList m_lTunnelNpcGuidList; GuidList m_lAmbushNpcsGuidList; GuidList m_lArcaneShieldBunniesGuidList; GuidList m_lFrozenAftermathBunniesGuidList; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index a23d34f5c..7ad03a956 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2841" + #define SD2_REVISION_NR "2842" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 1640c453f..6a2730387 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -717,8 +717,10 @@ UPDATE creature_template SET ScriptName='npc_ymirjar_deathbringer' WHERE entry=3 UPDATE creature_template SET ScriptName='npc_collapsing_icicle' WHERE entry=36847; UPDATE creature_template SET ScriptName='boss_tyrannus' WHERE entry=36658; UPDATE creature_template SET ScriptName='boss_rimefang_pos' WHERE entry=36661; -DELETE FROM scripted_areatrigger WHERE entry=5578; -INSERT INTO scripted_areatrigger VALUES (5578,'at_pit_of_saron'); +DELETE FROM scripted_areatrigger WHERE entry IN (5578,5581); +INSERT INTO scripted_areatrigger VALUES +(5578,'at_pit_of_saron'), +(5581,'at_pit_of_saron'); /* ICECROWN */ diff --git a/sql/updates/r2842_mangos.sql b/sql/updates/r2842_mangos.sql new file mode 100644 index 000000000..cce22fbdc --- /dev/null +++ b/sql/updates/r2842_mangos.sql @@ -0,0 +1,3 @@ +DELETE FROM scripted_areatrigger WHERE entry IN (5581); +INSERT INTO scripted_areatrigger VALUES +(5581,'at_pit_of_saron'); From f05ec830afbdc9b8295acaddb739d428a1149df5 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Sun, 31 Mar 2013 22:40:52 +0200 Subject: [PATCH 0844/1172] [2843] Fix unused parameter warnings --- base/escort_ai.cpp | 2 +- base/follower_ai.cpp | 4 +-- base/pet_ai.cpp | 2 +- base/pet_ai.h | 2 +- include/sc_creature.cpp | 2 +- scripts/battlegrounds/battleground.cpp | 4 +-- .../blackrock_depths/blackrock_depths.cpp | 20 +++++++------- .../boss_ambassador_flamelash.cpp | 6 ++--- .../blackrock_depths/boss_coren_direbrew.cpp | 2 +- .../boss_emperor_dagran_thaurissan.cpp | 4 +-- .../boss_pyroguard_emberseer.cpp | 2 +- .../instance_blackrock_spire.cpp | 4 +-- .../boss_broodlord_lashlayer.cpp | 2 +- .../blackwing_lair/boss_chromaggus.cpp | 2 +- .../blackwing_lair/boss_ebonroc.cpp | 2 +- .../blackwing_lair/boss_firemaw.cpp | 2 +- .../blackwing_lair/boss_flamegor.cpp | 2 +- .../blackwing_lair/boss_nefarian.cpp | 2 +- .../blackwing_lair/boss_razorgore.cpp | 2 +- .../blackwing_lair/boss_vaelastrasz.cpp | 4 +-- .../blackwing_lair/boss_victor_nefarius.cpp | 4 +-- scripts/eastern_kingdoms/blasted_lands.cpp | 2 +- scripts/eastern_kingdoms/burning_steppes.cpp | 8 +++--- .../deadmines/boss_mr_smite.cpp | 2 +- .../eastern_kingdoms/deadmines/deadmines.cpp | 2 +- scripts/eastern_kingdoms/eversong_woods.cpp | 8 +++--- .../gnomeregan/boss_thermaplugg.cpp | 4 +-- .../gnomeregan/gnomeregan.cpp | 2 +- .../eastern_kingdoms/isle_of_queldanas.cpp | 2 +- .../karazhan/boss_curator.cpp | 2 +- .../karazhan/boss_maiden_of_virtue.cpp | 2 +- .../karazhan/boss_midnight.cpp | 6 ++--- .../eastern_kingdoms/karazhan/boss_moroes.cpp | 4 +-- .../karazhan/boss_netherspite.cpp | 2 +- .../karazhan/boss_nightbane.cpp | 4 +-- .../karazhan/boss_prince_malchezaar.cpp | 8 +++--- .../karazhan/boss_shade_of_aran.cpp | 12 ++++----- .../karazhan/boss_terestian_illhoof.cpp | 8 +++--- .../karazhan/bosses_opera.cpp | 22 ++++++++-------- .../karazhan/instance_karazhan.cpp | 2 +- .../eastern_kingdoms/karazhan/karazhan.cpp | 16 ++++++------ scripts/eastern_kingdoms/loch_modan.cpp | 2 +- .../boss_felblood_kaelthas.cpp | 22 ++++++++-------- .../molten_core/boss_baron_geddon.cpp | 2 +- .../molten_core/boss_garr.cpp | 2 +- .../molten_core/boss_gehennas.cpp | 2 +- .../molten_core/boss_golemagg.cpp | 4 +-- .../molten_core/boss_lucifron.cpp | 2 +- .../molten_core/boss_magmadar.cpp | 2 +- .../molten_core/boss_majordomo_executus.cpp | 6 ++--- .../molten_core/boss_shazzrah.cpp | 2 +- .../molten_core/boss_sulfuron_harbinger.cpp | 2 +- .../molten_core/instance_molten_core.cpp | 2 +- .../scarlet_enclave/ebon_hold.cpp | 22 ++++++++-------- .../scarlet_monastery/boss_arcanist_doan.cpp | 2 +- .../boss_headless_horseman.cpp | 4 +-- .../scarlet_monastery/boss_herod.cpp | 2 +- .../boss_mograine_and_whitemane.cpp | 12 ++++----- .../scholomance/instance_scholomance.cpp | 4 +-- .../eastern_kingdoms/silverpine_forest.cpp | 2 +- scripts/eastern_kingdoms/stormwind_city.cpp | 6 ++--- .../stratholme/boss_dathrohan_balnazzar.cpp | 4 +-- .../stratholme/stratholme.cpp | 8 +++--- .../sunken_temple/sunken_temple.cpp | 10 +++---- .../sunwell_plateau/boss_brutallus.cpp | 2 +- .../sunwell_plateau/boss_eredar_twins.cpp | 4 +-- .../sunwell_plateau/boss_felmyst.cpp | 2 +- .../sunwell_plateau/boss_kalecgos.cpp | 10 +++---- .../sunwell_plateau/boss_kiljaeden.cpp | 8 +++--- .../sunwell_plateau/boss_muru.cpp | 10 +++---- scripts/eastern_kingdoms/tirisfal_glades.cpp | 2 +- .../uldaman/boss_archaedas.cpp | 6 ++--- .../uldaman/instance_uldaman.cpp | 2 +- scripts/eastern_kingdoms/undercity.cpp | 2 +- scripts/eastern_kingdoms/wetlands.cpp | 4 +-- .../eastern_kingdoms/zulaman/boss_akilzon.cpp | 2 +- .../eastern_kingdoms/zulaman/boss_halazzi.cpp | 4 +-- .../eastern_kingdoms/zulaman/boss_janalai.cpp | 18 ++++++------- .../zulaman/boss_malacrass.cpp | 4 +-- .../zulaman/boss_nalorakk.cpp | 2 +- .../eastern_kingdoms/zulaman/boss_zuljin.cpp | 4 +-- .../zulaman/instance_zulaman.cpp | 2 +- scripts/eastern_kingdoms/zulaman/zulaman.cpp | 4 +-- .../eastern_kingdoms/zulgurub/boss_arlokk.cpp | 4 +-- .../eastern_kingdoms/zulgurub/boss_hakkar.cpp | 2 +- .../eastern_kingdoms/zulgurub/boss_jeklik.cpp | 4 +-- .../eastern_kingdoms/zulgurub/boss_jindo.cpp | 6 ++--- .../zulgurub/boss_mandokir.cpp | 2 +- .../eastern_kingdoms/zulgurub/boss_marli.cpp | 2 +- .../eastern_kingdoms/zulgurub/boss_thekal.cpp | 10 +++---- scripts/kalimdor/ashenvale.cpp | 4 +-- scripts/kalimdor/azshara.cpp | 10 +++---- scripts/kalimdor/azuremyst_isle.cpp | 6 ++--- .../instance_blackfathom_deeps.cpp | 2 +- scripts/kalimdor/bloodmyst_isle.cpp | 4 +-- scripts/kalimdor/boss_azuregos.cpp | 2 +- .../culling_of_stratholme.cpp | 4 +-- .../instance_culling_of_stratholme.cpp | 2 +- .../dark_portal/boss_aeonus.cpp | 2 +- .../dark_portal/boss_chrono_lord_deja.cpp | 4 +-- .../dark_portal/boss_temporus.cpp | 2 +- .../dark_portal/dark_portal.cpp | 10 +++---- .../dark_portal/instance_dark_portal.cpp | 2 +- .../caverns_of_time/hyjal/boss_archimonde.cpp | 2 +- .../kalimdor/caverns_of_time/hyjal/hyjal.cpp | 6 ++--- .../caverns_of_time/hyjal/hyjalAI.cpp | 6 ++--- .../caverns_of_time/hyjal/instance_hyjal.cpp | 2 +- .../old_hillsbrad/instance_old_hillsbrad.cpp | 2 +- .../old_hillsbrad/old_hillsbrad.cpp | 8 +++--- scripts/kalimdor/darkshore.cpp | 8 +++--- scripts/kalimdor/desolace.cpp | 2 +- scripts/kalimdor/dustwallow_marsh.cpp | 8 +++--- scripts/kalimdor/felwood.cpp | 8 +++--- scripts/kalimdor/feralas.cpp | 2 +- scripts/kalimdor/moonglade.cpp | 4 +-- scripts/kalimdor/onyxias_lair/boss_onyxia.cpp | 6 ++--- .../onyxias_lair/instance_onyxias_lair.cpp | 2 +- scripts/kalimdor/orgrimmar.cpp | 2 +- .../ruins_of_ahnqiraj/boss_ayamiss.cpp | 6 ++--- .../kalimdor/ruins_of_ahnqiraj/boss_buru.cpp | 2 +- .../kalimdor/ruins_of_ahnqiraj/boss_moam.cpp | 2 +- .../ruins_of_ahnqiraj/boss_ossirian.cpp | 4 +-- .../ruins_of_ahnqiraj/boss_rajaxx.cpp | 2 +- .../instance_ruins_of_ahnqiraj.cpp | 2 +- .../ruins_of_ahnqiraj/ruins_of_ahnqiraj.cpp | 6 ++--- scripts/kalimdor/tanaris.cpp | 4 +-- .../temple_of_ahnqiraj/boss_bug_trio.cpp | 2 +- .../temple_of_ahnqiraj/boss_cthun.cpp | 4 +-- .../temple_of_ahnqiraj/boss_fankriss.cpp | 2 +- .../temple_of_ahnqiraj/boss_huhuran.cpp | 2 +- .../kalimdor/temple_of_ahnqiraj/boss_ouro.cpp | 2 +- .../temple_of_ahnqiraj/boss_sartura.cpp | 2 +- .../temple_of_ahnqiraj/boss_skeram.cpp | 4 +-- .../temple_of_ahnqiraj/boss_twinemperors.cpp | 8 +++--- .../temple_of_ahnqiraj/boss_viscidus.cpp | 2 +- .../mob_anubisath_sentinel.cpp | 2 +- scripts/kalimdor/the_barrens.cpp | 6 ++--- scripts/kalimdor/thousand_needles.cpp | 2 +- scripts/kalimdor/ungoro_crater.cpp | 2 +- .../wailing_caverns/wailing_caverns.cpp | 4 +-- scripts/kalimdor/winterspring.cpp | 2 +- scripts/kalimdor/zulfarrak/zulfarrak.cpp | 16 ++++++------ .../azjol-nerub/ahnkahet/boss_amanitar.cpp | 8 +++--- .../azjol-nerub/ahnkahet/boss_jedoga.cpp | 8 +++--- .../azjol-nerub/ahnkahet/boss_nadox.cpp | 6 ++--- .../azjol-nerub/ahnkahet/boss_taldaram.cpp | 6 ++--- .../azjol-nerub/ahnkahet/boss_volazj.cpp | 2 +- .../ahnkahet/instance_ahnkahet.cpp | 2 +- .../azjol-nerub/azjol-nerub/boss_anubarak.cpp | 6 ++--- .../azjol-nerub/azjol-nerub/boss_krikthir.cpp | 2 +- .../azjol-nerub/instance_azjol-nerub.cpp | 2 +- scripts/northrend/borean_tundra.cpp | 2 +- .../boss_anubarak_trial.cpp | 14 +++++----- .../boss_northrend_beasts.cpp | 22 ++++++++-------- .../boss_twin_valkyr.cpp | 8 +++--- .../trial_of_the_crusader.cpp | 2 +- .../northrend/draktharon_keep/boss_novos.cpp | 8 +++--- .../draktharon_keep/boss_tharonja.cpp | 2 +- .../draktharon_keep/boss_trollgore.cpp | 4 +-- .../instance_draktharon_keep.cpp | 2 +- scripts/northrend/gundrak/boss_colossus.cpp | 8 +++--- scripts/northrend/gundrak/boss_eck.cpp | 2 +- scripts/northrend/gundrak/boss_galdarah.cpp | 2 +- scripts/northrend/gundrak/boss_moorabi.cpp | 2 +- scripts/northrend/gundrak/boss_sladran.cpp | 2 +- .../northrend/gundrak/instance_gundrak.cpp | 4 +-- scripts/northrend/howling_fjord.cpp | 6 ++--- .../forge_of_souls/boss_bronjahm.cpp | 2 +- .../forge_of_souls/boss_devourer_of_souls.cpp | 4 +-- .../instance_forge_of_souls.cpp | 2 +- .../pit_of_saron/boss_krick_and_ick.cpp | 16 ++++++------ .../boss_scourgelord_tyrannus.cpp | 4 +-- .../pit_of_saron/instance_pit_of_saron.cpp | 2 +- .../pit_of_saron/pit_of_saron.cpp | 8 +++--- .../icecrown_citadel/blood_prince_council.cpp | 18 ++++++------- .../boss_blood_queen_lanathel.cpp | 2 +- .../boss_deathbringer_saurfang.cpp | 2 +- .../icecrown_citadel/boss_festergut.cpp | 2 +- .../boss_lady_deathwhisper.cpp | 4 +-- .../icecrown_citadel/boss_lord_marrowgar.cpp | 2 +- .../boss_professor_putricide.cpp | 2 +- .../icecrown_citadel/boss_rotface.cpp | 2 +- .../icecrown_citadel/boss_sindragosa.cpp | 6 ++--- .../icecrown_citadel/boss_the_lich_king.cpp | 2 +- .../boss_valithria_dreamwalker.cpp | 2 +- .../instance_icecrown_citadel.cpp | 4 +-- .../northrend/naxxramas/boss_anubrekhan.cpp | 2 +- scripts/northrend/naxxramas/boss_faerlina.cpp | 4 +-- .../naxxramas/boss_four_horsemen.cpp | 8 +++--- scripts/northrend/naxxramas/boss_gluth.cpp | 2 +- scripts/northrend/naxxramas/boss_gothik.cpp | 6 ++--- .../northrend/naxxramas/boss_grobbulus.cpp | 2 +- scripts/northrend/naxxramas/boss_heigan.cpp | 2 +- scripts/northrend/naxxramas/boss_loatheb.cpp | 2 +- scripts/northrend/naxxramas/boss_maexxna.cpp | 6 ++--- scripts/northrend/naxxramas/boss_noth.cpp | 2 +- .../northrend/naxxramas/boss_patchwerk.cpp | 2 +- .../northrend/naxxramas/boss_razuvious.cpp | 4 +-- .../northrend/naxxramas/boss_sapphiron.cpp | 4 +-- scripts/northrend/naxxramas/boss_thaddius.cpp | 10 +++---- .../naxxramas/instance_naxxramas.cpp | 4 +-- .../nexus/eye_of_eternity/boss_malygos.cpp | 10 +++---- .../northrend/nexus/nexus/boss_anomalus.cpp | 6 ++--- .../nexus/nexus/boss_keristrasza.cpp | 2 +- .../northrend/nexus/nexus/boss_ormorok.cpp | 4 +-- .../northrend/nexus/nexus/boss_telestra.cpp | 4 +-- .../northrend/nexus/nexus/instance_nexus.cpp | 4 +-- .../northrend/nexus/oculus/boss_eregos.cpp | 4 +-- scripts/northrend/nexus/oculus/boss_urom.cpp | 4 +-- scripts/northrend/nexus/oculus/boss_varos.cpp | 22 ++++++++-------- .../obsidian_sanctum/boss_sartharion.cpp | 18 ++++++------- .../instance_obsidian_sanctum.cpp | 2 +- .../northrend/ruby_sanctum/boss_baltharus.cpp | 2 +- .../northrend/ruby_sanctum/boss_saviana.cpp | 2 +- .../ruby_sanctum/boss_zarithrian.cpp | 2 +- .../ruby_sanctum/instance_ruby_sanctum.cpp | 2 +- scripts/northrend/sholazar_basin.cpp | 4 +-- .../halls_of_lightning/boss_bjarngrim.cpp | 2 +- .../ulduar/halls_of_lightning/boss_ionar.cpp | 8 +++--- .../ulduar/halls_of_lightning/boss_loken.cpp | 2 +- .../halls_of_lightning/boss_volkhan.cpp | 6 ++--- .../instance_halls_of_lightning.cpp | 2 +- .../halls_of_stone/boss_maiden_of_grief.cpp | 2 +- .../ulduar/halls_of_stone/boss_sjonnir.cpp | 2 +- .../ulduar/halls_of_stone/halls_of_stone.cpp | 14 +++++----- .../instance_halls_of_stone.cpp | 2 +- .../ulduar/ulduar/assembly_of_iron.cpp | 12 ++++----- .../northrend/ulduar/ulduar/boss_auriaya.cpp | 4 +-- .../ulduar/ulduar/boss_general_vezax.cpp | 4 +-- .../ulduar/ulduar/instance_ulduar.cpp | 2 +- .../utgarde_keep/utgarde_keep/boss_ingvar.cpp | 4 +-- .../utgarde_keep/boss_keleseth.cpp | 4 +-- .../boss_skarvald_and_dalronn.cpp | 2 +- .../utgarde_keep/instance_utgarde_keep.cpp | 2 +- .../utgarde_keep/utgarde_keep.cpp | 2 +- .../utgarde_pinnacle/boss_gortok.cpp | 6 ++--- .../utgarde_pinnacle/boss_skadi.cpp | 10 +++---- .../utgarde_pinnacle/boss_svala.cpp | 6 ++--- .../utgarde_pinnacle/boss_ymiron.cpp | 4 +-- .../instance_utgarde_pinnacle.cpp | 2 +- scripts/northrend/violet_hold/boss_erekem.cpp | 2 +- .../northrend/violet_hold/boss_ichoron.cpp | 2 +- .../violet_hold/instance_violet_hold.cpp | 4 +-- scripts/northrend/violet_hold/violet_hold.cpp | 8 +++--- .../auchenai_crypts/boss_exarch_maladaar.cpp | 2 +- .../mana_tombs/boss_nexusprince_shaffar.cpp | 2 +- .../mana_tombs/boss_pandemonius.cpp | 2 +- .../auchindoun/sethekk_halls/boss_anzu.cpp | 2 +- .../sethekk_halls/boss_darkweaver_syth.cpp | 2 +- .../sethekk_halls/boss_talon_king_ikiss.cpp | 4 +-- .../sethekk_halls/instance_sethekk_halls.cpp | 4 +-- .../boss_ambassador_hellmaw.cpp | 2 +- .../boss_blackheart_the_inciter.cpp | 2 +- .../boss_grandmaster_vorpil.cpp | 4 +-- scripts/outland/black_temple/black_temple.cpp | 2 +- .../outland/black_temple/boss_bloodboil.cpp | 2 +- scripts/outland/black_temple/boss_illidan.cpp | 26 +++++++++---------- .../black_temple/boss_mother_shahraz.cpp | 2 +- .../black_temple/boss_reliquary_of_souls.cpp | 6 ++--- .../black_temple/boss_shade_of_akama.cpp | 14 +++++----- .../outland/black_temple/boss_supremus.cpp | 14 +++++----- .../black_temple/boss_teron_gorefiend.cpp | 2 +- .../black_temple/boss_warlord_najentus.cpp | 4 +-- .../outland/black_temple/illidari_council.cpp | 2 +- .../black_temple/instance_black_temple.cpp | 2 +- scripts/outland/blades_edge_mountains.cpp | 2 +- scripts/outland/boss_doomlord_kazzak.cpp | 2 +- scripts/outland/boss_doomwalker.cpp | 2 +- .../boss_fathomlord_karathress.cpp | 4 +-- .../boss_hydross_the_unstable.cpp | 2 +- .../serpent_shrine/boss_lady_vashj.cpp | 8 +++--- .../boss_leotheras_the_blind.cpp | 2 +- .../boss_morogrim_tidewalker.cpp | 4 +-- .../serpent_shrine/boss_the_lurker_below.cpp | 2 +- .../steam_vault/boss_hydromancer_thespia.cpp | 2 +- .../boss_mekgineer_steamrigger.cpp | 4 +-- .../steam_vault/boss_warlord_kalithresh.cpp | 8 +++--- .../steam_vault/instance_steam_vault.cpp | 2 +- .../underbog/boss_hungarfen.cpp | 4 +-- scripts/outland/gruuls_lair/boss_gruul.cpp | 2 +- .../gruuls_lair/boss_high_king_maulgar.cpp | 4 +-- .../blood_furnace/boss_broggok.cpp | 8 +++--- .../boss_kelidan_the_breaker.cpp | 2 +- .../blood_furnace/boss_the_maker.cpp | 2 +- .../blood_furnace/instance_blood_furnace.cpp | 2 +- .../boss_nazan_and_vazruden.cpp | 4 +-- .../boss_omor_the_unscarred.cpp | 2 +- .../boss_watchkeeper_gargolmar.cpp | 2 +- .../magtheridons_lair/boss_magtheridon.cpp | 14 +++++----- .../shattered_halls/boss_nethekurse.cpp | 8 +++--- .../boss_warbringer_omrogg.cpp | 2 +- .../boss_warchief_kargath_bladefist.cpp | 2 +- .../instance_shattered_halls.cpp | 2 +- scripts/outland/hellfire_peninsula.cpp | 8 +++--- scripts/outland/nagrand.cpp | 6 ++--- scripts/outland/netherstorm.cpp | 6 ++--- scripts/outland/shadowmoon_valley.cpp | 14 +++++----- scripts/outland/shattrath_city.cpp | 4 +-- .../tempest_keep/arcatraz/arcatraz.cpp | 4 +-- .../tempest_keep/arcatraz/boss_dalliah.cpp | 4 +-- .../arcatraz/boss_soccothrates.cpp | 4 +-- .../arcatraz/instance_arcatraz.cpp | 2 +- .../botanica/boss_high_botanist_freywinn.cpp | 2 +- .../botanica/boss_warp_splinter.cpp | 6 ++--- .../tempest_keep/the_eye/boss_alar.cpp | 4 +-- .../tempest_keep/the_eye/boss_astromancer.cpp | 2 +- .../tempest_keep/the_eye/boss_kaelthas.cpp | 26 +++++++++---------- .../tempest_keep/the_eye/boss_void_reaver.cpp | 2 +- .../boss_nethermancer_sepethrea.cpp | 2 +- .../boss_pathaleon_the_calculator.cpp | 2 +- scripts/outland/terokkar_forest.cpp | 4 +-- scripts/outland/zangarmarsh.cpp | 2 +- scripts/world/areatrigger_scripts.cpp | 10 +++---- scripts/world/bosses_emerald_dragons.cpp | 14 +++++----- scripts/world/go_scripts.cpp | 6 ++--- scripts/world/item_scripts.cpp | 6 ++--- scripts/world/npc_professions.cpp | 4 +-- scripts/world/npcs_special.cpp | 16 ++++++------ scripts/world/world_map_scripts.cpp | 8 +++--- sd2_revision_nr.h | 2 +- 320 files changed, 760 insertions(+), 760 deletions(-) diff --git a/base/escort_ai.cpp b/base/escort_ai.cpp index c5fb212e2..cafee012d 100644 --- a/base/escort_ai.cpp +++ b/base/escort_ai.cpp @@ -345,7 +345,7 @@ void npc_escortAI::UpdateAI(const uint32 uiDiff) UpdateEscortAI(uiDiff); } -void npc_escortAI::UpdateEscortAI(const uint32 uiDiff) +void npc_escortAI::UpdateEscortAI(const uint32 /*uiDiff*/) { // Check if we have a current target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) diff --git a/base/follower_ai.cpp b/base/follower_ai.cpp index 92c06d121..7185651d5 100644 --- a/base/follower_ai.cpp +++ b/base/follower_ai.cpp @@ -118,7 +118,7 @@ void FollowerAI::MoveInLineOfSight(Unit* pWho) } } -void FollowerAI::JustDied(Unit* pKiller) +void FollowerAI::JustDied(Unit* /*pKiller*/) { if (!HasFollowState(STATE_FOLLOW_INPROGRESS) || !m_leaderGuid || !m_pQuestForFollow) return; @@ -244,7 +244,7 @@ void FollowerAI::UpdateAI(const uint32 uiDiff) UpdateFollowerAI(uiDiff); } -void FollowerAI::UpdateFollowerAI(const uint32 uiDiff) +void FollowerAI::UpdateFollowerAI(const uint32 /*uiDiff*/) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/base/pet_ai.cpp b/base/pet_ai.cpp index 4c204539c..1f1049795 100644 --- a/base/pet_ai.cpp +++ b/base/pet_ai.cpp @@ -79,7 +79,7 @@ void ScriptedPetAI::ResetPetCombat() Reset(); } -void ScriptedPetAI::UpdatePetAI(const uint32 uiDiff) +void ScriptedPetAI::UpdatePetAI(const uint32 /*uiDiff*/) { DoMeleeAttackIfReady(); } diff --git a/base/pet_ai.h b/base/pet_ai.h index 9f612ff3d..f36302e4a 100644 --- a/base/pet_ai.h +++ b/base/pet_ai.h @@ -30,7 +30,7 @@ class MANGOS_DLL_DECL ScriptedPetAI : public CreatureAI virtual void UpdatePetAI(const uint32 uiDiff); // while in combat - virtual void UpdatePetOOCAI(const uint32 uiDiff) {} // when not in combat + virtual void UpdatePetOOCAI(const uint32 /*uiDiff*/) {} // when not in combat protected: void ResetPetCombat(); diff --git a/include/sc_creature.cpp b/include/sc_creature.cpp index b672fbecd..e7067adca 100644 --- a/include/sc_creature.cpp +++ b/include/sc_creature.cpp @@ -102,7 +102,7 @@ void ScriptedAI::EnterCombat(Unit* pEnemy) * Handle (if required) melee attack with DoMeleeAttackIfReady() * This is usally overwritten to support timers for ie spells */ -void ScriptedAI::UpdateAI(const uint32 uiDiff) +void ScriptedAI::UpdateAI(const uint32 /*uiDiff*/) { // Check if we have a current target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) diff --git a/scripts/battlegrounds/battleground.cpp b/scripts/battlegrounds/battleground.cpp index c27434bd2..e55c9e334 100644 --- a/scripts/battlegrounds/battleground.cpp +++ b/scripts/battlegrounds/battleground.cpp @@ -55,7 +55,7 @@ struct MANGOS_DLL_DECL npc_spirit_guideAI : public ScriptedAI void Reset() override {} - void UpdateAI(const uint32 uiDiff) override + void UpdateAI(const uint32 /*uiDiff*/) override { // auto cast the whole time this spell if (!m_creature->GetCurrentSpell(CURRENT_CHANNELED_SPELL)) @@ -91,7 +91,7 @@ struct MANGOS_DLL_DECL npc_spirit_guideAI : public ScriptedAI } }; -bool GossipHello_npc_spirit_guide(Player* pPlayer, Creature* pCreature) +bool GossipHello_npc_spirit_guide(Player* pPlayer, Creature* /*pCreature*/) { pPlayer->CastSpell(pPlayer, SPELL_WAITING_TO_RESURRECT, true); return true; diff --git a/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.cpp b/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.cpp index 5a5fd345b..a1d65d7a8 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.cpp +++ b/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.cpp @@ -41,7 +41,7 @@ EndContentData */ ## go_shadowforge_brazier ######*/ -bool GOUse_go_shadowforge_brazier(Player* pPlayer, GameObject* pGo) +bool GOUse_go_shadowforge_brazier(Player* /*pPlayer*/, GameObject* pGo) { if (ScriptedInstance* pInstance = (ScriptedInstance*)pGo->GetInstanceData()) { @@ -57,7 +57,7 @@ bool GOUse_go_shadowforge_brazier(Player* pPlayer, GameObject* pGo) ## go_relic_coffer_door ######*/ -bool GOUse_go_relic_coffer_door(Player* pPlayer, GameObject* pGo) +bool GOUse_go_relic_coffer_door(Player* /*pPlayer*/, GameObject* pGo) { if (ScriptedInstance* pInstance = (ScriptedInstance*)pGo->GetInstanceData()) { @@ -230,7 +230,7 @@ struct MANGOS_DLL_DECL npc_grimstoneAI : public npc_escortAI } } - void SummonedCreatureJustDied(Creature* pSummoned) override + void SummonedCreatureJustDied(Creature* /*pSummoned*/) override { ++m_uiMobDeadCount; @@ -436,7 +436,7 @@ CreatureAI* GetAI_npc_grimstone(Creature* pCreature) return new npc_grimstoneAI(pCreature); } -bool EffectDummyCreature_spell_banner_of_provocation(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) +bool EffectDummyCreature_spell_banner_of_provocation(Unit* /*pCaster*/, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) { if (uiSpellId == SPELL_SUMMON_THELRIN_DND && uiEffIndex != EFFECT_INDEX_0) { @@ -489,7 +489,7 @@ bool GossipHello_npc_kharan_mighthammer(Player* pPlayer, Creature* pCreature) return true; } -bool GossipSelect_npc_kharan_mighthammer(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +bool GossipSelect_npc_kharan_mighthammer(Player* pPlayer, Creature* pCreature, uint32 /*uiSender*/, uint32 uiAction) { switch (uiAction) { @@ -649,7 +649,7 @@ CreatureAI* GetAI_npc_rocknot(Creature* pCreature) return new npc_rocknotAI(pCreature); } -bool QuestRewarded_npc_rocknot(Player* pPlayer, Creature* pCreature, Quest const* pQuest) +bool QuestRewarded_npc_rocknot(Player* /*pPlayer*/, Creature* pCreature, Quest const* pQuest) { ScriptedInstance* pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); @@ -891,7 +891,7 @@ struct MANGOS_DLL_DECL npc_marshal_windsorAI : public npc_escortAI } } - void UpdateEscortAI(const uint32 uiDiff) override + void UpdateEscortAI(const uint32 /*uiDiff*/) override { // Handle escort resume events if (m_pInstance && m_pInstance->GetData(TYPE_QUEST_JAIL_BREAK) == SPECIAL) @@ -953,7 +953,7 @@ bool GossipHello_npc_dughal_stormwing(Player* pPlayer, Creature* pCreature) return true; } -bool GossipSelect_npc_dughal_stormwing(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +bool GossipSelect_npc_dughal_stormwing(Player* pPlayer, Creature* pCreature, uint32 /*uiSender*/, uint32 uiAction) { if (uiAction == GOSSIP_ACTION_INFO_DEF + 1) { @@ -987,7 +987,7 @@ bool GossipHello_npc_tobias_seecher(Player* pPlayer, Creature* pCreature) return true; } -bool GossipSelect_npc_tobias_seecher(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +bool GossipSelect_npc_tobias_seecher(Player* pPlayer, Creature* pCreature, uint32 /*uiSender*/, uint32 uiAction) { if (uiAction == GOSSIP_ACTION_INFO_DEF + 1) { @@ -1030,7 +1030,7 @@ bool GossipHello_boss_doomrel(Player* pPlayer, Creature* pCreature) return true; } -bool GossipSelect_boss_doomrel(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +bool GossipSelect_boss_doomrel(Player* pPlayer, Creature* pCreature, uint32 /*uiSender*/, uint32 uiAction) { switch (uiAction) { diff --git a/scripts/eastern_kingdoms/blackrock_depths/boss_ambassador_flamelash.cpp b/scripts/eastern_kingdoms/blackrock_depths/boss_ambassador_flamelash.cpp index e7ff1725c..fd3c3d4c2 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/boss_ambassador_flamelash.cpp +++ b/scripts/eastern_kingdoms/blackrock_depths/boss_ambassador_flamelash.cpp @@ -53,7 +53,7 @@ struct MANGOS_DLL_DECL boss_ambassador_flamelashAI : public ScriptedAI m_creature->SummonCreature(NPC_BURNING_SPIRIT, fX, fY, fZ, m_creature->GetAngle(fX, fY) + M_PI_F, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 60000); } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { DoCastSpellIfCan(m_creature, SPELL_FIREBLAST); } @@ -63,7 +63,7 @@ struct MANGOS_DLL_DECL boss_ambassador_flamelashAI : public ScriptedAI pSummoned->GetMotionMaster()->MovePoint(1, m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ()); } - void SummonedMovementInform(Creature* pSummoned, uint32 uiMotionType, uint32 uiPointId) override + void SummonedMovementInform(Creature* pSummoned, uint32 /*uiMotionType*/, uint32 uiPointId) override { if (uiPointId != 1) return; @@ -94,7 +94,7 @@ struct MANGOS_DLL_DECL boss_ambassador_flamelashAI : public ScriptedAI } }; -bool EffectDummyCreature_spell_boss_ambassador_flamelash(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) +bool EffectDummyCreature_spell_boss_ambassador_flamelash(Unit* /*pCaster*/, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) { if (uiSpellId == SPELL_BURNING_SPIRIT && uiEffIndex == EFFECT_INDEX_1) { diff --git a/scripts/eastern_kingdoms/blackrock_depths/boss_coren_direbrew.cpp b/scripts/eastern_kingdoms/blackrock_depths/boss_coren_direbrew.cpp index 0a4a92c72..214e57d0c 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/boss_coren_direbrew.cpp +++ b/scripts/eastern_kingdoms/blackrock_depths/boss_coren_direbrew.cpp @@ -74,7 +74,7 @@ struct MANGOS_DLL_DECL boss_coren_direbrewAI : public ScriptedAI m_uiPhase = 0; } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { // Spawn 3 minions on aggro for (uint8 i = 0; i < MAX_DIREBREW_MINIONS; ++i) diff --git a/scripts/eastern_kingdoms/blackrock_depths/boss_emperor_dagran_thaurissan.cpp b/scripts/eastern_kingdoms/blackrock_depths/boss_emperor_dagran_thaurissan.cpp index 960296fad..bc56db533 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/boss_emperor_dagran_thaurissan.cpp +++ b/scripts/eastern_kingdoms/blackrock_depths/boss_emperor_dagran_thaurissan.cpp @@ -55,13 +55,13 @@ struct MANGOS_DLL_DECL boss_emperor_dagran_thaurissanAI : public ScriptedAI // m_uiCounter = 0; } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { DoScriptText(SAY_AGGRO, m_creature); m_creature->CallForHelp(VISIBLE_RANGE); } - void JustDied(Unit* pVictim) override + void JustDied(Unit* /*pVictim*/) override { if (!m_pInstance) return; diff --git a/scripts/eastern_kingdoms/blackrock_spire/boss_pyroguard_emberseer.cpp b/scripts/eastern_kingdoms/blackrock_spire/boss_pyroguard_emberseer.cpp index 5d7451caa..c4a85474c 100644 --- a/scripts/eastern_kingdoms/blackrock_spire/boss_pyroguard_emberseer.cpp +++ b/scripts/eastern_kingdoms/blackrock_spire/boss_pyroguard_emberseer.cpp @@ -189,7 +189,7 @@ CreatureAI* GetAI_boss_pyroguard_emberseer(Creature* pCreature) return new boss_pyroguard_emberseerAI(pCreature); } -bool EffectDummyCreature_pyroguard_emberseer(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) +bool EffectDummyCreature_pyroguard_emberseer(Unit* /*pCaster*/, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) { // always check spellid and effectindex if (uiSpellId == SPELL_GROWING && uiEffIndex == EFFECT_INDEX_0) diff --git a/scripts/eastern_kingdoms/blackrock_spire/instance_blackrock_spire.cpp b/scripts/eastern_kingdoms/blackrock_spire/instance_blackrock_spire.cpp index 6457f4fc9..199476ffa 100644 --- a/scripts/eastern_kingdoms/blackrock_spire/instance_blackrock_spire.cpp +++ b/scripts/eastern_kingdoms/blackrock_spire/instance_blackrock_spire.cpp @@ -668,7 +668,7 @@ bool AreaTrigger_at_blackrock_spire(Player* pPlayer, AreaTriggerEntry const* pAt return false; } -bool ProcessEventId_event_spell_altar_emberseer(uint32 uiEventId, Object* pSource, Object* pTarget, bool bIsStart) +bool ProcessEventId_event_spell_altar_emberseer(uint32 /*uiEventId*/, Object* pSource, Object* /*pTarget*/, bool bIsStart) { if (bIsStart && pSource->GetTypeId() == TYPEID_PLAYER) { @@ -681,7 +681,7 @@ bool ProcessEventId_event_spell_altar_emberseer(uint32 uiEventId, Object* pSourc return false; } -bool GOUse_go_father_flame(Player* pPlayer, GameObject* pGo) +bool GOUse_go_father_flame(Player* /*pPlayer*/, GameObject* pGo) { if (instance_blackrock_spire* pInstance = (instance_blackrock_spire*)pGo->GetInstanceData()) pInstance->StartflamewreathEventIfCan(); diff --git a/scripts/eastern_kingdoms/blackwing_lair/boss_broodlord_lashlayer.cpp b/scripts/eastern_kingdoms/blackwing_lair/boss_broodlord_lashlayer.cpp index 0888040d5..bdc9ee47a 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/boss_broodlord_lashlayer.cpp +++ b/scripts/eastern_kingdoms/blackwing_lair/boss_broodlord_lashlayer.cpp @@ -58,7 +58,7 @@ struct MANGOS_DLL_DECL boss_broodlordAI : public ScriptedAI m_uiKnockAwayTimer = 30000; } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { if (m_pInstance) m_pInstance->SetData(TYPE_LASHLAYER, IN_PROGRESS); diff --git a/scripts/eastern_kingdoms/blackwing_lair/boss_chromaggus.cpp b/scripts/eastern_kingdoms/blackwing_lair/boss_chromaggus.cpp index 528d4494e..b429915e7 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/boss_chromaggus.cpp +++ b/scripts/eastern_kingdoms/blackwing_lair/boss_chromaggus.cpp @@ -105,7 +105,7 @@ struct MANGOS_DLL_DECL boss_chromaggusAI : public ScriptedAI m_bEnraged = false; } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { if (m_pInstance) m_pInstance->SetData(TYPE_CHROMAGGUS, IN_PROGRESS); diff --git a/scripts/eastern_kingdoms/blackwing_lair/boss_ebonroc.cpp b/scripts/eastern_kingdoms/blackwing_lair/boss_ebonroc.cpp index b48e8d87a..b05e4ec69 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/boss_ebonroc.cpp +++ b/scripts/eastern_kingdoms/blackwing_lair/boss_ebonroc.cpp @@ -53,7 +53,7 @@ struct MANGOS_DLL_DECL boss_ebonrocAI : public ScriptedAI m_uiShadowOfEbonrocTimer = 45000; } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { if (m_pInstance) m_pInstance->SetData(TYPE_EBONROC, IN_PROGRESS); diff --git a/scripts/eastern_kingdoms/blackwing_lair/boss_firemaw.cpp b/scripts/eastern_kingdoms/blackwing_lair/boss_firemaw.cpp index fd8b3714f..2df9e90a4 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/boss_firemaw.cpp +++ b/scripts/eastern_kingdoms/blackwing_lair/boss_firemaw.cpp @@ -53,7 +53,7 @@ struct MANGOS_DLL_DECL boss_firemawAI : public ScriptedAI m_uiFlameBuffetTimer = 5000; } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { if (m_pInstance) m_pInstance->SetData(TYPE_FIREMAW, IN_PROGRESS); diff --git a/scripts/eastern_kingdoms/blackwing_lair/boss_flamegor.cpp b/scripts/eastern_kingdoms/blackwing_lair/boss_flamegor.cpp index 99c5daf86..5e2e5b6d7 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/boss_flamegor.cpp +++ b/scripts/eastern_kingdoms/blackwing_lair/boss_flamegor.cpp @@ -55,7 +55,7 @@ struct MANGOS_DLL_DECL boss_flamegorAI : public ScriptedAI m_uiFrenzyTimer = 10000; } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { if (m_pInstance) m_pInstance->SetData(TYPE_FLAMEGOR, IN_PROGRESS); diff --git a/scripts/eastern_kingdoms/blackwing_lair/boss_nefarian.cpp b/scripts/eastern_kingdoms/blackwing_lair/boss_nefarian.cpp index a29d139ac..5fc77afad 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/boss_nefarian.cpp +++ b/scripts/eastern_kingdoms/blackwing_lair/boss_nefarian.cpp @@ -129,7 +129,7 @@ struct MANGOS_DLL_DECL boss_nefarianAI : public ScriptedAI } } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { DoScriptText(SAY_AGGRO, m_creature); diff --git a/scripts/eastern_kingdoms/blackwing_lair/boss_razorgore.cpp b/scripts/eastern_kingdoms/blackwing_lair/boss_razorgore.cpp index 647bcfa5b..cad1fe85b 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/boss_razorgore.cpp +++ b/scripts/eastern_kingdoms/blackwing_lair/boss_razorgore.cpp @@ -74,7 +74,7 @@ struct MANGOS_DLL_DECL boss_razorgoreAI : public ScriptedAI m_uiFireballVolleyTimer = 7000; } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { // TODO Temporarily add this InstData setting, must be started with Phase 1 which is not yet implemented if (m_pInstance) diff --git a/scripts/eastern_kingdoms/blackwing_lair/boss_vaelastrasz.cpp b/scripts/eastern_kingdoms/blackwing_lair/boss_vaelastrasz.cpp index 3102a646e..e97939ea6 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/boss_vaelastrasz.cpp +++ b/scripts/eastern_kingdoms/blackwing_lair/boss_vaelastrasz.cpp @@ -137,7 +137,7 @@ struct MANGOS_DLL_DECL boss_vaelastraszAI : public ScriptedAI DoScriptText(SAY_KILLTARGET, m_creature, pVictim); } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { if (m_pInstance) m_pInstance->SetData(TYPE_VAELASTRASZ, IN_PROGRESS); @@ -314,7 +314,7 @@ struct MANGOS_DLL_DECL boss_vaelastraszAI : public ScriptedAI } }; -bool GossipSelect_boss_vaelastrasz(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +bool GossipSelect_boss_vaelastrasz(Player* pPlayer, Creature* pCreature, uint32 /*uiSender*/, uint32 uiAction) { switch (uiAction) { diff --git a/scripts/eastern_kingdoms/blackwing_lair/boss_victor_nefarius.cpp b/scripts/eastern_kingdoms/blackwing_lair/boss_victor_nefarius.cpp index f320a81f9..32ff36fb2 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/boss_victor_nefarius.cpp +++ b/scripts/eastern_kingdoms/blackwing_lair/boss_victor_nefarius.cpp @@ -152,7 +152,7 @@ struct MANGOS_DLL_DECL boss_victor_nefariusAI : public ScriptedAI, private Dialo m_creature->SetVisibility(VISIBILITY_ON); } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { if (m_pInstance) m_pInstance->SetData(TYPE_NEFARIAN, IN_PROGRESS); @@ -377,7 +377,7 @@ bool GossipHello_boss_victor_nefarius(Player* pPlayer, Creature* pCreature) return true; } -bool GossipSelect_boss_victor_nefarius(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +bool GossipSelect_boss_victor_nefarius(Player* pPlayer, Creature* pCreature, uint32 /*uiSender*/, uint32 uiAction) { if (pCreature->GetMapId() != MAP_ID_BWL) return true; diff --git a/scripts/eastern_kingdoms/blasted_lands.cpp b/scripts/eastern_kingdoms/blasted_lands.cpp index 20f3a69e2..710b9e3fb 100644 --- a/scripts/eastern_kingdoms/blasted_lands.cpp +++ b/scripts/eastern_kingdoms/blasted_lands.cpp @@ -58,7 +58,7 @@ bool GossipHello_npc_fallen_hero_of_horde(Player* pPlayer, Creature* pCreature) return true; } -bool GossipSelect_npc_fallen_hero_of_horde(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +bool GossipSelect_npc_fallen_hero_of_horde(Player* pPlayer, Creature* pCreature, uint32 /*uiSender*/, uint32 uiAction) { switch (uiAction) { diff --git a/scripts/eastern_kingdoms/burning_steppes.cpp b/scripts/eastern_kingdoms/burning_steppes.cpp index 413258fa0..37f6a9f35 100644 --- a/scripts/eastern_kingdoms/burning_steppes.cpp +++ b/scripts/eastern_kingdoms/burning_steppes.cpp @@ -82,7 +82,7 @@ bool GossipHello_npc_ragged_john(Player* pPlayer, Creature* pCreature) return true; } -bool GossipSelect_npc_ragged_john(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +bool GossipSelect_npc_ragged_john(Player* pPlayer, Creature* pCreature, uint32 /*uiSender*/, uint32 uiAction) { switch (uiAction) { @@ -222,7 +222,7 @@ struct MANGOS_DLL_DECL npc_grark_lorkrubAI : public npc_escortAI, private Dialog } } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { if (!HasEscortState(STATE_ESCORT_ESCORTING)) DoScriptText(SAY_AGGRO, m_creature); @@ -363,7 +363,7 @@ struct MANGOS_DLL_DECL npc_grark_lorkrubAI : public npc_escortAI, private Dialog } } - void SummonedCreatureJustDied(Creature* pSummoned) override + void SummonedCreatureJustDied(Creature* /*pSummoned*/) override { ++m_uiKilledCreatures; @@ -426,7 +426,7 @@ bool QuestAccept_npc_grark_lorkrub(Player* pPlayer, Creature* pCreature, const Q return false; } -bool EffectDummyCreature_spell_capture_grark(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) +bool EffectDummyCreature_spell_capture_grark(Unit* /*pCaster*/, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) { // always check spellid and effectindex if (uiSpellId == SPELL_CAPTURE_GRARK && uiEffIndex == EFFECT_INDEX_0) diff --git a/scripts/eastern_kingdoms/deadmines/boss_mr_smite.cpp b/scripts/eastern_kingdoms/deadmines/boss_mr_smite.cpp index 28e69d13f..1e638d68d 100644 --- a/scripts/eastern_kingdoms/deadmines/boss_mr_smite.cpp +++ b/scripts/eastern_kingdoms/deadmines/boss_mr_smite.cpp @@ -94,7 +94,7 @@ struct MANGOS_DLL_DECL boss_mr_smiteAI : public ScriptedAI } } - void MovementInform(uint32 uiMotionType, uint32 uiPointId) override + void MovementInform(uint32 uiMotionType, uint32 /*uiPointId*/) override { if (uiMotionType != POINT_MOTION_TYPE) return; diff --git a/scripts/eastern_kingdoms/deadmines/deadmines.cpp b/scripts/eastern_kingdoms/deadmines/deadmines.cpp index b61820632..30bfe3c10 100644 --- a/scripts/eastern_kingdoms/deadmines/deadmines.cpp +++ b/scripts/eastern_kingdoms/deadmines/deadmines.cpp @@ -24,7 +24,7 @@ EndScriptData */ #include "precompiled.h" #include "deadmines.h" -bool GOUse_go_defias_cannon(Player* pPlayer, GameObject* pGo) +bool GOUse_go_defias_cannon(Player* /*pPlayer*/, GameObject* pGo) { ScriptedInstance* pInstance = (ScriptedInstance*)pGo->GetInstanceData(); diff --git a/scripts/eastern_kingdoms/eversong_woods.cpp b/scripts/eastern_kingdoms/eversong_woods.cpp index 2747304f9..3b654a52d 100644 --- a/scripts/eastern_kingdoms/eversong_woods.cpp +++ b/scripts/eastern_kingdoms/eversong_woods.cpp @@ -225,7 +225,7 @@ CreatureAI* GetAI_npc_kelerun_bloodmourn(Creature* pCreature) } // easiest way is to expect database to respawn GO at quest accept (quest_start_script) -bool QuestAccept_npc_kelerun_bloodmourn(Player* pPlayer, Creature* pCreature, const Quest* pQuest) +bool QuestAccept_npc_kelerun_bloodmourn(Player* /*pPlayer*/, Creature* pCreature, const Quest* pQuest) { if (pQuest->GetQuestId() == QUEST_SECOND_TRIAL) { @@ -314,7 +314,7 @@ bool GossipHello_npc_prospector_anvilward(Player* pPlayer, Creature* pCreature) return true; } -bool GossipSelect_npc_prospector_anvilward(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +bool GossipSelect_npc_prospector_anvilward(Player* pPlayer, Creature* pCreature, uint32 /*uiSender*/, uint32 uiAction) { switch (uiAction) { @@ -376,7 +376,7 @@ struct MANGOS_DLL_DECL npc_apprentice_mirvedaAI : public ScriptedAI ++m_uiMobCount; } - void SummonedCreatureJustDied(Creature* pKilled) override + void SummonedCreatureJustDied(Creature* /*pKilled*/) override { --m_uiMobCount; @@ -477,7 +477,7 @@ struct MANGOS_DLL_DECL npc_infused_crystalAI : public Scripted_NoMovementAI pSummoned->AI()->AttackStart(m_creature); } - void SummonedCreatureJustDied(Creature* pSummoned) override + void SummonedCreatureJustDied(Creature* /*pSummoned*/) override { ++m_uiKilledCount; diff --git a/scripts/eastern_kingdoms/gnomeregan/boss_thermaplugg.cpp b/scripts/eastern_kingdoms/gnomeregan/boss_thermaplugg.cpp index 94ad66f5c..fa3f570f5 100644 --- a/scripts/eastern_kingdoms/gnomeregan/boss_thermaplugg.cpp +++ b/scripts/eastern_kingdoms/gnomeregan/boss_thermaplugg.cpp @@ -97,7 +97,7 @@ struct MANGOS_DLL_DECL boss_thermapluggAI : public ScriptedAI m_lSummonedBombGUIDs.clear(); } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { DoScriptText(SAY_AGGRO, m_creature); @@ -234,7 +234,7 @@ CreatureAI* GetAI_boss_thermaplugg(Creature* pCreature) return new boss_thermapluggAI(pCreature); } -bool EffectDummyCreature_spell_boss_thermaplugg(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) +bool EffectDummyCreature_spell_boss_thermaplugg(Unit* /*pCaster*/, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) { if ((uiSpellId != SPELL_ACTIVATE_BOMB_A && uiSpellId != SPELL_ACTIVATE_BOMB_B) || uiEffIndex != EFFECT_INDEX_0) return false; diff --git a/scripts/eastern_kingdoms/gnomeregan/gnomeregan.cpp b/scripts/eastern_kingdoms/gnomeregan/gnomeregan.cpp index 0082446dd..e05ff5dbb 100644 --- a/scripts/eastern_kingdoms/gnomeregan/gnomeregan.cpp +++ b/scripts/eastern_kingdoms/gnomeregan/gnomeregan.cpp @@ -607,7 +607,7 @@ bool GossipHello_npc_blastmaster_emi_shortfuse(Player* pPlayer, Creature* pCreat return true; } -bool GossipSelect_npc_blastmaster_emi_shortfuse(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +bool GossipSelect_npc_blastmaster_emi_shortfuse(Player* pPlayer, Creature* pCreature, uint32 /*uiSender*/, uint32 uiAction) { if (uiAction == GOSSIP_ACTION_INFO_DEF + 1) { diff --git a/scripts/eastern_kingdoms/isle_of_queldanas.cpp b/scripts/eastern_kingdoms/isle_of_queldanas.cpp index aab93c1ca..ffff74a6d 100644 --- a/scripts/eastern_kingdoms/isle_of_queldanas.cpp +++ b/scripts/eastern_kingdoms/isle_of_queldanas.cpp @@ -51,7 +51,7 @@ struct MANGOS_DLL_DECL npc_converted_sentryAI : public ScriptedAI m_uiCreditTimer = 2500; } - void MoveInLineOfSight(Unit* pWho) override {} + void MoveInLineOfSight(Unit* /*pWho*/) override {} void UpdateAI(const uint32 uiDiff) override { diff --git a/scripts/eastern_kingdoms/karazhan/boss_curator.cpp b/scripts/eastern_kingdoms/karazhan/boss_curator.cpp index 25c2091b7..5bf14fe0e 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_curator.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_curator.cpp @@ -86,7 +86,7 @@ struct MANGOS_DLL_DECL boss_curatorAI : public ScriptedAI m_pInstance->SetData(TYPE_CURATOR, DONE); } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { DoScriptText(SAY_AGGRO, m_creature); diff --git a/scripts/eastern_kingdoms/karazhan/boss_maiden_of_virtue.cpp b/scripts/eastern_kingdoms/karazhan/boss_maiden_of_virtue.cpp index ac49ceb37..95cc5e048 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_maiden_of_virtue.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_maiden_of_virtue.cpp @@ -81,7 +81,7 @@ struct MANGOS_DLL_DECL boss_maiden_of_virtueAI : public ScriptedAI m_pInstance->SetData(TYPE_MAIDEN, DONE); } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { DoScriptText(SAY_AGGRO, m_creature); diff --git a/scripts/eastern_kingdoms/karazhan/boss_midnight.cpp b/scripts/eastern_kingdoms/karazhan/boss_midnight.cpp index bcd5254b1..6bd6f0a7f 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_midnight.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_midnight.cpp @@ -74,7 +74,7 @@ struct MANGOS_DLL_DECL boss_midnightAI : public ScriptedAI SetCombatMovement(true); } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { if (m_pInstance) m_pInstance->SetData(TYPE_ATTUMEN, IN_PROGRESS); @@ -224,13 +224,13 @@ struct MANGOS_DLL_DECL boss_attumenAI : public ScriptedAI DoScriptText(urand(0, 1) ? SAY_KILL1 : SAY_KILL2, m_creature); } - void SpellHit(Unit* pSource, const SpellEntry* pSpell) override + void SpellHit(Unit* /*pSource*/, const SpellEntry* pSpell) override { if (pSpell->Mechanic == MECHANIC_DISARM) DoScriptText(SAY_DISARMED, m_creature); } - void JustDied(Unit* pVictim) override + void JustDied(Unit* /*pVictim*/) override { DoScriptText(SAY_DEATH, m_creature); diff --git a/scripts/eastern_kingdoms/karazhan/boss_moroes.cpp b/scripts/eastern_kingdoms/karazhan/boss_moroes.cpp index 282e1ae60..b1f45ae9d 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_moroes.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_moroes.cpp @@ -93,7 +93,7 @@ struct MANGOS_DLL_DECL boss_moroesAI : public ScriptedAI DoSpawnGuests(); } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { DoScriptText(SAY_AGGRO, m_creature); @@ -119,7 +119,7 @@ struct MANGOS_DLL_DECL boss_moroesAI : public ScriptedAI m_pInstance->SetData(TYPE_MOROES, FAIL); } - void JustDied(Unit* pVictim) override + void JustDied(Unit* /*pVictim*/) override { DoScriptText(SAY_DEATH, m_creature); DoRemoveGarroteAura(); diff --git a/scripts/eastern_kingdoms/karazhan/boss_netherspite.cpp b/scripts/eastern_kingdoms/karazhan/boss_netherspite.cpp index a1b9b62fb..c4fb10696 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_netherspite.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_netherspite.cpp @@ -146,7 +146,7 @@ struct MANGOS_DLL_DECL boss_netherspiteAI : public ScriptedAI m_vPortalEntryList[i] = auiPortals[i]; } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { if (m_pInstance) m_pInstance->SetData(TYPE_NETHERSPITE, IN_PROGRESS); diff --git a/scripts/eastern_kingdoms/karazhan/boss_nightbane.cpp b/scripts/eastern_kingdoms/karazhan/boss_nightbane.cpp index 23c80eb89..67f2d1f68 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_nightbane.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_nightbane.cpp @@ -105,7 +105,7 @@ struct MANGOS_DLL_DECL boss_nightbaneAI : public npc_escortAI m_uiFireballBarrageTimer = 10000; } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { DoScriptText(SAY_AGGRO, m_creature); } @@ -354,7 +354,7 @@ CreatureAI* GetAI_boss_nightbane(Creature* pCreature) return new boss_nightbaneAI(pCreature); } -bool ProcessEventId_event_spell_summon_nightbane(uint32 uiEventId, Object* pSource, Object* pTarget, bool bIsStart) +bool ProcessEventId_event_spell_summon_nightbane(uint32 /*uiEventId*/, Object* pSource, Object* /*pTarget*/, bool bIsStart) { if (bIsStart && pSource->GetTypeId() == TYPEID_PLAYER) { diff --git a/scripts/eastern_kingdoms/karazhan/boss_prince_malchezaar.cpp b/scripts/eastern_kingdoms/karazhan/boss_prince_malchezaar.cpp index f2892dd1a..c5940f633 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_prince_malchezaar.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_prince_malchezaar.cpp @@ -136,7 +136,7 @@ struct MANGOS_DLL_DECL boss_malchezaarAI : public ScriptedAI m_pInstance->SetData(TYPE_MALCHEZZAR, DONE); } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { DoScriptText(SAY_AGGRO, m_creature); @@ -338,9 +338,9 @@ struct MANGOS_DLL_DECL npc_infernal_targetAI : public Scripted_NoMovementAI npc_infernal_targetAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { Reset(); } void Reset() override { } - void MoveInLineOfSight(Unit* pWho) override { } - void AttackStart(Unit* pWho) override { } - void UpdateAI(const uint32 uiDiff) override { } + void MoveInLineOfSight(Unit* /*pWho*/) override { } + void AttackStart(Unit* /*pWho*/) override { } + void UpdateAI(const uint32 /*uiDiff*/) override { } }; CreatureAI* GetAI_npc_infernal_target(Creature* pCreature) diff --git a/scripts/eastern_kingdoms/karazhan/boss_shade_of_aran.cpp b/scripts/eastern_kingdoms/karazhan/boss_shade_of_aran.cpp index 17f4f5cfd..d24af685a 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_shade_of_aran.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_shade_of_aran.cpp @@ -138,7 +138,7 @@ struct MANGOS_DLL_DECL boss_aranAI : public ScriptedAI DoScriptText(urand(0, 1) ? SAY_KILL1 : SAY_KILL2, m_creature); } - void JustDied(Unit* pVictim) override + void JustDied(Unit* /*pVictim*/) override { DoScriptText(SAY_DEATH, m_creature); @@ -149,7 +149,7 @@ struct MANGOS_DLL_DECL boss_aranAI : public ScriptedAI m_pInstance->SetData(TYPE_ARAN, DONE); } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { switch (urand(0, 2)) { @@ -171,7 +171,7 @@ struct MANGOS_DLL_DECL boss_aranAI : public ScriptedAI m_creature->RemoveGuardians(); } - void DamageTaken(Unit* pDoneBy, uint32& uiDamage) override + void DamageTaken(Unit* /*pDoneBy*/, uint32& uiDamage) override { if (!m_bDrinkInturrupted && m_bIsDrinking && uiDamage > 0) { @@ -404,9 +404,9 @@ struct MANGOS_DLL_DECL npc_shade_of_aran_blizzardAI : public ScriptedAI npc_shade_of_aran_blizzardAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } void Reset() override { } - void MoveInLineOfSight(Unit* pWho) override { } - void AttackStart(Unit* pWho) override { } - void UpdateAI(const uint32 uiDiff) override { } + void MoveInLineOfSight(Unit* /*pWho*/) override { } + void AttackStart(Unit* /*pWho*/) override { } + void UpdateAI(const uint32 /*uiDiff*/) override { } }; CreatureAI* GetAI_npc_shade_of_aran_blizzard(Creature* pCreature) diff --git a/scripts/eastern_kingdoms/karazhan/boss_terestian_illhoof.cpp b/scripts/eastern_kingdoms/karazhan/boss_terestian_illhoof.cpp index 97e77d8cc..cf5909330 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_terestian_illhoof.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_terestian_illhoof.cpp @@ -91,7 +91,7 @@ struct MANGOS_DLL_DECL boss_terestianAI : public ScriptedAI m_bSummonedPortals = false; } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { DoScriptText(SAY_AGGRO, m_creature); @@ -262,9 +262,9 @@ struct MANGOS_DLL_DECL mob_demon_chainAI : public Scripted_NoMovementAI mob_demon_chainAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { Reset(); } void Reset() override { } - void MoveInLineOfSight(Unit* pWho) override { } - void AttackStart(Unit* pWho) override { } - void UpdateAI(const uint32 uiDiff) override { } + void MoveInLineOfSight(Unit* /*pWho*/) override { } + void AttackStart(Unit* /*pWho*/) override { } + void UpdateAI(const uint32 /*uiDiff*/) override { } }; CreatureAI* GetAI_boss_terestian_illhoof(Creature* pCreature) diff --git a/scripts/eastern_kingdoms/karazhan/bosses_opera.cpp b/scripts/eastern_kingdoms/karazhan/bosses_opera.cpp index a3f80df88..14144f49b 100644 --- a/scripts/eastern_kingdoms/karazhan/bosses_opera.cpp +++ b/scripts/eastern_kingdoms/karazhan/bosses_opera.cpp @@ -255,7 +255,7 @@ struct MANGOS_DLL_DECL boss_strawmanAI : public ScriptedAI ScriptedAI::AttackStart(pWho); } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { DoCastSpellIfCan(m_creature, SPELL_CONFLAG_PROC); DoScriptText(SAY_STRAWMAN_AGGRO, m_creature); @@ -340,7 +340,7 @@ struct MANGOS_DLL_DECL boss_tinheadAI : public ScriptedAI m_uiRustTimer = 30000; } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { DoScriptText(SAY_TINHEAD_AGGRO, m_creature); } @@ -458,7 +458,7 @@ struct MANGOS_DLL_DECL boss_roarAI : public ScriptedAI ScriptedAI::AttackStart(pWho); } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { DoScriptText(SAY_ROAR_AGGRO, m_creature); } @@ -553,7 +553,7 @@ struct MANGOS_DLL_DECL boss_croneAI : public ScriptedAI m_creature->ForcedDespawn(); } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { DoScriptText(urand(0, 1) ? SAY_CRONE_AGGRO : SAY_CRONE_AGGRO2, m_creature); @@ -653,7 +653,7 @@ bool GossipHello_npc_grandmother(Player* pPlayer, Creature* pCreature) return true; } -bool GossipSelect_npc_grandmother(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +bool GossipSelect_npc_grandmother(Player* pPlayer, Creature* pCreature, uint32 /*uiSender*/, uint32 uiAction) { if (uiAction == GOSSIP_ACTION_INFO_DEF) { @@ -687,7 +687,7 @@ struct MANGOS_DLL_DECL boss_bigbadwolfAI : public ScriptedAI m_uiSwipeTimer = 5000; } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { DoScriptText(SAY_WOLF_AGGRO, m_creature); } @@ -831,7 +831,7 @@ struct MANGOS_DLL_DECL boss_julianneAI : public ScriptedAI m_bIsFakingDeath = false; } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { DoScriptText(SAY_JULIANNE_AGGRO, m_creature); } @@ -844,7 +844,7 @@ struct MANGOS_DLL_DECL boss_julianneAI : public ScriptedAI m_creature->ForcedDespawn(); } - void DamageTaken(Unit* pDoneBy, uint32& uiDamage) override + void DamageTaken(Unit* /*pDoneBy*/, uint32& uiDamage) override { if (uiDamage < m_creature->GetHealth()) return; @@ -1030,7 +1030,7 @@ struct MANGOS_DLL_DECL boss_julianneAI : public ScriptedAI } }; -bool EffectDummyCreature_spell_drink_poison(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) +bool EffectDummyCreature_spell_drink_poison(Unit* /*pCaster*/, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) { // always check spellid and effectindex if (uiSpellId == SPELL_DRINK_POISON && uiEffIndex == EFFECT_INDEX_0) @@ -1091,7 +1091,7 @@ struct MANGOS_DLL_DECL boss_romuloAI : public ScriptedAI m_creature->ForcedDespawn(); } - void DamageTaken(Unit* pDoneBy, uint32& uiDamage) override + void DamageTaken(Unit* /*pDoneBy*/, uint32& uiDamage) override { if (uiDamage < m_creature->GetHealth()) return; @@ -1113,7 +1113,7 @@ struct MANGOS_DLL_DECL boss_romuloAI : public ScriptedAI } } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { DoScriptText(SAY_ROMULO_AGGRO, m_creature); } diff --git a/scripts/eastern_kingdoms/karazhan/instance_karazhan.cpp b/scripts/eastern_kingdoms/karazhan/instance_karazhan.cpp index 3204b36b8..ba6777aaa 100644 --- a/scripts/eastern_kingdoms/karazhan/instance_karazhan.cpp +++ b/scripts/eastern_kingdoms/karazhan/instance_karazhan.cpp @@ -61,7 +61,7 @@ bool instance_karazhan::IsEncounterInProgress() const return false; } -void instance_karazhan::OnPlayerEnter(Player* pPlayer) +void instance_karazhan::OnPlayerEnter(Player* /*pPlayer*/) { // If the opera event is already set, return if (GetData(TYPE_OPERA_PERFORMANCE) != 0) diff --git a/scripts/eastern_kingdoms/karazhan/karazhan.cpp b/scripts/eastern_kingdoms/karazhan/karazhan.cpp index e47f76df6..3ee509a95 100644 --- a/scripts/eastern_kingdoms/karazhan/karazhan.cpp +++ b/scripts/eastern_kingdoms/karazhan/karazhan.cpp @@ -208,7 +208,7 @@ bool GossipHello_npc_barnes(Player* pPlayer, Creature* pCreature) return true; } -bool GossipSelect_npc_barnes(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +bool GossipSelect_npc_barnes(Player* pPlayer, Creature* pCreature, uint32 /*uiSender*/, uint32 uiAction) { switch (uiAction) { @@ -277,7 +277,7 @@ bool GossipHello_npc_berthold(Player* pPlayer, Creature* pCreature) return true; } -bool GossipSelect_npc_berthold(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +bool GossipSelect_npc_berthold(Player* pPlayer, Creature* /*pCreature*/, uint32 /*uiSender*/, uint32 uiAction) { if (uiAction == GOSSIP_ACTION_INFO_DEF + 1) pPlayer->CastSpell(pPlayer, SPELL_TELEPORT, true); @@ -372,8 +372,8 @@ struct MANGOS_DLL_DECL npc_image_of_medivhAI : public ScriptedAI, private Dialog void Reset() override { } - void AttackStart(Unit* pWho) override { } - void MoveInLineOfSight(Unit* pWho) override { } + void AttackStart(Unit* /*pWho*/) override { } + void MoveInLineOfSight(Unit* /*pWho*/) override { } void JustSummoned(Creature* pSummoned) override { @@ -475,9 +475,9 @@ struct MANGOS_DLL_DECL npc_image_arcanagosAI : public ScriptedAI } } - void AttackStart(Unit* pWho) override { } - void MoveInLineOfSight(Unit* pWho) override { } - void UpdateAI(const uint32 uiDiff) override { } + void AttackStart(Unit* /*pWho*/) override { } + void MoveInLineOfSight(Unit* /*pWho*/) override { } + void UpdateAI(const uint32 /*uiDiff*/) override { } }; CreatureAI* GetAI_npc_image_arcanagosAI(Creature* pCreature) @@ -489,7 +489,7 @@ CreatureAI* GetAI_npc_image_arcanagosAI(Creature* pCreature) # event_spell_medivh_journal ######*/ -bool ProcessEventId_event_spell_medivh_journal(uint32 uiEventId, Object* pSource, Object* pTarget, bool bIsStart) +bool ProcessEventId_event_spell_medivh_journal(uint32 /*uiEventId*/, Object* pSource, Object* /*pTarget*/, bool bIsStart) { if (bIsStart && pSource->GetTypeId() == TYPEID_PLAYER) { diff --git a/scripts/eastern_kingdoms/loch_modan.cpp b/scripts/eastern_kingdoms/loch_modan.cpp index 54e92314d..d63c74535 100644 --- a/scripts/eastern_kingdoms/loch_modan.cpp +++ b/scripts/eastern_kingdoms/loch_modan.cpp @@ -46,7 +46,7 @@ bool GossipHello_npc_mountaineer_pebblebitty(Player* pPlayer, Creature* pCreatur return true; } -bool GossipSelect_npc_mountaineer_pebblebitty(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +bool GossipSelect_npc_mountaineer_pebblebitty(Player* pPlayer, Creature* pCreature, uint32 /*uiSender*/, uint32 uiAction) { switch (uiAction) { diff --git a/scripts/eastern_kingdoms/magisters_terrace/boss_felblood_kaelthas.cpp b/scripts/eastern_kingdoms/magisters_terrace/boss_felblood_kaelthas.cpp index a8c5dc3a4..1a0387183 100644 --- a/scripts/eastern_kingdoms/magisters_terrace/boss_felblood_kaelthas.cpp +++ b/scripts/eastern_kingdoms/magisters_terrace/boss_felblood_kaelthas.cpp @@ -145,7 +145,7 @@ struct MANGOS_DLL_DECL boss_felblood_kaelthasAI : public ScriptedAI, private Dia m_pInstance->SetData(TYPE_KAELTHAS, DONE); } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { if (m_pInstance) m_pInstance->SetData(TYPE_KAELTHAS, IN_PROGRESS); @@ -158,7 +158,7 @@ struct MANGOS_DLL_DECL boss_felblood_kaelthasAI : public ScriptedAI, private Dia } // Boss has an interesting speech before killed, so we need to fake death (without stand state) and allow him to finish his theatre - void DamageTaken(Unit* pKiller, uint32& uiDamage) override + void DamageTaken(Unit* /*pKiller*/, uint32& uiDamage) override { if (uiDamage < m_creature->GetHealth()) return; @@ -451,7 +451,7 @@ struct MANGOS_DLL_DECL mob_felkael_phoenixAI : public ScriptedAI m_bFakeDeath = false; } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { DoCastSpellIfCan(m_creature, SPELL_PHOENIX_BURN); } @@ -465,7 +465,7 @@ struct MANGOS_DLL_DECL mob_felkael_phoenixAI : public ScriptedAI ScriptedAI::EnterEvadeMode(); } - void DamageTaken(Unit* pKiller, uint32& uiDamage) override + void DamageTaken(Unit* /*pKiller*/, uint32& uiDamage) override { if (uiDamage < m_creature->GetHealth()) return; @@ -505,7 +505,7 @@ struct MANGOS_DLL_DECL mob_felkael_phoenixAI : public ScriptedAI m_creature->SummonCreature(NPC_PHOENIX_EGG, 0, 0, 0, 0, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 10000); } - void SummonedCreatureDespawn(Creature* pSummoned) override + void SummonedCreatureDespawn(Creature* /*pSummoned*/) override { m_creature->RemoveAurasDueToSpell(SPELL_EMBER_BLAST); m_creature->SetStandState(UNIT_STAND_STATE_STAND); @@ -523,7 +523,7 @@ struct MANGOS_DLL_DECL mob_felkael_phoenixAI : public ScriptedAI } } - void SummonedCreatureJustDied(Creature* pSummoned) override + void SummonedCreatureJustDied(Creature* /*pSummoned*/) override { // Self kill if the egg is killed if (m_bFakeDeath) @@ -567,9 +567,9 @@ struct MANGOS_DLL_DECL mob_felkael_phoenix_eggAI : public Scripted_NoMovementAI mob_felkael_phoenix_eggAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { Reset(); } void Reset() override {} - void MoveInLineOfSight(Unit* pWho) override {} - void AttackStart(Unit* pWho) override {} - void UpdateAI(const uint32 uiDiff) override {} + void MoveInLineOfSight(Unit* /*pWho*/) override {} + void AttackStart(Unit* /*pWho*/) override {} + void UpdateAI(const uint32 /*uiDiff*/) override {} }; /*###### @@ -597,8 +597,8 @@ struct MANGOS_DLL_DECL mob_arcane_sphereAI : public ScriptedAI DoCastSpellIfCan(m_creature, SPELL_ARCANE_SPHERE_PASSIVE); } - void AttackStart(Unit* pWho) override { } - void MoveInLineOfSight(Unit* pWho) override { } + void AttackStart(Unit* /*pWho*/) override { } + void MoveInLineOfSight(Unit* /*pWho*/) override { } void UpdateAI(const uint32 uiDiff) override { diff --git a/scripts/eastern_kingdoms/molten_core/boss_baron_geddon.cpp b/scripts/eastern_kingdoms/molten_core/boss_baron_geddon.cpp index 24a22f540..17a39d605 100644 --- a/scripts/eastern_kingdoms/molten_core/boss_baron_geddon.cpp +++ b/scripts/eastern_kingdoms/molten_core/boss_baron_geddon.cpp @@ -57,7 +57,7 @@ struct MANGOS_DLL_DECL boss_baron_geddonAI : public ScriptedAI m_uiLivingBombTimer = 35000; } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { if (m_pInstance) m_pInstance->SetData(TYPE_GEDDON, IN_PROGRESS); diff --git a/scripts/eastern_kingdoms/molten_core/boss_garr.cpp b/scripts/eastern_kingdoms/molten_core/boss_garr.cpp index d13c20eb7..a475624fd 100644 --- a/scripts/eastern_kingdoms/molten_core/boss_garr.cpp +++ b/scripts/eastern_kingdoms/molten_core/boss_garr.cpp @@ -57,7 +57,7 @@ struct MANGOS_DLL_DECL boss_garrAI : public ScriptedAI m_uiMagmaShacklesTimer = 15000; } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { if (m_pInstance) m_pInstance->SetData(TYPE_GARR, IN_PROGRESS); diff --git a/scripts/eastern_kingdoms/molten_core/boss_gehennas.cpp b/scripts/eastern_kingdoms/molten_core/boss_gehennas.cpp index a824dcdb0..ba60678a4 100644 --- a/scripts/eastern_kingdoms/molten_core/boss_gehennas.cpp +++ b/scripts/eastern_kingdoms/molten_core/boss_gehennas.cpp @@ -52,7 +52,7 @@ struct MANGOS_DLL_DECL boss_gehennasAI : public ScriptedAI m_uiGehennasCurseTimer = 12000; } - void Aggro(Unit* pwho) override + void Aggro(Unit* /*pwho*/) override { if (m_pInstance) m_pInstance->SetData(TYPE_GEHENNAS, IN_PROGRESS); diff --git a/scripts/eastern_kingdoms/molten_core/boss_golemagg.cpp b/scripts/eastern_kingdoms/molten_core/boss_golemagg.cpp index 6fb176585..04889ce50 100644 --- a/scripts/eastern_kingdoms/molten_core/boss_golemagg.cpp +++ b/scripts/eastern_kingdoms/molten_core/boss_golemagg.cpp @@ -62,7 +62,7 @@ struct MANGOS_DLL_DECL boss_golemaggAI : public ScriptedAI m_creature->CastSpell(m_creature, SPELL_MAGMA_SPLASH, true); } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { if (m_pInstance) m_pInstance->SetData(TYPE_GOLEMAGG, IN_PROGRESS); @@ -145,7 +145,7 @@ struct MANGOS_DLL_DECL mob_core_ragerAI : public ScriptedAI m_uiMangleTimer = 7 * IN_MILLISECONDS; // These times are probably wrong } - void DamageTaken(Unit* pDoneBy, uint32& uiDamage) override + void DamageTaken(Unit* /*pDoneBy*/, uint32& uiDamage) override { if (m_creature->GetHealthPercent() < 50.0f) { diff --git a/scripts/eastern_kingdoms/molten_core/boss_lucifron.cpp b/scripts/eastern_kingdoms/molten_core/boss_lucifron.cpp index 1f3fa6357..d6806f964 100644 --- a/scripts/eastern_kingdoms/molten_core/boss_lucifron.cpp +++ b/scripts/eastern_kingdoms/molten_core/boss_lucifron.cpp @@ -52,7 +52,7 @@ struct MANGOS_DLL_DECL boss_lucifronAI : public ScriptedAI m_uiShadowShockTimer = 6000; } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { if (m_pInstance) m_pInstance->SetData(TYPE_LUCIFRON, IN_PROGRESS); diff --git a/scripts/eastern_kingdoms/molten_core/boss_magmadar.cpp b/scripts/eastern_kingdoms/molten_core/boss_magmadar.cpp index 8988e99ab..7ed8fa16f 100644 --- a/scripts/eastern_kingdoms/molten_core/boss_magmadar.cpp +++ b/scripts/eastern_kingdoms/molten_core/boss_magmadar.cpp @@ -56,7 +56,7 @@ struct MANGOS_DLL_DECL boss_magmadarAI : public ScriptedAI m_uiLavabombTimer = 12000; } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { DoCastSpellIfCan(m_creature, SPELL_MAGMASPIT, true); diff --git a/scripts/eastern_kingdoms/molten_core/boss_majordomo_executus.cpp b/scripts/eastern_kingdoms/molten_core/boss_majordomo_executus.cpp index 78889bf39..9814053ad 100644 --- a/scripts/eastern_kingdoms/molten_core/boss_majordomo_executus.cpp +++ b/scripts/eastern_kingdoms/molten_core/boss_majordomo_executus.cpp @@ -242,7 +242,7 @@ struct MANGOS_DLL_DECL boss_majordomoAI : public ScriptedAI m_luiMajordomoAddsGUIDs.clear(); } - void DamageTaken(Unit* pDealer, uint32& uiDamage) override + void DamageTaken(Unit* /*pDealer*/, uint32& uiDamage) override { if (uiDamage > m_creature->GetHealth()) { @@ -431,7 +431,7 @@ bool GossipHello_boss_majordomo(Player* pPlayer, Creature* pCreature) return true; } -bool GossipSelect_boss_majordomo(Player* pPlayer, Creature* pCreature, uint32 sender, uint32 uiAction) +bool GossipSelect_boss_majordomo(Player* pPlayer, Creature* pCreature, uint32 /*sender*/, uint32 uiAction) { switch (uiAction) { @@ -453,7 +453,7 @@ bool GossipSelect_boss_majordomo(Player* pPlayer, Creature* pCreature, uint32 se return true; } -bool EffectDummyCreature_spell_boss_majordomo(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) +bool EffectDummyCreature_spell_boss_majordomo(Unit* /*pCaster*/, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) { if (uiSpellId != SPELL_TELEPORT_SELF || uiEffIndex != EFFECT_INDEX_0) return false; diff --git a/scripts/eastern_kingdoms/molten_core/boss_shazzrah.cpp b/scripts/eastern_kingdoms/molten_core/boss_shazzrah.cpp index 56d4c7282..5d89ec56a 100644 --- a/scripts/eastern_kingdoms/molten_core/boss_shazzrah.cpp +++ b/scripts/eastern_kingdoms/molten_core/boss_shazzrah.cpp @@ -58,7 +58,7 @@ struct MANGOS_DLL_DECL boss_shazzrahAI : public ScriptedAI m_uiBlinkTimer = 30000; } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { if (m_pInstance) m_pInstance->SetData(TYPE_SHAZZRAH, IN_PROGRESS); diff --git a/scripts/eastern_kingdoms/molten_core/boss_sulfuron_harbinger.cpp b/scripts/eastern_kingdoms/molten_core/boss_sulfuron_harbinger.cpp index 8fa9a88bc..0c46447fd 100644 --- a/scripts/eastern_kingdoms/molten_core/boss_sulfuron_harbinger.cpp +++ b/scripts/eastern_kingdoms/molten_core/boss_sulfuron_harbinger.cpp @@ -63,7 +63,7 @@ struct MANGOS_DLL_DECL boss_sulfuronAI : public ScriptedAI m_uiFlamespearTimer = 2000; } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { if (m_pInstance) m_pInstance->SetData(TYPE_SULFURON, IN_PROGRESS); diff --git a/scripts/eastern_kingdoms/molten_core/instance_molten_core.cpp b/scripts/eastern_kingdoms/molten_core/instance_molten_core.cpp index 36c1a1c06..09d786c78 100644 --- a/scripts/eastern_kingdoms/molten_core/instance_molten_core.cpp +++ b/scripts/eastern_kingdoms/molten_core/instance_molten_core.cpp @@ -57,7 +57,7 @@ bool instance_molten_core::IsEncounterInProgress() const return false; } -void instance_molten_core::OnPlayerEnter(Player* pPlayer) +void instance_molten_core::OnPlayerEnter(Player* /*pPlayer*/) { // Summon Majordomo if can DoSpawnMajordomoIfCan(true); diff --git a/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp b/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp index c59afadfc..400b16c9c 100644 --- a/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp +++ b/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp @@ -564,7 +564,7 @@ struct MANGOS_DLL_DECL npc_death_knight_initiateAI : public ScriptedAI } } - void DamageTaken(Unit* pDoneBy, uint32& uiDamage) override + void DamageTaken(Unit* /*pDoneBy*/, uint32& uiDamage) override { if (m_bIsDuelInProgress && uiDamage > m_creature->GetHealth()) { @@ -619,7 +619,7 @@ bool GossipHello_npc_death_knight_initiate(Player* pPlayer, Creature* pCreature) return false; } -bool GossipSelect_npc_death_knight_initiate(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +bool GossipSelect_npc_death_knight_initiate(Player* pPlayer, Creature* pCreature, uint32 /*uiSender*/, uint32 uiAction) { if (uiAction == GOSSIP_ACTION_INFO_DEF + 1) { @@ -1139,9 +1139,9 @@ struct MANGOS_DLL_DECL npc_eye_of_acherusAI : public ScriptedAI DoCastSpellIfCan(m_creature, SPELL_EYE_FLIGHT, CAST_TRIGGERED); } - void AttackStart(Unit* pWho) override {} + void AttackStart(Unit* /*pWho*/) override {} - void UpdateAI(const uint32 uiDiff) override + void UpdateAI(const uint32 /*uiDiff*/) override { if (m_bIsInitialized) return; @@ -1519,7 +1519,7 @@ struct MANGOS_DLL_DECL npc_highlord_darion_mograineAI : public npc_escortAI reader.PSendSysMessage("Event-processing is %s, Fighting is %s", reader.GetOnOffStr(m_uiEventTimer), reader.GetOnOffStr(m_uiFightTimer)); } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { // cast aggro aura DoCastSpellIfCan(m_creature, SPELL_HERO_AGGRO_AURA); @@ -2591,7 +2591,7 @@ bool GossipHello_npc_highlord_darion_mograine(Player* pPlayer, Creature* pCreatu return true; } -bool GossipSelect_npc_highlord_darion_mograine(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +bool GossipSelect_npc_highlord_darion_mograine(Player* pPlayer, Creature* pCreature, uint32 /*uiSender*/, uint32 uiAction) { if (uiAction == GOSSIP_ACTION_INFO_DEF + 1) { @@ -2635,7 +2635,7 @@ struct MANGOS_DLL_DECL npc_fellow_death_knightAI : public ScriptedAI m_uiPlagueStrikeTimer = urand(5000, 10000); } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { DoCastSpellIfCan(m_creature, SPELL_HERO_AGGRO_AURA); } @@ -2754,9 +2754,9 @@ struct MANGOS_DLL_DECL npc_lich_king_light_dawnAI : public ScriptedAI npc_lich_king_light_dawnAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } void Reset() override { } - void MoveInLineOfSight(Unit* pWho) override { } - void AttackStart(Unit* pWho) override { } - void UpdateAI(const uint32 uiDiff) override { } + void MoveInLineOfSight(Unit* /*pWho*/) override { } + void AttackStart(Unit* /*pWho*/) override { } + void UpdateAI(const uint32 /*uiDiff*/) override { } }; CreatureAI* GetAI_npc_lich_king_light_dawn(Creature* pCreature) @@ -2890,7 +2890,7 @@ CreatureAI* GetAI_npc_acherus_deathcharger(Creature* pCreature) return new npc_acherus_deathchargerAI(pCreature); } -bool EffectDummyCreature_npc_acherus_deathcharger(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) +bool EffectDummyCreature_npc_acherus_deathcharger(Unit* /*pCaster*/, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) { // always check spellid and effectindex if (uiSpellId == SPELL_HORSEMAN_SLAIN && uiEffIndex == EFFECT_INDEX_0) diff --git a/scripts/eastern_kingdoms/scarlet_monastery/boss_arcanist_doan.cpp b/scripts/eastern_kingdoms/scarlet_monastery/boss_arcanist_doan.cpp index 581239d8b..b251d62bc 100644 --- a/scripts/eastern_kingdoms/scarlet_monastery/boss_arcanist_doan.cpp +++ b/scripts/eastern_kingdoms/scarlet_monastery/boss_arcanist_doan.cpp @@ -54,7 +54,7 @@ struct MANGOS_DLL_DECL boss_arcanist_doanAI : public ScriptedAI bShielded = false; } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { DoScriptText(SAY_AGGRO, m_creature); } diff --git a/scripts/eastern_kingdoms/scarlet_monastery/boss_headless_horseman.cpp b/scripts/eastern_kingdoms/scarlet_monastery/boss_headless_horseman.cpp index 942e73c28..a93298fcb 100644 --- a/scripts/eastern_kingdoms/scarlet_monastery/boss_headless_horseman.cpp +++ b/scripts/eastern_kingdoms/scarlet_monastery/boss_headless_horseman.cpp @@ -50,7 +50,7 @@ struct MANGOS_DLL_DECL boss_headless_horsemanAI : public ScriptedAI { } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { m_creature->SetInCombatWithZone(); } @@ -65,7 +65,7 @@ struct MANGOS_DLL_DECL boss_headless_horsemanAI : public ScriptedAI DoScriptText(SAY_DEATH, m_creature); } - void UpdateAI(const uint32 uiDiff) override + void UpdateAI(const uint32 /*uiDiff*/) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/eastern_kingdoms/scarlet_monastery/boss_herod.cpp b/scripts/eastern_kingdoms/scarlet_monastery/boss_herod.cpp index b56d419fa..c9061e6d2 100644 --- a/scripts/eastern_kingdoms/scarlet_monastery/boss_herod.cpp +++ b/scripts/eastern_kingdoms/scarlet_monastery/boss_herod.cpp @@ -61,7 +61,7 @@ struct MANGOS_DLL_DECL boss_herodAI : public ScriptedAI m_uiWhirlwindTimer = 14500; } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { DoScriptText(SAY_AGGRO, m_creature); DoCastSpellIfCan(m_creature, SPELL_RUSHINGCHARGE); diff --git a/scripts/eastern_kingdoms/scarlet_monastery/boss_mograine_and_whitemane.cpp b/scripts/eastern_kingdoms/scarlet_monastery/boss_mograine_and_whitemane.cpp index 6000de74f..95a7e3712 100644 --- a/scripts/eastern_kingdoms/scarlet_monastery/boss_mograine_and_whitemane.cpp +++ b/scripts/eastern_kingdoms/scarlet_monastery/boss_mograine_and_whitemane.cpp @@ -83,7 +83,7 @@ struct MANGOS_DLL_DECL boss_scarlet_commander_mograineAI : public ScriptedAI m_creature->SetStandState(UNIT_STAND_STATE_STAND); } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { DoScriptText(SAY_MO_AGGRO, m_creature); DoCastSpellIfCan(m_creature, SPELL_RETRIBUTIONAURA); @@ -106,7 +106,7 @@ struct MANGOS_DLL_DECL boss_scarlet_commander_mograineAI : public ScriptedAI pWhitemane->Respawn(); } - void DamageTaken(Unit* pDoneBy, uint32& uiDamage) override + void DamageTaken(Unit* /*pDoneBy*/, uint32& uiDamage) override { if (uiDamage < m_creature->GetHealth() || m_bHasDied) return; @@ -143,7 +143,7 @@ struct MANGOS_DLL_DECL boss_scarlet_commander_mograineAI : public ScriptedAI } } - void SpellHit(Unit* pWho, const SpellEntry* pSpell) override + void SpellHit(Unit* /*pWho*/, const SpellEntry* pSpell) override { // When hit with ressurection say text if (pSpell->Id == SPELL_SCARLETRESURRECTION) @@ -251,12 +251,12 @@ struct MANGOS_DLL_DECL boss_high_inquisitor_whitemaneAI : public ScriptedAI } } - void MoveInLineOfSight(Unit* pWho) override + void MoveInLineOfSight(Unit* /*pWho*/) override { // This needs to be empty because Whitemane should NOT aggro while fighting Mograine. Mograine will give us a target. } - void DamageTaken(Unit* pDoneBy, uint32& uiDamage) override + void DamageTaken(Unit* /*pDoneBy*/, uint32& uiDamage) override { if (uiDamage < m_creature->GetHealth()) return; @@ -276,7 +276,7 @@ struct MANGOS_DLL_DECL boss_high_inquisitor_whitemaneAI : public ScriptedAI ScriptedAI::AttackStart(pWho); } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { DoScriptText(SAY_WH_INTRO, m_creature); } diff --git a/scripts/eastern_kingdoms/scholomance/instance_scholomance.cpp b/scripts/eastern_kingdoms/scholomance/instance_scholomance.cpp index d848fdf22..615cbbeea 100644 --- a/scripts/eastern_kingdoms/scholomance/instance_scholomance.cpp +++ b/scripts/eastern_kingdoms/scholomance/instance_scholomance.cpp @@ -38,7 +38,7 @@ void instance_scholomance::Initialize() m_mGandlingData[aGandlingEvents[i]] = GandlingEventData(); } -void instance_scholomance::OnPlayerEnter(Player* pPlayer) +void instance_scholomance::OnPlayerEnter(Player* /*pPlayer*/) { // Summon Gandling if can DoSpawnGandlingIfCan(true); @@ -349,7 +349,7 @@ InstanceData* GetInstanceData_instance_scholomance(Map* pMap) return new instance_scholomance(pMap); } -bool ProcessEventId_event_spell_gandling_shadow_portal(uint32 uiEventId, Object* pSource, Object* pTarget, bool bIsStart) +bool ProcessEventId_event_spell_gandling_shadow_portal(uint32 uiEventId, Object* pSource, Object* /*pTarget*/, bool /*bIsStart*/) { if (pSource->GetTypeId() == TYPEID_UNIT) { diff --git a/scripts/eastern_kingdoms/silverpine_forest.cpp b/scripts/eastern_kingdoms/silverpine_forest.cpp index d98beac99..885bf2412 100644 --- a/scripts/eastern_kingdoms/silverpine_forest.cpp +++ b/scripts/eastern_kingdoms/silverpine_forest.cpp @@ -221,7 +221,7 @@ struct MANGOS_DLL_DECL npc_deathstalker_faerleiaAI : public ScriptedAI pSummoned->GetMotionMaster()->MovePoint(0, fX, fY, fZ); } - void SummonedCreatureJustDied(Creature* pKilled) override + void SummonedCreatureJustDied(Creature* /*pKilled*/) override { --m_uiSummonCount; diff --git a/scripts/eastern_kingdoms/stormwind_city.cpp b/scripts/eastern_kingdoms/stormwind_city.cpp index ed674e6bc..e77e2b587 100644 --- a/scripts/eastern_kingdoms/stormwind_city.cpp +++ b/scripts/eastern_kingdoms/stormwind_city.cpp @@ -173,7 +173,7 @@ bool GossipHello_npc_lady_katrana_prestor(Player* pPlayer, Creature* pCreature) return true; } -bool GossipSelect_npc_lady_katrana_prestor(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +bool GossipSelect_npc_lady_katrana_prestor(Player* pPlayer, Creature* pCreature, uint32 /*uiSender*/, uint32 uiAction) { switch (uiAction) { @@ -394,7 +394,7 @@ bool GossipHello_npc_squire_rowe(Player* pPlayer, Creature* pCreature) return true; } -bool GossipSelect_npc_squire_rowe(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +bool GossipSelect_npc_squire_rowe(Player* pPlayer, Creature* pCreature, uint32 /*uiSender*/, uint32 uiAction) { if (uiAction == GOSSIP_ACTION_INFO_DEF + 1) { @@ -998,7 +998,7 @@ bool GossipHello_npc_reginald_windsor(Player* pPlayer, Creature* pCreature) return true; } -bool GossipSelect_npc_reginald_windsor(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +bool GossipSelect_npc_reginald_windsor(Player* pPlayer, Creature* pCreature, uint32 /*uiSender*/, uint32 uiAction) { if (uiAction == GOSSIP_ACTION_INFO_DEF + 1) { diff --git a/scripts/eastern_kingdoms/stratholme/boss_dathrohan_balnazzar.cpp b/scripts/eastern_kingdoms/stratholme/boss_dathrohan_balnazzar.cpp index 0016cc963..2c058bbb5 100644 --- a/scripts/eastern_kingdoms/stratholme/boss_dathrohan_balnazzar.cpp +++ b/scripts/eastern_kingdoms/stratholme/boss_dathrohan_balnazzar.cpp @@ -103,12 +103,12 @@ struct MANGOS_DLL_DECL boss_dathrohan_balnazzarAI : public ScriptedAI m_creature->UpdateEntry(NPC_DATHROHAN); } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { DoScriptText(SAY_AGGRO, m_creature); } - void JustDied(Unit* Victim) override + void JustDied(Unit* /*Victim*/) override { DoScriptText(SAY_DEATH, m_creature); diff --git a/scripts/eastern_kingdoms/stratholme/stratholme.cpp b/scripts/eastern_kingdoms/stratholme/stratholme.cpp index 9c43aaef6..042b9212d 100644 --- a/scripts/eastern_kingdoms/stratholme/stratholme.cpp +++ b/scripts/eastern_kingdoms/stratholme/stratholme.cpp @@ -36,7 +36,7 @@ EndContentData */ ## go_service_gate ######*/ -bool GOUse_go_service_gate(Player* pPlayer, GameObject* pGo) +bool GOUse_go_service_gate(Player* /*pPlayer*/, GameObject* pGo) { ScriptedInstance* pInstance = (ScriptedInstance*)pGo->GetInstanceData(); @@ -186,7 +186,7 @@ struct MANGOS_DLL_DECL mob_restless_soulAI : public ScriptedAI } } - void JustDied(Unit* Killer) override + void JustDied(Unit* /*Killer*/) override { if (m_bIsTagged) m_creature->SummonCreature(NPC_FREED_SOUL, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN, 300000); @@ -235,13 +235,13 @@ struct MANGOS_DLL_DECL mobs_spectral_ghostly_citizenAI : public ScriptedAI m_bIsTagged = false; } - void SpellHit(Unit* pCaster, const SpellEntry* pSpell) override + void SpellHit(Unit* /*pCaster*/, const SpellEntry* pSpell) override { if (!m_bIsTagged && pSpell->Id == SPELL_EGAN_BLASTER) m_bIsTagged = true; } - void JustDied(Unit* Killer) override + void JustDied(Unit* /*Killer*/) override { if (m_bIsTagged) { diff --git a/scripts/eastern_kingdoms/sunken_temple/sunken_temple.cpp b/scripts/eastern_kingdoms/sunken_temple/sunken_temple.cpp index c908b75b7..6f1298427 100644 --- a/scripts/eastern_kingdoms/sunken_temple/sunken_temple.cpp +++ b/scripts/eastern_kingdoms/sunken_temple/sunken_temple.cpp @@ -39,7 +39,7 @@ enum QUEST_ERANIKUS_TYRANT_OF_DREAMS = 8733 }; -bool AreaTrigger_at_shade_of_eranikus(Player* pPlayer, AreaTriggerEntry const* pAt) +bool AreaTrigger_at_shade_of_eranikus(Player* pPlayer, AreaTriggerEntry const* /*pAt*/) { if (ScriptedInstance* pInstance = (ScriptedInstance*)pPlayer->GetInstanceData()) { @@ -143,7 +143,7 @@ CreatureAI* GetAI_npc_malfurion(Creature* pCreature) ## event_antalarion_statues ######*/ -bool ProcessEventId_event_antalarion_statue_activation(uint32 uiEventId, Object* pSource, Object* pTarget, bool bIsStart) +bool ProcessEventId_event_antalarion_statue_activation(uint32 uiEventId, Object* pSource, Object* pTarget, bool /*bIsStart*/) { if (pSource->GetTypeId() == TYPEID_PLAYER && pTarget->GetTypeId() == TYPEID_GAMEOBJECT) { @@ -181,7 +181,7 @@ bool ProcessEventId_event_antalarion_statue_activation(uint32 uiEventId, Object* /*###### ## event_avatar_of_hakkar ######*/ -bool ProcessEventId_event_avatar_of_hakkar(uint32 uiEventId, Object* pSource, Object* pTarget, bool bIsStart) +bool ProcessEventId_event_avatar_of_hakkar(uint32 /*uiEventId*/, Object* pSource, Object* /*pTarget*/, bool /*bIsStart*/) { if (pSource->GetTypeId() == TYPEID_PLAYER) { @@ -202,7 +202,7 @@ bool ProcessEventId_event_avatar_of_hakkar(uint32 uiEventId, Object* pSource, Ob /*###### ## go_eternal_flame ######*/ -bool GOUse_go_eternal_flame(Player* pPlayer, GameObject* pGo) +bool GOUse_go_eternal_flame(Player* /*pPlayer*/, GameObject* pGo) { instance_sunken_temple* pInstance = (instance_sunken_temple*)pGo->GetInstanceData(); @@ -222,7 +222,7 @@ bool GOUse_go_eternal_flame(Player* pPlayer, GameObject* pGo) /*###### ## effectDummy_summon_hakkar ######*/ -bool EffectDummyCreature_summon_hakkar(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) +bool EffectDummyCreature_summon_hakkar(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* /*pCreatureTarget*/) { // Always check spellid and effectindex if (uiSpellId == SPELL_SUMMON_AVATAR && uiEffIndex == EFFECT_INDEX_0) diff --git a/scripts/eastern_kingdoms/sunwell_plateau/boss_brutallus.cpp b/scripts/eastern_kingdoms/sunwell_plateau/boss_brutallus.cpp index 70467b9cc..699c7c735 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/boss_brutallus.cpp +++ b/scripts/eastern_kingdoms/sunwell_plateau/boss_brutallus.cpp @@ -470,7 +470,7 @@ bool EffectAuraDummy_spell_aura_dummy_npc_brutallus_cloud(const Aura* pAura, boo return true; } -bool AreaTrigger_at_madrigosa(Player* pPlayer, AreaTriggerEntry const* pAt) +bool AreaTrigger_at_madrigosa(Player* pPlayer, AreaTriggerEntry const* /*pAt*/) { if (ScriptedInstance* pInstance = (ScriptedInstance*)pPlayer->GetInstanceData()) { diff --git a/scripts/eastern_kingdoms/sunwell_plateau/boss_eredar_twins.cpp b/scripts/eastern_kingdoms/sunwell_plateau/boss_eredar_twins.cpp index a77aa1e24..4b1d79330 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/boss_eredar_twins.cpp +++ b/scripts/eastern_kingdoms/sunwell_plateau/boss_eredar_twins.cpp @@ -137,7 +137,7 @@ struct MANGOS_DLL_DECL boss_alythessAI : public ScriptedAI } } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { if (m_pInstance) { @@ -311,7 +311,7 @@ struct MANGOS_DLL_DECL boss_sacrolashAI : public ScriptedAI } } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { if (m_pInstance) { diff --git a/scripts/eastern_kingdoms/sunwell_plateau/boss_felmyst.cpp b/scripts/eastern_kingdoms/sunwell_plateau/boss_felmyst.cpp index 6a0178c19..965029a17 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/boss_felmyst.cpp +++ b/scripts/eastern_kingdoms/sunwell_plateau/boss_felmyst.cpp @@ -134,7 +134,7 @@ struct MANGOS_DLL_DECL boss_felmystAI : public ScriptedAI Reset(); } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { DoCastSpellIfCan(m_creature, SPELL_NOXIOUS_FUMES); diff --git a/scripts/eastern_kingdoms/sunwell_plateau/boss_kalecgos.cpp b/scripts/eastern_kingdoms/sunwell_plateau/boss_kalecgos.cpp index c464f155f..bf17f3714 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/boss_kalecgos.cpp +++ b/scripts/eastern_kingdoms/sunwell_plateau/boss_kalecgos.cpp @@ -139,7 +139,7 @@ struct MANGOS_DLL_DECL boss_kalecgosAI : public ScriptedAI ScriptedAI::EnterEvadeMode(); } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { DoScriptText(SAY_EVIL_AGGRO, m_creature); @@ -147,7 +147,7 @@ struct MANGOS_DLL_DECL boss_kalecgosAI : public ScriptedAI m_pInstance->SetData(TYPE_KALECGOS, IN_PROGRESS); } - void DamageTaken(Unit* pDoneBy, uint32& uiDamage) override + void DamageTaken(Unit* /*pDoneBy*/, uint32& uiDamage) override { if (uiDamage > m_creature->GetHealth()) { @@ -337,7 +337,7 @@ struct MANGOS_DLL_DECL boss_sathrovarrAI : public ScriptedAI DoCastSpellIfCan(m_creature, SPELL_SPECTRAL_INVISIBILITY); } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { DoScriptText(SAY_SATH_AGGRO, m_creature); @@ -349,7 +349,7 @@ struct MANGOS_DLL_DECL boss_sathrovarrAI : public ScriptedAI pKalec->AI()->AttackStart(m_creature); } - void DamageTaken(Unit* pDoneBy, uint32& uiDamage) override + void DamageTaken(Unit* /*pDoneBy*/, uint32& uiDamage) override { if (uiDamage > m_creature->GetHealth()) { @@ -494,7 +494,7 @@ struct MANGOS_DLL_DECL boss_kalecgos_humanoidAI : public ScriptedAI DoCastSpellIfCan(m_creature, SPELL_SPECTRAL_INVISIBILITY); } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { DoScriptText(SAY_GOOD_AGGRO, m_creature); } diff --git a/scripts/eastern_kingdoms/sunwell_plateau/boss_kiljaeden.cpp b/scripts/eastern_kingdoms/sunwell_plateau/boss_kiljaeden.cpp index ac9352c64..804f625ee 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/boss_kiljaeden.cpp +++ b/scripts/eastern_kingdoms/sunwell_plateau/boss_kiljaeden.cpp @@ -407,7 +407,7 @@ struct MANGOS_DLL_DECL boss_kiljaedenAI : public Scripted_NoMovementAI, private m_uiArmageddonTimer = 20000; } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { if (m_pInstance) m_pInstance->SetData(TYPE_KILJAEDEN, IN_PROGRESS); @@ -746,9 +746,9 @@ struct MANGOS_DLL_DECL npc_shield_orbAI : public ScriptedAI } } - void AttackStart(Unit* pWho) override {} - void MoveInLineOfSight(Unit* pWho) override {} - void UpdateAI(const uint32 uiDiff) override { } + void AttackStart(Unit* /*pWho*/) override {} + void MoveInLineOfSight(Unit* /*pWho*/) override {} + void UpdateAI(const uint32 /*uiDiff*/) override { } }; CreatureAI* GetAI_boss_kiljaeden(Creature* pCreature) diff --git a/scripts/eastern_kingdoms/sunwell_plateau/boss_muru.cpp b/scripts/eastern_kingdoms/sunwell_plateau/boss_muru.cpp index 4200445af..ac1e6338c 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/boss_muru.cpp +++ b/scripts/eastern_kingdoms/sunwell_plateau/boss_muru.cpp @@ -91,7 +91,7 @@ struct MANGOS_DLL_DECL boss_muruAI : public Scripted_NoMovementAI m_bIsTransition = false; } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { if (m_pInstance) m_pInstance->SetData(TYPE_MURU, IN_PROGRESS); @@ -106,7 +106,7 @@ struct MANGOS_DLL_DECL boss_muruAI : public Scripted_NoMovementAI m_pInstance->SetData(TYPE_MURU, FAIL); } - void DamageTaken(Unit* pDoneBy, uint32& uiDamage) override + void DamageTaken(Unit* /*pDoneBy*/, uint32& uiDamage) override { if (uiDamage > m_creature->GetHealth()) { @@ -230,7 +230,7 @@ struct MANGOS_DLL_DECL boss_entropiusAI : public ScriptedAI m_uiDarknessTimer = 20000; } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { DoCastSpellIfCan(m_creature, SPELL_NEGATIVE_ENERGY_ENT); } @@ -335,7 +335,7 @@ struct MANGOS_DLL_DECL npc_portal_targetAI : public Scripted_NoMovementAI DoCastSpellIfCan(pSummoned, SPELL_SENTINEL_SUMMONER_VISUAL, CAST_TRIGGERED); } - void SpellHit(Unit* pCaster, const SpellEntry* pSpell) override + void SpellHit(Unit* /*pCaster*/, const SpellEntry* pSpell) override { // These spells are dummies, but are used only to init the timers // They could use the EffectDummyCreature to handle this, but this makes code easier @@ -420,7 +420,7 @@ struct MANGOS_DLL_DECL npc_void_sentinel_summonerAI : public Scripted_NoMovement } } - void UpdateAI(const uint32 uiDiff) override { } + void UpdateAI(const uint32 /*uiDiff*/) override { } }; CreatureAI* GetAI_boss_muru(Creature* pCreature) diff --git a/scripts/eastern_kingdoms/tirisfal_glades.cpp b/scripts/eastern_kingdoms/tirisfal_glades.cpp index b5564f7d1..aa6611562 100644 --- a/scripts/eastern_kingdoms/tirisfal_glades.cpp +++ b/scripts/eastern_kingdoms/tirisfal_glades.cpp @@ -42,7 +42,7 @@ enum GO_DOOR = 176594 }; -bool GOUse_go_mausoleum_door(Player* pPlayer, GameObject* pGo) +bool GOUse_go_mausoleum_door(Player* pPlayer, GameObject* /*pGo*/) { if (pPlayer->GetQuestStatus(QUEST_ULAG) != QUEST_STATUS_INCOMPLETE) return false; diff --git a/scripts/eastern_kingdoms/uldaman/boss_archaedas.cpp b/scripts/eastern_kingdoms/uldaman/boss_archaedas.cpp index 915329664..8328ef88d 100644 --- a/scripts/eastern_kingdoms/uldaman/boss_archaedas.cpp +++ b/scripts/eastern_kingdoms/uldaman/boss_archaedas.cpp @@ -69,7 +69,7 @@ struct MANGOS_DLL_DECL boss_archaedasAI : public ScriptedAI m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { if (m_pInstance) m_pInstance->SetData(TYPE_ARCHAEDAS, IN_PROGRESS); @@ -93,7 +93,7 @@ struct MANGOS_DLL_DECL boss_archaedasAI : public ScriptedAI m_pInstance->SetData(TYPE_ARCHAEDAS, FAIL); } - void SpellHitTarget(Unit* pTarget, const SpellEntry* pSpell) override + void SpellHitTarget(Unit* pTarget, const SpellEntry* /*pSpell*/) override { if (pTarget->GetTypeId() != TYPEID_PLAYER) { @@ -209,7 +209,7 @@ struct MANGOS_DLL_DECL npc_archaeras_addAI : public ScriptedAI { } - void UpdateAI(const uint32 uiDiff) override + void UpdateAI(const uint32 /*uiDiff*/) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/eastern_kingdoms/uldaman/instance_uldaman.cpp b/scripts/eastern_kingdoms/uldaman/instance_uldaman.cpp index 0c3bc5921..2a1488459 100644 --- a/scripts/eastern_kingdoms/uldaman/instance_uldaman.cpp +++ b/scripts/eastern_kingdoms/uldaman/instance_uldaman.cpp @@ -314,7 +314,7 @@ InstanceData* GetInstanceData_instance_uldaman(Map* pMap) return new instance_uldaman(pMap); } -bool ProcessEventId_event_spell_altar_boss_aggro(uint32 uiEventId, Object* pSource, Object* pTarget, bool bIsStart) +bool ProcessEventId_event_spell_altar_boss_aggro(uint32 uiEventId, Object* pSource, Object* /*pTarget*/, bool bIsStart) { if (bIsStart && pSource->GetTypeId() == TYPEID_PLAYER) { diff --git a/scripts/eastern_kingdoms/undercity.cpp b/scripts/eastern_kingdoms/undercity.cpp index ab17b5f1e..a601a5034 100644 --- a/scripts/eastern_kingdoms/undercity.cpp +++ b/scripts/eastern_kingdoms/undercity.cpp @@ -139,7 +139,7 @@ CreatureAI* GetAI_npc_lady_sylvanas_windrunner(Creature* pCreature) return new npc_lady_sylvanas_windrunnerAI(pCreature); } -bool QuestRewarded_npc_lady_sylvanas_windrunner(Player* pPlayer, Creature* pCreature, Quest const* pQuest) +bool QuestRewarded_npc_lady_sylvanas_windrunner(Player* /*pPlayer*/, Creature* pCreature, Quest const* pQuest) { if (pQuest->GetQuestId() == QUEST_ID_JOURNEY_UNDERCITY) { diff --git a/scripts/eastern_kingdoms/wetlands.cpp b/scripts/eastern_kingdoms/wetlands.cpp index 2d4694050..1d395fc85 100644 --- a/scripts/eastern_kingdoms/wetlands.cpp +++ b/scripts/eastern_kingdoms/wetlands.cpp @@ -69,7 +69,7 @@ struct MANGOS_DLL_DECL npc_tapoke_slim_jahnAI : public npc_escortAI } } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { Player* pPlayer = GetPlayerForEscort(); @@ -97,7 +97,7 @@ struct MANGOS_DLL_DECL npc_tapoke_slim_jahnAI : public npc_escortAI AttackStart(pAttacker); } - void DamageTaken(Unit* pDoneBy, uint32& uiDamage) override + void DamageTaken(Unit* /*pDoneBy*/, uint32& uiDamage) override { if (m_creature->GetHealthPercent() < 20.0f) { diff --git a/scripts/eastern_kingdoms/zulaman/boss_akilzon.cpp b/scripts/eastern_kingdoms/zulaman/boss_akilzon.cpp index 9f7edae53..d05866c2c 100644 --- a/scripts/eastern_kingdoms/zulaman/boss_akilzon.cpp +++ b/scripts/eastern_kingdoms/zulaman/boss_akilzon.cpp @@ -78,7 +78,7 @@ struct MANGOS_DLL_DECL boss_akilzonAI : public ScriptedAI m_uiBerserkTimer = 10 * MINUTE * IN_MILLISECONDS; } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { DoScriptText(SAY_AGGRO, m_creature); diff --git a/scripts/eastern_kingdoms/zulaman/boss_halazzi.cpp b/scripts/eastern_kingdoms/zulaman/boss_halazzi.cpp index c38a99e01..690dd3ea8 100644 --- a/scripts/eastern_kingdoms/zulaman/boss_halazzi.cpp +++ b/scripts/eastern_kingdoms/zulaman/boss_halazzi.cpp @@ -127,7 +127,7 @@ struct MANGOS_DLL_DECL boss_halazziAI : public ScriptedAI m_pInstance->SetData(TYPE_HALAZZI, FAIL); } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { DoScriptText(SAY_AGGRO, m_creature); @@ -161,7 +161,7 @@ struct MANGOS_DLL_DECL boss_halazziAI : public ScriptedAI } } - void SpellHit(Unit* pCaster, const SpellEntry* pSpell) override + void SpellHit(Unit* /*pCaster*/, const SpellEntry* pSpell) override { if (pSpell->Id == SPELL_TRANSFIGURE_TRANSFORM) { diff --git a/scripts/eastern_kingdoms/zulaman/boss_janalai.cpp b/scripts/eastern_kingdoms/zulaman/boss_janalai.cpp index ae9e12e38..85c0ee007 100644 --- a/scripts/eastern_kingdoms/zulaman/boss_janalai.cpp +++ b/scripts/eastern_kingdoms/zulaman/boss_janalai.cpp @@ -170,7 +170,7 @@ struct MANGOS_DLL_DECL boss_janalaiAI : public ScriptedAI DoScriptText(urand(0, 1) ? SAY_SLAY_1 : SAY_SLAY_2, m_creature); } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { DoScriptText(SAY_AGGRO, m_creature); @@ -401,8 +401,8 @@ struct MANGOS_DLL_DECL npc_amanishi_hatcherAI : public ScriptedAI m_creature->SetWalk(false); } - void MoveInLineOfSight(Unit* pWho) override { } - void AttackStart(Unit* pWho) override { } + void MoveInLineOfSight(Unit* /*pWho*/) override { } + void AttackStart(Unit* /*pWho*/) override { } void MovementInform(uint32 uiType, uint32 uiPointId) override { @@ -490,9 +490,9 @@ struct MANGOS_DLL_DECL npc_dragonhawk_eggAI : public Scripted_NoMovementAI void Reset() override {} - void AttackStart(Unit* pWho) override {} - void MoveInLineOfSight(Unit* pWho) override {} - void UpdateAI(const uint32 uiDiff) override {} + void AttackStart(Unit* /*pWho*/) override {} + void MoveInLineOfSight(Unit* /*pWho*/) override {} + void UpdateAI(const uint32 /*uiDiff*/) override {} }; CreatureAI* GetAI_npc_dragonhawk_eggAI(Creature* pCreature) @@ -507,9 +507,9 @@ struct MANGOS_DLL_DECL npc_janalai_firebombAI : public Scripted_NoMovementAI void Reset() override {} - void AttackStart(Unit* pWho) override {} - void MoveInLineOfSight(Unit* pWho) override {} - void UpdateAI(const uint32 uiDiff) override {} + void AttackStart(Unit* /*pWho*/) override {} + void MoveInLineOfSight(Unit* /*pWho*/) override {} + void UpdateAI(const uint32 /*uiDiff*/) override {} }; CreatureAI* GetAI_npc_janalai_firebombAI(Creature* pCreature) diff --git a/scripts/eastern_kingdoms/zulaman/boss_malacrass.cpp b/scripts/eastern_kingdoms/zulaman/boss_malacrass.cpp index 2a04ee001..b5432fa5b 100644 --- a/scripts/eastern_kingdoms/zulaman/boss_malacrass.cpp +++ b/scripts/eastern_kingdoms/zulaman/boss_malacrass.cpp @@ -288,7 +288,7 @@ struct MANGOS_DLL_DECL boss_malacrassAI : public ScriptedAI } } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { DoScriptText(SAY_AGGRO, m_creature); @@ -312,7 +312,7 @@ struct MANGOS_DLL_DECL boss_malacrassAI : public ScriptedAI m_pInstance->SetData(TYPE_MALACRASS, DONE); } - void SummonedCreatureJustDied(Creature* pSummoned) override + void SummonedCreatureJustDied(Creature* /*pSummoned*/) override { switch (urand(0, 2)) { diff --git a/scripts/eastern_kingdoms/zulaman/boss_nalorakk.cpp b/scripts/eastern_kingdoms/zulaman/boss_nalorakk.cpp index c20560797..ff8470913 100644 --- a/scripts/eastern_kingdoms/zulaman/boss_nalorakk.cpp +++ b/scripts/eastern_kingdoms/zulaman/boss_nalorakk.cpp @@ -143,7 +143,7 @@ struct MANGOS_DLL_DECL boss_nalorakkAI : public ScriptedAI Reset(); } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { DoScriptText(SAY_AGGRO, m_creature); diff --git a/scripts/eastern_kingdoms/zulaman/boss_zuljin.cpp b/scripts/eastern_kingdoms/zulaman/boss_zuljin.cpp index 46e7905d8..7c0a964dd 100644 --- a/scripts/eastern_kingdoms/zulaman/boss_zuljin.cpp +++ b/scripts/eastern_kingdoms/zulaman/boss_zuljin.cpp @@ -167,7 +167,7 @@ struct MANGOS_DLL_DECL boss_zuljinAI : public ScriptedAI SetCombatMovement(true); } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { DoScriptText(SAY_AGGRO, m_creature); @@ -262,7 +262,7 @@ struct MANGOS_DLL_DECL boss_zuljinAI : public ScriptedAI pSpirit->CastSpell(m_creature, SPELL_SPIRIT_DRAIN, false); } - void SpellHit(Unit* pCaster, const SpellEntry* pSpell) override + void SpellHit(Unit* /*pCaster*/, const SpellEntry* pSpell) override { if (pSpell->Id == SPELL_SPIRIT_DRAIN) { diff --git a/scripts/eastern_kingdoms/zulaman/instance_zulaman.cpp b/scripts/eastern_kingdoms/zulaman/instance_zulaman.cpp index 95a9fe909..9d2439e69 100644 --- a/scripts/eastern_kingdoms/zulaman/instance_zulaman.cpp +++ b/scripts/eastern_kingdoms/zulaman/instance_zulaman.cpp @@ -51,7 +51,7 @@ bool instance_zulaman::IsEncounterInProgress() const return false; } -void instance_zulaman::OnPlayerEnter(Player* pPlayer) +void instance_zulaman::OnPlayerEnter(Player* /*pPlayer*/) { if (GetData(TYPE_EVENT_RUN) == IN_PROGRESS) { diff --git a/scripts/eastern_kingdoms/zulaman/zulaman.cpp b/scripts/eastern_kingdoms/zulaman/zulaman.cpp index 8f0629328..360f2b899 100644 --- a/scripts/eastern_kingdoms/zulaman/zulaman.cpp +++ b/scripts/eastern_kingdoms/zulaman/zulaman.cpp @@ -191,7 +191,7 @@ bool GossipHello_npc_harrison_jones_za(Player* pPlayer, Creature* pCreature) return true; } -bool GossipSelect_npc_harrison_jones_za(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +bool GossipSelect_npc_harrison_jones_za(Player* pPlayer, Creature* pCreature, uint32 /*uiSender*/, uint32 uiAction) { if (uiAction == GOSSIP_ACTION_INFO_DEF + 1) { @@ -213,7 +213,7 @@ CreatureAI* GetAI_npc_harrison_jones_za(Creature* pCreature) ######*/ // Unsure how this Gong must work. Here we always return false to allow Mangos always process further. -bool GOUse_go_strange_gong(Player* pPlayer, GameObject* pGo) +bool GOUse_go_strange_gong(Player* /*pPlayer*/, GameObject* pGo) { ScriptedInstance* pInstance = (ScriptedInstance*)pGo->GetInstanceData(); diff --git a/scripts/eastern_kingdoms/zulgurub/boss_arlokk.cpp b/scripts/eastern_kingdoms/zulgurub/boss_arlokk.cpp index 73ed9e319..222680679 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_arlokk.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_arlokk.cpp @@ -84,7 +84,7 @@ struct MANGOS_DLL_DECL boss_arlokkAI : public ScriptedAI m_creature->SetVisibility(VISIBILITY_ON); } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { DoScriptText(SAY_AGGRO, m_creature); } @@ -268,7 +268,7 @@ CreatureAI* GetAI_boss_arlokk(Creature* pCreature) return new boss_arlokkAI(pCreature); } -bool GOUse_go_gong_of_bethekk(Player* pPlayer, GameObject* pGo) +bool GOUse_go_gong_of_bethekk(Player* /*pPlayer*/, GameObject* pGo) { if (ScriptedInstance* pInstance = (ScriptedInstance*)pGo->GetInstanceData()) { diff --git a/scripts/eastern_kingdoms/zulgurub/boss_hakkar.cpp b/scripts/eastern_kingdoms/zulgurub/boss_hakkar.cpp index a2905b33a..080389085 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_hakkar.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_hakkar.cpp @@ -80,7 +80,7 @@ struct MANGOS_DLL_DECL boss_hakkarAI : public ScriptedAI m_uiAspectOfArlokkTimer = 18000; } - void Aggro(Unit* who) override + void Aggro(Unit* /*who*/) override { DoScriptText(SAY_AGGRO, m_creature); diff --git a/scripts/eastern_kingdoms/zulgurub/boss_jeklik.cpp b/scripts/eastern_kingdoms/zulgurub/boss_jeklik.cpp index 56bb5d539..57208806a 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_jeklik.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_jeklik.cpp @@ -103,7 +103,7 @@ struct MANGOS_DLL_DECL boss_jeklikAI : public ScriptedAI DoCastSpellIfCan(m_creature, SPELL_GREEN_CHANNELING); } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { DoScriptText(SAY_AGGRO, m_creature); @@ -302,7 +302,7 @@ struct MANGOS_DLL_DECL npc_gurubashi_bat_riderAI : public ScriptedAI DoCastSpellIfCan(m_creature, SPELL_TRASH); } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { // Don't attack if is summoned by Jeklik - the npc gets aggro because of the Liquid Fire if (m_bIsSummon) diff --git a/scripts/eastern_kingdoms/zulgurub/boss_jindo.cpp b/scripts/eastern_kingdoms/zulgurub/boss_jindo.cpp index 3524860b3..dc8eed3f4 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_jindo.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_jindo.cpp @@ -74,7 +74,7 @@ struct MANGOS_DLL_DECL boss_jindoAI : public ScriptedAI m_uiTeleportTimer = 5000; } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { DoScriptText(SAY_AGGRO, m_creature); } @@ -179,8 +179,8 @@ struct MANGOS_DLL_DECL mob_healing_wardAI : public ScriptedAI m_uiHealTimer = 3000; // Timer unknown, sources go over 1s, per tick to 3s, keep 3s as in original script } - void AttackStart(Unit* pWho) override {} - void MoveInLineOfSight(Unit* pWho) override {} + void AttackStart(Unit* /*pWho*/) override {} + void MoveInLineOfSight(Unit* /*pWho*/) override {} void UpdateAI(const uint32 uiDiff) override { diff --git a/scripts/eastern_kingdoms/zulgurub/boss_mandokir.cpp b/scripts/eastern_kingdoms/zulgurub/boss_mandokir.cpp index 175bdc866..34e1d860a 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_mandokir.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_mandokir.cpp @@ -120,7 +120,7 @@ struct MANGOS_DLL_DECL boss_mandokirAI : public ScriptedAI m_fTargetThreat = 0.0f; } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { DoScriptText(SAY_AGGRO, m_creature); diff --git a/scripts/eastern_kingdoms/zulgurub/boss_marli.cpp b/scripts/eastern_kingdoms/zulgurub/boss_marli.cpp index c54079cc9..0cc787bbc 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_marli.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_marli.cpp @@ -85,7 +85,7 @@ struct MANGOS_DLL_DECL boss_marliAI : public ScriptedAI m_bIsInPhaseTwo = false; } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { DoScriptText(SAY_AGGRO, m_creature); diff --git a/scripts/eastern_kingdoms/zulgurub/boss_thekal.cpp b/scripts/eastern_kingdoms/zulgurub/boss_thekal.cpp index 80efca0b0..b4be9b11c 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_thekal.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_thekal.cpp @@ -71,7 +71,7 @@ struct MANGOS_DLL_DECL boss_thekalBaseAI : public ScriptedAI virtual void OnFakeingDeath() {} virtual void OnRevive() {} - void DamageTaken(Unit* pKiller, uint32& uiDamage) override + void DamageTaken(Unit* /*pKiller*/, uint32& uiDamage) override { if (uiDamage < m_creature->GetHealth()) return; @@ -176,7 +176,7 @@ struct MANGOS_DLL_DECL boss_thekalAI : public boss_thekalBaseAI Revive(true); } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { DoScriptText(SAY_AGGRO, m_creature); } @@ -387,7 +387,7 @@ struct MANGOS_DLL_DECL mob_zealot_lorkhanAI : public boss_thekalBaseAI Revive(true); } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { if (m_pInstance) m_pInstance->SetData(TYPE_LORKHAN, IN_PROGRESS); @@ -528,7 +528,7 @@ struct MANGOS_DLL_DECL mob_zealot_zathAI : public boss_thekalBaseAI Revive(true); } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { if (m_pInstance) m_pInstance->SetData(TYPE_ZATH, IN_PROGRESS); @@ -628,7 +628,7 @@ struct MANGOS_DLL_DECL mob_zealot_zathAI : public boss_thekalBaseAI } }; -bool EffectDummyCreature_thekal_resurrection(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) +bool EffectDummyCreature_thekal_resurrection(Unit* /*pCaster*/, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) { // always check spellid and effectindex if (uiSpellId == SPELL_RESURRECT && uiEffIndex == EFFECT_INDEX_0) diff --git a/scripts/kalimdor/ashenvale.cpp b/scripts/kalimdor/ashenvale.cpp index 6bffdb5f9..7bfc9ceb5 100644 --- a/scripts/kalimdor/ashenvale.cpp +++ b/scripts/kalimdor/ashenvale.cpp @@ -105,7 +105,7 @@ struct MANGOS_DLL_DECL npc_muglashAI : public npc_escortAI } } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { if (HasEscortState(STATE_ESCORT_PAUSED)) { @@ -224,7 +224,7 @@ CreatureAI* GetAI_npc_muglash(Creature* pCreature) return new npc_muglashAI(pCreature); } -bool GOUse_go_naga_brazier(Player* pPlayer, GameObject* pGo) +bool GOUse_go_naga_brazier(Player* /*pPlayer*/, GameObject* pGo) { if (Creature* pCreature = GetClosestCreatureWithEntry(pGo, NPC_MUGLASH, INTERACTION_DISTANCE * 2)) { diff --git a/scripts/kalimdor/azshara.cpp b/scripts/kalimdor/azshara.cpp index 69086147a..afdec7660 100644 --- a/scripts/kalimdor/azshara.cpp +++ b/scripts/kalimdor/azshara.cpp @@ -112,7 +112,7 @@ struct MANGOS_DLL_DECL npc_rizzle_sprysprocketAI : public npc_escortAI void Reset() override { } - void SpellHit(Unit* pCaster, const SpellEntry* pSpell) override + void SpellHit(Unit* /*pCaster*/, const SpellEntry* pSpell) override { if (pSpell->Id == SPELL_SURRENDER) { @@ -130,7 +130,7 @@ struct MANGOS_DLL_DECL npc_rizzle_sprysprocketAI : public npc_escortAI } // this may be wrong - void JustSummoned(Creature* pSummoned) override + void JustSummoned(Creature* /*pSummoned*/) override { // pSummoned->CastSpell(pSummoned,SPELL_PERIODIC_GRENADE,false,NULL,NULL,m_creature->GetObjectGuid()); } @@ -194,7 +194,7 @@ bool GossipHello_npc_rizzle_sprysprocket(Player* pPlayer, Creature* pCreature) return true; } -bool GossipSelect_npc_rizzle_sprysprocket(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +bool GossipSelect_npc_rizzle_sprysprocket(Player* pPlayer, Creature* /*pCreature*/, uint32 /*uiSender*/, uint32 uiAction) { if (uiAction == GOSSIP_ACTION_INFO_DEF + 1) { @@ -230,7 +230,7 @@ CreatureAI* GetAI_npc_depth_charge(Creature* pCreature) ## go_southfury_moonstone ######*/ -bool GOUse_go_southfury_moonstone(Player* pPlayer, GameObject* pGo) +bool GOUse_go_southfury_moonstone(Player* pPlayer, GameObject* /*pGo*/) { // implicitTarget=48 not implemented as of writing this code, and manual summon may be just ok for our purpose // pPlayer->CastSpell(pPlayer,SPELL_SUMMON_RIZZLE,false); @@ -419,7 +419,7 @@ bool GossipHello_npc_loramus_thalipedes(Player* pPlayer, Creature* pCreature) return true; } -bool GossipSelect_npc_loramus_thalipedes(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +bool GossipSelect_npc_loramus_thalipedes(Player* pPlayer, Creature* pCreature, uint32 /*uiSender*/, uint32 uiAction) { switch (uiAction) { diff --git a/scripts/kalimdor/azuremyst_isle.cpp b/scripts/kalimdor/azuremyst_isle.cpp index dd3f11190..71c04863d 100644 --- a/scripts/kalimdor/azuremyst_isle.cpp +++ b/scripts/kalimdor/azuremyst_isle.cpp @@ -272,7 +272,7 @@ bool GossipHello_npc_engineer_spark_overgrind(Player* pPlayer, Creature* pCreatu return true; } -bool GossipSelect_npc_engineer_spark_overgrind(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +bool GossipSelect_npc_engineer_spark_overgrind(Player* pPlayer, Creature* pCreature, uint32 /*uiSender*/, uint32 uiAction) { if (uiAction == GOSSIP_ACTION_INFO_DEF) { @@ -302,9 +302,9 @@ struct MANGOS_DLL_DECL npc_injured_draeneiAI : public ScriptedAI } } - void MoveInLineOfSight(Unit* pWho) override {} // ignore everyone around them (won't aggro anything) + void MoveInLineOfSight(Unit* /*pWho*/) override {} // ignore everyone around them (won't aggro anything) - void UpdateAI(const uint32 uiDiff) override {} + void UpdateAI(const uint32 /*uiDiff*/) override {} }; CreatureAI* GetAI_npc_injured_draenei(Creature* pCreature) diff --git a/scripts/kalimdor/blackfathom_deeps/instance_blackfathom_deeps.cpp b/scripts/kalimdor/blackfathom_deeps/instance_blackfathom_deeps.cpp index 5dcd69d15..25c466cf8 100644 --- a/scripts/kalimdor/blackfathom_deeps/instance_blackfathom_deeps.cpp +++ b/scripts/kalimdor/blackfathom_deeps/instance_blackfathom_deeps.cpp @@ -243,7 +243,7 @@ InstanceData* GetInstanceData_instance_blackfathom_deeps(Map* pMap) return new instance_blackfathom_deeps(pMap); } -bool GOUse_go_fire_of_akumai(Player* pPlayer, GameObject* pGo) +bool GOUse_go_fire_of_akumai(Player* /*pPlayer*/, GameObject* pGo) { instance_blackfathom_deeps* pInstance = (instance_blackfathom_deeps*)pGo->GetInstanceData(); diff --git a/scripts/kalimdor/bloodmyst_isle.cpp b/scripts/kalimdor/bloodmyst_isle.cpp index 7af614a69..5fe0cd9c0 100644 --- a/scripts/kalimdor/bloodmyst_isle.cpp +++ b/scripts/kalimdor/bloodmyst_isle.cpp @@ -44,8 +44,8 @@ struct MANGOS_DLL_DECL mob_webbed_creatureAI : public Scripted_NoMovementAI mob_webbed_creatureAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { Reset(); } void Reset() override { } - void AttackStart(Unit* pWho) override { } - void MoveInLineOfSight(Unit* pWho) override { } + void AttackStart(Unit* /*pWho*/) override { } + void MoveInLineOfSight(Unit* /*pWho*/) override { } void JustDied(Unit* pKiller) override { diff --git a/scripts/kalimdor/boss_azuregos.cpp b/scripts/kalimdor/boss_azuregos.cpp index 5ee8403ac..9297a8e1e 100644 --- a/scripts/kalimdor/boss_azuregos.cpp +++ b/scripts/kalimdor/boss_azuregos.cpp @@ -68,7 +68,7 @@ struct MANGOS_DLL_DECL boss_azuregosAI : public ScriptedAI pVictim->CastSpell(pVictim, SPELL_MARK_OF_FROST_PLAYER, true, NULL, NULL, m_creature->GetObjectGuid()); } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { // Boss aura which triggers the stun effect on dead players who resurrect DoCastSpellIfCan(m_creature, SPELL_MARK_OF_FROST_AURA); diff --git a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.cpp b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.cpp index 5213282ba..63bd45d37 100644 --- a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.cpp +++ b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.cpp @@ -81,7 +81,7 @@ bool GossipHello_npc_chromie(Player* pPlayer, Creature* pCreature) return true; } -bool GossipSelect_npc_chromie(Player* pPlayer, Creature* pCreature, uint32 sender, uint32 uiAction) +bool GossipSelect_npc_chromie(Player* pPlayer, Creature* pCreature, uint32 /*sender*/, uint32 uiAction) { switch (pCreature->GetEntry()) { @@ -138,7 +138,7 @@ bool GossipSelect_npc_chromie(Player* pPlayer, Creature* pCreature, uint32 sende return true; } -bool QuestAccept_npc_chromie(Player* pPlayer, Creature* pCreature, const Quest* pQuest) +bool QuestAccept_npc_chromie(Player* /*pPlayer*/, Creature* pCreature, const Quest* pQuest) { switch (pQuest->GetQuestId()) { diff --git a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/instance_culling_of_stratholme.cpp b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/instance_culling_of_stratholme.cpp index 2da36f9c4..d6be1a6f8 100644 --- a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/instance_culling_of_stratholme.cpp +++ b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/instance_culling_of_stratholme.cpp @@ -269,7 +269,7 @@ void instance_culling_of_stratholme::Load(const char* chrIn) OUT_LOAD_INST_DATA_COMPLETE; } -void instance_culling_of_stratholme::OnPlayerEnter(Player* pPlayer) +void instance_culling_of_stratholme::OnPlayerEnter(Player* /*pPlayer*/) { if (instance->GetPlayersCountExceptGMs() == 0) { diff --git a/scripts/kalimdor/caverns_of_time/dark_portal/boss_aeonus.cpp b/scripts/kalimdor/caverns_of_time/dark_portal/boss_aeonus.cpp index e9e2690c7..04d2d7225 100644 --- a/scripts/kalimdor/caverns_of_time/dark_portal/boss_aeonus.cpp +++ b/scripts/kalimdor/caverns_of_time/dark_portal/boss_aeonus.cpp @@ -65,7 +65,7 @@ struct MANGOS_DLL_DECL boss_aeonusAI : public ScriptedAI m_uiCleaveTimer = urand(5000, 9000); } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { DoScriptText(SAY_AGGRO, m_creature); } diff --git a/scripts/kalimdor/caverns_of_time/dark_portal/boss_chrono_lord_deja.cpp b/scripts/kalimdor/caverns_of_time/dark_portal/boss_chrono_lord_deja.cpp index 93b7fab8c..a9c3da992 100644 --- a/scripts/kalimdor/caverns_of_time/dark_portal/boss_chrono_lord_deja.cpp +++ b/scripts/kalimdor/caverns_of_time/dark_portal/boss_chrono_lord_deja.cpp @@ -65,7 +65,7 @@ struct MANGOS_DLL_DECL boss_chrono_lord_dejaAI : public ScriptedAI m_uiAttractionTimer = urand(25000, 35000); } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { DoScriptText(SAY_AGGRO, m_creature); } @@ -90,7 +90,7 @@ struct MANGOS_DLL_DECL boss_chrono_lord_dejaAI : public ScriptedAI DoScriptText(urand(0, 1) ? SAY_SLAY1 : SAY_SLAY2, m_creature); } - void JustDied(Unit* pVictim) override + void JustDied(Unit* /*pVictim*/) override { DoScriptText(SAY_DEATH, m_creature); } diff --git a/scripts/kalimdor/caverns_of_time/dark_portal/boss_temporus.cpp b/scripts/kalimdor/caverns_of_time/dark_portal/boss_temporus.cpp index 62fe29cbd..1574ebca2 100644 --- a/scripts/kalimdor/caverns_of_time/dark_portal/boss_temporus.cpp +++ b/scripts/kalimdor/caverns_of_time/dark_portal/boss_temporus.cpp @@ -64,7 +64,7 @@ struct MANGOS_DLL_DECL boss_temporusAI : public ScriptedAI m_uiWingBuffetTimer = urand(25000, 35000); } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { DoScriptText(SAY_AGGRO, m_creature); } diff --git a/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.cpp b/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.cpp index 61e729414..9567b8f56 100644 --- a/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.cpp +++ b/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.cpp @@ -52,7 +52,7 @@ struct MANGOS_DLL_DECL npc_medivh_black_morassAI : public ScriptedAI void Reset() override { } - void AttackStart(Unit* pWho) override { } + void AttackStart(Unit* /*pWho*/) override { } void JustSummoned(Creature* pSummoned) override { @@ -82,7 +82,7 @@ struct MANGOS_DLL_DECL npc_medivh_black_morassAI : public ScriptedAI DoScriptText(SAY_DEATH, m_creature); } - void UpdateAI(const uint32 uiDiff) override { } + void UpdateAI(const uint32 /*uiDiff*/) override { } }; CreatureAI* GetAI_npc_medivh_black_morass(Creature* pCreature) @@ -90,7 +90,7 @@ CreatureAI* GetAI_npc_medivh_black_morass(Creature* pCreature) return new npc_medivh_black_morassAI(pCreature); } -bool EffectDummyCreature_npc_medivh_black_morass(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) +bool EffectDummyCreature_npc_medivh_black_morass(Unit* /*pCaster*/, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) { // always check spellid and effectindex if ((uiSpellId == SPELL_CORRUPT && uiEffIndex == EFFECT_INDEX_0) || (uiSpellId == SPELL_CORRUPT_AEONUS && uiEffIndex == EFFECT_INDEX_0)) @@ -325,7 +325,7 @@ struct MANGOS_DLL_DECL npc_time_riftAI : public ScriptedAI pSummoned->CastSpell(pSummoned, SPELL_CORRUPT_AEONUS, false); } - void UpdateAI(const uint32 uiDiff) override { } + void UpdateAI(const uint32 /*uiDiff*/) override { } }; CreatureAI* GetAI_npc_time_rift(Creature* pCreature) @@ -333,7 +333,7 @@ CreatureAI* GetAI_npc_time_rift(Creature* pCreature) return new npc_time_riftAI(pCreature); } -bool EffectDummyCreature_npc_time_rift_channel(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) +bool EffectDummyCreature_npc_time_rift_channel(Unit* /*pCaster*/, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) { // always check spellid and effectindex if (uiSpellId == SPELL_RIFT_PERIODIC && uiEffIndex == EFFECT_INDEX_0) diff --git a/scripts/kalimdor/caverns_of_time/dark_portal/instance_dark_portal.cpp b/scripts/kalimdor/caverns_of_time/dark_portal/instance_dark_portal.cpp index 787ac63f1..a1667d387 100644 --- a/scripts/kalimdor/caverns_of_time/dark_portal/instance_dark_portal.cpp +++ b/scripts/kalimdor/caverns_of_time/dark_portal/instance_dark_portal.cpp @@ -64,7 +64,7 @@ void instance_dark_portal::UpdateWorldState(bool bEnable) DoUpdateWorldState(WORLD_STATE_RIFT, m_uiWorldStateRiftCount); } -void instance_dark_portal::OnPlayerEnter(Player* pPlayer) +void instance_dark_portal::OnPlayerEnter(Player* /*pPlayer*/) { UpdateWorldState(m_auiEncounter[TYPE_MEDIVH] == IN_PROGRESS ? true : false); } diff --git a/scripts/kalimdor/caverns_of_time/hyjal/boss_archimonde.cpp b/scripts/kalimdor/caverns_of_time/hyjal/boss_archimonde.cpp index 532f0a05d..92d84e873 100644 --- a/scripts/kalimdor/caverns_of_time/hyjal/boss_archimonde.cpp +++ b/scripts/kalimdor/caverns_of_time/hyjal/boss_archimonde.cpp @@ -126,7 +126,7 @@ struct MANGOS_DLL_DECL boss_archimondeAI : public ScriptedAI m_bStartEpilogue = false; } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { DoScriptText(SAY_AGGRO, m_creature); } diff --git a/scripts/kalimdor/caverns_of_time/hyjal/hyjal.cpp b/scripts/kalimdor/caverns_of_time/hyjal/hyjal.cpp index 3d14d774e..d45e82c53 100644 --- a/scripts/kalimdor/caverns_of_time/hyjal/hyjal.cpp +++ b/scripts/kalimdor/caverns_of_time/hyjal/hyjal.cpp @@ -94,7 +94,7 @@ bool GossipHello_npc_jaina_proudmoore(Player* pPlayer, Creature* pCreature) return true; } -bool GossipSelect_npc_jaina_proudmoore(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +bool GossipSelect_npc_jaina_proudmoore(Player* pPlayer, Creature* pCreature, uint32 /*uiSender*/, uint32 uiAction) { if (hyjalAI* pJainaAI = dynamic_cast(pCreature->AI())) { @@ -166,7 +166,7 @@ bool GossipHello_npc_thrall(Player* pPlayer, Creature* pCreature) return true; } -bool GossipSelect_npc_thrall(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +bool GossipSelect_npc_thrall(Player* pPlayer, Creature* pCreature, uint32 /*uiSender*/, uint32 uiAction) { if (hyjalAI* pThrallAI = dynamic_cast(pCreature->AI())) { @@ -207,7 +207,7 @@ bool GossipHello_npc_tyrande_whisperwind(Player* pPlayer, Creature* pCreature) return true; } -bool GossipSelect_npc_tyrande_whisperwind(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +bool GossipSelect_npc_tyrande_whisperwind(Player* pPlayer, Creature* /*pCreature*/, uint32 /*uiSender*/, uint32 uiAction) { if (uiAction == GOSSIP_ACTION_INFO_DEF) { diff --git a/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.cpp b/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.cpp index 1baff2ec6..6b0f378af 100644 --- a/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.cpp +++ b/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.cpp @@ -227,7 +227,7 @@ void hyjalAI::JustReachedHome() m_bIsSecondBossDead = m_uiBase ? m_pInstance->GetData(TYPE_AZGALOR) == DONE : m_pInstance->GetData(TYPE_ANETHERON) == DONE; } -void hyjalAI::Aggro(Unit* who) +void hyjalAI::Aggro(Unit* /*who*/) { for (uint8 i = 0; i < MAX_SPELL; ++i) if (m_aSpells[i].m_uiCooldown) @@ -441,7 +441,7 @@ void hyjalAI::DoTalk(YellType pYellType) DoScriptText(pYell->m_iTextId, m_creature); } -void hyjalAI::SpellHitTarget(Unit* pTarget, const SpellEntry* pSpell) +void hyjalAI::SpellHitTarget(Unit* /*pTarget*/, const SpellEntry* /*pSpell*/) { // TODO: this spell should cause misc mobs to despawn // if (pSpell->Id == SPELL_MASS_TELEPORT && pTarget->GetTypeId() != TYPEID_PLAYER) @@ -461,7 +461,7 @@ void hyjalAI::Retreat() m_bIsRetreating = true; } -void hyjalAI::JustDied(Unit* pKiller) +void hyjalAI::JustDied(Unit* /*pKiller*/) { DoTalk(DEATH); m_creature->SetActiveObjectState(false); diff --git a/scripts/kalimdor/caverns_of_time/hyjal/instance_hyjal.cpp b/scripts/kalimdor/caverns_of_time/hyjal/instance_hyjal.cpp index 894bef629..0fb9130d1 100644 --- a/scripts/kalimdor/caverns_of_time/hyjal/instance_hyjal.cpp +++ b/scripts/kalimdor/caverns_of_time/hyjal/instance_hyjal.cpp @@ -51,7 +51,7 @@ bool instance_mount_hyjal::IsEncounterInProgress() const return false; } -void instance_mount_hyjal::OnPlayerEnter(Player* pPlayer) +void instance_mount_hyjal::OnPlayerEnter(Player* /*pPlayer*/) { if (GetData(TYPE_AZGALOR) == DONE) DoSpawnArchimonde(); diff --git a/scripts/kalimdor/caverns_of_time/old_hillsbrad/instance_old_hillsbrad.cpp b/scripts/kalimdor/caverns_of_time/old_hillsbrad/instance_old_hillsbrad.cpp index 4d6345bad..68afcdf93 100644 --- a/scripts/kalimdor/caverns_of_time/old_hillsbrad/instance_old_hillsbrad.cpp +++ b/scripts/kalimdor/caverns_of_time/old_hillsbrad/instance_old_hillsbrad.cpp @@ -332,7 +332,7 @@ InstanceData* GetInstanceData_instance_old_hillsbrad(Map* pMap) return new instance_old_hillsbrad(pMap); } -bool ProcessEventId_event_go_barrel_old_hillsbrad(uint32 uiEventId, Object* pSource, Object* pTarget, bool bIsStart) +bool ProcessEventId_event_go_barrel_old_hillsbrad(uint32 /*uiEventId*/, Object* pSource, Object* pTarget, bool bIsStart) { if (bIsStart && pSource->GetTypeId() == TYPEID_PLAYER) { diff --git a/scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.cpp b/scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.cpp index d2fe7be3d..5cbca0fa1 100644 --- a/scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.cpp +++ b/scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.cpp @@ -63,7 +63,7 @@ bool GossipHello_npc_erozion(Player* pPlayer, Creature* pCreature) return true; } -bool GossipSelect_npc_erozion(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +bool GossipSelect_npc_erozion(Player* pPlayer, Creature* pCreature, uint32 /*uiSender*/, uint32 uiAction) { if (uiAction == GOSSIP_ACTION_INFO_DEF + 1) { @@ -286,7 +286,7 @@ struct MANGOS_DLL_DECL npc_thrall_old_hillsbradAI : public npc_escortAI, private } } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { switch (urand(0, 3)) { @@ -1045,7 +1045,7 @@ bool GossipHello_npc_thrall_old_hillsbrad(Player* pPlayer, Creature* pCreature) return true; } -bool GossipSelect_npc_thrall_old_hillsbrad(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +bool GossipSelect_npc_thrall_old_hillsbrad(Player* pPlayer, Creature* pCreature, uint32 /*uiSender*/, uint32 uiAction) { instance_old_hillsbrad* pInstance = (instance_old_hillsbrad*)pCreature->GetInstanceData(); @@ -1284,7 +1284,7 @@ bool GossipHello_npc_taretha(Player* pPlayer, Creature* pCreature) return true; } -bool GossipSelect_npc_taretha(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +bool GossipSelect_npc_taretha(Player* pPlayer, Creature* pCreature, uint32 /*uiSender*/, uint32 uiAction) { instance_old_hillsbrad* pInstance = (instance_old_hillsbrad*)pCreature->GetInstanceData(); diff --git a/scripts/kalimdor/darkshore.cpp b/scripts/kalimdor/darkshore.cpp index e3f680210..b69ef003d 100644 --- a/scripts/kalimdor/darkshore.cpp +++ b/scripts/kalimdor/darkshore.cpp @@ -95,7 +95,7 @@ struct MANGOS_DLL_DECL npc_kerlonianAI : public FollowerAI } } - void SpellHit(Unit* pCaster, const SpellEntry* pSpell) override + void SpellHit(Unit* /*pCaster*/, const SpellEntry* pSpell) override { if (HasFollowState(STATE_FOLLOW_INPROGRESS | STATE_FOLLOW_PAUSED) && pSpell->Id == SPELL_AWAKEN) ClearSleeping(); @@ -280,7 +280,7 @@ struct MANGOS_DLL_DECL npc_prospector_remtravelAI : public npc_escortAI DoScriptText(SAY_REM_AGGRO, m_creature, pWho); } - void JustSummoned(Creature* pSummoned) override + void JustSummoned(Creature* /*pSummoned*/) override { // unsure if it should be any // pSummoned->AI()->AttackStart(m_creature); @@ -365,7 +365,7 @@ bool GossipHello_npc_threshwackonator(Player* pPlayer, Creature* pCreature) return true; } -bool GossipSelect_npc_threshwackonator(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +bool GossipSelect_npc_threshwackonator(Player* pPlayer, Creature* pCreature, uint32 /*uiSender*/, uint32 uiAction) { if (uiAction == GOSSIP_ACTION_INFO_DEF + 1) { @@ -436,7 +436,7 @@ struct MANGOS_DLL_DECL npc_volcorAI : public npc_escortAI m_uiQuestId = 0; } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { // shouldn't always use text on agro switch (urand(0, 4)) diff --git a/scripts/kalimdor/desolace.cpp b/scripts/kalimdor/desolace.cpp index 7c1636cc2..008cfecd3 100644 --- a/scripts/kalimdor/desolace.cpp +++ b/scripts/kalimdor/desolace.cpp @@ -87,7 +87,7 @@ struct MANGOS_DLL_DECL npc_aged_dying_ancient_kodoAI : public ScriptedAI } } - void SpellHit(Unit* pCaster, SpellEntry const* pSpell) override + void SpellHit(Unit* /*pCaster*/, SpellEntry const* pSpell) override { if (pSpell->Id == SPELL_KODO_KOMBO_GOSSIP) { diff --git a/scripts/kalimdor/dustwallow_marsh.cpp b/scripts/kalimdor/dustwallow_marsh.cpp index 94c7d5a65..3be7acc20 100644 --- a/scripts/kalimdor/dustwallow_marsh.cpp +++ b/scripts/kalimdor/dustwallow_marsh.cpp @@ -233,7 +233,7 @@ struct MANGOS_DLL_DECL npc_morokkAI : public npc_escortAI AttackStart(pAttacker); } - void DamageTaken(Unit* pDoneBy, uint32& uiDamage) override + void DamageTaken(Unit* /*pDoneBy*/, uint32& uiDamage) override { if (HasEscortState(STATE_ESCORT_ESCORTING)) { @@ -252,7 +252,7 @@ struct MANGOS_DLL_DECL npc_morokkAI : public npc_escortAI } } - void UpdateEscortAI(const uint32 uiDiff) override + void UpdateEscortAI(const uint32 /*uiDiff*/) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) { @@ -651,7 +651,7 @@ struct MANGOS_DLL_DECL npc_private_hendelAI : public ScriptedAI } }; -bool QuestAccept_npc_private_hendel(Player* pPlayer, Creature* pCreature, const Quest* pQuest) +bool QuestAccept_npc_private_hendel(Player* /*pPlayer*/, Creature* pCreature, const Quest* pQuest) { if (pQuest->GetQuestId() == QUEST_MISSING_DIPLO_PT16) pCreature->SetFactionTemporary(FACTION_HOSTILE, TEMPFACTION_RESTORE_COMBAT_STOP | TEMPFACTION_RESTORE_RESPAWN); @@ -674,7 +674,7 @@ enum NPC_LURKING_SHARK = 23928 }; -bool AreaTrigger_at_nats_landing(Player* pPlayer, const AreaTriggerEntry* pAt) +bool AreaTrigger_at_nats_landing(Player* pPlayer, const AreaTriggerEntry* /*pAt*/) { if (pPlayer->GetQuestStatus(QUEST_NATS_BARGAIN) == QUEST_STATUS_INCOMPLETE && pPlayer->HasAura(SPELL_FISH_PASTE)) { diff --git a/scripts/kalimdor/felwood.cpp b/scripts/kalimdor/felwood.cpp index c96341efa..df4070eda 100644 --- a/scripts/kalimdor/felwood.cpp +++ b/scripts/kalimdor/felwood.cpp @@ -109,7 +109,7 @@ CreatureAI* GetAI_npc_kitten(Creature* pCreature) return new npc_kittenAI(pCreature); } -bool EffectDummyCreature_npc_kitten(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) +bool EffectDummyCreature_npc_kitten(Unit* /*pCaster*/, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) { // always check spellid and effectindex if (uiSpellId == SPELL_CORRUPT_SABER_VISUAL && uiEffIndex == EFFECT_INDEX_0) @@ -144,7 +144,7 @@ bool GossipHello_npc_corrupt_saber(Player* pPlayer, Creature* pCreature) return true; } -bool GossipSelect_npc_corrupt_saber(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +bool GossipSelect_npc_corrupt_saber(Player* pPlayer, Creature* pCreature, uint32 /*uiSender*/, uint32 uiAction) { if (uiAction == GOSSIP_ACTION_INFO_DEF + 1) { @@ -262,7 +262,7 @@ CreatureAI* GetAI_npc_niby_the_almighty(Creature* pCreature) return new npc_niby_the_almightyAI(pCreature); } -bool QuestRewarded_npc_niby_the_almighty(Player* pPlayer, Creature* pCreature, Quest const* pQuest) +bool QuestRewarded_npc_niby_the_almighty(Player* /*pPlayer*/, Creature* pCreature, Quest const* pQuest) { if (pQuest->GetQuestId() == QUEST_KROSHIUS) { @@ -383,7 +383,7 @@ CreatureAI* GetAI_npc_kroshius(Creature* pCreature) return new npc_kroshiusAI(pCreature); } -bool ProcessEventId_npc_kroshius(uint32 uiEventId, Object* pSource, Object* pTarget, bool bIsStart) +bool ProcessEventId_npc_kroshius(uint32 uiEventId, Object* pSource, Object* /*pTarget*/, bool /*bIsStart*/) { if (uiEventId == EVENT_KROSHIUS_REVIVE) { diff --git a/scripts/kalimdor/feralas.cpp b/scripts/kalimdor/feralas.cpp index 6262aa55c..d867ecbb9 100644 --- a/scripts/kalimdor/feralas.cpp +++ b/scripts/kalimdor/feralas.cpp @@ -91,7 +91,7 @@ struct MANGOS_DLL_DECL npc_oox22feAI : public npc_escortAI m_creature->SetStandState(UNIT_STAND_STATE_DEAD); } - void Aggro(Unit* who) override + void Aggro(Unit* /*who*/) override { // For an small probability the npc says something when he get aggro switch (urand(0, 9)) diff --git a/scripts/kalimdor/moonglade.cpp b/scripts/kalimdor/moonglade.cpp index cbe506793..bf45c4abd 100644 --- a/scripts/kalimdor/moonglade.cpp +++ b/scripts/kalimdor/moonglade.cpp @@ -97,7 +97,7 @@ struct MANGOS_DLL_DECL npc_clintar_dw_spiritAI : public npc_escortAI } } - void Aggro(Unit* who) override + void Aggro(Unit* /*who*/) override { DoScriptText(urand(0, 1) ? SAY_AGGRO_1 : SAY_AGGRO_2, m_creature); } @@ -601,7 +601,7 @@ bool QuestAccept_npc_keeper_remulos(Player* pPlayer, Creature* pCreature, const return false; } -bool EffectDummyCreature_conjure_rift(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) +bool EffectDummyCreature_conjure_rift(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* /*pCreatureTarget*/) { // always check spellid and effectindex if (uiSpellId == SPELL_CONJURE_RIFT && uiEffIndex == EFFECT_INDEX_0) diff --git a/scripts/kalimdor/onyxias_lair/boss_onyxia.cpp b/scripts/kalimdor/onyxias_lair/boss_onyxia.cpp index 73c86ea16..f12db3825 100644 --- a/scripts/kalimdor/onyxias_lair/boss_onyxia.cpp +++ b/scripts/kalimdor/onyxias_lair/boss_onyxia.cpp @@ -164,7 +164,7 @@ struct MANGOS_DLL_DECL boss_onyxiaAI : public ScriptedAI m_bIsSummoningWhelps = false; } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { DoScriptText(SAY_AGGRO, m_creature); @@ -220,7 +220,7 @@ struct MANGOS_DLL_DECL boss_onyxiaAI : public ScriptedAI DoScriptText(SAY_KILL, m_creature); } - void SpellHit(Unit* pCaster, const SpellEntry* pSpell) override + void SpellHit(Unit* /*pCaster*/, const SpellEntry* pSpell) override { if (pSpell->Id == SPELL_BREATH_EAST_TO_WEST || pSpell->Id == SPELL_BREATH_WEST_TO_EAST || @@ -249,7 +249,7 @@ struct MANGOS_DLL_DECL boss_onyxiaAI : public ScriptedAI return NULL; } - void MovementInform(uint32 uiMoveType, uint32 uiPointId) override + void MovementInform(uint32 uiMoveType, uint32 /*uiPointId*/) override { if (uiMoveType != POINT_MOTION_TYPE || !m_pInstance) return; diff --git a/scripts/kalimdor/onyxias_lair/instance_onyxias_lair.cpp b/scripts/kalimdor/onyxias_lair/instance_onyxias_lair.cpp index 0e9c7eb4b..6ab5a58ad 100644 --- a/scripts/kalimdor/onyxias_lair/instance_onyxias_lair.cpp +++ b/scripts/kalimdor/onyxias_lair/instance_onyxias_lair.cpp @@ -72,7 +72,7 @@ void instance_onyxias_lair::SetData(uint32 uiType, uint32 uiData) // Currently no reason to save anything } -bool instance_onyxias_lair::CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/) const +bool instance_onyxias_lair::CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* /*pSource*/, Unit const* /*pTarget*/, uint32 /*uiMiscValue1 = 0*/) const { switch (uiCriteriaId) { diff --git a/scripts/kalimdor/orgrimmar.cpp b/scripts/kalimdor/orgrimmar.cpp index 57e3ac3fd..8a63b3a24 100644 --- a/scripts/kalimdor/orgrimmar.cpp +++ b/scripts/kalimdor/orgrimmar.cpp @@ -144,7 +144,7 @@ bool GossipHello_npc_thrall_warchief(Player* pPlayer, Creature* pCreature) return true; } -bool GossipSelect_npc_thrall_warchief(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +bool GossipSelect_npc_thrall_warchief(Player* pPlayer, Creature* pCreature, uint32 /*uiSender*/, uint32 uiAction) { switch (uiAction) { diff --git a/scripts/kalimdor/ruins_of_ahnqiraj/boss_ayamiss.cpp b/scripts/kalimdor/ruins_of_ahnqiraj/boss_ayamiss.cpp index fa4fc119c..21e9e2f99 100644 --- a/scripts/kalimdor/ruins_of_ahnqiraj/boss_ayamiss.cpp +++ b/scripts/kalimdor/ruins_of_ahnqiraj/boss_ayamiss.cpp @@ -94,7 +94,7 @@ struct MANGOS_DLL_DECL boss_ayamissAI : public ScriptedAI SetCombatMovement(false); } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { m_creature->SetLevitate(true); m_creature->GetMotionMaster()->MovePoint(0, m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ() + 15.0f); @@ -118,7 +118,7 @@ struct MANGOS_DLL_DECL boss_ayamissAI : public ScriptedAI } } - void SummonedMovementInform(Creature* pSummoned, uint32 uiMotionType, uint32 uiPointId) override + void SummonedMovementInform(Creature* pSummoned, uint32 /*uiMotionType*/, uint32 uiPointId) override { if (uiPointId != 1 || pSummoned->GetEntry() != NPC_LARVA) return; @@ -292,7 +292,7 @@ struct MANGOS_DLL_DECL npc_hive_zara_larvaAI : public ScriptedAI ScriptedAI::MoveInLineOfSight(pWho); } - void UpdateAI(const uint32 uiDiff) override + void UpdateAI(const uint32 /*uiDiff*/) override { if (m_pInstance) { diff --git a/scripts/kalimdor/ruins_of_ahnqiraj/boss_buru.cpp b/scripts/kalimdor/ruins_of_ahnqiraj/boss_buru.cpp index 8f2507e7a..dc2c2dcfd 100644 --- a/scripts/kalimdor/ruins_of_ahnqiraj/boss_buru.cpp +++ b/scripts/kalimdor/ruins_of_ahnqiraj/boss_buru.cpp @@ -222,7 +222,7 @@ struct MANGOS_DLL_DECL npc_buru_eggAI : public Scripted_NoMovementAI } } - void UpdateAI(const uint32 uiDiff) override { } + void UpdateAI(const uint32 /*uiDiff*/) override { } }; CreatureAI* GetAI_npc_buru_egg(Creature* pCreature) diff --git a/scripts/kalimdor/ruins_of_ahnqiraj/boss_moam.cpp b/scripts/kalimdor/ruins_of_ahnqiraj/boss_moam.cpp index a28e64a3b..67b91d737 100644 --- a/scripts/kalimdor/ruins_of_ahnqiraj/boss_moam.cpp +++ b/scripts/kalimdor/ruins_of_ahnqiraj/boss_moam.cpp @@ -63,7 +63,7 @@ struct MANGOS_DLL_DECL boss_moamAI : public ScriptedAI m_creature->SetMaxPower(POWER_MANA, 0); } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { DoScriptText(EMOTE_AGGRO, m_creature); m_creature->SetMaxPower(POWER_MANA, m_creature->GetCreatureInfo()->maxmana); diff --git a/scripts/kalimdor/ruins_of_ahnqiraj/boss_ossirian.cpp b/scripts/kalimdor/ruins_of_ahnqiraj/boss_ossirian.cpp index 50c73ca95..5d50bf623 100644 --- a/scripts/kalimdor/ruins_of_ahnqiraj/boss_ossirian.cpp +++ b/scripts/kalimdor/ruins_of_ahnqiraj/boss_ossirian.cpp @@ -87,7 +87,7 @@ struct MANGOS_DLL_DECL boss_ossirianAI : public ScriptedAI m_uiSupremeTimer = 45000; } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { DoCastSpellIfCan(m_creature, SPELL_SUPREME, CAST_TRIGGERED); DoScriptText(SAY_AGGRO, m_creature); @@ -243,7 +243,7 @@ CreatureAI* GetAI_boss_ossirian(Creature* pCreature) } // This is actually a hack for a server-side spell -bool GOUse_go_ossirian_crystal(Player* pPlayer, GameObject* pGo) +bool GOUse_go_ossirian_crystal(Player* /*pPlayer*/, GameObject* pGo) { if (Creature* pOssirianTrigger = GetClosestCreatureWithEntry(pGo, NPC_OSSIRIAN_TRIGGER, 10.0f)) pOssirianTrigger->CastSpell(pOssirianTrigger, aWeaknessSpell[urand(0, 4)], false); diff --git a/scripts/kalimdor/ruins_of_ahnqiraj/boss_rajaxx.cpp b/scripts/kalimdor/ruins_of_ahnqiraj/boss_rajaxx.cpp index 4e1e8646c..eb67ce03f 100644 --- a/scripts/kalimdor/ruins_of_ahnqiraj/boss_rajaxx.cpp +++ b/scripts/kalimdor/ruins_of_ahnqiraj/boss_rajaxx.cpp @@ -280,7 +280,7 @@ bool GossipHello_npc_general_andorov(Player* pPlayer, Creature* pCreature) return true; } -bool GossipSelect_npc_general_andorov(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +bool GossipSelect_npc_general_andorov(Player* pPlayer, Creature* pCreature, uint32 /*uiSender*/, uint32 uiAction) { if (uiAction == GOSSIP_ACTION_INFO_DEF + 1) { diff --git a/scripts/kalimdor/ruins_of_ahnqiraj/instance_ruins_of_ahnqiraj.cpp b/scripts/kalimdor/ruins_of_ahnqiraj/instance_ruins_of_ahnqiraj.cpp index 2b4c41a5d..ab142a261 100644 --- a/scripts/kalimdor/ruins_of_ahnqiraj/instance_ruins_of_ahnqiraj.cpp +++ b/scripts/kalimdor/ruins_of_ahnqiraj/instance_ruins_of_ahnqiraj.cpp @@ -36,7 +36,7 @@ void instance_ruins_of_ahnqiraj::Initialize() memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); } -void instance_ruins_of_ahnqiraj::OnPlayerEnter(Player* pPlayer) +void instance_ruins_of_ahnqiraj::OnPlayerEnter(Player* /*pPlayer*/) { // Spawn andorov if necessary if (m_auiEncounter[TYPE_KURINNAXX] == DONE) diff --git a/scripts/kalimdor/ruins_of_ahnqiraj/ruins_of_ahnqiraj.cpp b/scripts/kalimdor/ruins_of_ahnqiraj/ruins_of_ahnqiraj.cpp index 9bfe6c934..af49b56a9 100644 --- a/scripts/kalimdor/ruins_of_ahnqiraj/ruins_of_ahnqiraj.cpp +++ b/scripts/kalimdor/ruins_of_ahnqiraj/ruins_of_ahnqiraj.cpp @@ -83,7 +83,7 @@ struct MANGOS_DLL_DECL mob_anubisath_guardianAI : public ScriptedAI m_bIsEnraged = false; } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { // spell reflection DoCastSpellIfCan(m_creature, m_uiSpell3); @@ -95,12 +95,12 @@ struct MANGOS_DLL_DECL mob_anubisath_guardianAI : public ScriptedAI ++m_uiSummonCount; } - void SummonedCreatureDespawn(Creature* pDespawned) override + void SummonedCreatureDespawn(Creature* /*pDespawned*/) override { --m_uiSummonCount; } - void DamageTaken(Unit* pDoneBy, uint32& uiDamage) override + void DamageTaken(Unit* /*pDoneBy*/, uint32& /*uiDamage*/) override { // when we reach 10% of HP explode or enrage if (!m_bIsEnraged && m_creature->GetHealthPercent() < 10.0f) diff --git a/scripts/kalimdor/tanaris.cpp b/scripts/kalimdor/tanaris.cpp index a7473ac30..a2280fcaa 100644 --- a/scripts/kalimdor/tanaris.cpp +++ b/scripts/kalimdor/tanaris.cpp @@ -282,7 +282,7 @@ struct MANGOS_DLL_DECL npc_oox17tnAI : public npc_escortAI void Reset() override { } - void Aggro(Unit* who) override + void Aggro(Unit* /*who*/) override { // For an small probability he say something when it aggros switch (urand(0, 9)) @@ -347,7 +347,7 @@ bool GossipHello_npc_stone_watcher_of_norgannon(Player* pPlayer, Creature* pCrea return true; } -bool GossipSelect_npc_stone_watcher_of_norgannon(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +bool GossipSelect_npc_stone_watcher_of_norgannon(Player* pPlayer, Creature* pCreature, uint32 /*uiSender*/, uint32 uiAction) { switch (uiAction) { diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_bug_trio.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_bug_trio.cpp index 56b8ea393..fe7aa9b87 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/boss_bug_trio.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_bug_trio.cpp @@ -208,7 +208,7 @@ struct MANGOS_DLL_DECL boss_yaujAI : public ScriptedAI m_uiFearTimer = urand(12000, 24000); } - void JustDied(Unit* Killer) override + void JustDied(Unit* /*Killer*/) override { // Spawn 10 yauj brood on death float fX, fY, fZ; diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_cthun.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_cthun.cpp index 1ece7b6c1..d491b32db 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/boss_cthun.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_cthun.cpp @@ -130,7 +130,7 @@ struct MANGOS_DLL_DECL boss_eye_of_cthunAI : public Scripted_NoMovementAI m_uiEyeTentacleTimer = 45000; } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { if (m_pInstance) m_pInstance->SetData(TYPE_CTHUN, IN_PROGRESS); @@ -381,7 +381,7 @@ struct MANGOS_DLL_DECL boss_cthunAI : public Scripted_NoMovementAI m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); } - void DamageTaken(Unit* pDealer, uint32& uiDamage) override + void DamageTaken(Unit* /*pDealer*/, uint32& uiDamage) override { // Ignore damage reduction when vulnerable if (m_Phase == PHASE_CTHUN_WEAKENED) diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_fankriss.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_fankriss.cpp index 70c9427ca..ba30e1f5d 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/boss_fankriss.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_fankriss.cpp @@ -72,7 +72,7 @@ struct MANGOS_DLL_DECL boss_fankrissAI : public ScriptedAI m_uiEntangleSummonTimer = 0; } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { if (m_pInstance) m_pInstance->SetData(TYPE_FANKRISS, IN_PROGRESS); diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_huhuran.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_huhuran.cpp index eba61baad..9ec852ee5 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/boss_huhuran.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_huhuran.cpp @@ -62,7 +62,7 @@ struct MANGOS_DLL_DECL boss_huhuranAI : public ScriptedAI m_bIsBerserk = false; } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { if (m_pInstance) m_pInstance->SetData(TYPE_HUHURAN, IN_PROGRESS); diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_ouro.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_ouro.cpp index 87d37c628..fe7bb0272 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/boss_ouro.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_ouro.cpp @@ -97,7 +97,7 @@ struct MANGOS_DLL_DECL boss_ouroAI : public Scripted_NoMovementAI m_bSubmerged = false; } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { if (m_pInstance) m_pInstance->SetData(TYPE_OURO, IN_PROGRESS); diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_sartura.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_sartura.cpp index bbd407186..dd60f76ae 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/boss_sartura.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_sartura.cpp @@ -70,7 +70,7 @@ struct MANGOS_DLL_DECL boss_sarturaAI : public ScriptedAI m_bIsEnraged = false; } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { DoScriptText(SAY_AGGRO, m_creature); diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_skeram.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_skeram.cpp index b39a8fd60..b671b9433 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/boss_skeram.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_skeram.cpp @@ -105,7 +105,7 @@ struct MANGOS_DLL_DECL boss_skeramAI : public ScriptedAI m_creature->ForcedDespawn(); } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { if (m_bIsImage) return; @@ -242,7 +242,7 @@ CreatureAI* GetAI_boss_skeram(Creature* pCreature) return new boss_skeramAI(pCreature); } -bool EffectDummyCreature_prophet_skeram(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) +bool EffectDummyCreature_prophet_skeram(Unit* /*pCaster*/, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) { // always check spellid and effectindex if (uiSpellId == SPELL_INITIALIZE_IMAGE && uiEffIndex == EFFECT_INDEX_0) diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_twinemperors.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_twinemperors.cpp index f5ed211a7..6468f23e1 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/boss_twinemperors.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_twinemperors.cpp @@ -85,7 +85,7 @@ struct MANGOS_DLL_DECL boss_twin_emperorsAI : public ScriptedAI } // Workaround for the shared health pool - void DamageTaken(Unit* pDoneBy, uint32& uiDamage) override + void DamageTaken(Unit* /*pDoneBy*/, uint32& uiDamage) override { if (!m_pInstance) return; @@ -105,7 +105,7 @@ struct MANGOS_DLL_DECL boss_twin_emperorsAI : public ScriptedAI } } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { if (m_pInstance) m_pInstance->SetData(TYPE_TWINS, IN_PROGRESS); @@ -123,7 +123,7 @@ struct MANGOS_DLL_DECL boss_twin_emperorsAI : public ScriptedAI m_pInstance->SetData(TYPE_TWINS, FAIL); } - void SpellHit(Unit* pCaster, const SpellEntry* pSpell) override + void SpellHit(Unit* /*pCaster*/, const SpellEntry* pSpell) override { if (pSpell->Id == SPELL_TWIN_TELEPORT) { @@ -140,7 +140,7 @@ struct MANGOS_DLL_DECL boss_twin_emperorsAI : public ScriptedAI virtual bool DoHandleBerserk() = 0; // Return true to handle shared timers and MeleeAttack - virtual bool UpdateEmperorAI(const uint32 uiDiff) { return true; } + virtual bool UpdateEmperorAI(const uint32 /*uiDiff*/) { return true; } void UpdateAI(const uint32 uiDiff) override { diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_viscidus.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_viscidus.cpp index 9d36ca21e..b9c359bd7 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/boss_viscidus.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_viscidus.cpp @@ -72,7 +72,7 @@ struct MANGOS_DLL_DECL boss_viscidusAI : public ScriptedAI m_uiPoisonBoltVolleyTimer = urand(10000, 15000); } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { DoCastSpellIfCan(m_creature, SPELL_TOXIN); diff --git a/scripts/kalimdor/temple_of_ahnqiraj/mob_anubisath_sentinel.cpp b/scripts/kalimdor/temple_of_ahnqiraj/mob_anubisath_sentinel.cpp index 95e9f89de..59f30bdfe 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/mob_anubisath_sentinel.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/mob_anubisath_sentinel.cpp @@ -170,7 +170,7 @@ struct MANGOS_DLL_DECL npc_anubisath_sentinelAI : public ScriptedAI script_error_log("npc_anubisath_sentinel for %s found too few/too many buddies, expected %u.", m_creature->GetGuidStr().c_str(), MAX_BUDDY); } - void UpdateAI(const uint32 uiDiff) override + void UpdateAI(const uint32 /*uiDiff*/) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/kalimdor/the_barrens.cpp b/scripts/kalimdor/the_barrens.cpp index db5c659df..a9f289720 100644 --- a/scripts/kalimdor/the_barrens.cpp +++ b/scripts/kalimdor/the_barrens.cpp @@ -52,7 +52,7 @@ bool GossipHello_npc_beaten_corpse(Player* pPlayer, Creature* pCreature) return true; } -bool GossipSelect_npc_beaten_corpse(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +bool GossipSelect_npc_beaten_corpse(Player* pPlayer, Creature* pCreature, uint32 /*uiSender*/, uint32 uiAction) { if (uiAction == GOSSIP_ACTION_INFO_DEF + 1) { @@ -234,7 +234,7 @@ struct MANGOS_DLL_DECL npc_taskmaster_fizzuleAI : public ScriptedAI DoMeleeAttackIfReady(); } - void ReceiveEmote(Player* pPlayer, uint32 uiTextEmote) override + void ReceiveEmote(Player* /*pPlayer*/, uint32 uiTextEmote) override { if (uiTextEmote == TEXTEMOTE_SALUTE) { @@ -445,7 +445,7 @@ CreatureAI* GetAI_npc_twiggy_flathead(Creature* pCreature) return new npc_twiggy_flatheadAI(pCreature); } -bool AreaTrigger_at_twiggy_flathead(Player* pPlayer, AreaTriggerEntry const* pAt) +bool AreaTrigger_at_twiggy_flathead(Player* pPlayer, AreaTriggerEntry const* /*pAt*/) { if (pPlayer->isAlive() && !pPlayer->isGameMaster() && pPlayer->GetQuestStatus(QUEST_AFFRAY) == QUEST_STATUS_INCOMPLETE) { diff --git a/scripts/kalimdor/thousand_needles.cpp b/scripts/kalimdor/thousand_needles.cpp index 556efaf73..cefce8352 100644 --- a/scripts/kalimdor/thousand_needles.cpp +++ b/scripts/kalimdor/thousand_needles.cpp @@ -351,7 +351,7 @@ bool GossipHello_npc_plucky_johnson(Player* pPlayer, Creature* pCreature) return true; } -bool GossipSelect_npc_plucky_johnson(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +bool GossipSelect_npc_plucky_johnson(Player* pPlayer, Creature* pCreature, uint32 /*uiSender*/, uint32 uiAction) { if (uiAction == GOSSIP_ACTION_INFO_DEF) { diff --git a/scripts/kalimdor/ungoro_crater.cpp b/scripts/kalimdor/ungoro_crater.cpp index 7f216e34f..a0ba1b178 100644 --- a/scripts/kalimdor/ungoro_crater.cpp +++ b/scripts/kalimdor/ungoro_crater.cpp @@ -184,7 +184,7 @@ struct MANGOS_DLL_DECL npc_ringoAI : public FollowerAI } } - void SpellHit(Unit* pCaster, const SpellEntry* pSpell) override + void SpellHit(Unit* /*pCaster*/, const SpellEntry* pSpell) override { if (HasFollowState(STATE_FOLLOW_INPROGRESS | STATE_FOLLOW_PAUSED) && pSpell->Id == SPELL_REVIVE_RINGO) ClearFaint(); diff --git a/scripts/kalimdor/wailing_caverns/wailing_caverns.cpp b/scripts/kalimdor/wailing_caverns/wailing_caverns.cpp index 58300e95f..2a2a3831e 100644 --- a/scripts/kalimdor/wailing_caverns/wailing_caverns.cpp +++ b/scripts/kalimdor/wailing_caverns/wailing_caverns.cpp @@ -207,7 +207,7 @@ struct MANGOS_DLL_DECL npc_disciple_of_naralexAI : public npc_escortAI ++m_uiSummonedAlive; } - void SummonedCreatureJustDied(Creature* pSummoned) override + void SummonedCreatureJustDied(Creature* /*pSummoned*/) override { if (m_uiSummonedAlive == 0) return; // Actually if this happens, something went wrong before @@ -461,7 +461,7 @@ bool GossipHello_npc_disciple_of_naralex(Player* pPlayer, Creature* pCreature) return true; } -bool GossipSelect_npc_disciple_of_naralex(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +bool GossipSelect_npc_disciple_of_naralex(Player* pPlayer, Creature* pCreature, uint32 /*uiSender*/, uint32 uiAction) { ScriptedInstance* m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); diff --git a/scripts/kalimdor/winterspring.cpp b/scripts/kalimdor/winterspring.cpp index c65c8b236..f1903f92d 100644 --- a/scripts/kalimdor/winterspring.cpp +++ b/scripts/kalimdor/winterspring.cpp @@ -439,7 +439,7 @@ bool QuestAccept_npc_ranshalla(Player* pPlayer, Creature* pCreature, const Quest return false; } -bool GOUse_go_elune_fire(Player* pPlayer, GameObject* pGo) +bool GOUse_go_elune_fire(Player* /*pPlayer*/, GameObject* pGo) { // Check if we are using the torches or the altar bool bIsAltar = false; diff --git a/scripts/kalimdor/zulfarrak/zulfarrak.cpp b/scripts/kalimdor/zulfarrak/zulfarrak.cpp index f5d0b98e9..4985ca2e7 100644 --- a/scripts/kalimdor/zulfarrak/zulfarrak.cpp +++ b/scripts/kalimdor/zulfarrak/zulfarrak.cpp @@ -67,13 +67,13 @@ struct MANGOS_DLL_DECL npc_sergeant_blyAI : public ScriptedAI m_pInstance->SetData(0, NOT_STARTED);*/ } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { /*if (m_pInstance) m_pInstance->SetData(0, IN_PROGRESS);*/ } - void JustDied(Unit* pVictim) override + void JustDied(Unit* /*pVictim*/) override { /*if (m_pInstance) m_pInstance->SetData(0, DONE);*/ @@ -124,7 +124,7 @@ bool GossipHello_npc_sergeant_bly(Player* pPlayer, Creature* pCreature) return true; } -bool GossipSelect_npc_sergeant_bly(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +bool GossipSelect_npc_sergeant_bly(Player* pPlayer, Creature* pCreature, uint32 /*uiSender*/, uint32 uiAction) { if (uiAction == GOSSIP_ACTION_INFO_DEF + 1) { @@ -165,19 +165,19 @@ struct MANGOS_DLL_DECL npc_weegli_blastfuseAI : public ScriptedAI m_pInstance->SetData(0, NOT_STARTED);*/ } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { /*if (m_pInstance) m_pInstance->SetData(0, IN_PROGRESS);*/ } - void JustDied(Unit* pVictim) override + void JustDied(Unit* /*pVictim*/) override { /*if (m_pInstance) m_pInstance->SetData(0, DONE);*/ } - void UpdateAI(const uint32 uiDiff) override + void UpdateAI(const uint32 /*uiDiff*/) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -206,7 +206,7 @@ bool GossipHello_npc_weegli_blastfuse(Player* pPlayer, Creature* pCreature) return true; } -bool GossipSelect_npc_weegli_blastfuse(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +bool GossipSelect_npc_weegli_blastfuse(Player* pPlayer, Creature* /*pCreature*/, uint32 /*uiSender*/, uint32 uiAction) { if (uiAction == GOSSIP_ACTION_INFO_DEF + 1) { @@ -216,7 +216,7 @@ bool GossipSelect_npc_weegli_blastfuse(Player* pPlayer, Creature* pCreature, uin return true; } -bool ProcessEventId_event_go_zulfarrak_gong(uint32 uiEventId, Object* pSource, Object* pTarget, bool bIsStart) +bool ProcessEventId_event_go_zulfarrak_gong(uint32 /*uiEventId*/, Object* pSource, Object* /*pTarget*/, bool bIsStart) { if (bIsStart && pSource->GetTypeId() == TYPEID_PLAYER) { diff --git a/scripts/northrend/azjol-nerub/ahnkahet/boss_amanitar.cpp b/scripts/northrend/azjol-nerub/ahnkahet/boss_amanitar.cpp index 0f276aa79..76e27b26e 100644 --- a/scripts/northrend/azjol-nerub/ahnkahet/boss_amanitar.cpp +++ b/scripts/northrend/azjol-nerub/ahnkahet/boss_amanitar.cpp @@ -75,7 +75,7 @@ struct MANGOS_DLL_DECL boss_amanitarAI : public ScriptedAI m_uiMushroomTimer = urand(10000, 20000); } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { DoSummonMushrooms(true); @@ -201,9 +201,9 @@ struct MANGOS_DLL_DECL npc_amanitar_mushroomAI : public Scripted_NoMovementAI void Reset() override { } - void AttackStart(Unit* pWho) override { } - void MoveInLineOfSight(Unit* pWho) override { } - void UpdateAI(const uint32 uiDiff) override { } + void AttackStart(Unit* /*pWho*/) override { } + void MoveInLineOfSight(Unit* /*pWho*/) override { } + void UpdateAI(const uint32 /*uiDiff*/) override { } }; CreatureAI* GetAI_npc_amanitar_mushroom(Creature* pCreature) diff --git a/scripts/northrend/azjol-nerub/ahnkahet/boss_jedoga.cpp b/scripts/northrend/azjol-nerub/ahnkahet/boss_jedoga.cpp index 1c8f500e7..ef189548f 100644 --- a/scripts/northrend/azjol-nerub/ahnkahet/boss_jedoga.cpp +++ b/scripts/northrend/azjol-nerub/ahnkahet/boss_jedoga.cpp @@ -133,7 +133,7 @@ struct MANGOS_DLL_DECL boss_jedogaAI : public ScriptedAI return *iter; } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { DoScriptText(SAY_AGGRO, m_creature); DoCallVolunteers(); @@ -429,9 +429,9 @@ struct MANGOS_DLL_DECL npc_twilight_volunteerAI : public Scripted_NoMovementAI m_pInstance->SetData(TYPE_JEDOGA, SPECIAL); } - void AttackStart(Unit* pWho) override { } - void MoveInLineOfSight(Unit* pWho) override { } - void UpdateAI(const uint32 uiDiff) override { } + void AttackStart(Unit* /*pWho*/) override { } + void MoveInLineOfSight(Unit* /*pWho*/) override { } + void UpdateAI(const uint32 /*uiDiff*/) override { } }; CreatureAI* GetAI_npc_twilight_volunteer(Creature* pCreature) diff --git a/scripts/northrend/azjol-nerub/ahnkahet/boss_nadox.cpp b/scripts/northrend/azjol-nerub/ahnkahet/boss_nadox.cpp index e794bad26..789cd66cb 100644 --- a/scripts/northrend/azjol-nerub/ahnkahet/boss_nadox.cpp +++ b/scripts/northrend/azjol-nerub/ahnkahet/boss_nadox.cpp @@ -64,8 +64,8 @@ struct MANGOS_DLL_DECL mob_ahnkahar_eggAI : public ScriptedAI ScriptedInstance* m_pInstance; void Reset() override {} - void MoveInLineOfSight(Unit* pWho) override {} - void AttackStart(Unit* pWho) override {} + void MoveInLineOfSight(Unit* /*pWho*/) override {} + void AttackStart(Unit* /*pWho*/) override {} void JustSummoned(Creature* pSummoned) override { @@ -134,7 +134,7 @@ struct MANGOS_DLL_DECL boss_nadoxAI : public ScriptedAI m_uiBroodRageTimer = 20000; } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { DoScriptText(SAY_AGGRO, m_creature); diff --git a/scripts/northrend/azjol-nerub/ahnkahet/boss_taldaram.cpp b/scripts/northrend/azjol-nerub/ahnkahet/boss_taldaram.cpp index 4a3aa2564..3d967464a 100644 --- a/scripts/northrend/azjol-nerub/ahnkahet/boss_taldaram.cpp +++ b/scripts/northrend/azjol-nerub/ahnkahet/boss_taldaram.cpp @@ -91,7 +91,7 @@ struct MANGOS_DLL_DECL boss_taldaramAI : public ScriptedAI m_bIsFirstAggro = false; } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { // Aggro is called after the boss vanish expires. There is no need to call this multiple times if (m_bIsFirstAggro) @@ -292,7 +292,7 @@ CreatureAI* GetAI_boss_taldaram(Creature* pCreature) return new boss_taldaramAI(pCreature); } -bool EffectDummyCreature_spell_conjure_flame_orbs(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) +bool EffectDummyCreature_spell_conjure_flame_orbs(Unit* /*pCaster*/, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) { // always check spellid and effectindex if (uiSpellId == SPELL_CONJURE_FLAME_SPHERE && uiEffIndex == EFFECT_INDEX_0) @@ -311,7 +311,7 @@ bool EffectDummyCreature_spell_conjure_flame_orbs(Unit* pCaster, uint32 uiSpellI ## go_nerubian_device ######*/ -bool GOUse_go_nerubian_device(Player* pPlayer, GameObject* pGo) +bool GOUse_go_nerubian_device(Player* /*pPlayer*/, GameObject* pGo) { ScriptedInstance* pInstance = (ScriptedInstance*)pGo->GetInstanceData(); diff --git a/scripts/northrend/azjol-nerub/ahnkahet/boss_volazj.cpp b/scripts/northrend/azjol-nerub/ahnkahet/boss_volazj.cpp index 3d7253f53..63277c9f2 100644 --- a/scripts/northrend/azjol-nerub/ahnkahet/boss_volazj.cpp +++ b/scripts/northrend/azjol-nerub/ahnkahet/boss_volazj.cpp @@ -108,7 +108,7 @@ struct MANGOS_DLL_DECL boss_volazjAI : public ScriptedAI m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { DoScriptText(SAY_AGGRO, m_creature); DoCastSpellIfCan(m_creature, SPELL_WHISPER_AGGRO); diff --git a/scripts/northrend/azjol-nerub/ahnkahet/instance_ahnkahet.cpp b/scripts/northrend/azjol-nerub/ahnkahet/instance_ahnkahet.cpp index 8770068b1..3ad55c37a 100644 --- a/scripts/northrend/azjol-nerub/ahnkahet/instance_ahnkahet.cpp +++ b/scripts/northrend/azjol-nerub/ahnkahet/instance_ahnkahet.cpp @@ -373,7 +373,7 @@ void instance_ahnkahet::HandleInsanitySwitch(Player* pPhasedPlayer) (*itr)->CastSpell((*itr), uiNewPhaseAura, true); } -bool instance_ahnkahet::CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/) const +bool instance_ahnkahet::CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* /*pSource*/, Unit const* /*pTarget*/, uint32 /*uiMiscValue1 = 0*/) const { switch (uiCriteriaId) { diff --git a/scripts/northrend/azjol-nerub/azjol-nerub/boss_anubarak.cpp b/scripts/northrend/azjol-nerub/azjol-nerub/boss_anubarak.cpp index 64c674354..cb5134499 100644 --- a/scripts/northrend/azjol-nerub/azjol-nerub/boss_anubarak.cpp +++ b/scripts/northrend/azjol-nerub/azjol-nerub/boss_anubarak.cpp @@ -113,7 +113,7 @@ struct MANGOS_DLL_DECL boss_anubarakAI : public ScriptedAI m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE); } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { DoScriptText(SAY_AGGRO, m_creature); @@ -344,8 +344,8 @@ struct MANGOS_DLL_DECL npc_impale_targetAI : public Scripted_NoMovementAI m_uiImpaleTimer = 3000; } - void AttackStart(Unit* pWho) override { } - void MoveInLineOfSight(Unit* pWho) override { } + void AttackStart(Unit* /*pWho*/) override { } + void MoveInLineOfSight(Unit* /*pWho*/) override { } void UpdateAI(const uint32 uiDiff) override { diff --git a/scripts/northrend/azjol-nerub/azjol-nerub/boss_krikthir.cpp b/scripts/northrend/azjol-nerub/azjol-nerub/boss_krikthir.cpp index f1075f99c..7256fded6 100644 --- a/scripts/northrend/azjol-nerub/azjol-nerub/boss_krikthir.cpp +++ b/scripts/northrend/azjol-nerub/azjol-nerub/boss_krikthir.cpp @@ -82,7 +82,7 @@ struct MANGOS_DLL_DECL boss_krikthirAI : public ScriptedAI m_bFrenzy = false; } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { DoScriptText(SAY_AGGRO, m_creature); } diff --git a/scripts/northrend/azjol-nerub/azjol-nerub/instance_azjol-nerub.cpp b/scripts/northrend/azjol-nerub/azjol-nerub/instance_azjol-nerub.cpp index ccdf3d2f9..cf01029a2 100644 --- a/scripts/northrend/azjol-nerub/azjol-nerub/instance_azjol-nerub.cpp +++ b/scripts/northrend/azjol-nerub/azjol-nerub/instance_azjol-nerub.cpp @@ -316,7 +316,7 @@ uint32 instance_azjol_nerub::GetData(uint32 uiType) const return 0; } -bool instance_azjol_nerub::CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/) const +bool instance_azjol_nerub::CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* /*pSource*/, Unit const* /*pTarget*/, uint32 /*uiMiscValue1*/ /* = 0*/) const { switch (uiCriteriaId) { diff --git a/scripts/northrend/borean_tundra.cpp b/scripts/northrend/borean_tundra.cpp index 9529bead9..fec54cccc 100644 --- a/scripts/northrend/borean_tundra.cpp +++ b/scripts/northrend/borean_tundra.cpp @@ -118,7 +118,7 @@ struct MANGOS_DLL_DECL npc_nesingwary_trapperAI : public ScriptedAI } } - void MovementInform(uint32 uiType, uint32 uiPointId) override + void MovementInform(uint32 /*uiType*/, uint32 /*uiPointId*/) override { m_creature->HandleEmote(EMOTE_ONESHOT_LOOT); m_uiPhaseTimer = 2000; diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp index 15b6447fe..51619662a 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp @@ -188,7 +188,7 @@ struct MANGOS_DLL_DECL boss_anubarak_trialAI : public ScriptedAI ScriptedAI::MoveInLineOfSight(pWho); } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { DoScriptText(SAY_AGGRO, m_creature); @@ -215,7 +215,7 @@ struct MANGOS_DLL_DECL boss_anubarak_trialAI : public ScriptedAI DoScriptText((urand(0, 1)) ? SAY_SLAY_1 : SAY_SLAY_2, m_creature); } - void SpellHit(Unit* pCaster, const SpellEntry* pSpell) override + void SpellHit(Unit* /*pCaster*/, const SpellEntry* pSpell) override { if (pSpell->Id == SPELL_SUBMERGE) { @@ -544,8 +544,8 @@ struct MANGOS_DLL_DECL npc_anubarak_trial_frostsphereAI : public Scripted_NoMove m_creature->GetMotionMaster()->MoveRandomAroundPoint(m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), 15.0f); } - void MoveInLineOfSight(Unit* pWho) override { } - void AttackStart(Unit* pWho) override { } + void MoveInLineOfSight(Unit* /*pWho*/) override { } + void AttackStart(Unit* /*pWho*/) override { } void DamageTaken(Unit* pDoneBy, uint32& uiDamage) override { @@ -606,9 +606,9 @@ struct MANGOS_DLL_DECL npc_nerubian_borrowAI : public Scripted_NoMovementAI npc_nerubian_borrowAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { Reset(); } void Reset() override { } - void MoveInLineOfSight(Unit* pWho) override { } - void AttackStart(Unit* pWho) override { } - void UpdateAI(const uint32 uiDiff) override { } + void MoveInLineOfSight(Unit* /*pWho*/) override { } + void AttackStart(Unit* /*pWho*/) override { } + void UpdateAI(const uint32 /*uiDiff*/) override { } }; CreatureAI* GetAI_npc_nerubian_borrow(Creature* pCreature) diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp index 90c9b142c..b19af6074 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp @@ -70,9 +70,9 @@ struct MANGOS_DLL_DECL npc_beast_combat_stalkerAI : public Scripted_NoMovementAI m_uiBerserkTimer = 9 * MINUTE * IN_MILLISECONDS; } - void MoveInLineOfSight(Unit* pWho) override {} + void MoveInLineOfSight(Unit* /*pWho*/) override {} - void DamageTaken(Unit* pDealer, uint32& uiDamage) override + void DamageTaken(Unit* /*pDealer*/, uint32& uiDamage) override { uiDamage = 0; } @@ -91,7 +91,7 @@ struct MANGOS_DLL_DECL npc_beast_combat_stalkerAI : public Scripted_NoMovementAI m_creature->ForcedDespawn(); } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { if (m_pInstance) m_pInstance->SetData(TYPE_NORTHREND_BEASTS, IN_PROGRESS); @@ -245,11 +245,11 @@ struct MANGOS_DLL_DECL boss_gormokAI : public ScriptedAI { } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { } - void UpdateAI(const uint32 uiDiff) override + void UpdateAI(const uint32 /*uiDiff*/) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -283,11 +283,11 @@ struct MANGOS_DLL_DECL boss_acidmawAI : public ScriptedAI { } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { } - void UpdateAI(const uint32 uiDiff) override + void UpdateAI(const uint32 /*uiDiff*/) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -321,11 +321,11 @@ struct MANGOS_DLL_DECL boss_dreadscaleAI : public ScriptedAI { } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { } - void UpdateAI(const uint32 uiDiff) override + void UpdateAI(const uint32 /*uiDiff*/) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -364,11 +364,11 @@ struct MANGOS_DLL_DECL boss_icehowlAI : public ScriptedAI { } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { } - void UpdateAI(const uint32 uiDiff) override + void UpdateAI(const uint32 /*uiDiff*/) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp index 9cdf4a05c..8929b2cb3 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp @@ -48,12 +48,12 @@ struct MANGOS_DLL_DECL boss_fjolaAI : public ScriptedAI void Reset() override {} - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { m_creature->SetInCombatWithZone(); } - void UpdateAI(const uint32 uiDiff) override + void UpdateAI(const uint32 /*uiDiff*/) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -77,12 +77,12 @@ struct MANGOS_DLL_DECL boss_eydisAI : public ScriptedAI void Reset() override {} - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { m_creature->SetInCombatWithZone(); } - void UpdateAI(const uint32 uiDiff) override + void UpdateAI(const uint32 /*uiDiff*/) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp index 6eb24d001..e01e59b7f 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp @@ -157,7 +157,7 @@ bool GossipHello_npc_barrett_ramsey(Player* pPlayer, Creature* pCreature) return true; } -bool GossipSelect_npc_barrett_ramsey(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +bool GossipSelect_npc_barrett_ramsey(Player* pPlayer, Creature* pCreature, uint32 /*uiSender*/, uint32 uiAction) { ScriptedInstance* pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); if (!pInstance) diff --git a/scripts/northrend/draktharon_keep/boss_novos.cpp b/scripts/northrend/draktharon_keep/boss_novos.cpp index e681eea0e..551db474b 100644 --- a/scripts/northrend/draktharon_keep/boss_novos.cpp +++ b/scripts/northrend/draktharon_keep/boss_novos.cpp @@ -148,7 +148,7 @@ struct MANGOS_DLL_DECL boss_novosAI : public Scripted_NoMovementAI ScriptedAI::MoveInLineOfSight(pWho); } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { DoScriptText(SAY_AGGRO, m_creature); @@ -330,9 +330,9 @@ struct MANGOS_DLL_DECL npc_crystal_channel_targetAI : public ScriptedAI instance_draktharon_keep* m_pInstance; void Reset() override {} - void MoveInLineOfSight(Unit* pWho) override {} - void AttackStart(Unit* pWho) override {} - void UpdateAI(const uint32 uiDiff) override {} + void MoveInLineOfSight(Unit* /*pWho*/) override {} + void AttackStart(Unit* /*pWho*/) override {} + void UpdateAI(const uint32 /*uiDiff*/) override {} void JustSummoned(Creature* pSummoned) override { diff --git a/scripts/northrend/draktharon_keep/boss_tharonja.cpp b/scripts/northrend/draktharon_keep/boss_tharonja.cpp index 964ba685a..a241373bd 100644 --- a/scripts/northrend/draktharon_keep/boss_tharonja.cpp +++ b/scripts/northrend/draktharon_keep/boss_tharonja.cpp @@ -108,7 +108,7 @@ struct MANGOS_DLL_DECL boss_tharonjaAI : public ScriptedAI m_uiReturnFleshTimer = 26000; } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { DoScriptText(SAY_AGGRO, m_creature); diff --git a/scripts/northrend/draktharon_keep/boss_trollgore.cpp b/scripts/northrend/draktharon_keep/boss_trollgore.cpp index 592da4332..d558f4c07 100644 --- a/scripts/northrend/draktharon_keep/boss_trollgore.cpp +++ b/scripts/northrend/draktharon_keep/boss_trollgore.cpp @@ -85,7 +85,7 @@ struct MANGOS_DLL_DECL boss_trollgoreAI : public ScriptedAI m_uiConsumeStacks = 0; } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { DoScriptText(SAY_AGGRO, m_creature); @@ -116,7 +116,7 @@ struct MANGOS_DLL_DECL boss_trollgoreAI : public ScriptedAI m_pInstance->SetData(TYPE_TROLLGORE, FAIL); } - void SpellHit(Unit* pTarget, const SpellEntry* pSpell) override + void SpellHit(Unit* /*pTarget*/, const SpellEntry* pSpell) override { if (pSpell->Id == SPELL_CONSUME_BUFF || pSpell->Id == SPELL_CONSUME_BUFF_H) { diff --git a/scripts/northrend/draktharon_keep/instance_draktharon_keep.cpp b/scripts/northrend/draktharon_keep/instance_draktharon_keep.cpp index aa1ba2b45..ba5ec920a 100644 --- a/scripts/northrend/draktharon_keep/instance_draktharon_keep.cpp +++ b/scripts/northrend/draktharon_keep/instance_draktharon_keep.cpp @@ -211,7 +211,7 @@ Creature* instance_draktharon_keep::GetSummonDummy() return instance->GetCreature(m_vSummonDummyGuids[urand(0, m_vSummonDummyGuids.size() - 1)]); } -bool instance_draktharon_keep::CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/) const +bool instance_draktharon_keep::CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* /*pSource*/, Unit const* /*pTarget*/, uint32 /*uiMiscValue1 = 0*/) const { switch (uiCriteriaId) { diff --git a/scripts/northrend/gundrak/boss_colossus.cpp b/scripts/northrend/gundrak/boss_colossus.cpp index 9ad669e06..5a4dbd960 100644 --- a/scripts/northrend/gundrak/boss_colossus.cpp +++ b/scripts/northrend/gundrak/boss_colossus.cpp @@ -77,12 +77,12 @@ struct MANGOS_DLL_DECL boss_drakkari_elementalAI : public ScriptedAI m_uiSurgeTimer = urand(9000, 13000); } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_MOJO_VOLLEY : SPELL_MOJO_VOLLEY_H); } - void DamageTaken(Unit* pDoneBy, uint32& uiDamage) override + void DamageTaken(Unit* /*pDoneBy*/, uint32& /*uiDamage*/) override { if (!m_bIsFirstEmerge) return; @@ -181,7 +181,7 @@ struct MANGOS_DLL_DECL boss_drakkari_colossusAI : public ScriptedAI m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_MORTAL_STRIKES : SPELL_MORTAL_STRIKES_H); @@ -233,7 +233,7 @@ struct MANGOS_DLL_DECL boss_drakkari_colossusAI : public ScriptedAI } } - void DamageTaken(Unit* pDoneBy, uint32& uiDamage) override + void DamageTaken(Unit* /*pDoneBy*/, uint32& uiDamage) override { if (m_bFirstEmerge && m_creature->GetHealthPercent() < 50.0f) DoEmergeElemental(); diff --git a/scripts/northrend/gundrak/boss_eck.cpp b/scripts/northrend/gundrak/boss_eck.cpp index 5b2654ed4..07223fcb4 100644 --- a/scripts/northrend/gundrak/boss_eck.cpp +++ b/scripts/northrend/gundrak/boss_eck.cpp @@ -63,7 +63,7 @@ struct MANGOS_DLL_DECL boss_eckAI : public ScriptedAI m_bIsBerserk = false; } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { if (m_pInstance) m_pInstance->SetData(TYPE_ECK, IN_PROGRESS); diff --git a/scripts/northrend/gundrak/boss_galdarah.cpp b/scripts/northrend/gundrak/boss_galdarah.cpp index c7be66de6..a6a8a1409 100644 --- a/scripts/northrend/gundrak/boss_galdarah.cpp +++ b/scripts/northrend/gundrak/boss_galdarah.cpp @@ -97,7 +97,7 @@ struct MANGOS_DLL_DECL boss_galdarahAI : public ScriptedAI m_uiAbilityCount = 0; } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { DoScriptText(SAY_AGGRO, m_creature); diff --git a/scripts/northrend/gundrak/boss_moorabi.cpp b/scripts/northrend/gundrak/boss_moorabi.cpp index a0b523c27..f4f80f66d 100644 --- a/scripts/northrend/gundrak/boss_moorabi.cpp +++ b/scripts/northrend/gundrak/boss_moorabi.cpp @@ -85,7 +85,7 @@ struct MANGOS_DLL_DECL boss_moorabiAI : public ScriptedAI m_uiPreviousTimer = 10000; } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { DoScriptText(SAY_AGGRO, m_creature); DoCastSpellIfCan(m_creature, SPELL_MOJO_FRENZY); diff --git a/scripts/northrend/gundrak/boss_sladran.cpp b/scripts/northrend/gundrak/boss_sladran.cpp index c368e6172..ab9382f4a 100644 --- a/scripts/northrend/gundrak/boss_sladran.cpp +++ b/scripts/northrend/gundrak/boss_sladran.cpp @@ -93,7 +93,7 @@ struct MANGOS_DLL_DECL boss_sladranAI : public ScriptedAI m_uiVenomBoltTimer = 15000; } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { DoScriptText(SAY_AGGRO, m_creature); diff --git a/scripts/northrend/gundrak/instance_gundrak.cpp b/scripts/northrend/gundrak/instance_gundrak.cpp index ea4176070..9d4754016 100644 --- a/scripts/northrend/gundrak/instance_gundrak.cpp +++ b/scripts/northrend/gundrak/instance_gundrak.cpp @@ -24,7 +24,7 @@ EndScriptData */ #include "precompiled.h" #include "gundrak.h" -bool GOUse_go_gundrak_altar(Player* pPlayer, GameObject* pGo) +bool GOUse_go_gundrak_altar(Player* /*pPlayer*/, GameObject* pGo) { ScriptedInstance* pInstance = (ScriptedInstance*)pGo->GetInstanceData(); @@ -272,7 +272,7 @@ uint32 instance_gundrak::GetData(uint32 uiType) const return 0; } -bool instance_gundrak::CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/) const +bool instance_gundrak::CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* /*pSource*/, Unit const* /*pTarget*/, uint32 /*uiMiscValue1 = 0*/) const { switch (uiCriteriaId) { diff --git a/scripts/northrend/howling_fjord.cpp b/scripts/northrend/howling_fjord.cpp index b1f762cdf..2cc34ab69 100644 --- a/scripts/northrend/howling_fjord.cpp +++ b/scripts/northrend/howling_fjord.cpp @@ -124,7 +124,7 @@ CreatureAI* GetAI_npc_ancient_male_vrykul(Creature* pCreature) return new npc_ancient_male_vrykulAI(pCreature); } -bool AreaTrigger_at_ancient_male_vrykul(Player* pPlayer, AreaTriggerEntry const* pAt) +bool AreaTrigger_at_ancient_male_vrykul(Player* pPlayer, AreaTriggerEntry const* /*pAt*/) { if (pPlayer->isAlive() && pPlayer->GetQuestStatus(QUEST_ECHO_OF_YMIRON) == QUEST_STATUS_INCOMPLETE && pPlayer->HasAura(SPELL_ECHO_OF_YMIRON)) @@ -204,7 +204,7 @@ struct MANGOS_DLL_DECL npc_daegarnAI : public ScriptedAI m_creature->SummonCreature(uiEntry, afSummon[0], afSummon[1], afSummon[2], 0.0f, TEMPSUMMON_TIMED_OOC_DESPAWN, 20 * IN_MILLISECONDS); } - void SummonedMovementInform(Creature* pSummoned, uint32 uiMotionType, uint32 uiPointId) override + void SummonedMovementInform(Creature* pSummoned, uint32 /*uiMotionType*/, uint32 /*uiPointId*/) override { Player* pPlayer = m_creature->GetMap()->GetPlayer(m_playerGuid); @@ -390,7 +390,7 @@ bool GossipHello_npc_silvermoon_harry(Player* pPlayer, Creature* pCreature) return true; } -bool GossipSelect_npc_silvermoon_harry(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +bool GossipSelect_npc_silvermoon_harry(Player* pPlayer, Creature* pCreature, uint32 /*uiSender*/, uint32 uiAction) { switch (uiAction) { diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_bronjahm.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_bronjahm.cpp index 282b805ca..a816ef121 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_bronjahm.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_bronjahm.cpp @@ -76,7 +76,7 @@ struct MANGOS_DLL_DECL boss_bronjahmAI : public ScriptedAI SetCombatMovement(true); } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { DoScriptText(urand(0, 1) ? SAY_AGGRO_1 : SAY_AGGRO_2, m_creature); diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_devourer_of_souls.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_devourer_of_souls.cpp index b57fa5997..4869dabb8 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_devourer_of_souls.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_devourer_of_souls.cpp @@ -116,7 +116,7 @@ struct MANGOS_DLL_DECL boss_devourer_of_soulsAI : public ScriptedAI m_uiEndPhaseTimer = 0; } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { DoScriptText(aTexts[0][m_uiFace], m_creature); if (m_pInstance) @@ -186,7 +186,7 @@ struct MANGOS_DLL_DECL boss_devourer_of_soulsAI : public ScriptedAI } } - void SpellHitTarget(Unit* pTarget, SpellEntry const* pSpellEntry) override + void SpellHitTarget(Unit* /*pTarget*/, SpellEntry const* pSpellEntry) override { switch (pSpellEntry->Id) { diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/instance_forge_of_souls.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/instance_forge_of_souls.cpp index 2277f1d2b..01254d8bf 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/instance_forge_of_souls.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/instance_forge_of_souls.cpp @@ -105,7 +105,7 @@ void instance_forge_of_souls::ProcessEventNpcs(Player* pPlayer, bool bChanged) } } -bool instance_forge_of_souls::CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/) const +bool instance_forge_of_souls::CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* /*pSource*/, Unit const* /*pTarget*/, uint32 /*uiMiscValue1 = 0*/) const { switch (uiCriteriaId) { diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_krick_and_ick.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_krick_and_ick.cpp index 7d5993d52..05995db20 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_krick_and_ick.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_krick_and_ick.cpp @@ -116,7 +116,7 @@ struct MANGOS_DLL_DECL boss_ickAI : public ScriptedAI } } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* /*pVictim*/) { if (m_pInstance) { @@ -125,7 +125,7 @@ struct MANGOS_DLL_DECL boss_ickAI : public ScriptedAI } } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { if (m_pInstance) { @@ -335,7 +335,7 @@ struct MANGOS_DLL_DECL boss_krickAI : public ScriptedAI } } - void SummonedMovementInform(Creature* pSummoned, uint32 uiMotionType, uint32 uiPointId) override + void SummonedMovementInform(Creature* /*pSummoned*/, uint32 uiMotionType, uint32 uiPointId) override { if (uiMotionType != POINT_MOTION_TYPE || !uiPointId) return; @@ -344,7 +344,7 @@ struct MANGOS_DLL_DECL boss_krickAI : public ScriptedAI m_pInstance->SetData(TYPE_KRICK, SPECIAL); } - void UpdateAI(const uint32 uiDiff) override + void UpdateAI(const uint32 /*uiDiff*/) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -371,10 +371,10 @@ struct MANGOS_DLL_DECL npc_exploding_orbAI : public Scripted_NoMovementAI m_uiGrowCount = 0; } - void AttackStart(Unit* pWho) override { } - void MoveInLineOfSight(Unit* pWho) override { } + void AttackStart(Unit* /*pWho*/) override { } + void MoveInLineOfSight(Unit* /*pWho*/) override { } - void SpellHit(Unit* pCaster, const SpellEntry* pSpell) override + void SpellHit(Unit* /*pCaster*/, const SpellEntry* pSpell) override { if (pSpell->Id == SPELL_HASTY_GROW) { @@ -391,7 +391,7 @@ struct MANGOS_DLL_DECL npc_exploding_orbAI : public Scripted_NoMovementAI } } - void UpdateAI(const uint32 uiDiff) override { } + void UpdateAI(const uint32 /*uiDiff*/) override { } }; CreatureAI* GetAI_npc_exploding_orb(Creature* pCreature) diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_scourgelord_tyrannus.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_scourgelord_tyrannus.cpp index 1022d0937..e342e3d85 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_scourgelord_tyrannus.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_scourgelord_tyrannus.cpp @@ -96,12 +96,12 @@ struct MANGOS_DLL_DECL boss_tyrannusAI : public ScriptedAI } } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* /*pVictim*/) { DoScriptText(urand(0, 1) ? SAY_SLAY_1 : SAY_SLAY_2, m_creature); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { DoScriptText(SAY_DEATH, m_creature); diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/instance_pit_of_saron.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/instance_pit_of_saron.cpp index 8a9fef0bf..d57526465 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/instance_pit_of_saron.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/instance_pit_of_saron.cpp @@ -436,7 +436,7 @@ void instance_pit_of_saron::SetSpecialAchievementCriteria(uint32 uiType, bool bI m_abAchievCriteria[uiType] = bIsMet; } -bool instance_pit_of_saron::CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/) const +bool instance_pit_of_saron::CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* /*pSource*/, Unit const* /*pTarget*/, uint32 /*uiMiscValue1 = 0*/) const { switch (uiCriteriaId) { diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/pit_of_saron.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/pit_of_saron.cpp index 160bf9730..77b9dd054 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/pit_of_saron.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/pit_of_saron.cpp @@ -87,7 +87,7 @@ CreatureAI* GetAI_npc_ymirjar_deathbringer(Creature* pCreature) return new npc_ymirjar_deathbringerAI(pCreature); } -bool EffectDummyCreature_spell_summon_undead(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) +bool EffectDummyCreature_spell_summon_undead(Unit* /*pCaster*/, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) { // always check spellid and effectindex if (uiSpellId == SPELL_SUMMON_UNDEAD && uiEffIndex == EFFECT_INDEX_0) @@ -136,9 +136,9 @@ struct MANGOS_DLL_DECL npc_collapsing_icicleAI : public ScriptedAI m_pInstance->SetSpecialAchievementCriteria(TYPE_ACHIEV_DONT_LOOK_UP, false); } - void AttackStart(Unit* pWho) override { } - void MoveInLineOfSight(Unit* pWho) override { } - void UpdateAI(const uint32 uiDiff) override { } + void AttackStart(Unit* /*pWho*/) override { } + void MoveInLineOfSight(Unit* /*pWho*/) override { } + void UpdateAI(const uint32 /*uiDiff*/) override { } }; CreatureAI* GetAI_npc_collapsing_icicle(Creature* pCreature) diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/blood_prince_council.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/blood_prince_council.cpp index eca61683b..b2756deea 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/blood_prince_council.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/blood_prince_council.cpp @@ -267,9 +267,9 @@ struct MANGOS_DLL_DECL npc_ball_of_flameAI : public ScriptedAI } } - void AttackStart(Unit* pWho) override { } + void AttackStart(Unit* /*pWho*/) override { } - void UpdateAI(const uint32 uiDiff) override { } + void UpdateAI(const uint32 /*uiDiff*/) override { } }; CreatureAI* GetAI_npc_ball_of_flame(Creature* pCreature) @@ -291,7 +291,7 @@ struct MANGOS_DLL_DECL npc_kinetic_bombAI : public ScriptedAI DoCastSpellIfCan(m_creature, SPELL_KINETIC_BOMB_VISUAL, CAST_TRIGGERED); } - void DamageTaken(Unit* pDealer, uint32& uiDamage) override + void DamageTaken(Unit* /*pDealer*/, uint32& uiDamage) override { // Note: this npc shouldn't take any damage - however this has an issue in the core, because the Unstanble spell doesn't proc on 0 damage uiDamage = 0; @@ -306,11 +306,11 @@ struct MANGOS_DLL_DECL npc_kinetic_bombAI : public ScriptedAI m_creature->ForcedDespawn(1000); } - void AttackStart(Unit* pWho) override { } + void AttackStart(Unit* /*pWho*/) override { } - void MoveInLineOfSight(Unit* pWho) override { } + void MoveInLineOfSight(Unit* /*pWho*/) override { } - void UpdateAI(const uint32 uiDiff) override { } + void UpdateAI(const uint32 /*uiDiff*/) override { } }; CreatureAI* GetAI_npc_kinetic_bomb(Creature* pCreature) @@ -347,7 +347,7 @@ struct MANGOS_DLL_DECL npc_dark_nucleusAI : public ScriptedAI } } - void DamageTaken(Unit* pDealer, uint32& uiDamage) override + void DamageTaken(Unit* pDealer, uint32& /*uiDamage*/) override { if (m_creature->getVictim() && pDealer != m_creature->getVictim()) { @@ -401,7 +401,7 @@ struct MANGOS_DLL_DECL npc_blood_orb_controlAI : public Scripted_NoMovementAI m_uiInvocationTimer = 30000; } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { if (m_pInstance) m_pInstance->SetData(TYPE_BLOOD_PRINCE_COUNCIL, IN_PROGRESS); @@ -518,7 +518,7 @@ struct MANGOS_DLL_DECL blood_prince_council_baseAI : public ScriptedAI ScriptedAI::EnterEvadeMode(); } - void DamageTaken(Unit* pDealer, uint32& uiDamage) override + void DamageTaken(Unit* /*pDealer*/, uint32& uiDamage) override { // Damage is shared by the Blood Orb Control npc if (!m_uiEmpowermentTimer) diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_blood_queen_lanathel.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_blood_queen_lanathel.cpp index a59c88aab..4ac4b2b91 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_blood_queen_lanathel.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_blood_queen_lanathel.cpp @@ -124,7 +124,7 @@ struct MANGOS_DLL_DECL boss_blood_queen_lanathelAI : public ScriptedAI DoScriptText(urand(0, 1) ? SAY_SLAY_1 : SAY_SLAY_2, m_creature); } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { DoScriptText(SAY_AGGRO, m_creature); DoCastSpellIfCan(m_creature, SPELL_SHROUD_OF_SORROW, CAST_TRIGGERED); diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp index 305beead1..734b6e5e4 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp @@ -154,7 +154,7 @@ struct MANGOS_DLL_DECL boss_deathbringer_saurfangAI : public ScriptedAI m_creature->SetPower(m_powerBloodPower, 0); } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { DoScriptText(SAY_AGGRO, m_creature); DoCastSpellIfCan(m_creature, SPELL_BLOOD_POWER, CAST_TRIGGERED); diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_festergut.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_festergut.cpp index 3847a255c..0f5a7b57c 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_festergut.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_festergut.cpp @@ -101,7 +101,7 @@ struct MANGOS_DLL_DECL boss_festergutAI : public ScriptedAI m_uiVileGasTimer = 10000; } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { DoScriptText(SAY_AGGRO, m_creature); diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lady_deathwhisper.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lady_deathwhisper.cpp index 9d7c44b70..2ba9e19ce 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lady_deathwhisper.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lady_deathwhisper.cpp @@ -130,7 +130,7 @@ struct MANGOS_DLL_DECL boss_lady_deathwhisperAI : public ScriptedAI } } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { DoScriptText(SAY_AGGRO, m_creature); DoCastSpellIfCan(m_creature, SPELL_MANA_BARRIER, CAST_TRIGGERED); @@ -469,7 +469,7 @@ CreatureAI* GetAI_boss_lady_deathwhisper(Creature* pCreature) return new boss_lady_deathwhisperAI(pCreature); } -bool EffectDummyCreature_spell_mana_barrier(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) +bool EffectDummyCreature_spell_mana_barrier(Unit* /*pCaster*/, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) { // always check spellid and effectindex if (uiSpellId == SPELL_MANA_BARRIER && uiEffIndex == EFFECT_INDEX_0) diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp index 571df01a9..867e8b62f 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp @@ -101,7 +101,7 @@ struct MANGOS_DLL_DECL boss_lord_marrowgarAI : public ScriptedAI m_uiBoneStormColdflameTimer = 1000; } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { DoScriptText(SAY_AGGRO, m_creature); diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_professor_putricide.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_professor_putricide.cpp index f96f15321..dd480219e 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_professor_putricide.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_professor_putricide.cpp @@ -160,7 +160,7 @@ struct MANGOS_DLL_DECL boss_professor_putricideAI : public ScriptedAI DoScriptText(urand(0, 1) ? SAY_SLAY_1 : SAY_SLAY_2, m_creature); } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { if (m_pInstance) m_pInstance->SetData(TYPE_PROFESSOR_PUTRICIDE, IN_PROGRESS); diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_rotface.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_rotface.cpp index f5b82c1d5..49661aaa2 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_rotface.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_rotface.cpp @@ -104,7 +104,7 @@ struct MANGOS_DLL_DECL boss_rotfaceAI : public ScriptedAI m_uiInfectionsRate = 1; } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { if (m_pInstance) m_pInstance->SetData(TYPE_ROTFACE, IN_PROGRESS); diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp index 3133aa589..3dbbfb176 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp @@ -216,7 +216,7 @@ struct MANGOS_DLL_DECL boss_sindragosaAI : public ScriptedAI } } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { DoScriptText(SAY_AGGRO, m_creature); // instance data set when sindragosa lands @@ -511,7 +511,7 @@ struct MANGOS_DLL_DECL npc_rimefang_iccAI : public ScriptedAI m_creature->SetWalk(bIsFlying); } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { DoCastSpellIfCan(m_creature, SPELL_RIMEFANG_FROST_AURA, CAST_TRIGGERED); } @@ -816,7 +816,7 @@ struct MANGOS_DLL_DECL mob_frost_bombAI : public ScriptedAI m_uiFrostBombTimer = 6000; } - void AttackStart(Unit* pWho) override {} + void AttackStart(Unit* /*pWho*/) override {} void UpdateAI(const uint32 uiDiff) override { diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_the_lich_king.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_the_lich_king.cpp index 80ad573e8..c2b6cca07 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_the_lich_king.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_the_lich_king.cpp @@ -284,7 +284,7 @@ struct MANGOS_DLL_DECL boss_the_lich_king_iccAI : public ScriptedAI m_uiVileSpiritsTimer = 20000; } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { if (m_pInstance) m_pInstance->SetData(TYPE_LICH_KING, IN_PROGRESS); diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_valithria_dreamwalker.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_valithria_dreamwalker.cpp index 09e4e39d2..eacb0173c 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_valithria_dreamwalker.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_valithria_dreamwalker.cpp @@ -137,7 +137,7 @@ struct MANGOS_DLL_DECL boss_valithria_dreamwalkerAI : public ScriptedAI m_pInstance->SetData(TYPE_VALITHRIA, FAIL); } - void UpdateAI(const uint32 uiDiff) override + void UpdateAI(const uint32 /*uiDiff*/) override { } }; diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_citadel.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_citadel.cpp index 78e3f3ce0..f9a1e0eab 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_citadel.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_citadel.cpp @@ -420,7 +420,7 @@ uint32 instance_icecrown_citadel::GetData(uint32 uiType) const return 0; } -bool instance_icecrown_citadel::CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscvalue1) const +bool instance_icecrown_citadel::CheckAchievementCriteriaMeet(uint32 /*uiCriteriaId*/, Player const* /*pSource*/, Unit const* /*pTarget*/, uint32 /*uiMiscvalue1*/) const { // ToDo: return false; @@ -492,7 +492,7 @@ bool AreaTrigger_at_icecrown_citadel(Player* pPlayer, AreaTriggerEntry const* pA return false; } -bool ProcessEventId_event_gameobject_citadel_valve(uint32 uiEventId, Object* pSource, Object* pTarget, bool bIsStart) +bool ProcessEventId_event_gameobject_citadel_valve(uint32 /*uiEventId*/, Object* pSource, Object* /*pTarget*/, bool bIsStart) { if (bIsStart && pSource->GetTypeId() == TYPEID_PLAYER) { diff --git a/scripts/northrend/naxxramas/boss_anubrekhan.cpp b/scripts/northrend/naxxramas/boss_anubrekhan.cpp index 6097939fb..774a3ed50 100644 --- a/scripts/northrend/naxxramas/boss_anubrekhan.cpp +++ b/scripts/northrend/naxxramas/boss_anubrekhan.cpp @@ -106,7 +106,7 @@ struct MANGOS_DLL_DECL boss_anubrekhanAI : public ScriptedAI DoScriptText(SAY_SLAY, m_creature); } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { switch (urand(0, 2)) { diff --git a/scripts/northrend/naxxramas/boss_faerlina.cpp b/scripts/northrend/naxxramas/boss_faerlina.cpp index 54b6ec132..62cad6376 100644 --- a/scripts/northrend/naxxramas/boss_faerlina.cpp +++ b/scripts/northrend/naxxramas/boss_faerlina.cpp @@ -74,7 +74,7 @@ struct MANGOS_DLL_DECL boss_faerlinaAI : public ScriptedAI m_uiEnrageTimer = 60000; } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { switch (urand(0, 3)) { @@ -120,7 +120,7 @@ struct MANGOS_DLL_DECL boss_faerlinaAI : public ScriptedAI // Widow's Embrace prevents frenzy and poison bolt, if it removes frenzy, next frenzy is sceduled in 60s // It is likely that this _should_ be handled with some dummy aura(s) - but couldn't find any - void SpellHit(Unit* pCaster, const SpellEntry* pSpellEntry) override + void SpellHit(Unit* /*pCaster*/, const SpellEntry* pSpellEntry) override { // Check if we hit with Widow's Embrave if (pSpellEntry->Id == SPELL_WIDOWS_EMBRACE || pSpellEntry->Id == SPELL_WIDOWS_EMBRACE_H) diff --git a/scripts/northrend/naxxramas/boss_four_horsemen.cpp b/scripts/northrend/naxxramas/boss_four_horsemen.cpp index f154cfa2f..cf766f8cc 100644 --- a/scripts/northrend/naxxramas/boss_four_horsemen.cpp +++ b/scripts/northrend/naxxramas/boss_four_horsemen.cpp @@ -129,7 +129,7 @@ struct MANGOS_DLL_DECL boss_lady_blaumeuxAI : public ScriptedAI m_bIsCornerMovement = true; } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { DoScriptText(SAY_BLAU_AGGRO, m_creature); @@ -243,7 +243,7 @@ struct MANGOS_DLL_DECL boss_rivendare_naxxAI : public ScriptedAI m_bIsCornerMovement = true; } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { switch (urand(0, 2)) { @@ -349,7 +349,7 @@ struct MANGOS_DLL_DECL boss_thane_korthazzAI : public ScriptedAI m_bIsCornerMovement = true; } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { DoScriptText(SAY_KORT_AGGRO, m_creature); @@ -452,7 +452,7 @@ struct MANGOS_DLL_DECL boss_sir_zeliekAI : public ScriptedAI m_bIsCornerMovement = true; } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { DoScriptText(SAY_ZELI_AGGRO, m_creature); diff --git a/scripts/northrend/naxxramas/boss_gluth.cpp b/scripts/northrend/naxxramas/boss_gluth.cpp index 1aa8ace72..d2b2de752 100644 --- a/scripts/northrend/naxxramas/boss_gluth.cpp +++ b/scripts/northrend/naxxramas/boss_gluth.cpp @@ -92,7 +92,7 @@ struct MANGOS_DLL_DECL boss_gluthAI : public ScriptedAI m_pInstance->SetData(TYPE_GLUTH, DONE); } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { if (m_pInstance) m_pInstance->SetData(TYPE_GLUTH, IN_PROGRESS); diff --git a/scripts/northrend/naxxramas/boss_gothik.cpp b/scripts/northrend/naxxramas/boss_gothik.cpp index 5ac256627..aeb529eb1 100644 --- a/scripts/northrend/naxxramas/boss_gothik.cpp +++ b/scripts/northrend/naxxramas/boss_gothik.cpp @@ -130,7 +130,7 @@ struct MANGOS_DLL_DECL boss_gothikAI : public ScriptedAI m_lRiderSummonPosGuids.clear(); } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { if (!m_pInstance) return; @@ -241,7 +241,7 @@ struct MANGOS_DLL_DECL boss_gothikAI : public ScriptedAI } } - void SummonAdds(bool bRightSide, uint32 uiSummonEntry) + void SummonAdds(bool /*bRightSide*/, uint32 uiSummonEntry) { GuidList* plSummonPosGuids; switch (uiSummonEntry) @@ -449,7 +449,7 @@ CreatureAI* GetAI_boss_gothik(Creature* pCreature) return new boss_gothikAI(pCreature); } -bool EffectDummyCreature_spell_anchor(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) +bool EffectDummyCreature_spell_anchor(Unit* /*pCaster*/, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) { if (uiEffIndex != EFFECT_INDEX_0 || pCreatureTarget->GetEntry() != NPC_SUB_BOSS_TRIGGER) return true; diff --git a/scripts/northrend/naxxramas/boss_grobbulus.cpp b/scripts/northrend/naxxramas/boss_grobbulus.cpp index 7e2e7a100..c057bd722 100644 --- a/scripts/northrend/naxxramas/boss_grobbulus.cpp +++ b/scripts/northrend/naxxramas/boss_grobbulus.cpp @@ -75,7 +75,7 @@ struct MANGOS_DLL_DECL boss_grobbulusAI : public ScriptedAI m_uiSlimeStreamTimer = 5 * IN_MILLISECONDS; // The first few secs it is ok to be out of range } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { if (m_pInstance) m_pInstance->SetData(TYPE_GROBBULUS, IN_PROGRESS); diff --git a/scripts/northrend/naxxramas/boss_heigan.cpp b/scripts/northrend/naxxramas/boss_heigan.cpp index 876fbd19f..a843ee286 100644 --- a/scripts/northrend/naxxramas/boss_heigan.cpp +++ b/scripts/northrend/naxxramas/boss_heigan.cpp @@ -89,7 +89,7 @@ struct MANGOS_DLL_DECL boss_heiganAI : public ScriptedAI ResetPhase(); } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { switch (urand(0, 2)) { diff --git a/scripts/northrend/naxxramas/boss_loatheb.cpp b/scripts/northrend/naxxramas/boss_loatheb.cpp index df5244616..70c300102 100644 --- a/scripts/northrend/naxxramas/boss_loatheb.cpp +++ b/scripts/northrend/naxxramas/boss_loatheb.cpp @@ -70,7 +70,7 @@ struct MANGOS_DLL_DECL boss_loathebAI : public ScriptedAI m_uiNecroticAuraCount = 0; } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { if (m_pInstance) m_pInstance->SetData(TYPE_LOATHEB, IN_PROGRESS); diff --git a/scripts/northrend/naxxramas/boss_maexxna.cpp b/scripts/northrend/naxxramas/boss_maexxna.cpp index eecbeb546..724b3a424 100644 --- a/scripts/northrend/naxxramas/boss_maexxna.cpp +++ b/scripts/northrend/naxxramas/boss_maexxna.cpp @@ -76,8 +76,8 @@ struct MANGOS_DLL_DECL npc_web_wrapAI : public ScriptedAI m_uiWebWrapTimer = 0; } - void MoveInLineOfSight(Unit* pWho) override {} - void AttackStart(Unit* pWho) override {} + void MoveInLineOfSight(Unit* /*pWho*/) override {} + void AttackStart(Unit* /*pWho*/) override {} void SetVictim(Unit* pVictim) { @@ -169,7 +169,7 @@ struct MANGOS_DLL_DECL boss_maexxnaAI : public ScriptedAI m_bEnraged = false; } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { if (m_pInstance) m_pInstance->SetData(TYPE_MAEXXNA, IN_PROGRESS); diff --git a/scripts/northrend/naxxramas/boss_noth.cpp b/scripts/northrend/naxxramas/boss_noth.cpp index 1beac8a3d..9b417157e 100644 --- a/scripts/northrend/naxxramas/boss_noth.cpp +++ b/scripts/northrend/naxxramas/boss_noth.cpp @@ -115,7 +115,7 @@ struct MANGOS_DLL_DECL boss_nothAI : public ScriptedAI m_uiSummonTimer = 12000; } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { switch (urand(0, 2)) { diff --git a/scripts/northrend/naxxramas/boss_patchwerk.cpp b/scripts/northrend/naxxramas/boss_patchwerk.cpp index c759c37db..9c98fb7fa 100644 --- a/scripts/northrend/naxxramas/boss_patchwerk.cpp +++ b/scripts/northrend/naxxramas/boss_patchwerk.cpp @@ -84,7 +84,7 @@ struct MANGOS_DLL_DECL boss_patchwerkAI : public ScriptedAI m_pInstance->SetData(TYPE_PATCHWERK, DONE); } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { DoScriptText(urand(0, 1) ? SAY_AGGRO1 : SAY_AGGRO2, m_creature); diff --git a/scripts/northrend/naxxramas/boss_razuvious.cpp b/scripts/northrend/naxxramas/boss_razuvious.cpp index 4a5846768..6211c9ef0 100644 --- a/scripts/northrend/naxxramas/boss_razuvious.cpp +++ b/scripts/northrend/naxxramas/boss_razuvious.cpp @@ -69,7 +69,7 @@ struct MANGOS_DLL_DECL boss_razuviousAI : public ScriptedAI m_uiCommandSoundTimer = 40000; // 40 seconds } - void KilledUnit(Unit* Victim) override + void KilledUnit(Unit* /*Victim*/) override { if (urand(0, 3)) return; @@ -91,7 +91,7 @@ struct MANGOS_DLL_DECL boss_razuviousAI : public ScriptedAI m_pInstance->SetData(TYPE_RAZUVIOUS, DONE); } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { switch (urand(0, 2)) { diff --git a/scripts/northrend/naxxramas/boss_sapphiron.cpp b/scripts/northrend/naxxramas/boss_sapphiron.cpp index 5db6d7aa5..7ccee5375 100644 --- a/scripts/northrend/naxxramas/boss_sapphiron.cpp +++ b/scripts/northrend/naxxramas/boss_sapphiron.cpp @@ -119,7 +119,7 @@ struct MANGOS_DLL_DECL boss_sapphironAI : public ScriptedAI // m_creature->ApplySpellMod(SPELL_FROST_AURA, SPELLMOD_DURATION, -1); } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_FROST_AURA : SPELL_FROST_AURA_H); @@ -148,7 +148,7 @@ struct MANGOS_DLL_DECL boss_sapphironAI : public ScriptedAI } } - void MovementInform(uint32 uiType, uint32 uiPointId) override + void MovementInform(uint32 uiType, uint32 /*uiPointId*/) override { if (uiType == POINT_MOTION_TYPE && m_Phase == PHASE_LIFT_OFF) { diff --git a/scripts/northrend/naxxramas/boss_thaddius.cpp b/scripts/northrend/naxxramas/boss_thaddius.cpp index 3157dd89a..20d10f626 100644 --- a/scripts/northrend/naxxramas/boss_thaddius.cpp +++ b/scripts/northrend/naxxramas/boss_thaddius.cpp @@ -122,7 +122,7 @@ struct MANGOS_DLL_DECL boss_thaddiusAI : public Scripted_NoMovementAI m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { switch (urand(0, 2)) { @@ -246,7 +246,7 @@ CreatureAI* GetAI_boss_thaddius(Creature* pCreature) return new boss_thaddiusAI(pCreature); } -bool EffectDummyNPC_spell_thaddius_encounter(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) +bool EffectDummyNPC_spell_thaddius_encounter(Unit* /*pCaster*/, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) { switch (uiSpellId) { @@ -298,9 +298,9 @@ struct MANGOS_DLL_DECL npc_tesla_coilAI : public Scripted_NoMovementAI uint32 m_uiOverloadTimer; void Reset() override {} - void MoveInLineOfSight(Unit* pWho) override {} + void MoveInLineOfSight(Unit* /*pWho*/) override {} - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { DoScriptText(EMOTE_LOSING_LINK, m_creature); } @@ -535,7 +535,7 @@ struct MANGOS_DLL_DECL boss_thaddiusAddsAI : public ScriptedAI m_uiHoldTimer = 1500; } - virtual void UpdateAddAI(const uint32 uiDiff) {} // Used for Add-specific spells + virtual void UpdateAddAI(const uint32 /*uiDiff*/) {} // Used for Add-specific spells void UpdateAI(const uint32 uiDiff) override { diff --git a/scripts/northrend/naxxramas/instance_naxxramas.cpp b/scripts/northrend/naxxramas/instance_naxxramas.cpp index 7c3240b71..c3efc4960 100644 --- a/scripts/northrend/naxxramas/instance_naxxramas.cpp +++ b/scripts/northrend/naxxramas/instance_naxxramas.cpp @@ -239,7 +239,7 @@ void instance_naxxramas::OnObjectCreate(GameObject* pGo) m_mGoEntryGuidStore[pGo->GetEntry()] = pGo->GetObjectGuid(); } -void instance_naxxramas::OnPlayerDeath(Player* pPlayer) +void instance_naxxramas::OnPlayerDeath(Player* /*pPlayer*/) { if (IsEncounterInProgress()) SetData(TYPE_UNDYING_FAILED, DONE); @@ -510,7 +510,7 @@ void instance_naxxramas::SetSpecialAchievementCriteria(uint32 uiType, bool bIsMe m_abAchievCriteria[uiType] = bIsMet; } -bool instance_naxxramas::CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/) const +bool instance_naxxramas::CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* /*pSource*/, Unit const* /*pTarget*/, uint32 /*uiMiscValue1 = 0*/) const { switch (uiCriteriaId) { diff --git a/scripts/northrend/nexus/eye_of_eternity/boss_malygos.cpp b/scripts/northrend/nexus/eye_of_eternity/boss_malygos.cpp index 5763f5d33..64fd18711 100644 --- a/scripts/northrend/nexus/eye_of_eternity/boss_malygos.cpp +++ b/scripts/northrend/nexus/eye_of_eternity/boss_malygos.cpp @@ -220,7 +220,7 @@ struct MANGOS_DLL_DECL boss_malygosAI : public ScriptedAI, private DialogueHelpe SetCombatMovement(false); } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { DoScriptText(SAY_AGGRO, m_creature); @@ -595,9 +595,9 @@ struct MANGOS_DLL_DECL npc_power_sparkAI : public ScriptedAI DoCastSpellIfCan(m_creature, SPELL_POWER_SPARK_PLAYERS, CAST_TRIGGERED); } - void AttackStart(Unit* pWho) override { } + void AttackStart(Unit* /*pWho*/) override { } - void UpdateAI(const uint32 uiDiff) override { } + void UpdateAI(const uint32 /*uiDiff*/) override { } }; CreatureAI* GetAI_npc_power_spark(Creature* pCreature) @@ -644,7 +644,7 @@ struct MANGOS_DLL_DECL npc_wyrmrest_skytalonAI : public ScriptedAI } */ - void UpdateAI(const uint32 uiDiff) override + void UpdateAI(const uint32 /*uiDiff*/) override { if (!m_bHasMounted) { @@ -671,7 +671,7 @@ CreatureAI* GetAI_npc_wyrmrest_skytalon(Creature* pCreature) ## event_go_focusing_iris ######*/ -bool ProcessEventId_event_go_focusing_iris(uint32 uiEventId, Object* pSource, Object* pTarget, bool bIsStart) +bool ProcessEventId_event_go_focusing_iris(uint32 /*uiEventId*/, Object* pSource, Object* /*pTarget*/, bool /*bIsStart*/) { if (instance_eye_of_eternity* pInstance = (instance_eye_of_eternity*)((Creature*)pSource)->GetInstanceData()) { diff --git a/scripts/northrend/nexus/nexus/boss_anomalus.cpp b/scripts/northrend/nexus/nexus/boss_anomalus.cpp index ae2d43061..ba79015cc 100644 --- a/scripts/northrend/nexus/nexus/boss_anomalus.cpp +++ b/scripts/northrend/nexus/nexus/boss_anomalus.cpp @@ -83,7 +83,7 @@ struct MANGOS_DLL_DECL boss_anomalusAI : public ScriptedAI m_uiChaoticRiftCount = 0; } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { DoScriptText(SAY_AGGRO, m_creature); @@ -201,7 +201,7 @@ struct MANGOS_DLL_DECL mob_chaotic_riftAI : public Scripted_NoMovementAI m_uiChargedRemoveTimer = 0; } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { // Auras are applied on aggro because there are many npcs with this entry in the instance DoCastSpellIfCan(m_creature, SPELL_RIFT_AURA, CAST_TRIGGERED); @@ -217,7 +217,7 @@ struct MANGOS_DLL_DECL mob_chaotic_riftAI : public Scripted_NoMovementAI } } - void SpellHit(Unit* pCaster, const SpellEntry* pSpell) override + void SpellHit(Unit* /*pCaster*/, const SpellEntry* pSpell) override { // When hit with Charge Rift cast the Charged Rift spells if (pSpell->Id == SPELL_CHARGE_RIFT) diff --git a/scripts/northrend/nexus/nexus/boss_keristrasza.cpp b/scripts/northrend/nexus/nexus/boss_keristrasza.cpp index 4f9e19076..179ada3c8 100644 --- a/scripts/northrend/nexus/nexus/boss_keristrasza.cpp +++ b/scripts/northrend/nexus/nexus/boss_keristrasza.cpp @@ -93,7 +93,7 @@ struct MANGOS_DLL_DECL boss_keristraszaAI : public ScriptedAI } } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { DoScriptText(SAY_AGGRO, m_creature); diff --git a/scripts/northrend/nexus/nexus/boss_ormorok.cpp b/scripts/northrend/nexus/nexus/boss_ormorok.cpp index 3d0d88cc6..c87954d82 100644 --- a/scripts/northrend/nexus/nexus/boss_ormorok.cpp +++ b/scripts/northrend/nexus/nexus/boss_ormorok.cpp @@ -99,7 +99,7 @@ struct MANGOS_DLL_DECL boss_ormorokAI : public ScriptedAI m_uiSpikeCount = 0; } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { DoScriptText(SAY_AGGRO, m_creature); } @@ -207,7 +207,7 @@ CreatureAI* GetAI_boss_ormorok(Creature* pCreature) return new boss_ormorokAI(pCreature); } -bool EffectDummyCreature_npc_crystal_spike_trigger(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) +bool EffectDummyCreature_npc_crystal_spike_trigger(Unit* /*pCaster*/, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) { // always check spellid and effectindex if (uiSpellId == SPELL_CRYSTAL_SPIKE_AURA && uiEffIndex == EFFECT_INDEX_0) diff --git a/scripts/northrend/nexus/nexus/boss_telestra.cpp b/scripts/northrend/nexus/nexus/boss_telestra.cpp index 13fcd199f..bfc389afe 100644 --- a/scripts/northrend/nexus/nexus/boss_telestra.cpp +++ b/scripts/northrend/nexus/nexus/boss_telestra.cpp @@ -123,7 +123,7 @@ struct MANGOS_DLL_DECL boss_telestraAI : public ScriptedAI } } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { DoScriptText(SAY_AGGRO, m_creature); @@ -145,7 +145,7 @@ struct MANGOS_DLL_DECL boss_telestraAI : public ScriptedAI DoScriptText(SAY_KILL, m_creature); } - void SpellHit(Unit* pCaster, const SpellEntry* pSpell) override + void SpellHit(Unit* /*pCaster*/, const SpellEntry* pSpell) override { switch (pSpell->Id) { diff --git a/scripts/northrend/nexus/nexus/instance_nexus.cpp b/scripts/northrend/nexus/nexus/instance_nexus.cpp index 52f211d08..4ad9d755a 100644 --- a/scripts/northrend/nexus/nexus/instance_nexus.cpp +++ b/scripts/northrend/nexus/nexus/instance_nexus.cpp @@ -24,7 +24,7 @@ EndScriptData */ #include "precompiled.h" #include "nexus.h" -bool GOUse_go_containment_sphere(Player* pPlayer, GameObject* pGo) +bool GOUse_go_containment_sphere(Player* /*pPlayer*/, GameObject* pGo) { ScriptedInstance* pInstance = (ScriptedInstance*)pGo->GetInstanceData(); @@ -168,7 +168,7 @@ void instance_nexus::SetSpecialAchievementCriteria(uint32 uiType, bool bIsMet) m_abAchievCriteria[uiType] = bIsMet; } -bool instance_nexus::CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/) const +bool instance_nexus::CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* /*pTarget*/, uint32 /*uiMiscValue1 = 0*/) const { switch (uiCriteriaId) { diff --git a/scripts/northrend/nexus/oculus/boss_eregos.cpp b/scripts/northrend/nexus/oculus/boss_eregos.cpp index dab90649e..837162d1b 100644 --- a/scripts/northrend/nexus/oculus/boss_eregos.cpp +++ b/scripts/northrend/nexus/oculus/boss_eregos.cpp @@ -88,7 +88,7 @@ struct MANGOS_DLL_DECL boss_eregosAI : public ScriptedAI m_uiAnomalyTargetIndex = 0; } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { DoScriptText(SAY_AGGRO, m_creature); @@ -262,7 +262,7 @@ struct MANGOS_DLL_DECL npc_planar_anomalyAI : public ScriptedAI m_bHasBlastCasted = false; } - void AttackStart(Unit* pWho) override { } + void AttackStart(Unit* /*pWho*/) override { } void MoveInLineOfSight(Unit* pWho) override { diff --git a/scripts/northrend/nexus/oculus/boss_urom.cpp b/scripts/northrend/nexus/oculus/boss_urom.cpp index 23f471675..454d56a46 100644 --- a/scripts/northrend/nexus/oculus/boss_urom.cpp +++ b/scripts/northrend/nexus/oculus/boss_urom.cpp @@ -127,7 +127,7 @@ struct MANGOS_DLL_DECL boss_uromAI : public ScriptedAI m_uiArcaneShieldTimer = 1000; } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { if (m_pInstance) m_pInstance->SetData(TYPE_UROM, IN_PROGRESS); @@ -247,7 +247,7 @@ struct MANGOS_DLL_DECL boss_uromAI : public ScriptedAI m_creature->SummonCreature(uiEntry, fX, fY, fZ, 0.0f, TEMPSUMMON_TIMED_OOC_DESPAWN, 30000); } - void SpellHit(Unit* pCaster, const SpellEntry* pSpell) override + void SpellHit(Unit* /*pCaster*/, const SpellEntry* pSpell) override { switch (pSpell->Id) { diff --git a/scripts/northrend/nexus/oculus/boss_varos.cpp b/scripts/northrend/nexus/oculus/boss_varos.cpp index 84a545b4c..73c46ce76 100644 --- a/scripts/northrend/nexus/oculus/boss_varos.cpp +++ b/scripts/northrend/nexus/oculus/boss_varos.cpp @@ -107,7 +107,7 @@ struct MANGOS_DLL_DECL boss_varosAI : public ScriptedAI m_uiCallCaptainTimer = urand(10000, 15000); } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { DoScriptText(SAY_AGGRO, m_creature); @@ -224,7 +224,7 @@ CreatureAI* GetAI_boss_varos(Creature* pCreature) ## event_spell_call_captain ######*/ -bool ProcessEventId_event_spell_call_captain(uint32 uiEventId, Object* pSource, Object* pTarget, bool bIsStart) +bool ProcessEventId_event_spell_call_captain(uint32 uiEventId, Object* pSource, Object* /*pTarget*/, bool bIsStart) { if (bIsStart && pSource->GetTypeId() == TYPEID_UNIT) { @@ -266,8 +266,8 @@ struct MANGOS_DLL_DECL npc_azure_ring_captainAI : public ScriptedAI ObjectGuid m_arcaneBeamGuid; void Reset() override { } - void AttackStart(Unit* pWho) override { } - void MoveInLineOfSight(Unit* pWho) override { } + void AttackStart(Unit* /*pWho*/) override { } + void MoveInLineOfSight(Unit* /*pWho*/) override { } void JustSummoned(Creature* pSummoned) override { @@ -296,7 +296,7 @@ struct MANGOS_DLL_DECL npc_azure_ring_captainAI : public ScriptedAI m_creature->ForcedDespawn(11000); } - void UpdateAI(const uint32 uiDiff) override { } + void UpdateAI(const uint32 /*uiDiff*/) override { } }; CreatureAI* GetAI_npc_azure_ring_captain(Creature* pCreature) @@ -327,9 +327,9 @@ struct MANGOS_DLL_DECL npc_arcane_beamAI : public ScriptedAI m_creature->ForcedDespawn(10000); } - void AttackStart(Unit* pWho) override { } - void MoveInLineOfSight(Unit* pWho) override { } - void UpdateAI(const uint32 uiDiff) override { } + void AttackStart(Unit* /*pWho*/) override { } + void MoveInLineOfSight(Unit* /*pWho*/) override { } + void UpdateAI(const uint32 /*uiDiff*/) override { } }; CreatureAI* GetAI_npc_arcane_beam(Creature* pCreature) @@ -348,9 +348,9 @@ struct MANGOS_DLL_DECL npc_centrifuge_coreAI : public Scripted_NoMovementAI // Note: visual already handled in creature_template_addon void Reset() override { } - void AttackStart(Unit* pWho) override { } - void MoveInLineOfSight(Unit* pWho) override { } - void UpdateAI(const uint32 uiDiff) override { } + void AttackStart(Unit* /*pWho*/) override { } + void MoveInLineOfSight(Unit* /*pWho*/) override { } + void UpdateAI(const uint32 /*uiDiff*/) override { } }; CreatureAI* GetAI_npc_centrifuge_core(Creature* pCreature) diff --git a/scripts/northrend/obsidian_sanctum/boss_sartharion.cpp b/scripts/northrend/obsidian_sanctum/boss_sartharion.cpp index 5539a04ce..cea15c24b 100644 --- a/scripts/northrend/obsidian_sanctum/boss_sartharion.cpp +++ b/scripts/northrend/obsidian_sanctum/boss_sartharion.cpp @@ -224,7 +224,7 @@ struct MANGOS_DLL_DECL boss_sartharionAI : public ScriptedAI m_pInstance->SetData(TYPE_SARTHARION_EVENT, FAIL); } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { DoScriptText(SAY_SARTHARION_AGGRO, m_creature); @@ -732,7 +732,7 @@ struct MANGOS_DLL_DECL mob_tenebronAI : public dummy_dragonAI m_uiHatchEggTimer = 30000; } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { DoScriptText(SAY_TENEBRON_AGGRO, m_creature); DoCastSpellIfCan(m_creature, SPELL_POWER_OF_TENEBRON); @@ -807,7 +807,7 @@ struct MANGOS_DLL_DECL mob_shadronAI : public dummy_dragonAI m_creature->RemoveAurasDueToSpell(SPELL_GIFT_OF_TWILIGTH_SHA); } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { DoScriptText(SAY_SHADRON_AGGRO, m_creature); DoCastSpellIfCan(m_creature, SPELL_POWER_OF_SHADRON); @@ -876,7 +876,7 @@ struct MANGOS_DLL_DECL mob_vesperonAI : public dummy_dragonAI m_uiAcolyteVesperonTimer = 60000; } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { DoScriptText(SAY_VESPERON_AGGRO, m_creature); DoCastSpellIfCan(m_creature, SPELL_POWER_OF_VESPERON); @@ -952,7 +952,7 @@ struct MANGOS_DLL_DECL mob_acolyte_of_shadronAI : public ScriptedAI } } - void JustDied(Unit* killer) override + void JustDied(Unit* /*killer*/) override { if (m_pInstance) { @@ -977,7 +977,7 @@ struct MANGOS_DLL_DECL mob_acolyte_of_shadronAI : public ScriptedAI } } - void UpdateAI(const uint32 uiDiff) override + void UpdateAI(const uint32 /*uiDiff*/) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -1022,7 +1022,7 @@ struct MANGOS_DLL_DECL mob_acolyte_of_vesperonAI : public ScriptedAI } } - void UpdateAI(const uint32 uiDiff) override + void UpdateAI(const uint32 /*uiDiff*/) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -1048,8 +1048,8 @@ struct MANGOS_DLL_DECL mob_twilight_eggsAI : public ScriptedAI { } - void AttackStart(Unit* pWho) override { } - void MoveInLineOfSight(Unit* pWho) override { } + void AttackStart(Unit* /*pWho*/) override { } + void MoveInLineOfSight(Unit* /*pWho*/) override { } }; CreatureAI* GetAI_mob_twilight_eggs(Creature* pCreature) diff --git a/scripts/northrend/obsidian_sanctum/instance_obsidian_sanctum.cpp b/scripts/northrend/obsidian_sanctum/instance_obsidian_sanctum.cpp index b1173bc5d..3d681daf0 100644 --- a/scripts/northrend/obsidian_sanctum/instance_obsidian_sanctum.cpp +++ b/scripts/northrend/obsidian_sanctum/instance_obsidian_sanctum.cpp @@ -73,7 +73,7 @@ uint32 instance_obsidian_sanctum::GetData(uint32 uiType) const return 0; } -bool instance_obsidian_sanctum::CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/) const +bool instance_obsidian_sanctum::CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* /*pSource*/, Unit const* /*pTarget*/, uint32 /*uiMiscValue1 = 0*/) const { switch (uiCriteriaId) { diff --git a/scripts/northrend/ruby_sanctum/boss_baltharus.cpp b/scripts/northrend/ruby_sanctum/boss_baltharus.cpp index 8239d07e1..5ce262e60 100644 --- a/scripts/northrend/ruby_sanctum/boss_baltharus.cpp +++ b/scripts/northrend/ruby_sanctum/boss_baltharus.cpp @@ -110,7 +110,7 @@ struct MANGOS_DLL_DECL boss_baltharusAI : public ScriptedAI m_uiCleaveTimer = urand(10000, 12000); } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { DoScriptText(SAY_AGGRO, m_creature); diff --git a/scripts/northrend/ruby_sanctum/boss_saviana.cpp b/scripts/northrend/ruby_sanctum/boss_saviana.cpp index 554b476ee..202453790 100644 --- a/scripts/northrend/ruby_sanctum/boss_saviana.cpp +++ b/scripts/northrend/ruby_sanctum/boss_saviana.cpp @@ -70,7 +70,7 @@ struct MANGOS_DLL_DECL boss_savianaAI : public ScriptedAI m_uiFlameBreathTimer = 10000; } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { DoScriptText(SAY_AGGRO, m_creature); diff --git a/scripts/northrend/ruby_sanctum/boss_zarithrian.cpp b/scripts/northrend/ruby_sanctum/boss_zarithrian.cpp index f9caa3892..1a81c095b 100644 --- a/scripts/northrend/ruby_sanctum/boss_zarithrian.cpp +++ b/scripts/northrend/ruby_sanctum/boss_zarithrian.cpp @@ -60,7 +60,7 @@ struct MANGOS_DLL_DECL boss_zarithrianAI : public ScriptedAI m_uiCallFlamecallerTimer = 15000; } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { DoScriptText(SAY_AGGRO, m_creature); diff --git a/scripts/northrend/ruby_sanctum/instance_ruby_sanctum.cpp b/scripts/northrend/ruby_sanctum/instance_ruby_sanctum.cpp index c35d04d08..8a8e2153e 100644 --- a/scripts/northrend/ruby_sanctum/instance_ruby_sanctum.cpp +++ b/scripts/northrend/ruby_sanctum/instance_ruby_sanctum.cpp @@ -48,7 +48,7 @@ bool instance_ruby_sanctum::IsEncounterInProgress() const return false; } -void instance_ruby_sanctum::OnPlayerEnter(Player* pPlayer) +void instance_ruby_sanctum::OnPlayerEnter(Player* /*pPlayer*/) { // Return if Halion already dead, or Zarithrian alive if (m_auiEncounter[TYPE_ZARITHRIAN] != DONE || m_auiEncounter[TYPE_HALION] == DONE) diff --git a/scripts/northrend/sholazar_basin.cpp b/scripts/northrend/sholazar_basin.cpp index 7500ded9f..35538c208 100644 --- a/scripts/northrend/sholazar_basin.cpp +++ b/scripts/northrend/sholazar_basin.cpp @@ -263,7 +263,7 @@ struct MANGOS_DLL_DECL npc_injured_rainspeakerAI : public npc_escortAI } } - void UpdateEscortAI(const uint32 uiDiff) override + void UpdateEscortAI(const uint32 /*uiDiff*/) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -365,7 +365,7 @@ bool GossipHello_npc_mosswalker_victim(Player* pPlayer, Creature* pCreature) return true; } -bool GossipSelect_npc_mosswalker_victim(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +bool GossipSelect_npc_mosswalker_victim(Player* pPlayer, Creature* pCreature, uint32 /*uiSender*/, uint32 uiAction) { if (uiAction == GOSSIP_ACTION_INFO_DEF) { diff --git a/scripts/northrend/ulduar/halls_of_lightning/boss_bjarngrim.cpp b/scripts/northrend/ulduar/halls_of_lightning/boss_bjarngrim.cpp index 2b34152df..11a22db8b 100644 --- a/scripts/northrend/ulduar/halls_of_lightning/boss_bjarngrim.cpp +++ b/scripts/northrend/ulduar/halls_of_lightning/boss_bjarngrim.cpp @@ -147,7 +147,7 @@ struct MANGOS_DLL_DECL boss_bjarngrimAI : public ScriptedAI m_pInstance->SetData(TYPE_BJARNGRIM, NOT_STARTED); } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { DoScriptText(SAY_AGGRO, m_creature); diff --git a/scripts/northrend/ulduar/halls_of_lightning/boss_ionar.cpp b/scripts/northrend/ulduar/halls_of_lightning/boss_ionar.cpp index 8d57c3189..1683b3d47 100644 --- a/scripts/northrend/ulduar/halls_of_lightning/boss_ionar.cpp +++ b/scripts/northrend/ulduar/halls_of_lightning/boss_ionar.cpp @@ -109,7 +109,7 @@ struct MANGOS_DLL_DECL boss_ionarAI : public ScriptedAI AttackStart(pAttacker); } - void Aggro(Unit* who) override + void Aggro(Unit* /*who*/) override { DoScriptText(SAY_AGGRO, m_creature); @@ -138,7 +138,7 @@ struct MANGOS_DLL_DECL boss_ionarAI : public ScriptedAI } } - void JustDied(Unit* killer) override + void JustDied(Unit* /*killer*/) override { DoScriptText(SAY_DEATH, m_creature); DespawnSpark(); @@ -147,7 +147,7 @@ struct MANGOS_DLL_DECL boss_ionarAI : public ScriptedAI m_pInstance->SetData(TYPE_IONAR, DONE); } - void KilledUnit(Unit* victim) override + void KilledUnit(Unit* /*victim*/) override { switch (urand(0, 2)) { @@ -293,7 +293,7 @@ CreatureAI* GetAI_boss_ionar(Creature* pCreature) return new boss_ionarAI(pCreature); } -bool EffectDummyCreature_boss_ionar(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) +bool EffectDummyCreature_boss_ionar(Unit* /*pCaster*/, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) { // always check spellid and effectindex if (uiSpellId == SPELL_DISPERSE && uiEffIndex == EFFECT_INDEX_0) diff --git a/scripts/northrend/ulduar/halls_of_lightning/boss_loken.cpp b/scripts/northrend/ulduar/halls_of_lightning/boss_loken.cpp index 29cf6d9fd..7450da0a3 100644 --- a/scripts/northrend/ulduar/halls_of_lightning/boss_loken.cpp +++ b/scripts/northrend/ulduar/halls_of_lightning/boss_loken.cpp @@ -90,7 +90,7 @@ struct MANGOS_DLL_DECL boss_lokenAI : public ScriptedAI m_pInstance->SetData(TYPE_LOKEN, NOT_STARTED); } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { DoScriptText(SAY_AGGRO, m_creature); diff --git a/scripts/northrend/ulduar/halls_of_lightning/boss_volkhan.cpp b/scripts/northrend/ulduar/halls_of_lightning/boss_volkhan.cpp index fe6878ca4..5af757d53 100644 --- a/scripts/northrend/ulduar/halls_of_lightning/boss_volkhan.cpp +++ b/scripts/northrend/ulduar/halls_of_lightning/boss_volkhan.cpp @@ -97,7 +97,7 @@ struct MANGOS_DLL_DECL boss_volkhanAI : public ScriptedAI m_uiTemperTimer = 10000; } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { DoScriptText(SAY_AGGRO, m_creature); @@ -356,7 +356,7 @@ struct MANGOS_DLL_DECL mob_molten_golemAI : public ScriptedAI m_creature->UpdateEntry(NPC_BRITTLE_GOLEM); } - void DamageTaken(Unit* pDoneBy, uint32& uiDamage) override + void DamageTaken(Unit* /*pDoneBy*/, uint32& uiDamage) override { // Transform intro Brittle when damaged to 0 HP if (uiDamage >= m_creature->GetHealth()) @@ -370,7 +370,7 @@ struct MANGOS_DLL_DECL mob_molten_golemAI : public ScriptedAI } } - void SpellHit(Unit* pCaster, const SpellEntry* pSpell) override + void SpellHit(Unit* /*pCaster*/, const SpellEntry* pSpell) override { // This is the dummy effect of the spells - Note: should be handled as a dummy effect in core if (pSpell->Id == SPELL_SHATTER || pSpell->Id == SPELL_SHATTER_H) diff --git a/scripts/northrend/ulduar/halls_of_lightning/instance_halls_of_lightning.cpp b/scripts/northrend/ulduar/halls_of_lightning/instance_halls_of_lightning.cpp index dd04ac53d..f6bceea35 100644 --- a/scripts/northrend/ulduar/halls_of_lightning/instance_halls_of_lightning.cpp +++ b/scripts/northrend/ulduar/halls_of_lightning/instance_halls_of_lightning.cpp @@ -131,7 +131,7 @@ uint32 instance_halls_of_lightning::GetData(uint32 uiType) const return 0; } -bool instance_halls_of_lightning::CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/) const +bool instance_halls_of_lightning::CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* /*pSource*/, Unit const* /*pTarget*/, uint32 /*uiMiscValue1 = 0*/) const { if (uiCriteriaId == ACHIEV_CRIT_RESISTANT) return m_bIsShatterResistant; diff --git a/scripts/northrend/ulduar/halls_of_stone/boss_maiden_of_grief.cpp b/scripts/northrend/ulduar/halls_of_stone/boss_maiden_of_grief.cpp index dad9a7845..2dcbf679b 100644 --- a/scripts/northrend/ulduar/halls_of_stone/boss_maiden_of_grief.cpp +++ b/scripts/northrend/ulduar/halls_of_stone/boss_maiden_of_grief.cpp @@ -75,7 +75,7 @@ struct MANGOS_DLL_DECL boss_maiden_of_griefAI : public ScriptedAI m_uiPartingSorrowTimer = 12000; } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { DoScriptText(SAY_AGGRO, m_creature); diff --git a/scripts/northrend/ulduar/halls_of_stone/boss_sjonnir.cpp b/scripts/northrend/ulduar/halls_of_stone/boss_sjonnir.cpp index c5a33ef80..5aa7ab76b 100644 --- a/scripts/northrend/ulduar/halls_of_stone/boss_sjonnir.cpp +++ b/scripts/northrend/ulduar/halls_of_stone/boss_sjonnir.cpp @@ -108,7 +108,7 @@ struct MANGOS_DLL_DECL boss_sjonnirAI : public ScriptedAI m_uiHpCheck = 75; } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { DoScriptText(SAY_AGGRO, m_creature); diff --git a/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.cpp b/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.cpp index b9e01a0af..871a87213 100644 --- a/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.cpp +++ b/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.cpp @@ -631,7 +631,7 @@ bool GossipHello_npc_brann_hos(Player* pPlayer, Creature* pCreature) return true; } -bool GossipSelect_npc_brann_hos(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +bool GossipSelect_npc_brann_hos(Player* pPlayer, Creature* pCreature, uint32 /*uiSender*/, uint32 uiAction) { switch (uiAction) { @@ -687,10 +687,10 @@ struct MANGOS_DLL_DECL npc_dark_matterAI : public ScriptedAI m_uiSummonTimer = 0; } - void AttackStart(Unit* pWho) override { } - void MoveInLineOfSight(Unit* pWho) override { } + void AttackStart(Unit* /*pWho*/) override { } + void MoveInLineOfSight(Unit* /*pWho*/) override { } - void SpellHit(Unit* pCaster, const SpellEntry* pSpell) override + void SpellHit(Unit* /*pCaster*/, const SpellEntry* pSpell) override { if (pSpell->Id == SPELL_DARK_MATTER_START) m_uiSummonTimer = 5000; @@ -757,9 +757,9 @@ struct MANGOS_DLL_DECL npc_searing_gazeAI : public Scripted_NoMovementAI m_creature->ForcedDespawn(30000); } - void AttackStart(Unit* pWho) override { } - void MoveInLineOfSight(Unit* pWho) override { } - void UpdateAI(const uint32 uiDiff) override { } + void AttackStart(Unit* /*pWho*/) override { } + void MoveInLineOfSight(Unit* /*pWho*/) override { } + void UpdateAI(const uint32 /*uiDiff*/) override { } }; CreatureAI* GetAI_npc_searing_gaze(Creature* pCreature) diff --git a/scripts/northrend/ulduar/halls_of_stone/instance_halls_of_stone.cpp b/scripts/northrend/ulduar/halls_of_stone/instance_halls_of_stone.cpp index 3dcbbd8bd..2bec69ea5 100644 --- a/scripts/northrend/ulduar/halls_of_stone/instance_halls_of_stone.cpp +++ b/scripts/northrend/ulduar/halls_of_stone/instance_halls_of_stone.cpp @@ -191,7 +191,7 @@ uint32 instance_halls_of_stone::GetData(uint32 uiType) const return 0; } -bool instance_halls_of_stone::CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/) const +bool instance_halls_of_stone::CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* /*pSource*/, Unit const* /*pTarget*/, uint32 /*uiMiscValue1 = 0*/) const { switch (uiCriteriaId) { diff --git a/scripts/northrend/ulduar/ulduar/assembly_of_iron.cpp b/scripts/northrend/ulduar/ulduar/assembly_of_iron.cpp index 3908fa802..b7e041414 100644 --- a/scripts/northrend/ulduar/ulduar/assembly_of_iron.cpp +++ b/scripts/northrend/ulduar/ulduar/assembly_of_iron.cpp @@ -169,7 +169,7 @@ struct MANGOS_DLL_DECL boss_brundirAI : public ScriptedAI DoScriptText(urand(0, 1) ? SAY_BRUNDIR_DEATH_1 : SAY_BRUNDIR_DEATH_2, m_creature); } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { DoScriptText(SAY_BRUNDIR_AGGRO, m_creature); @@ -202,7 +202,7 @@ struct MANGOS_DLL_DECL boss_brundirAI : public ScriptedAI } } - void SpellHit(Unit* pCaster, const SpellEntry* pSpell) override + void SpellHit(Unit* /*pCaster*/, const SpellEntry* pSpell) override { // Increase the phase when hit with the supercharge spell by his brothers if (pSpell->Id == SPELL_SUPERCHARGE) @@ -466,7 +466,7 @@ struct MANGOS_DLL_DECL boss_molgeimAI : public ScriptedAI DoScriptText(urand(0, 1) ? SAY_MOLGEIM_DEATH_1 : SAY_MOLGEIM_DEATH_2, m_creature); } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { DoScriptText(SAY_MOLGEIM_AGGRO, m_creature); @@ -503,7 +503,7 @@ struct MANGOS_DLL_DECL boss_molgeimAI : public ScriptedAI } } - void SpellHit(Unit* pCaster, const SpellEntry* pSpell) override + void SpellHit(Unit* /*pCaster*/, const SpellEntry* pSpell) override { // Increase the phase when hit with the supercharge spell by his brothers if (pSpell->Id == SPELL_SUPERCHARGE) @@ -644,7 +644,7 @@ struct MANGOS_DLL_DECL boss_steelbreakerAI : public ScriptedAI DoScriptText(urand(0, 1) ? SAY_STEEL_DEATH_1 : SAY_STEEL_DEATH_2, m_creature); } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { DoScriptText(SAY_STEEL_AGGRO, m_creature); @@ -666,7 +666,7 @@ struct MANGOS_DLL_DECL boss_steelbreakerAI : public ScriptedAI m_pInstance->SetData(TYPE_ASSEMBLY, FAIL); } - void SpellHit(Unit* pCaster, const SpellEntry* pSpell) override + void SpellHit(Unit* /*pCaster*/, const SpellEntry* pSpell) override { // Increase the phase when hit with the supercharge spell by his brothers if (pSpell->Id == SPELL_SUPERCHARGE) diff --git a/scripts/northrend/ulduar/ulduar/boss_auriaya.cpp b/scripts/northrend/ulduar/ulduar/boss_auriaya.cpp index 21d0789bb..c5fa6f1fb 100644 --- a/scripts/northrend/ulduar/ulduar/boss_auriaya.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_auriaya.cpp @@ -101,7 +101,7 @@ struct MANGOS_DLL_DECL boss_auriayaAI : public ScriptedAI m_pInstance->SetData(TYPE_AURIAYA, DONE); } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { if (m_pInstance) m_pInstance->SetData(TYPE_AURIAYA, IN_PROGRESS); @@ -238,7 +238,7 @@ struct MANGOS_DLL_DECL boss_feral_defenderAI : public ScriptedAI m_pInstance->SetSpecialAchievementCriteria(TYPE_ACHIEV_NINE_LIVES, true); } - void DamageTaken(Unit* pDoneBy, uint32& uiDamage) override + void DamageTaken(Unit* /*pDoneBy*/, uint32& uiDamage) override { // If we don't have the feral essence anymore then ignore this if (m_uiKilledCount >= 8) // 9-1 == 8 diff --git a/scripts/northrend/ulduar/ulduar/boss_general_vezax.cpp b/scripts/northrend/ulduar/ulduar/boss_general_vezax.cpp index 78d0c4030..1228cc546 100644 --- a/scripts/northrend/ulduar/ulduar/boss_general_vezax.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_general_vezax.cpp @@ -91,7 +91,7 @@ struct MANGOS_DLL_DECL boss_general_vezaxAI : public ScriptedAI m_uiVaporsGathered = 0; } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { if (m_pInstance) { @@ -289,7 +289,7 @@ CreatureAI* GetAI_boss_general_vezax(Creature* pCreature) return new boss_general_vezaxAI(pCreature); } -bool ProcessEventId_event_spell_saronite_barrier(uint32 uiEventId, Object* pSource, Object* pTarget, bool bIsStart) +bool ProcessEventId_event_spell_saronite_barrier(uint32 /*uiEventId*/, Object* pSource, Object* /*pTarget*/, bool /*bIsStart*/) { if (pSource->GetTypeId() == TYPEID_UNIT && ((Creature*)pSource)->GetEntry() == NPC_VEZAX) { diff --git a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp index 3b658731f..b50623e32 100644 --- a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp +++ b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp @@ -589,7 +589,7 @@ void instance_ulduar::SetSpecialAchievementCriteria(uint32 uiType, bool bIsMet) m_abAchievCriteria[uiType] = bIsMet; } -bool instance_ulduar::CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/) const +bool instance_ulduar::CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* /*pSource*/, Unit const* /*pTarget*/, uint32 /*uiMiscValue1 = 0*/) const { switch (uiCriteriaId) { diff --git a/scripts/northrend/utgarde_keep/utgarde_keep/boss_ingvar.cpp b/scripts/northrend/utgarde_keep/utgarde_keep/boss_ingvar.cpp index 166db27eb..ac604b15c 100644 --- a/scripts/northrend/utgarde_keep/utgarde_keep/boss_ingvar.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_keep/boss_ingvar.cpp @@ -123,7 +123,7 @@ struct MANGOS_DLL_DECL boss_ingvarAI : public ScriptedAI DoScriptText(SAY_AGGRO_FIRST, m_creature); } - void DamageTaken(Unit* pDealer, uint32& uiDamage) override + void DamageTaken(Unit* /*pDealer*/, uint32& uiDamage) override { if (m_bIsResurrected) return; @@ -148,7 +148,7 @@ struct MANGOS_DLL_DECL boss_ingvarAI : public ScriptedAI } } - void SpellHit(Unit* pCaster, const SpellEntry* pSpell) override + void SpellHit(Unit* /*pCaster*/, const SpellEntry* pSpell) override { if (pSpell->Id == SPELL_TRANSFORM) { diff --git a/scripts/northrend/utgarde_keep/utgarde_keep/boss_keleseth.cpp b/scripts/northrend/utgarde_keep/utgarde_keep/boss_keleseth.cpp index 57fbac11e..0007b5459 100644 --- a/scripts/northrend/utgarde_keep/utgarde_keep/boss_keleseth.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_keep/boss_keleseth.cpp @@ -106,7 +106,7 @@ struct MANGOS_DLL_DECL mob_vrykul_skeletonAI : public ScriptedAI m_uiReviveTimer = 0; } - void DamageTaken(Unit* pDoneBy, uint32& uiDamage) override + void DamageTaken(Unit* /*pDoneBy*/, uint32& uiDamage) override { if (m_uiReviveTimer) { @@ -216,7 +216,7 @@ struct MANGOS_DLL_DECL boss_kelesethAI : public ScriptedAI } } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { DoScriptText(SAY_AGGRO, m_creature); diff --git a/scripts/northrend/utgarde_keep/utgarde_keep/boss_skarvald_and_dalronn.cpp b/scripts/northrend/utgarde_keep/utgarde_keep/boss_skarvald_and_dalronn.cpp index f6f6e6bf1..9a8f1b7e9 100644 --- a/scripts/northrend/utgarde_keep/utgarde_keep/boss_skarvald_and_dalronn.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_keep/boss_skarvald_and_dalronn.cpp @@ -183,7 +183,7 @@ struct MANGOS_DLL_DECL boss_skarvaldAI : public boss_s_and_d_dummyAI m_uiStoneStrikeTimer = 8000; } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { DoScriptText(m_aYell[0].m_iTextId, m_creature); m_uiYellDelayTimer = 5000; diff --git a/scripts/northrend/utgarde_keep/utgarde_keep/instance_utgarde_keep.cpp b/scripts/northrend/utgarde_keep/utgarde_keep/instance_utgarde_keep.cpp index 07864d901..e0ccaeb95 100644 --- a/scripts/northrend/utgarde_keep/utgarde_keep/instance_utgarde_keep.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_keep/instance_utgarde_keep.cpp @@ -158,7 +158,7 @@ void instance_utgarde_keep::Load(const char* chrIn) OUT_LOAD_INST_DATA_COMPLETE; } -bool instance_utgarde_keep::CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/) const +bool instance_utgarde_keep::CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* /*pSource*/, Unit const* /*pTarget*/, uint32 /*uiMiscValue1 = 0*/) const { if (uiCriteriaId == ACHIEV_CRIT_ON_THE_ROCKS) return !m_bKelesethAchievFailed; diff --git a/scripts/northrend/utgarde_keep/utgarde_keep/utgarde_keep.cpp b/scripts/northrend/utgarde_keep/utgarde_keep/utgarde_keep.cpp index f31b16c0a..d0fc507fa 100644 --- a/scripts/northrend/utgarde_keep/utgarde_keep/utgarde_keep.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_keep/utgarde_keep.cpp @@ -110,7 +110,7 @@ struct MANGOS_DLL_DECL mob_dragonflayer_forge_masterAI : public ScriptedAI } } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { SetMyForge(); } diff --git a/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_gortok.cpp b/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_gortok.cpp index 6b88c3cfe..58b0c7659 100644 --- a/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_gortok.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_gortok.cpp @@ -72,7 +72,7 @@ struct MANGOS_DLL_DECL boss_gortokAI : public ScriptedAI m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { DoScriptText(SAY_AGGRO, m_creature); } @@ -137,7 +137,7 @@ CreatureAI* GetAI_boss_gortok(Creature* pCreature) return new boss_gortokAI(pCreature); } -bool EffectDummyCreature_spell_awaken_gortok(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) +bool EffectDummyCreature_spell_awaken_gortok(Unit* /*pCaster*/, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) { // always check spellid and effectindex if (uiSpellId == SPELL_AWAKEN_GORTOK && uiEffIndex == EFFECT_INDEX_0) @@ -180,7 +180,7 @@ bool EffectAuraDummy_spell_aura_dummy_awaken_subboss(const Aura* pAura, bool bAp return true; } -bool ProcessEventId_event_spell_gortok_event(uint32 uiEventId, Object* pSource, Object* pTarget, bool bIsStart) +bool ProcessEventId_event_spell_gortok_event(uint32 /*uiEventId*/, Object* pSource, Object* /*pTarget*/, bool /*bIsStart*/) { if (instance_pinnacle* pInstance = (instance_pinnacle*)((Creature*)pSource)->GetInstanceData()) { diff --git a/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_skadi.cpp b/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_skadi.cpp index 54f9b153f..477853bd9 100644 --- a/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_skadi.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_skadi.cpp @@ -146,7 +146,7 @@ struct MANGOS_DLL_DECL boss_skadiAI : public ScriptedAI m_pInstance->SetData(TYPE_SKADI, NOT_STARTED); } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { if (m_pInstance) m_pInstance->SetData(TYPE_SKADI, IN_PROGRESS); @@ -170,7 +170,7 @@ struct MANGOS_DLL_DECL boss_skadiAI : public ScriptedAI m_pInstance->SetData(TYPE_SKADI, DONE); } - void SpellHit(Unit* pCaster, const SpellEntry* pSpell) override + void SpellHit(Unit* /*pCaster*/, const SpellEntry* pSpell) override { if (pSpell->Id == SPELL_SKADI_TELEPORT) { @@ -323,8 +323,8 @@ struct MANGOS_DLL_DECL npc_graufAI : public ScriptedAI m_uiFlightDelayTimer = 0; } - void AttackStart(Unit* pWho) override { } - void MoveInLineOfSight(Unit* pWho) override { } + void AttackStart(Unit* /*pWho*/) override { } + void MoveInLineOfSight(Unit* /*pWho*/) override { } void JustReachedHome() override { @@ -473,7 +473,7 @@ CreatureAI* GetAI_npc_grauf(Creature* pCreature) ## at_skadi ######*/ -bool AreaTrigger_at_skadi(Player* pPlayer, AreaTriggerEntry const* pAt) +bool AreaTrigger_at_skadi(Player* pPlayer, AreaTriggerEntry const* /*pAt*/) { if (pPlayer->isGameMaster()) return false; diff --git a/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_svala.cpp b/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_svala.cpp index d985a35fb..1db786472 100644 --- a/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_svala.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_svala.cpp @@ -152,7 +152,7 @@ struct MANGOS_DLL_DECL boss_svalaAI : public ScriptedAI ScriptedAI::MoveInLineOfSight(pWho); } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { m_creature->SetLevitate(false); DoScriptText(SAY_AGGRO, m_creature); @@ -182,7 +182,7 @@ struct MANGOS_DLL_DECL boss_svalaAI : public ScriptedAI pArthas = NULL; } - void SpellHit(Unit* pCaster, const SpellEntry* pSpell) override + void SpellHit(Unit* /*pCaster*/, const SpellEntry* pSpell) override { if (pSpell->Id == SPELL_TRANSFORMING) { @@ -341,7 +341,7 @@ CreatureAI* GetAI_boss_svala(Creature* pCreature) return new boss_svalaAI(pCreature); } -bool AreaTrigger_at_svala_intro(Player* pPlayer, AreaTriggerEntry const* pAt) +bool AreaTrigger_at_svala_intro(Player* pPlayer, AreaTriggerEntry const* /*pAt*/) { if (pPlayer->isGameMaster()) return false; diff --git a/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_ymiron.cpp b/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_ymiron.cpp index f5c1dcba7..7f7927a25 100644 --- a/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_ymiron.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_ymiron.cpp @@ -162,7 +162,7 @@ struct MANGOS_DLL_DECL boss_ymironAI : public ScriptedAI std::random_shuffle(m_vuiBoatPhases.begin(), m_vuiBoatPhases.end()); } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { DoScriptText(SAY_AGGRO, m_creature); @@ -406,7 +406,7 @@ CreatureAI* GetAI_boss_ymiron(Creature* pCreature) return new boss_ymironAI(pCreature); } -bool ProcessEventId_event_achiev_kings_bane(uint32 uiEventId, Object* pSource, Object* pTarget, bool bIsStart) +bool ProcessEventId_event_achiev_kings_bane(uint32 /*uiEventId*/, Object* pSource, Object* /*pTarget*/, bool /*bIsStart*/) { if (instance_pinnacle* pInstance = (instance_pinnacle*)((Creature*)pSource)->GetInstanceData()) { diff --git a/scripts/northrend/utgarde_keep/utgarde_pinnacle/instance_utgarde_pinnacle.cpp b/scripts/northrend/utgarde_keep/utgarde_pinnacle/instance_utgarde_pinnacle.cpp index 1cf540de0..0d6d55ebd 100644 --- a/scripts/northrend/utgarde_keep/utgarde_pinnacle/instance_utgarde_pinnacle.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_pinnacle/instance_utgarde_pinnacle.cpp @@ -246,7 +246,7 @@ void instance_pinnacle::SetSpecialAchievementCriteria(uint32 uiType, bool bIsMet m_abAchievCriteria[uiType] = bIsMet; } -bool instance_pinnacle::CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/) const +bool instance_pinnacle::CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* /*pSource*/, Unit const* /*pTarget*/, uint32 /*uiMiscValue1 = 0*/) const { switch (uiCriteriaId) { diff --git a/scripts/northrend/violet_hold/boss_erekem.cpp b/scripts/northrend/violet_hold/boss_erekem.cpp index e6faafca6..f870bf0c5 100644 --- a/scripts/northrend/violet_hold/boss_erekem.cpp +++ b/scripts/northrend/violet_hold/boss_erekem.cpp @@ -81,7 +81,7 @@ struct MANGOS_DLL_DECL boss_erekemAI : public ScriptedAI m_uiGuardiansDead = 0; } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { DoScriptText(SAY_AGGRO, m_creature); } diff --git a/scripts/northrend/violet_hold/boss_ichoron.cpp b/scripts/northrend/violet_hold/boss_ichoron.cpp index bb4834e15..54c5c4d90 100644 --- a/scripts/northrend/violet_hold/boss_ichoron.cpp +++ b/scripts/northrend/violet_hold/boss_ichoron.cpp @@ -83,7 +83,7 @@ struct MANGOS_DLL_DECL boss_ichoronAI : public ScriptedAI m_bIsFrenzy = false; } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { DoScriptText(SAY_AGGRO, m_creature); diff --git a/scripts/northrend/violet_hold/instance_violet_hold.cpp b/scripts/northrend/violet_hold/instance_violet_hold.cpp index fc540904c..6294a6222 100644 --- a/scripts/northrend/violet_hold/instance_violet_hold.cpp +++ b/scripts/northrend/violet_hold/instance_violet_hold.cpp @@ -212,7 +212,7 @@ void instance_violet_hold::UpdateWorldState(bool bEnable) DoUpdateWorldState(WORLD_STATE_PORTALS, m_uiWorldStatePortalCount); } -void instance_violet_hold::OnPlayerEnter(Player* pPlayer) +void instance_violet_hold::OnPlayerEnter(Player* /*pPlayer*/) { UpdateWorldState(m_auiEncounter[TYPE_MAIN] == IN_PROGRESS ? true : false); @@ -521,7 +521,7 @@ void instance_violet_hold::ProcessActivationCrystal(Unit* pUser, bool bIsIntro) // else, kill (and despawn?) certain trash mobs. Also boss affected, but not killed. } -bool instance_violet_hold::CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/) const +bool instance_violet_hold::CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* /*pSource*/, Unit const* /*pTarget*/, uint32 /*uiMiscValue1 = 0*/) const { switch (uiCriteriaId) { diff --git a/scripts/northrend/violet_hold/violet_hold.cpp b/scripts/northrend/violet_hold/violet_hold.cpp index b0427673a..557385c46 100644 --- a/scripts/northrend/violet_hold/violet_hold.cpp +++ b/scripts/northrend/violet_hold/violet_hold.cpp @@ -49,7 +49,7 @@ bool GOUse_go_activation_crystal(Player* pPlayer, GameObject* pGo) ## npc_door_seal ######*/ -bool EffectDummyCreature_npc_door_seal(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) +bool EffectDummyCreature_npc_door_seal(Unit* /*pCaster*/, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) { // always check spellid and effectindex if (uiSpellId == SPELL_DESTROY_DOOR_SEAL && uiEffIndex == EFFECT_INDEX_0) @@ -143,7 +143,7 @@ struct MANGOS_DLL_DECL npc_sinclariAI : public npc_escortAI npc_escortAI::JustRespawned(); // Needed, to reset escort state, waypoints, etc } - void UpdateEscortAI(const uint32 uiDiff) override + void UpdateEscortAI(const uint32 /*uiDiff*/) override { // Say outro after event is finished if (m_pInstance && m_pInstance->GetData(TYPE_MAIN) == DONE && !m_bIsEpilogue) @@ -173,7 +173,7 @@ bool GossipHello_npc_sinclari(Player* pPlayer, Creature* pCreature) return true; } -bool GossipSelect_npc_sinclari(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +bool GossipSelect_npc_sinclari(Player* pPlayer, Creature* pCreature, uint32 /*uiSender*/, uint32 uiAction) { if (uiAction == GOSSIP_ACTION_INFO_DEF + 1) { @@ -583,7 +583,7 @@ CreatureAI* GetAI_npc_teleportation_portal(Creature* pCreature) return new npc_teleportation_portalAI(pCreature); } -bool EffectDummyCreature_npc_teleportation_portal(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) +bool EffectDummyCreature_npc_teleportation_portal(Unit* /*pCaster*/, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) { // always check spellid and effectindex if (uiSpellId == SPELL_PORTAL_PERIODIC && uiEffIndex == EFFECT_INDEX_0) diff --git a/scripts/outland/auchindoun/auchenai_crypts/boss_exarch_maladaar.cpp b/scripts/outland/auchindoun/auchenai_crypts/boss_exarch_maladaar.cpp index b1466f472..8e0dabc19 100644 --- a/scripts/outland/auchindoun/auchenai_crypts/boss_exarch_maladaar.cpp +++ b/scripts/outland/auchindoun/auchenai_crypts/boss_exarch_maladaar.cpp @@ -197,7 +197,7 @@ struct MANGOS_DLL_DECL boss_exarch_maladaarAI : public ScriptedAI ScriptedAI::MoveInLineOfSight(pWho); } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { switch (urand(0, 2)) { diff --git a/scripts/outland/auchindoun/mana_tombs/boss_nexusprince_shaffar.cpp b/scripts/outland/auchindoun/mana_tombs/boss_nexusprince_shaffar.cpp index d6839ac8f..190d43e14 100644 --- a/scripts/outland/auchindoun/mana_tombs/boss_nexusprince_shaffar.cpp +++ b/scripts/outland/auchindoun/mana_tombs/boss_nexusprince_shaffar.cpp @@ -84,7 +84,7 @@ struct MANGOS_DLL_DECL boss_nexusprince_shaffarAI : public ScriptedAI ScriptedAI::MoveInLineOfSight(pWho); } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { switch (urand(0, 2)) { diff --git a/scripts/outland/auchindoun/mana_tombs/boss_pandemonius.cpp b/scripts/outland/auchindoun/mana_tombs/boss_pandemonius.cpp index 572639bc9..f943993b3 100644 --- a/scripts/outland/auchindoun/mana_tombs/boss_pandemonius.cpp +++ b/scripts/outland/auchindoun/mana_tombs/boss_pandemonius.cpp @@ -72,7 +72,7 @@ struct MANGOS_DLL_DECL boss_pandemoniusAI : public ScriptedAI DoScriptText(urand(0, 1) ? SAY_KILL_1 : SAY_KILL_2, m_creature); } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { switch (urand(0, 2)) { diff --git a/scripts/outland/auchindoun/sethekk_halls/boss_anzu.cpp b/scripts/outland/auchindoun/sethekk_halls/boss_anzu.cpp index 593424a8b..caae48e96 100644 --- a/scripts/outland/auchindoun/sethekk_halls/boss_anzu.cpp +++ b/scripts/outland/auchindoun/sethekk_halls/boss_anzu.cpp @@ -77,7 +77,7 @@ struct MANGOS_DLL_DECL boss_anzuAI : public ScriptedAI m_fHealthCheck = 75.0f; } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { // Note: this should be moved to the intro event when implemented! DoSummonBirdHelpers(); diff --git a/scripts/outland/auchindoun/sethekk_halls/boss_darkweaver_syth.cpp b/scripts/outland/auchindoun/sethekk_halls/boss_darkweaver_syth.cpp index 10c0fa655..9a45b455c 100644 --- a/scripts/outland/auchindoun/sethekk_halls/boss_darkweaver_syth.cpp +++ b/scripts/outland/auchindoun/sethekk_halls/boss_darkweaver_syth.cpp @@ -85,7 +85,7 @@ struct MANGOS_DLL_DECL boss_darkweaver_sythAI : public ScriptedAI m_fHpCheck = 90.0f; } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { switch (urand(0, 2)) { diff --git a/scripts/outland/auchindoun/sethekk_halls/boss_talon_king_ikiss.cpp b/scripts/outland/auchindoun/sethekk_halls/boss_talon_king_ikiss.cpp index b03c91361..ffae43d0f 100644 --- a/scripts/outland/auchindoun/sethekk_halls/boss_talon_king_ikiss.cpp +++ b/scripts/outland/auchindoun/sethekk_halls/boss_talon_king_ikiss.cpp @@ -99,7 +99,7 @@ struct MANGOS_DLL_DECL boss_talon_king_ikissAI : public ScriptedAI ScriptedAI::MoveInLineOfSight(pWho); } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { switch (urand(0, 2)) { @@ -126,7 +126,7 @@ struct MANGOS_DLL_DECL boss_talon_king_ikissAI : public ScriptedAI m_pInstance->SetData(TYPE_IKISS, FAIL); } - void KilledUnit(Unit* pVctim) override + void KilledUnit(Unit* /*pVctim*/) override { DoScriptText(urand(0, 1) ? SAY_SLAY_1 : SAY_SLAY_2, m_creature); } diff --git a/scripts/outland/auchindoun/sethekk_halls/instance_sethekk_halls.cpp b/scripts/outland/auchindoun/sethekk_halls/instance_sethekk_halls.cpp index 7f10c4aab..0eba1aba4 100644 --- a/scripts/outland/auchindoun/sethekk_halls/instance_sethekk_halls.cpp +++ b/scripts/outland/auchindoun/sethekk_halls/instance_sethekk_halls.cpp @@ -133,7 +133,7 @@ void instance_sethekk_halls::Load(const char* chrIn) OUT_LOAD_INST_DATA_COMPLETE; } -bool instance_sethekk_halls::CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/) const +bool instance_sethekk_halls::CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* /*pTarget*/, uint32 /*uiMiscValue1 = 0*/) const { if (uiCriteriaId != ACHIEV_CRITA_TURKEY_TIME) return false; @@ -150,7 +150,7 @@ InstanceData* GetInstanceData_instance_sethekk_halls(Map* pMap) return new instance_sethekk_halls(pMap); } -bool ProcessEventId_event_spell_summon_raven_god(uint32 uiEventId, Object* pSource, Object* pTarget, bool bIsStart) +bool ProcessEventId_event_spell_summon_raven_god(uint32 /*uiEventId*/, Object* pSource, Object* /*pTarget*/, bool bIsStart) { if (bIsStart && pSource->GetTypeId() == TYPEID_PLAYER) { diff --git a/scripts/outland/auchindoun/shadow_labyrinth/boss_ambassador_hellmaw.cpp b/scripts/outland/auchindoun/shadow_labyrinth/boss_ambassador_hellmaw.cpp index aa424cd76..57d73292d 100644 --- a/scripts/outland/auchindoun/shadow_labyrinth/boss_ambassador_hellmaw.cpp +++ b/scripts/outland/auchindoun/shadow_labyrinth/boss_ambassador_hellmaw.cpp @@ -78,7 +78,7 @@ struct MANGOS_DLL_DECL boss_ambassador_hellmawAI : public ScriptedAI m_pInstance->SetData(TYPE_HELLMAW, FAIL); } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { switch (urand(0, 2)) { diff --git a/scripts/outland/auchindoun/shadow_labyrinth/boss_blackheart_the_inciter.cpp b/scripts/outland/auchindoun/shadow_labyrinth/boss_blackheart_the_inciter.cpp index 31cdbaf14..59b63032e 100644 --- a/scripts/outland/auchindoun/shadow_labyrinth/boss_blackheart_the_inciter.cpp +++ b/scripts/outland/auchindoun/shadow_labyrinth/boss_blackheart_the_inciter.cpp @@ -87,7 +87,7 @@ struct MANGOS_DLL_DECL boss_blackheart_the_inciterAI : public ScriptedAI m_pInstance->SetData(TYPE_INCITER, DONE); } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { switch (urand(0, 2)) { diff --git a/scripts/outland/auchindoun/shadow_labyrinth/boss_grandmaster_vorpil.cpp b/scripts/outland/auchindoun/shadow_labyrinth/boss_grandmaster_vorpil.cpp index 4c364618e..f27f3f9c2 100644 --- a/scripts/outland/auchindoun/shadow_labyrinth/boss_grandmaster_vorpil.cpp +++ b/scripts/outland/auchindoun/shadow_labyrinth/boss_grandmaster_vorpil.cpp @@ -118,7 +118,7 @@ struct MANGOS_DLL_DECL boss_grandmaster_vorpilAI : public ScriptedAI ScriptedAI::MoveInLineOfSight(pWho); } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { switch (urand(0, 2)) { @@ -289,7 +289,7 @@ struct MANGOS_DLL_DECL npc_void_travelerAI : public ScriptedAI } } - void AttackStart(Unit* pWho) override { } + void AttackStart(Unit* /*pWho*/) override { } void UpdateAI(const uint32 uiDiff) override { diff --git a/scripts/outland/black_temple/black_temple.cpp b/scripts/outland/black_temple/black_temple.cpp index b739f4a7b..3e61b0820 100644 --- a/scripts/outland/black_temple/black_temple.cpp +++ b/scripts/outland/black_temple/black_temple.cpp @@ -46,7 +46,7 @@ bool GossipHello_npc_spirit_of_olum(Player* pPlayer, Creature* pCreature) return true; } -bool GossipSelect_npc_spirit_of_olum(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +bool GossipSelect_npc_spirit_of_olum(Player* pPlayer, Creature* /*pCreature*/, uint32 /*uiSender*/, uint32 uiAction) { if (uiAction == GOSSIP_ACTION_INFO_DEF + 1) pPlayer->CLOSE_GOSSIP_MENU(); diff --git a/scripts/outland/black_temple/boss_bloodboil.cpp b/scripts/outland/black_temple/boss_bloodboil.cpp index 42df81cc8..3e0a671f1 100644 --- a/scripts/outland/black_temple/boss_bloodboil.cpp +++ b/scripts/outland/black_temple/boss_bloodboil.cpp @@ -111,7 +111,7 @@ struct MANGOS_DLL_DECL boss_gurtogg_bloodboilAI : public ScriptedAI m_pInstance->SetData(TYPE_BLOODBOIL, FAIL); } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { DoScriptText(SAY_AGGRO, m_creature); diff --git a/scripts/outland/black_temple/boss_illidan.cpp b/scripts/outland/black_temple/boss_illidan.cpp index 970fb297c..f013970af 100644 --- a/scripts/outland/black_temple/boss_illidan.cpp +++ b/scripts/outland/black_temple/boss_illidan.cpp @@ -396,14 +396,14 @@ struct MANGOS_DLL_DECL boss_illidan_stormrageAI : public ScriptedAI, private Dia reader.PSendSysMessage("Boss Illidan, current uiPhase = %u", m_uiPhase); } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { if (m_pInstance) m_pInstance->SetData(TYPE_ILLIDAN, IN_PROGRESS); } // Do not attack using LoS function. The attack is triggered in script - void MoveInLineOfSight(Unit* pWho) override { } + void MoveInLineOfSight(Unit* /*pWho*/) override { } void JustReachedHome() override { @@ -427,7 +427,7 @@ struct MANGOS_DLL_DECL boss_illidan_stormrageAI : public ScriptedAI, private Dia DoScriptText(urand(0, 1) ? SAY_KILL1 : SAY_KILL2, m_creature); } - void DamageTaken(Unit* pDealer, uint32& uiDamage) override + void DamageTaken(Unit* /*pDealer*/, uint32& uiDamage) override { if (uiDamage < m_creature->GetHealth()) return; @@ -1270,7 +1270,7 @@ bool GossipHello_npc_akama_illidan(Player* pPlayer, Creature* pCreature) return true; } -bool GossipSelect_npc_akama_illidan(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +bool GossipSelect_npc_akama_illidan(Player* pPlayer, Creature* pCreature, uint32 /*uiSender*/, uint32 uiAction) { if (uiAction == GOSSIP_ACTION_INFO_DEF + 1 || GOSSIP_ACTION_INFO_DEF + 2) { @@ -1337,7 +1337,7 @@ struct MANGOS_DLL_DECL boss_maievAI : public ScriptedAI, private DialogueHelper } // Attack only by script - void MoveInLineOfSight(Unit* pWho) override { } + void MoveInLineOfSight(Unit* /*pWho*/) override { } void JustDidDialogueStep(int32 iEntry) override { @@ -1357,7 +1357,7 @@ struct MANGOS_DLL_DECL boss_maievAI : public ScriptedAI, private DialogueHelper } } - void SpellHit(Unit* pCaster, const SpellEntry* pSpell) override + void SpellHit(Unit* /*pCaster*/, const SpellEntry* pSpell) override { if (pSpell->Id == SPELL_CAGE_TRAP) { @@ -1426,7 +1426,7 @@ struct MANGOS_DLL_DECL npc_cage_trap_triggerAI : public ScriptedAI m_bActive = false; } - void AttackStart(Unit* pWho) override { } + void AttackStart(Unit* /*pWho*/) override { } void MoveInLineOfSight(Unit* pWho) override { @@ -1449,7 +1449,7 @@ struct MANGOS_DLL_DECL npc_cage_trap_triggerAI : public ScriptedAI } } - void UpdateAI(const uint32 uiDiff) override { } + void UpdateAI(const uint32 /*uiDiff*/) override { } }; /*###### @@ -1577,7 +1577,7 @@ struct MANGOS_DLL_DECL npc_shadow_demonAI : public ScriptedAI m_targetGuid = pWho->GetObjectGuid(); } - void MoveInLineOfSight(Unit* pWho) override { } + void MoveInLineOfSight(Unit* /*pWho*/) override { } void JustDied(Unit* /*pKiller*/) override { @@ -1597,7 +1597,7 @@ struct MANGOS_DLL_DECL npc_shadow_demonAI : public ScriptedAI } } - void UpdateAI(const uint32 uiDiff) override { } + void UpdateAI(const uint32 /*uiDiff*/) override { } }; /*###### @@ -1617,8 +1617,8 @@ struct MANGOS_DLL_DECL npc_blade_of_azzinothAI : public ScriptedAI void Reset() override {} // Do-Nothing-But-Stand-There - void AttackStart(Unit* pWho) override { } - void MoveInLineOfSight(Unit* pWho) override { } + void AttackStart(Unit* /*pWho*/) override { } + void MoveInLineOfSight(Unit* /*pWho*/) override { } void JustSummoned(Creature* pSummoned) override { @@ -1647,7 +1647,7 @@ struct MANGOS_DLL_DECL npc_blade_of_azzinothAI : public ScriptedAI } } - void UpdateAI(const uint32 uiDiff) override { } + void UpdateAI(const uint32 /*uiDiff*/) override { } }; CreatureAI* GetAI_boss_illidan_stormrage(Creature* pCreature) diff --git a/scripts/outland/black_temple/boss_mother_shahraz.cpp b/scripts/outland/black_temple/boss_mother_shahraz.cpp index 2c7affd37..875e38776 100644 --- a/scripts/outland/black_temple/boss_mother_shahraz.cpp +++ b/scripts/outland/black_temple/boss_mother_shahraz.cpp @@ -99,7 +99,7 @@ struct MANGOS_DLL_DECL boss_shahrazAI : public ScriptedAI // DoCastSpellIfCan(m_creature, SPELL_SABER_LASH_PROC); } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { if (m_pInstance) m_pInstance->SetData(TYPE_SHAHRAZ, IN_PROGRESS); diff --git a/scripts/outland/black_temple/boss_reliquary_of_souls.cpp b/scripts/outland/black_temple/boss_reliquary_of_souls.cpp index b1296d37c..b4a3e5198 100644 --- a/scripts/outland/black_temple/boss_reliquary_of_souls.cpp +++ b/scripts/outland/black_temple/boss_reliquary_of_souls.cpp @@ -151,7 +151,7 @@ struct MANGOS_DLL_DECL boss_reliquary_of_soulsAI : public Scripted_NoMovementAI m_pInstance->SetData(TYPE_RELIQUIARY, FAIL); } - void AttackStart(Unit* pWho) override { } + void AttackStart(Unit* /*pWho*/) override { } void MoveInLineOfSight(Unit* pWho) override { @@ -347,7 +347,7 @@ struct MANGOS_DLL_DECL essence_base_AI : public ScriptedAI m_creature->ForcedDespawn(); } - void DamageTaken(Unit* pKiller, uint32& uiDamage) override + void DamageTaken(Unit* /*pKiller*/, uint32& uiDamage) override { if (uiDamage < m_creature->GetHealth()) return; @@ -647,7 +647,7 @@ struct MANGOS_DLL_DECL npc_enslaved_soulAI : public ScriptedAI m_creature->ForcedDespawn(); } - void UpdateAI(const uint32 uiDiff) override + void UpdateAI(const uint32 /*uiDiff*/) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/outland/black_temple/boss_shade_of_akama.cpp b/scripts/outland/black_temple/boss_shade_of_akama.cpp index ec5cb8717..8481cec8a 100644 --- a/scripts/outland/black_temple/boss_shade_of_akama.cpp +++ b/scripts/outland/black_temple/boss_shade_of_akama.cpp @@ -498,7 +498,7 @@ bool GossipHello_npc_akama(Player* pPlayer, Creature* pCreature) return true; } -bool GossipSelect_npc_akama(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +bool GossipSelect_npc_akama(Player* pPlayer, Creature* pCreature, uint32 /*uiSender*/, uint32 uiAction) { if (uiAction == GOSSIP_ACTION_INFO_DEF + 1) // Fight time { @@ -576,7 +576,7 @@ struct MANGOS_DLL_DECL boss_shade_of_akamaAI : public ScriptedAI } } - void UpdateAI(const uint32 uiDiff) override + void UpdateAI(const uint32 /*uiDiff*/) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -618,8 +618,8 @@ struct MANGOS_DLL_DECL mob_ashtongue_channelerAI : public ScriptedAI pAkama->AI()->KilledUnit(m_creature); } - void AttackStart(Unit* pWho) override {} - void MoveInLineOfSight(Unit* pWho) override {} + void AttackStart(Unit* /*pWho*/) override {} + void MoveInLineOfSight(Unit* /*pWho*/) override {} void UpdateAI(const uint32 uiDiff) override { @@ -652,8 +652,8 @@ struct MANGOS_DLL_DECL mob_ashtongue_sorcererAI : public ScriptedAI void Reset() override {} - void AttackStart(Unit* pWho) override {} - void MoveInLineOfSight(Unit* pWho) override {} + void AttackStart(Unit* /*pWho*/) override {} + void MoveInLineOfSight(Unit* /*pWho*/) override {} void JustDied(Unit* /*pKiller*/) override { @@ -678,7 +678,7 @@ struct MANGOS_DLL_DECL mob_ashtongue_sorcererAI : public ScriptedAI } } - void UpdateAI(const uint32 uiDiff) override {} + void UpdateAI(const uint32 /*uiDiff*/) override {} }; CreatureAI* GetAI_npc_akama_shade(Creature* pCreature) diff --git a/scripts/outland/black_temple/boss_supremus.cpp b/scripts/outland/black_temple/boss_supremus.cpp index 58071317c..2de77e797 100644 --- a/scripts/outland/black_temple/boss_supremus.cpp +++ b/scripts/outland/black_temple/boss_supremus.cpp @@ -65,9 +65,9 @@ struct MANGOS_DLL_DECL molten_flameAI : public Scripted_NoMovementAI molten_flameAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { Reset(); } void Reset() override {} - void AttackStart(Unit* pWho) override {} - void MoveInLineOfSight(Unit* pWho) override {} - void UpdateAI(const uint32 uiDiff) override {} + void AttackStart(Unit* /*pWho*/) override {} + void MoveInLineOfSight(Unit* /*pWho*/) override {} + void UpdateAI(const uint32 /*uiDiff*/) override {} }; // TODO Remove this 'script' when combat movement can be proper prevented from core-side @@ -76,9 +76,9 @@ struct MANGOS_DLL_DECL npc_volcanoAI : public Scripted_NoMovementAI npc_volcanoAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { Reset(); } void Reset() override {} - void AttackStart(Unit* pWho) override {} - void MoveInLineOfSight(Unit* pWho) override {} - void UpdateAI(const uint32 uiDiff) override {} + void AttackStart(Unit* /*pWho*/) override {} + void MoveInLineOfSight(Unit* /*pWho*/) override {} + void UpdateAI(const uint32 /*uiDiff*/) override {} }; struct MANGOS_DLL_DECL boss_supremusAI : public ScriptedAI @@ -120,7 +120,7 @@ struct MANGOS_DLL_DECL boss_supremusAI : public ScriptedAI m_pInstance->SetData(TYPE_SUPREMUS, NOT_STARTED); } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { if (m_pInstance) m_pInstance->SetData(TYPE_SUPREMUS, IN_PROGRESS); diff --git a/scripts/outland/black_temple/boss_teron_gorefiend.cpp b/scripts/outland/black_temple/boss_teron_gorefiend.cpp index 5aeaf351a..caa03e7c8 100644 --- a/scripts/outland/black_temple/boss_teron_gorefiend.cpp +++ b/scripts/outland/black_temple/boss_teron_gorefiend.cpp @@ -95,7 +95,7 @@ struct MANGOS_DLL_DECL boss_teron_gorefiendAI : public ScriptedAI m_pInstance->SetData(TYPE_GOREFIEND, FAIL); } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { DoScriptText(SAY_AGGRO, m_creature); diff --git a/scripts/outland/black_temple/boss_warlord_najentus.cpp b/scripts/outland/black_temple/boss_warlord_najentus.cpp index 9c3b8b95a..c986b411f 100644 --- a/scripts/outland/black_temple/boss_warlord_najentus.cpp +++ b/scripts/outland/black_temple/boss_warlord_najentus.cpp @@ -97,7 +97,7 @@ struct MANGOS_DLL_DECL boss_najentusAI : public ScriptedAI DoScriptText(SAY_DEATH, m_creature); } - void SpellHit(Unit* pCaster, const SpellEntry* pSpell) override + void SpellHit(Unit* /*pCaster*/, const SpellEntry* pSpell) override { if (m_bIsShielded && pSpell->Id == SPELL_HURL_SPINE) { @@ -113,7 +113,7 @@ struct MANGOS_DLL_DECL boss_najentusAI : public ScriptedAI } } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { if (m_pInstance) m_pInstance->SetData(TYPE_NAJENTUS, IN_PROGRESS); diff --git a/scripts/outland/black_temple/illidari_council.cpp b/scripts/outland/black_temple/illidari_council.cpp index a9a42c15b..b5a9ec95e 100644 --- a/scripts/outland/black_temple/illidari_council.cpp +++ b/scripts/outland/black_temple/illidari_council.cpp @@ -275,7 +275,7 @@ struct MANGOS_DLL_DECL boss_illidari_councilAI : public ScriptedAI ScriptedInstance* m_pInstance; - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { if (m_pInstance) { diff --git a/scripts/outland/black_temple/instance_black_temple.cpp b/scripts/outland/black_temple/instance_black_temple.cpp index 4c195c77f..f5e7d97fa 100644 --- a/scripts/outland/black_temple/instance_black_temple.cpp +++ b/scripts/outland/black_temple/instance_black_temple.cpp @@ -46,7 +46,7 @@ void instance_black_temple::Initialize() memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); } -void instance_black_temple::OnPlayerEnter(Player* pPlayer) +void instance_black_temple::OnPlayerEnter(Player* /*pPlayer*/) { DoSpawnAkamaIfCan(); } diff --git a/scripts/outland/blades_edge_mountains.cpp b/scripts/outland/blades_edge_mountains.cpp index 7864fed50..9fd06bdf8 100644 --- a/scripts/outland/blades_edge_mountains.cpp +++ b/scripts/outland/blades_edge_mountains.cpp @@ -40,7 +40,7 @@ struct MANGOS_DLL_DECL mobs_bladespire_ogreAI : public ScriptedAI void Reset() override { } - void UpdateAI(const uint32 uiDiff) override + void UpdateAI(const uint32 /*uiDiff*/) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/outland/boss_doomlord_kazzak.cpp b/scripts/outland/boss_doomlord_kazzak.cpp index 84c542ad7..af1ba568f 100644 --- a/scripts/outland/boss_doomlord_kazzak.cpp +++ b/scripts/outland/boss_doomlord_kazzak.cpp @@ -79,7 +79,7 @@ struct MANGOS_DLL_DECL boss_doomlordkazzakAI : public ScriptedAI DoScriptText(SAY_INTRO, m_creature); } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { DoScriptText(urand(0, 1) ? SAY_AGGRO1 : SAY_AGGRO2, m_creature); DoCastSpellIfCan(m_creature, SPELL_CAPTURE_SOUL, CAST_TRIGGERED); diff --git a/scripts/outland/boss_doomwalker.cpp b/scripts/outland/boss_doomwalker.cpp index fc58d1471..de57edf16 100644 --- a/scripts/outland/boss_doomwalker.cpp +++ b/scripts/outland/boss_doomwalker.cpp @@ -88,7 +88,7 @@ struct MANGOS_DLL_DECL boss_doomwalkerAI : public ScriptedAI DoScriptText(SAY_DEATH, m_creature); } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { DoCastSpellIfCan(m_creature, SPELL_MARK_OF_DEATH_AURA, CAST_TRIGGERED); DoScriptText(SAY_AGGRO, m_creature); diff --git a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_fathomlord_karathress.cpp b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_fathomlord_karathress.cpp index 030746745..1ed3eb2a9 100644 --- a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_fathomlord_karathress.cpp +++ b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_fathomlord_karathress.cpp @@ -107,7 +107,7 @@ struct MANGOS_DLL_DECL boss_fathomlord_karathressAI : public ScriptedAI m_bBlessingOfTides = false; } - void SpellHit(Unit* pCaster, const SpellEntry* pSpell) override + void SpellHit(Unit* /*pCaster*/, const SpellEntry* pSpell) override { switch (pSpell->Id) { @@ -123,7 +123,7 @@ struct MANGOS_DLL_DECL boss_fathomlord_karathressAI : public ScriptedAI } } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { if (m_pInstance) m_pInstance->SetData(TYPE_KARATHRESS_EVENT, IN_PROGRESS); diff --git a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_hydross_the_unstable.cpp b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_hydross_the_unstable.cpp index 23e714ea4..d7f577b99 100644 --- a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_hydross_the_unstable.cpp +++ b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_hydross_the_unstable.cpp @@ -102,7 +102,7 @@ struct MANGOS_DLL_DECL boss_hydross_the_unstableAI : public ScriptedAI m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_NATURE, false); } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { DoScriptText(SAY_AGGRO, m_creature); diff --git a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_lady_vashj.cpp b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_lady_vashj.cpp index 363b26b0d..9bddd235d 100644 --- a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_lady_vashj.cpp +++ b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_lady_vashj.cpp @@ -155,7 +155,7 @@ struct MANGOS_DLL_DECL boss_lady_vashjAI : public ScriptedAI m_uiSummonSporebatStaticTimer = 30000; } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { switch (urand(0, 3)) { @@ -463,11 +463,11 @@ struct MANGOS_DLL_DECL mob_enchanted_elementalAI : public ScriptedAI DoCastSpellIfCan(m_creature, SPELL_SURGE, CAST_TRIGGERED); } - void AttackStart(Unit* pWho) override { } - void UpdateAI(const uint32 uiDiff) override { } + void AttackStart(Unit* /*pWho*/) override { } + void UpdateAI(const uint32 /*uiDiff*/) override { } }; -bool GOUse_go_shield_generator(Player* pPlayer, GameObject* pGo) +bool GOUse_go_shield_generator(Player* /*pPlayer*/, GameObject* pGo) { // Interrupt Magic barrier spell casting, inform the boss and make the GO unusable if (ScriptedInstance* pInstance = (ScriptedInstance*)pGo->GetInstanceData()) diff --git a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_leotheras_the_blind.cpp b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_leotheras_the_blind.cpp index aaf1b5535..25a86aa51 100644 --- a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_leotheras_the_blind.cpp +++ b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_leotheras_the_blind.cpp @@ -100,7 +100,7 @@ struct MANGOS_DLL_DECL boss_leotheras_the_blindAI : public ScriptedAI SetCombatMovement(true); } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { DoScriptText(SAY_AGGRO, m_creature); diff --git a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_morogrim_tidewalker.cpp b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_morogrim_tidewalker.cpp index a91e91928..7a525433b 100644 --- a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_morogrim_tidewalker.cpp +++ b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_morogrim_tidewalker.cpp @@ -101,7 +101,7 @@ struct MANGOS_DLL_DECL boss_morogrim_tidewalkerAI : public ScriptedAI DoCastSpellIfCan(m_creature, SPELL_DOUBLE_ATTACK); } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { DoScriptText(SAY_AGGRO, m_creature); @@ -251,7 +251,7 @@ struct MANGOS_DLL_DECL mob_water_globuleAI : public ScriptedAI m_uiTargetTimer = 10000; } - void MoveInLineOfSight(Unit* pWho) override + void MoveInLineOfSight(Unit* /*pWho*/) override { // ToDo: cast damage spell here, after proper checks are done } diff --git a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_the_lurker_below.cpp b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_the_lurker_below.cpp index de9ff6671..413eb608b 100644 --- a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_the_lurker_below.cpp +++ b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_the_lurker_below.cpp @@ -113,7 +113,7 @@ struct MANGOS_DLL_DECL boss_the_lurker_belowAI : public Scripted_NoMovementAI m_creature->ForcedDespawn(); } - void JustDied(Unit* pVictim) override + void JustDied(Unit* /*pVictim*/) override { if (m_pInstance) m_pInstance->SetData(TYPE_THELURKER_EVENT, DONE); diff --git a/scripts/outland/coilfang_reservoir/steam_vault/boss_hydromancer_thespia.cpp b/scripts/outland/coilfang_reservoir/steam_vault/boss_hydromancer_thespia.cpp index af91fe6c9..1e4729e41 100644 --- a/scripts/outland/coilfang_reservoir/steam_vault/boss_hydromancer_thespia.cpp +++ b/scripts/outland/coilfang_reservoir/steam_vault/boss_hydromancer_thespia.cpp @@ -88,7 +88,7 @@ struct MANGOS_DLL_DECL boss_thespiaAI : public ScriptedAI DoScriptText(urand(0, 1) ? SAY_SLAY_1 : SAY_SLAY_2, m_creature); } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { switch (urand(0, 2)) { diff --git a/scripts/outland/coilfang_reservoir/steam_vault/boss_mekgineer_steamrigger.cpp b/scripts/outland/coilfang_reservoir/steam_vault/boss_mekgineer_steamrigger.cpp index e72d0958c..2bbecbe66 100644 --- a/scripts/outland/coilfang_reservoir/steam_vault/boss_mekgineer_steamrigger.cpp +++ b/scripts/outland/coilfang_reservoir/steam_vault/boss_mekgineer_steamrigger.cpp @@ -118,7 +118,7 @@ struct MANGOS_DLL_DECL boss_mekgineer_steamriggerAI : public ScriptedAI } } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { switch (urand(0, 2)) { @@ -261,7 +261,7 @@ struct MANGOS_DLL_DECL mob_steamrigger_mechanicAI : public ScriptedAI } } - void UpdateAI(const uint32 uiDiff) override + void UpdateAI(const uint32 /*uiDiff*/) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/outland/coilfang_reservoir/steam_vault/boss_warlord_kalithresh.cpp b/scripts/outland/coilfang_reservoir/steam_vault/boss_warlord_kalithresh.cpp index 5af76fea2..f44f19f0f 100644 --- a/scripts/outland/coilfang_reservoir/steam_vault/boss_warlord_kalithresh.cpp +++ b/scripts/outland/coilfang_reservoir/steam_vault/boss_warlord_kalithresh.cpp @@ -76,7 +76,7 @@ struct MANGOS_DLL_DECL boss_warlord_kalithreshAI : public ScriptedAI m_pInstance->SetData(TYPE_WARLORD_KALITHRESH, FAIL); } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { switch (urand(0, 2)) { @@ -231,9 +231,9 @@ struct MANGOS_DLL_DECL mob_naga_distillerAI : public Scripted_NoMovementAI m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); } - void MoveInLineOfSight(Unit* pWho) override { } - void AttackStart(Unit* pWho) override { } - void UpdateAI(const uint32 uiDiff) override { } + void MoveInLineOfSight(Unit* /*pWho*/) override { } + void AttackStart(Unit* /*pWho*/) override { } + void UpdateAI(const uint32 /*uiDiff*/) override { } }; CreatureAI* GetAI_boss_warlord_kalithresh(Creature* pCreature) diff --git a/scripts/outland/coilfang_reservoir/steam_vault/instance_steam_vault.cpp b/scripts/outland/coilfang_reservoir/steam_vault/instance_steam_vault.cpp index 83ae23b60..ccdbdc663 100644 --- a/scripts/outland/coilfang_reservoir/steam_vault/instance_steam_vault.cpp +++ b/scripts/outland/coilfang_reservoir/steam_vault/instance_steam_vault.cpp @@ -30,7 +30,7 @@ EndScriptData */ 3 - Warlord Kalithresh Event */ -bool GOUse_go_main_chambers_access_panel(Player* pPlayer, GameObject* pGo) +bool GOUse_go_main_chambers_access_panel(Player* /*pPlayer*/, GameObject* pGo) { ScriptedInstance* pInstance = (ScriptedInstance*)pGo->GetInstanceData(); diff --git a/scripts/outland/coilfang_reservoir/underbog/boss_hungarfen.cpp b/scripts/outland/coilfang_reservoir/underbog/boss_hungarfen.cpp index d59bbba0b..0d8429307 100644 --- a/scripts/outland/coilfang_reservoir/underbog/boss_hungarfen.cpp +++ b/scripts/outland/coilfang_reservoir/underbog/boss_hungarfen.cpp @@ -126,8 +126,8 @@ struct MANGOS_DLL_DECL mob_underbog_mushroomAI : public ScriptedAI DoCastSpellIfCan(m_creature, SPELL_PUTRID_MUSHROOM); } - void MoveInLineOfSight(Unit* pWho) override { return; } - void AttackStart(Unit* pWho) override { return; } + void MoveInLineOfSight(Unit* /*pWho*/) override { return; } + void AttackStart(Unit* /*pWho*/) override { return; } void UpdateAI(const uint32 uiDiff) override { diff --git a/scripts/outland/gruuls_lair/boss_gruul.cpp b/scripts/outland/gruuls_lair/boss_gruul.cpp index ff9440461..89b19872d 100644 --- a/scripts/outland/gruuls_lair/boss_gruul.cpp +++ b/scripts/outland/gruuls_lair/boss_gruul.cpp @@ -82,7 +82,7 @@ struct MANGOS_DLL_DECL boss_gruulAI : public ScriptedAI m_bPerformingGroundSlam = false; } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { DoScriptText(SAY_AGGRO, m_creature); diff --git a/scripts/outland/gruuls_lair/boss_high_king_maulgar.cpp b/scripts/outland/gruuls_lair/boss_high_king_maulgar.cpp index 743ce6b4b..273392629 100644 --- a/scripts/outland/gruuls_lair/boss_high_king_maulgar.cpp +++ b/scripts/outland/gruuls_lair/boss_high_king_maulgar.cpp @@ -123,7 +123,7 @@ struct MANGOS_DLL_DECL boss_high_king_maulgarAI : public ScriptedAI m_pInstance->SetData(TYPE_MAULGAR_EVENT, SPECIAL); } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { DoScriptText(SAY_AGGRO, m_creature); @@ -216,7 +216,7 @@ struct MANGOS_DLL_DECL Council_Base_AI : public ScriptedAI ScriptedInstance* m_pInstance; - void JustDied(Unit* pVictim) override + void JustDied(Unit* /*pVictim*/) override { if (!m_pInstance) return; diff --git a/scripts/outland/hellfire_citadel/blood_furnace/boss_broggok.cpp b/scripts/outland/hellfire_citadel/blood_furnace/boss_broggok.cpp index 2569734fd..2e12f4299 100644 --- a/scripts/outland/hellfire_citadel/blood_furnace/boss_broggok.cpp +++ b/scripts/outland/hellfire_citadel/blood_furnace/boss_broggok.cpp @@ -62,7 +62,7 @@ struct MANGOS_DLL_DECL boss_broggokAI : public ScriptedAI m_uiPoisonBoltTimer = 7000; } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { DoScriptText(SAY_AGGRO, m_creature); @@ -79,7 +79,7 @@ struct MANGOS_DLL_DECL boss_broggokAI : public ScriptedAI pSummoned->CastSpell(pSummoned, SPELL_POISON, false, NULL, NULL, m_creature->GetObjectGuid()); } - void JustDied(Unit* pWho) override + void JustDied(Unit* /*pWho*/) override { if (m_pInstance) m_pInstance->SetData(TYPE_BROGGOK_EVENT, DONE); @@ -159,8 +159,8 @@ struct MANGOS_DLL_DECL mob_broggok_poisoncloudAI : public ScriptedAI mob_broggok_poisoncloudAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} void Reset() override { } - void MoveInLineOfSight(Unit* who) override { } - void AttackStart(Unit* who) override { } + void MoveInLineOfSight(Unit* /*who*/) override { } + void AttackStart(Unit* /*who*/) override { } }; CreatureAI* GetAI_boss_broggok(Creature* pCreature) diff --git a/scripts/outland/hellfire_citadel/blood_furnace/boss_kelidan_the_breaker.cpp b/scripts/outland/hellfire_citadel/blood_furnace/boss_kelidan_the_breaker.cpp index fe03ccf6f..d8ee52581 100644 --- a/scripts/outland/hellfire_citadel/blood_furnace/boss_kelidan_the_breaker.cpp +++ b/scripts/outland/hellfire_citadel/blood_furnace/boss_kelidan_the_breaker.cpp @@ -116,7 +116,7 @@ struct MANGOS_DLL_DECL boss_kelidan_the_breakerAI : public ScriptedAI ScriptedAI::MoveInLineOfSight(pWho); } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { DoScriptText(SAY_WAKE, m_creature); } diff --git a/scripts/outland/hellfire_citadel/blood_furnace/boss_the_maker.cpp b/scripts/outland/hellfire_citadel/blood_furnace/boss_the_maker.cpp index 125836c12..3730f06fb 100644 --- a/scripts/outland/hellfire_citadel/blood_furnace/boss_the_maker.cpp +++ b/scripts/outland/hellfire_citadel/blood_furnace/boss_the_maker.cpp @@ -65,7 +65,7 @@ struct MANGOS_DLL_DECL boss_the_makerAI : public ScriptedAI m_uiKnockdownTimer = 10000; } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { switch (urand(0, 2)) { diff --git a/scripts/outland/hellfire_citadel/blood_furnace/instance_blood_furnace.cpp b/scripts/outland/hellfire_citadel/blood_furnace/instance_blood_furnace.cpp index 4d6bc8675..1c9d0cb4f 100644 --- a/scripts/outland/hellfire_citadel/blood_furnace/instance_blood_furnace.cpp +++ b/scripts/outland/hellfire_citadel/blood_furnace/instance_blood_furnace.cpp @@ -387,7 +387,7 @@ InstanceData* GetInstanceData_instance_blood_furnace(Map* pMap) return new instance_blood_furnace(pMap); } -bool GOUse_go_prison_cell_lever(Player* pPlayer, GameObject* pGo) +bool GOUse_go_prison_cell_lever(Player* /*pPlayer*/, GameObject* pGo) { ScriptedInstance* pInstance = (ScriptedInstance*)pGo->GetInstanceData(); diff --git a/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_nazan_and_vazruden.cpp b/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_nazan_and_vazruden.cpp index b4a0cb50b..0df7cd41c 100644 --- a/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_nazan_and_vazruden.cpp +++ b/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_nazan_and_vazruden.cpp @@ -378,7 +378,7 @@ struct MANGOS_DLL_DECL boss_vazrudenAI : public ScriptedAI m_uiRevengeTimer = urand(5500, 8400); } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { switch (urand(0, 2)) { @@ -407,7 +407,7 @@ struct MANGOS_DLL_DECL boss_vazrudenAI : public ScriptedAI DoScriptText(urand(0, 1) ? SAY_KILL1 : SAY_KILL2, m_creature); } - void DamageTaken(Unit* pDealer, uint32& uiDamage) override + void DamageTaken(Unit* /*pDealer*/, uint32& uiDamage) override { if (!m_bHealthBelow && m_pInstance && (float(m_creature->GetHealth() - uiDamage) / m_creature->GetMaxHealth()) < 0.30f) { diff --git a/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_omor_the_unscarred.cpp b/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_omor_the_unscarred.cpp index 8c0f0f20d..3aa6dea58 100644 --- a/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_omor_the_unscarred.cpp +++ b/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_omor_the_unscarred.cpp @@ -78,7 +78,7 @@ struct MANGOS_DLL_DECL boss_omor_the_unscarredAI : public ScriptedAI m_bCanPullBack = false; } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { switch (urand(0, 2)) { diff --git a/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_watchkeeper_gargolmar.cpp b/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_watchkeeper_gargolmar.cpp index 89e0a77ea..5a8c63b64 100644 --- a/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_watchkeeper_gargolmar.cpp +++ b/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_watchkeeper_gargolmar.cpp @@ -71,7 +71,7 @@ struct MANGOS_DLL_DECL boss_watchkeeper_gargolmarAI : public ScriptedAI m_bYelledForHeal = false; } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { switch (urand(0, 2)) { diff --git a/scripts/outland/hellfire_citadel/magtheridons_lair/boss_magtheridon.cpp b/scripts/outland/hellfire_citadel/magtheridons_lair/boss_magtheridon.cpp index c94469b10..5271e3da6 100644 --- a/scripts/outland/hellfire_citadel/magtheridons_lair/boss_magtheridon.cpp +++ b/scripts/outland/hellfire_citadel/magtheridons_lair/boss_magtheridon.cpp @@ -124,7 +124,7 @@ struct MANGOS_DLL_DECL boss_magtheridonAI : public ScriptedAI m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { DoScriptText(EMOTE_FREED, m_creature); DoScriptText(urand(0, 1) ? SAY_AGGRO_1 : SAY_AGGRO_2, m_creature); @@ -151,7 +151,7 @@ struct MANGOS_DLL_DECL boss_magtheridonAI : public ScriptedAI m_pInstance->SetData(TYPE_MAGTHERIDON_EVENT, FAIL); } - void SpellHit(Unit* pCaster, const SpellEntry* pSpell) override + void SpellHit(Unit* /*pCaster*/, const SpellEntry* pSpell) override { // When banished by the cubes if (pSpell->Id == SPELL_SHADOW_CAGE) @@ -327,7 +327,7 @@ struct MANGOS_DLL_DECL mob_hellfire_channelerAI : public ScriptedAI m_uiInfernalTimer = urand(10000, 50000); } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { m_creature->InterruptNonMeleeSpells(false); @@ -336,7 +336,7 @@ struct MANGOS_DLL_DECL mob_hellfire_channelerAI : public ScriptedAI } // Don't attack on LoS check - void MoveInLineOfSight(Unit* pWho) override { } + void MoveInLineOfSight(Unit* /*pWho*/) override { } void JustDied(Unit* /*pKiller*/) override { @@ -470,10 +470,10 @@ struct MANGOS_DLL_DECL npc_target_triggerAI : public Scripted_NoMovementAI m_uiDebrisTimer = 0; } - void AttackStart(Unit* pWho) override {} - void MoveInLineOfSight(Unit* pWho) override {} + void AttackStart(Unit* /*pWho*/) override {} + void MoveInLineOfSight(Unit* /*pWho*/) override {} - void SpellHit(Unit* pCaster, const SpellEntry* pSpell) override + void SpellHit(Unit* /*pCaster*/, const SpellEntry* pSpell) override { // Workaround for missing core support for this type of dummy aura if (pSpell->Id == SPELL_QUAKE_EFFECT) diff --git a/scripts/outland/hellfire_citadel/shattered_halls/boss_nethekurse.cpp b/scripts/outland/hellfire_citadel/shattered_halls/boss_nethekurse.cpp index bf753aeb3..c5500a1f9 100644 --- a/scripts/outland/hellfire_citadel/shattered_halls/boss_nethekurse.cpp +++ b/scripts/outland/hellfire_citadel/shattered_halls/boss_nethekurse.cpp @@ -223,7 +223,7 @@ struct MANGOS_DLL_DECL boss_grand_warlock_nethekurseAI : public ScriptedAI ScriptedAI::MoveInLineOfSight(pWho); } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { switch (urand(0, 2)) { @@ -354,7 +354,7 @@ struct MANGOS_DLL_DECL mob_fel_orc_convertAI : public ScriptedAI m_uiHemorrhageTimer = 3000; } - void MoveInLineOfSight(Unit* pWho) override + void MoveInLineOfSight(Unit* /*pWho*/) override { return; } @@ -415,8 +415,8 @@ struct MANGOS_DLL_DECL mob_lesser_shadow_fissureAI : public Scripted_NoMovementA mob_lesser_shadow_fissureAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { Reset(); } void Reset() override { } - void MoveInLineOfSight(Unit* pWho) override { } - void AttackStart(Unit* pWho) override { } + void MoveInLineOfSight(Unit* /*pWho*/) override { } + void AttackStart(Unit* /*pWho*/) override { } }; CreatureAI* GetAI_boss_grand_warlock_nethekurse(Creature* pCreature) diff --git a/scripts/outland/hellfire_citadel/shattered_halls/boss_warbringer_omrogg.cpp b/scripts/outland/hellfire_citadel/shattered_halls/boss_warbringer_omrogg.cpp index 377c058c7..a5cc40fa8 100644 --- a/scripts/outland/hellfire_citadel/shattered_halls/boss_warbringer_omrogg.cpp +++ b/scripts/outland/hellfire_citadel/shattered_halls/boss_warbringer_omrogg.cpp @@ -198,7 +198,7 @@ struct MANGOS_DLL_DECL boss_warbringer_omroggAI : public ScriptedAI m_bThreatYell = true; } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { m_creature->SummonCreature(NPC_LEFT_HEAD, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_DEAD_DESPAWN, 0); m_creature->SummonCreature(NPC_RIGHT_HEAD, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_DEAD_DESPAWN, 0); diff --git a/scripts/outland/hellfire_citadel/shattered_halls/boss_warchief_kargath_bladefist.cpp b/scripts/outland/hellfire_citadel/shattered_halls/boss_warchief_kargath_bladefist.cpp index 27d4922d2..997f53725 100644 --- a/scripts/outland/hellfire_citadel/shattered_halls/boss_warchief_kargath_bladefist.cpp +++ b/scripts/outland/hellfire_citadel/shattered_halls/boss_warchief_kargath_bladefist.cpp @@ -94,7 +94,7 @@ struct MANGOS_DLL_DECL boss_warchief_kargath_bladefistAI : public ScriptedAI m_uiAssassinsTimer = 5000; } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { switch (urand(0, 2)) { diff --git a/scripts/outland/hellfire_citadel/shattered_halls/instance_shattered_halls.cpp b/scripts/outland/hellfire_citadel/shattered_halls/instance_shattered_halls.cpp index 9d74bf769..5dec90453 100644 --- a/scripts/outland/hellfire_citadel/shattered_halls/instance_shattered_halls.cpp +++ b/scripts/outland/hellfire_citadel/shattered_halls/instance_shattered_halls.cpp @@ -265,7 +265,7 @@ InstanceData* GetInstanceData_instance_shattered_halls(Map* pMap) return new instance_shattered_halls(pMap); } -bool AreaTrigger_at_shattered_halls(Player* pPlayer, AreaTriggerEntry const* pAt) +bool AreaTrigger_at_shattered_halls(Player* pPlayer, AreaTriggerEntry const* /*pAt*/) { if (pPlayer->isGameMaster() || pPlayer->isDead()) return false; diff --git a/scripts/outland/hellfire_peninsula.cpp b/scripts/outland/hellfire_peninsula.cpp index 2c8196bf1..c9a80bd3c 100644 --- a/scripts/outland/hellfire_peninsula.cpp +++ b/scripts/outland/hellfire_peninsula.cpp @@ -223,8 +223,8 @@ struct MANGOS_DLL_DECL npc_demoniac_scryerAI : public ScriptedAI void Reset() override {} // we don't want anything to happen when attacked - void AttackedBy(Unit* pEnemy) override {} - void AttackStart(Unit* pEnemy) override {} + void AttackedBy(Unit* /*pEnemy*/) override {} + void AttackStart(Unit* /*pEnemy*/) override {} void DoSpawnButtress() { @@ -338,7 +338,7 @@ bool GossipHello_npc_demoniac_scryer(Player* pPlayer, Creature* pCreature) return true; } -bool GossipSelect_npc_demoniac_scryer(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +bool GossipSelect_npc_demoniac_scryer(Player* pPlayer, Creature* pCreature, uint32 /*uiSender*/, uint32 uiAction) { if (uiAction == GOSSIP_ACTION_INFO_DEF + 1) { @@ -409,7 +409,7 @@ struct MANGOS_DLL_DECL npc_wounded_blood_elfAI : public npc_escortAI void Reset() override { } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { if (HasEscortState(STATE_ESCORT_ESCORTING)) DoScriptText(SAY_ELF_AGGRO, m_creature); diff --git a/scripts/outland/nagrand.cpp b/scripts/outland/nagrand.cpp index d5c7337bd..f6aced08f 100644 --- a/scripts/outland/nagrand.cpp +++ b/scripts/outland/nagrand.cpp @@ -75,7 +75,7 @@ struct MANGOS_DLL_DECL mob_lumpAI : public ScriptedAI AttackStart(pAttacker); } - void DamageTaken(Unit* pDealer, uint32& uiDamage) override + void DamageTaken(Unit* /*pDealer*/, uint32& uiDamage) override { if (m_creature->GetHealth() < uiDamage || (m_creature->GetHealth() - uiDamage) * 100 / m_creature->GetMaxHealth() < 30) { @@ -187,7 +187,7 @@ struct MANGOS_DLL_DECL npc_maghar_captiveAI : public npc_escortAI m_uiFrostShockTimer = 6000; } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { m_creature->CastSpell(m_creature, SPELL_EARTHBIND_TOTEM, false); } @@ -230,7 +230,7 @@ struct MANGOS_DLL_DECL npc_maghar_captiveAI : public npc_escortAI pSummoned->GetMotionMaster()->MovePoint(0, m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ()); } - void SpellHitTarget(Unit* pTarget, const SpellEntry* pSpell) override + void SpellHitTarget(Unit* /*pTarget*/, const SpellEntry* pSpell) override { if (pSpell->Id == SPELL_CHAIN_LIGHTNING) { diff --git a/scripts/outland/netherstorm.cpp b/scripts/outland/netherstorm.cpp index 839ac4d68..3134cae78 100644 --- a/scripts/outland/netherstorm.cpp +++ b/scripts/outland/netherstorm.cpp @@ -598,7 +598,7 @@ CreatureAI* GetAI_npc_commander_dawnforge(Creature* pCreature) return new npc_commander_dawnforgeAI(pCreature); } -bool AreaTrigger_at_commander_dawnforge(Player* pPlayer, AreaTriggerEntry const* pAt) +bool AreaTrigger_at_commander_dawnforge(Player* pPlayer, AreaTriggerEntry const* /*pAt*/) { // if player lost aura or not have at all, we should not try start event. if (!pPlayer->HasAura(SPELL_SUNFURY_DISGUISE, EFFECT_INDEX_0)) @@ -917,13 +917,13 @@ struct MANGOS_DLL_DECL npc_protectorate_demolitionistAI : public npc_escortAI } } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { DoScriptText(urand(0, 1) ? SAY_ATTACKED_1 : SAY_ATTACKED_2, m_creature); } // No attack done by this npc - void AttackStart(Unit* pWho) override { } + void AttackStart(Unit* /*pWho*/) override { } void MoveInLineOfSight(Unit* pWho) override { diff --git a/scripts/outland/shadowmoon_valley.cpp b/scripts/outland/shadowmoon_valley.cpp index 4ee7b8a7e..cbd92a8b7 100644 --- a/scripts/outland/shadowmoon_valley.cpp +++ b/scripts/outland/shadowmoon_valley.cpp @@ -989,7 +989,7 @@ struct MANGOS_DLL_DECL npc_lord_illidan_stormrageAI : public Scripted_NoMovement } } - void SummonedCreatureDespawn(Creature* pCreature) override + void SummonedCreatureDespawn(Creature* /*pCreature*/) override { // decrement mob count --m_uiMobCount; @@ -1102,7 +1102,7 @@ CreatureAI* GetAI_npc_lord_illidan_stormrage(Creature * (pCreature)) /*##### # go_crystal_prison : GameObject that begins the event and hands out quest ######*/ -bool GOQuestAccept_GO_crystal_prison(Player* pPlayer, GameObject* pGo, Quest const* pQuest) +bool GOQuestAccept_GO_crystal_prison(Player* pPlayer, GameObject* /*pGo*/, Quest const* pQuest) { if (pQuest->GetQuestId() == QUEST_BATTLE_OF_THE_CRIMSON_WATCH) if (Creature* pLordIllidan = GetClosestCreatureWithEntry(pPlayer, NPC_LORD_ILLIDAN, 50.0)) @@ -1165,8 +1165,8 @@ struct MANGOS_DLL_DECL npc_totem_of_spiritsAI : public ScriptedPetAI void Reset() override {} - void UpdateAI(const uint32 uiDiff) override {} - void AttackedBy(Unit* pAttacker) override {} + void UpdateAI(const uint32 /*uiDiff*/) override {} + void AttackedBy(Unit* /*pAttacker*/) override {} void MoveInLineOfSight(Unit* pWho) override { @@ -1228,7 +1228,7 @@ CreatureAI* GetAI_npc_totem_of_spirits(Creature* pCreature) return new npc_totem_of_spiritsAI(pCreature); } -bool EffectDummyCreature_npc_totem_of_spirits(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) +bool EffectDummyCreature_npc_totem_of_spirits(Unit* /*pCaster*/, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) { if (uiEffIndex != EFFECT_INDEX_0) return false; @@ -1296,7 +1296,7 @@ bool EffectAuraDummy_npc_totem_of_spirits(const Aura* pAura, bool bApply) return true; } -bool ProcessEventId_event_spell_soul_captured_credit(uint32 uiEventId, Object* pSource, Object* pTarget, bool bIsStart) +bool ProcessEventId_event_spell_soul_captured_credit(uint32 uiEventId, Object* pSource, Object* /*pTarget*/, bool bIsStart) { if (bIsStart && pSource->GetTypeId() == TYPEID_UNIT) { @@ -1653,7 +1653,7 @@ bool GossipHello_npc_spawned_oronok_tornheart(Player* pPlayer, Creature* pCreatu return true; } -bool GossipSelect_npc_spawned_oronok_tornheart(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +bool GossipSelect_npc_spawned_oronok_tornheart(Player* pPlayer, Creature* pCreature, uint32 /*uiSender*/, uint32 uiAction) { if (uiAction == GOSSIP_ACTION_INFO_DEF + 1) { diff --git a/scripts/outland/shattrath_city.cpp b/scripts/outland/shattrath_city.cpp index edeb7fcbb..180af0fd4 100644 --- a/scripts/outland/shattrath_city.cpp +++ b/scripts/outland/shattrath_city.cpp @@ -185,7 +185,7 @@ struct MANGOS_DLL_DECL npc_dirty_larryAI : public ScriptedAI AttackStart(pAttacker); } - void DamageTaken(Unit* pDoneBy, uint32& uiDamage) override + void DamageTaken(Unit* /*pDoneBy*/, uint32& uiDamage) override { if (uiDamage < m_creature->GetHealth()) return; @@ -236,7 +236,7 @@ bool GossipHello_npc_dirty_larry(Player* pPlayer, Creature* pCreature) return true; } -bool GossipSelect_npc_dirty_larry(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +bool GossipSelect_npc_dirty_larry(Player* pPlayer, Creature* pCreature, uint32 /*uiSender*/, uint32 uiAction) { if (uiAction == GOSSIP_ACTION_INFO_DEF + 1) { diff --git a/scripts/outland/tempest_keep/arcatraz/arcatraz.cpp b/scripts/outland/tempest_keep/arcatraz/arcatraz.cpp index f5601d35b..f573dc4ad 100644 --- a/scripts/outland/tempest_keep/arcatraz/arcatraz.cpp +++ b/scripts/outland/tempest_keep/arcatraz/arcatraz.cpp @@ -132,7 +132,7 @@ struct MANGOS_DLL_DECL npc_millhouse_manastormAI : public ScriptedAI, private Di DoScriptText(urand(0, 1) ? SAY_KILL_1 : SAY_KILL_2, m_creature); } - void JustDied(Unit* pVictim) override + void JustDied(Unit* /*pVictim*/) override { DoScriptText(SAY_DEATH, m_creature); @@ -286,7 +286,7 @@ struct MANGOS_DLL_DECL npc_warden_mellicharAI : public ScriptedAI m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); } - void AttackStart(Unit* pWho) override {} + void AttackStart(Unit* /*pWho*/) override {} void Aggro(Unit* pWho) override { diff --git a/scripts/outland/tempest_keep/arcatraz/boss_dalliah.cpp b/scripts/outland/tempest_keep/arcatraz/boss_dalliah.cpp index 8ff254caa..32846cc02 100644 --- a/scripts/outland/tempest_keep/arcatraz/boss_dalliah.cpp +++ b/scripts/outland/tempest_keep/arcatraz/boss_dalliah.cpp @@ -75,7 +75,7 @@ struct MANGOS_DLL_DECL boss_dalliahAI : public ScriptedAI m_bHasTaunted = false; } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { DoScriptText(SAY_AGGRO, m_creature); @@ -88,7 +88,7 @@ struct MANGOS_DLL_DECL boss_dalliahAI : public ScriptedAI DoScriptText(urand(0, 1) ? SAY_KILL_1 : SAY_KILL_2, m_creature); } - void JustDied(Unit* pWho) override + void JustDied(Unit* /*pWho*/) override { DoScriptText(SAY_DEATH, m_creature); diff --git a/scripts/outland/tempest_keep/arcatraz/boss_soccothrates.cpp b/scripts/outland/tempest_keep/arcatraz/boss_soccothrates.cpp index e680ca5b5..eb5dc1d65 100644 --- a/scripts/outland/tempest_keep/arcatraz/boss_soccothrates.cpp +++ b/scripts/outland/tempest_keep/arcatraz/boss_soccothrates.cpp @@ -95,7 +95,7 @@ struct MANGOS_DLL_DECL boss_soccothratesAI : public ScriptedAI, private Dialogue DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_IMMOLATION : SPELL_IMMOLATION_H); } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { DoScriptText(SAY_AGGRO, m_creature); @@ -119,7 +119,7 @@ struct MANGOS_DLL_DECL boss_soccothratesAI : public ScriptedAI, private Dialogue DoScriptText(SAY_KILL, m_creature); } - void JustDied(Unit* pWho) override + void JustDied(Unit* /*pWho*/) override { DoScriptText(SAY_DEATH, m_creature); diff --git a/scripts/outland/tempest_keep/arcatraz/instance_arcatraz.cpp b/scripts/outland/tempest_keep/arcatraz/instance_arcatraz.cpp index 4d1be9643..ca1aa9a81 100644 --- a/scripts/outland/tempest_keep/arcatraz/instance_arcatraz.cpp +++ b/scripts/outland/tempest_keep/arcatraz/instance_arcatraz.cpp @@ -100,7 +100,7 @@ void instance_arcatraz::Initialize() InitializeDialogueHelper(this); } -void instance_arcatraz::OnPlayerEnter(Player* pPlayer) +void instance_arcatraz::OnPlayerEnter(Player* /*pPlayer*/) { // Check encounter states if (GetData(TYPE_ENTRANCE) == DONE || GetData(TYPE_ENTRANCE) == IN_PROGRESS) diff --git a/scripts/outland/tempest_keep/botanica/boss_high_botanist_freywinn.cpp b/scripts/outland/tempest_keep/botanica/boss_high_botanist_freywinn.cpp index c7dd7d80e..cf7da8ca6 100644 --- a/scripts/outland/tempest_keep/botanica/boss_high_botanist_freywinn.cpp +++ b/scripts/outland/tempest_keep/botanica/boss_high_botanist_freywinn.cpp @@ -64,7 +64,7 @@ struct MANGOS_DLL_DECL boss_high_botanist_freywinnAI : public ScriptedAI m_bCanMoveFree = true; } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { DoScriptText(SAY_AGGRO, m_creature); } diff --git a/scripts/outland/tempest_keep/botanica/boss_warp_splinter.cpp b/scripts/outland/tempest_keep/botanica/boss_warp_splinter.cpp index 15ceef686..29e33d82f 100644 --- a/scripts/outland/tempest_keep/botanica/boss_warp_splinter.cpp +++ b/scripts/outland/tempest_keep/botanica/boss_warp_splinter.cpp @@ -74,7 +74,7 @@ struct MANGOS_DLL_DECL boss_warp_splinterAI : public ScriptedAI m_uiArcaneVolleyTimer = urand(12000, 14500); } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { DoScriptText(SAY_AGGRO, m_creature); } @@ -156,8 +156,8 @@ struct MANGOS_DLL_DECL npc_saplingAI : public ScriptedAI // m_creature->SetSpeedRate(MOVE_RUN, 0.5f); } - void MoveInLineOfSight(Unit* pWho) override { } - void UpdateAI(const uint32 uiDiff) override + void MoveInLineOfSight(Unit* /*pWho*/) override { } + void UpdateAI(const uint32 /*uiDiff*/) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/outland/tempest_keep/the_eye/boss_alar.cpp b/scripts/outland/tempest_keep/the_eye/boss_alar.cpp index 67b7e6030..ca3f4b8c5 100644 --- a/scripts/outland/tempest_keep/the_eye/boss_alar.cpp +++ b/scripts/outland/tempest_keep/the_eye/boss_alar.cpp @@ -119,7 +119,7 @@ struct MANGOS_DLL_DECL boss_alarAI : public ScriptedAI m_bCanSummonEmber = true; } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { if (m_pInstance) m_pInstance->SetData(TYPE_ALAR, IN_PROGRESS); @@ -216,7 +216,7 @@ struct MANGOS_DLL_DECL boss_alarAI : public ScriptedAI } } - void DamageTaken(Unit* pKiller, uint32& uiDamage) override + void DamageTaken(Unit* /*pKiller*/, uint32& uiDamage) override { // Only init fake in phase one if (m_uiPhase != PHASE_ONE) diff --git a/scripts/outland/tempest_keep/the_eye/boss_astromancer.cpp b/scripts/outland/tempest_keep/the_eye/boss_astromancer.cpp index 86d864508..5b9d3f26b 100644 --- a/scripts/outland/tempest_keep/the_eye/boss_astromancer.cpp +++ b/scripts/outland/tempest_keep/the_eye/boss_astromancer.cpp @@ -149,7 +149,7 @@ struct MANGOS_DLL_DECL boss_high_astromancer_solarianAI : public ScriptedAI m_pInstance->SetData(TYPE_SOLARIAN, DONE); } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { DoScriptText(SAY_AGGRO, m_creature); diff --git a/scripts/outland/tempest_keep/the_eye/boss_kaelthas.cpp b/scripts/outland/tempest_keep/the_eye/boss_kaelthas.cpp index 7b7c60cbe..bcef08622 100644 --- a/scripts/outland/tempest_keep/the_eye/boss_kaelthas.cpp +++ b/scripts/outland/tempest_keep/the_eye/boss_kaelthas.cpp @@ -265,7 +265,7 @@ struct MANGOS_DLL_DECL boss_kaelthasAI : public ScriptedAI } } - void KilledUnit(Unit* pUnit) override + void KilledUnit(Unit* /*pUnit*/) override { switch (urand(0, 2)) { @@ -300,7 +300,7 @@ struct MANGOS_DLL_DECL boss_kaelthasAI : public ScriptedAI pSummoned->SetInCombatWithZone(); } - void SpellHit(Unit* pCaster, const SpellEntry* pSpell) override + void SpellHit(Unit* /*pCaster*/, const SpellEntry* pSpell) override { // Handle summon weapons event if (pSpell->Id == SPELL_SUMMON_WEAPONS) @@ -755,7 +755,7 @@ struct MANGOS_DLL_DECL advisor_base_ai : public ScriptedAI } } - void DamageTaken(Unit* pDoneby, uint32& uiDamage) override + void DamageTaken(Unit* /*pDoneby*/, uint32& uiDamage) override { // Allow fake death only in the first phase if (!m_bCanFakeDeath) @@ -909,7 +909,7 @@ struct MANGOS_DLL_DECL boss_lord_sanguinarAI : public advisor_base_ai advisor_base_ai::Reset(); } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { DoScriptText(SAY_SANGUINAR_AGGRO, m_creature); } @@ -973,7 +973,7 @@ struct MANGOS_DLL_DECL boss_grand_astromancer_capernianAI : public advisor_base_ } } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { DoScriptText(SAY_CAPERNIAN_AGGRO, m_creature); } @@ -1048,7 +1048,7 @@ struct MANGOS_DLL_DECL boss_master_engineer_telonicusAI : public advisor_base_ai advisor_base_ai::Reset(); } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { DoScriptText(SAY_TELONICUS_AGGRO, m_creature); } @@ -1108,7 +1108,7 @@ struct MANGOS_DLL_DECL mob_phoenix_tkAI : public ScriptedAI m_bFakeDeath = false; } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { DoCastSpellIfCan(m_creature, SPELL_BURN); } @@ -1122,7 +1122,7 @@ struct MANGOS_DLL_DECL mob_phoenix_tkAI : public ScriptedAI ScriptedAI::EnterEvadeMode(); } - void DamageTaken(Unit* pKiller, uint32& uiDamage) override + void DamageTaken(Unit* /*pKiller*/, uint32& uiDamage) override { if (uiDamage < m_creature->GetHealth()) return; @@ -1162,7 +1162,7 @@ struct MANGOS_DLL_DECL mob_phoenix_tkAI : public ScriptedAI m_creature->SummonCreature(NPC_PHOENIX_EGG, 0, 0, 0, 0, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 15000); } - void SummonedCreatureDespawn(Creature* pSummoned) override + void SummonedCreatureDespawn(Creature* /*pSummoned*/) override { // Remove fake death if the egg despawns after 15 secs m_creature->RemoveAurasDueToSpell(SPELL_EMBER_BLAST); @@ -1180,7 +1180,7 @@ struct MANGOS_DLL_DECL mob_phoenix_tkAI : public ScriptedAI } } - void SummonedCreatureJustDied(Creature* pSummoned) override + void SummonedCreatureJustDied(Creature* /*pSummoned*/) override { // Self kill if the egg is killed if (m_bFakeDeath) @@ -1224,9 +1224,9 @@ struct MANGOS_DLL_DECL mob_phoenix_egg_tkAI : public Scripted_NoMovementAI mob_phoenix_egg_tkAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { Reset(); } void Reset() override { } - void MoveInLineOfSight(Unit* pWho) override { } - void AttackStart(Unit* pWho) override { } - void UpdateAI(const uint32 uiDiff) override { } + void MoveInLineOfSight(Unit* /*pWho*/) override { } + void AttackStart(Unit* /*pWho*/) override { } + void UpdateAI(const uint32 /*uiDiff*/) override { } }; CreatureAI* GetAI_boss_kaelthas(Creature* pCreature) diff --git a/scripts/outland/tempest_keep/the_eye/boss_void_reaver.cpp b/scripts/outland/tempest_keep/the_eye/boss_void_reaver.cpp index 7b3662f36..9bdeb455c 100644 --- a/scripts/outland/tempest_keep/the_eye/boss_void_reaver.cpp +++ b/scripts/outland/tempest_keep/the_eye/boss_void_reaver.cpp @@ -86,7 +86,7 @@ struct MANGOS_DLL_DECL boss_void_reaverAI : public ScriptedAI m_pInstance->SetData(TYPE_VOIDREAVER, DONE); } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { DoScriptText(SAY_AGGRO, m_creature); diff --git a/scripts/outland/tempest_keep/the_mechanar/boss_nethermancer_sepethrea.cpp b/scripts/outland/tempest_keep/the_mechanar/boss_nethermancer_sepethrea.cpp index 50fbc6c6b..49fc4fa7b 100644 --- a/scripts/outland/tempest_keep/the_mechanar/boss_nethermancer_sepethrea.cpp +++ b/scripts/outland/tempest_keep/the_mechanar/boss_nethermancer_sepethrea.cpp @@ -66,7 +66,7 @@ struct MANGOS_DLL_DECL boss_nethermancer_sepethreaAI : public ScriptedAI m_uiDragonsBreathTimer = urand(20000, 26000); } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { DoScriptText(SAY_AGGRO, m_creature); DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_SUMMON_RAGING_FLAMES : SPELL_SUMMON_RAGING_FLAMES_H); diff --git a/scripts/outland/tempest_keep/the_mechanar/boss_pathaleon_the_calculator.cpp b/scripts/outland/tempest_keep/the_mechanar/boss_pathaleon_the_calculator.cpp index 8d6d46afe..293358c4a 100644 --- a/scripts/outland/tempest_keep/the_mechanar/boss_pathaleon_the_calculator.cpp +++ b/scripts/outland/tempest_keep/the_mechanar/boss_pathaleon_the_calculator.cpp @@ -87,7 +87,7 @@ struct MANGOS_DLL_DECL boss_pathaleon_the_calculatorAI : public ScriptedAI m_bIsEnraged = false; } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { DoScriptText(SAY_AGGRO, m_creature); } diff --git a/scripts/outland/terokkar_forest.cpp b/scripts/outland/terokkar_forest.cpp index 23164a258..b080cfbbe 100644 --- a/scripts/outland/terokkar_forest.cpp +++ b/scripts/outland/terokkar_forest.cpp @@ -158,7 +158,7 @@ struct MANGOS_DLL_DECL mob_netherweb_victimAI : public ScriptedAI } void Reset() override { } - void MoveInLineOfSight(Unit* pWho) override { } + void MoveInLineOfSight(Unit* /*pWho*/) override { } void JustDied(Unit* pKiller) override { @@ -736,7 +736,7 @@ struct MANGOS_DLL_DECL npc_captive_child : public ScriptedAI void Reset() override {} - void MovementInform(uint32 uiMotionType, uint32 uiPointId) override + void MovementInform(uint32 uiMotionType, uint32 /*uiPointId*/) override { if (uiMotionType == POINT_MOTION_TYPE) m_creature->ForcedDespawn(); // we only have one waypoint diff --git a/scripts/outland/zangarmarsh.cpp b/scripts/outland/zangarmarsh.cpp index 1a13a26bb..d00022773 100644 --- a/scripts/outland/zangarmarsh.cpp +++ b/scripts/outland/zangarmarsh.cpp @@ -161,7 +161,7 @@ enum EVENT_ID_STORMCROW = 11225, }; -bool ProcessEventId_event_taxi_stormcrow(uint32 uiEventId, Object* pSource, Object* pTarget, bool bIsStart) +bool ProcessEventId_event_taxi_stormcrow(uint32 uiEventId, Object* pSource, Object* /*pTarget*/, bool bIsStart) { if (uiEventId == EVENT_ID_STORMCROW && !bIsStart && pSource->GetTypeId() == TYPEID_PLAYER) { diff --git a/scripts/world/areatrigger_scripts.cpp b/scripts/world/areatrigger_scripts.cpp index d285c866d..5b06e29d2 100644 --- a/scripts/world/areatrigger_scripts.cpp +++ b/scripts/world/areatrigger_scripts.cpp @@ -99,7 +99,7 @@ enum GO_COILFANG_WATERFALL = 184212 }; -bool AreaTrigger_at_coilfang_waterfall(Player* pPlayer, AreaTriggerEntry const* pAt) +bool AreaTrigger_at_coilfang_waterfall(Player* pPlayer, AreaTriggerEntry const* /*pAt*/) { if (GameObject* pGo = GetClosestGameObjectWithEntry(pPlayer, GO_COILFANG_WATERFALL, 35.0f)) { @@ -122,7 +122,7 @@ enum QUEST_GAINING_ACCESS_H = 10604 }; -bool AreaTrigger_at_legion_teleporter(Player* pPlayer, AreaTriggerEntry const* pAt) +bool AreaTrigger_at_legion_teleporter(Player* pPlayer, AreaTriggerEntry const* /*pAt*/) { if (pPlayer->isAlive() && !pPlayer->isInCombat()) { @@ -152,7 +152,7 @@ enum NPC_RAVENHOLDT = 13936 }; -bool AreaTrigger_at_ravenholdt(Player* pPlayer, AreaTriggerEntry const* pAt) +bool AreaTrigger_at_ravenholdt(Player* pPlayer, AreaTriggerEntry const* /*pAt*/) { if (pPlayer->GetQuestStatus(QUEST_MANOR_RAVENHOLDT) == QUEST_STATUS_INCOMPLETE) pPlayer->KilledMonsterCredit(NPC_RAVENHOLDT); @@ -254,7 +254,7 @@ enum SPELL_CREATE_TRUE_POWER_OF_THE_TEMPEST = 53067 }; -bool AreaTrigger_at_stormwright_shelf(Player* pPlayer, AreaTriggerEntry const* pAt) +bool AreaTrigger_at_stormwright_shelf(Player* pPlayer, AreaTriggerEntry const* /*pAt*/) { if (!pPlayer->isDead() && pPlayer->GetQuestStatus(QUEST_STRENGTH_OF_THE_TEMPEST) == QUEST_STATUS_INCOMPLETE) pPlayer->CastSpell(pPlayer, SPELL_CREATE_TRUE_POWER_OF_THE_TEMPEST, false); @@ -287,7 +287,7 @@ bool AreaTrigger_at_scent_larkorwi(Player* pPlayer, AreaTriggerEntry const* pAt) ## at_murkdeep ######*/ -bool AreaTrigger_at_murkdeep(Player* pPlayer, AreaTriggerEntry const* pAt) +bool AreaTrigger_at_murkdeep(Player* pPlayer, AreaTriggerEntry const* /*pAt*/) { // Handle Murkdeep event start // The area trigger summons 3 Greymist Coastrunners; The rest of the event is handled by world map scripts diff --git a/scripts/world/bosses_emerald_dragons.cpp b/scripts/world/bosses_emerald_dragons.cpp index f60a84bfe..e33d21b47 100644 --- a/scripts/world/bosses_emerald_dragons.cpp +++ b/scripts/world/bosses_emerald_dragons.cpp @@ -98,7 +98,7 @@ struct MANGOS_DLL_DECL boss_emerald_dragonAI : public ScriptedAI virtual bool DoSpecialDragonAbility() = 0; // Return true to handle shared timers and MeleeAttack - virtual bool UpdateDragonAI(const uint32 uiDiff) { return true; } + virtual bool UpdateDragonAI(const uint32 /*uiDiff*/) { return true; } void UpdateAI(const uint32 uiDiff) override { @@ -170,7 +170,7 @@ struct MANGOS_DLL_DECL boss_emerissAI : public boss_emerald_dragonAI m_uiVolatileInfectionTimer = 12000; } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { DoScriptText(SAY_EMERISS_AGGRO, m_creature); } @@ -242,7 +242,7 @@ struct MANGOS_DLL_DECL boss_lethonAI : public boss_emerald_dragonAI { boss_lethonAI(Creature* pCreature) : boss_emerald_dragonAI(pCreature) {} - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { DoScriptText(SAY_LETHON_AGGRO, m_creature); // Shadow bolt wirl is a periodic aura which triggers a set of shadowbolts every 2 secs; may need some core tunning @@ -308,9 +308,9 @@ struct MANGOS_DLL_DECL npc_spirit_shadeAI : public ScriptedAI } } - void AttackStart(Unit* pWho) override { } + void AttackStart(Unit* /*pWho*/) override { } - void UpdateAI(const uint32 uiDiff) override { } + void UpdateAI(const uint32 /*uiDiff*/) override { } }; CreatureAI* GetAI_boss_lethon(Creature* pCreature) @@ -368,7 +368,7 @@ struct MANGOS_DLL_DECL boss_taerarAI : public boss_emerald_dragonAI m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { DoScriptText(SAY_TAERAR_AGGRO, m_creature); } @@ -534,7 +534,7 @@ struct MANGOS_DLL_DECL boss_ysondreAI : public boss_emerald_dragonAI m_uiLightningWaveTimer = 12000; } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { DoScriptText(SAY_YSONDRE_AGGRO, m_creature); } diff --git a/scripts/world/go_scripts.cpp b/scripts/world/go_scripts.cpp index f41381e52..f53de8094 100644 --- a/scripts/world/go_scripts.cpp +++ b/scripts/world/go_scripts.cpp @@ -46,7 +46,7 @@ enum SPELL_LEARN_FELCLOTH_BAG = 26095 }; -bool GOUse_go_barov_journal(Player* pPlayer, GameObject* pGo) +bool GOUse_go_barov_journal(Player* pPlayer, GameObject* /*pGo*/) { if (pPlayer->HasSkill(SKILL_TAILORING) && pPlayer->GetBaseSkillValue(SKILL_TAILORING) >= 280 && !pPlayer->HasSpell(SPELL_TAILOR_FELCLOTH_BAG)) { @@ -235,7 +235,7 @@ enum QUEST_TELE_CRYSTAL_FLAG = 12845 }; -bool GOUse_go_tele_to_dalaran_crystal(Player* pPlayer, GameObject* pGo) +bool GOUse_go_tele_to_dalaran_crystal(Player* pPlayer, GameObject* /*pGo*/) { if (pPlayer->GetQuestRewardStatus(QUEST_TELE_CRYSTAL_FLAG)) return false; @@ -248,7 +248,7 @@ bool GOUse_go_tele_to_dalaran_crystal(Player* pPlayer, GameObject* pGo) ## go_tele_to_violet_stand ######*/ -bool GOUse_go_tele_to_violet_stand(Player* pPlayer, GameObject* pGo) +bool GOUse_go_tele_to_violet_stand(Player* pPlayer, GameObject* /*pGo*/) { if (pPlayer->GetQuestRewardStatus(QUEST_LEARN_LEAVE_RETURN) || pPlayer->GetQuestStatus(QUEST_LEARN_LEAVE_RETURN) == QUEST_STATUS_INCOMPLETE) return false; diff --git a/scripts/world/item_scripts.cpp b/scripts/world/item_scripts.cpp index 2de019280..cf975c907 100644 --- a/scripts/world/item_scripts.cpp +++ b/scripts/world/item_scripts.cpp @@ -39,7 +39,7 @@ enum SPELL_ARCANE_CHARGES = 45072 }; -bool ItemUse_item_arcane_charges(Player* pPlayer, Item* pItem, const SpellCastTargets& pTargets) +bool ItemUse_item_arcane_charges(Player* pPlayer, Item* pItem, const SpellCastTargets& /*pTargets*/) { if (pPlayer->IsTaxiFlying()) return false; @@ -56,7 +56,7 @@ bool ItemUse_item_arcane_charges(Player* pPlayer, Item* pItem, const SpellCastTa # item_flying_machine #####*/ -bool ItemUse_item_flying_machine(Player* pPlayer, Item* pItem, const SpellCastTargets& pTargets) +bool ItemUse_item_flying_machine(Player* pPlayer, Item* pItem, const SpellCastTargets& /*pTargets*/) { uint32 itemId = pItem->GetEntry(); @@ -109,7 +109,7 @@ enum ZONE_ID_HOWLING = 495 }; -bool ItemUse_item_petrov_cluster_bombs(Player* pPlayer, Item* pItem, const SpellCastTargets& pTargets) +bool ItemUse_item_petrov_cluster_bombs(Player* pPlayer, Item* pItem, const SpellCastTargets& /*pTargets*/) { if (pPlayer->GetZoneId() != ZONE_ID_HOWLING) return false; diff --git a/scripts/world/npc_professions.cpp b/scripts/world/npc_professions.cpp index f2692db62..56101a3ad 100644 --- a/scripts/world/npc_professions.cpp +++ b/scripts/world/npc_professions.cpp @@ -183,12 +183,12 @@ there is no difference here (except that default text is chosen with `gameobject # formulas to calculate unlearning cost ###*/ -int32 GetLearningCost(Player* pPlayer) // tailor, alchemy +int32 GetLearningCost(Player* /*pPlayer*/) // tailor, alchemy { return 200000; } -int32 GetUnlearnCostHigh(Player* pPlayer) // tailor, alchemy +int32 GetUnlearnCostHigh(Player* /*pPlayer*/) // tailor, alchemy { return 1500000; } diff --git a/scripts/world/npcs_special.cpp b/scripts/world/npcs_special.cpp index 77f6636f3..59133692f 100644 --- a/scripts/world/npcs_special.cpp +++ b/scripts/world/npcs_special.cpp @@ -331,7 +331,7 @@ CreatureAI* GetAI_npc_chicken_cluck(Creature* pCreature) return new npc_chicken_cluckAI(pCreature); } -bool QuestAccept_npc_chicken_cluck(Player* pPlayer, Creature* pCreature, const Quest* pQuest) +bool QuestAccept_npc_chicken_cluck(Player* /*pPlayer*/, Creature* pCreature, const Quest* pQuest) { if (pQuest->GetQuestId() == QUEST_CLUCK) { @@ -342,7 +342,7 @@ bool QuestAccept_npc_chicken_cluck(Player* pPlayer, Creature* pCreature, const Q return true; } -bool QuestRewarded_npc_chicken_cluck(Player* pPlayer, Creature* pCreature, const Quest* pQuest) +bool QuestRewarded_npc_chicken_cluck(Player* /*pPlayer*/, Creature* pCreature, const Quest* pQuest) { if (pQuest->GetQuestId() == QUEST_CLUCK) { @@ -680,7 +680,7 @@ void npc_doctorAI::PatientDied(Location* pPoint) Reset(); } -void npc_doctorAI::PatientSaved(Creature* soldier, Player* pPlayer, Location* pPoint) +void npc_doctorAI::PatientSaved(Creature* /*soldier*/, Player* pPlayer, Location* pPoint) { if (pPlayer && m_playerGuid == pPlayer->GetObjectGuid()) { @@ -941,7 +941,7 @@ struct MANGOS_DLL_DECL npc_garments_of_questsAI : public npc_escortAI } } - void WaypointReached(uint32 uiPointId) override {} + void WaypointReached(uint32 /*uiPointId*/) override {} void UpdateEscortAI(const uint32 uiDiff) override { @@ -998,7 +998,7 @@ struct MANGOS_DLL_DECL npc_guardianAI : public ScriptedAI m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); } - void UpdateAI(const uint32 diff) override + void UpdateAI(const uint32 /*diff*/) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -1054,7 +1054,7 @@ bool GossipHello_npc_innkeeper(Player* pPlayer, Creature* pCreature) return true; } -bool GossipSelect_npc_innkeeper(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +bool GossipSelect_npc_innkeeper(Player* pPlayer, Creature* pCreature, uint32 /*uiSender*/, uint32 uiAction) { switch (uiAction) { @@ -1157,7 +1157,7 @@ bool GossipHello_npc_mount_vendor(Player* pPlayer, Creature* pCreature) return true; } -bool GossipSelect_npc_mount_vendor(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +bool GossipSelect_npc_mount_vendor(Player* pPlayer, Creature* pCreature, uint32 /*uiSender*/, uint32 uiAction) { if (uiAction == GOSSIP_ACTION_TRADE) pPlayer->SEND_VENDORLIST(pCreature->GetObjectGuid()); @@ -1419,7 +1419,7 @@ bool GossipHello_npc_tabard_vendor(Player* pPlayer, Creature* pCreature) return true; } -bool GossipSelect_npc_tabard_vendor(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +bool GossipSelect_npc_tabard_vendor(Player* pPlayer, Creature* pCreature, uint32 /*uiSender*/, uint32 uiAction) { switch (uiAction) { diff --git a/scripts/world/world_map_scripts.cpp b/scripts/world/world_map_scripts.cpp index 6955248fa..3ec2620a8 100644 --- a/scripts/world/world_map_scripts.cpp +++ b/scripts/world/world_map_scripts.cpp @@ -44,7 +44,7 @@ struct MANGOS_DLL_DECL world_map_eastern_kingdoms : public ScriptedMap } } - void SetData(uint32 uiType, uint32 uiData) {} + void SetData(uint32 /*uiType*/, uint32 /*uiData*/) {} }; InstanceData* GetInstanceData_world_map_eastern_kingdoms(Map* pMap) @@ -129,7 +129,7 @@ struct MANGOS_DLL_DECL world_map_kalimdor : public ScriptedMap } } - void SetData(uint32 uiType, uint32 uiData) {} + void SetData(uint32 /*uiType*/, uint32 /*uiData*/) {} }; InstanceData* GetInstanceData_world_map_kalimdor(Map* pMap) @@ -176,7 +176,7 @@ struct MANGOS_DLL_DECL world_map_outland : public ScriptedMap } } - void SetData(uint32 uiType, uint32 uiData) {} + void SetData(uint32 /*uiType*/, uint32 /*uiData*/) {} }; InstanceData* GetInstanceData_world_map_outland(Map* pMap) @@ -191,7 +191,7 @@ struct MANGOS_DLL_DECL world_map_northrend : public ScriptedMap { world_map_northrend(Map* pMap) : ScriptedMap(pMap) {} - void SetData(uint32 uiType, uint32 uiData) {} + void SetData(uint32 /*uiType*/, uint32 /*uiData*/) {} }; InstanceData* GetInstanceData_world_map_northrend(Map* pMap) diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 7ad03a956..2fbda2f41 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2842" + #define SD2_REVISION_NR "2843" #endif // __SD2_REVISION_NR_H__ From d0132fa73e18e7e36c18493dd3932fc0e87f8385 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Mon, 1 Apr 2013 09:32:40 +0300 Subject: [PATCH 0845/1172] [2844] Implement some missing doors in Utgarde Keep --- .../utgarde_keep/utgarde_keep/boss_ingvar.cpp | 14 ++++++++++++++ .../utgarde_keep/instance_utgarde_keep.cpp | 17 +++++++++++++++++ .../utgarde_keep/utgarde_keep/utgarde_keep.h | 3 +++ sd2_revision_nr.h | 2 +- 4 files changed, 35 insertions(+), 1 deletion(-) diff --git a/scripts/northrend/utgarde_keep/utgarde_keep/boss_ingvar.cpp b/scripts/northrend/utgarde_keep/utgarde_keep/boss_ingvar.cpp index ac604b15c..3d2d7c063 100644 --- a/scripts/northrend/utgarde_keep/utgarde_keep/boss_ingvar.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_keep/boss_ingvar.cpp @@ -121,6 +121,9 @@ struct MANGOS_DLL_DECL boss_ingvarAI : public ScriptedAI // ToDo: it shouldn't yell this aggro text after removing the feign death aura DoScriptText(SAY_AGGRO_FIRST, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_INGVAR, IN_PROGRESS); } void DamageTaken(Unit* /*pDealer*/, uint32& uiDamage) override @@ -187,6 +190,9 @@ struct MANGOS_DLL_DECL boss_ingvarAI : public ScriptedAI void JustDied(Unit* /*pKiller*/) override { DoScriptText(SAY_DEATH_SECOND, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_INGVAR, DONE); } void KilledUnit(Unit* /*pVictim*/) override @@ -195,6 +201,14 @@ struct MANGOS_DLL_DECL boss_ingvarAI : public ScriptedAI DoScriptText(m_bIsResurrected ? SAY_KILL_SECOND : SAY_KILL_FIRST, m_creature); } + void JustReachedHome() override + { + if (m_pInstance) + m_pInstance->SetData(TYPE_INGVAR, FAIL); + + m_creature->UpdateEntry(NPC_INGVAR); + } + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim() || m_bIsFakingDeath) diff --git a/scripts/northrend/utgarde_keep/utgarde_keep/instance_utgarde_keep.cpp b/scripts/northrend/utgarde_keep/utgarde_keep/instance_utgarde_keep.cpp index e0ccaeb95..ccab4d375 100644 --- a/scripts/northrend/utgarde_keep/utgarde_keep/instance_utgarde_keep.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_keep/instance_utgarde_keep.cpp @@ -76,6 +76,13 @@ void instance_utgarde_keep::OnObjectCreate(GameObject* pGo) if (m_auiEncounter[TYPE_BELLOW_3] == DONE) pGo->SetGoState(GO_STATE_ACTIVE); break; + case GO_PORTCULLIS_EXIT_1: + case GO_PORTCULLIS_EXIT_2: + if (m_auiEncounter[TYPE_INGVAR] == DONE) + pGo->SetGoState(GO_STATE_ACTIVE); + break; + case GO_PORTCULLIS_COMBAT: + break; default: return; @@ -99,7 +106,17 @@ void instance_utgarde_keep::SetData(uint32 uiType, uint32 uiData) m_auiEncounter[uiType] = uiData; break; case TYPE_SKARVALD_DALRONN: + m_auiEncounter[uiType] = uiData; + break; case TYPE_INGVAR: + if (m_auiEncounter[uiType] == uiData) + return; + DoUseDoorOrButton(GO_PORTCULLIS_COMBAT); + if (uiData == DONE) + { + DoUseDoorOrButton(GO_PORTCULLIS_EXIT_1); + DoUseDoorOrButton(GO_PORTCULLIS_EXIT_2); + } m_auiEncounter[uiType] = uiData; break; case TYPE_BELLOW_1: diff --git a/scripts/northrend/utgarde_keep/utgarde_keep/utgarde_keep.h b/scripts/northrend/utgarde_keep/utgarde_keep/utgarde_keep.h index 74c76398f..74b56fcad 100644 --- a/scripts/northrend/utgarde_keep/utgarde_keep/utgarde_keep.h +++ b/scripts/northrend/utgarde_keep/utgarde_keep/utgarde_keep.h @@ -29,6 +29,9 @@ enum GO_FORGEFIRE_1 = 186692, GO_FORGEFIRE_2 = 186693, GO_FORGEFIRE_3 = 186691, + GO_PORTCULLIS_COMBAT = 186612, + GO_PORTCULLIS_EXIT_1 = 186694, + GO_PORTCULLIS_EXIT_2 = 186756, ACHIEV_CRIT_ON_THE_ROCKS = 7231, }; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 2fbda2f41..df8383ede 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2843" + #define SD2_REVISION_NR "2844" #endif // __SD2_REVISION_NR_H__ From 5522c1be69441b153da9eee804eccd1bc753082a Mon Sep 17 00:00:00 2001 From: Xfurry Date: Mon, 1 Apr 2013 14:29:36 +0300 Subject: [PATCH 0846/1172] [2845] Implement Icy Blast for Rimefang - Pit of Saron --- .../pit_of_saron/boss_scourgelord_tyrannus.cpp | 12 +++++++----- sd2_revision_nr.h | 2 +- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_scourgelord_tyrannus.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_scourgelord_tyrannus.cpp index e342e3d85..f3ab8c102 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_scourgelord_tyrannus.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_scourgelord_tyrannus.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: boss_scourgelord_tyrannus -SD%Complete: 80 -SDComment: Icy Blast not fully implemented. +SD%Complete: 90 +SDComment: Small adjustments may be required SDCategory: Pit of Saron EndScriptData */ @@ -48,8 +48,8 @@ enum SPELL_KILLING_ICE = 72531, // Icy blast - SPELL_ICY_BLAST_AURA = 69238, - NPC_ICY_BLAST = 36731, + // SPELL_ICY_BLAST_AURA = 69238, + NPC_ICY_BLAST = 36731, // handled in eventAI }; static const float afRimefangExitPos[3] = {1248.29f, 145.924f, 733.914f}; @@ -300,9 +300,11 @@ struct MANGOS_DLL_DECL boss_rimefang_posAI : public ScriptedAI { if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) { - // ToDo: research how to summon the Icy Blast npc and apply the slow aura if (DoCastSpellIfCan(pTarget, SPELL_ICY_BLAST) == CAST_OK) + { + m_creature->SummonCreature(NPC_ICY_BLAST, pTarget->GetPositionX(), pTarget->GetPositionY(), pTarget->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN, 90000); m_uiIcyBlastTimer = 8000; + } } } else diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index df8383ede..a43982b0c 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2844" + #define SD2_REVISION_NR "2845" #endif // __SD2_REVISION_NR_H__ From 07ade5c663518b35beed4dc5d751f5b9ed2d00b9 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Mon, 1 Apr 2013 15:57:52 +0300 Subject: [PATCH 0847/1172] [2846] Cleanup some scripts ported to eventAI --- scripts/world/bosses_emerald_dragons.cpp | 93 ------------------------ sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 2 - sql/updates/r2846_mangos.sql | 2 + 4 files changed, 3 insertions(+), 96 deletions(-) create mode 100644 sql/updates/r2846_mangos.sql diff --git a/scripts/world/bosses_emerald_dragons.cpp b/scripts/world/bosses_emerald_dragons.cpp index e33d21b47..84c0eb4e9 100644 --- a/scripts/world/bosses_emerald_dragons.cpp +++ b/scripts/world/bosses_emerald_dragons.cpp @@ -27,9 +27,7 @@ boss_emeriss boss_lethon npc_spirit_shade boss_taerar -boss_shade_of_taerar -- TODO move to Acid boss_ysondre -mob_dementeddruids; -- TODO move to Acid EndContentData */ #include "precompiled.h" @@ -453,57 +451,11 @@ struct MANGOS_DLL_DECL boss_taerarAI : public boss_emerald_dragonAI } }; -// Shades of Taerar Script -struct MANGOS_DLL_DECL boss_shadeoftaerarAI : public ScriptedAI -{ - boss_shadeoftaerarAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} - - uint32 m_uiPoisonCloud_Timer; - uint32 m_uiPosionBreath_Timer; - - void Reset() override - { - m_uiPoisonCloud_Timer = 8000; - m_uiPosionBreath_Timer = 12000; - } - - void UpdateAI(const uint32 uiDiff) override - { - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - // PoisonCloud_Timer - if (m_uiPoisonCloud_Timer < uiDiff) - { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_POSIONCLOUD); - m_uiPoisonCloud_Timer = 30000; - } - else - m_uiPoisonCloud_Timer -= uiDiff; - - // PosionBreath_Timer - if (m_uiPosionBreath_Timer < uiDiff) - { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_POSIONBREATH); - m_uiPosionBreath_Timer = 12000; - } - else - m_uiPosionBreath_Timer -= uiDiff; - - DoMeleeAttackIfReady(); - } -}; - CreatureAI* GetAI_boss_taerar(Creature* pCreature) { return new boss_taerarAI(pCreature); } -CreatureAI* GetAI_boss_shadeoftaerar(Creature* pCreature) -{ - return new boss_shadeoftaerarAI(pCreature); -} - /*###### ## boss_ysondre ######*/ @@ -566,46 +518,11 @@ struct MANGOS_DLL_DECL boss_ysondreAI : public boss_emerald_dragonAI } }; -// Summoned druid script -struct MANGOS_DLL_DECL mob_dementeddruidsAI : public ScriptedAI -{ - mob_dementeddruidsAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} - - uint32 m_uiMoonFire_Timer; - - void Reset() override - { - m_uiMoonFire_Timer = 3000; - } - - void UpdateAI(const uint32 uiDiff) override - { - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - // MoonFire_Timer - if (m_uiMoonFire_Timer < uiDiff) - { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_MOONFIRE); - m_uiMoonFire_Timer = 5000; - } - else - m_uiMoonFire_Timer -= uiDiff; - - DoMeleeAttackIfReady(); - } -}; - CreatureAI* GetAI_boss_ysondre(Creature* pCreature) { return new boss_ysondreAI(pCreature); } -CreatureAI* GetAI_mob_dementeddruids(Creature* pCreature) -{ - return new mob_dementeddruidsAI(pCreature); -} - void AddSC_bosses_emerald_dragons() { Script* pNewScript; @@ -630,18 +547,8 @@ void AddSC_bosses_emerald_dragons() pNewScript->GetAI = &GetAI_boss_taerar; pNewScript->RegisterSelf(); - pNewScript = new Script; - pNewScript->Name = "boss_shade_of_taerar"; - pNewScript->GetAI = &GetAI_boss_shadeoftaerar; - pNewScript->RegisterSelf(); - pNewScript = new Script; pNewScript->Name = "boss_ysondre"; pNewScript->GetAI = &GetAI_boss_ysondre; pNewScript->RegisterSelf(); - - pNewScript = new Script; - pNewScript->Name = "mob_dementeddruids"; - pNewScript->GetAI = &GetAI_mob_dementeddruids; - pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index a43982b0c..a325a2602 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2845" + #define SD2_REVISION_NR "2846" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 6a2730387..6db7f8f93 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -91,9 +91,7 @@ UPDATE creature_template SET ScriptName='npc_spirit_guide' WHERE entry IN (13116 UPDATE creature_template SET ScriptName='boss_ysondre' WHERE entry=14887; UPDATE creature_template SET ScriptName='boss_emeriss' WHERE entry=14889; UPDATE creature_template SET ScriptName='boss_taerar' WHERE entry=14890; -UPDATE creature_template SET ScriptName='boss_shade_of_taerar' WHERE entry=15302; UPDATE creature_template SET ScriptName='boss_azuregos' WHERE entry=6109; -UPDATE creature_template SET ScriptName='mob_dementeddruids' WHERE entry=15260; UPDATE creature_template SET ScriptName='boss_lethon' WHERE entry=14888; UPDATE creature_template SET ScriptName='npc_spirit_shade' WHERE entry=15261; diff --git a/sql/updates/r2846_mangos.sql b/sql/updates/r2846_mangos.sql new file mode 100644 index 000000000..d9b0e057a --- /dev/null +++ b/sql/updates/r2846_mangos.sql @@ -0,0 +1,2 @@ +UPDATE creature_template SET ScriptName='' WHERE entry=15302; +UPDATE creature_template SET ScriptName='' WHERE entry=15260; From f8b39ec30efbd7bd64867b21e032ea417c86be14 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Mon, 1 Apr 2013 23:56:38 +0300 Subject: [PATCH 0848/1172] [2847] Improve Violet Hold reset --- .../violet_hold/instance_violet_hold.cpp | 38 +++++++++++++------ scripts/northrend/violet_hold/violet_hold.h | 4 +- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 2 +- sql/updates/r2847_mangos.sql | 1 + 5 files changed, 33 insertions(+), 14 deletions(-) create mode 100644 sql/updates/r2847_mangos.sql diff --git a/scripts/northrend/violet_hold/instance_violet_hold.cpp b/scripts/northrend/violet_hold/instance_violet_hold.cpp index 6294a6222..526293009 100644 --- a/scripts/northrend/violet_hold/instance_violet_hold.cpp +++ b/scripts/northrend/violet_hold/instance_violet_hold.cpp @@ -69,26 +69,39 @@ void instance_violet_hold::ResetAll() const BossInformation* pData = GetBossInformation((*itr)->uiEntry); if (pData && m_auiEncounter[pData->uiType] == DONE) { + // Despawn ghost boss if (Creature* pGhostBoss = GetSingleCreatureFromStorage(pData->uiGhostEntry)) - { - if (!pGhostBoss->isAlive()) - pGhostBoss->Respawn(); + pGhostBoss->ForcedDespawn(); - // Reset passive flags - pGhostBoss->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PASSIVE); - } - else if (Creature* pSummoner = GetSingleCreatureFromStorage(NPC_SINCLARI_ALT)) - pSummoner->SummonCreature(pData->uiGhostEntry, (*itr)->fX, (*itr)->fY, (*itr)->fZ, (*itr)->fO, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 600 * IN_MILLISECONDS); + // Spawn new boss replacement + if (Creature* pSummoner = GetSingleCreatureFromStorage(NPC_SINCLARI_ALT)) + pSummoner->SummonCreature(pData->uiGhostEntry, (*itr)->fX, (*itr)->fY, (*itr)->fZ, (*itr)->fO, TEMPSUMMON_DEAD_DESPAWN, 0); - // Respawn Erekem guards + // Replace Erekem guards if (pData->uiType == TYPE_EREKEM) { + // Despawn ghost guards + for (GuidList::const_iterator itr = m_lArakkoaGuardList.begin(); itr != m_lArakkoaGuardList.end(); ++itr) + { + if (Creature* pGhostGuard = instance->GetCreature(*itr)) + pGhostGuard->ForcedDespawn(); + } + + m_lArakkoaGuardList.clear(); + + // Spawn new guards replacement + float fX, fY, fZ, fO; for (GuidList::const_iterator itr = m_lErekemGuardList.begin(); itr != m_lErekemGuardList.end(); ++itr) { if (Creature* pGuard = instance->GetCreature(*itr)) { - pGuard->Respawn(); - pGuard->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PASSIVE); + // Don't allow alive original guards while the boss is dead + if (!pGuard->isDead()) + pGuard->ForcedDespawn(); + + // Spawn a ghost guard for each original guard + pGuard->GetRespawnCoord(fX, fY, fZ, &fO); + pGuard->SummonCreature(NPC_ARAKKOA_GUARD, fX, fY, fZ, fO, TEMPSUMMON_DEAD_DESPAWN, 0); } } } @@ -128,6 +141,9 @@ void instance_violet_hold::OnCreatureCreate(Creature* pCreature) case NPC_EREKEM_GUARD: m_lErekemGuardList.push_back(pCreature->GetObjectGuid()); return; + case NPC_ARAKKOA_GUARD: + m_lArakkoaGuardList.push_back(pCreature->GetObjectGuid()); + return; case NPC_ICHORON_SUMMON_TARGET: m_lIchoronTargetsList.push_back(pCreature->GetObjectGuid()); return; diff --git a/scripts/northrend/violet_hold/violet_hold.h b/scripts/northrend/violet_hold/violet_hold.h index 1cf24f4ce..88595301d 100644 --- a/scripts/northrend/violet_hold/violet_hold.h +++ b/scripts/northrend/violet_hold/violet_hold.h @@ -86,6 +86,7 @@ enum // 'Ghosts' for Killed mobs after Wipe NPC_ARAKKOA = 32226, + NPC_ARAKKOA_GUARD = 32228, NPC_VOID_LORD = 32230, NPC_ETHERAL = 32231, NPC_SWIRLING = 32234, @@ -223,7 +224,7 @@ class MANGOS_DLL_DECL instance_violet_hold : public ScriptedInstance void ProcessActivationCrystal(Unit* pUser, bool bIsIntro = false); - void GetErekemGuardList(GuidList& lList) { lList = m_lErekemGuardList; } + void GetErekemGuardList(GuidList& lGuardList) { lGuardList = GetData(TYPE_EREKEM) != DONE ? m_lErekemGuardList : m_lArakkoaGuardList; } void GetIchoronTriggerList(GuidList& lList) { lList = m_lIchoronTargetsList; } void OnPlayerEnter(Player* pPlayer) override; @@ -289,6 +290,7 @@ class MANGOS_DLL_DECL instance_violet_hold : public ScriptedInstance GuidList m_lIntroPortalList; GuidList m_lGuardsList; GuidList m_lErekemGuardList; + GuidList m_lArakkoaGuardList; GuidList m_lIchoronTargetsList; std::vector m_vRandomBossList; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index a325a2602..89927dfc9 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2846" + #define SD2_REVISION_NR "2847" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 6db7f8f93..a36fb307b 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -1293,7 +1293,7 @@ UPDATE creature_template SET ScriptName='npc_prison_event_controller' WHERE entr UPDATE creature_template SET ScriptName='npc_teleportation_portal' WHERE entry IN (31011,30679,32174); UPDATE creature_template SET ScriptName='boss_ichoron' WHERE entry IN (29313,32234); UPDATE creature_template SET ScriptName='boss_erekem' WHERE entry IN (29315,32226); -UPDATE creature_template SET ScriptName='npc_erekem_guard' WHERE entry=29395; +UPDATE creature_template SET ScriptName='npc_erekem_guard' WHERE entry IN (29395,32228); /* WAILING CAVERNS */ UPDATE instance_template SET ScriptName='instance_wailing_caverns' WHERE map=43; diff --git a/sql/updates/r2847_mangos.sql b/sql/updates/r2847_mangos.sql new file mode 100644 index 000000000..e1bfffe9e --- /dev/null +++ b/sql/updates/r2847_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_erekem_guard' WHERE entry=32228; From 9bc3f31f482615e9bd7889a0bfab8844c980562b Mon Sep 17 00:00:00 2001 From: Xfurry Date: Tue, 2 Apr 2013 01:29:40 +0300 Subject: [PATCH 0849/1172] [2848] Implement achivement Lightning Struck - Halls of Lightning Also cleanup the style of the instance --- .../halls_of_lightning/boss_bjarngrim.cpp | 194 ++++++++---------- .../ulduar/halls_of_lightning/boss_loken.cpp | 112 +++------- .../halls_of_lightning/boss_volkhan.cpp | 8 +- .../halls_of_lightning/halls_of_lightning.h | 2 + .../instance_halls_of_lightning.cpp | 20 +- sd2_revision_nr.h | 2 +- 6 files changed, 145 insertions(+), 193 deletions(-) diff --git a/scripts/northrend/ulduar/halls_of_lightning/boss_bjarngrim.cpp b/scripts/northrend/ulduar/halls_of_lightning/boss_bjarngrim.cpp index 11a22db8b..3c62f7b88 100644 --- a/scripts/northrend/ulduar/halls_of_lightning/boss_bjarngrim.cpp +++ b/scripts/northrend/ulduar/halls_of_lightning/boss_bjarngrim.cpp @@ -16,7 +16,7 @@ /* ScriptData SDName: Boss General Bjarngrim -SD%Complete: 70% +SD%Complete: 90% SDComment: Waypoint needed, we expect boss to always have 2x Stormforged Lieutenant following SDCategory: Halls of Lightning EndScriptData */ @@ -54,9 +54,9 @@ enum SPELL_MORTAL_STRIKE = 16856, SPELL_SLAM = 52026, - // OTHER SPELLS - // SPELL_CHARGE_UP = 52098, // only used when starting walk from one platform to the other - // SPELL_TEMPORARY_ELECTRICAL_CHARGE = 52092, // triggered part of above + // Other spells - handled by DB wp movement script + // SPELL_CHARGE_UP = 52098, // only used when starting walk from one platform to the other + SPELL_TEMPORARY_ELECTRICAL_CHARGE = 52092, // triggered part of above NPC_STORMFORGED_LIEUTENANT = 29240, SPELL_ARC_WELD = 59085, @@ -90,61 +90,47 @@ struct MANGOS_DLL_DECL boss_bjarngrimAI : public ScriptedAI uint8 m_uiChargingStatus; uint8 m_uiStance; - uint32 m_uiCharge_Timer; - uint32 m_uiChangeStance_Timer; + uint32 m_uiChargeTimer; + uint32 m_uiChangeStanceTimer; - uint32 m_uiReflection_Timer; - uint32 m_uiKnockAway_Timer; - uint32 m_uiPummel_Timer; - uint32 m_uiIronform_Timer; + uint32 m_uiReflectionTimer; + uint32 m_uiKnockAwayTimer; + uint32 m_uiPummelTimer; + uint32 m_uiIronformTimer; - uint32 m_uiIntercept_Timer; - uint32 m_uiWhirlwind_Timer; - uint32 m_uiCleave_Timer; + uint32 m_uiInterceptTimer; + uint32 m_uiWhirlwindTimer; + uint32 m_uiCleaveTimer; - uint32 m_uiMortalStrike_Timer; - uint32 m_uiSlam_Timer; - - ObjectGuid m_aStormforgedLieutenantGuid[2]; // TODO - not filled yet. + uint32 m_uiMortalStrikeTimer; + uint32 m_uiSlamTimer; void Reset() override { - m_bIsChangingStance = false; - - m_uiChargingStatus = 0; - m_uiCharge_Timer = 1000; + m_bIsChangingStance = false; - m_uiChangeStance_Timer = urand(20000, 25000); + m_uiChargingStatus = 0; + m_uiChargeTimer = 1000; - m_uiReflection_Timer = 8000; - m_uiKnockAway_Timer = 20000; - m_uiPummel_Timer = 10000; - m_uiIronform_Timer = 25000; + m_uiChangeStanceTimer = urand(20000, 25000); - m_uiIntercept_Timer = 5000; - m_uiWhirlwind_Timer = 10000; - m_uiCleave_Timer = 8000; + m_uiReflectionTimer = 8000; + m_uiKnockAwayTimer = 20000; + m_uiPummelTimer = 10000; + m_uiIronformTimer = 25000; - m_uiMortalStrike_Timer = 8000; - m_uiSlam_Timer = 10000; + m_uiInterceptTimer = 5000; + m_uiWhirlwindTimer = 10000; + m_uiCleaveTimer = 8000; - for (uint8 i = 0; i < 2; ++i) - { - if (Creature* pStormforgedLieutenant = m_creature->GetMap()->GetCreature(m_aStormforgedLieutenantGuid[i])) - { - if (!pStormforgedLieutenant->isAlive()) - pStormforgedLieutenant->Respawn(); - } - } + m_uiMortalStrikeTimer = 8000; + m_uiSlamTimer = 10000; if (m_uiStance != STANCE_DEFENSIVE) { DoCastSpellIfCan(m_creature, SPELL_DEFENSIVE_STANCE); m_uiStance = STANCE_DEFENSIVE; } - - if (m_pInstance) - m_pInstance->SetData(TYPE_BJARNGRIM, NOT_STARTED); } void Aggro(Unit* /*pWho*/) override @@ -152,7 +138,13 @@ struct MANGOS_DLL_DECL boss_bjarngrimAI : public ScriptedAI DoScriptText(SAY_AGGRO, m_creature); if (m_pInstance) + { + // Set the achiev in progress + if (m_creature->HasAura(SPELL_TEMPORARY_ELECTRICAL_CHARGE)) + m_pInstance->SetData(TYPE_BJARNGRIM, SPECIAL); + m_pInstance->SetData(TYPE_BJARNGRIM, IN_PROGRESS); + } } void KilledUnit(Unit* /*pVictim*/) override @@ -173,6 +165,12 @@ struct MANGOS_DLL_DECL boss_bjarngrimAI : public ScriptedAI m_pInstance->SetData(TYPE_BJARNGRIM, DONE); } + void JustReachedHome() override + { + if (m_pInstance) + m_pInstance->SetData(TYPE_BJARNGRIM, FAIL); + } + void UpdateAI(const uint32 uiDiff) override { // Return since we have no target @@ -180,7 +178,7 @@ struct MANGOS_DLL_DECL boss_bjarngrimAI : public ScriptedAI return; // Change stance - if (m_uiChangeStance_Timer < uiDiff) + if (m_uiChangeStanceTimer < uiDiff) { // wait for current spell to finish before change stance if (m_creature->IsNonMeleeSpellCasted(false)) @@ -212,96 +210,96 @@ struct MANGOS_DLL_DECL boss_bjarngrimAI : public ScriptedAI break; } - m_uiChangeStance_Timer = urand(20000, 25000); + m_uiChangeStanceTimer = urand(20000, 25000); return; } else - m_uiChangeStance_Timer -= uiDiff; + m_uiChangeStanceTimer -= uiDiff; switch (m_uiStance) { case STANCE_DEFENSIVE: { - if (m_uiReflection_Timer < uiDiff) + if (m_uiReflectionTimer < uiDiff) { - DoCastSpellIfCan(m_creature, SPELL_SPELL_REFLECTION); - m_uiReflection_Timer = urand(8000, 9000); + if (DoCastSpellIfCan(m_creature, SPELL_SPELL_REFLECTION) == CAST_OK) + m_uiReflectionTimer = urand(8000, 9000); } else - m_uiReflection_Timer -= uiDiff; + m_uiReflectionTimer -= uiDiff; - if (m_uiKnockAway_Timer < uiDiff) + if (m_uiKnockAwayTimer < uiDiff) { - DoCastSpellIfCan(m_creature, SPELL_KNOCK_AWAY); - m_uiKnockAway_Timer = urand(20000, 21000); + if (DoCastSpellIfCan(m_creature, SPELL_KNOCK_AWAY) == CAST_OK) + m_uiKnockAwayTimer = urand(20000, 21000); } else - m_uiKnockAway_Timer -= uiDiff; + m_uiKnockAwayTimer -= uiDiff; - if (m_uiPummel_Timer < uiDiff) + if (m_uiPummelTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_PUMMEL); - m_uiPummel_Timer = urand(10000, 11000); + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_PUMMEL) == CAST_OK) + m_uiPummelTimer = urand(10000, 11000); } else - m_uiPummel_Timer -= uiDiff; + m_uiPummelTimer -= uiDiff; - if (m_uiIronform_Timer < uiDiff) + if (m_uiIronformTimer < uiDiff) { - DoCastSpellIfCan(m_creature, SPELL_IRONFORM); - m_uiIronform_Timer = urand(25000, 26000); + if (DoCastSpellIfCan(m_creature, SPELL_IRONFORM) == CAST_OK) + m_uiIronformTimer = urand(25000, 26000); } else - m_uiIronform_Timer -= uiDiff; + m_uiIronformTimer -= uiDiff; break; } case STANCE_BERSERKER: { - if (m_uiIntercept_Timer < uiDiff) + if (m_uiInterceptTimer < uiDiff) { // not much point is this, better random target and more often? - DoCastSpellIfCan(m_creature->getVictim(), SPELL_INTERCEPT); - m_uiIntercept_Timer = urand(45000, 46000); + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_INTERCEPT) == CAST_OK) + m_uiInterceptTimer = urand(45000, 46000); } else - m_uiIntercept_Timer -= uiDiff; + m_uiInterceptTimer -= uiDiff; - if (m_uiWhirlwind_Timer < uiDiff) + if (m_uiWhirlwindTimer < uiDiff) { - DoCastSpellIfCan(m_creature, SPELL_WHIRLWIND); - m_uiWhirlwind_Timer = urand(10000, 11000); + if (DoCastSpellIfCan(m_creature, SPELL_WHIRLWIND) == CAST_OK) + m_uiWhirlwindTimer = urand(10000, 11000); } else - m_uiWhirlwind_Timer -= uiDiff; + m_uiWhirlwindTimer -= uiDiff; - if (m_uiCleave_Timer < uiDiff) + if (m_uiCleaveTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_CLEAVE); - m_uiCleave_Timer = urand(8000, 9000); + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_CLEAVE) == CAST_OK) + m_uiCleaveTimer = urand(8000, 9000); } else - m_uiCleave_Timer -= uiDiff; + m_uiCleaveTimer -= uiDiff; break; } case STANCE_BATTLE: { - if (m_uiMortalStrike_Timer < uiDiff) + if (m_uiMortalStrikeTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_MORTAL_STRIKE); - m_uiMortalStrike_Timer = urand(20000, 21000); + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_MORTAL_STRIKE) == CAST_OK) + m_uiMortalStrikeTimer = urand(20000, 21000); } else - m_uiMortalStrike_Timer -= uiDiff; + m_uiMortalStrikeTimer -= uiDiff; - if (m_uiSlam_Timer < uiDiff) + if (m_uiSlamTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_SLAM); - m_uiSlam_Timer = urand(15000, 16000); + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_SLAM) == CAST_OK) + m_uiSlamTimer = urand(15000, 16000); } else - m_uiSlam_Timer -= uiDiff; + m_uiSlamTimer -= uiDiff; break; } @@ -327,25 +325,13 @@ struct MANGOS_DLL_DECL mob_stormforged_lieutenantAI : public ScriptedAI ScriptedInstance* m_pInstance; bool m_bIsRegularMode; - uint32 m_uiArcWeld_Timer; - uint32 m_uiRenewSteel_Timer; + uint32 m_uiArcWeldTimer; + uint32 m_uiRenewSteelTimer; void Reset() override { - m_uiArcWeld_Timer = urand(20000, 21000); - m_uiRenewSteel_Timer = urand(10000, 11000); - } - - void Aggro(Unit* pWho) override - { - if (m_pInstance) - { - if (Creature* pBjarngrim = m_pInstance->GetSingleCreatureFromStorage(NPC_BJARNGRIM)) - { - if (pBjarngrim->isAlive() && !pBjarngrim->getVictim()) - pBjarngrim->AI()->AttackStart(pWho); - } - } + m_uiArcWeldTimer = urand(20000, 21000); + m_uiRenewSteelTimer = urand(10000, 11000); } void UpdateAI(const uint32 uiDiff) override @@ -354,15 +340,15 @@ struct MANGOS_DLL_DECL mob_stormforged_lieutenantAI : public ScriptedAI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - if (m_uiArcWeld_Timer < uiDiff) + if (m_uiArcWeldTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_ARC_WELD); - m_uiArcWeld_Timer = urand(20000, 21000); + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_ARC_WELD) == CAST_OK) + m_uiArcWeldTimer = urand(20000, 21000); } else - m_uiArcWeld_Timer -= uiDiff; + m_uiArcWeldTimer -= uiDiff; - if (m_uiRenewSteel_Timer < uiDiff) + if (m_uiRenewSteelTimer < uiDiff) { if (m_pInstance) { @@ -372,10 +358,10 @@ struct MANGOS_DLL_DECL mob_stormforged_lieutenantAI : public ScriptedAI DoCastSpellIfCan(pBjarngrim, m_bIsRegularMode ? SPELL_RENEW_STEEL_N : SPELL_RENEW_STEEL_H); } } - m_uiRenewSteel_Timer = urand(10000, 14000); + m_uiRenewSteelTimer = urand(10000, 14000); } else - m_uiRenewSteel_Timer -= uiDiff; + m_uiRenewSteelTimer -= uiDiff; DoMeleeAttackIfReady(); } diff --git a/scripts/northrend/ulduar/halls_of_lightning/boss_loken.cpp b/scripts/northrend/ulduar/halls_of_lightning/boss_loken.cpp index 7450da0a3..53afaa5d9 100644 --- a/scripts/northrend/ulduar/halls_of_lightning/boss_loken.cpp +++ b/scripts/northrend/ulduar/halls_of_lightning/boss_loken.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: Boss Loken -SD%Complete: 60% -SDComment: Missing intro. Remove hack of Pulsing Shockwave when core supports. Aura is not working (59414) +SD%Complete: 80% +SDComment: Missing intro. SDCategory: Halls of Lightning EndScriptData */ @@ -42,10 +42,10 @@ enum EMOTE_NOVA = -1602031, SPELL_ARC_LIGHTNING = 52921, - SPELL_LIGHTNING_NOVA_N = 52960, + SPELL_LIGHTNING_NOVA = 52960, SPELL_LIGHTNING_NOVA_H = 59835, - SPELL_PULSING_SHOCKWAVE_N = 52961, + SPELL_PULSING_SHOCKWAVE = 52961, SPELL_PULSING_SHOCKWAVE_H = 59836, SPELL_PULSING_SHOCKWAVE_AURA = 59414 }; @@ -66,28 +66,18 @@ struct MANGOS_DLL_DECL boss_lokenAI : public ScriptedAI ScriptedInstance* m_pInstance; bool m_bIsRegularMode; - bool m_bIsAura; - uint32 m_uiArcLightning_Timer; - uint32 m_uiLightningNova_Timer; - uint32 m_uiPulsingShockwave_Timer; - uint32 m_uiResumePulsingShockwave_Timer; + uint32 m_uiArcLightningTimer; + uint32 m_uiLightningNovaTimer; uint32 m_uiHealthAmountModifier; void Reset() override { - m_bIsAura = false; - - m_uiArcLightning_Timer = 15000; - m_uiLightningNova_Timer = 20000; - m_uiPulsingShockwave_Timer = 2000; - m_uiResumePulsingShockwave_Timer = 15000; + m_uiArcLightningTimer = 15000; + m_uiLightningNovaTimer = 20000; m_uiHealthAmountModifier = 1; - - if (m_pInstance) - m_pInstance->SetData(TYPE_LOKEN, NOT_STARTED); } void Aggro(Unit* /*pWho*/) override @@ -96,6 +86,10 @@ struct MANGOS_DLL_DECL boss_lokenAI : public ScriptedAI if (m_pInstance) m_pInstance->SetData(TYPE_LOKEN, IN_PROGRESS); + + // Cast Pulsing Shockwave at aggro - ToDo: enable this when the core will properly support this spell + // DoCastSpellIfCan(m_creature, SPELL_PULSING_SHOCKWAVE_AURA, CAST_TRIGGERED | CAST_AURA_NOT_PRESENT); + // DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_PULSING_SHOCKWAVE : SPELL_PULSING_SHOCKWAVE_H, CAST_TRIGGERED | CAST_AURA_NOT_PRESENT); } void JustDied(Unit* /*pKiller*/) override @@ -116,84 +110,44 @@ struct MANGOS_DLL_DECL boss_lokenAI : public ScriptedAI } } + void JustReachedHome() override + { + if (m_pInstance) + m_pInstance->SetData(TYPE_LOKEN, FAIL); + } + void UpdateAI(const uint32 uiDiff) override { // Return since we have no target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - if (m_bIsAura) + if (m_uiArcLightningTimer < uiDiff) { - // workaround for PULSING_SHOCKWAVE - /*if (m_uiPulsingShockwave_Timer < uiDiff) - { - Map *map = m_creature->GetMap(); - if (map->IsDungeon()) - { - Map::PlayerList const &PlayerList = map->GetPlayers(); - - if (PlayerList.isEmpty()) - return; - - for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i) - if (i->getSource()->isAlive() && i->getSource()->isTargetableForAttack()) - { - int32 dmg; - float m_fDist = m_creature->GetDistance(i->getSource()); - - if (m_fDist <= 1.0f) // Less than 1 yard - dmg = (m_bIsRegularMode ? 800 : 850); // need to correct damage - else // Further from 1 yard - dmg = round((m_bIsRegularMode ? 200 : 250) * m_fDist) + (m_bIsRegularMode ? 800 : 850); // need to correct damage - - m_creature->CastCustomSpell(i->getSource(), (m_bIsRegularMode ? 52942 : 59837), &dmg, 0, 0, false); - } - } - m_uiPulsingShockwave_Timer = 2000; - }else m_uiPulsingShockwave_Timer -= uiDiff;*/ - } - else - { - if (m_uiResumePulsingShockwave_Timer < uiDiff) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) { - // breaks at movement, can we assume when it's time, this spell is casted and also must stop movement? - // m_creature->CastSpell(m_creature, SPELL_PULSING_SHOCKWAVE_AURA, true); - - // DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_PULSING_SHOCKWAVE_N : SPELL_PULSING_SHOCKWAVE_H); // need core support - m_bIsAura = true; - m_uiResumePulsingShockwave_Timer = 0; + if (DoCastSpellIfCan(pTarget, SPELL_ARC_LIGHTNING) == CAST_OK) + m_uiArcLightningTimer = urand(15000, 16000); } - else - m_uiResumePulsingShockwave_Timer -= uiDiff; - } - - if (m_uiArcLightning_Timer < uiDiff) - { - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) - DoCastSpellIfCan(pTarget, SPELL_ARC_LIGHTNING); - - m_uiArcLightning_Timer = urand(15000, 16000); } else - m_uiArcLightning_Timer -= uiDiff; + m_uiArcLightningTimer -= uiDiff; - if (m_uiLightningNova_Timer < uiDiff) + if (m_uiLightningNovaTimer < uiDiff) { - switch (urand(0, 2)) + if (DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_LIGHTNING_NOVA : SPELL_LIGHTNING_NOVA_H) == CAST_OK) { - case 0: DoScriptText(SAY_NOVA_1, m_creature); break; - case 1: DoScriptText(SAY_NOVA_2, m_creature); break; - case 2: DoScriptText(SAY_NOVA_3, m_creature); break; + switch (urand(0, 2)) + { + case 0: DoScriptText(SAY_NOVA_1, m_creature); break; + case 1: DoScriptText(SAY_NOVA_2, m_creature); break; + case 2: DoScriptText(SAY_NOVA_3, m_creature); break; + } + m_uiLightningNovaTimer = urand(20000, 21000); } - - DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_LIGHTNING_NOVA_N : SPELL_LIGHTNING_NOVA_H); - - m_bIsAura = false; - m_uiResumePulsingShockwave_Timer = (m_bIsRegularMode ? 5000 : 4000); // Pause Pulsing Shockwave aura - m_uiLightningNova_Timer = urand(20000, 21000); } else - m_uiLightningNova_Timer -= uiDiff; + m_uiLightningNovaTimer -= uiDiff; // Health check if (m_creature->GetHealthPercent() < float(100 - 25 * m_uiHealthAmountModifier)) diff --git a/scripts/northrend/ulduar/halls_of_lightning/boss_volkhan.cpp b/scripts/northrend/ulduar/halls_of_lightning/boss_volkhan.cpp index 5af757d53..9b0303468 100644 --- a/scripts/northrend/ulduar/halls_of_lightning/boss_volkhan.cpp +++ b/scripts/northrend/ulduar/halls_of_lightning/boss_volkhan.cpp @@ -388,16 +388,16 @@ struct MANGOS_DLL_DECL mob_molten_golemAI : public ScriptedAI if (m_uiBlastTimer < uiDiff) { - DoCastSpellIfCan(m_creature, SPELL_BLAST_WAVE); - m_uiBlastTimer = 20000; + if (DoCastSpellIfCan(m_creature, SPELL_BLAST_WAVE) == CAST_OK) + m_uiBlastTimer = 20000; } else m_uiBlastTimer -= uiDiff; if (m_uiImmolationTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), m_bIsRegularMode ? SPELL_IMMOLATION_STRIKE : SPELL_IMMOLATION_STRIKE_H); - m_uiImmolationTimer = 5000; + if (DoCastSpellIfCan(m_creature->getVictim(), m_bIsRegularMode ? SPELL_IMMOLATION_STRIKE : SPELL_IMMOLATION_STRIKE_H) == CAST_OK) + m_uiImmolationTimer = 5000; } else m_uiImmolationTimer -= uiDiff; diff --git a/scripts/northrend/ulduar/halls_of_lightning/halls_of_lightning.h b/scripts/northrend/ulduar/halls_of_lightning/halls_of_lightning.h index 142abce65..d0cd8340f 100644 --- a/scripts/northrend/ulduar/halls_of_lightning/halls_of_lightning.h +++ b/scripts/northrend/ulduar/halls_of_lightning/halls_of_lightning.h @@ -27,6 +27,7 @@ enum ACHIEV_START_LOKEN_ID = 20384, + ACHIEV_CRIT_LIGHTNING = 6835, // Bjarngrim, achiev 1834 ACHIEV_CRIT_RESISTANT = 7321, // Volkhan, achiev 2042 }; @@ -52,6 +53,7 @@ class MANGOS_DLL_DECL instance_halls_of_lightning : public ScriptedInstance uint32 m_auiEncounter[MAX_ENCOUNTER]; std::string m_strInstData; + bool m_bLightningStruck; bool m_bIsShatterResistant; }; diff --git a/scripts/northrend/ulduar/halls_of_lightning/instance_halls_of_lightning.cpp b/scripts/northrend/ulduar/halls_of_lightning/instance_halls_of_lightning.cpp index f6bceea35..a008d6db2 100644 --- a/scripts/northrend/ulduar/halls_of_lightning/instance_halls_of_lightning.cpp +++ b/scripts/northrend/ulduar/halls_of_lightning/instance_halls_of_lightning.cpp @@ -32,6 +32,7 @@ EndScriptData */ */ instance_halls_of_lightning::instance_halls_of_lightning(Map* pMap) : ScriptedInstance(pMap), + m_bLightningStruck(false), m_bIsShatterResistant(false) { Initialize(); @@ -80,14 +81,18 @@ void instance_halls_of_lightning::SetData(uint32 uiType, uint32 uiData) switch (uiType) { case TYPE_BJARNGRIM: + if (uiData == SPECIAL) + m_bLightningStruck = true; + else if (uiData == FAIL) + m_bLightningStruck = false; m_auiEncounter[uiType] = uiData; break; case TYPE_VOLKHAN: if (uiData == DONE) DoUseDoorOrButton(GO_VOLKHAN_DOOR); - if (uiData == IN_PROGRESS) + else if (uiData == IN_PROGRESS) m_bIsShatterResistant = true; - if (uiData == SPECIAL) + else if (uiData == SPECIAL) m_bIsShatterResistant = false; m_auiEncounter[uiType] = uiData; break; @@ -99,7 +104,7 @@ void instance_halls_of_lightning::SetData(uint32 uiType, uint32 uiData) case TYPE_LOKEN: if (uiData == IN_PROGRESS) DoStartTimedAchievement(ACHIEVEMENT_CRITERIA_TYPE_KILL_CREATURE, ACHIEV_START_LOKEN_ID); - if (uiData == DONE) + else if (uiData == DONE) { // Appears to be type 5 GO with animation. Need to figure out how this work, code below only placeholder if (GameObject* pGlobe = GetSingleGameObjectFromStorage(GO_LOKEN_THRONE)) @@ -133,8 +138,13 @@ uint32 instance_halls_of_lightning::GetData(uint32 uiType) const bool instance_halls_of_lightning::CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* /*pSource*/, Unit const* /*pTarget*/, uint32 /*uiMiscValue1 = 0*/) const { - if (uiCriteriaId == ACHIEV_CRIT_RESISTANT) - return m_bIsShatterResistant; + switch (uiCriteriaId) + { + case ACHIEV_CRIT_LIGHTNING: + return m_bLightningStruck; + case ACHIEV_CRIT_RESISTANT: + return m_bIsShatterResistant; + } return false; } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 89927dfc9..19e01f7d2 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2847" + #define SD2_REVISION_NR "2848" #endif // __SD2_REVISION_NR_H__ From d8138c134d545d204180d2645c897043bf90a8cc Mon Sep 17 00:00:00 2001 From: Xfurry Date: Wed, 3 Apr 2013 01:32:35 +0300 Subject: [PATCH 0850/1172] [2849] Implement achievs: Brann Spankin' New and Don't Look Up --- .../boss_scourgelord_tyrannus.cpp | 4 ++-- .../pit_of_saron/instance_pit_of_saron.cpp | 8 +++----- .../pit_of_saron/pit_of_saron.cpp | 4 ++-- .../ulduar/halls_of_stone/halls_of_stone.cpp | 20 +++++++++++++++---- .../ulduar/halls_of_stone/halls_of_stone.h | 1 + .../instance_halls_of_stone.cpp | 12 +++++++---- sd2_revision_nr.h | 2 +- 7 files changed, 33 insertions(+), 18 deletions(-) diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_scourgelord_tyrannus.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_scourgelord_tyrannus.cpp index f3ab8c102..281534a05 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_scourgelord_tyrannus.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_scourgelord_tyrannus.cpp @@ -245,8 +245,8 @@ struct MANGOS_DLL_DECL boss_rimefang_posAI : public ScriptedAI void AttackStart(Unit* pWho) override { - // Don't attack unless Tyrannus is in combat - if (m_pInstance && m_pInstance->GetData(TYPE_TYRANNUS) != IN_PROGRESS) + // Don't attack unless Tyrannus is in combat or Ambush is completed + if (m_pInstance && (m_pInstance->GetData(TYPE_AMBUSH) != DONE || m_pInstance->GetData(TYPE_TYRANNUS) != IN_PROGRESS)) return; ScriptedAI::AttackStart(pWho); diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/instance_pit_of_saron.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/instance_pit_of_saron.cpp index d57526465..81ad57ec0 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/instance_pit_of_saron.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/instance_pit_of_saron.cpp @@ -307,12 +307,10 @@ void instance_pit_of_saron::SetData(uint32 uiType, uint32 uiData) case TYPE_AMBUSH: if (uiData == DONE) { - Creature* pTyrannus = GetSingleCreatureFromStorage(NPC_TYRANNUS); - if (!pTyrannus) - return; + // Complete tunnel achievement + if (Creature* pTyrannus = GetSingleCreatureFromStorage(NPC_TYRANNUS)) + pTyrannus->CastSpell(pTyrannus, SPELL_ACHIEVEMENT_CHECK, true); - // ToDo: enable this when the achiev check spells are implemented - // pTyrannus->CastSpell(pTyrannus, SPELL_ACHIEVEMENT_CHECK, true); m_uiIciclesTimer = 0; } m_auiEncounter[uiType] = uiData; diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/pit_of_saron.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/pit_of_saron.cpp index 77b9dd054..690f344f4 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/pit_of_saron.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/pit_of_saron.cpp @@ -36,7 +36,7 @@ enum // Icicles SPELL_ICICLE = 69426, SPELL_ICICLE_DUMMY = 69428, - SPELL_ICE_SHARDS = 69425, + SPELL_ICE_SHARDS_H = 70827, // used to check the tunnel achievement }; /*###### @@ -132,7 +132,7 @@ struct MANGOS_DLL_DECL npc_collapsing_icicleAI : public ScriptedAI void SpellHitTarget(Unit* pTarget, const SpellEntry* pSpell) override { // Mark the achiev failed - if (pSpell->Id == SPELL_ICE_SHARDS && pTarget->GetTypeId() == TYPEID_PLAYER && m_pInstance) + if (pSpell->Id == SPELL_ICE_SHARDS_H && pTarget->GetTypeId() == TYPEID_PLAYER && m_pInstance) m_pInstance->SetSpecialAchievementCriteria(TYPE_ACHIEV_DONT_LOOK_UP, false); } diff --git a/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.cpp b/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.cpp index 871a87213..3e21d1a2c 100644 --- a/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.cpp +++ b/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.cpp @@ -107,8 +107,6 @@ enum SPELL_STEALTH = 58506, - SPELL_ACHIEVEMENT_CHECK = 59046, // Doesn't exist in client dbc - NPC_DARK_RUNE_PROTECTOR = 27983, NPC_DARK_RUNE_STORMCALLER = 27984, NPC_IRON_GOLEM_CUSTODIAN = 27985, @@ -195,11 +193,21 @@ struct MANGOS_DLL_DECL npc_brann_hosAI : public npc_escortAI npc_escortAI::AttackStart(pWho); } + void DamageTaken(Unit* /*pDealer*/, uint32& uiDamage) override + { + // If Brann takes damage, mark the achiev as failed + if (uiDamage && m_pInstance) + m_pInstance->SetBrannSpankin(false); + } + void ContinueEvent() { if (!m_pInstance || m_pInstance->GetData(TYPE_TRIBUNAL) != IN_PROGRESS) return; + // Set the achiev in progress + m_pInstance->SetBrannSpankin(true); + m_creature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); SetRun(true); SetEscortPaused(false); @@ -444,6 +452,12 @@ struct MANGOS_DLL_DECL npc_brann_hosAI : public npc_escortAI m_creature->SetStandState(UNIT_STAND_STATE_STAND);// TODO TODO if (m_pInstance) m_pInstance->SetData(TYPE_TRIBUNAL, SPECIAL); // Kill remaining npcs + + // ToDo: the loot and the achiev should be triggered at this point + // Brann should get the gossip option "There will be plenty of time for this later Brann, we need to get moving!" + // This will allow Brann to continue the escort to the last encounter + // When reaching the last door he has the gossip "We're with you Brann! Open it!" + SetEscortPaused(false); m_uiPhaseTimer = 3000; // break; @@ -550,8 +564,6 @@ struct MANGOS_DLL_DECL npc_brann_hosAI : public npc_escortAI m_pInstance->SetData(TYPE_TRIBUNAL, DONE); } - // Should cast spell 59046 (doesn't exist in client dbc), criterias are ACHIEVEMENT_CRITERIA_TYPE_BE_SPELL_TARGET - Player* pPlayer = GetPlayerForEscort(); if (pPlayer) pPlayer->GroupEventHappens(QUEST_HALLS_OF_STONE, m_creature); diff --git a/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.h b/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.h index 68f741bbb..6051eb6e3 100644 --- a/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.h +++ b/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.h @@ -93,6 +93,7 @@ class MANGOS_DLL_DECL instance_halls_of_stone : public ScriptedInstance void ActivateFace(uint8 uiFace, bool bAfterEvent); void DoFaceSpeak(uint8 uiFace, int32 iTextId); + void SetBrannSpankin(bool bIsMet) { m_bIsBrannSpankin = bIsMet; } ObjectGuid GetProtectorStalkerGuid() { return m_protectorStalkerGuid; } ObjectGuid GeStormcallerStalkerGuid() { return m_stormcallerStalkerGuid; } diff --git a/scripts/northrend/ulduar/halls_of_stone/instance_halls_of_stone.cpp b/scripts/northrend/ulduar/halls_of_stone/instance_halls_of_stone.cpp index 2bec69ea5..0d325193f 100644 --- a/scripts/northrend/ulduar/halls_of_stone/instance_halls_of_stone.cpp +++ b/scripts/northrend/ulduar/halls_of_stone/instance_halls_of_stone.cpp @@ -37,11 +37,12 @@ enum SPELL_SUMMON_SEARING_GAZE_TARGET = 51146, // The other spells are handled in individual script SPELL_KILL_TRIBUNAL_ADD = 51288, // Cleanup event on finish + SPELL_ACHIEVEMENT_CHECK = 59046, // Doesn't exist in client dbc - added in spell_template }; instance_halls_of_stone::instance_halls_of_stone(Map* pMap) : ScriptedInstance(pMap), - m_bIsBrannSpankin(false), - m_uiIronSludgeKilled(0) + m_uiIronSludgeKilled(0), + m_bIsBrannSpankin(false) { Initialize(); } @@ -119,10 +120,13 @@ void instance_halls_of_stone::SetData(uint32 uiType, uint32 uiData) { case IN_PROGRESS: SortFaces(); - // Uncomment when this achievement is implemented - // m_bIsBrannSpankin = true; break; case DONE: + // Cast achiev check spell - Note: it's not clear who casts this spell, but for the moment we'll use Abedneum + if (Creature* pEye = instance->GetCreature(m_aFaces[1].m_leftEyeGuid)) + pEye->CastSpell(pEye, SPELL_ACHIEVEMENT_CHECK, true); + // Spawn the loot + DoRespawnGameObject(instance->IsRegularDifficulty() ? GO_TRIBUNAL_CHEST : GO_TRIBUNAL_CHEST_H, 30 * MINUTE); DoToggleGameObjectFlags(instance->IsRegularDifficulty() ? GO_TRIBUNAL_CHEST : GO_TRIBUNAL_CHEST_H, GO_FLAG_NO_INTERACT, false); // Door workaround because of the missing Bran event DoUseDoorOrButton(GO_DOOR_SJONNIR); diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 19e01f7d2..7d4b5e4a8 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2848" + #define SD2_REVISION_NR "2849" #endif // __SD2_REVISION_NR_H__ From f415d4935d799fd19a8d9aa3742881f97a3fd8e4 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Wed, 3 Apr 2013 10:37:50 +0300 Subject: [PATCH 0851/1172] [2850] Add achievement support for Assembly of Iron and the Four Horsemen This will also implement achievement: And They Would All Go Down Together --- .../naxxramas/boss_four_horsemen.cpp | 30 ++++++++++++++-- .../naxxramas/instance_naxxramas.cpp | 35 ++++++++++++++----- scripts/northrend/naxxramas/naxxramas.h | 3 ++ .../ulduar/ulduar/assembly_of_iron.cpp | 11 +++++- sd2_revision_nr.h | 2 +- 5 files changed, 67 insertions(+), 14 deletions(-) diff --git a/scripts/northrend/naxxramas/boss_four_horsemen.cpp b/scripts/northrend/naxxramas/boss_four_horsemen.cpp index cf766f8cc..6a929d322 100644 --- a/scripts/northrend/naxxramas/boss_four_horsemen.cpp +++ b/scripts/northrend/naxxramas/boss_four_horsemen.cpp @@ -17,7 +17,7 @@ /* ScriptData SDName: Boss_Four_Horsemen SD%Complete: 90 -SDComment: Lady Blaumeux, Thane Korthazz, Sir Zeliek, Baron Rivendare; Berserk NYI; Achievements NYI. +SDComment: Lady Blaumeux, Thane Korthazz, Sir Zeliek, Baron Rivendare; Berserk NYI. SDCategory: Naxxramas EndScriptData */ @@ -58,10 +58,10 @@ enum // ***** Spells ***** // all horsemen - // SPELL_SHIELDWALL = 29061, // not used in 3.x.x + // SPELL_SHIELDWALL = 29061, // not used in 3.x.x SPELL_BESERK = 26662, + SPELL_ACHIEV_CHECK = 59450, // Note: Berserk should be applied once 100 marks are casted. - // Also spell 59450, which is missing from DBC, is required for the achiev // lady blaumeux SPELL_MARK_OF_BLAUMEUX = 28833, @@ -151,7 +151,13 @@ struct MANGOS_DLL_DECL boss_lady_blaumeuxAI : public ScriptedAI DoScriptText(SAY_BLAU_DEATH, m_creature); if (m_pInstance) + { m_pInstance->SetData(TYPE_FOUR_HORSEMEN, SPECIAL); + + // Cast achiev check for last boss killed + if (m_pInstance->GetData(TYPE_FOUR_HORSEMEN) == DONE) + m_creature->CastSpell(m_creature, SPELL_ACHIEV_CHECK, true); + } } void JustReachedHome() override @@ -270,7 +276,13 @@ struct MANGOS_DLL_DECL boss_rivendare_naxxAI : public ScriptedAI DoScriptText(SAY_RIVE_DEATH, m_creature); if (m_pInstance) + { m_pInstance->SetData(TYPE_FOUR_HORSEMEN, SPECIAL); + + // Cast achiev check for last boss killed + if (m_pInstance->GetData(TYPE_FOUR_HORSEMEN) == DONE) + m_creature->CastSpell(m_creature, SPELL_ACHIEV_CHECK, true); + } } void JustReachedHome() override @@ -371,7 +383,13 @@ struct MANGOS_DLL_DECL boss_thane_korthazzAI : public ScriptedAI DoScriptText(SAY_KORT_DEATH, m_creature); if (m_pInstance) + { m_pInstance->SetData(TYPE_FOUR_HORSEMEN, SPECIAL); + + // Cast achiev check for last boss killed + if (m_pInstance->GetData(TYPE_FOUR_HORSEMEN) == DONE) + m_creature->CastSpell(m_creature, SPELL_ACHIEV_CHECK, true); + } } void JustReachedHome() override @@ -474,7 +492,13 @@ struct MANGOS_DLL_DECL boss_sir_zeliekAI : public ScriptedAI DoScriptText(SAY_ZELI_DEATH, m_creature); if (m_pInstance) + { m_pInstance->SetData(TYPE_FOUR_HORSEMEN, SPECIAL); + + // Cast achiev check for last boss killed + if (m_pInstance->GetData(TYPE_FOUR_HORSEMEN) == DONE) + m_creature->CastSpell(m_creature, SPELL_ACHIEV_CHECK, true); + } } void JustReachedHome() override diff --git a/scripts/northrend/naxxramas/instance_naxxramas.cpp b/scripts/northrend/naxxramas/instance_naxxramas.cpp index c3efc4960..7a1c015b5 100644 --- a/scripts/northrend/naxxramas/instance_naxxramas.cpp +++ b/scripts/northrend/naxxramas/instance_naxxramas.cpp @@ -49,6 +49,7 @@ instance_naxxramas::instance_naxxramas(Map* pMap) : ScriptedInstance(pMap), m_fChamberCenterY(0.0f), m_fChamberCenterZ(0.0f), m_uiTauntTimer(0), + m_uiHorsemenAchievTimer(0), m_uiHorseMenKilled(0), m_dialogueHelper(aNaxxDialogue) { @@ -286,7 +287,7 @@ void instance_naxxramas::SetData(uint32 uiType, uint32 uiData) DoUseDoorOrButton(GO_ARAC_FAER_WEB); if (uiData == IN_PROGRESS) SetSpecialAchievementCriteria(TYPE_ACHIEV_KNOCK_YOU_OUT, true); - if (uiData == DONE) + else if (uiData == DONE) { DoUseDoorOrButton(GO_ARAC_FAER_DOOR); DoUseDoorOrButton(GO_ARAC_MAEX_OUTER_DOOR); @@ -319,7 +320,7 @@ void instance_naxxramas::SetData(uint32 uiType, uint32 uiData) DoUseDoorOrButton(GO_PLAG_HEIG_ENTRY_DOOR); if (uiData == IN_PROGRESS) SetSpecialAchievementCriteria(TYPE_ACHIEV_SAFETY_DANCE, true); - if (uiData == DONE) + else if (uiData == DONE) DoUseDoorOrButton(GO_PLAG_HEIG_EXIT_DOOR); break; case TYPE_LOATHEB: @@ -327,7 +328,7 @@ void instance_naxxramas::SetData(uint32 uiType, uint32 uiData) DoUseDoorOrButton(GO_PLAG_LOAT_DOOR); if (uiData == IN_PROGRESS) SetSpecialAchievementCriteria(TYPE_ACHIEV_SPORE_LOSER, true); - if (uiData == DONE) + else if (uiData == DONE) { DoUseDoorOrButton(GO_PLAG_EYE_RAMP); DoUseDoorOrButton(GO_PLAG_EYE_BOSS); @@ -369,21 +370,24 @@ void instance_naxxramas::SetData(uint32 uiType, uint32 uiData) // Skip if already set if (m_auiEncounter[uiType] == uiData) return; + if (uiData == SPECIAL) { + // Start the achiev countdown + if (!m_uiHorseMenKilled) + m_uiHorsemenAchievTimer = 15000; + ++m_uiHorseMenKilled; if (m_uiHorseMenKilled == 4) SetData(TYPE_FOUR_HORSEMEN, DONE); // Don't store special data - break; + return; } - if (uiData == FAIL) + else if (uiData == FAIL) m_uiHorseMenKilled = 0; - m_auiEncounter[uiType] = uiData; - DoUseDoorOrButton(GO_MILI_HORSEMEN_DOOR); - if (uiData == DONE) + else if (uiData == DONE) { DoUseDoorOrButton(GO_MILI_EYE_RAMP); DoUseDoorOrButton(GO_MILI_EYE_BOSS); @@ -392,12 +396,14 @@ void instance_naxxramas::SetData(uint32 uiType, uint32 uiData) DoRespawnGameObject(instance->IsRegularDifficulty() ? GO_CHEST_HORSEMEN_NORM : GO_CHEST_HORSEMEN_HERO, 30 * MINUTE); m_uiTauntTimer = 5000; } + DoUseDoorOrButton(GO_MILI_HORSEMEN_DOOR); + m_auiEncounter[uiType] = uiData; break; case TYPE_PATCHWERK: m_auiEncounter[uiType] = uiData; if (uiData == IN_PROGRESS) DoStartTimedAchievement(ACHIEVEMENT_CRITERIA_TYPE_KILL_CREATURE, ACHIEV_START_PATCHWERK_ID); - if (uiData == DONE) + else if (uiData == DONE) DoUseDoorOrButton(GO_CONS_PATH_EXIT_DOOR); break; case TYPE_GROBBULUS: @@ -532,6 +538,9 @@ bool instance_naxxramas::CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Playe case ACHIEV_CRIT_GET_ENOUGH_N: case ACHIEV_CRIT_GET_ENOUGH_H: return m_abAchievCriteria[TYPE_ACHIEV_GET_ENOUGH]; + case ACHIEV_CRIT_TOGETHER_N: + case ACHIEV_CRIT_TOGETHER_H: + return m_uiHorsemenAchievTimer > 0; // 'The Immortal'(25m) or 'Undying'(10m) - (achievs 2186, 2187) case ACHIEV_CRIT_IMMORTAL_KEL: case ACHIEV_CRIT_IMMOORTAL_LOA: @@ -570,6 +579,14 @@ void instance_naxxramas::Update(uint32 uiDiff) m_uiTauntTimer -= uiDiff; } + if (m_uiHorsemenAchievTimer) + { + if (m_uiHorsemenAchievTimer <= uiDiff) + m_uiHorsemenAchievTimer = 0; + else + m_uiHorsemenAchievTimer -= uiDiff; + } + m_dialogueHelper.DialogueUpdate(uiDiff); } diff --git a/scripts/northrend/naxxramas/naxxramas.h b/scripts/northrend/naxxramas/naxxramas.h index 00087e491..2d8ee8ac6 100644 --- a/scripts/northrend/naxxramas/naxxramas.h +++ b/scripts/northrend/naxxramas/naxxramas.h @@ -172,6 +172,8 @@ enum ACHIEV_CRIT_KNOCK_YOU_OUT_H = 7549, ACHIEV_CRIT_HUNDRED_CLUB_N = 7567, // Sapphiron, achievs 2146, 2147 ACHIEV_CRIT_HUNDRED_CLUB_H = 7568, + ACHIEV_CRIT_TOGETHER_N = 7600, // Four Horsemen, achievs 2176, 2177 + ACHIEV_CRIT_TOGETHER_H = 7601, ACHIEV_CRIT_SHOCKING_N = 7604, // Thaddius, achievs 2178, 2179 ACHIEV_CRIT_SHOCKING_H = 7605, ACHIEV_CRIT_SPORE_LOSER_N = 7612, // Loatheb, achievs 2182, 2183 @@ -262,6 +264,7 @@ class MANGOS_DLL_DECL instance_naxxramas : public ScriptedInstance float m_fChamberCenterZ; uint32 m_uiTauntTimer; + uint32 m_uiHorsemenAchievTimer; uint8 m_uiHorseMenKilled; DialogueHelper m_dialogueHelper; diff --git a/scripts/northrend/ulduar/ulduar/assembly_of_iron.cpp b/scripts/northrend/ulduar/ulduar/assembly_of_iron.cpp index b7e041414..a6a318c06 100644 --- a/scripts/northrend/ulduar/ulduar/assembly_of_iron.cpp +++ b/scripts/northrend/ulduar/ulduar/assembly_of_iron.cpp @@ -57,7 +57,7 @@ enum SPELL_SUPERCHARGE = 61920, SPELL_LIGHTNING_CHANNEL_PREFIGHT = 61942, // cast by Brundir on Steelbreaker SPELL_RUNE_OF_POWER_PREFIGHT = 61975, // cast by Molgeim on Stellbreaker - // SPELL_COUNCIL_KILL_CREDIT = 65195, // currently missing from DBC + SPELL_COUNCIL_KILL_CREDIT = 65195, // currently missing from DBC // Steelbreaker SPELL_HIGH_VOLTAGE = 61890, // phase 1 spells @@ -164,7 +164,10 @@ struct MANGOS_DLL_DECL boss_brundirAI : public ScriptedAI m_pInstance->SetSpecialAchievementCriteria(TYPE_ACHIEV_BRUNDIR, false); } else + { m_pInstance->SetData(TYPE_ASSEMBLY, DONE); + m_creature->CastSpell(m_creature, SPELL_COUNCIL_KILL_CREDIT, true); + } DoScriptText(urand(0, 1) ? SAY_BRUNDIR_DEATH_1 : SAY_BRUNDIR_DEATH_2, m_creature); } @@ -461,7 +464,10 @@ struct MANGOS_DLL_DECL boss_molgeimAI : public ScriptedAI m_pInstance->SetSpecialAchievementCriteria(TYPE_ACHIEV_MOLGEIM, false); } else + { m_pInstance->SetData(TYPE_ASSEMBLY, DONE); + m_creature->CastSpell(m_creature, SPELL_COUNCIL_KILL_CREDIT, true); + } DoScriptText(urand(0, 1) ? SAY_MOLGEIM_DEATH_1 : SAY_MOLGEIM_DEATH_2, m_creature); } @@ -639,7 +645,10 @@ struct MANGOS_DLL_DECL boss_steelbreakerAI : public ScriptedAI m_pInstance->SetSpecialAchievementCriteria(TYPE_ACHIEV_STEELBREAKER, false); } else + { m_pInstance->SetData(TYPE_ASSEMBLY, DONE); + m_creature->CastSpell(m_creature, SPELL_COUNCIL_KILL_CREDIT, true); + } DoScriptText(urand(0, 1) ? SAY_STEEL_DEATH_1 : SAY_STEEL_DEATH_2, m_creature); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 7d4b5e4a8..0257c5a58 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2849" + #define SD2_REVISION_NR "2850" #endif // __SD2_REVISION_NR_H__ From e0226193c5fe69f14b5cca0b751d63c2e2384b43 Mon Sep 17 00:00:00 2001 From: evil-at-wow Date: Tue, 2 Apr 2013 23:17:09 +0200 Subject: [PATCH 0852/1172] Some improvements to the Archaedas encounter in Uldaman. * Spawn the Ancient Treasure chest when the boss dies. * Correct the aura spell to be removed when he awakes. * Add emote when he awakes. --- .../eastern_kingdoms/uldaman/boss_archaedas.cpp | 16 +++++++++++----- .../uldaman/instance_uldaman.cpp | 5 +++++ scripts/eastern_kingdoms/uldaman/uldaman.h | 2 ++ sql/scriptdev2_script_full.sql | 3 ++- sql/updates/r9000_scriptdev2.sql | 3 +++ 5 files changed, 23 insertions(+), 6 deletions(-) create mode 100644 sql/updates/r9000_scriptdev2.sql diff --git a/scripts/eastern_kingdoms/uldaman/boss_archaedas.cpp b/scripts/eastern_kingdoms/uldaman/boss_archaedas.cpp index 8328ef88d..4a18a37a3 100644 --- a/scripts/eastern_kingdoms/uldaman/boss_archaedas.cpp +++ b/scripts/eastern_kingdoms/uldaman/boss_archaedas.cpp @@ -37,7 +37,8 @@ enum SAY_AGGRO = -1070001, SAY_AWAKE_GUARDIANS = -1070002, SAY_AWAKE_WARDERS = -1070003, - SAY_UNIT_SLAIN = -1070004 + SAY_UNIT_SLAIN = -1070004, + EMOTE_BREAKS_FREE = -1070005 }; struct MANGOS_DLL_DECL boss_archaedasAI : public ScriptedAI @@ -97,9 +98,9 @@ struct MANGOS_DLL_DECL boss_archaedasAI : public ScriptedAI { if (pTarget->GetTypeId() != TYPEID_PLAYER) { - if (pTarget->HasAura(SPELL_STONED, EFFECT_INDEX_0)) + if (pTarget->HasAura(SPELL_FREEZE_ANIM, EFFECT_INDEX_0)) { - pTarget->RemoveAurasDueToSpell(SPELL_STONED); + pTarget->RemoveAurasDueToSpell(SPELL_FREEZE_ANIM); if (Unit* pUnit = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) { @@ -126,12 +127,18 @@ struct MANGOS_DLL_DECL boss_archaedasAI : public ScriptedAI { case 0: DoCastSpellIfCan(m_creature, SPELL_ARCHAEDAS_AWAKEN_VISUAL); + m_uiAwakeningTimer = 2000; break; case 1: + DoScriptText(EMOTE_BREAKS_FREE, m_creature); + m_uiAwakeningTimer = 3000; + break; + case 2: DoScriptText(SAY_AGGRO, m_creature, NULL); m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + m_uiAwakeningTimer = 5000; break; - case 2: + case 3: if (Player* pPlayer = m_creature->GetMap()->GetPlayer(m_pInstance->GetGuid(DATA_EVENT_STARTER))) AttackStart(pPlayer); else @@ -142,7 +149,6 @@ struct MANGOS_DLL_DECL boss_archaedasAI : public ScriptedAI } ++m_uiSubevent; - m_uiAwakeningTimer = 5000; } else m_uiAwakeningTimer -= uiDiff; diff --git a/scripts/eastern_kingdoms/uldaman/instance_uldaman.cpp b/scripts/eastern_kingdoms/uldaman/instance_uldaman.cpp index 2a1488459..d031bd9c3 100644 --- a/scripts/eastern_kingdoms/uldaman/instance_uldaman.cpp +++ b/scripts/eastern_kingdoms/uldaman/instance_uldaman.cpp @@ -53,6 +53,10 @@ void instance_uldaman::OnObjectCreate(GameObject* pGo) if (m_auiEncounter[1] == DONE) pGo->SetGoState(GO_STATE_ACTIVE); break; + case GO_ANCIENT_TREASURE: + // We need to store this in m_mGoEntryGuidStore so + // we can spawn it later using DoRespawnGameObject. + break; default: return; } @@ -116,6 +120,7 @@ void instance_uldaman::SetData(uint32 uiType, uint32 uiData) pWarden->ForcedDespawn(); } DoUseDoorOrButton(GO_ANCIENT_VAULT); + DoRespawnGameObject(GO_ANCIENT_TREASURE, HOUR); } m_auiEncounter[1] = uiData; break; diff --git a/scripts/eastern_kingdoms/uldaman/uldaman.h b/scripts/eastern_kingdoms/uldaman/uldaman.h index 6e9e90697..3124b2f9f 100644 --- a/scripts/eastern_kingdoms/uldaman/uldaman.h +++ b/scripts/eastern_kingdoms/uldaman/uldaman.h @@ -16,6 +16,7 @@ enum GO_TEMPLE_DOOR_UPPER = 124367, GO_TEMPLE_DOOR_LOWER = 141869, GO_ANCIENT_VAULT = 124369, + GO_ANCIENT_TREASURE = 141979, NPC_CUSTODIAN = 7309, NPC_HALLSHAPER = 7077, @@ -28,6 +29,7 @@ enum PHASE_ARCHA_3 = 3, SPELL_STONED = 10255, + SPELL_FREEZE_ANIM = 16245, EVENT_ID_ALTAR_KEEPER = 2228, // spell 11568 EVENT_ID_ALTAR_ARCHAEDAS = 2268 // spell 10340 diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 7f08f4fbf..4b7aef6d2 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -1063,7 +1063,8 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1070001,'Who dares awaken Archaedas? Who dares the wrath of the makers!',5855,1,0,0,'archaedas SAY_AGGRO'), (-1070002,'Awake ye servants, defend the discs!',5856,1,0,0,'archaedas SAY_AWAKE_GUARDIANS'), (-1070003,'To my side, brothers. For the makers!',5857,1,0,0,'archaedas SAY_AWAKE_WARDERS'), -(-1070004,'Reckless mortal.',5858,1,0,0,'archaedas SAY_UNIT_SLAIN'); +(-1070004,'Reckless mortal.',5858,1,0,0,'archaedas SAY_UNIT_SLAIN'), +(-1070005,'%s breaks free from his stone slumber!',0,2,0,0,'archaedas EMOTE_BREAK_FREE'); -- -1 090 000 GNOMEREGAN INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES diff --git a/sql/updates/r9000_scriptdev2.sql b/sql/updates/r9000_scriptdev2.sql new file mode 100644 index 000000000..ad9b962cc --- /dev/null +++ b/sql/updates/r9000_scriptdev2.sql @@ -0,0 +1,3 @@ +DELETE FROM script_texts WHERE entry = -1070005; +INSERT INTO script_texts (entry, content_default, sound, type, language, emote, comment) VALUES +(-1070005,'%s breaks free from his stone slumber!', 0, 2, 0, 0, 'archaedas EMOTE_BREAK_FREE'); From 3e0f359127a36ad4553d2001c3fd9fccead430db Mon Sep 17 00:00:00 2001 From: Xfurry Date: Thu, 4 Apr 2013 00:56:11 +0300 Subject: [PATCH 0853/1172] [2851] Allow Ossirian to use the Sand Vortex --- .../ruins_of_ahnqiraj/boss_ossirian.cpp | 19 +++++++++++++++++-- sd2_revision_nr.h | 2 +- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/scripts/kalimdor/ruins_of_ahnqiraj/boss_ossirian.cpp b/scripts/kalimdor/ruins_of_ahnqiraj/boss_ossirian.cpp index 5d50bf623..4107ba852 100644 --- a/scripts/kalimdor/ruins_of_ahnqiraj/boss_ossirian.cpp +++ b/scripts/kalimdor/ruins_of_ahnqiraj/boss_ossirian.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: Boss_Ossirian -SD%Complete: 70% -SDComment: Tornados missing, Weather missing +SD%Complete: 80% +SDComment: Weather missing SDCategory: Ruins of Ahn'Qiraj EndScriptData */ @@ -55,6 +55,12 @@ enum NPC_SAND_VORTEX = 15428, // tornado npc }; +static const float aSandVortexSpawnPos[2][4] = +{ + {-9523.482f, 1880.435f, 85.645f, 5.08f}, + {-9321.39f, 1822.968f, 84.266f, 3.16f}, +}; + static const float aCrystalSpawnPos[3] = { -9355.75f, 1905.43f, 85.55f}; static const uint32 aWeaknessSpell[] = {SPELL_WEAKNESS_FIRE, SPELL_WEAKNESS_FROST, SPELL_WEAKNESS_NATURE, SPELL_WEAKNESS_ARCANE, SPELL_WEAKNESS_SHADOW}; @@ -92,6 +98,9 @@ struct MANGOS_DLL_DECL boss_ossirianAI : public ScriptedAI DoCastSpellIfCan(m_creature, SPELL_SUPREME, CAST_TRIGGERED); DoScriptText(SAY_AGGRO, m_creature); DoSpawnNextCrystal(); + + for (uint8 i = 0; i < countof(aSandVortexSpawnPos); ++i) + m_creature->SummonCreature(NPC_SAND_VORTEX, aSandVortexSpawnPos[i][0], aSandVortexSpawnPos[i][1], aSandVortexSpawnPos[i][2], aSandVortexSpawnPos[i][3], TEMPSUMMON_CORPSE_DESPAWN, 0); } void JustDied(Unit* /*pKiller*/) override @@ -140,6 +149,12 @@ struct MANGOS_DLL_DECL boss_ossirianAI : public ScriptedAI { if (pSummoned->GetEntry() == NPC_OSSIRIAN_TRIGGER) pSummoned->CastSpell(pSummoned, SPELL_SUMMON_CRYSTAL, true); + else if (pSummoned->GetEntry() == NPC_SAND_VORTEX) + { + // The movement of this isn't very clear - may require additional research + pSummoned->CastSpell(pSummoned, SPELL_SAND_STORM, true); + pSummoned->GetMotionMaster()->MoveRandomAroundPoint(aCrystalSpawnPos[0], aCrystalSpawnPos[1], aCrystalSpawnPos[2], 100.0f); + } } void SpellHit(Unit* pCaster, const SpellEntry* pSpell) override diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 0257c5a58..c8c1c02c2 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2850" + #define SD2_REVISION_NR "2851" #endif // __SD2_REVISION_NR_H__ From aebcc805c6881c87c482a9b12cf52ff6f52cd0d2 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Thu, 4 Apr 2013 22:32:10 +0300 Subject: [PATCH 0854/1172] [2852] Allow Hakkar to use Blood Siphon --- scripts/eastern_kingdoms/zulgurub/boss_hakkar.cpp | 10 ++++------ sd2_revision_nr.h | 2 +- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/scripts/eastern_kingdoms/zulgurub/boss_hakkar.cpp b/scripts/eastern_kingdoms/zulgurub/boss_hakkar.cpp index 080389085..142e8dc55 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_hakkar.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_hakkar.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: Boss_Hakkar -SD%Complete: 95 -SDComment: Blood siphon spell buggy cause of Core Issue. +SD%Complete: 100 +SDComment: SDCategory: Zul'Gurub EndScriptData */ @@ -29,7 +29,7 @@ enum SAY_AGGRO = -1309020, SAY_FLEEING = -1309021, - SPELL_BLOOD_SIPHON = 24324, // Related Spells 24322, 24323, 24324, likely starting spell is 24324 (disabled until proper fixed) + SPELL_BLOOD_SIPHON = 24324, // triggers 24322 or 24323 on caster SPELL_CORRUPTED_BLOOD = 24328, SPELL_CAUSE_INSANITY = 24327, SPELL_WILL_OF_HAKKAR = 24178, @@ -105,15 +105,13 @@ struct MANGOS_DLL_DECL boss_hakkarAI : public ScriptedAI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - /* Disabled as needs core fix// Blood Siphon Timer - * This also will requre spells 24320 24321 to be implemented (and used by the "Son of Hakkar" npcs) if (m_uiBloodSiphonTimer < uiDiff) { if (DoCastSpellIfCan(m_creature, SPELL_BLOOD_SIPHON) == CAST_OK) m_uiBloodSiphonTimer = 90000; } else - m_uiBloodSiphonTimer -= uiDiff; */ + m_uiBloodSiphonTimer -= uiDiff; // Corrupted Blood Timer if (m_uiCorruptedBloodTimer < uiDiff) diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index c8c1c02c2..4308dbe65 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2851" + #define SD2_REVISION_NR "2852" #endif // __SD2_REVISION_NR_H__ From e32549e1adaece5aa313cff26f540f273961ec7d Mon Sep 17 00:00:00 2001 From: Xfurry Date: Thu, 4 Apr 2013 23:31:54 +0300 Subject: [PATCH 0855/1172] Revert "Some improvements to the Archaedas encounter in Uldaman." This reverts commit e0226193c5fe69f14b5cca0b751d63c2e2384b43. --- .../eastern_kingdoms/uldaman/boss_archaedas.cpp | 16 +++++----------- .../uldaman/instance_uldaman.cpp | 5 ----- scripts/eastern_kingdoms/uldaman/uldaman.h | 2 -- sql/scriptdev2_script_full.sql | 3 +-- sql/updates/r9000_scriptdev2.sql | 3 --- 5 files changed, 6 insertions(+), 23 deletions(-) delete mode 100644 sql/updates/r9000_scriptdev2.sql diff --git a/scripts/eastern_kingdoms/uldaman/boss_archaedas.cpp b/scripts/eastern_kingdoms/uldaman/boss_archaedas.cpp index 4a18a37a3..8328ef88d 100644 --- a/scripts/eastern_kingdoms/uldaman/boss_archaedas.cpp +++ b/scripts/eastern_kingdoms/uldaman/boss_archaedas.cpp @@ -37,8 +37,7 @@ enum SAY_AGGRO = -1070001, SAY_AWAKE_GUARDIANS = -1070002, SAY_AWAKE_WARDERS = -1070003, - SAY_UNIT_SLAIN = -1070004, - EMOTE_BREAKS_FREE = -1070005 + SAY_UNIT_SLAIN = -1070004 }; struct MANGOS_DLL_DECL boss_archaedasAI : public ScriptedAI @@ -98,9 +97,9 @@ struct MANGOS_DLL_DECL boss_archaedasAI : public ScriptedAI { if (pTarget->GetTypeId() != TYPEID_PLAYER) { - if (pTarget->HasAura(SPELL_FREEZE_ANIM, EFFECT_INDEX_0)) + if (pTarget->HasAura(SPELL_STONED, EFFECT_INDEX_0)) { - pTarget->RemoveAurasDueToSpell(SPELL_FREEZE_ANIM); + pTarget->RemoveAurasDueToSpell(SPELL_STONED); if (Unit* pUnit = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) { @@ -127,18 +126,12 @@ struct MANGOS_DLL_DECL boss_archaedasAI : public ScriptedAI { case 0: DoCastSpellIfCan(m_creature, SPELL_ARCHAEDAS_AWAKEN_VISUAL); - m_uiAwakeningTimer = 2000; break; case 1: - DoScriptText(EMOTE_BREAKS_FREE, m_creature); - m_uiAwakeningTimer = 3000; - break; - case 2: DoScriptText(SAY_AGGRO, m_creature, NULL); m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - m_uiAwakeningTimer = 5000; break; - case 3: + case 2: if (Player* pPlayer = m_creature->GetMap()->GetPlayer(m_pInstance->GetGuid(DATA_EVENT_STARTER))) AttackStart(pPlayer); else @@ -149,6 +142,7 @@ struct MANGOS_DLL_DECL boss_archaedasAI : public ScriptedAI } ++m_uiSubevent; + m_uiAwakeningTimer = 5000; } else m_uiAwakeningTimer -= uiDiff; diff --git a/scripts/eastern_kingdoms/uldaman/instance_uldaman.cpp b/scripts/eastern_kingdoms/uldaman/instance_uldaman.cpp index d031bd9c3..2a1488459 100644 --- a/scripts/eastern_kingdoms/uldaman/instance_uldaman.cpp +++ b/scripts/eastern_kingdoms/uldaman/instance_uldaman.cpp @@ -53,10 +53,6 @@ void instance_uldaman::OnObjectCreate(GameObject* pGo) if (m_auiEncounter[1] == DONE) pGo->SetGoState(GO_STATE_ACTIVE); break; - case GO_ANCIENT_TREASURE: - // We need to store this in m_mGoEntryGuidStore so - // we can spawn it later using DoRespawnGameObject. - break; default: return; } @@ -120,7 +116,6 @@ void instance_uldaman::SetData(uint32 uiType, uint32 uiData) pWarden->ForcedDespawn(); } DoUseDoorOrButton(GO_ANCIENT_VAULT); - DoRespawnGameObject(GO_ANCIENT_TREASURE, HOUR); } m_auiEncounter[1] = uiData; break; diff --git a/scripts/eastern_kingdoms/uldaman/uldaman.h b/scripts/eastern_kingdoms/uldaman/uldaman.h index 3124b2f9f..6e9e90697 100644 --- a/scripts/eastern_kingdoms/uldaman/uldaman.h +++ b/scripts/eastern_kingdoms/uldaman/uldaman.h @@ -16,7 +16,6 @@ enum GO_TEMPLE_DOOR_UPPER = 124367, GO_TEMPLE_DOOR_LOWER = 141869, GO_ANCIENT_VAULT = 124369, - GO_ANCIENT_TREASURE = 141979, NPC_CUSTODIAN = 7309, NPC_HALLSHAPER = 7077, @@ -29,7 +28,6 @@ enum PHASE_ARCHA_3 = 3, SPELL_STONED = 10255, - SPELL_FREEZE_ANIM = 16245, EVENT_ID_ALTAR_KEEPER = 2228, // spell 11568 EVENT_ID_ALTAR_ARCHAEDAS = 2268 // spell 10340 diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 4b7aef6d2..7f08f4fbf 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -1063,8 +1063,7 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1070001,'Who dares awaken Archaedas? Who dares the wrath of the makers!',5855,1,0,0,'archaedas SAY_AGGRO'), (-1070002,'Awake ye servants, defend the discs!',5856,1,0,0,'archaedas SAY_AWAKE_GUARDIANS'), (-1070003,'To my side, brothers. For the makers!',5857,1,0,0,'archaedas SAY_AWAKE_WARDERS'), -(-1070004,'Reckless mortal.',5858,1,0,0,'archaedas SAY_UNIT_SLAIN'), -(-1070005,'%s breaks free from his stone slumber!',0,2,0,0,'archaedas EMOTE_BREAK_FREE'); +(-1070004,'Reckless mortal.',5858,1,0,0,'archaedas SAY_UNIT_SLAIN'); -- -1 090 000 GNOMEREGAN INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES diff --git a/sql/updates/r9000_scriptdev2.sql b/sql/updates/r9000_scriptdev2.sql deleted file mode 100644 index ad9b962cc..000000000 --- a/sql/updates/r9000_scriptdev2.sql +++ /dev/null @@ -1,3 +0,0 @@ -DELETE FROM script_texts WHERE entry = -1070005; -INSERT INTO script_texts (entry, content_default, sound, type, language, emote, comment) VALUES -(-1070005,'%s breaks free from his stone slumber!', 0, 2, 0, 0, 'archaedas EMOTE_BREAK_FREE'); From cd049bad5d948f9d3945d7c596804dd3becc190d Mon Sep 17 00:00:00 2001 From: evil-at-wow Date: Thu, 4 Apr 2013 23:40:29 +0300 Subject: [PATCH 0856/1172] [2853] Some improvements to the Archaedas encounter in Uldaman. * Spawn the Ancient Treasure chest when the boss dies. * Correct the aura spell to be removed when he awakes. * Add emote when he awakes. Signed-off-by: Xfurry --- .../eastern_kingdoms/uldaman/boss_archaedas.cpp | 16 +++++++++++----- .../uldaman/instance_uldaman.cpp | 3 +++ scripts/eastern_kingdoms/uldaman/uldaman.h | 2 ++ sd2_revision_nr.h | 2 +- sql/scriptdev2_script_full.sql | 3 ++- sql/updates/r2853_scriptdev2.sql | 3 +++ 6 files changed, 22 insertions(+), 7 deletions(-) create mode 100644 sql/updates/r2853_scriptdev2.sql diff --git a/scripts/eastern_kingdoms/uldaman/boss_archaedas.cpp b/scripts/eastern_kingdoms/uldaman/boss_archaedas.cpp index 8328ef88d..ecd73b513 100644 --- a/scripts/eastern_kingdoms/uldaman/boss_archaedas.cpp +++ b/scripts/eastern_kingdoms/uldaman/boss_archaedas.cpp @@ -37,7 +37,8 @@ enum SAY_AGGRO = -1070001, SAY_AWAKE_GUARDIANS = -1070002, SAY_AWAKE_WARDERS = -1070003, - SAY_UNIT_SLAIN = -1070004 + SAY_UNIT_SLAIN = -1070004, + EMOTE_BREAKS_FREE = -1070005, }; struct MANGOS_DLL_DECL boss_archaedasAI : public ScriptedAI @@ -97,9 +98,9 @@ struct MANGOS_DLL_DECL boss_archaedasAI : public ScriptedAI { if (pTarget->GetTypeId() != TYPEID_PLAYER) { - if (pTarget->HasAura(SPELL_STONED, EFFECT_INDEX_0)) + if (pTarget->HasAura(SPELL_FREEZE_ANIM)) { - pTarget->RemoveAurasDueToSpell(SPELL_STONED); + pTarget->RemoveAurasDueToSpell(SPELL_FREEZE_ANIM); if (Unit* pUnit = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) { @@ -126,12 +127,18 @@ struct MANGOS_DLL_DECL boss_archaedasAI : public ScriptedAI { case 0: DoCastSpellIfCan(m_creature, SPELL_ARCHAEDAS_AWAKEN_VISUAL); + m_uiAwakeningTimer = 2000; break; case 1: + DoScriptText(EMOTE_BREAKS_FREE, m_creature); + m_uiAwakeningTimer = 3000; + break; + case 2: DoScriptText(SAY_AGGRO, m_creature, NULL); m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + m_uiAwakeningTimer = 5000; break; - case 2: + case 3: if (Player* pPlayer = m_creature->GetMap()->GetPlayer(m_pInstance->GetGuid(DATA_EVENT_STARTER))) AttackStart(pPlayer); else @@ -142,7 +149,6 @@ struct MANGOS_DLL_DECL boss_archaedasAI : public ScriptedAI } ++m_uiSubevent; - m_uiAwakeningTimer = 5000; } else m_uiAwakeningTimer -= uiDiff; diff --git a/scripts/eastern_kingdoms/uldaman/instance_uldaman.cpp b/scripts/eastern_kingdoms/uldaman/instance_uldaman.cpp index 2a1488459..a1998105c 100644 --- a/scripts/eastern_kingdoms/uldaman/instance_uldaman.cpp +++ b/scripts/eastern_kingdoms/uldaman/instance_uldaman.cpp @@ -53,6 +53,8 @@ void instance_uldaman::OnObjectCreate(GameObject* pGo) if (m_auiEncounter[1] == DONE) pGo->SetGoState(GO_STATE_ACTIVE); break; + case GO_ANCIENT_TREASURE: + break; default: return; } @@ -116,6 +118,7 @@ void instance_uldaman::SetData(uint32 uiType, uint32 uiData) pWarden->ForcedDespawn(); } DoUseDoorOrButton(GO_ANCIENT_VAULT); + DoRespawnGameObject(GO_ANCIENT_TREASURE, 30 * MINUTE); } m_auiEncounter[1] = uiData; break; diff --git a/scripts/eastern_kingdoms/uldaman/uldaman.h b/scripts/eastern_kingdoms/uldaman/uldaman.h index 6e9e90697..3124b2f9f 100644 --- a/scripts/eastern_kingdoms/uldaman/uldaman.h +++ b/scripts/eastern_kingdoms/uldaman/uldaman.h @@ -16,6 +16,7 @@ enum GO_TEMPLE_DOOR_UPPER = 124367, GO_TEMPLE_DOOR_LOWER = 141869, GO_ANCIENT_VAULT = 124369, + GO_ANCIENT_TREASURE = 141979, NPC_CUSTODIAN = 7309, NPC_HALLSHAPER = 7077, @@ -28,6 +29,7 @@ enum PHASE_ARCHA_3 = 3, SPELL_STONED = 10255, + SPELL_FREEZE_ANIM = 16245, EVENT_ID_ALTAR_KEEPER = 2228, // spell 11568 EVENT_ID_ALTAR_ARCHAEDAS = 2268 // spell 10340 diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 4308dbe65..5ae0d1351 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2852" + #define SD2_REVISION_NR "2853" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 7f08f4fbf..4b7aef6d2 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -1063,7 +1063,8 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1070001,'Who dares awaken Archaedas? Who dares the wrath of the makers!',5855,1,0,0,'archaedas SAY_AGGRO'), (-1070002,'Awake ye servants, defend the discs!',5856,1,0,0,'archaedas SAY_AWAKE_GUARDIANS'), (-1070003,'To my side, brothers. For the makers!',5857,1,0,0,'archaedas SAY_AWAKE_WARDERS'), -(-1070004,'Reckless mortal.',5858,1,0,0,'archaedas SAY_UNIT_SLAIN'); +(-1070004,'Reckless mortal.',5858,1,0,0,'archaedas SAY_UNIT_SLAIN'), +(-1070005,'%s breaks free from his stone slumber!',0,2,0,0,'archaedas EMOTE_BREAK_FREE'); -- -1 090 000 GNOMEREGAN INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES diff --git a/sql/updates/r2853_scriptdev2.sql b/sql/updates/r2853_scriptdev2.sql new file mode 100644 index 000000000..ad9b962cc --- /dev/null +++ b/sql/updates/r2853_scriptdev2.sql @@ -0,0 +1,3 @@ +DELETE FROM script_texts WHERE entry = -1070005; +INSERT INTO script_texts (entry, content_default, sound, type, language, emote, comment) VALUES +(-1070005,'%s breaks free from his stone slumber!', 0, 2, 0, 0, 'archaedas EMOTE_BREAK_FREE'); From d0030bb6426f9f551f89d73ae9a732b16d23ee31 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Fri, 5 Apr 2013 01:12:17 +0300 Subject: [PATCH 0857/1172] [2854] Additional improvements to Uldaman --- .../uldaman/boss_archaedas.cpp | 146 +++++++++--------- .../uldaman/instance_uldaman.cpp | 58 +------ scripts/eastern_kingdoms/uldaman/uldaman.h | 7 +- sd2_revision_nr.h | 2 +- 4 files changed, 83 insertions(+), 130 deletions(-) diff --git a/scripts/eastern_kingdoms/uldaman/boss_archaedas.cpp b/scripts/eastern_kingdoms/uldaman/boss_archaedas.cpp index ecd73b513..34844fc10 100644 --- a/scripts/eastern_kingdoms/uldaman/boss_archaedas.cpp +++ b/scripts/eastern_kingdoms/uldaman/boss_archaedas.cpp @@ -26,13 +26,12 @@ EndScriptData */ enum { + SPELL_ARCHAEDAS_AWAKEN_VISUAL = 10347, SPELL_GROUND_TREMOR = 6524, - SPELL_AWAKEN_EARTHEN_GUARDIAN = 10252, - SPELL_AWAKEN_VAULT_WARDER = 10258, - SPELL_AWAKEN_EARTHEN_DWARF = 10259, - - SPELL_ARCHAEDAS_AWAKEN_VISUAL = 10347, + SPELL_AWAKEN_EARTHEN_GUARDIAN = 10252, // awaken all 7076 npcs + SPELL_AWAKEN_VAULT_WARDER = 10258, // awaken 2 npcs 10120 + SPELL_AWAKEN_EARTHEN_DWARF = 10259, // awaken random npc 7309 or 7077 SAY_AGGRO = -1070001, SAY_AWAKE_GUARDIANS = -1070002, @@ -53,20 +52,22 @@ struct MANGOS_DLL_DECL boss_archaedasAI : public ScriptedAI uint32 m_uiAwakeningTimer; uint32 m_uiAwakeDwarfTimer; + uint32 m_uiTremorTimer; uint8 m_uiSubevent; bool m_bDwarvesAwaken; - bool m_bGuardiansAwaken; - bool m_bWardersAwaken; + + uint8 m_uiHpPhaseCheck; void Reset() override { m_uiAwakeningTimer = 1000; m_uiSubevent = 0; m_uiAwakeDwarfTimer = 10000; - m_bGuardiansAwaken = false; - m_bWardersAwaken = false; + m_uiTremorTimer = urand(7000, 14000); m_bDwarvesAwaken = false; + m_uiHpPhaseCheck = 1; + DoCastSpellIfCan(m_creature, SPELL_FREEZE_ANIM); m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); } @@ -94,23 +95,6 @@ struct MANGOS_DLL_DECL boss_archaedasAI : public ScriptedAI m_pInstance->SetData(TYPE_ARCHAEDAS, FAIL); } - void SpellHitTarget(Unit* pTarget, const SpellEntry* /*pSpell*/) override - { - if (pTarget->GetTypeId() != TYPEID_PLAYER) - { - if (pTarget->HasAura(SPELL_FREEZE_ANIM)) - { - pTarget->RemoveAurasDueToSpell(SPELL_FREEZE_ANIM); - - if (Unit* pUnit = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) - { - pTarget->SetInCombatWith(pUnit); - pTarget->AddThreat(pUnit); - } - } - } - } - void UpdateAI(const uint32 uiDiff) override { // so many things are based in this script on instance data @@ -134,11 +118,11 @@ struct MANGOS_DLL_DECL boss_archaedasAI : public ScriptedAI m_uiAwakeningTimer = 3000; break; case 2: - DoScriptText(SAY_AGGRO, m_creature, NULL); + DoScriptText(SAY_AGGRO, m_creature); + m_creature->RemoveAurasDueToSpell(SPELL_FREEZE_ANIM); m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - m_uiAwakeningTimer = 5000; - break; - case 3: + + // Attack player if (Player* pPlayer = m_creature->GetMap()->GetPlayer(m_pInstance->GetGuid(DATA_EVENT_STARTER))) AttackStart(pPlayer); else @@ -157,12 +141,22 @@ struct MANGOS_DLL_DECL boss_archaedasAI : public ScriptedAI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; + // Phase switch + if (m_creature->GetHealthPercent() < 100.0f - 33.4f * (float)m_uiHpPhaseCheck) + { + if (DoCastSpellIfCan(m_creature, m_uiHpPhaseCheck == 1 ? SPELL_AWAKEN_EARTHEN_GUARDIAN : SPELL_AWAKEN_VAULT_WARDER) == CAST_OK) + { + DoScriptText(m_uiHpPhaseCheck == 1 ? SAY_AWAKE_GUARDIANS : SAY_AWAKE_WARDERS, m_creature); + ++m_uiHpPhaseCheck; + } + } + // Awake random Dwarf if (!m_bDwarvesAwaken && m_creature->GetHealthPercent() >= 33.0f) { - if (m_uiAwakeDwarfTimer <= uiDiff) + if (m_uiAwakeDwarfTimer < uiDiff) { - if (Creature* pEarthen = m_pInstance->GetClosestDwarfNotInCombat(m_creature, PHASE_ARCHA_1)) + if (Creature* pEarthen = m_pInstance->GetClosestDwarfNotInCombat(m_creature)) { if (DoCastSpellIfCan(pEarthen, SPELL_AWAKEN_EARTHEN_DWARF) == CAST_OK) m_uiAwakeDwarfTimer = urand(9000, 12000); @@ -174,64 +168,67 @@ struct MANGOS_DLL_DECL boss_archaedasAI : public ScriptedAI m_uiAwakeDwarfTimer -= uiDiff; } - // Awake Earthen Guardians - if (!m_bGuardiansAwaken && m_creature->GetHealthPercent() <= 66.0f) + if (m_uiTremorTimer < uiDiff) { - if (Creature* pGuard = m_pInstance->GetClosestDwarfNotInCombat(m_creature, PHASE_ARCHA_2)) - { - if (DoCastSpellIfCan(pGuard, SPELL_AWAKEN_EARTHEN_GUARDIAN) == CAST_OK) - { - DoScriptText(SAY_AWAKE_GUARDIANS, m_creature); - m_bGuardiansAwaken = true; - } - } - } - - // Awake Warders - if (!m_bWardersAwaken && m_creature->GetHealthPercent() <= 33.0f) - { - if (Creature* pWarder = m_pInstance->GetClosestDwarfNotInCombat(m_creature, PHASE_ARCHA_3)) - { - if (DoCastSpellIfCan(pWarder, SPELL_AWAKEN_VAULT_WARDER) == CAST_OK) - { - DoScriptText(SAY_AWAKE_WARDERS, m_creature); - m_bWardersAwaken = true; - } - } + if (DoCastSpellIfCan(m_creature, SPELL_GROUND_TREMOR) == CAST_OK) + m_uiTremorTimer = urand(8000, 17000); } + else + m_uiTremorTimer -= uiDiff; DoMeleeAttackIfReady(); } }; -struct MANGOS_DLL_DECL npc_archaeras_addAI : public ScriptedAI +CreatureAI* GetAI_boss_archaedas(Creature* pCreature) { - npc_archaeras_addAI(Creature* pCreature) : ScriptedAI(pCreature) - { - Reset(); - } + return new boss_archaedasAI(pCreature); +} - void Reset() override +bool EffectDummyCreature_npc_vault_warder(Unit* /*pCaster*/, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) +{ + // always check spellid and effectindex + if (uiSpellId == SPELL_AWAKEN_VAULT_WARDER && uiEffIndex == EFFECT_INDEX_0) { - } + if (pCreatureTarget->GetEntry() == NPC_VAULT_WARDER) + { + pCreatureTarget->RemoveAurasDueToSpell(SPELL_STONED); - void UpdateAI(const uint32 /*uiDiff*/) override - { - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; + ScriptedInstance* pInstance = (ScriptedInstance*)pCreatureTarget->GetInstanceData(); + if (!pInstance) + return true; - DoMeleeAttackIfReady(); + if (Creature* pArchaedas = pInstance->GetSingleCreatureFromStorage(NPC_ARCHAEDAS)) + pCreatureTarget->AI()->AttackStart(pArchaedas->getVictim()); + + return true; + } } -}; -CreatureAI* GetAI_boss_archaedas(Creature* pCreature) -{ - return new boss_archaedasAI(pCreature); + return false; } -CreatureAI* GetAI_npc_archaeras_add(Creature* pCreature) +bool EffectAuraDummy_spell_aura_dummy_awaken_dwarf(const Aura* pAura, bool bApply) { - return new npc_archaeras_addAI(pCreature); + if (bApply) + return true; + + if ((pAura->GetId() == SPELL_AWAKEN_EARTHEN_DWARF || pAura->GetId() == SPELL_AWAKEN_EARTHEN_GUARDIAN) && pAura->GetEffIndex() == EFFECT_INDEX_0) + { + if (Creature* pTarget = (Creature*)pAura->GetTarget()) + { + pTarget->RemoveAurasDueToSpell(SPELL_STONED); + + ScriptedInstance* pInstance = (ScriptedInstance*)pTarget->GetInstanceData(); + if (!pInstance) + return true; + + if (Creature* pArchaedas = pInstance->GetSingleCreatureFromStorage(NPC_ARCHAEDAS)) + pTarget->AI()->AttackStart(pArchaedas->getVictim()); + } + } + + return true; } void AddSC_boss_archaedas() @@ -245,6 +242,7 @@ void AddSC_boss_archaedas() pNewScript = new Script; pNewScript->Name = "mob_archaeras_add"; - pNewScript->GetAI = &GetAI_npc_archaeras_add; + pNewScript->pEffectDummyNPC = &EffectDummyCreature_npc_vault_warder; + pNewScript->pEffectAuraDummy = &EffectAuraDummy_spell_aura_dummy_awaken_dwarf; pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/uldaman/instance_uldaman.cpp b/scripts/eastern_kingdoms/uldaman/instance_uldaman.cpp index a1998105c..ccad0eb02 100644 --- a/scripts/eastern_kingdoms/uldaman/instance_uldaman.cpp +++ b/scripts/eastern_kingdoms/uldaman/instance_uldaman.cpp @@ -42,9 +42,6 @@ void instance_uldaman::OnObjectCreate(GameObject* pGo) switch (pGo->GetEntry()) { case GO_TEMPLE_DOOR_UPPER: - if (m_auiEncounter[0] == DONE) - pGo->SetGoState(GO_STATE_ACTIVE); - break; case GO_TEMPLE_DOOR_LOWER: if (m_auiEncounter[0] == DONE) pGo->SetGoState(GO_STATE_ACTIVE); @@ -67,15 +64,14 @@ void instance_uldaman::OnCreatureCreate(Creature* pCreature) { case NPC_HALLSHAPER: case NPC_CUSTODIAN: - case NPC_GUARDIAN: - case NPC_VAULT_WARDER: m_lWardens.push_back(pCreature->GetObjectGuid()); - pCreature->SetNoCallAssistance(true); // no assistance break; case NPC_STONE_KEEPER: // FIXME - This isAlive check is currently useless m_mKeeperMap[pCreature->GetObjectGuid()] = pCreature->isAlive(); - pCreature->SetNoCallAssistance(true); // no assistance + break; + case NPC_ARCHAEDAS: + m_mNpcEntryGuidStore[NPC_ARCHAEDAS] = pCreature->GetObjectGuid(); break; default: break; @@ -97,26 +93,8 @@ void instance_uldaman::SetData(uint32 uiType, uint32 uiData) break; case TYPE_ARCHAEDAS: - if (uiData == FAIL) - { - for (GuidList::const_iterator itr = m_lWardens.begin(); itr != m_lWardens.end(); ++itr) - { - if (Creature* pWarden = instance->GetCreature(*itr)) - { - pWarden->SetDeathState(JUST_DIED); - pWarden->Respawn(); - pWarden->SetNoCallAssistance(true); - } - } - } - else if (uiData == DONE) + if (uiData == DONE) { - for (GuidList::const_iterator itr = m_lWardens.begin(); itr != m_lWardens.end(); ++itr) - { - Creature* pWarden = instance->GetCreature(*itr); - if (pWarden && pWarden->isAlive()) - pWarden->ForcedDespawn(); - } DoUseDoorOrButton(GO_ANCIENT_VAULT); DoRespawnGameObject(GO_ANCIENT_TREASURE, 30 * MINUTE); } @@ -212,15 +190,14 @@ void instance_uldaman::DoResetKeeperEvent() { if (Creature* pKeeper = instance->GetCreature(itr->first)) { - pKeeper->SetDeathState(JUST_DIED); - pKeeper->Respawn(); - pKeeper->SetNoCallAssistance(true); + pKeeper->SetRespawnDelay(3); + pKeeper->ForcedDespawn(1000); itr->second = true; } } } -Creature* instance_uldaman::GetClosestDwarfNotInCombat(Creature* pSearcher, uint32 uiPhase) +Creature* instance_uldaman::GetClosestDwarfNotInCombat(Creature* pSearcher) { std::list lTemp; @@ -229,25 +206,7 @@ Creature* instance_uldaman::GetClosestDwarfNotInCombat(Creature* pSearcher, uint Creature* pTemp = instance->GetCreature(*itr); if (pTemp && pTemp->isAlive() && !pTemp->getVictim()) - { - switch (uiPhase) - { - case PHASE_ARCHA_1: - if (pTemp->GetEntry() != NPC_CUSTODIAN && pTemp->GetEntry() != NPC_HALLSHAPER) - continue; - break; - case PHASE_ARCHA_2: - if (pTemp->GetEntry() != NPC_GUARDIAN) - continue; - break; - case PHASE_ARCHA_3: - if (pTemp->GetEntry() != NPC_VAULT_WARDER) - continue; - break; - } - lTemp.push_back(pTemp); - } } if (lTemp.empty()) @@ -285,8 +244,7 @@ void instance_uldaman::Update(uint32 uiDiff) if (pPlayer->isAlive() && !pPlayer->isInCombat()) { pKeeper->RemoveAurasDueToSpell(SPELL_STONED); - pKeeper->SetInCombatWith(pPlayer); - pKeeper->AddThreat(pPlayer); + pKeeper->AI()->AttackStart(pPlayer); } else { diff --git a/scripts/eastern_kingdoms/uldaman/uldaman.h b/scripts/eastern_kingdoms/uldaman/uldaman.h index 3124b2f9f..6b171bdfc 100644 --- a/scripts/eastern_kingdoms/uldaman/uldaman.h +++ b/scripts/eastern_kingdoms/uldaman/uldaman.h @@ -18,16 +18,13 @@ enum GO_ANCIENT_VAULT = 124369, GO_ANCIENT_TREASURE = 141979, + NPC_ARCHAEDAS = 2748, NPC_CUSTODIAN = 7309, NPC_HALLSHAPER = 7077, NPC_GUARDIAN = 7076, NPC_VAULT_WARDER = 10120, NPC_STONE_KEEPER = 4857, - PHASE_ARCHA_1 = 1, - PHASE_ARCHA_2 = 2, - PHASE_ARCHA_3 = 3, - SPELL_STONED = 10255, SPELL_FREEZE_ANIM = 16245, @@ -57,7 +54,7 @@ class MANGOS_DLL_DECL instance_uldaman : public ScriptedInstance void DoResetKeeperEvent(); - Creature* GetClosestDwarfNotInCombat(Creature* pSearcher, uint32 uiPhase); + Creature* GetClosestDwarfNotInCombat(Creature* pSearcher); const char* Save() const override { return m_strInstData.c_str(); } void Load(const char* chrIn) override; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 5ae0d1351..b785a547c 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2853" + #define SD2_REVISION_NR "2854" #endif // __SD2_REVISION_NR_H__ From 2ec5a4656dfb044b19ad995a3949d288bd776dd0 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sat, 6 Apr 2013 00:24:23 +0300 Subject: [PATCH 0858/1172] [2855] Add more improvements to Uldaman This will allow the Alter Event to be properly handled. --- .../uldaman/boss_archaedas.cpp | 4 +- .../uldaman/instance_uldaman.cpp | 146 +++++++++++------- scripts/eastern_kingdoms/uldaman/uldaman.h | 9 +- sd2_revision_nr.h | 2 +- 4 files changed, 95 insertions(+), 66 deletions(-) diff --git a/scripts/eastern_kingdoms/uldaman/boss_archaedas.cpp b/scripts/eastern_kingdoms/uldaman/boss_archaedas.cpp index 34844fc10..66bf93608 100644 --- a/scripts/eastern_kingdoms/uldaman/boss_archaedas.cpp +++ b/scripts/eastern_kingdoms/uldaman/boss_archaedas.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: Boss_Archaedas -SD%Complete: 60 -SDComment: Need correct way to deal with awaken vault and guardian spells, waiting for additions in mangos for them (target combination 22/7) +SD%Complete: 100 +SDComment: SDCategory: Uldaman EndScriptData */ diff --git a/scripts/eastern_kingdoms/uldaman/instance_uldaman.cpp b/scripts/eastern_kingdoms/uldaman/instance_uldaman.cpp index ccad0eb02..e64095585 100644 --- a/scripts/eastern_kingdoms/uldaman/instance_uldaman.cpp +++ b/scripts/eastern_kingdoms/uldaman/instance_uldaman.cpp @@ -26,7 +26,7 @@ EndScriptData #include "uldaman.h" instance_uldaman::instance_uldaman(Map* pMap) : ScriptedInstance(pMap), - m_uiKeeperCooldown(5000), + m_uiKeeperCooldown(0), m_uiStoneKeepersFallen(0) { Initialize(); @@ -43,11 +43,11 @@ void instance_uldaman::OnObjectCreate(GameObject* pGo) { case GO_TEMPLE_DOOR_UPPER: case GO_TEMPLE_DOOR_LOWER: - if (m_auiEncounter[0] == DONE) + if (GetData(TYPE_ALTAR_EVENT) == DONE) pGo->SetGoState(GO_STATE_ACTIVE); break; case GO_ANCIENT_VAULT: - if (m_auiEncounter[1] == DONE) + if (GetData(TYPE_ARCHAEDAS) == DONE) pGo->SetGoState(GO_STATE_ACTIVE); break; case GO_ANCIENT_TREASURE: @@ -67,8 +67,7 @@ void instance_uldaman::OnCreatureCreate(Creature* pCreature) m_lWardens.push_back(pCreature->GetObjectGuid()); break; case NPC_STONE_KEEPER: - // FIXME - This isAlive check is currently useless - m_mKeeperMap[pCreature->GetObjectGuid()] = pCreature->isAlive(); + m_lKeepers.push_back(pCreature->GetObjectGuid()); break; case NPC_ARCHAEDAS: m_mNpcEntryGuidStore[NPC_ARCHAEDAS] = pCreature->GetObjectGuid(); @@ -87,16 +86,26 @@ void instance_uldaman::SetData(uint32 uiType, uint32 uiData) { DoUseDoorOrButton(GO_TEMPLE_DOOR_UPPER); DoUseDoorOrButton(GO_TEMPLE_DOOR_LOWER); - - m_auiEncounter[0] = uiData; } + else if (uiData == IN_PROGRESS) + { + // Also do a reset before starting the event - this will respawn dead Keepers + DoResetKeeperEvent(); + m_uiKeeperCooldown = 5000; + } + else if (uiData == NOT_STARTED) + { + DoResetKeeperEvent(); + m_uiStoneKeepersFallen = 0; + } + m_auiEncounter[0] = uiData; break; case TYPE_ARCHAEDAS: if (uiData == DONE) { DoUseDoorOrButton(GO_ANCIENT_VAULT); - DoRespawnGameObject(GO_ANCIENT_TREASURE, 30 * MINUTE); + DoRespawnGameObject(GO_ANCIENT_TREASURE, 40 * MINUTE); } m_auiEncounter[1] = uiData; break; @@ -142,6 +151,7 @@ void instance_uldaman::SetData64(uint32 uiData, uint64 uiGuid) { switch (uiData) { + // ToDo: check if this one is used in ACID. Otherwise it can be dropped case DATA_EVENT_STARTER: m_playerGuid = ObjectGuid(uiGuid); break; @@ -152,6 +162,8 @@ uint32 instance_uldaman::GetData(uint32 uiType) const { switch (uiType) { + case TYPE_ALTAR_EVENT: + return m_auiEncounter[0]; case TYPE_ARCHAEDAS: return m_auiEncounter[1]; } @@ -174,25 +186,31 @@ void instance_uldaman::StartEvent(uint32 uiEventId, Player* pPlayer) if (uiEventId == EVENT_ID_ALTAR_KEEPER) { - if (m_auiEncounter[0] == NOT_STARTED) - m_auiEncounter[0] = IN_PROGRESS; + if (GetData(TYPE_ALTAR_EVENT) == NOT_STARTED) + SetData(TYPE_ALTAR_EVENT, IN_PROGRESS); + } + else if (uiEventId == EVENT_ID_ALTAR_ARCHAEDAS) + { + if (GetData(TYPE_ARCHAEDAS) == NOT_STARTED || GetData(TYPE_ARCHAEDAS) == FAIL) + SetData(TYPE_ARCHAEDAS, SPECIAL); } - else if (m_auiEncounter[1] == NOT_STARTED || m_auiEncounter[1] == FAIL) - m_auiEncounter[1] = SPECIAL; } void instance_uldaman::DoResetKeeperEvent() { - m_auiEncounter[0] = NOT_STARTED; - m_uiStoneKeepersFallen = 0; + if (m_lKeepers.empty()) + { + script_error_log("Instance Uldaman: ERROR creature %u couldn't be found or something really bad happened.", NPC_STONE_KEEPER); + return; + } - for (std::map::iterator itr = m_mKeeperMap.begin(); itr != m_mKeeperMap.end(); ++itr) + // Force reset all keepers to the original state + for (GuidList::const_iterator itr = m_lKeepers.begin(); itr != m_lKeepers.end(); ++itr) { - if (Creature* pKeeper = instance->GetCreature(itr->first)) + if (Creature* pKeeper = instance->GetCreature(*itr)) { - pKeeper->SetRespawnDelay(3); - pKeeper->ForcedDespawn(1000); - itr->second = true; + if (!pKeeper->isAlive()) + pKeeper->Respawn(); } } } @@ -216,58 +234,66 @@ Creature* instance_uldaman::GetClosestDwarfNotInCombat(Creature* pSearcher) return lTemp.front(); } -void instance_uldaman::Update(uint32 uiDiff) +void instance_uldaman::OnCreatureEvade(Creature* pCreature) { - if (m_auiEncounter[0] == IN_PROGRESS) + // Reset Altar event + if (pCreature->GetEntry() == NPC_STONE_KEEPER) + SetData(TYPE_ALTAR_EVENT, NOT_STARTED); +} + +void instance_uldaman::OnCreatureDeath(Creature* pCreature) +{ + if (pCreature->GetEntry() == NPC_STONE_KEEPER) { - if (m_uiKeeperCooldown >= uiDiff) - m_uiKeeperCooldown -= uiDiff; + ++m_uiStoneKeepersFallen; + + if (m_lKeepers.size() == m_uiStoneKeepersFallen) + SetData(TYPE_ALTAR_EVENT, DONE); else - { m_uiKeeperCooldown = 5000; + } +} + +void instance_uldaman::Update(uint32 uiDiff) +{ + if (GetData(TYPE_ALTAR_EVENT) != IN_PROGRESS) + return; - if (!m_mKeeperMap.empty()) + if (!m_uiKeeperCooldown) + return; + + if (m_uiKeeperCooldown <= uiDiff) + { + for (GuidList::const_iterator itr = m_lKeepers.begin(); itr != m_lKeepers.end(); ++itr) + { + // Get Keeper which is alive and out of combat + Creature* pKeeper = instance->GetCreature(*itr); + if (!pKeeper || !pKeeper->isAlive() || pKeeper->getVictim()) + continue; + + // Get starter player for attack + Player* pPlayer = pKeeper->GetMap()->GetPlayer(m_playerGuid); + if (!pPlayer || !pPlayer->isAlive()) { - for (std::map::iterator itr = m_mKeeperMap.begin(); itr != m_mKeeperMap.end(); ++itr) + // If he's not available, then get a random player, within a reasonamble distance in map + pPlayer = GetPlayerInMap(true, false); + if (!pPlayer || !pPlayer->IsWithinDistInMap(pKeeper, 50.0f)) { - // died earlier - if (!itr->second) - continue; - - if (Creature* pKeeper = instance->GetCreature(itr->first)) - { - if (pKeeper->isAlive() && !pKeeper->getVictim()) - { - if (Player* pPlayer = pKeeper->GetMap()->GetPlayer(m_playerGuid)) - { - // we should use group instead, event starter can be dead while group is still fighting - if (pPlayer->isAlive() && !pPlayer->isInCombat()) - { - pKeeper->RemoveAurasDueToSpell(SPELL_STONED); - pKeeper->AI()->AttackStart(pPlayer); - } - else - { - if (!pPlayer->isAlive()) - DoResetKeeperEvent(); - } - } - - break; - } - else if (!pKeeper->isAlive()) - { - itr->second = pKeeper->isAlive(); - ++m_uiStoneKeepersFallen; - } - } + SetData(TYPE_ALTAR_EVENT, NOT_STARTED); + return; } - - if (m_uiStoneKeepersFallen == m_mKeeperMap.size()) - SetData(TYPE_ALTAR_EVENT, DONE); } + + // Attack the player + pKeeper->RemoveAurasDueToSpell(SPELL_STONED); + pKeeper->AI()->AttackStart(pPlayer); + break; } + + m_uiKeeperCooldown = 0; } + else + m_uiKeeperCooldown -= uiDiff; } InstanceData* GetInstanceData_instance_uldaman(Map* pMap) diff --git a/scripts/eastern_kingdoms/uldaman/uldaman.h b/scripts/eastern_kingdoms/uldaman/uldaman.h index 6b171bdfc..710ada4b0 100644 --- a/scripts/eastern_kingdoms/uldaman/uldaman.h +++ b/scripts/eastern_kingdoms/uldaman/uldaman.h @@ -43,6 +43,9 @@ class MANGOS_DLL_DECL instance_uldaman : public ScriptedInstance void OnObjectCreate(GameObject* pGo) override; void OnCreatureCreate(Creature* pCreature) override; + void OnCreatureDeath(Creature* pCreature) override; + void OnCreatureEvade(Creature* pCreature) override; + void Update(uint32 uiDiff) override; void SetData(uint32 uiType, uint32 uiData) override; @@ -52,14 +55,14 @@ class MANGOS_DLL_DECL instance_uldaman : public ScriptedInstance void StartEvent(uint32 uiEventId, Player* pPlayer); - void DoResetKeeperEvent(); - Creature* GetClosestDwarfNotInCombat(Creature* pSearcher); const char* Save() const override { return m_strInstData.c_str(); } void Load(const char* chrIn) override; protected: + void DoResetKeeperEvent(); + uint32 m_auiEncounter[MAX_ENCOUNTER]; std::string m_strInstData; @@ -69,7 +72,7 @@ class MANGOS_DLL_DECL instance_uldaman : public ScriptedInstance uint32 m_uiStoneKeepersFallen; GuidList m_lWardens; - std::map m_mKeeperMap; + GuidList m_lKeepers; }; #endif diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index b785a547c..0c3c560d1 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2854" + #define SD2_REVISION_NR "2855" #endif // __SD2_REVISION_NR_H__ From 2aaa3c39133436913a219c0ae2bfa5e351c29494 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sat, 6 Apr 2013 23:02:54 +0300 Subject: [PATCH 0859/1172] [2856] Complete script for Razorgore - Blackwing Lair This will implement phase I for Razorgore. Starting now, all the dragon eggs need to be destroyed in order to be able to fight the boss. Finally close #53 --- .../blackwing_lair/blackwing_lair.h | 30 +++- .../blackwing_lair/boss_razorgore.cpp | 142 +++++++++++++----- .../instance_blackwing_lair.cpp | 141 ++++++++++++++++- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 + sql/scriptdev2_script_full.sql | 4 +- sql/updates/r2856_mangos.sql | 1 + sql/updates/r2856_scriptdev2.sql | 3 + 8 files changed, 278 insertions(+), 46 deletions(-) create mode 100644 sql/updates/r2856_mangos.sql create mode 100644 sql/updates/r2856_scriptdev2.sql diff --git a/scripts/eastern_kingdoms/blackwing_lair/blackwing_lair.h b/scripts/eastern_kingdoms/blackwing_lair/blackwing_lair.h index 5f7d92731..becb76adf 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/blackwing_lair.h +++ b/scripts/eastern_kingdoms/blackwing_lair/blackwing_lair.h @@ -18,6 +18,8 @@ enum TYPE_CHROMAGGUS = 6, TYPE_NEFARIAN = 7, + DATA_DRAGON_EGG = 1, // track the used eggs + NPC_RAZORGORE = 12435, NPC_VAELASTRASZ = 13020, NPC_LASHLAYER = 12017, @@ -28,9 +30,15 @@ enum NPC_NEFARIAN = 11583, NPC_LORD_VICTOR_NEFARIUS = 10162, NPC_BLACKWING_TECHNICIAN = 13996, // Flees at Vael intro event + + // Razorgore event related NPC_GRETHOK_CONTROLLER = 12557, NPC_BLACKWING_ORB_TRIGGER = 14449, + NPC_NEFARIANS_TROOPS = 14459, NPC_MONSTER_GENERATOR = 12434, + NPC_BLACKWING_LEGIONNAIRE = 12416, // one spawn per turn + NPC_BLACKWING_MAGE = 12420, // one spawn per turn + NPC_DRAGONSPAWN = 12422, // two spawns per turn GO_DOOR_RAZORGORE_ENTER = 176964, GO_DOOR_RAZORGORE_EXIT = 176965, @@ -43,11 +51,18 @@ enum GO_ORB_OF_DOMINATION = 177808, // trigger 19832 on Razorgore GO_BLACK_DRAGON_EGG = 177807, GO_DRAKONID_BONES = 179804, + + EMOTE_ORB_SHUT_OFF = -1469035, + EMOTE_TROOPS_FLEE = -1469033, // emote by Nefarian's Troops npc + + MAX_EGGS_DEFENDERS = 4, }; // Coords used to spawn Nefarius at the throne static const float aNefariusSpawnLoc[4] = { -7466.16f, -1040.80f, 412.053f, 2.14675f}; +static const uint32 aRazorgoreSpawns[MAX_EGGS_DEFENDERS] = {NPC_BLACKWING_LEGIONNAIRE, NPC_BLACKWING_MAGE, NPC_DRAGONSPAWN, NPC_DRAGONSPAWN}; + class MANGOS_DLL_DECL instance_blackwing_lair : public ScriptedInstance { public: @@ -59,22 +74,33 @@ class MANGOS_DLL_DECL instance_blackwing_lair : public ScriptedInstance void OnCreatureCreate(Creature* pCreature) override; void OnObjectCreate(GameObject* pGo) override; + + void OnCreatureEnterCombat(Creature* pCreature) override; void OnCreatureDeath(Creature* pCreature) override; void SetData(uint32 uiType, uint32 uiData) override; uint32 GetData(uint32 uiType) const override; + void SetData64(uint32 uiData, uint64 uiGuid) override; + const char* Save() const override { return m_strInstData.c_str(); } void Load(const char* chrIn) override; + void Update(uint32 uiDiff) override; + protected: std::string m_strInstData; uint32 m_auiEncounter[MAX_ENCOUNTER]; + uint32 m_uiResetTimer; + uint32 m_uiDefenseTimer; + GuidList m_lTechnicianGuids; - GuidList m_lGeneratorGuids; - GuidList m_lDragonEggGuids; + GuidList m_lDragonEggsGuids; GuidList m_lDrakonidBonesGuids; + GuidList m_lDefendersGuids; + GuidList m_lUsedEggsGuids; + GuidVector m_vGeneratorGuids; }; #endif diff --git a/scripts/eastern_kingdoms/blackwing_lair/boss_razorgore.cpp b/scripts/eastern_kingdoms/blackwing_lair/boss_razorgore.cpp index cad1fe85b..0d83fe480 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/boss_razorgore.cpp +++ b/scripts/eastern_kingdoms/blackwing_lair/boss_razorgore.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: Boss_Razorgore -SD%Complete: 50 -SDComment: Needs additional review. Phase 1 NYI (Grethok the Controller), Conflagration needs core support +SD%Complete: 95 +SDComment: Timers may be improved. SDCategory: Blackwing Lair EndScriptData */ @@ -31,21 +31,14 @@ enum SAY_EGGS_BROKEN_3 = -1469024, SAY_DEATH = -1469025, - EMOTE_TROOPS_FLEE = -1469033, // emote by Nefarian's Troops npc - - // phase I event spells SPELL_POSSESS = 23014, // visual effect and increase the damage taken - SPELL_EXPLODE_ORB = 20037, // used if attacked without destroying the eggs - related to 20038 + SPELL_DESTROY_EGG = 19873, + SPELL_EXPLODE_ORB = 20037, // used if attacked without destroying the eggs - triggers 20038 SPELL_CLEAVE = 19632, SPELL_WARSTOMP = 24375, SPELL_FIREBALL_VOLLEY = 22425, SPELL_CONFLAGRATION = 23023, - - // npcs used in phase I - NPC_BLACKWING_LEGIONNAIRE = 12416, - NPC_BLACKWING_MAGE = 12420, - NPC_DRAGONSPAWN = 12422, }; struct MANGOS_DLL_DECL boss_razorgoreAI : public ScriptedAI @@ -64,60 +57,103 @@ struct MANGOS_DLL_DECL boss_razorgoreAI : public ScriptedAI uint32 m_uiFireballVolleyTimer; uint32 m_uiConflagrationTimer; + bool m_bEggsExploded; + void Reset() override { m_uiIntroVisualTimer = 5000; + m_bEggsExploded = false; - m_uiCleaveTimer = 15000; // These times are probably wrong - m_uiWarStompTimer = 35000; - m_uiConflagrationTimer = 12000; - m_uiFireballVolleyTimer = 7000; - } - - void Aggro(Unit* /*pWho*/) override - { - // TODO Temporarily add this InstData setting, must be started with Phase 1 which is not yet implemented - if (m_pInstance) - m_pInstance->SetData(TYPE_RAZORGORE, IN_PROGRESS); + m_uiCleaveTimer = urand(4000, 8000); + m_uiWarStompTimer = 30000; + m_uiConflagrationTimer = urand(10000, 15000); + m_uiFireballVolleyTimer = urand(15000, 20000); } void JustDied(Unit* /*pKiller*/) override { if (m_pInstance) + { + // Don't set instance data unless all eggs are destroyed + if (m_pInstance->GetData(TYPE_RAZORGORE) != SPECIAL) + return; + m_pInstance->SetData(TYPE_RAZORGORE, DONE); + } DoScriptText(SAY_DEATH, m_creature); } + void DamageTaken(Unit* /*pDoneBy*/, uint32& uiDamage) override + { + if (uiDamage < m_creature->GetHealth()) + return; + + if (!m_pInstance) + return; + + // Don't allow any accident + if (m_bEggsExploded) + { + uiDamage = 0; + return; + } + + // Boss explodes everything and resets - this happens if not all eggs are destroyed + if (m_pInstance->GetData(TYPE_RAZORGORE) == IN_PROGRESS) + { + uiDamage = 0; + m_bEggsExploded = true; + m_pInstance->SetData(TYPE_RAZORGORE, FAIL); + DoCastSpellIfCan(m_creature, SPELL_EXPLODE_ORB, CAST_TRIGGERED); + m_creature->ForcedDespawn(); + } + } + void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_RAZORGORE, FAIL); } + void JustSummoned(Creature* pSummoned) override + { + // Defenders should attack the players and the boss + pSummoned->SetInCombatWithZone(); + pSummoned->AI()->AttackStart(m_creature); + } + void UpdateAI(const uint32 uiDiff) override { - // Set visual on OOC timer - if (m_uiIntroVisualTimer) + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) { - if (m_uiIntroVisualTimer <= uiDiff) + // Set visual only on OOC timer + if (m_uiIntroVisualTimer) { - if (Creature* pOrbTrigger = m_pInstance->GetSingleCreatureFromStorage(NPC_BLACKWING_ORB_TRIGGER)) - pOrbTrigger->CastSpell(m_creature, SPELL_POSSESS, false); - m_uiIntroVisualTimer = 0; + if (m_uiIntroVisualTimer <= uiDiff) + { + if (!m_pInstance) + { + script_error_log("Instance Blackwing Lair: ERROR Failed to load instance data for this instace."); + return; + } + + if (Creature* pOrbTrigger = m_pInstance->GetSingleCreatureFromStorage(NPC_BLACKWING_ORB_TRIGGER)) + pOrbTrigger->CastSpell(m_creature, SPELL_POSSESS, false); + m_uiIntroVisualTimer = 0; + } + else + m_uiIntroVisualTimer -= uiDiff; } - else - m_uiIntroVisualTimer -= uiDiff; - } - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; + } // Cleave if (m_uiCleaveTimer < uiDiff) { if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_CLEAVE) == CAST_OK) - m_uiCleaveTimer = urand(7000, 10000); + m_uiCleaveTimer = urand(4000, 8000); } else m_uiCleaveTimer -= uiDiff; @@ -126,7 +162,7 @@ struct MANGOS_DLL_DECL boss_razorgoreAI : public ScriptedAI if (m_uiWarStompTimer < uiDiff) { if (DoCastSpellIfCan(m_creature, SPELL_WARSTOMP) == CAST_OK) - m_uiWarStompTimer = urand(15000, 25000); + m_uiWarStompTimer = 30000; } else m_uiWarStompTimer -= uiDiff; @@ -135,7 +171,7 @@ struct MANGOS_DLL_DECL boss_razorgoreAI : public ScriptedAI if (m_uiFireballVolleyTimer < uiDiff) { if (DoCastSpellIfCan(m_creature, SPELL_FIREBALL_VOLLEY) == CAST_OK) - m_uiFireballVolleyTimer = urand(12000, 15000); + m_uiFireballVolleyTimer = urand(15000, 20000); } else m_uiFireballVolleyTimer -= uiDiff; @@ -144,7 +180,7 @@ struct MANGOS_DLL_DECL boss_razorgoreAI : public ScriptedAI if (m_uiConflagrationTimer < uiDiff) { if (DoCastSpellIfCan(m_creature, SPELL_CONFLAGRATION) == CAST_OK) - m_uiConflagrationTimer = 12000; + m_uiConflagrationTimer = urand(15000, 25000); } else m_uiConflagrationTimer -= uiDiff; @@ -167,6 +203,35 @@ CreatureAI* GetAI_boss_razorgore(Creature* pCreature) return new boss_razorgoreAI(pCreature); } +bool EffectDummyGameObj_go_black_dragon_egg(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, GameObject* pGOTarget) +{ + if (uiSpellId == SPELL_DESTROY_EGG && uiEffIndex == EFFECT_INDEX_1) + { + if (!pGOTarget->isSpawned()) + return true; + + if (ScriptedInstance* pInstance = (ScriptedInstance*)pGOTarget->GetInstanceData()) + { + if (urand(0, 1)) + { + switch (urand(0, 2)) + { + case 0: DoScriptText(SAY_EGGS_BROKEN_1, pCaster); break; + case 1: DoScriptText(SAY_EGGS_BROKEN_2, pCaster); break; + case 2: DoScriptText(SAY_EGGS_BROKEN_3, pCaster); break; + } + } + + // Store the eggs which are destroyed, in order to count them for the second phase + pInstance->SetData64(DATA_DRAGON_EGG, pGOTarget->GetObjectGuid()); + } + + return true; + } + + return false; +} + void AddSC_boss_razorgore() { Script* pNewScript; @@ -175,4 +240,9 @@ void AddSC_boss_razorgore() pNewScript->Name = "boss_razorgore"; pNewScript->GetAI = &GetAI_boss_razorgore; pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "go_black_dragon_egg"; + pNewScript->pEffectDummyGO = &EffectDummyGameObj_go_black_dragon_egg; + pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/blackwing_lair/instance_blackwing_lair.cpp b/scripts/eastern_kingdoms/blackwing_lair/instance_blackwing_lair.cpp index 68b01c93d..b8c3a3c61 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/instance_blackwing_lair.cpp +++ b/scripts/eastern_kingdoms/blackwing_lair/instance_blackwing_lair.cpp @@ -16,7 +16,7 @@ /* ScriptData SDName: Instance_Blackwing_Lair -SD%Complete: 0 +SD%Complete: 90 SDComment: SDCategory: Blackwing Lair EndScriptData */ @@ -24,7 +24,9 @@ EndScriptData */ #include "precompiled.h" #include "blackwing_lair.h" -instance_blackwing_lair::instance_blackwing_lair(Map* pMap) : ScriptedInstance(pMap) +instance_blackwing_lair::instance_blackwing_lair(Map* pMap) : ScriptedInstance(pMap), + m_uiResetTimer(0), + m_uiDefenseTimer(0) { Initialize(); } @@ -54,8 +56,15 @@ void instance_blackwing_lair::OnCreatureCreate(Creature* pCreature) m_lTechnicianGuids.push_back(pCreature->GetObjectGuid()); break; case NPC_MONSTER_GENERATOR: - m_lGeneratorGuids.push_back(pCreature->GetObjectGuid()); + m_vGeneratorGuids.push_back(pCreature->GetObjectGuid()); break; + case NPC_BLACKWING_LEGIONNAIRE: + case NPC_BLACKWING_MAGE: + case NPC_DRAGONSPAWN: + m_lDefendersGuids.push_back(pCreature->GetObjectGuid()); + break; + case NPC_RAZORGORE: + case NPC_NEFARIANS_TROOPS: case NPC_BLACKWING_ORB_TRIGGER: case NPC_VAELASTRASZ: case NPC_LORD_VICTOR_NEFARIUS: @@ -89,7 +98,7 @@ void instance_blackwing_lair::OnObjectCreate(GameObject* pGo) pGo->SetGoState(GO_STATE_ACTIVE); break; case GO_BLACK_DRAGON_EGG: - m_lDragonEggGuids.push_back(pGo->GetObjectGuid()); + m_lDragonEggsGuids.push_back(pGo->GetObjectGuid()); return; case GO_DRAKONID_BONES: m_lDrakonidBonesGuids.push_back(pGo->GetObjectGuid()); @@ -107,15 +116,26 @@ void instance_blackwing_lair::SetData(uint32 uiType, uint32 uiData) { case TYPE_RAZORGORE: m_auiEncounter[uiType] = uiData; - DoUseDoorOrButton(GO_DOOR_RAZORGORE_ENTER); + if (uiData != SPECIAL) + DoUseDoorOrButton(GO_DOOR_RAZORGORE_ENTER); if (uiData == DONE) DoUseDoorOrButton(GO_DOOR_RAZORGORE_EXIT); else if (uiData == FAIL) { + m_uiResetTimer = 30000; + // Reset the Orb of Domination and the eggs DoToggleGameObjectFlags(GO_ORB_OF_DOMINATION, GO_FLAG_NO_INTERACT, true); - // ToDo: reset the Dragon Eggs + // Reset defenders + for (GuidList::const_iterator itr = m_lDefendersGuids.begin(); itr != m_lDefendersGuids.end(); ++itr) + { + if (Creature* pDefender = instance->GetCreature(*itr)) + pDefender->ForcedDespawn(); + } + + m_lUsedEggsGuids.clear(); + m_lDefendersGuids.clear(); } break; case TYPE_VAELASTRASZ: @@ -224,10 +244,60 @@ uint32 instance_blackwing_lair::GetData(uint32 uiType) const return 0; } +void instance_blackwing_lair::SetData64(uint32 uiData, uint64 uiGuid) +{ + if (uiData == DATA_DRAGON_EGG) + { + if (GameObject* pEgg = instance->GetGameObject(ObjectGuid(uiGuid))) + m_lUsedEggsGuids.push_back(pEgg->GetObjectGuid()); + + // If all eggs are destroyed, then allow Razorgore to be attacked + if (m_lUsedEggsGuids.size() == m_lDragonEggsGuids.size()) + { + SetData(TYPE_RAZORGORE, SPECIAL); + DoToggleGameObjectFlags(GO_ORB_OF_DOMINATION, GO_FLAG_NO_INTERACT, true); + + // Emote for the start of the second phase + if (Creature* pTrigger = GetSingleCreatureFromStorage(NPC_NEFARIANS_TROOPS)) + { + DoScriptText(EMOTE_ORB_SHUT_OFF, pTrigger); + DoScriptText(EMOTE_TROOPS_FLEE, pTrigger); + } + + // Break mind control and set max health + if (Creature* pRazorgore = GetSingleCreatureFromStorage(NPC_RAZORGORE)) + { + pRazorgore->RemoveAllAuras(); + pRazorgore->SetHealth(pRazorgore->GetMaxHealth()); + } + + // All defenders evade and despawn + for (GuidList::const_iterator itr = m_lDefendersGuids.begin(); itr != m_lDefendersGuids.end(); ++itr) + { + if (Creature* pDefender = instance->GetCreature(*itr)) + { + pDefender->AI()->EnterEvadeMode(); + pDefender->ForcedDespawn(10000); + } + } + } + } +} + +void instance_blackwing_lair::OnCreatureEnterCombat(Creature* pCreature) +{ + if (pCreature->GetEntry() == NPC_GRETHOK_CONTROLLER) + { + SetData(TYPE_RAZORGORE, IN_PROGRESS); + m_uiDefenseTimer = 40000; + } +} + void instance_blackwing_lair::OnCreatureDeath(Creature* pCreature) { if (pCreature->GetEntry() == NPC_GRETHOK_CONTROLLER) { + // Allow orb to be used DoToggleGameObjectFlags(GO_ORB_OF_DOMINATION, GO_FLAG_NO_INTERACT, false); if (Creature* pOrbTrigger = GetSingleCreatureFromStorage(NPC_BLACKWING_ORB_TRIGGER)) @@ -235,6 +305,65 @@ void instance_blackwing_lair::OnCreatureDeath(Creature* pCreature) } } +void instance_blackwing_lair::Update(uint32 uiDiff) +{ + // Reset Razorgore in case of wipe + if (m_uiResetTimer) + { + if (m_uiResetTimer <= uiDiff) + { + // Respawn Razorgore + if (Creature* pRazorgore = GetSingleCreatureFromStorage(NPC_RAZORGORE)) + { + if (!pRazorgore->isAlive()) + pRazorgore->Respawn(); + } + + // Respawn the Dragon Eggs + for (GuidList::const_iterator itr = m_lDragonEggsGuids.begin(); itr != m_lDragonEggsGuids.end(); ++itr) + { + if (GameObject* pEgg = instance->GetGameObject(*itr)) + { + if (!pEgg->isSpawned()) + pEgg->Respawn(); + } + } + + m_uiResetTimer = 0; + } + else + m_uiResetTimer -= uiDiff; + } + + if (GetData(TYPE_RAZORGORE) != IN_PROGRESS) + return; + + if (m_uiDefenseTimer < uiDiff) + { + // Allow Razorgore to spawn the defenders + Creature* pRazorgore = GetSingleCreatureFromStorage(NPC_RAZORGORE); + if (!pRazorgore) + return; + + // Randomize generators + std::random_shuffle(m_vGeneratorGuids.begin(), m_vGeneratorGuids.end()); + + // Spawn the defenders + for (uint8 i = 0; i < MAX_EGGS_DEFENDERS; ++i) + { + Creature* pGenerator = instance->GetCreature(m_vGeneratorGuids[i]); + if (!pGenerator) + return; + + pRazorgore->SummonCreature(aRazorgoreSpawns[i], pGenerator->GetPositionX(), pGenerator->GetPositionY(), pGenerator->GetPositionZ(), pGenerator->GetOrientation(), TEMPSUMMON_DEAD_DESPAWN, 0); + } + + m_uiDefenseTimer = 20000; + } + else + m_uiDefenseTimer -= uiDiff; +} + InstanceData* GetInstanceData_instance_blackwing_lair(Map* pMap) { return new instance_blackwing_lair(pMap); diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 0c3c560d1..a97d30fdb 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2855" + #define SD2_REVISION_NR "2856" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index a36fb307b..b4151b2e2 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -349,6 +349,7 @@ UPDATE gameobject_template SET ScriptName='go_father_flame' WHERE entry=175245; /* BLACKWING LAIR */ UPDATE instance_template SET ScriptName='instance_blackwing_lair' WHERE map=469; UPDATE creature_template SET ScriptName='boss_razorgore' WHERE entry=12435; +UPDATE gameobject_template SET ScriptName='go_black_dragon_egg' WHERE entry=177807; UPDATE creature_template SET ScriptName='boss_vaelastrasz' WHERE entry=13020; UPDATE creature_template SET ScriptName='boss_broodlord' WHERE entry=12017; UPDATE creature_template SET ScriptName='boss_firemaw' WHERE entry=11983; diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 4b7aef6d2..2b5b9b1ff 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -1454,7 +1454,9 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1469033,'%s flee as the controlling power of the orb is drained.',0,2,0,0,'razorgore EMOTE_TROOPS_FLEE'), -(-1469034,'Run! They are coming.',0,1,0,0,'blackwing technician SAY_TECHNICIAN_RUN'); +(-1469034,'Run! They are coming.',0,1,0,0,'blackwing technician SAY_TECHNICIAN_RUN'), + +(-1469035,'Orb of Domination loses power and shuts off!',0,2,0,0,'razorgore EMOTE_ORB_SHUT_OFF'); -- -1 509 000 RUINS OF AHN'QIRAJ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES diff --git a/sql/updates/r2856_mangos.sql b/sql/updates/r2856_mangos.sql new file mode 100644 index 000000000..96fbc5a5d --- /dev/null +++ b/sql/updates/r2856_mangos.sql @@ -0,0 +1 @@ +UPDATE gameobject_template SET ScriptName='go_black_dragon_egg' WHERE entry=177807; diff --git a/sql/updates/r2856_scriptdev2.sql b/sql/updates/r2856_scriptdev2.sql new file mode 100644 index 000000000..bac419735 --- /dev/null +++ b/sql/updates/r2856_scriptdev2.sql @@ -0,0 +1,3 @@ +DELETE FROM script_texts WHERE entry = -1469035; +INSERT INTO script_texts (entry, content_default, sound, type, language, emote, comment) VALUES +(-1469035,'Orb of Domination loses power and shuts off!',0,2,0,0,'razorgore EMOTE_ORB_SHUT_OFF'); From 3dc230ff8f56e1a0a630d5dbe6e921f6f1464cba Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sun, 7 Apr 2013 14:33:17 +0300 Subject: [PATCH 0860/1172] [2857] Allow Jeklik to be able to start attack movement using MMaps Also restore Malygos attack movement to the original state Finally fix the respawn time for the Uldaman treasure chest, as requested by evil-at-wow --- .../uldaman/instance_uldaman.cpp | 2 +- .../eastern_kingdoms/zulgurub/boss_jeklik.cpp | 25 +++++++++++++++++++ .../nexus/eye_of_eternity/boss_malygos.cpp | 7 ++---- sd2_revision_nr.h | 2 +- 4 files changed, 29 insertions(+), 7 deletions(-) diff --git a/scripts/eastern_kingdoms/uldaman/instance_uldaman.cpp b/scripts/eastern_kingdoms/uldaman/instance_uldaman.cpp index e64095585..740c7fba0 100644 --- a/scripts/eastern_kingdoms/uldaman/instance_uldaman.cpp +++ b/scripts/eastern_kingdoms/uldaman/instance_uldaman.cpp @@ -105,7 +105,7 @@ void instance_uldaman::SetData(uint32 uiType, uint32 uiData) if (uiData == DONE) { DoUseDoorOrButton(GO_ANCIENT_VAULT); - DoRespawnGameObject(GO_ANCIENT_TREASURE, 40 * MINUTE); + DoRespawnGameObject(GO_ANCIENT_TREASURE, HOUR); } m_auiEncounter[1] = uiData; break; diff --git a/scripts/eastern_kingdoms/zulgurub/boss_jeklik.cpp b/scripts/eastern_kingdoms/zulgurub/boss_jeklik.cpp index 57208806a..8d59e962a 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_jeklik.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_jeklik.cpp @@ -101,6 +101,7 @@ struct MANGOS_DLL_DECL boss_jeklikAI : public ScriptedAI m_bIsPhaseOne = true; DoCastSpellIfCan(m_creature, SPELL_GREEN_CHANNELING); + SetCombatMovement(false); } void Aggro(Unit* /*pWho*/) override @@ -109,7 +110,12 @@ struct MANGOS_DLL_DECL boss_jeklikAI : public ScriptedAI // Note: on aggro the bats from the cave behind the boss should fly outside! if (DoCastSpellIfCan(m_creature, SPELL_BAT_FORM) == CAST_OK) + { m_creature->SetLevitate(true); + // override MMaps, by allowing the boss to fly up from the ledge + m_creature->SetWalk(false); + m_creature->GetMotionMaster()->MovePoint(1, -12281.58f, -1392.84f, 146.1f); + } } void JustDied(Unit* /*pKiller*/) override @@ -145,6 +151,25 @@ struct MANGOS_DLL_DECL boss_jeklikAI : public ScriptedAI pSummoned->SetLevitate(true); } + void EnterEvadeMode() override + { + // Override MMaps, and teleport to original position + float fX, fY, fZ, fO; + m_creature->GetRespawnCoord(fX, fY, fZ, &fO); + m_creature->NearTeleportTo(fX, fY, fZ, fO); + + ScriptedAI::EnterEvadeMode(); + } + + void MovementInform(uint32 uiMoveType, uint32 uiPointId) override + { + if (uiMoveType != POINT_MOTION_TYPE || !uiPointId) + return; + + SetCombatMovement(true); + DoStartMovement(m_creature->getVictim()); + } + // Wrapper to despawn the bomb riders on evade / death void DoDespawnBombRiders() { diff --git a/scripts/northrend/nexus/eye_of_eternity/boss_malygos.cpp b/scripts/northrend/nexus/eye_of_eternity/boss_malygos.cpp index 64fd18711..dbdec7095 100644 --- a/scripts/northrend/nexus/eye_of_eternity/boss_malygos.cpp +++ b/scripts/northrend/nexus/eye_of_eternity/boss_malygos.cpp @@ -688,12 +688,9 @@ bool ProcessEventId_event_go_focusing_iris(uint32 /*uiEventId*/, Object* pSource // Enter combat area - Move to ground point first, then start chasing target float fX, fY, fZ; - pMalygos->AI()->AttackStart((Player*)pSource); - pMalygos->GetMotionMaster()->MoveIdle(); - pMalygos->GetMotionMaster()->Clear(); - pTrigger->GetNearPoint(pTrigger, fX, fY, fZ, 0, 30.0f, pTrigger->GetAngle(pMalygos)); - pMalygos->GetMotionMaster()->MovePoint(POINT_ID_COMBAT, fX, fY, fZ, false); + pMalygos->GetMotionMaster()->MovePoint(POINT_ID_COMBAT, fX, fY, fZ); + pMalygos->AI()->AttackStart((Player*)pSource); return true; } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index a97d30fdb..0e8d22237 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2856" + #define SD2_REVISION_NR "2857" #endif // __SD2_REVISION_NR_H__ From 7b88e2bf7795c3c223b6a87f5e6555a76c0b0ef4 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Tue, 9 Apr 2013 02:50:42 +0300 Subject: [PATCH 0861/1172] [2858] Implement HealedBy method. Expects CMangos 12451 --- include/sc_creature.h | 4 ++-- sd2_revision_nr.h | 2 +- sql/scriptdev2_script_full.sql | 2 +- sql/updates/r2858_scriptdev2.sql | 1 + 4 files changed, 5 insertions(+), 4 deletions(-) create mode 100644 sql/updates/r2858_scriptdev2.sql diff --git a/include/sc_creature.h b/include/sc_creature.h index 8d27a8069..f201691b3 100644 --- a/include/sc_creature.h +++ b/include/sc_creature.h @@ -69,8 +69,8 @@ struct MANGOS_DLL_DECL ScriptedAI : public CreatureAI // Called when reached home after MoveTargetHome (in evade) void JustReachedHome() override {} - // Called at any heal cast/item used (call non implemented in mangos) - // void HealBy(Unit* pHealer, uint32 uiAmountHealed) override {} + // Called at any Heal received + void HealedBy(Unit * /*pHealer*/, uint32& /*uiHealedAmount*/) override {} // Called at any Damage to any victim (before damage apply) void DamageDeal(Unit* /*pDoneTo*/, uint32& /*uiDamage*/) override {} diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 0e8d22237..500a6d24c 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2857" + #define SD2_REVISION_NR "2858" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 2b5b9b1ff..720121002 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -3,7 +3,7 @@ -- DELETE FROM sd2_db_version; -INSERT INTO sd2_db_version (version) VALUES ('ScriptDev2 (for C-MaNGOS 12409+) '); +INSERT INTO sd2_db_version (version) VALUES ('ScriptDev2 (for C-MaNGOS 12451+) '); -- -- Below contains data for table `script_texts` mainly used in C++ parts. diff --git a/sql/updates/r2858_scriptdev2.sql b/sql/updates/r2858_scriptdev2.sql new file mode 100644 index 000000000..2eb1d8bf0 --- /dev/null +++ b/sql/updates/r2858_scriptdev2.sql @@ -0,0 +1 @@ +UPDATE sd2_db_version SET version='ScriptDev2 (for C-MaNGOS 12451+) '; From ea3e5918a197a6fe8c62c3d58b3b748ed53a461d Mon Sep 17 00:00:00 2001 From: Xfurry Date: Tue, 9 Apr 2013 02:54:05 +0300 Subject: [PATCH 0862/1172] [2859] Add some improvements to Black Temple * Allow Mother Shahraz to use Fatal Attraction * Improve the Illidari Council health control * Improve Demon Fire for Illidan --- scripts/outland/black_temple/boss_illidan.cpp | 12 +++--- .../black_temple/boss_mother_shahraz.cpp | 10 ++--- .../outland/black_temple/illidari_council.cpp | 38 ++++++++++--------- sd2_revision_nr.h | 2 +- 4 files changed, 31 insertions(+), 31 deletions(-) diff --git a/scripts/outland/black_temple/boss_illidan.cpp b/scripts/outland/black_temple/boss_illidan.cpp index f013970af..4ce1aa1fb 100644 --- a/scripts/outland/black_temple/boss_illidan.cpp +++ b/scripts/outland/black_temple/boss_illidan.cpp @@ -137,7 +137,7 @@ enum // Misc Summoned SPELL_FLAME_CRASH_EFFECT = 40836, // Firey blue ring of circle that the other flame crash summons SPELL_EYE_BLAST_TRIGGER = 40017, // This summons Demon Form every few seconds and deals ~20k damage in its radius - SPELL_DEMON_FIRE = 40029, // Blue fire trail left by Eye Blast. Deals 2k per second if players stand on it. + // SPELL_DEMON_FIRE = 40029, // Blue fire trail left by Eye Blast. Deals 2k per second if players stand on it. SPELL_BLAZE_EFFECT = 40610, // Green flame on the ground, triggers damage (5k) every few seconds // Blade of Azzinoth @@ -165,11 +165,11 @@ enum /************** Creature Summons **************/ NPC_ILLIDARI_ELITE = 23226, // attacks Akama on the stairs NPC_FLAME_CRASH = 23336, // has aura 40836 - // NPC_PARASITIC_SHADOWFIEND = 23498, // has aura 41913 (in c_t_a) + // NPC_PARASITIC_SHADOWFIEND = 23498, // has aura 41913 (in c_t_a) NPC_BLADE_OF_AZZINOTH = 22996, // has aura 41997 and summons 22997 on spawn NPC_FLAME_OF_AZZINOTH = 22997, NPC_ILLIDAN_TARGET = 23070, // the eye blast target - has aura 40017 - NPC_DEMON_FIRE = 23069, // has aura 40029 + // NPC_DEMON_FIRE = 23069, // has aura 40029 (in EventAI) NPC_BLAZE = 23259, // has aura 40610 NPC_SHADOW_DEMON = 23375, // NPC_CAGE_TRAP_DISTURB_TRIGGER = 23304, @@ -553,13 +553,11 @@ struct MANGOS_DLL_DECL boss_illidan_stormrageAI : public ScriptedAI, private Dia m_lBladesGuidList.push_back(pSummoned->GetObjectGuid()); break; case NPC_ILLIDAN_TARGET: - pSummoned->CastSpell(pSummoned, SPELL_EYE_BLAST_TRIGGER, true, NULL, NULL, m_creature->GetObjectGuid()); + pSummoned->SetWalk(false); + pSummoned->CastSpell(pSummoned, SPELL_EYE_BLAST_TRIGGER, true); pSummoned->GetMotionMaster()->MovePoint(0, m_fTargetMoveX, m_fTargetMoveY, m_fTargetMoveZ); DoCastSpellIfCan(pSummoned, SPELL_EYE_BLAST_DUMMY, CAST_TRIGGERED); break; - case NPC_DEMON_FIRE: - pSummoned->CastSpell(pSummoned, SPELL_DEMON_FIRE, true); - break; case NPC_SHADOW_DEMON: pSummoned->CastSpell(pSummoned, SPELL_SHADOW_DEMON_PASSIVE, true); if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0, SPELL_PARALYZE, SELECT_FLAG_PLAYER)) diff --git a/scripts/outland/black_temple/boss_mother_shahraz.cpp b/scripts/outland/black_temple/boss_mother_shahraz.cpp index 875e38776..f5e92c7ba 100644 --- a/scripts/outland/black_temple/boss_mother_shahraz.cpp +++ b/scripts/outland/black_temple/boss_mother_shahraz.cpp @@ -95,8 +95,7 @@ struct MANGOS_DLL_DECL boss_shahrazAI : public ScriptedAI m_bIsEnraged = false; - // ToDo: Enable this when the core will properly support the damage split! We can't deal 70-80k damage only to one player. - // DoCastSpellIfCan(m_creature, SPELL_SABER_LASH_PROC); + DoCastSpellIfCan(m_creature, SPELL_SABER_LASH_PROC); } void Aggro(Unit* /*pWho*/) override @@ -162,8 +161,7 @@ struct MANGOS_DLL_DECL boss_shahrazAI : public ScriptedAI else m_uiPrismaticShieldTimer -= uiDiff; - // ToDo: Enable this spell when it will be properly supported by core! Right now it teleports players under the map. - /*if (m_uiFatalAttractionTimer < uiDiff) + if (m_uiFatalAttractionTimer < uiDiff) { if (DoCastSpellIfCan(m_creature, SPELL_FATAL_ATTRACTION) == CAST_OK) { @@ -173,11 +171,11 @@ struct MANGOS_DLL_DECL boss_shahrazAI : public ScriptedAI case 1: DoScriptText(SAY_SPELL_2, m_creature); break; case 2: DoScriptText(SAY_SPELL_3, m_creature); break; } - m_uiFatalAttractionTimer = 30000; + m_uiFatalAttractionTimer = urand(30000, 40000); } } else - m_uiFatalAttractionTimer -= uiDiff;*/ + m_uiFatalAttractionTimer -= uiDiff; if (m_uiShriekTimer < uiDiff) { diff --git a/scripts/outland/black_temple/illidari_council.cpp b/scripts/outland/black_temple/illidari_council.cpp index b5a9ec95e..48544be75 100644 --- a/scripts/outland/black_temple/illidari_council.cpp +++ b/scripts/outland/black_temple/illidari_council.cpp @@ -90,7 +90,9 @@ enum SPELL_VANISH = 41476, SPELL_BERSERK = 45078, - // SPELL_BALANCE_OF_POWER = 41341, // procs 41342 on damage - added in c_t_a + // SPELL_BALANCE_OF_POWER = 41341, // somehow related to 41344 + SPELL_SHARED_RULE_DAM = 41342, + SPELL_SHARED_RULE_HEAL = 41343, SPELL_EMPYREAL_EQUIVALENCY = 41333, SPELL_EMPYREAL_BALANCE = 41499, }; @@ -205,6 +207,17 @@ struct MANGOS_DLL_DECL mob_illidari_councilAI : public ScriptedAI m_uiEquivalencyTimer = urand(2000, 3000); } + void AttackStart(Unit* /*pWho*/) override { } + void MoveInLineOfSight(Unit* /*pWho*/) override { } + + void JustDied(Unit* /*pKiller*/) override + { + DoEndEvent(); + + if (m_pInstance) + m_pInstance->SetData(TYPE_COUNCIL, DONE); + } + void DoStartEvent() { if (!m_pInstance || m_bEventBegun) @@ -321,26 +334,17 @@ struct MANGOS_DLL_DECL boss_illidari_councilAI : public ScriptedAI } } - // ##### Workaround for missing spell aura proc 41342 - Remove when this is implemented in core ##### void DamageTaken(Unit* pDoneBy, uint32& uiDamage) override { - if (pDoneBy == m_creature) - return; - - uiDamage /= 4; - if (!m_pInstance) - return; + int32 uiDamageTaken = (int32)uiDamage; + m_creature->CastCustomSpell(m_creature, SPELL_SHARED_RULE_DAM, &uiDamageTaken, NULL, NULL, true); + } - for (uint8 i = 0; i < 4; ++i) - { - if (Creature* pCouncil = m_pInstance->GetSingleCreatureFromStorage(aCouncilMember[i])) - { - if (pCouncil != m_creature && uiDamage < pCouncil->GetHealth()) - pCouncil->SetHealth(pCouncil->GetHealth() - uiDamage); - } - } + void HealedBy(Unit * pHealer, uint32& uiHealedAmount) override + { + int32 uHealTaken = (int32)uiHealedAmount; + m_creature->CastCustomSpell(m_creature, SPELL_SHARED_RULE_HEAL, &uHealTaken, NULL, NULL, true); } - // ##### End of workaround ##### }; /*###### diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 500a6d24c..dedbf90ed 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2858" + #define SD2_REVISION_NR "2859" #endif // __SD2_REVISION_NR_H__ From 8e52a376becdcf3758cdce82edea7b1d76b0315a Mon Sep 17 00:00:00 2001 From: Xfurry Date: Tue, 9 Apr 2013 22:38:02 +0300 Subject: [PATCH 0863/1172] [2860] Allow Twin Emperors to use HealdedBy function --- .../temple_of_ahnqiraj/boss_twinemperors.cpp | 15 +++++++++++++++ sd2_revision_nr.h | 2 +- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_twinemperors.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_twinemperors.cpp index 6468f23e1..aa2ba4aa4 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/boss_twinemperors.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_twinemperors.cpp @@ -105,6 +105,21 @@ struct MANGOS_DLL_DECL boss_twin_emperorsAI : public ScriptedAI } } + // Workaround for the shared health pool + void HealedBy(Unit * pHealer, uint32& uiHealedAmount) override + { + if (!m_pInstance) + return; + + if (Creature* pTwin = m_pInstance->GetSingleCreatureFromStorage(m_creature->GetEntry() == NPC_VEKLOR ? NPC_VEKLOR : NPC_VEKNILASH)) + { + float fHealPercent = ((float)uiHealedAmount) / ((float)m_creature->GetMaxHealth()); + uint32 uiTwinHeal = (uint32)(fHealPercent * ((float)pTwin->GetMaxHealth())); + uint32 uiTwinHealth = pTwin->GetHealth() + uiTwinHeal; + pTwin->SetHealth(uiTwinHealth < pTwin->GetMaxHealth() ? uiTwinHealth : pTwin->GetMaxHealth()); + } + } + void Aggro(Unit* /*pWho*/) override { if (m_pInstance) diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index dedbf90ed..47d349d8d 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2859" + #define SD2_REVISION_NR "2860" #endif // __SD2_REVISION_NR_H__ From cdf55322e9e0b5678e299e71533a5e271987c903 Mon Sep 17 00:00:00 2001 From: NeatElves Date: Tue, 9 Apr 2013 22:55:07 +0300 Subject: [PATCH 0864/1172] [2861] Drop some special gossips which are now handled by database The following scripts are dropped: mount vendor tabard vendor alchemy profession npc Sayge - darkmoon faire Signed-off-by: Xfurry --- scripts/world/npc_professions.cpp | 220 ---------------- scripts/world/npcs_special.cpp | 402 ------------------------------ sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 4 - sql/updates/r2861_mangos.sql | 4 + 5 files changed, 5 insertions(+), 627 deletions(-) create mode 100644 sql/updates/r2861_mangos.sql diff --git a/scripts/world/npc_professions.cpp b/scripts/world/npc_professions.cpp index 56101a3ad..139cfec7a 100644 --- a/scripts/world/npc_professions.cpp +++ b/scripts/world/npc_professions.cpp @@ -59,15 +59,6 @@ there is no difference here (except that default text is chosen with `gameobject # gossip item and box texts ###*/ -#define GOSSIP_LEARN_POTION "Please teach me how to become a Master of Potions, Lauranna" -#define GOSSIP_UNLEARN_POTION "I wish to unlearn Potion Mastery" -#define GOSSIP_LEARN_TRANSMUTE "Please teach me how to become a Master of Transmutations, Zarevhi" -#define GOSSIP_UNLEARN_TRANSMUTE "I wish to unlearn Transmutation Mastery" -#define GOSSIP_LEARN_ELIXIR "Please teach me how to become a Master of Elixirs, Lorokeem" -#define GOSSIP_UNLEARN_ELIXIR "I wish to unlearn Elixir Mastery" - -#define BOX_UNLEARN_ALCHEMY_SPEC "Do you really want to unlearn your alchemy specialty and lose all associated recipes? \n Cost: " - #define GOSSIP_WEAPON_LEARN "Please teach me how to become a Weaponsmith" #define GOSSIP_WEAPON_UNLEARN "I wish to unlearn the art of Weaponsmithing" #define GOSSIP_ARMOR_LEARN "Please teach me how to become a Armorsmith" @@ -167,18 +158,6 @@ there is no difference here (except that default text is chosen with `gameobject #define S_UNLEARN_MOONCLOTH 41558 #define S_UNLEARN_SHADOWEAVE 41559 -#define S_TRANSMUTE 28672 -#define S_ELIXIR 28677 -#define S_POTION 28675 - -#define S_LEARN_TRANSMUTE 28674 -#define S_LEARN_ELIXIR 28678 -#define S_LEARN_POTION 28676 - -#define S_UNLEARN_TRANSMUTE 41565 -#define S_UNLEARN_ELIXIR 41564 -#define S_UNLEARN_POTION 41563 - /*### # formulas to calculate unlearning cost ###*/ @@ -339,199 +318,6 @@ void ProfessionUnlearnSpells(Player* pPlayer, uint32 type) } } -/*### -# start menues alchemy -###*/ - -bool HasAlchemySpell(Player* pPlayer) -{ - if (pPlayer->HasSpell(S_TRANSMUTE) || pPlayer->HasSpell(S_ELIXIR) || pPlayer->HasSpell(S_POTION)) - return true; - return false; -} - -bool GossipHello_npc_prof_alchemy(Player* pPlayer, Creature* pCreature) -{ - if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); - if (pCreature->isVendor()) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_VENDOR, GOSSIP_TEXT_BROWSE_GOODS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE); - if (pCreature->isTrainer()) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_TRAINER, GOSSIP_TEXT_TRAIN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRAIN); - - uint32 eCreature = pCreature->GetEntry(); - - if (pPlayer->HasSkill(SKILL_ALCHEMY) && pPlayer->GetBaseSkillValue(SKILL_ALCHEMY) >= 350 && pPlayer->getLevel() > 67) - { - if (pPlayer->GetQuestRewardStatus(10899) || pPlayer->GetQuestRewardStatus(10902) || pPlayer->GetQuestRewardStatus(10897)) - { - switch (eCreature) - { - case 22427: // Zarevhi - if (!HasAlchemySpell(pPlayer)) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LEARN_TRANSMUTE, GOSSIP_SENDER_LEARN, GOSSIP_ACTION_INFO_DEF + 1); - if (pPlayer->HasSpell(S_TRANSMUTE)) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_UNLEARN_TRANSMUTE, GOSSIP_SENDER_UNLEARN, GOSSIP_ACTION_INFO_DEF + 4); - break; - case 19052: // Lorokeem - if (!HasAlchemySpell(pPlayer)) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LEARN_ELIXIR, GOSSIP_SENDER_LEARN, GOSSIP_ACTION_INFO_DEF + 2); - if (pPlayer->HasSpell(S_ELIXIR)) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_UNLEARN_ELIXIR, GOSSIP_SENDER_UNLEARN, GOSSIP_ACTION_INFO_DEF + 5); - break; - case 17909: // Lauranna Thar'well - if (!HasAlchemySpell(pPlayer)) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LEARN_POTION, GOSSIP_SENDER_LEARN, GOSSIP_ACTION_INFO_DEF + 3); - if (pPlayer->HasSpell(S_POTION)) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_UNLEARN_POTION, GOSSIP_SENDER_UNLEARN, GOSSIP_ACTION_INFO_DEF + 6); - break; - } - } - } - - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); - return true; -} - -void SendActionMenu_npc_prof_alchemy(Player* pPlayer, Creature* pCreature, uint32 uiAction) -{ - switch (uiAction) - { - case GOSSIP_ACTION_TRADE: - pPlayer->SEND_VENDORLIST(pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_TRAIN: - pPlayer->SEND_TRAINERLIST(pCreature->GetObjectGuid()); - break; - // Learn Alchemy - case GOSSIP_ACTION_INFO_DEF + 1: - if (!pPlayer->HasSpell(S_TRANSMUTE) && pPlayer->GetMoney() >= uint32(GetLearningCost(pPlayer))) - { - pPlayer->CastSpell(pPlayer, S_LEARN_TRANSMUTE, true); - pPlayer->ModifyMoney(-GetLearningCost(pPlayer)); - } - else - pPlayer->SendBuyError(BUY_ERR_NOT_ENOUGHT_MONEY, pCreature, 0, 0); - pPlayer->CLOSE_GOSSIP_MENU(); - break; - case GOSSIP_ACTION_INFO_DEF + 2: - if (!pPlayer->HasSpell(S_ELIXIR) && pPlayer->GetMoney() >= uint32(GetLearningCost(pPlayer))) - { - pPlayer->CastSpell(pPlayer, S_LEARN_ELIXIR, true); - pPlayer->ModifyMoney(-GetLearningCost(pPlayer)); - } - else - pPlayer->SendBuyError(BUY_ERR_NOT_ENOUGHT_MONEY, pCreature, 0, 0); - pPlayer->CLOSE_GOSSIP_MENU(); - break; - case GOSSIP_ACTION_INFO_DEF + 3: - if (!pPlayer->HasSpell(S_POTION) && pPlayer->GetMoney() >= uint32(GetLearningCost(pPlayer))) - { - pPlayer->CastSpell(pPlayer, S_LEARN_POTION, true); - pPlayer->ModifyMoney(-GetLearningCost(pPlayer)); - } - else - pPlayer->SendBuyError(BUY_ERR_NOT_ENOUGHT_MONEY, pCreature, 0, 0); - pPlayer->CLOSE_GOSSIP_MENU(); - break; - // Unlearn Alchemy - case GOSSIP_ACTION_INFO_DEF + 4: - if (pPlayer->GetMoney() >= uint32(GetUnlearnCostHigh(pPlayer))) - { - pCreature->CastSpell(pPlayer, S_UNLEARN_TRANSMUTE, true); - pPlayer->ModifyMoney(-GetUnlearnCostHigh(pPlayer)); - } - else - pPlayer->SendBuyError(BUY_ERR_NOT_ENOUGHT_MONEY, pCreature, 0, 0); - pPlayer->CLOSE_GOSSIP_MENU(); - break; - case GOSSIP_ACTION_INFO_DEF + 5: - if (pPlayer->GetMoney() >= uint32(GetUnlearnCostHigh(pPlayer))) - { - pCreature->CastSpell(pPlayer, S_UNLEARN_ELIXIR, true); - pPlayer->ModifyMoney(-GetUnlearnCostHigh(pPlayer)); - } - else - pPlayer->SendBuyError(BUY_ERR_NOT_ENOUGHT_MONEY, pCreature, 0, 0); - pPlayer->CLOSE_GOSSIP_MENU(); - break; - case GOSSIP_ACTION_INFO_DEF + 6: - if (pPlayer->GetMoney() >= uint32(GetUnlearnCostHigh(pPlayer))) - { - pCreature->CastSpell(pPlayer, S_UNLEARN_POTION, true); - pPlayer->ModifyMoney(-GetUnlearnCostHigh(pPlayer)); - } - else - pPlayer->SendBuyError(BUY_ERR_NOT_ENOUGHT_MONEY, pCreature, 0, 0); - pPlayer->CLOSE_GOSSIP_MENU(); - break; - } -} - -void SendConfirmLearn_npc_prof_alchemy(Player* pPlayer, Creature* pCreature, uint32 uiAction) -{ - if (uiAction) - { - uint32 eCreature = pCreature->GetEntry(); - switch (eCreature) - { - case 22427: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LEARN_TRANSMUTE, GOSSIP_SENDER_CHECK, uiAction); - // unknown textID () - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); - break; - case 19052: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LEARN_ELIXIR, GOSSIP_SENDER_CHECK, uiAction); - // unknown textID () - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); - break; - case 17909: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LEARN_POTION, GOSSIP_SENDER_CHECK, uiAction); - // unknown textID () - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); - break; - } - } -} - -void SendConfirmUnlearn_npc_prof_alchemy(Player* pPlayer, Creature* pCreature, uint32 uiAction) -{ - if (uiAction) - { - uint32 eCreature = pCreature->GetEntry(); - switch (eCreature) - { - case 22427: // Zarevhi - pPlayer->ADD_GOSSIP_ITEM_EXTENDED(0, GOSSIP_UNLEARN_TRANSMUTE, GOSSIP_SENDER_CHECK, uiAction, BOX_UNLEARN_ALCHEMY_SPEC, GetUnlearnCostHigh(pPlayer), false); - // unknown textID () - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); - break; - case 19052: // Lorokeem - pPlayer->ADD_GOSSIP_ITEM_EXTENDED(0, GOSSIP_UNLEARN_ELIXIR, GOSSIP_SENDER_CHECK, uiAction, BOX_UNLEARN_ALCHEMY_SPEC, GetUnlearnCostHigh(pPlayer), false); - // unknown textID () - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); - break; - case 17909: // Lauranna Thar'well - pPlayer->ADD_GOSSIP_ITEM_EXTENDED(0, GOSSIP_UNLEARN_POTION, GOSSIP_SENDER_CHECK, uiAction, BOX_UNLEARN_ALCHEMY_SPEC, GetUnlearnCostHigh(pPlayer), false); - // unknown textID () - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); - break; - } - } -} - -bool GossipSelect_npc_prof_alchemy(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) -{ - switch (uiSender) - { - case GOSSIP_SENDER_MAIN: SendActionMenu_npc_prof_alchemy(pPlayer, pCreature, uiAction); break; - case GOSSIP_SENDER_LEARN: SendConfirmLearn_npc_prof_alchemy(pPlayer, pCreature, uiAction); break; - case GOSSIP_SENDER_UNLEARN: SendConfirmUnlearn_npc_prof_alchemy(pPlayer, pCreature, uiAction); break; - case GOSSIP_SENDER_CHECK: SendActionMenu_npc_prof_alchemy(pPlayer, pCreature, uiAction); break; - } - return true; -} - /*### # start menues blacksmith ###*/ @@ -1201,12 +987,6 @@ void AddSC_npc_professions() { Script* pNewScript; - pNewScript = new Script; - pNewScript->Name = "npc_prof_alchemy"; - pNewScript->pGossipHello = &GossipHello_npc_prof_alchemy; - pNewScript->pGossipSelect = &GossipSelect_npc_prof_alchemy; - pNewScript->RegisterSelf(); - pNewScript = new Script; pNewScript->Name = "npc_prof_blacksmith"; pNewScript->pGossipHello = &GossipHello_npc_prof_blacksmith; diff --git a/scripts/world/npcs_special.cpp b/scripts/world/npcs_special.cpp index 59133692f..4be123d22 100644 --- a/scripts/world/npcs_special.cpp +++ b/scripts/world/npcs_special.cpp @@ -37,9 +37,6 @@ npc_garments_of_quests 80% NPC's related to all Garments of-quests 5621, 56 npc_injured_patient 100% patients for triage-quests (6622 and 6624) npc_doctor 100% Gustaf Vanhowzen and Gregory Victor, quest 6622 and 6624 (Triage) npc_innkeeper 25% ScriptName not assigned. Innkeepers in general. -npc_mount_vendor 100% Regular mount vendors all over the world. Display gossip if player doesn't meet the requirements to buy -npc_sayge 100% Darkmoon event fortune teller, buff player based on answers given -npc_tabard_vendor 50% allow recovering quest related tabards, achievement related ones need core support npc_spring_rabbit 1% Used for pet "Spring Rabbit" of Noblegarden npc_redemption_target 100% Used for the paladin quests: 1779,1781,9600,9685 EndContentData */ @@ -1077,387 +1074,6 @@ bool GossipSelect_npc_innkeeper(Player* pPlayer, Creature* pCreature, uint32 /*u return true; } -/*###### -## npc_mount_vendor -######*/ - -bool GossipHello_npc_mount_vendor(Player* pPlayer, Creature* pCreature) -{ - if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); - - bool canBuy; - canBuy = false; - uint32 vendor = pCreature->GetEntry(); - uint8 race = pPlayer->getRace(); - - switch (vendor) - { - case 384: // Katie Hunter - case 1460: // Unger Statforth - case 2357: // Merideth Carlson - case 4885: // Gregor MacVince - if (pPlayer->GetReputationRank(72) != REP_EXALTED && race != RACE_HUMAN) - pPlayer->SEND_GOSSIP_MENU(5855, pCreature->GetObjectGuid()); - else canBuy = true; - break; - case 1261: // Veron Amberstill - if (pPlayer->GetReputationRank(47) != REP_EXALTED && race != RACE_DWARF) - pPlayer->SEND_GOSSIP_MENU(5856, pCreature->GetObjectGuid()); - else canBuy = true; - break; - case 3362: // Ogunaro Wolfrunner - if (pPlayer->GetReputationRank(76) != REP_EXALTED && race != RACE_ORC) - pPlayer->SEND_GOSSIP_MENU(5841, pCreature->GetObjectGuid()); - else canBuy = true; - break; - case 3685: // Harb Clawhoof - if (pPlayer->GetReputationRank(81) != REP_EXALTED && race != RACE_TAUREN) - pPlayer->SEND_GOSSIP_MENU(5843, pCreature->GetObjectGuid()); - else canBuy = true; - break; - case 4730: // Lelanai - if (pPlayer->GetReputationRank(69) != REP_EXALTED && race != RACE_NIGHTELF) - pPlayer->SEND_GOSSIP_MENU(5844, pCreature->GetObjectGuid()); - else canBuy = true; - break; - case 4731: // Zachariah Post - if (pPlayer->GetReputationRank(68) != REP_EXALTED && race != RACE_UNDEAD) - pPlayer->SEND_GOSSIP_MENU(5840, pCreature->GetObjectGuid()); - else canBuy = true; - break; - case 7952: // Zjolnir - if (pPlayer->GetReputationRank(530) != REP_EXALTED && race != RACE_TROLL) - pPlayer->SEND_GOSSIP_MENU(5842, pCreature->GetObjectGuid()); - else canBuy = true; - break; - case 7955: // Milli Featherwhistle - if (pPlayer->GetReputationRank(54) != REP_EXALTED && race != RACE_GNOME) - pPlayer->SEND_GOSSIP_MENU(5857, pCreature->GetObjectGuid()); - else canBuy = true; - break; - case 16264: // Winaestra - if (pPlayer->GetReputationRank(911) != REP_EXALTED && race != RACE_BLOODELF) - pPlayer->SEND_GOSSIP_MENU(10305, pCreature->GetObjectGuid()); - else canBuy = true; - break; - case 17584: // Torallius the Pack Handler - if (pPlayer->GetReputationRank(930) != REP_EXALTED && race != RACE_DRAENEI) - pPlayer->SEND_GOSSIP_MENU(10239, pCreature->GetObjectGuid()); - else canBuy = true; - break; - } - - if (canBuy) - { - if (pCreature->isVendor()) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_VENDOR, GOSSIP_TEXT_BROWSE_GOODS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE); - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); - } - return true; -} - -bool GossipSelect_npc_mount_vendor(Player* pPlayer, Creature* pCreature, uint32 /*uiSender*/, uint32 uiAction) -{ - if (uiAction == GOSSIP_ACTION_TRADE) - pPlayer->SEND_VENDORLIST(pCreature->GetObjectGuid()); - - return true; -} - -/*###### -## npc_sayge -######*/ - -#define SPELL_DMG 23768 // dmg -#define SPELL_RES 23769 // res -#define SPELL_ARM 23767 // arm -#define SPELL_SPI 23738 // spi -#define SPELL_INT 23766 // int -#define SPELL_STM 23737 // stm -#define SPELL_STR 23735 // str -#define SPELL_AGI 23736 // agi -#define SPELL_FORTUNE 23765 // faire fortune - -bool GossipHello_npc_sayge(Player* pPlayer, Creature* pCreature) -{ - if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); - - if (pPlayer->HasSpellCooldown(SPELL_INT) || - pPlayer->HasSpellCooldown(SPELL_ARM) || - pPlayer->HasSpellCooldown(SPELL_DMG) || - pPlayer->HasSpellCooldown(SPELL_RES) || - pPlayer->HasSpellCooldown(SPELL_STR) || - pPlayer->HasSpellCooldown(SPELL_AGI) || - pPlayer->HasSpellCooldown(SPELL_STM) || - pPlayer->HasSpellCooldown(SPELL_SPI)) - pPlayer->SEND_GOSSIP_MENU(7393, pCreature->GetObjectGuid()); - else - { - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Yes", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); - pPlayer->SEND_GOSSIP_MENU(7339, pCreature->GetObjectGuid()); - } - - return true; -} - -void SendAction_npc_sayge(Player* pPlayer, Creature* pCreature, uint32 uiAction) -{ - switch (uiAction) - { - case GOSSIP_ACTION_INFO_DEF+1: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Slay the Man", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Turn him over to liege", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Confiscate the corn", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4); - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Let him go and have the corn", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 5); - pPlayer->SEND_GOSSIP_MENU(7340, pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF+2: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Execute your friend painfully", GOSSIP_SENDER_MAIN + 1, GOSSIP_ACTION_INFO_DEF); - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Execute your friend painlessly", GOSSIP_SENDER_MAIN + 2, GOSSIP_ACTION_INFO_DEF); - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Let your friend go", GOSSIP_SENDER_MAIN + 3, GOSSIP_ACTION_INFO_DEF); - pPlayer->SEND_GOSSIP_MENU(7341, pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF+3: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Confront the diplomat", GOSSIP_SENDER_MAIN + 4, GOSSIP_ACTION_INFO_DEF); - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Show not so quiet defiance", GOSSIP_SENDER_MAIN + 5, GOSSIP_ACTION_INFO_DEF); - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Remain quiet", GOSSIP_SENDER_MAIN + 2, GOSSIP_ACTION_INFO_DEF); - pPlayer->SEND_GOSSIP_MENU(7361, pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF+4: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Speak against your brother openly", GOSSIP_SENDER_MAIN + 6, GOSSIP_ACTION_INFO_DEF); - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Help your brother in", GOSSIP_SENDER_MAIN + 7, GOSSIP_ACTION_INFO_DEF); - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Keep your brother out without letting him know", GOSSIP_SENDER_MAIN + 8, GOSSIP_ACTION_INFO_DEF); - pPlayer->SEND_GOSSIP_MENU(7362, pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF+5: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Take credit, keep gold", GOSSIP_SENDER_MAIN + 5, GOSSIP_ACTION_INFO_DEF); - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Take credit, share the gold", GOSSIP_SENDER_MAIN + 4, GOSSIP_ACTION_INFO_DEF); - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Let the knight take credit", GOSSIP_SENDER_MAIN + 3, GOSSIP_ACTION_INFO_DEF); - pPlayer->SEND_GOSSIP_MENU(7363, pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Thanks", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 6); - pPlayer->SEND_GOSSIP_MENU(7364, pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF+6: - pCreature->CastSpell(pPlayer, SPELL_FORTUNE, false); - pPlayer->SEND_GOSSIP_MENU(7365, pCreature->GetObjectGuid()); - break; - } -} - -bool GossipSelect_npc_sayge(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) -{ - switch (uiSender) - { - case GOSSIP_SENDER_MAIN: - SendAction_npc_sayge(pPlayer, pCreature, uiAction); - break; - case GOSSIP_SENDER_MAIN+1: - pCreature->CastSpell(pPlayer, SPELL_DMG, false); - pPlayer->AddSpellCooldown(SPELL_DMG, 0, time(NULL) + 7200); - SendAction_npc_sayge(pPlayer, pCreature, uiAction); - break; - case GOSSIP_SENDER_MAIN+2: - pCreature->CastSpell(pPlayer, SPELL_RES, false); - pPlayer->AddSpellCooldown(SPELL_RES, 0, time(NULL) + 7200); - SendAction_npc_sayge(pPlayer, pCreature, uiAction); - break; - case GOSSIP_SENDER_MAIN+3: - pCreature->CastSpell(pPlayer, SPELL_ARM, false); - pPlayer->AddSpellCooldown(SPELL_ARM, 0, time(NULL) + 7200); - SendAction_npc_sayge(pPlayer, pCreature, uiAction); - break; - case GOSSIP_SENDER_MAIN+4: - pCreature->CastSpell(pPlayer, SPELL_SPI, false); - pPlayer->AddSpellCooldown(SPELL_SPI, 0, time(NULL) + 7200); - SendAction_npc_sayge(pPlayer, pCreature, uiAction); - break; - case GOSSIP_SENDER_MAIN+5: - pCreature->CastSpell(pPlayer, SPELL_INT, false); - pPlayer->AddSpellCooldown(SPELL_INT, 0, time(NULL) + 7200); - SendAction_npc_sayge(pPlayer, pCreature, uiAction); - break; - case GOSSIP_SENDER_MAIN+6: - pCreature->CastSpell(pPlayer, SPELL_STM, false); - pPlayer->AddSpellCooldown(SPELL_STM, 0, time(NULL) + 7200); - SendAction_npc_sayge(pPlayer, pCreature, uiAction); - break; - case GOSSIP_SENDER_MAIN+7: - pCreature->CastSpell(pPlayer, SPELL_STR, false); - pPlayer->AddSpellCooldown(SPELL_STR, 0, time(NULL) + 7200); - SendAction_npc_sayge(pPlayer, pCreature, uiAction); - break; - case GOSSIP_SENDER_MAIN+8: - pCreature->CastSpell(pPlayer, SPELL_AGI, false); - pPlayer->AddSpellCooldown(SPELL_AGI, 0, time(NULL) + 7200); - SendAction_npc_sayge(pPlayer, pCreature, uiAction); - break; - } - return true; -} - -/*###### -## npc_tabard_vendor -######*/ - -enum -{ - QUEST_TRUE_MASTERS_OF_LIGHT = 9737, - QUEST_THE_UNWRITTEN_PROPHECY = 9762, - QUEST_INTO_THE_BREACH = 10259, - QUEST_BATTLE_OF_THE_CRIMSON_WATCH = 10781, - QUEST_SHARDS_OF_AHUNE = 11972, - - ACHIEVEMENT_EXPLORE_NORTHREND = 45, - ACHIEVEMENT_TWENTYFIVE_TABARDS = 1021, - ACHIEVEMENT_THE_LOREMASTER_A = 1681, - ACHIEVEMENT_THE_LOREMASTER_H = 1682, - - ITEM_TABARD_OF_THE_HAND = 24344, - ITEM_TABARD_OF_THE_BLOOD_KNIGHT = 25549, - ITEM_TABARD_OF_THE_PROTECTOR = 28788, - ITEM_OFFERING_OF_THE_SHATAR = 31408, - ITEM_GREEN_TROPHY_TABARD_OF_THE_ILLIDARI = 31404, - ITEM_PURPLE_TROPHY_TABARD_OF_THE_ILLIDARI = 31405, - ITEM_TABARD_OF_THE_SUMMER_SKIES = 35279, - ITEM_TABARD_OF_THE_SUMMER_FLAMES = 35280, - ITEM_TABARD_OF_THE_ACHIEVER = 40643, - ITEM_LOREMASTERS_COLORS = 43300, - ITEM_TABARD_OF_THE_EXPLORER = 43348, - - SPELL_TABARD_OF_THE_BLOOD_KNIGHT = 54974, - SPELL_TABARD_OF_THE_HAND = 54976, - SPELL_GREEN_TROPHY_TABARD_OF_THE_ILLIDARI = 54977, - SPELL_PURPLE_TROPHY_TABARD_OF_THE_ILLIDARI = 54982, - SPELL_TABARD_OF_THE_ACHIEVER = 55006, - SPELL_TABARD_OF_THE_PROTECTOR = 55008, - SPELL_LOREMASTERS_COLORS = 58194, - SPELL_TABARD_OF_THE_EXPLORER = 58224, - SPELL_TABARD_OF_SUMMER_SKIES = 62768, - SPELL_TABARD_OF_SUMMER_FLAMES = 62769 -}; - -#define GOSSIP_LOST_TABARD_OF_BLOOD_KNIGHT "I've lost my Tabard of Blood Knight." -#define GOSSIP_LOST_TABARD_OF_THE_HAND "I've lost my Tabard of the Hand." -#define GOSSIP_LOST_TABARD_OF_THE_PROTECTOR "I've lost my Tabard of the Protector." -#define GOSSIP_LOST_GREEN_TROPHY_TABARD_OF_THE_ILLIDARI "I've lost my Green Trophy Tabard of the Illidari." -#define GOSSIP_LOST_PURPLE_TROPHY_TABARD_OF_THE_ILLIDARI "I've lost my Purple Trophy Tabard of the Illidari." -#define GOSSIP_LOST_TABARD_OF_SUMMER_SKIES "I've lost my Tabard of Summer Skies." -#define GOSSIP_LOST_TABARD_OF_SUMMER_FLAMES "I've lost my Tabard of Summer Flames." -#define GOSSIP_LOST_LOREMASTERS_COLORS "I've lost my Loremaster's Colors." -#define GOSSIP_LOST_TABARD_OF_THE_EXPLORER "I've lost my Tabard of the Explorer." -#define GOSSIP_LOST_TABARD_OF_THE_ACHIEVER "I've lost my Tabard of the Achiever." - -bool GossipHello_npc_tabard_vendor(Player* pPlayer, Creature* pCreature) -{ - bool m_bLostBloodKnight = false; - bool m_bLostHand = false; - bool m_bLostProtector = false; - bool m_bLostIllidari = false; - bool m_bLostSummer = false; - - // Tabard of the Blood Knight - if (pPlayer->GetQuestRewardStatus(QUEST_TRUE_MASTERS_OF_LIGHT) && !pPlayer->HasItemCount(ITEM_TABARD_OF_THE_BLOOD_KNIGHT, 1, true)) - m_bLostBloodKnight = true; - - // Tabard of the Hand - if (pPlayer->GetQuestRewardStatus(QUEST_THE_UNWRITTEN_PROPHECY) && !pPlayer->HasItemCount(ITEM_TABARD_OF_THE_HAND, 1, true)) - m_bLostHand = true; - - // Tabard of the Protector - if (pPlayer->GetQuestRewardStatus(QUEST_INTO_THE_BREACH) && !pPlayer->HasItemCount(ITEM_TABARD_OF_THE_PROTECTOR, 1, true)) - m_bLostProtector = true; - - // Green Trophy Tabard of the Illidari - // Purple Trophy Tabard of the Illidari - if (pPlayer->GetQuestRewardStatus(QUEST_BATTLE_OF_THE_CRIMSON_WATCH) && - (!pPlayer->HasItemCount(ITEM_GREEN_TROPHY_TABARD_OF_THE_ILLIDARI, 1, true) && - !pPlayer->HasItemCount(ITEM_PURPLE_TROPHY_TABARD_OF_THE_ILLIDARI, 1, true) && - !pPlayer->HasItemCount(ITEM_OFFERING_OF_THE_SHATAR, 1, true))) - m_bLostIllidari = true; - - // Tabard of Summer Skies - // Tabard of Summer Flames - if (pPlayer->GetQuestRewardStatus(QUEST_SHARDS_OF_AHUNE) && - !pPlayer->HasItemCount(ITEM_TABARD_OF_THE_SUMMER_SKIES, 1, true) && - !pPlayer->HasItemCount(ITEM_TABARD_OF_THE_SUMMER_FLAMES, 1, true)) - m_bLostSummer = true; - - if (m_bLostBloodKnight || m_bLostHand || m_bLostProtector || m_bLostIllidari || m_bLostSummer) - { - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_VENDOR, GOSSIP_TEXT_BROWSE_GOODS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE); - - if (m_bLostBloodKnight) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LOST_TABARD_OF_BLOOD_KNIGHT, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); - - if (m_bLostHand) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LOST_TABARD_OF_THE_HAND, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); - - if (m_bLostProtector) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LOST_TABARD_OF_THE_PROTECTOR, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); - - if (m_bLostIllidari) - { - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LOST_GREEN_TROPHY_TABARD_OF_THE_ILLIDARI, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4); - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LOST_PURPLE_TROPHY_TABARD_OF_THE_ILLIDARI, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 5); - } - - if (m_bLostSummer) - { - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LOST_TABARD_OF_SUMMER_SKIES, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 6); - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LOST_TABARD_OF_SUMMER_FLAMES, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 7); - } - - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); - } - else - pPlayer->SEND_VENDORLIST(pCreature->GetObjectGuid()); - - return true; -} - -bool GossipSelect_npc_tabard_vendor(Player* pPlayer, Creature* pCreature, uint32 /*uiSender*/, uint32 uiAction) -{ - switch (uiAction) - { - case GOSSIP_ACTION_TRADE: - pPlayer->SEND_VENDORLIST(pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_INFO_DEF+1: - pPlayer->CLOSE_GOSSIP_MENU(); - pPlayer->CastSpell(pPlayer, SPELL_TABARD_OF_THE_BLOOD_KNIGHT, false); - break; - case GOSSIP_ACTION_INFO_DEF+2: - pPlayer->CLOSE_GOSSIP_MENU(); - pPlayer->CastSpell(pPlayer, SPELL_TABARD_OF_THE_HAND, false); - break; - case GOSSIP_ACTION_INFO_DEF+3: - pPlayer->CLOSE_GOSSIP_MENU(); - pPlayer->CastSpell(pPlayer, SPELL_TABARD_OF_THE_PROTECTOR, false); - break; - case GOSSIP_ACTION_INFO_DEF+4: - pPlayer->CLOSE_GOSSIP_MENU(); - pPlayer->CastSpell(pPlayer, SPELL_GREEN_TROPHY_TABARD_OF_THE_ILLIDARI, false); - break; - case GOSSIP_ACTION_INFO_DEF+5: - pPlayer->CLOSE_GOSSIP_MENU(); - pPlayer->CastSpell(pPlayer, SPELL_PURPLE_TROPHY_TABARD_OF_THE_ILLIDARI, false); - break; - case GOSSIP_ACTION_INFO_DEF+6: - pPlayer->CLOSE_GOSSIP_MENU(); - pPlayer->CastSpell(pPlayer, SPELL_TABARD_OF_SUMMER_SKIES, false); - break; - case GOSSIP_ACTION_INFO_DEF+7: - pPlayer->CLOSE_GOSSIP_MENU(); - pPlayer->CastSpell(pPlayer, SPELL_TABARD_OF_SUMMER_FLAMES, false); - break; - } - return true; -} - /*###### ## npc_spring_rabbit ## ATTENTION: This is actually a "fun" script, entirely done without proper source! @@ -1789,24 +1405,6 @@ void AddSC_npcs_special() pNewScript->pGossipSelect = &GossipSelect_npc_innkeeper; pNewScript->RegisterSelf(false); // script and error report disabled, but script can be used for custom needs, adding ScriptName - pNewScript = new Script; - pNewScript->Name = "npc_mount_vendor"; - pNewScript->pGossipHello = &GossipHello_npc_mount_vendor; - pNewScript->pGossipSelect = &GossipSelect_npc_mount_vendor; - pNewScript->RegisterSelf(); - - pNewScript = new Script; - pNewScript->Name = "npc_sayge"; - pNewScript->pGossipHello = &GossipHello_npc_sayge; - pNewScript->pGossipSelect = &GossipSelect_npc_sayge; - pNewScript->RegisterSelf(); - - pNewScript = new Script; - pNewScript->Name = "npc_tabard_vendor"; - pNewScript->pGossipHello = &GossipHello_npc_tabard_vendor; - pNewScript->pGossipSelect = &GossipSelect_npc_tabard_vendor; - pNewScript->RegisterSelf(); - pNewScript = new Script; pNewScript->Name = "npc_spring_rabbit"; pNewScript->GetAI = &GetAI_npc_spring_rabbit; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 47d349d8d..f184057a3 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2860" + #define SD2_REVISION_NR "2861" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index b4151b2e2..ccd0eae75 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -146,15 +146,11 @@ UPDATE creature_template SET ScriptName='npc_chicken_cluck' WHERE entry=620; UPDATE creature_template SET ScriptName='npc_dancing_flames' WHERE entry=25305; UPDATE creature_template SET ScriptName='npc_garments_of_quests' WHERE entry IN (12429,12423,12427,12430,12428); UPDATE creature_template SET ScriptName='npc_guardian' WHERE entry=5764; -UPDATE creature_template SET ScriptName='npc_mount_vendor' WHERE entry IN (384,1261,1460,2357,3362,3685,4730,4731,4885,7952,7955,16264,17584); UPDATE creature_template SET ScriptName='npc_doctor' WHERE entry IN (12939,12920); UPDATE creature_template SET ScriptName='npc_injured_patient' WHERE entry IN (12936,12937,12938,12923,12924,12925); -UPDATE creature_template SET ScriptName='npc_prof_alchemy' WHERE entry IN (17909,19052,22427); UPDATE creature_template SET ScriptName='npc_prof_blacksmith' WHERE entry IN (5164,11145,11146,11176,11177,11178,11191,11192,11193); UPDATE creature_template SET ScriptName='npc_prof_leather' WHERE entry IN (7866,7867,7868,7869,7870,7871); UPDATE creature_template SET ScriptName='npc_prof_tailor' WHERE entry IN (22208,22212,22213); -UPDATE creature_template SET ScriptName='npc_sayge' WHERE entry=14822; -UPDATE creature_template SET ScriptName='npc_tabard_vendor' WHERE entry=28776; -- disabled, but can be used for custom -- UPDATE creature_template SET ScriptName='' WHERE npcflag!=npcflag|65536 AND ScriptName='npc_innkeeper'; -- UPDATE creature_template SET ScriptName='npc_innkeeper' WHERE npcflag=npcflag|65536; diff --git a/sql/updates/r2861_mangos.sql b/sql/updates/r2861_mangos.sql new file mode 100644 index 000000000..3a1beed9b --- /dev/null +++ b/sql/updates/r2861_mangos.sql @@ -0,0 +1,4 @@ +UPDATE creature_template SET ScriptName='' WHERE entry IN (17909,19052,22427); +UPDATE creature_template SET ScriptName='' WHERE entry=14822; +UPDATE creature_template SET ScriptName='' WHERE entry IN (384,1261,1460,2357,3362,3685,4730,4731,4885,7952,7955,16264,17584); +UPDATE creature_template SET ScriptName='' WHERE entry=28776; From 28b9531293981bf7504e6324a7f1dcd22abc79ec Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Wed, 10 Apr 2013 01:44:13 +0300 Subject: [PATCH 0865/1172] [2862] Improve phase 2 transitions for Onyxia Signed-off-by: Xfurry --- scripts/kalimdor/onyxias_lair/boss_onyxia.cpp | 94 ++++++++++++++----- sd2_revision_nr.h | 2 +- 2 files changed, 72 insertions(+), 24 deletions(-) diff --git a/scripts/kalimdor/onyxias_lair/boss_onyxia.cpp b/scripts/kalimdor/onyxias_lair/boss_onyxia.cpp index f12db3825..57d19907f 100644 --- a/scripts/kalimdor/onyxias_lair/boss_onyxia.cpp +++ b/scripts/kalimdor/onyxias_lair/boss_onyxia.cpp @@ -137,6 +137,8 @@ struct MANGOS_DLL_DECL boss_onyxiaAI : public ScriptedAI bool m_bIsSummoningWhelps; + uint32 m_uiPhaseTimer; + void Reset() override { if (!IsCombatMovement()) @@ -149,19 +151,21 @@ struct MANGOS_DLL_DECL boss_onyxiaAI : public ScriptedAI m_uiCleaveTimer = urand(2000, 5000); m_uiWingBuffetTimer = urand(10000, 20000); - m_uiMovePoint = urand(0, m_uiMaxBreathPositions - 1); + m_uiMovePoint = 4; // Start in the south m_uiMovementTimer = 20000; m_pPointData = GetMoveData(); m_uiFireballTimer = 15000; m_uiSummonWhelpsTimer = 15000; - m_uiBellowingRoarTimer = 2000; // Immediately after landing + m_uiBellowingRoarTimer = 1; // Immediately after landing m_uiWhelpTimer = 1000; m_uiSummonGuardTimer = 15000; m_uiSummonCount = 0; m_bIsSummoningWhelps = false; + + m_uiPhaseTimer = 0; } void Aggro(Unit* /*pWho*/) override @@ -254,11 +258,22 @@ struct MANGOS_DLL_DECL boss_onyxiaAI : public ScriptedAI if (uiMoveType != POINT_MOTION_TYPE || !m_pInstance) return; - if (m_uiPhase == PHASE_BREATH) + if (m_uiPhase == PHASE_BREATH || m_uiPhase == PHASE_BREATH_PRE) { if (Creature* pTrigger = m_pInstance->GetSingleCreatureFromStorage(NPC_ONYXIA_TRIGGER)) m_creature->SetFacingToObject(pTrigger); } + + if (m_uiPhase == PHASE_BREATH_PRE && !m_uiPhaseTimer) + { + // sort of a hack, it is unclear how this really work but the values appear to be valid + m_creature->SetByteValue(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_UNK_2); + m_creature->SetLevitate(true); + + if (m_pPointData) + m_creature->Relocate(m_pPointData->fX, m_pPointData->fY, m_pPointData->fZ); + m_uiPhaseTimer = 3000; // Start phase two when lift off complete + } } void UpdateAI(const uint32 uiDiff) override @@ -311,25 +326,14 @@ struct MANGOS_DLL_DECL boss_onyxiaAI : public ScriptedAI else m_uiWingBuffetTimer -= uiDiff; - if (m_uiPhase == PHASE_START && m_creature->GetHealthPercent() < 65.0f) + if (m_uiPhase == PHASE_START && m_creature->GetHealthPercent() < 65.0f && m_pPointData) { - m_uiPhase = PHASE_BREATH; - - SetCombatMovement(false); - m_creature->GetMotionMaster()->MoveIdle(); - + m_uiPhase = PHASE_BREATH_PRE; DoScriptText(SAY_PHASE_2_TRANS, m_creature); + SetCombatMovement(false); - // sort of a hack, it is unclear how this really work but the values appear to be valid - m_creature->SetByteValue(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_UNK_2); - m_creature->SetLevitate(true); - - if (m_pPointData) - m_creature->GetMotionMaster()->MovePoint(m_pPointData->uiLocId, m_pPointData->fX, m_pPointData->fY, m_pPointData->fZ); - - // TODO - this might not be the correct place to set this setting - if (m_pInstance) - m_pInstance->SetData(TYPE_ONYXIA, DATA_LIFTOFF); + float fGroundZ = m_creature->GetMap()->GetHeight(m_creature->GetPhaseMask(), m_pPointData->fX, m_pPointData->fY, m_pPointData->fZ); + m_creature->GetMotionMaster()->MovePoint(1, m_pPointData->fX, m_pPointData->fY, fGroundZ); return; } @@ -340,15 +344,13 @@ struct MANGOS_DLL_DECL boss_onyxiaAI : public ScriptedAI { if (m_creature->GetHealthPercent() < 40.0f) { - m_uiPhase = PHASE_END; + m_uiPhase = PHASE_BREATH_POST; + m_uiPhaseTimer = 2000; DoScriptText(SAY_PHASE_3_TRANS, m_creature); // undo flying m_creature->SetByteValue(UNIT_FIELD_BYTES_1, 3, 0); m_creature->SetLevitate(false); - - SetCombatMovement(true); - m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); return; } @@ -437,6 +439,52 @@ struct MANGOS_DLL_DECL boss_onyxiaAI : public ScriptedAI else m_uiSummonGuardTimer -= uiDiff; + break; + } + // Phase-switching phases + case PHASE_BREATH_PRE: + { + if (m_uiPhaseTimer) + { + if (m_uiPhaseTimer <= uiDiff) + { + m_uiPhase = PHASE_BREATH; + m_uiMovementTimer = urand(15000, 25000); + + if (m_pInstance) + m_pInstance->SetData(TYPE_ONYXIA, DATA_LIFTOFF); + + // Move to the north side of the room + m_uiMovePoint = 0; + m_pPointData = GetMoveData(); + m_creature->GetMotionMaster()->MovePoint(m_pPointData->uiLocId, m_pPointData->fX, m_pPointData->fY, m_pPointData->fZ); + + m_uiPhaseTimer = 0; + } + else + m_uiPhaseTimer -= uiDiff; + } + + break; + } + case PHASE_BREATH_POST: + { + if (m_uiPhaseTimer) + { + if (m_uiPhaseTimer <= uiDiff) + { + m_uiPhase = PHASE_END; + + float fGroundZ = m_creature->GetMap()->GetHeight(m_creature->GetPhaseMask(), m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ()); + m_creature->Relocate(m_creature->GetPositionX(), m_creature->GetPositionY(), fGroundZ); + + SetCombatMovement(true, true); + m_uiPhaseTimer = 0; + } + else + m_uiPhaseTimer -= uiDiff; + } + break; } } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index f184057a3..3c731d017 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2861" + #define SD2_REVISION_NR "2862" #endif // __SD2_REVISION_NR_H__ From e4b75747467d54f2284546527b2ca246b9da2160 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Wed, 10 Apr 2013 20:44:53 +0300 Subject: [PATCH 0866/1172] [2863] Add missing abilities for Zul'jin - Zul'Aman Close #41 --- .../eastern_kingdoms/zulaman/boss_zuljin.cpp | 112 ++++++++++++++++-- .../zulaman/instance_zulaman.cpp | 1 + scripts/eastern_kingdoms/zulaman/zulaman.h | 2 +- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 + sql/updates/r2863_mangos.sql | 1 + 6 files changed, 106 insertions(+), 13 deletions(-) create mode 100644 sql/updates/r2863_mangos.sql diff --git a/scripts/eastern_kingdoms/zulaman/boss_zuljin.cpp b/scripts/eastern_kingdoms/zulaman/boss_zuljin.cpp index 7c0a964dd..c081b9b88 100644 --- a/scripts/eastern_kingdoms/zulaman/boss_zuljin.cpp +++ b/scripts/eastern_kingdoms/zulaman/boss_zuljin.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: Boss_Zuljin -SD%Complete: 70 -SDComment: Timers. Lynx phase abilities NYI +SD%Complete: 90 +SDComment: Timers should be improved. SDCategory: Zul'Aman EndScriptData */ @@ -57,11 +57,12 @@ enum NPC_FEATHER_VORTEX = 24136, // ToDo: script via ACID SPELL_CYCLONE_VISUAL = 43119, // trigger 43147 visual SPELL_CYCLONE_PASSIVE = 43120, // trigger 43121 (4y aoe) every second + SPELL_CYCLONE = 43121, // Lynx Form - SPELL_CLAW_RAGE_HASTE = 42583, // Charges a random target and applies dummy effect 43149 on it - SPELL_CLAW_RAGE_TRIGGER = 43149, - SPELL_LYNX_RUSH_HASTE = 43152, // Charges 9 targets in a row - Dummy effect should apply 43153 + SPELL_CLAW_RAGE = 42583, // Charges a random target and applies dummy effect 43149 on it + SPELL_LYNX_RUSH = 43152, // Charges 9 targets in a row - Dummy effect should apply 43153 + SPELL_LYNX_RUSH_CHARGE = 43153, // Dragonhawk Form SPELL_FLAME_WHIRL = 43213, // trigger two spells @@ -83,6 +84,7 @@ enum SPELL_BERSERK = 45078, // Berserk timer or existance is unk MAX_VORTEXES = 4, + MAX_LYNX_RUSH = 10, POINT_ID_CENTER = 0, PHASE_BEAR = 0, @@ -111,6 +113,10 @@ static const BossPhase aZuljinPhases[] = // coords for going for changing form static const float fZuljinMoveLoc[3] = {120.148811f, 703.713684f, 45.111477f}; +/*###### +## boss_zuljin +######*/ + struct MANGOS_DLL_DECL boss_zuljinAI : public ScriptedAI { boss_zuljinAI(Creature* pCreature) : ScriptedAI(pCreature) @@ -133,6 +139,7 @@ struct MANGOS_DLL_DECL boss_zuljinAI : public ScriptedAI uint32 m_uiClawRageTimer; uint32 m_uiLynxRushTimer; + uint8 m_uiLynxRushCount; uint32 m_uiFlameWhirlTimer; uint32 m_uiFlameBreathTimer; @@ -156,7 +163,8 @@ struct MANGOS_DLL_DECL boss_zuljinAI : public ScriptedAI m_uiOverpowerTimer = 5000; m_uiClawRageTimer = 5000; - m_uiLynxRushTimer = 14000; + m_uiLynxRushTimer = 15000; + m_uiLynxRushCount = 0; m_uiFlameWhirlTimer = 7000; m_uiFlameBreathTimer = 15000; @@ -237,8 +245,10 @@ struct MANGOS_DLL_DECL boss_zuljinAI : public ScriptedAI pSummoned->CastSpell(pSummoned, SPELL_CYCLONE_VISUAL, true); pSummoned->CastSpell(pSummoned, SPELL_CYCLONE_PASSIVE, true); m_lSummonsList.push_back(pSummoned->GetObjectGuid()); - if (m_creature->getVictim()) - pSummoned->AI()->AttackStart(m_creature->getVictim()); + + // Attack random target + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + pSummoned->GetMotionMaster()->MoveFollow(pTarget, 0, 0); break; case NPC_COLUMN_OF_FIRE: pSummoned->CastSpell(pSummoned, SPELL_PILLAR_TRIGGER, true); @@ -380,9 +390,45 @@ struct MANGOS_DLL_DECL boss_zuljinAI : public ScriptedAI // Nothing here; Spells casted just once at the beginning of the phase; break; case PHASE_LYNX: - // ToDo: Note for further development of this phase! - // In this phase the boss used two melee spells: SPELL_CLAW_RAGE_HASTE and SPELL_LYNX_RUSH_HASTE - // However the way these spells are used and what are their mechanics and timers is highly unknown + + // Don't apply Claw Rage during Lynx Rush + if (!m_uiLynxRushCount) + { + if (m_uiClawRageTimer < uiDiff) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1, SPELL_CLAW_RAGE, SELECT_FLAG_IN_MELEE_RANGE | SELECT_FLAG_PLAYER)) + { + if (DoCastSpellIfCan(pTarget, SPELL_CLAW_RAGE) == CAST_OK) + m_uiClawRageTimer = urand(15000, 20000); + } + } + else + m_uiClawRageTimer -= uiDiff; + } + + if (m_uiLynxRushTimer < uiDiff) + { + if (!m_uiLynxRushCount) + DoCastSpellIfCan(m_creature, SPELL_LYNX_RUSH); + else + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + DoCastSpellIfCan(pTarget, SPELL_LYNX_RUSH_CHARGE); + } + + ++m_uiLynxRushCount; + + if (m_uiLynxRushCount == MAX_LYNX_RUSH) + { + m_uiLynxRushTimer = urand(20000, 25000); + m_uiLynxRushCount = 0; + } + else + m_uiLynxRushTimer = 400; + } + else + m_uiLynxRushTimer -= uiDiff; + break; case PHASE_DRAGONHAWK: @@ -422,6 +468,45 @@ CreatureAI* GetAI_boss_zuljin(Creature* pCreature) return new boss_zuljinAI(pCreature); } +/*###### +## npc_feather_vortex +######*/ + +struct MANGOS_DLL_DECL npc_feather_vortexAI : public ScriptedAI +{ + npc_feather_vortexAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; + + void Reset() override { } + + void SpellHitTarget(Unit* pTarget, SpellEntry const* pSpellEntry) override + { + if (pSpellEntry->Id == SPELL_CYCLONE && pTarget->GetTypeId() == TYPEID_PLAYER && m_pInstance) + { + if (Creature* pZuljin = m_pInstance->GetSingleCreatureFromStorage(NPC_ZULJIN)) + { + // Change target on player hit + if (Unit* pTarget = pZuljin->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + m_creature->GetMotionMaster()->MoveFollow(pTarget, 0, 0); + } + } + } + + void AttackStart(Unit* /*pWho*/) override { } + void MoveInLineOfSight(Unit* /*pWho*/) override { } + void UpdateAI(const uint32 /*uiDiff*/) override { } +}; + +CreatureAI* GetAI_npc_feather_vortex(Creature* pCreature) +{ + return new npc_feather_vortexAI(pCreature); +} + void AddSC_boss_zuljin() { Script* pNewScript; @@ -430,4 +515,9 @@ void AddSC_boss_zuljin() pNewScript->Name = "boss_zuljin"; pNewScript->GetAI = &GetAI_boss_zuljin; pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_feather_vortex"; + pNewScript->GetAI = &GetAI_npc_feather_vortex; + pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/zulaman/instance_zulaman.cpp b/scripts/eastern_kingdoms/zulaman/instance_zulaman.cpp index 9d2439e69..511e90abc 100644 --- a/scripts/eastern_kingdoms/zulaman/instance_zulaman.cpp +++ b/scripts/eastern_kingdoms/zulaman/instance_zulaman.cpp @@ -69,6 +69,7 @@ void instance_zulaman::OnCreatureCreate(Creature* pCreature) case NPC_NALORAKK: case NPC_JANALAI: case NPC_MALACRASS: + case NPC_ZULJIN: case NPC_HARRISON: case NPC_BEAR_SPIRIT: case NPC_EAGLE_SPIRIT: diff --git a/scripts/eastern_kingdoms/zulaman/zulaman.h b/scripts/eastern_kingdoms/zulaman/zulaman.h index 3aeee9fcf..711d22c22 100644 --- a/scripts/eastern_kingdoms/zulaman/zulaman.h +++ b/scripts/eastern_kingdoms/zulaman/zulaman.h @@ -51,7 +51,7 @@ enum InstanceZA NPC_JANALAI = 23578, NPC_HALAZZI = 23577, NPC_MALACRASS = 24239, - // NPC_ZULJIN = 23863, + NPC_ZULJIN = 23863, // Narolakk event npcs NPC_MEDICINE_MAN = 23581, diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 3c731d017..9ce9b21da 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2862" + #define SD2_REVISION_NR "2863" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index ccd0eae75..7f51dcb70 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -1329,6 +1329,7 @@ UPDATE creature_template SET ScriptName='boss_janalai' WHERE entry=23578; UPDATE creature_template SET ScriptName='boss_malacrass' WHERE entry=24239; UPDATE creature_template SET ScriptName='boss_nalorakk' WHERE entry=23576; UPDATE creature_template SET ScriptName='boss_zuljin' WHERE entry=23863; +UPDATE creature_template SET ScriptName='npc_feather_vortex' WHERE entry=24136; UPDATE creature_template SET ScriptName='npc_dragonhawk_egg' WHERE entry=23817; UPDATE creature_template SET ScriptName='npc_janalai_firebomb' WHERE entry=23920; UPDATE creature_template SET ScriptName='npc_amanishi_hatcher' WHERE entry IN (23818,24504); diff --git a/sql/updates/r2863_mangos.sql b/sql/updates/r2863_mangos.sql new file mode 100644 index 000000000..e6049ab7b --- /dev/null +++ b/sql/updates/r2863_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_feather_vortex' WHERE entry=24136; From b8f99c2fcdbe04436284ade86aaf488df5f6094c Mon Sep 17 00:00:00 2001 From: Xfurry Date: Wed, 10 Apr 2013 20:46:27 +0300 Subject: [PATCH 0867/1172] [2864] Fix NPC Flag for Reginald Windsor The flag is controlled by script, but if we remove it from DB errors will show up. --- scripts/eastern_kingdoms/stormwind_city.cpp | 2 ++ sd2_revision_nr.h | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/eastern_kingdoms/stormwind_city.cpp b/scripts/eastern_kingdoms/stormwind_city.cpp index e77e2b587..dbee3653a 100644 --- a/scripts/eastern_kingdoms/stormwind_city.cpp +++ b/scripts/eastern_kingdoms/stormwind_city.cpp @@ -568,6 +568,8 @@ struct MANGOS_DLL_DECL npc_reginald_windsorAI : public npc_escortAI, private Dia DialogueHelper(aMasqueradeDialogue) { m_pScriptedMap = (ScriptedMap*)m_creature->GetInstanceData(); + // Npc flag is controlled by script + m_creature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER); InitializeDialogueHelper(m_pScriptedMap); Reset(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 9ce9b21da..6353cd1c5 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2863" + #define SD2_REVISION_NR "2864" #endif // __SD2_REVISION_NR_H__ From 6c48802a05e5c43c776bd482f36e73fcadb17841 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Wed, 10 Apr 2013 20:49:04 +0300 Subject: [PATCH 0868/1172] [2865] Implement Dive Bomb for Al'ar - The Eye --- .../tempest_keep/the_eye/boss_alar.cpp | 102 ++++++++++++++++-- sd2_revision_nr.h | 2 +- 2 files changed, 95 insertions(+), 9 deletions(-) diff --git a/scripts/outland/tempest_keep/the_eye/boss_alar.cpp b/scripts/outland/tempest_keep/the_eye/boss_alar.cpp index ca3f4b8c5..9a4ed478a 100644 --- a/scripts/outland/tempest_keep/the_eye/boss_alar.cpp +++ b/scripts/outland/tempest_keep/the_eye/boss_alar.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: boss_alar -SD%Complete: 70 -SDComment: Dive Bomb event NYI +SD%Complete: 90 +SDComment: Boss movement should be improved. SDCategory: Tempest Keep, The Eye EndScriptData */ @@ -38,8 +38,8 @@ enum SPELL_DIVE_BOMB_VISUAL = 35367, // visual transform to fire ball SPELL_DIVE_BOMB = 35181, // dive bomb damage spell SPELL_BOMB_REBIRTH = 35369, // used after the dive bomb - to transform back to phoenis - SPELL_CHARGE = 35412, // used while in Dive Bomb form - to charge a target - // SPELL_SUMMON_ADDS = 18814, // summons 3*19551 - Not sure if the spell is the right id + SPELL_CHARGE = 35412, // charge a random target + // SPELL_SUMMON_ADDS = 18814, // summons 3*19551 - Not sure if the spell is the right id SPELL_BERSERK = 27680, // this spell is used only during phase II NPC_EMBER_OF_ALAR = 19551, // scripted in Acid @@ -55,6 +55,7 @@ enum PHASE_ONE = 1, PHASE_REBIRTH = 2, PHASE_TWO = 3, + PHASE_DIVE_BOMB = 4, }; struct EventLocation @@ -96,6 +97,8 @@ struct MANGOS_DLL_DECL boss_alarAI : public ScriptedAI uint32 m_uiFlameQuillsTimer; uint32 m_uiFlamePatchTimer; uint32 m_uiDiveBombTimer; + uint32 m_uiChargeTimer; + uint32 m_uiRebirthTimer; uint32 m_uiMeltArmorTimer; bool m_bCanSummonEmber; @@ -115,6 +118,8 @@ struct MANGOS_DLL_DECL boss_alarAI : public ScriptedAI m_uiFlamePatchTimer = 20000; m_uiDiveBombTimer = 30000; m_uiMeltArmorTimer = 10000; + m_uiChargeTimer = 20000; + m_uiRebirthTimer = 0; m_bCanSummonEmber = true; } @@ -180,11 +185,19 @@ struct MANGOS_DLL_DECL boss_alarAI : public ScriptedAI switch (uiPointId) { case POINT_ID_QUILLS: - if (DoCastSpellIfCan(m_creature, SPELL_FLAME_QUILLS) == CAST_OK) + if (m_uiPhase == PHASE_ONE) { - // Set the platform id so the boss will move to the last or the first platform - m_uiCurrentPlatformId = urand(0, 1) ? 2 : 3; - m_uiPlatformMoveTimer = 10000; + if (DoCastSpellIfCan(m_creature, SPELL_FLAME_QUILLS) == CAST_OK) + { + // Set the platform id so the boss will move to the last or the first platform + m_uiCurrentPlatformId = urand(0, 1) ? 2 : 3; + m_uiPlatformMoveTimer = 10000; + } + } + else if (m_uiPhase == PHASE_DIVE_BOMB) + { + if (DoCastSpellIfCan(m_creature, SPELL_DIVE_BOMB_VISUAL) == CAST_OK) + m_uiDiveBombTimer = 5000; } break; case POINT_ID_PLATFORM: @@ -323,6 +336,79 @@ struct MANGOS_DLL_DECL boss_alarAI : public ScriptedAI } else m_uiMeltArmorTimer -= uiDiff; + + if (m_uiChargeTimer < uiDiff) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1)) + { + if (DoCastSpellIfCan(pTarget, SPELL_CHARGE) == CAST_OK) + m_uiChargeTimer = 20000; + } + } + else + m_uiChargeTimer -= uiDiff; + + if (m_uiDiveBombTimer) + { + if (m_uiDiveBombTimer <= uiDiff) + { + SetCombatMovement(false); + m_creature->GetMotionMaster()->MovePoint(POINT_ID_QUILLS, aCenterLocation[0].m_fX, aCenterLocation[0].m_fY, aCenterLocation[0].m_fZ); + m_uiPhase = PHASE_DIVE_BOMB; + m_uiRangeCheckTimer = 0; + m_uiDiveBombTimer = 0; + } + else + m_uiDiveBombTimer -= uiDiff; + } + } + // Dive Bomb event + else if (m_uiPhase == PHASE_DIVE_BOMB) + { + if (m_uiDiveBombTimer) + { + if (m_uiDiveBombTimer <= uiDiff) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, SPELL_DIVE_BOMB) == CAST_OK) + { + m_creature->Relocate(pTarget->GetPositionX(), pTarget->GetPositionY(), pTarget->GetPositionZ()); + m_uiRebirthTimer = 2000; + m_uiDiveBombTimer = 0; + } + } + } + else + m_uiDiveBombTimer -= uiDiff; + } + + if (m_uiRebirthTimer) + { + if (m_uiRebirthTimer <= uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_BOMB_REBIRTH) == CAST_OK) + { + m_creature->RemoveAurasDueToSpell(SPELL_DIVE_BOMB_VISUAL); + SetCombatMovement(true, true); + + // Spawn 2 Embers of Alar + float fX, fY, fZ; + for (uint8 i = 0; i < 2; ++i) + { + m_creature->GetRandomPoint(m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), 5.0f, fX, fY, fZ); + m_creature->SummonCreature(NPC_EMBER_OF_ALAR, fX, fY, fZ, 0, TEMPSUMMON_DEAD_DESPAWN, 0); + } + + m_uiPhase = PHASE_TWO; + m_uiRangeCheckTimer = 2000; + m_uiDiveBombTimer = 30000; + m_uiRebirthTimer = 0; + } + } + else + m_uiRebirthTimer -= uiDiff; + } } // only cast flame buffet when not in motion diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 6353cd1c5..377db715c 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2864" + #define SD2_REVISION_NR "2865" #endif // __SD2_REVISION_NR_H__ From d0adb389b947c18788c7427e67df14b187aae596 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Wed, 10 Apr 2013 22:00:50 +0300 Subject: [PATCH 0869/1172] [2866] Allow Zul'jin to properly use Claw Rage --- scripts/eastern_kingdoms/zulaman/boss_zuljin.cpp | 12 +++++++++++- sd2_revision_nr.h | 2 +- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/scripts/eastern_kingdoms/zulaman/boss_zuljin.cpp b/scripts/eastern_kingdoms/zulaman/boss_zuljin.cpp index c081b9b88..0ae36055f 100644 --- a/scripts/eastern_kingdoms/zulaman/boss_zuljin.cpp +++ b/scripts/eastern_kingdoms/zulaman/boss_zuljin.cpp @@ -61,6 +61,7 @@ enum // Lynx Form SPELL_CLAW_RAGE = 42583, // Charges a random target and applies dummy effect 43149 on it + SPELL_CLAW_RAGE_TRIGGER = 43149, SPELL_LYNX_RUSH = 43152, // Charges 9 targets in a row - Dummy effect should apply 43153 SPELL_LYNX_RUSH_CHARGE = 43153, @@ -304,6 +305,15 @@ struct MANGOS_DLL_DECL boss_zuljinAI : public ScriptedAI } } + void SpellHitTarget(Unit* pTarget, SpellEntry const* pSpellEntry) override + { + if (pSpellEntry->Id == SPELL_CLAW_RAGE && pTarget->GetTypeId() == TYPEID_PLAYER) + { + DoCastSpellIfCan(m_creature, SPELL_CLAW_RAGE_TRIGGER, CAST_TRIGGERED); + m_uiLynxRushTimer += 8000; + } + } + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim() || m_bIsInTransition) @@ -396,7 +406,7 @@ struct MANGOS_DLL_DECL boss_zuljinAI : public ScriptedAI { if (m_uiClawRageTimer < uiDiff) { - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1, SPELL_CLAW_RAGE, SELECT_FLAG_IN_MELEE_RANGE | SELECT_FLAG_PLAYER)) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1, SPELL_CLAW_RAGE, SELECT_FLAG_PLAYER)) { if (DoCastSpellIfCan(pTarget, SPELL_CLAW_RAGE) == CAST_OK) m_uiClawRageTimer = urand(15000, 20000); diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 377db715c..422ceb78b 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2865" + #define SD2_REVISION_NR "2866" #endif // __SD2_REVISION_NR_H__ From f6073ffe655dc5222283c1145f0e4b866b794a60 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Wed, 10 Apr 2013 23:54:03 +0300 Subject: [PATCH 0870/1172] [2867] Allow Baroness Anastarit to use Possess spells --- .../stratholme/boss_baroness_anastari.cpp | 66 +++++++++++++++++-- sd2_revision_nr.h | 2 +- 2 files changed, 61 insertions(+), 7 deletions(-) diff --git a/scripts/eastern_kingdoms/stratholme/boss_baroness_anastari.cpp b/scripts/eastern_kingdoms/stratholme/boss_baroness_anastari.cpp index a6d9d4aa5..793cf869f 100644 --- a/scripts/eastern_kingdoms/stratholme/boss_baroness_anastari.cpp +++ b/scripts/eastern_kingdoms/stratholme/boss_baroness_anastari.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: Boss_Baroness_Anastari -SD%Complete: 75 -SDComment: Possess event NYI +SD%Complete: 100 +SDComment: SDCategory: Stratholme EndScriptData */ @@ -29,6 +29,7 @@ enum SPELL_BANSHEE_CURSE = 16867, SPELL_SILENCE = 18327, SPELL_POSSESS = 17244, + SPELL_POSSESSED = 17246, SPELL_POSSESS_INV = 17250, // baroness becomes invisible while possessing a target }; @@ -40,6 +41,9 @@ struct MANGOS_DLL_DECL boss_baroness_anastariAI : public ScriptedAI uint32 m_uiBansheeCurseTimer; uint32 m_uiSilenceTimer; uint32 m_uiPossessTimer; + uint32 m_uiPossessEndTimer; + + ObjectGuid m_possessedPlayer; void Reset() override { @@ -47,10 +51,57 @@ struct MANGOS_DLL_DECL boss_baroness_anastariAI : public ScriptedAI m_uiBansheeCurseTimer = 10000; m_uiSilenceTimer = 25000; m_uiPossessTimer = 15000; + m_uiPossessEndTimer = 0; + } + + void EnterEvadeMode() override + { + // If it's invisible don't evade + if (m_uiPossessEndTimer) + return; + + ScriptedAI::EnterEvadeMode(); } void UpdateAI(const uint32 uiDiff) override { + if (m_uiPossessEndTimer) + { + // Check if the possessed player has been damaged + if (m_uiPossessEndTimer <= uiDiff) + { + // If aura has expired, return to fight + if (!m_creature->HasAura(SPELL_POSSESS_INV)) + { + m_uiPossessEndTimer = 0; + return; + } + + // Check for possessed player + Player* pPlayer = m_creature->GetMap()->GetPlayer(m_possessedPlayer); + if (!pPlayer || !pPlayer->isAlive()) + { + m_creature->RemoveAurasDueToSpell(SPELL_POSSESS_INV); + m_uiPossessEndTimer = 0; + return; + } + + // If possessed player has less than 50% health + if (pPlayer->GetHealth() <= pPlayer->GetMaxHealth() * .5f) + { + m_creature->RemoveAurasDueToSpell(SPELL_POSSESS_INV); + pPlayer->RemoveAurasDueToSpell(SPELL_POSSESSED); + pPlayer->RemoveAurasDueToSpell(SPELL_POSSESS); + m_uiPossessEndTimer = 0; + return; + } + + m_uiPossessEndTimer = 1000; + } + else + m_uiPossessEndTimer -= uiDiff; + } + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -88,20 +139,23 @@ struct MANGOS_DLL_DECL boss_baroness_anastariAI : public ScriptedAI m_uiSilenceTimer -= uiDiff; // Possess - // ToDo: uncomment this when the event is properly implemented - /*if (m_uiPossessTimer < uiDiff) + if (m_uiPossessTimer < uiDiff) { - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1)) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1, SPELL_POSSESS, SELECT_FLAG_PLAYER)) { if (DoCastSpellIfCan(pTarget, SPELL_POSSESS) == CAST_OK) { + DoCastSpellIfCan(pTarget, SPELL_POSSESSED, CAST_TRIGGERED); DoCastSpellIfCan(m_creature, SPELL_POSSESS_INV, CAST_TRIGGERED); + + m_possessedPlayer = pTarget->GetObjectGuid(); + m_uiPossessEndTimer = 1000; m_uiPossessTimer = 30000; } } } else - m_uiPossessTimer -= uiDiff;*/ + m_uiPossessTimer -= uiDiff; DoMeleeAttackIfReady(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 422ceb78b..712d4bd36 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2866" + #define SD2_REVISION_NR "2867" #endif // __SD2_REVISION_NR_H__ From b38f8fbaa1cb776fe196049a1e8ca4b1abc3fce2 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Thu, 11 Apr 2013 01:12:15 +0300 Subject: [PATCH 0871/1172] [2868] Allow Blackheart the Inciter to use Incite Chaos --- .../boss_blackheart_the_inciter.cpp | 63 +++++++++++++++---- sd2_revision_nr.h | 2 +- 2 files changed, 53 insertions(+), 12 deletions(-) diff --git a/scripts/outland/auchindoun/shadow_labyrinth/boss_blackheart_the_inciter.cpp b/scripts/outland/auchindoun/shadow_labyrinth/boss_blackheart_the_inciter.cpp index 59b63032e..34307e000 100644 --- a/scripts/outland/auchindoun/shadow_labyrinth/boss_blackheart_the_inciter.cpp +++ b/scripts/outland/auchindoun/shadow_labyrinth/boss_blackheart_the_inciter.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: Boss_Blackheart_the_Inciter -SD%Complete: 60 -SDComment: Incite Chaos needs further research and core support +SD%Complete: 90 +SDComment: Not all yells are implemented. SDCategory: Auchindoun, Shadow Labyrinth EndScriptData */ @@ -26,7 +26,7 @@ EndScriptData */ enum { - SPELL_INCITE_CHAOS = 33676, // triggers 33684 on party members - needs core support + SPELL_INCITE_CHAOS = 33676, // triggers 33684 on party members SPELL_CHARGE = 33709, SPELL_WAR_STOMP = 33707, @@ -64,12 +64,16 @@ struct MANGOS_DLL_DECL boss_blackheart_the_inciterAI : public ScriptedAI ScriptedInstance* m_pInstance; uint32 m_uiInciteChaosTimer; + uint32 m_uiInciteChaosWaitTimer; uint32 m_uiChargeTimer; uint32 m_uiKnockbackTimer; + GuidVector m_vTargetsGuids; + void Reset() override { - m_uiInciteChaosTimer = 50000; + m_uiInciteChaosWaitTimer = 0; + m_uiInciteChaosTimer = 15000; m_uiChargeTimer = urand(30000, 37000); m_uiKnockbackTimer = urand(10000, 14000); } @@ -106,27 +110,64 @@ struct MANGOS_DLL_DECL boss_blackheart_the_inciterAI : public ScriptedAI m_pInstance->SetData(TYPE_INCITER, FAIL); } + void EnterEvadeMode() + { + // if we are waiting for Incite chaos to expire don't evade + if (m_uiInciteChaosWaitTimer) + return; + + ScriptedAI::EnterEvadeMode(); + } + void UpdateAI(const uint32 uiDiff) override { + if (m_uiInciteChaosWaitTimer) + { + if (m_uiInciteChaosWaitTimer <= uiDiff) + { + // Restart attack on all targets + for (GuidVector::const_iterator itr = m_vTargetsGuids.begin(); itr!= m_vTargetsGuids.end(); ++itr) + { + if (Unit* pTarget = m_creature->GetMap()->GetUnit(*itr)) + AttackStart(pTarget); + } + + m_creature->HandleEmote(EMOTE_STATE_NONE); + m_uiInciteChaosWaitTimer = 0; + } + else + m_uiInciteChaosWaitTimer -= uiDiff; + } + // Return since we have no pTarget if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - // ToDo: this needs future core and script support - /*if (m_uiInciteChaosTimer < uiDiff) + if (m_uiInciteChaosTimer < uiDiff) { + // Store the threat list + m_vTargetsGuids.clear(); + m_creature->FillGuidsListFromThreatList(m_vTargetsGuids); + if (DoCastSpellIfCan(m_creature, SPELL_INCITE_CHAOS) == CAST_OK) - m_uiInciteChaosTimer = 40000; + { + m_creature->HandleEmote(EMOTE_STATE_LAUGH); + m_uiInciteChaosTimer = 55000; + m_uiInciteChaosWaitTimer = 16000; + return; + } } else - m_uiInciteChaosTimer -= uiDiff;*/ + m_uiInciteChaosTimer -= uiDiff; // Charge Timer if (m_uiChargeTimer < uiDiff) { - Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0); - if (pTarget && DoCastSpellIfCan(pTarget, SPELL_CHARGE) == CAST_OK) - m_uiChargeTimer = urand(30000, 43000); + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1, SPELL_CHARGE, SELECT_FLAG_NOT_IN_MELEE_RANGE)) + { + if (DoCastSpellIfCan(pTarget, SPELL_CHARGE) == CAST_OK) + m_uiChargeTimer = urand(30000, 43000); + } } else m_uiChargeTimer -= uiDiff; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 712d4bd36..d96b4cede 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2867" + #define SD2_REVISION_NR "2868" #endif // __SD2_REVISION_NR_H__ From 3d6b816da8d777a53701c4a4fee7e1218425aa21 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Thu, 11 Apr 2013 01:25:22 +0200 Subject: [PATCH 0872/1172] [2869] Fix compile due to CMaNGOS [12456] --- .../frozen_halls/forge_of_souls/boss_bronjahm.cpp | 2 +- scripts/outland/black_temple/boss_supremus.cpp | 2 +- sd2_revision_nr.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_bronjahm.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_bronjahm.cpp index a816ef121..73d05a2d2 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_bronjahm.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_bronjahm.cpp @@ -167,7 +167,7 @@ struct MANGOS_DLL_DECL boss_bronjahmAI : public ScriptedAI // Use ShadowBolt as default attack if victim is not in range // TODO - not entirely clear how this works in case the tank is out of shadow-bolt range - if (!m_uiShadowboltTimer && !m_creature->CanReachWithMeleeAttack(m_creature->getVictim()) && m_creature->GetCombatDistance(m_creature->getVictim()) < 20.0f) + if (!m_uiShadowboltTimer && !m_creature->CanReachWithMeleeAttack(m_creature->getVictim()) && m_creature->GetCombatDistance(m_creature->getVictim(), false) < 20.0f) { if (IsCombatMovement()) { diff --git a/scripts/outland/black_temple/boss_supremus.cpp b/scripts/outland/black_temple/boss_supremus.cpp index 2de77e797..b072e111a 100644 --- a/scripts/outland/black_temple/boss_supremus.cpp +++ b/scripts/outland/black_temple/boss_supremus.cpp @@ -277,7 +277,7 @@ struct MANGOS_DLL_DECL boss_supremusAI : public ScriptedAI if (m_uiMoltenPunchTimer < uiDiff) { - if (m_creature->GetCombatDistance(m_creature->getVictim()) < RANGE_MOLTEN_PUNCH) + if (m_creature->GetCombatDistance(m_creature->getVictim(), false) < RANGE_MOLTEN_PUNCH) { DoCastSpellIfCan(m_creature->getVictim(), SPELL_CHARGE); DoScriptText(EMOTE_PUNCH_GROUND, m_creature); diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index d96b4cede..490a2dac5 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2868" + #define SD2_REVISION_NR "2869" #endif // __SD2_REVISION_NR_H__ From e21765771b02d8fdae44cf2f09ce4eae130870d3 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Wed, 10 Apr 2013 20:53:17 +0200 Subject: [PATCH 0873/1172] [2870] Onyxia Improvements. Requires CMaNGOS [12456] Also add some candy to Onyxia script suggested and prepared by Wilmaa --- scripts/kalimdor/onyxias_lair/boss_onyxia.cpp | 243 +++++++++--------- sd2_revision_nr.h | 2 +- sql/scriptdev2_script_full.sql | 2 +- sql/updates/r2870_scriptdev2.sql | 1 + 4 files changed, 120 insertions(+), 128 deletions(-) create mode 100644 sql/updates/r2870_scriptdev2.sql diff --git a/scripts/kalimdor/onyxias_lair/boss_onyxia.cpp b/scripts/kalimdor/onyxias_lair/boss_onyxia.cpp index 57d19907f..a4974d592 100644 --- a/scripts/kalimdor/onyxias_lair/boss_onyxia.cpp +++ b/scripts/kalimdor/onyxias_lair/boss_onyxia.cpp @@ -68,31 +68,39 @@ enum MAX_WHELPS_PER_PACK = 40, - PHASE_START = 1, - PHASE_BREATH = 2, - PHASE_END = 3, - PHASE_BREATH_PRE = 4, - PHASE_BREATH_POST = 5 + POINT_ID_NORTH = 0, + POINT_ID_SOUTH = 4, + NUM_MOVE_POINT = 8, + POINT_ID_LIFTOFF = 1 + NUM_MOVE_POINT, + POINT_ID_IN_AIR = 2 + NUM_MOVE_POINT, + POINT_ID_INIT_NORTH = 3 + NUM_MOVE_POINT, + POINT_ID_LAND = 4 + NUM_MOVE_POINT, + + PHASE_START = 1, // Health above 65%, normal ground abilities + PHASE_BREATH = 2, // Breath phase (while health above 40%) + PHASE_END = 3, // normal ground abilities + some extra abilities + PHASE_BREATH_POST = 4, // Landing and initial fearing + PHASE_TO_LIFTOFF = 5, // Movement to south-entrance of room and liftoff there + PHASE_BREATH_PRE = 6, // lifting off + initial flying to north side (summons also first pack of whelps) + }; struct OnyxiaMove { - uint32 uiLocId; - uint32 uiLocIdEnd; uint32 uiSpellId; float fX, fY, fZ; }; -static OnyxiaMove aMoveData[] = +static const OnyxiaMove aMoveData[NUM_MOVE_POINT] = { - {0, 4, SPELL_BREATH_NORTH_TO_SOUTH, 22.8763f, -217.152f, -60.0548f}, // north - {1, 5, SPELL_BREATH_NE_TO_SW, 10.2191f, -247.912f, -60.896f}, // north-east - {2, 6, SPELL_BREATH_EAST_TO_WEST, -31.4963f, -250.123f, -60.1278f}, // east - {3, 7, SPELL_BREATH_SE_TO_NW, -63.5156f, -240.096f, -60.477f}, // south-east - {4, 0, SPELL_BREATH_SOUTH_TO_NORTH, -65.8444f, -213.809f, -60.2985f}, // south - {5, 1, SPELL_BREATH_SW_TO_NE, -58.2509f, -189.020f, -60.790f}, // south-west - {6, 2, SPELL_BREATH_WEST_TO_EAST, -33.5561f, -182.682f, -60.9457f}, // west - {7, 3, SPELL_BREATH_NW_TO_SE, 6.8951f, -180.246f, -60.896f}, // north-west + {SPELL_BREATH_NORTH_TO_SOUTH, 24.16332f, -216.0808f, -58.98009f}, // north (coords verified in wotlk) + {SPELL_BREATH_NE_TO_SW, 10.2191f, -247.912f, -60.896f}, // north-east + {SPELL_BREATH_EAST_TO_WEST, -15.00505f, -244.4841f, -60.40087f}, // east (coords verified in wotlk) + {SPELL_BREATH_SE_TO_NW, -63.5156f, -240.096f, -60.477f}, // south-east + {SPELL_BREATH_SOUTH_TO_NORTH, -66.3589f, -215.928f, -64.23904f}, // south (coords verified in wotlk) + {SPELL_BREATH_SW_TO_NE, -58.2509f, -189.020f, -60.790f}, // south-west + {SPELL_BREATH_WEST_TO_EAST, -16.70134f, -181.4501f, -61.98513f}, // west (coords verified in wotlk) + {SPELL_BREATH_NW_TO_SE, 12.26687f, -181.1084f, -60.23914f}, // north-west (coords verified in wotlk) }; static const float afSpawnLocations[3][3] = @@ -108,7 +116,6 @@ struct MANGOS_DLL_DECL boss_onyxiaAI : public ScriptedAI { m_pInstance = (instance_onyxias_lair*)pCreature->GetInstanceData(); m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); - m_uiMaxBreathPositions = countof(aMoveData); Reset(); } @@ -116,7 +123,6 @@ struct MANGOS_DLL_DECL boss_onyxiaAI : public ScriptedAI instance_onyxias_lair* m_pInstance; uint8 m_uiPhase; - uint8 m_uiMaxBreathPositions; uint32 m_uiFlameBreathTimer; uint32 m_uiCleaveTimer; @@ -125,7 +131,6 @@ struct MANGOS_DLL_DECL boss_onyxiaAI : public ScriptedAI uint32 m_uiMovePoint; uint32 m_uiMovementTimer; - OnyxiaMove* m_pPointData; uint32 m_uiFireballTimer; uint32 m_uiSummonWhelpsTimer; @@ -151,13 +156,12 @@ struct MANGOS_DLL_DECL boss_onyxiaAI : public ScriptedAI m_uiCleaveTimer = urand(2000, 5000); m_uiWingBuffetTimer = urand(10000, 20000); - m_uiMovePoint = 4; // Start in the south - m_uiMovementTimer = 20000; - m_pPointData = GetMoveData(); + m_uiMovePoint = POINT_ID_NORTH; // First point reached by the flying Onyxia + m_uiMovementTimer = 25000; - m_uiFireballTimer = 15000; - m_uiSummonWhelpsTimer = 15000; - m_uiBellowingRoarTimer = 1; // Immediately after landing + m_uiFireballTimer = 1000; + m_uiSummonWhelpsTimer = 60000; + m_uiBellowingRoarTimer = 30000; m_uiWhelpTimer = 1000; m_uiSummonGuardTimer = 15000; @@ -236,44 +240,62 @@ struct MANGOS_DLL_DECL boss_onyxiaAI : public ScriptedAI pSpell->Id == SPELL_BREATH_NORTH_TO_SOUTH) { // This was sent with SendMonsterMove - which resulted in better speed than now - m_pPointData = GetMoveData(); - if (m_pPointData) - m_creature->GetMotionMaster()->MovePoint(m_pPointData->uiLocId, m_pPointData->fX, m_pPointData->fY, m_pPointData->fZ); + m_creature->GetMotionMaster()->MovePoint(m_uiMovePoint, aMoveData[m_uiMovePoint].fX, aMoveData[m_uiMovePoint].fY, aMoveData[m_uiMovePoint].fZ); } } - OnyxiaMove* GetMoveData() + void MovementInform(uint32 uiMoveType, uint32 uiPointId) override { - for (uint32 i = 0; i < m_uiMaxBreathPositions; ++i) + if (uiMoveType != POINT_MOTION_TYPE || !m_pInstance) + return; + + switch (uiPointId) { - if (aMoveData[i].uiLocId == m_uiMovePoint) - return &aMoveData[i]; + case POINT_ID_IN_AIR: + // sort of a hack, it is unclear how this really work but the values are valid + m_creature->SetByteValue(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_UNK_2); + m_creature->SetLevitate(true); + m_uiPhaseTimer = 1000; // Movement to Initial North Position is delayed + return; + case POINT_ID_LAND: + // undo flying + m_creature->SetByteValue(UNIT_FIELD_BYTES_1, 3, 0); + m_creature->SetLevitate(false); + m_uiPhaseTimer = 500; // Start PHASE_END shortly delayed + return; + case POINT_ID_LIFTOFF: + m_uiPhaseTimer = 500; // Start Flying shortly delayed + break; + case POINT_ID_INIT_NORTH: // Start PHASE_BREATH + m_uiPhase = PHASE_BREATH; + m_uiSummonCount = 0; + break; } - return NULL; + if (Creature* pTrigger = m_pInstance->GetSingleCreatureFromStorage(NPC_ONYXIA_TRIGGER)) + m_creature->SetFacingToObject(pTrigger); } - void MovementInform(uint32 uiMoveType, uint32 /*uiPointId*/) override + void AttackStart(Unit* pWho) override { - if (uiMoveType != POINT_MOTION_TYPE || !m_pInstance) - return; + if (m_uiPhase == PHASE_START || m_uiPhase == PHASE_END) + ScriptedAI::AttackStart(pWho); + } - if (m_uiPhase == PHASE_BREATH || m_uiPhase == PHASE_BREATH_PRE) - { - if (Creature* pTrigger = m_pInstance->GetSingleCreatureFromStorage(NPC_ONYXIA_TRIGGER)) - m_creature->SetFacingToObject(pTrigger); - } + bool DidSummonWhelps(const uint32 uiDiff) + { + if (m_uiSummonCount >= MAX_WHELPS_PER_PACK) + return true; - if (m_uiPhase == PHASE_BREATH_PRE && !m_uiPhaseTimer) + if (m_uiWhelpTimer < uiDiff) { - // sort of a hack, it is unclear how this really work but the values appear to be valid - m_creature->SetByteValue(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_UNK_2); - m_creature->SetLevitate(true); - - if (m_pPointData) - m_creature->Relocate(m_pPointData->fX, m_pPointData->fY, m_pPointData->fZ); - m_uiPhaseTimer = 3000; // Start phase two when lift off complete + m_creature->SummonCreature(NPC_ONYXIA_WHELP, afSpawnLocations[0][0], afSpawnLocations[0][1], afSpawnLocations[0][2], 0.0f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, MINUTE * IN_MILLISECONDS); + m_creature->SummonCreature(NPC_ONYXIA_WHELP, afSpawnLocations[1][0], afSpawnLocations[1][1], afSpawnLocations[1][2], 0.0f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, MINUTE * IN_MILLISECONDS); + m_uiWhelpTimer = 500; } + else + m_uiWhelpTimer -= uiDiff; + return false; } void UpdateAI(const uint32 uiDiff) override @@ -326,14 +348,16 @@ struct MANGOS_DLL_DECL boss_onyxiaAI : public ScriptedAI else m_uiWingBuffetTimer -= uiDiff; - if (m_uiPhase == PHASE_START && m_creature->GetHealthPercent() < 65.0f && m_pPointData) + if (m_uiPhase == PHASE_START && m_creature->GetHealthPercent() < 65.0f) { - m_uiPhase = PHASE_BREATH_PRE; + m_uiPhase = PHASE_TO_LIFTOFF; DoScriptText(SAY_PHASE_2_TRANS, m_creature); SetCombatMovement(false); + m_creature->GetMotionMaster()->MoveIdle(); + m_creature->SetTargetGuid(ObjectGuid()); - float fGroundZ = m_creature->GetMap()->GetHeight(m_creature->GetPhaseMask(), m_pPointData->fX, m_pPointData->fY, m_pPointData->fZ); - m_creature->GetMotionMaster()->MovePoint(1, m_pPointData->fX, m_pPointData->fY, fGroundZ); + float fGroundZ = m_creature->GetMap()->GetHeight(m_creature->GetPhaseMask(), aMoveData[POINT_ID_SOUTH].fX, aMoveData[POINT_ID_SOUTH].fY, aMoveData[POINT_ID_SOUTH].fZ); + m_creature->GetMotionMaster()->MovePoint(POINT_ID_LIFTOFF, aMoveData[POINT_ID_SOUTH].fX, aMoveData[POINT_ID_SOUTH].fY, fGroundZ); return; } @@ -345,46 +369,39 @@ struct MANGOS_DLL_DECL boss_onyxiaAI : public ScriptedAI if (m_creature->GetHealthPercent() < 40.0f) { m_uiPhase = PHASE_BREATH_POST; - m_uiPhaseTimer = 2000; DoScriptText(SAY_PHASE_3_TRANS, m_creature); - // undo flying - m_creature->SetByteValue(UNIT_FIELD_BYTES_1, 3, 0); - m_creature->SetLevitate(false); + float fGroundZ = m_creature->GetMap()->GetHeight(m_creature->GetPhaseMask(), m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ()); + m_creature->GetMotionMaster()->MoveFlyOrLand(POINT_ID_LAND, m_creature->GetPositionX(), m_creature->GetPositionY(), fGroundZ, false); return; } if (m_uiMovementTimer < uiDiff) { - m_uiMovementTimer = 25000; - // 3 possible actions switch (urand(0, 2)) { case 0: // breath - m_pPointData = GetMoveData(); - if (m_pPointData) - { - DoScriptText(EMOTE_BREATH, m_creature); - DoCastSpellIfCan(m_creature, m_pPointData->uiSpellId, CAST_INTERRUPT_PREVIOUS); - m_uiMovePoint = m_pPointData->uiLocIdEnd; - } + DoScriptText(EMOTE_BREATH, m_creature); + DoCastSpellIfCan(m_creature, aMoveData[m_uiMovePoint].uiSpellId, CAST_INTERRUPT_PREVIOUS); + m_uiMovePoint += NUM_MOVE_POINT / 2; + m_uiMovePoint %= NUM_MOVE_POINT; + m_uiMovementTimer = 25000; return; case 1: // a point on the left side { // C++ is stupid, so add -1 with +7 - m_uiMovePoint += m_uiMaxBreathPositions - 1; - m_uiMovePoint %= m_uiMaxBreathPositions; + m_uiMovePoint += NUM_MOVE_POINT - 1; + m_uiMovePoint %= NUM_MOVE_POINT; break; } case 2: // a point on the right side - ++m_uiMovePoint %= m_uiMaxBreathPositions; + ++m_uiMovePoint %= NUM_MOVE_POINT; break; } - m_pPointData = GetMoveData(); - if (m_pPointData) - m_creature->GetMotionMaster()->MovePoint(m_pPointData->uiLocId, m_pPointData->fX, m_pPointData->fY, m_pPointData->fZ); + m_uiMovementTimer = urand(15000, 25000); + m_creature->GetMotionMaster()->MovePoint(m_uiMovePoint, aMoveData[m_uiMovePoint].fX, aMoveData[m_uiMovePoint].fY, aMoveData[m_uiMovePoint].fZ); } else m_uiMovementTimer -= uiDiff; @@ -394,7 +411,7 @@ struct MANGOS_DLL_DECL boss_onyxiaAI : public ScriptedAI if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) { if (DoCastSpellIfCan(pTarget, m_bIsRegularMode ? SPELL_FIREBALL : SPELL_FIREBALL_H) == CAST_OK) - m_uiFireballTimer = 8000; + m_uiFireballTimer = urand(3000, 5000); } } else @@ -402,18 +419,7 @@ struct MANGOS_DLL_DECL boss_onyxiaAI : public ScriptedAI if (m_bIsSummoningWhelps) { - if (m_uiSummonCount < MAX_WHELPS_PER_PACK) - { - if (m_uiWhelpTimer < uiDiff) - { - m_creature->SummonCreature(NPC_ONYXIA_WHELP, afSpawnLocations[0][0], afSpawnLocations[0][1], afSpawnLocations[0][2], 0.0f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, MINUTE * IN_MILLISECONDS); - m_creature->SummonCreature(NPC_ONYXIA_WHELP, afSpawnLocations[1][0], afSpawnLocations[1][1], afSpawnLocations[1][2], 0.0f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, MINUTE * IN_MILLISECONDS); - m_uiWhelpTimer = 500; - } - else - m_uiWhelpTimer -= uiDiff; - } - else + if (DidSummonWhelps(uiDiff)) { m_bIsSummoningWhelps = false; m_uiSummonCount = 0; @@ -441,52 +447,37 @@ struct MANGOS_DLL_DECL boss_onyxiaAI : public ScriptedAI break; } - // Phase-switching phases - case PHASE_BREATH_PRE: - { - if (m_uiPhaseTimer) + case PHASE_BREATH_PRE: // Summon first rounds of whelps + DidSummonWhelps(uiDiff); + // no break here + default: // Phase-switching phases + if (!m_uiPhaseTimer) + break; + if (m_uiPhaseTimer <= uiDiff) { - if (m_uiPhaseTimer <= uiDiff) + switch (m_uiPhase) { - m_uiPhase = PHASE_BREATH; - m_uiMovementTimer = urand(15000, 25000); - - if (m_pInstance) - m_pInstance->SetData(TYPE_ONYXIA, DATA_LIFTOFF); - - // Move to the north side of the room - m_uiMovePoint = 0; - m_pPointData = GetMoveData(); - m_creature->GetMotionMaster()->MovePoint(m_pPointData->uiLocId, m_pPointData->fX, m_pPointData->fY, m_pPointData->fZ); - - m_uiPhaseTimer = 0; - } - else - m_uiPhaseTimer -= uiDiff; - } - - break; - } - case PHASE_BREATH_POST: - { - if (m_uiPhaseTimer) - { - if (m_uiPhaseTimer <= uiDiff) - { - m_uiPhase = PHASE_END; - - float fGroundZ = m_creature->GetMap()->GetHeight(m_creature->GetPhaseMask(), m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ()); - m_creature->Relocate(m_creature->GetPositionX(), m_creature->GetPositionY(), fGroundZ); - - SetCombatMovement(true, true); - m_uiPhaseTimer = 0; + case PHASE_TO_LIFTOFF: + m_uiPhase = PHASE_BREATH_PRE; + if (m_pInstance) + m_pInstance->SetData(TYPE_ONYXIA, DATA_LIFTOFF); + m_creature->GetMotionMaster()->MoveFlyOrLand(POINT_ID_IN_AIR, aMoveData[POINT_ID_SOUTH].fX, aMoveData[POINT_ID_SOUTH].fY, aMoveData[POINT_ID_SOUTH].fZ, true); + break; + case PHASE_BREATH_PRE: + m_creature->GetMotionMaster()->MovePoint(POINT_ID_INIT_NORTH, aMoveData[POINT_ID_NORTH].fX, aMoveData[POINT_ID_NORTH].fY, aMoveData[POINT_ID_NORTH].fZ); + break; + case PHASE_BREATH_POST: + m_uiPhase = PHASE_END; + m_creature->SetTargetGuid(m_creature->getVictim()->GetObjectGuid()); + SetCombatMovement(true, true); + DoCastSpellIfCan(m_creature, SPELL_BELLOWINGROAR); + break; } - else - m_uiPhaseTimer -= uiDiff; + m_uiPhaseTimer = 0; } - + else + m_uiPhaseTimer -= uiDiff; break; - } } } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 490a2dac5..93faa7ef4 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2869" + #define SD2_REVISION_NR "2870" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 720121002..9160df052 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -3,7 +3,7 @@ -- DELETE FROM sd2_db_version; -INSERT INTO sd2_db_version (version) VALUES ('ScriptDev2 (for C-MaNGOS 12451+) '); +INSERT INTO sd2_db_version (version) VALUES ('ScriptDev2 (for CMaNGOS 12456+) '); -- -- Below contains data for table `script_texts` mainly used in C++ parts. diff --git a/sql/updates/r2870_scriptdev2.sql b/sql/updates/r2870_scriptdev2.sql new file mode 100644 index 000000000..417b0d053 --- /dev/null +++ b/sql/updates/r2870_scriptdev2.sql @@ -0,0 +1 @@ +UPDATE sd2_db_version SET version='ScriptDev2 (for CMaNGOS 12458+) '; From a7fa83f99bfd5186789fc8a4c56d3c359743ba02 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Thu, 11 Apr 2013 03:35:25 +0200 Subject: [PATCH 0874/1172] [2871] Implement Onyxia Kite-Prevention ability. Thanks to alexluana for researching the use of this spell Note to DBDevs: Spells started with 21131 need information in spell_target_position table --- scripts/kalimdor/onyxias_lair/boss_onyxia.cpp | 21 ++++++++++++++++--- sd2_revision_nr.h | 2 +- 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/scripts/kalimdor/onyxias_lair/boss_onyxia.cpp b/scripts/kalimdor/onyxias_lair/boss_onyxia.cpp index a4974d592..997a8caf8 100644 --- a/scripts/kalimdor/onyxias_lair/boss_onyxia.cpp +++ b/scripts/kalimdor/onyxias_lair/boss_onyxia.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: Boss_Onyxia -SD%Complete: 70 -SDComment: Phase 3 need additional code. The spawning Whelps need GO-Support. Use of spells 22191 and 21131 unknown +SD%Complete: 85 +SDComment: Phase 3 need additional code. The spawning Whelps need GO-Support. Use of spell 22191 unknown SDCategory: Onyxia's Lair EndScriptData */ @@ -58,7 +58,7 @@ enum SPELL_VISUAL_BREATH_A = 4880, // Only and all of the above Breath spells (and their triggered spells) have these visuals SPELL_VISUAL_BREATH_B = 4919, - // SPELL_BREATH = 21131, // 8x in "array", different initial cast than the other arrays + SPELL_BREATH_ENTRANCE = 21131, // 8x in "array", different initial cast than the other arrays SPELL_BELLOWINGROAR = 18431, SPELL_HEATED_GROUND = 22191, // TODO @@ -128,6 +128,7 @@ struct MANGOS_DLL_DECL boss_onyxiaAI : public ScriptedAI uint32 m_uiCleaveTimer; uint32 m_uiTailSweepTimer; uint32 m_uiWingBuffetTimer; + uint32 m_uiCheckInLairTimer; uint32 m_uiMovePoint; uint32 m_uiMovementTimer; @@ -155,6 +156,7 @@ struct MANGOS_DLL_DECL boss_onyxiaAI : public ScriptedAI m_uiTailSweepTimer = urand(15000, 20000); m_uiCleaveTimer = urand(2000, 5000); m_uiWingBuffetTimer = urand(10000, 20000); + m_uiCheckInLairTimer = 3000; m_uiMovePoint = POINT_ID_NORTH; // First point reached by the flying Onyxia m_uiMovementTimer = 25000; @@ -348,6 +350,19 @@ struct MANGOS_DLL_DECL boss_onyxiaAI : public ScriptedAI else m_uiWingBuffetTimer -= uiDiff; + if (m_uiCheckInLairTimer < uiDiff) + { + if (m_pInstance) + { + Creature* pOnyTrigger = m_pInstance->GetSingleCreatureFromStorage(NPC_ONYXIA_TRIGGER); + if (pOnyTrigger && !m_creature->IsWithinDistInMap(pOnyTrigger, 90.0f, false)) + DoCastSpellIfCan(m_creature, SPELL_BREATH_ENTRANCE); + } + m_uiCheckInLairTimer = 3000; + } + else + m_uiCheckInLairTimer -= uiDiff; + if (m_uiPhase == PHASE_START && m_creature->GetHealthPercent() < 65.0f) { m_uiPhase = PHASE_TO_LIFTOFF; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 93faa7ef4..f590ef2e7 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2870" + #define SD2_REVISION_NR "2871" #endif // __SD2_REVISION_NR_H__ From 87adee28baf233379fecf51220c134bd49f7b4a6 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Thu, 11 Apr 2013 05:21:49 +0200 Subject: [PATCH 0875/1172] [2872] Implement Onyxia spell Heated Ground Note: Adapt your mangosd.conf to have a larger value for "MaxSpellCastsInChain" (12 is required, better be safe than sorry and use a big value :-) ) --- scripts/kalimdor/onyxias_lair/boss_onyxia.cpp | 3 ++- sd2_revision_nr.h | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/kalimdor/onyxias_lair/boss_onyxia.cpp b/scripts/kalimdor/onyxias_lair/boss_onyxia.cpp index 997a8caf8..982bf90e6 100644 --- a/scripts/kalimdor/onyxias_lair/boss_onyxia.cpp +++ b/scripts/kalimdor/onyxias_lair/boss_onyxia.cpp @@ -61,7 +61,7 @@ enum SPELL_BREATH_ENTRANCE = 21131, // 8x in "array", different initial cast than the other arrays SPELL_BELLOWINGROAR = 18431, - SPELL_HEATED_GROUND = 22191, // TODO + SPELL_HEATED_GROUND = 22191, // Prevent players from hiding in the tunnels when it is time for Onyxia's breath SPELL_SUMMONWHELP = 17646, // TODO this spell is only a summon spell, but would need a spell to activate the eggs SPELL_SUMMON_LAIR_GUARD = 68968, @@ -243,6 +243,7 @@ struct MANGOS_DLL_DECL boss_onyxiaAI : public ScriptedAI { // This was sent with SendMonsterMove - which resulted in better speed than now m_creature->GetMotionMaster()->MovePoint(m_uiMovePoint, aMoveData[m_uiMovePoint].fX, aMoveData[m_uiMovePoint].fY, aMoveData[m_uiMovePoint].fZ); + DoCastSpellIfCan(m_creature, SPELL_HEATED_GROUND, CAST_TRIGGERED); } } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index f590ef2e7..67b1c7a06 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2871" + #define SD2_REVISION_NR "2872" #endif // __SD2_REVISION_NR_H__ From 7342493c5732eaeaedc6b9ac750b96f98468890a Mon Sep 17 00:00:00 2001 From: Xfurry Date: Thu, 11 Apr 2013 16:38:49 +0300 Subject: [PATCH 0876/1172] [2873] Allow Kil'jaeden to properly use Sinister Reflection and Power of the Blue Flight This will also enable Darkness of a Thousand Souls spell --- .../sunwell_plateau/boss_kiljaeden.cpp | 94 ++++++++++++++++++- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 + sql/updates/r2873_mangos.sql | 1 + 4 files changed, 93 insertions(+), 5 deletions(-) create mode 100644 sql/updates/r2873_mangos.sql diff --git a/scripts/eastern_kingdoms/sunwell_plateau/boss_kiljaeden.cpp b/scripts/eastern_kingdoms/sunwell_plateau/boss_kiljaeden.cpp index 804f625ee..996483960 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/boss_kiljaeden.cpp +++ b/scripts/eastern_kingdoms/sunwell_plateau/boss_kiljaeden.cpp @@ -16,13 +16,14 @@ /* ScriptData SDName: boss_kiljaeden -SD%Complete: 80 -SDComment: Sinister Reflection need core and AI support. +SD%Complete: 90 +SDComment: Sinister Reflection needs AI support. SDCategory: Sunwell Plateau EndScriptData */ #include "precompiled.h" #include "sunwell_plateau.h" +#include "TemporarySummon.h" enum { @@ -93,6 +94,9 @@ enum SPELL_ANVEENA_PRISON = 46367, SPELL_SACRIFICE_ANVEENA = 46474, SPELL_SINISTER_REFL_CLASS = 45893, // increase the size of the clones + SPELL_SINISTER_REFL_CLONE = 45785, // clone the player + SPELL_VENGEANCE_BLUE_FLIGHT = 45839, // possess the dragon + SPELL_POSSESS_DRAKE_IMMUNE = 45838, // immunity while the player possesses the dragon // Npcs NPC_SHIELD_ORB = 25502, @@ -466,6 +470,20 @@ struct MANGOS_DLL_DECL boss_kiljaedenAI : public Scripted_NoMovementAI, private pSummoned->GetMotionMaster()->Clear(); pSummoned->GetMotionMaster()->MovePoint(1, fX, fY, pSummoned->GetPositionZ()); } + else if (pSummoned->GetEntry() == NPC_SINISTER_REFLECTION) + { + if (pSummoned->IsTemporarySummon()) + { + TemporarySummon* pTemporary = (TemporarySummon*)pSummoned; + + if (Player* pPlayer = m_creature->GetMap()->GetPlayer(pTemporary->GetSummonerGuid())) + { + pPlayer->CastSpell(pSummoned, SPELL_SINISTER_REFL_CLONE, true); + pSummoned->CastSpell(pSummoned, SPELL_SINISTER_REFL_CLASS, true); + pSummoned->AI()->AttackStart(pPlayer); + } + } + } } void SummonedCreatureJustDied(Creature* pSummoned) override @@ -594,7 +612,6 @@ struct MANGOS_DLL_DECL boss_kiljaedenAI : public Scripted_NoMovementAI, private case PHASE_DARKNESS: // In the last phase he uses this spell more often - /* ToDo: Uncomment this spell when the Blue Dragonfight Orbs are implemented if (m_uiDarknessOfSoulsTimer < uiDiff) { if (DoCastSpellIfCan(m_creature, SPELL_DARKNESS_OF_SOULS) == CAST_OK) @@ -602,7 +619,6 @@ struct MANGOS_DLL_DECL boss_kiljaedenAI : public Scripted_NoMovementAI, private } else m_uiDarknessOfSoulsTimer -= uiDiff; - */ if (m_uiFlameDartTimer < uiDiff) { @@ -751,6 +767,66 @@ struct MANGOS_DLL_DECL npc_shield_orbAI : public ScriptedAI void UpdateAI(const uint32 /*uiDiff*/) override { } }; +/*###### +## npc_power_blue_flight +######*/ + +struct MANGOS_DLL_DECL npc_power_blue_flightAI : public ScriptedAI +{ + npc_power_blue_flightAI(Creature* pCreature) : ScriptedAI(pCreature) + { + SetCombatMovement(false); + m_bHasPossessed = false; + Reset(); + } + + bool m_bHasPossessed; + + void Reset() override { } + + void JustDied(Unit* /*pKiller*/) override + { + if (m_creature->IsTemporarySummon()) + { + TemporarySummon* pTemporary = (TemporarySummon*)m_creature; + + if (Player* pPlayer = m_creature->GetMap()->GetPlayer(pTemporary->GetSummonerGuid())) + pPlayer->RemoveAurasDueToSpell(SPELL_POSSESS_DRAKE_IMMUNE); + } + } + + void UpdateAI(const uint32 /*uiDiff*/) override + { + if (!m_bHasPossessed) + { + if (m_creature->IsTemporarySummon()) + { + TemporarySummon* pTemporary = (TemporarySummon*)m_creature; + + if (Player* pPlayer = m_creature->GetMap()->GetPlayer(pTemporary->GetSummonerGuid())) + { + pPlayer->CastSpell(m_creature, SPELL_VENGEANCE_BLUE_FLIGHT, true); + pPlayer->CastSpell(pPlayer, SPELL_POSSESS_DRAKE_IMMUNE, true); + } + } + + // Reset the No Interact flag of the closest orb + GameObject* pOrb = GetClosestGameObjectWithEntry(m_creature, GO_ORB_BLUE_FLIGHT_1, 10.0f); + if (!pOrb) + GameObject* pOrb = GetClosestGameObjectWithEntry(m_creature, GO_ORB_BLUE_FLIGHT_2, 10.0f); + if (!pOrb) + GameObject* pOrb = GetClosestGameObjectWithEntry(m_creature, GO_ORB_BLUE_FLIGHT_3, 10.0f); + if (!pOrb) + GameObject* pOrb = GetClosestGameObjectWithEntry(m_creature, GO_ORB_BLUE_FLIGHT_4, 10.0f); + + if (pOrb) + pOrb->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NO_INTERACT); + + m_bHasPossessed = true; + } + } +}; + CreatureAI* GetAI_boss_kiljaeden(Creature* pCreature) { return new boss_kiljaedenAI(pCreature); @@ -766,6 +842,11 @@ CreatureAI* GetAI_npc_shield_orb(Creature* pCreature) return new npc_shield_orbAI(pCreature); } +CreatureAI* GetAI_npc_power_blue_flight(Creature* pCreature) +{ + return new npc_power_blue_flightAI(pCreature); +} + void AddSC_boss_kiljaeden() { Script* pNewScript; @@ -785,4 +866,9 @@ void AddSC_boss_kiljaeden() pNewScript->Name = "npc_shield_orb"; pNewScript->GetAI = &GetAI_npc_shield_orb; pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_power_blue_flight"; + pNewScript->GetAI = &GetAI_npc_power_blue_flight; + pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 67b1c7a06..3d905a5c0 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2872" + #define SD2_REVISION_NR "2873" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 7f51dcb70..6a51a5156 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -1091,6 +1091,7 @@ UPDATE creature_template SET ScriptName='npc_kiljaeden_controller' WHERE entry=2 UPDATE creature_template SET ScriptName='spell_dummy_npc_brutallus_cloud' WHERE entry=25703; UPDATE creature_template SET ScriptName='boss_felmyst' WHERE entry=25038; UPDATE creature_template SET ScriptName='npc_shield_orb' WHERE entry=25502; +UPDATE creature_template SET ScriptName='npc_power_blue_flight' WHERE entry=25653; /* SWAMP OF SORROWS */ UPDATE creature_template SET ScriptName='npc_galen_goodward' WHERE entry=5391; diff --git a/sql/updates/r2873_mangos.sql b/sql/updates/r2873_mangos.sql new file mode 100644 index 000000000..607c1a0fd --- /dev/null +++ b/sql/updates/r2873_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_power_blue_flight' WHERE entry=25653; From 0f698f402dd6b6eaa6a04377c47173353b2d468f Mon Sep 17 00:00:00 2001 From: Xfurry Date: Fri, 12 Apr 2013 01:11:01 +0300 Subject: [PATCH 0877/1172] [2874] Add support for quest 1221 --- .../razorfen_kraul/razorfen_kraul.cpp | 115 +++++++++++++++++- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 + sql/updates/r2874_mangos.sql | 1 + 4 files changed, 117 insertions(+), 2 deletions(-) create mode 100644 sql/updates/r2874_mangos.sql diff --git a/scripts/kalimdor/razorfen_kraul/razorfen_kraul.cpp b/scripts/kalimdor/razorfen_kraul/razorfen_kraul.cpp index 6156fca89..299428d73 100644 --- a/scripts/kalimdor/razorfen_kraul/razorfen_kraul.cpp +++ b/scripts/kalimdor/razorfen_kraul/razorfen_kraul.cpp @@ -17,7 +17,7 @@ /* ScriptData SDName: Razorfen_Kraul SD%Complete: 100 -SDComment: Willix the Importer Escort Event +SDComment: Quest support: 1144, 1221 SDCategory: Razorfen Kraul EndScriptData */ @@ -27,6 +27,11 @@ EndContentData */ #include "precompiled.h" #include "escort_ai.h" +#include "pet_ai.h" + +/*###### +## npc_willix_the_importer +######*/ enum { @@ -145,6 +150,108 @@ bool QuestAccept_npc_willix_the_importer(Player* pPlayer, Creature* pCreature, c return true; } +/*###### +## npc_snufflenose_gopher +######*/ + +enum +{ + SPELL_SNUFFLENOSE_COMMAND = 8283, + NPC_SNUFFLENOSE_GOPHER = 4781, + GO_BLUELEAF_TUBBER = 20920, +}; + +struct MANGOS_DLL_DECL npc_snufflenose_gopherAI : public ScriptedPetAI +{ + npc_snufflenose_gopherAI(Creature* pCreature) : ScriptedPetAI(pCreature) { Reset(); } + + bool m_bIsMovementActive; + + ObjectGuid m_targetTubberGuid; + + void Reset() override + { + m_bIsMovementActive = false; + } + + void MovementInform(uint32 uiMoveType, uint32 uiPointId) override + { + if (uiMoveType != POINT_MOTION_TYPE || !uiPointId) + return; + + if (GameObject* pGo = m_creature->GetMap()->GetGameObject(m_targetTubberGuid)) + { + pGo->SetRespawnTime(5 * MINUTE); + pGo->Refresh(); + + pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_INTERACT_COND); + } + + m_bIsMovementActive = false; + } + + // Function to search for new tubber in range + void DoFindNewTubber() + { + std::list lTubbersInRange; + GetGameObjectListWithEntryInGrid(lTubbersInRange, m_creature, GO_BLUELEAF_TUBBER, 40.0f); + + if (lTubbersInRange.empty()) + return; + + lTubbersInRange.sort(ObjectDistanceOrder(m_creature)); + GameObject* pNearestTubber = NULL; + + // Always need to find new ones + for (std::list::const_iterator itr = lTubbersInRange.begin(); itr != lTubbersInRange.end(); ++itr) + { + if (!(*itr)->isSpawned() && (*itr)->HasFlag(GAMEOBJECT_FLAGS, GO_FLAG_INTERACT_COND) && (*itr)->IsWithinLOSInMap(m_creature)) + { + pNearestTubber = *itr; + break; + } + } + + if (!pNearestTubber) + return; + m_targetTubberGuid = pNearestTubber->GetObjectGuid(); + + float fX, fY, fZ; + pNearestTubber->GetContactPoint(m_creature, fX, fY, fZ); + m_creature->GetMotionMaster()->MovePoint(1, fX, fY, fZ); + m_bIsMovementActive = true; + } + + void UpdateAI(const uint32 uiDiff) override + { + if (!m_bIsMovementActive) + ScriptedPetAI::UpdateAI(uiDiff); + } +}; + +CreatureAI* GetAI_npc_snufflenose_gopher(Creature* pCreature) +{ + return new npc_snufflenose_gopherAI(pCreature); +} + +bool EffectDummyCreature_npc_snufflenose_gopher(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) +{ + // always check spellid and effectindex + if (uiSpellId == SPELL_SNUFFLENOSE_COMMAND && uiEffIndex == EFFECT_INDEX_0) + { + if (pCreatureTarget->GetEntry() == NPC_SNUFFLENOSE_GOPHER) + { + if (npc_snufflenose_gopherAI* pGopherAI = dynamic_cast(pCreatureTarget->AI())) + pGopherAI->DoFindNewTubber(); + } + + // always return true when we are handling this spell and effect + return true; + } + + return false; +} + void AddSC_razorfen_kraul() { Script* pNewScript; @@ -154,4 +261,10 @@ void AddSC_razorfen_kraul() pNewScript->GetAI = &GetAI_npc_willix_the_importer; pNewScript->pQuestAcceptNPC = &QuestAccept_npc_willix_the_importer; pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_snufflenose_gopher"; + pNewScript->GetAI = &GetAI_npc_snufflenose_gopher; + pNewScript->pEffectDummyNPC = &EffectDummyCreature_npc_snufflenose_gopher; + pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 3d905a5c0..4b2a7e48c 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2873" + #define SD2_REVISION_NR "2874" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 6a51a5156..1234940fc 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -923,6 +923,7 @@ UPDATE creature_template SET ScriptName='npc_belnistrasz' WHERE entry=8516; /* RAZORFEN KRAUL */ UPDATE instance_template SET ScriptName='instance_razorfen_kraul' WHERE map=47; UPDATE creature_template SET ScriptName='npc_willix_the_importer' WHERE entry=4508; +UPDATE creature_template SET ScriptName='npc_snufflenose_gopher' WHERE entry=4781; /* REDRIDGE MOUNTAINS */ UPDATE creature_template SET ScriptName='npc_corporal_keeshan' WHERE entry=349; diff --git a/sql/updates/r2874_mangos.sql b/sql/updates/r2874_mangos.sql new file mode 100644 index 000000000..d1dd899e8 --- /dev/null +++ b/sql/updates/r2874_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_snufflenose_gopher' WHERE entry=4781; From 274426b3c09e24b12c131075872f5c76de8a614c Mon Sep 17 00:00:00 2001 From: Radu Date: Fri, 12 Apr 2013 12:18:40 +0300 Subject: [PATCH 0878/1172] Update sunwell_plateau.h Fix entry of Madrigosa in SWP --- scripts/eastern_kingdoms/sunwell_plateau/sunwell_plateau.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/eastern_kingdoms/sunwell_plateau/sunwell_plateau.h b/scripts/eastern_kingdoms/sunwell_plateau/sunwell_plateau.h index 2a207c9a9..d0e87f914 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/sunwell_plateau.h +++ b/scripts/eastern_kingdoms/sunwell_plateau/sunwell_plateau.h @@ -19,7 +19,7 @@ enum NPC_KALECGOS_DRAGON = 24850, // kalecgos blue dragon hostile NPC_KALECGOS_HUMAN = 24891, // kalecgos human form in spectral realm NPC_SATHROVARR = 24892, - NPC_MADRIGOSA = 25160, + NPC_MADRIGOSA = 24895, NPC_FLIGHT_TRIGGER_LEFT = 25357, // Related to Felmyst flight path. Also the anchor to summon Madrigosa // NPC_FLIGHT_TRIGGER_RIGHT = 25358, // related to Felmyst flight path NPC_BRUTALLUS = 24882, From 5dd00d58510aa6de59b89183a1a4fa383a15b1d5 Mon Sep 17 00:00:00 2001 From: cala Date: Fri, 12 Apr 2013 10:13:26 +0200 Subject: [PATCH 0879/1172] [2875] Add support for escort quest 945 Signed-off-by: Schmoozerd --- scripts/kalimdor/darkshore.cpp | 66 ++++++++++++++++++- scripts/kalimdor/onyxias_lair/boss_onyxia.cpp | 2 +- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 + sql/scriptdev2_script_full.sql | 29 +++++++- sql/updates/r2875_mangos.sql | 1 + sql/updates/r2875_scriptdev2.sql | 28 ++++++++ 7 files changed, 125 insertions(+), 4 deletions(-) create mode 100644 sql/updates/r2875_mangos.sql create mode 100644 sql/updates/r2875_scriptdev2.sql diff --git a/scripts/kalimdor/darkshore.cpp b/scripts/kalimdor/darkshore.cpp index b69ef003d..487d3940f 100644 --- a/scripts/kalimdor/darkshore.cpp +++ b/scripts/kalimdor/darkshore.cpp @@ -17,7 +17,7 @@ /* ScriptData SDName: Darkshore SD%Complete: 100 -SDComment: Quest support: 731, 994, 995, 2078, 5321 +SDComment: Quest support: 731, 945, 994, 995, 2078, 5321 SDCategory: Darkshore EndScriptData */ @@ -26,6 +26,7 @@ npc_kerlonian npc_prospector_remtravel npc_threshwackonator npc_volcor +npc_therylune EndContentData */ #include "precompiled.h" @@ -545,6 +546,63 @@ bool QuestAccept_npc_volcor(Player* pPlayer, Creature* pCreature, const Quest* p return true; } +/*#### +# npc_therylune +####*/ + +enum +{ + SAY_THERYLUNE_START = -1000905, + SAY_THERYLUNE_FINISH = -1000906, + + NPC_THERYSIL = 3585, + + QUEST_ID_THERYLUNE_ESCAPE = 945, +}; + +struct MANGOS_DLL_DECL npc_theryluneAI : public npc_escortAI +{ + npc_theryluneAI(Creature* pCreature) : npc_escortAI(pCreature) { Reset(); } + + + void Reset() override {} + + void WaypointReached(uint32 uiPointId) override + { + switch(uiPointId) + { + case 17: + if (Player* pPlayer = GetPlayerForEscort()) + pPlayer->GroupEventHappens(QUEST_ID_THERYLUNE_ESCAPE, m_creature); + break; + case 19: + if (Player* pPlayer = GetPlayerForEscort()) + DoScriptText(SAY_THERYLUNE_FINISH, m_creature, pPlayer); + SetRun(); + break; + } + } +}; + +CreatureAI* GetAI_npc_therylune(Creature* pCreature) +{ + return new npc_theryluneAI(pCreature); +} + +bool QuestAccept_npc_therylune(Player* pPlayer, Creature* pCreature, const Quest* pQuest) +{ + if (pQuest->GetQuestId() == QUEST_ID_THERYLUNE_ESCAPE) + { + if (npc_theryluneAI* pEscortAI = dynamic_cast(pCreature->AI())) + { + pEscortAI->Start(false, pPlayer, pQuest); + DoScriptText(SAY_THERYLUNE_START, pCreature, pPlayer); + } + } + + return true; +} + void AddSC_darkshore() { Script* pNewScript; @@ -573,4 +631,10 @@ void AddSC_darkshore() pNewScript->GetAI = &GetAI_npc_volcor; pNewScript->pQuestAcceptNPC = &QuestAccept_npc_volcor; pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_therylune"; + pNewScript->GetAI = &GetAI_npc_therylune; + pNewScript->pQuestAcceptNPC = &QuestAccept_npc_therylune; + pNewScript->RegisterSelf(); } diff --git a/scripts/kalimdor/onyxias_lair/boss_onyxia.cpp b/scripts/kalimdor/onyxias_lair/boss_onyxia.cpp index 982bf90e6..b667978bf 100644 --- a/scripts/kalimdor/onyxias_lair/boss_onyxia.cpp +++ b/scripts/kalimdor/onyxias_lair/boss_onyxia.cpp @@ -17,7 +17,7 @@ /* ScriptData SDName: Boss_Onyxia SD%Complete: 85 -SDComment: Phase 3 need additional code. The spawning Whelps need GO-Support. Use of spell 22191 unknown +SDComment: Phase 3 need additional code. The spawning Whelps need GO-Support. SDCategory: Onyxia's Lair EndScriptData */ diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 4b2a7e48c..7258c1d0d 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2874" + #define SD2_REVISION_NR "2875" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 1234940fc..1c74df3ab 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -483,6 +483,7 @@ UPDATE creature_template SET ScriptName='npc_kerlonian' WHERE entry=11218; UPDATE creature_template SET ScriptName='npc_prospector_remtravel' WHERE entry=2917; UPDATE creature_template SET ScriptName='npc_threshwackonator' WHERE entry=6669; UPDATE creature_template SET ScriptName='npc_volcor' WHERE entry=3692; +UPDATE creature_template SET ScriptName='npc_therylune' WHERE entry=3584; /* DARNASSUS */ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 9160df052..29ac848c0 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -971,7 +971,10 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1000901,'Thanks, friend. Will you help me get out of here?',0,0,0,1,'vanguard SAY_VANGUARD_INTRO'), (-1000902,'We\'re not too far from the Protectorate Watch Post, $N. This way!',0,0,0,1,'vanguard SAY_VANGUARD_START'), (-1000903,'Commander! This fleshling rescued me!',0,0,0,0,'vanguard SAY_VANGUARD_FINISH'), -(-1000904,'%s salutes $N.',0,2,0,0,'vanguard EMOTE_VANGUARD_FINISH'); +(-1000904,'%s salutes $N.',0,2,0,0,'vanguard EMOTE_VANGUARD_FINISH'), + +(-1000905,'Ok, let\'s go!!',0,0,0,1,'therylune SAY_THERYLUNE_START'), +(-1000906,'I can make it the rest of the way. $N. THANKS!',0,0,0,1,'therylune SAY_THERYLUNE_START'); -- -1 033 000 SHADOWFANG KEEP INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES @@ -7229,4 +7232,28 @@ INSERT INTO script_waypoint VALUES (23089, 29, 749.64, 378.69, 352.99, 0, ''), (23089, 30, 737.92, 368.15, 352.99, 0, 'escort paused'); +DELETE FROM script_waypoint WHERE entry=3584; +INSERT INTO script_waypoint VALUES +(3584, 0, 4520.4, 420.235, 33.5284, 2000, ''), +(3584, 1, 4512.26, 408.881, 32.9308, 0, ''), +(3584, 2, 4507.94, 396.47, 32.9476, 0, ''), +(3584, 3, 4507.53, 383.781, 32.995, 0, ''), +(3584, 4, 4512.1, 374.02, 33.166, 0, ''), +(3584, 5, 4519.75, 373.241, 33.1574, 0, ''), +(3584, 6, 4592.41, 369.127, 31.4893, 0, ''), +(3584, 7, 4598.55, 364.801, 31.4947, 0, ''), +(3584, 8, 4602.76, 357.649, 32.9265, 0, ''), +(3584, 9, 4597.88, 352.629, 34.0317, 0, ''), +(3584, 10, 4590.23, 350.9, 36.2977, 0, ''), +(3584, 11, 4581.5, 348.254, 38.3878, 0, ''), +(3584, 12, 4572.05, 348.059, 42.3539, 0, ''), +(3584, 13, 4564.75, 344.041, 44.2463, 0, ''), +(3584, 14, 4556.63, 341.003, 47.6755, 0, ''), +(3584, 15, 4554.38, 334.968, 48.8003, 0, ''), +(3584, 16, 4557.63, 329.783, 49.9532, 0, ''), +(3584, 17, 4563.32, 316.829, 53.2409, 0, ''), +(3584, 18, 4566.09, 303.127, 55.0396, 0, ''), +(3584, 19, 4561.65, 295.456, 57.0984, 4000, 'SAY_THERYLUNE_FINISH'), +(3584, 20, 4551.03, 293.333, 57.1534, 2000, ''); + -- EOF diff --git a/sql/updates/r2875_mangos.sql b/sql/updates/r2875_mangos.sql new file mode 100644 index 000000000..f245baded --- /dev/null +++ b/sql/updates/r2875_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_therylune' WHERE entry=3584; diff --git a/sql/updates/r2875_scriptdev2.sql b/sql/updates/r2875_scriptdev2.sql new file mode 100644 index 000000000..f398bd3cc --- /dev/null +++ b/sql/updates/r2875_scriptdev2.sql @@ -0,0 +1,28 @@ +DELETE FROM script_texts WHERE entry IN (-1000905, -1000906); +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1000905,'Ok, let\'s go!!',0,0,0,1,'therylune SAY_THERYLUNE_START'), +(-1000906,'I can make it the rest of the way. $N. THANKS!',0,0,0,1,'therylune SAY_THERYLUNE_START'); + +DELETE FROM script_waypoint WHERE entry=3584; +INSERT INTO script_waypoint VALUES +(3584, 0, 4520.4, 420.235, 33.5284, 2000, ''), +(3584, 1, 4512.26, 408.881, 32.9308, 0, ''), +(3584, 2, 4507.94, 396.47, 32.9476, 0, ''), +(3584, 3, 4507.53, 383.781, 32.995, 0, ''), +(3584, 4, 4512.1, 374.02, 33.166, 0, ''), +(3584, 5, 4519.75, 373.241, 33.1574, 0, ''), +(3584, 6, 4592.41, 369.127, 31.4893, 0, ''), +(3584, 7, 4598.55, 364.801, 31.4947, 0, ''), +(3584, 8, 4602.76, 357.649, 32.9265, 0, ''), +(3584, 9, 4597.88, 352.629, 34.0317, 0, ''), +(3584, 10, 4590.23, 350.9, 36.2977, 0, ''), +(3584, 11, 4581.5, 348.254, 38.3878, 0, ''), +(3584, 12, 4572.05, 348.059, 42.3539, 0, ''), +(3584, 13, 4564.75, 344.041, 44.2463, 0, ''), +(3584, 14, 4556.63, 341.003, 47.6755, 0, ''), +(3584, 15, 4554.38, 334.968, 48.8003, 0, ''), +(3584, 16, 4557.63, 329.783, 49.9532, 0, ''), +(3584, 17, 4563.32, 316.829, 53.2409, 0, ''), +(3584, 18, 4566.09, 303.127, 55.0396, 0, ''), +(3584, 19, 4561.65, 295.456, 57.0984, 4000, 'SAY_THERYLUNE_FINISH'), +(3584, 20, 4551.03, 293.333, 57.1534, 2000, ''); From 52184bdbc7e2e8587cdaf6a975415e668afa233e Mon Sep 17 00:00:00 2001 From: Xfurry Date: Wed, 17 Apr 2013 00:00:59 +0300 Subject: [PATCH 0880/1172] [2876] Fix bug in Hyjal instance script Thanks Azelen for pointing Close #58 --- scripts/kalimdor/caverns_of_time/hyjal/instance_hyjal.cpp | 2 +- sd2_revision_nr.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/kalimdor/caverns_of_time/hyjal/instance_hyjal.cpp b/scripts/kalimdor/caverns_of_time/hyjal/instance_hyjal.cpp index 0fb9130d1..c6454eca9 100644 --- a/scripts/kalimdor/caverns_of_time/hyjal/instance_hyjal.cpp +++ b/scripts/kalimdor/caverns_of_time/hyjal/instance_hyjal.cpp @@ -60,7 +60,7 @@ void instance_mount_hyjal::OnPlayerEnter(Player* /*pPlayer*/) void instance_mount_hyjal::OnCreatureCreate(Creature* pCreature) { if (pCreature->GetEntry() == NPC_ARCHIMONDE) - m_mNpcEntryGuidStore[NPC_ARCHIMONDE] == pCreature->GetObjectGuid(); + m_mNpcEntryGuidStore[NPC_ARCHIMONDE] = pCreature->GetObjectGuid(); } void instance_mount_hyjal::OnObjectCreate(GameObject* pGo) diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 7258c1d0d..c69e69780 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2875" + #define SD2_REVISION_NR "2876" #endif // __SD2_REVISION_NR_H__ From f6ea0ffdcb19951f02f0dddafaf0514f2ee88b34 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Wed, 17 Apr 2013 00:05:16 +0300 Subject: [PATCH 0881/1172] [2877] Update some scripts after CMangos [12322] --- scripts/eastern_kingdoms/karazhan/instance_karazhan.cpp | 3 --- scripts/eastern_kingdoms/sunwell_plateau/boss_brutallus.cpp | 5 +++++ scripts/northrend/gundrak/instance_gundrak.cpp | 3 --- scripts/northrend/violet_hold/instance_violet_hold.cpp | 3 --- sd2_revision_nr.h | 2 +- 5 files changed, 6 insertions(+), 10 deletions(-) diff --git a/scripts/eastern_kingdoms/karazhan/instance_karazhan.cpp b/scripts/eastern_kingdoms/karazhan/instance_karazhan.cpp index ba6777aaa..4d7e5aadd 100644 --- a/scripts/eastern_kingdoms/karazhan/instance_karazhan.cpp +++ b/scripts/eastern_kingdoms/karazhan/instance_karazhan.cpp @@ -161,10 +161,7 @@ void instance_karazhan::SetData(uint32 uiType, uint32 uiData) if (Creature* pMidnight = GetSingleCreatureFromStorage(NPC_MIDNIGHT)) { if (!pMidnight->isAlive()) - { pMidnight->Respawn(); - pMidnight->GetMotionMaster()->MoveTargetedHome(); - } } } break; diff --git a/scripts/eastern_kingdoms/sunwell_plateau/boss_brutallus.cpp b/scripts/eastern_kingdoms/sunwell_plateau/boss_brutallus.cpp index 699c7c735..1a6432c8e 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/boss_brutallus.cpp +++ b/scripts/eastern_kingdoms/sunwell_plateau/boss_brutallus.cpp @@ -461,6 +461,11 @@ bool EffectAuraDummy_spell_aura_dummy_npc_brutallus_cloud(const Aura* pAura, boo { if (Creature* pMadrigosa = pInstance->GetSingleCreatureFromStorage(NPC_MADRIGOSA)) { + // Set respawn pos to current pos + CreatureCreatePos madrigosaPos(pMadrigosa->GetMap(), pMadrigosa->GetPositionX(), pMadrigosa->GetPositionY(), pMadrigosa->GetPositionZ(), + pMadrigosa->GetOrientation(), pMadrigosa->GetPhaseMask()); + pMadrigosa->SetRespawnCoord(madrigosaPos); + pMadrigosa->CastSpell(pMadrigosa, SPELL_FELBLAZE_PREVIZUAL, true); pMadrigosa->ForcedDespawn(10000); } diff --git a/scripts/northrend/gundrak/instance_gundrak.cpp b/scripts/northrend/gundrak/instance_gundrak.cpp index 9d4754016..9f8985c18 100644 --- a/scripts/northrend/gundrak/instance_gundrak.cpp +++ b/scripts/northrend/gundrak/instance_gundrak.cpp @@ -209,10 +209,7 @@ void instance_gundrak::SetData(uint32 uiType, uint32 uiData) for (GuidSet::const_iterator itr = m_sColossusMojosGuids.begin(); itr != m_sColossusMojosGuids.end(); ++itr) { if (Creature* pMojo = instance->GetCreature(*itr)) - { pMojo->Respawn(); - pMojo->GetMotionMaster()->MoveTargetedHome(); - } } } if (uiData == SPECIAL) diff --git a/scripts/northrend/violet_hold/instance_violet_hold.cpp b/scripts/northrend/violet_hold/instance_violet_hold.cpp index 526293009..5b9388d69 100644 --- a/scripts/northrend/violet_hold/instance_violet_hold.cpp +++ b/scripts/northrend/violet_hold/instance_violet_hold.cpp @@ -507,10 +507,7 @@ void instance_violet_hold::CallGuards(bool bRespawn) if (Creature* pGuard = instance->GetCreature(*itr)) { if (bRespawn) - { pGuard->Respawn(); - pGuard->GetMotionMaster()->MoveTargetedHome(); - } else if (pGuard->isAlive()) { pGuard->SetWalk(false); diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index c69e69780..2f79fed51 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2876" + #define SD2_REVISION_NR "2877" #endif // __SD2_REVISION_NR_H__ From 77a8261f430504b4d5c566cada1897bbfbcc17b1 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Thu, 18 Apr 2013 02:05:01 +0300 Subject: [PATCH 0882/1172] [2878] Refactor and simplify code for Sartharion - Obsidian Sanctum This will drop scripts for Disciples and Acolytes because they can be handled by the Dragon AI, and will implement the Flame Tsunami --- .../obsidian_sanctum/boss_sartharion.cpp | 560 +++++++++--------- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 3 +- sql/updates/r2878_mangos.sql | 3 + 4 files changed, 283 insertions(+), 285 deletions(-) create mode 100644 sql/updates/r2878_mangos.sql diff --git a/scripts/northrend/obsidian_sanctum/boss_sartharion.cpp b/scripts/northrend/obsidian_sanctum/boss_sartharion.cpp index cea15c24b..6ddc5612e 100644 --- a/scripts/northrend/obsidian_sanctum/boss_sartharion.cpp +++ b/scripts/northrend/obsidian_sanctum/boss_sartharion.cpp @@ -79,14 +79,16 @@ enum // Vesperon // In portal is a disciple, when disciple killed remove Power_of_vesperon, portal open multiple times - NPC_ACOLYTE_OF_VESPERON = 31219, // Acolyte of Vesperon + NPC_DISCIPLE_OF_VESPERON = 30858, // Disciple of Vesperon + NPC_ACOLYTE_OF_VESPERON = 31219, // Acolyte of Vesperon - summoned during Sartharion event SPELL_POWER_OF_VESPERON = 61251, // Vesperon's presence decreases the maximum health of all enemies by 25%. SPELL_TWILIGHT_TORMENT_VESP = 57948, // (Shadow only) trigger 57935 then 57988 SPELL_TWILIGHT_TORMENT_VESP_ACO = 58853, // (Fire and Shadow) trigger 58835 then 57988 // Shadron // In portal is a disciple, when disciple killed remove Power_of_vesperon, portal open multiple times - NPC_ACOLYTE_OF_SHADRON = 31218, // Acolyte of Shadron + NPC_DISCIPLE_OF_SHADRON = 30688, // Disciple of Shadron + NPC_ACOLYTE_OF_SHADRON = 31218, // Acolyte of Shadron - summoned during Sartharion event SPELL_POWER_OF_SHADRON = 58105, // Shadron's presence increases Fire damage taken by all enemies by 100%. SPELL_GIFT_OF_TWILIGTH_SHA = 57835, // TARGET_SCRIPT shadron SPELL_GIFT_OF_TWILIGTH_SAR = 58766, // TARGET_SCRIPT sartharion @@ -98,6 +100,10 @@ enum SPELL_SUMMON_TWILIGHT_WHELP = 58035, // doesn't work, will spawn NPC_TWILIGHT_WHELP SPELL_SUMMON_SARTHARION_TWILIGHT_WHELP = 58826, // doesn't work, will spawn NPC_SHARTHARION_TWILIGHT_WHELP + NPC_TWILIGHT_EGG = 30882, // Twilight Egg - summoned during Tenebron event + NPC_SARTHARION_TWILIGHT_EGG = 31204, // Twilight Egg - summoned during Sartharion event + NPC_TWILIGHT_EGG_CONTROLLER = 31138, + SPELL_HATCH_EGGS_H = 59189, SPELL_HATCH_EGGS = 58542, SPELL_HATCH_EGGS_EFFECT_H = 59190, @@ -116,6 +122,11 @@ enum NPC_FLAME_TSUNAMI = 30616, // for the flame waves NPC_LAVA_BLAZE = 30643, // adds spawning from flame strike + NPC_VESPERON_CONTROLLER = 30878, + NPC_VESPERON_CONTROLLER_DEBUFF_CLEAR = 32694, + NPC_SHADRON_PORTAL = 30741, + NPC_SHADRON_PORTAL_VISUAL = 30650, + // using these custom points for dragons start and end POINT_ID_INIT = 100, POINT_ID_LAND = 200 @@ -123,7 +134,7 @@ enum struct Waypoint { - float m_fX, m_fY, m_fZ; + float m_fX, m_fY, m_fZ, m_fO; }; // each dragons special points. First where fly to before connect to connon, second where land point is. @@ -156,6 +167,16 @@ Waypoint m_aDragonCommon[] = {3209.969f, 566.523f, 98.652f} }; +Waypoint m_aTsunamiLoc[] = +{ + // Note: this coords are guesswork, they might need to be updated. + {3201.0f, 481.82f, 58.6f, 6.23f}, // left to right + {3201.0f, 524.50f, 58.6f, 6.23f}, + {3201.0f, 566.64f, 58.6f, 6.23f}, + {3287.5f, 545.50f, 58.6f, 3.19f}, // right to left + {3287.5f, 503.00f, 58.6f, 3.19f}, +}; + /*###### ## Boss Sartharion ######*/ @@ -194,34 +215,25 @@ struct MANGOS_DLL_DECL boss_sartharionAI : public ScriptedAI void Reset() override { - m_bIsBerserk = false; - m_bIsSoftEnraged = false; + m_bIsBerserk = false; + m_bIsSoftEnraged = false; - m_uiEnrageTimer = MINUTE * 15 * IN_MILLISECONDS; - m_bIsHardEnraged = false; + m_uiEnrageTimer = 15 * MINUTE * IN_MILLISECONDS; + m_bIsHardEnraged = false; - m_uiTenebronTimer = 30000; - m_uiShadronTimer = 75000; - m_uiVesperonTimer = 120000; + m_uiTenebronTimer = 30000; + m_uiShadronTimer = 75000; + m_uiVesperonTimer = 120000; - m_uiFlameTsunamiTimer = 30000; - m_uiFlameBreathTimer = 20000; - m_uiTailSweepTimer = 20000; - m_uiCleaveTimer = 7000; - m_uiLavaStrikeTimer = 5000; + m_uiFlameTsunamiTimer = 30000; + m_uiFlameBreathTimer = 20000; + m_uiTailSweepTimer = 20000; + m_uiCleaveTimer = 7000; + m_uiLavaStrikeTimer = 5000; - m_bHasCalledTenebron = false; - m_bHasCalledShadron = false; - m_bHasCalledVesperon = false; - - if (m_creature->HasAura(SPELL_TWILIGHT_REVENGE)) - m_creature->RemoveAurasDueToSpell(SPELL_TWILIGHT_REVENGE); - } - - void JustReachedHome() override - { - if (m_pInstance) - m_pInstance->SetData(TYPE_SARTHARION_EVENT, FAIL); + m_bHasCalledTenebron = false; + m_bHasCalledShadron = false; + m_bHasCalledVesperon = false; } void Aggro(Unit* /*pWho*/) override @@ -253,6 +265,16 @@ struct MANGOS_DLL_DECL boss_sartharionAI : public ScriptedAI } } + void JustReachedHome() override + { + if (m_pInstance) + m_pInstance->SetData(TYPE_SARTHARION_EVENT, FAIL); + + // Despawn portal + if (GameObject* pPortal = GetClosestGameObjectWithEntry(m_creature, GO_TWILIGHT_PORTAL, 50.0f)) + pPortal->SetLootState(GO_JUST_DEACTIVATED); + } + void FetchDragons() { Creature* pTene = m_pInstance->GetSingleCreatureFromStorage(NPC_TENEBRON); @@ -350,6 +372,17 @@ struct MANGOS_DLL_DECL boss_sartharionAI : public ScriptedAI } } } + + uint8 uiTsunamiStartLoc = 0; + uint8 uiTsunamiEndLoc = 3; + if (urand(0, 1)) + { + uiTsunamiStartLoc = 3; + uiTsunamiEndLoc = 5; + } + + for (uint8 i = uiTsunamiStartLoc; i < uiTsunamiEndLoc; ++i) + m_creature->SummonCreature(NPC_FLAME_TSUNAMI, m_aTsunamiLoc[i].m_fX, m_aTsunamiLoc[i].m_fY, m_aTsunamiLoc[i].m_fZ, m_aTsunamiLoc[i].m_fO, TEMPSUMMON_TIMED_DESPAWN, 15000); } void UpdateAI(const uint32 uiDiff) override @@ -361,9 +394,11 @@ struct MANGOS_DLL_DECL boss_sartharionAI : public ScriptedAI // spell will target dragons, if they are still alive at 35% if (!m_bIsBerserk && m_creature->GetHealthPercent() < 35.0f) { - DoScriptText(SAY_SARTHARION_BERSERK, m_creature); - DoCastSpellIfCan(m_creature, SPELL_BERSERK); - m_bIsBerserk = true; + if (DoCastSpellIfCan(m_creature, SPELL_BERSERK) == CAST_OK) + { + DoScriptText(SAY_SARTHARION_BERSERK, m_creature); + m_bIsBerserk = true; + } } // soft enrage @@ -378,8 +413,8 @@ struct MANGOS_DLL_DECL boss_sartharionAI : public ScriptedAI { if (m_uiEnrageTimer < uiDiff) { - DoCastSpellIfCan(m_creature, SPELL_PYROBUFFET, CAST_TRIGGERED); - m_bIsHardEnraged = true; + if (DoCastSpellIfCan(m_creature, SPELL_PYROBUFFET, CAST_TRIGGERED) == CAST_OK) + m_bIsHardEnraged = true; } else m_uiEnrageTimer -= uiDiff; @@ -397,9 +432,11 @@ struct MANGOS_DLL_DECL boss_sartharionAI : public ScriptedAI // flame breath if (m_uiFlameBreathTimer < uiDiff) { - DoScriptText(SAY_SARTHARION_BREATH, m_creature); - DoCastSpellIfCan(m_creature->getVictim(), m_bIsRegularMode ? SPELL_FLAME_BREATH : SPELL_FLAME_BREATH_H); - m_uiFlameBreathTimer = urand(25000, 35000); + if (DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_FLAME_BREATH : SPELL_FLAME_BREATH_H) == CAST_OK) + { + DoScriptText(SAY_SARTHARION_BREATH, m_creature); + m_uiFlameBreathTimer = urand(25000, 35000); + } } else m_uiFlameBreathTimer -= uiDiff; @@ -407,8 +444,8 @@ struct MANGOS_DLL_DECL boss_sartharionAI : public ScriptedAI // Tail Sweep if (m_uiTailSweepTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), m_bIsRegularMode ? SPELL_TAIL_LASH : SPELL_TAIL_LASH_H); - m_uiTailSweepTimer = urand(15000, 20000); + if (DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_TAIL_LASH : SPELL_TAIL_LASH_H) == CAST_OK) + m_uiTailSweepTimer = urand(15000, 20000); } else m_uiTailSweepTimer -= uiDiff; @@ -416,8 +453,8 @@ struct MANGOS_DLL_DECL boss_sartharionAI : public ScriptedAI // Cleave if (m_uiCleaveTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_CLEAVE); - m_uiCleaveTimer = urand(7000, 10000); + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_CLEAVE) == CAST_OK) + m_uiCleaveTimer = urand(7000, 10000); } else m_uiCleaveTimer -= uiDiff; @@ -530,18 +567,31 @@ struct MANGOS_DLL_DECL dummy_dragonAI : public ScriptedAI uint32 m_uiWaypointId; uint32 m_uiMoveNextTimer; - int32 m_iPortalRespawnTime; bool m_bCanMoveFree; + uint32 m_iPortalRespawnTime; + uint32 m_uiShadowBreathTimer; + uint32 m_uiShadowFissureTimer; + void Reset() override + { + m_uiWaypointId = 0; + m_uiMoveNextTimer = 500; + m_bCanMoveFree = false; + + m_iPortalRespawnTime = 30000; + m_uiShadowBreathTimer = 20000; + m_uiShadowFissureTimer = 5000; + } + + void JustReachedHome() override { if (m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE)) m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - m_uiWaypointId = 0; - m_uiMoveNextTimer = 500; - m_iPortalRespawnTime = 30000; - m_bCanMoveFree = false; + // Despawn portal + if (GameObject* pPortal = GetClosestGameObjectWithEntry(m_creature, GO_TWILIGHT_PORTAL, 50.0f)) + pPortal->SetLootState(GO_JUST_DEACTIVATED); } void MovementInform(uint32 uiType, uint32 uiPointId) override @@ -600,7 +650,7 @@ struct MANGOS_DLL_DECL dummy_dragonAI : public ScriptedAI } //"opens" the portal and does the "opening" whisper - void OpenPortal() + void DoOpenPortal() { int32 iTextId = 0; @@ -655,45 +705,11 @@ struct MANGOS_DLL_DECL dummy_dragonAI : public ScriptedAI } } - void JustDied(Unit* /*pKiller*/) override - { - int32 iTextId = 0; - uint32 uiSpellId = 0; - - switch (m_creature->GetEntry()) - { - case NPC_TENEBRON: - iTextId = SAY_TENEBRON_DEATH; - uiSpellId = SPELL_POWER_OF_TENEBRON; - break; - case NPC_SHADRON: - iTextId = SAY_SHADRON_DEATH; - uiSpellId = SPELL_POWER_OF_SHADRON; - break; - case NPC_VESPERON: - iTextId = SAY_VESPERON_DEATH; - uiSpellId = SPELL_POWER_OF_VESPERON; - break; - } - - DoScriptText(iTextId, m_creature); + // Handle breath yell + virtual void DoHandleBreathYell() { } - RemoveDebuff(uiSpellId); - - if (m_pInstance) - { - // not if solo mini-boss fight - if (m_pInstance->GetData(TYPE_SARTHARION_EVENT) != IN_PROGRESS) - return; - - // Twilight Revenge to main boss - if (Creature* pSartharion = m_pInstance->GetSingleCreatureFromStorage(NPC_SARTHARION)) - { - if (pSartharion->isAlive()) - m_creature->CastSpell(pSartharion, SPELL_TWILIGHT_REVENGE, true); - } - } - } + // Handle special events for each dragon + virtual void UpdateDragonAI(const uint32 /*uiDiff*/) { } void UpdateAI(const uint32 uiDiff) override { @@ -710,6 +726,51 @@ struct MANGOS_DLL_DECL dummy_dragonAI : public ScriptedAI else m_uiMoveNextTimer -= uiDiff; } + + // if no target return + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + // Call dragon specific virtual function + UpdateDragonAI(uiDiff); + + // respawn portal + if (m_iPortalRespawnTime) + { + if (m_iPortalRespawnTime <= uiDiff) + { + DoOpenPortal(); + m_iPortalRespawnTime = 0; + } + else + m_iPortalRespawnTime -= uiDiff; + } + + // shadow fissure + if (m_uiShadowFissureTimer < uiDiff) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, m_bIsRegularMode ? SPELL_SHADOW_FISSURE : SPELL_SHADOW_FISSURE_H) == CAST_OK) + m_uiShadowFissureTimer = urand(15000, 20000); + } + } + else + m_uiShadowFissureTimer -= uiDiff; + + // shadow breath + if (m_uiShadowBreathTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_SHADOW_BREATH : SPELL_SHADOW_BREATH_H) == CAST_OK) + { + DoHandleBreathYell(); + m_uiShadowBreathTimer = urand(20000, 25000); + } + } + else + m_uiShadowBreathTimer -= uiDiff; + + DoMeleeAttackIfReady(); } }; @@ -721,15 +782,13 @@ struct MANGOS_DLL_DECL mob_tenebronAI : public dummy_dragonAI { mob_tenebronAI(Creature* pCreature) : dummy_dragonAI(pCreature) { Reset(); } - uint32 m_uiShadowBreathTimer; - uint32 m_uiShadowFissureTimer; uint32 m_uiHatchEggTimer; void Reset() override { - m_uiShadowBreathTimer = 20000; - m_uiShadowFissureTimer = 5000; m_uiHatchEggTimer = 30000; + + dummy_dragonAI::Reset(); } void Aggro(Unit* /*pWho*/) override @@ -743,37 +802,29 @@ struct MANGOS_DLL_DECL mob_tenebronAI : public dummy_dragonAI DoScriptText(urand(0, 1) ? SAY_TENEBRON_SLAY_1 : SAY_TENEBRON_SLAY_2, m_creature); } - void UpdateAI(const uint32 uiDiff) override + void JustDied(Unit* /*pKiller*/) override { - // if no target, update dummy and return - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - { - dummy_dragonAI::UpdateAI(uiDiff); - return; - } + DoScriptText(SAY_TENEBRON_DEATH, m_creature); - // shadow fissure - if (m_uiShadowFissureTimer < uiDiff) - { - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) - DoCastSpellIfCan(pTarget, m_bIsRegularMode ? SPELL_SHADOW_FISSURE : SPELL_SHADOW_FISSURE_H); + // Cast Twilight Revent - script target on Sartharion + if (m_pInstance && m_pInstance->GetData(TYPE_SARTHARION_EVENT) == IN_PROGRESS) + DoCastSpellIfCan(m_creature, SPELL_TWILIGHT_REVENGE, CAST_TRIGGERED); + } - m_uiShadowFissureTimer = urand(15000, 20000); - } - else - m_uiShadowFissureTimer -= uiDiff; + void DoHandleBreathYell() + { + DoScriptText(SAY_TENEBRON_BREATH, m_creature); + } - // shadow breath - if (m_uiShadowBreathTimer < uiDiff) + void UpdateDragonAI(const uint32 uiDiff) + { + if (m_uiHatchEggTimer < uiDiff) { - DoScriptText(SAY_TENEBRON_BREATH, m_creature); - DoCastSpellIfCan(m_creature->getVictim(), m_bIsRegularMode ? SPELL_SHADOW_BREATH : SPELL_SHADOW_BREATH_H); - m_uiShadowBreathTimer = urand(20000, 25000); + // ToDo: + m_uiHatchEggTimer = 30000; } else - m_uiShadowBreathTimer -= uiDiff; - - DoMeleeAttackIfReady(); + m_uiHatchEggTimer -= uiDiff; } }; @@ -790,14 +841,10 @@ struct MANGOS_DLL_DECL mob_shadronAI : public dummy_dragonAI { mob_shadronAI(Creature* pCreature) : dummy_dragonAI(pCreature) { Reset(); } - uint32 m_uiShadowBreathTimer; - uint32 m_uiShadowFissureTimer; uint32 m_uiAcolyteShadronTimer; void Reset() override { - m_uiShadowBreathTimer = 20000; - m_uiShadowFissureTimer = 5000; m_uiAcolyteShadronTimer = 60000; if (m_creature->HasAura(SPELL_TWILIGHT_TORMENT_VESP)) @@ -805,6 +852,8 @@ struct MANGOS_DLL_DECL mob_shadronAI : public dummy_dragonAI if (m_creature->HasAura(SPELL_GIFT_OF_TWILIGTH_SHA)) m_creature->RemoveAurasDueToSpell(SPELL_GIFT_OF_TWILIGTH_SHA); + + dummy_dragonAI::Reset(); } void Aggro(Unit* /*pWho*/) override @@ -818,37 +867,42 @@ struct MANGOS_DLL_DECL mob_shadronAI : public dummy_dragonAI DoScriptText(urand(0, 1) ? SAY_SHADRON_SLAY_1 : SAY_SHADRON_SLAY_2, m_creature); } - void UpdateAI(const uint32 uiDiff) override + void JustDied(Unit* /*pKiller*/) override { - // if no target, update dummy and return - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - { - dummy_dragonAI::UpdateAI(uiDiff); - return; - } + DoScriptText(SAY_SHADRON_DEATH, m_creature); - // shadow fissure - if (m_uiShadowFissureTimer < uiDiff) - { - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) - DoCastSpellIfCan(pTarget, m_bIsRegularMode ? SPELL_SHADOW_FISSURE : SPELL_SHADOW_FISSURE_H); + // Cast Twilight Revent - script target on Sartharion + if (m_pInstance && m_pInstance->GetData(TYPE_SARTHARION_EVENT) == IN_PROGRESS) + DoCastSpellIfCan(m_creature, SPELL_TWILIGHT_REVENGE, CAST_TRIGGERED); + } - m_uiShadowFissureTimer = urand(15000, 20000); - } - else - m_uiShadowFissureTimer -= uiDiff; + void JustSummoned(Creature* pSummoned) override + { + if (pSummoned->GetEntry() == NPC_DISCIPLE_OF_SHADRON) + pSummoned->CastSpell(pSummoned, SPELL_GIFT_OF_TWILIGTH_SHA, true); + else if (pSummoned->GetEntry() == NPC_ACOLYTE_OF_SHADRON) + pSummoned->CastSpell(pSummoned, SPELL_GIFT_OF_TWILIGTH_SAR, true); + } - // shadow breath - if (m_uiShadowBreathTimer < uiDiff) + void SummonedCreatureJustDied(Creature* pSummoned) override + { + pSummoned->CastSpell(pSummoned, SPELL_TWILIGHT_SHIFT_REMOVAL_ALL, true); + } + + void DoHandleBreathYell() + { + DoScriptText(SAY_SHADRON_BREATH, m_creature); + } + + void UpdateDragonAI(const uint32 uiDiff) override + { + if (m_uiAcolyteShadronTimer < uiDiff) { - DoScriptText(SAY_SHADRON_BREATH, m_creature); - DoCastSpellIfCan(m_creature->getVictim(), m_bIsRegularMode ? SPELL_SHADOW_BREATH : SPELL_SHADOW_BREATH_H); - m_uiShadowBreathTimer = urand(20000, 25000); + // ToDo: + m_uiAcolyteShadronTimer = 60000; } else - m_uiShadowBreathTimer -= uiDiff; - - DoMeleeAttackIfReady(); + m_uiAcolyteShadronTimer -= uiDiff; } }; @@ -865,15 +919,13 @@ struct MANGOS_DLL_DECL mob_vesperonAI : public dummy_dragonAI { mob_vesperonAI(Creature* pCreature) : dummy_dragonAI(pCreature) { Reset(); } - uint32 m_uiShadowBreathTimer; - uint32 m_uiShadowFissureTimer; uint32 m_uiAcolyteVesperonTimer; void Reset() override { - m_uiShadowBreathTimer = 20000; - m_uiShadowFissureTimer = 5000; m_uiAcolyteVesperonTimer = 60000; + + dummy_dragonAI::Reset(); } void Aggro(Unit* /*pWho*/) override @@ -887,153 +939,49 @@ struct MANGOS_DLL_DECL mob_vesperonAI : public dummy_dragonAI DoScriptText(urand(0, 1) ? SAY_VESPERON_SLAY_1 : SAY_VESPERON_SLAY_2, m_creature); } - void UpdateAI(const uint32 uiDiff) override + void JustDied(Unit* /*pKiller*/) override { - // if no target, update dummy and return - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - { - dummy_dragonAI::UpdateAI(uiDiff); - return; - } - - // shadow fissure - if (m_uiShadowFissureTimer < uiDiff) - { - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) - DoCastSpellIfCan(pTarget, m_bIsRegularMode ? SPELL_SHADOW_FISSURE : SPELL_SHADOW_FISSURE_H); + DoScriptText(SAY_VESPERON_DEATH, m_creature); - m_uiShadowFissureTimer = urand(15000, 20000); - } - else - m_uiShadowFissureTimer -= uiDiff; - - // shadow breath - if (m_uiShadowBreathTimer < uiDiff) - { - DoScriptText(SAY_VESPERON_BREATH, m_creature); - DoCastSpellIfCan(m_creature->getVictim(), m_bIsRegularMode ? SPELL_SHADOW_BREATH : SPELL_SHADOW_BREATH_H); - m_uiShadowBreathTimer = urand(20000, 25000); - } - else - m_uiShadowBreathTimer -= uiDiff; - - DoMeleeAttackIfReady(); + // Cast Twilight Revent - script target on Sartharion + if (m_pInstance && m_pInstance->GetData(TYPE_SARTHARION_EVENT) == IN_PROGRESS) + DoCastSpellIfCan(m_creature, SPELL_TWILIGHT_REVENGE, CAST_TRIGGERED); } -}; - -CreatureAI* GetAI_mob_vesperon(Creature* pCreature) -{ - return new mob_vesperonAI(pCreature); -} -/*###### -## Mob Acolyte of Shadron -######*/ - -struct MANGOS_DLL_DECL mob_acolyte_of_shadronAI : public ScriptedAI -{ - mob_acolyte_of_shadronAI(Creature* pCreature) : ScriptedAI(pCreature) + void JustSummoned(Creature* pSummoned) override { - m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - Reset(); + if (pSummoned->GetEntry() == NPC_DISCIPLE_OF_VESPERON) + pSummoned->CastSpell(pSummoned, SPELL_TWILIGHT_TORMENT_VESP, true); + else if (pSummoned->GetEntry() == NPC_ACOLYTE_OF_VESPERON) + pSummoned->CastSpell(pSummoned, SPELL_TWILIGHT_TORMENT_VESP_ACO, true); } - ScriptedInstance* m_pInstance; - - void Reset() override + void SummonedCreatureJustDied(Creature* pSummoned) override { - if (m_pInstance) - { - // if not solo figth, buff main boss, else place debuff on mini-boss. both spells TARGET_SCRIPT - if (m_pInstance->GetData(TYPE_SARTHARION_EVENT) == IN_PROGRESS) - DoCastSpellIfCan(m_creature, SPELL_GIFT_OF_TWILIGTH_SAR); - else - DoCastSpellIfCan(m_creature, SPELL_GIFT_OF_TWILIGTH_SHA); - } + // ToDo: remove Twilight Torment debuff + pSummoned->CastSpell(pSummoned, SPELL_TWILIGHT_SHIFT_REMOVAL_ALL, true); } - void JustDied(Unit* /*killer*/) override + void DoHandleBreathYell() { - if (m_pInstance) - { - Creature* pDebuffTarget = NULL; - - if (m_pInstance->GetData(TYPE_SARTHARION_EVENT) == IN_PROGRESS) - { - // not solo fight, so main boss has deduff - pDebuffTarget = m_pInstance->GetSingleCreatureFromStorage(NPC_SARTHARION); - - if (pDebuffTarget && pDebuffTarget->isAlive() && pDebuffTarget->HasAura(SPELL_GIFT_OF_TWILIGTH_SAR)) - pDebuffTarget->RemoveAurasDueToSpell(SPELL_GIFT_OF_TWILIGTH_SAR); - } - else - { - // event not in progress, then solo fight and must remove debuff mini-boss - pDebuffTarget = m_pInstance->GetSingleCreatureFromStorage(NPC_SHADRON); - - if (pDebuffTarget && pDebuffTarget->isAlive() && pDebuffTarget->HasAura(SPELL_GIFT_OF_TWILIGTH_SHA)) - pDebuffTarget->RemoveAurasDueToSpell(SPELL_GIFT_OF_TWILIGTH_SHA); - } - } + DoScriptText(SAY_VESPERON_BREATH, m_creature); } - void UpdateAI(const uint32 /*uiDiff*/) override - { - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - DoMeleeAttackIfReady(); - } -}; - -CreatureAI* GetAI_mob_acolyte_of_shadron(Creature* pCreature) -{ - return new mob_acolyte_of_shadronAI(pCreature); -} - -/*###### -## Mob Acolyte of Vesperon -######*/ - -struct MANGOS_DLL_DECL mob_acolyte_of_vesperonAI : public ScriptedAI -{ - mob_acolyte_of_vesperonAI(Creature* pCreature) : ScriptedAI(pCreature) - { - m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - Reset(); - } - - ScriptedInstance* m_pInstance; - - void Reset() override - { - DoCastSpellIfCan(m_creature, SPELL_TWILIGHT_TORMENT_VESP_ACO); - } - - void JustDied(Unit* /*pKiller*/) override + void UpdateAI(const uint32 uiDiff) override { - // remove twilight torment on Vesperon - if (m_pInstance) + if (m_uiAcolyteVesperonTimer < uiDiff) { - Creature* pVesperon = m_pInstance->GetSingleCreatureFromStorage(NPC_VESPERON); - - if (pVesperon && pVesperon->isAlive() && pVesperon->HasAura(SPELL_TWILIGHT_TORMENT_VESP)) - pVesperon->RemoveAurasDueToSpell(SPELL_TWILIGHT_TORMENT_VESP); + // ToDo: + m_uiAcolyteVesperonTimer = 60000; } - } - - void UpdateAI(const uint32 /*uiDiff*/) override - { - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - DoMeleeAttackIfReady(); + else + m_uiAcolyteVesperonTimer -= uiDiff; } }; -CreatureAI* GetAI_mob_acolyte_of_vesperon(Creature* pCreature) +CreatureAI* GetAI_mob_vesperon(Creature* pCreature) { - return new mob_acolyte_of_vesperonAI(pCreature); + return new mob_vesperonAI(pCreature); } /*###### @@ -1081,8 +1029,8 @@ struct MANGOS_DLL_DECL mob_twilight_whelpAI : public ScriptedAI // twilight torment if (m_uiFadeArmorTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_FADE_ARMOR); - m_uiFadeArmorTimer = urand(5000, 10000); + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_FADE_ARMOR) == CAST_OK) + m_uiFadeArmorTimer = urand(5000, 10000); } else m_uiFadeArmorTimer -= uiDiff; @@ -1096,6 +1044,59 @@ CreatureAI* GetAI_mob_twilight_whelp(Creature* pCreature) return new mob_twilight_whelpAI(pCreature); } +/*###### +## npc_flame_tsunami +######*/ + +struct MANGOS_DLL_DECL npc_flame_tsunamiAI : public ScriptedAI +{ + npc_flame_tsunamiAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } + + uint32 m_uiTsunamiTimer; + + void Reset() + { + m_uiTsunamiTimer = 2000; + + DoCastSpellIfCan(m_creature, SPELL_FLAME_TSUNAMI, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_FLAME_TSUNAMI_DMG_AURA, CAST_TRIGGERED); + } + + void AttackStart(Unit* /*pWho*/) override { } + void MoveInLineOfSight(Unit* /*pWho*/) override { } + + void MovementInform(uint32 uiType, uint32 uiPointId) override + { + if (uiType != POINT_MOTION_TYPE || !uiPointId) + return; + + m_creature->RemoveAllAurasOnEvade(); + } + + void UpdateAI(const uint32 uiDiff) + { + if (m_uiTsunamiTimer) + { + if (m_uiTsunamiTimer <= uiDiff) + { + // Note: currently the way in which spell 60241 works is unk, so for the moment we'll use simple movement + m_creature->SetWalk(false); + m_creature->GetMotionMaster()->MovePoint(1, m_creature->GetPositionX() < 3250.0f ? m_creature->GetPositionX() + 86.5f : m_creature->GetPositionX() - 86.5f, + m_creature->GetPositionY(), m_creature->GetPositionZ()); + + m_uiTsunamiTimer = 0; + } + else + m_uiTsunamiTimer -= uiDiff; + } + } +}; + +CreatureAI* GetAI_npc_flame_tsunami(Creature* pCreature) +{ + return new npc_flame_tsunamiAI(pCreature); +} + void AddSC_boss_sartharion() { Script* pNewScript; @@ -1120,16 +1121,6 @@ void AddSC_boss_sartharion() pNewScript->GetAI = &GetAI_mob_tenebron; pNewScript->RegisterSelf(); - pNewScript = new Script; - pNewScript->Name = "mob_acolyte_of_shadron"; - pNewScript->GetAI = &GetAI_mob_acolyte_of_shadron; - pNewScript->RegisterSelf(); - - pNewScript = new Script; - pNewScript->Name = "mob_acolyte_of_vesperon"; - pNewScript->GetAI = &GetAI_mob_acolyte_of_vesperon; - pNewScript->RegisterSelf(); - pNewScript = new Script; pNewScript->Name = "mob_twilight_eggs"; pNewScript->GetAI = &GetAI_mob_twilight_eggs; @@ -1139,4 +1130,9 @@ void AddSC_boss_sartharion() pNewScript->Name = "mob_twilight_whelp"; pNewScript->GetAI = &GetAI_mob_twilight_whelp; pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_flame_tsunami"; + pNewScript->GetAI = &GetAI_npc_flame_tsunami; + pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 2f79fed51..a65d22906 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2877" + #define SD2_REVISION_NR "2878" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 1c74df3ab..d5874a3cc 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -905,8 +905,7 @@ UPDATE creature_template SET ScriptName='mob_shadron' WHERE entry=30451; UPDATE creature_template SET ScriptName='mob_tenebron' WHERE entry=30452; UPDATE creature_template SET ScriptName='mob_twilight_eggs' WHERE entry=30882; UPDATE creature_template SET ScriptName='mob_twilight_whelp' WHERE entry IN (30890, 31214); -UPDATE creature_template SET ScriptName='mob_acolyte_of_shadron' WHERE entry=31218; -UPDATE creature_template SET ScriptName='mob_acolyte_of_vesperon' WHERE entry=31219; +UPDATE creature_template SET ScriptName='npc_flame_tsunami' WHERE entry=30616; /* ONYXIA'S LAIR */ UPDATE instance_template SET ScriptName='instance_onyxias_lair' WHERE map=249; diff --git a/sql/updates/r2878_mangos.sql b/sql/updates/r2878_mangos.sql new file mode 100644 index 000000000..d315c2023 --- /dev/null +++ b/sql/updates/r2878_mangos.sql @@ -0,0 +1,3 @@ +UPDATE creature_template SET ScriptName='' WHERE entry=31218; +UPDATE creature_template SET ScriptName='' WHERE entry=31219; +UPDATE creature_template SET ScriptName='npc_flame_tsunami' WHERE entry=30616; From 4f9ba9324c15ef738f19a8d965d4a3c984da0218 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Fri, 19 Apr 2013 11:54:09 +0300 Subject: [PATCH 0883/1172] [2879] Properly implement the Fire Cyclones for Sartharion event This will also enable achievements 2047 and 2048 --- .../obsidian_sanctum/boss_sartharion.cpp | 119 +++++++++++++----- .../instance_obsidian_sanctum.cpp | 30 ++++- .../obsidian_sanctum/obsidian_sanctum.h | 9 ++ sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 + sql/updates/r2879_mangos.sql | 1 + 6 files changed, 130 insertions(+), 32 deletions(-) create mode 100644 sql/updates/r2879_mangos.sql diff --git a/scripts/northrend/obsidian_sanctum/boss_sartharion.cpp b/scripts/northrend/obsidian_sanctum/boss_sartharion.cpp index 6ddc5612e..b59c3ada2 100644 --- a/scripts/northrend/obsidian_sanctum/boss_sartharion.cpp +++ b/scripts/northrend/obsidian_sanctum/boss_sartharion.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: Boss Sartharion -SD%Complete: 70% -SDComment: Flame wave, achievement and portal events need to be implemented +SD%Complete: 80% +SDComment: Portal events need to be implemented SDCategory: Obsidian Sanctum EndScriptData */ @@ -57,7 +57,6 @@ enum SPELL_TAIL_LASH = 56910, // A sweeping tail strike hits all enemies behind the caster, inflicting 3063 to 3937 damage and stunning them for 2 sec. SPELL_TAIL_LASH_H = 58957, // A sweeping tail strike hits all enemies behind the caster, inflicting 4375 to 5625 damage and stunning them for 2 sec. SPELL_WILL_OF_SARTHARION = 61254, // Sartharion's presence bolsters the resolve of the Twilight Drakes, increasing their total health by 25%. This effect also increases Sartharion's health by 25%. - SPELL_LAVA_STRIKE = 57571, // (Real spell casted should be 57578) 57571 then trigger visual missile, then summon Lava Blaze on impact(spell 57572) SPELL_TWILIGHT_REVENGE = 60639, SPELL_PYROBUFFET = 56916, // currently used for hard enrage after 15 minutes @@ -116,9 +115,15 @@ enum // flame tsunami SPELL_FLAME_TSUNAMI = 57494, // the visual dummy - SPELL_FLAME_TSUNAMI_LEAP = 60241, // SPELL_EFFECT_138 some leap effect, causing caster to move in direction + // SPELL_FLAME_TSUNAMI_LEAP = 60241, // SPELL_EFFECT_138 some leap effect, causing caster to move in direction SPELL_FLAME_TSUNAMI_DMG_AURA = 57492, // periodic damage, npc has this aura + // fire cyclone + // SPELL_LAVA_STRIKE = 57578, // triggers 57571 then trigger visual missile, then summon Lava Blaze on impact(spell 57572) + SPELL_LAVA_STRIKE_IMPACT = 57591, + // SPELL_CYCLONE_AURA = 57560, // in creature_template_addon + SPELL_CYCLONE_AURA_STRIKE = 57598, // triggers 57578 + NPC_FLAME_TSUNAMI = 30616, // for the flame waves NPC_LAVA_BLAZE = 30643, // adds spawning from flame strike @@ -185,12 +190,12 @@ struct MANGOS_DLL_DECL boss_sartharionAI : public ScriptedAI { boss_sartharionAI(Creature* pCreature) : ScriptedAI(pCreature) { - m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_pInstance = (instance_obsidian_sanctum*)pCreature->GetInstanceData(); m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); Reset(); } - ScriptedInstance* m_pInstance; + instance_obsidian_sanctum* m_pInstance; bool m_bIsRegularMode; bool m_bIsBerserk; @@ -229,7 +234,7 @@ struct MANGOS_DLL_DECL boss_sartharionAI : public ScriptedAI m_uiFlameBreathTimer = 20000; m_uiTailSweepTimer = 20000; m_uiCleaveTimer = 7000; - m_uiLavaStrikeTimer = 5000; + m_uiLavaStrikeTimer = urand(20000, 30000); m_bHasCalledTenebron = false; m_bHasCalledShadron = false; @@ -462,48 +467,59 @@ struct MANGOS_DLL_DECL boss_sartharionAI : public ScriptedAI // Lavas Strike if (m_uiLavaStrikeTimer < uiDiff) { - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + if (m_pInstance) { - DoCastSpellIfCan(pTarget, SPELL_LAVA_STRIKE); + if (Creature* pCyclone = m_creature->GetMap()->GetCreature(m_pInstance->SelectRandomFireCycloneGuid())) + pCyclone->CastSpell(pCyclone, SPELL_CYCLONE_AURA_STRIKE, true); - switch (urand(0, 15)) + switch (urand(0, 5)) { case 0: DoScriptText(SAY_SARTHARION_SPECIAL_1, m_creature); break; case 1: DoScriptText(SAY_SARTHARION_SPECIAL_2, m_creature); break; case 2: DoScriptText(SAY_SARTHARION_SPECIAL_3, m_creature); break; + case 3: DoScriptText(SAY_SARTHARION_SPECIAL_4, m_creature); break; } } - m_uiLavaStrikeTimer = urand(5000, 20000); + m_uiLavaStrikeTimer = 30000; } else m_uiLavaStrikeTimer -= uiDiff; // call tenebron - if (!m_bHasCalledTenebron && m_uiTenebronTimer < uiDiff) + if (!m_bHasCalledTenebron) { - CallDragon(NPC_TENEBRON); - m_bHasCalledTenebron = true; + if (m_uiTenebronTimer < uiDiff) + { + CallDragon(NPC_TENEBRON); + m_bHasCalledTenebron = true; + } + else + m_uiTenebronTimer -= uiDiff; } - else - m_uiTenebronTimer -= uiDiff; // call shadron - if (!m_bHasCalledShadron && m_uiShadronTimer < uiDiff) + if (!m_bHasCalledShadron) { - CallDragon(NPC_SHADRON); - m_bHasCalledShadron = true; + if (m_uiShadronTimer < uiDiff) + { + CallDragon(NPC_SHADRON); + m_bHasCalledShadron = true; + } + else + m_uiShadronTimer -= uiDiff; } - else - m_uiShadronTimer -= uiDiff; // call vesperon - if (!m_bHasCalledVesperon && m_uiVesperonTimer < uiDiff) + if (!m_bHasCalledVesperon) { - CallDragon(NPC_VESPERON); - m_bHasCalledVesperon = true; + if (m_uiVesperonTimer < uiDiff) + { + CallDragon(NPC_VESPERON); + m_bHasCalledVesperon = true; + } + else + m_uiVesperonTimer -= uiDiff; } - else - m_uiVesperonTimer -= uiDiff; DoMeleeAttackIfReady(); @@ -894,7 +910,7 @@ struct MANGOS_DLL_DECL mob_shadronAI : public dummy_dragonAI DoScriptText(SAY_SHADRON_BREATH, m_creature); } - void UpdateDragonAI(const uint32 uiDiff) override + void UpdateDragonAI(const uint32 uiDiff) { if (m_uiAcolyteShadronTimer < uiDiff) { @@ -967,7 +983,7 @@ struct MANGOS_DLL_DECL mob_vesperonAI : public dummy_dragonAI DoScriptText(SAY_VESPERON_BREATH, m_creature); } - void UpdateAI(const uint32 uiDiff) override + void UpdateDragonAI(const uint32 uiDiff) { if (m_uiAcolyteVesperonTimer < uiDiff) { @@ -1054,7 +1070,7 @@ struct MANGOS_DLL_DECL npc_flame_tsunamiAI : public ScriptedAI uint32 m_uiTsunamiTimer; - void Reset() + void Reset() override { m_uiTsunamiTimer = 2000; @@ -1073,7 +1089,7 @@ struct MANGOS_DLL_DECL npc_flame_tsunamiAI : public ScriptedAI m_creature->RemoveAllAurasOnEvade(); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 uiDiff) override { if (m_uiTsunamiTimer) { @@ -1097,6 +1113,44 @@ CreatureAI* GetAI_npc_flame_tsunami(Creature* pCreature) return new npc_flame_tsunamiAI(pCreature); } +/*###### +## npc_fire_cyclone +######*/ + +struct MANGOS_DLL_DECL npc_fire_cycloneAI : public ScriptedAI +{ + npc_fire_cycloneAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; + + void Reset() override { } + + void AttackStart(Unit* /*pWho*/) override { } + void MoveInLineOfSight(Unit* /*pWho*/) override { } + + void SpellHitTarget(Unit* pTarget, const SpellEntry* pSpell) override + { + // Mark the achiev failed for the hit target + if (pSpell->Id == SPELL_LAVA_STRIKE_IMPACT && pTarget->GetTypeId() == TYPEID_PLAYER && m_pInstance) + m_pInstance->SetData(TYPE_VOLCANO_BLOW_FAILED, pTarget->GetGUIDLow()); + } + + void JustSummoned(Creature* pSummoned) override + { + if (pSummoned->GetEntry() == NPC_LAVA_BLAZE) + pSummoned->SetInCombatWithZone(); + } +}; + +CreatureAI* GetAI_npc_fire_cyclone(Creature* pCreature) +{ + return new npc_fire_cycloneAI(pCreature); +} + void AddSC_boss_sartharion() { Script* pNewScript; @@ -1135,4 +1189,9 @@ void AddSC_boss_sartharion() pNewScript->Name = "npc_flame_tsunami"; pNewScript->GetAI = &GetAI_npc_flame_tsunami; pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_fire_cyclone"; + pNewScript->GetAI = &GetAI_npc_fire_cyclone; + pNewScript->RegisterSelf(); } diff --git a/scripts/northrend/obsidian_sanctum/instance_obsidian_sanctum.cpp b/scripts/northrend/obsidian_sanctum/instance_obsidian_sanctum.cpp index 3d681daf0..bb4c6c883 100644 --- a/scripts/northrend/obsidian_sanctum/instance_obsidian_sanctum.cpp +++ b/scripts/northrend/obsidian_sanctum/instance_obsidian_sanctum.cpp @@ -52,15 +52,28 @@ void instance_obsidian_sanctum::OnCreatureCreate(Creature* pCreature) case NPC_SARTHARION: m_mNpcEntryGuidStore[pCreature->GetEntry()] = pCreature->GetObjectGuid(); break; + case NPC_FIRE_CYCLONE: + m_lFireCycloneGuidList.push_back(pCreature->GetObjectGuid()); + break; } } void instance_obsidian_sanctum::SetData(uint32 uiType, uint32 uiData) { if (uiType == TYPE_SARTHARION_EVENT) + { m_auiEncounter[0] = uiData; + if (uiData == IN_PROGRESS) + m_sVolcanoBlowFailPlayers.clear(); + } else if (uiType == TYPE_ALIVE_DRAGONS) m_uiAliveDragons = uiData; + else if (uiType == TYPE_VOLCANO_BLOW_FAILED) + { + // Insert the players who fail the achiev and haven't been already inserted in the set + if (m_sVolcanoBlowFailPlayers.find(uiData) == m_sVolcanoBlowFailPlayers.end()) + m_sVolcanoBlowFailPlayers.insert(uiData); + } // No need to save anything here } @@ -73,7 +86,18 @@ uint32 instance_obsidian_sanctum::GetData(uint32 uiType) const return 0; } -bool instance_obsidian_sanctum::CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* /*pSource*/, Unit const* /*pTarget*/, uint32 /*uiMiscValue1 = 0*/) const +ObjectGuid instance_obsidian_sanctum::SelectRandomFireCycloneGuid() +{ + if (m_lFireCycloneGuidList.empty()) + return ObjectGuid(); + + GuidList::iterator iter = m_lFireCycloneGuidList.begin(); + advance(iter, urand(0, m_lFireCycloneGuidList.size() - 1)); + + return *iter; +} + +bool instance_obsidian_sanctum::CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* /*pTarget*/, uint32 /*uiMiscValue1 = 0*/) const { switch (uiCriteriaId) { @@ -86,6 +110,10 @@ bool instance_obsidian_sanctum::CheckAchievementCriteriaMeet(uint32 uiCriteriaId case ACHIEV_DRAGONS_ALIVE_3_N: case ACHIEV_DRAGONS_ALIVE_3_H: return m_uiAliveDragons >= 3; + case ACHIEV_CRIT_VOLCANO_BLOW_N: + case ACHIEV_CRIT_VOLCANO_BLOW_H: + // Return true if not found in the set + return m_sVolcanoBlowFailPlayers.find(pSource->GetGUIDLow()) == m_sVolcanoBlowFailPlayers.end(); default: return false; } diff --git a/scripts/northrend/obsidian_sanctum/obsidian_sanctum.h b/scripts/northrend/obsidian_sanctum/obsidian_sanctum.h index c2ac9e097..32b492713 100644 --- a/scripts/northrend/obsidian_sanctum/obsidian_sanctum.h +++ b/scripts/northrend/obsidian_sanctum/obsidian_sanctum.h @@ -12,12 +12,15 @@ enum TYPE_SARTHARION_EVENT = 1, // internal used types for achievement TYPE_ALIVE_DRAGONS = 2, + TYPE_VOLCANO_BLOW_FAILED = 3, NPC_SARTHARION = 28860, NPC_TENEBRON = 30452, NPC_SHADRON = 30451, NPC_VESPERON = 30449, + NPC_FIRE_CYCLONE = 30648, + GO_TWILIGHT_PORTAL = 193988, // Achievement related @@ -43,6 +46,8 @@ class MANGOS_DLL_DECL instance_obsidian_sanctum : public ScriptedInstance void SetData(uint32 uiType, uint32 uiData) override; uint32 GetData(uint32 uiType) const override; + ObjectGuid SelectRandomFireCycloneGuid(); + bool CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/) const override; bool CheckConditionCriteriaMeet(Player const* pPlayer, uint32 uiInstanceConditionId, WorldObject const* pConditionSource, uint32 conditionSourceType) const override; @@ -50,6 +55,10 @@ class MANGOS_DLL_DECL instance_obsidian_sanctum : public ScriptedInstance uint32 m_auiEncounter[MAX_ENCOUNTER]; uint8 m_uiAliveDragons; + + std::set m_sVolcanoBlowFailPlayers; + + GuidList m_lFireCycloneGuidList; }; #endif diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index a65d22906..79bceb15a 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2878" + #define SD2_REVISION_NR "2879" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index d5874a3cc..26ce62770 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -906,6 +906,7 @@ UPDATE creature_template SET ScriptName='mob_tenebron' WHERE entry=30452; UPDATE creature_template SET ScriptName='mob_twilight_eggs' WHERE entry=30882; UPDATE creature_template SET ScriptName='mob_twilight_whelp' WHERE entry IN (30890, 31214); UPDATE creature_template SET ScriptName='npc_flame_tsunami' WHERE entry=30616; +UPDATE creature_template SET ScriptName='npc_fire_cyclone' WHERE entry=30648; /* ONYXIA'S LAIR */ UPDATE instance_template SET ScriptName='instance_onyxias_lair' WHERE map=249; diff --git a/sql/updates/r2879_mangos.sql b/sql/updates/r2879_mangos.sql new file mode 100644 index 000000000..dcb9c2dcf --- /dev/null +++ b/sql/updates/r2879_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_fire_cyclone' WHERE entry=30648; From 3503313f36e745182e0ff72cb7a55a2025f107f3 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Fri, 19 Apr 2013 12:33:39 +0300 Subject: [PATCH 0884/1172] [2880] Allow Sapphiron to be spawned using GO 181356 This expects CMangos [12463] --- .../northrend/naxxramas/boss_sapphiron.cpp | 24 +++++++++++++ .../naxxramas/instance_naxxramas.cpp | 35 +++++++++++++++++-- scripts/northrend/naxxramas/naxxramas.h | 5 +++ sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 + sql/updates/r2880_mangos.sql | 1 + 6 files changed, 65 insertions(+), 3 deletions(-) create mode 100644 sql/updates/r2880_mangos.sql diff --git a/scripts/northrend/naxxramas/boss_sapphiron.cpp b/scripts/northrend/naxxramas/boss_sapphiron.cpp index 7ccee5375..463837ac3 100644 --- a/scripts/northrend/naxxramas/boss_sapphiron.cpp +++ b/scripts/northrend/naxxramas/boss_sapphiron.cpp @@ -322,6 +322,25 @@ CreatureAI* GetAI_boss_sapphiron(Creature* pCreature) return new boss_sapphironAI(pCreature); } +bool GOUse_go_sapphiron_birth(Player* pPlayer, GameObject* pGo) +{ + ScriptedInstance* pInstance = (ScriptedInstance*)pGo->GetInstanceData(); + + if (!pInstance) + return true; + + if (pInstance->GetData(TYPE_SAPPHIRON) != NOT_STARTED) + return true; + + // If already summoned return (safety check) + if (pInstance->GetSingleCreatureFromStorage(NPC_SAPPHIRON, true)) + return true; + + // Set data to special and allow the Go animation to proceed + pInstance->SetData(TYPE_SAPPHIRON, SPECIAL); + return false; +} + void AddSC_boss_sapphiron() { Script* pNewScript; @@ -330,4 +349,9 @@ void AddSC_boss_sapphiron() pNewScript->Name = "boss_sapphiron"; pNewScript->GetAI = &GetAI_boss_sapphiron; pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "go_sapphiron_birth"; + pNewScript->pGOUse = &GOUse_go_sapphiron_birth; + pNewScript->RegisterSelf(); } diff --git a/scripts/northrend/naxxramas/instance_naxxramas.cpp b/scripts/northrend/naxxramas/instance_naxxramas.cpp index 7a1c015b5..c3f61f327 100644 --- a/scripts/northrend/naxxramas/instance_naxxramas.cpp +++ b/scripts/northrend/naxxramas/instance_naxxramas.cpp @@ -48,6 +48,7 @@ instance_naxxramas::instance_naxxramas(Map* pMap) : ScriptedInstance(pMap), m_fChamberCenterX(0.0f), m_fChamberCenterY(0.0f), m_fChamberCenterZ(0.0f), + m_uiSapphSpawnTimer(0), m_uiTauntTimer(0), m_uiHorsemenAchievTimer(0), m_uiHorseMenKilled(0), @@ -66,6 +67,19 @@ void instance_naxxramas::Initialize() m_dialogueHelper.InitializeDialogueHelper(this, true); } +void instance_naxxramas::OnPlayerEnter(Player* pPlayer) +{ + // Function only used to summon Sapphiron in case of server reload + if (GetData(TYPE_SAPPHIRON) != SPECIAL) + return; + + // Check if already summoned + if (GetSingleCreatureFromStorage(NPC_SAPPHIRON, true)) + return; + + pPlayer->SummonCreature(NPC_SAPPHIRON, aSapphPositions[0], aSapphPositions[1], aSapphPositions[2], aSapphPositions[3], TEMPSUMMON_DEAD_DESPAWN, 0); +} + void instance_naxxramas::OnCreatureCreate(Creature* pCreature) { switch (pCreature->GetEntry()) @@ -80,6 +94,7 @@ void instance_naxxramas::OnCreatureCreate(Creature* pCreature) case NPC_BLAUMEUX: case NPC_RIVENDARE: case NPC_GOTHIK: + case NPC_SAPPHIRON: case NPC_KELTHUZAD: case NPC_THE_LICHKING: m_mNpcEntryGuidStore[pCreature->GetEntry()] = pCreature->GetObjectGuid(); @@ -447,6 +462,9 @@ void instance_naxxramas::SetData(uint32 uiType, uint32 uiData) DoUseDoorOrButton(GO_KELTHUZAD_WATERFALL_DOOR); m_dialogueHelper.StartNextDialogueText(NPC_KELTHUZAD); } + // Start Sapph summoning process + if (uiData == SPECIAL) + m_uiSapphSpawnTimer = 22000; break; case TYPE_KELTHUZAD: m_auiEncounter[uiType] = uiData; @@ -459,7 +477,7 @@ void instance_naxxramas::SetData(uint32 uiType, uint32 uiData) break; } - if (uiData == DONE) + if (uiData == DONE || (uiData == SPECIAL && uiType == TYPE_SAPPHIRON)) { OUT_SAVE_INST_DATA; @@ -587,6 +605,19 @@ void instance_naxxramas::Update(uint32 uiDiff) m_uiHorsemenAchievTimer -= uiDiff; } + if (m_uiSapphSpawnTimer) + { + if (m_uiSapphSpawnTimer <= uiDiff) + { + if (Player* pPlayer = GetPlayerInMap()) + pPlayer->SummonCreature(NPC_SAPPHIRON, aSapphPositions[0], aSapphPositions[1], aSapphPositions[2], aSapphPositions[3], TEMPSUMMON_DEAD_DESPAWN, 0); + + m_uiSapphSpawnTimer = 0; + } + else + m_uiSapphSpawnTimer -= uiDiff; + } + m_dialogueHelper.DialogueUpdate(uiDiff); } @@ -716,7 +747,7 @@ bool AreaTrigger_at_naxxramas(Player* pPlayer, AreaTriggerEntry const* pAt) { if (pAt->id == AREATRIGGER_KELTHUZAD) { - if (pPlayer->isGameMaster() || pPlayer->isDead()) + if (pPlayer->isGameMaster() || !pPlayer->isAlive()) return false; instance_naxxramas* pInstance = (instance_naxxramas*)pPlayer->GetInstanceData(); diff --git a/scripts/northrend/naxxramas/naxxramas.h b/scripts/northrend/naxxramas/naxxramas.h index 2d8ee8ac6..db19ea183 100644 --- a/scripts/northrend/naxxramas/naxxramas.h +++ b/scripts/northrend/naxxramas/naxxramas.h @@ -85,6 +85,7 @@ enum NPC_BLAUMEUX = 16065, NPC_RIVENDARE = 30549, + NPC_SAPPHIRON = 15989, NPC_KELTHUZAD = 15990, NPC_THE_LICHKING = 16980, NPC_MR_BIGGLESWORTH = 16998, @@ -204,6 +205,8 @@ struct GothTrigger bool bIsAnchorHigh; }; +static const float aSapphPositions[4] = {3521.48f, -5234.87f, 137.626f, 4.53329f}; + class MANGOS_DLL_DECL instance_naxxramas : public ScriptedInstance { public: @@ -214,6 +217,7 @@ class MANGOS_DLL_DECL instance_naxxramas : public ScriptedInstance bool IsEncounterInProgress() const override; + void OnPlayerEnter(Player* pPlayer) override; void OnCreatureCreate(Creature* pCreature) override; void OnObjectCreate(GameObject* pGo) override; @@ -263,6 +267,7 @@ class MANGOS_DLL_DECL instance_naxxramas : public ScriptedInstance float m_fChamberCenterY; float m_fChamberCenterZ; + uint32 m_uiSapphSpawnTimer; uint32 m_uiTauntTimer; uint32 m_uiHorsemenAchievTimer; uint8 m_uiHorseMenKilled; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 79bceb15a..322a3c46c 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2879" + #define SD2_REVISION_NR "2880" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 26ce62770..999d18b3f 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -843,6 +843,7 @@ UPDATE creature_template SET ScriptName='boss_stalagg' WHERE entry=15929; UPDATE creature_template SET ScriptName='boss_feugen' WHERE entry=15930; UPDATE creature_template SET ScriptName='npc_tesla_coil' WHERE entry=16218; UPDATE creature_template SET ScriptName='boss_sapphiron' WHERE entry=15989; +UPDATE gameobject_template SET ScriptName='go_sapphiron_birth' WHERE entry=181356; UPDATE creature_template SET ScriptName='boss_kelthuzad' WHERE entry=15990; /* NETHERSTORM */ diff --git a/sql/updates/r2880_mangos.sql b/sql/updates/r2880_mangos.sql new file mode 100644 index 000000000..85324d697 --- /dev/null +++ b/sql/updates/r2880_mangos.sql @@ -0,0 +1 @@ +UPDATE gameobject_template SET ScriptName='go_sapphiron_birth' WHERE entry=181356; From d3d57a333f6ada53177ef463468b0c0a97785b73 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Thu, 25 Apr 2013 00:10:13 +0300 Subject: [PATCH 0885/1172] [2881] Add support for Tribute Run loot modes in Dire Maul --- scripts/kalimdor/dire_maul/dire_maul.h | 8 ++- .../kalimdor/dire_maul/instance_dire_maul.cpp | 49 ++++++++++++++++++- sd2_revision_nr.h | 2 +- 3 files changed, 55 insertions(+), 4 deletions(-) diff --git a/scripts/kalimdor/dire_maul/dire_maul.h b/scripts/kalimdor/dire_maul/dire_maul.h index ef9f6a702..476069636 100644 --- a/scripts/kalimdor/dire_maul/dire_maul.h +++ b/scripts/kalimdor/dire_maul/dire_maul.h @@ -7,7 +7,7 @@ enum { - MAX_ENCOUNTER = 12, + MAX_ENCOUNTER = 16, MAX_GENERATORS = 5, // East @@ -27,6 +27,10 @@ enum // North TYPE_KING_GORDOK = 11, + TYPE_MOLDAR = 12, + TYPE_FENGUS = 13, + TYPE_SLIPKIK = 14, + TYPE_KROMCRUSH = 15, // East GO_CRUMBLE_WALL = 177220, @@ -102,6 +106,8 @@ class MANGOS_DLL_DECL instance_dire_maul : public ScriptedInstance const char* Save() const override { return m_strInstData.c_str(); } void Load(const char* chrIn) override; + bool CheckConditionCriteriaMeet(Player const* pPlayer, uint32 uiInstanceConditionId, WorldObject const* pConditionSource, uint32 conditionSourceType) const override; + protected: bool CheckAllGeneratorsDestroyed(); void ProcessForceFieldOpening(); diff --git a/scripts/kalimdor/dire_maul/instance_dire_maul.cpp b/scripts/kalimdor/dire_maul/instance_dire_maul.cpp index a6661530d..10ef7b06a 100644 --- a/scripts/kalimdor/dire_maul/instance_dire_maul.cpp +++ b/scripts/kalimdor/dire_maul/instance_dire_maul.cpp @@ -252,6 +252,12 @@ void instance_dire_maul::SetData(uint32 uiType, uint32 uiData) } } break; + case TYPE_MOLDAR: + case TYPE_FENGUS: + case TYPE_SLIPKIK: + case TYPE_KROMCRUSH: + m_auiEncounter[uiType] = uiData; + break; } if (uiData == DONE) @@ -262,7 +268,9 @@ void instance_dire_maul::SetData(uint32 uiType, uint32 uiData) saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2] << " " << m_auiEncounter[3] << " " << m_auiEncounter[4] << " " << m_auiEncounter[5] << " " << m_auiEncounter[6] << " " << m_auiEncounter[7] << " " << m_auiEncounter[8] << " " - << m_auiEncounter[9] << " " << m_auiEncounter[10] << " " << m_auiEncounter[11]; + << m_auiEncounter[9] << " " << m_auiEncounter[10] << " " << m_auiEncounter[11] << " " + << m_auiEncounter[12] << " " << m_auiEncounter[13] << " " << m_auiEncounter[14] << " " + << m_auiEncounter[15]; m_strInstData = saveStream.str(); @@ -328,6 +336,19 @@ void instance_dire_maul::OnCreatureDeath(Creature* pCreature) case NPC_KING_GORDOK: SetData(TYPE_KING_GORDOK, DONE); break; + // Handle Ogre guards for Tribute Run chest + case NPC_GUARD_MOLDAR: + SetData(TYPE_MOLDAR, DONE); + break; + case NPC_GUARD_FENGUS: + SetData(TYPE_FENGUS, DONE); + break; + case NPC_GUARD_SLIPKIK: + SetData(TYPE_SLIPKIK, DONE); + break; + case NPC_CAPTAIN_KROMCRUSH: + SetData(TYPE_KROMCRUSH, DONE); + break; } } @@ -345,7 +366,9 @@ void instance_dire_maul::Load(const char* chrIn) loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3] >> m_auiEncounter[4] >> m_auiEncounter[5] >> m_auiEncounter[6] >> m_auiEncounter[7] >> m_auiEncounter[8] >> - m_auiEncounter[9] >> m_auiEncounter[10] >> m_auiEncounter[11]; + m_auiEncounter[9] >> m_auiEncounter[10] >> m_auiEncounter[11] >> + m_auiEncounter[12] >> m_auiEncounter[13] >> m_auiEncounter[14] >> + m_auiEncounter[15]; if (m_auiEncounter[TYPE_ALZZIN] >= DONE) m_bWallDestroyed = true; @@ -359,6 +382,28 @@ void instance_dire_maul::Load(const char* chrIn) OUT_LOAD_INST_DATA_COMPLETE; } +bool instance_dire_maul::CheckConditionCriteriaMeet(Player const* pPlayer, uint32 uiInstanceConditionId, WorldObject const* pConditionSource, uint32 conditionSourceType) const +{ + switch (uiInstanceConditionId) + { + case INSTANCE_CONDITION_ID_NORMAL_MODE: // No guards alive + case INSTANCE_CONDITION_ID_HARD_MODE: // One guard alive + case INSTANCE_CONDITION_ID_HARD_MODE_2: // Two guards alive + case INSTANCE_CONDITION_ID_HARD_MODE_3: // Three guards alive + case INSTANCE_CONDITION_ID_HARD_MODE_4: // All guards alive + { + uint8 uiTributeRunAliveBosses = (GetData(TYPE_MOLDAR) != DONE ? 1 : 0) + (GetData(TYPE_FENGUS) != DONE ? 1 : 0) + (GetData(TYPE_SLIPKIK) != DONE ? 1 : 0) + + (GetData(TYPE_KROMCRUSH) != DONE ? 1 : 0); + + return uiInstanceConditionId == uiTributeRunAliveBosses; + } + } + + script_error_log("instance_dire_maul::CheckConditionCriteriaMeet called with unsupported Id %u. Called with param plr %s, src %s, condition source type %u", + uiInstanceConditionId, pPlayer ? pPlayer->GetGuidStr().c_str() : "NULL", pConditionSource ? pConditionSource->GetGuidStr().c_str() : "NULL", conditionSourceType); + return false; +} + bool instance_dire_maul::CheckAllGeneratorsDestroyed() { if (m_auiEncounter[TYPE_PYLON_1] != DONE || m_auiEncounter[TYPE_PYLON_2] != DONE || m_auiEncounter[TYPE_PYLON_3] != DONE || m_auiEncounter[TYPE_PYLON_4] != DONE || m_auiEncounter[TYPE_PYLON_5] != DONE) diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 322a3c46c..3b00c348f 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2880" + #define SD2_REVISION_NR "2881" #endif // __SD2_REVISION_NR_H__ From a6039e7954e8c07aec661eaad7005959438b00ff Mon Sep 17 00:00:00 2001 From: Xfurry Date: Thu, 25 Apr 2013 10:10:30 +0300 Subject: [PATCH 0886/1172] [2882] Add support for Executioner loot modes in Shattered Halls Also make quests 9524 and 9525 completable --- .../instance_shattered_halls.cpp | 35 +++++++++++++++++-- .../shattered_halls/shattered_halls.h | 4 ++- sd2_revision_nr.h | 2 +- 3 files changed, 36 insertions(+), 5 deletions(-) diff --git a/scripts/outland/hellfire_citadel/shattered_halls/instance_shattered_halls.cpp b/scripts/outland/hellfire_citadel/shattered_halls/instance_shattered_halls.cpp index 5dec90453..03fa12160 100644 --- a/scripts/outland/hellfire_citadel/shattered_halls/instance_shattered_halls.cpp +++ b/scripts/outland/hellfire_citadel/shattered_halls/instance_shattered_halls.cpp @@ -124,6 +124,7 @@ void instance_shattered_halls::SetData(uint32 uiType, uint32 uiData) pPlayer->SummonCreature(m_uiTeam == ALLIANCE ? aSoldiersLocs[i].m_uiAllianceEntry : aSoldiersLocs[i].m_uiHordeEntry, aSoldiersLocs[i].m_fX, aSoldiersLocs[i].m_fY, aSoldiersLocs[i].m_fZ, aSoldiersLocs[i].m_fO, TEMPSUMMON_DEAD_DESPAWN, 0); // Summon the executioner for 80 min; ToDo: set the flags in DB + // Note: according to wowhead he shouldn't be targetable until Kargath encounter is finished. ToDo: research if he should still be available for players even if there are no prisoners left alive if (Creature* pExecutioner = pPlayer->SummonCreature(NPC_EXECUTIONER, afExecutionerLoc[0], afExecutionerLoc[1], afExecutionerLoc[2], afExecutionerLoc[3], TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 80 * MINUTE * IN_MILLISECONDS, true)) pExecutioner->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_NON_ATTACKABLE); @@ -133,9 +134,21 @@ void instance_shattered_halls::SetData(uint32 uiType, uint32 uiData) } if (uiData == DONE) { - // Allow playes to complete the quest only after the executioner is dead + // If the officer is already killed, then skip the quest completion + if (m_uiExecutionStage) + break; + + // Complete quest 9524 or 9525 if (Creature* pOfficer = GetSingleCreatureFromStorage(m_uiTeam == ALLIANCE ? NPC_OFFICER_ALLIANCE : NPC_OFFICER_HORDE)) - pOfficer->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP | UNIT_NPC_FLAG_QUESTGIVER); + { + Map::PlayerList const& lPlayers = instance->GetPlayers(); + + for (Map::PlayerList::const_iterator itr = lPlayers.begin(); itr != lPlayers.end(); ++itr) + { + if (Player* pPlayer = itr->getSource()) + pPlayer->KilledMonsterCredit(pOfficer->GetEntry(), pOfficer->GetObjectGuid()); + } + } } break; } @@ -205,6 +218,22 @@ void instance_shattered_halls::OnCreatureEvade(Creature* pCreature) SetData(TYPE_EXECUTION, IN_PROGRESS); } +bool instance_shattered_halls::CheckConditionCriteriaMeet(Player const* pPlayer, uint32 uiInstanceConditionId, WorldObject const* pConditionSource, uint32 conditionSourceType) const +{ + switch (uiInstanceConditionId) + { + case INSTANCE_CONDITION_ID_NORMAL_MODE: // No soldier alive + case INSTANCE_CONDITION_ID_HARD_MODE: // One soldier alive + case INSTANCE_CONDITION_ID_HARD_MODE_2: // Two soldier alive + case INSTANCE_CONDITION_ID_HARD_MODE_3: // Three soldier alive + return uiInstanceConditionId == INSTANCE_CONDITION_ID_HARD_MODE_3 - m_uiExecutionStage; + } + + script_error_log("instance_shattered_halls::CheckConditionCriteriaMeet called with unsupported Id %u. Called with param plr %s, src %s, condition source type %u", + uiInstanceConditionId, pPlayer ? pPlayer->GetGuidStr().c_str() : "NULL", pConditionSource ? pConditionSource->GetGuidStr().c_str() : "NULL", conditionSourceType); + return false; +} + void instance_shattered_halls::Update(uint32 uiDiff) { if (m_auiEncounter[TYPE_EXECUTION] != IN_PROGRESS) @@ -267,7 +296,7 @@ InstanceData* GetInstanceData_instance_shattered_halls(Map* pMap) bool AreaTrigger_at_shattered_halls(Player* pPlayer, AreaTriggerEntry const* /*pAt*/) { - if (pPlayer->isGameMaster() || pPlayer->isDead()) + if (pPlayer->isGameMaster() || !pPlayer->isAlive()) return false; instance_shattered_halls* pInstance = (instance_shattered_halls*)pPlayer->GetInstanceData(); diff --git a/scripts/outland/hellfire_citadel/shattered_halls/shattered_halls.h b/scripts/outland/hellfire_citadel/shattered_halls/shattered_halls.h index 96c660b0b..4f74d454e 100644 --- a/scripts/outland/hellfire_citadel/shattered_halls/shattered_halls.h +++ b/scripts/outland/hellfire_citadel/shattered_halls/shattered_halls.h @@ -81,11 +81,13 @@ class MANGOS_DLL_DECL instance_shattered_halls : public ScriptedInstance const char* Save() const override { return m_strInstData.c_str(); } void Load(const char* chrIn) override; + bool CheckConditionCriteriaMeet(Player const* pPlayer, uint32 uiInstanceConditionId, WorldObject const* pConditionSource, uint32 conditionSourceType) const override; + void Update(uint32 uiDiff) override; + private: void DoCastGroupDebuff(uint32 uiSpellId); - private: uint32 m_auiEncounter[MAX_ENCOUNTER]; std::string m_strInstData; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 3b00c348f..4779b3b78 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2881" + #define SD2_REVISION_NR "2882" #endif // __SD2_REVISION_NR_H__ From e5976d2fc0385ea3213173eef87c0ed710ca4f38 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sun, 28 Apr 2013 15:25:36 +0300 Subject: [PATCH 0887/1172] [2883] Improve previous commit Thanks to everyone for the feedback provided --- .../shattered_halls/instance_shattered_halls.cpp | 5 ++--- sd2_revision_nr.h | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/scripts/outland/hellfire_citadel/shattered_halls/instance_shattered_halls.cpp b/scripts/outland/hellfire_citadel/shattered_halls/instance_shattered_halls.cpp index 03fa12160..c42eb792f 100644 --- a/scripts/outland/hellfire_citadel/shattered_halls/instance_shattered_halls.cpp +++ b/scripts/outland/hellfire_citadel/shattered_halls/instance_shattered_halls.cpp @@ -123,9 +123,8 @@ void instance_shattered_halls::SetData(uint32 uiType, uint32 uiData) for (uint8 i = 2; i < 5; ++i) pPlayer->SummonCreature(m_uiTeam == ALLIANCE ? aSoldiersLocs[i].m_uiAllianceEntry : aSoldiersLocs[i].m_uiHordeEntry, aSoldiersLocs[i].m_fX, aSoldiersLocs[i].m_fY, aSoldiersLocs[i].m_fZ, aSoldiersLocs[i].m_fO, TEMPSUMMON_DEAD_DESPAWN, 0); - // Summon the executioner for 80 min; ToDo: set the flags in DB - // Note: according to wowhead he shouldn't be targetable until Kargath encounter is finished. ToDo: research if he should still be available for players even if there are no prisoners left alive - if (Creature* pExecutioner = pPlayer->SummonCreature(NPC_EXECUTIONER, afExecutionerLoc[0], afExecutionerLoc[1], afExecutionerLoc[2], afExecutionerLoc[3], TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 80 * MINUTE * IN_MILLISECONDS, true)) + // Summon the executioner; Note: according to wowhead he shouldn't be targetable until Kargath encounter is finished + if (Creature* pExecutioner = pPlayer->SummonCreature(NPC_EXECUTIONER, afExecutionerLoc[0], afExecutionerLoc[1], afExecutionerLoc[2], afExecutionerLoc[3], TEMPSUMMON_DEAD_DESPAWN, 0, true)) pExecutioner->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_NON_ATTACKABLE); // cast the execution spell diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 4779b3b78..a732e2dc7 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2882" + #define SD2_REVISION_NR "2883" #endif // __SD2_REVISION_NR_H__ From 90240038aad6220ac98cb10ce4b6c34b2d64bbd9 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sun, 28 Apr 2013 15:30:15 +0300 Subject: [PATCH 0888/1172] [2884] Fix crash for Brutallus Thanks Azelen for the feedback Close #60 --- scripts/eastern_kingdoms/sunwell_plateau/boss_brutallus.cpp | 2 +- sd2_revision_nr.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/eastern_kingdoms/sunwell_plateau/boss_brutallus.cpp b/scripts/eastern_kingdoms/sunwell_plateau/boss_brutallus.cpp index 1a6432c8e..0aef8bdfe 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/boss_brutallus.cpp +++ b/scripts/eastern_kingdoms/sunwell_plateau/boss_brutallus.cpp @@ -378,7 +378,7 @@ struct MANGOS_DLL_DECL boss_brutallusAI : public ScriptedAI, private DialogueHel void UpdateAI(const uint32 uiDiff) override { // Update only the intro related stuff - if (m_pInstance->GetData(TYPE_BRUTALLUS) == SPECIAL) + if (m_pInstance && m_pInstance->GetData(TYPE_BRUTALLUS) == SPECIAL) { UpdateIntroEvent(uiDiff); return; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index a732e2dc7..4d1681694 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2883" + #define SD2_REVISION_NR "2884" #endif // __SD2_REVISION_NR_H__ From 5323bd846845937c9053030d9e084f6577ff5b0e Mon Sep 17 00:00:00 2001 From: Xfurry Date: Mon, 29 Apr 2013 01:28:11 +0300 Subject: [PATCH 0889/1172] [2885] Proper implement script for Zum'rah - Zul'Farrak --- scripts/kalimdor/zulfarrak/boss_zumrah.cpp | 216 +++++++++++++++++- .../kalimdor/zulfarrak/instance_zulfarrak.cpp | 11 + scripts/kalimdor/zulfarrak/zulfarrak.h | 8 + sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 + sql/scriptdev2_script_full.sql | 5 + sql/updates/r2885_mangos.sql | 1 + sql/updates/r2885_scriptdev2.sql | 6 + 8 files changed, 247 insertions(+), 3 deletions(-) create mode 100644 sql/updates/r2885_mangos.sql create mode 100644 sql/updates/r2885_scriptdev2.sql diff --git a/scripts/kalimdor/zulfarrak/boss_zumrah.cpp b/scripts/kalimdor/zulfarrak/boss_zumrah.cpp index fc4867d69..2df289619 100644 --- a/scripts/kalimdor/zulfarrak/boss_zumrah.cpp +++ b/scripts/kalimdor/zulfarrak/boss_zumrah.cpp @@ -16,13 +16,225 @@ /* ScriptData SDName: boss_zumrah -SD%Complete: 0 -SDComment: Placeholder - Needs SD2 support for summoning zombies from graves +SD%Complete: 100 +SDComment: SDCategory: Zul'Farrak EndScriptData */ #include "precompiled.h" +#include "zulfarrak.h" + +enum +{ + SAY_INTRO = -1209000, + SAY_AGGRO = -1209001, + SAY_KILL = -1209002, + SAY_SUMMON = -1209003, + + SPELL_SHADOW_BOLT = 12739, + SPELL_SHADOW_BOLT_VOLLEY = 15245, + SPELL_WARD_OF_ZUMRAH = 11086, + SPELL_HEALING_WAVE = 12491, + SPELL_SUMMON_ZOMBIES = 10247, // spell should be triggered by missing trap 128972 + + // NPC_WARD_OF_ZUMRAH = 7785, + // NPC_SKELETON_OF_ZUMRAH = 7786, + NPC_ZULFARRAK_ZOMBIE = 7286, // spawned by the graves + NPC_ZULFARRAK_DEAD_HERO = 7276, // spawned by the graves + + FACTION_HOSTILE = 14, +}; + +struct MANGOS_DLL_DECL boss_zumrahAI : public ScriptedAI +{ + boss_zumrahAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (instance_zulfarrak*) pCreature->GetInstanceData(); + m_bHasTurnedHostile = false; + Reset(); + } + + instance_zulfarrak* m_pInstance; + + uint32 m_uiShadowBoltTimer; + uint32 m_uiShadowBoltVolleyTimer; + uint32 m_uiWardOfZumrahTimer; + uint32 m_uHealingWaveTimer; + uint32 m_uiSpawnZombieTimer; + + bool m_bHasTurnedHostile; + + GuidList m_lUsableGravesList; + + void Reset() override + { + m_uiShadowBoltTimer = 1000; + m_uiShadowBoltVolleyTimer = urand(6000, 30000); + m_uiWardOfZumrahTimer = urand(7000, 20000); + m_uHealingWaveTimer = urand(10000, 15000); + m_uiSpawnZombieTimer = 1000; + } + + void Aggro(Unit* /*pWho*/) override + { + DoScriptText(SAY_AGGRO, m_creature); + + if (m_pInstance) + { + // Get the list of usable graves (not used already by players) + m_lUsableGravesList.clear(); + GuidList lTempList; + std::list lGravesInRange; + + m_pInstance->GetShallowGravesGuidList(lTempList); + for (GuidList::const_iterator itr = lTempList.begin(); itr != lTempList.end(); ++itr) + { + if (GameObject* pGo = m_creature->GetMap()->GetGameObject(*itr)) + { + if (pGo->isSpawned()) + lGravesInRange.push_back(pGo); + } + } + + // Sort the graves and store them for future use + lGravesInRange.sort(ObjectDistanceOrder(m_creature)); + for (std::list::const_iterator itr = lGravesInRange.begin(); itr != lGravesInRange.end(); ++itr) + m_lUsableGravesList.push_back((*itr)->GetObjectGuid()); + } + } + + void KilledUnit(Unit* /*pVictim*/) override + { + DoScriptText(SAY_KILL, m_creature); + } + + void AttackStart(Unit* pWho) override + { + if (m_creature->Attack(pWho, true)) + { + m_creature->AddThreat(pWho); + m_creature->SetInCombatWith(pWho); + pWho->SetInCombatWith(m_creature); + DoStartMovement(pWho, 10.0f); + } + } + + void MoveInLineOfSight(Unit* pWho) override + { + if (!m_bHasTurnedHostile && pWho->GetTypeId() == TYPEID_PLAYER && m_creature->IsWithinDistInMap(pWho, 9.0f) && m_creature->IsWithinLOSInMap(pWho)) + { + m_creature->SetFactionTemporary(FACTION_HOSTILE, TEMPFACTION_NONE); + DoScriptText(SAY_INTRO, m_creature); + m_bHasTurnedHostile = true; + AttackStart(pWho); + } + + ScriptedAI::MoveInLineOfSight(pWho); + } + + void JustSummoned(Creature* pSummoned) override + { + if (pSummoned->GetEntry() == NPC_ZULFARRAK_ZOMBIE || pSummoned->GetEntry() == NPC_ZULFARRAK_DEAD_HERO) + pSummoned->AI()->AttackStart(m_creature->getVictim()); + } + + ObjectGuid SelectRandomShallowGrave() + { + if (m_lUsableGravesList.empty()) + return ObjectGuid(); + + GuidList::iterator iter = m_lUsableGravesList.begin(); + + // Remove the used grave + ObjectGuid uiGraveGuid = *iter; + m_lUsableGravesList.erase(iter); + + return uiGraveGuid; + } + + void UpdateAI(const uint32 uiDiff) override + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_uiSpawnZombieTimer) + { + if (m_uiSpawnZombieTimer <= uiDiff) + { + // Use a nearby grave to spawn zombies + if (GameObject* pGrave = m_creature->GetMap()->GetGameObject(SelectRandomShallowGrave())) + { + if (pGrave->isSpawned()) + { + m_creature->CastSpell(pGrave->GetPositionX(), pGrave->GetPositionY(), pGrave->GetPositionZ(), SPELL_SUMMON_ZOMBIES, true, NULL, NULL, pGrave->GetObjectGuid()); + pGrave->SetLootState(GO_JUST_DEACTIVATED); + + if (roll_chance_i(30)) + DoScriptText(SAY_SUMMON, m_creature); + + m_uiSpawnZombieTimer = 20000; + } + } + else + m_uiSpawnZombieTimer = 0; + } + else + m_uiSpawnZombieTimer -= uiDiff; + } + + if (m_uiShadowBoltTimer < uiDiff) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, SPELL_SHADOW_BOLT) == CAST_OK) + m_uiShadowBoltTimer = urand(3500, 5000); + } + } + else + m_uiShadowBoltTimer -= uiDiff; + + if (m_uiShadowBoltVolleyTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_SHADOW_BOLT_VOLLEY) == CAST_OK) + m_uiShadowBoltVolleyTimer = urand(10000, 18000); + } + else + m_uiShadowBoltVolleyTimer -= uiDiff; + + if (m_uiWardOfZumrahTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_WARD_OF_ZUMRAH) == CAST_OK) + m_uiWardOfZumrahTimer = urand(15000, 32000); + } + else + m_uiWardOfZumrahTimer -= uiDiff; + + if (m_uHealingWaveTimer < uiDiff) + { + if (Unit* pTarget = DoSelectLowestHpFriendly(40.0f)) + { + if (DoCastSpellIfCan(pTarget, SPELL_HEALING_WAVE) == CAST_OK) + m_uHealingWaveTimer = urand(15000, 23000); + } + } + else + m_uHealingWaveTimer -= uiDiff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_zumrah(Creature* pCreature) +{ + return new boss_zumrahAI(pCreature); +} void AddSC_boss_zumrah() { + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_zumrah"; + pNewScript->GetAI = &GetAI_boss_zumrah; + pNewScript->RegisterSelf(); } diff --git a/scripts/kalimdor/zulfarrak/instance_zulfarrak.cpp b/scripts/kalimdor/zulfarrak/instance_zulfarrak.cpp index 4e7540eef..817d95be7 100644 --- a/scripts/kalimdor/zulfarrak/instance_zulfarrak.cpp +++ b/scripts/kalimdor/zulfarrak/instance_zulfarrak.cpp @@ -44,6 +44,17 @@ void instance_zulfarrak::OnCreatureCreate(Creature* pCreature) } } +void instance_zulfarrak::OnObjectCreate(GameObject* pGo) +{ + if (pGo->GetEntry() == GO_SHALLOW_GRAVE) + m_lShallowGravesGuidList.push_back(pGo->GetObjectGuid()); + else if (pGo->GetEntry() == GO_END_DOOR) + { + if (GetData(TYPE_SEZZZIZ) == DONE) + pGo->SetGoState(GO_STATE_ACTIVE); + } +} + void instance_zulfarrak::SetData(uint32 uiType, uint32 uiData) { switch (uiType) diff --git a/scripts/kalimdor/zulfarrak/zulfarrak.h b/scripts/kalimdor/zulfarrak/zulfarrak.h index 0ca08e921..90c3cd066 100644 --- a/scripts/kalimdor/zulfarrak/zulfarrak.h +++ b/scripts/kalimdor/zulfarrak/zulfarrak.h @@ -27,6 +27,9 @@ enum NPC_SEZZZIZ = 7275, NPC_CHIEF_SANDSCALP = 7267, + GO_SHALLOW_GRAVE = 128403, + GO_END_DOOR = 146084, + AREATRIGGER_ANTUSUL = 1447, }; @@ -43,16 +46,21 @@ class MANGOS_DLL_DECL instance_zulfarrak : public ScriptedInstance void OnCreatureDeath(Creature* pCreature) override; void OnCreatureCreate(Creature* pCreature) override; + void OnObjectCreate(GameObject* pGo) override; void SetData(uint32 uiType, uint32 uiData) override; uint32 GetData(uint32 uiType) const override; + void GetShallowGravesGuidList(GuidList& lList) { lList = m_lShallowGravesGuidList; } + const char* Save() const override { return m_strInstData.c_str(); } void Load(const char* chrIn) override; protected: uint32 m_auiEncounter[MAX_ENCOUNTER]; std::string m_strInstData; + + GuidList m_lShallowGravesGuidList; }; #endif diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 4d1681694..05a981778 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2884" + #define SD2_REVISION_NR "2885" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 999d18b3f..cc286c2e8 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -1351,6 +1351,7 @@ DELETE FROM scripted_areatrigger WHERE entry=1447; INSERT INTO scripted_areatrigger VALUES (1447,'at_zulfarrak'); UPDATE creature_template SET ScriptName='npc_sergeant_bly' WHERE entry=7604; UPDATE creature_template SET ScriptName='npc_weegli_blastfuse' WHERE entry=7607; +UPDATE creature_template SET ScriptName='boss_zumrah' WHERE entry=7271; /* ZUL'GURUB */ UPDATE instance_template SET ScriptName='instance_zulgurub' WHERE map=309; diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 29ac848c0..fdc3a041e 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -1186,6 +1186,11 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1189035,'The master has fallen! Avenge him my brethren!',5834,1,0,0,'trainee SAY_TRAINEE_SPAWN'); -- -1 209 000 ZUL'FARRAK +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1209000,'How dare you enter my sanctum!',0,0,0,0,'zumrah SAY_INTRO'), +(-1209001,'Sands consume you!',5872,1,14,0,'zumrah SAY_AGGRO'), +(-1209002,'Fall!',5873,1,14,0,'zumrah SAY_KILL'), +(-1209003,'Come to me, my children!',0,0,8,0,'zumrah SAY_SUMMON'); -- -1 229 000 BLACKROCK SPIRE INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES diff --git a/sql/updates/r2885_mangos.sql b/sql/updates/r2885_mangos.sql new file mode 100644 index 000000000..1ca53c899 --- /dev/null +++ b/sql/updates/r2885_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='boss_zumrah' WHERE entry=7271; diff --git a/sql/updates/r2885_scriptdev2.sql b/sql/updates/r2885_scriptdev2.sql new file mode 100644 index 000000000..70aef751d --- /dev/null +++ b/sql/updates/r2885_scriptdev2.sql @@ -0,0 +1,6 @@ +DELETE FROM script_texts WHERE entry IN (-1209000, -1209001, -1209002, -1209003); +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1209000,'How dare you enter my sanctum!',0,0,0,0,'zumrah SAY_INTRO'), +(-1209001,'Sands consume you!',5872,1,14,0,'zumrah SAY_AGGRO'), +(-1209002,'Fall!',5873,1,14,0,'zumrah SAY_KILL'), +(-1209003,'Come to me, my children!',0,0,8,0,'zumrah SAY_SUMMON'); From 4d36785069986dba9532ef2994ce40d237cd1509 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Mon, 29 Apr 2013 12:15:16 +0200 Subject: [PATCH 0890/1172] [2886] Some small improvements to Zum'Rah * Rename a function to fit better to needs * Alter behaviour to work properly in case a grave is looted while the enocunter is in progress * Do not use currently looted graves by Zum'Rah --- scripts/kalimdor/zulfarrak/boss_zumrah.cpp | 71 +++++++++------------- sd2_revision_nr.h | 2 +- 2 files changed, 29 insertions(+), 44 deletions(-) diff --git a/scripts/kalimdor/zulfarrak/boss_zumrah.cpp b/scripts/kalimdor/zulfarrak/boss_zumrah.cpp index 2df289619..b8e9d651b 100644 --- a/scripts/kalimdor/zulfarrak/boss_zumrah.cpp +++ b/scripts/kalimdor/zulfarrak/boss_zumrah.cpp @@ -64,8 +64,6 @@ struct MANGOS_DLL_DECL boss_zumrahAI : public ScriptedAI bool m_bHasTurnedHostile; - GuidList m_lUsableGravesList; - void Reset() override { m_uiShadowBoltTimer = 1000; @@ -78,29 +76,6 @@ struct MANGOS_DLL_DECL boss_zumrahAI : public ScriptedAI void Aggro(Unit* /*pWho*/) override { DoScriptText(SAY_AGGRO, m_creature); - - if (m_pInstance) - { - // Get the list of usable graves (not used already by players) - m_lUsableGravesList.clear(); - GuidList lTempList; - std::list lGravesInRange; - - m_pInstance->GetShallowGravesGuidList(lTempList); - for (GuidList::const_iterator itr = lTempList.begin(); itr != lTempList.end(); ++itr) - { - if (GameObject* pGo = m_creature->GetMap()->GetGameObject(*itr)) - { - if (pGo->isSpawned()) - lGravesInRange.push_back(pGo); - } - } - - // Sort the graves and store them for future use - lGravesInRange.sort(ObjectDistanceOrder(m_creature)); - for (std::list::const_iterator itr = lGravesInRange.begin(); itr != lGravesInRange.end(); ++itr) - m_lUsableGravesList.push_back((*itr)->GetObjectGuid()); - } } void KilledUnit(Unit* /*pVictim*/) override @@ -138,18 +113,31 @@ struct MANGOS_DLL_DECL boss_zumrahAI : public ScriptedAI pSummoned->AI()->AttackStart(m_creature->getVictim()); } - ObjectGuid SelectRandomShallowGrave() + GameObject* SelectNearbyShallowGrave() { - if (m_lUsableGravesList.empty()) - return ObjectGuid(); + if (!m_pInstance) + return NULL; + + // Get the list of usable graves (not used already by players) + GuidList lTempList; + std::list lGravesInRange; + + m_pInstance->GetShallowGravesGuidList(lTempList); + for (GuidList::const_iterator itr = lTempList.begin(); itr != lTempList.end(); ++itr) + { + GameObject* pGo = m_creature->GetMap()->GetGameObject(*itr); + // Go spawned and no looting in process + if (pGo && pGo->isSpawned() && pGo->getLootState() == GO_READY) + lGravesInRange.push_back(pGo); + } - GuidList::iterator iter = m_lUsableGravesList.begin(); + if (lGravesInRange.empty()) + return NULL; - // Remove the used grave - ObjectGuid uiGraveGuid = *iter; - m_lUsableGravesList.erase(iter); + // Sort the graves + lGravesInRange.sort(ObjectDistanceOrder(m_creature)); - return uiGraveGuid; + return *lGravesInRange.begin(); } void UpdateAI(const uint32 uiDiff) override @@ -162,20 +150,17 @@ struct MANGOS_DLL_DECL boss_zumrahAI : public ScriptedAI if (m_uiSpawnZombieTimer <= uiDiff) { // Use a nearby grave to spawn zombies - if (GameObject* pGrave = m_creature->GetMap()->GetGameObject(SelectRandomShallowGrave())) + if (GameObject* pGrave = SelectNearbyShallowGrave()) { - if (pGrave->isSpawned()) - { - m_creature->CastSpell(pGrave->GetPositionX(), pGrave->GetPositionY(), pGrave->GetPositionZ(), SPELL_SUMMON_ZOMBIES, true, NULL, NULL, pGrave->GetObjectGuid()); - pGrave->SetLootState(GO_JUST_DEACTIVATED); + m_creature->CastSpell(pGrave->GetPositionX(), pGrave->GetPositionY(), pGrave->GetPositionZ(), SPELL_SUMMON_ZOMBIES, true, NULL, NULL, pGrave->GetObjectGuid()); + pGrave->SetLootState(GO_JUST_DEACTIVATED); - if (roll_chance_i(30)) - DoScriptText(SAY_SUMMON, m_creature); + if (roll_chance_i(30)) + DoScriptText(SAY_SUMMON, m_creature); - m_uiSpawnZombieTimer = 20000; - } + m_uiSpawnZombieTimer = 20000; } - else + else // No Grave usable any more m_uiSpawnZombieTimer = 0; } else diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 05a981778..7f76a60f9 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2885" + #define SD2_REVISION_NR "2886" #endif // __SD2_REVISION_NR_H__ From ad06c1122de1b97cd6a744ecb17b468173b62d97 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Tue, 30 Apr 2013 19:01:50 +0200 Subject: [PATCH 0891/1172] [2887] Fix compile and linking. Requires CMaNGOS [12471] Signed-off-by: Schmoozerd --- scripts/eastern_kingdoms/sunwell_plateau/boss_brutallus.cpp | 4 +--- sd2_revision_nr.h | 2 +- sql/scriptdev2_script_full.sql | 2 +- sql/updates/r2887_scriptdev2.sql | 1 + 4 files changed, 4 insertions(+), 5 deletions(-) create mode 100644 sql/updates/r2887_scriptdev2.sql diff --git a/scripts/eastern_kingdoms/sunwell_plateau/boss_brutallus.cpp b/scripts/eastern_kingdoms/sunwell_plateau/boss_brutallus.cpp index 0aef8bdfe..bc6ec12d0 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/boss_brutallus.cpp +++ b/scripts/eastern_kingdoms/sunwell_plateau/boss_brutallus.cpp @@ -462,9 +462,7 @@ bool EffectAuraDummy_spell_aura_dummy_npc_brutallus_cloud(const Aura* pAura, boo if (Creature* pMadrigosa = pInstance->GetSingleCreatureFromStorage(NPC_MADRIGOSA)) { // Set respawn pos to current pos - CreatureCreatePos madrigosaPos(pMadrigosa->GetMap(), pMadrigosa->GetPositionX(), pMadrigosa->GetPositionY(), pMadrigosa->GetPositionZ(), - pMadrigosa->GetOrientation(), pMadrigosa->GetPhaseMask()); - pMadrigosa->SetRespawnCoord(madrigosaPos); + pMadrigosa->SetRespawnCoord(pMadrigosa->GetPositionX(), pMadrigosa->GetPositionY(), pMadrigosa->GetPositionZ(), pMadrigosa->GetOrientation()); pMadrigosa->CastSpell(pMadrigosa, SPELL_FELBLAZE_PREVIZUAL, true); pMadrigosa->ForcedDespawn(10000); diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 7f76a60f9..1df243827 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2886" + #define SD2_REVISION_NR "2887" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index fdc3a041e..a63cd5827 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -3,7 +3,7 @@ -- DELETE FROM sd2_db_version; -INSERT INTO sd2_db_version (version) VALUES ('ScriptDev2 (for CMaNGOS 12456+) '); +INSERT INTO sd2_db_version (version) VALUES ('ScriptDev2 (for CMaNGOS 12471+) '); -- -- Below contains data for table `script_texts` mainly used in C++ parts. diff --git a/sql/updates/r2887_scriptdev2.sql b/sql/updates/r2887_scriptdev2.sql new file mode 100644 index 000000000..efcfe7145 --- /dev/null +++ b/sql/updates/r2887_scriptdev2.sql @@ -0,0 +1 @@ +UPDATE sd2_db_version SET version='ScriptDev2 (for CMaNGOS 12471+) '; From 21768a9fa70b6cf2e507c6d683eca6ac198d2a88 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Mon, 13 May 2013 20:03:30 +0200 Subject: [PATCH 0892/1172] [2888] Improve code for Grandmaster Vorpil --- .../shadow_labyrinth/boss_grandmaster_vorpil.cpp | 11 ++++++++--- sd2_revision_nr.h | 2 +- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/scripts/outland/auchindoun/shadow_labyrinth/boss_grandmaster_vorpil.cpp b/scripts/outland/auchindoun/shadow_labyrinth/boss_grandmaster_vorpil.cpp index f27f3f9c2..ee57eaf83 100644 --- a/scripts/outland/auchindoun/shadow_labyrinth/boss_grandmaster_vorpil.cpp +++ b/scripts/outland/auchindoun/shadow_labyrinth/boss_grandmaster_vorpil.cpp @@ -180,8 +180,8 @@ struct MANGOS_DLL_DECL boss_grandmaster_vorpilAI : public ScriptedAI if (pTarget && pTarget->GetTypeId() == TYPEID_PLAYER) { - pTarget->GetRandomPoint(aVorpilTeleportLoc[0], aVorpilTeleportLoc[1], aVorpilTeleportLoc[2], 3.0f, fX, fY, fZ); - DoTeleportPlayer(pTarget, fX, fY, fZ, m_creature->GetAngle(m_creature->GetPositionX(), m_creature->GetPositionY())); + pTarget->GetRandomPoint(aVorpilTeleportLoc[0], aVorpilTeleportLoc[1], aVorpilTeleportLoc[2], 4.0f, fX, fY, fZ); + DoTeleportPlayer(pTarget, fX, fY, fZ, m_creature->GetAngle(fX, fY)); } } } @@ -196,10 +196,15 @@ struct MANGOS_DLL_DECL boss_grandmaster_vorpilAI : public ScriptedAI { if (m_uiRainOfFireTimer <= uiDiff) { + SetCombatMovement(false, true); DoTeleportToPlatform(); - if (DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_RAIN_OF_FIRE : SPELL_RAIN_OF_FIRE_H) == CAST_OK) + if (DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_RAIN_OF_FIRE : SPELL_RAIN_OF_FIRE_H, CAST_INTERRUPT_PREVIOUS) == CAST_OK) m_uiRainOfFireTimer = 0; + + SetCombatMovement(true); + + return; // Nothing more todo after the players had been teleported } else m_uiRainOfFireTimer -= uiDiff; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 1df243827..411300907 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2887" + #define SD2_REVISION_NR "2888" #endif // __SD2_REVISION_NR_H__ From 921d915dc2692527b6bf52d5997559e40192a04e Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Mon, 13 May 2013 22:11:40 +0200 Subject: [PATCH 0893/1172] [2889] Add AIEvent throwing wrappers. Requires CMaNGOS [12491] Also use these Events to start an escort script as example --- base/escort_ai.h | 3 +++ include/sc_creature.h | 3 +++ scripts/eastern_kingdoms/redridge_mountains.cpp | 17 ++++++++++------- sd2_revision_nr.h | 2 +- sql/scriptdev2_script_full.sql | 2 +- sql/updates/r2889_scriptdev2.sql | 1 + 6 files changed, 19 insertions(+), 9 deletions(-) create mode 100644 sql/updates/r2889_scriptdev2.sql diff --git a/base/escort_ai.h b/base/escort_ai.h index 93d4909e6..93d141471 100644 --- a/base/escort_ai.h +++ b/base/escort_ai.h @@ -5,6 +5,9 @@ #ifndef SC_ESCORTAI_H #define SC_ESCORTAI_H +// Remove this include, when EscortAI stores uint32 quest-id instead of Quest* +#include "ObjectMgr.h" + struct Escort_Waypoint { Escort_Waypoint(uint32 uiId, float fX, float fY, float fZ, uint32 uiWaitTime) : diff --git a/include/sc_creature.h b/include/sc_creature.h index f201691b3..364b83472 100644 --- a/include/sc_creature.h +++ b/include/sc_creature.h @@ -130,6 +130,9 @@ struct MANGOS_DLL_DECL ScriptedAI : public CreatureAI // Called at World update tick void UpdateAI(const uint32) override; + // Called when an AI Event is received + void ReceiveAIEvent(AIEventType /*eventType*/, Creature* /*pSender*/, Unit* /*pInvoker*/, uint32 /*uiMiscValue*/) override {} + // == State checks ================================= // Check if unit is visible for MoveInLineOfSight diff --git a/scripts/eastern_kingdoms/redridge_mountains.cpp b/scripts/eastern_kingdoms/redridge_mountains.cpp index 45b925c45..ccca3fd13 100644 --- a/scripts/eastern_kingdoms/redridge_mountains.cpp +++ b/scripts/eastern_kingdoms/redridge_mountains.cpp @@ -58,6 +58,15 @@ struct MANGOS_DLL_DECL npc_corporal_keeshan_escortAI : public npc_escortAI m_uiShieldBashTimer = 8000; } + void ReceiveAIEvent(AIEventType eventType, Creature* /*pSender*/, Unit* pInvoker, uint32 uiMiscValue) override + { + if (eventType == AI_EVENT_START_ESCORT && pInvoker->GetTypeId() == TYPEID_PLAYER) + { + DoScriptText(SAY_CORPORAL_KEESHAN_1, m_creature); + Start(false, (Player*)pInvoker, GetQuestTemplateStore(uiMiscValue)); + } + } + void WaypointStart(uint32 uiWP) override { switch (uiWP) @@ -122,13 +131,7 @@ CreatureAI* GetAI_npc_corporal_keeshan(Creature* pCreature) bool QuestAccept_npc_corporal_keeshan(Player* pPlayer, Creature* pCreature, const Quest* pQuest) { if (pQuest->GetQuestId() == QUEST_MISSING_IN_ACTION) - { - if (npc_corporal_keeshan_escortAI* pEscortAI = dynamic_cast(pCreature->AI())) - { - DoScriptText(SAY_CORPORAL_KEESHAN_1, pCreature); - pEscortAI->Start(false, pPlayer, pQuest); - } - } + pCreature->AI()->SendAIEvent(AI_EVENT_START_ESCORT, pPlayer, pCreature, pQuest->GetQuestId()); return true; } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 411300907..23a3eed45 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2888" + #define SD2_REVISION_NR "2889" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index a63cd5827..7c8cf3db4 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -3,7 +3,7 @@ -- DELETE FROM sd2_db_version; -INSERT INTO sd2_db_version (version) VALUES ('ScriptDev2 (for CMaNGOS 12471+) '); +INSERT INTO sd2_db_version (version) VALUES ('ScriptDev2 (for CMaNGOS 12491+) '); -- -- Below contains data for table `script_texts` mainly used in C++ parts. diff --git a/sql/updates/r2889_scriptdev2.sql b/sql/updates/r2889_scriptdev2.sql new file mode 100644 index 000000000..827841176 --- /dev/null +++ b/sql/updates/r2889_scriptdev2.sql @@ -0,0 +1 @@ +UPDATE sd2_db_version SET version='ScriptDev2 (for CMaNGOS 12491+) '; From 2b7c2d81f455b678475f3a35e10c9d4c55dde3b7 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Mon, 13 May 2013 22:14:42 +0200 Subject: [PATCH 0894/1172] [2890] Fix some warnings in two TBC instances * Signed/Unsinged warning in shattered halls * Some copy&paste error for sunwell --- scripts/eastern_kingdoms/sunwell_plateau/boss_kiljaeden.cpp | 6 +++--- .../shattered_halls/instance_shattered_halls.cpp | 2 +- sd2_revision_nr.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/eastern_kingdoms/sunwell_plateau/boss_kiljaeden.cpp b/scripts/eastern_kingdoms/sunwell_plateau/boss_kiljaeden.cpp index 996483960..a148492e8 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/boss_kiljaeden.cpp +++ b/scripts/eastern_kingdoms/sunwell_plateau/boss_kiljaeden.cpp @@ -813,11 +813,11 @@ struct MANGOS_DLL_DECL npc_power_blue_flightAI : public ScriptedAI // Reset the No Interact flag of the closest orb GameObject* pOrb = GetClosestGameObjectWithEntry(m_creature, GO_ORB_BLUE_FLIGHT_1, 10.0f); if (!pOrb) - GameObject* pOrb = GetClosestGameObjectWithEntry(m_creature, GO_ORB_BLUE_FLIGHT_2, 10.0f); + pOrb = GetClosestGameObjectWithEntry(m_creature, GO_ORB_BLUE_FLIGHT_2, 10.0f); if (!pOrb) - GameObject* pOrb = GetClosestGameObjectWithEntry(m_creature, GO_ORB_BLUE_FLIGHT_3, 10.0f); + pOrb = GetClosestGameObjectWithEntry(m_creature, GO_ORB_BLUE_FLIGHT_3, 10.0f); if (!pOrb) - GameObject* pOrb = GetClosestGameObjectWithEntry(m_creature, GO_ORB_BLUE_FLIGHT_4, 10.0f); + pOrb = GetClosestGameObjectWithEntry(m_creature, GO_ORB_BLUE_FLIGHT_4, 10.0f); if (pOrb) pOrb->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NO_INTERACT); diff --git a/scripts/outland/hellfire_citadel/shattered_halls/instance_shattered_halls.cpp b/scripts/outland/hellfire_citadel/shattered_halls/instance_shattered_halls.cpp index c42eb792f..8f166e855 100644 --- a/scripts/outland/hellfire_citadel/shattered_halls/instance_shattered_halls.cpp +++ b/scripts/outland/hellfire_citadel/shattered_halls/instance_shattered_halls.cpp @@ -225,7 +225,7 @@ bool instance_shattered_halls::CheckConditionCriteriaMeet(Player const* pPlayer, case INSTANCE_CONDITION_ID_HARD_MODE: // One soldier alive case INSTANCE_CONDITION_ID_HARD_MODE_2: // Two soldier alive case INSTANCE_CONDITION_ID_HARD_MODE_3: // Three soldier alive - return uiInstanceConditionId == INSTANCE_CONDITION_ID_HARD_MODE_3 - m_uiExecutionStage; + return uiInstanceConditionId == uint32(INSTANCE_CONDITION_ID_HARD_MODE_3 - m_uiExecutionStage); } script_error_log("instance_shattered_halls::CheckConditionCriteriaMeet called with unsupported Id %u. Called with param plr %s, src %s, condition source type %u", diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 23a3eed45..af15055e0 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2889" + #define SD2_REVISION_NR "2890" #endif // __SD2_REVISION_NR_H__ From 797d2126992288afa13e9a1b0c392d0ad714ae44 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Tue, 14 May 2013 10:26:38 +0300 Subject: [PATCH 0895/1172] [2891] Add script support for the pyramid event - Zul'Farrak --- .../kalimdor/zulfarrak/instance_zulfarrak.cpp | 91 ++++++- scripts/kalimdor/zulfarrak/zulfarrak.cpp | 227 +++--------------- scripts/kalimdor/zulfarrak/zulfarrak.h | 18 +- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 8 +- sql/updates/r2891_mangos.sql | 5 + 6 files changed, 142 insertions(+), 209 deletions(-) create mode 100644 sql/updates/r2891_mangos.sql diff --git a/scripts/kalimdor/zulfarrak/instance_zulfarrak.cpp b/scripts/kalimdor/zulfarrak/instance_zulfarrak.cpp index 817d95be7..7e282e139 100644 --- a/scripts/kalimdor/zulfarrak/instance_zulfarrak.cpp +++ b/scripts/kalimdor/zulfarrak/instance_zulfarrak.cpp @@ -16,7 +16,7 @@ /* ScriptData SDName: instance_zulfarrak -SD%Complete: 50% +SD%Complete: 80% SDComment: SDCategory: Zul'Farrak EndScriptData */ @@ -24,7 +24,8 @@ EndScriptData */ #include "precompiled.h" #include "zulfarrak.h" -instance_zulfarrak::instance_zulfarrak(Map* pMap) : ScriptedInstance(pMap) +instance_zulfarrak::instance_zulfarrak(Map* pMap) : ScriptedInstance(pMap), + m_uiPyramidEventTimer(0) { Initialize(); } @@ -39,7 +40,15 @@ void instance_zulfarrak::OnCreatureCreate(Creature* pCreature) switch (pCreature->GetEntry()) { case NPC_ANTUSUL: - m_mNpcEntryGuidStore[NPC_ANTUSUL] = pCreature->GetObjectGuid(); + case NPC_SERGEANT_BLY: + m_mNpcEntryGuidStore[pCreature->GetEntry()] = pCreature->GetObjectGuid(); + break; + case NPC_SANDFURY_SLAVE: + case NPC_SANDFURY_DRUDGE: + case NPC_SANDFURY_CRETIN: + case NPC_SANDFURY_ACOLYTE: + case NPC_SANDFURY_ZEALOT: + m_lPyramidTrollsGuidList.push_back(pCreature->GetObjectGuid()); break; } } @@ -50,7 +59,7 @@ void instance_zulfarrak::OnObjectCreate(GameObject* pGo) m_lShallowGravesGuidList.push_back(pGo->GetObjectGuid()); else if (pGo->GetEntry() == GO_END_DOOR) { - if (GetData(TYPE_SEZZZIZ) == DONE) + if (GetData(TYPE_PYRAMID_EVENT) == DONE) pGo->SetGoState(GO_STATE_ACTIVE); } } @@ -64,10 +73,25 @@ void instance_zulfarrak::SetData(uint32 uiType, uint32 uiData) case TYPE_ANTUSUL: case TYPE_THEKA: case TYPE_ZUMRAH: + case TYPE_CHIEF_SANDSCALP: + m_auiEncounter[uiType] = uiData; + break; case TYPE_NEKRUM: + m_auiEncounter[uiType] = uiData; + if (uiData == DONE && GetData(TYPE_SEZZZIZ) == DONE) + SetData(TYPE_PYRAMID_EVENT, DONE); + break; case TYPE_SEZZZIZ: - case TYPE_CHIEF_SANDSCALP: m_auiEncounter[uiType] = uiData; + if (uiData == DONE && GetData(TYPE_NEKRUM) == DONE) + SetData(TYPE_PYRAMID_EVENT, DONE); + break; + case TYPE_PYRAMID_EVENT: + m_auiEncounter[uiType] = uiData; + if (uiData == IN_PROGRESS) + m_uiPyramidEventTimer = 20000; + else if (uiData == DONE) + m_uiPyramidEventTimer = 0; break; default: return; @@ -79,7 +103,8 @@ void instance_zulfarrak::SetData(uint32 uiType, uint32 uiData) std::ostringstream saveStream; saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2] << " " << m_auiEncounter[3] - << " " << m_auiEncounter[4] << " " << m_auiEncounter[5] << " " << m_auiEncounter[6] << " " << m_auiEncounter[7]; + << " " << m_auiEncounter[4] << " " << m_auiEncounter[5] << " " << m_auiEncounter[6] << " " << m_auiEncounter[7] + << " " << m_auiEncounter[8]; m_strInstData = saveStream.str(); @@ -100,7 +125,8 @@ void instance_zulfarrak::Load(const char* chrIn) std::istringstream loadStream(chrIn); loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3] - >> m_auiEncounter[4] >> m_auiEncounter[5] >> m_auiEncounter[6] >> m_auiEncounter[7]; + >> m_auiEncounter[4] >> m_auiEncounter[5] >> m_auiEncounter[6] >> m_auiEncounter[7] + >> m_auiEncounter[8]; for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) { @@ -164,6 +190,57 @@ void instance_zulfarrak::OnCreatureDeath(Creature* pCreature) } } +void instance_zulfarrak::Update(uint32 uiDiff) +{ + if (m_uiPyramidEventTimer) + { + if (m_uiPyramidEventTimer <= uiDiff) + { + if (m_lPyramidTrollsGuidList.empty()) + { + m_uiPyramidEventTimer = urand(3000, 10000); + return; + } + + GuidList::iterator iter = m_lPyramidTrollsGuidList.begin(); + advance(iter, urand(0, m_lPyramidTrollsGuidList.size() - 1)); + + // Remove the selected troll + ObjectGuid selectedGuid = *iter; + m_lPyramidTrollsGuidList.erase(iter); + + // Move the selected troll to the top of the pyramid. Note: the algorythm may be more complicated than this, but for the moment this will do. + if (Creature* pTroll = instance->GetCreature(selectedGuid)) + { + // Pick another one if already in combat or already killed + if (pTroll->getVictim() || !pTroll->isAlive()) + { + m_uiPyramidEventTimer = urand(0, 2) ? urand(3000, 10000) : 1000; + return; + } + + float fX, fY, fZ; + if (Creature* pBly = GetSingleCreatureFromStorage(NPC_SERGEANT_BLY)) + { + // ToDo: research if there is anything special if these guys die + if (!pBly->isAlive()) + { + m_uiPyramidEventTimer = 0; + return; + } + + pBly->GetRandomPoint(pBly->GetPositionX(), pBly->GetPositionY(), pBly->GetPositionZ(), 4.0f, fX, fY, fZ); + pTroll->SetWalk(false); + pTroll->GetMotionMaster()->MovePoint(0, fX, fY, fZ); + } + } + m_uiPyramidEventTimer = urand(0, 2) ? urand(3000, 10000) : 1000; + } + else + m_uiPyramidEventTimer -= uiDiff; + } +} + InstanceData* GetInstanceData_instance_zulfarrak(Map* pMap) { return new instance_zulfarrak(pMap); diff --git a/scripts/kalimdor/zulfarrak/zulfarrak.cpp b/scripts/kalimdor/zulfarrak/zulfarrak.cpp index 4985ca2e7..8040c7e9d 100644 --- a/scripts/kalimdor/zulfarrak/zulfarrak.cpp +++ b/scripts/kalimdor/zulfarrak/zulfarrak.cpp @@ -16,224 +16,68 @@ /* ScriptData SDName: Zulfarrak -SD%Complete: 50 -SDComment: Consider it temporary, no instance script made for this instance yet. +SD%Complete: 100 +SDComment: SDCategory: Zul'Farrak EndScriptData */ /* ContentData -npc_sergeant_bly -npc_weegli_blastfuse +event_go_zulfarrak_gong +event_spell_unlocking +at_zulfarrak EndContentData */ #include "precompiled.h" #include "zulfarrak.h" /*###### -## npc_sergeant_bly +## event_go_zulfarrak_gong ######*/ -enum -{ - FACTION_HOSTILE = 14, - FACTION_FRIENDLY = 35, - - SPELL_SHIELD_BASH = 11972, - SPELL_REVENGE = 12170 -}; -#define GOSSIP_BLY "That's it! I'm tired of helping you out. It's time we settled things on the battlefield!" - -// find Bly's gossip menus - -struct MANGOS_DLL_DECL npc_sergeant_blyAI : public ScriptedAI +bool ProcessEventId_event_go_zulfarrak_gong(uint32 /*uiEventId*/, Object* pSource, Object* /*pTarget*/, bool bIsStart) { - npc_sergeant_blyAI(Creature* pCreature) : ScriptedAI(pCreature) - { - // m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - Reset(); - } - - // ScriptedInstance* m_pInstance; - - uint32 m_uiShieldBashTimer; - uint32 m_uiRevengeTimer; // this is wrong, spell should never be used unless m_creature->getVictim() dodge, parry or block attack. Mangos support required. - - void Reset() override - { - m_uiShieldBashTimer = 5000; - m_uiRevengeTimer = 8000; - - /*if (m_pInstance) - m_pInstance->SetData(0, NOT_STARTED);*/ - } - - void Aggro(Unit* /*pWho*/) override - { - /*if (m_pInstance) - m_pInstance->SetData(0, IN_PROGRESS);*/ - } - - void JustDied(Unit* /*pVictim*/) override - { - /*if (m_pInstance) - m_pInstance->SetData(0, DONE);*/ - } - - void UpdateAI(const uint32 uiDiff) override + if (bIsStart && pSource->GetTypeId() == TYPEID_PLAYER) { - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - if (m_uiShieldBashTimer < uiDiff) - { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_SHIELD_BASH); - m_uiShieldBashTimer = 15000; - } - else - m_uiShieldBashTimer -= uiDiff; - - if (m_uiRevengeTimer < uiDiff) + if (instance_zulfarrak* pInstance = (instance_zulfarrak*)((Player*)pSource)->GetInstanceData()) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_REVENGE); - m_uiRevengeTimer = 10000; + if (pInstance->GetData(TYPE_GAHZRILLA) == NOT_STARTED || pInstance->GetData(TYPE_GAHZRILLA) == FAIL) + { + pInstance->SetData(TYPE_GAHZRILLA, IN_PROGRESS); + return false; // Summon Gahz'rilla by Database Script + } + else + return true; // Prevent DB script summoning Gahz'rilla } - else - m_uiRevengeTimer -= uiDiff; - - DoMeleeAttackIfReady(); - } -}; - -CreatureAI* GetAI_npc_sergeant_bly(Creature* pCreature) -{ - return new npc_sergeant_blyAI(pCreature); -} - -bool GossipHello_npc_sergeant_bly(Player* pPlayer, Creature* pCreature) -{ - /*if (m_pInstance->GetData(0) == DONE) - {*/ - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_BLY, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); - pPlayer->SEND_GOSSIP_MENU(1517, pCreature->GetObjectGuid()); - /*} - else if (m_pInstance->GetData(0) == IN_PROGRESS) - pPlayer->SEND_GOSSIP_MENU(1516, pCreature->GetObjectGuid()); - else - pPlayer->SEND_GOSSIP_MENU(1515, pCreature->GetObjectGuid());*/ - - return true; -} - -bool GossipSelect_npc_sergeant_bly(Player* pPlayer, Creature* pCreature, uint32 /*uiSender*/, uint32 uiAction) -{ - if (uiAction == GOSSIP_ACTION_INFO_DEF + 1) - { - pPlayer->CLOSE_GOSSIP_MENU(); - pCreature->SetFactionTemporary(FACTION_HOSTILE, TEMPFACTION_RESTORE_COMBAT_STOP | TEMPFACTION_RESTORE_RESPAWN); - pCreature->AI()->AttackStart(pPlayer); } - return true; + return false; } /*###### -## npc_weegli_blastfuse +## event_spell_unlocking ######*/ -enum -{ - SPELL_BOMB = 8858, - SPELL_GOBLIN_LAND_MINE = 21688, - SPELL_SHOOT = 6660, - SPELL_WEEGLIS_BARREL = 10772 -}; - -#define GOSSIP_WEEGLI "[PH] Please blow up the door." - -struct MANGOS_DLL_DECL npc_weegli_blastfuseAI : public ScriptedAI -{ - npc_weegli_blastfuseAI(Creature* pCreature) : ScriptedAI(pCreature) - { - // m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - Reset(); - } - - // ScriptedInstance* m_pInstance; - - void Reset() override - { - /*if (m_pInstance) - m_pInstance->SetData(0, NOT_STARTED);*/ - } - - void Aggro(Unit* /*pWho*/) override - { - /*if (m_pInstance) - m_pInstance->SetData(0, IN_PROGRESS);*/ - } - - void JustDied(Unit* /*pVictim*/) override - { - /*if (m_pInstance) - m_pInstance->SetData(0, DONE);*/ - } - - void UpdateAI(const uint32 /*uiDiff*/) override - { - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - DoMeleeAttackIfReady(); - } -}; - -CreatureAI* GetAI_npc_weegli_blastfuse(Creature* pCreature) -{ - return new npc_weegli_blastfuseAI(pCreature); -} - -bool GossipHello_npc_weegli_blastfuse(Player* pPlayer, Creature* pCreature) -{ - // event not implemented yet, this is only placeholder for future developement - /*if (m_pInstance->GetData(0) == DONE) - { - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_WEEGLI, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - pPlayer->SEND_GOSSIP_MENU(1514, pCreature->GetObjectGuid());// if event can proceed to end - } - else if (m_pInstance->GetData(0) == IN_PROGRESS) - pPlayer->SEND_GOSSIP_MENU(1513, pCreature->GetObjectGuid());// if event are in progress - else*/ - pPlayer->SEND_GOSSIP_MENU(1511, pCreature->GetObjectGuid()); // if event not started - return true; -} - -bool GossipSelect_npc_weegli_blastfuse(Player* pPlayer, Creature* /*pCreature*/, uint32 /*uiSender*/, uint32 uiAction) -{ - if (uiAction == GOSSIP_ACTION_INFO_DEF + 1) - { - pPlayer->CLOSE_GOSSIP_MENU(); - // here we make him run to door, set the charge and run away off to nowhere - } - return true; -} - -bool ProcessEventId_event_go_zulfarrak_gong(uint32 /*uiEventId*/, Object* pSource, Object* /*pTarget*/, bool bIsStart) +bool ProcessEventId_event_spell_unlocking(uint32 /*uiEventId*/, Object* pSource, Object* /*pTarget*/, bool bIsStart) { if (bIsStart && pSource->GetTypeId() == TYPEID_PLAYER) { if (instance_zulfarrak* pInstance = (instance_zulfarrak*)((Player*)pSource)->GetInstanceData()) { - if (pInstance->GetData(TYPE_GAHZRILLA) == NOT_STARTED || pInstance->GetData(TYPE_GAHZRILLA) == FAIL) + if (pInstance->GetData(TYPE_PYRAMID_EVENT) == NOT_STARTED) { - pInstance->SetData(TYPE_GAHZRILLA, IN_PROGRESS); - return false; // Summon Gahz'rilla by Database Script + pInstance->SetData(TYPE_PYRAMID_EVENT, IN_PROGRESS); + return false; // Summon pyramid trolls by Database Script } else - return true; // Prevent DB script summoning Gahz'rilla + return true; } } return false; } +/*###### +## at_zulfarrak +######*/ + bool AreaTrigger_at_zulfarrak(Player* pPlayer, AreaTriggerEntry const* pAt) { if (pAt->id == AREATRIGGER_ANTUSUL) @@ -264,22 +108,13 @@ void AddSC_zulfarrak() Script* pNewScript; pNewScript = new Script; - pNewScript->Name = "npc_sergeant_bly"; - pNewScript->GetAI = &GetAI_npc_sergeant_bly; - pNewScript->pGossipHello = &GossipHello_npc_sergeant_bly; - pNewScript->pGossipSelect = &GossipSelect_npc_sergeant_bly; - pNewScript->RegisterSelf(); - - pNewScript = new Script; - pNewScript->Name = "npc_weegli_blastfuse"; - pNewScript->GetAI = &GetAI_npc_weegli_blastfuse; - pNewScript->pGossipHello = &GossipHello_npc_weegli_blastfuse; - pNewScript->pGossipSelect = &GossipSelect_npc_weegli_blastfuse; + pNewScript->Name = "event_go_zulfarrak_gong"; + pNewScript->pProcessEventId = &ProcessEventId_event_go_zulfarrak_gong; pNewScript->RegisterSelf(); pNewScript = new Script; - pNewScript->Name = "event_go_zulfarrak_gong"; - pNewScript->pProcessEventId = &ProcessEventId_event_go_zulfarrak_gong; + pNewScript->Name = "event_spell_unlocking"; + pNewScript->pProcessEventId = &ProcessEventId_event_spell_unlocking; pNewScript->RegisterSelf(); pNewScript = new Script; diff --git a/scripts/kalimdor/zulfarrak/zulfarrak.h b/scripts/kalimdor/zulfarrak/zulfarrak.h index 90c3cd066..17af8012d 100644 --- a/scripts/kalimdor/zulfarrak/zulfarrak.h +++ b/scripts/kalimdor/zulfarrak/zulfarrak.h @@ -7,7 +7,7 @@ enum { - MAX_ENCOUNTER = 8, + MAX_ENCOUNTER = 9, TYPE_VELRATHA = 0, TYPE_GAHZRILLA = 1, @@ -17,6 +17,7 @@ enum TYPE_NEKRUM = 5, TYPE_SEZZZIZ = 6, TYPE_CHIEF_SANDSCALP = 7, + TYPE_PYRAMID_EVENT = 8, NPC_VELRATHA = 7795, NPC_GAHZRILLA = 7273, @@ -27,9 +28,19 @@ enum NPC_SEZZZIZ = 7275, NPC_CHIEF_SANDSCALP = 7267, + NPC_SERGEANT_BLY = 7604, + NPC_SANDFURY_SLAVE = 7787, + NPC_SANDFURY_DRUDGE = 7788, + NPC_SANDFURY_CRETIN = 7789, + NPC_SANDFURY_ACOLYTE = 8876, + NPC_SANDFURY_ZEALOT = 8877, + GO_SHALLOW_GRAVE = 128403, GO_END_DOOR = 146084, + // EVENT_ID_GONG_ZULFARRAK = 2488, // go 141832 + // EVENT_ID_UNLOCKING = 2609, // spell 10738 + AREATRIGGER_ANTUSUL = 1447, }; @@ -56,11 +67,16 @@ class MANGOS_DLL_DECL instance_zulfarrak : public ScriptedInstance const char* Save() const override { return m_strInstData.c_str(); } void Load(const char* chrIn) override; + void Update(uint32 uiDiff) override; + protected: uint32 m_auiEncounter[MAX_ENCOUNTER]; std::string m_strInstData; GuidList m_lShallowGravesGuidList; + GuidList m_lPyramidTrollsGuidList; + + uint32 m_uiPyramidEventTimer; }; #endif diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index af15055e0..8b655bf2f 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2890" + #define SD2_REVISION_NR "2891" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index cc286c2e8..5492c2f8c 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -1345,12 +1345,12 @@ UPDATE creature_template SET ScriptName='npc_gurgthock' WHERE entry=30007; /* ZUL'FARRAK */ UPDATE instance_template SET ScriptName='instance_zulfarrak' WHERE map=209; -DELETE FROM scripted_event_id WHERE id=2488; -INSERT INTO scripted_event_id VALUES (2488,'event_go_zulfarrak_gong'); +DELETE FROM scripted_event_id WHERE id IN (2488,2609); +INSERT INTO scripted_event_id VALUES +(2488,'event_go_zulfarrak_gong'), +(2609,'event_spell_unlocking'); DELETE FROM scripted_areatrigger WHERE entry=1447; INSERT INTO scripted_areatrigger VALUES (1447,'at_zulfarrak'); -UPDATE creature_template SET ScriptName='npc_sergeant_bly' WHERE entry=7604; -UPDATE creature_template SET ScriptName='npc_weegli_blastfuse' WHERE entry=7607; UPDATE creature_template SET ScriptName='boss_zumrah' WHERE entry=7271; /* ZUL'GURUB */ diff --git a/sql/updates/r2891_mangos.sql b/sql/updates/r2891_mangos.sql new file mode 100644 index 000000000..1de3cdfbd --- /dev/null +++ b/sql/updates/r2891_mangos.sql @@ -0,0 +1,5 @@ +DELETE FROM scripted_event_id WHERE id IN (2609); +INSERT INTO scripted_event_id VALUES +(2609,'event_spell_unlocking'); +UPDATE creature_template SET ScriptName='' WHERE entry=7604; +UPDATE creature_template SET ScriptName='' WHERE entry=7607; From e5e2c371ce341d658de55e4fba743086c31f6d67 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Tue, 14 May 2013 10:50:29 +0300 Subject: [PATCH 0896/1172] [2892] Fix Feather Cyclone summoning Thanks Azelen for pointing Close scriptdev2/scriptdev2-tbc#5 --- scripts/eastern_kingdoms/zulaman/boss_zuljin.cpp | 3 +-- sd2_revision_nr.h | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/scripts/eastern_kingdoms/zulaman/boss_zuljin.cpp b/scripts/eastern_kingdoms/zulaman/boss_zuljin.cpp index 0ae36055f..4c47183fd 100644 --- a/scripts/eastern_kingdoms/zulaman/boss_zuljin.cpp +++ b/scripts/eastern_kingdoms/zulaman/boss_zuljin.cpp @@ -297,8 +297,7 @@ struct MANGOS_DLL_DECL boss_zuljinAI : public ScriptedAI DoCastSpellIfCan(m_creature, SPELL_ENERGY_STORM, CAST_TRIGGERED); // summon 4 vortexes - for (uint8 i = 0; i < MAX_VORTEXES; ++i) - DoCastSpellIfCan(m_creature, SPELL_SUMMON_CYCLONE, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_SUMMON_CYCLONE, CAST_TRIGGERED); } m_bIsInTransition = false; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 8b655bf2f..790f61ef3 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2891" + #define SD2_REVISION_NR "2892" #endif // __SD2_REVISION_NR_H__ From e3bb40ff164a6291a56dd2ceaaf14c3c1ba8d5d2 Mon Sep 17 00:00:00 2001 From: NeatElves Date: Tue, 14 May 2013 22:21:22 +0300 Subject: [PATCH 0897/1172] [2893] Drop some scripts which can be handled with DBscripts Signed-off-by: Xfurry --- scripts/world/go_scripts.cpp | 48 +-------------------------------- scripts/world/spell_scripts.cpp | 15 ----------- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 3 +-- sql/updates/r2893_mangos.sql | 2 ++ 5 files changed, 5 insertions(+), 65 deletions(-) create mode 100644 sql/updates/r2893_mangos.sql diff --git a/scripts/world/go_scripts.cpp b/scripts/world/go_scripts.cpp index f53de8094..f61623a61 100644 --- a/scripts/world/go_scripts.cpp +++ b/scripts/world/go_scripts.cpp @@ -17,7 +17,7 @@ /* ScriptData SDName: GO_Scripts SD%Complete: 100 -SDComment: Quest support: 5097, 5098, 10990, 10991, 10992, 12557, 14092/14076. Barov_journal->Teaches spell 26089 +SDComment: Quest support: 5097, 5098, 12557, 14092/14076. Barov_journal->Teaches spell 26089 SDCategory: Game Objects EndScriptData */ @@ -26,7 +26,6 @@ go_barov_journal go_ethereum_prison go_ethereum_stasis go_mysterious_snow_mound -go_shrine_of_the_birds go_tele_to_dalaran_crystal go_tele_to_violet_stand go_andorhal_tower @@ -185,46 +184,6 @@ bool GOUse_go_mysterious_snow_mound(Player* pPlayer, GameObject* pGo) return true; } -/*###### -## go_shrine_of_the_birds -######*/ - -enum -{ - NPC_HAWK_GUARD = 22992, - NPC_EAGLE_GUARD = 22993, - NPC_FALCON_GUARD = 22994, - GO_SHRINE_HAWK = 185551, - GO_SHRINE_EAGLE = 185547, - GO_SHRINE_FALCON = 185553 -}; - -bool GOUse_go_shrine_of_the_birds(Player* pPlayer, GameObject* pGo) -{ - uint32 uiBirdEntry = 0; - - float fX, fY, fZ; - pGo->GetClosePoint(fX, fY, fZ, pGo->GetObjectBoundingRadius(), INTERACTION_DISTANCE); - - switch (pGo->GetEntry()) - { - case GO_SHRINE_HAWK: - uiBirdEntry = NPC_HAWK_GUARD; - break; - case GO_SHRINE_EAGLE: - uiBirdEntry = NPC_EAGLE_GUARD; - break; - case GO_SHRINE_FALCON: - uiBirdEntry = NPC_FALCON_GUARD; - break; - } - - if (uiBirdEntry) - pPlayer->SummonCreature(uiBirdEntry, fX, fY, fZ, pGo->GetOrientation(), TEMPSUMMON_TIMED_OOC_DESPAWN, 60000); - - return false; -} - /*###### ## go_tele_to_dalaran_crystal ######*/ @@ -385,11 +344,6 @@ void AddSC_go_scripts() pNewScript->pGOUse = &GOUse_go_mysterious_snow_mound; pNewScript->RegisterSelf(); - pNewScript = new Script; - pNewScript->Name = "go_shrine_of_the_birds"; - pNewScript->pGOUse = &GOUse_go_shrine_of_the_birds; - pNewScript->RegisterSelf(); - pNewScript = new Script; pNewScript->Name = "go_tele_to_dalaran_crystal"; pNewScript->pGOUse = &GOUse_go_tele_to_dalaran_crystal; diff --git a/scripts/world/spell_scripts.cpp b/scripts/world/spell_scripts.cpp index 5897c4336..8c7296c75 100644 --- a/scripts/world/spell_scripts.cpp +++ b/scripts/world/spell_scripts.cpp @@ -38,7 +38,6 @@ spell 45111 spell 46023 spell 46770 spell 47575 -spell 48218 spell 50706 spell 51331 spell 51332 @@ -321,9 +320,6 @@ enum SAY_FREE_2 = -1000782, SAY_FREE_3 = -1000783, - // quest 12213, 12220, item 37173 - SPELL_SAMPLING_ENERGY = 48218, - // npcs that are only interactable while dead SPELL_SHROUD_OF_DEATH = 10848, SPELL_SPIRIT_PARTICLES = 17327, @@ -994,17 +990,6 @@ bool EffectDummyCreature_spell_dummy_npc(Unit* pCaster, uint32 uiSpellId, SpellE } return true; } - case SPELL_SAMPLING_ENERGY: - { - if (uiEffIndex == EFFECT_INDEX_0) - { - if (pCaster->GetTypeId() != TYPEID_PLAYER) - return true; - - ((Player*)pCaster)->KilledMonsterCredit(pCreatureTarget->GetEntry()); - } - return true; - } case SPELL_EXPOSE_RAZORTHORN_ROOT: { if (uiEffIndex == EFFECT_INDEX_0) diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 790f61ef3..edebe4971 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2892" + #define SD2_REVISION_NR "2893" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 5492c2f8c..bd8212f49 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -103,7 +103,6 @@ UPDATE gameobject_template SET ScriptName='go_ethereum_stasis' WHERE entry=18459 UPDATE gameobject_template SET ScriptName='go_ethereum_stasis' WHERE entry BETWEEN 185461 AND 185464; UPDATE gameobject_template SET ScriptName='go_jump_a_tron' WHERE entry=183146; UPDATE gameobject_template SET ScriptName='go_mysterious_snow_mound' WHERE entry=195308; -UPDATE gameobject_template SET ScriptName='go_shrine_of_the_birds' WHERE entry IN (185547,185553,185551); UPDATE gameobject_template SET ScriptName='go_tele_to_dalaran_crystal' WHERE entry=191230; UPDATE gameobject_template SET ScriptName='go_tele_to_violet_stand' WHERE entry=191229; UPDATE gameobject_template SET ScriptName='go_andorhal_tower' WHERE entry IN (176094,176095,176096,176097); @@ -166,7 +165,7 @@ UPDATE creature_template SET ScriptName='spell_dummy_npc' WHERE entry IN ( -- outland 16880,16518,16847,17157,17326,17654,18879,21729,22105,24918,24922,25084,25085, -- northrend -23678,25752,25753,25758,25792,25793,26268,26270,26421,26616,26643,26841,26924,27122,27263,27264,27265,27808,28053,28054,28068,28093,28465,28600,29319,29327,29329,29330,29338,30146,32149); +23678,25752,25753,25758,25792,25793,26268,26270,26421,26616,26643,26841,26924,27122,27808,28053,28054,28068,28093,28465,28600,29319,29327,29329,29330,29338,30146,32149); UPDATE gameobject_template SET ScriptName='spell_dummy_go' WHERE entry IN (181616,186949); diff --git a/sql/updates/r2893_mangos.sql b/sql/updates/r2893_mangos.sql new file mode 100644 index 000000000..60f56b8db --- /dev/null +++ b/sql/updates/r2893_mangos.sql @@ -0,0 +1,2 @@ +UPDATE creature_template SET ScriptName='' WHERE entry IN (27263,27264,27265); +UPDATE gameobject_template SET ScriptName='' WHERE entry IN (185547,185553,185551); From 894204447dca51f966791827d04e0a52d9279a63 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Wed, 15 May 2013 01:30:10 +0300 Subject: [PATCH 0898/1172] [2894] Add script support for quest 10514 Thanks grz3s for providing the necessary data --- scripts/outland/shadowmoon_valley.cpp | 139 +++++++++++++++++++++++++- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 2 + sql/scriptdev2_script_full.sql | 6 +- sql/updates/r2894_mangos.sql | 2 + sql/updates/r2894_scriptdev2.sql | 5 + 6 files changed, 153 insertions(+), 3 deletions(-) create mode 100644 sql/updates/r2894_mangos.sql create mode 100644 sql/updates/r2894_scriptdev2.sql diff --git a/scripts/outland/shadowmoon_valley.cpp b/scripts/outland/shadowmoon_valley.cpp index cbd92a8b7..cd08b5a4f 100644 --- a/scripts/outland/shadowmoon_valley.cpp +++ b/scripts/outland/shadowmoon_valley.cpp @@ -17,7 +17,7 @@ /* ScriptData SDName: Shadowmoon_Valley SD%Complete: 100 -SDComment: Quest support: 10781, 10804, 10854, 10458, 10480, 10481, 10588, 11020. +SDComment: Quest support: 11020, 10458, 10480, 10481, 10514, 10588, 10781, 10804, 10854. SDCategory: Shadowmoon Valley EndScriptData */ @@ -1668,6 +1668,133 @@ bool GossipSelect_npc_spawned_oronok_tornheart(Player* pPlayer, Creature* pCreat return true; } +/*###### +## npc_domesticated_felboar +######*/ + +enum +{ + EMOTE_SNIFF_AIR = -1000907, + EMOTE_START_DIG = -1000908, + EMOTE_SQUEAL = -1000909, + + SPELL_SHADOWMOON_TUBER = 36462, + SPELL_SPECIAL_UNARMED = 33334, + SPELL_TUBER_WHISTLE = 36652, + + NPC_DOMESTICATED_FELBOAR = 21195, + NPC_SHADOWMOON_TUBER_NODE = 21347, + GO_SHADOWMOON_TUBER_MOUND = 184701, +}; + +struct MANGOS_DLL_DECL npc_domesticated_felboarAI : public ScriptedAI +{ + npc_domesticated_felboarAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } + + uint32 m_uiTuberTimer; + uint8 m_uiTuberStage; + + void Reset() override + { + m_uiTuberTimer = 0; + m_uiTuberStage = 0; + } + + void MovementInform(uint32 uiMoveType, uint32 uiPointId) override + { + if (uiMoveType != POINT_MOTION_TYPE || !uiPointId) + return; + + if (DoCastSpellIfCan(m_creature, SPELL_SPECIAL_UNARMED) == CAST_OK) + { + DoScriptText(EMOTE_START_DIG, m_creature); + m_uiTuberTimer = 2000; + } + } + + void ReceiveAIEvent(AIEventType eventType, Creature* pSender, Unit* pInvoker, uint32 /*uiMiscValue*/) override + { + if (eventType == AI_EVENT_START_EVENT && pInvoker->GetTypeId() == TYPEID_PLAYER) + { + DoScriptText(EMOTE_SNIFF_AIR, m_creature); + + float fX, fY, fZ; + m_creature->SetWalk(false); + m_creature->GetMotionMaster()->MoveIdle(); + pSender->GetContactPoint(m_creature, fX, fY, fZ); + m_creature->GetMotionMaster()->MovePoint(1, fX, fY, fZ); + } + } + + void UpdateAI(const uint32 uiDiff) override + { + if (m_uiTuberTimer) + { + if (m_uiTuberTimer <= uiDiff) + { + switch (m_uiTuberStage) + { + case 0: + if (DoCastSpellIfCan(m_creature, SPELL_SPECIAL_UNARMED) == CAST_OK) + m_uiTuberTimer = 2000; + break; + case 1: + if (DoCastSpellIfCan(m_creature, SPELL_SHADOWMOON_TUBER) == CAST_OK) + { + // Despawn current tuber + if (GameObject* pTuber = GetClosestGameObjectWithEntry(m_creature, GO_SHADOWMOON_TUBER_MOUND, 3.0f)) + pTuber->SetLootState(GO_JUST_DEACTIVATED); + + DoScriptText(EMOTE_SQUEAL, m_creature); + m_uiTuberTimer = 2000; + } + break; + case 2: + EnterEvadeMode(); + break; + } + ++m_uiTuberStage; + } + else + m_uiTuberTimer -= uiDiff; + } + + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_npc_domesticated_felboar(Creature* pCreature) +{ + return new npc_domesticated_felboarAI(pCreature); +} + +bool EffectDummyCreature_npc_shadowmoon_tuber_node(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) +{ + // always check spellid and effectindex + if (uiSpellId == SPELL_TUBER_WHISTLE && uiEffIndex == EFFECT_INDEX_0) + { + if (pCreatureTarget->GetEntry() == NPC_SHADOWMOON_TUBER_NODE) + { + // Check if tuber mound exists or it's spawned + GameObject* pTuber = GetClosestGameObjectWithEntry(pCreatureTarget, GO_SHADOWMOON_TUBER_MOUND, 1.0f); + if (!pTuber || !pTuber->isSpawned()) + return true; + + // Call nearby felboar + if (Creature* pBoar = GetClosestCreatureWithEntry(pCreatureTarget, NPC_DOMESTICATED_FELBOAR, 40.0f)) + pCreatureTarget->AI()->SendAIEvent(AI_EVENT_START_EVENT, pCaster, pBoar); + } + + // always return true when we are handling this spell and effect + return true; + } + + return false; +} + void AddSC_shadowmoon_valley() { Script* pNewScript; @@ -1727,4 +1854,14 @@ void AddSC_shadowmoon_valley() pNewScript->pGossipHello = &GossipHello_npc_spawned_oronok_tornheart; pNewScript->pGossipSelect = &GossipSelect_npc_spawned_oronok_tornheart; pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_domesticated_felboar"; + pNewScript->GetAI = &GetAI_npc_domesticated_felboar; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_shadowmoon_tuber_node"; + pNewScript->pEffectDummyNPC = &EffectDummyCreature_npc_shadowmoon_tuber_node; + pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index edebe4971..ae6bb42dd 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2893" + #define SD2_REVISION_NR "2894" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index bd8212f49..1ad18d429 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -1003,6 +1003,8 @@ INSERT INTO scripted_event_id VALUES UPDATE creature_template SET ScriptName='npc_lord_illidan_stormrage' WHERE entry=22083; UPDATE gameobject_template SET ScriptName='go_crystal_prison' WHERE entry=185126; UPDATE creature_template SET ScriptName='npc_spawned_oronok_tornheart' WHERE entry=21685; +UPDATE creature_template SET ScriptName='npc_domesticated_felboar' WHERE entry=21195; +UPDATE creature_template SET ScriptName='npc_shadowmoon_tuber_node' WHERE entry=21347; /* SHATTRATH */ UPDATE creature_template SET ScriptName='npc_dirty_larry' WHERE entry=19720; diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 7c8cf3db4..728adc4be 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -974,7 +974,11 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1000904,'%s salutes $N.',0,2,0,0,'vanguard EMOTE_VANGUARD_FINISH'), (-1000905,'Ok, let\'s go!!',0,0,0,1,'therylune SAY_THERYLUNE_START'), -(-1000906,'I can make it the rest of the way. $N. THANKS!',0,0,0,1,'therylune SAY_THERYLUNE_START'); +(-1000906,'I can make it the rest of the way. $N. THANKS!',0,0,0,1,'therylune SAY_THERYLUNE_START'), + +(-1000907,'%s sniffs at the air. A tuber is near!',0,2,0,0,'domesticated felboar EMOTE_SNIFF_AIR'), +(-1000908,'%s starts to dig.',0,2,0,0,'domesticated felboar EMOTE_START_DIG'), +(-1000909,'%s squeals with glee at its discovery.',0,2,0,0,'domesticated felboar EMOTE_SQUEAL'); -- -1 033 000 SHADOWFANG KEEP INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES diff --git a/sql/updates/r2894_mangos.sql b/sql/updates/r2894_mangos.sql new file mode 100644 index 000000000..91e3fa25f --- /dev/null +++ b/sql/updates/r2894_mangos.sql @@ -0,0 +1,2 @@ +UPDATE creature_template SET ScriptName='npc_domesticated_felboar' WHERE entry=21195; +UPDATE creature_template SET ScriptName='npc_shadowmoon_tuber_node' WHERE entry=21347; diff --git a/sql/updates/r2894_scriptdev2.sql b/sql/updates/r2894_scriptdev2.sql new file mode 100644 index 000000000..65f4d3e9d --- /dev/null +++ b/sql/updates/r2894_scriptdev2.sql @@ -0,0 +1,5 @@ +DELETE FROM script_texts WHERE entry IN (-1000907, -1000908, -1000909); +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1000907,'%s sniffs at the air. A tuber is near!',0,2,0,0,'domesticated felboar EMOTE_SNIFF_AIR'), +(-1000908,'%s starts to dig.',0,2,0,0,'domesticated felboar EMOTE_START_DIG'), +(-1000909,'%s squeals with glee at its discovery.',0,2,0,0,'domesticated felboar EMOTE_SQUEAL'); From 670e52422e30e3fa1dba2547b0fb089de952dd55 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Thu, 16 May 2013 00:31:19 +0300 Subject: [PATCH 0899/1172] [2895] Allow the Eredar Twins to use the Flame / Dark Touched spells Also fix some small issues in Magtheridon's Lair --- .../sunwell_plateau/boss_eredar_twins.cpp | 82 +++++++++++++------ .../magtheridons_lair/boss_magtheridon.cpp | 2 +- .../instance_magtheridons_lair.cpp | 4 +- scripts/outland/shadowmoon_valley.cpp | 1 + sd2_revision_nr.h | 2 +- 5 files changed, 60 insertions(+), 31 deletions(-) diff --git a/scripts/eastern_kingdoms/sunwell_plateau/boss_eredar_twins.cpp b/scripts/eastern_kingdoms/sunwell_plateau/boss_eredar_twins.cpp index 4b1d79330..60addeb1d 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/boss_eredar_twins.cpp +++ b/scripts/eastern_kingdoms/sunwell_plateau/boss_eredar_twins.cpp @@ -55,7 +55,7 @@ enum SPELL_DARK_FLAME = 45345, // Sacrolash spells - SPELL_DARK_TOUCHED = 45347, // TODO NYI - Player debuff; removed by shadow damage + SPELL_DARK_TOUCHED = 45347, // Player debuff; removed by shadow damage SPELL_SHADOW_BLADES = 45248, // 10 secs SPELL_DARK_STRIKE = 45271, SPELL_SHADOW_NOVA = 45329, // 30-35 secs @@ -69,7 +69,7 @@ enum // Alythess spells SPELL_PYROGENICS = 45230, // Self buff; 15secs - SPELL_FLAME_TOUCHED = 45348, // TODO NYI - Player debuff; removed by shadow damage + SPELL_FLAME_TOUCHED = 45348, // Player debuff; removed by shadow damage SPELL_CONFLAGRATION = 45342, // 30-35 secs SPELL_BLAZE = 45235, // On main target every 3 secs; should trigger 45236 which leaves a fire on the ground SPELL_FLAME_SEAR = 46771, // A few random targets debuff @@ -104,7 +104,6 @@ struct MANGOS_DLL_DECL boss_alythessAI : public ScriptedAI uint32 m_uiEnrageTimer; uint32 m_uiPyrogenicsTimer; - uint32 m_uiFlameTouchedTimer; uint32 m_uiConflagrationTimer; uint32 m_uiBlazeTimer; uint32 m_uiFlameSearTimer; @@ -114,7 +113,6 @@ struct MANGOS_DLL_DECL boss_alythessAI : public ScriptedAI { m_uiEnrageTimer = 6 * MINUTE * IN_MILLISECONDS; m_uiPyrogenicsTimer = 20000; - m_uiFlameTouchedTimer = 30000; m_uiConflagrationTimer = urand(25000, 30000); m_uiBlazeTimer = 1000; m_uiFlameSearTimer = 5000; @@ -187,6 +185,33 @@ struct MANGOS_DLL_DECL boss_alythessAI : public ScriptedAI } } + void SpellHitTarget(Unit* pTarget, const SpellEntry* pSpell) override + { + if (pTarget->HasAura(SPELL_DARK_FLAME)) + return; + + if (pSpell->SchoolMask == SPELL_SCHOOL_MASK_FIRE) + { + if (pTarget->HasAura(SPELL_DARK_TOUCHED)) + { + pTarget->RemoveAurasDueToSpell(SPELL_DARK_TOUCHED); + pTarget->CastSpell(pTarget, SPELL_DARK_FLAME, true); + } + else + pTarget->CastSpell(pTarget, SPELL_FLAME_TOUCHED, true); + } + else if (pSpell->SchoolMask == SPELL_SCHOOL_MASK_SHADOW) + { + if (pTarget->HasAura(SPELL_FLAME_TOUCHED)) + { + pTarget->RemoveAurasDueToSpell(SPELL_FLAME_TOUCHED); + pTarget->CastSpell(pTarget, SPELL_DARK_FLAME, true); + } + else + pTarget->CastSpell(pTarget, SPELL_DARK_TOUCHED, true); + } + } + void UpdateAI(const uint32 uiDiff) override { if (m_pInstance && m_pInstance->GetData(TYPE_EREDAR_TWINS) == SPECIAL) @@ -221,16 +246,6 @@ struct MANGOS_DLL_DECL boss_alythessAI : public ScriptedAI else m_uiPyrogenicsTimer -= uiDiff; - /* // Spell needs research of fix; it shoudn't be cast on self - if (m_uiFlameTouchedTimer < uiDiff) - { - if (DoCastSpellIfCan(m_creature, SPELL_FLAME_TOUCHED) == CAST_OK) - m_uiFlameTouchedTimer = urand(10000, 13000); - } - else - m_uiFlameTouchedTimer -= uiDiff; - */ - if (m_uiConflagrationTimer < uiDiff) { Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_TOPAGGRO, 3); @@ -279,7 +294,6 @@ struct MANGOS_DLL_DECL boss_sacrolashAI : public ScriptedAI ScriptedInstance* m_pInstance; uint32 m_uiEnrageTimer; - uint32 m_uiDarkTouchedTimer; uint32 m_uiShadowNovaTimer; uint32 m_uiConfoundingBlowTimer; uint32 m_uiShadowBladesTimer; @@ -288,7 +302,6 @@ struct MANGOS_DLL_DECL boss_sacrolashAI : public ScriptedAI void Reset() override { m_uiEnrageTimer = 6 * MINUTE * IN_MILLISECONDS; - m_uiDarkTouchedTimer = 30000; m_uiShadowNovaTimer = 15000; m_uiConfoundingBlowTimer = 30000; m_uiShadowBladesTimer = 15000; @@ -348,6 +361,33 @@ struct MANGOS_DLL_DECL boss_sacrolashAI : public ScriptedAI } } + void SpellHitTarget(Unit* pTarget, const SpellEntry* pSpell) override + { + if (pTarget->HasAura(SPELL_DARK_FLAME)) + return; + + if (pSpell->SchoolMask == SPELL_SCHOOL_MASK_FIRE) + { + if (pTarget->HasAura(SPELL_DARK_TOUCHED)) + { + pTarget->RemoveAurasDueToSpell(SPELL_DARK_TOUCHED); + pTarget->CastSpell(pTarget, SPELL_DARK_FLAME, true); + } + else + pTarget->CastSpell(pTarget, SPELL_FLAME_TOUCHED, true); + } + else if (pSpell->SchoolMask == SPELL_SCHOOL_MASK_SHADOW) + { + if (pTarget->HasAura(SPELL_FLAME_TOUCHED)) + { + pTarget->RemoveAurasDueToSpell(SPELL_FLAME_TOUCHED); + pTarget->CastSpell(pTarget, SPELL_DARK_FLAME, true); + } + else + pTarget->CastSpell(pTarget, SPELL_DARK_TOUCHED, true); + } + } + // Return a random target which it's not in range of 10 yards of boss Unit* GetRandomTargetAtDist(float fDist) { @@ -396,16 +436,6 @@ struct MANGOS_DLL_DECL boss_sacrolashAI : public ScriptedAI else m_uiEnrageTimer -= uiDiff; - /* // Spell needs research of fix; it shoudn't be cast on self - if (m_uiDarkTouchedTimer < uiDiff) - { - if (DoCastSpellIfCan(m_creature, SPELL_DARK_TOUCHED) == CAST_OK) - m_uiDarkTouchedTimer = urand(10000, 13000); - } - else - m_uiDarkTouchedTimer -= uiDiff; - */ - if (m_uiShadowBladesTimer < uiDiff) { if (DoCastSpellIfCan(m_creature, SPELL_SHADOW_BLADES) == CAST_OK) diff --git a/scripts/outland/hellfire_citadel/magtheridons_lair/boss_magtheridon.cpp b/scripts/outland/hellfire_citadel/magtheridons_lair/boss_magtheridon.cpp index 5271e3da6..4c4673002 100644 --- a/scripts/outland/hellfire_citadel/magtheridons_lair/boss_magtheridon.cpp +++ b/scripts/outland/hellfire_citadel/magtheridons_lair/boss_magtheridon.cpp @@ -451,7 +451,7 @@ bool GOUse_go_manticron_cube(Player* pPlayer, GameObject* pGo) pTrigger->CastSpell(pTrigger, SPELL_SHADOW_GRASP_VISUAL, false); // the real spell is cast by player - pPlayer->CastSpell(pPlayer, SPELL_SHADOW_GRASP, false); + pPlayer->CastSpell(pPlayer, SPELL_SHADOW_GRASP, false, NULL, NULL, pGo->GetObjectGuid()); } } diff --git a/scripts/outland/hellfire_citadel/magtheridons_lair/instance_magtheridons_lair.cpp b/scripts/outland/hellfire_citadel/magtheridons_lair/instance_magtheridons_lair.cpp index ab6ac725e..fcaeb6940 100644 --- a/scripts/outland/hellfire_citadel/magtheridons_lair/instance_magtheridons_lair.cpp +++ b/scripts/outland/hellfire_citadel/magtheridons_lair/instance_magtheridons_lair.cpp @@ -237,11 +237,9 @@ void instance_magtheridons_lair::Update(uint32 uiDiff) if (Creature* pMagtheridon = GetSingleCreatureFromStorage(NPC_MAGTHERIDON)) { if (pMagtheridon->isAlive()) - { DoScriptText(aRandomTaunt[urand(0, 5)], pMagtheridon); - m_uiRandYellTimer = 90000; - } } + m_uiRandYellTimer = 90000; } else m_uiRandYellTimer -= uiDiff; diff --git a/scripts/outland/shadowmoon_valley.cpp b/scripts/outland/shadowmoon_valley.cpp index cd08b5a4f..3885ce18b 100644 --- a/scripts/outland/shadowmoon_valley.cpp +++ b/scripts/outland/shadowmoon_valley.cpp @@ -32,6 +32,7 @@ npc_totem_of_spirits event_spell_soul_captured_credit go_crystal_prison npc_spawned_oronok_tornheart +npc_domesticated_felboar EndContentData */ #include "precompiled.h" diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index ae6bb42dd..8e06edbde 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2894" + #define SD2_REVISION_NR "2895" #endif // __SD2_REVISION_NR_H__ From dfba64bcad11191b0ce037d90b4173930f338288 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Wed, 15 May 2013 23:53:45 +0200 Subject: [PATCH 0900/1172] Small improvements for Magtheridon RandomYell change from 2895 --- .../magtheridons_lair/instance_magtheridons_lair.cpp | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/scripts/outland/hellfire_citadel/magtheridons_lair/instance_magtheridons_lair.cpp b/scripts/outland/hellfire_citadel/magtheridons_lair/instance_magtheridons_lair.cpp index fcaeb6940..52a185b48 100644 --- a/scripts/outland/hellfire_citadel/magtheridons_lair/instance_magtheridons_lair.cpp +++ b/scripts/outland/hellfire_citadel/magtheridons_lair/instance_magtheridons_lair.cpp @@ -228,17 +228,13 @@ void instance_magtheridons_lair::Update(uint32 uiDiff) m_uiCageBreakTimer -= uiDiff; } - // no yell if event is in progress - if (GetData(TYPE_CHANNELER_EVENT) == IN_PROGRESS) + // no yell if event is in progress or finished + if (m_auiEncounter[TYPE_CHANNELER_EVENT] == IN_PROGRESS || m_auiEncounter[TYPE_MAGTHERIDON_EVENT] == DONE) return; if (m_uiRandYellTimer < uiDiff) { - if (Creature* pMagtheridon = GetSingleCreatureFromStorage(NPC_MAGTHERIDON)) - { - if (pMagtheridon->isAlive()) - DoScriptText(aRandomTaunt[urand(0, 5)], pMagtheridon); - } + DoOrSimulateScriptTextForThisInstance(aRandomTaunt[urand(0, 5)], NPC_MAGTHERIDON); m_uiRandYellTimer = 90000; } else From 888d0a1a9bd44f2679fe2c53a1b307e7388ae78d Mon Sep 17 00:00:00 2001 From: Xfurry Date: Fri, 17 May 2013 21:53:08 +0300 Subject: [PATCH 0901/1172] [2896] Implement script for Ahune - The Frost Lord This boss is only active during the Midsummer event Please note that some visual spells and proc auras, specific to the submerged phase are not yet implemented. They require additional research and core support. --- .../slave_pens/boss_ahune.cpp | 388 +++++++++++++++++- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 3 + sql/updates/r2896_mangos.sql | 3 + 4 files changed, 393 insertions(+), 3 deletions(-) create mode 100644 sql/updates/r2896_mangos.sql diff --git a/scripts/outland/coilfang_reservoir/slave_pens/boss_ahune.cpp b/scripts/outland/coilfang_reservoir/slave_pens/boss_ahune.cpp index 7846fb2f8..25dbed1bc 100644 --- a/scripts/outland/coilfang_reservoir/slave_pens/boss_ahune.cpp +++ b/scripts/outland/coilfang_reservoir/slave_pens/boss_ahune.cpp @@ -16,13 +16,397 @@ /* ScriptData SDName: boss_ahune -SD%Complete: 0 -SDComment: Placeholder +SD%Complete: 75 +SDComment: Submerged phase visual spells NYI; they require additional research. SDCategory: Slave Pens EndScriptData */ #include "precompiled.h" +#include "TemporarySummon.h" + +enum +{ + // general spells + SPELL_AHUNES_SHIELD = 45954, + SPELL_SPANKY_HANDS = 46146, // procs on melee hit; should proc 46430 but currently is not used because of the invalid proc flag + SPELL_SYNCH_HEALTH = 46430, + SPELL_SUICIDE = 45254, + SPELL_AHUNE_LOOT = 45941, + SPELL_AHUNE_LOOT_H = 46623, + SPELL_ISDEAD_CHECK = 61976, // purpose unk + SPELL_AHUNE_DIES_ACHIEV = 62043, + + // ground phase spells + SPELL_SUMMON_HAILSTONE = 45951, + SPELL_SUMMON_COLDWAVE = 45952, + SPELL_SUMMON_FROSTWIND = 45953, + + // submerged phase spells + SPELL_BIRTH = 37745, // spawn animation - not confirmed + SPELL_SUBMERGE = 37550, // submerge animation - not confirmed + SPELL_STAY_SUBMERGED = 46981, // triggers 37751; this should keep the boss submerged + SPELL_AHUNE_SELF_STUN = 46416, + SPELL_ICE_BOMBARD = 46397, // cast on phase 2 end; related to the fire opening visuals + SPELL_CLOSE_OPENING_VISUAL = 46236, // same as above + SPELL_STAND = 37752, // purpose unk + + // frozen core spells + SPELL_ICE_SPEAR_AURA = 46371, + SPELL_FROZEN_CORE_HIT = 46810, // procs on melee hit; should summon npc 26239 for a 2 seconds + SPELL_GHOST_DISGUISE = 46786, // triggered by spell 46809 + + // ice spear spells + SPELL_SUMMON_ICE_SPEAR_GO = 46369, + SPELL_ICE_SPEAR_DELAY = 46878, + SPELL_ICE_SPEAR_KNOCKBACK = 46360, + SPELL_ICE_SPEAR_VISUAL = 75498, + + // npcs and GOs + NPC_FROZEN_CORE = 25865, + NPC_GHOST_OF_AHUNE = 26239, + NPC_AHUNITE_HAILSTONE = 25755, + NPC_AHUNITE_COLDWAVE = 25756, + NPC_AHUNITE_FROSTWIND = 25757, + NPC_ICE_SPEAR_BUNNY = 25985, + GO_ICE_SPEAR = 188077, + + PHASE_GROUND = 1, + PHASE_SUBMERGED = 2, +}; + +/*###### +## boss_ahune +######*/ + +struct MANGOS_DLL_DECL boss_ahuneAI : public Scripted_NoMovementAI +{ + boss_ahuneAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) + { + m_bHasCombatStarted = false; + Reset(); + } + + bool m_bHasCombatStarted; + + uint8 m_uiPhase; + uint8 m_uiPhaseChangeCount; + uint32 m_uiPhaseChangeTimer; + + uint32 m_uiHailstoneTimer; + uint32 m_uiColdwaveTimer; + uint32 m_uiFrostwindTimer; + + ObjectGuid m_frozenCoreGuid; + + void Reset() override + { + m_uiPhase = PHASE_GROUND; + m_uiPhaseChangeTimer = 90000; + m_uiPhaseChangeCount = 0; + + m_uiHailstoneTimer = 1000; + m_uiColdwaveTimer = urand(5000, 10000); + m_uiFrostwindTimer = urand(20000, 25000); + } + + void Aggro(Unit* /*pWho*/) override + { + DoCastSpellIfCan(m_creature, SPELL_BIRTH); + DoCastSpellIfCan(m_creature, SPELL_AHUNES_SHIELD, CAST_TRIGGERED | CAST_AURA_NOT_PRESENT); + DoCastSpellIfCan(m_creature, SPELL_SPANKY_HANDS, CAST_TRIGGERED | CAST_AURA_NOT_PRESENT); + } + + void JustDied(Unit* /*pKiller*/) override + { + DoCastSpellIfCan(m_creature, SPELL_AHUNE_DIES_ACHIEV, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, m_creature->GetMap()->IsRegularDifficulty() ? SPELL_AHUNE_LOOT : SPELL_AHUNE_LOOT_H, CAST_TRIGGERED); + } + + void JustReachedHome() override + { + // Cleanup on evade is done by creature_linking + m_creature->ForcedDespawn(); + } + + void DamageTaken(Unit* pDoneBy, uint32& uiDamage) override + { + // it's not clear whether this should work like this or should be handled by the proc aura + if (Creature* pCore = m_creature->GetMap()->GetCreature(m_frozenCoreGuid)) + DoCastSpellIfCan(pCore, SPELL_SYNCH_HEALTH, CAST_TRIGGERED); + } + + void SpellHit(Unit* /*pSource*/, const SpellEntry* pSpell) override + { + if (pSpell->Id == SPELL_SUBMERGE) + { + // Note: the following spell breaks the visual. Needs to be fixed! + // DoCastSpellIfCan(m_creature, SPELL_AHUNE_SELF_STUN, CAST_TRIGGERED); + + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + + if (Creature* pCore = m_creature->GetMap()->GetCreature(m_frozenCoreGuid)) + pCore->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_OOC_NOT_ATTACKABLE); + } + } + + void JustSummoned(Creature* pSummoned) override + { + switch (pSummoned->GetEntry()) + { + case NPC_AHUNITE_HAILSTONE: + case NPC_AHUNITE_COLDWAVE: + case NPC_AHUNITE_FROSTWIND: + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + pSummoned->AI()->AttackStart(pTarget); + break; + case NPC_FROZEN_CORE: + m_frozenCoreGuid = pSummoned->GetObjectGuid(); + break; + } + } + + void SummonedCreatureJustDied(Creature* pSummoned) override + { + // When the core dies, commit suicide + if (pSummoned->GetEntry() == NPC_FROZEN_CORE) + DoCastSpellIfCan(m_creature, SPELL_SUICIDE, CAST_TRIGGERED); + } + + void UpdateAI(const uint32 uiDiff) override + { + // Attack on first update tick, in order to properly handle the spawn animation + if (!m_bHasCombatStarted) + { + if (m_creature->IsTemporarySummon()) + { + TemporarySummon* pTemporary = (TemporarySummon*)m_creature; + + if (Player* pSummoner = m_creature->GetMap()->GetPlayer(pTemporary->GetSummonerGuid())) + AttackStart(pSummoner); + } + + m_bHasCombatStarted = true; + } + + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_uiPhase == PHASE_GROUND) + { + // only once at the beginning of the phase + if (m_uiHailstoneTimer) + { + if (m_uiHailstoneTimer <= uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_SUMMON_HAILSTONE) == CAST_OK) + m_uiHailstoneTimer = 0; + } + else + m_uiHailstoneTimer -= uiDiff; + } + + if (m_uiColdwaveTimer < uiDiff) + { + for (uint8 i = 0; i < 2; ++i) + DoCastSpellIfCan(m_creature, SPELL_SUMMON_COLDWAVE); + + m_uiColdwaveTimer = urand(5000, 10000); + } + else + m_uiColdwaveTimer -= uiDiff; + + // starts only after the first phase change + if (m_uiPhaseChangeCount) + { + if (m_uiFrostwindTimer < uiDiff) + { + for (uint8 i = 0; i < m_uiPhaseChangeCount; ++i) + DoCastSpellIfCan(m_creature, SPELL_SUMMON_FROSTWIND); + + m_uiFrostwindTimer = urand(5000, 10000); + } + else + m_uiFrostwindTimer -= uiDiff; + } + + if (m_uiPhaseChangeTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_SUBMERGE) == CAST_OK) + { + m_uiPhaseChangeTimer = 40000; + m_uiPhase = PHASE_SUBMERGED; + ++m_uiPhaseChangeCount; + } + } + else + m_uiPhaseChangeTimer -= uiDiff; + + DoMeleeAttackIfReady(); + } + else if (m_uiPhase == PHASE_SUBMERGED) + { + if (m_uiPhaseChangeTimer < uiDiff) + { + m_creature->RemoveAurasDueToSpell(SPELL_SUBMERGE); + m_creature->RemoveAurasDueToSpell(SPELL_AHUNE_SELF_STUN); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + + DoCastSpellIfCan(m_creature, SPELL_BIRTH); + + if (Creature* pCore = m_creature->GetMap()->GetCreature(m_frozenCoreGuid)) + pCore->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_OOC_NOT_ATTACKABLE); + + m_uiPhase = PHASE_GROUND; + m_uiHailstoneTimer = 1000; + m_uiPhaseChangeTimer = 90000; + } + else + m_uiPhaseChangeTimer -= uiDiff; + } + } +}; + +CreatureAI* GetAI_boss_ahune(Creature* pCreature) +{ + return new boss_ahuneAI(pCreature); +} + +/*###### +## npc_frozen_core +######*/ + +struct MANGOS_DLL_DECL npc_frozen_coreAI : public Scripted_NoMovementAI +{ + npc_frozen_coreAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { Reset(); } + + ObjectGuid m_ahuheGuid; + + void Reset() override + { + if (m_creature->IsTemporarySummon()) + m_ahuheGuid = ((TemporarySummon*)m_creature)->GetSummonerGuid(); + + DoCastSpellIfCan(m_creature, SPELL_FROZEN_CORE_HIT, CAST_TRIGGERED | CAST_AURA_NOT_PRESENT); + DoCastSpellIfCan(m_creature, SPELL_ICE_SPEAR_AURA, CAST_TRIGGERED | CAST_AURA_NOT_PRESENT); + } + + void DamageTaken(Unit* pDoneBy, uint32& uiDamage) override + { + // it's not clear whether this should work like this or should be handled by the proc aura + if (Creature* pAhune = m_creature->GetMap()->GetCreature(m_ahuheGuid)) + DoCastSpellIfCan(pAhune, SPELL_SYNCH_HEALTH, CAST_TRIGGERED);; + } + + void JustSummoned(Creature* pSummoned) override + { + if (pSummoned->GetEntry() == NPC_ICE_SPEAR_BUNNY) + { + pSummoned->CastSpell(pSummoned, SPELL_ICE_SPEAR_VISUAL, true); + pSummoned->CastSpell(pSummoned, SPELL_SUMMON_ICE_SPEAR_GO, true); + pSummoned->CastSpell(pSummoned, SPELL_ICE_SPEAR_DELAY, true); + } + } + + void AttackStart(Unit* /*pWho*/) override { } + void MoveInLineOfSight(Unit* /*pWho*/) override { } + void UpdateAI(const uint32 /*uiDiff*/) override { } +}; + +CreatureAI* GetAI_npc_frozen_core(Creature* pCreature) +{ + return new npc_frozen_coreAI(pCreature); +} + +/*###### +## npc_ice_spear_bunny +######*/ + +struct MANGOS_DLL_DECL npc_ice_spear_bunnyAI : public Scripted_NoMovementAI +{ + npc_ice_spear_bunnyAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { Reset(); } + + ObjectGuid m_iceSpearGuid; + + uint8 m_uiEventCount; + + void Reset() override + { + m_uiEventCount = 0; + } + + void JustSummoned(GameObject* pGo) override + { + if (pGo->GetEntry() == GO_ICE_SPEAR) + m_iceSpearGuid = pGo->GetObjectGuid(); + } + + void ReceiveAIEvent(AIEventType eventType, Creature* /*pSender*/, Unit* /*pInvoker*/, uint32 /*uiMiscValue*/) override + { + if (eventType == AI_EVENT_CUSTOM_A) + { + ++m_uiEventCount; + + // Knockback at 4 aura stacks (2 seconds) + if (m_uiEventCount == 4) + { + DoCastSpellIfCan(m_creature, SPELL_ICE_SPEAR_KNOCKBACK); + + if (GameObject* pSpear = m_creature->GetMap()->GetGameObject(m_iceSpearGuid)) + pSpear->Use(m_creature); + } + // Cleanup at 10 aura stacks (5 seconds) + else if (m_uiEventCount == 10) + { + if (GameObject* pSpear = m_creature->GetMap()->GetGameObject(m_iceSpearGuid)) + pSpear->SetLootState(GO_JUST_DEACTIVATED); + + m_creature->ForcedDespawn(); + } + } + } + + void AttackStart(Unit* /*pWho*/) override { } + void MoveInLineOfSight(Unit* /*pWho*/) override { } + void UpdateAI(const uint32 /*uiDiff*/) override { } +}; + +CreatureAI* GetAI_npc_ice_spear_bunny(Creature* pCreature) +{ + return new npc_ice_spear_bunnyAI(pCreature); +} + +bool EffectDummyCreature_npc_ice_spear_bunny(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) +{ + // always check spellid and effectindex + if (uiSpellId == SPELL_ICE_SPEAR_DELAY && uiEffIndex == EFFECT_INDEX_0) + { + if (pCreatureTarget->GetEntry() == NPC_ICE_SPEAR_BUNNY) + pCreatureTarget->AI()->SendAIEvent(AI_EVENT_CUSTOM_A, pCaster, pCreatureTarget); + + // always return true when we are handling this spell and effect + return true; + } + + return false; +} void AddSC_boss_ahune() { + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_ahune"; + pNewScript->GetAI = &GetAI_boss_ahune; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_frozen_core"; + pNewScript->GetAI = &GetAI_npc_frozen_core; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_ice_spear_bunny"; + pNewScript->GetAI = &GetAI_npc_ice_spear_bunny; + pNewScript->pEffectDummyNPC = &EffectDummyCreature_npc_ice_spear_bunny; + pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 8e06edbde..42bb50b67 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2895" + #define SD2_REVISION_NR "2896" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 1ad18d429..96700845e 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -415,6 +415,9 @@ UPDATE creature_template SET ScriptName='npc_time_rift' WHERE entry=17838; /* */ /* THE SLAVE PENS */ +UPDATE creature_template SET ScriptName='boss_ahune' WHERE entry=25740; +UPDATE creature_template SET ScriptName='npc_frozen_core' WHERE entry=25865; +UPDATE creature_template SET ScriptName='npc_ice_spear_bunny' WHERE entry=25985; /* THE UNDERBOG */ UPDATE creature_template SET ScriptName='mob_underbog_mushroom' WHERE entry=17990; diff --git a/sql/updates/r2896_mangos.sql b/sql/updates/r2896_mangos.sql new file mode 100644 index 000000000..b23ef47b7 --- /dev/null +++ b/sql/updates/r2896_mangos.sql @@ -0,0 +1,3 @@ +UPDATE creature_template SET ScriptName='boss_ahune' WHERE entry=25740; +UPDATE creature_template SET ScriptName='npc_frozen_core' WHERE entry=25865; +UPDATE creature_template SET ScriptName='npc_ice_spear_bunny' WHERE entry=25985; From 22a8a251dc23d32b755a7a32324c4748f3e0f85d Mon Sep 17 00:00:00 2001 From: Xfurry Date: Fri, 17 May 2013 23:57:58 +0300 Subject: [PATCH 0902/1172] Add some minor improvements to Zul'jin This fixes some of the issues posted on #61 --- scripts/eastern_kingdoms/zulaman/boss_zuljin.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/eastern_kingdoms/zulaman/boss_zuljin.cpp b/scripts/eastern_kingdoms/zulaman/boss_zuljin.cpp index 4c47183fd..69412dc5e 100644 --- a/scripts/eastern_kingdoms/zulaman/boss_zuljin.cpp +++ b/scripts/eastern_kingdoms/zulaman/boss_zuljin.cpp @@ -220,7 +220,7 @@ struct MANGOS_DLL_DECL boss_zuljinAI : public ScriptedAI void MoveInLineOfSight(Unit* pWho) override { - if (!m_bHasTaunted && m_creature->IsWithinDistInMap(pWho, 60.0f)) + if (!m_bHasTaunted && pWho->GetTypeId() == TYPEID_PLAYER && m_creature->IsWithinDistInMap(pWho, 60.0f)) { DoScriptText(SAY_INTRO, m_creature); m_bHasTaunted = true; @@ -229,6 +229,7 @@ struct MANGOS_DLL_DECL boss_zuljinAI : public ScriptedAI ScriptedAI::MoveInLineOfSight(pWho); } + // Function to handle the Feather Vortexes despawn on phase change void DoDespawnVortexes() { for (GuidList::const_iterator itr = m_lSummonsList.begin(); itr != m_lSummonsList.end(); ++itr) @@ -277,7 +278,7 @@ struct MANGOS_DLL_DECL boss_zuljinAI : public ScriptedAI { if (pSpell->Id == SPELL_SPIRIT_DRAIN) { - DoCastSpellIfCan(m_creature, aZuljinPhases[m_uiPhase].uiSpiritSpellId); + DoCastSpellIfCan(m_creature, aZuljinPhases[m_uiPhase].uiSpiritSpellId, CAST_INTERRUPT_PREVIOUS); DoScriptText(aZuljinPhases[m_uiPhase].iYellId, m_creature); DoScriptText(aZuljinPhases[m_uiPhase].iEmoteId, m_creature); From 3fc6a9a057548c63a234c715cb81adaf0505e05b Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sat, 18 May 2013 11:39:51 +0300 Subject: [PATCH 0903/1172] [2897] Add script support for quest 10540 Thanks to grz3s for providing the necessary data --- scripts/outland/shadowmoon_valley.cpp | 44 ++++++++++++++++++++++++++- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 + sql/scriptdev2_script_full.sql | 2 +- sql/updates/r2897_mangos.sql | 1 + sql/updates/r2897_scriptdev2.sql | 3 ++ 6 files changed, 50 insertions(+), 3 deletions(-) create mode 100644 sql/updates/r2897_mangos.sql create mode 100644 sql/updates/r2897_scriptdev2.sql diff --git a/scripts/outland/shadowmoon_valley.cpp b/scripts/outland/shadowmoon_valley.cpp index 3885ce18b..81629ece4 100644 --- a/scripts/outland/shadowmoon_valley.cpp +++ b/scripts/outland/shadowmoon_valley.cpp @@ -17,7 +17,7 @@ /* ScriptData SDName: Shadowmoon_Valley SD%Complete: 100 -SDComment: Quest support: 11020, 10458, 10480, 10481, 10514, 10588, 10781, 10804, 10854. +SDComment: Quest support: 11020, 10458, 10480, 10481, 10514, 10540, 10588, 10781, 10804, 10854. SDCategory: Shadowmoon Valley EndScriptData */ @@ -1796,6 +1796,43 @@ bool EffectDummyCreature_npc_shadowmoon_tuber_node(Unit* pCaster, uint32 uiSpell return false; } +/*###### +## npc_veneratus_spawn_node +######*/ + +enum +{ + SAY_VENERATUS_SPAWN = -1000579, + + NPC_VENERATUS = 20427, + NPC_SPIRIT_HUNTER = 21332, +}; + +struct MANGOS_DLL_DECL npc_veneratus_spawn_nodeAI : public Scripted_NoMovementAI +{ + npc_veneratus_spawn_nodeAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { Reset(); } + + void Reset() override { } + + void MoveInLineOfSight(Unit* pWho) override + { + // Check for the spirit hunter in order to spawn Veneratus; this will replace missing spells 36614 (dummy periodic spell) and 36616 (summon spell) + if (pWho->GetEntry() == NPC_SPIRIT_HUNTER && m_creature->IsWithinDistInMap(pWho, 40.0f) && m_creature->IsWithinLOSInMap(pWho)) + { + DoScriptText(SAY_VENERATUS_SPAWN, pWho); + DoSpawnCreature(NPC_VENERATUS, 0, 0, 0, 0, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 60000); + m_creature->ForcedDespawn(); + } + } + + void UpdateAI(const uint32 uiDiff) override { } +}; + +CreatureAI* GetAI_npc_veneratus_spawn_node(Creature* pCreature) +{ + return new npc_veneratus_spawn_nodeAI(pCreature); +} + void AddSC_shadowmoon_valley() { Script* pNewScript; @@ -1865,4 +1902,9 @@ void AddSC_shadowmoon_valley() pNewScript->Name = "npc_shadowmoon_tuber_node"; pNewScript->pEffectDummyNPC = &EffectDummyCreature_npc_shadowmoon_tuber_node; pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_veneratus_spawn_node"; + pNewScript->GetAI = &GetAI_npc_veneratus_spawn_node; + pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 42bb50b67..2370f707c 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2896" + #define SD2_REVISION_NR "2897" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 96700845e..697452181 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -1008,6 +1008,7 @@ UPDATE gameobject_template SET ScriptName='go_crystal_prison' WHERE entry=185126 UPDATE creature_template SET ScriptName='npc_spawned_oronok_tornheart' WHERE entry=21685; UPDATE creature_template SET ScriptName='npc_domesticated_felboar' WHERE entry=21195; UPDATE creature_template SET ScriptName='npc_shadowmoon_tuber_node' WHERE entry=21347; +UPDATE creature_template SET ScriptName='npc_veneratus_spawn_node' WHERE entry=21334; /* SHATTRATH */ UPDATE creature_template SET ScriptName='npc_dirty_larry' WHERE entry=19720; diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 728adc4be..aced9726b 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -606,7 +606,7 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1000577,'This is far enough. I can make it on my own from here.',0,0,0,0,'Lurgglbr - SAY_END_1'), (-1000578,'Thank you for helping me $r. Please tell the king I am back.',0,0,0,0,'Lurgglbr - SAY_END_2'), -(-1000579,'REUSE ME',0,0,0,0,'REUSE ME'), +(-1000579,'There! Destroy him! The Cipher must be recovered!',0,0,0,25,'spirit hunter - SAY_VENERATUS_SPAWN'), (-1000580,'Sleep now, young one ...',0,0,0,0,'Raelorasz SAY_SLEEP'), (-1000581,'A wonderful specimen.',0,0,0,0,'Raeloarsz SAY_SPECIMEN'), diff --git a/sql/updates/r2897_mangos.sql b/sql/updates/r2897_mangos.sql new file mode 100644 index 000000000..dd8d03be3 --- /dev/null +++ b/sql/updates/r2897_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_veneratus_spawn_node' WHERE entry=21334; diff --git a/sql/updates/r2897_scriptdev2.sql b/sql/updates/r2897_scriptdev2.sql new file mode 100644 index 000000000..064ea9970 --- /dev/null +++ b/sql/updates/r2897_scriptdev2.sql @@ -0,0 +1,3 @@ +DELETE FROM script_texts WHERE entry IN (-1000579); +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1000579,'There! Destroy him! The Cipher must be recovered!',0,0,0,25,'spirit hunter - SAY_VENERATUS_SPAWN'); From db7abfc25ecfbd677fdb173913fff583469e02d6 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Tue, 21 May 2013 01:26:25 +0300 Subject: [PATCH 0904/1172] [2898] Add script support for quests 10512 and 10545 Please note that this script has a lot of guesswork, and some information used to build it may not be accurate. Also close #62 --- scripts/outland/blades_edge_mountains.cpp | 154 +++++++++++++++++----- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 2 +- sql/scriptdev2_script_full.sql | 9 +- sql/updates/r2898_mangos.sql | 2 + sql/updates/r2898_scriptdev2.sql | 5 + 6 files changed, 135 insertions(+), 39 deletions(-) create mode 100644 sql/updates/r2898_mangos.sql create mode 100644 sql/updates/r2898_scriptdev2.sql diff --git a/scripts/outland/blades_edge_mountains.cpp b/scripts/outland/blades_edge_mountains.cpp index 9fd06bdf8..ed4733043 100644 --- a/scripts/outland/blades_edge_mountains.cpp +++ b/scripts/outland/blades_edge_mountains.cpp @@ -17,42 +17,18 @@ /* ScriptData SDName: Blades_Edge_Mountains SD%Complete: 90 -SDComment: Quest support: 10503, 10504, 10556, 10609. (npc_daranelle needs bit more work before consider complete) +SDComment: Quest support: 10503, 10504, 10512, 10545, 10556, 10609. (npc_daranelle needs bit more work before consider complete) SDCategory: Blade's Edge Mountains EndScriptData */ /* ContentData -mobs_bladespire_ogre mobs_nether_drake npc_daranelle +npc_bloodmaul_stout_trigger EndContentData */ #include "precompiled.h" - -/*###### -## mobs_bladespire_ogre -######*/ - -// TODO: add support for quest 10512 + creature abilities -struct MANGOS_DLL_DECL mobs_bladespire_ogreAI : public ScriptedAI -{ - mobs_bladespire_ogreAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} - - void Reset() override { } - - void UpdateAI(const uint32 /*uiDiff*/) override - { - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - DoMeleeAttackIfReady(); - } -}; - -CreatureAI* GetAI_mobs_bladespire_ogre(Creature* pCreature) -{ - return new mobs_bladespire_ogreAI(pCreature); -} +#include "TemporarySummon.h" /*###### ## mobs_nether_drake @@ -275,18 +251,125 @@ CreatureAI* GetAI_npc_daranelle(Creature* pCreature) } /*###### -## AddSC +## npc_bloodmaul_stout_trigger ######*/ +enum +{ + SAY_BREW_1 = -1000156, + SAY_BREW_2 = -1000207, + SAY_BREW_3 = -1000208, + + SPELL_INTOXICATION = 35240, + SPELL_INTOXICATION_VISUAL = 35777, +}; + +static const uint32 aOgreEntries[] = {19995, 19998, 20334, 20723, 20726, 20730, 20731, 20732, 21296}; + +struct MANGOS_DLL_DECL npc_bloodmaul_stout_triggerAI : public ScriptedAI +{ + npc_bloodmaul_stout_triggerAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } + + uint32 m_uiStartTimer; + bool m_bHasValidOgre; + + ObjectGuid m_selectedOgreGuid; + + void Reset() override + { + m_uiStartTimer = 1000; + m_bHasValidOgre = false; + } + + void MoveInLineOfSight(Unit* pWho) override + { + if (m_bHasValidOgre && pWho->GetObjectGuid() == m_selectedOgreGuid && m_creature->IsWithinDistInMap(pWho, 3.5f)) + { + // This part it's not 100% accurate - most of it is guesswork + // Some animations or spells may be missing + pWho->CastSpell(pWho, SPELL_INTOXICATION_VISUAL, true); + pWho->CastSpell(pWho, SPELL_INTOXICATION, true); + + // Handle evade after some time with EAI + m_creature->AI()->SendAIEvent(AI_EVENT_CUSTOM_EVENTAI_A, m_creature, (Creature*)pWho); + + // Give kill credit to the summoner player + if (m_creature->IsTemporarySummon()) + { + TemporarySummon* pTemporary = (TemporarySummon*)m_creature; + + if (Player* pSummoner = m_creature->GetMap()->GetPlayer(pTemporary->GetSummonerGuid())) + pSummoner->KilledMonsterCredit(m_creature->GetEntry(), m_creature->GetObjectGuid()); + } + + m_bHasValidOgre = false; + } + } + + void UpdateAI(const uint32 uiDiff) override + { + if (m_uiStartTimer) + { + if (m_uiStartTimer <= uiDiff) + { + // get all the ogres in range + std::list lOgreList; + for (uint8 i = 0; i < countof(aOgreEntries); ++i) + GetCreatureListWithEntryInGrid(lOgreList, m_creature, aOgreEntries[i], 30.0f); + + if (lOgreList.empty()) + { + m_uiStartTimer = 1000; + return; + } + + // sort by distance and get only the closest + lOgreList.sort(ObjectDistanceOrder(m_creature)); + + std::list::iterator ogreItr = lOgreList.begin(); + Creature* pOgre = NULL; + + do + { + if ((*ogreItr)->isAlive() && !(*ogreItr)->HasAura(SPELL_INTOXICATION)) + pOgre = *ogreItr; + + ++ogreItr; + } + while (!pOgre && ogreItr != lOgreList.end()); + + // Move ogre to the point + float fX, fY, fZ; + pOgre->GetMotionMaster()->MoveIdle(); + m_creature->GetContactPoint(pOgre, fX, fY, fZ); + pOgre->GetMotionMaster()->MovePoint(0, fX, fY, fZ); + + switch (urand(0, 2)) + { + case 0: DoScriptText(SAY_BREW_1, pOgre); break; + case 1: DoScriptText(SAY_BREW_2, pOgre); break; + case 2: DoScriptText(SAY_BREW_3, pOgre); break; + } + + m_selectedOgreGuid = pOgre->GetObjectGuid(); + m_uiStartTimer = 0; + m_bHasValidOgre = true; + } + else + m_uiStartTimer -= uiDiff; + } + } +}; + +CreatureAI* GetAI_npc_bloodmaul_stout_trigger(Creature* pCreature) +{ + return new npc_bloodmaul_stout_triggerAI(pCreature); +} + void AddSC_blades_edge_mountains() { Script* pNewScript; - pNewScript = new Script; - pNewScript->Name = "mobs_bladespire_ogre"; - pNewScript->GetAI = &GetAI_mobs_bladespire_ogre; - pNewScript->RegisterSelf(); - pNewScript = new Script; pNewScript->Name = "mobs_nether_drake"; pNewScript->GetAI = &GetAI_mobs_nether_drake; @@ -296,4 +379,9 @@ void AddSC_blades_edge_mountains() pNewScript->Name = "npc_daranelle"; pNewScript->GetAI = &GetAI_npc_daranelle; pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_bloodmaul_stout_trigger"; + pNewScript->GetAI = &GetAI_npc_bloodmaul_stout_trigger; + pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 2370f707c..ce5fab440 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2897" + #define SD2_REVISION_NR "2898" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 697452181..871c2b3ad 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -355,9 +355,9 @@ UPDATE creature_template SET ScriptName='boss_victor_nefarius' WHERE entry=10162 UPDATE creature_template SET ScriptName='boss_nefarian' WHERE entry=11583; /* BLADE'S EDGE MOUNTAINS */ -UPDATE creature_template SET ScriptName='mobs_bladespire_ogre' WHERE entry IN (19998,20334,21296,21975); UPDATE creature_template SET ScriptName='mobs_nether_drake' WHERE entry IN (20021,21817,21820,21821,21823); UPDATE creature_template SET ScriptName='npc_daranelle' WHERE entry=21469; +UPDATE creature_template SET ScriptName='npc_bloodmaul_stout_trigger' WHERE entry=21241; /* BLASTED LANDS */ UPDATE creature_template SET ScriptName='npc_fallen_hero_of_horde' WHERE entry=7572; diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index aced9726b..a5a3a5efa 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -107,7 +107,9 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1000153,'Contemptible wretch!',11338,1,0,0,'kazzak SAY_KILL2'), (-1000154,'The universe will be remade.',11339,1,0,0,'kazzak SAY_KILL3'), (-1000155,'The Legion... will never... fall.',11340,1,0,0,'kazzak SAY_DEATH'), -(-1000156,'REUSE ME',0,0,0,0,'REUSE ME'), + +(-1000156,'Bloodmaul Brew? Me favorite!',0,0,0,0,'bladespire ogre SAY_BREW_1'), + (-1000157,'Invaders, you dangle upon the precipice of oblivion! The Burning Legion comes and with it comes your end.',0,1,0,0,'kazzak SAY_RAND1'), (-1000158,'Impudent whelps, you only delay the inevitable. Where one has fallen, ten shall rise. Such is the will of Kazzak...',0,1,0,0,'kazzak SAY_RAND2'), @@ -176,9 +178,8 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1000205,'%s looks at you unexpectadly.',0,2,0,0,'cluck EMOTE_H_HELLO'), (-1000206,'%s starts pecking at the feed.',0,2,0,0,'cluck EMOTE_CLUCK_TEXT2'), -(-1000207,'REUSE ME',0,0,0,0,'REUSE ME'), - -(-1000208,'REUSE ME',0,0,0,0,'REUSE ME'), +(-1000207,'Mmm. Me thirsty!',0,0,0,0,'bladespire ogre SAY_BREW_2'), +(-1000208,'Ohh, look! Bloodmaul Brew! Mmmm...',0,0,0,0,'bladespire ogre SAY_BREW_3'), (-1000209,'Very well. Let\'s see what you have to show me, $N.',0,0,1,0,'anvilward SAY_ANVIL1'), (-1000210,'What manner of trick is this, $R? If you seek to ambush me, I warn you I will not go down quietly!',0,0,1,0,'anvilward SAY_ANVIL2'), diff --git a/sql/updates/r2898_mangos.sql b/sql/updates/r2898_mangos.sql new file mode 100644 index 000000000..78684f24a --- /dev/null +++ b/sql/updates/r2898_mangos.sql @@ -0,0 +1,2 @@ +UPDATE creature_template SET ScriptName='' WHERE entry IN (19998,20334,21296,21975); +UPDATE creature_template SET ScriptName='npc_bloodmaul_stout_trigger' WHERE entry=21241; diff --git a/sql/updates/r2898_scriptdev2.sql b/sql/updates/r2898_scriptdev2.sql new file mode 100644 index 000000000..078ea407d --- /dev/null +++ b/sql/updates/r2898_scriptdev2.sql @@ -0,0 +1,5 @@ +DELETE FROM script_texts WHERE entry IN (-1000156, -1000207, -1000208); +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1000156,'Bloodmaul Brew? Me favorite!',0,0,0,0,'bladespire ogre SAY_BREW_1'), +(-1000207,'Mmm. Me thirsty!',0,0,0,0,'bladespire ogre SAY_BREW_2'), +(-1000208,'Ohh, look! Bloodmaul Brew! Mmmm...',0,0,0,0,'bladespire ogre SAY_BREW_3'); From 96ad6a8f46ae1cae18f37ec0f49357a24d162ff7 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Tue, 21 May 2013 00:35:21 +0200 Subject: [PATCH 0905/1172] Add safety for some possible glitch --- scripts/outland/blades_edge_mountains.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/scripts/outland/blades_edge_mountains.cpp b/scripts/outland/blades_edge_mountains.cpp index ed4733043..49a264f05 100644 --- a/scripts/outland/blades_edge_mountains.cpp +++ b/scripts/outland/blades_edge_mountains.cpp @@ -319,14 +319,14 @@ struct MANGOS_DLL_DECL npc_bloodmaul_stout_triggerAI : public ScriptedAI if (lOgreList.empty()) { - m_uiStartTimer = 1000; + m_uiStartTimer = 5000; return; } // sort by distance and get only the closest lOgreList.sort(ObjectDistanceOrder(m_creature)); - std::list::iterator ogreItr = lOgreList.begin(); + std::list::const_iterator ogreItr = lOgreList.begin(); Creature* pOgre = NULL; do @@ -338,6 +338,12 @@ struct MANGOS_DLL_DECL npc_bloodmaul_stout_triggerAI : public ScriptedAI } while (!pOgre && ogreItr != lOgreList.end()); + if (!pOgre) + { + m_uiStartTimer = 5000; + return; + } + // Move ogre to the point float fX, fY, fZ; pOgre->GetMotionMaster()->MoveIdle(); From a0e256a28cb7b8a4a70f553ff5ccb19bf5a03e17 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Thu, 23 May 2013 11:23:45 +0300 Subject: [PATCH 0906/1172] [2899] Implement flight phase for Felmyst - Sunwell Plateau --- .../sunwell_plateau/boss_felmyst.cpp | 354 +++++++++++++++--- .../instance_sunwell_plateau.cpp | 70 +++- .../sunwell_plateau/sunwell_plateau.h | 9 +- scripts/outland/shadowmoon_valley.cpp | 1 + sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 + sql/scriptdev2_script_full.sql | 4 +- sql/updates/r2899_mangos.sql | 1 + sql/updates/r2899_scriptdev2.sql | 3 + 9 files changed, 388 insertions(+), 57 deletions(-) create mode 100644 sql/updates/r2899_mangos.sql create mode 100644 sql/updates/r2899_scriptdev2.sql diff --git a/scripts/eastern_kingdoms/sunwell_plateau/boss_felmyst.cpp b/scripts/eastern_kingdoms/sunwell_plateau/boss_felmyst.cpp index 965029a17..cf6cab27a 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/boss_felmyst.cpp +++ b/scripts/eastern_kingdoms/sunwell_plateau/boss_felmyst.cpp @@ -16,13 +16,14 @@ /* ScriptData SDName: boss_felmyst -SD%Complete: 50% -SDComment: Only ground phase spells +SD%Complete: 90% +SDComment: Intro movement NYI; Event cleanup (despawn & resummon) NYI; Breath phase spells could use some improvements. SDCategory: Sunwell Plateau EndScriptData */ #include "precompiled.h" #include "sunwell_plateau.h" +#include "TemporarySummon.h" enum { @@ -33,9 +34,11 @@ enum SAY_TAKEOFF = -1580040, SAY_BREATH = -1580039, SAY_BERSERK = -1580041, + EMOTE_DEEP_BREATH = -1580107, SPELL_FELBLAZE_VISUAL = 45068, // Visual transform aura SPELL_NOXIOUS_FUMES = 47002, + SPELL_SOUL_SEVER = 45918, // kills all charmed targets at wipe - script effect for 45917 SPELL_BERSERK = 26662, // ground phase @@ -46,36 +49,50 @@ enum SPELL_ENCAPSULATE_CHANNEL = 45661, // flight phase - SPELL_DEMONIC_VAPOR = 45399, - SPELL_VAPOR_BEAM_VISUAL = 45389, - SPELL_FOG_CORRUPTION = 45582, - SPELL_SOUL_SEVER = 45918, // kills all charmed targets at wipe - script effect for 45917 SPELL_SUMMON_VAPOR = 45391, - SPELL_SUMMON_VAPOR_TRIAL = 45410, - SPELL_SUMMON_BLAZING_DEAD = 45400, + SPELL_VAPOR_SPAWN_TRIGGER = 45388, + SPELL_SPEED_BURST = 45495, // spell needs to be confirmed + SPELL_FOG_CORRUPTION = 45582, + + // demonic vapor spells + SPELL_DEMONIC_VAPOR_PER = 45411, + SPELL_DEMONIC_VAPOR = 45399, + // SPELL_SUMMON_BLAZING_DEAD = 45400, // npcs - NPC_UNYELDING_DEAD = 25268, // spawned during flight phase - NPC_DEMONIC_VAPOR = 25265, + // NPC_UNYELDING_DEAD = 25268, // spawned during flight phase + NPC_DEMONIC_VAPOR = 25265, // npc which follows the player NPC_DEMONIC_VAPOR_TRAIL = 25267, // phases PHASE_GROUND = 1, PHASE_AIR = 2, + PHASE_TRANSITION = 3, + + // subphases for air phase + SUBPHASE_VAPOR = 4, + SUBPHASE_BREATH_PREPARE = 5, + SUBPHASE_BREATH_MOVE = 6, }; +/*###### +## boss_felmyst +######*/ + struct MANGOS_DLL_DECL boss_felmystAI : public ScriptedAI { boss_felmystAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (instance_sunwell_plateau*)pCreature->GetInstanceData(); m_bHasTransformed = false; + m_uiMovementTimer = 2000; Reset(); } instance_sunwell_plateau* m_pInstance; bool m_bHasTransformed; + uint32 m_uiMovementTimer; uint8 m_uiPhase; uint32 m_uiBerserkTimer; @@ -87,6 +104,16 @@ struct MANGOS_DLL_DECL boss_felmystAI : public ScriptedAI uint32 m_uiEncapsulateTimer; uint32 m_uiGasNovaTimer; + // Air Phase timers + uint8 m_uiSubPhase; + bool m_bIsLeftSide; + + uint8 m_uiDemonicVaporCount; + uint8 m_uiCorruptionCount; + uint8 m_uiCorruptionIndex; + uint32 m_uiDemonicVaporTimer; + uint32 m_uiCorruptionTimer; + void Reset() override { // Transform into Felmyst dragon @@ -101,6 +128,14 @@ struct MANGOS_DLL_DECL boss_felmystAI : public ScriptedAI m_uiGasNovaTimer = 17000; m_uiEncapsulateTimer = urand(30000, 40000); m_uiFlyPhaseTimer = 60000; // flight phase after 1 min + + // Air phase + m_uiSubPhase = SUBPHASE_VAPOR; + m_uiDemonicVaporCount = 0; + m_uiDemonicVaporTimer = 1000; + m_uiCorruptionTimer = 0; + + SetCombatMovement(false); } void MoveInLineOfSight(Unit* pWho) override @@ -126,20 +161,32 @@ struct MANGOS_DLL_DECL boss_felmystAI : public ScriptedAI // Add the visual aura back when evading - workaround because there is no way to remove only the negative auras DoCastSpellIfCan(m_creature, SPELL_FELBLAZE_VISUAL, CAST_TRIGGERED); + // Also make sure that the charmed targets are killed + DoCastSpellIfCan(m_creature, SPELL_SOUL_SEVER, CAST_TRIGGERED); + + // Fly back to the home flight location if (m_creature->isAlive()) - m_creature->GetMotionMaster()->MoveTargetedHome(); + { + float fX, fY, fZ; + m_creature->SetLevitate(true); + m_creature->GetRespawnCoord(fX, fY, fZ); + m_creature->GetMotionMaster()->MovePoint(PHASE_GROUND, fX, fY, 50.083f, false); + } m_creature->SetLootRecipient(NULL); Reset(); } - void Aggro(Unit* /*pWho*/) override + void Aggro(Unit* pWho) override { DoCastSpellIfCan(m_creature, SPELL_NOXIOUS_FUMES); if (m_pInstance) m_pInstance->SetData(TYPE_FELMYST, IN_PROGRESS); + + float fGroundZ = m_creature->GetMap()->GetHeight(m_creature->GetPhaseMask(), m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ()); + m_creature->GetMotionMaster()->MovePoint(PHASE_TRANSITION, pWho->GetPositionX(), pWho->GetPositionY(), fGroundZ, false); } void KilledUnit(Unit* /*pVictim*/) override @@ -161,6 +208,84 @@ struct MANGOS_DLL_DECL boss_felmystAI : public ScriptedAI m_pInstance->SetData(TYPE_FELMYST, FAIL); } + void JustSummoned(Creature* pSummoned) override + { + if (pSummoned->GetEntry() == NPC_DEMONIC_VAPOR) + { + pSummoned->CastSpell(pSummoned, SPELL_VAPOR_SPAWN_TRIGGER, true); + pSummoned->CastSpell(pSummoned, SPELL_DEMONIC_VAPOR_PER, true); + } + } + + void MovementInform(uint32 uiMoveType, uint32 uiPointId) override + { + if (uiMoveType != POINT_MOTION_TYPE) + return; + + switch (uiPointId) + { + case PHASE_GROUND: + m_creature->SetWalk(false); + // ToDo: start WP movement here. Currently disabled because of some MMaps issues + // m_creature->GetMotionMaster()->MoveWaypoint(); + break; + case PHASE_AIR: + // switch from ground transition to flight phase + m_uiPhase = PHASE_AIR; + break; + case SUBPHASE_VAPOR: + // After the third breath land and resume phase 1 + if (m_uiCorruptionCount == 3) + { + m_uiPhase = PHASE_TRANSITION; + float fGroundZ = m_creature->GetMap()->GetHeight(m_creature->GetPhaseMask(), m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ()); + m_creature->GetMotionMaster()->MovePoint(PHASE_TRANSITION, m_creature->getVictim()->GetPositionX(), m_creature->getVictim()->GetPositionY(), fGroundZ, false); + return; + } + + // prepare to move to flight trigger + ++m_uiCorruptionCount; + m_uiCorruptionTimer = 5000; + m_uiSubPhase = SUBPHASE_BREATH_PREPARE; + break; + case SUBPHASE_BREATH_PREPARE: + // move across the arena + if (!m_pInstance) + return; + + // Fly to the other side, casting the breath. Keep the same trigger index + if (Creature* pTrigger = m_creature->GetMap()->GetCreature(m_pInstance->SelectFelmystFlightTrigger(!m_bIsLeftSide, m_uiCorruptionIndex))) + { + DoScriptText(EMOTE_DEEP_BREATH, m_creature); + DoCastSpellIfCan(m_creature, SPELL_SPEED_BURST, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_FOG_CORRUPTION, CAST_TRIGGERED); + m_creature->GetMotionMaster()->MovePoint(SUBPHASE_BREATH_MOVE, pTrigger->GetPositionX(), pTrigger->GetPositionY(), pTrigger->GetPositionZ(), false); + } + break; + case SUBPHASE_BREATH_MOVE: + if (!m_pInstance) + return; + + // remove speed aura + m_creature->RemoveAurasDueToSpell(SPELL_SPEED_BURST); + + // Get to the flight trigger on the same side of the arena + if (Creature* pTrigger = m_pInstance->GetSingleCreatureFromStorage(!m_bIsLeftSide ? NPC_FLIGHT_TRIGGER_LEFT : NPC_FLIGHT_TRIGGER_RIGHT)) + m_creature->GetMotionMaster()->MovePoint(SUBPHASE_VAPOR, pTrigger->GetPositionX(), pTrigger->GetPositionY(), pTrigger->GetPositionZ(), false); + + // switch sides + m_bIsLeftSide = !m_bIsLeftSide; + break; + case PHASE_TRANSITION: + // switch back to ground combat from flight transition + m_uiPhase = PHASE_GROUND; + SetCombatMovement(true); + m_creature->SetLevitate(false); + DoStartMovement(m_creature->getVictim()); + break; + } + } + void SpellHitTarget(Unit* pTarget, const SpellEntry* pSpell) override { if (pTarget->GetTypeId() == TYPEID_PLAYER && pSpell->Id == SPELL_ENCAPSULATE_CHANNEL) @@ -169,6 +294,18 @@ struct MANGOS_DLL_DECL boss_felmystAI : public ScriptedAI void UpdateAI(const uint32 uiDiff) override { + if (m_uiMovementTimer) + { + if (m_uiMovementTimer <= uiDiff) + { + m_creature->SetLevitate(true); + m_creature->GetMotionMaster()->MovePoint(PHASE_GROUND, m_creature->GetPositionX(), m_creature->GetPositionY(), 50.083f, false); + m_uiMovementTimer = 0; + } + else + m_uiMovementTimer -= uiDiff; + } + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -186,46 +323,134 @@ struct MANGOS_DLL_DECL boss_felmystAI : public ScriptedAI m_uiBerserkTimer -= uiDiff; } - if (m_uiPhase == PHASE_GROUND) + switch (m_uiPhase) { - if (m_uiCleaveTimer < uiDiff) - { - if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_CLEAVE) == CAST_OK) - m_uiCleaveTimer = urand(2000, 5000); - } - else - m_uiCleaveTimer -= uiDiff; + case PHASE_GROUND: - if (m_uiCorrosionTimer < uiDiff) - { - if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_CORROSION) == CAST_OK) - m_uiCorrosionTimer = 30000; - } - else - m_uiCorrosionTimer -= uiDiff; + if (m_uiCleaveTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_CLEAVE) == CAST_OK) + m_uiCleaveTimer = urand(2000, 5000); + } + else + m_uiCleaveTimer -= uiDiff; - if (m_uiGasNovaTimer < uiDiff) - { - if (DoCastSpellIfCan(m_creature, SPELL_GAS_NOVA) == CAST_OK) - m_uiGasNovaTimer = 23000; - } - else - m_uiGasNovaTimer -= uiDiff; + if (m_uiCorrosionTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_CORROSION) == CAST_OK) + { + DoScriptText(SAY_BREATH, m_creature); + m_uiCorrosionTimer = 30000; + } + } + else + m_uiCorrosionTimer -= uiDiff; - if (m_uiEncapsulateTimer < uiDiff) - { - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + if (m_uiGasNovaTimer < uiDiff) { - if (DoCastSpellIfCan(pTarget, SPELL_ENCAPSULATE_CHANNEL) == CAST_OK) - m_uiEncapsulateTimer = urand(30000, 40000); + if (DoCastSpellIfCan(m_creature, SPELL_GAS_NOVA) == CAST_OK) + m_uiGasNovaTimer = 23000; } - } - else - m_uiEncapsulateTimer -= uiDiff; + else + m_uiGasNovaTimer -= uiDiff; + + if (m_uiEncapsulateTimer < uiDiff) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, SPELL_ENCAPSULATE_CHANNEL) == CAST_OK) + m_uiEncapsulateTimer = urand(30000, 40000); + } + } + else + m_uiEncapsulateTimer -= uiDiff; - DoMeleeAttackIfReady(); + if (m_uiFlyPhaseTimer < uiDiff) + { + DoScriptText(SAY_TAKEOFF, m_creature); + + SetCombatMovement(false); + m_creature->SetLevitate(true); + m_creature->GetMotionMaster()->MoveIdle(); + m_creature->GetMotionMaster()->MovePoint(PHASE_AIR, m_creature->GetPositionX(), m_creature->GetPositionY(), 50.083f, false); + + m_uiPhase = PHASE_TRANSITION; + m_uiSubPhase = SUBPHASE_VAPOR; + m_uiDemonicVaporTimer = 1000; + m_uiDemonicVaporCount = 0; + m_uiFlyPhaseTimer = 60000; + } + else + m_uiFlyPhaseTimer -= uiDiff; + + DoMeleeAttackIfReady(); + + break; + case PHASE_AIR: + + switch (m_uiSubPhase) + { + case SUBPHASE_VAPOR: + + if (m_uiDemonicVaporTimer < uiDiff) + { + // After the second Demonic Vapor trial, start the breath phase + if (m_uiDemonicVaporCount == 2) + { + if (!m_pInstance) + return; + + // select the side on which we want to fly + m_bIsLeftSide = urand(0, 1) ? true : false; + m_uiCorruptionCount = 0; + m_uiSubPhase = SUBPHASE_BREATH_PREPARE; + if (Creature* pTrigger = m_pInstance->GetSingleCreatureFromStorage(m_bIsLeftSide ? NPC_FLIGHT_TRIGGER_LEFT : NPC_FLIGHT_TRIGGER_RIGHT)) + m_creature->GetMotionMaster()->MovePoint(SUBPHASE_VAPOR, pTrigger->GetPositionX(), pTrigger->GetPositionY(), pTrigger->GetPositionZ(), false); + } + else + { + if (DoCastSpellIfCan(m_creature, SPELL_SUMMON_VAPOR) == CAST_OK) + { + ++m_uiDemonicVaporCount; + m_uiDemonicVaporTimer = 11000; + } + } + } + else + m_uiDemonicVaporTimer -= uiDiff; + + break; + case SUBPHASE_BREATH_PREPARE: + + if (m_uiCorruptionTimer) + { + if (m_uiCorruptionTimer <= uiDiff) + { + if (!m_pInstance) + return; + + // Fly to trigger on the same side - choose a random index for the trigger + m_uiCorruptionIndex = urand(0, 2); + if (Creature* pTrigger = m_creature->GetMap()->GetCreature(m_pInstance->SelectFelmystFlightTrigger(m_bIsLeftSide, m_uiCorruptionIndex))) + m_creature->GetMotionMaster()->MovePoint(SUBPHASE_BREATH_PREPARE, pTrigger->GetPositionX(), pTrigger->GetPositionY(), pTrigger->GetPositionZ(), false); + + m_uiSubPhase = SUBPHASE_BREATH_MOVE; + m_uiCorruptionTimer = 0; + } + else + m_uiCorruptionTimer -= uiDiff; + } + + break; + case SUBPHASE_BREATH_MOVE: + // nothing here; this is handled in MovementInform + break; + } + break; + case PHASE_TRANSITION: + // nothing here; wait for transition to finish + break; } - // ToDo: add flight phase here } }; @@ -234,6 +459,42 @@ CreatureAI* GetAI_boss_felmyst(Creature* pCreature) return new boss_felmystAI(pCreature); } +/*###### +## npc_demonic_vapor +######*/ + +struct MANGOS_DLL_DECL npc_demonic_vaporAI : public ScriptedAI +{ + npc_demonic_vaporAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } + + void Reset() override + { + // Start following the summoner (player) + if (m_creature->IsTemporarySummon()) + { + TemporarySummon* pTemporary = (TemporarySummon*)m_creature; + + if (Player* pSummoner = m_creature->GetMap()->GetPlayer(pTemporary->GetSummonerGuid())) + m_creature->GetMotionMaster()->MoveFollow(pSummoner, 0, 0); + } + } + + void JustSummoned(Creature* pSummoned) override + { + if (pSummoned->GetEntry() == NPC_DEMONIC_VAPOR_TRAIL) + pSummoned->CastSpell(pSummoned, SPELL_DEMONIC_VAPOR, true); + } + + void AttackStart(Unit* /*pWho*/) override { } + void MoveInLineOfSight(Unit* /*pWho*/) override { } + void UpdateAI(const uint32 /*uiDiff*/) override { } +}; + +CreatureAI* GetAI_npc_demonic_vapor(Creature* pCreature) +{ + return new npc_demonic_vaporAI(pCreature); +} + void AddSC_boss_felmyst() { Script* pNewScript; @@ -242,4 +503,9 @@ void AddSC_boss_felmyst() pNewScript->Name = "boss_felmyst"; pNewScript->GetAI = &GetAI_boss_felmyst; pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_demonic_vapor"; + pNewScript->GetAI = &GetAI_npc_demonic_vapor; + pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/sunwell_plateau/instance_sunwell_plateau.cpp b/scripts/eastern_kingdoms/sunwell_plateau/instance_sunwell_plateau.cpp index f55ee204e..f81905480 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/instance_sunwell_plateau.cpp +++ b/scripts/eastern_kingdoms/sunwell_plateau/instance_sunwell_plateau.cpp @@ -90,6 +90,7 @@ void instance_sunwell_plateau::OnCreatureCreate(Creature* pCreature) case NPC_KALECGOS_HUMAN: case NPC_SATHROVARR: case NPC_FLIGHT_TRIGGER_LEFT: + case NPC_FLIGHT_TRIGGER_RIGHT: case NPC_MADRIGOSA: case NPC_BRUTALLUS: case NPC_FELMYST: @@ -108,6 +109,11 @@ void instance_sunwell_plateau::OnCreatureCreate(Creature* pCreature) case NPC_DECEIVER: m_lDeceiversGuidList.push_back(pCreature->GetObjectGuid()); break; + case NPC_WORLD_TRIGGER: + // sort triggers for flightpath + if (pCreature->GetPositionZ() < 51.0f) + m_lAllFlightTriggersList.push_back(pCreature->GetObjectGuid()); + break; } } @@ -216,6 +222,8 @@ void instance_sunwell_plateau::SetData(uint32 uiType, uint32 uiData) // Temporary - until spell 46650 is properly fixed DoUseDoorOrButton(GO_FIRE_BARRIER); } + else if (uiData == IN_PROGRESS) + DoSortFlightTriggers(); break; case TYPE_EREDAR_TWINS: m_auiEncounter[uiType] = uiData; @@ -323,16 +331,13 @@ void instance_sunwell_plateau::Update(uint32 uiDiff) { if (m_uiKiljaedenYellTimer < uiDiff) { - if (Creature* pKiljaeden = GetSingleCreatureFromStorage(NPC_KILJAEDEN_CONTROLLER)) + switch (urand(0, 4)) { - switch (urand(0, 4)) - { - case 0: DoScriptText(SAY_ORDER_1, pKiljaeden); break; - case 1: DoScriptText(SAY_ORDER_2, pKiljaeden); break; - case 2: DoScriptText(SAY_ORDER_3, pKiljaeden); break; - case 3: DoScriptText(SAY_ORDER_4, pKiljaeden); break; - case 4: DoScriptText(SAY_ORDER_5, pKiljaeden); break; - } + case 0: DoOrSimulateScriptTextForThisInstance(SAY_ORDER_1, NPC_KILJAEDEN_CONTROLLER); break; + case 1: DoOrSimulateScriptTextForThisInstance(SAY_ORDER_2, NPC_KILJAEDEN_CONTROLLER); break; + case 2: DoOrSimulateScriptTextForThisInstance(SAY_ORDER_3, NPC_KILJAEDEN_CONTROLLER); break; + case 3: DoOrSimulateScriptTextForThisInstance(SAY_ORDER_4, NPC_KILJAEDEN_CONTROLLER); break; + case 4: DoOrSimulateScriptTextForThisInstance(SAY_ORDER_5, NPC_KILJAEDEN_CONTROLLER); break; } m_uiKiljaedenYellTimer = 90000; } @@ -364,6 +369,51 @@ void instance_sunwell_plateau::Load(const char* in) OUT_LOAD_INST_DATA_COMPLETE; } +static bool sortByPositionX(Creature* pFirst, Creature* pSecond) +{ + return pFirst && pSecond && pFirst->GetPositionX() > pSecond->GetPositionX(); +} + +void instance_sunwell_plateau::DoSortFlightTriggers() +{ + if (m_lAllFlightTriggersList.empty()) + { + script_error_log("Instance Sunwell Plateau: ERROR Failed to load flight triggers for creature id %u.", NPC_FELMYST); + return; + } + + std::list lTriggers; // Valid pointers, only used locally + for (GuidList::const_iterator itr = m_lAllFlightTriggersList.begin(); itr != m_lAllFlightTriggersList.end(); ++itr) + { + if (Creature* pTrigger = instance->GetCreature(*itr)) + lTriggers.push_back(pTrigger); + } + + if (lTriggers.empty()) + return; + + // sort the flight triggers; first by position X, then group them by Y (left and right) + lTriggers.sort(sortByPositionX); + for (std::list::iterator itr = lTriggers.begin(); itr != lTriggers.end(); ++itr) + { + if ((*itr)->GetPositionY() < 600.0f) + m_vRightFlightTriggersVect.push_back((*itr)->GetObjectGuid()); + else + m_vLeftFlightTriggersVect.push_back((*itr)->GetObjectGuid()); + } +} + +ObjectGuid instance_sunwell_plateau::SelectFelmystFlightTrigger(bool bLeftSide, uint8 uiIndex) +{ + // Return the flight trigger from the selected index + GuidVector& vTemp = bLeftSide ? m_vLeftFlightTriggersVect : m_vRightFlightTriggersVect; + + if (uiIndex >= vTemp.size()) + return ObjectGuid(); + + return vTemp[uiIndex]; +} + void instance_sunwell_plateau::JustDidDialogueStep(int32 iEntry) { switch (iEntry) @@ -375,7 +425,7 @@ void instance_sunwell_plateau::JustDidDialogueStep(int32 iEntry) { pKalec->SetWalk(false); pKalec->SetLevitate(true); - pKalec->GetMotionMaster()->MovePoint(0, aMadrigosaFlyLoc[0], aMadrigosaFlyLoc[1], aMadrigosaFlyLoc[2]); + pKalec->GetMotionMaster()->MovePoint(0, aMadrigosaFlyLoc[0], aMadrigosaFlyLoc[1], aMadrigosaFlyLoc[2], false); } } break; diff --git a/scripts/eastern_kingdoms/sunwell_plateau/sunwell_plateau.h b/scripts/eastern_kingdoms/sunwell_plateau/sunwell_plateau.h index d0e87f914..e5036be60 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/sunwell_plateau.h +++ b/scripts/eastern_kingdoms/sunwell_plateau/sunwell_plateau.h @@ -21,7 +21,8 @@ enum NPC_SATHROVARR = 24892, NPC_MADRIGOSA = 24895, NPC_FLIGHT_TRIGGER_LEFT = 25357, // Related to Felmyst flight path. Also the anchor to summon Madrigosa - // NPC_FLIGHT_TRIGGER_RIGHT = 25358, // related to Felmyst flight path + NPC_FLIGHT_TRIGGER_RIGHT = 25358, // related to Felmyst flight path + NPC_WORLD_TRIGGER = 22515, NPC_BRUTALLUS = 24882, NPC_FELMYST = 25038, NPC_ALYTHESS = 25166, @@ -99,11 +100,14 @@ class MANGOS_DLL_DECL instance_sunwell_plateau : public ScriptedInstance, privat void Update(uint32 uiDiff) override; + ObjectGuid SelectFelmystFlightTrigger(bool bLeftSide, uint8 uiIndex); + const char* Save() const override { return m_strInstData.c_str(); } void Load(const char* chrIn) override; protected: void JustDidDialogueStep(int32 iEntry) override; + void DoSortFlightTriggers(); uint32 m_auiEncounter[MAX_ENCOUNTER]; std::string m_strInstData; @@ -115,6 +119,9 @@ class MANGOS_DLL_DECL instance_sunwell_plateau : public ScriptedInstance, privat uint32 m_uiMuruBerserkTimer; uint32 m_uiKiljaedenYellTimer; + GuidVector m_vRightFlightTriggersVect; + GuidVector m_vLeftFlightTriggersVect; + GuidList m_lAllFlightTriggersList; GuidList m_lDeceiversGuidList; }; #endif diff --git a/scripts/outland/shadowmoon_valley.cpp b/scripts/outland/shadowmoon_valley.cpp index 81629ece4..8f9c61c9f 100644 --- a/scripts/outland/shadowmoon_valley.cpp +++ b/scripts/outland/shadowmoon_valley.cpp @@ -33,6 +33,7 @@ event_spell_soul_captured_credit go_crystal_prison npc_spawned_oronok_tornheart npc_domesticated_felboar +npc_veneratus_spawn_node EndContentData */ #include "precompiled.h" diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index ce5fab440..14e331136 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2898" + #define SD2_REVISION_NR "2899" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 871c2b3ad..aa28df254 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -1100,6 +1100,7 @@ UPDATE creature_template SET ScriptName='spell_dummy_npc_brutallus_cloud' WHERE UPDATE creature_template SET ScriptName='boss_felmyst' WHERE entry=25038; UPDATE creature_template SET ScriptName='npc_shield_orb' WHERE entry=25502; UPDATE creature_template SET ScriptName='npc_power_blue_flight' WHERE entry=25653; +UPDATE creature_template SET ScriptName='npc_demonic_vapor' WHERE entry=25265; /* SWAMP OF SORROWS */ UPDATE creature_template SET ScriptName='npc_galen_goodward' WHERE entry=5391; diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index a5a3a5efa..9c84414eb 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -3060,7 +3060,9 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1580103,'In time, the light and hope held within - will rebirth more than this mere fount of power... Mayhap, they will rebirth the soul of a nation.',12521,0,0,1,'velen SAY_OUTRO_9'), (-1580104,'Blessed ancestors! I feel it... so much love... so much grace... there are... no words... impossible to describe...',12526,0,0,1,'liadrin SAY_OUTRO_10'), (-1580105,'Salvation, young one. It waits for us all.',12522,0,0,1,'velen SAY_OUTRO_11'), -(-1580106,'Farewell...!',12523,0,0,1,'velen SAY_OUTRO_12'); +(-1580106,'Farewell...!',12523,0,0,1,'velen SAY_OUTRO_12'), + +(-1580107,'%s takes a deep breath.',0,3,0,0,'felmyst EMOTE_DEEP_BREATH'); -- -1 585 000 MAGISTER'S TERRACE INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES diff --git a/sql/updates/r2899_mangos.sql b/sql/updates/r2899_mangos.sql new file mode 100644 index 000000000..833a29491 --- /dev/null +++ b/sql/updates/r2899_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_demonic_vapor' WHERE entry=25265; diff --git a/sql/updates/r2899_scriptdev2.sql b/sql/updates/r2899_scriptdev2.sql new file mode 100644 index 000000000..6524bbfe3 --- /dev/null +++ b/sql/updates/r2899_scriptdev2.sql @@ -0,0 +1,3 @@ +DELETE FROM script_texts WHERE entry IN (-1580107); +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1580107,'%s takes a deep breath.',0,3,0,0,'felmyst EMOTE_DEEP_BREATH'); From e6ae56d1ee8f67c6b12131eece170c242f7ee152 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Thu, 23 May 2013 11:31:22 +0300 Subject: [PATCH 0907/1172] [2900] Cleanup some white spaces --- include/sc_creature.h | 2 +- .../blackrock_spire/instance_blackrock_spire.cpp | 2 +- .../blackwing_lair/boss_razorgore.cpp | 12 ++++++------ .../eastern_kingdoms/uldaman/instance_uldaman.cpp | 2 +- scripts/kalimdor/darkshore.cpp | 2 +- scripts/kalimdor/dire_maul/instance_dire_maul.cpp | 2 +- scripts/kalimdor/razorfen_kraul/razorfen_kraul.cpp | 2 +- scripts/kalimdor/ruins_of_ahnqiraj/boss_ossirian.cpp | 4 ++-- .../temple_of_ahnqiraj/boss_twinemperors.cpp | 2 +- scripts/northrend/dalaran.cpp | 2 +- .../pit_of_saron/boss_forgemaster_garfrost.cpp | 2 +- .../frozen_halls/pit_of_saron/boss_krick_and_ick.cpp | 4 ++-- .../pit_of_saron/boss_scourgelord_tyrannus.cpp | 2 +- .../pit_of_saron/instance_pit_of_saron.cpp | 12 ++++++------ .../frozen_halls/pit_of_saron/pit_of_saron.cpp | 2 +- .../northrend/obsidian_sanctum/boss_sartharion.cpp | 2 +- .../shadow_labyrinth/boss_blackheart_the_inciter.cpp | 2 +- scripts/outland/black_temple/illidari_council.cpp | 2 +- .../coilfang_reservoir/slave_pens/boss_ahune.cpp | 2 +- scripts/world/spell_scripts.cpp | 2 +- sd2_revision_nr.h | 2 +- sd2_revision_sql.h | 4 ++-- 22 files changed, 35 insertions(+), 35 deletions(-) diff --git a/include/sc_creature.h b/include/sc_creature.h index 364b83472..b40526e10 100644 --- a/include/sc_creature.h +++ b/include/sc_creature.h @@ -70,7 +70,7 @@ struct MANGOS_DLL_DECL ScriptedAI : public CreatureAI void JustReachedHome() override {} // Called at any Heal received - void HealedBy(Unit * /*pHealer*/, uint32& /*uiHealedAmount*/) override {} + void HealedBy(Unit* /*pHealer*/, uint32& /*uiHealedAmount*/) override {} // Called at any Damage to any victim (before damage apply) void DamageDeal(Unit* /*pDoneTo*/, uint32& /*uiDamage*/) override {} diff --git a/scripts/eastern_kingdoms/blackrock_spire/instance_blackrock_spire.cpp b/scripts/eastern_kingdoms/blackrock_spire/instance_blackrock_spire.cpp index 199476ffa..11a344184 100644 --- a/scripts/eastern_kingdoms/blackrock_spire/instance_blackrock_spire.cpp +++ b/scripts/eastern_kingdoms/blackrock_spire/instance_blackrock_spire.cpp @@ -569,7 +569,7 @@ void instance_blackrock_spire::DoSendNextFlamewreathWave() pSummoner->GetRandomPoint(rookeryEventSpawnPos[0], rookeryEventSpawnPos[1], rookeryEventSpawnPos[2], 2.5f, fX, fY, fZ); // Summon Rookery Hatchers in first wave, else random if (pSummoned = pSummoner->SummonCreature(urand(0, 1) && m_uiFlamewreathWaveCount ? NPC_ROOKERY_GUARDIAN : NPC_ROOKERY_HATCHER, - fX, fY, fZ, 0.0, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 300000)) + fX, fY, fZ, 0.0, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 300000)) { pSummoner->GetContactPoint(pSummoned, fX, fY, fZ); pSummoned->GetMotionMaster()->MovePoint(1, fX, fY, pSummoner->GetPositionZ()); diff --git a/scripts/eastern_kingdoms/blackwing_lair/boss_razorgore.cpp b/scripts/eastern_kingdoms/blackwing_lair/boss_razorgore.cpp index 0d83fe480..f2a55636b 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/boss_razorgore.cpp +++ b/scripts/eastern_kingdoms/blackwing_lair/boss_razorgore.cpp @@ -214,12 +214,12 @@ bool EffectDummyGameObj_go_black_dragon_egg(Unit* pCaster, uint32 uiSpellId, Spe { if (urand(0, 1)) { - switch (urand(0, 2)) - { - case 0: DoScriptText(SAY_EGGS_BROKEN_1, pCaster); break; - case 1: DoScriptText(SAY_EGGS_BROKEN_2, pCaster); break; - case 2: DoScriptText(SAY_EGGS_BROKEN_3, pCaster); break; - } + switch (urand(0, 2)) + { + case 0: DoScriptText(SAY_EGGS_BROKEN_1, pCaster); break; + case 1: DoScriptText(SAY_EGGS_BROKEN_2, pCaster); break; + case 2: DoScriptText(SAY_EGGS_BROKEN_3, pCaster); break; + } } // Store the eggs which are destroyed, in order to count them for the second phase diff --git a/scripts/eastern_kingdoms/uldaman/instance_uldaman.cpp b/scripts/eastern_kingdoms/uldaman/instance_uldaman.cpp index 740c7fba0..2eecf3412 100644 --- a/scripts/eastern_kingdoms/uldaman/instance_uldaman.cpp +++ b/scripts/eastern_kingdoms/uldaman/instance_uldaman.cpp @@ -151,7 +151,7 @@ void instance_uldaman::SetData64(uint32 uiData, uint64 uiGuid) { switch (uiData) { - // ToDo: check if this one is used in ACID. Otherwise it can be dropped + // ToDo: check if this one is used in ACID. Otherwise it can be dropped case DATA_EVENT_STARTER: m_playerGuid = ObjectGuid(uiGuid); break; diff --git a/scripts/kalimdor/darkshore.cpp b/scripts/kalimdor/darkshore.cpp index 487d3940f..034b6ad31 100644 --- a/scripts/kalimdor/darkshore.cpp +++ b/scripts/kalimdor/darkshore.cpp @@ -569,7 +569,7 @@ struct MANGOS_DLL_DECL npc_theryluneAI : public npc_escortAI void WaypointReached(uint32 uiPointId) override { - switch(uiPointId) + switch (uiPointId) { case 17: if (Player* pPlayer = GetPlayerForEscort()) diff --git a/scripts/kalimdor/dire_maul/instance_dire_maul.cpp b/scripts/kalimdor/dire_maul/instance_dire_maul.cpp index 10ef7b06a..1ef7740e4 100644 --- a/scripts/kalimdor/dire_maul/instance_dire_maul.cpp +++ b/scripts/kalimdor/dire_maul/instance_dire_maul.cpp @@ -393,7 +393,7 @@ bool instance_dire_maul::CheckConditionCriteriaMeet(Player const* pPlayer, uint3 case INSTANCE_CONDITION_ID_HARD_MODE_4: // All guards alive { uint8 uiTributeRunAliveBosses = (GetData(TYPE_MOLDAR) != DONE ? 1 : 0) + (GetData(TYPE_FENGUS) != DONE ? 1 : 0) + (GetData(TYPE_SLIPKIK) != DONE ? 1 : 0) - + (GetData(TYPE_KROMCRUSH) != DONE ? 1 : 0); + + (GetData(TYPE_KROMCRUSH) != DONE ? 1 : 0); return uiInstanceConditionId == uiTributeRunAliveBosses; } diff --git a/scripts/kalimdor/razorfen_kraul/razorfen_kraul.cpp b/scripts/kalimdor/razorfen_kraul/razorfen_kraul.cpp index 299428d73..32fdb0c70 100644 --- a/scripts/kalimdor/razorfen_kraul/razorfen_kraul.cpp +++ b/scripts/kalimdor/razorfen_kraul/razorfen_kraul.cpp @@ -209,7 +209,7 @@ struct MANGOS_DLL_DECL npc_snufflenose_gopherAI : public ScriptedPetAI { pNearestTubber = *itr; break; - } + } } if (!pNearestTubber) diff --git a/scripts/kalimdor/ruins_of_ahnqiraj/boss_ossirian.cpp b/scripts/kalimdor/ruins_of_ahnqiraj/boss_ossirian.cpp index 4107ba852..398c5ea67 100644 --- a/scripts/kalimdor/ruins_of_ahnqiraj/boss_ossirian.cpp +++ b/scripts/kalimdor/ruins_of_ahnqiraj/boss_ossirian.cpp @@ -57,8 +57,8 @@ enum static const float aSandVortexSpawnPos[2][4] = { - {-9523.482f, 1880.435f, 85.645f, 5.08f}, - {-9321.39f, 1822.968f, 84.266f, 3.16f}, + { -9523.482f, 1880.435f, 85.645f, 5.08f}, + { -9321.39f, 1822.968f, 84.266f, 3.16f}, }; static const float aCrystalSpawnPos[3] = { -9355.75f, 1905.43f, 85.55f}; diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_twinemperors.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_twinemperors.cpp index aa2ba4aa4..76e8f65ee 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/boss_twinemperors.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_twinemperors.cpp @@ -106,7 +106,7 @@ struct MANGOS_DLL_DECL boss_twin_emperorsAI : public ScriptedAI } // Workaround for the shared health pool - void HealedBy(Unit * pHealer, uint32& uiHealedAmount) override + void HealedBy(Unit* pHealer, uint32& uiHealedAmount) override { if (!m_pInstance) return; diff --git a/scripts/northrend/dalaran.cpp b/scripts/northrend/dalaran.cpp index 94cc4f490..aaa1835c4 100644 --- a/scripts/northrend/dalaran.cpp +++ b/scripts/northrend/dalaran.cpp @@ -55,7 +55,7 @@ struct MANGOS_DLL_DECL npc_dalaran_guardian_mageAI : public ScriptedAI { // exception for quests 20439 and 24451 if (pWho->HasAura(SPELL_COVENANT_DISGUISE_1) || pWho->HasAura(SPELL_COVENANT_DISGUISE_2) || - pWho->HasAura(SPELL_SUNREAVER_DISGUISE_1) || pWho->HasAura(SPELL_SUNREAVER_DISGUISE_2)) + pWho->HasAura(SPELL_SUNREAVER_DISGUISE_1) || pWho->HasAura(SPELL_SUNREAVER_DISGUISE_2)) return; if (m_creature->IsWithinDistInMap(pWho, m_creature->GetAttackDistance(pWho)) && m_creature->IsWithinLOSInMap(pWho)) diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_forgemaster_garfrost.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_forgemaster_garfrost.cpp index d3c0269e5..6eb17dfb0 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_forgemaster_garfrost.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_forgemaster_garfrost.cpp @@ -108,7 +108,7 @@ struct MANGOS_DLL_DECL boss_forgemaster_garfrostAI : public ScriptedAI // Summon Ironskull or Victus for outro m_creature->SummonCreature(m_pInstance->GetPlayerTeam() == HORDE ? NPC_IRONSKULL_PART1 : NPC_VICTUS_PART1, - afOutroNpcSpawnLoc[0], afOutroNpcSpawnLoc[1], afOutroNpcSpawnLoc[2], afOutroNpcSpawnLoc[3], TEMPSUMMON_TIMED_DESPAWN, 2 * MINUTE * IN_MILLISECONDS); + afOutroNpcSpawnLoc[0], afOutroNpcSpawnLoc[1], afOutroNpcSpawnLoc[2], afOutroNpcSpawnLoc[3], TEMPSUMMON_TIMED_DESPAWN, 2 * MINUTE * IN_MILLISECONDS); // ToDo: handle the other npcs movement } diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_krick_and_ick.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_krick_and_ick.cpp index 05995db20..81095ceb3 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_krick_and_ick.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_krick_and_ick.cpp @@ -138,7 +138,7 @@ struct MANGOS_DLL_DECL boss_ickAI : public ScriptedAI // Summon Jaina or Sylvanas for epilogue pKrick->SummonCreature(m_pInstance->GetPlayerTeam() == HORDE ? NPC_SYLVANAS_PART1 : NPC_JAINA_PART1, - afOutroNpcSpawnLoc[0], afOutroNpcSpawnLoc[1], afOutroNpcSpawnLoc[2], afOutroNpcSpawnLoc[3], TEMPSUMMON_TIMED_DESPAWN, 2 * MINUTE * IN_MILLISECONDS); + afOutroNpcSpawnLoc[0], afOutroNpcSpawnLoc[1], afOutroNpcSpawnLoc[2], afOutroNpcSpawnLoc[3], TEMPSUMMON_TIMED_DESPAWN, 2 * MINUTE * IN_MILLISECONDS); } if (Creature* pTyrannus = m_pInstance->GetSingleCreatureFromStorage(NPC_TYRANNUS_INTRO)) @@ -282,7 +282,7 @@ struct MANGOS_DLL_DECL boss_ickAI : public ScriptedAI CreatureAI* GetAI_boss_ick(Creature* pCreature) { - return new boss_ickAI (pCreature); + return new boss_ickAI(pCreature); } /*###### diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_scourgelord_tyrannus.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_scourgelord_tyrannus.cpp index 281534a05..cde1dc225 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_scourgelord_tyrannus.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_scourgelord_tyrannus.cpp @@ -200,7 +200,7 @@ struct MANGOS_DLL_DECL boss_tyrannusAI : public ScriptedAI CreatureAI* GetAI_boss_tyrannus(Creature* pCreature) { - return new boss_tyrannusAI (pCreature); + return new boss_tyrannusAI(pCreature); } /*###### diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/instance_pit_of_saron.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/instance_pit_of_saron.cpp index 81ad57ec0..5b22def5f 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/instance_pit_of_saron.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/instance_pit_of_saron.cpp @@ -199,7 +199,7 @@ void instance_pit_of_saron::ProcessIntroEventNpcs(Player* pPlayer) { // ToDo: maybe despawn the intro npcs when the other events occur if (Creature* pSummon = pPlayer->SummonCreature(m_uiTeam == HORDE ? aEventBeginLocations[i].uiEntryHorde : aEventBeginLocations[i].uiEntryAlliance, - aEventBeginLocations[i].fX, aEventBeginLocations[i].fY, aEventBeginLocations[i].fZ, aEventBeginLocations[i].fO, TEMPSUMMON_TIMED_DESPAWN, 24 * HOUR * IN_MILLISECONDS)) + aEventBeginLocations[i].fX, aEventBeginLocations[i].fY, aEventBeginLocations[i].fZ, aEventBeginLocations[i].fO, TEMPSUMMON_TIMED_DESPAWN, 24 * HOUR * IN_MILLISECONDS)) { pSummon->SetWalk(false); pSummon->GetMotionMaster()->MovePoint(0, aEventBeginLocations[i].fMoveX, aEventBeginLocations[i].fMoveY, aEventBeginLocations[i].fMoveZ); @@ -384,7 +384,7 @@ void instance_pit_of_saron::OnCreatureEnterCombat(Creature* pCreature) for (uint8 i = 0; i < countof(aEventSecondAmbushLocations); ++i) { if (Creature* pSummon = pTyrannus->SummonCreature(aEventSecondAmbushLocations[i].uiEntryHorde, aEventSecondAmbushLocations[i].fX, aEventSecondAmbushLocations[i].fY, - aEventSecondAmbushLocations[i].fZ, aEventSecondAmbushLocations[i].fO, TEMPSUMMON_DEAD_DESPAWN, 0)) + aEventSecondAmbushLocations[i].fZ, aEventSecondAmbushLocations[i].fO, TEMPSUMMON_DEAD_DESPAWN, 0)) { pSummon->SetWalk(false); pSummon->GetMotionMaster()->MovePoint(1, aEventSecondAmbushLocations[i].fMoveX, aEventSecondAmbushLocations[i].fMoveY, aEventSecondAmbushLocations[i].fMoveZ); @@ -498,7 +498,7 @@ void instance_pit_of_saron::JustDidDialogueStep(int32 iEntry) for (uint8 i = 0; i < countof(aEventTunnelEndLocations); ++i) { if (Creature* pSummon = pTyrannus->SummonCreature(m_uiTeam == HORDE ? aEventTunnelEndLocations[i].uiEntryHorde : aEventTunnelEndLocations[i].uiEntryAlliance, - aEventTunnelEndLocations[i].fX, aEventTunnelEndLocations[i].fY, aEventTunnelEndLocations[i].fZ, aEventTunnelEndLocations[i].fO, TEMPSUMMON_DEAD_DESPAWN, 0)) + aEventTunnelEndLocations[i].fX, aEventTunnelEndLocations[i].fY, aEventTunnelEndLocations[i].fZ, aEventTunnelEndLocations[i].fO, TEMPSUMMON_DEAD_DESPAWN, 0)) { pSummon->SetWalk(false); pSummon->GetMotionMaster()->MovePoint(0, aEventTunnelEndLocations[i].fMoveX, aEventTunnelEndLocations[i].fMoveY, aEventTunnelEndLocations[i].fMoveZ); @@ -525,14 +525,14 @@ void instance_pit_of_saron::JustDidDialogueStep(int32 iEntry) // Spawn Sindragosa if (Creature* pSummon = pPlayer->SummonCreature(aEventOutroLocations[0].uiEntryHorde, aEventOutroLocations[0].fX, aEventOutroLocations[0].fY, - aEventOutroLocations[0].fZ, aEventOutroLocations[0].fO, TEMPSUMMON_TIMED_DESPAWN, 2 * MINUTE * IN_MILLISECONDS)) + aEventOutroLocations[0].fZ, aEventOutroLocations[0].fO, TEMPSUMMON_TIMED_DESPAWN, 2 * MINUTE * IN_MILLISECONDS)) { pSummon->SetWalk(false); pSummon->GetMotionMaster()->MovePoint(0, aEventOutroLocations[0].fMoveX, aEventOutroLocations[0].fMoveY, aEventOutroLocations[0].fMoveZ); } // Spawn Jaina or Sylvanas if (Creature* pSummon = pPlayer->SummonCreature(m_uiTeam == HORDE ? aEventOutroLocations[1].uiEntryHorde : aEventOutroLocations[1].uiEntryAlliance, - aEventOutroLocations[1].fX, aEventOutroLocations[1].fY, aEventOutroLocations[1].fZ, aEventOutroLocations[1].fO, TEMPSUMMON_TIMED_DESPAWN, 24 * HOUR * IN_MILLISECONDS)) + aEventOutroLocations[1].fX, aEventOutroLocations[1].fY, aEventOutroLocations[1].fZ, aEventOutroLocations[1].fO, TEMPSUMMON_TIMED_DESPAWN, 24 * HOUR * IN_MILLISECONDS)) { pSummon->SetWalk(false); pSummon->GetMotionMaster()->MovePoint(0, aEventOutroLocations[1].fMoveX, aEventOutroLocations[1].fMoveY, aEventOutroLocations[1].fMoveZ); @@ -603,7 +603,7 @@ void instance_pit_of_saron::DoStartAmbushEvent() for (uint8 i = 0; i < countof(aEventFirstAmbushLocations); ++i) { if (Creature* pSummon = pTyrannus->SummonCreature(aEventFirstAmbushLocations[i].uiEntryHorde, aEventFirstAmbushLocations[i].fX, aEventFirstAmbushLocations[i].fY, - aEventFirstAmbushLocations[i].fZ, aEventFirstAmbushLocations[i].fO, TEMPSUMMON_DEAD_DESPAWN, 0)) + aEventFirstAmbushLocations[i].fZ, aEventFirstAmbushLocations[i].fO, TEMPSUMMON_DEAD_DESPAWN, 0)) { pSummon->SetWalk(false); pSummon->GetMotionMaster()->MovePoint(1, aEventFirstAmbushLocations[i].fMoveX, aEventFirstAmbushLocations[i].fMoveY, aEventFirstAmbushLocations[i].fMoveZ); diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/pit_of_saron.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/pit_of_saron.cpp index 690f344f4..29a9a2bae 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/pit_of_saron.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/pit_of_saron.cpp @@ -162,7 +162,7 @@ bool AreaTrigger_at_pit_of_saron(Player* pPlayer, AreaTriggerEntry const* pAt) if (pAt->id == AREATRIGGER_ID_TUNNEL_START) { if (pInstance->GetData(TYPE_GARFROST) != DONE || pInstance->GetData(TYPE_KRICK) != DONE || - pInstance->GetData(TYPE_AMBUSH) != NOT_STARTED) + pInstance->GetData(TYPE_AMBUSH) != NOT_STARTED) return false; pInstance->DoStartAmbushEvent(); diff --git a/scripts/northrend/obsidian_sanctum/boss_sartharion.cpp b/scripts/northrend/obsidian_sanctum/boss_sartharion.cpp index b59c3ada2..03fcdedf0 100644 --- a/scripts/northrend/obsidian_sanctum/boss_sartharion.cpp +++ b/scripts/northrend/obsidian_sanctum/boss_sartharion.cpp @@ -1098,7 +1098,7 @@ struct MANGOS_DLL_DECL npc_flame_tsunamiAI : public ScriptedAI // Note: currently the way in which spell 60241 works is unk, so for the moment we'll use simple movement m_creature->SetWalk(false); m_creature->GetMotionMaster()->MovePoint(1, m_creature->GetPositionX() < 3250.0f ? m_creature->GetPositionX() + 86.5f : m_creature->GetPositionX() - 86.5f, - m_creature->GetPositionY(), m_creature->GetPositionZ()); + m_creature->GetPositionY(), m_creature->GetPositionZ()); m_uiTsunamiTimer = 0; } diff --git a/scripts/outland/auchindoun/shadow_labyrinth/boss_blackheart_the_inciter.cpp b/scripts/outland/auchindoun/shadow_labyrinth/boss_blackheart_the_inciter.cpp index 34307e000..5bf9abe41 100644 --- a/scripts/outland/auchindoun/shadow_labyrinth/boss_blackheart_the_inciter.cpp +++ b/scripts/outland/auchindoun/shadow_labyrinth/boss_blackheart_the_inciter.cpp @@ -126,7 +126,7 @@ struct MANGOS_DLL_DECL boss_blackheart_the_inciterAI : public ScriptedAI if (m_uiInciteChaosWaitTimer <= uiDiff) { // Restart attack on all targets - for (GuidVector::const_iterator itr = m_vTargetsGuids.begin(); itr!= m_vTargetsGuids.end(); ++itr) + for (GuidVector::const_iterator itr = m_vTargetsGuids.begin(); itr != m_vTargetsGuids.end(); ++itr) { if (Unit* pTarget = m_creature->GetMap()->GetUnit(*itr)) AttackStart(pTarget); diff --git a/scripts/outland/black_temple/illidari_council.cpp b/scripts/outland/black_temple/illidari_council.cpp index 48544be75..0e0eed216 100644 --- a/scripts/outland/black_temple/illidari_council.cpp +++ b/scripts/outland/black_temple/illidari_council.cpp @@ -340,7 +340,7 @@ struct MANGOS_DLL_DECL boss_illidari_councilAI : public ScriptedAI m_creature->CastCustomSpell(m_creature, SPELL_SHARED_RULE_DAM, &uiDamageTaken, NULL, NULL, true); } - void HealedBy(Unit * pHealer, uint32& uiHealedAmount) override + void HealedBy(Unit* pHealer, uint32& uiHealedAmount) override { int32 uHealTaken = (int32)uiHealedAmount; m_creature->CastCustomSpell(m_creature, SPELL_SHARED_RULE_HEAL, &uHealTaken, NULL, NULL, true); diff --git a/scripts/outland/coilfang_reservoir/slave_pens/boss_ahune.cpp b/scripts/outland/coilfang_reservoir/slave_pens/boss_ahune.cpp index 25dbed1bc..5f6017127 100644 --- a/scripts/outland/coilfang_reservoir/slave_pens/boss_ahune.cpp +++ b/scripts/outland/coilfang_reservoir/slave_pens/boss_ahune.cpp @@ -294,7 +294,7 @@ struct MANGOS_DLL_DECL npc_frozen_coreAI : public Scripted_NoMovementAI { // it's not clear whether this should work like this or should be handled by the proc aura if (Creature* pAhune = m_creature->GetMap()->GetCreature(m_ahuheGuid)) - DoCastSpellIfCan(pAhune, SPELL_SYNCH_HEALTH, CAST_TRIGGERED);; + DoCastSpellIfCan(pAhune, SPELL_SYNCH_HEALTH, CAST_TRIGGERED); } void JustSummoned(Creature* pSummoned) override diff --git a/scripts/world/spell_scripts.cpp b/scripts/world/spell_scripts.cpp index 8c7296c75..7974e4fd9 100644 --- a/scripts/world/spell_scripts.cpp +++ b/scripts/world/spell_scripts.cpp @@ -334,7 +334,7 @@ enum GO_RAZORTHORN_DIRT_MOUND = 187073, // for quest 10584 - SPELL_PROTOVOLTAIC_MAGNETO_COLLECTOR= 37136, + SPELL_PROTOVOLTAIC_MAGNETO_COLLECTOR = 37136, NPC_ENCASED_ELECTROMENTAL = 21731, // quest 6661 diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 14e331136..163c40149 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2899" + #define SD2_REVISION_NR "2900" #endif // __SD2_REVISION_NR_H__ diff --git a/sd2_revision_sql.h b/sd2_revision_sql.h index 997c33355..f47a90c17 100644 --- a/sd2_revision_sql.h +++ b/sd2_revision_sql.h @@ -1,5 +1,5 @@ #ifndef __SD2_REVISION_SQL_H__ #define __SD2_REVISION_SQL_H__ - #define REVISION_DB_SCRIPTDEV2 "required__scriptdev2" - #define REVISION_DB_SD2_MANGOS "required__mangos" +#define REVISION_DB_SCRIPTDEV2 "required__scriptdev2" +#define REVISION_DB_SD2_MANGOS "required__mangos" #endif // __SD2_REVISION_SQL_H__ From 8b5212b9e7208c539267b65ad49bbcce01339bdc Mon Sep 17 00:00:00 2001 From: Xfurry Date: Fri, 31 May 2013 01:03:07 +0300 Subject: [PATCH 0908/1172] [2901] Use original caster GUID in dummy spells. Require CMangos [12514] --- ScriptMgr.cpp | 16 ++++++++-------- ScriptMgr.h | 8 ++++---- .../blackrock_depths/blackrock_depths.cpp | 2 +- .../boss_ambassador_flamelash.cpp | 2 +- .../blackrock_spire/boss_pyroguard_emberseer.cpp | 2 +- .../blackwing_lair/boss_razorgore.cpp | 2 +- scripts/eastern_kingdoms/burning_steppes.cpp | 2 +- .../gnomeregan/boss_thermaplugg.cpp | 2 +- .../eastern_kingdoms/karazhan/boss_midnight.cpp | 2 +- .../eastern_kingdoms/karazhan/bosses_opera.cpp | 2 +- .../molten_core/boss_majordomo_executus.cpp | 2 +- .../scarlet_enclave/ebon_hold.cpp | 4 ++-- .../sunken_temple/sunken_temple.cpp | 2 +- .../eastern_kingdoms/uldaman/boss_archaedas.cpp | 2 +- .../eastern_kingdoms/zulgurub/boss_thekal.cpp | 2 +- .../caverns_of_time/dark_portal/dark_portal.cpp | 4 ++-- scripts/kalimdor/desolace.cpp | 2 +- scripts/kalimdor/durotar.cpp | 2 +- scripts/kalimdor/felwood.cpp | 2 +- scripts/kalimdor/moonglade.cpp | 4 ++-- .../kalimdor/razorfen_kraul/razorfen_kraul.cpp | 2 +- .../kalimdor/temple_of_ahnqiraj/boss_skeram.cpp | 2 +- .../azjol-nerub/ahnkahet/boss_taldaram.cpp | 2 +- scripts/northrend/borean_tundra.cpp | 2 +- .../boss_anubarak_trial.cpp | 2 +- .../frozen_halls/pit_of_saron/pit_of_saron.cpp | 2 +- .../icecrown_citadel/boss_lady_deathwhisper.cpp | 2 +- scripts/northrend/naxxramas/boss_gothik.cpp | 2 +- scripts/northrend/naxxramas/boss_thaddius.cpp | 2 +- scripts/northrend/nexus/nexus/boss_ormorok.cpp | 2 +- .../ulduar/halls_of_lightning/boss_ionar.cpp | 2 +- .../ulduar/halls_of_lightning/boss_volkhan.cpp | 4 ++-- .../utgarde_pinnacle/boss_gortok.cpp | 2 +- scripts/northrend/violet_hold/violet_hold.cpp | 4 ++-- .../coilfang_reservoir/slave_pens/boss_ahune.cpp | 2 +- scripts/outland/hellfire_peninsula.cpp | 2 +- scripts/outland/shadowmoon_valley.cpp | 6 +++--- .../tempest_keep/the_eye/boss_kaelthas.cpp | 2 +- scripts/world/npcs_special.cpp | 2 +- scripts/world/spell_scripts.cpp | 4 ++-- sd2_revision_nr.h | 2 +- sd2_revision_sql.h | 4 ++-- sql/scriptdev2_script_full.sql | 2 +- sql/updates/r2901_scriptdev2.sql | 1 + 44 files changed, 63 insertions(+), 62 deletions(-) create mode 100644 sql/updates/r2901_scriptdev2.sql diff --git a/ScriptMgr.cpp b/ScriptMgr.cpp index c2f6be53e..88888abef 100644 --- a/ScriptMgr.cpp +++ b/ScriptMgr.cpp @@ -559,47 +559,47 @@ bool ItemUse(Player* pPlayer, Item* pItem, SpellCastTargets const& targets) } MANGOS_DLL_EXPORT -bool EffectDummyCreature(Unit* pCaster, uint32 spellId, SpellEffectIndex effIndex, Creature* pTarget) +bool EffectDummyCreature(Unit* pCaster, uint32 spellId, SpellEffectIndex effIndex, Creature* pTarget, ObjectGuid originalCasterGuid) { Script* pTempScript = m_scripts[pTarget->GetScriptId()]; if (!pTempScript || !pTempScript->pEffectDummyNPC) return false; - return pTempScript->pEffectDummyNPC(pCaster, spellId, effIndex, pTarget); + return pTempScript->pEffectDummyNPC(pCaster, spellId, effIndex, pTarget, originalCasterGuid); } MANGOS_DLL_EXPORT -bool EffectDummyGameObject(Unit* pCaster, uint32 spellId, SpellEffectIndex effIndex, GameObject* pTarget) +bool EffectDummyGameObject(Unit* pCaster, uint32 spellId, SpellEffectIndex effIndex, GameObject* pTarget, ObjectGuid originalCasterGuid) { Script* pTempScript = m_scripts[pTarget->GetGOInfo()->ScriptId]; if (!pTempScript || !pTempScript->pEffectDummyGO) return false; - return pTempScript->pEffectDummyGO(pCaster, spellId, effIndex, pTarget); + return pTempScript->pEffectDummyGO(pCaster, spellId, effIndex, pTarget, originalCasterGuid); } MANGOS_DLL_EXPORT -bool EffectDummyItem(Unit* pCaster, uint32 spellId, SpellEffectIndex effIndex, Item* pTarget) +bool EffectDummyItem(Unit* pCaster, uint32 spellId, SpellEffectIndex effIndex, Item* pTarget, ObjectGuid originalCasterGuid) { Script* pTempScript = m_scripts[pTarget->GetProto()->ScriptId]; if (!pTempScript || !pTempScript->pEffectDummyItem) return false; - return pTempScript->pEffectDummyItem(pCaster, spellId, effIndex, pTarget); + return pTempScript->pEffectDummyItem(pCaster, spellId, effIndex, pTarget, originalCasterGuid); } MANGOS_DLL_EXPORT -bool EffectScriptEffectCreature(Unit* pCaster, uint32 spellId, SpellEffectIndex effIndex, Creature* pTarget) +bool EffectScriptEffectCreature(Unit* pCaster, uint32 spellId, SpellEffectIndex effIndex, Creature* pTarget, ObjectGuid originalCasterGuid) { Script* pTempScript = m_scripts[pTarget->GetScriptId()]; if (!pTempScript || !pTempScript->pEffectScriptEffectNPC) return false; - return pTempScript->pEffectScriptEffectNPC(pCaster, spellId, effIndex, pTarget); + return pTempScript->pEffectScriptEffectNPC(pCaster, spellId, effIndex, pTarget, originalCasterGuid); } MANGOS_DLL_EXPORT diff --git a/ScriptMgr.h b/ScriptMgr.h index 6a8d75774..7dbf73e6f 100644 --- a/ScriptMgr.h +++ b/ScriptMgr.h @@ -91,10 +91,10 @@ struct Script bool (*pItemUse)(Player*, Item*, SpellCastTargets const&); bool (*pAreaTrigger)(Player*, AreaTriggerEntry const*); bool (*pProcessEventId)(uint32, Object*, Object*, bool); - bool (*pEffectDummyNPC)(Unit*, uint32, SpellEffectIndex, Creature*); - bool (*pEffectDummyGO)(Unit*, uint32, SpellEffectIndex, GameObject*); - bool (*pEffectDummyItem)(Unit*, uint32, SpellEffectIndex, Item*); - bool (*pEffectScriptEffectNPC)(Unit*, uint32, SpellEffectIndex, Creature*); + bool (*pEffectDummyNPC)(Unit*, uint32, SpellEffectIndex, Creature*, ObjectGuid); + bool (*pEffectDummyGO)(Unit*, uint32, SpellEffectIndex, GameObject*, ObjectGuid); + bool (*pEffectDummyItem)(Unit*, uint32, SpellEffectIndex, Item*, ObjectGuid); + bool (*pEffectScriptEffectNPC)(Unit*, uint32, SpellEffectIndex, Creature*, ObjectGuid); bool (*pEffectAuraDummy)(const Aura*, bool); CreatureAI* (*GetAI)(Creature*); diff --git a/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.cpp b/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.cpp index a1d65d7a8..0f245a2e0 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.cpp +++ b/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.cpp @@ -436,7 +436,7 @@ CreatureAI* GetAI_npc_grimstone(Creature* pCreature) return new npc_grimstoneAI(pCreature); } -bool EffectDummyCreature_spell_banner_of_provocation(Unit* /*pCaster*/, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) +bool EffectDummyCreature_spell_banner_of_provocation(Unit* /*pCaster*/, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget, ObjectGuid /*originalCasterGuid*/) { if (uiSpellId == SPELL_SUMMON_THELRIN_DND && uiEffIndex != EFFECT_INDEX_0) { diff --git a/scripts/eastern_kingdoms/blackrock_depths/boss_ambassador_flamelash.cpp b/scripts/eastern_kingdoms/blackrock_depths/boss_ambassador_flamelash.cpp index fd3c3d4c2..92535b338 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/boss_ambassador_flamelash.cpp +++ b/scripts/eastern_kingdoms/blackrock_depths/boss_ambassador_flamelash.cpp @@ -94,7 +94,7 @@ struct MANGOS_DLL_DECL boss_ambassador_flamelashAI : public ScriptedAI } }; -bool EffectDummyCreature_spell_boss_ambassador_flamelash(Unit* /*pCaster*/, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) +bool EffectDummyCreature_spell_boss_ambassador_flamelash(Unit* /*pCaster*/, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget, ObjectGuid /*originalCasterGuid*/) { if (uiSpellId == SPELL_BURNING_SPIRIT && uiEffIndex == EFFECT_INDEX_1) { diff --git a/scripts/eastern_kingdoms/blackrock_spire/boss_pyroguard_emberseer.cpp b/scripts/eastern_kingdoms/blackrock_spire/boss_pyroguard_emberseer.cpp index c4a85474c..a994ee6b5 100644 --- a/scripts/eastern_kingdoms/blackrock_spire/boss_pyroguard_emberseer.cpp +++ b/scripts/eastern_kingdoms/blackrock_spire/boss_pyroguard_emberseer.cpp @@ -189,7 +189,7 @@ CreatureAI* GetAI_boss_pyroguard_emberseer(Creature* pCreature) return new boss_pyroguard_emberseerAI(pCreature); } -bool EffectDummyCreature_pyroguard_emberseer(Unit* /*pCaster*/, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) +bool EffectDummyCreature_pyroguard_emberseer(Unit* /*pCaster*/, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget, ObjectGuid /*originalCasterGuid*/) { // always check spellid and effectindex if (uiSpellId == SPELL_GROWING && uiEffIndex == EFFECT_INDEX_0) diff --git a/scripts/eastern_kingdoms/blackwing_lair/boss_razorgore.cpp b/scripts/eastern_kingdoms/blackwing_lair/boss_razorgore.cpp index f2a55636b..87f293431 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/boss_razorgore.cpp +++ b/scripts/eastern_kingdoms/blackwing_lair/boss_razorgore.cpp @@ -203,7 +203,7 @@ CreatureAI* GetAI_boss_razorgore(Creature* pCreature) return new boss_razorgoreAI(pCreature); } -bool EffectDummyGameObj_go_black_dragon_egg(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, GameObject* pGOTarget) +bool EffectDummyGameObj_go_black_dragon_egg(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, GameObject* pGOTarget, ObjectGuid /*originalCasterGuid*/) { if (uiSpellId == SPELL_DESTROY_EGG && uiEffIndex == EFFECT_INDEX_1) { diff --git a/scripts/eastern_kingdoms/burning_steppes.cpp b/scripts/eastern_kingdoms/burning_steppes.cpp index 37f6a9f35..dc33528c8 100644 --- a/scripts/eastern_kingdoms/burning_steppes.cpp +++ b/scripts/eastern_kingdoms/burning_steppes.cpp @@ -426,7 +426,7 @@ bool QuestAccept_npc_grark_lorkrub(Player* pPlayer, Creature* pCreature, const Q return false; } -bool EffectDummyCreature_spell_capture_grark(Unit* /*pCaster*/, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) +bool EffectDummyCreature_spell_capture_grark(Unit* /*pCaster*/, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget, ObjectGuid /*originalCasterGuid*/) { // always check spellid and effectindex if (uiSpellId == SPELL_CAPTURE_GRARK && uiEffIndex == EFFECT_INDEX_0) diff --git a/scripts/eastern_kingdoms/gnomeregan/boss_thermaplugg.cpp b/scripts/eastern_kingdoms/gnomeregan/boss_thermaplugg.cpp index fa3f570f5..76a1ef9e5 100644 --- a/scripts/eastern_kingdoms/gnomeregan/boss_thermaplugg.cpp +++ b/scripts/eastern_kingdoms/gnomeregan/boss_thermaplugg.cpp @@ -234,7 +234,7 @@ CreatureAI* GetAI_boss_thermaplugg(Creature* pCreature) return new boss_thermapluggAI(pCreature); } -bool EffectDummyCreature_spell_boss_thermaplugg(Unit* /*pCaster*/, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) +bool EffectDummyCreature_spell_boss_thermaplugg(Unit* /*pCaster*/, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget, ObjectGuid /*originalCasterGuid*/) { if ((uiSpellId != SPELL_ACTIVATE_BOMB_A && uiSpellId != SPELL_ACTIVATE_BOMB_B) || uiEffIndex != EFFECT_INDEX_0) return false; diff --git a/scripts/eastern_kingdoms/karazhan/boss_midnight.cpp b/scripts/eastern_kingdoms/karazhan/boss_midnight.cpp index 6bd6f0a7f..99ac03f90 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_midnight.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_midnight.cpp @@ -320,7 +320,7 @@ CreatureAI* GetAI_boss_attumen(Creature* pCreature) return new boss_attumenAI(pCreature); } -bool EffectDummyCreature_spell_mount_attumen(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) +bool EffectDummyCreature_spell_mount_attumen(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget, ObjectGuid /*originalCasterGuid*/) { // always check spellid and effectindex if (uiSpellId == SPELL_MOUNT && uiEffIndex == EFFECT_INDEX_0) diff --git a/scripts/eastern_kingdoms/karazhan/bosses_opera.cpp b/scripts/eastern_kingdoms/karazhan/bosses_opera.cpp index 14144f49b..2a0203d2b 100644 --- a/scripts/eastern_kingdoms/karazhan/bosses_opera.cpp +++ b/scripts/eastern_kingdoms/karazhan/bosses_opera.cpp @@ -1030,7 +1030,7 @@ struct MANGOS_DLL_DECL boss_julianneAI : public ScriptedAI } }; -bool EffectDummyCreature_spell_drink_poison(Unit* /*pCaster*/, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) +bool EffectDummyCreature_spell_drink_poison(Unit* /*pCaster*/, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget, ObjectGuid /*originalCasterGuid*/) { // always check spellid and effectindex if (uiSpellId == SPELL_DRINK_POISON && uiEffIndex == EFFECT_INDEX_0) diff --git a/scripts/eastern_kingdoms/molten_core/boss_majordomo_executus.cpp b/scripts/eastern_kingdoms/molten_core/boss_majordomo_executus.cpp index 9814053ad..b917f6e4a 100644 --- a/scripts/eastern_kingdoms/molten_core/boss_majordomo_executus.cpp +++ b/scripts/eastern_kingdoms/molten_core/boss_majordomo_executus.cpp @@ -453,7 +453,7 @@ bool GossipSelect_boss_majordomo(Player* pPlayer, Creature* pCreature, uint32 /* return true; } -bool EffectDummyCreature_spell_boss_majordomo(Unit* /*pCaster*/, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) +bool EffectDummyCreature_spell_boss_majordomo(Unit* /*pCaster*/, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget, ObjectGuid /*originalCasterGuid*/) { if (uiSpellId != SPELL_TELEPORT_SELF || uiEffIndex != EFFECT_INDEX_0) return false; diff --git a/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp b/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp index 400b16c9c..b2e121668 100644 --- a/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp +++ b/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp @@ -1259,7 +1259,7 @@ struct MANGOS_DLL_DECL npc_scarlet_ghoulAI : public ScriptedPetAI } }; -bool EffectDummyCreature_npc_scarlet_ghoul(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) +bool EffectDummyCreature_npc_scarlet_ghoul(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget, ObjectGuid /*originalCasterGuid*/) { if (uiSpellId == SPELL_GOTHIK_GHOUL_PING && uiEffIndex == EFFECT_INDEX_0) { @@ -2890,7 +2890,7 @@ CreatureAI* GetAI_npc_acherus_deathcharger(Creature* pCreature) return new npc_acherus_deathchargerAI(pCreature); } -bool EffectDummyCreature_npc_acherus_deathcharger(Unit* /*pCaster*/, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) +bool EffectDummyCreature_npc_acherus_deathcharger(Unit* /*pCaster*/, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget, ObjectGuid /*originalCasterGuid*/) { // always check spellid and effectindex if (uiSpellId == SPELL_HORSEMAN_SLAIN && uiEffIndex == EFFECT_INDEX_0) diff --git a/scripts/eastern_kingdoms/sunken_temple/sunken_temple.cpp b/scripts/eastern_kingdoms/sunken_temple/sunken_temple.cpp index 6f1298427..6b44ed877 100644 --- a/scripts/eastern_kingdoms/sunken_temple/sunken_temple.cpp +++ b/scripts/eastern_kingdoms/sunken_temple/sunken_temple.cpp @@ -222,7 +222,7 @@ bool GOUse_go_eternal_flame(Player* /*pPlayer*/, GameObject* pGo) /*###### ## effectDummy_summon_hakkar ######*/ -bool EffectDummyCreature_summon_hakkar(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* /*pCreatureTarget*/) +bool EffectDummyCreature_summon_hakkar(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* /*pCreatureTarget*/, ObjectGuid /*originalCasterGuid*/) { // Always check spellid and effectindex if (uiSpellId == SPELL_SUMMON_AVATAR && uiEffIndex == EFFECT_INDEX_0) diff --git a/scripts/eastern_kingdoms/uldaman/boss_archaedas.cpp b/scripts/eastern_kingdoms/uldaman/boss_archaedas.cpp index 66bf93608..a1d991ac8 100644 --- a/scripts/eastern_kingdoms/uldaman/boss_archaedas.cpp +++ b/scripts/eastern_kingdoms/uldaman/boss_archaedas.cpp @@ -185,7 +185,7 @@ CreatureAI* GetAI_boss_archaedas(Creature* pCreature) return new boss_archaedasAI(pCreature); } -bool EffectDummyCreature_npc_vault_warder(Unit* /*pCaster*/, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) +bool EffectDummyCreature_npc_vault_warder(Unit* /*pCaster*/, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget, ObjectGuid /*originalCasterGuid*/) { // always check spellid and effectindex if (uiSpellId == SPELL_AWAKEN_VAULT_WARDER && uiEffIndex == EFFECT_INDEX_0) diff --git a/scripts/eastern_kingdoms/zulgurub/boss_thekal.cpp b/scripts/eastern_kingdoms/zulgurub/boss_thekal.cpp index b4be9b11c..0e27551fd 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_thekal.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_thekal.cpp @@ -628,7 +628,7 @@ struct MANGOS_DLL_DECL mob_zealot_zathAI : public boss_thekalBaseAI } }; -bool EffectDummyCreature_thekal_resurrection(Unit* /*pCaster*/, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) +bool EffectDummyCreature_thekal_resurrection(Unit* /*pCaster*/, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget, ObjectGuid /*originalCasterGuid*/) { // always check spellid and effectindex if (uiSpellId == SPELL_RESURRECT && uiEffIndex == EFFECT_INDEX_0) diff --git a/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.cpp b/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.cpp index 9567b8f56..a8c44b380 100644 --- a/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.cpp +++ b/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.cpp @@ -90,7 +90,7 @@ CreatureAI* GetAI_npc_medivh_black_morass(Creature* pCreature) return new npc_medivh_black_morassAI(pCreature); } -bool EffectDummyCreature_npc_medivh_black_morass(Unit* /*pCaster*/, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) +bool EffectDummyCreature_npc_medivh_black_morass(Unit* /*pCaster*/, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget, ObjectGuid /*originalCasterGuid*/) { // always check spellid and effectindex if ((uiSpellId == SPELL_CORRUPT && uiEffIndex == EFFECT_INDEX_0) || (uiSpellId == SPELL_CORRUPT_AEONUS && uiEffIndex == EFFECT_INDEX_0)) @@ -333,7 +333,7 @@ CreatureAI* GetAI_npc_time_rift(Creature* pCreature) return new npc_time_riftAI(pCreature); } -bool EffectDummyCreature_npc_time_rift_channel(Unit* /*pCaster*/, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) +bool EffectDummyCreature_npc_time_rift_channel(Unit* /*pCaster*/, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget, ObjectGuid /*originalCasterGuid*/) { // always check spellid and effectindex if (uiSpellId == SPELL_RIFT_PERIODIC && uiEffIndex == EFFECT_INDEX_0) diff --git a/scripts/kalimdor/desolace.cpp b/scripts/kalimdor/desolace.cpp index 008cfecd3..a3bdbe1f8 100644 --- a/scripts/kalimdor/desolace.cpp +++ b/scripts/kalimdor/desolace.cpp @@ -123,7 +123,7 @@ CreatureAI* GetAI_npc_aged_dying_ancient_kodo(Creature* pCreature) return new npc_aged_dying_ancient_kodoAI(pCreature); } -bool EffectDummyCreature_npc_aged_dying_ancient_kodo(Unit* pCaster, uint32 spellId, SpellEffectIndex effIndex, Creature* pCreatureTarget) +bool EffectDummyCreature_npc_aged_dying_ancient_kodo(Unit* pCaster, uint32 spellId, SpellEffectIndex effIndex, Creature* pCreatureTarget, ObjectGuid /*originalCasterGuid*/) { // always check spellid and effectindex if (spellId == SPELL_KODO_KOMBO_ITEM && effIndex == EFFECT_INDEX_0) diff --git a/scripts/kalimdor/durotar.cpp b/scripts/kalimdor/durotar.cpp index e889f743b..3edbbc901 100644 --- a/scripts/kalimdor/durotar.cpp +++ b/scripts/kalimdor/durotar.cpp @@ -125,7 +125,7 @@ CreatureAI* GetAI_npc_lazy_peon(Creature* pCreature) return new npc_lazy_peonAI(pCreature); } -bool EffectDummyCreature_lazy_peon_awake(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) +bool EffectDummyCreature_lazy_peon_awake(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget, ObjectGuid /*originalCasterGuid*/) { // always check spellid and effectindex if (uiSpellId == SPELL_AWAKEN_PEON && uiEffIndex == EFFECT_INDEX_0) diff --git a/scripts/kalimdor/felwood.cpp b/scripts/kalimdor/felwood.cpp index df4070eda..abd012111 100644 --- a/scripts/kalimdor/felwood.cpp +++ b/scripts/kalimdor/felwood.cpp @@ -109,7 +109,7 @@ CreatureAI* GetAI_npc_kitten(Creature* pCreature) return new npc_kittenAI(pCreature); } -bool EffectDummyCreature_npc_kitten(Unit* /*pCaster*/, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) +bool EffectDummyCreature_npc_kitten(Unit* /*pCaster*/, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget, ObjectGuid /*originalCasterGuid*/) { // always check spellid and effectindex if (uiSpellId == SPELL_CORRUPT_SABER_VISUAL && uiEffIndex == EFFECT_INDEX_0) diff --git a/scripts/kalimdor/moonglade.cpp b/scripts/kalimdor/moonglade.cpp index bf45c4abd..27c031571 100644 --- a/scripts/kalimdor/moonglade.cpp +++ b/scripts/kalimdor/moonglade.cpp @@ -142,7 +142,7 @@ CreatureAI* GetAI_npc_clintar_dw_spirit(Creature* pCreature) } // we expect this spell to be triggered from spell casted at questAccept -bool EffectDummyCreature_npc_clintar_dw_spirit(Unit* pCaster, uint32 spellId, SpellEffectIndex effIndex, Creature* pCreatureTarget) +bool EffectDummyCreature_npc_clintar_dw_spirit(Unit* pCaster, uint32 spellId, SpellEffectIndex effIndex, Creature* pCreatureTarget, ObjectGuid /*originalCasterGuid*/) { // always check spellid and effectindex if (spellId == SPELL_EMERALD_DREAM && effIndex == EFFECT_INDEX_0) @@ -601,7 +601,7 @@ bool QuestAccept_npc_keeper_remulos(Player* pPlayer, Creature* pCreature, const return false; } -bool EffectDummyCreature_conjure_rift(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* /*pCreatureTarget*/) +bool EffectDummyCreature_conjure_rift(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* /*pCreatureTarget*/, ObjectGuid /*originalCasterGuid*/) { // always check spellid and effectindex if (uiSpellId == SPELL_CONJURE_RIFT && uiEffIndex == EFFECT_INDEX_0) diff --git a/scripts/kalimdor/razorfen_kraul/razorfen_kraul.cpp b/scripts/kalimdor/razorfen_kraul/razorfen_kraul.cpp index 32fdb0c70..c04bfc1d6 100644 --- a/scripts/kalimdor/razorfen_kraul/razorfen_kraul.cpp +++ b/scripts/kalimdor/razorfen_kraul/razorfen_kraul.cpp @@ -234,7 +234,7 @@ CreatureAI* GetAI_npc_snufflenose_gopher(Creature* pCreature) return new npc_snufflenose_gopherAI(pCreature); } -bool EffectDummyCreature_npc_snufflenose_gopher(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) +bool EffectDummyCreature_npc_snufflenose_gopher(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget, ObjectGuid /*originalCasterGuid*/) { // always check spellid and effectindex if (uiSpellId == SPELL_SNUFFLENOSE_COMMAND && uiEffIndex == EFFECT_INDEX_0) diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_skeram.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_skeram.cpp index b671b9433..0c42fec84 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/boss_skeram.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_skeram.cpp @@ -242,7 +242,7 @@ CreatureAI* GetAI_boss_skeram(Creature* pCreature) return new boss_skeramAI(pCreature); } -bool EffectDummyCreature_prophet_skeram(Unit* /*pCaster*/, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) +bool EffectDummyCreature_prophet_skeram(Unit* /*pCaster*/, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget, ObjectGuid /*originalCasterGuid*/) { // always check spellid and effectindex if (uiSpellId == SPELL_INITIALIZE_IMAGE && uiEffIndex == EFFECT_INDEX_0) diff --git a/scripts/northrend/azjol-nerub/ahnkahet/boss_taldaram.cpp b/scripts/northrend/azjol-nerub/ahnkahet/boss_taldaram.cpp index 3d967464a..1dc4013ec 100644 --- a/scripts/northrend/azjol-nerub/ahnkahet/boss_taldaram.cpp +++ b/scripts/northrend/azjol-nerub/ahnkahet/boss_taldaram.cpp @@ -292,7 +292,7 @@ CreatureAI* GetAI_boss_taldaram(Creature* pCreature) return new boss_taldaramAI(pCreature); } -bool EffectDummyCreature_spell_conjure_flame_orbs(Unit* /*pCaster*/, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) +bool EffectDummyCreature_spell_conjure_flame_orbs(Unit* /*pCaster*/, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget, ObjectGuid /*originalCasterGuid*/) { // always check spellid and effectindex if (uiSpellId == SPELL_CONJURE_FLAME_SPHERE && uiEffIndex == EFFECT_INDEX_0) diff --git a/scripts/northrend/borean_tundra.cpp b/scripts/northrend/borean_tundra.cpp index fec54cccc..96dab56b1 100644 --- a/scripts/northrend/borean_tundra.cpp +++ b/scripts/northrend/borean_tundra.cpp @@ -209,7 +209,7 @@ CreatureAI* GetAI_npc_oil_stained_wolf(Creature* pCreature) return new npc_oil_stained_wolfAI(pCreature); } -bool EffectDummyCreature_npc_oil_stained_wolf(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) +bool EffectDummyCreature_npc_oil_stained_wolf(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget, ObjectGuid /*originalCasterGuid*/) { if (uiSpellId == SPELL_THROW_WOLF_BAIT) { diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp index 51619662a..68e272b5c 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp @@ -512,7 +512,7 @@ CreatureAI* GetAI_npc_anubarak_trial_spike(Creature* pCreature) return new npc_anubarak_trial_spikeAI(pCreature); } -bool EffectDummyCreature_spell_dummy_permafrost(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) +bool EffectDummyCreature_spell_dummy_permafrost(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget, ObjectGuid /*originalCasterGuid*/) { // always check spellid and effectindex if (uiSpellId == SPELL_PERMAFROST_DUMMY && uiEffIndex == EFFECT_INDEX_0) diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/pit_of_saron.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/pit_of_saron.cpp index 29a9a2bae..22e22eed0 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/pit_of_saron.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/pit_of_saron.cpp @@ -87,7 +87,7 @@ CreatureAI* GetAI_npc_ymirjar_deathbringer(Creature* pCreature) return new npc_ymirjar_deathbringerAI(pCreature); } -bool EffectDummyCreature_spell_summon_undead(Unit* /*pCaster*/, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) +bool EffectDummyCreature_spell_summon_undead(Unit* /*pCaster*/, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget, ObjectGuid /*originalCasterGuid*/) { // always check spellid and effectindex if (uiSpellId == SPELL_SUMMON_UNDEAD && uiEffIndex == EFFECT_INDEX_0) diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lady_deathwhisper.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lady_deathwhisper.cpp index 2ba9e19ce..fb626f472 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lady_deathwhisper.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lady_deathwhisper.cpp @@ -469,7 +469,7 @@ CreatureAI* GetAI_boss_lady_deathwhisper(Creature* pCreature) return new boss_lady_deathwhisperAI(pCreature); } -bool EffectDummyCreature_spell_mana_barrier(Unit* /*pCaster*/, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) +bool EffectDummyCreature_spell_mana_barrier(Unit* /*pCaster*/, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget, ObjectGuid /*originalCasterGuid*/) { // always check spellid and effectindex if (uiSpellId == SPELL_MANA_BARRIER && uiEffIndex == EFFECT_INDEX_0) diff --git a/scripts/northrend/naxxramas/boss_gothik.cpp b/scripts/northrend/naxxramas/boss_gothik.cpp index aeb529eb1..a2bda6c50 100644 --- a/scripts/northrend/naxxramas/boss_gothik.cpp +++ b/scripts/northrend/naxxramas/boss_gothik.cpp @@ -449,7 +449,7 @@ CreatureAI* GetAI_boss_gothik(Creature* pCreature) return new boss_gothikAI(pCreature); } -bool EffectDummyCreature_spell_anchor(Unit* /*pCaster*/, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) +bool EffectDummyCreature_spell_anchor(Unit* /*pCaster*/, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget, ObjectGuid /*originalCasterGuid*/) { if (uiEffIndex != EFFECT_INDEX_0 || pCreatureTarget->GetEntry() != NPC_SUB_BOSS_TRIGGER) return true; diff --git a/scripts/northrend/naxxramas/boss_thaddius.cpp b/scripts/northrend/naxxramas/boss_thaddius.cpp index 20d10f626..ccca652a4 100644 --- a/scripts/northrend/naxxramas/boss_thaddius.cpp +++ b/scripts/northrend/naxxramas/boss_thaddius.cpp @@ -246,7 +246,7 @@ CreatureAI* GetAI_boss_thaddius(Creature* pCreature) return new boss_thaddiusAI(pCreature); } -bool EffectDummyNPC_spell_thaddius_encounter(Unit* /*pCaster*/, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) +bool EffectDummyNPC_spell_thaddius_encounter(Unit* /*pCaster*/, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget, ObjectGuid /*originalCasterGuid*/) { switch (uiSpellId) { diff --git a/scripts/northrend/nexus/nexus/boss_ormorok.cpp b/scripts/northrend/nexus/nexus/boss_ormorok.cpp index c87954d82..32d859596 100644 --- a/scripts/northrend/nexus/nexus/boss_ormorok.cpp +++ b/scripts/northrend/nexus/nexus/boss_ormorok.cpp @@ -207,7 +207,7 @@ CreatureAI* GetAI_boss_ormorok(Creature* pCreature) return new boss_ormorokAI(pCreature); } -bool EffectDummyCreature_npc_crystal_spike_trigger(Unit* /*pCaster*/, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) +bool EffectDummyCreature_npc_crystal_spike_trigger(Unit* /*pCaster*/, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget, ObjectGuid /*originalCasterGuid*/) { // always check spellid and effectindex if (uiSpellId == SPELL_CRYSTAL_SPIKE_AURA && uiEffIndex == EFFECT_INDEX_0) diff --git a/scripts/northrend/ulduar/halls_of_lightning/boss_ionar.cpp b/scripts/northrend/ulduar/halls_of_lightning/boss_ionar.cpp index 1683b3d47..dd02eab7a 100644 --- a/scripts/northrend/ulduar/halls_of_lightning/boss_ionar.cpp +++ b/scripts/northrend/ulduar/halls_of_lightning/boss_ionar.cpp @@ -293,7 +293,7 @@ CreatureAI* GetAI_boss_ionar(Creature* pCreature) return new boss_ionarAI(pCreature); } -bool EffectDummyCreature_boss_ionar(Unit* /*pCaster*/, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) +bool EffectDummyCreature_boss_ionar(Unit* /*pCaster*/, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget, ObjectGuid /*originalCasterGuid*/) { // always check spellid and effectindex if (uiSpellId == SPELL_DISPERSE && uiEffIndex == EFFECT_INDEX_0) diff --git a/scripts/northrend/ulduar/halls_of_lightning/boss_volkhan.cpp b/scripts/northrend/ulduar/halls_of_lightning/boss_volkhan.cpp index 9b0303468..12b857347 100644 --- a/scripts/northrend/ulduar/halls_of_lightning/boss_volkhan.cpp +++ b/scripts/northrend/ulduar/halls_of_lightning/boss_volkhan.cpp @@ -269,7 +269,7 @@ CreatureAI* GetAI_boss_volkhan(Creature* pCreature) return new boss_volkhanAI(pCreature); } -bool EffectDummyCreature_boss_volkhan(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) +bool EffectDummyCreature_boss_volkhan(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget, ObjectGuid /*originalCasterGuid*/) { // always check spellid and effectindex if (uiSpellId == SPELL_TEMPER_DUMMY && uiEffIndex == EFFECT_INDEX_0) @@ -291,7 +291,7 @@ bool EffectDummyCreature_boss_volkhan(Unit* pCaster, uint32 uiSpellId, SpellEffe ## npc_volkhan_anvil ######*/ -bool EffectDummyCreature_npc_volkhan_anvil(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) +bool EffectDummyCreature_npc_volkhan_anvil(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget, ObjectGuid /*originalCasterGuid*/) { // always check spellid and effectindex if (uiSpellId == SPELL_TEMPER && uiEffIndex == EFFECT_INDEX_0) diff --git a/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_gortok.cpp b/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_gortok.cpp index 58b0c7659..cbc1b342a 100644 --- a/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_gortok.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_gortok.cpp @@ -137,7 +137,7 @@ CreatureAI* GetAI_boss_gortok(Creature* pCreature) return new boss_gortokAI(pCreature); } -bool EffectDummyCreature_spell_awaken_gortok(Unit* /*pCaster*/, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) +bool EffectDummyCreature_spell_awaken_gortok(Unit* /*pCaster*/, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget, ObjectGuid /*originalCasterGuid*/) { // always check spellid and effectindex if (uiSpellId == SPELL_AWAKEN_GORTOK && uiEffIndex == EFFECT_INDEX_0) diff --git a/scripts/northrend/violet_hold/violet_hold.cpp b/scripts/northrend/violet_hold/violet_hold.cpp index 557385c46..068a83711 100644 --- a/scripts/northrend/violet_hold/violet_hold.cpp +++ b/scripts/northrend/violet_hold/violet_hold.cpp @@ -49,7 +49,7 @@ bool GOUse_go_activation_crystal(Player* pPlayer, GameObject* pGo) ## npc_door_seal ######*/ -bool EffectDummyCreature_npc_door_seal(Unit* /*pCaster*/, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) +bool EffectDummyCreature_npc_door_seal(Unit* /*pCaster*/, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget, ObjectGuid /*originalCasterGuid*/) { // always check spellid and effectindex if (uiSpellId == SPELL_DESTROY_DOOR_SEAL && uiEffIndex == EFFECT_INDEX_0) @@ -583,7 +583,7 @@ CreatureAI* GetAI_npc_teleportation_portal(Creature* pCreature) return new npc_teleportation_portalAI(pCreature); } -bool EffectDummyCreature_npc_teleportation_portal(Unit* /*pCaster*/, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) +bool EffectDummyCreature_npc_teleportation_portal(Unit* /*pCaster*/, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget, ObjectGuid /*originalCasterGuid*/) { // always check spellid and effectindex if (uiSpellId == SPELL_PORTAL_PERIODIC && uiEffIndex == EFFECT_INDEX_0) diff --git a/scripts/outland/coilfang_reservoir/slave_pens/boss_ahune.cpp b/scripts/outland/coilfang_reservoir/slave_pens/boss_ahune.cpp index 5f6017127..5b37c2c53 100644 --- a/scripts/outland/coilfang_reservoir/slave_pens/boss_ahune.cpp +++ b/scripts/outland/coilfang_reservoir/slave_pens/boss_ahune.cpp @@ -375,7 +375,7 @@ CreatureAI* GetAI_npc_ice_spear_bunny(Creature* pCreature) return new npc_ice_spear_bunnyAI(pCreature); } -bool EffectDummyCreature_npc_ice_spear_bunny(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) +bool EffectDummyCreature_npc_ice_spear_bunny(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget, ObjectGuid /*originalCasterGuid*/) { // always check spellid and effectindex if (uiSpellId == SPELL_ICE_SPEAR_DELAY && uiEffIndex == EFFECT_INDEX_0) diff --git a/scripts/outland/hellfire_peninsula.cpp b/scripts/outland/hellfire_peninsula.cpp index c9a80bd3c..61be3b23e 100644 --- a/scripts/outland/hellfire_peninsula.cpp +++ b/scripts/outland/hellfire_peninsula.cpp @@ -512,7 +512,7 @@ CreatureAI* GetAI_npc_fel_guard_hound(Creature* pCreature) return new npc_fel_guard_houndAI(pCreature); } -bool EffectDummyCreature_npc_fel_guard_hound(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) +bool EffectDummyCreature_npc_fel_guard_hound(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget, ObjectGuid /*originalCasterGuid*/) { // always check spellid and effectindex if (uiSpellId == SPELL_INFORM_DOG && uiEffIndex == EFFECT_INDEX_0) diff --git a/scripts/outland/shadowmoon_valley.cpp b/scripts/outland/shadowmoon_valley.cpp index 8f9c61c9f..1b4c64185 100644 --- a/scripts/outland/shadowmoon_valley.cpp +++ b/scripts/outland/shadowmoon_valley.cpp @@ -413,7 +413,7 @@ CreatureAI* GetAI_npc_dragonmaw_peon(Creature* pCreature) return new npc_dragonmaw_peonAI(pCreature); } -bool EffectDummyCreature_npc_dragonmaw_peon(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) +bool EffectDummyCreature_npc_dragonmaw_peon(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget, ObjectGuid /*originalCasterGuid*/) { if (uiEffIndex != EFFECT_INDEX_1 || uiSpellId != SPELL_SERVING_MUTTON || pCaster->GetTypeId() != TYPEID_PLAYER) return false; @@ -1230,7 +1230,7 @@ CreatureAI* GetAI_npc_totem_of_spirits(Creature* pCreature) return new npc_totem_of_spiritsAI(pCreature); } -bool EffectDummyCreature_npc_totem_of_spirits(Unit* /*pCaster*/, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) +bool EffectDummyCreature_npc_totem_of_spirits(Unit* /*pCaster*/, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget, ObjectGuid /*originalCasterGuid*/) { if (uiEffIndex != EFFECT_INDEX_0) return false; @@ -1773,7 +1773,7 @@ CreatureAI* GetAI_npc_domesticated_felboar(Creature* pCreature) return new npc_domesticated_felboarAI(pCreature); } -bool EffectDummyCreature_npc_shadowmoon_tuber_node(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) +bool EffectDummyCreature_npc_shadowmoon_tuber_node(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget, ObjectGuid /*originalCasterGuid*/) { // always check spellid and effectindex if (uiSpellId == SPELL_TUBER_WHISTLE && uiEffIndex == EFFECT_INDEX_0) diff --git a/scripts/outland/tempest_keep/the_eye/boss_kaelthas.cpp b/scripts/outland/tempest_keep/the_eye/boss_kaelthas.cpp index bcef08622..bc32c1fb9 100644 --- a/scripts/outland/tempest_keep/the_eye/boss_kaelthas.cpp +++ b/scripts/outland/tempest_keep/the_eye/boss_kaelthas.cpp @@ -701,7 +701,7 @@ struct MANGOS_DLL_DECL boss_kaelthasAI : public ScriptedAI } }; -bool EffectDummyCreature_kael_phase_2(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) +bool EffectDummyCreature_kael_phase_2(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget, ObjectGuid /*originalCasterGuid*/) { // always check spellid and effectindex if (uiSpellId == SPELL_KAEL_PHASE_2 && uiEffIndex == EFFECT_INDEX_0) diff --git a/scripts/world/npcs_special.cpp b/scripts/world/npcs_special.cpp index 4be123d22..f30195b22 100644 --- a/scripts/world/npcs_special.cpp +++ b/scripts/world/npcs_special.cpp @@ -1342,7 +1342,7 @@ CreatureAI* GetAI_npc_redemption_target(Creature* pCreature) return new npc_redemption_targetAI(pCreature); } -bool EffectDummyCreature_npc_redemption_target(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) +bool EffectDummyCreature_npc_redemption_target(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget, ObjectGuid /*originalCasterGuid*/) { // always check spellid and effectindex if ((uiSpellId == SPELL_SYMBOL_OF_LIFE || uiSpellId == SPELL_SHIMMERING_VESSEL) && uiEffIndex == EFFECT_INDEX_0) diff --git a/scripts/world/spell_scripts.cpp b/scripts/world/spell_scripts.cpp index 7974e4fd9..6b9be47ba 100644 --- a/scripts/world/spell_scripts.cpp +++ b/scripts/world/spell_scripts.cpp @@ -68,7 +68,7 @@ enum ITEM_TASTY_REEF_FISH = 34127, }; -bool EffectDummyGameObj_spell_dummy_go(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, GameObject* pGOTarget) +bool EffectDummyGameObj_spell_dummy_go(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, GameObject* pGOTarget, ObjectGuid /*originalCasterGuid*/) { switch (uiSpellId) { @@ -520,7 +520,7 @@ bool EffectAuraDummy_spell_aura_dummy_npc(const Aura* pAura, bool bApply) return false; } -bool EffectDummyCreature_spell_dummy_npc(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) +bool EffectDummyCreature_spell_dummy_npc(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget, ObjectGuid /*originalCasterGuid*/) { switch (uiSpellId) { diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 163c40149..b6baf6f95 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2900" + #define SD2_REVISION_NR "2901" #endif // __SD2_REVISION_NR_H__ diff --git a/sd2_revision_sql.h b/sd2_revision_sql.h index f47a90c17..997c33355 100644 --- a/sd2_revision_sql.h +++ b/sd2_revision_sql.h @@ -1,5 +1,5 @@ #ifndef __SD2_REVISION_SQL_H__ #define __SD2_REVISION_SQL_H__ -#define REVISION_DB_SCRIPTDEV2 "required__scriptdev2" -#define REVISION_DB_SD2_MANGOS "required__mangos" + #define REVISION_DB_SCRIPTDEV2 "required__scriptdev2" + #define REVISION_DB_SD2_MANGOS "required__mangos" #endif // __SD2_REVISION_SQL_H__ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 9c84414eb..bfc0abc9b 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -3,7 +3,7 @@ -- DELETE FROM sd2_db_version; -INSERT INTO sd2_db_version (version) VALUES ('ScriptDev2 (for CMaNGOS 12491+) '); +INSERT INTO sd2_db_version (version) VALUES ('ScriptDev2 (for CMaNGOS 12514+) '); -- -- Below contains data for table `script_texts` mainly used in C++ parts. diff --git a/sql/updates/r2901_scriptdev2.sql b/sql/updates/r2901_scriptdev2.sql new file mode 100644 index 000000000..6b922423c --- /dev/null +++ b/sql/updates/r2901_scriptdev2.sql @@ -0,0 +1 @@ +UPDATE sd2_db_version SET version='ScriptDev2 (for CMaNGOS 12514+) '; From 396baf662e840acc158adcb505d8b3a368f79127 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sat, 1 Jun 2013 02:57:01 +0300 Subject: [PATCH 0909/1172] [2902] Implement Simon Game - quests 11058 and 11080 Thanks to X-Savior for providing the necessary data --- scripts/outland/blades_edge_mountains.cpp | 431 +++++++++++++++++++++- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 + sql/updates/r2902_mangos.sql | 1 + 4 files changed, 433 insertions(+), 2 deletions(-) create mode 100644 sql/updates/r2902_mangos.sql diff --git a/scripts/outland/blades_edge_mountains.cpp b/scripts/outland/blades_edge_mountains.cpp index 49a264f05..2fbfbe7bf 100644 --- a/scripts/outland/blades_edge_mountains.cpp +++ b/scripts/outland/blades_edge_mountains.cpp @@ -17,7 +17,7 @@ /* ScriptData SDName: Blades_Edge_Mountains SD%Complete: 90 -SDComment: Quest support: 10503, 10504, 10512, 10545, 10556, 10609. (npc_daranelle needs bit more work before consider complete) +SDComment: Quest support: 10503, 10504, 10512, 10545, 10556, 10609, 11058, 11080. (npc_daranelle needs bit more work before consider complete) SDCategory: Blade's Edge Mountains EndScriptData */ @@ -25,6 +25,7 @@ EndScriptData */ mobs_nether_drake npc_daranelle npc_bloodmaul_stout_trigger +npc_simon_game_bunny EndContentData */ #include "precompiled.h" @@ -372,6 +373,427 @@ CreatureAI* GetAI_npc_bloodmaul_stout_trigger(Creature* pCreature) return new npc_bloodmaul_stout_triggerAI(pCreature); } +/*###### +## npc_simon_game_bunny +######*/ + +enum +{ + // sounds + SOUND_ID_BLUE = 11588, + SOUND_ID_GREEN = 11589, + SOUND_ID_RED = 11590, + SOUND_ID_YELLOW = 11591, + SOUND_ID_DISABLE_NODE = 11758, + + // generic spells + SPELL_SIMON_GAME_START = 39993, // aura used to prepare the AI game + SPELL_PRE_EVENT_TIMER = 40041, // aura used to handle the color sequence + + // stage prepare spells (summons the colored auras) + SPELL_PRE_GAME_BLUE_AURA = 40176, + SPELL_PRE_GAME_GREEN_AURA = 40177, + SPELL_PRE_GAME_RED_AURA = 40178, + SPELL_PRE_GAME_YELLOW_AURA = 40179, + + // stage prepare spells large + SPELL_PRE_GAME_YELLOW_LARGE = 41110, + SPELL_PRE_GAME_RED_LARGE = 41111, + SPELL_PRE_GAME_GREEN_LARGE = 41112, + SPELL_PRE_GAME_BLUE_LARGE = 41113, + + // visual spells which define which buttons are pressed + SPELL_BUTTON_PUSH_BLUE = 40244, + SPELL_BUTTON_PUSH_GREEN = 40245, + SPELL_BUTTON_PUSH_RED = 40246, + SPELL_BUTTON_PUSH_YELLOW = 40247, + + // allow the clusters to be used and despawns the visual auras + SPELL_GAME_START_RED = 40169, + SPELL_GAME_START_BLUE = 40170, + SPELL_GAME_START_GREEN = 40171, + SPELL_GAME_START_YELLOW = 40172, + + // locks the clusters after a stage is completed + SPELL_GAME_END_BLUE = 40283, + SPELL_GAME_END_GREEN = 40284, + SPELL_GAME_END_RED = 40285, + SPELL_GAME_END_YELLOW = 40286, + + // other spells + // SPELL_SWITCHED_ON_OFF = 40512, // decharger lock (not used) + // SPELL_SWITCHED_ON_OFF_2 = 40499, // decharger unlock (not used) + SPELL_SWITCHED_ON = 40494, // apexis lock spell + SPELL_SWITCHED_OFF = 40495, // apexis unlock spell + + // misc visual spells + SPELL_VISUAL_LEVEL_START = 40436, // on Player game begin + SPELL_VISUAL_GAME_FAILED = 40437, // on Player game fail + SPELL_VISUAL_GAME_START = 40387, // on AI game begin + SPELL_VISUAL_GAME_TICK = 40391, // game tick (sound) + SPELL_VISUAL_GAME_TICK_LARGE = 42019, // game tick large (sound) + + // spells used by the player on GO press + SPELL_INTROSPECTION_GREEN = 40055, + SPELL_INTROSPECTION_BLUE = 40165, + SPELL_INTROSPECTION_RED = 40166, + SPELL_INTROSPECTION_YELLOW = 40167, + + // button press results + SPELL_SIMON_BUTTON_PRESSED = 39999, + SPELL_GOOD_PRESS = 40063, + SPELL_BAD_PRESS = 41241, // single player punishment + SPELL_SIMON_GROUP_REWARD = 41952, // group punishment + + // quest rewards + SPELL_APEXIS_VIBRATIONS = 40310, // quest complete spell + SPELL_APEXIS_EMANATIONS = 40311, // quest complete spell + SPELL_APEXIS_ENLIGHTENMENT = 40312, // quest complete spell + + // other + NPC_SIMON_GAME_BUNNY = 22923, + + GO_APEXIS_RELIC = 185890, + GO_APEXIS_MONUMENT = 185944, + + QUEST_AN_APEXIS_RELIC = 11058, + QUEST_RELICS_EMANATION = 11080, + + // colors + COLOR_IDX_BLUE = 0, + COLOR_IDX_GREEN = 1, + COLOR_IDX_RED = 2, + COLOR_IDX_YELLOW = 3, + + // phases + PHASE_LEVEL_PREPARE = 1, + PHASE_AI_GAME = 2, + PHASE_PLAYER_PREPARE = 3, + PHASE_PLAYER_GAME = 4, + PHASE_LEVEL_FINISHED = 5, + + MAX_SIMON_LEVELS = 8, // counts the max levels of the game + MAX_SIMON_FAIL_TIMER = 5, // counts the delay in which the player is allowed to click +}; + +struct SimonGame +{ + uint8 m_uiColor; + uint32 m_uiVisual, m_uiIntrospection, m_uiSoundId; +}; + +static const SimonGame aApexisGameData[4] = +{ + {COLOR_IDX_BLUE, SPELL_BUTTON_PUSH_BLUE, SPELL_INTROSPECTION_BLUE, SOUND_ID_BLUE}, + {COLOR_IDX_GREEN, SPELL_BUTTON_PUSH_GREEN, SPELL_INTROSPECTION_GREEN, SOUND_ID_GREEN}, + {COLOR_IDX_RED, SPELL_BUTTON_PUSH_RED, SPELL_INTROSPECTION_RED, SOUND_ID_RED}, + {COLOR_IDX_YELLOW, SPELL_BUTTON_PUSH_YELLOW, SPELL_INTROSPECTION_YELLOW, SOUND_ID_YELLOW} +}; + +struct MANGOS_DLL_DECL npc_simon_game_bunnyAI : public ScriptedAI +{ + npc_simon_game_bunnyAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } + + uint8 m_uiGamePhase; + + uint32 m_uiLevelCount; + uint32 m_uiLevelStage; + uint32 m_uiPlayerStage; + + std::vector m_vColors; + bool m_bIsLargeEvent; + bool m_bIsEventStarted; + + ObjectGuid m_masterPlayerGuid; + + void Reset() override + { + m_uiGamePhase = PHASE_LEVEL_PREPARE; + m_bIsEventStarted = false; + + m_uiLevelCount = 0; + m_uiLevelStage = 0; + m_uiPlayerStage = 0; + } + + void GetAIInformation(ChatHandler& reader) override + { + reader.PSendSysMessage("Simon Game Bunny, current game phase = %u, current level = %u", m_uiGamePhase, m_uiLevelCount); + } + + // Prepare levels + void DoPrepareLevel() + { + // this visual is cast only after the first level + if (m_uiLevelCount) + DoCastSpellIfCan(m_creature, SPELL_VISUAL_GAME_START, CAST_TRIGGERED); + // this part is done only on the first tick + else + { + // lock apexis + DoCastSpellIfCan(m_creature, SPELL_SWITCHED_ON, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_PRE_EVENT_TIMER, CAST_TRIGGERED | CAST_AURA_NOT_PRESENT); + + // Get original summoner + if (m_creature->IsTemporarySummon()) + m_masterPlayerGuid = ((TemporarySummon*)m_creature)->GetSummonerGuid(); + + // Get closest apexis + if (GameObject* pGo = GetClosestGameObjectWithEntry(m_creature, GO_APEXIS_RELIC, 5.0f)) + m_bIsLargeEvent = false; + else if (GameObject* pGo = GetClosestGameObjectWithEntry(m_creature, GO_APEXIS_MONUMENT, 17.0f)) + m_bIsLargeEvent = true; + } + + // prepare the buttons and summon the visual auras + DoCastSpellIfCan(m_creature, m_bIsLargeEvent ? SPELL_PRE_GAME_BLUE_LARGE : SPELL_PRE_GAME_BLUE_AURA, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, m_bIsLargeEvent ? SPELL_PRE_GAME_GREEN_LARGE : SPELL_PRE_GAME_GREEN_AURA, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, m_bIsLargeEvent ? SPELL_PRE_GAME_RED_LARGE : SPELL_PRE_GAME_RED_AURA, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, m_bIsLargeEvent ? SPELL_PRE_GAME_YELLOW_LARGE : SPELL_PRE_GAME_YELLOW_AURA, CAST_TRIGGERED); + + m_vColors.clear(); + ++m_uiLevelCount; + } + + // Setup the color sequence + void DoSetupLevel() + { + uint8 uiIndex = urand(COLOR_IDX_BLUE, COLOR_IDX_YELLOW); + m_vColors.push_back(uiIndex); + + DoCastSpellIfCan(m_creature, aApexisGameData[uiIndex].m_uiVisual); + DoPlaySoundToSet(m_creature, aApexisGameData[uiIndex].m_uiSoundId); + } + + // Setup the player level - called at the beginning at each player level + void DoSetupPlayerLevel() + { + // allow the buttons to be used and despawn the visual auras + DoCastSpellIfCan(m_creature, SPELL_GAME_START_RED, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_GAME_START_BLUE, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_GAME_START_GREEN, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_GAME_START_YELLOW, CAST_TRIGGERED); + } + + // Complete level - called when one level is completed succesfully + void DoCompleteLevel() + { + // lock the buttons + DoCastSpellIfCan(m_creature, SPELL_GAME_END_RED, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_GAME_END_BLUE, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_GAME_END_GREEN, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_GAME_END_YELLOW, CAST_TRIGGERED); + + // Complete game if all the levels + if (m_uiLevelCount == MAX_SIMON_LEVELS) + DoCompleteGame(); + } + + // Complete event - called when the game has been completed succesfully + void DoCompleteGame() + { + // ToDo: not sure if the quest reward spells are implemented right. They all give the same buff but with a different duration + if (Player* pPlayer = m_creature->GetMap()->GetPlayer(m_masterPlayerGuid)) + { + if (Group* pGroup = pPlayer->GetGroup()) + { + for (GroupReference* pRef = pGroup->GetFirstMember(); pRef != NULL; pRef = pRef->next()) + { + if (Player* pMember = pRef->getSource()) + { + // distance check - they need to be close to the Apexis + if (!pMember->IsWithinDistInMap(m_creature, 20.0f)) + continue; + + // on group event cast Enlightment on daily quest and Emanations on normal quest + if (pMember->GetQuestStatus(QUEST_AN_APEXIS_RELIC) == QUEST_STATUS_INCOMPLETE) + DoCastSpellIfCan(pMember, SPELL_APEXIS_EMANATIONS, CAST_TRIGGERED); + else if (pMember->GetQuestStatus(QUEST_RELICS_EMANATION) == QUEST_STATUS_INCOMPLETE) + DoCastSpellIfCan(pMember, SPELL_APEXIS_ENLIGHTENMENT, CAST_TRIGGERED); + } + } + } + else + { + // solo event - cast Emanations on daily quest and vibrations on normal quest + if (pPlayer->GetQuestStatus(QUEST_AN_APEXIS_RELIC) == QUEST_STATUS_INCOMPLETE) + DoCastSpellIfCan(pPlayer, SPELL_APEXIS_VIBRATIONS, CAST_TRIGGERED); + else if (pPlayer->GetQuestStatus(QUEST_RELICS_EMANATION) == QUEST_STATUS_INCOMPLETE) + DoCastSpellIfCan(pPlayer, SPELL_APEXIS_EMANATIONS, CAST_TRIGGERED); + } + } + + // cleanup event after quest is finished + DoCastSpellIfCan(m_creature, SPELL_SWITCHED_OFF, CAST_TRIGGERED); + DoPlaySoundToSet(m_creature, SOUND_ID_DISABLE_NODE); + m_creature->ForcedDespawn(); + } + + // Cleanup event - called when event fails + void DoCleanupGame() + { + // lock the buttons + DoCastSpellIfCan(m_creature, SPELL_GAME_END_RED, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_GAME_END_BLUE, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_GAME_END_GREEN, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_GAME_END_YELLOW, CAST_TRIGGERED); + + // unlock apexis and despawn + DoCastSpellIfCan(m_creature, SPELL_SWITCHED_OFF, CAST_TRIGGERED); + DoPlaySoundToSet(m_creature, SOUND_ID_DISABLE_NODE); + m_creature->ForcedDespawn(); + } + + void ReceiveAIEvent(AIEventType eventType, Creature* /*pSender*/, Unit* pInvoker, uint32 uiMiscValue) override + { + switch (m_uiGamePhase) + { + case PHASE_LEVEL_PREPARE: + // delay before each level - handled by big timer aura + if (eventType == AI_EVENT_CUSTOM_A) + m_uiGamePhase = PHASE_AI_GAME; + break; + case PHASE_AI_GAME: + // AI game - handled by small timer aura + if (eventType == AI_EVENT_CUSTOM_B) + { + // Move to next phase if the level is setup + if (m_uiLevelStage == m_uiLevelCount) + { + m_uiGamePhase = PHASE_PLAYER_PREPARE; + m_uiLevelStage = 0; + return; + } + + DoSetupLevel(); + ++m_uiLevelStage; + } + break; + case PHASE_PLAYER_PREPARE: + // Player prepare - handled by small timer aura + if (eventType == AI_EVENT_CUSTOM_B) + { + DoCastSpellIfCan(m_creature, SPELL_VISUAL_LEVEL_START, CAST_TRIGGERED); + DoSetupPlayerLevel(); + + m_uiGamePhase = PHASE_PLAYER_GAME; + m_uiPlayerStage = 0; + } + break; + case PHASE_PLAYER_GAME: + // Player game - listen to the player moves + if (eventType == AI_EVENT_CUSTOM_C) + { + // good button pressed + if (uiMiscValue == aApexisGameData[m_vColors[m_uiLevelStage]].m_uiIntrospection) + { + DoCastSpellIfCan(m_creature, SPELL_GOOD_PRESS, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, aApexisGameData[m_vColors[m_uiLevelStage]].m_uiVisual, CAST_TRIGGERED); + + DoPlaySoundToSet(m_creature, aApexisGameData[m_vColors[m_uiLevelStage]].m_uiSoundId); + + // increase the level stage and reset the event counter + ++m_uiLevelStage; + m_uiPlayerStage = 0; + + // if all buttons were pressed succesfully, then move to next level + if (m_uiLevelStage == m_vColors.size()) + { + DoCompleteLevel(); + + m_uiLevelStage = 0; + m_uiGamePhase = PHASE_LEVEL_FINISHED; + } + // cast tick sound + else + DoCastSpellIfCan(pInvoker, m_bIsLargeEvent ? SPELL_VISUAL_GAME_TICK_LARGE : SPELL_VISUAL_GAME_TICK, CAST_TRIGGERED); + } + // bad button pressed + else + { + DoCastSpellIfCan(pInvoker, m_bIsLargeEvent ? SPELL_SIMON_GROUP_REWARD : SPELL_BAD_PRESS, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_VISUAL_GAME_FAILED, CAST_TRIGGERED); + DoCleanupGame(); + } + } + // AI ticks which handle the player timeout + else if (eventType == AI_EVENT_CUSTOM_B) + { + // if it takes too much time, the event will fail + if (m_uiPlayerStage == MAX_SIMON_FAIL_TIMER) + { + DoCastSpellIfCan(m_creature, SPELL_VISUAL_GAME_FAILED, CAST_TRIGGERED); + DoCleanupGame(); + } + + // Not sure if this is right, but we need to keep the buttons unlocked on every tick + DoSetupPlayerLevel(); + ++m_uiPlayerStage; + } + break; + case PHASE_LEVEL_FINISHED: + // small delay until the next level + if (eventType == AI_EVENT_CUSTOM_A) + { + DoPrepareLevel(); + m_uiGamePhase = PHASE_LEVEL_PREPARE; + } + break; + } + } + + void AttackStart(Unit* /*pWho*/) override { } + void MoveInLineOfSight(Unit* /*pWho*/) override { } + + void UpdateAI(const uint32 /*uiDiff*/) override + { + // Start game on first update tick - don't wait for dummy auras + if (!m_bIsEventStarted) + { + DoPrepareLevel(); + m_bIsEventStarted = true; + } + } +}; + +CreatureAI* GetAI_npc_simon_game_bunny(Creature* pCreature) +{ + return new npc_simon_game_bunnyAI(pCreature); +} + +bool EffectDummyCreature_npc_simon_game_bunny(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget, ObjectGuid /*originalCasterGuid*/) +{ + if (pCreatureTarget->GetEntry() != NPC_SIMON_GAME_BUNNY) + return false; + + if (uiSpellId == SPELL_SIMON_GAME_START && uiEffIndex == EFFECT_INDEX_0) + { + pCreatureTarget->AI()->SendAIEvent(AI_EVENT_CUSTOM_A, pCaster, pCreatureTarget); + return true; + } + else if (uiSpellId == SPELL_PRE_EVENT_TIMER && uiEffIndex == EFFECT_INDEX_0) + { + pCreatureTarget->AI()->SendAIEvent(AI_EVENT_CUSTOM_B, pCaster, pCreatureTarget); + return true; + } + + return false; +} + +bool EffectScriptEffectCreature_npc_simon_game_bunny(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget, ObjectGuid originalCasterGuid) +{ + if ((uiSpellId == SPELL_INTROSPECTION_BLUE || uiSpellId == SPELL_INTROSPECTION_GREEN || uiSpellId == SPELL_INTROSPECTION_RED || + uiSpellId == SPELL_INTROSPECTION_YELLOW) && uiEffIndex == EFFECT_INDEX_1) + { + if (pCreatureTarget->GetEntry() == NPC_SIMON_GAME_BUNNY && pCaster->GetTypeId() == TYPEID_PLAYER && originalCasterGuid.IsGameObject()) + pCreatureTarget->AI()->SendAIEvent(AI_EVENT_CUSTOM_C, pCaster, pCreatureTarget, uiSpellId); + + return true; + } + + return false; +} + void AddSC_blades_edge_mountains() { Script* pNewScript; @@ -390,4 +812,11 @@ void AddSC_blades_edge_mountains() pNewScript->Name = "npc_bloodmaul_stout_trigger"; pNewScript->GetAI = &GetAI_npc_bloodmaul_stout_trigger; pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_simon_game_bunny"; + pNewScript->GetAI = &GetAI_npc_simon_game_bunny; + pNewScript->pEffectDummyNPC = &EffectDummyCreature_npc_simon_game_bunny; + pNewScript->pEffectScriptEffectNPC = &EffectScriptEffectCreature_npc_simon_game_bunny; + pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index b6baf6f95..15506f030 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2901" + #define SD2_REVISION_NR "2902" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index aa28df254..6f7e5fc80 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -358,6 +358,7 @@ UPDATE creature_template SET ScriptName='boss_nefarian' WHERE entry=11583; UPDATE creature_template SET ScriptName='mobs_nether_drake' WHERE entry IN (20021,21817,21820,21821,21823); UPDATE creature_template SET ScriptName='npc_daranelle' WHERE entry=21469; UPDATE creature_template SET ScriptName='npc_bloodmaul_stout_trigger' WHERE entry=21241; +UPDATE creature_template SET ScriptName='npc_simon_game_bunny' WHERE entry=22923; /* BLASTED LANDS */ UPDATE creature_template SET ScriptName='npc_fallen_hero_of_horde' WHERE entry=7572; diff --git a/sql/updates/r2902_mangos.sql b/sql/updates/r2902_mangos.sql new file mode 100644 index 000000000..7650acd4b --- /dev/null +++ b/sql/updates/r2902_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_simon_game_bunny' WHERE entry=22923; From 4f72527b76b8ba554c26b25c2bd50fc10a9a9ba4 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sat, 1 Jun 2013 10:41:52 +0300 Subject: [PATCH 0910/1172] Fix mistake in previous commit --- scripts/outland/blades_edge_mountains.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/outland/blades_edge_mountains.cpp b/scripts/outland/blades_edge_mountains.cpp index 2fbfbe7bf..ff158dd8e 100644 --- a/scripts/outland/blades_edge_mountains.cpp +++ b/scripts/outland/blades_edge_mountains.cpp @@ -561,7 +561,7 @@ struct MANGOS_DLL_DECL npc_simon_game_bunnyAI : public ScriptedAI uint8 uiIndex = urand(COLOR_IDX_BLUE, COLOR_IDX_YELLOW); m_vColors.push_back(uiIndex); - DoCastSpellIfCan(m_creature, aApexisGameData[uiIndex].m_uiVisual); + DoCastSpellIfCan(m_creature, aApexisGameData[uiIndex].m_uiVisual, CAST_TRIGGERED); DoPlaySoundToSet(m_creature, aApexisGameData[uiIndex].m_uiSoundId); } From 33b334964eafebf928df7e17609aec5452652c55 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Mon, 3 Jun 2013 18:06:32 +0200 Subject: [PATCH 0911/1172] [2903] Update to CMaNGOS [12524] This requires and fixes compile for CMaNGOS [12524] - https://github.com/cmangos/mangos-wotlk/commit/d2fd4baf8d936 Also use the generic text storage now to load the data and display the texts --- ScriptMgr.cpp | 98 +++---------------------- sd2_revision_nr.h | 2 +- sql/scriptdev2_script_full.sql | 2 +- sql/updates/r2903_scriptdev2.sql | 1 + system/system.cpp | 118 +------------------------------ system/system.h | 22 ------ 6 files changed, 15 insertions(+), 228 deletions(-) create mode 100644 sql/updates/r2903_scriptdev2.sql diff --git a/ScriptMgr.cpp b/ScriptMgr.cpp index 88888abef..1fb8a623d 100644 --- a/ScriptMgr.cpp +++ b/ScriptMgr.cpp @@ -160,81 +160,8 @@ void DoScriptText(int32 iTextEntry, WorldObject* pSource, Unit* pTarget) return; } - const StringTextData* pData = pSystemMgr.GetTextData(iTextEntry); - if (!pData) - { - script_error_log("DoScriptText with source entry %u (TypeId=%u, guid=%u) could not find text entry %i.", - pSource->GetEntry(), pSource->GetTypeId(), pSource->GetGUIDLow(), iTextEntry); - - return; - } - - debug_log("SD2: DoScriptText: text entry=%i, Sound=%u, Type=%u, Language=%u, Emote=%u", - iTextEntry, pData->uiSoundId, pData->uiType, pData->uiLanguage, pData->uiEmote); - - if (pData->uiSoundId) - { - if (GetSoundEntriesStore()->LookupEntry(pData->uiSoundId)) - { - if (pData->uiType == CHAT_TYPE_ZONE_YELL) - pSource->GetMap()->PlayDirectSoundToMap(pData->uiSoundId, pSource->GetZoneId()); - else if (pData->uiType == CHAT_TYPE_WHISPER || pData->uiType == CHAT_TYPE_BOSS_WHISPER) - { - // An error will be displayed for the text - if (pTarget && pTarget->GetTypeId() == TYPEID_PLAYER) - pSource->PlayDirectSound(pData->uiSoundId, (Player*)pTarget); - } - else - pSource->PlayDirectSound(pData->uiSoundId); - } - else - script_error_log("DoScriptText entry %i tried to process invalid sound id %u.", iTextEntry, pData->uiSoundId); - } - - if (pData->uiEmote) - { - if (pSource->GetTypeId() == TYPEID_UNIT || pSource->GetTypeId() == TYPEID_PLAYER) - ((Unit*)pSource)->HandleEmote(pData->uiEmote); - else - script_error_log("DoScriptText entry %i tried to process emote for invalid TypeId (%u).", iTextEntry, pSource->GetTypeId()); - } - - switch (pData->uiType) - { - case CHAT_TYPE_SAY: - pSource->MonsterSay(iTextEntry, pData->uiLanguage, pTarget); - break; - case CHAT_TYPE_YELL: - pSource->MonsterYell(iTextEntry, pData->uiLanguage, pTarget); - break; - case CHAT_TYPE_TEXT_EMOTE: - pSource->MonsterTextEmote(iTextEntry, pTarget); - break; - case CHAT_TYPE_BOSS_EMOTE: - pSource->MonsterTextEmote(iTextEntry, pTarget, true); - break; - case CHAT_TYPE_WHISPER: - { - if (pTarget && pTarget->GetTypeId() == TYPEID_PLAYER) - pSource->MonsterWhisper(iTextEntry, pTarget); - else - script_error_log("DoScriptText entry %i cannot whisper without target unit (TYPEID_PLAYER).", iTextEntry); - - break; - } - case CHAT_TYPE_BOSS_WHISPER: - { - if (pTarget && pTarget->GetTypeId() == TYPEID_PLAYER) - pSource->MonsterWhisper(iTextEntry, pTarget, true); - else - script_error_log("DoScriptText entry %i cannot whisper without target unit (TYPEID_PLAYER).", iTextEntry); - - break; - } - case CHAT_TYPE_ZONE_YELL: - pSource->MonsterYellToZone(iTextEntry, pData->uiLanguage, pTarget); - break; - } + DoDisplayText(pSource, iTextEntry, pTarget); + // TODO - maybe add some call-stack like error output if above function returns false } /** @@ -267,7 +194,7 @@ void DoOrSimulateScriptTextForMap(int32 iTextEntry, uint32 uiCreatureEntry, Map* return; } - const StringTextData* pData = pSystemMgr.GetTextData(iTextEntry); + MangosStringLocale const* pData = GetMangosStringData(iTextEntry); if (!pData) { script_error_log("DoOrSimulateScriptTextForMap with source entry %u for map %u could not find text entry %i.", uiCreatureEntry, pMap->GetId(), iTextEntry); @@ -275,26 +202,21 @@ void DoOrSimulateScriptTextForMap(int32 iTextEntry, uint32 uiCreatureEntry, Map* } debug_log("SD2: DoOrSimulateScriptTextForMap: text entry=%i, Sound=%u, Type=%u, Language=%u, Emote=%u", - iTextEntry, pData->uiSoundId, pData->uiType, pData->uiLanguage, pData->uiEmote); + iTextEntry, pData->SoundId, pData->Type, pData->Language, pData->Emote); - if (pData->uiType != CHAT_TYPE_ZONE_YELL) + if (pData->Type != CHAT_TYPE_ZONE_YELL) { - script_error_log("DoSimulateScriptTextForMap entry %i has not supported chat type %u.", iTextEntry, pData->uiType); + script_error_log("DoSimulateScriptTextForMap entry %i has not supported chat type %u.", iTextEntry, pData->Type); return; } - if (pData->uiSoundId) - { - if (GetSoundEntriesStore()->LookupEntry(pData->uiSoundId)) - pMap->PlayDirectSoundToMap(pData->uiSoundId); - else - script_error_log("DoOrSimulateScriptTextForMap entry %i tried to process invalid sound id %u.", iTextEntry, pData->uiSoundId); - } + if (pData->SoundId) + pMap->PlayDirectSoundToMap(pData->SoundId); if (pCreatureSource) // If provided pointer for sayer, use direct version - pMap->MonsterYellToMap(pCreatureSource->GetObjectGuid(), iTextEntry, pData->uiLanguage, pTarget); + pMap->MonsterYellToMap(pCreatureSource->GetObjectGuid(), iTextEntry, pData->Language, pTarget); else // Simulate yell - pMap->MonsterYellToMap(pInfo, iTextEntry, pData->uiLanguage, pTarget); + pMap->MonsterYellToMap(pInfo, iTextEntry, pData->Language, pTarget); } //********************************* diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 15506f030..24056b96a 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2902" + #define SD2_REVISION_NR "2903" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index bfc0abc9b..3042a04f8 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -3,7 +3,7 @@ -- DELETE FROM sd2_db_version; -INSERT INTO sd2_db_version (version) VALUES ('ScriptDev2 (for CMaNGOS 12514+) '); +INSERT INTO sd2_db_version (version) VALUES ('ScriptDev2 (for CMaNGOS 12524+) '); -- -- Below contains data for table `script_texts` mainly used in C++ parts. diff --git a/sql/updates/r2903_scriptdev2.sql b/sql/updates/r2903_scriptdev2.sql new file mode 100644 index 000000000..5426b0915 --- /dev/null +++ b/sql/updates/r2903_scriptdev2.sql @@ -0,0 +1 @@ +UPDATE sd2_db_version SET version='ScriptDev2 (for CMaNGOS 12524+) '; diff --git a/system/system.cpp b/system/system.cpp index 6a58780d9..85921533c 100644 --- a/system/system.cpp +++ b/system/system.cpp @@ -51,127 +51,13 @@ void SystemMgr::LoadVersion() void SystemMgr::LoadScriptTexts() { outstring_log("SD2: Loading Script Texts..."); - LoadMangosStrings(SD2Database, "script_texts", TEXT_SOURCE_TEXT_START, TEXT_SOURCE_TEXT_END); - - QueryResult* pResult = SD2Database.PQuery("SELECT entry, sound, type, language, emote FROM script_texts WHERE entry BETWEEN %i AND %i", TEXT_SOURCE_GOSSIP_END, TEXT_SOURCE_TEXT_START); - - outstring_log("SD2: Loading Script Texts additional data..."); - - if (pResult) - { - BarGoLink bar(pResult->GetRowCount()); - uint32 uiCount = 0; - - do - { - bar.step(); - Field* pFields = pResult->Fetch(); - StringTextData pTemp; - - int32 iId = pFields[0].GetInt32(); - pTemp.uiSoundId = pFields[1].GetUInt32(); - pTemp.uiType = pFields[2].GetUInt32(); - pTemp.uiLanguage = pFields[3].GetUInt32(); - pTemp.uiEmote = pFields[4].GetUInt32(); - - if (iId >= 0) - { - error_db_log("SD2: Entry %i in table `script_texts` is not a negative value.", iId); - continue; - } - - if (pTemp.uiSoundId) - { - if (!GetSoundEntriesStore()->LookupEntry(pTemp.uiSoundId)) - error_db_log("SD2: Entry %i in table `script_texts` has soundId %u but sound does not exist.", iId, pTemp.uiSoundId); - } - - if (!GetLanguageDescByID(pTemp.uiLanguage)) - error_db_log("SD2: Entry %i in table `script_texts` using Language %u but Language does not exist.", iId, pTemp.uiLanguage); - - if (pTemp.uiType > CHAT_TYPE_ZONE_YELL) - error_db_log("SD2: Entry %i in table `script_texts` has Type %u but this Chat Type does not exist.", iId, pTemp.uiType); - - m_mTextDataMap[iId] = pTemp; - ++uiCount; - } - while (pResult->NextRow()); - - delete pResult; - - outstring_log(""); - outstring_log(">> Loaded %u additional Script Texts data.", uiCount); - } - else - { - BarGoLink bar(1); - bar.step(); - outstring_log(""); - outstring_log(">> Loaded 0 additional Script Texts data. DB table `script_texts` is empty."); - } + LoadMangosStrings(SD2Database, "script_texts", TEXT_SOURCE_TEXT_START, TEXT_SOURCE_TEXT_END, true); } void SystemMgr::LoadScriptTextsCustom() { outstring_log("SD2: Loading Custom Texts..."); - LoadMangosStrings(SD2Database, "custom_texts", TEXT_SOURCE_CUSTOM_START, TEXT_SOURCE_CUSTOM_END); - - QueryResult* pResult = SD2Database.PQuery("SELECT entry, sound, type, language, emote FROM custom_texts WHERE entry BETWEEN %i AND %i", TEXT_SOURCE_CUSTOM_END, TEXT_SOURCE_CUSTOM_START); - - outstring_log("SD2: Loading Custom Texts additional data..."); - - if (pResult) - { - BarGoLink bar(pResult->GetRowCount()); - uint32 uiCount = 0; - - do - { - bar.step(); - Field* pFields = pResult->Fetch(); - StringTextData pTemp; - - int32 iId = pFields[0].GetInt32(); - pTemp.uiSoundId = pFields[1].GetUInt32(); - pTemp.uiType = pFields[2].GetUInt32(); - pTemp.uiLanguage = pFields[3].GetUInt32(); - pTemp.uiEmote = pFields[4].GetUInt32(); - - if (iId >= 0) - { - error_db_log("SD2: Entry %i in table `custom_texts` is not a negative value.", iId); - continue; - } - - if (pTemp.uiSoundId) - { - if (!GetSoundEntriesStore()->LookupEntry(pTemp.uiSoundId)) - error_db_log("SD2: Entry %i in table `custom_texts` has soundId %u but sound does not exist.", iId, pTemp.uiSoundId); - } - - if (!GetLanguageDescByID(pTemp.uiLanguage)) - error_db_log("SD2: Entry %i in table `custom_texts` using Language %u but Language does not exist.", iId, pTemp.uiLanguage); - - if (pTemp.uiType > CHAT_TYPE_ZONE_YELL) - error_db_log("SD2: Entry %i in table `custom_texts` has Type %u but this Chat Type does not exist.", iId, pTemp.uiType); - - m_mTextDataMap[iId] = pTemp; - ++uiCount; - } - while (pResult->NextRow()); - - delete pResult; - - outstring_log(""); - outstring_log(">> Loaded %u additional Custom Texts data.", uiCount); - } - else - { - BarGoLink bar(1); - bar.step(); - outstring_log(""); - outstring_log(">> Loaded 0 additional Custom Texts data. DB table `custom_texts` is empty."); - } + LoadMangosStrings(SD2Database, "custom_texts", TEXT_SOURCE_CUSTOM_START, TEXT_SOURCE_CUSTOM_END, true); } void SystemMgr::LoadScriptGossipTexts() diff --git a/system/system.h b/system/system.h index 39b443d42..e718650d5 100644 --- a/system/system.h +++ b/system/system.h @@ -29,14 +29,6 @@ struct ScriptPointMove uint32 uiWaitTime; }; -struct StringTextData -{ - uint32 uiSoundId; - uint8 uiType; - uint32 uiLanguage; - uint32 uiEmote; -}; - #define pSystemMgr SystemMgr::Instance() class SystemMgr @@ -47,8 +39,6 @@ class SystemMgr static SystemMgr& Instance(); - // Maps and lists - typedef UNORDERED_MAP TextDataMap; typedef UNORDERED_MAP > PointMoveMap; // Database @@ -58,17 +48,6 @@ class SystemMgr void LoadScriptGossipTexts(); void LoadScriptWaypoints(); - // Retrive from storage - StringTextData const* GetTextData(int32 uiTextId) const - { - TextDataMap::const_iterator itr = m_mTextDataMap.find(uiTextId); - - if (itr == m_mTextDataMap.end()) - return NULL; - - return &itr->second; - } - std::vector const& GetPointMoveList(uint32 uiCreatureEntry) const { static std::vector vEmpty; @@ -82,7 +61,6 @@ class SystemMgr } protected: - TextDataMap m_mTextDataMap; // additional data for text strings PointMoveMap m_mPointMoveMap; // coordinates for waypoints }; From 58cdb4c9680afcabb998b434a1c328543f5391be Mon Sep 17 00:00:00 2001 From: Xfurry Date: Thu, 18 Jul 2013 00:50:30 +0300 Subject: [PATCH 0912/1172] [2904] Add script support for quest 9446 Thanks to grz3s for providing the necessary data --- .../eastern_kingdoms/western_plaguelands.cpp | 131 +++++++++++++++++- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 + sql/scriptdev2_script_full.sql | 58 +++++++- sql/updates/r2904_mangos.sql | 1 + sql/updates/r2904_scriptdev2.sql | 57 ++++++++ 6 files changed, 246 insertions(+), 4 deletions(-) create mode 100644 sql/updates/r2904_mangos.sql create mode 100644 sql/updates/r2904_scriptdev2.sql diff --git a/scripts/eastern_kingdoms/western_plaguelands.cpp b/scripts/eastern_kingdoms/western_plaguelands.cpp index dbdbc9af6..ffb7637b6 100644 --- a/scripts/eastern_kingdoms/western_plaguelands.cpp +++ b/scripts/eastern_kingdoms/western_plaguelands.cpp @@ -17,15 +17,17 @@ /* ScriptData SDName: Western_Plaguelands SD%Complete: 90 -SDComment: Quest support: 5216,5219,5222,5225,5229,5231,5233,5235. +SDComment: Quest support: 5216, 5219, 5222, 5225, 5229, 5231, 5233, 5235, 9446. SDCategory: Western Plaguelands EndScriptData */ /* ContentData npc_the_scourge_cauldron +npc_anchorite_truuen EndContentData */ #include "precompiled.h" +#include "escort_ai.h" /*###### ## npc_the_scourge_cauldron @@ -99,9 +101,128 @@ CreatureAI* GetAI_npc_the_scourge_cauldron(Creature* pCreature) } /*###### -## +## npc_anchorite_truuen ######*/ +enum +{ + SAY_BEGIN = -1000910, + SAY_FIRST_STOP = -1000911, + SAY_CONTINUE = -1000912, + SAY_FIRST_ATTACK = -1000913, + SAY_PURITY = -1000914, + SAY_SECOND_ATTACK = -1000915, + SAY_CLEANSE = -1000916, + SAY_WELCOME = -1000917, + SAY_EPILOGUE_1 = -1000918, + SAY_EPILOGUE_2 = -1000919, + + NPC_PRIEST_THELDANIS = 1854, + NPC_HUNGERING_WRAITH = 1802, + NPC_HAUNDING_VISION = 4472, + NPC_BLIGHTED_ZOMBIE = 4475, + NPC_GHOST_OF_UTHER = 17233, + + QUEST_ID_TOMB_LIGHTBRINGER = 9446, +}; + +struct MANGOS_DLL_DECL npc_anchorite_truuenAI: public npc_escortAI +{ + npc_anchorite_truuenAI(Creature* pCreature): npc_escortAI(pCreature) { Reset(); } + + ObjectGuid m_utherGhostGuid; + + void Reset() override { } + + void ReceiveAIEvent(AIEventType eventType, Creature* /*pSender*/, Unit* pInvoker, uint32 uiMiscValue) override + { + if (eventType == AI_EVENT_START_ESCORT && pInvoker->GetTypeId() == TYPEID_PLAYER) + { + DoScriptText(SAY_BEGIN, m_creature); + Start(false, (Player*)pInvoker, GetQuestTemplateStore(uiMiscValue)); + } + } + + void WaypointReached(uint32 uiPointId) override + { + switch (uiPointId) + { + case 4: + DoScriptText(SAY_FIRST_STOP, m_creature); + break; + case 5: + DoScriptText(SAY_CONTINUE, m_creature); + break; + case 10: + DoScriptText(SAY_FIRST_ATTACK, m_creature); + // spawn first attacker wave + m_creature->SummonCreature(NPC_HAUNDING_VISION, 1045.26f, -1576.50f, 62.42f, 2.82f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 30000); + m_creature->SummonCreature(NPC_HUNGERING_WRAITH, 1021.74f, -1547.49f, 63.44f, 5.24f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 30000); + break; + case 11: + DoScriptText(SAY_PURITY, m_creature); + break; + case 21: + DoScriptText(SAY_SECOND_ATTACK, m_creature); + // spawn second attacker wave + m_creature->SummonCreature(NPC_BLIGHTED_ZOMBIE, 1123.08f, -1738.70f, 61.65f, 3.63f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 30000); + m_creature->SummonCreature(NPC_BLIGHTED_ZOMBIE, 1117.07f, -1763.47f, 62.72f, 1.83f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 30000); + m_creature->SummonCreature(NPC_BLIGHTED_ZOMBIE, 1096.79f, -1719.14f, 62.69f, 4.88f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 30000); + m_creature->SummonCreature(NPC_BLIGHTED_ZOMBIE, 1068.92f, -1739.68f, 62.23f, 6.21f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 30000); + break; + case 22: + DoScriptText(SAY_CLEANSE, m_creature); + break; + case 35: + if (Creature* pPriest = GetClosestCreatureWithEntry(m_creature, NPC_PRIEST_THELDANIS, 60.0f)) + DoScriptText(SAY_WELCOME, pPriest); + break; + case 38: + m_creature->SetStandState(UNIT_STAND_STATE_KNEEL); + m_creature->SummonCreature(NPC_GHOST_OF_UTHER, 972.96f, -1824.82f, 82.54f, 0.27f, TEMPSUMMON_TIMED_DESPAWN, 45000); + // complete the quest - the event continues with the dialogue + if (Player* pPlayer = GetPlayerForEscort()) + pPlayer->GroupEventHappens(QUEST_ID_TOMB_LIGHTBRINGER, m_creature); + break; + case 39: + if (Creature* pUther = m_creature->GetMap()->GetCreature(m_utherGhostGuid)) + { + pUther->SetFacingToObject(m_creature); + DoScriptText(SAY_EPILOGUE_1, pUther); + } + break; + case 40: + if (Creature* pUther = m_creature->GetMap()->GetCreature(m_utherGhostGuid)) + DoScriptText(SAY_EPILOGUE_2, pUther); + break; + case 41: + m_creature->SetStandState(UNIT_STAND_STATE_STAND); + break; + } + } + + void JustSummoned(Creature* pSummoned) override + { + if (pSummoned->GetEntry() != NPC_GHOST_OF_UTHER) + pSummoned->AI()->AttackStart(m_creature); + else + m_utherGhostGuid = pSummoned->GetObjectGuid(); + } +}; + +CreatureAI* GetAI_npc_anchorite_truuen(Creature* pCreature) +{ + return new npc_anchorite_truuenAI(pCreature); +} + +bool QuestAccept_npc_anchorite_truuen(Player* pPlayer, Creature* pCreature, const Quest* pQuest) +{ + if (pQuest->GetQuestId() == QUEST_ID_TOMB_LIGHTBRINGER) + pCreature->AI()->SendAIEvent(AI_EVENT_START_ESCORT, pPlayer, pCreature, pQuest->GetQuestId()); + + return true; +} + void AddSC_western_plaguelands() { Script* pNewScript; @@ -110,4 +231,10 @@ void AddSC_western_plaguelands() pNewScript->Name = "npc_the_scourge_cauldron"; pNewScript->GetAI = &GetAI_npc_the_scourge_cauldron; pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_anchorite_truuen"; + pNewScript->GetAI = &GetAI_npc_anchorite_truuen; + pNewScript->pQuestAcceptNPC = &QuestAccept_npc_anchorite_truuen; + pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 24056b96a..b31a4f8f3 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2903" + #define SD2_REVISION_NR "2904" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 6f7e5fc80..713db9ca5 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -1309,6 +1309,7 @@ UPDATE creature_template SET ScriptName='npc_disciple_of_naralex' WHERE entry=36 /* WESTERN PLAGUELANDS */ UPDATE creature_template SET ScriptName='npc_the_scourge_cauldron' WHERE entry=11152; +UPDATE creature_template SET ScriptName='npc_anchorite_truuen' WHERE entry=17238; /* WESTFALL */ UPDATE creature_template SET ScriptName='npc_daphne_stilwell' WHERE entry=6182; diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 3042a04f8..22ca5cf25 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -979,7 +979,18 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1000907,'%s sniffs at the air. A tuber is near!',0,2,0,0,'domesticated felboar EMOTE_SNIFF_AIR'), (-1000908,'%s starts to dig.',0,2,0,0,'domesticated felboar EMOTE_START_DIG'), -(-1000909,'%s squeals with glee at its discovery.',0,2,0,0,'domesticated felboar EMOTE_SQUEAL'); +(-1000909,'%s squeals with glee at its discovery.',0,2,0,0,'domesticated felboar EMOTE_SQUEAL'), + +(-1000910,'Shall we begin, my friend?',0,0,0,0,'anchorite truuen SAY_BEGIN'), +(-1000911,'This area is known to be full of foul Scourge. You may want to take a moment to prepare any defenses at your disposal.',0,0,0,0,'anchorite truuen SAY_FIRST_STOP'), +(-1000912,'Very well, let us continue.',0,0,0,0,'anchorite truuen SAY_CONTINUE'), +(-1000913,'Beware! We are attacked!',0,0,0,0,'anchorite truuen SAY_FIRST_ATTACK'), +(-1000914,'It must be the purity of the Mark of the Lightbringer that is drawing forth the Scourge to us. We must proceed with caution lest we overwhelmed!',0,0,0,0,'anchorite truuen SAY_PURITY'), +(-1000915,'We are beset upon again! Defend yourself!',0,0,0,0,'anchorite truuen SAY_SECOND_ATTACK'), +(-1000916,'The land truly needs to be cleansed by the Light! Let us continue on the tomb. It isn\'t far now.',0,0,0,0,'anchorite truuen SAY_CLEANSE'), +(-1000917,'Be welcome, friends!',0,0,0,0,'high priest thel\'danis SAY_WELCOME'), +(-1000918,'Thank you for coming in remembrance of me. Your efforts in recovering that symbol, while unnecessary, are certainly touching to an old man\'s heart.',0,0,0,0,'ghost of uther SAY_EPILOGUE_1'), +(-1000919,'Please, rise my friend. Keep the Blessing as a symbol of the strength of the Light and how heroes long gone might once again rise in each of us to inspire.',0,0,0,0,'ghost of uther SAY_EPILOGUE_2'); -- -1 033 000 SHADOWFANG KEEP INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES @@ -7268,4 +7279,49 @@ INSERT INTO script_waypoint VALUES (3584, 19, 4561.65, 295.456, 57.0984, 4000, 'SAY_THERYLUNE_FINISH'), (3584, 20, 4551.03, 293.333, 57.1534, 2000, ''); +DELETE FROM script_waypoint WHERE entry=17238; +INSERT INTO script_waypoint VALUES +(17238, 0, 954.21, -1433.72, 63.00, 0, ''), +(17238, 1, 972.70, -1438.85, 65.56, 0, ''), +(17238, 2, 984.79, -1444.15, 64.13, 0, ''), +(17238, 3, 999.00, -1451.74, 61.20, 0, ''), +(17238, 4, 1030.94, -1470.39, 63.49, 25000, 'SAY_FIRST_STOP'), +(17238, 5, 1030.94, -1470.39, 63.49, 3000, 'SAY_CONTINUE'), +(17238, 6, 1036.50, -1484.25, 64.60, 0, ''), +(17238, 7, 1039.11, -1501.22, 65.32, 0, ''), +(17238, 8, 1038.44, -1522.18, 64.55, 0, ''), +(17238, 9, 1037.19, -1543.15, 62.33, 0, ''), +(17238, 10, 1036.79, -1563.88, 61.93, 5000, 'SAY_FIRST_ATTACK'), +(17238, 11, 1036.79, -1563.88, 61.93, 5000, 'SAY_PURITY'), +(17238, 12, 1035.61, -1587.64, 61.66, 0, ''), +(17238, 13, 1035.43, -1612.97, 61.54, 0, ''), +(17238, 14, 1035.36, -1630.66, 61.53, 0, ''), +(17238, 15, 1038.85, -1653.02, 60.35, 0, ''), +(17238, 16, 1042.27, -1669.36, 60.75, 0, ''), +(17238, 17, 1050.41, -1687.22, 60.52, 0, ''), +(17238, 18, 1061.15, -1704.45, 60.59, 0, ''), +(17238, 19, 1073.51, -1716.99, 60.65, 0, ''), +(17238, 20, 1084.20, -1727.24, 60.95, 0, ''), +(17238, 21, 1100.71, -1739.89, 60.64, 5000, 'SAY_SECOND_ATTACK'), +(17238, 22, 1100.71, -1739.89, 60.64, 0, 'SAY_CLEANSE'), +(17238, 23, 1117.03, -1749.01, 60.87, 0, ''), +(17238, 24, 1123.58, -1762.29, 62.40, 0, ''), +(17238, 25, 1123.36, -1769.29, 62.83, 0, ''), +(17238, 26, 1115.78, -1779.59, 62.09, 0, ''), +(17238, 27, 1109.56, -1789.78, 61.03, 0, ''), +(17238, 28, 1094.81, -1797.62, 61.22, 0, ''), +(17238, 29, 1079.30, -1801.58, 64.95, 0, ''), +(17238, 30, 1060.24, -1803.40, 70.36, 0, ''), +(17238, 31, 1047.69, -1804.49, 73.92, 0, ''), +(17238, 32, 1032.59, -1805.99, 76.13, 0, ''), +(17238, 33, 1013.60, -1812.36, 77.32, 0, ''), +(17238, 34, 1007.01, -1814.38, 80.48, 0, ''), +(17238, 35, 999.93, -1816.39, 80.48, 2000, 'SAY_WELCOME'), +(17238, 36, 984.72, -1822.05, 80.48, 0, ''), +(17238, 37, 977.77, -1824.80, 80.79, 0, ''), +(17238, 38, 975.33, -1824.91, 81.24, 12000, 'event complete'), +(17238, 39, 975.33, -1824.91, 81.24, 10000, 'SAY_EPILOGUE_1'), +(17238, 40, 975.33, -1824.91, 81.24, 8000, 'SAY_EPILOGUE_2'), +(17238, 41, 975.33, -1824.91, 81.24, 30000, ''); + -- EOF diff --git a/sql/updates/r2904_mangos.sql b/sql/updates/r2904_mangos.sql new file mode 100644 index 000000000..a96298513 --- /dev/null +++ b/sql/updates/r2904_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_anchorite_truuen' WHERE entry=17238; diff --git a/sql/updates/r2904_scriptdev2.sql b/sql/updates/r2904_scriptdev2.sql new file mode 100644 index 000000000..bed35b3a3 --- /dev/null +++ b/sql/updates/r2904_scriptdev2.sql @@ -0,0 +1,57 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1000919 AND -1000910; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1000910,'Shall we begin, my friend?',0,0,0,0,'anchorite truuen SAY_BEGIN'), +(-1000911,'This area is known to be full of foul Scourge. You may want to take a moment to prepare any defenses at your disposal.',0,0,0,0,'anchorite truuen SAY_FIRST_STOP'), +(-1000912,'Very well, let us continue.',0,0,0,0,'anchorite truuen SAY_CONTINUE'), +(-1000913,'Beware! We are attacked!',0,0,0,0,'anchorite truuen SAY_FIRST_ATTACK'), +(-1000914,'It must be the purity of the Mark of the Lightbringer that is drawing forth the Scourge to us. We must proceed with caution lest we overwhelmed!',0,0,0,0,'anchorite truuen SAY_PURITY'), +(-1000915,'We are beset upon again! Defend yourself!',0,0,0,0,'anchorite truuen SAY_SECOND_ATTACK'), +(-1000916,'The land truly needs to be cleansed by the Light! Let us continue on the tomb. It isn\'t far now.',0,0,0,0,'anchorite truuen SAY_CLEANSE'), +(-1000917,'Be welcome, friends!',0,0,0,0,'high priest thel\'danis SAY_WELCOME'), +(-1000918,'Thank you for coming in remembrance of me. Your efforts in recovering that symbol, while unnecessary, are certainly touching to an old man\'s heart.',0,0,0,0,'ghost of uther SAY_EPILOGUE_1'), +(-1000919,'Please, rise my friend. Keep the Blessing as a symbol of the strength of the Light and how heroes long gone might once again rise in each of us to inspire.',0,0,0,0,'ghost of uther SAY_EPILOGUE_2'); + +DELETE FROM script_waypoint WHERE entry=17238; +INSERT INTO script_waypoint VALUES +(17238, 0, 954.21, -1433.72, 63.00, 0, ''), +(17238, 1, 972.70, -1438.85, 65.56, 0, ''), +(17238, 2, 984.79, -1444.15, 64.13, 0, ''), +(17238, 3, 999.00, -1451.74, 61.20, 0, ''), +(17238, 4, 1030.94, -1470.39, 63.49, 25000, 'SAY_FIRST_STOP'), +(17238, 5, 1030.94, -1470.39, 63.49, 3000, 'SAY_CONTINUE'), +(17238, 6, 1036.50, -1484.25, 64.60, 0, ''), +(17238, 7, 1039.11, -1501.22, 65.32, 0, ''), +(17238, 8, 1038.44, -1522.18, 64.55, 0, ''), +(17238, 9, 1037.19, -1543.15, 62.33, 0, ''), +(17238, 10, 1036.79, -1563.88, 61.93, 5000, 'SAY_FIRST_ATTACK'), +(17238, 11, 1036.79, -1563.88, 61.93, 5000, 'SAY_PURITY'), +(17238, 12, 1035.61, -1587.64, 61.66, 0, ''), +(17238, 13, 1035.43, -1612.97, 61.54, 0, ''), +(17238, 14, 1035.36, -1630.66, 61.53, 0, ''), +(17238, 15, 1038.85, -1653.02, 60.35, 0, ''), +(17238, 16, 1042.27, -1669.36, 60.75, 0, ''), +(17238, 17, 1050.41, -1687.22, 60.52, 0, ''), +(17238, 18, 1061.15, -1704.45, 60.59, 0, ''), +(17238, 19, 1073.51, -1716.99, 60.65, 0, ''), +(17238, 20, 1084.20, -1727.24, 60.95, 0, ''), +(17238, 21, 1100.71, -1739.89, 60.64, 5000, 'SAY_SECOND_ATTACK'), +(17238, 22, 1100.71, -1739.89, 60.64, 0, 'SAY_CLEANSE'), +(17238, 23, 1117.03, -1749.01, 60.87, 0, ''), +(17238, 24, 1123.58, -1762.29, 62.40, 0, ''), +(17238, 25, 1123.36, -1769.29, 62.83, 0, ''), +(17238, 26, 1115.78, -1779.59, 62.09, 0, ''), +(17238, 27, 1109.56, -1789.78, 61.03, 0, ''), +(17238, 28, 1094.81, -1797.62, 61.22, 0, ''), +(17238, 29, 1079.30, -1801.58, 64.95, 0, ''), +(17238, 30, 1060.24, -1803.40, 70.36, 0, ''), +(17238, 31, 1047.69, -1804.49, 73.92, 0, ''), +(17238, 32, 1032.59, -1805.99, 76.13, 0, ''), +(17238, 33, 1013.60, -1812.36, 77.32, 0, ''), +(17238, 34, 1007.01, -1814.38, 80.48, 0, ''), +(17238, 35, 999.93, -1816.39, 80.48, 2000, 'SAY_WELCOME'), +(17238, 36, 984.72, -1822.05, 80.48, 0, ''), +(17238, 37, 977.77, -1824.80, 80.79, 0, ''), +(17238, 38, 975.33, -1824.91, 81.24, 12000, 'event complete'), +(17238, 39, 975.33, -1824.91, 81.24, 10000, 'SAY_EPILOGUE_1'), +(17238, 40, 975.33, -1824.91, 81.24, 8000, 'SAY_EPILOGUE_2'), +(17238, 41, 975.33, -1824.91, 81.24, 30000, ''); From f2da1cb2079ec9baf4212900a3e47a574617f345 Mon Sep 17 00:00:00 2001 From: SRobot Date: Thu, 18 Jul 2013 23:59:37 +0300 Subject: [PATCH 0913/1172] [2905] Extend support for quest 11343 This will implement the Wyrmskull village Lich King dialogue and support server side quest 12485 Signed-off-by: Xfurry --- scripts/northrend/howling_fjord.cpp | 135 ++++++++++++++++++++++++++++ sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 + sql/scriptdev2_script_full.sql | 11 ++- sql/updates/r2905_mangos.sql | 1 + sql/updates/r2905_scriptdev2.sql | 10 +++ 6 files changed, 158 insertions(+), 2 deletions(-) create mode 100644 sql/updates/r2905_mangos.sql create mode 100644 sql/updates/r2905_scriptdev2.sql diff --git a/scripts/northrend/howling_fjord.cpp b/scripts/northrend/howling_fjord.cpp index 2cc34ab69..a3ffc3cf8 100644 --- a/scripts/northrend/howling_fjord.cpp +++ b/scripts/northrend/howling_fjord.cpp @@ -26,6 +26,7 @@ npc_ancient_male_vrykul at_ancient_male_vrykul npc_daegarn npc_silvermoon_harry +npc_lich_king_village EndContentData */ #include "precompiled.h" @@ -420,6 +421,135 @@ bool GossipSelect_npc_silvermoon_harry(Player* pPlayer, Creature* pCreature, uin return true; } +/*###### +## npc_lich_king_village +######*/ + +enum +{ + EMOTE_LICH_KING_FACE = -1000920, + SAY_LICH_KING_1 = -1000921, + SAY_PREPARE = -1000922, + SAY_LICH_KING_2 = -1000923, + SAY_LICH_KING_3 = -1000924, + SAY_LICH_KING_4 = -1000925, + SAY_LICH_KING_5 = -1000926, + SAY_PERSISTANCE = -1000927, + + SPELL_GRASP_OF_THE_LICH_KING = 43489, + SPELL_MAGNETIC_PULL = 29661, + SPELL_WRATH_LICH_KING_FIRST = 43488, + SPELL_WRATH_LICH_KING = 50156, + + NPC_VALKYR_SOULCLAIMER = 24327, + NPC_LICH_KING_WYRMSKULL = 24248, + + QUEST_ID_LK_FLAG = 12485, // Server side dummy quest +}; + +static const DialogueEntry aLichDialogue[] = +{ + // first time dialogue only + {EMOTE_LICH_KING_FACE, NPC_LICH_KING_WYRMSKULL, 4000}, + {QUEST_ID_LK_FLAG, 0, 3000}, + {SAY_LICH_KING_1, NPC_LICH_KING_WYRMSKULL, 20000}, + {NPC_VALKYR_SOULCLAIMER, 0, 4000}, + {SAY_LICH_KING_2, NPC_LICH_KING_WYRMSKULL, 10000}, + {SAY_LICH_KING_3, NPC_LICH_KING_WYRMSKULL, 25000}, + {SAY_LICH_KING_4, NPC_LICH_KING_WYRMSKULL, 25000}, + {SAY_LICH_KING_5, NPC_LICH_KING_WYRMSKULL, 20000}, + {SPELL_WRATH_LICH_KING_FIRST, 0, 10000}, + {NPC_LICH_KING_WYRMSKULL, 0, 0}, + // if the player persists... + {SAY_PERSISTANCE, NPC_LICH_KING_WYRMSKULL, 15000}, + {SPELL_WRATH_LICH_KING, 0, 10000}, + {NPC_LICH_KING_WYRMSKULL, 0, 0}, + {0, 0, 0}, +}; + +struct MANGOS_DLL_DECL npc_lich_king_villageAI : public ScriptedAI, private DialogueHelper +{ + npc_lich_king_villageAI(Creature* pCreature) : ScriptedAI(pCreature), + DialogueHelper(aLichDialogue) + { + Reset(); + } + + ObjectGuid m_pHeldPlayer; + bool m_bEventInProgress; + + void Reset() override + { + m_bEventInProgress = false; + } + + void JustDidDialogueStep(int32 iEntry) override + { + switch (iEntry) + { + case QUEST_ID_LK_FLAG: + m_creature->HandleEmote(EMOTE_ONESHOT_LAUGH); + break; + case NPC_VALKYR_SOULCLAIMER: + if (Creature* pCreature = GetClosestCreatureWithEntry(m_creature, NPC_VALKYR_SOULCLAIMER, 20.0f)) + DoScriptText(SAY_PREPARE, pCreature); + break; + case SPELL_WRATH_LICH_KING_FIRST: + if (Player* pPlayer = m_creature->GetMap()->GetPlayer(m_pHeldPlayer)) + { + DoCastSpellIfCan(pPlayer, SPELL_WRATH_LICH_KING_FIRST); + // handle spell scriptEffect in the script + m_creature->DealDamage(pPlayer, pPlayer->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + } + break; + case SPELL_WRATH_LICH_KING: + if (Player* pPlayer = m_creature->GetMap()->GetPlayer(m_pHeldPlayer)) + { + DoCastSpellIfCan(pPlayer, SPELL_WRATH_LICH_KING); + // handle spell scriptEffect in the script + m_creature->DealDamage(pPlayer, pPlayer->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + } + break; + case NPC_LICH_KING_WYRMSKULL: + EnterEvadeMode(); + break; + } + } + + void MoveInLineOfSight(Unit* pWho) override + { + if (!m_bEventInProgress && pWho->GetTypeId() == TYPEID_PLAYER) + { + if (pWho->isAlive() && m_creature->IsWithinDistInMap(pWho, 15.0) && pWho->HasAura(SPELL_ECHO_OF_YMIRON)) + { + m_pHeldPlayer = pWho->GetObjectGuid(); + m_bEventInProgress = true; + + DoCastSpellIfCan(pWho, SPELL_MAGNETIC_PULL, CAST_TRIGGERED); + DoCastSpellIfCan(pWho, SPELL_GRASP_OF_THE_LICH_KING, CAST_TRIGGERED); + + if (((Player*)pWho)->GetQuestStatus(QUEST_ID_LK_FLAG) == QUEST_STATUS_COMPLETE) + StartNextDialogueText(SAY_PERSISTANCE); + else + StartNextDialogueText(EMOTE_LICH_KING_FACE); + } + } + } + + Creature* GetSpeakerByEntry(uint32 uiEntry) override + { + if (uiEntry == NPC_LICH_KING_WYRMSKULL) + return m_creature; + } + + void UpdateAI(const uint32 uiDiff) override { DialogueUpdate(uiDiff); } +}; + +CreatureAI* GetAI_npc_lich_king_village(Creature* pCreature) +{ + return new npc_lich_king_villageAI(pCreature); +} + void AddSC_howling_fjord() { Script* pNewScript; @@ -446,4 +576,9 @@ void AddSC_howling_fjord() pNewScript->pGossipHello = &GossipHello_npc_silvermoon_harry; pNewScript->pGossipSelect = &GossipSelect_npc_silvermoon_harry; pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_lich_king_village"; + pNewScript->GetAI = &GetAI_npc_lich_king_village; + pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index b31a4f8f3..de11dd003 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2904" + #define SD2_REVISION_NR "2905" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 713db9ca5..88a63d782 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -663,6 +663,7 @@ INSERT INTO scripted_areatrigger VALUES (4778,'at_ancient_male_vrykul'); UPDATE creature_template SET ScriptName='npc_ancient_male_vrykul' WHERE entry=24314; UPDATE creature_template SET ScriptName='npc_daegarn' WHERE entry=24151; UPDATE creature_template SET ScriptName='npc_silvermoon_harry' WHERE entry=24539; +UPDATE creature_template SET ScriptName='npc_lich_king_village' WHERE entry=24248; /* */ /* ICECROWN CITADEL */ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 22ca5cf25..6a092992c 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -990,7 +990,16 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1000916,'The land truly needs to be cleansed by the Light! Let us continue on the tomb. It isn\'t far now.',0,0,0,0,'anchorite truuen SAY_CLEANSE'), (-1000917,'Be welcome, friends!',0,0,0,0,'high priest thel\'danis SAY_WELCOME'), (-1000918,'Thank you for coming in remembrance of me. Your efforts in recovering that symbol, while unnecessary, are certainly touching to an old man\'s heart.',0,0,0,0,'ghost of uther SAY_EPILOGUE_1'), -(-1000919,'Please, rise my friend. Keep the Blessing as a symbol of the strength of the Light and how heroes long gone might once again rise in each of us to inspire.',0,0,0,0,'ghost of uther SAY_EPILOGUE_2'); +(-1000919,'Please, rise my friend. Keep the Blessing as a symbol of the strength of the Light and how heroes long gone might once again rise in each of us to inspire.',0,0,0,0,'ghost of uther SAY_EPILOGUE_2'), + +(-1000920,'%s turns to face you.',0,2,0,0,'lich_king_wyrmskull EMOTE_LICH_KING_FACE'), +(-1000921,'Shamanism has brought you here... Its scent permeates the air. *The Lich King laughs* I was once a shaman.',14742,0,0,0,'lich_king_wyrmskull SAY_LICH_KING_1'), +(-1000922,'Shall we prepare it for you, my lord?',0,0,0,0,'valkyr_soulclaimer SAY_PREPARE'), +(-1000923,'No, minion. This one is not ready.',14743,0,0,0,'lich_king_wyrmskull SAY_LICH_KING_2'), +(-1000924,'Do you feel it, mortal? Death seeps through me, enveloping all that I touch. With just a snap of my finger your soul will languish in damnation for all eternity.',14744,0,0,0,'lich_king_wyrmskull SAY_LICH_KING_3'), +(-1000925,'But... It is not yet your time to serve the Lich King. Yes, a greater destiny awaits you. Power... You must become more powerful before you are to serve me.',14745,0,0,0,'lich_king_wyrmskull SAY_LICH_KING_4'), +(-1000926,'Now watch, val\'kyr. Observe as I apply pressure. Can you see that it is not yet ripe? Watch as it pops and falls lifeless to the floor.',14746,0,0,0,'lich_king_wyrmskull SAY_LICH_KING_5'), +(-1000927,'Persistence or stupidity? It matters not. Let this be a lesson learned, mortal!',14747,0,0,0,'lich_king_wyrmskull SAY_LICH_KING_6'); -- -1 033 000 SHADOWFANG KEEP INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES diff --git a/sql/updates/r2905_mangos.sql b/sql/updates/r2905_mangos.sql new file mode 100644 index 000000000..f39be10b2 --- /dev/null +++ b/sql/updates/r2905_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_lich_king_village' WHERE entry=24248; diff --git a/sql/updates/r2905_scriptdev2.sql b/sql/updates/r2905_scriptdev2.sql new file mode 100644 index 000000000..9432c3af4 --- /dev/null +++ b/sql/updates/r2905_scriptdev2.sql @@ -0,0 +1,10 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1000927 AND -1000920; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1000920,'%s turns to face you.',0,2,0,0,'lich_king_wyrmskull EMOTE_LICH_KING_FACE'), +(-1000921,'Shamanism has brought you here... Its scent permeates the air. *The Lich King laughs* I was once a shaman.',14742,0,0,0,'lich_king_wyrmskull SAY_LICH_KING_1'), +(-1000922,'Shall we prepare it for you, my lord?',0,0,0,0,'valkyr_soulclaimer SAY_PREPARE'), +(-1000923,'No, minion. This one is not ready.',14743,0,0,0,'lich_king_wyrmskull SAY_LICH_KING_2'), +(-1000924,'Do you feel it, mortal? Death seeps through me, enveloping all that I touch. With just a snap of my finger your soul will languish in damnation for all eternity.',14744,0,0,0,'lich_king_wyrmskull SAY_LICH_KING_3'), +(-1000925,'But... It is not yet your time to serve the Lich King. Yes, a greater destiny awaits you. Power... You must become more powerful before you are to serve me.',14745,0,0,0,'lich_king_wyrmskull SAY_LICH_KING_4'), +(-1000926,'Now watch, val\'kyr. Observe as I apply pressure. Can you see that it is not yet ripe? Watch as it pops and falls lifeless to the floor.',14746,0,0,0,'lich_king_wyrmskull SAY_LICH_KING_5'), +(-1000927,'Persistence or stupidity? It matters not. Let this be a lesson learned, mortal!',14747,0,0,0,'lich_king_wyrmskull SAY_PERSISTANCE'); From 9e22c7bf33b9eba7e4c62744c1c59856b961a044 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sat, 20 Jul 2013 11:05:26 +0300 Subject: [PATCH 0914/1172] [2906] Allow Warlod Kalithresh to cast Warlord's Rage many times during the encounter Thanks vovk for pointing the issue Close #66 --- .../steam_vault/boss_warlord_kalithresh.cpp | 33 +++++++------------ sd2_revision_nr.h | 2 +- 2 files changed, 12 insertions(+), 23 deletions(-) diff --git a/scripts/outland/coilfang_reservoir/steam_vault/boss_warlord_kalithresh.cpp b/scripts/outland/coilfang_reservoir/steam_vault/boss_warlord_kalithresh.cpp index f44f19f0f..151a1c750 100644 --- a/scripts/outland/coilfang_reservoir/steam_vault/boss_warlord_kalithresh.cpp +++ b/scripts/outland/coilfang_reservoir/steam_vault/boss_warlord_kalithresh.cpp @@ -39,7 +39,6 @@ enum SPELL_IMPALE = 39061, SPELL_WARLORDS_RAGE = 37081, // triggers 36453 SPELL_WARLORDS_RAGE_NAGA = 31543, // triggers 37076 - SPELL_WARLORDS_RAGE_AURA = 36453, }; struct MANGOS_DLL_DECL boss_warlord_kalithreshAI : public ScriptedAI @@ -150,31 +149,21 @@ struct MANGOS_DLL_DECL boss_warlord_kalithreshAI : public ScriptedAI } // Move to closest distiller - if (m_uiRageTimer) + if (m_uiRageTimer < uiDiff) { - if (m_uiRageTimer <= uiDiff) + if (Creature* pDistiller = GetClosestCreatureWithEntry(m_creature, NPC_NAGA_DISTILLER, 100.0f)) { - // If the boss already has the rage aura we don't have to do this again - if (m_creature->HasAura(SPELL_WARLORDS_RAGE_AURA)) - { - m_uiRageTimer = 0; - return; - } - - if (Creature* pDistiller = GetClosestCreatureWithEntry(m_creature, NPC_NAGA_DISTILLER, 100.0f)) - { - float fX, fY, fZ; - pDistiller->GetContactPoint(m_creature, fX, fY, fZ, INTERACTION_DISTANCE); - m_creature->GetMotionMaster()->MovePoint(1, fX, fY, fZ); - SetCombatMovement(false); - m_distillerGuid = pDistiller->GetObjectGuid(); - } - - m_uiRageTimer = urand(35000, 45000); + float fX, fY, fZ; + pDistiller->GetContactPoint(m_creature, fX, fY, fZ, INTERACTION_DISTANCE); + m_creature->GetMotionMaster()->MovePoint(1, fX, fY, fZ); + SetCombatMovement(false); + m_distillerGuid = pDistiller->GetObjectGuid(); } - else - m_uiRageTimer -= uiDiff; + + m_uiRageTimer = urand(35000, 45000); } + else + m_uiRageTimer -= uiDiff; // Reflection_Timer if (m_uiReflectionTimer < uiDiff) diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index de11dd003..b5e1b0102 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2905" + #define SD2_REVISION_NR "2906" #endif // __SD2_REVISION_NR_H__ From 5e6199265857ac353f78f2e22fea42bafc1fcfee Mon Sep 17 00:00:00 2001 From: SRobot Date: Sun, 21 Jul 2013 01:04:51 +0300 Subject: [PATCH 0915/1172] [2907] Add script support for quest 11344 Signed-off-by: Xfurry --- scripts/northrend/howling_fjord.cpp | 203 +++++++++++++++++++++++++++- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 7 +- sql/scriptdev2_script_full.sql | 23 +++- sql/updates/r2907_mangos.sql | 3 + sql/updates/r2907_scriptdev2.sql | 22 +++ 6 files changed, 253 insertions(+), 7 deletions(-) create mode 100644 sql/updates/r2907_mangos.sql create mode 100644 sql/updates/r2907_scriptdev2.sql diff --git a/scripts/northrend/howling_fjord.cpp b/scripts/northrend/howling_fjord.cpp index a3ffc3cf8..9571f330d 100644 --- a/scripts/northrend/howling_fjord.cpp +++ b/scripts/northrend/howling_fjord.cpp @@ -17,7 +17,7 @@ /* ScriptData SDName: Howling_Fjord SD%Complete: ? -SDComment: Quest support: 11300, 11464, 11343 +SDComment: Quest support: 11300, 11343, 11344, 11464. SDCategory: Howling Fjord EndScriptData */ @@ -27,6 +27,7 @@ at_ancient_male_vrykul npc_daegarn npc_silvermoon_harry npc_lich_king_village +npc_king_ymiron EndContentData */ #include "precompiled.h" @@ -34,7 +35,7 @@ EndContentData */ enum { SPELL_ECHO_OF_YMIRON = 42786, - SPELL_SECRET_OF_NIFFELVAR = 43458, + SPELL_SECRET_OF_WYRMSKULL = 43458, QUEST_ECHO_OF_YMIRON = 11343, NPC_MALE_VRYKUL = 24314, NPC_FEMALE_VRYKUL = 24315, @@ -109,7 +110,7 @@ struct MANGOS_DLL_DECL npc_ancient_male_vrykulAI : public ScriptedAI DoScriptText(SAY_VRYKUL_HIDE, pFemale); break; case 5: - DoCastSpellIfCan(m_creature, SPELL_SECRET_OF_NIFFELVAR); + DoCastSpellIfCan(m_creature, SPELL_SECRET_OF_WYRMSKULL); break; case 6: Reset(); @@ -540,6 +541,8 @@ struct MANGOS_DLL_DECL npc_lich_king_villageAI : public ScriptedAI, private Dial { if (uiEntry == NPC_LICH_KING_WYRMSKULL) return m_creature; + + return NULL; } void UpdateAI(const uint32 uiDiff) override { DialogueUpdate(uiDiff); } @@ -550,6 +553,190 @@ CreatureAI* GetAI_npc_lich_king_village(Creature* pCreature) return new npc_lich_king_villageAI(pCreature); } +/*###### +## npc_king_ymiron +######*/ + +enum +{ + EMOTE_KING_SILENCE = -1000928, + SAY_KING_YMIRON_SPEECH_1 = -1000929, + SAY_KING_YMIRON_SPEECH_2 = -1000930, + EMOTE_YMIRON_CROWD_1 = -1000931, + SAY_KING_YMIRON_SPEECH_3 = -1000932, + SAY_KING_YMIRON_SPEECH_4 = -1000933, + SAY_KING_YMIRON_SPEECH_5 = -1000934, + SAY_KING_YMIRON_SPEECH_6 = -1000935, + SAY_KING_YMIRON_SPEECH_7 = -1000936, + EMOTE_YMIRON_CROWD_2 = -1000937, + SAY_KING_YMIRON_SPEECH_8 = -1000938, + EMOTE_YMIRON_CROWD_3 = -1000939, + SAY_KING_YMIRON_SPEECH_9 = -1000940, + + SPELL_ECHO_OF_YMIRON_NIFFLEVAR = 43466, + SPELL_SECRETS_OF_NIFFLEVAR = 43468, + + NPC_CITIZEN_OF_NIFFLEVAR_MALE = 24322, + NPC_CITIZEN_OF_NIFFLEVAR_FEMALE = 24323, + NPC_KING_YMIRON = 24321, + + QUEST_ID_ANGUISH_OF_NIFFLEVAR = 11344, + + MAX_CROWD_TEXT_ENTRIES = 7 +}; + +static const DialogueEntry aNifflevarDialogue[] = +{ + {EMOTE_KING_SILENCE, NPC_KING_YMIRON, 3000}, + {SAY_KING_YMIRON_SPEECH_1, NPC_KING_YMIRON, 5000}, + {SAY_KING_YMIRON_SPEECH_2, NPC_KING_YMIRON, 2000}, + {EMOTE_YMIRON_CROWD_1, NPC_KING_YMIRON, 5000}, + {SAY_KING_YMIRON_SPEECH_3, NPC_KING_YMIRON, 10000}, + {SAY_KING_YMIRON_SPEECH_4, NPC_KING_YMIRON, 9000}, + {SAY_KING_YMIRON_SPEECH_5, NPC_KING_YMIRON, 7000}, + {SAY_KING_YMIRON_SPEECH_6, NPC_KING_YMIRON, 5000}, + {SAY_KING_YMIRON_SPEECH_7, NPC_KING_YMIRON, 9000}, + {EMOTE_YMIRON_CROWD_2, NPC_KING_YMIRON, 5000}, + {SAY_KING_YMIRON_SPEECH_8, NPC_KING_YMIRON, 8000}, + {EMOTE_YMIRON_CROWD_3, NPC_KING_YMIRON, 4000}, + {SAY_KING_YMIRON_SPEECH_9, NPC_KING_YMIRON, 10000}, + {SPELL_SECRETS_OF_NIFFLEVAR, 0, 10000}, + {QUEST_ID_ANGUISH_OF_NIFFLEVAR, 0, 0}, + {0, 0, 0}, +}; + +static const int32 aRandomTextEntries[MAX_CROWD_TEXT_ENTRIES] = { -1000941, -1000942, -1000943, -1000944, -1000945, -1000946, -1000947}; + +struct MANGOS_DLL_DECL npc_king_ymironAI : public ScriptedAI, private DialogueHelper +{ + npc_king_ymironAI(Creature* pCreature) : ScriptedAI(pCreature), + DialogueHelper(aNifflevarDialogue) + { + Reset(); + } + + uint32 m_uiCrowdSpeechTimer; + + bool m_bEventInProgress; + bool m_bEventInit; + + GuidList m_lCrowdGuidList; + + void Reset() override + { + m_uiCrowdSpeechTimer = 0; + m_bEventInit = false; + m_bEventInProgress = false; + m_lCrowdGuidList.clear(); + } + + void MoveInLineOfSight(Unit* pWho) override + { + if (!m_bEventInit && pWho->GetTypeId() == TYPEID_PLAYER) + { + // Get all the citizen around the king for future use + if (pWho->isAlive() && m_creature->IsWithinDistInMap(pWho, 60.0) && ((Player*)pWho)->GetQuestStatus(QUEST_ID_ANGUISH_OF_NIFFLEVAR) == QUEST_STATUS_INCOMPLETE + && pWho->HasAura(SPELL_ECHO_OF_YMIRON_NIFFLEVAR)) + { + std::list lCrowdList; + GetCreatureListWithEntryInGrid(lCrowdList, m_creature, NPC_CITIZEN_OF_NIFFLEVAR_MALE, 60.0f); + GetCreatureListWithEntryInGrid(lCrowdList, m_creature, NPC_CITIZEN_OF_NIFFLEVAR_FEMALE, 60.0f); + + for (std::list::const_iterator itr = lCrowdList.begin(); itr != lCrowdList.end(); ++itr) + m_lCrowdGuidList.push_back( (*itr)->GetObjectGuid() ); + + m_uiCrowdSpeechTimer = 1000; + m_bEventInit = true; + } + } + } + + void JustDidDialogueStep(int32 iEntry) override + { + switch (iEntry) + { + case SPELL_SECRETS_OF_NIFFLEVAR: + DoCastSpellIfCan(m_creature, SPELL_SECRETS_OF_NIFFLEVAR); + break; + case QUEST_ID_ANGUISH_OF_NIFFLEVAR: + EnterEvadeMode(); + break; + } + } + + Creature* GetSpeakerByEntry(uint32 uiEntry) override + { + if (uiEntry == NPC_KING_YMIRON) + return m_creature; + + return NULL; + } + + void ReceiveAIEvent(AIEventType eventType, Creature* /*pSender*/, Unit* pInvoker, uint32 /*uiMiscValue*/) override + { + if (eventType == AI_EVENT_CUSTOM_A && pInvoker->GetTypeId() == TYPEID_PLAYER) + { + if (m_bEventInProgress) + return; + + StartNextDialogueText(EMOTE_KING_SILENCE); + m_uiCrowdSpeechTimer = 0; + m_bEventInProgress = true; + } + } + + ObjectGuid SelectRandomCrowdNpc() + { + if (m_lCrowdGuidList.empty()) + return ObjectGuid(); + + GuidList::iterator iter = m_lCrowdGuidList.begin(); + advance(iter, urand(0, m_lCrowdGuidList.size() - 1)); + + return *iter; + } + + void UpdateAI(const uint32 uiDiff) override + { + DialogueUpdate(uiDiff); + + if (m_uiCrowdSpeechTimer) + { + if (m_uiCrowdSpeechTimer <= uiDiff) + { + // only 15% chance to yell (guessed) + if (roll_chance_i(15)) + { + if (Creature* pCitizen = m_creature->GetMap()->GetCreature(SelectRandomCrowdNpc())) + DoScriptText(aRandomTextEntries[urand(0, MAX_CROWD_TEXT_ENTRIES - 1)], pCitizen); + } + + m_uiCrowdSpeechTimer = 1000; + } + else + m_uiCrowdSpeechTimer -= uiDiff; + } + } +}; + +CreatureAI* GetAI_npc_king_ymiron(Creature* pCreature) +{ + return new npc_king_ymironAI(pCreature); +} + +bool AreaTrigger_at_nifflevar(Player* pPlayer, AreaTriggerEntry const* pAt) +{ + if (pPlayer->isAlive() && pPlayer->GetQuestStatus(QUEST_ID_ANGUISH_OF_NIFFLEVAR) == QUEST_STATUS_INCOMPLETE && pPlayer->HasAura(SPELL_ECHO_OF_YMIRON_NIFFLEVAR)) + { + if (Creature* pCreature = GetClosestCreatureWithEntry(pPlayer, NPC_KING_YMIRON, 30.0f)) + pCreature->AI()->SendAIEvent(AI_EVENT_CUSTOM_A, pPlayer, pCreature); + + return true; + } + + return false; +} + void AddSC_howling_fjord() { Script* pNewScript; @@ -581,4 +768,14 @@ void AddSC_howling_fjord() pNewScript->Name = "npc_lich_king_village"; pNewScript->GetAI = &GetAI_npc_lich_king_village; pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_king_ymiron"; + pNewScript->GetAI = &GetAI_npc_king_ymiron; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "at_nifflevar"; + pNewScript->pAreaTrigger = &AreaTrigger_at_nifflevar; + pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index b5e1b0102..8dbacc2d5 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2906" + #define SD2_REVISION_NR "2907" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 88a63d782..7ac0f566b 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -658,12 +658,15 @@ UPDATE creature_template SET ScriptName='npc_00x09hl' WHERE entry=7806; UPDATE creature_template SET ScriptName='npc_rinji' WHERE entry=7780; /* HOWLING FJORD */ -DELETE FROM scripted_areatrigger WHERE entry=4778; -INSERT INTO scripted_areatrigger VALUES (4778,'at_ancient_male_vrykul'); +DELETE FROM scripted_areatrigger WHERE entry IN (4778,4779); +INSERT INTO scripted_areatrigger VALUES +(4778,'at_ancient_male_vrykul'), +(4779,'at_nifflevar'); UPDATE creature_template SET ScriptName='npc_ancient_male_vrykul' WHERE entry=24314; UPDATE creature_template SET ScriptName='npc_daegarn' WHERE entry=24151; UPDATE creature_template SET ScriptName='npc_silvermoon_harry' WHERE entry=24539; UPDATE creature_template SET ScriptName='npc_lich_king_village' WHERE entry=24248; +UPDATE creature_template SET ScriptName='npc_king_ymiron' WHERE entry=24321; /* */ /* ICECROWN CITADEL */ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 6a092992c..9b969b2dc 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -999,7 +999,28 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1000924,'Do you feel it, mortal? Death seeps through me, enveloping all that I touch. With just a snap of my finger your soul will languish in damnation for all eternity.',14744,0,0,0,'lich_king_wyrmskull SAY_LICH_KING_3'), (-1000925,'But... It is not yet your time to serve the Lich King. Yes, a greater destiny awaits you. Power... You must become more powerful before you are to serve me.',14745,0,0,0,'lich_king_wyrmskull SAY_LICH_KING_4'), (-1000926,'Now watch, val\'kyr. Observe as I apply pressure. Can you see that it is not yet ripe? Watch as it pops and falls lifeless to the floor.',14746,0,0,0,'lich_king_wyrmskull SAY_LICH_KING_5'), -(-1000927,'Persistence or stupidity? It matters not. Let this be a lesson learned, mortal!',14747,0,0,0,'lich_king_wyrmskull SAY_LICH_KING_6'); +(-1000927,'Persistence or stupidity? It matters not. Let this be a lesson learned, mortal!',14747,0,0,0,'lich_king_wyrmskull SAY_LICH_KING_6'), + +(-1000928,'%s motions for silence.',0,3,0,25,'king_ymiron EMOTE_KING_SILENCE'), +(-1000929,'Vrykul, your king implores you listen!',0,1,0,22,'king_ymiron SAY_KING_YMIRON_SPEECH_1'), +(-1000930,'The Gods have abandonned us!',0,1,0,22,'king_ymiron SAY_KING_YMIRON_SPEECH_2'), +(-1000931,'The crowd gasps in horror.',0,2,0,0,'king_ymiron EMOTE_YMIRON_CROWD_1'), +(-1000932,'Even now, in our darkest hour, they mock us!',0,1,0,22,'king_ymiron SAY_KING_YMIRON_SPEECH_3'), +(-1000933,'Where are the titans in out time of greatest need? Our women birth abberations - disfigured runts unable to even stand on their own! Weak and ugly... Useless...',0,1,0,22,'king_ymiron SAY_KING_YMIRON_SPEECH_4'), +(-1000934,'Ymiron has toiled. Long have I sat upon my throne and thought hard of our plight. There is only one answer... One reason...',0,1,0,22,'king_ymiron SAY_KING_YMIRON_SPEECH_5'), +(-1000935,'For who but the titans themselves could bestow such a curse? What could have such power?',0,1,0,22,'king_ymiron SAY_KING_YMIRON_SPEECH_6'), +(-1000936,'And the answer is nothing... For it is the titans who have cursed us!',0,1,0,22,'king_ymiron SAY_KING_YMIRON_SPEECH_7'), +(-1000937,'The crowd clamours.',0,2,0,0,'king_ymiron EMOTE_YMIRON_CROWD_2'), +(-1000938,'On this day all Vrykul will shed their old beliefs! We denounce our old gods! All Vrykul will pledge their allegiance to Ymiron! Ymiron will protect our noble race!',0,1,0,22,'king_ymiron SAY_KING_YMIRON_SPEECH_8'), +(-1000939,'The crowd cheers.',0,2,0,0,'king_ymiron EMOTE_YMIRON_CROWD_3'), +(-1000940,'And now my first decree upon the Vrykul! All malformed infants born of Vrykul mother and father are to be destroyed upon birth! Our blood must remain pure always! Those found in violation of Ymiron\'s decree will be taken to Gjalerbron for execution!',0,1,0,22,'king_ymiron SAY_KING_YMIRON_SPEECH_9'), +(-1000941,'Vrykul must remain pure!',0,0,0,0,'king_ymiron_crowd SAY_YMIRON_CROWD_1'), +(-1000942,'Show the aberrations no mercy, Ymiron!',0,0,0,0,'king_ymiron_crowd SAY_YMIRON_CROWD_2'), +(-1000943,'Show them mercy, my king! They are of our flesh and blood!',0,0,0,0,'king_ymiron_crowd SAY_YMIRON_CROWD_3'), +(-1000944,'They weaken us! Our strength is dilluted by their very existence! Destroy them all!',0,0,0,0,'king_ymiron_crowd SAY_YMIRON_CROWD_4'), +(-1000945,'All hail our glorious king, Ymiron!',0,0,0,0,'king_ymiron_crowd SAY_YMIRON_CROWD_5'), +(-1000946,'The King is going to speak!',0,0,0,0,'king_ymiron_crowd SAY_YMIRON_CROWD_6'), +(-1000947,'Let him speak! Be silent!',0,0,0,0,'king_ymiron_crowd SAY_YMIRON_CROWD_7'); -- -1 033 000 SHADOWFANG KEEP INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES diff --git a/sql/updates/r2907_mangos.sql b/sql/updates/r2907_mangos.sql new file mode 100644 index 000000000..6a99f0880 --- /dev/null +++ b/sql/updates/r2907_mangos.sql @@ -0,0 +1,3 @@ +UPDATE creature_template SET ScriptName='npc_king_ymiron' WHERE entry=24321; +DELETE FROM scripted_areatrigger WHERE entry IN (4779); +INSERT INTO scripted_areatrigger VALUES (4779,'at_nifflevar'); diff --git a/sql/updates/r2907_scriptdev2.sql b/sql/updates/r2907_scriptdev2.sql new file mode 100644 index 000000000..1417614ec --- /dev/null +++ b/sql/updates/r2907_scriptdev2.sql @@ -0,0 +1,22 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1000947 AND -1000928; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1000928,'%s motions for silence.',0,3,0,25,'king_ymiron EMOTE_KING_SILENCE'), +(-1000929,'Vrykul, your king implores you listen!',0,1,0,22,'king_ymiron SAY_KING_YMIRON_SPEECH_1'), +(-1000930,'The Gods have abandonned us!',0,1,0,22,'king_ymiron SAY_KING_YMIRON_SPEECH_2'), +(-1000931,'The crowd gasps in horror.',0,2,0,0,'king_ymiron EMOTE_YMIRON_CROWD_1'), +(-1000932,'Even now, in our darkest hour, they mock us!',0,1,0,22,'king_ymiron SAY_KING_YMIRON_SPEECH_3'), +(-1000933,'Where are the titans in out time of greatest need? Our women birth abberations - disfigured runts unable to even stand on their own! Weak and ugly... Useless...',0,1,0,22,'king_ymiron SAY_KING_YMIRON_SPEECH_4'), +(-1000934,'Ymiron has toiled. Long have I sat upon my throne and thought hard of our plight. There is only one answer... One reason...',0,1,0,22,'king_ymiron SAY_KING_YMIRON_SPEECH_5'), +(-1000935,'For who but the titans themselves could bestow such a curse? What could have such power?',0,1,0,22,'king_ymiron SAY_KING_YMIRON_SPEECH_6'), +(-1000936,'And the answer is nothing... For it is the titans who have cursed us!',0,1,0,22,'king_ymiron SAY_KING_YMIRON_SPEECH_7'), +(-1000937,'The crowd clamours.',0,2,0,0,'king_ymiron EMOTE_YMIRON_CROWD_2'), +(-1000938,'On this day all Vrykul will shed their old beliefs! We denounce our old gods! All Vrykul will pledge their allegiance to Ymiron! Ymiron will protect our noble race!',0,1,0,22,'king_ymiron SAY_KING_YMIRON_SPEECH_8'), +(-1000939,'The crowd cheers.',0,2,0,0,'king_ymiron EMOTE_YMIRON_CROWD_3'), +(-1000940,'And now my first decree upon the Vrykul! All malformed infants born of Vrykul mother and father are to be destroyed upon birth! Our blood must remain pure always! Those found in violation of Ymiron\'s decree will be taken to Gjalerbron for execution!',0,1,0,22,'king_ymiron SAY_KING_YMIRON_SPEECH_9'), +(-1000941,'Vrykul must remain pure!',0,0,0,0,'king_ymiron_crowd SAY_YMIRON_CROWD_1'), +(-1000942,'Show the aberrations no mercy, Ymiron!',0,0,0,0,'king_ymiron_crowd SAY_YMIRON_CROWD_2'), +(-1000943,'Show them mercy, my king! They are of our flesh and blood!',0,0,0,0,'king_ymiron_crowd SAY_YMIRON_CROWD_3'), +(-1000944,'They weaken us! Our strength is dilluted by their very existence! Destroy them all!',0,0,0,0,'king_ymiron_crowd SAY_YMIRON_CROWD_4'), +(-1000945,'All hail our glorious king, Ymiron!',0,0,0,0,'king_ymiron_crowd SAY_YMIRON_CROWD_5'), +(-1000946,'The King is going to speak!',0,0,0,0,'king_ymiron_crowd SAY_YMIRON_CROWD_6'), +(-1000947,'Let him speak! Be silent!',0,0,0,0,'king_ymiron_crowd SAY_YMIRON_CROWD_7'); From f995b945c7f84ba9f1c2f2a953a4e616192ed64d Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sun, 4 Aug 2013 23:00:45 +0300 Subject: [PATCH 0916/1172] [2908] Implement script for Chess Event - Karazhan Please note that this is only a basic implementation. The AI works fine, but it's not as good as the AI on retail. There are some fine details which can be improved. Also some spells may require core fixes, please check the forum for details. If you have any suggestions or bugs to report, please feel free to contact us on github, scriptdev2 or cmangos forums. Finally I want to give a very special thanks to X-Savior, evil@wow, YuruY, cala and Schmoozerd for the data and support provided. --- .../eastern_kingdoms/karazhan/chess_event.cpp | 1689 ++++++++++++++++- .../karazhan/instance_karazhan.cpp | 259 ++- scripts/eastern_kingdoms/karazhan/karazhan.h | 57 + sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 13 + sql/scriptdev2_script_full.sql | 20 +- sql/updates/r2908_mangos.sql | 13 + sql/updates/r2908_scriptdev2.sql | 19 + 8 files changed, 2065 insertions(+), 7 deletions(-) create mode 100644 sql/updates/r2908_mangos.sql create mode 100644 sql/updates/r2908_scriptdev2.sql diff --git a/scripts/eastern_kingdoms/karazhan/chess_event.cpp b/scripts/eastern_kingdoms/karazhan/chess_event.cpp index 52515c4c1..fa80fc15e 100644 --- a/scripts/eastern_kingdoms/karazhan/chess_event.cpp +++ b/scripts/eastern_kingdoms/karazhan/chess_event.cpp @@ -16,13 +16,1698 @@ /* ScriptData SDName: chess_event -SD%Complete: 0 -SDComment: Placeholder +SD%Complete: 75 +SDComment: Friendly game NYI; Chess AI could use some improvements. SDCategory: Karazhan EndScriptData */ #include "precompiled.h" +#include "karazhan.h" + +enum +{ + // texts + EMOTE_LIFT_CURSE = -1532131, + EMOTE_CHEAT = -1532132, + + SOUND_ID_GAME_BEGIN = 10338, + SOUND_ID_LOSE_PAWN_PLAYER_1 = 10339, + SOUND_ID_LOSE_PAWN_PLAYER_2 = 10340, + SOUND_ID_LOSE_PAWN_PLAYER_3 = 10341, + SOUND_ID_LOSE_PAWN_MEDIVH_1 = 10342, + SOUND_ID_LOSE_PAWN_MEDIVH_2 = 10343, + SOUND_ID_LOSE_PAWN_MEDIVH_3 = 10344, + SOUND_ID_LOSE_ROOK_PLAYER = 10345, + SOUND_ID_LOSE_ROOK_MEDIVH = 10346, + SOUND_ID_LOSE_BISHOP_PLAYER = 10347, + SOUND_ID_LOSE_BISHOP_MEDIVH = 10348, + SOUND_ID_LOSE_KNIGHT_PLAYER = 10349, + SOUND_ID_LOSE_KNIGHT_MEDIVH = 10350, + SOUND_ID_LOSE_QUEEN_PLAYER = 10351, + SOUND_ID_LOSE_QUEEN_MEDIVH = 10352, + SOUND_ID_CHECK_PLAYER = 10353, + SOUND_ID_CHECK_MEDIVH = 10354, + SOUND_ID_WIN_PLAYER = 10355, + SOUND_ID_WIN_MEDIVH = 10356, + SOUND_ID_CHEAT_1 = 10357, + SOUND_ID_CHEAT_2 = 10358, + SOUND_ID_CHEAT_3 = 10359, + + // movement spells + SPELL_MOVE_GENERIC = 30012, // spell which sends the signal to move - handled in core + SPELL_MOVE_1 = 32312, // spell which selects AI move square (for short range pieces) + SPELL_MOVE_2 = 37388, // spell which selects AI move square (for long range pieces) + // SPELL_MOVE_PAWN = 37146, // individual move spells (used only by controlled npcs) + // SPELL_MOVE_KNIGHT = 37144, + // SPELL_MOVE_QUEEN = 37148, + // SPELL_MOVE_ROCK = 37151, + // SPELL_MOVE_BISHOP = 37152, + // SPELL_MOVE_KING = 37153, + + // additional movement spells + SPELL_CHANGE_FACING = 30284, // spell which sends the initial facing request - handled in core + SPELL_FACE_SQUARE = 30270, // change facing - finalize facing update + + SPELL_MOVE_TO_SQUARE = 30253, // spell which sends the move response from the square to the piece + SPELL_MOVE_COOLDOWN = 30543, // add some cooldown to movement + SPELL_MOVE_MARKER = 32261, // white beam visual - used to mark the movement as complete + SPELL_DISABLE_SQUARE = 32745, // used by the White / Black triggers on the squares when a chess piece moves into place + SPELL_IS_SQUARE_USED = 39400, // cast when a chess piece moves to another square + // SPELL_SQUARED_OCCUPIED = 39399, // triggered by 39400; used to check if the square is occupied (if hits a target); Missing in 2.4.3 + + // generic spells + SPELL_IN_GAME = 30532, // teleport player near the entrance + SPELL_CONTROL_PIECE = 30019, // control a chess piece + SPELL_RECENTLY_IN_GAME = 30529, // debuff on player after chess piece uncharm + + SPELL_CHESS_AI_ATTACK_TIMER = 32226, // melee action timer - triggers 32225 + SPELL_ACTION_MELEE = 32225, // handle melee attacks + SPELL_MELEE_DAMAGE = 32247, // melee damage spell - used by all chess pieces + // SPELL_AI_SNAPSHOT_TIMER = 37440, // used to trigger spell 32260; purpose and usage unk + // SPELL_DISABLE_SQUARE_SELF = 32260, // used when a piece moves to another square + // SPELL_AI_ACTION_TIMER = 37504, // handle some kind of event check. Cast by npc 17459. Currently the way it works is unk + // SPELL_DISABLE_SQUARE = 30271, // not used + // SPELL_FIND_ENEMY = 32303, // not used + // SPELL_MOVE_NEAR_UNIT = 30417, // not used + // SPELL_GET_EMPTY_SQUARE = 30418, // not used + // SPELL_FACE_NEARBY_ENEMY = 37787, // not used + // SPELL_POST_MOVE_FACING = 38011, // not used + + // melee action spells + SPELL_MELEE_FOOTMAN = 32227, + SPELL_MELEE_WATER_ELEM = 37142, + SPELL_MELEE_CHARGER = 37143, + SPELL_MELEE_CLERIC = 37147, + SPELL_MELEE_CONJURER = 37149, + SPELL_MELEE_KING_LLANE = 37150, + SPELL_MELEE_GRUNT = 32228, + SPELL_MELEE_DAEMON = 37220, + SPELL_MELEE_NECROLYTE = 37337, + SPELL_MELEE_WOLF = 37339, + SPELL_MELEE_WARLOCK = 37345, + SPELL_MELEE_WARCHIEF_BLACKHAND = 37348, + + // cheat spells + SPELL_HAND_OF_MEDIVH_HORDE = 39338, // triggers 39339 + SPELL_HAND_OF_MEDIVH_ALLIANCE = 39342, // triggers 39339 + SPELL_FURY_OF_MEDIVH_HORDE = 39341, // triggers 39343 + SPELL_FURY_OF_MEDIVH_ALLIANCE = 39344, // triggers 39345 + SPELL_FURY_OF_MEDIVH_AURA = 39383, + // SPELL_FULL_HEAL_HORDE = 39334, // spells are not confirmed (probably removed after 2.4.3) + // SPELL_FULL_HEAL_ALLIANCE = 39335, + + // spells used by the chess npcs + SPELL_HEROISM = 37471, // human king + SPELL_SWEEP = 37474, + SPELL_BLOODLUST = 37472, // orc king + SPELL_CLEAVE = 37476, + SPELL_HEROIC_BLOW = 37406, // human pawn + SPELL_SHIELD_BLOCK = 37414, + SPELL_VICIOUS_STRIKE = 37413, // orc pawn + SPELL_WEAPON_DEFLECTION = 37416, + SPELL_SMASH = 37453, // human knight + SPELL_STOMP = 37498, + SPELL_BITE = 37454, // orc knight + SPELL_HOWL = 37502, + SPELL_ELEMENTAL_BLAST = 37462, // human queen + SPELL_RAIN_OF_FIRE = 37465, + SPELL_FIREBALL = 37463, // orc queen + // SPELL_POISON_CLOUD = 37469, + SPELL_POISON_CLOUD_ACTION = 37775, // triggers 37469 - acts as a target selector spell for orc queen + SPELL_HEALING = 37455, // human bishop + SPELL_HOLY_LANCE = 37459, + // SPELL_SHADOW_MEND = 37456, // orc bishop + SPELL_SHADOW_MEND_ACTION = 37824, // triggers 37456 - acts as a target selector spell for orc bishop + SPELL_SHADOW_SPEAR = 37461, + SPELL_GEYSER = 37427, // human rook + SPELL_WATER_SHIELD = 37432, + SPELL_HELLFIRE = 37428, // orc rook + SPELL_FIRE_SHIELD = 37434, + + // spells used to transform side trigger when npc dies + SPELL_TRANSFORM_FOOTMAN = 39350, + SPELL_TRANSFORM_CHARGER = 39352, + SPELL_TRANSFORM_CLERIC = 39353, + SPELL_TRANSFORM_WATER_ELEM = 39354, + SPELL_TRANSFORM_CONJURER = 39355, + SPELL_TRANSFORM_KING_LLANE = 39356, + SPELL_TRANSFORM_GRUNT = 39357, + SPELL_TRANSFORM_WOLF = 39358, + SPELL_TRANSFORM_NECROLYTE = 39359, + SPELL_TRANSFORM_DAEMON = 39360, + SPELL_TRANSFORM_WARLOCK = 39361, + SPELL_TRANSFORM_BLACKHAND = 39362, + + // generic npcs + // NPC_SQUARE_OUTSIDE_B = 17316, // used to check the interior of the board + // NPC_SQUARE_OUTSIDE_W = 17317, // not used in our script; keep for reference only + NPC_FURY_MEDIVH_VISUAL = 22521, // has aura 39383 + + // gossip texts + GOSSIP_ITEM_ORC_GRUNT = -3532006, + GOSSIP_ITEM_ORC_WOLF = -3532007, + GOSSIP_ITEM_SUMMONED_DEAMON = -3532008, + GOSSIP_ITEM_ORC_WARLOCK = -3532009, + GOSSIP_ITEM_ORC_NECROLYTE = -3532010, + GOSSIP_ITEM_WARCHIEF_BLACKHAND = -3532011, + GOSSIP_ITEM_HUMAN_FOOTMAN = -3532012, + GOSSIP_ITEM_HUMAN_CHARGER = -3532013, + GOSSIP_ITEM_WATER_ELEMENTAL = -3532014, + GOSSIP_ITEM_HUMAN_CONJURER = -3532015, + GOSSIP_ITEM_HUMAN_CLERIC = -3532016, + GOSSIP_ITEM_KING_LLANE = -3532017, + + // gossip menu + GOSSIP_MENU_ID_GRUNT = 10425, + GOSSIP_MENU_ID_WOLF = 10439, + GOSSIP_MENU_ID_WARLOCK = 10440, + GOSSIP_MENU_ID_NECROLYTE = 10434, + GOSSIP_MENU_ID_DEAMON = 10426, + GOSSIP_MENU_ID_BLACKHAND = 10442, + GOSSIP_MENU_ID_FOOTMAN = 8952, + GOSSIP_MENU_ID_CHARGER = 10414, + GOSSIP_MENU_ID_CONJURER = 10417, + GOSSIP_MENU_ID_CLERIC = 10416, + GOSSIP_MENU_ID_ELEMENTAL = 10413, + GOSSIP_MENU_ID_LLANE = 10418, + + // misc + TARGET_TYPE_RANDOM = 1, + TARGET_TYPE_FRIENDLY = 2, +}; + +/*###### +## npc_echo_of_medivh +######*/ + +struct MANGOS_DLL_DECL npc_echo_of_medivhAI : public ScriptedAI +{ + npc_echo_of_medivhAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (instance_karazhan*)pCreature->GetInstanceData(); + Reset(); + } + + instance_karazhan* m_pInstance; + + uint32 m_uiCheatTimer; + + void Reset() override + { + m_uiCheatTimer = 90000; + } + + void MoveInLineOfSight(Unit* /*pWho*/) override { } + void AttackStart(Unit* /*pWho*/) override { } + + void JustSummoned(Creature* pSummoned) override + { + if (pSummoned->GetEntry() == NPC_FURY_MEDIVH_VISUAL) + pSummoned->CastSpell(pSummoned, SPELL_FURY_OF_MEDIVH_AURA, true); + } + + void UpdateAI(const uint32 uiDiff) override + { + if (!m_pInstance || m_pInstance->GetData(TYPE_CHESS) != IN_PROGRESS) + return; + + if (m_uiCheatTimer < uiDiff) + { + DoCastSpellIfCan(m_creature, urand(0, 1) ? (m_pInstance->GetPlayerTeam() == ALLIANCE ? SPELL_HAND_OF_MEDIVH_HORDE : SPELL_HAND_OF_MEDIVH_ALLIANCE) : + (m_pInstance->GetPlayerTeam() == ALLIANCE ? SPELL_FURY_OF_MEDIVH_ALLIANCE : SPELL_FURY_OF_MEDIVH_HORDE)); + + switch (urand(0, 2)) + { + case 0: DoPlaySoundToSet(m_creature, SOUND_ID_CHEAT_1); break; + case 1: DoPlaySoundToSet(m_creature, SOUND_ID_CHEAT_2); break; + case 2: DoPlaySoundToSet(m_creature, SOUND_ID_CHEAT_3); break; + } + + DoScriptText(EMOTE_CHEAT, m_creature); + m_uiCheatTimer = 90000; + } + else + m_uiCheatTimer -= uiDiff; + } +}; + +CreatureAI* GetAI_npc_echo_of_medivh(Creature* pCreature) +{ + return new npc_echo_of_medivhAI(pCreature); +} + +/*###### +## npc_chess_piece_generic +######*/ + +struct MANGOS_DLL_DECL npc_chess_piece_genericAI : public ScriptedAI +{ + npc_chess_piece_genericAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (instance_karazhan*)pCreature->GetInstanceData(); + Reset(); + } + + instance_karazhan* m_pInstance; + + ObjectGuid m_currentSquareGuid; + + uint32 m_uiMoveTimer; + uint32 m_uiMoveCommandTimer; + uint32 m_uiSpellCommandTimer; + + bool m_bIsPrimarySpell; + float m_fCurrentOrientation; + + void Reset() override + { + m_uiMoveTimer = 0; + m_uiMoveCommandTimer = 1000; + m_uiSpellCommandTimer = m_creature->HasAura(SPELL_CONTROL_PIECE) ? 0 : 1000; + m_bIsPrimarySpell = true; + + // cancel move timer for player faction npcs + if (m_pInstance) + { + if ((m_pInstance->GetPlayerTeam() == ALLIANCE && m_creature->getFaction() == FACTION_ID_CHESS_ALLIANCE) || + (m_pInstance->GetPlayerTeam() == HORDE && m_creature->getFaction() == FACTION_ID_CHESS_HORDE)) + m_uiMoveCommandTimer = 0; + } + } + + // no default attacking or evading + void MoveInLineOfSight(Unit* /*pWho*/) override { } + void AttackStart(Unit* /*pWho*/) override { } + void EnterEvadeMode() override { } + + void JustDied(Unit* /*pKiller*/) override + { + if (Creature* pSquare = m_creature->GetMap()->GetCreature(m_currentSquareGuid)) + pSquare->RemoveAllAuras(); + + // ToDo: remove corpse after 10 sec + } + + void ReceiveAIEvent(AIEventType eventType, Creature* /*pSender*/, Unit* pInvoker, uint32 /*uiMiscValue*/) override + { + // handle move event + if (eventType == AI_EVENT_CUSTOM_A) + { + // clear the current square + if (Creature* pSquare = m_creature->GetMap()->GetCreature(m_currentSquareGuid)) + pSquare->RemoveAllAuras(); + + m_currentSquareGuid = pInvoker->GetObjectGuid(); + m_uiMoveTimer = 2000; + } + // handle encounter start event + else if (eventType == AI_EVENT_CUSTOM_B) + { + // reset the variables + Reset(); + m_currentSquareGuid = pInvoker->GetObjectGuid(); + + // ToDo: enable this when the scope of the spell is clear + //if (Creature* pStalker = m_pInstance->GetSingleCreatureFromStorage(NPC_WAITING_ROOM_STALKER)) + // pStalker->CastSpell(pStalker, SPELL_AI_ACTION_TIMER, true); + + //DoCastSpellIfCan(m_creature, SPELL_AI_SNAPSHOT_TIMER, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_CHESS_AI_ATTACK_TIMER, CAST_TRIGGERED); + + pInvoker->CastSpell(pInvoker, SPELL_DISABLE_SQUARE, true); + pInvoker->CastSpell(pInvoker, SPELL_IS_SQUARE_USED, true); + } + } + + void MovementInform(uint32 uiMotionType, uint32 uiPointId) override + { + if (uiMotionType != POINT_MOTION_TYPE || !uiPointId) + return; + + // update facing + if (Unit* pTarget = GetTargetByType(TARGET_TYPE_RANDOM, 5.0f)) + DoCastSpellIfCan(pTarget, SPELL_CHANGE_FACING); + else + m_creature->SetFacingTo(m_fCurrentOrientation); + } + + void SpellHit(Unit* pCaster, const SpellEntry* pSpell) override + { + // do a soft reset when the piece is controlled + if (pCaster->GetTypeId() == TYPEID_PLAYER && pSpell->Id == SPELL_CONTROL_PIECE) + Reset(); + } + + // Function which returns a random target by type and range + Unit* GetTargetByType(uint8 uiType, float fRange, float fArc = M_PI_F) + { + if (!m_pInstance) + return NULL; + + uint32 uiTeam = m_creature->getFaction() == FACTION_ID_CHESS_ALLIANCE ? FACTION_ID_CHESS_HORDE : FACTION_ID_CHESS_ALLIANCE; + + // get friendly list for this type + if (uiType == TARGET_TYPE_FRIENDLY) + uiTeam = m_creature->getFaction(); + + // Get the list of enemies + GuidList lTempList; + std::vector vTargets; + vTargets.reserve(lTempList.size()); + + m_pInstance->GetChessPiecesByFaction(lTempList, uiTeam); + for (GuidList::const_iterator itr = lTempList.begin(); itr != lTempList.end(); ++itr) + { + Creature* pTemp = m_creature->GetMap()->GetCreature(*itr); + if (pTemp && pTemp->isAlive()) + { + // check for specified range targets and angle; Note: to be checked if the angle is right + if (fRange && !m_creature->isInFrontInMap(pTemp, fRange, fArc)) + continue; + + // skip friendly targets which are at full HP + if (uiType == TARGET_TYPE_FRIENDLY && pTemp->GetHealth() == pTemp->GetMaxHealth()) + continue; + + vTargets.push_back(pTemp); + } + } + + if (vTargets.empty()) + return NULL; + + return vTargets[urand(0, vTargets.size() - 1)]; + } + + // Function to get a square as close as possible to the enemy + Unit* GetMovementSquare() + { + if (!m_pInstance) + return NULL; + + // define distance based on the spell radius + // this will replace the targeting sysmte of spells SPELL_MOVE_1 and SPELL_MOVE_2 + float fRadius = 10.0f; + std::list lSquaresList; + + // some pieces have special distance + switch (m_creature->GetEntry()) + { + case NPC_HUMAN_CONJURER: + case NPC_ORC_WARLOCK: + case NPC_HUMAN_CHARGER: + case NPC_ORC_WOLF: + fRadius = 15.0f; + break; + } + + // get all available squares for movement + GetCreatureListWithEntryInGrid(lSquaresList, m_creature, NPC_SQUARE_BLACK, fRadius); + GetCreatureListWithEntryInGrid(lSquaresList, m_creature, NPC_SQUARE_WHITE, fRadius); + + if (lSquaresList.empty()) + return NULL; + + // Get the list of enemies + GuidList lTempList; + std::list lEnemies; + + m_pInstance->GetChessPiecesByFaction(lTempList, m_creature->getFaction() == FACTION_ID_CHESS_ALLIANCE ? FACTION_ID_CHESS_HORDE : FACTION_ID_CHESS_ALLIANCE); + for (GuidList::const_iterator itr = lTempList.begin(); itr != lTempList.end(); ++itr) + { + Creature* pTemp = m_creature->GetMap()->GetCreature(*itr); + if (pTemp && pTemp->isAlive()) + lEnemies.push_back(pTemp); + } + + if (lEnemies.empty()) + return NULL; + + // Sort the enemies by distance and the squares compared to the distance to the closest enemy + lEnemies.sort(ObjectDistanceOrder(m_creature)); + lSquaresList.sort(ObjectDistanceOrder(lEnemies.front())); + + return lSquaresList.front(); + } + + virtual uint32 DoCastPrimarySpell() { return 5000; } + virtual uint32 DoCastSecondarySpell() { return 5000; } + + void UpdateAI(const uint32 uiDiff) override + { + if (!m_pInstance || m_pInstance->GetData(TYPE_CHESS) != IN_PROGRESS) + return; + + // issue move command + if (m_uiMoveCommandTimer) + { + if (m_uiMoveCommandTimer <= uiDiff) + { + // just update facing if some enemy is near + if (Unit* pTarget = GetTargetByType(TARGET_TYPE_RANDOM, 5.0f)) + DoCastSpellIfCan(pTarget, SPELL_CHANGE_FACING); + else + { + // the npc doesn't have a 100% chance to move; also there should be some GCD check in core for this part + if (roll_chance_i(15)) + { + // Note: in a normal case the target would be chosen using the spells above + // However, because the core doesn't support special targeting, we'll provide explicit target + //uint32 uiMoveSpell = SPELL_MOVE_1; + //switch (m_creature->GetEntry()) + //{ + // case NPC_HUMAN_CONJURER: + // case NPC_ORC_WARLOCK: + // case NPC_HUMAN_CHARGER: + // case NPC_ORC_WOLF: + // uiMoveSpell = SPELL_MOVE_2; + // break; + //} + //DoCastSpellIfCan(m_creature, uiMoveSpell, CAST_TRIGGERED); + + // workaround which provides specific move target + if (Unit* pTarget = GetMovementSquare()) + DoCastSpellIfCan(pTarget, SPELL_MOVE_GENERIC, CAST_TRIGGERED | CAST_INTERRUPT_PREVIOUS); + + m_fCurrentOrientation = m_creature->GetOrientation(); + } + } + + m_uiMoveCommandTimer = 5000; + } + else + m_uiMoveCommandTimer -= uiDiff; + } + + // issue spell command + if (m_uiSpellCommandTimer) + { + if (m_uiSpellCommandTimer <= uiDiff) + { + // alternate the spells and also reset the timer + m_uiSpellCommandTimer = m_bIsPrimarySpell ? DoCastPrimarySpell() : DoCastSecondarySpell(); + m_bIsPrimarySpell = !m_bIsPrimarySpell; + } + else + m_uiSpellCommandTimer -= uiDiff; + } + + // finish move timer + if (m_uiMoveTimer) + { + if (m_uiMoveTimer <= uiDiff) + { + if (Creature* pSquare = m_creature->GetMap()->GetCreature(m_currentSquareGuid)) + { + DoCastSpellIfCan(pSquare, SPELL_MOVE_MARKER, CAST_TRIGGERED); + m_creature->GetMotionMaster()->MovePoint(1, pSquare->GetPositionX(), pSquare->GetPositionY(), pSquare->GetPositionZ()); + } + m_uiMoveTimer = 0; + } + else + m_uiMoveTimer -= uiDiff; + } + + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + } +}; + +bool GossipSelect_npc_chess_generic(Player* pPlayer, Creature* pCreature, uint32 /*uiSender*/, uint32 uiAction) +{ + if (uiAction == GOSSIP_ACTION_INFO_DEF + 1) + { + // start event when used on the king + if (ScriptedInstance* pInstance = (ScriptedInstance*)pCreature->GetInstanceData()) + { + // teleport at the entrance and control the chess piece + pPlayer->CastSpell(pPlayer, SPELL_IN_GAME, true); + pPlayer->CastSpell(pCreature, SPELL_CONTROL_PIECE, true); + + if (pInstance->GetData(TYPE_CHESS) == NOT_STARTED) + pInstance->SetData(TYPE_CHESS, IN_PROGRESS); + } + + pPlayer->CLOSE_GOSSIP_MENU(); + } + + return true; +} + +bool EffectDummyCreature_npc_chess_generic(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget, ObjectGuid /*originalCasterGuid*/) +{ + // movement perform spell + if (uiSpellId == SPELL_MOVE_TO_SQUARE && uiEffIndex == EFFECT_INDEX_0) + { + if (pCaster->GetTypeId() == TYPEID_UNIT) + { + pCaster->CastSpell(pCaster, SPELL_DISABLE_SQUARE, true); + pCaster->CastSpell(pCaster, SPELL_IS_SQUARE_USED, true); + + pCreatureTarget->CastSpell(pCreatureTarget, SPELL_MOVE_COOLDOWN, true); + pCreatureTarget->AI()->SendAIEvent(AI_EVENT_CUSTOM_A, pCaster, pCreatureTarget); + } + + return true; + } + // generic melee tick + else if (uiSpellId == SPELL_ACTION_MELEE && uiEffIndex == EFFECT_INDEX_0) + { + uint32 uiMeleeSpell = 0; + + switch (pCreatureTarget->GetEntry()) + { + case NPC_KING_LLANE: uiMeleeSpell = SPELL_MELEE_KING_LLANE; break; + case NPC_HUMAN_CHARGER: uiMeleeSpell = SPELL_MELEE_CHARGER; break; + case NPC_HUMAN_CLERIC: uiMeleeSpell = SPELL_MELEE_CLERIC; break; + case NPC_HUMAN_CONJURER: uiMeleeSpell = SPELL_MELEE_CONJURER; break; + case NPC_HUMAN_FOOTMAN: uiMeleeSpell = SPELL_MELEE_FOOTMAN; break; + case NPC_CONJURED_WATER_ELEMENTAL: uiMeleeSpell = SPELL_MELEE_WATER_ELEM; break; + case NPC_WARCHIEF_BLACKHAND: uiMeleeSpell = SPELL_MELEE_WARCHIEF_BLACKHAND; break; + case NPC_ORC_GRUNT: uiMeleeSpell = SPELL_MELEE_GRUNT; break; + case NPC_ORC_NECROLYTE: uiMeleeSpell = SPELL_MELEE_NECROLYTE; break; + case NPC_ORC_WARLOCK: uiMeleeSpell = SPELL_MELEE_WARLOCK; break; + case NPC_ORC_WOLF: uiMeleeSpell = SPELL_MELEE_WOLF; break; + case NPC_SUMMONED_DAEMON: uiMeleeSpell = SPELL_MELEE_DAEMON; break; + } + + pCreatureTarget->CastSpell(pCreatureTarget, uiMeleeSpell, true); + return true; + } + // square facing + else if (uiSpellId == SPELL_FACE_SQUARE && uiEffIndex == EFFECT_INDEX_0) + { + if (pCaster->GetTypeId() == TYPEID_UNIT) + pCreatureTarget->SetFacingToObject(pCaster); + + return true; + } + + return false; +} + +/*###### +## npc_king_llane +######*/ + +struct MANGOS_DLL_DECL npc_king_llaneAI : public npc_chess_piece_genericAI +{ + npc_king_llaneAI(Creature* pCreature) : npc_chess_piece_genericAI(pCreature) + { + m_bIsAttacked = false; + Reset(); + } + + bool m_bIsAttacked; + + void DamageTaken(Unit* pDoneBy, uint32& uiDamage) override + { + if (!uiDamage || !m_bIsAttacked || !m_pInstance || pDoneBy->GetTypeId() != TYPEID_UNIT) + return; + + if (Creature* pMedivh = m_pInstance->GetSingleCreatureFromStorage(NPC_ECHO_MEDIVH)) + { + if (m_pInstance->GetPlayerTeam() == ALLIANCE) + DoPlaySoundToSet(pMedivh, SOUND_ID_CHECK_PLAYER); + else + DoPlaySoundToSet(pMedivh, SOUND_ID_CHECK_MEDIVH); + } + + m_bIsAttacked = true; + } + + void JustDied(Unit* pKiller) override + { + npc_chess_piece_genericAI::JustDied(pKiller); + + if (!m_pInstance) + return; + + Creature* pMedivh = m_pInstance->GetSingleCreatureFromStorage(NPC_ECHO_MEDIVH); + if (!pMedivh) + return; + + if (m_pInstance->GetPlayerTeam() == HORDE) + { + DoPlaySoundToSet(pMedivh, SOUND_ID_WIN_PLAYER); + DoScriptText(EMOTE_LIFT_CURSE, pMedivh); + + m_pInstance->SetData(TYPE_CHESS, DONE); + } + else + { + DoPlaySoundToSet(pMedivh, SOUND_ID_WIN_MEDIVH); + m_pInstance->SetData(TYPE_CHESS, NOT_STARTED); + } + + m_pInstance->DoMoveChessPieceToSides(SPELL_TRANSFORM_KING_LLANE, FACTION_ID_CHESS_ALLIANCE, true); + } + + uint32 DoCastPrimarySpell() override + { + if (Unit* pTarget = GetTargetByType(TARGET_TYPE_RANDOM, 20.0f)) + { + DoCastSpellIfCan(m_creature, SPELL_HEROISM); + + // reset timer based on spell values + const SpellEntry* pSpell = GetSpellStore()->LookupEntry(SPELL_HEROISM); + return pSpell->RecoveryTime ? pSpell->RecoveryTime : pSpell->CategoryRecoveryTime; + } + + return 5000; + } + + uint32 DoCastSecondarySpell() override + { + if (Unit* pTarget = GetTargetByType(TARGET_TYPE_RANDOM, 10.0f)) + { + DoCastSpellIfCan(m_creature, SPELL_SWEEP); + + // reset timer based on spell values + const SpellEntry* pSpell = GetSpellStore()->LookupEntry(SPELL_SWEEP); + return pSpell->RecoveryTime ? pSpell->RecoveryTime : pSpell->CategoryRecoveryTime; + } + + return 5000; + } +}; + +CreatureAI* GetAI_npc_king_llane(Creature* pCreature) +{ + return new npc_king_llaneAI(pCreature); +} + +bool GossipHello_npc_king_llane(Player* pPlayer, Creature* pCreature) +{ + if (pPlayer->HasAura(SPELL_RECENTLY_IN_GAME) || pCreature->HasAura(SPELL_CONTROL_PIECE)) + return true; + + if (ScriptedInstance* pInstance = (ScriptedInstance*)pCreature->GetInstanceData()) + { + if (pInstance->GetData(TYPE_CHESS) != DONE && pPlayer->GetTeam() == ALLIANCE) + pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KING_LLANE, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); + } + + pPlayer->SEND_GOSSIP_MENU(GOSSIP_MENU_ID_LLANE, pCreature->GetObjectGuid()); + return true; +} + +/*###### +## npc_warchief_blackhand +######*/ + +struct MANGOS_DLL_DECL npc_warchief_blackhandAI : public npc_chess_piece_genericAI +{ + npc_warchief_blackhandAI(Creature* pCreature) : npc_chess_piece_genericAI(pCreature) + { + m_bIsAttacked = false; + Reset(); + } + + bool m_bIsAttacked; + + void DamageTaken(Unit* pDoneBy, uint32& uiDamage) override + { + if (!uiDamage || !m_bIsAttacked || !m_pInstance || pDoneBy->GetTypeId() != TYPEID_UNIT) + return; + + if (Creature* pMedivh = m_pInstance->GetSingleCreatureFromStorage(NPC_ECHO_MEDIVH)) + { + if (m_pInstance->GetPlayerTeam() == HORDE) + DoPlaySoundToSet(pMedivh, SOUND_ID_CHECK_PLAYER); + else + DoPlaySoundToSet(pMedivh, SOUND_ID_CHECK_MEDIVH); + } + + m_bIsAttacked = true; + } + + void JustDied(Unit* pKiller) override + { + npc_chess_piece_genericAI::JustDied(pKiller); + + if (!m_pInstance) + return; + + Creature* pMedivh = m_pInstance->GetSingleCreatureFromStorage(NPC_ECHO_MEDIVH); + if (!pMedivh) + return; + + if (m_pInstance->GetPlayerTeam() == ALLIANCE) + { + DoPlaySoundToSet(pMedivh, SOUND_ID_WIN_PLAYER); + DoScriptText(EMOTE_LIFT_CURSE, pMedivh); + + m_pInstance->SetData(TYPE_CHESS, DONE); + } + else + { + DoPlaySoundToSet(pMedivh, SOUND_ID_WIN_MEDIVH); + m_pInstance->SetData(TYPE_CHESS, NOT_STARTED); + } + + m_pInstance->DoMoveChessPieceToSides(SPELL_TRANSFORM_BLACKHAND, FACTION_ID_CHESS_HORDE, true); + } + + uint32 DoCastPrimarySpell() override + { + if (Unit* pTarget = GetTargetByType(TARGET_TYPE_RANDOM, 20.0f)) + { + DoCastSpellIfCan(m_creature, SPELL_BLOODLUST); + + // reset timer based on spell values + const SpellEntry* pSpell = GetSpellStore()->LookupEntry(SPELL_BLOODLUST); + return pSpell->RecoveryTime ? pSpell->RecoveryTime : pSpell->CategoryRecoveryTime; + } + + return 5000; + } + + uint32 DoCastSecondarySpell() override + { + if (Unit* pTarget = GetTargetByType(TARGET_TYPE_RANDOM, 10.0f)) + { + DoCastSpellIfCan(m_creature, SPELL_CLEAVE); + + // reset timer based on spell values + const SpellEntry* pSpell = GetSpellStore()->LookupEntry(SPELL_CLEAVE); + return pSpell->RecoveryTime ? pSpell->RecoveryTime : pSpell->CategoryRecoveryTime; + } + + return 5000; + } +}; + +CreatureAI* GetAI_npc_warchief_blackhand(Creature* pCreature) +{ + return new npc_warchief_blackhandAI(pCreature); +} + +bool GossipHello_npc_warchief_blackhand(Player* pPlayer, Creature* pCreature) +{ + if (pPlayer->HasAura(SPELL_RECENTLY_IN_GAME) || pCreature->HasAura(SPELL_CONTROL_PIECE)) + return true; + + if (ScriptedInstance* pInstance = (ScriptedInstance*)pCreature->GetInstanceData()) + { + if (pInstance->GetData(TYPE_CHESS) != DONE && pPlayer->GetTeam() == HORDE) + pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_WARCHIEF_BLACKHAND, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); + } + + pPlayer->SEND_GOSSIP_MENU(GOSSIP_MENU_ID_BLACKHAND, pCreature->GetObjectGuid()); + return true; +} + +/*###### +## npc_human_conjurer +######*/ + +struct MANGOS_DLL_DECL npc_human_conjurerAI : public npc_chess_piece_genericAI +{ + npc_human_conjurerAI(Creature* pCreature) : npc_chess_piece_genericAI(pCreature) { Reset(); } + + void JustDied(Unit* pKiller) override + { + npc_chess_piece_genericAI::JustDied(pKiller); + + if (!m_pInstance) + return; + + Creature* pMedivh = m_pInstance->GetSingleCreatureFromStorage(NPC_ECHO_MEDIVH); + if (!pMedivh) + return; + + if (m_pInstance->GetPlayerTeam() == ALLIANCE) + DoPlaySoundToSet(pMedivh, SOUND_ID_LOSE_QUEEN_PLAYER); + else + DoPlaySoundToSet(pMedivh, SOUND_ID_LOSE_QUEEN_MEDIVH); + + m_pInstance->DoMoveChessPieceToSides(SPELL_TRANSFORM_CONJURER, FACTION_ID_CHESS_ALLIANCE); + } + + uint32 DoCastPrimarySpell() override + { + if (Unit* pTarget = GetTargetByType(TARGET_TYPE_RANDOM, 20.0f)) + { + DoCastSpellIfCan(pTarget, SPELL_ELEMENTAL_BLAST); + + // reset timer based on spell values + const SpellEntry* pSpell = GetSpellStore()->LookupEntry(SPELL_ELEMENTAL_BLAST); + return pSpell->RecoveryTime ? pSpell->RecoveryTime : pSpell->CategoryRecoveryTime; + } + + return 5000; + } + + uint32 DoCastSecondarySpell() override + { + if (Unit* pTarget = GetTargetByType(TARGET_TYPE_RANDOM, 25.0f)) + { + DoCastSpellIfCan(pTarget, SPELL_RAIN_OF_FIRE); + + // reset timer based on spell values + const SpellEntry* pSpell = GetSpellStore()->LookupEntry(SPELL_RAIN_OF_FIRE); + return pSpell->RecoveryTime ? pSpell->RecoveryTime : pSpell->CategoryRecoveryTime; + } + + return 5000; + } +}; + +CreatureAI* GetAI_npc_human_conjurer(Creature* pCreature) +{ + return new npc_human_conjurerAI(pCreature); +} + +bool GossipHello_npc_human_conjurer(Player* pPlayer, Creature* pCreature) +{ + if (pPlayer->HasAura(SPELL_RECENTLY_IN_GAME) || pCreature->HasAura(SPELL_CONTROL_PIECE)) + return true; + + if (ScriptedInstance* pInstance = (ScriptedInstance*)pCreature->GetInstanceData()) + { + if (pInstance->GetData(TYPE_CHESS) == IN_PROGRESS && pPlayer->GetTeam() == ALLIANCE) + pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_HUMAN_CONJURER, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); + } + + pPlayer->SEND_GOSSIP_MENU(GOSSIP_MENU_ID_CONJURER, pCreature->GetObjectGuid()); + return true; +} + +/*###### +## npc_orc_warlock +######*/ + +struct MANGOS_DLL_DECL npc_orc_warlockAI : public npc_chess_piece_genericAI +{ + npc_orc_warlockAI(Creature* pCreature) : npc_chess_piece_genericAI(pCreature) { Reset(); } + + void JustDied(Unit* pKiller) override + { + npc_chess_piece_genericAI::JustDied(pKiller); + + if (!m_pInstance) + return; + + Creature* pMedivh = m_pInstance->GetSingleCreatureFromStorage(NPC_ECHO_MEDIVH); + if (!pMedivh) + return; + + if (m_pInstance->GetPlayerTeam() == HORDE) + DoPlaySoundToSet(pMedivh, SOUND_ID_LOSE_QUEEN_PLAYER); + else + DoPlaySoundToSet(pMedivh, SOUND_ID_LOSE_QUEEN_MEDIVH); + + m_pInstance->DoMoveChessPieceToSides(SPELL_TRANSFORM_WARLOCK, FACTION_ID_CHESS_HORDE); + } + + uint32 DoCastPrimarySpell() override + { + if (Unit* pTarget = GetTargetByType(TARGET_TYPE_RANDOM, 20.0f)) + { + DoCastSpellIfCan(pTarget, SPELL_FIREBALL); + + // reset timer based on spell values + const SpellEntry* pSpell = GetSpellStore()->LookupEntry(SPELL_FIREBALL); + return pSpell->RecoveryTime ? pSpell->RecoveryTime : pSpell->CategoryRecoveryTime; + } + + return 5000; + } + + uint32 DoCastSecondarySpell() override + { + if (Unit* pTarget = GetTargetByType(TARGET_TYPE_RANDOM, 25.0f)) + { + DoCastSpellIfCan(pTarget, SPELL_POISON_CLOUD_ACTION); + + // reset timer based on spell values + const SpellEntry* pSpell = GetSpellStore()->LookupEntry(SPELL_POISON_CLOUD_ACTION); + return pSpell->RecoveryTime ? pSpell->RecoveryTime : pSpell->CategoryRecoveryTime; + } + + return 5000; + } +}; + +CreatureAI* GetAI_npc_orc_warlock(Creature* pCreature) +{ + return new npc_orc_warlockAI(pCreature); +} + +bool GossipHello_npc_orc_warlock(Player* pPlayer, Creature* pCreature) +{ + if (pPlayer->HasAura(SPELL_RECENTLY_IN_GAME) || pCreature->HasAura(SPELL_CONTROL_PIECE)) + return true; + + if (ScriptedInstance* pInstance = (ScriptedInstance*)pCreature->GetInstanceData()) + { + if (pInstance->GetData(TYPE_CHESS) == IN_PROGRESS && pPlayer->GetTeam() == HORDE) + pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_ORC_WARLOCK, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); + } + + pPlayer->SEND_GOSSIP_MENU(GOSSIP_MENU_ID_WARLOCK, pCreature->GetObjectGuid()); + return true; +} + +/*###### +## npc_human_footman +######*/ + +struct MANGOS_DLL_DECL npc_human_footmanAI : public npc_chess_piece_genericAI +{ + npc_human_footmanAI(Creature* pCreature) : npc_chess_piece_genericAI(pCreature) { Reset(); } + + void JustDied(Unit* pKiller) override + { + npc_chess_piece_genericAI::JustDied(pKiller); + + if (!m_pInstance) + return; + + Creature* pMedivh = m_pInstance->GetSingleCreatureFromStorage(NPC_ECHO_MEDIVH); + if (!pMedivh) + return; + + if (m_pInstance->GetPlayerTeam() == ALLIANCE) + { + switch (urand(0, 2)) + { + case 0: DoPlaySoundToSet(pMedivh, SOUND_ID_LOSE_PAWN_PLAYER_1); break; + case 1: DoPlaySoundToSet(pMedivh, SOUND_ID_LOSE_PAWN_PLAYER_2); break; + case 2: DoPlaySoundToSet(pMedivh, SOUND_ID_LOSE_PAWN_PLAYER_3); break; + } + } + else + { + switch (urand(0, 2)) + { + case 0: DoPlaySoundToSet(pMedivh, SOUND_ID_LOSE_PAWN_MEDIVH_1); break; + case 1: DoPlaySoundToSet(pMedivh, SOUND_ID_LOSE_PAWN_MEDIVH_2); break; + case 2: DoPlaySoundToSet(pMedivh, SOUND_ID_LOSE_PAWN_MEDIVH_3); break; + } + } + + m_pInstance->DoMoveChessPieceToSides(SPELL_TRANSFORM_FOOTMAN, FACTION_ID_CHESS_ALLIANCE); + } + + uint32 DoCastPrimarySpell() override + { + if (Unit* pTarget = GetTargetByType(TARGET_TYPE_RANDOM, 8.0f, M_PI_F / 12)) + { + DoCastSpellIfCan(m_creature, SPELL_HEROIC_BLOW); + + // reset timer based on spell values + const SpellEntry* pSpell = GetSpellStore()->LookupEntry(SPELL_HEROIC_BLOW); + return pSpell->RecoveryTime ? pSpell->RecoveryTime : pSpell->CategoryRecoveryTime; + } + + return 5000; + } + + uint32 DoCastSecondarySpell() override + { + if (Unit* pTarget = GetTargetByType(TARGET_TYPE_RANDOM, 8.0f)) + { + DoCastSpellIfCan(m_creature, SPELL_SHIELD_BLOCK); + + // reset timer based on spell values + const SpellEntry* pSpell = GetSpellStore()->LookupEntry(SPELL_SHIELD_BLOCK); + return pSpell->RecoveryTime ? pSpell->RecoveryTime : pSpell->CategoryRecoveryTime; + } + + return 5000; + } +}; + +CreatureAI* GetAI_npc_human_footman(Creature* pCreature) +{ + return new npc_human_footmanAI(pCreature); +} + +bool GossipHello_npc_human_footman(Player* pPlayer, Creature* pCreature) +{ + if (pPlayer->HasAura(SPELL_RECENTLY_IN_GAME) || pCreature->HasAura(SPELL_CONTROL_PIECE)) + return true; + + if (ScriptedInstance* pInstance = (ScriptedInstance*)pCreature->GetInstanceData()) + { + if (pInstance->GetData(TYPE_CHESS) == IN_PROGRESS && pPlayer->GetTeam() == ALLIANCE) + pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_HUMAN_FOOTMAN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); + } + + pPlayer->SEND_GOSSIP_MENU(GOSSIP_MENU_ID_FOOTMAN, pCreature->GetObjectGuid()); + return true; +} + +/*###### +## npc_orc_grunt +######*/ + +struct MANGOS_DLL_DECL npc_orc_gruntAI : public npc_chess_piece_genericAI +{ + npc_orc_gruntAI(Creature* pCreature) : npc_chess_piece_genericAI(pCreature) { Reset(); } + + void JustDied(Unit* pKiller) override + { + npc_chess_piece_genericAI::JustDied(pKiller); + + if (!m_pInstance) + return; + + Creature* pMedivh = m_pInstance->GetSingleCreatureFromStorage(NPC_ECHO_MEDIVH); + if (!pMedivh) + return; + + if (m_pInstance->GetPlayerTeam() == HORDE) + { + switch (urand(0, 2)) + { + case 0: DoPlaySoundToSet(pMedivh, SOUND_ID_LOSE_PAWN_PLAYER_1); break; + case 1: DoPlaySoundToSet(pMedivh, SOUND_ID_LOSE_PAWN_PLAYER_2); break; + case 2: DoPlaySoundToSet(pMedivh, SOUND_ID_LOSE_PAWN_PLAYER_3); break; + } + } + else + { + switch (urand(0, 2)) + { + case 0: DoPlaySoundToSet(pMedivh, SOUND_ID_LOSE_PAWN_MEDIVH_1); break; + case 1: DoPlaySoundToSet(pMedivh, SOUND_ID_LOSE_PAWN_MEDIVH_2); break; + case 2: DoPlaySoundToSet(pMedivh, SOUND_ID_LOSE_PAWN_MEDIVH_3); break; + } + } + + m_pInstance->DoMoveChessPieceToSides(SPELL_TRANSFORM_GRUNT, FACTION_ID_CHESS_HORDE); + } + + uint32 DoCastPrimarySpell() override + { + if (Unit* pTarget = GetTargetByType(TARGET_TYPE_RANDOM, 8.0f, M_PI_F / 12)) + { + DoCastSpellIfCan(m_creature, SPELL_VICIOUS_STRIKE); + + // reset timer based on spell values + const SpellEntry* pSpell = GetSpellStore()->LookupEntry(SPELL_VICIOUS_STRIKE); + return pSpell->RecoveryTime ? pSpell->RecoveryTime : pSpell->CategoryRecoveryTime; + } + + return 5000; + } + + uint32 DoCastSecondarySpell() override + { + if (Unit* pTarget = GetTargetByType(TARGET_TYPE_RANDOM, 8.0f)) + { + DoCastSpellIfCan(m_creature, SPELL_WEAPON_DEFLECTION); + + // reset timer based on spell values + const SpellEntry* pSpell = GetSpellStore()->LookupEntry(SPELL_WEAPON_DEFLECTION); + return pSpell->RecoveryTime ? pSpell->RecoveryTime : pSpell->CategoryRecoveryTime; + } + + return 5000; + } +}; + +CreatureAI* GetAI_npc_orc_grunt(Creature* pCreature) +{ + return new npc_orc_gruntAI(pCreature); +} + +bool GossipHello_npc_orc_grunt(Player* pPlayer, Creature* pCreature) +{ + if (pPlayer->HasAura(SPELL_RECENTLY_IN_GAME) || pCreature->HasAura(SPELL_CONTROL_PIECE)) + return true; + + if (ScriptedInstance* pInstance = (ScriptedInstance*)pCreature->GetInstanceData()) + { + if (pInstance->GetData(TYPE_CHESS) == IN_PROGRESS && pPlayer->GetTeam() == HORDE) + pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_ORC_GRUNT, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); + } + + pPlayer->SEND_GOSSIP_MENU(GOSSIP_MENU_ID_GRUNT, pCreature->GetObjectGuid()); + return true; +} + +/*###### +## npc_water_elemental +######*/ + +struct MANGOS_DLL_DECL npc_water_elementalAI : public npc_chess_piece_genericAI +{ + npc_water_elementalAI(Creature* pCreature) : npc_chess_piece_genericAI(pCreature) { Reset(); } + + void JustDied(Unit* pKiller) override + { + npc_chess_piece_genericAI::JustDied(pKiller); + + if (!m_pInstance) + return; + + Creature* pMedivh = m_pInstance->GetSingleCreatureFromStorage(NPC_ECHO_MEDIVH); + if (!pMedivh) + return; + + if (m_pInstance->GetPlayerTeam() == ALLIANCE) + DoPlaySoundToSet(pMedivh, SOUND_ID_LOSE_ROOK_PLAYER); + else + DoPlaySoundToSet(pMedivh, SOUND_ID_LOSE_ROOK_MEDIVH); + + m_pInstance->DoMoveChessPieceToSides(SPELL_TRANSFORM_WATER_ELEM, FACTION_ID_CHESS_ALLIANCE); + } + + uint32 DoCastPrimarySpell() override + { + if (Unit* pTarget = GetTargetByType(TARGET_TYPE_RANDOM, 9.0f)) + { + DoCastSpellIfCan(m_creature, SPELL_GEYSER); + + // reset timer based on spell values + const SpellEntry* pSpell = GetSpellStore()->LookupEntry(SPELL_GEYSER); + return pSpell->RecoveryTime ? pSpell->RecoveryTime : pSpell->CategoryRecoveryTime; + } + + return 5000; + } + + uint32 DoCastSecondarySpell() override + { + if (Unit* pTarget = GetTargetByType(TARGET_TYPE_RANDOM, 9.0f)) + { + DoCastSpellIfCan(m_creature, SPELL_WATER_SHIELD); + + // reset timer based on spell values + const SpellEntry* pSpell = GetSpellStore()->LookupEntry(SPELL_WATER_SHIELD); + return pSpell->RecoveryTime ? pSpell->RecoveryTime : pSpell->CategoryRecoveryTime; + } + + return 5000; + } +}; + +CreatureAI* GetAI_npc_water_elemental(Creature* pCreature) +{ + return new npc_water_elementalAI(pCreature); +} + +bool GossipHello_npc_water_elemental(Player* pPlayer, Creature* pCreature) +{ + if (pPlayer->HasAura(SPELL_RECENTLY_IN_GAME) || pCreature->HasAura(SPELL_CONTROL_PIECE)) + return true; + + if (ScriptedInstance* pInstance = (ScriptedInstance*)pCreature->GetInstanceData()) + { + if (pInstance->GetData(TYPE_CHESS) == IN_PROGRESS && pPlayer->GetTeam() == ALLIANCE) + pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_WATER_ELEMENTAL, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); + } + + pPlayer->SEND_GOSSIP_MENU(GOSSIP_MENU_ID_ELEMENTAL, pCreature->GetObjectGuid()); + return true; +} + +/*###### +## npc_summoned_daemon +######*/ + +struct MANGOS_DLL_DECL npc_summoned_daemonAI : public npc_chess_piece_genericAI +{ + npc_summoned_daemonAI(Creature* pCreature) : npc_chess_piece_genericAI(pCreature) { Reset(); } + + void JustDied(Unit* pKiller) override + { + npc_chess_piece_genericAI::JustDied(pKiller); + + if (!m_pInstance) + return; + + Creature* pMedivh = m_pInstance->GetSingleCreatureFromStorage(NPC_ECHO_MEDIVH); + if (!pMedivh) + return; + + if (m_pInstance->GetPlayerTeam() == HORDE) + DoPlaySoundToSet(pMedivh, SOUND_ID_LOSE_ROOK_PLAYER); + else + DoPlaySoundToSet(pMedivh, SOUND_ID_LOSE_ROOK_MEDIVH); + + m_pInstance->DoMoveChessPieceToSides(SPELL_TRANSFORM_DAEMON, FACTION_ID_CHESS_HORDE); + } + + uint32 DoCastPrimarySpell() override + { + if (Unit* pTarget = GetTargetByType(TARGET_TYPE_RANDOM, 9.0f)) + { + DoCastSpellIfCan(m_creature, SPELL_HELLFIRE); + + // reset timer based on spell values + const SpellEntry* pSpell = GetSpellStore()->LookupEntry(SPELL_HELLFIRE); + return pSpell->RecoveryTime ? pSpell->RecoveryTime : pSpell->CategoryRecoveryTime; + } + + return 5000; + } + + uint32 DoCastSecondarySpell() override + { + if (Unit* pTarget = GetTargetByType(TARGET_TYPE_RANDOM, 9.0f)) + { + DoCastSpellIfCan(m_creature, SPELL_FIRE_SHIELD); + + // reset timer based on spell values + const SpellEntry* pSpell = GetSpellStore()->LookupEntry(SPELL_FIRE_SHIELD); + return pSpell->RecoveryTime ? pSpell->RecoveryTime : pSpell->CategoryRecoveryTime; + } + + return 5000; + } +}; + +CreatureAI* GetAI_npc_summoned_daemon(Creature* pCreature) +{ + return new npc_summoned_daemonAI(pCreature); +} + +bool GossipHello_npc_summoned_daemon(Player* pPlayer, Creature* pCreature) +{ + if (pPlayer->HasAura(SPELL_RECENTLY_IN_GAME) || pCreature->HasAura(SPELL_CONTROL_PIECE)) + return true; + + if (ScriptedInstance* pInstance = (ScriptedInstance*)pCreature->GetInstanceData()) + { + if (pInstance->GetData(TYPE_CHESS) == IN_PROGRESS && pPlayer->GetTeam() == HORDE) + pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_SUMMONED_DEAMON, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); + } + + pPlayer->SEND_GOSSIP_MENU(GOSSIP_MENU_ID_DEAMON, pCreature->GetObjectGuid()); + return true; +} + +/*###### +## npc_human_charger +######*/ + +struct MANGOS_DLL_DECL npc_human_chargerAI : public npc_chess_piece_genericAI +{ + npc_human_chargerAI(Creature* pCreature) : npc_chess_piece_genericAI(pCreature) { Reset(); } + + void JustDied(Unit* pKiller) override + { + npc_chess_piece_genericAI::JustDied(pKiller); + + if (!m_pInstance) + return; + + Creature* pMedivh = m_pInstance->GetSingleCreatureFromStorage(NPC_ECHO_MEDIVH); + if (!pMedivh) + return; + + if (m_pInstance->GetPlayerTeam() == ALLIANCE) + DoPlaySoundToSet(pMedivh, SOUND_ID_LOSE_KNIGHT_PLAYER); + else + DoPlaySoundToSet(pMedivh, SOUND_ID_LOSE_KNIGHT_MEDIVH); + + m_pInstance->DoMoveChessPieceToSides(SPELL_TRANSFORM_CHARGER, FACTION_ID_CHESS_ALLIANCE); + } + + uint32 DoCastPrimarySpell() override + { + if (Unit* pTarget = GetTargetByType(TARGET_TYPE_RANDOM, 8.0f, M_PI_F / 12)) + { + DoCastSpellIfCan(m_creature, SPELL_SMASH); + + // reset timer based on spell values + const SpellEntry* pSpell = GetSpellStore()->LookupEntry(SPELL_SMASH); + return pSpell->RecoveryTime ? pSpell->RecoveryTime : pSpell->CategoryRecoveryTime; + } + + return 5000; + } + + uint32 DoCastSecondarySpell() override + { + if (Unit* pTarget = GetTargetByType(TARGET_TYPE_RANDOM, 10.0f, M_PI_F / 12)) + { + DoCastSpellIfCan(m_creature, SPELL_STOMP); + + // reset timer based on spell values + const SpellEntry* pSpell = GetSpellStore()->LookupEntry(SPELL_STOMP); + return pSpell->RecoveryTime ? pSpell->RecoveryTime : pSpell->CategoryRecoveryTime; + } + + return 5000; + } +}; + +CreatureAI* GetAI_npc_human_charger(Creature* pCreature) +{ + return new npc_human_chargerAI(pCreature); +} + +bool GossipHello_npc_human_charger(Player* pPlayer, Creature* pCreature) +{ + if (pPlayer->HasAura(SPELL_RECENTLY_IN_GAME) || pCreature->HasAura(SPELL_CONTROL_PIECE)) + return true; + + if (ScriptedInstance* pInstance = (ScriptedInstance*)pCreature->GetInstanceData()) + { + if (pInstance->GetData(TYPE_CHESS) == IN_PROGRESS && pPlayer->GetTeam() == ALLIANCE) + pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_HUMAN_CHARGER, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); + } + + pPlayer->SEND_GOSSIP_MENU(GOSSIP_MENU_ID_CHARGER, pCreature->GetObjectGuid()); + return true; +} + +/*###### +## npc_orc_wolf +######*/ + +struct MANGOS_DLL_DECL npc_orc_wolfAI : public npc_chess_piece_genericAI +{ + npc_orc_wolfAI(Creature* pCreature) : npc_chess_piece_genericAI(pCreature) { Reset(); } + + void JustDied(Unit* pKiller) override + { + npc_chess_piece_genericAI::JustDied(pKiller); + + if (!m_pInstance) + return; + + Creature* pMedivh = m_pInstance->GetSingleCreatureFromStorage(NPC_ECHO_MEDIVH); + if (!pMedivh) + return; + + if (m_pInstance->GetPlayerTeam() == HORDE) + DoPlaySoundToSet(pMedivh, SOUND_ID_LOSE_KNIGHT_PLAYER); + else + DoPlaySoundToSet(pMedivh, SOUND_ID_LOSE_KNIGHT_MEDIVH); + + m_pInstance->DoMoveChessPieceToSides(SPELL_TRANSFORM_WOLF, FACTION_ID_CHESS_HORDE); + } + + uint32 DoCastPrimarySpell() override + { + if (Unit* pTarget = GetTargetByType(TARGET_TYPE_RANDOM, 8.0f, M_PI_F / 12)) + { + DoCastSpellIfCan(m_creature, SPELL_BITE); + + // reset timer based on spell values + const SpellEntry* pSpell = GetSpellStore()->LookupEntry(SPELL_BITE); + return pSpell->RecoveryTime ? pSpell->RecoveryTime : pSpell->CategoryRecoveryTime; + } + + return 5000; + } + + uint32 DoCastSecondarySpell() override + { + if (Unit* pTarget = GetTargetByType(TARGET_TYPE_RANDOM, 10.0f, M_PI_F / 12)) + { + DoCastSpellIfCan(m_creature, SPELL_HOWL); + + // reset timer based on spell values + const SpellEntry* pSpell = GetSpellStore()->LookupEntry(SPELL_HOWL); + return pSpell->RecoveryTime ? pSpell->RecoveryTime : pSpell->CategoryRecoveryTime; + } + + return 5000; + } +}; + +CreatureAI* GetAI_npc_orc_wolf(Creature* pCreature) +{ + return new npc_orc_wolfAI(pCreature); +} + +bool GossipHello_npc_orc_wolf(Player* pPlayer, Creature* pCreature) +{ + if (pPlayer->HasAura(SPELL_RECENTLY_IN_GAME) || pCreature->HasAura(SPELL_CONTROL_PIECE)) + return true; + + if (ScriptedInstance* pInstance = (ScriptedInstance*)pCreature->GetInstanceData()) + { + if (pInstance->GetData(TYPE_CHESS) == IN_PROGRESS && pPlayer->GetTeam() == HORDE) + pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_ORC_WOLF, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); + } + + pPlayer->SEND_GOSSIP_MENU(GOSSIP_MENU_ID_WOLF, pCreature->GetObjectGuid()); + return true; +} + +/*###### +## npc_human_cleric +######*/ + +struct MANGOS_DLL_DECL npc_human_clericAI : public npc_chess_piece_genericAI +{ + npc_human_clericAI(Creature* pCreature) : npc_chess_piece_genericAI(pCreature) { Reset(); } + + void JustDied(Unit* pKiller) override + { + npc_chess_piece_genericAI::JustDied(pKiller); + + if (!m_pInstance) + return; + + Creature* pMedivh = m_pInstance->GetSingleCreatureFromStorage(NPC_ECHO_MEDIVH); + if (!pMedivh) + return; + + if (m_pInstance->GetPlayerTeam() == ALLIANCE) + DoPlaySoundToSet(pMedivh, SOUND_ID_LOSE_BISHOP_PLAYER); + else + DoPlaySoundToSet(pMedivh, SOUND_ID_LOSE_BISHOP_MEDIVH); + + m_pInstance->DoMoveChessPieceToSides(SPELL_TRANSFORM_CLERIC, FACTION_ID_CHESS_ALLIANCE); + } + + uint32 DoCastPrimarySpell() override + { + if (Unit* pTarget = GetTargetByType(TARGET_TYPE_FRIENDLY, 25.0f)) + { + DoCastSpellIfCan(pTarget, SPELL_HEALING); + + // reset timer based on spell values + const SpellEntry* pSpell = GetSpellStore()->LookupEntry(SPELL_HEALING); + return pSpell->RecoveryTime ? pSpell->RecoveryTime : pSpell->CategoryRecoveryTime; + } + + return 5000; + } + + uint32 DoCastSecondarySpell() override + { + if (Unit* pTarget = GetTargetByType(TARGET_TYPE_RANDOM, 18.0f, M_PI_F / 12)) + { + DoCastSpellIfCan(m_creature, SPELL_HOLY_LANCE); + + // reset timer based on spell values + const SpellEntry* pSpell = GetSpellStore()->LookupEntry(SPELL_HOLY_LANCE); + return pSpell->RecoveryTime ? pSpell->RecoveryTime : pSpell->CategoryRecoveryTime; + } + + return 5000; + } +}; + +CreatureAI* GetAI_npc_human_cleric(Creature* pCreature) +{ + return new npc_human_clericAI(pCreature); +} + +bool GossipHello_npc_human_cleric(Player* pPlayer, Creature* pCreature) +{ + if (pPlayer->HasAura(SPELL_RECENTLY_IN_GAME) || pCreature->HasAura(SPELL_CONTROL_PIECE)) + return true; + + if (ScriptedInstance* pInstance = (ScriptedInstance*)pCreature->GetInstanceData()) + { + if (pInstance->GetData(TYPE_CHESS) == IN_PROGRESS && pPlayer->GetTeam() == ALLIANCE) + pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_HUMAN_CLERIC, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); + } + + pPlayer->SEND_GOSSIP_MENU(GOSSIP_MENU_ID_CLERIC, pCreature->GetObjectGuid()); + return true; +} + +/*###### +## npc_orc_necrolyte +######*/ + +struct MANGOS_DLL_DECL npc_orc_necrolyteAI : public npc_chess_piece_genericAI +{ + npc_orc_necrolyteAI(Creature* pCreature) : npc_chess_piece_genericAI(pCreature) { Reset(); } + + void JustDied(Unit* pKiller) override + { + npc_chess_piece_genericAI::JustDied(pKiller); + + if (!m_pInstance) + return; + + Creature* pMedivh = m_pInstance->GetSingleCreatureFromStorage(NPC_ECHO_MEDIVH); + if (!pMedivh) + return; + + if (m_pInstance->GetPlayerTeam() == HORDE) + DoPlaySoundToSet(pMedivh, SOUND_ID_LOSE_BISHOP_PLAYER); + else + DoPlaySoundToSet(pMedivh, SOUND_ID_LOSE_BISHOP_MEDIVH); + + m_pInstance->DoMoveChessPieceToSides(SPELL_TRANSFORM_NECROLYTE, FACTION_ID_CHESS_HORDE); + } + + uint32 DoCastPrimarySpell() override + { + if (Unit* pTarget = GetTargetByType(TARGET_TYPE_FRIENDLY, 25.0f)) + { + DoCastSpellIfCan(pTarget, SPELL_SHADOW_MEND_ACTION); + + // reset timer based on spell values + const SpellEntry* pSpell = GetSpellStore()->LookupEntry(SPELL_SHADOW_MEND_ACTION); + return pSpell->RecoveryTime ? pSpell->RecoveryTime : pSpell->CategoryRecoveryTime; + } + + return 5000; + } + + uint32 DoCastSecondarySpell() override + { + if (Unit* pTarget = GetTargetByType(TARGET_TYPE_RANDOM, 18.0f, M_PI_F / 12)) + { + DoCastSpellIfCan(m_creature, SPELL_SHADOW_SPEAR); + + // reset timer based on spell values + const SpellEntry* pSpell = GetSpellStore()->LookupEntry(SPELL_SHADOW_SPEAR); + return pSpell->RecoveryTime ? pSpell->RecoveryTime : pSpell->CategoryRecoveryTime; + } + + return 5000; + } +}; + +CreatureAI* GetAI_npc_orc_necrolyte(Creature* pCreature) +{ + return new npc_orc_necrolyteAI(pCreature); +} + +bool GossipHello_npc_orc_necrolyte(Player* pPlayer, Creature* pCreature) +{ + if (pPlayer->HasAura(SPELL_RECENTLY_IN_GAME) || pCreature->HasAura(SPELL_CONTROL_PIECE)) + return true; + + if (ScriptedInstance* pInstance = (ScriptedInstance*)pCreature->GetInstanceData()) + { + if (pInstance->GetData(TYPE_CHESS) == IN_PROGRESS && pPlayer->GetTeam() == HORDE) + pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_ORC_NECROLYTE, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); + } + + pPlayer->SEND_GOSSIP_MENU(GOSSIP_MENU_ID_NECROLYTE, pCreature->GetObjectGuid()); + return true; +} void AddSC_chess_event() { + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "npc_echo_of_medivh"; + pNewScript->GetAI = GetAI_npc_echo_of_medivh; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_king_llane"; + pNewScript->GetAI = GetAI_npc_king_llane; + pNewScript->pGossipHello = GossipHello_npc_king_llane; + pNewScript->pGossipSelect = GossipSelect_npc_chess_generic; + pNewScript->pEffectDummyNPC = &EffectDummyCreature_npc_chess_generic; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_warchief_blackhand"; + pNewScript->GetAI = GetAI_npc_warchief_blackhand; + pNewScript->pGossipHello = GossipHello_npc_warchief_blackhand; + pNewScript->pGossipSelect = GossipSelect_npc_chess_generic; + pNewScript->pEffectDummyNPC = &EffectDummyCreature_npc_chess_generic; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_human_conjurer"; + pNewScript->GetAI = GetAI_npc_human_conjurer; + pNewScript->pGossipHello = GossipHello_npc_human_conjurer; + pNewScript->pGossipSelect = GossipSelect_npc_chess_generic; + pNewScript->pEffectDummyNPC = &EffectDummyCreature_npc_chess_generic; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_orc_warlock"; + pNewScript->GetAI = GetAI_npc_orc_warlock; + pNewScript->pGossipHello = GossipHello_npc_orc_warlock; + pNewScript->pGossipSelect = GossipSelect_npc_chess_generic; + pNewScript->pEffectDummyNPC = &EffectDummyCreature_npc_chess_generic; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_human_footman"; + pNewScript->GetAI = GetAI_npc_human_footman; + pNewScript->pGossipHello = GossipHello_npc_human_footman; + pNewScript->pGossipSelect = GossipSelect_npc_chess_generic; + pNewScript->pEffectDummyNPC = &EffectDummyCreature_npc_chess_generic; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_orc_grunt"; + pNewScript->GetAI = GetAI_npc_orc_grunt; + pNewScript->pGossipHello = GossipHello_npc_orc_grunt; + pNewScript->pGossipSelect = GossipSelect_npc_chess_generic; + pNewScript->pEffectDummyNPC = &EffectDummyCreature_npc_chess_generic; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_water_elemental"; + pNewScript->GetAI = GetAI_npc_water_elemental; + pNewScript->pGossipHello = GossipHello_npc_water_elemental; + pNewScript->pGossipSelect = GossipSelect_npc_chess_generic; + pNewScript->pEffectDummyNPC = &EffectDummyCreature_npc_chess_generic; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_summoned_daemon"; + pNewScript->GetAI = GetAI_npc_summoned_daemon; + pNewScript->pGossipHello = GossipHello_npc_summoned_daemon; + pNewScript->pGossipSelect = GossipSelect_npc_chess_generic; + pNewScript->pEffectDummyNPC = &EffectDummyCreature_npc_chess_generic; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_human_charger"; + pNewScript->GetAI = GetAI_npc_human_charger; + pNewScript->pGossipHello = GossipHello_npc_human_charger; + pNewScript->pGossipSelect = GossipSelect_npc_chess_generic; + pNewScript->pEffectDummyNPC = &EffectDummyCreature_npc_chess_generic; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_orc_wolf"; + pNewScript->GetAI = GetAI_npc_orc_wolf; + pNewScript->pGossipHello = GossipHello_npc_orc_wolf; + pNewScript->pGossipSelect = GossipSelect_npc_chess_generic; + pNewScript->pEffectDummyNPC = &EffectDummyCreature_npc_chess_generic; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_human_cleric"; + pNewScript->GetAI = GetAI_npc_human_cleric; + pNewScript->pGossipHello = GossipHello_npc_human_cleric; + pNewScript->pGossipSelect = GossipSelect_npc_chess_generic; + pNewScript->pEffectDummyNPC = &EffectDummyCreature_npc_chess_generic; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_orc_necrolyte"; + pNewScript->GetAI = GetAI_npc_orc_necrolyte; + pNewScript->pGossipHello = GossipHello_npc_orc_necrolyte; + pNewScript->pGossipSelect = GossipSelect_npc_chess_generic; + pNewScript->pEffectDummyNPC = &EffectDummyCreature_npc_chess_generic; + pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/karazhan/instance_karazhan.cpp b/scripts/eastern_kingdoms/karazhan/instance_karazhan.cpp index 4d7e5aadd..48c67fa7b 100644 --- a/scripts/eastern_kingdoms/karazhan/instance_karazhan.cpp +++ b/scripts/eastern_kingdoms/karazhan/instance_karazhan.cpp @@ -40,7 +40,11 @@ EndScriptData */ instance_karazhan::instance_karazhan(Map* pMap) : ScriptedInstance(pMap), m_uiOperaEvent(0), - m_uiOzDeathCount(0) + m_uiOzDeathCount(0), + m_uiTeam(0), + m_uiChessResetTimer(0), + m_uiAllianceStalkerCount(0), + m_uiHordeStalkerCount(0) { Initialize(); } @@ -61,8 +65,11 @@ bool instance_karazhan::IsEncounterInProgress() const return false; } -void instance_karazhan::OnPlayerEnter(Player* /*pPlayer*/) +void instance_karazhan::OnPlayerEnter(Player* pPlayer) { + if (!m_uiTeam) // very first player to enter + m_uiTeam = pPlayer->GetTeam(); + // If the opera event is already set, return if (GetData(TYPE_OPERA_PERFORMANCE) != 0) return; @@ -90,6 +97,8 @@ void instance_karazhan::OnCreatureCreate(Creature* pCreature) case NPC_LORD_ROBIN_DARIS: case NPC_IMAGE_OF_MEDIVH: case NPC_IMAGE_OF_ARCANAGOS: + case NPC_ECHO_MEDIVH: + case NPC_CHESS_VICTORY_CONTROLLER: m_mNpcEntryGuidStore[pCreature->GetEntry()] = pCreature->GetObjectGuid(); break; case NPC_NIGHTBANE_HELPER: @@ -98,6 +107,34 @@ void instance_karazhan::OnCreatureCreate(Creature* pCreature) else m_lNightbaneAirTriggers.push_back(pCreature->GetObjectGuid()); break; + case NPC_INVISIBLE_STALKER: + if (pCreature->GetPositionY() < -1870.0f) + m_lChessHordeStalkerList.push_back(pCreature->GetObjectGuid()); + else + m_lChessAllianceStalkerList.push_back(pCreature->GetObjectGuid()); + break; + case NPC_CHESS_STATUS_BAR: + if (pCreature->GetPositionY() < -1870.0f) + m_HordeStatusGuid = pCreature->GetObjectGuid(); + else + m_AllianceStatusGuid = pCreature->GetObjectGuid(); + break; + case NPC_HUMAN_CHARGER: + case NPC_HUMAN_CLERIC: + case NPC_HUMAN_CONJURER: + case NPC_HUMAN_FOOTMAN: + case NPC_CONJURED_WATER_ELEMENTAL: + case NPC_KING_LLANE: + m_lChessPiecesAlliance.push_back(pCreature->GetObjectGuid()); + break; + case NPC_ORC_GRUNT: + case NPC_ORC_NECROLYTE: + case NPC_ORC_WARLOCK: + case NPC_ORC_WOLF: + case NPC_SUMMONED_DAEMON: + case NPC_WARCHIEF_BLACKHAND: + m_lChessPiecesHorde.push_back(pCreature->GetObjectGuid()); + break; } } @@ -206,7 +243,48 @@ void instance_karazhan::SetData(uint32 uiType, uint32 uiData) { DoUseDoorOrButton(GO_GAMESMANS_HALL_EXIT_DOOR); DoRespawnGameObject(GO_DUST_COVERED_CHEST, DAY); + DoToggleGameObjectFlags(GO_DUST_COVERED_CHEST, GO_FLAG_NO_INTERACT, false); + + // cast game end spells + if (Creature* pMedivh = GetSingleCreatureFromStorage(NPC_ECHO_MEDIVH)) + { + pMedivh->CastSpell(pMedivh, SPELL_FORCE_KILL_BUNNY, true); + pMedivh->CastSpell(pMedivh, SPELL_GAME_OVER, true); + } + if (Creature* pController = GetSingleCreatureFromStorage(NPC_CHESS_VICTORY_CONTROLLER)) + pController->CastSpell(pController, SPELL_VICTORY_VISUAL, true); + + // remove silence debuff + Map::PlayerList const& players = instance->GetPlayers(); + for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr) + { + if (Player* pPlayer = itr->getSource()) + pPlayer->RemoveAurasDueToSpell(SPELL_GAME_IN_SESSION); + } + + // ToDo: reset board for friendly game! } + else if (uiData == NOT_STARTED) + { + // clean the board for reset + if (Creature* pMedivh = GetSingleCreatureFromStorage(NPC_ECHO_MEDIVH)) + { + pMedivh->CastSpell(pMedivh, SPELL_GAME_OVER, true); + pMedivh->CastSpell(pMedivh, SPELL_CLEAR_BOARD, true); + } + + // remove silence debuff + Map::PlayerList const& players = instance->GetPlayers(); + for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr) + { + if (Player* pPlayer = itr->getSource()) + pPlayer->RemoveAurasDueToSpell(SPELL_GAME_IN_SESSION); + } + + m_uiChessResetTimer = 5000; + } + else if (uiData == IN_PROGRESS) + DoPrepareChessEvent(); m_auiEncounter[uiType] = uiData; break; case TYPE_MALCHEZZAR: @@ -300,6 +378,141 @@ void instance_karazhan::OnCreatureDeath(Creature* pCreature) } } +void instance_karazhan::DoPrepareChessEvent() +{ + // Allow all the chess pieces to init start position + for (GuidList::const_iterator itr = m_lChessPiecesAlliance.begin(); itr != m_lChessPiecesAlliance.end(); ++itr) + { + if (Creature* pChessPiece = instance->GetCreature(*itr)) + { + Creature* pSquare = GetClosestCreatureWithEntry(pChessPiece, NPC_SQUARE_BLACK, 2.0f); + if (!pSquare) + pSquare = GetClosestCreatureWithEntry(pChessPiece, NPC_SQUARE_WHITE, 2.0f); + if (!pSquare) + { + script_error_log("Instance Karazhan: ERROR Failed to properly load the Chess square for %s.", pChessPiece->GetGuidStr()); + return; + } + + // send event which will prepare the current square + pChessPiece->AI()->SendAIEvent(AI_EVENT_CUSTOM_B, pSquare, pChessPiece); + } + } + + for (GuidList::const_iterator itr = m_lChessPiecesHorde.begin(); itr != m_lChessPiecesHorde.end(); ++itr) + { + if (Creature* pChessPiece = instance->GetCreature(*itr)) + { + Creature* pSquare = GetClosestCreatureWithEntry(pChessPiece, NPC_SQUARE_BLACK, 2.0f); + if (!pSquare) + pSquare = GetClosestCreatureWithEntry(pChessPiece, NPC_SQUARE_WHITE, 2.0f); + if (!pSquare) + { + script_error_log("Instance Karazhan: ERROR Failed to properly load the Chess square for %s.", pChessPiece->GetGuidStr()); + return; + } + + // send event which will prepare the current square + pChessPiece->AI()->SendAIEvent(AI_EVENT_CUSTOM_B, pSquare, pChessPiece); + } + } + + // add silence debuff + Map::PlayerList const& players = instance->GetPlayers(); + for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr) + { + if (Player* pPlayer = itr->getSource()) + pPlayer->CastSpell(pPlayer, SPELL_GAME_IN_SESSION, true); + } + + m_uiAllianceStalkerCount = 0; + m_uiHordeStalkerCount = 0; + m_vHordeStalkers.clear(); + m_vAllianceStalkers.clear(); + + // sort stalkers depending on side + std::list lStalkers; + for (GuidList::const_iterator itr = m_lChessHordeStalkerList.begin(); itr != m_lChessHordeStalkerList.end(); ++itr) + { + if (Creature* pTemp = instance->GetCreature(*itr)) + lStalkers.push_back(pTemp); + } + + if (lStalkers.empty()) + { + script_error_log("Instance Karazhan: ERROR Failed to properly load the horde side stalkers for the Chess Event."); + return; + } + + // get the proper statusBar npc + Creature* pStatusBar = instance->GetCreature(m_HordeStatusGuid); + if (!pStatusBar) + return; + + lStalkers.sort(ObjectDistanceOrder(pStatusBar)); + for (std::list::const_iterator itr = lStalkers.begin(); itr != lStalkers.end(); ++itr) + m_vHordeStalkers.push_back((*itr)->GetObjectGuid()); + + lStalkers.clear(); + for (GuidList::const_iterator itr = m_lChessAllianceStalkerList.begin(); itr != m_lChessAllianceStalkerList.end(); ++itr) + { + if (Creature* pTemp = instance->GetCreature(*itr)) + lStalkers.push_back(pTemp); + } + + if (lStalkers.empty()) + { + script_error_log("Instance Karazhan: ERROR Failed to properly load the alliance side stalkers for the Chess Event."); + return; + } + + // get the proper statusBar npc + pStatusBar = instance->GetCreature(m_AllianceStatusGuid); + if (!pStatusBar) + return; + + lStalkers.sort(ObjectDistanceOrder(pStatusBar)); + for (std::list::const_iterator itr = lStalkers.begin(); itr != lStalkers.end(); ++itr) + m_vAllianceStalkers.push_back((*itr)->GetObjectGuid()); +} + +void instance_karazhan::DoMoveChessPieceToSides(uint32 uiSpellId, uint32 uiFaction, bool bGameEnd /*= false*/) +{ + // assign proper faction variables + GuidVector& vStalkers = uiFaction == FACTION_ID_CHESS_ALLIANCE ? m_vAllianceStalkers : m_vHordeStalkers; + uint32 uiCount = uiFaction == FACTION_ID_CHESS_ALLIANCE ? m_uiAllianceStalkerCount : m_uiHordeStalkerCount; + + // get the proper statusBar npc + Creature* pStatusBar = instance->GetCreature(uiFaction == FACTION_ID_CHESS_ALLIANCE ? m_AllianceStatusGuid : m_HordeStatusGuid); + if (!pStatusBar) + return; + + if (vStalkers.size() < uiCount + 1) + return; + + // handle stalker transformation + if (Creature* pStalker = instance->GetCreature(vStalkers[uiCount])) + { + // need to provide specific target, in order to ensure the logic of the event + pStatusBar->CastSpell(pStalker, uiSpellId, true); + uiFaction == FACTION_ID_CHESS_ALLIANCE ? ++m_uiAllianceStalkerCount : ++m_uiHordeStalkerCount; + } + + // handle emote on end game + if (bGameEnd) + { + // inverse factions + vStalkers.clear(); + vStalkers = uiFaction == FACTION_ID_CHESS_ALLIANCE ? m_vHordeStalkers : m_vAllianceStalkers; + + for (GuidVector::const_iterator itr = vStalkers.begin(); itr != vStalkers.end(); ++itr) + { + if (Creature* pStalker = instance->GetCreature(*itr)) + pStalker->HandleEmote(EMOTE_STATE_APPLAUD); + } + } +} + void instance_karazhan::DoPrepareOperaStage(Creature* pOrganizer) { if (!pOrganizer) @@ -335,6 +548,48 @@ void instance_karazhan::DoPrepareOperaStage(Creature* pOrganizer) SetData(TYPE_OPERA, IN_PROGRESS); } +void instance_karazhan::Update(uint32 uiDiff) +{ + if (m_uiChessResetTimer) + { + // respawn all chess pieces and side stalkers on the original position + if (m_uiChessResetTimer <= uiDiff) + { + for (GuidList::const_iterator itr = m_lChessPiecesAlliance.begin(); itr != m_lChessPiecesAlliance.end(); ++itr) + { + if (Creature* pTemp = instance->GetCreature(*itr)) + pTemp->Respawn(); + } + for (GuidList::const_iterator itr = m_lChessPiecesHorde.begin(); itr != m_lChessPiecesHorde.end(); ++itr) + { + if (Creature* pTemp = instance->GetCreature(*itr)) + pTemp->Respawn(); + } + + for (GuidList::const_iterator itr = m_lChessAllianceStalkerList.begin(); itr != m_lChessAllianceStalkerList.end(); ++itr) + { + if (Creature* pTemp = instance->GetCreature(*itr)) + { + pTemp->Respawn(); + pTemp->HandleEmote(EMOTE_STATE_NONE); + } + } + for (GuidList::const_iterator itr = m_lChessHordeStalkerList.begin(); itr != m_lChessHordeStalkerList.end(); ++itr) + { + if (Creature* pTemp = instance->GetCreature(*itr)) + { + pTemp->Respawn(); + pTemp->HandleEmote(EMOTE_STATE_NONE); + } + } + + m_uiChessResetTimer = 0; + } + else + m_uiChessResetTimer -= uiDiff; + } +} + InstanceData* GetInstanceData_instance_karazhan(Map* pMap) { return new instance_karazhan(pMap); diff --git a/scripts/eastern_kingdoms/karazhan/karazhan.h b/scripts/eastern_kingdoms/karazhan/karazhan.h index 1ecb70b30..249a531c6 100644 --- a/scripts/eastern_kingdoms/karazhan/karazhan.h +++ b/scripts/eastern_kingdoms/karazhan/karazhan.h @@ -30,6 +30,16 @@ enum // NPC_TERESTIAN = 15688, NPC_NIGHTBANE = 17225, NPC_NIGHTBANE_HELPER = 17260, + NPC_ECHO_MEDIVH = 16816, + NPC_INVISIBLE_STALKER = 22519, // placeholder for dead chess npcs + NPC_CHESS_STATUS_BAR = 22520, // npc that controlls the transformation of dead pieces + NPC_CHESS_VICTORY_CONTROLLER = 22524, + // NPC_CHESS_SOUND_BUNNY = 21921, // npc that handles the encounter sounds + // NPC_WAITING_ROOM_STALKER = 17459, // trigger which marks the teleport location of the players; also used to cast some control spells during the game + NPC_SQUARE_WHITE = 17208, // chess white square + NPC_SQUARE_BLACK = 17305, // chess black square + // NPC_SQUARE_OUTSIDE_BLACK = 17316, // outside chess black square + // NPC_SQUARE_OUTSIDE_WHITE = 17317, // outside chess white square // Moroes event related NPC_LADY_KEIRA_BERRYBUCK = 17007, @@ -53,6 +63,20 @@ enum NPC_IMAGE_OF_MEDIVH = 17651, NPC_IMAGE_OF_ARCANAGOS = 17652, + // Chess event + NPC_ORC_GRUNT = 17469, // pawn + NPC_ORC_WOLF = 21748, // knight + NPC_ORC_WARLOCK = 21750, // queen + NPC_ORC_NECROLYTE = 21747, // bishop + NPC_SUMMONED_DAEMON = 21726, // rook + NPC_WARCHIEF_BLACKHAND = 21752, // king + NPC_HUMAN_FOOTMAN = 17211, // pawn + NPC_HUMAN_CHARGER = 21664, // knight + NPC_HUMAN_CONJURER = 21683, // queen + NPC_HUMAN_CLERIC = 21682, // bishop + NPC_CONJURED_WATER_ELEMENTAL = 21160, // rook + NPC_KING_LLANE = 21684, // king + GO_STAGE_CURTAIN = 183932, GO_STAGE_DOOR_LEFT = 184278, GO_STAGE_DOOR_RIGHT = 184279, @@ -75,6 +99,16 @@ enum GO_RAJ_BACKDROP = 183443, GO_RAJ_MOON = 183494, GO_RAJ_BALCONY = 183495, + + // Chess event spells + SPELL_CLEAR_BOARD = 37366, // spell cast to clear the board at the end of the event + SPELL_GAME_IN_SESSION = 39331, // debuff on players received while the game is in session + SPELL_FORCE_KILL_BUNNY = 45260, // triggers 45259 + SPELL_GAME_OVER = 39401, // cast by Medivh on game end + SPELL_VICTORY_VISUAL = 39395, // cast by the Victory controller on game end + + FACTION_ID_CHESS_HORDE = 1689, + FACTION_ID_CHESS_ALLIANCE = 1690, }; enum OperaEvents @@ -123,22 +157,45 @@ class MANGOS_DLL_DECL instance_karazhan : public ScriptedInstance void DoPrepareOperaStage(Creature* pOrganizer); + uint32 GetPlayerTeam() { return m_uiTeam; } + void DoMoveChessPieceToSides(uint32 uiSpellId, uint32 uiFaction, bool bGameEnd = false); + void GetChessPiecesByFaction(GuidList& lList, uint32 uiFaction) { lList = uiFaction == FACTION_ID_CHESS_ALLIANCE ? m_lChessPiecesAlliance : m_lChessPiecesHorde; } + void GetNightbaneTriggers(GuidList& lList, bool bGround) { lList = bGround ? m_lNightbaneGroundTriggers : m_lNightbaneAirTriggers; } void Load(const char* chrIn) override; const char* Save() const override { return m_strInstData.c_str(); } + void Update(uint32 uiDiff) override; + private: + void DoPrepareChessEvent(); + uint32 m_auiEncounter[MAX_ENCOUNTER]; std::string m_strInstData; uint32 m_uiOperaEvent; uint32 m_uiOzDeathCount; + uint32 m_uiTeam; // Team of first entered player, used for the Chess event + uint32 m_uiChessResetTimer; + + uint8 m_uiAllianceStalkerCount; + uint8 m_uiHordeStalkerCount; + + ObjectGuid m_HordeStatusGuid; + ObjectGuid m_AllianceStatusGuid; GuidList m_lOperaTreeGuidList; GuidList m_lOperaHayGuidList; GuidList m_lNightbaneGroundTriggers; GuidList m_lNightbaneAirTriggers; + + GuidList m_lChessHordeStalkerList; + GuidList m_lChessAllianceStalkerList; + GuidList m_lChessPiecesAlliance; + GuidList m_lChessPiecesHorde; + GuidVector m_vHordeStalkers; + GuidVector m_vAllianceStalkers; }; #endif diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 8dbacc2d5..693ea8bfd 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2907" + #define SD2_REVISION_NR "2908" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 7ac0f566b..c48b4b172 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -761,6 +761,19 @@ UPDATE creature_template SET ScriptName='npc_barnes' WHERE entry=16812; UPDATE creature_template SET ScriptName='npc_grandmother' WHERE entry=17603; UPDATE creature_template SET ScriptName='npc_image_of_medivh' WHERE entry=17651; UPDATE creature_template SET ScriptName='npc_image_arcanagos' WHERE entry=17652; +UPDATE creature_template SET ScriptName='npc_echo_of_medivh' WHERE entry=16816; +UPDATE creature_template SET ScriptName='npc_king_llane' WHERE entry=21684; +UPDATE creature_template SET ScriptName='npc_warchief_blackhand' WHERE entry=21752; +UPDATE creature_template SET ScriptName='npc_human_conjurer' WHERE entry=21683; +UPDATE creature_template SET ScriptName='npc_orc_warlock' WHERE entry=21750; +UPDATE creature_template SET ScriptName='npc_human_footman' WHERE entry=17211; +UPDATE creature_template SET ScriptName='npc_orc_grunt' WHERE entry=17469; +UPDATE creature_template SET ScriptName='npc_water_elemental' WHERE entry=21160; +UPDATE creature_template SET ScriptName='npc_summoned_daemon' WHERE entry=21726; +UPDATE creature_template SET ScriptName='npc_human_charger' WHERE entry=21664; +UPDATE creature_template SET ScriptName='npc_orc_wolf' WHERE entry=21748; +UPDATE creature_template SET ScriptName='npc_human_cleric' WHERE entry=21682; +UPDATE creature_template SET ScriptName='npc_orc_necrolyte' WHERE entry=21747; DELETE FROM scripted_event_id WHERE id IN (10591,10951); INSERT INTO scripted_event_id VALUES (10591,'event_spell_summon_nightbane'), diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 9b969b2dc..412e9e8bb 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -1752,7 +1752,10 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1532127,'Miserable vermin. I shall exterminate you from the air!',0,1,0,0,'nightbane SAY_AIR_PHASE'), (-1532128,'Enough! I shall land and crush you myself!',0,1,0,0,'nightbane SAY_LAND_PHASE_1'), (-1532129,'Insects! Let me show you my strength up close!',0,1,0,0,'nightbane SAY_LAND_PHASE_2'), -(-1532130,'%s takes a deep breath.',0,3,0,0,'nightbane EMOTE_DEEP_BREATH'); +(-1532130,'%s takes a deep breath.',0,3,0,0,'nightbane EMOTE_DEEP_BREATH'), + +(-1532131,'The halls of Karazhan shake, as the curse binding the doors of the Gamemaster\'s Hall is lifted.',0,2,0,0,'echo_of_medivh EMOTE_LIFT_CURSE'), +(-1532132,'%s cheats!',0,3,0,0,'echo_of_medivh EMOTE_CHEAT'); -- -1 533 000 NAXXRAMAS INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES @@ -4596,7 +4599,20 @@ INSERT INTO gossip_texts (entry,content_default,comment) VALUES (-3532002,'Ok, I\'ll give it a try, then.','barnes GOSSIP_ITEM_OPERA_2'), (-3532003,'I\'ve never been more ready.','barnes GOSSIP_ITEM_OPERA_JULIANNE_WIPE'), (-3532004,'The wolf\'s going down.','barnes GOSSIP_ITEM_OPERA_WOLF_WIPE'), -(-3532005,'What phat lewtz you have grandmother?','grandma GOSSIP_ITEM_GRANDMA'); +(-3532005,'What phat lewtz you have grandmother?','grandma GOSSIP_ITEM_GRANDMA'), + +(-3532006,'Control Orc Grunt','orc grunt GOSSIP_ITEM_ORC_GRUNT'), +(-3532007,'Control Orc Wolf','orc wolf GOSSIP_ITEM_ORC_WOLF'), +(-3532008,'Control Summoned Daemon','summoned deamon GOSSIP_ITEM_SUMMONED_DEAMON'), +(-3532009,'Control Orc Warlock','orc warlock GOSSIP_ITEM_ORC_WARLOCK'), +(-3532010,'Control Orc Necrolyte','orc necrolyte GOSSIP_ITEM_ORC_NECROLYTE'), +(-3532011,'Control Warchief Blackhand','warchief blackhand GOSSIP_ITEM_WARCHIEF_BLACKHAND'), +(-3532012,'Control Human Footman','human footman GOSSIP_ITEM_HUMAN_FOOTMAN'), +(-3532013,'Control Human Charger','human charger GOSSIP_ITEM_HUMAN_CHARGER'), +(-3532014,'Control Conjured Water Elemental','conjured water elemental GOSSIP_ITEM_WATER_ELEMENTAL'), +(-3532015,'Control Human Conjurer','human conjurer GOSSIP_ITEM_HUMAN_CONJURER'), +(-3532016,'Control Human Cleric','human cleric GOSSIP_ITEM_HUMAN_CLERIC'), +(-3532017,'Control King Llane','king llane GOSSIP_ITEM_KING_LLANE'); -- -3 534 000 THE BATTLE OF MT. HYJAL INSERT INTO gossip_texts (entry,content_default,comment) VALUES diff --git a/sql/updates/r2908_mangos.sql b/sql/updates/r2908_mangos.sql new file mode 100644 index 000000000..c6a3885b5 --- /dev/null +++ b/sql/updates/r2908_mangos.sql @@ -0,0 +1,13 @@ +UPDATE creature_template SET ScriptName='npc_echo_of_medivh' WHERE entry=16816; +UPDATE creature_template SET ScriptName='npc_king_llane' WHERE entry=21684; +UPDATE creature_template SET ScriptName='npc_warchief_blackhand' WHERE entry=21752; +UPDATE creature_template SET ScriptName='npc_human_conjurer' WHERE entry=21683; +UPDATE creature_template SET ScriptName='npc_orc_warlock' WHERE entry=21750; +UPDATE creature_template SET ScriptName='npc_human_footman' WHERE entry=17211; +UPDATE creature_template SET ScriptName='npc_orc_grunt' WHERE entry=17469; +UPDATE creature_template SET ScriptName='npc_water_elemental' WHERE entry=21160; +UPDATE creature_template SET ScriptName='npc_summoned_daemon' WHERE entry=21726; +UPDATE creature_template SET ScriptName='npc_human_charger' WHERE entry=21664; +UPDATE creature_template SET ScriptName='npc_orc_wolf' WHERE entry=21748; +UPDATE creature_template SET ScriptName='npc_human_cleric' WHERE entry=21682; +UPDATE creature_template SET ScriptName='npc_orc_necrolyte' WHERE entry=21747; diff --git a/sql/updates/r2908_scriptdev2.sql b/sql/updates/r2908_scriptdev2.sql new file mode 100644 index 000000000..604f95da1 --- /dev/null +++ b/sql/updates/r2908_scriptdev2.sql @@ -0,0 +1,19 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1532132 AND -1532131; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1532131,'The halls of Karazhan shake, as the curse binding the doors of the Gamemaster\'s Hall is lifted.',0,2,0,0,'echo_of_medivh EMOTE_LIFT_CURSE'), +(-1532132,'%s cheats!',0,3,0,0,'echo_of_medivh EMOTE_CHEAT'); + +DELETE FROM gossip_texts WHERE entry BETWEEN -3532017 AND -3532006; +INSERT INTO gossip_texts (entry,content_default,comment) VALUES +(-3532006,'Control Orc Grunt','orc grunt GOSSIP_ITEM_ORC_GRUNT'), +(-3532007,'Control Orc Wolf','orc wolf GOSSIP_ITEM_ORC_WOLF'), +(-3532008,'Control Summoned Daemon','summoned deamon GOSSIP_ITEM_SUMMONED_DEAMON'), +(-3532009,'Control Orc Warlock','orc warlock GOSSIP_ITEM_ORC_WARLOCK'), +(-3532010,'Control Orc Necrolyte','orc necrolyte GOSSIP_ITEM_ORC_NECROLYTE'), +(-3532011,'Control Warchief Blackhand','warchief blackhand GOSSIP_ITEM_WARCHIEF_BLACKHAND'), +(-3532012,'Control Human Footman','human footman GOSSIP_ITEM_HUMAN_FOOTMAN'), +(-3532013,'Control Human Charger','human charger GOSSIP_ITEM_HUMAN_CHARGER'), +(-3532014,'Control Conjured Water Elemental','conjured water elemental GOSSIP_ITEM_WATER_ELEMENTAL'), +(-3532015,'Control Human Conjurer','human conjurer GOSSIP_ITEM_HUMAN_CONJURER'), +(-3532016,'Control Human Cleric','human cleric GOSSIP_ITEM_HUMAN_CLERIC'), +(-3532017,'Control King Llane','king llane GOSSIP_ITEM_KING_LLANE'); From fe5f506cfc1dbfbf1c07bc2c190bc2a67543eaa3 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Mon, 5 Aug 2013 00:40:16 +0300 Subject: [PATCH 0917/1172] [2909] Update Ambassador Hellmaw banish behavior Thanks AlexHjelm for pointing the issue Please make sure you update to the latest ACID version --- .../boss_ambassador_hellmaw.cpp | 33 ++++--- .../instance_shadow_labyrinth.cpp | 87 +++++++++---------- .../shadow_labyrinth/shadow_labyrinth.h | 18 ++-- sd2_revision_nr.h | 2 +- 4 files changed, 78 insertions(+), 62 deletions(-) diff --git a/scripts/outland/auchindoun/shadow_labyrinth/boss_ambassador_hellmaw.cpp b/scripts/outland/auchindoun/shadow_labyrinth/boss_ambassador_hellmaw.cpp index 57d73292d..50e4a8ce9 100644 --- a/scripts/outland/auchindoun/shadow_labyrinth/boss_ambassador_hellmaw.cpp +++ b/scripts/outland/auchindoun/shadow_labyrinth/boss_ambassador_hellmaw.cpp @@ -43,22 +43,15 @@ struct MANGOS_DLL_DECL boss_ambassador_hellmawAI : public ScriptedAI { boss_ambassador_hellmawAI(Creature* pCreature) : ScriptedAI(pCreature) { - m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_pInstance = (instance_shadow_labyrinth*)pCreature->GetInstanceData(); m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); Reset(); - - if (m_pInstance && m_creature->isAlive()) - { - if (m_pInstance->GetData(TYPE_OVERSEER) != DONE) - DoCastSpellIfCan(m_creature, SPELL_BANISH, CAST_TRIGGERED); - else - m_creature->GetMotionMaster()->MoveWaypoint(); - } } - ScriptedInstance* m_pInstance; + instance_shadow_labyrinth* m_pInstance; bool m_bIsRegularMode; + uint32 m_uiBanishTimer; uint32 m_uiCorrosiveAcidTimer; uint32 m_uiFearTimer; uint32 m_uiEnrageTimer; @@ -66,6 +59,7 @@ struct MANGOS_DLL_DECL boss_ambassador_hellmawAI : public ScriptedAI void Reset() override { + m_uiBanishTimer = 2000; m_uiCorrosiveAcidTimer = urand(20000, 23000); m_uiFearTimer = urand(20000, 26000); m_uiEnrageTimer = 3 * MINUTE * IN_MILLISECONDS; @@ -106,6 +100,25 @@ struct MANGOS_DLL_DECL boss_ambassador_hellmawAI : public ScriptedAI void UpdateAI(const uint32 uiDiff) override { + if (m_uiBanishTimer) + { + if (m_uiBanishTimer <= uiDiff) + { + if (!m_pInstance) + return; + + // Check for banish + if (m_pInstance->IsHellmawUnbanished()) + { + m_creature->RemoveAurasDueToSpell(SPELL_BANISH); + m_creature->GetMotionMaster()->MoveWaypoint(); + m_uiBanishTimer = 0; + } + } + else + m_uiBanishTimer -= uiDiff; + } + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/outland/auchindoun/shadow_labyrinth/instance_shadow_labyrinth.cpp b/scripts/outland/auchindoun/shadow_labyrinth/instance_shadow_labyrinth.cpp index 1f7f77070..f7bf5bbbf 100644 --- a/scripts/outland/auchindoun/shadow_labyrinth/instance_shadow_labyrinth.cpp +++ b/scripts/outland/auchindoun/shadow_labyrinth/instance_shadow_labyrinth.cpp @@ -31,8 +31,7 @@ EndScriptData */ 4 - Murmur event */ -instance_shadow_labyrinth::instance_shadow_labyrinth(Map* pMap) : ScriptedInstance(pMap), - m_uiFelOverseerCount(0) +instance_shadow_labyrinth::instance_shadow_labyrinth(Map* pMap) : ScriptedInstance(pMap) { Initialize(); } @@ -70,10 +69,6 @@ void instance_shadow_labyrinth::OnCreatureCreate(Creature* pCreature) case NPC_HELLMAW: m_mNpcEntryGuidStore[pCreature->GetEntry()] = pCreature->GetObjectGuid(); break; - case NPC_FEL_OVERSEER: - ++m_uiFelOverseerCount; // TODO should actually only count alive ones - debug_log("SD2: Shadow Labyrinth: counting %u Fel Overseers.", m_uiFelOverseerCount); - break; } } @@ -85,54 +80,20 @@ void instance_shadow_labyrinth::SetData(uint32 uiType, uint32 uiData) m_auiEncounter[0] = uiData; break; - case TYPE_OVERSEER: - if (uiData != DONE) - { - script_error_log("Shadow Labyrinth: TYPE_OVERSEER did not expect other data than DONE"); - return; - } - if (m_uiFelOverseerCount) - { - --m_uiFelOverseerCount; - - if (m_uiFelOverseerCount) - { - debug_log("SD2: Shadow Labyrinth: %u Fel Overseers left to kill.", m_uiFelOverseerCount); - - // Skip save call - return; - } - else - { - if (Creature* pHellmaw = GetSingleCreatureFromStorage(NPC_HELLMAW)) - { - // yell intro and remove banish aura - DoScriptText(SAY_HELLMAW_INTRO, pHellmaw); - pHellmaw->GetMotionMaster()->MoveWaypoint(); - if (pHellmaw->HasAura(SPELL_BANISH)) - pHellmaw->RemoveAurasDueToSpell(SPELL_BANISH); - } - - m_auiEncounter[1] = DONE; - debug_log("SD2: Shadow Labyrinth: TYPE_OVERSEER == DONE"); - } - } - break; - case TYPE_INCITER: if (uiData == DONE) DoUseDoorOrButton(GO_REFECTORY_DOOR); - m_auiEncounter[2] = uiData; + m_auiEncounter[1] = uiData; break; case TYPE_VORPIL: if (uiData == DONE) DoUseDoorOrButton(GO_SCREAMING_HALL_DOOR); - m_auiEncounter[3] = uiData; + m_auiEncounter[2] = uiData; break; case TYPE_MURMUR: - m_auiEncounter[4] = uiData; + m_auiEncounter[3] = uiData; break; } @@ -142,7 +103,7 @@ void instance_shadow_labyrinth::SetData(uint32 uiType, uint32 uiData) std::ostringstream saveStream; saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " - << m_auiEncounter[2] << " " << m_auiEncounter[3] << " " << m_auiEncounter[4]; + << m_auiEncounter[2] << " " << m_auiEncounter[3]; m_strInstData = saveStream.str(); @@ -156,13 +117,47 @@ uint32 instance_shadow_labyrinth::GetData(uint32 uiType) const switch (uiType) { case TYPE_HELLMAW: return m_auiEncounter[0]; - case TYPE_OVERSEER: return m_auiEncounter[1]; + case TYPE_INCITER: return m_auiEncounter[1]; + case TYPE_VORPIL: return m_auiEncounter[2]; + case TYPE_MURMUR: return m_auiEncounter[3]; default: return 0; } } +void instance_shadow_labyrinth::SetData64(uint32 uiData, uint64 uiGuid) +{ + // If Hellmaw already completed, just ignore + if (GetData(TYPE_HELLMAW) == DONE) + return; + + // Note: this is handled in Acid. The purpose is check which Cabal Ritualists is alive, in case of server reset + // The function is triggered by eventAI on generic timer + if (uiData == DATA_CABAL_RITUALIST) + m_sRitualistsAliveGUIDSet.insert(ObjectGuid(uiGuid)); +} + +void instance_shadow_labyrinth::OnCreatureDeath(Creature* pCreature) +{ + // unbanish Hellmaw when all Cabal Ritualists are dead + if (pCreature->GetEntry() == NPC_CABAL_RITUALIST) + { + m_sRitualistsAliveGUIDSet.erase(pCreature->GetObjectGuid()); + + if (m_sRitualistsAliveGUIDSet.empty()) + { + if (Creature* pHellmaw = GetSingleCreatureFromStorage(NPC_HELLMAW)) + { + // yell intro and remove banish aura + DoScriptText(SAY_HELLMAW_INTRO, pHellmaw); + pHellmaw->GetMotionMaster()->MoveWaypoint(); + pHellmaw->RemoveAurasDueToSpell(SPELL_BANISH); + } + } + } +} + void instance_shadow_labyrinth::Load(const char* chrIn) { if (!chrIn) @@ -174,7 +169,7 @@ void instance_shadow_labyrinth::Load(const char* chrIn) OUT_LOAD_INST_DATA(chrIn); std::istringstream loadStream(chrIn); - loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3] >> m_auiEncounter[4]; + loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3]; for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) { diff --git a/scripts/outland/auchindoun/shadow_labyrinth/shadow_labyrinth.h b/scripts/outland/auchindoun/shadow_labyrinth/shadow_labyrinth.h index 728003640..2331cc9fb 100644 --- a/scripts/outland/auchindoun/shadow_labyrinth/shadow_labyrinth.h +++ b/scripts/outland/auchindoun/shadow_labyrinth/shadow_labyrinth.h @@ -7,24 +7,26 @@ enum { - MAX_ENCOUNTER = 5, + MAX_ENCOUNTER = 4, TYPE_HELLMAW = 1, - TYPE_OVERSEER = 2, + // TYPE_OVERSEER = 2, // obsolete id used by acid TYPE_INCITER = 3, TYPE_VORPIL = 4, TYPE_MURMUR = 5, + DATA_CABAL_RITUALIST = 1, // DO NOT CHANGE! Used by Acid. - used to check the Cabal Ritualists alive + NPC_HELLMAW = 18731, NPC_VORPIL = 18732, - NPC_FEL_OVERSEER = 18796, + NPC_CABAL_RITUALIST = 18794, GO_REFECTORY_DOOR = 183296, // door opened when blackheart the inciter dies GO_SCREAMING_HALL_DOOR = 183295, // door opened when grandmaster vorpil dies SAY_HELLMAW_INTRO = -1555000, - SPELL_BANISH = 30231, + SPELL_BANISH = 30231, // spell is handled in creature_template_addon; }; class MANGOS_DLL_DECL instance_shadow_labyrinth : public ScriptedInstance @@ -37,17 +39,23 @@ class MANGOS_DLL_DECL instance_shadow_labyrinth : public ScriptedInstance void OnObjectCreate(GameObject* pGo) override; void OnCreatureCreate(Creature* pCreature) override; + void OnCreatureDeath(Creature* pCreature) override; + void SetData(uint32 uiType, uint32 uiData) override; uint32 GetData(uint32 uiType) const override; + void SetData64(uint32 uiType, uint64 uiGuid) override; + const char* Save() const override { return m_strInstData.c_str(); } void Load(const char* chrIn) override; + bool IsHellmawUnbanished() { return m_sRitualistsAliveGUIDSet.empty(); } + private: uint32 m_auiEncounter[MAX_ENCOUNTER]; std::string m_strInstData; - uint32 m_uiFelOverseerCount; + GuidSet m_sRitualistsAliveGUIDSet; }; #endif diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 693ea8bfd..4acc5c43a 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2908" + #define SD2_REVISION_NR "2909" #endif // __SD2_REVISION_NR_H__ From 4d7a413df84ab4ace1088c25a261c9af26ce4ae2 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Mon, 5 Aug 2013 19:12:06 +0300 Subject: [PATCH 0918/1172] [2910] Fix typo and build for [2908] Thanks Froid and LilleCarl for pointing the issue --- scripts/eastern_kingdoms/karazhan/instance_karazhan.cpp | 6 +++--- sd2_revision_nr.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/eastern_kingdoms/karazhan/instance_karazhan.cpp b/scripts/eastern_kingdoms/karazhan/instance_karazhan.cpp index 48c67fa7b..c312fbae3 100644 --- a/scripts/eastern_kingdoms/karazhan/instance_karazhan.cpp +++ b/scripts/eastern_kingdoms/karazhan/instance_karazhan.cpp @@ -281,7 +281,7 @@ void instance_karazhan::SetData(uint32 uiType, uint32 uiData) pPlayer->RemoveAurasDueToSpell(SPELL_GAME_IN_SESSION); } - m_uiChessResetTimer = 5000; + m_uiChessResetTimer = 35000; } else if (uiData == IN_PROGRESS) DoPrepareChessEvent(); @@ -390,7 +390,7 @@ void instance_karazhan::DoPrepareChessEvent() pSquare = GetClosestCreatureWithEntry(pChessPiece, NPC_SQUARE_WHITE, 2.0f); if (!pSquare) { - script_error_log("Instance Karazhan: ERROR Failed to properly load the Chess square for %s.", pChessPiece->GetGuidStr()); + script_error_log("Instance Karazhan: ERROR Failed to properly load the Chess square for %s.", pChessPiece->GetGuidStr().c_str()); return; } @@ -408,7 +408,7 @@ void instance_karazhan::DoPrepareChessEvent() pSquare = GetClosestCreatureWithEntry(pChessPiece, NPC_SQUARE_WHITE, 2.0f); if (!pSquare) { - script_error_log("Instance Karazhan: ERROR Failed to properly load the Chess square for %s.", pChessPiece->GetGuidStr()); + script_error_log("Instance Karazhan: ERROR Failed to properly load the Chess square for %s.", pChessPiece->GetGuidStr().c_str()); return; } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 4acc5c43a..84568f855 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2909" + #define SD2_REVISION_NR "2910" #endif // __SD2_REVISION_NR_H__ From 68abdd3c9c4f3daf7b4353737caed11c262b5e63 Mon Sep 17 00:00:00 2001 From: X-Savior Date: Mon, 19 Aug 2013 21:37:56 +0300 Subject: [PATCH 0919/1172] [2911] Update some timers for Arcatraz intro event Signed-off-by: Xfurry --- scripts/outland/tempest_keep/arcatraz/instance_arcatraz.cpp | 2 +- sd2_revision_nr.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/outland/tempest_keep/arcatraz/instance_arcatraz.cpp b/scripts/outland/tempest_keep/arcatraz/instance_arcatraz.cpp index ca1aa9a81..e42a2cb73 100644 --- a/scripts/outland/tempest_keep/arcatraz/instance_arcatraz.cpp +++ b/scripts/outland/tempest_keep/arcatraz/instance_arcatraz.cpp @@ -453,7 +453,7 @@ void instance_arcatraz::Update(uint32 uiDiff) pTemp->SetWalk(false); pTemp->GetMotionMaster()->MovePoint(0, aEntranceMoveLoc[0], aEntranceMoveLoc[1], aEntranceMoveLoc[2]); } - m_uiEntranceEventTimer = urand(0, 10) ? urand(1000, 2000) : urand(5000, 7000); + m_uiEntranceEventTimer = urand(0, 10) ? urand(2000, 3500) : urand(5000, 7000); } else m_uiEntranceEventTimer -= uiDiff; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 84568f855..a51eaf71b 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2910" + #define SD2_REVISION_NR "2911" #endif // __SD2_REVISION_NR_H__ From 03332166aadb4bd6be1c96b9ded1a413f3c56647 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Wed, 21 Aug 2013 10:15:01 +0300 Subject: [PATCH 0920/1172] [2912] Fix quest 11865 after the recent core changes --- scripts/northrend/borean_tundra.cpp | 124 ++++++++++++++-------------- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 - sql/updates/r2912_mangos.sql | 1 + 4 files changed, 62 insertions(+), 66 deletions(-) create mode 100644 sql/updates/r2912_mangos.sql diff --git a/scripts/northrend/borean_tundra.cpp b/scripts/northrend/borean_tundra.cpp index 96dab56b1..6b6b66fdf 100644 --- a/scripts/northrend/borean_tundra.cpp +++ b/scripts/northrend/borean_tundra.cpp @@ -23,13 +23,13 @@ EndScriptData */ /* ContentData npc_nesingwary_trapper -go_caribou_trap npc_sinkhole_kill_credit npc_lurgglbr EndContentData */ #include "precompiled.h" #include "escort_ai.h" +#include "TemporarySummon.h" /*###### ## npc_nesingwary_trapper @@ -63,25 +63,49 @@ struct MANGOS_DLL_DECL npc_nesingwary_trapperAI : public ScriptedAI m_trapGuid.Clear(); } - void StartAction(Player* pPlayer, GameObject* pTrap) + void MoveInLineOfSight(Unit* pWho) override { - m_uiPhase = 1; - m_uiPhaseTimer = 3000; - m_playerGuid = pPlayer->GetObjectGuid(); - m_trapGuid = pTrap->GetObjectGuid(); + if (!m_uiPhase && pWho->GetTypeId() == TYPEID_PLAYER && m_creature->IsWithinDistInMap(pWho, 20.0f)) + { + m_uiPhase = 1; + m_uiPhaseTimer = 1000; + m_playerGuid = pWho->GetObjectGuid(); + + if (m_creature->IsTemporarySummon()) + { + // Get the summoner trap + if (GameObject* pTrap = m_creature->GetMap()->GetGameObject(((TemporarySummon*)m_creature)->GetSummonerGuid())) + m_trapGuid = pTrap->GetObjectGuid(); + } + } + + ScriptedAI::MoveInLineOfSight(pWho); + } + + void MovementInform(uint32 uiType, uint32 uiPointId) override + { + if (uiType != POINT_MOTION_TYPE || !uiPointId) + return; - switch (urand(0, 3)) + if (GameObject* pTrap = m_creature->GetMap()->GetGameObject(m_trapGuid)) { - case 0: DoScriptText(SAY_PHRASE_1, m_creature); break; - case 1: DoScriptText(SAY_PHRASE_2, m_creature); break; - case 2: DoScriptText(SAY_PHRASE_3, m_creature); break; - case 3: DoScriptText(SAY_PHRASE_4, m_creature); break; + // respawn the Quality Fur + if (GameObject* pGoFur = GetClosestGameObjectWithEntry(pTrap, GO_QUALITY_FUR, INTERACTION_DISTANCE)) + { + if (!pGoFur->isSpawned()) + { + pGoFur->SetRespawnTime(10); + pGoFur->Refresh(); + } + } } + + m_uiPhaseTimer = 2000; } void UpdateAI(const uint32 uiDiff) override { - if (!m_creature->getVictim() && m_uiPhase) + if (!m_creature->getVictim() && m_uiPhaseTimer) { if (m_uiPhaseTimer <= uiDiff) { @@ -90,40 +114,45 @@ struct MANGOS_DLL_DECL npc_nesingwary_trapperAI : public ScriptedAI case 1: if (GameObject* pTrap = m_creature->GetMap()->GetGameObject(m_trapGuid)) { - if (pTrap->isSpawned()) - m_creature->GetMotionMaster()->MovePoint(0, pTrap->GetPositionX(), pTrap->GetPositionY(), pTrap->GetPositionZ()); + float fX, fY, fZ; + pTrap->GetContactPoint(m_creature, fX, fY, fZ); + + m_creature->SetWalk(false); + m_creature->GetMotionMaster()->MovePoint(1, fX, fY, fZ); } + m_uiPhaseTimer = 0; break; case 2: + switch (urand(0, 3)) + { + case 0: DoScriptText(SAY_PHRASE_1, m_creature); break; + case 1: DoScriptText(SAY_PHRASE_2, m_creature); break; + case 2: DoScriptText(SAY_PHRASE_3, m_creature); break; + case 3: DoScriptText(SAY_PHRASE_4, m_creature); break; + } + m_creature->HandleEmote(EMOTE_ONESHOT_LOOT); + m_uiPhaseTimer = 3000; + break; + case 3: if (GameObject* pTrap = m_creature->GetMap()->GetGameObject(m_trapGuid)) { - if (pTrap->isSpawned()) - { - pTrap->Use(m_creature); + pTrap->Use(m_creature); - if (Player* pPlayer = m_creature->GetMap()->GetPlayer(m_playerGuid)) - { - if (pPlayer->isAlive()) - pPlayer->KilledMonsterCredit(m_creature->GetEntry()); - } + if (Player* pPlayer = m_creature->GetMap()->GetPlayer(m_playerGuid)) + { + if (pPlayer->isAlive()) + pPlayer->KilledMonsterCredit(m_creature->GetEntry()); } } + m_uiPhaseTimer = 0; break; } - - m_uiPhase = 0; + ++m_uiPhase; } else m_uiPhaseTimer -= uiDiff; } } - - void MovementInform(uint32 /*uiType*/, uint32 /*uiPointId*/) override - { - m_creature->HandleEmote(EMOTE_ONESHOT_LOOT); - m_uiPhaseTimer = 2000; - m_uiPhase = 2; - } }; CreatureAI* GetAI_npc_nesingwary_trapper(Creature* pCreature) @@ -253,34 +282,6 @@ bool EffectAuraDummy_npc_oil_stained_wolf(const Aura* pAura, bool bApply) return false; } -/*###### -## go_caribou_trap -######*/ - -bool GOUse_go_caribou_trap(Player* pPlayer, GameObject* pGo) -{ - float fX, fY, fZ; - pGo->GetClosePoint(fX, fY, fZ, pGo->GetObjectBoundingRadius(), 2 * INTERACTION_DISTANCE, frand(0, M_PI_F * 2)); - - if (Creature* pCreature = pGo->SummonCreature(NPC_NESINGWARY_TRAPPER, fX, fY, fZ, pGo->GetOrientation(), TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 10000)) - { - if (npc_nesingwary_trapperAI* pTrapperAI = dynamic_cast(pCreature->AI())) - pTrapperAI->StartAction(pPlayer, pGo); - - pGo->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_IN_USE); - - if (GameObject* pGoFur = GetClosestGameObjectWithEntry(pGo, GO_QUALITY_FUR, INTERACTION_DISTANCE)) - { - if (!pGoFur->isSpawned()) - { - pGoFur->SetRespawnTime(10); - pGoFur->Refresh(); - } - } - } - - return true; -} /*##### # npc_sinkhole_kill_credit #####*/ @@ -533,11 +534,6 @@ void AddSC_borean_tundra() pNewScript->pEffectAuraDummy = &EffectAuraDummy_npc_oil_stained_wolf; pNewScript->RegisterSelf(); - pNewScript = new Script; - pNewScript->Name = "go_caribou_trap"; - pNewScript->pGOUse = &GOUse_go_caribou_trap; - pNewScript->RegisterSelf(); - pNewScript = new Script; pNewScript->Name = "npc_sinkhole_kill_credit"; pNewScript->GetAI = &GetAI_npc_sinkhole_kill_credit; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index a51eaf71b..25b191772 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2911" + #define SD2_REVISION_NR "2912" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index c48b4b172..5d915b319 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -369,7 +369,6 @@ UPDATE creature_template SET ScriptName='mob_webbed_creature' WHERE entry=17680; /* BOREAN TUNDRA */ UPDATE creature_template SET ScriptName='npc_nesingwary_trapper' WHERE entry=25835; UPDATE creature_template SET ScriptName='npc_oil_stained_wolf' WHERE entry=25791; -UPDATE gameobject_template SET ScriptName='go_caribou_trap' WHERE entry IN (187982,187995,187996,187997,187998,187999,188000,188001,188002,188003,188004,188005,188006,188007,188008); UPDATE creature_template SET ScriptName='npc_sinkhole_kill_credit' WHERE entry IN (26248,26249); UPDATE creature_template SET ScriptName='npc_lurgglbr' WHERE entry=25208; diff --git a/sql/updates/r2912_mangos.sql b/sql/updates/r2912_mangos.sql new file mode 100644 index 000000000..4ec9d9357 --- /dev/null +++ b/sql/updates/r2912_mangos.sql @@ -0,0 +1 @@ +UPDATE gameobject_template SET ScriptName='' WHERE entry IN (187982,187995,187996,187997,187998,187999,188000,188001,188002,188003,188004,188005,188006,188007,188008); From 3aa081264f71546ffa08437d75ac796d2dd30815 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Fri, 23 Aug 2013 01:00:01 +0300 Subject: [PATCH 0921/1172] [2913] Update some details in Sunwell Plateau to blizzlike --- .../magisters_terrace/magisters_terrace.cpp | 6 ++ .../sunwell_plateau/boss_brutallus.cpp | 25 ++++-- .../sunwell_plateau/boss_eredar_twins.cpp | 12 +++ .../sunwell_plateau/boss_felmyst.cpp | 1 + .../sunwell_plateau/boss_kalecgos.cpp | 80 +++++++++++++++---- .../sunwell_plateau/boss_kiljaeden.cpp | 42 ++++++---- .../sunwell_plateau/boss_muru.cpp | 16 ++++ .../instance_sunwell_plateau.cpp | 65 +++++++++++---- .../sunwell_plateau/sunwell_plateau.h | 42 ++++++++-- sd2_revision_nr.h | 2 +- sql/scriptdev2_script_full.sql | 2 +- sql/updates/r2913_scriptdev2.sql | 1 + 12 files changed, 228 insertions(+), 66 deletions(-) create mode 100644 sql/updates/r2913_scriptdev2.sql diff --git a/scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.cpp b/scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.cpp index 710fdd3f4..d1214e6aa 100644 --- a/scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.cpp +++ b/scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.cpp @@ -37,6 +37,8 @@ enum SPELL_TRANSFORM_TO_KAEL = 44670, SPELL_ORB_KILL_CREDIT = 46307, NPC_KALECGOS = 24848, // human form entry + + MAP_ID_MAGISTER = 585, }; static const float afKaelLandPoint[4] = {200.36f, -270.77f, -8.73f, 0.01f}; @@ -51,6 +53,10 @@ struct MANGOS_DLL_DECL npc_kalecgosAI : public ScriptedAI void Reset() override { + // Check the map id because the same creature entry is involved in other scripted event in other instance + if (m_creature->GetMapId() != MAP_ID_MAGISTER) + return; + m_uiTransformTimer = 0; // Move the dragon to landing point diff --git a/scripts/eastern_kingdoms/sunwell_plateau/boss_brutallus.cpp b/scripts/eastern_kingdoms/sunwell_plateau/boss_brutallus.cpp index bc6ec12d0..db46df9f9 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/boss_brutallus.cpp +++ b/scripts/eastern_kingdoms/sunwell_plateau/boss_brutallus.cpp @@ -68,7 +68,8 @@ enum SPELL_FROST_BREATH = 45065, SPELL_ENCAPSULATE = 44883, SPELL_FEL_FIREBALL = 44844, // Brutallus' spells - SPELL_FLAME_RING = 44873, // this spell should have a fire explosion when removed + SPELL_CLEAR_DEBUFFS = 34098, + SPELL_FLAME_RING = 44874, // this spell should have a fire explosion when removed SPELL_CHARGE = 44884, SPELL_BREAK_ICE = 46637, // Break the ice, open the door - dummy spell for 46638 and 47030 @@ -96,6 +97,10 @@ static const DialogueEntry aIntroDialogue[] = {0, 0, 0}, }; +/*###### +## boss_brutallus +######*/ + struct MANGOS_DLL_DECL boss_brutallusAI : public ScriptedAI, private DialogueHelper { boss_brutallusAI(Creature* pCreature) : ScriptedAI(pCreature), @@ -217,7 +222,7 @@ struct MANGOS_DLL_DECL boss_brutallusAI : public ScriptedAI, private DialogueHel { pSummoned->SetWalk(false); pSummoned->SetLevitate(true); - pSummoned->GetMotionMaster()->MovePoint(0, aMadrigosaFlyLoc[0], aMadrigosaFlyLoc[1], aMadrigosaFlyLoc[2], false); + pSummoned->GetMotionMaster()->MovePoint(0, aMadrigosaLoc[1].m_fX, aMadrigosaLoc[1].m_fY, aMadrigosaLoc[1].m_fZ, false); } else if (pSummoned->GetEntry() == NPC_BRUTALLUS_DEATH_CLOUD) pSummoned->CastSpell(pSummoned, SPELL_BRUTALLUS_DEATH_CLOUD, true); @@ -274,7 +279,7 @@ struct MANGOS_DLL_DECL boss_brutallusAI : public ScriptedAI, private DialogueHel break; case YELL_MADR_INTRO: if (Creature* pMadrigosa = m_pInstance->GetSingleCreatureFromStorage(NPC_MADRIGOSA)) - pMadrigosa->GetMotionMaster()->MovePoint(POINT_MOVE_GROUND, aMadrigosaGroundLoc[0], aMadrigosaGroundLoc[1], aMadrigosaGroundLoc[2]); + pMadrigosa->GetMotionMaster()->MovePoint(POINT_MOVE_GROUND, aMadrigosaLoc[0].m_fX, aMadrigosaLoc[0].m_fY, aMadrigosaLoc[0].m_fZ); break; case YELL_INTRO: if (Creature* pMadrigosa = m_pInstance->GetSingleCreatureFromStorage(NPC_MADRIGOSA)) @@ -291,7 +296,8 @@ struct MANGOS_DLL_DECL boss_brutallusAI : public ScriptedAI, private DialogueHel m_bCanDoMeleeAttack = false; if (Creature* pMadrigosa = m_pInstance->GetSingleCreatureFromStorage(NPC_MADRIGOSA)) { - pMadrigosa->GetMotionMaster()->MovePoint(POINT_MOVE_ICE_BLOCK, aMadrigosaFlyLoc[0], aMadrigosaFlyLoc[1], aMadrigosaFlyLoc[2]); + pMadrigosa->GetMotionMaster()->MovePoint(POINT_MOVE_ICE_BLOCK, aMadrigosaLoc[1].m_fX, aMadrigosaLoc[1].m_fY, aMadrigosaLoc[1].m_fZ); + pMadrigosa->HandleEmote(EMOTE_ONESHOT_LIFTOFF); pMadrigosa->SetLevitate(true); } // Temporary! This will make Brutallus not follow Madrigosa through the air until mmaps are implemented @@ -303,6 +309,7 @@ struct MANGOS_DLL_DECL boss_brutallusAI : public ScriptedAI, private DialogueHel m_uiMadrigosaSpellTimer = 2000; break; case SPELL_FLAME_RING: + DoCastSpellIfCan(m_creature, SPELL_CLEAR_DEBUFFS, CAST_TRIGGERED); DoCastSpellIfCan(m_creature, SPELL_FLAME_RING, CAST_TRIGGERED); break; case YELL_INTRO_BREAK_ICE: @@ -314,7 +321,7 @@ struct MANGOS_DLL_DECL boss_brutallusAI : public ScriptedAI, private DialogueHel break; case POINT_MOVE_GROUND: if (Creature* pMadrigosa = m_pInstance->GetSingleCreatureFromStorage(NPC_MADRIGOSA)) - pMadrigosa->GetMotionMaster()->MovePoint(POINT_MOVE_GROUND, aMadrigosaGroundLoc[0], aMadrigosaGroundLoc[1], aMadrigosaGroundLoc[2]); + pMadrigosa->GetMotionMaster()->MovePoint(POINT_MOVE_GROUND, aMadrigosaLoc[0].m_fX, aMadrigosaLoc[0].m_fY, aMadrigosaLoc[0].m_fZ); m_uiMadrigosaSpellTimer = 0; break; case YELL_MADR_TRAP: @@ -450,6 +457,10 @@ CreatureAI* GetAI_boss_brutallus(Creature* pCreature) return new boss_brutallusAI(pCreature); } +/*###### +## spell_aura_dummy_npc_brutallus_cloud +######*/ + bool EffectAuraDummy_spell_aura_dummy_npc_brutallus_cloud(const Aura* pAura, bool bApply) { // On Aura removal start Felmyst summon visuals @@ -473,6 +484,10 @@ bool EffectAuraDummy_spell_aura_dummy_npc_brutallus_cloud(const Aura* pAura, boo return true; } +/*###### +## at_madrigosa +######*/ + bool AreaTrigger_at_madrigosa(Player* pPlayer, AreaTriggerEntry const* /*pAt*/) { if (ScriptedInstance* pInstance = (ScriptedInstance*)pPlayer->GetInstanceData()) diff --git a/scripts/eastern_kingdoms/sunwell_plateau/boss_eredar_twins.cpp b/scripts/eastern_kingdoms/sunwell_plateau/boss_eredar_twins.cpp index 60addeb1d..f44fa8e0c 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/boss_eredar_twins.cpp +++ b/scripts/eastern_kingdoms/sunwell_plateau/boss_eredar_twins.cpp @@ -89,6 +89,10 @@ static const DialogueEntry aIntroDialogue[] = {0, 0, 0}, }; +/*###### +## boss_alythess +######*/ + struct MANGOS_DLL_DECL boss_alythessAI : public ScriptedAI { boss_alythessAI(Creature* pCreature) : ScriptedAI(pCreature), @@ -283,6 +287,10 @@ struct MANGOS_DLL_DECL boss_alythessAI : public ScriptedAI } }; +/*###### +## boss_sacrolash +######*/ + struct MANGOS_DLL_DECL boss_sacrolashAI : public ScriptedAI { boss_sacrolashAI(Creature* pCreature) : ScriptedAI(pCreature) @@ -503,6 +511,10 @@ struct MANGOS_DLL_DECL boss_sacrolashAI : public ScriptedAI } }; +/*###### +## npc_shadow_image +######*/ + struct MANGOS_DLL_DECL npc_shadow_imageAI : public ScriptedAI { npc_shadow_imageAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } diff --git a/scripts/eastern_kingdoms/sunwell_plateau/boss_felmyst.cpp b/scripts/eastern_kingdoms/sunwell_plateau/boss_felmyst.cpp index cf6cab27a..8fa8cb686 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/boss_felmyst.cpp +++ b/scripts/eastern_kingdoms/sunwell_plateau/boss_felmyst.cpp @@ -187,6 +187,7 @@ struct MANGOS_DLL_DECL boss_felmystAI : public ScriptedAI float fGroundZ = m_creature->GetMap()->GetHeight(m_creature->GetPhaseMask(), m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ()); m_creature->GetMotionMaster()->MovePoint(PHASE_TRANSITION, pWho->GetPositionX(), pWho->GetPositionY(), fGroundZ, false); + m_creature->HandleEmote(EMOTE_ONESHOT_LAND); } void KilledUnit(Unit* /*pVictim*/) override diff --git a/scripts/eastern_kingdoms/sunwell_plateau/boss_kalecgos.cpp b/scripts/eastern_kingdoms/sunwell_plateau/boss_kalecgos.cpp index bf17f3714..5899fed79 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/boss_kalecgos.cpp +++ b/scripts/eastern_kingdoms/sunwell_plateau/boss_kalecgos.cpp @@ -50,7 +50,7 @@ enum // Kalecgos SPELL_SPECTRAL_BLAST = 44869, - SPELL_SPECTRAL_REALM_EJECT = 44845, // pull the players ouside the spectral realm in case of wipe + SPELL_SPECTRAL_REALM_NOTIFY = 44845, // cast by the players on teleport to notify boss SPELL_ARCANE_BUFFET = 45018, SPELL_FROST_BREATH = 44799, SPELL_TAIL_LASH = 45122, @@ -66,15 +66,16 @@ enum SPELL_CURSE_OF_BOUNDLESS_AGONY = 45032, SPELL_SHADOW_BOLT_VOLLEY = 45031, - SPELL_TELEPORT_NORMAL_REALM = 46020, - SPELL_SPECTRAL_REALM_AURA = 46021, - SPELL_SPECTRAL_EXHAUSTION = 44867, - // Misc SPELL_BANISH = 44836 }; static const uint32 aWildMagicSpells[6] = {44978, 45001, 45002, 45004, 45006, 45010}; +static const float aKalecHumanLoc[4] = {1709.094f, 927.5035f, -74.28364f, 2.932153f}; + +/*###### +## boss_kalecgos +######*/ struct MANGOS_DLL_DECL boss_kalecgosAI : public ScriptedAI { @@ -113,11 +114,11 @@ struct MANGOS_DLL_DECL boss_kalecgosAI : public ScriptedAI void JustReachedHome() override { - // Eject all players and set event to fail - DoCastSpellIfCan(m_creature, SPELL_SPECTRAL_REALM_EJECT, CAST_TRIGGERED); - if (m_pInstance) + { + m_pInstance->DoEjectSpectralPlayers(); m_pInstance->SetData(TYPE_KALECGOS, FAIL); + } } void EnterEvadeMode() override @@ -206,6 +207,12 @@ struct MANGOS_DLL_DECL boss_kalecgosAI : public ScriptedAI } } + void ReceiveAIEvent(AIEventType eventType, Creature* /*pSender*/, Unit* pInvoker, uint32 /*uiMiscValue*/) override + { + if (eventType == AI_EVENT_CUSTOM_A && m_pInstance) + m_pInstance->AddToSpectralRealm(pInvoker->GetObjectGuid()); + } + void UpdateAI(const uint32 uiDiff) override { if (m_uiExitTimer) @@ -308,6 +315,10 @@ struct MANGOS_DLL_DECL boss_kalecgosAI : public ScriptedAI } }; +/*###### +## boss_sathrovarr +######*/ + struct MANGOS_DLL_DECL boss_sathrovarrAI : public ScriptedAI { boss_sathrovarrAI(Creature* pCreature) : ScriptedAI(pCreature) @@ -344,9 +355,8 @@ struct MANGOS_DLL_DECL boss_sathrovarrAI : public ScriptedAI if (!m_pInstance) return; - // Human Kalec starts to attack too - if (Creature* pKalec = m_pInstance->GetSingleCreatureFromStorage(NPC_KALECGOS_HUMAN)) - pKalec->AI()->AttackStart(m_creature); + // spawn human Kalec; he starts to attack + m_creature->SummonCreature(NPC_KALECGOS_HUMAN, aKalecHumanLoc[0], aKalecHumanLoc[1], aKalecHumanLoc[2], aKalecHumanLoc[3], TEMPSUMMON_DEAD_DESPAWN, 0, true); } void DamageTaken(Unit* /*pDoneBy*/, uint32& uiDamage) override @@ -355,6 +365,10 @@ struct MANGOS_DLL_DECL boss_sathrovarrAI : public ScriptedAI { uiDamage = 0; + if (m_bIsBanished) + return; + + // banish Sathrovarr and eject the players if (DoCastSpellIfCan(m_creature, SPELL_BANISH, CAST_TRIGGERED) == CAST_OK) m_bIsBanished = true; @@ -363,12 +377,11 @@ struct MANGOS_DLL_DECL boss_sathrovarrAI : public ScriptedAI if (Creature* pKalecgos = m_pInstance->GetSingleCreatureFromStorage(NPC_KALECGOS_DRAGON)) { - // Eject all players and set Kalec to uncorrupted - pKalecgos->CastSpell(pKalecgos, SPELL_SPECTRAL_REALM_EJECT, true); - if (boss_kalecgosAI* pKalecgosAI = dynamic_cast(pKalecgos->AI())) pKalecgosAI->m_bIsUncorrupted = true; } + + m_pInstance->DoEjectSpectralPlayers(); } } @@ -393,6 +406,9 @@ struct MANGOS_DLL_DECL boss_sathrovarrAI : public ScriptedAI { pWho->CastSpell(pWho, SPELL_TELEPORT_NORMAL_REALM, true); pWho->CastSpell(pWho, SPELL_SPECTRAL_EXHAUSTION, true); + + if (m_pInstance) + m_pInstance->RemoveFromSpectralRealm(pWho->GetObjectGuid()); } } @@ -404,6 +420,18 @@ struct MANGOS_DLL_DECL boss_sathrovarrAI : public ScriptedAI DoScriptText(SAY_SATH_DEATH, m_creature); } + void JustSummoned(Creature* pSummoned) override + { + if (pSummoned->GetEntry() == NPC_KALECGOS_HUMAN) + pSummoned->AI()->AttackStart(m_creature); + } + + void ReceiveAIEvent(AIEventType eventType, Creature* /*pSender*/, Unit* pInvoker, uint32 /*uiMiscValue*/) override + { + if (eventType == AI_EVENT_CUSTOM_A && m_pInstance) + m_pInstance->AddToSpectralRealm(pInvoker->GetObjectGuid()); + } + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) @@ -466,6 +494,10 @@ struct MANGOS_DLL_DECL boss_sathrovarrAI : public ScriptedAI } }; +/*###### +## boss_kalecgos_humanoid +######*/ + struct MANGOS_DLL_DECL boss_kalecgos_humanoidAI : public ScriptedAI { boss_kalecgos_humanoidAI(Creature* pCreature) : ScriptedAI(pCreature) @@ -503,9 +535,7 @@ struct MANGOS_DLL_DECL boss_kalecgos_humanoidAI : public ScriptedAI { if (m_pInstance) { - if (Creature* pKalecgos = m_pInstance->GetSingleCreatureFromStorage(NPC_KALECGOS_DRAGON)) - pKalecgos->CastSpell(pKalecgos, SPELL_SPECTRAL_REALM_EJECT, true); - + m_pInstance->DoEjectSpectralPlayers(); m_pInstance->SetData(TYPE_KALECGOS, FAIL); } } @@ -563,6 +593,19 @@ CreatureAI* GetAI_boss_kalecgos_humanoid(Creature* pCreature) return new boss_kalecgos_humanoidAI(pCreature); } +bool EffectDummyCreature_spell_spectral_realm_notify(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget, ObjectGuid /*originalCasterGuid*/) +{ + if (uiSpellId == SPELL_SPECTRAL_REALM_NOTIFY && uiEffIndex == EFFECT_INDEX_0) + { + if (pCaster->GetTypeId() == TYPEID_PLAYER) + pCreatureTarget->AI()->SendAIEvent(AI_EVENT_CUSTOM_A, pCaster, pCreatureTarget); + + return true; + } + + return true; +} + void AddSC_boss_kalecgos() { Script* pNewScript; @@ -570,15 +613,18 @@ void AddSC_boss_kalecgos() pNewScript = new Script; pNewScript->Name = "boss_kalecgos"; pNewScript->GetAI = &GetAI_boss_kalecgos; + pNewScript->pEffectDummyNPC = &EffectDummyCreature_spell_spectral_realm_notify; pNewScript->RegisterSelf(); pNewScript = new Script; pNewScript->Name = "boss_sathrovarr"; pNewScript->GetAI = &GetAI_boss_sathrovarr; + pNewScript->pEffectDummyNPC = &EffectDummyCreature_spell_spectral_realm_notify; pNewScript->RegisterSelf(); pNewScript = new Script; pNewScript->Name = "boss_kalecgos_humanoid"; pNewScript->GetAI = &GetAI_boss_kalecgos_humanoid; + pNewScript->pEffectDummyNPC = &EffectDummyCreature_spell_spectral_realm_notify; pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/sunwell_plateau/boss_kiljaeden.cpp b/scripts/eastern_kingdoms/sunwell_plateau/boss_kiljaeden.cpp index a148492e8..c1826bd46 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/boss_kiljaeden.cpp +++ b/scripts/eastern_kingdoms/sunwell_plateau/boss_kiljaeden.cpp @@ -93,6 +93,7 @@ enum SPELL_RING_BLUE_FLAME = 45825, // cast by the orb targets when activated SPELL_ANVEENA_PRISON = 46367, SPELL_SACRIFICE_ANVEENA = 46474, + SPELL_ARCANE_BOLT = 45670, // used by Kalec SPELL_SINISTER_REFL_CLASS = 45893, // increase the size of the clones SPELL_SINISTER_REFL_CLONE = 45785, // clone the player SPELL_VENGEANCE_BLUE_FLIGHT = 45839, // possess the dragon @@ -118,14 +119,15 @@ enum EVENT_DRAGON_ORB = 9, // outro - SPELL_TELEPORT_VISUAL = 41232, + SPELL_TELEPORT_VISUAL = 12980, SPELL_KALEC_TELEPORT = 46473, // teleports and transforms Kalec in human form + SPELL_ARCANE_PORTAL = 42047, SPELL_CALL_ENTROPIUS = 46818, SPELL_ENTROPIUS_BODY = 46819, SPELL_BLAZE_TO_LIGHT = 46821, SPELL_SUNWELL_IGNITION = 46822, - NPC_BOSS_PORTAL = 24925, + NPC_INERT_PORTAL = 26254, NPC_CORE_ENTROPIUS = 26262, NPC_SOLDIER = 26259, // summoned in 2 waves before Velen. Should move into 2 circle formations NPC_RIFTWALKER = 26289, @@ -167,7 +169,7 @@ static const DialogueEntry aOutroDialogue[] = { {NPC_KALECGOS, 0, 15000}, {SAY_KALECGOS_GOODBYE, NPC_KALECGOS, 40000}, - {NPC_BOSS_PORTAL, 0, 10000}, + {NPC_INERT_PORTAL, 0, 10000}, {POINT_SUMMON_SOLDIERS, 0, 18000}, {NPC_VELEN, 0, 1000}, {NPC_LIADRIN, 0, 4000}, @@ -190,20 +192,19 @@ static const DialogueEntry aOutroDialogue[] = {0, 0, 0}, }; -struct EventLocations -{ - float m_fX, m_fY, m_fZ, m_fO; -}; - static const EventLocations aOutroLocations[] = { - {1727.854f, 656.060f, 28.31f, 3.86f}, // portal summon loc - {1716.969f, 646.407f, 28.05f, 3.91f}, // velen summon loc - {1718.862f, 644.528f, 28.05f, 3.87f}, // liadrin summon loc + {1725.469f, 650.939f, 30.314f, 3.78f}, // portal summon loc + {1717.776f, 645.178f, 28.223f, 3.83f}, // velen summon loc + {1720.024f, 643.233f, 28.133f, 3.76f}, // liadrin summon loc {1712.110f, 641.044f, 27.80f}, // velen move forward - {1711.537f, 637.600f, 27.34f} // liadrin move forward + {1711.537f, 637.600f, 27.34f}, // liadrin move forward + {1698.946f, 628.206f, 83.003f, 0.76f}, // entropius core summon loc }; +// Note: the Z loc should be 143.69 but currently we are not using it because it's too far away +static const float aKalegSpawnLoc[4] = {1734.431f, 593.1974f, 130.6977f, 4.55f}; + /*###### ## npc_kiljaeden_controller ######*/ @@ -239,14 +240,16 @@ struct MANGOS_DLL_DECL npc_kiljaeden_controllerAI : public Scripted_NoMovementAI case NPC_KALECGOS: if (Creature* pKalec = m_pInstance->GetSingleCreatureFromStorage(NPC_KALECGOS)) { + pKalec->GetMotionMaster()->Clear(); + pKalec->GetMotionMaster()->MoveIdle(); pKalec->CastSpell(pKalec, SPELL_KALEC_TELEPORT, true); pKalec->SetLevitate(false); } - m_creature->SummonCreature(NPC_CORE_ENTROPIUS, m_creature->GetPositionX(), m_creature->GetPositionY(), 85.0f, 0, TEMPSUMMON_CORPSE_DESPAWN, 0); + m_creature->SummonCreature(NPC_CORE_ENTROPIUS, aOutroLocations[5].m_fX, aOutroLocations[5].m_fY, aOutroLocations[5].m_fZ, aOutroLocations[5].m_fO, TEMPSUMMON_CORPSE_DESPAWN, 0); break; - case NPC_BOSS_PORTAL: + case NPC_INERT_PORTAL: // ToDo: summon soldiers to the right - m_creature->SummonCreature(NPC_BOSS_PORTAL, aOutroLocations[0].m_fX, aOutroLocations[0].m_fY, aOutroLocations[0].m_fZ, aOutroLocations[0].m_fO, TEMPSUMMON_CORPSE_DESPAWN, 0); + m_creature->SummonCreature(NPC_INERT_PORTAL, aOutroLocations[0].m_fX, aOutroLocations[0].m_fY, aOutroLocations[0].m_fZ, aOutroLocations[0].m_fO, TEMPSUMMON_CORPSE_DESPAWN, 0); break; case POINT_SUMMON_SOLDIERS: // ToDo: summon soldiers to the left @@ -303,8 +306,9 @@ struct MANGOS_DLL_DECL npc_kiljaeden_controllerAI : public Scripted_NoMovementAI pSummoned->SetLevitate(true); m_EntropiusGuid = pSummoned->GetObjectGuid(); break; - case NPC_BOSS_PORTAL: + case NPC_INERT_PORTAL: m_PortalGuid = pSummoned->GetObjectGuid(); + pSummoned->CastSpell(pSummoned, SPELL_ARCANE_PORTAL, true); break; } } @@ -452,7 +456,11 @@ struct MANGOS_DLL_DECL boss_kiljaedenAI : public Scripted_NoMovementAI, private void JustSummoned(Creature* pSummoned) override { if (pSummoned->GetEntry() == NPC_KALECGOS) + { DoScriptText(SAY_KALECGOS_INTRO, pSummoned); + pSummoned->CastSpell(pSummoned, SPELL_ARCANE_BOLT, true); + pSummoned->GetMotionMaster()->MoveRandomAroundPoint(m_creature->GetPositionX(), m_creature->GetPositionY(), pSummoned->GetPositionZ(), 30.0f); + } else if (pSummoned->GetEntry() == NPC_SHIELD_ORB) { pSummoned->CastSpell(pSummoned, SPELL_SHADOW_BOLT_AURA, true); @@ -639,7 +647,7 @@ struct MANGOS_DLL_DECL boss_kiljaedenAI : public Scripted_NoMovementAI, private { if (m_uiKalecSummonTimer <= uiDiff) { - m_creature->SummonCreature(NPC_KALECGOS, m_creature->GetPositionX(), m_creature->GetPositionY(), 85.0f, 3.80f, TEMPSUMMON_CORPSE_DESPAWN, 0); + m_creature->SummonCreature(NPC_KALECGOS, aKalegSpawnLoc[0], aKalegSpawnLoc[1], aKalegSpawnLoc[2], aKalegSpawnLoc[3], TEMPSUMMON_CORPSE_DESPAWN, 0); m_uiKalecSummonTimer = 0; } else diff --git a/scripts/eastern_kingdoms/sunwell_plateau/boss_muru.cpp b/scripts/eastern_kingdoms/sunwell_plateau/boss_muru.cpp index ac1e6338c..79209c888 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/boss_muru.cpp +++ b/scripts/eastern_kingdoms/sunwell_plateau/boss_muru.cpp @@ -68,6 +68,10 @@ enum MAX_TRANSFORM_CASTS = 10 }; +/*###### +## boss_muru +######*/ + struct MANGOS_DLL_DECL boss_muruAI : public Scripted_NoMovementAI { boss_muruAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) @@ -209,6 +213,10 @@ struct MANGOS_DLL_DECL boss_muruAI : public Scripted_NoMovementAI } }; +/*###### +## boss_entropius +######*/ + struct MANGOS_DLL_DECL boss_entropiusAI : public ScriptedAI { boss_entropiusAI(Creature* pCreature) : ScriptedAI(pCreature) @@ -307,6 +315,10 @@ struct MANGOS_DLL_DECL boss_entropiusAI : public ScriptedAI } }; +/*###### +## npc_portal_target +######*/ + struct MANGOS_DLL_DECL npc_portal_targetAI : public Scripted_NoMovementAI { npc_portal_targetAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) @@ -395,6 +407,10 @@ struct MANGOS_DLL_DECL npc_portal_targetAI : public Scripted_NoMovementAI } }; +/*###### +## npc_void_sentinel_summoner +######*/ + struct MANGOS_DLL_DECL npc_void_sentinel_summonerAI : public Scripted_NoMovementAI { npc_void_sentinel_summonerAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) diff --git a/scripts/eastern_kingdoms/sunwell_plateau/instance_sunwell_plateau.cpp b/scripts/eastern_kingdoms/sunwell_plateau/instance_sunwell_plateau.cpp index f81905480..47d11fc87 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/instance_sunwell_plateau.cpp +++ b/scripts/eastern_kingdoms/sunwell_plateau/instance_sunwell_plateau.cpp @@ -35,9 +35,11 @@ EndScriptData */ static const DialogueEntry aFelmystOutroDialogue[] = { - {NPC_KALECGOS, 0, 10000}, - {SAY_KALECGOS_OUTRO, NPC_KALECGOS, 10000}, - {SPELL_OPEN_BACK_DOOR, 0, 0}, + {NPC_KALECGOS_MADRIGOSA, 0, 10000}, + {SAY_KALECGOS_OUTRO, NPC_KALECGOS_MADRIGOSA, 5000}, + {NPC_FELMYST, 0, 5000}, + {SPELL_OPEN_BACK_DOOR, 0, 9000}, + {NPC_BRUTALLUS, 0, 0}, {0, 0, 0}, }; @@ -79,7 +81,7 @@ void instance_sunwell_plateau::OnPlayerEnter(Player* pPlayer) return; // Summon Felmyst in reload case - pPlayer->SummonCreature(NPC_FELMYST, aMadrigosaGroundLoc[0], aMadrigosaGroundLoc[1], aMadrigosaGroundLoc[2], aMadrigosaGroundLoc[3], TEMPSUMMON_DEAD_DESPAWN, 0); + pPlayer->SummonCreature(NPC_FELMYST, aMadrigosaLoc[0].m_fX, aMadrigosaLoc[0].m_fY, aMadrigosaLoc[0].m_fZ, aMadrigosaLoc[0].m_fO, TEMPSUMMON_DEAD_DESPAWN, 0); } void instance_sunwell_plateau::OnCreatureCreate(Creature* pCreature) @@ -94,6 +96,7 @@ void instance_sunwell_plateau::OnCreatureCreate(Creature* pCreature) case NPC_MADRIGOSA: case NPC_BRUTALLUS: case NPC_FELMYST: + case NPC_KALECGOS_MADRIGOSA: case NPC_ALYTHESS: case NPC_SACROLASH: case NPC_MURU: @@ -114,6 +117,10 @@ void instance_sunwell_plateau::OnCreatureCreate(Creature* pCreature) if (pCreature->GetPositionZ() < 51.0f) m_lAllFlightTriggersList.push_back(pCreature->GetObjectGuid()); break; + case NPC_WORLD_TRIGGER_LARGE: + if (pCreature->GetPositionY() < 523.0f) + m_lBackdoorTriggersList.push_back(pCreature->GetObjectGuid()); + break; } } @@ -210,18 +217,11 @@ void instance_sunwell_plateau::SetData(uint32 uiType, uint32 uiData) break; case TYPE_BRUTALLUS: m_auiEncounter[uiType] = uiData; - // Temporary - until spells 46609 and 46637 are properly fixed - if (uiData == SPECIAL) - DoUseDoorOrButton(GO_ICE_BARRIER, MINUTE); break; case TYPE_FELMYST: m_auiEncounter[uiType] = uiData; if (uiData == DONE) - { - StartNextDialogueText(NPC_KALECGOS); - // Temporary - until spell 46650 is properly fixed - DoUseDoorOrButton(GO_FIRE_BARRIER); - } + StartNextDialogueText(NPC_KALECGOS_MADRIGOSA); else if (uiData == IN_PROGRESS) DoSortFlightTriggers(); break; @@ -414,24 +414,55 @@ ObjectGuid instance_sunwell_plateau::SelectFelmystFlightTrigger(bool bLeftSide, return vTemp[uiIndex]; } +void instance_sunwell_plateau::DoEjectSpectralPlayers() +{ + for (GuidSet::const_iterator itr = m_spectralRealmPlayers.begin(); itr != m_spectralRealmPlayers.end(); ++itr) + { + if (Player* pPlayer = instance->GetPlayer(*itr)) + { + if (!pPlayer->HasAura(SPELL_SPECTRAL_REALM_AURA)) + continue; + + pPlayer->CastSpell(pPlayer, SPELL_TELEPORT_NORMAL_REALM, true); + pPlayer->CastSpell(pPlayer, SPELL_SPECTRAL_EXHAUSTION, true); + pPlayer->RemoveAurasDueToSpell(SPELL_SPECTRAL_REALM_AURA); + } + } +} + void instance_sunwell_plateau::JustDidDialogueStep(int32 iEntry) { switch (iEntry) { - case NPC_KALECGOS: + case NPC_KALECGOS_MADRIGOSA: if (Creature* pTrigger = GetSingleCreatureFromStorage(NPC_FLIGHT_TRIGGER_LEFT)) { - if (Creature* pKalec = pTrigger->SummonCreature(NPC_KALECGOS, pTrigger->GetPositionX(), pTrigger->GetPositionY(), pTrigger->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN, 1 * MINUTE * IN_MILLISECONDS)) + if (Creature* pKalec = pTrigger->SummonCreature(NPC_KALECGOS_MADRIGOSA, aKalecLoc[0].m_fX, aKalecLoc[0].m_fY, aKalecLoc[0].m_fZ, aKalecLoc[0].m_fO, TEMPSUMMON_CORPSE_DESPAWN, 0)) { pKalec->SetWalk(false); pKalec->SetLevitate(true); - pKalec->GetMotionMaster()->MovePoint(0, aMadrigosaFlyLoc[0], aMadrigosaFlyLoc[1], aMadrigosaFlyLoc[2], false); + pKalec->GetMotionMaster()->MovePoint(0, aKalecLoc[1].m_fX, aKalecLoc[1].m_fY, aKalecLoc[1].m_fZ, false); } } break; + case NPC_FELMYST: + if (Creature* pKalec = GetSingleCreatureFromStorage(NPC_KALECGOS_MADRIGOSA)) + pKalec->GetMotionMaster()->MovePoint(0, aKalecLoc[2].m_fX, aKalecLoc[2].m_fY, aKalecLoc[2].m_fZ, false); + break; case SPELL_OPEN_BACK_DOOR: - if (Creature* pKalec = GetSingleCreatureFromStorage(NPC_KALECGOS)) - pKalec->CastSpell(pKalec, SPELL_OPEN_BACK_DOOR, true); + if (Creature* pKalec = GetSingleCreatureFromStorage(NPC_KALECGOS_MADRIGOSA)) + { + // ToDo: update this when the AoE spell targeting will support many explicit target. Kalec should target all creatures from the list + if (Creature* pTrigger = instance->GetCreature(m_lBackdoorTriggersList.front())) + pKalec->CastSpell(pTrigger, SPELL_OPEN_BACK_DOOR, true); + } + break; + case NPC_BRUTALLUS: + if (Creature* pKalec = GetSingleCreatureFromStorage(NPC_KALECGOS_MADRIGOSA)) + { + pKalec->ForcedDespawn(10000); + pKalec->GetMotionMaster()->MovePoint(0, aKalecLoc[3].m_fX, aKalecLoc[3].m_fY, aKalecLoc[3].m_fZ, false); + } break; } } diff --git a/scripts/eastern_kingdoms/sunwell_plateau/sunwell_plateau.h b/scripts/eastern_kingdoms/sunwell_plateau/sunwell_plateau.h index e5036be60..9a635ba43 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/sunwell_plateau.h +++ b/scripts/eastern_kingdoms/sunwell_plateau/sunwell_plateau.h @@ -23,8 +23,10 @@ enum NPC_FLIGHT_TRIGGER_LEFT = 25357, // Related to Felmyst flight path. Also the anchor to summon Madrigosa NPC_FLIGHT_TRIGGER_RIGHT = 25358, // related to Felmyst flight path NPC_WORLD_TRIGGER = 22515, + NPC_WORLD_TRIGGER_LARGE = 23472, // ground triggers spawned in Brutallus / Felmyst arena NPC_BRUTALLUS = 24882, NPC_FELMYST = 25038, + NPC_KALECGOS_MADRIGOSA = 24844, // kalecgos blue dragon; spawns after Felmyst NPC_ALYTHESS = 25166, NPC_SACROLASH = 25165, NPC_MURU = 25741, @@ -48,10 +50,10 @@ enum GO_MURU_EXIT_GATE = 188118, GO_THIRD_GATE = 187765, // door after muru; why another? - GO_ORB_BLUE_FLIGHT_1 = 187869, // orbs used in the Kil'jaeden fight - GO_ORB_BLUE_FLIGHT_2 = 188114, - GO_ORB_BLUE_FLIGHT_3 = 188115, - GO_ORB_BLUE_FLIGHT_4 = 188116, + GO_ORB_BLUE_FLIGHT_1 = 188115, // orbs used in the Kil'jaeden fight + GO_ORB_BLUE_FLIGHT_2 = 188116, + GO_ORB_BLUE_FLIGHT_3 = 187869, + GO_ORB_BLUE_FLIGHT_4 = 188114, SAY_KALECGOS_OUTRO = -1580043, SAY_TWINS_INTRO = -1580044, @@ -65,6 +67,10 @@ enum AREATRIGGER_TWINS = 4937, + // Kalec spectral realm spells + SPELL_TELEPORT_NORMAL_REALM = 46020, + SPELL_SPECTRAL_REALM_AURA = 46021, + SPELL_SPECTRAL_EXHAUSTION = 44867, // Felmyst ouro spell SPELL_OPEN_BACK_DOOR = 46650, // Opens the fire barrier - script effect for 46652 // used by both muru and entropius @@ -75,10 +81,24 @@ enum MAX_DECEIVERS = 3 }; -// Used to summon Felmyst in reload case. This is the place where Madrigosa is killed in the intro event -static const float aMadrigosaGroundLoc[4] = {1459.35f, 636.81f, 19.94f, 4.88f}; -// Used as an anchor to move Madrigosa and Kalec during the cinematic -static const float aMadrigosaFlyLoc[3] = {1459.35f, 636.81f, 59.234f}; +struct EventLocations +{ + float m_fX, m_fY, m_fZ, m_fO; +}; + +static const EventLocations aMadrigosaLoc[] = +{ + {1463.82f, 661.212f, 19.79f, 4.88f}, // reload spawn loc - the place where to spawn Felmyst + {1463.82f, 661.212f, 39.234f}, // fly loc during the cinematig +}; + +static const EventLocations aKalecLoc[] = +{ + {1573.146f, 755.2025f, 99.524f, 3.59f}, // spawn loc + {1474.235f, 624.0703f, 29.325f}, // first move + {1511.655f, 550.7028f, 25.510f}, // open door + {1648.255f, 519.377f, 165.848f}, // fly away +}; class MANGOS_DLL_DECL instance_sunwell_plateau : public ScriptedInstance, private DialogueHelper { @@ -102,6 +122,10 @@ class MANGOS_DLL_DECL instance_sunwell_plateau : public ScriptedInstance, privat ObjectGuid SelectFelmystFlightTrigger(bool bLeftSide, uint8 uiIndex); + void AddToSpectralRealm(ObjectGuid playerGuid) { m_spectralRealmPlayers.insert(playerGuid); } + void RemoveFromSpectralRealm(ObjectGuid playerGuid) { m_spectralRealmPlayers.erase(playerGuid); } + void DoEjectSpectralPlayers(); + const char* Save() const override { return m_strInstData.c_str(); } void Load(const char* chrIn) override; @@ -119,9 +143,11 @@ class MANGOS_DLL_DECL instance_sunwell_plateau : public ScriptedInstance, privat uint32 m_uiMuruBerserkTimer; uint32 m_uiKiljaedenYellTimer; + GuidSet m_spectralRealmPlayers; GuidVector m_vRightFlightTriggersVect; GuidVector m_vLeftFlightTriggersVect; GuidList m_lAllFlightTriggersList; + GuidList m_lBackdoorTriggersList; GuidList m_lDeceiversGuidList; }; #endif diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 25b191772..55d2b8c0b 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2912" + #define SD2_REVISION_NR "2913" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 412e9e8bb..904821f7f 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -3025,7 +3025,7 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1580030,'Gah! Well done... Now... this gets... interesting...',12471,1,0,0,'brutallus YELL_DEATH'), (-1580031,'Hold, friends! There is information to be had before this devil meets his fate!',12472,1,0,0,'madrigosa YELL_MADR_ICE_BARRIER'), -(-1580032,'Where is Anveena, demon? What has become of Kalec?',12473,1,0,0,'madrigosa YELL_MADR_INTRO'), +(-1580032,'Where is Anveena, demon? What has become of Kalec?',12473,1,0,293,'madrigosa YELL_MADR_INTRO'), (-1580033,'You will tell me where they are!',12474,1,0,0,'madrigosa YELL_MADR_ICE_BLOCK'), (-1580034,'Speak, I grow weary of asking!',12475,1,0,0,'madrigosa YELL_MADR_TRAP'), (-1580035,'Malygos, my lord! I did my best!',12476,1,0,0,'madrigosa YELL_MADR_DEATH'), diff --git a/sql/updates/r2913_scriptdev2.sql b/sql/updates/r2913_scriptdev2.sql new file mode 100644 index 000000000..1075c4ac5 --- /dev/null +++ b/sql/updates/r2913_scriptdev2.sql @@ -0,0 +1 @@ +UPDATE script_texts SET emote=293 WHERE entry=-1580032; From c39de5b7d1e42d77d6436ccadc14421e55e91554 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Wed, 4 Sep 2013 16:45:46 +0300 Subject: [PATCH 0922/1172] [2914] Add friendly game support for Chess event Thanks to evil@wow for providing the necessary data --- .../eastern_kingdoms/karazhan/chess_event.cpp | 120 +++++++++++++----- .../karazhan/instance_karazhan.cpp | 26 +++- scripts/eastern_kingdoms/karazhan/karazhan.h | 3 + sd2_revision_nr.h | 2 +- sql/scriptdev2_script_full.sql | 3 +- sql/updates/r2914_scriptdev2.sql | 3 + 6 files changed, 114 insertions(+), 43 deletions(-) create mode 100644 sql/updates/r2914_scriptdev2.sql diff --git a/scripts/eastern_kingdoms/karazhan/chess_event.cpp b/scripts/eastern_kingdoms/karazhan/chess_event.cpp index fa80fc15e..ca64d7928 100644 --- a/scripts/eastern_kingdoms/karazhan/chess_event.cpp +++ b/scripts/eastern_kingdoms/karazhan/chess_event.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: chess_event -SD%Complete: 75 -SDComment: Friendly game NYI; Chess AI could use some improvements. +SD%Complete: 80 +SDComment: Chess AI could use some improvements. SDCategory: Karazhan EndScriptData */ @@ -176,6 +176,7 @@ enum GOSSIP_ITEM_HUMAN_CONJURER = -3532015, GOSSIP_ITEM_HUMAN_CLERIC = -3532016, GOSSIP_ITEM_KING_LLANE = -3532017, + GOSSIP_ITEM_RESET_BOARD = -3532018, // gossip menu GOSSIP_MENU_ID_GRUNT = 10425, @@ -190,6 +191,8 @@ enum GOSSIP_MENU_ID_CLERIC = 10416, GOSSIP_MENU_ID_ELEMENTAL = 10413, GOSSIP_MENU_ID_LLANE = 10418, + GOSSIP_MENU_ID_MEDIVH = 10506, + GOSSIP_MENU_ID_MEDIVH_BEATEN = 10718, // misc TARGET_TYPE_RANDOM = 1, @@ -256,6 +259,40 @@ CreatureAI* GetAI_npc_echo_of_medivh(Creature* pCreature) return new npc_echo_of_medivhAI(pCreature); } +bool GossipHello_npc_echo_of_medivh(Player* pPlayer, Creature* pCreature) +{ + if (ScriptedInstance* pInstance = (ScriptedInstance*)pCreature->GetInstanceData()) + { + if (pInstance->GetData(TYPE_CHESS) != DONE && pInstance->GetData(TYPE_CHESS) != SPECIAL) + pPlayer->SEND_GOSSIP_MENU(GOSSIP_MENU_ID_MEDIVH, pCreature->GetObjectGuid()); + else + { + if (pInstance->GetData(TYPE_CHESS) == SPECIAL) + pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_RESET_BOARD, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); + + pPlayer->SEND_GOSSIP_MENU(GOSSIP_MENU_ID_MEDIVH_BEATEN, pCreature->GetObjectGuid()); + } + + return true; + } + + return false; +} + +bool GossipSelect_npc_echo_of_medivh(Player* pPlayer, Creature* pCreature, uint32 /*uiSender*/, uint32 uiAction) +{ + if (uiAction == GOSSIP_ACTION_INFO_DEF + 1) + { + // reset the board + if (ScriptedInstance* pInstance = (ScriptedInstance*)pCreature->GetInstanceData()) + pInstance->SetData(TYPE_CHESS, DONE); + + pPlayer->CLOSE_GOSSIP_MENU(); + } + + return true; +} + /*###### ## npc_chess_piece_generic ######*/ @@ -286,11 +323,12 @@ struct MANGOS_DLL_DECL npc_chess_piece_genericAI : public ScriptedAI m_uiSpellCommandTimer = m_creature->HasAura(SPELL_CONTROL_PIECE) ? 0 : 1000; m_bIsPrimarySpell = true; - // cancel move timer for player faction npcs + // cancel move timer for player faction npcs or for friendly games if (m_pInstance) { if ((m_pInstance->GetPlayerTeam() == ALLIANCE && m_creature->getFaction() == FACTION_ID_CHESS_ALLIANCE) || - (m_pInstance->GetPlayerTeam() == HORDE && m_creature->getFaction() == FACTION_ID_CHESS_HORDE)) + (m_pInstance->GetPlayerTeam() == HORDE && m_creature->getFaction() == FACTION_ID_CHESS_HORDE) || + m_pInstance->GetData(TYPE_CHESS) == DONE) m_uiMoveCommandTimer = 0; } } @@ -546,6 +584,8 @@ bool GossipSelect_npc_chess_generic(Player* pPlayer, Creature* pCreature, uint32 if (pInstance->GetData(TYPE_CHESS) == NOT_STARTED) pInstance->SetData(TYPE_CHESS, IN_PROGRESS); + else if (pInstance->GetData(TYPE_CHESS) == DONE) + pInstance->SetData(TYPE_CHESS, SPECIAL); } pPlayer->CLOSE_GOSSIP_MENU(); @@ -647,17 +687,22 @@ struct MANGOS_DLL_DECL npc_king_llaneAI : public npc_chess_piece_genericAI if (!pMedivh) return; - if (m_pInstance->GetPlayerTeam() == HORDE) - { - DoPlaySoundToSet(pMedivh, SOUND_ID_WIN_PLAYER); - DoScriptText(EMOTE_LIFT_CURSE, pMedivh); - + if (m_pInstance->GetData(TYPE_CHESS) == SPECIAL) m_pInstance->SetData(TYPE_CHESS, DONE); - } else { - DoPlaySoundToSet(pMedivh, SOUND_ID_WIN_MEDIVH); - m_pInstance->SetData(TYPE_CHESS, NOT_STARTED); + if (m_pInstance->GetPlayerTeam() == HORDE) + { + DoPlaySoundToSet(pMedivh, SOUND_ID_WIN_PLAYER); + DoScriptText(EMOTE_LIFT_CURSE, pMedivh); + + m_pInstance->SetData(TYPE_CHESS, DONE); + } + else + { + DoPlaySoundToSet(pMedivh, SOUND_ID_WIN_MEDIVH); + m_pInstance->SetData(TYPE_CHESS, FAIL); + } } m_pInstance->DoMoveChessPieceToSides(SPELL_TRANSFORM_KING_LLANE, FACTION_ID_CHESS_ALLIANCE, true); @@ -702,9 +747,9 @@ bool GossipHello_npc_king_llane(Player* pPlayer, Creature* pCreature) if (pPlayer->HasAura(SPELL_RECENTLY_IN_GAME) || pCreature->HasAura(SPELL_CONTROL_PIECE)) return true; - if (ScriptedInstance* pInstance = (ScriptedInstance*)pCreature->GetInstanceData()) + if (instance_karazhan* pInstance = (instance_karazhan*)pCreature->GetInstanceData()) { - if (pInstance->GetData(TYPE_CHESS) != DONE && pPlayer->GetTeam() == ALLIANCE) + if ((pInstance->GetData(TYPE_CHESS) != DONE && pPlayer->GetTeam() == ALLIANCE) || pInstance->IsFriendlyGameReady()) pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KING_LLANE, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); } @@ -753,17 +798,22 @@ struct MANGOS_DLL_DECL npc_warchief_blackhandAI : public npc_chess_piece_generic if (!pMedivh) return; - if (m_pInstance->GetPlayerTeam() == ALLIANCE) - { - DoPlaySoundToSet(pMedivh, SOUND_ID_WIN_PLAYER); - DoScriptText(EMOTE_LIFT_CURSE, pMedivh); - + if (m_pInstance->GetData(TYPE_CHESS) == SPECIAL) m_pInstance->SetData(TYPE_CHESS, DONE); - } else { - DoPlaySoundToSet(pMedivh, SOUND_ID_WIN_MEDIVH); - m_pInstance->SetData(TYPE_CHESS, NOT_STARTED); + if (m_pInstance->GetPlayerTeam() == ALLIANCE) + { + DoPlaySoundToSet(pMedivh, SOUND_ID_WIN_PLAYER); + DoScriptText(EMOTE_LIFT_CURSE, pMedivh); + + m_pInstance->SetData(TYPE_CHESS, DONE); + } + else + { + DoPlaySoundToSet(pMedivh, SOUND_ID_WIN_MEDIVH); + m_pInstance->SetData(TYPE_CHESS, FAIL); + } } m_pInstance->DoMoveChessPieceToSides(SPELL_TRANSFORM_BLACKHAND, FACTION_ID_CHESS_HORDE, true); @@ -808,9 +858,9 @@ bool GossipHello_npc_warchief_blackhand(Player* pPlayer, Creature* pCreature) if (pPlayer->HasAura(SPELL_RECENTLY_IN_GAME) || pCreature->HasAura(SPELL_CONTROL_PIECE)) return true; - if (ScriptedInstance* pInstance = (ScriptedInstance*)pCreature->GetInstanceData()) + if (instance_karazhan* pInstance = (instance_karazhan*)pCreature->GetInstanceData()) { - if (pInstance->GetData(TYPE_CHESS) != DONE && pPlayer->GetTeam() == HORDE) + if (pInstance->GetData(TYPE_CHESS) != DONE && pPlayer->GetTeam() == HORDE || pInstance->IsFriendlyGameReady()) pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_WARCHIEF_BLACKHAND, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); } @@ -886,7 +936,7 @@ bool GossipHello_npc_human_conjurer(Player* pPlayer, Creature* pCreature) if (ScriptedInstance* pInstance = (ScriptedInstance*)pCreature->GetInstanceData()) { - if (pInstance->GetData(TYPE_CHESS) == IN_PROGRESS && pPlayer->GetTeam() == ALLIANCE) + if ((pInstance->GetData(TYPE_CHESS) == IN_PROGRESS && pPlayer->GetTeam() == ALLIANCE) || pInstance->GetData(TYPE_CHESS) == SPECIAL) pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_HUMAN_CONJURER, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); } @@ -962,7 +1012,7 @@ bool GossipHello_npc_orc_warlock(Player* pPlayer, Creature* pCreature) if (ScriptedInstance* pInstance = (ScriptedInstance*)pCreature->GetInstanceData()) { - if (pInstance->GetData(TYPE_CHESS) == IN_PROGRESS && pPlayer->GetTeam() == HORDE) + if ((pInstance->GetData(TYPE_CHESS) == IN_PROGRESS && pPlayer->GetTeam() == HORDE) || pInstance->GetData(TYPE_CHESS) == SPECIAL) pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_ORC_WARLOCK, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); } @@ -1052,7 +1102,7 @@ bool GossipHello_npc_human_footman(Player* pPlayer, Creature* pCreature) if (ScriptedInstance* pInstance = (ScriptedInstance*)pCreature->GetInstanceData()) { - if (pInstance->GetData(TYPE_CHESS) == IN_PROGRESS && pPlayer->GetTeam() == ALLIANCE) + if ((pInstance->GetData(TYPE_CHESS) == IN_PROGRESS && pPlayer->GetTeam() == ALLIANCE) || pInstance->GetData(TYPE_CHESS) == SPECIAL) pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_HUMAN_FOOTMAN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); } @@ -1142,7 +1192,7 @@ bool GossipHello_npc_orc_grunt(Player* pPlayer, Creature* pCreature) if (ScriptedInstance* pInstance = (ScriptedInstance*)pCreature->GetInstanceData()) { - if (pInstance->GetData(TYPE_CHESS) == IN_PROGRESS && pPlayer->GetTeam() == HORDE) + if ((pInstance->GetData(TYPE_CHESS) == IN_PROGRESS && pPlayer->GetTeam() == HORDE) || pInstance->GetData(TYPE_CHESS) == SPECIAL) pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_ORC_GRUNT, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); } @@ -1218,7 +1268,7 @@ bool GossipHello_npc_water_elemental(Player* pPlayer, Creature* pCreature) if (ScriptedInstance* pInstance = (ScriptedInstance*)pCreature->GetInstanceData()) { - if (pInstance->GetData(TYPE_CHESS) == IN_PROGRESS && pPlayer->GetTeam() == ALLIANCE) + if ((pInstance->GetData(TYPE_CHESS) == IN_PROGRESS && pPlayer->GetTeam() == ALLIANCE) || pInstance->GetData(TYPE_CHESS) == SPECIAL) pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_WATER_ELEMENTAL, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); } @@ -1294,7 +1344,7 @@ bool GossipHello_npc_summoned_daemon(Player* pPlayer, Creature* pCreature) if (ScriptedInstance* pInstance = (ScriptedInstance*)pCreature->GetInstanceData()) { - if (pInstance->GetData(TYPE_CHESS) == IN_PROGRESS && pPlayer->GetTeam() == HORDE) + if ((pInstance->GetData(TYPE_CHESS) == IN_PROGRESS && pPlayer->GetTeam() == HORDE) || pInstance->GetData(TYPE_CHESS) == SPECIAL) pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_SUMMONED_DEAMON, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); } @@ -1370,7 +1420,7 @@ bool GossipHello_npc_human_charger(Player* pPlayer, Creature* pCreature) if (ScriptedInstance* pInstance = (ScriptedInstance*)pCreature->GetInstanceData()) { - if (pInstance->GetData(TYPE_CHESS) == IN_PROGRESS && pPlayer->GetTeam() == ALLIANCE) + if ((pInstance->GetData(TYPE_CHESS) == IN_PROGRESS && pPlayer->GetTeam() == ALLIANCE) || pInstance->GetData(TYPE_CHESS) == SPECIAL) pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_HUMAN_CHARGER, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); } @@ -1446,7 +1496,7 @@ bool GossipHello_npc_orc_wolf(Player* pPlayer, Creature* pCreature) if (ScriptedInstance* pInstance = (ScriptedInstance*)pCreature->GetInstanceData()) { - if (pInstance->GetData(TYPE_CHESS) == IN_PROGRESS && pPlayer->GetTeam() == HORDE) + if ((pInstance->GetData(TYPE_CHESS) == IN_PROGRESS && pPlayer->GetTeam() == HORDE) || pInstance->GetData(TYPE_CHESS) == SPECIAL) pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_ORC_WOLF, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); } @@ -1522,7 +1572,7 @@ bool GossipHello_npc_human_cleric(Player* pPlayer, Creature* pCreature) if (ScriptedInstance* pInstance = (ScriptedInstance*)pCreature->GetInstanceData()) { - if (pInstance->GetData(TYPE_CHESS) == IN_PROGRESS && pPlayer->GetTeam() == ALLIANCE) + if ((pInstance->GetData(TYPE_CHESS) == IN_PROGRESS && pPlayer->GetTeam() == ALLIANCE) || pInstance->GetData(TYPE_CHESS) == SPECIAL) pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_HUMAN_CLERIC, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); } @@ -1598,7 +1648,7 @@ bool GossipHello_npc_orc_necrolyte(Player* pPlayer, Creature* pCreature) if (ScriptedInstance* pInstance = (ScriptedInstance*)pCreature->GetInstanceData()) { - if (pInstance->GetData(TYPE_CHESS) == IN_PROGRESS && pPlayer->GetTeam() == HORDE) + if ((pInstance->GetData(TYPE_CHESS) == IN_PROGRESS && pPlayer->GetTeam() == HORDE) || pInstance->GetData(TYPE_CHESS) == SPECIAL) pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_ORC_NECROLYTE, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); } @@ -1613,6 +1663,8 @@ void AddSC_chess_event() pNewScript = new Script; pNewScript->Name = "npc_echo_of_medivh"; pNewScript->GetAI = GetAI_npc_echo_of_medivh; + pNewScript->pGossipHello = GossipHello_npc_echo_of_medivh; + pNewScript->pGossipSelect = GossipSelect_npc_echo_of_medivh; pNewScript->RegisterSelf(); pNewScript = new Script; diff --git a/scripts/eastern_kingdoms/karazhan/instance_karazhan.cpp b/scripts/eastern_kingdoms/karazhan/instance_karazhan.cpp index c312fbae3..4bb2eafb2 100644 --- a/scripts/eastern_kingdoms/karazhan/instance_karazhan.cpp +++ b/scripts/eastern_kingdoms/karazhan/instance_karazhan.cpp @@ -44,7 +44,8 @@ instance_karazhan::instance_karazhan(Map* pMap) : ScriptedInstance(pMap), m_uiTeam(0), m_uiChessResetTimer(0), m_uiAllianceStalkerCount(0), - m_uiHordeStalkerCount(0) + m_uiHordeStalkerCount(0), + m_bFriendlyGame(false) { Initialize(); } @@ -241,15 +242,20 @@ void instance_karazhan::SetData(uint32 uiType, uint32 uiData) case TYPE_CHESS: if (uiData == DONE) { - DoUseDoorOrButton(GO_GAMESMANS_HALL_EXIT_DOOR); - DoRespawnGameObject(GO_DUST_COVERED_CHEST, DAY); - DoToggleGameObjectFlags(GO_DUST_COVERED_CHEST, GO_FLAG_NO_INTERACT, false); + // doors and loot are not handled for friendly games + if (GetData(TYPE_CHESS) != SPECIAL) + { + DoUseDoorOrButton(GO_GAMESMANS_HALL_EXIT_DOOR); + DoRespawnGameObject(GO_DUST_COVERED_CHEST, DAY); + DoToggleGameObjectFlags(GO_DUST_COVERED_CHEST, GO_FLAG_NO_INTERACT, false); + } // cast game end spells if (Creature* pMedivh = GetSingleCreatureFromStorage(NPC_ECHO_MEDIVH)) { pMedivh->CastSpell(pMedivh, SPELL_FORCE_KILL_BUNNY, true); pMedivh->CastSpell(pMedivh, SPELL_GAME_OVER, true); + pMedivh->CastSpell(pMedivh, SPELL_CLEAR_BOARD, true); } if (Creature* pController = GetSingleCreatureFromStorage(NPC_CHESS_VICTORY_CONTROLLER)) pController->CastSpell(pController, SPELL_VICTORY_VISUAL, true); @@ -262,9 +268,10 @@ void instance_karazhan::SetData(uint32 uiType, uint32 uiData) pPlayer->RemoveAurasDueToSpell(SPELL_GAME_IN_SESSION); } - // ToDo: reset board for friendly game! + m_bFriendlyGame = false; + m_uiChessResetTimer = 35000; } - else if (uiData == NOT_STARTED) + else if (uiData == FAIL) { // clean the board for reset if (Creature* pMedivh = GetSingleCreatureFromStorage(NPC_ECHO_MEDIVH)) @@ -283,7 +290,7 @@ void instance_karazhan::SetData(uint32 uiType, uint32 uiData) m_uiChessResetTimer = 35000; } - else if (uiData == IN_PROGRESS) + else if (uiData == IN_PROGRESS || uiData == SPECIAL) DoPrepareChessEvent(); m_auiEncounter[uiType] = uiData; break; @@ -583,6 +590,11 @@ void instance_karazhan::Update(uint32 uiDiff) } } + if (GetData(TYPE_CHESS) == FAIL) + SetData(TYPE_CHESS, NOT_STARTED); + else if (GetData(TYPE_CHESS) == DONE) + m_bFriendlyGame = true; + m_uiChessResetTimer = 0; } else diff --git a/scripts/eastern_kingdoms/karazhan/karazhan.h b/scripts/eastern_kingdoms/karazhan/karazhan.h index 249a531c6..84d0f2908 100644 --- a/scripts/eastern_kingdoms/karazhan/karazhan.h +++ b/scripts/eastern_kingdoms/karazhan/karazhan.h @@ -158,6 +158,7 @@ class MANGOS_DLL_DECL instance_karazhan : public ScriptedInstance void DoPrepareOperaStage(Creature* pOrganizer); uint32 GetPlayerTeam() { return m_uiTeam; } + bool IsFriendlyGameReady() { return m_bFriendlyGame; } void DoMoveChessPieceToSides(uint32 uiSpellId, uint32 uiFaction, bool bGameEnd = false); void GetChessPiecesByFaction(GuidList& lList, uint32 uiFaction) { lList = uiFaction == FACTION_ID_CHESS_ALLIANCE ? m_lChessPiecesAlliance : m_lChessPiecesHorde; } @@ -182,6 +183,8 @@ class MANGOS_DLL_DECL instance_karazhan : public ScriptedInstance uint8 m_uiAllianceStalkerCount; uint8 m_uiHordeStalkerCount; + bool m_bFriendlyGame; + ObjectGuid m_HordeStatusGuid; ObjectGuid m_AllianceStatusGuid; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 55d2b8c0b..e15160d81 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2913" + #define SD2_REVISION_NR "2914" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 904821f7f..efd4fde34 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -4612,7 +4612,8 @@ INSERT INTO gossip_texts (entry,content_default,comment) VALUES (-3532014,'Control Conjured Water Elemental','conjured water elemental GOSSIP_ITEM_WATER_ELEMENTAL'), (-3532015,'Control Human Conjurer','human conjurer GOSSIP_ITEM_HUMAN_CONJURER'), (-3532016,'Control Human Cleric','human cleric GOSSIP_ITEM_HUMAN_CLERIC'), -(-3532017,'Control King Llane','king llane GOSSIP_ITEM_KING_LLANE'); +(-3532017,'Control King Llane','king llane GOSSIP_ITEM_KING_LLANE'), +(-3532018,'Please reset the chess board, we would like to play again.','medivh GOSSIP_ITEM_RESET_BOARD'); -- -3 534 000 THE BATTLE OF MT. HYJAL INSERT INTO gossip_texts (entry,content_default,comment) VALUES diff --git a/sql/updates/r2914_scriptdev2.sql b/sql/updates/r2914_scriptdev2.sql new file mode 100644 index 000000000..bdc36b3a4 --- /dev/null +++ b/sql/updates/r2914_scriptdev2.sql @@ -0,0 +1,3 @@ +DELETE FROM gossip_texts WHERE entry=-3532018; +INSERT INTO gossip_texts (entry,content_default,comment) VALUES +(-3532018,'Please reset the chess board, we would like to play again.','medivh GOSSIP_ITEM_RESET_BOARD'); From f57801793ad7aa401d6cef42690d9a0132e1c512 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Wed, 4 Sep 2013 20:10:00 +0300 Subject: [PATCH 0923/1172] [2915] Add script support for quest 660 Thanks to grz3s for providing the necessary data --- scripts/eastern_kingdoms/arathi_highlands.cpp | 128 +++++++++++++++++- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 + sql/scriptdev2_script_full.sql | 51 ++++++- sql/updates/r2915_mangos.sql | 1 + sql/updates/r2915_scriptdev2.sql | 50 +++++++ 6 files changed, 230 insertions(+), 3 deletions(-) create mode 100644 sql/updates/r2915_mangos.sql create mode 100644 sql/updates/r2915_scriptdev2.sql diff --git a/scripts/eastern_kingdoms/arathi_highlands.cpp b/scripts/eastern_kingdoms/arathi_highlands.cpp index bfd5df44f..16194cd08 100644 --- a/scripts/eastern_kingdoms/arathi_highlands.cpp +++ b/scripts/eastern_kingdoms/arathi_highlands.cpp @@ -17,12 +17,13 @@ /* ScriptData SDName: Arathi Highlands SD%Complete: 100 -SDComment: Quest support: 665 +SDComment: Quest support: 660, 665 SDCategory: Arathi Highlands EndScriptData */ /* ContentData npc_professor_phizzlethorpe +npc_kinelory EndContentData */ #include "precompiled.h" @@ -114,6 +115,125 @@ CreatureAI* GetAI_npc_professor_phizzlethorpe(Creature* pCreature) return new npc_professor_phizzlethorpeAI(pCreature); } +/*###### +## npc_kinelory +######*/ + +enum +{ + SAY_START = -1000948, + SAY_REACH_BOTTOM = -1000949, + SAY_AGGRO_KINELORY = -1000950, + SAY_AGGRO_JORELL = -1000951, + SAY_WATCH_BACK = -1000952, + EMOTE_BELONGINGS = -1000953, + SAY_DATA_FOUND = -1000954, + SAY_ESCAPE = -1000955, + SAY_FINISH = -1000956, + EMOTE_HAND_PACK = -1000957, + + // ToDo: find the healing spell id! + SPELL_BEAR_FORM = 4948, + + NPC_JORELL = 2733, + NPC_QUAE = 2712, + + QUEST_HINTS_NEW_PLAGUE = 660 +}; + +struct MANGOS_DLL_DECL npc_kineloryAI : public npc_escortAI +{ + npc_kineloryAI(Creature* pCreature) : npc_escortAI(pCreature) { Reset(); } + + uint32 m_uiBearFormTimer; + + void Reset() override + { + m_uiBearFormTimer = urand(1000, 5000); + } + + void WaypointReached(uint32 uiPointId) override + { + switch (uiPointId) + { + case 9: + DoScriptText(SAY_REACH_BOTTOM, m_creature); + break; + case 16: + DoScriptText(SAY_WATCH_BACK, m_creature); + DoScriptText(EMOTE_BELONGINGS, m_creature); + break; + case 17: + DoScriptText(SAY_DATA_FOUND, m_creature); + break; + case 18: + DoScriptText(SAY_ESCAPE, m_creature); + if (Player* pPlayer = GetPlayerForEscort()) + m_creature->SetFacingToObject(pPlayer); + SetRun(); + break; + case 33: + DoScriptText(SAY_FINISH, m_creature); + if (Creature* pQuae = GetClosestCreatureWithEntry(m_creature, NPC_QUAE, 10.0f)) + { + DoScriptText(EMOTE_HAND_PACK, m_creature, pQuae); + m_creature->SetFacingToObject(pQuae); + } + break; + case 34: + if (Player* pPlayer = GetPlayerForEscort()) + pPlayer->GroupEventHappens(QUEST_HINTS_NEW_PLAGUE, m_creature); + break; + } + } + + void Aggro(Unit* pWho) override + { + if (pWho->GetEntry() == NPC_JORELL) + DoScriptText(SAY_AGGRO_JORELL, pWho, m_creature); + else if (roll_chance_i(10)) + DoScriptText(SAY_AGGRO_KINELORY, m_creature); + } + + void ReceiveAIEvent(AIEventType eventType, Creature* /*pSender*/, Unit* pInvoker, uint32 uiMiscValue) override + { + if (eventType == AI_EVENT_START_ESCORT && pInvoker->GetTypeId() == TYPEID_PLAYER) + { + DoScriptText(SAY_START, m_creature); + Start(false, (Player*)pInvoker, GetQuestTemplateStore(uiMiscValue), true); + } + } + + void UpdateEscortAI(const uint32 uiDiff) override + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_uiBearFormTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_BEAR_FORM) == CAST_OK) + m_uiBearFormTimer = urand(25000, 30000); + } + else + m_uiBearFormTimer -= uiDiff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_npc_kinelory(Creature* pCreature) +{ + return new npc_kineloryAI(pCreature); +} + +bool QuestAccept_npc_kinelory(Player* pPlayer, Creature* pCreature, const Quest* pQuest) +{ + if (pQuest->GetQuestId() == QUEST_HINTS_NEW_PLAGUE) + pCreature->AI()->SendAIEvent(AI_EVENT_START_ESCORT, pPlayer, pCreature, pQuest->GetQuestId()); + + return true; +} + void AddSC_arathi_highlands() { Script* pNewScript; @@ -123,4 +243,10 @@ void AddSC_arathi_highlands() pNewScript->GetAI = &GetAI_npc_professor_phizzlethorpe; pNewScript->pQuestAcceptNPC = &QuestAccept_npc_professor_phizzlethorpe; pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_kinelory"; + pNewScript->GetAI = &GetAI_npc_kinelory; + pNewScript->pQuestAcceptNPC = &QuestAccept_npc_kinelory; + pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index e15160d81..251f38c2d 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2914" + #define SD2_REVISION_NR "2915" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 5d915b319..4f6cbd438 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -188,6 +188,7 @@ INSERT INTO world_template VALUES /* ARATHI HIGHLANDS */ UPDATE creature_template SET ScriptName='npc_professor_phizzlethorpe' WHERE entry=2768; +UPDATE creature_template SET ScriptName='npc_kinelory' WHERE entry=2713; /* ASHENVALE */ UPDATE creature_template SET ScriptName='npc_muglash' WHERE entry=12717; diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index efd4fde34..8e5377635 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -1020,7 +1020,18 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1000944,'They weaken us! Our strength is dilluted by their very existence! Destroy them all!',0,0,0,0,'king_ymiron_crowd SAY_YMIRON_CROWD_4'), (-1000945,'All hail our glorious king, Ymiron!',0,0,0,0,'king_ymiron_crowd SAY_YMIRON_CROWD_5'), (-1000946,'The King is going to speak!',0,0,0,0,'king_ymiron_crowd SAY_YMIRON_CROWD_6'), -(-1000947,'Let him speak! Be silent!',0,0,0,0,'king_ymiron_crowd SAY_YMIRON_CROWD_7'); +(-1000947,'Let him speak! Be silent!',0,0,0,0,'king_ymiron_crowd SAY_YMIRON_CROWD_7'), + +(-1000948,'Well then, let\'s get this started. The longer we\'re here, the more damage the undead could be doing back in Hilsbrad.',0,0,0,0,'kinelory SAY_START'), +(-1000949,'All right, this is where we really have to be on our paws. Be ready!',0,0,0,0,'kinelory SAY_REACH_BOTTOM'), +(-1000950,'Attack me if you will, but you won\'t stop me from getting back to Quae.',0,0,0,0,'kinelory SAY_AGGRO_KINELORY'), +(-1000951,'You have my word that I shall find a use for your body after I\'ve killed you, Kinelory.',0,0,0,0,'jorell SAY_AGGRO_JORELL'), +(-1000952,'Watch my rear! I\'ll see what I can find in all this junk...',0,0,0,0,'kinelory SAY_WATCH_BACK'), +(-1000953,'%s begins rummaging through the apothecary\'s belongings.',0,2,0,0,'kinelory EMOTE_BELONGINGS'), +(-1000954,'I bet Quae\'ll think this is important. She\'s pretty knowledgeable about these things--no expert, but knowledgable.',0,0,0,0,'kinelory SAY_DATA_FOUND'), +(-1000955,'Okay, let\'s get out of here quick quick! Try and keep up. I\'m going to make a break for it.',0,0,0,0,'kinelory SAY_ESCAPE'), +(-1000956,'We made it! Quae, we made it!',0,0,0,0,'kinelory SAY_FINISH'), +(-1000957,'%s hands her pack to Quae.',0,2,0,0,'kinelory EMOTE_HAND_PACK'); -- -1 033 000 SHADOWFANG KEEP INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES @@ -7371,4 +7382,42 @@ INSERT INTO script_waypoint VALUES (17238, 40, 975.33, -1824.91, 81.24, 8000, 'SAY_EPILOGUE_2'), (17238, 41, 975.33, -1824.91, 81.24, 30000, ''); +DELETE FROM script_waypoint WHERE entry=2713; +INSERT INTO script_waypoint VALUES +(2713, 0, -1416.91, -3044.12, 36.21, 0, ''), +(2713, 1, -1408.43, -3051.35, 37.79, 0, ''), +(2713, 2, -1399.45, -3069.20, 31.25, 0, ''), +(2713, 3, -1400.28, -3083.14, 27.06, 0, ''), +(2713, 4, -1405.30, -3096.72, 26.36, 0, ''), +(2713, 5, -1406.12, -3105.95, 24.82, 0, ''), +(2713, 6, -1417.41, -3106.80, 16.61, 0, ''), +(2713, 7, -1433.06, -3101.55, 12.56, 0, ''), +(2713, 8, -1439.86, -3086.36, 12.29, 0, ''), +(2713, 9, -1450.48, -3065.16, 12.58, 5000, 'SAY_REACH_BOTTOM'), +(2713, 10, -1456.15, -3055.53, 12.54, 0, ''), +(2713, 11, -1459.41, -3035.16, 12.11, 0, ''), +(2713, 12, -1472.47, -3034.18, 12.44, 0, ''), +(2713, 13, -1495.57, -3034.48, 12.55, 0, ''), +(2713, 14, -1524.91, -3035.47, 13.15, 0, ''), +(2713, 15, -1549.05, -3037.77, 12.98, 0, ''), +(2713, 16, -1555.69, -3028.02, 13.64, 3000, 'SAY_WATCH_BACK'), +(2713, 17, -1555.69, -3028.02, 13.64, 5000, 'SAY_DATA_FOUND'), +(2713, 18, -1555.69, -3028.02, 13.64, 2000, 'SAY_ESCAPE'), +(2713, 19, -1551.19, -3037.78, 12.96, 0, ''), +(2713, 20, -1584.60, -3048.77, 13.67, 0, ''), +(2713, 21, -1602.14, -3042.82, 15.12, 0, ''), +(2713, 22, -1610.68, -3027.42, 17.22, 0, ''), +(2713, 23, -1601.65, -3007.97, 24.65, 0, ''), +(2713, 24, -1581.05, -2992.32, 30.85, 0, ''), +(2713, 25, -1559.95, -2979.51, 34.30, 0, ''), +(2713, 26, -1536.51, -2969.78, 32.64, 0, ''), +(2713, 27, -1511.81, -2961.09, 29.12, 0, ''), +(2713, 28, -1484.83, -2960.87, 32.54, 0, ''), +(2713, 29, -1458.23, -2966.80, 40.52 , 0, ''), +(2713, 30, -1440.20, -2971.20, 43.15, 0, ''), +(2713, 31, -1427.85, -2989.15, 38.09, 0, ''), +(2713, 32, -1420.27, -3008.91, 35.01, 0, ''), +(2713, 33, -1427.58, -3032.53, 32.31, 5000, 'SAY_FINISH'), +(2713, 34, -1427.40, -3035.17, 32.26, 0, ''); + -- EOF diff --git a/sql/updates/r2915_mangos.sql b/sql/updates/r2915_mangos.sql new file mode 100644 index 000000000..ee844e62f --- /dev/null +++ b/sql/updates/r2915_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_kinelory' WHERE entry=2713; diff --git a/sql/updates/r2915_scriptdev2.sql b/sql/updates/r2915_scriptdev2.sql new file mode 100644 index 000000000..ebc0528d8 --- /dev/null +++ b/sql/updates/r2915_scriptdev2.sql @@ -0,0 +1,50 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1000957 AND -1000948; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1000948,'Well then, let\'s get this started. The longer we\'re here, the more damage the undead could be doing back in Hilsbrad.',0,0,0,0,'kinelory SAY_START'), +(-1000949,'All right, this is where we really have to be on our paws. Be ready!',0,0,0,0,'kinelory SAY_REACH_BOTTOM'), +(-1000950,'Attack me if you will, but you won\'t stop me from getting back to Quae.',0,0,0,0,'kinelory SAY_AGGRO_KINELORY'), +(-1000951,'You have my word that I shall find a use for your body after I\'ve killed you, Kinelory.',0,0,0,0,'jorell SAY_AGGRO_JORELL'), +(-1000952,'Watch my rear! I\'ll see what I can find in all this junk...',0,0,0,0,'kinelory SAY_WATCH_BACK'), +(-1000953,'%s begins rummaging through the apothecary\'s belongings.',0,2,0,0,'kinelory EMOTE_BELONGINGS'), +(-1000954,'I bet Quae\'ll think this is important. She\'s pretty knowledgeable about these things--no expert, but knowledgable.',0,0,0,0,'kinelory SAY_DATA_FOUND'), +(-1000955,'Okay, let\'s get out of here quick quick! Try and keep up. I\'m going to make a break for it.',0,0,0,0,'kinelory SAY_ESCAPE'), +(-1000956,'We made it! Quae, we made it!',0,0,0,0,'kinelory SAY_FINISH'), +(-1000957,'%s hands her pack to Quae.',0,2,0,0,'kinelory EMOTE_HAND_PACK'); + +DELETE FROM script_waypoint WHERE entry=2713; +INSERT INTO script_waypoint VALUES +(2713, 0, -1416.91, -3044.12, 36.21, 0, ''), +(2713, 1, -1408.43, -3051.35, 37.79, 0, ''), +(2713, 2, -1399.45, -3069.20, 31.25, 0, ''), +(2713, 3, -1400.28, -3083.14, 27.06, 0, ''), +(2713, 4, -1405.30, -3096.72, 26.36, 0, ''), +(2713, 5, -1406.12, -3105.95, 24.82, 0, ''), +(2713, 6, -1417.41, -3106.80, 16.61, 0, ''), +(2713, 7, -1433.06, -3101.55, 12.56, 0, ''), +(2713, 8, -1439.86, -3086.36, 12.29, 0, ''), +(2713, 9, -1450.48, -3065.16, 12.58, 5000, 'SAY_REACH_BOTTOM'), +(2713, 10, -1456.15, -3055.53, 12.54, 0, ''), +(2713, 11, -1459.41, -3035.16, 12.11, 0, ''), +(2713, 12, -1472.47, -3034.18, 12.44, 0, ''), +(2713, 13, -1495.57, -3034.48, 12.55, 0, ''), +(2713, 14, -1524.91, -3035.47, 13.15, 0, ''), +(2713, 15, -1549.05, -3037.77, 12.98, 0, ''), +(2713, 16, -1555.69, -3028.02, 13.64, 3000, 'SAY_WATCH_BACK'), +(2713, 17, -1555.69, -3028.02, 13.64, 5000, 'SAY_DATA_FOUND'), +(2713, 18, -1555.69, -3028.02, 13.64, 2000, 'SAY_ESCAPE'), +(2713, 19, -1551.19, -3037.78, 12.96, 0, ''), +(2713, 20, -1584.60, -3048.77, 13.67, 0, ''), +(2713, 21, -1602.14, -3042.82, 15.12, 0, ''), +(2713, 22, -1610.68, -3027.42, 17.22, 0, ''), +(2713, 23, -1601.65, -3007.97, 24.65, 0, ''), +(2713, 24, -1581.05, -2992.32, 30.85, 0, ''), +(2713, 25, -1559.95, -2979.51, 34.30, 0, ''), +(2713, 26, -1536.51, -2969.78, 32.64, 0, ''), +(2713, 27, -1511.81, -2961.09, 29.12, 0, ''), +(2713, 28, -1484.83, -2960.87, 32.54, 0, ''), +(2713, 29, -1458.23, -2966.80, 40.52 , 0, ''), +(2713, 30, -1440.20, -2971.20, 43.15, 0, ''), +(2713, 31, -1427.85, -2989.15, 38.09, 0, ''), +(2713, 32, -1420.27, -3008.91, 35.01, 0, ''), +(2713, 33, -1427.58, -3032.53, 32.31, 5000, 'SAY_FINISH'), +(2713, 34, -1427.40, -3035.17, 32.26, 0, ''); From 885988ef452acb19c8c3c37aa25c3f5b1d6f6ae8 Mon Sep 17 00:00:00 2001 From: Morpho Date: Wed, 4 Sep 2013 17:41:18 +0200 Subject: [PATCH 0924/1172] [2916] Implement escort quests 1222 1270 Waypoints and texts are taken from ytdb. Thanks to them for initial problem research. Note: Be sure to remove dbscripts_on_quest_start for these quests, otherwise you might get unexpected behaviour Signed-off-by: Schmoozerd --- scripts/kalimdor/dustwallow_marsh.cpp | 106 +++++++++++++++++++++++++- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 + sql/scriptdev2_script_full.sql | 36 ++++++++- sql/updates/r2916_mangos.sql | 1 + sql/updates/r2916_scriptdev2.sql | 35 +++++++++ 6 files changed, 178 insertions(+), 3 deletions(-) create mode 100644 sql/updates/r2916_mangos.sql create mode 100644 sql/updates/r2916_scriptdev2.sql diff --git a/scripts/kalimdor/dustwallow_marsh.cpp b/scripts/kalimdor/dustwallow_marsh.cpp index 3be7acc20..c9f5b70a4 100644 --- a/scripts/kalimdor/dustwallow_marsh.cpp +++ b/scripts/kalimdor/dustwallow_marsh.cpp @@ -17,7 +17,7 @@ /* ScriptData SDName: Dustwallow_Marsh SD%Complete: 95 -SDComment: Quest support: 1173, 1273, 1324, 11209, 11180. +SDComment: Quest support: 1173, 1222, 1270, 1273, 1324, 11209, 11180. SDCategory: Dustwallow Marsh EndScriptData */ @@ -27,6 +27,8 @@ npc_restless_apparition npc_morokk npc_ogron npc_private_hendel +npc_stinky_ignatz +at_nats_landing EndContentData */ #include "precompiled.h" @@ -664,6 +666,102 @@ CreatureAI* GetAI_npc_private_hendel(Creature* pCreature) return new npc_private_hendelAI(pCreature); } +/*##### +## npc_stinky_ignatz +## TODO Note: Possible some dynamic behaviour is missing. Faction change is guessed +#####*/ + +enum +{ + QUEST_ID_STINKYS_ESCAPE_ALLIANCE = 1222, + QUEST_ID_STINKYS_ESCAPE_HORDE = 1270, + + SAY_STINKY_BEGIN = -1000958, + SAY_STINKY_FIRST_STOP = -1000959, + SAY_STINKY_2_MONSTERS = -1000960, + SAY_STINKY_GATHERING = -1000961, + SAY_STINKY_END = -1000962, + + GO_BOGBEAN_PLANT = 20939, +}; + +struct MANGOS_DLL_DECL npc_stinky_ignatzAI : public npc_escortAI +{ + npc_stinky_ignatzAI(Creature* pCreature) : npc_escortAI(pCreature) + { + Reset(); + } + + ObjectGuid m_bogbeanPlantGuid; + + void Reset() override {} + + void ReceiveAIEvent(AIEventType eventType, Creature* /*pSender*/, Unit* pInvoker, uint32 uiMiscValue) override + { + if (eventType == AI_EVENT_START_ESCORT && pInvoker->GetTypeId() == TYPEID_PLAYER) + { + DoScriptText(SAY_STINKY_BEGIN, m_creature); + Start(false, (Player*)pInvoker, GetQuestTemplateStore(uiMiscValue)); + m_creature->SetFactionTemporary(FACTION_ESCORT_N_NEUTRAL_PASSIVE, TEMPFACTION_RESTORE_RESPAWN); + m_creature->SetStandState(UNIT_STAND_STATE_STAND); + } + } + + void WaypointReached(uint32 uiPointId) override + { + switch (uiPointId) + { + case 11: + DoScriptText(SAY_STINKY_FIRST_STOP, m_creature); + break; + case 17: + // TODO Note: This text would imply some waiting till two mobs are killed, such behaviour is neither confirmed nor implemented. Input welcome! + DoScriptText(SAY_STINKY_2_MONSTERS, m_creature); + + if (GameObject* pBogbeanPlant = GetClosestGameObjectWithEntry(m_creature, GO_BOGBEAN_PLANT, DEFAULT_VISIBILITY_DISTANCE)) + { + m_bogbeanPlantGuid = pBogbeanPlant->GetObjectGuid(); + m_creature->SetFacingToObject(pBogbeanPlant); + } + + break; + case 19: + DoScriptText(SAY_STINKY_GATHERING, m_creature); + break; + case 24: + if (Player* pPlayer = GetPlayerForEscort()) + pPlayer->GroupEventHappens(pPlayer->GetTeam() == ALLIANCE ? QUEST_ID_STINKYS_ESCAPE_ALLIANCE : QUEST_ID_STINKYS_ESCAPE_HORDE, m_creature); + + DoScriptText(SAY_STINKY_END, m_creature); + break; + } + } + + void WaypointStart(uint32 uiPointId) + { + if (uiPointId == 20) + { + if (GameObject* pBogbeanPlant = m_creature->GetMap()->GetGameObject(m_bogbeanPlantGuid)) + pBogbeanPlant->Use(m_creature); + m_bogbeanPlantGuid.Clear(); + m_creature->HandleEmote(EMOTE_ONESHOT_NONE); + } + } +}; + +CreatureAI* GetAI_npc_stinky_ignatz(Creature* pCreature) +{ + return new npc_stinky_ignatzAI(pCreature); +} + +bool QuestAccept_npc_stinky_ignatz(Player* pPlayer, Creature* pCreature, const Quest* pQuest) +{ + if (pQuest->GetQuestId() == QUEST_ID_STINKYS_ESCAPE_ALLIANCE || pQuest->GetQuestId() == QUEST_ID_STINKYS_ESCAPE_HORDE) + pCreature->AI()->SendAIEvent(AI_EVENT_START_ESCORT, pPlayer, pCreature, pQuest->GetQuestId()); + + return true; +} + /*###### ## at_nats_landing ######*/ @@ -721,6 +819,12 @@ void AddSC_dustwallow_marsh() pNewScript->pQuestAcceptNPC = &QuestAccept_npc_private_hendel; pNewScript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "npc_stinky_ignatz"; + pNewScript->GetAI = &GetAI_npc_stinky_ignatz; + pNewScript->pQuestAcceptNPC = &QuestAccept_npc_stinky_ignatz; + pNewScript->RegisterSelf(); + pNewScript = new Script; pNewScript->Name = "at_nats_landing"; pNewScript->pAreaTrigger = &AreaTrigger_at_nats_landing; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 251f38c2d..927e948cf 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2915" + #define SD2_REVISION_NR "2916" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 4f6cbd438..f70c77dec 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -528,6 +528,7 @@ UPDATE creature_template SET ScriptName='npc_ogron' WHERE entry=4983; UPDATE creature_template SET ScriptName='npc_morokk' WHERE entry=4500; UPDATE creature_template SET ScriptName='npc_restless_apparition' WHERE entry=23861; UPDATE creature_template SET ScriptName='npc_private_hendel' WHERE entry=4966; +UPDATE creature_template SET ScriptName='npc_stinky_ignatz' WHERE entry=4880; DELETE FROM scripted_areatrigger WHERE entry=4752; INSERT INTO scripted_areatrigger VALUES (4752,'at_nats_landing'); diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 8e5377635..07da1a714 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -1031,7 +1031,13 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1000954,'I bet Quae\'ll think this is important. She\'s pretty knowledgeable about these things--no expert, but knowledgable.',0,0,0,0,'kinelory SAY_DATA_FOUND'), (-1000955,'Okay, let\'s get out of here quick quick! Try and keep up. I\'m going to make a break for it.',0,0,0,0,'kinelory SAY_ESCAPE'), (-1000956,'We made it! Quae, we made it!',0,0,0,0,'kinelory SAY_FINISH'), -(-1000957,'%s hands her pack to Quae.',0,2,0,0,'kinelory EMOTE_HAND_PACK'); +(-1000957,'%s hands her pack to Quae.',0,2,0,0,'kinelory EMOTE_HAND_PACK'), + +(-1000958,'You must protect me from monsters, who are living in this forest!',0,0,0,0,'stinky ignatz SAY_STINKY_BEGIN'), +(-1000959,'This part of forest are very danger for us. We must be a careful!',0,0,0,0,'stinky ignatz SAY_STINKY_FIRST_STOP'), +(-1000960,'Kill two monsters, who stay near Bogbean plant and then I gather a bogbean.',0,0,0,0,'stinky ignatz SAY_STINKY_2_MONSTERS'), +(-1000961,'I am gathering a bogbean. It takes some time.',0,0,0,69,'stinky ignatz SAY_STINKY_GATHERING'), +(-1000962,'Thanks you for help.',0,0,0,0,'stinky ignatz SAY_STINKY_END'); -- -1 033 000 SHADOWFANG KEEP INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES @@ -7420,4 +7426,32 @@ INSERT INTO script_waypoint VALUES (2713, 33, -1427.58, -3032.53, 32.31, 5000, 'SAY_FINISH'), (2713, 34, -1427.40, -3035.17, 32.26, 0, ''); +DELETE FROM script_waypoint WHERE entry=4880; +INSERT INTO script_waypoint VALUES +(4880, 0, -2674.53, -3440.48, 33.686, 0, ''), +(4880, 1, -2711.17, -3435.06, 33.1926, 0, ''), +(4880, 2, -2734.04, -3456.12, 33.2254, 0, ''), +(4880, 3, -2749.64, -3457.26, 32.8249, 0, ''), +(4880, 4, -2762.25, -3457.77, 30.6813, 0, ''), +(4880, 5, -2777.0, -3456.12, 30.2484, 0, ''), +(4880, 6, -2805.49, -3450.27, 29.0624, 0, ''), +(4880, 7, -2809.77, -3447.14, 30.0948, 0, ''), +(4880, 8, -2824, -3440.62, 33.405, 0, ''), +(4880, 9, -2840.2, -3439.02, 34.1008, 0, ''), +(4880, 10, -2878.49, -3482.81, 34.362, 0, ''), +(4880, 11, -2878.35, -3511.51, 34.4826, 0, 'SAY_STINKY_FIRST_STOP'), +(4880, 12, -2873.99, -3514.84, 34.5298, 0, ''), +(4880, 13, -2866.71, -3519.06, 36.3674, 0, ''), +(4880, 14, -2850.75, -3539.38, 36.4573, 0, ''), +(4880, 15, -2844.49, -3557.7, 35.5588, 0, ''), +(4880, 16, -2841.36, -3574.59, 35.5056, 0, ''), +(4880, 17, -2841.13, -3596.95, 36.7699, 30000, 'SAY_STINKY_2_MONSTERS'), +(4880, 18, -2828.83, -3597.3, 31.2891, 0, ''), +(4880, 19, -2822.13, -3596.33, 31.2684, 5000, 'SAY_STINKY_GATHERING'), +(4880, 20, -2829.08, -3597.82, 31.307, 0, ''), +(4880, 21, -2859.28, -3602.33, 42.298, 0, ''), +(4880, 22, -2881.64, -3601.28, 42.2111, 0, ''), +(4880, 23, -2904.04, -3601.35, 34.969, 0, ''), +(4880, 24, -2907.6, -3612.73, 34.2434, 10000, 'SAY_STINKY_END'); + -- EOF diff --git a/sql/updates/r2916_mangos.sql b/sql/updates/r2916_mangos.sql new file mode 100644 index 000000000..2b44a6e3c --- /dev/null +++ b/sql/updates/r2916_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_stinky_ignatz' WHERE entry=4880; diff --git a/sql/updates/r2916_scriptdev2.sql b/sql/updates/r2916_scriptdev2.sql new file mode 100644 index 000000000..05044e053 --- /dev/null +++ b/sql/updates/r2916_scriptdev2.sql @@ -0,0 +1,35 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1000962 AND -1000958; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1000958,'You must protect me from monsters, who are living in this forest!',0,0,0,0,'stinky ignatz SAY_STINKY_BEGIN'), +(-1000959,'This part of forest are very danger for us. We must be a careful!',0,0,0,0,'stinky ignatz SAY_STINKY_FIRST_STOP'), +(-1000960,'Kill two monsters, who stay near Bogbean plant and then I gather a bogbean.',0,0,0,0,'stinky ignatz SAY_STINKY_2_MONSTERS'), +(-1000961,'I am gathering a bogbean. It takes some time.',0,0,0,69,'stinky ignatz SAY_STINKY_GATHERING'), +(-1000962,'Thanks you for help.',0,0,0,0,'stinky ignatz SAY_STINKY_END'); + +DELETE FROM script_waypoint WHERE entry=4880; +INSERT INTO script_waypoint VALUES +(4880, 0, -2674.53, -3440.48, 33.686, 0, ''), +(4880, 1, -2711.17, -3435.06, 33.1926, 0, ''), +(4880, 2, -2734.04, -3456.12, 33.2254, 0, ''), +(4880, 3, -2749.64, -3457.26, 32.8249, 0, ''), +(4880, 4, -2762.25, -3457.77, 30.6813, 0, ''), +(4880, 5, -2777.0, -3456.12, 30.2484, 0, ''), +(4880, 6, -2805.49, -3450.27, 29.0624, 0, ''), +(4880, 7, -2809.77, -3447.14, 30.0948, 0, ''), +(4880, 8, -2824, -3440.62, 33.405, 0, ''), +(4880, 9, -2840.2, -3439.02, 34.1008, 0, ''), +(4880, 10, -2878.49, -3482.81, 34.362, 0, ''), +(4880, 11, -2878.35, -3511.51, 34.4826, 0, 'SAY_STINKY_FIRST_STOP'), +(4880, 12, -2873.99, -3514.84, 34.5298, 0, ''), +(4880, 13, -2866.71, -3519.06, 36.3674, 0, ''), +(4880, 14, -2850.75, -3539.38, 36.4573, 0, ''), +(4880, 15, -2844.49, -3557.7, 35.5588, 0, ''), +(4880, 16, -2841.36, -3574.59, 35.5056, 0, ''), +(4880, 17, -2841.13, -3596.95, 36.7699, 30000, 'SAY_STINKY_2_MONSTERS'), +(4880, 18, -2828.83, -3597.3, 31.2891, 0, ''), +(4880, 19, -2822.13, -3596.33, 31.2684, 5000, 'SAY_STINKY_GATHERING'), +(4880, 20, -2829.08, -3597.82, 31.307, 0, ''), +(4880, 21, -2859.28, -3602.33, 42.298, 0, ''), +(4880, 22, -2881.64, -3601.28, 42.2111, 0, ''), +(4880, 23, -2904.04, -3601.35, 34.969, 0, ''), +(4880, 24, -2907.6, -3612.73, 34.2434, 10000, 'SAY_STINKY_END'); From 2e33a2035fa93d5b1c829a9fcb9939a6b95f8e62 Mon Sep 17 00:00:00 2001 From: DasBlub Date: Sat, 7 Sep 2013 02:12:10 +0200 Subject: [PATCH 0925/1172] The patch to MaNGOS is no longer required for CMake See commit note on MaNGOS commit [12544] --- docs/How_to_install.html | 2 +- docs/How_to_install.txt | 2 +- patches/MaNGOS-11167-ScriptDev2.patch | 22 ---------------------- 3 files changed, 2 insertions(+), 24 deletions(-) delete mode 100644 patches/MaNGOS-11167-ScriptDev2.patch diff --git a/docs/How_to_install.html b/docs/How_to_install.html index 1526b4eb6..7fbdc4f81 100644 --- a/docs/How_to_install.html +++ b/docs/How_to_install.html @@ -751,7 +751,7 @@

1.2. Get the sources

MS Windows:
Compile ScriptDev2 using the scriptVC80, scriptVC90 or scriptVC100 Solution within the ScriptDev2 folder (this will overwrite the Mangoscript dll in the output directory)

GNU/Linux or CMake:
-Apply the Git patch to Mangos - git am src/bindings/ScriptDev2/patches/MaNGOS-11167-ScriptDev2.patch
+When running CMake on MaNGOS, make sure to set -D INCLUDE_BINDINGS_DIR=ScriptDev2
Compile MaNGOS (ScriptDev2 will automatically be built when compiling Mangos from here on)

diff --git a/docs/How_to_install.txt b/docs/How_to_install.txt index 54adc380b..4bb7211cf 100644 --- a/docs/How_to_install.txt +++ b/docs/How_to_install.txt @@ -18,7 +18,7 @@ Clone ScriptDev2 `git clone git://github.com/scriptdev2/scriptdev2.git ScriptDev Compile ScriptDev2 using the scriptVC80, scriptVC90 or scriptVC100 Solution within the ScriptDev2 folder (this will overwrite the Mangoscript dll in the output directory) *GNU/Linux or CMake:* + -Apply the Git patch to Mangos - `git am src/bindings/ScriptDev2/patches/MaNGOS-11167-ScriptDev2.patch` + +When running CMake on MaNGOS, make sure to set `-D INCLUDE_BINDINGS_DIR=ScriptDev2` Compile MaNGOS (ScriptDev2 will automatically be built when compiling Mangos from here on) diff --git a/patches/MaNGOS-11167-ScriptDev2.patch b/patches/MaNGOS-11167-ScriptDev2.patch deleted file mode 100644 index c0388de94..000000000 --- a/patches/MaNGOS-11167-ScriptDev2.patch +++ /dev/null @@ -1,22 +0,0 @@ -From bdaa99630113b7cb9d5e564a5777497d7530b490 Mon Sep 17 00:00:00 2001 -From: VladimirMangos -Date: Tue, 15 Feb 2011 02:15:26 +0100 -Subject: [PATCH] ScriptDev2 patch - ---- - src/bindings/CMakeLists.txt | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) - -diff --git a/src/bindings/CMakeLists.txt b/src/bindings/CMakeLists.txt -index fc13e3a..592d773 100644 ---- a/src/bindings/CMakeLists.txt -+++ b/src/bindings/CMakeLists.txt -@@ -16,4 +16,4 @@ - # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - # - --# add_subdirectory(universal) -+add_subdirectory(ScriptDev2) --- -1.7.3.1.msysgit.0 - From eded2bc896304f8242399480982aed454a359cfe Mon Sep 17 00:00:00 2001 From: cala Date: Fri, 12 Apr 2013 10:24:02 +0200 Subject: [PATCH 0926/1172] [2917] Add support for quest 2118 Original script by przemratajczak. Thanks to cala for porting Note that some spells and the proper GO handling is rather weak, but this might be a reasonable solution for all client versions Close scriptdev2/scriptdev2#56 Signed-off-by: Schmoozerd --- scripts/kalimdor/darkshore.cpp | 137 ++++++++++++++++++++++++++++++++- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 + sql/updates/r2917_mangos.sql | 1 + 4 files changed, 139 insertions(+), 2 deletions(-) create mode 100644 sql/updates/r2917_mangos.sql diff --git a/scripts/kalimdor/darkshore.cpp b/scripts/kalimdor/darkshore.cpp index 034b6ad31..9787e6847 100644 --- a/scripts/kalimdor/darkshore.cpp +++ b/scripts/kalimdor/darkshore.cpp @@ -17,7 +17,7 @@ /* ScriptData SDName: Darkshore SD%Complete: 100 -SDComment: Quest support: 731, 945, 994, 995, 2078, 5321 +SDComment: Quest support: 731, 945, 994, 995, 2078, 2118, 5321 SDCategory: Darkshore EndScriptData */ @@ -27,6 +27,7 @@ npc_prospector_remtravel npc_threshwackonator npc_volcor npc_therylune +npc_rabid_bear EndContentData */ #include "precompiled.h" @@ -603,6 +604,135 @@ bool QuestAccept_npc_therylune(Player* pPlayer, Creature* pCreature, const Quest return true; } +/*###### +## npc_rabid_bear +######*/ + +enum +{ + QUEST_PLAGUED_LANDS = 2118, + + NPC_CAPTURED_RABID_THISTLE_BEAR = 11836, + NPC_THARNARIUN_TREETENDER = 3701, // Npc related to quest-outro + GO_NIGHT_ELVEN_BEAR_TRAP = 111148, // This is actually the (visual) spell-focus GO + + SPELL_RABIES = 3150, // Spell used in comabt +}; + +struct MANGOS_DLL_DECL npc_rabid_bearAI : public ScriptedAI +{ + npc_rabid_bearAI(Creature* pCreature) : ScriptedAI(pCreature) + { + Reset(); + JustRespawned(); + } + + uint32 m_uiCheckTimer; + uint32 m_uiRabiesTimer; + uint32 m_uiDespawnTimer; + + void Reset() override + { + m_uiRabiesTimer = urand(12000, 18000); + } + + void JustRespawned() override + { + m_uiCheckTimer = 1000; + m_uiDespawnTimer = 0; + } + + void MoveInLineOfSight(Unit* pWho) override + { + if (!m_uiCheckTimer && pWho->GetTypeId() == TYPEID_UNIT && pWho->GetEntry() == NPC_THARNARIUN_TREETENDER && + pWho->IsWithinDist(m_creature, 2 * INTERACTION_DISTANCE, false)) + { + // Possible related spell: 9455 9372 + m_creature->ForcedDespawn(1000); + m_creature->GetMotionMaster()->MoveIdle(); + + return; + } + + ScriptedAI::MoveInLineOfSight(pWho); + } + + void UpdateAI(const uint32 uiDiff) override + { + if (m_uiCheckTimer && m_creature->isInCombat()) + { + if (m_uiCheckTimer <= uiDiff) + { + // Trap nearby? + if (GameObject* pTrap = GetClosestGameObjectWithEntry(m_creature, GO_NIGHT_ELVEN_BEAR_TRAP, 0.5f)) + { + // Despawn trap + pTrap->Use(m_creature); + // "Evade" + m_creature->RemoveAllAurasOnEvade(); + m_creature->DeleteThreatList(); + m_creature->CombatStop(true); + m_creature->SetLootRecipient(NULL); + Reset(); + // Update Entry and start following player + m_creature->UpdateEntry(NPC_CAPTURED_RABID_THISTLE_BEAR); + // get player + Unit* pTrapOwner = pTrap->GetOwner(); + if (pTrapOwner && pTrapOwner->GetTypeId() == TYPEID_PLAYER && + ((Player*)pTrapOwner)->GetQuestStatus(QUEST_PLAGUED_LANDS) == QUEST_STATUS_INCOMPLETE) + { + ((Player*)pTrapOwner)->KilledMonsterCredit(m_creature->GetEntry(), m_creature->GetObjectGuid()); + m_creature->GetMotionMaster()->MoveFollow(pTrapOwner, PET_FOLLOW_DIST, PET_FOLLOW_ANGLE); + } + else // Something unexpected happened + m_creature->ForcedDespawn(1000); + + // No need to check any more + m_uiCheckTimer = 0; + // Despawn after a while (delay guesswork) + m_uiDespawnTimer = 3 * MINUTE * IN_MILLISECONDS; + + return; + } + else + m_uiCheckTimer = 1000; + } + else + m_uiCheckTimer -= uiDiff; + } + + if (m_uiDespawnTimer && !m_creature->isInCombat()) + { + if (m_uiDespawnTimer <= uiDiff) + { + m_creature->ForcedDespawn(); + return; + } + else + m_uiDespawnTimer -= uiDiff; + } + + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_uiRabiesTimer < uiDiff) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_TOPAGGRO, 0, SPELL_RABIES)) + DoCastSpellIfCan(pTarget, SPELL_RABIES); + m_uiRabiesTimer = urand(12000, 18000); + } + else + m_uiRabiesTimer -= uiDiff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_npc_rabid_bear(Creature* pCreature) +{ + return new npc_rabid_bearAI(pCreature); +} + void AddSC_darkshore() { Script* pNewScript; @@ -637,4 +767,9 @@ void AddSC_darkshore() pNewScript->GetAI = &GetAI_npc_therylune; pNewScript->pQuestAcceptNPC = &QuestAccept_npc_therylune; pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_rabid_bear"; + pNewScript->GetAI = &GetAI_npc_rabid_bear; + pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 927e948cf..7b932d746 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2916" + #define SD2_REVISION_NR "2917" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index f70c77dec..f012745af 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -487,6 +487,7 @@ UPDATE creature_template SET ScriptName='npc_prospector_remtravel' WHERE entry=2 UPDATE creature_template SET ScriptName='npc_threshwackonator' WHERE entry=6669; UPDATE creature_template SET ScriptName='npc_volcor' WHERE entry=3692; UPDATE creature_template SET ScriptName='npc_therylune' WHERE entry=3584; +UPDATE creature_template SET ScriptName='npc_rabid_bear' WHERE entry=2164; /* DARNASSUS */ diff --git a/sql/updates/r2917_mangos.sql b/sql/updates/r2917_mangos.sql new file mode 100644 index 000000000..eabbbf8a7 --- /dev/null +++ b/sql/updates/r2917_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_rabid_bear' WHERE entry=2164; From c76dc7f8b91fbc69c30133ab7361c9d2e3354e39 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Sat, 7 Sep 2013 00:56:26 +0200 Subject: [PATCH 0927/1172] [2918] Implement basic follow-quest 2904 - A fine mess Close scriptdev2/acid/issues/9 --- .../gnomeregan/gnomeregan.cpp | 88 ++++++++++++++++++- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 + sql/updates/r2918_mangos.sql | 1 + 4 files changed, 89 insertions(+), 3 deletions(-) create mode 100644 sql/updates/r2918_mangos.sql diff --git a/scripts/eastern_kingdoms/gnomeregan/gnomeregan.cpp b/scripts/eastern_kingdoms/gnomeregan/gnomeregan.cpp index e05ff5dbb..8d209315c 100644 --- a/scripts/eastern_kingdoms/gnomeregan/gnomeregan.cpp +++ b/scripts/eastern_kingdoms/gnomeregan/gnomeregan.cpp @@ -16,18 +16,20 @@ /* ScriptData SDName: gnomeregan -SD%Complete: 100 -SDComment: Grubbis Encounter +SD%Complete: 90 +SDComment: Grubbis Encounter, quest 2904 (A fine mess) SDCategory: Gnomeregan EndScriptData */ /* ContentData npc_blastmaster_emi_shortfuse +npc_kernobee EndContentData */ #include "precompiled.h" #include "gnomeregan.h" #include "escort_ai.h" +#include "follower_ai.h" /*###### ## npc_blastmaster_emi_shortfuse @@ -625,6 +627,82 @@ bool GossipSelect_npc_blastmaster_emi_shortfuse(Player* pPlayer, Creature* pCrea return true; } +/*###### +## npc_kernobee +## TODO: It appears there are some things missing, including his? alarm-bot +######*/ + +enum +{ + QUEST_A_FINE_MESS = 2904, + TRIGGER_GNOME_EXIT = 324, // Add scriptlib support for it, atm simply use hardcoded values +}; + +static const float aKernobeePositions[2][3] = +{ + {-330.92f, -3.03f, -152.85f}, // End position + {-297.32f, -7.32f, -152.85f} // Walk out of the door +}; + +struct MANGOS_DLL_DECL npc_kernobeeAI : public FollowerAI +{ + npc_kernobeeAI(Creature* pCreature) : FollowerAI(pCreature) + { + m_uiCheckEndposTimer = 10000; + Reset(); + } + + uint32 m_uiCheckEndposTimer; + + void Reset() override {} + + void ReceiveAIEvent(AIEventType eventType, Creature* /*pSender*/, Unit* pInvoker, uint32 uiMiscValue) override + { + if (eventType == AI_EVENT_START_EVENT && pInvoker->GetTypeId() == TYPEID_PLAYER) + { + // No idea why he has UNIT_STAND_STATE_DEAD in UDB .. + m_creature->SetStandState(UNIT_STAND_STATE_STAND); + StartFollow((Player*)pInvoker, 0, GetQuestTemplateStore(uiMiscValue)); + } + } + + void UpdateFollowerAI(const uint32 uiDiff) + { + FollowerAI::UpdateFollowerAI(uiDiff); // Do combat handling + + if (m_creature->isInCombat() || !HasFollowState(STATE_FOLLOW_INPROGRESS) || HasFollowState(STATE_FOLLOW_COMPLETE)) + return; + + if (m_uiCheckEndposTimer < uiDiff) + { + m_uiCheckEndposTimer = 500; + if (m_creature->IsWithinDist3d(aKernobeePositions[0][0], aKernobeePositions[0][1], aKernobeePositions[0][2], 2 * INTERACTION_DISTANCE)) + { + SetFollowComplete(true); + if (Player* pPlayer = GetLeaderForFollower()) + pPlayer->GroupEventHappens(QUEST_A_FINE_MESS, m_creature); + m_creature->GetMotionMaster()->MovePoint(1, aKernobeePositions[1][0], aKernobeePositions[1][1], aKernobeePositions[1][2], false); + m_creature->ForcedDespawn(2000); + } + } + else + m_uiCheckEndposTimer -= uiDiff; + } +}; + +CreatureAI* GetAI_npc_kernobee(Creature* pCreature) +{ + return new npc_kernobeeAI(pCreature); +} + +bool QuestAccept_npc_kernobee(Player* pPlayer, Creature* pCreature, const Quest* pQuest) +{ + if (pQuest->GetQuestId() == QUEST_A_FINE_MESS) + pCreature->AI()->SendAIEvent(AI_EVENT_START_EVENT, pPlayer, pCreature, pQuest->GetQuestId()); + + return true; +} + void AddSC_gnomeregan() { Script* pNewScript; @@ -635,4 +713,10 @@ void AddSC_gnomeregan() pNewScript->pGossipHello = &GossipHello_npc_blastmaster_emi_shortfuse; pNewScript->pGossipSelect = &GossipSelect_npc_blastmaster_emi_shortfuse; pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_kernobee"; + pNewScript->GetAI = &GetAI_npc_kernobee; + pNewScript->pQuestAcceptNPC = &QuestAccept_npc_kernobee; + pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 7b932d746..518ad2cc1 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2917" + #define SD2_REVISION_NR "2918" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index f012745af..79c3d0b6c 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -579,6 +579,7 @@ UPDATE creature_template SET ScriptName='npc_ranger_lilatha' WHERE entry=16295; UPDATE creature_template SET ScriptName='boss_thermaplugg' WHERE entry=7800; UPDATE gameobject_template SET ScriptName='go_gnomeface_button' WHERE entry BETWEEN 142214 AND 142219; UPDATE creature_template SET ScriptName='npc_blastmaster_emi_shortfuse' WHERE entry=7998; +UPDATE creature_template SET ScriptName='npc_kernobee' WHERE entry=7850; UPDATE instance_template SET ScriptName='instance_gnomeregan' WHERE map=90; /* GRIZZLY HILLS */ diff --git a/sql/updates/r2918_mangos.sql b/sql/updates/r2918_mangos.sql new file mode 100644 index 000000000..847cd57cb --- /dev/null +++ b/sql/updates/r2918_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_kernobee' WHERE entry=7850; From eaa59b213f595889955f7a66c34ea072a10580ac Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Sun, 8 Sep 2013 13:39:49 +0200 Subject: [PATCH 0928/1172] [2919] Update to changes of cmangos [12536] --- ScriptMgr.cpp | 4 ++-- sd2_revision_nr.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ScriptMgr.cpp b/ScriptMgr.cpp index 1fb8a623d..b496a479d 100644 --- a/ScriptMgr.cpp +++ b/ScriptMgr.cpp @@ -365,7 +365,7 @@ uint32 GetNPCDialogStatus(Player* pPlayer, Creature* pCreature) Script* pTempScript = m_scripts[pCreature->GetScriptId()]; if (!pTempScript || !pTempScript->pDialogStatusNPC) - return 100; + return DIALOG_STATUS_UNDEFINED; pPlayer->PlayerTalkClass->ClearMenus(); @@ -378,7 +378,7 @@ uint32 GetGODialogStatus(Player* pPlayer, GameObject* pGo) Script* pTempScript = m_scripts[pGo->GetGOInfo()->ScriptId]; if (!pTempScript || !pTempScript->pDialogStatusGO) - return 100; + return DIALOG_STATUS_UNDEFINED; pPlayer->PlayerTalkClass->ClearMenus(); diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 518ad2cc1..25baf8e82 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2918" + #define SD2_REVISION_NR "2919" #endif // __SD2_REVISION_NR_H__ From 6f506730e865d2afe0f90bdb5bf11cc31d038873 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Wed, 11 Sep 2013 02:04:42 +0300 Subject: [PATCH 0929/1172] [2920] Implement Twilight Portals event in Obsidian Sanctum Please note that spells 57948 and 58853 are currently disabled and require additional core fixing --- .../obsidian_sanctum/boss_sartharion.cpp | 485 ++++++++++++------ .../instance_obsidian_sanctum.cpp | 3 + .../obsidian_sanctum/obsidian_sanctum.h | 21 + sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 4 +- sql/scriptdev2_script_full.sql | 10 +- sql/updates/r2920_mangos.sql | 3 + sql/updates/r2920_scriptdev2.sql | 1 + 8 files changed, 367 insertions(+), 162 deletions(-) create mode 100644 sql/updates/r2920_mangos.sql create mode 100644 sql/updates/r2920_scriptdev2.sql diff --git a/scripts/northrend/obsidian_sanctum/boss_sartharion.cpp b/scripts/northrend/obsidian_sanctum/boss_sartharion.cpp index 03fcdedf0..f52d5a5ef 100644 --- a/scripts/northrend/obsidian_sanctum/boss_sartharion.cpp +++ b/scripts/northrend/obsidian_sanctum/boss_sartharion.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: Boss Sartharion -SD%Complete: 80% -SDComment: Portal events need to be implemented +SD%Complete: 95% +SDComment: Portal event may be incomplete - additional reseach required. SDCategory: Obsidian Sanctum EndScriptData */ @@ -42,12 +42,11 @@ enum SAY_SARTHARION_SLAY_2 = -1615030, SAY_SARTHARION_SLAY_3 = -1615031, - WHISPER_LAVA_CHURN = -1615032, - - WHISPER_SHADRON_DICIPLE = -1615008, - WHISPER_VESPERON_DICIPLE = -1615041, - WHISPER_HATCH_EGGS = -1615017, - WHISPER_OPEN_PORTAL = -1615042, // whisper, shared by two dragons + EMOTE_LAVA_CHURN = -1615032, + EMOTE_SHADRON_DICIPLE = -1615008, + EMOTE_VESPERON_DICIPLE = -1615041, + EMOTE_HATCH_EGGS = -1615017, + EMOTE_OPEN_PORTAL = -1615042, // emote shared by two dragons // Sartharion Spells SPELL_BERSERK = 61632, // Increases the caster's attack speed by 150% and all damage it deals by 500% for 5 min. @@ -62,63 +61,73 @@ enum SPELL_PYROBUFFET = 56916, // currently used for hard enrage after 15 minutes SPELL_PYROBUFFET_RANGE = 58907, // possibly used when player get too far away from dummy creatures (2x creature entry 30494) - SPELL_TWILIGHT_SHIFT_ENTER = 57620, // enter phase. Player get this when click GO + // phase spells + // SPELL_TWILIGHT_SHIFT_ENTER = 57620, // enter phase. Player get this when click GO SPELL_TWILIGHT_SHIFT_REMOVAL = 61187, // leave phase SPELL_TWILIGHT_SHIFT_REMOVAL_ALL = 61190, // leave phase (probably version to make all leave) // Mini bosses common spells - SPELL_TWILIGHT_RESIDUE = 61885, // makes immune to shadow damage, applied when leave phase + // SPELL_TWILIGHT_RESIDUE = 61885, // makes immune to shadow damage, applied when leave phase (handled in core) // Miniboses (Vesperon, Shadron, Tenebron) SPELL_SHADOW_BREATH_H = 59126, // Inflicts 8788 to 10212 Fire damage to enemies in a cone in front of the caster. SPELL_SHADOW_BREATH = 57570, // Inflicts 6938 to 8062 Fire damage to enemies in a cone in front of the caster. - SPELL_SHADOW_FISSURE_H = 59127, // Deals 9488 to 13512 Shadow damage to any enemy within the Shadow fissure after 5 sec. SPELL_SHADOW_FISSURE = 57579, // Deals 6188 to 8812 Shadow damage to any enemy within the Shadow fissure after 5 sec. // Vesperon // In portal is a disciple, when disciple killed remove Power_of_vesperon, portal open multiple times - NPC_DISCIPLE_OF_VESPERON = 30858, // Disciple of Vesperon - NPC_ACOLYTE_OF_VESPERON = 31219, // Acolyte of Vesperon - summoned during Sartharion event SPELL_POWER_OF_VESPERON = 61251, // Vesperon's presence decreases the maximum health of all enemies by 25%. SPELL_TWILIGHT_TORMENT_VESP = 57948, // (Shadow only) trigger 57935 then 57988 SPELL_TWILIGHT_TORMENT_VESP_ACO = 58853, // (Fire and Shadow) trigger 58835 then 57988 + // Vesperon related npcs + NPC_DISCIPLE_OF_VESPERON = 30858, // Disciple of Vesperon + NPC_ACOLYTE_OF_VESPERON = 31219, // Acolyte of Vesperon - summoned during Sartharion event + // NPC_VESPERON_CONTROLLER = 30878, // not clear how to use this; used only to cast 61190 to eject players to normal realm + // NPC_VESPERON_CONTROLLER_DEBUFF_CLEAR = 32694, // not used + // Shadron // In portal is a disciple, when disciple killed remove Power_of_vesperon, portal open multiple times - NPC_DISCIPLE_OF_SHADRON = 30688, // Disciple of Shadron - NPC_ACOLYTE_OF_SHADRON = 31218, // Acolyte of Shadron - summoned during Sartharion event SPELL_POWER_OF_SHADRON = 58105, // Shadron's presence increases Fire damage taken by all enemies by 100%. SPELL_GIFT_OF_TWILIGTH_SHA = 57835, // TARGET_SCRIPT shadron SPELL_GIFT_OF_TWILIGTH_SAR = 58766, // TARGET_SCRIPT sartharion + // Shadron related npcs + NPC_DISCIPLE_OF_SHADRON = 30688, // Disciple of Shadron + NPC_ACOLYTE_OF_SHADRON = 31218, // Acolyte of Shadron - summoned during Sartharion event + // NPC_SHADRON_PORTAL = 30741, // not used + // NPC_SHADRON_PORTAL_VISUAL = 30650, // not used + // Tenebron // in the portal spawns 6 eggs, if not killed in time (approx. 20s) they will hatch, whelps can cast 60708 SPELL_POWER_OF_TENEBRON = 61248, // Tenebron's presence increases Shadow damage taken by all enemies by 100%. - // Tenebron, dummy spell - SPELL_SUMMON_TWILIGHT_WHELP = 58035, // doesn't work, will spawn NPC_TWILIGHT_WHELP - SPELL_SUMMON_SARTHARION_TWILIGHT_WHELP = 58826, // doesn't work, will spawn NPC_SHARTHARION_TWILIGHT_WHELP - - NPC_TWILIGHT_EGG = 30882, // Twilight Egg - summoned during Tenebron event - NPC_SARTHARION_TWILIGHT_EGG = 31204, // Twilight Egg - summoned during Sartharion event - NPC_TWILIGHT_EGG_CONTROLLER = 31138, + SPELL_HATCH_EGGS_MAIN = 58793, // Tenebron's hatch eggs spell - not used because core can't target other phase creatures + // other hatch eggs spells - currently it's unknown how to use them SPELL_HATCH_EGGS_H = 59189, SPELL_HATCH_EGGS = 58542, SPELL_HATCH_EGGS_EFFECT_H = 59190, SPELL_HATCH_EGGS_EFFECT = 58685, - // Whelps + // Tenebron related npcs + NPC_TWILIGHT_EGG = 30882, // Twilight Egg - summoned during Tenebron event + NPC_SARTHARION_TWILIGHT_EGG = 31204, // Twilight Egg - summoned during Sartharion event + NPC_TWILIGHT_EGG_CONTROLLER = 31138, // not clear how to use this; used only to eject players to normal realm + + // Twilight eggs spells + SPELL_SUMMON_TWILIGHT_WHELP = 58035, // will spawn 30890 + SPELL_SUMMON_SARTHARION_TWILIGHT_WHELP = 58826, // will spawn 31214 + NPC_TWILIGHT_WHELP = 30890, NPC_SHARTHARION_TWILIGHT_WHELP = 31214, - SPELL_FADE_ARMOR = 60708, // Reduces the armor of an enemy by 1500 for 15s - // flame tsunami + // Flame tsunami SPELL_FLAME_TSUNAMI = 57494, // the visual dummy // SPELL_FLAME_TSUNAMI_LEAP = 60241, // SPELL_EFFECT_138 some leap effect, causing caster to move in direction SPELL_FLAME_TSUNAMI_DMG_AURA = 57492, // periodic damage, npc has this aura - // fire cyclone + // Fire cyclone // SPELL_LAVA_STRIKE = 57578, // triggers 57571 then trigger visual missile, then summon Lava Blaze on impact(spell 57572) SPELL_LAVA_STRIKE_IMPACT = 57591, // SPELL_CYCLONE_AURA = 57560, // in creature_template_addon @@ -127,10 +136,9 @@ enum NPC_FLAME_TSUNAMI = 30616, // for the flame waves NPC_LAVA_BLAZE = 30643, // adds spawning from flame strike - NPC_VESPERON_CONTROLLER = 30878, - NPC_VESPERON_CONTROLLER_DEBUFF_CLEAR = 32694, - NPC_SHADRON_PORTAL = 30741, - NPC_SHADRON_PORTAL_VISUAL = 30650, + // other + MAX_TWILIGHT_EGGS = 6, + PHASEMASK_TWILIGHT_REALM = 16, // using these custom points for dragons start and end POINT_ID_INIT = 100, @@ -362,21 +370,7 @@ struct MANGOS_DLL_DECL boss_sartharionAI : public ScriptedAI void SendFlameTsunami() { - Map* pMap = m_creature->GetMap(); - - if (pMap && pMap->IsDungeon()) - { - Map::PlayerList const& PlayerList = pMap->GetPlayers(); - - if (!PlayerList.isEmpty()) - { - for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i) - { - if (i->getSource()->isAlive()) - DoScriptText(WHISPER_LAVA_CHURN, m_creature, i->getSource()); - } - } - } + DoScriptText(EMOTE_LAVA_CHURN, m_creature); uint8 uiTsunamiStartLoc = 0; uint8 uiTsunamiEndLoc = 3; @@ -573,29 +567,32 @@ struct MANGOS_DLL_DECL dummy_dragonAI : public ScriptedAI { dummy_dragonAI(Creature* pCreature) : ScriptedAI(pCreature) { - m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_pInstance = (instance_obsidian_sanctum*)pCreature->GetInstanceData(); m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); Reset(); } - ScriptedInstance* m_pInstance; + instance_obsidian_sanctum* m_pInstance; bool m_bIsRegularMode; + uint8 m_uiPortalId; uint32 m_uiWaypointId; uint32 m_uiMoveNextTimer; bool m_bCanMoveFree; - uint32 m_iPortalRespawnTime; + uint32 m_uiPortalRespawnTimer; uint32 m_uiShadowBreathTimer; uint32 m_uiShadowFissureTimer; + ObjectGuid m_portalOwnerGuid; + void Reset() override { m_uiWaypointId = 0; m_uiMoveNextTimer = 500; m_bCanMoveFree = false; - m_iPortalRespawnTime = 30000; + m_uiPortalRespawnTimer = 20000; m_uiShadowBreathTimer = 20000; m_uiShadowFissureTimer = 5000; } @@ -608,6 +605,24 @@ struct MANGOS_DLL_DECL dummy_dragonAI : public ScriptedAI // Despawn portal if (GameObject* pPortal = GetClosestGameObjectWithEntry(m_creature, GO_TWILIGHT_PORTAL, 50.0f)) pPortal->SetLootState(GO_JUST_DEACTIVATED); + + // reset portal events (in case some remain active); summons cleanup handled by creature linking + if (m_pInstance) + m_pInstance->SetPortalStatus(m_uiPortalId, false); + } + + void JustDied(Unit* /*pKiller*/) override + { + // despawn portal if Sartharion is not in combat + if (GameObject* pPortal = GetClosestGameObjectWithEntry(m_creature, GO_TWILIGHT_PORTAL, 50.0f)) + pPortal->SetLootState(GO_JUST_DEACTIVATED); + + // eject players and despawn portal owner + if (Creature* pTemp = m_creature->GetMap()->GetCreature(m_portalOwnerGuid)) + { + pTemp->CastSpell(pTemp, SPELL_TWILIGHT_SHIFT_REMOVAL_ALL, true); + pTemp->ForcedDespawn(1000); + } } void MovementInform(uint32 uiType, uint32 uiPointId) override @@ -648,55 +663,28 @@ struct MANGOS_DLL_DECL dummy_dragonAI : public ScriptedAI m_uiMoveNextTimer = 500; } - // used when open portal and spawn mobs in phase - void DoRaidWhisper(int32 iTextId) - { - Map* pMap = m_creature->GetMap(); - - if (pMap && pMap->IsDungeon()) - { - Map::PlayerList const& PlayerList = pMap->GetPlayers(); - - if (!PlayerList.isEmpty()) - { - for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i) - DoScriptText(iTextId, m_creature, i->getSource()); - } - } - } - //"opens" the portal and does the "opening" whisper void DoOpenPortal() { - int32 iTextId = 0; - // there are 4 portal spawn locations, each are expected to be spawned with negative spawntimesecs in database // using a grid search here seem to be more efficient than caching all four guids // in instance script and calculate range to each. GameObject* pPortal = GetClosestGameObjectWithEntry(m_creature, GO_TWILIGHT_PORTAL, 50.0f); - - switch (m_creature->GetEntry()) - { - case NPC_TENEBRON: - iTextId = WHISPER_HATCH_EGGS; - break; - case NPC_SHADRON: - case NPC_VESPERON: - iTextId = WHISPER_OPEN_PORTAL; - break; - } - - DoRaidWhisper(iTextId); + DoScriptText(EMOTE_OPEN_PORTAL, m_creature); // By using SetRespawnTime() we will actually "spawn" the object with our defined time. // Once time is up, portal will disappear again. if (pPortal && !pPortal->isSpawned()) { - pPortal->SetRespawnTime(m_iPortalRespawnTime); + pPortal->SetRespawnTime(HOUR * IN_MILLISECONDS); pPortal->Refresh(); } + // set portal status as active when Sartharion is in progress + if (m_pInstance && m_pInstance->GetData(TYPE_SARTHARION_EVENT) == IN_PROGRESS) + m_pInstance->SetPortalStatus(m_uiPortalId, true); + // Unclear what are expected to happen if one drake has a portal open already // Refresh respawnTime so time again are set to 30secs? } @@ -721,6 +709,21 @@ struct MANGOS_DLL_DECL dummy_dragonAI : public ScriptedAI } } + // Eject players from Twilight realm if no other portal event is active + void DoEjectTwilightPlayersIfCan(Creature* pCreature) + { + if (!m_pInstance || !pCreature) + return; + + if (m_pInstance->GetData(TYPE_SARTHARION_EVENT) != IN_PROGRESS || !m_pInstance->IsActivePortal()) + { + pCreature->CastSpell(pCreature, SPELL_TWILIGHT_SHIFT_REMOVAL_ALL, true); + + if (GameObject* pPortal = GetClosestGameObjectWithEntry(m_creature, GO_TWILIGHT_PORTAL, 50.0f)) + pPortal->SetLootState(GO_JUST_DEACTIVATED); + } + } + // Handle breath yell virtual void DoHandleBreathYell() { } @@ -751,16 +754,18 @@ struct MANGOS_DLL_DECL dummy_dragonAI : public ScriptedAI UpdateDragonAI(uiDiff); // respawn portal - if (m_iPortalRespawnTime) + if (m_uiPortalRespawnTimer < uiDiff) { - if (m_iPortalRespawnTime <= uiDiff) + if (m_pInstance && m_pInstance->IsActivePortal()) + m_uiPortalRespawnTimer = 10000; + else { + m_uiPortalRespawnTimer = 60000; DoOpenPortal(); - m_iPortalRespawnTime = 0; } - else - m_iPortalRespawnTime -= uiDiff; } + else + m_uiPortalRespawnTimer -= uiDiff; // shadow fissure if (m_uiShadowFissureTimer < uiDiff) @@ -796,13 +801,17 @@ struct MANGOS_DLL_DECL dummy_dragonAI : public ScriptedAI struct MANGOS_DLL_DECL mob_tenebronAI : public dummy_dragonAI { - mob_tenebronAI(Creature* pCreature) : dummy_dragonAI(pCreature) { Reset(); } + mob_tenebronAI(Creature* pCreature) : dummy_dragonAI(pCreature) + { + m_uiPortalId = TYPE_PORTAL_TENEBRON; + Reset(); + } - uint32 m_uiHatchEggTimer; + uint32 m_uiSpawnEggsTimer; void Reset() override { - m_uiHatchEggTimer = 30000; + m_uiSpawnEggsTimer = 20000; dummy_dragonAI::Reset(); } @@ -818,13 +827,38 @@ struct MANGOS_DLL_DECL mob_tenebronAI : public dummy_dragonAI DoScriptText(urand(0, 1) ? SAY_TENEBRON_SLAY_1 : SAY_TENEBRON_SLAY_2, m_creature); } - void JustDied(Unit* /*pKiller*/) override + void JustDied(Unit* pKiller) override { DoScriptText(SAY_TENEBRON_DEATH, m_creature); - // Cast Twilight Revent - script target on Sartharion - if (m_pInstance && m_pInstance->GetData(TYPE_SARTHARION_EVENT) == IN_PROGRESS) - DoCastSpellIfCan(m_creature, SPELL_TWILIGHT_REVENGE, CAST_TRIGGERED); + if (m_pInstance) + { + // Cast Twilight Revent - script target on Sartharion + if (m_pInstance->GetData(TYPE_SARTHARION_EVENT) == IN_PROGRESS) + DoCastSpellIfCan(m_creature, SPELL_TWILIGHT_REVENGE, CAST_TRIGGERED); + else + dummy_dragonAI::JustDied(pKiller); + } + } + + void JustSummoned(Creature* pSummoned) override + { + if (pSummoned->GetEntry() == NPC_TWILIGHT_EGG_CONTROLLER) + m_portalOwnerGuid = pSummoned->GetObjectGuid(); + + // update phasemask manually + pSummoned->SetPhaseMask(PHASEMASK_TWILIGHT_REALM, true); + } + + void ReceiveAIEvent(AIEventType eventType, Creature* /*pSender*/, Unit* pInvoker, uint32 /*uiMiscValue*/) override + { + if (eventType == AI_EVENT_CUSTOM_A && pInvoker->GetEntry() == NPC_TWILIGHT_EGG_CONTROLLER) + { + if (m_pInstance) + m_pInstance->SetPortalStatus(m_uiPortalId, false); + + DoEjectTwilightPlayersIfCan((Creature*)pInvoker); + } } void DoHandleBreathYell() @@ -834,13 +868,38 @@ struct MANGOS_DLL_DECL mob_tenebronAI : public dummy_dragonAI void UpdateDragonAI(const uint32 uiDiff) { - if (m_uiHatchEggTimer < uiDiff) + if (m_uiSpawnEggsTimer < uiDiff) { - // ToDo: - m_uiHatchEggTimer = 30000; + uint32 uiSpawnEntry = NPC_TWILIGHT_EGG; + if (m_pInstance) + { + if (m_pInstance->GetData(TYPE_SARTHARION_EVENT) == IN_PROGRESS) + uiSpawnEntry = NPC_SARTHARION_TWILIGHT_EGG; + } + + float fX, fY, fZ; + for (uint8 i = 0; i < MAX_TWILIGHT_EGGS; ++i) + { + m_creature->GetRandomPoint(m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), 20.0f, fX, fY, fZ); + m_creature->SummonCreature(uiSpawnEntry, fX, fY, fZ, 0, TEMPSUMMON_DEAD_DESPAWN, 0); + } + + // spawn the controller as well in order to eject players from twilight realm + m_creature->GetRandomPoint(m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), 20.0f, fX, fY, fZ); + m_creature->SummonCreature(NPC_TWILIGHT_EGG_CONTROLLER, fX, fY, fZ, 0, TEMPSUMMON_DEAD_DESPAWN, 0); + + // used only for visual - the result is handled by the Twilight eggs script + if (DoCastSpellIfCan(m_creature, SPELL_HATCH_EGGS_MAIN) == CAST_OK) + { + DoScriptText(EMOTE_HATCH_EGGS, m_creature); + if (urand(0, 1)) + DoScriptText(urand(0, 1) ? SAY_TENEBRON_SPECIAL_1 : SAY_TENEBRON_SPECIAL_2, m_creature); + } + + m_uiSpawnEggsTimer = 60000; } else - m_uiHatchEggTimer -= uiDiff; + m_uiSpawnEggsTimer -= uiDiff; } }; @@ -855,19 +914,17 @@ CreatureAI* GetAI_mob_tenebron(Creature* pCreature) struct MANGOS_DLL_DECL mob_shadronAI : public dummy_dragonAI { - mob_shadronAI(Creature* pCreature) : dummy_dragonAI(pCreature) { Reset(); } + mob_shadronAI(Creature* pCreature) : dummy_dragonAI(pCreature) + { + m_uiPortalId = TYPE_PORTAL_SHADRON; + Reset(); + } uint32 m_uiAcolyteShadronTimer; void Reset() override { - m_uiAcolyteShadronTimer = 60000; - - if (m_creature->HasAura(SPELL_TWILIGHT_TORMENT_VESP)) - m_creature->RemoveAurasDueToSpell(SPELL_TWILIGHT_TORMENT_VESP); - - if (m_creature->HasAura(SPELL_GIFT_OF_TWILIGTH_SHA)) - m_creature->RemoveAurasDueToSpell(SPELL_GIFT_OF_TWILIGTH_SHA); + m_uiAcolyteShadronTimer = 25000; dummy_dragonAI::Reset(); } @@ -883,26 +940,51 @@ struct MANGOS_DLL_DECL mob_shadronAI : public dummy_dragonAI DoScriptText(urand(0, 1) ? SAY_SHADRON_SLAY_1 : SAY_SHADRON_SLAY_2, m_creature); } - void JustDied(Unit* /*pKiller*/) override + void JustDied(Unit* pKiller) override { DoScriptText(SAY_SHADRON_DEATH, m_creature); - // Cast Twilight Revent - script target on Sartharion - if (m_pInstance && m_pInstance->GetData(TYPE_SARTHARION_EVENT) == IN_PROGRESS) - DoCastSpellIfCan(m_creature, SPELL_TWILIGHT_REVENGE, CAST_TRIGGERED); + if (m_pInstance) + { + // Cast Twilight Revent - script target on Sartharion + if (m_pInstance->GetData(TYPE_SARTHARION_EVENT) == IN_PROGRESS) + DoCastSpellIfCan(m_creature, SPELL_TWILIGHT_REVENGE, CAST_TRIGGERED); + else + dummy_dragonAI::JustDied(pKiller); + } } void JustSummoned(Creature* pSummoned) override { if (pSummoned->GetEntry() == NPC_DISCIPLE_OF_SHADRON) + { pSummoned->CastSpell(pSummoned, SPELL_GIFT_OF_TWILIGTH_SHA, true); + m_portalOwnerGuid = pSummoned->GetObjectGuid(); + } else if (pSummoned->GetEntry() == NPC_ACOLYTE_OF_SHADRON) pSummoned->CastSpell(pSummoned, SPELL_GIFT_OF_TWILIGTH_SAR, true); + + // update phasemask manually + pSummoned->SetPhaseMask(PHASEMASK_TWILIGHT_REALM, true); } void SummonedCreatureJustDied(Creature* pSummoned) override { - pSummoned->CastSpell(pSummoned, SPELL_TWILIGHT_SHIFT_REMOVAL_ALL, true); + if (m_pInstance) + { + m_pInstance->SetPortalStatus(m_uiPortalId, false); + + if (m_pInstance->GetData(TYPE_SARTHARION_EVENT) == IN_PROGRESS) + { + if (Creature* pSartharion = m_pInstance->GetSingleCreatureFromStorage(NPC_SARTHARION)) + pSartharion->RemoveAurasDueToSpell(SPELL_GIFT_OF_TWILIGTH_SAR); + } + else + m_creature->RemoveAurasDueToSpell(SPELL_GIFT_OF_TWILIGTH_SHA); + } + + DoEjectTwilightPlayersIfCan(pSummoned); + m_uiAcolyteShadronTimer = m_uiPortalRespawnTimer + 5000; } void DoHandleBreathYell() @@ -912,13 +994,30 @@ struct MANGOS_DLL_DECL mob_shadronAI : public dummy_dragonAI void UpdateDragonAI(const uint32 uiDiff) { - if (m_uiAcolyteShadronTimer < uiDiff) + if (m_uiAcolyteShadronTimer) { - // ToDo: - m_uiAcolyteShadronTimer = 60000; + if (m_uiAcolyteShadronTimer <= uiDiff) + { + DoScriptText(EMOTE_SHADRON_DICIPLE, m_creature); + if (urand(0, 1)) + DoScriptText(urand(0, 1) ? SAY_SHADRON_SPECIAL_1 : SAY_SHADRON_SPECIAL_2, m_creature); + + uint32 uiSpawnEntry = NPC_DISCIPLE_OF_SHADRON; + if (m_pInstance) + { + if (m_pInstance->GetData(TYPE_SARTHARION_EVENT) == IN_PROGRESS) + uiSpawnEntry = NPC_ACOLYTE_OF_SHADRON; + } + + float fX, fY, fZ; + m_creature->GetRandomPoint(m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), 20.0f, fX, fY, fZ); + m_creature->SummonCreature(uiSpawnEntry, fX, fY, fZ, 0, TEMPSUMMON_DEAD_DESPAWN, 0); + + m_uiAcolyteShadronTimer = 0; + } + else + m_uiAcolyteShadronTimer -= uiDiff; } - else - m_uiAcolyteShadronTimer -= uiDiff; } }; @@ -933,13 +1032,17 @@ CreatureAI* GetAI_mob_shadron(Creature* pCreature) struct MANGOS_DLL_DECL mob_vesperonAI : public dummy_dragonAI { - mob_vesperonAI(Creature* pCreature) : dummy_dragonAI(pCreature) { Reset(); } + mob_vesperonAI(Creature* pCreature) : dummy_dragonAI(pCreature) + { + m_uiPortalId = TYPE_PORTAL_VESPERON; + Reset(); + } uint32 m_uiAcolyteVesperonTimer; void Reset() override { - m_uiAcolyteVesperonTimer = 60000; + m_uiAcolyteVesperonTimer = 25000; dummy_dragonAI::Reset(); } @@ -955,27 +1058,43 @@ struct MANGOS_DLL_DECL mob_vesperonAI : public dummy_dragonAI DoScriptText(urand(0, 1) ? SAY_VESPERON_SLAY_1 : SAY_VESPERON_SLAY_2, m_creature); } - void JustDied(Unit* /*pKiller*/) override + void JustDied(Unit* pKiller) override { DoScriptText(SAY_VESPERON_DEATH, m_creature); - // Cast Twilight Revent - script target on Sartharion - if (m_pInstance && m_pInstance->GetData(TYPE_SARTHARION_EVENT) == IN_PROGRESS) - DoCastSpellIfCan(m_creature, SPELL_TWILIGHT_REVENGE, CAST_TRIGGERED); + if (m_pInstance) + { + // Cast Twilight Revent - script target on Sartharion + if (m_pInstance->GetData(TYPE_SARTHARION_EVENT) == IN_PROGRESS) + DoCastSpellIfCan(m_creature, SPELL_TWILIGHT_REVENGE, CAST_TRIGGERED); + else + dummy_dragonAI::JustDied(pKiller); + } } void JustSummoned(Creature* pSummoned) override { + // ToDo: these spells may break the encounter and make it unplayable. More research is required!!! if (pSummoned->GetEntry() == NPC_DISCIPLE_OF_VESPERON) - pSummoned->CastSpell(pSummoned, SPELL_TWILIGHT_TORMENT_VESP, true); - else if (pSummoned->GetEntry() == NPC_ACOLYTE_OF_VESPERON) - pSummoned->CastSpell(pSummoned, SPELL_TWILIGHT_TORMENT_VESP_ACO, true); + { + //pSummoned->CastSpell(pSummoned, SPELL_TWILIGHT_TORMENT_VESP, true); + m_portalOwnerGuid = pSummoned->GetObjectGuid(); + } + //else if (pSummoned->GetEntry() == NPC_ACOLYTE_OF_VESPERON) + // pSummoned->CastSpell(pSummoned, SPELL_TWILIGHT_TORMENT_VESP_ACO, true); + + // update phasemask manually + pSummoned->SetPhaseMask(PHASEMASK_TWILIGHT_REALM, true); } void SummonedCreatureJustDied(Creature* pSummoned) override { // ToDo: remove Twilight Torment debuff - pSummoned->CastSpell(pSummoned, SPELL_TWILIGHT_SHIFT_REMOVAL_ALL, true); + if (m_pInstance) + m_pInstance->SetPortalStatus(m_uiPortalId, false); + + DoEjectTwilightPlayersIfCan(pSummoned); + m_uiAcolyteVesperonTimer = m_uiPortalRespawnTimer + 5000; } void DoHandleBreathYell() @@ -985,13 +1104,30 @@ struct MANGOS_DLL_DECL mob_vesperonAI : public dummy_dragonAI void UpdateDragonAI(const uint32 uiDiff) { - if (m_uiAcolyteVesperonTimer < uiDiff) + if (m_uiAcolyteVesperonTimer) { - // ToDo: - m_uiAcolyteVesperonTimer = 60000; + if (m_uiAcolyteVesperonTimer <= uiDiff) + { + DoScriptText(EMOTE_VESPERON_DICIPLE, m_creature); + if (urand(0, 1)) + DoScriptText(urand(0, 1) ? SAY_VESPERON_SPECIAL_1 : SAY_VESPERON_SPECIAL_2, m_creature); + + uint32 uiSpawnEntry = NPC_DISCIPLE_OF_VESPERON; + if (m_pInstance) + { + if (m_pInstance->GetData(TYPE_SARTHARION_EVENT) == IN_PROGRESS) + uiSpawnEntry = NPC_ACOLYTE_OF_VESPERON; + } + + float fX, fY, fZ; + m_creature->GetRandomPoint(m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), 20.0f, fX, fY, fZ); + m_creature->SummonCreature(uiSpawnEntry, fX, fY, fZ, 0, TEMPSUMMON_DEAD_DESPAWN, 0); + + m_uiAcolyteVesperonTimer = 0; + } + else + m_uiAcolyteVesperonTimer -= uiDiff; } - else - m_uiAcolyteVesperonTimer -= uiDiff; } }; @@ -1004,16 +1140,46 @@ CreatureAI* GetAI_mob_vesperon(Creature* pCreature) ## Mob Twilight Eggs ######*/ -struct MANGOS_DLL_DECL mob_twilight_eggsAI : public ScriptedAI +struct MANGOS_DLL_DECL mob_twilight_eggsAI : public Scripted_NoMovementAI { - mob_twilight_eggsAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } + mob_twilight_eggsAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { Reset(); } + + uint32 m_uiHatchTimer; void Reset() override { + m_uiHatchTimer = 20000; } void AttackStart(Unit* /*pWho*/) override { } void MoveInLineOfSight(Unit* /*pWho*/) override { } + + void JustSummoned(Creature* pSummoned) override + { + if (pSummoned->GetEntry() == NPC_TWILIGHT_WHELP || pSummoned->GetEntry() == NPC_SHARTHARION_TWILIGHT_WHELP) + pSummoned->SetInCombatWithZone(); + } + + void UpdateAI(const uint32 uiDiff) override + { + if (m_uiHatchTimer < uiDiff) + { + uint32 uiSpellEntry = 0; + switch (m_creature->GetEntry()) + { + case NPC_TWILIGHT_EGG: uiSpellEntry = SPELL_SUMMON_TWILIGHT_WHELP; break; + case NPC_SARTHARION_TWILIGHT_EGG: uiSpellEntry = SPELL_SUMMON_SARTHARION_TWILIGHT_WHELP; break; + } + + m_creature->SetPhaseMask(PHASEMASK_NORMAL, true); + DoCastSpellIfCan(m_creature, uiSpellEntry, CAST_TRIGGERED); + + m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NONE, NULL, false); + m_uiHatchTimer = 0; + } + else + m_uiHatchTimer -= uiDiff; + } }; CreatureAI* GetAI_mob_twilight_eggs(Creature* pCreature) @@ -1022,42 +1188,53 @@ CreatureAI* GetAI_mob_twilight_eggs(Creature* pCreature) } /*###### -## Mob Twilight Whelps +## npc_tenebron_egg_controller ######*/ -struct MANGOS_DLL_DECL mob_twilight_whelpAI : public ScriptedAI +struct MANGOS_DLL_DECL npc_tenebron_egg_controllerAI : public Scripted_NoMovementAI { - mob_twilight_whelpAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } + npc_tenebron_egg_controllerAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; - uint32 m_uiFadeArmorTimer; + uint32 m_uiHatchTimer; void Reset() override { - m_uiFadeArmorTimer = 1000; + m_uiHatchTimer = 20000; } + void AttackStart(Unit* /*pWho*/) override { } + void MoveInLineOfSight(Unit* /*pWho*/) override { } + void UpdateAI(const uint32 uiDiff) override { - // Return since we have no target - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - // twilight torment - if (m_uiFadeArmorTimer < uiDiff) + if (m_uiHatchTimer) { - if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_FADE_ARMOR) == CAST_OK) - m_uiFadeArmorTimer = urand(5000, 10000); + if (m_uiHatchTimer < uiDiff) + { + if (m_pInstance) + { + // Inform Tenebron to hatch the eggs + if (Creature* pTenebron = m_pInstance->GetSingleCreatureFromStorage(NPC_TENEBRON)) + m_creature->AI()->SendAIEvent(AI_EVENT_CUSTOM_A, m_creature, pTenebron); + } + m_creature->ForcedDespawn(1000); + m_uiHatchTimer = 0; + } + else + m_uiHatchTimer -= uiDiff; } - else - m_uiFadeArmorTimer -= uiDiff; - - DoMeleeAttackIfReady(); } }; -CreatureAI* GetAI_mob_twilight_whelp(Creature* pCreature) +CreatureAI* GetAI_npc_tenebron_egg_controller(Creature* pCreature) { - return new mob_twilight_whelpAI(pCreature); + return new npc_tenebron_egg_controllerAI(pCreature); } /*###### @@ -1181,8 +1358,8 @@ void AddSC_boss_sartharion() pNewScript->RegisterSelf(); pNewScript = new Script; - pNewScript->Name = "mob_twilight_whelp"; - pNewScript->GetAI = &GetAI_mob_twilight_whelp; + pNewScript->Name = "npc_tenebron_egg_controller"; + pNewScript->GetAI = &GetAI_npc_tenebron_egg_controller; pNewScript->RegisterSelf(); pNewScript = new Script; diff --git a/scripts/northrend/obsidian_sanctum/instance_obsidian_sanctum.cpp b/scripts/northrend/obsidian_sanctum/instance_obsidian_sanctum.cpp index bb4c6c883..9371b0790 100644 --- a/scripts/northrend/obsidian_sanctum/instance_obsidian_sanctum.cpp +++ b/scripts/northrend/obsidian_sanctum/instance_obsidian_sanctum.cpp @@ -37,6 +37,9 @@ instance_obsidian_sanctum::instance_obsidian_sanctum(Map* pMap) : ScriptedInstan void instance_obsidian_sanctum::Initialize() { memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); + + for (uint8 i = 0; i < MAX_TWILIGHT_DRAGONS; ++i) + m_bPortalActive[i] = false; } void instance_obsidian_sanctum::OnCreatureCreate(Creature* pCreature) diff --git a/scripts/northrend/obsidian_sanctum/obsidian_sanctum.h b/scripts/northrend/obsidian_sanctum/obsidian_sanctum.h index 32b492713..f5701d1f7 100644 --- a/scripts/northrend/obsidian_sanctum/obsidian_sanctum.h +++ b/scripts/northrend/obsidian_sanctum/obsidian_sanctum.h @@ -14,6 +14,12 @@ enum TYPE_ALIVE_DRAGONS = 2, TYPE_VOLCANO_BLOW_FAILED = 3, + MAX_TWILIGHT_DRAGONS = 3, + + TYPE_PORTAL_TENEBRON = 0, + TYPE_PORTAL_SHADRON = 1, + TYPE_PORTAL_VESPERON = 2, + NPC_SARTHARION = 28860, NPC_TENEBRON = 30452, NPC_SHADRON = 30451, @@ -48,11 +54,26 @@ class MANGOS_DLL_DECL instance_obsidian_sanctum : public ScriptedInstance ObjectGuid SelectRandomFireCycloneGuid(); + bool IsActivePortal() + { + for (uint8 i = 0; i < MAX_TWILIGHT_DRAGONS; ++i) + { + if (m_bPortalActive[i]) + return true; + } + + return false; + } + + void SetPortalStatus(uint8 uiType, bool bStatus) { m_bPortalActive[uiType] = bStatus; } + bool GetPortaStatus(uint8 uiType) { return m_bPortalActive[uiType]; } + bool CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/) const override; bool CheckConditionCriteriaMeet(Player const* pPlayer, uint32 uiInstanceConditionId, WorldObject const* pConditionSource, uint32 conditionSourceType) const override; private: uint32 m_auiEncounter[MAX_ENCOUNTER]; + bool m_bPortalActive[MAX_TWILIGHT_DRAGONS]; uint8 m_uiAliveDragons; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 25baf8e82..1a0336574 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2919" + #define SD2_REVISION_NR "2920" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 79c3d0b6c..148c3f5e0 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -927,8 +927,8 @@ UPDATE creature_template SET ScriptName='boss_sartharion' WHERE entry=28860; UPDATE creature_template SET ScriptName='mob_vesperon' WHERE entry=30449; UPDATE creature_template SET ScriptName='mob_shadron' WHERE entry=30451; UPDATE creature_template SET ScriptName='mob_tenebron' WHERE entry=30452; -UPDATE creature_template SET ScriptName='mob_twilight_eggs' WHERE entry=30882; -UPDATE creature_template SET ScriptName='mob_twilight_whelp' WHERE entry IN (30890, 31214); +UPDATE creature_template SET ScriptName='mob_twilight_eggs' WHERE entry IN (30882,31204); +UPDATE creature_template SET ScriptName='npc_tenebron_egg_controller' WHERE entry=31138; UPDATE creature_template SET ScriptName='npc_flame_tsunami' WHERE entry=30616; UPDATE creature_template SET ScriptName='npc_fire_cyclone' WHERE entry=30648; diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 07da1a714..580f65202 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -3919,7 +3919,7 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1615005,'I will take pity on you Sartharion, just this once.',14117,1,0,0,'shadron SAY_SHADRON_RESPOND'), (-1615006,'Father tought me well!',14115,1,0,0,'shadron SAY_SHADRON_SPECIAL_1'), (-1615007,'On your knees!',14116,1,0,0,'shadron SAY_SHADRON_SPECIAL_2'), -(-1615008,'A Shadron Disciple appears in the Twilight!',0,5,0,0,'shadron WHISPER_SHADRON_DICIPLE'), +(-1615008,'A Shadron Disciple appears in the Twilight!',0,3,0,0,'shadron WHISPER_SHADRON_DICIPLE'), (-1615009,'You have no place here. Your place is among the departed.',14122,1,0,0,'tenebron SAY_TENEBRON_AGGRO'), (-1615010,'No contest.',14123,1,0,0,'tenebron SAY_TENEBRON_SLAY_1'), @@ -3929,7 +3929,7 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1615014,'It is amusing to watch you struggle. Very well, witness how it is done.',14128,1,0,0,'tenebron SAY_TENEBRON_RESPOND'), (-1615015,'Arrogant little creatures! To challenge powers you do not yet understand...',14126,1,0,0,'tenebron SAY_TENEBRON_SPECIAL_1'), (-1615016,'I am no mere dragon! You will find I am much, much, more...',14127,1,0,0,'tenebron SAY_TENEBRON_SPECIAL_2'), -(-1615017,'%s begins to hatch eggs in the twilight!',0,5,0,0,'tenebron WHISPER_HATCH_EGGS'), +(-1615017,'%s begins to hatch eggs in the twilight!',0,3,0,0,'tenebron WHISPER_HATCH_EGGS'), (-1615018,'It is my charge to watch over these eggs. I will see you burn before any harm comes to them!',14093,1,0,0,'sartharion SAY_SARTHARION_AGGRO'), (-1615019,'This pathetic siege ends NOW!',14103,1,0,0,'sartharion SAY_SARTHARION_BERSERK'), @@ -3945,7 +3945,7 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1615029,'You will make a fine meal for the hatchlings.',14094,1,0,0,'sartharion SAY_SARTHARION_SLAY_1'), (-1615030,'You are the grave disadvantage.',14096,1,0,0,'sartharion SAY_SARTHARION_SLAY_2'), (-1615031,'This is why we call you lesser beeings.',14097,1,0,0,'sartharion SAY_SARTHARION_SLAY_3'), -(-1615032,'The lava surrounding %s churns!',0,5,0,0,'sartharion WHISPER_LAVA_CHURN'), +(-1615032,'The lava surrounding %s churns!',0,3,0,0,'sartharion WHISPER_LAVA_CHURN'), (-1615033,'You pose no threat, lesser beings...give me your worst!',14133,1,0,0,'vesperon SAY_VESPERON_AGGRO'), (-1615034,'The least you could do is put up a fight...',14134,1,0,0,'vesperon SAY_VESPERON_SLAY_1'), @@ -3955,9 +3955,9 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1615038,'Father was right about you, Sartharion...You are a weakling!',14139,1,0,0,'vesperon SAY_VESPERON_RESPOND'), (-1615039,'Aren\'t you tricky...I have a few tricks of my own...',14137,1,0,0,'vesperon SAY_VESPERON_SPECIAL_1'), (-1615040,'Unlike, I have many talents.',14138,1,0,0,'vesperon SAY_VESPERON_SPECIAL_2'), -(-1615041,'A Vesperon Disciple appears in the Twilight!',0,5,0,0,'shadron WHISPER_VESPERON_DICIPLE'), +(-1615041,'A Vesperon Disciple appears in the Twilight!',0,3,0,0,'shadron WHISPER_VESPERON_DICIPLE'), -(-1615042,'%s begins to open a Twilight Portal!',0,5,0,0,'sartharion drake WHISPER_OPEN_PORTAL'); +(-1615042,'%s begins to open a Twilight Portal!',0,3,0,0,'sartharion drake WHISPER_OPEN_PORTAL'); -- -1 616 000 EYE OF ETERNITY INSERT INTO script_texts (entry,content_default,sound,type,LANGUAGE,emote,comment) VALUES diff --git a/sql/updates/r2920_mangos.sql b/sql/updates/r2920_mangos.sql new file mode 100644 index 000000000..5797c6aca --- /dev/null +++ b/sql/updates/r2920_mangos.sql @@ -0,0 +1,3 @@ +UPDATE creature_template SET ScriptName='' WHERE entry IN (30890, 31214); +UPDATE creature_template SET ScriptName='mob_twilight_eggs' WHERE entry IN (31204); +UPDATE creature_template SET ScriptName='npc_tenebron_egg_controller' WHERE entry=31138; diff --git a/sql/updates/r2920_scriptdev2.sql b/sql/updates/r2920_scriptdev2.sql new file mode 100644 index 000000000..496eff467 --- /dev/null +++ b/sql/updates/r2920_scriptdev2.sql @@ -0,0 +1 @@ +UPDATE script_texts SET type=3 WHERE entry IN (-1615008,-1615017,-1615032,-1615041,-1615042); From eb915c30b4a49850174d2d7ed662a6c4317e47d7 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Wed, 11 Sep 2013 10:48:53 +0300 Subject: [PATCH 0930/1172] [2921] Add support for Netherspite portals Please note that this requires additional core support in order to be fully functional --- .../karazhan/boss_netherspite.cpp | 130 +++++++++++++++++- .../karazhan/instance_karazhan.cpp | 1 + scripts/eastern_kingdoms/karazhan/karazhan.h | 1 + sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 + sql/updates/r2921_mangos.sql | 1 + 6 files changed, 131 insertions(+), 5 deletions(-) create mode 100644 sql/updates/r2921_mangos.sql diff --git a/scripts/eastern_kingdoms/karazhan/boss_netherspite.cpp b/scripts/eastern_kingdoms/karazhan/boss_netherspite.cpp index c4fb10696..5df5f5a0a 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_netherspite.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_netherspite.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: Boss_Netherspite -SD%Complete: 50 -SDComment: Nether portals NYI. Find spell ID for tail swipe added in patch 3.0.2 +SD%Complete: 75 +SDComment: Nether portals partially implemented. Find spell ID for tail swipe added in patch 3.0.2 SDCategory: Karazhan EndScriptData */ @@ -40,6 +40,7 @@ enum // void zone spells SPELL_CONSUMPTION = 28865, + // ***** Netherspite portals spells ***** // // beam buffs SPELL_SERENITY_NS = 30467, SPELL_SERENITY_PLR = 30422, @@ -48,12 +49,12 @@ enum SPELL_PERSEVERENCE_NS = 30466, SPELL_PERSEVERENCE_PLR = 30421, - // beam debuffs + // beam debuffs (player with this aura cannot gain the same color buff) SPELL_EXHAUSTION_SER = 38638, SPELL_EXHAUSTION_DOM = 38639, SPELL_EXHAUSTION_PER = 38637, - // spells which hit players + // spells which hit players (used only for visual - as seen from spell description) SPELL_BEAM_SER = 30401, SPELL_BEAM_DOM = 30402, SPELL_BEAM_PER = 30400, @@ -68,6 +69,13 @@ enum SPELL_BLUE_PORTAL = 30491, SPELL_RED_PORTAL = 30487, + // passive auras + SPELL_SERENITY_PASSIVE = 30397, + SPELL_DOMINANCE_PASSIVE = 30398, + // note: for Perseverence, there isn't any passive spell - currently we use script timer + SPELL_NETHER_BEAM = 30469, // spell triggered by the passive auras + // SPELL_CLEAR_NETHER_BEAM = 37072, // not clear how to use this + // emotes EMOTE_PHASE_BEAM = -1532089, EMOTE_PHASE_BANISH = -1532090, @@ -107,6 +115,10 @@ static const uint32 auiPortals[MAX_PORTALS] = NPC_PORTAL_RED, }; +/*###### +## boss_netherspite +######*/ + struct MANGOS_DLL_DECL boss_netherspiteAI : public ScriptedAI { boss_netherspiteAI(Creature* pCreature) : ScriptedAI(pCreature) @@ -300,6 +312,110 @@ CreatureAI* GetAI_boss_netherspite(Creature* pCreature) return new boss_netherspiteAI(pCreature); } +/*###### +## npc_netherspite_portal +######*/ + +struct MANGOS_DLL_DECL npc_netherspite_portalAI : public Scripted_NoMovementAI +{ + npc_netherspite_portalAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; + + uint32 m_uiPassiveSpellTimer; + uint32 m_uiOrientationTimer; + + void Reset() + { + m_uiPassiveSpellTimer = 0; + m_uiOrientationTimer = 0; + } + + void MoveInLineOfSight(Unit* pWho) { } + void AttackStart(Unit* pWho) { } + + void ReceiveAIEvent(AIEventType eventType, Creature* /*pSender*/, Unit* pInvoker, uint32 /*uiMiscValue*/) override + { + if (eventType == AI_EVENT_CUSTOM_A) + { + if (pInvoker->GetEntry() != NPC_NETHERSPITE) + return; + + // update orientation every second to focus on Netherspite + m_uiOrientationTimer = 1000; + m_creature->SetFacingToObject(pInvoker); + + switch (m_creature->GetEntry()) + { + case NPC_PORTAL_GREEN: + if (!m_creature->HasAura(SPELL_SERENITY_PASSIVE)) + DoCastSpellIfCan(m_creature, SPELL_SERENITY_PASSIVE, CAST_TRIGGERED); + break; + case NPC_PORTAL_BLUE: + if (!m_creature->HasAura(SPELL_DOMINANCE_PASSIVE)) + DoCastSpellIfCan(m_creature, SPELL_DOMINANCE_PASSIVE, CAST_TRIGGERED); + break; + case NPC_PORTAL_RED: + // Red portal spell is missing - handled in script + if (!m_uiPassiveSpellTimer) + m_uiPassiveSpellTimer = 1000; + break; + } + } + } + + void UpdateAI(const uint32 uiDiff) + { + if (m_uiPassiveSpellTimer) + { + if (m_uiPassiveSpellTimer <= uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_NETHER_BEAM, CAST_TRIGGERED) == CAST_OK) + m_uiPassiveSpellTimer = 1000; + } + else + m_uiPassiveSpellTimer -= uiDiff; + } + + if (m_uiOrientationTimer) + { + if (m_uiOrientationTimer <= uiDiff) + { + if (m_pInstance) + { + if (Creature* pNetherspite = m_pInstance->GetSingleCreatureFromStorage(NPC_NETHERSPITE)) + m_creature->SetFacingToObject(pNetherspite); + } + m_uiOrientationTimer = 1000; + } + else + m_uiOrientationTimer -= uiDiff; + } + } +}; + +CreatureAI* GetAI_npc_netherspite_portal(Creature* pCreature) +{ + return new npc_netherspite_portalAI(pCreature); +} + +bool EffectScriptEffectCreature_spell_portal_attunement(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget, ObjectGuid /*originalCasterGuid*/) +{ + if (uiSpellId == SPELL_PORTAL_ATTUNEMENT && uiEffIndex == EFFECT_INDEX_0) + { + if (pCreatureTarget->GetEntry() == NPC_PORTAL_RED || pCreatureTarget->GetEntry() == NPC_PORTAL_GREEN || pCreatureTarget->GetEntry() == NPC_PORTAL_BLUE) + pCreatureTarget->AI()->SendAIEvent(AI_EVENT_CUSTOM_A, pCaster, pCreatureTarget); + + return true; + } + + return false; +} + void AddSC_boss_netherspite() { Script* pNewScript; @@ -308,4 +424,10 @@ void AddSC_boss_netherspite() pNewScript->Name = "boss_netherspite"; pNewScript->GetAI = &GetAI_boss_netherspite; pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_netherspite_portal"; + pNewScript->GetAI = &GetAI_npc_netherspite_portal; + pNewScript->pEffectScriptEffectNPC = &EffectScriptEffectCreature_spell_portal_attunement; + pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/karazhan/instance_karazhan.cpp b/scripts/eastern_kingdoms/karazhan/instance_karazhan.cpp index 4bb2eafb2..7392812ad 100644 --- a/scripts/eastern_kingdoms/karazhan/instance_karazhan.cpp +++ b/scripts/eastern_kingdoms/karazhan/instance_karazhan.cpp @@ -88,6 +88,7 @@ void instance_karazhan::OnCreatureCreate(Creature* pCreature) case NPC_MOROES: case NPC_BARNES: case NPC_NIGHTBANE: + case NPC_NETHERSPITE: case NPC_JULIANNE: case NPC_ROMULO: case NPC_LADY_KEIRA_BERRYBUCK: diff --git a/scripts/eastern_kingdoms/karazhan/karazhan.h b/scripts/eastern_kingdoms/karazhan/karazhan.h index 84d0f2908..eca060b68 100644 --- a/scripts/eastern_kingdoms/karazhan/karazhan.h +++ b/scripts/eastern_kingdoms/karazhan/karazhan.h @@ -30,6 +30,7 @@ enum // NPC_TERESTIAN = 15688, NPC_NIGHTBANE = 17225, NPC_NIGHTBANE_HELPER = 17260, + NPC_NETHERSPITE = 15689, NPC_ECHO_MEDIVH = 16816, NPC_INVISIBLE_STALKER = 22519, // placeholder for dead chess npcs NPC_CHESS_STATUS_BAR = 22520, // npc that controlls the transformation of dead pieces diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 1a0336574..66c07e89b 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2920" + #define SD2_REVISION_NR "2921" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 148c3f5e0..53f7a74c6 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -758,6 +758,7 @@ UPDATE creature_template SET ScriptName='boss_bigbadwolf' WHERE entry=17521; UPDATE creature_template SET ScriptName='mob_demon_chain' WHERE entry=17248; UPDATE creature_template SET ScriptName='npc_fiendish_portal' WHERE entry=17265; UPDATE creature_template SET ScriptName='npc_shade_of_aran_blizzard' WHERE entry=17161; +UPDATE creature_template SET ScriptName='npc_netherspite_portal' WHERE entry IN (17367,17368,17369); UPDATE creature_template SET ScriptName='npc_infernal_target' WHERE entry=17644; UPDATE creature_template SET ScriptName='npc_berthold' WHERE entry=16153; UPDATE creature_template SET ScriptName='npc_barnes' WHERE entry=16812; diff --git a/sql/updates/r2921_mangos.sql b/sql/updates/r2921_mangos.sql new file mode 100644 index 000000000..76872f107 --- /dev/null +++ b/sql/updates/r2921_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_netherspite_portal' WHERE entry IN (17367,17368,17369); From efa4ff69ee5bced062fb70c7ceea44cb5e128758 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Wed, 11 Sep 2013 13:35:18 +0300 Subject: [PATCH 0931/1172] [2922] ScriptDev2 Milestone 0.7 Requires CMaNGOS 12536, Expects CMaNGOS v17.0 [12545] Thanks to all who contributed! --- docs/ChangeLog.html | 119 +++++++++++++++++++-- docs/ChangeLog.txt | 30 +++++- docs/ToDo.html | 52 ++------- docs/ToDo.txt | 18 +--- sd2_revision_nr.h | 2 +- sql/updates/{ => 0.7}/r2756_mangos.sql | 0 sql/updates/{ => 0.7}/r2756_scriptdev2.sql | 0 sql/updates/{ => 0.7}/r2757_mangos.sql | 0 sql/updates/{ => 0.7}/r2758_mangos.sql | 0 sql/updates/{ => 0.7}/r2758_scriptdev2.sql | 0 sql/updates/{ => 0.7}/r2761_mangos.sql | 0 sql/updates/{ => 0.7}/r2761_scriptdev2.sql | 0 sql/updates/{ => 0.7}/r2762_scriptdev2.sql | 0 sql/updates/{ => 0.7}/r2763_mangos.sql | 0 sql/updates/{ => 0.7}/r2763_scriptdev2.sql | 0 sql/updates/{ => 0.7}/r2764_scriptdev2.sql | 0 sql/updates/{ => 0.7}/r2765_scriptdev2.sql | 0 sql/updates/{ => 0.7}/r2766_mangos.sql | 0 sql/updates/{ => 0.7}/r2768_scriptdev2.sql | 0 sql/updates/{ => 0.7}/r2773_scriptdev2.sql | 0 sql/updates/{ => 0.7}/r2776_scriptdev2.sql | 0 sql/updates/{ => 0.7}/r2779_scriptdev2.sql | 0 sql/updates/{ => 0.7}/r2783_scriptdev2.sql | 0 sql/updates/{ => 0.7}/r2785_scriptdev2.sql | 0 sql/updates/{ => 0.7}/r2790_mangos.sql | 0 sql/updates/{ => 0.7}/r2799_mangos.sql | 0 sql/updates/{ => 0.7}/r2801_mangos.sql | 0 sql/updates/{ => 0.7}/r2801_scriptdev2.sql | 0 sql/updates/{ => 0.7}/r2802_mangos.sql | 0 sql/updates/{ => 0.7}/r2806_mangos.sql | 0 sql/updates/{ => 0.7}/r2808_mangos.sql | 0 sql/updates/{ => 0.7}/r2808_scriptdev2.sql | 0 sql/updates/{ => 0.7}/r2809_mangos.sql | 0 sql/updates/{ => 0.7}/r2810_mangos.sql | 0 sql/updates/{ => 0.7}/r2815_mangos.sql | 0 sql/updates/{ => 0.7}/r2815_scriptdev2.sql | 0 sql/updates/{ => 0.7}/r2816_mangos.sql | 0 sql/updates/{ => 0.7}/r2817_mangos.sql | 0 sql/updates/{ => 0.7}/r2817_scriptdev2.sql | 0 sql/updates/{ => 0.7}/r2818_scriptdev2.sql | 0 sql/updates/{ => 0.7}/r2820_scriptdev2.sql | 0 sql/updates/{ => 0.7}/r2821_mangos.sql | 0 sql/updates/{ => 0.7}/r2822_scriptdev2.sql | 0 sql/updates/{ => 0.7}/r2823_mangos.sql | 0 sql/updates/{ => 0.7}/r2824_scriptdev2.sql | 0 sql/updates/{ => 0.7}/r2826_mangos.sql | 0 sql/updates/{ => 0.7}/r2831_mangos.sql | 0 sql/updates/{ => 0.7}/r2831_scriptdev2.sql | 0 sql/updates/{ => 0.7}/r2832_mangos.sql | 0 sql/updates/{ => 0.7}/r2832_scriptdev2.sql | 0 sql/updates/{ => 0.7}/r2835_scriptdev2.sql | 0 sql/updates/{ => 0.7}/r2836_scriptdev2.sql | 0 sql/updates/{ => 0.7}/r2837_mangos.sql | 0 sql/updates/{ => 0.7}/r2837_scriptdev2.sql | 0 sql/updates/{ => 0.7}/r2838_mangos.sql | 0 sql/updates/{ => 0.7}/r2840_mangos.sql | 0 sql/updates/{ => 0.7}/r2840_scriptdev2.sql | 0 sql/updates/{ => 0.7}/r2842_mangos.sql | 0 sql/updates/{ => 0.7}/r2846_mangos.sql | 0 sql/updates/{ => 0.7}/r2847_mangos.sql | 0 sql/updates/{ => 0.7}/r2853_scriptdev2.sql | 0 sql/updates/{ => 0.7}/r2856_mangos.sql | 0 sql/updates/{ => 0.7}/r2856_scriptdev2.sql | 0 sql/updates/{ => 0.7}/r2858_scriptdev2.sql | 0 sql/updates/{ => 0.7}/r2861_mangos.sql | 0 sql/updates/{ => 0.7}/r2863_mangos.sql | 0 sql/updates/{ => 0.7}/r2870_scriptdev2.sql | 0 sql/updates/{ => 0.7}/r2873_mangos.sql | 0 sql/updates/{ => 0.7}/r2874_mangos.sql | 0 sql/updates/{ => 0.7}/r2875_mangos.sql | 0 sql/updates/{ => 0.7}/r2875_scriptdev2.sql | 0 sql/updates/{ => 0.7}/r2878_mangos.sql | 0 sql/updates/{ => 0.7}/r2879_mangos.sql | 0 sql/updates/{ => 0.7}/r2880_mangos.sql | 0 sql/updates/{ => 0.7}/r2885_mangos.sql | 0 sql/updates/{ => 0.7}/r2885_scriptdev2.sql | 0 sql/updates/{ => 0.7}/r2887_scriptdev2.sql | 0 sql/updates/{ => 0.7}/r2889_scriptdev2.sql | 0 sql/updates/{ => 0.7}/r2891_mangos.sql | 0 sql/updates/{ => 0.7}/r2893_mangos.sql | 0 sql/updates/{ => 0.7}/r2894_mangos.sql | 0 sql/updates/{ => 0.7}/r2894_scriptdev2.sql | 0 sql/updates/{ => 0.7}/r2896_mangos.sql | 0 sql/updates/{ => 0.7}/r2897_mangos.sql | 0 sql/updates/{ => 0.7}/r2897_scriptdev2.sql | 0 sql/updates/{ => 0.7}/r2898_mangos.sql | 0 sql/updates/{ => 0.7}/r2898_scriptdev2.sql | 0 sql/updates/{ => 0.7}/r2899_mangos.sql | 0 sql/updates/{ => 0.7}/r2899_scriptdev2.sql | 0 sql/updates/{ => 0.7}/r2901_scriptdev2.sql | 0 sql/updates/{ => 0.7}/r2902_mangos.sql | 0 sql/updates/{ => 0.7}/r2903_scriptdev2.sql | 0 sql/updates/{ => 0.7}/r2904_mangos.sql | 0 sql/updates/{ => 0.7}/r2904_scriptdev2.sql | 0 sql/updates/{ => 0.7}/r2905_mangos.sql | 0 sql/updates/{ => 0.7}/r2905_scriptdev2.sql | 0 sql/updates/{ => 0.7}/r2907_mangos.sql | 0 sql/updates/{ => 0.7}/r2907_scriptdev2.sql | 0 sql/updates/{ => 0.7}/r2908_mangos.sql | 0 sql/updates/{ => 0.7}/r2908_scriptdev2.sql | 0 sql/updates/{ => 0.7}/r2912_mangos.sql | 0 sql/updates/{ => 0.7}/r2913_scriptdev2.sql | 0 sql/updates/{ => 0.7}/r2914_scriptdev2.sql | 0 sql/updates/{ => 0.7}/r2915_mangos.sql | 0 sql/updates/{ => 0.7}/r2915_scriptdev2.sql | 0 sql/updates/{ => 0.7}/r2916_mangos.sql | 0 sql/updates/{ => 0.7}/r2916_scriptdev2.sql | 0 sql/updates/{ => 0.7}/r2917_mangos.sql | 0 sql/updates/{ => 0.7}/r2918_mangos.sql | 0 sql/updates/{ => 0.7}/r2920_mangos.sql | 0 sql/updates/{ => 0.7}/r2920_scriptdev2.sql | 0 sql/updates/{ => 0.7}/r2921_mangos.sql | 0 112 files changed, 153 insertions(+), 68 deletions(-) rename sql/updates/{ => 0.7}/r2756_mangos.sql (100%) rename sql/updates/{ => 0.7}/r2756_scriptdev2.sql (100%) rename sql/updates/{ => 0.7}/r2757_mangos.sql (100%) rename sql/updates/{ => 0.7}/r2758_mangos.sql (100%) rename sql/updates/{ => 0.7}/r2758_scriptdev2.sql (100%) rename sql/updates/{ => 0.7}/r2761_mangos.sql (100%) rename sql/updates/{ => 0.7}/r2761_scriptdev2.sql (100%) rename sql/updates/{ => 0.7}/r2762_scriptdev2.sql (100%) rename sql/updates/{ => 0.7}/r2763_mangos.sql (100%) rename sql/updates/{ => 0.7}/r2763_scriptdev2.sql (100%) rename sql/updates/{ => 0.7}/r2764_scriptdev2.sql (100%) rename sql/updates/{ => 0.7}/r2765_scriptdev2.sql (100%) rename sql/updates/{ => 0.7}/r2766_mangos.sql (100%) rename sql/updates/{ => 0.7}/r2768_scriptdev2.sql (100%) rename sql/updates/{ => 0.7}/r2773_scriptdev2.sql (100%) rename sql/updates/{ => 0.7}/r2776_scriptdev2.sql (100%) rename sql/updates/{ => 0.7}/r2779_scriptdev2.sql (100%) rename sql/updates/{ => 0.7}/r2783_scriptdev2.sql (100%) rename sql/updates/{ => 0.7}/r2785_scriptdev2.sql (100%) rename sql/updates/{ => 0.7}/r2790_mangos.sql (100%) rename sql/updates/{ => 0.7}/r2799_mangos.sql (100%) rename sql/updates/{ => 0.7}/r2801_mangos.sql (100%) rename sql/updates/{ => 0.7}/r2801_scriptdev2.sql (100%) rename sql/updates/{ => 0.7}/r2802_mangos.sql (100%) rename sql/updates/{ => 0.7}/r2806_mangos.sql (100%) rename sql/updates/{ => 0.7}/r2808_mangos.sql (100%) rename sql/updates/{ => 0.7}/r2808_scriptdev2.sql (100%) rename sql/updates/{ => 0.7}/r2809_mangos.sql (100%) rename sql/updates/{ => 0.7}/r2810_mangos.sql (100%) rename sql/updates/{ => 0.7}/r2815_mangos.sql (100%) rename sql/updates/{ => 0.7}/r2815_scriptdev2.sql (100%) rename sql/updates/{ => 0.7}/r2816_mangos.sql (100%) rename sql/updates/{ => 0.7}/r2817_mangos.sql (100%) rename sql/updates/{ => 0.7}/r2817_scriptdev2.sql (100%) rename sql/updates/{ => 0.7}/r2818_scriptdev2.sql (100%) rename sql/updates/{ => 0.7}/r2820_scriptdev2.sql (100%) rename sql/updates/{ => 0.7}/r2821_mangos.sql (100%) rename sql/updates/{ => 0.7}/r2822_scriptdev2.sql (100%) rename sql/updates/{ => 0.7}/r2823_mangos.sql (100%) rename sql/updates/{ => 0.7}/r2824_scriptdev2.sql (100%) rename sql/updates/{ => 0.7}/r2826_mangos.sql (100%) rename sql/updates/{ => 0.7}/r2831_mangos.sql (100%) rename sql/updates/{ => 0.7}/r2831_scriptdev2.sql (100%) rename sql/updates/{ => 0.7}/r2832_mangos.sql (100%) rename sql/updates/{ => 0.7}/r2832_scriptdev2.sql (100%) rename sql/updates/{ => 0.7}/r2835_scriptdev2.sql (100%) rename sql/updates/{ => 0.7}/r2836_scriptdev2.sql (100%) rename sql/updates/{ => 0.7}/r2837_mangos.sql (100%) rename sql/updates/{ => 0.7}/r2837_scriptdev2.sql (100%) rename sql/updates/{ => 0.7}/r2838_mangos.sql (100%) rename sql/updates/{ => 0.7}/r2840_mangos.sql (100%) rename sql/updates/{ => 0.7}/r2840_scriptdev2.sql (100%) rename sql/updates/{ => 0.7}/r2842_mangos.sql (100%) rename sql/updates/{ => 0.7}/r2846_mangos.sql (100%) rename sql/updates/{ => 0.7}/r2847_mangos.sql (100%) rename sql/updates/{ => 0.7}/r2853_scriptdev2.sql (100%) rename sql/updates/{ => 0.7}/r2856_mangos.sql (100%) rename sql/updates/{ => 0.7}/r2856_scriptdev2.sql (100%) rename sql/updates/{ => 0.7}/r2858_scriptdev2.sql (100%) rename sql/updates/{ => 0.7}/r2861_mangos.sql (100%) rename sql/updates/{ => 0.7}/r2863_mangos.sql (100%) rename sql/updates/{ => 0.7}/r2870_scriptdev2.sql (100%) rename sql/updates/{ => 0.7}/r2873_mangos.sql (100%) rename sql/updates/{ => 0.7}/r2874_mangos.sql (100%) rename sql/updates/{ => 0.7}/r2875_mangos.sql (100%) rename sql/updates/{ => 0.7}/r2875_scriptdev2.sql (100%) rename sql/updates/{ => 0.7}/r2878_mangos.sql (100%) rename sql/updates/{ => 0.7}/r2879_mangos.sql (100%) rename sql/updates/{ => 0.7}/r2880_mangos.sql (100%) rename sql/updates/{ => 0.7}/r2885_mangos.sql (100%) rename sql/updates/{ => 0.7}/r2885_scriptdev2.sql (100%) rename sql/updates/{ => 0.7}/r2887_scriptdev2.sql (100%) rename sql/updates/{ => 0.7}/r2889_scriptdev2.sql (100%) rename sql/updates/{ => 0.7}/r2891_mangos.sql (100%) rename sql/updates/{ => 0.7}/r2893_mangos.sql (100%) rename sql/updates/{ => 0.7}/r2894_mangos.sql (100%) rename sql/updates/{ => 0.7}/r2894_scriptdev2.sql (100%) rename sql/updates/{ => 0.7}/r2896_mangos.sql (100%) rename sql/updates/{ => 0.7}/r2897_mangos.sql (100%) rename sql/updates/{ => 0.7}/r2897_scriptdev2.sql (100%) rename sql/updates/{ => 0.7}/r2898_mangos.sql (100%) rename sql/updates/{ => 0.7}/r2898_scriptdev2.sql (100%) rename sql/updates/{ => 0.7}/r2899_mangos.sql (100%) rename sql/updates/{ => 0.7}/r2899_scriptdev2.sql (100%) rename sql/updates/{ => 0.7}/r2901_scriptdev2.sql (100%) rename sql/updates/{ => 0.7}/r2902_mangos.sql (100%) rename sql/updates/{ => 0.7}/r2903_scriptdev2.sql (100%) rename sql/updates/{ => 0.7}/r2904_mangos.sql (100%) rename sql/updates/{ => 0.7}/r2904_scriptdev2.sql (100%) rename sql/updates/{ => 0.7}/r2905_mangos.sql (100%) rename sql/updates/{ => 0.7}/r2905_scriptdev2.sql (100%) rename sql/updates/{ => 0.7}/r2907_mangos.sql (100%) rename sql/updates/{ => 0.7}/r2907_scriptdev2.sql (100%) rename sql/updates/{ => 0.7}/r2908_mangos.sql (100%) rename sql/updates/{ => 0.7}/r2908_scriptdev2.sql (100%) rename sql/updates/{ => 0.7}/r2912_mangos.sql (100%) rename sql/updates/{ => 0.7}/r2913_scriptdev2.sql (100%) rename sql/updates/{ => 0.7}/r2914_scriptdev2.sql (100%) rename sql/updates/{ => 0.7}/r2915_mangos.sql (100%) rename sql/updates/{ => 0.7}/r2915_scriptdev2.sql (100%) rename sql/updates/{ => 0.7}/r2916_mangos.sql (100%) rename sql/updates/{ => 0.7}/r2916_scriptdev2.sql (100%) rename sql/updates/{ => 0.7}/r2917_mangos.sql (100%) rename sql/updates/{ => 0.7}/r2918_mangos.sql (100%) rename sql/updates/{ => 0.7}/r2920_mangos.sql (100%) rename sql/updates/{ => 0.7}/r2920_scriptdev2.sql (100%) rename sql/updates/{ => 0.7}/r2921_mangos.sql (100%) diff --git a/docs/ChangeLog.html b/docs/ChangeLog.html index 41907f49e..ad32c980a 100644 --- a/docs/ChangeLog.html +++ b/docs/ChangeLog.html @@ -740,7 +740,7 @@

ScriptDev2 Milestones

- +

Supports:

  • @@ -767,13 +767,118 @@

    ScriptDev2 Milestones

-

1. Milestone ScriptDev2 - 0.6

+

1. Milestone ScriptDev2 - 0.7

1.1. General

  • +Unify texts loading with the core +

    +
  • +
  • +

    +Implemented support for ScriptEffect spell hooks +

    +
  • +
  • +

    +Implemented various missing quest scripts and similar events +

    +
  • +
+
+
+

1.2. WotLK content

+
    +
  • +

    +Finished script content for Death Knight area and Obsidian Sanctum +

    +
  • +
  • +

    +Implemented full script for Oculus and Pit of Saron instances +

    +
  • +
  • +

    +Improved script for the following dungeons or bosses: Ruby Sanctum, Halls of Stone, Ormorok, Hadronox, Herald Volazj, Skadi and Sapphiron +

    +
  • +
  • +

    +Implemented various missing achievements +

    +
  • +
+
+
+

1.3. TBC content

+
    +
  • +

    +Implemented script support for the Chess event, SSC water and Simon game +

    +
  • +
  • +

    +Improved script for the following dungeons or bosses: Felmyst, Kil’jaeden, Zul’jin, Al’ar, Shadow Labyrinth, Black Temple, Nazan and Vazruden and Netherspite +

    +
  • +
  • +

    +Implemented Year event boss - Ahune +

    +
  • +
  • +

    +Implemented Zul’Aman and Shattered Halls loot modes. +

    +
  • +
+
+
+

1.4. Classic content

+
    +
  • +

    +Improve script for the following dungeons or bosses: Razorgore, Archaedas, Zul’farrak, Ruins of AQ, Baroness Anastari and Zul’gurub +

    +
  • +
  • +

    +Implemented Dire Maul loot modes (tribute run event) +

    +
  • +
+
+

1.4.1. Statistics

+
    +
  • +

    +Total number of changes: over 166 revisions (183 commits) +

    +
  • +
  • +

    +Lots of bugs from forum and issues from github fixed +

    +
  • +
+
+
+
+
+
+

2. Milestone ScriptDev2 - 0.6

+
+
+

2.1. General

+
    +
  • +

    Added distinct script library support for all the server versions

  • @@ -820,7 +925,7 @@

    1.1. General

-

1.2. WotLK content

+

2.2. WotLK content

  • @@ -850,7 +955,7 @@

    1.2. WotLK content

-

1.3. TBC content

+

2.3. TBC content

  • @@ -880,7 +985,7 @@

    1.3. TBC content

-

1.4. Classic content

+

2.4. Classic content

  • @@ -909,7 +1014,7 @@

    1.4. Classic content

-

1.4.1. Statistics

+

2.4.1. Statistics

  • @@ -930,7 +1035,7 @@

    1.4.1. Statistics


    diff --git a/docs/ChangeLog.txt b/docs/ChangeLog.txt index 61c8b02a1..74e5332d0 100644 --- a/docs/ChangeLog.txt +++ b/docs/ChangeLog.txt @@ -1,6 +1,6 @@ = ScriptDev2 Milestones = -*Current Version: <>* +*Current Version: <>* *Supports:* @@ -10,6 +10,34 @@ * Cata (4.3.4), see https://github.com/scriptdev2/scriptdev2-cata [[currentMS]] +== Milestone ScriptDev2 - 0.7 == + +=== General === +* Unify texts loading with the core +* Implemented support for ScriptEffect spell hooks +* Implemented various missing quest scripts and similar events + +=== WotLK content === +* Finished script content for Death Knight area and Obsidian Sanctum +* Implemented full script for Oculus and Pit of Saron instances +* Improved script for the following dungeons or bosses: Ruby Sanctum, Halls of Stone, Ormorok, Hadronox, Herald Volazj, Skadi and Sapphiron +* Implemented various missing achievements + +=== TBC content === +* Implemented script support for the Chess event, SSC water and Simon game +* Improved script for the following dungeons or bosses: Felmyst, Kil'jaeden, Zul'jin, Al'ar, Shadow Labyrinth, Black Temple, Nazan and Vazruden and Netherspite +* Implemented Year event boss - Ahune +* Implemented Zul'Aman and Shattered Halls loot modes. + +=== Classic content === +* Improve script for the following dungeons or bosses: Razorgore, Archaedas, Zul'farrak, Ruins of AQ, Baroness Anastari and Zul'gurub +* Implemented Dire Maul loot modes (tribute run event) + +==== Statistics ==== +* Total number of changes: over 166 revisions (183 commits) +* Lots of bugs from forum and issues from github fixed + + == Milestone ScriptDev2 - 0.6 == === General === diff --git a/docs/ToDo.html b/docs/ToDo.html index c5ac45217..1974083bf 100644 --- a/docs/ToDo.html +++ b/docs/ToDo.html @@ -756,32 +756,17 @@

    2. WotLK content

    • -Implement missing scripts for the Death Knigh area quests +Finish script for Ulduar, Trial of the Crusader, Icecrown Citadel, Eye of Eternity and Ruby Sanctum

    • -Implement script for Ruby Sanctum +Implement dungeon scripts for Halls of Reflection, Trial of the Champion and Culling of Stratholme (requires core proper waipoint movement support)

    • -Finish script for Ulduar, Trial of the Crusader, Icecrown Citadel, Eye of Eternity and Obsidian Sanctum -

      -
    • -
    • -

      -Implement dungeon scripts for Halls of Reflection, Trial of the Champion, Pit of Saron and Culling of Stratholme (requires core proper waipoint movement support) -

      -
    • -
    • -

      -Finish dungeon scripts for Utgarde Pinnacle, Ahn’kahet and Azjol Nerub -

      -
    • -
    • -

      -Implement Year event bosses - Ahune, Headless Horseman +Implement Year event boss - Headless Horseman

    • @@ -798,12 +783,7 @@

      3. TBC content

      • -Various quests which still require script (examples: 5821, 5943, 9729, 9879, 9446, 10310, 10512, 10584, 11085, 10985) -

        -
      • -
      • -

        -Karazhan - Missing scripts: Chess event +Various quests which still require script (examples: 5821, 5943, 9729, 9879, 10310, 11085, 10985)

      • @@ -816,11 +796,6 @@

        3. TBC content

        Black Temple - Teron Gorefiend script improvement (requires core proper mind control support)

      • -
      • -

        -Sunwell Plateau - Felmyst - phase II script missing -

        -
@@ -830,22 +805,7 @@

4. Classic content

  • -Various quests which still require script (examples: 660, 667, 1222, 1270, 3367, 5721) -

    -
  • -
  • -

    -Zul’farrak (requires core proper waipoint movement support). -

    -
  • -
  • -

    -Blackwing Lair - Razorgore (requires core proper mind control support). -

    -
  • -
  • -

    -Ruins of AQ - Add missing script parts for Buru and Ossirian +Various quests which still require script (examples: 667, 3367, 5721)

  • @@ -860,7 +820,7 @@

    4. Classic content


    diff --git a/docs/ToDo.txt b/docs/ToDo.txt index bae8bc7c3..b25eef7dc 100644 --- a/docs/ToDo.txt +++ b/docs/ToDo.txt @@ -4,24 +4,16 @@ * Start implementing 4.x scripts for dungeons and quests == WotLK content == -* Implement missing scripts for the Death Knigh area quests -* Implement script for Ruby Sanctum -* Finish script for Ulduar, Trial of the Crusader, Icecrown Citadel, Eye of Eternity and Obsidian Sanctum -* Implement dungeon scripts for Halls of Reflection, Trial of the Champion, Pit of Saron and Culling of Stratholme (requires core proper waipoint movement support) -* Finish dungeon scripts for Utgarde Pinnacle, Ahn'kahet and Azjol Nerub -* Implement Year event bosses - Ahune, Headless Horseman +* Finish script for Ulduar, Trial of the Crusader, Icecrown Citadel, Eye of Eternity and Ruby Sanctum +* Implement dungeon scripts for Halls of Reflection, Trial of the Champion and Culling of Stratholme (requires core proper waipoint movement support) +* Implement Year event boss - Headless Horseman * Implement various missing quest scripts == TBC content == -* Various quests which still require script (examples: 5821, 5943, 9729, 9879, 9446, 10310, 10512, 10584, 11085, 10985) -* Karazhan - Missing scripts: Chess event +* Various quests which still require script (examples: 5821, 5943, 9729, 9879, 10310, 11085, 10985) * Hyjal Summit - Optimize game event. * Black Temple - Teron Gorefiend script improvement (requires core proper mind control support) -* Sunwell Plateau - Felmyst - phase II script missing == Classic content == -* Various quests which still require script (examples: 660, 667, 1222, 1270, 3367, 5721) -* Zul'farrak (requires core proper waipoint movement support). -* Blackwing Lair - Razorgore (requires core proper mind control support). -* Ruins of AQ - Add missing script parts for Buru and Ossirian +* Various quests which still require script (examples: 667, 3367, 5721) * Temple of AQ - Add missing script part for Viscidus diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 66c07e89b..5c9c7cc7a 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2921" + #define SD2_REVISION_NR "2922" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/updates/r2756_mangos.sql b/sql/updates/0.7/r2756_mangos.sql similarity index 100% rename from sql/updates/r2756_mangos.sql rename to sql/updates/0.7/r2756_mangos.sql diff --git a/sql/updates/r2756_scriptdev2.sql b/sql/updates/0.7/r2756_scriptdev2.sql similarity index 100% rename from sql/updates/r2756_scriptdev2.sql rename to sql/updates/0.7/r2756_scriptdev2.sql diff --git a/sql/updates/r2757_mangos.sql b/sql/updates/0.7/r2757_mangos.sql similarity index 100% rename from sql/updates/r2757_mangos.sql rename to sql/updates/0.7/r2757_mangos.sql diff --git a/sql/updates/r2758_mangos.sql b/sql/updates/0.7/r2758_mangos.sql similarity index 100% rename from sql/updates/r2758_mangos.sql rename to sql/updates/0.7/r2758_mangos.sql diff --git a/sql/updates/r2758_scriptdev2.sql b/sql/updates/0.7/r2758_scriptdev2.sql similarity index 100% rename from sql/updates/r2758_scriptdev2.sql rename to sql/updates/0.7/r2758_scriptdev2.sql diff --git a/sql/updates/r2761_mangos.sql b/sql/updates/0.7/r2761_mangos.sql similarity index 100% rename from sql/updates/r2761_mangos.sql rename to sql/updates/0.7/r2761_mangos.sql diff --git a/sql/updates/r2761_scriptdev2.sql b/sql/updates/0.7/r2761_scriptdev2.sql similarity index 100% rename from sql/updates/r2761_scriptdev2.sql rename to sql/updates/0.7/r2761_scriptdev2.sql diff --git a/sql/updates/r2762_scriptdev2.sql b/sql/updates/0.7/r2762_scriptdev2.sql similarity index 100% rename from sql/updates/r2762_scriptdev2.sql rename to sql/updates/0.7/r2762_scriptdev2.sql diff --git a/sql/updates/r2763_mangos.sql b/sql/updates/0.7/r2763_mangos.sql similarity index 100% rename from sql/updates/r2763_mangos.sql rename to sql/updates/0.7/r2763_mangos.sql diff --git a/sql/updates/r2763_scriptdev2.sql b/sql/updates/0.7/r2763_scriptdev2.sql similarity index 100% rename from sql/updates/r2763_scriptdev2.sql rename to sql/updates/0.7/r2763_scriptdev2.sql diff --git a/sql/updates/r2764_scriptdev2.sql b/sql/updates/0.7/r2764_scriptdev2.sql similarity index 100% rename from sql/updates/r2764_scriptdev2.sql rename to sql/updates/0.7/r2764_scriptdev2.sql diff --git a/sql/updates/r2765_scriptdev2.sql b/sql/updates/0.7/r2765_scriptdev2.sql similarity index 100% rename from sql/updates/r2765_scriptdev2.sql rename to sql/updates/0.7/r2765_scriptdev2.sql diff --git a/sql/updates/r2766_mangos.sql b/sql/updates/0.7/r2766_mangos.sql similarity index 100% rename from sql/updates/r2766_mangos.sql rename to sql/updates/0.7/r2766_mangos.sql diff --git a/sql/updates/r2768_scriptdev2.sql b/sql/updates/0.7/r2768_scriptdev2.sql similarity index 100% rename from sql/updates/r2768_scriptdev2.sql rename to sql/updates/0.7/r2768_scriptdev2.sql diff --git a/sql/updates/r2773_scriptdev2.sql b/sql/updates/0.7/r2773_scriptdev2.sql similarity index 100% rename from sql/updates/r2773_scriptdev2.sql rename to sql/updates/0.7/r2773_scriptdev2.sql diff --git a/sql/updates/r2776_scriptdev2.sql b/sql/updates/0.7/r2776_scriptdev2.sql similarity index 100% rename from sql/updates/r2776_scriptdev2.sql rename to sql/updates/0.7/r2776_scriptdev2.sql diff --git a/sql/updates/r2779_scriptdev2.sql b/sql/updates/0.7/r2779_scriptdev2.sql similarity index 100% rename from sql/updates/r2779_scriptdev2.sql rename to sql/updates/0.7/r2779_scriptdev2.sql diff --git a/sql/updates/r2783_scriptdev2.sql b/sql/updates/0.7/r2783_scriptdev2.sql similarity index 100% rename from sql/updates/r2783_scriptdev2.sql rename to sql/updates/0.7/r2783_scriptdev2.sql diff --git a/sql/updates/r2785_scriptdev2.sql b/sql/updates/0.7/r2785_scriptdev2.sql similarity index 100% rename from sql/updates/r2785_scriptdev2.sql rename to sql/updates/0.7/r2785_scriptdev2.sql diff --git a/sql/updates/r2790_mangos.sql b/sql/updates/0.7/r2790_mangos.sql similarity index 100% rename from sql/updates/r2790_mangos.sql rename to sql/updates/0.7/r2790_mangos.sql diff --git a/sql/updates/r2799_mangos.sql b/sql/updates/0.7/r2799_mangos.sql similarity index 100% rename from sql/updates/r2799_mangos.sql rename to sql/updates/0.7/r2799_mangos.sql diff --git a/sql/updates/r2801_mangos.sql b/sql/updates/0.7/r2801_mangos.sql similarity index 100% rename from sql/updates/r2801_mangos.sql rename to sql/updates/0.7/r2801_mangos.sql diff --git a/sql/updates/r2801_scriptdev2.sql b/sql/updates/0.7/r2801_scriptdev2.sql similarity index 100% rename from sql/updates/r2801_scriptdev2.sql rename to sql/updates/0.7/r2801_scriptdev2.sql diff --git a/sql/updates/r2802_mangos.sql b/sql/updates/0.7/r2802_mangos.sql similarity index 100% rename from sql/updates/r2802_mangos.sql rename to sql/updates/0.7/r2802_mangos.sql diff --git a/sql/updates/r2806_mangos.sql b/sql/updates/0.7/r2806_mangos.sql similarity index 100% rename from sql/updates/r2806_mangos.sql rename to sql/updates/0.7/r2806_mangos.sql diff --git a/sql/updates/r2808_mangos.sql b/sql/updates/0.7/r2808_mangos.sql similarity index 100% rename from sql/updates/r2808_mangos.sql rename to sql/updates/0.7/r2808_mangos.sql diff --git a/sql/updates/r2808_scriptdev2.sql b/sql/updates/0.7/r2808_scriptdev2.sql similarity index 100% rename from sql/updates/r2808_scriptdev2.sql rename to sql/updates/0.7/r2808_scriptdev2.sql diff --git a/sql/updates/r2809_mangos.sql b/sql/updates/0.7/r2809_mangos.sql similarity index 100% rename from sql/updates/r2809_mangos.sql rename to sql/updates/0.7/r2809_mangos.sql diff --git a/sql/updates/r2810_mangos.sql b/sql/updates/0.7/r2810_mangos.sql similarity index 100% rename from sql/updates/r2810_mangos.sql rename to sql/updates/0.7/r2810_mangos.sql diff --git a/sql/updates/r2815_mangos.sql b/sql/updates/0.7/r2815_mangos.sql similarity index 100% rename from sql/updates/r2815_mangos.sql rename to sql/updates/0.7/r2815_mangos.sql diff --git a/sql/updates/r2815_scriptdev2.sql b/sql/updates/0.7/r2815_scriptdev2.sql similarity index 100% rename from sql/updates/r2815_scriptdev2.sql rename to sql/updates/0.7/r2815_scriptdev2.sql diff --git a/sql/updates/r2816_mangos.sql b/sql/updates/0.7/r2816_mangos.sql similarity index 100% rename from sql/updates/r2816_mangos.sql rename to sql/updates/0.7/r2816_mangos.sql diff --git a/sql/updates/r2817_mangos.sql b/sql/updates/0.7/r2817_mangos.sql similarity index 100% rename from sql/updates/r2817_mangos.sql rename to sql/updates/0.7/r2817_mangos.sql diff --git a/sql/updates/r2817_scriptdev2.sql b/sql/updates/0.7/r2817_scriptdev2.sql similarity index 100% rename from sql/updates/r2817_scriptdev2.sql rename to sql/updates/0.7/r2817_scriptdev2.sql diff --git a/sql/updates/r2818_scriptdev2.sql b/sql/updates/0.7/r2818_scriptdev2.sql similarity index 100% rename from sql/updates/r2818_scriptdev2.sql rename to sql/updates/0.7/r2818_scriptdev2.sql diff --git a/sql/updates/r2820_scriptdev2.sql b/sql/updates/0.7/r2820_scriptdev2.sql similarity index 100% rename from sql/updates/r2820_scriptdev2.sql rename to sql/updates/0.7/r2820_scriptdev2.sql diff --git a/sql/updates/r2821_mangos.sql b/sql/updates/0.7/r2821_mangos.sql similarity index 100% rename from sql/updates/r2821_mangos.sql rename to sql/updates/0.7/r2821_mangos.sql diff --git a/sql/updates/r2822_scriptdev2.sql b/sql/updates/0.7/r2822_scriptdev2.sql similarity index 100% rename from sql/updates/r2822_scriptdev2.sql rename to sql/updates/0.7/r2822_scriptdev2.sql diff --git a/sql/updates/r2823_mangos.sql b/sql/updates/0.7/r2823_mangos.sql similarity index 100% rename from sql/updates/r2823_mangos.sql rename to sql/updates/0.7/r2823_mangos.sql diff --git a/sql/updates/r2824_scriptdev2.sql b/sql/updates/0.7/r2824_scriptdev2.sql similarity index 100% rename from sql/updates/r2824_scriptdev2.sql rename to sql/updates/0.7/r2824_scriptdev2.sql diff --git a/sql/updates/r2826_mangos.sql b/sql/updates/0.7/r2826_mangos.sql similarity index 100% rename from sql/updates/r2826_mangos.sql rename to sql/updates/0.7/r2826_mangos.sql diff --git a/sql/updates/r2831_mangos.sql b/sql/updates/0.7/r2831_mangos.sql similarity index 100% rename from sql/updates/r2831_mangos.sql rename to sql/updates/0.7/r2831_mangos.sql diff --git a/sql/updates/r2831_scriptdev2.sql b/sql/updates/0.7/r2831_scriptdev2.sql similarity index 100% rename from sql/updates/r2831_scriptdev2.sql rename to sql/updates/0.7/r2831_scriptdev2.sql diff --git a/sql/updates/r2832_mangos.sql b/sql/updates/0.7/r2832_mangos.sql similarity index 100% rename from sql/updates/r2832_mangos.sql rename to sql/updates/0.7/r2832_mangos.sql diff --git a/sql/updates/r2832_scriptdev2.sql b/sql/updates/0.7/r2832_scriptdev2.sql similarity index 100% rename from sql/updates/r2832_scriptdev2.sql rename to sql/updates/0.7/r2832_scriptdev2.sql diff --git a/sql/updates/r2835_scriptdev2.sql b/sql/updates/0.7/r2835_scriptdev2.sql similarity index 100% rename from sql/updates/r2835_scriptdev2.sql rename to sql/updates/0.7/r2835_scriptdev2.sql diff --git a/sql/updates/r2836_scriptdev2.sql b/sql/updates/0.7/r2836_scriptdev2.sql similarity index 100% rename from sql/updates/r2836_scriptdev2.sql rename to sql/updates/0.7/r2836_scriptdev2.sql diff --git a/sql/updates/r2837_mangos.sql b/sql/updates/0.7/r2837_mangos.sql similarity index 100% rename from sql/updates/r2837_mangos.sql rename to sql/updates/0.7/r2837_mangos.sql diff --git a/sql/updates/r2837_scriptdev2.sql b/sql/updates/0.7/r2837_scriptdev2.sql similarity index 100% rename from sql/updates/r2837_scriptdev2.sql rename to sql/updates/0.7/r2837_scriptdev2.sql diff --git a/sql/updates/r2838_mangos.sql b/sql/updates/0.7/r2838_mangos.sql similarity index 100% rename from sql/updates/r2838_mangos.sql rename to sql/updates/0.7/r2838_mangos.sql diff --git a/sql/updates/r2840_mangos.sql b/sql/updates/0.7/r2840_mangos.sql similarity index 100% rename from sql/updates/r2840_mangos.sql rename to sql/updates/0.7/r2840_mangos.sql diff --git a/sql/updates/r2840_scriptdev2.sql b/sql/updates/0.7/r2840_scriptdev2.sql similarity index 100% rename from sql/updates/r2840_scriptdev2.sql rename to sql/updates/0.7/r2840_scriptdev2.sql diff --git a/sql/updates/r2842_mangos.sql b/sql/updates/0.7/r2842_mangos.sql similarity index 100% rename from sql/updates/r2842_mangos.sql rename to sql/updates/0.7/r2842_mangos.sql diff --git a/sql/updates/r2846_mangos.sql b/sql/updates/0.7/r2846_mangos.sql similarity index 100% rename from sql/updates/r2846_mangos.sql rename to sql/updates/0.7/r2846_mangos.sql diff --git a/sql/updates/r2847_mangos.sql b/sql/updates/0.7/r2847_mangos.sql similarity index 100% rename from sql/updates/r2847_mangos.sql rename to sql/updates/0.7/r2847_mangos.sql diff --git a/sql/updates/r2853_scriptdev2.sql b/sql/updates/0.7/r2853_scriptdev2.sql similarity index 100% rename from sql/updates/r2853_scriptdev2.sql rename to sql/updates/0.7/r2853_scriptdev2.sql diff --git a/sql/updates/r2856_mangos.sql b/sql/updates/0.7/r2856_mangos.sql similarity index 100% rename from sql/updates/r2856_mangos.sql rename to sql/updates/0.7/r2856_mangos.sql diff --git a/sql/updates/r2856_scriptdev2.sql b/sql/updates/0.7/r2856_scriptdev2.sql similarity index 100% rename from sql/updates/r2856_scriptdev2.sql rename to sql/updates/0.7/r2856_scriptdev2.sql diff --git a/sql/updates/r2858_scriptdev2.sql b/sql/updates/0.7/r2858_scriptdev2.sql similarity index 100% rename from sql/updates/r2858_scriptdev2.sql rename to sql/updates/0.7/r2858_scriptdev2.sql diff --git a/sql/updates/r2861_mangos.sql b/sql/updates/0.7/r2861_mangos.sql similarity index 100% rename from sql/updates/r2861_mangos.sql rename to sql/updates/0.7/r2861_mangos.sql diff --git a/sql/updates/r2863_mangos.sql b/sql/updates/0.7/r2863_mangos.sql similarity index 100% rename from sql/updates/r2863_mangos.sql rename to sql/updates/0.7/r2863_mangos.sql diff --git a/sql/updates/r2870_scriptdev2.sql b/sql/updates/0.7/r2870_scriptdev2.sql similarity index 100% rename from sql/updates/r2870_scriptdev2.sql rename to sql/updates/0.7/r2870_scriptdev2.sql diff --git a/sql/updates/r2873_mangos.sql b/sql/updates/0.7/r2873_mangos.sql similarity index 100% rename from sql/updates/r2873_mangos.sql rename to sql/updates/0.7/r2873_mangos.sql diff --git a/sql/updates/r2874_mangos.sql b/sql/updates/0.7/r2874_mangos.sql similarity index 100% rename from sql/updates/r2874_mangos.sql rename to sql/updates/0.7/r2874_mangos.sql diff --git a/sql/updates/r2875_mangos.sql b/sql/updates/0.7/r2875_mangos.sql similarity index 100% rename from sql/updates/r2875_mangos.sql rename to sql/updates/0.7/r2875_mangos.sql diff --git a/sql/updates/r2875_scriptdev2.sql b/sql/updates/0.7/r2875_scriptdev2.sql similarity index 100% rename from sql/updates/r2875_scriptdev2.sql rename to sql/updates/0.7/r2875_scriptdev2.sql diff --git a/sql/updates/r2878_mangos.sql b/sql/updates/0.7/r2878_mangos.sql similarity index 100% rename from sql/updates/r2878_mangos.sql rename to sql/updates/0.7/r2878_mangos.sql diff --git a/sql/updates/r2879_mangos.sql b/sql/updates/0.7/r2879_mangos.sql similarity index 100% rename from sql/updates/r2879_mangos.sql rename to sql/updates/0.7/r2879_mangos.sql diff --git a/sql/updates/r2880_mangos.sql b/sql/updates/0.7/r2880_mangos.sql similarity index 100% rename from sql/updates/r2880_mangos.sql rename to sql/updates/0.7/r2880_mangos.sql diff --git a/sql/updates/r2885_mangos.sql b/sql/updates/0.7/r2885_mangos.sql similarity index 100% rename from sql/updates/r2885_mangos.sql rename to sql/updates/0.7/r2885_mangos.sql diff --git a/sql/updates/r2885_scriptdev2.sql b/sql/updates/0.7/r2885_scriptdev2.sql similarity index 100% rename from sql/updates/r2885_scriptdev2.sql rename to sql/updates/0.7/r2885_scriptdev2.sql diff --git a/sql/updates/r2887_scriptdev2.sql b/sql/updates/0.7/r2887_scriptdev2.sql similarity index 100% rename from sql/updates/r2887_scriptdev2.sql rename to sql/updates/0.7/r2887_scriptdev2.sql diff --git a/sql/updates/r2889_scriptdev2.sql b/sql/updates/0.7/r2889_scriptdev2.sql similarity index 100% rename from sql/updates/r2889_scriptdev2.sql rename to sql/updates/0.7/r2889_scriptdev2.sql diff --git a/sql/updates/r2891_mangos.sql b/sql/updates/0.7/r2891_mangos.sql similarity index 100% rename from sql/updates/r2891_mangos.sql rename to sql/updates/0.7/r2891_mangos.sql diff --git a/sql/updates/r2893_mangos.sql b/sql/updates/0.7/r2893_mangos.sql similarity index 100% rename from sql/updates/r2893_mangos.sql rename to sql/updates/0.7/r2893_mangos.sql diff --git a/sql/updates/r2894_mangos.sql b/sql/updates/0.7/r2894_mangos.sql similarity index 100% rename from sql/updates/r2894_mangos.sql rename to sql/updates/0.7/r2894_mangos.sql diff --git a/sql/updates/r2894_scriptdev2.sql b/sql/updates/0.7/r2894_scriptdev2.sql similarity index 100% rename from sql/updates/r2894_scriptdev2.sql rename to sql/updates/0.7/r2894_scriptdev2.sql diff --git a/sql/updates/r2896_mangos.sql b/sql/updates/0.7/r2896_mangos.sql similarity index 100% rename from sql/updates/r2896_mangos.sql rename to sql/updates/0.7/r2896_mangos.sql diff --git a/sql/updates/r2897_mangos.sql b/sql/updates/0.7/r2897_mangos.sql similarity index 100% rename from sql/updates/r2897_mangos.sql rename to sql/updates/0.7/r2897_mangos.sql diff --git a/sql/updates/r2897_scriptdev2.sql b/sql/updates/0.7/r2897_scriptdev2.sql similarity index 100% rename from sql/updates/r2897_scriptdev2.sql rename to sql/updates/0.7/r2897_scriptdev2.sql diff --git a/sql/updates/r2898_mangos.sql b/sql/updates/0.7/r2898_mangos.sql similarity index 100% rename from sql/updates/r2898_mangos.sql rename to sql/updates/0.7/r2898_mangos.sql diff --git a/sql/updates/r2898_scriptdev2.sql b/sql/updates/0.7/r2898_scriptdev2.sql similarity index 100% rename from sql/updates/r2898_scriptdev2.sql rename to sql/updates/0.7/r2898_scriptdev2.sql diff --git a/sql/updates/r2899_mangos.sql b/sql/updates/0.7/r2899_mangos.sql similarity index 100% rename from sql/updates/r2899_mangos.sql rename to sql/updates/0.7/r2899_mangos.sql diff --git a/sql/updates/r2899_scriptdev2.sql b/sql/updates/0.7/r2899_scriptdev2.sql similarity index 100% rename from sql/updates/r2899_scriptdev2.sql rename to sql/updates/0.7/r2899_scriptdev2.sql diff --git a/sql/updates/r2901_scriptdev2.sql b/sql/updates/0.7/r2901_scriptdev2.sql similarity index 100% rename from sql/updates/r2901_scriptdev2.sql rename to sql/updates/0.7/r2901_scriptdev2.sql diff --git a/sql/updates/r2902_mangos.sql b/sql/updates/0.7/r2902_mangos.sql similarity index 100% rename from sql/updates/r2902_mangos.sql rename to sql/updates/0.7/r2902_mangos.sql diff --git a/sql/updates/r2903_scriptdev2.sql b/sql/updates/0.7/r2903_scriptdev2.sql similarity index 100% rename from sql/updates/r2903_scriptdev2.sql rename to sql/updates/0.7/r2903_scriptdev2.sql diff --git a/sql/updates/r2904_mangos.sql b/sql/updates/0.7/r2904_mangos.sql similarity index 100% rename from sql/updates/r2904_mangos.sql rename to sql/updates/0.7/r2904_mangos.sql diff --git a/sql/updates/r2904_scriptdev2.sql b/sql/updates/0.7/r2904_scriptdev2.sql similarity index 100% rename from sql/updates/r2904_scriptdev2.sql rename to sql/updates/0.7/r2904_scriptdev2.sql diff --git a/sql/updates/r2905_mangos.sql b/sql/updates/0.7/r2905_mangos.sql similarity index 100% rename from sql/updates/r2905_mangos.sql rename to sql/updates/0.7/r2905_mangos.sql diff --git a/sql/updates/r2905_scriptdev2.sql b/sql/updates/0.7/r2905_scriptdev2.sql similarity index 100% rename from sql/updates/r2905_scriptdev2.sql rename to sql/updates/0.7/r2905_scriptdev2.sql diff --git a/sql/updates/r2907_mangos.sql b/sql/updates/0.7/r2907_mangos.sql similarity index 100% rename from sql/updates/r2907_mangos.sql rename to sql/updates/0.7/r2907_mangos.sql diff --git a/sql/updates/r2907_scriptdev2.sql b/sql/updates/0.7/r2907_scriptdev2.sql similarity index 100% rename from sql/updates/r2907_scriptdev2.sql rename to sql/updates/0.7/r2907_scriptdev2.sql diff --git a/sql/updates/r2908_mangos.sql b/sql/updates/0.7/r2908_mangos.sql similarity index 100% rename from sql/updates/r2908_mangos.sql rename to sql/updates/0.7/r2908_mangos.sql diff --git a/sql/updates/r2908_scriptdev2.sql b/sql/updates/0.7/r2908_scriptdev2.sql similarity index 100% rename from sql/updates/r2908_scriptdev2.sql rename to sql/updates/0.7/r2908_scriptdev2.sql diff --git a/sql/updates/r2912_mangos.sql b/sql/updates/0.7/r2912_mangos.sql similarity index 100% rename from sql/updates/r2912_mangos.sql rename to sql/updates/0.7/r2912_mangos.sql diff --git a/sql/updates/r2913_scriptdev2.sql b/sql/updates/0.7/r2913_scriptdev2.sql similarity index 100% rename from sql/updates/r2913_scriptdev2.sql rename to sql/updates/0.7/r2913_scriptdev2.sql diff --git a/sql/updates/r2914_scriptdev2.sql b/sql/updates/0.7/r2914_scriptdev2.sql similarity index 100% rename from sql/updates/r2914_scriptdev2.sql rename to sql/updates/0.7/r2914_scriptdev2.sql diff --git a/sql/updates/r2915_mangos.sql b/sql/updates/0.7/r2915_mangos.sql similarity index 100% rename from sql/updates/r2915_mangos.sql rename to sql/updates/0.7/r2915_mangos.sql diff --git a/sql/updates/r2915_scriptdev2.sql b/sql/updates/0.7/r2915_scriptdev2.sql similarity index 100% rename from sql/updates/r2915_scriptdev2.sql rename to sql/updates/0.7/r2915_scriptdev2.sql diff --git a/sql/updates/r2916_mangos.sql b/sql/updates/0.7/r2916_mangos.sql similarity index 100% rename from sql/updates/r2916_mangos.sql rename to sql/updates/0.7/r2916_mangos.sql diff --git a/sql/updates/r2916_scriptdev2.sql b/sql/updates/0.7/r2916_scriptdev2.sql similarity index 100% rename from sql/updates/r2916_scriptdev2.sql rename to sql/updates/0.7/r2916_scriptdev2.sql diff --git a/sql/updates/r2917_mangos.sql b/sql/updates/0.7/r2917_mangos.sql similarity index 100% rename from sql/updates/r2917_mangos.sql rename to sql/updates/0.7/r2917_mangos.sql diff --git a/sql/updates/r2918_mangos.sql b/sql/updates/0.7/r2918_mangos.sql similarity index 100% rename from sql/updates/r2918_mangos.sql rename to sql/updates/0.7/r2918_mangos.sql diff --git a/sql/updates/r2920_mangos.sql b/sql/updates/0.7/r2920_mangos.sql similarity index 100% rename from sql/updates/r2920_mangos.sql rename to sql/updates/0.7/r2920_mangos.sql diff --git a/sql/updates/r2920_scriptdev2.sql b/sql/updates/0.7/r2920_scriptdev2.sql similarity index 100% rename from sql/updates/r2920_scriptdev2.sql rename to sql/updates/0.7/r2920_scriptdev2.sql diff --git a/sql/updates/r2921_mangos.sql b/sql/updates/0.7/r2921_mangos.sql similarity index 100% rename from sql/updates/r2921_mangos.sql rename to sql/updates/0.7/r2921_mangos.sql From 96764a118ec4bd3549f29f1b403d1395ba1772f0 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Wed, 11 Sep 2013 21:07:29 +0300 Subject: [PATCH 0932/1172] [2923] Implement script for Ignis the Furnace Master --- .../northrend/ulduar/ulduar/boss_ignis.cpp | 316 +++++++++++++++++- .../ulduar/ulduar/instance_ulduar.cpp | 54 +++ scripts/northrend/ulduar/ulduar/ulduar.h | 16 +- sd2_revision_nr.h | 2 +- sd2_revision_sql.h | 2 +- sql/mangos_scriptname_full.sql | 8 +- sql/updates/r2923_mangos.sql | 6 + 7 files changed, 395 insertions(+), 9 deletions(-) create mode 100644 sql/updates/r2923_mangos.sql diff --git a/scripts/northrend/ulduar/ulduar/boss_ignis.cpp b/scripts/northrend/ulduar/ulduar/boss_ignis.cpp index 4b4c23b64..cd12da4e6 100644 --- a/scripts/northrend/ulduar/ulduar/boss_ignis.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_ignis.cpp @@ -16,7 +16,7 @@ /* ScriptData SDName: boss_ignis -SD%Complete: 0% +SD%Complete: 100% SDComment: SDCategory: Ulduar EndScriptData */ @@ -27,9 +27,9 @@ EndScriptData */ enum { SAY_AGGRO = -1603026, - SAY_SCORCH_1 = -1603027, - SAY_SCORCH_2 = -1603028, - SAY_SLAGPOT = -1603029, + SAY_SLAGPOT_1 = -1603027, + SAY_SLAGPOT_2 = -1603028, + SAY_SLAGPOT_3 = -1603029, SAY_ADDS = -1603030, SAY_SLAY_1 = -1603031, SAY_SLAY_2 = -1603032, @@ -37,9 +37,317 @@ enum SAY_DEATH = -1603034, EMOTE_FLAME_JETS = -1603035, + + // spells + SPELL_FLAME_JETS = 62680, + SPELL_FLAME_JETS_H = 63472, + SPELL_SLAG_POT = 62717, // damage aura applied when passenger is switched to second seat + // SPELL_SLAG_IMBUED = 63536, // buff received if target survives the slag pot + SPELL_GRAB = 62707, // charge spells for Slag pot - triggers 62708 which will load the player into Ingis' hand (seat 1) + SPELL_GRAB_POT = 62711, // aura triggered after 1,5 sec after the first grab; switches the seats from hand to pot (seat 2) + SPELL_SCORCH = 62546, + SPELL_SCORCH_H = 63474, + SPELL_SCORCH_SUMMON = 62551, // summons npc 33221 + SPELL_ACTIVATE_CONSTRUCT = 62488, // activates constructs and set them in combat (handled in core) + SPELL_KILL_ALL_CONSTRUCTS = 65109, // on death + SPELL_BERSERK = 26662, + + // iron construct + SPELL_CONSTRUCT_HITTING_YA = 65110, // procs on melee damage; purpose unk + SPELL_STONED = 62468, + SPELL_HEAT = 65667, // stackable aura which heats the construct + SPELL_MOLTEN = 62373, + SPELL_BRITTLE = 62382, + SPELL_BRITTLE_H = 67114, + SPELL_SHATTER = 62383, // sends event 21620 for the achiev check + SPELL_STRENGTH_REMOVE = 64475, + // SPELL_WATER = 64502, // cast by world triggers, in order to check when the constructs reach the water (handled in core) + + // scorch target + SPELL_SCORCH_AURA = 62548, + SPELL_SCORCH_AURA_H = 63476, + + // NPC ids + NPC_SCORCH = 33221, + + MAX_HEAT_STACKS = 10, +}; + +/*###### +## boss_ignis +######*/ + +struct MANGOS_DLL_DECL boss_ignisAI : public ScriptedAI +{ + boss_ignisAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (instance_ulduar*)pCreature->GetInstanceData(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); + Reset(); + } + + instance_ulduar* m_pInstance; + bool m_bIsRegularMode; + + uint32 m_uiBerserkTimer; + uint32 m_uiFlameJetsTimer; + uint32 m_uiSlagPotTimer; + uint32 m_uiScorchTimer; + uint32 m_uiConstructTimer; + + void Reset() override + { + m_uiBerserkTimer = 10 * MINUTE * IN_MILLISECONDS; + m_uiFlameJetsTimer = 20000; + m_uiSlagPotTimer = 25000; + m_uiScorchTimer = 13000; + m_uiConstructTimer = 10000; + } + + void JustDied(Unit* pKiller) override + { + if (m_pInstance) + m_pInstance->SetData(TYPE_IGNIS, DONE); + + DoCastSpellIfCan(m_creature, SPELL_KILL_ALL_CONSTRUCTS, CAST_TRIGGERED); + DoScriptText(SAY_DEATH, m_creature); + } + + void KilledUnit(Unit* pVictim) override + { + if (pVictim->GetTypeId() != TYPEID_PLAYER) + return; + + DoScriptText(urand(0, 1) ? SAY_SLAY_1 : SAY_SLAY_2, m_creature); + } + + void Aggro(Unit* pWho) override + { + if (m_pInstance) + m_pInstance->SetData(TYPE_IGNIS, IN_PROGRESS); + + DoScriptText(SAY_AGGRO, m_creature); + } + + void JustReachedHome() override + { + if (m_pInstance) + m_pInstance->SetData(TYPE_IGNIS, FAIL); + } + + void JustSummoned(Creature* pSummoned) override + { + if (pSummoned->GetEntry() == NPC_SCORCH) + pSummoned->CastSpell(pSummoned, m_bIsRegularMode ? SPELL_SCORCH_AURA : SPELL_SCORCH_AURA_H, true); + } + + // TODO: Use the vehicle boarding wrappers when they are implemented in core + void SpellHit(Unit* pCaster, const SpellEntry* pSpell) override + { + if (pCaster->GetTypeId() != TYPEID_PLAYER) + return; + + // Handle the case when passenger is loaded to the second seat + if (pSpell->Id == SPELL_GRAB_POT) + DoCastSpellIfCan(pCaster, SPELL_SLAG_POT, CAST_TRIGGERED); + } + + void UpdateAI(const uint32 uiDiff) override + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_uiBerserkTimer) + { + if (m_uiBerserkTimer <= uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_BERSERK) == CAST_OK) + { + DoScriptText(SAY_BERSERK, m_creature); + m_uiBerserkTimer = 0; + } + } + else + m_uiBerserkTimer -= uiDiff; + } + + if (m_uiFlameJetsTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_FLAME_JETS : SPELL_FLAME_JETS_H) == CAST_OK) + { + DoScriptText(EMOTE_FLAME_JETS, m_creature); + m_uiFlameJetsTimer = 35000; + } + } + else + m_uiFlameJetsTimer -= uiDiff; + + if (m_uiSlagPotTimer < uiDiff) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1, SPELL_GRAB, SELECT_FLAG_PLAYER)) + { + if (DoCastSpellIfCan(pTarget, SPELL_GRAB) == CAST_OK) + { + switch (urand(0, 2)) + { + case 0: DoScriptText(SAY_SLAGPOT_1, m_creature); break; + case 1: DoScriptText(SAY_SLAGPOT_2, m_creature); break; + case 2: DoScriptText(SAY_SLAGPOT_3, m_creature); break; + } + m_uiSlagPotTimer = 30000; + } + } + } + else + m_uiSlagPotTimer -= uiDiff; + + if (m_uiConstructTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_ACTIVATE_CONSTRUCT) == CAST_OK) + { + DoScriptText(SAY_ADDS, m_creature); + m_uiConstructTimer = 40000; + } + } + else + m_uiConstructTimer -= uiDiff; + + if (m_uiScorchTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_SCORCH : SPELL_SCORCH_H) == CAST_OK) + { + DoCastSpellIfCan(m_creature, SPELL_SCORCH_SUMMON, CAST_TRIGGERED); + m_uiScorchTimer = 25000; + } + } + else + m_uiScorchTimer -= uiDiff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_ignis(Creature* pCreature) +{ + return new boss_ignisAI(pCreature); +} + +/*###### +## npc_iron_construct +######*/ + +struct MANGOS_DLL_DECL npc_iron_constructAI : public ScriptedAI +{ + npc_iron_constructAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); + Reset(); + } + + bool m_bIsRegularMode; + bool m_bHasShattered; + + void Reset() override + { + m_bHasShattered = false; + + DoCastSpellIfCan(m_creature, SPELL_STONED, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_CONSTRUCT_HITTING_YA, CAST_TRIGGERED); + } + + void JustReachedHome() override + { + // reset flags if necessary + if (m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE)) + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + + DoCastSpellIfCan(m_creature, SPELL_STONED, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_CONSTRUCT_HITTING_YA, CAST_TRIGGERED); + } + + void DamageTaken(Unit* pDoneBy, uint32 &uiDamage) override + { + // ToDo: This may need more research related to spell proc + if (m_creature->HasAura(m_bIsRegularMode ? SPELL_BRITTLE : SPELL_BRITTLE_H) && !m_bHasShattered) + { + if (uiDamage > 5000) + { + DoCastSpellIfCan(m_creature, SPELL_SHATTER, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_STRENGTH_REMOVE, CAST_TRIGGERED); + + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + m_creature->GetMotionMaster()->MoveIdle(); + m_bHasShattered = true; + } + } + } + + void SpellHit(Unit* pCaster, const SpellEntry* pSpell) override + { + if (pSpell->Id == SPELL_HEAT) + { + if (SpellAuraHolder* pHeatAura = m_creature->GetSpellAuraHolder(SPELL_HEAT)) + { + if (pHeatAura && pHeatAura->GetStackAmount() == MAX_HEAT_STACKS) + DoCastSpellIfCan(m_creature, SPELL_MOLTEN); + } + } + } + + void UpdateAI(const uint32 /*uiDiff*/) override + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + // stop attacking after shattered + if (m_bHasShattered) + return; + + DoMeleeAttackIfReady(); + } }; +CreatureAI* GetAI_npc_iron_construct(Creature* pCreature) +{ + return new npc_iron_constructAI(pCreature); +} + +/*###### +## npc_scorch +######*/ + +// TODO Remove this 'script' when combat can be proper prevented from core-side +struct MANGOS_DLL_DECL npc_scorchAI : public Scripted_NoMovementAI +{ + npc_scorchAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { Reset(); } + + void Reset() override { } + void AttackStart(Unit* /*pWho*/) override { } + void MoveInLineOfSight(Unit* /*pWho*/) override { } + void UpdateAI(const uint32 /*uiDiff*/) override { } +}; + +CreatureAI* GetAI_npc_scorch(Creature* pCreature) +{ + return new npc_scorchAI(pCreature); +} + void AddSC_boss_ignis() { + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_ignis"; + pNewScript->GetAI = GetAI_boss_ignis; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_iron_construct"; + pNewScript->GetAI = &GetAI_npc_iron_construct; + pNewScript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "npc_scorch"; + pNewScript->GetAI = &GetAI_npc_scorch; + pNewScript->RegisterSelf(); } diff --git a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp index b50623e32..1676f53b5 100644 --- a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp +++ b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp @@ -278,6 +278,11 @@ void instance_ulduar::SetData(uint32 uiType, uint32 uiData) break; case TYPE_IGNIS: m_auiEncounter[uiType] = uiData; + if (uiData == IN_PROGRESS) + { + DoStartTimedAchievement(ACHIEVEMENT_CRITERIA_TYPE_KILL_CREATURE, ACHIEV_START_IGNIS_ID); + SetSpecialAchievementCriteria(TYPE_ACHIEV_SHATTERED, false); + } break; case TYPE_RAZORSCALE: m_auiEncounter[uiType] = uiData; @@ -622,17 +627,61 @@ bool instance_ulduar::CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player c case ACHIEV_CRIT_STUNNED_MOLG_H: if (GetData(TYPE_ASSEMBLY) == SPECIAL) return m_abAchievCriteria[TYPE_ACHIEV_STUNNED]; + case ACHIEV_CRIT_SHATTERED_N: + case ACHIEV_CRIT_SHATTERED_H: + return m_abAchievCriteria[TYPE_ACHIEV_SHATTERED]; default: return false; } } +void instance_ulduar::DoProcessShatteredEvent() +{ + // If timer is already running set achiev criteria to true, else start the timer + if (m_uiShatterAchievTimer) + SetSpecialAchievementCriteria(TYPE_ACHIEV_SHATTERED, true); + else + m_uiShatterAchievTimer = 5000; +} + +void instance_ulduar::Update(uint32 uiDiff) +{ + if (GetData(TYPE_IGNIS) == IN_PROGRESS) + { + if (m_uiShatterAchievTimer) + { + // Just set the timer to 0 when it expires + if (m_uiShatterAchievTimer <= uiDiff) + m_uiShatterAchievTimer = 0; + else + m_uiShatterAchievTimer -= uiDiff; + } + } +} + InstanceData* GetInstanceData_instance_ulduar(Map* pMap) { return new instance_ulduar(pMap); } +bool ProcessEventId_event_ulduar(uint32 uiEventId, Object* pSource, Object* pTarget, bool bIsStart) +{ + if (uiEventId == EVENT_ID_SPELL_SHATTER) + { + if (pSource->GetTypeId() == TYPEID_UNIT) + { + if (instance_ulduar* pInstance = (instance_ulduar*)((Creature*)pSource)->GetInstanceData()) + { + pInstance->DoProcessShatteredEvent(); + return true; + } + } + } + + return false; +} + void AddSC_instance_ulduar() { Script* pNewScript; @@ -641,4 +690,9 @@ void AddSC_instance_ulduar() pNewScript->Name = "instance_ulduar"; pNewScript->GetInstanceData = &GetInstanceData_instance_ulduar; pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "event_ulduar"; + pNewScript->pProcessEventId = &ProcessEventId_event_ulduar; + pNewScript->RegisterSelf(); } diff --git a/scripts/northrend/ulduar/ulduar/ulduar.h b/scripts/northrend/ulduar/ulduar/ulduar.h index 8ef072a86..8dfa34d1b 100644 --- a/scripts/northrend/ulduar/ulduar/ulduar.h +++ b/scripts/northrend/ulduar/ulduar/ulduar.h @@ -101,7 +101,7 @@ enum NPC_KEEPER_MIMIRON = 33244, NPC_KEEPER_THORIM = 33242, - MAX_SPECIAL_ACHIEV_CRITS = 6, + MAX_SPECIAL_ACHIEV_CRITS = 7, TYPE_ACHIEV_CAT_LADY = 0, TYPE_ACHIEV_NINE_LIVES = 1, @@ -109,6 +109,7 @@ enum TYPE_ACHIEV_BRUNDIR = 3, TYPE_ACHIEV_MOLGEIM = 4, TYPE_ACHIEV_STUNNED = 5, + TYPE_ACHIEV_SHATTERED = 6, // Loot chests // Kologarn @@ -199,7 +200,12 @@ enum WORLD_STATE_TIMER = 4132, WORLD_STATE_TIMER_COUNT = 4131, + // events + EVENT_ID_SPELL_SHATTER = 21620, + // Achievement related + ACHIEV_START_IGNIS_ID = 20951, // Ignis timed achievs 2930, 2929 + ACHIEV_CRIT_SARONITE_N = 10451, // General Vezax, achievs 3181, 3188 ACHIEV_CRIT_SARONITE_H = 10462, ACHIEV_CRIT_CAT_LADY_N = 10400, // Auriaya, achievs 3006, 3007 @@ -218,6 +224,8 @@ enum ACHIEV_CRIT_STUNNED_BRUND_H = 10091, // Iron council, achiev 2948 ACHIEV_CRIT_STUNNED_STEEL_H = 10424, ACHIEV_CRIT_STUNNED_MOLG_H = 10425, + ACHIEV_CRIT_SHATTERED_N = 10068, // Ignis, achievs 2925, 2926 + ACHIEV_CRIT_SHATTERED_H = 10069, }; class MANGOS_DLL_DECL instance_ulduar : public ScriptedInstance @@ -248,12 +256,18 @@ class MANGOS_DLL_DECL instance_ulduar : public ScriptedInstance void SpawnFriendlyKeeper(uint32 uiWho); + void DoProcessShatteredEvent(); + + void Update(uint32 uiDiff); + protected: std::string m_strInstData; uint32 m_auiEncounter[MAX_ENCOUNTER]; uint32 m_auiHardBoss[HARD_MODE_ENCOUNTER]; uint32 m_auiUlduarKeepers[KEEPER_ENCOUNTER]; bool m_abAchievCriteria[MAX_SPECIAL_ACHIEV_CRITS]; + + uint32 m_uiShatterAchievTimer; }; #endif diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 5c9c7cc7a..9a88b1542 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2922" + #define SD2_REVISION_NR "2923" #endif // __SD2_REVISION_NR_H__ diff --git a/sd2_revision_sql.h b/sd2_revision_sql.h index 997c33355..8a66bc69a 100644 --- a/sd2_revision_sql.h +++ b/sd2_revision_sql.h @@ -1,5 +1,5 @@ #ifndef __SD2_REVISION_SQL_H__ #define __SD2_REVISION_SQL_H__ - #define REVISION_DB_SCRIPTDEV2 "required__scriptdev2" + #define REVISION_DB_SCRIPTDEV2 "required_" #define REVISION_DB_SD2_MANGOS "required__mangos" #endif // __SD2_REVISION_SQL_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 53f7a74c6..e6eb858e5 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -1269,9 +1269,13 @@ UPDATE creature_template SET ScriptName='boss_feral_defender' WHERE entry=34035; UPDATE creature_template SET ScriptName='boss_brundir' WHERE entry=32857; UPDATE creature_template SET ScriptName='boss_molgeim' WHERE entry=32927; UPDATE creature_template SET ScriptName='boss_steelbreaker' WHERE entry=32867; -DELETE FROM scripted_event_id WHERE id=9735; +UPDATE creature_template SET ScriptName='boss_ignis' WHERE entry=33118; +UPDATE creature_template SET ScriptName='npc_iron_construct' WHERE entry=33121; +UPDATE creature_template SET ScriptName='npc_scorch' WHERE entry=33221; +DELETE FROM scripted_event_id WHERE id IN (9735,21620); INSERT INTO scripted_event_id VALUES -(9735,'event_spell_saronite_barrier'); +(9735,'event_spell_saronite_barrier'), +(21620,'event_ulduar'); /* UN'GORO CRATER */ UPDATE creature_template SET ScriptName='npc_ame01' WHERE entry=9623; diff --git a/sql/updates/r2923_mangos.sql b/sql/updates/r2923_mangos.sql new file mode 100644 index 000000000..74d53aa18 --- /dev/null +++ b/sql/updates/r2923_mangos.sql @@ -0,0 +1,6 @@ +UPDATE creature_template SET ScriptName='boss_ignis' WHERE entry=33118; +UPDATE creature_template SET ScriptName='npc_iron_construct' WHERE entry=33121; +UPDATE creature_template SET ScriptName='npc_scorch' WHERE entry=33221; +DELETE FROM scripted_event_id WHERE id IN (21620); +INSERT INTO scripted_event_id VALUES +(21620,'event_ulduar'); From 53d3c3aaa32bcce63c2ec08862e93819e22ff368 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Wed, 11 Sep 2013 21:39:34 +0300 Subject: [PATCH 0933/1172] Fix typo from previous commit --- sd2_revision_sql.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sd2_revision_sql.h b/sd2_revision_sql.h index 8a66bc69a..997c33355 100644 --- a/sd2_revision_sql.h +++ b/sd2_revision_sql.h @@ -1,5 +1,5 @@ #ifndef __SD2_REVISION_SQL_H__ #define __SD2_REVISION_SQL_H__ - #define REVISION_DB_SCRIPTDEV2 "required_" + #define REVISION_DB_SCRIPTDEV2 "required__scriptdev2" #define REVISION_DB_SD2_MANGOS "required__mangos" #endif // __SD2_REVISION_SQL_H__ From 7077861c3722f6ad689f54537403d7858e6555bd Mon Sep 17 00:00:00 2001 From: Xfurry Date: Thu, 12 Sep 2013 10:13:38 +0300 Subject: [PATCH 0934/1172] [2924] Improve script for Auriaya - Ulduar --- .../northrend/ulduar/ulduar/boss_auriaya.cpp | 98 +++++++++++++------ .../ulduar/ulduar/boss_general_vezax.cpp | 11 ++- sd2_revision_nr.h | 2 +- 3 files changed, 76 insertions(+), 35 deletions(-) diff --git a/scripts/northrend/ulduar/ulduar/boss_auriaya.cpp b/scripts/northrend/ulduar/ulduar/boss_auriaya.cpp index c5fa6f1fb..9a1d86b5e 100644 --- a/scripts/northrend/ulduar/ulduar/boss_auriaya.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_auriaya.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: boss_auriaya -SD%Complete: 0% -SDComment: Aura Remove for Feral Defender needs love +SD%Complete: 100% +SDComment: SDCategory: Ulduar EndScriptData */ @@ -50,20 +50,25 @@ enum SPELL_FERAL_ESSENCE_REMOVAL = 64456, // remove 1 stack of 64455 SPELL_FERAL_POUNCE = 64478, SPELL_FERAL_POUNCE_H = 64669, - SPELL_FERAL_RUSH = 64489, // should trigger repeatedly on random targets 64496 - 64674 + SPELL_FERAL_RUSH = 64489, // triggers 64496 + SPELL_FERAL_RUSH_H = 64673, // triggers 64674 SPELL_SEEPING_FERAL_ESSENCE_SUMMON = 64457, - SPELL_FEIGN_DEATH = 64461, // dummy - possible related to the feral defender feign death - not used + SPELL_FEIGN_DEATH = 64461, // related to the feral defender feign death SPELL_FULL_HEAL = 64460, // on feign death remove // Seeping Feral Essence SPELL_SEEPING_FERAL_ESSENCE = 64458, SPELL_SEEPING_FERAL_ESSENCE_H = 64676, - // NPC_SEEPING_FERAL_ESSENCE = 34098, // summoned by the feral defender on feign death - // NPC_GUARDIAN_SWARN = 34034, // summoned by spell + NPC_SEEPING_FERAL_ESSENCE = 34098, // summoned by the feral defender on feign death + // NPC_GUARDIAN_SWARN = 34034, // summoned by spell NPC_FERAL_DEFENDER_STALKER = 34096, }; +/*###### +## boss_auriaya +######*/ + struct MANGOS_DLL_DECL boss_auriayaAI : public ScriptedAI { boss_auriayaAI(Creature* pCreature) : ScriptedAI(pCreature) @@ -204,28 +209,38 @@ CreatureAI* GetAI_boss_auriaya(Creature* pCreature) return new boss_auriayaAI(pCreature); } +/*###### +## boss_feral_defender +######*/ + struct MANGOS_DLL_DECL boss_feral_defenderAI : public ScriptedAI { boss_feral_defenderAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (instance_ulduar*)pCreature->GetInstanceData(); m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); + m_uiMaxFeralRush = m_bIsRegularMode ? 6 : 10; Reset(); } instance_ulduar* m_pInstance; bool m_bIsRegularMode; + uint8 m_uiFeralRushCount; + uint8 m_uiMaxFeralRush; uint32 m_uiPounceTimer; uint32 m_uiFeralRushTimer; uint32 m_uiReviveDelayTimer; + uint32 m_uiAttackDelayTimer; uint32 m_uiKilledCount; void Reset() override { + m_uiFeralRushCount = 0; m_uiReviveDelayTimer = 0; - m_uiPounceTimer = 5000; - m_uiFeralRushTimer = 10000; + m_uiAttackDelayTimer = 0; + m_uiPounceTimer = urand(9000, 12000); + m_uiFeralRushTimer = urand(3000, 5000); m_uiKilledCount = 0; DoCastSpellIfCan(m_creature, SPELL_FERAL_ESSENCE); @@ -254,11 +269,14 @@ struct MANGOS_DLL_DECL boss_feral_defenderAI : public ScriptedAI { uiDamage = 0; - m_creature->InterruptNonMeleeSpells(true); + // Set Feign death, remove one aura stack and summon a feral essence + DoCastSpellIfCan(m_creature, SPELL_FEIGN_DEATH, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_FERAL_ESSENCE_REMOVAL, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_SEEPING_FERAL_ESSENCE_SUMMON, CAST_TRIGGERED); + + // the feign death aura doesn't do everything, so keep the following here as well m_creature->SetHealth(0); - m_creature->StopMoving(); m_creature->ClearComboPointHolders(); - // m_creature->RemoveAllAurasOnDeath(); // TODO Should only remove negative auras m_creature->ModifyAuraState(AURA_STATE_HEALTHLESS_20_PERCENT, false); m_creature->ModifyAuraState(AURA_STATE_HEALTHLESS_35_PERCENT, false); m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); @@ -267,10 +285,6 @@ struct MANGOS_DLL_DECL boss_feral_defenderAI : public ScriptedAI m_creature->GetMotionMaster()->MoveIdle(); m_creature->SetStandState(UNIT_STAND_STATE_DEAD); - // Remove one aura stack and summon a feral essence - DoCastSpellIfCan(m_creature, SPELL_FERAL_ESSENCE_REMOVAL, CAST_TRIGGERED); - DoCastSpellIfCan(m_creature, SPELL_SEEPING_FERAL_ESSENCE_SUMMON, CAST_TRIGGERED); - m_uiReviveDelayTimer = 30000; ++m_uiKilledCount; } @@ -279,7 +293,8 @@ struct MANGOS_DLL_DECL boss_feral_defenderAI : public ScriptedAI void JustSummoned(Creature* pSummoned) override { // Cast seeping feral essence on the summoned - pSummoned->CastSpell(pSummoned, m_bIsRegularMode ? SPELL_SEEPING_FERAL_ESSENCE : SPELL_SEEPING_FERAL_ESSENCE_H, true, NULL, NULL, m_creature->GetObjectGuid()); + if (pSummoned->GetEntry() == NPC_SEEPING_FERAL_ESSENCE) + pSummoned->CastSpell(pSummoned, m_bIsRegularMode ? SPELL_SEEPING_FERAL_ESSENCE : SPELL_SEEPING_FERAL_ESSENCE_H, true, NULL, NULL, m_creature->GetObjectGuid()); } void UpdateAI(const uint32 uiDiff) override @@ -291,21 +306,34 @@ struct MANGOS_DLL_DECL boss_feral_defenderAI : public ScriptedAI { if (m_uiReviveDelayTimer <= uiDiff) { - if (DoCastSpellIfCan(m_creature, SPELL_FULL_HEAL) == CAST_OK) - { - m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - m_creature->SetStandState(UNIT_STAND_STATE_STAND); + // ToDo: figure out how to enable the ressurrect animation + DoCastSpellIfCan(m_creature, SPELL_FULL_HEAL, CAST_TRIGGERED); + m_uiReviveDelayTimer = 0; + m_uiAttackDelayTimer = 3000; + } + else + m_uiReviveDelayTimer -= uiDiff; - DoResetThreat(); - m_uiReviveDelayTimer = 0; + // No Further action while faking + return; + } - // Assume Attack - it should jump to victim - if (m_creature->getVictim()) - m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); - } + if (m_uiAttackDelayTimer) + { + if (m_uiAttackDelayTimer <= uiDiff) + { + DoResetThreat(); + m_creature->RemoveAurasDueToSpell(SPELL_FEIGN_DEATH); + m_creature->SetStandState(UNIT_STAND_STATE_STAND); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + + m_uiPounceTimer = urand(9000, 10000); + m_uiFeralRushCount = 0; + m_uiFeralRushTimer = 1000; + m_uiAttackDelayTimer = 0; } else - m_uiReviveDelayTimer -= uiDiff; + m_uiAttackDelayTimer -= uiDiff; // No Further action while faking return; @@ -316,7 +344,7 @@ struct MANGOS_DLL_DECL boss_feral_defenderAI : public ScriptedAI if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) { if (DoCastSpellIfCan(pTarget, m_bIsRegularMode ? SPELL_FERAL_POUNCE : SPELL_FERAL_POUNCE_H) == CAST_OK) - m_uiPounceTimer = 5000; + m_uiPounceTimer = urand(13000, 16000); } } else @@ -324,8 +352,18 @@ struct MANGOS_DLL_DECL boss_feral_defenderAI : public ScriptedAI if (m_uiFeralRushTimer < uiDiff) { - if (DoCastSpellIfCan(m_creature, SPELL_FERAL_RUSH) == CAST_OK) - m_uiFeralRushTimer = 35000; + if (DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_FERAL_RUSH : SPELL_FERAL_RUSH_H) == CAST_OK) + { + ++m_uiFeralRushCount; + + if (m_uiFeralRushCount == m_uiMaxFeralRush) + { + m_uiFeralRushCount = 0; + m_uiFeralRushTimer = 12000; + } + else + m_uiFeralRushTimer = 400; + } } else m_uiFeralRushTimer -= uiDiff; diff --git a/scripts/northrend/ulduar/ulduar/boss_general_vezax.cpp b/scripts/northrend/ulduar/ulduar/boss_general_vezax.cpp index 1228cc546..350037731 100644 --- a/scripts/northrend/ulduar/ulduar/boss_general_vezax.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_general_vezax.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: boss_general_vezax -SD%Complete: 80% -SDComment: +SD%Complete: 90% +SDComment: Some details may need some small adjustments SDCategory: Ulduar EndScriptData */ @@ -57,6 +57,10 @@ enum NPC_SARONITE_VAPOR = 33488, }; +/*###### +## boss_general_vezax +######*/ + struct MANGOS_DLL_DECL boss_general_vezaxAI : public ScriptedAI { boss_general_vezaxAI(Creature* pCreature) : ScriptedAI(pCreature) @@ -133,9 +137,8 @@ struct MANGOS_DLL_DECL boss_general_vezaxAI : public ScriptedAI if (m_lVaporsGuids.size() == MAX_HARD_MODE_VAPORS) DoPrepareAnimusIfCan(); } - // ToDo: faction should be set in DB else if (pSummoned->GetEntry() == NPC_SARONITE_ANIMUS) - pSummoned->setFaction(14); + pSummoned->SetInCombatWithZone(); } void SummonedCreatureJustDied(Creature* pSummoned) override diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 9a88b1542..4754a7cc3 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2923" + #define SD2_REVISION_NR "2924" #endif // __SD2_REVISION_NR_H__ From bbc4c4d6707cf59aabe9e02b1c44ad71cece59a3 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Thu, 12 Sep 2013 12:00:46 +0300 Subject: [PATCH 0935/1172] [2925] Add basic script for XT-002 - Ulduar --- .../northrend/ulduar/ulduar/boss_xt_002.cpp | 153 +++++++++++++++++- .../ulduar/ulduar/instance_ulduar.cpp | 6 + scripts/northrend/ulduar/ulduar/ulduar.h | 8 + sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 + sql/updates/r2925_mangos.sql | 1 + 6 files changed, 169 insertions(+), 2 deletions(-) create mode 100644 sql/updates/r2925_mangos.sql diff --git a/scripts/northrend/ulduar/ulduar/boss_xt_002.cpp b/scripts/northrend/ulduar/ulduar/boss_xt_002.cpp index 385adb05d..78dbfde82 100644 --- a/scripts/northrend/ulduar/ulduar/boss_xt_002.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_xt_002.cpp @@ -16,7 +16,7 @@ /* ScriptData SDName: boss_xt_002 -SD%Complete: 0% +SD%Complete: 20% SDComment: SDCategory: Ulduar EndScriptData */ @@ -38,9 +38,160 @@ enum EMOTE_HEART = -1603054, EMOTE_REPAIR = -1603055, + + // spells + SPELL_TANCTRUM = 62776, + SPELL_SEARING_LIGHT = 63018, + SPELL_SEARING_LIGHT_H = 65121, + SPELL_GRAVITY_BOMB = 63024, + SPELL_GRAVITY_BOMB_H = 64234, + SPELL_BERSERK = 26662, + + // hard mode spells + SPELL_HEARTBREAK = 65737, + SPELL_HEARTBREAK_H = 64193, + SPELL_VOIDZONE = 64203, + SPELL_VOIDZONE_H = 64235, + SPELL_LIFE_SPARK = 64210, + + // heart of XT002 spells + SPELL_HEART_RIDE_VEHICLE = 63852, // ride seat 1 - procs on damage (probably spell 17683) + SPELL_RIDE_VEHICLE = 63313, // ride seat 2 + SPELL_LIGHTNING_TETHER = 64799, // dummy, triggers 62789 and 63849 + SPELL_HEART_OVERLOAD = 62789, // triggers missing spell 62791 - used to spawn adds + SPELL_EXPOSED_HEART = 63849, // procs on damage + SPELL_ENERGY_ORB = 62790, // targets 33337, in order to start spawning robots + + // robot summoning spells + SPELL_RECHARGE_ROBOT_1 = 62828, // summons 33343 + SPELL_RECHARGE_ROBOT_2 = 62835, // summons 33346 + SPELL_RECHARGE_ROBOT_3 = 62831, // summons 33344 + + // summoned spells + SPELL_CONSUMPTION = 64208, // cast by the void zone + SPELL_ARCANE_POWER_STATE = 49411, // cast by the life spark + SPELL_STATIC_CHARGED = 64227, // cast by the life spark (needs to be confirmed) + SPELL_STATIC_CHARGED_H = 64236, + + // NPC ids + NPC_SCRAPBOT = 33343, + NPC_BOOMBOT = 33346, + NPC_PUMMELLER = 33344, + NPC_VOIDZONE = 34001, + NPC_LIFE_SPARK = 34004, + NPC_XT_TOY_PILE = 33337, +}; + +/*###### +## boss_xt_002 +######*/ + +struct MANGOS_DLL_DECL boss_xt_002AI : public ScriptedAI +{ + boss_xt_002AI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (instance_ulduar*)pCreature->GetInstanceData(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); + m_uiMountTimer = 1000; + Reset(); + } + + instance_ulduar* m_pInstance; + bool m_bIsRegularMode; + + uint32 m_uiBerserkTimer; + uint32 m_uiMountTimer; + + void Reset() override + { + m_uiBerserkTimer = 10 * MINUTE * IN_MILLISECONDS; + } + + void JustDied(Unit* pKiller) override + { + if (m_pInstance) + m_pInstance->SetData(TYPE_XT002, DONE); + + DoScriptText(SAY_DEATH, m_creature); + } + + void KilledUnit(Unit* pVictim) override + { + if (pVictim->GetTypeId() != TYPEID_PLAYER) + return; + + DoScriptText(urand(0, 1) ? SAY_SLAY_1 : SAY_SLAY_2, m_creature); + } + + void Aggro(Unit* pWho) override + { + if (m_pInstance) + m_pInstance->SetData(TYPE_XT002, IN_PROGRESS); + + DoScriptText(SAY_AGGRO, m_creature); + } + + void JustReachedHome() override + { + if (m_pInstance) + m_pInstance->SetData(TYPE_XT002, FAIL); + } + + void JustSummoned(Creature* pSummoned) override + { + } + + void UpdateAI(const uint32 uiDiff) override + { + if (!m_pInstance) + return; + + // The heart needs to be mounted manually, not by vehicle_accessories + if (m_uiMountTimer) + { + if (m_uiMountTimer <= uiDiff) + { + if (Creature* pHeart = m_pInstance->GetSingleCreatureFromStorage(NPC_HEART_DECONSTRUCTOR)) + pHeart->CastSpell(m_creature, SPELL_HEART_RIDE_VEHICLE, true); + + m_uiMountTimer = 0; + } + else + m_uiMountTimer -= uiDiff; + } + + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_uiBerserkTimer) + { + if (m_uiBerserkTimer <= uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_BERSERK) == CAST_OK) + { + DoScriptText(SAY_BERSERK, m_creature); + m_uiBerserkTimer = 0; + } + } + else + m_uiBerserkTimer -= uiDiff; + } + + DoMeleeAttackIfReady(); + } }; +CreatureAI* GetAI_boss_xt_002(Creature* pCreature) +{ + return new boss_xt_002AI(pCreature); +} + void AddSC_boss_xt_002() { + Script* pNewScript; + pNewScript = new Script; + pNewScript->Name = "boss_xt_002"; + pNewScript->GetAI = GetAI_boss_xt_002; + pNewScript->RegisterSelf(); } diff --git a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp index 1676f53b5..d02f32956 100644 --- a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp +++ b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp @@ -71,6 +71,7 @@ void instance_ulduar::OnCreatureCreate(Creature* pCreature) case NPC_RAZORSCALE: case NPC_COMMANDER: case NPC_XT002: + case NPC_HEART_DECONSTRUCTOR: case NPC_STEELBREAKER: case NPC_MOLGEIM: case NPC_BRUNDIR: @@ -290,6 +291,8 @@ void instance_ulduar::SetData(uint32 uiType, uint32 uiData) case TYPE_XT002: m_auiEncounter[uiType] = uiData; DoUseDoorOrButton(GO_XT002_GATE); + if (uiData == IN_PROGRESS) + DoStartTimedAchievement(ACHIEVEMENT_CRITERIA_TYPE_KILL_CREATURE, ACHIEV_START_XT002_ID); break; case TYPE_ASSEMBLY: // Don't set the same encounter data twice @@ -630,6 +633,9 @@ bool instance_ulduar::CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player c case ACHIEV_CRIT_SHATTERED_N: case ACHIEV_CRIT_SHATTERED_H: return m_abAchievCriteria[TYPE_ACHIEV_SHATTERED]; + case ACHIEV_CRIT_HEARTBREAKER_N: + case ACHIEV_CRIT_HEARTBREAKER_H: + return GetData(TYPE_XT002_HARD) == DONE; default: return false; diff --git a/scripts/northrend/ulduar/ulduar/ulduar.h b/scripts/northrend/ulduar/ulduar/ulduar.h index 8dfa34d1b..e6f0475ae 100644 --- a/scripts/northrend/ulduar/ulduar/ulduar.h +++ b/scripts/northrend/ulduar/ulduar/ulduar.h @@ -50,6 +50,7 @@ enum NPC_RAZORSCALE = 33186, NPC_COMMANDER = 33210, NPC_XT002 = 33293, + NPC_HEART_DECONSTRUCTOR = 33329, // The antechamber of ulduar NPC_STEELBREAKER = 32867, @@ -205,6 +206,7 @@ enum // Achievement related ACHIEV_START_IGNIS_ID = 20951, // Ignis timed achievs 2930, 2929 + ACHIEV_START_XT002_ID = 21027, // XT-002 timed achievs 2937, 2938 ACHIEV_CRIT_SARONITE_N = 10451, // General Vezax, achievs 3181, 3188 ACHIEV_CRIT_SARONITE_H = 10462, @@ -226,6 +228,12 @@ enum ACHIEV_CRIT_STUNNED_MOLG_H = 10425, ACHIEV_CRIT_SHATTERED_N = 10068, // Ignis, achievs 2925, 2926 ACHIEV_CRIT_SHATTERED_H = 10069, + ACHIEV_CRIT_HEARTBREAKER_N = 10221, // XT-002, achievs 3058, 3059 + ACHIEV_CRIT_HEARTBREAKER_H = 10220, + ACHIEV_CRIT_NERF_ENG_N = 10074, // XT-002, achievs 2931, 2932 + ACHIEV_CRIT_NERF_ENG_H = 10075, + ACHIEV_CRIT_NERF_GRAVITY_N = 10077, // XT-002, achievs 2934, 2936 + ACHIEV_CRIT_NERF_GRAVITY_H = 10079, }; class MANGOS_DLL_DECL instance_ulduar : public ScriptedInstance diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 4754a7cc3..9311b4eea 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2924" + #define SD2_REVISION_NR "2925" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index e6eb858e5..ee061f502 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -1272,6 +1272,7 @@ UPDATE creature_template SET ScriptName='boss_steelbreaker' WHERE entry=32867; UPDATE creature_template SET ScriptName='boss_ignis' WHERE entry=33118; UPDATE creature_template SET ScriptName='npc_iron_construct' WHERE entry=33121; UPDATE creature_template SET ScriptName='npc_scorch' WHERE entry=33221; +UPDATE creature_template SET ScriptName='boss_xt_002' WHERE entry=33293; DELETE FROM scripted_event_id WHERE id IN (9735,21620); INSERT INTO scripted_event_id VALUES (9735,'event_spell_saronite_barrier'), diff --git a/sql/updates/r2925_mangos.sql b/sql/updates/r2925_mangos.sql new file mode 100644 index 000000000..4951c7237 --- /dev/null +++ b/sql/updates/r2925_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='boss_xt_002' WHERE entry=33293; From 73f2d80b97c971ff58d876147c23493e89ecf1fb Mon Sep 17 00:00:00 2001 From: Xfurry Date: Fri, 13 Sep 2013 16:51:27 +0300 Subject: [PATCH 0936/1172] [2926] Implement combat abilities for XT-00 Deconstructor - Ulduar Please note that the following are not yet implemented: * Scrapbot healing - will require more research * Damage share during heart phase * Hard mode abilities * Special achievements --- .../northrend/ulduar/ulduar/boss_xt_002.cpp | 333 +++++++++++++++++- .../ulduar/ulduar/instance_ulduar.cpp | 4 + scripts/northrend/ulduar/ulduar/ulduar.h | 5 + sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 2 + sql/scriptdev2_script_full.sql | 9 +- sql/updates/r2926_mangos.sql | 2 + sql/updates/r2926_scriptdev2.sql | 6 + 8 files changed, 349 insertions(+), 14 deletions(-) create mode 100644 sql/updates/r2926_mangos.sql create mode 100644 sql/updates/r2926_scriptdev2.sql diff --git a/scripts/northrend/ulduar/ulduar/boss_xt_002.cpp b/scripts/northrend/ulduar/ulduar/boss_xt_002.cpp index 78dbfde82..7106d855b 100644 --- a/scripts/northrend/ulduar/ulduar/boss_xt_002.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_xt_002.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: boss_xt_002 -SD%Complete: 20% -SDComment: +SD%Complete: 70% +SDComment: Timers may need adjustments; Scrapbot healing, achievements and hard mode abilities NYI. SDCategory: Ulduar EndScriptData */ @@ -38,14 +38,17 @@ enum EMOTE_HEART = -1603054, EMOTE_REPAIR = -1603055, + EMOTE_KILL_HEART = -1603236, + EMOTE_EARTH_QUAKE = -1603237, // spells - SPELL_TANCTRUM = 62776, + SPELL_TYMPANIC_TANTRUM = 62776, SPELL_SEARING_LIGHT = 63018, SPELL_SEARING_LIGHT_H = 65121, SPELL_GRAVITY_BOMB = 63024, SPELL_GRAVITY_BOMB_H = 64234, SPELL_BERSERK = 26662, + // SPELL_STAND = 37752, // cast after a heart phase. not used because it's unk purpose // hard mode spells SPELL_HEARTBREAK = 65737, @@ -56,13 +59,15 @@ enum // heart of XT002 spells SPELL_HEART_RIDE_VEHICLE = 63852, // ride seat 1 - procs on damage (probably spell 17683) + SPELL_FULL_HEAL = 17683, SPELL_RIDE_VEHICLE = 63313, // ride seat 2 - SPELL_LIGHTNING_TETHER = 64799, // dummy, triggers 62789 and 63849 - SPELL_HEART_OVERLOAD = 62789, // triggers missing spell 62791 - used to spawn adds - SPELL_EXPOSED_HEART = 63849, // procs on damage + SPELL_LIGHTNING_TETHER = 64799, // dummy + SPELL_HEART_OVERLOAD = 62789, // triggers missing spell 62791 + SPELL_EXPOSED_HEART = 63849, // procs on damage; triggers missing spell 62791 SPELL_ENERGY_ORB = 62790, // targets 33337, in order to start spawning robots + SPELL_ENERGY_ORB_DUMMY = 62826, // dummy effect which spawns robots - not used due to core targeting issues - // robot summoning spells + // robot summoning spells, used by the XT toy pile SPELL_RECHARGE_ROBOT_1 = 62828, // summons 33343 SPELL_RECHARGE_ROBOT_2 = 62835, // summons 33346 SPELL_RECHARGE_ROBOT_3 = 62831, // summons 33344 @@ -79,7 +84,13 @@ enum NPC_PUMMELLER = 33344, NPC_VOIDZONE = 34001, NPC_LIFE_SPARK = 34004, - NPC_XT_TOY_PILE = 33337, + + // phases + PHASE_NORMAL = 1, + PHASE_TRANSITION = 2, + PHASE_HEART = 3, + + MAX_SCRAPBOTS = 5, }; /*###### @@ -102,9 +113,28 @@ struct MANGOS_DLL_DECL boss_xt_002AI : public ScriptedAI uint32 m_uiBerserkTimer; uint32 m_uiMountTimer; + uint8 m_uiPhase; + uint8 m_uiHeartStage; + + uint32 m_uiHeartTimer; + uint32 m_uiLightBombTimer; + uint32 m_uiGravityBombTimer; + uint32 m_uiTanctrumTimer; + void Reset() override { m_uiBerserkTimer = 10 * MINUTE * IN_MILLISECONDS; + + m_uiPhase = PHASE_NORMAL; + m_uiHeartStage = 1; + + m_uiLightBombTimer = 10000; + m_uiGravityBombTimer = 20000; + m_uiTanctrumTimer = 35000; + + // reset flags and stand state + m_creature->SetStandState(UNIT_STAND_STATE_STAND); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); } void JustDied(Unit* pKiller) override @@ -126,7 +156,10 @@ struct MANGOS_DLL_DECL boss_xt_002AI : public ScriptedAI void Aggro(Unit* pWho) override { if (m_pInstance) + { m_pInstance->SetData(TYPE_XT002, IN_PROGRESS); + m_pInstance->SetData(TYPE_XT002_HARD, NOT_STARTED); + } DoScriptText(SAY_AGGRO, m_creature); } @@ -134,17 +167,56 @@ struct MANGOS_DLL_DECL boss_xt_002AI : public ScriptedAI void JustReachedHome() override { if (m_pInstance) + { m_pInstance->SetData(TYPE_XT002, FAIL); + + // mount the Heart back at the right seat after wipe or respawn (respawn handled in DB) + m_uiMountTimer = 1000; + } } - void JustSummoned(Creature* pSummoned) override + void ReceiveAIEvent(AIEventType eventType, Creature* /*pSender*/, Unit* pInvoker, uint32 /*uiMiscValue*/) override + { + // enable hard mode + if (eventType == AI_EVENT_CUSTOM_B && pInvoker->GetEntry() == NPC_HEART_DECONSTRUCTOR) + { + // reset to normal phase and don't allow the boss to get back to heart phases + DoResetToNormalPhase(); + m_uiHeartStage = 4; + + if (m_pInstance) + m_pInstance->SetData(TYPE_XT002_HARD, DONE); + + DoScriptText(EMOTE_KILL_HEART, m_creature); + DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_HEARTBREAK : SPELL_HEARTBREAK_H, CAST_TRIGGERED); + + // no spell used for this action + m_creature->SetHealth(m_creature->GetMaxHealth()); + } + } + + // wrapper to reset to normal phase + void DoResetToNormalPhase() { + DoScriptText(SAY_HEART_CLOSE, m_creature); + m_creature->SetStandState(UNIT_STAND_STATE_STAND); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + + DoStartMovement(m_creature->getVictim()); + + // reset timers as well + m_uiLightBombTimer = 10000; + m_uiGravityBombTimer = 20000; + m_uiPhase = PHASE_NORMAL; } void UpdateAI(const uint32 uiDiff) override { if (!m_pInstance) + { + script_error_log("Instance Ulduar: ERROR Failed to load instance data for this instace."); return; + } // The heart needs to be mounted manually, not by vehicle_accessories if (m_uiMountTimer) @@ -152,7 +224,14 @@ struct MANGOS_DLL_DECL boss_xt_002AI : public ScriptedAI if (m_uiMountTimer <= uiDiff) { if (Creature* pHeart = m_pInstance->GetSingleCreatureFromStorage(NPC_HEART_DECONSTRUCTOR)) + { + // safeguard in case the Heart isn't respawned + if (!pHeart->isAlive()) + pHeart->Respawn(); + + pHeart->AI()->EnterEvadeMode(); pHeart->CastSpell(m_creature, SPELL_HEART_RIDE_VEHICLE, true); + } m_uiMountTimer = 0; } @@ -177,7 +256,99 @@ struct MANGOS_DLL_DECL boss_xt_002AI : public ScriptedAI m_uiBerserkTimer -= uiDiff; } - DoMeleeAttackIfReady(); + switch (m_uiPhase) + { + case PHASE_NORMAL: + + if (m_uiLightBombTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_SEARING_LIGHT : SPELL_SEARING_LIGHT_H) == CAST_OK) + m_uiLightBombTimer = 20000; + } + else + m_uiLightBombTimer -= uiDiff; + + if (m_uiGravityBombTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_GRAVITY_BOMB : SPELL_GRAVITY_BOMB_H) == CAST_OK) + m_uiGravityBombTimer = 20000; + } + else + m_uiGravityBombTimer -= uiDiff; + + if (m_uiTanctrumTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_TYMPANIC_TANTRUM) == CAST_OK) + { + DoScriptText(SAY_TANCTRUM, m_creature); + DoScriptText(EMOTE_EARTH_QUAKE, m_creature); + m_uiTanctrumTimer = 60000; + } + } + else + m_uiTanctrumTimer -= uiDiff; + + // start heart stage transition + if (m_creature->GetHealthPercent() < float(100 - 25 * m_uiHeartStage)) + { + DoScriptText(SAY_HEART_OPEN, m_creature); + + ++m_uiHeartStage; + m_uiHeartTimer = 5000; + m_uiPhase = PHASE_TRANSITION; + + // stop all movement + m_creature->GetMotionMaster()->MoveIdle(); + } + + DoMeleeAttackIfReady(); + + break; + case PHASE_TRANSITION: + + if (m_uiHeartTimer < uiDiff) + { + // inform the heart about the phase switch + if (Creature* pHeart = m_pInstance->GetSingleCreatureFromStorage(NPC_HEART_DECONSTRUCTOR)) + m_creature->AI()->SendAIEvent(AI_EVENT_CUSTOM_A, m_creature, pHeart); + + DoScriptText(EMOTE_HEART, m_creature); + + m_creature->SetStandState(UNIT_STAND_STATE_CUSTOM); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + + m_uiHeartTimer = 30000; + m_uiPhase = PHASE_HEART; + } + else + m_uiHeartTimer -= uiDiff; + + break; + case PHASE_HEART: + + // reset to normal phase when timer expires + if (m_uiHeartTimer < uiDiff) + { + DoResetToNormalPhase(); + m_uiHeartTimer = 0; + + // mount the heart back inside if not already killed + if (m_pInstance && m_pInstance->GetData(TYPE_XT002_HARD) != DONE) + { + if (Creature* pHeart = m_pInstance->GetSingleCreatureFromStorage(NPC_HEART_DECONSTRUCTOR)) + { + pHeart->CastSpell(m_creature, SPELL_HEART_RIDE_VEHICLE, true); + + // no spell found for this + pHeart->SetHealth(pHeart->GetMaxHealth()); + } + } + } + else + m_uiHeartTimer -= uiDiff; + + break; + } } }; @@ -186,6 +357,138 @@ CreatureAI* GetAI_boss_xt_002(Creature* pCreature) return new boss_xt_002AI(pCreature); } +/*###### +## boss_heart_deconstructor +######*/ + +struct MANGOS_DLL_DECL boss_heart_deconstructorAI : public ScriptedAI +{ + boss_heart_deconstructorAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (instance_ulduar*)pCreature->GetInstanceData(); + Reset(); + } + + instance_ulduar* m_pInstance; + + uint32 m_uiRobotTimer; + + GuidVector m_vToyPileGuids; + + void Reset() override + { + m_uiRobotTimer = 0; + + // load the toy piles guids + m_vToyPileGuids.clear(); + if (m_pInstance) + m_pInstance->GetToyPileGuids(m_vToyPileGuids); + } + + void JustDied(Unit* pKiller) override + { + // notify XT that hard mode is enabled + if (m_pInstance) + { + if (Creature* pDeconstructor = m_pInstance->GetSingleCreatureFromStorage(NPC_XT002)) + m_creature->AI()->SendAIEvent(AI_EVENT_CUSTOM_B, m_creature, pDeconstructor); + } + } + + void JustSummoned(Creature* pSummoned) override + { + // handle spawned robots + if (m_pInstance) + { + if (Creature* pDeconstructor = m_pInstance->GetSingleCreatureFromStorage(NPC_XT002)) + { + float fX, fY, fZ; + pDeconstructor->GetContactPoint(pSummoned, fX, fY, fZ, INTERACTION_DISTANCE); + pSummoned->GetMotionMaster()->MovePoint(0, fX, fY, fZ); + } + } + } + + void ReceiveAIEvent(AIEventType eventType, Creature* /*pSender*/, Unit* pInvoker, uint32 /*uiMiscValue*/) override + { + // start XT phase switch and start recharging robots + if (eventType == AI_EVENT_CUSTOM_A && pInvoker->GetEntry() == NPC_XT002) + { + DoCastSpellIfCan(pInvoker, SPELL_RIDE_VEHICLE, CAST_TRIGGERED); + DoCastSpellIfCan(pInvoker, SPELL_LIGHTNING_TETHER, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_HEART_OVERLOAD, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_EXPOSED_HEART, CAST_TRIGGERED); + m_uiRobotTimer = 1000; + } + } + + // TODO: Use the dummy effect on target when proper targeting will be supported in core + void SpellHitTarget(Unit* pTarget, SpellEntry const* pSpellEntry) override + { + if (pTarget->GetEntry() == NPC_XT_TOY_PILE && pSpellEntry->Id == SPELL_ENERGY_ORB) + { + // spawn a bunch of scrap bots + for (uint8 i = 0; i < MAX_SCRAPBOTS; ++i) + pTarget->CastSpell(pTarget, SPELL_RECHARGE_ROBOT_1, true, NULL, NULL, m_creature->GetObjectGuid()); + + // spawn a boombot or pummeller, depending on chance + pTarget->CastSpell(pTarget, roll_chance_i(80) ? SPELL_RECHARGE_ROBOT_2 : SPELL_RECHARGE_ROBOT_3, true, NULL, NULL, m_creature->GetObjectGuid()); + } + } + + void AttackStart(Unit* /*pWho*/) override { } + void MoveInLineOfSight(Unit* /*pWho*/) override { } + + void UpdateAI(const uint32 uiDiff) override + { + if (m_uiRobotTimer) + { + if (m_uiRobotTimer <= uiDiff) + { + // visual effect on XT (script target) + DoCastSpellIfCan(m_creature, SPELL_LIGHTNING_TETHER, CAST_TRIGGERED); + + // cast the enerby orb on each pile one by one + if (Creature* pToyPile = m_creature->GetMap()->GetCreature(m_vToyPileGuids[urand(0, m_vToyPileGuids.size() - 1)])) + DoCastSpellIfCan(pToyPile, SPELL_ENERGY_ORB, CAST_TRIGGERED); + + // reset timer after the overload aura expires + if (m_creature->HasAura(SPELL_EXPOSED_HEART)) + m_uiRobotTimer = urand(1000, 3000); + else + m_uiRobotTimer = 0; + } + else + m_uiRobotTimer -= uiDiff; + } + } +}; + +CreatureAI* GetAI_boss_heart_deconstructor(Creature* pCreature) +{ + return new boss_heart_deconstructorAI(pCreature); +} + +/*###### +## npc_xt_toy_pile +######*/ + +// TODO Remove this 'script' when combat can be proper prevented from core-side +struct MANGOS_DLL_DECL npc_xt_toy_pileAI : public Scripted_NoMovementAI +{ + npc_xt_toy_pileAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { Reset(); } + + void Reset() override { } + void AttackStart(Unit* /*pWho*/) override { } + void MoveInLineOfSight(Unit* /*pWho*/) override { } + void UpdateAI(const uint32 /*uiDiff*/) override { } +}; + +CreatureAI* GetAI_npc_xt_toy_pile(Creature* pCreature) +{ + return new npc_xt_toy_pileAI(pCreature); +} + void AddSC_boss_xt_002() { Script* pNewScript; @@ -194,4 +497,14 @@ void AddSC_boss_xt_002() pNewScript->Name = "boss_xt_002"; pNewScript->GetAI = GetAI_boss_xt_002; pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "boss_heart_deconstructor"; + pNewScript->GetAI = GetAI_boss_heart_deconstructor; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_xt_toy_pile"; + pNewScript->GetAI = GetAI_npc_xt_toy_pile; + pNewScript->RegisterSelf(); } diff --git a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp index d02f32956..bda6df3be 100644 --- a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp +++ b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp @@ -112,6 +112,10 @@ void instance_ulduar::OnCreatureCreate(Creature* pCreature) SpawnFriendlyKeeper(NPC_FREYA_IMAGE); break; + case NPC_XT_TOY_PILE: + m_vToyPileGuidVector.push_back(pCreature->GetObjectGuid()); + return; + default: return; } diff --git a/scripts/northrend/ulduar/ulduar/ulduar.h b/scripts/northrend/ulduar/ulduar/ulduar.h index e6f0475ae..07fe5e643 100644 --- a/scripts/northrend/ulduar/ulduar/ulduar.h +++ b/scripts/northrend/ulduar/ulduar/ulduar.h @@ -51,6 +51,7 @@ enum NPC_COMMANDER = 33210, NPC_XT002 = 33293, NPC_HEART_DECONSTRUCTOR = 33329, + NPC_XT_TOY_PILE = 33337, // The antechamber of ulduar NPC_STEELBREAKER = 32867, @@ -266,6 +267,8 @@ class MANGOS_DLL_DECL instance_ulduar : public ScriptedInstance void DoProcessShatteredEvent(); + void GetToyPileGuids(GuidVector& vToyPiles) { vToyPiles = m_vToyPileGuidVector; } + void Update(uint32 uiDiff); protected: @@ -276,6 +279,8 @@ class MANGOS_DLL_DECL instance_ulduar : public ScriptedInstance bool m_abAchievCriteria[MAX_SPECIAL_ACHIEV_CRITS]; uint32 m_uiShatterAchievTimer; + + GuidVector m_vToyPileGuidVector; }; #endif diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 9311b4eea..a06d1876f 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2925" + #define SD2_REVISION_NR "2926" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index ee061f502..f4e7ad671 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -1273,6 +1273,8 @@ UPDATE creature_template SET ScriptName='boss_ignis' WHERE entry=33118; UPDATE creature_template SET ScriptName='npc_iron_construct' WHERE entry=33121; UPDATE creature_template SET ScriptName='npc_scorch' WHERE entry=33221; UPDATE creature_template SET ScriptName='boss_xt_002' WHERE entry=33293; +UPDATE creature_template SET ScriptName='boss_heart_deconstructor' WHERE entry=33329; +UPDATE creature_template SET ScriptName='npc_xt_toy_pile' WHERE entry=33337; DELETE FROM scripted_event_id WHERE id IN (9735,21620); INSERT INTO scripted_event_id VALUES (9735,'event_spell_saronite_barrier'), diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 580f65202..611a5a79f 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -3413,8 +3413,8 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1603051,'So tired. I will rest for just a moment!',15725,1,0,0,'xt-002 SAY_HEART_OPEN'), (-1603052,'I\'m ready to play!',15726,1,0,0,'xt-002 SAY_HEART_CLOSE'), (-1603053,'NO! NO! NO! NO! NO!',15727,1,0,0,'xt-002 SAY_TANCTRUM'), -(-1603054,'XT-002 Deconstructor\'s heart is exposed and leaking energy!',0,3,0,0,'xt-002 EMOTE_EXPOSE_HEART'), -(-1603055,'XT-002 Deconstructor consumes a scrapbot to repair himself.',0,3,0,0,'xt-002 EMOTE_REPAIR'), +(-1603054,'%s\'s heart is exposed and leaking energy.',0,3,0,0,'xt-002 EMOTE_EXPOSE_HEART'), +(-1603055,'%s consumes a scrapbot to repair himself!',0,3,0,0,'xt-002 EMOTE_REPAIR'), (-1603056,'Whether the world\'s greatest gnats or the world\'s greatest heroes, you\'re still only mortal.',15684,1,0,0,'brundir SAY_BRUNDIR_AGGRO'), (-1603057,'Stand still and stare into the light!',15687,1,0,0,'brundir SAY_BRUNDIR_WHIRL'), @@ -3627,7 +3627,10 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1603233,'Your petty quarrels only make me stronger!',15764,0,0,0,'yogg SAY_YOGG_V1_3'), (-1603234,'Portals open into Yogg-Saron\'s mind!',0,3,0,0,'yogg EMOTE_VISION_BLAST'), -(-1603235,'The illusion shatters and a path to the central chamber opens!',0,3,0,0,'yogg EMOTE_SHATTER_BLAST'); +(-1603235,'The illusion shatters and a path to the central chamber opens!',0,3,0,0,'yogg EMOTE_SHATTER_BLAST'), + +(-1603236,'%s\'s heart is severed from his body.',0,3,0,0,'xt-002 EMOTE_KILL_HEART'), +(-1603237,'%s begins to cause the earth to quake.',0,3,0,0,'xt-002 EMOTE_EARTH_QUAKE'); -- -1 604 000 GUNDRAK INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES diff --git a/sql/updates/r2926_mangos.sql b/sql/updates/r2926_mangos.sql new file mode 100644 index 000000000..168446c51 --- /dev/null +++ b/sql/updates/r2926_mangos.sql @@ -0,0 +1,2 @@ +UPDATE creature_template SET ScriptName='boss_heart_deconstructor' WHERE entry=33329; +UPDATE creature_template SET ScriptName='npc_xt_toy_pile' WHERE entry=33337; diff --git a/sql/updates/r2926_scriptdev2.sql b/sql/updates/r2926_scriptdev2.sql new file mode 100644 index 000000000..c95c8f07c --- /dev/null +++ b/sql/updates/r2926_scriptdev2.sql @@ -0,0 +1,6 @@ +DELETE FROM script_texts WHERE entry IN (-1603054,-1603055,-1603236,-1603237); +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1603054,'%s\'s heart is exposed and leaking energy.',0,3,0,0,'xt-002 EMOTE_EXPOSE_HEART'), +(-1603055,'%s consumes a scrapbot to repair himself!',0,3,0,0,'xt-002 EMOTE_REPAIR'), +(-1603236,'%s\'s heart is severed from his body.',0,3,0,0,'xt-002 EMOTE_KILL_HEART'), +(-1603237,'%s begins to cause the earth to quake.',0,3,0,0,'xt-002 EMOTE_EARTH_QUAKE'); From 950a7f6af735e824f9ad34d922cf3f17fe7bfee8 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sat, 14 Sep 2013 15:39:51 +0300 Subject: [PATCH 0937/1172] [2927] Add basic script for Razorscale - Ulduar Also make some minor changes to Ignis script --- .../northrend/ulduar/ulduar/boss_ignis.cpp | 11 +- .../ulduar/ulduar/boss_razorscale.cpp | 254 +++++++++++++++++- .../northrend/ulduar/ulduar/boss_xt_002.cpp | 1 + .../ulduar/ulduar/instance_ulduar.cpp | 10 +- scripts/northrend/ulduar/ulduar/ulduar.h | 14 +- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 2 + sql/scriptdev2_script_full.sql | 9 +- sql/updates/r2927_mangos.sql | 2 + sql/updates/r2927_scriptdev2.sql | 7 + 10 files changed, 294 insertions(+), 18 deletions(-) create mode 100644 sql/updates/r2927_mangos.sql create mode 100644 sql/updates/r2927_scriptdev2.sql diff --git a/scripts/northrend/ulduar/ulduar/boss_ignis.cpp b/scripts/northrend/ulduar/ulduar/boss_ignis.cpp index cd12da4e6..bb96e33ee 100644 --- a/scripts/northrend/ulduar/ulduar/boss_ignis.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_ignis.cpp @@ -29,7 +29,7 @@ enum SAY_AGGRO = -1603026, SAY_SLAGPOT_1 = -1603027, SAY_SLAGPOT_2 = -1603028, - SAY_SLAGPOT_3 = -1603029, + SAY_FLAME_JETS = -1603029, SAY_ADDS = -1603030, SAY_SLAY_1 = -1603031, SAY_SLAY_2 = -1603032, @@ -37,6 +37,7 @@ enum SAY_DEATH = -1603034, EMOTE_FLAME_JETS = -1603035, + EMOTE_EXTINGUISH_SCORCH = -1603238, // spells SPELL_FLAME_JETS = 62680, @@ -176,6 +177,7 @@ struct MANGOS_DLL_DECL boss_ignisAI : public ScriptedAI if (DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_FLAME_JETS : SPELL_FLAME_JETS_H) == CAST_OK) { DoScriptText(EMOTE_FLAME_JETS, m_creature); + DoScriptText(SAY_FLAME_JETS, m_creature); m_uiFlameJetsTimer = 35000; } } @@ -188,12 +190,7 @@ struct MANGOS_DLL_DECL boss_ignisAI : public ScriptedAI { if (DoCastSpellIfCan(pTarget, SPELL_GRAB) == CAST_OK) { - switch (urand(0, 2)) - { - case 0: DoScriptText(SAY_SLAGPOT_1, m_creature); break; - case 1: DoScriptText(SAY_SLAGPOT_2, m_creature); break; - case 2: DoScriptText(SAY_SLAGPOT_3, m_creature); break; - } + DoScriptText(urand(0, 1) ? SAY_SLAGPOT_1 : SAY_SLAGPOT_2, m_creature); m_uiSlagPotTimer = 30000; } } diff --git a/scripts/northrend/ulduar/ulduar/boss_razorscale.cpp b/scripts/northrend/ulduar/ulduar/boss_razorscale.cpp index 0829694e1..f103b6f17 100644 --- a/scripts/northrend/ulduar/ulduar/boss_razorscale.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_razorscale.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: boss_razorscale -SD%Complete: 0% -SDComment: +SD%Complete: 20% +SDComment: Intro and basic script SDCategory: Ulduar EndScriptData */ @@ -36,9 +36,259 @@ enum EMOTE_BREATH = -1603042, EMOTE_HARPOON_READY = -1603043, EMOTE_GROUNDED = -1603044, + + // general spells (used in both ground and air phases) + SPELL_BERSERK = 47008, + SPELL_DEVOURING_FLAME = 63236, + SPELL_FLAME_BREATH = 63317, + SPELL_FLAME_BREATH_H = 64021, + + // razorscale air phase spells + SPELL_FIREBALL = 62796, + SPELL_FIREBALL_H = 63815, + SPELL_STUN = 62794, + // SPELL_SHACKLE = 62646, // channeled on Razorscale intro by npc 33259; currently not used because of missing intro data + + // phase 2 transition spells + SPELL_WING_BUFFET = 62666, + SPELL_FIREBOLT = 62669, // target npc 33282 - destroy the harpoons + SPELL_HARPOON_FIRE = 62696, // visual when harpoons are destroyed, cast by 33282 + + // ground spells + SPELL_FLAME_BUFFET = 64016, + SPELL_FLAME_BUFFET_H = 64023, + SPELL_FUSE_ARMOR = 64771, + + // summoned spells + SPELL_DEVOURING_FLAME_AURA = 64709, + SPELL_DEVOURING_FLAME_AURA_H = 64734, + + // razorscale spawner spells + // controlled by some dummy spells: 63114, 63115, 63116, 63968, 63969, 63970 + SPELL_SUMMON_DWARF_WATCHER = 63135, // summons npc 33453 + SPELL_SUMMON_DWARF_GUARDIAN = 62926, // summons npc 33388 + SPELL_SUMMON_IRON_VRYKUL = 63798, // summons npc 33846 + SPELL_SUMMON_MOLE_MACHINE = 62899, // summons go 194316 + + // NPC ids + NPC_RAZORSCALE_HARPOON = 33282, // harpoon visual dummy for phase 2 transition + NPC_RAZORSCALE_CONTROLLER = 33233, // harpoon use npc in phase 1 + + // summoned npcs + NPC_DEVOURING_FLAME = 34188, + NPC_DARK_RUNE_WATCHER = 33453, + NPC_DARK_RUNE_GUARDIAN = 33388, + NPC_DARK_RUNE_SENTINEL = 33846, + + // harpoons + GO_HARPOON = 194565, // broken harpoon - for display only + GO_HARPOON_GUN = 194542, // usable harpoon - respawns when the broken one is repaired + + // gossip + GOSSIP_ITEM_START_RAZORSCALE = -3603009, + GOSSIP_MENU_ID_WELCOME = 14317, +}; + +static const DialogueEntry aIntroDialogue[] = +{ + {NPC_EXPEDITION_ENGINEER, 0, 3000}, + {SAY_INTRO_2, NPC_EXPEDITION_COMMANDER, 4000}, + {NPC_RAZORSCALE, 0, 25000}, + {NPC_EXPEDITION_DEFENDER, 0, 0}, + {0, 0, 0}, +}; + +/*###### +## boss_razorscale +######*/ + +struct MANGOS_DLL_DECL boss_razorscaleAI : public ScriptedAI +{ + boss_razorscaleAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (instance_ulduar*)pCreature->GetInstanceData(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); + + m_creature->GetMotionMaster()->MoveRandomAroundPoint(m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), 10.0f); + Reset(); + } + + instance_ulduar* m_pInstance; + bool m_bIsRegularMode; + + uint32 m_uiBerserkTimer; + + void Reset() override + { + m_uiBerserkTimer = 10 * MINUTE * IN_MILLISECONDS; + + // no combat movement in phase 1 + SetCombatMovement(false); + } + + void JustDied(Unit* pKiller) override + { + if (m_pInstance) + m_pInstance->SetData(TYPE_RAZORSCALE, DONE); + } + + void Aggro(Unit* pWho) override + { + if (m_pInstance) + m_pInstance->SetData(TYPE_RAZORSCALE, IN_PROGRESS); + } + + void JustReachedHome() override + { + if (m_pInstance) + m_pInstance->SetData(TYPE_RAZORSCALE, FAIL); + + m_creature->GetMotionMaster()->MoveRandomAroundPoint(m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), 10.0f); + } + + void JustSummoned(Creature* pSummoned) override + { + } + + void UpdateAI(const uint32 uiDiff) override + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_uiBerserkTimer) + { + if (m_uiBerserkTimer <= uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_BERSERK) == CAST_OK) + m_uiBerserkTimer = 0; + } + else + m_uiBerserkTimer -= uiDiff; + } + + DoMeleeAttackIfReady(); + } }; +CreatureAI* GetAI_boss_razorscale(Creature* pCreature) +{ + return new boss_razorscaleAI(pCreature); +} + +/*###### +## npc_expedition_commander +######*/ + +struct MANGOS_DLL_DECL npc_expedition_commanderAI : public ScriptedAI, private DialogueHelper +{ + npc_expedition_commanderAI(Creature* pCreature) : ScriptedAI(pCreature), + DialogueHelper(aIntroDialogue) + { + m_pInstance = (instance_ulduar*)pCreature->GetInstanceData(); + InitializeDialogueHelper(m_pInstance); + m_bIntroDone = false; + Reset(); + } + + instance_ulduar* m_pInstance; + + bool m_bIntroDone; + + void Reset() override { } + + void MoveInLineOfSight(Unit* pWho) override + { + // ToDo: verify if all this is correct. There may other parts of the intro which are currently missing + if (!m_bIntroDone && pWho->GetTypeId() == TYPEID_PLAYER && m_creature->IsWithinDistInMap(pWho, 20.0f)) + { + DoScriptText(SAY_INTRO_WELCOME, m_creature); + m_bIntroDone = true; + } + + ScriptedAI::MoveInLineOfSight(pWho); + } + + void JustDidDialogueStep(int32 iEntry) override + { + if (!m_pInstance) + { + script_error_log("Instance Ulduar: ERROR Failed to load instance data for this instace."); + return; + } + + switch (iEntry) + { + case NPC_EXPEDITION_ENGINEER: + if (Creature* pEngineer = GetClosestCreatureWithEntry(m_creature, NPC_EXPEDITION_ENGINEER, 15.0f)) + DoScriptText(SAY_INTRO_1, pEngineer); + // ToDo: move the defenders to fight the incoming dwarfes + break; + case NPC_RAZORSCALE: + // ToDo: set Razorscale in combat at this point + break; + case NPC_EXPEDITION_DEFENDER: + if (Creature* pEngineer = GetClosestCreatureWithEntry(m_creature, NPC_EXPEDITION_ENGINEER, 15.0f)) + DoScriptText(SAY_INTRO_3, pEngineer); + // ToDo: make the engineers move and repair the Harpoon Turret + break; + } + } + + void ReceiveAIEvent(AIEventType eventType, Creature* /*pSender*/, Unit* pInvoker, uint32 /*uiMiscValue*/) override + { + // start intro dialogue + if (eventType == AI_EVENT_CUSTOM_A && pInvoker->GetTypeId() == TYPEID_PLAYER) + StartNextDialogueText(NPC_EXPEDITION_ENGINEER); + } + + void UpdateAI(const uint32 uiDiff) override { DialogueUpdate(uiDiff); } +}; + +CreatureAI* GetAI_npc_expedition_commander(Creature* pCreature) +{ + return new npc_expedition_commanderAI(pCreature); +} + +bool GossipHello_npc_expedition_commander(Player* pPlayer, Creature* pCreature) +{ + if (ScriptedInstance* pInstance = (ScriptedInstance*)pCreature->GetInstanceData()) + { + if (pInstance->GetData(TYPE_RAZORSCALE) == NOT_STARTED || pInstance->GetData(TYPE_RAZORSCALE) == FAIL) + pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_START_RAZORSCALE, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); + + pPlayer->SEND_GOSSIP_MENU(GOSSIP_MENU_ID_WELCOME, pCreature->GetObjectGuid()); + return true; + } + + return false; +} + +bool GossipSelect_npc_expedition_commander(Player* pPlayer, Creature* pCreature, uint32 /*uiSender*/, uint32 uiAction) +{ + if (uiAction == GOSSIP_ACTION_INFO_DEF + 1) + { + // start intro dialogue + pCreature->AI()->SendAIEvent(AI_EVENT_CUSTOM_A, pPlayer, pCreature); + pCreature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); + pPlayer->CLOSE_GOSSIP_MENU(); + } + + return true; +} + void AddSC_boss_razorscale() { + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_razorscale"; + pNewScript->GetAI = GetAI_boss_razorscale; + pNewScript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "npc_expedition_commander"; + pNewScript->GetAI = &GetAI_npc_expedition_commander; + pNewScript->pGossipHello = GossipHello_npc_expedition_commander; + pNewScript->pGossipSelect = GossipSelect_npc_expedition_commander; + pNewScript->RegisterSelf(); } diff --git a/scripts/northrend/ulduar/ulduar/boss_xt_002.cpp b/scripts/northrend/ulduar/ulduar/boss_xt_002.cpp index 7106d855b..50f5719d5 100644 --- a/scripts/northrend/ulduar/ulduar/boss_xt_002.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_xt_002.cpp @@ -48,6 +48,7 @@ enum SPELL_GRAVITY_BOMB = 63024, SPELL_GRAVITY_BOMB_H = 64234, SPELL_BERSERK = 26662, + // SPELL_SUBMERGED = 37751, // cast before a heart phase. not used because it's unk purpose // SPELL_STAND = 37752, // cast after a heart phase. not used because it's unk purpose // hard mode spells diff --git a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp index bda6df3be..7b9801e4e 100644 --- a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp +++ b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp @@ -67,11 +67,11 @@ void instance_ulduar::OnCreatureCreate(Creature* pCreature) switch (pCreature->GetEntry()) { case NPC_LEVIATHAN: - case NPC_IGNIS: case NPC_RAZORSCALE: - case NPC_COMMANDER: + case NPC_EXPEDITION_COMMANDER: case NPC_XT002: case NPC_HEART_DECONSTRUCTOR: + case NPC_STEELBREAKER: case NPC_MOLGEIM: case NPC_BRUNDIR: @@ -80,6 +80,7 @@ void instance_ulduar::OnCreatureCreate(Creature* pCreature) case NPC_LEFT_ARM: case NPC_AURIAYA: case NPC_FERAL_DEFENDER: + case NPC_LEVIATHAN_MK: case NPC_RUNIC_COLOSSUS: case NPC_RUNE_GIANT: @@ -290,6 +291,11 @@ void instance_ulduar::SetData(uint32 uiType, uint32 uiData) } break; case TYPE_RAZORSCALE: + if (uiData == FAIL) + { + if (Creature* pCommander = GetSingleCreatureFromStorage(NPC_EXPEDITION_COMMANDER)) + pCommander->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); + } m_auiEncounter[uiType] = uiData; break; case TYPE_XT002: diff --git a/scripts/northrend/ulduar/ulduar/ulduar.h b/scripts/northrend/ulduar/ulduar/ulduar.h index 07fe5e643..99ef45684 100644 --- a/scripts/northrend/ulduar/ulduar/ulduar.h +++ b/scripts/northrend/ulduar/ulduar/ulduar.h @@ -46,12 +46,18 @@ enum // The siege of ulduar NPC_LEVIATHAN = 33113, - NPC_IGNIS = 33118, + // NPC_IGNIS = 33118, NPC_RAZORSCALE = 33186, - NPC_COMMANDER = 33210, + NPC_RAZORSCALE_SPAWNER = 33245, // dwarf spawner npc for Razorscale NPC_XT002 = 33293, NPC_HEART_DECONSTRUCTOR = 33329, - NPC_XT_TOY_PILE = 33337, + NPC_XT_TOY_PILE = 33337, // robot spawner npc for XT002 + + // Razorscale helper npcs + NPC_EXPEDITION_COMMANDER = 33210, + NPC_EXPEDITION_ENGINEER = 33287, + // NPC_EXPEDITION_TRAPPER = 33259, // npc used in Razorscale intro + NPC_EXPEDITION_DEFENDER = 33816, // The antechamber of ulduar NPC_STEELBREAKER = 32867, @@ -235,6 +241,8 @@ enum ACHIEV_CRIT_NERF_ENG_H = 10075, ACHIEV_CRIT_NERF_GRAVITY_N = 10077, // XT-002, achievs 2934, 2936 ACHIEV_CRIT_NERF_GRAVITY_H = 10079, + ACHIEV_CRIT_QUICK_SHAVE_N = 10062, // Razorscale, achievs 2919, 2921 + ACHIEV_CRIT_QUICK_SHAVE_H = 10063, }; class MANGOS_DLL_DECL instance_ulduar : public ScriptedInstance diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index a06d1876f..4e4fcb07e 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2926" + #define SD2_REVISION_NR "2927" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index f4e7ad671..29c89172b 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -1275,6 +1275,8 @@ UPDATE creature_template SET ScriptName='npc_scorch' WHERE entry=33221; UPDATE creature_template SET ScriptName='boss_xt_002' WHERE entry=33293; UPDATE creature_template SET ScriptName='boss_heart_deconstructor' WHERE entry=33329; UPDATE creature_template SET ScriptName='npc_xt_toy_pile' WHERE entry=33337; +UPDATE creature_template SET ScriptName='boss_razorscale' WHERE entry=33186; +UPDATE creature_template SET ScriptName='npc_expedition_commander' WHERE entry=33210; DELETE FROM scripted_event_id WHERE id IN (9735,21620); INSERT INTO scripted_event_id VALUES (9735,'event_spell_saronite_barrier'), diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 611a5a79f..9ed21c98f 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -3398,7 +3398,7 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1603037,'Give us a moment to prepare to build the turrets.',0,1,0,0,'razorscale SAY_INTRO_1'), (-1603038,'Be on the lookout! Mole machines will be surfacing soon with those nasty Iron dwarves aboard!',0,1,0,0,'razorscale SAY_INTRO_2'), (-1603039,'Ready to move out, keep those dwarves off of our backs!',0,1,0,0,'razorscale SAY_INTRO_3'), -(-1603040,'Move! Quickly! She won\'t remain grounded for long.',0,1,0,0,'razorscale SAY_GROUNDED'), +(-1603040,'Move quickly! She won\'t remain grounded for long!',15648,1,0,0,'razorscale SAY_GROUNDED'), (-1603041,'Razorscale takes a deep breath...',0,3,0,0,'razorscale EMOTE_BREATH'), (-1603042,'Fires out! Let\'s rebuild those turrets!',0,1,0,0,'razorscale SAY_EXTINGUISH_FIRE'), (-1603043,'Harpoon Turret is ready for use!',0,3,0,0,'razorscale EMOTE_HARPOON_READY'), @@ -3630,7 +3630,8 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1603235,'The illusion shatters and a path to the central chamber opens!',0,3,0,0,'yogg EMOTE_SHATTER_BLAST'), (-1603236,'%s\'s heart is severed from his body.',0,3,0,0,'xt-002 EMOTE_KILL_HEART'), -(-1603237,'%s begins to cause the earth to quake.',0,3,0,0,'xt-002 EMOTE_EARTH_QUAKE'); +(-1603237,'%s begins to cause the earth to quake.',0,3,0,0,'xt-002 EMOTE_EARTH_QUAKE'), +(-1603238,'%s is extinguished by the water!',0,2,0,0,'ignis EMOTE_EXTINGUISH_SCORCH'); -- -1 604 000 GUNDRAK INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES @@ -4690,7 +4691,9 @@ INSERT INTO gossip_texts (entry,content_default,comment) VALUES (-3603005,'Teleport to the Shattered Walkway.','GOSSIP_ITEM_TELE_WALKWAY'), (-3603006,'Teleport to the Conservatory of Life.','GOSSIP_ITEM_TELE_CONSERVATORY'), (-3603007,'Teleport to the Spark of Imagination.','GOSSIP_ITEM_TELE_SPARK_IMAGINATION'), -(-3603008,'Teleport to the Prison of Yogg-Saron.','GOSSIP_ITEM_TELE_YOGG_SARON'); +(-3603008,'Teleport to the Prison of Yogg-Saron.','GOSSIP_ITEM_TELE_YOGG_SARON'), + +(-3603009,'We are ready to help!','Expedition Commander GOSSIP_ITEM_START_RAZORSCALE'); -- -3 608 000 VIOLET HOLD INSERT INTO gossip_texts (entry,content_default,comment) VALUES diff --git a/sql/updates/r2927_mangos.sql b/sql/updates/r2927_mangos.sql new file mode 100644 index 000000000..f710e07bd --- /dev/null +++ b/sql/updates/r2927_mangos.sql @@ -0,0 +1,2 @@ +UPDATE creature_template SET ScriptName='boss_razorscale' WHERE entry=33186; +UPDATE creature_template SET ScriptName='npc_expedition_commander' WHERE entry=33210; diff --git a/sql/updates/r2927_scriptdev2.sql b/sql/updates/r2927_scriptdev2.sql new file mode 100644 index 000000000..a88f528ab --- /dev/null +++ b/sql/updates/r2927_scriptdev2.sql @@ -0,0 +1,7 @@ +DELETE FROM script_texts WHERE entry IN (-1603040,-1603238); +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1603040,'Move quickly! She won\'t remain grounded for long!',15648,1,0,0,'razorscale SAY_GROUNDED'), +(-1603238,'%s is extinguished by the water!',0,2,0,0,'ignis EMOTE_EXTINGUISH_SCORCH'); +DELETE FROM gossip_texts WHERE entry=-3603009; +INSERT INTO gossip_texts (entry,content_default,comment) VALUES +(-3603009,'We are ready to help!','Expedition Commander GOSSIP_ITEM_START_RAZORSCALE'); From 8502cdfa64f09028d194adec68656efe59b3ea2f Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sat, 14 Sep 2013 16:20:58 +0300 Subject: [PATCH 0938/1172] [2928] Implement the Water effect for Ignis - Ulduar This will replace the core handling of the spell, because of the required complexity --- .../northrend/ulduar/ulduar/boss_ignis.cpp | 42 ++++++++++++++++--- sd2_revision_nr.h | 2 +- 2 files changed, 38 insertions(+), 6 deletions(-) diff --git a/scripts/northrend/ulduar/ulduar/boss_ignis.cpp b/scripts/northrend/ulduar/ulduar/boss_ignis.cpp index bb96e33ee..82724986b 100644 --- a/scripts/northrend/ulduar/ulduar/boss_ignis.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_ignis.cpp @@ -55,14 +55,16 @@ enum // iron construct SPELL_CONSTRUCT_HITTING_YA = 65110, // procs on melee damage; purpose unk - SPELL_STONED = 62468, + SPELL_STONED = 62468, // mechanical stun aura SPELL_HEAT = 65667, // stackable aura which heats the construct - SPELL_MOLTEN = 62373, - SPELL_BRITTLE = 62382, + SPELL_MOLTEN = 62373, // aura gained by the construct when heated to 10 stacks in Scorch + SPELL_CHILL = 62381, // chill a construct when moved in water + SPELL_BRITTLE = 62382, // stun a construct when chilled in water SPELL_BRITTLE_H = 67114, SPELL_SHATTER = 62383, // sends event 21620 for the achiev check - SPELL_STRENGTH_REMOVE = 64475, - // SPELL_WATER = 64502, // cast by world triggers, in order to check when the constructs reach the water (handled in core) + SPELL_STRENGTH_REMOVE = 64475, // remove 1 stack of the Strength of Creator on construct death + SPELL_WATER_EFFECT = 64503, // spell effect which cools the heated constructs and scorch npcs + // SPELL_WATER = 64502, // cast by world triggers, in order to check when the constructs reach the water // scorch target SPELL_SCORCH_AURA = 62548, @@ -70,6 +72,7 @@ enum // NPC ids NPC_SCORCH = 33221, + NPC_IRON_CONSTRUCT = 33121, // constructs which are activated on demand by Ignis MAX_HEAT_STACKS = 10, }; @@ -309,6 +312,20 @@ CreatureAI* GetAI_npc_iron_construct(Creature* pCreature) return new npc_iron_constructAI(pCreature); } +bool EffectScriptEffectCreature_npc_iron_construct(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget, ObjectGuid /*originalCasterGuid*/) +{ + if (uiSpellId == SPELL_WATER_EFFECT && uiEffIndex == EFFECT_INDEX_0 && pCreatureTarget->GetEntry() == NPC_IRON_CONSTRUCT) + { + // chill the iron construct if molten (effect handled in core) + if (pCreatureTarget->HasAura(SPELL_MOLTEN)) + pCreatureTarget->CastSpell(pCreatureTarget, SPELL_CHILL, true); + + return true; + } + + return false; +} + /*###### ## npc_scorch ######*/ @@ -329,6 +346,19 @@ CreatureAI* GetAI_npc_scorch(Creature* pCreature) return new npc_scorchAI(pCreature); } +bool EffectScriptEffectCreature_npc_scorch(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget, ObjectGuid /*originalCasterGuid*/) +{ + if (uiSpellId == SPELL_WATER_EFFECT && uiEffIndex == EFFECT_INDEX_0 && pCreatureTarget->GetEntry() == NPC_SCORCH) + { + // despawn the Scorch in water + DoScriptText(EMOTE_EXTINGUISH_SCORCH, pCreatureTarget); + pCreatureTarget->ForcedDespawn(); + return true; + } + + return false; +} + void AddSC_boss_ignis() { Script* pNewScript; @@ -341,10 +371,12 @@ void AddSC_boss_ignis() pNewScript = new Script; pNewScript->Name = "npc_iron_construct"; pNewScript->GetAI = &GetAI_npc_iron_construct; + pNewScript->pEffectScriptEffectNPC = &EffectScriptEffectCreature_npc_iron_construct; pNewScript->RegisterSelf(); pNewScript = new Script; pNewScript->Name = "npc_scorch"; pNewScript->GetAI = &GetAI_npc_scorch; + pNewScript->pEffectScriptEffectNPC = &EffectScriptEffectCreature_npc_scorch; pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 4e4fcb07e..8feaef3d5 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2927" + #define SD2_REVISION_NR "2928" #endif // __SD2_REVISION_NR_H__ From a2f24c69abb3865847f1dbd5e7d51c05aaad400c Mon Sep 17 00:00:00 2001 From: Xfurry Date: Mon, 16 Sep 2013 22:03:27 +0300 Subject: [PATCH 0939/1172] [2929] Implement combat abilities for Razorscale - Ulduar Known issues which won't affect the gameplay * Harpoon guns despawn right after being used (core issue) * Harpoon shot spell is forced cast as triggered, which would make the interruption impossible (core issue) * Shackle spell requires some aura stacking fix * Iron Dwarf, Medium Rare achievements are not yet implemented --- .../ulduar/ulduar/boss_razorscale.cpp | 697 +++++++++++++++++- .../northrend/ulduar/ulduar/boss_xt_002.cpp | 9 +- .../ulduar/ulduar/instance_ulduar.cpp | 93 ++- scripts/northrend/ulduar/ulduar/ulduar.h | 25 +- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 9 +- sql/updates/r2929_mangos.sql | 5 + 7 files changed, 798 insertions(+), 42 deletions(-) create mode 100644 sql/updates/r2929_mangos.sql diff --git a/scripts/northrend/ulduar/ulduar/boss_razorscale.cpp b/scripts/northrend/ulduar/ulduar/boss_razorscale.cpp index f103b6f17..42a90f81b 100644 --- a/scripts/northrend/ulduar/ulduar/boss_razorscale.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_razorscale.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: boss_razorscale -SD%Complete: 20% -SDComment: Intro and basic script +SD%Complete: 85% +SDComment: Fine script details require additional core support. Not all achievements are implemented. SDCategory: Ulduar EndScriptData */ @@ -31,15 +31,15 @@ enum SAY_INTRO_2 = -1603038, SAY_INTRO_3 = -1603039, SAY_GROUNDED = -1603040, - SAY_EXTINGUISH_FIRE = -1603041, + SAY_EXTINGUISH_FIRE = -1603042, - EMOTE_BREATH = -1603042, + EMOTE_BREATH = -1603041, EMOTE_HARPOON_READY = -1603043, EMOTE_GROUNDED = -1603044, // general spells (used in both ground and air phases) SPELL_BERSERK = 47008, - SPELL_DEVOURING_FLAME = 63236, + SPELL_DEVOURING_FLAME = 63236, // has summon property = 61, so it won't behave as expected SPELL_FLAME_BREATH = 63317, SPELL_FLAME_BREATH_H = 64021, @@ -47,7 +47,10 @@ enum SPELL_FIREBALL = 62796, SPELL_FIREBALL_H = 63815, SPELL_STUN = 62794, - // SPELL_SHACKLE = 62646, // channeled on Razorscale intro by npc 33259; currently not used because of missing intro data + + // helper npc spells + SPELL_THREAT = 65146, // used by npc 33816 to apply threat to Razorscale + SPELL_SHACKLE = 62646, // channeled on Razorscale grounding phase by npc 33259 // phase 2 transition spells SPELL_WING_BUFFET = 62666, @@ -70,23 +73,29 @@ enum SPELL_SUMMON_IRON_VRYKUL = 63798, // summons npc 33846 SPELL_SUMMON_MOLE_MACHINE = 62899, // summons go 194316 - // NPC ids - NPC_RAZORSCALE_HARPOON = 33282, // harpoon visual dummy for phase 2 transition - NPC_RAZORSCALE_CONTROLLER = 33233, // harpoon use npc in phase 1 - - // summoned npcs + // summons NPC_DEVOURING_FLAME = 34188, - NPC_DARK_RUNE_WATCHER = 33453, - NPC_DARK_RUNE_GUARDIAN = 33388, - NPC_DARK_RUNE_SENTINEL = 33846, - - // harpoons - GO_HARPOON = 194565, // broken harpoon - for display only - GO_HARPOON_GUN = 194542, // usable harpoon - respawns when the broken one is repaired + NPC_RAZORSCALE_SPAWNER = 33245, // dwarf spawner npc for Razorscale + // NPC_DARK_RUNE_WATCHER = 33453, + // NPC_DARK_RUNE_GUARDIAN = 33388, + // NPC_DARK_RUNE_SENTINEL = 33846, + // GO_MOLE_MACHINE = 194316, + + // other + NPC_HARPOON_FIRE_STATE = 33282, // harpoon visual dummy for phase 2 transition + // EVENT_ID_HARPOON_SHOT = 20964, // event which informs the script that a harpoon has been shot + SPEED_RATE_RAZORSCALE = 10, // it seems that Razorscale and npcs have a special run speed during air phase, which isn't reflected in DB + SPEED_RATE_HELPERS = 8, // gossip GOSSIP_ITEM_START_RAZORSCALE = -3603009, GOSSIP_MENU_ID_WELCOME = 14317, + + // phases + PHASE_AIR = 1, + PHASE_GROUNDED = 2, + PHASE_ONLY_GROUND = 3, + PHASE_TRANSITION = 4, }; static const DialogueEntry aIntroDialogue[] = @@ -98,6 +107,15 @@ static const DialogueEntry aIntroDialogue[] = {0, 0, 0}, }; +static const float afRazorscaleGroundPos[3] = { 585.401f, -173.543f, 391.6421f }; + +static const float afRazorscaleSpawnersPos[3][3] = +{ + {577.103f, -231.223f, 391.180f}, // right + {606.138f, -231.266f, 391.517f}, // left + {589.451f, -209.737f, 391.517f}, // center +}; + /*###### ## boss_razorscale ######*/ @@ -108,6 +126,7 @@ struct MANGOS_DLL_DECL boss_razorscaleAI : public ScriptedAI { m_pInstance = (instance_ulduar*)pCreature->GetInstanceData(); m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); + m_uiMaxHarpoons = m_bIsRegularMode ? 2 : 4; m_creature->GetMotionMaster()->MoveRandomAroundPoint(m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), 10.0f); Reset(); @@ -116,14 +135,61 @@ struct MANGOS_DLL_DECL boss_razorscaleAI : public ScriptedAI instance_ulduar* m_pInstance; bool m_bIsRegularMode; + uint8 m_uiPhase; + bool m_bIsGrounded; + uint32 m_uiBerserkTimer; + uint32 m_uiFireballTimer; + uint32 m_uiDevouringFlameTimer; + uint32 m_uiDwarfSpawnTimer; + uint32 m_uiRepairHarpoonTimer; + + uint32 m_uiShackleTimer; + uint32 m_uiGroundedTimer; + uint8 m_uiGroundedStep; + + uint32 m_uiFlameBuffetTimer; + uint32 m_uiFuseArmorTimer; + uint32 m_uiFlameBreathTimer; + + uint8 m_uiMaxHarpoons; + uint8 m_uiCurrentHarpoon; + uint8 m_uiHarpoonsUsed; + uint8 m_uiFlyPhaseCount; + + GuidList m_lEngineersGuids; + GuidList m_lTrappersGuids; + GuidVector m_vHarpoonsGuids; + void Reset() override { - m_uiBerserkTimer = 10 * MINUTE * IN_MILLISECONDS; + m_uiPhase = PHASE_AIR; + m_bIsGrounded = false; + m_uiBerserkTimer = 10 * MINUTE * IN_MILLISECONDS; + + m_uiFireballTimer = 5000; + m_uiDevouringFlameTimer = 10000; + m_uiDwarfSpawnTimer = 1000; + m_uiRepairHarpoonTimer = 0; + + m_uiShackleTimer = 5000; + m_uiHarpoonsUsed = 0; + m_uiCurrentHarpoon = 0; + m_uiFlyPhaseCount = 0; + + m_uiGroundedTimer = 30000; + m_uiGroundedStep = 0; + + m_uiFlameBuffetTimer = 10000; + m_uiFuseArmorTimer = 13000; + m_uiFlameBreathTimer = 15000; // no combat movement in phase 1 SetCombatMovement(false); + + m_creature->SetLevitate(true); + m_creature->SetByteFlag(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_UNK_2); } void JustDied(Unit* pKiller) override @@ -135,7 +201,14 @@ struct MANGOS_DLL_DECL boss_razorscaleAI : public ScriptedAI void Aggro(Unit* pWho) override { if (m_pInstance) + { m_pInstance->SetData(TYPE_RAZORSCALE, IN_PROGRESS); + + // load engineers and harpoon data + m_pInstance->GetEngineersGuids(m_lEngineersGuids); + m_pInstance->GetTrappersGuids(m_lTrappersGuids); + m_pInstance->GetHarpoonsGuids(m_vHarpoonsGuids); + } } void JustReachedHome() override @@ -148,11 +221,161 @@ struct MANGOS_DLL_DECL boss_razorscaleAI : public ScriptedAI void JustSummoned(Creature* pSummoned) override { + if (pSummoned->GetEntry() == NPC_DEVOURING_FLAME) + pSummoned->CastSpell(pSummoned, m_bIsRegularMode ? SPELL_DEVOURING_FLAME_AURA : SPELL_DEVOURING_FLAME_AURA_H, true); + else if (pSummoned->GetEntry() == NPC_RAZORSCALE_SPAWNER) + { + pSummoned->CastSpell(pSummoned, SPELL_SUMMON_MOLE_MACHINE, true); + + // for central spawners inform that they should spawn a sentinel + if (pSummoned->GetPositionY() > -220.0f) + SendAIEvent(AI_EVENT_CUSTOM_A, m_creature, pSummoned); + } + } + + void ReceiveAIEvent(AIEventType eventType, Creature* /*pSender*/, Unit* pInvoker, uint32 /*uiMiscValue*/) override + { + // inform about the harpoon repair event + if (eventType == AI_EVENT_CUSTOM_A) + { + DoMoveEngineersToHarpoon(); + m_uiRepairHarpoonTimer = 20000; + } + // inform about a harpoon being shot + if (eventType == AI_EVENT_CUSTOM_B) + { + ++m_uiHarpoonsUsed; + + // start grounded phase + if (m_uiHarpoonsUsed == m_uiMaxHarpoons) + { + // use upgraded speed rate for FlyOrLand. This isn't supported by DB but it's confirmed to happen on retail + uint32 uiSpeedRate = m_creature->GetSpeedRate(MOVE_RUN); + m_creature->SetWalk(false); + m_creature->SetSpeedRate(MOVE_RUN, SPEED_RATE_RAZORSCALE); + m_creature->GetMotionMaster()->MoveFlyOrLand(1, afRazorscaleGroundPos[0], afRazorscaleGroundPos[1], afRazorscaleGroundPos[2], false); + m_creature->SetSpeedRate(MOVE_RUN, uiSpeedRate); + + m_uiPhase = PHASE_TRANSITION; + m_uiShackleTimer = 5000; + + // move the trappers around + float fX, fY, fZ; + uint8 uiIndex = 5; + if (m_pInstance) + { + if (Creature* pController = m_pInstance->GetSingleCreatureFromStorage(NPC_RAZORSCALE_CONTROLLER)) + { + for (GuidList::const_iterator itr = m_lTrappersGuids.begin(); itr != m_lTrappersGuids.end(); ++itr) + { + if (Creature* pTrapper = m_creature->GetMap()->GetCreature(*itr)) + { + pController->GetNearPoint(pController, fX, fY, fZ, 0, 50.0f, M_PI_F / 4 * uiIndex); + + pTrapper->SetWalk(false); + uiSpeedRate = pTrapper->GetSpeedRate(MOVE_RUN); + pTrapper->SetSpeedRate(MOVE_RUN, SPEED_RATE_HELPERS); + pTrapper->GetMotionMaster()->MovePoint(1, fX, fY, fZ); + pTrapper->SetSpeedRate(MOVE_RUN, uiSpeedRate); + ++uiIndex; + } + } + } + + // yell that Razor is grounded + if (Creature* pCommander = m_pInstance->GetSingleCreatureFromStorage(NPC_EXPEDITION_COMMANDER)) + DoScriptText(SAY_GROUNDED, pCommander); + } + } + } + } + + // function to spawn the mole machines + void DoSpawnMoleMachines() + { + // Note: this should be a little more random in therms of position and timer delays between the spawns + uint8 uiMaxMachines = roll_chance_i(33) ? 3 : 2; + float fX, fY, fZ; + + for (uint8 i = 0; i < uiMaxMachines; ++i) + { + m_creature->GetRandomPoint(afRazorscaleSpawnersPos[i][0], afRazorscaleSpawnersPos[i][1], afRazorscaleSpawnersPos[i][2], 10.0f, fX, fY, fZ); + m_creature->SummonCreature(NPC_RAZORSCALE_SPAWNER, fX, fY, fZ, 0, TEMPSUMMON_TIMED_DESPAWN, 10000); + } + } + + // function to enable harpoon repair animation + void DoMoveEngineersToHarpoon() + { + float fX, fY, fZ; + uint8 uiIndex = 1; + + // get the current harpoon and move the engineers in front of it + if (GameObject* pHarpoon = m_creature->GetMap()->GetGameObject(m_vHarpoonsGuids[m_uiCurrentHarpoon])) + { + for (GuidList::const_iterator itr = m_lEngineersGuids.begin(); itr != m_lEngineersGuids.end(); ++itr) + { + if (Creature* pEngineer = m_creature->GetMap()->GetCreature(*itr)) + { + pHarpoon->GetNearPoint(pHarpoon, fX, fY, fZ, 0, INTERACTION_DISTANCE, M_PI_F / 4 * uiIndex); + + // ToDo: maybe there should be some emotes here + pEngineer->SetWalk(false); + pEngineer->GetMotionMaster()->MovePoint(1, fX, fY, fZ); + ++uiIndex; + } + } + } + ++m_uiCurrentHarpoon; + } + + // function to repair nearby harpoon + void DoRepairHarpoon(GameObject* pSource) + { + // search for each entry of the nearby harpoon + GameObject* pNewHarpoon = GetClosestGameObjectWithEntry(pSource, GO_HARPOON_GUN_1, 5.0f); + if (!pNewHarpoon) + pNewHarpoon = GetClosestGameObjectWithEntry(pSource, GO_HARPOON_GUN_2, 5.0f); + if (!pNewHarpoon) + pNewHarpoon = GetClosestGameObjectWithEntry(pSource, GO_HARPOON_GUN_3, 5.0f); + if (!pNewHarpoon) + pNewHarpoon = GetClosestGameObjectWithEntry(pSource, GO_HARPOON_GUN_4, 5.0f); + + if (pNewHarpoon) + { + pNewHarpoon->SetRespawnTime(HOUR); + pNewHarpoon->Refresh(); + } + } + + // custom threat management to support air phase with a high distance from the ground + bool SelectCustomHostileTarget() + { + if (m_uiPhase == PHASE_ONLY_GROUND || m_uiPhase == PHASE_GROUNDED) + return m_creature->SelectHostileTarget() && m_creature->getVictim(); + + // Special handling for PHASE_AIR + + // Not started combat or evading prevented + if (!m_creature->isInCombat() || m_creature->HasAuraType(SPELL_AURA_MOD_TAUNT)) + return false; + + // Check if there are still enemies (players) + ThreatList const& threatList = m_creature->getThreatManager().getThreatList(); + for (ThreatList::const_iterator itr = threatList.begin(); itr != threatList.end(); ++itr) + { + if ((*itr)->getUnitGuid().IsPlayer()) + return true; + } + + // Evade in air-phase + EnterEvadeMode(); + return false; } void UpdateAI(const uint32 uiDiff) override { - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + if (!SelectCustomHostileTarget()) return; if (m_uiBerserkTimer) @@ -166,7 +389,254 @@ struct MANGOS_DLL_DECL boss_razorscaleAI : public ScriptedAI m_uiBerserkTimer -= uiDiff; } - DoMeleeAttackIfReady(); + switch (m_uiPhase) + { + case PHASE_AIR: + + if (m_uiFireballTimer < uiDiff) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, m_bIsRegularMode ? SPELL_FIREBALL : SPELL_FIREBALL_H) == CAST_OK) + m_uiFireballTimer = 2000; + } + } + else + m_uiFireballTimer -= uiDiff; + + if (m_uiDevouringFlameTimer < uiDiff) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, SPELL_DEVOURING_FLAME) == CAST_OK) + m_uiDevouringFlameTimer = 10000; + } + } + else + m_uiDevouringFlameTimer -= uiDiff; + + // harpoon is repaired; move to next one, or to home position if all are completed + if (m_uiRepairHarpoonTimer) + { + if (m_uiRepairHarpoonTimer <= uiDiff) + { + // handle fire extinguish after a grounded phase + if (!m_uiCurrentHarpoon) + { + // extinguish fires + if (m_pInstance) + { + if (Creature* pCommander = m_pInstance->GetSingleCreatureFromStorage(NPC_EXPEDITION_COMMANDER)) + { + if (Creature* pEngineer = GetClosestCreatureWithEntry(pCommander, NPC_EXPEDITION_ENGINEER, 15.0f)) + DoScriptText(SAY_EXTINGUISH_FIRE, pEngineer); + } + } + + // move engineers to the first harpoon again + DoMoveEngineersToHarpoon(); + m_uiRepairHarpoonTimer = 20000; + } + else + { + DoScriptText(EMOTE_HARPOON_READY, m_creature); + + // despawn the current broken harpoon and spawn the repaired one + if (GameObject* pHarpoon = m_creature->GetMap()->GetGameObject(m_vHarpoonsGuids[m_uiCurrentHarpoon - 1])) + { + pHarpoon->SetRespawnTime(HOUR); + pHarpoon->SetLootState(GO_JUST_DEACTIVATED); + + DoRepairHarpoon(pHarpoon); + } + + // if all harpoons have been repaired stop + if (m_uiCurrentHarpoon == m_uiMaxHarpoons) + { + for (GuidList::const_iterator itr = m_lEngineersGuids.begin(); itr != m_lEngineersGuids.end(); ++itr) + { + if (Creature* pEngineer = m_creature->GetMap()->GetCreature(*itr)) + pEngineer->GetMotionMaster()->MoveTargetedHome(); + } + + m_uiRepairHarpoonTimer = 0; + } + // move to next harpoon + else + { + DoMoveEngineersToHarpoon(); + m_uiRepairHarpoonTimer = 20000; + } + } + } + else + m_uiRepairHarpoonTimer -= uiDiff; + } + + // spawn Mole Machines with dwarfes + if (m_uiDwarfSpawnTimer < uiDiff) + { + DoSpawnMoleMachines(); + m_uiDwarfSpawnTimer = 40000; + } + else + m_uiDwarfSpawnTimer -= uiDiff; + + break; + case PHASE_TRANSITION: + + if (m_uiShackleTimer < uiDiff) + { + // cast trap visual + for (GuidList::const_iterator itr = m_lTrappersGuids.begin(); itr != m_lTrappersGuids.end(); ++itr) + { + if (Creature* pTrapper = m_creature->GetMap()->GetCreature(*itr)) + pTrapper->CastSpell(m_creature, SPELL_SHACKLE, false); + } + + // stun Razorscale + if (DoCastSpellIfCan(m_creature, SPELL_STUN) == CAST_OK) + { + m_creature->SetLevitate(false); + m_creature->RemoveByteFlag(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_UNK_2); + + m_uiPhase = PHASE_GROUNDED; + m_uiGroundedTimer = 30000; + m_uiGroundedStep = 0; + m_uiShackleTimer = 5000; + } + } + else + m_uiShackleTimer -= uiDiff; + + break; + case PHASE_GROUNDED: + + if (m_uiGroundedTimer < uiDiff) + { + switch (m_uiGroundedStep) + { + case 0: + m_creature->RemoveAurasDueToSpell(SPELL_STUN); + if (DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_FLAME_BREATH : SPELL_FLAME_BREATH_H) == CAST_OK) + { + DoScriptText(EMOTE_BREATH, m_creature); + m_uiGroundedTimer = 2500; + } + break; + case 1: + if (DoCastSpellIfCan(m_creature, SPELL_WING_BUFFET) == CAST_OK) + m_uiGroundedTimer = 1500; + break; + case 2: + if (DoCastSpellIfCan(m_creature, SPELL_FIREBOLT) == CAST_OK) + m_uiGroundedTimer = 2000; + break; + case 3: + // if fully grounded then go to ground phase + if (m_bIsGrounded) + { + SetCombatMovement(true); + DoResetThreat(); + DoStartMovement(m_creature->getVictim()); + m_uiPhase = PHASE_ONLY_GROUND; + } + // resume air phase + else + { + m_creature->SetLevitate(true); + m_creature->SetByteFlag(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_UNK_2); + + float fX, fY, fZ; + m_creature->GetRespawnCoord(fX, fY, fZ); + + // use upgraded speed rate for FlyOrLand. This isn't supported by DB but it's confirmed to happen on retail + uint32 uiSpeedRate = m_creature->GetSpeedRate(MOVE_RUN); + m_creature->SetSpeedRate(MOVE_RUN, SPEED_RATE_RAZORSCALE); + m_creature->GetMotionMaster()->MoveFlyOrLand(1, fX, fY, fZ, true); + m_creature->SetSpeedRate(MOVE_RUN, uiSpeedRate); + + // reset timers + m_uiPhase = PHASE_AIR; + m_uiCurrentHarpoon = 0; + m_uiHarpoonsUsed = 0; + m_uiRepairHarpoonTimer = 20000; + m_uiFireballTimer = 5000; + m_uiDevouringFlameTimer = 10000; + ++m_uiFlyPhaseCount; + + // set achiev criteria as failed + if (m_uiFlyPhaseCount >= 2 && m_pInstance) + m_pInstance->SetSpecialAchievementCriteria(TYPE_ACHIEV_QUICK_SHAVE, false); + } + + // make the Trappers evade or move to home position + for (GuidList::const_iterator itr = m_lTrappersGuids.begin(); itr != m_lTrappersGuids.end(); ++itr) + { + if (Creature* pTrapper = m_creature->GetMap()->GetCreature(*itr)) + pTrapper->AI()->EnterEvadeMode(); + } + break; + } + ++m_uiGroundedStep; + } + else + m_uiGroundedTimer -= uiDiff; + + // make boss land at 50% hp + if (!m_bIsGrounded && m_creature->GetHealthPercent() < 50.0f) + { + DoScriptText(EMOTE_GROUNDED, m_creature); + m_creature->RemoveAurasDueToSpell(SPELL_STUN); + m_uiGroundedStep = 1; + m_uiGroundedTimer = 0; + m_bIsGrounded = true; + } + + break; + case PHASE_ONLY_GROUND: + + if (m_uiDevouringFlameTimer < uiDiff) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, SPELL_DEVOURING_FLAME) == CAST_OK) + m_uiDevouringFlameTimer = 10000; + } + } + else + m_uiDevouringFlameTimer -= uiDiff; + + if (m_uiFuseArmorTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_FUSE_ARMOR) == CAST_OK) + m_uiFuseArmorTimer = 13000; + } + else + m_uiFuseArmorTimer -= uiDiff; + + if (m_uiFlameBuffetTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_FLAME_BUFFET : SPELL_FLAME_BUFFET_H) == CAST_OK) + m_uiFlameBuffetTimer = 10000; + } + else + m_uiFlameBuffetTimer -= uiDiff; + + if (m_uiFlameBreathTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_FLAME_BREATH : SPELL_FLAME_BREATH_H) == CAST_OK) + { + DoScriptText(EMOTE_BREATH, m_creature); + m_uiFlameBreathTimer = 15000; + } + } + else + m_uiFlameBreathTimer -= uiDiff; + + DoMeleeAttackIfReady(); + break; + } } }; @@ -194,6 +664,8 @@ struct MANGOS_DLL_DECL npc_expedition_commanderAI : public ScriptedAI, private D bool m_bIntroDone; + ObjectGuid m_playerGuid; + void Reset() override { } void MoveInLineOfSight(Unit* pWho) override @@ -219,17 +691,39 @@ struct MANGOS_DLL_DECL npc_expedition_commanderAI : public ScriptedAI, private D switch (iEntry) { case NPC_EXPEDITION_ENGINEER: + { if (Creature* pEngineer = GetClosestCreatureWithEntry(m_creature, NPC_EXPEDITION_ENGINEER, 15.0f)) DoScriptText(SAY_INTRO_1, pEngineer); - // ToDo: move the defenders to fight the incoming dwarfes + + GuidList m_lDefenderGuids; + m_pInstance->GetDefenderGuids(m_lDefenderGuids); + + // move the defenders into attack position + for (GuidList::const_iterator itr = m_lDefenderGuids.begin(); itr != m_lDefenderGuids.end(); ++itr) + { + if (Creature* pDefender = m_creature->GetMap()->GetCreature(*itr)) + { + pDefender->CastSpell(pDefender, SPELL_THREAT, true); + pDefender->SetWalk(false); + pDefender->GetMotionMaster()->MoveWaypoint(); + } + } break; + } case NPC_RAZORSCALE: - // ToDo: set Razorscale in combat at this point + if (Creature* pRazorscale = m_pInstance->GetSingleCreatureFromStorage(NPC_RAZORSCALE)) + { + if (Player* pPlayer = m_creature->GetMap()->GetPlayer(m_playerGuid)) + pRazorscale->AI()->AttackStart(pPlayer); + } break; case NPC_EXPEDITION_DEFENDER: if (Creature* pEngineer = GetClosestCreatureWithEntry(m_creature, NPC_EXPEDITION_ENGINEER, 15.0f)) DoScriptText(SAY_INTRO_3, pEngineer); - // ToDo: make the engineers move and repair the Harpoon Turret + + // inform Razorscale about the start of the harpoon event + if (Creature* pRazorscale = m_pInstance->GetSingleCreatureFromStorage(NPC_RAZORSCALE)) + m_creature->AI()->SendAIEvent(AI_EVENT_CUSTOM_A, m_creature, pRazorscale); break; } } @@ -238,7 +732,10 @@ struct MANGOS_DLL_DECL npc_expedition_commanderAI : public ScriptedAI, private D { // start intro dialogue if (eventType == AI_EVENT_CUSTOM_A && pInvoker->GetTypeId() == TYPEID_PLAYER) + { StartNextDialogueText(NPC_EXPEDITION_ENGINEER); + m_playerGuid = pInvoker->GetObjectGuid(); + } } void UpdateAI(const uint32 uiDiff) override { DialogueUpdate(uiDiff); } @@ -276,6 +773,142 @@ bool GossipSelect_npc_expedition_commander(Player* pPlayer, Creature* pCreature, return true; } +/*###### +## npc_razorscale_spawner +######*/ + +struct MANGOS_DLL_DECL npc_razorscale_spawnerAI : public Scripted_NoMovementAI +{ + npc_razorscale_spawnerAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { Reset(); } + + uint32 m_uiSpawnTimer; + bool m_bIsSentinelSpawn; + + void Reset() override + { + m_uiSpawnTimer = 5000; + m_bIsSentinelSpawn = false; + } + + void JustSummoned(Creature* pSummoned) override + { + pSummoned->SetInCombatWithZone(); + } + + void JustSummoned(GameObject* pGo) override + { + pGo->Use(m_creature); + } + + void ReceiveAIEvent(AIEventType eventType, Creature* /*pSender*/, Unit* pInvoker, uint32 /*uiMiscValue*/) override + { + // inform that it should spawn a sentinel + if (eventType == AI_EVENT_CUSTOM_A) + m_bIsSentinelSpawn = true; + } + + void UpdateAI(const uint32 uiDiff) override + { + if (m_uiSpawnTimer) + { + if (m_uiSpawnTimer <= uiDiff) + { + if (m_bIsSentinelSpawn) + DoCastSpellIfCan(m_creature, SPELL_SUMMON_IRON_VRYKUL, CAST_TRIGGERED); + else + { + DoCastSpellIfCan(m_creature, SPELL_SUMMON_DWARF_GUARDIAN, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_SUMMON_DWARF_WATCHER, CAST_TRIGGERED); + } + m_uiSpawnTimer = 0; + } + else + m_uiSpawnTimer -= uiDiff; + } + } +}; + +CreatureAI* GetAI_npc_razorscale_spawner(Creature* pCreature) +{ + return new npc_razorscale_spawnerAI(pCreature); +} + +/*###### +## npc_harpoon_fire_state +######*/ + +// TODO Remove this 'script' when combat can be proper prevented from core-side +struct MANGOS_DLL_DECL npc_harpoon_fire_stateAI : public Scripted_NoMovementAI +{ + npc_harpoon_fire_stateAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { Reset(); } + + void Reset() override { } + void AttackStart(Unit* /*pWho*/) override { } + void MoveInLineOfSight(Unit* /*pWho*/) override { } + void UpdateAI(const uint32 /*uiDiff*/) override { } +}; + +CreatureAI* GetAI_npc_harpoon_fire_state(Creature* pCreature) +{ + return new npc_harpoon_fire_stateAI(pCreature); +} + +bool EffectDummyCreature_npc_harpoon_fire_state(Unit* /*pCaster*/, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget, ObjectGuid /*originalCasterGuid*/) +{ + // always check spellid and effectindex + if (uiSpellId == SPELL_FIREBOLT && uiEffIndex == EFFECT_INDEX_0 && pCreatureTarget->GetEntry() == NPC_HARPOON_FIRE_STATE) + { + pCreatureTarget->CastSpell(pCreatureTarget, SPELL_HARPOON_FIRE, true); + + // search for each entry of the nearby harpoon + GameObject* pHarpoon = GetClosestGameObjectWithEntry(pCreatureTarget, GO_HARPOON_GUN_1, 5.0f); + if (!pHarpoon) + pHarpoon = GetClosestGameObjectWithEntry(pCreatureTarget, GO_HARPOON_GUN_2, 5.0f); + if (!pHarpoon) + pHarpoon = GetClosestGameObjectWithEntry(pCreatureTarget, GO_HARPOON_GUN_3, 5.0f); + if (!pHarpoon) + pHarpoon = GetClosestGameObjectWithEntry(pCreatureTarget, GO_HARPOON_GUN_4, 5.0f); + + // despawn the repaired harpoon + if (pHarpoon) + pHarpoon->SetLootState(GO_JUST_DEACTIVATED); + + // respawn broken harpoon + if (GameObject* pNewHarpoon = GetClosestGameObjectWithEntry(pCreatureTarget, GO_BROKEN_HARPOON, 5.0f)) + pNewHarpoon->Respawn(); + + // force reset for harpoon trigger npcs + if (Creature* pTrigger = GetClosestCreatureWithEntry(pCreatureTarget, NPC_RAZORSCALE_CONTROLLER, 5.0f)) + pTrigger->InterruptNonMeleeSpells(false); + + // always return true when we are handling this spell and effect + return true; + } + + return false; +} + +/*###### +## event_spell_harpoon_shot +######*/ + +bool ProcessEventId_event_spell_harpoon_shot(uint32 /*uiEventId*/, Object* pSource, Object* pTarget, bool /*bIsStart*/) +{ + if (((Creature*)pSource)->GetEntry() == NPC_RAZORSCALE_CONTROLLER) + { + if (instance_ulduar* pInstance = (instance_ulduar*)((Creature*)pSource)->GetInstanceData()) + { + // event doesn't have target, so we need to give an explicit one + if (Creature* pRazorscale = pInstance->GetSingleCreatureFromStorage(NPC_RAZORSCALE)) + ((Creature*)pSource)->AI()->SendAIEvent(AI_EVENT_CUSTOM_B, (Creature*)pSource, pRazorscale); + + return true; + } + } + + return false; +} + void AddSC_boss_razorscale() { Script* pNewScript; @@ -291,4 +924,20 @@ void AddSC_boss_razorscale() pNewScript->pGossipHello = GossipHello_npc_expedition_commander; pNewScript->pGossipSelect = GossipSelect_npc_expedition_commander; pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_razorscale_spawner"; + pNewScript->GetAI = GetAI_npc_razorscale_spawner; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_harpoon_fire_state"; + pNewScript->GetAI = GetAI_npc_harpoon_fire_state; + pNewScript->pEffectDummyNPC = &EffectDummyCreature_npc_harpoon_fire_state; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "event_spell_harpoon_shot"; + pNewScript->pProcessEventId = &ProcessEventId_event_spell_harpoon_shot; + pNewScript->RegisterSelf(); } diff --git a/scripts/northrend/ulduar/ulduar/boss_xt_002.cpp b/scripts/northrend/ulduar/ulduar/boss_xt_002.cpp index 50f5719d5..1deed3c52 100644 --- a/scripts/northrend/ulduar/ulduar/boss_xt_002.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_xt_002.cpp @@ -379,11 +379,6 @@ struct MANGOS_DLL_DECL boss_heart_deconstructorAI : public ScriptedAI void Reset() override { m_uiRobotTimer = 0; - - // load the toy piles guids - m_vToyPileGuids.clear(); - if (m_pInstance) - m_pInstance->GetToyPileGuids(m_vToyPileGuids); } void JustDied(Unit* pKiller) override @@ -420,6 +415,10 @@ struct MANGOS_DLL_DECL boss_heart_deconstructorAI : public ScriptedAI DoCastSpellIfCan(m_creature, SPELL_HEART_OVERLOAD, CAST_TRIGGERED); DoCastSpellIfCan(m_creature, SPELL_EXPOSED_HEART, CAST_TRIGGERED); m_uiRobotTimer = 1000; + + // load the toy piles guids + if (m_pInstance && m_vToyPileGuids.empty()) + m_pInstance->GetToyPileGuids(m_vToyPileGuids); } } diff --git a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp index 7b9801e4e..955c2fe19 100644 --- a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp +++ b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp @@ -113,6 +113,23 @@ void instance_ulduar::OnCreatureCreate(Creature* pCreature) SpawnFriendlyKeeper(NPC_FREYA_IMAGE); break; + case NPC_EXPEDITION_DEFENDER: + m_lDefendersGuids.push_back(pCreature->GetObjectGuid()); + return; + case NPC_EXPEDITION_ENGINEER: + m_lEngineersGuids.push_back(pCreature->GetObjectGuid()); + return; + case NPC_EXPEDITION_TRAPPER: + m_lTrappersGuids.push_back(pCreature->GetObjectGuid()); + return; + case NPC_RAZORSCALE_CONTROLLER: + // sort the controllers which are assigned to harpoons and allow the central one into the mail guid store + if (pCreature->GetPositionY() > -145.0f) + { + m_lHarpoonDummyGuids.push_back(pCreature->GetObjectGuid()); + return; + } + break; case NPC_XT_TOY_PILE: m_vToyPileGuidVector.push_back(pCreature->GetObjectGuid()); return; @@ -142,9 +159,6 @@ void instance_ulduar::OnObjectCreate(GameObject* pGo) if (m_auiEncounter[TYPE_LEVIATHAN] == DONE) pGo->SetGoState(GO_STATE_ACTIVE); break; - case GO_BROKEN_HARPOON: - pGo->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NO_INTERACT); - break; // Archivum case GO_IRON_ENTRANCE_DOOR: @@ -253,6 +267,16 @@ void instance_ulduar::OnObjectCreate(GameObject* pGo) case GO_GIFT_OF_OBSERVER_25: break; + case GO_BROKEN_HARPOON: + m_vBrokenHarpoonsGuids.push_back(pGo->GetObjectGuid()); + return; + case GO_HARPOON_GUN_1: + case GO_HARPOON_GUN_2: + case GO_HARPOON_GUN_3: + case GO_HARPOON_GUN_4: + m_lRepairedHarpoonsGuids.push_back(pGo->GetObjectGuid()); + return; + default: return; } @@ -291,10 +315,68 @@ void instance_ulduar::SetData(uint32 uiType, uint32 uiData) } break; case TYPE_RAZORSCALE: - if (uiData == FAIL) + if (uiData == IN_PROGRESS) + SetSpecialAchievementCriteria(TYPE_ACHIEV_QUICK_SHAVE, true); + else if (uiData == FAIL) { + // reset the commander if (Creature* pCommander = GetSingleCreatureFromStorage(NPC_EXPEDITION_COMMANDER)) pCommander->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); + + // reset all creatures + for (GuidList::const_iterator itr = m_lDefendersGuids.begin(); itr != m_lDefendersGuids.end(); ++itr) + { + if (Creature* pDefender = instance->GetCreature(*itr)) + { + if (!pDefender->isAlive()) + pDefender->Respawn(); + else + pDefender->GetMotionMaster()->MoveTargetedHome(); + } + } + for (GuidList::const_iterator itr = m_lEngineersGuids.begin(); itr != m_lEngineersGuids.end(); ++itr) + { + if (Creature* pEngineer = instance->GetCreature(*itr)) + { + if (!pEngineer->isAlive()) + pEngineer->Respawn(); + else + pEngineer->GetMotionMaster()->MoveTargetedHome(); + } + } + for (GuidList::const_iterator itr = m_lTrappersGuids.begin(); itr != m_lTrappersGuids.end(); ++itr) + { + if (Creature* pTrapper = instance->GetCreature(*itr)) + { + if (!pTrapper->isAlive()) + pTrapper->Respawn(); + else + pTrapper->GetMotionMaster()->MoveTargetedHome(); + } + } + for (GuidList::const_iterator itr = m_lHarpoonDummyGuids.begin(); itr != m_lHarpoonDummyGuids.end(); ++itr) + { + if (Creature* pHarpoon = instance->GetCreature(*itr)) + pHarpoon->InterruptNonMeleeSpells(false); + } + + // reset Harpoons: respawn the broken ones and despawn the repaired ones + for (GuidVector::const_iterator itr = m_vBrokenHarpoonsGuids.begin(); itr != m_vBrokenHarpoonsGuids.end(); ++itr) + { + if (GameObject* pHarpoon = instance->GetGameObject(*itr)) + { + if (!pHarpoon->isSpawned()) + pHarpoon->Respawn(); + } + } + for (GuidList::const_iterator itr = m_lRepairedHarpoonsGuids.begin(); itr != m_lRepairedHarpoonsGuids.end(); ++itr) + { + if (GameObject* pHarpoon = instance->GetGameObject(*itr)) + { + if (pHarpoon->isSpawned()) + pHarpoon->SetLootState(GO_JUST_DEACTIVATED); + } + } } m_auiEncounter[uiType] = uiData; break; @@ -646,6 +728,9 @@ bool instance_ulduar::CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player c case ACHIEV_CRIT_HEARTBREAKER_N: case ACHIEV_CRIT_HEARTBREAKER_H: return GetData(TYPE_XT002_HARD) == DONE; + case ACHIEV_CRIT_QUICK_SHAVE_N: + case ACHIEV_CRIT_QUICK_SHAVE_H: + return m_abAchievCriteria[TYPE_ACHIEV_QUICK_SHAVE]; default: return false; diff --git a/scripts/northrend/ulduar/ulduar/ulduar.h b/scripts/northrend/ulduar/ulduar/ulduar.h index 99ef45684..ff9295b3b 100644 --- a/scripts/northrend/ulduar/ulduar/ulduar.h +++ b/scripts/northrend/ulduar/ulduar/ulduar.h @@ -48,16 +48,16 @@ enum NPC_LEVIATHAN = 33113, // NPC_IGNIS = 33118, NPC_RAZORSCALE = 33186, - NPC_RAZORSCALE_SPAWNER = 33245, // dwarf spawner npc for Razorscale NPC_XT002 = 33293, NPC_HEART_DECONSTRUCTOR = 33329, NPC_XT_TOY_PILE = 33337, // robot spawner npc for XT002 // Razorscale helper npcs NPC_EXPEDITION_COMMANDER = 33210, - NPC_EXPEDITION_ENGINEER = 33287, - // NPC_EXPEDITION_TRAPPER = 33259, // npc used in Razorscale intro - NPC_EXPEDITION_DEFENDER = 33816, + NPC_EXPEDITION_ENGINEER = 33287, // npc used to repair the Harpoons + NPC_EXPEDITION_TRAPPER = 33259, // npc used in Razorscale grounding phase + NPC_EXPEDITION_DEFENDER = 33816, // used to fight Razorscale + NPC_RAZORSCALE_CONTROLLER = 33233, // harpoon shot trigger npc for phase // The antechamber of ulduar NPC_STEELBREAKER = 32867, @@ -109,7 +109,7 @@ enum NPC_KEEPER_MIMIRON = 33244, NPC_KEEPER_THORIM = 33242, - MAX_SPECIAL_ACHIEV_CRITS = 7, + MAX_SPECIAL_ACHIEV_CRITS = 8, TYPE_ACHIEV_CAT_LADY = 0, TYPE_ACHIEV_NINE_LIVES = 1, @@ -118,6 +118,7 @@ enum TYPE_ACHIEV_MOLGEIM = 4, TYPE_ACHIEV_STUNNED = 5, TYPE_ACHIEV_SHATTERED = 6, + TYPE_ACHIEV_QUICK_SHAVE = 7, // Loot chests // Kologarn @@ -153,6 +154,10 @@ enum GO_LEVIATHAN_GATE = 194630, // Gate after Leviathan -> this will be broken when the boss enters the arena GO_XT002_GATE = 194631, // Gate before Xt002 GO_BROKEN_HARPOON = 194565, // Broken harpoon from Razorscale + GO_HARPOON_GUN_1 = 194542, // usable harpoonS - respawn when the broken one is repaired + GO_HARPOON_GUN_2 = 194541, + GO_HARPOON_GUN_3 = 194543, + GO_HARPOON_GUN_4 = 194519, // Antechamber GO_KOLOGARN_BRIDGE = 194232, @@ -275,6 +280,10 @@ class MANGOS_DLL_DECL instance_ulduar : public ScriptedInstance void DoProcessShatteredEvent(); + void GetDefenderGuids(GuidList& lDefenders) { lDefenders = m_lDefendersGuids; } + void GetEngineersGuids(GuidList& lEngineers) { lEngineers = m_lEngineersGuids; } + void GetTrappersGuids(GuidList& lTrappers) { lTrappers = m_lTrappersGuids; } + void GetHarpoonsGuids(GuidVector& vHarpoons) { vHarpoons = m_vBrokenHarpoonsGuids; } void GetToyPileGuids(GuidVector& vToyPiles) { vToyPiles = m_vToyPileGuidVector; } void Update(uint32 uiDiff); @@ -289,6 +298,12 @@ class MANGOS_DLL_DECL instance_ulduar : public ScriptedInstance uint32 m_uiShatterAchievTimer; GuidVector m_vToyPileGuidVector; + GuidVector m_vBrokenHarpoonsGuids; + GuidList m_lEngineersGuids; + GuidList m_lTrappersGuids; + GuidList m_lDefendersGuids; + GuidList m_lHarpoonDummyGuids; + GuidList m_lRepairedHarpoonsGuids; }; #endif diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 8feaef3d5..bffc2e619 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2928" + #define SD2_REVISION_NR "2929" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 29c89172b..bf7c27fbf 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -1277,10 +1277,13 @@ UPDATE creature_template SET ScriptName='boss_heart_deconstructor' WHERE entry=3 UPDATE creature_template SET ScriptName='npc_xt_toy_pile' WHERE entry=33337; UPDATE creature_template SET ScriptName='boss_razorscale' WHERE entry=33186; UPDATE creature_template SET ScriptName='npc_expedition_commander' WHERE entry=33210; -DELETE FROM scripted_event_id WHERE id IN (9735,21620); +UPDATE creature_template SET ScriptName='npc_razorscale_spawner' WHERE entry=33245; +UPDATE creature_template SET ScriptName='npc_harpoon_fire_state' WHERE entry=33282; +DELETE FROM scripted_event_id WHERE id IN (9735,20964,21620); INSERT INTO scripted_event_id VALUES -(9735,'event_spell_saronite_barrier'), -(21620,'event_ulduar'); +(9735, 'event_spell_saronite_barrier'), -- Vezax saronite barrier event +(20964,'event_spell_harpoon_shot'), -- Razorscale harpoon event +(21620,'event_ulduar'); -- Ignis construct shatter event /* UN'GORO CRATER */ UPDATE creature_template SET ScriptName='npc_ame01' WHERE entry=9623; diff --git a/sql/updates/r2929_mangos.sql b/sql/updates/r2929_mangos.sql new file mode 100644 index 000000000..8e7590a65 --- /dev/null +++ b/sql/updates/r2929_mangos.sql @@ -0,0 +1,5 @@ +UPDATE creature_template SET ScriptName='npc_razorscale_spawner' WHERE entry=33245; +UPDATE creature_template SET ScriptName='npc_harpoon_fire_state' WHERE entry=33282; +DELETE FROM scripted_event_id WHERE id IN (20964); +INSERT INTO scripted_event_id VALUES +(20964,'event_spell_harpoon_shot'); From f4e4401669955dd439e682ec2c9ad8df6fc51751 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Wed, 18 Sep 2013 01:44:14 +0300 Subject: [PATCH 0940/1172] [2930] Implement spawn support and basic script for Flame Leviathan - Ulduar --- .../ulduar/ulduar/boss_flame_leviathan.cpp | 145 +++++++++++++++++- .../ulduar/ulduar/instance_ulduar.cpp | 98 +++++++++++- scripts/northrend/ulduar/ulduar/ulduar.h | 30 +++- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 + sql/scriptdev2_script_full.sql | 6 +- sql/updates/r2930_mangos.sql | 1 + sql/updates/r2930_scriptdev2.sql | 5 + 8 files changed, 276 insertions(+), 12 deletions(-) create mode 100644 sql/updates/r2930_mangos.sql create mode 100644 sql/updates/r2930_scriptdev2.sql diff --git a/scripts/northrend/ulduar/ulduar/boss_flame_leviathan.cpp b/scripts/northrend/ulduar/ulduar/boss_flame_leviathan.cpp index 0bef1df4e..5c7aa5675 100644 --- a/scripts/northrend/ulduar/ulduar/boss_flame_leviathan.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_flame_leviathan.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: boss_flame_leviathan -SD%Complete: 0% -SDComment: +SD%Complete: 20% +SDComment: Basic script only. SDCategory: Ulduar EndScriptData */ @@ -47,9 +47,150 @@ enum SAY_TOWER_DOWN = -1603174, EMOTE_PURSUE = -1603175, + + // Leviathan spells + SPELL_INVISIBILITY_DETECTION = 18950, + SPELL_PURSUED = 62374, + SPELL_MISSILE_BARRAGE_SELF = 62401, // cast on Leviathan + SPELL_MISSILE_BARRAGE = 62400, + SPELL_FLAME_VENTS = 62396, + SPELL_BATTERING_RAM = 62376, + SPELL_GATHERING_SPEED = 62375, + + // leviathan turret spells + SPELL_FLAME_CANNON = 62395, + SPELL_CANNON = 62397, + + // defense turret spells + SPELL_OVERLOAD_CIRCUIT = 62399, + SPELL_SEARING_FLAME = 62402, + SPELL_SYSTEMS_SHUTDOWN = 62475, // sends event 21605 for achiev check + + // leviathan seat spell (on eject) + SPELL_SMOKE_TRAIL = 63575, + + // tower buffs to Leviathan (applied on combat start if the towers are alive) + SPELL_TOWER_OF_FROST = 65077, + SPELL_TOWER_OF_LIFE = 64482, + SPELL_TOWER_OF_STORMS = 65076, + SPELL_TOWER_OF_FLAMES = 65075, + + // tower beacon abilities + SPELL_HODIR_FURY = 62533, // tower of frost + SPELL_FREYA_WARD = 62906, // tower of life + SPELL_THORIMS_HAMMER = 62911, // tower of storms + SPELL_MIMIRON_INFERNO = 62910, // tower of flames + + // beacon vehicles visuals + SPELL_LIGHTNING_SKYBEAM = 62897, // storm beacon + SPELL_RED_SKYBEAM = 63772, // flames beacon + SPELL_BLUE_SKYBEAM = 63769, // frost beacon + SPELL_GREEN_SKYBEAM = 62895, // life beacon + + // other beacon vehicles spells + SPELL_BEAM_TARGET_STATE = 62898, + SPELL_TARGET_SEARCH = 63761, // cast by npc 33369 + SPELL_UNSTABLE_ENERGY = 62865, // cast by npc 33366 + SPELL_BIRTH = 40031, + + // hard mode beacons - they cast the actual damage spells + NPC_THORIM_HAMMER = 33365, + NPC_MIMIRON_INFERNO = 33370, + NPC_HODIR_FURY = 33212, + NPC_FREYA_WARD = 33367, + + // beacon vehicles + NPC_THORIM_HAMMER_VEHICLE = 33364, // has accessory 33365 + NPC_MIMIRON_INFERNO_VEHICLE = 33369, // has accessory 33370 + NPC_HODIR_FURY_VEHICLE = 33108, // has accessory 33212 + NPC_FREYA_WARD_VEHICLE = 33366, // has accessory 33367 + + // freya's ward summons + NPC_WRITHING_LASHER = 33387, // both spam spell 65062 on target + NPC_WARD_OF_LIFE = 34275, }; +/*###### +## boss_flame_leviathan +######*/ + +struct MANGOS_DLL_DECL boss_flame_leviathanAI : public ScriptedAI +{ + boss_flame_leviathanAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (instance_ulduar*)pCreature->GetInstanceData(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); + Reset(); + } + + instance_ulduar* m_pInstance; + bool m_bIsRegularMode; + + void Reset() override + { + DoCastSpellIfCan(m_creature, SPELL_INVISIBILITY_DETECTION, CAST_TRIGGERED | CAST_AURA_NOT_PRESENT); + } + + void JustDied(Unit* pKiller) override + { + if (m_pInstance) + m_pInstance->SetData(TYPE_LEVIATHAN, DONE); + + DoScriptText(SAY_DEATH, m_creature); + } + + void Aggro(Unit* pWho) override + { + if (m_pInstance) + m_pInstance->SetData(TYPE_LEVIATHAN, IN_PROGRESS); + + DoScriptText(SAY_AGGRO, m_creature); + } + + void KilledUnit(Unit* pVictim) override + { + DoScriptText(SAY_SLAY, m_creature); + } + + void JustReachedHome() override + { + if (m_pInstance) + m_pInstance->SetData(TYPE_LEVIATHAN, FAIL); + } + + void JustSummoned(Creature* pSummoned) override + { + } + + void MovementInform(uint32 uiMoveType, uint32 uiPointId) override + { + if (uiMoveType != POINT_MOTION_TYPE || !uiPointId) + return; + + // set boss in combat (if not already) + m_creature->SetInCombatWithZone(); + } + + void UpdateAI(const uint32 uiDiff) override + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_flame_leviathan(Creature* pCreature) +{ + return new boss_flame_leviathanAI(pCreature); +} + void AddSC_boss_flame_leviathan() { + Script* pNewScript; + pNewScript = new Script; + pNewScript->Name = "boss_flame_leviathan"; + pNewScript->GetAI = GetAI_boss_flame_leviathan; + pNewScript->RegisterSelf(); } diff --git a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp index 955c2fe19..6492c9596 100644 --- a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp +++ b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp @@ -24,6 +24,22 @@ EndScriptData */ #include "precompiled.h" #include "ulduar.h" +enum +{ + SAY_PRE_LEVIATHAN_1 = -1603239, + SAY_PRE_LEVIATHAN_2 = -1603240, + SAY_PRE_LEVIATHAN_3 = -1603241, +}; + +static const DialogueEntry aUlduarDialogue[] = +{ + {SAY_PRE_LEVIATHAN_1, NPC_BRONZEBEARD_RADIO, 7000}, + {SAY_PRE_LEVIATHAN_2, NPC_BRONZEBEARD_RADIO, 5000}, + {SAY_PRE_LEVIATHAN_3, NPC_BRONZEBEARD_RADIO, 2000}, + {NPC_LEVIATHAN, 0, 0}, + {0, 0, 0} +}; + struct sSpawnLocation { float m_fX, m_fY, m_fZ, m_fO; @@ -37,7 +53,7 @@ static sSpawnLocation m_aKeepersSpawnLocs[] = {2036.674f, -73.814f, 411.355f, 2.51f}, // Thorim }; -instance_ulduar::instance_ulduar(Map* pMap) : ScriptedInstance(pMap) +instance_ulduar::instance_ulduar(Map* pMap) : ScriptedInstance(pMap), DialogueHelper(aUlduarDialogue) { Initialize(); } @@ -48,10 +64,21 @@ void instance_ulduar::Initialize() memset(&m_auiHardBoss, 0, sizeof(m_auiHardBoss)); memset(&m_auiUlduarKeepers, 0, sizeof(m_auiUlduarKeepers)); + InitializeDialogueHelper(this, true); + for (uint8 i = 0; i < MAX_SPECIAL_ACHIEV_CRITS; ++i) m_abAchievCriteria[i] = false; } +void instance_ulduar::OnPlayerEnter(Player* pPlayer) +{ + if (GetData(TYPE_LEVIATHAN) == SPECIAL) + { + if (!GetSingleCreatureFromStorage(NPC_LEVIATHAN)) + pPlayer->SummonCreature(NPC_LEVIATHAN, afLeviathanMovePos[0], afLeviathanMovePos[1], afLeviathanMovePos[2], afLeviathanMovePos[3], TEMPSUMMON_DEAD_DESPAWN, 0); + } +} + bool instance_ulduar::IsEncounterInProgress() const { for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) @@ -113,6 +140,10 @@ void instance_ulduar::OnCreatureCreate(Creature* pCreature) SpawnFriendlyKeeper(NPC_FREYA_IMAGE); break; + case NPC_ULDUAR_COLOSSUS: + if (pCreature->GetPositionX() > 300.0f) + m_sColossusGuidSet.insert(pCreature->GetObjectGuid()); + return; case NPC_EXPEDITION_DEFENDER: m_lDefendersGuids.push_back(pCreature->GetObjectGuid()); return; @@ -148,8 +179,12 @@ void instance_ulduar::OnObjectCreate(GameObject* pGo) // The siege case GO_SHIELD_WALL: break; + case GO_LIGHTNING_DOOR: + if (m_auiEncounter[TYPE_LEVIATHAN] == SPECIAL) + pGo->SetGoState(GO_STATE_READY); + break; case GO_LEVIATHAN_GATE: - if (m_auiEncounter[TYPE_LEVIATHAN] == DONE) + if (m_auiEncounter[TYPE_LEVIATHAN] == DONE || m_auiEncounter[TYPE_LEVIATHAN] == SPECIAL) pGo->SetGoState(GO_STATE_ACTIVE); break; case GO_XT002_GATE: @@ -299,8 +334,18 @@ void instance_ulduar::SetData(uint32 uiType, uint32 uiData) { case TYPE_LEVIATHAN: m_auiEncounter[uiType] = uiData; - DoUseDoorOrButton(GO_SHIELD_WALL); - if (uiData == DONE) + if (uiData != SPECIAL) + DoUseDoorOrButton(GO_SHIELD_WALL); + if (uiData == IN_PROGRESS) + { + // mare sure that the Lightning door is closed when engaged in combat + if (GameObject* pDoor = GetSingleGameObjectFromStorage(GO_LIGHTNING_DOOR)) + { + if (pDoor->GetGoState() != GO_STATE_READY) + DoUseDoorOrButton(GO_LIGHTNING_DOOR); + } + } + else if (uiData == DONE) { DoUseDoorOrButton(GO_XT002_GATE); DoUseDoorOrButton(GO_LIGHTNING_FIELD); @@ -531,7 +576,7 @@ void instance_ulduar::SetData(uint32 uiType, uint32 uiData) DoOpenMadnessDoorIfCan(); - if (uiData == DONE || uiData == FAIL) + if (uiData == DONE || uiData == SPECIAL) { OUT_SAVE_INST_DATA; @@ -654,6 +699,20 @@ void instance_ulduar::OnCreatureDeath(Creature* pCreature) if (GetData(TYPE_AURIAYA) == IN_PROGRESS) SetSpecialAchievementCriteria(TYPE_ACHIEV_CAT_LADY, false); break; + case NPC_ULDUAR_COLOSSUS: + { + if (m_sColossusGuidSet.find(pCreature->GetObjectGuid()) != m_sColossusGuidSet.end()) + m_sColossusGuidSet.erase(pCreature->GetObjectGuid()); + + // start pre Leviathan event + if (m_sColossusGuidSet.empty()) + { + StartNextDialogueText(SAY_PRE_LEVIATHAN_1); + SetData(TYPE_LEVIATHAN, SPECIAL); + pCreature->SummonCreature(NPC_LEVIATHAN, afLeviathanSpawnPos[0], afLeviathanSpawnPos[1], afLeviathanSpawnPos[2], afLeviathanSpawnPos[3], TEMPSUMMON_DEAD_DESPAWN, 0); + } + } + break; } } @@ -746,8 +805,37 @@ void instance_ulduar::DoProcessShatteredEvent() m_uiShatterAchievTimer = 5000; } +void instance_ulduar::JustDidDialogueStep(int32 iEntry) +{ + switch (iEntry) + { + case NPC_LEVIATHAN: + // move the leviathan in the arena + if (Creature* pLeviathan = GetSingleCreatureFromStorage(NPC_LEVIATHAN)) + { + // the boss has increased speed for this move; handled as custom + float fSpeedRate = pLeviathan->GetSpeedRate(MOVE_RUN); + pLeviathan->SetWalk(false); + pLeviathan->SetSpeedRate(MOVE_RUN, 5); + pLeviathan->GetMotionMaster()->MovePoint(1, afLeviathanMovePos[0], afLeviathanMovePos[1], afLeviathanMovePos[2]); + pLeviathan->SetSpeedRate(MOVE_RUN, fSpeedRate); + + // modify respawn / home position to the center of arena + pLeviathan->SetRespawnCoord(afLeviathanMovePos[0], afLeviathanMovePos[1], afLeviathanMovePos[2], afLeviathanMovePos[3]); + } + + // Note: starting 4.x this gate is a GO 33 and it's destroyed at this point + DoUseDoorOrButton(GO_LEVIATHAN_GATE); + + // ToDo: spawn the vehicle backups behind the Leviathan combat gate + break; + } +} + void instance_ulduar::Update(uint32 uiDiff) { + DialogueUpdate(uiDiff); + if (GetData(TYPE_IGNIS) == IN_PROGRESS) { if (m_uiShatterAchievTimer) diff --git a/scripts/northrend/ulduar/ulduar/ulduar.h b/scripts/northrend/ulduar/ulduar/ulduar.h index ff9295b3b..78a4d99d7 100644 --- a/scripts/northrend/ulduar/ulduar/ulduar.h +++ b/scripts/northrend/ulduar/ulduar/ulduar.h @@ -52,6 +52,10 @@ enum NPC_HEART_DECONSTRUCTOR = 33329, NPC_XT_TOY_PILE = 33337, // robot spawner npc for XT002 + // Leviathan other npcs + NPC_ULDUAR_COLOSSUS = 33237, + NPC_BRONZEBEARD_RADIO = 34054, + // Razorscale helper npcs NPC_EXPEDITION_COMMANDER = 33210, NPC_EXPEDITION_ENGINEER = 33287, // npc used to repair the Harpoons @@ -150,7 +154,7 @@ enum // Doors and other Objects // The siege GO_SHIELD_WALL = 194416, // Gate before Leviathan - GO_LIGHTNING_FIELD = 194559, // Lightning gate after the Leviathan. It closes after the boss enters the arena + GO_LIGHTNING_DOOR = 194905, // Lightning gate after the Leviathan. It closes after the boss enters the arena GO_LEVIATHAN_GATE = 194630, // Gate after Leviathan -> this will be broken when the boss enters the arena GO_XT002_GATE = 194631, // Gate before Xt002 GO_BROKEN_HARPOON = 194565, // Broken harpoon from Razorscale @@ -198,7 +202,7 @@ enum GO_DARK_IRON_PORTCULIS = 194560, // Door from the arena to the hallway GO_RUNED_STONE_DOOR = 194557, // Door after the runic colossus GO_THORIM_STONE_DOOR = 194558, // Door after the ancient rune giant - GO_LIGHTNING_DOOR = 194905, // Arena exit door + GO_LIGHTNING_FIELD = 194559, // Arena exit door GO_DOOR_LEVER = 194264, // In front of the door // Descent to madness @@ -248,9 +252,25 @@ enum ACHIEV_CRIT_NERF_GRAVITY_H = 10079, ACHIEV_CRIT_QUICK_SHAVE_N = 10062, // Razorscale, achievs 2919, 2921 ACHIEV_CRIT_QUICK_SHAVE_H = 10063, + ACHIEV_CRIT_ORB_BOMB_N = 10056, // Flame Leviathan, achievs 2913, 2918 (one tower) + ACHIEV_CRIT_ORB_BOMB_H = 10061, + ACHIEV_CRIT_ORB_DEV_N = 10057, // Flame Leviathan, achievs 2914, 2916 (two towers) + ACHIEV_CRIT_ORB_DEV_H = 10059, + ACHIEV_CRIT_ORB_NUKED_N = 10058, // Flame Leviathan, achievs 2915, 2917 (three towers) + ACHIEV_CRIT_ORB_NUKED_H = 10060, + ACHIEV_CRIT_ORBITUARY_N = 10218, // Flame Leviathan, achievs 3056, 3057 (four towers) + ACHIEV_CRIT_ORBITUARY_H = 10219, + ACHIEV_CRIT_SHUTOUT_N = 10054, // Flame Leviathan, achievs 2911, 2913 + ACHIEV_CRIT_SHUTOUT_H = 10055, + ACHIEV_CRIT_UNBROKEN_N = 10044, // Flame Leviathan, achievs 2905, 2906 + ACHIEV_CRIT_UNBROKEN_H = 10045, }; -class MANGOS_DLL_DECL instance_ulduar : public ScriptedInstance +// note: original spawn loc is 607.9199f, -12.90516f, 409.887f but we won't use it because it's too far and grid won't be loaded that far +static const float afLeviathanSpawnPos[4] = { 422.8898f, -13.32677f, 409.8839f, 3.12f }; +static const float afLeviathanMovePos[4] = { 296.5809f, -11.55668f, 409.8278f, 3.12f }; + +class MANGOS_DLL_DECL instance_ulduar : public ScriptedInstance, private DialogueHelper { public: instance_ulduar(Map* pMap); @@ -259,6 +279,7 @@ class MANGOS_DLL_DECL instance_ulduar : public ScriptedInstance void Initialize() override; bool IsEncounterInProgress() const override; + void OnPlayerEnter(Player* pPlayer) override; void OnCreatureCreate(Creature* pCreature) override; void OnCreatureDeath(Creature* pCreature) override; void OnObjectCreate(GameObject* pGo) override; @@ -289,6 +310,8 @@ class MANGOS_DLL_DECL instance_ulduar : public ScriptedInstance void Update(uint32 uiDiff); protected: + void JustDidDialogueStep(int32 iEntry) override; + std::string m_strInstData; uint32 m_auiEncounter[MAX_ENCOUNTER]; uint32 m_auiHardBoss[HARD_MODE_ENCOUNTER]; @@ -304,6 +327,7 @@ class MANGOS_DLL_DECL instance_ulduar : public ScriptedInstance GuidList m_lDefendersGuids; GuidList m_lHarpoonDummyGuids; GuidList m_lRepairedHarpoonsGuids; + GuidSet m_sColossusGuidSet; }; #endif diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index bffc2e619..a641c64b2 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2929" + #define SD2_REVISION_NR "2930" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index bf7c27fbf..40046f00d 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -1279,6 +1279,7 @@ UPDATE creature_template SET ScriptName='boss_razorscale' WHERE entry=33186; UPDATE creature_template SET ScriptName='npc_expedition_commander' WHERE entry=33210; UPDATE creature_template SET ScriptName='npc_razorscale_spawner' WHERE entry=33245; UPDATE creature_template SET ScriptName='npc_harpoon_fire_state' WHERE entry=33282; +UPDATE creature_template SET ScriptName='boss_flame_leviathan' WHERE entry=33113; DELETE FROM scripted_event_id WHERE id IN (9735,20964,21620); INSERT INTO scripted_event_id VALUES (9735, 'event_spell_saronite_barrier'), -- Vezax saronite barrier event diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 9ed21c98f..79495c60d 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -3631,7 +3631,11 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1603236,'%s\'s heart is severed from his body.',0,3,0,0,'xt-002 EMOTE_KILL_HEART'), (-1603237,'%s begins to cause the earth to quake.',0,3,0,0,'xt-002 EMOTE_EARTH_QUAKE'), -(-1603238,'%s is extinguished by the water!',0,2,0,0,'ignis EMOTE_EXTINGUISH_SCORCH'); +(-1603238,'%s is extinguished by the water!',0,2,0,0,'ignis EMOTE_EXTINGUISH_SCORCH'), + +(-1603239,'You\'ve done it! You\'ve broken the defenses of Ulduar. In a few moments, we will be dropping in to...',15804,0,0,0,'bronzebeard radio SAY_PRE_LEVIATHAN_1'), +(-1603240,'What is that? Be careful! Something\'s headed your way!',15805,0,0,0,'bronzebeard radio SAY_PRE_LEVIATHAN_2'), +(-1603241,'Quickly! Evasive action! Evasive act--',15806,0,0,0,'bronzebeard radio SAY_PRE_LEVIATHAN_3'); -- -1 604 000 GUNDRAK INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES diff --git a/sql/updates/r2930_mangos.sql b/sql/updates/r2930_mangos.sql new file mode 100644 index 000000000..e41914438 --- /dev/null +++ b/sql/updates/r2930_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='boss_flame_leviathan' WHERE entry=33113; diff --git a/sql/updates/r2930_scriptdev2.sql b/sql/updates/r2930_scriptdev2.sql new file mode 100644 index 000000000..cf42274c3 --- /dev/null +++ b/sql/updates/r2930_scriptdev2.sql @@ -0,0 +1,5 @@ +DELETE FROM script_texts WHERE entry IN (-1603239,-1603240,-1603241); +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1603239,'You\'ve done it! You\'ve broken the defenses of Ulduar. In a few moments, we will be dropping in to...',15804,0,0,0,'bronzebeard radio SAY_PRE_LEVIATHAN_1'), +(-1603240,'What is that? Be careful! Something\'s headed your way!',15805,0,0,0,'bronzebeard radio SAY_PRE_LEVIATHAN_2'), +(-1603241,'Quickly! Evasive action! Evasive act--',15806,0,0,0,'bronzebeard radio SAY_PRE_LEVIATHAN_3'); From 8f94c1904e108b5dc5ab0d64e0948de5718b9288 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Wed, 18 Sep 2013 12:24:46 +0300 Subject: [PATCH 0941/1172] [2931] Implement Flame Leviathan epilogue event --- .../ulduar/ulduar/boss_flame_leviathan.cpp | 43 +++++++++++++++++++ .../ulduar/ulduar/instance_ulduar.cpp | 2 +- sd2_revision_nr.h | 2 +- 3 files changed, 45 insertions(+), 2 deletions(-) diff --git a/scripts/northrend/ulduar/ulduar/boss_flame_leviathan.cpp b/scripts/northrend/ulduar/ulduar/boss_flame_leviathan.cpp index 5c7aa5675..0d2db8441 100644 --- a/scripts/northrend/ulduar/ulduar/boss_flame_leviathan.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_flame_leviathan.cpp @@ -108,6 +108,12 @@ enum // freya's ward summons NPC_WRITHING_LASHER = 33387, // both spam spell 65062 on target NPC_WARD_OF_LIFE = 34275, + + // other npcs (spawned at epilogue) + SPELL_RIDE_VEHICLE = 43671, + NPC_BRANN_FLYING_MACHINE = 34120, + NPC_BRANN_BRONZEBEARD = 34119, + NPC_ARCHMANGE_RHYDIAN = 33696, }; /*###### @@ -137,6 +143,16 @@ struct MANGOS_DLL_DECL boss_flame_leviathanAI : public ScriptedAI m_pInstance->SetData(TYPE_LEVIATHAN, DONE); DoScriptText(SAY_DEATH, m_creature); + + // start epilogue event + if (Creature* pFlyMachine = m_creature->SummonCreature(NPC_BRANN_FLYING_MACHINE, 175.2838f, -210.4325f, 501.2375f, 1.42f, TEMPSUMMON_CORPSE_DESPAWN, 0)) + { + if (Creature* pBrann = m_creature->SummonCreature(NPC_BRANN_BRONZEBEARD, 175.2554f, -210.6305f, 500.7375f, 1.42f, TEMPSUMMON_CORPSE_DESPAWN, 0)) + pBrann->CastSpell(pFlyMachine, SPELL_RIDE_VEHICLE, true); + + pFlyMachine->SetWalk(false); + pFlyMachine->GetMotionMaster()->MovePoint(1, 229.9419f, -130.3764f, 409.5681f); + } } void Aggro(Unit* pWho) override @@ -162,6 +178,33 @@ struct MANGOS_DLL_DECL boss_flame_leviathanAI : public ScriptedAI { } + void SummonedMovementInform(Creature* pSummoned, uint32 uiMoveType, uint32 uiPointId) override + { + if (uiMoveType != POINT_MOTION_TYPE || !uiPointId) + return; + + if (pSummoned->GetEntry() == NPC_BRANN_FLYING_MACHINE) + { + // spawn the Archmange and eject Brann + if (Creature* pArchmage = m_creature->SummonCreature(NPC_ARCHMANGE_RHYDIAN, 235.5596f, -136.1876f, 409.6508f, 1.78f, TEMPSUMMON_CORPSE_DESPAWN, 0)) + { + pArchmage->SetWalk(false); + pArchmage->GetMotionMaster()->MovePoint(1, 239.3158f, -123.6443f, 409.8174f); + } + + pSummoned->RemoveAllAuras(); + } + else if (pSummoned->GetEntry() == NPC_ARCHMANGE_RHYDIAN) + { + if (Creature* pBrann = GetClosestCreatureWithEntry(pSummoned, NPC_BRANN_BRONZEBEARD, 30.0f)) + { + // rest will be handled by DB scripts + pBrann->SetWalk(false); + pBrann->GetMotionMaster()->MoveWaypoint(); + } + } + } + void MovementInform(uint32 uiMoveType, uint32 uiPointId) override { if (uiMoveType != POINT_MOTION_TYPE || !uiPointId) diff --git a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp index 6492c9596..b904c1bb4 100644 --- a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp +++ b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp @@ -348,7 +348,7 @@ void instance_ulduar::SetData(uint32 uiType, uint32 uiData) else if (uiData == DONE) { DoUseDoorOrButton(GO_XT002_GATE); - DoUseDoorOrButton(GO_LIGHTNING_FIELD); + DoUseDoorOrButton(GO_LIGHTNING_DOOR); } break; case TYPE_IGNIS: diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index a641c64b2..e01e05aa3 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2930" + #define SD2_REVISION_NR "2931" #endif // __SD2_REVISION_NR_H__ From fbac8c6f3ba0fb0b3cf38b0f5230e434eaa2ce02 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Wed, 18 Sep 2013 13:32:25 +0300 Subject: [PATCH 0942/1172] [2932] Implement Ulduar teleporters Signed-off-by: Xfurry --- .../ulduar/ulduar/instance_ulduar.cpp | 8 +- scripts/northrend/ulduar/ulduar/ulduar.cpp | 144 +++++++++++++++++- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 + sql/updates/r2932_mangos.sql | 1 + 5 files changed, 147 insertions(+), 9 deletions(-) create mode 100644 sql/updates/r2932_mangos.sql diff --git a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp index b904c1bb4..55f4c0f31 100644 --- a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp +++ b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp @@ -72,7 +72,7 @@ void instance_ulduar::Initialize() void instance_ulduar::OnPlayerEnter(Player* pPlayer) { - if (GetData(TYPE_LEVIATHAN) == SPECIAL) + if (GetData(TYPE_LEVIATHAN) == SPECIAL || GetData(TYPE_LEVIATHAN) == FAIL) { if (!GetSingleCreatureFromStorage(NPC_LEVIATHAN)) pPlayer->SummonCreature(NPC_LEVIATHAN, afLeviathanMovePos[0], afLeviathanMovePos[1], afLeviathanMovePos[2], afLeviathanMovePos[3], TEMPSUMMON_DEAD_DESPAWN, 0); @@ -180,11 +180,11 @@ void instance_ulduar::OnObjectCreate(GameObject* pGo) case GO_SHIELD_WALL: break; case GO_LIGHTNING_DOOR: - if (m_auiEncounter[TYPE_LEVIATHAN] == SPECIAL) + if (m_auiEncounter[TYPE_LEVIATHAN] == SPECIAL || m_auiEncounter[TYPE_LEVIATHAN] == FAIL) pGo->SetGoState(GO_STATE_READY); break; case GO_LEVIATHAN_GATE: - if (m_auiEncounter[TYPE_LEVIATHAN] == DONE || m_auiEncounter[TYPE_LEVIATHAN] == SPECIAL) + if (m_auiEncounter[TYPE_LEVIATHAN] != NOT_STARTED) pGo->SetGoState(GO_STATE_ACTIVE); break; case GO_XT002_GATE: @@ -576,7 +576,7 @@ void instance_ulduar::SetData(uint32 uiType, uint32 uiData) DoOpenMadnessDoorIfCan(); - if (uiData == DONE || uiData == SPECIAL) + if (uiData == DONE || uiData == FAIL || uiData == SPECIAL) { OUT_SAVE_INST_DATA; diff --git a/scripts/northrend/ulduar/ulduar/ulduar.cpp b/scripts/northrend/ulduar/ulduar/ulduar.cpp index 982ef8dc6..2413c1db0 100644 --- a/scripts/northrend/ulduar/ulduar/ulduar.cpp +++ b/scripts/northrend/ulduar/ulduar/ulduar.cpp @@ -16,17 +16,31 @@ /* ScriptData SDName: ulduar -SD%Complete: 0% -SDComment: +SD%Complete: 10% +SDComment: Teleporters are hacked until solved in core SDCategory: Ulduar EndScriptData */ +/* ContentData +go_ulduar_teleporter +EndContentData */ + #include "precompiled.h" #include "ulduar.h" /*##### -## Teleporters +## go_ulduar_teleporter #####*/ + +/* **** +* The teleporter spells cannot be used atm, because target-type TARGET_SCRIPT_COORDINATES, NO_TARGET is not yet suitable for needed targeting. (Current core-Design) +* All teleporters are GO with entry 194569 - on them are npcs of entry 32780 spawned. +* However for reload case we would need to be able to target these npcs of not yet loaded grids (currently impossible) +* And in general we would need some "good" way of selecting appropriate target-npcs for each spell, but sorting is nearly impossible, as there are > 50 of these npcs spawned in Ulduar + +* So -- TODO -- remove the TeleportTo Hacks when correct target selection for this spell is working. +*/ + enum TeleporterSpells { SPELL_TELE_EXPEDITION_BASE_CAMP = 64014, @@ -45,7 +59,7 @@ enum TeleporterGossipItems { GOSSIP_ITEM_TELE_BASE_CAMP = -3603000, GOSSIP_ITEM_TELE_FORMATION_GROUNDS = -3603001, - GOSSIP_ITEM_TELE_COLOSSAR_FORGE = -3603002, + GOSSIP_ITEM_TELE_COLOSSAL_FORGE = -3603002, GOSSIP_ITEM_TELE_SCRAPYARD = -3603003, GOSSIP_ITEM_TELE_ANTECHAMBER = -3603004, GOSSIP_ITEM_TELE_WALKWAY = -3603005, @@ -54,6 +68,128 @@ enum TeleporterGossipItems GOSSIP_ITEM_TELE_YOGG_SARON = -3603008, }; +bool GossipHello_go_ulduar_teleporter(Player* pPlayer, GameObject* pGo) +{ + instance_ulduar* pInstance = (instance_ulduar*)pPlayer->GetInstanceData(); + if (!pInstance) + return true; + + // Base camp + pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_TELE_BASE_CAMP, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF); + + // Formation grounds + if (pInstance->GetData(TYPE_LEVIATHAN) != NOT_STARTED || pPlayer->isGameMaster()) + pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_TELE_FORMATION_GROUNDS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); + + // Colossal Forge + if (pInstance->GetData(TYPE_LEVIATHAN) == DONE || pPlayer->isGameMaster()) + pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_TELE_COLOSSAL_FORGE, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); + + // Scrapyard + if (pInstance->GetData(TYPE_XT002) != NOT_STARTED || pPlayer->isGameMaster()) + pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_TELE_SCRAPYARD, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); + + // Antechamber + if (pInstance->GetData(TYPE_XT002) == DONE || pPlayer->isGameMaster()) + pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_TELE_ANTECHAMBER, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4); + + // Shattered walkway + if (pInstance->GetData(TYPE_KOLOGARN) == DONE || pPlayer->isGameMaster()) + pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_TELE_WALKWAY, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 5); + + // Conservatory of life + if (pInstance->GetData(TYPE_AURIAYA) == DONE || pPlayer->isGameMaster()) + pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_TELE_CONSERVATORY, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 6); + + // Spark of imagination + if (pInstance->GetData(TYPE_MIMIRON) != NOT_STARTED || pPlayer->isGameMaster()) + pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_TELE_SPARK_IMAGINATION, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 7); + + // Prison of Yogg-Saron + if (pInstance->GetData(TYPE_VEZAX) == DONE || pPlayer->isGameMaster()) + pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_TELE_YOGG_SARON, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 8); + + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pGo->GetGOInfo()->GetGossipMenuId(), pGo), pGo->GetObjectGuid()); + + return true; +} + +bool GossipSelect_go_ulduar_teleporter(Player* pPlayer, GameObject* pGO, uint32 uiSender, uint32 uiAction) +{ + instance_ulduar* pInstance = (instance_ulduar*)pPlayer->GetInstanceData(); + if (!pInstance) + return true; + + // Additional checks for the teleporters to prevent exploiting + // -- TODO -- HACK HERE, use spells when possible! + + // There needs to be displayed a msg when in Combat, it is likely that this is to be handled by core and spell can-cast check + // -- TODO -- Remove the combat check when spells are correctly working + if (pPlayer->isInCombat()) + return true; + + switch (uiAction) + { + // Basecamp + case GOSSIP_ACTION_INFO_DEF: + // pPlayer->CastSpell(pPlayer, SPELL_TELE_EXPEDITION_BASE_CAMP, true, NULL, NULL, pGo->GetObjectGuid()); + pPlayer->TeleportTo(603, -706.122f, -92.6024f, 429.876f, 0); + break; + // Formation Grounds + case GOSSIP_ACTION_INFO_DEF + 1: + // pPlayer->CastSpell(pPlayer, SPELL_TELE_FORMATION_GROUNDS, true, NULL, NULL, pGo->GetObjectGuid()); + pPlayer->TeleportTo(603, 131.248f, -35.3802f, 409.804f, 0); + break; + // Colossal Forge + case GOSSIP_ACTION_INFO_DEF + 2: + // pPlayer->CastSpell(pPlayer, SPELL_TELE_COLOSSAL_FORGE, true, NULL, NULL, pGo->GetObjectGuid()); + pPlayer->TeleportTo(603, 553.233f, -12.3247f, 409.679f, 0); + break; + // Scrapyard + case GOSSIP_ACTION_INFO_DEF + 3: + // pPlayer->CastSpell(pPlayer, SPELL_TELE_SCRAPYARD, true, NULL, NULL, pGo->GetObjectGuid()); + pPlayer->TeleportTo(603, 926.292f, -11.4635f, 418.595f, 0); + break; + // Antechamber + case GOSSIP_ACTION_INFO_DEF + 4: + // pPlayer->CastSpell(pPlayer, SPELL_TELE_ANTECHAMBER_OF_ULDUAR, true, NULL, NULL, pGo->GetObjectGuid()); + pPlayer->TeleportTo(603, 1498.09f, -24.246f, 420.967f, 0); + break; + // Shattered walkway + case GOSSIP_ACTION_INFO_DEF + 5: + // pPlayer->CastSpell(pPlayer, SPELL_TELE_SHATTERED_WALKWAY, true, NULL, NULL, pGo->GetObjectGuid()); + pPlayer->TeleportTo(603, 1859.45f, -24.1f, 448.9f, 0); + break; + // Conservatory of life + case GOSSIP_ACTION_INFO_DEF + 6: + // pPlayer->CastSpell(pPlayer, SPELL_TELE_CONSERVATORY_OF_LIFE, true, NULL, NULL, pGo->GetObjectGuid()); + pPlayer->TeleportTo(603, 2086.27f, -24.3134f, 421.239f, 0); + break; + // Spark of imagination + case GOSSIP_ACTION_INFO_DEF + 7: + // pPlayer->CastSpell(pPlayer, SPELL_TELE_SPARK_OF_IMAGINATION, true, NULL, NULL, pGo->GetObjectGuid()); + pPlayer->TeleportTo(603, 2518.16f, 2569.03f, 412.299f, 0); + break; + // Prison of Yogg-Saron + case GOSSIP_ACTION_INFO_DEF + 8: + // pPlayer->CastSpell(pPlayer, SPELL_TELE_PRISON_OF_YOGG, true, NULL, NULL, pGo->GetObjectGuid()); + pPlayer->TeleportTo(603, 1854.82f, -11.56f, 334.175f, 4.71f); + break; + default: + return true; + } + + pPlayer->CLOSE_GOSSIP_MENU(); + return true; +} + void AddSC_ulduar() { + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "go_ulduar_teleporter"; + pNewScript->pGossipHelloGO = &GossipHello_go_ulduar_teleporter; + pNewScript->pGossipSelectGO = &GossipSelect_go_ulduar_teleporter; + pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index e01e05aa3..47b6a7007 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2931" + #define SD2_REVISION_NR "2932" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 40046f00d..df0c51ee3 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -1263,6 +1263,7 @@ UPDATE creature_template SET ScriptName='npc_searing_gaze' WHERE entry=28265; /* ULDUAR */ UPDATE instance_template SET ScriptName='instance_ulduar' WHERE map=603; +UPDATE gameobject_template SET ScriptName='go_ulduar_teleporter' WHERE entry=194569; UPDATE creature_template SET ScriptName='boss_general_vezax' WHERE entry=33271; UPDATE creature_template SET ScriptName='boss_auriaya' WHERE entry=33515; UPDATE creature_template SET ScriptName='boss_feral_defender' WHERE entry=34035; diff --git a/sql/updates/r2932_mangos.sql b/sql/updates/r2932_mangos.sql new file mode 100644 index 000000000..15b69e4a5 --- /dev/null +++ b/sql/updates/r2932_mangos.sql @@ -0,0 +1 @@ +UPDATE gameobject_template SET ScriptName='go_ulduar_teleporter' WHERE entry=194569; From 7e08d59b6430855ba7687bf2fbdb4f425a8c6998 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Thu, 19 Sep 2013 00:26:19 +0300 Subject: [PATCH 0943/1172] [2933] Implement more content related to Ulduar intro events * proper handle Leviathan gauntlet event gossip * allow DB scripts to handle the yells and movement of the intro event * initialize hard mode towers and save the state of each of them --- .../ulduar/ulduar/boss_flame_leviathan.cpp | 6 +- .../ulduar/ulduar/boss_razorscale.cpp | 2 +- .../ulduar/ulduar/instance_ulduar.cpp | 95 +++++++++- scripts/northrend/ulduar/ulduar/ulduar.cpp | 165 ++++++++++++++++++ scripts/northrend/ulduar/ulduar/ulduar.h | 26 ++- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 8 +- sql/scriptdev2_script_full.sql | 5 +- sql/updates/r2933_mangos.sql | 8 + sql/updates/r2933_scriptdev2.sql | 5 + 10 files changed, 308 insertions(+), 14 deletions(-) create mode 100644 sql/updates/r2933_mangos.sql create mode 100644 sql/updates/r2933_scriptdev2.sql diff --git a/scripts/northrend/ulduar/ulduar/boss_flame_leviathan.cpp b/scripts/northrend/ulduar/ulduar/boss_flame_leviathan.cpp index 0d2db8441..96f9f65cc 100644 --- a/scripts/northrend/ulduar/ulduar/boss_flame_leviathan.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_flame_leviathan.cpp @@ -112,7 +112,7 @@ enum // other npcs (spawned at epilogue) SPELL_RIDE_VEHICLE = 43671, NPC_BRANN_FLYING_MACHINE = 34120, - NPC_BRANN_BRONZEBEARD = 34119, + NPC_BRANN_BRONZEBEARD_LEVIATHAN = 34119, NPC_ARCHMANGE_RHYDIAN = 33696, }; @@ -147,7 +147,7 @@ struct MANGOS_DLL_DECL boss_flame_leviathanAI : public ScriptedAI // start epilogue event if (Creature* pFlyMachine = m_creature->SummonCreature(NPC_BRANN_FLYING_MACHINE, 175.2838f, -210.4325f, 501.2375f, 1.42f, TEMPSUMMON_CORPSE_DESPAWN, 0)) { - if (Creature* pBrann = m_creature->SummonCreature(NPC_BRANN_BRONZEBEARD, 175.2554f, -210.6305f, 500.7375f, 1.42f, TEMPSUMMON_CORPSE_DESPAWN, 0)) + if (Creature* pBrann = m_creature->SummonCreature(NPC_BRANN_BRONZEBEARD_LEVIATHAN, 175.2554f, -210.6305f, 500.7375f, 1.42f, TEMPSUMMON_CORPSE_DESPAWN, 0)) pBrann->CastSpell(pFlyMachine, SPELL_RIDE_VEHICLE, true); pFlyMachine->SetWalk(false); @@ -196,7 +196,7 @@ struct MANGOS_DLL_DECL boss_flame_leviathanAI : public ScriptedAI } else if (pSummoned->GetEntry() == NPC_ARCHMANGE_RHYDIAN) { - if (Creature* pBrann = GetClosestCreatureWithEntry(pSummoned, NPC_BRANN_BRONZEBEARD, 30.0f)) + if (Creature* pBrann = GetClosestCreatureWithEntry(pSummoned, NPC_BRANN_BRONZEBEARD_LEVIATHAN, 30.0f)) { // rest will be handled by DB scripts pBrann->SetWalk(false); diff --git a/scripts/northrend/ulduar/ulduar/boss_razorscale.cpp b/scripts/northrend/ulduar/ulduar/boss_razorscale.cpp index 42a90f81b..065d603e2 100644 --- a/scripts/northrend/ulduar/ulduar/boss_razorscale.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_razorscale.cpp @@ -892,7 +892,7 @@ bool EffectDummyCreature_npc_harpoon_fire_state(Unit* /*pCaster*/, uint32 uiSpel ## event_spell_harpoon_shot ######*/ -bool ProcessEventId_event_spell_harpoon_shot(uint32 /*uiEventId*/, Object* pSource, Object* pTarget, bool /*bIsStart*/) +bool ProcessEventId_event_spell_harpoon_shot(uint32 /*uiEventId*/, Object* pSource, Object* /*pTarget*/, bool /*bIsStart*/) { if (((Creature*)pSource)->GetEntry() == NPC_RAZORSCALE_CONTROLLER) { diff --git a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp index 55f4c0f31..5eefcd9ae 100644 --- a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp +++ b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp @@ -53,7 +53,9 @@ static sSpawnLocation m_aKeepersSpawnLocs[] = {2036.674f, -73.814f, 411.355f, 2.51f}, // Thorim }; -instance_ulduar::instance_ulduar(Map* pMap) : ScriptedInstance(pMap), DialogueHelper(aUlduarDialogue) +instance_ulduar::instance_ulduar(Map* pMap) : ScriptedInstance(pMap), DialogueHelper(aUlduarDialogue), + m_uiShatterAchievTimer(0), + m_uiGauntletStatus(0) { Initialize(); } @@ -63,8 +65,9 @@ void instance_ulduar::Initialize() memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); memset(&m_auiHardBoss, 0, sizeof(m_auiHardBoss)); memset(&m_auiUlduarKeepers, 0, sizeof(m_auiUlduarKeepers)); + memset(&m_auiUlduarTowers, 0, sizeof(m_auiUlduarTowers)); - InitializeDialogueHelper(this, true); + InitializeDialogueHelper(this); for (uint8 i = 0; i < MAX_SPECIAL_ACHIEV_CRITS; ++i) m_abAchievCriteria[i] = false; @@ -94,6 +97,8 @@ void instance_ulduar::OnCreatureCreate(Creature* pCreature) switch (pCreature->GetEntry()) { case NPC_LEVIATHAN: + case NPC_EXPLORER_DELLORAH: + case NPC_BRANN_BRONZEBEARD: case NPC_RAZORSCALE: case NPC_EXPEDITION_COMMANDER: case NPC_XT002: @@ -194,6 +199,22 @@ void instance_ulduar::OnObjectCreate(GameObject* pGo) if (m_auiEncounter[TYPE_LEVIATHAN] == DONE) pGo->SetGoState(GO_STATE_ACTIVE); break; + case GO_HODIR_CRYSTAL: + if (m_auiUlduarTowers[0] == FAIL) + pGo->SetGoState(GO_STATE_ACTIVE); + break; + case GO_THORIM_CRYSTAL: + if (m_auiUlduarTowers[1] == FAIL) + pGo->SetGoState(GO_STATE_ACTIVE); + break; + case GO_FREYA_CRYSTAL: + if (m_auiUlduarTowers[2] == FAIL) + pGo->SetGoState(GO_STATE_ACTIVE); + break; + case GO_MIMIRON_CRYSTAL: + if (m_auiUlduarTowers[3] == FAIL) + pGo->SetGoState(GO_STATE_ACTIVE); + break; // Archivum case GO_IRON_ENTRANCE_DOOR: @@ -572,6 +593,41 @@ void instance_ulduar::SetData(uint32 uiType, uint32 uiData) case TYPE_KEEPER_MIMIRON: m_auiUlduarKeepers[3] = uiData; break; + + // Ulduar towers + case TYPE_TOWER_HODIR: + if (m_auiUlduarTowers[0] == uiData) + return; + if (uiData == FAIL) + DoUseDoorOrButton(GO_HODIR_CRYSTAL); + m_auiUlduarTowers[0] = uiData; + break; + case TYPE_TOWER_THORIM: + if (m_auiUlduarTowers[1] == uiData) + return; + if (uiData == FAIL) + DoUseDoorOrButton(GO_THORIM_CRYSTAL); + m_auiUlduarTowers[1] = uiData; + break; + case TYPE_TOWER_FREYA: + if (m_auiUlduarTowers[2] == uiData) + return; + if (uiData == FAIL) + DoUseDoorOrButton(GO_FREYA_CRYSTAL); + m_auiUlduarTowers[2] = uiData; + break; + case TYPE_TOWER_MIMIRON: + if (m_auiUlduarTowers[3] == uiData) + return; + if (uiData == FAIL) + DoUseDoorOrButton(GO_MIMIRON_CRYSTAL); + m_auiUlduarTowers[3] = uiData; + break; + + // Other types - not saved + case TYPE_LEVIATHAN_GAUNTLET: + m_uiGauntletStatus = uiData; + return; } DoOpenMadnessDoorIfCan(); @@ -589,7 +645,9 @@ void instance_ulduar::SetData(uint32 uiType, uint32 uiData) << m_auiEncounter[12] << " " << m_auiEncounter[13] << " " << m_auiHardBoss[0] << " " << m_auiHardBoss[1] << " " << m_auiHardBoss[2] << " " << m_auiHardBoss[2] << " " << m_auiHardBoss[4] << " " << m_auiHardBoss[5] << " " << m_auiHardBoss[6] << " " - << m_auiUlduarKeepers[0] << " " << m_auiUlduarKeepers[1] << " " << m_auiUlduarKeepers[2] << " " << m_auiUlduarKeepers[3]; + << m_auiUlduarKeepers[0] << " " << m_auiUlduarKeepers[1] << " " << m_auiUlduarKeepers[2] << " " + << m_auiUlduarKeepers[3] << " " << m_auiUlduarTowers[0] << " " << m_auiUlduarTowers[1] << " " + << m_auiUlduarTowers[2] << " " << m_auiUlduarTowers[3]; m_strInstData = saveStream.str(); @@ -598,13 +656,19 @@ void instance_ulduar::SetData(uint32 uiType, uint32 uiData) } } -// TODO: implement all hard mode loot here! bool instance_ulduar::CheckConditionCriteriaMeet(Player const* pPlayer, uint32 uiInstanceConditionId, WorldObject const* pConditionSource, uint32 conditionSourceType) const { switch (uiInstanceConditionId) { - case TYPE_XT002_HARD: + case INSTANCE_CONDITION_ID_NORMAL_MODE: + case INSTANCE_CONDITION_ID_HARD_MODE: + case INSTANCE_CONDITION_ID_HARD_MODE_2: + case INSTANCE_CONDITION_ID_HARD_MODE_3: + case INSTANCE_CONDITION_ID_HARD_MODE_4: + // TODO: implement all hard mode loot here! break; + + // ToDo: handle vehicle spell clicks - should be available only after the gauntlet was started by gossip! } script_error_log("instance_ulduar::CheckConditionCriteriaMeet called with unsupported Id %u. Called with param plr %s, src %s, condition source type %u", @@ -670,6 +734,19 @@ uint32 instance_ulduar::GetData(uint32 uiType) const return m_auiUlduarKeepers[2]; case TYPE_KEEPER_MIMIRON: return m_auiUlduarKeepers[3]; + + // Ulduar Towers + case TYPE_TOWER_HODIR: + return m_auiUlduarTowers[0]; + case TYPE_TOWER_THORIM: + return m_auiUlduarTowers[1]; + case TYPE_TOWER_FREYA: + return m_auiUlduarTowers[2]; + case TYPE_TOWER_MIMIRON: + return m_auiUlduarTowers[3]; + + case TYPE_LEVIATHAN_GAUNTLET: + return m_uiGauntletStatus; } return 0; @@ -731,7 +808,8 @@ void instance_ulduar::Load(const char* strIn) >> m_auiEncounter[4] >> m_auiEncounter[5] >> m_auiEncounter[6] >> m_auiEncounter[7] >> m_auiEncounter[8] >> m_auiEncounter[9] >> m_auiEncounter[10] >> m_auiEncounter[11] >> m_auiEncounter[12] >> m_auiEncounter[13] >> m_auiHardBoss[0] >> m_auiHardBoss[1] >> m_auiHardBoss[2] >> m_auiHardBoss[3] >> m_auiHardBoss[4] >> m_auiHardBoss[5] >> m_auiHardBoss[6] - >> m_auiUlduarKeepers[0] >> m_auiUlduarKeepers[1] >> m_auiUlduarKeepers[2] >> m_auiUlduarKeepers[3]; + >> m_auiUlduarKeepers[0] >> m_auiUlduarKeepers[1] >> m_auiUlduarKeepers[2] >> m_auiUlduarKeepers[3] >> m_auiUlduarTowers[0] + >> m_auiUlduarTowers[1] >> m_auiUlduarTowers[2] >> m_auiUlduarTowers[3]; for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) { @@ -809,6 +887,11 @@ void instance_ulduar::JustDidDialogueStep(int32 iEntry) { switch (iEntry) { + case SAY_PRE_LEVIATHAN_1: + case SAY_PRE_LEVIATHAN_2: + case SAY_PRE_LEVIATHAN_3: + DoOrSimulateScriptTextForThisInstance(iEntry, NPC_BRONZEBEARD_RADIO); + break; case NPC_LEVIATHAN: // move the leviathan in the arena if (Creature* pLeviathan = GetSingleCreatureFromStorage(NPC_LEVIATHAN)) diff --git a/scripts/northrend/ulduar/ulduar/ulduar.cpp b/scripts/northrend/ulduar/ulduar/ulduar.cpp index 2413c1db0..c43eab9b2 100644 --- a/scripts/northrend/ulduar/ulduar/ulduar.cpp +++ b/scripts/northrend/ulduar/ulduar/ulduar.cpp @@ -23,6 +23,9 @@ EndScriptData */ /* ContentData go_ulduar_teleporter +npc_brann_ulduar +npc_keeper_norgannon +event_go_ulduar_tower EndContentData */ #include "precompiled.h" @@ -183,6 +186,151 @@ bool GossipSelect_go_ulduar_teleporter(Player* pPlayer, GameObject* pGO, uint32 return true; } +/*###### +## npc_brann_ulduar +######*/ + +enum +{ + GOSSIP_ITEM_BEGIN_ASSAULT = -3603012, + GOSSIP_TEXT_ID_BRANN = 14369, +}; + +bool GossipHello_npc_brann_ulduar(Player* pPlayer, Creature* pCreature) +{ + if (instance_ulduar* pInstance = (instance_ulduar*)pCreature->GetInstanceData()) + { + if (pInstance->GetData(TYPE_LEVIATHAN_GAUNTLET) == NOT_STARTED && pInstance->GetData(TYPE_LEVIATHAN) == NOT_STARTED) + pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_BEGIN_ASSAULT, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); + + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXT_ID_BRANN, pCreature->GetObjectGuid()); + } + return true; +} + +bool GossipSelect_npc_brann_ulduar(Player* pPlayer, Creature* pCreature, uint32 /*sender*/, uint32 uiAction) +{ + if (uiAction == GOSSIP_ACTION_INFO_DEF+1) + { + if (instance_ulduar* pInstance = (instance_ulduar*)pCreature->GetInstanceData()) + { + // if encounter is started by Brann then hard mode is failed + pInstance->SetData(TYPE_TOWER_FREYA, FAIL); + pInstance->SetData(TYPE_TOWER_HODIR, FAIL); + pInstance->SetData(TYPE_TOWER_MIMIRON, FAIL); + pInstance->SetData(TYPE_TOWER_THORIM, FAIL); + pInstance->SetData(TYPE_LEVIATHAN_HARD, FAIL); + + // set gauntlet in progress; rest of the event is done by DB scripts + pInstance->SetData(TYPE_LEVIATHAN_GAUNTLET, IN_PROGRESS); + pCreature->GetMotionMaster()->MoveWaypoint(); + } + + pPlayer->CLOSE_GOSSIP_MENU(); + } + + return true; +} + +/*###### +## npc_keeper_norgannon +######*/ + +enum +{ + GOSSIP_ITEM_ACTIVATE_SYSTEMS = -3603010, + GOSSIP_ITEM_CONFIRMED = -3603011, + + GOSSIP_TEXT_ID_GREET = 14375, + GOSSIP_TEXT_ID_DEFENSES = 14496, + GOSSIP_TEXT_ID_ACTIVATED = 14497, +}; + +bool GossipHello_npc_keeper_norgannon(Player* pPlayer, Creature* pCreature) +{ + if (instance_ulduar* pInstance = (instance_ulduar*)pCreature->GetInstanceData()) + { + if (pInstance->GetData(TYPE_LEVIATHAN_GAUNTLET) == NOT_STARTED && pInstance->GetData(TYPE_LEVIATHAN) == NOT_STARTED && pInstance->GetData(TYPE_LEVIATHAN_HARD) == NOT_STARTED) + pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_ACTIVATE_SYSTEMS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); + + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXT_ID_GREET, pCreature->GetObjectGuid()); + } + return true; +} + +bool GossipSelect_npc_keeper_norgannon(Player* pPlayer, Creature* pCreature, uint32 /*sender*/, uint32 uiAction) +{ + switch (uiAction) + { + case GOSSIP_ACTION_INFO_DEF+1: + pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_CONFIRMED, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXT_ID_DEFENSES, pCreature->GetObjectGuid()); + break; + case GOSSIP_ACTION_INFO_DEF+2: + if (instance_ulduar* pInstance = (instance_ulduar*)pCreature->GetInstanceData()) + { + // if hard mode is triggered all towers become active and encounter starts automatically + pInstance->SetData(TYPE_TOWER_FREYA, DONE); + pInstance->SetData(TYPE_TOWER_HODIR, DONE); + pInstance->SetData(TYPE_TOWER_MIMIRON, DONE); + pInstance->SetData(TYPE_TOWER_THORIM, DONE); + pInstance->SetData(TYPE_LEVIATHAN_HARD, DONE); + + // set gauntlet in progress and despawn the Lorekeeper; rest of the event is done by DB scripts + pInstance->SetData(TYPE_LEVIATHAN_GAUNTLET, IN_PROGRESS); + pCreature->ForcedDespawn(10000); + + if (Creature* pDellorah = pInstance->GetSingleCreatureFromStorage(NPC_EXPLORER_DELLORAH)) + pDellorah->GetMotionMaster()->MoveWaypoint(); + if (Creature* pBrann = pInstance->GetSingleCreatureFromStorage(NPC_BRANN_BRONZEBEARD)) + pBrann->GetMotionMaster()->MoveWaypoint(); + } + + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXT_ID_ACTIVATED, pCreature->GetObjectGuid()); + break; + } + + return true; +} + +/*###### +## event_go_ulduar_tower +######*/ + +bool ProcessEventId_event_go_ulduar_tower(uint32 uiEventId, Object* pSource, Object* /*pTarget*/, bool /*bIsStart*/) +{ + if (pSource->GetTypeId() == TYPEID_GAMEOBJECT && ((GameObject*)pSource)->GetGoType() == GAMEOBJECT_TYPE_DESTRUCTIBLE_BUILDING) + { + instance_ulduar* pInstance = (instance_ulduar*)((GameObject*)pSource)->GetInstanceData(); + if (!pInstance) + return true; + + // Towers can be deactivated by destroying them. Notify instance data in case they get destroyed. + switch (uiEventId) + { + case EVENT_ID_TOWER_LIFE: + pInstance->SetData(TYPE_TOWER_FREYA, FAIL); + break; + case EVENT_ID_TOWER_FLAME: + pInstance->SetData(TYPE_TOWER_MIMIRON, FAIL); + break; + case EVENT_ID_TOWER_FROST: + pInstance->SetData(TYPE_TOWER_HODIR, FAIL); + break; + case EVENT_ID_TOWER_STORMS: + pInstance->SetData(TYPE_TOWER_THORIM, FAIL); + break; + default: + return false; + } + + // allow further DB processing + return false; + } + + return false; +} + void AddSC_ulduar() { Script* pNewScript; @@ -192,4 +340,21 @@ void AddSC_ulduar() pNewScript->pGossipHelloGO = &GossipHello_go_ulduar_teleporter; pNewScript->pGossipSelectGO = &GossipSelect_go_ulduar_teleporter; pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_brann_ulduar"; + pNewScript->pGossipHello = &GossipHello_npc_brann_ulduar; + pNewScript->pGossipSelect = &GossipSelect_npc_brann_ulduar; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_keeper_norgannon"; + pNewScript->pGossipHello = &GossipHello_npc_keeper_norgannon; + pNewScript->pGossipSelect = &GossipSelect_npc_keeper_norgannon; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "event_go_ulduar_tower"; + pNewScript->pProcessEventId = &ProcessEventId_event_go_ulduar_tower; + pNewScript->RegisterSelf(); } diff --git a/scripts/northrend/ulduar/ulduar/ulduar.h b/scripts/northrend/ulduar/ulduar/ulduar.h index 78a4d99d7..546c32cdd 100644 --- a/scripts/northrend/ulduar/ulduar/ulduar.h +++ b/scripts/northrend/ulduar/ulduar/ulduar.h @@ -44,6 +44,16 @@ enum TYPE_KEEPER_THORIM = 25, TYPE_KEEPER_MIMIRON = 26, + // Tower types + // Used to store the towers which will be used at Leviathan encounter + TYPE_TOWER_HODIR = 27, + TYPE_TOWER_FREYA = 28, + TYPE_TOWER_THORIM = 29, + TYPE_TOWER_MIMIRON = 30, + + // Other types - not saved + TYPE_LEVIATHAN_GAUNTLET = 31, + // The siege of ulduar NPC_LEVIATHAN = 33113, // NPC_IGNIS = 33118, @@ -55,6 +65,8 @@ enum // Leviathan other npcs NPC_ULDUAR_COLOSSUS = 33237, NPC_BRONZEBEARD_RADIO = 34054, + NPC_EXPLORER_DELLORAH = 33701, + NPC_BRANN_BRONZEBEARD = 33579, // Razorscale helper npcs NPC_EXPEDITION_COMMANDER = 33210, @@ -162,6 +174,10 @@ enum GO_HARPOON_GUN_2 = 194541, GO_HARPOON_GUN_3 = 194543, GO_HARPOON_GUN_4 = 194519, + GO_FREYA_CRYSTAL = 194704, // crystals which can be active during Leviathan encounter if hard mode towers are active + GO_MIMIRON_CRYSTAL = 194705, + GO_THORIM_CRYSTAL = 194706, + GO_HODIR_CRYSTAL = 194707, // Antechamber GO_KOLOGARN_BRIDGE = 194232, @@ -219,6 +235,13 @@ enum // events EVENT_ID_SPELL_SHATTER = 21620, + EVENT_ID_TOWER_LIFE = 21030, // events checked when a tower is destroyed + EVENT_ID_TOWER_FLAME = 21033, + EVENT_ID_TOWER_FROST = 21032, + EVENT_ID_TOWER_STORMS = 21031, + + // area triggers + AREATRIGGER_ID_INTRO = 5388, // starts the intro dialogue // Achievement related ACHIEV_START_IGNIS_ID = 20951, // Ignis timed achievs 2930, 2929 @@ -292,7 +315,6 @@ class MANGOS_DLL_DECL instance_ulduar : public ScriptedInstance, private Dialogu void SetSpecialAchievementCriteria(uint32 uiType, bool bIsMet); bool CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/) const override; - // Dummy, leave till correct solution for hardmode found bool CheckConditionCriteriaMeet(Player const* pPlayer, uint32 uiInstanceConditionId, WorldObject const* pConditionSource, uint32 conditionSourceType) const override; void DoOpenMadnessDoorIfCan(); @@ -316,9 +338,11 @@ class MANGOS_DLL_DECL instance_ulduar : public ScriptedInstance, private Dialogu uint32 m_auiEncounter[MAX_ENCOUNTER]; uint32 m_auiHardBoss[HARD_MODE_ENCOUNTER]; uint32 m_auiUlduarKeepers[KEEPER_ENCOUNTER]; + uint32 m_auiUlduarTowers[KEEPER_ENCOUNTER]; bool m_abAchievCriteria[MAX_SPECIAL_ACHIEV_CRITS]; uint32 m_uiShatterAchievTimer; + uint32 m_uiGauntletStatus; GuidVector m_vToyPileGuidVector; GuidVector m_vBrokenHarpoonsGuids; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 47b6a7007..ec94d2290 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2932" + #define SD2_REVISION_NR "2933" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index df0c51ee3..221a7467d 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -1280,11 +1280,17 @@ UPDATE creature_template SET ScriptName='boss_razorscale' WHERE entry=33186; UPDATE creature_template SET ScriptName='npc_expedition_commander' WHERE entry=33210; UPDATE creature_template SET ScriptName='npc_razorscale_spawner' WHERE entry=33245; UPDATE creature_template SET ScriptName='npc_harpoon_fire_state' WHERE entry=33282; +UPDATE creature_template SET ScriptName='npc_keeper_norgannon' WHERE entry=33686; +UPDATE creature_template SET ScriptName='npc_brann_ulduar' WHERE entry=33579; UPDATE creature_template SET ScriptName='boss_flame_leviathan' WHERE entry=33113; -DELETE FROM scripted_event_id WHERE id IN (9735,20964,21620); +DELETE FROM scripted_event_id WHERE id IN (9735,20964,21030,21031,21032,21033,21620); INSERT INTO scripted_event_id VALUES (9735, 'event_spell_saronite_barrier'), -- Vezax saronite barrier event (20964,'event_spell_harpoon_shot'), -- Razorscale harpoon event +(21030,'event_go_ulduar_tower'), -- Tower of Life destroyed event +(21031,'event_go_ulduar_tower'), -- Tower of Storms destroyed event +(21032,'event_go_ulduar_tower'), -- Tower of Frost destroyed event +(21033,'event_go_ulduar_tower'), -- Tower of Flame destroyed event (21620,'event_ulduar'); -- Ignis construct shatter event /* UN'GORO CRATER */ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 79495c60d..877d86219 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -4697,7 +4697,10 @@ INSERT INTO gossip_texts (entry,content_default,comment) VALUES (-3603007,'Teleport to the Spark of Imagination.','GOSSIP_ITEM_TELE_SPARK_IMAGINATION'), (-3603008,'Teleport to the Prison of Yogg-Saron.','GOSSIP_ITEM_TELE_YOGG_SARON'), -(-3603009,'We are ready to help!','Expedition Commander GOSSIP_ITEM_START_RAZORSCALE'); +(-3603009,'We are ready to help!','Expedition Commander GOSSIP_ITEM_START_RAZORSCALE'), +(-3603010,'Activate secondary defensive systems.','Lore Keeper of Norgannon GOSSIP_ITEM_ACTIVATE_SYSTEMS'), +(-3603011,'Confirmed.','Lore Keeper of Norgannon GOSSIP_ITEM_CONFIRMED'), +(-3603012,'We\'re ready. Begin the assault!','Brann Bronzebeard GOSSIP_ITEM_BEGIN_ASSAULT'); -- -3 608 000 VIOLET HOLD INSERT INTO gossip_texts (entry,content_default,comment) VALUES diff --git a/sql/updates/r2933_mangos.sql b/sql/updates/r2933_mangos.sql new file mode 100644 index 000000000..ad1baac8f --- /dev/null +++ b/sql/updates/r2933_mangos.sql @@ -0,0 +1,8 @@ +UPDATE creature_template SET ScriptName='npc_keeper_norgannon' WHERE entry=33686; +UPDATE creature_template SET ScriptName='npc_brann_ulduar' WHERE entry=33579; +DELETE FROM scripted_event_id WHERE id IN (21030,21031,21032,21033); +INSERT INTO scripted_event_id VALUES +(21030,'event_go_ulduar_tower'), -- Tower of Life destroyed event +(21031,'event_go_ulduar_tower'), -- Tower of Storms destroyed event +(21032,'event_go_ulduar_tower'), -- Tower of Frost destroyed event +(21033,'event_go_ulduar_tower'); -- Tower of Flame destroyed event diff --git a/sql/updates/r2933_scriptdev2.sql b/sql/updates/r2933_scriptdev2.sql new file mode 100644 index 000000000..ec592860c --- /dev/null +++ b/sql/updates/r2933_scriptdev2.sql @@ -0,0 +1,5 @@ +DELETE FROM gossip_texts WHERE entry IN (-3603010,-3603011,-3603012); +INSERT INTO gossip_texts (entry,content_default,comment) VALUES +(-3603010,'Activate secondary defensive systems.','Lore Keeper of Norgannon GOSSIP_ITEM_ACTIVATE_SYSTEMS'), +(-3603011,'Confirmed.','Lore Keeper of Norgannon GOSSIP_ITEM_CONFIRMED'), +(-3603012,'We\'re ready. Begin the assault!','Brann Bronzebeard GOSSIP_ITEM_BEGIN_ASSAULT'); From 9fe6e325b2dfbdbc304791c4df08b723dfebda0c Mon Sep 17 00:00:00 2001 From: Xfurry Date: Thu, 19 Sep 2013 14:30:25 +0300 Subject: [PATCH 0944/1172] [2934] Allow Flame Leviathan to spawn reinforcements on event fail --- .../ulduar/ulduar/boss_flame_leviathan.cpp | 1 + .../ulduar/ulduar/instance_ulduar.cpp | 30 ++++++++++--- scripts/northrend/ulduar/ulduar/ulduar.h | 42 +++++++++++++++++++ sd2_revision_nr.h | 2 +- 4 files changed, 69 insertions(+), 6 deletions(-) diff --git a/scripts/northrend/ulduar/ulduar/boss_flame_leviathan.cpp b/scripts/northrend/ulduar/ulduar/boss_flame_leviathan.cpp index 96f9f65cc..0c1ce2fc2 100644 --- a/scripts/northrend/ulduar/ulduar/boss_flame_leviathan.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_flame_leviathan.cpp @@ -71,6 +71,7 @@ enum // tower buffs to Leviathan (applied on combat start if the towers are alive) SPELL_TOWER_OF_FROST = 65077, + // SPELL_TOWER_OF_FROST_DEBUFF = 65079, // removed by hotfix SPELL_TOWER_OF_LIFE = 64482, SPELL_TOWER_OF_STORMS = 65076, SPELL_TOWER_OF_FLAMES = 65075, diff --git a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp index 5eefcd9ae..e376cba06 100644 --- a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp +++ b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp @@ -78,7 +78,10 @@ void instance_ulduar::OnPlayerEnter(Player* pPlayer) if (GetData(TYPE_LEVIATHAN) == SPECIAL || GetData(TYPE_LEVIATHAN) == FAIL) { if (!GetSingleCreatureFromStorage(NPC_LEVIATHAN)) - pPlayer->SummonCreature(NPC_LEVIATHAN, afLeviathanMovePos[0], afLeviathanMovePos[1], afLeviathanMovePos[2], afLeviathanMovePos[3], TEMPSUMMON_DEAD_DESPAWN, 0); + { + pPlayer->SummonCreature(NPC_LEVIATHAN, afLeviathanMovePos[0], afLeviathanMovePos[1], afLeviathanMovePos[2], afLeviathanMovePos[3], TEMPSUMMON_DEAD_DESPAWN, 0, true); + DoCallLeviathanHelp(); + } } } @@ -359,7 +362,7 @@ void instance_ulduar::SetData(uint32 uiType, uint32 uiData) DoUseDoorOrButton(GO_SHIELD_WALL); if (uiData == IN_PROGRESS) { - // mare sure that the Lightning door is closed when engaged in combat + // make sure that the Lightning door is closed when engaged in combat if (GameObject* pDoor = GetSingleGameObjectFromStorage(GO_LIGHTNING_DOOR)) { if (pDoor->GetGoState() != GO_STATE_READY) @@ -371,6 +374,8 @@ void instance_ulduar::SetData(uint32 uiType, uint32 uiData) DoUseDoorOrButton(GO_XT002_GATE); DoUseDoorOrButton(GO_LIGHTNING_DOOR); } + else if (uiData == FAIL) + DoCallLeviathanHelp(); break; case TYPE_IGNIS: m_auiEncounter[uiType] = uiData; @@ -786,7 +791,7 @@ void instance_ulduar::OnCreatureDeath(Creature* pCreature) { StartNextDialogueText(SAY_PRE_LEVIATHAN_1); SetData(TYPE_LEVIATHAN, SPECIAL); - pCreature->SummonCreature(NPC_LEVIATHAN, afLeviathanSpawnPos[0], afLeviathanSpawnPos[1], afLeviathanSpawnPos[2], afLeviathanSpawnPos[3], TEMPSUMMON_DEAD_DESPAWN, 0); + pCreature->SummonCreature(NPC_LEVIATHAN, afLeviathanSpawnPos[0], afLeviathanSpawnPos[1], afLeviathanSpawnPos[2], afLeviathanSpawnPos[3], TEMPSUMMON_DEAD_DESPAWN, 0, true); } } break; @@ -874,6 +879,23 @@ bool instance_ulduar::CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player c } } +// function which will handle the Flame Leviathan backup spawns +void instance_ulduar::DoCallLeviathanHelp() +{ + Creature* pLeviathan = GetSingleCreatureFromStorage(NPC_LEVIATHAN); + if (!pLeviathan) + return; + + for (uint8 i = 0; i < countof(afReinforcementsNormal); ++i) + pLeviathan->SummonCreature(afReinforcementsNormal[i].uiEntry, afReinforcementsNormal[i].fX, afReinforcementsNormal[i].fY, afReinforcementsNormal[i].fZ, afReinforcementsNormal[i].fO, TEMPSUMMON_DEAD_DESPAWN, 0, true); + + if (!instance->IsRegularDifficulty()) + { + for (uint8 i = 0; i < countof(afReinforcementsHeroic); ++i) + pLeviathan->SummonCreature(afReinforcementsHeroic[i].uiEntry, afReinforcementsHeroic[i].fX, afReinforcementsHeroic[i].fY, afReinforcementsHeroic[i].fZ, afReinforcementsHeroic[i].fO, TEMPSUMMON_DEAD_DESPAWN, 0, true); + } +} + void instance_ulduar::DoProcessShatteredEvent() { // If timer is already running set achiev criteria to true, else start the timer @@ -909,8 +931,6 @@ void instance_ulduar::JustDidDialogueStep(int32 iEntry) // Note: starting 4.x this gate is a GO 33 and it's destroyed at this point DoUseDoorOrButton(GO_LEVIATHAN_GATE); - - // ToDo: spawn the vehicle backups behind the Leviathan combat gate break; } } diff --git a/scripts/northrend/ulduar/ulduar/ulduar.h b/scripts/northrend/ulduar/ulduar/ulduar.h index 546c32cdd..eb303d021 100644 --- a/scripts/northrend/ulduar/ulduar/ulduar.h +++ b/scripts/northrend/ulduar/ulduar/ulduar.h @@ -68,6 +68,15 @@ enum NPC_EXPLORER_DELLORAH = 33701, NPC_BRANN_BRONZEBEARD = 33579, + // Leviathan reinforcements + // NPC_HIRED_ENGINEER = 33626, + // NPC_HIRED_DEMOLITIONIST = 33627, + // NPC_BATTLE_MAGE = 33662, + NPC_SALVAGED_SIEGE_ENGINE = 33060, + NPC_SALVAGED_CHOPPER = 33062, + NPC_SALVAGED_DEMOLISHER = 33109, + // NPC_LIQUID_PYRITE = 33189, + // Razorscale helper npcs NPC_EXPEDITION_COMMANDER = 33210, NPC_EXPEDITION_ENGINEER = 33287, // npc used to repair the Harpoons @@ -242,6 +251,8 @@ enum // area triggers AREATRIGGER_ID_INTRO = 5388, // starts the intro dialogue + AREATRIGGER_ID_REPAIR_1 = 5369, // related to vehicle repair + AREATRIGGER_ID_REPAIR_2 = 5423, // Achievement related ACHIEV_START_IGNIS_ID = 20951, // Ignis timed achievs 2930, 2929 @@ -289,6 +300,36 @@ enum ACHIEV_CRIT_UNBROKEN_H = 10045, }; +struct UlduarSpawns +{ + float fX, fY, fZ, fO; + uint32 uiEntry; +}; + +// Note: coordinates are guessed, but pretty close to what they should be +// ToDo: spawn additional Engineers, Demolitionists, Mages and Liquid Pyrite near the columns +static const UlduarSpawns afReinforcementsNormal[] = +{ + {118.797f, -26.9963f,409.80f, 3.14f, NPC_SALVAGED_SIEGE_ENGINE}, + {118.847f, -43.758f, 409.80f, 3.15f, NPC_SALVAGED_SIEGE_ENGINE}, + {116.602f, 8.464f, 409.80f, 3.10f, NPC_SALVAGED_CHOPPER}, + {116.859f, -4.199f, 409.80f, 3.12f, NPC_SALVAGED_CHOPPER}, + {122.479f, 25.093f, 410.60f, 3.10f, NPC_SALVAGED_DEMOLISHER}, + {123.022f, 39.671f, 409.80f, 3.10f, NPC_SALVAGED_DEMOLISHER}, +}; +static const UlduarSpawns afReinforcementsHeroic[] = +{ + {106.359f, -35.269f, 409.80f, 3.12f, NPC_SALVAGED_SIEGE_ENGINE}, + {135.351f, -20.767f, 409.80f, 3.15f, NPC_SALVAGED_SIEGE_ENGINE}, + {135.408f, -50.178f, 409.80f, 3.12f, NPC_SALVAGED_SIEGE_ENGINE}, + {116.429f, 4.036f, 409.79f, 3.10f, NPC_SALVAGED_CHOPPER}, + {116.272f, -0.013f, 409.79f, 3.10f, NPC_SALVAGED_CHOPPER}, + {116.948f, -8.351f, 409.79f, 3.10f, NPC_SALVAGED_CHOPPER}, + {137.523f, 32.346f, 409.80f, 3.12f, NPC_SALVAGED_DEMOLISHER}, + {112.818f, 18.981f, 409.83f, 3.10f, NPC_SALVAGED_DEMOLISHER}, + {112.700f, 47.884f, 409.79f, 3.10f, NPC_SALVAGED_DEMOLISHER}, +}; + // note: original spawn loc is 607.9199f, -12.90516f, 409.887f but we won't use it because it's too far and grid won't be loaded that far static const float afLeviathanSpawnPos[4] = { 422.8898f, -13.32677f, 409.8839f, 3.12f }; static const float afLeviathanMovePos[4] = { 296.5809f, -11.55668f, 409.8278f, 3.12f }; @@ -333,6 +374,7 @@ class MANGOS_DLL_DECL instance_ulduar : public ScriptedInstance, private Dialogu protected: void JustDidDialogueStep(int32 iEntry) override; + void DoCallLeviathanHelp(); std::string m_strInstData; uint32 m_auiEncounter[MAX_ENCOUNTER]; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index ec94d2290..902e8f6ab 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2933" + #define SD2_REVISION_NR "2934" #endif // __SD2_REVISION_NR_H__ From ac3d5b5ff5d0220aeb91be9bd01f16cb65ea24ac Mon Sep 17 00:00:00 2001 From: Xfurry Date: Fri, 20 Sep 2013 13:42:32 +0300 Subject: [PATCH 0945/1172] [2935] Implement Flame Leviathan combat abilities * This will allow Flame Leviathan to use the basic combat abilities * And will also provide support for hard mode abilities ToDo: defense turret overload event isn't yet implemented --- .../ulduar/ulduar/boss_flame_leviathan.cpp | 565 +++++++++++++++++- .../northrend/ulduar/ulduar/boss_xt_002.cpp | 2 +- .../ulduar/ulduar/instance_ulduar.cpp | 21 +- scripts/northrend/ulduar/ulduar/ulduar.h | 5 +- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 7 +- sql/scriptdev2_script_full.sql | 7 +- sql/updates/r2935_mangos.sql | 7 + sql/updates/r2935_scriptdev2.sql | 6 + 9 files changed, 593 insertions(+), 29 deletions(-) create mode 100644 sql/updates/r2935_mangos.sql create mode 100644 sql/updates/r2935_scriptdev2.sql diff --git a/scripts/northrend/ulduar/ulduar/boss_flame_leviathan.cpp b/scripts/northrend/ulduar/ulduar/boss_flame_leviathan.cpp index 0c1ce2fc2..d473ddfd7 100644 --- a/scripts/northrend/ulduar/ulduar/boss_flame_leviathan.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_flame_leviathan.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: boss_flame_leviathan -SD%Complete: 20% -SDComment: Basic script only. +SD%Complete: 75% +SDComment: Defense turret AI and related event NYI. SDCategory: Ulduar EndScriptData */ @@ -29,17 +29,16 @@ enum SAY_AGGRO = -1603159, SAY_SLAY = -1603160, SAY_DEATH = -1603161, - SAY_CHANGE_1 = -1603162, SAY_CHANGE_2 = -1603163, SAY_CHANGE_3 = -1603164, + SAY_PLAYER_RIDE = -1603165, SAY_OVERLOAD_1 = -1603166, SAY_OVERLOAD_2 = -1603167, SAY_OVERLOAD_3 = -1603168, SAY_HARD_MODE = -1603169, - SAY_TOWER_FROST = -1603170, SAY_TOWER_FIRE = -1603171, SAY_TOWER_ENERGY = -1603172, @@ -47,27 +46,34 @@ enum SAY_TOWER_DOWN = -1603174, EMOTE_PURSUE = -1603175, + EMOTE_HODIR_FURY = -1603242, + EMOTE_FREYA_WARD = -1603243, + EMOTE_MIMIRON_INFERNO = -1603244, + EMOTE_THORIM_HAMMER = -1603245, // Leviathan spells SPELL_INVISIBILITY_DETECTION = 18950, SPELL_PURSUED = 62374, - SPELL_MISSILE_BARRAGE_SELF = 62401, // cast on Leviathan - SPELL_MISSILE_BARRAGE = 62400, + SPELL_MISSILE_BARRAGE_TARGET = 62401, // triggers 62400 on target + SPELL_MISSILE_BARRAGE = 62400, // has radius of 5k; requires core update SPELL_FLAME_VENTS = 62396, SPELL_BATTERING_RAM = 62376, SPELL_GATHERING_SPEED = 62375, - // leviathan turret spells - SPELL_FLAME_CANNON = 62395, - SPELL_CANNON = 62397, + // leviathan turret spells - handled in eventAI + // SPELL_FLAME_CANNON = 62395, // defense turret spells SPELL_OVERLOAD_CIRCUIT = 62399, SPELL_SEARING_FLAME = 62402, SPELL_SYSTEMS_SHUTDOWN = 62475, // sends event 21605 for achiev check + // Leviathan seat has missing aura 62421 - // leviathan seat spell (on eject) - SPELL_SMOKE_TRAIL = 63575, + // leviathan other spells - for the moment these are not used + // SPELL_SMOKE_TRAIL = 63575, + // SPELL_EJECT_ALL_PASSENGERS = 50630, // used by vehicles on death; currently handled by DB linking + // SPELL_EJECT_PASSENGER_4 = 64614, + // SPELL_EJECT_PASSENGER_1 = 60603, // tower buffs to Leviathan (applied on combat start if the towers are alive) SPELL_TOWER_OF_FROST = 65077, @@ -79,8 +85,8 @@ enum // tower beacon abilities SPELL_HODIR_FURY = 62533, // tower of frost SPELL_FREYA_WARD = 62906, // tower of life - SPELL_THORIMS_HAMMER = 62911, // tower of storms - SPELL_MIMIRON_INFERNO = 62910, // tower of flames + SPELL_THORIM_HAMMER = 62911, // tower of storms + SPELL_MIMIRON_INFERNO = 62909, // tower of flames // beacon vehicles visuals SPELL_LIGHTNING_SKYBEAM = 62897, // storm beacon @@ -89,16 +95,24 @@ enum SPELL_GREEN_SKYBEAM = 62895, // life beacon // other beacon vehicles spells - SPELL_BEAM_TARGET_STATE = 62898, - SPELL_TARGET_SEARCH = 63761, // cast by npc 33369 - SPELL_UNSTABLE_ENERGY = 62865, // cast by npc 33366 - SPELL_BIRTH = 40031, + // SPELL_TARGET_SEARCH_A = 63761, // cast by npc 33369 and targets missing npc 33835 + // SPELL_TARGET_SEARCH_B = 63762, // moves the caster to the target location + // SPELL_TARGET_SEARCH_C = 63763, // these are not used since we are doing this by waypoint movement + // SPELL_TARGET_SEARCH_D = 63764, + // SPELL_BEAM_TARGET_STATE = 62898, // cast by all tower reticles; purpose unk + // SPELL_BIRTH = 40031, // not used; purpose unk + + // vehicle accessories + // NPC_LEVIATHAN_SEAT = 33114, + // NPC_LEVIATHAN_TURRET = 33139, + // NPC_DEFENSE_TURRET = 33142, + // NPC_OVERLOAD_DEVICE = 33143, // hard mode beacons - they cast the actual damage spells - NPC_THORIM_HAMMER = 33365, - NPC_MIMIRON_INFERNO = 33370, NPC_HODIR_FURY = 33212, - NPC_FREYA_WARD = 33367, + // NPC_FREYA_WARD = 33367, + // NPC_THORIM_HAMMER = 33365, // handled in eventAI + // NPC_MIMIRON_INFERNO = 33370, // beacon vehicles NPC_THORIM_HAMMER_VEHICLE = 33364, // has accessory 33365 @@ -106,7 +120,7 @@ enum NPC_HODIR_FURY_VEHICLE = 33108, // has accessory 33212 NPC_FREYA_WARD_VEHICLE = 33366, // has accessory 33367 - // freya's ward summons + // freya's ward summons - handled by eventAI NPC_WRITHING_LASHER = 33387, // both spam spell 65062 on target NPC_WARD_OF_LIFE = 34275, @@ -115,8 +129,37 @@ enum NPC_BRANN_FLYING_MACHINE = 34120, NPC_BRANN_BRONZEBEARD_LEVIATHAN = 34119, NPC_ARCHMANGE_RHYDIAN = 33696, + + MAX_FREYA_WARD = 4, + MAX_HODIR_FURY = 2, + // Mimiron inferno is only one + MAX_THORIM_HAMMER = 22, + + TOWER_ID_HODIR = 0, + TOWER_ID_FREYA = 1, + TOWER_ID_MIMIRON = 2, + TOWER_ID_THORIM = 3, }; +static const uint32 aLeviathanTowerYell[KEEPER_ENCOUNTER] = { SAY_TOWER_FROST, SAY_TOWER_NATURE, SAY_TOWER_FIRE, SAY_TOWER_ENERGY }; +static const uint32 aLeviathanTowerEmote[KEEPER_ENCOUNTER] = { EMOTE_HODIR_FURY, EMOTE_FREYA_WARD, EMOTE_MIMIRON_INFERNO, EMOTE_THORIM_HAMMER }; + +static const float afFreyaWard[MAX_FREYA_WARD][4] = +{ + {156.9291f, 61.52306f, 409.887f, 5.68f}, + {376.641f, 68.61361f, 411.2287f, 3.85f}, + {383.6206f, -130.8576f, 410.7088f, 2.26f}, + {154.9095f, -137.4339f, 409.887f, 0.79f}, +}; + +static const float afHodirFury[MAX_HODIR_FURY][3] = +{ + {219.9013f, 7.913357f, 409.7861f}, + {326.0777f, -74.99034f, 409.887f}, +}; + +static const float afMimironInferno[3] = {329.1809f, 8.02577f, 409.887f}; + /*###### ## boss_flame_leviathan ######*/ @@ -127,22 +170,61 @@ struct MANGOS_DLL_DECL boss_flame_leviathanAI : public ScriptedAI { m_pInstance = (instance_ulduar*)pCreature->GetInstanceData(); m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); + m_bInitTowers = false; Reset(); } instance_ulduar* m_pInstance; bool m_bIsRegularMode; + bool m_bInitTowers; + bool m_bUlduarTower[KEEPER_ENCOUNTER]; + + uint8 m_uiActiveTowers; + + uint32 m_uiBatteringRamTimer; + uint32 m_uiFlameVentsTimer; + uint32 m_uiMissileBarrageTimer; + uint32 m_uiPursueTimer; + uint32 m_uiGatheringSpeedTimer; + + uint32 m_uiHardModeTimer; + uint8 m_uiHardModeStep; + + uint8 m_uiThorimHammerCount; + uint32 m_uiThorimHammerTimer; void Reset() override { DoCastSpellIfCan(m_creature, SPELL_INVISIBILITY_DETECTION, CAST_TRIGGERED | CAST_AURA_NOT_PRESENT); + + for (uint8 i = 0; i < KEEPER_ENCOUNTER; ++i) + m_bUlduarTower[i] = false; + + m_uiActiveTowers = 0; + + m_uiBatteringRamTimer = 10000; + m_uiFlameVentsTimer = 30000; + m_uiMissileBarrageTimer = 1000; + m_uiPursueTimer = 1000; + m_uiGatheringSpeedTimer = 10000; + + m_uiHardModeTimer = 10000; + m_uiHardModeStep = 0; + m_uiThorimHammerCount = 0; + m_uiThorimHammerTimer = 0; } void JustDied(Unit* pKiller) override { if (m_pInstance) + { m_pInstance->SetData(TYPE_LEVIATHAN, DONE); + // clear hard mode auras + if (Creature* pOrbital = m_pInstance->GetSingleCreatureFromStorage(NPC_ORBITAL_SUPPORT)) + pOrbital->RemoveAllAuras(); + } + DoScriptText(SAY_DEATH, m_creature); // start epilogue event @@ -158,6 +240,9 @@ struct MANGOS_DLL_DECL boss_flame_leviathanAI : public ScriptedAI void Aggro(Unit* pWho) override { + // check the towers again to make sure that some of them were not destroyed in the meanwhile + FetchTowers(); + if (m_pInstance) m_pInstance->SetData(TYPE_LEVIATHAN, IN_PROGRESS); @@ -166,7 +251,8 @@ struct MANGOS_DLL_DECL boss_flame_leviathanAI : public ScriptedAI void KilledUnit(Unit* pVictim) override { - DoScriptText(SAY_SLAY, m_creature); + if (urand(0, 1)) + DoScriptText(SAY_SLAY, m_creature); } void JustReachedHome() override @@ -177,6 +263,21 @@ struct MANGOS_DLL_DECL boss_flame_leviathanAI : public ScriptedAI void JustSummoned(Creature* pSummoned) override { + switch (pSummoned->GetEntry()) + { + case NPC_THORIM_HAMMER_VEHICLE: + pSummoned->CastSpell(pSummoned, SPELL_LIGHTNING_SKYBEAM, true); + break; + case NPC_MIMIRON_INFERNO_VEHICLE: + pSummoned->CastSpell(pSummoned, SPELL_RED_SKYBEAM, true); + break; + case NPC_HODIR_FURY_VEHICLE: + pSummoned->CastSpell(pSummoned, SPELL_BLUE_SKYBEAM, true); + break; + case NPC_FREYA_WARD_VEHICLE: + pSummoned->CastSpell(pSummoned, SPELL_GREEN_SKYBEAM, true); + break; + } } void SummonedMovementInform(Creature* pSummoned, uint32 uiMoveType, uint32 uiPointId) override @@ -215,11 +316,242 @@ struct MANGOS_DLL_DECL boss_flame_leviathanAI : public ScriptedAI m_creature->SetInCombatWithZone(); } + void SpellHitTarget(Unit* pTarget, SpellEntry const* pSpellEntry) override + { + if (pTarget->IsVehicle() && pSpellEntry->Id == SPELL_PURSUED) + { + m_creature->FixateTarget(pTarget); + + if (Player* pPlayer = pTarget->GetCharmerOrOwnerPlayerOrPlayerItself()) + DoScriptText(EMOTE_PURSUE, m_creature, pPlayer); + } + } + + // check for all active towers + void FetchTowers() + { + if (!m_pInstance) + return; + + // the orbital support applies the tower auras + Creature* pOrbital = m_pInstance->GetSingleCreatureFromStorage(NPC_ORBITAL_SUPPORT); + if (!pOrbital) + return; + + // check the states twice: at reset and at aggro to make sure that some towers were not destroyed in the meanwhile + if (m_pInstance->GetData(TYPE_TOWER_HODIR) == DONE) + { + pOrbital->CastSpell(pOrbital, SPELL_TOWER_OF_FROST, true); + ++m_uiActiveTowers; + m_bUlduarTower[TOWER_ID_HODIR] = true; + } + else + pOrbital->RemoveAurasDueToSpell(SPELL_TOWER_OF_FROST); + if (m_pInstance->GetData(TYPE_TOWER_FREYA) == DONE) + { + pOrbital->CastSpell(pOrbital, SPELL_TOWER_OF_LIFE, true); + ++m_uiActiveTowers; + m_bUlduarTower[TOWER_ID_FREYA] = true; + } + else + pOrbital->RemoveAurasDueToSpell(SPELL_TOWER_OF_LIFE); + if (m_pInstance->GetData(TYPE_TOWER_MIMIRON) == DONE) + { + pOrbital->CastSpell(pOrbital, SPELL_TOWER_OF_FLAMES, true); + ++m_uiActiveTowers; + m_bUlduarTower[TOWER_ID_MIMIRON] = true; + } + else + pOrbital->RemoveAurasDueToSpell(SPELL_TOWER_OF_FLAMES); + if (m_pInstance->GetData(TYPE_TOWER_THORIM) == DONE) + { + pOrbital->CastSpell(pOrbital, SPELL_TOWER_OF_STORMS, true); + ++m_uiActiveTowers; + m_bUlduarTower[TOWER_ID_THORIM] = true; + } + else + pOrbital->RemoveAurasDueToSpell(SPELL_TOWER_OF_STORMS); + + // ToDo: inform instance about all active towers for future use in achievements and hard mode loot + } + + // Functions which handle the spawn of each type of add + void DoSpawnHodirFury() + { + for (uint8 i = 0; i < MAX_HODIR_FURY; ++i) + m_creature->SummonCreature(NPC_HODIR_FURY_VEHICLE, afHodirFury[i][0], afHodirFury[i][1], afHodirFury[i][2], 0, TEMPSUMMON_DEAD_DESPAWN, 0); + } + + void DoSpawnFreyaWard() + { + for (uint8 i = 0; i < MAX_FREYA_WARD; ++i) + m_creature->SummonCreature(NPC_FREYA_WARD_VEHICLE, afFreyaWard[i][0], afFreyaWard[i][1], afFreyaWard[i][2], afFreyaWard[i][3], TEMPSUMMON_DEAD_DESPAWN, 0); + } + + void DoSpawnMimironInferno() + { + // Mimiron inferno has waypoint movement + m_creature->SummonCreature(NPC_MIMIRON_INFERNO_VEHICLE, afMimironInferno[0], afMimironInferno[1], afMimironInferno[2], 0, TEMPSUMMON_DEAD_DESPAWN, 0); + } + + void DoSpawnThorimHammer() + { + if (!m_pInstance) + return; + + // get a random point compared to the center and spawn the npcs + if (Creature* pOrbital = m_pInstance->GetSingleCreatureFromStorage(NPC_ORBITAL_SUPPORT)) + { + float fX, fY, fZ; + m_creature->GetRandomPoint(pOrbital->GetPositionX(), pOrbital->GetPositionY(), pOrbital->GetPositionZ(), 150.0f, fX, fY, fZ); + m_creature->SummonCreature(NPC_THORIM_HAMMER_VEHICLE, fX, fY, fZ, 0, TEMPSUMMON_TIMED_DESPAWN, 8000); + } + } + void UpdateAI(const uint32 uiDiff) override { + // fetch all tower buffs on the first update + if (!m_bInitTowers) + { + FetchTowers(); + m_bInitTowers = true; + } + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; + if (m_uiPursueTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_PURSUED) == CAST_OK) + { + // don't yell from the beginning + if (!m_uiHardModeTimer) + { + switch (urand(0, 2)) + { + case 0: DoScriptText(SAY_CHANGE_1, m_creature); break; + case 1: DoScriptText(SAY_CHANGE_2, m_creature); break; + case 2: DoScriptText(SAY_CHANGE_3, m_creature); break; + } + } + m_uiPursueTimer = 30000; + } + } + else + m_uiPursueTimer -= uiDiff; + + if (m_uiFlameVentsTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_FLAME_VENTS) == CAST_OK) + m_uiFlameVentsTimer = urand(15000, 25000); + } + else + m_uiFlameVentsTimer -= uiDiff; + + if (m_uiBatteringRamTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_BATTERING_RAM) == CAST_OK) + m_uiBatteringRamTimer = urand(10000, 15000); + } + else + m_uiBatteringRamTimer -= uiDiff; + + if (m_uiMissileBarrageTimer < uiDiff) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, SPELL_MISSILE_BARRAGE_TARGET) == CAST_OK) + m_uiMissileBarrageTimer = urand(1000, 2000); + } + } + else + m_uiMissileBarrageTimer -= uiDiff; + + if (m_uiGatheringSpeedTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_GATHERING_SPEED) == CAST_OK) + m_uiGatheringSpeedTimer = 10000; + } + else + m_uiGatheringSpeedTimer -= uiDiff; + + // start hard mode + if (m_uiHardModeTimer) + { + if (m_uiHardModeTimer <= uiDiff) + { + // if all towers are deactivated then skip the rest + if (!m_bUlduarTower[TOWER_ID_HODIR] && !m_bUlduarTower[TOWER_ID_FREYA] && !m_bUlduarTower[TOWER_ID_MIMIRON] && !m_bUlduarTower[TOWER_ID_THORIM]) + { + DoScriptText(SAY_TOWER_DOWN, m_creature); + m_uiHardModeTimer = 0; + } + else + { + // yell hard mode start and start activating each tower one by one + switch (m_uiHardModeStep) + { + case 0: + DoScriptText(SAY_HARD_MODE, m_creature); + m_uiHardModeTimer = 10000; + ++m_uiHardModeStep; + break; + default: + // iterate through all towers to check which is active; skip the ones which are deactivated without triggering the timer + for (uint8 i = m_uiHardModeStep - 1; i < KEEPER_ENCOUNTER; ++i) + { + if (m_bUlduarTower[i]) + { + // yell tower active + DoScriptText(aLeviathanTowerYell[i], m_creature); + DoScriptText(aLeviathanTowerEmote[i], m_creature); + + // activate the timer for each tower ability + switch (i) + { + case TOWER_ID_HODIR: DoSpawnHodirFury(); break; + case TOWER_ID_FREYA: DoSpawnFreyaWard(); break; + case TOWER_ID_MIMIRON: DoSpawnMimironInferno(); break; + case TOWER_ID_THORIM: m_uiThorimHammerTimer = 1000; break; + } + + // reset timer and wait for another turn + m_uiHardModeTimer = 10000; + ++m_uiHardModeStep; + break; + } + else + ++m_uiHardModeStep; + + // stop the timer after the final element + if (i == KEEPER_ENCOUNTER - 1) + m_uiHardModeTimer = 0; + } + break; + } + } + } + else + m_uiHardModeTimer -= uiDiff; + } + + // Tower of Storm abilities + if (m_uiThorimHammerTimer) + { + if (m_uiThorimHammerTimer <= uiDiff) + { + DoSpawnThorimHammer(); + ++m_uiThorimHammerCount; + + if (m_uiThorimHammerCount == MAX_THORIM_HAMMER) + m_uiThorimHammerTimer = 0; + else + m_uiThorimHammerTimer = 1000; + } + else + m_uiThorimHammerTimer -= uiDiff; + } + DoMeleeAttackIfReady(); } }; @@ -229,6 +561,175 @@ CreatureAI* GetAI_boss_flame_leviathan(Creature* pCreature) return new boss_flame_leviathanAI(pCreature); } +/*###### +## npc_hodir_fury_reticle +######*/ + +struct MANGOS_DLL_DECL npc_hodir_fury_reticleAI : public ScriptedAI +{ + npc_hodir_fury_reticleAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; + + uint32 m_uiTargetChaseTimer; + ObjectGuid m_hodirFuryGuid; + + void Reset() override + { + m_uiTargetChaseTimer = 5000; + SetCombatMovement(false); + } + + void AttackStart(Unit* /*pWho*/) override { } + void MoveInLineOfSight(Unit* /*pWho*/) override { } + + void JustSummoned(Creature* pSummoned) override + { + if (pSummoned->GetEntry() == NPC_HODIR_FURY) + m_hodirFuryGuid = pSummoned->GetObjectGuid(); + } + + void MovementInform(uint32 uiMoveType, uint32 uiPointId) override + { + if (uiMoveType != POINT_MOTION_TYPE || !uiPointId) + return; + + // cast Hodir Fury on point reached and search for another target + if (Creature* pHodirFury = m_creature->GetMap()->GetCreature(m_hodirFuryGuid)) + pHodirFury->CastSpell(m_creature, SPELL_HODIR_FURY, true); + + m_uiTargetChaseTimer = 5000; + } + + void UpdateAI(const uint32 uiDiff) override + { + if (m_uiTargetChaseTimer) + { + if (m_uiTargetChaseTimer <= uiDiff) + { + if (m_pInstance) + { + if (Creature* pLeviathan = m_pInstance->GetSingleCreatureFromStorage(NPC_LEVIATHAN)) + { + if (Unit* pTarget = pLeviathan->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + m_creature->GetMotionMaster()->MovePoint(1, pTarget->GetPositionX(), pTarget->GetPositionY(), pTarget->GetPositionZ()); + } + } + m_uiTargetChaseTimer = 0; + } + else + m_uiTargetChaseTimer -= uiDiff; + } + } +}; + +CreatureAI* GetAI_npc_hodir_fury_reticle(Creature* pCreature) +{ + return new npc_hodir_fury_reticleAI(pCreature); +} + +/*###### +## npc_hodir_fury +######*/ + +// TODO Remove this 'script' when combat can be proper prevented from core-side +struct MANGOS_DLL_DECL npc_hodir_furyAI : public Scripted_NoMovementAI +{ + npc_hodir_furyAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { Reset(); } + + void Reset() override { } + void AttackStart(Unit* /*pWho*/) override { } + void MoveInLineOfSight(Unit* /*pWho*/) override { } + void UpdateAI(const uint32 /*uiDiff*/) override { } +}; + +CreatureAI* GetAI_npc_hodir_fury(Creature* pCreature) +{ + return new npc_hodir_furyAI(pCreature); +} + +/*###### +## npc_freya_ward +######*/ + +// TODO Move this 'script' to eventAI when combat can be proper prevented from core-side +struct MANGOS_DLL_DECL npc_freya_wardAI : public Scripted_NoMovementAI +{ + npc_freya_wardAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { Reset();} + + uint32 m_uiFreyaWardTimer; + + void Reset() override + { + m_uiFreyaWardTimer = 30000; + } + + void AttackStart(Unit* /*pWho*/) override { } + void MoveInLineOfSight(Unit* /*pWho*/) override { } + + void JustSummoned(Creature* pSummoned) override + { + if (pSummoned->GetEntry() == NPC_WRITHING_LASHER || pSummoned->GetEntry() == NPC_WARD_OF_LIFE) + pSummoned->SetInCombatWithZone(); + } + + void UpdateAI(const uint32 uiDiff) override + { + if (m_uiFreyaWardTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_FREYA_WARD) == CAST_OK) + m_uiFreyaWardTimer = 30000; + } + else + m_uiFreyaWardTimer -= uiDiff; + } +}; + +CreatureAI* GetAI_npc_freya_ward(Creature* pCreature) +{ + return new npc_freya_wardAI(pCreature); +} + +/*###### +## npc_mimiron_inferno +######*/ + +// TODO Move this 'script' to eventAI when combat can be proper prevented from core-side +struct MANGOS_DLL_DECL npc_mimiron_infernoAI : public Scripted_NoMovementAI +{ + npc_mimiron_infernoAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { Reset(); } + + uint32 m_uiMimironInfernoTimer; + + void Reset() override + { + m_uiMimironInfernoTimer = 15000; + } + + void AttackStart(Unit* /*pWho*/) override { } + void MoveInLineOfSight(Unit* /*pWho*/) override { } + + void UpdateAI(const uint32 uiDiff) override + { + if (m_uiMimironInfernoTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_MIMIRON_INFERNO) == CAST_OK) + m_uiMimironInfernoTimer = 1000; + } + else + m_uiMimironInfernoTimer -= uiDiff; + } +}; + +CreatureAI* GetAI_npc_mimiron_inferno(Creature* pCreature) +{ + return new npc_mimiron_infernoAI(pCreature); +} + void AddSC_boss_flame_leviathan() { Script* pNewScript; @@ -237,4 +738,24 @@ void AddSC_boss_flame_leviathan() pNewScript->Name = "boss_flame_leviathan"; pNewScript->GetAI = GetAI_boss_flame_leviathan; pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_hodir_fury_reticle"; + pNewScript->GetAI = GetAI_npc_hodir_fury_reticle; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_hodir_fury"; + pNewScript->GetAI = GetAI_npc_hodir_fury; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_freya_ward"; + pNewScript->GetAI = GetAI_npc_freya_ward; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_mimiron_inferno"; + pNewScript->GetAI = GetAI_npc_mimiron_inferno; + pNewScript->RegisterSelf(); } diff --git a/scripts/northrend/ulduar/ulduar/boss_xt_002.cpp b/scripts/northrend/ulduar/ulduar/boss_xt_002.cpp index 1deed3c52..9092c02ee 100644 --- a/scripts/northrend/ulduar/ulduar/boss_xt_002.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_xt_002.cpp @@ -422,7 +422,7 @@ struct MANGOS_DLL_DECL boss_heart_deconstructorAI : public ScriptedAI } } - // TODO: Use the dummy effect on target when proper targeting will be supported in core + // TODO: Use the dummy effect on target when proper targeting will be supported in core void SpellHitTarget(Unit* pTarget, SpellEntry const* pSpellEntry) override { if (pTarget->GetEntry() == NPC_XT_TOY_PILE && pSpellEntry->Id == SPELL_ENERGY_ORB) diff --git a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp index e376cba06..581f12b67 100644 --- a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp +++ b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp @@ -77,7 +77,7 @@ void instance_ulduar::OnPlayerEnter(Player* pPlayer) { if (GetData(TYPE_LEVIATHAN) == SPECIAL || GetData(TYPE_LEVIATHAN) == FAIL) { - if (!GetSingleCreatureFromStorage(NPC_LEVIATHAN)) + if (!GetSingleCreatureFromStorage(NPC_LEVIATHAN, true)) { pPlayer->SummonCreature(NPC_LEVIATHAN, afLeviathanMovePos[0], afLeviathanMovePos[1], afLeviathanMovePos[2], afLeviathanMovePos[3], TEMPSUMMON_DEAD_DESPAWN, 0, true); DoCallLeviathanHelp(); @@ -102,6 +102,7 @@ void instance_ulduar::OnCreatureCreate(Creature* pCreature) case NPC_LEVIATHAN: case NPC_EXPLORER_DELLORAH: case NPC_BRANN_BRONZEBEARD: + case NPC_ORBITAL_SUPPORT: case NPC_RAZORSCALE: case NPC_EXPEDITION_COMMANDER: case NPC_XT002: @@ -368,6 +369,8 @@ void instance_ulduar::SetData(uint32 uiType, uint32 uiData) if (pDoor->GetGoState() != GO_STATE_READY) DoUseDoorOrButton(GO_LIGHTNING_DOOR); } + + SetSpecialAchievementCriteria(TYPE_ACHIEV_SHUTOUT, true); } else if (uiData == DONE) { @@ -873,6 +876,9 @@ bool instance_ulduar::CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player c case ACHIEV_CRIT_QUICK_SHAVE_N: case ACHIEV_CRIT_QUICK_SHAVE_H: return m_abAchievCriteria[TYPE_ACHIEV_QUICK_SHAVE]; + case ACHIEV_CRIT_SHUTOUT_N: + case ACHIEV_CRIT_SHUTOUT_H: + return m_abAchievCriteria[TYPE_ACHIEV_SHUTOUT]; default: return false; @@ -957,7 +963,7 @@ InstanceData* GetInstanceData_instance_ulduar(Map* pMap) return new instance_ulduar(pMap); } -bool ProcessEventId_event_ulduar(uint32 uiEventId, Object* pSource, Object* pTarget, bool bIsStart) +bool ProcessEventId_event_ulduar(uint32 uiEventId, Object* pSource, Object* /*pTarget*/, bool /*bIsStart*/) { if (uiEventId == EVENT_ID_SPELL_SHATTER) { @@ -970,6 +976,17 @@ bool ProcessEventId_event_ulduar(uint32 uiEventId, Object* pSource, Object* pTar } } } + else if (uiEventId == EVENT_ID_SHUTDOWN) + { + if (pSource->GetTypeId() == TYPEID_UNIT) + { + if (instance_ulduar* pInstance = (instance_ulduar*)((Creature*)pSource)->GetInstanceData()) + { + pInstance->SetSpecialAchievementCriteria(TYPE_ACHIEV_SHUTOUT, false); + return true; + } + } + } return false; } diff --git a/scripts/northrend/ulduar/ulduar/ulduar.h b/scripts/northrend/ulduar/ulduar/ulduar.h index eb303d021..5f1314c9d 100644 --- a/scripts/northrend/ulduar/ulduar/ulduar.h +++ b/scripts/northrend/ulduar/ulduar/ulduar.h @@ -67,6 +67,7 @@ enum NPC_BRONZEBEARD_RADIO = 34054, NPC_EXPLORER_DELLORAH = 33701, NPC_BRANN_BRONZEBEARD = 33579, + NPC_ORBITAL_SUPPORT = 34286, // Leviathan reinforcements // NPC_HIRED_ENGINEER = 33626, @@ -134,7 +135,7 @@ enum NPC_KEEPER_MIMIRON = 33244, NPC_KEEPER_THORIM = 33242, - MAX_SPECIAL_ACHIEV_CRITS = 8, + MAX_SPECIAL_ACHIEV_CRITS = 9, TYPE_ACHIEV_CAT_LADY = 0, TYPE_ACHIEV_NINE_LIVES = 1, @@ -144,6 +145,7 @@ enum TYPE_ACHIEV_STUNNED = 5, TYPE_ACHIEV_SHATTERED = 6, TYPE_ACHIEV_QUICK_SHAVE = 7, + TYPE_ACHIEV_SHUTOUT = 8, // Loot chests // Kologarn @@ -243,6 +245,7 @@ enum WORLD_STATE_TIMER_COUNT = 4131, // events + EVENT_ID_SHUTDOWN = 21605, EVENT_ID_SPELL_SHATTER = 21620, EVENT_ID_TOWER_LIFE = 21030, // events checked when a tower is destroyed EVENT_ID_TOWER_FLAME = 21033, diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 902e8f6ab..01b0aee47 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2934" + #define SD2_REVISION_NR "2935" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 221a7467d..11d09ef73 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -1283,7 +1283,11 @@ UPDATE creature_template SET ScriptName='npc_harpoon_fire_state' WHERE entry=332 UPDATE creature_template SET ScriptName='npc_keeper_norgannon' WHERE entry=33686; UPDATE creature_template SET ScriptName='npc_brann_ulduar' WHERE entry=33579; UPDATE creature_template SET ScriptName='boss_flame_leviathan' WHERE entry=33113; -DELETE FROM scripted_event_id WHERE id IN (9735,20964,21030,21031,21032,21033,21620); +UPDATE creature_template SET ScriptName='npc_hodir_fury_reticle' WHERE entry=33108; +UPDATE creature_template SET ScriptName='npc_hodir_fury' WHERE entry=33212; +UPDATE creature_template SET ScriptName='npc_freya_ward' WHERE entry=33367; +UPDATE creature_template SET ScriptName='npc_mimiron_inferno' WHERE entry=33370; +DELETE FROM scripted_event_id WHERE id IN (9735,20964,21030,21031,21032,21033,21605,21620); INSERT INTO scripted_event_id VALUES (9735, 'event_spell_saronite_barrier'), -- Vezax saronite barrier event (20964,'event_spell_harpoon_shot'), -- Razorscale harpoon event @@ -1291,6 +1295,7 @@ INSERT INTO scripted_event_id VALUES (21031,'event_go_ulduar_tower'), -- Tower of Storms destroyed event (21032,'event_go_ulduar_tower'), -- Tower of Frost destroyed event (21033,'event_go_ulduar_tower'), -- Tower of Flame destroyed event +(21605,'event_ulduar'), -- Flame Leviathan shutdown event (21620,'event_ulduar'); -- Ignis construct shatter event /* UN'GORO CRATER */ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 877d86219..1b4a4715a 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -3635,7 +3635,12 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1603239,'You\'ve done it! You\'ve broken the defenses of Ulduar. In a few moments, we will be dropping in to...',15804,0,0,0,'bronzebeard radio SAY_PRE_LEVIATHAN_1'), (-1603240,'What is that? Be careful! Something\'s headed your way!',15805,0,0,0,'bronzebeard radio SAY_PRE_LEVIATHAN_2'), -(-1603241,'Quickly! Evasive action! Evasive act--',15806,0,0,0,'bronzebeard radio SAY_PRE_LEVIATHAN_3'); +(-1603241,'Quickly! Evasive action! Evasive act--',15806,0,0,0,'bronzebeard radio SAY_PRE_LEVIATHAN_3'), + +(-1603242,'%s activates Hodir\'s Fury.',0,3,0,0,'leviathan EMOTE_HODIR_FURY'), +(-1603243,'%s activates Freya\'s Ward.',0,3,0,0,'leviathan EMOTE_FREYA_WARD'), +(-1603244,'%s activates Mimiron\'s Inferno.',0,3,0,0,'leviathan EMOTE_MIMIRON_INFERNO'), +(-1603245,'%s activates Thorim\'s Hammer.',0,3,0,0,'leviathan EMOTE_THORIM_HAMMER'); -- -1 604 000 GUNDRAK INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES diff --git a/sql/updates/r2935_mangos.sql b/sql/updates/r2935_mangos.sql new file mode 100644 index 000000000..ab7ca2f49 --- /dev/null +++ b/sql/updates/r2935_mangos.sql @@ -0,0 +1,7 @@ +UPDATE creature_template SET ScriptName='npc_hodir_fury_reticle' WHERE entry=33108; +UPDATE creature_template SET ScriptName='npc_hodir_fury' WHERE entry=33212; +UPDATE creature_template SET ScriptName='npc_freya_ward' WHERE entry=33367; +UPDATE creature_template SET ScriptName='npc_mimiron_inferno' WHERE entry=33370; +DELETE FROM scripted_event_id WHERE id IN (21605); +INSERT INTO scripted_event_id VALUES +(21605,'event_ulduar'); diff --git a/sql/updates/r2935_scriptdev2.sql b/sql/updates/r2935_scriptdev2.sql new file mode 100644 index 000000000..a460636ab --- /dev/null +++ b/sql/updates/r2935_scriptdev2.sql @@ -0,0 +1,6 @@ +DELETE FROM script_texts WHERE entry IN (-1603242,-1603243,-1603244,-1603245); +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1603242,'%s activates Hodir\'s Fury.',0,3,0,0,'leviathan EMOTE_HODIR_FURY'), +(-1603243,'%s activates Freya\'s Ward.',0,3,0,0,'leviathan EMOTE_FREYA_WARD'), +(-1603244,'%s activates Mimiron\'s Inferno.',0,3,0,0,'leviathan EMOTE_MIMIRON_INFERNO'), +(-1603245,'%s activates Thorim\'s Hammer.',0,3,0,0,'leviathan EMOTE_THORIM_HAMMER'); From 709f8ff946ec1127b707555e0e6370e09d7dde12 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Fri, 20 Sep 2013 15:48:19 +0300 Subject: [PATCH 0946/1172] [2936] Ulduar conditions and Leviathan achievements Requires CMangos [12550] * This will allow hard mode loot conditions for the bosses which currently support this * Allow vehicles to be used only during the siege event * Implement Leviathan hard mode achievements --- .../ulduar/ulduar/boss_flame_leviathan.cpp | 17 +++---- .../ulduar/ulduar/instance_ulduar.cpp | 51 +++++++++++++++++-- scripts/northrend/ulduar/ulduar/ulduar.h | 2 + sd2_revision_nr.h | 2 +- sql/scriptdev2_script_full.sql | 2 +- sql/updates/r2936_scriptdev2.sql | 1 + 6 files changed, 60 insertions(+), 15 deletions(-) create mode 100644 sql/updates/r2936_scriptdev2.sql diff --git a/scripts/northrend/ulduar/ulduar/boss_flame_leviathan.cpp b/scripts/northrend/ulduar/ulduar/boss_flame_leviathan.cpp index d473ddfd7..d81fc148e 100644 --- a/scripts/northrend/ulduar/ulduar/boss_flame_leviathan.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_flame_leviathan.cpp @@ -179,8 +179,6 @@ struct MANGOS_DLL_DECL boss_flame_leviathanAI : public ScriptedAI bool m_bInitTowers; bool m_bUlduarTower[KEEPER_ENCOUNTER]; - uint8 m_uiActiveTowers; - uint32 m_uiBatteringRamTimer; uint32 m_uiFlameVentsTimer; uint32 m_uiMissileBarrageTimer; @@ -200,8 +198,6 @@ struct MANGOS_DLL_DECL boss_flame_leviathanAI : public ScriptedAI for (uint8 i = 0; i < KEEPER_ENCOUNTER; ++i) m_bUlduarTower[i] = false; - m_uiActiveTowers = 0; - m_uiBatteringRamTimer = 10000; m_uiFlameVentsTimer = 30000; m_uiMissileBarrageTimer = 1000; @@ -338,11 +334,13 @@ struct MANGOS_DLL_DECL boss_flame_leviathanAI : public ScriptedAI if (!pOrbital) return; + uint8 uiActiveTowers = 0; + // check the states twice: at reset and at aggro to make sure that some towers were not destroyed in the meanwhile if (m_pInstance->GetData(TYPE_TOWER_HODIR) == DONE) { pOrbital->CastSpell(pOrbital, SPELL_TOWER_OF_FROST, true); - ++m_uiActiveTowers; + ++uiActiveTowers; m_bUlduarTower[TOWER_ID_HODIR] = true; } else @@ -350,7 +348,7 @@ struct MANGOS_DLL_DECL boss_flame_leviathanAI : public ScriptedAI if (m_pInstance->GetData(TYPE_TOWER_FREYA) == DONE) { pOrbital->CastSpell(pOrbital, SPELL_TOWER_OF_LIFE, true); - ++m_uiActiveTowers; + ++uiActiveTowers; m_bUlduarTower[TOWER_ID_FREYA] = true; } else @@ -358,7 +356,7 @@ struct MANGOS_DLL_DECL boss_flame_leviathanAI : public ScriptedAI if (m_pInstance->GetData(TYPE_TOWER_MIMIRON) == DONE) { pOrbital->CastSpell(pOrbital, SPELL_TOWER_OF_FLAMES, true); - ++m_uiActiveTowers; + ++uiActiveTowers; m_bUlduarTower[TOWER_ID_MIMIRON] = true; } else @@ -366,13 +364,14 @@ struct MANGOS_DLL_DECL boss_flame_leviathanAI : public ScriptedAI if (m_pInstance->GetData(TYPE_TOWER_THORIM) == DONE) { pOrbital->CastSpell(pOrbital, SPELL_TOWER_OF_STORMS, true); - ++m_uiActiveTowers; + ++uiActiveTowers; m_bUlduarTower[TOWER_ID_THORIM] = true; } else pOrbital->RemoveAurasDueToSpell(SPELL_TOWER_OF_STORMS); - // ToDo: inform instance about all active towers for future use in achievements and hard mode loot + // inform instance about all active towers for future use in achievements and hard mode loot + m_pInstance->SetData(TYPE_LEVIATHAN_TOWERS, uiActiveTowers); } // Functions which handle the spawn of each type of add diff --git a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp index 581f12b67..637654856 100644 --- a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp +++ b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp @@ -55,7 +55,8 @@ static sSpawnLocation m_aKeepersSpawnLocs[] = instance_ulduar::instance_ulduar(Map* pMap) : ScriptedInstance(pMap), DialogueHelper(aUlduarDialogue), m_uiShatterAchievTimer(0), - m_uiGauntletStatus(0) + m_uiGauntletStatus(0), + m_uiActiveTowers(0) { Initialize(); } @@ -636,6 +637,9 @@ void instance_ulduar::SetData(uint32 uiType, uint32 uiData) case TYPE_LEVIATHAN_GAUNTLET: m_uiGauntletStatus = uiData; return; + case TYPE_LEVIATHAN_TOWERS: + m_uiActiveTowers = uiData; + return; } DoOpenMadnessDoorIfCan(); @@ -673,10 +677,36 @@ bool instance_ulduar::CheckConditionCriteriaMeet(Player const* pPlayer, uint32 u case INSTANCE_CONDITION_ID_HARD_MODE_2: case INSTANCE_CONDITION_ID_HARD_MODE_3: case INSTANCE_CONDITION_ID_HARD_MODE_4: - // TODO: implement all hard mode loot here! - break; + { + if (!pConditionSource) + break; + + uint32 uiCondId = 0; + switch (pConditionSource->GetEntry()) + { + case NPC_LEVIATHAN: + uiCondId = m_uiActiveTowers; + break; + case NPC_XT002: + if (GetData(TYPE_XT002_HARD) == DONE) + uiCondId = 1; + break; + case NPC_VEZAX: + if (GetData(TYPE_VEZAX_HARD) == DONE) + uiCondId = 1; + break; + } - // ToDo: handle vehicle spell clicks - should be available only after the gauntlet was started by gossip! + return uiCondId == uiInstanceConditionId; + } + case INSTANCE_CONDITION_ID_ULDUAR: + { + if (!pConditionSource) + break; + + // handle vehicle spell clicks - are available only after the gauntlet was started by gossip or when Leviathan is active + return GetData(TYPE_LEVIATHAN_GAUNTLET) == IN_PROGRESS || GetData(TYPE_LEVIATHAN) == SPECIAL || GetData(TYPE_LEVIATHAN) == FAIL; + } } script_error_log("instance_ulduar::CheckConditionCriteriaMeet called with unsupported Id %u. Called with param plr %s, src %s, condition source type %u", @@ -794,6 +824,7 @@ void instance_ulduar::OnCreatureDeath(Creature* pCreature) { StartNextDialogueText(SAY_PRE_LEVIATHAN_1); SetData(TYPE_LEVIATHAN, SPECIAL); + SetData(TYPE_LEVIATHAN_GAUNTLET, DONE); pCreature->SummonCreature(NPC_LEVIATHAN, afLeviathanSpawnPos[0], afLeviathanSpawnPos[1], afLeviathanSpawnPos[2], afLeviathanSpawnPos[3], TEMPSUMMON_DEAD_DESPAWN, 0, true); } } @@ -879,6 +910,18 @@ bool instance_ulduar::CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player c case ACHIEV_CRIT_SHUTOUT_N: case ACHIEV_CRIT_SHUTOUT_H: return m_abAchievCriteria[TYPE_ACHIEV_SHUTOUT]; + case ACHIEV_CRIT_ORB_BOMB_N: + case ACHIEV_CRIT_ORB_BOMB_H: + return m_uiActiveTowers >= 1; + case ACHIEV_CRIT_ORB_DEV_N: + case ACHIEV_CRIT_ORB_DEV_H: + return m_uiActiveTowers >= 2; + case ACHIEV_CRIT_ORB_NUKED_N: + case ACHIEV_CRIT_ORB_NUKED_H: + return m_uiActiveTowers >= 3; + case ACHIEV_CRIT_ORBITUARY_N: + case ACHIEV_CRIT_ORBITUARY_H: + return m_uiActiveTowers == 4; default: return false; diff --git a/scripts/northrend/ulduar/ulduar/ulduar.h b/scripts/northrend/ulduar/ulduar/ulduar.h index 5f1314c9d..d163b4618 100644 --- a/scripts/northrend/ulduar/ulduar/ulduar.h +++ b/scripts/northrend/ulduar/ulduar/ulduar.h @@ -53,6 +53,7 @@ enum // Other types - not saved TYPE_LEVIATHAN_GAUNTLET = 31, + TYPE_LEVIATHAN_TOWERS = 32, // The siege of ulduar NPC_LEVIATHAN = 33113, @@ -388,6 +389,7 @@ class MANGOS_DLL_DECL instance_ulduar : public ScriptedInstance, private Dialogu uint32 m_uiShatterAchievTimer; uint32 m_uiGauntletStatus; + uint8 m_uiActiveTowers; GuidVector m_vToyPileGuidVector; GuidVector m_vBrokenHarpoonsGuids; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 01b0aee47..50b539237 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2935" + #define SD2_REVISION_NR "2936" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 1b4a4715a..d91e83666 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -3,7 +3,7 @@ -- DELETE FROM sd2_db_version; -INSERT INTO sd2_db_version (version) VALUES ('ScriptDev2 (for CMaNGOS 12524+) '); +INSERT INTO sd2_db_version (version) VALUES ('ScriptDev2 (for CMaNGOS 12550+) '); -- -- Below contains data for table `script_texts` mainly used in C++ parts. diff --git a/sql/updates/r2936_scriptdev2.sql b/sql/updates/r2936_scriptdev2.sql new file mode 100644 index 000000000..5f89aa8a9 --- /dev/null +++ b/sql/updates/r2936_scriptdev2.sql @@ -0,0 +1 @@ +UPDATE sd2_db_version SET version='ScriptDev2 (for CMaNGOS 12550+) '; From dcde5613815e7b0a9d58a48e00ddd4fa56218aab Mon Sep 17 00:00:00 2001 From: Xfurry Date: Fri, 20 Sep 2013 16:56:37 +0300 Subject: [PATCH 0947/1172] [2937] Despawn all gauntlet generators when a tower is destroyed --- scripts/northrend/ulduar/ulduar/ulduar.cpp | 6 ++++++ scripts/northrend/ulduar/ulduar/ulduar.h | 2 ++ sd2_revision_nr.h | 2 +- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/scripts/northrend/ulduar/ulduar/ulduar.cpp b/scripts/northrend/ulduar/ulduar/ulduar.cpp index c43eab9b2..3f7639860 100644 --- a/scripts/northrend/ulduar/ulduar/ulduar.cpp +++ b/scripts/northrend/ulduar/ulduar/ulduar.cpp @@ -324,6 +324,12 @@ bool ProcessEventId_event_go_ulduar_tower(uint32 uiEventId, Object* pSource, Obj return false; } + // despawn all generators in range + std::list lGenerators; + GetCreatureListWithEntryInGrid(lGenerators, (GameObject*)pSource, NPC_GENERATOR_SMALL, 100.0f); + for (std::list::iterator itr = lGenerators.begin(); itr != lGenerators.end(); ++itr) + (*itr)->ForcedDespawn(); + // allow further DB processing return false; } diff --git a/scripts/northrend/ulduar/ulduar/ulduar.h b/scripts/northrend/ulduar/ulduar/ulduar.h index d163b4618..74c431936 100644 --- a/scripts/northrend/ulduar/ulduar/ulduar.h +++ b/scripts/northrend/ulduar/ulduar/ulduar.h @@ -69,6 +69,8 @@ enum NPC_EXPLORER_DELLORAH = 33701, NPC_BRANN_BRONZEBEARD = 33579, NPC_ORBITAL_SUPPORT = 34286, + // NPC_GENERATOR = 33571, // spawns iron dwarfs from Storm Beacons + NPC_GENERATOR_SMALL = 34159, // spawns iron dwarfs from hard mode towers // Leviathan reinforcements // NPC_HIRED_ENGINEER = 33626, diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 50b539237..f8ebcef56 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2936" + #define SD2_REVISION_NR "2937" #endif // __SD2_REVISION_NR_H__ From 3c4e8b8ec8411e76984efb1201e621a5c33d8253 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Mon, 23 Sep 2013 00:32:54 +0300 Subject: [PATCH 0948/1172] [2938] Allow XT-002 to use Scrap Heal Thanks @rsa for providing the necessary data This will also implement achievements 2931 and 2932 --- .../northrend/ulduar/ulduar/boss_xt_002.cpp | 44 ++++++++++++++++++- .../ulduar/ulduar/instance_ulduar.cpp | 17 +++++++ scripts/northrend/ulduar/ulduar/ulduar.h | 4 +- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 4 +- sql/updates/r2938_mangos.sql | 4 ++ 6 files changed, 70 insertions(+), 5 deletions(-) create mode 100644 sql/updates/r2938_mangos.sql diff --git a/scripts/northrend/ulduar/ulduar/boss_xt_002.cpp b/scripts/northrend/ulduar/ulduar/boss_xt_002.cpp index 9092c02ee..1b372b80e 100644 --- a/scripts/northrend/ulduar/ulduar/boss_xt_002.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_xt_002.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: boss_xt_002 -SD%Complete: 70% -SDComment: Timers may need adjustments; Scrapbot healing, achievements and hard mode abilities NYI. +SD%Complete: 80% +SDComment: Timers may need adjustments; Achievements and hard mode abilities NYI. SDCategory: Ulduar EndScriptData */ @@ -78,6 +78,8 @@ enum SPELL_ARCANE_POWER_STATE = 49411, // cast by the life spark SPELL_STATIC_CHARGED = 64227, // cast by the life spark (needs to be confirmed) SPELL_STATIC_CHARGED_H = 64236, + SPELL_SCRAP_REPAIR = 62832, // cast on scrapbot in range to heal XT002; sends event 21606 + SPELL_RIDE_VEHICLE_SCRAPBOT = 47020, // cast by scrapbot on XT002 heal // NPC ids NPC_SCRAPBOT = 33343, @@ -469,6 +471,39 @@ CreatureAI* GetAI_boss_heart_deconstructor(Creature* pCreature) return new boss_heart_deconstructorAI(pCreature); } +/*###### +## npc_scrapbot +######*/ + +struct MANGOS_DLL_DECL npc_scrapbotAI : public ScriptedAI +{ + npc_scrapbotAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } + + bool m_bIsHealed; + + void Reset() override + { + m_bIsHealed = false; + } + + void MoveInLineOfSight(Unit* pWho) override + { + if (!m_bIsHealed && pWho->GetEntry() == NPC_XT002 && pWho->isAlive() && pWho->IsWithinDistInMap(m_creature, 10.0f)) + { + DoCastSpellIfCan(pWho, SPELL_RIDE_VEHICLE_SCRAPBOT, CAST_TRIGGERED); + pWho->CastSpell(m_creature, SPELL_SCRAP_REPAIR, true); + DoScriptText(EMOTE_REPAIR, pWho); + m_creature->ForcedDespawn(2000); + m_bIsHealed = true; + } + } +}; + +CreatureAI* GetAI_npc_scrapbot(Creature* pCreature) +{ + return new npc_scrapbotAI(pCreature); +} + /*###### ## npc_xt_toy_pile ######*/ @@ -503,6 +538,11 @@ void AddSC_boss_xt_002() pNewScript->GetAI = GetAI_boss_heart_deconstructor; pNewScript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "npc_scrapbot"; + pNewScript->GetAI = GetAI_npc_scrapbot; + pNewScript->RegisterSelf(); + pNewScript = new Script; pNewScript->Name = "npc_xt_toy_pile"; pNewScript->GetAI = GetAI_npc_xt_toy_pile; diff --git a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp index 637654856..b629c8fb7 100644 --- a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp +++ b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp @@ -459,7 +459,10 @@ void instance_ulduar::SetData(uint32 uiType, uint32 uiData) m_auiEncounter[uiType] = uiData; DoUseDoorOrButton(GO_XT002_GATE); if (uiData == IN_PROGRESS) + { DoStartTimedAchievement(ACHIEVEMENT_CRITERIA_TYPE_KILL_CREATURE, ACHIEV_START_XT002_ID); + SetSpecialAchievementCriteria(TYPE_ACHIEV_NERF_ENG, true); + } break; case TYPE_ASSEMBLY: // Don't set the same encounter data twice @@ -922,6 +925,9 @@ bool instance_ulduar::CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player c case ACHIEV_CRIT_ORBITUARY_N: case ACHIEV_CRIT_ORBITUARY_H: return m_uiActiveTowers == 4; + case ACHIEV_CRIT_NERF_ENG_N: + case ACHIEV_CRIT_NERF_ENG_H: + return m_abAchievCriteria[TYPE_ACHIEV_NERF_ENG]; default: return false; @@ -1030,6 +1036,17 @@ bool ProcessEventId_event_ulduar(uint32 uiEventId, Object* pSource, Object* /*pT } } } + else if (uiEventId == EVENT_ID_SCRAP_REPAIR) + { + if (pSource->GetTypeId() == TYPEID_UNIT) + { + if (instance_ulduar* pInstance = (instance_ulduar*)((Creature*)pSource)->GetInstanceData()) + { + pInstance->SetSpecialAchievementCriteria(TYPE_ACHIEV_NERF_ENG, false); + return true; + } + } + } return false; } diff --git a/scripts/northrend/ulduar/ulduar/ulduar.h b/scripts/northrend/ulduar/ulduar/ulduar.h index 74c431936..ee689bb4d 100644 --- a/scripts/northrend/ulduar/ulduar/ulduar.h +++ b/scripts/northrend/ulduar/ulduar/ulduar.h @@ -138,7 +138,7 @@ enum NPC_KEEPER_MIMIRON = 33244, NPC_KEEPER_THORIM = 33242, - MAX_SPECIAL_ACHIEV_CRITS = 9, + MAX_SPECIAL_ACHIEV_CRITS = 10, TYPE_ACHIEV_CAT_LADY = 0, TYPE_ACHIEV_NINE_LIVES = 1, @@ -149,6 +149,7 @@ enum TYPE_ACHIEV_SHATTERED = 6, TYPE_ACHIEV_QUICK_SHAVE = 7, TYPE_ACHIEV_SHUTOUT = 8, + TYPE_ACHIEV_NERF_ENG = 9, // Loot chests // Kologarn @@ -249,6 +250,7 @@ enum // events EVENT_ID_SHUTDOWN = 21605, + EVENT_ID_SCRAP_REPAIR = 21606, EVENT_ID_SPELL_SHATTER = 21620, EVENT_ID_TOWER_LIFE = 21030, // events checked when a tower is destroyed EVENT_ID_TOWER_FLAME = 21033, diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index f8ebcef56..7703acd37 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2937" + #define SD2_REVISION_NR "2938" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 11d09ef73..0763e5425 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -1275,6 +1275,7 @@ UPDATE creature_template SET ScriptName='npc_iron_construct' WHERE entry=33121; UPDATE creature_template SET ScriptName='npc_scorch' WHERE entry=33221; UPDATE creature_template SET ScriptName='boss_xt_002' WHERE entry=33293; UPDATE creature_template SET ScriptName='boss_heart_deconstructor' WHERE entry=33329; +UPDATE creature_template SET ScriptName='npc_scrapbot' WHERE entry=33343; UPDATE creature_template SET ScriptName='npc_xt_toy_pile' WHERE entry=33337; UPDATE creature_template SET ScriptName='boss_razorscale' WHERE entry=33186; UPDATE creature_template SET ScriptName='npc_expedition_commander' WHERE entry=33210; @@ -1287,7 +1288,7 @@ UPDATE creature_template SET ScriptName='npc_hodir_fury_reticle' WHERE entry=331 UPDATE creature_template SET ScriptName='npc_hodir_fury' WHERE entry=33212; UPDATE creature_template SET ScriptName='npc_freya_ward' WHERE entry=33367; UPDATE creature_template SET ScriptName='npc_mimiron_inferno' WHERE entry=33370; -DELETE FROM scripted_event_id WHERE id IN (9735,20964,21030,21031,21032,21033,21605,21620); +DELETE FROM scripted_event_id WHERE id IN (9735,20964,21030,21031,21032,21033,21605,21606,21620); INSERT INTO scripted_event_id VALUES (9735, 'event_spell_saronite_barrier'), -- Vezax saronite barrier event (20964,'event_spell_harpoon_shot'), -- Razorscale harpoon event @@ -1296,6 +1297,7 @@ INSERT INTO scripted_event_id VALUES (21032,'event_go_ulduar_tower'), -- Tower of Frost destroyed event (21033,'event_go_ulduar_tower'), -- Tower of Flame destroyed event (21605,'event_ulduar'), -- Flame Leviathan shutdown event +(21606,'event_ulduar'), -- XT-002 Scrap repair event (21620,'event_ulduar'); -- Ignis construct shatter event /* UN'GORO CRATER */ diff --git a/sql/updates/r2938_mangos.sql b/sql/updates/r2938_mangos.sql new file mode 100644 index 000000000..a2cb49e14 --- /dev/null +++ b/sql/updates/r2938_mangos.sql @@ -0,0 +1,4 @@ +UPDATE creature_template SET ScriptName='npc_scrapbot' WHERE entry=33343; +DELETE FROM scripted_event_id WHERE id IN (21606); +INSERT INTO scripted_event_id VALUES +(21606,'event_ulduar'); From 90ea6f9bbe642c48c622493660fefab8e06fd636 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Mon, 23 Sep 2013 01:55:01 +0300 Subject: [PATCH 0949/1172] [2939] Implement basic script on Kologarn --- .../northrend/ulduar/ulduar/boss_kologarn.cpp | 112 +++++++++++++++++- .../ulduar/ulduar/instance_ulduar.cpp | 8 +- scripts/northrend/ulduar/ulduar/ulduar.h | 8 ++ sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 + sql/updates/r2939_mangos.sql | 1 + 6 files changed, 123 insertions(+), 9 deletions(-) create mode 100644 sql/updates/r2939_mangos.sql diff --git a/scripts/northrend/ulduar/ulduar/boss_kologarn.cpp b/scripts/northrend/ulduar/ulduar/boss_kologarn.cpp index 7dff7b709..b6879d601 100644 --- a/scripts/northrend/ulduar/ulduar/boss_kologarn.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_kologarn.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: boss_kologarn -SD%Complete: 0% -SDComment: +SD%Complete: 20% +SDComment: Basic script SDCategory: Ulduar EndScriptData */ @@ -39,9 +39,117 @@ enum EMOTE_ARM_RIGHT = -1603135, EMOTE_ARM_LEFT = -1603136, EMOTE_STONE_GRIP = -1603137, + + // Kologarn + SPELL_INSTAKILL_KOLOGARN_ARM = 63628, // kill both arms on death + SPELL_OVERHEAD_SMASH = 63356, // cast if both arms are alive + SPELL_OVERHEAD_SMASH_H = 64003, + SPELL_ONE_ARMED_SMASH = 63573, // cast if only one arm is alive + SPELL_ONE_ARMED_SMASH_H = 64006, + SPELL_STONE_SHOUT = 63716, // cast if no arms are alive + SPELL_STONE_SHOUT_H = 64005, + SPELL_PETRIFYING_BREATH = 62030, // cast if nobody is in melee range + SPELL_PETRIFYING_BREATH_H = 63980, + SPELL_BERSERK = 64238, + + // Arms spells + SPELL_ARM_VISUAL = 64753, // spawn visual + SPELL_ARM_DEAD_DAMAGE_KOLOGARN = 63629, // damage to Kologarn on arm death + SPELL_ARM_DEAD_DAMAGE_KOLOGARN_H = 63979, + SPELL_RIDE_KOLOGARN_ARMS = 65343, + + // Left arm + SPELL_ARM_SWEEP = 63766, // triggers shockwave effect and visual spells + SPELL_ARM_SWEEP_H = 63983, + + // Right arm + SPELL_STONE_GRIP = 62166, // triggers vehicle control, damage and visual spells + SPELL_STONE_GRIP_H = 63981, + + // Focused Eyebeam + SPELL_FOCUSED_EYEBEAM_SUMMON = 63342, // triggers summons spells for npcs 33632 and 33802 + SPELL_EYEBEAM_PERIODIC = 63347, + SPELL_EYEBEAM_PERIODIC_H = 63977, + SPELL_EYEBEAM_VISUAL_LEFT = 63348, + SPELL_EYEBEAM_VISUAL_RIGHT = 63676, + + // NPC ids + NPC_FOCUSED_EYEBEAM_RIGHT = 33802, + NPC_FOCUSED_EYEBEAM_LEFT = 33632, + NPC_RUBBLE = 33768, +}; + +/*###### +## boss_kologarn +######*/ + +struct MANGOS_DLL_DECL boss_kologarnAI : public Scripted_NoMovementAI +{ + boss_kologarnAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) + { + m_pInstance = (instance_ulduar*)pCreature->GetInstanceData(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); + Reset(); + } + + instance_ulduar* m_pInstance; + bool m_bIsRegularMode; + + void Reset() override + { + } + + void JustDied(Unit* pKiller) override + { + if (m_pInstance) + m_pInstance->SetData(TYPE_KOLOGARN, DONE); + + DoCastSpellIfCan(m_creature, SPELL_INSTAKILL_KOLOGARN_ARM, CAST_TRIGGERED); + DoScriptText(SAY_DEATH, m_creature); + } + + void KilledUnit(Unit* pVictim) override + { + if (pVictim->GetTypeId() != TYPEID_PLAYER) + return; + + DoScriptText(urand(0, 1) ? SAY_SLAY_1 : SAY_SLAY_2, m_creature); + } + + void Aggro(Unit* pWho) override + { + if (m_pInstance) + m_pInstance->SetData(TYPE_KOLOGARN, IN_PROGRESS); + + DoScriptText(SAY_AGGRO, m_creature); + } + + void JustReachedHome() override + { + if (m_pInstance) + m_pInstance->SetData(TYPE_KOLOGARN, FAIL); + } + + void UpdateAI(const uint32 uiDiff) override + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + DoMeleeAttackIfReady(); + } }; +CreatureAI* GetAI_boss_kologarn(Creature* pCreature) +{ + return new boss_kologarnAI(pCreature); +} + void AddSC_boss_kologarn() { + Script* pNewScript; + pNewScript = new Script; + pNewScript->Name = "boss_kologarn"; + pNewScript->GetAI = GetAI_boss_kologarn; + pNewScript->RegisterSelf(); } diff --git a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp index b629c8fb7..0d30f154d 100644 --- a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp +++ b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp @@ -238,12 +238,9 @@ void instance_ulduar::OnObjectCreate(GameObject* pGo) break; // Shattered Hallway case GO_KOLOGARN_BRIDGE: - pGo->SetGoState(GO_STATE_ACTIVE); if (m_auiEncounter[TYPE_KOLOGARN] == DONE) pGo->SetGoState(GO_STATE_READY); break; - case GO_SHATTERED_DOOR: - break; // ----------------- The Keepers ----------------- // Hodir @@ -485,12 +482,11 @@ void instance_ulduar::SetData(uint32 uiType, uint32 uiData) break; case TYPE_KOLOGARN: m_auiEncounter[uiType] = uiData; - DoUseDoorOrButton(GO_SHATTERED_DOOR); if (uiData == DONE) { + DoToggleGameObjectFlags(instance->IsRegularDifficulty() ? GO_CACHE_OF_LIVING_STONE_10 : GO_CACHE_OF_LIVING_STONE_25, GO_FLAG_NO_INTERACT, false); DoRespawnGameObject(instance->IsRegularDifficulty() ? GO_CACHE_OF_LIVING_STONE_10 : GO_CACHE_OF_LIVING_STONE_25, 30 * MINUTE); - if (GameObject* pBridge = GetSingleGameObjectFromStorage(GO_KOLOGARN_BRIDGE)) - pBridge->SetGoState(GO_STATE_READY); + DoUseDoorOrButton(GO_KOLOGARN_BRIDGE); } break; case TYPE_AURIAYA: diff --git a/scripts/northrend/ulduar/ulduar/ulduar.h b/scripts/northrend/ulduar/ulduar/ulduar.h index ee689bb4d..eecdd2b74 100644 --- a/scripts/northrend/ulduar/ulduar/ulduar.h +++ b/scripts/northrend/ulduar/ulduar/ulduar.h @@ -306,6 +306,14 @@ enum ACHIEV_CRIT_SHUTOUT_H = 10055, ACHIEV_CRIT_UNBROKEN_N = 10044, // Flame Leviathan, achievs 2905, 2906 ACHIEV_CRIT_UNBROKEN_H = 10045, + ACHIEV_CRIT_DISARMED_N = 10284, // Kologarn, achievs 2953, 2954 + ACHIEV_CRIT_DISARMED_H = 10722, + ACHIEV_CRIT_LOOKS_KILL_N = 10286, // Kologarn, achievs 2955, 2956 + ACHIEV_CRIT_LOOKS_KILL_H = 10099, + ACHIEV_CRIT_RUBBLE_ROLL_N = 10290, // Kologarn, achievs 2959, 2960 + ACHIEV_CRIT_RUBBLE_ROLL_H = 10133, + ACHIEV_CRIT_OPEN_ARMS_N = 10285, // Kologarn, achievs 2951, 2952 + ACHIEV_CRIT_OPEN_ARMS_H = 10095, }; struct UlduarSpawns diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 7703acd37..72082c33d 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2938" + #define SD2_REVISION_NR "2939" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 0763e5425..6511799f6 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -1288,6 +1288,7 @@ UPDATE creature_template SET ScriptName='npc_hodir_fury_reticle' WHERE entry=331 UPDATE creature_template SET ScriptName='npc_hodir_fury' WHERE entry=33212; UPDATE creature_template SET ScriptName='npc_freya_ward' WHERE entry=33367; UPDATE creature_template SET ScriptName='npc_mimiron_inferno' WHERE entry=33370; +UPDATE creature_template SET ScriptName='boss_kologarn' WHERE entry=32930; DELETE FROM scripted_event_id WHERE id IN (9735,20964,21030,21031,21032,21033,21605,21606,21620); INSERT INTO scripted_event_id VALUES (9735, 'event_spell_saronite_barrier'), -- Vezax saronite barrier event diff --git a/sql/updates/r2939_mangos.sql b/sql/updates/r2939_mangos.sql new file mode 100644 index 000000000..8656cefd2 --- /dev/null +++ b/sql/updates/r2939_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='boss_kologarn' WHERE entry=32930; From 1fcdeb24a71bb3f70a5ff42fa15ccb9a1116f4c3 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Wed, 25 Sep 2013 00:08:32 +0300 Subject: [PATCH 0950/1172] [2940] Implement Kologarn combat abilities Note: Stone Grip requires some core updates --- .../northrend/ulduar/ulduar/boss_kologarn.cpp | 314 +++++++++++++++++- .../ulduar/ulduar/instance_ulduar.cpp | 6 + scripts/northrend/ulduar/ulduar/ulduar.h | 6 + sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 + sql/updates/r2940_mangos.sql | 1 + 6 files changed, 323 insertions(+), 7 deletions(-) create mode 100644 sql/updates/r2940_mangos.sql diff --git a/scripts/northrend/ulduar/ulduar/boss_kologarn.cpp b/scripts/northrend/ulduar/ulduar/boss_kologarn.cpp index b6879d601..bfadd05fd 100644 --- a/scripts/northrend/ulduar/ulduar/boss_kologarn.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_kologarn.cpp @@ -16,13 +16,14 @@ /* ScriptData SDName: boss_kologarn -SD%Complete: 20% -SDComment: Basic script +SD%Complete: 80% +SDComment: Achievements NYI. SDCategory: Ulduar EndScriptData */ #include "precompiled.h" #include "ulduar.h" +#include "TemporarySummon.h" enum { @@ -51,6 +52,7 @@ enum SPELL_PETRIFYING_BREATH = 62030, // cast if nobody is in melee range SPELL_PETRIFYING_BREATH_H = 63980, SPELL_BERSERK = 64238, + SPELL_REDUCE_PARRY_CHANCE = 64651, // Arms spells SPELL_ARM_VISUAL = 64753, // spawn visual @@ -70,15 +72,29 @@ enum SPELL_FOCUSED_EYEBEAM_SUMMON = 63342, // triggers summons spells for npcs 33632 and 33802 SPELL_EYEBEAM_PERIODIC = 63347, SPELL_EYEBEAM_PERIODIC_H = 63977, - SPELL_EYEBEAM_VISUAL_LEFT = 63348, - SPELL_EYEBEAM_VISUAL_RIGHT = 63676, + SPELL_EYEBEAM_DAMAGE = 63346, // triggered by the periodic spell + SPELL_EYEBEAM_DAMAGE_H = 63976, + SPELL_EYEBEAM_VISUAL_LEFT = 63676, // visual link to Kologarn + SPELL_EYEBEAM_VISUAL_RIGHT = 63702, + + // Rubble stalkers + SPELL_SUMMON_RUBBLE = 63633, // triggers 63634 five times + SPELL_FALLING_RUBBLE = 63821, + SPELL_FALLING_RUBBLE_H = 64001, + SPELL_CANCEL_STONE_GRIP = 65594, // cancels stone grip aura from players // NPC ids NPC_FOCUSED_EYEBEAM_RIGHT = 33802, NPC_FOCUSED_EYEBEAM_LEFT = 33632, NPC_RUBBLE = 33768, + + // other + SEAT_ID_LEFT = 1, + SEAT_ID_RIGHT = 2, }; +static const float afKoloArmsLoc[4] = {1797.15f, -24.4027f, 448.741f, 3.1939f}; + /*###### ## boss_kologarn ######*/ @@ -95,8 +111,37 @@ struct MANGOS_DLL_DECL boss_kologarnAI : public Scripted_NoMovementAI instance_ulduar* m_pInstance; bool m_bIsRegularMode; + uint32 m_uiMountArmsTimer; + + uint32 m_uiOverheadSmashTimer; + uint32 m_uiStoneShoutTimer; + uint32 m_uiEyebeamTimer; + uint32 m_uiPetrifyingBreathTimer; + uint32 m_uiRespawnRightTimer; + uint32 m_uiRespawnLeftTimer; + + uint32 m_uiStoneGripTimer; + uint32 m_uiShockwaveTimer; + + uint32 m_uiBerserkTimer; + void Reset() override { + m_uiMountArmsTimer = 5000; + m_uiBerserkTimer = 10 * MINUTE * IN_MILLISECONDS; + + m_uiOverheadSmashTimer = urand(5000, 10000); + m_uiStoneShoutTimer = 1000; + m_uiEyebeamTimer = 10000; + m_uiPetrifyingBreathTimer = 4000; + + m_uiShockwaveTimer = urand(15000, 20000); + m_uiStoneGripTimer = 10000; + + m_uiRespawnRightTimer = 0; + m_uiRespawnLeftTimer = 0; + + DoCastSpellIfCan(m_creature, SPELL_REDUCE_PARRY_CHANCE, CAST_TRIGGERED | CAST_AURA_NOT_PRESENT); } void JustDied(Unit* pKiller) override @@ -104,8 +149,9 @@ struct MANGOS_DLL_DECL boss_kologarnAI : public Scripted_NoMovementAI if (m_pInstance) m_pInstance->SetData(TYPE_KOLOGARN, DONE); - DoCastSpellIfCan(m_creature, SPELL_INSTAKILL_KOLOGARN_ARM, CAST_TRIGGERED); DoScriptText(SAY_DEATH, m_creature); + DoCastSpellIfCan(m_creature, SPELL_INSTAKILL_KOLOGARN_ARM, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_INSTAKILL_KOLOGARN_ARM, CAST_TRIGGERED); } void KilledUnit(Unit* pVictim) override @@ -128,14 +174,246 @@ struct MANGOS_DLL_DECL boss_kologarnAI : public Scripted_NoMovementAI { if (m_pInstance) m_pInstance->SetData(TYPE_KOLOGARN, FAIL); + + // kill both hands - will be respawned + m_creature->RemoveAllAuras(); + DoCastSpellIfCan(m_creature, SPELL_INSTAKILL_KOLOGARN_ARM, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_INSTAKILL_KOLOGARN_ARM, CAST_TRIGGERED); + } + + void JustSummoned(Creature* pSummoned) override + { + switch (pSummoned->GetEntry()) + { + case NPC_RIGHT_ARM: + { + int32 uiSeat = (int32)SEAT_ID_RIGHT; + pSummoned->CastCustomSpell(m_creature, SPELL_RIDE_KOLOGARN_ARMS, &uiSeat, NULL, NULL, true); + pSummoned->CastSpell(pSummoned, SPELL_ARM_VISUAL, true); + + if (m_creature->getVictim()) + pSummoned->AI()->AttackStart(m_creature->getVictim()); + break; + } + case NPC_LEFT_ARM: + { + int32 uiSeat = (int32)SEAT_ID_LEFT; + pSummoned->CastCustomSpell(m_creature, SPELL_RIDE_KOLOGARN_ARMS, &uiSeat, NULL, NULL, true); + pSummoned->CastSpell(pSummoned, SPELL_ARM_VISUAL, true); + + if (m_creature->getVictim()) + pSummoned->AI()->AttackStart(m_creature->getVictim()); + break; + } + case NPC_RUBBLE: + if (m_creature->getVictim()) + pSummoned->AI()->AttackStart(m_creature->getVictim()); + break; + case NPC_FOCUSED_EYEBEAM_RIGHT: + case NPC_FOCUSED_EYEBEAM_LEFT: + // force despawn - if the npc gets in combat it won't despawn automatically + pSummoned->ForcedDespawn(10000); + + // cast visuals and damage spell + pSummoned->CastSpell(m_creature, pSummoned->GetEntry() == NPC_FOCUSED_EYEBEAM_LEFT ? SPELL_EYEBEAM_VISUAL_LEFT : SPELL_EYEBEAM_VISUAL_RIGHT, true); + pSummoned->CastSpell(pSummoned, m_bIsRegularMode ? SPELL_EYEBEAM_PERIODIC : SPELL_EYEBEAM_PERIODIC_H, true); + + // follow the summoner + if (pSummoned->IsTemporarySummon()) + { + TemporarySummon* pTemporary = (TemporarySummon*)pSummoned; + + if (Unit* pPlayer = m_creature->GetMap()->GetUnit(pTemporary->GetSummonerGuid())) + pSummoned->GetMotionMaster()->MoveChase(pPlayer); + } + break; + } + } + + void SummonedCreatureJustDied(Creature* pSummoned) override + { + if (!m_creature->isAlive() || !m_creature->getVictim()) + return; + + if (pSummoned->GetEntry() == NPC_LEFT_ARM) + { + if (m_pInstance) + { + if (Creature* pStalker = m_creature->GetMap()->GetCreature(m_pInstance->GetKoloRubbleStalker(false))) + { + pStalker->CastSpell(pStalker, m_bIsRegularMode ? SPELL_FALLING_RUBBLE : SPELL_FALLING_RUBBLE_H, true); + pStalker->CastSpell(pStalker, SPELL_SUMMON_RUBBLE, true, NULL, NULL, m_creature->GetObjectGuid()); + pStalker->CastSpell(pStalker, SPELL_CANCEL_STONE_GRIP, true); + } + } + + m_creature->RemoveAurasByCasterSpell(SPELL_RIDE_KOLOGARN_ARMS, pSummoned->GetObjectGuid()); + pSummoned->CastSpell(m_creature, m_bIsRegularMode ? SPELL_ARM_DEAD_DAMAGE_KOLOGARN : SPELL_ARM_DEAD_DAMAGE_KOLOGARN_H, true); + DoScriptText(SAY_ARM_LOST_LEFT, m_creature); + m_uiRespawnLeftTimer = 48000; + } + else if (pSummoned->GetEntry() == NPC_RIGHT_ARM) + { + // spawn Rubble and cancel stone grip + if (m_pInstance) + { + if (Creature* pStalker = m_creature->GetMap()->GetCreature(m_pInstance->GetKoloRubbleStalker(true))) + { + pStalker->CastSpell(pStalker, m_bIsRegularMode ? SPELL_FALLING_RUBBLE : SPELL_FALLING_RUBBLE_H, true); + pStalker->CastSpell(pStalker, SPELL_SUMMON_RUBBLE, true, NULL, NULL, m_creature->GetObjectGuid()); + pStalker->CastSpell(pStalker, SPELL_CANCEL_STONE_GRIP, true); + } + } + + m_creature->RemoveAurasByCasterSpell(SPELL_RIDE_KOLOGARN_ARMS, pSummoned->GetObjectGuid()); + pSummoned->CastSpell(m_creature, m_bIsRegularMode ? SPELL_ARM_DEAD_DAMAGE_KOLOGARN : SPELL_ARM_DEAD_DAMAGE_KOLOGARN_H, true); + DoScriptText(SAY_ARM_LOST_RIGHT, m_creature); + m_uiRespawnRightTimer = 48000; + } } void UpdateAI(const uint32 uiDiff) override { + if (m_uiMountArmsTimer) + { + if (m_uiMountArmsTimer <= uiDiff) + { + m_creature->SummonCreature(NPC_RIGHT_ARM, afKoloArmsLoc[0], afKoloArmsLoc[1], afKoloArmsLoc[2], afKoloArmsLoc[3], TEMPSUMMON_DEAD_DESPAWN, 0); + m_creature->SummonCreature(NPC_LEFT_ARM, afKoloArmsLoc[0], afKoloArmsLoc[1], afKoloArmsLoc[2], afKoloArmsLoc[3], TEMPSUMMON_DEAD_DESPAWN, 0); + m_uiMountArmsTimer = 0; + } + else + m_uiMountArmsTimer -= uiDiff; + } + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - DoMeleeAttackIfReady(); + if (m_uiRespawnLeftTimer && m_uiRespawnRightTimer) + { + if (m_uiStoneShoutTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_STONE_SHOUT : SPELL_STONE_SHOUT_H) == CAST_OK) + m_uiStoneShoutTimer = urand(3000, 4000); + } + else + m_uiStoneShoutTimer -= uiDiff; + } + else + { + if (m_uiOverheadSmashTimer < uiDiff) + { + CanCastResult castResult; + if (!m_uiRespawnLeftTimer && !m_uiRespawnRightTimer) + castResult = DoCastSpellIfCan(m_creature->getVictim(), m_bIsRegularMode ? SPELL_OVERHEAD_SMASH : SPELL_OVERHEAD_SMASH_H); + else + castResult = DoCastSpellIfCan(m_creature->getVictim(), m_bIsRegularMode ? SPELL_ONE_ARMED_SMASH : SPELL_ONE_ARMED_SMASH_H); + + if (castResult == CAST_OK) + m_uiOverheadSmashTimer = 15000; + } + else + m_uiOverheadSmashTimer -= uiDiff; + } + + if (m_uiEyebeamTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_FOCUSED_EYEBEAM_SUMMON) == CAST_OK) + m_uiEyebeamTimer = 20000; + } + else + m_uiEyebeamTimer -= uiDiff; + + // respawn left arm if killed + if (m_uiRespawnLeftTimer) + { + if (m_uiRespawnLeftTimer <= uiDiff) + { + DoScriptText(EMOTE_ARM_LEFT, m_creature); + m_creature->SummonCreature(NPC_LEFT_ARM, afKoloArmsLoc[0], afKoloArmsLoc[1], afKoloArmsLoc[2], afKoloArmsLoc[3], TEMPSUMMON_DEAD_DESPAWN, 0); + m_uiRespawnLeftTimer = 0; + } + else + m_uiRespawnLeftTimer -= uiDiff; + } + // use left arm ability if available - spell always cast by Kologarn + else + { + if (m_uiShockwaveTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_ARM_SWEEP : SPELL_ARM_SWEEP_H) == CAST_OK) + { + DoScriptText(SAY_SHOCKWAVE, m_creature); + m_uiShockwaveTimer = 17000; + } + } + else + m_uiShockwaveTimer -= uiDiff; + } + + // respawn right arm if killed + if (m_uiRespawnRightTimer) + { + if (m_uiRespawnRightTimer <= uiDiff) + { + DoScriptText(EMOTE_ARM_RIGHT, m_creature); + m_creature->SummonCreature(NPC_RIGHT_ARM, afKoloArmsLoc[0], afKoloArmsLoc[1], afKoloArmsLoc[2], afKoloArmsLoc[3], TEMPSUMMON_DEAD_DESPAWN, 0); + m_uiRespawnRightTimer = 0; + } + else + m_uiRespawnRightTimer -= uiDiff; + } + // use right arm ability if available - spell always cast by Kologarn + else + { + if (m_uiStoneGripTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_STONE_GRIP : SPELL_STONE_GRIP_H) == CAST_OK) + { + DoScriptText(SAY_GRAB, m_creature); + DoScriptText(EMOTE_STONE_GRIP, m_creature); + m_uiStoneGripTimer = urand (20000, 30000); + } + } + else + m_uiStoneGripTimer -= uiDiff; + } + + if (m_uiBerserkTimer) + { + if (m_uiBerserkTimer <= uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_BERSERK) == CAST_OK) + { + if (m_pInstance) + { + if (Creature* pRightArm = m_pInstance->GetSingleCreatureFromStorage(NPC_RIGHT_ARM)) + pRightArm->CastSpell(pRightArm, SPELL_BERSERK, true); + if (Creature* pLeftArm = m_pInstance->GetSingleCreatureFromStorage(NPC_LEFT_ARM)) + pLeftArm->CastSpell(pLeftArm, SPELL_BERSERK, true); + } + + DoScriptText(SAY_BERSERK, m_creature); + m_uiBerserkTimer = 0; + } + } + else + m_uiBerserkTimer -= uiDiff; + } + + // melee range check + if (!m_creature->CanReachWithMeleeAttack(m_creature->getVictim())) + { + if (m_uiPetrifyingBreathTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), m_bIsRegularMode ? SPELL_PETRIFYING_BREATH : SPELL_PETRIFYING_BREATH_H) == CAST_OK) + m_uiPetrifyingBreathTimer = 4000; + } + else + m_uiPetrifyingBreathTimer -= uiDiff; + } + else + DoMeleeAttackIfReady(); } }; @@ -144,6 +422,25 @@ CreatureAI* GetAI_boss_kologarn(Creature* pCreature) return new boss_kologarnAI(pCreature); } +/*###### +## npc_focused_eyebeam +######*/ + +struct MANGOS_DLL_DECL npc_focused_eyebeamAI : public ScriptedAI +{ + npc_focused_eyebeamAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } + + void Reset() override { } + void AttackStart(Unit* /*pWho*/) override { } + void MoveInLineOfSight(Unit* /*pWho*/) override { } + void UpdateAI(const uint32 /*uiDiff*/) override { } +}; + +CreatureAI* GetAI_npc_focused_eyebeam(Creature* pCreature) +{ + return new npc_focused_eyebeamAI(pCreature); +} + void AddSC_boss_kologarn() { Script* pNewScript; @@ -152,4 +449,9 @@ void AddSC_boss_kologarn() pNewScript->Name = "boss_kologarn"; pNewScript->GetAI = GetAI_boss_kologarn; pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_focused_eyebeam"; + pNewScript->GetAI = GetAI_npc_focused_eyebeam; + pNewScript->RegisterSelf(); } diff --git a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp index 0d30f154d..bf8501ae4 100644 --- a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp +++ b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp @@ -174,6 +174,12 @@ void instance_ulduar::OnCreatureCreate(Creature* pCreature) case NPC_XT_TOY_PILE: m_vToyPileGuidVector.push_back(pCreature->GetObjectGuid()); return; + case NPC_RUBBLE_STALKER: + if (pCreature->GetPositionY() > -10.0f) + m_rightKoloStalkerGuid = pCreature->GetObjectGuid(); + else + m_leftKoloStalkerGuid = pCreature->GetObjectGuid(); + return; default: return; diff --git a/scripts/northrend/ulduar/ulduar/ulduar.h b/scripts/northrend/ulduar/ulduar/ulduar.h index eecdd2b74..628a9f6a4 100644 --- a/scripts/northrend/ulduar/ulduar/ulduar.h +++ b/scripts/northrend/ulduar/ulduar/ulduar.h @@ -95,6 +95,7 @@ enum NPC_KOLOGARN = 32930, NPC_RIGHT_ARM = 32934, NPC_LEFT_ARM = 32933, + NPC_RUBBLE_STALKER = 33809, // npc which spawns Rubble on Kologarn arms death NPC_AURIAYA = 33515, NPC_SANCTUM_SENTRY = 34014, NPC_FERAL_DEFENDER = 34035, @@ -380,6 +381,8 @@ class MANGOS_DLL_DECL instance_ulduar : public ScriptedInstance, private Dialogu void DoProcessShatteredEvent(); + ObjectGuid GetKoloRubbleStalker(bool bRightSide) { return bRightSide ? m_rightKoloStalkerGuid : m_leftKoloStalkerGuid; } + void GetDefenderGuids(GuidList& lDefenders) { lDefenders = m_lDefendersGuids; } void GetEngineersGuids(GuidList& lEngineers) { lEngineers = m_lEngineersGuids; } void GetTrappersGuids(GuidList& lTrappers) { lTrappers = m_lTrappersGuids; } @@ -403,6 +406,9 @@ class MANGOS_DLL_DECL instance_ulduar : public ScriptedInstance, private Dialogu uint32 m_uiGauntletStatus; uint8 m_uiActiveTowers; + ObjectGuid m_leftKoloStalkerGuid; + ObjectGuid m_rightKoloStalkerGuid; + GuidVector m_vToyPileGuidVector; GuidVector m_vBrokenHarpoonsGuids; GuidList m_lEngineersGuids; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 72082c33d..457e86789 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2939" + #define SD2_REVISION_NR "2940" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 6511799f6..8137c787d 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -1289,6 +1289,7 @@ UPDATE creature_template SET ScriptName='npc_hodir_fury' WHERE entry=33212; UPDATE creature_template SET ScriptName='npc_freya_ward' WHERE entry=33367; UPDATE creature_template SET ScriptName='npc_mimiron_inferno' WHERE entry=33370; UPDATE creature_template SET ScriptName='boss_kologarn' WHERE entry=32930; +UPDATE creature_template SET ScriptName='npc_focused_eyebeam' WHERE entry IN (33802,33632); DELETE FROM scripted_event_id WHERE id IN (9735,20964,21030,21031,21032,21033,21605,21606,21620); INSERT INTO scripted_event_id VALUES (9735, 'event_spell_saronite_barrier'), -- Vezax saronite barrier event diff --git a/sql/updates/r2940_mangos.sql b/sql/updates/r2940_mangos.sql new file mode 100644 index 000000000..fc319ea10 --- /dev/null +++ b/sql/updates/r2940_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_focused_eyebeam' WHERE entry IN (33802,33632); From 3dbf0fe5496ac7f0448d44fe4ba4b1200062a368 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Wed, 25 Sep 2013 00:12:11 +0300 Subject: [PATCH 0951/1172] [2941] Add missing override --- .../auchindoun/shadow_labyrinth/boss_blackheart_the_inciter.cpp | 2 +- sd2_revision_nr.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/outland/auchindoun/shadow_labyrinth/boss_blackheart_the_inciter.cpp b/scripts/outland/auchindoun/shadow_labyrinth/boss_blackheart_the_inciter.cpp index 5bf9abe41..f0ec15340 100644 --- a/scripts/outland/auchindoun/shadow_labyrinth/boss_blackheart_the_inciter.cpp +++ b/scripts/outland/auchindoun/shadow_labyrinth/boss_blackheart_the_inciter.cpp @@ -110,7 +110,7 @@ struct MANGOS_DLL_DECL boss_blackheart_the_inciterAI : public ScriptedAI m_pInstance->SetData(TYPE_INCITER, FAIL); } - void EnterEvadeMode() + void EnterEvadeMode() override { // if we are waiting for Incite chaos to expire don't evade if (m_uiInciteChaosWaitTimer) diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 457e86789..f115a7a21 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2940" + #define SD2_REVISION_NR "2941" #endif // __SD2_REVISION_NR_H__ From 054a0431eaeca7b95643b60dc2abf57a36ce64f5 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Wed, 25 Sep 2013 01:40:00 +0300 Subject: [PATCH 0952/1172] [2942] Implement achievements for Kologarn --- .../northrend/ulduar/ulduar/boss_kologarn.cpp | 121 ++++++++++++++++-- .../ulduar/ulduar/instance_ulduar.cpp | 19 +++ scripts/northrend/ulduar/ulduar/ulduar.h | 6 +- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 + sql/updates/r2942_mangos.sql | 1 + 6 files changed, 139 insertions(+), 11 deletions(-) create mode 100644 sql/updates/r2942_mangos.sql diff --git a/scripts/northrend/ulduar/ulduar/boss_kologarn.cpp b/scripts/northrend/ulduar/ulduar/boss_kologarn.cpp index bfadd05fd..32eaeab35 100644 --- a/scripts/northrend/ulduar/ulduar/boss_kologarn.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_kologarn.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: boss_kologarn -SD%Complete: 80% -SDComment: Achievements NYI. +SD%Complete: 100% +SDComment: SDCategory: Ulduar EndScriptData */ @@ -91,6 +91,7 @@ enum // other SEAT_ID_LEFT = 1, SEAT_ID_RIGHT = 2, + MAX_ACHIEV_RUBBLE = 25, }; static const float afKoloArmsLoc[4] = {1797.15f, -24.4027f, 448.741f, 3.1939f}; @@ -125,6 +126,9 @@ struct MANGOS_DLL_DECL boss_kologarnAI : public Scripted_NoMovementAI uint32 m_uiBerserkTimer; + uint8 m_uiRubbleCount; + uint32 m_uiDisarmedTimer; + void Reset() override { m_uiMountArmsTimer = 5000; @@ -141,6 +145,9 @@ struct MANGOS_DLL_DECL boss_kologarnAI : public Scripted_NoMovementAI m_uiRespawnRightTimer = 0; m_uiRespawnLeftTimer = 0; + m_uiRubbleCount = 0; + m_uiDisarmedTimer = 0; + DoCastSpellIfCan(m_creature, SPELL_REDUCE_PARRY_CHANCE, CAST_TRIGGERED | CAST_AURA_NOT_PRESENT); } @@ -205,10 +212,6 @@ struct MANGOS_DLL_DECL boss_kologarnAI : public Scripted_NoMovementAI pSummoned->AI()->AttackStart(m_creature->getVictim()); break; } - case NPC_RUBBLE: - if (m_creature->getVictim()) - pSummoned->AI()->AttackStart(m_creature->getVictim()); - break; case NPC_FOCUSED_EYEBEAM_RIGHT: case NPC_FOCUSED_EYEBEAM_LEFT: // force despawn - if the npc gets in combat it won't despawn automatically @@ -242,15 +245,26 @@ struct MANGOS_DLL_DECL boss_kologarnAI : public Scripted_NoMovementAI if (Creature* pStalker = m_creature->GetMap()->GetCreature(m_pInstance->GetKoloRubbleStalker(false))) { pStalker->CastSpell(pStalker, m_bIsRegularMode ? SPELL_FALLING_RUBBLE : SPELL_FALLING_RUBBLE_H, true); - pStalker->CastSpell(pStalker, SPELL_SUMMON_RUBBLE, true, NULL, NULL, m_creature->GetObjectGuid()); + pStalker->CastSpell(pStalker, SPELL_SUMMON_RUBBLE, true); pStalker->CastSpell(pStalker, SPELL_CANCEL_STONE_GRIP, true); } + + m_pInstance->SetSpecialAchievementCriteria(TYPE_ACHIEV_OPEN_ARMS, false); } m_creature->RemoveAurasByCasterSpell(SPELL_RIDE_KOLOGARN_ARMS, pSummoned->GetObjectGuid()); pSummoned->CastSpell(m_creature, m_bIsRegularMode ? SPELL_ARM_DEAD_DAMAGE_KOLOGARN : SPELL_ARM_DEAD_DAMAGE_KOLOGARN_H, true); DoScriptText(SAY_ARM_LOST_LEFT, m_creature); m_uiRespawnLeftTimer = 48000; + + // start disarmed achiev timer or set achiev crit as true if timer already started + if (m_uiDisarmedTimer) + { + if (m_pInstance) + m_pInstance->SetSpecialAchievementCriteria(TYPE_ACHIEV_DISARMED, true); + } + else + m_uiDisarmedTimer = 12000; } else if (pSummoned->GetEntry() == NPC_RIGHT_ARM) { @@ -260,15 +274,38 @@ struct MANGOS_DLL_DECL boss_kologarnAI : public Scripted_NoMovementAI if (Creature* pStalker = m_creature->GetMap()->GetCreature(m_pInstance->GetKoloRubbleStalker(true))) { pStalker->CastSpell(pStalker, m_bIsRegularMode ? SPELL_FALLING_RUBBLE : SPELL_FALLING_RUBBLE_H, true); - pStalker->CastSpell(pStalker, SPELL_SUMMON_RUBBLE, true, NULL, NULL, m_creature->GetObjectGuid()); + pStalker->CastSpell(pStalker, SPELL_SUMMON_RUBBLE, true); pStalker->CastSpell(pStalker, SPELL_CANCEL_STONE_GRIP, true); } + + m_pInstance->SetSpecialAchievementCriteria(TYPE_ACHIEV_OPEN_ARMS, false); } m_creature->RemoveAurasByCasterSpell(SPELL_RIDE_KOLOGARN_ARMS, pSummoned->GetObjectGuid()); pSummoned->CastSpell(m_creature, m_bIsRegularMode ? SPELL_ARM_DEAD_DAMAGE_KOLOGARN : SPELL_ARM_DEAD_DAMAGE_KOLOGARN_H, true); DoScriptText(SAY_ARM_LOST_RIGHT, m_creature); m_uiRespawnRightTimer = 48000; + + // start disarmed achiev timer or set achiev crit as true if timer already started + if (m_uiDisarmedTimer) + { + if (m_pInstance) + m_pInstance->SetSpecialAchievementCriteria(TYPE_ACHIEV_DISARMED, true); + } + else + m_uiDisarmedTimer = 12000; + } + } + + void ReceiveAIEvent(AIEventType eventType, Creature* /*pSender*/, Unit* pInvoker, uint32 /*uiMiscValue*/) override + { + // count the summoned Rubble + if (eventType == AI_EVENT_CUSTOM_A && pInvoker->GetEntry() == NPC_RUBBLE_STALKER) + { + ++m_uiRubbleCount; + + if (m_uiRubbleCount == MAX_ACHIEV_RUBBLE && m_pInstance) + m_pInstance->SetSpecialAchievementCriteria(TYPE_ACHIEV_RUBBLE, true); } } @@ -401,6 +438,18 @@ struct MANGOS_DLL_DECL boss_kologarnAI : public Scripted_NoMovementAI m_uiBerserkTimer -= uiDiff; } + if (m_uiDisarmedTimer) + { + if (m_uiDisarmedTimer <= uiDiff) + { + if (m_pInstance) + m_pInstance->SetSpecialAchievementCriteria(TYPE_ACHIEV_DISARMED, false); + m_uiDisarmedTimer = 0; + } + else + m_uiDisarmedTimer -= uiDiff; + } + // melee range check if (!m_creature->CanReachWithMeleeAttack(m_creature->getVictim())) { @@ -428,11 +477,24 @@ CreatureAI* GetAI_boss_kologarn(Creature* pCreature) struct MANGOS_DLL_DECL npc_focused_eyebeamAI : public ScriptedAI { - npc_focused_eyebeamAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } + npc_focused_eyebeamAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (instance_ulduar*)pCreature->GetInstanceData(); + Reset(); + } + + instance_ulduar* m_pInstance; void Reset() override { } void AttackStart(Unit* /*pWho*/) override { } void MoveInLineOfSight(Unit* /*pWho*/) override { } + + void SpellHitTarget(Unit* pTarget, SpellEntry const* pSpellEntry) override + { + if (pTarget->GetTypeId() == TYPEID_PLAYER && (pSpellEntry->Id == SPELL_EYEBEAM_DAMAGE || pSpellEntry->Id == SPELL_EYEBEAM_DAMAGE_H) && m_pInstance) + m_pInstance->SetSpecialAchievementCriteria(TYPE_ACHIEV_LOOKS_KILL, false); + } + void UpdateAI(const uint32 /*uiDiff*/) override { } }; @@ -441,6 +503,42 @@ CreatureAI* GetAI_npc_focused_eyebeam(Creature* pCreature) return new npc_focused_eyebeamAI(pCreature); } +/*###### +## npc_rubble_stalker +######*/ + +struct MANGOS_DLL_DECL npc_rubble_stalkerAI : public Scripted_NoMovementAI +{ + npc_rubble_stalkerAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) + { + m_pInstance = (instance_ulduar*)pCreature->GetInstanceData(); + Reset(); + } + + instance_ulduar* m_pInstance; + + void Reset() override { } + void AttackStart(Unit* /*pWho*/) override { } + void MoveInLineOfSight(Unit* /*pWho*/) override { } + + void JustSummoned(Creature* pSummoned) override + { + if (pSummoned->GetEntry() == NPC_RUBBLE && m_pInstance) + { + if (Creature* pKologarn = m_pInstance->GetSingleCreatureFromStorage(NPC_KOLOGARN)) + SendAIEvent(AI_EVENT_CUSTOM_A, m_creature, pKologarn); + + pSummoned->SetInCombatWithZone(); + } + } + void UpdateAI(const uint32 /*uiDiff*/) override { } +}; + +CreatureAI* GetAI_npc_rubble_stalker(Creature* pCreature) +{ + return new npc_rubble_stalkerAI(pCreature); +} + void AddSC_boss_kologarn() { Script* pNewScript; @@ -454,4 +552,9 @@ void AddSC_boss_kologarn() pNewScript->Name = "npc_focused_eyebeam"; pNewScript->GetAI = GetAI_npc_focused_eyebeam; pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_rubble_stalker"; + pNewScript->GetAI = GetAI_npc_rubble_stalker; + pNewScript->RegisterSelf(); } diff --git a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp index bf8501ae4..24c227bc5 100644 --- a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp +++ b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp @@ -494,6 +494,13 @@ void instance_ulduar::SetData(uint32 uiType, uint32 uiData) DoRespawnGameObject(instance->IsRegularDifficulty() ? GO_CACHE_OF_LIVING_STONE_10 : GO_CACHE_OF_LIVING_STONE_25, 30 * MINUTE); DoUseDoorOrButton(GO_KOLOGARN_BRIDGE); } + else if (uiData == IN_PROGRESS) + { + SetSpecialAchievementCriteria(TYPE_ACHIEV_RUBBLE, false); + SetSpecialAchievementCriteria(TYPE_ACHIEV_DISARMED, false); + SetSpecialAchievementCriteria(TYPE_ACHIEV_LOOKS_KILL, true); + SetSpecialAchievementCriteria(TYPE_ACHIEV_OPEN_ARMS, true); + } break; case TYPE_AURIAYA: m_auiEncounter[uiType] = uiData; @@ -930,6 +937,18 @@ bool instance_ulduar::CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player c case ACHIEV_CRIT_NERF_ENG_N: case ACHIEV_CRIT_NERF_ENG_H: return m_abAchievCriteria[TYPE_ACHIEV_NERF_ENG]; + case ACHIEV_CRIT_RUBBLE_ROLL_N: + case ACHIEV_CRIT_RUBBLE_ROLL_H: + return m_abAchievCriteria[TYPE_ACHIEV_RUBBLE]; + case ACHIEV_CRIT_LOOKS_KILL_N: + case ACHIEV_CRIT_LOOKS_KILL_H: + return m_abAchievCriteria[TYPE_ACHIEV_LOOKS_KILL]; + case ACHIEV_CRIT_OPEN_ARMS_N: + case ACHIEV_CRIT_OPEN_ARMS_H: + return m_abAchievCriteria[TYPE_ACHIEV_OPEN_ARMS]; + case ACHIEV_CRIT_DISARMED_N: + case ACHIEV_CRIT_DISARMED_H: + return m_abAchievCriteria[TYPE_ACHIEV_DISARMED]; default: return false; diff --git a/scripts/northrend/ulduar/ulduar/ulduar.h b/scripts/northrend/ulduar/ulduar/ulduar.h index 628a9f6a4..c8d8d061b 100644 --- a/scripts/northrend/ulduar/ulduar/ulduar.h +++ b/scripts/northrend/ulduar/ulduar/ulduar.h @@ -139,7 +139,7 @@ enum NPC_KEEPER_MIMIRON = 33244, NPC_KEEPER_THORIM = 33242, - MAX_SPECIAL_ACHIEV_CRITS = 10, + MAX_SPECIAL_ACHIEV_CRITS = 14, TYPE_ACHIEV_CAT_LADY = 0, TYPE_ACHIEV_NINE_LIVES = 1, @@ -151,6 +151,10 @@ enum TYPE_ACHIEV_QUICK_SHAVE = 7, TYPE_ACHIEV_SHUTOUT = 8, TYPE_ACHIEV_NERF_ENG = 9, + TYPE_ACHIEV_RUBBLE = 10, + TYPE_ACHIEV_LOOKS_KILL = 11, + TYPE_ACHIEV_OPEN_ARMS = 12, + TYPE_ACHIEV_DISARMED = 13, // Loot chests // Kologarn diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index f115a7a21..2473b8b66 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2941" + #define SD2_REVISION_NR "2942" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 8137c787d..58ecce4fe 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -1290,6 +1290,7 @@ UPDATE creature_template SET ScriptName='npc_freya_ward' WHERE entry=33367; UPDATE creature_template SET ScriptName='npc_mimiron_inferno' WHERE entry=33370; UPDATE creature_template SET ScriptName='boss_kologarn' WHERE entry=32930; UPDATE creature_template SET ScriptName='npc_focused_eyebeam' WHERE entry IN (33802,33632); +UPDATE creature_template SET ScriptName='npc_rubble_stalker' WHERE entry=33809; DELETE FROM scripted_event_id WHERE id IN (9735,20964,21030,21031,21032,21033,21605,21606,21620); INSERT INTO scripted_event_id VALUES (9735, 'event_spell_saronite_barrier'), -- Vezax saronite barrier event diff --git a/sql/updates/r2942_mangos.sql b/sql/updates/r2942_mangos.sql new file mode 100644 index 000000000..4f9c8e076 --- /dev/null +++ b/sql/updates/r2942_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_rubble_stalker' WHERE entry=33809; From 3e54075c303cea9b2b81900cac3cc5a152c0c979 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Wed, 25 Sep 2013 21:04:56 +0300 Subject: [PATCH 0953/1172] [2943] Summon Brann and Doren on Iron Council defeat They are used for the archivum specific quests --- .../ulduar/ulduar/instance_ulduar.cpp | 22 +++++++++++++++++-- scripts/northrend/ulduar/ulduar/ulduar.h | 15 ++++++++++--- sd2_revision_nr.h | 2 +- 3 files changed, 33 insertions(+), 6 deletions(-) diff --git a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp index 24c227bc5..d8b0ab2a3 100644 --- a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp +++ b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp @@ -76,6 +76,7 @@ void instance_ulduar::Initialize() void instance_ulduar::OnPlayerEnter(Player* pPlayer) { + // spawn Flame Leviathan if necessary if (GetData(TYPE_LEVIATHAN) == SPECIAL || GetData(TYPE_LEVIATHAN) == FAIL) { if (!GetSingleCreatureFromStorage(NPC_LEVIATHAN, true)) @@ -84,6 +85,16 @@ void instance_ulduar::OnPlayerEnter(Player* pPlayer) DoCallLeviathanHelp(); } } + + // spawn Brann at the archivum if necessary + if (GetData(TYPE_ASSEMBLY) == DONE) + { + if (!GetSingleCreatureFromStorage(NPC_BRANN_ARCHIVUM, true)) + { + pPlayer->SummonCreature(NPC_BRANN_ARCHIVUM, afBrannArchivumSpawnPos[0], afBrannArchivumSpawnPos[1], afBrannArchivumSpawnPos[2], afBrannArchivumSpawnPos[3], TEMPSUMMON_DEAD_DESPAWN, 0, true); + pPlayer->SummonCreature(instance->IsRegularDifficulty() ? NPC_PROSPECTOR_DOREN : NPC_PROSPECTOR_DOREN_H, afProspectorSpawnPos[0], afProspectorSpawnPos[1], afProspectorSpawnPos[2], afProspectorSpawnPos[3], TEMPSUMMON_DEAD_DESPAWN, 0, true); + } + } } bool instance_ulduar::IsEncounterInProgress() const @@ -117,6 +128,7 @@ void instance_ulduar::OnCreatureCreate(Creature* pCreature) case NPC_LEFT_ARM: case NPC_AURIAYA: case NPC_FERAL_DEFENDER: + case NPC_BRANN_ARCHIVUM: case NPC_LEVIATHAN_MK: case NPC_RUNIC_COLOSSUS: @@ -234,8 +246,6 @@ void instance_ulduar::OnObjectCreate(GameObject* pGo) if (m_auiEncounter[TYPE_ASSEMBLY]) pGo->SetGoState(GO_STATE_ACTIVE); break; - case GO_ARCHIVUM_CONSOLE: - case GO_UNIVERSE_FLOOR_ARCHIVUM: // Celestial Planetarium case GO_CELESTIAL_ACCES: case GO_CELESTIAL_DOOR: @@ -477,7 +487,15 @@ void instance_ulduar::SetData(uint32 uiType, uint32 uiData) return; DoUseDoorOrButton(GO_IRON_ENTRANCE_DOOR); if (uiData == DONE) + { DoUseDoorOrButton(GO_ARCHIVUM_DOOR); + + if (Player* pPlayer = GetPlayerInMap()) + { + pPlayer->SummonCreature(NPC_BRANN_ARCHIVUM, afBrannArchivumSpawnPos[0], afBrannArchivumSpawnPos[1], afBrannArchivumSpawnPos[2], afBrannArchivumSpawnPos[3], TEMPSUMMON_DEAD_DESPAWN, 0, true); + pPlayer->SummonCreature(instance->IsRegularDifficulty() ? NPC_PROSPECTOR_DOREN : NPC_PROSPECTOR_DOREN_H, afProspectorSpawnPos[0], afProspectorSpawnPos[1], afProspectorSpawnPos[2], afProspectorSpawnPos[3], TEMPSUMMON_DEAD_DESPAWN, 0, true); + } + } else if (uiData == IN_PROGRESS) { SetSpecialAchievementCriteria(TYPE_ACHIEV_BRUNDIR, true); diff --git a/scripts/northrend/ulduar/ulduar/ulduar.h b/scripts/northrend/ulduar/ulduar/ulduar.h index c8d8d061b..363244ed0 100644 --- a/scripts/northrend/ulduar/ulduar/ulduar.h +++ b/scripts/northrend/ulduar/ulduar/ulduar.h @@ -100,6 +100,11 @@ enum NPC_SANCTUM_SENTRY = 34014, NPC_FERAL_DEFENDER = 34035, + // Archivum + NPC_BRANN_ARCHIVUM = 33235, // npcs are spawned upon the Iron Council defeat; they handle specific quests + NPC_PROSPECTOR_DOREN = 33956, + NPC_PROSPECTOR_DOREN_H = 33957, + // The keepers of ulduar NPC_MIMIRON = 33350, NPC_LEVIATHAN_MK = 33432, @@ -201,11 +206,11 @@ enum // Antechamber GO_KOLOGARN_BRIDGE = 194232, - GO_SHATTERED_DOOR = 194553, // Door before kologarn + // GO_SHATTERED_DOOR = 194553, // Door before kologarn GO_IRON_ENTRANCE_DOOR = 194554, // Door before iron council GO_ARCHIVUM_DOOR = 194556, // Entrance door to the archivum - GO_ARCHIVUM_CONSOLE = 194555, // Used at some sort of cinematic - GO_UNIVERSE_FLOOR_ARCHIVUM = 194715, // Used for animation + // GO_ARCHIVUM_CONSOLE = 194555, // Used at some sort of cinematic + // GO_FLOOR_ARCHIVUM = 194715, // Used for animation // Planetarium GO_CELESTIAL_ACCES = 194628, // Acces console for 10 man mode @@ -355,6 +360,10 @@ static const UlduarSpawns afReinforcementsHeroic[] = static const float afLeviathanSpawnPos[4] = { 422.8898f, -13.32677f, 409.8839f, 3.12f }; static const float afLeviathanMovePos[4] = { 296.5809f, -11.55668f, 409.8278f, 3.12f }; +// spawn locations for Brann and Doren at the archivum +static const float afBrannArchivumSpawnPos[4] = { 1554.274f, 142.1644f, 427.273f, 3.61f }; +static const float afProspectorSpawnPos[4] = { 1556.469f, 143.5023f, 427.2918f, 4.04f }; + class MANGOS_DLL_DECL instance_ulduar : public ScriptedInstance, private DialogueHelper { public: diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 2473b8b66..1180224c5 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2942" + #define SD2_REVISION_NR "2943" #endif // __SD2_REVISION_NR_H__ From 2e8136f745f7ba19ef012fbf82d6715c2955893f Mon Sep 17 00:00:00 2001 From: Xfurry Date: Wed, 25 Sep 2013 23:58:16 +0300 Subject: [PATCH 0954/1172] [2944] Add script for Storm Tempered Keepers --- scripts/northrend/ulduar/ulduar/ulduar.cpp | 177 +++++++++++++++++++++ sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 2 + sql/updates/r2944_mangos.sql | 2 + 4 files changed, 182 insertions(+), 1 deletion(-) create mode 100644 sql/updates/r2944_mangos.sql diff --git a/scripts/northrend/ulduar/ulduar/ulduar.cpp b/scripts/northrend/ulduar/ulduar/ulduar.cpp index 3f7639860..ef6b00ce7 100644 --- a/scripts/northrend/ulduar/ulduar/ulduar.cpp +++ b/scripts/northrend/ulduar/ulduar/ulduar.cpp @@ -26,6 +26,8 @@ go_ulduar_teleporter npc_brann_ulduar npc_keeper_norgannon event_go_ulduar_tower +npc_storm_tempered_keeper +npc_charged_sphere EndContentData */ #include "precompiled.h" @@ -337,6 +339,171 @@ bool ProcessEventId_event_go_ulduar_tower(uint32 uiEventId, Object* pSource, Obj return false; } +/*###### +## npc_storm_tempered_keeper +######*/ + +enum +{ + SPELL_FORKED_LIGHTNING = 63541, + SPELL_SEPARATION_ANXIETY = 63539, // cast when a buddy is too far away + SPELL_VENGEFUL_SURGE = 63630, // cast when a buddy dies + SPELL_SUMMON_CHARGED_SPHERE = 63527, // summons npc 33715 (handled by eventAI) + + SPELL_CHARGED_SPERE = 63537, // charged sphere spells + SPELL_SUPERCHARGED = 63528, + + NPC_TEMPERED_KEEPER_1 = 33699, + NPC_TEMPERED_KEEPER_2 = 33722, + NPC_CHARGED_SPHERE = 33715, // moves to buddy keeper location + + MAX_KEEPER_DISTANCE = 70, +}; + +struct MANGOS_DLL_DECL npc_storm_tempered_keeperAI : public ScriptedAI +{ + npc_storm_tempered_keeperAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } + + uint32 m_uiCheckBuddyTimer; + uint32 m_uiLightningTimer; + uint32 m_uiSphereTimer; + + ObjectGuid m_buddyGuid; + + void Reset() override + { + m_uiCheckBuddyTimer = 1000; + m_uiLightningTimer = urand(5000, 10000); + m_uiSphereTimer = urand(10000, 30000); + } + + void Aggro(Unit* pWho) override + { + // initialize nearby buddy + if (Creature* pKeeper = GetClosestCreatureWithEntry(m_creature, m_creature->GetEntry() == NPC_TEMPERED_KEEPER_1 ? NPC_TEMPERED_KEEPER_2 : NPC_TEMPERED_KEEPER_1, 20)) + m_buddyGuid = pKeeper->GetObjectGuid(); + } + + void JustSummoned(Creature* pSummoned) override + { + if (pSummoned->GetEntry() == NPC_CHARGED_SPHERE) + { + pSummoned->CastSpell(pSummoned, SPELL_CHARGED_SPERE, true); + + // move to buddy location and notify about buddy entry + if (Creature* pBuddy = m_creature->GetMap()->GetCreature(m_buddyGuid)) + { + pSummoned->GetMotionMaster()->MoveFollow(pBuddy, 0, 0); + SendAIEvent(AI_EVENT_CUSTOM_A, m_creature, pSummoned, pBuddy->GetEntry()); + } + } + } + + void UpdateAI(const uint32 uiDiff) override + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_uiCheckBuddyTimer) + { + if (m_uiCheckBuddyTimer <= uiDiff) + { + Creature* pBuddy = m_creature->GetMap()->GetCreature(m_buddyGuid); + if (!pBuddy) + { + script_error_log("npc_storm_tempered_keeper for %s couldn't find its buddy.", m_creature->GetGuidStr().c_str()); + m_uiCheckBuddyTimer = 0; + return; + } + + // check if buddy is withind distance or alive + if (!pBuddy->IsWithinDistInMap(m_creature, MAX_KEEPER_DISTANCE)) + { + if (DoCastSpellIfCan(m_creature, SPELL_SEPARATION_ANXIETY) == CAST_OK) + m_uiCheckBuddyTimer = 5000; + } + else if (!pBuddy->isAlive()) + { + if (DoCastSpellIfCan(m_creature, SPELL_VENGEFUL_SURGE) == CAST_OK) + m_uiCheckBuddyTimer = 0; + } + else + m_uiCheckBuddyTimer = 1000; + } + else + m_uiCheckBuddyTimer -= uiDiff; + + // spawn a sphere only if the buddy is stil alive + if (m_uiSphereTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_SUMMON_CHARGED_SPHERE) == CAST_OK) + m_uiSphereTimer = urand(20000, 35000); + } + else + m_uiSphereTimer -= uiDiff; + } + + if (m_uiLightningTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_FORKED_LIGHTNING) == CAST_OK) + m_uiLightningTimer = urand(10000, 15000); + } + else + m_uiLightningTimer -= uiDiff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_npc_storm_tempered_keeper(Creature* pCreature) +{ + return new npc_storm_tempered_keeperAI(pCreature); +} + +/*###### +## npc_charged_sphere +######*/ + +struct MANGOS_DLL_DECL npc_charged_sphereAI : public ScriptedAI +{ + npc_charged_sphereAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } + + bool m_bIsCharged; + uint32 m_uiBuddyEntry; + + void Reset() override + { + m_bIsCharged = false; + m_uiBuddyEntry = 0; + } + + void MoveInLineOfSight(Unit* pWho) override + { + // cast supercharged if reached the buddy + if (!m_bIsCharged && pWho->GetEntry() == m_uiBuddyEntry && pWho->isAlive() && pWho->IsWithinDistInMap(m_creature, 5.0f)) + { + DoCastSpellIfCan(pWho, SPELL_SUPERCHARGED, CAST_TRIGGERED); + m_creature->ForcedDespawn(1000); + m_bIsCharged = true; + } + } + + void ReceiveAIEvent(AIEventType eventType, Creature* /*pSender*/, Unit* /*pInvoker*/, uint32 uiMiscValue) override + { + // inity entry of the buddy keeper + if (eventType == AI_EVENT_CUSTOM_A) + m_uiBuddyEntry = uiMiscValue; + } + + void AttackStart(Unit* /*pWho*/) override { } + void UpdateAI(const uint32 /*uiDiff*/) override { } +}; + +CreatureAI* GetAI_npc_charged_sphere(Creature* pCreature) +{ + return new npc_charged_sphereAI(pCreature); +} + void AddSC_ulduar() { Script* pNewScript; @@ -363,4 +530,14 @@ void AddSC_ulduar() pNewScript->Name = "event_go_ulduar_tower"; pNewScript->pProcessEventId = &ProcessEventId_event_go_ulduar_tower; pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_storm_tempered_keeper"; + pNewScript->GetAI = &GetAI_npc_storm_tempered_keeper; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_charged_sphere"; + pNewScript->GetAI = &GetAI_npc_charged_sphere; + pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 1180224c5..ce80decbd 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2943" + #define SD2_REVISION_NR "2944" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 58ecce4fe..b8b9dac07 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -1291,6 +1291,8 @@ UPDATE creature_template SET ScriptName='npc_mimiron_inferno' WHERE entry=33370; UPDATE creature_template SET ScriptName='boss_kologarn' WHERE entry=32930; UPDATE creature_template SET ScriptName='npc_focused_eyebeam' WHERE entry IN (33802,33632); UPDATE creature_template SET ScriptName='npc_rubble_stalker' WHERE entry=33809; +UPDATE creature_template SET ScriptName='npc_storm_tempered_keeper' WHERE entry IN (33699,33722); +UPDATE creature_template SET ScriptName='npc_charged_sphere' WHERE entry=33715; DELETE FROM scripted_event_id WHERE id IN (9735,20964,21030,21031,21032,21033,21605,21606,21620); INSERT INTO scripted_event_id VALUES (9735, 'event_spell_saronite_barrier'), -- Vezax saronite barrier event diff --git a/sql/updates/r2944_mangos.sql b/sql/updates/r2944_mangos.sql new file mode 100644 index 000000000..3f39482a0 --- /dev/null +++ b/sql/updates/r2944_mangos.sql @@ -0,0 +1,2 @@ +UPDATE creature_template SET ScriptName='npc_storm_tempered_keeper' WHERE entry IN (33699,33722); +UPDATE creature_template SET ScriptName='npc_charged_sphere' WHERE entry=33715; From c1700e8b0c34545763ebb9fa340f0dd6d8a676fc Mon Sep 17 00:00:00 2001 From: Xfurry Date: Thu, 26 Sep 2013 00:23:24 +0300 Subject: [PATCH 0955/1172] [2945] Fix animation for Loken Throne - Halls of Lightning Also fix a small typo from the previous commit --- .../ulduar/halls_of_lightning/instance_halls_of_lightning.cpp | 3 +-- scripts/northrend/ulduar/ulduar/ulduar.cpp | 2 +- sd2_revision_nr.h | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/scripts/northrend/ulduar/halls_of_lightning/instance_halls_of_lightning.cpp b/scripts/northrend/ulduar/halls_of_lightning/instance_halls_of_lightning.cpp index a008d6db2..94e4c70f8 100644 --- a/scripts/northrend/ulduar/halls_of_lightning/instance_halls_of_lightning.cpp +++ b/scripts/northrend/ulduar/halls_of_lightning/instance_halls_of_lightning.cpp @@ -106,9 +106,8 @@ void instance_halls_of_lightning::SetData(uint32 uiType, uint32 uiData) DoStartTimedAchievement(ACHIEVEMENT_CRITERIA_TYPE_KILL_CREATURE, ACHIEV_START_LOKEN_ID); else if (uiData == DONE) { - // Appears to be type 5 GO with animation. Need to figure out how this work, code below only placeholder if (GameObject* pGlobe = GetSingleGameObjectFromStorage(GO_LOKEN_THRONE)) - pGlobe->SetGoState(GO_STATE_ACTIVE); + pGlobe->SendGameObjectCustomAnim(pGlobe->GetObjectGuid()); } m_auiEncounter[uiType] = uiData; break; diff --git a/scripts/northrend/ulduar/ulduar/ulduar.cpp b/scripts/northrend/ulduar/ulduar/ulduar.cpp index ef6b00ce7..d288e85cf 100644 --- a/scripts/northrend/ulduar/ulduar/ulduar.cpp +++ b/scripts/northrend/ulduar/ulduar/ulduar.cpp @@ -348,7 +348,7 @@ enum SPELL_FORKED_LIGHTNING = 63541, SPELL_SEPARATION_ANXIETY = 63539, // cast when a buddy is too far away SPELL_VENGEFUL_SURGE = 63630, // cast when a buddy dies - SPELL_SUMMON_CHARGED_SPHERE = 63527, // summons npc 33715 (handled by eventAI) + SPELL_SUMMON_CHARGED_SPHERE = 63527, // summons npc 33715 SPELL_CHARGED_SPERE = 63537, // charged sphere spells SPELL_SUPERCHARGED = 63528, diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index ce80decbd..6e1cb8ae8 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2944" + #define SD2_REVISION_NR "2945" #endif // __SD2_REVISION_NR_H__ From 3ee4209293ccad2555c14415e2042d5d3199121c Mon Sep 17 00:00:00 2001 From: Xfurry Date: Fri, 27 Sep 2013 19:12:53 +0300 Subject: [PATCH 0956/1172] [2946] Implement spawn support and basic script for Algalon --- .../northrend/ulduar/ulduar/boss_algalon.cpp | 313 +++++++++++++++++- .../ulduar/ulduar/instance_ulduar.cpp | 91 ++++- scripts/northrend/ulduar/ulduar/ulduar.h | 18 +- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 2 + sql/scriptdev2_script_full.sql | 18 +- sql/updates/r2946_mangos.sql | 2 + sql/updates/r2946_scriptdev2.sql | 10 + 8 files changed, 425 insertions(+), 31 deletions(-) create mode 100644 sql/updates/r2946_mangos.sql create mode 100644 sql/updates/r2946_scriptdev2.sql diff --git a/scripts/northrend/ulduar/ulduar/boss_algalon.cpp b/scripts/northrend/ulduar/ulduar/boss_algalon.cpp index bcd05996a..2c758f2d8 100644 --- a/scripts/northrend/ulduar/ulduar/boss_algalon.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_algalon.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: boss_algalon -SD%Complete: 0% -SDComment: +SD%Complete: 20% +SDComment: Basic script only. SDCategory: Ulduar EndScriptData */ @@ -49,10 +49,319 @@ enum SAY_OUTRO_3 = -1603123, SAY_OUTRO_4 = -1603124, SAY_OUTRO_5 = -1603125, + SAY_BRANN_OUTRO = -1603246, + // intro spells + SPELL_ARRIVAL = 64997, // intro animation spells + SPELL_RIDE_LIGHTNING = 64986, + SPELL_SUMMON_AZEROTH = 64994, // summons npc 34246 + SPELL_REORIGINATION = 64996, // channeled animation on Azeroth globe + + // generic spells + // SPELL_ALGALON_EVENT_BEAM = 64367, // puspose unk + // SPELL_ALGALON_EVENT_CLIMAX = 64580, + SPELL_KILL_CREDIT = 65184, // achiev check spell + SPELL_SUPERMASSIVE_FAIL = 65311, // related to the Supermassive achievements + SPELL_BERSERK = 47008, + SPELL_ASCEND_HEAVENS = 64487, // cast when time's up + SPELL_TELEPORT = 62940, + + // combat spells + SPELL_QUANTUM_STRIKE = 64395, + SPELL_QUANTUM_STRIKE_H = 64592, + SPELL_PHASE_PUNCH = 64412, + SPELL_PHASE_PUNCH_SHIFT = 64417, + SPELL_COSMIC_SMASH = 62301, // triggers the spells which summon 33104 and 33105 + SPELL_COSMIC_SMASH_H = 64598, + SPELL_BIG_BANG = 64443, // removes players from phase + SPELL_BIG_BANG_H = 64584, + + // summoned spells + SPELL_CONSTELATION_PHASE = 65508, // shift phase - use unk + SPELL_BLACK_HOLE_CREDIT = 65312, + SPELL_COSMIC_SMASH_MISSILE = 62304, // cast by Algalon asteroid target - 33105 + SPELL_CONSTELLATION_TRIGGER = 65508, + SPELL_COLLAPSE = 62018, // cast by Collapsing stars + SPELL_BLACK_HOLE_EXPLOSION = 64122, + SPELL_BLACK_HOLE_EXPLOSION_H = 65108, + SPELL_BLACK_HOLE_DESPAWN = 64391, + SPELL_SUMMON_BLACK_HOLE = 62189, + SPELL_BLACK_HOLE_VISUAL = 64135, + SPELL_BLACK_HOLE_SPAWN = 62003, + SPELL_BLACK_HOLE_TRIGG = 62185, + SPELL_BLACK_HOLE_DMG = 62169, + SPELL_ARCANE_BARRAGE = 64599, + SPELL_ARCANE_BARRAGE_H = 64607, + + // npcs + NPC_AZEROTH = 34246, + NPC_ASTEROID_STALKER_1 = 33104, + NPC_ASTEROID_STALKER_2 = 33105, + NPC_LIVING_CONSTELLATION = 33052, + NPC_COLLAPSING_STAR = 32955, + NPC_DARK_MATTER = 33089, + NPC_UNLEASHED_DARK_MATTER = 34097, + NPC_BLACK_HOLE = 32953, + + // other + FACTION_ID_FRIENDLY = 35, }; +static const DialogueEntry aAlgalonDialogue[] = +{ + {SAY_INTRO_1, NPC_ALGALON, 6000}, + {SPELL_SUMMON_AZEROTH, 0, 5000}, + {SAY_INTRO_2, NPC_ALGALON, 8000}, + {SAY_INTRO_3, NPC_ALGALON, 0}, + {SAY_AGGRO, NPC_ALGALON, 16000}, + {SAY_ENGAGE, NPC_ALGALON, 0}, + {SPELL_ASCEND_HEAVENS, 0, 3000}, + {SPELL_BERSERK, 0, 0}, + {SAY_DESPAWN_1, NPC_ALGALON, 15000}, + {SAY_DESPAWN_2, NPC_ALGALON, 8000}, + {SAY_DESPAWN_3, NPC_ALGALON, 10000}, + {SPELL_TELEPORT, 0, 0}, + {NPC_ALGALON, 0, 12000}, + {SAY_OUTRO_1, NPC_ALGALON, 39000}, + {SAY_OUTRO_2, NPC_ALGALON, 18000}, + {SAY_OUTRO_3, NPC_ALGALON, 12000}, + {SAY_OUTRO_4, NPC_ALGALON, 12000}, + {SAY_BRANN_OUTRO, NPC_BRANN_ALGALON, 11000}, + {SAY_OUTRO_5, NPC_ALGALON, 0}, + {0, 0, 0}, +}; + +/*###### +## boss_algalon +######*/ + +struct MANGOS_DLL_DECL boss_algalonAI : public ScriptedAI, private DialogueHelper +{ + boss_algalonAI(Creature* pCreature) : ScriptedAI(pCreature), + DialogueHelper(aAlgalonDialogue) + { + m_pInstance = (instance_ulduar*)pCreature->GetInstanceData(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); + InitializeDialogueHelper(m_pInstance); + m_bEventFinished = false; + Reset(); + + // start intro event on first spawn + if (pCreature->GetPositionZ() > 450.0f) + DoStartIntroEvent(); + } + + instance_ulduar* m_pInstance; + bool m_bIsRegularMode; + + bool m_bEventFinished; + + uint32 m_uiBerserkTimer; + + void Reset() override + { + m_uiBerserkTimer = 6 * MINUTE * IN_MILLISECONDS; + } + + void KilledUnit(Unit* pVictim) override + { + if (pVictim->GetTypeId() != TYPEID_PLAYER) + return; + + DoScriptText(urand(0, 1) ? SAY_SLAY_1 : SAY_SLAY_2, m_creature); + } + + void Aggro(Unit* pWho) override + { + if (m_pInstance) + m_pInstance->SetData(TYPE_ALGALON, IN_PROGRESS); + + StartNextDialogueText(SAY_AGGRO); + } + + void DamageTaken(Unit* /*pDoneBy*/, uint32& uiDamage) override + { + if (uiDamage >= m_creature->GetHealth()) + { + uiDamage = 0; + + if (!m_bEventFinished) + { + if (m_pInstance) + m_pInstance->SetData(TYPE_ALGALON, DONE); + + DoCastSpellIfCan(m_creature, SPELL_KILL_CREDIT, CAST_TRIGGERED | CAST_INTERRUPT_PREVIOUS); + DoCastSpellIfCan(m_creature, SPELL_SUPERMASSIVE_FAIL, CAST_TRIGGERED | CAST_INTERRUPT_PREVIOUS); + + m_creature->setFaction(FACTION_ID_FRIENDLY); + m_bEventFinished = true; + EnterEvadeMode(); + } + } + } + + void JustReachedHome() override + { + if (!m_pInstance) + return; + + if (m_bEventFinished) + { + if (m_pInstance->GetData(TYPE_ALGALON) == DONE) + StartNextDialogueText(NPC_ALGALON); + else + StartNextDialogueText(SAY_DESPAWN_1); + } + else + m_pInstance->SetData(TYPE_ALGALON, FAIL); + } + + void JustSummoned(Creature* pSummoned) override + { + switch (pSummoned->GetEntry()) + { + // move Brann to the center of the platform (and override pathfinding because of missing GO support) + case NPC_BRANN_ALGALON: + pSummoned->SetWalk(false); + pSummoned->GetMotionMaster()->MovePoint(0, 1631.986f, -297.7831f, 417.321f, false); + break; + case NPC_AZEROTH: + pSummoned->ForcedDespawn(30000); + break; + } + } + + void MovementInform(uint32 uiMoveType, uint32 uiPointId) override + { + if (uiMoveType != POINT_MOTION_TYPE || !uiPointId) + return; + + // start intro and reset home position + StartNextDialogueText(SAY_INTRO_1); + m_creature->SetLevitate(false); + m_creature->RemoveAurasDueToSpell(SPELL_RIDE_LIGHTNING); + m_creature->SetRespawnCoord(afAlgalonMovePos[0], afAlgalonMovePos[1], afAlgalonMovePos[2], afAlgalonMovePos[3]); + } + + void JustDidDialogueStep(int32 iEntry) override + { + if (!m_pInstance) + return; + + switch (iEntry) + { + case SPELL_SUMMON_AZEROTH: + DoCastSpellIfCan(m_creature, SPELL_SUMMON_AZEROTH, CAST_TRIGGERED); + break; + case SAY_INTRO_2: + DoCastSpellIfCan(m_creature, SPELL_REORIGINATION); + break; + case SAY_ENGAGE: + // ToDo: change environment + break; + case SPELL_BERSERK: + EnterEvadeMode(); + break; + case SPELL_TELEPORT: + DoCastSpellIfCan(m_creature, SPELL_TELEPORT, CAST_TRIGGERED); + m_creature->ForcedDespawn(2000); + break; + case NPC_ALGALON: + m_creature->SummonCreature(NPC_BRANN_ALGALON, 1631.962f, -208.6464f, 420.8867f, 4.71f, TEMPSUMMON_DEAD_DESPAWN, 0); + break; + case SAY_OUTRO_1: + m_creature->SetStandState(UNIT_STAND_STATE_KNEEL); + break; + } + } + + void ReceiveAIEvent(AIEventType eventType, Creature* /*pSender*/, Unit* pInvoker, uint32 /*uiMiscValue*/) override + { + // notify boss that time is over + // this will trigger the wipe spell and make the boss evade and finally despawn + if (eventType == AI_EVENT_CUSTOM_A) + { + m_bEventFinished = true; + DoCastSpellIfCan(m_creature, SPELL_ASCEND_HEAVENS, CAST_INTERRUPT_PREVIOUS); + StartNextDialogueText(SPELL_ASCEND_HEAVENS); + } + } + + // function to start the intro part on first spawn + void DoStartIntroEvent() + { + m_creature->SetLevitate(true); + DoCastSpellIfCan(m_creature, SPELL_ARRIVAL, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_RIDE_LIGHTNING, CAST_TRIGGERED); + m_creature->GetMotionMaster()->MovePoint(1, afAlgalonMovePos[0], afAlgalonMovePos[1], afAlgalonMovePos[2]); + + // start timer event + if (m_pInstance) + { + m_pInstance->DoUpdateWorldState(WORLD_STATE_TIMER, 1); + m_pInstance->SetData(TYPE_ALGALON_TIMER, 60); + } + } + + void UpdateAI(const uint32 uiDiff) override + { + DialogueUpdate(uiDiff); + + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_uiBerserkTimer) + { + if (m_uiBerserkTimer <= uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_BERSERK) == CAST_OK) + { + DoScriptText(SAY_BERSERK, m_creature); + m_uiBerserkTimer = 0; + } + } + else + m_uiBerserkTimer -= uiDiff; + } + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_algalon(Creature* pCreature) +{ + return new boss_algalonAI(pCreature); +} + +/*###### +## go_celestial_access +######*/ + +bool GOUse_go_celestial_access(Player* pPlayer, GameObject* pGo) +{ + ScriptedInstance* pInstance = (ScriptedInstance*)pGo->GetInstanceData(); + if (!pInstance) + return true; + + if (pInstance->GetData(TYPE_ALGALON) != NOT_STARTED) + return true; + + // Set instance data and allow DB scripts to continue the event + pInstance->SetData(TYPE_ALGALON, SPECIAL); + return false; +} + void AddSC_boss_algalon() { + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_algalon"; + pNewScript->GetAI = GetAI_boss_algalon; + pNewScript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "go_celestial_access"; + pNewScript->pGOUse = &GOUse_go_celestial_access; + pNewScript->RegisterSelf(); } diff --git a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp index d8b0ab2a3..c21053e3c 100644 --- a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp +++ b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp @@ -54,6 +54,7 @@ static sSpawnLocation m_aKeepersSpawnLocs[] = }; instance_ulduar::instance_ulduar(Map* pMap) : ScriptedInstance(pMap), DialogueHelper(aUlduarDialogue), + m_uiAlgalonTimer(MINUTE * IN_MILLISECONDS), m_uiShatterAchievTimer(0), m_uiGauntletStatus(0), m_uiActiveTowers(0) @@ -95,6 +96,16 @@ void instance_ulduar::OnPlayerEnter(Player* pPlayer) pPlayer->SummonCreature(instance->IsRegularDifficulty() ? NPC_PROSPECTOR_DOREN : NPC_PROSPECTOR_DOREN_H, afProspectorSpawnPos[0], afProspectorSpawnPos[1], afProspectorSpawnPos[2], afProspectorSpawnPos[3], TEMPSUMMON_DEAD_DESPAWN, 0, true); } } + + // spawn Algalon and init world states if necessary + if (GetData(TYPE_ALGALON_TIMER)) + { + if (!GetSingleCreatureFromStorage(NPC_ALGALON, true)) + pPlayer->SummonCreature(NPC_ALGALON, afAlgalonMovePos[0], afAlgalonMovePos[1], afAlgalonMovePos[2], afAlgalonMovePos[3], TEMPSUMMON_DEAD_DESPAWN, 0, true); + + pPlayer->SendUpdateWorldState(WORLD_STATE_TIMER, 1); + pPlayer->SendUpdateWorldState(WORLD_STATE_TIMER_COUNT, GetData(TYPE_ALGALON_TIMER)); + } } bool instance_ulduar::IsEncounterInProgress() const @@ -129,6 +140,7 @@ void instance_ulduar::OnCreatureCreate(Creature* pCreature) case NPC_AURIAYA: case NPC_FERAL_DEFENDER: case NPC_BRANN_ARCHIVUM: + case NPC_BRANN_ALGALON: case NPC_LEVIATHAN_MK: case NPC_RUNIC_COLOSSUS: @@ -248,7 +260,16 @@ void instance_ulduar::OnObjectCreate(GameObject* pGo) break; // Celestial Planetarium case GO_CELESTIAL_ACCES: - case GO_CELESTIAL_DOOR: + case GO_CELESTIAL_ACCES_H: + // Note: weird, but unless flag is set, client will not respond as expected + pGo->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_LOCKED); + break; + case GO_CELESTIAL_DOOR_1: + case GO_CELESTIAL_DOOR_2: + if (m_auiEncounter[TYPE_ALGALON] != NOT_STARTED) + pGo->SetGoState(GO_STATE_ACTIVE); + break; + case GO_CELESTIAL_DOOR_COMBAT: case GO_UNIVERSE_FLOOR_CELESTIAL: case GO_AZEROTH_GLOBE: break; @@ -583,11 +604,30 @@ void instance_ulduar::SetData(uint32 uiType, uint32 uiData) // Celestial Planetarium case TYPE_ALGALON: m_auiEncounter[uiType] = uiData; - // TODO: need to find the proper way to use these - DoUseDoorOrButton(GO_CELESTIAL_DOOR); - DoUseDoorOrButton(GO_UNIVERSE_FLOOR_CELESTIAL); + if (uiData != SPECIAL) + { + DoUseDoorOrButton(GO_UNIVERSE_FLOOR_CELESTIAL); + DoUseDoorOrButton(GO_CELESTIAL_DOOR_COMBAT); + } if (uiData == DONE) + { + DoUpdateWorldState(WORLD_STATE_TIMER, 0); DoRespawnGameObject(instance->IsRegularDifficulty() ? GO_GIFT_OF_OBSERVER_10 : GO_GIFT_OF_OBSERVER_25, 30 * MINUTE); + } + else if (uiData == FAIL) + { + // only despawn when time is over + if (GetData(TYPE_ALGALON_TIMER) == 0) + { + DoUpdateWorldState(WORLD_STATE_TIMER, 0); + if (Creature* pAlgalon = GetSingleCreatureFromStorage(NPC_ALGALON)) + pAlgalon->AI()->SendAIEvent(AI_EVENT_CUSTOM_A, pAlgalon, pAlgalon); + } + } + break; + case TYPE_ALGALON_TIMER: + m_auiEncounter[uiType] = uiData; + DoUpdateWorldState(WORLD_STATE_TIMER_COUNT, m_auiEncounter[uiType]); break; // Hard modes @@ -674,7 +714,7 @@ void instance_ulduar::SetData(uint32 uiType, uint32 uiData) DoOpenMadnessDoorIfCan(); - if (uiData == DONE || uiData == FAIL || uiData == SPECIAL) + if (uiData == DONE || uiData == FAIL || uiData == SPECIAL || uiType == TYPE_ALGALON_TIMER) { OUT_SAVE_INST_DATA; @@ -684,12 +724,12 @@ void instance_ulduar::SetData(uint32 uiType, uint32 uiData) << m_auiEncounter[3] << " " << m_auiEncounter[4] << " " << m_auiEncounter[5] << " " << m_auiEncounter[6] << " " << m_auiEncounter[7] << " " << m_auiEncounter[8] << " " << m_auiEncounter[9] << " " << m_auiEncounter[10] << " " << m_auiEncounter[11] << " " - << m_auiEncounter[12] << " " << m_auiEncounter[13] << " " << m_auiHardBoss[0] << " " - << m_auiHardBoss[1] << " " << m_auiHardBoss[2] << " " << m_auiHardBoss[2] << " " - << m_auiHardBoss[4] << " " << m_auiHardBoss[5] << " " << m_auiHardBoss[6] << " " - << m_auiUlduarKeepers[0] << " " << m_auiUlduarKeepers[1] << " " << m_auiUlduarKeepers[2] << " " - << m_auiUlduarKeepers[3] << " " << m_auiUlduarTowers[0] << " " << m_auiUlduarTowers[1] << " " - << m_auiUlduarTowers[2] << " " << m_auiUlduarTowers[3]; + << m_auiEncounter[12] << " " << m_auiEncounter[13] << " " << m_auiEncounter[14] << " " + << m_auiHardBoss[0] << " " << m_auiHardBoss[1] << " " << m_auiHardBoss[2] << " " + << m_auiHardBoss[3] << " " << m_auiHardBoss[4] << " " << m_auiHardBoss[5] << " " + << m_auiHardBoss[6] << " " << m_auiUlduarKeepers[0] << " " << m_auiUlduarKeepers[1] << " " + << m_auiUlduarKeepers[2] << " " << m_auiUlduarKeepers[3] << " " << m_auiUlduarTowers[0] << " " + << m_auiUlduarTowers[1] << " " << m_auiUlduarTowers[2] << " " << m_auiUlduarTowers[3]; m_strInstData = saveStream.str(); @@ -776,6 +816,8 @@ uint32 instance_ulduar::GetData(uint32 uiType) const return m_auiEncounter[12]; case TYPE_ALGALON: return m_auiEncounter[13]; + case TYPE_ALGALON_TIMER: + return m_auiEncounter[14]; // Hard modes case TYPE_LEVIATHAN_HARD: @@ -874,11 +916,13 @@ void instance_ulduar::Load(const char* strIn) std::istringstream loadStream(strIn); loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3] - >> m_auiEncounter[4] >> m_auiEncounter[5] >> m_auiEncounter[6] >> m_auiEncounter[7] >> m_auiEncounter[8] - >> m_auiEncounter[9] >> m_auiEncounter[10] >> m_auiEncounter[11] >> m_auiEncounter[12] >> m_auiEncounter[13] - >> m_auiHardBoss[0] >> m_auiHardBoss[1] >> m_auiHardBoss[2] >> m_auiHardBoss[3] >> m_auiHardBoss[4] >> m_auiHardBoss[5] >> m_auiHardBoss[6] - >> m_auiUlduarKeepers[0] >> m_auiUlduarKeepers[1] >> m_auiUlduarKeepers[2] >> m_auiUlduarKeepers[3] >> m_auiUlduarTowers[0] - >> m_auiUlduarTowers[1] >> m_auiUlduarTowers[2] >> m_auiUlduarTowers[3]; + >> m_auiEncounter[4] >> m_auiEncounter[5] >> m_auiEncounter[6] >> m_auiEncounter[7] + >> m_auiEncounter[8] >> m_auiEncounter[9] >> m_auiEncounter[10] >> m_auiEncounter[11] + >> m_auiEncounter[12] >> m_auiEncounter[13] >> m_auiEncounter[14] >> m_auiHardBoss[0] + >> m_auiHardBoss[1] >> m_auiHardBoss[2] >> m_auiHardBoss[3] >> m_auiHardBoss[4] >> m_auiHardBoss[5] + >> m_auiHardBoss[6] >> m_auiUlduarKeepers[0] >> m_auiUlduarKeepers[1] >> m_auiUlduarKeepers[2] + >> m_auiUlduarKeepers[3] >> m_auiUlduarTowers[0] >> m_auiUlduarTowers[1] >> m_auiUlduarTowers[2] + >> m_auiUlduarTowers[3]; for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) { @@ -1044,6 +1088,21 @@ void instance_ulduar::Update(uint32 uiDiff) m_uiShatterAchievTimer -= uiDiff; } } + + if (GetData(TYPE_ALGALON_TIMER)) + { + if (m_uiAlgalonTimer <= uiDiff) + { + --m_auiEncounter[TYPE_ALGALON_TIMER]; + SetData(TYPE_ALGALON_TIMER, m_auiEncounter[TYPE_ALGALON_TIMER]); + m_uiAlgalonTimer = MINUTE * IN_MILLISECONDS; + + if (m_auiEncounter[TYPE_ALGALON_TIMER] == 0) + SetData(TYPE_ALGALON, FAIL); + } + else + m_uiAlgalonTimer -= uiDiff; + } } InstanceData* GetInstanceData_instance_ulduar(Map* pMap) diff --git a/scripts/northrend/ulduar/ulduar/ulduar.h b/scripts/northrend/ulduar/ulduar/ulduar.h index 363244ed0..b75e59b50 100644 --- a/scripts/northrend/ulduar/ulduar/ulduar.h +++ b/scripts/northrend/ulduar/ulduar/ulduar.h @@ -7,7 +7,7 @@ enum { - MAX_ENCOUNTER = 14, + MAX_ENCOUNTER = 15, HARD_MODE_ENCOUNTER = 7, KEEPER_ENCOUNTER = 4, @@ -26,11 +26,12 @@ enum TYPE_VEZAX = 11, TYPE_YOGGSARON = 12, TYPE_ALGALON = 13, + TYPE_ALGALON_TIMER = 14, // Hard mode boss types // Used for hard mode bosses only - TYPE_LEVIATHAN_HARD = 14, - TYPE_XT002_HARD = 15, + TYPE_LEVIATHAN_HARD = 15, + TYPE_XT002_HARD = 16, TYPE_MIMIRON_HARD = 17, TYPE_HODIR_HARD = 18, TYPE_THORIM_HARD = 19, @@ -104,6 +105,7 @@ enum NPC_BRANN_ARCHIVUM = 33235, // npcs are spawned upon the Iron Council defeat; they handle specific quests NPC_PROSPECTOR_DOREN = 33956, NPC_PROSPECTOR_DOREN_H = 33957, + NPC_BRANN_ALGALON = 34064, // Brann entry summoned for the Algalon intro and epilogue event // The keepers of ulduar NPC_MIMIRON = 33350, @@ -215,7 +217,9 @@ enum // Planetarium GO_CELESTIAL_ACCES = 194628, // Acces console for 10 man mode GO_CELESTIAL_ACCES_H = 194752, // Acces console for 25 man mode - GO_CELESTIAL_DOOR = 194767, // Entrance door to the planetarium + GO_CELESTIAL_DOOR_1 = 194767, // Entrance doors to the planetarium + GO_CELESTIAL_DOOR_2 = 194911, + GO_CELESTIAL_DOOR_COMBAT = 194910, GO_UNIVERSE_FLOOR_CELESTIAL = 194716, // For animation GO_AZEROTH_GLOBE = 194148, // For animation @@ -324,6 +328,8 @@ enum ACHIEV_CRIT_RUBBLE_ROLL_H = 10133, ACHIEV_CRIT_OPEN_ARMS_N = 10285, // Kologarn, achievs 2951, 2952 ACHIEV_CRIT_OPEN_ARMS_H = 10095, + ACHIEV_CRIT_FEEDS_TEARS_N = 10568, // Algalon, achievs 3004, 3005 + ACHIEV_CRIT_FEEDS_TEARS_H = 10570, }; struct UlduarSpawns @@ -364,6 +370,9 @@ static const float afLeviathanMovePos[4] = { 296.5809f, -11.55668f, 409.8278f, 3 static const float afBrannArchivumSpawnPos[4] = { 1554.274f, 142.1644f, 427.273f, 3.61f }; static const float afProspectorSpawnPos[4] = { 1556.469f, 143.5023f, 427.2918f, 4.04f }; +// spawn location for Algalon in reload case +static const float afAlgalonMovePos[4] = {1632.668f, -302.7656f, 417.3211f, 1.53f}; + class MANGOS_DLL_DECL instance_ulduar : public ScriptedInstance, private DialogueHelper { public: @@ -415,6 +424,7 @@ class MANGOS_DLL_DECL instance_ulduar : public ScriptedInstance, private Dialogu uint32 m_auiUlduarTowers[KEEPER_ENCOUNTER]; bool m_abAchievCriteria[MAX_SPECIAL_ACHIEV_CRITS]; + uint32 m_uiAlgalonTimer; uint32 m_uiShatterAchievTimer; uint32 m_uiGauntletStatus; uint8 m_uiActiveTowers; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 6e1cb8ae8..2ab6b687f 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2945" + #define SD2_REVISION_NR "2946" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index b8b9dac07..ea1c27bec 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -1293,6 +1293,8 @@ UPDATE creature_template SET ScriptName='npc_focused_eyebeam' WHERE entry IN (33 UPDATE creature_template SET ScriptName='npc_rubble_stalker' WHERE entry=33809; UPDATE creature_template SET ScriptName='npc_storm_tempered_keeper' WHERE entry IN (33699,33722); UPDATE creature_template SET ScriptName='npc_charged_sphere' WHERE entry=33715; +UPDATE creature_template SET ScriptName='boss_algalon' WHERE entry=32871; +UPDATE gameobject_template SET ScriptName='go_celestial_access' WHERE entry IN (194628,194752); DELETE FROM scripted_event_id WHERE id IN (9735,20964,21030,21031,21032,21033,21605,21606,21620); INSERT INTO scripted_event_id VALUES (9735, 'event_spell_saronite_barrier'), -- Vezax saronite barrier event diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index d91e83666..332634d82 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -3472,8 +3472,8 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1603104,'General Vezax roars and surges with dark might!',0,3,0,0,'vezax EMOTE_SURGE'), (-1603105,'The saronite vapors mass and swirl violently, merging into a monstrous form!',0,3,0,0,'vezax EMOTE_ANIMUS'), -(-1603106,'Trans-location complete. Commencing planetary analysis of Azeroth.',15405,1,0,0,'algalon SAY_INTRO_1'), -(-1603107,'Stand back, mortals. I am not here to fight you.',15406,1,0,0,'algalon SAY_INTRO_2'), +(-1603106,'Translocation complete. Commencing planetary analysis of Azeroth.',15405,1,0,0,'algalon SAY_INTRO_1'), +(-1603107,'Stand back, mortals. I\'m not here to fight you.',15406,1,0,0,'algalon SAY_INTRO_2'), (-1603108,'It is in the universe\'s best interest to re-originate this planet should my analysis find systemic corruption. Do not interfere.',15407,1,0,0,'algalon SAY_INTRO_3'), (-1603109,'See your world through my eyes. A universe so vast as to be immeasurable. Incomprehensible even to your greatest minds.',15390,1,0,0,'algalon SAY_ENGAGE'), @@ -3490,11 +3490,11 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1603119,'Begin uplink: Reply Code: \'Omega\'. Planetary re-origination requested.',15399,1,0,0,'algalon SAY_DESPAWN_2'), (-1603120,'Farewell, mortals. Your bravery is admirable, for such flawed creatures.',15400,1,0,0,'algalon SAY_DESPAWN_3'), -(-1603121,'I have seen worlds bathed in the Makers\' flames. Their denizens fading without so much as a whimper. Entire planetary systems born and raised in the time that it takes your mortal hearts to beat once. Yet all throughout, my own heart, devoid of emotion... of empathy. I... have... felt... NOTHING! A million, million lives wasted. Had they all held within them your tenacity? Had they all loved life as you do?',15393,1,0,0,'algalon SAY_OUTRO_1'), -(-1603122,'Perhaps it is your imperfection that which grants you free will. That allows you to persevere against cosmically calculated odds. You prevailed where the Titans\' own perfect creations have failed.',15401,1,0,0,'algalon SAY_OUTRO_2'), -(-1603123,'I\'ve rearranged the reply code. Your planet will be spared. I cannot be certain of my own calculations anymore.',15402,1,0,0,'algalon SAY_OUTRO_3'), -(-1603124,'I lack the strength to transmit this signal. You must hurry. Find a place of power, close to the skies.',15403,1,0,0,'algalon SAY_OUTRO_4'), -(-1603125,'Do not worry about my fate $n. If the signal is not transmitted in time re-origination will proceed regardless. Save. Your. World.',15404,1,0,0,'algalon SAY_OUTRO_5'), +(-1603121,'I have seen worlds bathed in the Makers\' flames, their denizens fading without as much as a whimper. Entire planetary systems born and razed in the time that it takes your mortal hearts to beat once. Yet all throughout, my own heart devoid of emotion... of empathy. I. Have. Felt. Nothing. A million-million lives wasted. Had they all held within them your tenacity? Had they all loved life as you do?',15393,1,0,0,'algalon SAY_OUTRO_1'), +(-1603122,'Perhaps it is your imperfections... that which grants you free will... that allows you to persevere against all cosmically calculated odds. You prevail where the Titan\'s own perfect creations have failed.',15401,1,0,0,'algalon SAY_OUTRO_2'), +(-1603123,'I\'ve rearranged the reply code - your planet will be spared. I cannot be certain of my own calculations anymore.',15402,1,0,0,'algalon SAY_OUTRO_3'), +(-1603124,'I lack the strength to transmit the signal. You must... hurry... find a place of power... close to the skies.',15403,1,0,0,'algalon SAY_OUTRO_4'), +(-1603125,'Do not worry about my fate, Bronzen. If the signal is not transmitted in time, re-origination will proceed regardless. Save... your world...',15404,1,0,0,'algalon SAY_OUTRO_5'), (-1603126,'None shall pass!',15586,1,0,0,'kologarn SAY_AGGRO'), (-1603127,'OBLIVION!',15591,1,0,0,'kologarn SAY_SHOCKWAVE'), @@ -3640,7 +3640,9 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1603242,'%s activates Hodir\'s Fury.',0,3,0,0,'leviathan EMOTE_HODIR_FURY'), (-1603243,'%s activates Freya\'s Ward.',0,3,0,0,'leviathan EMOTE_FREYA_WARD'), (-1603244,'%s activates Mimiron\'s Inferno.',0,3,0,0,'leviathan EMOTE_MIMIRON_INFERNO'), -(-1603245,'%s activates Thorim\'s Hammer.',0,3,0,0,'leviathan EMOTE_THORIM_HAMMER'); +(-1603245,'%s activates Thorim\'s Hammer.',0,3,0,0,'leviathan EMOTE_THORIM_HAMMER'), + +(-1603246,'I know just the place. Will you be all right?',15823,1,0,0,'brann SAY_BRANN_OUTRO'); -- -1 604 000 GUNDRAK INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES diff --git a/sql/updates/r2946_mangos.sql b/sql/updates/r2946_mangos.sql new file mode 100644 index 000000000..326a4ffa8 --- /dev/null +++ b/sql/updates/r2946_mangos.sql @@ -0,0 +1,2 @@ +UPDATE creature_template SET ScriptName='boss_algalon' WHERE entry=32871; +UPDATE gameobject_template SET ScriptName='go_celestial_access' WHERE entry IN (194628,194752); diff --git a/sql/updates/r2946_scriptdev2.sql b/sql/updates/r2946_scriptdev2.sql new file mode 100644 index 000000000..2025d429c --- /dev/null +++ b/sql/updates/r2946_scriptdev2.sql @@ -0,0 +1,10 @@ +DELETE FROM script_texts WHERE entry IN (-1603106,-1603107,-1603121,-1603122,-1603123,-1603124,-1603125,-1603246); +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1603106,'Translocation complete. Commencing planetary analysis of Azeroth.',15405,1,0,0,'algalon SAY_INTRO_1'), +(-1603107,'Stand back, mortals. I\'m not here to fight you.',15406,1,0,0,'algalon SAY_INTRO_2'), +(-1603121,'I have seen worlds bathed in the Makers\' flames, their denizens fading without as much as a whimper. Entire planetary systems born and razed in the time that it takes your mortal hearts to beat once. Yet all throughout, my own heart devoid of emotion... of empathy. I. Have. Felt. Nothing. A million-million lives wasted. Had they all held within them your tenacity? Had they all loved life as you do?',15393,1,0,0,'algalon SAY_OUTRO_1'), +(-1603122,'Perhaps it is your imperfections... that which grants you free will... that allows you to persevere against all cosmically calculated odds. You prevail where the Titan\'s own perfect creations have failed.',15401,1,0,0,'algalon SAY_OUTRO_2'), +(-1603123,'I\'ve rearranged the reply code - your planet will be spared. I cannot be certain of my own calculations anymore.',15402,1,0,0,'algalon SAY_OUTRO_3'), +(-1603124,'I lack the strength to transmit the signal. You must... hurry... find a place of power... close to the skies.',15403,1,0,0,'algalon SAY_OUTRO_4'), +(-1603125,'Do not worry about my fate, Bronzen. If the signal is not transmitted in time, re-origination will proceed regardless. Save... your world...',15404,1,0,0,'algalon SAY_OUTRO_5'), +(-1603246,'I know just the place. Will you be all right?',15823,1,0,0,'brann SAY_BRANN_OUTRO'); From 6f6b3cfb9d98245f42642a06baa5d6c570095bbd Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sat, 28 Sep 2013 14:54:52 +0300 Subject: [PATCH 0957/1172] [2947] Implement combat abilities for Algalon the Observer Related achievements are not yet implemented --- .../northrend/ulduar/ulduar/boss_algalon.cpp | 508 ++++++++++++++++-- .../ulduar/ulduar/instance_ulduar.cpp | 9 +- scripts/northrend/ulduar/ulduar/ulduar.h | 5 +- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 4 + sql/updates/r2947_mangos.sql | 4 + 6 files changed, 494 insertions(+), 38 deletions(-) create mode 100644 sql/updates/r2947_mangos.sql diff --git a/scripts/northrend/ulduar/ulduar/boss_algalon.cpp b/scripts/northrend/ulduar/ulduar/boss_algalon.cpp index 2c758f2d8..2a0730f2f 100644 --- a/scripts/northrend/ulduar/ulduar/boss_algalon.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_algalon.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: boss_algalon -SD%Complete: 20% -SDComment: Basic script only. +SD%Complete: 85% +SDComment: Achievements NYI; Some details might need some fine tunning. SDCategory: Ulduar EndScriptData */ @@ -71,40 +71,63 @@ enum SPELL_QUANTUM_STRIKE_H = 64592, SPELL_PHASE_PUNCH = 64412, SPELL_PHASE_PUNCH_SHIFT = 64417, - SPELL_COSMIC_SMASH = 62301, // triggers the spells which summon 33104 and 33105 - SPELL_COSMIC_SMASH_H = 64598, + SPELL_COSMIC_SMASH_SUMMON = 62301, // triggers the spells which summon 33104 and 33105 + SPELL_COSMIC_SMASH_SUMMON_H = 64598, SPELL_BIG_BANG = 64443, // removes players from phase SPELL_BIG_BANG_H = 64584, - // summoned spells - SPELL_CONSTELATION_PHASE = 65508, // shift phase - use unk - SPELL_BLACK_HOLE_CREDIT = 65312, - SPELL_COSMIC_SMASH_MISSILE = 62304, // cast by Algalon asteroid target - 33105 - SPELL_CONSTELLATION_TRIGGER = 65508, - SPELL_COLLAPSE = 62018, // cast by Collapsing stars - SPELL_BLACK_HOLE_EXPLOSION = 64122, + // cosmic smash spells + SPELL_COSMIC_SMASH_STATE = 62300, // visual spell; cast by 33104 + // SPELL_COSMIC_SMASH = 62304, // damage spells; cast by 33105 after 5 secs from spawn + // SPELL_COSMIC_SMASH_H = 64597, + + // collapsing star spells + SPELL_COLLAPSE = 62018, // cast by npc 32955 + SPELL_BLACK_HOLE_EXPLOSION = 64122, // cast on death SPELL_BLACK_HOLE_EXPLOSION_H = 65108, - SPELL_BLACK_HOLE_DESPAWN = 64391, - SPELL_SUMMON_BLACK_HOLE = 62189, - SPELL_BLACK_HOLE_VISUAL = 64135, - SPELL_BLACK_HOLE_SPAWN = 62003, - SPELL_BLACK_HOLE_TRIGG = 62185, - SPELL_BLACK_HOLE_DMG = 62169, + SPELL_SUMMON_BLACK_HOLE = 62189, // summon npc 32953; cast on death + + // black hole spells + SPELL_BLACK_HOLE_SPAWN_VISUAL = 62003, // spawn visual spell + SPELL_BLACK_HOLE_STATE = 64135, // visual spell + SPELL_BLACK_HOLE_TRIGG = 62185, // apply aoe phase aura + SPELL_BLACK_HOLE_PHASE = 62168, + SPELL_BLACK_HOLE_DMG = 62169, // damage aura applied to players in phase realm + SPELL_BLACK_HOLE_CREDIT = 65312, // dummy aoe spell; related to the Supermassive achievements + SPELL_BLACK_HOLE_DESPAWN = 64391, // purpose unk + + // living constellation spells + // SPELL_CONSTELATION_PHASE = 65508, // shift phase - use unk SPELL_ARCANE_BARRAGE = 64599, SPELL_ARCANE_BARRAGE_H = 64607, + // worm hole spells + SPELL_WORM_HOLE_TRIGGER = 65251, // apply aoe phase aura + SPELL_WORM_HOLE_PHASE = 65250, + SPELL_SUMMON_UNLEASHED_DARK_MATTER = 64450, // summon npc 34097 + SPELL_SUMMON_VOID_ZONE_VISUAL = 64470, // summon npc 34100 + + // void zone visual + SPELL_VOID_ZONE_VISUAL = 64469, + // npcs NPC_AZEROTH = 34246, NPC_ASTEROID_STALKER_1 = 33104, - NPC_ASTEROID_STALKER_2 = 33105, - NPC_LIVING_CONSTELLATION = 33052, + // NPC_ASTEROID_STALKER_2 = 33105, // cast 62304 : 64597 on timer; handled in eventAI NPC_COLLAPSING_STAR = 32955, - NPC_DARK_MATTER = 33089, - NPC_UNLEASHED_DARK_MATTER = 34097, NPC_BLACK_HOLE = 32953, + NPC_VOID_ZONE_VISUAL = 34100, + NPC_LIVING_CONSTELLATION = 33052, + // NPC_DARK_MATTER = 33089, // found in phaseMask 16 + NPC_WORM_HOLE = 34099, // spawned when below 20% hp + NPC_UNLEASHED_DARK_MATTER = 34097, // other FACTION_ID_FRIENDLY = 35, + MAX_CONSTELATIONS = 11, + MAX_ACTIVE_CONSTELATIONS = 3, + MAX_BLACK_HOLES = 4, + MAX_WORM_HOLES = 4, }; static const DialogueEntry aAlgalonDialogue[] = @@ -113,7 +136,7 @@ static const DialogueEntry aAlgalonDialogue[] = {SPELL_SUMMON_AZEROTH, 0, 5000}, {SAY_INTRO_2, NPC_ALGALON, 8000}, {SAY_INTRO_3, NPC_ALGALON, 0}, - {SAY_AGGRO, NPC_ALGALON, 16000}, + {SAY_AGGRO, NPC_ALGALON, 14000}, {SAY_ENGAGE, NPC_ALGALON, 0}, {SPELL_ASCEND_HEAVENS, 0, 3000}, {SPELL_BERSERK, 0, 0}, @@ -131,6 +154,29 @@ static const DialogueEntry aAlgalonDialogue[] = {0, 0, 0}, }; +static const float afWormHoles[MAX_WORM_HOLES][3] = +{ + {1649.364f, -328.4229f, 417.4044f}, + {1615.728f, -320.9379f, 417.4044f}, + {1618.209f, -292.0328f, 417.4044f}, + {1646.932f, -296.028f, 417.4044f}, +}; + +static const float afConstellations[MAX_CONSTELATIONS][4] = +{ + {1678.677f, -276.328f, 427.7531f, 3.97f}, + {1685.613f, -300.1219f, 443.2366f, 3.38f}, + {1668.317f, -324.7676f, 457.9394f, 3.21f}, + {1635.821f, -363.3442f, 424.3459f, 1.46f}, + {1672.188f, -357.2484f, 436.7337f, 2.33f}, + {1593.389f, -299.4325f, 432.4636f, 6.07f}, + {1591.706f, -263.8201f, 441.4153f, 5.25f}, + {1658.279f, -262.549f, 441.9073f, 4.18f}, + {1592.242f, -325.5323f, 446.9508f, 0.22f}, + {1625.208f, -267.2771f, 446.4296f, 5.04f}, + {1615.8f, -348.0065f, 442.9586f, 1.13f}, +}; + /*###### ## boss_algalon ######*/ @@ -155,12 +201,35 @@ struct MANGOS_DLL_DECL boss_algalonAI : public ScriptedAI, private DialogueHelpe bool m_bIsRegularMode; bool m_bEventFinished; + bool m_bIsLowHealth; uint32 m_uiBerserkTimer; + uint8 m_uiActiveConstelations; + uint8 m_uiActiveStars; + + uint32 m_uiBigBangTimer; + uint32 m_uiCosmicSmashTimer; + uint32 m_uiPhasePunchTimer; + uint32 m_uiQuantumStrikeTimer; + uint32 m_uiCollapsingStarTimer; + uint32 m_uiConstellationTimer; + + GuidList m_lSummonedGuids; + GuidList m_lConstellationsGuids; void Reset() override { - m_uiBerserkTimer = 6 * MINUTE * IN_MILLISECONDS; + m_uiBerserkTimer = 6 * MINUTE * IN_MILLISECONDS; + m_bIsLowHealth = false; + m_uiActiveConstelations = 0; + m_uiActiveStars = 0; + + m_uiQuantumStrikeTimer = 4000; + m_uiCollapsingStarTimer = 20000; + m_uiConstellationTimer = 60000; + m_uiBigBangTimer = 90000; + m_uiPhasePunchTimer = 15000; + m_uiCosmicSmashTimer = 30000; } void KilledUnit(Unit* pVictim) override @@ -174,8 +243,19 @@ struct MANGOS_DLL_DECL boss_algalonAI : public ScriptedAI, private DialogueHelpe void Aggro(Unit* pWho) override { if (m_pInstance) + { + // start the counter at the first aggro + if (m_pInstance->GetData(TYPE_ALGALON) == SPECIAL) + { + m_pInstance->DoUpdateWorldState(WORLD_STATE_TIMER, 1); + m_pInstance->SetData(TYPE_ALGALON_TIMER, 60); + } + m_pInstance->SetData(TYPE_ALGALON, IN_PROGRESS); + } + DoCastSpellIfCan(m_creature, SPELL_SUPERMASSIVE_FAIL, CAST_TRIGGERED); + // Note: it's not clear wether these texts should be yelled on every aggro StartNextDialogueText(SAY_AGGRO); } @@ -190,9 +270,6 @@ struct MANGOS_DLL_DECL boss_algalonAI : public ScriptedAI, private DialogueHelpe if (m_pInstance) m_pInstance->SetData(TYPE_ALGALON, DONE); - DoCastSpellIfCan(m_creature, SPELL_KILL_CREDIT, CAST_TRIGGERED | CAST_INTERRUPT_PREVIOUS); - DoCastSpellIfCan(m_creature, SPELL_SUPERMASSIVE_FAIL, CAST_TRIGGERED | CAST_INTERRUPT_PREVIOUS); - m_creature->setFaction(FACTION_ID_FRIENDLY); m_bEventFinished = true; EnterEvadeMode(); @@ -208,12 +285,24 @@ struct MANGOS_DLL_DECL boss_algalonAI : public ScriptedAI, private DialogueHelpe if (m_bEventFinished) { if (m_pInstance->GetData(TYPE_ALGALON) == DONE) + { + // complete the achiev and start outro dialogue + DoCastSpellIfCan(m_creature, SPELL_KILL_CREDIT, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_SUPERMASSIVE_FAIL, CAST_TRIGGERED); StartNextDialogueText(NPC_ALGALON); + } else StartNextDialogueText(SAY_DESPAWN_1); } else m_pInstance->SetData(TYPE_ALGALON, FAIL); + + // despawn everything + for (GuidList::const_iterator itr = m_lSummonedGuids.begin(); itr != m_lSummonedGuids.end(); ++itr) + { + if (Creature* pSummoned = m_creature->GetMap()->GetCreature(*itr)) + pSummoned->ForcedDespawn(); + } } void JustSummoned(Creature* pSummoned) override @@ -228,6 +317,49 @@ struct MANGOS_DLL_DECL boss_algalonAI : public ScriptedAI, private DialogueHelpe case NPC_AZEROTH: pSummoned->ForcedDespawn(30000); break; + case NPC_ASTEROID_STALKER_1: + // visual impact point for Cosmic Smash + pSummoned->CastSpell(pSummoned, SPELL_COSMIC_SMASH_STATE, true); + break; + case NPC_COLLAPSING_STAR: + // cast Collapse and move around spawn point + pSummoned->CastSpell(pSummoned, SPELL_COLLAPSE, true); + pSummoned->GetMotionMaster()->MoveRandomAroundPoint(pSummoned->GetPositionX(), pSummoned->GetPositionY(), pSummoned->GetPositionZ(), 30.0f); + ++m_uiActiveStars; + m_lSummonedGuids.push_back(pSummoned->GetObjectGuid()); + break; + case NPC_LIVING_CONSTELLATION: + m_lConstellationsGuids.push_back(pSummoned->GetObjectGuid()); + m_lSummonedGuids.push_back(pSummoned->GetObjectGuid()); + break; + case NPC_BLACK_HOLE: + // cast Black Hole visuals + pSummoned->CastSpell(pSummoned, SPELL_BLACK_HOLE_SPAWN_VISUAL, true); + pSummoned->CastSpell(pSummoned, SPELL_BLACK_HOLE_STATE, true); + pSummoned->CastSpell(pSummoned, SPELL_BLACK_HOLE_TRIGG, true); + pSummoned->CastSpell(pSummoned, SPELL_SUMMON_VOID_ZONE_VISUAL, true, NULL, NULL, m_creature->GetObjectGuid()); + m_lSummonedGuids.push_back(pSummoned->GetObjectGuid()); + break; + case NPC_WORM_HOLE: + pSummoned->CastSpell(pSummoned, SPELL_WORM_HOLE_TRIGGER, true); + pSummoned->CastSpell(pSummoned, SPELL_SUMMON_VOID_ZONE_VISUAL, true, NULL, NULL, m_creature->GetObjectGuid()); + m_lSummonedGuids.push_back(pSummoned->GetObjectGuid()); + break; + case NPC_VOID_ZONE_VISUAL: + pSummoned->CastSpell(pSummoned, SPELL_VOID_ZONE_VISUAL, true); + m_lSummonedGuids.push_back(pSummoned->GetObjectGuid()); + break; + } + } + + void SummonedCreatureJustDied(Creature* pSummoned) override + { + if (pSummoned->GetEntry() == NPC_COLLAPSING_STAR) + { + pSummoned->CastSpell(pSummoned, m_bIsRegularMode ? SPELL_BLACK_HOLE_EXPLOSION : SPELL_BLACK_HOLE_EXPLOSION_H, true); + pSummoned->CastSpell(pSummoned, SPELL_SUMMON_BLACK_HOLE, true, NULL, NULL, m_creature->GetObjectGuid()); + --m_uiActiveStars; + // Note: there should be some emote here informing the players how many Black Holes are spawned } } @@ -257,16 +389,19 @@ struct MANGOS_DLL_DECL boss_algalonAI : public ScriptedAI, private DialogueHelpe DoCastSpellIfCan(m_creature, SPELL_REORIGINATION); break; case SAY_ENGAGE: - // ToDo: change environment + // summon Living Constellations at this point + DoSpawnConstellations(); break; case SPELL_BERSERK: EnterEvadeMode(); break; case SPELL_TELEPORT: + // despawn when time has run out DoCastSpellIfCan(m_creature, SPELL_TELEPORT, CAST_TRIGGERED); m_creature->ForcedDespawn(2000); break; case NPC_ALGALON: + // spawn Brann for epilogue dialogue m_creature->SummonCreature(NPC_BRANN_ALGALON, 1631.962f, -208.6464f, 420.8867f, 4.71f, TEMPSUMMON_DEAD_DESPAWN, 0); break; case SAY_OUTRO_1: @@ -294,13 +429,49 @@ struct MANGOS_DLL_DECL boss_algalonAI : public ScriptedAI, private DialogueHelpe DoCastSpellIfCan(m_creature, SPELL_ARRIVAL, CAST_TRIGGERED); DoCastSpellIfCan(m_creature, SPELL_RIDE_LIGHTNING, CAST_TRIGGERED); m_creature->GetMotionMaster()->MovePoint(1, afAlgalonMovePos[0], afAlgalonMovePos[1], afAlgalonMovePos[2]); + } - // start timer event - if (m_pInstance) + // function which summons constellations + void DoSpawnConstellations() + { + for (uint8 i = 0; i < MAX_CONSTELATIONS; ++i) + m_creature->SummonCreature(NPC_LIVING_CONSTELLATION, afConstellations[i][0], afConstellations[i][1], afConstellations[i][2], afConstellations[i][3], TEMPSUMMON_DEAD_DESPAWN, 0); + } + + // Activate a random Constellation + void ActivateRandomConstellation() + { + // spawn a new set of constellations if empty + if (m_lConstellationsGuids.empty()) + { + DoSpawnConstellations(); + m_uiConstellationTimer = 5000; + return; + } + + GuidList::iterator iter = m_lConstellationsGuids.begin(); + advance(iter, urand(0, m_lConstellationsGuids.size() - 1)); + + if (Creature* pConstellation = m_creature->GetMap()->GetCreature(*iter)) { - m_pInstance->DoUpdateWorldState(WORLD_STATE_TIMER, 1); - m_pInstance->SetData(TYPE_ALGALON_TIMER, 60); + // follow second top aggro player + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1, uint32(0), SELECT_FLAG_PLAYER)) + { + pConstellation->GetMotionMaster()->MoveFollow(pTarget, CONTACT_DISTANCE, 0); + SendAIEvent(AI_EVENT_CUSTOM_A, m_creature, pConstellation); + ++m_uiActiveConstelations; + } } + + m_lConstellationsGuids.remove(*iter); + } + + // spawn a collapsing star + void DoSpawnCollapsingStar() + { + float fX, fY, fZ; + m_creature->GetRandomPoint(afAlgalonMovePos[0], afAlgalonMovePos[1], afAlgalonMovePos[2], 30.0f, fX, fY, fZ); + m_creature->SummonCreature(NPC_COLLAPSING_STAR, fX, fY, fZ, 0, TEMPSUMMON_DEAD_DESPAWN, 0); } void UpdateAI(const uint32 uiDiff) override @@ -314,7 +485,8 @@ struct MANGOS_DLL_DECL boss_algalonAI : public ScriptedAI, private DialogueHelpe { if (m_uiBerserkTimer <= uiDiff) { - if (DoCastSpellIfCan(m_creature, SPELL_BERSERK) == CAST_OK) + // it's unclear wether it casts Berserk or Ascend to Heavens + if (DoCastSpellIfCan(m_creature, SPELL_ASCEND_HEAVENS, CAST_INTERRUPT_PREVIOUS) == CAST_OK) { DoScriptText(SAY_BERSERK, m_creature); m_uiBerserkTimer = 0; @@ -324,6 +496,95 @@ struct MANGOS_DLL_DECL boss_algalonAI : public ScriptedAI, private DialogueHelpe m_uiBerserkTimer -= uiDiff; } + if (m_uiQuantumStrikeTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), m_bIsRegularMode ? SPELL_QUANTUM_STRIKE : SPELL_QUANTUM_STRIKE_H) == CAST_OK) + m_uiQuantumStrikeTimer = 4000; + } + else + m_uiQuantumStrikeTimer -= uiDiff; + + if (m_uiBigBangTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_BIG_BANG : SPELL_BIG_BANG_H) == CAST_OK) + m_uiBigBangTimer = 90000; + } + else + m_uiBigBangTimer -= uiDiff; + + if (m_uiCosmicSmashTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_COSMIC_SMASH_SUMMON : SPELL_COSMIC_SMASH_SUMMON_H) == CAST_OK) + m_uiCosmicSmashTimer = urand(40000, 50000); + } + else + m_uiCosmicSmashTimer -= uiDiff; + + if (m_uiPhasePunchTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_PHASE_PUNCH) == CAST_OK) + m_uiPhasePunchTimer = 15000; + } + else + m_uiPhasePunchTimer -= uiDiff; + + // summons are happening only above 20% hp + if (!m_bIsLowHealth) + { + if (m_uiCollapsingStarTimer < uiDiff) + { + // spawn as many stars as it's needed to a max of 4 + uint8 uiMaxStars = MAX_BLACK_HOLES - m_uiActiveStars; + if (uiMaxStars) + { + for (uint8 i = 0; i < uiMaxStars; ++i) + DoSpawnCollapsingStar(); + + DoScriptText(SAY_SUMMON_STAR, m_creature); + m_uiCollapsingStarTimer = 60000; + } + else + m_uiCollapsingStarTimer = 10000; + } + else + m_uiCollapsingStarTimer -= uiDiff; + + if (m_uiConstellationTimer < uiDiff) + { + // activate as many constelations as it's needed to a max of 3 + uint8 uiMaxConstellations = MAX_ACTIVE_CONSTELATIONS - m_uiActiveConstelations; + if (uiMaxConstellations) + { + m_uiConstellationTimer = 50000; + + for (uint8 i = 0; i < uiMaxConstellations; ++i) + ActivateRandomConstellation(); + } + else + m_uiConstellationTimer = 10000; + } + else + m_uiConstellationTimer -= uiDiff; + } + + // switch to second phase + if (!m_bIsLowHealth && m_creature->GetHealthPercent() < 20.0f) + { + DoScriptText(SAY_PHASE_2, m_creature); + m_bIsLowHealth = true; + + // despawn all remaining blackholes and collapsing stars + for (GuidList::const_iterator itr = m_lSummonedGuids.begin(); itr != m_lSummonedGuids.end(); ++itr) + { + if (Creature* pBlackHole = m_creature->GetMap()->GetCreature(*itr)) + pBlackHole->ForcedDespawn(); + } + + // spawn new worm holes + for (uint8 i = 0; i < MAX_WORM_HOLES; ++i) + m_creature->SummonCreature(NPC_WORM_HOLE, afWormHoles[i][0], afWormHoles[i][1], afWormHoles[i][2], 0, TEMPSUMMON_DEAD_DESPAWN, 0); + } + DoMeleeAttackIfReady(); } }; @@ -333,6 +594,169 @@ CreatureAI* GetAI_boss_algalon(Creature* pCreature) return new boss_algalonAI(pCreature); } +/*###### +## npc_living_constellation +######*/ + +struct MANGOS_DLL_DECL npc_living_constellationAI : public ScriptedAI +{ + npc_living_constellationAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); + Reset(); + } + + bool m_bIsRegularMode; + uint32 m_uiArcaneBarrageTimer; + + void Reset() override + { + m_uiArcaneBarrageTimer = 0; + } + + void AttackStart(Unit* /*pWho*/) override { } + void MoveInLineOfSight(Unit* /*pWho*/) override { } + + void ReceiveAIEvent(AIEventType eventType, Creature* /*pSender*/, Unit* pInvoker, uint32 /*uiMiscValue*/) override + { + // start casting Arcane Barrage + if (eventType == AI_EVENT_CUSTOM_A) + m_uiArcaneBarrageTimer = urand(5000, 7000); + } + + void UpdateAI(const uint32 uiDiff) override + { + if (m_uiArcaneBarrageTimer) + { + if (m_uiArcaneBarrageTimer <= uiDiff) + { + if (DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_ARCANE_BARRAGE : SPELL_ARCANE_BARRAGE_H) == CAST_OK) + m_uiArcaneBarrageTimer = urand(5000, 7000); + } + else + m_uiArcaneBarrageTimer -= uiDiff; + } + } +}; + +CreatureAI* GetAI_npc_living_constellation(Creature* pCreature) +{ + return new npc_living_constellationAI(pCreature); +} + +/*###### +## npc_worm_hole +######*/ + +struct MANGOS_DLL_DECL npc_worm_holeAI : public Scripted_NoMovementAI +{ + npc_worm_holeAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { Reset(); } + + uint32 m_uiDarkMatterTimer; + + void Reset() override + { + m_uiDarkMatterTimer = urand(1000, 3000); + } + + void AttackStart(Unit* /*pWho*/) override { } + void MoveInLineOfSight(Unit* /*pWho*/) override { } + + void JustSummoned(Creature* pSummoned) override + { + if (pSummoned->GetEntry() == NPC_UNLEASHED_DARK_MATTER) + pSummoned->SetInCombatWithZone(); + } + + void SpellHitTarget(Unit* pTarget, SpellEntry const* pSpellEntry) override + { + if (pTarget->GetTypeId() == TYPEID_PLAYER && pSpellEntry->Id == SPELL_WORM_HOLE_PHASE) + pTarget->CastSpell(pTarget, SPELL_BLACK_HOLE_DMG, true, NULL, NULL, m_creature->GetObjectGuid()); + } + + void UpdateAI(const uint32 uiDiff) override + { + if (m_uiDarkMatterTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_SUMMON_UNLEASHED_DARK_MATTER) == CAST_OK) + m_uiDarkMatterTimer = urand(10000, 15000); + } + else + m_uiDarkMatterTimer -= uiDiff; + } +}; + +CreatureAI* GetAI_npc_worm_hole(Creature* pCreature) +{ + return new npc_worm_holeAI(pCreature); +} + +/*###### +## npc_black_hole +######*/ + +struct MANGOS_DLL_DECL npc_black_holeAI : public Scripted_NoMovementAI +{ + npc_black_holeAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { Reset(); } + + bool m_bIsDespawned; + + void Reset() override + { + m_bIsDespawned = false; + } + + void MoveInLineOfSight(Unit* pWho) override + { + // despawn when a Living Constellation is nearby + if (!m_bIsDespawned && pWho->GetEntry() == NPC_LIVING_CONSTELLATION && pWho->IsWithinDistInMap(m_creature, 6.0f)) + { + DoCastSpellIfCan(m_creature, SPELL_BLACK_HOLE_CREDIT, CAST_TRIGGERED); + pWho->CastSpell(m_creature, SPELL_BLACK_HOLE_DESPAWN, true); + m_bIsDespawned = true; + + // despawn everything + ((Creature*)pWho)->ForcedDespawn(1000); + m_creature->ForcedDespawn(1000); + if (Creature* pVoidZone = GetClosestCreatureWithEntry(m_creature, NPC_VOID_ZONE_VISUAL, 5.0f)) + pVoidZone->ForcedDespawn(1000); + } + } + + void SpellHitTarget(Unit* pTarget, SpellEntry const* pSpellEntry) override + { + if (pTarget->GetTypeId() == TYPEID_PLAYER && pSpellEntry->Id == SPELL_BLACK_HOLE_PHASE) + pTarget->CastSpell(pTarget, SPELL_BLACK_HOLE_DMG, true, NULL, NULL, m_creature->GetObjectGuid()); + } + + void AttackStart(Unit* /*pWho*/) override { } + void UpdateAI(const uint32 /*uiDiff*/) override { } +}; + +CreatureAI* GetAI_npc_black_hole(Creature* pCreature) +{ + return new npc_black_holeAI(pCreature); +} + +/*###### +## npc_collapsing_star +######*/ + +struct MANGOS_DLL_DECL npc_collapsing_starAI : public ScriptedAI +{ + npc_collapsing_starAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } + + void Reset() override { } + void AttackStart(Unit* /*pWho*/) override { } + void MoveInLineOfSight(Unit* /*pWho*/) override { } + void UpdateAI(const uint32 /*uiDiff*/) override { } +}; + +CreatureAI* GetAI_npc_collapsing_star(Creature* pCreature) +{ + return new npc_collapsing_starAI(pCreature); +} + /*###### ## go_celestial_access ######*/ @@ -360,6 +784,26 @@ void AddSC_boss_algalon() pNewScript->GetAI = GetAI_boss_algalon; pNewScript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "npc_living_constellation"; + pNewScript->GetAI = GetAI_npc_living_constellation; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_worm_hole"; + pNewScript->GetAI = GetAI_npc_worm_hole; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_black_hole"; + pNewScript->GetAI = GetAI_npc_black_hole; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_collapsing_star"; + pNewScript->GetAI = GetAI_npc_collapsing_star; + pNewScript->RegisterSelf(); + pNewScript = new Script; pNewScript->Name = "go_celestial_access"; pNewScript->pGOUse = &GOUse_go_celestial_access; diff --git a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp index c21053e3c..ba3dd0ee1 100644 --- a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp +++ b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp @@ -270,7 +270,8 @@ void instance_ulduar::OnObjectCreate(GameObject* pGo) pGo->SetGoState(GO_STATE_ACTIVE); break; case GO_CELESTIAL_DOOR_COMBAT: - case GO_UNIVERSE_FLOOR_CELESTIAL: + case GO_UNIVERSE_FLOOR: + case GO_UNIVERSE_FLOOR_COMBAT: case GO_AZEROTH_GLOBE: break; // Shattered Hallway @@ -529,7 +530,6 @@ void instance_ulduar::SetData(uint32 uiType, uint32 uiData) m_auiEncounter[uiType] = uiData; if (uiData == DONE) { - DoToggleGameObjectFlags(instance->IsRegularDifficulty() ? GO_CACHE_OF_LIVING_STONE_10 : GO_CACHE_OF_LIVING_STONE_25, GO_FLAG_NO_INTERACT, false); DoRespawnGameObject(instance->IsRegularDifficulty() ? GO_CACHE_OF_LIVING_STONE_10 : GO_CACHE_OF_LIVING_STONE_25, 30 * MINUTE); DoUseDoorOrButton(GO_KOLOGARN_BRIDGE); } @@ -606,7 +606,10 @@ void instance_ulduar::SetData(uint32 uiType, uint32 uiData) m_auiEncounter[uiType] = uiData; if (uiData != SPECIAL) { - DoUseDoorOrButton(GO_UNIVERSE_FLOOR_CELESTIAL); + // environment gameobjects + DoUseDoorOrButton(GO_AZEROTH_GLOBE); + DoUseDoorOrButton(GO_UNIVERSE_FLOOR); + DoUseDoorOrButton(GO_UNIVERSE_FLOOR_COMBAT); DoUseDoorOrButton(GO_CELESTIAL_DOOR_COMBAT); } if (uiData == DONE) diff --git a/scripts/northrend/ulduar/ulduar/ulduar.h b/scripts/northrend/ulduar/ulduar/ulduar.h index b75e59b50..7a2425e0b 100644 --- a/scripts/northrend/ulduar/ulduar/ulduar.h +++ b/scripts/northrend/ulduar/ulduar/ulduar.h @@ -197,7 +197,7 @@ enum GO_LEVIATHAN_GATE = 194630, // Gate after Leviathan -> this will be broken when the boss enters the arena GO_XT002_GATE = 194631, // Gate before Xt002 GO_BROKEN_HARPOON = 194565, // Broken harpoon from Razorscale - GO_HARPOON_GUN_1 = 194542, // usable harpoonS - respawn when the broken one is repaired + GO_HARPOON_GUN_1 = 194542, // usable harpoons - respawn when the broken one is repaired GO_HARPOON_GUN_2 = 194541, GO_HARPOON_GUN_3 = 194543, GO_HARPOON_GUN_4 = 194519, @@ -220,7 +220,8 @@ enum GO_CELESTIAL_DOOR_1 = 194767, // Entrance doors to the planetarium GO_CELESTIAL_DOOR_2 = 194911, GO_CELESTIAL_DOOR_COMBAT = 194910, - GO_UNIVERSE_FLOOR_CELESTIAL = 194716, // For animation + GO_UNIVERSE_FLOOR = 194716, // For animation + GO_UNIVERSE_FLOOR_COMBAT = 194715, GO_AZEROTH_GLOBE = 194148, // For animation // The keepers diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 2ab6b687f..1d0ed74fd 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2946" + #define SD2_REVISION_NR "2947" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index ea1c27bec..760ec6cec 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -1294,6 +1294,10 @@ UPDATE creature_template SET ScriptName='npc_rubble_stalker' WHERE entry=33809; UPDATE creature_template SET ScriptName='npc_storm_tempered_keeper' WHERE entry IN (33699,33722); UPDATE creature_template SET ScriptName='npc_charged_sphere' WHERE entry=33715; UPDATE creature_template SET ScriptName='boss_algalon' WHERE entry=32871; +UPDATE creature_template SET ScriptName='npc_living_constellation' WHERE entry=33052; +UPDATE creature_template SET ScriptName='npc_worm_hole' WHERE entry=34099; +UPDATE creature_template SET ScriptName='npc_black_hole' WHERE entry=32953; +UPDATE creature_template SET ScriptName='npc_collapsing_star' WHERE entry=32955; UPDATE gameobject_template SET ScriptName='go_celestial_access' WHERE entry IN (194628,194752); DELETE FROM scripted_event_id WHERE id IN (9735,20964,21030,21031,21032,21033,21605,21606,21620); INSERT INTO scripted_event_id VALUES diff --git a/sql/updates/r2947_mangos.sql b/sql/updates/r2947_mangos.sql new file mode 100644 index 000000000..9078db728 --- /dev/null +++ b/sql/updates/r2947_mangos.sql @@ -0,0 +1,4 @@ +UPDATE creature_template SET ScriptName='npc_living_constellation' WHERE entry=33052; +UPDATE creature_template SET ScriptName='npc_worm_hole' WHERE entry=34099; +UPDATE creature_template SET ScriptName='npc_black_hole' WHERE entry=32953; +UPDATE creature_template SET ScriptName='npc_collapsing_star' WHERE entry=32955; From 4b83a031b882d9913dd7634557c60eb04656512d Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sun, 29 Sep 2013 00:12:07 +0300 Subject: [PATCH 0958/1172] [2948] Implement basic script for Hodir --- .../northrend/ulduar/ulduar/boss_hodir.cpp | 178 +++++++++++++++++- .../ulduar/ulduar/boss_yogg_saron.cpp | 2 + .../ulduar/ulduar/instance_ulduar.cpp | 9 +- scripts/northrend/ulduar/ulduar/ulduar.h | 8 + sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 + sql/updates/r2948_mangos.sql | 1 + 7 files changed, 192 insertions(+), 9 deletions(-) create mode 100644 sql/updates/r2948_mangos.sql diff --git a/scripts/northrend/ulduar/ulduar/boss_hodir.cpp b/scripts/northrend/ulduar/ulduar/boss_hodir.cpp index 2c25a41dd..49a049c9c 100644 --- a/scripts/northrend/ulduar/ulduar/boss_hodir.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_hodir.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: boss_hodir -SD%Complete: 0% -SDComment: +SD%Complete: 20% +SDComment: Basic script SDCategory: Ulduar EndScriptData */ @@ -31,15 +31,185 @@ enum SAY_SLAY_2 = -1603088, SAY_FLASH_FREEZE = -1603089, SAY_FROZEN_BLOWS = -1603090, - SAY_DEATH = -1603091, + SAY_EPILOGUE = -1603091, SAY_BERSERK = -1603092, - SAY_HELP_YOGG = -1603093, EMOTE_FLASH_FREEZE = -1603094, EMOTE_FROZEN_BLOWS = -1603095, + + // spells + SPELL_BERSERK = 26662, + SPELL_HODIR_CREDIT = 64899, // kill credit spell; added in spell_template + SPELL_SHATTER_CHEST = 65272, // hard mode timer until chest is shattered; triggers 62501 + SPELL_FROZEN_BLOWS = 62478, + SPELL_FROZEN_BLOWS_H = 63512, + SPELL_FREEZE = 62469, + SPELL_BITTING_COLD = 62038, // triggers 62039 and 62188 + SPELL_ICICLE_AURA = 62227, // periodic targeting aura; triggers the spell which summons npc 33169 + SPELL_ICICLE_SNOWPACK = 62476, // cast right before Flash Freeze; triggers the spell which summons npc 33173 + SPELL_ICICLE_SNOWPACK_H = 62477, + SPELL_FLASH_FREEZE = 61968, // main spell; sends event 20896 + + // icicle spells + SPELL_ICICLE = 62236, + SPELL_ICICLE_DUMMY = 62453, + + // snowpacked icicle spells + SPELL_ICICLE_ICE_SHARDS = 62460, // triggers the spell which summons npc 33174 and go 194173 + + // snowpacked icicle target spells + SPELL_SAFE_AREA = 65705, // grant immunity from flash freeze + + // flash freeze related spells + SPELL_FLASH_FREEZE_VISUAL = 62148, // cast by npc 30298 + SPELL_FLASH_FREEZE_SUMMON = 61970, // cast by all Flash Freeze targets; summons 32926 + SPELL_FLASH_FREEZE_SUMMON_NPC = 61989, // used to flash freeze all npc targets before the encounter; summons 32938 + // SPELL_FLASH_FREEZE_STUN = 64175, // use and purpose unk + // SPELL_FLASH_FREEZE_FRIENDLY = 64176, // use and purpose unk + + // flash freeze spells + SPELL_FLASH_FREEZE_AURA = 61969, // stuns the summoner + SPELL_FLASH_FREEZE_KILL = 62226, // kill frozen targets + + // flash freeze npc spells + SPELL_FLASH_FREEZE_AURA_NPC = 61990, // stuns the summoner (npc) + SPELL_FLASH_FREEZE_INITIAL = 62878, // trigger aggro on Hodir if damaged + + // npcs + NPC_ICICLE = 33169, + NPC_SNOWPACKED_ICICLE = 33173, + NPC_SNOWPACKED_ICICLE_TARGET = 33174, // entry used to handle safe area aura from Flash Freeze + NPC_FLASH_FREEZE = 32926, // entry used during the encounter + NPC_FLASH_FREEZE_NPC = 32938, // entry which stuns the friendly npcs before the actual fight + + GO_SNOWDRIFT = 194173, + FACTION_ID_FRIENDLY = 35, +}; + +/*###### +## boss_hodir +######*/ + +struct MANGOS_DLL_DECL boss_hodirAI : public ScriptedAI +{ + boss_hodirAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (instance_ulduar*)pCreature->GetInstanceData(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); + m_bEventFinished = false; + Reset(); + } + + instance_ulduar* m_pInstance; + bool m_bIsRegularMode; + bool m_bEventFinished; + + uint32 m_uiBerserkTimer; + + void Reset() override + { + m_uiBerserkTimer = 8 * MINUTE * IN_MILLISECONDS; + } + + void Aggro(Unit* pWho) override + { + if (m_pInstance) + m_pInstance->SetData(TYPE_HODIR, IN_PROGRESS); + + DoScriptText(SAY_AGGRO, m_creature); + DoCastSpellIfCan(m_creature, SPELL_BITTING_COLD, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_ICICLE_AURA, CAST_TRIGGERED | CAST_AURA_NOT_PRESENT); + DoCastSpellIfCan(m_creature, SPELL_SHATTER_CHEST, CAST_TRIGGERED | CAST_AURA_NOT_PRESENT); + } + + void JustReachedHome() override + { + if (m_pInstance) + m_pInstance->SetData(TYPE_HODIR, FAIL); + } + + void EnterEvadeMode() override + { + m_creature->RemoveAllAurasOnEvade(); + m_creature->DeleteThreatList(); + m_creature->CombatStop(true); + + if (m_creature->isAlive() && !m_bEventFinished) + m_creature->GetMotionMaster()->MoveTargetedHome(); + + m_creature->SetLootRecipient(NULL); + + Reset(); + } + + void DamageTaken(Unit* /*pDoneBy*/, uint32& uiDamage) override + { + if (uiDamage >= m_creature->GetHealth()) + { + uiDamage = 0; + + if (!m_bEventFinished) + { + if (m_pInstance) + m_pInstance->SetData(TYPE_HODIR, DONE); + + DoScriptText(SAY_EPILOGUE, m_creature); + m_creature->CastSpell(m_creature, SPELL_HODIR_CREDIT, true); + + m_creature->ForcedDespawn(10000); + m_creature->setFaction(FACTION_ID_FRIENDLY); + m_bEventFinished = true; + EnterEvadeMode(); + } + } + } + + void KilledUnit(Unit* pVictim) override + { + if (pVictim->GetTypeId() != TYPEID_PLAYER) + return; + + DoScriptText(urand(0, 1) ? SAY_SLAY_1 : SAY_SLAY_2, m_creature); + } + + void JustSummoned(Creature* pSummoned) override + { + } + + void UpdateAI(const uint32 uiDiff) override + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_uiBerserkTimer) + { + if (m_uiBerserkTimer <= uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_BERSERK) == CAST_OK) + { + DoScriptText(SAY_BERSERK, m_creature); + m_uiBerserkTimer = 0; + } + } + else + m_uiBerserkTimer -= uiDiff; + } + + DoMeleeAttackIfReady(); + } }; +CreatureAI* GetAI_boss_hodir(Creature* pCreature) +{ + return new boss_hodirAI(pCreature); +} + void AddSC_boss_hodir() { + Script* pNewScript; + pNewScript = new Script; + pNewScript->Name = "boss_hodir"; + pNewScript->GetAI = GetAI_boss_hodir; + pNewScript->RegisterSelf(); } diff --git a/scripts/northrend/ulduar/ulduar/boss_yogg_saron.cpp b/scripts/northrend/ulduar/ulduar/boss_yogg_saron.cpp index ef25dca69..fa2c74e42 100644 --- a/scripts/northrend/ulduar/ulduar/boss_yogg_saron.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_yogg_saron.cpp @@ -70,6 +70,8 @@ enum EMOTE_VISION_BLAST = -1603234, EMOTE_SHATTER_BLAST = -1603235, + + SAY_HODIR_HELP = -1603093, }; void AddSC_boss_yogg_saron() diff --git a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp index ba3dd0ee1..4d5b4365f 100644 --- a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp +++ b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp @@ -283,9 +283,6 @@ void instance_ulduar::OnObjectCreate(GameObject* pGo) // ----------------- The Keepers ----------------- // Hodir case GO_HODIR_EXIT: - if (m_auiEncounter[TYPE_HODIR]) - pGo->SetGoState(GO_STATE_ACTIVE); - break; case GO_HODIR_ICE_WALL: if (m_auiEncounter[TYPE_HODIR]) pGo->SetGoState(GO_STATE_ACTIVE); @@ -569,7 +566,11 @@ void instance_ulduar::SetData(uint32 uiType, uint32 uiData) { DoUseDoorOrButton(GO_HODIR_ICE_WALL); DoUseDoorOrButton(GO_HODIR_EXIT); - DoRespawnGameObject(instance->IsRegularDifficulty() ? GO_CACHE_OF_WINTER_10 : GO_CACHE_OF_WINTER_25, 30 * MINUTE); + + DoToggleGameObjectFlags(instance->IsRegularDifficulty() ? GO_CACHE_OF_WINTER_10 : GO_CACHE_OF_WINTER_25, GO_FLAG_NO_INTERACT, false); + if (GetData(TYPE_HODIR_HARD) == DONE) + DoToggleGameObjectFlags(instance->IsRegularDifficulty() ? GO_CACHE_OF_RARE_WINTER_10 : GO_CACHE_OF_RARE_WINTER_25, GO_FLAG_NO_INTERACT, false); + SpawnFriendlyKeeper(NPC_HODIR_IMAGE); } break; diff --git a/scripts/northrend/ulduar/ulduar/ulduar.h b/scripts/northrend/ulduar/ulduar/ulduar.h index 7a2425e0b..6a03dbf5f 100644 --- a/scripts/northrend/ulduar/ulduar/ulduar.h +++ b/scripts/northrend/ulduar/ulduar/ulduar.h @@ -331,6 +331,14 @@ enum ACHIEV_CRIT_OPEN_ARMS_H = 10095, ACHIEV_CRIT_FEEDS_TEARS_N = 10568, // Algalon, achievs 3004, 3005 ACHIEV_CRIT_FEEDS_TEARS_H = 10570, + ACHIEV_CRIT_CHEESE_N = 10259, // Hodir, achievs 2961, 2962 + ACHIEV_CRIT_CHEESE_H = 10261, + ACHIEV_CRIT_GETTING_COLD_N = 10247, // Hodir, achievs 2967, 2968 + ACHIEV_CRIT_GETTING_COLD_H = 10248, + ACHIEV_CRIT_COOL_FRIENDS_N = 10258, // Hodir, achievs 2963, 2965 + ACHIEV_CRIT_COOL_FRIENDS_H = 10260, + ACHIEV_CRIT_RARE_CACHE_N = 10452, // Hodir, achievs 3182, 3184 + ACHIEV_CRIT_RARE_CACHE_H = 10458, }; struct UlduarSpawns diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 1d0ed74fd..250e8fd7c 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2947" + #define SD2_REVISION_NR "2948" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 760ec6cec..a1b0f5b43 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -1299,6 +1299,7 @@ UPDATE creature_template SET ScriptName='npc_worm_hole' WHERE entry=34099; UPDATE creature_template SET ScriptName='npc_black_hole' WHERE entry=32953; UPDATE creature_template SET ScriptName='npc_collapsing_star' WHERE entry=32955; UPDATE gameobject_template SET ScriptName='go_celestial_access' WHERE entry IN (194628,194752); +UPDATE creature_template SET ScriptName='boss_hodir' WHERE entry=32845; DELETE FROM scripted_event_id WHERE id IN (9735,20964,21030,21031,21032,21033,21605,21606,21620); INSERT INTO scripted_event_id VALUES (9735, 'event_spell_saronite_barrier'), -- Vezax saronite barrier event diff --git a/sql/updates/r2948_mangos.sql b/sql/updates/r2948_mangos.sql new file mode 100644 index 000000000..ec14d4560 --- /dev/null +++ b/sql/updates/r2948_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='boss_hodir' WHERE entry=32845; From e3f7c4484ab9de8ddfeb630295d37e88fe471ef7 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sun, 29 Sep 2013 00:44:20 +0300 Subject: [PATCH 0959/1172] [2949] Fix Keeper spawn locations in Ulduar central hall --- .../ulduar/ulduar/instance_ulduar.cpp | 55 ++++++++++--------- scripts/northrend/ulduar/ulduar/ulduar.h | 24 ++++---- sd2_revision_nr.h | 2 +- 3 files changed, 40 insertions(+), 41 deletions(-) diff --git a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp index 4d5b4365f..a2c5bce69 100644 --- a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp +++ b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp @@ -40,20 +40,22 @@ static const DialogueEntry aUlduarDialogue[] = {0, 0, 0} }; -struct sSpawnLocation +struct UlduarKeeperSpawns { - float m_fX, m_fY, m_fZ, m_fO; + float fX, fY, fZ, fO; + uint32 uiEntry, uiType; }; -static sSpawnLocation m_aKeepersSpawnLocs[] = +static UlduarKeeperSpawns m_aKeepersSpawnLocs[] = { - {2036.892f, 25.621f, 411.358f, 3.83f}, // Freya - {1939.215f, 42.677f, 411.355f, 5.31f}, // Mimiron - {1939.195f, -90.662f, 411.357f, 1.06f}, // Hodir - {2036.674f, -73.814f, 411.355f, 2.51f}, // Thorim + {1945.682f, 33.34201f, 411.4408f, 5.270f, NPC_KEEPER_FREYA, TYPE_FREYA}, + {2028.766f, 17.42014f, 411.4446f, 3.857f, NPC_KEEPER_MIMIRON, TYPE_MIMIRON}, + {1945.761f, -81.52171f, 411.4407f, 1.029f, NPC_KEEPER_HODIR, TYPE_HODIR}, + {2028.822f, -65.73573f, 411.4426f, 2.460f, NPC_KEEPER_THORIM, TYPE_THORIM}, }; instance_ulduar::instance_ulduar(Map* pMap) : ScriptedInstance(pMap), DialogueHelper(aUlduarDialogue), + m_bKeepersLoaded(false), m_uiAlgalonTimer(MINUTE * IN_MILLISECONDS), m_uiShatterAchievTimer(0), m_uiGauntletStatus(0), @@ -106,6 +108,17 @@ void instance_ulduar::OnPlayerEnter(Player* pPlayer) pPlayer->SendUpdateWorldState(WORLD_STATE_TIMER, 1); pPlayer->SendUpdateWorldState(WORLD_STATE_TIMER_COUNT, GetData(TYPE_ALGALON_TIMER)); } + + // spawn frienly keepers in the central hall + if (!m_bKeepersLoaded) + { + for (uint8 i = 0; i < countof(m_aKeepersSpawnLocs); ++i) + { + if (GetData(m_aKeepersSpawnLocs[i].uiType) == DONE) + pPlayer->SummonCreature(m_aKeepersSpawnLocs[i].uiEntry, m_aKeepersSpawnLocs[i].fX, m_aKeepersSpawnLocs[i].fY, m_aKeepersSpawnLocs[i].fZ, m_aKeepersSpawnLocs[i].fO, TEMPSUMMON_CORPSE_DESPAWN, 0, true); + } + m_bKeepersLoaded = true; + } } bool instance_ulduar::IsEncounterInProgress() const @@ -155,23 +168,11 @@ void instance_ulduar::OnCreatureCreate(Creature* pCreature) case NPC_SARA: case NPC_YOGG_BRAIN: case NPC_ALGALON: - break; case NPC_MIMIRON: - if (m_auiEncounter[TYPE_MIMIRON] == DONE) - SpawnFriendlyKeeper(NPC_MIMIRON_IMAGE); - break; case NPC_HODIR: - if (m_auiEncounter[TYPE_HODIR] == DONE) - SpawnFriendlyKeeper(NPC_HODIR_IMAGE); - break; case NPC_THORIM: - if (m_auiEncounter[TYPE_THORIM] == DONE) - SpawnFriendlyKeeper(NPC_THORIM_IMAGE); - break; case NPC_FREYA: - if (m_auiEncounter[TYPE_FREYA] == DONE) - SpawnFriendlyKeeper(NPC_FREYA_IMAGE); break; case NPC_ULDUAR_COLOSSUS: @@ -556,7 +557,7 @@ void instance_ulduar::SetData(uint32 uiType, uint32 uiData) { if (GetData(TYPE_MIMIRON_HARD) != DONE) DoRespawnGameObject(instance->IsRegularDifficulty() ? GO_CACHE_OF_INOV_10 : GO_CACHE_OF_INOV_25, 30 * MINUTE); - SpawnFriendlyKeeper(NPC_MIMIRON_IMAGE); + SpawnFriendlyKeeper(NPC_KEEPER_MIMIRON); } break; case TYPE_HODIR: @@ -571,7 +572,7 @@ void instance_ulduar::SetData(uint32 uiType, uint32 uiData) if (GetData(TYPE_HODIR_HARD) == DONE) DoToggleGameObjectFlags(instance->IsRegularDifficulty() ? GO_CACHE_OF_RARE_WINTER_10 : GO_CACHE_OF_RARE_WINTER_25, GO_FLAG_NO_INTERACT, false); - SpawnFriendlyKeeper(NPC_HODIR_IMAGE); + SpawnFriendlyKeeper(NPC_KEEPER_HODIR); } break; case TYPE_THORIM: @@ -583,13 +584,13 @@ void instance_ulduar::SetData(uint32 uiType, uint32 uiData) { if (GetData(TYPE_THORIM_HARD) != DONE) DoRespawnGameObject(instance->IsRegularDifficulty() ? GO_CACHE_OF_STORMS_10 : GO_CACHE_OF_STORMS_25, 30 * MINUTE); - SpawnFriendlyKeeper(NPC_THORIM_IMAGE); + SpawnFriendlyKeeper(NPC_KEEPER_THORIM); } break; case TYPE_FREYA: m_auiEncounter[uiType] = uiData; if (uiData == DONE) - SpawnFriendlyKeeper(NPC_FREYA_IMAGE); + SpawnFriendlyKeeper(NPC_KEEPER_FREYA); break; // Prison case TYPE_VEZAX: @@ -875,10 +876,10 @@ void instance_ulduar::SpawnFriendlyKeeper(uint32 uiWho) switch (uiWho) { - case NPC_MIMIRON_IMAGE: pPlayer->SummonCreature(NPC_MIMIRON_IMAGE, m_aKeepersSpawnLocs[1].m_fX, m_aKeepersSpawnLocs[1].m_fY, m_aKeepersSpawnLocs[1].m_fZ, m_aKeepersSpawnLocs[1].m_fO, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10000); break; - case NPC_HODIR_IMAGE: pPlayer->SummonCreature(NPC_HODIR_IMAGE, m_aKeepersSpawnLocs[2].m_fX, m_aKeepersSpawnLocs[2].m_fY, m_aKeepersSpawnLocs[2].m_fZ, m_aKeepersSpawnLocs[2].m_fO, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10000); break; - case NPC_THORIM_IMAGE: pPlayer->SummonCreature(NPC_THORIM_IMAGE, m_aKeepersSpawnLocs[3].m_fX, m_aKeepersSpawnLocs[3].m_fY, m_aKeepersSpawnLocs[3].m_fZ, m_aKeepersSpawnLocs[3].m_fO, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10000); break; - case NPC_FREYA_IMAGE: pPlayer->SummonCreature(NPC_FREYA_IMAGE, m_aKeepersSpawnLocs[0].m_fX, m_aKeepersSpawnLocs[0].m_fY, m_aKeepersSpawnLocs[0].m_fZ, m_aKeepersSpawnLocs[0].m_fO, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10000); break; + case NPC_KEEPER_MIMIRON: pPlayer->SummonCreature(uiWho, m_aKeepersSpawnLocs[1].fX, m_aKeepersSpawnLocs[1].fY, m_aKeepersSpawnLocs[1].fZ, m_aKeepersSpawnLocs[1].fO, TEMPSUMMON_CORPSE_DESPAWN, 0, true); break; + case NPC_KEEPER_HODIR: pPlayer->SummonCreature(uiWho, m_aKeepersSpawnLocs[2].fX, m_aKeepersSpawnLocs[2].fY, m_aKeepersSpawnLocs[2].fZ, m_aKeepersSpawnLocs[2].fO, TEMPSUMMON_CORPSE_DESPAWN, 0, true); break; + case NPC_KEEPER_THORIM: pPlayer->SummonCreature(uiWho, m_aKeepersSpawnLocs[3].fX, m_aKeepersSpawnLocs[3].fY, m_aKeepersSpawnLocs[3].fZ, m_aKeepersSpawnLocs[3].fO, TEMPSUMMON_CORPSE_DESPAWN, 0, true); break; + case NPC_KEEPER_FREYA: pPlayer->SummonCreature(uiWho, m_aKeepersSpawnLocs[0].fX, m_aKeepersSpawnLocs[0].fY, m_aKeepersSpawnLocs[0].fZ, m_aKeepersSpawnLocs[0].fO, TEMPSUMMON_CORPSE_DESPAWN, 0, true); break; } } diff --git a/scripts/northrend/ulduar/ulduar/ulduar.h b/scripts/northrend/ulduar/ulduar/ulduar.h index 6a03dbf5f..947a67cbb 100644 --- a/scripts/northrend/ulduar/ulduar/ulduar.h +++ b/scripts/northrend/ulduar/ulduar/ulduar.h @@ -132,15 +132,13 @@ enum // Celestial planetarium NPC_ALGALON = 32871, - // Keepers images - // They spawn in the central room after they are released from Yogg's enslavement - // You may talk to them and ask them to help you fight Yogg-Saron - NPC_THORIM_IMAGE = 33413, - NPC_MIMIRON_IMAGE = 33412, - NPC_HODIR_IMAGE = 33411, - NPC_FREYA_IMAGE = 33410, - - // Keepers used to fight Yogg-Saron + // Keepers helpers spawned during Yogg Saron encounter + NPC_THORIM_HELPER = 33413, + NPC_MIMIRON_HELPER = 33412, + NPC_HODIR_HELPER = 33411, + NPC_FREYA_HELPER = 33410, + + // Keepers spawned in the central hall after releaseed from Yogg's enslavement NPC_KEEPER_FREYA = 33241, NPC_KEEPER_HODIR = 33213, NPC_KEEPER_MIMIRON = 33244, @@ -406,10 +404,6 @@ class MANGOS_DLL_DECL instance_ulduar : public ScriptedInstance, private Dialogu bool CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/) const override; bool CheckConditionCriteriaMeet(Player const* pPlayer, uint32 uiInstanceConditionId, WorldObject const* pConditionSource, uint32 conditionSourceType) const override; - void DoOpenMadnessDoorIfCan(); - - void SpawnFriendlyKeeper(uint32 uiWho); - void DoProcessShatteredEvent(); ObjectGuid GetKoloRubbleStalker(bool bRightSide) { return bRightSide ? m_rightKoloStalkerGuid : m_leftKoloStalkerGuid; } @@ -424,6 +418,8 @@ class MANGOS_DLL_DECL instance_ulduar : public ScriptedInstance, private Dialogu protected: void JustDidDialogueStep(int32 iEntry) override; + void SpawnFriendlyKeeper(uint32 uiWho); + void DoOpenMadnessDoorIfCan(); void DoCallLeviathanHelp(); std::string m_strInstData; @@ -433,6 +429,8 @@ class MANGOS_DLL_DECL instance_ulduar : public ScriptedInstance, private Dialogu uint32 m_auiUlduarTowers[KEEPER_ENCOUNTER]; bool m_abAchievCriteria[MAX_SPECIAL_ACHIEV_CRITS]; + bool m_bKeepersLoaded; + uint32 m_uiAlgalonTimer; uint32 m_uiShatterAchievTimer; uint32 m_uiGauntletStatus; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 250e8fd7c..421f4a7ba 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2948" + #define SD2_REVISION_NR "2949" #endif // __SD2_REVISION_NR_H__ From ec7c46c7509748c5eafc4f424919bad16221f4ee Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sun, 29 Sep 2013 15:18:23 +0300 Subject: [PATCH 0960/1172] [2950] Add missing spell to npc 2713 --- scripts/eastern_kingdoms/arathi_highlands.cpp | 17 +++++++++++++++-- sd2_revision_nr.h | 2 +- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/scripts/eastern_kingdoms/arathi_highlands.cpp b/scripts/eastern_kingdoms/arathi_highlands.cpp index 16194cd08..b4a84f2e4 100644 --- a/scripts/eastern_kingdoms/arathi_highlands.cpp +++ b/scripts/eastern_kingdoms/arathi_highlands.cpp @@ -132,7 +132,7 @@ enum SAY_FINISH = -1000956, EMOTE_HAND_PACK = -1000957, - // ToDo: find the healing spell id! + SPELL_REJUVENATION = 3627, SPELL_BEAR_FORM = 4948, NPC_JORELL = 2733, @@ -146,10 +146,12 @@ struct MANGOS_DLL_DECL npc_kineloryAI : public npc_escortAI npc_kineloryAI(Creature* pCreature) : npc_escortAI(pCreature) { Reset(); } uint32 m_uiBearFormTimer; + uint32 m_uiHealTimer; void Reset() override { - m_uiBearFormTimer = urand(1000, 5000); + m_uiBearFormTimer = urand(5000, 7000); + m_uiHealTimer = urand(2000, 5000); } void WaypointReached(uint32 uiPointId) override @@ -217,6 +219,17 @@ struct MANGOS_DLL_DECL npc_kineloryAI : public npc_escortAI else m_uiBearFormTimer -= uiDiff; + if (m_uiHealTimer < uiDiff) + { + if (Unit* pTarget = DoSelectLowestHpFriendly(40.0f)) + { + if (DoCastSpellIfCan(pTarget, SPELL_REJUVENATION) == CAST_OK) + m_uiHealTimer = urand(15000, 25000); + } + } + else + m_uiHealTimer -= uiDiff; + DoMeleeAttackIfReady(); } }; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 421f4a7ba..f4dbe6759 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2949" + #define SD2_REVISION_NR "2950" #endif // __SD2_REVISION_NR_H__ From c2506d200c0f595d8f2fc348f214a7961ad19e05 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Wed, 2 Oct 2013 01:07:01 +0300 Subject: [PATCH 0961/1172] [2951] Implement combat abilities for Hodir Notes: Achievements and helper npcs are not yet implemented Spells require additional core support --- .../northrend/ulduar/ulduar/boss_hodir.cpp | 251 ++++++++++++++++-- .../ulduar/ulduar/instance_ulduar.cpp | 14 +- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 6 +- sql/updates/r2951_mangos.sql | 6 + 5 files changed, 255 insertions(+), 24 deletions(-) create mode 100644 sql/updates/r2951_mangos.sql diff --git a/scripts/northrend/ulduar/ulduar/boss_hodir.cpp b/scripts/northrend/ulduar/ulduar/boss_hodir.cpp index 49a049c9c..9c48beb03 100644 --- a/scripts/northrend/ulduar/ulduar/boss_hodir.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_hodir.cpp @@ -16,13 +16,14 @@ /* ScriptData SDName: boss_hodir -SD%Complete: 20% -SDComment: Basic script +SD%Complete: 90% +SDComment: Achievements NYI. SDCategory: Ulduar EndScriptData */ #include "precompiled.h" #include "ulduar.h" +#include "TemporarySummon.h" enum { @@ -40,7 +41,7 @@ enum // spells SPELL_BERSERK = 26662, SPELL_HODIR_CREDIT = 64899, // kill credit spell; added in spell_template - SPELL_SHATTER_CHEST = 65272, // hard mode timer until chest is shattered; triggers 62501 + SPELL_SHATTER_CHEST = 65272, // hard mode timer until chest is shattered; triggers 62501 which will send event 20907 if completed SPELL_FROZEN_BLOWS = 62478, SPELL_FROZEN_BLOWS_H = 63512, SPELL_FREEZE = 62469, @@ -55,15 +56,15 @@ enum SPELL_ICICLE_DUMMY = 62453, // snowpacked icicle spells - SPELL_ICICLE_ICE_SHARDS = 62460, // triggers the spell which summons npc 33174 and go 194173 + // SPELL_ICICLE_ICE_SHARDS = 62460, // triggers the spell which summons npc 33174 and go 194173 // snowpacked icicle target spells SPELL_SAFE_AREA = 65705, // grant immunity from flash freeze // flash freeze related spells - SPELL_FLASH_FREEZE_VISUAL = 62148, // cast by npc 30298 - SPELL_FLASH_FREEZE_SUMMON = 61970, // cast by all Flash Freeze targets; summons 32926 - SPELL_FLASH_FREEZE_SUMMON_NPC = 61989, // used to flash freeze all npc targets before the encounter; summons 32938 + // SPELL_FLASH_FREEZE_VISUAL = 62148, // cast by npc 30298 (handled by event 20896) + // SPELL_FLASH_FREEZE_SUMMON = 61970, // cast by all Flash Freeze targets; summons 32926 + // SPELL_FLASH_FREEZE_SUMMON_NPC = 61989, // used to flash freeze all npc targets before the encounter; summons 32938 // SPELL_FLASH_FREEZE_STUN = 64175, // use and purpose unk // SPELL_FLASH_FREEZE_FRIENDLY = 64176, // use and purpose unk @@ -73,16 +74,18 @@ enum // flash freeze npc spells SPELL_FLASH_FREEZE_AURA_NPC = 61990, // stuns the summoner (npc) - SPELL_FLASH_FREEZE_INITIAL = 62878, // trigger aggro on Hodir if damaged + SPELL_FLASH_FREEZE_INITIAL = 62878, // trigger aggro on Hodir if damaged; sends event 21045 // npcs NPC_ICICLE = 33169, - NPC_SNOWPACKED_ICICLE = 33173, - NPC_SNOWPACKED_ICICLE_TARGET = 33174, // entry used to handle safe area aura from Flash Freeze + // NPC_SNOWPACKED_ICICLE = 33173, // entry used to generate npc 33173 and go 194173; handled in eventAI + // NPC_SNOWPACKED_ICICLE_TARGET = 33174, // entry used to handle safe area aura from Flash Freeze; handled in eventAI NPC_FLASH_FREEZE = 32926, // entry used during the encounter NPC_FLASH_FREEZE_NPC = 32938, // entry which stuns the friendly npcs before the actual fight - GO_SNOWDRIFT = 194173, + // GO_SNOWDRIFT = 194173, + EVENT_ID_ATTACK_START = 21045, + EVENT_ID_SHATTER_CHEST = 20907, FACTION_ID_FRIENDLY = 35, }; @@ -97,6 +100,7 @@ struct MANGOS_DLL_DECL boss_hodirAI : public ScriptedAI m_pInstance = (instance_ulduar*)pCreature->GetInstanceData(); m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); m_bEventFinished = false; + m_uiEpilogueTimer = 0; Reset(); } @@ -104,17 +108,27 @@ struct MANGOS_DLL_DECL boss_hodirAI : public ScriptedAI bool m_bIsRegularMode; bool m_bEventFinished; + uint32 m_uiEpilogueTimer; uint32 m_uiBerserkTimer; + uint32 m_uiFlashFreezeTimer; + uint32 m_uiFrozenBlowsTimer; + uint32 m_uiFreezeTimer; void Reset() override { - m_uiBerserkTimer = 8 * MINUTE * IN_MILLISECONDS; + m_uiBerserkTimer = 8 * MINUTE * IN_MILLISECONDS; + m_uiFlashFreezeTimer = 50000; + m_uiFrozenBlowsTimer = 70000; + m_uiFreezeTimer = urand(25000, 30000); } void Aggro(Unit* pWho) override { if (m_pInstance) + { m_pInstance->SetData(TYPE_HODIR, IN_PROGRESS); + m_pInstance->SetData(TYPE_HODIR_HARD, DONE); + } DoScriptText(SAY_AGGRO, m_creature); DoCastSpellIfCan(m_creature, SPELL_BITTING_COLD, CAST_TRIGGERED); @@ -150,13 +164,7 @@ struct MANGOS_DLL_DECL boss_hodirAI : public ScriptedAI if (!m_bEventFinished) { - if (m_pInstance) - m_pInstance->SetData(TYPE_HODIR, DONE); - - DoScriptText(SAY_EPILOGUE, m_creature); - m_creature->CastSpell(m_creature, SPELL_HODIR_CREDIT, true); - - m_creature->ForcedDespawn(10000); + m_uiEpilogueTimer = 10000; m_creature->setFaction(FACTION_ID_FRIENDLY); m_bEventFinished = true; EnterEvadeMode(); @@ -174,10 +182,33 @@ struct MANGOS_DLL_DECL boss_hodirAI : public ScriptedAI void JustSummoned(Creature* pSummoned) override { + if (pSummoned->GetEntry() == NPC_ICICLE) + { + pSummoned->CastSpell(pSummoned, SPELL_ICICLE_DUMMY, false); + pSummoned->CastSpell(pSummoned, SPELL_ICICLE, true); + pSummoned->ForcedDespawn(5000); + } } void UpdateAI(const uint32 uiDiff) override { + if (m_uiEpilogueTimer) + { + if (m_uiEpilogueTimer <= uiDiff) + { + if (m_pInstance) + m_pInstance->SetData(TYPE_HODIR, DONE); + + DoScriptText(SAY_EPILOGUE, m_creature); + m_creature->CastSpell(m_creature, SPELL_HODIR_CREDIT, true); + + m_creature->ForcedDespawn(10000); + m_uiEpilogueTimer = 0; + } + else + m_uiEpilogueTimer -= uiDiff; + } + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -195,6 +226,42 @@ struct MANGOS_DLL_DECL boss_hodirAI : public ScriptedAI m_uiBerserkTimer -= uiDiff; } + if (m_uiFlashFreezeTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_FLASH_FREEZE) == CAST_OK) + { + DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_ICICLE_SNOWPACK : SPELL_ICICLE_SNOWPACK_H, CAST_TRIGGERED); + DoScriptText(EMOTE_FLASH_FREEZE, m_creature); + DoScriptText(SAY_FLASH_FREEZE, m_creature); + m_uiFlashFreezeTimer = 50000; + } + } + else + m_uiFlashFreezeTimer -= uiDiff; + + if (m_uiFrozenBlowsTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_FROZEN_BLOWS : SPELL_FROZEN_BLOWS_H) == CAST_OK) + { + DoScriptText(SAY_FROZEN_BLOWS, m_creature); + DoScriptText(EMOTE_FROZEN_BLOWS, m_creature); + m_uiFrozenBlowsTimer = 60000; + } + } + else + m_uiFrozenBlowsTimer -= uiDiff; + + if (m_uiFreezeTimer < uiDiff) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, SPELL_FREEZE) == CAST_OK) + m_uiFreezeTimer = 15000; + } + } + else + m_uiFreezeTimer -= uiDiff; + DoMeleeAttackIfReady(); } }; @@ -204,6 +271,137 @@ CreatureAI* GetAI_boss_hodir(Creature* pCreature) return new boss_hodirAI(pCreature); } +/*###### +## npc_flash_freeze +######*/ + +struct MANGOS_DLL_DECL npc_flash_freezeAI : public Scripted_NoMovementAI +{ + npc_flash_freezeAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) + { + m_pInstance = (instance_ulduar*)pCreature->GetInstanceData(); + Reset(); + } + + instance_ulduar* m_pInstance; + + bool m_bFreezeInit; + + void Reset() override + { + m_bFreezeInit = false; + } + + void AttackStart(Unit* /*pWho*/) override { } + void MoveInLineOfSight(Unit* /*pWho*/) override { } + + void JustDied(Unit* /*pKiller*/) override + { + // On Flash Freeze death, the owner should attack Hodir + if (m_creature->GetEntry() == NPC_FLASH_FREEZE_NPC && m_creature->IsTemporarySummon() && m_pInstance) + { + if (Creature* pHodir = m_pInstance->GetSingleCreatureFromStorage(NPC_HODIR)) + { + if (Creature* pSummoner = m_creature->GetMap()->GetCreature(((TemporarySummon*)m_creature)->GetSummonerGuid())) + pSummoner->AI()->AttackStart(pHodir); + } + } + } + + void UpdateAI(const uint32 /*uiDiff*/) override + { + // Flash Freeze npcs should be always be summoned + if (!m_creature->IsTemporarySummon()) + return; + + // do the freezing on the first update tick + if (!m_bFreezeInit) + { + // Flash Freeze npc will always stun or kill the summoner + if (m_creature->GetEntry() == NPC_FLASH_FREEZE_NPC) + { + if (DoCastSpellIfCan(m_creature, SPELL_FLASH_FREEZE_AURA_NPC) == CAST_OK) + DoCastSpellIfCan(m_creature, SPELL_FLASH_FREEZE_INITIAL, CAST_TRIGGERED); + } + else if (m_creature->GetEntry() == NPC_FLASH_FREEZE) + { + if (Unit* pSummoner = m_creature->GetMap()->GetUnit(((TemporarySummon*)m_creature)->GetSummonerGuid())) + { + // kill frozen players + if (pSummoner->HasAura(SPELL_FREEZE)) + DoCastSpellIfCan(pSummoner, SPELL_FLASH_FREEZE_KILL); + else + DoCastSpellIfCan(m_creature, SPELL_FLASH_FREEZE_AURA); + } + } + + m_bFreezeInit = true; + } + } +}; + +CreatureAI* GetAI_npc_flash_freeze(Creature* pCreature) +{ + return new npc_flash_freezeAI(pCreature); +} + +/*###### +## event_boss_hodir +######*/ + +bool ProcessEventId_event_boss_hodir(uint32 uiEventId, Object* pSource, Object* /*pTarget*/, bool /*bIsStart*/) +{ + if (pSource->GetTypeId() == TYPEID_UNIT) + { + instance_ulduar* pInstance = (instance_ulduar*)((Creature*)pSource)->GetInstanceData(); + if (!pInstance) + return true; + + if (uiEventId == EVENT_ID_SHATTER_CHEST) + { + // Mark hard mode as failed and despawn the Rare cache + pInstance->SetData(TYPE_HODIR_HARD, FAIL); + + if (GameObject* pChest = pInstance->GetSingleGameObjectFromStorage(pInstance->instance->IsRegularDifficulty() ? GO_CACHE_OF_RARE_WINTER_10 : GO_CACHE_OF_RARE_WINTER_25)) + pChest->SetLootState(GO_JUST_DEACTIVATED); + } + else if (uiEventId == EVENT_ID_ATTACK_START) + { + // Start encounter + if (Creature* pHodir = pInstance->GetSingleCreatureFromStorage(NPC_HODIR)) + pHodir->SetInCombatWithZone(); + } + + return true; + } + + return false; +} + +/*###### +## npc_icicle_target +######*/ + +// TODO Remove this 'script' when combat can be proper prevented from core-side +struct MANGOS_DLL_DECL npc_icicle_targetAI : public Scripted_NoMovementAI +{ + npc_icicle_targetAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { Reset(); } + + void Reset() override + { + DoCastSpellIfCan(m_creature, SPELL_SAFE_AREA); + } + + void AttackStart(Unit* /*pWho*/) override { } + void MoveInLineOfSight(Unit* /*pWho*/) override { } + void UpdateAI(const uint32 /*uiDiff*/) override { } +}; + +CreatureAI* GetAI_npc_icicle_target(Creature* pCreature) +{ + return new npc_icicle_targetAI(pCreature); +} + void AddSC_boss_hodir() { Script* pNewScript; @@ -212,4 +410,19 @@ void AddSC_boss_hodir() pNewScript->Name = "boss_hodir"; pNewScript->GetAI = GetAI_boss_hodir; pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_flash_freeze"; + pNewScript->GetAI = GetAI_npc_flash_freeze; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "event_boss_hodir"; + pNewScript->pProcessEventId = &ProcessEventId_event_boss_hodir; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_icicle_target"; + pNewScript->GetAI = GetAI_npc_icicle_target; + pNewScript->RegisterSelf(); } diff --git a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp index a2c5bce69..d303d743f 100644 --- a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp +++ b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp @@ -285,7 +285,7 @@ void instance_ulduar::OnObjectCreate(GameObject* pGo) // Hodir case GO_HODIR_EXIT: case GO_HODIR_ICE_WALL: - if (m_auiEncounter[TYPE_HODIR]) + if (m_auiEncounter[TYPE_HODIR] == DONE) pGo->SetGoState(GO_STATE_ACTIVE); break; case GO_HODIR_ENTER: @@ -574,6 +574,13 @@ void instance_ulduar::SetData(uint32 uiType, uint32 uiData) SpawnFriendlyKeeper(NPC_KEEPER_HODIR); } + else if (uiData == FAIL) + { + if (GameObject* pChest = GetSingleGameObjectFromStorage(instance->IsRegularDifficulty() ? GO_CACHE_OF_RARE_WINTER_10 : GO_CACHE_OF_RARE_WINTER_25)) + pChest->Respawn(); + + SetData(TYPE_HODIR_HARD, FAIL); + } break; case TYPE_THORIM: m_auiEncounter[uiType] = uiData; @@ -644,8 +651,6 @@ void instance_ulduar::SetData(uint32 uiType, uint32 uiData) break; case TYPE_HODIR_HARD: m_auiHardBoss[2] = uiData; - if (uiData == DONE) - DoRespawnGameObject(instance->IsRegularDifficulty() ? GO_CACHE_OF_RARE_WINTER_10 : GO_CACHE_OF_RARE_WINTER_25, 30 * MINUTE); break; case TYPE_THORIM_HARD: m_auiHardBoss[3] = uiData; @@ -1016,6 +1021,9 @@ bool instance_ulduar::CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player c case ACHIEV_CRIT_DISARMED_N: case ACHIEV_CRIT_DISARMED_H: return m_abAchievCriteria[TYPE_ACHIEV_DISARMED]; + case ACHIEV_CRIT_RARE_CACHE_N: + case ACHIEV_CRIT_RARE_CACHE_H: + return GetData(TYPE_HODIR_HARD) == DONE; default: return false; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index f4dbe6759..a87e61f41 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2950" + #define SD2_REVISION_NR "2951" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index a1b0f5b43..fb7aef6fc 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -1300,14 +1300,18 @@ UPDATE creature_template SET ScriptName='npc_black_hole' WHERE entry=32953; UPDATE creature_template SET ScriptName='npc_collapsing_star' WHERE entry=32955; UPDATE gameobject_template SET ScriptName='go_celestial_access' WHERE entry IN (194628,194752); UPDATE creature_template SET ScriptName='boss_hodir' WHERE entry=32845; -DELETE FROM scripted_event_id WHERE id IN (9735,20964,21030,21031,21032,21033,21605,21606,21620); +UPDATE creature_template SET ScriptName='npc_flash_freeze' WHERE entry IN (32926,32938); +UPDATE creature_template SET ScriptName='npc_icicle_target' WHERE entry=33174; +DELETE FROM scripted_event_id WHERE id IN (9735,20907,20964,21030,21031,21032,21033,21045,21605,21606,21620); INSERT INTO scripted_event_id VALUES (9735, 'event_spell_saronite_barrier'), -- Vezax saronite barrier event +(20907,'event_boss_hodir'), -- Hodir shatter chest event (20964,'event_spell_harpoon_shot'), -- Razorscale harpoon event (21030,'event_go_ulduar_tower'), -- Tower of Life destroyed event (21031,'event_go_ulduar_tower'), -- Tower of Storms destroyed event (21032,'event_go_ulduar_tower'), -- Tower of Frost destroyed event (21033,'event_go_ulduar_tower'), -- Tower of Flame destroyed event +(21045,'event_boss_hodir'), -- Hodir attack start event (21605,'event_ulduar'), -- Flame Leviathan shutdown event (21606,'event_ulduar'), -- XT-002 Scrap repair event (21620,'event_ulduar'); -- Ignis construct shatter event diff --git a/sql/updates/r2951_mangos.sql b/sql/updates/r2951_mangos.sql new file mode 100644 index 000000000..0fe67d31a --- /dev/null +++ b/sql/updates/r2951_mangos.sql @@ -0,0 +1,6 @@ +UPDATE creature_template SET ScriptName='npc_flash_freeze' WHERE entry IN (32926,32938); +UPDATE creature_template SET ScriptName='npc_icicle_target' WHERE entry=33174; +DELETE FROM scripted_event_id WHERE id IN (20907,21045); +INSERT INTO scripted_event_id VALUES +(20907,'event_boss_hodir'), +(21045,'event_boss_hodir'); From 76cd91b85d264afaa9d78b4a01aa2121a1ae67c6 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Wed, 2 Oct 2013 23:12:17 +0300 Subject: [PATCH 0962/1172] [2952] Spawn faction npcs for Hodir and Thorim Also cleanup some old code in hard modes handling --- .../ulduar/ulduar/boss_flame_leviathan.cpp | 2 +- .../ulduar/ulduar/instance_ulduar.cpp | 91 ++++++++++++------- scripts/northrend/ulduar/ulduar/ulduar.cpp | 5 +- scripts/northrend/ulduar/ulduar/ulduar.h | 64 +++++++++++-- sd2_revision_nr.h | 2 +- 5 files changed, 118 insertions(+), 46 deletions(-) diff --git a/scripts/northrend/ulduar/ulduar/boss_flame_leviathan.cpp b/scripts/northrend/ulduar/ulduar/boss_flame_leviathan.cpp index d81fc148e..2ff3bb361 100644 --- a/scripts/northrend/ulduar/ulduar/boss_flame_leviathan.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_flame_leviathan.cpp @@ -371,7 +371,7 @@ struct MANGOS_DLL_DECL boss_flame_leviathanAI : public ScriptedAI pOrbital->RemoveAurasDueToSpell(SPELL_TOWER_OF_STORMS); // inform instance about all active towers for future use in achievements and hard mode loot - m_pInstance->SetData(TYPE_LEVIATHAN_TOWERS, uiActiveTowers); + m_pInstance->SetData(TYPE_LEVIATHAN_HARD, uiActiveTowers); } // Functions which handle the spawn of each type of add diff --git a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp index d303d743f..0d1cb53a6 100644 --- a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp +++ b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp @@ -55,11 +55,10 @@ static UlduarKeeperSpawns m_aKeepersSpawnLocs[] = }; instance_ulduar::instance_ulduar(Map* pMap) : ScriptedInstance(pMap), DialogueHelper(aUlduarDialogue), - m_bKeepersLoaded(false), + m_bHelpersLoaded(false), m_uiAlgalonTimer(MINUTE * IN_MILLISECONDS), m_uiShatterAchievTimer(0), - m_uiGauntletStatus(0), - m_uiActiveTowers(0) + m_uiGauntletStatus(0) { Initialize(); } @@ -109,15 +108,18 @@ void instance_ulduar::OnPlayerEnter(Player* pPlayer) pPlayer->SendUpdateWorldState(WORLD_STATE_TIMER_COUNT, GetData(TYPE_ALGALON_TIMER)); } - // spawn frienly keepers in the central hall - if (!m_bKeepersLoaded) + // spawn frienly keepers in the central hall and all the other faction npcs + if (!m_bHelpersLoaded) { for (uint8 i = 0; i < countof(m_aKeepersSpawnLocs); ++i) { if (GetData(m_aKeepersSpawnLocs[i].uiType) == DONE) pPlayer->SummonCreature(m_aKeepersSpawnLocs[i].uiEntry, m_aKeepersSpawnLocs[i].fX, m_aKeepersSpawnLocs[i].fY, m_aKeepersSpawnLocs[i].fZ, m_aKeepersSpawnLocs[i].fO, TEMPSUMMON_CORPSE_DESPAWN, 0, true); } - m_bKeepersLoaded = true; + + DoSpawnHodirNpcs(pPlayer); + DoSpawnThorimNpcs(pPlayer); + m_bHelpersLoaded = true; } } @@ -579,6 +581,9 @@ void instance_ulduar::SetData(uint32 uiType, uint32 uiData) if (GameObject* pChest = GetSingleGameObjectFromStorage(instance->IsRegularDifficulty() ? GO_CACHE_OF_RARE_WINTER_10 : GO_CACHE_OF_RARE_WINTER_25)) pChest->Respawn(); + if (Player* pPlayer = GetPlayerInMap()) + DoSpawnHodirNpcs(pPlayer); + SetData(TYPE_HODIR_HARD, FAIL); } break; @@ -593,6 +598,11 @@ void instance_ulduar::SetData(uint32 uiType, uint32 uiData) DoRespawnGameObject(instance->IsRegularDifficulty() ? GO_CACHE_OF_STORMS_10 : GO_CACHE_OF_STORMS_25, 30 * MINUTE); SpawnFriendlyKeeper(NPC_KEEPER_THORIM); } + else if (uiData == FAIL) + { + if (Player* pPlayer = GetPlayerInMap()) + DoSpawnThorimNpcs(pPlayer); + } break; case TYPE_FREYA: m_auiEncounter[uiType] = uiData; @@ -644,29 +654,25 @@ void instance_ulduar::SetData(uint32 uiType, uint32 uiData) // Hard modes case TYPE_LEVIATHAN_HARD: - m_auiHardBoss[0] = uiData; // TODO: add extra loot + m_auiHardBoss[0] = uiData; break; case TYPE_XT002_HARD: - m_auiHardBoss[1] = uiData; // TODO: add extra loot + m_auiHardBoss[1] = uiData; break; case TYPE_HODIR_HARD: m_auiHardBoss[2] = uiData; break; case TYPE_THORIM_HARD: m_auiHardBoss[3] = uiData; - if (uiData == DONE) - DoRespawnGameObject(instance->IsRegularDifficulty() ? GO_CACHE_OF_STORMS_10_H : GO_CACHE_OF_STORMS_25_H, 30 * MINUTE); break; case TYPE_MIMIRON_HARD: m_auiHardBoss[4] = uiData; - if (uiData == DONE) - DoRespawnGameObject(instance->IsRegularDifficulty() ? GO_CACHE_OF_INOV_10_H : GO_CACHE_OF_INOV_25_H, 30 * MINUTE); break; case TYPE_VEZAX_HARD: - m_auiHardBoss[5] = uiData; // TODO: add extra loot + m_auiHardBoss[5] = uiData; break; case TYPE_YOGGSARON_HARD: - m_auiHardBoss[6] = uiData; // TODO: add extra loot + m_auiHardBoss[6] = uiData; break; // Ulduar keepers @@ -717,9 +723,6 @@ void instance_ulduar::SetData(uint32 uiType, uint32 uiData) case TYPE_LEVIATHAN_GAUNTLET: m_uiGauntletStatus = uiData; return; - case TYPE_LEVIATHAN_TOWERS: - m_uiActiveTowers = uiData; - return; } DoOpenMadnessDoorIfCan(); @@ -735,11 +738,9 @@ void instance_ulduar::SetData(uint32 uiType, uint32 uiData) << m_auiEncounter[6] << " " << m_auiEncounter[7] << " " << m_auiEncounter[8] << " " << m_auiEncounter[9] << " " << m_auiEncounter[10] << " " << m_auiEncounter[11] << " " << m_auiEncounter[12] << " " << m_auiEncounter[13] << " " << m_auiEncounter[14] << " " - << m_auiHardBoss[0] << " " << m_auiHardBoss[1] << " " << m_auiHardBoss[2] << " " - << m_auiHardBoss[3] << " " << m_auiHardBoss[4] << " " << m_auiHardBoss[5] << " " - << m_auiHardBoss[6] << " " << m_auiUlduarKeepers[0] << " " << m_auiUlduarKeepers[1] << " " - << m_auiUlduarKeepers[2] << " " << m_auiUlduarKeepers[3] << " " << m_auiUlduarTowers[0] << " " - << m_auiUlduarTowers[1] << " " << m_auiUlduarTowers[2] << " " << m_auiUlduarTowers[3]; + << m_auiUlduarKeepers[0] << " " << m_auiUlduarKeepers[1] << " " << m_auiUlduarKeepers[2] << " " + << m_auiUlduarKeepers[3] << " " << m_auiUlduarTowers[0] << " " << m_auiUlduarTowers[1] << " " + << m_auiUlduarTowers[2] << " " << m_auiUlduarTowers[3]; m_strInstData = saveStream.str(); @@ -765,7 +766,7 @@ bool instance_ulduar::CheckConditionCriteriaMeet(Player const* pPlayer, uint32 u switch (pConditionSource->GetEntry()) { case NPC_LEVIATHAN: - uiCondId = m_uiActiveTowers; + uiCondId = GetData(TYPE_LEVIATHAN_HARD); break; case NPC_XT002: if (GetData(TYPE_XT002_HARD) == DONE) @@ -928,11 +929,9 @@ void instance_ulduar::Load(const char* strIn) loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3] >> m_auiEncounter[4] >> m_auiEncounter[5] >> m_auiEncounter[6] >> m_auiEncounter[7] >> m_auiEncounter[8] >> m_auiEncounter[9] >> m_auiEncounter[10] >> m_auiEncounter[11] - >> m_auiEncounter[12] >> m_auiEncounter[13] >> m_auiEncounter[14] >> m_auiHardBoss[0] - >> m_auiHardBoss[1] >> m_auiHardBoss[2] >> m_auiHardBoss[3] >> m_auiHardBoss[4] >> m_auiHardBoss[5] - >> m_auiHardBoss[6] >> m_auiUlduarKeepers[0] >> m_auiUlduarKeepers[1] >> m_auiUlduarKeepers[2] - >> m_auiUlduarKeepers[3] >> m_auiUlduarTowers[0] >> m_auiUlduarTowers[1] >> m_auiUlduarTowers[2] - >> m_auiUlduarTowers[3]; + >> m_auiEncounter[12] >> m_auiEncounter[13] >> m_auiEncounter[14] >> m_auiUlduarKeepers[0] + >> m_auiUlduarKeepers[1] >> m_auiUlduarKeepers[2] >> m_auiUlduarKeepers[3] >> m_auiUlduarTowers[0] + >> m_auiUlduarTowers[1] >> m_auiUlduarTowers[2] >> m_auiUlduarTowers[3]; for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) { @@ -996,16 +995,16 @@ bool instance_ulduar::CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player c return m_abAchievCriteria[TYPE_ACHIEV_SHUTOUT]; case ACHIEV_CRIT_ORB_BOMB_N: case ACHIEV_CRIT_ORB_BOMB_H: - return m_uiActiveTowers >= 1; + return GetData(TYPE_LEVIATHAN_HARD) >= 1; case ACHIEV_CRIT_ORB_DEV_N: case ACHIEV_CRIT_ORB_DEV_H: - return m_uiActiveTowers >= 2; + return GetData(TYPE_LEVIATHAN_HARD) >= 2; case ACHIEV_CRIT_ORB_NUKED_N: case ACHIEV_CRIT_ORB_NUKED_H: - return m_uiActiveTowers >= 3; + return GetData(TYPE_LEVIATHAN_HARD) >= 3; case ACHIEV_CRIT_ORBITUARY_N: case ACHIEV_CRIT_ORBITUARY_H: - return m_uiActiveTowers == 4; + return GetData(TYPE_LEVIATHAN_HARD) == 4; case ACHIEV_CRIT_NERF_ENG_N: case ACHIEV_CRIT_NERF_ENG_H: return m_abAchievCriteria[TYPE_ACHIEV_NERF_ENG]; @@ -1038,12 +1037,12 @@ void instance_ulduar::DoCallLeviathanHelp() return; for (uint8 i = 0; i < countof(afReinforcementsNormal); ++i) - pLeviathan->SummonCreature(afReinforcementsNormal[i].uiEntry, afReinforcementsNormal[i].fX, afReinforcementsNormal[i].fY, afReinforcementsNormal[i].fZ, afReinforcementsNormal[i].fO, TEMPSUMMON_DEAD_DESPAWN, 0, true); + pLeviathan->SummonCreature(afReinforcementsNormal[i].uiAllyEntry, afReinforcementsNormal[i].fX, afReinforcementsNormal[i].fY, afReinforcementsNormal[i].fZ, afReinforcementsNormal[i].fO, TEMPSUMMON_DEAD_DESPAWN, 0, true); if (!instance->IsRegularDifficulty()) { for (uint8 i = 0; i < countof(afReinforcementsHeroic); ++i) - pLeviathan->SummonCreature(afReinforcementsHeroic[i].uiEntry, afReinforcementsHeroic[i].fX, afReinforcementsHeroic[i].fY, afReinforcementsHeroic[i].fZ, afReinforcementsHeroic[i].fO, TEMPSUMMON_DEAD_DESPAWN, 0, true); + pLeviathan->SummonCreature(afReinforcementsHeroic[i].uiAllyEntry, afReinforcementsHeroic[i].fX, afReinforcementsHeroic[i].fY, afReinforcementsHeroic[i].fZ, afReinforcementsHeroic[i].fO, TEMPSUMMON_DEAD_DESPAWN, 0, true); } } @@ -1056,6 +1055,30 @@ void instance_ulduar::DoProcessShatteredEvent() m_uiShatterAchievTimer = 5000; } +void instance_ulduar::DoSpawnHodirNpcs(Player* pSummoner) +{ + if (GetData(TYPE_HODIR) != DONE) + { + for (uint8 i = 0; i < countof(afHodirHelpersNormal); ++i) + pSummoner->SummonCreature(pSummoner->GetTeam() == ALLIANCE ? afHodirHelpersNormal[i].uiAllyEntry : afHodirHelpersNormal[i].uiHordeEntry, afHodirHelpersNormal[i].fX, afHodirHelpersNormal[i].fY, afHodirHelpersNormal[i].fZ, afHodirHelpersNormal[i].fO, TEMPSUMMON_DEAD_DESPAWN, 0, true); + + if (!instance->IsRegularDifficulty()) + { + for (uint8 i = 0; i < countof(afHodirHelpersHeroic); ++i) + pSummoner->SummonCreature(pSummoner->GetTeam() == ALLIANCE ? afHodirHelpersHeroic[i].uiAllyEntry : afHodirHelpersHeroic[i].uiHordeEntry, afHodirHelpersHeroic[i].fX, afHodirHelpersHeroic[i].fY, afHodirHelpersHeroic[i].fZ, afHodirHelpersHeroic[i].fO, TEMPSUMMON_DEAD_DESPAWN, 0, true); + } + } +} + +void instance_ulduar::DoSpawnThorimNpcs(Player* pSummoner) +{ + if (GetData(TYPE_THORIM) != DONE) + { + for (uint8 i = 0; i < countof(afThorimSpawns); ++i) + pSummoner->SummonCreature(pSummoner->GetTeam() == ALLIANCE ? afThorimSpawns[i].uiAllyEntry : afThorimSpawns[i].uiHordeEntry, afThorimSpawns[i].fX, afThorimSpawns[i].fY, afThorimSpawns[i].fZ, afThorimSpawns[i].fO, TEMPSUMMON_DEAD_DESPAWN, 0, true); + } +} + void instance_ulduar::JustDidDialogueStep(int32 iEntry) { switch (iEntry) diff --git a/scripts/northrend/ulduar/ulduar/ulduar.cpp b/scripts/northrend/ulduar/ulduar/ulduar.cpp index d288e85cf..989b6d33a 100644 --- a/scripts/northrend/ulduar/ulduar/ulduar.cpp +++ b/scripts/northrend/ulduar/ulduar/ulduar.cpp @@ -221,7 +221,6 @@ bool GossipSelect_npc_brann_ulduar(Player* pPlayer, Creature* pCreature, uint32 pInstance->SetData(TYPE_TOWER_HODIR, FAIL); pInstance->SetData(TYPE_TOWER_MIMIRON, FAIL); pInstance->SetData(TYPE_TOWER_THORIM, FAIL); - pInstance->SetData(TYPE_LEVIATHAN_HARD, FAIL); // set gauntlet in progress; rest of the event is done by DB scripts pInstance->SetData(TYPE_LEVIATHAN_GAUNTLET, IN_PROGRESS); @@ -252,7 +251,8 @@ bool GossipHello_npc_keeper_norgannon(Player* pPlayer, Creature* pCreature) { if (instance_ulduar* pInstance = (instance_ulduar*)pCreature->GetInstanceData()) { - if (pInstance->GetData(TYPE_LEVIATHAN_GAUNTLET) == NOT_STARTED && pInstance->GetData(TYPE_LEVIATHAN) == NOT_STARTED && pInstance->GetData(TYPE_LEVIATHAN_HARD) == NOT_STARTED) + if (pInstance->GetData(TYPE_LEVIATHAN_GAUNTLET) == NOT_STARTED && pInstance->GetData(TYPE_LEVIATHAN) == NOT_STARTED && pInstance->GetData(TYPE_TOWER_HODIR) == NOT_STARTED && + pInstance->GetData(TYPE_TOWER_FREYA) == NOT_STARTED && pInstance->GetData(TYPE_TOWER_MIMIRON) == NOT_STARTED && pInstance->GetData(TYPE_TOWER_THORIM) == NOT_STARTED) pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_ACTIVATE_SYSTEMS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXT_ID_GREET, pCreature->GetObjectGuid()); @@ -276,7 +276,6 @@ bool GossipSelect_npc_keeper_norgannon(Player* pPlayer, Creature* pCreature, uin pInstance->SetData(TYPE_TOWER_HODIR, DONE); pInstance->SetData(TYPE_TOWER_MIMIRON, DONE); pInstance->SetData(TYPE_TOWER_THORIM, DONE); - pInstance->SetData(TYPE_LEVIATHAN_HARD, DONE); // set gauntlet in progress and despawn the Lorekeeper; rest of the event is done by DB scripts pInstance->SetData(TYPE_LEVIATHAN_GAUNTLET, IN_PROGRESS); diff --git a/scripts/northrend/ulduar/ulduar/ulduar.h b/scripts/northrend/ulduar/ulduar/ulduar.h index 947a67cbb..db46220e2 100644 --- a/scripts/northrend/ulduar/ulduar/ulduar.h +++ b/scripts/northrend/ulduar/ulduar/ulduar.h @@ -54,7 +54,6 @@ enum // Other types - not saved TYPE_LEVIATHAN_GAUNTLET = 31, - TYPE_LEVIATHAN_TOWERS = 32, // The siege of ulduar NPC_LEVIATHAN = 33113, @@ -114,14 +113,40 @@ enum NPC_AERIAL_UNIT = 33670, NPC_HODIR = 32845, NPC_THORIM = 32865, - NPC_RUNIC_COLOSSUS = 32872, - NPC_RUNE_GIANT = 32873, - NPC_JORMUNGAR_BEHEMOTH = 32882, NPC_FREYA = 32906, + + // Freya elders NPC_ELDER_BRIGHTLEAF = 32915, NPC_ELDER_IRONBRACH = 32913, NPC_ELDER_STONEBARK = 32914, + // Hodir helpers + NPC_DRUID_HORDE_N = 32941, // Tor Greycloud + NPC_DRUID_HORDE_H = 33333, // Kar Greycloud + NPC_SHAMAN_HORDE_N = 32950, // Spiritwalker Yona + NPC_SHAMAN_HORDE_H = 33332, // Spiritwalker Tara + NPC_MAGE_HORDE_N = 32946, // Veesha Blazeweaver + NPC_MAGE_HORDE_H = 33331, // Amira Blazeweaver + NPC_PRIEST_HORDE_N = 32948, // Battle-Priest Eliza + NPC_PRIEST_HORDE_H = 33330, // Battle-Priest Gina + NPC_DRUID_ALLIANCE_N = 32901, // Ellie Nightfeather + NPC_DRUID_ALLIANCE_H = 33325, // Eivi Nightfeather + NPC_SHAMAN_ALLIANCE_N = 32900, // Elementalist Avuun + NPC_SHAMAN_ALLIANCE_H = 33328, // Elementalist Mahfuun + NPC_MAGE_ALLIANCE_N = 32893, // Missy Flamecuffs + NPC_MAGE_ALLIANCE_H = 33327, // Sissy Flamecuffs + NPC_PRIEST_ALLIANCE_N = 32897, // Field Medic Penny + NPC_PRIEST_ALLIANCE_H = 33326, // Field Medic Jessi + + // Thorim event npcs + NPC_RUNIC_COLOSSUS = 32872, + NPC_RUNE_GIANT = 32873, + NPC_JORMUNGAR_BEHEMOTH = 32882, + NPC_SOLDIER_ALLIANCE = 32885, + NPC_CAPTAIN_ALLIANCE = 32908, + NPC_SOLDIER_HORDE = 32883, + NPC_CAPTAIN_HORDE = 32907, + // The descent into madness NPC_VEZAX = 33271, NPC_SARONITE_ANIMUS = 33524, @@ -342,7 +367,7 @@ enum struct UlduarSpawns { float fX, fY, fZ, fO; - uint32 uiEntry; + uint32 uiAllyEntry, uiHordeEntry; }; // Note: coordinates are guessed, but pretty close to what they should be @@ -369,6 +394,30 @@ static const UlduarSpawns afReinforcementsHeroic[] = {112.700f, 47.884f, 409.79f, 3.10f, NPC_SALVAGED_DEMOLISHER}, }; +static const UlduarSpawns afHodirHelpersNormal[] = +{ + {1999.903f, -230.4966f, 432.7581f, 1.53589f, NPC_DRUID_ALLIANCE_N, NPC_DRUID_HORDE_N}, + {2010.058f, -243.4553f, 432.7672f, 1.361357f, NPC_SHAMAN_ALLIANCE_N, NPC_SHAMAN_HORDE_N}, + {2021.118f, -236.6482f, 432.7672f, 1.937315f, NPC_MAGE_ALLIANCE_N, NPC_MAGE_HORDE_N}, + {1983.751f, -243.3579f, 432.7672f, 1.570796f, NPC_PRIEST_ALLIANCE_N, NPC_PRIEST_HORDE_N}, +}; + +static const UlduarSpawns afHodirHelpersHeroic[] = +{ + {2013.37f, -240.331f, 432.687f, 1.80463f, NPC_DRUID_ALLIANCE_H, NPC_DRUID_HORDE_H}, + {1983.89f, -240.369f, 432.687f, 1.37658f, NPC_SHAMAN_ALLIANCE_H, NPC_SHAMAN_HORDE_H}, + {2000.9f, -231.232f, 432.687f, 1.59846f, NPC_MAGE_ALLIANCE_H, NPC_MAGE_HORDE_H}, + {1997.88f, -239.394f, 432.687f, 1.4237f, NPC_PRIEST_ALLIANCE_H, NPC_PRIEST_HORDE_H}, +}; + +static const UlduarSpawns afThorimSpawns[] = +{ + {2127.24f, -251.309f, 419.7935f, 5.899213f, NPC_SOLDIER_HORDE, NPC_SOLDIER_ALLIANCE}, + {2123.316f, -254.7708f, 419.7886f, 6.178465f, NPC_SOLDIER_HORDE, NPC_SOLDIER_ALLIANCE}, + {2120.431f, -259.0431f, 419.6813f, 6.122538f, NPC_SOLDIER_HORDE, NPC_SOLDIER_ALLIANCE}, + {2145.503f, -256.3357f, 419.7306f, 3.520873f, NPC_CAPTAIN_HORDE, NPC_CAPTAIN_ALLIANCE}, +}; + // note: original spawn loc is 607.9199f, -12.90516f, 409.887f but we won't use it because it's too far and grid won't be loaded that far static const float afLeviathanSpawnPos[4] = { 422.8898f, -13.32677f, 409.8839f, 3.12f }; static const float afLeviathanMovePos[4] = { 296.5809f, -11.55668f, 409.8278f, 3.12f }; @@ -419,6 +468,8 @@ class MANGOS_DLL_DECL instance_ulduar : public ScriptedInstance, private Dialogu protected: void JustDidDialogueStep(int32 iEntry) override; void SpawnFriendlyKeeper(uint32 uiWho); + void DoSpawnHodirNpcs(Player* pSummoner); + void DoSpawnThorimNpcs(Player* pSummoner); void DoOpenMadnessDoorIfCan(); void DoCallLeviathanHelp(); @@ -429,12 +480,11 @@ class MANGOS_DLL_DECL instance_ulduar : public ScriptedInstance, private Dialogu uint32 m_auiUlduarTowers[KEEPER_ENCOUNTER]; bool m_abAchievCriteria[MAX_SPECIAL_ACHIEV_CRITS]; - bool m_bKeepersLoaded; + bool m_bHelpersLoaded; uint32 m_uiAlgalonTimer; uint32 m_uiShatterAchievTimer; uint32 m_uiGauntletStatus; - uint8 m_uiActiveTowers; ObjectGuid m_leftKoloStalkerGuid; ObjectGuid m_rightKoloStalkerGuid; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index a87e61f41..717eedac8 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2951" + #define SD2_REVISION_NR "2952" #endif // __SD2_REVISION_NR_H__ From 3af5cbaeed7bdc8efe0d8d5a0eff6dbf019657c9 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Thu, 3 Oct 2013 01:29:20 +0300 Subject: [PATCH 0963/1172] [2953] Add support for Hodir achievements 2961, 2962, 2963 and 2965 --- .../northrend/ulduar/ulduar/boss_hodir.cpp | 3 ++ .../ulduar/ulduar/instance_ulduar.cpp | 30 +++++++++++++++++++ scripts/northrend/ulduar/ulduar/ulduar.h | 4 ++- sd2_revision_nr.h | 2 +- 4 files changed, 37 insertions(+), 2 deletions(-) diff --git a/scripts/northrend/ulduar/ulduar/boss_hodir.cpp b/scripts/northrend/ulduar/ulduar/boss_hodir.cpp index 9c48beb03..fd8a30bdf 100644 --- a/scripts/northrend/ulduar/ulduar/boss_hodir.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_hodir.cpp @@ -332,6 +332,9 @@ struct MANGOS_DLL_DECL npc_flash_freezeAI : public Scripted_NoMovementAI DoCastSpellIfCan(pSummoner, SPELL_FLASH_FREEZE_KILL); else DoCastSpellIfCan(m_creature, SPELL_FLASH_FREEZE_AURA); + + if (pSummoner->GetTypeId() == TYPEID_PLAYER && m_pInstance) + m_pInstance->SetSpecialAchievementCriteria(TYPE_ACHIEV_CHEESE_FREEZE, false); } } diff --git a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp index 0d1cb53a6..19e5dd2f0 100644 --- a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp +++ b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp @@ -586,6 +586,11 @@ void instance_ulduar::SetData(uint32 uiType, uint32 uiData) SetData(TYPE_HODIR_HARD, FAIL); } + else if (uiData == IN_PROGRESS) + { + SetSpecialAchievementCriteria(TYPE_ACHIEV_CHEESE_FREEZE, true); + SetSpecialAchievementCriteria(TYPE_ACHIEV_COOL_FRIENDS, true); + } break; case TYPE_THORIM: m_auiEncounter[uiType] = uiData; @@ -912,6 +917,25 @@ void instance_ulduar::OnCreatureDeath(Creature* pCreature) } } break; + case NPC_DRUID_HORDE_N: + case NPC_DRUID_HORDE_H: + case NPC_SHAMAN_HORDE_N: + case NPC_SHAMAN_HORDE_H: + case NPC_MAGE_HORDE_N: + case NPC_MAGE_HORDE_H: + case NPC_PRIEST_HORDE_N: + case NPC_PRIEST_HORDE_H: + case NPC_DRUID_ALLIANCE_N: + case NPC_DRUID_ALLIANCE_H: + case NPC_SHAMAN_ALLIANCE_N: + case NPC_SHAMAN_ALLIANCE_H: + case NPC_MAGE_ALLIANCE_N: + case NPC_MAGE_ALLIANCE_H: + case NPC_PRIEST_ALLIANCE_N: + case NPC_PRIEST_ALLIANCE_H: + if (GetData(TYPE_HODIR) == IN_PROGRESS) + SetSpecialAchievementCriteria(TYPE_ACHIEV_COOL_FRIENDS, false); + break; } } @@ -1023,6 +1047,12 @@ bool instance_ulduar::CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player c case ACHIEV_CRIT_RARE_CACHE_N: case ACHIEV_CRIT_RARE_CACHE_H: return GetData(TYPE_HODIR_HARD) == DONE; + case ACHIEV_CRIT_CHEESE_N: + case ACHIEV_CRIT_CHEESE_H: + return m_abAchievCriteria[TYPE_ACHIEV_CHEESE_FREEZE]; + case ACHIEV_CRIT_COOL_FRIENDS_N: + case ACHIEV_CRIT_COOL_FRIENDS_H: + return m_abAchievCriteria[TYPE_ACHIEV_COOL_FRIENDS]; default: return false; diff --git a/scripts/northrend/ulduar/ulduar/ulduar.h b/scripts/northrend/ulduar/ulduar/ulduar.h index db46220e2..627b3f4b9 100644 --- a/scripts/northrend/ulduar/ulduar/ulduar.h +++ b/scripts/northrend/ulduar/ulduar/ulduar.h @@ -169,7 +169,7 @@ enum NPC_KEEPER_MIMIRON = 33244, NPC_KEEPER_THORIM = 33242, - MAX_SPECIAL_ACHIEV_CRITS = 14, + MAX_SPECIAL_ACHIEV_CRITS = 16, TYPE_ACHIEV_CAT_LADY = 0, TYPE_ACHIEV_NINE_LIVES = 1, @@ -185,6 +185,8 @@ enum TYPE_ACHIEV_LOOKS_KILL = 11, TYPE_ACHIEV_OPEN_ARMS = 12, TYPE_ACHIEV_DISARMED = 13, + TYPE_ACHIEV_CHEESE_FREEZE = 14, + TYPE_ACHIEV_COOL_FRIENDS = 15, // Loot chests // Kologarn diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 717eedac8..754ddd322 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2952" + #define SD2_REVISION_NR "2953" #endif // __SD2_REVISION_NR_H__ From 4c4522c6679e5e4bb1b5fda8cbb3e9f8d7f2339a Mon Sep 17 00:00:00 2001 From: Xfurry Date: Thu, 3 Oct 2013 23:15:38 +0300 Subject: [PATCH 0964/1172] [2954] Implement basic script for Thorim Also included more cleanup and optimization for Ulduar instance script --- .../northrend/ulduar/ulduar/boss_thorim.cpp | 171 +++++++++++++++++- .../ulduar/ulduar/boss_yogg_saron.cpp | 1 + .../ulduar/ulduar/instance_ulduar.cpp | 75 ++++++-- scripts/northrend/ulduar/ulduar/ulduar.h | 1 + sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 + sql/updates/r2954_mangos.sql | 1 + 7 files changed, 228 insertions(+), 24 deletions(-) create mode 100644 sql/updates/r2954_mangos.sql diff --git a/scripts/northrend/ulduar/ulduar/boss_thorim.cpp b/scripts/northrend/ulduar/ulduar/boss_thorim.cpp index c6567bd7c..9fc31ef32 100644 --- a/scripts/northrend/ulduar/ulduar/boss_thorim.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_thorim.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: boss_thorim -SD%Complete: 0% -SDComment: +SD%Complete: 20% +SDComment: Basic script SDCategory: Ulduar EndScriptData */ @@ -48,14 +48,177 @@ enum SAY_OUTRO_HARD_2 = -1603153, SAY_OUTRO_HARD_3 = -1603154, - SAY_HELP_YOGG = -1603155, - SAY_SIF_BEGIN = -1603156, SAY_SIF_EVENT = -1603157, SAY_SIF_DESPAWN = -1603158, + + // phase 1 spells + SPELL_SHEAT_OF_LIGHTNING = 62276, + SPELL_STORMHAMMER = 62042, + SPELL_DEAFENING_THUNDER = 62470, + SPELL_LIGHTNING_SHOCK = 62017, + SPELL_CHARGE_ORB = 62016, + SPELL_TOUCH_OF_DOMINION = 62507, // hard mode timer; triggers 62565 after 2.5 min + SPELL_BERSERK_1 = 62560, + SPELL_SUMMON_LIGHTNING_ORB = 62391, // on berserk + + // phase 2 spells + SPELL_CHAIN_LIGHTNING = 62131, + SPELL_CHAIN_LIGHTNING_H = 64390, + SPELL_LIGHTNING_CHARGE = 62279, + SPELL_LIGHTNING_CHARGE_DUMMY = 62466, // dummy effect hits npc 33378 and triggers spell 64098; cone target effect hits npc 32780 + SPELL_UNBALANCING_STRIKE = 62130, + SPELL_BERSERK_2 = 62555, + SPELL_THORIM_CREDIT = 64985, // kill credit spell; added in spell_template + + // Lightning related spells + SPELL_ACTIVATE_LIGHTNING_ORB_PERIODIC = 62184, // cast by npc 32879; starts the whole lightning event + SPELL_LIGHTNING_ORG_CHARGED = 62186, // cast by npc 33378; makes Thorim to cast 62466 + SPELL_LIGHTNING_PILLAR = 62976, // cast by npc 33378 to npc 33378 (not same guid); triggers 64098 on Thorim + SPELL_LIGHTNING_FIELD = 64972, // cast by npc 32892 + + // Sif spells + SPELL_FROST_BOLT = 62583, + SPELL_FROST_BOLT_H = 62601, + SPELL_FROSTBOLT_VOLLEY = 62580, + SPELL_FROSTBOLT_VOLLEY_H = 62604, + SPELL_FROST_NOVA = 62597, + SPELL_FROST_NOVA_H = 62605, + SPELL_BLIZZARD = 62576, + SPELL_BLIZZARD_H = 62602, + + // Colossus spells + SPELL_SMASH = 62339, + //SPELL_SMASH_RIGHT = 62414, + SPELL_RUNIC_SMASH_L = 62058, + SPELL_RUNIC_SMASH_R = 62057, + SPELL_RUNIC_BARRIER = 62338, + SPELL_CHARGE = 62613, + SPELL_CHARGE_H = 62614, + + // event npcs + NPC_SIF = 33196, + NPC_DARK_RUNE_CHAMPION = 32876, // arena npcs + NPC_DARK_RUNE_WARBRINGER = 32877, + NPC_DARK_RUNE_EVOKER = 32878, + NPC_DARK_RUNE_COMMONER = 32904, + NPC_DARK_RUNE_ACOLYTE_ARENA = 32886, + NPC_IRON_RING_GUARD = 32874, // hallway npcs + NPC_DARK_RUNE_ACOLYTE_HALLWAY = 33110, + NPC_IRON_HONOR_GUARD_1 = 33125, // stairs npcs + NPC_IRON_HONOR_GUARD_2 = 32875, + NPC_DARK_RUNE_ACOLYTE_STAIRS = 32957, + NPC_TRAP_BUNNY_1 = 33725, // thorim traps; have auras 62241 and 63540 + NPC_TRAP_BUNNY_2 = 33054, + + FACTION_ID_FRIENDLY = 35, +}; + +/*###### +## boss_thorim +######*/ + +struct MANGOS_DLL_DECL boss_thorimAI : public ScriptedAI +{ + boss_thorimAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (instance_ulduar*)pCreature->GetInstanceData(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); + m_bEventFinished = false; + Reset(); + } + + instance_ulduar* m_pInstance; + bool m_bIsRegularMode; + bool m_bEventFinished; + + uint32 m_uiBerserkTimer; + + void Reset() override + { + m_uiBerserkTimer = 5 * MINUTE * IN_MILLISECONDS; + + SetCombatMovement(false); + } + + void KilledUnit(Unit* pVictim) override + { + if (pVictim->GetTypeId() != TYPEID_PLAYER) + return; + + DoScriptText(urand(0, 1) ? SAY_SLAY_1 : SAY_SLAY_2, m_creature); + } + + void EnterEvadeMode() override + { + m_creature->RemoveAllAurasOnEvade(); + m_creature->DeleteThreatList(); + m_creature->CombatStop(true); + + if (m_creature->isAlive() && !m_bEventFinished) + m_creature->GetMotionMaster()->MoveTargetedHome(); + + m_creature->SetLootRecipient(NULL); + + Reset(); + } + + void DamageTaken(Unit* /*pDoneBy*/, uint32& uiDamage) override + { + if (uiDamage >= m_creature->GetHealth()) + { + uiDamage = 0; + + if (!m_bEventFinished) + { + if (m_pInstance) + m_pInstance->SetData(TYPE_THORIM, DONE); + + // ToDo: start outro dialogue + m_creature->CastSpell(m_creature, SPELL_THORIM_CREDIT, true); + + m_creature->ForcedDespawn(10000); + m_creature->setFaction(FACTION_ID_FRIENDLY); + m_bEventFinished = true; + EnterEvadeMode(); + } + } + } + + void Aggro(Unit* pWho) override + { + if (m_pInstance) + m_pInstance->SetData(TYPE_THORIM, IN_PROGRESS); + + // ToDo: start intro dialogue + } + + void JustReachedHome() override + { + if (m_pInstance) + m_pInstance->SetData(TYPE_THORIM, FAIL); + } + + void UpdateAI(const uint32 uiDiff) override + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + DoMeleeAttackIfReady(); + } }; +CreatureAI* GetAI_boss_thorim(Creature* pCreature) +{ + return new boss_thorimAI(pCreature); +} + void AddSC_boss_thorim() { + Script* pNewScript; + pNewScript = new Script; + pNewScript->Name = "boss_thorim"; + pNewScript->GetAI = GetAI_boss_thorim; + pNewScript->RegisterSelf(); } diff --git a/scripts/northrend/ulduar/ulduar/boss_yogg_saron.cpp b/scripts/northrend/ulduar/ulduar/boss_yogg_saron.cpp index fa2c74e42..282d36489 100644 --- a/scripts/northrend/ulduar/ulduar/boss_yogg_saron.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_yogg_saron.cpp @@ -71,6 +71,7 @@ enum EMOTE_VISION_BLAST = -1603234, EMOTE_SHATTER_BLAST = -1603235, + SAY_THORIM_HELP = -1603155, SAY_HODIR_HELP = -1603093, }; diff --git a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp index 19e5dd2f0..b8ba072d4 100644 --- a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp +++ b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp @@ -58,7 +58,8 @@ instance_ulduar::instance_ulduar(Map* pMap) : ScriptedInstance(pMap), DialogueHe m_bHelpersLoaded(false), m_uiAlgalonTimer(MINUTE * IN_MILLISECONDS), m_uiShatterAchievTimer(0), - m_uiGauntletStatus(0) + m_uiGauntletStatus(0), + m_uiSlayedArenaMobs(0) { Initialize(); } @@ -322,7 +323,8 @@ void instance_ulduar::OnObjectCreate(GameObject* pGo) // Prison case GO_ANCIENT_GATE: - DoOpenMadnessDoorIfCan(); + if (m_auiEncounter[TYPE_MIMIRON] == DONE && m_auiEncounter[TYPE_HODIR] == DONE && m_auiEncounter[TYPE_THORIM] == DONE && m_auiEncounter[TYPE_FREYA] == DONE) + pGo->SetGoState(GO_STATE_ACTIVE); break; case GO_VEZAX_GATE: pGo->SetGoState(GO_STATE_READY); @@ -383,16 +385,14 @@ void instance_ulduar::OnObjectCreate(GameObject* pGo) void instance_ulduar::DoOpenMadnessDoorIfCan() { if (m_auiEncounter[TYPE_MIMIRON] == DONE && m_auiEncounter[TYPE_HODIR] == DONE && m_auiEncounter[TYPE_THORIM] == DONE && m_auiEncounter[TYPE_FREYA] == DONE) - { - if (GameObject* pDoor = GetSingleGameObjectFromStorage(GO_ANCIENT_GATE)) - pDoor->SetGoState(GO_STATE_ACTIVE); - } + DoUseDoorOrButton(GO_ANCIENT_GATE); } void instance_ulduar::SetData(uint32 uiType, uint32 uiData) { switch (uiType) { + // Siege of Ulduar case TYPE_LEVIATHAN: m_auiEncounter[uiType] = uiData; if (uiData != SPECIAL) @@ -499,6 +499,8 @@ void instance_ulduar::SetData(uint32 uiType, uint32 uiData) SetSpecialAchievementCriteria(TYPE_ACHIEV_NERF_ENG, true); } break; + + // Antechamber of Ulduar case TYPE_ASSEMBLY: // Don't set the same encounter data twice if (uiData == m_auiEncounter[uiType]) @@ -549,7 +551,8 @@ void instance_ulduar::SetData(uint32 uiType, uint32 uiData) SetSpecialAchievementCriteria(TYPE_ACHIEV_NINE_LIVES, false); } break; - // Keepers + + // Keepers of Ulduar case TYPE_MIMIRON: m_auiEncounter[uiType] = uiData; DoUseDoorOrButton(GO_MIMIRON_DOOR_1); @@ -559,7 +562,9 @@ void instance_ulduar::SetData(uint32 uiType, uint32 uiData) { if (GetData(TYPE_MIMIRON_HARD) != DONE) DoRespawnGameObject(instance->IsRegularDifficulty() ? GO_CACHE_OF_INOV_10 : GO_CACHE_OF_INOV_25, 30 * MINUTE); + SpawnFriendlyKeeper(NPC_KEEPER_MIMIRON); + DoOpenMadnessDoorIfCan(); } break; case TYPE_HODIR: @@ -575,6 +580,7 @@ void instance_ulduar::SetData(uint32 uiType, uint32 uiData) DoToggleGameObjectFlags(instance->IsRegularDifficulty() ? GO_CACHE_OF_RARE_WINTER_10 : GO_CACHE_OF_RARE_WINTER_25, GO_FLAG_NO_INTERACT, false); SpawnFriendlyKeeper(NPC_KEEPER_HODIR); + DoOpenMadnessDoorIfCan(); } else if (uiData == FAIL) { @@ -597,24 +603,37 @@ void instance_ulduar::SetData(uint32 uiType, uint32 uiData) DoUseDoorOrButton(GO_LIGHTNING_FIELD); if (uiData == IN_PROGRESS) DoUseDoorOrButton(GO_DARK_IRON_PORTCULIS); - if (uiData == DONE) + else if (uiData == DONE) { if (GetData(TYPE_THORIM_HARD) != DONE) DoRespawnGameObject(instance->IsRegularDifficulty() ? GO_CACHE_OF_STORMS_10 : GO_CACHE_OF_STORMS_25, 30 * MINUTE); + SpawnFriendlyKeeper(NPC_KEEPER_THORIM); + DoOpenMadnessDoorIfCan(); } else if (uiData == FAIL) { + if (GameObject* pDoor = GetSingleGameObjectFromStorage(GO_RUNED_STONE_DOOR)) + pDoor->ResetDoorOrButton(); + if (GameObject* pDoor = GetSingleGameObjectFromStorage(GO_THORIM_STONE_DOOR)) + pDoor->ResetDoorOrButton(); + if (Player* pPlayer = GetPlayerInMap()) DoSpawnThorimNpcs(pPlayer); + + m_uiSlayedArenaMobs = 0; } break; case TYPE_FREYA: m_auiEncounter[uiType] = uiData; if (uiData == DONE) + { SpawnFriendlyKeeper(NPC_KEEPER_FREYA); + DoOpenMadnessDoorIfCan(); + } break; - // Prison + + // Ulduar Prison case TYPE_VEZAX: m_auiEncounter[uiType] = uiData; if (uiData == DONE) @@ -657,28 +676,28 @@ void instance_ulduar::SetData(uint32 uiType, uint32 uiData) DoUpdateWorldState(WORLD_STATE_TIMER_COUNT, m_auiEncounter[uiType]); break; - // Hard modes + // Hard modes (not saved) case TYPE_LEVIATHAN_HARD: m_auiHardBoss[0] = uiData; - break; + return; case TYPE_XT002_HARD: m_auiHardBoss[1] = uiData; - break; + return; case TYPE_HODIR_HARD: m_auiHardBoss[2] = uiData; - break; + return; case TYPE_THORIM_HARD: m_auiHardBoss[3] = uiData; - break; + return; case TYPE_MIMIRON_HARD: m_auiHardBoss[4] = uiData; - break; + return; case TYPE_VEZAX_HARD: m_auiHardBoss[5] = uiData; - break; + return; case TYPE_YOGGSARON_HARD: m_auiHardBoss[6] = uiData; - break; + return; // Ulduar keepers case TYPE_KEEPER_HODIR: @@ -730,8 +749,6 @@ void instance_ulduar::SetData(uint32 uiType, uint32 uiData) return; } - DoOpenMadnessDoorIfCan(); - if (uiData == DONE || uiData == FAIL || uiData == SPECIAL || uiType == TYPE_ALGALON_TIMER) { OUT_SAVE_INST_DATA; @@ -936,6 +953,26 @@ void instance_ulduar::OnCreatureDeath(Creature* pCreature) if (GetData(TYPE_HODIR) == IN_PROGRESS) SetSpecialAchievementCriteria(TYPE_ACHIEV_COOL_FRIENDS, false); break; + case NPC_JORMUNGAR_BEHEMOTH: + case NPC_SOLDIER_ALLIANCE: + case NPC_CAPTAIN_ALLIANCE: + case NPC_SOLDIER_HORDE: + case NPC_CAPTAIN_HORDE: + ++m_uiSlayedArenaMobs; + + // start combat when all 4 faction soldiers and the Jormungar are dead + if (m_uiSlayedArenaMobs == 5) + { + if (Creature* pThorim = GetSingleCreatureFromStorage(NPC_THORIM)) + pThorim->SetInCombatWithZone(); + } + break; + case NPC_RUNIC_COLOSSUS: + DoUseDoorOrButton(GO_RUNED_STONE_DOOR); + break; + case NPC_RUNE_GIANT: + DoUseDoorOrButton(GO_THORIM_STONE_DOOR); + break; } } diff --git a/scripts/northrend/ulduar/ulduar/ulduar.h b/scripts/northrend/ulduar/ulduar/ulduar.h index 627b3f4b9..57d63754b 100644 --- a/scripts/northrend/ulduar/ulduar/ulduar.h +++ b/scripts/northrend/ulduar/ulduar/ulduar.h @@ -487,6 +487,7 @@ class MANGOS_DLL_DECL instance_ulduar : public ScriptedInstance, private Dialogu uint32 m_uiAlgalonTimer; uint32 m_uiShatterAchievTimer; uint32 m_uiGauntletStatus; + uint8 m_uiSlayedArenaMobs; ObjectGuid m_leftKoloStalkerGuid; ObjectGuid m_rightKoloStalkerGuid; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 754ddd322..f2f3ab2cd 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2953" + #define SD2_REVISION_NR "2954" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index fb7aef6fc..13ee4e8c2 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -1302,6 +1302,7 @@ UPDATE gameobject_template SET ScriptName='go_celestial_access' WHERE entry IN ( UPDATE creature_template SET ScriptName='boss_hodir' WHERE entry=32845; UPDATE creature_template SET ScriptName='npc_flash_freeze' WHERE entry IN (32926,32938); UPDATE creature_template SET ScriptName='npc_icicle_target' WHERE entry=33174; +UPDATE creature_template SET ScriptName='boss_thorim' WHERE entry=32865; DELETE FROM scripted_event_id WHERE id IN (9735,20907,20964,21030,21031,21032,21033,21045,21605,21606,21620); INSERT INTO scripted_event_id VALUES (9735, 'event_spell_saronite_barrier'), -- Vezax saronite barrier event diff --git a/sql/updates/r2954_mangos.sql b/sql/updates/r2954_mangos.sql new file mode 100644 index 000000000..be7d44dcb --- /dev/null +++ b/sql/updates/r2954_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='boss_thorim' WHERE entry=32865; From c364af159041859b90090f2a46851b188933f7fc Mon Sep 17 00:00:00 2001 From: Xfurry Date: Fri, 4 Oct 2013 01:08:51 +0300 Subject: [PATCH 0965/1172] [2955] Add script support for quest 10988 Thanks @grz3s for providing the necessary data Please note that the spawns locations and durations for creature entry 22986 and go entry 185541 need to be synced --- scripts/outland/terokkar_forest.cpp | 99 ++++++++++++++++++++++++++++- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 + sql/scriptdev2_script_full.sql | 6 +- sql/updates/r2955_mangos.sql | 1 + sql/updates/r2955_scriptdev2.sql | 5 ++ 6 files changed, 111 insertions(+), 3 deletions(-) create mode 100644 sql/updates/r2955_mangos.sql create mode 100644 sql/updates/r2955_scriptdev2.sql diff --git a/scripts/outland/terokkar_forest.cpp b/scripts/outland/terokkar_forest.cpp index b080cfbbe..f03f1c88d 100644 --- a/scripts/outland/terokkar_forest.cpp +++ b/scripts/outland/terokkar_forest.cpp @@ -17,7 +17,7 @@ /* ScriptData SDName: Terokkar_Forest SD%Complete: 80 -SDComment: Quest support: 9889, 10009, 10873, 10896, 10446/10447, 10852, 10887, 10922, 11096, 11093, 10051, 10052, 10898. +SDComment: Quest support: 9889, 10009, 10051, 10052, 10446/10447, 10852, 10873, 10887, 10896, 10898, 10922, 10988, 11093, 11096. SDCategory: Terokkar Forest EndScriptData */ @@ -33,6 +33,7 @@ go_veil_skith_cage npc_captive_child npc_isla_starmane npc_skywing +npc_cenarion_sparrowhawk EndContentData */ #include "precompiled.h" @@ -1026,6 +1027,97 @@ CreatureAI* GetAI_npc_skywing(Creature* pCreature) return new npc_skywingAI(pCreature); } +/*###### +## npc_cenarion_sparrowhawk +######*/ + +enum +{ + EMOTE_FOLLOW = -1000963, + EMOTE_SURVEY = -1000964, + EMOTE_LOCATE = -1000965, + + NPC_SKETTIS_RAVEN_STONE = 22986, + GO_RAVEN_STONE = 185541, +}; + +struct MANGOS_DLL_DECL npc_cenarion_sparrowhawkAI : public ScriptedAI +{ + npc_cenarion_sparrowhawkAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } + + uint32 m_uiSurveyTimer; + bool m_bFirstTimer; + + ObjectGuid m_currentStone; + + void Reset() override + { + m_uiSurveyTimer = 3000; + m_bFirstTimer = true; + DoScriptText(EMOTE_FOLLOW, m_creature); + } + + void MovementInform(uint32 uiMoveType, uint32 uiPointId) override + { + if (uiMoveType != POINT_MOTION_TYPE || !uiPointId) + return; + + // despawn the trigger and spawn the nearby stone + if (Creature* pStoneTrigger = m_creature->GetMap()->GetCreature(m_currentStone)) + pStoneTrigger->ForcedDespawn(); + + if (GameObject* pStone = GetClosestGameObjectWithEntry(m_creature, GO_RAVEN_STONE, 5.0f)) + { + pStone->SetRespawnTime(pStone->GetRespawnDelay()); + pStone->Refresh(); + } + DoScriptText(EMOTE_LOCATE, m_creature); + + // check if we still have other stones in range + m_uiSurveyTimer = 5000; + } + + void DoFindNearbyStones() + { + float fX, fY, fZ; + if (Creature* pStoneTrigger = GetClosestCreatureWithEntry(m_creature, NPC_SKETTIS_RAVEN_STONE, 80.0f)) + { + m_currentStone = pStoneTrigger->GetObjectGuid(); + pStoneTrigger->GetContactPoint(m_creature, fX, fY, fZ); + + m_creature->SetWalk(false); + m_creature->GetMotionMaster()->MovePoint(1, fX, fY, fZ); + } + else + m_creature->ForcedDespawn(10000); + } + + void UpdateAI(const uint32 uiDiff) override + { + if (m_uiSurveyTimer) + { + if (m_uiSurveyTimer <= uiDiff) + { + if (m_bFirstTimer) + { + DoScriptText(EMOTE_SURVEY, m_creature); + m_bFirstTimer = false; + } + + DoFindNearbyStones(); + m_uiSurveyTimer = 0; + } + else + m_uiSurveyTimer -= uiDiff; + } + } +}; + +CreatureAI* GetAI_npc_cenarion_sparrowhawk(Creature* pCreature) +{ + return new npc_cenarion_sparrowhawkAI(pCreature); +} + void AddSC_terokkar_forest() { Script* pNewScript; @@ -1088,4 +1180,9 @@ void AddSC_terokkar_forest() pNewScript->GetAI = &GetAI_npc_skywing; pNewScript->pQuestAcceptNPC = &QuestAccept_npc_skywing; pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_cenarion_sparrowhawk"; + pNewScript->GetAI = &GetAI_npc_cenarion_sparrowhawk; + pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index f2f3ab2cd..1430f10aa 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2954" + #define SD2_REVISION_NR "2955" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 13ee4e8c2..71c2c48fb 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -1215,6 +1215,7 @@ UPDATE gameobject_template SET ScriptName='go_mana_bomb' WHERE entry=184725; UPDATE creature_template SET ScriptName='npc_captive_child' WHERE entry=22314; UPDATE creature_template SET ScriptName='npc_isla_starmane' WHERE entry=18760; UPDATE creature_template SET ScriptName="npc_skywing" WHERE entry=22424; +UPDATE creature_template SET ScriptName="npc_cenarion_sparrowhawk" WHERE entry=22972; /* THOUSAND NEEDLES */ UPDATE creature_template SET ScriptName='npc_kanati' WHERE entry=10638; diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 332634d82..df5a30277 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -1037,7 +1037,11 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1000959,'This part of forest are very danger for us. We must be a careful!',0,0,0,0,'stinky ignatz SAY_STINKY_FIRST_STOP'), (-1000960,'Kill two monsters, who stay near Bogbean plant and then I gather a bogbean.',0,0,0,0,'stinky ignatz SAY_STINKY_2_MONSTERS'), (-1000961,'I am gathering a bogbean. It takes some time.',0,0,0,69,'stinky ignatz SAY_STINKY_GATHERING'), -(-1000962,'Thanks you for help.',0,0,0,0,'stinky ignatz SAY_STINKY_END'); +(-1000962,'Thanks you for help.',0,0,0,0,'stinky ignatz SAY_STINKY_END'), + +(-1000963,'%s looks at you for a moment, then motions for you to follow.',0,2,0,0,'cenarion sparrowhawk EMOTE_FOLLOW'), +(-1000964,'%s surveys the ground for the buried raven stones.',0,2,0,0,'cenarion sparrowhawk EMOTE_SURVEY'), +(-1000965,'%s locates a buried raven stone.',0,2,0,0,'cenarion sparrowhawk EMOTE_LOCATE'); -- -1 033 000 SHADOWFANG KEEP INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES diff --git a/sql/updates/r2955_mangos.sql b/sql/updates/r2955_mangos.sql new file mode 100644 index 000000000..0fcef2fb9 --- /dev/null +++ b/sql/updates/r2955_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName="npc_cenarion_sparrowhawk" WHERE entry=22972; diff --git a/sql/updates/r2955_scriptdev2.sql b/sql/updates/r2955_scriptdev2.sql new file mode 100644 index 000000000..a7664bc4e --- /dev/null +++ b/sql/updates/r2955_scriptdev2.sql @@ -0,0 +1,5 @@ +DELETE FROM script_texts WHERE entry IN (-1000963,-1000964,-1000965); +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1000963,'%s looks at you for a moment, then motions for you to follow.',0,2,0,0,'cenarion sparrowhawk EMOTE_FOLLOW'), +(-1000964,'%s surveys the ground for the buried raven stones.',0,2,0,0,'cenarion sparrowhawk EMOTE_SURVEY'), +(-1000965,'%s locates a buried raven stone.',0,2,0,0,'cenarion sparrowhawk EMOTE_LOCATE'); From c83e32942e4f16a7d6ef3e54d33eab2c46a0d094 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sat, 5 Oct 2013 01:14:34 +0300 Subject: [PATCH 0966/1172] [2956] Implement Thorim combat phases --- .../northrend/ulduar/ulduar/boss_thorim.cpp | 213 +++++++++++++++++- .../ulduar/ulduar/instance_ulduar.cpp | 19 +- scripts/northrend/ulduar/ulduar/ulduar.h | 5 + sd2_revision_nr.h | 2 +- 4 files changed, 223 insertions(+), 16 deletions(-) diff --git a/scripts/northrend/ulduar/ulduar/boss_thorim.cpp b/scripts/northrend/ulduar/ulduar/boss_thorim.cpp index 9fc31ef32..38a73c102 100644 --- a/scripts/northrend/ulduar/ulduar/boss_thorim.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_thorim.cpp @@ -16,7 +16,7 @@ /* ScriptData SDName: boss_thorim -SD%Complete: 20% +SD%Complete: 50% SDComment: Basic script SDCategory: Ulduar EndScriptData */ @@ -43,7 +43,6 @@ enum SAY_OUTRO_1 = -1603149, SAY_OUTRO_2 = -1603150, SAY_OUTRO_3 = -1603151, - SAY_OUTRO_HARD_1 = -1603152, SAY_OUTRO_HARD_2 = -1603153, SAY_OUTRO_HARD_3 = -1603154, @@ -61,6 +60,7 @@ enum SPELL_TOUCH_OF_DOMINION = 62507, // hard mode timer; triggers 62565 after 2.5 min SPELL_BERSERK_1 = 62560, SPELL_SUMMON_LIGHTNING_ORB = 62391, // on berserk + SPELL_LIGHTNING_DESTRUCTION = 62393, // cast by npc 33138 on berserk // phase 2 spells SPELL_CHAIN_LIGHTNING = 62131, @@ -70,6 +70,8 @@ enum SPELL_UNBALANCING_STRIKE = 62130, SPELL_BERSERK_2 = 62555, SPELL_THORIM_CREDIT = 64985, // kill credit spell; added in spell_template + SPELL_STORMHAMMER_OUTRO = 64767, // target npc 33196 and trigger spells 62470, 64909 and 64778 and despawn target in 10 sec + SPELL_TELEPORT = 62940, // Lightning related spells SPELL_ACTIVATE_LIGHTNING_ORB_PERIODIC = 62184, // cast by npc 32879; starts the whole lightning event @@ -97,7 +99,7 @@ enum SPELL_CHARGE_H = 62614, // event npcs - NPC_SIF = 33196, + NPC_LIGHTNING_ORB = 33138, // spawned on arena berserk NPC_DARK_RUNE_CHAMPION = 32876, // arena npcs NPC_DARK_RUNE_WARBRINGER = 32877, NPC_DARK_RUNE_EVOKER = 32878, @@ -112,18 +114,47 @@ enum NPC_TRAP_BUNNY_2 = 33054, FACTION_ID_FRIENDLY = 35, + PHASE_ARENA = 1, + PHASE_SOLO = 2, + PHASE_TRANSITION = 3, +}; + +static const DialogueEntry aThorimDialogue[] = +{ + {SAY_AGGRO_1, NPC_THORIM, 9000}, + {SAY_AGGRO_2, NPC_THORIM, 7000}, + {NPC_SIF, 0, 5000}, + {SPELL_TOUCH_OF_DOMINION, 0, 0}, + {SAY_JUMP, NPC_THORIM, 10000}, + {PHASE_SOLO, 0, 0}, + {SAY_DEFEATED, NPC_THORIM, 3000}, + {SAY_OUTRO_1, NPC_THORIM, 10000}, + {SAY_OUTRO_2, NPC_THORIM, 12000}, + {SAY_OUTRO_3, NPC_THORIM, 10000}, + {SPELL_TELEPORT, 0, 0}, + {SPELL_STORMHAMMER_OUTRO, 0, 3000}, + {SAY_OUTRO_HARD_1, NPC_THORIM, 6000}, + {SAY_OUTRO_HARD_2, NPC_THORIM, 12000}, + {SAY_OUTRO_HARD_3, NPC_THORIM, 10000}, + {SPELL_THORIM_CREDIT, 0, 0}, + {0, 0, 0}, }; +static const float afSifSpawnLoc[4] = {2148.301f, -297.8453f, 438.3308f, 2.68f}; +static const float afArenaCenterLoc[3] = {2134.8f, -263.056f, 419.983f}; + /*###### ## boss_thorim ######*/ -struct MANGOS_DLL_DECL boss_thorimAI : public ScriptedAI +struct MANGOS_DLL_DECL boss_thorimAI : public ScriptedAI, private DialogueHelper { - boss_thorimAI(Creature* pCreature) : ScriptedAI(pCreature) + boss_thorimAI(Creature* pCreature) : ScriptedAI(pCreature), + DialogueHelper(aThorimDialogue) { m_pInstance = (instance_ulduar*)pCreature->GetInstanceData(); m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); + InitializeDialogueHelper(m_pInstance); m_bEventFinished = false; Reset(); } @@ -133,10 +164,16 @@ struct MANGOS_DLL_DECL boss_thorimAI : public ScriptedAI bool m_bEventFinished; uint32 m_uiBerserkTimer; + uint8 m_uiPhase; + + uint32 m_uiHardModeCheckTimer; void Reset() override { - m_uiBerserkTimer = 5 * MINUTE * IN_MILLISECONDS; + m_uiPhase = PHASE_ARENA; + m_uiBerserkTimer = 5 * MINUTE * IN_MILLISECONDS; + + m_uiHardModeCheckTimer = 0; SetCombatMovement(false); } @@ -165,6 +202,24 @@ struct MANGOS_DLL_DECL boss_thorimAI : public ScriptedAI void DamageTaken(Unit* /*pDoneBy*/, uint32& uiDamage) override { + // switch to phase 2 as soon as it's hit by any damage + if (m_uiPhase == PHASE_ARENA && uiDamage > 0) + { + StartNextDialogueText(SAY_JUMP); + m_uiPhase = PHASE_TRANSITION; + + // prepare the hard mode if necessary + if (m_pInstance && m_pInstance->GetData(TYPE_THORIM_HARD) != FAIL) + { + if (Creature* pSif = m_pInstance->GetSingleCreatureFromStorage(NPC_SIF)) + pSif->InterruptNonMeleeSpells(false); + + m_pInstance->SetData(TYPE_THORIM_HARD, DONE); + } + return; + } + + // handle outro if (uiDamage >= m_creature->GetHealth()) { uiDamage = 0; @@ -172,12 +227,17 @@ struct MANGOS_DLL_DECL boss_thorimAI : public ScriptedAI if (!m_bEventFinished) { if (m_pInstance) + { m_pInstance->SetData(TYPE_THORIM, DONE); - // ToDo: start outro dialogue - m_creature->CastSpell(m_creature, SPELL_THORIM_CREDIT, true); + // start a different outro version for hard mode + if (m_pInstance->GetData(TYPE_THORIM_HARD) == DONE) + StartNextDialogueText(SPELL_STORMHAMMER_OUTRO); + else + StartNextDialogueText(SAY_DEFEATED); + } - m_creature->ForcedDespawn(10000); + m_creature->CastSpell(m_creature, SPELL_THORIM_CREDIT, true); m_creature->setFaction(FACTION_ID_FRIENDLY); m_bEventFinished = true; EnterEvadeMode(); @@ -188,9 +248,12 @@ struct MANGOS_DLL_DECL boss_thorimAI : public ScriptedAI void Aggro(Unit* pWho) override { if (m_pInstance) + { m_pInstance->SetData(TYPE_THORIM, IN_PROGRESS); + m_pInstance->SetData(TYPE_THORIM_HARD, NOT_STARTED); + } - // ToDo: start intro dialogue + StartNextDialogueText(SAY_AGGRO_1); } void JustReachedHome() override @@ -199,12 +262,140 @@ struct MANGOS_DLL_DECL boss_thorimAI : public ScriptedAI m_pInstance->SetData(TYPE_THORIM, FAIL); } + void MovementInform(uint32 uiMotionType, uint32 uiPointId) override + { + if (uiMotionType != EFFECT_MOTION_TYPE || !uiPointId) + return; + + m_uiPhase = PHASE_SOLO; + SetCombatMovement(true); + DoStartMovement(m_creature->getVictim()); + m_creature->RemoveAurasDueToSpell(SPELL_SHEAT_OF_LIGHTNING); + + // make Sif attack too if hard mode is active + if (m_pInstance && m_pInstance->GetData(TYPE_THORIM_HARD) == DONE) + { + if (Creature* pSif = m_pInstance->GetSingleCreatureFromStorage(NPC_SIF)) + { + DoScriptText(SAY_SIF_EVENT, pSif); + pSif->AI()->AttackStart(m_creature->getVictim()); + } + } + } + + void JustSummoned(Creature* pSummoned) override + { + // the lightning orb should clean out the whole hallway on arena berserk + if (pSummoned->GetEntry() == NPC_LIGHTNING_ORB) + pSummoned->CastSpell(pSummoned, SPELL_LIGHTNING_DESTRUCTION, true); + } + + void JustDidDialogueStep(int32 iEntry) override + { + if (!m_pInstance) + return; + + switch (iEntry) + { + case NPC_SIF: + DoCastSpellIfCan(m_creature, SPELL_SHEAT_OF_LIGHTNING, CAST_TRIGGERED | CAST_AURA_NOT_PRESENT); + if (Creature* pSif = m_creature->SummonCreature(NPC_SIF, afSifSpawnLoc[0], afSifSpawnLoc[1], afSifSpawnLoc[2], afSifSpawnLoc[3], TEMPSUMMON_CORPSE_DESPAWN, 0)) + DoScriptText(SAY_SIF_BEGIN, pSif); + break; + case SPELL_TOUCH_OF_DOMINION: + if (Creature* pSif = m_pInstance->GetSingleCreatureFromStorage(NPC_SIF)) + pSif->CastSpell(m_creature, SPELL_TOUCH_OF_DOMINION, false); + m_uiHardModeCheckTimer = 150000; + break; + case PHASE_SOLO: + m_creature->GetMotionMaster()->MoveJump(afArenaCenterLoc[0], afArenaCenterLoc[1], afArenaCenterLoc[2], 45.55969f, 5.0f, 1); + break; + case SPELL_STORMHAMMER_OUTRO: + DoScriptText(SAY_DEFEATED, m_creature); + break; + case SAY_OUTRO_HARD_1: + DoCastSpellIfCan(m_creature, SPELL_STORMHAMMER_OUTRO); + break; + case SPELL_TELEPORT: + case SPELL_THORIM_CREDIT: + if (DoCastSpellIfCan(m_creature, SPELL_TELEPORT) == CAST_OK) + m_creature->ForcedDespawn(2000); + break; + } + } + void UpdateAI(const uint32 uiDiff) override { + DialogueUpdate(uiDiff); + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - DoMeleeAttackIfReady(); + switch (m_uiPhase) + { + // arena phase abilities + case PHASE_ARENA: + + if (m_uiHardModeCheckTimer) + { + if (m_uiHardModeCheckTimer <= uiDiff) + { + // hard mode is failed; despawn Sif + if (m_pInstance) + { + m_pInstance->SetData(TYPE_THORIM_HARD, FAIL); + + if (Creature* pSif = m_pInstance->GetSingleCreatureFromStorage(NPC_SIF)) + { + DoScriptText(SAY_SIF_DESPAWN, pSif); + pSif->ForcedDespawn(1000); + } + } + m_uiHardModeCheckTimer = 0; + } + else + m_uiHardModeCheckTimer -= uiDiff; + } + + if (m_uiBerserkTimer) + { + if (m_uiBerserkTimer <= uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_BERSERK_1) == CAST_OK) + { + DoCastSpellIfCan(m_creature, SPELL_SUMMON_LIGHTNING_ORB, CAST_TRIGGERED); + DoScriptText(SAY_ARENA_WIPE, m_creature); + m_uiBerserkTimer = 0; + } + } + else + m_uiBerserkTimer -= uiDiff; + } + + // no break; same combat abilities, but in transition + case PHASE_TRANSITION: + + break; + // solo phase abilities + case PHASE_SOLO: + + if (m_uiBerserkTimer) + { + if (m_uiBerserkTimer <= uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_BERSERK_2) == CAST_OK) + { + DoScriptText(SAY_BERSERK, m_creature); + m_uiBerserkTimer = 0; + } + } + else + m_uiBerserkTimer -= uiDiff; + } + + DoMeleeAttackIfReady(); + break; + } } }; diff --git a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp index b8ba072d4..05643c7d5 100644 --- a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp +++ b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp @@ -161,6 +161,7 @@ void instance_ulduar::OnCreatureCreate(Creature* pCreature) case NPC_LEVIATHAN_MK: case NPC_RUNIC_COLOSSUS: case NPC_RUNE_GIANT: + case NPC_SIF: case NPC_JORMUNGAR_BEHEMOTH: case NPC_ELDER_BRIGHTLEAF: case NPC_ELDER_IRONBRACH: @@ -316,9 +317,7 @@ void instance_ulduar::OnObjectCreate(GameObject* pGo) case GO_RUNED_STONE_DOOR: case GO_THORIM_STONE_DOOR: case GO_LIGHTNING_FIELD: - break; case GO_DOOR_LEVER: - pGo->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NO_INTERACT); break; // Prison @@ -602,17 +601,26 @@ void instance_ulduar::SetData(uint32 uiType, uint32 uiData) m_auiEncounter[uiType] = uiData; DoUseDoorOrButton(GO_LIGHTNING_FIELD); if (uiData == IN_PROGRESS) - DoUseDoorOrButton(GO_DARK_IRON_PORTCULIS); + DoToggleGameObjectFlags(GO_DOOR_LEVER, GO_FLAG_NO_INTERACT, false); else if (uiData == DONE) { - if (GetData(TYPE_THORIM_HARD) != DONE) + if (GetData(TYPE_THORIM_HARD) == DONE) + { + DoRespawnGameObject(instance->IsRegularDifficulty() ? GO_CACHE_OF_STORMS_10_H : GO_CACHE_OF_STORMS_25_H, 30 * MINUTE); + DoToggleGameObjectFlags(instance->IsRegularDifficulty() ? GO_CACHE_OF_STORMS_10_H : GO_CACHE_OF_STORMS_25_H, GO_FLAG_NO_INTERACT, false); + } + else + { DoRespawnGameObject(instance->IsRegularDifficulty() ? GO_CACHE_OF_STORMS_10 : GO_CACHE_OF_STORMS_25, 30 * MINUTE); + DoToggleGameObjectFlags(instance->IsRegularDifficulty() ? GO_CACHE_OF_STORMS_10 : GO_CACHE_OF_STORMS_25, GO_FLAG_NO_INTERACT, false); + } SpawnFriendlyKeeper(NPC_KEEPER_THORIM); DoOpenMadnessDoorIfCan(); } else if (uiData == FAIL) { + DoToggleGameObjectFlags(GO_DOOR_LEVER, GO_FLAG_NO_INTERACT, true); if (GameObject* pDoor = GetSingleGameObjectFromStorage(GO_RUNED_STONE_DOOR)) pDoor->ResetDoorOrButton(); if (GameObject* pDoor = GetSingleGameObjectFromStorage(GO_THORIM_STONE_DOOR)) @@ -1090,6 +1098,9 @@ bool instance_ulduar::CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player c case ACHIEV_CRIT_COOL_FRIENDS_N: case ACHIEV_CRIT_COOL_FRIENDS_H: return m_abAchievCriteria[TYPE_ACHIEV_COOL_FRIENDS]; + case ACHIEV_CRIT_LOSE_ILLUSION_N: + case ACHIEV_CRIT_LOSE_ILLUSION_H: + return GetData(TYPE_THORIM_HARD) == DONE; default: return false; diff --git a/scripts/northrend/ulduar/ulduar/ulduar.h b/scripts/northrend/ulduar/ulduar/ulduar.h index 57d63754b..f04936c4c 100644 --- a/scripts/northrend/ulduar/ulduar/ulduar.h +++ b/scripts/northrend/ulduar/ulduar/ulduar.h @@ -141,6 +141,7 @@ enum // Thorim event npcs NPC_RUNIC_COLOSSUS = 32872, NPC_RUNE_GIANT = 32873, + NPC_SIF = 33196, NPC_JORMUNGAR_BEHEMOTH = 32882, NPC_SOLDIER_ALLIANCE = 32885, NPC_CAPTAIN_ALLIANCE = 32908, @@ -364,6 +365,10 @@ enum ACHIEV_CRIT_COOL_FRIENDS_H = 10260, ACHIEV_CRIT_RARE_CACHE_N = 10452, // Hodir, achievs 3182, 3184 ACHIEV_CRIT_RARE_CACHE_H = 10458, + ACHIEV_CRIT_LIGHTNING_N = 10305, // Thorim, achievs 2971, 2972 + ACHIEV_CRIT_LIGHTNING_H = 10309, + ACHIEV_CRIT_LOSE_ILLUSION_N = 10440, // Thorim, achievs 3176, 3183 + ACHIEV_CRIT_LOSE_ILLUSION_H = 10457, }; struct UlduarSpawns diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 1430f10aa..8f79de133 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2955" + #define SD2_REVISION_NR "2956" #endif // __SD2_REVISION_NR_H__ From 4fbb7efddd049289cfb017bdb8c9b6b70cb1bf54 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sun, 6 Oct 2013 00:37:22 +0300 Subject: [PATCH 0967/1172] [2957] Allow grid searchers to exclude the source from the actual search This is useful when searching for a creature with same entry as the source --- include/sc_grid_searchers.cpp | 4 ++-- include/sc_grid_searchers.h | 2 +- sd2_revision_nr.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/sc_grid_searchers.cpp b/include/sc_grid_searchers.cpp index 05b455669..114e4aace 100644 --- a/include/sc_grid_searchers.cpp +++ b/include/sc_grid_searchers.cpp @@ -23,11 +23,11 @@ GameObject* GetClosestGameObjectWithEntry(WorldObject* pSource, uint32 uiEntry, } // return closest creature alive in grid, with range from pSource -Creature* GetClosestCreatureWithEntry(WorldObject* pSource, uint32 uiEntry, float fMaxSearchRange, bool bOnlyAlive/*=true*/, bool bOnlyDead/*=false*/) +Creature* GetClosestCreatureWithEntry(WorldObject* pSource, uint32 uiEntry, float fMaxSearchRange, bool bOnlyAlive/*=true*/, bool bOnlyDead/*=false*/, bool bExcludeSelf/*=false*/) { Creature* pCreature = NULL; - MaNGOS::NearestCreatureEntryWithLiveStateInObjectRangeCheck creature_check(*pSource, uiEntry, bOnlyAlive, bOnlyDead, fMaxSearchRange); + MaNGOS::NearestCreatureEntryWithLiveStateInObjectRangeCheck creature_check(*pSource, uiEntry, bOnlyAlive, bOnlyDead, fMaxSearchRange, bExcludeSelf); MaNGOS::CreatureLastSearcher searcher(pCreature, creature_check); Cell::VisitGridObjects(pSource, searcher, fMaxSearchRange); diff --git a/include/sc_grid_searchers.h b/include/sc_grid_searchers.h index e2a69f759..f59073570 100644 --- a/include/sc_grid_searchers.h +++ b/include/sc_grid_searchers.h @@ -34,7 +34,7 @@ struct ObjectDistanceOrderReversed : public std::binary_function& lList , WorldObject* pSource, uint32 uiEntry, float fMaxSearchRange); void GetCreatureListWithEntryInGrid(std::list& lList, WorldObject* pSource, uint32 uiEntry, float fMaxSearchRange); diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 8f79de133..89a8c4677 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2956" + #define SD2_REVISION_NR "2957" #endif // __SD2_REVISION_NR_H__ From 660117efc73c3635bd72feaedf6c2fe40cc892a4 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sun, 6 Oct 2013 00:42:56 +0300 Subject: [PATCH 0968/1172] [2958] Implement more combat abilities for Thorim Please note that the script isn't yet complete, but it should be playable. Notes: * spell 62186 has invalid duration; we had to use a script workaround to avoid additional problems * spell 62017 won't trigger because of map LoS. I'm not sure if this is a vmap issue or a spell issue --- .../northrend/ulduar/ulduar/boss_hodir.cpp | 30 +- .../northrend/ulduar/ulduar/boss_thorim.cpp | 402 ++++++++++++++++-- .../northrend/ulduar/ulduar/boss_xt_002.cpp | 4 +- .../ulduar/ulduar/instance_ulduar.cpp | 9 + scripts/northrend/ulduar/ulduar/ulduar.h | 7 + sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 2 + sql/updates/r2958_mangos.sql | 2 + 8 files changed, 400 insertions(+), 58 deletions(-) create mode 100644 sql/updates/r2958_mangos.sql diff --git a/scripts/northrend/ulduar/ulduar/boss_hodir.cpp b/scripts/northrend/ulduar/ulduar/boss_hodir.cpp index fd8a30bdf..08a12a121 100644 --- a/scripts/northrend/ulduar/ulduar/boss_hodir.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_hodir.cpp @@ -50,6 +50,7 @@ enum SPELL_ICICLE_SNOWPACK = 62476, // cast right before Flash Freeze; triggers the spell which summons npc 33173 SPELL_ICICLE_SNOWPACK_H = 62477, SPELL_FLASH_FREEZE = 61968, // main spell; sends event 20896 + SPELL_TELEPORT = 62940, // despawn on event end // icicle spells SPELL_ICICLE = 62236, @@ -113,6 +114,7 @@ struct MANGOS_DLL_DECL boss_hodirAI : public ScriptedAI uint32 m_uiFlashFreezeTimer; uint32 m_uiFrozenBlowsTimer; uint32 m_uiFreezeTimer; + uint8 m_uiEpilogueStage; void Reset() override { @@ -120,6 +122,7 @@ struct MANGOS_DLL_DECL boss_hodirAI : public ScriptedAI m_uiFlashFreezeTimer = 50000; m_uiFrozenBlowsTimer = 70000; m_uiFreezeTimer = urand(25000, 30000); + m_uiEpilogueStage = 0; } void Aggro(Unit* pWho) override @@ -196,14 +199,25 @@ struct MANGOS_DLL_DECL boss_hodirAI : public ScriptedAI { if (m_uiEpilogueTimer <= uiDiff) { - if (m_pInstance) - m_pInstance->SetData(TYPE_HODIR, DONE); - - DoScriptText(SAY_EPILOGUE, m_creature); - m_creature->CastSpell(m_creature, SPELL_HODIR_CREDIT, true); - - m_creature->ForcedDespawn(10000); - m_uiEpilogueTimer = 0; + switch (m_uiEpilogueStage) + { + case 0: + if (m_pInstance) + m_pInstance->SetData(TYPE_HODIR, DONE); + + DoScriptText(SAY_EPILOGUE, m_creature); + m_creature->CastSpell(m_creature, SPELL_HODIR_CREDIT, true); + m_uiEpilogueTimer = 10000; + break; + case 1: + if (DoCastSpellIfCan(m_creature, SPELL_TELEPORT) == CAST_OK) + { + m_creature->ForcedDespawn(2000); + m_uiEpilogueTimer = 0; + } + break; + } + ++m_uiEpilogueStage; } else m_uiEpilogueTimer -= uiDiff; diff --git a/scripts/northrend/ulduar/ulduar/boss_thorim.cpp b/scripts/northrend/ulduar/ulduar/boss_thorim.cpp index 38a73c102..8bdd4cb9c 100644 --- a/scripts/northrend/ulduar/ulduar/boss_thorim.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_thorim.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: boss_thorim -SD%Complete: 50% -SDComment: Basic script +SD%Complete: 60% +SDComment: Script is only partially complete. SDCategory: Ulduar EndScriptData */ @@ -52,45 +52,50 @@ enum SAY_SIF_DESPAWN = -1603158, // phase 1 spells - SPELL_SHEAT_OF_LIGHTNING = 62276, - SPELL_STORMHAMMER = 62042, - SPELL_DEAFENING_THUNDER = 62470, - SPELL_LIGHTNING_SHOCK = 62017, - SPELL_CHARGE_ORB = 62016, + SPELL_SHEAT_OF_LIGHTNING = 62276, // damage reduction aura + SPELL_STORMHAMMER = 62042, // triggers 62470 and 64909 on target + SPELL_CHARGE_ORB = 62016, // target npc 33378; SPELL_TOUCH_OF_DOMINION = 62507, // hard mode timer; triggers 62565 after 2.5 min + SPELL_TOUCH_OF_DOMINION_AURA = 62565, // buff received by Thorim on hard mode fail SPELL_BERSERK_1 = 62560, SPELL_SUMMON_LIGHTNING_ORB = 62391, // on berserk SPELL_LIGHTNING_DESTRUCTION = 62393, // cast by npc 33138 on berserk // phase 2 spells - SPELL_CHAIN_LIGHTNING = 62131, + SPELL_CHAIN_LIGHTNING = 62131, // spells need to be confirmed SPELL_CHAIN_LIGHTNING_H = 64390, - SPELL_LIGHTNING_CHARGE = 62279, - SPELL_LIGHTNING_CHARGE_DUMMY = 62466, // dummy effect hits npc 33378 and triggers spell 64098; cone target effect hits npc 32780 + SPELL_LIGHTNING_CHARGE = 62279, // buff gained on each charge + SPELL_LIGHTNING_CHARGE_DUMMY = 62466, // damage spell for lightning charge; dummy effect hits npc 33378 and triggers spell 64098; cone target effect hits npc 32780 SPELL_UNBALANCING_STRIKE = 62130, SPELL_BERSERK_2 = 62555, SPELL_THORIM_CREDIT = 64985, // kill credit spell; added in spell_template SPELL_STORMHAMMER_OUTRO = 64767, // target npc 33196 and trigger spells 62470, 64909 and 64778 and despawn target in 10 sec SPELL_TELEPORT = 62940, - // Lightning related spells + // Lightning charge related spells + SPELL_LIGHTNING_PILLAR_ORB = 63238, // cast on spell 62016 hit; cast by the lower Orb + SPELL_LIGHTNING_ORG_CHARGED = 62186, // cast by npc 33378; makes Thorim to cast 62466; + SPELL_LIGHTNING_ORB_TRIGGER = 62278, // spell triggered by 62186; however this won't work because 62186 has a duration of 5s while 62278 is triggered after 8s + SPELL_LIGHTNING_PILLAR = 62976, // cast by npc 33378 (upper Orb) to npc 33378 (lower Orb) at the same time with spell 62186 + + // Other lightning related spells SPELL_ACTIVATE_LIGHTNING_ORB_PERIODIC = 62184, // cast by npc 32879; starts the whole lightning event - SPELL_LIGHTNING_ORG_CHARGED = 62186, // cast by npc 33378; makes Thorim to cast 62466 - SPELL_LIGHTNING_PILLAR = 62976, // cast by npc 33378 to npc 33378 (not same guid); triggers 64098 on Thorim SPELL_LIGHTNING_FIELD = 64972, // cast by npc 32892 // Sif spells - SPELL_FROST_BOLT = 62583, - SPELL_FROST_BOLT_H = 62601, + SPELL_FROSTBOLT = 62583, + SPELL_FROSTBOLT_H = 62601, SPELL_FROSTBOLT_VOLLEY = 62580, SPELL_FROSTBOLT_VOLLEY_H = 62604, SPELL_FROST_NOVA = 62597, SPELL_FROST_NOVA_H = 62605, - SPELL_BLIZZARD = 62576, - SPELL_BLIZZARD_H = 62602, + SPELL_BLIZZARD = 62577, // targets npc 32892 + SPELL_BLIZZARD_H = 62603, + SPELL_BLINK = 62578, // Colossus spells SPELL_SMASH = 62339, + SPELL_RUNIC_SMASH = 62465, // cast by npcs 33140 and 33141 //SPELL_SMASH_RIGHT = 62414, SPELL_RUNIC_SMASH_L = 62058, SPELL_RUNIC_SMASH_R = 62057, @@ -166,14 +171,26 @@ struct MANGOS_DLL_DECL boss_thorimAI : public ScriptedAI, private DialogueHelper uint32 m_uiBerserkTimer; uint8 m_uiPhase; - uint32 m_uiHardModeCheckTimer; + uint32 m_uiStormHammerTimer; + uint32 m_uiChargeOrbTimer; + uint32 m_uiArenaDwarfTimer; + uint32 m_uiAttackTimer; + uint32 m_uiChainLightningTimer; + uint32 m_uiUnbalancingStrikeTimer; + + GuidList m_lUpperOrbsGuids; void Reset() override { - m_uiPhase = PHASE_ARENA; - m_uiBerserkTimer = 5 * MINUTE * IN_MILLISECONDS; + m_uiPhase = PHASE_ARENA; + m_uiBerserkTimer = 5 * MINUTE * IN_MILLISECONDS; - m_uiHardModeCheckTimer = 0; + m_uiStormHammerTimer = 45000; + m_uiChargeOrbTimer = 35000; + m_uiArenaDwarfTimer = 25000; + m_uiChainLightningTimer = urand(10000, 15000); + m_uiUnbalancingStrikeTimer = 20000; + m_uiAttackTimer = 0; SetCombatMovement(false); } @@ -251,6 +268,8 @@ struct MANGOS_DLL_DECL boss_thorimAI : public ScriptedAI, private DialogueHelper { m_pInstance->SetData(TYPE_THORIM, IN_PROGRESS); m_pInstance->SetData(TYPE_THORIM_HARD, NOT_STARTED); + + m_pInstance->GetThunderOrbsGuids(m_lUpperOrbsGuids); } StartNextDialogueText(SAY_AGGRO_1); @@ -268,8 +287,9 @@ struct MANGOS_DLL_DECL boss_thorimAI : public ScriptedAI, private DialogueHelper return; m_uiPhase = PHASE_SOLO; - SetCombatMovement(true); - DoStartMovement(m_creature->getVictim()); + m_uiAttackTimer = 1000; + m_uiChargeOrbTimer = 20000; + m_uiBerserkTimer = 5 * MINUTE * IN_MILLISECONDS; m_creature->RemoveAurasDueToSpell(SPELL_SHEAT_OF_LIGHTNING); // make Sif attack too if hard mode is active @@ -278,11 +298,27 @@ struct MANGOS_DLL_DECL boss_thorimAI : public ScriptedAI, private DialogueHelper if (Creature* pSif = m_pInstance->GetSingleCreatureFromStorage(NPC_SIF)) { DoScriptText(SAY_SIF_EVENT, pSif); + SendAIEvent(AI_EVENT_CUSTOM_A, m_creature, pSif); pSif->AI()->AttackStart(m_creature->getVictim()); } } } + void SpellHit(Unit* /*pCaster*/, const SpellEntry* pSpell) override + { + // hard mode is failed; despawn Sif + if (pSpell->Id == SPELL_TOUCH_OF_DOMINION_AURA && m_pInstance) + { + m_pInstance->SetData(TYPE_THORIM_HARD, FAIL); + + if (Creature* pSif = m_pInstance->GetSingleCreatureFromStorage(NPC_SIF)) + { + DoScriptText(SAY_SIF_DESPAWN, pSif); + pSif->ForcedDespawn(5000); + } + } + } + void JustSummoned(Creature* pSummoned) override { // the lightning orb should clean out the whole hallway on arena berserk @@ -305,7 +341,6 @@ struct MANGOS_DLL_DECL boss_thorimAI : public ScriptedAI, private DialogueHelper case SPELL_TOUCH_OF_DOMINION: if (Creature* pSif = m_pInstance->GetSingleCreatureFromStorage(NPC_SIF)) pSif->CastSpell(m_creature, SPELL_TOUCH_OF_DOMINION, false); - m_uiHardModeCheckTimer = 150000; break; case PHASE_SOLO: m_creature->GetMotionMaster()->MoveJump(afArenaCenterLoc[0], afArenaCenterLoc[1], afArenaCenterLoc[2], 45.55969f, 5.0f, 1); @@ -320,10 +355,25 @@ struct MANGOS_DLL_DECL boss_thorimAI : public ScriptedAI, private DialogueHelper case SPELL_THORIM_CREDIT: if (DoCastSpellIfCan(m_creature, SPELL_TELEPORT) == CAST_OK) m_creature->ForcedDespawn(2000); + // despawn Sif if not despawned by accident + if (Creature* pSif = m_pInstance->GetSingleCreatureFromStorage(NPC_SIF)) + pSif->ForcedDespawn(); break; } } + // function to return a random arena Thunder Orb + ObjectGuid SelectRandomOrbGuid() + { + if (m_lUpperOrbsGuids.empty()) + return ObjectGuid(); + + GuidList::iterator iter = m_lUpperOrbsGuids.begin(); + advance(iter, urand(0, m_lUpperOrbsGuids.size() - 1)); + + return *iter; + } + void UpdateAI(const uint32 uiDiff) override { DialogueUpdate(uiDiff); @@ -336,27 +386,6 @@ struct MANGOS_DLL_DECL boss_thorimAI : public ScriptedAI, private DialogueHelper // arena phase abilities case PHASE_ARENA: - if (m_uiHardModeCheckTimer) - { - if (m_uiHardModeCheckTimer <= uiDiff) - { - // hard mode is failed; despawn Sif - if (m_pInstance) - { - m_pInstance->SetData(TYPE_THORIM_HARD, FAIL); - - if (Creature* pSif = m_pInstance->GetSingleCreatureFromStorage(NPC_SIF)) - { - DoScriptText(SAY_SIF_DESPAWN, pSif); - pSif->ForcedDespawn(1000); - } - } - m_uiHardModeCheckTimer = 0; - } - else - m_uiHardModeCheckTimer -= uiDiff; - } - if (m_uiBerserkTimer) { if (m_uiBerserkTimer <= uiDiff) @@ -372,8 +401,25 @@ struct MANGOS_DLL_DECL boss_thorimAI : public ScriptedAI, private DialogueHelper m_uiBerserkTimer -= uiDiff; } - // no break; same combat abilities, but in transition - case PHASE_TRANSITION: + if (m_uiChargeOrbTimer < uiDiff) + { + // this spell has AoE target, but we need to be very specific with the selected targets + if (Creature* pTarget = m_creature->GetMap()->GetCreature(SelectRandomOrbGuid())) + { + if (DoCastSpellIfCan(pTarget, SPELL_CHARGE_ORB) == CAST_OK) + m_uiChargeOrbTimer = 20000; + } + } + else + m_uiChargeOrbTimer -= uiDiff; + + if (m_uiStormHammerTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_STORMHAMMER) == CAST_OK) + m_uiStormHammerTimer = 15000; + } + else + m_uiStormHammerTimer -= uiDiff; break; // solo phase abilities @@ -393,8 +439,60 @@ struct MANGOS_DLL_DECL boss_thorimAI : public ScriptedAI, private DialogueHelper m_uiBerserkTimer -= uiDiff; } + if (m_uiAttackTimer) + { + if (m_uiAttackTimer <= uiDiff) + { + // Add some small delay to combat movement because Jump triggers before it's actually finished + SetCombatMovement(true); + DoStartMovement(m_creature->getVictim()); + m_uiAttackTimer = 0; + } + else + m_uiAttackTimer -= uiDiff; + } + + if (m_uiChargeOrbTimer < uiDiff) + { + // this spell requires very specific targets + if (Creature* pTarget = m_creature->GetMap()->GetCreature(SelectRandomOrbGuid())) + { + pTarget->CastSpell(pTarget, SPELL_LIGHTNING_ORG_CHARGED, true); + + // charge the lower orb as well + if (Unit* pOrb = GetClosestCreatureWithEntry(pTarget, NPC_THUNDER_ORB, 25.0f, true, false, true)) + pTarget->CastSpell(pOrb, SPELL_LIGHTNING_PILLAR, true); + + m_uiChargeOrbTimer = 20000; + } + } + else + m_uiChargeOrbTimer -= uiDiff; + + if (m_uiChainLightningTimer < uiDiff) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, m_bIsRegularMode ? SPELL_CHAIN_LIGHTNING : SPELL_CHAIN_LIGHTNING_H) == CAST_OK) + m_uiChainLightningTimer = urand(10000, 15000); + } + } + else + m_uiChainLightningTimer -= uiDiff; + + if (m_uiUnbalancingStrikeTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_UNBALANCING_STRIKE) == CAST_OK) + m_uiUnbalancingStrikeTimer = 25000; + } + else + m_uiUnbalancingStrikeTimer -= uiDiff; + DoMeleeAttackIfReady(); break; + // transition phase; nothing here, wait for transition to finish + case PHASE_TRANSITION: + break; } } }; @@ -404,6 +502,206 @@ CreatureAI* GetAI_boss_thorim(Creature* pCreature) return new boss_thorimAI(pCreature); } +/*###### +## boss_sif +######*/ + +struct MANGOS_DLL_DECL boss_sifAI : public ScriptedAI +{ + boss_sifAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (instance_ulduar*)pCreature->GetInstanceData(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); + Reset(); + } + + instance_ulduar* m_pInstance; + bool m_bIsRegularMode; + bool m_bAttackReady; + + uint32 m_uiFrostBoltTimer; + uint32 m_uiVolleyTimer; + uint32 m_uiFrostNovaTimer; + uint32 m_uiBlizzardTimer; + uint32 m_uiBlinkTimer; + + GuidList m_lBunniesGuids; + + void Reset() override + { + m_bAttackReady = false; + + m_uiFrostBoltTimer = urand(2000, 3000); + m_uiVolleyTimer = urand(7000, 10000); + m_uiFrostNovaTimer = urand(30000, 35000); + m_uiBlizzardTimer = urand(20000, 30000); + m_uiBlinkTimer = urand(20000, 25000); + + SetCombatMovement(false); + } + + void AttackStart(Unit* pWho) override + { + // custom attack; only in hard mode + if (!m_bAttackReady) + return; + + ScriptedAI::AttackStart(pWho); + } + + void MoveInLineOfSight(Unit* /*pWho*/) override { } + + void EnterEvadeMode() override + { + // custom evade; Sif doesn't need to move to home position + if (!m_bAttackReady) + return; + + m_creature->RemoveAllAurasOnEvade(); + m_creature->DeleteThreatList(); + m_creature->CombatStop(true); + m_creature->SetLootRecipient(NULL); + + Reset(); + } + + void ReceiveAIEvent(AIEventType eventType, Creature* /*pSender*/, Unit* pInvoker, uint32 /*uiMiscValue*/) override + { + // activate attack on hard mode + if (eventType == AI_EVENT_CUSTOM_A && pInvoker->GetEntry() == NPC_THORIM) + { + m_bAttackReady = true; + + if (m_pInstance) + m_pInstance->GetThorimBunniesGuids(m_lBunniesGuids); + } + } + + // function to return a random arena bunny for Blizzard spell + ObjectGuid SelectRandomBunnyGuid() + { + if (m_lBunniesGuids.empty()) + return ObjectGuid(); + + GuidList::iterator iter = m_lBunniesGuids.begin(); + advance(iter, urand(0, m_lBunniesGuids.size() - 1)); + + return *iter; + } + + void UpdateAI(const uint32 uiDiff) override + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_uiFrostBoltTimer < uiDiff) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, m_bIsRegularMode ? SPELL_FROSTBOLT : SPELL_FROSTBOLT_H) == CAST_OK) + m_uiFrostBoltTimer = urand(2000, 3000); + } + } + else + m_uiFrostBoltTimer -= uiDiff; + + if (m_uiVolleyTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_FROSTBOLT_VOLLEY : SPELL_FROSTBOLT_VOLLEY_H) == CAST_OK) + m_uiVolleyTimer = urand(15000, 18000); + } + else + m_uiVolleyTimer -= uiDiff; + + if (m_uiFrostNovaTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_FROST_NOVA : SPELL_FROST_NOVA_H) == CAST_OK) + m_uiFrostNovaTimer = urand(20000, 25000); + } + else + m_uiFrostNovaTimer -= uiDiff; + + if (m_uiBlizzardTimer < uiDiff) + { + // this spell has AoE target, but we need to be very specific with the selected targets + if (Unit* pTarget = m_creature->GetMap()->GetUnit(SelectRandomBunnyGuid())) + { + if (DoCastSpellIfCan(pTarget, m_bIsRegularMode ? SPELL_BLIZZARD : SPELL_BLIZZARD_H) == CAST_OK) + m_uiBlizzardTimer = 40000; + } + } + else + m_uiBlizzardTimer -= uiDiff; + + if (m_uiBlinkTimer < uiDiff) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, SPELL_BLINK) == CAST_OK) + m_uiBlinkTimer = urand(20000, 25000); + } + } + else + m_uiBlinkTimer -= uiDiff; + } +}; + +CreatureAI* GetAI_boss_sif(Creature* pCreature) +{ + return new boss_sifAI(pCreature); +} + +/*###### +## npc_thunder_orb +######*/ + +struct MANGOS_DLL_DECL npc_thunder_orbAI : public Scripted_NoMovementAI +{ + npc_thunder_orbAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { Reset(); } + + uint32 m_uiTriggerTimer; + + void Reset() override + { + m_uiTriggerTimer = 0; + } + + void AttackStart(Unit* /*pWho*/) override { } + void MoveInLineOfSight(Unit* /*pWho*/) override { } + + void SpellHit(Unit* /*pCaster*/, const SpellEntry* pSpell) override + { + // cast visual on the lower Orb + if (pSpell->Id == SPELL_CHARGE_ORB) + { + if (Creature* pOrb = GetClosestCreatureWithEntry(m_creature, NPC_THUNDER_ORB, 25.0f, true, false, true)) + pOrb->CastSpell(pOrb, SPELL_LIGHTNING_PILLAR_ORB, false); + } + // SPECIAL NOTE: this aura has a duration lower than the trigger period for the next spell; so we need to force this by timer + else if (pSpell->Id == SPELL_LIGHTNING_ORG_CHARGED) + m_uiTriggerTimer = 8000; + } + + void UpdateAI(const uint32 uiDiff) override + { + if (m_uiTriggerTimer) + { + if (m_uiTriggerTimer <= uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_LIGHTNING_ORB_TRIGGER) == CAST_OK) + m_uiTriggerTimer = 0; + } + else + m_uiTriggerTimer -= uiDiff; + } + } +}; + +CreatureAI* GetAI_npc_thunder_orb(Creature* pCreature) +{ + return new npc_thunder_orbAI(pCreature); +} + void AddSC_boss_thorim() { Script* pNewScript; @@ -412,4 +710,14 @@ void AddSC_boss_thorim() pNewScript->Name = "boss_thorim"; pNewScript->GetAI = GetAI_boss_thorim; pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "boss_sif"; + pNewScript->GetAI = GetAI_boss_sif; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_thunder_orb"; + pNewScript->GetAI = GetAI_npc_thunder_orb; + pNewScript->RegisterSelf(); } diff --git a/scripts/northrend/ulduar/ulduar/boss_xt_002.cpp b/scripts/northrend/ulduar/ulduar/boss_xt_002.cpp index 1b372b80e..4c0cafabe 100644 --- a/scripts/northrend/ulduar/ulduar/boss_xt_002.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_xt_002.cpp @@ -313,7 +313,7 @@ struct MANGOS_DLL_DECL boss_xt_002AI : public ScriptedAI { // inform the heart about the phase switch if (Creature* pHeart = m_pInstance->GetSingleCreatureFromStorage(NPC_HEART_DECONSTRUCTOR)) - m_creature->AI()->SendAIEvent(AI_EVENT_CUSTOM_A, m_creature, pHeart); + SendAIEvent(AI_EVENT_CUSTOM_A, m_creature, pHeart); DoScriptText(EMOTE_HEART, m_creature); @@ -389,7 +389,7 @@ struct MANGOS_DLL_DECL boss_heart_deconstructorAI : public ScriptedAI if (m_pInstance) { if (Creature* pDeconstructor = m_pInstance->GetSingleCreatureFromStorage(NPC_XT002)) - m_creature->AI()->SendAIEvent(AI_EVENT_CUSTOM_B, m_creature, pDeconstructor); + SendAIEvent(AI_EVENT_CUSTOM_B, m_creature, pDeconstructor); } } diff --git a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp index 05643c7d5..af3f92fb3 100644 --- a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp +++ b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp @@ -209,6 +209,15 @@ void instance_ulduar::OnCreatureCreate(Creature* pCreature) else m_leftKoloStalkerGuid = pCreature->GetObjectGuid(); return; + case NPC_THORIM_EVENT_BUNNY: + if (pCreature->GetPositionZ() < 420.0f) + m_lThorimBunniesGuids.push_back(pCreature->GetObjectGuid()); + return; + case NPC_THUNDER_ORB: + // get only the upper ones; the lower ones are searched dynamically in order to be paired correctly + if (pCreature->GetPositionZ() > 430.0f) + m_lUpperThunderOrbsGuids.push_back(pCreature->GetObjectGuid()); + return; default: return; diff --git a/scripts/northrend/ulduar/ulduar/ulduar.h b/scripts/northrend/ulduar/ulduar/ulduar.h index f04936c4c..df6c2a662 100644 --- a/scripts/northrend/ulduar/ulduar/ulduar.h +++ b/scripts/northrend/ulduar/ulduar/ulduar.h @@ -147,6 +147,9 @@ enum NPC_CAPTAIN_ALLIANCE = 32908, NPC_SOLDIER_HORDE = 32883, NPC_CAPTAIN_HORDE = 32907, + NPC_THORIM_EVENT_BUNNY = 32892, + NPC_THUNDER_ORB = 33378, + NPC_THORIM_CONTROLLER = 32879, // The descent into madness NPC_VEZAX = 33271, @@ -469,6 +472,8 @@ class MANGOS_DLL_DECL instance_ulduar : public ScriptedInstance, private Dialogu void GetTrappersGuids(GuidList& lTrappers) { lTrappers = m_lTrappersGuids; } void GetHarpoonsGuids(GuidVector& vHarpoons) { vHarpoons = m_vBrokenHarpoonsGuids; } void GetToyPileGuids(GuidVector& vToyPiles) { vToyPiles = m_vToyPileGuidVector; } + void GetThorimBunniesGuids(GuidList& lBunnies) { lBunnies = m_lThorimBunniesGuids; } + void GetThunderOrbsGuids(GuidList& lOrbs) { lOrbs = m_lUpperThunderOrbsGuids; } void Update(uint32 uiDiff); @@ -504,6 +509,8 @@ class MANGOS_DLL_DECL instance_ulduar : public ScriptedInstance, private Dialogu GuidList m_lDefendersGuids; GuidList m_lHarpoonDummyGuids; GuidList m_lRepairedHarpoonsGuids; + GuidList m_lThorimBunniesGuids; + GuidList m_lUpperThunderOrbsGuids; GuidSet m_sColossusGuidSet; }; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 89a8c4677..2a11a8a2a 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2957" + #define SD2_REVISION_NR "2958" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 71c2c48fb..1edda3760 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -1304,6 +1304,8 @@ UPDATE creature_template SET ScriptName='boss_hodir' WHERE entry=32845; UPDATE creature_template SET ScriptName='npc_flash_freeze' WHERE entry IN (32926,32938); UPDATE creature_template SET ScriptName='npc_icicle_target' WHERE entry=33174; UPDATE creature_template SET ScriptName='boss_thorim' WHERE entry=32865; +UPDATE creature_template SET ScriptName='boss_sif' WHERE entry=33196; +UPDATE creature_template SET ScriptName='npc_thunder_orb' WHERE entry=33378; DELETE FROM scripted_event_id WHERE id IN (9735,20907,20964,21030,21031,21032,21033,21045,21605,21606,21620); INSERT INTO scripted_event_id VALUES (9735, 'event_spell_saronite_barrier'), -- Vezax saronite barrier event diff --git a/sql/updates/r2958_mangos.sql b/sql/updates/r2958_mangos.sql new file mode 100644 index 000000000..e411978fc --- /dev/null +++ b/sql/updates/r2958_mangos.sql @@ -0,0 +1,2 @@ +UPDATE creature_template SET ScriptName='boss_sif' WHERE entry=33196; +UPDATE creature_template SET ScriptName='npc_thunder_orb' WHERE entry=33378; From 6b692867f4f8b1bccbe84c3ec1257807c7b227bf Mon Sep 17 00:00:00 2001 From: Xfurry Date: Mon, 7 Oct 2013 00:36:38 +0300 Subject: [PATCH 0969/1172] [2959] Add more content related to Thorim event * Implement script for the Runic Colossus. This is required due to the Runic Smash spells * Implement achievements 2971 and 2972 * Allow Thorim to constantly check for the players in the arena and trigger berserk if no player is found --- .../northrend/ulduar/ulduar/boss_thorim.cpp | 253 +++++++++++++++++- .../ulduar/ulduar/instance_ulduar.cpp | 18 ++ scripts/northrend/ulduar/ulduar/ulduar.h | 9 +- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 + sql/scriptdev2_script_full.sql | 4 +- sql/updates/r2959_mangos.sql | 1 + sql/updates/r2959_scriptdev2.sql | 3 + 8 files changed, 277 insertions(+), 14 deletions(-) create mode 100644 sql/updates/r2959_mangos.sql create mode 100644 sql/updates/r2959_scriptdev2.sql diff --git a/scripts/northrend/ulduar/ulduar/boss_thorim.cpp b/scripts/northrend/ulduar/ulduar/boss_thorim.cpp index 8bdd4cb9c..72977c972 100644 --- a/scripts/northrend/ulduar/ulduar/boss_thorim.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_thorim.cpp @@ -16,7 +16,7 @@ /* ScriptData SDName: boss_thorim -SD%Complete: 60% +SD%Complete: 70% SDComment: Script is only partially complete. SDCategory: Ulduar EndScriptData */ @@ -51,6 +51,8 @@ enum SAY_SIF_EVENT = -1603157, SAY_SIF_DESPAWN = -1603158, + EMOTE_RUNIC_BARRIER = -1603247, + // phase 1 spells SPELL_SHEAT_OF_LIGHTNING = 62276, // damage reduction aura SPELL_STORMHAMMER = 62042, // triggers 62470 and 64909 on target @@ -64,8 +66,8 @@ enum // phase 2 spells SPELL_CHAIN_LIGHTNING = 62131, // spells need to be confirmed SPELL_CHAIN_LIGHTNING_H = 64390, - SPELL_LIGHTNING_CHARGE = 62279, // buff gained on each charge - SPELL_LIGHTNING_CHARGE_DUMMY = 62466, // damage spell for lightning charge; dummy effect hits npc 33378 and triggers spell 64098; cone target effect hits npc 32780 + // SPELL_LIGHTNING_CHARGE = 62279, // buff gained on each charge + SPELL_LIGHTNING_CHARGE_DAMAGE = 62466, // damage spell for lightning charge; dummy effect hits npc 33378 and triggers spell 64098; cone target effect hits npc 32780 SPELL_UNBALANCING_STRIKE = 62130, SPELL_BERSERK_2 = 62555, SPELL_THORIM_CREDIT = 64985, // kill credit spell; added in spell_template @@ -93,12 +95,14 @@ enum SPELL_BLIZZARD_H = 62603, SPELL_BLINK = 62578, - // Colossus spells - SPELL_SMASH = 62339, + // Colossus runic smash spells + SPELL_RUNIC_SMASH_L = 62058, // triggers missing spell 62406 + SPELL_RUNIC_SMASH_R = 62057, // triggers missing spell 62403 SPELL_RUNIC_SMASH = 62465, // cast by npcs 33140 and 33141 - //SPELL_SMASH_RIGHT = 62414, - SPELL_RUNIC_SMASH_L = 62058, - SPELL_RUNIC_SMASH_R = 62057, + MAX_RUNIC_SMASH = 10, // defines the max rows of runic smash + + // Colossus combat spells + SPELL_SMASH = 62339, // maybe use 62414 on heroic? SPELL_RUNIC_BARRIER = 62338, SPELL_CHARGE = 62613, SPELL_CHARGE_H = 62614, @@ -262,7 +266,7 @@ struct MANGOS_DLL_DECL boss_thorimAI : public ScriptedAI, private DialogueHelper } } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { if (m_pInstance) { @@ -362,6 +366,15 @@ struct MANGOS_DLL_DECL boss_thorimAI : public ScriptedAI, private DialogueHelper } } + void SpellHitTarget(Unit* pTarget, SpellEntry const* pSpellEntry) override + { + if (pSpellEntry->Id == SPELL_LIGHTNING_CHARGE_DAMAGE && pTarget->GetTypeId() == TYPEID_PLAYER) + { + if (m_pInstance) + m_pInstance->SetSpecialAchievementCriteria(TYPE_ACHIEV_LIGHTNING, false); + } + } + // function to return a random arena Thunder Orb ObjectGuid SelectRandomOrbGuid() { @@ -374,6 +387,39 @@ struct MANGOS_DLL_DECL boss_thorimAI : public ScriptedAI, private DialogueHelper return *iter; } + // function to return a random player from the arena + Unit* GetRandomArenaPlayer() + { + if (!m_pInstance) + return NULL; + + Creature* pTrigger = m_pInstance->GetSingleCreatureFromStorage(NPC_THORIM_COMBAT_TRIGGER); + if (!pTrigger) + return NULL; + + std::vector suitableTargets; + ThreatList const& threatList = m_creature->getThreatManager().getThreatList(); + + for (ThreatList::const_iterator itr = threatList.begin(); itr != threatList.end(); ++itr) + { + if (Unit* pTarget = m_creature->GetMap()->GetUnit((*itr)->getUnitGuid())) + { + if (pTarget->GetTypeId() == TYPEID_PLAYER && pTarget->IsWithinDistInMap(pTrigger, 50.0f) && pTarget->IsWithinLOSInMap(pTrigger)) + suitableTargets.push_back(pTarget); + } + } + + // if no player in the arena was found trigger berserk automatically + if (suitableTargets.empty()) + { + m_uiBerserkTimer = 1000; + m_uiStormHammerTimer = 60000; + return NULL; + } + else + return suitableTargets[urand(0, suitableTargets.size() - 1)]; + } + void UpdateAI(const uint32 uiDiff) override { DialogueUpdate(uiDiff); @@ -415,8 +461,11 @@ struct MANGOS_DLL_DECL boss_thorimAI : public ScriptedAI, private DialogueHelper if (m_uiStormHammerTimer < uiDiff) { - if (DoCastSpellIfCan(m_creature, SPELL_STORMHAMMER) == CAST_OK) - m_uiStormHammerTimer = 15000; + if (Unit* pTarget = GetRandomArenaPlayer()) + { + if (DoCastSpellIfCan(pTarget, SPELL_STORMHAMMER) == CAST_OK) + m_uiStormHammerTimer = 15000; + } } else m_uiStormHammerTimer -= uiDiff; @@ -444,6 +493,7 @@ struct MANGOS_DLL_DECL boss_thorimAI : public ScriptedAI, private DialogueHelper if (m_uiAttackTimer <= uiDiff) { // Add some small delay to combat movement because Jump triggers before it's actually finished + DoResetThreat(); SetCombatMovement(true); DoStartMovement(m_creature->getVictim()); m_uiAttackTimer = 0; @@ -651,6 +701,182 @@ CreatureAI* GetAI_boss_sif(Creature* pCreature) return new boss_sifAI(pCreature); } +/*###### +## npc_runic_colossus +######*/ + +struct MANGOS_DLL_DECL npc_runic_colossusAI : public ScriptedAI +{ + npc_runic_colossusAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (instance_ulduar*)pCreature->GetInstanceData(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); + Reset(); + } + + instance_ulduar* m_pInstance; + bool m_bIsRegularMode; + + uint32 m_uiChargeTimer; + uint32 m_uiBarrierTimer; + uint32 m_uiSmashTimer; + + uint32 m_uiRunicSmashTimer; + uint32 m_uiSmashUpdateTimer; + uint8 m_uiSmashIndex; + + bool m_bSmashStarted; + bool m_bSmashActive; + + GuidList m_lCurrentSmashBunnies; + + void Reset() override + { + m_uiChargeTimer = 1000; + m_uiBarrierTimer = 15000; + m_uiSmashTimer = 0; + m_uiRunicSmashTimer = 0; + m_uiSmashUpdateTimer = 250; + m_uiSmashIndex = 1; + m_bSmashStarted = false; + m_bSmashActive = false; + } + + void Aggro(Unit* /*pWho*/) override + { + m_creature->InterruptNonMeleeSpells(false); + m_uiRunicSmashTimer = 0; + } + + void MoveInLineOfSight(Unit* pWho) override + { + if (!m_bSmashStarted && pWho->GetTypeId() == TYPEID_PLAYER && !((Player*)pWho)->isGameMaster() && + m_creature->IsWithinDistInMap(pWho, 80.0f) && m_creature->IsWithinLOSInMap(pWho)) + { + m_uiRunicSmashTimer = 1000; + m_bSmashStarted = true; + } + + ScriptedAI::MoveInLineOfSight(pWho); + } + + void SpellHit(Unit* /*pCaster*/, const SpellEntry* pSpell) override + { + // start runic smash event + if (pSpell->Id == SPELL_RUNIC_SMASH_L && m_pInstance) + { + m_lCurrentSmashBunnies.clear(); + m_pInstance->GetSmashTargetsGuids(m_lCurrentSmashBunnies, true); + m_bSmashActive = true; + } + else if (pSpell->Id == SPELL_RUNIC_SMASH_R && m_pInstance) + { + m_lCurrentSmashBunnies.clear(); + m_pInstance->GetSmashTargetsGuids(m_lCurrentSmashBunnies, false); + m_bSmashActive = true; + } + } + + void SpellHitTarget(Unit* pTarget, SpellEntry const* pSpellEntry) override + { + if ((pSpellEntry->Id == SPELL_CHARGE || pSpellEntry->Id == SPELL_CHARGE_H) && pTarget->GetTypeId() == TYPEID_PLAYER) + m_uiSmashTimer = 1000; + } + + // Wrapper to keep Runic Smash in a distinct function + void UpdateRunicSmash(const uint32 uiDiff) + { + if (!m_bSmashActive) + return; + + if (m_uiSmashUpdateTimer < uiDiff) + { + // check all the targets which are in a certain distance from the colossus + for (GuidList::const_iterator itr = m_lCurrentSmashBunnies.begin(); itr != m_lCurrentSmashBunnies.end(); ++itr) + { + if (Creature* pBunny = m_creature->GetMap()->GetCreature(*itr)) + { + // use 12 and 16 as multipliers in order to get the perfect combination + if (pBunny->GetPositionY() > m_creature->GetPositionY() + 12 * m_uiSmashIndex && + pBunny->GetPositionY() < m_creature->GetPositionY() + 16 * m_uiSmashIndex) + pBunny->CastSpell(pBunny, SPELL_RUNIC_SMASH, false); + } + } + + ++m_uiSmashIndex; + if (m_uiSmashIndex == MAX_RUNIC_SMASH + 1) + { + m_bSmashActive = false; + m_uiSmashIndex = 1; + } + + m_uiSmashUpdateTimer = 250; + } + else + m_uiSmashUpdateTimer -= uiDiff; + } + + void UpdateAI(const uint32 uiDiff) override + { + if (m_uiRunicSmashTimer) + { + if (m_uiRunicSmashTimer <= uiDiff) + { + if (DoCastSpellIfCan(m_creature, urand(0, 1) ? SPELL_RUNIC_SMASH_L : SPELL_RUNIC_SMASH_R) == CAST_OK) + m_uiRunicSmashTimer = 7000; + } + else + m_uiRunicSmashTimer -= uiDiff; + + UpdateRunicSmash(uiDiff); + } + + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_uiChargeTimer < uiDiff) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0, m_bIsRegularMode ? SPELL_CHARGE : SPELL_CHARGE_H, SELECT_FLAG_NOT_IN_MELEE_RANGE)) + { + if (DoCastSpellIfCan(pTarget, m_bIsRegularMode ? SPELL_CHARGE : SPELL_CHARGE_H) == CAST_OK) + m_uiChargeTimer = urand(10000, 15000); + } + } + else + m_uiChargeTimer -= uiDiff; + + // smash is cast right after charge + if (m_uiSmashTimer) + { + if (m_uiSmashTimer <= uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_SMASH) == CAST_OK) + m_uiSmashTimer = 0; + } + else + m_uiSmashTimer -= uiDiff; + } + + if (m_uiBarrierTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_RUNIC_BARRIER) == CAST_OK) + { + DoScriptText(EMOTE_RUNIC_BARRIER, m_creature); + m_uiBarrierTimer = urand(30000, 35000); + } + } + else + m_uiBarrierTimer -= uiDiff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_npc_runic_colossus(Creature* pCreature) +{ + return new npc_runic_colossusAI(pCreature); +} + /*###### ## npc_thunder_orb ######*/ @@ -716,6 +942,11 @@ void AddSC_boss_thorim() pNewScript->GetAI = GetAI_boss_sif; pNewScript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "npc_runic_colossus"; + pNewScript->GetAI = GetAI_npc_runic_colossus; + pNewScript->RegisterSelf(); + pNewScript = new Script; pNewScript->Name = "npc_thunder_orb"; pNewScript->GetAI = GetAI_npc_thunder_orb; diff --git a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp index af3f92fb3..0acc21cf7 100644 --- a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp +++ b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp @@ -163,6 +163,7 @@ void instance_ulduar::OnCreatureCreate(Creature* pCreature) case NPC_RUNE_GIANT: case NPC_SIF: case NPC_JORMUNGAR_BEHEMOTH: + case NPC_THORIM_COMBAT_TRIGGER: case NPC_ELDER_BRIGHTLEAF: case NPC_ELDER_IRONBRACH: case NPC_ELDER_STONEBARK: @@ -218,6 +219,12 @@ void instance_ulduar::OnCreatureCreate(Creature* pCreature) if (pCreature->GetPositionZ() > 430.0f) m_lUpperThunderOrbsGuids.push_back(pCreature->GetObjectGuid()); return; + case NPC_LEFT_HAND_BUNNY: + m_lLeftHandBunniesGuids.push_back(pCreature->GetObjectGuid()); + return; + case NPC_RIGHT_HAND_BUNNY: + m_lRightHandBunniesGuids.push_back(pCreature->GetObjectGuid()); + return; default: return; @@ -610,7 +617,10 @@ void instance_ulduar::SetData(uint32 uiType, uint32 uiData) m_auiEncounter[uiType] = uiData; DoUseDoorOrButton(GO_LIGHTNING_FIELD); if (uiData == IN_PROGRESS) + { DoToggleGameObjectFlags(GO_DOOR_LEVER, GO_FLAG_NO_INTERACT, false); + SetSpecialAchievementCriteria(TYPE_ACHIEV_LIGHTNING, true); + } else if (uiData == DONE) { if (GetData(TYPE_THORIM_HARD) == DONE) @@ -634,6 +644,11 @@ void instance_ulduar::SetData(uint32 uiType, uint32 uiData) pDoor->ResetDoorOrButton(); if (GameObject* pDoor = GetSingleGameObjectFromStorage(GO_THORIM_STONE_DOOR)) pDoor->ResetDoorOrButton(); + if (Creature* pColossus = GetSingleCreatureFromStorage(NPC_RUNIC_COLOSSUS)) + { + if (pColossus->isAlive()) + pColossus->AI()->EnterEvadeMode(); + } if (Player* pPlayer = GetPlayerInMap()) DoSpawnThorimNpcs(pPlayer); @@ -1110,6 +1125,9 @@ bool instance_ulduar::CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player c case ACHIEV_CRIT_LOSE_ILLUSION_N: case ACHIEV_CRIT_LOSE_ILLUSION_H: return GetData(TYPE_THORIM_HARD) == DONE; + case ACHIEV_CRIT_LIGHTNING_N: + case ACHIEV_CRIT_LIGHTNING_H: + return m_abAchievCriteria[TYPE_ACHIEV_LIGHTNING]; default: return false; diff --git a/scripts/northrend/ulduar/ulduar/ulduar.h b/scripts/northrend/ulduar/ulduar/ulduar.h index df6c2a662..0e45690d3 100644 --- a/scripts/northrend/ulduar/ulduar/ulduar.h +++ b/scripts/northrend/ulduar/ulduar/ulduar.h @@ -150,6 +150,9 @@ enum NPC_THORIM_EVENT_BUNNY = 32892, NPC_THUNDER_ORB = 33378, NPC_THORIM_CONTROLLER = 32879, + NPC_THORIM_COMBAT_TRIGGER = 34055, + NPC_RIGHT_HAND_BUNNY = 33140, + NPC_LEFT_HAND_BUNNY = 33141, // The descent into madness NPC_VEZAX = 33271, @@ -173,7 +176,7 @@ enum NPC_KEEPER_MIMIRON = 33244, NPC_KEEPER_THORIM = 33242, - MAX_SPECIAL_ACHIEV_CRITS = 16, + MAX_SPECIAL_ACHIEV_CRITS = 17, TYPE_ACHIEV_CAT_LADY = 0, TYPE_ACHIEV_NINE_LIVES = 1, @@ -191,6 +194,7 @@ enum TYPE_ACHIEV_DISARMED = 13, TYPE_ACHIEV_CHEESE_FREEZE = 14, TYPE_ACHIEV_COOL_FRIENDS = 15, + TYPE_ACHIEV_LIGHTNING = 16, // Loot chests // Kologarn @@ -474,6 +478,7 @@ class MANGOS_DLL_DECL instance_ulduar : public ScriptedInstance, private Dialogu void GetToyPileGuids(GuidVector& vToyPiles) { vToyPiles = m_vToyPileGuidVector; } void GetThorimBunniesGuids(GuidList& lBunnies) { lBunnies = m_lThorimBunniesGuids; } void GetThunderOrbsGuids(GuidList& lOrbs) { lOrbs = m_lUpperThunderOrbsGuids; } + void GetSmashTargetsGuids(GuidList& lTargets, bool bLeft) { lTargets = bLeft ? m_lLeftHandBunniesGuids : m_lRightHandBunniesGuids; } void Update(uint32 uiDiff); @@ -511,6 +516,8 @@ class MANGOS_DLL_DECL instance_ulduar : public ScriptedInstance, private Dialogu GuidList m_lRepairedHarpoonsGuids; GuidList m_lThorimBunniesGuids; GuidList m_lUpperThunderOrbsGuids; + GuidList m_lLeftHandBunniesGuids; + GuidList m_lRightHandBunniesGuids; GuidSet m_sColossusGuidSet; }; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 2a11a8a2a..b4f7a7077 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2958" + #define SD2_REVISION_NR "2959" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 1edda3760..5fd745a17 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -1306,6 +1306,7 @@ UPDATE creature_template SET ScriptName='npc_icicle_target' WHERE entry=33174; UPDATE creature_template SET ScriptName='boss_thorim' WHERE entry=32865; UPDATE creature_template SET ScriptName='boss_sif' WHERE entry=33196; UPDATE creature_template SET ScriptName='npc_thunder_orb' WHERE entry=33378; +UPDATE creature_template SET ScriptName='npc_runic_colossus' WHERE entry=32872; DELETE FROM scripted_event_id WHERE id IN (9735,20907,20964,21030,21031,21032,21033,21045,21605,21606,21620); INSERT INTO scripted_event_id VALUES (9735, 'event_spell_saronite_barrier'), -- Vezax saronite barrier event diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index df5a30277..fb3397664 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -3646,7 +3646,9 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1603244,'%s activates Mimiron\'s Inferno.',0,3,0,0,'leviathan EMOTE_MIMIRON_INFERNO'), (-1603245,'%s activates Thorim\'s Hammer.',0,3,0,0,'leviathan EMOTE_THORIM_HAMMER'), -(-1603246,'I know just the place. Will you be all right?',15823,1,0,0,'brann SAY_BRANN_OUTRO'); +(-1603246,'I know just the place. Will you be all right?',15823,1,0,0,'brann SAY_BRANN_OUTRO'), + +(-1603247,'%s surrounds itself with a crackling Runic Barrier!',0,3,0,0,'thorim EMOTE_RUNIC_BARRIER'); -- -1 604 000 GUNDRAK INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES diff --git a/sql/updates/r2959_mangos.sql b/sql/updates/r2959_mangos.sql new file mode 100644 index 000000000..491b9a25c --- /dev/null +++ b/sql/updates/r2959_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_runic_colossus' WHERE entry=32872; diff --git a/sql/updates/r2959_scriptdev2.sql b/sql/updates/r2959_scriptdev2.sql new file mode 100644 index 000000000..989d720f0 --- /dev/null +++ b/sql/updates/r2959_scriptdev2.sql @@ -0,0 +1,3 @@ +DELETE FROM script_texts WHERE entry=-1603247; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1603247,'%s surrounds itself with a crackling Runic Barrier!',0,3,0,0,'thorim EMOTE_RUNIC_BARRIER'); From 005a32f669a265a7def55331605fbbc8807633b0 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Mon, 7 Oct 2013 00:38:17 +0300 Subject: [PATCH 0970/1172] [2960] Fix some warnings --- scripts/northrend/ulduar/ulduar/boss_algalon.cpp | 2 +- scripts/northrend/ulduar/ulduar/boss_flame_leviathan.cpp | 6 +++--- scripts/northrend/ulduar/ulduar/boss_hodir.cpp | 2 +- scripts/northrend/ulduar/ulduar/boss_ignis.cpp | 4 ++-- scripts/northrend/ulduar/ulduar/boss_kologarn.cpp | 4 ++-- scripts/northrend/ulduar/ulduar/boss_razorscale.cpp | 4 ++-- scripts/northrend/ulduar/ulduar/boss_xt_002.cpp | 6 +++--- sd2_revision_nr.h | 2 +- 8 files changed, 15 insertions(+), 15 deletions(-) diff --git a/scripts/northrend/ulduar/ulduar/boss_algalon.cpp b/scripts/northrend/ulduar/ulduar/boss_algalon.cpp index 2a0730f2f..c00594dda 100644 --- a/scripts/northrend/ulduar/ulduar/boss_algalon.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_algalon.cpp @@ -240,7 +240,7 @@ struct MANGOS_DLL_DECL boss_algalonAI : public ScriptedAI, private DialogueHelpe DoScriptText(urand(0, 1) ? SAY_SLAY_1 : SAY_SLAY_2, m_creature); } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { if (m_pInstance) { diff --git a/scripts/northrend/ulduar/ulduar/boss_flame_leviathan.cpp b/scripts/northrend/ulduar/ulduar/boss_flame_leviathan.cpp index 2ff3bb361..a6e7ca3c3 100644 --- a/scripts/northrend/ulduar/ulduar/boss_flame_leviathan.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_flame_leviathan.cpp @@ -210,7 +210,7 @@ struct MANGOS_DLL_DECL boss_flame_leviathanAI : public ScriptedAI m_uiThorimHammerTimer = 0; } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { if (m_pInstance) { @@ -234,7 +234,7 @@ struct MANGOS_DLL_DECL boss_flame_leviathanAI : public ScriptedAI } } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { // check the towers again to make sure that some of them were not destroyed in the meanwhile FetchTowers(); @@ -245,7 +245,7 @@ struct MANGOS_DLL_DECL boss_flame_leviathanAI : public ScriptedAI DoScriptText(SAY_AGGRO, m_creature); } - void KilledUnit(Unit* pVictim) override + void KilledUnit(Unit* /*pVictim*/) override { if (urand(0, 1)) DoScriptText(SAY_SLAY, m_creature); diff --git a/scripts/northrend/ulduar/ulduar/boss_hodir.cpp b/scripts/northrend/ulduar/ulduar/boss_hodir.cpp index 08a12a121..f893d085c 100644 --- a/scripts/northrend/ulduar/ulduar/boss_hodir.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_hodir.cpp @@ -125,7 +125,7 @@ struct MANGOS_DLL_DECL boss_hodirAI : public ScriptedAI m_uiEpilogueStage = 0; } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { if (m_pInstance) { diff --git a/scripts/northrend/ulduar/ulduar/boss_ignis.cpp b/scripts/northrend/ulduar/ulduar/boss_ignis.cpp index 82724986b..259a48ee8 100644 --- a/scripts/northrend/ulduar/ulduar/boss_ignis.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_ignis.cpp @@ -108,7 +108,7 @@ struct MANGOS_DLL_DECL boss_ignisAI : public ScriptedAI m_uiConstructTimer = 10000; } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { if (m_pInstance) m_pInstance->SetData(TYPE_IGNIS, DONE); @@ -125,7 +125,7 @@ struct MANGOS_DLL_DECL boss_ignisAI : public ScriptedAI DoScriptText(urand(0, 1) ? SAY_SLAY_1 : SAY_SLAY_2, m_creature); } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { if (m_pInstance) m_pInstance->SetData(TYPE_IGNIS, IN_PROGRESS); diff --git a/scripts/northrend/ulduar/ulduar/boss_kologarn.cpp b/scripts/northrend/ulduar/ulduar/boss_kologarn.cpp index 32eaeab35..0dce14ce8 100644 --- a/scripts/northrend/ulduar/ulduar/boss_kologarn.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_kologarn.cpp @@ -151,7 +151,7 @@ struct MANGOS_DLL_DECL boss_kologarnAI : public Scripted_NoMovementAI DoCastSpellIfCan(m_creature, SPELL_REDUCE_PARRY_CHANCE, CAST_TRIGGERED | CAST_AURA_NOT_PRESENT); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { if (m_pInstance) m_pInstance->SetData(TYPE_KOLOGARN, DONE); @@ -169,7 +169,7 @@ struct MANGOS_DLL_DECL boss_kologarnAI : public Scripted_NoMovementAI DoScriptText(urand(0, 1) ? SAY_SLAY_1 : SAY_SLAY_2, m_creature); } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { if (m_pInstance) m_pInstance->SetData(TYPE_KOLOGARN, IN_PROGRESS); diff --git a/scripts/northrend/ulduar/ulduar/boss_razorscale.cpp b/scripts/northrend/ulduar/ulduar/boss_razorscale.cpp index 065d603e2..b561e4c5f 100644 --- a/scripts/northrend/ulduar/ulduar/boss_razorscale.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_razorscale.cpp @@ -192,13 +192,13 @@ struct MANGOS_DLL_DECL boss_razorscaleAI : public ScriptedAI m_creature->SetByteFlag(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_UNK_2); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { if (m_pInstance) m_pInstance->SetData(TYPE_RAZORSCALE, DONE); } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { if (m_pInstance) { diff --git a/scripts/northrend/ulduar/ulduar/boss_xt_002.cpp b/scripts/northrend/ulduar/ulduar/boss_xt_002.cpp index 4c0cafabe..381b7d6a4 100644 --- a/scripts/northrend/ulduar/ulduar/boss_xt_002.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_xt_002.cpp @@ -140,7 +140,7 @@ struct MANGOS_DLL_DECL boss_xt_002AI : public ScriptedAI m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { if (m_pInstance) m_pInstance->SetData(TYPE_XT002, DONE); @@ -156,7 +156,7 @@ struct MANGOS_DLL_DECL boss_xt_002AI : public ScriptedAI DoScriptText(urand(0, 1) ? SAY_SLAY_1 : SAY_SLAY_2, m_creature); } - void Aggro(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { if (m_pInstance) { @@ -383,7 +383,7 @@ struct MANGOS_DLL_DECL boss_heart_deconstructorAI : public ScriptedAI m_uiRobotTimer = 0; } - void JustDied(Unit* pKiller) override + void JustDied(Unit* /*pKiller*/) override { // notify XT that hard mode is enabled if (m_pInstance) diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index b4f7a7077..d4f89c413 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2959" + #define SD2_REVISION_NR "2960" #endif // __SD2_REVISION_NR_H__ From de8da3cc9e8524bf720af1ff14159f7852dadbad Mon Sep 17 00:00:00 2001 From: Xfurry Date: Fri, 11 Oct 2013 00:34:53 +0300 Subject: [PATCH 0971/1172] [2961] Complete script for Thorim * Add spawn support for arena and stairs dark iron dwarfes * Allow Hodir to inform the faction helpers when the combat ends --- .../northrend/ulduar/ulduar/boss_hodir.cpp | 14 +- .../northrend/ulduar/ulduar/boss_thorim.cpp | 129 ++++++++++++++++-- .../ulduar/ulduar/instance_ulduar.cpp | 40 +++++- scripts/northrend/ulduar/ulduar/ulduar.h | 8 +- sd2_revision_nr.h | 2 +- 5 files changed, 173 insertions(+), 20 deletions(-) diff --git a/scripts/northrend/ulduar/ulduar/boss_hodir.cpp b/scripts/northrend/ulduar/ulduar/boss_hodir.cpp index f893d085c..668dcfb22 100644 --- a/scripts/northrend/ulduar/ulduar/boss_hodir.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_hodir.cpp @@ -102,6 +102,7 @@ struct MANGOS_DLL_DECL boss_hodirAI : public ScriptedAI m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); m_bEventFinished = false; m_uiEpilogueTimer = 0; + m_uiEpilogueStage = 0; Reset(); } @@ -122,7 +123,6 @@ struct MANGOS_DLL_DECL boss_hodirAI : public ScriptedAI m_uiFlashFreezeTimer = 50000; m_uiFrozenBlowsTimer = 70000; m_uiFreezeTimer = urand(25000, 30000); - m_uiEpilogueStage = 0; } void Aggro(Unit* /*pWho*/) override @@ -167,6 +167,18 @@ struct MANGOS_DLL_DECL boss_hodirAI : public ScriptedAI if (!m_bEventFinished) { + // Inform the faction helpers that the fight is over + ThreatList const& threatList = m_creature->getThreatManager().getThreatList(); + for (ThreatList::const_iterator itr = threatList.begin(); itr != threatList.end(); ++itr) + { + // only check creatures + if (!(*itr)->getUnitGuid().IsCreature()) + continue; + + if (Creature* pTarget = m_creature->GetMap()->GetCreature((*itr)->getUnitGuid())) + pTarget->AI()->EnterEvadeMode(); + } + m_uiEpilogueTimer = 10000; m_creature->setFaction(FACTION_ID_FRIENDLY); m_bEventFinished = true; diff --git a/scripts/northrend/ulduar/ulduar/boss_thorim.cpp b/scripts/northrend/ulduar/ulduar/boss_thorim.cpp index 72977c972..c8aeb91ed 100644 --- a/scripts/northrend/ulduar/ulduar/boss_thorim.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_thorim.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: boss_thorim -SD%Complete: 70% -SDComment: Script is only partially complete. +SD%Complete: 90% +SDComment: Platform lightning NYI. Script might need minor improvements. SDCategory: Ulduar EndScriptData */ @@ -107,20 +107,19 @@ enum SPELL_CHARGE = 62613, SPELL_CHARGE_H = 62614, + SPELL_LEAP = 61934, // used by the arena dwarfes + // event npcs NPC_LIGHTNING_ORB = 33138, // spawned on arena berserk NPC_DARK_RUNE_CHAMPION = 32876, // arena npcs NPC_DARK_RUNE_WARBRINGER = 32877, NPC_DARK_RUNE_EVOKER = 32878, NPC_DARK_RUNE_COMMONER = 32904, - NPC_DARK_RUNE_ACOLYTE_ARENA = 32886, - NPC_IRON_RING_GUARD = 32874, // hallway npcs - NPC_DARK_RUNE_ACOLYTE_HALLWAY = 33110, - NPC_IRON_HONOR_GUARD_1 = 33125, // stairs npcs - NPC_IRON_HONOR_GUARD_2 = 32875, - NPC_DARK_RUNE_ACOLYTE_STAIRS = 32957, - NPC_TRAP_BUNNY_1 = 33725, // thorim traps; have auras 62241 and 63540 - NPC_TRAP_BUNNY_2 = 33054, + // NPC_IRON_RING_GUARD = 32874, // hallway npcs + // NPC_DARK_RUNE_ACOLYTE_HALLWAY = 33110, + // NPC_IRON_HONOR_GUARD = 32875, // stairs npcs + // NPC_TRAP_BUNNY_1 = 33725, // thorim traps; have auras 62241 and 63540 + // NPC_TRAP_BUNNY_2 = 33054, FACTION_ID_FRIENDLY = 35, PHASE_ARENA = 1, @@ -174,6 +173,7 @@ struct MANGOS_DLL_DECL boss_thorimAI : public ScriptedAI, private DialogueHelper uint32 m_uiBerserkTimer; uint8 m_uiPhase; + uint8 m_uiDwarfIndex; uint32 m_uiStormHammerTimer; uint32 m_uiChargeOrbTimer; @@ -183,6 +183,8 @@ struct MANGOS_DLL_DECL boss_thorimAI : public ScriptedAI, private DialogueHelper uint32 m_uiUnbalancingStrikeTimer; GuidList m_lUpperOrbsGuids; + GuidList m_lUpperBunniesGuids; + GuidList m_lLowerBunniesGuids; void Reset() override { @@ -191,10 +193,11 @@ struct MANGOS_DLL_DECL boss_thorimAI : public ScriptedAI, private DialogueHelper m_uiStormHammerTimer = 45000; m_uiChargeOrbTimer = 35000; - m_uiArenaDwarfTimer = 25000; + m_uiArenaDwarfTimer = 20000; m_uiChainLightningTimer = urand(10000, 15000); m_uiUnbalancingStrikeTimer = 20000; m_uiAttackTimer = 0; + m_uiDwarfIndex = urand(0, 2); SetCombatMovement(false); } @@ -274,6 +277,8 @@ struct MANGOS_DLL_DECL boss_thorimAI : public ScriptedAI, private DialogueHelper m_pInstance->SetData(TYPE_THORIM_HARD, NOT_STARTED); m_pInstance->GetThunderOrbsGuids(m_lUpperOrbsGuids); + m_pInstance->GetThorimBunniesGuids(m_lUpperBunniesGuids, true); + m_pInstance->GetThorimBunniesGuids(m_lLowerBunniesGuids, false); } StartNextDialogueText(SAY_AGGRO_1); @@ -325,9 +330,22 @@ struct MANGOS_DLL_DECL boss_thorimAI : public ScriptedAI, private DialogueHelper void JustSummoned(Creature* pSummoned) override { - // the lightning orb should clean out the whole hallway on arena berserk - if (pSummoned->GetEntry() == NPC_LIGHTNING_ORB) - pSummoned->CastSpell(pSummoned, SPELL_LIGHTNING_DESTRUCTION, true); + switch (pSummoned->GetEntry()) + { + // the lightning orb should clean out the whole hallway on arena berserk + case NPC_LIGHTNING_ORB: + pSummoned->CastSpell(pSummoned, SPELL_LIGHTNING_DESTRUCTION, true); + break; + case NPC_DARK_RUNE_CHAMPION: + case NPC_DARK_RUNE_WARBRINGER: + case NPC_DARK_RUNE_EVOKER: + case NPC_DARK_RUNE_COMMONER: + case NPC_DARK_RUNE_ACOLYTE: + if (Creature* pTarget = GetClosestLowerBunny(pSummoned)) + pSummoned->CastSpell(pTarget, SPELL_LEAP, true); + pSummoned->SetInCombatWithZone(); + break; + } } void JustDidDialogueStep(int32 iEntry) override @@ -387,6 +405,35 @@ struct MANGOS_DLL_DECL boss_thorimAI : public ScriptedAI, private DialogueHelper return *iter; } + // function to return a random arena upper Bunny + Creature* SelectRandomUpperBunny() + { + if (m_lUpperBunniesGuids.empty()) + return NULL; + + GuidList::iterator iter = m_lUpperBunniesGuids.begin(); + advance(iter, urand(0, m_lUpperBunniesGuids.size() - 1)); + + return m_creature->GetMap()->GetCreature(*iter); + } + + // function to return the closest ground Bunny + Creature* GetClosestLowerBunny(Creature* pSource) + { + if (m_lLowerBunniesGuids.empty()) + return NULL; + + std::list lBunnies; + for (GuidList::const_iterator itr = m_lLowerBunniesGuids.begin(); itr != m_lLowerBunniesGuids.end(); ++itr) + { + if (Creature* pBunny = m_creature->GetMap()->GetCreature(*itr)) + lBunnies.push_back(pBunny); + } + + lBunnies.sort(ObjectDistanceOrder(pSource)); + return lBunnies.front(); + } + // function to return a random player from the arena Unit* GetRandomArenaPlayer() { @@ -420,6 +467,50 @@ struct MANGOS_DLL_DECL boss_thorimAI : public ScriptedAI, private DialogueHelper return suitableTargets[urand(0, suitableTargets.size() - 1)]; } + // function to spawn a random pack of dwarfes + void DoSpawnArenaDwarf() + { + switch (m_uiDwarfIndex) + { + case 0: // commoners (always in groups of 6-7) + { + std::vector vBunnies; + for (GuidList::const_iterator itr = m_lUpperBunniesGuids.begin(); itr != m_lUpperBunniesGuids.end(); ++itr) + { + if (Creature* pBunny = m_creature->GetMap()->GetCreature(*itr)) + vBunnies.push_back(pBunny); + } + std::random_shuffle(vBunnies.begin(), vBunnies.end()); + + uint8 uiMaxCommoners = urand(6, 7); + if (uiMaxCommoners > vBunnies.size() - 1) + uiMaxCommoners = vBunnies.size(); + + for (uint8 i = 0; i < uiMaxCommoners; ++i) + m_creature->SummonCreature(NPC_DARK_RUNE_COMMONER, vBunnies[i]->GetPositionX(), vBunnies[i]->GetPositionY(), vBunnies[i]->GetPositionZ(), 0, TEMPSUMMON_DEAD_DESPAWN, 0); + break; + } + case 1: // warbringers (along with champions or evokers) + if (Creature* pBunny = SelectRandomUpperBunny()) + m_creature->SummonCreature(NPC_DARK_RUNE_WARBRINGER, pBunny->GetPositionX(), pBunny->GetPositionY(), pBunny->GetPositionZ(), 0, TEMPSUMMON_DEAD_DESPAWN, 0); + // warbringers can have another buddy summoned at the same time + if (roll_chance_i(75)) + { + if (Creature* pBunny = SelectRandomUpperBunny()) + m_creature->SummonCreature(roll_chance_i(70) ? NPC_DARK_RUNE_CHAMPION : NPC_DARK_RUNE_EVOKER, pBunny->GetPositionX(), pBunny->GetPositionY(), pBunny->GetPositionZ(), 0, TEMPSUMMON_DEAD_DESPAWN, 0); + } + break; + case 2: // evokers alone + if (Creature* pBunny = SelectRandomUpperBunny()) + m_creature->SummonCreature(NPC_DARK_RUNE_EVOKER, pBunny->GetPositionX(), pBunny->GetPositionY(), pBunny->GetPositionZ(), 0, TEMPSUMMON_DEAD_DESPAWN, 0); + break; + } + + // get a new index which will be different from the first one + uint8 uiNewIndex = (m_uiDwarfIndex + urand(1, 2)) % 3; + m_uiDwarfIndex = uiNewIndex; + } + void UpdateAI(const uint32 uiDiff) override { DialogueUpdate(uiDiff); @@ -447,6 +538,14 @@ struct MANGOS_DLL_DECL boss_thorimAI : public ScriptedAI, private DialogueHelper m_uiBerserkTimer -= uiDiff; } + if (m_uiArenaDwarfTimer < uiDiff) + { + DoSpawnArenaDwarf(); + m_uiArenaDwarfTimer = 10000; + } + else + m_uiArenaDwarfTimer -= uiDiff; + if (m_uiChargeOrbTimer < uiDiff) { // this spell has AoE target, but we need to be very specific with the selected targets @@ -623,7 +722,7 @@ struct MANGOS_DLL_DECL boss_sifAI : public ScriptedAI m_bAttackReady = true; if (m_pInstance) - m_pInstance->GetThorimBunniesGuids(m_lBunniesGuids); + m_pInstance->GetThorimBunniesGuids(m_lBunniesGuids, false); } } diff --git a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp index 0acc21cf7..7d1398e53 100644 --- a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp +++ b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp @@ -59,6 +59,7 @@ instance_ulduar::instance_ulduar(Map* pMap) : ScriptedInstance(pMap), DialogueHe m_uiAlgalonTimer(MINUTE * IN_MILLISECONDS), m_uiShatterAchievTimer(0), m_uiGauntletStatus(0), + m_uiStairsSpawnTimer(0), m_uiSlayedArenaMobs(0) { Initialize(); @@ -211,8 +212,11 @@ void instance_ulduar::OnCreatureCreate(Creature* pCreature) m_leftKoloStalkerGuid = pCreature->GetObjectGuid(); return; case NPC_THORIM_EVENT_BUNNY: + // sort the event bunnies between the arena and tribune spawns; the platform spawns are ignored for the moment if (pCreature->GetPositionZ() < 420.0f) m_lThorimBunniesGuids.push_back(pCreature->GetObjectGuid()); + else if (pCreature->GetPositionZ() > 438.5f) + m_lUpperBunniesGuids.push_back(pCreature->GetObjectGuid()); return; case NPC_THUNDER_ORB: // get only the upper ones; the lower ones are searched dynamically in order to be paired correctly @@ -653,6 +657,7 @@ void instance_ulduar::SetData(uint32 uiType, uint32 uiData) if (Player* pPlayer = GetPlayerInMap()) DoSpawnThorimNpcs(pPlayer); + m_uiStairsSpawnTimer = 0; m_uiSlayedArenaMobs = 0; } break; @@ -943,6 +948,16 @@ void instance_ulduar::SpawnFriendlyKeeper(uint32 uiWho) } } +void instance_ulduar::OnCreatureEnterCombat(Creature* pCreature) +{ + switch (pCreature->GetEntry()) + { + case NPC_RUNE_GIANT: + m_uiStairsSpawnTimer = 0; + break; + } +} + void instance_ulduar::OnCreatureDeath(Creature* pCreature) { switch (pCreature->GetEntry()) @@ -990,16 +1005,18 @@ void instance_ulduar::OnCreatureDeath(Creature* pCreature) case NPC_CAPTAIN_ALLIANCE: case NPC_SOLDIER_HORDE: case NPC_CAPTAIN_HORDE: + case NPC_DARK_RUNE_ACOLYTE: ++m_uiSlayedArenaMobs; - // start combat when all 4 faction soldiers and the Jormungar are dead - if (m_uiSlayedArenaMobs == 5) + // start combat when all 4 faction soldiers, the Acolyte and the Jormungar are dead + if (m_uiSlayedArenaMobs == 6) { if (Creature* pThorim = GetSingleCreatureFromStorage(NPC_THORIM)) pThorim->SetInCombatWithZone(); } break; case NPC_RUNIC_COLOSSUS: + m_uiStairsSpawnTimer = 30000; DoUseDoorOrButton(GO_RUNED_STONE_DOOR); break; case NPC_RUNE_GIANT: @@ -1244,6 +1261,25 @@ void instance_ulduar::Update(uint32 uiDiff) else m_uiAlgalonTimer -= uiDiff; } + + if (m_uiStairsSpawnTimer) + { + if (m_uiStairsSpawnTimer <= uiDiff) + { + // Note: this part involves a lot of guesswork + // These are the stairs npcs which are summoned before engaging the Rune Giant; both npcs have waypoint movement + if (Creature* pGiant = GetSingleCreatureFromStorage(NPC_RUNE_GIANT)) + { + if (urand(0, 1)) + pGiant->SummonCreature(NPC_HONOR_GUARD_STAIRS, 2101.2f, -434.135f, 438.331f, 0, TEMPSUMMON_DEAD_DESPAWN, 0); + else + pGiant->SummonCreature(NPC_RUNE_ACOLYTE_STAIRS, 2100.41f, -446.712f, 438.331f, 0, TEMPSUMMON_DEAD_DESPAWN, 0); + } + m_uiStairsSpawnTimer = urand(20000, 30000); + } + else + m_uiStairsSpawnTimer -= uiDiff; + } } InstanceData* GetInstanceData_instance_ulduar(Map* pMap) diff --git a/scripts/northrend/ulduar/ulduar/ulduar.h b/scripts/northrend/ulduar/ulduar/ulduar.h index 0e45690d3..4efdbec4c 100644 --- a/scripts/northrend/ulduar/ulduar/ulduar.h +++ b/scripts/northrend/ulduar/ulduar/ulduar.h @@ -143,6 +143,7 @@ enum NPC_RUNE_GIANT = 32873, NPC_SIF = 33196, NPC_JORMUNGAR_BEHEMOTH = 32882, + NPC_DARK_RUNE_ACOLYTE = 32886, NPC_SOLDIER_ALLIANCE = 32885, NPC_CAPTAIN_ALLIANCE = 32908, NPC_SOLDIER_HORDE = 32883, @@ -153,6 +154,8 @@ enum NPC_THORIM_COMBAT_TRIGGER = 34055, NPC_RIGHT_HAND_BUNNY = 33140, NPC_LEFT_HAND_BUNNY = 33141, + NPC_HONOR_GUARD_STAIRS = 33125, // summoned mobs before the Rune Giant + NPC_RUNE_ACOLYTE_STAIRS = 32957, // The descent into madness NPC_VEZAX = 33271, @@ -454,6 +457,7 @@ class MANGOS_DLL_DECL instance_ulduar : public ScriptedInstance, private Dialogu void OnPlayerEnter(Player* pPlayer) override; void OnCreatureCreate(Creature* pCreature) override; + void OnCreatureEnterCombat(Creature* pCreature) override; void OnCreatureDeath(Creature* pCreature) override; void OnObjectCreate(GameObject* pGo) override; @@ -476,7 +480,7 @@ class MANGOS_DLL_DECL instance_ulduar : public ScriptedInstance, private Dialogu void GetTrappersGuids(GuidList& lTrappers) { lTrappers = m_lTrappersGuids; } void GetHarpoonsGuids(GuidVector& vHarpoons) { vHarpoons = m_vBrokenHarpoonsGuids; } void GetToyPileGuids(GuidVector& vToyPiles) { vToyPiles = m_vToyPileGuidVector; } - void GetThorimBunniesGuids(GuidList& lBunnies) { lBunnies = m_lThorimBunniesGuids; } + void GetThorimBunniesGuids(GuidList& lBunnies, bool bUpper) { lBunnies = bUpper ? m_lUpperBunniesGuids : m_lThorimBunniesGuids; } void GetThunderOrbsGuids(GuidList& lOrbs) { lOrbs = m_lUpperThunderOrbsGuids; } void GetSmashTargetsGuids(GuidList& lTargets, bool bLeft) { lTargets = bLeft ? m_lLeftHandBunniesGuids : m_lRightHandBunniesGuids; } @@ -502,6 +506,7 @@ class MANGOS_DLL_DECL instance_ulduar : public ScriptedInstance, private Dialogu uint32 m_uiAlgalonTimer; uint32 m_uiShatterAchievTimer; uint32 m_uiGauntletStatus; + uint32 m_uiStairsSpawnTimer; uint8 m_uiSlayedArenaMobs; ObjectGuid m_leftKoloStalkerGuid; @@ -515,6 +520,7 @@ class MANGOS_DLL_DECL instance_ulduar : public ScriptedInstance, private Dialogu GuidList m_lHarpoonDummyGuids; GuidList m_lRepairedHarpoonsGuids; GuidList m_lThorimBunniesGuids; + GuidList m_lUpperBunniesGuids; GuidList m_lUpperThunderOrbsGuids; GuidList m_lLeftHandBunniesGuids; GuidList m_lRightHandBunniesGuids; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index d4f89c413..0151184d9 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2960" + #define SD2_REVISION_NR "2961" #endif // __SD2_REVISION_NR_H__ From f2f5d4574ca750d64570da50adfc929a87a5109c Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sat, 12 Oct 2013 00:12:09 +0300 Subject: [PATCH 0972/1172] [2962] Implement basic script for Freya --- .../northrend/ulduar/ulduar/boss_freya.cpp | 298 +++++++++++++++++- .../ulduar/ulduar/boss_yogg_saron.cpp | 3 +- .../ulduar/ulduar/instance_ulduar.cpp | 13 +- scripts/northrend/ulduar/ulduar/ulduar.h | 3 +- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 + sql/updates/r2962_mangos.sql | 1 + 7 files changed, 310 insertions(+), 11 deletions(-) create mode 100644 sql/updates/r2962_mangos.sql diff --git a/scripts/northrend/ulduar/ulduar/boss_freya.cpp b/scripts/northrend/ulduar/ulduar/boss_freya.cpp index ef7530e56..4e01fa267 100644 --- a/scripts/northrend/ulduar/ulduar/boss_freya.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_freya.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: boss_freya -SD%Complete: 0% -SDComment: +SD%Complete: 20% +SDComment: Basic script. SDCategory: Ulduar EndScriptData */ @@ -33,9 +33,8 @@ enum SAY_ADDS_LASHER = -1603004, SAY_SLAY_1 = -1603005, SAY_SLAY_2 = -1603006, - SAY_DEATH = -1603007, + SAY_EPILOGUE = -1603007, SAY_BERSERK = -1603008, - SAY_HELP_YOGG = -1603009, EMOTE_ALLIES_NATURE = -1603010, EMOTE_LIFEBINDER = -1603011, @@ -56,9 +55,300 @@ enum SAY_SLAY_1_STONE = -1603023, SAY_SLAY_2_STONE = -1603024, SAY_DEATH_STONE = -1603025, + + // general spells + SPELL_FREYA_CREDIT = 65074, // kill credit spell; added in spell_template + SPELL_TELEPORT = 62940, // despawn on event end + SPELL_BERSERK = 47008, + // SPELL_FREYA_DUMMY_YELLOW = 63292, // dummy spells used to light up the crystals; used in dbscripts_on_creature_move + // SPELL_FREYA_DUMMY_BLUE = 63294, + // SPELL_FREYA_DUMMY_GREEN = 63295, + + // combat spells + SPELL_ATTUNED_TO_NATURE = 62519, + SPELL_ATTUNED_10_STACKS = 62525, // remove 10 stacks of 62519 + SPELL_ATTUNED_2_STACKS = 62524, // remove 2 stacks of 62519 + SPELL_ATTUNED_25_STACKS = 62521, // remove 25 stacks of 62519 + SPELL_TOUCH_OF_EONAR = 62528, + SPELL_TOUCH_OF_EONAR_H = 62892, + SPELL_SUNBEAM = 62623, + SPELL_SUNBEAM_H = 62872, + + // summon creature spells + SPELL_SUMMON_ALLIES_OF_NATURE = 62678, // triggers random of 62685, 62686 or 62688 + // SPELL_SUMMON_ALLIES_OF_NAUTRE_H = 62873, // spell needs to be confirmed; identical to normal mode version + SPELL_LIFEBINDERS_GIFT_SUMMON = 62572, + SPELL_NATURE_BOMB_SUMMON = 64604, + + // summon loot spells + SPELL_SUMMON_CHEST_0 = 62950, // summon loot chest spells, depending on the number of elders alive + SPELL_SUMMON_CHEST_1 = 62952, + SPELL_SUMMON_CHEST_2 = 62953, + SPELL_SUMMON_CHEST_3 = 62954, + SPELL_SUMMON_CHEST_0_H = 62955, + SPELL_SUMMON_CHEST_1_H = 62956, + SPELL_SUMMON_CHEST_2_H = 62957, + SPELL_SUMMON_CHEST_3_H = 62958, + + // hard mode spells + SPELL_DRAINED_OF_POWER = 62467, // stun effect for each elder alive + + SPELL_BRIGHTLEAF_ESSENCE_CHANNEL = 62485, // brightleaf + SPELL_BRIGHTLEAF_ESSENCE_CHANNEL_H = 65587, + SPELL_UNSTABLE_SUN_BEAM = 62450, + SPELL_UNSTABLE_SUN_BEAM_H = 62868, + + SPELL_IRONBRANCH_ESSENCE_CHANNEL = 62484, // ironbrach + SPELL_IRONBRANCH_ESSENCE_CHANNEL_H = 65588, + SPELL_IRON_ROOTS = 62439, + SPELL_IRON_ROOTS_H = 62862, + // SPELL_STRENGTHEN_IRON_ROOTS = 62440, // purpose unk + // SPELL_STRENGTHEN_IRON_ROOTS_H = 63601, + + SPELL_STONEBARK_ESSEMCE_CHANNEL = 62483, // stonebark + SPELL_STONEBARK_ESSEMCE_CHANNEL_H = 65589, + SPELL_GROUND_TREMOR = 62437, + SPELL_GROUND_TREMOR_H = 62859, + + // summons spells + SPELL_SPORE_SUMMON_PERIODIC = 62566, // triggers 62582, 62591, 62592, 62593; cast by 33203 + SPELL_HEALTHY_SPORE_VISUAL = 62538, // cast by npc 33215 + SPELL_POTENT_PHEROMONES = 62541, // cast by npc 33215 + SPELL_UNSTABLE_SUN_BEAM_VISUAL = 62216, // cast by npc 33170 + SPELL_UNSTABLE_ENERGY = 62451, // cast by npc 33170 + SPELL_UNSTABLE_ENERGY_H = 62865, + SPELL_NATURE_BOMB_GO = 64600, // spawns go 194902 + SPELL_NATURE_BOMB = 64587, + SPELL_NATURE_BOMB_H = 64650, + + // eonar's gift spells + SPELL_LIFEBINDERS_GIFT = 62584, + SPELL_LIFEBINDERS_GIFT_H = 64185, + SPELL_LIFEBINDERS_GIFT_VISUAL = 62579, + SPELL_AUTO_GROW = 62559, // cast by npcs 33228 and 33215 + SPELL_PHEROMONES = 62619, + + // allies of nature summons + NPC_DETONATING_LASHER = 32918, + NPC_ANCIENT_CONSERVATOR = 33203, + NPC_WATER_SPIRIT = 33202, + NPC_STORM_LASHER = 32919, + NPC_SNAPLASHER = 32916, + + // other summons + NPC_NATURE_BOMB = 34129, + NPC_SUN_BEAM = 33170, + NPC_UNSTABLE_SUN_BEAM = 33050, + NPC_STRENGHENED_IRON_ROOTS = 33168, + NPC_EONARS_GIFT = 33228, + NPC_HEALTHY_SPORE = 33215, + + // other + GO_NATURE_BOMB = 194902, +}; + +/*###### +## boss_freya +######*/ + +struct MANGOS_DLL_DECL boss_freyaAI : public ScriptedAI +{ + boss_freyaAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (instance_ulduar*)pCreature->GetInstanceData(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); + m_bEventFinished = false; + m_uiEpilogueTimer = 0; + Reset(); + } + + instance_ulduar* m_pInstance; + bool m_bIsRegularMode; + bool m_bEventFinished; + + uint32 m_uiEpilogueTimer; + uint32 m_uiBerserkTimer; + + void Reset() override + { + m_uiBerserkTimer = 10 * MINUTE * IN_MILLISECONDS; + } + + void Aggro(Unit* /*pWho*/) override + { + // don't attack again after being defeated + if (m_bEventFinished) + return; + + if (m_pInstance) + m_pInstance->SetData(TYPE_FREYA, IN_PROGRESS); + + DoScriptText(SAY_AGGRO, m_creature); + FetchElders(); + } + + void AttackStart(Unit* pWho) override + { + // don't attack again after being defeated + if (m_bEventFinished) + return; + + ScriptedAI::AttackStart(pWho); + } + + void MoveInLineOfSight(Unit* pWho) override + { + // don't attack again after being defeated + if (m_bEventFinished) + return; + + ScriptedAI::MoveInLineOfSight(pWho); + } + + void JustReachedHome() override + { + if (m_pInstance) + m_pInstance->SetData(TYPE_FREYA, FAIL); + } + + void EnterEvadeMode() override + { + m_creature->RemoveAllAurasOnEvade(); + m_creature->DeleteThreatList(); + m_creature->CombatStop(true); + + if (m_creature->isAlive() && !m_bEventFinished) + m_creature->GetMotionMaster()->MoveTargetedHome(); + + m_creature->SetLootRecipient(NULL); + + Reset(); + } + + void DamageTaken(Unit* /*pDoneBy*/, uint32& uiDamage) override + { + if (uiDamage >= m_creature->GetHealth()) + { + uiDamage = 0; + + if (!m_bEventFinished) + { + if (m_pInstance) + { + m_pInstance->SetData(TYPE_FREYA, DONE); + + // spawn chest loot + switch (m_pInstance->GetData(TYPE_FREYA_HARD)) + { + case 0: DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_SUMMON_CHEST_0 : SPELL_SUMMON_CHEST_0_H, CAST_TRIGGERED); break; + case 1: DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_SUMMON_CHEST_1 : SPELL_SUMMON_CHEST_1_H, CAST_TRIGGERED); break; + case 2: DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_SUMMON_CHEST_2 : SPELL_SUMMON_CHEST_2_H, CAST_TRIGGERED); break; + case 3: DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_SUMMON_CHEST_3 : SPELL_SUMMON_CHEST_3_H, CAST_TRIGGERED); break; + } + } + + DoScriptText(SAY_EPILOGUE, m_creature); + m_creature->CastSpell(m_creature, SPELL_FREYA_CREDIT, true); + + m_uiEpilogueTimer = 10000; + m_bEventFinished = true; + EnterEvadeMode(); + } + } + } + + void KilledUnit(Unit* pVictim) override + { + if (pVictim->GetTypeId() != TYPEID_PLAYER) + return; + + DoScriptText(urand(0, 1) ? SAY_SLAY_1 : SAY_SLAY_2, m_creature); + } + + void JustSummoned(Creature* pSummoned) override + { + } + + void SummonedCreatureJustDied(Creature* pSummoned) override + { + } + + // check for all elders alive + void FetchElders() + { + if (!m_pInstance) + return; + + uint8 uiEldersAlive = 0; + + if (Creature* pElder = m_pInstance->GetSingleCreatureFromStorage(NPC_ELDER_BRIGHTLEAF)) + { + if (pElder->isAlive()) + ++uiEldersAlive; + } + if (Creature* pElder = m_pInstance->GetSingleCreatureFromStorage(NPC_ELDER_IRONBRACH)) + { + if (pElder->isAlive()) + ++uiEldersAlive; + } + if (Creature* pElder = m_pInstance->GetSingleCreatureFromStorage(NPC_ELDER_STONEBARK)) + { + if (pElder->isAlive()) + ++uiEldersAlive; + } + + // store the info about the elders alive + m_pInstance->SetData(TYPE_FREYA_HARD, uiEldersAlive); + } + + void UpdateAI(const uint32 uiDiff) override + { + if (m_uiEpilogueTimer) + { + if (m_uiEpilogueTimer <= uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_TELEPORT, CAST_TRIGGERED) == CAST_OK) + { + m_creature->ForcedDespawn(2000); + m_uiEpilogueTimer = 0; + } + } + else + m_uiEpilogueTimer -= uiDiff; + } + + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_uiBerserkTimer) + { + if (m_uiBerserkTimer <= uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_BERSERK) == CAST_OK) + { + DoScriptText(SAY_BERSERK, m_creature); + m_uiBerserkTimer = 0; + } + } + else + m_uiBerserkTimer -= uiDiff; + } + + DoMeleeAttackIfReady(); + } }; +CreatureAI* GetAI_boss_freya(Creature* pCreature) +{ + return new boss_freyaAI(pCreature); +} + void AddSC_boss_freya() { + Script* pNewScript; + pNewScript = new Script; + pNewScript->Name = "boss_freya"; + pNewScript->GetAI = GetAI_boss_freya; + pNewScript->RegisterSelf(); } diff --git a/scripts/northrend/ulduar/ulduar/boss_yogg_saron.cpp b/scripts/northrend/ulduar/ulduar/boss_yogg_saron.cpp index 282d36489..621165c0c 100644 --- a/scripts/northrend/ulduar/ulduar/boss_yogg_saron.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_yogg_saron.cpp @@ -71,8 +71,9 @@ enum EMOTE_VISION_BLAST = -1603234, EMOTE_SHATTER_BLAST = -1603235, - SAY_THORIM_HELP = -1603155, + SAY_FREYA_HELP = -1603009, SAY_HODIR_HELP = -1603093, + SAY_THORIM_HELP = -1603155, }; void AddSC_boss_yogg_saron() diff --git a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp index 7d1398e53..ffd158d20 100644 --- a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp +++ b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp @@ -729,12 +729,15 @@ void instance_ulduar::SetData(uint32 uiType, uint32 uiData) case TYPE_MIMIRON_HARD: m_auiHardBoss[4] = uiData; return; - case TYPE_VEZAX_HARD: + case TYPE_FREYA_HARD: m_auiHardBoss[5] = uiData; return; - case TYPE_YOGGSARON_HARD: + case TYPE_VEZAX_HARD: m_auiHardBoss[6] = uiData; return; + case TYPE_YOGGSARON_HARD: + m_auiHardBoss[7] = uiData; + return; // Ulduar keepers case TYPE_KEEPER_HODIR: @@ -900,10 +903,12 @@ uint32 instance_ulduar::GetData(uint32 uiType) const return m_auiHardBoss[3]; case TYPE_MIMIRON_HARD: return m_auiHardBoss[4]; - case TYPE_VEZAX_HARD: + case TYPE_FREYA_HARD: return m_auiHardBoss[5]; - case TYPE_YOGGSARON_HARD: + case TYPE_VEZAX_HARD: return m_auiHardBoss[6]; + case TYPE_YOGGSARON_HARD: + return m_auiHardBoss[7]; // Ulduar Keepers case TYPE_KEEPER_HODIR: diff --git a/scripts/northrend/ulduar/ulduar/ulduar.h b/scripts/northrend/ulduar/ulduar/ulduar.h index 4efdbec4c..70001f08b 100644 --- a/scripts/northrend/ulduar/ulduar/ulduar.h +++ b/scripts/northrend/ulduar/ulduar/ulduar.h @@ -8,7 +8,7 @@ enum { MAX_ENCOUNTER = 15, - HARD_MODE_ENCOUNTER = 7, + HARD_MODE_ENCOUNTER = 8, KEEPER_ENCOUNTER = 4, // Main boss types @@ -35,6 +35,7 @@ enum TYPE_MIMIRON_HARD = 17, TYPE_HODIR_HARD = 18, TYPE_THORIM_HARD = 19, + TYPE_FREYA_HARD = 20, TYPE_VEZAX_HARD = 21, TYPE_YOGGSARON_HARD = 22, diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 0151184d9..bd9209728 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2961" + #define SD2_REVISION_NR "2962" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 5fd745a17..10b7ed5da 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -1307,6 +1307,7 @@ UPDATE creature_template SET ScriptName='boss_thorim' WHERE entry=32865; UPDATE creature_template SET ScriptName='boss_sif' WHERE entry=33196; UPDATE creature_template SET ScriptName='npc_thunder_orb' WHERE entry=33378; UPDATE creature_template SET ScriptName='npc_runic_colossus' WHERE entry=32872; +UPDATE creature_template SET ScriptName='boss_freya' WHERE entry=32906; DELETE FROM scripted_event_id WHERE id IN (9735,20907,20964,21030,21031,21032,21033,21045,21605,21606,21620); INSERT INTO scripted_event_id VALUES (9735, 'event_spell_saronite_barrier'), -- Vezax saronite barrier event diff --git a/sql/updates/r2962_mangos.sql b/sql/updates/r2962_mangos.sql new file mode 100644 index 000000000..82ae2b5f7 --- /dev/null +++ b/sql/updates/r2962_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='boss_freya' WHERE entry=32906; From ba554ed24412ba18ca8c70badbd65cb3766d50bb Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sun, 13 Oct 2013 16:10:24 +0300 Subject: [PATCH 0973/1172] [2963] Implement basic combat abilities for Freya --- .../northrend/ulduar/ulduar/boss_freya.cpp | 290 +++++++++++++++++- .../ulduar/ulduar/instance_ulduar.cpp | 12 + scripts/northrend/ulduar/ulduar/ulduar.h | 12 +- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 2 + sql/updates/r2963_mangos.sql | 2 + 6 files changed, 310 insertions(+), 10 deletions(-) create mode 100644 sql/updates/r2963_mangos.sql diff --git a/scripts/northrend/ulduar/ulduar/boss_freya.cpp b/scripts/northrend/ulduar/ulduar/boss_freya.cpp index 4e01fa267..2ef14ecd4 100644 --- a/scripts/northrend/ulduar/ulduar/boss_freya.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_freya.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: boss_freya -SD%Complete: 20% -SDComment: Basic script. +SD%Complete: 40% +SDComment: Parially complete. SDCategory: Ulduar EndScriptData */ @@ -66,9 +66,6 @@ enum // combat spells SPELL_ATTUNED_TO_NATURE = 62519, - SPELL_ATTUNED_10_STACKS = 62525, // remove 10 stacks of 62519 - SPELL_ATTUNED_2_STACKS = 62524, // remove 2 stacks of 62519 - SPELL_ATTUNED_25_STACKS = 62521, // remove 25 stacks of 62519 SPELL_TOUCH_OF_EONAR = 62528, SPELL_TOUCH_OF_EONAR_H = 62892, SPELL_SUNBEAM = 62623, @@ -76,7 +73,10 @@ enum // summon creature spells SPELL_SUMMON_ALLIES_OF_NATURE = 62678, // triggers random of 62685, 62686 or 62688 - // SPELL_SUMMON_ALLIES_OF_NAUTRE_H = 62873, // spell needs to be confirmed; identical to normal mode version + SPELL_SUMMON_ALLIES_OF_NATURE_H = 62873, // spell needs to be confirmed; identical to normal mode version + SPELL_SUMMON_WAVE_1 = 62685, // summon npc 33203 + SPELL_SUMMON_WAVE_3 = 62686, // summon npcs 33202, 32916 and 32919 + SPELL_SUMMON_WAVE_10 = 62688, // summon 10 * npc 32918 SPELL_LIFEBINDERS_GIFT_SUMMON = 62572, SPELL_NATURE_BOMB_SUMMON = 64604, @@ -114,13 +114,22 @@ enum SPELL_SPORE_SUMMON_PERIODIC = 62566, // triggers 62582, 62591, 62592, 62593; cast by 33203 SPELL_HEALTHY_SPORE_VISUAL = 62538, // cast by npc 33215 SPELL_POTENT_PHEROMONES = 62541, // cast by npc 33215 + + // sun beam spells SPELL_UNSTABLE_SUN_BEAM_VISUAL = 62216, // cast by npc 33170 SPELL_UNSTABLE_ENERGY = 62451, // cast by npc 33170 SPELL_UNSTABLE_ENERGY_H = 62865, + + // nature bomb spells SPELL_NATURE_BOMB_GO = 64600, // spawns go 194902 SPELL_NATURE_BOMB = 64587, SPELL_NATURE_BOMB_H = 64650, + // allies of nature spells + SPELL_ATTUNED_10_STACKS = 62525, // remove 10 stacks of 62519 + SPELL_ATTUNED_2_STACKS = 62524, // remove 2 stacks of 62519 + SPELL_ATTUNED_25_STACKS = 62521, // remove 25 stacks of 62519 + // eonar's gift spells SPELL_LIFEBINDERS_GIFT = 62584, SPELL_LIFEBINDERS_GIFT_H = 64185, @@ -129,7 +138,7 @@ enum SPELL_PHEROMONES = 62619, // allies of nature summons - NPC_DETONATING_LASHER = 32918, + NPC_DETONATING_LASHER = 32918, // has auras 64481 and 28819 NPC_ANCIENT_CONSERVATOR = 33203, NPC_WATER_SPIRIT = 33202, NPC_STORM_LASHER = 32919, @@ -145,8 +154,13 @@ enum // other GO_NATURE_BOMB = 194902, + MIN_ATTUNED_NATURE_STACKS = 25, + MAX_ALLIES_SPELLS = 3, + MAX_ALLIES_WAVES = 6, }; +static const uint32 aAlliesSpawnSpells[MAX_ALLIES_SPELLS] = {SPELL_SUMMON_WAVE_1, SPELL_SUMMON_WAVE_3, SPELL_SUMMON_WAVE_10}; + /*###### ## boss_freya ######*/ @@ -157,6 +171,12 @@ struct MANGOS_DLL_DECL boss_freyaAI : public ScriptedAI { m_pInstance = (instance_ulduar*)pCreature->GetInstanceData(); m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); + + // init the Allies of Nature spells + spawnSpellsVector.reserve(MAX_ALLIES_SPELLS); + for (uint8 i = 0; i < MAX_ALLIES_SPELLS; ++i) + spawnSpellsVector.push_back(aAlliesSpawnSpells[i]); + m_bEventFinished = false; m_uiEpilogueTimer = 0; Reset(); @@ -169,9 +189,27 @@ struct MANGOS_DLL_DECL boss_freyaAI : public ScriptedAI uint32 m_uiEpilogueTimer; uint32 m_uiBerserkTimer; + uint32 m_uiAlliesNatureTimer; + uint8 m_uiAlliesWaveCount; + + uint32 m_uiSunbeamTimer; + uint32 m_uiNatureBombTimer; + uint32 m_uiLifebindersGiftTimer; + + std::vector spawnSpellsVector; + void Reset() override { - m_uiBerserkTimer = 10 * MINUTE * IN_MILLISECONDS; + m_uiBerserkTimer = 10 * MINUTE * IN_MILLISECONDS; + + m_uiAlliesNatureTimer = 10000; + m_uiAlliesWaveCount = 0; + m_uiNatureBombTimer = 65000; + m_uiSunbeamTimer = 20000; + m_uiLifebindersGiftTimer = 25000; + + // make the spawn spells random + std::random_shuffle(spawnSpellsVector.begin(), spawnSpellsVector.end()); } void Aggro(Unit* /*pWho*/) override @@ -183,6 +221,9 @@ struct MANGOS_DLL_DECL boss_freyaAI : public ScriptedAI if (m_pInstance) m_pInstance->SetData(TYPE_FREYA, IN_PROGRESS); + DoCastSpellIfCan(m_creature, SPELL_ATTUNED_TO_NATURE, CAST_TRIGGERED | CAST_AURA_NOT_PRESENT); + DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_TOUCH_OF_EONAR : SPELL_TOUCH_OF_EONAR_H, CAST_TRIGGERED | CAST_AURA_NOT_PRESENT); + DoScriptText(SAY_AGGRO, m_creature); FetchElders(); } @@ -245,6 +286,13 @@ struct MANGOS_DLL_DECL boss_freyaAI : public ScriptedAI case 2: DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_SUMMON_CHEST_2 : SPELL_SUMMON_CHEST_2_H, CAST_TRIGGERED); break; case 3: DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_SUMMON_CHEST_3 : SPELL_SUMMON_CHEST_3_H, CAST_TRIGGERED); break; } + + // check aura stacks for achiev + if (SpellAuraHolder* pNatureAura = m_creature->GetSpellAuraHolder(SPELL_ATTUNED_TO_NATURE)) + { + if (pNatureAura && pNatureAura->GetStackAmount() >= MIN_ATTUNED_NATURE_STACKS) + m_pInstance->SetSpecialAchievementCriteria(TYPE_ACHIEV_BACK_NATURE, true); + } } DoScriptText(SAY_EPILOGUE, m_creature); @@ -267,10 +315,76 @@ struct MANGOS_DLL_DECL boss_freyaAI : public ScriptedAI void JustSummoned(Creature* pSummoned) override { + switch (pSummoned->GetEntry()) + { + case NPC_EONARS_GIFT: + pSummoned->CastSpell(pSummoned, SPELL_LIFEBINDERS_GIFT_VISUAL, true); + pSummoned->CastSpell(pSummoned, SPELL_AUTO_GROW, true); + pSummoned->CastSpell(pSummoned, SPELL_PHEROMONES, true); + break; + case NPC_DETONATING_LASHER: + case NPC_ANCIENT_CONSERVATOR: + case NPC_WATER_SPIRIT: + case NPC_STORM_LASHER: + case NPC_SNAPLASHER: + pSummoned->AI()->AttackStart(m_creature->getVictim()); + break; + case NPC_NATURE_BOMB: + pSummoned->CastSpell(pSummoned, SPELL_NATURE_BOMB_GO, true); + break; + } } void SummonedCreatureJustDied(Creature* pSummoned) override { + switch (pSummoned->GetEntry()) + { + case NPC_DETONATING_LASHER: + pSummoned->CastSpell(m_creature, SPELL_ATTUNED_2_STACKS, true); + break; + case NPC_ANCIENT_CONSERVATOR: + pSummoned->CastSpell(m_creature, SPELL_ATTUNED_25_STACKS, true); + break; + case NPC_WATER_SPIRIT: + case NPC_STORM_LASHER: + case NPC_SNAPLASHER: + pSummoned->CastSpell(m_creature, SPELL_ATTUNED_10_STACKS, true); + break; + } + } + + void ReceiveAIEvent(AIEventType eventType, Creature* /*pSender*/, Unit* /*pInvoker*/, uint32 /*uiMiscValue*/) override + { + // handle Allies of Nature spawn + if (eventType == AI_EVENT_CUSTOM_A) + { + // adjust the index to the size of the vector + uint8 uiIndex = m_uiAlliesWaveCount; + if (uiIndex >= MAX_ALLIES_SPELLS) + uiIndex = m_uiAlliesWaveCount - MAX_ALLIES_SPELLS; + + switch (spawnSpellsVector[uiIndex]) + { + case SPELL_SUMMON_WAVE_1: DoScriptText(SAY_ADDS_CONSERVATOR, m_creature); break; + case SPELL_SUMMON_WAVE_3: DoScriptText(SAY_ADDS_TRIO, m_creature); break; + case SPELL_SUMMON_WAVE_10: DoScriptText(SAY_ADDS_LASHER, m_creature); break; + } + + DoCastSpellIfCan(m_creature, spawnSpellsVector[uiIndex], CAST_TRIGGERED); + + ++m_uiAlliesWaveCount; + + // re-shuffle the spells + if (m_uiAlliesWaveCount == MAX_ALLIES_SPELLS) + { + uint32 uiLastSpell = spawnSpellsVector[MAX_ALLIES_SPELLS - 1]; + std::random_shuffle(spawnSpellsVector.begin(), spawnSpellsVector.end()); + + // make sure we won't repeat the last spell + while (spawnSpellsVector[0] == uiLastSpell) + std::random_shuffle(spawnSpellsVector.begin(), spawnSpellsVector.end()); + } + } } // check for all elders alive @@ -334,6 +448,52 @@ struct MANGOS_DLL_DECL boss_freyaAI : public ScriptedAI m_uiBerserkTimer -= uiDiff; } + if (m_uiAlliesWaveCount < MAX_ALLIES_WAVES) + { + if (m_uiAlliesNatureTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_SUMMON_ALLIES_OF_NATURE : SPELL_SUMMON_ALLIES_OF_NATURE_H) == CAST_OK) + { + DoScriptText(EMOTE_ALLIES_NATURE, m_creature); + m_uiAlliesNatureTimer = 60000; + } + } + else + m_uiAlliesNatureTimer -= uiDiff; + } + else + { + if (m_uiNatureBombTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_NATURE_BOMB_SUMMON) == CAST_OK) + m_uiNatureBombTimer = 15000; + } + else + m_uiNatureBombTimer -= uiDiff; + } + + if (m_uiSunbeamTimer < uiDiff) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, m_bIsRegularMode ? SPELL_SUNBEAM : SPELL_SUNBEAM_H) == CAST_OK) + m_uiSunbeamTimer = 15000; + } + } + else + m_uiSunbeamTimer -= uiDiff; + + if (m_uiLifebindersGiftTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_LIFEBINDERS_GIFT_SUMMON) == CAST_OK) + { + DoScriptText(EMOTE_LIFEBINDER, m_creature); + m_uiLifebindersGiftTimer = 40000; + } + } + else + m_uiLifebindersGiftTimer -= uiDiff; + DoMeleeAttackIfReady(); } }; @@ -343,6 +503,109 @@ CreatureAI* GetAI_boss_freya(Creature* pCreature) return new boss_freyaAI(pCreature); } +bool EffectScriptEffectCreature_boss_freya(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget, ObjectGuid /*originalCasterGuid*/) +{ + if ((uiSpellId == SPELL_SUMMON_ALLIES_OF_NATURE || uiSpellId == SPELL_SUMMON_ALLIES_OF_NATURE_H) && uiEffIndex == EFFECT_INDEX_0) + { + if (pCreatureTarget->GetEntry() == NPC_FREYA) + pCreatureTarget->AI()->SendAIEvent(AI_EVENT_CUSTOM_A, pCaster, pCreatureTarget); + + return true; + } + + return false; +} + +/*###### +## npc_eonars_gift +######*/ + +struct MANGOS_DLL_DECL npc_eonars_giftAI : public Scripted_NoMovementAI +{ + npc_eonars_giftAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) + { + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); + Reset(); + } + + bool m_bIsRegularMode; + uint32 m_uiGiftTimer; + + void Reset() override + { + m_uiGiftTimer = 10000; + } + + void AttackStart(Unit* /*pWho*/) override { } + void MoveInLineOfSight(Unit* /*pWho*/) override { } + + void UpdateAI(const uint32 uiDiff) override + { + if (m_uiGiftTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_LIFEBINDERS_GIFT : SPELL_LIFEBINDERS_GIFT_H) == CAST_OK) + m_uiGiftTimer = 10000; + } + else + m_uiGiftTimer -= uiDiff; + } +}; + +CreatureAI* GetAI_npc_eonars_gift(Creature* pCreature) +{ + return new npc_eonars_giftAI(pCreature); +} + +/*###### +## npc_nature_bomb +######*/ + +struct MANGOS_DLL_DECL npc_nature_bombAI : public Scripted_NoMovementAI +{ + npc_nature_bombAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) + { + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); + Reset(); + } + + bool m_bIsRegularMode; + uint32 m_uiNatureBombTimer; + + ObjectGuid m_natureBombGuid; + + void Reset() override + { + m_uiNatureBombTimer = 10000; + } + + void JustSummoned(GameObject* pGo) override + { + m_natureBombGuid = pGo->GetObjectGuid(); + } + + void UpdateAI(const uint32 uiDiff) override + { + if (m_uiNatureBombTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_NATURE_BOMB : SPELL_NATURE_BOMB_H) == CAST_OK) + { + if (GameObject* pBomb = m_creature->GetMap()->GetGameObject(m_natureBombGuid)) + pBomb->Use(m_creature); + + m_creature->ForcedDespawn(2000); + m_uiNatureBombTimer = 10000; + } + } + else + m_uiNatureBombTimer -= uiDiff; + } +}; + +CreatureAI* GetAI_npc_nature_bomb(Creature* pCreature) +{ + return new npc_nature_bombAI(pCreature); +} + void AddSC_boss_freya() { Script* pNewScript; @@ -350,5 +613,16 @@ void AddSC_boss_freya() pNewScript = new Script; pNewScript->Name = "boss_freya"; pNewScript->GetAI = GetAI_boss_freya; + pNewScript->pEffectScriptEffectNPC = &EffectScriptEffectCreature_boss_freya; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_eonars_gift"; + pNewScript->GetAI = GetAI_npc_eonars_gift; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_nature_bomb"; + pNewScript->GetAI = GetAI_npc_nature_bomb; pNewScript->RegisterSelf(); } diff --git a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp index ffd158d20..32675b2f8 100644 --- a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp +++ b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp @@ -1150,6 +1150,18 @@ bool instance_ulduar::CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player c case ACHIEV_CRIT_LIGHTNING_N: case ACHIEV_CRIT_LIGHTNING_H: return m_abAchievCriteria[TYPE_ACHIEV_LIGHTNING]; + case ACHIEV_CRIT_BACK_NATURE_N: + case ACHIEV_CRIT_BACK_NATURE_H: + return m_abAchievCriteria[TYPE_ACHIEV_BACK_NATURE]; + case ACHIEV_CRIT_KNOCK_1_N: + case ACHIEV_CRIT_KNOCK_1_H: + return GetData(TYPE_FREYA_HARD) >= 1; + case ACHIEV_CRIT_KNOCK_2_N: + case ACHIEV_CRIT_KNOCK_2_H: + return GetData(TYPE_FREYA_HARD) >= 2; + case ACHIEV_CRIT_KNOCK_3_N: + case ACHIEV_CRIT_KNOCK_3_H: + return GetData(TYPE_FREYA_HARD) == 3; default: return false; diff --git a/scripts/northrend/ulduar/ulduar/ulduar.h b/scripts/northrend/ulduar/ulduar/ulduar.h index 70001f08b..72adb124a 100644 --- a/scripts/northrend/ulduar/ulduar/ulduar.h +++ b/scripts/northrend/ulduar/ulduar/ulduar.h @@ -180,7 +180,7 @@ enum NPC_KEEPER_MIMIRON = 33244, NPC_KEEPER_THORIM = 33242, - MAX_SPECIAL_ACHIEV_CRITS = 17, + MAX_SPECIAL_ACHIEV_CRITS = 18, TYPE_ACHIEV_CAT_LADY = 0, TYPE_ACHIEV_NINE_LIVES = 1, @@ -199,6 +199,7 @@ enum TYPE_ACHIEV_CHEESE_FREEZE = 14, TYPE_ACHIEV_COOL_FRIENDS = 15, TYPE_ACHIEV_LIGHTNING = 16, + TYPE_ACHIEV_BACK_NATURE = 17, // Loot chests // Kologarn @@ -317,6 +318,7 @@ enum // Achievement related ACHIEV_START_IGNIS_ID = 20951, // Ignis timed achievs 2930, 2929 ACHIEV_START_XT002_ID = 21027, // XT-002 timed achievs 2937, 2938 + ACHIEV_START_FREYA_ID = 21597, // Freya timed achievs 2980, 2981 ACHIEV_CRIT_SARONITE_N = 10451, // General Vezax, achievs 3181, 3188 ACHIEV_CRIT_SARONITE_H = 10462, @@ -380,6 +382,14 @@ enum ACHIEV_CRIT_LIGHTNING_H = 10309, ACHIEV_CRIT_LOSE_ILLUSION_N = 10440, // Thorim, achievs 3176, 3183 ACHIEV_CRIT_LOSE_ILLUSION_H = 10457, + ACHIEV_CRIT_BACK_NATURE_N = 10445, // Freya, achievs 2982, 2983 + ACHIEV_CRIT_BACK_NATURE_H = 10758, + ACHIEV_CRIT_KNOCK_1_N = 10785, // Freya, achievs 3177, 3185 + ACHIEV_CRIT_KNOCK_1_H = 10793, + ACHIEV_CRIT_KNOCK_2_N = 10786, // Freya, achievs 3178, 3186 + ACHIEV_CRIT_KNOCK_2_H = 10794, + ACHIEV_CRIT_KNOCK_3_N = 10787, // Freya, achievs 3179, 3187 + ACHIEV_CRIT_KNOCK_3_H = 10795, }; struct UlduarSpawns diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index bd9209728..aa09d6388 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2962" + #define SD2_REVISION_NR "2963" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 10b7ed5da..f78bd8788 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -1308,6 +1308,8 @@ UPDATE creature_template SET ScriptName='boss_sif' WHERE entry=33196; UPDATE creature_template SET ScriptName='npc_thunder_orb' WHERE entry=33378; UPDATE creature_template SET ScriptName='npc_runic_colossus' WHERE entry=32872; UPDATE creature_template SET ScriptName='boss_freya' WHERE entry=32906; +UPDATE creature_template SET ScriptName='npc_eonars_gift' WHERE entry=33228; +UPDATE creature_template SET ScriptName='npc_nature_bomb' WHERE entry=34129; DELETE FROM scripted_event_id WHERE id IN (9735,20907,20964,21030,21031,21032,21033,21045,21605,21606,21620); INSERT INTO scripted_event_id VALUES (9735, 'event_spell_saronite_barrier'), -- Vezax saronite barrier event diff --git a/sql/updates/r2963_mangos.sql b/sql/updates/r2963_mangos.sql new file mode 100644 index 000000000..4f9a6afb6 --- /dev/null +++ b/sql/updates/r2963_mangos.sql @@ -0,0 +1,2 @@ +UPDATE creature_template SET ScriptName='npc_eonars_gift' WHERE entry=33228; +UPDATE creature_template SET ScriptName='npc_nature_bomb' WHERE entry=34129; From 23ce8b3c0064ea7ba8e11f7f940e50a27e96621e Mon Sep 17 00:00:00 2001 From: Xfurry Date: Tue, 15 Oct 2013 00:10:11 +0300 Subject: [PATCH 0974/1172] [2964] Implement hard mode abilities for Freya This will also support Iron Roots debuff removal --- .../northrend/ulduar/ulduar/boss_freya.cpp | 164 ++++++++++++++++-- .../ulduar/ulduar/instance_ulduar.cpp | 17 ++ sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 + sql/updates/r2964_mangos.sql | 1 + 5 files changed, 167 insertions(+), 18 deletions(-) create mode 100644 sql/updates/r2964_mangos.sql diff --git a/scripts/northrend/ulduar/ulduar/boss_freya.cpp b/scripts/northrend/ulduar/ulduar/boss_freya.cpp index 2ef14ecd4..b32013dab 100644 --- a/scripts/northrend/ulduar/ulduar/boss_freya.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_freya.cpp @@ -16,7 +16,7 @@ /* ScriptData SDName: boss_freya -SD%Complete: 40% +SD%Complete: 60% SDComment: Parially complete. SDCategory: Ulduar EndScriptData */ @@ -37,9 +37,9 @@ enum SAY_BERSERK = -1603008, EMOTE_ALLIES_NATURE = -1603010, - EMOTE_LIFEBINDER = -1603011, - EMOTE_TREMOR = -1603012, - EMOTE_IRON_ROOTS = -1603013, + // EMOTE_LIFEBINDER = -1603011, + // EMOTE_TREMOR = -1603012, + // EMOTE_IRON_ROOTS = -1603013, SAY_AGGRO_BRIGHT = -1603014, SAY_SLAY_1_BRIGHT = -1603015, @@ -91,7 +91,8 @@ enum SPELL_SUMMON_CHEST_3_H = 62958, // hard mode spells - SPELL_DRAINED_OF_POWER = 62467, // stun effect for each elder alive + SPELL_FULL_HEAL = 43978, + SPELL_DRAINED_OF_POWER = 62467, // stun effect for each elder alive after finish channeling SPELL_BRIGHTLEAF_ESSENCE_CHANNEL = 62485, // brightleaf SPELL_BRIGHTLEAF_ESSENCE_CHANNEL_H = 65587, @@ -102,8 +103,6 @@ enum SPELL_IRONBRANCH_ESSENCE_CHANNEL_H = 65588, SPELL_IRON_ROOTS = 62439, SPELL_IRON_ROOTS_H = 62862, - // SPELL_STRENGTHEN_IRON_ROOTS = 62440, // purpose unk - // SPELL_STRENGTHEN_IRON_ROOTS_H = 63601, SPELL_STONEBARK_ESSEMCE_CHANNEL = 62483, // stonebark SPELL_STONEBARK_ESSEMCE_CHANNEL_H = 65589, @@ -115,10 +114,16 @@ enum SPELL_HEALTHY_SPORE_VISUAL = 62538, // cast by npc 33215 SPELL_POTENT_PHEROMONES = 62541, // cast by npc 33215 - // sun beam spells - SPELL_UNSTABLE_SUN_BEAM_VISUAL = 62216, // cast by npc 33170 - SPELL_UNSTABLE_ENERGY = 62451, // cast by npc 33170 - SPELL_UNSTABLE_ENERGY_H = 62865, + // sun beam spells; handled by eventAI + // SPELL_UNSTABLE_SUN_BEAM_VISUAL = 62216, // cast by npc 33170 + // SPELL_UNSTABLE_ENERGY = 62451, // cast by npc 33170 + // SPELL_UNSTABLE_ENERGY_H = 62865, + + // iron roots spells + SPELL_STRENGTHEN_IRON_ROOTS = 62440, // remove stun and damange aura from summoner + SPELL_STRENGTHEN_IRON_ROOTS_H = 63601, + SPELL_IRON_ROOTS_REMOVE = 62282, // same as above, but for the Elder version + SPELL_IRON_ROOTS_REMOVE_H = 63598, // nature bomb spells SPELL_NATURE_BOMB_GO = 64600, // spawns go 194902 @@ -146,14 +151,15 @@ enum // other summons NPC_NATURE_BOMB = 34129, - NPC_SUN_BEAM = 33170, + // NPC_SUN_BEAM = 33170, NPC_UNSTABLE_SUN_BEAM = 33050, + NPC_IRON_ROOTS = 33088, NPC_STRENGHENED_IRON_ROOTS = 33168, NPC_EONARS_GIFT = 33228, NPC_HEALTHY_SPORE = 33215, // other - GO_NATURE_BOMB = 194902, + // GO_NATURE_BOMB = 194902, MIN_ATTUNED_NATURE_STACKS = 25, MAX_ALLIES_SPELLS = 3, MAX_ALLIES_WAVES = 6, @@ -196,6 +202,10 @@ struct MANGOS_DLL_DECL boss_freyaAI : public ScriptedAI uint32 m_uiNatureBombTimer; uint32 m_uiLifebindersGiftTimer; + uint32 m_uiUnstableEnergyTimer; + uint32 m_uiIronRootsTimer; + uint32 m_uiGroundTremorTimer; + std::vector spawnSpellsVector; void Reset() override @@ -208,6 +218,10 @@ struct MANGOS_DLL_DECL boss_freyaAI : public ScriptedAI m_uiSunbeamTimer = 20000; m_uiLifebindersGiftTimer = 25000; + m_uiUnstableEnergyTimer = 0; + m_uiIronRootsTimer = 0; + m_uiGroundTremorTimer = 0; + // make the spawn spells random std::random_shuffle(spawnSpellsVector.begin(), spawnSpellsVector.end()); } @@ -224,7 +238,6 @@ struct MANGOS_DLL_DECL boss_freyaAI : public ScriptedAI DoCastSpellIfCan(m_creature, SPELL_ATTUNED_TO_NATURE, CAST_TRIGGERED | CAST_AURA_NOT_PRESENT); DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_TOUCH_OF_EONAR : SPELL_TOUCH_OF_EONAR_H, CAST_TRIGGERED | CAST_AURA_NOT_PRESENT); - DoScriptText(SAY_AGGRO, m_creature); FetchElders(); } @@ -249,7 +262,26 @@ struct MANGOS_DLL_DECL boss_freyaAI : public ScriptedAI void JustReachedHome() override { if (m_pInstance) + { m_pInstance->SetData(TYPE_FREYA, FAIL); + + // reset elders + if (Creature* pElder = m_pInstance->GetSingleCreatureFromStorage(NPC_ELDER_BRIGHTLEAF)) + { + if (pElder->isAlive()) + pElder->AI()->EnterEvadeMode(); + } + if (Creature* pElder = m_pInstance->GetSingleCreatureFromStorage(NPC_ELDER_IRONBRACH)) + { + if (pElder->isAlive()) + pElder->AI()->EnterEvadeMode(); + } + if (Creature* pElder = m_pInstance->GetSingleCreatureFromStorage(NPC_ELDER_STONEBARK)) + { + if (pElder->isAlive()) + pElder->AI()->EnterEvadeMode(); + } + } } void EnterEvadeMode() override @@ -398,21 +430,44 @@ struct MANGOS_DLL_DECL boss_freyaAI : public ScriptedAI if (Creature* pElder = m_pInstance->GetSingleCreatureFromStorage(NPC_ELDER_BRIGHTLEAF)) { if (pElder->isAlive()) + { + pElder->CastSpell(pElder, m_bIsRegularMode ? SPELL_BRIGHTLEAF_ESSENCE_CHANNEL : SPELL_BRIGHTLEAF_ESSENCE_CHANNEL_H, true); + pElder->CastSpell(pElder, SPELL_FULL_HEAL, true); + + m_uiUnstableEnergyTimer = 25000; ++uiEldersAlive; + } } if (Creature* pElder = m_pInstance->GetSingleCreatureFromStorage(NPC_ELDER_IRONBRACH)) { if (pElder->isAlive()) + { + pElder->CastSpell(pElder, m_bIsRegularMode ? SPELL_IRONBRANCH_ESSENCE_CHANNEL : SPELL_IRONBRANCH_ESSENCE_CHANNEL_H, true); + pElder->CastSpell(pElder, SPELL_FULL_HEAL, true); + + m_uiIronRootsTimer = 60000; ++uiEldersAlive; + } } if (Creature* pElder = m_pInstance->GetSingleCreatureFromStorage(NPC_ELDER_STONEBARK)) { if (pElder->isAlive()) + { + pElder->CastSpell(pElder, m_bIsRegularMode ? SPELL_STONEBARK_ESSEMCE_CHANNEL : SPELL_STONEBARK_ESSEMCE_CHANNEL_H, true); + pElder->CastSpell(pElder, SPELL_FULL_HEAL, true); + + m_uiGroundTremorTimer = 10000; ++uiEldersAlive; + } } // store the info about the elders alive m_pInstance->SetData(TYPE_FREYA_HARD, uiEldersAlive); + + if (uiEldersAlive) + DoScriptText(SAY_AGGRO_HARD, m_creature); + else + DoScriptText(SAY_AGGRO, m_creature); } void UpdateAI(const uint32 uiDiff) override @@ -486,14 +541,47 @@ struct MANGOS_DLL_DECL boss_freyaAI : public ScriptedAI if (m_uiLifebindersGiftTimer < uiDiff) { if (DoCastSpellIfCan(m_creature, SPELL_LIFEBINDERS_GIFT_SUMMON) == CAST_OK) - { - DoScriptText(EMOTE_LIFEBINDER, m_creature); m_uiLifebindersGiftTimer = 40000; - } } else m_uiLifebindersGiftTimer -= uiDiff; + // Brightleaf ability + if (m_uiUnstableEnergyTimer) + { + if (m_uiUnstableEnergyTimer <= uiDiff) + { + if (DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_UNSTABLE_SUN_BEAM : SPELL_UNSTABLE_SUN_BEAM_H) == CAST_OK) + m_uiUnstableEnergyTimer = 25000; + } + else + m_uiUnstableEnergyTimer -= uiDiff; + } + + // Ironbranch ability + if (m_uiIronRootsTimer) + { + if (m_uiIronRootsTimer <= uiDiff) + { + if (DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_IRON_ROOTS : SPELL_IRON_ROOTS_H) == CAST_OK) + m_uiIronRootsTimer = 60000; + } + else + m_uiIronRootsTimer -= uiDiff; + } + + // Stonebark ability + if (m_uiGroundTremorTimer) + { + if (m_uiGroundTremorTimer <= uiDiff) + { + if (DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_GROUND_TREMOR : SPELL_GROUND_TREMOR_H) == CAST_OK) + m_uiGroundTremorTimer = 30000; + } + else + m_uiGroundTremorTimer -= uiDiff; + } + DoMeleeAttackIfReady(); } }; @@ -606,6 +694,43 @@ CreatureAI* GetAI_npc_nature_bomb(Creature* pCreature) return new npc_nature_bombAI(pCreature); } +/*###### +## npc_iron_roots +######*/ + +struct MANGOS_DLL_DECL npc_iron_rootsAI : public Scripted_NoMovementAI +{ + npc_iron_rootsAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) + { + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); + Reset(); + } + + bool m_bIsRegularMode; + + void Reset() override { } + void AttackStart(Unit* /*pWho*/) override { } + void MoveInLineOfSight(Unit* /*pWho*/) override { } + + void JustDied(Unit* /*pKiller*/) override + { + if (!m_creature->IsTemporarySummon()) + return; + + if (m_creature->GetEntry() == NPC_IRON_ROOTS) + DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_IRON_ROOTS_REMOVE : SPELL_IRON_ROOTS_REMOVE_H, CAST_TRIGGERED); + else if (m_creature->GetEntry() == NPC_STRENGHENED_IRON_ROOTS) + DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_STRENGTHEN_IRON_ROOTS : SPELL_STRENGTHEN_IRON_ROOTS_H, CAST_TRIGGERED); + } + + void UpdateAI(const uint32 /*uiDiff*/) override { } +}; + +CreatureAI* GetAI_npc_iron_roots(Creature* pCreature) +{ + return new npc_iron_rootsAI(pCreature); +} + void AddSC_boss_freya() { Script* pNewScript; @@ -625,4 +750,9 @@ void AddSC_boss_freya() pNewScript->Name = "npc_nature_bomb"; pNewScript->GetAI = GetAI_npc_nature_bomb; pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_iron_roots"; + pNewScript->GetAI = GetAI_npc_iron_roots; + pNewScript->RegisterSelf(); } diff --git a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp index 32675b2f8..abeb1627a 100644 --- a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp +++ b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp @@ -665,6 +665,23 @@ void instance_ulduar::SetData(uint32 uiType, uint32 uiData) m_auiEncounter[uiType] = uiData; if (uiData == DONE) { + // despawn elders which are still alive on event complete + if (Creature* pElder = GetSingleCreatureFromStorage(NPC_ELDER_BRIGHTLEAF)) + { + if (pElder->isAlive()) + pElder->ForcedDespawn(); + } + if (Creature* pElder = GetSingleCreatureFromStorage(NPC_ELDER_IRONBRACH)) + { + if (pElder->isAlive()) + pElder->ForcedDespawn(); + } + if (Creature* pElder = GetSingleCreatureFromStorage(NPC_ELDER_STONEBARK)) + { + if (pElder->isAlive()) + pElder->ForcedDespawn(); + } + SpawnFriendlyKeeper(NPC_KEEPER_FREYA); DoOpenMadnessDoorIfCan(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index aa09d6388..494324997 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2963" + #define SD2_REVISION_NR "2964" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index f78bd8788..e3c7d04ad 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -1310,6 +1310,7 @@ UPDATE creature_template SET ScriptName='npc_runic_colossus' WHERE entry=32872; UPDATE creature_template SET ScriptName='boss_freya' WHERE entry=32906; UPDATE creature_template SET ScriptName='npc_eonars_gift' WHERE entry=33228; UPDATE creature_template SET ScriptName='npc_nature_bomb' WHERE entry=34129; +UPDATE creature_template SET ScriptName='npc_iron_roots' WHERE entry IN (33088,33168); DELETE FROM scripted_event_id WHERE id IN (9735,20907,20964,21030,21031,21032,21033,21045,21605,21606,21620); INSERT INTO scripted_event_id VALUES (9735, 'event_spell_saronite_barrier'), -- Vezax saronite barrier event diff --git a/sql/updates/r2964_mangos.sql b/sql/updates/r2964_mangos.sql new file mode 100644 index 000000000..fa7b28266 --- /dev/null +++ b/sql/updates/r2964_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_iron_roots' WHERE entry IN (33088,33168); From 47495cd2f84e1a8f0bbb883c72401bd339f373ac Mon Sep 17 00:00:00 2001 From: Xfurry Date: Tue, 15 Oct 2013 15:32:11 +0300 Subject: [PATCH 0975/1172] [2965] Implement abilities and game mechanics for Freya nature allies --- .../northrend/ulduar/ulduar/boss_freya.cpp | 303 +++++++++++++++++- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 4 + sql/scriptdev2_script_full.sql | 2 +- sql/updates/r2965_mangos.sql | 4 + sql/updates/r2965_scriptdev2.sql | 3 + 6 files changed, 314 insertions(+), 4 deletions(-) create mode 100644 sql/updates/r2965_mangos.sql create mode 100644 sql/updates/r2965_scriptdev2.sql diff --git a/scripts/northrend/ulduar/ulduar/boss_freya.cpp b/scripts/northrend/ulduar/ulduar/boss_freya.cpp index b32013dab..8a3ebe449 100644 --- a/scripts/northrend/ulduar/ulduar/boss_freya.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_freya.cpp @@ -16,7 +16,7 @@ /* ScriptData SDName: boss_freya -SD%Complete: 60% +SD%Complete: 80% SDComment: Parially complete. SDCategory: Ulduar EndScriptData */ @@ -37,7 +37,7 @@ enum SAY_BERSERK = -1603008, EMOTE_ALLIES_NATURE = -1603010, - // EMOTE_LIFEBINDER = -1603011, + EMOTE_REGEN_ALLIES = -1603011, // EMOTE_TREMOR = -1603012, // EMOTE_IRON_ROOTS = -1603013, @@ -135,6 +135,18 @@ enum SPELL_ATTUNED_2_STACKS = 62524, // remove 2 stacks of 62519 SPELL_ATTUNED_25_STACKS = 62521, // remove 25 stacks of 62519 + // three allies spells + SPELL_FEIGN_DEATH = 65985, + SPELL_CLEAR_DEBUFFS = 34098, + SPELL_TIDAL_WAVE = 62652, + SPELL_TIDAL_WAVE_VISUAL = 62655, + SPELL_HARDENED_BARK = 62664, + SPELL_HARDENED_BARK_H = 64191, + SPELL_LIGHTNING_LASH = 62648, + SPELL_LIGHTNING_LASH_H = 62939, + SPELL_STORMBOLT = 62649, + SPELL_STORMBOLT_H = 62938, + // eonar's gift spells SPELL_LIFEBINDERS_GIFT = 62584, SPELL_LIFEBINDERS_GIFT_H = 64185, @@ -201,11 +213,16 @@ struct MANGOS_DLL_DECL boss_freyaAI : public ScriptedAI uint32 m_uiSunbeamTimer; uint32 m_uiNatureBombTimer; uint32 m_uiLifebindersGiftTimer; + uint32 m_uiThreeAlliesTimer; uint32 m_uiUnstableEnergyTimer; uint32 m_uiIronRootsTimer; uint32 m_uiGroundTremorTimer; + ObjectGuid m_waterSpiritGuid; + ObjectGuid m_stormLasherGuid; + ObjectGuid m_snaplasherGuid; + std::vector spawnSpellsVector; void Reset() override @@ -217,6 +234,7 @@ struct MANGOS_DLL_DECL boss_freyaAI : public ScriptedAI m_uiNatureBombTimer = 65000; m_uiSunbeamTimer = 20000; m_uiLifebindersGiftTimer = 25000; + m_uiThreeAlliesTimer = 0; m_uiUnstableEnergyTimer = 0; m_uiIronRootsTimer = 0; @@ -356,9 +374,18 @@ struct MANGOS_DLL_DECL boss_freyaAI : public ScriptedAI break; case NPC_DETONATING_LASHER: case NPC_ANCIENT_CONSERVATOR: + pSummoned->AI()->AttackStart(m_creature->getVictim()); + break; case NPC_WATER_SPIRIT: + m_waterSpiritGuid = pSummoned->GetObjectGuid(); + pSummoned->AI()->AttackStart(m_creature->getVictim()); + break; case NPC_STORM_LASHER: + m_stormLasherGuid = pSummoned->GetObjectGuid(); + pSummoned->AI()->AttackStart(m_creature->getVictim()); + break; case NPC_SNAPLASHER: + m_snaplasherGuid = pSummoned->GetObjectGuid(); pSummoned->AI()->AttackStart(m_creature->getVictim()); break; case NPC_NATURE_BOMB: @@ -417,6 +444,11 @@ struct MANGOS_DLL_DECL boss_freyaAI : public ScriptedAI std::random_shuffle(spawnSpellsVector.begin(), spawnSpellsVector.end()); } } + else if (eventType == AI_EVENT_CUSTOM_B) + { + if (!m_uiThreeAlliesTimer) + m_uiThreeAlliesTimer = 12000; + } } // check for all elders alive @@ -503,6 +535,35 @@ struct MANGOS_DLL_DECL boss_freyaAI : public ScriptedAI m_uiBerserkTimer -= uiDiff; } + if (m_uiThreeAlliesTimer) + { + if (m_uiThreeAlliesTimer <= uiDiff) + { + Creature* pSpirit = m_creature->GetMap()->GetCreature(m_waterSpiritGuid); + Creature* pStormLasher = m_creature->GetMap()->GetCreature(m_stormLasherGuid); + Creature* pSnapLasher = m_creature->GetMap()->GetCreature(m_snaplasherGuid); + if (!pSpirit || !pStormLasher || !pSnapLasher) + return; + + if (pSpirit->HasAura(SPELL_FEIGN_DEATH) && pStormLasher->HasAura(SPELL_FEIGN_DEATH) && pSnapLasher->HasAura(SPELL_FEIGN_DEATH)) + { + m_creature->DealDamage(pSpirit, pSpirit->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NONE, NULL, false); + m_creature->DealDamage(pStormLasher, pStormLasher->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NONE, NULL, false); + m_creature->DealDamage(pSnapLasher, pSnapLasher->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NONE, NULL, false); + } + else + { + pSpirit->CastSpell(pSpirit, SPELL_FULL_HEAL, true); + pStormLasher->CastSpell(pStormLasher, SPELL_FULL_HEAL, true); + pSnapLasher->CastSpell(pSnapLasher, SPELL_FULL_HEAL, true); + } + + m_uiThreeAlliesTimer = 0; + } + else + m_uiThreeAlliesTimer -= uiDiff; + } + if (m_uiAlliesWaveCount < MAX_ALLIES_WAVES) { if (m_uiAlliesNatureTimer < uiDiff) @@ -604,6 +665,197 @@ bool EffectScriptEffectCreature_boss_freya(Unit* pCaster, uint32 uiSpellId, Spel return false; } +/*###### +## three_nature_allies +######*/ + +struct MANGOS_DLL_DECL three_nature_alliesAI : public ScriptedAI +{ + three_nature_alliesAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (instance_ulduar*)pCreature->GetInstanceData(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); + Reset(); + } + + instance_ulduar* m_pInstance; + bool m_bIsRegularMode; + + bool m_bIsFakeDeath; + + void Reset() override + { + m_bIsFakeDeath = false; + } + + void DamageTaken(Unit* pDoneBy, uint32& uiDamage) override + { + if (pDoneBy->GetEntry() == NPC_FREYA) + return; + + if (uiDamage >= m_creature->GetHealth()) + { + uiDamage = 0; + + if (m_bIsFakeDeath) + return; + + if (m_pInstance) + { + if (Creature* pFreya = m_pInstance->GetSingleCreatureFromStorage(NPC_FREYA)) + SendAIEvent(AI_EVENT_CUSTOM_B, m_creature, pFreya); + } + + DoCastSpellIfCan(m_creature, SPELL_CLEAR_DEBUFFS, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_FEIGN_DEATH, CAST_TRIGGERED); + + m_creature->SetHealth(1); + m_creature->ClearComboPointHolders(); + m_creature->ModifyAuraState(AURA_STATE_HEALTHLESS_20_PERCENT, false); + m_creature->ModifyAuraState(AURA_STATE_HEALTHLESS_35_PERCENT, false); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + m_creature->ClearAllReactives(); + m_creature->GetMotionMaster()->Clear(); + m_creature->GetMotionMaster()->MoveIdle(); + m_creature->SetStandState(UNIT_STAND_STATE_DEAD); + + DoScriptText(EMOTE_REGEN_ALLIES, m_creature); + m_bIsFakeDeath = true; + } + } + + void SpellHit(Unit* pCaster, const SpellEntry* pSpell) override + { + if (pSpell->Id == SPELL_FULL_HEAL) + { + m_bIsFakeDeath = false; + DoResetThreat(); + m_creature->RemoveAurasDueToSpell(SPELL_FEIGN_DEATH); + m_creature->SetStandState(UNIT_STAND_STATE_STAND); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + } + } +}; + +/*###### +## npc_water_spirit +######*/ + +struct MANGOS_DLL_DECL npc_water_spiritAI : public three_nature_alliesAI +{ + npc_water_spiritAI(Creature* pCreature) : three_nature_alliesAI(pCreature) { Reset(); } + + uint32 m_uiTidalWaveTimer; + + void Reset() override + { + m_uiTidalWaveTimer = 10000; + three_nature_alliesAI::Reset(); + } + + void UpdateAI(const uint32 uiDiff) override + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_uiTidalWaveTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_TIDAL_WAVE) == CAST_OK) + { + DoCastSpellIfCan(m_creature, SPELL_TIDAL_WAVE_VISUAL, CAST_TRIGGERED); + m_uiTidalWaveTimer = 10000; + } + } + else + m_uiTidalWaveTimer -= uiDiff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_npc_water_spirit(Creature* pCreature) +{ + return new npc_water_spiritAI(pCreature); +} + +/*###### +## npc_snaplasher +######*/ + +struct MANGOS_DLL_DECL npc_snaplasherAI : public three_nature_alliesAI +{ + npc_snaplasherAI(Creature* pCreature) : three_nature_alliesAI(pCreature) { Reset(); } + + void Reset() override + { + three_nature_alliesAI::Reset(); + } + + void Aggro(Unit* /*pWho*/) override + { + DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_HARDENED_BARK : SPELL_HARDENED_BARK_H); + } +}; + +CreatureAI* GetAI_npc_snaplasher(Creature* pCreature) +{ + return new npc_snaplasherAI(pCreature); +} + +/*###### +## npc_storm_lasher +######*/ + +struct MANGOS_DLL_DECL npc_storm_lasherAI : public three_nature_alliesAI +{ + npc_storm_lasherAI(Creature* pCreature) : three_nature_alliesAI(pCreature) { Reset(); } + + uint32 m_uiLightningLashTimer; + uint32 m_uiStormBoltTimer; + + void Reset() override + { + m_uiLightningLashTimer = urand(5000, 10000); + m_uiStormBoltTimer = 5000; + three_nature_alliesAI::Reset(); + } + + void UpdateAI(const uint32 uiDiff) override + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_uiLightningLashTimer < uiDiff) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_LIGHTNING_LASH : SPELL_LIGHTNING_LASH_H) == CAST_OK) + m_uiLightningLashTimer = urand(5000, 10000); + } + } + else + m_uiLightningLashTimer -= uiDiff; + + if (m_uiStormBoltTimer < uiDiff) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_STORMBOLT : SPELL_STORMBOLT_H) == CAST_OK) + m_uiStormBoltTimer = 5000; + } + } + else + m_uiStormBoltTimer -= uiDiff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_npc_storm_lasher(Creature* pCreature) +{ + return new npc_storm_lasherAI(pCreature); +} + /*###### ## npc_eonars_gift ######*/ @@ -731,6 +983,33 @@ CreatureAI* GetAI_npc_iron_roots(Creature* pCreature) return new npc_iron_rootsAI(pCreature); } +/*###### +## npc_healthy_spore +######*/ + +// TODO Remove this 'script' when combat can be proper prevented from core-side +struct MANGOS_DLL_DECL npc_healthy_sporeAI : public Scripted_NoMovementAI +{ + npc_healthy_sporeAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { Reset(); } + + void Reset() override + { + DoCastSpellIfCan(m_creature, SPELL_AUTO_GROW, CAST_TRIGGERED | CAST_AURA_NOT_PRESENT); + DoCastSpellIfCan(m_creature, SPELL_POTENT_PHEROMONES, CAST_TRIGGERED | CAST_AURA_NOT_PRESENT); + DoCastSpellIfCan(m_creature, SPELL_HEALTHY_SPORE_VISUAL, CAST_TRIGGERED | CAST_AURA_NOT_PRESENT); + m_creature->ForcedDespawn(25000); + } + + void AttackStart(Unit* /*pWho*/) override { } + void MoveInLineOfSight(Unit* /*pWho*/) override { } + void UpdateAI(const uint32 /*uiDiff*/) override { } +}; + +CreatureAI* GetAI_npc_healthy_spore(Creature* pCreature) +{ + return new npc_healthy_sporeAI(pCreature); +} + void AddSC_boss_freya() { Script* pNewScript; @@ -741,6 +1020,21 @@ void AddSC_boss_freya() pNewScript->pEffectScriptEffectNPC = &EffectScriptEffectCreature_boss_freya; pNewScript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "npc_water_spirit"; + pNewScript->GetAI = GetAI_npc_water_spirit; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_snaplasher"; + pNewScript->GetAI = GetAI_npc_snaplasher; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_storm_lasher"; + pNewScript->GetAI = GetAI_npc_storm_lasher; + pNewScript->RegisterSelf(); + pNewScript = new Script; pNewScript->Name = "npc_eonars_gift"; pNewScript->GetAI = GetAI_npc_eonars_gift; @@ -755,4 +1049,9 @@ void AddSC_boss_freya() pNewScript->Name = "npc_iron_roots"; pNewScript->GetAI = GetAI_npc_iron_roots; pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_healthy_spore"; + pNewScript->GetAI = GetAI_npc_healthy_spore; + pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 494324997..1a8bdb118 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2964" + #define SD2_REVISION_NR "2965" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index e3c7d04ad..fa7e658ef 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -1311,6 +1311,10 @@ UPDATE creature_template SET ScriptName='boss_freya' WHERE entry=32906; UPDATE creature_template SET ScriptName='npc_eonars_gift' WHERE entry=33228; UPDATE creature_template SET ScriptName='npc_nature_bomb' WHERE entry=34129; UPDATE creature_template SET ScriptName='npc_iron_roots' WHERE entry IN (33088,33168); +UPDATE creature_template SET ScriptName='npc_healthy_spore' WHERE entry=33215; +UPDATE creature_template SET ScriptName='npc_water_spirit' WHERE entry=33202; +UPDATE creature_template SET ScriptName='npc_snaplasher' WHERE entry=32916; +UPDATE creature_template SET ScriptName='npc_storm_lasher' WHERE entry=32919; DELETE FROM scripted_event_id WHERE id IN (9735,20907,20964,21030,21031,21032,21033,21045,21605,21606,21620); INSERT INTO scripted_event_id VALUES (9735, 'event_spell_saronite_barrier'), -- Vezax saronite barrier event diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index fb3397664..a50c566b9 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -3368,7 +3368,7 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1603009,'Eonar, your servant calls for your blessing!',15535,1,0,0,'freya SAY_HELP_YOGG'), (-1603010,'Allies of Nature have appeared!',0,3,0,0,'freya EMOTE_ALLIES_NATURE'), -(-1603011,'A Lifebinder\'s Gift begins to grow!',0,3,0,0,'freya EMOTE_LIFEBINDER'), +(-1603011,'The %s withers into the earth and begins to regenerate.',0,2,0,0,'freya EMOTE_REGEN_ALLIES'), (-1603012,'Freya begins to cast Ground Tremor!',0,3,0,0,'freya EMOTE_TREMOR'), (-1603013,'Freya casts Strenghtened Iron Roots!',0,3,0,0,'freya EMOTE_IRON_ROOTS'), diff --git a/sql/updates/r2965_mangos.sql b/sql/updates/r2965_mangos.sql new file mode 100644 index 000000000..105740e04 --- /dev/null +++ b/sql/updates/r2965_mangos.sql @@ -0,0 +1,4 @@ +UPDATE creature_template SET ScriptName='npc_healthy_spore' WHERE entry=33215; +UPDATE creature_template SET ScriptName='npc_water_spirit' WHERE entry=33202; +UPDATE creature_template SET ScriptName='npc_snaplasher' WHERE entry=32916; +UPDATE creature_template SET ScriptName='npc_storm_lasher' WHERE entry=32919; diff --git a/sql/updates/r2965_scriptdev2.sql b/sql/updates/r2965_scriptdev2.sql new file mode 100644 index 000000000..7ea823a5f --- /dev/null +++ b/sql/updates/r2965_scriptdev2.sql @@ -0,0 +1,3 @@ +DELETE FROM script_texts WHERE entry=-1603011; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1603011,'The %s withers into the earth and begins to regenerate.',0,2,0,0,'freya EMOTE_REGEN_ALLIES'); From dfef47790f2cbb36527357e97a77796557664fac Mon Sep 17 00:00:00 2001 From: Xfurry Date: Tue, 15 Oct 2013 18:52:08 +0300 Subject: [PATCH 0976/1172] [2966] Update some comments --- scripts/northrend/ulduar/ulduar/boss_freya.cpp | 12 ++++++------ sd2_revision_nr.h | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/scripts/northrend/ulduar/ulduar/boss_freya.cpp b/scripts/northrend/ulduar/ulduar/boss_freya.cpp index 8a3ebe449..0fe957880 100644 --- a/scripts/northrend/ulduar/ulduar/boss_freya.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_freya.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: boss_freya -SD%Complete: 80% -SDComment: Parially complete. +SD%Complete: 95% +SDComment: Elders and some of the Nature Allies handled in ACID. Script might require some minor improvements. SDCategory: Ulduar EndScriptData */ @@ -138,7 +138,7 @@ enum // three allies spells SPELL_FEIGN_DEATH = 65985, SPELL_CLEAR_DEBUFFS = 34098, - SPELL_TIDAL_WAVE = 62652, + SPELL_TIDAL_WAVE = 62652, // triggers 62653 or 62935 SPELL_TIDAL_WAVE_VISUAL = 62655, SPELL_HARDENED_BARK = 62664, SPELL_HARDENED_BARK_H = 64191, @@ -163,12 +163,12 @@ enum // other summons NPC_NATURE_BOMB = 34129, - // NPC_SUN_BEAM = 33170, - NPC_UNSTABLE_SUN_BEAM = 33050, + // NPC_SUN_BEAM = 33170, // handled in eventAI + // NPC_UNSTABLE_SUN_BEAM = 33050, // handled in eventAI NPC_IRON_ROOTS = 33088, NPC_STRENGHENED_IRON_ROOTS = 33168, NPC_EONARS_GIFT = 33228, - NPC_HEALTHY_SPORE = 33215, + // NPC_HEALTHY_SPORE = 33215, // other // GO_NATURE_BOMB = 194902, diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 1a8bdb118..e53c95b3e 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2965" + #define SD2_REVISION_NR "2966" #endif // __SD2_REVISION_NR_H__ From f1f1f898bd302ff8843f021f4ac5128df0cac5f1 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Tue, 15 Oct 2013 23:57:56 +0300 Subject: [PATCH 0977/1172] [2967] Implement very basic script for Mimiron --- .../northrend/ulduar/ulduar/boss_mimiron.cpp | 189 +++++++++++++++++- .../ulduar/ulduar/boss_yogg_saron.cpp | 1 + .../ulduar/ulduar/instance_ulduar.cpp | 2 + scripts/northrend/ulduar/ulduar/ulduar.h | 11 +- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 + sql/updates/r2967_mangos.sql | 1 + 7 files changed, 199 insertions(+), 8 deletions(-) create mode 100644 sql/updates/r2967_mangos.sql diff --git a/scripts/northrend/ulduar/ulduar/boss_mimiron.cpp b/scripts/northrend/ulduar/ulduar/boss_mimiron.cpp index 80def03e4..3971e9c78 100644 --- a/scripts/northrend/ulduar/ulduar/boss_mimiron.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_mimiron.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: boss_mimiron -SD%Complete: 0% -SDComment: +SD%Complete: 10% +SDComment: Very basic script. SDCategory: Ulduar EndScriptData */ @@ -50,12 +50,193 @@ enum SAY_ROBOT_SLAY_2 = -1603193, SAY_ROBOT_DEATH = -1603194, - SAY_HELP_YOGG = -1603195, - EMOTE_PLASMA_BLAST = -1603196, + + // generic spells + SPELL_WELD = 63339, + SPELL_TELEPORT_VISUAL = 41232, + SPELL_RIDE_VEHICLE_MIMIRON = 52391, // seat 0 + SPELL_RIDE_VEHICLE_MIMIRON_1 = 63313, // seat 1 + SPELL_RIDE_VEHICLE_MIMIRON_2 = 63314, // seat 2 + SPELL_RIDE_VEHICLE_MIMIRON_3 = 63315, // seat 3 + SPELL_RIDE_VEHICLE_MIMIRON_4 = 63316, // seat 4 + SPELL_RIDE_VEHICLE_MIMIRON_5 = 63344, // seat 5 + SPELL_RIDE_VEHICLE_MIMIRON_6 = 63345, // seat 6 + SPELL_JET_PACK = 63341, + SPELL_MIMIRON_SLEEP_VISUAL = 64393, + SPELL_MIMIRON_SLEEP_VISUAL_2 = 64394, + SPELL_SELF_REPAIR = 64383, + SPELL_BERSERK = 26662, + + // Leviathan spells + SPELL_FREEZE_ANIM = 16245, + SPELL_PROXIMITY_MINES = 63027, // triggers 65347 + SPELL_NAPALM_SHELL = 64539, // triggers 63667 which casts 63666 or 65026 + SPELL_PLASMA_BLAST = 62997, // cast by the turret + SPELL_PLASMA_BLAST_H = 64529, + SPELL_SHOCK_BLAST = 63631, + SPELL_FLAME_SUPPRESSANT = 64570, // hard mode spells + SPELL_EMERGENCY_MODE_LEVIATHAN = 65101, + + // VX001 spells + SPELL_RAPID_BURST_SUMMON = 64840, + SPELL_RAPID_BURST_LEFT = 63387, // used in the VX phase; each spell has a different robot animation + SPELL_RAPID_BURST_RIGHT = 64019, + SPELL_RAPID_BURST_LEFT_H = 64531, + SPELL_RAPID_BURST_RIGHT_H = 64532, + + SPELL_LASER_BARRAGE = 63274, + SPELL_SPINNING_UP = 63414, // laser barrage spell for the final phase + SPELL_ROCKET_STRIKE = 64402, // targets npc 34050; triggers 63681 and 63036 from target + SPELL_HEAT_WAVE = 63679, + SPELL_HEAT_WAVE_H = 64534, + SPELL_HAND_PULSE_LEFT = 64348, // spells used only in the final phase + SPELL_HAND_PULSE_RIGHT = 64352, // each as a different visual for robot hand animation + SPELL_HAND_PULSE_LEFT_H = 64536, + SPELL_HAND_PULSE_RIGHT_H = 64537, + SPELL_FLAME_SUPPRESSANT_CLOSE = 65192, // hard mode spell + SPELL_FROST_BOMB_SUMMON = 64627, // hard mode spell; summon npc 34149 + + // Aerial unit spells + SPELL_PLASMA_BALL_FLY = 63689, // used during the air phase + SPELL_PLASMA_BALL_FLY_H = 64535, + SPELL_PLASMA_BALL = 65647, // used during the final phase + SPELL_PLASMA_BALL_H = 65648, + SPELL_SUMMON_ASSAULT_BOT = 64427, // summon npc 34057 + SPELL_SUMMON_SCRAP_BOT = 63819, // summon npc 33855 + SPELL_BOMB_BOT_SUMMON = 63811, // summon npc 33836 + SPELL_SUMMON_FIRE_BOT = 64622, // hard mode spell; summon npc 34147 + + // hard mode spells + SPELL_SELF_DESTRUCTION = 64613, + SPELL_SELF_DESTRUCTION_DAMANGE = 64610, + SPELL_EMERGENCY_MODE = 64582, + + // fire spells + SPELL_SUMMON_FLAMES_INITIAL = 64563, // cast by npc 21252 + SPELL_FLAMES = 64561, // cast by npcs 34363 and 34121 + SPELL_SUMMON_FLAMES_SPREAD = 64562, // cast by npc 34363 + + // frost bomb spells + SPELL_EXPLOSION = 64626, + SPELL_FROST_BOMB_VISUAL = 64624, + + // summoned + NPC_PROXIMITY_MINE = 34362, // has aura 65345 + NPC_ROCKET_VISUAL = 34050, // mounted on vehicle 33651 + NPC_ROCKET_STRIKE = 34047, // has aura 64064 + NPC_BURST_TARGET = 34211, // casts 64841 on VX001 which triggers 63382 + NPC_ASSALT_BOT = 34057, + NPC_BOMB_BOT = 33836, // has aura 63767 + NPC_MAGNETIC_CORE = 34068, // has auras 64438 and 64436 + NPC_JUNK_BOT = 33855, + + // hard mode summoned + NPC_FLAME_INITIAL = 34363, + NPC_FLAME_SPREAD = 34121, + NPC_FROST_BOMB = 34149, + NPC_EMERGENCY_FIRE_BOT = 34147, + + // other + SEAT_ID_TURRET = 4, }; +/*###### +## boss_leviathan_mk2 +######*/ + +struct MANGOS_DLL_DECL boss_leviathan_mk2AI : public ScriptedAI +{ + boss_leviathan_mk2AI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (instance_ulduar*)pCreature->GetInstanceData(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); + m_uiMountTimer = 1000; + Reset(); + } + + instance_ulduar* m_pInstance; + bool m_bIsRegularMode; + + uint32 m_uiMountTimer; + + void Reset() override + { + } + + void Aggro(Unit* /*pWho*/) override + { + if (m_pInstance) + m_pInstance->SetData(TYPE_MIMIRON, IN_PROGRESS); + } + + void JustReachedHome() override + { + if (m_pInstance) + m_pInstance->SetData(TYPE_MIMIRON, FAIL); + } + + void KilledUnit(Unit* pVictim) override + { + if (pVictim->GetTypeId() != TYPEID_PLAYER) + return; + + DoScriptText(urand(0, 1) ? SAY_TANK_SLAY_1 : SAY_TANK_SLAY_2, m_creature); + } + + void JustSummoned(Creature* pSummoned) override + { + } + + void UpdateAI(const uint32 uiDiff) override + { + if (!m_pInstance) + { + script_error_log("Instance Ulduar: ERROR Failed to load instance data for this instace."); + return; + } + + // Mount Mimiron and the Turret manually + if (m_uiMountTimer) + { + if (m_uiMountTimer <= uiDiff) + { + if (Creature* pTurret = m_pInstance->GetSingleCreatureFromStorage(NPC_LEVIATHAN_MK_TURRET)) + { + int32 iSeat = (int32)SEAT_ID_TURRET; + pTurret->CastCustomSpell(m_creature, SPELL_RIDE_VEHICLE_HARDCODED, &iSeat, NULL, NULL, true); + } + + if (Creature* pMimiron = m_pInstance->GetSingleCreatureFromStorage(NPC_MIMIRON)) + { + pMimiron->CastSpell(m_creature, SPELL_RIDE_VEHICLE_MIMIRON, true); + pMimiron->CastSpell(pMimiron, SPELL_WELD, true); + } + + m_uiMountTimer = 0; + } + else + m_uiMountTimer -= uiDiff; + } + + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_leviathan_mk2(Creature* pCreature) +{ + return new boss_leviathan_mk2AI(pCreature); +} + void AddSC_boss_mimiron() { + Script* pNewScript; + pNewScript = new Script; + pNewScript->Name = "boss_leviathan_mk2"; + pNewScript->GetAI = GetAI_boss_leviathan_mk2; + pNewScript->RegisterSelf(); } diff --git a/scripts/northrend/ulduar/ulduar/boss_yogg_saron.cpp b/scripts/northrend/ulduar/ulduar/boss_yogg_saron.cpp index 621165c0c..6f83efb49 100644 --- a/scripts/northrend/ulduar/ulduar/boss_yogg_saron.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_yogg_saron.cpp @@ -74,6 +74,7 @@ enum SAY_FREYA_HELP = -1603009, SAY_HODIR_HELP = -1603093, SAY_THORIM_HELP = -1603155, + SAY_MIMIRON_HELP = -1603195, }; void AddSC_boss_yogg_saron() diff --git a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp index abeb1627a..bc18d2394 100644 --- a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp +++ b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp @@ -160,6 +160,8 @@ void instance_ulduar::OnCreatureCreate(Creature* pCreature) case NPC_BRANN_ALGALON: case NPC_LEVIATHAN_MK: + case NPC_LEVIATHAN_MK_TURRET: + case NPC_COMPUTER: case NPC_RUNIC_COLOSSUS: case NPC_RUNE_GIANT: case NPC_SIF: diff --git a/scripts/northrend/ulduar/ulduar/ulduar.h b/scripts/northrend/ulduar/ulduar/ulduar.h index 72adb124a..5bd817175 100644 --- a/scripts/northrend/ulduar/ulduar/ulduar.h +++ b/scripts/northrend/ulduar/ulduar/ulduar.h @@ -109,9 +109,6 @@ enum // The keepers of ulduar NPC_MIMIRON = 33350, - NPC_LEVIATHAN_MK = 33432, - NPC_VX001 = 33651, - NPC_AERIAL_UNIT = 33670, NPC_HODIR = 32845, NPC_THORIM = 32865, NPC_FREYA = 32906, @@ -158,6 +155,14 @@ enum NPC_HONOR_GUARD_STAIRS = 33125, // summoned mobs before the Rune Giant NPC_RUNE_ACOLYTE_STAIRS = 32957, + // Mimiron event npcs + NPC_LEVIATHAN_MK = 33432, + NPC_LEVIATHAN_MK_TURRET = 34071, + NPC_VX001 = 33651, + NPC_AERIAL_UNIT = 33670, + NPC_COMPUTER = 34143, + NPC_BOT_SUMMON_TRIGGER = 33856, + // The descent into madness NPC_VEZAX = 33271, NPC_SARONITE_ANIMUS = 33524, diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index e53c95b3e..99e50b808 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2966" + #define SD2_REVISION_NR "2967" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index fa7e658ef..0d3ba3144 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -1315,6 +1315,7 @@ UPDATE creature_template SET ScriptName='npc_healthy_spore' WHERE entry=33215; UPDATE creature_template SET ScriptName='npc_water_spirit' WHERE entry=33202; UPDATE creature_template SET ScriptName='npc_snaplasher' WHERE entry=32916; UPDATE creature_template SET ScriptName='npc_storm_lasher' WHERE entry=32919; +UPDATE creature_template SET ScriptName='boss_leviathan_mk2' WHERE entry=33432; DELETE FROM scripted_event_id WHERE id IN (9735,20907,20964,21030,21031,21032,21033,21045,21605,21606,21620); INSERT INTO scripted_event_id VALUES (9735, 'event_spell_saronite_barrier'), -- Vezax saronite barrier event diff --git a/sql/updates/r2967_mangos.sql b/sql/updates/r2967_mangos.sql new file mode 100644 index 000000000..cf95b4ed8 --- /dev/null +++ b/sql/updates/r2967_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='boss_leviathan_mk2' WHERE entry=33432; From d1a1cddf53fd97c14135d7b9ed2e98618a67cc1d Mon Sep 17 00:00:00 2001 From: Xfurry Date: Wed, 16 Oct 2013 00:59:42 +0300 Subject: [PATCH 0978/1172] [2968] Fix some bad vehicle behaviors at XT002 Also fix the broken Freya achiev criteria from previous commits --- .../northrend/ulduar/ulduar/boss_xt_002.cpp | 28 ++++++++++++------- scripts/northrend/ulduar/ulduar/ulduar.h | 12 ++++---- sd2_revision_nr.h | 2 +- 3 files changed, 25 insertions(+), 17 deletions(-) diff --git a/scripts/northrend/ulduar/ulduar/boss_xt_002.cpp b/scripts/northrend/ulduar/ulduar/boss_xt_002.cpp index 381b7d6a4..d71166ca5 100644 --- a/scripts/northrend/ulduar/ulduar/boss_xt_002.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_xt_002.cpp @@ -59,9 +59,9 @@ enum SPELL_LIFE_SPARK = 64210, // heart of XT002 spells - SPELL_HEART_RIDE_VEHICLE = 63852, // ride seat 1 - procs on damage (probably spell 17683) + SPELL_HEART_RIDE_VEHICLE = 63852, // ride seat 0 - procs on damage (probably spell 17683) SPELL_FULL_HEAL = 17683, - SPELL_RIDE_VEHICLE = 63313, // ride seat 2 + SPELL_RIDE_VEHICLE = 63313, // ride seat 1 SPELL_LIGHTNING_TETHER = 64799, // dummy SPELL_HEART_OVERLOAD = 62789, // triggers missing spell 62791 SPELL_EXPOSED_HEART = 63849, // procs on damage; triggers missing spell 62791 @@ -233,6 +233,8 @@ struct MANGOS_DLL_DECL boss_xt_002AI : public ScriptedAI pHeart->Respawn(); pHeart->AI()->EnterEvadeMode(); + m_creature->RemoveSpellsCausingAura(SPELL_AURA_CONTROL_VEHICLE); + pHeart->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); pHeart->CastSpell(m_creature, SPELL_HEART_RIDE_VEHICLE, true); } @@ -338,13 +340,15 @@ struct MANGOS_DLL_DECL boss_xt_002AI : public ScriptedAI // mount the heart back inside if not already killed if (m_pInstance && m_pInstance->GetData(TYPE_XT002_HARD) != DONE) { - if (Creature* pHeart = m_pInstance->GetSingleCreatureFromStorage(NPC_HEART_DECONSTRUCTOR)) - { - pHeart->CastSpell(m_creature, SPELL_HEART_RIDE_VEHICLE, true); - - // no spell found for this - pHeart->SetHealth(pHeart->GetMaxHealth()); - } + if (Creature* pHeart = m_pInstance->GetSingleCreatureFromStorage(NPC_HEART_DECONSTRUCTOR)) + { + pHeart->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + m_creature->RemoveSpellsCausingAura(SPELL_AURA_CONTROL_VEHICLE); + pHeart->CastSpell(m_creature, SPELL_HEART_RIDE_VEHICLE, true); + + // no spell found for this + pHeart->SetHealth(pHeart->GetMaxHealth()); + } } } else @@ -412,6 +416,10 @@ struct MANGOS_DLL_DECL boss_heart_deconstructorAI : public ScriptedAI // start XT phase switch and start recharging robots if (eventType == AI_EVENT_CUSTOM_A && pInvoker->GetEntry() == NPC_XT002) { + // remove flags and previous vehicle aura before applying the new one + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + pInvoker->RemoveSpellsCausingAura(SPELL_AURA_CONTROL_VEHICLE); + DoCastSpellIfCan(pInvoker, SPELL_RIDE_VEHICLE, CAST_TRIGGERED); DoCastSpellIfCan(pInvoker, SPELL_LIGHTNING_TETHER, CAST_TRIGGERED); DoCastSpellIfCan(m_creature, SPELL_HEART_OVERLOAD, CAST_TRIGGERED); @@ -493,7 +501,7 @@ struct MANGOS_DLL_DECL npc_scrapbotAI : public ScriptedAI DoCastSpellIfCan(pWho, SPELL_RIDE_VEHICLE_SCRAPBOT, CAST_TRIGGERED); pWho->CastSpell(m_creature, SPELL_SCRAP_REPAIR, true); DoScriptText(EMOTE_REPAIR, pWho); - m_creature->ForcedDespawn(2000); + m_creature->ForcedDespawn(4000); m_bIsHealed = true; } } diff --git a/scripts/northrend/ulduar/ulduar/ulduar.h b/scripts/northrend/ulduar/ulduar/ulduar.h index 5bd817175..726369cb0 100644 --- a/scripts/northrend/ulduar/ulduar/ulduar.h +++ b/scripts/northrend/ulduar/ulduar/ulduar.h @@ -389,12 +389,12 @@ enum ACHIEV_CRIT_LOSE_ILLUSION_H = 10457, ACHIEV_CRIT_BACK_NATURE_N = 10445, // Freya, achievs 2982, 2983 ACHIEV_CRIT_BACK_NATURE_H = 10758, - ACHIEV_CRIT_KNOCK_1_N = 10785, // Freya, achievs 3177, 3185 - ACHIEV_CRIT_KNOCK_1_H = 10793, - ACHIEV_CRIT_KNOCK_2_N = 10786, // Freya, achievs 3178, 3186 - ACHIEV_CRIT_KNOCK_2_H = 10794, - ACHIEV_CRIT_KNOCK_3_N = 10787, // Freya, achievs 3179, 3187 - ACHIEV_CRIT_KNOCK_3_H = 10795, + ACHIEV_CRIT_KNOCK_1_N = 10447, // Freya, achievs 3177, 3185 + ACHIEV_CRIT_KNOCK_1_H = 10459, + ACHIEV_CRIT_KNOCK_2_N = 10448, // Freya, achievs 3178, 3186 + ACHIEV_CRIT_KNOCK_2_H = 10460, + ACHIEV_CRIT_KNOCK_3_N = 10449, // Freya, achievs 3179, 3187 + ACHIEV_CRIT_KNOCK_3_H = 10461, }; struct UlduarSpawns diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 99e50b808..9938af5f8 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2967" + #define SD2_REVISION_NR "2968" #endif // __SD2_REVISION_NR_H__ From 4bda99cc8fd176195c9e0646a4ae0f48c0ac64ac Mon Sep 17 00:00:00 2001 From: NeatElves Date: Wed, 16 Oct 2013 23:14:32 +0300 Subject: [PATCH 0979/1172] [2969] Drop gossip for learning/unlearning advanced tailor skills This will be handled by database Signed-off-by: Xfurry --- scripts/world/npc_professions.cpp | 248 ------------------------------ sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 - sql/updates/r2969_mangos.sql | 1 + 4 files changed, 2 insertions(+), 250 deletions(-) create mode 100644 sql/updates/r2969_mangos.sql diff --git a/scripts/world/npc_professions.cpp b/scripts/world/npc_professions.cpp index 139cfec7a..f95fd9b6f 100644 --- a/scripts/world/npc_professions.cpp +++ b/scripts/world/npc_professions.cpp @@ -85,15 +85,6 @@ there is no difference here (except that default text is chosen with `gameobject #define BOX_UNLEARN_LEATHER_SPEC "Do you really want to unlearn your leatherworking specialty and lose all associated recipes? \n Cost: " -#define GOSSIP_LEARN_SPELLFIRE "Please teach me how to become a Spellcloth tailor" -#define GOSSIP_UNLEARN_SPELLFIRE "I wish to unlearn Spellfire Tailoring" -#define GOSSIP_LEARN_MOONCLOTH "Please teach me how to become a Mooncloth tailor" -#define GOSSIP_UNLEARN_MOONCLOTH "I wish to unlearn Mooncloth Tailoring" -#define GOSSIP_LEARN_SHADOWEAVE "Please teach me how to become a Shadoweave tailor" -#define GOSSIP_UNLEARN_SHADOWEAVE "I wish to unlearn Shadoweave Tailoring" - -#define BOX_UNLEARN_TAILOR_SPEC "Do you really want to unlearn your tailoring specialty and lose all associated recipes? \n Cost: " - #define GOSSIP_LEARN_GOBLIN "I am absolutely certain that i want to learn Goblin engineering" #define GOSSIP_LEARN_GNOMISH "I am absolutely certain that i want to learn Gnomish engineering" @@ -146,32 +137,10 @@ there is no difference here (except that default text is chosen with `gameobject #define S_LEARN_GOBLIN 20221 #define S_LEARN_GNOMISH 20220 -#define S_SPELLFIRE 26797 -#define S_MOONCLOTH 26798 -#define S_SHADOWEAVE 26801 - -#define S_LEARN_SPELLFIRE 26796 -#define S_LEARN_MOONCLOTH 26799 -#define S_LEARN_SHADOWEAVE 26800 - -#define S_UNLEARN_SPELLFIRE 41299 -#define S_UNLEARN_MOONCLOTH 41558 -#define S_UNLEARN_SHADOWEAVE 41559 - /*### # formulas to calculate unlearning cost ###*/ -int32 GetLearningCost(Player* /*pPlayer*/) // tailor, alchemy -{ - return 200000; -} - -int32 GetUnlearnCostHigh(Player* /*pPlayer*/) // tailor, alchemy -{ - return 1500000; -} - int32 GetUnlearnCostMedium(Player* pPlayer) // blacksmith, leatherwork { uint32 level = pPlayer->getLevel(); @@ -755,217 +724,6 @@ bool GossipSelect_npc_prof_leather(Player* pPlayer, Creature* pCreature, uint32 return true; } -/*### -# start menues tailoring -###*/ - -bool HasTailorSpell(Player* pPlayer) -{ - if (pPlayer->HasSpell(S_MOONCLOTH) || pPlayer->HasSpell(S_SHADOWEAVE) || pPlayer->HasSpell(S_SPELLFIRE)) - return true; - return false; -} - -bool GossipHello_npc_prof_tailor(Player* pPlayer, Creature* pCreature) -{ - if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); - if (pCreature->isVendor()) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_VENDOR, GOSSIP_TEXT_BROWSE_GOODS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE); - if (pCreature->isTrainer()) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_TRAINER, GOSSIP_TEXT_TRAIN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRAIN); - - uint32 eCreature = pCreature->GetEntry(); - // TAILORING SPEC - if (pPlayer->HasSkill(SKILL_TAILORING) && pPlayer->GetBaseSkillValue(SKILL_TAILORING) >= 350 && pPlayer->getLevel() > 59) - { - if (pPlayer->GetQuestRewardStatus(10831) || pPlayer->GetQuestRewardStatus(10832) || pPlayer->GetQuestRewardStatus(10833)) - { - switch (eCreature) - { - case 22213: // Gidge Spellweaver - if (!HasTailorSpell(pPlayer)) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LEARN_SPELLFIRE, GOSSIP_SENDER_LEARN, GOSSIP_ACTION_INFO_DEF + 1); - if (pPlayer->HasSpell(S_SPELLFIRE)) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_UNLEARN_SPELLFIRE, GOSSIP_SENDER_UNLEARN, GOSSIP_ACTION_INFO_DEF + 4); - break; - case 22208: // Nasmara Moonsong - if (!HasTailorSpell(pPlayer)) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LEARN_MOONCLOTH, GOSSIP_SENDER_LEARN, GOSSIP_ACTION_INFO_DEF + 2); - if (pPlayer->HasSpell(S_MOONCLOTH)) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_UNLEARN_MOONCLOTH, GOSSIP_SENDER_UNLEARN, GOSSIP_ACTION_INFO_DEF + 5); - break; - case 22212: // Andrion Darkspinner - if (!HasTailorSpell(pPlayer)) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LEARN_SHADOWEAVE, GOSSIP_SENDER_LEARN, GOSSIP_ACTION_INFO_DEF + 3); - if (pPlayer->HasSpell(S_SHADOWEAVE)) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_UNLEARN_SHADOWEAVE, GOSSIP_SENDER_UNLEARN, GOSSIP_ACTION_INFO_DEF + 6); - break; - } - } - } - - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); - return true; -} - -void SendActionMenu_npc_prof_tailor(Player* pPlayer, Creature* pCreature, uint32 uiAction) -{ - switch (uiAction) - { - case GOSSIP_ACTION_TRADE: - pPlayer->SEND_VENDORLIST(pCreature->GetObjectGuid()); - break; - case GOSSIP_ACTION_TRAIN: - pPlayer->SEND_TRAINERLIST(pCreature->GetObjectGuid()); - break; - // Learn Tailor - case GOSSIP_ACTION_INFO_DEF + 1: - if (!pPlayer->HasSpell(S_SPELLFIRE) && pPlayer->GetMoney() >= uint32(GetLearningCost(pPlayer))) - { - pPlayer->CastSpell(pPlayer, S_LEARN_SPELLFIRE, true); - pPlayer->ModifyMoney(-GetLearningCost(pPlayer)); - } - else - pPlayer->SendBuyError(BUY_ERR_NOT_ENOUGHT_MONEY, pCreature, 0, 0); - pPlayer->CLOSE_GOSSIP_MENU(); - break; - case GOSSIP_ACTION_INFO_DEF + 2: - if (!pPlayer->HasSpell(S_MOONCLOTH) && pPlayer->GetMoney() >= uint32(GetLearningCost(pPlayer))) - { - pPlayer->CastSpell(pPlayer, S_LEARN_MOONCLOTH, true); - pPlayer->ModifyMoney(-GetLearningCost(pPlayer)); - } - else - pPlayer->SendBuyError(BUY_ERR_NOT_ENOUGHT_MONEY, pCreature, 0, 0); - pPlayer->CLOSE_GOSSIP_MENU(); - break; - case GOSSIP_ACTION_INFO_DEF + 3: - if (!pPlayer->HasSpell(S_SHADOWEAVE) && pPlayer->GetMoney() >= uint32(GetLearningCost(pPlayer))) - { - pPlayer->CastSpell(pPlayer, S_LEARN_SHADOWEAVE, true); - pPlayer->ModifyMoney(-GetLearningCost(pPlayer)); - } - else - pPlayer->SendBuyError(BUY_ERR_NOT_ENOUGHT_MONEY, pCreature, 0, 0); - pPlayer->CLOSE_GOSSIP_MENU(); - break; - // Unlearn Tailor - case GOSSIP_ACTION_INFO_DEF + 4: - if (EquippedOk(pPlayer, S_UNLEARN_SPELLFIRE)) - { - if (pPlayer->GetMoney() >= uint32(GetUnlearnCostHigh(pPlayer))) - { - pPlayer->CastSpell(pPlayer, S_UNLEARN_SPELLFIRE, true); - ProfessionUnlearnSpells(pPlayer, S_UNLEARN_SPELLFIRE); - pPlayer->ModifyMoney(-GetUnlearnCostHigh(pPlayer)); - } - else - pPlayer->SendBuyError(BUY_ERR_NOT_ENOUGHT_MONEY, pCreature, 0, 0); - } - else - pPlayer->SendEquipError(EQUIP_ERR_CANT_DO_RIGHT_NOW, NULL, NULL); - pPlayer->CLOSE_GOSSIP_MENU(); - break; - case GOSSIP_ACTION_INFO_DEF + 5: - if (EquippedOk(pPlayer, S_UNLEARN_MOONCLOTH)) - { - if (pPlayer->GetMoney() >= uint32(GetUnlearnCostHigh(pPlayer))) - { - pPlayer->CastSpell(pPlayer, S_UNLEARN_MOONCLOTH, true); - ProfessionUnlearnSpells(pPlayer, S_UNLEARN_MOONCLOTH); - pPlayer->ModifyMoney(-GetUnlearnCostHigh(pPlayer)); - } - else - pPlayer->SendBuyError(BUY_ERR_NOT_ENOUGHT_MONEY, pCreature, 0, 0); - } - else - pPlayer->SendEquipError(EQUIP_ERR_CANT_DO_RIGHT_NOW, NULL, NULL); - pPlayer->CLOSE_GOSSIP_MENU(); - break; - case GOSSIP_ACTION_INFO_DEF + 6: - if (EquippedOk(pPlayer, S_UNLEARN_SHADOWEAVE)) - { - if (pPlayer->GetMoney() >= uint32(GetUnlearnCostHigh(pPlayer))) - { - pPlayer->CastSpell(pPlayer, S_UNLEARN_SHADOWEAVE, true); - ProfessionUnlearnSpells(pPlayer, S_UNLEARN_SHADOWEAVE); - pPlayer->ModifyMoney(-GetUnlearnCostHigh(pPlayer)); - } - else - pPlayer->SendBuyError(BUY_ERR_NOT_ENOUGHT_MONEY, pCreature, 0, 0); - } - else - pPlayer->SendEquipError(EQUIP_ERR_CANT_DO_RIGHT_NOW, NULL, NULL); - pPlayer->CLOSE_GOSSIP_MENU(); - break; - } -} - -void SendConfirmLearn_npc_prof_tailor(Player* pPlayer, Creature* pCreature, uint32 uiAction) -{ - if (uiAction) - { - uint32 eCreature = pCreature->GetEntry(); - switch (eCreature) - { - case 22213: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LEARN_SPELLFIRE, GOSSIP_SENDER_CHECK, uiAction); - // unknown textID () - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); - break; - case 22208: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LEARN_MOONCLOTH, GOSSIP_SENDER_CHECK, uiAction); - // unknown textID () - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); - break; - case 22212: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LEARN_SHADOWEAVE, GOSSIP_SENDER_CHECK, uiAction); - // unknown textID () - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); - break; - } - } -} - -void SendConfirmUnlearn_npc_prof_tailor(Player* pPlayer, Creature* pCreature, uint32 uiAction) -{ - if (uiAction) - { - uint32 eCreature = pCreature->GetEntry(); - switch (eCreature) - { - case 22213: // Gidge Spellweaver - pPlayer->ADD_GOSSIP_ITEM_EXTENDED(0, GOSSIP_UNLEARN_SPELLFIRE, GOSSIP_SENDER_CHECK, uiAction, BOX_UNLEARN_TAILOR_SPEC, GetUnlearnCostHigh(pPlayer), false); - // unknown textID () - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); - break; - case 22208: // Nasmara Moonsong - pPlayer->ADD_GOSSIP_ITEM_EXTENDED(0, GOSSIP_UNLEARN_MOONCLOTH, GOSSIP_SENDER_CHECK, uiAction, BOX_UNLEARN_TAILOR_SPEC, GetUnlearnCostHigh(pPlayer), false); - // unknown textID () - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); - break; - case 22212: // Andrion Darkspinner - pPlayer->ADD_GOSSIP_ITEM_EXTENDED(0, GOSSIP_UNLEARN_SHADOWEAVE, GOSSIP_SENDER_CHECK, uiAction, BOX_UNLEARN_TAILOR_SPEC, GetUnlearnCostHigh(pPlayer), false); - // unknown textID () - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); - break; - } - } -} - -bool GossipSelect_npc_prof_tailor(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) -{ - switch (uiSender) - { - case GOSSIP_SENDER_MAIN: SendActionMenu_npc_prof_tailor(pPlayer, pCreature, uiAction); break; - case GOSSIP_SENDER_LEARN: SendConfirmLearn_npc_prof_tailor(pPlayer, pCreature, uiAction); break; - case GOSSIP_SENDER_UNLEARN: SendConfirmUnlearn_npc_prof_tailor(pPlayer, pCreature, uiAction); break; - case GOSSIP_SENDER_CHECK: SendActionMenu_npc_prof_tailor(pPlayer, pCreature, uiAction); break; - } - return true; -} - /*### # start menues for GO (engineering and leatherworking) ###*/ @@ -999,12 +757,6 @@ void AddSC_npc_professions() pNewScript->pGossipSelect = &GossipSelect_npc_prof_leather; pNewScript->RegisterSelf(); - pNewScript = new Script; - pNewScript->Name = "npc_prof_tailor"; - pNewScript->pGossipHello = &GossipHello_npc_prof_tailor; - pNewScript->pGossipSelect = &GossipSelect_npc_prof_tailor; - pNewScript->RegisterSelf(); - /*pNewScript = new Script; pNewScript->Name = "go_soothsaying_for_dummies"; pNewScript->pGOUse = &GOUse_go_soothsaying_for_dummies; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 9938af5f8..899e82d14 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2968" + #define SD2_REVISION_NR "2969" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 0d3ba3144..99ad028d1 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -149,7 +149,6 @@ UPDATE creature_template SET ScriptName='npc_doctor' WHERE entry IN (12939,12920 UPDATE creature_template SET ScriptName='npc_injured_patient' WHERE entry IN (12936,12937,12938,12923,12924,12925); UPDATE creature_template SET ScriptName='npc_prof_blacksmith' WHERE entry IN (5164,11145,11146,11176,11177,11178,11191,11192,11193); UPDATE creature_template SET ScriptName='npc_prof_leather' WHERE entry IN (7866,7867,7868,7869,7870,7871); -UPDATE creature_template SET ScriptName='npc_prof_tailor' WHERE entry IN (22208,22212,22213); -- disabled, but can be used for custom -- UPDATE creature_template SET ScriptName='' WHERE npcflag!=npcflag|65536 AND ScriptName='npc_innkeeper'; -- UPDATE creature_template SET ScriptName='npc_innkeeper' WHERE npcflag=npcflag|65536; diff --git a/sql/updates/r2969_mangos.sql b/sql/updates/r2969_mangos.sql new file mode 100644 index 000000000..1280a23f4 --- /dev/null +++ b/sql/updates/r2969_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='' WHERE entry IN (22208,22212,22213); From 99ffaa53096e9ac0236dd02a0dc1ee999340c04b Mon Sep 17 00:00:00 2001 From: Xfurry Date: Fri, 18 Oct 2013 16:47:09 +0300 Subject: [PATCH 0980/1172] [2970] Implement Mimiron combat phases This will support * encounter start from normal and hard mode * phase transitions * complete dialogue and animations * encounter ending Please feel free to report any issues Thanks to X-Savior and crackm for providing the necessary data --- .../northrend/ulduar/ulduar/boss_freya.cpp | 2 +- .../northrend/ulduar/ulduar/boss_mimiron.cpp | 1041 ++++++++++++++++- .../ulduar/ulduar/instance_ulduar.cpp | 47 +- scripts/northrend/ulduar/ulduar/ulduar.h | 2 + sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 4 + sql/scriptdev2_script_full.sql | 18 +- sql/updates/r2970_mangos.sql | 4 + sql/updates/r2970_scriptdev2.sql | 16 + 9 files changed, 1109 insertions(+), 27 deletions(-) create mode 100644 sql/updates/r2970_mangos.sql create mode 100644 sql/updates/r2970_scriptdev2.sql diff --git a/scripts/northrend/ulduar/ulduar/boss_freya.cpp b/scripts/northrend/ulduar/ulduar/boss_freya.cpp index 0fe957880..cb272d981 100644 --- a/scripts/northrend/ulduar/ulduar/boss_freya.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_freya.cpp @@ -724,7 +724,7 @@ struct MANGOS_DLL_DECL three_nature_alliesAI : public ScriptedAI } } - void SpellHit(Unit* pCaster, const SpellEntry* pSpell) override + void SpellHit(Unit* /*pCaster*/, const SpellEntry* pSpell) override { if (pSpell->Id == SPELL_FULL_HEAL) { diff --git a/scripts/northrend/ulduar/ulduar/boss_mimiron.cpp b/scripts/northrend/ulduar/ulduar/boss_mimiron.cpp index 3971e9c78..945b83e14 100644 --- a/scripts/northrend/ulduar/ulduar/boss_mimiron.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_mimiron.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: boss_mimiron -SD%Complete: 10% -SDComment: Very basic script. +SD%Complete: 60% +SDComment: Combat abilities NYI. SDCategory: Ulduar EndScriptData */ @@ -26,7 +26,7 @@ EndScriptData */ enum { - SAY_AGGRO = -1603176, + SAY_INTRO = -1603176, SAY_HARD_MODE = -1603177, SAY_BERSERK = -1603178, @@ -52,29 +52,55 @@ enum EMOTE_PLASMA_BLAST = -1603196, - // generic spells + SAY_SELF_DESTRUCT = -1603248, + SAY_SELF_DESTRUCT_END = -1603260, + SAY_DESTRUCT_10_MIN = -1603249, + SAY_DESTRUCT_9_MIN = -1603250, + SAY_DESTRUCT_8_MIN = -1603251, + SAY_DESTRUCT_7_MIN = -1603252, + SAY_DESTRUCT_6_MIN = -1603253, + SAY_DESTRUCT_5_MIN = -1603254, + SAY_DESTRUCT_4_MIN = -1603255, + SAY_DESTRUCT_3_MIN = -1603256, + SAY_DESTRUCT_2_MIN = -1603257, + SAY_DESTRUCT_1_MIN = -1603258, + SAY_DESTRUCT_0_MIN = -1603259, + + // mimiron spells SPELL_WELD = 63339, SPELL_TELEPORT_VISUAL = 41232, - SPELL_RIDE_VEHICLE_MIMIRON = 52391, // seat 0 + SPELL_TELEPORT_VISUAL_2 = 64446, + SPELL_RIDE_VEHICLE_MIMIRON_0 = 52391, // seat 0 SPELL_RIDE_VEHICLE_MIMIRON_1 = 63313, // seat 1 SPELL_RIDE_VEHICLE_MIMIRON_2 = 63314, // seat 2 SPELL_RIDE_VEHICLE_MIMIRON_3 = 63315, // seat 3 SPELL_RIDE_VEHICLE_MIMIRON_4 = 63316, // seat 4 SPELL_RIDE_VEHICLE_MIMIRON_5 = 63344, // seat 5 SPELL_RIDE_VEHICLE_MIMIRON_6 = 63345, // seat 6 - SPELL_JET_PACK = 63341, - SPELL_MIMIRON_SLEEP_VISUAL = 64393, - SPELL_MIMIRON_SLEEP_VISUAL_2 = 64394, - SPELL_SELF_REPAIR = 64383, + SPELL_JET_PACK_VISUAL = 63307, // fly animation + SPELL_JET_PACK = 63341, // seat switch spell + SPELL_SLEEP_VISUAL = 64393, + SPELL_SLEEP_WAKE = 64394, + SPELL_NOT_FRIENDLY_FIRE = 65040, // achiev check spell SPELL_BERSERK = 26662, - // Leviathan spells + // generic spells SPELL_FREEZE_ANIM = 16245, + SPELL_SELF_REPAIR = 64383, // self repair for the robot phase + SPELL_HALF_HEAL = 64188, // heal to prepare the robot phase + SPELL_CLEAR_DEBUFFS = 34098, + SPELL_RIDE_VEHICLE_ROBOT_1 = 64387, // seat 7 + SPELL_RIDE_VEHICLE_ROBOT_2 = 64388, // seat 3 + SPELL_VEHICLE_DAMAGED = 63415, + SPELL_DESPAWN_ASSAULT_BOTS = 64463, + + // Leviathan spells SPELL_PROXIMITY_MINES = 63027, // triggers 65347 SPELL_NAPALM_SHELL = 64539, // triggers 63667 which casts 63666 or 65026 SPELL_PLASMA_BLAST = 62997, // cast by the turret SPELL_PLASMA_BLAST_H = 64529, SPELL_SHOCK_BLAST = 63631, + SPELL_FREEZE_ANIM_DEFEATED = 63354, // visual aura after defeat SPELL_FLAME_SUPPRESSANT = 64570, // hard mode spells SPELL_EMERGENCY_MODE_LEVIATHAN = 65101, @@ -84,7 +110,6 @@ enum SPELL_RAPID_BURST_RIGHT = 64019, SPELL_RAPID_BURST_LEFT_H = 64531, SPELL_RAPID_BURST_RIGHT_H = 64532, - SPELL_LASER_BARRAGE = 63274, SPELL_SPINNING_UP = 63414, // laser barrage spell for the final phase SPELL_ROCKET_STRIKE = 64402, // targets npc 34050; triggers 63681 and 63036 from target @@ -94,6 +119,7 @@ enum SPELL_HAND_PULSE_RIGHT = 64352, // each as a different visual for robot hand animation SPELL_HAND_PULSE_LEFT_H = 64536, SPELL_HAND_PULSE_RIGHT_H = 64537, + SPELL_TORSO_DISABLED = 64120, // visual aura on defeat SPELL_FLAME_SUPPRESSANT_CLOSE = 65192, // hard mode spell SPELL_FROST_BOMB_SUMMON = 64627, // hard mode spell; summon npc 34149 @@ -109,7 +135,7 @@ enum // hard mode spells SPELL_SELF_DESTRUCTION = 64613, - SPELL_SELF_DESTRUCTION_DAMANGE = 64610, + SPELL_SELF_DESTRUCTION_DAMAGE = 64610, SPELL_EMERGENCY_MODE = 64582, // fire spells @@ -138,9 +164,513 @@ enum NPC_EMERGENCY_FIRE_BOT = 34147, // other + POINT_ID_PARK = 1, + POINT_ID_CENTER = 2, SEAT_ID_TURRET = 4, + + // phases + PHASE_INTRO = 0, + PHASE_LEVIATHAN = 1, + PHASE_VX001 = 2, + PHASE_AERIAL_UNIT = 3, + PHASE_FULL_ROBOT = 4, + PHASE_TRANSITION = 5, + PHASE_DAMAGED = 6, +}; + +static const DialogueEntry aMimironDialogue[] = +{ + {NPC_MIMIRON, 0, 3000}, // encounter start, normal + {SAY_TANK_ACTIVE, NPC_MIMIRON, 6000}, + {PHASE_LEVIATHAN, 0, 3000}, + {NPC_LEVIATHAN_MK, 0, 0}, + + {SAY_SELF_DESTRUCT, NPC_COMPUTER, 3000}, // encounter start, hard mode + {SAY_DESTRUCT_10_MIN, NPC_COMPUTER, 3000}, + {SAY_HARD_MODE, NPC_MIMIRON, 5000}, + {NPC_LEVIATHAN_MK, 0, 0}, + + {NPC_LEVIATHAN_MK_TURRET, 0, 1000}, // Leviathan defeated, first transition + {SAY_TANK_DEATH, NPC_MIMIRON, 5000}, + {GO_MIMIRON_ELEVATOR, 0, 15000}, + {NPC_VX001, 0, 8000}, + {SPELL_JET_PACK_VISUAL, 0, 1000}, + {SPELL_JET_PACK, 0, 3000}, + {SAY_TORSO_ACTIVE, NPC_MIMIRON, 3000}, + {PHASE_VX001, 0, 3000}, + {SEAT_ID_TURRET, 0, 0}, + + {SPELL_TORSO_DISABLED, 0, 5000}, // VX001 defeated, second transition + {NPC_ROCKET_STRIKE, 0, 1000}, + {SAY_TORSO_DEATH, NPC_MIMIRON, 5000}, + {NPC_AERIAL_UNIT, 0, 9000}, + {PHASE_TRANSITION, 0, 1000}, + {PHASE_AERIAL_UNIT, 0, 6000}, + {SAY_HEAD_ACTIVE, NPC_MIMIRON, 3000}, + {NPC_MAGNETIC_CORE, 0, 0}, + + {NPC_JUNK_BOT, 0, 4000}, // Aerial Unit defeated, last transition + {SAY_HEAD_DEATH, NPC_MIMIRON, 2000}, + {NPC_COMPUTER, 0, 4000}, + {SPELL_HALF_HEAL, 0, 4000}, + {NPC_BOMB_BOT, 0, 3000}, + {NPC_BURST_TARGET, 0, 4000}, + {SAY_ROBOT_ACTIVE, NPC_MIMIRON, 3000}, + {NPC_ROCKET_VISUAL, 0, 4000}, + {NPC_PROXIMITY_MINE, 0, 0}, + + {SPELL_SLEEP_VISUAL, 0, 7000}, // Robot defeated, epilogue + {SPELL_SLEEP_WAKE, 0, 3000}, + {SAY_ROBOT_DEATH, NPC_MIMIRON, 10000}, + {SPELL_TELEPORT_VISUAL, 0, 0}, + {0, 0, 0}, +}; + +// a random list of seats which can be used by Mimiron in idle mode +static const uint32 aRandomAnimationSpells[] = {SPELL_RIDE_VEHICLE_MIMIRON_0, SPELL_RIDE_VEHICLE_MIMIRON_1, SPELL_RIDE_VEHICLE_MIMIRON_2, SPELL_RIDE_VEHICLE_MIMIRON_4}; + +// spawn or move positions +static const float afTankEvadePos[4] = {2792.07f, 2596.32f, 364.3136f, 3.5f}; +static const float afRobotSpawnPos[4] = {2744.431f, 2569.385f, 364.3968f, 3.141f}; +static const float afRocketSpawnPos[4] = {2746.262f, 2567.085f, 369.2921f, 3.14f}; +static const float afAerialSpawnPos[4] = {2744.365f, 2569.303f, 392.2355f, 3.15f}; +static const float afAerialMovePos[3] = {2743.32f, 2569.285f, 380.2812f}; +static const float afTankMovePos[3] = {2763.82f, 2568.87f, 364.3136f}; +static const float afCenterMovePos[3] = {2744.61f, 2569.38f, 364.3136f}; + +/*###### +## boss_mimiron +######*/ + +struct MANGOS_DLL_DECL boss_mimironAI : public ScriptedAI, private DialogueHelper +{ + boss_mimironAI(Creature* pCreature) : ScriptedAI(pCreature), + DialogueHelper(aMimironDialogue) + { + m_pInstance = (instance_ulduar*)pCreature->GetInstanceData(); + InitializeDialogueHelper(m_pInstance); + m_bHasDoneIntro = false; + Reset(); + } + + instance_ulduar* m_pInstance; + + uint8 m_uiPhase; + uint8 m_uiDestructStage; + uint32 m_uiDestructTimer; + + uint32 m_uiWeldTimer; + uint32 m_uiAnimationTimer; + uint32 m_uiCurrentSeatAura; + + uint32 m_uiWakeUpTimer; + + bool m_bHasDoneIntro; + + void Reset() override + { + m_uiPhase = PHASE_INTRO; + m_uiDestructStage = 0; + m_uiDestructTimer = 0; + m_uiWakeUpTimer = 0; + m_uiWeldTimer = 1000; + m_uiAnimationTimer = 10000; + m_uiCurrentSeatAura = SPELL_RIDE_VEHICLE_MIMIRON_0; + + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_OOC_NOT_ATTACKABLE); + } + + void AttackStart(Unit* /*pWho*/) override { } + + void MoveInLineOfSight(Unit* pWho) override + { + if (!m_bHasDoneIntro && pWho->GetTypeId() == TYPEID_PLAYER && m_creature->IsWithinDistInMap(pWho, 70.0f)) + { + DoScriptText(SAY_INTRO, m_creature); + m_bHasDoneIntro = true; + } + } + + void DamageTaken(Unit* /*pDoneBy*/, uint32& uiDamage) override + { + // start encounter on first damage + if (m_uiPhase == PHASE_INTRO && uiDamage) + { + m_uiPhase = PHASE_LEVIATHAN; + + if (m_pInstance) + m_pInstance->SetData(TYPE_MIMIRON, IN_PROGRESS); + + StartNextDialogueText(NPC_MIMIRON); + } + } + + void JustDidDialogueStep(int32 iEntry) override + { + if (!m_pInstance) + return; + + switch (iEntry) + { + // Encounter intro (normal and hard mode) + case NPC_MIMIRON: + case NPC_LEVIATHAN_MK_TURRET: + // jump on the top of the robot for intro / phase end text + m_creature->RemoveAurasDueToSpell(SPELL_WELD); + if (Creature* pLeviathan = m_pInstance->GetSingleCreatureFromStorage(NPC_LEVIATHAN_MK)) + { + pLeviathan->RemoveSpellsCausingAura(SPELL_AURA_CONTROL_VEHICLE, m_creature->GetObjectGuid()); + DoCastSpellIfCan(pLeviathan, SPELL_RIDE_VEHICLE_MIMIRON_5, CAST_TRIGGERED); + } + break; + case PHASE_LEVIATHAN: + case SAY_HARD_MODE: + // mount inside the robot + m_creature->RemoveAurasDueToSpell(SPELL_WELD); + if (Creature* pLeviathan = m_pInstance->GetSingleCreatureFromStorage(NPC_LEVIATHAN_MK)) + { + pLeviathan->RemoveSpellsCausingAura(SPELL_AURA_CONTROL_VEHICLE, m_creature->GetObjectGuid()); + DoCastSpellIfCan(pLeviathan, SPELL_RIDE_VEHICLE_MIMIRON_6, CAST_TRIGGERED); + } + break; + case NPC_LEVIATHAN_MK: + if (Creature* pLeviathan = m_pInstance->GetSingleCreatureFromStorage(NPC_LEVIATHAN_MK)) + { + pLeviathan->RemoveAurasDueToSpell(SPELL_FREEZE_ANIM); + pLeviathan->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + pLeviathan->SetInCombatWithZone(); + } + // Note: maybe the flags are handled by the vehicle seats. Set them manually for the moment. + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_OOC_NOT_ATTACKABLE); + break; + + // Start phase 2 transition + case GO_MIMIRON_ELEVATOR: + m_pInstance->DoUseDoorOrButton(GO_MIMIRON_ELEVATOR); + break; + case NPC_VX001: + if (GameObject* pElevator = m_pInstance->GetSingleGameObjectFromStorage(GO_MIMIRON_ELEVATOR)) + pElevator->SetGoState(GO_STATE_ACTIVE_ALTERNATIVE); + m_creature->SummonCreature(NPC_VX001, afRobotSpawnPos[0], afRobotSpawnPos[1], afRobotSpawnPos[2], afRobotSpawnPos[3], TEMPSUMMON_DEAD_DESPAWN, 0); + break; + case SPELL_JET_PACK_VISUAL: + DoCastSpellIfCan(m_creature, SPELL_JET_PACK_VISUAL); + break; + case SPELL_JET_PACK: + // fly from the Leviathan to VX001 + if (Creature* pLeviathan = m_pInstance->GetSingleCreatureFromStorage(NPC_LEVIATHAN_MK)) + pLeviathan->RemoveSpellsCausingAura(SPELL_AURA_CONTROL_VEHICLE, m_creature->GetObjectGuid()); + if (Creature* pVx001 = m_pInstance->GetSingleCreatureFromStorage(NPC_VX001)) + DoCastSpellIfCan(pVx001, SPELL_RIDE_VEHICLE_MIMIRON_0, CAST_TRIGGERED); + break; + case SAY_TORSO_ACTIVE: + m_creature->RemoveAurasDueToSpell(SPELL_JET_PACK_VISUAL); + break; + case PHASE_VX001: + // mount inside the robot + if (Creature* pVx001 = m_pInstance->GetSingleCreatureFromStorage(NPC_VX001)) + { + pVx001->RemoveSpellsCausingAura(SPELL_AURA_CONTROL_VEHICLE, m_creature->GetObjectGuid()); + DoCastSpellIfCan(pVx001, SPELL_RIDE_VEHICLE_MIMIRON_1, CAST_TRIGGERED); + } + break; + case SEAT_ID_TURRET: + if (Creature* pVx001 = m_pInstance->GetSingleCreatureFromStorage(NPC_VX001)) + { + pVx001->RemoveAurasDueToSpell(SPELL_FREEZE_ANIM); + pVx001->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + pVx001->SetInCombatWithZone(); + } + break; + + // Start phase 3 transition + case NPC_ROCKET_STRIKE: + // mount on the top of the robot for phase end text + if (Creature* pVx001 = m_pInstance->GetSingleCreatureFromStorage(NPC_VX001)) + { + pVx001->RemoveSpellsCausingAura(SPELL_AURA_CONTROL_VEHICLE, m_creature->GetObjectGuid()); + DoCastSpellIfCan(pVx001, SPELL_RIDE_VEHICLE_MIMIRON_4, CAST_TRIGGERED); + } + break; + case NPC_AERIAL_UNIT: + m_creature->SummonCreature(NPC_AERIAL_UNIT, afAerialSpawnPos[0], afAerialSpawnPos[1], afAerialSpawnPos[2], afAerialSpawnPos[3], TEMPSUMMON_DEAD_DESPAWN, 0); + break; + case PHASE_TRANSITION: + DoCastSpellIfCan(m_creature, SPELL_JET_PACK_VISUAL); + break; + case PHASE_AERIAL_UNIT: + // mount inside the flying robot + if (Creature* pVx001 = m_pInstance->GetSingleCreatureFromStorage(NPC_VX001)) + pVx001->RemoveSpellsCausingAura(SPELL_AURA_CONTROL_VEHICLE, m_creature->GetObjectGuid()); + if (Creature* pAerial = m_pInstance->GetSingleCreatureFromStorage(NPC_AERIAL_UNIT)) + DoCastSpellIfCan(pAerial, SPELL_RIDE_VEHICLE_MIMIRON_0, CAST_TRIGGERED); + break; + case SAY_HEAD_ACTIVE: + m_creature->RemoveAurasDueToSpell(SPELL_JET_PACK_VISUAL); + break; + case NPC_MAGNETIC_CORE: + if (Creature* pAerial = m_pInstance->GetSingleCreatureFromStorage(NPC_AERIAL_UNIT)) + { + pAerial->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + pAerial->SetInCombatWithZone(); + } + break; + + // Start phase 4 transition + case NPC_COMPUTER: + // get the tank into combat position + if (Creature* pLeviathan = m_pInstance->GetSingleCreatureFromStorage(NPC_LEVIATHAN_MK)) + { + pLeviathan->RemoveAurasDueToSpell(SPELL_FREEZE_ANIM_DEFEATED); + pLeviathan->GetMotionMaster()->MovePoint(POINT_ID_CENTER, afTankMovePos[0], afTankMovePos[1], afTankMovePos[2]); + } + break; + case SPELL_HALF_HEAL: + { + // mount the torso on top of the tank + Creature* pLeviathan = m_pInstance->GetSingleCreatureFromStorage(NPC_LEVIATHAN_MK); + Creature* pVx001 = m_pInstance->GetSingleCreatureFromStorage(NPC_VX001); + if (!pLeviathan || !pVx001) + return; + + pVx001->RemoveAllAurasOnEvade(); + pVx001->CastSpell(pLeviathan, SPELL_RIDE_VEHICLE_ROBOT_1, true); + break; + } + case NPC_BOMB_BOT: + if (Creature* pLeviathan = m_pInstance->GetSingleCreatureFromStorage(NPC_LEVIATHAN_MK)) + pLeviathan->GetMotionMaster()->MovePoint(POINT_ID_CENTER, afCenterMovePos[0], afCenterMovePos[1], afCenterMovePos[2]); + break; + case NPC_BURST_TARGET: + { + // mount the head on top of the torso + Creature* pAerial = m_pInstance->GetSingleCreatureFromStorage(NPC_AERIAL_UNIT); + Creature* pVx001 = m_pInstance->GetSingleCreatureFromStorage(NPC_VX001); + if (!pAerial || !pVx001) + return; + + pAerial->CastSpell(pVx001, SPELL_RIDE_VEHICLE_ROBOT_2, true); + break; + } + case NPC_ROCKET_VISUAL: + // switch from the head to inside the torso + if (Creature* pAerial = m_pInstance->GetSingleCreatureFromStorage(NPC_AERIAL_UNIT)) + pAerial->RemoveSpellsCausingAura(SPELL_AURA_CONTROL_VEHICLE, m_creature->GetObjectGuid()); + if (Creature* pVx001 = m_pInstance->GetSingleCreatureFromStorage(NPC_VX001)) + DoCastSpellIfCan(pVx001, SPELL_RIDE_VEHICLE_MIMIRON_1, CAST_TRIGGERED); + break; + case NPC_PROXIMITY_MINE: + // set the whole robot in combat and inform about phase 4 + if (Creature* pAerial = m_pInstance->GetSingleCreatureFromStorage(NPC_AERIAL_UNIT)) + { + SendAIEvent(AI_EVENT_CUSTOM_A, m_creature, pAerial); + pAerial->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + } + if (Creature* pVx001 = m_pInstance->GetSingleCreatureFromStorage(NPC_VX001)) + { + SendAIEvent(AI_EVENT_CUSTOM_A, m_creature, pVx001); + pVx001->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + pVx001->SetInCombatWithZone(); + } + if (Creature* pLeviathan = m_pInstance->GetSingleCreatureFromStorage(NPC_LEVIATHAN_MK)) + { + SendAIEvent(AI_EVENT_CUSTOM_A, m_creature, pLeviathan); + pLeviathan->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + } + break; + + // Start encounter epilogue + case SPELL_SLEEP_VISUAL: + DoCastSpellIfCan(m_creature, SPELL_SLEEP_VISUAL); + if (m_pInstance->GetData(TYPE_MIMIRON_HARD) == DONE) + { + if (Creature* pComputer = m_pInstance->GetSingleCreatureFromStorage(NPC_COMPUTER)) + { + DoScriptText(SAY_SELF_DESTRUCT_END, pComputer); + m_uiDestructTimer = 0; + } + } + break; + case SPELL_SLEEP_WAKE: + if (DoCastSpellIfCan(m_creature, SPELL_SLEEP_WAKE) == CAST_OK) + m_creature->RemoveAurasDueToSpell(SPELL_SLEEP_VISUAL); + break; + case SPELL_TELEPORT_VISUAL: + if (DoCastSpellIfCan(m_creature, SPELL_TELEPORT_VISUAL) == CAST_OK) + m_creature->ForcedDespawn(2000); + break; + } + } + + void JustSummoned(Creature* pSummoned) override + { + if (pSummoned->GetEntry() == NPC_AERIAL_UNIT) + pSummoned->GetMotionMaster()->MovePoint(1, afAerialMovePos[0], afAerialMovePos[1], afAerialMovePos[2]); + } + + void ReceiveAIEvent(AIEventType eventType, Creature* /*pSender*/, Unit* /*pInvoker*/, uint32 /*uiMiscValue*/) override + { + switch (eventType) + { + // Red button pressed + case AI_EVENT_CUSTOM_A: + StartNextDialogueText(SAY_SELF_DESTRUCT); + m_uiPhase = PHASE_LEVIATHAN; + + if (m_pInstance) + m_pInstance->SetData(TYPE_MIMIRON, IN_PROGRESS); + m_uiDestructTimer = MINUTE * IN_MILLISECONDS; + break; + // Leviathan phase finished + case AI_EVENT_CUSTOM_B: + StartNextDialogueText(NPC_LEVIATHAN_MK_TURRET); + break; + // VX001 phase finished + case AI_EVENT_CUSTOM_C: + StartNextDialogueText(SPELL_TORSO_DISABLED); + break; + // Aerial unit phase finished + case AI_EVENT_CUSTOM_D: + StartNextDialogueText(NPC_COMPUTER); + break; + // Robot piece destroyed + case AI_EVENT_CUSTOM_E: + if (!m_uiWakeUpTimer) + m_uiWakeUpTimer = 10000; + break; + } + } + + // function to switch to another seat on the Leviathan + void DoFlyToNextRandomSeat() + { + if (!m_pInstance) + return; + + Creature* pLeviathan = m_pInstance->GetSingleCreatureFromStorage(NPC_LEVIATHAN_MK); + if (!pLeviathan) + return; + + m_creature->RemoveAurasDueToSpell(SPELL_WELD); + pLeviathan->RemoveSpellsCausingAura(SPELL_AURA_CONTROL_VEHICLE, m_creature->GetObjectGuid()); + + uint32 uiNextAuraId = aRandomAnimationSpells[urand(0, countof(aRandomAnimationSpells) - 1)]; + + while (uiNextAuraId == m_uiCurrentSeatAura) + uiNextAuraId = aRandomAnimationSpells[urand(0, countof(aRandomAnimationSpells) - 1)]; + + m_uiCurrentSeatAura = uiNextAuraId; + DoCastSpellIfCan(pLeviathan, m_uiCurrentSeatAura, CAST_TRIGGERED); + } + + void UpdateAI(const uint32 uiDiff) override + { + if (!m_pInstance) + { + script_error_log("Instance Ulduar: ERROR Failed to load instance data for this instace."); + return; + } + + DialogueUpdate(uiDiff); + + if (m_uiPhase == PHASE_INTRO) + { + // in idle mode Mimiron jumps around the Leviathan + if (m_uiAnimationTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_JET_PACK) == CAST_OK) + { + DoFlyToNextRandomSeat(); + m_uiWeldTimer = 2000; + m_uiAnimationTimer = urand(12000, 15000); + } + } + else + m_uiAnimationTimer -= uiDiff; + + if (m_uiWeldTimer) + { + if (m_uiWeldTimer <= uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_WELD) == CAST_OK) + m_uiWeldTimer = 0; + } + else + m_uiWeldTimer -= uiDiff; + } + } + + if (m_uiWakeUpTimer) + { + // check if all robot pieces are damaged + if (m_uiWakeUpTimer <= uiDiff) + { + Creature* pLeviathan = m_pInstance->GetSingleCreatureFromStorage(NPC_LEVIATHAN_MK); + Creature* pVx001 = m_pInstance->GetSingleCreatureFromStorage(NPC_VX001); + Creature* pAerial = m_pInstance->GetSingleCreatureFromStorage(NPC_AERIAL_UNIT); + if (!pAerial || !pVx001 || !pLeviathan) + return; + + // if all robot pieces are damaged finish the encounter + if (pLeviathan->HasAura(SPELL_FREEZE_ANIM) && pVx001->getStandState() == UNIT_STAND_STATE_DEAD && pAerial->getStandState() == UNIT_STAND_STATE_DEAD) + { + // eject from the robot and start dialogue + pVx001->RemoveSpellsCausingAura(SPELL_AURA_CONTROL_VEHICLE, m_creature->GetObjectGuid()); + StartNextDialogueText(SPELL_SLEEP_VISUAL); + + // kill the robot parts + m_creature->DealDamage(pLeviathan, pLeviathan->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NONE, NULL, false); + m_creature->DealDamage(pVx001, pVx001->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NONE, NULL, false); + m_creature->DealDamage(pAerial, pAerial->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NONE, NULL, false); + } + m_uiWakeUpTimer = 0; + } + else + m_uiWakeUpTimer -= uiDiff; + } + + if (m_uiDestructTimer) + { + // handle the platform destruction for hard mode + if (m_uiDestructTimer <= uiDiff) + { + Creature* pComputer = m_pInstance->GetSingleCreatureFromStorage(NPC_COMPUTER); + if (!pComputer) + return; + + ++m_uiDestructStage; + m_uiDestructTimer = MINUTE * IN_MILLISECONDS; + + switch (m_uiDestructStage) + { + case 1: DoScriptText(SAY_DESTRUCT_9_MIN, pComputer); break; + case 2: DoScriptText(SAY_DESTRUCT_8_MIN, pComputer); break; + case 3: DoScriptText(SAY_DESTRUCT_7_MIN, pComputer); break; + case 4: DoScriptText(SAY_DESTRUCT_6_MIN, pComputer); break; + case 5: DoScriptText(SAY_DESTRUCT_5_MIN, pComputer); break; + case 6: DoScriptText(SAY_DESTRUCT_4_MIN, pComputer); break; + case 7: DoScriptText(SAY_DESTRUCT_3_MIN, pComputer); break; + case 8: DoScriptText(SAY_DESTRUCT_2_MIN, pComputer); break; + case 9: DoScriptText(SAY_DESTRUCT_1_MIN, pComputer); break; + case 10: + DoScriptText(SAY_DESTRUCT_0_MIN, pComputer); + pComputer->CastSpell(pComputer, SPELL_SELF_DESTRUCTION, true); + pComputer->CastSpell(pComputer, SPELL_SELF_DESTRUCTION_DAMAGE, true); + m_uiDestructTimer = 0; + break; + } + } + else + m_uiDestructTimer -= uiDiff; + } + } }; +CreatureAI* GetAI_boss_mimiron(Creature* pCreature) +{ + return new boss_mimironAI(pCreature); +} + /*###### ## boss_leviathan_mk2 ######*/ @@ -151,37 +681,158 @@ struct MANGOS_DLL_DECL boss_leviathan_mk2AI : public ScriptedAI { m_pInstance = (instance_ulduar*)pCreature->GetInstanceData(); m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); + + DoCastSpellIfCan(m_creature, SPELL_FREEZE_ANIM, CAST_TRIGGERED | CAST_AURA_NOT_PRESENT); + m_uiPhase = PHASE_INTRO; m_uiMountTimer = 1000; Reset(); } instance_ulduar* m_pInstance; bool m_bIsRegularMode; + uint8 m_uiPhase; uint32 m_uiMountTimer; void Reset() override { + SetCombatMovement(true); } void Aggro(Unit* /*pWho*/) override + { + m_uiPhase = PHASE_LEVIATHAN; + } + + void JustDied(Unit* /*pKiller*/) override { if (m_pInstance) - m_pInstance->SetData(TYPE_MIMIRON, IN_PROGRESS); + m_pInstance->SetData(TYPE_MIMIRON, DONE); + } + + void DamageTaken(Unit* pDoneBy, uint32& uiDamage) override + { + if (pDoneBy->GetEntry() == NPC_MIMIRON) + return; + + if (uiDamage >= m_creature->GetHealth()) + { + uiDamage = 0; + + if (m_uiPhase == PHASE_LEVIATHAN) + { + // unmount and destroy the turret + if (m_pInstance) + { + if (Creature* pTurret = m_pInstance->GetSingleCreatureFromStorage(NPC_LEVIATHAN_MK_TURRET)) + { + m_creature->RemoveSpellsCausingAura(SPELL_AURA_CONTROL_VEHICLE, pTurret->GetObjectGuid()); + m_creature->DealDamage(pTurret, pTurret->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NONE, NULL, false); + } + } + + // move to parking position + SetCombatMovement(false); + m_uiPhase = PHASE_TRANSITION; + m_creature->GetMotionMaster()->MovePoint(POINT_ID_PARK, afTankEvadePos[0], afTankEvadePos[1], afTankEvadePos[2]); + } + else if (m_uiPhase == PHASE_FULL_ROBOT) + { + // start self repair + if (DoCastSpellIfCan(m_creature, SPELL_SELF_REPAIR) == CAST_OK) + { + DoCastSpellIfCan(m_creature, SPELL_VEHICLE_DAMAGED, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_FREEZE_ANIM, CAST_TRIGGERED); + + // inform Mimiron about the damaged state + if (Creature* pMimiron = m_pInstance->GetSingleCreatureFromStorage(NPC_MIMIRON)) + SendAIEvent(AI_EVENT_CUSTOM_E, m_creature, pMimiron); + + SetCombatMovement(false); + m_creature->GetMotionMaster()->MoveIdle(); + m_uiPhase = PHASE_DAMAGED; + } + } + } + } + + void SpellHit(Unit* /*pCaster*/, const SpellEntry* pSpell) override + { + // self repair succesfull; resume fight + if (pSpell->Id == SPELL_SELF_REPAIR) + { + m_creature->RemoveAurasDueToSpell(SPELL_FREEZE_ANIM); + SetCombatMovement(true); + m_creature->GetMotionMaster()->Clear(); + DoStartMovement(m_creature->getVictim()); + m_uiPhase = PHASE_FULL_ROBOT; + } } void JustReachedHome() override { if (m_pInstance) + { m_pInstance->SetData(TYPE_MIMIRON, FAIL); + + // respawn the turret if necessary + if (Creature* pTurret = m_pInstance->GetSingleCreatureFromStorage(NPC_LEVIATHAN_MK_TURRET)) + { + if (!pTurret->isAlive()) + pTurret->Respawn(); + } + } + + DoCastSpellIfCan(m_creature, SPELL_FREEZE_ANIM); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + + // reset all the vehicle accessories + m_uiMountTimer = 1000; } void KilledUnit(Unit* pVictim) override { - if (pVictim->GetTypeId() != TYPEID_PLAYER) + if (pVictim->GetTypeId() != TYPEID_PLAYER || !m_pInstance) + return; + + if (Creature* pMimiron = m_pInstance->GetSingleCreatureFromStorage(NPC_MIMIRON)) + { + if (m_uiPhase == PHASE_FULL_ROBOT) + DoScriptText(urand(0, 1) ? SAY_ROBOT_SLAY_1 : SAY_ROBOT_SLAY_2, pMimiron); + else + DoScriptText(urand(0, 1) ? SAY_TANK_SLAY_1 : SAY_TANK_SLAY_2, pMimiron); + } + } + + void MovementInform(uint32 uiMoveType, uint32 uiPointId) override + { + if (uiMoveType != POINT_MOTION_TYPE || !m_pInstance) return; - DoScriptText(urand(0, 1) ? SAY_TANK_SLAY_1 : SAY_TANK_SLAY_2, m_creature); + if (uiPointId == POINT_ID_PARK) + { + // start transition phase + if (Creature* pMimiron = m_pInstance->GetSingleCreatureFromStorage(NPC_MIMIRON)) + SendAIEvent(AI_EVENT_CUSTOM_B, m_creature, pMimiron); + + // park the Leviathan + DoCastSpellIfCan(m_creature, SPELL_CLEAR_DEBUFFS, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_HALF_HEAL, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_FREEZE_ANIM_DEFEATED, CAST_TRIGGERED); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + m_creature->SetFacingTo(afTankEvadePos[3]); + } + } + + void ReceiveAIEvent(AIEventType eventType, Creature* /*pSender*/, Unit* /*pInvoker*/, uint32 /*uiMiscValue*/) override + { + // switch to full robot abilities + if (eventType == AI_EVENT_CUSTOM_A) + { + SetCombatMovement(true); + DoStartMovement(m_creature->getVictim()); + m_uiPhase = PHASE_FULL_ROBOT; + } } void JustSummoned(Creature* pSummoned) override @@ -201,6 +852,8 @@ struct MANGOS_DLL_DECL boss_leviathan_mk2AI : public ScriptedAI { if (m_uiMountTimer <= uiDiff) { + m_creature->RemoveSpellsCausingAura(SPELL_AURA_CONTROL_VEHICLE); + if (Creature* pTurret = m_pInstance->GetSingleCreatureFromStorage(NPC_LEVIATHAN_MK_TURRET)) { int32 iSeat = (int32)SEAT_ID_TURRET; @@ -208,10 +861,7 @@ struct MANGOS_DLL_DECL boss_leviathan_mk2AI : public ScriptedAI } if (Creature* pMimiron = m_pInstance->GetSingleCreatureFromStorage(NPC_MIMIRON)) - { - pMimiron->CastSpell(m_creature, SPELL_RIDE_VEHICLE_MIMIRON, true); - pMimiron->CastSpell(pMimiron, SPELL_WELD, true); - } + pMimiron->CastSpell(m_creature, SPELL_RIDE_VEHICLE_MIMIRON_0, true); m_uiMountTimer = 0; } @@ -222,6 +872,10 @@ struct MANGOS_DLL_DECL boss_leviathan_mk2AI : public ScriptedAI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; + // no combat during transition or when damaged + if (m_uiPhase == PHASE_TRANSITION || m_uiPhase == PHASE_DAMAGED) + return; + DoMeleeAttackIfReady(); } }; @@ -231,12 +885,361 @@ CreatureAI* GetAI_boss_leviathan_mk2(Creature* pCreature) return new boss_leviathan_mk2AI(pCreature); } +/*###### +## boss_vx001 +######*/ + +struct MANGOS_DLL_DECL boss_vx001AI : public ScriptedAI +{ + boss_vx001AI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (instance_ulduar*)pCreature->GetInstanceData(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); + + DoCastSpellIfCan(m_creature, SPELL_FREEZE_ANIM, CAST_TRIGGERED | CAST_AURA_NOT_PRESENT); + m_uiPhase = PHASE_TRANSITION; + SetCombatMovement(false); + m_uiMountTimer = 1000; + Reset(); + } + + instance_ulduar* m_pInstance; + bool m_bIsRegularMode; + uint8 m_uiPhase; + + uint32 m_uiMountTimer; + uint8 m_uiRocketCount; + + void Reset() override + { + m_uiRocketCount = 0; + } + + void Aggro(Unit* /*pWho*/) override + { + if (m_uiPhase == PHASE_TRANSITION) + { + m_uiPhase = PHASE_VX001; + DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_HEAT_WAVE : SPELL_HEAT_WAVE_H, CAST_TRIGGERED | CAST_AURA_NOT_PRESENT); + } + + // Set levitate for animation purpose + // ToDo: find proper hand animation for final phase. This only works for the second phase + m_creature->SetLevitate(true); + } + + void DamageTaken(Unit* pDoneBy, uint32& uiDamage) override + { + if (pDoneBy->GetEntry() == NPC_MIMIRON) + return; + + if (uiDamage >= m_creature->GetHealth()) + { + uiDamage = 0; + + if (m_uiPhase == PHASE_VX001) + { + // shut down the VX001 + if (DoCastSpellIfCan(m_creature, SPELL_TORSO_DISABLED) == CAST_OK) + { + // start transition phase + if (Creature* pMimiron = m_pInstance->GetSingleCreatureFromStorage(NPC_MIMIRON)) + SendAIEvent(AI_EVENT_CUSTOM_C, m_creature, pMimiron); + + DoCastSpellIfCan(m_creature, SPELL_CLEAR_DEBUFFS, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_HALF_HEAL, CAST_TRIGGERED); + + // custom evade in order to properly handle the animations + m_creature->RemoveAllAurasOnEvade(); + m_creature->DeleteThreatList(); + m_creature->CombatStop(); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + + m_uiPhase = PHASE_TRANSITION; + } + } + else if (m_uiPhase == PHASE_FULL_ROBOT) + { + // start self repair + if (DoCastSpellIfCan(m_creature, SPELL_SELF_REPAIR) == CAST_OK) + { + // inform Mimiron about the damaged state + if (Creature* pMimiron = m_pInstance->GetSingleCreatureFromStorage(NPC_MIMIRON)) + SendAIEvent(AI_EVENT_CUSTOM_E, m_creature, pMimiron); + + m_uiPhase = PHASE_DAMAGED; + m_creature->SetStandState(UNIT_STAND_STATE_DEAD); + } + } + } + } + + void SpellHit(Unit* /*pCaster*/, const SpellEntry* pSpell) override + { + // self repair succesfull; resume fight + if (pSpell->Id == SPELL_SELF_REPAIR) + { + m_creature->SetStandState(UNIT_STAND_STATE_STAND); + m_uiPhase = PHASE_FULL_ROBOT; + } + } + + void JustReachedHome() override + { + if (m_pInstance) + m_pInstance->SetData(TYPE_MIMIRON, FAIL); + } + + void KilledUnit(Unit* pVictim) override + { + if (pVictim->GetTypeId() != TYPEID_PLAYER || !m_pInstance) + return; + + if (Creature* pMimiron = m_pInstance->GetSingleCreatureFromStorage(NPC_MIMIRON)) + { + if (m_uiPhase == PHASE_FULL_ROBOT) + DoScriptText(urand(0, 1) ? SAY_ROBOT_SLAY_1 : SAY_ROBOT_SLAY_2, pMimiron); + else + DoScriptText(urand(0, 1) ? SAY_TORSO_SLAY_1 : SAY_TORSO_SLAY_2, pMimiron); + } + } + + void ReceiveAIEvent(AIEventType eventType, Creature* /*pSender*/, Unit* /*pInvoker*/, uint32 /*uiMiscValue*/) override + { + // switch to full robot abilities + if (eventType == AI_EVENT_CUSTOM_A) + m_uiPhase = PHASE_FULL_ROBOT; + } + + void JustSummoned(Creature* pSummoned) override + { + switch (pSummoned->GetEntry()) + { + // mount rockets at their seats + case NPC_ROCKET_VISUAL: + int32 iSeat = (int32)m_uiRocketCount + 6; + pSummoned->CastCustomSpell(m_creature, SPELL_RIDE_VEHICLE_HARDCODED, &iSeat, NULL, NULL, true); + break; + } + } + + void UpdateAI(const uint32 uiDiff) override + { + if (!m_pInstance) + { + script_error_log("Instance Ulduar: ERROR Failed to load instance data for this instace."); + return; + } + + // Mount the Rockets + if (m_uiMountTimer) + { + if (m_uiMountTimer <= uiDiff) + { + for (uint8 i = 0; i < 2; ++i) + { + m_creature->SummonCreature(NPC_ROCKET_VISUAL, afRocketSpawnPos[0], afRocketSpawnPos[1], afRocketSpawnPos[2], afRocketSpawnPos[3], TEMPSUMMON_DEAD_DESPAWN, 0); + ++m_uiRocketCount; + } + + m_uiMountTimer = 0; + } + else + m_uiMountTimer -= uiDiff; + } + + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + // no combat during transition or when damaged + if (m_uiPhase == PHASE_TRANSITION || m_uiPhase == PHASE_DAMAGED) + return; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_vx001(Creature* pCreature) +{ + return new boss_vx001AI(pCreature); +} + +/*###### +## boss_aerial_unit +######*/ + +struct MANGOS_DLL_DECL boss_aerial_unitAI : public ScriptedAI +{ + boss_aerial_unitAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (instance_ulduar*)pCreature->GetInstanceData(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); + m_creature->SetLevitate(true); + m_uiPhase = PHASE_TRANSITION; + SetCombatMovement(false); + Reset(); + } + + instance_ulduar* m_pInstance; + bool m_bIsRegularMode; + uint8 m_uiPhase; + + void Reset() override + { + SetCombatMovement(false); + } + + void Aggro(Unit* /*pWho*/) override + { + m_uiPhase = PHASE_AERIAL_UNIT; + // ToDo: handle air combat movement + } + + void DamageTaken(Unit* pDoneBy, uint32& uiDamage) override + { + if (pDoneBy->GetEntry() == NPC_MIMIRON) + return; + + if (uiDamage >= m_creature->GetHealth()) + { + uiDamage = 0; + + if (m_uiPhase == PHASE_AERIAL_UNIT) + { + // start transition phase + if (Creature* pMimiron = m_pInstance->GetSingleCreatureFromStorage(NPC_MIMIRON)) + SendAIEvent(AI_EVENT_CUSTOM_D, m_creature, pMimiron); + + // shut down the aerial unit and prepare for the final phase + DoCastSpellIfCan(m_creature, SPELL_CLEAR_DEBUFFS, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_HALF_HEAL, CAST_TRIGGERED); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + + m_creature->GetMotionMaster()->Clear(); + m_creature->GetMotionMaster()->MovePoint(0, afAerialMovePos[0], afAerialMovePos[1], afAerialMovePos[2]); + m_uiPhase = PHASE_TRANSITION; + } + else if (m_uiPhase == PHASE_FULL_ROBOT) + { + // start self repair + if (DoCastSpellIfCan(m_creature, SPELL_SELF_REPAIR) == CAST_OK) + { + // inform Mimiron about the damaged state + if (Creature* pMimiron = m_pInstance->GetSingleCreatureFromStorage(NPC_MIMIRON)) + SendAIEvent(AI_EVENT_CUSTOM_E, m_creature, pMimiron); + + m_creature->SetStandState(UNIT_STAND_STATE_DEAD); + m_uiPhase = PHASE_DAMAGED; + } + } + } + } + + void SpellHit(Unit* /*pCaster*/, const SpellEntry* pSpell) override + { + // self repair succesfull; resume fight + if (pSpell->Id == SPELL_SELF_REPAIR) + { + m_uiPhase = PHASE_FULL_ROBOT; + m_creature->SetStandState(UNIT_STAND_STATE_STAND); + } + } + + void JustReachedHome() override + { + if (m_pInstance) + m_pInstance->SetData(TYPE_MIMIRON, FAIL); + } + + void KilledUnit(Unit* pVictim) override + { + if (pVictim->GetTypeId() != TYPEID_PLAYER || !m_pInstance) + return; + + if (Creature* pMimiron = m_pInstance->GetSingleCreatureFromStorage(NPC_MIMIRON)) + { + if (m_uiPhase == PHASE_FULL_ROBOT) + DoScriptText(urand(0, 1) ? SAY_ROBOT_SLAY_1 : SAY_ROBOT_SLAY_2, pMimiron); + else + DoScriptText(urand(0, 1) ? SAY_HEAD_SLAY_1 : SAY_HEAD_SLAY_2, pMimiron); + } + } + + void ReceiveAIEvent(AIEventType eventType, Creature* /*pSender*/, Unit* /*pInvoker*/, uint32 /*uiMiscValue*/) override + { + // switch to full robot abilities + if (eventType == AI_EVENT_CUSTOM_A) + m_uiPhase = PHASE_FULL_ROBOT; + } + + void JustSummoned(Creature* pSummoned) override + { + } + + void UpdateAI(const uint32 uiDiff) override + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + // no combat during transition or when damaged + if (m_uiPhase == PHASE_TRANSITION || m_uiPhase == PHASE_DAMAGED) + return; + } +}; + +CreatureAI* GetAI_boss_aerial_unit(Creature* pCreature) +{ + return new boss_aerial_unitAI(pCreature); +} + +/*###### +## go_big_red_button +######*/ + +bool GOUse_go_big_red_button(Player* pPlayer, GameObject* pGo) +{ + ScriptedInstance* pInstance = (ScriptedInstance*)pGo->GetInstanceData(); + if (!pInstance) + return true; + + if (pInstance->GetData(TYPE_MIMIRON) == IN_PROGRESS || pInstance->GetData(TYPE_MIMIRON) == DONE) + return true; + + // Inform Mimiron about the button being pressed + if (Creature* pMimiron = pInstance->GetSingleCreatureFromStorage(NPC_MIMIRON)) + pMimiron->AI()->SendAIEvent(AI_EVENT_CUSTOM_A, pPlayer, pMimiron); + + // Set instance data and allow DB scripts to continue the event + pInstance->SetData(TYPE_MIMIRON_HARD, DONE); + return false; +} + void AddSC_boss_mimiron() { Script* pNewScript; + pNewScript = new Script; + pNewScript->Name = "boss_mimiron"; + pNewScript->GetAI = GetAI_boss_mimiron; + pNewScript->RegisterSelf(); + pNewScript = new Script; pNewScript->Name = "boss_leviathan_mk2"; pNewScript->GetAI = GetAI_boss_leviathan_mk2; pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "boss_vx001"; + pNewScript->GetAI = GetAI_boss_vx001; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "boss_aerial_unit"; + pNewScript->GetAI = GetAI_boss_aerial_unit; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "go_big_red_button"; + pNewScript->pGOUse = &GOUse_go_big_red_button; + pNewScript->RegisterSelf(); } diff --git a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp index bc18d2394..d5ca10d9d 100644 --- a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp +++ b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp @@ -162,6 +162,8 @@ void instance_ulduar::OnCreatureCreate(Creature* pCreature) case NPC_LEVIATHAN_MK: case NPC_LEVIATHAN_MK_TURRET: case NPC_COMPUTER: + case NPC_VX001: + case NPC_AERIAL_UNIT: case NPC_RUNIC_COLOSSUS: case NPC_RUNE_GIANT: case NPC_SIF: @@ -318,9 +320,6 @@ void instance_ulduar::OnObjectCreate(GameObject* pGo) break; // Mimiron case G0_MIMIRON_BUTTON: - if (m_auiEncounter[TYPE_MIMIRON] == NOT_STARTED) - pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NO_INTERACT); - break; case GO_MIMIRON_DOOR_1: case GO_MIMIRON_DOOR_2: case GO_MIMIRON_DOOR_3: @@ -575,18 +574,55 @@ void instance_ulduar::SetData(uint32 uiType, uint32 uiData) // Keepers of Ulduar case TYPE_MIMIRON: + // Don't set the same encounter data twice + if (uiData == m_auiEncounter[uiType]) + return; m_auiEncounter[uiType] = uiData; DoUseDoorOrButton(GO_MIMIRON_DOOR_1); DoUseDoorOrButton(GO_MIMIRON_DOOR_2); DoUseDoorOrButton(GO_MIMIRON_DOOR_3); if (uiData == DONE) { - if (GetData(TYPE_MIMIRON_HARD) != DONE) + if (GetData(TYPE_MIMIRON_HARD) == DONE) + DoRespawnGameObject(instance->IsRegularDifficulty() ? GO_CACHE_OF_INOV_10_H : GO_CACHE_OF_INOV_25_H, 30 * MINUTE); + else DoRespawnGameObject(instance->IsRegularDifficulty() ? GO_CACHE_OF_INOV_10 : GO_CACHE_OF_INOV_25, 30 * MINUTE); SpawnFriendlyKeeper(NPC_KEEPER_MIMIRON); DoOpenMadnessDoorIfCan(); } + else if (uiData == IN_PROGRESS) + DoToggleGameObjectFlags(G0_MIMIRON_BUTTON, GO_FLAG_NO_INTERACT, true); + else if (uiData == FAIL) + { + // reset objects + DoToggleGameObjectFlags(G0_MIMIRON_BUTTON, GO_FLAG_NO_INTERACT, false); + + if (GameObject* pButton = GetSingleGameObjectFromStorage(G0_MIMIRON_BUTTON)) + pButton->ResetDoorOrButton(); + if (GameObject* pElevator = GetSingleGameObjectFromStorage(GO_MIMIRON_ELEVATOR)) + pElevator->SetGoState(GO_STATE_ACTIVE); + + // reset vehicles + if (Creature* pLeviathan = GetSingleCreatureFromStorage(NPC_LEVIATHAN_MK)) + pLeviathan->RemoveSpellsCausingAura(SPELL_AURA_CONTROL_VEHICLE); + if (Creature* pVx001 = GetSingleCreatureFromStorage(NPC_VX001, true)) + { + pVx001->RemoveSpellsCausingAura(SPELL_AURA_CONTROL_VEHICLE); + pVx001->ForcedDespawn(1000); + } + if (Creature* pAerial = GetSingleCreatureFromStorage(NPC_AERIAL_UNIT, true)) + { + pAerial->RemoveSpellsCausingAura(SPELL_AURA_CONTROL_VEHICLE); + pAerial->ForcedDespawn(1000); + } + if (Creature* pMimiron = GetSingleCreatureFromStorage(NPC_MIMIRON)) + pMimiron->AI()->EnterEvadeMode(); + if (Creature* pComputer = GetSingleCreatureFromStorage(NPC_COMPUTER)) + pComputer->AI()->EnterEvadeMode(); + + SetData(TYPE_MIMIRON_HARD, FAIL); + } break; case TYPE_HODIR: m_auiEncounter[uiType] = uiData; @@ -1181,6 +1217,9 @@ bool instance_ulduar::CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player c case ACHIEV_CRIT_KNOCK_3_N: case ACHIEV_CRIT_KNOCK_3_H: return GetData(TYPE_FREYA_HARD) == 3; + case ACHIEV_CRIT_FIREFIGHTER_N: + case ACHIEV_CRIT_FIREFIGHTER_H: + return GetData(TYPE_MIMIRON_HARD) == DONE; default: return false; diff --git a/scripts/northrend/ulduar/ulduar/ulduar.h b/scripts/northrend/ulduar/ulduar/ulduar.h index 726369cb0..85204a888 100644 --- a/scripts/northrend/ulduar/ulduar/ulduar.h +++ b/scripts/northrend/ulduar/ulduar/ulduar.h @@ -395,6 +395,8 @@ enum ACHIEV_CRIT_KNOCK_2_H = 10460, ACHIEV_CRIT_KNOCK_3_N = 10449, // Freya, achievs 3179, 3187 ACHIEV_CRIT_KNOCK_3_H = 10461, + ACHIEV_CRIT_FIREFIGHTER_N = 10450, // Mimiron, achievs 3180, 3189 + ACHIEV_CRIT_FIREFIGHTER_H = 10463, }; struct UlduarSpawns diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 899e82d14..0893e51b1 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2969" + #define SD2_REVISION_NR "2970" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 99ad028d1..f9e24934d 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -1314,7 +1314,11 @@ UPDATE creature_template SET ScriptName='npc_healthy_spore' WHERE entry=33215; UPDATE creature_template SET ScriptName='npc_water_spirit' WHERE entry=33202; UPDATE creature_template SET ScriptName='npc_snaplasher' WHERE entry=32916; UPDATE creature_template SET ScriptName='npc_storm_lasher' WHERE entry=32919; +UPDATE creature_template SET ScriptName='boss_mimiron' WHERE entry=33350; UPDATE creature_template SET ScriptName='boss_leviathan_mk2' WHERE entry=33432; +UPDATE creature_template SET ScriptName='boss_vx001' WHERE entry=33651; +UPDATE creature_template SET ScriptName='boss_aerial_unit' WHERE entry=33670; +UPDATE gameobject_template SET ScriptName='go_big_red_button' WHERE entry=194739; DELETE FROM scripted_event_id WHERE id IN (9735,20907,20964,21030,21031,21032,21033,21045,21605,21606,21620); INSERT INTO scripted_event_id VALUES (9735, 'event_spell_saronite_barrier'), -- Vezax saronite barrier event diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index a50c566b9..6cfef62a3 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -3582,7 +3582,7 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1603191,'Gaze upon its magnificence! Bask in its glorious, um, glory! I present you... V-07-TR-0N!',15624,1,0,0,'mimiron SAY_ROBOT_ACTIVE'), (-1603192,'Prognosis: Negative!',15625,1,0,0,'mimiron SAY_ROBOT_SLAY_1'), (-1603193,'You\'re not going to get up from that one, friend.',15626,1,0,0,'mimiron SAY_ROBOT_SLAY_2'), -(-1603194,'It would appear that I\'ve made a slight miscalculation. I allowed my mind to be corrupted by the fiend in the prison, overriding my primary directive. All systems seem to be functional now. Clear.',15627,1,0,0,'mimiron SAY_ROBOT_DEATH'), +(-1603194,'It would appear that I\'ve made a slight miscalculation. I allowed my mind to be corrupted by the fiend in the prison, overriding my primary directive. All systems seem to be functional now. Clear.',15627,1,0,1,'mimiron SAY_ROBOT_DEATH'), (-1603195,'Combat matrix enhanced. Behold wonderous rapidity!',15630,1,0,0,'mimiron SAY_HELP_YOGG'), (-1603196,'Leviathan Mk II begins to cast Plasma Blast!',0,3,0,0,'mimiron EMOTE_PLASMA_BLAST'), @@ -3648,7 +3648,21 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1603246,'I know just the place. Will you be all right?',15823,1,0,0,'brann SAY_BRANN_OUTRO'), -(-1603247,'%s surrounds itself with a crackling Runic Barrier!',0,3,0,0,'thorim EMOTE_RUNIC_BARRIER'); +(-1603247,'%s surrounds itself with a crackling Runic Barrier!',0,3,0,0,'thorim EMOTE_RUNIC_BARRIER'), + +(-1603248,'Self-destruct sequence initiated.',15413,1,0,0,'mimiron SAY_SELF_DESTRUCT'), +(-1603249,'This area will self-destruct in ten minutes.',15415,1,0,0,'mimiron SAY_DESTRUCT_10_MIN'), +(-1603250,'This area will self-destruct in nine minutes.',15416,1,0,0,'mimiron SAY_DESTRUCT_9_MIN'), +(-1603251,'This area will self-destruct in eight minutes.',15417,1,0,0,'mimiron SAY_DESTRUCT_8_MIN'), +(-1603252,'This area will self-destruct in seven minutes.',15418,1,0,0,'mimiron SAY_DESTRUCT_7_MIN'), +(-1603253,'This area will self-destruct in six minutes.',15419,1,0,0,'mimiron SAY_DESTRUCT_6_MIN'), +(-1603254,'This area will self-destruct in five minutes.',15420,1,0,0,'mimiron SAY_DESTRUCT_5_MIN'), +(-1603255,'This area will self-destruct in four minutes.',15421,1,0,0,'mimiron SAY_DESTRUCT_4_MIN'), +(-1603256,'This area will self-destruct in three minutes.',15422,1,0,0,'mimiron SAY_DESTRUCT_3_MIN'), +(-1603257,'This area will self-destruct in two minutes.',15423,1,0,0,'mimiron SAY_DESTRUCT_2_MIN'), +(-1603258,'This area will self-destruct in one minute.',15424,1,0,0,'mimiron SAY_DESTRUCT_1_MIN'), +(-1603259,'Self-destruct sequence finalized. Have a nice day.',15425,1,0,0,'mimiron SAY_DESTRUCT_0_MIN'), +(-1603260,'Self-destruct sequence terminated. Overide code A905.',15414,1,0,0,'mimiron SAY_SELF_DESTRUCT_END'); -- -1 604 000 GUNDRAK INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES diff --git a/sql/updates/r2970_mangos.sql b/sql/updates/r2970_mangos.sql new file mode 100644 index 000000000..71a6ae506 --- /dev/null +++ b/sql/updates/r2970_mangos.sql @@ -0,0 +1,4 @@ +UPDATE creature_template SET ScriptName='boss_mimiron' WHERE entry=33350; +UPDATE creature_template SET ScriptName='boss_vx001' WHERE entry=33651; +UPDATE creature_template SET ScriptName='boss_aerial_unit' WHERE entry=33670; +UPDATE gameobject_template SET ScriptName='go_big_red_button' WHERE entry=194739; diff --git a/sql/updates/r2970_scriptdev2.sql b/sql/updates/r2970_scriptdev2.sql new file mode 100644 index 000000000..c8c7791aa --- /dev/null +++ b/sql/updates/r2970_scriptdev2.sql @@ -0,0 +1,16 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1603260 AND -1603248; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1603248,'Self-destruct sequence initiated.',15413,1,0,0,'mimiron SAY_SELF_DESTRUCT'), +(-1603249,'This area will self-destruct in ten minutes.',15415,1,0,0,'mimiron SAY_DESTRUCT_10_MIN'), +(-1603250,'This area will self-destruct in nine minutes.',15416,1,0,0,'mimiron SAY_DESTRUCT_9_MIN'), +(-1603251,'This area will self-destruct in eight minutes.',15417,1,0,0,'mimiron SAY_DESTRUCT_8_MIN'), +(-1603252,'This area will self-destruct in seven minutes.',15418,1,0,0,'mimiron SAY_DESTRUCT_7_MIN'), +(-1603253,'This area will self-destruct in six minutes.',15419,1,0,0,'mimiron SAY_DESTRUCT_6_MIN'), +(-1603254,'This area will self-destruct in five minutes.',15420,1,0,0,'mimiron SAY_DESTRUCT_5_MIN'), +(-1603255,'This area will self-destruct in four minutes.',15421,1,0,0,'mimiron SAY_DESTRUCT_4_MIN'), +(-1603256,'This area will self-destruct in three minutes.',15422,1,0,0,'mimiron SAY_DESTRUCT_3_MIN'), +(-1603257,'This area will self-destruct in two minutes.',15423,1,0,0,'mimiron SAY_DESTRUCT_2_MIN'), +(-1603258,'This area will self-destruct in one minute.',15424,1,0,0,'mimiron SAY_DESTRUCT_1_MIN'), +(-1603259,'Self-destruct sequence finalized. Have a nice day.',15425,1,0,0,'mimiron SAY_DESTRUCT_0_MIN'), +(-1603260,'Self-destruct sequence terminated. Overide code A905.',15414,1,0,0,'mimiron SAY_SELF_DESTRUCT_END'); +UPDATE script_texts SET emote=1 WHERE entry=-1603194; From 53865b2c8f45e3cc02af1872db99f9804e4e8d86 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sun, 27 Oct 2013 01:40:48 +0300 Subject: [PATCH 0981/1172] [2971] Implement combat abilities for Mimiron Hard mode abilities will be added in a distinct patch --- .../northrend/ulduar/ulduar/boss_mimiron.cpp | 523 +++++++++++++++++- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 3 + sql/scriptdev2_script_full.sql | 2 +- sql/updates/r2971_mangos.sql | 3 + sql/updates/r2971_scriptdev2.sql | 3 + 6 files changed, 506 insertions(+), 30 deletions(-) create mode 100644 sql/updates/r2971_mangos.sql create mode 100644 sql/updates/r2971_scriptdev2.sql diff --git a/scripts/northrend/ulduar/ulduar/boss_mimiron.cpp b/scripts/northrend/ulduar/ulduar/boss_mimiron.cpp index 945b83e14..c792a9e93 100644 --- a/scripts/northrend/ulduar/ulduar/boss_mimiron.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_mimiron.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: boss_mimiron -SD%Complete: 60% -SDComment: Combat abilities NYI. +SD%Complete: 80% +SDComment: Hard mode abilities NYI. SDCategory: Ulduar EndScriptData */ @@ -106,13 +106,15 @@ enum // VX001 spells SPELL_RAPID_BURST_SUMMON = 64840, - SPELL_RAPID_BURST_LEFT = 63387, // used in the VX phase; each spell has a different robot animation - SPELL_RAPID_BURST_RIGHT = 64019, - SPELL_RAPID_BURST_LEFT_H = 64531, - SPELL_RAPID_BURST_RIGHT_H = 64532, - SPELL_LASER_BARRAGE = 63274, - SPELL_SPINNING_UP = 63414, // laser barrage spell for the final phase - SPELL_ROCKET_STRIKE = 64402, // targets npc 34050; triggers 63681 and 63036 from target + SPELL_RAPID_BURST_EFFECT = 64841, + SPELL_RAPID_BURST_AURA = 63382, // triggers alternative the left and right Rapid Burst or Hand Pulse + // SPELL_RAPID_BURST_LEFT = 63387, // used in the VX phase; each spell has a different robot animation + // SPELL_RAPID_BURST_RIGHT = 64019, + // SPELL_RAPID_BURST_LEFT_H = 64531, + // SPELL_RAPID_BURST_RIGHT_H = 64532, + // SPELL_LASER_BARRAGE = 63274, + SPELL_SPINNING_UP = 63414, // triggers 63414 and 66490; + SPELL_ROCKET_STRIKE = 64402, // targets npc 34050; triggers 63681 and 63036 from target; will spawn npc 34047 SPELL_HEAT_WAVE = 63679, SPELL_HEAT_WAVE_H = 64534, SPELL_HAND_PULSE_LEFT = 64348, // spells used only in the final phase @@ -128,10 +130,26 @@ enum SPELL_PLASMA_BALL_FLY_H = 64535, SPELL_PLASMA_BALL = 65647, // used during the final phase SPELL_PLASMA_BALL_H = 65648, - SPELL_SUMMON_ASSAULT_BOT = 64427, // summon npc 34057 - SPELL_SUMMON_SCRAP_BOT = 63819, // summon npc 33855 + SPELL_SUMMON_ASSAULT_BOT_TRIGGER = 64425, // triggers 64427 and 64426; used to summon npc 34057 + SPELL_SUMMON_ASSAULT_BOT_VISUAL = 64426, + SPELL_SUMMON_ASSAULT_BOT = 64427, + SPELL_SUMMON_SCRAP_BOT_TRIGGER = 63820, // triggers 63819 and 64398; used to summon npc 33855 + SPELL_SUMMON_SCRAP_BOT_VISUAL = 64398, + SPELL_SUMMON_SCRAP_BOT = 63819, SPELL_BOMB_BOT_SUMMON = 63811, // summon npc 33836 - SPELL_SUMMON_FIRE_BOT = 64622, // hard mode spell; summon npc 34147 + SPELL_MAGNETIC_CORE_PULL = 64436, + SPELL_MAGNETIC_CORE_VISUAL = 64438, + SPELL_SUMMON_FIRE_BOT_TRIGGER = 64620, // triggers 64621, 64622; hard mode spell; used to summon npc 34147 + SPELL_SUMMON_FIRE_BOT_VISUAL = 64621, + SPELL_SUMMON_FIRE_BOT = 64622, + + // proximity mine + SPELL_PROXIMITY_MINE = 65345, + SPELL_EXPLOSION = 66351, + SPELL_EXPLOSION_H = 63009, + + // bots spells + SPELL_BOMB_BOT = 63767, // hard mode spells SPELL_SELF_DESTRUCTION = 64613, @@ -144,7 +162,7 @@ enum SPELL_SUMMON_FLAMES_SPREAD = 64562, // cast by npc 34363 // frost bomb spells - SPELL_EXPLOSION = 64626, + SPELL_EXPLOSION_FROST = 64626, SPELL_FROST_BOMB_VISUAL = 64624, // summoned @@ -234,7 +252,7 @@ static const float afTankEvadePos[4] = {2792.07f, 2596.32f, 364.3136f, 3.5f}; static const float afRobotSpawnPos[4] = {2744.431f, 2569.385f, 364.3968f, 3.141f}; static const float afRocketSpawnPos[4] = {2746.262f, 2567.085f, 369.2921f, 3.14f}; static const float afAerialSpawnPos[4] = {2744.365f, 2569.303f, 392.2355f, 3.15f}; -static const float afAerialMovePos[3] = {2743.32f, 2569.285f, 380.2812f}; +static const float afAerialMovePos[3] = {2743.32f, 2569.285f, 378.2812f}; static const float afTankMovePos[3] = {2763.82f, 2568.87f, 364.3136f}; static const float afCenterMovePos[3] = {2744.61f, 2569.38f, 364.3136f}; @@ -694,8 +712,18 @@ struct MANGOS_DLL_DECL boss_leviathan_mk2AI : public ScriptedAI uint32 m_uiMountTimer; + uint32 m_uiMinesTimer; + uint32 m_uiNapalmTimer; + uint32 m_uiPlasmaBlastTimer; + uint32 m_uiShockBlastTimer; + void Reset() override { + m_uiMinesTimer = 1000; + m_uiNapalmTimer = 20000; + m_uiPlasmaBlastTimer = 10000; + m_uiShockBlastTimer = 30000; + SetCombatMovement(true); } @@ -712,7 +740,7 @@ struct MANGOS_DLL_DECL boss_leviathan_mk2AI : public ScriptedAI void DamageTaken(Unit* pDoneBy, uint32& uiDamage) override { - if (pDoneBy->GetEntry() == NPC_MIMIRON) + if (pDoneBy->GetEntry() == NPC_MIMIRON && m_uiPhase == PHASE_DAMAGED) return; if (uiDamage >= m_creature->GetHealth()) @@ -837,6 +865,8 @@ struct MANGOS_DLL_DECL boss_leviathan_mk2AI : public ScriptedAI void JustSummoned(Creature* pSummoned) override { + if (pSummoned->GetEntry() == NPC_PROXIMITY_MINE) + pSummoned->CastSpell(pSummoned, SPELL_PROXIMITY_MINE, true); } void UpdateAI(const uint32 uiDiff) override @@ -876,6 +906,48 @@ struct MANGOS_DLL_DECL boss_leviathan_mk2AI : public ScriptedAI if (m_uiPhase == PHASE_TRANSITION || m_uiPhase == PHASE_DAMAGED) return; + // Leviathan phase spells + if (m_uiPhase == PHASE_LEVIATHAN) + { + if (m_uiPlasmaBlastTimer < uiDiff) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (Creature* pTurret = m_pInstance->GetSingleCreatureFromStorage(NPC_LEVIATHAN_MK_TURRET)) + pTurret->CastSpell(pTarget, m_bIsRegularMode ? SPELL_PLASMA_BLAST : SPELL_PLASMA_BLAST_H, false); + + DoScriptText(EMOTE_PLASMA_BLAST, m_creature); + m_uiPlasmaBlastTimer = 30000; + } + } + else + m_uiPlasmaBlastTimer -= uiDiff; + + if (m_uiNapalmTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_NAPALM_SHELL) == CAST_OK) + m_uiNapalmTimer = 7000; + } + else + m_uiNapalmTimer -= uiDiff; + } + + if (m_uiMinesTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_PROXIMITY_MINES) == CAST_OK) + m_uiMinesTimer = 35000; + } + else + m_uiMinesTimer -= uiDiff; + + if (m_uiShockBlastTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_SHOCK_BLAST) == CAST_OK) + m_uiShockBlastTimer = 34000; + } + else + m_uiShockBlastTimer -= uiDiff; + DoMeleeAttackIfReady(); } }; @@ -910,9 +982,22 @@ struct MANGOS_DLL_DECL boss_vx001AI : public ScriptedAI uint32 m_uiMountTimer; uint8 m_uiRocketCount; + uint32 m_uiRocketStrikeTimer; + uint32 m_uiRapidBurstTimer; + uint32 m_uLaserBarrageTimer; + uint32 m_uiHandPulseTimer; + uint32 m_uiBurstEndTimer; + uint32 m_uiLaserEndTimer; + void Reset() override { - m_uiRocketCount = 0; + m_uiRocketCount = 0; + m_uiBurstEndTimer = 0; + m_uiLaserEndTimer = 0; + m_uiRapidBurstTimer = 1000; + m_uiHandPulseTimer = 1000; + m_uiRocketStrikeTimer = 20000; + m_uLaserBarrageTimer = 60000; } void Aggro(Unit* /*pWho*/) override @@ -924,13 +1009,12 @@ struct MANGOS_DLL_DECL boss_vx001AI : public ScriptedAI } // Set levitate for animation purpose - // ToDo: find proper hand animation for final phase. This only works for the second phase m_creature->SetLevitate(true); } void DamageTaken(Unit* pDoneBy, uint32& uiDamage) override { - if (pDoneBy->GetEntry() == NPC_MIMIRON) + if (pDoneBy->GetEntry() == NPC_MIMIRON && m_uiPhase == PHASE_DAMAGED) return; if (uiDamage >= m_creature->GetHealth()) @@ -940,7 +1024,7 @@ struct MANGOS_DLL_DECL boss_vx001AI : public ScriptedAI if (m_uiPhase == PHASE_VX001) { // shut down the VX001 - if (DoCastSpellIfCan(m_creature, SPELL_TORSO_DISABLED) == CAST_OK) + if (DoCastSpellIfCan(m_creature, SPELL_TORSO_DISABLED, CAST_INTERRUPT_PREVIOUS) == CAST_OK) { // start transition phase if (Creature* pMimiron = m_pInstance->GetSingleCreatureFromStorage(NPC_MIMIRON)) @@ -955,6 +1039,7 @@ struct MANGOS_DLL_DECL boss_vx001AI : public ScriptedAI m_creature->CombatStop(); m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + Reset(); m_uiPhase = PHASE_TRANSITION; } } @@ -1017,20 +1102,52 @@ struct MANGOS_DLL_DECL boss_vx001AI : public ScriptedAI { // mount rockets at their seats case NPC_ROCKET_VISUAL: + { int32 iSeat = (int32)m_uiRocketCount + 6; pSummoned->CastCustomSpell(m_creature, SPELL_RIDE_VEHICLE_HARDCODED, &iSeat, NULL, NULL, true); break; + } + case NPC_BURST_TARGET: + pSummoned->CastSpell(m_creature, SPELL_RAPID_BURST_EFFECT, true); + m_uiBurstEndTimer = 3000; + + // Remove the target focus but allow the boss to face the burst target + m_creature->SetTargetGuid(ObjectGuid()); + m_creature->SetFacingToObject(pSummoned); + break; } } - void UpdateAI(const uint32 uiDiff) override + // Custom threat management + bool SelectCustomHostileTarget() { - if (!m_pInstance) + Unit* pTarget = NULL; + Unit* pOldTarget = m_creature->getVictim(); + + if (!m_creature->getThreatManager().isThreatListEmpty()) + pTarget = m_creature->getThreatManager().getHostileTarget(); + + if (pTarget) { - script_error_log("Instance Ulduar: ERROR Failed to load instance data for this instace."); - return; + if (pOldTarget != pTarget && !m_uiBurstEndTimer && !m_uiLaserEndTimer) + AttackStart(pTarget); + + // Set victim to old target (if not while Burst or Laser) + if (pOldTarget && pOldTarget->isAlive() && !m_uiBurstEndTimer && !m_uiLaserEndTimer) + { + m_creature->SetTargetGuid(pOldTarget->GetObjectGuid()); + m_creature->SetInFront(pOldTarget); + } + + return true; } + // Will call EnterEvadeMode if fit + return m_creature->SelectHostileTarget() && m_creature->getVictim(); + } + + void UpdateAI(const uint32 uiDiff) override + { // Mount the Rockets if (m_uiMountTimer) { @@ -1048,14 +1165,81 @@ struct MANGOS_DLL_DECL boss_vx001AI : public ScriptedAI m_uiMountTimer -= uiDiff; } - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + if (!SelectCustomHostileTarget()) return; // no combat during transition or when damaged if (m_uiPhase == PHASE_TRANSITION || m_uiPhase == PHASE_DAMAGED) return; - DoMeleeAttackIfReady(); + // count the burst or laser expire timer for target reset + if (m_uiBurstEndTimer) + { + if (m_uiBurstEndTimer <= uiDiff) + m_uiBurstEndTimer = 0; + else + m_uiBurstEndTimer -= uiDiff; + } + + if (m_uiLaserEndTimer) + { + if (m_uiLaserEndTimer <= uiDiff) + m_uiLaserEndTimer = 0; + else + m_uiLaserEndTimer -= uiDiff; + + // no other abilities during Laser + return; + } + + if (m_uiPhase == PHASE_VX001) + { + if (m_uiRapidBurstTimer < uiDiff) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0, SPELL_RAPID_BURST_SUMMON, SELECT_FLAG_PLAYER)) + { + if (DoCastSpellIfCan(pTarget, SPELL_RAPID_BURST_SUMMON) == CAST_OK) + m_uiRapidBurstTimer = 4000; + } + } + else + m_uiRapidBurstTimer -= uiDiff; + } + else if (m_uiPhase == PHASE_FULL_ROBOT) + { + if (m_uiHandPulseTimer < uiDiff) + { + CanCastResult uiResult; + if (urand(0, 1)) + uiResult = DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_HAND_PULSE_LEFT : SPELL_HAND_PULSE_LEFT_H); + else + uiResult = DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_HAND_PULSE_RIGHT : SPELL_HAND_PULSE_RIGHT_H); + + if (uiResult == CAST_OK) + m_uiHandPulseTimer = urand(1000, 2000); + } + else + m_uiHandPulseTimer -= uiDiff; + } + + if (m_uiRocketStrikeTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_ROCKET_STRIKE) == CAST_OK) + m_uiRocketStrikeTimer = 20000; + } + else + m_uiRocketStrikeTimer -= uiDiff; + + if (m_uLaserBarrageTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_SPINNING_UP) == CAST_OK) + { + m_uiLaserEndTimer = 14000; + m_uLaserBarrageTimer = 40000; + } + } + else + m_uLaserBarrageTimer -= uiDiff; } }; @@ -1084,20 +1268,34 @@ struct MANGOS_DLL_DECL boss_aerial_unitAI : public ScriptedAI bool m_bIsRegularMode; uint8 m_uiPhase; + uint32 m_uiCombatMoveTimer; + uint32 m_uiPlasmaBallTimer; + uint32 m_uiBombBotTimer; + uint32 m_uiAssaultBotTimer; + uint32 m_uiScrapBotTimer; + uint32 m_uiMagneticTimer; + void Reset() override { + m_uiCombatMoveTimer = 2000; + m_uiPlasmaBallTimer = 2000; + m_uiAssaultBotTimer = 5000; + m_uiBombBotTimer = 15000; + m_uiScrapBotTimer = 10000; + m_uiMagneticTimer = 0; + SetCombatMovement(false); } void Aggro(Unit* /*pWho*/) override { m_uiPhase = PHASE_AERIAL_UNIT; - // ToDo: handle air combat movement + m_creature->SetWalk(false); } void DamageTaken(Unit* pDoneBy, uint32& uiDamage) override { - if (pDoneBy->GetEntry() == NPC_MIMIRON) + if (pDoneBy->GetEntry() == NPC_MIMIRON && m_uiPhase == PHASE_DAMAGED) return; if (uiDamage >= m_creature->GetHealth()) @@ -1135,7 +1333,7 @@ struct MANGOS_DLL_DECL boss_aerial_unitAI : public ScriptedAI } } - void SpellHit(Unit* /*pCaster*/, const SpellEntry* pSpell) override + void SpellHit(Unit* pCaster, const SpellEntry* pSpell) override { // self repair succesfull; resume fight if (pSpell->Id == SPELL_SELF_REPAIR) @@ -1143,6 +1341,14 @@ struct MANGOS_DLL_DECL boss_aerial_unitAI : public ScriptedAI m_uiPhase = PHASE_FULL_ROBOT; m_creature->SetStandState(UNIT_STAND_STATE_STAND); } + else if (pSpell->Id == SPELL_MAGNETIC_CORE_PULL && pCaster->GetEntry() == NPC_MAGNETIC_CORE) + { + DoCastSpellIfCan(m_creature, SPELL_MAGNETIC_CORE_VISUAL, CAST_INTERRUPT_PREVIOUS); + m_uiMagneticTimer = 20000; + + m_creature->GetMotionMaster()->Clear(); + m_creature->GetMotionMaster()->MovePoint(0, pCaster->GetPositionX(), pCaster->GetPositionY(), pCaster->GetPositionZ()); + } } void JustReachedHome() override @@ -1174,6 +1380,13 @@ struct MANGOS_DLL_DECL boss_aerial_unitAI : public ScriptedAI void JustSummoned(Creature* pSummoned) override { + if (pSummoned->GetEntry() == NPC_BOMB_BOT) + pSummoned->CastSpell(pSummoned, SPELL_BOMB_BOT, true); + + if (m_pInstance && m_pInstance->GetData(TYPE_MIMIRON_HARD) == DONE) + pSummoned->CastSpell(pSummoned, SPELL_EMERGENCY_MODE, true); + + pSummoned->AI()->AttackStart(m_creature->getVictim()); } void UpdateAI(const uint32 uiDiff) override @@ -1181,9 +1394,89 @@ struct MANGOS_DLL_DECL boss_aerial_unitAI : public ScriptedAI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; + if (m_uiMagneticTimer) + { + if (m_uiMagneticTimer <= uiDiff) + { + m_creature->GetMotionMaster()->Clear(); + m_creature->GetMotionMaster()->MovePoint(0, m_creature->GetPositionX(), m_creature->GetPositionY(), afAerialMovePos[2]); + + m_creature->RemoveAurasDueToSpell(SPELL_MAGNETIC_CORE_VISUAL); + m_uiMagneticTimer = 0; + } + else + m_uiMagneticTimer -= uiDiff; + + // no other abilities during the magnetic pull + return; + } + // no combat during transition or when damaged if (m_uiPhase == PHASE_TRANSITION || m_uiPhase == PHASE_DAMAGED) return; + + // aerial phase spells + if (m_uiPhase == PHASE_AERIAL_UNIT) + { + // move to a closer point to target + if (m_uiCombatMoveTimer < uiDiff) + { + if (m_creature->GetDistance(m_creature->getVictim()) > 30.0f) + { + float fX, fY, fZ; + m_creature->getVictim()->GetContactPoint(m_creature, fX, fY, fZ, 3 * ATTACK_DISTANCE); + + m_creature->GetMotionMaster()->Clear(); + m_creature->GetMotionMaster()->MovePoint(0, fX, fY, m_creature->GetPositionZ()); + } + m_uiCombatMoveTimer = 2000; + } + else + m_uiCombatMoveTimer -= uiDiff; + + if (m_uiPlasmaBallTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), m_bIsRegularMode ? SPELL_PLASMA_BALL_FLY : SPELL_PLASMA_BALL_FLY_H) == CAST_OK) + m_uiPlasmaBallTimer = urand(2000, 3000); + } + else + m_uiPlasmaBallTimer -= uiDiff; + + if (m_uiAssaultBotTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_SUMMON_ASSAULT_BOT_TRIGGER) == CAST_OK) + m_uiAssaultBotTimer = 30000; + } + else + m_uiAssaultBotTimer -= uiDiff; + + if (m_uiBombBotTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_BOMB_BOT_SUMMON) == CAST_OK) + m_uiBombBotTimer = 15000; + } + else + m_uiBombBotTimer -= uiDiff; + + if (m_uiScrapBotTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_SUMMON_SCRAP_BOT_TRIGGER) == CAST_OK) + m_uiScrapBotTimer = 10000; + } + else + m_uiScrapBotTimer -= uiDiff; + } + // full robot abilities + else if (m_uiPhase == PHASE_FULL_ROBOT) + { + if (m_uiPlasmaBallTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), m_bIsRegularMode ? SPELL_PLASMA_BALL : SPELL_PLASMA_BALL_H) == CAST_OK) + m_uiPlasmaBallTimer = 2000; + } + else + m_uiPlasmaBallTimer -= uiDiff; + } } }; @@ -1192,6 +1485,164 @@ CreatureAI* GetAI_boss_aerial_unit(Creature* pCreature) return new boss_aerial_unitAI(pCreature); } +/*###### +## npc_proximity_mine +######*/ + +struct MANGOS_DLL_DECL npc_proximity_mineAI : public Scripted_NoMovementAI +{ + npc_proximity_mineAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { Reset(); } + + uint32 m_uiExplodeTimer; + + void Reset() override + { + m_uiExplodeTimer = 35000; + } + + void AttackStart(Unit* /*pWho*/) override { } + void MoveInLineOfSight(Unit* /*pWho*/) override { } + + void UpdateAI(const uint32 uiDiff) override + { + if (m_uiExplodeTimer) + { + if (m_uiExplodeTimer <= uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_EXPLOSION_H) == CAST_OK) + { + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + m_creature->RemoveAurasDueToSpell(SPELL_PROXIMITY_MINE); + m_creature->ForcedDespawn(2000); + m_uiExplodeTimer = 0; + } + } + else + m_uiExplodeTimer -= uiDiff; + } + } +}; + +CreatureAI* GetAI_npc_proximity_mine(Creature* pCreature) +{ + return new npc_proximity_mineAI(pCreature); +} + +/*###### +## npc_bot_trigger +######*/ + +struct MANGOS_DLL_DECL npc_bot_triggerAI : public Scripted_NoMovementAI +{ + npc_bot_triggerAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) + { + m_pInstance = (instance_ulduar*)pCreature->GetInstanceData(); + Reset(); + } + + instance_ulduar* m_pInstance; + + uint32 m_uiSummonTimer; + uint32 m_uiSummonSpell; + + void Reset() override + { + m_uiSummonTimer = 0; + m_uiSummonSpell = 0; + } + + void AttackStart(Unit* /*pWho*/) override { } + void MoveInLineOfSight(Unit* /*pWho*/) override { } + + void ReceiveAIEvent(AIEventType eventType, Creature* /*pSender*/, Unit* /*pInvoker*/, uint32 uiMiscValue) override + { + if (eventType == AI_EVENT_CUSTOM_A) + { + m_uiSummonTimer = 6000; + m_uiSummonSpell = uiMiscValue; + } + } + + void UpdateAI(const uint32 uiDiff) override + { + if (m_uiSummonTimer) + { + if (m_uiSummonTimer <= uiDiff) + { + if (m_pInstance) + { + if (Creature* pAerial = m_pInstance->GetSingleCreatureFromStorage(NPC_AERIAL_UNIT)) + { + if (DoCastSpellIfCan(m_creature, m_uiSummonSpell, CAST_TRIGGERED, pAerial->GetObjectGuid()) == CAST_OK) + m_uiSummonTimer = 0; + } + } + } + else + m_uiSummonTimer -= uiDiff; + } + } +}; + +CreatureAI* GetAI_npc_bot_trigger(Creature* pCreature) +{ + return new npc_bot_triggerAI(pCreature); +} + +bool EffectDummyCreature_npc_bot_trigger(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget, ObjectGuid /*originalCasterGuid*/) +{ + // always check spellid and effectindex + if ((uiSpellId == SPELL_SUMMON_ASSAULT_BOT_TRIGGER || uiSpellId == SPELL_SUMMON_SCRAP_BOT_TRIGGER || uiSpellId == SPELL_SUMMON_FIRE_BOT_TRIGGER) && uiEffIndex == EFFECT_INDEX_0) + { + uint32 uiVisualSpell = 0; + uint32 uiSummonSpell = 0; + + switch (uiSpellId) + { + case SPELL_SUMMON_SCRAP_BOT_TRIGGER: + uiVisualSpell = SPELL_SUMMON_ASSAULT_BOT_VISUAL; + uiSummonSpell = SPELL_SUMMON_ASSAULT_BOT; + break; + case SPELL_SUMMON_ASSAULT_BOT_TRIGGER: + uiVisualSpell = SPELL_SUMMON_SCRAP_BOT_VISUAL; + uiSummonSpell = SPELL_SUMMON_SCRAP_BOT; + break; + case SPELL_SUMMON_FIRE_BOT_TRIGGER: + uiVisualSpell = SPELL_SUMMON_FIRE_BOT_VISUAL; + uiSummonSpell = SPELL_SUMMON_FIRE_BOT; + break; + } + + pCreatureTarget->CastSpell(pCreatureTarget, uiVisualSpell, true); + pCreatureTarget->AI()->SendAIEvent(AI_EVENT_CUSTOM_A, pCaster, pCreatureTarget, uiSummonSpell); + + // always return true when we are handling this spell and effect + return true; + } + + return false; +} + +/*###### +## boss_leviathan_mk2_turret +######*/ + +// TODO Remove this 'script' when combat can be proper prevented from core-side +struct MANGOS_DLL_DECL boss_leviathan_mk2_turretAI : public Scripted_NoMovementAI +{ + boss_leviathan_mk2_turretAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { Reset(); } + + void Reset() override { } + void AttackStart(Unit* /*pWho*/) override { } + void MoveInLineOfSight(Unit* /*pWho*/) override { } + void UpdateAI(const uint32 /*uiDiff*/) override { } +}; + +CreatureAI* GetAI_boss_leviathan_mk2_turret(Creature* pCreature) +{ + return new boss_leviathan_mk2_turretAI(pCreature); +} + /*###### ## go_big_red_button ######*/ @@ -1238,6 +1689,22 @@ void AddSC_boss_mimiron() pNewScript->GetAI = GetAI_boss_aerial_unit; pNewScript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "npc_proximity_mine"; + pNewScript->GetAI = GetAI_npc_proximity_mine; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_bot_trigger"; + pNewScript->GetAI = GetAI_npc_bot_trigger; + pNewScript->pEffectDummyNPC = &EffectDummyCreature_npc_bot_trigger; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "boss_leviathan_mk2_turret"; + pNewScript->GetAI = GetAI_boss_leviathan_mk2_turret; + pNewScript->RegisterSelf(); + pNewScript = new Script; pNewScript->Name = "go_big_red_button"; pNewScript->pGOUse = &GOUse_go_big_red_button; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 0893e51b1..8ce8c6b58 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2970" + #define SD2_REVISION_NR "2971" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index f9e24934d..b2ae2c326 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -1318,6 +1318,9 @@ UPDATE creature_template SET ScriptName='boss_mimiron' WHERE entry=33350; UPDATE creature_template SET ScriptName='boss_leviathan_mk2' WHERE entry=33432; UPDATE creature_template SET ScriptName='boss_vx001' WHERE entry=33651; UPDATE creature_template SET ScriptName='boss_aerial_unit' WHERE entry=33670; +UPDATE creature_template SET ScriptName='npc_proximity_mine' WHERE entry=34362; +UPDATE creature_template SET ScriptName='npc_bot_trigger' WHERE entry=33856; +UPDATE creature_template SET ScriptName='boss_leviathan_mk2_turret' WHERE entry=34071; UPDATE gameobject_template SET ScriptName='go_big_red_button' WHERE entry=194739; DELETE FROM scripted_event_id WHERE id IN (9735,20907,20964,21030,21031,21032,21033,21045,21605,21606,21620); INSERT INTO scripted_event_id VALUES diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 6cfef62a3..b66e09774 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -3585,7 +3585,7 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1603194,'It would appear that I\'ve made a slight miscalculation. I allowed my mind to be corrupted by the fiend in the prison, overriding my primary directive. All systems seem to be functional now. Clear.',15627,1,0,1,'mimiron SAY_ROBOT_DEATH'), (-1603195,'Combat matrix enhanced. Behold wonderous rapidity!',15630,1,0,0,'mimiron SAY_HELP_YOGG'), -(-1603196,'Leviathan Mk II begins to cast Plasma Blast!',0,3,0,0,'mimiron EMOTE_PLASMA_BLAST'), +(-1603196,'%s begins to cast Plasma Blast!',0,3,0,0,'mimiron EMOTE_PLASMA_BLAST'), (-1603197,'Aaaaaaaaaaaaaaaaa... Help me!!! Please got to help me!',15771,1,0,0,'yogg SAY_SARA_INTRO_1'), (-1603198,'What do you want from me? Leave me alone!',15772,1,0,0,'yogg SAY_SARA_INTRO_2'), diff --git a/sql/updates/r2971_mangos.sql b/sql/updates/r2971_mangos.sql new file mode 100644 index 000000000..0d0a0dec5 --- /dev/null +++ b/sql/updates/r2971_mangos.sql @@ -0,0 +1,3 @@ +UPDATE creature_template SET ScriptName='npc_proximity_mine' WHERE entry=34362; +UPDATE creature_template SET ScriptName='npc_bot_trigger' WHERE entry=33856; +UPDATE creature_template SET ScriptName='boss_leviathan_mk2_turret' WHERE entry=34071; diff --git a/sql/updates/r2971_scriptdev2.sql b/sql/updates/r2971_scriptdev2.sql new file mode 100644 index 000000000..615050c20 --- /dev/null +++ b/sql/updates/r2971_scriptdev2.sql @@ -0,0 +1,3 @@ +DELETE FROM script_texts WHERE entry=-1603196; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1603196,'%s begins to cast Plasma Blast!',0,3,0,0,'mimiron EMOTE_PLASMA_BLAST'); From 41bf36766f27f6fe7f0566e52309220f9b9f89d6 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Tue, 29 Oct 2013 00:15:41 +0200 Subject: [PATCH 0982/1172] [2972] Implement hard mode abilities for Mimiron --- .../northrend/ulduar/ulduar/boss_mimiron.cpp | 493 +++++++++++++++--- .../ulduar/ulduar/instance_ulduar.cpp | 13 +- scripts/northrend/ulduar/ulduar/ulduar.h | 1 + sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 4 + sql/updates/r2972_mangos.sql | 4 + 6 files changed, 439 insertions(+), 78 deletions(-) create mode 100644 sql/updates/r2972_mangos.sql diff --git a/scripts/northrend/ulduar/ulduar/boss_mimiron.cpp b/scripts/northrend/ulduar/ulduar/boss_mimiron.cpp index c792a9e93..86dc0f537 100644 --- a/scripts/northrend/ulduar/ulduar/boss_mimiron.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_mimiron.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: boss_mimiron -SD%Complete: 80% -SDComment: Hard mode abilities NYI. +SD%Complete: 95% +SDComment: Laser Barrage rotation require additional research. SDCategory: Ulduar EndScriptData */ @@ -113,7 +113,7 @@ enum // SPELL_RAPID_BURST_LEFT_H = 64531, // SPELL_RAPID_BURST_RIGHT_H = 64532, // SPELL_LASER_BARRAGE = 63274, - SPELL_SPINNING_UP = 63414, // triggers 63414 and 66490; + SPELL_SPINNING_UP = 63414, // triggers 63274 and 66490; SPELL_ROCKET_STRIKE = 64402, // targets npc 34050; triggers 63681 and 63036 from target; will spawn npc 34047 SPELL_HEAT_WAVE = 63679, SPELL_HEAT_WAVE_H = 64534, @@ -123,7 +123,7 @@ enum SPELL_HAND_PULSE_RIGHT_H = 64537, SPELL_TORSO_DISABLED = 64120, // visual aura on defeat SPELL_FLAME_SUPPRESSANT_CLOSE = 65192, // hard mode spell - SPELL_FROST_BOMB_SUMMON = 64627, // hard mode spell; summon npc 34149 + SPELL_FROST_BOMB_SUMMON = 64623, // hard mode spell; triggers 64627 in order to summon npc 34149 // Aerial unit spells SPELL_PLASMA_BALL_FLY = 63689, // used during the air phase @@ -149,7 +149,8 @@ enum SPELL_EXPLOSION_H = 63009, // bots spells - SPELL_BOMB_BOT = 63767, + // SPELL_BOMB_BOT = 63767, + SPELL_ROCKET_STRIKE_DAMAGE = 64064, // hard mode spells SPELL_SELF_DESTRUCTION = 64613, @@ -164,22 +165,23 @@ enum // frost bomb spells SPELL_EXPLOSION_FROST = 64626, SPELL_FROST_BOMB_VISUAL = 64624, + SPELL_CLEAR_FIRES = 65354, // summoned NPC_PROXIMITY_MINE = 34362, // has aura 65345 NPC_ROCKET_VISUAL = 34050, // mounted on vehicle 33651 NPC_ROCKET_STRIKE = 34047, // has aura 64064 NPC_BURST_TARGET = 34211, // casts 64841 on VX001 which triggers 63382 - NPC_ASSALT_BOT = 34057, - NPC_BOMB_BOT = 33836, // has aura 63767 + NPC_ASSALT_BOT = 34057, // handled in eventAI + NPC_BOMB_BOT = 33836, // has aura 63767; handled in eventAI NPC_MAGNETIC_CORE = 34068, // has auras 64438 and 64436 NPC_JUNK_BOT = 33855, // hard mode summoned - NPC_FLAME_INITIAL = 34363, - NPC_FLAME_SPREAD = 34121, + // NPC_FLAME_INITIAL = 34363, + // NPC_FLAME_SPREAD = 34121, NPC_FROST_BOMB = 34149, - NPC_EMERGENCY_FIRE_BOT = 34147, + // NPC_EMERGENCY_FIRE_BOT = 34147, // handled in eventAI // other POINT_ID_PARK = 1, @@ -247,6 +249,9 @@ static const DialogueEntry aMimironDialogue[] = // a random list of seats which can be used by Mimiron in idle mode static const uint32 aRandomAnimationSpells[] = {SPELL_RIDE_VEHICLE_MIMIRON_0, SPELL_RIDE_VEHICLE_MIMIRON_1, SPELL_RIDE_VEHICLE_MIMIRON_2, SPELL_RIDE_VEHICLE_MIMIRON_4}; +// teleporters +static const uint32 aMimironTeleporters[] = {GO_MIMIRON_TEL1, GO_MIMIRON_TEL2, GO_MIMIRON_TEL3, GO_MIMIRON_TEL4, GO_MIMIRON_TEL5, GO_MIMIRON_TEL6, GO_MIMIRON_TEL7, GO_MIMIRON_TEL8, GO_MIMIRON_TEL9}; + // spawn or move positions static const float afTankEvadePos[4] = {2792.07f, 2596.32f, 364.3136f, 3.5f}; static const float afRobotSpawnPos[4] = {2744.431f, 2569.385f, 364.3968f, 3.141f}; @@ -282,6 +287,8 @@ struct MANGOS_DLL_DECL boss_mimironAI : public ScriptedAI, private DialogueHelpe uint32 m_uiCurrentSeatAura; uint32 m_uiWakeUpTimer; + uint32 m_uiFlamesTimer; + uint32 m_uiBerserkTimer; bool m_bHasDoneIntro; @@ -293,6 +300,8 @@ struct MANGOS_DLL_DECL boss_mimironAI : public ScriptedAI, private DialogueHelpe m_uiWakeUpTimer = 0; m_uiWeldTimer = 1000; m_uiAnimationTimer = 10000; + m_uiFlamesTimer = 0; + m_uiBerserkTimer = 0; m_uiCurrentSeatAura = SPELL_RIDE_VEHICLE_MIMIRON_0; m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_OOC_NOT_ATTACKABLE); @@ -349,6 +358,15 @@ struct MANGOS_DLL_DECL boss_mimironAI : public ScriptedAI, private DialogueHelpe { pLeviathan->RemoveSpellsCausingAura(SPELL_AURA_CONTROL_VEHICLE, m_creature->GetObjectGuid()); DoCastSpellIfCan(pLeviathan, SPELL_RIDE_VEHICLE_MIMIRON_6, CAST_TRIGGERED); + + // hard mode aura + if (m_pInstance->GetData(TYPE_MIMIRON_HARD) == DONE) + { + pLeviathan->CastSpell(pLeviathan, SPELL_EMERGENCY_MODE, true); + pLeviathan->CastSpell(pLeviathan, SPELL_EMERGENCY_MODE_LEVIATHAN, true); + } + + m_uiBerserkTimer = 15 * MINUTE * IN_MILLISECONDS; } break; case NPC_LEVIATHAN_MK: @@ -390,11 +408,16 @@ struct MANGOS_DLL_DECL boss_mimironAI : public ScriptedAI, private DialogueHelpe { pVx001->RemoveSpellsCausingAura(SPELL_AURA_CONTROL_VEHICLE, m_creature->GetObjectGuid()); DoCastSpellIfCan(pVx001, SPELL_RIDE_VEHICLE_MIMIRON_1, CAST_TRIGGERED); + + // hard mode aura + if (m_pInstance->GetData(TYPE_MIMIRON_HARD) == DONE) + pVx001->CastSpell(pVx001, SPELL_EMERGENCY_MODE, true); } break; case SEAT_ID_TURRET: if (Creature* pVx001 = m_pInstance->GetSingleCreatureFromStorage(NPC_VX001)) { + pVx001->SetHealth(pVx001->GetMaxHealth()); pVx001->RemoveAurasDueToSpell(SPELL_FREEZE_ANIM); pVx001->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); pVx001->SetInCombatWithZone(); @@ -421,7 +444,13 @@ struct MANGOS_DLL_DECL boss_mimironAI : public ScriptedAI, private DialogueHelpe if (Creature* pVx001 = m_pInstance->GetSingleCreatureFromStorage(NPC_VX001)) pVx001->RemoveSpellsCausingAura(SPELL_AURA_CONTROL_VEHICLE, m_creature->GetObjectGuid()); if (Creature* pAerial = m_pInstance->GetSingleCreatureFromStorage(NPC_AERIAL_UNIT)) + { DoCastSpellIfCan(pAerial, SPELL_RIDE_VEHICLE_MIMIRON_0, CAST_TRIGGERED); + + // hard mode aura + if (m_pInstance->GetData(TYPE_MIMIRON_HARD) == DONE) + pAerial->CastSpell(pAerial, SPELL_EMERGENCY_MODE, true); + } break; case SAY_HEAD_ACTIVE: m_creature->RemoveAurasDueToSpell(SPELL_JET_PACK_VISUAL); @@ -451,7 +480,7 @@ struct MANGOS_DLL_DECL boss_mimironAI : public ScriptedAI, private DialogueHelpe if (!pLeviathan || !pVx001) return; - pVx001->RemoveAllAurasOnEvade(); + pVx001->RemoveAurasDueToSpell(SPELL_TORSO_DISABLED); pVx001->CastSpell(pLeviathan, SPELL_RIDE_VEHICLE_ROBOT_1, true); break; } @@ -505,6 +534,7 @@ struct MANGOS_DLL_DECL boss_mimironAI : public ScriptedAI, private DialogueHelpe if (Creature* pComputer = m_pInstance->GetSingleCreatureFromStorage(NPC_COMPUTER)) { DoScriptText(SAY_SELF_DESTRUCT_END, pComputer); + m_uiFlamesTimer = 0; m_uiDestructTimer = 0; } } @@ -538,6 +568,7 @@ struct MANGOS_DLL_DECL boss_mimironAI : public ScriptedAI, private DialogueHelpe if (m_pInstance) m_pInstance->SetData(TYPE_MIMIRON, IN_PROGRESS); m_uiDestructTimer = MINUTE * IN_MILLISECONDS; + m_uiFlamesTimer = 7000; break; // Leviathan phase finished case AI_EVENT_CUSTOM_B: @@ -581,6 +612,31 @@ struct MANGOS_DLL_DECL boss_mimironAI : public ScriptedAI, private DialogueHelpe DoCastSpellIfCan(pLeviathan, m_uiCurrentSeatAura, CAST_TRIGGERED); } + // function to trigger the flames explosion for hard mode + void DoSpawnFlamesInitial() + { + if (!m_pInstance) + return; + + Creature* pLeviathan = m_pInstance->GetSingleCreatureFromStorage(NPC_LEVIATHAN_MK); + Creature* pTrigger = m_pInstance->GetSingleCreatureFromStorage(NPC_WORLD_TRIGGER_FLAMES); + if (!pLeviathan || !pTrigger) + return; + + for (uint8 i = 0; i < 3; ++i) + { + // Select targets based on Leviathan threat list; if the Leviathan is not in combat select them using instance + Unit* pTarget; + if (pLeviathan->getVictim()) + pTarget = pLeviathan->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0, SPELL_SUMMON_FLAMES_INITIAL, SELECT_FLAG_PLAYER); + else + pTarget = m_pInstance->GetPlayerInMap(true, false); + + if (pTarget) + pTrigger->CastSpell(pTarget, SPELL_SUMMON_FLAMES_INITIAL, true); + } + } + void UpdateAI(const uint32 uiDiff) override { if (!m_pInstance) @@ -647,6 +703,35 @@ struct MANGOS_DLL_DECL boss_mimironAI : public ScriptedAI, private DialogueHelpe m_uiWakeUpTimer -= uiDiff; } + if (m_uiBerserkTimer) + { + if (m_uiBerserkTimer <= uiDiff) + { + if (Creature* pLeviathan = m_pInstance->GetSingleCreatureFromStorage(NPC_LEVIATHAN_MK)) + pLeviathan->CastSpell(pLeviathan, SPELL_BERSERK, true); + if (Creature* pVx001 = m_pInstance->GetSingleCreatureFromStorage(NPC_VX001, true)) + pVx001->CastSpell(pVx001, SPELL_BERSERK, true); + if (Creature* pAerial = m_pInstance->GetSingleCreatureFromStorage(NPC_AERIAL_UNIT, true)) + pAerial->CastSpell(pAerial, SPELL_BERSERK, true); + + DoScriptText(SAY_BERSERK, m_creature); + m_uiBerserkTimer = 0; + } + else + m_uiBerserkTimer -= uiDiff; + } + + if (m_uiFlamesTimer) + { + if (m_uiFlamesTimer <= uiDiff) + { + DoSpawnFlamesInitial(); + m_uiFlamesTimer = urand(25000, 30000); + } + else + m_uiFlamesTimer -= uiDiff; + } + if (m_uiDestructTimer) { // handle the platform destruction for hard mode @@ -716,6 +801,7 @@ struct MANGOS_DLL_DECL boss_leviathan_mk2AI : public ScriptedAI uint32 m_uiNapalmTimer; uint32 m_uiPlasmaBlastTimer; uint32 m_uiShockBlastTimer; + uint32 m_uiFlameSuppressTimer; void Reset() override { @@ -723,6 +809,7 @@ struct MANGOS_DLL_DECL boss_leviathan_mk2AI : public ScriptedAI m_uiNapalmTimer = 20000; m_uiPlasmaBlastTimer = 10000; m_uiShockBlastTimer = 30000; + m_uiFlameSuppressTimer = 0; SetCombatMovement(true); } @@ -730,6 +817,9 @@ struct MANGOS_DLL_DECL boss_leviathan_mk2AI : public ScriptedAI void Aggro(Unit* /*pWho*/) override { m_uiPhase = PHASE_LEVIATHAN; + + if (m_pInstance && m_pInstance->GetData(TYPE_MIMIRON_HARD) == DONE) + m_uiFlameSuppressTimer = 50000; } void JustDied(Unit* /*pKiller*/) override @@ -767,7 +857,7 @@ struct MANGOS_DLL_DECL boss_leviathan_mk2AI : public ScriptedAI else if (m_uiPhase == PHASE_FULL_ROBOT) { // start self repair - if (DoCastSpellIfCan(m_creature, SPELL_SELF_REPAIR) == CAST_OK) + if (DoCastSpellIfCan(m_creature, SPELL_SELF_REPAIR, CAST_INTERRUPT_PREVIOUS) == CAST_OK) { DoCastSpellIfCan(m_creature, SPELL_VEHICLE_DAMAGED, CAST_TRIGGERED); DoCastSpellIfCan(m_creature, SPELL_FREEZE_ANIM, CAST_TRIGGERED); @@ -930,6 +1020,17 @@ struct MANGOS_DLL_DECL boss_leviathan_mk2AI : public ScriptedAI } else m_uiNapalmTimer -= uiDiff; + + if (m_uiFlameSuppressTimer) + { + if (m_uiFlameSuppressTimer <= uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_FLAME_SUPPRESSANT) == CAST_OK) + m_uiFlameSuppressTimer = 60000; + } + else + m_uiFlameSuppressTimer -= uiDiff; + } } if (m_uiMinesTimer < uiDiff) @@ -969,9 +1070,8 @@ struct MANGOS_DLL_DECL boss_vx001AI : public ScriptedAI m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); DoCastSpellIfCan(m_creature, SPELL_FREEZE_ANIM, CAST_TRIGGERED | CAST_AURA_NOT_PRESENT); - m_uiPhase = PHASE_TRANSITION; + m_uiPhase = PHASE_INTRO; SetCombatMovement(false); - m_uiMountTimer = 1000; Reset(); } @@ -979,37 +1079,43 @@ struct MANGOS_DLL_DECL boss_vx001AI : public ScriptedAI bool m_bIsRegularMode; uint8 m_uiPhase; - uint32 m_uiMountTimer; - uint8 m_uiRocketCount; - uint32 m_uiRocketStrikeTimer; uint32 m_uiRapidBurstTimer; uint32 m_uLaserBarrageTimer; uint32 m_uiHandPulseTimer; uint32 m_uiBurstEndTimer; uint32 m_uiLaserEndTimer; + uint32 m_uiFlameSuppressTimer; + uint32 m_uiFrostBombTimer; void Reset() override { - m_uiRocketCount = 0; m_uiBurstEndTimer = 0; m_uiLaserEndTimer = 0; m_uiRapidBurstTimer = 1000; m_uiHandPulseTimer = 1000; m_uiRocketStrikeTimer = 20000; - m_uLaserBarrageTimer = 60000; + m_uLaserBarrageTimer = urand(30000, 60000); + m_uiFlameSuppressTimer = 0; + m_uiFrostBombTimer = 0; } void Aggro(Unit* /*pWho*/) override { - if (m_uiPhase == PHASE_TRANSITION) + if (m_uiPhase == PHASE_INTRO) { m_uiPhase = PHASE_VX001; DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_HEAT_WAVE : SPELL_HEAT_WAVE_H, CAST_TRIGGERED | CAST_AURA_NOT_PRESENT); + + // Set levitate for animation purpose + m_creature->SetLevitate(true); } - // Set levitate for animation purpose - m_creature->SetLevitate(true); + if (m_pInstance && m_pInstance->GetData(TYPE_MIMIRON_HARD) == DONE) + { + m_uiFrostBombTimer = 1000; + m_uiFlameSuppressTimer = 5000; + } } void DamageTaken(Unit* pDoneBy, uint32& uiDamage) override @@ -1026,6 +1132,9 @@ struct MANGOS_DLL_DECL boss_vx001AI : public ScriptedAI // shut down the VX001 if (DoCastSpellIfCan(m_creature, SPELL_TORSO_DISABLED, CAST_INTERRUPT_PREVIOUS) == CAST_OK) { + Reset(); + m_uiPhase = PHASE_TRANSITION; + // start transition phase if (Creature* pMimiron = m_pInstance->GetSingleCreatureFromStorage(NPC_MIMIRON)) SendAIEvent(AI_EVENT_CUSTOM_C, m_creature, pMimiron); @@ -1034,19 +1143,18 @@ struct MANGOS_DLL_DECL boss_vx001AI : public ScriptedAI DoCastSpellIfCan(m_creature, SPELL_HALF_HEAL, CAST_TRIGGERED); // custom evade in order to properly handle the animations - m_creature->RemoveAllAurasOnEvade(); + // Note: we won't remove all auras because of the hard mode; Debuffs should be removed by the spell above + // m_creature->RemoveAllAurasOnEvade(); + m_creature->RemoveAurasDueToSpell(m_bIsRegularMode ? SPELL_HEAT_WAVE : SPELL_HEAT_WAVE_H); m_creature->DeleteThreatList(); m_creature->CombatStop(); m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - - Reset(); - m_uiPhase = PHASE_TRANSITION; } } else if (m_uiPhase == PHASE_FULL_ROBOT) { // start self repair - if (DoCastSpellIfCan(m_creature, SPELL_SELF_REPAIR) == CAST_OK) + if (DoCastSpellIfCan(m_creature, SPELL_SELF_REPAIR, CAST_INTERRUPT_PREVIOUS) == CAST_OK) { // inform Mimiron about the damaged state if (Creature* pMimiron = m_pInstance->GetSingleCreatureFromStorage(NPC_MIMIRON)) @@ -1059,6 +1167,8 @@ struct MANGOS_DLL_DECL boss_vx001AI : public ScriptedAI } } + void EnterEvadeMode() override {} + void SpellHit(Unit* /*pCaster*/, const SpellEntry* pSpell) override { // self repair succesfull; resume fight @@ -1069,12 +1179,6 @@ struct MANGOS_DLL_DECL boss_vx001AI : public ScriptedAI } } - void JustReachedHome() override - { - if (m_pInstance) - m_pInstance->SetData(TYPE_MIMIRON, FAIL); - } - void KilledUnit(Unit* pVictim) override { if (pVictim->GetTypeId() != TYPEID_PLAYER || !m_pInstance) @@ -1093,20 +1197,18 @@ struct MANGOS_DLL_DECL boss_vx001AI : public ScriptedAI { // switch to full robot abilities if (eventType == AI_EVENT_CUSTOM_A) + { m_uiPhase = PHASE_FULL_ROBOT; + + // Set levitate for animation purpose + m_creature->SetLevitate(true); + } } void JustSummoned(Creature* pSummoned) override { switch (pSummoned->GetEntry()) { - // mount rockets at their seats - case NPC_ROCKET_VISUAL: - { - int32 iSeat = (int32)m_uiRocketCount + 6; - pSummoned->CastCustomSpell(m_creature, SPELL_RIDE_VEHICLE_HARDCODED, &iSeat, NULL, NULL, true); - break; - } case NPC_BURST_TARGET: pSummoned->CastSpell(m_creature, SPELL_RAPID_BURST_EFFECT, true); m_uiBurstEndTimer = 3000; @@ -1115,6 +1217,9 @@ struct MANGOS_DLL_DECL boss_vx001AI : public ScriptedAI m_creature->SetTargetGuid(ObjectGuid()); m_creature->SetFacingToObject(pSummoned); break; + case NPC_FROST_BOMB: + pSummoned->CastSpell(pSummoned, SPELL_FROST_BOMB_VISUAL, true); + break; } } @@ -1148,23 +1253,6 @@ struct MANGOS_DLL_DECL boss_vx001AI : public ScriptedAI void UpdateAI(const uint32 uiDiff) override { - // Mount the Rockets - if (m_uiMountTimer) - { - if (m_uiMountTimer <= uiDiff) - { - for (uint8 i = 0; i < 2; ++i) - { - m_creature->SummonCreature(NPC_ROCKET_VISUAL, afRocketSpawnPos[0], afRocketSpawnPos[1], afRocketSpawnPos[2], afRocketSpawnPos[3], TEMPSUMMON_DEAD_DESPAWN, 0); - ++m_uiRocketCount; - } - - m_uiMountTimer = 0; - } - else - m_uiMountTimer -= uiDiff; - } - if (!SelectCustomHostileTarget()) return; @@ -1204,6 +1292,17 @@ struct MANGOS_DLL_DECL boss_vx001AI : public ScriptedAI } else m_uiRapidBurstTimer -= uiDiff; + + if (m_uiFlameSuppressTimer) + { + if (m_uiFlameSuppressTimer <= uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_FLAME_SUPPRESSANT_CLOSE) == CAST_OK) + m_uiFlameSuppressTimer = 10000; + } + else + m_uiFlameSuppressTimer -= uiDiff; + } } else if (m_uiPhase == PHASE_FULL_ROBOT) { @@ -1239,7 +1338,18 @@ struct MANGOS_DLL_DECL boss_vx001AI : public ScriptedAI } } else - m_uLaserBarrageTimer -= uiDiff; + m_uLaserBarrageTimer -= uiDiff; + + if (m_uiFrostBombTimer) + { + if (m_uiFrostBombTimer <= uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_FROST_BOMB_SUMMON) == CAST_OK) + m_uiFrostBombTimer = 30000; + } + else + m_uiFrostBombTimer -= uiDiff; + } } }; @@ -1273,6 +1383,7 @@ struct MANGOS_DLL_DECL boss_aerial_unitAI : public ScriptedAI uint32 m_uiBombBotTimer; uint32 m_uiAssaultBotTimer; uint32 m_uiScrapBotTimer; + uint32 m_uiFireBotTimer; uint32 m_uiMagneticTimer; void Reset() override @@ -1283,6 +1394,7 @@ struct MANGOS_DLL_DECL boss_aerial_unitAI : public ScriptedAI m_uiBombBotTimer = 15000; m_uiScrapBotTimer = 10000; m_uiMagneticTimer = 0; + m_uiFireBotTimer = 0; SetCombatMovement(false); } @@ -1291,6 +1403,13 @@ struct MANGOS_DLL_DECL boss_aerial_unitAI : public ScriptedAI { m_uiPhase = PHASE_AERIAL_UNIT; m_creature->SetWalk(false); + + // init hard mode spells + if (m_pInstance && m_pInstance->GetData(TYPE_MIMIRON_HARD) == DONE) + { + DoCastSpellIfCan(m_creature, SPELL_SUMMON_FIRE_BOT_TRIGGER); + m_uiFireBotTimer = 45000; + } } void DamageTaken(Unit* pDoneBy, uint32& uiDamage) override @@ -1320,7 +1439,7 @@ struct MANGOS_DLL_DECL boss_aerial_unitAI : public ScriptedAI else if (m_uiPhase == PHASE_FULL_ROBOT) { // start self repair - if (DoCastSpellIfCan(m_creature, SPELL_SELF_REPAIR) == CAST_OK) + if (DoCastSpellIfCan(m_creature, SPELL_SELF_REPAIR, CAST_INTERRUPT_PREVIOUS) == CAST_OK) { // inform Mimiron about the damaged state if (Creature* pMimiron = m_pInstance->GetSingleCreatureFromStorage(NPC_MIMIRON)) @@ -1380,9 +1499,6 @@ struct MANGOS_DLL_DECL boss_aerial_unitAI : public ScriptedAI void JustSummoned(Creature* pSummoned) override { - if (pSummoned->GetEntry() == NPC_BOMB_BOT) - pSummoned->CastSpell(pSummoned, SPELL_BOMB_BOT, true); - if (m_pInstance && m_pInstance->GetData(TYPE_MIMIRON_HARD) == DONE) pSummoned->CastSpell(pSummoned, SPELL_EMERGENCY_MODE, true); @@ -1465,6 +1581,17 @@ struct MANGOS_DLL_DECL boss_aerial_unitAI : public ScriptedAI } else m_uiScrapBotTimer -= uiDiff; + + if (m_uiFireBotTimer) + { + if (m_uiFireBotTimer <= uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_SUMMON_FIRE_BOT_TRIGGER) == CAST_OK) + m_uiFireBotTimer = 45000; + } + else + m_uiFireBotTimer -= uiDiff; + } } // full robot abilities else if (m_uiPhase == PHASE_FULL_ROBOT) @@ -1509,12 +1636,18 @@ struct MANGOS_DLL_DECL npc_proximity_mineAI : public Scripted_NoMovementAI { if (m_uiExplodeTimer <= uiDiff) { - if (DoCastSpellIfCan(m_creature, SPELL_EXPLOSION_H) == CAST_OK) + // just despawn if already exploded + if (!m_creature->HasAura(SPELL_PROXIMITY_MINE)) + m_creature->ForcedDespawn(); + else { - m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - m_creature->RemoveAurasDueToSpell(SPELL_PROXIMITY_MINE); - m_creature->ForcedDespawn(2000); - m_uiExplodeTimer = 0; + if (DoCastSpellIfCan(m_creature, SPELL_EXPLOSION_H) == CAST_OK) + { + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + m_creature->RemoveAurasDueToSpell(SPELL_PROXIMITY_MINE); + m_creature->ForcedDespawn(2000); + m_uiExplodeTimer = 0; + } } } else @@ -1577,6 +1710,16 @@ struct MANGOS_DLL_DECL npc_bot_triggerAI : public Scripted_NoMovementAI m_uiSummonTimer = 0; } } + + // search for a nearby teleporter and disable the visual + for (uint8 i = 0; i < countof(aMimironTeleporters); ++i) + { + if (GameObject* pTeleporter = GetClosestGameObjectWithEntry(m_creature, aMimironTeleporters[i], 2.0f)) + { + pTeleporter->ResetDoorOrButton(); + break; + } + } } else m_uiSummonTimer -= uiDiff; @@ -1616,6 +1759,16 @@ bool EffectDummyCreature_npc_bot_trigger(Unit* pCaster, uint32 uiSpellId, SpellE pCreatureTarget->CastSpell(pCreatureTarget, uiVisualSpell, true); pCreatureTarget->AI()->SendAIEvent(AI_EVENT_CUSTOM_A, pCaster, pCreatureTarget, uiSummonSpell); + // search for a nearby teleporter and enable the visual + for (uint8 i = 0; i < countof(aMimironTeleporters); ++i) + { + if (GameObject* pTeleporter = GetClosestGameObjectWithEntry(pCreatureTarget, aMimironTeleporters[i], 2.0f)) + { + pTeleporter->UseDoorOrButton(); + break; + } + } + // always return true when we are handling this spell and effect return true; } @@ -1623,6 +1776,170 @@ bool EffectDummyCreature_npc_bot_trigger(Unit* pCaster, uint32 uiSpellId, SpellE return false; } +/*###### +## npc_mimiron_flames +######*/ + +struct MANGOS_DLL_DECL npc_mimiron_flamesAI : public Scripted_NoMovementAI +{ + npc_mimiron_flamesAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) + { + m_pInstance = (instance_ulduar*)pCreature->GetInstanceData(); + Reset(); + } + + instance_ulduar* m_pInstance; + uint32 m_uiSpreadTimer; + + void Reset() override + { + DoCastSpellIfCan(m_creature, SPELL_FLAMES, CAST_TRIGGERED | CAST_AURA_NOT_PRESENT); + m_uiSpreadTimer = 4000; + } + + void AttackStart(Unit* /*pWho*/) override { } + void MoveInLineOfSight(Unit* /*pWho*/) override { } + + // function to select the closest player to spread the fire + Unit* SelectClosestSpreadTarget() + { + if (!m_pInstance) + return NULL; + + Creature* pLeviathan = m_pInstance->GetSingleCreatureFromStorage(NPC_LEVIATHAN_MK); + if (!pLeviathan) + return NULL; + + std::list lTargets; + ThreatList const& threatList = pLeviathan->getThreatManager().getThreatList(); + + for (ThreatList::const_iterator itr = threatList.begin(); itr != threatList.end(); ++itr) + { + if (Unit* pTarget = m_creature->GetMap()->GetUnit((*itr)->getUnitGuid())) + { + if (pTarget->GetTypeId() == TYPEID_PLAYER) + lTargets.push_back(pTarget); + } + } + + // return the closest target to the caster + if (!lTargets.empty()) + { + lTargets.sort(ObjectDistanceOrder(m_creature)); + return lTargets.front(); + } + + return NULL; + } + + void UpdateAI(const uint32 uiDiff) override + { + if (m_uiSpreadTimer < uiDiff) + { + if (Unit* pTarget = SelectClosestSpreadTarget()) + { + if (DoCastSpellIfCan(pTarget, SPELL_SUMMON_FLAMES_SPREAD) == CAST_OK) + m_uiSpreadTimer = 4000; + } + } + else + m_uiSpreadTimer -= uiDiff; + } +}; + +CreatureAI* GetAI_npc_mimiron_flames(Creature* pCreature) +{ + return new npc_mimiron_flamesAI(pCreature); +} + +/*###### +## npc_frost_bomb +######*/ + +// TODO Move this 'script' to EventAI when combat can be proper prevented from core-side +struct MANGOS_DLL_DECL npc_frost_bombAI : public Scripted_NoMovementAI +{ + npc_frost_bombAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { Reset(); } + + uint32 m_uiExplosionTimer; + uint32 m_uiFireClearTimer; + + void Reset() override + { + m_uiExplosionTimer = 10000; + m_uiFireClearTimer = 12000; + } + + void AttackStart(Unit* /*pWho*/) override { } + void MoveInLineOfSight(Unit* /*pWho*/) override { } + + void UpdateAI(const uint32 uiDiff) override + { + if (m_uiExplosionTimer) + { + if (m_uiExplosionTimer <= uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_EXPLOSION_FROST) == CAST_OK) + { + m_creature->RemoveAurasDueToSpell(SPELL_FROST_BOMB_VISUAL); + m_uiExplosionTimer = 0; + } + } + else + m_uiExplosionTimer -= uiDiff; + } + + if (m_uiFireClearTimer) + { + if (m_uiFireClearTimer <= uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_CLEAR_FIRES) == CAST_OK) + { + m_creature->ForcedDespawn(2000); + m_uiFireClearTimer = 0; + } + } + else + m_uiFireClearTimer -= uiDiff; + } + } +}; + +CreatureAI* GetAI_npc_frost_bomb(Creature* pCreature) +{ + return new npc_frost_bombAI(pCreature); +} + +/*###### +## npc_rocket_strike +######*/ + +struct MANGOS_DLL_DECL npc_rocket_strikeAI : public Scripted_NoMovementAI +{ + npc_rocket_strikeAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { Reset(); } + + void Reset() override + { + DoCastSpellIfCan(m_creature, SPELL_ROCKET_STRIKE_DAMAGE, CAST_TRIGGERED | CAST_AURA_NOT_PRESENT); + m_creature->ForcedDespawn(7000); + } + + void KilledUnit(Unit* pVictim) override + { + if (pVictim->GetEntry() == NPC_ASSALT_BOT) + DoCastSpellIfCan(m_creature, SPELL_NOT_FRIENDLY_FIRE, CAST_TRIGGERED); + } + + void AttackStart(Unit* /*pWho*/) override { } + void MoveInLineOfSight(Unit* /*pWho*/) override { } + void UpdateAI(const uint32 /*uiDiff*/) override { } +}; + +CreatureAI* GetAI_npc_rocket_strike(Creature* pCreature) +{ + return new npc_rocket_strikeAI(pCreature); +} + /*###### ## boss_leviathan_mk2_turret ######*/ @@ -1643,6 +1960,26 @@ CreatureAI* GetAI_boss_leviathan_mk2_turret(Creature* pCreature) return new boss_leviathan_mk2_turretAI(pCreature); } +/*###### +## npc_computer +######*/ + +// TODO Remove this 'script' when combat can be proper prevented from core-side +struct MANGOS_DLL_DECL npc_computerAI : public Scripted_NoMovementAI +{ + npc_computerAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { Reset(); } + + void Reset() override { } + void AttackStart(Unit* /*pWho*/) override { } + void MoveInLineOfSight(Unit* /*pWho*/) override { } + void UpdateAI(const uint32 /*uiDiff*/) override { } +}; + +CreatureAI* GetAI_npc_computer(Creature* pCreature) +{ + return new npc_computerAI(pCreature); +} + /*###### ## go_big_red_button ######*/ @@ -1660,7 +1997,7 @@ bool GOUse_go_big_red_button(Player* pPlayer, GameObject* pGo) if (Creature* pMimiron = pInstance->GetSingleCreatureFromStorage(NPC_MIMIRON)) pMimiron->AI()->SendAIEvent(AI_EVENT_CUSTOM_A, pPlayer, pMimiron); - // Set instance data and allow DB scripts to continue the event + // Set instance data and allow Mimiron script to continue the event pInstance->SetData(TYPE_MIMIRON_HARD, DONE); return false; } @@ -1700,11 +2037,31 @@ void AddSC_boss_mimiron() pNewScript->pEffectDummyNPC = &EffectDummyCreature_npc_bot_trigger; pNewScript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "npc_mimiron_flames"; + pNewScript->GetAI = GetAI_npc_mimiron_flames; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_frost_bomb"; + pNewScript->GetAI = GetAI_npc_frost_bomb; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_rocket_strike"; + pNewScript->GetAI = GetAI_npc_rocket_strike; + pNewScript->RegisterSelf(); + pNewScript = new Script; pNewScript->Name = "boss_leviathan_mk2_turret"; pNewScript->GetAI = GetAI_boss_leviathan_mk2_turret; pNewScript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "npc_computer"; + pNewScript->GetAI = GetAI_npc_computer; + pNewScript->RegisterSelf(); + pNewScript = new Script; pNewScript->Name = "go_big_red_button"; pNewScript->pGOUse = &GOUse_go_big_red_button; diff --git a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp index d5ca10d9d..f5c012852 100644 --- a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp +++ b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp @@ -164,6 +164,7 @@ void instance_ulduar::OnCreatureCreate(Creature* pCreature) case NPC_COMPUTER: case NPC_VX001: case NPC_AERIAL_UNIT: + case NPC_WORLD_TRIGGER_FLAMES: case NPC_RUNIC_COLOSSUS: case NPC_RUNE_GIANT: case NPC_SIF: @@ -324,15 +325,6 @@ void instance_ulduar::OnObjectCreate(GameObject* pGo) case GO_MIMIRON_DOOR_2: case GO_MIMIRON_DOOR_3: case GO_MIMIRON_ELEVATOR: - case GO_MIMIRON_TEL1: - case GO_MIMIRON_TEL2: - case GO_MIMIRON_TEL3: - case GO_MIMIRON_TEL4: - case GO_MIMIRON_TEL5: - case GO_MIMIRON_TEL6: - case GO_MIMIRON_TEL7: - case GO_MIMIRON_TEL8: - case GO_MIMIRON_TEL9: // Thorim case GO_DARK_IRON_PORTCULIS: case GO_RUNED_STONE_DOOR: @@ -605,7 +597,10 @@ void instance_ulduar::SetData(uint32 uiType, uint32 uiData) // reset vehicles if (Creature* pLeviathan = GetSingleCreatureFromStorage(NPC_LEVIATHAN_MK)) + { pLeviathan->RemoveSpellsCausingAura(SPELL_AURA_CONTROL_VEHICLE); + pLeviathan->AI()->EnterEvadeMode(); + } if (Creature* pVx001 = GetSingleCreatureFromStorage(NPC_VX001, true)) { pVx001->RemoveSpellsCausingAura(SPELL_AURA_CONTROL_VEHICLE); diff --git a/scripts/northrend/ulduar/ulduar/ulduar.h b/scripts/northrend/ulduar/ulduar/ulduar.h index 85204a888..f8a1f5f99 100644 --- a/scripts/northrend/ulduar/ulduar/ulduar.h +++ b/scripts/northrend/ulduar/ulduar/ulduar.h @@ -162,6 +162,7 @@ enum NPC_AERIAL_UNIT = 33670, NPC_COMPUTER = 34143, NPC_BOT_SUMMON_TRIGGER = 33856, + NPC_WORLD_TRIGGER_FLAMES = 21252, // The descent into madness NPC_VEZAX = 33271, diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 8ce8c6b58..4a142f08f 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2971" + #define SD2_REVISION_NR "2972" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index b2ae2c326..18db87159 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -1320,7 +1320,11 @@ UPDATE creature_template SET ScriptName='boss_vx001' WHERE entry=33651; UPDATE creature_template SET ScriptName='boss_aerial_unit' WHERE entry=33670; UPDATE creature_template SET ScriptName='npc_proximity_mine' WHERE entry=34362; UPDATE creature_template SET ScriptName='npc_bot_trigger' WHERE entry=33856; +UPDATE creature_template SET ScriptName='npc_rocket_strike' WHERE entry=34047; +UPDATE creature_template SET ScriptName='npc_frost_bomb' WHERE entry=34149; +UPDATE creature_template SET ScriptName='npc_mimiron_flames' WHERE entry IN (34363,34121); UPDATE creature_template SET ScriptName='boss_leviathan_mk2_turret' WHERE entry=34071; +UPDATE creature_template SET ScriptName='npc_computer' WHERE entry=34143; UPDATE gameobject_template SET ScriptName='go_big_red_button' WHERE entry=194739; DELETE FROM scripted_event_id WHERE id IN (9735,20907,20964,21030,21031,21032,21033,21045,21605,21606,21620); INSERT INTO scripted_event_id VALUES diff --git a/sql/updates/r2972_mangos.sql b/sql/updates/r2972_mangos.sql new file mode 100644 index 000000000..c301b03a5 --- /dev/null +++ b/sql/updates/r2972_mangos.sql @@ -0,0 +1,4 @@ +UPDATE creature_template SET ScriptName='npc_rocket_strike' WHERE entry=34047; +UPDATE creature_template SET ScriptName='npc_mimiron_flames' WHERE entry IN (34363,34121); +UPDATE creature_template SET ScriptName='npc_computer' WHERE entry=34143; +UPDATE creature_template SET ScriptName='npc_frost_bomb' WHERE entry=34149; From 1524516dd980839969185efe5eb370f78f1548d0 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Wed, 30 Oct 2013 10:45:44 +0200 Subject: [PATCH 0983/1172] [2973] Fix and improve Culling of Stratholme intro event --- .../culling_of_stratholme.cpp | 59 +++++-- .../culling_of_stratholme.h | 29 +++- .../instance_culling_of_stratholme.cpp | 151 +++++++++++++----- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 5 +- sql/scriptdev2_script_full.sql | 7 +- sql/updates/r2973_mangos.sql | 4 + sql/updates/r2973_scriptdev2.sql | 9 ++ 8 files changed, 198 insertions(+), 68 deletions(-) create mode 100644 sql/updates/r2973_mangos.sql create mode 100644 sql/updates/r2973_scriptdev2.sql diff --git a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.cpp b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.cpp index 63bd45d37..20cd1f09e 100644 --- a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.cpp +++ b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: culling_of_stratholme -SD%Complete: 5% -SDComment: Placeholder +SD%Complete: 20% +SDComment: Only intro events are supported. SDCategory: Culling of Stratholme EndScriptData */ @@ -47,11 +47,14 @@ enum GOSSIP_ITEM_INN_1 = -3595003, GOSSIP_ITEM_INN_2 = -3595004, GOSSIP_ITEM_INN_3 = -3595005, + GOSSIP_ITEM_INN_SKIP = -3595006, // used to skip the intro; requires research + GOSSIP_ITEM_INN_TELEPORT = -3595007, // teleport to stratholme - used after the main event has started TEXT_ID_INN_1 = 12939, TEXT_ID_INN_2 = 12949, TEXT_ID_INN_3 = 12950, TEXT_ID_INN_4 = 12952, + TEXT_ID_INN_TELEPORT = 13470, }; bool GossipHello_npc_chromie(Player* pPlayer, Creature* pCreature) @@ -129,7 +132,7 @@ bool GossipSelect_npc_chromie(Player* pPlayer, Creature* pCreature, uint32 /*sen if (instance_culling_of_stratholme* pInstance = (instance_culling_of_stratholme*)pCreature->GetInstanceData()) { if (pInstance->GetData(TYPE_ARTHAS_INTRO_EVENT) == NOT_STARTED) - pInstance->DoSpawnArthasIfNeeded(); + pInstance->DoSpawnArthasIfNeeded(pPlayer); } break; } @@ -138,7 +141,7 @@ bool GossipSelect_npc_chromie(Player* pPlayer, Creature* pCreature, uint32 /*sen return true; } -bool QuestAccept_npc_chromie(Player* /*pPlayer*/, Creature* pCreature, const Quest* pQuest) +bool QuestAccept_npc_chromie(Player* pPlayer, Creature* pCreature, const Quest* pQuest) { switch (pQuest->GetQuestId()) { @@ -153,7 +156,7 @@ bool QuestAccept_npc_chromie(Player* /*pPlayer*/, Creature* pCreature, const Que if (instance_culling_of_stratholme* pInstance = (instance_culling_of_stratholme*)pCreature->GetInstanceData()) { if (pInstance->GetData(TYPE_ARTHAS_INTRO_EVENT) == NOT_STARTED) - pInstance->DoSpawnArthasIfNeeded(); + pInstance->DoSpawnArthasIfNeeded(pPlayer); } break; } @@ -166,6 +169,8 @@ bool QuestAccept_npc_chromie(Player* /*pPlayer*/, Creature* pCreature, const Que enum { + SAY_SOLDIERS_REPORT = -1595000, + SPELL_ARCANE_DISRUPTION = 49590, SPELL_CRATES_KILL_CREDIT = 58109, }; @@ -176,6 +181,9 @@ bool EffectAuraDummy_spell_aura_dummy_npc_crates_dummy(const Aura* pAura, bool b { if (Creature* pTarget = (Creature*)pAura->GetTarget()) { + if (pTarget->GetEntry() != NPC_GRAIN_CRATE_HELPER) + return true; + std::list lCrateBunnyList; if (instance_culling_of_stratholme* pInstance = (instance_culling_of_stratholme*)pTarget->GetInstanceData()) { @@ -185,40 +193,63 @@ bool EffectAuraDummy_spell_aura_dummy_npc_crates_dummy(const Aura* pAura, bool b { ++i; if (*itr == pTarget) + { + // check if the event can proceed + if (!pInstance->CanGrainEventProgress(pTarget)) + return true; + break; + } } switch (i) { case 1: // Start NPC_ROGER_OWENS Event + if (Creature* pRoger = pInstance->GetSingleCreatureFromStorage(NPC_ROGER_OWENS)) + { + pRoger->SetStandState(UNIT_STAND_STATE_STAND); + pRoger->GetMotionMaster()->MoveWaypoint(); + } break; case 2: // Start NPC_SERGEANT_MORIGAN Event + if (Creature* pMorigan = pInstance->GetSingleCreatureFromStorage(NPC_SERGEANT_MORIGAN)) + pMorigan->GetMotionMaster()->MoveWaypoint(); break; case 3: // Start NPC_JENA_ANDERSON Event + if (Creature* pJena = pInstance->GetSingleCreatureFromStorage(NPC_JENA_ANDERSON)) + pJena->GetMotionMaster()->MoveWaypoint(); break; case 4: // Start NPC_MALCOM_MOORE Event + pTarget->SummonCreature(NPC_MALCOM_MOORE, 1605.452f, 804.9279f, 122.961f, 5.19f, TEMPSUMMON_DEAD_DESPAWN, 0); break; case 5: // Start NPC_BARTLEBY_BATTSON Event + if (Creature* pBartleby = pInstance->GetSingleCreatureFromStorage(NPC_BARTLEBY_BATTSON)) + pBartleby->GetMotionMaster()->MoveWaypoint(); break; } - if (pInstance->GetData(TYPE_GRAIN_EVENT) != DONE) + // Finished event, give killcredit + if (pInstance->GetData(TYPE_GRAIN_EVENT) == DONE) { - pInstance->SetData(TYPE_GRAIN_EVENT, IN_PROGRESS); - - // Finished event, give killcredit - if (pInstance->GetData(TYPE_GRAIN_EVENT) == DONE) - pTarget->CastSpell(pTarget, SPELL_CRATES_KILL_CREDIT, true); + pTarget->CastSpell(pTarget, SPELL_CRATES_KILL_CREDIT, true); + pInstance->DoOrSimulateScriptTextForThisInstance(SAY_SOLDIERS_REPORT, NPC_LORDAERON_CRIER); } - // pTarget->ForcedDespawn(); // direct despawn has influence on visual effects, - // but despawning makes it impossible to multi-use the spell at the same place - // perhaps some add. GO-Visual + // despawn the GO visuals and spanw the plague crate + if (GameObject* pCrate = GetClosestGameObjectWithEntry(pTarget, GO_SUSPICIOUS_GRAIN_CRATE, 5.0f)) + pCrate->SetLootState(GO_JUST_DEACTIVATED); + if (GameObject* pHighlight = GetClosestGameObjectWithEntry(pTarget, GO_CRATE_HIGHLIGHT, 5.0f)) + pHighlight->SetLootState(GO_JUST_DEACTIVATED); + if (GameObject* pCrate = GetClosestGameObjectWithEntry(pTarget, GO_PLAGUE_GRAIN_CRATE, 5.0f)) + { + pCrate->SetRespawnTime(6 * HOUR * IN_MILLISECONDS); + pCrate->Refresh(); + } } } } diff --git a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.h b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.h index b6a976d82..ae473a229 100644 --- a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.h +++ b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.h @@ -47,7 +47,8 @@ enum NPC_JENA_ANDERSON = 27885, NPC_MALCOM_MOORE = 27891, // Not (yet?) spawned NPC_BARTLEBY_BATTSON = 27907, - NPC_CRATES_BUNNY = 30996, + NPC_GRAIN_CRATE_HELPER = 27827, + // NPC_CRATES_BUNNY = 30996, // Intro Event NPCs NPC_LORDAERON_FOOTMAN = 27745, @@ -75,7 +76,11 @@ enum // Gameobjects GO_DOOR_BOOKCASE = 188686, GO_DARK_RUNED_CHEST = 190663, - GO_DARK_RUNED_CHEST_H = 193597, + GO_DARK_RUNED_CHEST_H = 193597, + + GO_SUSPICIOUS_GRAIN_CRATE = 190094, + GO_CRATE_HIGHLIGHT = 190117, + GO_PLAGUE_GRAIN_CRATE = 190095, // World States WORLD_STATE_CRATES = 3479, @@ -117,6 +122,7 @@ class MANGOS_DLL_DECL instance_culling_of_stratholme : public ScriptedInstance void Initialize() override; + void OnPlayerEnter(Player* pPlayer) override; void OnCreatureCreate(Creature* pCreature) override; void OnObjectCreate(GameObject* pGo) override; @@ -134,18 +140,23 @@ class MANGOS_DLL_DECL instance_culling_of_stratholme : public ScriptedInstance void GetCratesBunnyOrderedList(std::list& lList); Creature* GetStratIntroFootman(); void GetResidentOrderedList(std::list& lList); - void DoSpawnArthasIfNeeded(); - void DoSpawnChromieIfNeeded(); - uint8 GetInstancePosition(); - void ArthasJustDied(); + + void DoSpawnArthasIfNeeded(Unit* pSummoner); + bool CanGrainEventProgress(Creature* pCrate); + + void DoEventAtTriggerIfCan(uint32 uiTriggerId); protected: - void OnPlayerEnter(Player* pPlayer) override; - void DoChromieHurrySpeech(); + void DoChromieWhisper(int32 iEntry); + void DoSpawnChromieIfNeeded(Unit* pSummoner); + uint8 GetInstancePosition(); + void ArthasJustDied(); uint32 m_auiEncounter[MAX_ENCOUNTER]; std::string m_strInstData; + bool m_bStartedInnEvent; + uint8 m_uiGrainCrateCount; uint32 m_uiRemoveCrateStateTimer; uint32 m_uiArthasRespawnTimer; @@ -156,6 +167,8 @@ class MANGOS_DLL_DECL instance_culling_of_stratholme : public ScriptedInstance GuidList m_lAgiatedCitizenGUIDList; GuidList m_lAgiatedResidentGUIDList; + + GuidSet m_sGrainCratesGuidSet; }; #endif diff --git a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/instance_culling_of_stratholme.cpp b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/instance_culling_of_stratholme.cpp index d6be1a6f8..baf9911d4 100644 --- a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/instance_culling_of_stratholme.cpp +++ b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/instance_culling_of_stratholme.cpp @@ -26,8 +26,11 @@ EndScriptData */ enum { - MAX_ARTHAS_SPAWN_POS = 5, - SAY_CHROMIE_HURRY = -1000000 // TODO + MAX_ARTHAS_SPAWN_POS = 5, + MAX_GRAIN_CRATES = 5, + SAY_CHROMIE_HURRY = -1000000, // TODO + + WHISPER_CHROMIE_CRATES = -1595001, }; struct sSpawnLocation @@ -47,12 +50,13 @@ static sSpawnLocation m_aArthasSpawnLocs[] = // need tuning static sSpawnLocation m_aChromieSpawnLocs[] = // need tuning, escpecially EndPositions! { {1814.46f, 1283.97f, 142.30f, 4.32f}, // near bridge - {2311.0f, 1502.4f, 127.9f, 0.0f}, // End + {2319.562f, 1506.409f, 152.0499f, 3.78f}, // End {1811.52f, 1285.92f, 142.37f, 4.47f}, // Hourglass, near bridge {2186.42f, 1323.77f, 129.91f, 0.0f}, // Hourglass, End }; instance_culling_of_stratholme::instance_culling_of_stratholme(Map* pMap) : ScriptedInstance(pMap), + m_bStartedInnEvent(false), m_uiGrainCrateCount(0), m_uiRemoveCrateStateTimer(0), m_uiArthasRespawnTimer(0) @@ -89,7 +93,7 @@ void instance_culling_of_stratholme::OnCreatureCreate(Creature* pCreature) m_mNpcEntryGuidStore[pCreature->GetEntry()] = pCreature->GetObjectGuid(); break; - case NPC_CRATES_BUNNY: m_luiCratesBunnyGUIDs.push_back(pCreature->GetObjectGuid()); break; + case NPC_GRAIN_CRATE_HELPER: m_luiCratesBunnyGUIDs.push_back(pCreature->GetObjectGuid()); break; case NPC_LORDAERON_FOOTMAN: m_luiFootmanGUIDs.push_back(pCreature->GetObjectGuid()); break; case NPC_STRATHOLME_CITIZEN: @@ -122,7 +126,7 @@ void instance_culling_of_stratholme::OnObjectCreate(GameObject* pGo) m_mGoEntryGuidStore[pGo->GetEntry()] = pGo->GetObjectGuid(); } -void instance_culling_of_stratholme::DoChromieHurrySpeech() +void instance_culling_of_stratholme::DoChromieWhisper(int32 iEntry) { if (Creature* pChromie = GetSingleCreatureFromStorage(NPC_CHROMIE_ENTRANCE)) { @@ -132,7 +136,7 @@ void instance_culling_of_stratholme::DoChromieHurrySpeech() for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr) { if (Player* pPlayer = itr->getSource()) - DoScriptText(SAY_CHROMIE_HURRY, pChromie, pPlayer); + DoScriptText(iEntry, pChromie, pPlayer); } } } @@ -148,13 +152,14 @@ void instance_culling_of_stratholme::SetData(uint32 uiType, uint32 uiData) DoUpdateWorldState(WORLD_STATE_CRATES, 1); else if (uiData == IN_PROGRESS) { - if (m_uiGrainCrateCount >= 5) + // safety check + if (m_uiGrainCrateCount >= MAX_GRAIN_CRATES) return; ++m_uiGrainCrateCount; DoUpdateWorldState(WORLD_STATE_CRATES_COUNT, m_uiGrainCrateCount); - if (m_uiGrainCrateCount == 5) + if (m_uiGrainCrateCount == MAX_GRAIN_CRATES) { m_uiRemoveCrateStateTimer = 20000; SetData(TYPE_GRAIN_EVENT, DONE); @@ -184,8 +189,11 @@ void instance_culling_of_stratholme::SetData(uint32 uiType, uint32 uiData) m_auiEncounter[uiType] = uiData; if (uiData == DONE) { + DoToggleGameObjectFlags(instance->IsRegularDifficulty() ? GO_DARK_RUNED_CHEST : GO_DARK_RUNED_CHEST_H, GO_FLAG_NO_INTERACT, false); DoRespawnGameObject(instance->IsRegularDifficulty() ? GO_DARK_RUNED_CHEST : GO_DARK_RUNED_CHEST_H, 30 * MINUTE); - DoSpawnChromieIfNeeded(); + + if (Player* pPlayer = GetPlayerInMap()) + DoSpawnChromieIfNeeded(pPlayer); } break; case TYPE_INFINITE_CORRUPTER_TIME: @@ -211,7 +219,7 @@ void instance_culling_of_stratholme::SetData(uint32 uiType, uint32 uiData) SetData(TYPE_INFINITE_CORRUPTER_TIME, 0); break; case SPECIAL: - DoChromieHurrySpeech(); + DoChromieWhisper(SAY_CHROMIE_HURRY); break; case FAIL: SetData(TYPE_INFINITE_CORRUPTER_TIME, 0); @@ -269,31 +277,29 @@ void instance_culling_of_stratholme::Load(const char* chrIn) OUT_LOAD_INST_DATA_COMPLETE; } -void instance_culling_of_stratholme::OnPlayerEnter(Player* /*pPlayer*/) +void instance_culling_of_stratholme::OnPlayerEnter(Player* pPlayer) { - if (instance->GetPlayersCountExceptGMs() == 0) - { - DoSpawnArthasIfNeeded(); - DoSpawnChromieIfNeeded(); + // spawn Chromie and Arthas + DoSpawnArthasIfNeeded(pPlayer); + DoSpawnChromieIfNeeded(pPlayer); - // Show World States if needed, TODO verify if needed and if this is the right way - if (m_auiEncounter[TYPE_GRAIN_EVENT] == IN_PROGRESS || m_auiEncounter[TYPE_GRAIN_EVENT] == SPECIAL) - DoUpdateWorldState(WORLD_STATE_CRATES, 1); // Show Crates Counter - else - DoUpdateWorldState(WORLD_STATE_CRATES, 0); // Remove Crates Counter + // Show World States if needed + if (m_auiEncounter[TYPE_GRAIN_EVENT] == IN_PROGRESS || m_auiEncounter[TYPE_GRAIN_EVENT] == SPECIAL) + pPlayer->SendUpdateWorldState(WORLD_STATE_CRATES, 1); // Show Crates Counter + else + pPlayer->SendUpdateWorldState(WORLD_STATE_CRATES, 0); // Remove Crates Counter - if (m_auiEncounter[TYPE_MEATHOOK_EVENT] == IN_PROGRESS) - DoUpdateWorldState(WORLD_STATE_WAVE, 1); // Add WaveCounter - else if (m_auiEncounter[TYPE_SALRAMM_EVENT] == IN_PROGRESS) - DoUpdateWorldState(WORLD_STATE_WAVE, 6); // Add WaveCounter - else - DoUpdateWorldState(WORLD_STATE_WAVE, 0); // Remove WaveCounter + if (m_auiEncounter[TYPE_MEATHOOK_EVENT] == IN_PROGRESS) + pPlayer->SendUpdateWorldState(WORLD_STATE_WAVE, 1); // Add WaveCounter + else if (m_auiEncounter[TYPE_SALRAMM_EVENT] == IN_PROGRESS) + pPlayer->SendUpdateWorldState(WORLD_STATE_WAVE, 6); // Add WaveCounter + else + pPlayer->SendUpdateWorldState(WORLD_STATE_WAVE, 0); // Remove WaveCounter - if (m_auiEncounter[TYPE_INFINITE_CORRUPTER_TIME]) - DoUpdateWorldState(WORLD_STATE_TIME, 1); // Show Timer - else - DoUpdateWorldState(WORLD_STATE_TIME, 0); // Remove Timer - } + if (m_auiEncounter[TYPE_INFINITE_CORRUPTER_TIME]) + pPlayer->SendUpdateWorldState(WORLD_STATE_TIME, 1); // Show Timer + else + pPlayer->SendUpdateWorldState(WORLD_STATE_TIME, 0); // Remove Timer } uint32 instance_culling_of_stratholme::GetData(uint32 uiType) const @@ -334,6 +340,7 @@ static bool sortFromSouthToNorth(Creature* pFirst, Creature* pSecond) return pFirst && pSecond && pFirst->GetPositionX() < pSecond->GetPositionX(); } +// return the ordered list of Grain Crate Helpers void instance_culling_of_stratholme::GetCratesBunnyOrderedList(std::list& lList) { std::list lCratesBunnyList; @@ -387,39 +394,73 @@ void instance_culling_of_stratholme::ArthasJustDied() m_uiArthasRespawnTimer = 10000; // TODO, could be instant } -void instance_culling_of_stratholme::DoSpawnArthasIfNeeded() +void instance_culling_of_stratholme::DoSpawnArthasIfNeeded(Unit* pSummoner) { + if (!pSummoner) + return; + Creature* pArthas = GetSingleCreatureFromStorage(NPC_ARTHAS, true); if (pArthas && pArthas->isAlive()) return; uint8 uiPosition = GetInstancePosition(); if (uiPosition && uiPosition <= MAX_ARTHAS_SPAWN_POS) - { - if (Player* pPlayer = GetPlayerInMap()) - pPlayer->SummonCreature(NPC_ARTHAS, m_aArthasSpawnLocs[uiPosition - 1].m_fX, m_aArthasSpawnLocs[uiPosition - 1].m_fY, m_aArthasSpawnLocs[uiPosition - 1].m_fZ, m_aArthasSpawnLocs[uiPosition - 1].m_fO, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10000); - } + pSummoner->SummonCreature(NPC_ARTHAS, m_aArthasSpawnLocs[uiPosition - 1].m_fX, m_aArthasSpawnLocs[uiPosition - 1].m_fY, m_aArthasSpawnLocs[uiPosition - 1].m_fZ, m_aArthasSpawnLocs[uiPosition - 1].m_fO, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10000); } // Atm here only new Chromies are spawned - despawning depends on Mangos featuring such a thing // The hourglass also is not yet spawned/ relocated. -void instance_culling_of_stratholme::DoSpawnChromieIfNeeded() +void instance_culling_of_stratholme::DoSpawnChromieIfNeeded(Unit* pSummoner) { - Player* pPlayer = GetPlayerInMap(); - if (!pPlayer) + if (!pSummoner) return; if (GetInstancePosition() == POS_INSTANCE_FINISHED) { Creature* pChromie = GetSingleCreatureFromStorage(NPC_CHROMIE_END, true); if (!pChromie) - pPlayer->SummonCreature(NPC_CHROMIE_END, m_aChromieSpawnLocs[1].m_fX, m_aChromieSpawnLocs[1].m_fY, m_aChromieSpawnLocs[1].m_fZ, m_aChromieSpawnLocs[1].m_fO, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10000); + pSummoner->SummonCreature(NPC_CHROMIE_END, m_aChromieSpawnLocs[1].m_fX, m_aChromieSpawnLocs[1].m_fY, m_aChromieSpawnLocs[1].m_fZ, m_aChromieSpawnLocs[1].m_fO, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10000); } else if (GetInstancePosition() >= POS_ARTHAS_INTRO) { Creature* pChromie = GetSingleCreatureFromStorage(NPC_CHROMIE_ENTRANCE, true); if (!pChromie) - pPlayer->SummonCreature(NPC_CHROMIE_ENTRANCE, m_aChromieSpawnLocs[0].m_fX, m_aChromieSpawnLocs[0].m_fY, m_aChromieSpawnLocs[0].m_fZ, m_aChromieSpawnLocs[0].m_fO, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10000); + pSummoner->SummonCreature(NPC_CHROMIE_ENTRANCE, m_aChromieSpawnLocs[0].m_fX, m_aChromieSpawnLocs[0].m_fY, m_aChromieSpawnLocs[0].m_fZ, m_aChromieSpawnLocs[0].m_fO, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10000); + } +} + +// Function to check if the grain event can progress +bool instance_culling_of_stratholme::CanGrainEventProgress(Creature* pCrate) +{ + if (!pCrate) + return false; + + if (m_sGrainCratesGuidSet.find(pCrate->GetObjectGuid()) != m_sGrainCratesGuidSet.end()) + return false; + + if (GetData(TYPE_GRAIN_EVENT) != DONE) + SetData(TYPE_GRAIN_EVENT, IN_PROGRESS); + + m_sGrainCratesGuidSet.insert(pCrate->GetObjectGuid()); + return true; +} + +void instance_culling_of_stratholme::DoEventAtTriggerIfCan(uint32 uiTriggerId) +{ + switch (uiTriggerId) + { + case AREATRIGGER_INN: + if (m_bStartedInnEvent) + return; + + // start dialogue + if (Creature* pMichael = GetSingleCreatureFromStorage(NPC_MICHAEL_BELFAST)) + { + pMichael->SetStandState(UNIT_STAND_STATE_STAND); + pMichael->GetMotionMaster()->MoveWaypoint(); + } + m_bStartedInnEvent = true; + break; } } @@ -448,8 +489,11 @@ void instance_culling_of_stratholme::Update(uint32 uiDiff) { if (m_uiRemoveCrateStateTimer <= uiDiff) { + if (Player* pPlayer = GetPlayerInMap()) + DoSpawnChromieIfNeeded(pPlayer); + DoUpdateWorldState(WORLD_STATE_CRATES, 0); - DoSpawnChromieIfNeeded(); + DoChromieWhisper(WHISPER_CHROMIE_CRATES); m_uiRemoveCrateStateTimer = 0; } else @@ -461,7 +505,9 @@ void instance_culling_of_stratholme::Update(uint32 uiDiff) { if (m_uiArthasRespawnTimer <= uiDiff) { - DoSpawnArthasIfNeeded(); + if (Player* pPlayer = GetPlayerInMap()) + DoSpawnArthasIfNeeded(pPlayer); + m_uiArthasRespawnTimer = 0; } else @@ -474,6 +520,20 @@ InstanceData* GetInstanceData_instance_culling_of_stratholme(Map* pMap) return new instance_culling_of_stratholme(pMap); } +bool AreaTrigger_at_culling_of_stratholme(Player* pPlayer, AreaTriggerEntry const* pAt) +{ + if (pAt->id == AREATRIGGER_INN) + { + if (pPlayer->isGameMaster() || pPlayer->isDead()) + return false; + + if (instance_culling_of_stratholme* pInstance = (instance_culling_of_stratholme*)pPlayer->GetInstanceData()) + pInstance->DoEventAtTriggerIfCan(pAt->id); + } + + return false; +} + void AddSC_instance_culling_of_stratholme() { Script* pNewScript; @@ -482,4 +542,9 @@ void AddSC_instance_culling_of_stratholme() pNewScript->Name = "instance_culling_of_stratholme"; pNewScript->GetInstanceData = &GetInstanceData_instance_culling_of_stratholme; pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "at_culling_of_stratholme"; + pNewScript->pAreaTrigger = &AreaTrigger_at_culling_of_stratholme; + pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 4a142f08f..448f2229a 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2972" + #define SD2_REVISION_NR "2973" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 18db87159..4e7ce51bd 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -400,7 +400,10 @@ INSERT INTO scripted_event_id VALUES /* THE CULLING OF STRATHOLME */ UPDATE instance_template SET ScriptName='instance_culling_of_stratholme' WHERE map=595; UPDATE creature_template SET ScriptName='npc_chromie' WHERE entry IN (26527, 27915); -UPDATE creature_template SET ScriptName='spell_dummy_npc_crates_bunny' WHERE entry=30996; +UPDATE creature_template SET ScriptName='spell_dummy_npc_crates_bunny' WHERE entry=27827; +DELETE FROM scripted_areatrigger WHERE entry=5291; +INSERT INTO scripted_areatrigger VALUES +(5291,'at_culling_of_stratholme'); /* THE DARK PORTAL */ UPDATE creature_template SET ScriptName='boss_chrono_lord_deja' WHERE entry=17879; diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index b66e09774..ada50cd70 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -3167,6 +3167,9 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1585030,'Oh no, he was merely an instrument, a stepping stone to a much larger plan! It has all led to this, and this time, you will not interfere!',0,1,0,0,'kaelthas MT SAY_INTRO_2'); -- -1 595 000 CULLING OF STRATHOLME +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1595000,'All soldiers of Lordaeron should immediately report to the entrance of Stratholme, and await further orders from Prince Arthas.',0,6,0,0,'lordaeron crier SAY_SOLDIERS_REPORT'), +(-1595001,'Good work with the crates! Come talk to me in front of Stratholme for your next assignment!',0,4,0,0,'chromie WHISPER_CHROMIE_CRATES'); -- -1 599 000 HALLS OF STONE INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES @@ -4705,7 +4708,9 @@ INSERT INTO gossip_texts (entry,content_default,comment) VALUES (-3595002,'Very well, Chromie.','chromie GOSSIP_ITEM_ENTRANCE_3'), (-3595003,'Why have I been sent back to this particular place and time?','chromie GOSSIP_ITEM_INN_1'), (-3595004,'What was this decision?','chromie GOSSIP_ITEM_INN_2'), -(-3595005,'So how does the Infinite Dragonflight plan to interfere?','chromie GOSSIP_ITEM_INN_3'); +(-3595005,'So how does the Infinite Dragonflight plan to interfere?','chromie GOSSIP_ITEM_INN_3'), +(-3595006,'Chromie, you and I both know what''s going to happen in this time stream. We''ve seen this all before.$B$BCan you just skip us ahead to all the real action?','chromie GOSSIP_ITEM_INN_SKIP'), +(-3595007,'Yes, please!','chromie GOSSIP_ITEM_INN_TELEPORT'); -- -3 599 000 HALLS OF STONE INSERT INTO gossip_texts (entry,content_default,comment) VALUES diff --git a/sql/updates/r2973_mangos.sql b/sql/updates/r2973_mangos.sql new file mode 100644 index 000000000..4dde57b2e --- /dev/null +++ b/sql/updates/r2973_mangos.sql @@ -0,0 +1,4 @@ +UPDATE creature_template SET ScriptName='spell_dummy_npc_crates_bunny' WHERE entry=27827; +DELETE FROM scripted_areatrigger WHERE entry=5291; +INSERT INTO scripted_areatrigger VALUES +(5291,'at_culling_of_stratholme'); diff --git a/sql/updates/r2973_scriptdev2.sql b/sql/updates/r2973_scriptdev2.sql new file mode 100644 index 000000000..1a86fb244 --- /dev/null +++ b/sql/updates/r2973_scriptdev2.sql @@ -0,0 +1,9 @@ +DELETE FROM script_texts WHERE entry IN (-1595000,-1595001); +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1595000,'All soldiers of Lordaeron should immediately report to the entrance of Stratholme, and await further orders from Prince Arthas.',0,6,0,0,'lordaeron crier SAY_SOLDIERS_REPORT'), +(-1595001,'Good work with the crates! Come talk to me in front of Stratholme for your next assignment!',0,4,0,0,'chromie WHISPER_CHROMIE_CRATES'); + +DELETE FROM gossip_texts WHERE entry IN (-3595006,-3595007); +INSERT INTO gossip_texts (entry,content_default,comment) VALUES +(-3595006,'Chromie, you and I both know what''s going to happen in this time stream. We''ve seen this all before.$B$BCan you just skip us ahead to all the real action?','chromie GOSSIP_ITEM_INN_SKIP'), +(-3595007,'Yes, please!','chromie GOSSIP_ITEM_INN_TELEPORT'); From 9a455d38eafdd25e1792f44a08f718626ab40340 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Wed, 30 Oct 2013 20:25:58 +0200 Subject: [PATCH 0984/1172] [2974] Add basic data for Yogg-Saron --- .../ulduar/ulduar/boss_yogg_saron.cpp | 142 +++++++++++++++++- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 + sql/updates/r2974_mangos.sql | 1 + 4 files changed, 143 insertions(+), 3 deletions(-) create mode 100644 sql/updates/r2974_mangos.sql diff --git a/scripts/northrend/ulduar/ulduar/boss_yogg_saron.cpp b/scripts/northrend/ulduar/ulduar/boss_yogg_saron.cpp index 6f83efb49..83d2e87bf 100644 --- a/scripts/northrend/ulduar/ulduar/boss_yogg_saron.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_yogg_saron.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: boss_yogg_saron -SD%Complete: 0% -SDComment: +SD%Complete: 10% +SDComment: Very basic script SDCategory: Ulduar EndScriptData */ @@ -75,9 +75,147 @@ enum SAY_HODIR_HELP = -1603093, SAY_THORIM_HELP = -1603155, SAY_MIMIRON_HELP = -1603195, + + // generic spells + SPELL_EXTINGUISH_LIFE = 64166, // berserk spell + + // Sara phase spells + SPELL_SARAS_FERVOR = 63747, // triggers 63138 + SPELL_SARAS_BLESSING = 63745, // triggers 63134 + SPELL_SARAS_ANGER = 63744, // triggers 63147 + + // guardian of yogg spells + SPELL_SHADOW_NOVA = 62714, // used by the guardians when it dies + SPELL_SHADOW_NOVA_H = 65209, + SPELL_DARK_VOLLEY = 63038, + SPELL_DOMINATE_MIND = 63713, + + // Vision phase spells + SPELL_SHADOWY_BARRIER = 64775, // damage immunity spells + SPELL_SHADOWY_BARRIER_YOGG = 63894, + + SPELL_SANITY = 63786, // sanity related spells + SPELL_INSANE_PERIODIC = 64554, + SPELL_CLEAR_INSANE = 63122, + + SPELL_PHYCHOSIS = 65301, // Sara combat spells + SPELL_PHYCHOSIS_H = 63795, + SPELL_MALADY_OF_THE_MIND = 63830, + SPELL_BRAIN_LINK = 63802, + SPELL_DEATH_RAY_SUMMON = 63891, + + SPELL_CORRUPTOR_TENTACLE = 64143, // tentacle spawn spells + SPELL_CRUSHER_TENTACLE = 64139, + SPELL_CONSTRICTOR_TENTACLE = 64133, + + // Old God phase spells + SPELL_LUNATIC_GAZE_YOGG = 64163, + SPELL_SHADOW_BEACON = 64465, + SPELL_EMPOWERING_SHADOWS = 64468, + SPELL_EMPOWERING_SHADOWS_H = 64486, + SPELL_DEAFENING_ROAR = 64189, + + // death ray spells + SPELL_DEATH_RAY_TRIGG = 63883, + SPELL_DEATH_RAY_VISUAL_WARN = 63882, + SPELL_DEATH_RAY_VISUAL_DAMAGE = 63886, + SPELL_DEATH_RAY_VISUAL_ORIGIN = 63893, + + // descend into madness spells + SPELL_TELEPORT_PORTAL_VISUAL = 64416, + SPELL_TELEPORT_TO_STORMWIND_ILLUSION = 63989, + SPELL_TELEPORT_TO_CHAMBER_ILLUSION = 63997, + SPELL_TELEPORT_TO_ICEECROWN_ILLUSION = 63998, + SPELL_TELEPORT_BACK_TO_MAIN_ROOM = 63992, + + // summoned creatures + NPC_GUARDIAN_OF_YOGG = 33136, + NPC_BRAIN_OF_YOGG_SARON = 33890, + NPC_DEATH_ORB = 33882, + NPC_CONSTRICTOR_TENTACLE = 33983, + NPC_CRUSHER_TENTACLE = 33966, + NPC_CORRUPTOR_TENTACLE = 33985, + NPC_DESCEND_INTO_MADNESS = 34072, + NPC_IMMORTAL_GUARDIAN = 33988, + + // keepers + // Freya spells + SPELL_RESILIENCE_OF_NATURE = 62670, + SPELL_SUMMON_SANITY_WELL = 64170, // sends event 21432; used to spawn npc 33991 + + // sanity well spells + SPELL_SANITY_WELL = 64169, + SPELL_SANITY_WELL_VISUAL = 63288, + + // Hodir spells + SPELL_FORTITUDE_OF_FROST = 62650, + SPELL_HODIRS_PROTECTIVE_GAZE = 64174, + + // Mimiron spells + SPELL_SPEED_OF_INVENTION = 62671, + SPELL_DESTABILIZATION_MATRIX = 65206, + + // Thorim spells + SPELL_FURY_OF_THE_STORM = 62702, + SPELL_TITANIC_STORM = 64171, + + // encounter phases + PHASE_INTRO = 0, + PHASE_SARA = 1, + PHASE_VISIONS = 2, + PHASE_OLD_GOD = 3, }; +/*###### +## boss_sara +######*/ + +struct MANGOS_DLL_DECL boss_saraAI : public ScriptedAI +{ + boss_saraAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (instance_ulduar*)pCreature->GetInstanceData(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); + Reset(); + } + + instance_ulduar* m_pInstance; + bool m_bIsRegularMode; + + void Reset() override + { + } + + void KilledUnit(Unit* pVictim) override + { + if (pVictim->GetTypeId() != TYPEID_PLAYER) + return; + + DoScriptText(urand(0, 1) ? SAY_SARA_SLAY_1 : SAY_SARA_SLAY_2, m_creature); + } + + void JustSummoned(Creature* pSummoned) override + { + } + + void UpdateAI(const uint32 uiDiff) override + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + } +}; + +CreatureAI* GetAI_boss_sara(Creature* pCreature) +{ + return new boss_saraAI(pCreature); +} + void AddSC_boss_yogg_saron() { + Script* pNewScript; + pNewScript = new Script; + pNewScript->Name = "boss_sara"; + pNewScript->GetAI = &GetAI_boss_sara; + pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 448f2229a..a2facc866 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2973" + #define SD2_REVISION_NR "2974" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 4e7ce51bd..9be817eba 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -1329,6 +1329,7 @@ UPDATE creature_template SET ScriptName='npc_mimiron_flames' WHERE entry IN (343 UPDATE creature_template SET ScriptName='boss_leviathan_mk2_turret' WHERE entry=34071; UPDATE creature_template SET ScriptName='npc_computer' WHERE entry=34143; UPDATE gameobject_template SET ScriptName='go_big_red_button' WHERE entry=194739; +UPDATE creature_template SET ScriptName='boss_sara' WHERE entry=33134; DELETE FROM scripted_event_id WHERE id IN (9735,20907,20964,21030,21031,21032,21033,21045,21605,21606,21620); INSERT INTO scripted_event_id VALUES (9735, 'event_spell_saronite_barrier'), -- Vezax saronite barrier event diff --git a/sql/updates/r2974_mangos.sql b/sql/updates/r2974_mangos.sql new file mode 100644 index 000000000..fc0787575 --- /dev/null +++ b/sql/updates/r2974_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='boss_sara' WHERE entry=33134; From 85e52947a2fda757655f76a7d4b6489c690c2d5d Mon Sep 17 00:00:00 2001 From: Xfurry Date: Wed, 30 Oct 2013 20:53:47 +0200 Subject: [PATCH 0985/1172] [2975] Fix mistake in Twin Emperors script Thanks hzhr for pointing Close #70 --- scripts/kalimdor/temple_of_ahnqiraj/boss_twinemperors.cpp | 4 ++-- sd2_revision_nr.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_twinemperors.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_twinemperors.cpp index 76e8f65ee..8bc95b547 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/boss_twinemperors.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_twinemperors.cpp @@ -90,7 +90,7 @@ struct MANGOS_DLL_DECL boss_twin_emperorsAI : public ScriptedAI if (!m_pInstance) return; - if (Creature* pTwin = m_pInstance->GetSingleCreatureFromStorage(m_creature->GetEntry() == NPC_VEKLOR ? NPC_VEKLOR : NPC_VEKNILASH)) + if (Creature* pTwin = m_pInstance->GetSingleCreatureFromStorage(m_creature->GetEntry() == NPC_VEKLOR ? NPC_VEKNILASH : NPC_VEKLOR)) { float fDamPercent = ((float)uiDamage) / ((float)m_creature->GetMaxHealth()); uint32 uiTwinDamage = (uint32)(fDamPercent * ((float)pTwin->GetMaxHealth())); @@ -111,7 +111,7 @@ struct MANGOS_DLL_DECL boss_twin_emperorsAI : public ScriptedAI if (!m_pInstance) return; - if (Creature* pTwin = m_pInstance->GetSingleCreatureFromStorage(m_creature->GetEntry() == NPC_VEKLOR ? NPC_VEKLOR : NPC_VEKNILASH)) + if (Creature* pTwin = m_pInstance->GetSingleCreatureFromStorage(m_creature->GetEntry() == NPC_VEKLOR ? NPC_VEKNILASH : NPC_VEKLOR)) { float fHealPercent = ((float)uiHealedAmount) / ((float)m_creature->GetMaxHealth()); uint32 uiTwinHeal = (uint32)(fHealPercent * ((float)pTwin->GetMaxHealth())); diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index a2facc866..4746e4a34 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2974" + #define SD2_REVISION_NR "2975" #endif // __SD2_REVISION_NR_H__ From 19e2dfb4f89fe7b3bfaf244db98721a2aed88f63 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Wed, 30 Oct 2013 22:58:50 +0200 Subject: [PATCH 0986/1172] [2976] Make Thorim spawn the arena npcs only when players are in range This will prevent the premature death of the Jormungar Behemoth and hence bugging the event --- scripts/northrend/ulduar/ulduar/boss_thorim.cpp | 17 +++++++++++++++++ .../northrend/ulduar/ulduar/instance_ulduar.cpp | 4 ---- scripts/northrend/ulduar/ulduar/ulduar.h | 2 +- sd2_revision_nr.h | 2 +- 4 files changed, 19 insertions(+), 6 deletions(-) diff --git a/scripts/northrend/ulduar/ulduar/boss_thorim.cpp b/scripts/northrend/ulduar/ulduar/boss_thorim.cpp index c8aeb91ed..89d8abae4 100644 --- a/scripts/northrend/ulduar/ulduar/boss_thorim.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_thorim.cpp @@ -170,6 +170,7 @@ struct MANGOS_DLL_DECL boss_thorimAI : public ScriptedAI, private DialogueHelper instance_ulduar* m_pInstance; bool m_bIsRegularMode; bool m_bEventFinished; + bool m_bArenaSpawned; uint32 m_uiBerserkTimer; uint8 m_uiPhase; @@ -199,6 +200,8 @@ struct MANGOS_DLL_DECL boss_thorimAI : public ScriptedAI, private DialogueHelper m_uiAttackTimer = 0; m_uiDwarfIndex = urand(0, 2); + m_bArenaSpawned = false; + SetCombatMovement(false); } @@ -284,6 +287,20 @@ struct MANGOS_DLL_DECL boss_thorimAI : public ScriptedAI, private DialogueHelper StartNextDialogueText(SAY_AGGRO_1); } + void MoveInLineOfSight(Unit* pWho) override + { + // spawn the arena npcs only when players are close to Thorim in order to avoid the possible bugs + if (!m_bArenaSpawned && pWho->GetTypeId() == TYPEID_PLAYER && pWho->isAlive() && !((Player*)pWho)->isGameMaster() && m_creature->IsWithinDistInMap(pWho, DEFAULT_VISIBILITY_INSTANCE)) + { + if (m_pInstance) + m_pInstance->DoSpawnThorimNpcs((Player*)pWho); + + m_bArenaSpawned = true; + } + + ScriptedAI::MoveInLineOfSight(pWho); + } + void JustReachedHome() override { if (m_pInstance) diff --git a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp index f5c012852..4a3b02d24 100644 --- a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp +++ b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp @@ -120,7 +120,6 @@ void instance_ulduar::OnPlayerEnter(Player* pPlayer) } DoSpawnHodirNpcs(pPlayer); - DoSpawnThorimNpcs(pPlayer); m_bHelpersLoaded = true; } } @@ -687,9 +686,6 @@ void instance_ulduar::SetData(uint32 uiType, uint32 uiData) pColossus->AI()->EnterEvadeMode(); } - if (Player* pPlayer = GetPlayerInMap()) - DoSpawnThorimNpcs(pPlayer); - m_uiStairsSpawnTimer = 0; m_uiSlayedArenaMobs = 0; } diff --git a/scripts/northrend/ulduar/ulduar/ulduar.h b/scripts/northrend/ulduar/ulduar/ulduar.h index f8a1f5f99..00e1be57b 100644 --- a/scripts/northrend/ulduar/ulduar/ulduar.h +++ b/scripts/northrend/ulduar/ulduar/ulduar.h @@ -490,6 +490,7 @@ class MANGOS_DLL_DECL instance_ulduar : public ScriptedInstance, private Dialogu bool CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/) const override; bool CheckConditionCriteriaMeet(Player const* pPlayer, uint32 uiInstanceConditionId, WorldObject const* pConditionSource, uint32 conditionSourceType) const override; + void DoSpawnThorimNpcs(Player* pSummoner); void DoProcessShatteredEvent(); ObjectGuid GetKoloRubbleStalker(bool bRightSide) { return bRightSide ? m_rightKoloStalkerGuid : m_leftKoloStalkerGuid; } @@ -509,7 +510,6 @@ class MANGOS_DLL_DECL instance_ulduar : public ScriptedInstance, private Dialogu void JustDidDialogueStep(int32 iEntry) override; void SpawnFriendlyKeeper(uint32 uiWho); void DoSpawnHodirNpcs(Player* pSummoner); - void DoSpawnThorimNpcs(Player* pSummoner); void DoOpenMadnessDoorIfCan(); void DoCallLeviathanHelp(); diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 4746e4a34..9e640428c 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2975" + #define SD2_REVISION_NR "2976" #endif // __SD2_REVISION_NR_H__ From c8862cf7fb77c48e773dc00dd21c3ababe8684c5 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Fri, 8 Nov 2013 09:40:41 +0200 Subject: [PATCH 0987/1172] [2977] Implement basic script for Yogg Saron - phase 1 --- .../ulduar/ulduar/boss_yogg_saron.cpp | 203 +++++++++++++++++- .../ulduar/ulduar/instance_ulduar.cpp | 32 +++ scripts/northrend/ulduar/ulduar/ulduar.h | 5 + sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 2 + sql/scriptdev2_script_full.sql | 4 +- sql/updates/r2977_mangos.sql | 2 + sql/updates/r2977_scriptdev2.sql | 3 + 8 files changed, 243 insertions(+), 10 deletions(-) create mode 100644 sql/updates/r2977_mangos.sql create mode 100644 sql/updates/r2977_scriptdev2.sql diff --git a/scripts/northrend/ulduar/ulduar/boss_yogg_saron.cpp b/scripts/northrend/ulduar/ulduar/boss_yogg_saron.cpp index 83d2e87bf..3e1dff758 100644 --- a/scripts/northrend/ulduar/ulduar/boss_yogg_saron.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_yogg_saron.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: boss_yogg_saron -SD%Complete: 10% -SDComment: Very basic script +SD%Complete: 20% +SDComment: Encounter is incomplete; only phase 1 is partially implemented. SDCategory: Ulduar EndScriptData */ @@ -70,6 +70,7 @@ enum EMOTE_VISION_BLAST = -1603234, EMOTE_SHATTER_BLAST = -1603235, + EMOTE_CLOUD_BOIL = -1603261, SAY_FREYA_HELP = -1603009, SAY_HODIR_HELP = -1603093, @@ -84,20 +85,26 @@ enum SPELL_SARAS_BLESSING = 63745, // triggers 63134 SPELL_SARAS_ANGER = 63744, // triggers 63147 + // ominous cloud spells + // SPELL_OMINOUS_CLOUD_VISUAL = 63084, // in c_t_a + SPELL_BOIL_OMNIOUSLY = 63030, // cast when a player is in range; triggers 63031 + // guardian of yogg spells SPELL_SHADOW_NOVA = 62714, // used by the guardians when it dies SPELL_SHADOW_NOVA_H = 65209, SPELL_DARK_VOLLEY = 63038, SPELL_DOMINATE_MIND = 63713, + // Voice of Yogg spells + SPELL_SANITY = 63786, // add sanity when encounter starts + SPELL_INSANE_PERIODIC = 64554, // decrease sanity + SPELL_CLEAR_INSANE = 63122, // clear all the sanity and insane on wipe / death + SPELL_SUMMON_GUARDIAN_YOGG = 62978, // cast by npc 33280 on an Ominus cloud + // Vision phase spells SPELL_SHADOWY_BARRIER = 64775, // damage immunity spells SPELL_SHADOWY_BARRIER_YOGG = 63894, - SPELL_SANITY = 63786, // sanity related spells - SPELL_INSANE_PERIODIC = 64554, - SPELL_CLEAR_INSANE = 63122, - SPELL_PHYCHOSIS = 65301, // Sara combat spells SPELL_PHYCHOSIS_H = 63795, SPELL_MALADY_OF_THE_MIND = 63830, @@ -129,8 +136,6 @@ enum SPELL_TELEPORT_BACK_TO_MAIN_ROOM = 63992, // summoned creatures - NPC_GUARDIAN_OF_YOGG = 33136, - NPC_BRAIN_OF_YOGG_SARON = 33890, NPC_DEATH_ORB = 33882, NPC_CONSTRICTOR_TENTACLE = 33983, NPC_CRUSHER_TENTACLE = 33966, @@ -166,6 +171,8 @@ enum PHASE_OLD_GOD = 3, }; +static const float afVoiceOfYoggSpawn[3] = {1980.137f, -25.74376f, 326.4671f}; + /*###### ## boss_sara ######*/ @@ -182,8 +189,41 @@ struct MANGOS_DLL_DECL boss_saraAI : public ScriptedAI instance_ulduar* m_pInstance; bool m_bIsRegularMode; + uint8 m_uiPhase; + uint32 m_uiSummonGuardianTimer; + uint32 m_uiSarasSpellTimer; + void Reset() override { + m_uiPhase = PHASE_INTRO; + m_uiSummonGuardianTimer = 1000; + m_uiSarasSpellTimer = 5000; + } + + void AttackStart(Unit* pWho) override + { + if (m_uiPhase == PHASE_SARA) + return; + + ScriptedAI::AttackStart(pWho); + } + + void MoveInLineOfSight(Unit* pWho) override + { + // start the encounter on range check + // ToDo: research if there is any intro available before the actual encounter starts + if (m_uiPhase == PHASE_INTRO && pWho->GetTypeId() == TYPEID_PLAYER && pWho->isAlive() && !((Player*)pWho)->isGameMaster() && m_creature->IsWithinDistInMap(pWho, 70.0f)) + { + m_uiPhase = PHASE_SARA; + DoScriptText(SAY_SARA_AGGRO, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_YOGGSARON, IN_PROGRESS); + + m_creature->SummonCreature(NPC_VOICE_OF_YOGG, afVoiceOfYoggSpawn[0], afVoiceOfYoggSpawn[1], afVoiceOfYoggSpawn[2], 0, TEMPSUMMON_DEAD_DESPAWN, 0); + } + + ScriptedAI::MoveInLineOfSight(pWho); } void KilledUnit(Unit* pVictim) override @@ -196,10 +236,51 @@ struct MANGOS_DLL_DECL boss_saraAI : public ScriptedAI void JustSummoned(Creature* pSummoned) override { + // ToDo: make the voice of Yogg cast Sanity on spawn } void UpdateAI(const uint32 uiDiff) override { + if (!m_pInstance) + { + script_error_log("Instance Ulduar: ERROR Failed to load instance data for this instace."); + return; + } + + if (m_uiPhase == PHASE_SARA) + { + if (m_uiSummonGuardianTimer < uiDiff) + { + if (Creature* pVoice = m_pInstance->GetSingleCreatureFromStorage(NPC_VOICE_OF_YOGG)) + pVoice->CastSpell(pVoice, SPELL_SUMMON_GUARDIAN_YOGG, true); + + m_uiSummonGuardianTimer = 20000; + } + else + m_uiSummonGuardianTimer -= uiDiff; + + if (m_uiSarasSpellTimer < uiDiff) + { + CanCastResult castResult; + switch (urand(0, 2)) + { + case 0: castResult = DoCastSpellIfCan(m_creature, SPELL_SARAS_FERVOR); break; + case 1: castResult = DoCastSpellIfCan(m_creature, SPELL_SARAS_BLESSING); break; + case 2: castResult = DoCastSpellIfCan(m_creature, SPELL_SARAS_ANGER); break; + } + + if (castResult == CAST_OK) + { + if (urand(0, 1)) + DoScriptText(urand(0, 1) ? SAY_SARA_HELP_1 : SAY_SARA_HELP_2, m_creature); + + m_uiSarasSpellTimer = 5000; + } + } + else + m_uiSarasSpellTimer -= uiDiff; + } + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; } @@ -210,6 +291,102 @@ CreatureAI* GetAI_boss_sara(Creature* pCreature) return new boss_saraAI(pCreature); } +/*###### +## npc_ominous_cloud +######*/ + +struct MANGOS_DLL_DECL npc_ominous_cloudAI : public Scripted_NoMovementAI +{ + npc_ominous_cloudAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { Reset(); } + + uint32 m_uiDelayTimer; + + void Reset() override + { + m_uiDelayTimer = 0; + } + + void AttackStart(Unit* /*pWho*/) override { } + + void MoveInLineOfSight(Unit* pWho) override + { + if (!m_uiDelayTimer && pWho->GetTypeId() == TYPEID_PLAYER && !((Player*)pWho)->isGameMaster() && m_creature->IsWithinDistInMap(pWho, 7.0f)) + { + if (DoCastSpellIfCan(m_creature, SPELL_BOIL_OMNIOUSLY) == CAST_OK) + { + DoScriptText(EMOTE_CLOUD_BOIL, m_creature, pWho); + m_uiDelayTimer = 10000; + } + } + } + + void SpellHit(Unit* /*pCaster*/, const SpellEntry* pSpell) override + { + if (pSpell->Id == SPELL_SUMMON_GUARDIAN_YOGG) + m_uiDelayTimer = 10000; + } + + void JustSummoned(Creature* pSummoned) override + { + if (pSummoned->GetEntry() == NPC_GUARDIAN_OF_YOGG) + pSummoned->SetInCombatWithZone(); + } + + void UpdateAI(const uint32 uiDiff) override + { + if (m_uiDelayTimer) + { + if (m_uiDelayTimer <= uiDiff) + m_uiDelayTimer = 0; + else + m_uiDelayTimer -= uiDiff; + } + } +}; + +CreatureAI* GetAI_npc_ominous_cloud(Creature* pCreature) +{ + return new npc_ominous_cloudAI(pCreature); +} + +/*###### +## npc_voice_yogg_saron +######*/ + +struct MANGOS_DLL_DECL npc_voice_yogg_saronAI : public Scripted_NoMovementAI +{ + npc_voice_yogg_saronAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { Reset(); } + + uint32 m_uiBerserkTimer; + + void Reset() override + { + m_uiBerserkTimer = 15 * MINUTE * IN_MILLISECONDS; + } + + void AttackStart(Unit* /*pWho*/) override { } + void MoveInLineOfSight(Unit* /*pWho*/) override { } + + void UpdateAI(const uint32 uiDiff) override + { + if (m_uiBerserkTimer) + { + if (m_uiBerserkTimer <= uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_EXTINGUISH_LIFE) == CAST_OK) + m_uiBerserkTimer = 0; + } + else + m_uiBerserkTimer -= uiDiff; + } + } +}; + +CreatureAI* GetAI_npc_voice_yogg_saron(Creature* pCreature) +{ + return new npc_voice_yogg_saronAI(pCreature); +} + void AddSC_boss_yogg_saron() { Script* pNewScript; @@ -218,4 +395,14 @@ void AddSC_boss_yogg_saron() pNewScript->Name = "boss_sara"; pNewScript->GetAI = &GetAI_boss_sara; pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_ominous_cloud"; + pNewScript->GetAI = &GetAI_npc_ominous_cloud; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_voice_yogg_saron"; + pNewScript->GetAI = &GetAI_npc_voice_yogg_saron; + pNewScript->RegisterSelf(); } diff --git a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp index 4a3b02d24..8a707dad5 100644 --- a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp +++ b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp @@ -177,6 +177,7 @@ void instance_ulduar::OnCreatureCreate(Creature* pCreature) case NPC_YOGGSARON: case NPC_SARA: case NPC_YOGG_BRAIN: + case NPC_VOICE_OF_YOGG: case NPC_ALGALON: case NPC_MIMIRON: @@ -233,6 +234,9 @@ void instance_ulduar::OnCreatureCreate(Creature* pCreature) case NPC_RIGHT_HAND_BUNNY: m_lRightHandBunniesGuids.push_back(pCreature->GetObjectGuid()); return; + case NPC_OMINOUS_CLOUD: + m_lOminousCloudsGuids.push_back(pCreature->GetObjectGuid()); + return; default: return; @@ -723,8 +727,27 @@ void instance_ulduar::SetData(uint32 uiType, uint32 uiData) DoUseDoorOrButton(GO_VEZAX_GATE); break; case TYPE_YOGGSARON: + // Don't set the same encounter data twice + if (uiData == m_auiEncounter[uiType]) + return; m_auiEncounter[uiType] = uiData; DoUseDoorOrButton(GO_YOGG_GATE); + if (uiData == FAIL) + { + // reset Ominous clouds + for (GuidList::const_iterator itr = m_lOminousCloudsGuids.begin(); itr != m_lOminousCloudsGuids.end(); ++itr) + { + if (Creature* pCloud = instance->GetCreature(*itr)) + pCloud->AI()->EnterEvadeMode(); + } + + // clear insane and despawn the voice + if (Creature* pVoice = GetSingleCreatureFromStorage(NPC_VOICE_OF_YOGG)) + pVoice->ForcedDespawn(); + + if (Creature* pSara = GetSingleCreatureFromStorage(NPC_SARA)) + pSara->AI()->EnterEvadeMode(); + } break; // Celestial Planetarium @@ -1076,6 +1099,15 @@ void instance_ulduar::OnCreatureDeath(Creature* pCreature) } } +void instance_ulduar::OnCreatureEvade(Creature* pCreature) +{ + if (pCreature->GetEntry() == NPC_GUARDIAN_OF_YOGG) + { + SetData(TYPE_YOGGSARON, FAIL); + pCreature->ForcedDespawn(); + } +} + void instance_ulduar::Load(const char* strIn) { if (!strIn) diff --git a/scripts/northrend/ulduar/ulduar/ulduar.h b/scripts/northrend/ulduar/ulduar/ulduar.h index 00e1be57b..f777b4053 100644 --- a/scripts/northrend/ulduar/ulduar/ulduar.h +++ b/scripts/northrend/ulduar/ulduar/ulduar.h @@ -170,6 +170,9 @@ enum NPC_YOGGSARON = 33288, NPC_SARA = 33134, NPC_YOGG_BRAIN = 33890, + NPC_VOICE_OF_YOGG = 33280, + NPC_OMINOUS_CLOUD = 33292, + NPC_GUARDIAN_OF_YOGG = 33136, // Celestial planetarium NPC_ALGALON = 32871, @@ -478,6 +481,7 @@ class MANGOS_DLL_DECL instance_ulduar : public ScriptedInstance, private Dialogu void OnCreatureCreate(Creature* pCreature) override; void OnCreatureEnterCombat(Creature* pCreature) override; void OnCreatureDeath(Creature* pCreature) override; + void OnCreatureEvade(Creature* pCreature) override; void OnObjectCreate(GameObject* pGo) override; void SetData(uint32 uiType, uint32 uiData) override; @@ -543,6 +547,7 @@ class MANGOS_DLL_DECL instance_ulduar : public ScriptedInstance, private Dialogu GuidList m_lUpperThunderOrbsGuids; GuidList m_lLeftHandBunniesGuids; GuidList m_lRightHandBunniesGuids; + GuidList m_lOminousCloudsGuids; GuidSet m_sColossusGuidSet; }; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 9e640428c..0f05486bf 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2976" + #define SD2_REVISION_NR "2977" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 9be817eba..6dccce558 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -1330,6 +1330,8 @@ UPDATE creature_template SET ScriptName='boss_leviathan_mk2_turret' WHERE entry= UPDATE creature_template SET ScriptName='npc_computer' WHERE entry=34143; UPDATE gameobject_template SET ScriptName='go_big_red_button' WHERE entry=194739; UPDATE creature_template SET ScriptName='boss_sara' WHERE entry=33134; +UPDATE creature_template SET ScriptName='npc_ominous_cloud' WHERE entry=33292; +UPDATE creature_template SET ScriptName='npc_voice_yogg_saron' WHERE entry=33280; DELETE FROM scripted_event_id WHERE id IN (9735,20907,20964,21030,21031,21032,21033,21045,21605,21606,21620); INSERT INTO scripted_event_id VALUES (9735, 'event_spell_saronite_barrier'), -- Vezax saronite barrier event diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index ada50cd70..11fe9676f 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -3665,7 +3665,9 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1603257,'This area will self-destruct in two minutes.',15423,1,0,0,'mimiron SAY_DESTRUCT_2_MIN'), (-1603258,'This area will self-destruct in one minute.',15424,1,0,0,'mimiron SAY_DESTRUCT_1_MIN'), (-1603259,'Self-destruct sequence finalized. Have a nice day.',15425,1,0,0,'mimiron SAY_DESTRUCT_0_MIN'), -(-1603260,'Self-destruct sequence terminated. Overide code A905.',15414,1,0,0,'mimiron SAY_SELF_DESTRUCT_END'); +(-1603260,'Self-destruct sequence terminated. Overide code A905.',15414,1,0,0,'mimiron SAY_SELF_DESTRUCT_END'), + +(-1603261,'%s begins to boil upon touching $n!',0,2,0,0,'ominous cloud EMOTE_CLOUD_BOIL'); -- -1 604 000 GUNDRAK INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES diff --git a/sql/updates/r2977_mangos.sql b/sql/updates/r2977_mangos.sql new file mode 100644 index 000000000..81791a307 --- /dev/null +++ b/sql/updates/r2977_mangos.sql @@ -0,0 +1,2 @@ +UPDATE creature_template SET ScriptName='npc_ominous_cloud' WHERE entry=33292; +UPDATE creature_template SET ScriptName='npc_voice_yogg_saron' WHERE entry=33280; diff --git a/sql/updates/r2977_scriptdev2.sql b/sql/updates/r2977_scriptdev2.sql new file mode 100644 index 000000000..931d30b6c --- /dev/null +++ b/sql/updates/r2977_scriptdev2.sql @@ -0,0 +1,3 @@ +DELETE FROM script_texts WHERE entry=-1603261; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1603261,'%s begins to boil upon touching $n!',0,2,0,0,'ominous cloud EMOTE_CLOUD_BOIL'); From 4c019cd794c24add6a66b471660238178b66ce9f Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sun, 10 Nov 2013 23:19:18 +0200 Subject: [PATCH 0988/1172] [2978] Add spawn support for Ulduar keepers for Yogg-Saron encounter Thanks to @evil-at-wow for providing the necessary data --- .../northrend/ulduar/ulduar/boss_freya.cpp | 2 - .../northrend/ulduar/ulduar/boss_thorim.cpp | 2 +- .../ulduar/ulduar/boss_yogg_saron.cpp | 5 - .../ulduar/ulduar/instance_ulduar.cpp | 62 +++++++++++- scripts/northrend/ulduar/ulduar/ulduar.cpp | 96 ++++++++++++++++++- scripts/northrend/ulduar/ulduar/ulduar.h | 2 + sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 + sql/scriptdev2_script_full.sql | 10 +- sql/updates/r2978_mangos.sql | 1 + sql/updates/r2978_scriptdev2.sql | 8 ++ 11 files changed, 177 insertions(+), 14 deletions(-) create mode 100644 sql/updates/r2978_mangos.sql create mode 100644 sql/updates/r2978_scriptdev2.sql diff --git a/scripts/northrend/ulduar/ulduar/boss_freya.cpp b/scripts/northrend/ulduar/ulduar/boss_freya.cpp index cb272d981..ced255647 100644 --- a/scripts/northrend/ulduar/ulduar/boss_freya.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_freya.cpp @@ -38,8 +38,6 @@ enum EMOTE_ALLIES_NATURE = -1603010, EMOTE_REGEN_ALLIES = -1603011, - // EMOTE_TREMOR = -1603012, - // EMOTE_IRON_ROOTS = -1603013, SAY_AGGRO_BRIGHT = -1603014, SAY_SLAY_1_BRIGHT = -1603015, diff --git a/scripts/northrend/ulduar/ulduar/boss_thorim.cpp b/scripts/northrend/ulduar/ulduar/boss_thorim.cpp index 89d8abae4..a31271f95 100644 --- a/scripts/northrend/ulduar/ulduar/boss_thorim.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_thorim.cpp @@ -292,7 +292,7 @@ struct MANGOS_DLL_DECL boss_thorimAI : public ScriptedAI, private DialogueHelper // spawn the arena npcs only when players are close to Thorim in order to avoid the possible bugs if (!m_bArenaSpawned && pWho->GetTypeId() == TYPEID_PLAYER && pWho->isAlive() && !((Player*)pWho)->isGameMaster() && m_creature->IsWithinDistInMap(pWho, DEFAULT_VISIBILITY_INSTANCE)) { - if (m_pInstance) + if (m_pInstance && m_pInstance->GetData(TYPE_THORIM) != DONE) m_pInstance->DoSpawnThorimNpcs((Player*)pWho); m_bArenaSpawned = true; diff --git a/scripts/northrend/ulduar/ulduar/boss_yogg_saron.cpp b/scripts/northrend/ulduar/ulduar/boss_yogg_saron.cpp index 3e1dff758..b70903bae 100644 --- a/scripts/northrend/ulduar/ulduar/boss_yogg_saron.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_yogg_saron.cpp @@ -72,11 +72,6 @@ enum EMOTE_SHATTER_BLAST = -1603235, EMOTE_CLOUD_BOIL = -1603261, - SAY_FREYA_HELP = -1603009, - SAY_HODIR_HELP = -1603093, - SAY_THORIM_HELP = -1603155, - SAY_MIMIRON_HELP = -1603195, - // generic spells SPELL_EXTINGUISH_LIFE = 64166, // berserk spell diff --git a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp index 8a707dad5..66e765b6c 100644 --- a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp +++ b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp @@ -29,6 +29,11 @@ enum SAY_PRE_LEVIATHAN_1 = -1603239, SAY_PRE_LEVIATHAN_2 = -1603240, SAY_PRE_LEVIATHAN_3 = -1603241, + + SAY_FREYA_HELP = -1603009, + SAY_HODIR_HELP = -1603093, + SAY_THORIM_HELP = -1603155, + SAY_MIMIRON_HELP = -1603195, }; static const DialogueEntry aUlduarDialogue[] = @@ -44,6 +49,7 @@ struct UlduarKeeperSpawns { float fX, fY, fZ, fO; uint32 uiEntry, uiType; + int32 iText; }; static UlduarKeeperSpawns m_aKeepersSpawnLocs[] = @@ -54,6 +60,14 @@ static UlduarKeeperSpawns m_aKeepersSpawnLocs[] = {2028.822f, -65.73573f, 411.4426f, 2.460f, NPC_KEEPER_THORIM, TYPE_THORIM}, }; +static UlduarKeeperSpawns m_aKeeperHelperLocs[] = +{ + {2036.873f, 25.42513f, 338.4984f, 3.909f, NPC_FREYA_HELPER, TYPE_KEEPER_FREYA, SAY_FREYA_HELP}, + {2036.658f, -73.58822f, 338.4985f, 2.460f, NPC_MIMIRON_HELPER, TYPE_KEEPER_MIMIRON, SAY_MIMIRON_HELP}, + {1939.045f, -90.87457f, 338.5426f, 0.994f, NPC_HODIR_HELPER, TYPE_KEEPER_HODIR, SAY_HODIR_HELP}, + {1939.148f, 42.49035f, 338.5427f, 5.235f, NPC_THORIM_HELPER, TYPE_KEEPER_THORIM, SAY_THORIM_HELP}, +}; + instance_ulduar::instance_ulduar(Map* pMap) : ScriptedInstance(pMap), DialogueHelper(aUlduarDialogue), m_bHelpersLoaded(false), m_uiAlgalonTimer(MINUTE * IN_MILLISECONDS), @@ -110,7 +124,7 @@ void instance_ulduar::OnPlayerEnter(Player* pPlayer) pPlayer->SendUpdateWorldState(WORLD_STATE_TIMER_COUNT, GetData(TYPE_ALGALON_TIMER)); } - // spawn frienly keepers in the central hall and all the other faction npcs + // spawn frienly keepers in the central hall, keeper helpers for Yogg-Saron and all the other faction npcs if (!m_bHelpersLoaded) { for (uint8 i = 0; i < countof(m_aKeepersSpawnLocs); ++i) @@ -119,6 +133,12 @@ void instance_ulduar::OnPlayerEnter(Player* pPlayer) pPlayer->SummonCreature(m_aKeepersSpawnLocs[i].uiEntry, m_aKeepersSpawnLocs[i].fX, m_aKeepersSpawnLocs[i].fY, m_aKeepersSpawnLocs[i].fZ, m_aKeepersSpawnLocs[i].fO, TEMPSUMMON_CORPSE_DESPAWN, 0, true); } + for (uint8 i = 0; i < countof(m_aKeeperHelperLocs); ++i) + { + if (GetData(m_aKeeperHelperLocs[i].uiType) == DONE) + pPlayer->SummonCreature(m_aKeeperHelperLocs[i].uiEntry, m_aKeeperHelperLocs[i].fX, m_aKeeperHelperLocs[i].fY, m_aKeeperHelperLocs[i].fZ, m_aKeeperHelperLocs[i].fO, TEMPSUMMON_CORPSE_DESPAWN, 0, true); + } + DoSpawnHodirNpcs(pPlayer); m_bHelpersLoaded = true; } @@ -810,15 +830,27 @@ void instance_ulduar::SetData(uint32 uiType, uint32 uiData) // Ulduar keepers case TYPE_KEEPER_HODIR: + if (uiData == m_auiUlduarKeepers[0] || uiData != DONE) + return; + SpawnKeeperHelper(NPC_HODIR_HELPER); m_auiUlduarKeepers[0] = uiData; break; case TYPE_KEEPER_THORIM: + if (uiData == m_auiUlduarKeepers[1] || uiData != DONE) + return; + SpawnKeeperHelper(NPC_THORIM_HELPER); m_auiUlduarKeepers[1] = uiData; break; case TYPE_KEEPER_FREYA: + if (uiData == m_auiUlduarKeepers[2] || uiData != DONE) + return; + SpawnKeeperHelper(NPC_FREYA_HELPER); m_auiUlduarKeepers[2] = uiData; break; case TYPE_KEEPER_MIMIRON: + if (uiData == m_auiUlduarKeepers[3] || uiData != DONE) + return; + SpawnKeeperHelper(NPC_MIMIRON_HELPER); m_auiUlduarKeepers[3] = uiData; break; @@ -1022,6 +1054,34 @@ void instance_ulduar::SpawnFriendlyKeeper(uint32 uiWho) } } +// Spawn the keeper helpers for Yogg-Saron +void instance_ulduar::SpawnKeeperHelper(uint32 uiWho) +{ + Player* pPlayer = GetPlayerInMap(); + if (!pPlayer) + return; + + switch (uiWho) + { + case NPC_MIMIRON_HELPER: + if (Creature* pKeeper = pPlayer->SummonCreature(uiWho, m_aKeeperHelperLocs[1].fX, m_aKeeperHelperLocs[1].fY, m_aKeeperHelperLocs[1].fZ, m_aKeeperHelperLocs[1].fO, TEMPSUMMON_CORPSE_DESPAWN, 0, true)) + DoScriptText(m_aKeeperHelperLocs[1].iText, pKeeper); + break; + case NPC_HODIR_HELPER: + if (Creature* pKeeper = pPlayer->SummonCreature(uiWho, m_aKeeperHelperLocs[2].fX, m_aKeeperHelperLocs[2].fY, m_aKeeperHelperLocs[2].fZ, m_aKeeperHelperLocs[2].fO, TEMPSUMMON_CORPSE_DESPAWN, 0, true)) + DoScriptText(m_aKeeperHelperLocs[2].iText, pKeeper); + break; + case NPC_THORIM_HELPER: + if (Creature* pKeeper = pPlayer->SummonCreature(uiWho, m_aKeeperHelperLocs[3].fX, m_aKeeperHelperLocs[3].fY, m_aKeeperHelperLocs[3].fZ, m_aKeeperHelperLocs[3].fO, TEMPSUMMON_CORPSE_DESPAWN, 0, true)) + DoScriptText(m_aKeeperHelperLocs[3].iText, pKeeper); + break; + case NPC_FREYA_HELPER: + if (Creature* pKeeper = pPlayer->SummonCreature(uiWho, m_aKeeperHelperLocs[0].fX, m_aKeeperHelperLocs[0].fY, m_aKeeperHelperLocs[0].fZ, m_aKeeperHelperLocs[0].fO, TEMPSUMMON_CORPSE_DESPAWN, 0, true)) + DoScriptText(m_aKeeperHelperLocs[0].iText, pKeeper); + break; + } +} + void instance_ulduar::OnCreatureEnterCombat(Creature* pCreature) { switch (pCreature->GetEntry()) diff --git a/scripts/northrend/ulduar/ulduar/ulduar.cpp b/scripts/northrend/ulduar/ulduar/ulduar.cpp index 989b6d33a..0c59a1f55 100644 --- a/scripts/northrend/ulduar/ulduar/ulduar.cpp +++ b/scripts/northrend/ulduar/ulduar/ulduar.cpp @@ -16,7 +16,7 @@ /* ScriptData SDName: ulduar -SD%Complete: 10% +SD%Complete: 70% SDComment: Teleporters are hacked until solved in core SDCategory: Ulduar EndScriptData */ @@ -28,6 +28,7 @@ npc_keeper_norgannon event_go_ulduar_tower npc_storm_tempered_keeper npc_charged_sphere +npc_ulduar_keeper EndContentData */ #include "precompiled.h" @@ -503,6 +504,93 @@ CreatureAI* GetAI_npc_charged_sphere(Creature* pCreature) return new npc_charged_sphereAI(pCreature); } +/*###### +## npc_ulduar_keeper +######*/ + +enum +{ + SAY_KEEPER_ACTIVE = -1603012, + + GOSSIP_ITEM_LEND_AID = -3603013, + GOSSIP_ITEM_KEEPER_CONFIRM = -3603014, + + GOSSIP_TEXT_ID_HODIR = 14326, + GOSSIP_TEXT_ID_FREYA = 14332, + GOSSIP_TEXT_ID_THORIM = 14333, + GOSSIP_TEXT_ID_MIMIRON = 14334, + GOSSIP_TEXT_ID_KEEPER_CONFIRM = 14325, + GOSSIP_TEXT_ID_YOGG_DEFEATED = 384, // ToDo: add the right text id here! +}; + +bool GossipHello_npc_ulduar_keeper(Player* pPlayer, Creature* pCreature) +{ + if (instance_ulduar* pInstance = (instance_ulduar*)pCreature->GetInstanceData()) + { + if (pInstance->GetData(TYPE_YOGGSARON) == DONE) + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXT_ID_YOGG_DEFEATED, pCreature->GetObjectGuid()); + else + { + switch (pCreature->GetEntry()) + { + case NPC_KEEPER_HODIR: + if (pInstance->GetData(TYPE_KEEPER_HODIR) != DONE) + pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_LEND_AID, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); + + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXT_ID_HODIR, pCreature->GetObjectGuid()); + break; + case NPC_KEEPER_FREYA: + if (pInstance->GetData(TYPE_KEEPER_FREYA) != DONE) + pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_LEND_AID, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); + + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXT_ID_FREYA, pCreature->GetObjectGuid()); + break; + case NPC_KEEPER_THORIM: + if (pInstance->GetData(TYPE_KEEPER_THORIM) != DONE) + pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_LEND_AID, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); + + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXT_ID_THORIM, pCreature->GetObjectGuid()); + break; + case NPC_KEEPER_MIMIRON: + if (pInstance->GetData(TYPE_KEEPER_MIMIRON) != DONE) + pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_LEND_AID, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); + + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXT_ID_MIMIRON, pCreature->GetObjectGuid()); + break; + } + } + } + return true; +} + +bool GossipSelect_npc_ulduar_keeper(Player* pPlayer, Creature* pCreature, uint32 /*sender*/, uint32 uiAction) +{ + switch (uiAction) + { + case GOSSIP_ACTION_INFO_DEF+1: + pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KEEPER_CONFIRM, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXT_ID_KEEPER_CONFIRM, pCreature->GetObjectGuid()); + break; + case GOSSIP_ACTION_INFO_DEF+2: + DoScriptText(SAY_KEEPER_ACTIVE, pCreature, pPlayer); + pPlayer->CLOSE_GOSSIP_MENU(); + + if (instance_ulduar* pInstance = (instance_ulduar*)pCreature->GetInstanceData()) + { + switch (pCreature->GetEntry()) + { + case NPC_KEEPER_HODIR: pInstance->SetData(TYPE_KEEPER_HODIR, DONE); break; + case NPC_KEEPER_FREYA: pInstance->SetData(TYPE_KEEPER_FREYA, DONE); break; + case NPC_KEEPER_THORIM: pInstance->SetData(TYPE_KEEPER_THORIM, DONE); break; + case NPC_KEEPER_MIMIRON: pInstance->SetData(TYPE_KEEPER_MIMIRON, DONE); break; + } + } + break; + } + + return true; +} + void AddSC_ulduar() { Script* pNewScript; @@ -539,4 +627,10 @@ void AddSC_ulduar() pNewScript->Name = "npc_charged_sphere"; pNewScript->GetAI = &GetAI_npc_charged_sphere; pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_ulduar_keeper"; + pNewScript->pGossipHello = &GossipHello_npc_ulduar_keeper; + pNewScript->pGossipSelect = &GossipSelect_npc_ulduar_keeper; + pNewScript->RegisterSelf(); } diff --git a/scripts/northrend/ulduar/ulduar/ulduar.h b/scripts/northrend/ulduar/ulduar/ulduar.h index f777b4053..e5c4c629d 100644 --- a/scripts/northrend/ulduar/ulduar/ulduar.h +++ b/scripts/northrend/ulduar/ulduar/ulduar.h @@ -420,6 +420,7 @@ static const UlduarSpawns afReinforcementsNormal[] = {122.479f, 25.093f, 410.60f, 3.10f, NPC_SALVAGED_DEMOLISHER}, {123.022f, 39.671f, 409.80f, 3.10f, NPC_SALVAGED_DEMOLISHER}, }; + static const UlduarSpawns afReinforcementsHeroic[] = { {106.359f, -35.269f, 409.80f, 3.12f, NPC_SALVAGED_SIEGE_ENGINE}, @@ -513,6 +514,7 @@ class MANGOS_DLL_DECL instance_ulduar : public ScriptedInstance, private Dialogu protected: void JustDidDialogueStep(int32 iEntry) override; void SpawnFriendlyKeeper(uint32 uiWho); + void SpawnKeeperHelper(uint32 uiWho); void DoSpawnHodirNpcs(Player* pSummoner); void DoOpenMadnessDoorIfCan(); void DoCallLeviathanHelp(); diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 0f05486bf..fabe73c6a 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2977" + #define SD2_REVISION_NR "2978" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 6dccce558..405205632 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -1329,6 +1329,7 @@ UPDATE creature_template SET ScriptName='npc_mimiron_flames' WHERE entry IN (343 UPDATE creature_template SET ScriptName='boss_leviathan_mk2_turret' WHERE entry=34071; UPDATE creature_template SET ScriptName='npc_computer' WHERE entry=34143; UPDATE gameobject_template SET ScriptName='go_big_red_button' WHERE entry=194739; +UPDATE creature_template SET ScriptName='npc_ulduar_keeper' WHERE entry IN (33241,33242,33244,33213); UPDATE creature_template SET ScriptName='boss_sara' WHERE entry=33134; UPDATE creature_template SET ScriptName='npc_ominous_cloud' WHERE entry=33292; UPDATE creature_template SET ScriptName='npc_voice_yogg_saron' WHERE entry=33280; diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 11fe9676f..e6c5813b4 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -3372,8 +3372,9 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1603010,'Allies of Nature have appeared!',0,3,0,0,'freya EMOTE_ALLIES_NATURE'), (-1603011,'The %s withers into the earth and begins to regenerate.',0,2,0,0,'freya EMOTE_REGEN_ALLIES'), -(-1603012,'Freya begins to cast Ground Tremor!',0,3,0,0,'freya EMOTE_TREMOR'), -(-1603013,'Freya casts Strenghtened Iron Roots!',0,3,0,0,'freya EMOTE_IRON_ROOTS'), + +(-1603012,'As you wish, $N.',0,0,0,0,'keeper SAY_KEEPER_ACTIVE'), +(-1603013,'REUSE ME',0,0,0,0,'REUSE ME'), (-1603014,'Matron, the Conservatory has been breached!',15483,1,0,0,'brightleaf SAY_AGGRO_BRIGHT'), (-1603015,'Fertilizer.',15485,1,0,0,'brightleaf SAY_SLAY_1_BRIGHT'), @@ -4734,7 +4735,10 @@ INSERT INTO gossip_texts (entry,content_default,comment) VALUES (-3603009,'We are ready to help!','Expedition Commander GOSSIP_ITEM_START_RAZORSCALE'), (-3603010,'Activate secondary defensive systems.','Lore Keeper of Norgannon GOSSIP_ITEM_ACTIVATE_SYSTEMS'), (-3603011,'Confirmed.','Lore Keeper of Norgannon GOSSIP_ITEM_CONFIRMED'), -(-3603012,'We\'re ready. Begin the assault!','Brann Bronzebeard GOSSIP_ITEM_BEGIN_ASSAULT'); +(-3603012,'We\'re ready. Begin the assault!','Brann Bronzebeard GOSSIP_ITEM_BEGIN_ASSAULT'), + +(-3603013,'Lend us your aid, keeper. Together we will defeat Yogg-Saron.','Ulduar Keeper GOSSIP_ITEM_LEND_AID'), +(-3603014,'Yes.','Ulduar Keeper GOSSIP_ITEM_KEEPER_CONFIRM'); -- -3 608 000 VIOLET HOLD INSERT INTO gossip_texts (entry,content_default,comment) VALUES diff --git a/sql/updates/r2978_mangos.sql b/sql/updates/r2978_mangos.sql new file mode 100644 index 000000000..e3e63c8bb --- /dev/null +++ b/sql/updates/r2978_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_ulduar_keeper' WHERE entry IN (33241,33242,33244,33213); diff --git a/sql/updates/r2978_scriptdev2.sql b/sql/updates/r2978_scriptdev2.sql new file mode 100644 index 000000000..66bc7c99d --- /dev/null +++ b/sql/updates/r2978_scriptdev2.sql @@ -0,0 +1,8 @@ +DELETE FROM script_texts WHERE entry IN (-1603012,-1603013); +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1603012,'As you wish, $N.',0,0,0,0,'keeper SAY_KEEPER_ACTIVE'), +(-1603013,'REUSE ME',0,0,0,0,'REUSE ME'); +DELETE FROM gossip_texts WHERE entry IN (-3603013,-3603014); +INSERT INTO gossip_texts (entry,content_default,comment) VALUES +(-3603013,'Lend us your aid, keeper. Together we will defeat Yogg-Saron.','Ulduar Keeper GOSSIP_ITEM_LEND_AID'), +(-3603014,'Yes.','Ulduar Keeper GOSSIP_ITEM_KEEPER_CONFIRM'); From 7bb1d752ba38a6a628fef4750e06ea99c33cd701 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Wed, 13 Nov 2013 09:16:15 +0200 Subject: [PATCH 0989/1172] [2979] Fix Ame01 aggro texts Close #71 --- scripts/kalimdor/ungoro_crater.cpp | 7 ++++--- sd2_revision_nr.h | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/scripts/kalimdor/ungoro_crater.cpp b/scripts/kalimdor/ungoro_crater.cpp index a0ba1b178..6989542f4 100644 --- a/scripts/kalimdor/ungoro_crater.cpp +++ b/scripts/kalimdor/ungoro_crater.cpp @@ -22,6 +22,7 @@ SDCategory: Un'Goro Crater EndScriptData */ /* ContentData +npc_ame01 npc_ringo EndContentData */ @@ -81,9 +82,9 @@ struct MANGOS_DLL_DECL npc_ame01AI : public npc_escortAI switch (urand(0, 2)) { - case 0: DoScriptText(SAY_AME_AGGRO1, m_creature); break; - case 1: DoScriptText(SAY_AME_AGGRO2, m_creature); break; - case 2: DoScriptText(SAY_AME_AGGRO3, m_creature); break; + case 0: DoScriptText(SAY_AME_AGGRO1, m_creature, pWho); break; + case 1: DoScriptText(SAY_AME_AGGRO2, m_creature, pWho); break; + case 2: DoScriptText(SAY_AME_AGGRO3, m_creature, pWho); break; } } } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index fabe73c6a..0295209ce 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2978" + #define SD2_REVISION_NR "2979" #endif // __SD2_REVISION_NR_H__ From 3d15938c0e4ff2a1b3f6e57fff08076628c53284 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Mon, 16 Dec 2013 22:13:21 +0100 Subject: [PATCH 0990/1172] [2980] Implement script support for quest 12981 Close #84 --- scripts/world/spell_scripts.cpp | 26 ++++++++++++++++++++++++++ sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 2 +- sql/updates/r2980_mangos.sql | 1 + 4 files changed, 29 insertions(+), 2 deletions(-) create mode 100644 sql/updates/r2980_mangos.sql diff --git a/scripts/world/spell_scripts.cpp b/scripts/world/spell_scripts.cpp index 6b9be47ba..096c9921f 100644 --- a/scripts/world/spell_scripts.cpp +++ b/scripts/world/spell_scripts.cpp @@ -43,6 +43,7 @@ spell 51331 spell 51332 spell 51366 spell 52090 +spell 56099 EndContentData */ #include "precompiled.h" @@ -342,6 +343,12 @@ enum SPELL_MELODIOUS_RAPTURE_VISUAL = 21051, NPC_DEEPRUN_RAT = 13016, NPC_ENTHRALLED_DEEPRUN_RAT = 13017, + + // quest 12981 + SPELL_THROW_ICE = 56099, + SPELL_FROZEN_IRON_SCRAP = 56101, + NPC_SMOLDERING_SCRAP_BUNNY = 30169, + GO_SMOLDERING_SCRAP = 192124, }; bool EffectAuraDummy_spell_aura_dummy_npc(const Aura* pAura, bool bApply) @@ -1023,6 +1030,25 @@ bool EffectDummyCreature_spell_dummy_npc(Unit* pCaster, uint32 uiSpellId, SpellE } return true; } + case SPELL_THROW_ICE: + { + if (uiEffIndex == EFFECT_INDEX_0) + { + if (pCreatureTarget->GetEntry() != NPC_SMOLDERING_SCRAP_BUNNY) + return true; + + if (GameObject* pScrap = GetClosestGameObjectWithEntry(pCreatureTarget, GO_SMOLDERING_SCRAP, 5.0f)) + { + if (pScrap->GetRespawnTime() != 0) + return true; + + pCreatureTarget->CastSpell(pCreatureTarget, SPELL_FROZEN_IRON_SCRAP, true); + pScrap->SetLootState(GO_JUST_DEACTIVATED); + pCreatureTarget->ForcedDespawn(1000); + } + } + return true; + } } return false; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 0295209ce..a0ac22982 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2979" + #define SD2_REVISION_NR "2980" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 405205632..76b2e385f 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -164,7 +164,7 @@ UPDATE creature_template SET ScriptName='spell_dummy_npc' WHERE entry IN ( -- outland 16880,16518,16847,17157,17326,17654,18879,21729,22105,24918,24922,25084,25085, -- northrend -23678,25752,25753,25758,25792,25793,26268,26270,26421,26616,26643,26841,26924,27122,27808,28053,28054,28068,28093,28465,28600,29319,29327,29329,29330,29338,30146,32149); +23678,25752,25753,25758,25792,25793,26268,26270,26421,26616,26643,26841,26924,27122,27808,28053,28054,28068,28093,28465,28600,29319,29327,29329,29330,29338,30146,30169,32149); UPDATE gameobject_template SET ScriptName='spell_dummy_go' WHERE entry IN (181616,186949); diff --git a/sql/updates/r2980_mangos.sql b/sql/updates/r2980_mangos.sql new file mode 100644 index 000000000..c25fc0082 --- /dev/null +++ b/sql/updates/r2980_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='spell_dummy_npc' WHERE entry IN (30169); From 58728a10c2e2c067a90b594ca74cdf386ffe561d Mon Sep 17 00:00:00 2001 From: Xfurry Date: Mon, 16 Dec 2013 23:02:10 +0100 Subject: [PATCH 0991/1172] [2981] Implement script support for quest 12977. Also remove forgotten scriptname from [2973] Close #83 --- scripts/northrend/storm_peaks.cpp | 90 ++++++++++++++++++++++++++++++- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 2 + sql/updates/r2981_mangos.sql | 3 ++ 4 files changed, 94 insertions(+), 3 deletions(-) create mode 100644 sql/updates/r2981_mangos.sql diff --git a/scripts/northrend/storm_peaks.cpp b/scripts/northrend/storm_peaks.cpp index df23ed934..30af59e76 100644 --- a/scripts/northrend/storm_peaks.cpp +++ b/scripts/northrend/storm_peaks.cpp @@ -16,16 +16,102 @@ /* ScriptData SDName: Storm_Peaks -SD%Complete: 0 -SDComment: Placeholder +SD%Complete: 100 +SDComment: Quest support: 12977. SDCategory: Storm Peaks EndScriptData */ /* ContentData +npc_floating_spirit +npc_restless_frostborn EndContentData */ #include "precompiled.h" +/*###### +## npc_floating_spirit +######*/ + +enum +{ + SPELL_BLOW_HODIRS_HORN = 55983, + SPELL_SUMMON_FROST_GIANG_SPIRIT = 55986, + SPELL_SUMMON_FROST_WARRIOR_SPIRIT = 55991, + SPELL_SUMMON_FROST_GHOST_SPIRIT = 55992, + + NPC_FROST_GIANT_GHOST_KC = 30138, + NPC_FROST_DWARF_GHOST_KC = 30139, + + NPC_NIFFELEM_FOREFATHER = 29974, + NPC_FROSTBORN_WARRIOR = 30135, + NPC_FROSTBORN_GHOST = 30144, +}; + +struct MANGOS_DLL_DECL npc_floating_spiritAI : public ScriptedAI +{ + npc_floating_spiritAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } + + void Reset() override + { + // Simple animation for the floating spirit + m_creature->SetLevitate(true); + m_creature->ForcedDespawn(5000); + + m_creature->GetMotionMaster()->MovePoint(0, m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ() + 50.0f); + } +}; + +CreatureAI* GetAI_npc_floating_spirit(Creature* pCreature) +{ + return new npc_floating_spiritAI(pCreature); +} + +/*###### +## npc_restless_frostborn +######*/ + +bool EffectDummyCreature_npc_restless_frostborn(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget, ObjectGuid /*originalCasterGuid*/) +{ + if (uiSpellId == SPELL_BLOW_HODIRS_HORN && uiEffIndex == EFFECT_INDEX_0 && !pCreatureTarget->isAlive() && pCaster->GetTypeId() == TYPEID_PLAYER) + { + uint32 uiCredit = 0; + uint32 uiSpawnSpell = 0; + switch (pCreatureTarget->GetEntry()) + { + case NPC_NIFFELEM_FOREFATHER: + uiCredit = NPC_FROST_GIANT_GHOST_KC; + uiSpawnSpell = SPELL_SUMMON_FROST_GIANG_SPIRIT; + break; + case NPC_FROSTBORN_WARRIOR: + uiCredit = NPC_FROST_DWARF_GHOST_KC; + uiSpawnSpell = SPELL_SUMMON_FROST_WARRIOR_SPIRIT; + break; + case NPC_FROSTBORN_GHOST: + uiCredit = NPC_FROST_DWARF_GHOST_KC; + uiSpawnSpell = SPELL_SUMMON_FROST_GHOST_SPIRIT; + break; + } + + // spawn the spirit and give the credit; spirit animation is handled by the script above + pCaster->CastSpell(pCaster, uiSpawnSpell, true); + ((Player*)pCaster)->KilledMonsterCredit(uiCredit); + return true; + } + + return false; +} + void AddSC_storm_peaks() { + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "npc_floating_spirit"; + pNewScript->GetAI = &GetAI_npc_floating_spirit; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_restless_frostborn"; + pNewScript->pEffectDummyNPC = &EffectDummyCreature_npc_restless_frostborn; + pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index a0ac22982..7d5223844 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2980" + #define SD2_REVISION_NR "2981" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 76b2e385f..5ebbbee0f 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -1060,6 +1060,8 @@ UPDATE creature_template SET ScriptName='npc_deathstalker_faerleia' WHERE entry= UPDATE creature_template SET ScriptName='npc_kaya' WHERE entry=11856; /* STORM PEAKS */ +UPDATE creature_template SET ScriptName='npc_floating_spirit' WHERE entry IN (30141,30143,30145); +UPDATE creature_template SET ScriptName='npc_restless_frostborn' WHERE entry IN (29974,30135,30144); /* STORMWIND CITY */ UPDATE creature_template SET ScriptName='npc_bartleby' WHERE entry=6090; diff --git a/sql/updates/r2981_mangos.sql b/sql/updates/r2981_mangos.sql new file mode 100644 index 000000000..739d66e07 --- /dev/null +++ b/sql/updates/r2981_mangos.sql @@ -0,0 +1,3 @@ +UPDATE creature_template SET ScriptName='npc_floating_spirit' WHERE entry IN (30141,30143,30145); +UPDATE creature_template SET ScriptName='npc_restless_frostborn' WHERE entry IN (29974,30135,30144); +UPDATE creature_template SET ScriptName='' WHERE entry=30996; From 17eb305a10577d44a28822f5ee86b0dde689bcdb Mon Sep 17 00:00:00 2001 From: Xfurry Date: Tue, 17 Dec 2013 00:46:22 +0100 Subject: [PATCH 0992/1172] [2982] Implement script support for quest 11590. Close #75 --- scripts/northrend/borean_tundra.cpp | 75 ++++++++++++++++++++++++++++- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 2 + sql/updates/r2982_mangos.sql | 2 + 4 files changed, 79 insertions(+), 2 deletions(-) create mode 100644 sql/updates/r2982_mangos.sql diff --git a/scripts/northrend/borean_tundra.cpp b/scripts/northrend/borean_tundra.cpp index 6b6b66fdf..7b119d9a1 100644 --- a/scripts/northrend/borean_tundra.cpp +++ b/scripts/northrend/borean_tundra.cpp @@ -17,7 +17,7 @@ /* ScriptData SDName: Borean_Tundra SD%Complete: 100 -SDComment: Quest support: 11865, 11728, 11897, 11570 +SDComment: Quest support: 11570, 11590, 11728, 11865, 11897. SDCategory: Borean Tundra EndScriptData */ @@ -25,6 +25,7 @@ EndScriptData */ npc_nesingwary_trapper npc_sinkhole_kill_credit npc_lurgglbr +npc_beryl_sorcerer EndContentData */ #include "precompiled.h" @@ -518,6 +519,68 @@ CreatureAI* GetAI_npc_lurgglbr(Creature* pCreature) return new npc_lurgglbrAI(pCreature); } +/*##### +# npc_beryl_sorcerer +#####*/ + +enum +{ + SPELL_ARCANE_CHAINS = 45611, + SPELL_ARCANE_CHAINS_CHANNEL = 45630, + SPELL_SUMMON_CHAINS_CHARACTER = 45625, // triggers 45626 + // SPELL_ENSLAVED_ARCANE_CHAINS = 45632, // chain visual - purpose unk, probably used on quest end + + NPC_BERYL_SORCERER = 25316, + NPC_CAPTURED_BERYL_SORCERER = 25474, +}; + +bool EffectAuraDummy_npc_beryl_sorcerer(const Aura* pAura, bool bApply) +{ + if (pAura->GetId() == SPELL_ARCANE_CHAINS) + { + if (pAura->GetEffIndex() != EFFECT_INDEX_0 || !bApply) + return false; + + Creature* pCreature = (Creature*)pAura->GetTarget(); + Unit* pCaster = pAura->GetCaster(); + if (!pCreature || !pCaster || pCaster->GetTypeId() != TYPEID_PLAYER || pCreature->GetEntry() != NPC_BERYL_SORCERER) + return false; + + // only for wounded creatures + if (pCreature->GetHealthPercent() > 30.0f) + return false; + + // spawn the captured sorcerer, apply dummy aura on the summoned and despawn + pCaster->CastSpell(pCreature, SPELL_SUMMON_CHAINS_CHARACTER, true); + pCaster->CastSpell(pCaster, SPELL_ARCANE_CHAINS_CHANNEL, true); + pCreature->ForcedDespawn(); + return true; + } + + return false; +} + +bool EffectAuraDummy_npc_captured_beryl_sorcerer(const Aura* pAura, bool bApply) +{ + if (pAura->GetId() == SPELL_ARCANE_CHAINS_CHANNEL) + { + if (pAura->GetEffIndex() != EFFECT_INDEX_0 || !bApply) + return false; + + Creature* pCreature = (Creature*)pAura->GetTarget(); + Unit* pCaster = pAura->GetCaster(); + if (!pCreature || !pCaster || pCaster->GetTypeId() != TYPEID_PLAYER || pCreature->GetEntry() != NPC_CAPTURED_BERYL_SORCERER) + return false; + + // follow the caster + ((Player*)pCaster)->KilledMonsterCredit(NPC_CAPTURED_BERYL_SORCERER); + pCreature->GetMotionMaster()->MoveFollow(pCaster, pCreature->GetDistance(pCaster), M_PI_F - pCreature->GetAngle(pCaster)); + return true; + } + + return false; +} + void AddSC_borean_tundra() { Script* pNewScript; @@ -544,4 +607,14 @@ void AddSC_borean_tundra() pNewScript->GetAI = &GetAI_npc_lurgglbr; pNewScript->pQuestAcceptNPC = &QuestAccept_npc_lurgglbr; pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_beryl_sorcerer"; + pNewScript->pEffectAuraDummy = &EffectAuraDummy_npc_beryl_sorcerer; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_captured_beryl_sorcerer"; + pNewScript->pEffectAuraDummy = &EffectAuraDummy_npc_captured_beryl_sorcerer; + pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 7d5223844..8271bc6df 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2981" + #define SD2_REVISION_NR "2982" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 5ebbbee0f..d6088f876 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -371,6 +371,8 @@ UPDATE creature_template SET ScriptName='npc_nesingwary_trapper' WHERE entry=258 UPDATE creature_template SET ScriptName='npc_oil_stained_wolf' WHERE entry=25791; UPDATE creature_template SET ScriptName='npc_sinkhole_kill_credit' WHERE entry IN (26248,26249); UPDATE creature_template SET ScriptName='npc_lurgglbr' WHERE entry=25208; +UPDATE creature_template SET ScriptName='npc_beryl_sorcerer' WHERE entry=25316; +UPDATE creature_template SET ScriptName='npc_captured_beryl_sorcerer' WHERE entry=25474; /* BURNING STEPPES */ UPDATE creature_template SET ScriptName='npc_ragged_john' WHERE entry=9563; diff --git a/sql/updates/r2982_mangos.sql b/sql/updates/r2982_mangos.sql new file mode 100644 index 000000000..c558ac502 --- /dev/null +++ b/sql/updates/r2982_mangos.sql @@ -0,0 +1,2 @@ +UPDATE creature_template SET ScriptName='npc_beryl_sorcerer' WHERE entry=25316; +UPDATE creature_template SET ScriptName='npc_captured_beryl_sorcerer' WHERE entry=25474; From 69456a53dadcc040ada3d08218f6cdf49bfca985 Mon Sep 17 00:00:00 2001 From: Cyberium Date: Sun, 29 Dec 2013 12:15:54 +0100 Subject: [PATCH 0993/1172] [2983] Fix compile for CMaNGOS 12587 Thanks to dbauz for pointing. Requires CMaNGOS [12587] Signed-off-by: Schmoozerd --- ScriptMgr.cpp | 6 +++--- sd2_revision_nr.h | 2 +- sql/scriptdev2_script_full.sql | 2 +- sql/updates/r2983_scriptdev2.sql | 1 + 4 files changed, 6 insertions(+), 5 deletions(-) create mode 100644 sql/updates/r2983_scriptdev2.sql diff --git a/ScriptMgr.cpp b/ScriptMgr.cpp index b496a479d..46185aabd 100644 --- a/ScriptMgr.cpp +++ b/ScriptMgr.cpp @@ -202,7 +202,7 @@ void DoOrSimulateScriptTextForMap(int32 iTextEntry, uint32 uiCreatureEntry, Map* } debug_log("SD2: DoOrSimulateScriptTextForMap: text entry=%i, Sound=%u, Type=%u, Language=%u, Emote=%u", - iTextEntry, pData->SoundId, pData->Type, pData->Language, pData->Emote); + iTextEntry, pData->SoundId, pData->Type, pData->LanguageId, pData->Emote); if (pData->Type != CHAT_TYPE_ZONE_YELL) { @@ -214,9 +214,9 @@ void DoOrSimulateScriptTextForMap(int32 iTextEntry, uint32 uiCreatureEntry, Map* pMap->PlayDirectSoundToMap(pData->SoundId); if (pCreatureSource) // If provided pointer for sayer, use direct version - pMap->MonsterYellToMap(pCreatureSource->GetObjectGuid(), iTextEntry, pData->Language, pTarget); + pMap->MonsterYellToMap(pCreatureSource->GetObjectGuid(), iTextEntry, pData->LanguageId, pTarget); else // Simulate yell - pMap->MonsterYellToMap(pInfo, iTextEntry, pData->Language, pTarget); + pMap->MonsterYellToMap(pInfo, iTextEntry, pData->LanguageId, pTarget); } //********************************* diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 8271bc6df..d06114c38 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2982" + #define SD2_REVISION_NR "2983" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index e6c5813b4..da89b576a 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -3,7 +3,7 @@ -- DELETE FROM sd2_db_version; -INSERT INTO sd2_db_version (version) VALUES ('ScriptDev2 (for CMaNGOS 12550+) '); +INSERT INTO sd2_db_version (version) VALUES ('ScriptDev2 (for CMaNGOS 12587+) '); -- -- Below contains data for table `script_texts` mainly used in C++ parts. diff --git a/sql/updates/r2983_scriptdev2.sql b/sql/updates/r2983_scriptdev2.sql new file mode 100644 index 000000000..98f8c428c --- /dev/null +++ b/sql/updates/r2983_scriptdev2.sql @@ -0,0 +1 @@ +UPDATE sd2_db_version SET version='ScriptDev2 (for CMaNGOS 12587+) '; From bad6a36440a95c8e28712cae1346a2214fc32195 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sat, 18 Jan 2014 23:44:24 +0100 Subject: [PATCH 0994/1172] [2984] Implement script support for quests 11919 and 11940. Based on the original work of @virusav Close #76 --- scripts/northrend/borean_tundra.cpp | 264 +++++++++++++++++++++++++++- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 + sql/updates/r2984_mangos.sql | 1 + 4 files changed, 266 insertions(+), 2 deletions(-) create mode 100644 sql/updates/r2984_mangos.sql diff --git a/scripts/northrend/borean_tundra.cpp b/scripts/northrend/borean_tundra.cpp index 7b119d9a1..a734c855d 100644 --- a/scripts/northrend/borean_tundra.cpp +++ b/scripts/northrend/borean_tundra.cpp @@ -17,7 +17,7 @@ /* ScriptData SDName: Borean_Tundra SD%Complete: 100 -SDComment: Quest support: 11570, 11590, 11728, 11865, 11897. +SDComment: Quest support: 11570, 11590, 11728, 11865, 11897, 11919, 11940. SDCategory: Borean Tundra EndScriptData */ @@ -26,11 +26,13 @@ npc_nesingwary_trapper npc_sinkhole_kill_credit npc_lurgglbr npc_beryl_sorcerer +npc_nexus_drake_hatchling EndContentData */ #include "precompiled.h" #include "escort_ai.h" #include "TemporarySummon.h" +#include "follower_ai.h" /*###### ## npc_nesingwary_trapper @@ -581,6 +583,259 @@ bool EffectAuraDummy_npc_captured_beryl_sorcerer(const Aura* pAura, bool bApply) return false; } +/*###### +## npc_nexus_drake_hatchling +######*/ + +enum +{ + // combat spells + SPELL_INTANGIBLE_PRESENCE = 36513, + SPELL_NETHERBREATH = 36631, + + // quest start spells + SPELL_DRAKE_HARPOON = 46607, // initial spell + SPELL_RED_DRAGONBLOOD = 46620, // applied by aura 46607 + SPELL_CAPTURE_TRIGGER = 46673, // notify the drake that it was captured; triggered by aura 46620 expire + SPELL_SUBDUED = 46675, // visual spell; triggered by spell 46673 + SPELL_DRAKE_HATCHLING_SUBDUED = 46691, // inform player that drake has been captured; triggered by spell 46673 + SPELL_DRAKE_VOMIT_PERIODIC = 46678, // visual spell; triggered by spell 46673 + + // quest completion spells + SPELL_DRAKE_TURN_IN = 46696, // notify the drake that quest is finised + SPELL_STRIP_AURAS = 46693, // remove all quest auras + SPELL_DRAKE_COMPLETION_PING = 46702, + SPELL_RAELORASZ_FIREBALL = 46704, + SPELL_COMPLETE_IMMOLATION = 46703, + + NPC_RAELORASZ = 26117, // quest giver / taker + NPC_NEXUS_DRAKE_HATCHLING = 26127, + NPC_COLDARRA_DRAKE_HUNT_INVISMAN = 26175, // quest credit + + QUEST_DRAKE_HUNT = 11919, + QUEST_DRAKE_HUNT_DAILY = 11940, + + FACTION_FRIENDLY = 35, +}; + +struct MANGOS_DLL_DECL npc_nexus_drake_hatchlingAI : public FollowerAI +{ + npc_nexus_drake_hatchlingAI(Creature* pCreature) : FollowerAI(pCreature) { Reset(); } + + uint32 m_uiNetherbreathTimer; + uint32 m_uiPresenceTimer; + uint32 m_uiSubduedTimer; + + void Reset() override + { + m_uiNetherbreathTimer = urand(2000, 4000); + m_uiPresenceTimer = urand(15000, 17000); + m_uiSubduedTimer = 0; + } + + void EnterEvadeMode() override + { + // force check for evading when the faction is changed + if (m_uiSubduedTimer) + return; + + FollowerAI::EnterEvadeMode(); + } + + void MoveInLineOfSight(Unit* pWho) override + { + FollowerAI::MoveInLineOfSight(pWho); + + if (!m_creature->HasAura(SPELL_SUBDUED) || m_creature->getVictim()) + return; + + if (pWho->GetEntry() == NPC_COLDARRA_DRAKE_HUNT_INVISMAN && m_creature->IsWithinDistInMap(pWho, 20.0f)) + { + Player* pPlayer = GetLeaderForFollower(); + if (!pPlayer || !pPlayer->HasAura(SPELL_DRAKE_HATCHLING_SUBDUED)) + return; + + pWho->CastSpell(pPlayer, SPELL_STRIP_AURAS, true); + + // give kill credit, mark the follow as completed and start the final event + pPlayer->KilledMonsterCredit(NPC_COLDARRA_DRAKE_HUNT_INVISMAN); + pPlayer->CastSpell(m_creature, SPELL_DRAKE_TURN_IN, true); + SetFollowComplete(true); + } + } + + void JustRespawned() override + { + // reset stand state if required + m_creature->SetStandState(UNIT_STAND_STATE_STAND); + + FollowerAI::JustRespawned(); + } + + void ReceiveAIEvent(AIEventType eventType, Creature* /*pSender*/, Unit* pInvoker, uint32 /*uiMiscValue*/) override + { + // start following + if (eventType == AI_EVENT_START_EVENT && pInvoker->GetTypeId() == TYPEID_PLAYER) + { + StartFollow((Player*)pInvoker); + m_uiSubduedTimer = 3 * MINUTE * IN_MILLISECONDS; + } + // timeout; quest failed + else if (eventType == AI_EVENT_CUSTOM_A) + { + // check if the quest isn't already completed + if (!HasFollowState(STATE_FOLLOW_COMPLETE)) + { + // force reset + JustRespawned(); + ScriptedAI::EnterEvadeMode(); + } + } + } + + void UpdateFollowerAI(const uint32 uiDiff) + { + if (m_uiSubduedTimer) + { + if (m_uiSubduedTimer <= uiDiff) + m_uiSubduedTimer = 0; + else + m_uiSubduedTimer -= uiDiff; + } + + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_uiNetherbreathTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_NETHERBREATH) == CAST_OK) + m_uiNetherbreathTimer = urand(17000, 20000); + } + else + m_uiNetherbreathTimer -= uiDiff; + + if (m_uiPresenceTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_INTANGIBLE_PRESENCE) == CAST_OK) + m_uiPresenceTimer = urand(18000, 20000); + } + else + m_uiPresenceTimer -= uiDiff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_npc_nexus_drake_hatchling(Creature* pCreature) +{ + return new npc_nexus_drake_hatchlingAI(pCreature); +} + +bool EffectAuraDummy_npc_nexus_drake_hatchling(const Aura* pAura, bool bApply) +{ + if (pAura->GetId() == SPELL_DRAKE_HARPOON) + { + if (pAura->GetEffIndex() != EFFECT_INDEX_0 || !bApply) + return false; + + Creature* pCreature = (Creature*)pAura->GetTarget(); + Unit* pCaster = pAura->GetCaster(); + if (!pCreature || !pCaster || pCaster->GetTypeId() != TYPEID_PLAYER || pCreature->GetEntry() != NPC_NEXUS_DRAKE_HATCHLING) + return false; + + // check if drake is already doing the quest + if (pCreature->HasAura(SPELL_RED_DRAGONBLOOD) || pCreature->HasAura(SPELL_SUBDUED)) + return false; + + pCaster->CastSpell(pCreature, SPELL_RED_DRAGONBLOOD, true); + return true; + } + else if (pAura->GetId() == SPELL_RED_DRAGONBLOOD && pAura->GetEffIndex() == EFFECT_INDEX_0) + { + Creature* pCreature = (Creature*)pAura->GetTarget(); + Unit* pCaster = pAura->GetCaster(); + if (!pCreature || !pCaster || pCaster->GetTypeId() != TYPEID_PLAYER || pCreature->GetEntry() != NPC_NEXUS_DRAKE_HATCHLING) + return false; + + // start attacking on apply and capture on aura expire + if (bApply) + pCreature->AI()->AttackStart(pCaster); + else + pCaster->CastSpell(pCreature, SPELL_CAPTURE_TRIGGER, true); + + return true; + } + else if (pAura->GetId() == SPELL_SUBDUED && pAura->GetEffIndex() == EFFECT_INDEX_0 && !bApply) + { + Creature* pCreature = (Creature*)pAura->GetTarget(); + if (!pCreature || pCreature->GetEntry() != NPC_NEXUS_DRAKE_HATCHLING) + return false; + + // aura expired - evade + pCreature->AI()->SendAIEvent(AI_EVENT_CUSTOM_A, pCreature, pCreature); + return true; + } + + return false; +} + +bool EffectDummyCreature_npc_nexus_drake_hatchling(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget, ObjectGuid /*originalCasterGuid*/) +{ + if (uiSpellId == SPELL_CAPTURE_TRIGGER && uiEffIndex == EFFECT_INDEX_0 && pCreatureTarget->GetEntry() == NPC_NEXUS_DRAKE_HATCHLING) + { + if (pCaster->GetTypeId() != TYPEID_PLAYER) + return true; + + if (pCaster->HasAura(SPELL_DRAKE_HATCHLING_SUBDUED) || pCreatureTarget->HasAura(SPELL_SUBDUED)) + return true; + + Player* pPlayer = (Player*)pCaster; + if (!pPlayer) + return true; + + // check the quest + if (pPlayer->GetQuestStatus(QUEST_DRAKE_HUNT) != QUEST_STATUS_INCOMPLETE && pPlayer->GetQuestStatus(QUEST_DRAKE_HUNT_DAILY) != QUEST_STATUS_INCOMPLETE) + return true; + + // evade and set friendly and start following + pCreatureTarget->SetFactionTemporary(FACTION_FRIENDLY, TEMPFACTION_RESTORE_REACH_HOME | TEMPFACTION_RESTORE_RESPAWN); + pCreatureTarget->DeleteThreatList(); + pCreatureTarget->CombatStop(true); + pCreatureTarget->AI()->SendAIEvent(AI_EVENT_START_EVENT, pCaster, pCreatureTarget); + + // cast visual spells + pCreatureTarget->CastSpell(pCreatureTarget, SPELL_DRAKE_VOMIT_PERIODIC, true); + pCreatureTarget->CastSpell(pCreatureTarget, SPELL_SUBDUED, true); + pCreatureTarget->CastSpell(pCaster, SPELL_DRAKE_HATCHLING_SUBDUED, true); + + return true; + } + else if (uiSpellId == SPELL_DRAKE_TURN_IN && uiEffIndex == EFFECT_INDEX_0 && pCreatureTarget->GetEntry() == NPC_NEXUS_DRAKE_HATCHLING) + { + if (Creature* pRaelorasz = GetClosestCreatureWithEntry(pCreatureTarget, NPC_RAELORASZ, 30.0f)) + { + // Inform Raelorasz and move in front of him + pCreatureTarget->CastSpell(pRaelorasz, SPELL_DRAKE_COMPLETION_PING, true); + + float fX, fY, fZ; + pRaelorasz->GetContactPoint(pCreatureTarget, fX, fY, fZ, CONTACT_DISTANCE); + pCreatureTarget->GetMotionMaster()->Clear(true, true); + pCreatureTarget->GetMotionMaster()->MovePoint(0, fX, fY, fZ); + return true; + } + } + else if (uiSpellId == SPELL_RAELORASZ_FIREBALL && uiEffIndex == EFFECT_INDEX_0 && pCreatureTarget->GetEntry() == NPC_NEXUS_DRAKE_HATCHLING) + { + pCreatureTarget->CastSpell(pCreatureTarget, SPELL_COMPLETE_IMMOLATION, true); + pCreatureTarget->SetStandState(UNIT_STAND_STATE_DEAD); + pCreatureTarget->ForcedDespawn(10000); + + return true; + } + + return false; +} + void AddSC_borean_tundra() { Script* pNewScript; @@ -617,4 +872,11 @@ void AddSC_borean_tundra() pNewScript->Name = "npc_captured_beryl_sorcerer"; pNewScript->pEffectAuraDummy = &EffectAuraDummy_npc_captured_beryl_sorcerer; pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_nexus_drake_hatchling"; + pNewScript->GetAI = &GetAI_npc_nexus_drake_hatchling; + pNewScript->pEffectAuraDummy = &EffectAuraDummy_npc_nexus_drake_hatchling; + pNewScript->pEffectDummyNPC = &EffectDummyCreature_npc_nexus_drake_hatchling; + pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index d06114c38..c7d2e3943 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2983" + #define SD2_REVISION_NR "2984" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index d6088f876..445de7495 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -373,6 +373,7 @@ UPDATE creature_template SET ScriptName='npc_sinkhole_kill_credit' WHERE entry I UPDATE creature_template SET ScriptName='npc_lurgglbr' WHERE entry=25208; UPDATE creature_template SET ScriptName='npc_beryl_sorcerer' WHERE entry=25316; UPDATE creature_template SET ScriptName='npc_captured_beryl_sorcerer' WHERE entry=25474; +UPDATE creature_template SET ScriptName='npc_nexus_drake_hatchling' WHERE entry=26127; /* BURNING STEPPES */ UPDATE creature_template SET ScriptName='npc_ragged_john' WHERE entry=9563; diff --git a/sql/updates/r2984_mangos.sql b/sql/updates/r2984_mangos.sql new file mode 100644 index 000000000..ec4cf2298 --- /dev/null +++ b/sql/updates/r2984_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_nexus_drake_hatchling' WHERE entry=26127; From 78646e1cae4b64dd7f32863826e27370a416c7c4 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Wed, 12 Mar 2014 23:30:16 +0100 Subject: [PATCH 0995/1172] [2985] Implement script support for quest 11090 Thanks to @grz3s for providing the necessary data --- scripts/outland/nagrand.cpp | 174 ++++++++++++++++++++++++++++++- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 + sql/scriptdev2_script_full.sql | 5 +- sql/updates/r2985_mangos.sql | 1 + sql/updates/r2985_scriptdev2.sql | 4 + 6 files changed, 183 insertions(+), 4 deletions(-) create mode 100644 sql/updates/r2985_mangos.sql create mode 100644 sql/updates/r2985_scriptdev2.sql diff --git a/scripts/outland/nagrand.cpp b/scripts/outland/nagrand.cpp index f6aced08f..a2c59fd91 100644 --- a/scripts/outland/nagrand.cpp +++ b/scripts/outland/nagrand.cpp @@ -17,7 +17,7 @@ /* ScriptData SDName: Nagrand SD%Complete: 90 -SDComment: Quest support: 9868, 9918, 10085, 10646. +SDComment: Quest support: 9868, 9918, 10085, 10646, 11090. SDCategory: Nagrand EndScriptData */ @@ -25,6 +25,7 @@ EndScriptData */ mob_lump npc_maghar_captive npc_creditmarker_visit_with_ancestors +npc_rethhedron EndContentData */ #include "precompiled.h" @@ -342,9 +343,173 @@ CreatureAI* GetAI_npc_creditmarker_visit_with_ancestors(Creature* pCreature) } /*###### -## AddSC +## npc_rethhedron ######*/ +enum +{ + SAY_LOW_HP = -1000966, + SAY_EVENT_END = -1000967, + + SPELL_CRIPPLE = 41281, + SPELL_SHADOW_BOLT = 41280, + SPELL_ABYSSAL_TOSS = 41283, // summon npc 23416 at target position + SPELL_ABYSSAL_IMPACT = 41284, + // SPELL_GROUND_AIR_PULSE = 41270, // spell purpose unk + // SPELL_AGGRO_CHECK = 41285, // spell purpose unk + // SPELL_AGGRO_BURST = 41286, // spell purpose unk + + SPELL_COSMETIC_LEGION_RING = 41339, + SPELL_QUEST_COMPLETE = 41340, + + NPC_SPELLBINDER = 22342, + NPC_RETHHEDRONS_TARGET = 23416, + + POINT_ID_PORTAL_FRONT = 0, + POINT_ID_PORTAL = 1, +}; + +static const float afRethhedronPos[2][3] = +{ + {-1502.39f, 9772.33f, 200.421f}, + {-1557.93f, 9834.34f, 200.949f} +}; + +struct MANGOS_DLL_DECL npc_rethhedronAI : public ScriptedAI +{ + npc_rethhedronAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } + + uint32 m_uiCrippleTimer; + uint32 m_uiShadowBoltTimer; + uint32 m_uiAbyssalTossTimer; + uint32 m_uiDelayTimer; + + bool m_bLowHpYell; + bool m_bEventFinished; + + void Reset() override + { + m_uiCrippleTimer = urand(5000, 9000); + m_uiShadowBoltTimer = urand(1000, 3000); + m_uiAbyssalTossTimer = 0; + m_uiDelayTimer = 0; + + m_bLowHpYell = false; + m_bEventFinished = false; + } + + void AttackStart(Unit* pWho) override + { + if (m_creature->Attack(pWho, true)) + { + m_creature->AddThreat(pWho); + m_creature->SetInCombatWith(pWho); + pWho->SetInCombatWith(m_creature); + DoStartMovement(pWho, 30.0f); + } + } + + void DamageTaken(Unit* /*pDealer*/, uint32& uiDamage) override + { + // go to epilog at 10% health + if (!m_bEventFinished && m_creature->GetHealthPercent() < 10.0f) + { + m_creature->InterruptNonMeleeSpells(false); + m_creature->GetMotionMaster()->Clear(); + m_creature->GetMotionMaster()->MovePoint(POINT_ID_PORTAL_FRONT, afRethhedronPos[0][0], afRethhedronPos[0][1], afRethhedronPos[0][2]); + m_bEventFinished = true; + } + + // npc is not allowed to die + if (m_creature->GetHealth() < uiDamage) + uiDamage = 0; + } + + void MovementInform(uint32 uiMoveType, uint32 uiPointId) override + { + if (uiMoveType != POINT_MOTION_TYPE) + return; + + if (uiPointId == POINT_ID_PORTAL_FRONT) + { + DoScriptText(SAY_EVENT_END, m_creature); + m_creature->GetMotionMaster()->MoveIdle(); + m_uiDelayTimer = 2000; + } + else if (uiPointId == POINT_ID_PORTAL) + { + DoCastSpellIfCan(m_creature, SPELL_COSMETIC_LEGION_RING, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_QUEST_COMPLETE, CAST_TRIGGERED); + m_creature->GetMotionMaster()->MoveIdle(); + m_creature->ForcedDespawn(2000); + } + } + + void JustSummoned(Creature* pSummoned) override + { + if (pSummoned->GetEntry() == NPC_RETHHEDRONS_TARGET) + pSummoned->CastSpell(pSummoned, SPELL_ABYSSAL_IMPACT, true); + } + + void UpdateAI(const uint32 uiDiff) override + { + if (m_uiDelayTimer) + { + if (m_uiDelayTimer <= uiDiff) + { + m_creature->GetMotionMaster()->Clear(); + m_creature->GetMotionMaster()->MovePoint(POINT_ID_PORTAL, afRethhedronPos[1][0], afRethhedronPos[1][1], afRethhedronPos[1][2]); + m_uiDelayTimer = 0; + } + else + m_uiDelayTimer -= uiDiff; + } + + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_bEventFinished) + return; + + if (m_uiCrippleTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_CRIPPLE) == CAST_OK) + m_uiCrippleTimer = urand(20000, 30000); + } + else + m_uiCrippleTimer -= uiDiff; + + if (m_uiShadowBoltTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_SHADOW_BOLT) == CAST_OK) + m_uiShadowBoltTimer = urand(3000, 5000); + } + else + m_uiShadowBoltTimer -= uiDiff; + + if (m_uiAbyssalTossTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_ABYSSAL_TOSS) == CAST_OK) + m_uiAbyssalTossTimer = urand(500, 2000); + } + else + m_uiAbyssalTossTimer -= uiDiff; + + if (!m_bLowHpYell && m_creature->GetHealthPercent() < 40.0f) + { + DoScriptText(SAY_LOW_HP, m_creature); + m_bLowHpYell = true; + } + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_npc_rethhedron(Creature* pCreature) +{ + return new npc_rethhedronAI(pCreature); +} + void AddSC_nagrand() { Script* pNewScript; @@ -364,4 +529,9 @@ void AddSC_nagrand() pNewScript->Name = "npc_creditmarker_visit_with_ancestors"; pNewScript->GetAI = &GetAI_npc_creditmarker_visit_with_ancestors; pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_rethhedron"; + pNewScript->GetAI = &GetAI_npc_rethhedron; + pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index c7d2e3943..639ef0175 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2984" + #define SD2_REVISION_NR "2985" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 445de7495..d561a83e4 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -847,6 +847,7 @@ UPDATE creature_template SET ScriptName='npc_kyle_the_frenzied' WHERE entry=2361 UPDATE creature_template SET ScriptName='mob_lump' WHERE entry=18351; UPDATE creature_template SET ScriptName='npc_maghar_captive' WHERE entry=18210; UPDATE creature_template SET ScriptName='npc_creditmarker_visit_with_ancestors' WHERE entry IN (18840,18841,18842,18843); +UPDATE creature_template SET ScriptName='npc_rethhedron' WHERE entry=22357; /* NAXXRAMAS */ UPDATE instance_template SET ScriptName='instance_naxxramas' WHERE map=533; diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index da89b576a..420aeab6b 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -1041,7 +1041,10 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1000963,'%s looks at you for a moment, then motions for you to follow.',0,2,0,0,'cenarion sparrowhawk EMOTE_FOLLOW'), (-1000964,'%s surveys the ground for the buried raven stones.',0,2,0,0,'cenarion sparrowhawk EMOTE_SURVEY'), -(-1000965,'%s locates a buried raven stone.',0,2,0,0,'cenarion sparrowhawk EMOTE_LOCATE'); +(-1000965,'%s locates a buried raven stone.',0,2,0,0,'cenarion sparrowhawk EMOTE_LOCATE'), + +(-1000966,'I WILL CRUSH YOU LIKE A GNAT!',0,1,0,0,'reth\'hedron SAY_LOW_HP'), +(-1000967,'You will regret this, mortal! Reth\'hedron will return... I will have my vengeance!',0,1,0,53,'reth\'hedron SAY_EVENT_END'); -- -1 033 000 SHADOWFANG KEEP INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES diff --git a/sql/updates/r2985_mangos.sql b/sql/updates/r2985_mangos.sql new file mode 100644 index 000000000..75259cc54 --- /dev/null +++ b/sql/updates/r2985_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_rethhedron' WHERE entry=22357; diff --git a/sql/updates/r2985_scriptdev2.sql b/sql/updates/r2985_scriptdev2.sql new file mode 100644 index 000000000..94d0e8a85 --- /dev/null +++ b/sql/updates/r2985_scriptdev2.sql @@ -0,0 +1,4 @@ +DELETE FROM script_texts WHERE entry IN (-1000966,-1000967); +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1000966,'I WILL CRUSH YOU LIKE A GNAT!',0,1,0,0,'reth\'hedron SAY_LOW_HP'), +(-1000967,'You will regret this, mortal! Reth\'hedron will return... I will have my vengeance!',0,1,0,53,'reth\'hedron SAY_EVENT_END'); From 8ef22d9a9e23ce0f0635c71c6543cf4cad46880d Mon Sep 17 00:00:00 2001 From: Xfurry Date: Wed, 12 Mar 2014 23:46:32 +0100 Subject: [PATCH 0996/1172] [2986] Fix conflict between quest 8447 and 8733 Thanks to @cala for pointing the issue Close #94 --- .../eastern_kingdoms/sunken_temple/sunken_temple.cpp | 12 ++++++++---- sd2_revision_nr.h | 2 +- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/scripts/eastern_kingdoms/sunken_temple/sunken_temple.cpp b/scripts/eastern_kingdoms/sunken_temple/sunken_temple.cpp index 6b44ed877..96fd1d254 100644 --- a/scripts/eastern_kingdoms/sunken_temple/sunken_temple.cpp +++ b/scripts/eastern_kingdoms/sunken_temple/sunken_temple.cpp @@ -77,10 +77,14 @@ struct MANGOS_DLL_DECL npc_malfurionAI : public ScriptedAI { npc_malfurionAI(Creature* pCreature) : ScriptedAI(pCreature) { - DoScriptText(EMOTE_MALFURION1, m_creature); - m_uiSpeech = 0; - m_uiSayTimer = 3000; - m_creature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER); + // Only in Sunken Temple + if (m_creature->GetMap()->IsDungeon()) + { + DoScriptText(EMOTE_MALFURION1, m_creature); + m_uiSpeech = 0; + m_uiSayTimer = 3000; + m_creature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER); + } } uint32 m_uiSayTimer; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 639ef0175..36bb797bc 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2985" + #define SD2_REVISION_NR "2986" #endif // __SD2_REVISION_NR_H__ From a634c74b9bdaf38d4a0886d40b5fd85f8c026ef8 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Fri, 14 Mar 2014 23:57:25 +0100 Subject: [PATCH 0997/1172] [2987] Implement script support for quest 10310 Thanks to @ghost and Zharvek for providing the information. Based on the original work of zlokobni --- scripts/outland/netherstorm.cpp | 270 ++++++++++++++++++++++++++++++- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 + sql/scriptdev2_script_full.sql | 43 ++++- sql/updates/r2987_mangos.sql | 1 + sql/updates/r2987_scriptdev2.sql | 42 +++++ 6 files changed, 356 insertions(+), 3 deletions(-) create mode 100644 sql/updates/r2987_mangos.sql create mode 100644 sql/updates/r2987_scriptdev2.sql diff --git a/scripts/outland/netherstorm.cpp b/scripts/outland/netherstorm.cpp index 3134cae78..9988c1ac9 100644 --- a/scripts/outland/netherstorm.cpp +++ b/scripts/outland/netherstorm.cpp @@ -17,7 +17,7 @@ /* ScriptData SDName: Netherstorm SD%Complete: 80 -SDComment: Quest support: 10191, 10198, 10299, 10321, 10322, 10323, 10329, 10330, 10337, 10338, 10365(Shutting Down Manaforge), 10406, 10425, 10438, 10924. +SDComment: Quest support: 10191, 10198, 10299, 10310, 10321, 10322, 10323, 10329, 10330, 10337, 10338, 10365(Shutting Down Manaforge), 10406, 10425, 10438, 10924. SDCategory: Netherstorm EndScriptData */ @@ -30,6 +30,7 @@ npc_maxx_a_million npc_zeppit npc_protectorate_demolitionist npc_captured_vanguard +npc_drijya EndContentData */ #include "precompiled.h" @@ -1136,6 +1137,267 @@ bool QuestAccept_npc_captured_vanguard(Player* pPlayer, Creature* pCreature, con return true; } +/*###### +## npc_drijya +######*/ + +enum +{ + SAY_DRIJYA_START = -1000968, + SAY_DRIJYA_1 = -1000969, + SAY_DRIJYA_2 = -1000970, + SAY_DRIJYA_3 = -1000971, + SAY_DRIJYA_4 = -1000972, + SAY_DRIJYA_5 = -1000973, + SAY_DRIJYA_6 = -1000974, + SAY_DRIJYA_7 = -1000975, + SAY_DRIJYA_COMPLETE = -1000976, + + SPELL_SUMMON_SMOKE = 42456, // summon temp GO 185318 + SPELL_SUMMON_FIRE = 42467, // summon temp GO 185319 + SPELL_EXPLOSION_VISUAL = 42458, + + NPC_EXPLODE_TRIGGER = 20296, + NPC_TERROR_IMP = 20399, + NPC_LEGION_TROOPER = 20402, + NPC_LEGION_DESTROYER = 20403, + + // GO_SMOKE = 185318, + // GO_FIRE = 185317, // not sure if this one is used + // GO_BIG_FIRE = 185319, + + QUEST_ID_WARP_GATE = 10310, + + MAX_TROOPERS = 9, + MAX_IMPS = 6, +}; + +struct MANGOS_DLL_DECL npc_drijyaAI : public npc_escortAI +{ + npc_drijyaAI(Creature* pCreature) : npc_escortAI(pCreature) { Reset(); } + + uint8 m_uiSpawnCount; + uint32 m_uiSpawnImpTimer; + uint32 m_uiSpawnTrooperTimer; + uint32 m_uiSpawnDestroyerTimer; + uint32 m_uiDestroyingTimer; + + ObjectGuid m_explodeTriggerGuid; + + void Reset() override + { + if (!HasEscortState(STATE_ESCORT_ESCORTING)) + { + m_uiSpawnCount = 0; + m_uiSpawnImpTimer = 0; + m_uiSpawnTrooperTimer = 0; + m_uiSpawnDestroyerTimer = 0; + m_uiDestroyingTimer = 0; + } + } + + void AttackedBy(Unit* pWho) override + { + if (pWho->GetEntry() == NPC_TERROR_IMP || pWho->GetEntry() == NPC_LEGION_TROOPER || pWho->GetEntry() == NPC_LEGION_DESTROYER) + { + if (urand(0, 1)) + DoScriptText(SAY_DRIJYA_3, m_creature); + } + } + + void DoSpawnCreature(uint32 uiEntry) + { + if (Creature* pTrigger = m_creature->GetMap()->GetCreature(m_explodeTriggerGuid)) + m_creature->SummonCreature(uiEntry, pTrigger->GetPositionX(), pTrigger->GetPositionY(), pTrigger->GetPositionZ(), pTrigger->GetOrientation(), TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 10000); + } + + void JustSummoned(Creature* pSummoned) override + { + switch (pSummoned->GetEntry()) + { + case NPC_TERROR_IMP: + case NPC_LEGION_TROOPER: + case NPC_LEGION_DESTROYER: + pSummoned->AI()->AttackStart(m_creature); + break; + } + } + + void WaypointReached(uint32 uiPointId) override + { + switch (uiPointId) + { + case 0: + DoScriptText(SAY_DRIJYA_START, m_creature); + SetRun(); + break; + case 1: + DoScriptText(SAY_DRIJYA_1, m_creature); + break; + case 5: + DoScriptText(SAY_DRIJYA_2, m_creature); + break; + case 7: + SetEscortPaused(true); + m_uiDestroyingTimer = 60000; + m_uiSpawnImpTimer = 15000; + m_uiSpawnCount = 0; + m_creature->HandleEmoteCommand(EMOTE_STATE_WORK); + if (Creature* pTrigger = GetClosestCreatureWithEntry(m_creature, NPC_EXPLODE_TRIGGER, 30.0f)) + m_explodeTriggerGuid = pTrigger->GetObjectGuid(); + break; + case 8: + if (DoCastSpellIfCan(m_creature, SPELL_SUMMON_SMOKE) == CAST_OK) + { + if (Player* pPlayer = GetPlayerForEscort()) + m_creature->SetFacingToObject(pPlayer); + + DoScriptText(SAY_DRIJYA_4, m_creature); + } + break; + case 12: + SetEscortPaused(true); + m_uiDestroyingTimer = 60000; + m_uiSpawnTrooperTimer = 15000; + m_uiSpawnCount = 0; + m_creature->HandleEmoteCommand(EMOTE_STATE_WORK); + break; + case 13: + if (DoCastSpellIfCan(m_creature, SPELL_SUMMON_SMOKE) == CAST_OK) + { + if (Player* pPlayer = GetPlayerForEscort()) + m_creature->SetFacingToObject(pPlayer); + + DoScriptText(SAY_DRIJYA_5, m_creature); + } + break; + case 17: + SetEscortPaused(true); + m_uiDestroyingTimer = 60000; + m_uiSpawnDestroyerTimer = 15000; + m_creature->HandleEmoteCommand(EMOTE_STATE_WORK); + break; + case 18: + if (DoCastSpellIfCan(m_creature, SPELL_SUMMON_SMOKE) == CAST_OK) + { + if (Creature* pTrigger = m_creature->GetMap()->GetCreature(m_explodeTriggerGuid)) + m_creature->SetFacingToObject(pTrigger); + + DoScriptText(SAY_DRIJYA_6, m_creature); + } + break; + case 19: + if (Creature* pTrigger = m_creature->GetMap()->GetCreature(m_explodeTriggerGuid)) + { + pTrigger->CastSpell(pTrigger, SPELL_SUMMON_FIRE, true); + pTrigger->CastSpell(pTrigger, SPELL_EXPLOSION_VISUAL, true); + } + break; + case 20: + DoScriptText(SAY_DRIJYA_7, m_creature); + break; + case 23: + SetRun(false); + break; + case 27: + if (Player* pPlayer = GetPlayerForEscort()) + { + DoScriptText(SAY_DRIJYA_COMPLETE, m_creature, pPlayer); + pPlayer->GroupEventHappens(QUEST_ID_WARP_GATE, m_creature); + } + break; + } + } + + void ReceiveAIEvent(AIEventType eventType, Creature* /*pSender*/, Unit* pInvoker, uint32 uiMiscValue) override + { + if (eventType == AI_EVENT_START_ESCORT && pInvoker->GetTypeId() == TYPEID_PLAYER) + { + m_creature->SetFactionTemporary(FACTION_ESCORT_N_NEUTRAL_PASSIVE, TEMPFACTION_RESTORE_RESPAWN); + Start(false, (Player*)pInvoker, GetQuestTemplateStore(uiMiscValue), true); + } + } + + void UpdateEscortAI(const uint32 uiDiff) override + { + if (m_uiSpawnImpTimer) + { + if (m_uiSpawnImpTimer <= uiDiff) + { + DoSpawnCreature(NPC_TERROR_IMP); + ++m_uiSpawnCount; + + if (m_uiSpawnCount == MAX_IMPS) + m_uiSpawnImpTimer = 0; + else + m_uiSpawnImpTimer = 3500; + } + else + m_uiSpawnImpTimer -= uiDiff; + } + + if (m_uiSpawnTrooperTimer) + { + if (m_uiSpawnTrooperTimer <= uiDiff) + { + DoSpawnCreature(NPC_LEGION_TROOPER); + ++m_uiSpawnCount; + + if (m_uiSpawnCount == MAX_TROOPERS) + m_uiSpawnTrooperTimer = 0; + else + m_uiSpawnTrooperTimer = 3500; + } + else + m_uiSpawnTrooperTimer -= uiDiff; + } + + if (m_uiSpawnDestroyerTimer) + { + if (m_uiSpawnDestroyerTimer <= uiDiff) + { + DoSpawnCreature(NPC_LEGION_DESTROYER); + m_uiSpawnDestroyerTimer = 0; + } + else + m_uiSpawnDestroyerTimer -= uiDiff; + } + + if (m_uiDestroyingTimer) + { + if (m_uiDestroyingTimer <= uiDiff) + { + SetEscortPaused(false); + m_creature->HandleEmoteCommand(EMOTE_STATE_NONE); + m_uiDestroyingTimer = 0; + } + else + m_uiDestroyingTimer -= uiDiff; + } + + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_npc_drijya(Creature* pCreature) +{ + return new npc_drijyaAI(pCreature); +} + +bool QuestAccept_npc_drijya(Player* pPlayer, Creature* pCreature, const Quest* pQuest) +{ + if (pQuest->GetQuestId() == QUEST_ID_WARP_GATE) + { + pCreature->AI()->SendAIEvent(AI_EVENT_START_ESCORT, pPlayer, pCreature, pQuest->GetQuestId()); + return true; + } + + return false; +} + void AddSC_netherstorm() { Script* pNewScript; @@ -1187,4 +1449,10 @@ void AddSC_netherstorm() pNewScript->GetAI = &GetAI_npc_captured_vanguard; pNewScript->pQuestAcceptNPC = &QuestAccept_npc_captured_vanguard; pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_drijya"; + pNewScript->GetAI = &GetAI_npc_drijya; + pNewScript->pQuestAcceptNPC = &QuestAccept_npc_drijya; + pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 36bb797bc..56728981d 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2986" + #define SD2_REVISION_NR "2987" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index d561a83e4..5225d7145 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -887,6 +887,7 @@ UPDATE creature_template SET ScriptName='npc_maxx_a_million' WHERE entry=19589; UPDATE creature_template SET ScriptName='npc_zeppit' WHERE entry=22484; UPDATE creature_template SET ScriptName='npc_protectorate_demolitionist' WHERE entry=20802; UPDATE creature_template SET ScriptName='npc_captured_vanguard' WHERE entry=20763; +UPDATE creature_template SET ScriptName='npc_drijya' WHERE entry=20281; /* */ /* THE NEXUS */ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 420aeab6b..40afdff2e 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -1044,7 +1044,17 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1000965,'%s locates a buried raven stone.',0,2,0,0,'cenarion sparrowhawk EMOTE_LOCATE'), (-1000966,'I WILL CRUSH YOU LIKE A GNAT!',0,1,0,0,'reth\'hedron SAY_LOW_HP'), -(-1000967,'You will regret this, mortal! Reth\'hedron will return... I will have my vengeance!',0,1,0,53,'reth\'hedron SAY_EVENT_END'); +(-1000967,'You will regret this, mortal! Reth\'hedron will return... I will have my vengeance!',0,1,0,53,'reth\'hedron SAY_EVENT_END'), + +(-1000968,'Very well. Before we head down there, take a moment to prepare yourself.',0,0,0,1,'drijya SAY_DRIJYA_START'), +(-1000969,'Let\'s proceed at a brisk pace.',0,0,0,0,'drijya SAY_DRIJYA_1'), +(-1000970,'We\'ll start at that first energy pylon, straight ahead. Remember, try to keep them off of me.',0,0,0,1,'drijya SAY_DRIJYA_2'), +(-1000971,'Keep them off me!',0,0,0,0,'drijya SAY_DRIJYA_3'), +(-1000972,'I\'m done with this pylon. On to the next.',0,0,0,1,'drijya SAY_DRIJYA_4'), +(-1000973,'Alright, pylon two down. Now for the heat mainfold.',0,0,0,1,'drijya SAY_DRIJYA_5'), +(-1000974,'That should do it. The teleporter should blow any second now !',0,0,0,5,'drijya SAY_DRIJYA_6'), +(-1000975,'Ok, let\'s get out of here!',0,0,0,1,'drijya SAY_DRIJYA_7'), +(-1000976,'Thank you, $n! I couldn\'t have done it without you. You\'ll let Gahruj know?',0,0,0,1,'drijya SAY_DRIJYA_COMPLETE'); -- -1 033 000 SHADOWFANG KEEP INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES @@ -7508,4 +7518,35 @@ INSERT INTO script_waypoint VALUES (4880, 23, -2904.04, -3601.35, 34.969, 0, ''), (4880, 24, -2907.6, -3612.73, 34.2434, 10000, 'SAY_STINKY_END'); +DELETE FROM script_waypoint WHERE entry=20281; +INSERT INTO script_waypoint VALUES +(20281, 0, 3096.416, 2801.408, 118.149, 7000, 'SAY_DRIJYA_START'), +(20281, 1, 3096.516, 2801.065, 118.128, 0, 'SAY_DRIJYA_1'), +(20281, 2, 3099.995, 2796.665, 118.118, 0, ''), +(20281, 3, 3098.759, 2786.174, 117.125, 0, ''), +(20281, 4, 3087.792, 2754.602, 115.441, 0, ''), +(20281, 5, 3080.718, 2730.793, 115.930, 9000, 'SAY_DRIJYA_2'), +(20281, 6, 3060.235, 2731.306, 115.122, 0, ''), +(20281, 7, 3050.863, 2727.388, 114.054, 0, ''), +(20281, 8, 3050.863, 2727.388, 114.054, 8000, 'SAY_DRIJYA_4'), +(20281, 9, 3055.008, 2724.972, 113.687, 0, ''), +(20281, 10, 3053.777, 2718.427, 113.684, 0, ''), +(20281, 11, 3028.622, 2693.375, 114.670, 0, ''), +(20281, 12, 3022.430, 2695.297, 113.406, 0, ''), +(20281, 13, 3022.430, 2695.297, 113.406, 8000, 'SAY_DRIJYA_5'), +(20281, 14, 3025.463, 2700.755, 113.514, 0, ''), +(20281, 15, 3011.336, 2716.782, 113.691, 0, ''), +(20281, 16, 3010.882, 2726.991, 114.239, 0, ''), +(20281, 17, 3009.178, 2729.083, 114.324, 0, ''), +(20281, 18, 3009.178, 2729.083, 114.324, 15000, 'SAY_DRIJYA_6'), +(20281, 19, 3009.178, 2729.083, 114.324, 6000, 'SPELL_EXPLOSION_VISUAL'), +(20281, 20, 3009.178, 2729.083, 114.324, 8000, 'SAY_DRIJYA_7'), +(20281, 21, 3033.888, 2736.437, 114.369, 0, ''), +(20281, 22, 3071.492, 2741.502, 116.462, 0, ''), +(20281, 23, 3087.792, 2754.602, 115.441, 0, ''), +(20281, 24, 3094.505, 2770.198, 115.744, 0, ''), +(20281, 25, 3103.510, 2784.362, 116.857, 0, ''), +(20281, 26, 3099.995, 2796.665, 118.118, 0, ''), +(20281, 27, 3096.290, 2801.027, 118.096, 0, 'SAY_DRIJYA_COMPLETE'); + -- EOF diff --git a/sql/updates/r2987_mangos.sql b/sql/updates/r2987_mangos.sql new file mode 100644 index 000000000..22290edd9 --- /dev/null +++ b/sql/updates/r2987_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_drijya' WHERE entry=20281; diff --git a/sql/updates/r2987_scriptdev2.sql b/sql/updates/r2987_scriptdev2.sql new file mode 100644 index 000000000..e1afb9f53 --- /dev/null +++ b/sql/updates/r2987_scriptdev2.sql @@ -0,0 +1,42 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1000976 AND -1000968; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1000968,'Very well. Before we head down there, take a moment to prepare yourself.',0,0,0,1,'drijya SAY_DRIJYA_START'), +(-1000969,'Let\'s proceed at a brisk pace.',0,0,0,0,'drijya SAY_DRIJYA_1'), +(-1000970,'We\'ll start at that first energy pylon, straight ahead. Remember, try to keep them off of me.',0,0,0,1,'drijya SAY_DRIJYA_2'), +(-1000971,'Keep them off me!',0,0,0,0,'drijya SAY_DRIJYA_3'), +(-1000972,'I\'m done with this pylon. On to the next.',0,0,0,1,'drijya SAY_DRIJYA_4'), +(-1000973,'Alright, pylon two down. Now for the heat mainfold.',0,0,0,1,'drijya SAY_DRIJYA_5'), +(-1000974,'That should do it. The teleporter should blow any second now !',0,0,0,5,'drijya SAY_DRIJYA_6'), +(-1000975,'Ok, let\'s get out of here!',0,0,0,1,'drijya SAY_DRIJYA_7'), +(-1000976,'Thank you, $n! I couldn\'t have done it without you. You\'ll let Gahruj know?',0,0,0,1,'drijya SAY_DRIJYA_COMPLETE'); + +DELETE FROM script_waypoint WHERE entry=20281; +INSERT INTO script_waypoint VALUES +(20281, 0, 3096.416, 2801.408, 118.149, 7000, 'SAY_DRIJYA_START'), +(20281, 1, 3096.516, 2801.065, 118.128, 0, 'SAY_DRIJYA_1'), +(20281, 2, 3099.995, 2796.665, 118.118, 0, ''), +(20281, 3, 3098.759, 2786.174, 117.125, 0, ''), +(20281, 4, 3087.792, 2754.602, 115.441, 0, ''), +(20281, 5, 3080.718, 2730.793, 115.930, 9000, 'SAY_DRIJYA_2'), +(20281, 6, 3060.235, 2731.306, 115.122, 0, ''), +(20281, 7, 3050.863, 2727.388, 114.054, 0, ''), +(20281, 8, 3050.863, 2727.388, 114.054, 8000, 'SAY_DRIJYA_4'), +(20281, 9, 3055.008, 2724.972, 113.687, 0, ''), +(20281, 10, 3053.777, 2718.427, 113.684, 0, ''), +(20281, 11, 3028.622, 2693.375, 114.670, 0, ''), +(20281, 12, 3022.430, 2695.297, 113.406, 0, ''), +(20281, 13, 3022.430, 2695.297, 113.406, 8000, 'SAY_DRIJYA_5'), +(20281, 14, 3025.463, 2700.755, 113.514, 0, ''), +(20281, 15, 3011.336, 2716.782, 113.691, 0, ''), +(20281, 16, 3010.882, 2726.991, 114.239, 0, ''), +(20281, 17, 3009.178, 2729.083, 114.324, 0, ''), +(20281, 18, 3009.178, 2729.083, 114.324, 15000, 'SAY_DRIJYA_6'), +(20281, 19, 3009.178, 2729.083, 114.324, 6000, 'SPELL_EXPLOSION_VISUAL'), +(20281, 20, 3009.178, 2729.083, 114.324, 8000, 'SAY_DRIJYA_7'), +(20281, 21, 3033.888, 2736.437, 114.369, 0, ''), +(20281, 22, 3071.492, 2741.502, 116.462, 0, ''), +(20281, 23, 3087.792, 2754.602, 115.441, 0, ''), +(20281, 24, 3094.505, 2770.198, 115.744, 0, ''), +(20281, 25, 3103.510, 2784.362, 116.857, 0, ''), +(20281, 26, 3099.995, 2796.665, 118.118, 0, ''), +(20281, 27, 3096.290, 2801.027, 118.096, 0, 'SAY_DRIJYA_COMPLETE'); From eec6cb81b528cb12cda5fce2d0749e574a32f480 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sat, 15 Mar 2014 23:55:29 +0100 Subject: [PATCH 0998/1172] [2988] Implement script support for quest 11154 Thanks to @Rog360 for providing the information Close #89 --- scripts/northrend/howling_fjord.cpp | 108 +++++++++++++++++++++++++++- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 + sql/updates/r2988_mangos.sql | 1 + 4 files changed, 110 insertions(+), 2 deletions(-) create mode 100644 sql/updates/r2988_mangos.sql diff --git a/scripts/northrend/howling_fjord.cpp b/scripts/northrend/howling_fjord.cpp index 9571f330d..5a3d3a0db 100644 --- a/scripts/northrend/howling_fjord.cpp +++ b/scripts/northrend/howling_fjord.cpp @@ -17,7 +17,7 @@ /* ScriptData SDName: Howling_Fjord SD%Complete: ? -SDComment: Quest support: 11300, 11343, 11344, 11464. +SDComment: Quest support: 11154, 11300, 11343, 11344, 11464. SDCategory: Howling Fjord EndScriptData */ @@ -28,6 +28,7 @@ npc_daegarn npc_silvermoon_harry npc_lich_king_village npc_king_ymiron +npc_firecrackers_bunny EndContentData */ #include "precompiled.h" @@ -737,6 +738,106 @@ bool AreaTrigger_at_nifflevar(Player* pPlayer, AreaTriggerEntry const* pAt) return false; } +/*###### +## npc_firecrackers_bunny +######*/ + +enum +{ + SPELL_FIRECRACKER_VISUAL = 43314, + SPELL_SUMMON_DARKCLAW_GUANO = 43307, + + NPC_DARKCLAW_BAT = 23959, +}; + +struct MANGOS_DLL_DECL npc_firecrackers_bunnyAI : public ScriptedAI +{ + npc_firecrackers_bunnyAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } + + uint32 m_uiStartTimer; + bool m_bHasValidBat; + + ObjectGuid m_selectedBatGuid; + + void Reset() override + { + m_uiStartTimer = 1000; + m_bHasValidBat = false; + + DoCastSpellIfCan(m_creature, SPELL_FIRECRACKER_VISUAL); + } + + void MoveInLineOfSight(Unit* pWho) override + { + if (m_bHasValidBat && pWho->GetObjectGuid() == m_selectedBatGuid && m_creature->IsWithinDistInMap(pWho, 3.5f)) + { + // spawn the Guano loot + pWho->GetMotionMaster()->MoveIdle(); + pWho->CastSpell(m_creature, SPELL_SUMMON_DARKCLAW_GUANO, true); + m_bHasValidBat = false; + } + } + + void UpdateAI(const uint32 uiDiff) override + { + if (m_uiStartTimer) + { + if (m_uiStartTimer <= uiDiff) + { + // get all the bats list in range; note: this will compare the 2D distance + std::list lBatsList; + GetCreatureListWithEntryInGrid(lBatsList, m_creature, NPC_DARKCLAW_BAT, 10.0f); + + if (lBatsList.empty()) + { + m_uiStartTimer = 5000; + return; + } + + // sort by distance and get only the closest + lBatsList.sort(ObjectDistanceOrder(m_creature)); + + std::list::const_iterator batItr = lBatsList.begin(); + Creature* pBat = NULL; + + do + { + // check for alive and out of combat only + if ((*batItr)->isAlive() && !(*batItr)->getVictim()) + pBat = *batItr; + + ++batItr; + } + while (!pBat && batItr != lBatsList.end()); + + if (!pBat) + { + m_uiStartTimer = 5000; + return; + } + + // Move bat to the point + float fX, fY, fZ; + pBat->SetWalk(false); + pBat->GetMotionMaster()->Clear(); + m_creature->GetContactPoint(pBat, fX, fY, fZ); + pBat->GetMotionMaster()->MovePoint(0, fX, fY, fZ); + + m_selectedBatGuid = pBat->GetObjectGuid(); + m_uiStartTimer = 0; + m_bHasValidBat = true; + } + else + m_uiStartTimer -= uiDiff; + } + } +}; + +CreatureAI* GetAI_npc_firecrackers_bunny(Creature* pCreature) +{ + return new npc_firecrackers_bunnyAI(pCreature); +} + void AddSC_howling_fjord() { Script* pNewScript; @@ -778,4 +879,9 @@ void AddSC_howling_fjord() pNewScript->Name = "at_nifflevar"; pNewScript->pAreaTrigger = &AreaTrigger_at_nifflevar; pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_firecrackers_bunny"; + pNewScript->GetAI = &GetAI_npc_firecrackers_bunny; + pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 56728981d..a2be18700 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2987" + #define SD2_REVISION_NR "2988" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 5225d7145..367b41064 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -675,6 +675,7 @@ UPDATE creature_template SET ScriptName='npc_daegarn' WHERE entry=24151; UPDATE creature_template SET ScriptName='npc_silvermoon_harry' WHERE entry=24539; UPDATE creature_template SET ScriptName='npc_lich_king_village' WHERE entry=24248; UPDATE creature_template SET ScriptName='npc_king_ymiron' WHERE entry=24321; +UPDATE creature_template SET ScriptName='npc_firecrackers_bunny' WHERE entry=24230; /* */ /* ICECROWN CITADEL */ diff --git a/sql/updates/r2988_mangos.sql b/sql/updates/r2988_mangos.sql new file mode 100644 index 000000000..0524736d7 --- /dev/null +++ b/sql/updates/r2988_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_firecrackers_bunny' WHERE entry=24230; From 8d5408431cc890df96004b6e80b214e9b0d0fcd0 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sun, 16 Mar 2014 02:03:00 +0100 Subject: [PATCH 0999/1172] [2989] Implement script support for quest 12652 Thanks to @Rog360 for providing the information Close #88 --- scripts/northrend/zuldrak.cpp | 191 ++++++++++++++++++++++++++++++++- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 2 + sql/updates/r2989_mangos.sql | 2 + 4 files changed, 195 insertions(+), 2 deletions(-) create mode 100644 sql/updates/r2989_mangos.sql diff --git a/scripts/northrend/zuldrak.cpp b/scripts/northrend/zuldrak.cpp index 07066de10..0ff963790 100644 --- a/scripts/northrend/zuldrak.cpp +++ b/scripts/northrend/zuldrak.cpp @@ -17,15 +17,18 @@ /* ScriptData SDName: Zuldrak SD%Complete: 100 -SDComment: Quest support: 12934. +SDComment: Quest support: 12652, 12934. SDCategory: Zuldrak EndScriptData */ /* ContentData npc_gurgthock +npc_ghoul_feeding_bunny +npc_decaying_ghoul EndContentData */ #include "precompiled.h" +#include "TemporarySummon.h" /*###### ## npc_gurgthock @@ -94,6 +97,181 @@ CreatureAI* GetAI_npc_gurgthock(Creature* pCreature) return new npc_gurgthockAI(pCreature); } +/*###### +## npc_ghoul_feeding_bunny +######*/ + +enum +{ + SPELL_ATTRACT_GHOUL = 52037, // script target on npc 28565 + SPELL_GHOUL_KILL_CREDIT = 52030, + // SPELL_GHOUL_KILL_CREDIT_EFFECT = 52038, // triggers 52039; purpose unk - same effect as 52030 but with different target + + NPC_DECAYING_GHOUL = 28565, +}; + +struct MANGOS_DLL_DECL npc_ghoul_feeding_bunnyAI : public ScriptedAI +{ + npc_ghoul_feeding_bunnyAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } + + uint32 m_uiAttractTimer; + + void Reset() override + { + m_uiAttractTimer = 1000; + } + + void ReceiveAIEvent(AIEventType eventType, Creature* /*pSender*/, Unit* pInvoker, uint32 /*uiMiscValue*/) override + { + if (eventType == AI_EVENT_CUSTOM_A && pInvoker->GetEntry() == NPC_DECAYING_GHOUL) + { + // Give kill credit to the summoner player + if (m_creature->IsTemporarySummon()) + { + TemporarySummon* pTemporary = (TemporarySummon*)m_creature; + + if (Player* pSummoner = m_creature->GetMap()->GetPlayer(pTemporary->GetSummonerGuid())) + DoCastSpellIfCan(pSummoner, SPELL_GHOUL_KILL_CREDIT, CAST_TRIGGERED); + } + } + } + + void UpdateAI(const uint32 uiDiff) override + { + if (m_uiAttractTimer) + { + if (m_uiAttractTimer <= uiDiff) + { + // try to target a nearby ghoul + if (DoCastSpellIfCan(m_creature, SPELL_ATTRACT_GHOUL) == CAST_OK) + m_uiAttractTimer = 0; + else + m_uiAttractTimer = 5000; + } + else + m_uiAttractTimer -= uiDiff; + } + } +}; + +CreatureAI* GetAI_npc_ghoul_feeding_bunny(Creature* pCreature) +{ + return new npc_ghoul_feeding_bunnyAI(pCreature); +} + +/*###### +## npc_decaying_ghoul +######*/ + +enum +{ + SPELL_BIRTH = 26047, + SPELL_FLESH_ROT = 28913, + + NPC_GHOUL_FEEDING_BUNNY = 28591, +}; + +struct MANGOS_DLL_DECL npc_decaying_ghoulAI : public ScriptedAI +{ + npc_decaying_ghoulAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_bSpawnAnim = false; + Reset(); + } + + uint32 m_uiFleshRotTimer; + bool m_bSpawnAnim; + ObjectGuid m_feedingBunnyGuid; + + void Reset() override + { + m_uiFleshRotTimer = urand(1000, 3000); + } + + void JustRespawned() override + { + DoCastSpellIfCan(m_creature, SPELL_BIRTH); + m_creature->HandleEmote(EMOTE_STATE_NONE); + m_feedingBunnyGuid.Clear(); + } + + void MovementInform(uint32 uiMoveType, uint32 uiPointId) override + { + if (uiMoveType != POINT_MOTION_TYPE || !uiPointId) + return; + + // handle the animation and despawn + m_creature->GetMotionMaster()->MoveIdle(); + m_creature->HandleEmote(EMOTE_STATE_EAT_NO_SHEATHE); + m_creature->ForcedDespawn(10000); + + // send AI event for the quest credit + if (Creature* pBunny = m_creature->GetMap()->GetCreature(m_feedingBunnyGuid)) + SendAIEvent(AI_EVENT_CUSTOM_A, m_creature, pBunny); + } + + void ReceiveAIEvent(AIEventType eventType, Creature* /*pSender*/, Unit* pInvoker, uint32 /*uiMiscValue*/) override + { + if (eventType == AI_EVENT_CUSTOM_A && pInvoker->GetEntry() == NPC_GHOUL_FEEDING_BUNNY) + { + // check if the ghoul has already a feeding bunny set + if (m_feedingBunnyGuid) + return; + + // move the ghoul to the feeding target + float fX, fY, fZ; + m_creature->SetWalk(false); + m_creature->GetMotionMaster()->Clear(); + pInvoker->GetContactPoint(m_creature, fX, fY, fZ); + + m_creature->GetMotionMaster()->MovePoint(1, fX, fY, fZ); + m_feedingBunnyGuid = pInvoker->GetObjectGuid(); + } + } + + void UpdateAI(const uint32 uiDiff) override + { + // cast birth animation + if (!m_bSpawnAnim) + { + if (DoCastSpellIfCan(m_creature, SPELL_BIRTH) == CAST_OK) + m_bSpawnAnim = true; + } + + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_uiFleshRotTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_FLESH_ROT) == CAST_OK) + m_uiFleshRotTimer = urand(7000, 15000); + } + else + m_uiFleshRotTimer -= uiDiff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_npc_decaying_ghoul(Creature* pCreature) +{ + return new npc_decaying_ghoulAI(pCreature); +} + +bool EffectDummyCreature_npc_decaying_ghoul(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget, ObjectGuid /*originalCasterGuid*/) +{ + if (uiSpellId == SPELL_ATTRACT_GHOUL && uiEffIndex == EFFECT_INDEX_0 && pCreatureTarget->GetEntry() == NPC_DECAYING_GHOUL) + { + if (pCaster->GetEntry() != NPC_GHOUL_FEEDING_BUNNY) + return true; + + pCreatureTarget->AI()->SendAIEvent(AI_EVENT_CUSTOM_A, pCaster, pCreatureTarget); + return true; + } + + return false; +} + void AddSC_zuldrak() { Script* pNewScript; @@ -103,4 +281,15 @@ void AddSC_zuldrak() pNewScript->GetAI = &GetAI_npc_gurgthock; pNewScript->pQuestAcceptNPC = &QuestAccept_npc_gurgthock; pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_ghoul_feeding_bunny"; + pNewScript->GetAI = &GetAI_npc_ghoul_feeding_bunny; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_decaying_ghoul"; + pNewScript->GetAI = &GetAI_npc_decaying_ghoul; + pNewScript->pEffectDummyNPC = &EffectDummyCreature_npc_decaying_ghoul; + pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index a2be18700..c8ae68760 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2988" + #define SD2_REVISION_NR "2989" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 367b41064..d4513b034 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -1452,6 +1452,8 @@ UPDATE creature_template SET ScriptName='npc_forest_frog' WHERE entry=24396; /* ZUL'DRAK */ UPDATE creature_template SET ScriptName='npc_gurgthock' WHERE entry=30007; +UPDATE creature_template SET ScriptName='npc_ghoul_feeding_bunny' WHERE entry=28591; +UPDATE creature_template SET ScriptName='npc_decaying_ghoul' WHERE entry=28565; /* ZUL'FARRAK */ diff --git a/sql/updates/r2989_mangos.sql b/sql/updates/r2989_mangos.sql new file mode 100644 index 000000000..f8386f37e --- /dev/null +++ b/sql/updates/r2989_mangos.sql @@ -0,0 +1,2 @@ +UPDATE creature_template SET ScriptName='npc_ghoul_feeding_bunny' WHERE entry=28591; +UPDATE creature_template SET ScriptName='npc_decaying_ghoul' WHERE entry=28565; From 6e5f2f2ecc6c9833973db7c1b79b8809ee4b321d Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sun, 16 Mar 2014 02:08:38 +0100 Subject: [PATCH 1000/1172] [2990] Update commit [2986] Also add missing comment --- scripts/eastern_kingdoms/sunken_temple/sunken_temple.cpp | 3 ++- scripts/northrend/borean_tundra.cpp | 5 +++++ sd2_revision_nr.h | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/scripts/eastern_kingdoms/sunken_temple/sunken_temple.cpp b/scripts/eastern_kingdoms/sunken_temple/sunken_temple.cpp index 96fd1d254..7bfbb944d 100644 --- a/scripts/eastern_kingdoms/sunken_temple/sunken_temple.cpp +++ b/scripts/eastern_kingdoms/sunken_temple/sunken_temple.cpp @@ -83,8 +83,9 @@ struct MANGOS_DLL_DECL npc_malfurionAI : public ScriptedAI DoScriptText(EMOTE_MALFURION1, m_creature); m_uiSpeech = 0; m_uiSayTimer = 3000; - m_creature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER); } + + m_creature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER); } uint32 m_uiSayTimer; diff --git a/scripts/northrend/borean_tundra.cpp b/scripts/northrend/borean_tundra.cpp index a734c855d..741f03224 100644 --- a/scripts/northrend/borean_tundra.cpp +++ b/scripts/northrend/borean_tundra.cpp @@ -26,6 +26,7 @@ npc_nesingwary_trapper npc_sinkhole_kill_credit npc_lurgglbr npc_beryl_sorcerer +npc_captured_beryl_sorcerer npc_nexus_drake_hatchling EndContentData */ @@ -562,6 +563,10 @@ bool EffectAuraDummy_npc_beryl_sorcerer(const Aura* pAura, bool bApply) return false; } +/*##### +# npc_captured_beryl_sorcerer +#####*/ + bool EffectAuraDummy_npc_captured_beryl_sorcerer(const Aura* pAura, bool bApply) { if (pAura->GetId() == SPELL_ARCANE_CHAINS_CHANNEL) diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index c8ae68760..ada3e1814 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2989" + #define SD2_REVISION_NR "2990" #endif // __SD2_REVISION_NR_H__ From e193a0377c369706080db893296cc21ce03796ae Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sun, 16 Mar 2014 10:20:31 +0100 Subject: [PATCH 1001/1172] [2991] Update and improve script for quest 1249 Fix #85 --- scripts/eastern_kingdoms/wetlands.cpp | 139 ++++++++++++++++++++------ sd2_revision_nr.h | 2 +- sql/scriptdev2_script_full.sql | 7 +- sql/updates/r2991_scriptdev2.sql | 6 ++ 4 files changed, 121 insertions(+), 33 deletions(-) create mode 100644 sql/updates/r2991_scriptdev2.sql diff --git a/scripts/eastern_kingdoms/wetlands.cpp b/scripts/eastern_kingdoms/wetlands.cpp index 1d395fc85..abf44c183 100644 --- a/scripts/eastern_kingdoms/wetlands.cpp +++ b/scripts/eastern_kingdoms/wetlands.cpp @@ -16,7 +16,7 @@ /* ScriptData SDName: Wetlands -SD%Complete: 80 +SD%Complete: 100 SDComment: Quest support: 1249 SDCategory: Wetlands EndScriptData */ @@ -35,24 +35,47 @@ EndContentData */ enum { + SAY_SLIM_AGGRO = -1000977, + SAY_SLIM_DEFEAT = -1000978, + SAY_FRIEND_DEFEAT = -1000979, + SAY_SLIM_NOTES = -1000980, + QUEST_MISSING_DIPLO_PT11 = 1249, - FACTION_ENEMY = 168, + FACTION_ENEMY = 168, // ToDo: faction needs to be confirmed! + SPELL_STEALTH = 1785, - SPELL_CALL_FRIENDS = 16457, // summons 1x friend + SPELL_CALL_FRIENDS = 16457, // summon npc 4971 + NPC_SLIMS_FRIEND = 4971, NPC_TAPOKE_SLIM_JAHN = 4962 }; -struct MANGOS_DLL_DECL npc_tapoke_slim_jahnAI : public npc_escortAI +static const DialogueEntry aDiplomatDialogue[] = { - npc_tapoke_slim_jahnAI(Creature* pCreature) : npc_escortAI(pCreature) { Reset(); } + {SAY_SLIM_DEFEAT, NPC_TAPOKE_SLIM_JAHN, 4000}, + {SAY_SLIM_NOTES, NPC_TAPOKE_SLIM_JAHN, 7000}, + {QUEST_MISSING_DIPLO_PT11, 0, 0}, + {0, 0, 0}, +}; + +struct MANGOS_DLL_DECL npc_tapoke_slim_jahnAI : public npc_escortAI, private DialogueHelper +{ + npc_tapoke_slim_jahnAI(Creature* pCreature) : npc_escortAI(pCreature), + DialogueHelper(aDiplomatDialogue) + { + Reset(); + } bool m_bFriendSummoned; + bool m_bEventComplete; void Reset() override { if (!HasEscortState(STATE_ESCORT_ESCORTING)) + { m_bFriendSummoned = false; + m_bEventComplete = false; + } } void WaypointReached(uint32 uiPointId) override @@ -60,60 +83,114 @@ struct MANGOS_DLL_DECL npc_tapoke_slim_jahnAI : public npc_escortAI switch (uiPointId) { case 2: - if (m_creature->HasStealthAura()) - m_creature->RemoveSpellsCausingAura(SPELL_AURA_MOD_STEALTH); - SetRun(); + m_creature->RemoveAurasDueToSpell(SPELL_STEALTH); m_creature->SetFactionTemporary(FACTION_ENEMY, TEMPFACTION_RESTORE_RESPAWN | TEMPFACTION_RESTORE_COMBAT_STOP); break; + case 6: + // fail the quest if he escapes + if (Player* pPlayer = GetPlayerForEscort()) + JustDied(pPlayer); + break; } } void Aggro(Unit* /*pWho*/) override { - Player* pPlayer = GetPlayerForEscort(); - - if (HasEscortState(STATE_ESCORT_ESCORTING) && !m_bFriendSummoned && pPlayer) + if (HasEscortState(STATE_ESCORT_ESCORTING) && !m_bFriendSummoned) { - DoCastSpellIfCan(m_creature, SPELL_CALL_FRIENDS); - m_bFriendSummoned = true; + if (DoCastSpellIfCan(m_creature, SPELL_CALL_FRIENDS) == CAST_OK) + { + DoScriptText(SAY_SLIM_AGGRO, m_creature); + m_bFriendSummoned = true; + } } } void JustSummoned(Creature* pSummoned) override { + // Note: may not work on guardian pets if (Player* pPlayer = GetPlayerForEscort()) pSummoned->AI()->AttackStart(pPlayer); } - void AttackedBy(Unit* pAttacker) override + void DamageTaken(Unit* /*pDoneBy*/, uint32& uiDamage) override { - if (m_creature->getVictim()) + if (!HasEscortState(STATE_ESCORT_ESCORTING)) return; - if (m_creature->IsFriendlyTo(pAttacker)) + if (m_creature->GetHealthPercent() < 20.0f || uiDamage > m_creature->GetHealth()) + { + // despawn friend - Note: may not work on guardian pets + if (Creature* pFriend = GetClosestCreatureWithEntry(m_creature, NPC_SLIMS_FRIEND, 10.0f)) + { + DoScriptText(SAY_FRIEND_DEFEAT, pFriend); + pFriend->ForcedDespawn(1000); + } + + // set escort on pause and evade + uiDamage = 0; + m_bEventComplete = true; + + SetEscortPaused(true); + EnterEvadeMode(); + } + } + + void MovementInform(uint32 uiMoveType, uint32 uiPointId) override + { + if (uiMoveType != POINT_MOTION_TYPE || !HasEscortState(STATE_ESCORT_ESCORTING)) return; - AttackStart(pAttacker); + npc_escortAI::MovementInform(uiMoveType, uiPointId); + + // after the npc is defeated, start the dialog right after it reaches the evade point + if (m_bEventComplete) + { + if (Player* pPlayer = GetPlayerForEscort()) + m_creature->SetFacingToObject(pPlayer); + + StartNextDialogueText(SAY_SLIM_DEFEAT); + } + } + + void ReceiveAIEvent(AIEventType eventType, Creature* /*pSender*/, Unit* pInvoker, uint32 uiMiscValue) override + { + // start escort + if (eventType == AI_EVENT_START_ESCORT && pInvoker->GetTypeId() == TYPEID_PLAYER) + Start(false, (Player*)pInvoker, GetQuestTemplateStore(uiMiscValue), true); } - void DamageTaken(Unit* /*pDoneBy*/, uint32& uiDamage) override + void JustDidDialogueStep(int32 iEntry) override { - if (m_creature->GetHealthPercent() < 20.0f) + if (iEntry == QUEST_MISSING_DIPLO_PT11) { + // complete quest if (Player* pPlayer = GetPlayerForEscort()) - { pPlayer->GroupEventHappens(QUEST_MISSING_DIPLO_PT11, m_creature); - uiDamage = 0; + // despawn and respawn at inn + m_creature->ForcedDespawn(1000); + m_creature->SetRespawnDelay(2); + } + } + + Creature* GetSpeakerByEntry(uint32 uiEntry) override + { + if (uiEntry == NPC_TAPOKE_SLIM_JAHN) + return m_creature; - m_creature->RemoveAllAuras(); - m_creature->DeleteThreatList(); - m_creature->CombatStop(true); + return NULL; + } - SetRun(false); - } - } + void UpdateEscortAI(const uint32 uiDiff) override + { + DialogueUpdate(uiDiff); + + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + DoMeleeAttackIfReady(); } }; @@ -131,16 +208,16 @@ bool QuestAccept_npc_mikhail(Player* pPlayer, Creature* pCreature, const Quest* if (pQuest->GetQuestId() == QUEST_MISSING_DIPLO_PT11) { Creature* pSlim = GetClosestCreatureWithEntry(pCreature, NPC_TAPOKE_SLIM_JAHN, 25.0f); - if (!pSlim) return false; - if (!pSlim->HasStealthAura()) + if (!pSlim->HasAura(SPELL_STEALTH)) pSlim->CastSpell(pSlim, SPELL_STEALTH, true); - if (npc_tapoke_slim_jahnAI* pEscortAI = dynamic_cast(pSlim->AI())) - pEscortAI->Start(false, pPlayer, pQuest); + pCreature->AI()->SendAIEvent(AI_EVENT_START_ESCORT, pPlayer, pSlim, pQuest->GetQuestId()); + return true; } + return false; } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index ada3e1814..ad7355153 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2990" + #define SD2_REVISION_NR "2991" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 40afdff2e..4079f68fe 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -1054,7 +1054,12 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1000973,'Alright, pylon two down. Now for the heat mainfold.',0,0,0,1,'drijya SAY_DRIJYA_5'), (-1000974,'That should do it. The teleporter should blow any second now !',0,0,0,5,'drijya SAY_DRIJYA_6'), (-1000975,'Ok, let\'s get out of here!',0,0,0,1,'drijya SAY_DRIJYA_7'), -(-1000976,'Thank you, $n! I couldn\'t have done it without you. You\'ll let Gahruj know?',0,0,0,1,'drijya SAY_DRIJYA_COMPLETE'); +(-1000976,'Thank you, $n! I couldn\'t have done it without you. You\'ll let Gahruj know?',0,0,0,1,'drijya SAY_DRIJYA_COMPLETE'), + +(-1000977,'Oh, it\'s on now! But you thought I\'d be alone too, huh?!',0,0,0,0,'tapoke slim jahn SAY_AGGRO'), +(-1000978,'Okay, okay! No need to get all violent. I\'ll talk. I\'ll talk!',0,0,0,20,'tapoke slim jahn SAY_DEFEAT'), +(-1000979,'Whoa! This is way more than what I bargained for, you\'re on your own, Slim!',0,0,0,0,'slim\'s friend SAY_FRIEND_DEFEAT'), +(-1000980,'I have a few notes from the job back at my place. I\'ll get them and then meet you back in the inn.',0,0,0,1,'tapoke slim jahn SAY_NOTES'); -- -1 033 000 SHADOWFANG KEEP INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES diff --git a/sql/updates/r2991_scriptdev2.sql b/sql/updates/r2991_scriptdev2.sql new file mode 100644 index 000000000..5fb3f18ac --- /dev/null +++ b/sql/updates/r2991_scriptdev2.sql @@ -0,0 +1,6 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1000980 AND -1000977; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1000977,'Oh, it\'s on now! But you thought I\'d be alone too, huh?!',0,0,0,0,'tapoke slim jahn SAY_AGGRO'), +(-1000978,'Okay, okay! No need to get all violent. I\'ll talk. I\'ll talk!',0,0,0,20,'tapoke slim jahn SAY_DEFEAT'), +(-1000979,'Whoa! This is way more than what I bargained for, you\'re on your own, Slim!',0,0,0,0,'slim\'s friend SAY_FRIEND_DEFEAT'), +(-1000980,'I have a few notes from the job back at my place. I\'ll get them and then meet you back in the inn.',0,0,0,1,'tapoke slim jahn SAY_NOTES'); From b356b2e170ddf274173ca08d4c57920ad46bdb1e Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sun, 16 Mar 2014 14:49:29 +0100 Subject: [PATCH 1002/1172] [2992] Implement script support for quest 11889 Close #77 --- scripts/northrend/borean_tundra.cpp | 128 +++++++++++++++++++++++++++- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 + sql/updates/r2992_mangos.sql | 1 + 4 files changed, 130 insertions(+), 2 deletions(-) create mode 100644 sql/updates/r2992_mangos.sql diff --git a/scripts/northrend/borean_tundra.cpp b/scripts/northrend/borean_tundra.cpp index 741f03224..1ace76389 100644 --- a/scripts/northrend/borean_tundra.cpp +++ b/scripts/northrend/borean_tundra.cpp @@ -17,7 +17,7 @@ /* ScriptData SDName: Borean_Tundra SD%Complete: 100 -SDComment: Quest support: 11570, 11590, 11728, 11865, 11897, 11919, 11940. +SDComment: Quest support: 11570, 11590, 11728, 11865, 11889, 11897, 11919, 11940. SDCategory: Borean Tundra EndScriptData */ @@ -28,6 +28,7 @@ npc_lurgglbr npc_beryl_sorcerer npc_captured_beryl_sorcerer npc_nexus_drake_hatchling +npc_scourged_flamespitter EndContentData */ #include "precompiled.h" @@ -841,6 +842,125 @@ bool EffectDummyCreature_npc_nexus_drake_hatchling(Unit* pCaster, uint32 uiSpell return false; } +/*##### +# npc_scourged_flamespitter +#####*/ + +enum +{ + SPELL_REINFORCED_NET = 46361, + SPELL_NET = 47021, + + SPELL_INCINERATE_COSMETIC = 45863, + SPELL_INCINERATE = 32707, + + NPC_FLAMESPITTER = 25582, +}; + +struct MANGOS_DLL_DECL npc_scourged_flamespitterAI : public ScriptedAI +{ + npc_scourged_flamespitterAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } + + uint32 m_uiIncinerateTimer; + uint32 m_uiNetExpireTimer; + + void Reset() override + { + m_uiIncinerateTimer = urand(1000, 2000); + m_uiNetExpireTimer = 0; + } + + void AttackStart(Unit* pWho) override + { + if (m_creature->Attack(pWho, false)) + { + m_creature->AddThreat(pWho); + m_creature->SetInCombatWith(pWho); + pWho->SetInCombatWith(m_creature); + DoStartMovement(pWho, 10.0f); + } + } + + void MovementInform(uint32 uiMoveType, uint32 uiPointId) override + { + if (uiMoveType != POINT_MOTION_TYPE || !uiPointId) + return; + + if (DoCastSpellIfCan(m_creature, SPELL_NET) == CAST_OK) + m_uiNetExpireTimer = 20000; + } + + void UpdateAI(const uint32 uiDiff) + { + if (m_uiNetExpireTimer) + { + if (m_uiNetExpireTimer <= uiDiff) + { + // evade when the net root has expired + if (!m_creature->getVictim()) + EnterEvadeMode(); + + m_uiNetExpireTimer = 0; + } + else + m_uiNetExpireTimer -= uiDiff; + } + + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + { + // incinerate visual on OOC timer, unless creature is rooted + if (!m_uiNetExpireTimer) + { + if (m_uiIncinerateTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_INCINERATE_COSMETIC) == CAST_OK) + m_uiIncinerateTimer = urand(3000, 5000); + } + else + m_uiIncinerateTimer -= uiDiff; + } + + return; + } + + if (m_uiIncinerateTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_INCINERATE) == CAST_OK) + m_uiIncinerateTimer = urand(3000, 5000); + } + else + m_uiIncinerateTimer -= uiDiff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_npc_scourged_flamespitter(Creature* pCreature) +{ + return new npc_scourged_flamespitterAI(pCreature); +} + +bool EffectAuraDummy_npc_scourged_flamespitter(const Aura* pAura, bool bApply) +{ + if (pAura->GetId() == SPELL_REINFORCED_NET && pAura->GetEffIndex() == EFFECT_INDEX_0 && bApply) + { + Creature* pCreature = (Creature*)pAura->GetTarget(); + Unit* pCaster = pAura->GetCaster(); + if (!pCreature || !pCaster || pCaster->GetTypeId() != TYPEID_PLAYER || pCreature->GetEntry() != NPC_FLAMESPITTER) + return false; + + // move the flamespitter to the ground level + pCreature->GetMotionMaster()->Clear(); + pCreature->SetWalk(false); + + float fGroundZ = pCreature->GetMap()->GetHeight(pCreature->GetPhaseMask(), pCreature->GetPositionX(), pCreature->GetPositionY(), pCreature->GetPositionZ()); + pCreature->GetMotionMaster()->MovePoint(1, pCreature->GetPositionX(), pCreature->GetPositionY(), fGroundZ); + return true; + } + + return false; +} + void AddSC_borean_tundra() { Script* pNewScript; @@ -884,4 +1004,10 @@ void AddSC_borean_tundra() pNewScript->pEffectAuraDummy = &EffectAuraDummy_npc_nexus_drake_hatchling; pNewScript->pEffectDummyNPC = &EffectDummyCreature_npc_nexus_drake_hatchling; pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_scourged_flamespitter"; + pNewScript->GetAI = &GetAI_npc_scourged_flamespitter; + pNewScript->pEffectAuraDummy = &EffectAuraDummy_npc_scourged_flamespitter; + pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index ad7355153..7995bcfc7 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2991" + #define SD2_REVISION_NR "2992" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index d4513b034..d68c41bcc 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -374,6 +374,7 @@ UPDATE creature_template SET ScriptName='npc_lurgglbr' WHERE entry=25208; UPDATE creature_template SET ScriptName='npc_beryl_sorcerer' WHERE entry=25316; UPDATE creature_template SET ScriptName='npc_captured_beryl_sorcerer' WHERE entry=25474; UPDATE creature_template SET ScriptName='npc_nexus_drake_hatchling' WHERE entry=26127; +UPDATE creature_template SET ScriptName='npc_scourged_flamespitter' WHERE entry=25582; /* BURNING STEPPES */ UPDATE creature_template SET ScriptName='npc_ragged_john' WHERE entry=9563; diff --git a/sql/updates/r2992_mangos.sql b/sql/updates/r2992_mangos.sql new file mode 100644 index 000000000..927a5e523 --- /dev/null +++ b/sql/updates/r2992_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_scourged_flamespitter' WHERE entry=25582; From 3dc20b107df84df7ff1a8d49977f8a4f8ef0f6bd Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sun, 16 Mar 2014 19:42:22 +0100 Subject: [PATCH 1003/1172] [2993] Fix build for CMaNGOS 12606 Require CMaNGOS [12606+] --- base/escort_ai.cpp | 2 +- base/follower_ai.cpp | 2 +- include/sc_creature.cpp | 2 +- scripts/kalimdor/felwood.cpp | 2 +- scripts/kalimdor/ruins_of_ahnqiraj/boss_moam.cpp | 2 +- scripts/northrend/borean_tundra.cpp | 2 +- scripts/world/mob_generic_creature.cpp | 2 +- sd2_revision_nr.h | 2 +- sql/scriptdev2_script_full.sql | 2 +- sql/updates/r2993_scriptdev2.sql | 1 + 10 files changed, 10 insertions(+), 9 deletions(-) create mode 100644 sql/updates/r2993_scriptdev2.sql diff --git a/base/escort_ai.cpp b/base/escort_ai.cpp index cafee012d..c03b4691b 100644 --- a/base/escort_ai.cpp +++ b/base/escort_ai.cpp @@ -99,7 +99,7 @@ bool npc_escortAI::AssistPlayerInCombat(Unit* pWho) return false; // experimental (unknown) flag not present - if (!(m_creature->GetCreatureInfo()->type_flags & CREATURE_TYPEFLAGS_CAN_ASSIST)) + if (!(m_creature->GetCreatureInfo()->CreatureTypeFlags & CREATURE_TYPEFLAGS_CAN_ASSIST)) return false; // unit state prevents (similar check is done in CanInitiateAttack which also include checking unit_flags. We skip those here) diff --git a/base/follower_ai.cpp b/base/follower_ai.cpp index 7185651d5..9f3d05a78 100644 --- a/base/follower_ai.cpp +++ b/base/follower_ai.cpp @@ -49,7 +49,7 @@ bool FollowerAI::AssistPlayerInCombat(Unit* pWho) return false; // experimental (unknown) flag not present - if (!(m_creature->GetCreatureInfo()->type_flags & CREATURE_TYPEFLAGS_CAN_ASSIST)) + if (!(m_creature->GetCreatureInfo()->CreatureTypeFlags & CREATURE_TYPEFLAGS_CAN_ASSIST)) return false; // unit state prevents (similar check is done in CanInitiateAttack which also include checking unit_flags. We skip those here) diff --git a/include/sc_creature.cpp b/include/sc_creature.cpp index e7067adca..c8467b5c6 100644 --- a/include/sc_creature.cpp +++ b/include/sc_creature.cpp @@ -479,7 +479,7 @@ void ScriptedAI::SetEquipmentSlots(bool bLoadDefault, int32 iMainHand, int32 iOf { if (bLoadDefault) { - m_creature->LoadEquipment(m_creature->GetCreatureInfo()->equipmentId, true); + m_creature->LoadEquipment(m_creature->GetCreatureInfo()->EquipmentTemplateId, true); return; } diff --git a/scripts/kalimdor/felwood.cpp b/scripts/kalimdor/felwood.cpp index abd012111..d1a1139ab 100644 --- a/scripts/kalimdor/felwood.cpp +++ b/scripts/kalimdor/felwood.cpp @@ -120,7 +120,7 @@ bool EffectDummyCreature_npc_kitten(Unit* /*pCaster*/, uint32 uiSpellId, SpellEf pCreatureTarget->SetEntry(pTemp->Entry); pCreatureTarget->SetDisplayId(Creature::ChooseDisplayId(pTemp)); pCreatureTarget->SetName(pTemp->Name); - pCreatureTarget->SetFloatValue(OBJECT_FIELD_SCALE_X, pTemp->scale); + pCreatureTarget->SetFloatValue(OBJECT_FIELD_SCALE_X, pTemp->Scale); } if (Unit* pOwner = pCreatureTarget->GetOwner()) diff --git a/scripts/kalimdor/ruins_of_ahnqiraj/boss_moam.cpp b/scripts/kalimdor/ruins_of_ahnqiraj/boss_moam.cpp index 67b91d737..5b8c2c8f5 100644 --- a/scripts/kalimdor/ruins_of_ahnqiraj/boss_moam.cpp +++ b/scripts/kalimdor/ruins_of_ahnqiraj/boss_moam.cpp @@ -66,7 +66,7 @@ struct MANGOS_DLL_DECL boss_moamAI : public ScriptedAI void Aggro(Unit* /*pWho*/) override { DoScriptText(EMOTE_AGGRO, m_creature); - m_creature->SetMaxPower(POWER_MANA, m_creature->GetCreatureInfo()->maxmana); + m_creature->SetMaxPower(POWER_MANA, m_creature->GetCreatureInfo()->MaxLevelMana); } void UpdateAI(const uint32 uiDiff) override diff --git a/scripts/northrend/borean_tundra.cpp b/scripts/northrend/borean_tundra.cpp index 1ace76389..312a69bce 100644 --- a/scripts/northrend/borean_tundra.cpp +++ b/scripts/northrend/borean_tundra.cpp @@ -278,7 +278,7 @@ bool EffectAuraDummy_npc_oil_stained_wolf(const Aura* pAura, bool bApply) else { Creature* pCreature = (Creature*)pAura->GetTarget(); - pCreature->setFaction(pCreature->GetCreatureInfo()->faction_A); + pCreature->setFaction(pCreature->GetCreatureInfo()->FactionAlliance); } return true; diff --git a/scripts/world/mob_generic_creature.cpp b/scripts/world/mob_generic_creature.cpp index 2b3d5c88d..31ab611f7 100644 --- a/scripts/world/mob_generic_creature.cpp +++ b/scripts/world/mob_generic_creature.cpp @@ -105,7 +105,7 @@ struct MANGOS_DLL_DECL generic_creatureAI : public ScriptedAI else info = SelectSpell(m_creature->getVictim(), -1, -1, SELECT_TARGET_ANY_ENEMY, 0, 0, 0, 0, SELECT_EFFECT_DONTCARE); // 50% chance if elite or higher, 20% chance if not, to replace our white hit with a spell - if (info && (rand() % (m_creature->GetCreatureInfo()->rank > 1 ? 2 : 5) == 0) && !GlobalCooldown) + if (info && (rand() % (m_creature->GetCreatureInfo()->Rank > 1 ? 2 : 5) == 0) && !GlobalCooldown) { // Cast the spell if (Healing)DoCastSpell(m_creature, info); diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 7995bcfc7..13bae9472 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2992" + #define SD2_REVISION_NR "2993" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 4079f68fe..b024d3777 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -3,7 +3,7 @@ -- DELETE FROM sd2_db_version; -INSERT INTO sd2_db_version (version) VALUES ('ScriptDev2 (for CMaNGOS 12587+) '); +INSERT INTO sd2_db_version (version) VALUES ('ScriptDev2 (for CMaNGOS 12606+) '); -- -- Below contains data for table `script_texts` mainly used in C++ parts. diff --git a/sql/updates/r2993_scriptdev2.sql b/sql/updates/r2993_scriptdev2.sql new file mode 100644 index 000000000..1dfd37e93 --- /dev/null +++ b/sql/updates/r2993_scriptdev2.sql @@ -0,0 +1 @@ +UPDATE sd2_db_version SET version='ScriptDev2 (for CMaNGOS 12606+) '; From 4433b1eac30ae2d2e75e461c68bb769f8d2f0985 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Tue, 25 Mar 2014 22:15:37 +0100 Subject: [PATCH 1004/1172] [2994] Implement script support for quest 10935 Thanks to @Rog360 for providing the data Close #90 --- scripts/outland/hellfire_peninsula.cpp | 358 ++++++++++++++++++++++++- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 2 + sql/scriptdev2_script_full.sql | 20 +- sql/updates/r2994_mangos.sql | 2 + sql/updates/r2994_scriptdev2.sql | 17 ++ 6 files changed, 396 insertions(+), 5 deletions(-) create mode 100644 sql/updates/r2994_mangos.sql create mode 100644 sql/updates/r2994_scriptdev2.sql diff --git a/scripts/outland/hellfire_peninsula.cpp b/scripts/outland/hellfire_peninsula.cpp index 61be3b23e..f7ea526f4 100644 --- a/scripts/outland/hellfire_peninsula.cpp +++ b/scripts/outland/hellfire_peninsula.cpp @@ -17,7 +17,7 @@ /* ScriptData SDName: Hellfire_Peninsula SD%Complete: 100 -SDComment: Quest support: 9375, 9410, 9418, 10629, 10838 +SDComment: Quest support: 9375, 9410, 9418, 10629, 10838, 10935. SDCategory: Hellfire Peninsula EndScriptData */ @@ -27,6 +27,8 @@ npc_ancestral_wolf npc_demoniac_scryer npc_wounded_blood_elf npc_fel_guard_hound +npc_anchorite_barada +npc_colonel_jules EndContentData */ #include "precompiled.h" @@ -530,6 +532,347 @@ bool EffectDummyCreature_npc_fel_guard_hound(Unit* pCaster, uint32 uiSpellId, Sp return false; } +/*###### +## npc_anchorite_barada +######*/ + +enum +{ + SAY_EXORCISM_1 = -1000981, + SAY_EXORCISM_2 = -1000982, + SAY_EXORCISM_3 = -1000983, + SAY_EXORCISM_4 = -1000984, + SAY_EXORCISM_5 = -1000985, + SAY_EXORCISM_6 = -1000986, + + SPELL_BARADA_COMMANDS = 39277, + SPELL_BARADA_FALTERS = 39278, + + SPELL_JULES_THREATENS = 39284, + SPELL_JULES_GOES_UPRIGHT = 39294, + SPELL_JULES_VOMITS = 39295, + SPELL_JULES_RELEASE_DARKNESS = 39306, // periodic trigger missing spell 39305 + + NPC_ANCHORITE_BARADA = 22431, + NPC_COLONEL_JULES = 22432, + NPC_DARKNESS_RELEASED = 22507, // summoned by missing spell 39305 + + GOSSIP_ITEM_EXORCISM = -3000111, + QUEST_ID_EXORCISM = 10935, + + TEXT_ID_CLEANSED = 10706, + TEXT_ID_POSSESSED = 10707, + TEXT_ID_ANCHORITE = 10683, +}; + +static const DialogueEntry aExorcismDialogue[] = +{ + {SAY_EXORCISM_1, NPC_ANCHORITE_BARADA, 3000}, + {SAY_EXORCISM_2, NPC_ANCHORITE_BARADA, 2000}, + {QUEST_ID_EXORCISM, 0, 0}, // start wp movemnet + {SAY_EXORCISM_3, NPC_COLONEL_JULES, 3000}, + {SPELL_BARADA_COMMANDS, 0, 10000}, + {SAY_EXORCISM_4, NPC_ANCHORITE_BARADA, 10000}, + {SAY_EXORCISM_5, NPC_COLONEL_JULES, 10000}, + {SPELL_BARADA_FALTERS, 0, 2000}, + {SPELL_JULES_THREATENS, 0, 15000}, // start levitating + {NPC_COLONEL_JULES, 0, 15000}, + {NPC_ANCHORITE_BARADA, 0, 15000}, + {NPC_COLONEL_JULES, 0, 15000}, + {NPC_ANCHORITE_BARADA, 0, 15000}, + {SPELL_JULES_GOES_UPRIGHT, 0, 3000}, + {SPELL_JULES_VOMITS, 0, 7000}, // start moving around the room + {NPC_COLONEL_JULES, 0, 10000}, + {NPC_ANCHORITE_BARADA, 0, 10000}, + {NPC_COLONEL_JULES, 0, 10000}, + {NPC_ANCHORITE_BARADA, 0, 10000}, + {NPC_COLONEL_JULES, 0, 10000}, + {NPC_ANCHORITE_BARADA, 0, 10000}, + {NPC_COLONEL_JULES, 0, 10000}, + {NPC_ANCHORITE_BARADA, 0, 10000}, + {NPC_DARKNESS_RELEASED, 0, 5000}, // event finished + {SAY_EXORCISM_6, NPC_ANCHORITE_BARADA, 3000}, + {TEXT_ID_CLEANSED, 0, 0}, + {0, 0, 0}, +}; + +static const int32 aAnchoriteTexts[3] = { -1000987, -1000988, -1000989 }; +static const int32 aColonelTexts[3] = { -1000990, -1000991, -1000992 }; + +// Note: script is highly dependent on DBscript implementation +struct MANGOS_DLL_DECL npc_anchorite_baradaAI : public ScriptedAI, private DialogueHelper +{ + npc_anchorite_baradaAI(Creature* pCreature) : ScriptedAI(pCreature), + DialogueHelper(aExorcismDialogue) + { + Reset(); + } + + bool m_bEventComplete; + bool m_bEventInProgress; + + ObjectGuid m_colonelGuid; + + void Reset() override + { + m_bEventComplete = false; + m_bEventInProgress = false; + } + + void AttackStart(Unit* pWho) override + { + // no attack during the exorcism + if (m_bEventInProgress) + return; + + ScriptedAI::AttackStart(pWho); + } + + void EnterEvadeMode() override + { + // no evade during the exorcism + if (m_bEventInProgress) + return; + + ScriptedAI::EnterEvadeMode(); + } + + bool IsExorcismComplete() { return m_bEventComplete; } + + void ReceiveAIEvent(AIEventType eventType, Creature* /*pSender*/, Unit* pInvoker, uint32 /*uiMiscValue*/) override + { + if (eventType == AI_EVENT_START_EVENT && pInvoker->GetTypeId() == TYPEID_PLAYER) + { + // start the actuall exorcism + if (Creature* pColoner = GetClosestCreatureWithEntry(m_creature, NPC_COLONEL_JULES, 15.0f)) + m_colonelGuid = pColoner->GetObjectGuid(); + + m_creature->SetStandState(UNIT_STAND_STATE_STAND); + m_creature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); + + StartNextDialogueText(SAY_EXORCISM_1); + } + } + + void MovementInform(uint32 uiType, uint32 uiPointId) override + { + if (uiType != WAYPOINT_MOTION_TYPE) + return; + + switch (uiPointId) + { + case 3: + // pause wp and resume dialogue + m_creature->addUnitState(UNIT_STAT_WAYPOINT_PAUSED); + m_creature->SetStandState(UNIT_STAND_STATE_KNEEL); + m_bEventInProgress = true; + + if (Creature* pColonel = m_creature->GetMap()->GetCreature(m_colonelGuid)) + { + m_creature->SetFacingToObject(pColonel); + pColonel->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); + } + + StartNextDialogueText(SAY_EXORCISM_3); + break; + case 6: + // event completed - wait for player to get quest credit by gossip + if (Creature* pColonel = m_creature->GetMap()->GetCreature(m_colonelGuid)) + m_creature->SetFacingToObject(pColonel); + m_creature->GetMotionMaster()->Clear(); + m_creature->SetStandState(UNIT_STAND_STATE_KNEEL); + m_bEventComplete = true; + break; + } + } + + void JustDidDialogueStep(int32 iEntry) override + { + switch (iEntry) + { + case QUEST_ID_EXORCISM: + m_creature->GetMotionMaster()->MoveWaypoint(); + break; + case SPELL_BARADA_COMMANDS: + DoCastSpellIfCan(m_creature, SPELL_BARADA_COMMANDS); + break; + case SPELL_BARADA_FALTERS: + DoCastSpellIfCan(m_creature, SPELL_BARADA_FALTERS); + // start levitating + if (Creature* pColonel = m_creature->GetMap()->GetCreature(m_colonelGuid)) + { + pColonel->SetLevitate(true); + pColonel->GetMotionMaster()->MovePoint(0, pColonel->GetPositionX(), pColonel->GetPositionY(), pColonel->GetPositionZ() + 2.0f); + } + break; + case SPELL_JULES_THREATENS: + if (Creature* pColonel = m_creature->GetMap()->GetCreature(m_colonelGuid)) + { + pColonel->CastSpell(pColonel, SPELL_JULES_THREATENS, true); + pColonel->CastSpell(pColonel, SPELL_JULES_RELEASE_DARKNESS, true); + pColonel->SetFacingTo(0); + } + break; + case SPELL_JULES_GOES_UPRIGHT: + if (Creature* pColonel = m_creature->GetMap()->GetCreature(m_colonelGuid)) + { + pColonel->InterruptNonMeleeSpells(false); + pColonel->CastSpell(pColonel, SPELL_JULES_GOES_UPRIGHT, false); + } + break; + case SPELL_JULES_VOMITS: + if (Creature* pColonel = m_creature->GetMap()->GetCreature(m_colonelGuid)) + { + pColonel->CastSpell(pColonel, SPELL_JULES_VOMITS, true); + pColonel->GetMotionMaster()->MoveRandomAroundPoint(m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ() + 3.0f, 5.0f); + } + break; + case NPC_COLONEL_JULES: + if (Creature* pColonel = m_creature->GetMap()->GetCreature(m_colonelGuid)) + DoScriptText(aColonelTexts[urand(0, 2)], pColonel); + break; + case NPC_ANCHORITE_BARADA: + DoScriptText(aAnchoriteTexts[urand(0, 2)], m_creature); + break; + case NPC_DARKNESS_RELEASED: + if (Creature* pColonel = m_creature->GetMap()->GetCreature(m_colonelGuid)) + { + pColonel->RemoveAurasDueToSpell(SPELL_JULES_THREATENS); + pColonel->RemoveAurasDueToSpell(SPELL_JULES_RELEASE_DARKNESS); + pColonel->RemoveAurasDueToSpell(SPELL_JULES_VOMITS); + pColonel->GetMotionMaster()->MoveTargetedHome(); + pColonel->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); + } + break; + case TEXT_ID_CLEANSED: + if (Creature* pColonel = m_creature->GetMap()->GetCreature(m_colonelGuid)) + { + pColonel->RemoveAurasDueToSpell(SPELL_JULES_GOES_UPRIGHT); + pColonel->SetLevitate(false); + } + // resume wp movemnet + m_creature->RemoveAllAuras(); + m_creature->clearUnitState(UNIT_STAT_WAYPOINT_PAUSED); + m_creature->SetStandState(UNIT_STAND_STATE_STAND); + break; + } + } + + Creature* GetSpeakerByEntry(uint32 uiEntry) override + { + switch (uiEntry) + { + case NPC_ANCHORITE_BARADA: return m_creature; + case NPC_COLONEL_JULES: return m_creature->GetMap()->GetCreature(m_colonelGuid); + + default: + return NULL; + } + } + + void UpdateAI(const uint32 uiDiff) override + { + DialogueUpdate(uiDiff); + + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_npc_anchorite_barada(Creature* pCreature) +{ + return new npc_anchorite_baradaAI(pCreature); +} + +bool GossipHello_npc_anchorite_barada(Player* pPlayer, Creature* pCreature) +{ + // check if quest is active but not completed + if (pPlayer->IsCurrentQuest(QUEST_ID_EXORCISM, 1)) + pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_EXORCISM, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); + + pPlayer->SEND_GOSSIP_MENU(TEXT_ID_ANCHORITE, pCreature->GetObjectGuid()); + return true; +} + +bool GossipSelect_npc_anchorite_barada(Player* pPlayer, Creature* pCreature, uint32 /*uiSender*/, uint32 uiAction) +{ + if (uiAction == GOSSIP_ACTION_INFO_DEF + 1) + { + pCreature->AI()->SendAIEvent(AI_EVENT_START_EVENT, pPlayer, pCreature); + pPlayer->CLOSE_GOSSIP_MENU(); + } + + return true; +} + +/*###### +## npc_colonel_jules +######*/ + +bool GossipHello_npc_colonel_jules(Player* pPlayer, Creature* pCreature) +{ + // quest already completed + if (pPlayer->GetQuestStatus(QUEST_ID_EXORCISM) == QUEST_STATUS_COMPLETE) + { + pPlayer->SEND_GOSSIP_MENU(TEXT_ID_CLEANSED, pCreature->GetObjectGuid()); + return true; + } + // quest active but not complete + else if (pPlayer->IsCurrentQuest(QUEST_ID_EXORCISM, 1)) + { + Creature* pAnchorite = GetClosestCreatureWithEntry(pCreature, NPC_ANCHORITE_BARADA, 15.0f); + if (!pAnchorite) + return true; + + if (npc_anchorite_baradaAI* pAnchoriteAI = dynamic_cast(pAnchorite->AI())) + { + // event complete - give credit and reset + if (pAnchoriteAI->IsExorcismComplete()) + { + // kill credit + pPlayer->RewardPlayerAndGroupAtEvent(pCreature->GetEntry(), pCreature); + + // reset Anchorite and Colonel + pAnchorite->AI()->EnterEvadeMode(); + pCreature->AI()->EnterEvadeMode(); + + pAnchorite->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); + pPlayer->SEND_GOSSIP_MENU(TEXT_ID_CLEANSED, pCreature->GetObjectGuid()); + return true; + } + } + } + + pPlayer->SEND_GOSSIP_MENU(TEXT_ID_POSSESSED, pCreature->GetObjectGuid()); + return true; +} + +bool EffectDummyCreature_npc_colonel_jules(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget, ObjectGuid /*originalCasterGuid*/) +{ + // always check spellid and effectindex + if (uiSpellId == SPELL_JULES_RELEASE_DARKNESS && uiEffIndex == EFFECT_INDEX_0 && pCreatureTarget->GetEntry() == NPC_COLONEL_JULES) + { + Creature* pAnchorite = GetClosestCreatureWithEntry(pCreatureTarget, NPC_ANCHORITE_BARADA, 15.0f); + if (!pAnchorite) + return false; + + // get random point around the Anchorite + float fX, fY, fZ; + pCreatureTarget->GetNearPoint(pCreatureTarget, fX, fY, fZ, 5.0f, 10.0f, frand(0, M_PI_F/2)); + + // spawn a Darkness Released npc and move around the room + if (Creature* pDarkness = pCreatureTarget->SummonCreature(NPC_DARKNESS_RELEASED, 0, 0, 0, 0, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 20000)) + pDarkness->GetMotionMaster()->MovePoint(0, fX, fY, fZ); + + // always return true when we are handling this spell and effect + return true; + } + + return false; +} + void AddSC_hellfire_peninsula() { Script* pNewScript; @@ -562,4 +905,17 @@ void AddSC_hellfire_peninsula() pNewScript->GetAI = &GetAI_npc_fel_guard_hound; pNewScript->pEffectDummyNPC = &EffectDummyCreature_npc_fel_guard_hound; pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_anchorite_barada"; + pNewScript->GetAI = &GetAI_npc_anchorite_barada; + pNewScript->pGossipHello = &GossipHello_npc_anchorite_barada; + pNewScript->pGossipSelect = &GossipSelect_npc_anchorite_barada; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_colonel_jules"; + pNewScript->pGossipHello = &GossipHello_npc_colonel_jules; + pNewScript->pEffectDummyNPC = &EffectDummyCreature_npc_colonel_jules; + pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 13bae9472..05d3ce63c 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2993" + #define SD2_REVISION_NR "2994" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index d68c41bcc..27d50d566 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -659,6 +659,8 @@ UPDATE creature_template SET ScriptName='npc_ancestral_wolf' WHERE entry=17077; UPDATE creature_template SET ScriptName='npc_demoniac_scryer' WHERE entry=22258; UPDATE creature_template SET ScriptName='npc_wounded_blood_elf' WHERE entry=16993; UPDATE creature_template SET ScriptName='npc_fel_guard_hound' WHERE entry=21847; +UPDATE creature_template SET ScriptName='npc_anchorite_barada' WHERE entry=22431; +UPDATE creature_template SET ScriptName='npc_colonel_jules' WHERE entry=22432; /* HILLSBRAD FOOTHILLS */ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index b024d3777..25c2329e4 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -1052,14 +1052,27 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1000971,'Keep them off me!',0,0,0,0,'drijya SAY_DRIJYA_3'), (-1000972,'I\'m done with this pylon. On to the next.',0,0,0,1,'drijya SAY_DRIJYA_4'), (-1000973,'Alright, pylon two down. Now for the heat mainfold.',0,0,0,1,'drijya SAY_DRIJYA_5'), -(-1000974,'That should do it. The teleporter should blow any second now !',0,0,0,5,'drijya SAY_DRIJYA_6'), +(-1000974,'That should do it. The teleporter should blow any second now!',0,0,0,5,'drijya SAY_DRIJYA_6'), (-1000975,'Ok, let\'s get out of here!',0,0,0,1,'drijya SAY_DRIJYA_7'), (-1000976,'Thank you, $n! I couldn\'t have done it without you. You\'ll let Gahruj know?',0,0,0,1,'drijya SAY_DRIJYA_COMPLETE'), (-1000977,'Oh, it\'s on now! But you thought I\'d be alone too, huh?!',0,0,0,0,'tapoke slim jahn SAY_AGGRO'), (-1000978,'Okay, okay! No need to get all violent. I\'ll talk. I\'ll talk!',0,0,0,20,'tapoke slim jahn SAY_DEFEAT'), (-1000979,'Whoa! This is way more than what I bargained for, you\'re on your own, Slim!',0,0,0,0,'slim\'s friend SAY_FRIEND_DEFEAT'), -(-1000980,'I have a few notes from the job back at my place. I\'ll get them and then meet you back in the inn.',0,0,0,1,'tapoke slim jahn SAY_NOTES'); +(-1000980,'I have a few notes from the job back at my place. I\'ll get them and then meet you back in the inn.',0,0,0,1,'tapoke slim jahn SAY_NOTES'), + +(-1000981,'It is time. The rite of exorcism will now commence...',0,0,0,0,'anchorite barada SAY_EXORCISM_1'), +(-1000982,'Prepare yourself. Do not allow the ritual to be interrupted or we may lose our patient...',0,0,0,1,'anchorite barada SAY_EXORCISM_2'), +(-1000983,'Keep away. The fool is mine.',0,0,0,0,'colonel jules SAY_EXORCISM_3'), +(-1000984,'Back, foul beings of darkness! You have no power here!',0,0,0,0,'anchorite barada SAY_EXORCISM_4'), +(-1000985,'No! Not yet! This soul is ours!',0,0,0,0,'colonel jules SAY_EXORCISM_5'), +(-1000986,'Back! I cast you back... corrupter of faith! Author of pain! Do not return, or suffer the same fate as you did here today!',0,0,0,2,'anchorite barada SAY_EXORCISM_6'), +(-1000987,'I... must not...falter!',0,0,0,0,'anchorite barada SAY_EXORCISM_RANDOM_1'), +(-1000988,'Be cleansed with Light, human! Let not the demonic corruption overwhelm you.',0,0,0,0,'anchorite barada SAY_EXORCISM_RANDOM_2'), +(-1000989,'Back, foul beings of darkness! You have no power here!',0,0,0,0,'anchorite barada SAY_EXORCISM_RANDOM_3'), +(-1000990,'This is fruitless, draenei! You and your little helper cannot wrest control of this pathetic human. He is mine!',0,0,0,0,'colonel jules SAY_EXORCISM_RANDOM_4'), +(-1000991,'I see your ancestors, Anchorite! They writhe and scream in the darkness... they are with us!',0,0,0,0,'colonel jules SAY_EXORCISM_RANDOM_5'), +(-1000992,'I will tear your soul into morsels and slow roast them over demon fire!',0,0,0,0,'colonel jules SAY_EXORCISM_RANDOM_6'); -- -1 033 000 SHADOWFANG KEEP INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES @@ -4628,7 +4641,8 @@ INSERT INTO gossip_texts (entry,content_default,comment) VALUES (-3000107,'I am ready, as are my forces. Let us end this masquerade!','reginald windsor GOSSIP_ITEM_START'), (-3000108,'I need a moment of your time, sir.','prospector anvilward GOSSIP_ITEM_MOMENT'), (-3000109,'I am ready, Oronok. Let us destroy Cyrukh and free the elements!','oronok torn-heart GOSSIP_ITEM_FIGHT'), -(-3000110,'Why... yes, of course. I\'ve something to show you right inside this building, Mr. Anvilward.','prospector anvilward GOSSIP_ITEM_SHOW'); +(-3000110,'Why... yes, of course. I\'ve something to show you right inside this building, Mr. Anvilward.','prospector anvilward GOSSIP_ITEM_SHOW'), +(-3000111,'I am ready, Anchorite. Let us begin the exorcism.','anchorite barada GOSSIP_ITEM_EXORCISM'); -- -3 033 000 SHADOWFANG KEEP INSERT INTO gossip_texts (entry,content_default,comment) VALUES diff --git a/sql/updates/r2994_mangos.sql b/sql/updates/r2994_mangos.sql new file mode 100644 index 000000000..2e811e283 --- /dev/null +++ b/sql/updates/r2994_mangos.sql @@ -0,0 +1,2 @@ +UPDATE creature_template SET ScriptName='npc_anchorite_barada' WHERE entry=22431; +UPDATE creature_template SET ScriptName='npc_colonel_jules' WHERE entry=22432; diff --git a/sql/updates/r2994_scriptdev2.sql b/sql/updates/r2994_scriptdev2.sql new file mode 100644 index 000000000..fda85199e --- /dev/null +++ b/sql/updates/r2994_scriptdev2.sql @@ -0,0 +1,17 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1000992 AND -1000981; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1000981,'It is time. The rite of exorcism will now commence...',0,0,0,0,'anchorite barada SAY_EXORCISM_1'), +(-1000982,'Prepare yourself. Do not allow the ritual to be interrupted or we may lose our patient...',0,0,0,1,'anchorite barada SAY_EXORCISM_2'), +(-1000983,'Keep away. The fool is mine.',0,0,0,0,'colonel jules SAY_EXORCISM_3'), +(-1000984,'Back, foul beings of darkness! You have no power here!',0,0,0,0,'anchorite barada SAY_EXORCISM_4'), +(-1000985,'No! Not yet! This soul is ours!',0,0,0,0,'colonel jules SAY_EXORCISM_5'), +(-1000986,'Back! I cast you back... corrupter of faith! Author of pain! Do not return, or suffer the same fate as you did here today!',0,0,0,2,'anchorite barada SAY_EXORCISM_6'), +(-1000987,'I... must not...falter!',0,0,0,0,'anchorite barada SAY_EXORCISM_RANDOM_1'), +(-1000988,'Be cleansed with Light, human! Let not the demonic corruption overwhelm you.',0,0,0,0,'anchorite barada SAY_EXORCISM_RANDOM_2'), +(-1000989,'Back, foul beings of darkness! You have no power here!',0,0,0,0,'anchorite barada SAY_EXORCISM_RANDOM_3'), +(-1000990,'This is fruitless, draenei! You and your little helper cannot wrest control of this pathetic human. He is mine!',0,0,0,0,'colonel jules SAY_EXORCISM_RANDOM_4'), +(-1000991,'I see your ancestors, Anchorite! They writhe and scream in the darkness... they are with us!',0,0,0,0,'colonel jules SAY_EXORCISM_RANDOM_5'), +(-1000992,'I will tear your soul into morsels and slow roast them over demon fire!',0,0,0,0,'colonel jules SAY_EXORCISM_RANDOM_6'); +DELETE FROM gossip_texts WHERE entry=-3000111; +INSERT INTO gossip_texts (entry,content_default,comment) VALUES +(-3000111,'I am ready, Anchorite. Let us begin the exorcism.','anchorite barada GOSSIP_ITEM_EXORCISM'); From e3eada4aaab518ca53474b46c4831739287a89a7 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Fri, 28 Mar 2014 00:05:03 +0100 Subject: [PATCH 1005/1172] [2995] Implement script support for quest 3367. Please note that there might be many details on this event which are currently missing. Close #96 --- scripts/eastern_kingdoms/searing_gorge.cpp | 101 ++++++++++++++++++++- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 + sql/scriptdev2_script_full.sql | 42 ++++++++- sql/updates/r2995_mangos.sql | 1 + sql/updates/r2995_scriptdev2.sql | 41 +++++++++ 6 files changed, 183 insertions(+), 5 deletions(-) create mode 100644 sql/updates/r2995_mangos.sql create mode 100644 sql/updates/r2995_scriptdev2.sql diff --git a/scripts/eastern_kingdoms/searing_gorge.cpp b/scripts/eastern_kingdoms/searing_gorge.cpp index 3f66ef677..abdc983b3 100644 --- a/scripts/eastern_kingdoms/searing_gorge.cpp +++ b/scripts/eastern_kingdoms/searing_gorge.cpp @@ -16,20 +16,115 @@ /* ScriptData SDName: Searing_Gorge -SD%Complete: 0 -SDComment: Placeholder +SD%Complete: 80 +SDComment: Quest support: 3367. SDCategory: Searing Gorge EndScriptData */ /* ContentData +npc_dorius_stonetender EndContentData */ #include "precompiled.h" +#include "escort_ai.h" /*###### -## +## npc_dorius_stonetender ######*/ +enum +{ + SAY_DORIUS_AGGRO_1 = -1000993, + SAY_DORIUS_AGGRO_2 = -1000994, + + NPC_DARK_IRON_STEELSHIFTER = 8337, + MAX_STEELSHIFTERS = 4, + + QUEST_ID_SUNTARA_STONES = 3367, +}; + +struct MANGOS_DLL_DECL npc_dorius_stonetenderAI : public npc_escortAI +{ + npc_dorius_stonetenderAI(Creature* pCreature) : npc_escortAI(pCreature) { Reset(); } + + void Reset() override { } + + void Aggro(Unit* pWho) override + { + DoScriptText(urand(0, 1) ? SAY_DORIUS_AGGRO_1 : SAY_DORIUS_AGGRO_2, m_creature, pWho); + } + + void ReceiveAIEvent(AIEventType eventType, Creature* /*pSender*/, Unit* pInvoker, uint32 uiMiscValue) override + { + if (eventType == AI_EVENT_START_ESCORT && pInvoker->GetTypeId() == TYPEID_PLAYER) + { + // ToDo: research if there is any text here + m_creature->SetStandState(UNIT_STAND_STATE_STAND); + m_creature->SetFactionTemporary(FACTION_ESCORT_A_NEUTRAL_PASSIVE, TEMPFACTION_RESTORE_RESPAWN); + Start(false, (Player*)pInvoker, GetQuestTemplateStore(uiMiscValue), true); + } + } + + void WaypointReached(uint32 uiPointId) override + { + switch (uiPointId) + { + case 20: + // ToDo: research if there is any text here! + float fX, fY, fZ; + for (uint8 i = 0; i < MAX_STEELSHIFTERS; ++i) + { + m_creature->GetNearPoint(m_creature, fX, fY, fZ, 0, 15.0f, i * M_PI_F / 2); + m_creature->SummonCreature(NPC_DARK_IRON_STEELSHIFTER, fX, fY, fZ, 0, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 60000); + } + break; + case 33: + // ToDo: research if there is any event and text here! + if (Player* pPlayer = GetPlayerForEscort()) + pPlayer->GroupEventHappens(QUEST_ID_SUNTARA_STONES, m_creature); + m_creature->SetStandState(UNIT_STAND_STATE_DEAD); + break; + } + } + + void JustSummoned(Creature* pSummoned) override + { + if (pSummoned->GetEntry() == NPC_DARK_IRON_STEELSHIFTER) + pSummoned->AI()->AttackStart(m_creature); + } + + void UpdateEscortAI(const uint32 uiDiff) override + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_npc_dorius_stonetender(Creature* pCreature) +{ + return new npc_dorius_stonetenderAI(pCreature); +} + +bool QuestAccept_npc_dorius_stonetender(Player* pPlayer, Creature* pCreature, const Quest* pQuest) +{ + if (pQuest->GetQuestId() == QUEST_ID_SUNTARA_STONES) + { + pCreature->AI()->SendAIEvent(AI_EVENT_START_ESCORT, pPlayer, pCreature, pQuest->GetQuestId()); + return true; + } + + return false; +} + void AddSC_searing_gorge() { + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "npc_dorius_stonetender"; + pNewScript->GetAI = &GetAI_npc_dorius_stonetender; + pNewScript->pQuestAcceptNPC = &QuestAccept_npc_dorius_stonetender; + pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 05d3ce63c..573957a97 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2994" + #define SD2_REVISION_NR "2995" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 27d50d566..6451d6a60 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -1011,6 +1011,7 @@ INSERT INTO scripted_event_id VALUES (5623,'event_spell_gandling_shadow_portal'); /* SEARING GORGE */ +UPDATE creature_template SET ScriptName='npc_dorius_stonetender' WHERE entry=8284; /* SHADOWFANG KEEP */ UPDATE instance_template SET ScriptName='instance_shadowfang_keep' WHERE map=33; diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 25c2329e4..e1fafb2d8 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -1072,7 +1072,10 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1000989,'Back, foul beings of darkness! You have no power here!',0,0,0,0,'anchorite barada SAY_EXORCISM_RANDOM_3'), (-1000990,'This is fruitless, draenei! You and your little helper cannot wrest control of this pathetic human. He is mine!',0,0,0,0,'colonel jules SAY_EXORCISM_RANDOM_4'), (-1000991,'I see your ancestors, Anchorite! They writhe and scream in the darkness... they are with us!',0,0,0,0,'colonel jules SAY_EXORCISM_RANDOM_5'), -(-1000992,'I will tear your soul into morsels and slow roast them over demon fire!',0,0,0,0,'colonel jules SAY_EXORCISM_RANDOM_6'); +(-1000992,'I will tear your soul into morsels and slow roast them over demon fire!',0,0,0,0,'colonel jules SAY_EXORCISM_RANDOM_6'), + +(-1000993,'It\'s on! $N, meet my fists. Fists, say hello to $N.',0,0,0,0,'dorius stonetender SAY_AGGRO_1'), +(-1000994,'I\'m about to open a can on this $N.',0,0,0,0,'dorius stonetender SAY_AGGRO_2'); -- -1 033 000 SHADOWFANG KEEP INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES @@ -7568,4 +7571,41 @@ INSERT INTO script_waypoint VALUES (20281, 26, 3099.995, 2796.665, 118.118, 0, ''), (20281, 27, 3096.290, 2801.027, 118.096, 0, 'SAY_DRIJYA_COMPLETE'); +DELETE FROM script_waypoint WHERE entry=8284; +INSERT INTO script_waypoint VALUES +(8284, 0, -7007.209, -1749.160, 234.182, 3000, 'stand up'), +(8284, 1, -7007.324, -1729.849, 234.162, 0, ''), +(8284, 2, -7006.394, -1726.522, 234.099, 0, ''), +(8284, 3, -7003.256, -1726.903, 234.594, 0, ''), +(8284, 4, -6994.778, -1733.571, 238.281, 0, ''), +(8284, 5, -6987.904, -1735.935, 240.727, 0, ''), +(8284, 6, -6978.704, -1736.991, 241.809, 0, ''), +(8284, 7, -6964.261, -1740.251, 241.713, 0, ''), +(8284, 8, -6946.701, -1746.284, 241.667, 0, ''), +(8284, 9, -6938.751, -1749.381, 240.744, 0, ''), +(8284, 10, -6927.004, -1768.782, 240.744, 0, ''), +(8284, 11, -6909.453, -1791.258, 240.744, 0, ''), +(8284, 12, -6898.225, -1804.870, 240.744, 0, ''), +(8284, 13, -6881.280, -1821.788, 240.744, 0, ''), +(8284, 14, -6867.653, -1832.672, 240.706, 0, ''), +(8284, 15, -6850.184, -1839.254, 243.006, 0, ''), +(8284, 16, -6829.381, -1847.635, 244.190, 0, ''), +(8284, 17, -6804.618, -1857.535, 244.209, 0, ''), +(8284, 18, -6776.421, -1868.879, 244.142, 0, ''), +(8284, 19, -6753.471, -1876.906, 244.170, 10000, 'stop'), +(8284, 20, -6753.471, -1876.906, 244.170, 0, 'ambush'), +(8284, 21, -6731.033, -1884.944, 244.144, 0, ''), +(8284, 22, -6705.738, -1896.779, 244.144, 0, ''), +(8284, 23, -6678.956, -1909.607, 244.369, 0, ''), +(8284, 24, -6654.263, -1916.758, 244.145, 0, ''), +(8284, 25, -6620.604, -1917.608, 244.149, 0, ''), +(8284, 26, -6575.958, -1922.408, 244.149, 0, ''), +(8284, 27, -6554.811, -1929.883, 244.162, 0, ''), +(8284, 28, -6521.856, -1947.322, 244.151, 0, ''), +(8284, 29, -6493.320, -1962.654, 244.151, 0, ''), +(8284, 30, -6463.350, -1975.537, 244.213, 0, ''), +(8284, 31, -6435.428, -1983.847, 244.548, 0, ''), +(8284, 32, -6418.380, -1985.778, 246.554, 0, ''), +(8284, 33, -6389.783, -1986.544, 246.771, 30000, 'quest complete'); + -- EOF diff --git a/sql/updates/r2995_mangos.sql b/sql/updates/r2995_mangos.sql new file mode 100644 index 000000000..2a289a578 --- /dev/null +++ b/sql/updates/r2995_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_dorius_stonetender' WHERE entry=8284; diff --git a/sql/updates/r2995_scriptdev2.sql b/sql/updates/r2995_scriptdev2.sql new file mode 100644 index 000000000..b3e8c39e9 --- /dev/null +++ b/sql/updates/r2995_scriptdev2.sql @@ -0,0 +1,41 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1000995 AND -1000993; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1000993,'It\'s on! $N, meet my fists. Fists, say hello to $N.',0,0,0,0,'dorius stonetender SAY_AGGRO_1'), +(-1000994,'I\'m about to open a can on this $N.',0,0,0,0,'dorius stonetender SAY_AGGRO_2'); + +DELETE FROM script_waypoint WHERE entry=8284; +INSERT INTO script_waypoint VALUES +(8284, 0, -7007.209, -1749.160, 234.182, 3000, 'stand up'), +(8284, 1, -7007.324, -1729.849, 234.162, 0, ''), +(8284, 2, -7006.394, -1726.522, 234.099, 0, ''), +(8284, 3, -7003.256, -1726.903, 234.594, 0, ''), +(8284, 4, -6994.778, -1733.571, 238.281, 0, ''), +(8284, 5, -6987.904, -1735.935, 240.727, 0, ''), +(8284, 6, -6978.704, -1736.991, 241.809, 0, ''), +(8284, 7, -6964.261, -1740.251, 241.713, 0, ''), +(8284, 8, -6946.701, -1746.284, 241.667, 0, ''), +(8284, 9, -6938.751, -1749.381, 240.744, 0, ''), +(8284, 10, -6927.004, -1768.782, 240.744, 0, ''), +(8284, 11, -6909.453, -1791.258, 240.744, 0, ''), +(8284, 12, -6898.225, -1804.870, 240.744, 0, ''), +(8284, 13, -6881.280, -1821.788, 240.744, 0, ''), +(8284, 14, -6867.653, -1832.672, 240.706, 0, ''), +(8284, 15, -6850.184, -1839.254, 243.006, 0, ''), +(8284, 16, -6829.381, -1847.635, 244.190, 0, ''), +(8284, 17, -6804.618, -1857.535, 244.209, 0, ''), +(8284, 18, -6776.421, -1868.879, 244.142, 0, ''), +(8284, 19, -6753.471, -1876.906, 244.170, 10000, 'stop'), +(8284, 20, -6753.471, -1876.906, 244.170, 0, 'ambush'), +(8284, 21, -6731.033, -1884.944, 244.144, 0, ''), +(8284, 22, -6705.738, -1896.779, 244.144, 0, ''), +(8284, 23, -6678.956, -1909.607, 244.369, 0, ''), +(8284, 24, -6654.263, -1916.758, 244.145, 0, ''), +(8284, 25, -6620.604, -1917.608, 244.149, 0, ''), +(8284, 26, -6575.958, -1922.408, 244.149, 0, ''), +(8284, 27, -6554.811, -1929.883, 244.162, 0, ''), +(8284, 28, -6521.856, -1947.322, 244.151, 0, ''), +(8284, 29, -6493.320, -1962.654, 244.151, 0, ''), +(8284, 30, -6463.350, -1975.537, 244.213, 0, ''), +(8284, 31, -6435.428, -1983.847, 244.548, 0, ''), +(8284, 32, -6418.380, -1985.778, 246.554, 0, ''), +(8284, 33, -6389.783, -1986.544, 246.771, 30000, 'quest complete'); From 807c1cb8a2a9a931305f269402d3446600bab085 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sat, 29 Mar 2014 01:48:09 +0100 Subject: [PATCH 1006/1172] [2996] Implement script support for quest 9729 Part of #27 --- scripts/outland/zangarmarsh.cpp | 163 ++++++++++++++++++++++++++++++- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 + sql/scriptdev2_script_full.sql | 106 +++++++++++++++++++- sql/updates/r2996_mangos.sql | 1 + sql/updates/r2996_scriptdev2.sql | 105 ++++++++++++++++++++ 6 files changed, 375 insertions(+), 3 deletions(-) create mode 100644 sql/updates/r2996_mangos.sql create mode 100644 sql/updates/r2996_scriptdev2.sql diff --git a/scripts/outland/zangarmarsh.cpp b/scripts/outland/zangarmarsh.cpp index d00022773..2482e19e1 100644 --- a/scripts/outland/zangarmarsh.cpp +++ b/scripts/outland/zangarmarsh.cpp @@ -17,7 +17,7 @@ /* ScriptData SDName: Zangarmarsh SD%Complete: 100 -SDComment: Quest support: 9752, 9785, 10009. +SDComment: Quest support: 9729, 9752, 9785, 10009. SDCategory: Zangarmarsh EndScriptData */ @@ -25,6 +25,7 @@ EndScriptData */ npc_cooshcoosh npc_kayra_longmane event_stormcrow +npc_fhwoor EndContentData */ #include "precompiled.h" @@ -172,6 +173,160 @@ bool ProcessEventId_event_taxi_stormcrow(uint32 uiEventId, Object* pSource, Obje return false; } +/*##### +## npc_fhwoor +#####*/ + +enum +{ + SAY_ESCORT_START = -1000995, + SAY_PREPARE = -1000996, + SAY_CAMP_ENTER = -1000997, + SAY_AMBUSH = -1000998, + SAY_AMBUSH_CLEARED = -1000999, + SAY_ESCORT_COMPLETE = -1001000, + + SPELL_STOMP = 31277, + SPELL_THUNDERSHOCK = 31964, + + NPC_ENCHANTRESS = 18088, + NPC_SLAVEDRIVER = 18089, + NPC_SSSLITH = 18154, + + GO_ARK_OF_SSSLITH = 182082, + + QUEST_ID_FHWOOR_SMASH = 9729, +}; + +struct MANGOS_DLL_DECL npc_fhwoorAI : public npc_escortAI +{ + npc_fhwoorAI(Creature* pCreature) : npc_escortAI(pCreature) { Reset(); } + + uint32 m_uiStompTimer; + uint32 m_uiShockTimer; + + bool m_bIsAmbush; + + void Reset() override + { + m_uiStompTimer = urand(3000, 7000); + m_uiShockTimer = urand(7000, 11000); + m_bIsAmbush = false; + } + + void ReceiveAIEvent(AIEventType eventType, Creature* /*pSender*/, Unit* pInvoker, uint32 uiMiscValue) override + { + if (eventType == AI_EVENT_START_ESCORT && pInvoker->GetTypeId() == TYPEID_PLAYER) + { + DoScriptText(SAY_ESCORT_START, m_creature, pInvoker); + m_creature->SetFactionTemporary(FACTION_ESCORT_N_NEUTRAL_ACTIVE, TEMPFACTION_RESTORE_RESPAWN); + Start(true, (Player*)pInvoker, GetQuestTemplateStore(uiMiscValue), true); + } + } + + void JustSummoned(Creature* pSummoned) override + { + // move summoned towards the creature + if (m_bIsAmbush) + { + float fX, fY, fZ; + m_creature->GetContactPoint(pSummoned, fX, fY, fZ); + pSummoned->GetMotionMaster()->MovePoint(0, fX, fY, fZ); + } + } + + void SummonedCreatureJustDied(Creature* pSummoned) override + { + // resume escort + if (pSummoned->GetEntry() == NPC_SSSLITH) + SetEscortPaused(false); + } + + void WaypointReached(uint32 uiPointId) override + { + switch (uiPointId) + { + case 24: + DoScriptText(SAY_PREPARE, m_creature); + break; + case 25: + DoScriptText(SAY_CAMP_ENTER, m_creature); + SetRun(false); + break; + case 46: + // despawn the Ark + if (GameObject* pArk = GetClosestGameObjectWithEntry(m_creature, GO_ARK_OF_SSSLITH, 10.0f)) + pArk->SetLootState(GO_JUST_DEACTIVATED); + // spawn npcs + m_creature->SummonCreature(NPC_ENCHANTRESS, 526.12f, 8136.96f, 21.64f, 0.57f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 60000); + m_creature->SummonCreature(NPC_SLAVEDRIVER, 524.09f, 8138.67f, 21.49f, 0.58f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 60000); + m_creature->SummonCreature(NPC_SLAVEDRIVER, 526.93f, 8133.88f, 21.56f, 0.58f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 60000); + break; + case 70: + DoScriptText(SAY_AMBUSH, m_creature); + // spawn npcs + m_bIsAmbush = true; + m_creature->SummonCreature(NPC_SSSLITH, 162.91f, 8192.08f, 22.55f, 5.98f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 60000); + m_creature->SummonCreature(NPC_ENCHANTRESS, 162.34f, 8193.99f, 22.85f, 5.98f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 60000); + m_creature->SummonCreature(NPC_SLAVEDRIVER, 163.07f, 8187.04f, 22.71f, 0.10f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 60000); + SetEscortPaused(true); + break; + case 71: + DoScriptText(SAY_AMBUSH_CLEARED, m_creature); + SetRun(); + break; + case 92: + SetRun(false); + break; + case 93: + DoScriptText(SAY_ESCORT_COMPLETE, m_creature); + if (Player* pPlayer = GetPlayerForEscort()) + pPlayer->GroupEventHappens(QUEST_ID_FHWOOR_SMASH, m_creature); + break; + } + } + + void UpdateEscortAI(const uint32 uiDiff) override + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_uiStompTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_STOMP) == CAST_OK) + m_uiStompTimer = urand(9000, 15000); + } + else + m_uiStompTimer -= uiDiff; + + if (m_uiShockTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_THUNDERSHOCK) == CAST_OK) + m_uiShockTimer = urand(15000, 20000); + } + else + m_uiShockTimer -= uiDiff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_npc_fhwoor(Creature* pCreature) +{ + return new npc_fhwoorAI(pCreature); +} + +bool QuestAccept_npc_fhwoor(Player* pPlayer, Creature* pCreature, const Quest* pQuest) +{ + if (pQuest->GetQuestId() == QUEST_ID_FHWOOR_SMASH) + { + pCreature->AI()->SendAIEvent(AI_EVENT_START_ESCORT, pPlayer, pCreature, pQuest->GetQuestId()); + return true; + } + + return false; +} + void AddSC_zangarmarsh() { Script* pNewScript; @@ -191,4 +346,10 @@ void AddSC_zangarmarsh() pNewScript->Name = "event_taxi_stormcrow"; pNewScript->pProcessEventId = &ProcessEventId_event_taxi_stormcrow; pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_fhwoor"; + pNewScript->GetAI = &GetAI_npc_fhwoor; + pNewScript->pQuestAcceptNPC = &QuestAccept_npc_fhwoor; + pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 573957a97..6e52d8cb1 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2995" + #define SD2_REVISION_NR "2996" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 6451d6a60..cb5883af4 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -1435,6 +1435,7 @@ DELETE FROM scripted_event_id WHERE id=11225; INSERT INTO scripted_event_id VALUES (11225,'event_taxi_stormcrow'); UPDATE creature_template SET ScriptName='npc_cooshcoosh' WHERE entry=18586; UPDATE creature_template SET ScriptName='npc_kayra_longmane' WHERE entry=17969; +UPDATE creature_template SET ScriptName='npc_fhwoor' WHERE entry=17877; /* ZUL'AMAN */ UPDATE instance_template SET ScriptName='instance_zulaman' WHERE map=568; diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index e1fafb2d8..e1a96c30d 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -1075,7 +1075,14 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1000992,'I will tear your soul into morsels and slow roast them over demon fire!',0,0,0,0,'colonel jules SAY_EXORCISM_RANDOM_6'), (-1000993,'It\'s on! $N, meet my fists. Fists, say hello to $N.',0,0,0,0,'dorius stonetender SAY_AGGRO_1'), -(-1000994,'I\'m about to open a can on this $N.',0,0,0,0,'dorius stonetender SAY_AGGRO_2'); +(-1000994,'I\'m about to open a can on this $N.',0,0,0,0,'dorius stonetender SAY_AGGRO_2'), + +(-1000995,'Fhwoor go now, $N. Get ark, come back.',0,0,0,0,'fhwoor SAY_ESCORT_START'), +(-1000996,'Take moment... get ready.',0,0,0,0,'fhwoor SAY_PREPARE'), +(-1000997,'We go!',0,0,0,0,'fhwoor SAY_CAMP_ENTER'), +(-1000998,'Uh oh...',0,0,0,0,'fhwoor SAY_AMBUSH'), +(-1000999,'Ha ha, squishy naga!',0,0,0,0,'fhwoor SAY_AMBUSH_CLEARED'), +(-1001000,'Fhwoor do good!',0,0,0,0,'fhwoor SAY_ESCORT_COMPLETE'); -- -1 033 000 SHADOWFANG KEEP INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES @@ -7608,4 +7615,101 @@ INSERT INTO script_waypoint VALUES (8284, 32, -6418.380, -1985.778, 246.554, 0, ''), (8284, 33, -6389.783, -1986.544, 246.771, 30000, 'quest complete'); +DELETE FROM script_waypoint WHERE entry=17877; +INSERT INTO script_waypoint VALUES +(17877, 0, 231.403, 8479.940, 17.928, 3000, 'stand up'), +(17877, 1, 214.645, 8469.645, 23.121, 0, ''), +(17877, 2, 208.538, 8463.481, 24.738, 0, ''), +(17877, 3, 196.524, 8446.077, 24.814, 0, ''), +(17877, 4, 188.186, 8431.674, 22.625, 0, ''), +(17877, 5, 181.196, 8420.152, 23.730, 0, ''), +(17877, 6, 171.919, 8406.290, 21.844, 0, ''), +(17877, 7, 166.613, 8396.479, 23.585, 0, ''), +(17877, 8, 167.237, 8386.686, 21.546, 0, ''), +(17877, 9, 169.401, 8372.670, 19.599, 0, ''), +(17877, 10, 174.148, 8342.325, 20.409, 0, ''), +(17877, 11, 173.195, 8324.177, 21.126, 0, ''), +(17877, 12, 172.415, 8310.290, 21.702, 0, ''), +(17877, 13, 173.233, 8298.755, 19.564, 0, ''), +(17877, 14, 173.984, 8287.925, 18.839, 0, ''), +(17877, 15, 189.984, 8266.263, 18.500, 0, ''), +(17877, 16, 204.057, 8256.019, 19.701, 0, ''), +(17877, 17, 212.950, 8248.737, 21.583, 0, ''), +(17877, 18, 223.152, 8240.160, 20.001, 0, ''), +(17877, 19, 230.730, 8232.994, 18.990, 0, ''), +(17877, 20, 238.261, 8223.804, 20.720, 0, ''), +(17877, 21, 247.651, 8214.208, 19.146, 0, ''), +(17877, 22, 259.231, 8207.796, 19.278, 0, ''), +(17877, 23, 272.360, 8204.755, 19.980, 0, ''), +(17877, 24, 282.211, 8202.087, 22.090, 20000, 'SAY_PREPARE'), +(17877, 25, 282.211, 8202.087, 22.090, 0, 'SAY_CAMP_ENTER'), +(17877, 26, 296.006, 8191.644, 21.680, 0, ''), +(17877, 27, 304.472, 8188.048, 20.707, 0, ''), +(17877, 28, 317.574, 8182.044, 18.296, 0, ''), +(17877, 29, 340.046, 8178.776, 17.937, 0, ''), +(17877, 30, 353.799, 8181.222, 18.557, 0, ''), +(17877, 31, 368.231, 8186.324, 22.450, 0, ''), +(17877, 32, 375.737, 8187.030, 23.916, 0, ''), +(17877, 33, 390.067, 8186.638, 21.190, 0, ''), +(17877, 34, 398.699, 8181.824, 18.648, 0, ''), +(17877, 35, 412.325, 8172.612, 17.927, 0, ''), +(17877, 36, 424.541, 8161.957, 19.575, 0, ''), +(17877, 37, 436.900, 8157.407, 22.115, 0, ''), +(17877, 38, 444.548, 8155.414, 23.553, 0, ''), +(17877, 39, 457.201, 8154.233, 23.429, 0, ''), +(17877, 40, 470.989, 8154.142, 21.650, 0, ''), +(17877, 41, 483.435, 8154.151, 20.706, 0, ''), +(17877, 42, 507.558, 8157.515, 21.729, 0, ''), +(17877, 43, 528.036, 8162.028, 22.795, 0, ''), +(17877, 44, 542.402, 8161.099, 22.914, 0, ''), +(17877, 45, 557.286, 8160.273, 23.708, 13000, ''), +(17877, 46, 557.286, 8160.273, 23.708, 0, 'take the Ark'), +(17877, 47, 539.767, 8144.839, 22.217, 0, ''), +(17877, 48, 531.296, 8139.475, 22.146, 0, ''), +(17877, 49, 509.056, 8139.262, 20.705, 0, ''), +(17877, 50, 499.975, 8136.228, 20.408, 0, ''), +(17877, 51, 485.511, 8129.389, 22.010, 0, ''), +(17877, 52, 474.371, 8128.534, 22.657, 0, ''), +(17877, 53, 460.708, 8130.115, 20.946, 0, ''), +(17877, 54, 449.248, 8129.271, 21.033, 0, ''), +(17877, 55, 433.670, 8125.064, 18.440, 0, ''), +(17877, 56, 412.822, 8121.581, 17.603, 0, ''), +(17877, 57, 391.150, 8117.812, 17.736, 0, ''), +(17877, 58, 379.024, 8114.185, 17.889, 0, ''), +(17877, 59, 365.110, 8106.992, 18.220, 0, ''), +(17877, 60, 352.531, 8108.944, 17.932, 0, ''), +(17877, 61, 340.894, 8120.636, 17.374, 0, ''), +(17877, 62, 328.480, 8134.929, 18.112, 0, ''), +(17877, 63, 317.573, 8143.246, 20.604, 0, ''), +(17877, 64, 311.146, 8146.796, 21.097, 0, ''), +(17877, 65, 299.359, 8152.583, 18.676, 0, ''), +(17877, 66, 276.115, 8160.440, 17.735, 0, ''), +(17877, 67, 262.704, 8170.509, 17.478, 0, ''), +(17877, 68, 243.755, 8177.747, 17.744, 0, ''), +(17877, 69, 233.496, 8178.426, 17.528, 0, ''), +(17877, 70, 219.874, 8182.550, 19.637, 0, 'SAY_AMBUSH - escort paused'), +(17877, 71, 219.874, 8182.550, 19.637, 20000, 'SAY_AMBUSH_CLEARED'), +(17877, 72, 210.978, 8193.978, 20.777, 0, ''), +(17877, 73, 203.699, 8213.042, 22.768, 0, ''), +(17877, 74, 199.246, 8225.537, 24.847, 0, ''), +(17877, 75, 195.064, 8239.906, 22.640, 0, ''), +(17877, 76, 193.198, 8253.617, 20.083, 0, ''), +(17877, 77, 189.151, 8264.834, 18.714, 0, ''), +(17877, 78, 178.814, 8281.036, 19.070, 0, ''), +(17877, 79, 173.952, 8293.241, 18.533, 0, ''), +(17877, 80, 174.399, 8305.458, 21.006, 0, ''), +(17877, 81, 175.124, 8319.509, 21.626, 0, ''), +(17877, 82, 175.690, 8339.654, 20.375, 0, ''), +(17877, 83, 172.754, 8362.673, 19.181, 0, ''), +(17877, 84, 176.465, 8379.798, 18.445, 0, ''), +(17877, 85, 186.433, 8393.126, 18.933, 0, ''), +(17877, 86, 199.438, 8407.825, 18.763, 0, ''), +(17877, 87, 211.874, 8422.383, 18.785, 0, ''), +(17877, 88, 219.900, 8436.264, 21.927, 0, ''), +(17877, 89, 225.062, 8450.565, 22.832, 0, ''), +(17877, 90, 226.942, 8464.410, 19.822, 0, ''), +(17877, 91, 231.403, 8479.940, 17.928, 0, ''), +(17877, 92, 247.625, 8483.801, 22.464, 13000, ''), +(17877, 93, 231.403, 8479.940, 17.928, 10000, 'SAY_ESCORT_COMPLETE'); + -- EOF diff --git a/sql/updates/r2996_mangos.sql b/sql/updates/r2996_mangos.sql new file mode 100644 index 000000000..e224d0f63 --- /dev/null +++ b/sql/updates/r2996_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_fhwoor' WHERE entry=17877; diff --git a/sql/updates/r2996_scriptdev2.sql b/sql/updates/r2996_scriptdev2.sql new file mode 100644 index 000000000..ffa85105c --- /dev/null +++ b/sql/updates/r2996_scriptdev2.sql @@ -0,0 +1,105 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1001000 AND -1000995; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1000995,'Fhwoor go now, $N. Get ark, come back.',0,0,0,0,'fhwoor SAY_ESCORT_START'), +(-1000996,'Take moment... get ready.',0,0,0,0,'fhwoor SAY_PREPARE'), +(-1000997,'We go!',0,0,0,0,'fhwoor SAY_CAMP_ENTER'), +(-1000998,'Uh oh...',0,0,0,0,'fhwoor SAY_AMBUSH'), +(-1000999,'Ha ha, squishy naga!',0,0,0,0,'fhwoor SAY_AMBUSH_CLEARED'), +(-1001000,'Fhwoor do good!',0,0,0,0,'fhwoor SAY_ESCORT_COMPLETE'); + +DELETE FROM script_waypoint WHERE entry=17877; +INSERT INTO script_waypoint VALUES +(17877, 0, 231.403, 8479.940, 17.928, 3000, 'stand up'), +(17877, 1, 214.645, 8469.645, 23.121, 0, ''), +(17877, 2, 208.538, 8463.481, 24.738, 0, ''), +(17877, 3, 196.524, 8446.077, 24.814, 0, ''), +(17877, 4, 188.186, 8431.674, 22.625, 0, ''), +(17877, 5, 181.196, 8420.152, 23.730, 0, ''), +(17877, 6, 171.919, 8406.290, 21.844, 0, ''), +(17877, 7, 166.613, 8396.479, 23.585, 0, ''), +(17877, 8, 167.237, 8386.686, 21.546, 0, ''), +(17877, 9, 169.401, 8372.670, 19.599, 0, ''), +(17877, 10, 174.148, 8342.325, 20.409, 0, ''), +(17877, 11, 173.195, 8324.177, 21.126, 0, ''), +(17877, 12, 172.415, 8310.290, 21.702, 0, ''), +(17877, 13, 173.233, 8298.755, 19.564, 0, ''), +(17877, 14, 173.984, 8287.925, 18.839, 0, ''), +(17877, 15, 189.984, 8266.263, 18.500, 0, ''), +(17877, 16, 204.057, 8256.019, 19.701, 0, ''), +(17877, 17, 212.950, 8248.737, 21.583, 0, ''), +(17877, 18, 223.152, 8240.160, 20.001, 0, ''), +(17877, 19, 230.730, 8232.994, 18.990, 0, ''), +(17877, 20, 238.261, 8223.804, 20.720, 0, ''), +(17877, 21, 247.651, 8214.208, 19.146, 0, ''), +(17877, 22, 259.231, 8207.796, 19.278, 0, ''), +(17877, 23, 272.360, 8204.755, 19.980, 0, ''), +(17877, 24, 282.211, 8202.087, 22.090, 20000, 'SAY_PREPARE'), +(17877, 25, 282.211, 8202.087, 22.090, 0, 'SAY_CAMP_ENTER'), +(17877, 26, 296.006, 8191.644, 21.680, 0, ''), +(17877, 27, 304.472, 8188.048, 20.707, 0, ''), +(17877, 28, 317.574, 8182.044, 18.296, 0, ''), +(17877, 29, 340.046, 8178.776, 17.937, 0, ''), +(17877, 30, 353.799, 8181.222, 18.557, 0, ''), +(17877, 31, 368.231, 8186.324, 22.450, 0, ''), +(17877, 32, 375.737, 8187.030, 23.916, 0, ''), +(17877, 33, 390.067, 8186.638, 21.190, 0, ''), +(17877, 34, 398.699, 8181.824, 18.648, 0, ''), +(17877, 35, 412.325, 8172.612, 17.927, 0, ''), +(17877, 36, 424.541, 8161.957, 19.575, 0, ''), +(17877, 37, 436.900, 8157.407, 22.115, 0, ''), +(17877, 38, 444.548, 8155.414, 23.553, 0, ''), +(17877, 39, 457.201, 8154.233, 23.429, 0, ''), +(17877, 40, 470.989, 8154.142, 21.650, 0, ''), +(17877, 41, 483.435, 8154.151, 20.706, 0, ''), +(17877, 42, 507.558, 8157.515, 21.729, 0, ''), +(17877, 43, 528.036, 8162.028, 22.795, 0, ''), +(17877, 44, 542.402, 8161.099, 22.914, 0, ''), +(17877, 45, 557.286, 8160.273, 23.708, 13000, ''), +(17877, 46, 557.286, 8160.273, 23.708, 0, 'take the Ark'), +(17877, 47, 539.767, 8144.839, 22.217, 0, ''), +(17877, 48, 531.296, 8139.475, 22.146, 0, ''), +(17877, 49, 509.056, 8139.262, 20.705, 0, ''), +(17877, 50, 499.975, 8136.228, 20.408, 0, ''), +(17877, 51, 485.511, 8129.389, 22.010, 0, ''), +(17877, 52, 474.371, 8128.534, 22.657, 0, ''), +(17877, 53, 460.708, 8130.115, 20.946, 0, ''), +(17877, 54, 449.248, 8129.271, 21.033, 0, ''), +(17877, 55, 433.670, 8125.064, 18.440, 0, ''), +(17877, 56, 412.822, 8121.581, 17.603, 0, ''), +(17877, 57, 391.150, 8117.812, 17.736, 0, ''), +(17877, 58, 379.024, 8114.185, 17.889, 0, ''), +(17877, 59, 365.110, 8106.992, 18.220, 0, ''), +(17877, 60, 352.531, 8108.944, 17.932, 0, ''), +(17877, 61, 340.894, 8120.636, 17.374, 0, ''), +(17877, 62, 328.480, 8134.929, 18.112, 0, ''), +(17877, 63, 317.573, 8143.246, 20.604, 0, ''), +(17877, 64, 311.146, 8146.796, 21.097, 0, ''), +(17877, 65, 299.359, 8152.583, 18.676, 0, ''), +(17877, 66, 276.115, 8160.440, 17.735, 0, ''), +(17877, 67, 262.704, 8170.509, 17.478, 0, ''), +(17877, 68, 243.755, 8177.747, 17.744, 0, ''), +(17877, 69, 233.496, 8178.426, 17.528, 0, ''), +(17877, 70, 219.874, 8182.550, 19.637, 0, 'SAY_AMBUSH - escort paused'), +(17877, 71, 219.874, 8182.550, 19.637, 20000, 'SAY_AMBUSH_CLEARED'), +(17877, 72, 210.978, 8193.978, 20.777, 0, ''), +(17877, 73, 203.699, 8213.042, 22.768, 0, ''), +(17877, 74, 199.246, 8225.537, 24.847, 0, ''), +(17877, 75, 195.064, 8239.906, 22.640, 0, ''), +(17877, 76, 193.198, 8253.617, 20.083, 0, ''), +(17877, 77, 189.151, 8264.834, 18.714, 0, ''), +(17877, 78, 178.814, 8281.036, 19.070, 0, ''), +(17877, 79, 173.952, 8293.241, 18.533, 0, ''), +(17877, 80, 174.399, 8305.458, 21.006, 0, ''), +(17877, 81, 175.124, 8319.509, 21.626, 0, ''), +(17877, 82, 175.690, 8339.654, 20.375, 0, ''), +(17877, 83, 172.754, 8362.673, 19.181, 0, ''), +(17877, 84, 176.465, 8379.798, 18.445, 0, ''), +(17877, 85, 186.433, 8393.126, 18.933, 0, ''), +(17877, 86, 199.438, 8407.825, 18.763, 0, ''), +(17877, 87, 211.874, 8422.383, 18.785, 0, ''), +(17877, 88, 219.900, 8436.264, 21.927, 0, ''), +(17877, 89, 225.062, 8450.565, 22.832, 0, ''), +(17877, 90, 226.942, 8464.410, 19.822, 0, ''), +(17877, 91, 231.403, 8479.940, 17.928, 0, ''), +(17877, 92, 247.625, 8483.801, 22.464, 13000, ''), +(17877, 93, 231.403, 8479.940, 17.928, 10000, 'SAY_ESCORT_COMPLETE'); From 91e42e2209d045ef9128ab8cbe0441995ccb887a Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sat, 29 Mar 2014 23:42:39 +0100 Subject: [PATCH 1007/1172] [2997] Implement script support for quest 9879 This will use the same base code as quest 9868. Also, please note that this commit involves a lot of guesswork. Part of #27 --- scripts/outland/nagrand.cpp | 108 ++++++++++++++++++++----------- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 2 +- sql/scriptdev2_script_full.sql | 33 +++++++++- sql/updates/r2996_scriptdev2.sql | 2 +- sql/updates/r2997_mangos.sql | 1 + sql/updates/r2997_scriptdev2.sql | 30 +++++++++ 7 files changed, 137 insertions(+), 41 deletions(-) create mode 100644 sql/updates/r2997_mangos.sql create mode 100644 sql/updates/r2997_scriptdev2.sql diff --git a/scripts/outland/nagrand.cpp b/scripts/outland/nagrand.cpp index a2c59fd91..45b646bc6 100644 --- a/scripts/outland/nagrand.cpp +++ b/scripts/outland/nagrand.cpp @@ -17,13 +17,13 @@ /* ScriptData SDName: Nagrand SD%Complete: 90 -SDComment: Quest support: 9868, 9918, 10085, 10646, 11090. +SDComment: Quest support: 9868, 9879, 9918, 10085, 10646, 11090. SDCategory: Nagrand EndScriptData */ /* ContentData mob_lump -npc_maghar_captive +npc_nagrand_captive npc_creditmarker_visit_with_ancestors npc_rethhedron EndContentData */ @@ -144,7 +144,7 @@ CreatureAI* GetAI_mob_lump(Creature* pCreature) } /*###### -## npc_maghar_captive +## npc_nagrand_captive #####*/ enum @@ -157,12 +157,22 @@ enum SAY_MAG_SHOCK = -1000487, SAY_MAG_COMPLETE = -1000488, + SAY_KUR_START = -1001001, + SAY_KUR_AMBUSH_1 = -1001002, + SAY_KUR_AMBUSH_2 = -1001003, + SAY_KUR_COMPLETE_1 = -1001004, + SAY_KUR_COMPLETE_2 = -1001005, + SPELL_CHAIN_LIGHTNING = 16006, SPELL_EARTHBIND_TOTEM = 15786, SPELL_FROST_SHOCK = 12548, SPELL_HEALING_WAVE = 12491, QUEST_TOTEM_KARDASH_H = 9868, + QUEST_TOTEM_KARDASH_A = 9879, + + NPC_KURENAI_CAPTIVE = 18209, + NPC_MAGHAR_CAPTIVE = 18210, NPC_MURK_RAIDER = 18203, NPC_MURK_BRUTE = 18211, @@ -173,9 +183,9 @@ enum static float m_afAmbushA[] = { -1568.805786f, 8533.873047f, 1.958f}; static float m_afAmbushB[] = { -1491.554321f, 8506.483398f, 1.248f}; -struct MANGOS_DLL_DECL npc_maghar_captiveAI : public npc_escortAI +struct MANGOS_DLL_DECL npc_nagrand_captiveAI : public npc_escortAI { - npc_maghar_captiveAI(Creature* pCreature) : npc_escortAI(pCreature) { Reset(); } + npc_nagrand_captiveAI(Creature* pCreature) : npc_escortAI(pCreature) { Reset(); } uint32 m_uiChainLightningTimer; uint32 m_uiHealTimer; @@ -190,7 +200,37 @@ struct MANGOS_DLL_DECL npc_maghar_captiveAI : public npc_escortAI void Aggro(Unit* /*pWho*/) override { - m_creature->CastSpell(m_creature, SPELL_EARTHBIND_TOTEM, false); + DoCastSpellIfCan(m_creature, SPELL_EARTHBIND_TOTEM); + } + + void ReceiveAIEvent(AIEventType eventType, Creature* /*pSender*/, Unit* pInvoker, uint32 uiMiscValue) override + { + if (eventType == AI_EVENT_START_ESCORT && pInvoker->GetTypeId() == TYPEID_PLAYER) + { + if (m_creature->GetEntry() == NPC_MAGHAR_CAPTIVE) + { + m_creature->SetStandState(UNIT_STAND_STATE_STAND); + m_creature->SetFactionTemporary(FACTION_ESCORT_H_NEUTRAL_ACTIVE, TEMPFACTION_RESTORE_RESPAWN); + + DoScriptText(SAY_MAG_START, m_creature); + + m_creature->SummonCreature(NPC_MURK_RAIDER, m_afAmbushA[0] + 2.5f, m_afAmbushA[1] - 2.5f, m_afAmbushA[2], 0.0f, TEMPSUMMON_TIMED_OOC_DESPAWN, 25000); + m_creature->SummonCreature(NPC_MURK_PUTRIFIER, m_afAmbushA[0] - 2.5f, m_afAmbushA[1] + 2.5f, m_afAmbushA[2], 0.0f, TEMPSUMMON_TIMED_OOC_DESPAWN, 25000); + m_creature->SummonCreature(NPC_MURK_BRUTE, m_afAmbushA[0], m_afAmbushA[1], m_afAmbushA[2], 0.0f, TEMPSUMMON_TIMED_OOC_DESPAWN, 25000); + } + else if (m_creature->GetEntry() == NPC_KURENAI_CAPTIVE) + { + m_creature->SetFactionTemporary(FACTION_ESCORT_A_NEUTRAL_ACTIVE, TEMPFACTION_RESTORE_RESPAWN); + + DoScriptText(SAY_KUR_START, m_creature); + + m_creature->SummonCreature(NPC_MURK_RAIDER, -1509.606f, 8484.284f, -3.841f, 0.0f, TEMPSUMMON_TIMED_OOC_DESPAWN, 25000); + m_creature->SummonCreature(NPC_MURK_PUTRIFIER, -1532.475f, 8454.706f, -4.102f, 0.0f, TEMPSUMMON_TIMED_OOC_DESPAWN, 25000); + m_creature->SummonCreature(NPC_MURK_BRUTE, -1525.484f, 8475.383f, -2.482f, 0.0f, TEMPSUMMON_TIMED_OOC_DESPAWN, 25000); + } + + Start(false, (Player*)pInvoker, GetQuestTemplateStore(uiMiscValue)); + } } void WaypointReached(uint32 uiPointId) override @@ -198,7 +238,10 @@ struct MANGOS_DLL_DECL npc_maghar_captiveAI : public npc_escortAI switch (uiPointId) { case 7: - DoScriptText(SAY_MAG_MORE, m_creature); + if (m_creature->GetEntry() == NPC_MAGHAR_CAPTIVE) + DoScriptText(SAY_MAG_MORE, m_creature); + else if (m_creature->GetEntry() == NPC_KURENAI_CAPTIVE) + DoScriptText(urand(0, 1) ? SAY_KUR_AMBUSH_1 : SAY_KUR_AMBUSH_2, m_creature); if (Creature* pTemp = m_creature->SummonCreature(NPC_MURK_PUTRIFIER, m_afAmbushB[0], m_afAmbushB[1], m_afAmbushB[2], 0.0f, TEMPSUMMON_TIMED_OOC_DESPAWN, 25000)) DoScriptText(SAY_MAG_MORE_REPLY, pTemp); @@ -209,10 +252,13 @@ struct MANGOS_DLL_DECL npc_maghar_captiveAI : public npc_escortAI m_creature->SummonCreature(NPC_MURK_SCAVENGER, m_afAmbushB[0] + 2.5f, m_afAmbushB[1] - 2.5f, m_afAmbushB[2], 0.0f, TEMPSUMMON_TIMED_OOC_DESPAWN, 25000); break; case 16: - DoScriptText(SAY_MAG_COMPLETE, m_creature); + if (m_creature->GetEntry() == NPC_MAGHAR_CAPTIVE) + DoScriptText(SAY_MAG_COMPLETE, m_creature); + else if (m_creature->GetEntry() == NPC_KURENAI_CAPTIVE) + DoScriptText(urand(0, 1) ? SAY_KUR_COMPLETE_1 : SAY_KUR_COMPLETE_2, m_creature); if (Player* pPlayer = GetPlayerForEscort()) - pPlayer->GroupEventHappens(QUEST_TOTEM_KARDASH_H, m_creature); + pPlayer->GroupEventHappens(m_creature->GetEntry() == NPC_MAGHAR_CAPTIVE ? QUEST_TOTEM_KARDASH_H : QUEST_TOTEM_KARDASH_A, m_creature); SetRun(); break; @@ -249,8 +295,8 @@ struct MANGOS_DLL_DECL npc_maghar_captiveAI : public npc_escortAI if (m_uiChainLightningTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_CHAIN_LIGHTNING); - m_uiChainLightningTimer = urand(7000, 14000); + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_CHAIN_LIGHTNING) == CAST_OK) + m_uiChainLightningTimer = urand(7000, 14000); } else m_uiChainLightningTimer -= uiDiff; @@ -259,8 +305,8 @@ struct MANGOS_DLL_DECL npc_maghar_captiveAI : public npc_escortAI { if (m_uiHealTimer < uiDiff) { - DoCastSpellIfCan(m_creature, SPELL_HEALING_WAVE); - m_uiHealTimer = 5000; + if (DoCastSpellIfCan(m_creature, SPELL_HEALING_WAVE) == CAST_OK) + m_uiHealTimer = 5000; } else m_uiHealTimer -= uiDiff; @@ -268,8 +314,8 @@ struct MANGOS_DLL_DECL npc_maghar_captiveAI : public npc_escortAI if (m_uiFrostShockTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_FROST_SHOCK); - m_uiFrostShockTimer = urand(7500, 15000); + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_FROST_SHOCK) == CAST_OK) + m_uiFrostShockTimer = urand(7500, 15000); } else m_uiFrostShockTimer -= uiDiff; @@ -278,30 +324,20 @@ struct MANGOS_DLL_DECL npc_maghar_captiveAI : public npc_escortAI } }; -bool QuestAccept_npc_maghar_captive(Player* pPlayer, Creature* pCreature, const Quest* pQuest) +bool QuestAccept_npc_nagrand_captive(Player* pPlayer, Creature* pCreature, const Quest* pQuest) { - if (pQuest->GetQuestId() == QUEST_TOTEM_KARDASH_H) + if (pQuest->GetQuestId() == QUEST_TOTEM_KARDASH_H || pQuest->GetQuestId() == QUEST_TOTEM_KARDASH_A) { - if (npc_maghar_captiveAI* pEscortAI = dynamic_cast(pCreature->AI())) - { - pCreature->SetStandState(UNIT_STAND_STATE_STAND); - pCreature->SetFactionTemporary(FACTION_ESCORT_H_NEUTRAL_ACTIVE, TEMPFACTION_RESTORE_RESPAWN); - - pEscortAI->Start(false, pPlayer, pQuest); - - DoScriptText(SAY_MAG_START, pCreature); - - pCreature->SummonCreature(NPC_MURK_RAIDER, m_afAmbushA[0] + 2.5f, m_afAmbushA[1] - 2.5f, m_afAmbushA[2], 0.0f, TEMPSUMMON_TIMED_OOC_DESPAWN, 25000); - pCreature->SummonCreature(NPC_MURK_PUTRIFIER, m_afAmbushA[0] - 2.5f, m_afAmbushA[1] + 2.5f, m_afAmbushA[2], 0.0f, TEMPSUMMON_TIMED_OOC_DESPAWN, 25000); - pCreature->SummonCreature(NPC_MURK_BRUTE, m_afAmbushA[0], m_afAmbushA[1], m_afAmbushA[2], 0.0f, TEMPSUMMON_TIMED_OOC_DESPAWN, 25000); - } + pCreature->AI()->SendAIEvent(AI_EVENT_START_ESCORT, pPlayer, pCreature, pQuest->GetQuestId()); + return true; } - return true; + + return false; } -CreatureAI* GetAI_npc_maghar_captive(Creature* pCreature) +CreatureAI* GetAI_npc_nagrand_captive(Creature* pCreature) { - return new npc_maghar_captiveAI(pCreature); + return new npc_nagrand_captiveAI(pCreature); } /*###### @@ -520,9 +556,9 @@ void AddSC_nagrand() pNewScript->RegisterSelf(); pNewScript = new Script; - pNewScript->Name = "npc_maghar_captive"; - pNewScript->GetAI = &GetAI_npc_maghar_captive; - pNewScript->pQuestAcceptNPC = &QuestAccept_npc_maghar_captive; + pNewScript->Name = "npc_nagrand_captive"; + pNewScript->GetAI = &GetAI_npc_nagrand_captive; + pNewScript->pQuestAcceptNPC = &QuestAccept_npc_nagrand_captive; pNewScript->RegisterSelf(); pNewScript = new Script; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 6e52d8cb1..dae856b80 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2996" + #define SD2_REVISION_NR "2997" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index cb5883af4..1a0e40fd5 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -849,7 +849,7 @@ UPDATE creature_template SET ScriptName='npc_kyle_the_frenzied' WHERE entry=2361 /* NAGRAND */ UPDATE creature_template SET ScriptName='mob_lump' WHERE entry=18351; -UPDATE creature_template SET ScriptName='npc_maghar_captive' WHERE entry=18210; +UPDATE creature_template SET ScriptName='npc_nagrand_captive' WHERE entry IN (18209,18210); UPDATE creature_template SET ScriptName='npc_creditmarker_visit_with_ancestors' WHERE entry IN (18840,18841,18842,18843); UPDATE creature_template SET ScriptName='npc_rethhedron' WHERE entry=22357; diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index e1a96c30d..c5641179e 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -1082,7 +1082,13 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1000997,'We go!',0,0,0,0,'fhwoor SAY_CAMP_ENTER'), (-1000998,'Uh oh...',0,0,0,0,'fhwoor SAY_AMBUSH'), (-1000999,'Ha ha, squishy naga!',0,0,0,0,'fhwoor SAY_AMBUSH_CLEARED'), -(-1001000,'Fhwoor do good!',0,0,0,0,'fhwoor SAY_ESCORT_COMPLETE'); +(-1001000,'Fhwoor do good!',0,0,0,0,'fhwoor SAY_ESCORT_COMPLETE'), + +(-1001001,'We must leave before more are alerted.',0,0,0,0,'kurenai captive SAY_KUR_START'), +(-1001002,'It\'s an ambush! Defend yourself!',0,0,0,0,'kurenai captive SAY_KUR_AMBUSH_1'), +(-1001003,'We are surrounded!',0,0,0,0,'kurenai captive SAY_KUR_AMBUSH_2'), +(-1001004,'Up ahead is the road to Telaar. We will split up when we reach the fork as they will surely send more Murkblood after us. Hopefully one of us makes it back to Telaar alive.',0,0,0,1,'kurenai captive SAY_KUR_COMPLETE_1'), +(-1001005,'Farewell, stranger. Your heroics will be remembered by my people. Now, hurry to Telaar!',0,0,0,1,'kurenai captive SAY_KUR_COMPLETE_2'); -- -1 033 000 SHADOWFANG KEEP INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES @@ -6005,6 +6011,29 @@ INSERT INTO script_waypoint VALUES (17969, 24, -472.463959, 5449.546875, 22.561453, 0, ''), (17969, 25, -454.533264, 5461.302246, 22.602837, 30000, 'quest complete'); +DELETE FROM script_waypoint WHERE entry=18209; +INSERT INTO script_waypoint VALUES +(18209, 0, -1518.092407, 8465.188477, -4.102, 0, ''), +(18209, 1, -1516.741699, 8472.000977, -4.101, 0, ''), +(18209, 2, -1516.330444, 8473.119141, -4.102, 0, ''), +(18209, 3, -1514.117310, 8476.740234, -4.100, 0, ''), +(18209, 4, -1512.199951, 8481.147461, -4.015, 0, ''), +(18209, 5, -1514.709839, 8488.281250, -3.544, 0, ''), +(18209, 6, -1516.556274, 8495.236328, -2.463, 0, ''), +(18209, 7, -1515.730957, 8506.528320, -0.609, 7000, 'SAY_KUR_AMBUSH'), +(18209, 8, -1505.038940, 8513.247070, 0.672, 0, ''), +(18209, 9, -1476.161133, 8496.066406, 2.157, 0, ''), +(18209, 10, -1464.450684, 8492.601563, 3.529, 0, ''), +(18209, 11, -1457.568359, 8492.183594, 4.449, 0, ''), +(18209, 12, -1444.100342, 8499.031250, 6.177, 0, ''), +(18209, 13, -1426.472168, 8510.116211, 7.686, 0, ''), +(18209, 14, -1403.685303, 8524.146484, 9.680, 0, ''), +(18209, 15, -1384.890503, 8542.014648, 11.180, 0, ''), +(18209, 16, -1385.107422, 8547.194336, 11.297, 5000, 'SAY_KUR_COMPLETE'), +(18209, 17, -1387.814453, 8556.652344, 11.735, 0, ''), +(18209, 18, -1397.817749, 8574.999023, 13.204, 0, ''), +(18209, 19, -1411.961304, 8598.225586, 14.990, 0, ''); + DELETE FROM script_waypoint WHERE entry=18210; INSERT INTO script_waypoint VALUES (18210, 0, -1581.410034, 8557.933594, 2.726, 0, ''), @@ -7617,7 +7646,7 @@ INSERT INTO script_waypoint VALUES DELETE FROM script_waypoint WHERE entry=17877; INSERT INTO script_waypoint VALUES -(17877, 0, 231.403, 8479.940, 17.928, 3000, 'stand up'), +(17877, 0, 231.403, 8479.940, 17.928, 3000, ''), (17877, 1, 214.645, 8469.645, 23.121, 0, ''), (17877, 2, 208.538, 8463.481, 24.738, 0, ''), (17877, 3, 196.524, 8446.077, 24.814, 0, ''), diff --git a/sql/updates/r2996_scriptdev2.sql b/sql/updates/r2996_scriptdev2.sql index ffa85105c..a2778120e 100644 --- a/sql/updates/r2996_scriptdev2.sql +++ b/sql/updates/r2996_scriptdev2.sql @@ -9,7 +9,7 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen DELETE FROM script_waypoint WHERE entry=17877; INSERT INTO script_waypoint VALUES -(17877, 0, 231.403, 8479.940, 17.928, 3000, 'stand up'), +(17877, 0, 231.403, 8479.940, 17.928, 3000, ''), (17877, 1, 214.645, 8469.645, 23.121, 0, ''), (17877, 2, 208.538, 8463.481, 24.738, 0, ''), (17877, 3, 196.524, 8446.077, 24.814, 0, ''), diff --git a/sql/updates/r2997_mangos.sql b/sql/updates/r2997_mangos.sql new file mode 100644 index 000000000..69928c88e --- /dev/null +++ b/sql/updates/r2997_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_nagrand_captive' WHERE entry IN (18209,18210); diff --git a/sql/updates/r2997_scriptdev2.sql b/sql/updates/r2997_scriptdev2.sql new file mode 100644 index 000000000..4d36a5055 --- /dev/null +++ b/sql/updates/r2997_scriptdev2.sql @@ -0,0 +1,30 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1001005 AND -1001001; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1001001,'We must leave before more are alerted.',0,0,0,0,'kurenai captive SAY_KUR_START'), +(-1001002,'It\'s an ambush! Defend yourself!',0,0,0,0,'kurenai captive SAY_KUR_AMBUSH_1'), +(-1001003,'We are surrounded!',0,0,0,0,'kurenai captive SAY_KUR_AMBUSH_2'), +(-1001004,'Up ahead is the road to Telaar. We will split up when we reach the fork as they will surely send more Murkblood after us. Hopefully one of us makes it back to Telaar alive.',0,0,0,1,'kurenai captive SAY_KUR_COMPLETE_1'), +(-1001005,'Farewell, stranger. Your heroics will be remembered by my people. Now, hurry to Telaar!',0,0,0,1,'kurenai captive SAY_KUR_COMPLETE_2'); + +DELETE FROM script_waypoint WHERE entry=18209; +INSERT INTO script_waypoint VALUES +(18209, 0, -1518.092407, 8465.188477, -4.102, 0, ''), +(18209, 1, -1516.741699, 8472.000977, -4.101, 0, ''), +(18209, 2, -1516.330444, 8473.119141, -4.102, 0, ''), +(18209, 3, -1514.117310, 8476.740234, -4.100, 0, ''), +(18209, 4, -1512.199951, 8481.147461, -4.015, 0, ''), +(18209, 5, -1514.709839, 8488.281250, -3.544, 0, ''), +(18209, 6, -1516.556274, 8495.236328, -2.463, 0, ''), +(18209, 7, -1515.730957, 8506.528320, -0.609, 7000, 'SAY_KUR_AMBUSH'), +(18209, 8, -1505.038940, 8513.247070, 0.672, 0, ''), +(18209, 9, -1476.161133, 8496.066406, 2.157, 0, ''), +(18209, 10, -1464.450684, 8492.601563, 3.529, 0, ''), +(18209, 11, -1457.568359, 8492.183594, 4.449, 0, ''), +(18209, 12, -1444.100342, 8499.031250, 6.177, 0, ''), +(18209, 13, -1426.472168, 8510.116211, 7.686, 0, ''), +(18209, 14, -1403.685303, 8524.146484, 9.680, 0, ''), +(18209, 15, -1384.890503, 8542.014648, 11.180, 0, ''), +(18209, 16, -1385.107422, 8547.194336, 11.297, 5000, 'SAY_KUR_COMPLETE'), +(18209, 17, -1387.814453, 8556.652344, 11.735, 0, ''), +(18209, 18, -1397.817749, 8574.999023, 13.204, 0, ''), +(18209, 19, -1411.961304, 8598.225586, 14.990, 0, ''); From d6b9277d3b67ced03e6c4b9eb34793d7b9bb6d4b Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sun, 30 Mar 2014 14:56:28 +0200 Subject: [PATCH 1008/1172] [2998] Implement script support for quest 11085 Please note that this will only support one spawn location of the escorted NPC. The other escort paths will be added once the database will have proper spawn locations. Part of #27 --- scripts/outland/terokkar_forest.cpp | 122 +++++++++++++++++++++++++++- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 + sql/scriptdev2_script_full.sql | 33 +++++++- sql/updates/r2998_mangos.sql | 1 + sql/updates/r2998_scriptdev2.sql | 32 ++++++++ 6 files changed, 188 insertions(+), 3 deletions(-) create mode 100644 sql/updates/r2998_mangos.sql create mode 100644 sql/updates/r2998_scriptdev2.sql diff --git a/scripts/outland/terokkar_forest.cpp b/scripts/outland/terokkar_forest.cpp index f03f1c88d..50f7fd936 100644 --- a/scripts/outland/terokkar_forest.cpp +++ b/scripts/outland/terokkar_forest.cpp @@ -17,7 +17,7 @@ /* ScriptData SDName: Terokkar_Forest SD%Complete: 80 -SDComment: Quest support: 9889, 10009, 10051, 10052, 10446/10447, 10852, 10873, 10887, 10896, 10898, 10922, 10988, 11093, 11096. +SDComment: Quest support: 9889, 10009, 10051, 10052, 10446/10447, 10852, 10873, 10887, 10896, 10898, 10922, 10988, 11085, 11093, 11096. SDCategory: Terokkar Forest EndScriptData */ @@ -34,6 +34,7 @@ npc_captive_child npc_isla_starmane npc_skywing npc_cenarion_sparrowhawk +npc_skyguard_prisoner EndContentData */ #include "precompiled.h" @@ -1118,6 +1119,119 @@ CreatureAI* GetAI_npc_cenarion_sparrowhawk(Creature* pCreature) return new npc_cenarion_sparrowhawkAI(pCreature); } +/*##### +## npc_skyguard_prisoner +#####*/ + +enum +{ + SAY_ESCORT_START = -1001006, + SAY_AMBUSH_END = -1001007, + SAY_ESCORT_COMPLETE = -1001008, + SAY_AMBUSH_1 = -1001009, + SAY_AMBUSH_2 = -1001010, + SAY_AMBUSH_3 = -1001011, + SAY_AMBUSH_4 = -1001012, + + NPC_WING_GUARD = 21644, + GO_PRISONER_CAGE = 185952, + + QUEST_ID_ESCAPE_SKETTIS = 11085, +}; + +struct MANGOS_DLL_DECL npc_skyguard_prisonerAI : public npc_escortAI +{ + npc_skyguard_prisonerAI(Creature* pCreature) : npc_escortAI(pCreature) { Reset(); } + + void Reset() override { } + + void ReceiveAIEvent(AIEventType eventType, Creature* /*pSender*/, Unit* pInvoker, uint32 uiMiscValue) override + { + if (eventType == AI_EVENT_START_ESCORT && pInvoker->GetTypeId() == TYPEID_PLAYER) + { + m_creature->SetFactionTemporary(FACTION_ESCORT_N_NEUTRAL_ACTIVE, TEMPFACTION_RESTORE_RESPAWN); + Start(false, (Player*)pInvoker, GetQuestTemplateStore(uiMiscValue)); + + // ToDo: add additional WP when DB will support it + if (m_creature->GetPositionZ() < 310.0f) + { + SetEscortPaused(true); + //SetCurrentWaypoint(WP_ID_SPAWN_1); + //SetEscortPaused(false); + script_error_log("NPC entry %u, location %f, %f, %f does not have waypoints implemneted for current spawn location. Please contact customer support!", m_creature->GetEntry(), m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ()); + } + else if (m_creature->GetPositionZ() < 330.0f) + { + SetEscortPaused(true); + //SetCurrentWaypoint(WP_ID_SPAWN_2); + //SetEscortPaused(false); + script_error_log("NPC entry %u, location %f, %f, %f does not have waypoints implemneted for current spawn location. Please contact customer support!", m_creature->GetEntry(), m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ()); + } + // else just use standard WP + + // open cage + if (GameObject* pCage = GetClosestGameObjectWithEntry(m_creature, GO_PRISONER_CAGE, 10.0f)) + pCage->Use(m_creature); + } + } + + void JustSummoned(Creature* pSummoned) override + { + if (pSummoned->GetEntry() == NPC_WING_GUARD) + { + pSummoned->AI()->AttackStart(m_creature); + + switch (urand(0, 3)) + { + case 0: DoScriptText(SAY_AMBUSH_1, pSummoned); break; + case 1: DoScriptText(SAY_AMBUSH_2, pSummoned); break; + case 2: DoScriptText(SAY_AMBUSH_3, pSummoned); break; + case 3: DoScriptText(SAY_AMBUSH_4, pSummoned); break; + } + } + } + + void WaypointReached(uint32 uiPointId) override + { + switch (uiPointId) + { + case 0: + DoScriptText(SAY_ESCORT_START, m_creature); + break; + case 13: + m_creature->SummonCreature(NPC_WING_GUARD, -4179.043f, 3081.007f, 328.28f, 4.51f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 60000); + m_creature->SummonCreature(NPC_WING_GUARD, -4181.610f, 3081.289f, 328.32f, 4.52f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 60000); + break; + case 14: + DoScriptText(SAY_AMBUSH_END, m_creature); + break; + case 18: + DoScriptText(SAY_ESCORT_COMPLETE, m_creature); + SetRun(); + + if (Player* pPlayer = GetPlayerForEscort()) + pPlayer->GroupEventHappens(QUEST_ID_ESCAPE_SKETTIS, m_creature); + break; + } + } +}; + +CreatureAI* GetAI_npc_skyguard_prisoner(Creature* pCreature) +{ + return new npc_skyguard_prisonerAI(pCreature); +} + +bool QuestAccept_npc_skyguard_prisoner(Player* pPlayer, Creature* pCreature, const Quest* pQuest) +{ + if (pQuest->GetQuestId() == QUEST_ID_ESCAPE_SKETTIS) + { + pCreature->AI()->SendAIEvent(AI_EVENT_START_ESCORT, pPlayer, pCreature, pQuest->GetQuestId()); + return true; + } + + return false; +} + void AddSC_terokkar_forest() { Script* pNewScript; @@ -1185,4 +1299,10 @@ void AddSC_terokkar_forest() pNewScript->Name = "npc_cenarion_sparrowhawk"; pNewScript->GetAI = &GetAI_npc_cenarion_sparrowhawk; pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_skyguard_prisoner"; + pNewScript->GetAI = &GetAI_npc_skyguard_prisoner; + pNewScript->pQuestAcceptNPC = &QuestAccept_npc_skyguard_prisoner; + pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index dae856b80..dc9ec8ab9 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2997" + #define SD2_REVISION_NR "2998" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 1a0e40fd5..55e430420 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -1230,6 +1230,7 @@ UPDATE creature_template SET ScriptName='npc_captive_child' WHERE entry=22314; UPDATE creature_template SET ScriptName='npc_isla_starmane' WHERE entry=18760; UPDATE creature_template SET ScriptName="npc_skywing" WHERE entry=22424; UPDATE creature_template SET ScriptName="npc_cenarion_sparrowhawk" WHERE entry=22972; +UPDATE creature_template SET ScriptName="npc_skyguard_prisoner" WHERE entry=23383; /* THOUSAND NEEDLES */ UPDATE creature_template SET ScriptName='npc_kanati' WHERE entry=10638; diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index c5641179e..5163d3b4a 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -1088,7 +1088,15 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1001002,'It\'s an ambush! Defend yourself!',0,0,0,0,'kurenai captive SAY_KUR_AMBUSH_1'), (-1001003,'We are surrounded!',0,0,0,0,'kurenai captive SAY_KUR_AMBUSH_2'), (-1001004,'Up ahead is the road to Telaar. We will split up when we reach the fork as they will surely send more Murkblood after us. Hopefully one of us makes it back to Telaar alive.',0,0,0,1,'kurenai captive SAY_KUR_COMPLETE_1'), -(-1001005,'Farewell, stranger. Your heroics will be remembered by my people. Now, hurry to Telaar!',0,0,0,1,'kurenai captive SAY_KUR_COMPLETE_2'); +(-1001005,'Farewell, stranger. Your heroics will be remembered by my people. Now, hurry to Telaar!',0,0,0,1,'kurenai captive SAY_KUR_COMPLETE_2'), + +(-1001006,'Thanks for your help. Let\'s get out of here!',0,0,0,1,'skyguard prisoner SAY_ESCORT_START'), +(-1001007,'Let\'s keep moving. I don\'t like this place.',0,0,0,1,'skyguard prisoner SAY_AMBUSH_END'), +(-1001008,'Thanks again. Sergeant Doryn will be glad to hear he has one less scout to replace this week.',0,0,0,1,'skyguard prisoner SAY_ESCORT_COMPLETE'), +(-1001009,'Death to our enemies!',0,0,0,0,'skettis wing guard SAY_AMBUSH_1'), +(-1001010,'No one escapes Skettis!',0,0,0,0,'skettis wing guard SAY_AMBUSH_2'), +(-1001011,'Skettis prevails!',0,0,0,0,'skettis wing guard SAY_AMBUSH_3'), +(-1001012,'You\'ll go nowhere, Skyguard scum!',0,0,0,0,'skettis wing guard SAY_AMBUSH_4'); -- -1 033 000 SHADOWFANG KEEP INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES @@ -7741,4 +7749,27 @@ INSERT INTO script_waypoint VALUES (17877, 92, 247.625, 8483.801, 22.464, 13000, ''), (17877, 93, 231.403, 8479.940, 17.928, 10000, 'SAY_ESCORT_COMPLETE'); +DELETE FROM script_waypoint WHERE entry=23383; +INSERT INTO script_waypoint VALUES +(23383, 0, -4109.424, 3034.155, 344.168, 5000, 'SAY_ESCORT_START'), +(23383, 1, -4113.265, 3035.989, 344.071, 0, ''), +(23383, 2, -4120.018, 3032.223, 344.074, 0, ''), +(23383, 3, -4124.412, 3026.332, 344.151, 0, ''), +(23383, 4, -4128.823, 3026.645, 344.035, 0, ''), +(23383, 5, -4138.909, 3028.952, 338.920, 0, ''), +(23383, 6, -4152.592, 3031.234, 336.913, 0, ''), +(23383, 7, -4169.812, 3034.305, 342.047, 0, ''), +(23383, 8, -4174.631, 3036.044, 343.457, 0, ''), +(23383, 9, -4174.399, 3044.983, 343.862, 0, ''), +(23383, 10, -4176.635, 3052.014, 344.077, 0, ''), +(23383, 11, -4183.662, 3058.895, 344.150, 0, ''), +(23383, 12, -4182.916, 3065.411, 342.574, 0, ''), +(23383, 13, -4182.055, 3070.558, 337.644, 5000, 'ambush'), +(23383, 14, -4182.055, 3070.558, 337.644, 5000, 'SAY_AMBUSH_END'), +(23383, 15, -4181.256, 3077.131, 331.590, 0, ''), +(23383, 16, -4179.994, 3086.101, 325.571, 0, ''), +(23383, 17, -4178.770, 3090.101, 323.955, 0, ''), +(23383, 18, -4177.965, 3093.867, 323.839, 5000, 'SAY_ESCORT_COMPLETE'), +(23383, 19, -4166.252, 3106.508, 320.961, 0, ''); + -- EOF diff --git a/sql/updates/r2998_mangos.sql b/sql/updates/r2998_mangos.sql new file mode 100644 index 000000000..d2fdb99b8 --- /dev/null +++ b/sql/updates/r2998_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName="npc_skyguard_prisoner" WHERE entry=23383; diff --git a/sql/updates/r2998_scriptdev2.sql b/sql/updates/r2998_scriptdev2.sql new file mode 100644 index 000000000..029cc1417 --- /dev/null +++ b/sql/updates/r2998_scriptdev2.sql @@ -0,0 +1,32 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1001012 AND -1001006; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1001006,'Thanks for your help. Let\'s get out of here!',0,0,0,1,'skyguard prisoner SAY_ESCORT_START'), +(-1001007,'Let\'s keep moving. I don\'t like this place.',0,0,0,1,'skyguard prisoner SAY_AMBUSH_END'), +(-1001008,'Thanks again. Sergeant Doryn will be glad to hear he has one less scout to replace this week.',0,0,0,1,'skyguard prisoner SAY_ESCORT_COMPLETE'), +(-1001009,'Death to our enemies!',0,0,0,0,'skettis wing guard SAY_AMBUSH_1'), +(-1001010,'No one escapes Skettis!',0,0,0,0,'skettis wing guard SAY_AMBUSH_2'), +(-1001011,'Skettis prevails!',0,0,0,0,'skettis wing guard SAY_AMBUSH_3'), +(-1001012,'You\'ll go nowhere, Skyguard scum!',0,0,0,0,'skettis wing guard SAY_AMBUSH_4'); + +DELETE FROM script_waypoint WHERE entry=23383; +INSERT INTO script_waypoint VALUES +(23383, 0, -4109.424, 3034.155, 344.168, 5000, 'SAY_ESCORT_START'), +(23383, 1, -4113.265, 3035.989, 344.071, 0, ''), +(23383, 2, -4120.018, 3032.223, 344.074, 0, ''), +(23383, 3, -4124.412, 3026.332, 344.151, 0, ''), +(23383, 4, -4128.823, 3026.645, 344.035, 0, ''), +(23383, 5, -4138.909, 3028.952, 338.920, 0, ''), +(23383, 6, -4152.592, 3031.234, 336.913, 0, ''), +(23383, 7, -4169.812, 3034.305, 342.047, 0, ''), +(23383, 8, -4174.631, 3036.044, 343.457, 0, ''), +(23383, 9, -4174.399, 3044.983, 343.862, 0, ''), +(23383, 10, -4176.635, 3052.014, 344.077, 0, ''), +(23383, 11, -4183.662, 3058.895, 344.150, 0, ''), +(23383, 12, -4182.916, 3065.411, 342.574, 0, ''), +(23383, 13, -4182.055, 3070.558, 337.644, 5000, 'ambush'), +(23383, 14, -4182.055, 3070.558, 337.644, 5000, 'SAY_AMBUSH_END'), +(23383, 15, -4181.256, 3077.131, 331.590, 0, ''), +(23383, 16, -4179.994, 3086.101, 325.571, 0, ''), +(23383, 17, -4178.770, 3090.101, 323.955, 0, ''), +(23383, 18, -4177.965, 3093.867, 323.839, 5000, 'SAY_ESCORT_COMPLETE'), +(23383, 19, -4166.252, 3106.508, 320.961, 0, ''); From 7dd729a4c5a29753e154fc396e2196f4bb017d3c Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sun, 30 Mar 2014 22:47:58 +0200 Subject: [PATCH 1009/1172] [2999] Implement script support for quest 11673 Part of #27 --- scripts/northrend/borean_tundra.cpp | 90 ++++++++++++++++++++++++++++- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 + sql/scriptdev2_script_full.sql | 45 ++++++++++++++- sql/updates/r2999_mangos.sql | 1 + sql/updates/r2999_scriptdev2.sql | 44 ++++++++++++++ 6 files changed, 180 insertions(+), 3 deletions(-) create mode 100644 sql/updates/r2999_mangos.sql create mode 100644 sql/updates/r2999_scriptdev2.sql diff --git a/scripts/northrend/borean_tundra.cpp b/scripts/northrend/borean_tundra.cpp index 312a69bce..e234d1387 100644 --- a/scripts/northrend/borean_tundra.cpp +++ b/scripts/northrend/borean_tundra.cpp @@ -17,7 +17,7 @@ /* ScriptData SDName: Borean_Tundra SD%Complete: 100 -SDComment: Quest support: 11570, 11590, 11728, 11865, 11889, 11897, 11919, 11940. +SDComment: Quest support: 11570, 11590, 11673, 11728, 11865, 11889, 11897, 11919, 11940. SDCategory: Borean Tundra EndScriptData */ @@ -29,6 +29,7 @@ npc_beryl_sorcerer npc_captured_beryl_sorcerer npc_nexus_drake_hatchling npc_scourged_flamespitter +npc_bonker_togglevolt EndContentData */ #include "precompiled.h" @@ -961,6 +962,87 @@ bool EffectAuraDummy_npc_scourged_flamespitter(const Aura* pAura, bool bApply) return false; } +/*##### +## npc_bonker_togglevolt +#####*/ + +enum +{ + SAY_BONKER_START = -1001013, + SAY_BONKER_GO = -1001014, + SAY_BONKER_AGGRO = -1001015, + SAY_BONKER_LEFT = -1001016, + SAY_BONKER_COMPLETE = -1001017, + + QUEST_ID_GET_ME_OUTA_HERE = 11673, +}; + +struct MANGOS_DLL_DECL npc_bonker_togglevoltAI : public npc_escortAI +{ + npc_bonker_togglevoltAI(Creature* pCreature) : npc_escortAI(pCreature) { Reset(); } + + void Reset() override { } + + void Aggro(Unit* /*pWho*/) override + { + if (urand(0, 1)) + DoScriptText(SAY_BONKER_AGGRO, m_creature); + } + + void ReceiveAIEvent(AIEventType eventType, Creature* /*pSender*/, Unit* pInvoker, uint32 uiMiscValue) override + { + if (eventType == AI_EVENT_START_ESCORT && pInvoker->GetTypeId() == TYPEID_PLAYER) + { + m_creature->SetStandState(UNIT_STAND_STATE_STAND); + Start(false, (Player*)pInvoker, GetQuestTemplateStore(uiMiscValue)); + } + } + + void WaypointReached(uint32 uiPointId) override + { + switch (uiPointId) + { + case 0: + DoScriptText(SAY_BONKER_START, m_creature); + break; + case 1: + DoScriptText(SAY_BONKER_GO, m_creature); + // WORKAROUND ALERT - temp ignore pathfinding until we pass the pool + // creature cannont find a proper swimming path in this area, so ignore pathfinding for the moment + m_creature->addUnitState(UNIT_STAT_IGNORE_PATHFINDING); + break; + case 3: + DoScriptText(SAY_BONKER_LEFT, m_creature); + // WORKAROUND END - resume pathfinding + m_creature->clearUnitState(UNIT_STAT_IGNORE_PATHFINDING); + break; + case 32: + if (Player* pPlayer = GetPlayerForEscort()) + { + pPlayer->GroupEventHappens(QUEST_ID_GET_ME_OUTA_HERE, m_creature); + DoScriptText(SAY_BONKER_COMPLETE, m_creature, pPlayer); + } + break; + } + } +}; + +CreatureAI* GetAI_npc_bonker_togglevolt(Creature* pCreature) +{ + return new npc_bonker_togglevoltAI(pCreature); +} + +bool QuestAccept_npc_bonker_togglevolt(Player* pPlayer, Creature* pCreature, const Quest* pQuest) +{ + if (pQuest->GetQuestId() == QUEST_ID_GET_ME_OUTA_HERE) + { + pCreature->AI()->SendAIEvent(AI_EVENT_START_ESCORT, pPlayer, pCreature, pQuest->GetQuestId()); + return true; + } + + return false; +} + void AddSC_borean_tundra() { Script* pNewScript; @@ -1010,4 +1092,10 @@ void AddSC_borean_tundra() pNewScript->GetAI = &GetAI_npc_scourged_flamespitter; pNewScript->pEffectAuraDummy = &EffectAuraDummy_npc_scourged_flamespitter; pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_bonker_togglevolt"; + pNewScript->GetAI = &GetAI_npc_bonker_togglevolt; + pNewScript->pQuestAcceptNPC = &QuestAccept_npc_bonker_togglevolt; + pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index dc9ec8ab9..d3dc8a651 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2998" + #define SD2_REVISION_NR "2999" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 55e430420..03daeb80c 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -375,6 +375,7 @@ UPDATE creature_template SET ScriptName='npc_beryl_sorcerer' WHERE entry=25316; UPDATE creature_template SET ScriptName='npc_captured_beryl_sorcerer' WHERE entry=25474; UPDATE creature_template SET ScriptName='npc_nexus_drake_hatchling' WHERE entry=26127; UPDATE creature_template SET ScriptName='npc_scourged_flamespitter' WHERE entry=25582; +UPDATE creature_template SET ScriptName='npc_bonker_togglevolt' WHERE entry=25589; /* BURNING STEPPES */ UPDATE creature_template SET ScriptName='npc_ragged_john' WHERE entry=9563; diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 5163d3b4a..23bae85d4 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -1096,7 +1096,13 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1001009,'Death to our enemies!',0,0,0,0,'skettis wing guard SAY_AMBUSH_1'), (-1001010,'No one escapes Skettis!',0,0,0,0,'skettis wing guard SAY_AMBUSH_2'), (-1001011,'Skettis prevails!',0,0,0,0,'skettis wing guard SAY_AMBUSH_3'), -(-1001012,'You\'ll go nowhere, Skyguard scum!',0,0,0,0,'skettis wing guard SAY_AMBUSH_4'); +(-1001012,'You\'ll go nowhere, Skyguard scum!',0,0,0,0,'skettis wing guard SAY_AMBUSH_4'), + +(-1001013,'Right then, no time to waste. Let\'s get outa here!',0,0,0,1,'bonker togglevolt SAY_BONKER_START'), +(-1001014,'Here we go.',0,0,0,0,'bonker togglevolt SAY_BONKER_GO'), +(-1001015,'I AM NOT AN APPETIZER!',0,0,0,0,'bonker togglevolt SAY_BONKER_AGGRO'), +(-1001016,'I think it\'s up this way to the left. Let\'s go!',0,0,0,1,'bonker togglevolt SAY_BONKER_LEFT'), +(-1001017,'Ah, fresh air! I can get myself back to the airstrip from here. Be sure to tell Fizzcrank I\'m back and safe. Thanks so much, $N!',0,0,0,1,'sbonker togglevolt SAY_BONKER_COMPLETE'); -- -1 033 000 SHADOWFANG KEEP INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES @@ -7772,4 +7778,41 @@ INSERT INTO script_waypoint VALUES (23383, 18, -4177.965, 3093.867, 323.839, 5000, 'SAY_ESCORT_COMPLETE'), (23383, 19, -4166.252, 3106.508, 320.961, 0, ''); +DELETE FROM script_waypoint WHERE entry=25589; +INSERT INTO script_waypoint VALUES +(25589, 0, 4414.220, 5367.299, -15.494, 13000, 'SAY_BONKER_START'), +(25589, 1, 4414.220, 5367.299, -15.494, 0, 'SAY_BONKER_GO'), +(25589, 2, 4429.033, 5366.662, -17.198, 0, ''), +(25589, 3, 4454.772, 5371.562, -16.385, 10000, 'SAY_BONKER_LEFT'), +(25589, 4, 4467.889, 5372.425, -15.236, 0, ''), +(25589, 5, 4481.388, 5378.616, -14.997, 0, ''), +(25589, 6, 4484.985, 5392.241, -15.310, 0, ''), +(25589, 7, 4473.114, 5414.899, -15.272, 0, ''), +(25589, 8, 4461.070, 5427.644, -16.163, 0, ''), +(25589, 9, 4441.339, 5435.530, -15.367, 0, ''), +(25589, 10, 4427.119, 5436.604, -15.149 , 0, ''), +(25589, 11, 4408.939, 5428.320, -14.629, 0, ''), +(25589, 12, 4396.607, 5415.876, -13.552, 0, ''), +(25589, 13, 4392.921, 5405.893, -10.506, 0, ''), +(25589, 14, 4390.492, 5390.298, -5.628, 0, ''), +(25589, 15, 4393.429, 5358.273, 2.967, 0, ''), +(25589, 16, 4400.138, 5345.599, 4.656, 0, ''), +(25589, 17, 4412.080, 5336.678, 7.272, 0, ''), +(25589, 18, 4436.494, 5335.233, 12.415, 0, ''), +(25589, 19, 4454.602, 5341.273, 15.560, 0, ''), +(25589, 20, 4471.045, 5352.314, 18.686, 0, ''), +(25589, 21, 4478.235, 5367.257, 20.225, 0, ''), +(25589, 22, 4481.352, 5387.544, 24.537, 0, ''), +(25589, 23, 4483.067, 5405.131, 27.576, 0, ''), +(25589, 24, 4475.878, 5414.829, 29.965, 0, ''), +(25589, 25, 4466.598, 5423.731, 32.224, 0, ''), +(25589, 26, 4451.211, 5431.026, 36.189, 0, ''), +(25589, 27, 4428.056, 5434.374, 38.946, 0, ''), +(25589, 28, 4398.915, 5443.864, 44.214, 0, ''), +(25589, 29, 4386.822, 5451.893, 48.935, 0, ''), +(25589, 30, 4379.861, 5457.215, 51.371, 0, ''), +(25589, 31, 4372.712, 5461.347, 48.541, 0, ''), +(25589, 32, 4364.523, 5465.798, 48.661, 10000, 'SAY_BONKER_COMPLETE'), +(25589, 33, 4337.198, 5472.948, 46.035, 0, ''); + -- EOF diff --git a/sql/updates/r2999_mangos.sql b/sql/updates/r2999_mangos.sql new file mode 100644 index 000000000..d3ef848c1 --- /dev/null +++ b/sql/updates/r2999_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_bonker_togglevolt' WHERE entry=25589; diff --git a/sql/updates/r2999_scriptdev2.sql b/sql/updates/r2999_scriptdev2.sql new file mode 100644 index 000000000..54b16dbb1 --- /dev/null +++ b/sql/updates/r2999_scriptdev2.sql @@ -0,0 +1,44 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1001017 AND -1001013; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1001013,'Right then, no time to waste. Let\'s get outa here!',0,0,0,1,'bonker togglevolt SAY_BONKER_START'), +(-1001014,'Here we go.',0,0,0,0,'bonker togglevolt SAY_BONKER_GO'), +(-1001015,'I AM NOT AN APPETIZER!',0,0,0,0,'bonker togglevolt SAY_BONKER_AGGRO'), +(-1001016,'I think it\'s up this way to the left. Let\'s go!',0,0,0,1,'bonker togglevolt SAY_BONKER_LEFT'), +(-1001017,'Ah, fresh air! I can get myself back to the airstrip from here. Be sure to tell Fizzcrank I\'m back and safe. Thanks so much, $N!',0,0,0,1,'sbonker togglevolt SAY_BONKER_COMPLETE'); + +DELETE FROM script_waypoint WHERE entry=25589; +INSERT INTO script_waypoint VALUES +(25589, 0, 4414.220, 5367.299, -15.494, 13000, 'SAY_BONKER_START'), +(25589, 1, 4414.220, 5367.299, -15.494, 0, 'SAY_BONKER_GO'), +(25589, 2, 4429.033, 5366.662, -17.198, 0, ''), +(25589, 3, 4454.772, 5371.562, -16.385, 10000, 'SAY_BONKER_LEFT'), +(25589, 4, 4467.889, 5372.425, -15.236, 0, ''), +(25589, 5, 4481.388, 5378.616, -14.997, 0, ''), +(25589, 6, 4484.985, 5392.241, -15.310, 0, ''), +(25589, 7, 4473.114, 5414.899, -15.272, 0, ''), +(25589, 8, 4461.070, 5427.644, -16.163, 0, ''), +(25589, 9, 4441.339, 5435.530, -15.367, 0, ''), +(25589, 10, 4427.119, 5436.604, -15.149 , 0, ''), +(25589, 11, 4408.939, 5428.320, -14.629, 0, ''), +(25589, 12, 4396.607, 5415.876, -13.552, 0, ''), +(25589, 13, 4392.921, 5405.893, -10.506, 0, ''), +(25589, 14, 4390.492, 5390.298, -5.628, 0, ''), +(25589, 15, 4393.429, 5358.273, 2.967, 0, ''), +(25589, 16, 4400.138, 5345.599, 4.656, 0, ''), +(25589, 17, 4412.080, 5336.678, 7.272, 0, ''), +(25589, 18, 4436.494, 5335.233, 12.415, 0, ''), +(25589, 19, 4454.602, 5341.273, 15.560, 0, ''), +(25589, 20, 4471.045, 5352.314, 18.686, 0, ''), +(25589, 21, 4478.235, 5367.257, 20.225, 0, ''), +(25589, 22, 4481.352, 5387.544, 24.537, 0, ''), +(25589, 23, 4483.067, 5405.131, 27.576, 0, ''), +(25589, 24, 4475.878, 5414.829, 29.965, 0, ''), +(25589, 25, 4466.598, 5423.731, 32.224, 0, ''), +(25589, 26, 4451.211, 5431.026, 36.189, 0, ''), +(25589, 27, 4428.056, 5434.374, 38.946, 0, ''), +(25589, 28, 4398.915, 5443.864, 44.214, 0, ''), +(25589, 29, 4386.822, 5451.893, 48.935, 0, ''), +(25589, 30, 4379.861, 5457.215, 51.371, 0, ''), +(25589, 31, 4372.712, 5461.347, 48.541, 0, ''), +(25589, 32, 4364.523, 5465.798, 48.661, 10000, 'SAY_BONKER_COMPLETE'), +(25589, 33, 4337.198, 5472.948, 46.035, 0, ''); From 2cf8f4b618c2dea62511cb08426dd24830054193 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sun, 30 Mar 2014 23:12:44 +0200 Subject: [PATCH 1010/1172] [3000] Whitespace cleanup --- .../gnomeregan/gnomeregan.cpp | 4 +- .../eastern_kingdoms/karazhan/chess_event.cpp | 8 ++-- scripts/kalimdor/darkshore.cpp | 2 +- scripts/northrend/howling_fjord.cpp | 4 +- .../northrend/ulduar/ulduar/boss_algalon.cpp | 2 +- .../northrend/ulduar/ulduar/boss_freya.cpp | 2 +- .../northrend/ulduar/ulduar/boss_ignis.cpp | 2 +- .../northrend/ulduar/ulduar/boss_kologarn.cpp | 2 +- .../northrend/ulduar/ulduar/boss_mimiron.cpp | 40 +++++++++---------- .../northrend/ulduar/ulduar/boss_thorim.cpp | 4 +- .../ulduar/ulduar/instance_ulduar.cpp | 26 ++++++------ scripts/northrend/ulduar/ulduar/ulduar.cpp | 34 ++++++++-------- scripts/northrend/ulduar/ulduar/ulduar.h | 2 +- scripts/outland/blades_edge_mountains.cpp | 2 +- scripts/outland/hellfire_peninsula.cpp | 2 +- scripts/outland/nagrand.cpp | 4 +- scripts/outland/netherstorm.cpp | 2 +- scripts/outland/terokkar_forest.cpp | 4 +- sd2_revision_nr.h | 2 +- sd2_revision_sql.h | 4 +- 20 files changed, 76 insertions(+), 76 deletions(-) diff --git a/scripts/eastern_kingdoms/gnomeregan/gnomeregan.cpp b/scripts/eastern_kingdoms/gnomeregan/gnomeregan.cpp index 8d209315c..7a99ae3a3 100644 --- a/scripts/eastern_kingdoms/gnomeregan/gnomeregan.cpp +++ b/scripts/eastern_kingdoms/gnomeregan/gnomeregan.cpp @@ -640,8 +640,8 @@ enum static const float aKernobeePositions[2][3] = { - {-330.92f, -3.03f, -152.85f}, // End position - {-297.32f, -7.32f, -152.85f} // Walk out of the door + { -330.92f, -3.03f, -152.85f}, // End position + { -297.32f, -7.32f, -152.85f} // Walk out of the door }; struct MANGOS_DLL_DECL npc_kernobeeAI : public FollowerAI diff --git a/scripts/eastern_kingdoms/karazhan/chess_event.cpp b/scripts/eastern_kingdoms/karazhan/chess_event.cpp index ca64d7928..bcaa1f5ca 100644 --- a/scripts/eastern_kingdoms/karazhan/chess_event.cpp +++ b/scripts/eastern_kingdoms/karazhan/chess_event.cpp @@ -237,10 +237,10 @@ struct MANGOS_DLL_DECL npc_echo_of_medivhAI : public ScriptedAI if (m_uiCheatTimer < uiDiff) { DoCastSpellIfCan(m_creature, urand(0, 1) ? (m_pInstance->GetPlayerTeam() == ALLIANCE ? SPELL_HAND_OF_MEDIVH_HORDE : SPELL_HAND_OF_MEDIVH_ALLIANCE) : - (m_pInstance->GetPlayerTeam() == ALLIANCE ? SPELL_FURY_OF_MEDIVH_ALLIANCE : SPELL_FURY_OF_MEDIVH_HORDE)); + (m_pInstance->GetPlayerTeam() == ALLIANCE ? SPELL_FURY_OF_MEDIVH_ALLIANCE : SPELL_FURY_OF_MEDIVH_HORDE)); switch (urand(0, 2)) - { + { case 0: DoPlaySoundToSet(m_creature, SOUND_ID_CHEAT_1); break; case 1: DoPlaySoundToSet(m_creature, SOUND_ID_CHEAT_2); break; case 2: DoPlaySoundToSet(m_creature, SOUND_ID_CHEAT_3); break; @@ -327,8 +327,8 @@ struct MANGOS_DLL_DECL npc_chess_piece_genericAI : public ScriptedAI if (m_pInstance) { if ((m_pInstance->GetPlayerTeam() == ALLIANCE && m_creature->getFaction() == FACTION_ID_CHESS_ALLIANCE) || - (m_pInstance->GetPlayerTeam() == HORDE && m_creature->getFaction() == FACTION_ID_CHESS_HORDE) || - m_pInstance->GetData(TYPE_CHESS) == DONE) + (m_pInstance->GetPlayerTeam() == HORDE && m_creature->getFaction() == FACTION_ID_CHESS_HORDE) || + m_pInstance->GetData(TYPE_CHESS) == DONE) m_uiMoveCommandTimer = 0; } } diff --git a/scripts/kalimdor/darkshore.cpp b/scripts/kalimdor/darkshore.cpp index 9787e6847..9e540bbab 100644 --- a/scripts/kalimdor/darkshore.cpp +++ b/scripts/kalimdor/darkshore.cpp @@ -645,7 +645,7 @@ struct MANGOS_DLL_DECL npc_rabid_bearAI : public ScriptedAI void MoveInLineOfSight(Unit* pWho) override { if (!m_uiCheckTimer && pWho->GetTypeId() == TYPEID_UNIT && pWho->GetEntry() == NPC_THARNARIUN_TREETENDER && - pWho->IsWithinDist(m_creature, 2 * INTERACTION_DISTANCE, false)) + pWho->IsWithinDist(m_creature, 2 * INTERACTION_DISTANCE, false)) { // Possible related spell: 9455 9372 m_creature->ForcedDespawn(1000); diff --git a/scripts/northrend/howling_fjord.cpp b/scripts/northrend/howling_fjord.cpp index 5a3d3a0db..95e167d8f 100644 --- a/scripts/northrend/howling_fjord.cpp +++ b/scripts/northrend/howling_fjord.cpp @@ -637,14 +637,14 @@ struct MANGOS_DLL_DECL npc_king_ymironAI : public ScriptedAI, private DialogueHe { // Get all the citizen around the king for future use if (pWho->isAlive() && m_creature->IsWithinDistInMap(pWho, 60.0) && ((Player*)pWho)->GetQuestStatus(QUEST_ID_ANGUISH_OF_NIFFLEVAR) == QUEST_STATUS_INCOMPLETE - && pWho->HasAura(SPELL_ECHO_OF_YMIRON_NIFFLEVAR)) + && pWho->HasAura(SPELL_ECHO_OF_YMIRON_NIFFLEVAR)) { std::list lCrowdList; GetCreatureListWithEntryInGrid(lCrowdList, m_creature, NPC_CITIZEN_OF_NIFFLEVAR_MALE, 60.0f); GetCreatureListWithEntryInGrid(lCrowdList, m_creature, NPC_CITIZEN_OF_NIFFLEVAR_FEMALE, 60.0f); for (std::list::const_iterator itr = lCrowdList.begin(); itr != lCrowdList.end(); ++itr) - m_lCrowdGuidList.push_back( (*itr)->GetObjectGuid() ); + m_lCrowdGuidList.push_back((*itr)->GetObjectGuid()); m_uiCrowdSpeechTimer = 1000; m_bEventInit = true; diff --git a/scripts/northrend/ulduar/ulduar/boss_algalon.cpp b/scripts/northrend/ulduar/ulduar/boss_algalon.cpp index c00594dda..e4746f05c 100644 --- a/scripts/northrend/ulduar/ulduar/boss_algalon.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_algalon.cpp @@ -309,7 +309,7 @@ struct MANGOS_DLL_DECL boss_algalonAI : public ScriptedAI, private DialogueHelpe { switch (pSummoned->GetEntry()) { - // move Brann to the center of the platform (and override pathfinding because of missing GO support) + // move Brann to the center of the platform (and override pathfinding because of missing GO support) case NPC_BRANN_ALGALON: pSummoned->SetWalk(false); pSummoned->GetMotionMaster()->MovePoint(0, 1631.986f, -297.7831f, 417.321f, false); diff --git a/scripts/northrend/ulduar/ulduar/boss_freya.cpp b/scripts/northrend/ulduar/ulduar/boss_freya.cpp index ced255647..4b54ce258 100644 --- a/scripts/northrend/ulduar/ulduar/boss_freya.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_freya.cpp @@ -559,7 +559,7 @@ struct MANGOS_DLL_DECL boss_freyaAI : public ScriptedAI m_uiThreeAlliesTimer = 0; } else - m_uiThreeAlliesTimer -= uiDiff; + m_uiThreeAlliesTimer -= uiDiff; } if (m_uiAlliesWaveCount < MAX_ALLIES_WAVES) diff --git a/scripts/northrend/ulduar/ulduar/boss_ignis.cpp b/scripts/northrend/ulduar/ulduar/boss_ignis.cpp index 259a48ee8..ad220d46f 100644 --- a/scripts/northrend/ulduar/ulduar/boss_ignis.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_ignis.cpp @@ -265,7 +265,7 @@ struct MANGOS_DLL_DECL npc_iron_constructAI : public ScriptedAI DoCastSpellIfCan(m_creature, SPELL_CONSTRUCT_HITTING_YA, CAST_TRIGGERED); } - void DamageTaken(Unit* pDoneBy, uint32 &uiDamage) override + void DamageTaken(Unit* pDoneBy, uint32& uiDamage) override { // ToDo: This may need more research related to spell proc if (m_creature->HasAura(m_bIsRegularMode ? SPELL_BRITTLE : SPELL_BRITTLE_H) && !m_bHasShattered) diff --git a/scripts/northrend/ulduar/ulduar/boss_kologarn.cpp b/scripts/northrend/ulduar/ulduar/boss_kologarn.cpp index 0dce14ce8..c6271c692 100644 --- a/scripts/northrend/ulduar/ulduar/boss_kologarn.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_kologarn.cpp @@ -409,7 +409,7 @@ struct MANGOS_DLL_DECL boss_kologarnAI : public Scripted_NoMovementAI { DoScriptText(SAY_GRAB, m_creature); DoScriptText(EMOTE_STONE_GRIP, m_creature); - m_uiStoneGripTimer = urand (20000, 30000); + m_uiStoneGripTimer = urand(20000, 30000); } } else diff --git a/scripts/northrend/ulduar/ulduar/boss_mimiron.cpp b/scripts/northrend/ulduar/ulduar/boss_mimiron.cpp index 86dc0f537..4ff72fef5 100644 --- a/scripts/northrend/ulduar/ulduar/boss_mimiron.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_mimiron.cpp @@ -339,7 +339,7 @@ struct MANGOS_DLL_DECL boss_mimironAI : public ScriptedAI, private DialogueHelpe switch (iEntry) { - // Encounter intro (normal and hard mode) + // Encounter intro (normal and hard mode) case NPC_MIMIRON: case NPC_LEVIATHAN_MK_TURRET: // jump on the top of the robot for intro / phase end text @@ -380,7 +380,7 @@ struct MANGOS_DLL_DECL boss_mimironAI : public ScriptedAI, private DialogueHelpe m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_OOC_NOT_ATTACKABLE); break; - // Start phase 2 transition + // Start phase 2 transition case GO_MIMIRON_ELEVATOR: m_pInstance->DoUseDoorOrButton(GO_MIMIRON_ELEVATOR); break; @@ -424,7 +424,7 @@ struct MANGOS_DLL_DECL boss_mimironAI : public ScriptedAI, private DialogueHelpe } break; - // Start phase 3 transition + // Start phase 3 transition case NPC_ROCKET_STRIKE: // mount on the top of the robot for phase end text if (Creature* pVx001 = m_pInstance->GetSingleCreatureFromStorage(NPC_VX001)) @@ -463,7 +463,7 @@ struct MANGOS_DLL_DECL boss_mimironAI : public ScriptedAI, private DialogueHelpe } break; - // Start phase 4 transition + // Start phase 4 transition case NPC_COMPUTER: // get the tank into combat position if (Creature* pLeviathan = m_pInstance->GetSingleCreatureFromStorage(NPC_LEVIATHAN_MK)) @@ -526,7 +526,7 @@ struct MANGOS_DLL_DECL boss_mimironAI : public ScriptedAI, private DialogueHelpe } break; - // Start encounter epilogue + // Start encounter epilogue case SPELL_SLEEP_VISUAL: DoCastSpellIfCan(m_creature, SPELL_SLEEP_VISUAL); if (m_pInstance->GetData(TYPE_MIMIRON_HARD) == DONE) @@ -560,7 +560,7 @@ struct MANGOS_DLL_DECL boss_mimironAI : public ScriptedAI, private DialogueHelpe { switch (eventType) { - // Red button pressed + // Red button pressed case AI_EVENT_CUSTOM_A: StartNextDialogueText(SAY_SELF_DESTRUCT); m_uiPhase = PHASE_LEVIATHAN; @@ -570,19 +570,19 @@ struct MANGOS_DLL_DECL boss_mimironAI : public ScriptedAI, private DialogueHelpe m_uiDestructTimer = MINUTE * IN_MILLISECONDS; m_uiFlamesTimer = 7000; break; - // Leviathan phase finished + // Leviathan phase finished case AI_EVENT_CUSTOM_B: StartNextDialogueText(NPC_LEVIATHAN_MK_TURRET); break; - // VX001 phase finished + // VX001 phase finished case AI_EVENT_CUSTOM_C: StartNextDialogueText(SPELL_TORSO_DISABLED); break; - // Aerial unit phase finished + // Aerial unit phase finished case AI_EVENT_CUSTOM_D: StartNextDialogueText(NPC_COMPUTER); break; - // Robot piece destroyed + // Robot piece destroyed case AI_EVENT_CUSTOM_E: if (!m_uiWakeUpTimer) m_uiWakeUpTimer = 10000; @@ -729,7 +729,7 @@ struct MANGOS_DLL_DECL boss_mimironAI : public ScriptedAI, private DialogueHelpe m_uiFlamesTimer = urand(25000, 30000); } else - m_uiFlamesTimer -= uiDiff; + m_uiFlamesTimer -= uiDiff; } if (m_uiDestructTimer) @@ -1029,7 +1029,7 @@ struct MANGOS_DLL_DECL boss_leviathan_mk2AI : public ScriptedAI m_uiFlameSuppressTimer = 60000; } else - m_uiFlameSuppressTimer -= uiDiff; + m_uiFlameSuppressTimer -= uiDiff; } } @@ -1274,7 +1274,7 @@ struct MANGOS_DLL_DECL boss_vx001AI : public ScriptedAI if (m_uiLaserEndTimer <= uiDiff) m_uiLaserEndTimer = 0; else - m_uiLaserEndTimer -= uiDiff; + m_uiLaserEndTimer -= uiDiff; // no other abilities during Laser return; @@ -1301,7 +1301,7 @@ struct MANGOS_DLL_DECL boss_vx001AI : public ScriptedAI m_uiFlameSuppressTimer = 10000; } else - m_uiFlameSuppressTimer -= uiDiff; + m_uiFlameSuppressTimer -= uiDiff; } } else if (m_uiPhase == PHASE_FULL_ROBOT) @@ -1318,7 +1318,7 @@ struct MANGOS_DLL_DECL boss_vx001AI : public ScriptedAI m_uiHandPulseTimer = urand(1000, 2000); } else - m_uiHandPulseTimer -= uiDiff; + m_uiHandPulseTimer -= uiDiff; } if (m_uiRocketStrikeTimer < uiDiff) @@ -1327,7 +1327,7 @@ struct MANGOS_DLL_DECL boss_vx001AI : public ScriptedAI m_uiRocketStrikeTimer = 20000; } else - m_uiRocketStrikeTimer -= uiDiff; + m_uiRocketStrikeTimer -= uiDiff; if (m_uLaserBarrageTimer < uiDiff) { @@ -1521,7 +1521,7 @@ struct MANGOS_DLL_DECL boss_aerial_unitAI : public ScriptedAI m_uiMagneticTimer = 0; } else - m_uiMagneticTimer -= uiDiff; + m_uiMagneticTimer -= uiDiff; // no other abilities during the magnetic pull return; @@ -1580,7 +1580,7 @@ struct MANGOS_DLL_DECL boss_aerial_unitAI : public ScriptedAI m_uiScrapBotTimer = 10000; } else - m_uiScrapBotTimer -= uiDiff; + m_uiScrapBotTimer -= uiDiff; if (m_uiFireBotTimer) { @@ -1651,7 +1651,7 @@ struct MANGOS_DLL_DECL npc_proximity_mineAI : public Scripted_NoMovementAI } } else - m_uiExplodeTimer -= uiDiff; + m_uiExplodeTimer -= uiDiff; } } }; @@ -1843,7 +1843,7 @@ struct MANGOS_DLL_DECL npc_mimiron_flamesAI : public Scripted_NoMovementAI } } else - m_uiSpreadTimer -= uiDiff; + m_uiSpreadTimer -= uiDiff; } }; diff --git a/scripts/northrend/ulduar/ulduar/boss_thorim.cpp b/scripts/northrend/ulduar/ulduar/boss_thorim.cpp index a31271f95..5dc4ddd65 100644 --- a/scripts/northrend/ulduar/ulduar/boss_thorim.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_thorim.cpp @@ -349,7 +349,7 @@ struct MANGOS_DLL_DECL boss_thorimAI : public ScriptedAI, private DialogueHelper { switch (pSummoned->GetEntry()) { - // the lightning orb should clean out the whole hallway on arena berserk + // the lightning orb should clean out the whole hallway on arena berserk case NPC_LIGHTNING_ORB: pSummoned->CastSpell(pSummoned, SPELL_LIGHTNING_DESTRUCTION, true); break; @@ -537,7 +537,7 @@ struct MANGOS_DLL_DECL boss_thorimAI : public ScriptedAI, private DialogueHelper switch (m_uiPhase) { - // arena phase abilities + // arena phase abilities case PHASE_ARENA: if (m_uiBerserkTimer) diff --git a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp index 66e765b6c..da72e7c55 100644 --- a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp +++ b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp @@ -70,7 +70,7 @@ static UlduarKeeperSpawns m_aKeeperHelperLocs[] = instance_ulduar::instance_ulduar(Map* pMap) : ScriptedInstance(pMap), DialogueHelper(aUlduarDialogue), m_bHelpersLoaded(false), - m_uiAlgalonTimer(MINUTE * IN_MILLISECONDS), + m_uiAlgalonTimer(MINUTE* IN_MILLISECONDS), m_uiShatterAchievTimer(0), m_uiGauntletStatus(0), m_uiStairsSpawnTimer(0), @@ -1101,20 +1101,20 @@ void instance_ulduar::OnCreatureDeath(Creature* pCreature) SetSpecialAchievementCriteria(TYPE_ACHIEV_CAT_LADY, false); break; case NPC_ULDUAR_COLOSSUS: - { - if (m_sColossusGuidSet.find(pCreature->GetObjectGuid()) != m_sColossusGuidSet.end()) - m_sColossusGuidSet.erase(pCreature->GetObjectGuid()); + { + if (m_sColossusGuidSet.find(pCreature->GetObjectGuid()) != m_sColossusGuidSet.end()) + m_sColossusGuidSet.erase(pCreature->GetObjectGuid()); - // start pre Leviathan event - if (m_sColossusGuidSet.empty()) - { - StartNextDialogueText(SAY_PRE_LEVIATHAN_1); - SetData(TYPE_LEVIATHAN, SPECIAL); - SetData(TYPE_LEVIATHAN_GAUNTLET, DONE); - pCreature->SummonCreature(NPC_LEVIATHAN, afLeviathanSpawnPos[0], afLeviathanSpawnPos[1], afLeviathanSpawnPos[2], afLeviathanSpawnPos[3], TEMPSUMMON_DEAD_DESPAWN, 0, true); - } + // start pre Leviathan event + if (m_sColossusGuidSet.empty()) + { + StartNextDialogueText(SAY_PRE_LEVIATHAN_1); + SetData(TYPE_LEVIATHAN, SPECIAL); + SetData(TYPE_LEVIATHAN_GAUNTLET, DONE); + pCreature->SummonCreature(NPC_LEVIATHAN, afLeviathanSpawnPos[0], afLeviathanSpawnPos[1], afLeviathanSpawnPos[2], afLeviathanSpawnPos[3], TEMPSUMMON_DEAD_DESPAWN, 0, true); } - break; + } + break; case NPC_DRUID_HORDE_N: case NPC_DRUID_HORDE_H: case NPC_SHAMAN_HORDE_N: diff --git a/scripts/northrend/ulduar/ulduar/ulduar.cpp b/scripts/northrend/ulduar/ulduar/ulduar.cpp index 0c59a1f55..22cfc1d9c 100644 --- a/scripts/northrend/ulduar/ulduar/ulduar.cpp +++ b/scripts/northrend/ulduar/ulduar/ulduar.cpp @@ -143,43 +143,43 @@ bool GossipSelect_go_ulduar_teleporter(Player* pPlayer, GameObject* pGO, uint32 break; // Formation Grounds case GOSSIP_ACTION_INFO_DEF + 1: - // pPlayer->CastSpell(pPlayer, SPELL_TELE_FORMATION_GROUNDS, true, NULL, NULL, pGo->GetObjectGuid()); - pPlayer->TeleportTo(603, 131.248f, -35.3802f, 409.804f, 0); + // pPlayer->CastSpell(pPlayer, SPELL_TELE_FORMATION_GROUNDS, true, NULL, NULL, pGo->GetObjectGuid()); + pPlayer->TeleportTo(603, 131.248f, -35.3802f, 409.804f, 0); break; // Colossal Forge case GOSSIP_ACTION_INFO_DEF + 2: - // pPlayer->CastSpell(pPlayer, SPELL_TELE_COLOSSAL_FORGE, true, NULL, NULL, pGo->GetObjectGuid()); - pPlayer->TeleportTo(603, 553.233f, -12.3247f, 409.679f, 0); + // pPlayer->CastSpell(pPlayer, SPELL_TELE_COLOSSAL_FORGE, true, NULL, NULL, pGo->GetObjectGuid()); + pPlayer->TeleportTo(603, 553.233f, -12.3247f, 409.679f, 0); break; // Scrapyard case GOSSIP_ACTION_INFO_DEF + 3: - // pPlayer->CastSpell(pPlayer, SPELL_TELE_SCRAPYARD, true, NULL, NULL, pGo->GetObjectGuid()); - pPlayer->TeleportTo(603, 926.292f, -11.4635f, 418.595f, 0); + // pPlayer->CastSpell(pPlayer, SPELL_TELE_SCRAPYARD, true, NULL, NULL, pGo->GetObjectGuid()); + pPlayer->TeleportTo(603, 926.292f, -11.4635f, 418.595f, 0); break; // Antechamber case GOSSIP_ACTION_INFO_DEF + 4: - // pPlayer->CastSpell(pPlayer, SPELL_TELE_ANTECHAMBER_OF_ULDUAR, true, NULL, NULL, pGo->GetObjectGuid()); - pPlayer->TeleportTo(603, 1498.09f, -24.246f, 420.967f, 0); + // pPlayer->CastSpell(pPlayer, SPELL_TELE_ANTECHAMBER_OF_ULDUAR, true, NULL, NULL, pGo->GetObjectGuid()); + pPlayer->TeleportTo(603, 1498.09f, -24.246f, 420.967f, 0); break; // Shattered walkway case GOSSIP_ACTION_INFO_DEF + 5: - // pPlayer->CastSpell(pPlayer, SPELL_TELE_SHATTERED_WALKWAY, true, NULL, NULL, pGo->GetObjectGuid()); - pPlayer->TeleportTo(603, 1859.45f, -24.1f, 448.9f, 0); + // pPlayer->CastSpell(pPlayer, SPELL_TELE_SHATTERED_WALKWAY, true, NULL, NULL, pGo->GetObjectGuid()); + pPlayer->TeleportTo(603, 1859.45f, -24.1f, 448.9f, 0); break; // Conservatory of life case GOSSIP_ACTION_INFO_DEF + 6: - // pPlayer->CastSpell(pPlayer, SPELL_TELE_CONSERVATORY_OF_LIFE, true, NULL, NULL, pGo->GetObjectGuid()); - pPlayer->TeleportTo(603, 2086.27f, -24.3134f, 421.239f, 0); + // pPlayer->CastSpell(pPlayer, SPELL_TELE_CONSERVATORY_OF_LIFE, true, NULL, NULL, pGo->GetObjectGuid()); + pPlayer->TeleportTo(603, 2086.27f, -24.3134f, 421.239f, 0); break; // Spark of imagination case GOSSIP_ACTION_INFO_DEF + 7: - // pPlayer->CastSpell(pPlayer, SPELL_TELE_SPARK_OF_IMAGINATION, true, NULL, NULL, pGo->GetObjectGuid()); - pPlayer->TeleportTo(603, 2518.16f, 2569.03f, 412.299f, 0); + // pPlayer->CastSpell(pPlayer, SPELL_TELE_SPARK_OF_IMAGINATION, true, NULL, NULL, pGo->GetObjectGuid()); + pPlayer->TeleportTo(603, 2518.16f, 2569.03f, 412.299f, 0); break; // Prison of Yogg-Saron case GOSSIP_ACTION_INFO_DEF + 8: - // pPlayer->CastSpell(pPlayer, SPELL_TELE_PRISON_OF_YOGG, true, NULL, NULL, pGo->GetObjectGuid()); - pPlayer->TeleportTo(603, 1854.82f, -11.56f, 334.175f, 4.71f); + // pPlayer->CastSpell(pPlayer, SPELL_TELE_PRISON_OF_YOGG, true, NULL, NULL, pGo->GetObjectGuid()); + pPlayer->TeleportTo(603, 1854.82f, -11.56f, 334.175f, 4.71f); break; default: return true; @@ -213,7 +213,7 @@ bool GossipHello_npc_brann_ulduar(Player* pPlayer, Creature* pCreature) bool GossipSelect_npc_brann_ulduar(Player* pPlayer, Creature* pCreature, uint32 /*sender*/, uint32 uiAction) { - if (uiAction == GOSSIP_ACTION_INFO_DEF+1) + if (uiAction == GOSSIP_ACTION_INFO_DEF + 1) { if (instance_ulduar* pInstance = (instance_ulduar*)pCreature->GetInstanceData()) { diff --git a/scripts/northrend/ulduar/ulduar/ulduar.h b/scripts/northrend/ulduar/ulduar/ulduar.h index e5c4c629d..9c84da005 100644 --- a/scripts/northrend/ulduar/ulduar/ulduar.h +++ b/scripts/northrend/ulduar/ulduar/ulduar.h @@ -413,7 +413,7 @@ struct UlduarSpawns // ToDo: spawn additional Engineers, Demolitionists, Mages and Liquid Pyrite near the columns static const UlduarSpawns afReinforcementsNormal[] = { - {118.797f, -26.9963f,409.80f, 3.14f, NPC_SALVAGED_SIEGE_ENGINE}, + {118.797f, -26.9963f, 409.80f, 3.14f, NPC_SALVAGED_SIEGE_ENGINE}, {118.847f, -43.758f, 409.80f, 3.15f, NPC_SALVAGED_SIEGE_ENGINE}, {116.602f, 8.464f, 409.80f, 3.10f, NPC_SALVAGED_CHOPPER}, {116.859f, -4.199f, 409.80f, 3.12f, NPC_SALVAGED_CHOPPER}, diff --git a/scripts/outland/blades_edge_mountains.cpp b/scripts/outland/blades_edge_mountains.cpp index ff158dd8e..4443ec519 100644 --- a/scripts/outland/blades_edge_mountains.cpp +++ b/scripts/outland/blades_edge_mountains.cpp @@ -783,7 +783,7 @@ bool EffectDummyCreature_npc_simon_game_bunny(Unit* pCaster, uint32 uiSpellId, S bool EffectScriptEffectCreature_npc_simon_game_bunny(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget, ObjectGuid originalCasterGuid) { if ((uiSpellId == SPELL_INTROSPECTION_BLUE || uiSpellId == SPELL_INTROSPECTION_GREEN || uiSpellId == SPELL_INTROSPECTION_RED || - uiSpellId == SPELL_INTROSPECTION_YELLOW) && uiEffIndex == EFFECT_INDEX_1) + uiSpellId == SPELL_INTROSPECTION_YELLOW) && uiEffIndex == EFFECT_INDEX_1) { if (pCreatureTarget->GetEntry() == NPC_SIMON_GAME_BUNNY && pCaster->GetTypeId() == TYPEID_PLAYER && originalCasterGuid.IsGameObject()) pCreatureTarget->AI()->SendAIEvent(AI_EVENT_CUSTOM_C, pCaster, pCreatureTarget, uiSpellId); diff --git a/scripts/outland/hellfire_peninsula.cpp b/scripts/outland/hellfire_peninsula.cpp index f7ea526f4..f64249696 100644 --- a/scripts/outland/hellfire_peninsula.cpp +++ b/scripts/outland/hellfire_peninsula.cpp @@ -860,7 +860,7 @@ bool EffectDummyCreature_npc_colonel_jules(Unit* pCaster, uint32 uiSpellId, Spel // get random point around the Anchorite float fX, fY, fZ; - pCreatureTarget->GetNearPoint(pCreatureTarget, fX, fY, fZ, 5.0f, 10.0f, frand(0, M_PI_F/2)); + pCreatureTarget->GetNearPoint(pCreatureTarget, fX, fY, fZ, 5.0f, 10.0f, frand(0, M_PI_F / 2)); // spawn a Darkness Released npc and move around the room if (Creature* pDarkness = pCreatureTarget->SummonCreature(NPC_DARKNESS_RELEASED, 0, 0, 0, 0, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 20000)) diff --git a/scripts/outland/nagrand.cpp b/scripts/outland/nagrand.cpp index 45b646bc6..d2f94e631 100644 --- a/scripts/outland/nagrand.cpp +++ b/scripts/outland/nagrand.cpp @@ -407,8 +407,8 @@ enum static const float afRethhedronPos[2][3] = { - {-1502.39f, 9772.33f, 200.421f}, - {-1557.93f, 9834.34f, 200.949f} + { -1502.39f, 9772.33f, 200.421f}, + { -1557.93f, 9834.34f, 200.949f} }; struct MANGOS_DLL_DECL npc_rethhedronAI : public ScriptedAI diff --git a/scripts/outland/netherstorm.cpp b/scripts/outland/netherstorm.cpp index 9988c1ac9..771f43909 100644 --- a/scripts/outland/netherstorm.cpp +++ b/scripts/outland/netherstorm.cpp @@ -1221,7 +1221,7 @@ struct MANGOS_DLL_DECL npc_drijyaAI : public npc_escortAI pSummoned->AI()->AttackStart(m_creature); break; } - } + } void WaypointReached(uint32 uiPointId) override { diff --git a/scripts/outland/terokkar_forest.cpp b/scripts/outland/terokkar_forest.cpp index 50f7fd936..72d978fb1 100644 --- a/scripts/outland/terokkar_forest.cpp +++ b/scripts/outland/terokkar_forest.cpp @@ -1158,14 +1158,14 @@ struct MANGOS_DLL_DECL npc_skyguard_prisonerAI : public npc_escortAI SetEscortPaused(true); //SetCurrentWaypoint(WP_ID_SPAWN_1); //SetEscortPaused(false); - script_error_log("NPC entry %u, location %f, %f, %f does not have waypoints implemneted for current spawn location. Please contact customer support!", m_creature->GetEntry(), m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ()); + script_error_log("NPC entry %u, location %f, %f, %f does not have waypoints implemented for current spawn location. Please contact customer support!", m_creature->GetEntry(), m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ()); } else if (m_creature->GetPositionZ() < 330.0f) { SetEscortPaused(true); //SetCurrentWaypoint(WP_ID_SPAWN_2); //SetEscortPaused(false); - script_error_log("NPC entry %u, location %f, %f, %f does not have waypoints implemneted for current spawn location. Please contact customer support!", m_creature->GetEntry(), m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ()); + script_error_log("NPC entry %u, location %f, %f, %f does not have waypoints implemented for current spawn location. Please contact customer support!", m_creature->GetEntry(), m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ()); } // else just use standard WP diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index d3dc8a651..eb3c721fe 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "2999" + #define SD2_REVISION_NR "3000" #endif // __SD2_REVISION_NR_H__ diff --git a/sd2_revision_sql.h b/sd2_revision_sql.h index 997c33355..f47a90c17 100644 --- a/sd2_revision_sql.h +++ b/sd2_revision_sql.h @@ -1,5 +1,5 @@ #ifndef __SD2_REVISION_SQL_H__ #define __SD2_REVISION_SQL_H__ - #define REVISION_DB_SCRIPTDEV2 "required__scriptdev2" - #define REVISION_DB_SD2_MANGOS "required__mangos" +#define REVISION_DB_SCRIPTDEV2 "required__scriptdev2" +#define REVISION_DB_SD2_MANGOS "required__mangos" #endif // __SD2_REVISION_SQL_H__ From b93ddae7575a3ac95eebdcca03152a693c26aea6 Mon Sep 17 00:00:00 2001 From: Huricane Date: Sun, 4 May 2014 18:16:16 +0200 Subject: [PATCH 1011/1172] Add Visual Studio 2013 files --- VC120/120ScriptDev2.vcxproj | 794 +++++++++ VC120/120ScriptDev2.vcxproj.filters | 1910 ++++++++++++++++++++++ scriptVC120.sln | 25 + tool/git_id/git_id_vc120.sln | 20 + tool/git_id/git_id_vc120.vcxproj | 102 ++ tool/git_id/git_id_vc120.vcxproj.filters | 22 + 6 files changed, 2873 insertions(+) create mode 100644 VC120/120ScriptDev2.vcxproj create mode 100644 VC120/120ScriptDev2.vcxproj.filters create mode 100644 scriptVC120.sln create mode 100644 tool/git_id/git_id_vc120.sln create mode 100644 tool/git_id/git_id_vc120.vcxproj create mode 100644 tool/git_id/git_id_vc120.vcxproj.filters diff --git a/VC120/120ScriptDev2.vcxproj b/VC120/120ScriptDev2.vcxproj new file mode 100644 index 000000000..d460115e0 --- /dev/null +++ b/VC120/120ScriptDev2.vcxproj @@ -0,0 +1,794 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + ScriptDev2 + {4295C8A9-79B7-4354-8064-F05FB9CA0C96} + ScriptDev2 + Win32Proj + + + + DynamicLibrary + MultiByte + v120 + + + DynamicLibrary + MultiByte + v120 + + + DynamicLibrary + MultiByte + v120 + + + DynamicLibrary + MultiByte + v120 + + + + + + + + + + + + + + + + + + + + + + + ..\..\..\..\bin\win32_debug\ + .\ScriptDev2__$(Platform)_$(Configuration)\ + true + ..\..\..\..\bin\x64_debug\ + .\ScriptDev2__$(Platform)_$(Configuration)\ + true + ..\..\..\..\bin\win32_release\ + .\ScriptDev2__$(Platform)_$(Configuration)\ + false + ..\..\..\..\bin\x64_release\ + .\ScriptDev2__$(Platform)_$(Configuration)\ + false + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + mangosscript + mangosscript + mangosscript + mangosscript + + + + Disabled + ..\..\..\..\dep\include\;..\..\..\shared\;..\..\..\framework\;..\..\..\game\;..\include\;..\base\;..\..\..\..\dep\ACE_wrappers\;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;MANGOS_DEBUG;_WINDOWS;_USRDLL;SCRIPT;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Use + precompiled.h + Level3 + ProgramDatabase + true + true + true + /Zm200 %(AdditionalOptions) + + + mangosd.lib;ACEd.lib;framework.lib;%(AdditionalDependencies) + ..\..\..\..\win\VC120\mangosd__Win32_Debug;..\..\..\..\win\VC120\framework__Win32_Debug;..\..\..\..\dep\lib\win32_debug\;%(AdditionalLibraryDirectories) + true + Windows + false + + + $(OutDir)mangosscript.lib + MachineX86 + + + + + X64 + + + Disabled + ..\..\..\..\dep\include\;..\..\..\shared\;..\..\..\framework\;..\..\..\game\;..\include\;..\base\;..\..\..\..\dep\ACE_wrappers\;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;MANGOS_DEBUG;_WINDOWS;_USRDLL;SCRIPT;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Use + precompiled.h + Level3 + ProgramDatabase + true + true + true + /Zm200 %(AdditionalOptions) + + + mangosd.lib;ACEd.lib;framework.lib;%(AdditionalDependencies) + ..\..\..\..\win\VC120\mangosd__x64_Debug;..\..\..\..\win\VC120\framework__x64_Debug;..\..\..\..\dep\lib\x64_Debug\;%(AdditionalLibraryDirectories) + true + Windows + false + + + $(OutDir)mangosscript.lib + MachineX64 + + + + + /Zm200 %(AdditionalOptions) + ..\..\..\..\dep\include\;..\..\..\shared\;..\..\..\framework\;..\..\..\game\;..\include\;..\base\;..\..\..\..\dep\ACE_wrappers\;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;_USRDLL;SCRIPT;_SECURE_SCL=0;%(PreprocessorDefinitions) + false + MultiThreadedDLL + Use + precompiled.h + Level3 + ProgramDatabase + true + true + true + + + mangosd.lib;ACE.lib;framework.lib;%(AdditionalDependencies) + ..\..\..\..\win\VC120\mangosd__Win32_Release;..\..\..\..\win\VC120\framework__Win32_Release;..\..\..\..\dep\lib\win32_release\;%(AdditionalLibraryDirectories) + true + Windows + true + true + false + + + $(OutDir)mangosscript.lib + + + + + X64 + + + /Zm200 %(AdditionalOptions) + ..\..\..\..\dep\include\;..\..\..\shared\;..\..\..\framework\;..\..\..\game\;..\include\;..\base\;..\..\..\..\dep\ACE_wrappers\;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;_USRDLL;SCRIPT;_SECURE_SCL=0;%(PreprocessorDefinitions) + MultiThreadedDLL + Use + precompiled.h + Level3 + ProgramDatabase + true + true + true + + + mangosd.lib;ACE.lib;framework.lib;%(AdditionalDependencies) + ..\..\..\..\win\VC120\mangosd__x64_Release;..\..\..\..\win\VC120\framework__x64_Release;..\..\..\..\dep\lib\x64_release\;%(AdditionalLibraryDirectories) + true + Windows + true + true + false + + + $(OutDir)mangosscript.lib + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Create + Create + Create + Create + + + + + + NotUsing + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Extracting revision + cd "$(SolutionDir)" +"$(SolutionDir)..\..\..\win\VC120\genrevision__Win32_$(Configuration)\genrevision.exe" + + .svn/entries;%(AdditionalInputs) + revision.h;%(Outputs) + Extracting revision + cd "$(SolutionDir)" +"$(SolutionDir)..\..\..\win\VC120\genrevision__Win32_$(Configuration)\genrevision.exe" + + .svn/entries;%(AdditionalInputs) + revision.h;%(Outputs) + Extracting revision + cd "$(SolutionDir)" +"$(SolutionDir)..\..\..\win\VC120\genrevision__Win32_$(Configuration)\genrevision.exe" + + .svn/entries;%(AdditionalInputs) + revision.h;%(Outputs) + Extracting revision + cd "$(SolutionDir)" +"$(SolutionDir)..\..\..\win\VC120\genrevision__Win32_$(Configuration)\genrevision.exe" + + .svn/entries;%(AdditionalInputs) + revision.h;%(Outputs) + + + + + + + + + \ No newline at end of file diff --git a/VC120/120ScriptDev2.vcxproj.filters b/VC120/120ScriptDev2.vcxproj.filters new file mode 100644 index 000000000..284085ff8 --- /dev/null +++ b/VC120/120ScriptDev2.vcxproj.filters @@ -0,0 +1,1910 @@ + + + + + {3b1307a9-bc58-4773-9a93-0e9ceff55c82} + + + {b7b35df3-4231-4370-aed5-5859ab4c312e} + + + {ced0a1e2-6867-4f01-a762-390a3d1f01d3} + + + {af3d4b4d-a585-41c4-ba95-79669a614ea8} + + + {ca2551e0-68d0-4331-88f3-ab0cdaa2bf9a} + + + {45c59280-02fb-482f-859b-bd47cc230f0f} + + + {5631f38e-66c8-4efd-ad3a-2834fbb49a6e} + + + {31605090-12b9-4d42-a5e9-1cbfac8ab384} + + + {08fb5b22-710d-46d6-9893-f567aa75a5e6} + + + {cef5c3c5-f434-4b9f-9bad-8c106d46c755} + + + {66bc2cec-8372-4191-991c-1c23275fa13c} + + + {af465469-5a16-4908-aa08-39c77d02cd88} + + + {920d1832-b347-4afd-bd05-4c943e5555f0} + + + {6ffd42e5-ac49-4635-8087-77ad2b7b0866} + + + {dd4995a8-6d86-4f21-82bc-a18acc2c688f} + + + {2a3a25e5-51f1-4ab3-a1a0-1b9ec9c45d1a} + + + {7a028ad9-afa1-42ea-b147-20a40c5e716c} + + + {66401dac-d94c-4ed6-b912-229dda0906d6} + + + {385f26dc-dcaf-4022-921d-3a562617bf93} + + + {25be39dd-536d-450d-ac94-6372d37a4fae} + + + {1d718eaa-2a8d-4cb9-9abf-17fcf0d91f83} + + + {c929f54b-22dd-49b4-862c-92dfa9a2d1f7} + + + {60b91cfe-7dff-40de-9957-41f8d03144cc} + + + {22eca3e6-662f-4c53-9344-6e749c09c86b} + + + {070541ef-a813-43f5-a8a6-e6674fe1a47e} + + + {5cda7bda-399b-46b7-8bc2-5786f0202fa2} + + + {226d4dc8-830b-4249-b28a-313ac21080a9} + + + {404b30fd-bdaa-44d1-ab3a-384886ebb8ec} + + + {5833dbce-1fa8-49eb-b678-145a2d58a067} + + + {dc38d3fe-d1fe-49f2-bd8f-758cd270dd62} + + + {2552ab59-1f73-4778-a6db-6f03e405622d} + + + {8206776b-4d43-431d-bca5-5f6cff157ea4} + + + {02135a7c-33cc-444e-af90-48a5193e5a6f} + + + {014ada9a-13bf-4540-a0ce-5132bdc36fcf} + + + {9feb59d0-e6bd-4328-9a50-7ddb9852936e} + + + {00f03f8d-4af1-40d9-a95a-e2dc1a81ca7d} + + + {de2e959a-1ef4-41ef-9235-15a1f3f8a19d} + + + {8f8a60e0-223e-4517-918c-243e523a7892} + + + {416ccfc8-a1bb-43a5-b202-d7656981094a} + + + {ba031a13-787e-41da-bcaf-1986fdea8069} + + + {0412262e-b05b-4827-adef-97507204cb69} + + + {e775610e-fa3c-4355-9c4c-473a6a5e57d5} + + + {6c5f7fd4-671b-4cba-aa95-7758b93dc844} + + + {71e87e58-3b30-41e7-8f8a-16886508a4d9} + + + {3cf8e088-da94-4561-993f-2970908d6642} + + + {bc0156b2-6544-4ebc-9ed6-fe45ac1902a4} + + + {b59c73a8-c480-43b2-8a2e-65f5a54978eb} + + + {5eb6a84a-97e6-477e-97e3-23681f29f675} + + + {d7e0e45a-fd89-48a6-8d24-f4922058160e} + + + {71617682-fe62-4d7c-a2de-7181fb3f46f6} + + + {9c5d9a0f-8967-4cf6-a047-3b724f81dc29} + + + {42501e94-f91e-40be-a02a-472b5ca1e22c} + + + {aac6b8be-6055-4d7d-a50a-41650b8d464e} + + + {e7ee3113-f4d0-4e28-acc7-dc80f42d41df} + + + {e603d4b3-3c2f-4011-aa2b-040243163d3f} + + + {36c79ad7-420c-4909-8da3-c90d3cc83b31} + + + {d47410b0-3184-40e2-8704-cea9b97e20ed} + + + {1b2f0d99-82b0-4a96-aaac-c485830eb1b3} + + + {fd594031-4dc2-40de-b37b-93063ee6e3e9} + + + {ef27a557-e12d-4b02-9e86-c258329f201e} + + + {b7e4ad7d-8515-4981-ae27-9e542c223618} + + + {04b1d59c-38b6-4b5c-a50d-b9ff1d39bb30} + + + {ee364414-732a-4aad-820f-a5b73cb8b093} + + + {638d5426-652e-4d1f-9abe-3ed95d7e7e69} + + + {a21893a5-0f34-4a73-b0aa-49b175822834} + + + {728148f8-18a0-4606-a2ec-2c9eae4e5e7e} + + + {88c327d5-0768-465f-b954-30eca0d31f45} + + + {b20efa19-1e16-42e4-bc29-a9c8e282d17c} + + + {fec1fbfa-5119-4bb0-98bc-f8d4583521f7} + + + {1cb43523-dc33-4c49-a5b7-6e700fe0ecd6} + + + {7289cc07-6956-4b09-8dc5-753c82abe8c9} + + + {e834cf7b-88ad-4bae-9fc8-8e027136c63b} + + + {cfb08e82-63e6-49ca-bff2-533f8647797b} + + + {2be3084e-c5c0-4e2f-bbb4-2ebb22bfff19} + + + {6dc08e92-3e86-4a7f-bab9-9a8cec6a201b} + + + {01da56d1-ee04-455c-846c-4e53869314f6} + + + {5e79ca74-cd29-47ff-a08e-3fada858ddd7} + + + {32b92545-4821-4cc8-ae39-f631b0176d46} + + + {044e4dbc-e2fc-437c-b359-b6fb5a3439ff} + + + {4cbcf193-4d98-4518-a9c4-6c8b4bedbf44} + + + {5c32221e-3532-4c32-bdba-9a85213006af} + + + {2df99085-aee2-4202-b4d1-38a5cc35f3e2} + + + {0a109c31-6dd3-4030-8d6c-6c0e147481be} + + + {ddada980-2eed-4f2b-a9f7-dbb9cca7ca3d} + + + {d6843352-6425-48da-85b6-6b26f6217ba8} + + + {6a68396b-343f-4c79-938c-93741acdeb41} + + + {974fc97c-e585-442c-b35e-b21a17804619} + + + {ba709b56-d5db-4730-9591-79b8f9788ca1} + + + {1fa90250-9c5b-450c-be64-d9eee910c4a8} + + + {7b3c1c18-03e9-493e-a364-5beb1a6936eb} + + + {575420cc-581f-4d08-a9da-7814f221ab47} + + + {9c5997ee-accc-4737-815f-b031d422577b} + + + {579f2f5c-acf1-410a-bce6-d353d6912546} + + + {04e4571d-55ee-4f2e-ac4e-46fc2610341f} + + + {79a3e62b-bd96-4d16-8c23-bda17f968d19} + + + {ca7213e9-56c1-4084-a48b-19ff57dee433} + + + {2fd46769-c050-4e47-9533-461ef8695d6a} + + + {90f3df6a-a1d0-4a6e-b8d7-d1d993fc795b} + + + {e35abead-2389-4eb9-88bd-70e6fe5636b5} + + + + + base + + + base + + + base + + + base + + + scripts\battlegrounds + + + scripts\eastern_kingdoms + + + scripts\eastern_kingdoms + + + scripts\eastern_kingdoms + + + scripts\eastern_kingdoms + + + scripts\eastern_kingdoms + + + scripts\eastern_kingdoms + + + scripts\eastern_kingdoms + + + scripts\eastern_kingdoms + + + scripts\eastern_kingdoms + + + scripts\eastern_kingdoms + + + scripts\eastern_kingdoms + + + scripts\eastern_kingdoms + + + scripts\eastern_kingdoms + + + scripts\eastern_kingdoms + + + scripts\eastern_kingdoms + + + scripts\eastern_kingdoms + + + scripts\eastern_kingdoms + + + scripts\eastern_kingdoms + + + scripts\eastern_kingdoms + + + scripts\eastern_kingdoms + + + scripts\eastern_kingdoms + + + scripts\eastern_kingdoms + + + scripts\eastern_kingdoms + + + scripts\eastern_kingdoms + + + scripts\eastern_kingdoms + + + scripts\eastern_kingdoms\blackrock_depths + + + scripts\eastern_kingdoms\blackrock_depths + + + scripts\eastern_kingdoms\blackrock_depths + + + scripts\eastern_kingdoms\blackrock_depths + + + scripts\eastern_kingdoms\blackrock_depths + + + scripts\eastern_kingdoms\blackrock_depths + + + scripts\eastern_kingdoms\blackrock_depths + + + scripts\eastern_kingdoms\blackrock_spire + + + scripts\eastern_kingdoms\blackrock_spire + + + scripts\eastern_kingdoms\blackrock_spire + + + scripts\eastern_kingdoms\blackrock_spire + + + scripts\eastern_kingdoms\blackwing_lair + + + scripts\eastern_kingdoms\blackwing_lair + + + scripts\eastern_kingdoms\blackwing_lair + + + scripts\eastern_kingdoms\blackwing_lair + + + scripts\eastern_kingdoms\blackwing_lair + + + scripts\eastern_kingdoms\blackwing_lair + + + scripts\eastern_kingdoms\blackwing_lair + + + scripts\eastern_kingdoms\blackwing_lair + + + scripts\eastern_kingdoms\blackwing_lair + + + scripts\eastern_kingdoms\blackwing_lair + + + scripts\eastern_kingdoms\deadmines + + + scripts\eastern_kingdoms\deadmines + + + scripts\eastern_kingdoms\deadmines + + + scripts\eastern_kingdoms\gnomeregan + + + scripts\eastern_kingdoms\gnomeregan + + + scripts\eastern_kingdoms\gnomeregan + + + scripts\eastern_kingdoms\karazhan + + + scripts\eastern_kingdoms\karazhan + + + scripts\eastern_kingdoms\karazhan + + + scripts\eastern_kingdoms\karazhan + + + scripts\eastern_kingdoms\karazhan + + + scripts\eastern_kingdoms\karazhan + + + scripts\eastern_kingdoms\karazhan + + + scripts\eastern_kingdoms\karazhan + + + scripts\eastern_kingdoms\karazhan + + + scripts\eastern_kingdoms\karazhan + + + scripts\eastern_kingdoms\karazhan + + + scripts\eastern_kingdoms\karazhan + + + scripts\eastern_kingdoms\karazhan + + + scripts\eastern_kingdoms\magisters_terrace + + + scripts\eastern_kingdoms\magisters_terrace + + + scripts\eastern_kingdoms\magisters_terrace + + + scripts\eastern_kingdoms\magisters_terrace + + + scripts\eastern_kingdoms\magisters_terrace + + + scripts\eastern_kingdoms\magisters_terrace + + + scripts\eastern_kingdoms\molten_core + + + scripts\eastern_kingdoms\molten_core + + + scripts\eastern_kingdoms\molten_core + + + scripts\eastern_kingdoms\molten_core + + + scripts\eastern_kingdoms\molten_core + + + scripts\eastern_kingdoms\molten_core + + + scripts\eastern_kingdoms\molten_core + + + scripts\eastern_kingdoms\molten_core + + + scripts\eastern_kingdoms\molten_core + + + scripts\eastern_kingdoms\molten_core + + + scripts\eastern_kingdoms\molten_core + + + scripts\eastern_kingdoms\molten_core + + + scripts\eastern_kingdoms\scarlet_enclave + + + scripts\eastern_kingdoms\scarlet_enclave + + + scripts\eastern_kingdoms\scarlet_monastery + + + scripts\eastern_kingdoms\scarlet_monastery + + + scripts\eastern_kingdoms\scarlet_monastery + + + scripts\eastern_kingdoms\scarlet_monastery + + + scripts\eastern_kingdoms\scarlet_monastery + + + scripts\eastern_kingdoms\scholomance + + + scripts\eastern_kingdoms\scholomance + + + scripts\eastern_kingdoms\scholomance + + + scripts\eastern_kingdoms\shadowfang_keep + + + scripts\eastern_kingdoms\shadowfang_keep + + + scripts\eastern_kingdoms\shadowfang_keep + + + scripts\eastern_kingdoms\stratholme + + + scripts\eastern_kingdoms\stratholme + + + scripts\eastern_kingdoms\stratholme + + + scripts\eastern_kingdoms\stratholme + + + scripts\eastern_kingdoms\stratholme + + + scripts\eastern_kingdoms\stratholme + + + scripts\eastern_kingdoms\stratholme + + + scripts\eastern_kingdoms\sunken_temple + + + scripts\eastern_kingdoms\sunken_temple + + + scripts\eastern_kingdoms\sunwell_plateau + + + scripts\eastern_kingdoms\sunwell_plateau + + + scripts\eastern_kingdoms\sunwell_plateau + + + scripts\eastern_kingdoms\sunwell_plateau + + + scripts\eastern_kingdoms\sunwell_plateau + + + scripts\eastern_kingdoms\sunwell_plateau + + + scripts\eastern_kingdoms\sunwell_plateau + + + scripts\eastern_kingdoms\uldaman + + + scripts\eastern_kingdoms\uldaman + + + scripts\eastern_kingdoms\uldaman + + + scripts\eastern_kingdoms\zulaman + + + scripts\eastern_kingdoms\zulaman + + + scripts\eastern_kingdoms\zulaman + + + scripts\eastern_kingdoms\zulaman + + + scripts\eastern_kingdoms\zulaman + + + scripts\eastern_kingdoms\zulaman + + + scripts\eastern_kingdoms\zulaman + + + scripts\eastern_kingdoms\zulaman + + + scripts\eastern_kingdoms\zulgurub + + + scripts\eastern_kingdoms\zulgurub + + + scripts\eastern_kingdoms\zulgurub + + + scripts\eastern_kingdoms\zulgurub + + + scripts\eastern_kingdoms\zulgurub + + + scripts\eastern_kingdoms\zulgurub + + + scripts\eastern_kingdoms\zulgurub + + + scripts\eastern_kingdoms\zulgurub + + + scripts\eastern_kingdoms\zulgurub + + + scripts\eastern_kingdoms\zulgurub + + + scripts\eastern_kingdoms\zulgurub + + + scripts\examples + + + scripts\examples + + + scripts\examples + + + scripts\examples + + + scripts\kalimdor + + + scripts\kalimdor + + + scripts\kalimdor + + + scripts\kalimdor + + + scripts\kalimdor + + + scripts\kalimdor + + + scripts\kalimdor + + + scripts\kalimdor + + + scripts\kalimdor + + + scripts\kalimdor + + + scripts\kalimdor + + + scripts\kalimdor + + + scripts\kalimdor + + + scripts\kalimdor + + + scripts\kalimdor + + + scripts\kalimdor + + + scripts\kalimdor + + + scripts\kalimdor + + + scripts\kalimdor + + + scripts\kalimdor + + + scripts\kalimdor + + + scripts\kalimdor + + + scripts\kalimdor + + + scripts\kalimdor\blackfathom_deeps + + + scripts\kalimdor\caverns_of_time\culling_of_stratholme + + + scripts\kalimdor\caverns_of_time\culling_of_stratholme + + + scripts\kalimdor\caverns_of_time\dark_portal + + + scripts\kalimdor\caverns_of_time\dark_portal + + + scripts\kalimdor\caverns_of_time\dark_portal + + + scripts\kalimdor\caverns_of_time\dark_portal + + + scripts\kalimdor\caverns_of_time\dark_portal + + + scripts\kalimdor\caverns_of_time\hyjal + + + scripts\kalimdor\caverns_of_time\hyjal + + + scripts\kalimdor\caverns_of_time\hyjal + + + scripts\kalimdor\caverns_of_time\hyjal + + + scripts\kalimdor\caverns_of_time\old_hillsbrad + + + scripts\kalimdor\caverns_of_time\old_hillsbrad + + + scripts\kalimdor\dire_maul + + + scripts\kalimdor\dire_maul + + + scripts\kalimdor\maraudon + + + scripts\kalimdor\onyxias_lair + + + scripts\kalimdor\onyxias_lair + + + scripts\kalimdor\razorfen_downs + + + scripts\kalimdor\razorfen_kraul + + + scripts\kalimdor\razorfen_kraul + + + scripts\kalimdor\ruins_of_ahnqiraj + + + scripts\kalimdor\ruins_of_ahnqiraj + + + scripts\kalimdor\ruins_of_ahnqiraj + + + scripts\kalimdor\ruins_of_ahnqiraj + + + scripts\kalimdor\ruins_of_ahnqiraj + + + scripts\kalimdor\ruins_of_ahnqiraj + + + scripts\kalimdor\ruins_of_ahnqiraj + + + scripts\kalimdor\ruins_of_ahnqiraj + + + scripts\kalimdor\temple_of_ahnqiraj + + + scripts\kalimdor\temple_of_ahnqiraj + + + scripts\kalimdor\temple_of_ahnqiraj + + + scripts\kalimdor\temple_of_ahnqiraj + + + scripts\kalimdor\temple_of_ahnqiraj + + + scripts\kalimdor\temple_of_ahnqiraj + + + scripts\kalimdor\temple_of_ahnqiraj + + + scripts\kalimdor\temple_of_ahnqiraj + + + scripts\kalimdor\temple_of_ahnqiraj + + + scripts\kalimdor\temple_of_ahnqiraj + + + scripts\kalimdor\temple_of_ahnqiraj + + + scripts\kalimdor\wailing_caverns + + + scripts\kalimdor\wailing_caverns + + + scripts\kalimdor\zulfarrak + + + scripts\kalimdor\zulfarrak + + + scripts\kalimdor\zulfarrak + + + scripts\northrend + + + scripts\northrend + + + scripts\northrend + + + scripts\northrend + + + scripts\northrend + + + scripts\northrend + + + scripts\northrend + + + scripts\northrend + + + scripts\northrend + + + scripts\northrend\azjol-nerub\ahnkahet + + + scripts\northrend\azjol-nerub\ahnkahet + + + scripts\northrend\azjol-nerub\ahnkahet + + + scripts\northrend\azjol-nerub\ahnkahet + + + scripts\northrend\azjol-nerub\ahnkahet + + + scripts\northrend\azjol-nerub\ahnkahet + + + scripts\northrend\azjol-nerub\azjol-nerub + + + scripts\northrend\azjol-nerub\azjol-nerub + + + scripts\northrend\azjol-nerub\azjol-nerub + + + scripts\northrend\azjol-nerub\azjol-nerub + + + scripts\northrend\crusaders_coliseum\trial_of_the_champion + + + scripts\northrend\crusaders_coliseum\trial_of_the_champion + + + scripts\northrend\crusaders_coliseum\trial_of_the_champion + + + scripts\northrend\crusaders_coliseum\trial_of_the_crusader + + + scripts\northrend\crusaders_coliseum\trial_of_the_crusader + + + scripts\northrend\crusaders_coliseum\trial_of_the_crusader + + + scripts\northrend\crusaders_coliseum\trial_of_the_crusader + + + scripts\northrend\crusaders_coliseum\trial_of_the_crusader + + + scripts\northrend\crusaders_coliseum\trial_of_the_crusader + + + scripts\northrend\crusaders_coliseum\trial_of_the_crusader + + + scripts\northrend\draktharon_keep + + + scripts\northrend\draktharon_keep + + + scripts\northrend\draktharon_keep + + + scripts\northrend\draktharon_keep + + + scripts\northrend\gundrak + + + scripts\northrend\gundrak + + + scripts\northrend\gundrak + + + scripts\northrend\gundrak + + + scripts\northrend\gundrak + + + scripts\northrend\gundrak + + + scripts\northrend\naxxramas + + + scripts\northrend\naxxramas + + + scripts\northrend\naxxramas + + + scripts\northrend\naxxramas + + + scripts\northrend\naxxramas + + + scripts\northrend\naxxramas + + + scripts\northrend\naxxramas + + + scripts\northrend\naxxramas + + + scripts\northrend\naxxramas + + + scripts\northrend\naxxramas + + + scripts\northrend\naxxramas + + + scripts\northrend\naxxramas + + + scripts\northrend\naxxramas + + + scripts\northrend\naxxramas + + + scripts\northrend\naxxramas + + + scripts\northrend\naxxramas + + + scripts\northrend\nexus\eye_of_eternity + + + scripts\northrend\nexus\eye_of_eternity + + + scripts\northrend\nexus\nexus + + + scripts\northrend\nexus\nexus + + + scripts\northrend\nexus\nexus + + + scripts\northrend\nexus\nexus + + + scripts\northrend\nexus\nexus + + + scripts\northrend\nexus\oculus + + + scripts\northrend\nexus\oculus + + + scripts\northrend\nexus\oculus + + + scripts\northrend\nexus\oculus + + + scripts\northrend\nexus\oculus + + + scripts\northrend\obsidian_sanctum + + + scripts\northrend\obsidian_sanctum + + + scripts\northrend\ulduar\halls_of_lightning + + + scripts\northrend\ulduar\halls_of_lightning + + + scripts\northrend\ulduar\halls_of_lightning + + + scripts\northrend\ulduar\halls_of_lightning + + + scripts\northrend\ulduar\halls_of_lightning + + + scripts\northrend\ulduar\halls_of_stone + + + scripts\northrend\ulduar\halls_of_stone + + + scripts\northrend\ulduar\halls_of_stone + + + scripts\northrend\ulduar\halls_of_stone + + + scripts\northrend\ulduar\ulduar + + + scripts\northrend\ulduar\ulduar + + + scripts\northrend\ulduar\ulduar + + + scripts\northrend\ulduar\ulduar + + + scripts\northrend\ulduar\ulduar + + + scripts\northrend\ulduar\ulduar + + + scripts\northrend\ulduar\ulduar + + + scripts\northrend\ulduar\ulduar + + + scripts\northrend\ulduar\ulduar + + + scripts\northrend\ulduar\ulduar + + + scripts\northrend\ulduar\ulduar + + + scripts\northrend\ulduar\ulduar + + + scripts\northrend\ulduar\ulduar + + + scripts\northrend\ulduar\ulduar + + + scripts\northrend\ulduar\ulduar + + + scripts\northrend\ulduar\ulduar + + + scripts\northrend\utgarde_keep\utgarde_keep + + + scripts\northrend\utgarde_keep\utgarde_keep + + + scripts\northrend\utgarde_keep\utgarde_keep + + + scripts\northrend\utgarde_keep\utgarde_keep + + + scripts\northrend\utgarde_keep\utgarde_keep + + + scripts\northrend\utgarde_keep\utgarde_pinnacle + + + scripts\northrend\utgarde_keep\utgarde_pinnacle + + + scripts\northrend\utgarde_keep\utgarde_pinnacle + + + scripts\northrend\utgarde_keep\utgarde_pinnacle + + + scripts\northrend\utgarde_keep\utgarde_pinnacle + + + scripts\northrend\vault_of_archavon + + + scripts\northrend\vault_of_archavon + + + scripts\northrend\vault_of_archavon + + + scripts\northrend\vault_of_archavon + + + scripts\northrend\vault_of_archavon + + + scripts\northrend\violet_hold + + + scripts\northrend\violet_hold + + + scripts\northrend\violet_hold + + + scripts\northrend\violet_hold + + + scripts\northrend\icecrown_citadel\icecrown_citadel + + + scripts\northrend\icecrown_citadel\icecrown_citadel + + + scripts\northrend\icecrown_citadel\icecrown_citadel + + + scripts\northrend\icecrown_citadel\icecrown_citadel + + + scripts\northrend\icecrown_citadel\icecrown_citadel + + + scripts\northrend\icecrown_citadel\icecrown_citadel + + + scripts\northrend\icecrown_citadel\icecrown_citadel + + + scripts\northrend\icecrown_citadel\icecrown_citadel + + + scripts\northrend\icecrown_citadel\icecrown_citadel + + + scripts\northrend\icecrown_citadel\icecrown_citadel + + + scripts\northrend\icecrown_citadel\icecrown_citadel + + + scripts\northrend\icecrown_citadel\icecrown_citadel + + + scripts\northrend\icecrown_citadel\icecrown_citadel + + + scripts\northrend\icecrown_citadel\frozen_halls\pit_of_saron + + + scripts\northrend\icecrown_citadel\frozen_halls\pit_of_saron + + + scripts\northrend\icecrown_citadel\frozen_halls\pit_of_saron + + + scripts\northrend\icecrown_citadel\frozen_halls\pit_of_saron + + + scripts\northrend\icecrown_citadel\frozen_halls\pit_of_saron + + + scripts\northrend\icecrown_citadel\frozen_halls\halls_of_reflection + + + scripts\northrend\icecrown_citadel\frozen_halls\halls_of_reflection + + + scripts\northrend\icecrown_citadel\frozen_halls\halls_of_reflection + + + scripts\northrend\icecrown_citadel\frozen_halls\halls_of_reflection + + + scripts\northrend\icecrown_citadel\frozen_halls\halls_of_reflection + + + scripts\northrend\icecrown_citadel\frozen_halls\forge_of_souls + + + scripts\northrend\icecrown_citadel\frozen_halls\forge_of_souls + + + scripts\northrend\icecrown_citadel\frozen_halls\forge_of_souls + + + scripts\outland + + + scripts\outland + + + scripts\outland + + + scripts\outland + + + scripts\outland + + + scripts\outland + + + scripts\outland + + + scripts\outland + + + scripts\outland + + + scripts\outland + + + scripts\outland\auchindoun\auchenai_crypts + + + scripts\outland\auchindoun\auchenai_crypts + + + scripts\outland\auchindoun\mana_tombs + + + scripts\outland\auchindoun\mana_tombs + + + scripts\outland\auchindoun\sethekk_halls + + + scripts\outland\auchindoun\sethekk_halls + + + scripts\outland\auchindoun\sethekk_halls + + + scripts\outland\auchindoun\sethekk_halls + + + scripts\outland\auchindoun\shadow_labyrinth + + + scripts\outland\auchindoun\shadow_labyrinth + + + scripts\outland\auchindoun\shadow_labyrinth + + + scripts\outland\auchindoun\shadow_labyrinth + + + scripts\outland\auchindoun\shadow_labyrinth + + + scripts\outland\black_temple + + + scripts\outland\black_temple + + + scripts\outland\black_temple + + + scripts\outland\black_temple + + + scripts\outland\black_temple + + + scripts\outland\black_temple + + + scripts\outland\black_temple + + + scripts\outland\black_temple + + + scripts\outland\black_temple + + + scripts\outland\black_temple + + + scripts\outland\black_temple + + + scripts\outland\coilfang_reservoir\serpent_shrine + + + scripts\outland\coilfang_reservoir\serpent_shrine + + + scripts\outland\coilfang_reservoir\serpent_shrine + + + scripts\outland\coilfang_reservoir\serpent_shrine + + + scripts\outland\coilfang_reservoir\serpent_shrine + + + scripts\outland\coilfang_reservoir\serpent_shrine + + + scripts\outland\coilfang_reservoir\serpent_shrine + + + scripts\outland\coilfang_reservoir\slave_pens + + + scripts\outland\coilfang_reservoir\steam_vault + + + scripts\outland\coilfang_reservoir\steam_vault + + + scripts\outland\coilfang_reservoir\steam_vault + + + scripts\outland\coilfang_reservoir\steam_vault + + + scripts\outland\coilfang_reservoir\underbog + + + scripts\outland\gruuls_lair + + + scripts\outland\gruuls_lair + + + scripts\outland\gruuls_lair + + + scripts\outland\hellfire_citadel\blood_furnace + + + scripts\outland\hellfire_citadel\blood_furnace + + + scripts\outland\hellfire_citadel\blood_furnace + + + scripts\outland\hellfire_citadel\blood_furnace + + + scripts\outland\hellfire_citadel\hellfire_ramparts + + + scripts\outland\hellfire_citadel\hellfire_ramparts + + + scripts\outland\hellfire_citadel\hellfire_ramparts + + + scripts\outland\hellfire_citadel\hellfire_ramparts + + + scripts\outland\hellfire_citadel\magtheridons_lair + + + scripts\outland\hellfire_citadel\magtheridons_lair + + + scripts\outland\hellfire_citadel\shattered_halls + + + scripts\outland\hellfire_citadel\shattered_halls + + + scripts\outland\hellfire_citadel\shattered_halls + + + scripts\outland\hellfire_citadel\shattered_halls + + + scripts\outland\tempest_keep\arcatraz + + + scripts\outland\tempest_keep\arcatraz + + + scripts\outland\tempest_keep\arcatraz + + + scripts\outland\tempest_keep\arcatraz + + + scripts\outland\tempest_keep\arcatraz + + + scripts\outland\tempest_keep\botanica + + + scripts\outland\tempest_keep\botanica + + + scripts\outland\tempest_keep\botanica + + + scripts\outland\tempest_keep\the_eye + + + scripts\outland\tempest_keep\the_eye + + + scripts\outland\tempest_keep\the_eye + + + scripts\outland\tempest_keep\the_eye + + + scripts\outland\tempest_keep\the_eye + + + scripts\outland\tempest_keep\the_mechanar + + + scripts\outland\tempest_keep\the_mechanar + + + scripts\outland\tempest_keep\the_mechanar + + + scripts\world + + + scripts\world + + + scripts\world + + + scripts\world + + + scripts\world + + + scripts\world + + + scripts\world + + + scripts\world + + + scripts\world + + + scripts\world + + + include + + + include + + + include + + + include + + + system + + + system + + + system + + + + scripts\northrend\ruby_sanctum + + + scripts\northrend\ruby_sanctum + + + scripts\northrend\ruby_sanctum + + + scripts\northrend\ruby_sanctum + + + scripts\northrend\ruby_sanctum + + + + + base + + + base + + + base + + + base + + + scripts\eastern_kingdoms\blackrock_depths + + + scripts\eastern_kingdoms\blackrock_spire + + + scripts\eastern_kingdoms\blackwing_lair + + + scripts\eastern_kingdoms\deadmines + + + scripts\eastern_kingdoms\gnomeregan + + + scripts\eastern_kingdoms\karazhan + + + scripts\eastern_kingdoms\magisters_terrace + + + scripts\eastern_kingdoms\molten_core + + + scripts\eastern_kingdoms\scarlet_enclave + + + scripts\eastern_kingdoms\scarlet_monastery + + + scripts\eastern_kingdoms\scholomance + + + scripts\eastern_kingdoms\shadowfang_keep + + + scripts\eastern_kingdoms\stratholme + + + scripts\eastern_kingdoms\sunken_temple + + + scripts\eastern_kingdoms\sunwell_plateau + + + scripts\eastern_kingdoms\uldaman + + + scripts\eastern_kingdoms\zulaman + + + scripts\eastern_kingdoms\zulgurub + + + scripts\kalimdor\blackfathom_deeps + + + scripts\kalimdor\caverns_of_time\culling_of_stratholme + + + scripts\kalimdor\caverns_of_time\dark_portal + + + scripts\kalimdor\caverns_of_time\hyjal + + + scripts\kalimdor\caverns_of_time\hyjal + + + scripts\kalimdor\caverns_of_time\old_hillsbrad + + + scripts\kalimdor\dire_maul + + + scripts\kalimdor\onyxias_lair + + + scripts\kalimdor\razorfen_kraul + + + scripts\kalimdor\ruins_of_ahnqiraj + + + scripts\kalimdor\temple_of_ahnqiraj + + + scripts\kalimdor\wailing_caverns + + + scripts\kalimdor\zulfarrak + + + scripts\northrend\azjol-nerub\ahnkahet + + + scripts\northrend\azjol-nerub\azjol-nerub + + + scripts\northrend\crusaders_coliseum\trial_of_the_champion + + + scripts\northrend\crusaders_coliseum\trial_of_the_crusader + + + scripts\northrend\draktharon_keep + + + scripts\northrend\gundrak + + + scripts\northrend\icecrown_citadel\frozen_halls\forge_of_souls + + + scripts\northrend\icecrown_citadel\frozen_halls\halls_of_reflection + + + scripts\northrend\icecrown_citadel\frozen_halls\pit_of_saron + + + scripts\northrend\icecrown_citadel\icecrown_citadel + + + scripts\northrend\naxxramas + + + scripts\northrend\nexus\eye_of_eternity + + + scripts\northrend\nexus\nexus + + + scripts\northrend\nexus\oculus + + + scripts\northrend\obsidian_sanctum + + + scripts\northrend\ruby_sanctum + + + scripts\northrend\ulduar\halls_of_lightning + + + scripts\northrend\ulduar\halls_of_stone + + + scripts\northrend\ulduar\ulduar + + + scripts\northrend\utgarde_keep\utgarde_keep + + + scripts\northrend\utgarde_keep\utgarde_pinnacle + + + scripts\northrend\vault_of_archavon + + + scripts\northrend\violet_hold + + + scripts\outland\auchindoun\sethekk_halls + + + scripts\outland\auchindoun\shadow_labyrinth + + + scripts\outland\black_temple + + + scripts\outland\coilfang_reservoir\serpent_shrine + + + scripts\outland\coilfang_reservoir\steam_vault + + + scripts\outland\gruuls_lair + + + scripts\outland\hellfire_citadel\blood_furnace + + + scripts\outland\hellfire_citadel\hellfire_ramparts + + + scripts\outland\hellfire_citadel\magtheridons_lair + + + scripts\outland\hellfire_citadel\shattered_halls + + + scripts\outland\tempest_keep\arcatraz + + + scripts\outland\tempest_keep\the_eye + + + scripts\outland\tempest_keep\the_mechanar + + + scripts\world + + + include + + + include + + + include + + + include + + + include + + + system + + + system + + + + + + + + + + \ No newline at end of file diff --git a/scriptVC120.sln b/scriptVC120.sln new file mode 100644 index 000000000..e44c9add3 --- /dev/null +++ b/scriptVC120.sln @@ -0,0 +1,25 @@ +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2013 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ScriptDev2", "VC120\120ScriptDev2.vcxproj", "{4295C8A9-79B7-4354-8064-F05FB9CA0C96}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {4295C8A9-79B7-4354-8064-F05FB9CA0C96}.Debug|Win32.ActiveCfg = Debug|Win32 + {4295C8A9-79B7-4354-8064-F05FB9CA0C96}.Debug|Win32.Build.0 = Debug|Win32 + {4295C8A9-79B7-4354-8064-F05FB9CA0C96}.Debug|x64.ActiveCfg = Debug|x64 + {4295C8A9-79B7-4354-8064-F05FB9CA0C96}.Debug|x64.Build.0 = Debug|x64 + {4295C8A9-79B7-4354-8064-F05FB9CA0C96}.Release|Win32.ActiveCfg = Release|Win32 + {4295C8A9-79B7-4354-8064-F05FB9CA0C96}.Release|Win32.Build.0 = Release|Win32 + {4295C8A9-79B7-4354-8064-F05FB9CA0C96}.Release|x64.ActiveCfg = Release|x64 + {4295C8A9-79B7-4354-8064-F05FB9CA0C96}.Release|x64.Build.0 = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/tool/git_id/git_id_vc120.sln b/tool/git_id/git_id_vc120.sln new file mode 100644 index 000000000..b66a2b770 --- /dev/null +++ b/tool/git_id/git_id_vc120.sln @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2013 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "git_id", "git_id_vc110.vcxproj", "{AD81BF86-050B-4605-8AF2-03C01967D784}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {AD81BF86-050B-4605-8AF2-03C01967D784}.Debug|Win32.ActiveCfg = Debug|Win32 + {AD81BF86-050B-4605-8AF2-03C01967D784}.Debug|Win32.Build.0 = Debug|Win32 + {AD81BF86-050B-4605-8AF2-03C01967D784}.Release|Win32.ActiveCfg = Release|Win32 + {AD81BF86-050B-4605-8AF2-03C01967D784}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/tool/git_id/git_id_vc120.vcxproj b/tool/git_id/git_id_vc120.vcxproj new file mode 100644 index 000000000..b8815fbe5 --- /dev/null +++ b/tool/git_id/git_id_vc120.vcxproj @@ -0,0 +1,102 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + git_id + {AD81BF86-050B-4605-8AF2-03C01967D784} + git_id + Win32Proj + + + + Application + Unicode + true + v120 + + + Application + Unicode + v120 + + + + + + + + + + + + + $(SolutionDir)$(Configuration)\ + $(Configuration)\ + true + $(SolutionDir)$(Configuration)\ + $(Configuration)\ + false + AllRules.ruleset + + + AllRules.ruleset + + + + + + Disabled + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + true + Console + false + + + MachineX86 + + + + + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + + + Level3 + ProgramDatabase + + + true + Console + true + true + false + + + MachineX86 + + + + + + + + + \ No newline at end of file diff --git a/tool/git_id/git_id_vc120.vcxproj.filters b/tool/git_id/git_id_vc120.vcxproj.filters new file mode 100644 index 000000000..1e584eb51 --- /dev/null +++ b/tool/git_id/git_id_vc120.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + \ No newline at end of file From 457ae94997b9bbacd587a1d3aa8d6aab311bbcc4 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Wed, 7 May 2014 21:53:21 +0200 Subject: [PATCH 1012/1172] [3001] Fix build for CMaNGOS 12661 --- scripts/eastern_kingdoms/karazhan/boss_shade_of_aran.cpp | 2 +- .../icecrown_citadel/boss_deathbringer_saurfang.cpp | 2 +- sd2_revision_nr.h | 2 +- sd2_revision_sql.h | 4 ++-- sql/scriptdev2_script_full.sql | 2 +- sql/updates/r3001_scriptdev2.sql | 1 + 6 files changed, 7 insertions(+), 6 deletions(-) create mode 100644 sql/updates/r3001_scriptdev2.sql diff --git a/scripts/eastern_kingdoms/karazhan/boss_shade_of_aran.cpp b/scripts/eastern_kingdoms/karazhan/boss_shade_of_aran.cpp index d24af685a..cc9a08ec2 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_shade_of_aran.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_shade_of_aran.cpp @@ -206,7 +206,7 @@ struct MANGOS_DLL_DECL boss_aranAI : public ScriptedAI return; // Start drinking when below 20% mana - if (!m_bIsDrinking && m_creature->getPowerType() == POWER_MANA && (m_creature->GetPower(POWER_MANA) * 100 / m_creature->GetMaxPower(POWER_MANA)) < 20) + if (!m_bIsDrinking && m_creature->GetPowerType() == POWER_MANA && (m_creature->GetPower(POWER_MANA) * 100 / m_creature->GetMaxPower(POWER_MANA)) < 20) { if (DoCastSpellIfCan(m_creature, SPELL_MASS_POLYMORPH) == CAST_OK) { diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp index 734b6e5e4..e40446b3f 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp @@ -118,7 +118,7 @@ struct MANGOS_DLL_DECL boss_deathbringer_saurfangAI : public ScriptedAI boss_deathbringer_saurfangAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (instance_icecrown_citadel*)pCreature->GetInstanceData(); - m_powerBloodPower = m_creature->getPowerType(); + m_powerBloodPower = m_creature->GetPowerType(); m_bIsIntroDone = false; Reset(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index eb3c721fe..3e2e5ef05 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3000" + #define SD2_REVISION_NR "3001" #endif // __SD2_REVISION_NR_H__ diff --git a/sd2_revision_sql.h b/sd2_revision_sql.h index f47a90c17..997c33355 100644 --- a/sd2_revision_sql.h +++ b/sd2_revision_sql.h @@ -1,5 +1,5 @@ #ifndef __SD2_REVISION_SQL_H__ #define __SD2_REVISION_SQL_H__ -#define REVISION_DB_SCRIPTDEV2 "required__scriptdev2" -#define REVISION_DB_SD2_MANGOS "required__mangos" + #define REVISION_DB_SCRIPTDEV2 "required__scriptdev2" + #define REVISION_DB_SD2_MANGOS "required__mangos" #endif // __SD2_REVISION_SQL_H__ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 23bae85d4..c84827e65 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -3,7 +3,7 @@ -- DELETE FROM sd2_db_version; -INSERT INTO sd2_db_version (version) VALUES ('ScriptDev2 (for CMaNGOS 12606+) '); +INSERT INTO sd2_db_version (version) VALUES ('ScriptDev2 (for CMaNGOS 12661+) '); -- -- Below contains data for table `script_texts` mainly used in C++ parts. diff --git a/sql/updates/r3001_scriptdev2.sql b/sql/updates/r3001_scriptdev2.sql new file mode 100644 index 000000000..fe6af7f85 --- /dev/null +++ b/sql/updates/r3001_scriptdev2.sql @@ -0,0 +1 @@ +UPDATE sd2_db_version SET version='ScriptDev2 (for CMaNGOS 12661+) '; From 77c4f022fa45173e4d8c5ff279a59b143f481a72 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sat, 10 May 2014 16:14:03 +0200 Subject: [PATCH 1013/1172] [3002] Implement script support for quests 13284 and 13301 Close #81 --- scripts/northrend/icecrown.cpp | 389 ++++++++++++++++++++++++++++++- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 2 + sql/scriptdev2_script_full.sql | 90 ++++++- sql/updates/r3002_mangos.sql | 2 + sql/updates/r3002_scriptdev2.sql | 90 +++++++ 6 files changed, 570 insertions(+), 5 deletions(-) create mode 100644 sql/updates/r3002_mangos.sql create mode 100644 sql/updates/r3002_scriptdev2.sql diff --git a/scripts/northrend/icecrown.cpp b/scripts/northrend/icecrown.cpp index 52987a52f..6d9996bc0 100644 --- a/scripts/northrend/icecrown.cpp +++ b/scripts/northrend/icecrown.cpp @@ -16,20 +16,403 @@ /* ScriptData SDName: Icecrown -SD%Complete: 0 -SDComment: Placeholder +SD%Complete: 100 +SDComment: Quest support: 13284, 13301. SDCategory: Icecrown EndScriptData */ /* ContentData +npc_squad_leader +npc_infantry EndContentData */ #include "precompiled.h" +#include "escort_ai.h" /*###### -## +## npc_squad_leader ######*/ +enum +{ + // yells + SAY_HORDE_SQUAD_RUN = -1001018, + SAY_ALLIANCE_SQUAD_RUN = -1001019, + SAY_SQUAD_AGGRO_1 = -1001020, + SAY_SQUAD_AGGRO_2 = -1001021, + SAY_HORDE_SQUAD_AGGRO_1 = -1001022, + SAY_HORDE_SQUAD_AGGRO_2 = -1001023, + SAY_HORDE_SQUAD_AGGRO_3 = -1001024, + SAY_HORDE_SQUAD_AGGRO_4 = -1001025, + SAY_ALLIANCE_SQUAD_AGGRO_1 = -1001026, + SAY_ALLIANCE_SQUAD_AGGRO_2 = -1001027, + SAY_ALLIANCE_SQUAD_AGGRO_3 = -1001028, + SAY_ALLIANCE_SQUAD_AGGRO_4 = -1001029, + SAY_HORDE_SQUAD_BREAK = -1001030, + SAY_HORDE_SQUAD_BREAK_DONE = -1001031, + SAY_ALLIANCE_SQUAD_BREAK = -1001032, + SAY_ALLIANCE_SQUAD_BREAK_DONE = -1001033, + SAY_EVENT_COMPLETE = -1001034, + SAY_DEFENDER_AGGRO_1 = -1001035, + SAY_DEFENDER_AGGRO_2 = -1001036, + SAY_DEFENDER_AGGRO_3 = -1001037, + SAY_DEFENDER_AGGRO_4 = -1001038, + SAY_DEFENDER_AGGRO_5 = -1001039, + SAY_DEFENDER_AGGRO_6 = -1001040, + SAY_DEFENDER_AGGRO_7 = -1001041, + SAY_DEFENDER_AGGRO_8 = -1001042, + SAY_DEFENDER_AGGRO_9 = -1001043, + + // combat spells + SPELL_CLEAVE = 15496, + SPELL_FROST_SHOT = 12551, + SPELL_ALLIANCE_TROOP_CREDIT = 59677, + SPELL_HORDE_TROOP_CREDIT = 59764, + + NPC_SKYBREAKER_SQUAD_LEADER = 31737, + NPC_SKYBREAKER_INFANTRY = 31701, + NPC_KORKRON_SQUAD_LEADER = 31833, + NPC_KORKRON_INFANTRY = 31832, + NPC_YMIRHEIM_DEFENDER = 31746, + + // quests + QUEST_ID_ASSAULT_BY_GROUND_A = 13284, + QUEST_ID_ASSAULT_BY_GROUND_H = 13301, +}; + +struct MANGOS_DLL_DECL npc_squad_leaderAI : public npc_escortAI +{ + npc_squad_leaderAI(Creature* pCreature) : npc_escortAI(pCreature) { Reset(); } + + uint32 m_uiCleaveTimer; + uint32 m_uiFrostShotTimer; + + void Reset() override + { + m_uiCleaveTimer = urand(3000, 5000); + m_uiFrostShotTimer = urand(1000, 3000); + } + + void Aggro(Unit* pWho) override + { + switch (urand(0, 5)) + { + case 0: DoScriptText(SAY_SQUAD_AGGRO_1, m_creature); break; + case 1: DoScriptText(SAY_SQUAD_AGGRO_2, m_creature); break; + case 2: DoScriptText(m_creature->GetEntry() == NPC_SKYBREAKER_SQUAD_LEADER ? SAY_ALLIANCE_SQUAD_AGGRO_1 : SAY_HORDE_SQUAD_AGGRO_1, m_creature); break; + case 3: DoScriptText(m_creature->GetEntry() == NPC_SKYBREAKER_SQUAD_LEADER ? SAY_ALLIANCE_SQUAD_AGGRO_2 : SAY_HORDE_SQUAD_AGGRO_2, m_creature); break; + case 4: DoScriptText(m_creature->GetEntry() == NPC_SKYBREAKER_SQUAD_LEADER ? SAY_ALLIANCE_SQUAD_AGGRO_3 : SAY_HORDE_SQUAD_AGGRO_3, m_creature); break; + case 5: DoScriptText(m_creature->GetEntry() == NPC_SKYBREAKER_SQUAD_LEADER ? SAY_ALLIANCE_SQUAD_AGGRO_4 : SAY_HORDE_SQUAD_AGGRO_4, m_creature); break; + } + + if (pWho->GetEntry() == NPC_YMIRHEIM_DEFENDER && urand(0, 1)) + { + switch (urand(0, 8)) + { + case 0: DoScriptText(SAY_DEFENDER_AGGRO_1, pWho); break; + case 1: DoScriptText(SAY_DEFENDER_AGGRO_2, pWho); break; + case 2: DoScriptText(SAY_DEFENDER_AGGRO_3, pWho); break; + case 3: DoScriptText(SAY_DEFENDER_AGGRO_4, pWho); break; + case 4: DoScriptText(SAY_DEFENDER_AGGRO_5, pWho); break; + case 5: DoScriptText(SAY_DEFENDER_AGGRO_6, pWho); break; + case 6: DoScriptText(SAY_DEFENDER_AGGRO_7, pWho); break; + case 7: DoScriptText(SAY_DEFENDER_AGGRO_8, pWho); break; + case 8: DoScriptText(SAY_DEFENDER_AGGRO_9, pWho); break; + } + } + } + + void ReceiveAIEvent(AIEventType eventType, Creature* /*pSender*/, Unit* pInvoker, uint32 uiMiscValue) override + { + if (eventType == AI_EVENT_START_ESCORT && pInvoker->GetTypeId() == TYPEID_PLAYER) + { + Start(false, (Player*)pInvoker, GetQuestTemplateStore(uiMiscValue), true); + SendAIEventAround(AI_EVENT_CUSTOM_A, pInvoker, 0, 12.0f); + } + } + + void JustSummoned(Creature* pSummoned) override + { + if (pSummoned->GetEntry() == NPC_YMIRHEIM_DEFENDER) + pSummoned->AI()->AttackStart(m_creature); + } + + void WaypointReached(uint32 uiPointId) override + { + switch (uiPointId) + { + case 2: + SetRun(); + DoScriptText(m_creature->GetEntry() == NPC_SKYBREAKER_SQUAD_LEADER ? SAY_ALLIANCE_SQUAD_RUN : SAY_HORDE_SQUAD_RUN, m_creature); + break; + case 4: + // first horde attack + if (m_creature->GetEntry() == NPC_KORKRON_SQUAD_LEADER) + { + m_creature->SummonCreature(NPC_YMIRHEIM_DEFENDER, 7433.193f, 1838.199f, 402.43f, 0, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 30000); + m_creature->SummonCreature(NPC_YMIRHEIM_DEFENDER, 7441.071f, 1848.997f, 401.03f, 0, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 30000); + m_creature->SummonCreature(NPC_YMIRHEIM_DEFENDER, 7451.976f, 1850.776f, 402.96f, 0, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 30000); + } + break; + case 6: + // first alliance attack + if (m_creature->GetEntry() == NPC_SKYBREAKER_SQUAD_LEADER) + { + m_creature->SummonCreature(NPC_YMIRHEIM_DEFENDER, 7217.792f, 1602.024f, 378.86f, 0, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 30000); + m_creature->SummonCreature(NPC_YMIRHEIM_DEFENDER, 7235.733f, 1597.831f, 381.08f, 0, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 30000); + } + break; + case 9: + // second horde attack + if (m_creature->GetEntry() == NPC_KORKRON_SQUAD_LEADER) + { + m_creature->SummonCreature(NPC_YMIRHEIM_DEFENDER, 7420.511f, 1813.180f, 425.14f, 0, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 30000); + m_creature->SummonCreature(NPC_YMIRHEIM_DEFENDER, 7411.768f, 1784.054f, 427.84f, 0, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 30000); + m_creature->SummonCreature(NPC_YMIRHEIM_DEFENDER, 7418.514f, 1805.596f, 425.50f, 0, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 30000); + } + break; + case 13: + if (m_creature->GetEntry() == NPC_KORKRON_SQUAD_LEADER) + { + DoScriptText(SAY_HORDE_SQUAD_BREAK, m_creature); + m_creature->SetStandState(UNIT_STAND_STATE_KNEEL); + } + break; + case 14: + if (m_creature->GetEntry() == NPC_KORKRON_SQUAD_LEADER) + { + DoScriptText(SAY_HORDE_SQUAD_BREAK_DONE, m_creature); + m_creature->SetStandState(UNIT_STAND_STATE_STAND); + } + break; + case 15: + // second alliance attack + if (m_creature->GetEntry() == NPC_SKYBREAKER_SQUAD_LEADER) + { + m_creature->SummonCreature(NPC_YMIRHEIM_DEFENDER, 7328.375f, 1631.935f, 416.06f, 0, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 30000); + m_creature->SummonCreature(NPC_YMIRHEIM_DEFENDER, 7334.475f, 1618.401f, 412.93f, 0, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 30000); + m_creature->SummonCreature(NPC_YMIRHEIM_DEFENDER, 7341.556f, 1632.023f, 423.01f, 0, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 30000); + } + break; + case 20: + if (m_creature->GetEntry() == NPC_SKYBREAKER_SQUAD_LEADER) + { + DoScriptText(SAY_ALLIANCE_SQUAD_BREAK, m_creature); + m_creature->SetStandState(UNIT_STAND_STATE_KNEEL); + } + break; + case 21: + if (m_creature->GetEntry() == NPC_SKYBREAKER_SQUAD_LEADER) + { + DoScriptText(SAY_ALLIANCE_SQUAD_BREAK_DONE, m_creature); + m_creature->SetStandState(UNIT_STAND_STATE_STAND); + } + break; + case 22: + // horde gate attack + if (m_creature->GetEntry() == NPC_KORKRON_SQUAD_LEADER) + { + m_creature->SummonCreature(NPC_YMIRHEIM_DEFENDER, 7280.229f, 1725.829f, 471.37f, 0, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 30000); + m_creature->SummonCreature(NPC_YMIRHEIM_DEFENDER, 7272.390f, 1732.530f, 472.43f, 0, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 30000); + m_creature->SummonCreature(NPC_YMIRHEIM_DEFENDER, 7285.863f, 1690.997f, 483.35f, 0, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 30000); + m_creature->SummonCreature(NPC_YMIRHEIM_DEFENDER, 7334.487f, 1690.376f, 443.32f, 0, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 30000); + m_creature->SummonCreature(NPC_YMIRHEIM_DEFENDER, 7371.765f, 1699.052f, 442.50f, 0, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 30000); + } + break; + case 25: + // alliance gate attack + if (m_creature->GetEntry() == NPC_SKYBREAKER_SQUAD_LEADER) + { + m_creature->SummonCreature(NPC_YMIRHEIM_DEFENDER, 7205.636f, 1648.500f, 453.59f, 0, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 30000); + m_creature->SummonCreature(NPC_YMIRHEIM_DEFENDER, 7224.602f, 1677.164f, 454.65f, 0, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 30000); + m_creature->SummonCreature(NPC_YMIRHEIM_DEFENDER, 7220.114f, 1667.603f, 451.01f, 0, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 30000); + m_creature->SummonCreature(NPC_YMIRHEIM_DEFENDER, 7220.528f, 1634.114f, 434.81f, 0, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 30000); + m_creature->SummonCreature(NPC_YMIRHEIM_DEFENDER, 7237.092f, 1687.461f, 459.81f, 0, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 30000); + } + break; + case 26: + { + // event complete + if (Player* pPlayer = GetPlayerForEscort()) + m_creature->SetFacingToObject(pPlayer); + DoScriptText(SAY_EVENT_COMPLETE, m_creature); + + // get all the soldiers around + std::list lSoldiersList; + GetCreatureListWithEntryInGrid(lSoldiersList, m_creature, m_creature->GetEntry() == NPC_SKYBREAKER_SQUAD_LEADER ? NPC_SKYBREAKER_INFANTRY : NPC_KORKRON_INFANTRY, 30.0f); + + // for each soldier alive cast the kill credit + for (std::list::const_iterator itr = lSoldiersList.begin(); itr != lSoldiersList.end(); ++itr) + { + if ((*itr) && (*itr)->isAlive()) + { + (*itr)->CastSpell(*itr, (*itr)->GetEntry() == NPC_SKYBREAKER_INFANTRY ? SPELL_ALLIANCE_TROOP_CREDIT : SPELL_HORDE_TROOP_CREDIT, true); + (*itr)->ForcedDespawn(10000); + } + } + + // set to pause and despawn on timer + SetEscortPaused(true); + m_creature->ForcedDespawn(10000); + break; + } + } + } + + void UpdateEscortAI(const uint32 uiDiff) override + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_uiFrostShotTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_FROST_SHOT) == CAST_OK) + m_uiFrostShotTimer = urand(1000, 3000); + } + else + m_uiFrostShotTimer -= uiDiff; + + if (m_uiCleaveTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_CLEAVE) == CAST_OK) + m_uiCleaveTimer = urand(3000, 5000); + } + else + m_uiCleaveTimer -= uiDiff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_npc_squad_leader(Creature* pCreature) +{ + return new npc_squad_leaderAI(pCreature); +} + +bool QuestAccept_npc_squad_leader(Player* pPlayer, Creature* pCreature, const Quest* pQuest) +{ + if (pQuest->GetQuestId() == QUEST_ID_ASSAULT_BY_GROUND_A || pQuest->GetQuestId() == QUEST_ID_ASSAULT_BY_GROUND_H) + { + pCreature->AI()->SendAIEvent(AI_EVENT_START_ESCORT, pPlayer, pCreature, pQuest->GetQuestId()); + return true; + } + + return false; +} + +/*###### +## npc_infantry +######*/ + +enum +{ + SPELL_SHOOT = 15547, + SPELL_HEROIC_STRIKE = 29426, +}; + +struct MANGOS_DLL_DECL npc_infantryAI : public ScriptedAI +{ + npc_infantryAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_bEscortActive = false; + Reset(); + } + + uint32 m_uiShootTimer; + uint32 m_uiHeroicStrikeTimer; + + bool m_bEscortActive; + + ObjectGuid m_squadLeaderGuid; + + void Reset() override + { + m_uiShootTimer = urand(1000, 3000); + m_uiHeroicStrikeTimer = urand(3000, 5000); + } + + void EnterEvadeMode() override + { + m_creature->RemoveAllAurasOnEvade(); + m_creature->DeleteThreatList(); + m_creature->CombatStop(true); + m_creature->LoadCreatureAddon(true); + + m_creature->SetLootRecipient(NULL); + + Reset(); + + if (!m_creature->isAlive()) + return; + + if (m_bEscortActive) + { + if (Creature* pLeader = m_creature->GetMap()->GetCreature(m_squadLeaderGuid)) + m_creature->GetMotionMaster()->MoveFollow(pLeader, m_creature->GetDistance(pLeader), M_PI_F/2 + m_creature->GetAngle(pLeader)); + } + else + m_creature->GetMotionMaster()->MoveTargetedHome(); + } + + void JustRespawned() override + { + m_bEscortActive = false; + } + + void ReceiveAIEvent(AIEventType eventType, Creature* pSender, Unit* /*pInvoker*/, uint32 uiMiscValue) override + { + // start following the squad leader + if (eventType == AI_EVENT_CUSTOM_A && (pSender->GetEntry() == NPC_SKYBREAKER_SQUAD_LEADER || pSender->GetEntry() == NPC_KORKRON_SQUAD_LEADER)) + { + m_creature->SetStandState(UNIT_STAND_STATE_STAND); + m_creature->GetMotionMaster()->MoveFollow(pSender, m_creature->GetDistance(pSender), M_PI_F/2 + m_creature->GetAngle(pSender)); + m_squadLeaderGuid = pSender->GetObjectGuid(); + m_bEscortActive = true; + } + } + + void UpdateAI(const uint32 uiDiff) override + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_uiShootTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_SHOOT) == CAST_OK) + m_uiShootTimer = urand(1000, 3000); + } + else + m_uiShootTimer -= uiDiff; + + if (m_uiHeroicStrikeTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_HEROIC_STRIKE) == CAST_OK) + m_uiHeroicStrikeTimer = urand(3000, 5000); + } + else + m_uiHeroicStrikeTimer -= uiDiff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_npc_infantry(Creature* pCreature) +{ + return new npc_infantryAI(pCreature); +} + void AddSC_icecrown() { + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "npc_squad_leader"; + pNewScript->GetAI = &GetAI_npc_squad_leader; + pNewScript->pQuestAcceptNPC = &QuestAccept_npc_squad_leader; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_infantry"; + pNewScript->GetAI = &GetAI_npc_infantry; + pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 3e2e5ef05..197882432 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3001" + #define SD2_REVISION_NR "3002" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 03daeb80c..68fbf7c33 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -739,6 +739,8 @@ INSERT INTO scripted_areatrigger VALUES (5581,'at_pit_of_saron'); /* ICECROWN */ +UPDATE creature_template SET ScriptName='npc_squad_leader' WHERE entry IN (31737,31833); +UPDATE creature_template SET ScriptName='npc_infantry' WHERE entry IN (31701,31832); /* IRONFORGE */ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index c84827e65..b8fe1e204 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -1102,7 +1102,34 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1001014,'Here we go.',0,0,0,0,'bonker togglevolt SAY_BONKER_GO'), (-1001015,'I AM NOT AN APPETIZER!',0,0,0,0,'bonker togglevolt SAY_BONKER_AGGRO'), (-1001016,'I think it\'s up this way to the left. Let\'s go!',0,0,0,1,'bonker togglevolt SAY_BONKER_LEFT'), -(-1001017,'Ah, fresh air! I can get myself back to the airstrip from here. Be sure to tell Fizzcrank I\'m back and safe. Thanks so much, $N!',0,0,0,1,'sbonker togglevolt SAY_BONKER_COMPLETE'); +(-1001017,'Ah, fresh air! I can get myself back to the airstrip from here. Be sure to tell Fizzcrank I\'m back and safe. Thanks so much, $N!',0,0,0,1,'sbonker togglevolt SAY_BONKER_COMPLETE'), + +(-1001018,'On the move, men!',0,0,0,0,'kor\'kron squad leader SAY_HORDER_RUN'), +(-1001019,'Alright boys, let\'s do this!',0,0,0,0,'skybreaker squad leader SAY_ALLIANCE_RUN'), +(-1001020,'Incoming!',0,1,0,0,'squad leader SAY_AGGRO_1'), +(-1001021,'Ambush!',0,1,0,0,'squad leader SAY_AGGRO_2'), +(-1001022,'For the Horde!',0,1,0,0,'kor\'kron squad leader SAY_HORDE_AGGRO_1'), +(-1001023,'Time for some blood, men!',0,1,0,0,'kor\'kron squad leader SAY_HORDE_AGGRO_2'), +(-1001024,'Vrykul!',0,1,0,0,'kor\'kron squad leader SAY_HORDE_AGGRO_3'), +(-1001025,'Weapons out!',0,1,0,0,'kor\'kron squad leader SAY_HORDE_AGGRO_4'), +(-1001026,'Find some cover!',0,1,0,0,'skybreaker squad leader SAY_ALLIANCE_AGGRO_1'), +(-1001027,'Group up!',0,1,0,0,'skybreaker squad leader SAY_ALLIANCE_AGGRO_2'), +(-1001028,'On your feet, boys!',0,1,0,0,'skybreaker squad leader SAY_ALLIANCE_AGGRO_3'), +(-1001029,'Vrykul attack!',0,1,0,0,'skybreaker squad leader SAY_ALLIANCE_AGGRO_4'), +(-1001030,'Quickly, catch your breaths before we press for the gate!',0,0,0,0,'kor\'kron squad leader SAY_HORDE_BREAK'), +(-1001031,'On your feet, men! Move, move move!',0,0,0,0,'kor\'kron squad leader SAY_HORDE_BREAK_DONE'), +(-1001032,'Nice work! We can only rest a moment.',0,0,0,0,'skybreaker squad leader SAY_ALLIANCE_BREAK'), +(-1001033,'On your feet, boys! Move, move move!',0,0,0,0,'skybreaker squad leader SAY_ALLIANCE_BREAK_DONE'), +(-1001034,'Thanks for keeping us covered back there! We\'ll hold the gate while we wait for reinforcements.',0,0,0,1,'squad leader SAY_EVENT_COMPLETE'), +(-1001035,'Die, maggot!',0,0,0,0,'ymirheim defender SAY_DEFENDER_AGGRO_1'), +(-1001036,'Haraak foln!',0,0,0,0,'ymirheim defender SAY_DEFENDER_AGGRO_2'), +(-1001037,'I spit on you!',0,0,0,0,'ymirheim defender SAY_DEFENDER_AGGRO_3'), +(-1001038,'I will feed you to the dogs!',0,0,0,0,'ymirheim defender SAY_DEFENDER_AGGRO_4'), +(-1001039,'I will take pleasure in gutting you!',0,0,0,0,'ymirheim defender SAY_DEFENDER_AGGRO_5'), +(-1001040,'I\'ll eat your heart!',0,0,0,0,'ymirheim defender SAY_DEFENDER_AGGRO_6'), +(-1001041,'Sniveling pig!',0,0,0,0,'ymirheim defender SAY_DEFENDER_AGGRO_7'), +(-1001042,'Ugglin oo bjorr!',0,0,0,0,'ymirheim defender SAY_DEFENDER_AGGRO_8'), +(-1001043,'You come to die!',0,0,0,0,'ymirheim defender SAY_DEFENDER_AGGRO_9'); -- -1 033 000 SHADOWFANG KEEP INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES @@ -7815,4 +7842,65 @@ INSERT INTO script_waypoint VALUES (25589, 32, 4364.523, 5465.798, 48.661, 10000, 'SAY_BONKER_COMPLETE'), (25589, 33, 4337.198, 5472.948, 46.035, 0, ''); +DELETE FROM script_waypoint WHERE entry=31737; +INSERT INTO script_waypoint VALUES +(31737, 0, 7269.769, 1509.434, 320.903, 0, ''), +(31737, 1, 7258.117, 1526.602, 324.304, 0, ''), +(31737, 2, 7260.972, 1549.837, 335.689, 1000, 'SAY_ALLIANCE_RUN'), +(31737, 3, 7264.854, 1564.689, 341.974, 0, ''), +(31737, 4, 7255.504, 1579.524, 351.389, 0, ''), +(31737, 5, 7246.569, 1583.333, 358.133, 0, ''), +(31737, 6, 7232.839, 1581.032, 367.501, 0, 'first attack'), +(31737, 7, 7223.732, 1580.088, 373.346, 0, ''), +(31737, 8, 7218.684, 1586.349, 377.490, 0, ''), +(31737, 9, 7217.367, 1593.943, 379.455, 0, ''), +(31737, 10, 7225.456, 1598.870, 379.647, 0, ''), +(31737, 11, 7237.810, 1601.123, 381.088, 0, ''), +(31737, 12, 7251.413, 1609.023, 383.766, 0, ''), +(31737, 13, 7265.517, 1611.843, 382.620, 0, ''), +(31737, 14, 7277.738, 1609.804, 383.899, 0, ''), +(31737, 15, 7290.876, 1608.956, 390.451, 0, 'second attack'), +(31737, 16, 7310.857, 1615.485, 400.580, 0, ''), +(31737, 17, 7327.588, 1622.280, 411.449, 0, ''), +(31737, 18, 7343.151, 1629.884, 423.033, 0, ''), +(31737, 19, 7347.384, 1636.286, 428.066, 0, ''), +(31737, 20, 7343.727, 1644.666, 430.427, 8000, 'SAY_ALLIANCE_BREAK'), +(31737, 21, 7343.727, 1644.666, 430.427, 1000, 'SAY_ALLIANCE_BREAK_DONE'), +(31737, 22, 7301.614, 1649.022, 434.578, 0, ''), +(31737, 23, 7291.128, 1653.633, 435.176, 0, ''), +(31737, 24, 7278.780, 1657.080, 434.619, 0, ''), +(31737, 25, 7259.066, 1651.533, 433.942, 0, 'gate attack'), +(31737, 26, 7243.214, 1662.610, 438.890, 0, ''), +(31737, 27, 7211.633, 1684.327, 462.316, 0, 'SAY_EVENT_COMPLETE'); + +DELETE FROM script_waypoint WHERE entry=31833; +INSERT INTO script_waypoint VALUES +(31833, 0, 7504.983, 1806.833, 355.928, 0, ''), +(31833, 1, 7500.186, 1817.217, 355.494, 0, ''), +(31833, 2, 7492.701, 1828.367, 361.420, 1000, 'SAY_HORDER_RUN'), +(31833, 3, 7481.528, 1836.774, 370.704, 0, ''), +(31833, 4, 7463.597, 1840.573, 383.662, 0, 'first attack'), +(31833, 5, 7449.448, 1839.822, 394.694, 0, ''), +(31833, 6, 7432.161, 1847.350, 406.290, 0, ''), +(31833, 7, 7415.067, 1845.623, 419.790, 0, ''), +(31833, 8, 7409.832, 1839.991, 423.997, 0, ''), +(31833, 9, 7403.585, 1822.599, 428.435, 0, 'second attack'), +(31833, 10, 7398.860, 1810.257, 430.373, 0, ''), +(31833, 11, 7396.572, 1789.399, 432.286, 0, ''), +(31833, 12, 7397.816, 1769.238, 432.947, 0, ''), +(31833, 13, 7399.105, 1745.266, 433.108, 8000, 'SAY_HORDE_BREAK'), +(31833, 14, 7399.105, 1745.266, 433.108, 1000, 'SAY_HORDE_BREAK_DONE'), +(31833, 15, 7393.293, 1729.907, 435.058, 0, ''), +(31833, 16, 7385.299, 1720.183, 437.602, 0, ''), +(31833, 17, 7370.189, 1715.580, 442.425, 0, ''), +(31833, 18, 7358.270, 1719.352, 446.378, 0, ''), +(31833, 19, 7348.808, 1723.011, 449.727, 0, ''), +(31833, 20, 7333.273, 1724.842, 453.621, 0, ''), +(31833, 21, 7325.701, 1725.662, 456.896, 0, ''), +(31833, 22, 7319.808, 1725.676, 459.731, 0, 'gate attack'), +(31833, 23, 7308.107, 1726.708, 465.138, 0, ''), +(31833, 24, 7297.754, 1727.792, 467.980, 0, ''), +(31833, 25, 7288.278, 1726.889, 469.816, 0, ''), +(31833, 26, 7278.187, 1722.632, 472.149, 0, ''), +(31833, 27, 7253.084, 1729.579, 474.225, 0, 'SAY_EVENT_COMPLETE'); -- EOF diff --git a/sql/updates/r3002_mangos.sql b/sql/updates/r3002_mangos.sql new file mode 100644 index 000000000..558243cd6 --- /dev/null +++ b/sql/updates/r3002_mangos.sql @@ -0,0 +1,2 @@ +UPDATE creature_template SET ScriptName='npc_squad_leader' WHERE entry IN (31737,31833); +UPDATE creature_template SET ScriptName='npc_infantry' WHERE entry IN (31701,31832); diff --git a/sql/updates/r3002_scriptdev2.sql b/sql/updates/r3002_scriptdev2.sql new file mode 100644 index 000000000..ef3d1c8a3 --- /dev/null +++ b/sql/updates/r3002_scriptdev2.sql @@ -0,0 +1,90 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1001043 AND -1001018; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1001018,'On the move, men!',0,0,0,0,'kor\'kron squad leader SAY_HORDER_RUN'), +(-1001019,'Alright boys, let\'s do this!',0,0,0,0,'skybreaker squad leader SAY_ALLIANCE_RUN'), +(-1001020,'Incoming!',0,1,0,0,'squad leader SAY_AGGRO_1'), +(-1001021,'Ambush!',0,1,0,0,'squad leader SAY_AGGRO_2'), +(-1001022,'For the Horde!',0,1,0,0,'kor\'kron squad leader SAY_HORDE_AGGRO_1'), +(-1001023,'Time for some blood, men!',0,1,0,0,'kor\'kron squad leader SAY_HORDE_AGGRO_2'), +(-1001024,'Vrykul!',0,1,0,0,'kor\'kron squad leader SAY_HORDE_AGGRO_3'), +(-1001025,'Weapons out!',0,1,0,0,'kor\'kron squad leader SAY_HORDE_AGGRO_4'), +(-1001026,'Find some cover!',0,1,0,0,'skybreaker squad leader SAY_ALLIANCE_AGGRO_1'), +(-1001027,'Group up!',0,1,0,0,'skybreaker squad leader SAY_ALLIANCE_AGGRO_2'), +(-1001028,'On your feet, boys!',0,1,0,0,'skybreaker squad leader SAY_ALLIANCE_AGGRO_3'), +(-1001029,'Vrykul attack!',0,1,0,0,'skybreaker squad leader SAY_ALLIANCE_AGGRO_4'), +(-1001030,'Quickly, catch your breaths before we press for the gate!',0,0,0,0,'kor\'kron squad leader SAY_HORDE_BREAK'), +(-1001031,'On your feet, men! Move, move move!',0,0,0,0,'kor\'kron squad leader SAY_HORDE_BREAK_DONE'), +(-1001032,'Nice work! We can only rest a moment.',0,0,0,0,'skybreaker squad leader SAY_ALLIANCE_BREAK'), +(-1001033,'On your feet, boys! Move, move move!',0,0,0,0,'skybreaker squad leader SAY_ALLIANCE_BREAK_DONE'), +(-1001034,'Thanks for keeping us covered back there! We\'ll hold the gate while we wait for reinforcements.',0,0,0,1,'squad leader SAY_EVENT_COMPLETE'), +(-1001035,'Die, maggot!',0,0,0,0,'ymirheim defender SAY_DEFENDER_AGGRO_1'), +(-1001036,'Haraak foln!',0,0,0,0,'ymirheim defender SAY_DEFENDER_AGGRO_2'), +(-1001037,'I spit on you!',0,0,0,0,'ymirheim defender SAY_DEFENDER_AGGRO_3'), +(-1001038,'I will feed you to the dogs!',0,0,0,0,'ymirheim defender SAY_DEFENDER_AGGRO_4'), +(-1001039,'I will take pleasure in gutting you!',0,0,0,0,'ymirheim defender SAY_DEFENDER_AGGRO_5'), +(-1001040,'I\'ll eat your heart!',0,0,0,0,'ymirheim defender SAY_DEFENDER_AGGRO_6'), +(-1001041,'Sniveling pig!',0,0,0,0,'ymirheim defender SAY_DEFENDER_AGGRO_7'), +(-1001042,'Ugglin oo bjorr!',0,0,0,0,'ymirheim defender SAY_DEFENDER_AGGRO_8'), +(-1001043,'You come to die!',0,0,0,0,'ymirheim defender SAY_DEFENDER_AGGRO_9'); + +DELETE FROM script_waypoint WHERE entry=31737; +INSERT INTO script_waypoint VALUES +(31737, 0, 7269.769, 1509.434, 320.903, 0, ''), +(31737, 1, 7258.117, 1526.602, 324.304, 0, ''), +(31737, 2, 7260.972, 1549.837, 335.689, 1000, 'SAY_ALLIANCE_RUN'), +(31737, 3, 7264.854, 1564.689, 341.974, 0, ''), +(31737, 4, 7255.504, 1579.524, 351.389, 0, ''), +(31737, 5, 7246.569, 1583.333, 358.133, 0, ''), +(31737, 6, 7232.839, 1581.032, 367.501, 0, 'first attack'), +(31737, 7, 7223.732, 1580.088, 373.346, 0, ''), +(31737, 8, 7218.684, 1586.349, 377.490, 0, ''), +(31737, 9, 7217.367, 1593.943, 379.455, 0, ''), +(31737, 10, 7225.456, 1598.870, 379.647, 0, ''), +(31737, 11, 7237.810, 1601.123, 381.088, 0, ''), +(31737, 12, 7251.413, 1609.023, 383.766, 0, ''), +(31737, 13, 7265.517, 1611.843, 382.620, 0, ''), +(31737, 14, 7277.738, 1609.804, 383.899, 0, ''), +(31737, 15, 7290.876, 1608.956, 390.451, 0, 'second attack'), +(31737, 16, 7310.857, 1615.485, 400.580, 0, ''), +(31737, 17, 7327.588, 1622.280, 411.449, 0, ''), +(31737, 18, 7343.151, 1629.884, 423.033, 0, ''), +(31737, 19, 7347.384, 1636.286, 428.066, 0, ''), +(31737, 20, 7343.727, 1644.666, 430.427, 8000, 'SAY_ALLIANCE_BREAK'), +(31737, 21, 7343.727, 1644.666, 430.427, 1000, 'SAY_ALLIANCE_BREAK_DONE'), +(31737, 22, 7301.614, 1649.022, 434.578, 0, ''), +(31737, 23, 7291.128, 1653.633, 435.176, 0, ''), +(31737, 24, 7278.780, 1657.080, 434.619, 0, ''), +(31737, 25, 7259.066, 1651.533, 433.942, 0, 'gate attack'), +(31737, 26, 7243.214, 1662.610, 438.890, 0, ''), +(31737, 27, 7211.633, 1684.327, 462.316, 0, 'SAY_EVENT_COMPLETE'); + +DELETE FROM script_waypoint WHERE entry=31833; +INSERT INTO script_waypoint VALUES +(31833, 0, 7504.983, 1806.833, 355.928, 0, ''), +(31833, 1, 7500.186, 1817.217, 355.494, 0, ''), +(31833, 2, 7492.701, 1828.367, 361.420, 1000, 'SAY_HORDER_RUN'), +(31833, 3, 7481.528, 1836.774, 370.704, 0, ''), +(31833, 4, 7463.597, 1840.573, 383.662, 0, 'first attack'), +(31833, 5, 7449.448, 1839.822, 394.694, 0, ''), +(31833, 6, 7432.161, 1847.350, 406.290, 0, ''), +(31833, 7, 7415.067, 1845.623, 419.790, 0, ''), +(31833, 8, 7409.832, 1839.991, 423.997, 0, ''), +(31833, 9, 7403.585, 1822.599, 428.435, 0, 'second attack'), +(31833, 10, 7398.860, 1810.257, 430.373, 0, ''), +(31833, 11, 7396.572, 1789.399, 432.286, 0, ''), +(31833, 12, 7397.816, 1769.238, 432.947, 0, ''), +(31833, 13, 7399.105, 1745.266, 433.108, 8000, 'SAY_HORDE_BREAK'), +(31833, 14, 7399.105, 1745.266, 433.108, 1000, 'SAY_HORDE_BREAK_DONE'), +(31833, 15, 7393.293, 1729.907, 435.058, 0, ''), +(31833, 16, 7385.299, 1720.183, 437.602, 0, ''), +(31833, 17, 7370.189, 1715.580, 442.425, 0, ''), +(31833, 18, 7358.270, 1719.352, 446.378, 0, ''), +(31833, 19, 7348.808, 1723.011, 449.727, 0, ''), +(31833, 20, 7333.273, 1724.842, 453.621, 0, ''), +(31833, 21, 7325.701, 1725.662, 456.896, 0, ''), +(31833, 22, 7319.808, 1725.676, 459.731, 0, 'gate attack'), +(31833, 23, 7308.107, 1726.708, 465.138, 0, ''), +(31833, 24, 7297.754, 1727.792, 467.980, 0, ''), +(31833, 25, 7288.278, 1726.889, 469.816, 0, ''), +(31833, 26, 7278.187, 1722.632, 472.149, 0, ''), +(31833, 27, 7253.084, 1729.579, 474.225, 0, 'SAY_EVENT_COMPLETE'); From 96134d29f6f1b24fd8d4a9db4c37258636d3ccdd Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sat, 10 May 2014 16:27:56 +0200 Subject: [PATCH 1014/1172] [3003] Update Authorship information to the new standard Thanks to @NeatElves for providing the base patch Close #100 --- AUTHORS.md | 130 ++++++++++++++++++ CMakeLists.txt | 2 +- README | 2 +- ScriptMgr.cpp | 2 +- ScriptMgr.h | 2 +- base/escort_ai.cpp | 2 +- base/escort_ai.h | 2 +- base/follower_ai.cpp | 2 +- base/follower_ai.h | 2 +- base/guard_ai.cpp | 2 +- base/guard_ai.h | 2 +- base/pet_ai.cpp | 2 +- base/pet_ai.h | 2 +- config.h | 2 +- config.h.in | 2 +- include/precompiled.cpp | 2 +- include/precompiled.h | 2 +- include/sc_creature.cpp | 2 +- include/sc_creature.h | 2 +- include/sc_gossip.h | 2 +- include/sc_grid_searchers.cpp | 2 +- include/sc_grid_searchers.h | 2 +- include/sc_instance.cpp | 2 +- include/sc_instance.h | 2 +- scripts/battlegrounds/battleground.cpp | 2 +- .../eastern_kingdoms/alterac_mountains.cpp | 2 +- scripts/eastern_kingdoms/arathi_highlands.cpp | 2 +- .../blackrock_depths/blackrock_depths.cpp | 2 +- .../blackrock_depths/blackrock_depths.h | 2 +- .../boss_ambassador_flamelash.cpp | 2 +- .../blackrock_depths/boss_coren_direbrew.cpp | 2 +- .../boss_emperor_dagran_thaurissan.cpp | 2 +- .../boss_general_angerforge.cpp | 2 +- .../boss_high_interrogator_gerstahn.cpp | 2 +- .../instance_blackrock_depths.cpp | 2 +- .../blackrock_spire/blackrock_spire.h | 2 +- .../blackrock_spire/boss_gyth.cpp | 2 +- .../boss_overlord_wyrmthalak.cpp | 2 +- .../boss_pyroguard_emberseer.cpp | 2 +- .../instance_blackrock_spire.cpp | 2 +- .../blackwing_lair/blackwing_lair.h | 2 +- .../boss_broodlord_lashlayer.cpp | 2 +- .../blackwing_lair/boss_chromaggus.cpp | 2 +- .../blackwing_lair/boss_ebonroc.cpp | 2 +- .../blackwing_lair/boss_firemaw.cpp | 2 +- .../blackwing_lair/boss_flamegor.cpp | 2 +- .../blackwing_lair/boss_nefarian.cpp | 2 +- .../blackwing_lair/boss_razorgore.cpp | 2 +- .../blackwing_lair/boss_vaelastrasz.cpp | 2 +- .../blackwing_lair/boss_victor_nefarius.cpp | 2 +- .../instance_blackwing_lair.cpp | 2 +- scripts/eastern_kingdoms/blasted_lands.cpp | 2 +- scripts/eastern_kingdoms/burning_steppes.cpp | 2 +- .../deadmines/boss_mr_smite.cpp | 2 +- .../eastern_kingdoms/deadmines/deadmines.cpp | 2 +- .../eastern_kingdoms/deadmines/deadmines.h | 2 +- .../deadmines/instance_deadmines.cpp | 2 +- scripts/eastern_kingdoms/dun_morogh.cpp | 2 +- .../eastern_kingdoms/eastern_plaguelands.cpp | 2 +- scripts/eastern_kingdoms/elwynn_forest.cpp | 2 +- scripts/eastern_kingdoms/eversong_woods.cpp | 2 +- scripts/eastern_kingdoms/ghostlands.cpp | 2 +- .../gnomeregan/boss_thermaplugg.cpp | 2 +- .../gnomeregan/gnomeregan.cpp | 2 +- .../eastern_kingdoms/gnomeregan/gnomeregan.h | 2 +- .../gnomeregan/instance_gnomeregan.cpp | 2 +- scripts/eastern_kingdoms/hinterlands.cpp | 2 +- scripts/eastern_kingdoms/ironforge.cpp | 2 +- .../eastern_kingdoms/isle_of_queldanas.cpp | 2 +- .../karazhan/boss_curator.cpp | 2 +- .../karazhan/boss_maiden_of_virtue.cpp | 2 +- .../karazhan/boss_midnight.cpp | 2 +- .../eastern_kingdoms/karazhan/boss_moroes.cpp | 2 +- .../karazhan/boss_netherspite.cpp | 2 +- .../karazhan/boss_nightbane.cpp | 2 +- .../karazhan/boss_prince_malchezaar.cpp | 2 +- .../karazhan/boss_shade_of_aran.cpp | 2 +- .../karazhan/boss_terestian_illhoof.cpp | 2 +- .../karazhan/bosses_opera.cpp | 2 +- .../eastern_kingdoms/karazhan/chess_event.cpp | 2 +- .../karazhan/instance_karazhan.cpp | 2 +- .../eastern_kingdoms/karazhan/karazhan.cpp | 2 +- scripts/eastern_kingdoms/karazhan/karazhan.h | 2 +- scripts/eastern_kingdoms/loch_modan.cpp | 2 +- .../boss_felblood_kaelthas.cpp | 2 +- .../boss_priestess_delrissa.cpp | 2 +- .../boss_selin_fireheart.cpp | 2 +- .../magisters_terrace/boss_vexallus.cpp | 2 +- .../instance_magisters_terrace.cpp | 2 +- .../magisters_terrace/magisters_terrace.cpp | 2 +- .../magisters_terrace/magisters_terrace.h | 2 +- .../molten_core/boss_baron_geddon.cpp | 2 +- .../molten_core/boss_garr.cpp | 2 +- .../molten_core/boss_gehennas.cpp | 2 +- .../molten_core/boss_golemagg.cpp | 2 +- .../molten_core/boss_lucifron.cpp | 2 +- .../molten_core/boss_magmadar.cpp | 2 +- .../molten_core/boss_majordomo_executus.cpp | 2 +- .../molten_core/boss_ragnaros.cpp | 2 +- .../molten_core/boss_shazzrah.cpp | 2 +- .../molten_core/boss_sulfuron_harbinger.cpp | 2 +- .../molten_core/instance_molten_core.cpp | 2 +- .../molten_core/molten_core.cpp | 2 +- .../molten_core/molten_core.h | 2 +- .../eastern_kingdoms/redridge_mountains.cpp | 2 +- .../scarlet_enclave/ebon_hold.cpp | 2 +- .../scarlet_enclave/world_map_ebon_hold.cpp | 2 +- .../scarlet_enclave/world_map_ebon_hold.h | 2 +- .../scarlet_monastery/boss_arcanist_doan.cpp | 2 +- .../boss_headless_horseman.cpp | 2 +- .../scarlet_monastery/boss_herod.cpp | 2 +- .../boss_mograine_and_whitemane.cpp | 2 +- .../instance_scarlet_monastery.cpp | 2 +- .../scarlet_monastery/scarlet_monastery.h | 2 +- .../scholomance/boss_darkmaster_gandling.cpp | 2 +- .../scholomance/boss_jandice_barov.cpp | 2 +- .../scholomance/instance_scholomance.cpp | 2 +- .../scholomance/scholomance.h | 2 +- scripts/eastern_kingdoms/searing_gorge.cpp | 2 +- .../shadowfang_keep/boss_hummel.cpp | 2 +- .../instance_shadowfang_keep.cpp | 2 +- .../shadowfang_keep/shadowfang_keep.cpp | 2 +- .../shadowfang_keep/shadowfang_keep.h | 2 +- scripts/eastern_kingdoms/silvermoon_city.cpp | 2 +- .../eastern_kingdoms/silverpine_forest.cpp | 2 +- scripts/eastern_kingdoms/stormwind_city.cpp | 2 +- .../eastern_kingdoms/stranglethorn_vale.cpp | 2 +- .../stratholme/boss_baroness_anastari.cpp | 2 +- .../stratholme/boss_cannon_master_willey.cpp | 2 +- .../stratholme/boss_dathrohan_balnazzar.cpp | 2 +- .../stratholme/boss_maleki_the_pallid.cpp | 2 +- .../stratholme/boss_order_of_silver_hand.cpp | 2 +- .../stratholme/instance_stratholme.cpp | 2 +- .../stratholme/stratholme.cpp | 2 +- .../eastern_kingdoms/stratholme/stratholme.h | 2 +- .../sunken_temple/instance_sunken_temple.cpp | 2 +- .../sunken_temple/sunken_temple.cpp | 2 +- .../sunken_temple/sunken_temple.h | 2 +- .../sunwell_plateau/boss_brutallus.cpp | 2 +- .../sunwell_plateau/boss_eredar_twins.cpp | 2 +- .../sunwell_plateau/boss_felmyst.cpp | 2 +- .../sunwell_plateau/boss_kalecgos.cpp | 2 +- .../sunwell_plateau/boss_kiljaeden.cpp | 2 +- .../sunwell_plateau/boss_muru.cpp | 2 +- .../instance_sunwell_plateau.cpp | 2 +- .../sunwell_plateau/sunwell_plateau.h | 2 +- scripts/eastern_kingdoms/swamp_of_sorrows.cpp | 2 +- scripts/eastern_kingdoms/tirisfal_glades.cpp | 2 +- .../uldaman/boss_archaedas.cpp | 2 +- .../uldaman/instance_uldaman.cpp | 2 +- scripts/eastern_kingdoms/uldaman/uldaman.cpp | 2 +- scripts/eastern_kingdoms/uldaman/uldaman.h | 2 +- scripts/eastern_kingdoms/undercity.cpp | 2 +- .../eastern_kingdoms/western_plaguelands.cpp | 2 +- scripts/eastern_kingdoms/westfall.cpp | 2 +- scripts/eastern_kingdoms/wetlands.cpp | 2 +- .../eastern_kingdoms/zulaman/boss_akilzon.cpp | 2 +- .../eastern_kingdoms/zulaman/boss_halazzi.cpp | 2 +- .../eastern_kingdoms/zulaman/boss_janalai.cpp | 2 +- .../zulaman/boss_malacrass.cpp | 2 +- .../zulaman/boss_nalorakk.cpp | 2 +- .../eastern_kingdoms/zulaman/boss_zuljin.cpp | 2 +- .../zulaman/instance_zulaman.cpp | 2 +- scripts/eastern_kingdoms/zulaman/zulaman.cpp | 2 +- scripts/eastern_kingdoms/zulaman/zulaman.h | 2 +- .../eastern_kingdoms/zulgurub/boss_arlokk.cpp | 2 +- .../eastern_kingdoms/zulgurub/boss_hakkar.cpp | 2 +- .../zulgurub/boss_hazzarah.cpp | 2 +- .../eastern_kingdoms/zulgurub/boss_jeklik.cpp | 2 +- .../eastern_kingdoms/zulgurub/boss_jindo.cpp | 2 +- .../zulgurub/boss_mandokir.cpp | 2 +- .../eastern_kingdoms/zulgurub/boss_marli.cpp | 2 +- .../zulgurub/boss_renataki.cpp | 2 +- .../eastern_kingdoms/zulgurub/boss_thekal.cpp | 2 +- .../zulgurub/boss_venoxis.cpp | 2 +- .../zulgurub/instance_zulgurub.cpp | 2 +- scripts/eastern_kingdoms/zulgurub/zulgurub.h | 2 +- scripts/examples/example_creature.cpp | 2 +- scripts/examples/example_escort.cpp | 2 +- scripts/examples/example_gossip_codebox.cpp | 2 +- scripts/examples/example_misc.cpp | 2 +- scripts/kalimdor/ashenvale.cpp | 2 +- scripts/kalimdor/azshara.cpp | 2 +- scripts/kalimdor/azuremyst_isle.cpp | 2 +- .../blackfathom_deeps/blackfathom_deeps.h | 2 +- .../instance_blackfathom_deeps.cpp | 2 +- scripts/kalimdor/bloodmyst_isle.cpp | 2 +- scripts/kalimdor/boss_azuregos.cpp | 2 +- .../culling_of_stratholme.cpp | 2 +- .../culling_of_stratholme.h | 2 +- .../instance_culling_of_stratholme.cpp | 2 +- .../dark_portal/boss_aeonus.cpp | 2 +- .../dark_portal/boss_chrono_lord_deja.cpp | 2 +- .../dark_portal/boss_temporus.cpp | 2 +- .../dark_portal/dark_portal.cpp | 2 +- .../caverns_of_time/dark_portal/dark_portal.h | 2 +- .../dark_portal/instance_dark_portal.cpp | 2 +- .../caverns_of_time/hyjal/boss_archimonde.cpp | 2 +- .../kalimdor/caverns_of_time/hyjal/hyjal.cpp | 2 +- .../kalimdor/caverns_of_time/hyjal/hyjal.h | 2 +- .../caverns_of_time/hyjal/hyjalAI.cpp | 2 +- .../kalimdor/caverns_of_time/hyjal/hyjalAI.h | 2 +- .../caverns_of_time/hyjal/instance_hyjal.cpp | 2 +- .../old_hillsbrad/instance_old_hillsbrad.cpp | 2 +- .../old_hillsbrad/old_hillsbrad.cpp | 2 +- .../old_hillsbrad/old_hillsbrad.h | 2 +- scripts/kalimdor/darkshore.cpp | 2 +- scripts/kalimdor/desolace.cpp | 2 +- scripts/kalimdor/dire_maul/dire_maul.cpp | 2 +- scripts/kalimdor/dire_maul/dire_maul.h | 2 +- .../kalimdor/dire_maul/instance_dire_maul.cpp | 2 +- scripts/kalimdor/durotar.cpp | 2 +- scripts/kalimdor/dustwallow_marsh.cpp | 2 +- scripts/kalimdor/felwood.cpp | 2 +- scripts/kalimdor/feralas.cpp | 2 +- scripts/kalimdor/maraudon/boss_noxxion.cpp | 2 +- scripts/kalimdor/moonglade.cpp | 2 +- scripts/kalimdor/mulgore.cpp | 2 +- scripts/kalimdor/onyxias_lair/boss_onyxia.cpp | 2 +- .../onyxias_lair/instance_onyxias_lair.cpp | 2 +- scripts/kalimdor/onyxias_lair/onyxias_lair.h | 2 +- scripts/kalimdor/orgrimmar.cpp | 2 +- .../razorfen_downs/razorfen_downs.cpp | 2 +- .../instance_razorfen_kraul.cpp | 2 +- .../razorfen_kraul/razorfen_kraul.cpp | 2 +- .../kalimdor/razorfen_kraul/razorfen_kraul.h | 2 +- .../ruins_of_ahnqiraj/boss_ayamiss.cpp | 2 +- .../kalimdor/ruins_of_ahnqiraj/boss_buru.cpp | 2 +- .../ruins_of_ahnqiraj/boss_kurinnaxx.cpp | 2 +- .../kalimdor/ruins_of_ahnqiraj/boss_moam.cpp | 2 +- .../ruins_of_ahnqiraj/boss_ossirian.cpp | 2 +- .../ruins_of_ahnqiraj/boss_rajaxx.cpp | 2 +- .../instance_ruins_of_ahnqiraj.cpp | 2 +- .../ruins_of_ahnqiraj/ruins_of_ahnqiraj.cpp | 2 +- .../ruins_of_ahnqiraj/ruins_of_ahnqiraj.h | 2 +- scripts/kalimdor/silithus.cpp | 2 +- scripts/kalimdor/stonetalon_mountains.cpp | 2 +- scripts/kalimdor/tanaris.cpp | 2 +- scripts/kalimdor/teldrassil.cpp | 2 +- .../temple_of_ahnqiraj/boss_bug_trio.cpp | 2 +- .../temple_of_ahnqiraj/boss_cthun.cpp | 2 +- .../temple_of_ahnqiraj/boss_fankriss.cpp | 2 +- .../temple_of_ahnqiraj/boss_huhuran.cpp | 2 +- .../kalimdor/temple_of_ahnqiraj/boss_ouro.cpp | 2 +- .../temple_of_ahnqiraj/boss_sartura.cpp | 2 +- .../temple_of_ahnqiraj/boss_skeram.cpp | 2 +- .../temple_of_ahnqiraj/boss_twinemperors.cpp | 2 +- .../temple_of_ahnqiraj/boss_viscidus.cpp | 2 +- .../instance_temple_of_ahnqiraj.cpp | 2 +- .../mob_anubisath_sentinel.cpp | 2 +- .../temple_of_ahnqiraj/temple_of_ahnqiraj.h | 2 +- scripts/kalimdor/the_barrens.cpp | 2 +- scripts/kalimdor/thousand_needles.cpp | 2 +- scripts/kalimdor/thunder_bluff.cpp | 2 +- scripts/kalimdor/ungoro_crater.cpp | 2 +- .../instance_wailing_caverns.cpp | 2 +- .../wailing_caverns/wailing_caverns.cpp | 2 +- .../wailing_caverns/wailing_caverns.h | 2 +- scripts/kalimdor/winterspring.cpp | 2 +- scripts/kalimdor/zulfarrak/boss_zumrah.cpp | 2 +- .../kalimdor/zulfarrak/instance_zulfarrak.cpp | 2 +- scripts/kalimdor/zulfarrak/zulfarrak.cpp | 2 +- scripts/kalimdor/zulfarrak/zulfarrak.h | 2 +- .../northrend/azjol-nerub/ahnkahet/ahnkahet.h | 2 +- .../azjol-nerub/ahnkahet/boss_amanitar.cpp | 2 +- .../azjol-nerub/ahnkahet/boss_jedoga.cpp | 2 +- .../azjol-nerub/ahnkahet/boss_nadox.cpp | 2 +- .../azjol-nerub/ahnkahet/boss_taldaram.cpp | 2 +- .../azjol-nerub/ahnkahet/boss_volazj.cpp | 2 +- .../ahnkahet/instance_ahnkahet.cpp | 2 +- .../azjol-nerub/azjol-nerub/azjol-nerub.h | 2 +- .../azjol-nerub/azjol-nerub/boss_anubarak.cpp | 2 +- .../azjol-nerub/azjol-nerub/boss_hadronox.cpp | 2 +- .../azjol-nerub/azjol-nerub/boss_krikthir.cpp | 2 +- .../azjol-nerub/instance_azjol-nerub.cpp | 2 +- scripts/northrend/borean_tundra.cpp | 2 +- .../boss_grand_champions.cpp | 2 +- .../instance_trial_of_the_champion.cpp | 2 +- .../trial_of_the_champion.cpp | 2 +- .../trial_of_the_champion.h | 2 +- .../boss_anubarak_trial.cpp | 2 +- .../boss_faction_champions.cpp | 2 +- .../trial_of_the_crusader/boss_jaraxxus.cpp | 2 +- .../boss_northrend_beasts.cpp | 2 +- .../boss_twin_valkyr.cpp | 2 +- .../instance_trial_of_the_crusader.cpp | 2 +- .../trial_of_the_crusader.cpp | 2 +- .../trial_of_the_crusader.h | 2 +- scripts/northrend/dalaran.cpp | 2 +- scripts/northrend/dragonblight.cpp | 2 +- .../northrend/draktharon_keep/boss_novos.cpp | 2 +- .../draktharon_keep/boss_tharonja.cpp | 2 +- .../draktharon_keep/boss_trollgore.cpp | 2 +- .../draktharon_keep/draktharon_keep.h | 2 +- .../instance_draktharon_keep.cpp | 2 +- scripts/northrend/grizzly_hills.cpp | 2 +- scripts/northrend/gundrak/boss_colossus.cpp | 2 +- scripts/northrend/gundrak/boss_eck.cpp | 2 +- scripts/northrend/gundrak/boss_galdarah.cpp | 2 +- scripts/northrend/gundrak/boss_moorabi.cpp | 2 +- scripts/northrend/gundrak/boss_sladran.cpp | 2 +- scripts/northrend/gundrak/gundrak.h | 2 +- .../northrend/gundrak/instance_gundrak.cpp | 2 +- scripts/northrend/howling_fjord.cpp | 2 +- scripts/northrend/icecrown.cpp | 2 +- .../forge_of_souls/boss_bronjahm.cpp | 2 +- .../forge_of_souls/boss_devourer_of_souls.cpp | 2 +- .../forge_of_souls/forge_of_souls.h | 2 +- .../instance_forge_of_souls.cpp | 2 +- .../halls_of_reflection/boss_falric.cpp | 2 +- .../halls_of_reflection/boss_lich_king.cpp | 2 +- .../halls_of_reflection/boss_marwyn.cpp | 2 +- .../halls_of_reflection.cpp | 2 +- .../halls_of_reflection/halls_of_reflection.h | 2 +- .../instance_halls_of_reflection.cpp | 2 +- .../boss_forgemaster_garfrost.cpp | 2 +- .../pit_of_saron/boss_krick_and_ick.cpp | 2 +- .../boss_scourgelord_tyrannus.cpp | 2 +- .../pit_of_saron/instance_pit_of_saron.cpp | 2 +- .../pit_of_saron/pit_of_saron.cpp | 2 +- .../frozen_halls/pit_of_saron/pit_of_saron.h | 2 +- .../icecrown_citadel/blood_prince_council.cpp | 2 +- .../boss_blood_queen_lanathel.cpp | 2 +- .../boss_deathbringer_saurfang.cpp | 2 +- .../icecrown_citadel/boss_festergut.cpp | 2 +- .../boss_lady_deathwhisper.cpp | 2 +- .../icecrown_citadel/boss_lord_marrowgar.cpp | 2 +- .../boss_professor_putricide.cpp | 2 +- .../icecrown_citadel/boss_rotface.cpp | 2 +- .../icecrown_citadel/boss_sindragosa.cpp | 2 +- .../icecrown_citadel/boss_the_lich_king.cpp | 2 +- .../boss_valithria_dreamwalker.cpp | 2 +- .../icecrown_citadel/gunship_battle.cpp | 2 +- .../icecrown_citadel/icecrown_citadel.h | 2 +- .../instance_icecrown_citadel.cpp | 2 +- .../northrend/naxxramas/boss_anubrekhan.cpp | 2 +- scripts/northrend/naxxramas/boss_faerlina.cpp | 2 +- .../naxxramas/boss_four_horsemen.cpp | 2 +- scripts/northrend/naxxramas/boss_gluth.cpp | 2 +- scripts/northrend/naxxramas/boss_gothik.cpp | 2 +- .../northrend/naxxramas/boss_grobbulus.cpp | 2 +- scripts/northrend/naxxramas/boss_heigan.cpp | 2 +- .../northrend/naxxramas/boss_kelthuzad.cpp | 2 +- scripts/northrend/naxxramas/boss_loatheb.cpp | 2 +- scripts/northrend/naxxramas/boss_maexxna.cpp | 2 +- scripts/northrend/naxxramas/boss_noth.cpp | 2 +- .../northrend/naxxramas/boss_patchwerk.cpp | 2 +- .../northrend/naxxramas/boss_razuvious.cpp | 2 +- .../northrend/naxxramas/boss_sapphiron.cpp | 2 +- scripts/northrend/naxxramas/boss_thaddius.cpp | 2 +- .../naxxramas/instance_naxxramas.cpp | 2 +- scripts/northrend/naxxramas/naxxramas.h | 2 +- .../nexus/eye_of_eternity/boss_malygos.cpp | 2 +- .../nexus/eye_of_eternity/eye_of_eternity.h | 2 +- .../instance_eye_of_eternity.cpp | 2 +- .../northrend/nexus/nexus/boss_anomalus.cpp | 2 +- .../nexus/nexus/boss_keristrasza.cpp | 2 +- .../northrend/nexus/nexus/boss_ormorok.cpp | 2 +- .../northrend/nexus/nexus/boss_telestra.cpp | 2 +- .../northrend/nexus/nexus/instance_nexus.cpp | 2 +- scripts/northrend/nexus/nexus/nexus.h | 2 +- .../northrend/nexus/oculus/boss_eregos.cpp | 2 +- scripts/northrend/nexus/oculus/boss_urom.cpp | 2 +- scripts/northrend/nexus/oculus/boss_varos.cpp | 2 +- .../nexus/oculus/instance_oculus.cpp | 2 +- scripts/northrend/nexus/oculus/oculus.cpp | 2 +- scripts/northrend/nexus/oculus/oculus.h | 2 +- .../obsidian_sanctum/boss_sartharion.cpp | 2 +- .../instance_obsidian_sanctum.cpp | 2 +- .../obsidian_sanctum/obsidian_sanctum.h | 2 +- .../northrend/ruby_sanctum/boss_baltharus.cpp | 2 +- .../northrend/ruby_sanctum/boss_halion.cpp | 2 +- .../northrend/ruby_sanctum/boss_saviana.cpp | 2 +- .../ruby_sanctum/boss_zarithrian.cpp | 2 +- .../ruby_sanctum/instance_ruby_sanctum.cpp | 2 +- scripts/northrend/ruby_sanctum/ruby_sanctum.h | 2 +- scripts/northrend/sholazar_basin.cpp | 2 +- scripts/northrend/storm_peaks.cpp | 2 +- .../halls_of_lightning/boss_bjarngrim.cpp | 2 +- .../ulduar/halls_of_lightning/boss_ionar.cpp | 2 +- .../ulduar/halls_of_lightning/boss_loken.cpp | 2 +- .../halls_of_lightning/boss_volkhan.cpp | 2 +- .../halls_of_lightning/halls_of_lightning.h | 2 +- .../instance_halls_of_lightning.cpp | 2 +- .../halls_of_stone/boss_maiden_of_grief.cpp | 2 +- .../ulduar/halls_of_stone/boss_sjonnir.cpp | 2 +- .../ulduar/halls_of_stone/halls_of_stone.cpp | 2 +- .../ulduar/halls_of_stone/halls_of_stone.h | 2 +- .../instance_halls_of_stone.cpp | 2 +- .../ulduar/ulduar/assembly_of_iron.cpp | 2 +- .../northrend/ulduar/ulduar/boss_algalon.cpp | 2 +- .../northrend/ulduar/ulduar/boss_auriaya.cpp | 2 +- .../ulduar/ulduar/boss_flame_leviathan.cpp | 2 +- .../northrend/ulduar/ulduar/boss_freya.cpp | 2 +- .../ulduar/ulduar/boss_general_vezax.cpp | 2 +- .../northrend/ulduar/ulduar/boss_hodir.cpp | 2 +- .../northrend/ulduar/ulduar/boss_ignis.cpp | 2 +- .../northrend/ulduar/ulduar/boss_kologarn.cpp | 2 +- .../northrend/ulduar/ulduar/boss_mimiron.cpp | 2 +- .../ulduar/ulduar/boss_razorscale.cpp | 2 +- .../northrend/ulduar/ulduar/boss_thorim.cpp | 2 +- .../northrend/ulduar/ulduar/boss_xt_002.cpp | 2 +- .../ulduar/ulduar/boss_yogg_saron.cpp | 2 +- .../ulduar/ulduar/instance_ulduar.cpp | 2 +- scripts/northrend/ulduar/ulduar/ulduar.cpp | 2 +- scripts/northrend/ulduar/ulduar/ulduar.h | 2 +- .../utgarde_keep/utgarde_keep/boss_ingvar.cpp | 2 +- .../utgarde_keep/boss_keleseth.cpp | 2 +- .../boss_skarvald_and_dalronn.cpp | 2 +- .../utgarde_keep/instance_utgarde_keep.cpp | 2 +- .../utgarde_keep/utgarde_keep.cpp | 2 +- .../utgarde_keep/utgarde_keep/utgarde_keep.h | 2 +- .../utgarde_pinnacle/boss_gortok.cpp | 2 +- .../utgarde_pinnacle/boss_skadi.cpp | 2 +- .../utgarde_pinnacle/boss_svala.cpp | 2 +- .../utgarde_pinnacle/boss_ymiron.cpp | 2 +- .../instance_utgarde_pinnacle.cpp | 2 +- .../utgarde_pinnacle/utgarde_pinnacle.h | 2 +- .../vault_of_archavon/boss_archavon.cpp | 2 +- .../vault_of_archavon/boss_emalon.cpp | 2 +- .../vault_of_archavon/boss_koralon.cpp | 2 +- .../vault_of_archavon/boss_toravon.cpp | 2 +- .../instance_vault_of_archavon.cpp | 2 +- .../vault_of_archavon/vault_of_archavon.h | 2 +- scripts/northrend/violet_hold/boss_erekem.cpp | 2 +- .../northrend/violet_hold/boss_ichoron.cpp | 2 +- .../violet_hold/instance_violet_hold.cpp | 2 +- scripts/northrend/violet_hold/violet_hold.cpp | 2 +- scripts/northrend/violet_hold/violet_hold.h | 2 +- scripts/northrend/zuldrak.cpp | 2 +- .../auchenai_crypts/boss_exarch_maladaar.cpp | 2 +- .../auchenai_crypts/boss_shirrak.cpp | 2 +- .../mana_tombs/boss_nexusprince_shaffar.cpp | 2 +- .../mana_tombs/boss_pandemonius.cpp | 2 +- .../auchindoun/sethekk_halls/boss_anzu.cpp | 2 +- .../sethekk_halls/boss_darkweaver_syth.cpp | 2 +- .../sethekk_halls/boss_talon_king_ikiss.cpp | 2 +- .../sethekk_halls/instance_sethekk_halls.cpp | 2 +- .../auchindoun/sethekk_halls/sethekk_halls.h | 2 +- .../boss_ambassador_hellmaw.cpp | 2 +- .../boss_blackheart_the_inciter.cpp | 2 +- .../boss_grandmaster_vorpil.cpp | 2 +- .../shadow_labyrinth/boss_murmur.cpp | 2 +- .../instance_shadow_labyrinth.cpp | 2 +- .../shadow_labyrinth/shadow_labyrinth.h | 2 +- scripts/outland/black_temple/black_temple.cpp | 2 +- scripts/outland/black_temple/black_temple.h | 2 +- .../outland/black_temple/boss_bloodboil.cpp | 2 +- scripts/outland/black_temple/boss_illidan.cpp | 2 +- .../black_temple/boss_mother_shahraz.cpp | 2 +- .../black_temple/boss_reliquary_of_souls.cpp | 2 +- .../black_temple/boss_shade_of_akama.cpp | 2 +- .../outland/black_temple/boss_supremus.cpp | 2 +- .../black_temple/boss_teron_gorefiend.cpp | 2 +- .../black_temple/boss_warlord_najentus.cpp | 2 +- .../outland/black_temple/illidari_council.cpp | 2 +- .../black_temple/instance_black_temple.cpp | 2 +- scripts/outland/blades_edge_mountains.cpp | 2 +- scripts/outland/boss_doomlord_kazzak.cpp | 2 +- scripts/outland/boss_doomwalker.cpp | 2 +- .../boss_fathomlord_karathress.cpp | 2 +- .../boss_hydross_the_unstable.cpp | 2 +- .../serpent_shrine/boss_lady_vashj.cpp | 2 +- .../boss_leotheras_the_blind.cpp | 2 +- .../boss_morogrim_tidewalker.cpp | 2 +- .../serpent_shrine/boss_the_lurker_below.cpp | 2 +- .../instance_serpent_shrine.cpp | 2 +- .../serpent_shrine/serpent_shrine.h | 2 +- .../slave_pens/boss_ahune.cpp | 2 +- .../steam_vault/boss_hydromancer_thespia.cpp | 2 +- .../boss_mekgineer_steamrigger.cpp | 2 +- .../steam_vault/boss_warlord_kalithresh.cpp | 2 +- .../steam_vault/instance_steam_vault.cpp | 2 +- .../steam_vault/steam_vault.h | 2 +- .../underbog/boss_hungarfen.cpp | 2 +- scripts/outland/gruuls_lair/boss_gruul.cpp | 2 +- .../gruuls_lair/boss_high_king_maulgar.cpp | 2 +- scripts/outland/gruuls_lair/gruuls_lair.h | 2 +- .../gruuls_lair/instance_gruuls_lair.cpp | 2 +- .../blood_furnace/blood_furnace.h | 2 +- .../blood_furnace/boss_broggok.cpp | 2 +- .../boss_kelidan_the_breaker.cpp | 2 +- .../blood_furnace/boss_the_maker.cpp | 2 +- .../blood_furnace/instance_blood_furnace.cpp | 2 +- .../boss_nazan_and_vazruden.cpp | 2 +- .../boss_omor_the_unscarred.cpp | 2 +- .../boss_watchkeeper_gargolmar.cpp | 2 +- .../hellfire_ramparts/hellfire_ramparts.h | 2 +- .../instance_hellfire_ramparts.cpp | 2 +- .../magtheridons_lair/boss_magtheridon.cpp | 2 +- .../instance_magtheridons_lair.cpp | 2 +- .../magtheridons_lair/magtheridons_lair.h | 2 +- .../shattered_halls/boss_nethekurse.cpp | 2 +- .../boss_warbringer_omrogg.cpp | 2 +- .../boss_warchief_kargath_bladefist.cpp | 2 +- .../instance_shattered_halls.cpp | 2 +- .../shattered_halls/shattered_halls.h | 2 +- scripts/outland/hellfire_peninsula.cpp | 2 +- scripts/outland/nagrand.cpp | 2 +- scripts/outland/netherstorm.cpp | 2 +- scripts/outland/shadowmoon_valley.cpp | 2 +- scripts/outland/shattrath_city.cpp | 2 +- .../tempest_keep/arcatraz/arcatraz.cpp | 2 +- .../outland/tempest_keep/arcatraz/arcatraz.h | 2 +- .../tempest_keep/arcatraz/boss_dalliah.cpp | 2 +- .../arcatraz/boss_harbinger_skyriss.cpp | 2 +- .../arcatraz/boss_soccothrates.cpp | 2 +- .../arcatraz/instance_arcatraz.cpp | 2 +- .../botanica/boss_high_botanist_freywinn.cpp | 2 +- .../tempest_keep/botanica/boss_laj.cpp | 2 +- .../botanica/boss_warp_splinter.cpp | 2 +- .../tempest_keep/the_eye/boss_alar.cpp | 2 +- .../tempest_keep/the_eye/boss_astromancer.cpp | 2 +- .../tempest_keep/the_eye/boss_kaelthas.cpp | 2 +- .../tempest_keep/the_eye/boss_void_reaver.cpp | 2 +- .../tempest_keep/the_eye/instance_the_eye.cpp | 2 +- .../outland/tempest_keep/the_eye/the_eye.h | 2 +- .../boss_nethermancer_sepethrea.cpp | 2 +- .../boss_pathaleon_the_calculator.cpp | 2 +- .../the_mechanar/instance_mechanar.cpp | 2 +- .../tempest_keep/the_mechanar/mechanar.h | 2 +- scripts/outland/terokkar_forest.cpp | 2 +- scripts/outland/zangarmarsh.cpp | 2 +- scripts/world/areatrigger_scripts.cpp | 2 +- scripts/world/bosses_emerald_dragons.cpp | 2 +- scripts/world/go_scripts.cpp | 2 +- scripts/world/guards.cpp | 2 +- scripts/world/item_scripts.cpp | 2 +- scripts/world/mob_generic_creature.cpp | 2 +- scripts/world/npc_professions.cpp | 2 +- scripts/world/npcs_special.cpp | 2 +- scripts/world/spell_scripts.cpp | 2 +- scripts/world/world_map_scripts.cpp | 2 +- scripts/world/world_map_scripts.h | 2 +- sd2_revision_nr.h | 2 +- system/MangosdRev.cpp | 2 +- system/ScriptLoader.cpp | 2 +- system/ScriptLoader.h | 2 +- system/system.cpp | 2 +- system/system.h | 2 +- tool/git_id/git_id.cpp | 2 +- 541 files changed, 670 insertions(+), 540 deletions(-) create mode 100644 AUTHORS.md diff --git a/AUTHORS.md b/AUTHORS.md new file mode 100644 index 000000000..f35459fcf --- /dev/null +++ b/AUTHORS.md @@ -0,0 +1,130 @@ +# List of AUTHORS who contributed over time to the ScriptDev2 project + +## Warning +The code of ScriptDev2 is shipped as it is without any form of warranty, +and - except for third party libraries - licensed under the GPL 2.0, +which you can read from the file "COPYING" + +## Point of current development +The project is currently hosted at http://www.scriptdev2.com and developed under https://github.com/scriptdev2 + +## History of development +Development of this project dates back to 2006, and was developed under various umbrellas over time: +* ScriptDev2 project, 2006-2014, located at http://www.scriptdev2.com + +## Authorship of the code +Authorship is assigned for each commit within the git history, which is stored in these git repositories: +* github.com/scriptdev2/scriptdev2 + +## Exceptions with third party libraries + +## Authors List: + +*Please inform us, if you find somebody who is missing!* + +Abim +Alexluana +Ambal +Amki +antifreak +Anubisss +ApoC +arrai +astriconX +Azelen +Azuritus +balrok +bastii +blueboy +bobi88 +BroodWyrm +Bugfix +burned +cala +Cher0 +Chero +cipherCOM +ckegg +crackm +creakie +Cupcake +Cyberium +DaC +darkman1983 +DasBlub +DasMy +Derex +DiffuSer +drz2002 +dufernst +Dunemaster +etznab +evil-at-wow +foot +Forusim +fr1ge +fra298 +FragFrog +Goaul +greenseed +grz3s +Gurg +hoshie +Hundekuchen +hunuza +Huricane +Insanity Peppers +Janu +Jethro +jotapdiez +Junta +kid 10 +Klark20 +kolomati2 +krofna +Lightguard +Lynx3d +MeanMachine +Meldanor +michalpolko +miebaik +mns +Morpho +NeatElves +Neo2003 +Nighoo +nitka +NoFantasy +Ntsc +NuRRi +Opterman +Panic +Patman128 +paytheo +Peppers +przemratajczak +PSZ +raynar +Reamer +Reve +rise2 +Saeldur +Sattelit +Schmoozerd +Seline +septim +SRobot +stfx +tarwyn +Tassader +truera3or +Turok +UnknowN-TerroR +Vinolentus +virusav +VladimirMangos +Wizz +Xfurry +X-Savior +XTZGZoReX +zergtmn diff --git a/CMakeLists.txt b/CMakeLists.txt index b9a611f8f..c754226fe 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,5 @@ # -# Copyright (C) 2005-2013 MaNGOS +# This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information # # 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 diff --git a/README b/README index 075c26e1b..d5da2d18d 100644 --- a/README +++ b/README @@ -1,6 +1,6 @@ == ScriptDev2 README == - Copyright (C) 2006 - 2013 ScriptDev2 + This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information 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 diff --git a/ScriptMgr.cpp b/ScriptMgr.cpp index 46185aabd..b635596a5 100644 --- a/ScriptMgr.cpp +++ b/ScriptMgr.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/ScriptMgr.h b/ScriptMgr.h index 7dbf73e6f..2aefb623f 100644 --- a/ScriptMgr.h +++ b/ScriptMgr.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/base/escort_ai.cpp b/base/escort_ai.cpp index c03b4691b..cbd83604b 100644 --- a/base/escort_ai.cpp +++ b/base/escort_ai.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/base/escort_ai.h b/base/escort_ai.h index 93d141471..5442a0e55 100644 --- a/base/escort_ai.h +++ b/base/escort_ai.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/base/follower_ai.cpp b/base/follower_ai.cpp index 9f3d05a78..f89f2b514 100644 --- a/base/follower_ai.cpp +++ b/base/follower_ai.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/base/follower_ai.h b/base/follower_ai.h index 3c8483472..e4c6b45f0 100644 --- a/base/follower_ai.h +++ b/base/follower_ai.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/base/guard_ai.cpp b/base/guard_ai.cpp index 2e4a741ac..c6dffc117 100644 --- a/base/guard_ai.cpp +++ b/base/guard_ai.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/base/guard_ai.h b/base/guard_ai.h index 08a9a5421..4636bf634 100644 --- a/base/guard_ai.h +++ b/base/guard_ai.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/base/pet_ai.cpp b/base/pet_ai.cpp index 1f1049795..769da4753 100644 --- a/base/pet_ai.cpp +++ b/base/pet_ai.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/base/pet_ai.h b/base/pet_ai.h index f36302e4a..17ae707bb 100644 --- a/base/pet_ai.h +++ b/base/pet_ai.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/config.h b/config.h index 1a34f38b6..3ef426a0f 100644 --- a/config.h +++ b/config.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2005-2013 MaNGOS + * This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * * 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 diff --git a/config.h.in b/config.h.in index bc62fa277..50369aee0 100644 --- a/config.h.in +++ b/config.h.in @@ -1,5 +1,5 @@ /* - * Copyright (C) 2005-2013 MaNGOS + * This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * * 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 diff --git a/include/precompiled.cpp b/include/precompiled.cpp index 9589d835c..1fcb4b009 100644 --- a/include/precompiled.cpp +++ b/include/precompiled.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/include/precompiled.h b/include/precompiled.h index bcc863fd1..53549fd3e 100644 --- a/include/precompiled.h +++ b/include/precompiled.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/include/sc_creature.cpp b/include/sc_creature.cpp index c8467b5c6..0a16c3003 100644 --- a/include/sc_creature.cpp +++ b/include/sc_creature.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/include/sc_creature.h b/include/sc_creature.h index b40526e10..e5f412dce 100644 --- a/include/sc_creature.h +++ b/include/sc_creature.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/include/sc_gossip.h b/include/sc_gossip.h index a3c263a34..4fa2ef566 100644 --- a/include/sc_gossip.h +++ b/include/sc_gossip.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/include/sc_grid_searchers.cpp b/include/sc_grid_searchers.cpp index 114e4aace..f7ce1107e 100644 --- a/include/sc_grid_searchers.cpp +++ b/include/sc_grid_searchers.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/include/sc_grid_searchers.h b/include/sc_grid_searchers.h index f59073570..cd9365e41 100644 --- a/include/sc_grid_searchers.h +++ b/include/sc_grid_searchers.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/include/sc_instance.cpp b/include/sc_instance.cpp index 1601f4504..0926adb21 100644 --- a/include/sc_instance.cpp +++ b/include/sc_instance.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/include/sc_instance.h b/include/sc_instance.h index 391657755..a43338285 100644 --- a/include/sc_instance.h +++ b/include/sc_instance.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/battlegrounds/battleground.cpp b/scripts/battlegrounds/battleground.cpp index e55c9e334..fe80298af 100644 --- a/scripts/battlegrounds/battleground.cpp +++ b/scripts/battlegrounds/battleground.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/eastern_kingdoms/alterac_mountains.cpp b/scripts/eastern_kingdoms/alterac_mountains.cpp index e46aa0688..0d2f6e40c 100644 --- a/scripts/eastern_kingdoms/alterac_mountains.cpp +++ b/scripts/eastern_kingdoms/alterac_mountains.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/eastern_kingdoms/arathi_highlands.cpp b/scripts/eastern_kingdoms/arathi_highlands.cpp index b4a84f2e4..4dec08660 100644 --- a/scripts/eastern_kingdoms/arathi_highlands.cpp +++ b/scripts/eastern_kingdoms/arathi_highlands.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.cpp b/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.cpp index 0f245a2e0..fb91838d1 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.cpp +++ b/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.h b/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.h index e4c68b6cc..b16bdb2b4 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.h +++ b/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/eastern_kingdoms/blackrock_depths/boss_ambassador_flamelash.cpp b/scripts/eastern_kingdoms/blackrock_depths/boss_ambassador_flamelash.cpp index 92535b338..07fe6fa5a 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/boss_ambassador_flamelash.cpp +++ b/scripts/eastern_kingdoms/blackrock_depths/boss_ambassador_flamelash.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/eastern_kingdoms/blackrock_depths/boss_coren_direbrew.cpp b/scripts/eastern_kingdoms/blackrock_depths/boss_coren_direbrew.cpp index 214e57d0c..68d5c5221 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/boss_coren_direbrew.cpp +++ b/scripts/eastern_kingdoms/blackrock_depths/boss_coren_direbrew.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/eastern_kingdoms/blackrock_depths/boss_emperor_dagran_thaurissan.cpp b/scripts/eastern_kingdoms/blackrock_depths/boss_emperor_dagran_thaurissan.cpp index bc56db533..f39580263 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/boss_emperor_dagran_thaurissan.cpp +++ b/scripts/eastern_kingdoms/blackrock_depths/boss_emperor_dagran_thaurissan.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/eastern_kingdoms/blackrock_depths/boss_general_angerforge.cpp b/scripts/eastern_kingdoms/blackrock_depths/boss_general_angerforge.cpp index 594b5ba86..bbb3c32fa 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/boss_general_angerforge.cpp +++ b/scripts/eastern_kingdoms/blackrock_depths/boss_general_angerforge.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/eastern_kingdoms/blackrock_depths/boss_high_interrogator_gerstahn.cpp b/scripts/eastern_kingdoms/blackrock_depths/boss_high_interrogator_gerstahn.cpp index e69a3dd9f..aa1e97edb 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/boss_high_interrogator_gerstahn.cpp +++ b/scripts/eastern_kingdoms/blackrock_depths/boss_high_interrogator_gerstahn.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/eastern_kingdoms/blackrock_depths/instance_blackrock_depths.cpp b/scripts/eastern_kingdoms/blackrock_depths/instance_blackrock_depths.cpp index 28d8d645d..fee440282 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/instance_blackrock_depths.cpp +++ b/scripts/eastern_kingdoms/blackrock_depths/instance_blackrock_depths.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/eastern_kingdoms/blackrock_spire/blackrock_spire.h b/scripts/eastern_kingdoms/blackrock_spire/blackrock_spire.h index 305653fff..2a1d0bca9 100644 --- a/scripts/eastern_kingdoms/blackrock_spire/blackrock_spire.h +++ b/scripts/eastern_kingdoms/blackrock_spire/blackrock_spire.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/eastern_kingdoms/blackrock_spire/boss_gyth.cpp b/scripts/eastern_kingdoms/blackrock_spire/boss_gyth.cpp index 364c03192..9f2d3f61b 100644 --- a/scripts/eastern_kingdoms/blackrock_spire/boss_gyth.cpp +++ b/scripts/eastern_kingdoms/blackrock_spire/boss_gyth.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/eastern_kingdoms/blackrock_spire/boss_overlord_wyrmthalak.cpp b/scripts/eastern_kingdoms/blackrock_spire/boss_overlord_wyrmthalak.cpp index 04fe1760f..287c6b02d 100644 --- a/scripts/eastern_kingdoms/blackrock_spire/boss_overlord_wyrmthalak.cpp +++ b/scripts/eastern_kingdoms/blackrock_spire/boss_overlord_wyrmthalak.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/eastern_kingdoms/blackrock_spire/boss_pyroguard_emberseer.cpp b/scripts/eastern_kingdoms/blackrock_spire/boss_pyroguard_emberseer.cpp index a994ee6b5..fdba84c82 100644 --- a/scripts/eastern_kingdoms/blackrock_spire/boss_pyroguard_emberseer.cpp +++ b/scripts/eastern_kingdoms/blackrock_spire/boss_pyroguard_emberseer.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/eastern_kingdoms/blackrock_spire/instance_blackrock_spire.cpp b/scripts/eastern_kingdoms/blackrock_spire/instance_blackrock_spire.cpp index 11a344184..0078c2bc1 100644 --- a/scripts/eastern_kingdoms/blackrock_spire/instance_blackrock_spire.cpp +++ b/scripts/eastern_kingdoms/blackrock_spire/instance_blackrock_spire.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/eastern_kingdoms/blackwing_lair/blackwing_lair.h b/scripts/eastern_kingdoms/blackwing_lair/blackwing_lair.h index becb76adf..6dc40b94c 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/blackwing_lair.h +++ b/scripts/eastern_kingdoms/blackwing_lair/blackwing_lair.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/eastern_kingdoms/blackwing_lair/boss_broodlord_lashlayer.cpp b/scripts/eastern_kingdoms/blackwing_lair/boss_broodlord_lashlayer.cpp index bdc9ee47a..4e47a7bb7 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/boss_broodlord_lashlayer.cpp +++ b/scripts/eastern_kingdoms/blackwing_lair/boss_broodlord_lashlayer.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/eastern_kingdoms/blackwing_lair/boss_chromaggus.cpp b/scripts/eastern_kingdoms/blackwing_lair/boss_chromaggus.cpp index b429915e7..8ee1760ef 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/boss_chromaggus.cpp +++ b/scripts/eastern_kingdoms/blackwing_lair/boss_chromaggus.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/eastern_kingdoms/blackwing_lair/boss_ebonroc.cpp b/scripts/eastern_kingdoms/blackwing_lair/boss_ebonroc.cpp index b05e4ec69..5b2412392 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/boss_ebonroc.cpp +++ b/scripts/eastern_kingdoms/blackwing_lair/boss_ebonroc.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/eastern_kingdoms/blackwing_lair/boss_firemaw.cpp b/scripts/eastern_kingdoms/blackwing_lair/boss_firemaw.cpp index 2df9e90a4..7e33ec23f 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/boss_firemaw.cpp +++ b/scripts/eastern_kingdoms/blackwing_lair/boss_firemaw.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/eastern_kingdoms/blackwing_lair/boss_flamegor.cpp b/scripts/eastern_kingdoms/blackwing_lair/boss_flamegor.cpp index 5e2e5b6d7..a5df58ce9 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/boss_flamegor.cpp +++ b/scripts/eastern_kingdoms/blackwing_lair/boss_flamegor.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/eastern_kingdoms/blackwing_lair/boss_nefarian.cpp b/scripts/eastern_kingdoms/blackwing_lair/boss_nefarian.cpp index 5fc77afad..227eb9bb1 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/boss_nefarian.cpp +++ b/scripts/eastern_kingdoms/blackwing_lair/boss_nefarian.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/eastern_kingdoms/blackwing_lair/boss_razorgore.cpp b/scripts/eastern_kingdoms/blackwing_lair/boss_razorgore.cpp index 87f293431..afe7c7a31 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/boss_razorgore.cpp +++ b/scripts/eastern_kingdoms/blackwing_lair/boss_razorgore.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/eastern_kingdoms/blackwing_lair/boss_vaelastrasz.cpp b/scripts/eastern_kingdoms/blackwing_lair/boss_vaelastrasz.cpp index e97939ea6..07c5e54d8 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/boss_vaelastrasz.cpp +++ b/scripts/eastern_kingdoms/blackwing_lair/boss_vaelastrasz.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/eastern_kingdoms/blackwing_lair/boss_victor_nefarius.cpp b/scripts/eastern_kingdoms/blackwing_lair/boss_victor_nefarius.cpp index 32ff36fb2..50b878505 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/boss_victor_nefarius.cpp +++ b/scripts/eastern_kingdoms/blackwing_lair/boss_victor_nefarius.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/eastern_kingdoms/blackwing_lair/instance_blackwing_lair.cpp b/scripts/eastern_kingdoms/blackwing_lair/instance_blackwing_lair.cpp index b8c3a3c61..3eeb011e1 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/instance_blackwing_lair.cpp +++ b/scripts/eastern_kingdoms/blackwing_lair/instance_blackwing_lair.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/eastern_kingdoms/blasted_lands.cpp b/scripts/eastern_kingdoms/blasted_lands.cpp index 710b9e3fb..ea62ea389 100644 --- a/scripts/eastern_kingdoms/blasted_lands.cpp +++ b/scripts/eastern_kingdoms/blasted_lands.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/eastern_kingdoms/burning_steppes.cpp b/scripts/eastern_kingdoms/burning_steppes.cpp index dc33528c8..879809efc 100644 --- a/scripts/eastern_kingdoms/burning_steppes.cpp +++ b/scripts/eastern_kingdoms/burning_steppes.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/eastern_kingdoms/deadmines/boss_mr_smite.cpp b/scripts/eastern_kingdoms/deadmines/boss_mr_smite.cpp index 1e638d68d..4f14c6df1 100644 --- a/scripts/eastern_kingdoms/deadmines/boss_mr_smite.cpp +++ b/scripts/eastern_kingdoms/deadmines/boss_mr_smite.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/eastern_kingdoms/deadmines/deadmines.cpp b/scripts/eastern_kingdoms/deadmines/deadmines.cpp index 30bfe3c10..63beaa94b 100644 --- a/scripts/eastern_kingdoms/deadmines/deadmines.cpp +++ b/scripts/eastern_kingdoms/deadmines/deadmines.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/eastern_kingdoms/deadmines/deadmines.h b/scripts/eastern_kingdoms/deadmines/deadmines.h index ba1458f9f..1c892f294 100644 --- a/scripts/eastern_kingdoms/deadmines/deadmines.h +++ b/scripts/eastern_kingdoms/deadmines/deadmines.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/eastern_kingdoms/deadmines/instance_deadmines.cpp b/scripts/eastern_kingdoms/deadmines/instance_deadmines.cpp index 536ab772a..279a463a6 100644 --- a/scripts/eastern_kingdoms/deadmines/instance_deadmines.cpp +++ b/scripts/eastern_kingdoms/deadmines/instance_deadmines.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/eastern_kingdoms/dun_morogh.cpp b/scripts/eastern_kingdoms/dun_morogh.cpp index 7ed599272..effd255b2 100644 --- a/scripts/eastern_kingdoms/dun_morogh.cpp +++ b/scripts/eastern_kingdoms/dun_morogh.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/eastern_kingdoms/eastern_plaguelands.cpp b/scripts/eastern_kingdoms/eastern_plaguelands.cpp index 4a76ba211..bc23cde22 100644 --- a/scripts/eastern_kingdoms/eastern_plaguelands.cpp +++ b/scripts/eastern_kingdoms/eastern_plaguelands.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/eastern_kingdoms/elwynn_forest.cpp b/scripts/eastern_kingdoms/elwynn_forest.cpp index c238f19d1..aecaa7bf0 100644 --- a/scripts/eastern_kingdoms/elwynn_forest.cpp +++ b/scripts/eastern_kingdoms/elwynn_forest.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/eastern_kingdoms/eversong_woods.cpp b/scripts/eastern_kingdoms/eversong_woods.cpp index 3b654a52d..16d4bdf99 100644 --- a/scripts/eastern_kingdoms/eversong_woods.cpp +++ b/scripts/eastern_kingdoms/eversong_woods.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/eastern_kingdoms/ghostlands.cpp b/scripts/eastern_kingdoms/ghostlands.cpp index bd11584cf..9a123a4ec 100644 --- a/scripts/eastern_kingdoms/ghostlands.cpp +++ b/scripts/eastern_kingdoms/ghostlands.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/eastern_kingdoms/gnomeregan/boss_thermaplugg.cpp b/scripts/eastern_kingdoms/gnomeregan/boss_thermaplugg.cpp index 76a1ef9e5..1aa35c4ab 100644 --- a/scripts/eastern_kingdoms/gnomeregan/boss_thermaplugg.cpp +++ b/scripts/eastern_kingdoms/gnomeregan/boss_thermaplugg.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/eastern_kingdoms/gnomeregan/gnomeregan.cpp b/scripts/eastern_kingdoms/gnomeregan/gnomeregan.cpp index 7a99ae3a3..dd2aa5d3c 100644 --- a/scripts/eastern_kingdoms/gnomeregan/gnomeregan.cpp +++ b/scripts/eastern_kingdoms/gnomeregan/gnomeregan.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/eastern_kingdoms/gnomeregan/gnomeregan.h b/scripts/eastern_kingdoms/gnomeregan/gnomeregan.h index b2a13b45e..70d14178f 100644 --- a/scripts/eastern_kingdoms/gnomeregan/gnomeregan.h +++ b/scripts/eastern_kingdoms/gnomeregan/gnomeregan.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/eastern_kingdoms/gnomeregan/instance_gnomeregan.cpp b/scripts/eastern_kingdoms/gnomeregan/instance_gnomeregan.cpp index 701e11d76..d254fde2a 100644 --- a/scripts/eastern_kingdoms/gnomeregan/instance_gnomeregan.cpp +++ b/scripts/eastern_kingdoms/gnomeregan/instance_gnomeregan.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/eastern_kingdoms/hinterlands.cpp b/scripts/eastern_kingdoms/hinterlands.cpp index a29a5917c..417ebfc4d 100644 --- a/scripts/eastern_kingdoms/hinterlands.cpp +++ b/scripts/eastern_kingdoms/hinterlands.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/eastern_kingdoms/ironforge.cpp b/scripts/eastern_kingdoms/ironforge.cpp index f0c63aac4..b0866fa4e 100644 --- a/scripts/eastern_kingdoms/ironforge.cpp +++ b/scripts/eastern_kingdoms/ironforge.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/eastern_kingdoms/isle_of_queldanas.cpp b/scripts/eastern_kingdoms/isle_of_queldanas.cpp index ffff74a6d..ad7eaf9c6 100644 --- a/scripts/eastern_kingdoms/isle_of_queldanas.cpp +++ b/scripts/eastern_kingdoms/isle_of_queldanas.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/eastern_kingdoms/karazhan/boss_curator.cpp b/scripts/eastern_kingdoms/karazhan/boss_curator.cpp index 5bf14fe0e..a8c14624a 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_curator.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_curator.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/eastern_kingdoms/karazhan/boss_maiden_of_virtue.cpp b/scripts/eastern_kingdoms/karazhan/boss_maiden_of_virtue.cpp index 95cc5e048..e5feacb00 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_maiden_of_virtue.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_maiden_of_virtue.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/eastern_kingdoms/karazhan/boss_midnight.cpp b/scripts/eastern_kingdoms/karazhan/boss_midnight.cpp index 99ac03f90..af465471a 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_midnight.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_midnight.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/eastern_kingdoms/karazhan/boss_moroes.cpp b/scripts/eastern_kingdoms/karazhan/boss_moroes.cpp index b1f45ae9d..0bfc2f4c9 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_moroes.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_moroes.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/eastern_kingdoms/karazhan/boss_netherspite.cpp b/scripts/eastern_kingdoms/karazhan/boss_netherspite.cpp index 5df5f5a0a..e27dd8464 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_netherspite.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_netherspite.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/eastern_kingdoms/karazhan/boss_nightbane.cpp b/scripts/eastern_kingdoms/karazhan/boss_nightbane.cpp index 67f2d1f68..c5d0cd788 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_nightbane.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_nightbane.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/eastern_kingdoms/karazhan/boss_prince_malchezaar.cpp b/scripts/eastern_kingdoms/karazhan/boss_prince_malchezaar.cpp index c5940f633..b57be70af 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_prince_malchezaar.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_prince_malchezaar.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/eastern_kingdoms/karazhan/boss_shade_of_aran.cpp b/scripts/eastern_kingdoms/karazhan/boss_shade_of_aran.cpp index cc9a08ec2..46d4566a2 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_shade_of_aran.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_shade_of_aran.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/eastern_kingdoms/karazhan/boss_terestian_illhoof.cpp b/scripts/eastern_kingdoms/karazhan/boss_terestian_illhoof.cpp index cf5909330..4a4fd3cd6 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_terestian_illhoof.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_terestian_illhoof.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/eastern_kingdoms/karazhan/bosses_opera.cpp b/scripts/eastern_kingdoms/karazhan/bosses_opera.cpp index 2a0203d2b..564173fbd 100644 --- a/scripts/eastern_kingdoms/karazhan/bosses_opera.cpp +++ b/scripts/eastern_kingdoms/karazhan/bosses_opera.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/eastern_kingdoms/karazhan/chess_event.cpp b/scripts/eastern_kingdoms/karazhan/chess_event.cpp index bcaa1f5ca..06be61159 100644 --- a/scripts/eastern_kingdoms/karazhan/chess_event.cpp +++ b/scripts/eastern_kingdoms/karazhan/chess_event.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/eastern_kingdoms/karazhan/instance_karazhan.cpp b/scripts/eastern_kingdoms/karazhan/instance_karazhan.cpp index 7392812ad..ca055e035 100644 --- a/scripts/eastern_kingdoms/karazhan/instance_karazhan.cpp +++ b/scripts/eastern_kingdoms/karazhan/instance_karazhan.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/eastern_kingdoms/karazhan/karazhan.cpp b/scripts/eastern_kingdoms/karazhan/karazhan.cpp index 3ee509a95..c5c37fdad 100644 --- a/scripts/eastern_kingdoms/karazhan/karazhan.cpp +++ b/scripts/eastern_kingdoms/karazhan/karazhan.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/eastern_kingdoms/karazhan/karazhan.h b/scripts/eastern_kingdoms/karazhan/karazhan.h index eca060b68..23e9586e8 100644 --- a/scripts/eastern_kingdoms/karazhan/karazhan.h +++ b/scripts/eastern_kingdoms/karazhan/karazhan.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/eastern_kingdoms/loch_modan.cpp b/scripts/eastern_kingdoms/loch_modan.cpp index d63c74535..b0636c520 100644 --- a/scripts/eastern_kingdoms/loch_modan.cpp +++ b/scripts/eastern_kingdoms/loch_modan.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/eastern_kingdoms/magisters_terrace/boss_felblood_kaelthas.cpp b/scripts/eastern_kingdoms/magisters_terrace/boss_felblood_kaelthas.cpp index 1a0387183..508d62d9e 100644 --- a/scripts/eastern_kingdoms/magisters_terrace/boss_felblood_kaelthas.cpp +++ b/scripts/eastern_kingdoms/magisters_terrace/boss_felblood_kaelthas.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/eastern_kingdoms/magisters_terrace/boss_priestess_delrissa.cpp b/scripts/eastern_kingdoms/magisters_terrace/boss_priestess_delrissa.cpp index d4c9c7a6d..67b3bf365 100644 --- a/scripts/eastern_kingdoms/magisters_terrace/boss_priestess_delrissa.cpp +++ b/scripts/eastern_kingdoms/magisters_terrace/boss_priestess_delrissa.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/eastern_kingdoms/magisters_terrace/boss_selin_fireheart.cpp b/scripts/eastern_kingdoms/magisters_terrace/boss_selin_fireheart.cpp index 51be485d0..e217d53c0 100644 --- a/scripts/eastern_kingdoms/magisters_terrace/boss_selin_fireheart.cpp +++ b/scripts/eastern_kingdoms/magisters_terrace/boss_selin_fireheart.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/eastern_kingdoms/magisters_terrace/boss_vexallus.cpp b/scripts/eastern_kingdoms/magisters_terrace/boss_vexallus.cpp index 9c6223a42..fcb90983e 100644 --- a/scripts/eastern_kingdoms/magisters_terrace/boss_vexallus.cpp +++ b/scripts/eastern_kingdoms/magisters_terrace/boss_vexallus.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/eastern_kingdoms/magisters_terrace/instance_magisters_terrace.cpp b/scripts/eastern_kingdoms/magisters_terrace/instance_magisters_terrace.cpp index b78f452b5..c32e76dbf 100644 --- a/scripts/eastern_kingdoms/magisters_terrace/instance_magisters_terrace.cpp +++ b/scripts/eastern_kingdoms/magisters_terrace/instance_magisters_terrace.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.cpp b/scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.cpp index d1214e6aa..52c6d7173 100644 --- a/scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.cpp +++ b/scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.h b/scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.h index 2b08234e9..5853e5eb1 100644 --- a/scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.h +++ b/scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/eastern_kingdoms/molten_core/boss_baron_geddon.cpp b/scripts/eastern_kingdoms/molten_core/boss_baron_geddon.cpp index 17a39d605..935c6e08b 100644 --- a/scripts/eastern_kingdoms/molten_core/boss_baron_geddon.cpp +++ b/scripts/eastern_kingdoms/molten_core/boss_baron_geddon.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/eastern_kingdoms/molten_core/boss_garr.cpp b/scripts/eastern_kingdoms/molten_core/boss_garr.cpp index a475624fd..3f8feaf6f 100644 --- a/scripts/eastern_kingdoms/molten_core/boss_garr.cpp +++ b/scripts/eastern_kingdoms/molten_core/boss_garr.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/eastern_kingdoms/molten_core/boss_gehennas.cpp b/scripts/eastern_kingdoms/molten_core/boss_gehennas.cpp index ba60678a4..a43eb1947 100644 --- a/scripts/eastern_kingdoms/molten_core/boss_gehennas.cpp +++ b/scripts/eastern_kingdoms/molten_core/boss_gehennas.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/eastern_kingdoms/molten_core/boss_golemagg.cpp b/scripts/eastern_kingdoms/molten_core/boss_golemagg.cpp index 04889ce50..b016022f0 100644 --- a/scripts/eastern_kingdoms/molten_core/boss_golemagg.cpp +++ b/scripts/eastern_kingdoms/molten_core/boss_golemagg.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/eastern_kingdoms/molten_core/boss_lucifron.cpp b/scripts/eastern_kingdoms/molten_core/boss_lucifron.cpp index d6806f964..4499d08cc 100644 --- a/scripts/eastern_kingdoms/molten_core/boss_lucifron.cpp +++ b/scripts/eastern_kingdoms/molten_core/boss_lucifron.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/eastern_kingdoms/molten_core/boss_magmadar.cpp b/scripts/eastern_kingdoms/molten_core/boss_magmadar.cpp index 7ed8fa16f..7e43aadb2 100644 --- a/scripts/eastern_kingdoms/molten_core/boss_magmadar.cpp +++ b/scripts/eastern_kingdoms/molten_core/boss_magmadar.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/eastern_kingdoms/molten_core/boss_majordomo_executus.cpp b/scripts/eastern_kingdoms/molten_core/boss_majordomo_executus.cpp index b917f6e4a..8c93092d5 100644 --- a/scripts/eastern_kingdoms/molten_core/boss_majordomo_executus.cpp +++ b/scripts/eastern_kingdoms/molten_core/boss_majordomo_executus.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/eastern_kingdoms/molten_core/boss_ragnaros.cpp b/scripts/eastern_kingdoms/molten_core/boss_ragnaros.cpp index 4e7740947..6c7c7f95a 100644 --- a/scripts/eastern_kingdoms/molten_core/boss_ragnaros.cpp +++ b/scripts/eastern_kingdoms/molten_core/boss_ragnaros.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/eastern_kingdoms/molten_core/boss_shazzrah.cpp b/scripts/eastern_kingdoms/molten_core/boss_shazzrah.cpp index 5d89ec56a..3fa2aae50 100644 --- a/scripts/eastern_kingdoms/molten_core/boss_shazzrah.cpp +++ b/scripts/eastern_kingdoms/molten_core/boss_shazzrah.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/eastern_kingdoms/molten_core/boss_sulfuron_harbinger.cpp b/scripts/eastern_kingdoms/molten_core/boss_sulfuron_harbinger.cpp index 0c46447fd..84488c054 100644 --- a/scripts/eastern_kingdoms/molten_core/boss_sulfuron_harbinger.cpp +++ b/scripts/eastern_kingdoms/molten_core/boss_sulfuron_harbinger.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/eastern_kingdoms/molten_core/instance_molten_core.cpp b/scripts/eastern_kingdoms/molten_core/instance_molten_core.cpp index 09d786c78..7d0ed35f5 100644 --- a/scripts/eastern_kingdoms/molten_core/instance_molten_core.cpp +++ b/scripts/eastern_kingdoms/molten_core/instance_molten_core.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/eastern_kingdoms/molten_core/molten_core.cpp b/scripts/eastern_kingdoms/molten_core/molten_core.cpp index 293595284..8dc81290c 100644 --- a/scripts/eastern_kingdoms/molten_core/molten_core.cpp +++ b/scripts/eastern_kingdoms/molten_core/molten_core.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/eastern_kingdoms/molten_core/molten_core.h b/scripts/eastern_kingdoms/molten_core/molten_core.h index 5b1174f09..4ccf5ac29 100644 --- a/scripts/eastern_kingdoms/molten_core/molten_core.h +++ b/scripts/eastern_kingdoms/molten_core/molten_core.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/eastern_kingdoms/redridge_mountains.cpp b/scripts/eastern_kingdoms/redridge_mountains.cpp index ccca3fd13..01c35b021 100644 --- a/scripts/eastern_kingdoms/redridge_mountains.cpp +++ b/scripts/eastern_kingdoms/redridge_mountains.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp b/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp index b2e121668..9fe70644e 100644 --- a/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp +++ b/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/eastern_kingdoms/scarlet_enclave/world_map_ebon_hold.cpp b/scripts/eastern_kingdoms/scarlet_enclave/world_map_ebon_hold.cpp index 0cca286e4..ca9c581fb 100644 --- a/scripts/eastern_kingdoms/scarlet_enclave/world_map_ebon_hold.cpp +++ b/scripts/eastern_kingdoms/scarlet_enclave/world_map_ebon_hold.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/eastern_kingdoms/scarlet_enclave/world_map_ebon_hold.h b/scripts/eastern_kingdoms/scarlet_enclave/world_map_ebon_hold.h index 476897391..7ff768145 100644 --- a/scripts/eastern_kingdoms/scarlet_enclave/world_map_ebon_hold.h +++ b/scripts/eastern_kingdoms/scarlet_enclave/world_map_ebon_hold.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/eastern_kingdoms/scarlet_monastery/boss_arcanist_doan.cpp b/scripts/eastern_kingdoms/scarlet_monastery/boss_arcanist_doan.cpp index b251d62bc..491959bf1 100644 --- a/scripts/eastern_kingdoms/scarlet_monastery/boss_arcanist_doan.cpp +++ b/scripts/eastern_kingdoms/scarlet_monastery/boss_arcanist_doan.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/eastern_kingdoms/scarlet_monastery/boss_headless_horseman.cpp b/scripts/eastern_kingdoms/scarlet_monastery/boss_headless_horseman.cpp index a93298fcb..22b9b816e 100644 --- a/scripts/eastern_kingdoms/scarlet_monastery/boss_headless_horseman.cpp +++ b/scripts/eastern_kingdoms/scarlet_monastery/boss_headless_horseman.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/eastern_kingdoms/scarlet_monastery/boss_herod.cpp b/scripts/eastern_kingdoms/scarlet_monastery/boss_herod.cpp index c9061e6d2..9733cb38c 100644 --- a/scripts/eastern_kingdoms/scarlet_monastery/boss_herod.cpp +++ b/scripts/eastern_kingdoms/scarlet_monastery/boss_herod.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/eastern_kingdoms/scarlet_monastery/boss_mograine_and_whitemane.cpp b/scripts/eastern_kingdoms/scarlet_monastery/boss_mograine_and_whitemane.cpp index 95a7e3712..a8431d76c 100644 --- a/scripts/eastern_kingdoms/scarlet_monastery/boss_mograine_and_whitemane.cpp +++ b/scripts/eastern_kingdoms/scarlet_monastery/boss_mograine_and_whitemane.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/eastern_kingdoms/scarlet_monastery/instance_scarlet_monastery.cpp b/scripts/eastern_kingdoms/scarlet_monastery/instance_scarlet_monastery.cpp index 71f709ea7..21d36f580 100644 --- a/scripts/eastern_kingdoms/scarlet_monastery/instance_scarlet_monastery.cpp +++ b/scripts/eastern_kingdoms/scarlet_monastery/instance_scarlet_monastery.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/eastern_kingdoms/scarlet_monastery/scarlet_monastery.h b/scripts/eastern_kingdoms/scarlet_monastery/scarlet_monastery.h index 78b170ac0..3b3f9347b 100644 --- a/scripts/eastern_kingdoms/scarlet_monastery/scarlet_monastery.h +++ b/scripts/eastern_kingdoms/scarlet_monastery/scarlet_monastery.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/eastern_kingdoms/scholomance/boss_darkmaster_gandling.cpp b/scripts/eastern_kingdoms/scholomance/boss_darkmaster_gandling.cpp index 55f9e0b34..b30a7de79 100644 --- a/scripts/eastern_kingdoms/scholomance/boss_darkmaster_gandling.cpp +++ b/scripts/eastern_kingdoms/scholomance/boss_darkmaster_gandling.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/eastern_kingdoms/scholomance/boss_jandice_barov.cpp b/scripts/eastern_kingdoms/scholomance/boss_jandice_barov.cpp index cf70fcdde..2c09156ce 100644 --- a/scripts/eastern_kingdoms/scholomance/boss_jandice_barov.cpp +++ b/scripts/eastern_kingdoms/scholomance/boss_jandice_barov.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/eastern_kingdoms/scholomance/instance_scholomance.cpp b/scripts/eastern_kingdoms/scholomance/instance_scholomance.cpp index 615cbbeea..8478b5649 100644 --- a/scripts/eastern_kingdoms/scholomance/instance_scholomance.cpp +++ b/scripts/eastern_kingdoms/scholomance/instance_scholomance.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/eastern_kingdoms/scholomance/scholomance.h b/scripts/eastern_kingdoms/scholomance/scholomance.h index 54d8083c7..db364d493 100644 --- a/scripts/eastern_kingdoms/scholomance/scholomance.h +++ b/scripts/eastern_kingdoms/scholomance/scholomance.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/eastern_kingdoms/searing_gorge.cpp b/scripts/eastern_kingdoms/searing_gorge.cpp index abdc983b3..d1b8b4e3d 100644 --- a/scripts/eastern_kingdoms/searing_gorge.cpp +++ b/scripts/eastern_kingdoms/searing_gorge.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/eastern_kingdoms/shadowfang_keep/boss_hummel.cpp b/scripts/eastern_kingdoms/shadowfang_keep/boss_hummel.cpp index 947c5800e..7acb8ba31 100644 --- a/scripts/eastern_kingdoms/shadowfang_keep/boss_hummel.cpp +++ b/scripts/eastern_kingdoms/shadowfang_keep/boss_hummel.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/eastern_kingdoms/shadowfang_keep/instance_shadowfang_keep.cpp b/scripts/eastern_kingdoms/shadowfang_keep/instance_shadowfang_keep.cpp index dd7da92b8..544f78cdb 100644 --- a/scripts/eastern_kingdoms/shadowfang_keep/instance_shadowfang_keep.cpp +++ b/scripts/eastern_kingdoms/shadowfang_keep/instance_shadowfang_keep.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.cpp b/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.cpp index 7ec4a1133..ecdae1cab 100644 --- a/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.cpp +++ b/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.h b/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.h index a79069522..4a7fc8881 100644 --- a/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.h +++ b/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/eastern_kingdoms/silvermoon_city.cpp b/scripts/eastern_kingdoms/silvermoon_city.cpp index 24fd38329..e4fc3fcef 100644 --- a/scripts/eastern_kingdoms/silvermoon_city.cpp +++ b/scripts/eastern_kingdoms/silvermoon_city.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/eastern_kingdoms/silverpine_forest.cpp b/scripts/eastern_kingdoms/silverpine_forest.cpp index 885bf2412..61a1469e3 100644 --- a/scripts/eastern_kingdoms/silverpine_forest.cpp +++ b/scripts/eastern_kingdoms/silverpine_forest.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/eastern_kingdoms/stormwind_city.cpp b/scripts/eastern_kingdoms/stormwind_city.cpp index dbee3653a..fb1a214c9 100644 --- a/scripts/eastern_kingdoms/stormwind_city.cpp +++ b/scripts/eastern_kingdoms/stormwind_city.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/eastern_kingdoms/stranglethorn_vale.cpp b/scripts/eastern_kingdoms/stranglethorn_vale.cpp index b499c513a..3d0d9a9f2 100644 --- a/scripts/eastern_kingdoms/stranglethorn_vale.cpp +++ b/scripts/eastern_kingdoms/stranglethorn_vale.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/eastern_kingdoms/stratholme/boss_baroness_anastari.cpp b/scripts/eastern_kingdoms/stratholme/boss_baroness_anastari.cpp index 793cf869f..490f3e725 100644 --- a/scripts/eastern_kingdoms/stratholme/boss_baroness_anastari.cpp +++ b/scripts/eastern_kingdoms/stratholme/boss_baroness_anastari.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/eastern_kingdoms/stratholme/boss_cannon_master_willey.cpp b/scripts/eastern_kingdoms/stratholme/boss_cannon_master_willey.cpp index eac80e9b4..38e397d41 100644 --- a/scripts/eastern_kingdoms/stratholme/boss_cannon_master_willey.cpp +++ b/scripts/eastern_kingdoms/stratholme/boss_cannon_master_willey.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/eastern_kingdoms/stratholme/boss_dathrohan_balnazzar.cpp b/scripts/eastern_kingdoms/stratholme/boss_dathrohan_balnazzar.cpp index 2c058bbb5..4a3b06bcc 100644 --- a/scripts/eastern_kingdoms/stratholme/boss_dathrohan_balnazzar.cpp +++ b/scripts/eastern_kingdoms/stratholme/boss_dathrohan_balnazzar.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/eastern_kingdoms/stratholme/boss_maleki_the_pallid.cpp b/scripts/eastern_kingdoms/stratholme/boss_maleki_the_pallid.cpp index 35c4241e5..19fc3fd9a 100644 --- a/scripts/eastern_kingdoms/stratholme/boss_maleki_the_pallid.cpp +++ b/scripts/eastern_kingdoms/stratholme/boss_maleki_the_pallid.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/eastern_kingdoms/stratholme/boss_order_of_silver_hand.cpp b/scripts/eastern_kingdoms/stratholme/boss_order_of_silver_hand.cpp index cebf216dd..c0e002a5f 100644 --- a/scripts/eastern_kingdoms/stratholme/boss_order_of_silver_hand.cpp +++ b/scripts/eastern_kingdoms/stratholme/boss_order_of_silver_hand.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/eastern_kingdoms/stratholme/instance_stratholme.cpp b/scripts/eastern_kingdoms/stratholme/instance_stratholme.cpp index 11bea2ade..5b79d4359 100644 --- a/scripts/eastern_kingdoms/stratholme/instance_stratholme.cpp +++ b/scripts/eastern_kingdoms/stratholme/instance_stratholme.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/eastern_kingdoms/stratholme/stratholme.cpp b/scripts/eastern_kingdoms/stratholme/stratholme.cpp index 042b9212d..6dfa66fc5 100644 --- a/scripts/eastern_kingdoms/stratholme/stratholme.cpp +++ b/scripts/eastern_kingdoms/stratholme/stratholme.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/eastern_kingdoms/stratholme/stratholme.h b/scripts/eastern_kingdoms/stratholme/stratholme.h index c45b5d1b7..b91ac53c6 100644 --- a/scripts/eastern_kingdoms/stratholme/stratholme.h +++ b/scripts/eastern_kingdoms/stratholme/stratholme.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/eastern_kingdoms/sunken_temple/instance_sunken_temple.cpp b/scripts/eastern_kingdoms/sunken_temple/instance_sunken_temple.cpp index 1a1bf60d2..3e9bfd5bb 100644 --- a/scripts/eastern_kingdoms/sunken_temple/instance_sunken_temple.cpp +++ b/scripts/eastern_kingdoms/sunken_temple/instance_sunken_temple.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/eastern_kingdoms/sunken_temple/sunken_temple.cpp b/scripts/eastern_kingdoms/sunken_temple/sunken_temple.cpp index 7bfbb944d..9ee47a40e 100644 --- a/scripts/eastern_kingdoms/sunken_temple/sunken_temple.cpp +++ b/scripts/eastern_kingdoms/sunken_temple/sunken_temple.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/eastern_kingdoms/sunken_temple/sunken_temple.h b/scripts/eastern_kingdoms/sunken_temple/sunken_temple.h index 91e388613..a70f2a88e 100644 --- a/scripts/eastern_kingdoms/sunken_temple/sunken_temple.h +++ b/scripts/eastern_kingdoms/sunken_temple/sunken_temple.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/eastern_kingdoms/sunwell_plateau/boss_brutallus.cpp b/scripts/eastern_kingdoms/sunwell_plateau/boss_brutallus.cpp index db46df9f9..f397c6590 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/boss_brutallus.cpp +++ b/scripts/eastern_kingdoms/sunwell_plateau/boss_brutallus.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/eastern_kingdoms/sunwell_plateau/boss_eredar_twins.cpp b/scripts/eastern_kingdoms/sunwell_plateau/boss_eredar_twins.cpp index f44fa8e0c..12a11bb16 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/boss_eredar_twins.cpp +++ b/scripts/eastern_kingdoms/sunwell_plateau/boss_eredar_twins.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/eastern_kingdoms/sunwell_plateau/boss_felmyst.cpp b/scripts/eastern_kingdoms/sunwell_plateau/boss_felmyst.cpp index 8fa8cb686..5a43198a3 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/boss_felmyst.cpp +++ b/scripts/eastern_kingdoms/sunwell_plateau/boss_felmyst.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/eastern_kingdoms/sunwell_plateau/boss_kalecgos.cpp b/scripts/eastern_kingdoms/sunwell_plateau/boss_kalecgos.cpp index 5899fed79..70592abe6 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/boss_kalecgos.cpp +++ b/scripts/eastern_kingdoms/sunwell_plateau/boss_kalecgos.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/eastern_kingdoms/sunwell_plateau/boss_kiljaeden.cpp b/scripts/eastern_kingdoms/sunwell_plateau/boss_kiljaeden.cpp index c1826bd46..1bc8fd9f8 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/boss_kiljaeden.cpp +++ b/scripts/eastern_kingdoms/sunwell_plateau/boss_kiljaeden.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/eastern_kingdoms/sunwell_plateau/boss_muru.cpp b/scripts/eastern_kingdoms/sunwell_plateau/boss_muru.cpp index 79209c888..73199aee5 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/boss_muru.cpp +++ b/scripts/eastern_kingdoms/sunwell_plateau/boss_muru.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/eastern_kingdoms/sunwell_plateau/instance_sunwell_plateau.cpp b/scripts/eastern_kingdoms/sunwell_plateau/instance_sunwell_plateau.cpp index 47d11fc87..6062bf7d2 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/instance_sunwell_plateau.cpp +++ b/scripts/eastern_kingdoms/sunwell_plateau/instance_sunwell_plateau.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/eastern_kingdoms/sunwell_plateau/sunwell_plateau.h b/scripts/eastern_kingdoms/sunwell_plateau/sunwell_plateau.h index 9a635ba43..4f0623160 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/sunwell_plateau.h +++ b/scripts/eastern_kingdoms/sunwell_plateau/sunwell_plateau.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/eastern_kingdoms/swamp_of_sorrows.cpp b/scripts/eastern_kingdoms/swamp_of_sorrows.cpp index 8e4f46a9d..2aabe5a1e 100644 --- a/scripts/eastern_kingdoms/swamp_of_sorrows.cpp +++ b/scripts/eastern_kingdoms/swamp_of_sorrows.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/eastern_kingdoms/tirisfal_glades.cpp b/scripts/eastern_kingdoms/tirisfal_glades.cpp index aa6611562..ee88a9cdf 100644 --- a/scripts/eastern_kingdoms/tirisfal_glades.cpp +++ b/scripts/eastern_kingdoms/tirisfal_glades.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/eastern_kingdoms/uldaman/boss_archaedas.cpp b/scripts/eastern_kingdoms/uldaman/boss_archaedas.cpp index a1d991ac8..40c05bd64 100644 --- a/scripts/eastern_kingdoms/uldaman/boss_archaedas.cpp +++ b/scripts/eastern_kingdoms/uldaman/boss_archaedas.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/eastern_kingdoms/uldaman/instance_uldaman.cpp b/scripts/eastern_kingdoms/uldaman/instance_uldaman.cpp index 2eecf3412..987828c60 100644 --- a/scripts/eastern_kingdoms/uldaman/instance_uldaman.cpp +++ b/scripts/eastern_kingdoms/uldaman/instance_uldaman.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/eastern_kingdoms/uldaman/uldaman.cpp b/scripts/eastern_kingdoms/uldaman/uldaman.cpp index 4d2371b02..f08432020 100644 --- a/scripts/eastern_kingdoms/uldaman/uldaman.cpp +++ b/scripts/eastern_kingdoms/uldaman/uldaman.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/eastern_kingdoms/uldaman/uldaman.h b/scripts/eastern_kingdoms/uldaman/uldaman.h index 710ada4b0..8250fd1d8 100644 --- a/scripts/eastern_kingdoms/uldaman/uldaman.h +++ b/scripts/eastern_kingdoms/uldaman/uldaman.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/eastern_kingdoms/undercity.cpp b/scripts/eastern_kingdoms/undercity.cpp index a601a5034..1f469521b 100644 --- a/scripts/eastern_kingdoms/undercity.cpp +++ b/scripts/eastern_kingdoms/undercity.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/eastern_kingdoms/western_plaguelands.cpp b/scripts/eastern_kingdoms/western_plaguelands.cpp index ffb7637b6..c50d06bff 100644 --- a/scripts/eastern_kingdoms/western_plaguelands.cpp +++ b/scripts/eastern_kingdoms/western_plaguelands.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/eastern_kingdoms/westfall.cpp b/scripts/eastern_kingdoms/westfall.cpp index b8407f979..c6ddba5d6 100644 --- a/scripts/eastern_kingdoms/westfall.cpp +++ b/scripts/eastern_kingdoms/westfall.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/eastern_kingdoms/wetlands.cpp b/scripts/eastern_kingdoms/wetlands.cpp index abf44c183..fc68394a2 100644 --- a/scripts/eastern_kingdoms/wetlands.cpp +++ b/scripts/eastern_kingdoms/wetlands.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/eastern_kingdoms/zulaman/boss_akilzon.cpp b/scripts/eastern_kingdoms/zulaman/boss_akilzon.cpp index d05866c2c..31346bb17 100644 --- a/scripts/eastern_kingdoms/zulaman/boss_akilzon.cpp +++ b/scripts/eastern_kingdoms/zulaman/boss_akilzon.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/eastern_kingdoms/zulaman/boss_halazzi.cpp b/scripts/eastern_kingdoms/zulaman/boss_halazzi.cpp index 690dd3ea8..03f240119 100644 --- a/scripts/eastern_kingdoms/zulaman/boss_halazzi.cpp +++ b/scripts/eastern_kingdoms/zulaman/boss_halazzi.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/eastern_kingdoms/zulaman/boss_janalai.cpp b/scripts/eastern_kingdoms/zulaman/boss_janalai.cpp index 85c0ee007..614d38bc6 100644 --- a/scripts/eastern_kingdoms/zulaman/boss_janalai.cpp +++ b/scripts/eastern_kingdoms/zulaman/boss_janalai.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/eastern_kingdoms/zulaman/boss_malacrass.cpp b/scripts/eastern_kingdoms/zulaman/boss_malacrass.cpp index b5432fa5b..d47bf2ebc 100644 --- a/scripts/eastern_kingdoms/zulaman/boss_malacrass.cpp +++ b/scripts/eastern_kingdoms/zulaman/boss_malacrass.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/eastern_kingdoms/zulaman/boss_nalorakk.cpp b/scripts/eastern_kingdoms/zulaman/boss_nalorakk.cpp index ff8470913..c39834e33 100644 --- a/scripts/eastern_kingdoms/zulaman/boss_nalorakk.cpp +++ b/scripts/eastern_kingdoms/zulaman/boss_nalorakk.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/eastern_kingdoms/zulaman/boss_zuljin.cpp b/scripts/eastern_kingdoms/zulaman/boss_zuljin.cpp index 69412dc5e..423de997b 100644 --- a/scripts/eastern_kingdoms/zulaman/boss_zuljin.cpp +++ b/scripts/eastern_kingdoms/zulaman/boss_zuljin.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/eastern_kingdoms/zulaman/instance_zulaman.cpp b/scripts/eastern_kingdoms/zulaman/instance_zulaman.cpp index 511e90abc..dcabcbfa0 100644 --- a/scripts/eastern_kingdoms/zulaman/instance_zulaman.cpp +++ b/scripts/eastern_kingdoms/zulaman/instance_zulaman.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/eastern_kingdoms/zulaman/zulaman.cpp b/scripts/eastern_kingdoms/zulaman/zulaman.cpp index 360f2b899..096edbce1 100644 --- a/scripts/eastern_kingdoms/zulaman/zulaman.cpp +++ b/scripts/eastern_kingdoms/zulaman/zulaman.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/eastern_kingdoms/zulaman/zulaman.h b/scripts/eastern_kingdoms/zulaman/zulaman.h index 711d22c22..8829959d1 100644 --- a/scripts/eastern_kingdoms/zulaman/zulaman.h +++ b/scripts/eastern_kingdoms/zulaman/zulaman.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/eastern_kingdoms/zulgurub/boss_arlokk.cpp b/scripts/eastern_kingdoms/zulgurub/boss_arlokk.cpp index 222680679..6e7b28391 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_arlokk.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_arlokk.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/eastern_kingdoms/zulgurub/boss_hakkar.cpp b/scripts/eastern_kingdoms/zulgurub/boss_hakkar.cpp index 142e8dc55..dbd7c06d4 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_hakkar.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_hakkar.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/eastern_kingdoms/zulgurub/boss_hazzarah.cpp b/scripts/eastern_kingdoms/zulgurub/boss_hazzarah.cpp index ebe63e758..d14fbdebb 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_hazzarah.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_hazzarah.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/eastern_kingdoms/zulgurub/boss_jeklik.cpp b/scripts/eastern_kingdoms/zulgurub/boss_jeklik.cpp index 8d59e962a..191b6036c 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_jeklik.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_jeklik.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/eastern_kingdoms/zulgurub/boss_jindo.cpp b/scripts/eastern_kingdoms/zulgurub/boss_jindo.cpp index dc8eed3f4..c77a9ec29 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_jindo.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_jindo.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/eastern_kingdoms/zulgurub/boss_mandokir.cpp b/scripts/eastern_kingdoms/zulgurub/boss_mandokir.cpp index 34e1d860a..ddd8dba4c 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_mandokir.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_mandokir.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/eastern_kingdoms/zulgurub/boss_marli.cpp b/scripts/eastern_kingdoms/zulgurub/boss_marli.cpp index 0cc787bbc..4c972cf27 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_marli.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_marli.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/eastern_kingdoms/zulgurub/boss_renataki.cpp b/scripts/eastern_kingdoms/zulgurub/boss_renataki.cpp index f15da2f75..215ded71a 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_renataki.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_renataki.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/eastern_kingdoms/zulgurub/boss_thekal.cpp b/scripts/eastern_kingdoms/zulgurub/boss_thekal.cpp index 0e27551fd..02c196a76 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_thekal.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_thekal.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/eastern_kingdoms/zulgurub/boss_venoxis.cpp b/scripts/eastern_kingdoms/zulgurub/boss_venoxis.cpp index 964bee956..5c807aa9a 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_venoxis.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_venoxis.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/eastern_kingdoms/zulgurub/instance_zulgurub.cpp b/scripts/eastern_kingdoms/zulgurub/instance_zulgurub.cpp index 362e72f36..56b8efd29 100644 --- a/scripts/eastern_kingdoms/zulgurub/instance_zulgurub.cpp +++ b/scripts/eastern_kingdoms/zulgurub/instance_zulgurub.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/eastern_kingdoms/zulgurub/zulgurub.h b/scripts/eastern_kingdoms/zulgurub/zulgurub.h index 0442f1142..864b445a2 100644 --- a/scripts/eastern_kingdoms/zulgurub/zulgurub.h +++ b/scripts/eastern_kingdoms/zulgurub/zulgurub.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/examples/example_creature.cpp b/scripts/examples/example_creature.cpp index 6afe3a979..853e7a89a 100644 --- a/scripts/examples/example_creature.cpp +++ b/scripts/examples/example_creature.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/examples/example_escort.cpp b/scripts/examples/example_escort.cpp index 28426f1b0..35c509689 100644 --- a/scripts/examples/example_escort.cpp +++ b/scripts/examples/example_escort.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/examples/example_gossip_codebox.cpp b/scripts/examples/example_gossip_codebox.cpp index 4e7f2c7a3..4c2028810 100644 --- a/scripts/examples/example_gossip_codebox.cpp +++ b/scripts/examples/example_gossip_codebox.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/examples/example_misc.cpp b/scripts/examples/example_misc.cpp index a0af083ac..26dc5b5b3 100644 --- a/scripts/examples/example_misc.cpp +++ b/scripts/examples/example_misc.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/kalimdor/ashenvale.cpp b/scripts/kalimdor/ashenvale.cpp index 7bfc9ceb5..2c646c4a4 100644 --- a/scripts/kalimdor/ashenvale.cpp +++ b/scripts/kalimdor/ashenvale.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/kalimdor/azshara.cpp b/scripts/kalimdor/azshara.cpp index afdec7660..7ac8113f9 100644 --- a/scripts/kalimdor/azshara.cpp +++ b/scripts/kalimdor/azshara.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/kalimdor/azuremyst_isle.cpp b/scripts/kalimdor/azuremyst_isle.cpp index 71c04863d..36d3ba238 100644 --- a/scripts/kalimdor/azuremyst_isle.cpp +++ b/scripts/kalimdor/azuremyst_isle.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/kalimdor/blackfathom_deeps/blackfathom_deeps.h b/scripts/kalimdor/blackfathom_deeps/blackfathom_deeps.h index c4e75d98d..74d628bed 100644 --- a/scripts/kalimdor/blackfathom_deeps/blackfathom_deeps.h +++ b/scripts/kalimdor/blackfathom_deeps/blackfathom_deeps.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/kalimdor/blackfathom_deeps/instance_blackfathom_deeps.cpp b/scripts/kalimdor/blackfathom_deeps/instance_blackfathom_deeps.cpp index 25c466cf8..ed5c56edf 100644 --- a/scripts/kalimdor/blackfathom_deeps/instance_blackfathom_deeps.cpp +++ b/scripts/kalimdor/blackfathom_deeps/instance_blackfathom_deeps.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/kalimdor/bloodmyst_isle.cpp b/scripts/kalimdor/bloodmyst_isle.cpp index 5fe0cd9c0..87ae57809 100644 --- a/scripts/kalimdor/bloodmyst_isle.cpp +++ b/scripts/kalimdor/bloodmyst_isle.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/kalimdor/boss_azuregos.cpp b/scripts/kalimdor/boss_azuregos.cpp index 9297a8e1e..592746598 100644 --- a/scripts/kalimdor/boss_azuregos.cpp +++ b/scripts/kalimdor/boss_azuregos.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.cpp b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.cpp index 20cd1f09e..2bbb1d72a 100644 --- a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.cpp +++ b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.h b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.h index ae473a229..176e16ad4 100644 --- a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.h +++ b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/instance_culling_of_stratholme.cpp b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/instance_culling_of_stratholme.cpp index baf9911d4..8f9cdf67b 100644 --- a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/instance_culling_of_stratholme.cpp +++ b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/instance_culling_of_stratholme.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/kalimdor/caverns_of_time/dark_portal/boss_aeonus.cpp b/scripts/kalimdor/caverns_of_time/dark_portal/boss_aeonus.cpp index 04d2d7225..32340f253 100644 --- a/scripts/kalimdor/caverns_of_time/dark_portal/boss_aeonus.cpp +++ b/scripts/kalimdor/caverns_of_time/dark_portal/boss_aeonus.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/kalimdor/caverns_of_time/dark_portal/boss_chrono_lord_deja.cpp b/scripts/kalimdor/caverns_of_time/dark_portal/boss_chrono_lord_deja.cpp index a9c3da992..ccaf2247c 100644 --- a/scripts/kalimdor/caverns_of_time/dark_portal/boss_chrono_lord_deja.cpp +++ b/scripts/kalimdor/caverns_of_time/dark_portal/boss_chrono_lord_deja.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/kalimdor/caverns_of_time/dark_portal/boss_temporus.cpp b/scripts/kalimdor/caverns_of_time/dark_portal/boss_temporus.cpp index 1574ebca2..3c607cb2a 100644 --- a/scripts/kalimdor/caverns_of_time/dark_portal/boss_temporus.cpp +++ b/scripts/kalimdor/caverns_of_time/dark_portal/boss_temporus.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.cpp b/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.cpp index a8c44b380..d71431793 100644 --- a/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.cpp +++ b/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.h b/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.h index e0cf18c45..49e6d0099 100644 --- a/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.h +++ b/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/kalimdor/caverns_of_time/dark_portal/instance_dark_portal.cpp b/scripts/kalimdor/caverns_of_time/dark_portal/instance_dark_portal.cpp index a1667d387..a1de8f7f0 100644 --- a/scripts/kalimdor/caverns_of_time/dark_portal/instance_dark_portal.cpp +++ b/scripts/kalimdor/caverns_of_time/dark_portal/instance_dark_portal.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/kalimdor/caverns_of_time/hyjal/boss_archimonde.cpp b/scripts/kalimdor/caverns_of_time/hyjal/boss_archimonde.cpp index 92d84e873..919b94d0a 100644 --- a/scripts/kalimdor/caverns_of_time/hyjal/boss_archimonde.cpp +++ b/scripts/kalimdor/caverns_of_time/hyjal/boss_archimonde.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/kalimdor/caverns_of_time/hyjal/hyjal.cpp b/scripts/kalimdor/caverns_of_time/hyjal/hyjal.cpp index d45e82c53..b1730ca71 100644 --- a/scripts/kalimdor/caverns_of_time/hyjal/hyjal.cpp +++ b/scripts/kalimdor/caverns_of_time/hyjal/hyjal.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/kalimdor/caverns_of_time/hyjal/hyjal.h b/scripts/kalimdor/caverns_of_time/hyjal/hyjal.h index 539a1a6dc..7871d98d9 100644 --- a/scripts/kalimdor/caverns_of_time/hyjal/hyjal.h +++ b/scripts/kalimdor/caverns_of_time/hyjal/hyjal.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.cpp b/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.cpp index 6b0f378af..6af4ce03e 100644 --- a/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.cpp +++ b/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.h b/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.h index f8dea38e9..edfc6d173 100644 --- a/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.h +++ b/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/kalimdor/caverns_of_time/hyjal/instance_hyjal.cpp b/scripts/kalimdor/caverns_of_time/hyjal/instance_hyjal.cpp index c6454eca9..0d2cb7012 100644 --- a/scripts/kalimdor/caverns_of_time/hyjal/instance_hyjal.cpp +++ b/scripts/kalimdor/caverns_of_time/hyjal/instance_hyjal.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/kalimdor/caverns_of_time/old_hillsbrad/instance_old_hillsbrad.cpp b/scripts/kalimdor/caverns_of_time/old_hillsbrad/instance_old_hillsbrad.cpp index 68afcdf93..03e2708dd 100644 --- a/scripts/kalimdor/caverns_of_time/old_hillsbrad/instance_old_hillsbrad.cpp +++ b/scripts/kalimdor/caverns_of_time/old_hillsbrad/instance_old_hillsbrad.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.cpp b/scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.cpp index 5cbca0fa1..186d84b80 100644 --- a/scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.cpp +++ b/scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.h b/scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.h index ce6954e55..36368beaa 100644 --- a/scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.h +++ b/scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/kalimdor/darkshore.cpp b/scripts/kalimdor/darkshore.cpp index 9e540bbab..d2a72d956 100644 --- a/scripts/kalimdor/darkshore.cpp +++ b/scripts/kalimdor/darkshore.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/kalimdor/desolace.cpp b/scripts/kalimdor/desolace.cpp index a3bdbe1f8..e43c7ee7d 100644 --- a/scripts/kalimdor/desolace.cpp +++ b/scripts/kalimdor/desolace.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/kalimdor/dire_maul/dire_maul.cpp b/scripts/kalimdor/dire_maul/dire_maul.cpp index 28d5ed68d..e1536d3fb 100644 --- a/scripts/kalimdor/dire_maul/dire_maul.cpp +++ b/scripts/kalimdor/dire_maul/dire_maul.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/kalimdor/dire_maul/dire_maul.h b/scripts/kalimdor/dire_maul/dire_maul.h index 476069636..967253355 100644 --- a/scripts/kalimdor/dire_maul/dire_maul.h +++ b/scripts/kalimdor/dire_maul/dire_maul.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/kalimdor/dire_maul/instance_dire_maul.cpp b/scripts/kalimdor/dire_maul/instance_dire_maul.cpp index 1ef7740e4..5f66bc318 100644 --- a/scripts/kalimdor/dire_maul/instance_dire_maul.cpp +++ b/scripts/kalimdor/dire_maul/instance_dire_maul.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/kalimdor/durotar.cpp b/scripts/kalimdor/durotar.cpp index 3edbbc901..90c796ae5 100644 --- a/scripts/kalimdor/durotar.cpp +++ b/scripts/kalimdor/durotar.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/kalimdor/dustwallow_marsh.cpp b/scripts/kalimdor/dustwallow_marsh.cpp index c9f5b70a4..97e8a93a5 100644 --- a/scripts/kalimdor/dustwallow_marsh.cpp +++ b/scripts/kalimdor/dustwallow_marsh.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/kalimdor/felwood.cpp b/scripts/kalimdor/felwood.cpp index d1a1139ab..b95d565c6 100644 --- a/scripts/kalimdor/felwood.cpp +++ b/scripts/kalimdor/felwood.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/kalimdor/feralas.cpp b/scripts/kalimdor/feralas.cpp index d867ecbb9..5d472935e 100644 --- a/scripts/kalimdor/feralas.cpp +++ b/scripts/kalimdor/feralas.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/kalimdor/maraudon/boss_noxxion.cpp b/scripts/kalimdor/maraudon/boss_noxxion.cpp index 23392f769..37daa714b 100644 --- a/scripts/kalimdor/maraudon/boss_noxxion.cpp +++ b/scripts/kalimdor/maraudon/boss_noxxion.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/kalimdor/moonglade.cpp b/scripts/kalimdor/moonglade.cpp index 27c031571..6bf4a0619 100644 --- a/scripts/kalimdor/moonglade.cpp +++ b/scripts/kalimdor/moonglade.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/kalimdor/mulgore.cpp b/scripts/kalimdor/mulgore.cpp index b516d3ad3..e8d881e15 100644 --- a/scripts/kalimdor/mulgore.cpp +++ b/scripts/kalimdor/mulgore.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/kalimdor/onyxias_lair/boss_onyxia.cpp b/scripts/kalimdor/onyxias_lair/boss_onyxia.cpp index b667978bf..b4308048e 100644 --- a/scripts/kalimdor/onyxias_lair/boss_onyxia.cpp +++ b/scripts/kalimdor/onyxias_lair/boss_onyxia.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/kalimdor/onyxias_lair/instance_onyxias_lair.cpp b/scripts/kalimdor/onyxias_lair/instance_onyxias_lair.cpp index 6ab5a58ad..e08676116 100644 --- a/scripts/kalimdor/onyxias_lair/instance_onyxias_lair.cpp +++ b/scripts/kalimdor/onyxias_lair/instance_onyxias_lair.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/kalimdor/onyxias_lair/onyxias_lair.h b/scripts/kalimdor/onyxias_lair/onyxias_lair.h index 0c44dc831..a302abd92 100644 --- a/scripts/kalimdor/onyxias_lair/onyxias_lair.h +++ b/scripts/kalimdor/onyxias_lair/onyxias_lair.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/kalimdor/orgrimmar.cpp b/scripts/kalimdor/orgrimmar.cpp index 8a63b3a24..17a000a34 100644 --- a/scripts/kalimdor/orgrimmar.cpp +++ b/scripts/kalimdor/orgrimmar.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/kalimdor/razorfen_downs/razorfen_downs.cpp b/scripts/kalimdor/razorfen_downs/razorfen_downs.cpp index 40e2aa83d..7175e0db2 100644 --- a/scripts/kalimdor/razorfen_downs/razorfen_downs.cpp +++ b/scripts/kalimdor/razorfen_downs/razorfen_downs.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/kalimdor/razorfen_kraul/instance_razorfen_kraul.cpp b/scripts/kalimdor/razorfen_kraul/instance_razorfen_kraul.cpp index 94197ba78..dfead9b0e 100644 --- a/scripts/kalimdor/razorfen_kraul/instance_razorfen_kraul.cpp +++ b/scripts/kalimdor/razorfen_kraul/instance_razorfen_kraul.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/kalimdor/razorfen_kraul/razorfen_kraul.cpp b/scripts/kalimdor/razorfen_kraul/razorfen_kraul.cpp index c04bfc1d6..27fd62f79 100644 --- a/scripts/kalimdor/razorfen_kraul/razorfen_kraul.cpp +++ b/scripts/kalimdor/razorfen_kraul/razorfen_kraul.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/kalimdor/razorfen_kraul/razorfen_kraul.h b/scripts/kalimdor/razorfen_kraul/razorfen_kraul.h index c7c946f66..151a0d804 100644 --- a/scripts/kalimdor/razorfen_kraul/razorfen_kraul.h +++ b/scripts/kalimdor/razorfen_kraul/razorfen_kraul.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/kalimdor/ruins_of_ahnqiraj/boss_ayamiss.cpp b/scripts/kalimdor/ruins_of_ahnqiraj/boss_ayamiss.cpp index 21e9e2f99..01898bd5c 100644 --- a/scripts/kalimdor/ruins_of_ahnqiraj/boss_ayamiss.cpp +++ b/scripts/kalimdor/ruins_of_ahnqiraj/boss_ayamiss.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/kalimdor/ruins_of_ahnqiraj/boss_buru.cpp b/scripts/kalimdor/ruins_of_ahnqiraj/boss_buru.cpp index dc2c2dcfd..6224a0f01 100644 --- a/scripts/kalimdor/ruins_of_ahnqiraj/boss_buru.cpp +++ b/scripts/kalimdor/ruins_of_ahnqiraj/boss_buru.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/kalimdor/ruins_of_ahnqiraj/boss_kurinnaxx.cpp b/scripts/kalimdor/ruins_of_ahnqiraj/boss_kurinnaxx.cpp index b724a42d8..5ce4ff7cf 100644 --- a/scripts/kalimdor/ruins_of_ahnqiraj/boss_kurinnaxx.cpp +++ b/scripts/kalimdor/ruins_of_ahnqiraj/boss_kurinnaxx.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/kalimdor/ruins_of_ahnqiraj/boss_moam.cpp b/scripts/kalimdor/ruins_of_ahnqiraj/boss_moam.cpp index 5b8c2c8f5..466979533 100644 --- a/scripts/kalimdor/ruins_of_ahnqiraj/boss_moam.cpp +++ b/scripts/kalimdor/ruins_of_ahnqiraj/boss_moam.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/kalimdor/ruins_of_ahnqiraj/boss_ossirian.cpp b/scripts/kalimdor/ruins_of_ahnqiraj/boss_ossirian.cpp index 398c5ea67..f09ec5db6 100644 --- a/scripts/kalimdor/ruins_of_ahnqiraj/boss_ossirian.cpp +++ b/scripts/kalimdor/ruins_of_ahnqiraj/boss_ossirian.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/kalimdor/ruins_of_ahnqiraj/boss_rajaxx.cpp b/scripts/kalimdor/ruins_of_ahnqiraj/boss_rajaxx.cpp index eb67ce03f..028dc4f7b 100644 --- a/scripts/kalimdor/ruins_of_ahnqiraj/boss_rajaxx.cpp +++ b/scripts/kalimdor/ruins_of_ahnqiraj/boss_rajaxx.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/kalimdor/ruins_of_ahnqiraj/instance_ruins_of_ahnqiraj.cpp b/scripts/kalimdor/ruins_of_ahnqiraj/instance_ruins_of_ahnqiraj.cpp index ab142a261..04bdfa687 100644 --- a/scripts/kalimdor/ruins_of_ahnqiraj/instance_ruins_of_ahnqiraj.cpp +++ b/scripts/kalimdor/ruins_of_ahnqiraj/instance_ruins_of_ahnqiraj.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/kalimdor/ruins_of_ahnqiraj/ruins_of_ahnqiraj.cpp b/scripts/kalimdor/ruins_of_ahnqiraj/ruins_of_ahnqiraj.cpp index af49b56a9..852768e69 100644 --- a/scripts/kalimdor/ruins_of_ahnqiraj/ruins_of_ahnqiraj.cpp +++ b/scripts/kalimdor/ruins_of_ahnqiraj/ruins_of_ahnqiraj.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/kalimdor/ruins_of_ahnqiraj/ruins_of_ahnqiraj.h b/scripts/kalimdor/ruins_of_ahnqiraj/ruins_of_ahnqiraj.h index 4cd568196..dd82d45ab 100644 --- a/scripts/kalimdor/ruins_of_ahnqiraj/ruins_of_ahnqiraj.h +++ b/scripts/kalimdor/ruins_of_ahnqiraj/ruins_of_ahnqiraj.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/kalimdor/silithus.cpp b/scripts/kalimdor/silithus.cpp index 1e727ccbb..e9b46a249 100644 --- a/scripts/kalimdor/silithus.cpp +++ b/scripts/kalimdor/silithus.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/kalimdor/stonetalon_mountains.cpp b/scripts/kalimdor/stonetalon_mountains.cpp index b27a88e52..b04dec0c7 100644 --- a/scripts/kalimdor/stonetalon_mountains.cpp +++ b/scripts/kalimdor/stonetalon_mountains.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/kalimdor/tanaris.cpp b/scripts/kalimdor/tanaris.cpp index a2280fcaa..fbc67df5b 100644 --- a/scripts/kalimdor/tanaris.cpp +++ b/scripts/kalimdor/tanaris.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/kalimdor/teldrassil.cpp b/scripts/kalimdor/teldrassil.cpp index 4bb702b3b..d52b67481 100644 --- a/scripts/kalimdor/teldrassil.cpp +++ b/scripts/kalimdor/teldrassil.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_bug_trio.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_bug_trio.cpp index fe7aa9b87..20499a5e8 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/boss_bug_trio.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_bug_trio.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_cthun.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_cthun.cpp index d491b32db..69f0cb916 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/boss_cthun.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_cthun.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_fankriss.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_fankriss.cpp index ba30e1f5d..3fb9eece4 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/boss_fankriss.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_fankriss.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_huhuran.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_huhuran.cpp index 9ec852ee5..80a785268 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/boss_huhuran.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_huhuran.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_ouro.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_ouro.cpp index fe7bb0272..ab523a7f0 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/boss_ouro.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_ouro.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_sartura.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_sartura.cpp index dd60f76ae..8f177660a 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/boss_sartura.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_sartura.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_skeram.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_skeram.cpp index 0c42fec84..9e54b9d5a 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/boss_skeram.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_skeram.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_twinemperors.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_twinemperors.cpp index 8bc95b547..128f16a0a 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/boss_twinemperors.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_twinemperors.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_viscidus.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_viscidus.cpp index b9c359bd7..4604961c9 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/boss_viscidus.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_viscidus.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/kalimdor/temple_of_ahnqiraj/instance_temple_of_ahnqiraj.cpp b/scripts/kalimdor/temple_of_ahnqiraj/instance_temple_of_ahnqiraj.cpp index 6bfaf3e11..5ad1f0ce3 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/instance_temple_of_ahnqiraj.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/instance_temple_of_ahnqiraj.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/kalimdor/temple_of_ahnqiraj/mob_anubisath_sentinel.cpp b/scripts/kalimdor/temple_of_ahnqiraj/mob_anubisath_sentinel.cpp index 59f30bdfe..3ab92c8bc 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/mob_anubisath_sentinel.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/mob_anubisath_sentinel.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/kalimdor/temple_of_ahnqiraj/temple_of_ahnqiraj.h b/scripts/kalimdor/temple_of_ahnqiraj/temple_of_ahnqiraj.h index 4979d1da5..93a29392f 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/temple_of_ahnqiraj.h +++ b/scripts/kalimdor/temple_of_ahnqiraj/temple_of_ahnqiraj.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/kalimdor/the_barrens.cpp b/scripts/kalimdor/the_barrens.cpp index a9f289720..b72328f1d 100644 --- a/scripts/kalimdor/the_barrens.cpp +++ b/scripts/kalimdor/the_barrens.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/kalimdor/thousand_needles.cpp b/scripts/kalimdor/thousand_needles.cpp index cefce8352..3ece79670 100644 --- a/scripts/kalimdor/thousand_needles.cpp +++ b/scripts/kalimdor/thousand_needles.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/kalimdor/thunder_bluff.cpp b/scripts/kalimdor/thunder_bluff.cpp index 36e8e8f7f..53022a4a6 100644 --- a/scripts/kalimdor/thunder_bluff.cpp +++ b/scripts/kalimdor/thunder_bluff.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/kalimdor/ungoro_crater.cpp b/scripts/kalimdor/ungoro_crater.cpp index 6989542f4..e1206ae37 100644 --- a/scripts/kalimdor/ungoro_crater.cpp +++ b/scripts/kalimdor/ungoro_crater.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/kalimdor/wailing_caverns/instance_wailing_caverns.cpp b/scripts/kalimdor/wailing_caverns/instance_wailing_caverns.cpp index 15d019efd..c890e2e8b 100644 --- a/scripts/kalimdor/wailing_caverns/instance_wailing_caverns.cpp +++ b/scripts/kalimdor/wailing_caverns/instance_wailing_caverns.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/kalimdor/wailing_caverns/wailing_caverns.cpp b/scripts/kalimdor/wailing_caverns/wailing_caverns.cpp index 2a2a3831e..59211168f 100644 --- a/scripts/kalimdor/wailing_caverns/wailing_caverns.cpp +++ b/scripts/kalimdor/wailing_caverns/wailing_caverns.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/kalimdor/wailing_caverns/wailing_caverns.h b/scripts/kalimdor/wailing_caverns/wailing_caverns.h index 8b2806762..a9d043027 100644 --- a/scripts/kalimdor/wailing_caverns/wailing_caverns.h +++ b/scripts/kalimdor/wailing_caverns/wailing_caverns.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/kalimdor/winterspring.cpp b/scripts/kalimdor/winterspring.cpp index f1903f92d..4bfe3ed00 100644 --- a/scripts/kalimdor/winterspring.cpp +++ b/scripts/kalimdor/winterspring.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/kalimdor/zulfarrak/boss_zumrah.cpp b/scripts/kalimdor/zulfarrak/boss_zumrah.cpp index b8e9d651b..c3dbda65c 100644 --- a/scripts/kalimdor/zulfarrak/boss_zumrah.cpp +++ b/scripts/kalimdor/zulfarrak/boss_zumrah.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/kalimdor/zulfarrak/instance_zulfarrak.cpp b/scripts/kalimdor/zulfarrak/instance_zulfarrak.cpp index 7e282e139..be5e4bf4f 100644 --- a/scripts/kalimdor/zulfarrak/instance_zulfarrak.cpp +++ b/scripts/kalimdor/zulfarrak/instance_zulfarrak.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/kalimdor/zulfarrak/zulfarrak.cpp b/scripts/kalimdor/zulfarrak/zulfarrak.cpp index 8040c7e9d..f0270deba 100644 --- a/scripts/kalimdor/zulfarrak/zulfarrak.cpp +++ b/scripts/kalimdor/zulfarrak/zulfarrak.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/kalimdor/zulfarrak/zulfarrak.h b/scripts/kalimdor/zulfarrak/zulfarrak.h index 17af8012d..ba3e9bd2c 100644 --- a/scripts/kalimdor/zulfarrak/zulfarrak.h +++ b/scripts/kalimdor/zulfarrak/zulfarrak.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/northrend/azjol-nerub/ahnkahet/ahnkahet.h b/scripts/northrend/azjol-nerub/ahnkahet/ahnkahet.h index 79c0c9839..19b421363 100644 --- a/scripts/northrend/azjol-nerub/ahnkahet/ahnkahet.h +++ b/scripts/northrend/azjol-nerub/ahnkahet/ahnkahet.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/northrend/azjol-nerub/ahnkahet/boss_amanitar.cpp b/scripts/northrend/azjol-nerub/ahnkahet/boss_amanitar.cpp index 76e27b26e..2bf4be6b4 100644 --- a/scripts/northrend/azjol-nerub/ahnkahet/boss_amanitar.cpp +++ b/scripts/northrend/azjol-nerub/ahnkahet/boss_amanitar.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/northrend/azjol-nerub/ahnkahet/boss_jedoga.cpp b/scripts/northrend/azjol-nerub/ahnkahet/boss_jedoga.cpp index ef189548f..22fe404b2 100644 --- a/scripts/northrend/azjol-nerub/ahnkahet/boss_jedoga.cpp +++ b/scripts/northrend/azjol-nerub/ahnkahet/boss_jedoga.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/northrend/azjol-nerub/ahnkahet/boss_nadox.cpp b/scripts/northrend/azjol-nerub/ahnkahet/boss_nadox.cpp index 789cd66cb..1525698aa 100644 --- a/scripts/northrend/azjol-nerub/ahnkahet/boss_nadox.cpp +++ b/scripts/northrend/azjol-nerub/ahnkahet/boss_nadox.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/northrend/azjol-nerub/ahnkahet/boss_taldaram.cpp b/scripts/northrend/azjol-nerub/ahnkahet/boss_taldaram.cpp index 1dc4013ec..3987ec99a 100644 --- a/scripts/northrend/azjol-nerub/ahnkahet/boss_taldaram.cpp +++ b/scripts/northrend/azjol-nerub/ahnkahet/boss_taldaram.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/northrend/azjol-nerub/ahnkahet/boss_volazj.cpp b/scripts/northrend/azjol-nerub/ahnkahet/boss_volazj.cpp index 63277c9f2..3e22e5583 100644 --- a/scripts/northrend/azjol-nerub/ahnkahet/boss_volazj.cpp +++ b/scripts/northrend/azjol-nerub/ahnkahet/boss_volazj.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/northrend/azjol-nerub/ahnkahet/instance_ahnkahet.cpp b/scripts/northrend/azjol-nerub/ahnkahet/instance_ahnkahet.cpp index 3ad55c37a..b7a3368fa 100644 --- a/scripts/northrend/azjol-nerub/ahnkahet/instance_ahnkahet.cpp +++ b/scripts/northrend/azjol-nerub/ahnkahet/instance_ahnkahet.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/northrend/azjol-nerub/azjol-nerub/azjol-nerub.h b/scripts/northrend/azjol-nerub/azjol-nerub/azjol-nerub.h index d6b5e7d8a..86371e458 100644 --- a/scripts/northrend/azjol-nerub/azjol-nerub/azjol-nerub.h +++ b/scripts/northrend/azjol-nerub/azjol-nerub/azjol-nerub.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/northrend/azjol-nerub/azjol-nerub/boss_anubarak.cpp b/scripts/northrend/azjol-nerub/azjol-nerub/boss_anubarak.cpp index cb5134499..0cd8a27ed 100644 --- a/scripts/northrend/azjol-nerub/azjol-nerub/boss_anubarak.cpp +++ b/scripts/northrend/azjol-nerub/azjol-nerub/boss_anubarak.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/northrend/azjol-nerub/azjol-nerub/boss_hadronox.cpp b/scripts/northrend/azjol-nerub/azjol-nerub/boss_hadronox.cpp index 5b7a1412b..e2ff10056 100644 --- a/scripts/northrend/azjol-nerub/azjol-nerub/boss_hadronox.cpp +++ b/scripts/northrend/azjol-nerub/azjol-nerub/boss_hadronox.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/northrend/azjol-nerub/azjol-nerub/boss_krikthir.cpp b/scripts/northrend/azjol-nerub/azjol-nerub/boss_krikthir.cpp index 7256fded6..fe2cca1f9 100644 --- a/scripts/northrend/azjol-nerub/azjol-nerub/boss_krikthir.cpp +++ b/scripts/northrend/azjol-nerub/azjol-nerub/boss_krikthir.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/northrend/azjol-nerub/azjol-nerub/instance_azjol-nerub.cpp b/scripts/northrend/azjol-nerub/azjol-nerub/instance_azjol-nerub.cpp index cf01029a2..4a6f7be9e 100644 --- a/scripts/northrend/azjol-nerub/azjol-nerub/instance_azjol-nerub.cpp +++ b/scripts/northrend/azjol-nerub/azjol-nerub/instance_azjol-nerub.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/northrend/borean_tundra.cpp b/scripts/northrend/borean_tundra.cpp index e234d1387..490638143 100644 --- a/scripts/northrend/borean_tundra.cpp +++ b/scripts/northrend/borean_tundra.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_grand_champions.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_grand_champions.cpp index f0e1e2034..fbc2cb1d4 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_grand_champions.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_grand_champions.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/instance_trial_of_the_champion.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/instance_trial_of_the_champion.cpp index b1137a127..c3e705c50 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/instance_trial_of_the_champion.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/instance_trial_of_the_champion.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.cpp index ed82aa8d6..9f847a53f 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.h b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.h index c891b24d2..3e3fabac2 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.h +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp index 68e272b5c..1d04ace66 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_faction_champions.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_faction_champions.cpp index c96032af5..79819da38 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_faction_champions.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_faction_champions.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_jaraxxus.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_jaraxxus.cpp index 406a52af5..c48cc5fe3 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_jaraxxus.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_jaraxxus.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp index b19af6074..72e363300 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp index 8929b2cb3..516e785d3 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp index c03738a98..53eef207a 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp index e01e59b7f..c2ee85b87 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h index 0e40a8435..66244d528 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/northrend/dalaran.cpp b/scripts/northrend/dalaran.cpp index aaa1835c4..269409d35 100644 --- a/scripts/northrend/dalaran.cpp +++ b/scripts/northrend/dalaran.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/northrend/dragonblight.cpp b/scripts/northrend/dragonblight.cpp index 8c47d8616..6b999d09e 100644 --- a/scripts/northrend/dragonblight.cpp +++ b/scripts/northrend/dragonblight.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/northrend/draktharon_keep/boss_novos.cpp b/scripts/northrend/draktharon_keep/boss_novos.cpp index 551db474b..f0581d31d 100644 --- a/scripts/northrend/draktharon_keep/boss_novos.cpp +++ b/scripts/northrend/draktharon_keep/boss_novos.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/northrend/draktharon_keep/boss_tharonja.cpp b/scripts/northrend/draktharon_keep/boss_tharonja.cpp index a241373bd..b2cf4da90 100644 --- a/scripts/northrend/draktharon_keep/boss_tharonja.cpp +++ b/scripts/northrend/draktharon_keep/boss_tharonja.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/northrend/draktharon_keep/boss_trollgore.cpp b/scripts/northrend/draktharon_keep/boss_trollgore.cpp index d558f4c07..df150c9a6 100644 --- a/scripts/northrend/draktharon_keep/boss_trollgore.cpp +++ b/scripts/northrend/draktharon_keep/boss_trollgore.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/northrend/draktharon_keep/draktharon_keep.h b/scripts/northrend/draktharon_keep/draktharon_keep.h index 72966f013..f1f4ecfec 100644 --- a/scripts/northrend/draktharon_keep/draktharon_keep.h +++ b/scripts/northrend/draktharon_keep/draktharon_keep.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/northrend/draktharon_keep/instance_draktharon_keep.cpp b/scripts/northrend/draktharon_keep/instance_draktharon_keep.cpp index ba5ec920a..09d72a0aa 100644 --- a/scripts/northrend/draktharon_keep/instance_draktharon_keep.cpp +++ b/scripts/northrend/draktharon_keep/instance_draktharon_keep.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/northrend/grizzly_hills.cpp b/scripts/northrend/grizzly_hills.cpp index a5aef48a1..62afe35c2 100644 --- a/scripts/northrend/grizzly_hills.cpp +++ b/scripts/northrend/grizzly_hills.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/northrend/gundrak/boss_colossus.cpp b/scripts/northrend/gundrak/boss_colossus.cpp index 5a4dbd960..c00e70ed9 100644 --- a/scripts/northrend/gundrak/boss_colossus.cpp +++ b/scripts/northrend/gundrak/boss_colossus.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/northrend/gundrak/boss_eck.cpp b/scripts/northrend/gundrak/boss_eck.cpp index 07223fcb4..daa382107 100644 --- a/scripts/northrend/gundrak/boss_eck.cpp +++ b/scripts/northrend/gundrak/boss_eck.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/northrend/gundrak/boss_galdarah.cpp b/scripts/northrend/gundrak/boss_galdarah.cpp index a6a8a1409..0c30acf5f 100644 --- a/scripts/northrend/gundrak/boss_galdarah.cpp +++ b/scripts/northrend/gundrak/boss_galdarah.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/northrend/gundrak/boss_moorabi.cpp b/scripts/northrend/gundrak/boss_moorabi.cpp index f4f80f66d..1759dc407 100644 --- a/scripts/northrend/gundrak/boss_moorabi.cpp +++ b/scripts/northrend/gundrak/boss_moorabi.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/northrend/gundrak/boss_sladran.cpp b/scripts/northrend/gundrak/boss_sladran.cpp index ab9382f4a..6c564c9cd 100644 --- a/scripts/northrend/gundrak/boss_sladran.cpp +++ b/scripts/northrend/gundrak/boss_sladran.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/northrend/gundrak/gundrak.h b/scripts/northrend/gundrak/gundrak.h index 4bb3d00f6..48d6e477a 100644 --- a/scripts/northrend/gundrak/gundrak.h +++ b/scripts/northrend/gundrak/gundrak.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/northrend/gundrak/instance_gundrak.cpp b/scripts/northrend/gundrak/instance_gundrak.cpp index 9f8985c18..acc831abe 100644 --- a/scripts/northrend/gundrak/instance_gundrak.cpp +++ b/scripts/northrend/gundrak/instance_gundrak.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/northrend/howling_fjord.cpp b/scripts/northrend/howling_fjord.cpp index 95e167d8f..93d8de8e4 100644 --- a/scripts/northrend/howling_fjord.cpp +++ b/scripts/northrend/howling_fjord.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/northrend/icecrown.cpp b/scripts/northrend/icecrown.cpp index 6d9996bc0..69c48ffff 100644 --- a/scripts/northrend/icecrown.cpp +++ b/scripts/northrend/icecrown.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_bronjahm.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_bronjahm.cpp index 73d05a2d2..1026dd0fd 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_bronjahm.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_bronjahm.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_devourer_of_souls.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_devourer_of_souls.cpp index 4869dabb8..d3b30bdc2 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_devourer_of_souls.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_devourer_of_souls.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/forge_of_souls.h b/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/forge_of_souls.h index aea79cd80..8c0efdd41 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/forge_of_souls.h +++ b/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/forge_of_souls.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/instance_forge_of_souls.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/instance_forge_of_souls.cpp index 01254d8bf..8ea4ac374 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/instance_forge_of_souls.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/instance_forge_of_souls.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/boss_falric.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/boss_falric.cpp index 221a0bea1..0a3c76b26 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/boss_falric.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/boss_falric.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/boss_lich_king.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/boss_lich_king.cpp index 26fd3d6ae..86aed8f08 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/boss_lich_king.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/boss_lich_king.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/boss_marwyn.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/boss_marwyn.cpp index 429639aa0..c7789c3ec 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/boss_marwyn.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/boss_marwyn.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/halls_of_reflection.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/halls_of_reflection.cpp index 9e9bf72b4..6fb3dcac0 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/halls_of_reflection.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/halls_of_reflection.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/halls_of_reflection.h b/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/halls_of_reflection.h index 6b5f9ef47..1fc83fe24 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/halls_of_reflection.h +++ b/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/halls_of_reflection.h @@ -1,3 +1,3 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/instance_halls_of_reflection.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/instance_halls_of_reflection.cpp index da5c3bfdb..d954bfedb 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/instance_halls_of_reflection.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/instance_halls_of_reflection.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_forgemaster_garfrost.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_forgemaster_garfrost.cpp index 6eb17dfb0..b6e8f6ff3 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_forgemaster_garfrost.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_forgemaster_garfrost.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_krick_and_ick.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_krick_and_ick.cpp index 81095ceb3..93aef1d76 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_krick_and_ick.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_krick_and_ick.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_scourgelord_tyrannus.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_scourgelord_tyrannus.cpp index cde1dc225..6ca22d8df 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_scourgelord_tyrannus.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_scourgelord_tyrannus.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/instance_pit_of_saron.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/instance_pit_of_saron.cpp index 5b22def5f..aa71e48a2 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/instance_pit_of_saron.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/instance_pit_of_saron.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/pit_of_saron.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/pit_of_saron.cpp index 22e22eed0..720ecdba2 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/pit_of_saron.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/pit_of_saron.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/pit_of_saron.h b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/pit_of_saron.h index b9df43705..3cd959e6d 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/pit_of_saron.h +++ b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/pit_of_saron.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/blood_prince_council.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/blood_prince_council.cpp index b2756deea..1437c8b22 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/blood_prince_council.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/blood_prince_council.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_blood_queen_lanathel.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_blood_queen_lanathel.cpp index 4ac4b2b91..8e16a68e1 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_blood_queen_lanathel.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_blood_queen_lanathel.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp index e40446b3f..7083650ad 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_festergut.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_festergut.cpp index 0f5a7b57c..e1cbe2049 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_festergut.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_festergut.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lady_deathwhisper.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lady_deathwhisper.cpp index fb626f472..f36a280d5 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lady_deathwhisper.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lady_deathwhisper.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp index 867e8b62f..2112bece9 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_professor_putricide.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_professor_putricide.cpp index dd480219e..9777f51b4 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_professor_putricide.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_professor_putricide.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_rotface.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_rotface.cpp index 49661aaa2..9fc31bd4e 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_rotface.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_rotface.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp index 3dbbfb176..e2b2eef81 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_the_lich_king.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_the_lich_king.cpp index c2b6cca07..885321397 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_the_lich_king.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_the_lich_king.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_valithria_dreamwalker.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_valithria_dreamwalker.cpp index eacb0173c..8780c7148 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_valithria_dreamwalker.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_valithria_dreamwalker.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/gunship_battle.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/gunship_battle.cpp index 499996995..438046a0c 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/gunship_battle.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/gunship_battle.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_citadel.h b/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_citadel.h index 4187c85f3..727fe4f37 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_citadel.h +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_citadel.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_citadel.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_citadel.cpp index f9a1e0eab..83f5de335 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_citadel.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_citadel.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/northrend/naxxramas/boss_anubrekhan.cpp b/scripts/northrend/naxxramas/boss_anubrekhan.cpp index 774a3ed50..8b61168fa 100644 --- a/scripts/northrend/naxxramas/boss_anubrekhan.cpp +++ b/scripts/northrend/naxxramas/boss_anubrekhan.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/northrend/naxxramas/boss_faerlina.cpp b/scripts/northrend/naxxramas/boss_faerlina.cpp index 62cad6376..658e08f67 100644 --- a/scripts/northrend/naxxramas/boss_faerlina.cpp +++ b/scripts/northrend/naxxramas/boss_faerlina.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/northrend/naxxramas/boss_four_horsemen.cpp b/scripts/northrend/naxxramas/boss_four_horsemen.cpp index 6a929d322..f81a28f23 100644 --- a/scripts/northrend/naxxramas/boss_four_horsemen.cpp +++ b/scripts/northrend/naxxramas/boss_four_horsemen.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/northrend/naxxramas/boss_gluth.cpp b/scripts/northrend/naxxramas/boss_gluth.cpp index d2b2de752..ba6e0e86a 100644 --- a/scripts/northrend/naxxramas/boss_gluth.cpp +++ b/scripts/northrend/naxxramas/boss_gluth.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/northrend/naxxramas/boss_gothik.cpp b/scripts/northrend/naxxramas/boss_gothik.cpp index a2bda6c50..55b6263ec 100644 --- a/scripts/northrend/naxxramas/boss_gothik.cpp +++ b/scripts/northrend/naxxramas/boss_gothik.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/northrend/naxxramas/boss_grobbulus.cpp b/scripts/northrend/naxxramas/boss_grobbulus.cpp index c057bd722..9d34f490e 100644 --- a/scripts/northrend/naxxramas/boss_grobbulus.cpp +++ b/scripts/northrend/naxxramas/boss_grobbulus.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/northrend/naxxramas/boss_heigan.cpp b/scripts/northrend/naxxramas/boss_heigan.cpp index a843ee286..43269820d 100644 --- a/scripts/northrend/naxxramas/boss_heigan.cpp +++ b/scripts/northrend/naxxramas/boss_heigan.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/northrend/naxxramas/boss_kelthuzad.cpp b/scripts/northrend/naxxramas/boss_kelthuzad.cpp index 79bd73edb..85b66d5ed 100644 --- a/scripts/northrend/naxxramas/boss_kelthuzad.cpp +++ b/scripts/northrend/naxxramas/boss_kelthuzad.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/northrend/naxxramas/boss_loatheb.cpp b/scripts/northrend/naxxramas/boss_loatheb.cpp index 70c300102..7c8acc130 100644 --- a/scripts/northrend/naxxramas/boss_loatheb.cpp +++ b/scripts/northrend/naxxramas/boss_loatheb.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/northrend/naxxramas/boss_maexxna.cpp b/scripts/northrend/naxxramas/boss_maexxna.cpp index 724b3a424..8a78590ba 100644 --- a/scripts/northrend/naxxramas/boss_maexxna.cpp +++ b/scripts/northrend/naxxramas/boss_maexxna.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/northrend/naxxramas/boss_noth.cpp b/scripts/northrend/naxxramas/boss_noth.cpp index 9b417157e..f048c9e0c 100644 --- a/scripts/northrend/naxxramas/boss_noth.cpp +++ b/scripts/northrend/naxxramas/boss_noth.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/northrend/naxxramas/boss_patchwerk.cpp b/scripts/northrend/naxxramas/boss_patchwerk.cpp index 9c98fb7fa..04382e489 100644 --- a/scripts/northrend/naxxramas/boss_patchwerk.cpp +++ b/scripts/northrend/naxxramas/boss_patchwerk.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/northrend/naxxramas/boss_razuvious.cpp b/scripts/northrend/naxxramas/boss_razuvious.cpp index 6211c9ef0..8cc2c7484 100644 --- a/scripts/northrend/naxxramas/boss_razuvious.cpp +++ b/scripts/northrend/naxxramas/boss_razuvious.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/northrend/naxxramas/boss_sapphiron.cpp b/scripts/northrend/naxxramas/boss_sapphiron.cpp index 463837ac3..2f53da49b 100644 --- a/scripts/northrend/naxxramas/boss_sapphiron.cpp +++ b/scripts/northrend/naxxramas/boss_sapphiron.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/northrend/naxxramas/boss_thaddius.cpp b/scripts/northrend/naxxramas/boss_thaddius.cpp index ccca652a4..d2604cdca 100644 --- a/scripts/northrend/naxxramas/boss_thaddius.cpp +++ b/scripts/northrend/naxxramas/boss_thaddius.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/northrend/naxxramas/instance_naxxramas.cpp b/scripts/northrend/naxxramas/instance_naxxramas.cpp index c3f61f327..b9fb7bc5f 100644 --- a/scripts/northrend/naxxramas/instance_naxxramas.cpp +++ b/scripts/northrend/naxxramas/instance_naxxramas.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/northrend/naxxramas/naxxramas.h b/scripts/northrend/naxxramas/naxxramas.h index db19ea183..455e666ff 100644 --- a/scripts/northrend/naxxramas/naxxramas.h +++ b/scripts/northrend/naxxramas/naxxramas.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/northrend/nexus/eye_of_eternity/boss_malygos.cpp b/scripts/northrend/nexus/eye_of_eternity/boss_malygos.cpp index dbdec7095..3124fe1e4 100644 --- a/scripts/northrend/nexus/eye_of_eternity/boss_malygos.cpp +++ b/scripts/northrend/nexus/eye_of_eternity/boss_malygos.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/northrend/nexus/eye_of_eternity/eye_of_eternity.h b/scripts/northrend/nexus/eye_of_eternity/eye_of_eternity.h index 20a16528e..361045f59 100644 --- a/scripts/northrend/nexus/eye_of_eternity/eye_of_eternity.h +++ b/scripts/northrend/nexus/eye_of_eternity/eye_of_eternity.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/northrend/nexus/eye_of_eternity/instance_eye_of_eternity.cpp b/scripts/northrend/nexus/eye_of_eternity/instance_eye_of_eternity.cpp index d5d77e518..4599ed502 100644 --- a/scripts/northrend/nexus/eye_of_eternity/instance_eye_of_eternity.cpp +++ b/scripts/northrend/nexus/eye_of_eternity/instance_eye_of_eternity.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/northrend/nexus/nexus/boss_anomalus.cpp b/scripts/northrend/nexus/nexus/boss_anomalus.cpp index ba79015cc..bf762112c 100644 --- a/scripts/northrend/nexus/nexus/boss_anomalus.cpp +++ b/scripts/northrend/nexus/nexus/boss_anomalus.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/northrend/nexus/nexus/boss_keristrasza.cpp b/scripts/northrend/nexus/nexus/boss_keristrasza.cpp index 179ada3c8..0a1a55b67 100644 --- a/scripts/northrend/nexus/nexus/boss_keristrasza.cpp +++ b/scripts/northrend/nexus/nexus/boss_keristrasza.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/northrend/nexus/nexus/boss_ormorok.cpp b/scripts/northrend/nexus/nexus/boss_ormorok.cpp index 32d859596..93284f619 100644 --- a/scripts/northrend/nexus/nexus/boss_ormorok.cpp +++ b/scripts/northrend/nexus/nexus/boss_ormorok.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/northrend/nexus/nexus/boss_telestra.cpp b/scripts/northrend/nexus/nexus/boss_telestra.cpp index bfc389afe..9ec856a21 100644 --- a/scripts/northrend/nexus/nexus/boss_telestra.cpp +++ b/scripts/northrend/nexus/nexus/boss_telestra.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/northrend/nexus/nexus/instance_nexus.cpp b/scripts/northrend/nexus/nexus/instance_nexus.cpp index 4ad9d755a..6049384ca 100644 --- a/scripts/northrend/nexus/nexus/instance_nexus.cpp +++ b/scripts/northrend/nexus/nexus/instance_nexus.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/northrend/nexus/nexus/nexus.h b/scripts/northrend/nexus/nexus/nexus.h index c3a108fad..4c24b4bdb 100644 --- a/scripts/northrend/nexus/nexus/nexus.h +++ b/scripts/northrend/nexus/nexus/nexus.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/northrend/nexus/oculus/boss_eregos.cpp b/scripts/northrend/nexus/oculus/boss_eregos.cpp index 837162d1b..4d3e84a46 100644 --- a/scripts/northrend/nexus/oculus/boss_eregos.cpp +++ b/scripts/northrend/nexus/oculus/boss_eregos.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/northrend/nexus/oculus/boss_urom.cpp b/scripts/northrend/nexus/oculus/boss_urom.cpp index 454d56a46..94784fd92 100644 --- a/scripts/northrend/nexus/oculus/boss_urom.cpp +++ b/scripts/northrend/nexus/oculus/boss_urom.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/northrend/nexus/oculus/boss_varos.cpp b/scripts/northrend/nexus/oculus/boss_varos.cpp index 73c46ce76..36e13a00b 100644 --- a/scripts/northrend/nexus/oculus/boss_varos.cpp +++ b/scripts/northrend/nexus/oculus/boss_varos.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/northrend/nexus/oculus/instance_oculus.cpp b/scripts/northrend/nexus/oculus/instance_oculus.cpp index 48207698c..a1d831279 100644 --- a/scripts/northrend/nexus/oculus/instance_oculus.cpp +++ b/scripts/northrend/nexus/oculus/instance_oculus.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/northrend/nexus/oculus/oculus.cpp b/scripts/northrend/nexus/oculus/oculus.cpp index 97d9e0a55..c27ede2c0 100644 --- a/scripts/northrend/nexus/oculus/oculus.cpp +++ b/scripts/northrend/nexus/oculus/oculus.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/northrend/nexus/oculus/oculus.h b/scripts/northrend/nexus/oculus/oculus.h index c1efd4944..d49bf209b 100644 --- a/scripts/northrend/nexus/oculus/oculus.h +++ b/scripts/northrend/nexus/oculus/oculus.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/northrend/obsidian_sanctum/boss_sartharion.cpp b/scripts/northrend/obsidian_sanctum/boss_sartharion.cpp index f52d5a5ef..a5a30ed5a 100644 --- a/scripts/northrend/obsidian_sanctum/boss_sartharion.cpp +++ b/scripts/northrend/obsidian_sanctum/boss_sartharion.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/northrend/obsidian_sanctum/instance_obsidian_sanctum.cpp b/scripts/northrend/obsidian_sanctum/instance_obsidian_sanctum.cpp index 9371b0790..3fb433e21 100644 --- a/scripts/northrend/obsidian_sanctum/instance_obsidian_sanctum.cpp +++ b/scripts/northrend/obsidian_sanctum/instance_obsidian_sanctum.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/northrend/obsidian_sanctum/obsidian_sanctum.h b/scripts/northrend/obsidian_sanctum/obsidian_sanctum.h index f5701d1f7..d25635c4f 100644 --- a/scripts/northrend/obsidian_sanctum/obsidian_sanctum.h +++ b/scripts/northrend/obsidian_sanctum/obsidian_sanctum.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/northrend/ruby_sanctum/boss_baltharus.cpp b/scripts/northrend/ruby_sanctum/boss_baltharus.cpp index 5ce262e60..20e6d3514 100644 --- a/scripts/northrend/ruby_sanctum/boss_baltharus.cpp +++ b/scripts/northrend/ruby_sanctum/boss_baltharus.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/northrend/ruby_sanctum/boss_halion.cpp b/scripts/northrend/ruby_sanctum/boss_halion.cpp index ed1fd5aec..d5df77877 100644 --- a/scripts/northrend/ruby_sanctum/boss_halion.cpp +++ b/scripts/northrend/ruby_sanctum/boss_halion.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/northrend/ruby_sanctum/boss_saviana.cpp b/scripts/northrend/ruby_sanctum/boss_saviana.cpp index 202453790..1f1f601f8 100644 --- a/scripts/northrend/ruby_sanctum/boss_saviana.cpp +++ b/scripts/northrend/ruby_sanctum/boss_saviana.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/northrend/ruby_sanctum/boss_zarithrian.cpp b/scripts/northrend/ruby_sanctum/boss_zarithrian.cpp index 1a81c095b..1608d6628 100644 --- a/scripts/northrend/ruby_sanctum/boss_zarithrian.cpp +++ b/scripts/northrend/ruby_sanctum/boss_zarithrian.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/northrend/ruby_sanctum/instance_ruby_sanctum.cpp b/scripts/northrend/ruby_sanctum/instance_ruby_sanctum.cpp index 8a8e2153e..466f3fd15 100644 --- a/scripts/northrend/ruby_sanctum/instance_ruby_sanctum.cpp +++ b/scripts/northrend/ruby_sanctum/instance_ruby_sanctum.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/northrend/ruby_sanctum/ruby_sanctum.h b/scripts/northrend/ruby_sanctum/ruby_sanctum.h index 25dd95826..03c7111c9 100644 --- a/scripts/northrend/ruby_sanctum/ruby_sanctum.h +++ b/scripts/northrend/ruby_sanctum/ruby_sanctum.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/northrend/sholazar_basin.cpp b/scripts/northrend/sholazar_basin.cpp index 35538c208..b11ec06fb 100644 --- a/scripts/northrend/sholazar_basin.cpp +++ b/scripts/northrend/sholazar_basin.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/northrend/storm_peaks.cpp b/scripts/northrend/storm_peaks.cpp index 30af59e76..f121da545 100644 --- a/scripts/northrend/storm_peaks.cpp +++ b/scripts/northrend/storm_peaks.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/northrend/ulduar/halls_of_lightning/boss_bjarngrim.cpp b/scripts/northrend/ulduar/halls_of_lightning/boss_bjarngrim.cpp index 3c62f7b88..06ecfe77a 100644 --- a/scripts/northrend/ulduar/halls_of_lightning/boss_bjarngrim.cpp +++ b/scripts/northrend/ulduar/halls_of_lightning/boss_bjarngrim.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/northrend/ulduar/halls_of_lightning/boss_ionar.cpp b/scripts/northrend/ulduar/halls_of_lightning/boss_ionar.cpp index dd02eab7a..9d90d21d9 100644 --- a/scripts/northrend/ulduar/halls_of_lightning/boss_ionar.cpp +++ b/scripts/northrend/ulduar/halls_of_lightning/boss_ionar.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/northrend/ulduar/halls_of_lightning/boss_loken.cpp b/scripts/northrend/ulduar/halls_of_lightning/boss_loken.cpp index 53afaa5d9..bda8ad266 100644 --- a/scripts/northrend/ulduar/halls_of_lightning/boss_loken.cpp +++ b/scripts/northrend/ulduar/halls_of_lightning/boss_loken.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/northrend/ulduar/halls_of_lightning/boss_volkhan.cpp b/scripts/northrend/ulduar/halls_of_lightning/boss_volkhan.cpp index 12b857347..e7beb22bd 100644 --- a/scripts/northrend/ulduar/halls_of_lightning/boss_volkhan.cpp +++ b/scripts/northrend/ulduar/halls_of_lightning/boss_volkhan.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/northrend/ulduar/halls_of_lightning/halls_of_lightning.h b/scripts/northrend/ulduar/halls_of_lightning/halls_of_lightning.h index d0cd8340f..d2286421e 100644 --- a/scripts/northrend/ulduar/halls_of_lightning/halls_of_lightning.h +++ b/scripts/northrend/ulduar/halls_of_lightning/halls_of_lightning.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/northrend/ulduar/halls_of_lightning/instance_halls_of_lightning.cpp b/scripts/northrend/ulduar/halls_of_lightning/instance_halls_of_lightning.cpp index 94e4c70f8..74c0a9e35 100644 --- a/scripts/northrend/ulduar/halls_of_lightning/instance_halls_of_lightning.cpp +++ b/scripts/northrend/ulduar/halls_of_lightning/instance_halls_of_lightning.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/northrend/ulduar/halls_of_stone/boss_maiden_of_grief.cpp b/scripts/northrend/ulduar/halls_of_stone/boss_maiden_of_grief.cpp index 2dcbf679b..3f658af29 100644 --- a/scripts/northrend/ulduar/halls_of_stone/boss_maiden_of_grief.cpp +++ b/scripts/northrend/ulduar/halls_of_stone/boss_maiden_of_grief.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/northrend/ulduar/halls_of_stone/boss_sjonnir.cpp b/scripts/northrend/ulduar/halls_of_stone/boss_sjonnir.cpp index 5aa7ab76b..ca1cdc0d1 100644 --- a/scripts/northrend/ulduar/halls_of_stone/boss_sjonnir.cpp +++ b/scripts/northrend/ulduar/halls_of_stone/boss_sjonnir.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.cpp b/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.cpp index 3e21d1a2c..79eaaa5f8 100644 --- a/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.cpp +++ b/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.h b/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.h index 6051eb6e3..ea254374d 100644 --- a/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.h +++ b/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/northrend/ulduar/halls_of_stone/instance_halls_of_stone.cpp b/scripts/northrend/ulduar/halls_of_stone/instance_halls_of_stone.cpp index 0d325193f..d28d3eac5 100644 --- a/scripts/northrend/ulduar/halls_of_stone/instance_halls_of_stone.cpp +++ b/scripts/northrend/ulduar/halls_of_stone/instance_halls_of_stone.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/northrend/ulduar/ulduar/assembly_of_iron.cpp b/scripts/northrend/ulduar/ulduar/assembly_of_iron.cpp index a6a318c06..abe413c3b 100644 --- a/scripts/northrend/ulduar/ulduar/assembly_of_iron.cpp +++ b/scripts/northrend/ulduar/ulduar/assembly_of_iron.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/northrend/ulduar/ulduar/boss_algalon.cpp b/scripts/northrend/ulduar/ulduar/boss_algalon.cpp index e4746f05c..cd7747ac4 100644 --- a/scripts/northrend/ulduar/ulduar/boss_algalon.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_algalon.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/northrend/ulduar/ulduar/boss_auriaya.cpp b/scripts/northrend/ulduar/ulduar/boss_auriaya.cpp index 9a1d86b5e..4e92eae06 100644 --- a/scripts/northrend/ulduar/ulduar/boss_auriaya.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_auriaya.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/northrend/ulduar/ulduar/boss_flame_leviathan.cpp b/scripts/northrend/ulduar/ulduar/boss_flame_leviathan.cpp index a6e7ca3c3..797e2966f 100644 --- a/scripts/northrend/ulduar/ulduar/boss_flame_leviathan.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_flame_leviathan.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/northrend/ulduar/ulduar/boss_freya.cpp b/scripts/northrend/ulduar/ulduar/boss_freya.cpp index 4b54ce258..0b7cc0453 100644 --- a/scripts/northrend/ulduar/ulduar/boss_freya.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_freya.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/northrend/ulduar/ulduar/boss_general_vezax.cpp b/scripts/northrend/ulduar/ulduar/boss_general_vezax.cpp index 350037731..f9adc2875 100644 --- a/scripts/northrend/ulduar/ulduar/boss_general_vezax.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_general_vezax.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/northrend/ulduar/ulduar/boss_hodir.cpp b/scripts/northrend/ulduar/ulduar/boss_hodir.cpp index 668dcfb22..bb1ea4733 100644 --- a/scripts/northrend/ulduar/ulduar/boss_hodir.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_hodir.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/northrend/ulduar/ulduar/boss_ignis.cpp b/scripts/northrend/ulduar/ulduar/boss_ignis.cpp index ad220d46f..494149110 100644 --- a/scripts/northrend/ulduar/ulduar/boss_ignis.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_ignis.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/northrend/ulduar/ulduar/boss_kologarn.cpp b/scripts/northrend/ulduar/ulduar/boss_kologarn.cpp index c6271c692..33606e301 100644 --- a/scripts/northrend/ulduar/ulduar/boss_kologarn.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_kologarn.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/northrend/ulduar/ulduar/boss_mimiron.cpp b/scripts/northrend/ulduar/ulduar/boss_mimiron.cpp index 4ff72fef5..2b8112f51 100644 --- a/scripts/northrend/ulduar/ulduar/boss_mimiron.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_mimiron.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/northrend/ulduar/ulduar/boss_razorscale.cpp b/scripts/northrend/ulduar/ulduar/boss_razorscale.cpp index b561e4c5f..54748a440 100644 --- a/scripts/northrend/ulduar/ulduar/boss_razorscale.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_razorscale.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/northrend/ulduar/ulduar/boss_thorim.cpp b/scripts/northrend/ulduar/ulduar/boss_thorim.cpp index 5dc4ddd65..cd3f8507f 100644 --- a/scripts/northrend/ulduar/ulduar/boss_thorim.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_thorim.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/northrend/ulduar/ulduar/boss_xt_002.cpp b/scripts/northrend/ulduar/ulduar/boss_xt_002.cpp index d71166ca5..d64a75ded 100644 --- a/scripts/northrend/ulduar/ulduar/boss_xt_002.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_xt_002.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/northrend/ulduar/ulduar/boss_yogg_saron.cpp b/scripts/northrend/ulduar/ulduar/boss_yogg_saron.cpp index b70903bae..a6a54c11a 100644 --- a/scripts/northrend/ulduar/ulduar/boss_yogg_saron.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_yogg_saron.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp index da72e7c55..838015e62 100644 --- a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp +++ b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/northrend/ulduar/ulduar/ulduar.cpp b/scripts/northrend/ulduar/ulduar/ulduar.cpp index 22cfc1d9c..a04ad251d 100644 --- a/scripts/northrend/ulduar/ulduar/ulduar.cpp +++ b/scripts/northrend/ulduar/ulduar/ulduar.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/northrend/ulduar/ulduar/ulduar.h b/scripts/northrend/ulduar/ulduar/ulduar.h index 9c84da005..d50e54191 100644 --- a/scripts/northrend/ulduar/ulduar/ulduar.h +++ b/scripts/northrend/ulduar/ulduar/ulduar.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/northrend/utgarde_keep/utgarde_keep/boss_ingvar.cpp b/scripts/northrend/utgarde_keep/utgarde_keep/boss_ingvar.cpp index 3d2d7c063..d2fa63c4d 100644 --- a/scripts/northrend/utgarde_keep/utgarde_keep/boss_ingvar.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_keep/boss_ingvar.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/northrend/utgarde_keep/utgarde_keep/boss_keleseth.cpp b/scripts/northrend/utgarde_keep/utgarde_keep/boss_keleseth.cpp index 0007b5459..ec17515c8 100644 --- a/scripts/northrend/utgarde_keep/utgarde_keep/boss_keleseth.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_keep/boss_keleseth.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/northrend/utgarde_keep/utgarde_keep/boss_skarvald_and_dalronn.cpp b/scripts/northrend/utgarde_keep/utgarde_keep/boss_skarvald_and_dalronn.cpp index 9a8f1b7e9..d2cf56d65 100644 --- a/scripts/northrend/utgarde_keep/utgarde_keep/boss_skarvald_and_dalronn.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_keep/boss_skarvald_and_dalronn.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/northrend/utgarde_keep/utgarde_keep/instance_utgarde_keep.cpp b/scripts/northrend/utgarde_keep/utgarde_keep/instance_utgarde_keep.cpp index ccab4d375..e12c1883d 100644 --- a/scripts/northrend/utgarde_keep/utgarde_keep/instance_utgarde_keep.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_keep/instance_utgarde_keep.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/northrend/utgarde_keep/utgarde_keep/utgarde_keep.cpp b/scripts/northrend/utgarde_keep/utgarde_keep/utgarde_keep.cpp index d0fc507fa..e1fc37755 100644 --- a/scripts/northrend/utgarde_keep/utgarde_keep/utgarde_keep.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_keep/utgarde_keep.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/northrend/utgarde_keep/utgarde_keep/utgarde_keep.h b/scripts/northrend/utgarde_keep/utgarde_keep/utgarde_keep.h index 74b56fcad..52a67a15e 100644 --- a/scripts/northrend/utgarde_keep/utgarde_keep/utgarde_keep.h +++ b/scripts/northrend/utgarde_keep/utgarde_keep/utgarde_keep.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_gortok.cpp b/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_gortok.cpp index cbc1b342a..970768402 100644 --- a/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_gortok.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_gortok.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_skadi.cpp b/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_skadi.cpp index 477853bd9..01979ea3f 100644 --- a/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_skadi.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_skadi.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_svala.cpp b/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_svala.cpp index 1db786472..18ff1c747 100644 --- a/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_svala.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_svala.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_ymiron.cpp b/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_ymiron.cpp index 7f7927a25..a4751d8b7 100644 --- a/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_ymiron.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_ymiron.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/northrend/utgarde_keep/utgarde_pinnacle/instance_utgarde_pinnacle.cpp b/scripts/northrend/utgarde_keep/utgarde_pinnacle/instance_utgarde_pinnacle.cpp index 0d6d55ebd..aa7c6dd8d 100644 --- a/scripts/northrend/utgarde_keep/utgarde_pinnacle/instance_utgarde_pinnacle.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_pinnacle/instance_utgarde_pinnacle.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/northrend/utgarde_keep/utgarde_pinnacle/utgarde_pinnacle.h b/scripts/northrend/utgarde_keep/utgarde_pinnacle/utgarde_pinnacle.h index ab7a8dc26..1d6f7112c 100644 --- a/scripts/northrend/utgarde_keep/utgarde_pinnacle/utgarde_pinnacle.h +++ b/scripts/northrend/utgarde_keep/utgarde_pinnacle/utgarde_pinnacle.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/northrend/vault_of_archavon/boss_archavon.cpp b/scripts/northrend/vault_of_archavon/boss_archavon.cpp index 5a3b45660..0bad374a6 100644 --- a/scripts/northrend/vault_of_archavon/boss_archavon.cpp +++ b/scripts/northrend/vault_of_archavon/boss_archavon.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/northrend/vault_of_archavon/boss_emalon.cpp b/scripts/northrend/vault_of_archavon/boss_emalon.cpp index e31ec112f..fb7b78813 100644 --- a/scripts/northrend/vault_of_archavon/boss_emalon.cpp +++ b/scripts/northrend/vault_of_archavon/boss_emalon.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/northrend/vault_of_archavon/boss_koralon.cpp b/scripts/northrend/vault_of_archavon/boss_koralon.cpp index addd69153..936b8b456 100644 --- a/scripts/northrend/vault_of_archavon/boss_koralon.cpp +++ b/scripts/northrend/vault_of_archavon/boss_koralon.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/northrend/vault_of_archavon/boss_toravon.cpp b/scripts/northrend/vault_of_archavon/boss_toravon.cpp index 64afd567a..aec7d50ce 100644 --- a/scripts/northrend/vault_of_archavon/boss_toravon.cpp +++ b/scripts/northrend/vault_of_archavon/boss_toravon.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/northrend/vault_of_archavon/instance_vault_of_archavon.cpp b/scripts/northrend/vault_of_archavon/instance_vault_of_archavon.cpp index 54442c4fd..384bd03d6 100644 --- a/scripts/northrend/vault_of_archavon/instance_vault_of_archavon.cpp +++ b/scripts/northrend/vault_of_archavon/instance_vault_of_archavon.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/northrend/vault_of_archavon/vault_of_archavon.h b/scripts/northrend/vault_of_archavon/vault_of_archavon.h index 6b5f9ef47..1fc83fe24 100644 --- a/scripts/northrend/vault_of_archavon/vault_of_archavon.h +++ b/scripts/northrend/vault_of_archavon/vault_of_archavon.h @@ -1,3 +1,3 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/northrend/violet_hold/boss_erekem.cpp b/scripts/northrend/violet_hold/boss_erekem.cpp index f870bf0c5..90d2c6889 100644 --- a/scripts/northrend/violet_hold/boss_erekem.cpp +++ b/scripts/northrend/violet_hold/boss_erekem.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/northrend/violet_hold/boss_ichoron.cpp b/scripts/northrend/violet_hold/boss_ichoron.cpp index 54c5c4d90..004eeef03 100644 --- a/scripts/northrend/violet_hold/boss_ichoron.cpp +++ b/scripts/northrend/violet_hold/boss_ichoron.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/northrend/violet_hold/instance_violet_hold.cpp b/scripts/northrend/violet_hold/instance_violet_hold.cpp index 5b9388d69..3a3d64f42 100644 --- a/scripts/northrend/violet_hold/instance_violet_hold.cpp +++ b/scripts/northrend/violet_hold/instance_violet_hold.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/northrend/violet_hold/violet_hold.cpp b/scripts/northrend/violet_hold/violet_hold.cpp index 068a83711..25e339983 100644 --- a/scripts/northrend/violet_hold/violet_hold.cpp +++ b/scripts/northrend/violet_hold/violet_hold.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/northrend/violet_hold/violet_hold.h b/scripts/northrend/violet_hold/violet_hold.h index 88595301d..01466fdb6 100644 --- a/scripts/northrend/violet_hold/violet_hold.h +++ b/scripts/northrend/violet_hold/violet_hold.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/northrend/zuldrak.cpp b/scripts/northrend/zuldrak.cpp index 0ff963790..88134de10 100644 --- a/scripts/northrend/zuldrak.cpp +++ b/scripts/northrend/zuldrak.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/outland/auchindoun/auchenai_crypts/boss_exarch_maladaar.cpp b/scripts/outland/auchindoun/auchenai_crypts/boss_exarch_maladaar.cpp index 8e0dabc19..b6bd6f5e9 100644 --- a/scripts/outland/auchindoun/auchenai_crypts/boss_exarch_maladaar.cpp +++ b/scripts/outland/auchindoun/auchenai_crypts/boss_exarch_maladaar.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/outland/auchindoun/auchenai_crypts/boss_shirrak.cpp b/scripts/outland/auchindoun/auchenai_crypts/boss_shirrak.cpp index 479a7081f..c4058cdd2 100644 --- a/scripts/outland/auchindoun/auchenai_crypts/boss_shirrak.cpp +++ b/scripts/outland/auchindoun/auchenai_crypts/boss_shirrak.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/outland/auchindoun/mana_tombs/boss_nexusprince_shaffar.cpp b/scripts/outland/auchindoun/mana_tombs/boss_nexusprince_shaffar.cpp index 190d43e14..151fc6d13 100644 --- a/scripts/outland/auchindoun/mana_tombs/boss_nexusprince_shaffar.cpp +++ b/scripts/outland/auchindoun/mana_tombs/boss_nexusprince_shaffar.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/outland/auchindoun/mana_tombs/boss_pandemonius.cpp b/scripts/outland/auchindoun/mana_tombs/boss_pandemonius.cpp index f943993b3..97ec5b4f9 100644 --- a/scripts/outland/auchindoun/mana_tombs/boss_pandemonius.cpp +++ b/scripts/outland/auchindoun/mana_tombs/boss_pandemonius.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/outland/auchindoun/sethekk_halls/boss_anzu.cpp b/scripts/outland/auchindoun/sethekk_halls/boss_anzu.cpp index caae48e96..612c723aa 100644 --- a/scripts/outland/auchindoun/sethekk_halls/boss_anzu.cpp +++ b/scripts/outland/auchindoun/sethekk_halls/boss_anzu.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/outland/auchindoun/sethekk_halls/boss_darkweaver_syth.cpp b/scripts/outland/auchindoun/sethekk_halls/boss_darkweaver_syth.cpp index 9a45b455c..2d3fe2bcf 100644 --- a/scripts/outland/auchindoun/sethekk_halls/boss_darkweaver_syth.cpp +++ b/scripts/outland/auchindoun/sethekk_halls/boss_darkweaver_syth.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/outland/auchindoun/sethekk_halls/boss_talon_king_ikiss.cpp b/scripts/outland/auchindoun/sethekk_halls/boss_talon_king_ikiss.cpp index ffae43d0f..adc2ddaa9 100644 --- a/scripts/outland/auchindoun/sethekk_halls/boss_talon_king_ikiss.cpp +++ b/scripts/outland/auchindoun/sethekk_halls/boss_talon_king_ikiss.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/outland/auchindoun/sethekk_halls/instance_sethekk_halls.cpp b/scripts/outland/auchindoun/sethekk_halls/instance_sethekk_halls.cpp index 0eba1aba4..dcf68190a 100644 --- a/scripts/outland/auchindoun/sethekk_halls/instance_sethekk_halls.cpp +++ b/scripts/outland/auchindoun/sethekk_halls/instance_sethekk_halls.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/outland/auchindoun/sethekk_halls/sethekk_halls.h b/scripts/outland/auchindoun/sethekk_halls/sethekk_halls.h index ee45a0f3a..13242e5a8 100644 --- a/scripts/outland/auchindoun/sethekk_halls/sethekk_halls.h +++ b/scripts/outland/auchindoun/sethekk_halls/sethekk_halls.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/outland/auchindoun/shadow_labyrinth/boss_ambassador_hellmaw.cpp b/scripts/outland/auchindoun/shadow_labyrinth/boss_ambassador_hellmaw.cpp index 50e4a8ce9..017001435 100644 --- a/scripts/outland/auchindoun/shadow_labyrinth/boss_ambassador_hellmaw.cpp +++ b/scripts/outland/auchindoun/shadow_labyrinth/boss_ambassador_hellmaw.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/outland/auchindoun/shadow_labyrinth/boss_blackheart_the_inciter.cpp b/scripts/outland/auchindoun/shadow_labyrinth/boss_blackheart_the_inciter.cpp index f0ec15340..de46477a7 100644 --- a/scripts/outland/auchindoun/shadow_labyrinth/boss_blackheart_the_inciter.cpp +++ b/scripts/outland/auchindoun/shadow_labyrinth/boss_blackheart_the_inciter.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/outland/auchindoun/shadow_labyrinth/boss_grandmaster_vorpil.cpp b/scripts/outland/auchindoun/shadow_labyrinth/boss_grandmaster_vorpil.cpp index ee57eaf83..9d109bcc2 100644 --- a/scripts/outland/auchindoun/shadow_labyrinth/boss_grandmaster_vorpil.cpp +++ b/scripts/outland/auchindoun/shadow_labyrinth/boss_grandmaster_vorpil.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/outland/auchindoun/shadow_labyrinth/boss_murmur.cpp b/scripts/outland/auchindoun/shadow_labyrinth/boss_murmur.cpp index 25010096d..fed972ade 100644 --- a/scripts/outland/auchindoun/shadow_labyrinth/boss_murmur.cpp +++ b/scripts/outland/auchindoun/shadow_labyrinth/boss_murmur.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/outland/auchindoun/shadow_labyrinth/instance_shadow_labyrinth.cpp b/scripts/outland/auchindoun/shadow_labyrinth/instance_shadow_labyrinth.cpp index f7bf5bbbf..2fba2c5e5 100644 --- a/scripts/outland/auchindoun/shadow_labyrinth/instance_shadow_labyrinth.cpp +++ b/scripts/outland/auchindoun/shadow_labyrinth/instance_shadow_labyrinth.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/outland/auchindoun/shadow_labyrinth/shadow_labyrinth.h b/scripts/outland/auchindoun/shadow_labyrinth/shadow_labyrinth.h index 2331cc9fb..f36404d39 100644 --- a/scripts/outland/auchindoun/shadow_labyrinth/shadow_labyrinth.h +++ b/scripts/outland/auchindoun/shadow_labyrinth/shadow_labyrinth.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/outland/black_temple/black_temple.cpp b/scripts/outland/black_temple/black_temple.cpp index 3e61b0820..95a47896f 100644 --- a/scripts/outland/black_temple/black_temple.cpp +++ b/scripts/outland/black_temple/black_temple.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/outland/black_temple/black_temple.h b/scripts/outland/black_temple/black_temple.h index 6dc4d18dc..840eec103 100644 --- a/scripts/outland/black_temple/black_temple.h +++ b/scripts/outland/black_temple/black_temple.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/outland/black_temple/boss_bloodboil.cpp b/scripts/outland/black_temple/boss_bloodboil.cpp index 3e0a671f1..c84cb2b5b 100644 --- a/scripts/outland/black_temple/boss_bloodboil.cpp +++ b/scripts/outland/black_temple/boss_bloodboil.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/outland/black_temple/boss_illidan.cpp b/scripts/outland/black_temple/boss_illidan.cpp index 4ce1aa1fb..58a3217ca 100644 --- a/scripts/outland/black_temple/boss_illidan.cpp +++ b/scripts/outland/black_temple/boss_illidan.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/outland/black_temple/boss_mother_shahraz.cpp b/scripts/outland/black_temple/boss_mother_shahraz.cpp index f5e92c7ba..e3cb87bad 100644 --- a/scripts/outland/black_temple/boss_mother_shahraz.cpp +++ b/scripts/outland/black_temple/boss_mother_shahraz.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/outland/black_temple/boss_reliquary_of_souls.cpp b/scripts/outland/black_temple/boss_reliquary_of_souls.cpp index b4a3e5198..beab1b69c 100644 --- a/scripts/outland/black_temple/boss_reliquary_of_souls.cpp +++ b/scripts/outland/black_temple/boss_reliquary_of_souls.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/outland/black_temple/boss_shade_of_akama.cpp b/scripts/outland/black_temple/boss_shade_of_akama.cpp index 8481cec8a..ee80092e1 100644 --- a/scripts/outland/black_temple/boss_shade_of_akama.cpp +++ b/scripts/outland/black_temple/boss_shade_of_akama.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/outland/black_temple/boss_supremus.cpp b/scripts/outland/black_temple/boss_supremus.cpp index b072e111a..3e99bdac6 100644 --- a/scripts/outland/black_temple/boss_supremus.cpp +++ b/scripts/outland/black_temple/boss_supremus.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/outland/black_temple/boss_teron_gorefiend.cpp b/scripts/outland/black_temple/boss_teron_gorefiend.cpp index caa03e7c8..15b681859 100644 --- a/scripts/outland/black_temple/boss_teron_gorefiend.cpp +++ b/scripts/outland/black_temple/boss_teron_gorefiend.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/outland/black_temple/boss_warlord_najentus.cpp b/scripts/outland/black_temple/boss_warlord_najentus.cpp index c986b411f..2f6896db7 100644 --- a/scripts/outland/black_temple/boss_warlord_najentus.cpp +++ b/scripts/outland/black_temple/boss_warlord_najentus.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/outland/black_temple/illidari_council.cpp b/scripts/outland/black_temple/illidari_council.cpp index 0e0eed216..998d26446 100644 --- a/scripts/outland/black_temple/illidari_council.cpp +++ b/scripts/outland/black_temple/illidari_council.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/outland/black_temple/instance_black_temple.cpp b/scripts/outland/black_temple/instance_black_temple.cpp index f5e7d97fa..4003e79ed 100644 --- a/scripts/outland/black_temple/instance_black_temple.cpp +++ b/scripts/outland/black_temple/instance_black_temple.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/outland/blades_edge_mountains.cpp b/scripts/outland/blades_edge_mountains.cpp index 4443ec519..c828a6449 100644 --- a/scripts/outland/blades_edge_mountains.cpp +++ b/scripts/outland/blades_edge_mountains.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/outland/boss_doomlord_kazzak.cpp b/scripts/outland/boss_doomlord_kazzak.cpp index af1ba568f..ff52f5db7 100644 --- a/scripts/outland/boss_doomlord_kazzak.cpp +++ b/scripts/outland/boss_doomlord_kazzak.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/outland/boss_doomwalker.cpp b/scripts/outland/boss_doomwalker.cpp index de57edf16..6f38106c0 100644 --- a/scripts/outland/boss_doomwalker.cpp +++ b/scripts/outland/boss_doomwalker.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_fathomlord_karathress.cpp b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_fathomlord_karathress.cpp index 1ed3eb2a9..790955563 100644 --- a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_fathomlord_karathress.cpp +++ b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_fathomlord_karathress.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_hydross_the_unstable.cpp b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_hydross_the_unstable.cpp index d7f577b99..b168f0137 100644 --- a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_hydross_the_unstable.cpp +++ b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_hydross_the_unstable.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_lady_vashj.cpp b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_lady_vashj.cpp index 9bddd235d..0bd897da4 100644 --- a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_lady_vashj.cpp +++ b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_lady_vashj.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_leotheras_the_blind.cpp b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_leotheras_the_blind.cpp index 25a86aa51..0dd1f0be2 100644 --- a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_leotheras_the_blind.cpp +++ b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_leotheras_the_blind.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_morogrim_tidewalker.cpp b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_morogrim_tidewalker.cpp index 7a525433b..3e5e584ff 100644 --- a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_morogrim_tidewalker.cpp +++ b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_morogrim_tidewalker.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_the_lurker_below.cpp b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_the_lurker_below.cpp index 413eb608b..ac579faf5 100644 --- a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_the_lurker_below.cpp +++ b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_the_lurker_below.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/outland/coilfang_reservoir/serpent_shrine/instance_serpent_shrine.cpp b/scripts/outland/coilfang_reservoir/serpent_shrine/instance_serpent_shrine.cpp index c6c626452..17a859291 100644 --- a/scripts/outland/coilfang_reservoir/serpent_shrine/instance_serpent_shrine.cpp +++ b/scripts/outland/coilfang_reservoir/serpent_shrine/instance_serpent_shrine.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/outland/coilfang_reservoir/serpent_shrine/serpent_shrine.h b/scripts/outland/coilfang_reservoir/serpent_shrine/serpent_shrine.h index f83194db8..1540dc01b 100644 --- a/scripts/outland/coilfang_reservoir/serpent_shrine/serpent_shrine.h +++ b/scripts/outland/coilfang_reservoir/serpent_shrine/serpent_shrine.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/outland/coilfang_reservoir/slave_pens/boss_ahune.cpp b/scripts/outland/coilfang_reservoir/slave_pens/boss_ahune.cpp index 5b37c2c53..308eaa221 100644 --- a/scripts/outland/coilfang_reservoir/slave_pens/boss_ahune.cpp +++ b/scripts/outland/coilfang_reservoir/slave_pens/boss_ahune.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/outland/coilfang_reservoir/steam_vault/boss_hydromancer_thespia.cpp b/scripts/outland/coilfang_reservoir/steam_vault/boss_hydromancer_thespia.cpp index 1e4729e41..f1335daad 100644 --- a/scripts/outland/coilfang_reservoir/steam_vault/boss_hydromancer_thespia.cpp +++ b/scripts/outland/coilfang_reservoir/steam_vault/boss_hydromancer_thespia.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/outland/coilfang_reservoir/steam_vault/boss_mekgineer_steamrigger.cpp b/scripts/outland/coilfang_reservoir/steam_vault/boss_mekgineer_steamrigger.cpp index 2bbecbe66..0608831ae 100644 --- a/scripts/outland/coilfang_reservoir/steam_vault/boss_mekgineer_steamrigger.cpp +++ b/scripts/outland/coilfang_reservoir/steam_vault/boss_mekgineer_steamrigger.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/outland/coilfang_reservoir/steam_vault/boss_warlord_kalithresh.cpp b/scripts/outland/coilfang_reservoir/steam_vault/boss_warlord_kalithresh.cpp index 151a1c750..bc7c2bc22 100644 --- a/scripts/outland/coilfang_reservoir/steam_vault/boss_warlord_kalithresh.cpp +++ b/scripts/outland/coilfang_reservoir/steam_vault/boss_warlord_kalithresh.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/outland/coilfang_reservoir/steam_vault/instance_steam_vault.cpp b/scripts/outland/coilfang_reservoir/steam_vault/instance_steam_vault.cpp index ccdbdc663..ca3a978a8 100644 --- a/scripts/outland/coilfang_reservoir/steam_vault/instance_steam_vault.cpp +++ b/scripts/outland/coilfang_reservoir/steam_vault/instance_steam_vault.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/outland/coilfang_reservoir/steam_vault/steam_vault.h b/scripts/outland/coilfang_reservoir/steam_vault/steam_vault.h index 6da760241..9f6c1c32a 100644 --- a/scripts/outland/coilfang_reservoir/steam_vault/steam_vault.h +++ b/scripts/outland/coilfang_reservoir/steam_vault/steam_vault.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/outland/coilfang_reservoir/underbog/boss_hungarfen.cpp b/scripts/outland/coilfang_reservoir/underbog/boss_hungarfen.cpp index 0d8429307..becdbd111 100644 --- a/scripts/outland/coilfang_reservoir/underbog/boss_hungarfen.cpp +++ b/scripts/outland/coilfang_reservoir/underbog/boss_hungarfen.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/outland/gruuls_lair/boss_gruul.cpp b/scripts/outland/gruuls_lair/boss_gruul.cpp index 89b19872d..716e6a2e4 100644 --- a/scripts/outland/gruuls_lair/boss_gruul.cpp +++ b/scripts/outland/gruuls_lair/boss_gruul.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/outland/gruuls_lair/boss_high_king_maulgar.cpp b/scripts/outland/gruuls_lair/boss_high_king_maulgar.cpp index 273392629..2c1a45455 100644 --- a/scripts/outland/gruuls_lair/boss_high_king_maulgar.cpp +++ b/scripts/outland/gruuls_lair/boss_high_king_maulgar.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/outland/gruuls_lair/gruuls_lair.h b/scripts/outland/gruuls_lair/gruuls_lair.h index 9dbab6c36..64d66bcc0 100644 --- a/scripts/outland/gruuls_lair/gruuls_lair.h +++ b/scripts/outland/gruuls_lair/gruuls_lair.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/outland/gruuls_lair/instance_gruuls_lair.cpp b/scripts/outland/gruuls_lair/instance_gruuls_lair.cpp index b620907ab..d96c8a2b2 100644 --- a/scripts/outland/gruuls_lair/instance_gruuls_lair.cpp +++ b/scripts/outland/gruuls_lair/instance_gruuls_lair.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/outland/hellfire_citadel/blood_furnace/blood_furnace.h b/scripts/outland/hellfire_citadel/blood_furnace/blood_furnace.h index f784b544a..487fcd3d0 100644 --- a/scripts/outland/hellfire_citadel/blood_furnace/blood_furnace.h +++ b/scripts/outland/hellfire_citadel/blood_furnace/blood_furnace.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/outland/hellfire_citadel/blood_furnace/boss_broggok.cpp b/scripts/outland/hellfire_citadel/blood_furnace/boss_broggok.cpp index 2e12f4299..b0f804b22 100644 --- a/scripts/outland/hellfire_citadel/blood_furnace/boss_broggok.cpp +++ b/scripts/outland/hellfire_citadel/blood_furnace/boss_broggok.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/outland/hellfire_citadel/blood_furnace/boss_kelidan_the_breaker.cpp b/scripts/outland/hellfire_citadel/blood_furnace/boss_kelidan_the_breaker.cpp index d8ee52581..86bb8ba03 100644 --- a/scripts/outland/hellfire_citadel/blood_furnace/boss_kelidan_the_breaker.cpp +++ b/scripts/outland/hellfire_citadel/blood_furnace/boss_kelidan_the_breaker.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/outland/hellfire_citadel/blood_furnace/boss_the_maker.cpp b/scripts/outland/hellfire_citadel/blood_furnace/boss_the_maker.cpp index 3730f06fb..578e082f3 100644 --- a/scripts/outland/hellfire_citadel/blood_furnace/boss_the_maker.cpp +++ b/scripts/outland/hellfire_citadel/blood_furnace/boss_the_maker.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/outland/hellfire_citadel/blood_furnace/instance_blood_furnace.cpp b/scripts/outland/hellfire_citadel/blood_furnace/instance_blood_furnace.cpp index 1c9d0cb4f..754b93025 100644 --- a/scripts/outland/hellfire_citadel/blood_furnace/instance_blood_furnace.cpp +++ b/scripts/outland/hellfire_citadel/blood_furnace/instance_blood_furnace.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_nazan_and_vazruden.cpp b/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_nazan_and_vazruden.cpp index 0df7cd41c..8f9c638a8 100644 --- a/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_nazan_and_vazruden.cpp +++ b/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_nazan_and_vazruden.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_omor_the_unscarred.cpp b/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_omor_the_unscarred.cpp index 3aa6dea58..325cff4cd 100644 --- a/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_omor_the_unscarred.cpp +++ b/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_omor_the_unscarred.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_watchkeeper_gargolmar.cpp b/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_watchkeeper_gargolmar.cpp index 5a8c63b64..ef8d5b4f5 100644 --- a/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_watchkeeper_gargolmar.cpp +++ b/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_watchkeeper_gargolmar.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/outland/hellfire_citadel/hellfire_ramparts/hellfire_ramparts.h b/scripts/outland/hellfire_citadel/hellfire_ramparts/hellfire_ramparts.h index 98f1c7e18..c774c2335 100644 --- a/scripts/outland/hellfire_citadel/hellfire_ramparts/hellfire_ramparts.h +++ b/scripts/outland/hellfire_citadel/hellfire_ramparts/hellfire_ramparts.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/outland/hellfire_citadel/hellfire_ramparts/instance_hellfire_ramparts.cpp b/scripts/outland/hellfire_citadel/hellfire_ramparts/instance_hellfire_ramparts.cpp index da2f64cc5..535ff8d4f 100644 --- a/scripts/outland/hellfire_citadel/hellfire_ramparts/instance_hellfire_ramparts.cpp +++ b/scripts/outland/hellfire_citadel/hellfire_ramparts/instance_hellfire_ramparts.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/outland/hellfire_citadel/magtheridons_lair/boss_magtheridon.cpp b/scripts/outland/hellfire_citadel/magtheridons_lair/boss_magtheridon.cpp index 4c4673002..7fbe75be6 100644 --- a/scripts/outland/hellfire_citadel/magtheridons_lair/boss_magtheridon.cpp +++ b/scripts/outland/hellfire_citadel/magtheridons_lair/boss_magtheridon.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/outland/hellfire_citadel/magtheridons_lair/instance_magtheridons_lair.cpp b/scripts/outland/hellfire_citadel/magtheridons_lair/instance_magtheridons_lair.cpp index 52a185b48..d7b12481b 100644 --- a/scripts/outland/hellfire_citadel/magtheridons_lair/instance_magtheridons_lair.cpp +++ b/scripts/outland/hellfire_citadel/magtheridons_lair/instance_magtheridons_lair.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/outland/hellfire_citadel/magtheridons_lair/magtheridons_lair.h b/scripts/outland/hellfire_citadel/magtheridons_lair/magtheridons_lair.h index 65eb38277..3b1fd99b3 100644 --- a/scripts/outland/hellfire_citadel/magtheridons_lair/magtheridons_lair.h +++ b/scripts/outland/hellfire_citadel/magtheridons_lair/magtheridons_lair.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/outland/hellfire_citadel/shattered_halls/boss_nethekurse.cpp b/scripts/outland/hellfire_citadel/shattered_halls/boss_nethekurse.cpp index c5500a1f9..180470ee0 100644 --- a/scripts/outland/hellfire_citadel/shattered_halls/boss_nethekurse.cpp +++ b/scripts/outland/hellfire_citadel/shattered_halls/boss_nethekurse.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/outland/hellfire_citadel/shattered_halls/boss_warbringer_omrogg.cpp b/scripts/outland/hellfire_citadel/shattered_halls/boss_warbringer_omrogg.cpp index a5cc40fa8..26675415b 100644 --- a/scripts/outland/hellfire_citadel/shattered_halls/boss_warbringer_omrogg.cpp +++ b/scripts/outland/hellfire_citadel/shattered_halls/boss_warbringer_omrogg.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/outland/hellfire_citadel/shattered_halls/boss_warchief_kargath_bladefist.cpp b/scripts/outland/hellfire_citadel/shattered_halls/boss_warchief_kargath_bladefist.cpp index 997f53725..71da4df5f 100644 --- a/scripts/outland/hellfire_citadel/shattered_halls/boss_warchief_kargath_bladefist.cpp +++ b/scripts/outland/hellfire_citadel/shattered_halls/boss_warchief_kargath_bladefist.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/outland/hellfire_citadel/shattered_halls/instance_shattered_halls.cpp b/scripts/outland/hellfire_citadel/shattered_halls/instance_shattered_halls.cpp index 8f166e855..24fbd10d5 100644 --- a/scripts/outland/hellfire_citadel/shattered_halls/instance_shattered_halls.cpp +++ b/scripts/outland/hellfire_citadel/shattered_halls/instance_shattered_halls.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/outland/hellfire_citadel/shattered_halls/shattered_halls.h b/scripts/outland/hellfire_citadel/shattered_halls/shattered_halls.h index 4f74d454e..72b9e59ee 100644 --- a/scripts/outland/hellfire_citadel/shattered_halls/shattered_halls.h +++ b/scripts/outland/hellfire_citadel/shattered_halls/shattered_halls.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/outland/hellfire_peninsula.cpp b/scripts/outland/hellfire_peninsula.cpp index f64249696..34132f3cd 100644 --- a/scripts/outland/hellfire_peninsula.cpp +++ b/scripts/outland/hellfire_peninsula.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/outland/nagrand.cpp b/scripts/outland/nagrand.cpp index d2f94e631..776acd1ef 100644 --- a/scripts/outland/nagrand.cpp +++ b/scripts/outland/nagrand.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/outland/netherstorm.cpp b/scripts/outland/netherstorm.cpp index 771f43909..930afa3d9 100644 --- a/scripts/outland/netherstorm.cpp +++ b/scripts/outland/netherstorm.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/outland/shadowmoon_valley.cpp b/scripts/outland/shadowmoon_valley.cpp index 1b4c64185..f8b63627c 100644 --- a/scripts/outland/shadowmoon_valley.cpp +++ b/scripts/outland/shadowmoon_valley.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/outland/shattrath_city.cpp b/scripts/outland/shattrath_city.cpp index 180af0fd4..489632dea 100644 --- a/scripts/outland/shattrath_city.cpp +++ b/scripts/outland/shattrath_city.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/outland/tempest_keep/arcatraz/arcatraz.cpp b/scripts/outland/tempest_keep/arcatraz/arcatraz.cpp index f573dc4ad..7e8d02098 100644 --- a/scripts/outland/tempest_keep/arcatraz/arcatraz.cpp +++ b/scripts/outland/tempest_keep/arcatraz/arcatraz.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/outland/tempest_keep/arcatraz/arcatraz.h b/scripts/outland/tempest_keep/arcatraz/arcatraz.h index 572070512..68df94fb1 100644 --- a/scripts/outland/tempest_keep/arcatraz/arcatraz.h +++ b/scripts/outland/tempest_keep/arcatraz/arcatraz.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/outland/tempest_keep/arcatraz/boss_dalliah.cpp b/scripts/outland/tempest_keep/arcatraz/boss_dalliah.cpp index 32846cc02..bdbda173c 100644 --- a/scripts/outland/tempest_keep/arcatraz/boss_dalliah.cpp +++ b/scripts/outland/tempest_keep/arcatraz/boss_dalliah.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/outland/tempest_keep/arcatraz/boss_harbinger_skyriss.cpp b/scripts/outland/tempest_keep/arcatraz/boss_harbinger_skyriss.cpp index d48a9422c..0b39ebd60 100644 --- a/scripts/outland/tempest_keep/arcatraz/boss_harbinger_skyriss.cpp +++ b/scripts/outland/tempest_keep/arcatraz/boss_harbinger_skyriss.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/outland/tempest_keep/arcatraz/boss_soccothrates.cpp b/scripts/outland/tempest_keep/arcatraz/boss_soccothrates.cpp index eb5dc1d65..ef33e9953 100644 --- a/scripts/outland/tempest_keep/arcatraz/boss_soccothrates.cpp +++ b/scripts/outland/tempest_keep/arcatraz/boss_soccothrates.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/outland/tempest_keep/arcatraz/instance_arcatraz.cpp b/scripts/outland/tempest_keep/arcatraz/instance_arcatraz.cpp index e42a2cb73..158fa9a46 100644 --- a/scripts/outland/tempest_keep/arcatraz/instance_arcatraz.cpp +++ b/scripts/outland/tempest_keep/arcatraz/instance_arcatraz.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/outland/tempest_keep/botanica/boss_high_botanist_freywinn.cpp b/scripts/outland/tempest_keep/botanica/boss_high_botanist_freywinn.cpp index cf7da8ca6..797c1f10b 100644 --- a/scripts/outland/tempest_keep/botanica/boss_high_botanist_freywinn.cpp +++ b/scripts/outland/tempest_keep/botanica/boss_high_botanist_freywinn.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/outland/tempest_keep/botanica/boss_laj.cpp b/scripts/outland/tempest_keep/botanica/boss_laj.cpp index 4c9e0cb96..55362f1de 100644 --- a/scripts/outland/tempest_keep/botanica/boss_laj.cpp +++ b/scripts/outland/tempest_keep/botanica/boss_laj.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/outland/tempest_keep/botanica/boss_warp_splinter.cpp b/scripts/outland/tempest_keep/botanica/boss_warp_splinter.cpp index 29e33d82f..6283dc860 100644 --- a/scripts/outland/tempest_keep/botanica/boss_warp_splinter.cpp +++ b/scripts/outland/tempest_keep/botanica/boss_warp_splinter.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/outland/tempest_keep/the_eye/boss_alar.cpp b/scripts/outland/tempest_keep/the_eye/boss_alar.cpp index 9a4ed478a..d7360ae43 100644 --- a/scripts/outland/tempest_keep/the_eye/boss_alar.cpp +++ b/scripts/outland/tempest_keep/the_eye/boss_alar.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/outland/tempest_keep/the_eye/boss_astromancer.cpp b/scripts/outland/tempest_keep/the_eye/boss_astromancer.cpp index 5b9d3f26b..d4b9f668b 100644 --- a/scripts/outland/tempest_keep/the_eye/boss_astromancer.cpp +++ b/scripts/outland/tempest_keep/the_eye/boss_astromancer.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/outland/tempest_keep/the_eye/boss_kaelthas.cpp b/scripts/outland/tempest_keep/the_eye/boss_kaelthas.cpp index bc32c1fb9..558bb4cd7 100644 --- a/scripts/outland/tempest_keep/the_eye/boss_kaelthas.cpp +++ b/scripts/outland/tempest_keep/the_eye/boss_kaelthas.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/outland/tempest_keep/the_eye/boss_void_reaver.cpp b/scripts/outland/tempest_keep/the_eye/boss_void_reaver.cpp index 9bdeb455c..95a9ca809 100644 --- a/scripts/outland/tempest_keep/the_eye/boss_void_reaver.cpp +++ b/scripts/outland/tempest_keep/the_eye/boss_void_reaver.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/outland/tempest_keep/the_eye/instance_the_eye.cpp b/scripts/outland/tempest_keep/the_eye/instance_the_eye.cpp index ecd46a634..262aa8bdf 100644 --- a/scripts/outland/tempest_keep/the_eye/instance_the_eye.cpp +++ b/scripts/outland/tempest_keep/the_eye/instance_the_eye.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/outland/tempest_keep/the_eye/the_eye.h b/scripts/outland/tempest_keep/the_eye/the_eye.h index 8752c6475..d45dae974 100644 --- a/scripts/outland/tempest_keep/the_eye/the_eye.h +++ b/scripts/outland/tempest_keep/the_eye/the_eye.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/outland/tempest_keep/the_mechanar/boss_nethermancer_sepethrea.cpp b/scripts/outland/tempest_keep/the_mechanar/boss_nethermancer_sepethrea.cpp index 49fc4fa7b..e5dfab664 100644 --- a/scripts/outland/tempest_keep/the_mechanar/boss_nethermancer_sepethrea.cpp +++ b/scripts/outland/tempest_keep/the_mechanar/boss_nethermancer_sepethrea.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/outland/tempest_keep/the_mechanar/boss_pathaleon_the_calculator.cpp b/scripts/outland/tempest_keep/the_mechanar/boss_pathaleon_the_calculator.cpp index 293358c4a..5864152d1 100644 --- a/scripts/outland/tempest_keep/the_mechanar/boss_pathaleon_the_calculator.cpp +++ b/scripts/outland/tempest_keep/the_mechanar/boss_pathaleon_the_calculator.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/outland/tempest_keep/the_mechanar/instance_mechanar.cpp b/scripts/outland/tempest_keep/the_mechanar/instance_mechanar.cpp index 1bac266f3..46c372b52 100644 --- a/scripts/outland/tempest_keep/the_mechanar/instance_mechanar.cpp +++ b/scripts/outland/tempest_keep/the_mechanar/instance_mechanar.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/outland/tempest_keep/the_mechanar/mechanar.h b/scripts/outland/tempest_keep/the_mechanar/mechanar.h index b3bbdfcaa..09a65c49d 100644 --- a/scripts/outland/tempest_keep/the_mechanar/mechanar.h +++ b/scripts/outland/tempest_keep/the_mechanar/mechanar.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/outland/terokkar_forest.cpp b/scripts/outland/terokkar_forest.cpp index 72d978fb1..a51052412 100644 --- a/scripts/outland/terokkar_forest.cpp +++ b/scripts/outland/terokkar_forest.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/outland/zangarmarsh.cpp b/scripts/outland/zangarmarsh.cpp index 2482e19e1..d2872cf7e 100644 --- a/scripts/outland/zangarmarsh.cpp +++ b/scripts/outland/zangarmarsh.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/world/areatrigger_scripts.cpp b/scripts/world/areatrigger_scripts.cpp index 5b06e29d2..2906ef99f 100644 --- a/scripts/world/areatrigger_scripts.cpp +++ b/scripts/world/areatrigger_scripts.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/world/bosses_emerald_dragons.cpp b/scripts/world/bosses_emerald_dragons.cpp index 84c0eb4e9..c855d45ae 100644 --- a/scripts/world/bosses_emerald_dragons.cpp +++ b/scripts/world/bosses_emerald_dragons.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/world/go_scripts.cpp b/scripts/world/go_scripts.cpp index f61623a61..5fb8706d9 100644 --- a/scripts/world/go_scripts.cpp +++ b/scripts/world/go_scripts.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/world/guards.cpp b/scripts/world/guards.cpp index 90e6b8589..9cb4edc9f 100644 --- a/scripts/world/guards.cpp +++ b/scripts/world/guards.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/world/item_scripts.cpp b/scripts/world/item_scripts.cpp index cf975c907..026004add 100644 --- a/scripts/world/item_scripts.cpp +++ b/scripts/world/item_scripts.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/world/mob_generic_creature.cpp b/scripts/world/mob_generic_creature.cpp index 31ab611f7..96e624cb2 100644 --- a/scripts/world/mob_generic_creature.cpp +++ b/scripts/world/mob_generic_creature.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/world/npc_professions.cpp b/scripts/world/npc_professions.cpp index f95fd9b6f..239c6492a 100644 --- a/scripts/world/npc_professions.cpp +++ b/scripts/world/npc_professions.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/world/npcs_special.cpp b/scripts/world/npcs_special.cpp index f30195b22..c1e25e73f 100644 --- a/scripts/world/npcs_special.cpp +++ b/scripts/world/npcs_special.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/world/spell_scripts.cpp b/scripts/world/spell_scripts.cpp index 096c9921f..53198fd0b 100644 --- a/scripts/world/spell_scripts.cpp +++ b/scripts/world/spell_scripts.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/world/world_map_scripts.cpp b/scripts/world/world_map_scripts.cpp index 3ec2620a8..6df8d8095 100644 --- a/scripts/world/world_map_scripts.cpp +++ b/scripts/world/world_map_scripts.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * 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 diff --git a/scripts/world/world_map_scripts.h b/scripts/world/world_map_scripts.h index 27d41b262..0fe83cc82 100644 --- a/scripts/world/world_map_scripts.h +++ b/scripts/world/world_map_scripts.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 197882432..310c351c6 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3002" + #define SD2_REVISION_NR "3003" #endif // __SD2_REVISION_NR_H__ diff --git a/system/MangosdRev.cpp b/system/MangosdRev.cpp index a7c8b1c66..a9dcbf232 100644 --- a/system/MangosdRev.cpp +++ b/system/MangosdRev.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/system/ScriptLoader.cpp b/system/ScriptLoader.cpp index 1a78e0588..bc46c1217 100644 --- a/system/ScriptLoader.cpp +++ b/system/ScriptLoader.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/system/ScriptLoader.h b/system/ScriptLoader.h index 8f2a11e37..e5b393ac5 100644 --- a/system/ScriptLoader.h +++ b/system/ScriptLoader.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/system/system.cpp b/system/system.cpp index 85921533c..9e81af7fa 100644 --- a/system/system.cpp +++ b/system/system.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/system/system.h b/system/system.h index e718650d5..f1eac0f5b 100644 --- a/system/system.h +++ b/system/system.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2013 ScriptDev2 +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/tool/git_id/git_id.cpp b/tool/git_id/git_id.cpp index 9ebc97849..1b72cffa8 100644 --- a/tool/git_id/git_id.cpp +++ b/tool/git_id/git_id.cpp @@ -1,6 +1,6 @@ /* * Copyright (C) 2005-2013 MaNGOS - * Copyright (C) 2005-2013 ScriptDev2 + * This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * * 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 From 3e824ccae1026b4757a7227816014c573c171ae5 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sat, 10 May 2014 19:12:23 +0200 Subject: [PATCH 1015/1172] [3004] Implement script support for quests 13221, 13229, 13481 and 13482. Part of #27 --- scripts/northrend/icecrown.cpp | 163 ++++++++++++++++++++++++++++++- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 + sql/scriptdev2_script_full.sql | 69 ++++++++++++- sql/updates/r3004_mangos.sql | 1 + sql/updates/r3004_scriptdev2.sql | 67 +++++++++++++ 6 files changed, 300 insertions(+), 3 deletions(-) create mode 100644 sql/updates/r3004_mangos.sql create mode 100644 sql/updates/r3004_scriptdev2.sql diff --git a/scripts/northrend/icecrown.cpp b/scripts/northrend/icecrown.cpp index 69c48ffff..a4bbbb9ed 100644 --- a/scripts/northrend/icecrown.cpp +++ b/scripts/northrend/icecrown.cpp @@ -17,13 +17,14 @@ /* ScriptData SDName: Icecrown SD%Complete: 100 -SDComment: Quest support: 13284, 13301. +SDComment: Quest support: 13221, 13229, 13284, 13301, 13481, 13482. SDCategory: Icecrown EndScriptData */ /* ContentData npc_squad_leader npc_infantry +npc_father_kamaros EndContentData */ #include "precompiled.h" @@ -401,6 +402,160 @@ CreatureAI* GetAI_npc_infantry(Creature* pCreature) return new npc_infantryAI(pCreature); } +/*###### +## npc_father_kamaros +######*/ + +enum +{ + // yells + SAY_KAMAROS_START_1 = -1001044, + SAY_KAMAROS_START_2 = -1001045, + SAY_KAMAROS_AGGRO_1 = -1001046, + SAY_KAMAROS_AGGRO_2 = -1001047, + SAY_KAMAROS_AGGRO_3 = -1001048, + SAY_KAMAROS_COMPLETE_1 = -1001050, + SAY_KAMAROS_COMPLETE_2 = -1001049, + + // combat spells + SPELL_HOLY_SMITE = 25054, + SPELL_POWER_WORD_FORTITUDE = 58921, + SPELL_POWER_WORD_SHIELD = 32595, + SPELL_SHADOW_WORD_PAIN = 17146, + + NPC_SPIKED_GHOUL = 30597, + NPC_KAMAROS_1 = 31279, // phase 1 npc + NPC_KAMAROS_2 = 32800, // phase 64 npc + + // quests + // all four quests have the same script; + // they depend only on faction and quest giver (same npc, different entries in different phases); + QUEST_ID_NOT_DEAD_YET_A = 13221, + QUEST_ID_NOT_DEAD_YET_H = 13229, + QUEST_ID_GET_OUT_OF_HERE_A = 13482, + QUEST_ID_GET_OUT_OF_HERE_H = 13481, +}; + +struct MANGOS_DLL_DECL npc_father_kamarosAI : public npc_escortAI +{ + npc_father_kamarosAI(Creature* pCreature) : npc_escortAI(pCreature) + { + Reset(); + m_uiCurrentQuestId = 0; + } + + uint32 m_uiSmiteTimer; + uint32 m_uiShadowWordTimer; + uint32 m_uiCurrentQuestId; + + void Reset() override + { + m_uiSmiteTimer = urand(3000, 5000); + m_uiShadowWordTimer = urand(1000, 3000); + } + + void Aggro(Unit* /*pWho*/) override + { + switch (urand(0, 2)) + { + case 0: DoScriptText(SAY_KAMAROS_AGGRO_1, m_creature); break; + case 1: DoScriptText(SAY_KAMAROS_AGGRO_2, m_creature); break; + case 2: DoScriptText(SAY_KAMAROS_AGGRO_3, m_creature); break; + } + + if (DoCastSpellIfCan(m_creature, SPELL_POWER_WORD_SHIELD) != CAST_OK) + { + if (Player* pPlayer = GetPlayerForEscort()) + DoCastSpellIfCan(pPlayer, SPELL_POWER_WORD_SHIELD); + } + } + + void ReceiveAIEvent(AIEventType eventType, Creature* /*pSender*/, Unit* pInvoker, uint32 uiMiscValue) override + { + if (eventType == AI_EVENT_START_ESCORT && pInvoker->GetTypeId() == TYPEID_PLAYER) + { + m_uiCurrentQuestId = uiMiscValue; + m_creature->SetStandState(UNIT_STAND_STATE_STAND); + Start(false, (Player*)pInvoker, GetQuestTemplateStore(uiMiscValue), true); + } + } + + void WaypointReached(uint32 uiPointId) override + { + switch (uiPointId) + { + case 0: + if (Player* pPlayer = GetPlayerForEscort()) + { + DoScriptText(SAY_KAMAROS_START_1, m_creature, pPlayer); + DoCastSpellIfCan(pPlayer, SPELL_POWER_WORD_FORTITUDE); + } + break; + case 1: + DoScriptText(SAY_KAMAROS_START_2, m_creature); + break; + case 11: + case 13: + case 16: + if (Creature* pGhoul = GetClosestCreatureWithEntry(m_creature, NPC_SPIKED_GHOUL, 25.0f)) + pGhoul->AI()->AttackStart(m_creature); + break; + case 23: + if (Player* pPlayer = GetPlayerForEscort()) + m_creature->SetFacingToObject(pPlayer); + DoScriptText(SAY_KAMAROS_COMPLETE_1, m_creature); + break; + case 24: + SetRun(); + DoScriptText(SAY_KAMAROS_COMPLETE_2, m_creature); + if (Player* pPlayer = GetPlayerForEscort()) + pPlayer->GroupEventHappens(m_uiCurrentQuestId, m_creature); + break; + } + } + + void UpdateEscortAI(const uint32 uiDiff) override + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_uiSmiteTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_HOLY_SMITE) == CAST_OK) + m_uiSmiteTimer = urand(3000, 4000); + } + else + m_uiSmiteTimer -= uiDiff; + + if (m_uiShadowWordTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_SHADOW_WORD_PAIN) == CAST_OK) + m_uiShadowWordTimer = urand(15000, 20000); + } + else + m_uiShadowWordTimer -= uiDiff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_npc_father_kamaros(Creature* pCreature) +{ + return new npc_father_kamarosAI(pCreature); +} + +bool QuestAccept_npc_father_kamaros(Player* pPlayer, Creature* pCreature, const Quest* pQuest) +{ + if (pQuest->GetQuestId() == QUEST_ID_NOT_DEAD_YET_A || pQuest->GetQuestId() == QUEST_ID_NOT_DEAD_YET_H || + pQuest->GetQuestId() == QUEST_ID_GET_OUT_OF_HERE_A || pQuest->GetQuestId() == QUEST_ID_GET_OUT_OF_HERE_H) + { + pCreature->AI()->SendAIEvent(AI_EVENT_START_ESCORT, pPlayer, pCreature, pQuest->GetQuestId()); + return true; + } + + return false; +} + void AddSC_icecrown() { Script* pNewScript; @@ -415,4 +570,10 @@ void AddSC_icecrown() pNewScript->Name = "npc_infantry"; pNewScript->GetAI = &GetAI_npc_infantry; pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_father_kamaros"; + pNewScript->GetAI = &GetAI_npc_father_kamaros; + pNewScript->pQuestAcceptNPC = &QuestAccept_npc_father_kamaros; + pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 310c351c6..82175a39d 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3003" + #define SD2_REVISION_NR "3004" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 68fbf7c33..a2513d511 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -741,6 +741,7 @@ INSERT INTO scripted_areatrigger VALUES /* ICECROWN */ UPDATE creature_template SET ScriptName='npc_squad_leader' WHERE entry IN (31737,31833); UPDATE creature_template SET ScriptName='npc_infantry' WHERE entry IN (31701,31832); +UPDATE creature_template SET ScriptName='npc_father_kamaros' WHERE entry IN (31279,32800); /* IRONFORGE */ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index b8fe1e204..10a3d932f 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -1129,7 +1129,15 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1001040,'I\'ll eat your heart!',0,0,0,0,'ymirheim defender SAY_DEFENDER_AGGRO_6'), (-1001041,'Sniveling pig!',0,0,0,0,'ymirheim defender SAY_DEFENDER_AGGRO_7'), (-1001042,'Ugglin oo bjorr!',0,0,0,0,'ymirheim defender SAY_DEFENDER_AGGRO_8'), -(-1001043,'You come to die!',0,0,0,0,'ymirheim defender SAY_DEFENDER_AGGRO_9'); +(-1001043,'You come to die!',0,0,0,0,'ymirheim defender SAY_DEFENDER_AGGRO_9'), + +(-1001044,'The Light\'s blessing be upon you for aiding me in my time of need, $N.',0,0,0,0,'father kamaros SAY_ESCORT_START_1'), +(-1001045,'I\'ve had my fill of this place. Let us depart.',0,0,0,1,'father kamaros SAY_ESCORT_START_2'), +(-1001046,'Face your judgment by the Light!',0,0,0,0,'father kamaros SAY_AGGRO_1'), +(-1001047,'The Argent Crusade never surrenders!',0,0,0,0,'father kamaros SAY_AGGRO_2'), +(-1001048,'You will never take me alive!',0,0,0,0,'father kamaros SAY_AGGRO_3'), +(-1001049,'I have you to thank for my life. I will return to my comrades and spread word of your bravery. Fight the Scourge with all the strength you can muster, and we will be by your side.',0,0,0,1,'father kamaros SAY_ESCORT_COMPLETE_2'), +(-1001050,'You must tell my brothers that I live.',0,0,0,1,'father kamaros SAY_ESCORT_COMPLETE_1'); -- -1 033 000 SHADOWFANG KEEP INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES @@ -7903,4 +7911,63 @@ INSERT INTO script_waypoint VALUES (31833, 25, 7288.278, 1726.889, 469.816, 0, ''), (31833, 26, 7278.187, 1722.632, 472.149, 0, ''), (31833, 27, 7253.084, 1729.579, 474.225, 0, 'SAY_EVENT_COMPLETE'); + +DELETE FROM script_waypoint WHERE entry=31279; +INSERT INTO script_waypoint VALUES +(31279, 0, 6717.810, 3451.979, 683.747, 5000, 'SAY_ESCORT_START_1'), +(31279, 1, 6717.810, 3451.979, 683.747, 2000, 'SAY_ESCORT_START_2'), +(31279, 2, 6718.854, 3436.952, 682.197, 0, ''), +(31279, 3, 6725.714, 3432.644, 682.197, 0, ''), +(31279, 4, 6733.117, 3435.033, 682.136, 0, ''), +(31279, 5, 6744.931, 3445.788, 679.032, 0, ''), +(31279, 6, 6760.190, 3459.459, 674.487, 0, ''), +(31279, 7, 6773.156, 3469.683, 673.155, 0, ''), +(31279, 8, 6783.855, 3480.482, 674.481, 0, ''), +(31279, 9, 6790.618, 3484.064, 676.671, 0, ''), +(31279, 10, 6805.924, 3483.840, 682.128, 0, ''), +(31279, 11, 6818.427, 3483.294, 686.889, 0, ''), +(31279, 12, 6832.831, 3480.982, 690.189, 0, ''), +(31279, 13, 6854.910, 3479.888, 693.181, 0, ''), +(31279, 14, 6873.589, 3478.932, 694.618, 0, ''), +(31279, 15, 6895.129, 3478.388, 698.266, 0, ''), +(31279, 16, 6916.835, 3478.487, 702.575, 0, ''), +(31279, 17, 6937.283, 3477.337, 707.257, 0, ''), +(31279, 18, 6959.092, 3472.777, 710.180, 0, ''), +(31279, 19, 6969.530, 3470.091, 710.401, 0, ''), +(31279, 20, 6980.068, 3466.872, 710.831, 0, ''), +(31279, 21, 7008.199, 3457.296, 696.672, 0, ''), +(31279, 22, 7020.182, 3452.484, 696.518, 0, ''), +(31279, 23, 7031.362, 3445.230, 696.108, 3000, 'SAY_KAMAROS_COMPLETE_1'), +(31279, 24, 7031.362, 3445.230, 696.108, 7000, 'SAY_KAMAROS_COMPLETE_2'), +(31279, 25, 7067.656, 3420.741, 694.879, 0, ''); + +DELETE FROM script_waypoint WHERE entry=32800; +INSERT INTO script_waypoint VALUES +(32800, 0, 6736.090, 3422.160, 683.457, 5000, 'SAY_ESCORT_START_1'), +(32800, 1, 6736.090, 3422.160, 683.457, 2000, 'SAY_ESCORT_START_2'), +(32800, 2, 6734.518, 3425.644, 682.517, 0, ''), +(32800, 3, 6733.167, 3430.796, 682.156, 0, ''), +(32800, 4, 6733.117, 3435.033, 682.136, 0, ''), +(32800, 5, 6744.931, 3445.788, 679.032, 0, ''), +(32800, 6, 6760.190, 3459.459, 674.487, 0, ''), +(32800, 7, 6773.156, 3469.683, 673.155, 0, ''), +(32800, 8, 6783.855, 3480.482, 674.481, 0, ''), +(32800, 9, 6790.618, 3484.064, 676.671, 0, ''), +(32800, 10, 6805.924, 3483.840, 682.128, 0, ''), +(32800, 11, 6818.427, 3483.294, 686.889, 0, ''), +(32800, 12, 6832.831, 3480.982, 690.189, 0, ''), +(32800, 13, 6854.910, 3479.888, 693.181, 0, ''), +(32800, 14, 6873.589, 3478.932, 694.618, 0, ''), +(32800, 15, 6895.129, 3478.388, 698.266, 0, ''), +(32800, 16, 6916.835, 3478.487, 702.575, 0, ''), +(32800, 17, 6937.283, 3477.337, 707.257, 0, ''), +(32800, 18, 6959.092, 3472.777, 710.180, 0, ''), +(32800, 19, 6969.530, 3470.091, 710.401, 0, ''), +(32800, 20, 6980.068, 3466.872, 710.831, 0, ''), +(32800, 21, 7008.199, 3457.296, 696.672, 0, ''), +(32800, 22, 7020.182, 3452.484, 696.518, 0, ''), +(32800, 23, 7031.362, 3445.230, 696.108, 3000, 'SAY_KAMAROS_COMPLETE_1'), +(32800, 24, 7031.362, 3445.230, 696.108, 7000, 'SAY_KAMAROS_COMPLETE_2'), +(32800, 25, 7067.656, 3420.741, 694.879, 0, ''); + -- EOF diff --git a/sql/updates/r3004_mangos.sql b/sql/updates/r3004_mangos.sql new file mode 100644 index 000000000..62a13babd --- /dev/null +++ b/sql/updates/r3004_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_father_kamaros' WHERE entry IN (31279,32800); diff --git a/sql/updates/r3004_scriptdev2.sql b/sql/updates/r3004_scriptdev2.sql new file mode 100644 index 000000000..55d89b758 --- /dev/null +++ b/sql/updates/r3004_scriptdev2.sql @@ -0,0 +1,67 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1001050 AND -1001044; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1001044,'The Light\'s blessing be upon you for aiding me in my time of need, $N.',0,0,0,0,'father kamaros SAY_ESCORT_START_1'), +(-1001045,'I\'ve had my fill of this place. Let us depart.',0,0,0,1,'father kamaros SAY_ESCORT_START_2'), +(-1001046,'Face your judgment by the Light!',0,0,0,0,'father kamaros SAY_AGGRO_1'), +(-1001047,'The Argent Crusade never surrenders!',0,0,0,0,'father kamaros SAY_AGGRO_2'), +(-1001048,'You will never take me alive!',0,0,0,0,'father kamaros SAY_AGGRO_3'), +(-1001049,'I have you to thank for my life. I will return to my comrades and spread word of your bravery. Fight the Scourge with all the strength you can muster, and we will be by your side.',0,0,0,1,'father kamaros SAY_ESCORT_COMPLETE_2'), +(-1001050,'You must tell my brothers that I live.',0,0,0,1,'father kamaros SAY_ESCORT_COMPLETE_1'); + +DELETE FROM script_waypoint WHERE entry=31279; +INSERT INTO script_waypoint VALUES +(31279, 0, 6717.810, 3451.979, 683.747, 5000, 'SAY_ESCORT_START_1'), +(31279, 1, 6717.810, 3451.979, 683.747, 2000, 'SAY_ESCORT_START_2'), +(31279, 2, 6718.854, 3436.952, 682.197, 0, ''), +(31279, 3, 6725.714, 3432.644, 682.197, 0, ''), +(31279, 4, 6733.117, 3435.033, 682.136, 0, ''), +(31279, 5, 6744.931, 3445.788, 679.032, 0, ''), +(31279, 6, 6760.190, 3459.459, 674.487, 0, ''), +(31279, 7, 6773.156, 3469.683, 673.155, 0, ''), +(31279, 8, 6783.855, 3480.482, 674.481, 0, ''), +(31279, 9, 6790.618, 3484.064, 676.671, 0, ''), +(31279, 10, 6805.924, 3483.840, 682.128, 0, ''), +(31279, 11, 6818.427, 3483.294, 686.889, 0, ''), +(31279, 12, 6832.831, 3480.982, 690.189, 0, ''), +(31279, 13, 6854.910, 3479.888, 693.181, 0, ''), +(31279, 14, 6873.589, 3478.932, 694.618, 0, ''), +(31279, 15, 6895.129, 3478.388, 698.266, 0, ''), +(31279, 16, 6916.835, 3478.487, 702.575, 0, ''), +(31279, 17, 6937.283, 3477.337, 707.257, 0, ''), +(31279, 18, 6959.092, 3472.777, 710.180, 0, ''), +(31279, 19, 6969.530, 3470.091, 710.401, 0, ''), +(31279, 20, 6980.068, 3466.872, 710.831, 0, ''), +(31279, 21, 7008.199, 3457.296, 696.672, 0, ''), +(31279, 22, 7020.182, 3452.484, 696.518, 0, ''), +(31279, 23, 7031.362, 3445.230, 696.108, 3000, 'SAY_KAMAROS_COMPLETE_1'), +(31279, 24, 7031.362, 3445.230, 696.108, 7000, 'SAY_KAMAROS_COMPLETE_2'), +(31279, 25, 7067.656, 3420.741, 694.879, 0, ''); + +DELETE FROM script_waypoint WHERE entry=32800; +INSERT INTO script_waypoint VALUES +(32800, 0, 6736.090, 3422.160, 683.457, 5000, 'SAY_ESCORT_START_1'), +(32800, 1, 6736.090, 3422.160, 683.457, 2000, 'SAY_ESCORT_START_2'), +(32800, 2, 6734.518, 3425.644, 682.517, 0, ''), +(32800, 3, 6733.167, 3430.796, 682.156, 0, ''), +(32800, 4, 6733.117, 3435.033, 682.136, 0, ''), +(32800, 5, 6744.931, 3445.788, 679.032, 0, ''), +(32800, 6, 6760.190, 3459.459, 674.487, 0, ''), +(32800, 7, 6773.156, 3469.683, 673.155, 0, ''), +(32800, 8, 6783.855, 3480.482, 674.481, 0, ''), +(32800, 9, 6790.618, 3484.064, 676.671, 0, ''), +(32800, 10, 6805.924, 3483.840, 682.128, 0, ''), +(32800, 11, 6818.427, 3483.294, 686.889, 0, ''), +(32800, 12, 6832.831, 3480.982, 690.189, 0, ''), +(32800, 13, 6854.910, 3479.888, 693.181, 0, ''), +(32800, 14, 6873.589, 3478.932, 694.618, 0, ''), +(32800, 15, 6895.129, 3478.388, 698.266, 0, ''), +(32800, 16, 6916.835, 3478.487, 702.575, 0, ''), +(32800, 17, 6937.283, 3477.337, 707.257, 0, ''), +(32800, 18, 6959.092, 3472.777, 710.180, 0, ''), +(32800, 19, 6969.530, 3470.091, 710.401, 0, ''), +(32800, 20, 6980.068, 3466.872, 710.831, 0, ''), +(32800, 21, 7008.199, 3457.296, 696.672, 0, ''), +(32800, 22, 7020.182, 3452.484, 696.518, 0, ''), +(32800, 23, 7031.362, 3445.230, 696.108, 3000, 'SAY_KAMAROS_COMPLETE_1'), +(32800, 24, 7031.362, 3445.230, 696.108, 7000, 'SAY_KAMAROS_COMPLETE_2'), +(32800, 25, 7067.656, 3420.741, 694.879, 0, ''); From 3f56be64daae12722d4e4f4389f50112f4b5c256 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sat, 10 May 2014 21:15:27 +0200 Subject: [PATCH 1016/1172] [3005] Implement script support for quest 12831 Also remove the instant respawn from previous commits Part of #27 --- scripts/northrend/icecrown.cpp | 4 +- scripts/northrend/storm_peaks.cpp | 132 +++++++++++++++++++++++++++++- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 + sql/scriptdev2_script_full.sql | 58 ++++++++++++- sql/updates/r3005_mangos.sql | 1 + sql/updates/r3005_scriptdev2.sql | 57 +++++++++++++ 7 files changed, 249 insertions(+), 6 deletions(-) create mode 100644 sql/updates/r3005_mangos.sql create mode 100644 sql/updates/r3005_scriptdev2.sql diff --git a/scripts/northrend/icecrown.cpp b/scripts/northrend/icecrown.cpp index a4bbbb9ed..98d4b3a31 100644 --- a/scripts/northrend/icecrown.cpp +++ b/scripts/northrend/icecrown.cpp @@ -127,7 +127,7 @@ struct MANGOS_DLL_DECL npc_squad_leaderAI : public npc_escortAI { if (eventType == AI_EVENT_START_ESCORT && pInvoker->GetTypeId() == TYPEID_PLAYER) { - Start(false, (Player*)pInvoker, GetQuestTemplateStore(uiMiscValue), true); + Start(false, (Player*)pInvoker, GetQuestTemplateStore(uiMiscValue)); SendAIEventAround(AI_EVENT_CUSTOM_A, pInvoker, 0, 12.0f); } } @@ -476,7 +476,7 @@ struct MANGOS_DLL_DECL npc_father_kamarosAI : public npc_escortAI { m_uiCurrentQuestId = uiMiscValue; m_creature->SetStandState(UNIT_STAND_STATE_STAND); - Start(false, (Player*)pInvoker, GetQuestTemplateStore(uiMiscValue), true); + Start(false, (Player*)pInvoker, GetQuestTemplateStore(uiMiscValue)); } } diff --git a/scripts/northrend/storm_peaks.cpp b/scripts/northrend/storm_peaks.cpp index f121da545..9454ce8f4 100644 --- a/scripts/northrend/storm_peaks.cpp +++ b/scripts/northrend/storm_peaks.cpp @@ -17,16 +17,18 @@ /* ScriptData SDName: Storm_Peaks SD%Complete: 100 -SDComment: Quest support: 12977. +SDComment: Quest support: 12831, 12977. SDCategory: Storm Peaks EndScriptData */ /* ContentData npc_floating_spirit npc_restless_frostborn +npc_injured_miner EndContentData */ #include "precompiled.h" +#include "escort_ai.h" /*###### ## npc_floating_spirit @@ -101,6 +103,126 @@ bool EffectDummyCreature_npc_restless_frostborn(Unit* pCaster, uint32 uiSpellId, return false; } +/*###### +## npc_injured_miner +######*/ + +enum +{ + // yells + SAY_MINER_READY = -1001051, + SAY_MINER_COMPLETE = -1001052, + + // gossip + GOSSIP_ITEM_ID_READY = -3000112, + TEXT_ID_POISONED = 13650, + TEXT_ID_READY = 13651, + + // misc + SPELL_FEIGN_DEATH = 51329, + QUEST_ID_BITTER_DEPARTURE = 12832, +}; + +struct MANGOS_DLL_DECL npc_injured_minerAI : public npc_escortAI +{ + npc_injured_minerAI(Creature* pCreature) : npc_escortAI(pCreature) { Reset(); } + + void Reset() override { } + + void ReceiveAIEvent(AIEventType eventType, Creature* /*pSender*/, Unit* pInvoker, uint32 uiMiscValue) override + { + if (eventType == AI_EVENT_START_ESCORT && pInvoker->GetTypeId() == TYPEID_PLAYER) + { + Start(true, (Player*)pInvoker, GetQuestTemplateStore(uiMiscValue)); + SetEscortPaused(true); + + // set alternative waypoints if required + if (m_creature->GetPositionX() > 6650.0f) + SetCurrentWaypoint(7); + else if (m_creature->GetPositionX() > 6635.0f) + SetCurrentWaypoint(35); + + DoScriptText(SAY_MINER_READY, m_creature); + m_creature->SetStandState(UNIT_STAND_STATE_STAND); + m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); + m_creature->RemoveAurasDueToSpell(SPELL_FEIGN_DEATH); + m_creature->SetFactionTemporary(FACTION_ESCORT_N_FRIEND_ACTIVE, TEMPFACTION_RESTORE_RESPAWN); + } + else if (eventType == AI_EVENT_CUSTOM_A && pInvoker->GetTypeId() == TYPEID_PLAYER) + { + SetEscortPaused(false); + m_creature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); + } + } + + void WaypointReached(uint32 uiPointId) override + { + switch (uiPointId) + { + case 33: + DoScriptText(SAY_MINER_COMPLETE, m_creature); + if (Player* pPlayer = GetPlayerForEscort()) + { + pPlayer->GroupEventHappens(QUEST_ID_BITTER_DEPARTURE, m_creature); + m_creature->SetFacingToObject(pPlayer); + } + break; + case 34: + m_creature->ForcedDespawn(); + break; + case 46: + // merge with the other wp path + SetEscortPaused(true); + SetCurrentWaypoint(13); + SetEscortPaused(false); + break; + } + } +}; + +CreatureAI* GetAI_npc_injured_miner(Creature* pCreature) +{ + return new npc_injured_minerAI(pCreature); +} + +bool GossipHello_npc_injured_miner(Player* pPlayer, Creature* pCreature) +{ + if (pCreature->isQuestGiver()) + pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); + + if (!pCreature->HasAura(SPELL_FEIGN_DEATH)) + { + pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_ID_READY, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); + pPlayer->SEND_GOSSIP_MENU(TEXT_ID_READY, pCreature->GetObjectGuid()); + return true; + } + + pPlayer->SEND_GOSSIP_MENU(TEXT_ID_POISONED, pCreature->GetObjectGuid()); + return true; +} + +bool GossipSelect_npc_injured_miner(Player* pPlayer, Creature* pCreature, uint32 /*uiSender*/, uint32 uiAction) +{ + if (uiAction == GOSSIP_ACTION_INFO_DEF + 1) + { + pPlayer->CLOSE_GOSSIP_MENU(); + pCreature->AI()->SendAIEvent(AI_EVENT_CUSTOM_A, pPlayer, pCreature); + } + + return true; +} + +bool QuestAccept_npc_injured_miner(Player* pPlayer, Creature* pCreature, const Quest* pQuest) +{ + if (pQuest->GetQuestId() == QUEST_ID_BITTER_DEPARTURE) + { + pCreature->AI()->SendAIEvent(AI_EVENT_START_ESCORT, pPlayer, pCreature, pQuest->GetQuestId()); + return true; + } + + return false; +} + void AddSC_storm_peaks() { Script* pNewScript; @@ -114,4 +236,12 @@ void AddSC_storm_peaks() pNewScript->Name = "npc_restless_frostborn"; pNewScript->pEffectDummyNPC = &EffectDummyCreature_npc_restless_frostborn; pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_injured_miner"; + pNewScript->GetAI = &GetAI_npc_injured_miner; + pNewScript->pGossipHello = &GossipHello_npc_injured_miner; + pNewScript->pGossipSelect = &GossipSelect_npc_injured_miner; + pNewScript->pQuestAcceptNPC = &QuestAccept_npc_injured_miner; + pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 82175a39d..3c0404927 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3004" + #define SD2_REVISION_NR "3005" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index a2513d511..eb15f3b22 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -1076,6 +1076,7 @@ UPDATE creature_template SET ScriptName='npc_kaya' WHERE entry=11856; /* STORM PEAKS */ UPDATE creature_template SET ScriptName='npc_floating_spirit' WHERE entry IN (30141,30143,30145); UPDATE creature_template SET ScriptName='npc_restless_frostborn' WHERE entry IN (29974,30135,30144); +UPDATE creature_template SET ScriptName='npc_injured_miner' WHERE entry=29434; /* STORMWIND CITY */ UPDATE creature_template SET ScriptName='npc_bartleby' WHERE entry=6090; diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 10a3d932f..2c5994c07 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -1137,7 +1137,10 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1001047,'The Argent Crusade never surrenders!',0,0,0,0,'father kamaros SAY_AGGRO_2'), (-1001048,'You will never take me alive!',0,0,0,0,'father kamaros SAY_AGGRO_3'), (-1001049,'I have you to thank for my life. I will return to my comrades and spread word of your bravery. Fight the Scourge with all the strength you can muster, and we will be by your side.',0,0,0,1,'father kamaros SAY_ESCORT_COMPLETE_2'), -(-1001050,'You must tell my brothers that I live.',0,0,0,1,'father kamaros SAY_ESCORT_COMPLETE_1'); +(-1001050,'You must tell my brothers that I live.',0,0,0,1,'father kamaros SAY_ESCORT_COMPLETE_1'), + +(-1001051,'Let me know when you\'re ready. I\'d prefer sooner than later... what with the slowly dying from poison and all.',0,0,0,1,'injured goblin miner SAY_ESCORT_READY'), +(-1001052,'I\'m going to bring the venom sac to Ricket... and then... you know... collapse. Thank you for helping me!',0,0,0,1,'injured goblin miner SAY_ESCORT_COMPLETE'); -- -1 033 000 SHADOWFANG KEEP INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES @@ -4707,7 +4710,8 @@ INSERT INTO gossip_texts (entry,content_default,comment) VALUES (-3000108,'I need a moment of your time, sir.','prospector anvilward GOSSIP_ITEM_MOMENT'), (-3000109,'I am ready, Oronok. Let us destroy Cyrukh and free the elements!','oronok torn-heart GOSSIP_ITEM_FIGHT'), (-3000110,'Why... yes, of course. I\'ve something to show you right inside this building, Mr. Anvilward.','prospector anvilward GOSSIP_ITEM_SHOW'), -(-3000111,'I am ready, Anchorite. Let us begin the exorcism.','anchorite barada GOSSIP_ITEM_EXORCISM'); +(-3000111,'I am ready, Anchorite. Let us begin the exorcism.','anchorite barada GOSSIP_ITEM_EXORCISM'), +(-3000112,'I\'m ready - let\'s get out of here.','injured goblin miner GOSSIP_ITEM_ESCORT_READY'); -- -3 033 000 SHADOWFANG KEEP INSERT INTO gossip_texts (entry,content_default,comment) VALUES @@ -7970,4 +7974,54 @@ INSERT INTO script_waypoint VALUES (32800, 24, 7031.362, 3445.230, 696.108, 7000, 'SAY_KAMAROS_COMPLETE_2'), (32800, 25, 7067.656, 3420.741, 694.879, 0, ''); +DELETE FROM script_waypoint WHERE entry=29434; +INSERT INTO script_waypoint VALUES +(29434, 0, 6643.662, -1258.140, 396.812, 0, 'SAY_ESCORT_READY'), +(29434, 1, 6669.843, -1261.131, 396.362, 0, ''), +(29434, 2, 6672.479, -1244.102, 396.644, 0, ''), +(29434, 3, 6665.353, -1229.893, 399.214, 0, ''), +(29434, 4, 6656.884, -1210.856, 399.819, 0, ''), +(29434, 5, 6658.687, -1187.532, 398.761, 0, ''), +(29434, 6, 6664.340, -1166.372, 398.633, 0, ''), +(29434, 7, 6667.770, -1157.029, 398.136, 0, ''), +(29434, 8, 6670.005, -1145.671, 398.019, 0, ''), +(29434, 9, 6678.494, -1120.105, 397.160, 0, ''), +(29434, 10, 6685.051, -1100.975, 396.287, 0, ''), +(29434, 11, 6682.745, -1087.736, 396.795, 0, ''), +(29434, 12, 6679.602, -1073.343, 404.633, 0, ''), +(29434, 13, 6680.316, -1066.258, 405.499, 0, ''), +(29434, 14, 6689.714, -1053.830, 407.333, 0, ''), +(29434, 15, 6696.244, -1043.514, 411.230, 0, ''), +(29434, 16, 6695.093, -1032.211, 414.625, 0, ''), +(29434, 17, 6690.720, -1016.449, 414.825, 0, ''), +(29434, 18, 6679.976, -1009.805, 414.836, 0, ''), +(29434, 19, 6664.816, -1009.983, 414.840, 0, ''), +(29434, 20, 6647.982, -1010.354, 418.831, 0, ''), +(29434, 21, 6635.366, -1010.637, 423.007, 0, ''), +(29434, 22, 6615.762, -1001.898, 426.584, 0, ''), +(29434, 23, 6597.334, -1002.802, 429.766, 0, ''), +(29434, 24, 6581.178, -1009.971, 433.705, 0, ''), +(29434, 25, 6562.826, -1016.122, 433.558, 0, ''), +(29434, 26, 6535.386, -1024.189, 433.084, 0, ''), +(29434, 27, 6520.094, -1030.279, 433.506, 0, ''), +(29434, 28, 6505.704, -1028.766, 436.897, 0, ''), +(29434, 29, 6496.504, -1027.350, 437.309, 0, ''), +(29434, 30, 6489.653, -1026.457, 434.885, 0, ''), +(29434, 31, 6474.284, -1024.466, 434.650, 0, ''), +(29434, 32, 6456.688, -1022.172, 432.239, 0, ''), +(29434, 33, 6449.764, -1021.355, 431.501, 6000, 'SAY_ESCORT_COMPLETE'), +(29434, 34, 6418.638, -1018.385, 427.910, 0, 'despawn'), +(29434, 35, 6639.769, -1109.591, 427.193, 0, ''), +(29434, 36, 6641.524, -1104.348, 426.970, 0, ''), +(29434, 37, 6659.703, -1106.495, 423.005, 0, ''), +(29434, 38, 6670.649, -1118.345, 424.474, 0, ''), +(29434, 39, 6666.202, -1130.105, 423.113, 0, ''), +(29434, 40, 6642.683, -1129.107, 416.779, 0, ''), +(29434, 41, 6628.478, -1127.415, 414.923, 0, ''), +(29434, 42, 6619.763, -1113.337, 412.185, 0, ''), +(29434, 43, 6622.960, -1101.692, 409.846, 0, ''), +(29434, 44, 6640.454, -1088.525, 403.227, 0, ''), +(29434, 45, 6659.586, -1073.823, 402.945, 0, ''), +(29434, 46, 6671.060, -1064.829, 405.381, 0, 'continue at wp 13'); + -- EOF diff --git a/sql/updates/r3005_mangos.sql b/sql/updates/r3005_mangos.sql new file mode 100644 index 000000000..c3fab4ebd --- /dev/null +++ b/sql/updates/r3005_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_injured_miner' WHERE entry=29434; diff --git a/sql/updates/r3005_scriptdev2.sql b/sql/updates/r3005_scriptdev2.sql new file mode 100644 index 000000000..2b13b1541 --- /dev/null +++ b/sql/updates/r3005_scriptdev2.sql @@ -0,0 +1,57 @@ +DELETE FROM script_texts WHERE entry IN (-1001051,-1001052); +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1001051,'Let me know when you\'re ready. I\'d prefer sooner than later... what with the slowly dying from poison and all.',0,0,0,1,'injured goblin miner SAY_ESCORT_READY'), +(-1001052,'I\'m going to bring the venom sac to Ricket... and then... you know... collapse. Thank you for helping me!',0,0,0,1,'injured goblin miner SAY_ESCORT_COMPLETE'); +DELETE FROM gossip_texts WHERE entry=-3000112; +INSERT INTO gossip_texts (entry,content_default,comment) VALUES +(-3000112,'I\'m ready - let\'s get out of here.','injured goblin miner GOSSIP_ITEM_ESCORT_READY'); + +DELETE FROM script_waypoint WHERE entry=29434; +INSERT INTO script_waypoint VALUES +(29434, 0, 6643.662, -1258.140, 396.812, 0, 'SAY_ESCORT_READY'), +(29434, 1, 6669.843, -1261.131, 396.362, 0, ''), +(29434, 2, 6672.479, -1244.102, 396.644, 0, ''), +(29434, 3, 6665.353, -1229.893, 399.214, 0, ''), +(29434, 4, 6656.884, -1210.856, 399.819, 0, ''), +(29434, 5, 6658.687, -1187.532, 398.761, 0, ''), +(29434, 6, 6664.340, -1166.372, 398.633, 0, ''), +(29434, 7, 6667.770, -1157.029, 398.136, 0, ''), +(29434, 8, 6670.005, -1145.671, 398.019, 0, ''), +(29434, 9, 6678.494, -1120.105, 397.160, 0, ''), +(29434, 10, 6685.051, -1100.975, 396.287, 0, ''), +(29434, 11, 6682.745, -1087.736, 396.795, 0, ''), +(29434, 12, 6679.602, -1073.343, 404.633, 0, ''), +(29434, 13, 6680.316, -1066.258, 405.499, 0, ''), +(29434, 14, 6689.714, -1053.830, 407.333, 0, ''), +(29434, 15, 6696.244, -1043.514, 411.230, 0, ''), +(29434, 16, 6695.093, -1032.211, 414.625, 0, ''), +(29434, 17, 6690.720, -1016.449, 414.825, 0, ''), +(29434, 18, 6679.976, -1009.805, 414.836, 0, ''), +(29434, 19, 6664.816, -1009.983, 414.840, 0, ''), +(29434, 20, 6647.982, -1010.354, 418.831, 0, ''), +(29434, 21, 6635.366, -1010.637, 423.007, 0, ''), +(29434, 22, 6615.762, -1001.898, 426.584, 0, ''), +(29434, 23, 6597.334, -1002.802, 429.766, 0, ''), +(29434, 24, 6581.178, -1009.971, 433.705, 0, ''), +(29434, 25, 6562.826, -1016.122, 433.558, 0, ''), +(29434, 26, 6535.386, -1024.189, 433.084, 0, ''), +(29434, 27, 6520.094, -1030.279, 433.506, 0, ''), +(29434, 28, 6505.704, -1028.766, 436.897, 0, ''), +(29434, 29, 6496.504, -1027.350, 437.309, 0, ''), +(29434, 30, 6489.653, -1026.457, 434.885, 0, ''), +(29434, 31, 6474.284, -1024.466, 434.650, 0, ''), +(29434, 32, 6456.688, -1022.172, 432.239, 0, ''), +(29434, 33, 6449.764, -1021.355, 431.501, 6000, 'SAY_ESCORT_COMPLETE'), +(29434, 34, 6418.638, -1018.385, 427.910, 0, 'despawn'), +(29434, 35, 6639.769, -1109.591, 427.193, 0, ''), +(29434, 36, 6641.524, -1104.348, 426.970, 0, ''), +(29434, 37, 6659.703, -1106.495, 423.005, 0, ''), +(29434, 38, 6670.649, -1118.345, 424.474, 0, ''), +(29434, 39, 6666.202, -1130.105, 423.113, 0, ''), +(29434, 40, 6642.683, -1129.107, 416.779, 0, ''), +(29434, 41, 6628.478, -1127.415, 414.923, 0, ''), +(29434, 42, 6619.763, -1113.337, 412.185, 0, ''), +(29434, 43, 6622.960, -1101.692, 409.846, 0, ''), +(29434, 44, 6640.454, -1088.525, 403.227, 0, ''), +(29434, 45, 6659.586, -1073.823, 402.945, 0, ''), +(29434, 46, 6671.060, -1064.829, 405.381, 0, 'continue at wp 13'); From c07b3cbfb84c5a5ec5c05d690608d34389749df8 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sun, 11 May 2014 00:59:33 +0200 Subject: [PATCH 1017/1172] [3006] Implement script support for quest 12082 Part of #27 --- scripts/northrend/grizzly_hills.cpp | 276 +++++++++++++++++++++++++++- scripts/northrend/storm_peaks.cpp | 2 +- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 + sql/scriptdev2_script_full.sql | 72 +++++++- sql/updates/r3006_mangos.sql | 1 + sql/updates/r3006_scriptdev2.sql | 71 +++++++ 7 files changed, 421 insertions(+), 4 deletions(-) create mode 100644 sql/updates/r3006_mangos.sql create mode 100644 sql/updates/r3006_scriptdev2.sql diff --git a/scripts/northrend/grizzly_hills.cpp b/scripts/northrend/grizzly_hills.cpp index 62afe35c2..2fca5687d 100644 --- a/scripts/northrend/grizzly_hills.cpp +++ b/scripts/northrend/grizzly_hills.cpp @@ -17,15 +17,17 @@ /* ScriptData SDName: Grizzly_Hills SD%Complete: -SDComment: Quest support: 12138, 12198 +SDComment: Quest support: 12082, 12138, 12198 SDCategory: Grizzly Hills EndScriptData */ /* ContentData npc_depleted_war_golem +npc_harrison_jones EndContentData */ #include "precompiled.h" +#include "escort_ai.h" #include "pet_ai.h" /*###### @@ -95,6 +97,272 @@ bool EffectAuraDummy_npc_depleted_war_golem(const Aura* pAura, bool bApply) return true; } +/*###### +## npc_harrison_jones +######*/ + +enum +{ + // yells + SAY_HARRISON_ESCORT_START = -1001053, + SAY_HARRISON_CHAMBER_1 = -1001054, + SAY_HARRISON_CHAMBER_2 = -1001055, + SAY_HARRISON_CHAMBER_RELEASE = -1001056, + SAY_ADARRAH_THANK_YOU = -1001057, + SAY_HARRISON_CHAMBER_3 = -1001058, + SAY_HARRISON_CHAMBER_4 = -1001059, + SAY_HARRISON_CHAMBER_5 = -1001060, + SAY_HARRISON_CHAMBER_6 = -1001061, + SAY_HARRISON_CHAMBER_7 = -1001062, + SAY_HARRISON_ESCORT_COMPELTE = -1001063, + + // quest + QUEST_ID_DUN_DA_DUN_TAH = 12082, + + // npcs + NPC_ADARRAH = 24405, + NPC_TECAHUNA = 26865, + NPC_MUMMY_EFFECT_BUNNY = 26867, + NPC_ANCIENT_DRAKKARI_KING = 26871, + + // spells + SPELL_BUNNY_IMMOLATION = 48150, + SPELL_GONG_EFFECT = 47730, + SPELL_TECAHUNA_SPIRIT_BEAM = 47601, + SPELL_SUMMON_DRAKKARI_KING = 47602, + + // objects + GO_HARRISON_CAGE = 188465, + GO_ADARRAH_CAGE = 188487, + GO_FIRE_DOOR = 188480, +}; + +struct MANGOS_DLL_DECL npc_harrison_jonesAI : public npc_escortAI +{ + npc_harrison_jonesAI(Creature* pCreature) : npc_escortAI(pCreature) + { + m_uiActivateMummiesTimer = 0; + Reset(); + } + + ObjectGuid m_tecahunaGuid; + ObjectGuid m_adarrahGuid; + + uint32 m_uiActivateMummiesTimer; + + GuidList m_lImmolationBunnyGuids; + + void Reset() override { } + + void JustDied(Unit* pKiller) override + { + DoCleanChamberRoom(); + + npc_escortAI::JustDied(pKiller); + } + + void ReceiveAIEvent(AIEventType eventType, Creature* /*pSender*/, Unit* pInvoker, uint32 uiMiscValue) override + { + if (eventType == AI_EVENT_START_ESCORT && pInvoker->GetTypeId() == TYPEID_PLAYER) + { + DoScriptText(SAY_HARRISON_ESCORT_START, m_creature); + Start(false, (Player*)pInvoker, GetQuestTemplateStore(uiMiscValue)); + + if (GameObject* pCage = GetClosestGameObjectWithEntry(m_creature, GO_HARRISON_CAGE, 5.0f)) + pCage->Use(m_creature); + } + } + + void JustSummoned(Creature* pSummoned) override + { + if (pSummoned->GetEntry() == NPC_TECAHUNA) + { + m_tecahunaGuid = pSummoned->GetObjectGuid(); + + // sort the mummies based on the distance + std::list lBunniesInRange; + GetCreatureListWithEntryInGrid(lBunniesInRange, m_creature, NPC_MUMMY_EFFECT_BUNNY, 50.0f); + + lBunniesInRange.sort(ObjectDistanceOrder(pSummoned)); + + for (std::list::const_iterator itr = lBunniesInRange.begin(); itr != lBunniesInRange.end(); ++itr) + m_lImmolationBunnyGuids.push_back((*itr)->GetObjectGuid()); + } + else if (pSummoned->GetEntry() == NPC_ANCIENT_DRAKKARI_KING) + pSummoned->AI()->AttackStart(m_creature); + } + + void SummonedCreatureJustDied(Creature* pSummoned) override + { + if (pSummoned->GetEntry() == NPC_TECAHUNA) + { + SetEscortPaused(false); + DoCleanChamberRoom(); + } + } + + void DoCleanChamberRoom() + { + // open door + if (GameObject* pDoor = GetClosestGameObjectWithEntry(m_creature, GO_FIRE_DOOR, 50.0f)) + pDoor->ResetDoorOrButton(); + + // clear auras + std::list lBunniesInRange; + GetCreatureListWithEntryInGrid(lBunniesInRange, m_creature, NPC_MUMMY_EFFECT_BUNNY, 50.0f); + + for (std::list::const_iterator itr = lBunniesInRange.begin(); itr != lBunniesInRange.end(); ++itr) + (*itr)->RemoveAurasDueToSpell(SPELL_BUNNY_IMMOLATION); + + m_uiActivateMummiesTimer = 0; + } + + void WaypointReached(uint32 uiPointId) override + { + switch (uiPointId) + { + case 7: + DoScriptText(SAY_HARRISON_CHAMBER_1, m_creature); + break; + case 8: + DoScriptText(SAY_HARRISON_CHAMBER_2, m_creature); + break; + case 10: + m_creature->HandleEmote(EMOTE_ONESHOT_USESTANDING); + break; + case 11: + DoScriptText(SAY_HARRISON_CHAMBER_RELEASE, m_creature); + if (GameObject* pCage = GetClosestGameObjectWithEntry(m_creature, GO_ADARRAH_CAGE, 5.0f)) + pCage->Use(m_creature); + break; + case 12: + if (Creature* pAdarrah = GetClosestCreatureWithEntry(m_creature, NPC_ADARRAH, 5.0f)) + { + DoScriptText(SAY_ADARRAH_THANK_YOU, pAdarrah); + m_adarrahGuid = pAdarrah->GetObjectGuid(); + } + break; + case 13: + if (Creature* pAdarrah = m_creature->GetMap()->GetCreature(m_adarrahGuid)) + { + pAdarrah->SetWalk(false); + pAdarrah->GetMotionMaster()->MovePoint(0, 4878.416f, -4793.893f, 32.549f); + pAdarrah->ForcedDespawn(5000); + } + break; + case 15: + m_creature->SetFacingTo(0.2f); + m_creature->HandleEmote(EMOTE_ONESHOT_KNEEL); + break; + case 16: + { + // set mummies in fire + std::list lBunniesInRange; + GetCreatureListWithEntryInGrid(lBunniesInRange, m_creature, NPC_MUMMY_EFFECT_BUNNY, 50.0f); + + for (std::list::const_iterator itr = lBunniesInRange.begin(); itr != lBunniesInRange.end(); ++itr) + (*itr)->CastSpell((*itr), SPELL_BUNNY_IMMOLATION, true); + + m_creature->SetFacingTo(5.0f); + DoCastSpellIfCan(m_creature, SPELL_GONG_EFFECT); + break; + } + case 17: + DoScriptText(SAY_HARRISON_CHAMBER_3, m_creature); + break; + case 18: + DoScriptText(SAY_HARRISON_CHAMBER_4, m_creature); + break; + case 21: + // close door + if (GameObject* pDoor = GetClosestGameObjectWithEntry(m_creature, GO_FIRE_DOOR, 10.0f)) + pDoor->Use(m_creature); + break; + case 22: + DoScriptText(SAY_HARRISON_CHAMBER_5, m_creature); + SetRun(); + // summon snake + m_creature->SummonCreature(NPC_TECAHUNA, 4907.077f, -4819.035f, 32.55f, 2.32f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 60000); + break; + case 23: + DoScriptText(SAY_HARRISON_CHAMBER_6, m_creature); + break; + case 24: + DoScriptText(SAY_HARRISON_CHAMBER_7, m_creature); + break; + case 25: + // attack snake + if (Creature* pTecahuna = m_creature->GetMap()->GetCreature(m_tecahunaGuid)) + AttackStart(pTecahuna); + SetEscortPaused(true); + m_uiActivateMummiesTimer = 10000; + break; + case 53: + DoScriptText(SAY_HARRISON_ESCORT_COMPELTE, m_creature); + if (Player* pPlayer = GetPlayerForEscort()) + { + pPlayer->GroupEventHappens(QUEST_ID_DUN_DA_DUN_TAH, m_creature); + m_creature->SetFacingToObject(pPlayer); + } + break; + } + } + + void UpdateEscortAI(const uint32 uiDiff) override + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + // special script for snake fight + if (m_uiActivateMummiesTimer) + { + if (m_uiActivateMummiesTimer <= uiDiff) + { + if (Creature* pTecahuna = m_creature->GetMap()->GetCreature(m_tecahunaGuid)) + { + // activate 2 mummies at each turn + for (uint8 i = 0; i < 2; ++i) + { + if (Creature* pBunny = m_creature->GetMap()->GetCreature(m_lImmolationBunnyGuids.front())) + { + pTecahuna->CastSpell(pBunny, SPELL_TECAHUNA_SPIRIT_BEAM, true); + pBunny->CastSpell(pBunny, SPELL_SUMMON_DRAKKARI_KING, true, NULL, NULL, m_creature->GetObjectGuid()); + pBunny->RemoveAurasDueToSpell(SPELL_BUNNY_IMMOLATION); + m_lImmolationBunnyGuids.remove(m_lImmolationBunnyGuids.front()); + } + } + } + + // set timer based on the remaining mummies + if (m_lImmolationBunnyGuids.empty()) + m_uiActivateMummiesTimer = 0; + else + m_uiActivateMummiesTimer = urand(5000, 10000); + } + else + m_uiActivateMummiesTimer -= uiDiff; + } + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_npc_harrison_jones(Creature* pCreature) +{ + return new npc_harrison_jonesAI(pCreature); +} + +bool QuestAccept_npc_harrison_jones(Player* pPlayer, Creature* pCreature, const Quest* pQuest) +{ + if (pQuest->GetQuestId() == QUEST_ID_DUN_DA_DUN_TAH) + { + pCreature->AI()->SendAIEvent(AI_EVENT_START_ESCORT, pPlayer, pCreature, pQuest->GetQuestId()); + return true; + } + + return false; +} + void AddSC_grizzly_hills() { Script* pNewScript; @@ -104,4 +372,10 @@ void AddSC_grizzly_hills() pNewScript->GetAI = &GetAI_npc_depleted_war_golem; pNewScript->pEffectAuraDummy = &EffectAuraDummy_npc_depleted_war_golem; pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_harrison_jones"; + pNewScript->GetAI = &GetAI_npc_harrison_jones; + pNewScript->pQuestAcceptNPC = &QuestAccept_npc_harrison_jones; + pNewScript->RegisterSelf(); } diff --git a/scripts/northrend/storm_peaks.cpp b/scripts/northrend/storm_peaks.cpp index 9454ce8f4..0e18f3efe 100644 --- a/scripts/northrend/storm_peaks.cpp +++ b/scripts/northrend/storm_peaks.cpp @@ -17,7 +17,7 @@ /* ScriptData SDName: Storm_Peaks SD%Complete: 100 -SDComment: Quest support: 12831, 12977. +SDComment: Quest support: 12832, 12977. SDCategory: Storm Peaks EndScriptData */ diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 3c0404927..9f4c3ca09 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3005" + #define SD2_REVISION_NR "3006" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index eb15f3b22..df5d6cc7a 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -591,6 +591,7 @@ UPDATE instance_template SET ScriptName='instance_gnomeregan' WHERE map=90; /* GRIZZLY HILLS */ UPDATE creature_template SET ScriptName='npc_depleted_war_golem' WHERE entry=27017; +UPDATE creature_template SET ScriptName='npc_harrison_jones' WHERE entry=26814; /* GRUUL'S LAIR */ UPDATE instance_template SET ScriptName='instance_gruuls_lair' WHERE map =565; diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 2c5994c07..b31dc7253 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -1140,7 +1140,19 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1001050,'You must tell my brothers that I live.',0,0,0,1,'father kamaros SAY_ESCORT_COMPLETE_1'), (-1001051,'Let me know when you\'re ready. I\'d prefer sooner than later... what with the slowly dying from poison and all.',0,0,0,1,'injured goblin miner SAY_ESCORT_READY'), -(-1001052,'I\'m going to bring the venom sac to Ricket... and then... you know... collapse. Thank you for helping me!',0,0,0,1,'injured goblin miner SAY_ESCORT_COMPLETE'); +(-1001052,'I\'m going to bring the venom sac to Ricket... and then... you know... collapse. Thank you for helping me!',0,0,0,1,'injured goblin miner SAY_ESCORT_COMPLETE'), + +(-1001053,'Alright, kid. Stay behind me and you\'ll be fine.',0,0,0,36,'harrison jones SAY_ESCORT_START'), +(-1001054,'Their ceremonial chamber, where I was to be sacrificed...',0,0,0,1,'harrison jones SAY_CHAMBER_1'), +(-1001055,'Time to put an end to all this!',0,0,0,1,'harrison jones SAY_CHAMBER_2'), +(-1001056,'You\'re free to go, miss.',0,0,0,1,'harrison jones SAY_CHAMBER_RELEASE'), +(-1001057,'Thank you!',0,0,0,71,'Adarrah SAY_THANK_YOU'), +(-1001058,'Odd. That usually does it.',0,0,0,1,'harrison jones SAY_CHAMBER_3'), +(-1001059,'Just as well, I\'ve had enough of this place.',0,0,0,1,'harrison jones SAY_CHAMBER_4'), +(-1001060,'What\'s this?',0,0,0,0,'harrison jones SAY_CHAMBER_5'), +(-1001061,'Aww, not a snake!',0,0,0,1,'harrison jones SAY_CHAMBER_6'), +(-1001062,'Listen, kid. I can handle this thing. You just watch my back!',0,0,0,1,'harrison jones SAY_CHAMBER_7'), +(-1001063,'See ya \'round, kid!',0,0,0,1,'harrison jones SAY_ESCORT_COMPLETE'); -- -1 033 000 SHADOWFANG KEEP INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES @@ -8024,4 +8036,62 @@ INSERT INTO script_waypoint VALUES (29434, 45, 6659.586, -1073.823, 402.945, 0, ''), (29434, 46, 6671.060, -1064.829, 405.381, 0, 'continue at wp 13'); +DELETE FROM script_waypoint WHERE entry=26814; +INSERT INTO script_waypoint VALUES +(26814, 0, 4905.259, -4758.709, 27.316, 2000, 'open cage - SAY_ESCORT_START'), +(26814, 1, 4895.403, -4754.880, 27.233, 0, ''), +(26814, 2, 4887.629, -4761.870, 27.233, 0, ''), +(26814, 3, 4881.628, -4768.923, 32.142, 0, ''), +(26814, 4, 4878.448, -4772.853, 32.646, 0, ''), +(26814, 5, 4876.892, -4787.923, 32.531, 0, ''), +(26814, 6, 4877.230, -4792.542, 32.532, 0, ''), +(26814, 7, 4878.416, -4793.893, 32.549, 5000, 'SAY_CHAMBER_1'), +(26814, 8, 4878.416, -4793.893, 32.549, 5000, 'SAY_CHAMBER_2'), +(26814, 9, 4883.791, -4796.650, 32.575, 0, ''), +(26814, 10, 4908.433, -4797.975, 32.514, 4000, 'open cage'), +(26814, 11, 4908.433, -4797.975, 32.514, 3000, 'SAY_CHAMBER_RELEASE'), +(26814, 12, 4908.433, -4797.975, 32.514, 2000, 'SAY_THANK_YOU'), +(26814, 13, 4908.678, -4806.945, 32.283, 0, ''), +(26814, 14, 4911.196, -4817.785, 32.491, 0, ''), +(26814, 15, 4914.571, -4823.823, 32.666, 3000, ''), +(26814, 16, 4914.571, -4823.823, 32.666, 7000, 'bang gong'), +(26814, 17, 4908.558, -4820.374, 32.550, 5000, 'SAY_CHAMBER_3'), +(26814, 18, 4908.558, -4820.374, 32.550, 0, 'SAY_CHAMBER_4'), +(26814, 19, 4899.099, -4816.810, 32.029, 0, ''), +(26814, 20, 4891.287, -4813.185, 32.029, 0, ''), +(26814, 21, 4886.007, -4803.263, 32.029, 0, 'close door'), +(26814, 22, 4883.618, -4799.119, 32.556, 1000, 'SAY_CHAMBER_5 - set run'), +(26814, 23, 4900.580, -4806.635, 32.029, 7000, 'SAY_CHAMBER_6'), +(26814, 24, 4900.580, -4806.635, 32.029, 6000, 'SAY_CHAMBER_7'), +(26814, 25, 4900.580, -4806.635, 32.029, 0, 'snake attack'), +(26814, 26, 4886.463, -4799.330, 32.552, 0, ''), +(26814, 27, 4862.184, -4782.641, 32.605, 0, ''), +(26814, 28, 4843.930, -4771.764, 32.602, 0, ''), +(26814, 29, 4831.872, -4775.357, 32.581, 0, ''), +(26814, 30, 4819.254, -4788.892, 25.473, 0, ''), +(26814, 31, 4814.696, -4798.355, 25.483, 0, ''), +(26814, 32, 4824.520, -4822.539, 25.492, 0, ''), +(26814, 33, 4826.834, -4838.310, 25.511, 0, ''), +(26814, 34, 4822.480, -4846.951, 25.473, 0, ''), +(26814, 35, 4812.121, -4852.343, 25.622, 0, ''), +(26814, 36, 4779.916, -4848.937, 25.442, 0, ''), +(26814, 37, 4770.701, -4848.962, 25.428, 0, ''), +(26814, 38, 4758.476, -4857.186, 25.848, 0, ''), +(26814, 39, 4737.023, -4857.752, 26.292, 0, ''), +(26814, 40, 4722.875, -4857.749, 26.495, 0, ''), +(26814, 41, 4715.862, -4857.869, 24.707, 0, ''), +(26814, 42, 4705.447, -4858.532, 28.910, 0, ''), +(26814, 43, 4691.578, -4858.917, 33.103, 0, ''), +(26814, 44, 4681.879, -4860.041, 35.440, 0, ''), +(26814, 45, 4670.293, -4861.545, 35.480, 0, ''), +(26814, 46, 4667.317, -4878.836, 35.480, 0, ''), +(26814, 47, 4661.148, -4895.541, 35.499, 0, ''), +(26814, 48, 4656.874, -4907.395, 38.980, 0, ''), +(26814, 49, 4656.184, -4916.478, 44.398, 0, ''), +(26814, 50, 4656.566, -4927.874, 47.576, 0, ''), +(26814, 51, 4660.753, -4938.885, 47.992, 0, ''), +(26814, 52, 4667.464, -4954.763, 47.993, 0, ''), +(26814, 53, 4673.411, -4967.304, 47.791, 3000, 'SAY_ESCORT_COMPLETE'), +(26814, 54, 4694.427, -4979.960, 44.715, 0, ''); + -- EOF diff --git a/sql/updates/r3006_mangos.sql b/sql/updates/r3006_mangos.sql new file mode 100644 index 000000000..103770c39 --- /dev/null +++ b/sql/updates/r3006_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_harrison_jones' WHERE entry=26814; diff --git a/sql/updates/r3006_scriptdev2.sql b/sql/updates/r3006_scriptdev2.sql new file mode 100644 index 000000000..dbfdcbbfa --- /dev/null +++ b/sql/updates/r3006_scriptdev2.sql @@ -0,0 +1,71 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1001063 AND -1001053; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1001053,'Alright, kid. Stay behind me and you\'ll be fine.',0,0,0,36,'harrison jones SAY_ESCORT_START'), +(-1001054,'Their ceremonial chamber, where I was to be sacrificed...',0,0,0,1,'harrison jones SAY_CHAMBER_1'), +(-1001055,'Time to put an end to all this!',0,0,0,1,'harrison jones SAY_CHAMBER_2'), +(-1001056,'You\'re free to go, miss.',0,0,0,1,'harrison jones SAY_CHAMBER_RELEASE'), +(-1001057,'Thank you!',0,0,0,71,'Adarrah SAY_THANK_YOU'), +(-1001058,'Odd. That usually does it.',0,0,0,1,'harrison jones SAY_CHAMBER_3'), +(-1001059,'Just as well, I\'ve had enough of this place.',0,0,0,1,'harrison jones SAY_CHAMBER_4'), +(-1001060,'What\'s this?',0,0,0,0,'harrison jones SAY_CHAMBER_5'), +(-1001061,'Aww, not a snake!',0,0,0,1,'harrison jones SAY_CHAMBER_6'), +(-1001062,'Listen, kid. I can handle this thing. You just watch my back!',0,0,0,1,'harrison jones SAY_CHAMBER_7'), +(-1001063,'See ya \'round, kid!',0,0,0,1,'harrison jones SAY_ESCORT_COMPLETE'); + +DELETE FROM script_waypoint WHERE entry=26814; +INSERT INTO script_waypoint VALUES +(26814, 0, 4905.259, -4758.709, 27.316, 2000, 'open cage - SAY_ESCORT_START'), +(26814, 1, 4895.403, -4754.880, 27.233, 0, ''), +(26814, 2, 4887.629, -4761.870, 27.233, 0, ''), +(26814, 3, 4881.628, -4768.923, 32.142, 0, ''), +(26814, 4, 4878.448, -4772.853, 32.646, 0, ''), +(26814, 5, 4876.892, -4787.923, 32.531, 0, ''), +(26814, 6, 4877.230, -4792.542, 32.532, 0, ''), +(26814, 7, 4878.416, -4793.893, 32.549, 5000, 'SAY_CHAMBER_1'), +(26814, 8, 4878.416, -4793.893, 32.549, 5000, 'SAY_CHAMBER_2'), +(26814, 9, 4883.791, -4796.650, 32.575, 0, ''), +(26814, 10, 4908.433, -4797.975, 32.514, 4000, 'open cage'), +(26814, 11, 4908.433, -4797.975, 32.514, 3000, 'SAY_CHAMBER_RELEASE'), +(26814, 12, 4908.433, -4797.975, 32.514, 2000, 'SAY_THANK_YOU'), +(26814, 13, 4908.678, -4806.945, 32.283, 0, ''), +(26814, 14, 4911.196, -4817.785, 32.491, 0, ''), +(26814, 15, 4914.571, -4823.823, 32.666, 3000, ''), +(26814, 16, 4914.571, -4823.823, 32.666, 7000, 'bang gong'), +(26814, 17, 4908.558, -4820.374, 32.550, 5000, 'SAY_CHAMBER_3'), +(26814, 18, 4908.558, -4820.374, 32.550, 0, 'SAY_CHAMBER_4'), +(26814, 19, 4899.099, -4816.810, 32.029, 0, ''), +(26814, 20, 4891.287, -4813.185, 32.029, 0, ''), +(26814, 21, 4886.007, -4803.263, 32.029, 0, 'close door'), +(26814, 22, 4883.618, -4799.119, 32.556, 1000, 'SAY_CHAMBER_5 - set run'), +(26814, 23, 4900.580, -4806.635, 32.029, 7000, 'SAY_CHAMBER_6'), +(26814, 24, 4900.580, -4806.635, 32.029, 6000, 'SAY_CHAMBER_7'), +(26814, 25, 4900.580, -4806.635, 32.029, 0, 'snake attack'), +(26814, 26, 4886.463, -4799.330, 32.552, 0, ''), +(26814, 27, 4862.184, -4782.641, 32.605, 0, ''), +(26814, 28, 4843.930, -4771.764, 32.602, 0, ''), +(26814, 29, 4831.872, -4775.357, 32.581, 0, ''), +(26814, 30, 4819.254, -4788.892, 25.473, 0, ''), +(26814, 31, 4814.696, -4798.355, 25.483, 0, ''), +(26814, 32, 4824.520, -4822.539, 25.492, 0, ''), +(26814, 33, 4826.834, -4838.310, 25.511, 0, ''), +(26814, 34, 4822.480, -4846.951, 25.473, 0, ''), +(26814, 35, 4812.121, -4852.343, 25.622, 0, ''), +(26814, 36, 4779.916, -4848.937, 25.442, 0, ''), +(26814, 37, 4770.701, -4848.962, 25.428, 0, ''), +(26814, 38, 4758.476, -4857.186, 25.848, 0, ''), +(26814, 39, 4737.023, -4857.752, 26.292, 0, ''), +(26814, 40, 4722.875, -4857.749, 26.495, 0, ''), +(26814, 41, 4715.862, -4857.869, 24.707, 0, ''), +(26814, 42, 4705.447, -4858.532, 28.910, 0, ''), +(26814, 43, 4691.578, -4858.917, 33.103, 0, ''), +(26814, 44, 4681.879, -4860.041, 35.440, 0, ''), +(26814, 45, 4670.293, -4861.545, 35.480, 0, ''), +(26814, 46, 4667.317, -4878.836, 35.480, 0, ''), +(26814, 47, 4661.148, -4895.541, 35.499, 0, ''), +(26814, 48, 4656.874, -4907.395, 38.980, 0, ''), +(26814, 49, 4656.184, -4916.478, 44.398, 0, ''), +(26814, 50, 4656.566, -4927.874, 47.576, 0, ''), +(26814, 51, 4660.753, -4938.885, 47.992, 0, ''), +(26814, 52, 4667.464, -4954.763, 47.993, 0, ''), +(26814, 53, 4673.411, -4967.304, 47.791, 3000, 'SAY_ESCORT_COMPLETE'), +(26814, 54, 4694.427, -4979.960, 44.715, 0, ''); From da04f2bb4ca30b6e868aa81f32f1ebea25ed54a3 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sun, 11 May 2014 23:02:51 +0200 Subject: [PATCH 1018/1172] [3007] Implement script support for quest 11241 Part of #27 --- scripts/northrend/howling_fjord.cpp | 145 +++++++++++++++++++++++++++- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 + sql/scriptdev2_script_full.sql | 60 +++++++++++- sql/updates/r3007_mangos.sql | 1 + sql/updates/r3007_scriptdev2.sql | 59 +++++++++++ 6 files changed, 265 insertions(+), 3 deletions(-) create mode 100644 sql/updates/r3007_mangos.sql create mode 100644 sql/updates/r3007_scriptdev2.sql diff --git a/scripts/northrend/howling_fjord.cpp b/scripts/northrend/howling_fjord.cpp index 93d8de8e4..9a9ba3ece 100644 --- a/scripts/northrend/howling_fjord.cpp +++ b/scripts/northrend/howling_fjord.cpp @@ -17,7 +17,7 @@ /* ScriptData SDName: Howling_Fjord SD%Complete: ? -SDComment: Quest support: 11154, 11300, 11343, 11344, 11464. +SDComment: Quest support: 11154, 11241, 11300, 11343, 11344, 11464. SDCategory: Howling Fjord EndScriptData */ @@ -29,9 +29,11 @@ npc_silvermoon_harry npc_lich_king_village npc_king_ymiron npc_firecrackers_bunny +npc_apothecary_hanes EndContentData */ #include "precompiled.h" +#include "escort_ai.h" enum { @@ -838,6 +840,141 @@ CreatureAI* GetAI_npc_firecrackers_bunny(Creature* pCreature) return new npc_firecrackers_bunnyAI(pCreature); } +/*###### +## npc_apothecary_hanes +######*/ + +enum +{ + // yells + SAY_HANES_ESCORT_START = -1001064, + SAY_HANES_FIRE_1 = -1001065, + SAY_HANES_FIRE_2 = -1001066, + SAY_HANES_SUPPLIES_1 = -1001067, + SAY_HANES_SUPPLIES_2 = -1001068, + SAY_HANES_SUPPLIES_ESCAPE = -1001069, + SAY_HANES_SUPPLIES_COMPLETE = -1001070, + SAY_HANES_ARRIVE_BASE = -1001071, + + // spells + SPELL_HEALING_POTION = 17534, + SPELL_LOW_POLY_FIRE = 51195, + + // misc + NPC_HANES_TRIGGER = 23968, + QUEST_ID_TRIAL_OF_FIRE = 11241, +}; + +struct MANGOS_DLL_DECL npc_apothecary_hanesAI : public npc_escortAI +{ + npc_apothecary_hanesAI(Creature* pCreature) : npc_escortAI(pCreature) { Reset(); } + + uint32 m_uiHealingTimer; + + void Reset() override + { + m_uiHealingTimer = 0; + } + + void ReceiveAIEvent(AIEventType eventType, Creature* /*pSender*/, Unit* pInvoker, uint32 uiMiscValue) override + { + if (eventType == AI_EVENT_START_ESCORT && pInvoker->GetTypeId() == TYPEID_PLAYER) + { + Start(true, (Player*)pInvoker, GetQuestTemplateStore(uiMiscValue)); + DoScriptText(SAY_HANES_ESCORT_START, m_creature); + m_creature->SetFactionTemporary(FACTION_ESCORT_H_ACTIVE, TEMPFACTION_RESTORE_RESPAWN); + } + } + + void WaypointReached(uint32 uiPointId) override + { + switch (uiPointId) + { + case 2: + DoScriptText(SAY_HANES_FIRE_1, m_creature); + break; + case 3: + DoScriptText(SAY_HANES_FIRE_2, m_creature); + break; + case 14: + case 20: + case 21: + case 29: + { + m_creature->HandleEmote(EMOTE_ONESHOT_ATTACK1H); + + // set all nearby triggers on fire - ToDo: research if done by spell! + std::list lTriggersInRange; + GetCreatureListWithEntryInGrid(lTriggersInRange, m_creature, NPC_HANES_TRIGGER, 10.0f); + + for (std::list::const_iterator itr = lTriggersInRange.begin(); itr != lTriggersInRange.end(); ++itr) + { + (*itr)->CastSpell((*itr), SPELL_LOW_POLY_FIRE, true); + (*itr)->ForcedDespawn(30000); + } + break; + } + case 15: + DoScriptText(SAY_HANES_SUPPLIES_1, m_creature); + break; + case 22: + DoScriptText(SAY_HANES_SUPPLIES_2, m_creature); + break; + case 30: + m_creature->HandleEmote(EMOTE_ONESHOT_LAUGH_NOSHEATHE); + break; + case 31: + DoScriptText(SAY_HANES_SUPPLIES_COMPLETE, m_creature); + break; + case 32: + DoScriptText(SAY_HANES_SUPPLIES_ESCAPE, m_creature); + break; + case 40: + DoScriptText(SAY_HANES_ARRIVE_BASE, m_creature); + break; + case 44: + if (Player* pPlayer = GetPlayerForEscort()) + pPlayer->GroupEventHappens(QUEST_ID_TRIAL_OF_FIRE, m_creature); + break; + } + } + + void UpdateEscortAI(const uint32 uiDiff) override + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_creature->GetHealthPercent() < 75.0f) + { + if (m_uiHealingTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_HEALING_POTION) == CAST_OK) + m_uiHealingTimer = 10000; + } + else + m_uiHealingTimer -= uiDiff; + } + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_npc_apothecary_hanes(Creature* pCreature) +{ + return new npc_apothecary_hanesAI(pCreature); +} + +bool QuestAccept_npc_apothecary_hanes(Player* pPlayer, Creature* pCreature, const Quest* pQuest) +{ + if (pQuest->GetQuestId() == QUEST_ID_TRIAL_OF_FIRE) + { + pCreature->AI()->SendAIEvent(AI_EVENT_START_ESCORT, pPlayer, pCreature, pQuest->GetQuestId()); + return true; + } + + return false; +} + void AddSC_howling_fjord() { Script* pNewScript; @@ -884,4 +1021,10 @@ void AddSC_howling_fjord() pNewScript->Name = "npc_firecrackers_bunny"; pNewScript->GetAI = &GetAI_npc_firecrackers_bunny; pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_apothecary_hanes"; + pNewScript->GetAI = &GetAI_npc_apothecary_hanes; + pNewScript->pQuestAcceptNPC = &QuestAccept_npc_apothecary_hanes; + pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 9f4c3ca09..4db7eb157 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3006" + #define SD2_REVISION_NR "3007" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index df5d6cc7a..e63b17d9b 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -681,6 +681,7 @@ UPDATE creature_template SET ScriptName='npc_silvermoon_harry' WHERE entry=24539 UPDATE creature_template SET ScriptName='npc_lich_king_village' WHERE entry=24248; UPDATE creature_template SET ScriptName='npc_king_ymiron' WHERE entry=24321; UPDATE creature_template SET ScriptName='npc_firecrackers_bunny' WHERE entry=24230; +UPDATE creature_template SET ScriptName='npc_apothecary_hanes' WHERE entry=23784; /* */ /* ICECROWN CITADEL */ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index b31dc7253..398ad4a96 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -1152,7 +1152,16 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1001060,'What\'s this?',0,0,0,0,'harrison jones SAY_CHAMBER_5'), (-1001061,'Aww, not a snake!',0,0,0,1,'harrison jones SAY_CHAMBER_6'), (-1001062,'Listen, kid. I can handle this thing. You just watch my back!',0,0,0,1,'harrison jones SAY_CHAMBER_7'), -(-1001063,'See ya \'round, kid!',0,0,0,1,'harrison jones SAY_ESCORT_COMPLETE'); +(-1001063,'See ya \'round, kid!',0,0,0,1,'harrison jones SAY_ESCORT_COMPLETE'), + +(-1001064,'You couldn\'t have come at a better time! Let\'s get out of here.',0,0,0,0,'apothecary hanes SAY_ESCORT_START'), +(-1001065,'Yes, let us leave... but not before we leave our Alliance hosts something to remember us by!',0,0,0,0,'apothecary hanes SAY_FIRE_1'), +(-1001066,'They have limited supplies in this camp. It would be a real shame if something were to happen to them.',0,0,0,16,'apothecary hanes SAY_FIRE_2'), +(-1001067,'Ah, yes... watch it burn!',0,0,0,0,'apothecary hanes SAY_SUPPLIES_1'), +(-1001068,'We\'re almost done!',0,0,0,0,'apothecary hanes SAY_SUPPLIES_2'), +(-1001069,'Let\'s high-tail it out of here.',0,0,0,0,'apothecary hanes SAY_SUPPLIES_ESCAPE'), +(-1001070,'That\'ll teach you to mess with an apothecary, you motherless Alliance dogs!',0,1,0,22,'apothecary hanes SAY_SUPPLIES_COMPLETE'), +(-1001071,'Don\'t shoot! Apothecary coming through!',0,1,0,0,'apothecary hanes SAY_ARRIVE_BASE'); -- -1 033 000 SHADOWFANG KEEP INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES @@ -8094,4 +8103,53 @@ INSERT INTO script_waypoint VALUES (26814, 53, 4673.411, -4967.304, 47.791, 3000, 'SAY_ESCORT_COMPLETE'), (26814, 54, 4694.427, -4979.960, 44.715, 0, ''); +DELETE FROM script_waypoint WHERE entry=23784; +INSERT INTO script_waypoint VALUES +(23784, 0, 1377.875, -6421.482, 1.323, 0, 'SAY_ESCORT_START'), +(23784, 1, 1377.523, -6415.196, 1.515, 0, ''), +(23784, 2, 1379.988, -6401.920, 2.428, 8000, 'SAY_FIRE_1'), +(23784, 3, 1379.988, -6401.920, 2.428, 5000, 'SAY_FIRE_2'), +(23784, 4, 1379.749, -6398.577, 2.829, 0, ''), +(23784, 5, 1383.767, -6392.131, 3.639, 0, ''), +(23784, 6, 1395.301, -6381.135, 4.711, 0, ''), +(23784, 7, 1407.236, -6372.452, 6.434, 0, ''), +(23784, 8, 1421.052, -6363.196, 6.430, 0, ''), +(23784, 9, 1424.191, -6358.807, 6.443, 0, ''), +(23784, 10, 1422.745, -6350.552, 6.138, 0, ''), +(23784, 11, 1419.152, -6342.663, 5.811, 0, ''), +(23784, 12, 1414.308, -6336.418, 5.865, 0, ''), +(23784, 13, 1405.468, -6336.249, 6.210, 0, ''), +(23784, 14, 1400.868, -6340.454, 6.415, 4000, 'set fire'), +(23784, 15, 1400.868, -6340.454, 6.415, 15000, 'SAY_SUPPLIES_1'), +(23784, 16, 1406.004, -6335.554, 6.190, 0, ''), +(23784, 17, 1421.080, -6337.905, 5.517, 0, ''), +(23784, 18, 1436.049, -6341.191, 6.772, 0, ''), +(23784, 19, 1449.407, -6344.460, 8.267, 0, ''), +(23784, 20, 1465.833, -6345.101, 7.695, 2000, 'set fire'), +(23784, 21, 1470.890, -6347.974, 7.576, 3000, 'set fire'), +(23784, 22, 1470.890, -6347.974, 7.576, 4000, 'SAY_SUPPLIES_2'), +(23784, 23, 1464.277, -6345.285, 7.896, 0, ''), +(23784, 24, 1463.023, -6339.777, 7.718, 0, ''), +(23784, 25, 1465.487, -6335.771, 7.332, 0, ''), +(23784, 26, 1479.166, -6325.064, 7.440, 0, ''), +(23784, 27, 1489.401, -6315.133, 8.296, 0, ''), +(23784, 28, 1502.828, -6311.045, 6.770, 0, ''), +(23784, 29, 1506.398, -6317.246, 7.299, 4000, 'set fire'), +(23784, 30, 1506.398, -6317.246, 7.299, 2000, 'laugh'), +(23784, 31, 1506.398, -6317.246, 7.299, 10000, 'SAY_SUPPLIES_COMPLETE'), +(23784, 32, 1506.398, -6317.246, 7.299, 5000, 'SAY_SUPPLIES_ESCAPE'), +(23784, 33, 1511.000, -6295.903, 6.193, 0, ''), +(23784, 34, 1517.061, -6275.862, 5.202, 0, ''), +(23784, 35, 1523.781, -6258.195, 4.561, 0, ''), +(23784, 36, 1529.622, -6244.452, 5.823, 0, ''), +(23784, 37, 1537.658, -6224.802, 6.349, 0, ''), +(23784, 38, 1545.301, -6214.430, 6.917, 0, ''), +(23784, 39, 1556.078, -6203.805, 6.566, 0, ''), +(23784, 40, 1567.203, -6194.417, 7.262, 0, 'SAY_ARRIVE_BASE'), +(23784, 41, 1582.464, -6183.626, 7.145, 0, ''), +(23784, 42, 1593.279, -6173.173, 7.319, 0, ''), +(23784, 43, 1604.470, -6164.387, 8.379, 0, ''), +(23784, 44, 1617.776, -6157.249, 9.323, 2000, 'quest complete'), +(23784, 45, 1644.696, -6149.582, 7.357, 0, ''); + -- EOF diff --git a/sql/updates/r3007_mangos.sql b/sql/updates/r3007_mangos.sql new file mode 100644 index 000000000..313da0f3f --- /dev/null +++ b/sql/updates/r3007_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_apothecary_hanes' WHERE entry=23784; diff --git a/sql/updates/r3007_scriptdev2.sql b/sql/updates/r3007_scriptdev2.sql new file mode 100644 index 000000000..45e88c4b8 --- /dev/null +++ b/sql/updates/r3007_scriptdev2.sql @@ -0,0 +1,59 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1001071 AND -1001064; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1001064,'You couldn\'t have come at a better time! Let\'s get out of here.',0,0,0,0,'apothecary hanes SAY_ESCORT_START'), +(-1001065,'Yes, let us leave... but not before we leave our Alliance hosts something to remember us by!',0,0,0,0,'apothecary hanes SAY_FIRE_1'), +(-1001066,'They have limited supplies in this camp. It would be a real shame if something were to happen to them.',0,0,0,16,'apothecary hanes SAY_FIRE_2'), +(-1001067,'Ah, yes... watch it burn!',0,0,0,0,'apothecary hanes SAY_SUPPLIES_1'), +(-1001068,'We\'re almost done!',0,0,0,0,'apothecary hanes SAY_SUPPLIES_2'), +(-1001069,'Let\'s high-tail it out of here.',0,0,0,0,'apothecary hanes SAY_SUPPLIES_ESCAPE'), +(-1001070,'That\'ll teach you to mess with an apothecary, you motherless Alliance dogs!',0,1,0,22,'apothecary hanes SAY_SUPPLIES_COMPLETE'), +(-1001071,'Don\'t shoot! Apothecary coming through!',0,1,0,0,'apothecary hanes SAY_ARRIVE_BASE'); + +DELETE FROM script_waypoint WHERE entry=23784; +INSERT INTO script_waypoint VALUES +(23784, 0, 1377.875, -6421.482, 1.323, 0, 'SAY_ESCORT_START'), +(23784, 1, 1377.523, -6415.196, 1.515, 0, ''), +(23784, 2, 1379.988, -6401.920, 2.428, 8000, 'SAY_FIRE_1'), +(23784, 3, 1379.988, -6401.920, 2.428, 5000, 'SAY_FIRE_2'), +(23784, 4, 1379.749, -6398.577, 2.829, 0, ''), +(23784, 5, 1383.767, -6392.131, 3.639, 0, ''), +(23784, 6, 1395.301, -6381.135, 4.711, 0, ''), +(23784, 7, 1407.236, -6372.452, 6.434, 0, ''), +(23784, 8, 1421.052, -6363.196, 6.430, 0, ''), +(23784, 9, 1424.191, -6358.807, 6.443, 0, ''), +(23784, 10, 1422.745, -6350.552, 6.138, 0, ''), +(23784, 11, 1419.152, -6342.663, 5.811, 0, ''), +(23784, 12, 1414.308, -6336.418, 5.865, 0, ''), +(23784, 13, 1405.468, -6336.249, 6.210, 0, ''), +(23784, 14, 1400.868, -6340.454, 6.415, 4000, 'set fire'), +(23784, 15, 1400.868, -6340.454, 6.415, 15000, 'SAY_SUPPLIES_1'), +(23784, 16, 1406.004, -6335.554, 6.190, 0, ''), +(23784, 17, 1421.080, -6337.905, 5.517, 0, ''), +(23784, 18, 1436.049, -6341.191, 6.772, 0, ''), +(23784, 19, 1449.407, -6344.460, 8.267, 0, ''), +(23784, 20, 1465.833, -6345.101, 7.695, 2000, 'set fire'), +(23784, 21, 1470.890, -6347.974, 7.576, 3000, 'set fire'), +(23784, 22, 1470.890, -6347.974, 7.576, 4000, 'SAY_SUPPLIES_2'), +(23784, 23, 1464.277, -6345.285, 7.896, 0, ''), +(23784, 24, 1463.023, -6339.777, 7.718, 0, ''), +(23784, 25, 1465.487, -6335.771, 7.332, 0, ''), +(23784, 26, 1479.166, -6325.064, 7.440, 0, ''), +(23784, 27, 1489.401, -6315.133, 8.296, 0, ''), +(23784, 28, 1502.828, -6311.045, 6.770, 0, ''), +(23784, 29, 1506.398, -6317.246, 7.299, 4000, 'set fire'), +(23784, 30, 1506.398, -6317.246, 7.299, 2000, 'laugh'), +(23784, 31, 1506.398, -6317.246, 7.299, 10000, 'SAY_SUPPLIES_COMPLETE'), +(23784, 32, 1506.398, -6317.246, 7.299, 5000, 'SAY_SUPPLIES_ESCAPE'), +(23784, 33, 1511.000, -6295.903, 6.193, 0, ''), +(23784, 34, 1517.061, -6275.862, 5.202, 0, ''), +(23784, 35, 1523.781, -6258.195, 4.561, 0, ''), +(23784, 36, 1529.622, -6244.452, 5.823, 0, ''), +(23784, 37, 1537.658, -6224.802, 6.349, 0, ''), +(23784, 38, 1545.301, -6214.430, 6.917, 0, ''), +(23784, 39, 1556.078, -6203.805, 6.566, 0, ''), +(23784, 40, 1567.203, -6194.417, 7.262, 0, 'SAY_ARRIVE_BASE'), +(23784, 41, 1582.464, -6183.626, 7.145, 0, ''), +(23784, 42, 1593.279, -6173.173, 7.319, 0, ''), +(23784, 43, 1604.470, -6164.387, 8.379, 0, ''), +(23784, 44, 1617.776, -6157.249, 9.323, 2000, 'quest complete'), +(23784, 45, 1644.696, -6149.582, 7.357, 0, ''); From b238aebdc175dab5b7113bf8409f866d15bf941a Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sun, 25 May 2014 18:52:30 +0200 Subject: [PATCH 1019/1172] [3008] Implement script support for quests 5944 and 5862 (ending scene) Close #92 Please note that there are a few quest details which might need to be fixed (such as the mount id) --- .../eastern_kingdoms/western_plaguelands.cpp | 860 +++++++++++++++++- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 3 + sql/scriptdev2_script_full.sql | 108 ++- sql/updates/r3008_mangos.sql | 3 + sql/updates/r3008_scriptdev2.sql | 107 +++ 6 files changed, 1080 insertions(+), 3 deletions(-) create mode 100644 sql/updates/r3008_mangos.sql create mode 100644 sql/updates/r3008_scriptdev2.sql diff --git a/scripts/eastern_kingdoms/western_plaguelands.cpp b/scripts/eastern_kingdoms/western_plaguelands.cpp index c50d06bff..0d57a3e6f 100644 --- a/scripts/eastern_kingdoms/western_plaguelands.cpp +++ b/scripts/eastern_kingdoms/western_plaguelands.cpp @@ -17,13 +17,16 @@ /* ScriptData SDName: Western_Plaguelands SD%Complete: 90 -SDComment: Quest support: 5216, 5219, 5222, 5225, 5229, 5231, 5233, 5235, 9446. +SDComment: Quest support: 5216, 5219, 5222, 5225, 5229, 5231, 5233, 5235, 5862, 5944, 9446. SDCategory: Western Plaguelands EndScriptData */ /* ContentData npc_the_scourge_cauldron npc_anchorite_truuen +npc_taelan_fordring +npc_isillien +npc_tirion_fordring EndContentData */ #include "precompiled.h" @@ -223,6 +226,843 @@ bool QuestAccept_npc_anchorite_truuen(Player* pPlayer, Creature* pCreature, cons return true; } +/*###### +## npc_taelan_fordring +######*/ + +enum +{ + // scarlet end quest texts + SAY_SCARLET_COMPLETE_1 = -1001076, + SAY_SCARLET_COMPLETE_2 = -1001077, + + // escort text + SAY_ESCORT_START = -1001078, + SAY_EXIT_KEEP = -1001079, + EMOTE_MOUNT = -1001080, + SAY_REACH_TOWER = -1001081, + SAY_ISILLIEN_1 = -1001082, + SAY_ISILLIEN_2 = -1001083, + SAY_ISILLIEN_3 = -1001084, + SAY_ISILLIEN_4 = -1001085, + SAY_ISILLIEN_5 = -1001086, + SAY_ISILLIEN_6 = -1001087, + EMOTE_ISILLIEN_ATTACK = -1001088, + SAY_ISILLIEN_ATTACK = -1001089, + SAY_KILL_TAELAN_1 = -1001090, + EMOTE_ISILLIEN_LAUGH = -1001091, + SAY_KILL_TAELAN_2 = -1001092, + EMOTE_ATTACK_PLAYER = -1001093, + SAY_TIRION_1 = -1001094, + SAY_TIRION_2 = -1001095, + SAY_TIRION_3 = -1001096, + SAY_TIRION_4 = -1001097, + SAY_TIRION_5 = -1001098, + SAY_EPILOG_1 = -1001099, + EMOTE_KNEEL = -1001100, + SAY_EPILOG_2 = -1001101, + EMOTE_HOLD_TAELAN = -1001102, + SAY_EPILOG_3 = -1001103, + SAY_EPILOG_4 = -1001104, + SAY_EPILOG_5 = -1001105, + + // spells + SPELL_DEVOTION_AURA = 17232, + SPELL_CRUSADER_STRIKE = 14518, + SPELL_HOLY_STRIKE = 17143, + SPELL_HOLY_CLEAVE = 18819, + SPELL_HOLY_LIGHT = 15493, + SPELL_LAY_ON_HANDS = 17233, + SPELL_TAELAN_SUFFERING = 18810, + + // isillen spells + SPELL_DOMINATE_MIND = 14515, + SPELL_FLASH_HEAL = 10917, + SPELL_GREATER_HEAL = 10965, + SPELL_MANA_BURN = 15800, + SPELL_MIND_BLAST = 17194, + SPELL_MIND_FLAY = 17165, + SPELL_TAELAN_DEATH = 18969, + + // npcs + NPC_TAELAN_FORDRING = 1842, + NPC_SCARLET_CAVALIER = 1836, + NPC_ISILLIEN = 1840, + NPC_TIRION_FORDRING = 12126, // Todo: add mount + NPC_CRIMSON_ELITE = 12128, + + MODEL_TAELAN_MOUNT = 2410, // ToDo: fix id! + + // quests + QUEST_ID_SCARLET_SUBTERFUGE = 5862, + QUEST_ID_IN_DREAMS = 5944, +}; + +static const int32 aCavalierYells[] = { -1001072, -1001073, -1001074, -1001075 }; + +static const DialogueEntry aScarletDialogue[] = +{ + // Scarlet Subterfuge ending dialogue + {NPC_SCARLET_CAVALIER, 0, 3000}, + {QUEST_ID_SCARLET_SUBTERFUGE, 0, 7000}, + {SAY_SCARLET_COMPLETE_1, NPC_TAELAN_FORDRING, 2000}, + {QUEST_ID_IN_DREAMS, 0, 0}, + {SPELL_DEVOTION_AURA, 0, 3000}, + {SAY_SCARLET_COMPLETE_2, NPC_TAELAN_FORDRING, 0}, + // In Dreams event dialogue + {SAY_EXIT_KEEP, NPC_TAELAN_FORDRING, 6000}, + {EMOTE_MOUNT, NPC_TAELAN_FORDRING, 4000}, + {MODEL_TAELAN_MOUNT, 0, 0}, + {SAY_REACH_TOWER, NPC_TAELAN_FORDRING, 4000}, + {SAY_ISILLIEN_1, NPC_ISILLIEN, 2000}, + {SAY_ISILLIEN_2, NPC_TAELAN_FORDRING, 3000}, + {SAY_ISILLIEN_3, NPC_TAELAN_FORDRING, 10000}, + {SAY_ISILLIEN_4, NPC_ISILLIEN, 7000}, + {SAY_ISILLIEN_5, NPC_ISILLIEN, 5000}, + {SAY_ISILLIEN_6, NPC_ISILLIEN, 6000}, + {EMOTE_ISILLIEN_ATTACK, NPC_ISILLIEN, 3000}, + {SAY_ISILLIEN_ATTACK, NPC_ISILLIEN, 3000}, + {SPELL_CRUSADER_STRIKE, 0, 0}, + {SAY_KILL_TAELAN_1, NPC_ISILLIEN, 1000}, + {EMOTE_ISILLIEN_LAUGH, NPC_ISILLIEN, 4000}, + {SAY_KILL_TAELAN_2, NPC_ISILLIEN, 10000}, + {EMOTE_ATTACK_PLAYER, NPC_ISILLIEN, 0}, + {NPC_TIRION_FORDRING, 0, 5000}, + {NPC_ISILLIEN, 0, 10000}, + {SAY_TIRION_1, NPC_TIRION_FORDRING, 4000}, + {SAY_TIRION_2, NPC_ISILLIEN, 6000}, + {SAY_TIRION_3, NPC_TIRION_FORDRING, 4000}, + {SAY_TIRION_4, NPC_TIRION_FORDRING, 3000}, + {SAY_TIRION_5, NPC_ISILLIEN, 0}, + {EMOTE_KNEEL, NPC_TIRION_FORDRING, 4000}, + {SAY_EPILOG_2, NPC_TIRION_FORDRING, 5000}, + {EMOTE_HOLD_TAELAN, NPC_TIRION_FORDRING, 5000}, + {SAY_EPILOG_3, NPC_TIRION_FORDRING, 6000}, + {SAY_EPILOG_4, NPC_TIRION_FORDRING, 7000}, + {SAY_EPILOG_5, NPC_TIRION_FORDRING, 0}, + {0, 0, 0}, +}; + +struct MANGOS_DLL_DECL npc_taelan_fordringAI: public npc_escortAI, private DialogueHelper +{ + npc_taelan_fordringAI(Creature* pCreature): npc_escortAI(pCreature), + DialogueHelper(aScarletDialogue) + { + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + + m_bScarletComplete = false; + m_bFightStarted = false; + m_bTaelanDead = false; + m_bHasMount = false; + Reset(); + } + + bool m_bScarletComplete; + bool m_bFightStarted; + bool m_bHasMount; + bool m_bTaelanDead; + + ObjectGuid m_isillenGuid; + ObjectGuid m_tirionGuid; + GuidList m_lCavalierGuids; + + uint32 m_uiHolyCleaveTimer; + uint32 m_uiHolyStrikeTimer; + uint32 m_uiCrusaderStrike; + uint32 m_uiHolyLightTimer; + + void Reset() override + { + m_uiHolyCleaveTimer = urand(11000, 15000); + m_uiHolyStrikeTimer = urand(6000, 8000); + m_uiCrusaderStrike = urand(1000, 5000); + m_uiHolyLightTimer = 0; + } + + void Aggro(Unit* /*pWho*/) override + { + if (m_bHasMount) + m_creature->Unmount(); + + DoCastSpellIfCan(m_creature, SPELL_DEVOTION_AURA); + } + + void MoveInLineOfSight(Unit* pWho) override + { + if (m_bTaelanDead) + return; + + npc_escortAI::MoveInLineOfSight(pWho); + } + + void EnterEvadeMode() override + { + if (m_bTaelanDead) + { + m_creature->RemoveAllAurasOnEvade(); + m_creature->DeleteThreatList(); + m_creature->CombatStop(true); + m_creature->SetLootRecipient(NULL); + + m_creature->InterruptNonMeleeSpells(true); + m_creature->SetHealth(0); + m_creature->StopMoving(); + m_creature->ClearComboPointHolders(); + m_creature->RemoveAllAurasOnDeath(); + m_creature->ModifyAuraState(AURA_STATE_HEALTHLESS_20_PERCENT, false); + m_creature->ModifyAuraState(AURA_STATE_HEALTHLESS_35_PERCENT, false); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + m_creature->ClearAllReactives(); + m_creature->GetMotionMaster()->Clear(); + m_creature->GetMotionMaster()->MoveIdle(); + m_creature->SetStandState(UNIT_STAND_STATE_DEAD); + + Reset(); + } + else + { + if (m_bHasMount) + m_creature->Mount(MODEL_TAELAN_MOUNT); + + npc_escortAI::EnterEvadeMode(); + } + } + + void JustReachedHome() override + { + if (m_bScarletComplete) + { + StartNextDialogueText(SPELL_DEVOTION_AURA); + m_bScarletComplete = false; + } + } + + void ReceiveAIEvent(AIEventType eventType, Creature* /*pSender*/, Unit* pInvoker, uint32 uiMiscValue) override + { + if (eventType == AI_EVENT_START_ESCORT && pInvoker->GetTypeId() == TYPEID_PLAYER) + { + Start(false, (Player*)pInvoker, GetQuestTemplateStore(uiMiscValue)); + DoScriptText(SAY_ESCORT_START, m_creature); + m_creature->SetFactionTemporary(FACTION_ESCORT_N_FRIEND_PASSIVE, TEMPFACTION_RESTORE_RESPAWN); + } + else if (eventType == AI_EVENT_CUSTOM_A && pInvoker->GetTypeId() == TYPEID_PLAYER && uiMiscValue == QUEST_ID_SCARLET_SUBTERFUGE) + StartNextDialogueText(NPC_SCARLET_CAVALIER); + else if (eventType == AI_EVENT_CUSTOM_B && pInvoker->GetEntry() == NPC_ISILLIEN) + { + StartNextDialogueText(NPC_TIRION_FORDRING); + m_creature->SummonCreature(NPC_TIRION_FORDRING, 2620.273f, -1920.917f, 74.25f, 0, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 15*MINUTE*IN_MILLISECONDS); + } + } + + void WaypointReached(uint32 uiPointId) override + { + switch (uiPointId) + { + case 25: + SetEscortPaused(true); + StartNextDialogueText(SAY_EXIT_KEEP); + break; + case 55: + SetEscortPaused(true); + StartNextDialogueText(SAY_REACH_TOWER); + break; + } + } + + void JustSummoned(Creature* pSummoned) override + { + switch (pSummoned->GetEntry()) + { + case NPC_ISILLIEN: + SendAIEvent(AI_EVENT_START_ESCORT, m_creature, pSummoned); + m_isillenGuid = pSummoned->GetObjectGuid(); + + // summon additional crimson elites + float fX, fY, fZ; + pSummoned->GetNearPoint(pSummoned, fX, fY, fZ, 0, 5.0f, M_PI_F * 1.25f); + pSummoned->SummonCreature(NPC_CRIMSON_ELITE, fX, fY, fZ, pSummoned->GetOrientation(), TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 15*MINUTE*IN_MILLISECONDS); + pSummoned->GetNearPoint(pSummoned, fX, fY, fZ, 0, 5.0f, 0); + pSummoned->SummonCreature(NPC_CRIMSON_ELITE, fX, fY, fZ, pSummoned->GetOrientation(), TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 15*MINUTE*IN_MILLISECONDS); + break; + case NPC_TIRION_FORDRING: + m_tirionGuid = pSummoned->GetObjectGuid(); + SendAIEvent(AI_EVENT_START_ESCORT, m_creature, pSummoned); + break; + } + } + + void SummonedCreatureJustDied(Creature* pSummoned) override + { + if (pSummoned->GetEntry() == NPC_ISILLIEN) + { + if (Creature* pTirion = m_creature->GetMap()->GetCreature(m_tirionGuid)) + DoScriptText(SAY_EPILOG_1, pTirion); + } + } + + void SummonedMovementInform(Creature* pSummoned, uint32 /*uiMotionType*/, uint32 uiPointId) override + { + if (pSummoned->GetEntry() != NPC_TIRION_FORDRING) + return; + + if (uiPointId == 100) + { + StartNextDialogueText(SAY_TIRION_1); + if (Creature* pIsillien = m_creature->GetMap()->GetCreature(m_isillenGuid)) + pSummoned->SetFacingToObject(pIsillien); + } + else if (uiPointId == 200) + StartNextDialogueText(EMOTE_KNEEL); + } + + void JustDidDialogueStep(int32 iEntry) override + { + switch (iEntry) + { + case NPC_SCARLET_CAVALIER: + { + // kneel and make everyone worried + m_creature->SetStandState(UNIT_STAND_STATE_KNEEL); + m_creature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER); + + std::list lCavaliersInRange; + GetCreatureListWithEntryInGrid(lCavaliersInRange, m_creature, NPC_SCARLET_CAVALIER, 10.0f); + + uint8 uiIndex = 0; + for (std::list::const_iterator itr = lCavaliersInRange.begin(); itr != lCavaliersInRange.end(); ++itr) + { + m_lCavalierGuids.push_back((*itr)->GetObjectGuid()); + (*itr)->SetFacingToObject(m_creature); + DoScriptText(aCavalierYells[uiIndex], (*itr)); + ++uiIndex; + } + break; + } + case QUEST_ID_SCARLET_SUBTERFUGE: + { + float fX, fY, fZ; + for (GuidList::const_iterator itr = m_lCavalierGuids.begin(); itr != m_lCavalierGuids.end(); ++itr) + { + if (Creature* pCavalier = m_creature->GetMap()->GetCreature(*itr)) + { + m_creature->GetContactPoint(pCavalier, fX, fY, fZ); + pCavalier->GetMotionMaster()->MovePoint(0, fX, fY, fZ); + } + } + break; + } + case SAY_SCARLET_COMPLETE_1: + // stand up and knock down effect + m_creature->SetStandState(UNIT_STAND_STATE_STAND); + DoCastSpellIfCan(m_creature, SPELL_TAELAN_SUFFERING); + break; + case QUEST_ID_IN_DREAMS: + // force attack + for (GuidList::const_iterator itr = m_lCavalierGuids.begin(); itr != m_lCavalierGuids.end(); ++itr) + { + if (Creature* pCavalier = m_creature->GetMap()->GetCreature(*itr)) + pCavalier->AI()->AttackStart(m_creature); + } + m_bScarletComplete = true; + break; + case SAY_SCARLET_COMPLETE_2: + m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER); + break; + case MODEL_TAELAN_MOUNT: + // mount when outside + m_bHasMount = true; + SetEscortPaused(false); + m_creature->Mount(MODEL_TAELAN_MOUNT); + break; + case SAY_REACH_TOWER: + // start fight event + m_creature->SummonCreature(NPC_ISILLIEN, 2693.12f, -1943.04f, 72.04f, 2.11f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 15*MINUTE*IN_MILLISECONDS); + break; + case SAY_ISILLIEN_2: + if (Creature* pIsillien = m_creature->GetMap()->GetCreature(m_isillenGuid)) + m_creature->SetFacingToObject(pIsillien); + break; + case SPELL_CRUSADER_STRIKE: + { + // spawn additioinal elites + m_creature->SummonCreature(NPC_CRIMSON_ELITE, 2711.32f, -1882.67f, 67.89f, 3.2f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 15*MINUTE*IN_MILLISECONDS); + m_creature->SummonCreature(NPC_CRIMSON_ELITE, 2710.93f, -1878.90f, 67.97f, 3.2f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 15*MINUTE*IN_MILLISECONDS); + m_creature->SummonCreature(NPC_CRIMSON_ELITE, 2710.53f, -1875.28f, 67.90f, 3.2f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 15*MINUTE*IN_MILLISECONDS); + + std::list lElitesInRange; + Player* pPlayer = GetPlayerForEscort(); + if (!pPlayer) + return; + + GetCreatureListWithEntryInGrid(lElitesInRange, m_creature, NPC_CRIMSON_ELITE, 70.0f); + + for (std::list::const_iterator itr = lElitesInRange.begin(); itr != lElitesInRange.end(); ++itr) + (*itr)->AI()->AttackStart(pPlayer); + + // Isillien only attacks Taelan + if (Creature* pIsillien = m_creature->GetMap()->GetCreature(m_isillenGuid)) + { + pIsillien->AI()->AttackStart(m_creature); + AttackStart(pIsillien); + } + + m_bFightStarted = true; + break; + } + case SAY_KILL_TAELAN_1: + // kill taelan and attack players + if (Creature* pIsillien = m_creature->GetMap()->GetCreature(m_isillenGuid)) + SendAIEvent(AI_EVENT_CUSTOM_A, m_creature, pIsillien); + break; + case EMOTE_ATTACK_PLAYER: + // attack players + if (Creature* pIsillien = m_creature->GetMap()->GetCreature(m_isillenGuid)) + { + if (Player* pPlayer = GetPlayerForEscort()) + pIsillien->AI()->AttackStart(pPlayer); + } + break; + // tirion event + case SAY_TIRION_5: + if (Creature* pIsillien = m_creature->GetMap()->GetCreature(m_isillenGuid)) + { + if (Creature* pTirion = m_creature->GetMap()->GetCreature(m_tirionGuid)) + { + pTirion->AI()->AttackStart(pIsillien); + pIsillien->AI()->AttackStart(pTirion); + } + } + break; + // epilog dialogue + case EMOTE_HOLD_TAELAN: + if (Creature* pTirion = m_creature->GetMap()->GetCreature(m_tirionGuid)) + pTirion->SetStandState(UNIT_STAND_STATE_KNEEL); + break; + case SAY_EPILOG_4: + if (Creature* pTirion = m_creature->GetMap()->GetCreature(m_tirionGuid)) + pTirion->SetStandState(UNIT_STAND_STATE_STAND); + break; + case SAY_EPILOG_5: + if (Creature* pTirion = m_creature->GetMap()->GetCreature(m_tirionGuid)) + { + if (Player* pPlayer = GetPlayerForEscort()) + { + pPlayer->GroupEventHappens(QUEST_ID_IN_DREAMS, m_creature); + pTirion->SetFacingToObject(pPlayer); + } + + pTirion->ForcedDespawn(3*MINUTE*IN_MILLISECONDS); + pTirion->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER); + } + m_creature->ForcedDespawn(3*MINUTE*IN_MILLISECONDS); + break; + } + } + + Creature* GetSpeakerByEntry(uint32 uiEntry) override + { + switch (uiEntry) + { + case NPC_TAELAN_FORDRING: return m_creature; + case NPC_ISILLIEN: return m_creature->GetMap()->GetCreature(m_isillenGuid); + case NPC_TIRION_FORDRING: return m_creature->GetMap()->GetCreature(m_tirionGuid); + + default: + return NULL; + } + } + + void UpdateEscortAI(const uint32 uiDiff) override + { + DialogueUpdate(uiDiff); + + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_bTaelanDead) + return; + + if (!m_bTaelanDead && m_creature->GetHealthPercent() < 50.0f) + { + StartNextDialogueText(SAY_KILL_TAELAN_1); + m_bTaelanDead = true; + } + + if (m_uiHolyCleaveTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_HOLY_CLEAVE) == CAST_OK) + m_uiHolyCleaveTimer = urand(11000, 13000); + } + else + m_uiHolyCleaveTimer -= uiDiff; + + if (m_uiHolyStrikeTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_HOLY_STRIKE) == CAST_OK) + m_uiHolyStrikeTimer = urand(9000, 14000); + } + else + m_uiHolyStrikeTimer -= uiDiff; + + if (m_uiCrusaderStrike < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_CRUSADER_STRIKE) == CAST_OK) + m_uiCrusaderStrike = urand(7000, 12000); + } + else + m_uiCrusaderStrike -= uiDiff; + + if (m_creature->GetHealthPercent() < 75.0f) + { + if (m_uiHolyLightTimer < uiDiff) + { + if (Unit* pTarget = DoSelectLowestHpFriendly(50.0f)) + { + if (DoCastSpellIfCan(pTarget, SPELL_HOLY_LIGHT) == CAST_OK) + m_uiHolyLightTimer = urand(10000, 15000); + } + } + else + m_uiHolyLightTimer -= uiDiff; + } + + if (!m_bFightStarted && m_creature->GetHealthPercent() < 15.0f) + DoCastSpellIfCan(m_creature, SPELL_LAY_ON_HANDS); + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_npc_taelan_fordring(Creature* pCreature) +{ + return new npc_taelan_fordringAI(pCreature); +} + +bool QuestAccept_npc_taelan_fordring(Player* pPlayer, Creature* pCreature, const Quest* pQuest) +{ + if (pQuest->GetQuestId() == QUEST_ID_IN_DREAMS) + pCreature->AI()->SendAIEvent(AI_EVENT_START_ESCORT, pPlayer, pCreature, pQuest->GetQuestId()); + + return true; +} + +bool QuestRewarded_npc_taelan_fordring(Player* pPlayer, Creature* pCreature, const Quest* pQuest) +{ + if (pQuest->GetQuestId() == QUEST_ID_SCARLET_SUBTERFUGE) + pCreature->AI()->SendAIEvent(AI_EVENT_CUSTOM_A, pPlayer, pCreature, pQuest->GetQuestId()); + + return true; +} + +bool EffectDummyCreature_npc_taelan_fordring(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget, ObjectGuid /*originalCasterGuid*/) +{ + // always check spellid and effectindex + if (uiSpellId == SPELL_TAELAN_DEATH && uiEffIndex == EFFECT_INDEX_0 && pCaster->GetEntry() == NPC_ISILLIEN) + { + pCreatureTarget->AI()->EnterEvadeMode(); + pCaster->SetFacingToObject(pCreatureTarget); + ((Creature*)pCaster)->AI()->EnterEvadeMode(); + + return true; + } + + return false; +} + +/*###### +## npc_isillien +######*/ + +struct MANGOS_DLL_DECL npc_isillienAI: public npc_escortAI +{ + npc_isillienAI(Creature* pCreature): npc_escortAI(pCreature) + { + m_bTirionSpawned = false; + m_bTaelanDead = false; + Reset(); + } + + bool m_bTirionSpawned; + bool m_bTaelanDead; + + ObjectGuid m_taelanGuid; + + uint32 m_uiManaBurnTimer; + uint32 m_uFlashHealTimer; + uint32 m_uiGreaterHealTimer; + uint32 m_uiHolyLightTimer; + uint32 m_uiDominateTimer; + uint32 m_uiMindBlastTimer; + uint32 m_uiMindFlayTimer; + + void Reset() override + { + m_uiManaBurnTimer = urand(7000, 12000); + m_uFlashHealTimer = urand(10000, 15000); + m_uiDominateTimer = urand(10000, 14000); + m_uiMindBlastTimer = urand(0, 1000); + m_uiMindFlayTimer = urand(3000, 7000); + m_uiGreaterHealTimer = 0; + } + + void MoveInLineOfSight(Unit* /*pWho*/) override + { + // attack only on request + } + + void EnterEvadeMode() override + { + // evade and keep the same posiiton + if (m_bTaelanDead) + { + m_creature->RemoveAllAurasOnEvade(); + m_creature->DeleteThreatList(); + m_creature->CombatStop(true); + m_creature->SetLootRecipient(NULL); + + m_creature->GetMotionMaster()->MoveIdle(); + + Reset(); + } + else + npc_escortAI::EnterEvadeMode(); + } + + void ReceiveAIEvent(AIEventType eventType, Creature* pSender, Unit* pInvoker, uint32 /*uiMiscValue*/) override + { + if (pSender->GetEntry() != NPC_TAELAN_FORDRING) + return; + + // move outside the tower + if (eventType == AI_EVENT_START_ESCORT) + Start(false); + else if (eventType == AI_EVENT_CUSTOM_A) + { + // kill Taelan + DoCastSpellIfCan(pInvoker, SPELL_TAELAN_DEATH, CAST_INTERRUPT_PREVIOUS); + m_bTaelanDead = true; + m_taelanGuid = pInvoker->GetObjectGuid(); + } + } + + void WaypointReached(uint32 uiPointId) override + { + switch (uiPointId) + { + case 2: + SetEscortPaused(true); + break; + } + } + + void UpdateEscortAI(const uint32 uiDiff) override + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + // start event epilog + if (!m_bTirionSpawned && m_creature->GetHealthPercent() < 20.0f) + { + if (Creature* pTaelan = m_creature->GetMap()->GetCreature(m_taelanGuid)) + SendAIEvent(AI_EVENT_CUSTOM_B, m_creature, pTaelan); + m_bTirionSpawned = true; + } + + // combat spells + if (m_uiMindBlastTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_MIND_BLAST) == CAST_OK) + m_uiMindBlastTimer = urand(3000, 5000); + } + else + m_uiMindBlastTimer -= uiDiff; + + if (m_uiMindFlayTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_MIND_FLAY) == CAST_OK) + m_uiMindFlayTimer = urand(9000, 15000); + } + else + m_uiMindFlayTimer -= uiDiff; + + if (m_uiManaBurnTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_MANA_BURN) == CAST_OK) + m_uiManaBurnTimer = urand(8000, 12000); + } + else + m_uiManaBurnTimer -= uiDiff; + + if (m_uiDominateTimer < uiDiff) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1, SPELL_DOMINATE_MIND, SELECT_FLAG_PLAYER)) + { + if (DoCastSpellIfCan(pTarget, SPELL_DOMINATE_MIND) == CAST_OK) + m_uiDominateTimer = urand(25000, 30000); + } + } + else + m_uiDominateTimer -= uiDiff; + + if (m_uFlashHealTimer < uiDiff) + { + if (Unit* pTarget = DoSelectLowestHpFriendly(50.0f)) + { + if (DoCastSpellIfCan(pTarget, SPELL_FLASH_HEAL) == CAST_OK) + m_uFlashHealTimer = urand(10000, 15000); + } + } + else + m_uFlashHealTimer -= uiDiff; + + if (m_creature->GetHealthPercent() < 50.0f) + { + if (m_uiGreaterHealTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_GREATER_HEAL) == CAST_OK) + m_uiGreaterHealTimer = urand(15000, 20000); + } + else + m_uiGreaterHealTimer -= uiDiff; + } + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_npc_isillien(Creature* pCreature) +{ + return new npc_isillienAI(pCreature); +} + +/*###### +## npc_tirion_fordring +######*/ + +struct MANGOS_DLL_DECL npc_tirion_fordringAI: public npc_escortAI +{ + npc_tirion_fordringAI(Creature* pCreature): npc_escortAI(pCreature) { Reset(); } + + ObjectGuid m_taelanGuid; + + uint32 m_uiHolyCleaveTimer; + uint32 m_uiHolyStrikeTimer; + uint32 m_uiCrusaderStrike; + + void Reset() override + { + m_uiHolyCleaveTimer = urand(11000, 15000); + m_uiHolyStrikeTimer = urand(6000, 8000); + m_uiCrusaderStrike = urand(1000, 5000); + } + + void Aggro(Unit* /*pWho*/) override + { + DoCastSpellIfCan(m_creature, SPELL_DEVOTION_AURA); + } + + void MoveInLineOfSight(Unit* pWho) override + { + // attack only on request + } + + void EnterEvadeMode() override + { + m_creature->RemoveAllAurasOnEvade(); + m_creature->DeleteThreatList(); + m_creature->CombatStop(true); + m_creature->SetLootRecipient(NULL); + + // on evade go to Taelan + if (Creature* pTaelan = m_creature->GetMap()->GetCreature(m_taelanGuid)) + { + float fX, fY, fZ; + pTaelan->GetContactPoint(m_creature, fX, fY, fZ); + m_creature->GetMotionMaster()->MovePoint(200, fX, fY, fZ); + } + + Reset(); + } + + void ReceiveAIEvent(AIEventType eventType, Creature* pSender, Unit* pInvoker, uint32 /*uiMiscValue*/) override + { + if (pSender->GetEntry() != NPC_TAELAN_FORDRING) + return; + + if (eventType == AI_EVENT_START_ESCORT) + { + Start(true); + m_taelanGuid = pInvoker->GetObjectGuid(); + } + } + + void WaypointReached(uint32 uiPointId) override + { + switch (uiPointId) + { + case 2: + SetEscortPaused(true); + + // unmount and go to Taelan + m_creature->Unmount(); + if (Creature* pTaelan = m_creature->GetMap()->GetCreature(m_taelanGuid)) + { + float fX, fY, fZ; + pTaelan->GetContactPoint(m_creature, fX, fY, fZ); + m_creature->GetMotionMaster()->MovePoint(100, fX, fY, fZ); + } + break; + } + } + + void MovementInform(uint32 uiMoveType, uint32 uiPointId) override + { + // custom points; ignore in escort AI + if (uiPointId == 100 || uiPointId == 200) + return; + + npc_escortAI::MovementInform(uiMoveType, uiPointId); + } + + void UpdateEscortAI(const uint32 uiDiff) override + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + // combat spells + if (m_uiHolyCleaveTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_HOLY_CLEAVE) == CAST_OK) + m_uiHolyCleaveTimer = urand(12000, 15000); + } + else + m_uiHolyCleaveTimer -= uiDiff; + + if (m_uiHolyStrikeTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_HOLY_STRIKE) == CAST_OK) + m_uiHolyStrikeTimer = urand(8000, 11000); + } + else + m_uiHolyStrikeTimer -= uiDiff; + + if (m_uiCrusaderStrike < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_CRUSADER_STRIKE) == CAST_OK) + m_uiCrusaderStrike = urand(7000, 9000); + } + else + m_uiCrusaderStrike -= uiDiff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_npc_tirion_fordring(Creature* pCreature) +{ + return new npc_tirion_fordringAI(pCreature); +} + void AddSC_western_plaguelands() { Script* pNewScript; @@ -237,4 +1077,22 @@ void AddSC_western_plaguelands() pNewScript->GetAI = &GetAI_npc_anchorite_truuen; pNewScript->pQuestAcceptNPC = &QuestAccept_npc_anchorite_truuen; pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_taelan_fordring"; + pNewScript->GetAI = &GetAI_npc_taelan_fordring; + pNewScript->pQuestAcceptNPC = &QuestAccept_npc_taelan_fordring; + pNewScript->pQuestRewardedNPC = &QuestRewarded_npc_taelan_fordring; + pNewScript->pEffectDummyNPC = &EffectDummyCreature_npc_taelan_fordring; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_isillien"; + pNewScript->GetAI = &GetAI_npc_isillien; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_tirion_fordring"; + pNewScript->GetAI = &GetAI_npc_tirion_fordring; + pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 4db7eb157..57888376b 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3007" + #define SD2_REVISION_NR "3008" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index e63b17d9b..1115b5c01 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -1425,6 +1425,9 @@ UPDATE creature_template SET ScriptName='npc_disciple_of_naralex' WHERE entry=36 /* WESTERN PLAGUELANDS */ UPDATE creature_template SET ScriptName='npc_the_scourge_cauldron' WHERE entry=11152; UPDATE creature_template SET ScriptName='npc_anchorite_truuen' WHERE entry=17238; +UPDATE creature_template SET ScriptName='npc_taelan_fordring' WHERE entry=1842; +UPDATE creature_template SET ScriptName='npc_isillien' WHERE entry=1840; +UPDATE creature_template SET ScriptName='npc_tirion_fordring' WHERE entry=12126; /* WESTFALL */ UPDATE creature_template SET ScriptName='npc_daphne_stilwell' WHERE entry=6182; diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 398ad4a96..da4a7eee8 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -1161,7 +1161,42 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1001068,'We\'re almost done!',0,0,0,0,'apothecary hanes SAY_SUPPLIES_2'), (-1001069,'Let\'s high-tail it out of here.',0,0,0,0,'apothecary hanes SAY_SUPPLIES_ESCAPE'), (-1001070,'That\'ll teach you to mess with an apothecary, you motherless Alliance dogs!',0,1,0,22,'apothecary hanes SAY_SUPPLIES_COMPLETE'), -(-1001071,'Don\'t shoot! Apothecary coming through!',0,1,0,0,'apothecary hanes SAY_ARRIVE_BASE'); +(-1001071,'Don\'t shoot! Apothecary coming through!',0,1,0,0,'apothecary hanes SAY_ARRIVE_BASE'), + +(-1001072,'Something is wrong with the Highlord. Do something!',0,0,0,1,'scarlet cavalier SAY_CAVALIER_WORRY_1'), +(-1001073,'Hey, what is going on over there? Sir, are you alright?',0,0,0,1,'scarlet cavalier SAY_CAVALIER_WORRY_2'), +(-1001074,'What the....',0,0,0,1,'scarlet cavalier SAY_CAVALIER_WORRY_3'), +(-1001075,'Sir?',0,0,0,1,'scarlet cavalier SAY_CAVALIER_WORRY_4'), +(-1001076,'NOOOOOOOOOOOOO!',0,1,0,15,'taelan fordring SAY_SCARLET_COMPLETE_1'), +(-1001077,'I will lead us through Hearthglen to the forest\'s edge. From there, you will take me to my father.',0,0,0,1,'taelan fordring SAY_SCARLET_COMPLETE_2'), +(-1001078,'Remove your disguise, lest you feel the bite of my blade when the fury has taken control.',0,0,0,1,'taelan fordring SAY_ESCORT_START'), +(-1001079,'Halt.',0,0,0,0,'taelan fordring SAY_TAELAN_MOUNT'), +(-1001080,'%s calls for his mount.',0,2,0,22,'taelan fordring EMOTE_TAELAN_MOUNT'), +(-1001081,'It\'s not much further. The main road is just up ahead.',0,0,0,1,'taelan fordring SAY_REACH_TOWER'), +(-1001082,'You will not make it to the forest\'s edge, Fordring.',0,0,0,1,'isillien SAY_ISILLIEN_1'), +(-1001083,'Isillien!',0,1,0,25,'taelan fordring SAY_ISILLIEN_2'), +(-1001084,'This is not your fight, stranger. Protect yourself from the attacks of the Crimson Elite. I shall battle the Grand Inquisitor.',0,0,0,1,'taelan fordring SAY_ISILLIEN_3'), +(-1001085,'You disappoint me, Taelan. I had plans for you... grand plans. Alas, it was only a matter of time before your filthy bloodline would catch up with you.',0,0,0,1,'isillien SAY_ISILLIEN_4'), +(-1001086,'It is as they say: Like father, like son. You are as weak of will as Tirion... perhaps more so. I can only hope my assassins finally succeeded in ending his pitiful life.',0,0,0,1,'isillien SAY_ISILLIEN_5'), +(-1001087,'The Grand Crusader has charged me with destroying you and your newfound friends, Taelan, but know this: I do this for pleasure, not of obligation or duty.',0,0,0,1,'isillien SAY_ISILLIEN_6'), +(-1001088,'%s calls for his guardsman.',0,2,0,0,'isillien EMOTE_ISILLIEN_ATTACK'), +(-1001089,'The end is now, Fordring.',0,0,0,1,'isillien SAY_ISILLIEN_ATTACK'), +(-1001090,'Enough!',0,0,0,0,'isillien SAY_KILL_TAELAN_1'), +(-1001091,'%s laughs.',0,2,0,11,'isillien EMOTE_ISILLIEN_LAUGH'), +(-1001092,'Did you really believe that you could defeat me? Your friends are soon to join you, Taelan.',0,0,0,0,'isillien SAY_KILL_TAELAN_2'), +(-1001093,'% turns his attention towards you.',0,2,0,0,'isillien EMOTE_ATTACK_PLAYER'), +(-1001094,'What have you done, Isillien? You once fought with honor, for the good of our people... and now... you have murdered my boy...',0,0,0,0,'tirion fordring SAY_TIRION_1'), +(-1001095,'Tragic. The elder Fordring lives on... You are too late, old man. Retreat back to your cave, hermit, unless you wish to join your son in the Twisting Nether.',0,0,0,0,'isillien SAY_TIRION_2'), +(-1001096,'May your soul burn in anguish, Isillien! Light give me strength to battle this fiend.',0,0,0,0,'tirion fordring SAY_TIRION_3'), +(-1001097,'Face me, coward. Face the faith and strength that you once embodied.',0,0,0,0,'tirion fordring SAY_TIRION_4'), +(-1001098,'Then come, hermit!',0,0,0,0,'isillien SAY_TIRION_5'), +(-1001099,'A thousand more like him exist. Ten thousand. Should one fall, another will rise to take the seat of power.',0,0,0,0,'tirion fordring SAY_EPILOG_1'), +(-1001100,'%s falls to one knee.',0,2,0,16,'tirion fordring EMOTE_FALL_KNEE'), +(-1001101,'Look what they did to my boy.',0,0,0,0,'tirion fordring SAY_EPILOG_2'), +(-1001102,'%s holds the limp body of Taelan Fordring and softly sobs.',0,2,0,0,'tirion fordring EMOTE_HOLD_TAELAN'), +(-1001103,'Too long have I sat idle, gripped in this haze... this malaise, lamenting what could have been... what should have been.',0,0,0,0,'tirion fordring SAY_EPILOG_3'), +(-1001104,'Your death will not have been in vain, Taelan. A new Order is born on this day... an Order which will dedicate itself to extinguising the evil that plagues this world. An evil that cannot hide behind politics and pleasantries.',0,0,0,0,'tirion fordring SAY_EPILOG_4'), +(-1001105,'This I promise... This I vow...',0,0,0,0,'tirion fordring SAY_EPILOG_5'); -- -1 033 000 SHADOWFANG KEEP INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES @@ -8152,4 +8187,75 @@ INSERT INTO script_waypoint VALUES (23784, 44, 1617.776, -6157.249, 9.323, 2000, 'quest complete'), (23784, 45, 1644.696, -6149.582, 7.357, 0, ''); +DELETE FROM script_waypoint WHERE entry=1842; +INSERT INTO script_waypoint VALUES +(1842, 0, 2941.748, -1391.816, 167.237, 0, 'SAY_ESCORT_START'), +(1842, 1, 2940.561, -1393.641, 165.943, 0, ''), +(1842, 2, 2932.194, -1410.657, 165.943, 0, ''), +(1842, 3, 2921.808, -1405.087, 165.943, 0, ''), +(1842, 4, 2916.479, -1402.582, 165.943, 0, ''), +(1842, 5, 2918.523, -1398.121, 165.943, 0, ''), +(1842, 6, 2922.801, -1389.494, 160.842, 0, ''), +(1842, 7, 2924.931, -1385.645, 160.842, 0, ''), +(1842, 8, 2930.931, -1388.654, 160.842, 0, ''), +(1842, 9, 2946.701, -1396.646, 160.842, 0, ''), +(1842, 10, 2948.721, -1392.789, 160.842, 0, ''), +(1842, 11, 2951.979, -1386.616, 155.948, 0, ''), +(1842, 12, 2953.836, -1383.326, 155.948, 0, ''), +(1842, 13, 2951.192, -1381.740, 155.948, 0, ''), +(1842, 14, 2946.675, -1379.287, 152.020, 0, ''), +(1842, 15, 2942.795, -1377.661, 152.020, 0, ''), +(1842, 16, 2935.488, -1392.522, 152.020, 0, ''), +(1842, 17, 2921.167, -1384.796, 152.020, 0, ''), +(1842, 18, 2915.331, -1395.354, 152.020, 0, ''), +(1842, 19, 2926.250, -1401.263, 152.028, 0, ''), +(1842, 20, 2930.321, -1403.479, 150.521, 0, ''), +(1842, 21, 2933.936, -1405.357, 150.521, 0, ''), +(1842, 22, 2929.221, -1415.786, 150.504, 0, ''), +(1842, 23, 2921.173, -1431.680, 150.781, 0, ''), +(1842, 24, 2917.470, -1438.781, 150.781, 0, ''), +(1842, 25, 2913.048, -1453.524, 148.098, 0, 'SAY_TAELAN_MOUNT'), +(1842, 26, 2913.832, -1474.930, 146.224, 0, ''), +(1842, 27, 2906.815, -1487.061, 146.224, 0, ''), +(1842, 28, 2900.644, -1496.575, 146.306, 0, ''), +(1842, 29, 2885.249, -1501.585, 146.020, 0, ''), +(1842, 30, 2863.877, -1500.380, 146.681, 0, ''), +(1842, 31, 2846.509, -1487.183, 146.332, 0, ''), +(1842, 32, 2823.752, -1490.987, 145.782, 0, ''), +(1842, 33, 2800.984, -1510.907, 145.049, 0, ''), +(1842, 34, 2789.488, -1525.215, 143.729, 0, ''), +(1842, 35, 2776.964, -1542.305, 139.435, 0, ''), +(1842, 36, 2762.032, -1561.804, 133.763, 0, ''), +(1842, 37, 2758.741, -1569.599, 131.514, 0, ''), +(1842, 38, 2765.488, -1588.793, 129.721, 0, ''), +(1842, 39, 2779.613, -1613.120, 129.132, 0, ''), +(1842, 40, 2757.654, -1638.032, 128.236, 0, ''), +(1842, 41, 2741.308, -1659.790, 126.457, 0, ''), +(1842, 42, 2729.797, -1677.571, 126.499, 0, ''), +(1842, 43, 2716.778, -1694.648, 126.301, 0, ''), +(1842, 44, 2706.658, -1709.474, 123.420, 0, ''), +(1842, 45, 2699.506, -1720.572, 120.265, 0, ''), +(1842, 46, 2691.977, -1738.466, 114.994, 0, ''), +(1842, 47, 2690.514, -1757.045, 108.764, 0, ''), +(1842, 48, 2691.953, -1780.309, 99.890, 0, ''), +(1842, 49, 2689.344, -1803.264, 89.130, 0, ''), +(1842, 50, 2697.849, -1820.550, 80.681, 0, ''), +(1842, 51, 2701.934, -1836.706, 73.700, 0, ''), +(1842, 52, 2698.088, -1853.866, 68.999, 0, ''), +(1842, 53, 2693.657, -1870.237, 66.882, 0, ''), +(1842, 54, 2682.347, -1885.251, 66.009, 0, ''), +(1842, 55, 2668.229, -1900.796, 66.256, 0, 'SAY_REACH_TOWER - escort paused'); + +DELETE FROM script_waypoint WHERE entry=1840; +INSERT INTO script_waypoint VALUES +(1840, 0, 2689.677, -1937.474, 72.14, 0, ''), +(1840, 1, 2683.112, -1926.823, 72.14, 0, ''), +(1840, 2, 2678.725, -1919.416, 68.86, 0, 'escort paused'); + +DELETE FROM script_waypoint WHERE entry=12126; +INSERT INTO script_waypoint VALUES +(12126, 0, 2631.229, -1917.927, 72.59, 0, ''), +(12126, 1, 2643.529, -1914.072, 71.00, 0, ''), +(12126, 2, 2653.827, -1907.536, 69.34, 0, 'escort paused'); + -- EOF diff --git a/sql/updates/r3008_mangos.sql b/sql/updates/r3008_mangos.sql new file mode 100644 index 000000000..aa4667cd8 --- /dev/null +++ b/sql/updates/r3008_mangos.sql @@ -0,0 +1,3 @@ +UPDATE creature_template SET ScriptName='npc_taelan_fordring' WHERE entry=1842; +UPDATE creature_template SET ScriptName='npc_isillien' WHERE entry=1840; +UPDATE creature_template SET ScriptName='npc_tirion_fordring' WHERE entry=12126; diff --git a/sql/updates/r3008_scriptdev2.sql b/sql/updates/r3008_scriptdev2.sql new file mode 100644 index 000000000..ddf70608b --- /dev/null +++ b/sql/updates/r3008_scriptdev2.sql @@ -0,0 +1,107 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1001105 AND -1001072; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1001072,'Something is wrong with the Highlord. Do something!',0,0,0,1,'scarlet cavalier SAY_CAVALIER_WORRY_1'), +(-1001073,'Hey, what is going on over there? Sir, are you alright?',0,0,0,1,'scarlet cavalier SAY_CAVALIER_WORRY_2'), +(-1001074,'What the....',0,0,0,1,'scarlet cavalier SAY_CAVALIER_WORRY_3'), +(-1001075,'Sir?',0,0,0,1,'scarlet cavalier SAY_CAVALIER_WORRY_4'), +(-1001076,'NOOOOOOOOOOOOO!',0,1,0,15,'taelan fordring SAY_SCARLET_COMPLETE_1'), +(-1001077,'I will lead us through Hearthglen to the forest\'s edge. From there, you will take me to my father.',0,0,0,1,'taelan fordring SAY_SCARLET_COMPLETE_2'), +(-1001078,'Remove your disguise, lest you feel the bite of my blade when the fury has taken control.',0,0,0,1,'taelan fordring SAY_ESCORT_START'), +(-1001079,'Halt.',0,0,0,0,'taelan fordring SAY_TAELAN_MOUNT'), +(-1001080,'%s calls for his mount.',0,2,0,22,'taelan fordring EMOTE_TAELAN_MOUNT'), +(-1001081,'It\'s not much further. The main road is just up ahead.',0,0,0,1,'taelan fordring SAY_REACH_TOWER'), +(-1001082,'You will not make it to the forest\'s edge, Fordring.',0,0,0,1,'isillien SAY_ISILLIEN_1'), +(-1001083,'Isillien!',0,1,0,25,'taelan fordring SAY_ISILLIEN_2'), +(-1001084,'This is not your fight, stranger. Protect yourself from the attacks of the Crimson Elite. I shall battle the Grand Inquisitor.',0,0,0,1,'taelan fordring SAY_ISILLIEN_3'), +(-1001085,'You disappoint me, Taelan. I had plans for you... grand plans. Alas, it was only a matter of time before your filthy bloodline would catch up with you.',0,0,0,1,'isillien SAY_ISILLIEN_4'), +(-1001086,'It is as they say: Like father, like son. You are as weak of will as Tirion... perhaps more so. I can only hope my assassins finally succeeded in ending his pitiful life.',0,0,0,1,'isillien SAY_ISILLIEN_5'), +(-1001087,'The Grand Crusader has charged me with destroying you and your newfound friends, Taelan, but know this: I do this for pleasure, not of obligation or duty.',0,0,0,1,'isillien SAY_ISILLIEN_6'), +(-1001088,'%s calls for his guardsman.',0,2,0,0,'isillien EMOTE_ISILLIEN_ATTACK'), +(-1001089,'The end is now, Fordring.',0,0,0,1,'isillien SAY_ISILLIEN_ATTACK'), +(-1001090,'Enough!',0,0,0,0,'isillien SAY_KILL_TAELAN_1'), +(-1001091,'%s laughs.',0,2,0,11,'isillien EMOTE_ISILLIEN_LAUGH'), +(-1001092,'Did you really believe that you could defeat me? Your friends are soon to join you, Taelan.',0,0,0,0,'isillien SAY_KILL_TAELAN_2'), +(-1001093,'% turns his attention towards you.',0,2,0,0,'isillien EMOTE_ATTACK_PLAYER'), +(-1001094,'What have you done, Isillien? You once fought with honor, for the good of our people... and now... you have murdered my boy...',0,0,0,0,'tirion fordring SAY_TIRION_1'), +(-1001095,'Tragic. The elder Fordring lives on... You are too late, old man. Retreat back to your cave, hermit, unless you wish to join your son in the Twisting Nether.',0,0,0,0,'isillien SAY_TIRION_2'), +(-1001096,'May your soul burn in anguish, Isillien! Light give me strength to battle this fiend.',0,0,0,0,'tirion fordring SAY_TIRION_3'), +(-1001097,'Face me, coward. Face the faith and strength that you once embodied.',0,0,0,0,'tirion fordring SAY_TIRION_4'), +(-1001098,'Then come, hermit!',0,0,0,0,'isillien SAY_TIRION_5'), +(-1001099,'A thousand more like him exist. Ten thousand. Should one fall, another will rise to take the seat of power.',0,0,0,0,'tirion fordring SAY_EPILOG_1'), +(-1001100,'%s falls to one knee.',0,2,0,16,'tirion fordring EMOTE_FALL_KNEE'), +(-1001101,'Look what they did to my boy.',0,0,0,0,'tirion fordring SAY_EPILOG_2'), +(-1001102,'%s holds the limp body of Taelan Fordring and softly sobs.',0,2,0,0,'tirion fordring EMOTE_HOLD_TAELAN'), +(-1001103,'Too long have I sat idle, gripped in this haze... this malaise, lamenting what could have been... what should have been.',0,0,0,0,'tirion fordring SAY_EPILOG_3'), +(-1001104,'Your death will not have been in vain, Taelan. A new Order is born on this day... an Order which will dedicate itself to extinguising the evil that plagues this world. An evil that cannot hide behind politics and pleasantries.',0,0,0,0,'tirion fordring SAY_EPILOG_4'), +(-1001105,'This I promise... This I vow...',0,0,0,0,'tirion fordring SAY_EPILOG_5'); + +DELETE FROM script_waypoint WHERE entry=1842; +INSERT INTO script_waypoint VALUES +(1842, 0, 2941.748, -1391.816, 167.237, 0, 'SAY_ESCORT_START'), +(1842, 1, 2940.561, -1393.641, 165.943, 0, ''), +(1842, 2, 2932.194, -1410.657, 165.943, 0, ''), +(1842, 3, 2921.808, -1405.087, 165.943, 0, ''), +(1842, 4, 2916.479, -1402.582, 165.943, 0, ''), +(1842, 5, 2918.523, -1398.121, 165.943, 0, ''), +(1842, 6, 2922.801, -1389.494, 160.842, 0, ''), +(1842, 7, 2924.931, -1385.645, 160.842, 0, ''), +(1842, 8, 2930.931, -1388.654, 160.842, 0, ''), +(1842, 9, 2946.701, -1396.646, 160.842, 0, ''), +(1842, 10, 2948.721, -1392.789, 160.842, 0, ''), +(1842, 11, 2951.979, -1386.616, 155.948, 0, ''), +(1842, 12, 2953.836, -1383.326, 155.948, 0, ''), +(1842, 13, 2951.192, -1381.740, 155.948, 0, ''), +(1842, 14, 2946.675, -1379.287, 152.020, 0, ''), +(1842, 15, 2942.795, -1377.661, 152.020, 0, ''), +(1842, 16, 2935.488, -1392.522, 152.020, 0, ''), +(1842, 17, 2921.167, -1384.796, 152.020, 0, ''), +(1842, 18, 2915.331, -1395.354, 152.020, 0, ''), +(1842, 19, 2926.250, -1401.263, 152.028, 0, ''), +(1842, 20, 2930.321, -1403.479, 150.521, 0, ''), +(1842, 21, 2933.936, -1405.357, 150.521, 0, ''), +(1842, 22, 2929.221, -1415.786, 150.504, 0, ''), +(1842, 23, 2921.173, -1431.680, 150.781, 0, ''), +(1842, 24, 2917.470, -1438.781, 150.781, 0, ''), +(1842, 25, 2913.048, -1453.524, 148.098, 0, 'SAY_TAELAN_MOUNT'), +(1842, 26, 2913.832, -1474.930, 146.224, 0, ''), +(1842, 27, 2906.815, -1487.061, 146.224, 0, ''), +(1842, 28, 2900.644, -1496.575, 146.306, 0, ''), +(1842, 29, 2885.249, -1501.585, 146.020, 0, ''), +(1842, 30, 2863.877, -1500.380, 146.681, 0, ''), +(1842, 31, 2846.509, -1487.183, 146.332, 0, ''), +(1842, 32, 2823.752, -1490.987, 145.782, 0, ''), +(1842, 33, 2800.984, -1510.907, 145.049, 0, ''), +(1842, 34, 2789.488, -1525.215, 143.729, 0, ''), +(1842, 35, 2776.964, -1542.305, 139.435, 0, ''), +(1842, 36, 2762.032, -1561.804, 133.763, 0, ''), +(1842, 37, 2758.741, -1569.599, 131.514, 0, ''), +(1842, 38, 2765.488, -1588.793, 129.721, 0, ''), +(1842, 39, 2779.613, -1613.120, 129.132, 0, ''), +(1842, 40, 2757.654, -1638.032, 128.236, 0, ''), +(1842, 41, 2741.308, -1659.790, 126.457, 0, ''), +(1842, 42, 2729.797, -1677.571, 126.499, 0, ''), +(1842, 43, 2716.778, -1694.648, 126.301, 0, ''), +(1842, 44, 2706.658, -1709.474, 123.420, 0, ''), +(1842, 45, 2699.506, -1720.572, 120.265, 0, ''), +(1842, 46, 2691.977, -1738.466, 114.994, 0, ''), +(1842, 47, 2690.514, -1757.045, 108.764, 0, ''), +(1842, 48, 2691.953, -1780.309, 99.890, 0, ''), +(1842, 49, 2689.344, -1803.264, 89.130, 0, ''), +(1842, 50, 2697.849, -1820.550, 80.681, 0, ''), +(1842, 51, 2701.934, -1836.706, 73.700, 0, ''), +(1842, 52, 2698.088, -1853.866, 68.999, 0, ''), +(1842, 53, 2693.657, -1870.237, 66.882, 0, ''), +(1842, 54, 2682.347, -1885.251, 66.009, 0, ''), +(1842, 55, 2668.229, -1900.796, 66.256, 0, 'SAY_REACH_TOWER - escort paused'); + +DELETE FROM script_waypoint WHERE entry=1840; +INSERT INTO script_waypoint VALUES +(1840, 0, 2689.677, -1937.474, 72.14, 0, ''), +(1840, 1, 2683.112, -1926.823, 72.14, 0, ''), +(1840, 2, 2678.725, -1919.416, 68.86, 0, 'escort paused'); + +DELETE FROM script_waypoint WHERE entry=12126; +INSERT INTO script_waypoint VALUES +(12126, 0, 2631.229, -1917.927, 72.59, 0, ''), +(12126, 1, 2643.529, -1914.072, 71.00, 0, ''), +(12126, 2, 2653.827, -1907.536, 69.34, 0, 'escort paused'); From 342edae28ad225409b1f9518b10427afde3dd549 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sun, 25 May 2014 18:57:19 +0200 Subject: [PATCH 1020/1172] [3009] Fix some combat details for Thekal Close scriptdev2/scriptdev2-classic#17 --- scripts/eastern_kingdoms/zulgurub/boss_thekal.cpp | 4 ++-- sd2_revision_nr.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/eastern_kingdoms/zulgurub/boss_thekal.cpp b/scripts/eastern_kingdoms/zulgurub/boss_thekal.cpp index 02c196a76..55102e2d0 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_thekal.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_thekal.cpp @@ -31,7 +31,7 @@ enum SPELL_MORTAL_CLEAVE = 22859, SPELL_SILENCE = 23207, - SPELL_FRENZY = 23342, + SPELL_FRENZY = 23128, SPELL_FORCE_PUNCH = 24189, SPELL_CHARGE = 24408, SPELL_ENRAGE = 23537, @@ -335,7 +335,7 @@ struct MANGOS_DLL_DECL boss_thekalAI : public boss_thekalBaseAI if (m_uiSummonTigersTimer < uiDiff) { if (DoCastSpellIfCan(m_creature, SPELL_SUMMON_TIGERS) == CAST_OK) - m_uiSummonTigersTimer = urand(10000, 14000); + m_uiSummonTigersTimer = 50000; } else m_uiSummonTigersTimer -= uiDiff; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 57888376b..66f834466 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3008" + #define SD2_REVISION_NR "3009" #endif // __SD2_REVISION_NR_H__ From 220e0f4b1f4194eb1639224712ed600bf9962a4f Mon Sep 17 00:00:00 2001 From: Tobschinski Date: Sun, 25 May 2014 20:03:04 +0200 Subject: [PATCH 1021/1172] [3010] Add script for areatrigger 4052 - AQ Close scriptdev2/scriptdev2-classic#14 Signed-off-by: Xfurry --- .../instance_temple_of_ahnqiraj.cpp | 11 ++++++++++- .../kalimdor/temple_of_ahnqiraj/temple_of_ahnqiraj.h | 2 ++ sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 6 ++++-- sql/updates/r3010_mangos.sql | 3 +++ 5 files changed, 20 insertions(+), 4 deletions(-) create mode 100644 sql/updates/r3010_mangos.sql diff --git a/scripts/kalimdor/temple_of_ahnqiraj/instance_temple_of_ahnqiraj.cpp b/scripts/kalimdor/temple_of_ahnqiraj/instance_temple_of_ahnqiraj.cpp index 5ad1f0ce3..3b294007d 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/instance_temple_of_ahnqiraj.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/instance_temple_of_ahnqiraj.cpp @@ -73,6 +73,14 @@ void instance_temple_of_ahnqiraj::DoHandleTempleAreaTrigger(uint32 uiTriggerId) pEye->ForcedDespawn(1000); m_bIsEmperorsIntroDone = true; } + else if (uiTriggerId == AREATRIGGER_SARTURA) + { + if (GetData(TYPE_SARTURA) == NOT_STARTED || GetData(TYPE_SARTURA) == FAIL) + { + if (Creature* pSartura = GetSingleCreatureFromStorage(NPC_SARTURA)) + pSartura->SetInCombatWithZone(); + } + } } void instance_temple_of_ahnqiraj::OnCreatureCreate(Creature* pCreature) @@ -83,6 +91,7 @@ void instance_temple_of_ahnqiraj::OnCreatureCreate(Creature* pCreature) // Don't store the summoned images guid if (GetData(TYPE_SKERAM) == IN_PROGRESS) break; + case NPC_SARTURA: case NPC_VEKLOR: case NPC_VEKNILASH: case NPC_MASTERS_EYE: @@ -265,7 +274,7 @@ InstanceData* GetInstanceData_instance_temple_of_ahnqiraj(Map* pMap) bool AreaTrigger_at_temple_ahnqiraj(Player* pPlayer, AreaTriggerEntry const* pAt) { - if (pAt->id == AREATRIGGER_TWIN_EMPERORS) + if (pAt->id == AREATRIGGER_TWIN_EMPERORS || pAt->id == AREATRIGGER_SARTURA) { if (pPlayer->isGameMaster() || !pPlayer->isAlive()) return false; diff --git a/scripts/kalimdor/temple_of_ahnqiraj/temple_of_ahnqiraj.h b/scripts/kalimdor/temple_of_ahnqiraj/temple_of_ahnqiraj.h index 93a29392f..fcc4f7aa2 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/temple_of_ahnqiraj.h +++ b/scripts/kalimdor/temple_of_ahnqiraj/temple_of_ahnqiraj.h @@ -23,6 +23,7 @@ enum // NPC_KRI = 15511, // NPC_VEM = 15544, // NPC_YAUJ = 15543, + NPC_SARTURA = 15516, NPC_VEKLOR = 15276, NPC_VEKNILASH = 15275, NPC_MASTERS_EYE = 15963, @@ -54,6 +55,7 @@ enum SAY_CTHUN_WHISPER_8 = -1531040, AREATRIGGER_TWIN_EMPERORS = 4047, + AREATRIGGER_SARTURA = 4052, SPELL_SUMMON_PLAYER = 20477, diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 66f834466..00ded30b0 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3009" + #define SD2_REVISION_NR "3010" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 1115b5c01..9a0915e16 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -80,8 +80,10 @@ INSERT INTO scripted_areatrigger VALUES (4485,'at_dark_portal'); DELETE FROM scripted_areatrigger WHERE entry=1966; INSERT INTO scripted_areatrigger VALUES (1966,'at_murkdeep'); -DELETE FROM scripted_areatrigger WHERE entry=4047; -INSERT INTO scripted_areatrigger VALUES (4047,'at_temple_ahnqiraj'); +DELETE FROM scripted_areatrigger WHERE entry IN (4047,4052); +INSERT INTO scripted_areatrigger VALUES +(4047,'at_temple_ahnqiraj'), +(4052,'at_temple_ahnqiraj'); /* BATTLEGROUNDS */ diff --git a/sql/updates/r3010_mangos.sql b/sql/updates/r3010_mangos.sql new file mode 100644 index 000000000..20aea0386 --- /dev/null +++ b/sql/updates/r3010_mangos.sql @@ -0,0 +1,3 @@ +DELETE FROM scripted_areatrigger WHERE entry IN (4052); +INSERT INTO scripted_areatrigger VALUES +(4052,'at_temple_ahnqiraj'); From d72a31d3f44dddcf4516f31b1b453edee0afe15f Mon Sep 17 00:00:00 2001 From: Xfurry Date: Tue, 27 May 2014 00:15:31 +0200 Subject: [PATCH 1022/1172] [3011] Implement script support for quest 11198 Close #101 --- scripts/kalimdor/dustwallow_marsh.cpp | 255 +++++++++++++++++++++++++- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 + sql/updates/r3011_mangos.sql | 1 + 4 files changed, 257 insertions(+), 2 deletions(-) create mode 100644 sql/updates/r3011_mangos.sql diff --git a/scripts/kalimdor/dustwallow_marsh.cpp b/scripts/kalimdor/dustwallow_marsh.cpp index 97e8a93a5..3bb6b0c79 100644 --- a/scripts/kalimdor/dustwallow_marsh.cpp +++ b/scripts/kalimdor/dustwallow_marsh.cpp @@ -17,7 +17,7 @@ /* ScriptData SDName: Dustwallow_Marsh SD%Complete: 95 -SDComment: Quest support: 1173, 1222, 1270, 1273, 1324, 11209, 11180. +SDComment: Quest support: 1173, 1222, 1270, 1273, 1324, 11180, 11198, 11209. SDCategory: Dustwallow Marsh EndScriptData */ @@ -29,10 +29,12 @@ npc_ogron npc_private_hendel npc_stinky_ignatz at_nats_landing +boss_tethyr EndContentData */ #include "precompiled.h" #include "escort_ai.h" +#include "TemporarySummon.h" /*###### ## mobs_risen_husk_spirit @@ -787,6 +789,252 @@ bool AreaTrigger_at_nats_landing(Player* pPlayer, const AreaTriggerEntry* /*pAt* return true; } +/*###### +## boss_tethyr +######*/ + +enum +{ + SPELL_WATER_BOLT = 42574, + SPELL_SPOUT_LEFT = 42581, // triggers 42584 + SPELL_SPOUT_RIGHT = 42582, + SPELL_CANNON_BLAST = 42578, // triggers 42576 + SPELL_CANNON_BLAST_DMG = 42576, + + NPC_TETHYR = 23899, + NPC_THERAMORE_MARKSMAN = 23900, + NPC_THERAMORE_CANNON = 23907, + + GO_COVE_CANNON = 186432, // cast 42578 + QUEST_ID_TETHYR = 11198, + + WORLD_STATE_TETHYR_SHOW = 3083, + WORLD_STATE_TETHYR_COUNT = 3082, + + MAX_MARKSMEN = 12, + PHASE_NORMAL = 1, + PHASE_SPOUT = 2, +}; + +struct MANGOS_DLL_DECL boss_tethyrAI : public Scripted_NoMovementAI +{ + boss_tethyrAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) + { + // send world states to player summoner + if (m_creature->IsTemporarySummon()) + m_summonerGuid = ((TemporarySummon*)m_creature)->GetSummonerGuid(); + + if (Player* pPlayer = m_creature->GetMap()->GetPlayer(m_summonerGuid)) + { + pPlayer->SendUpdateWorldState(WORLD_STATE_TETHYR_SHOW, 1); + pPlayer->SendUpdateWorldState(WORLD_STATE_TETHYR_COUNT, MAX_MARKSMEN); + } + + m_creature->SetLevitate(true); + Reset(); + } + + ObjectGuid m_summonerGuid; + + uint8 m_uiPhase; + uint8 m_uiMarksmenKilled; + uint32 m_uiWaterBoltTimer; + uint32 m_uiSpoutEndTimer; + + void Reset() override + { + m_uiPhase = PHASE_NORMAL; + m_uiMarksmenKilled = 0; + m_uiWaterBoltTimer = urand(0, 1000); + m_uiSpoutEndTimer = 7000; + } + + void JustReachedHome() override + { + // cleanup + DoEncounterCleanup(); + m_creature->ForcedDespawn(5000); + } + + void JustDied(Unit* /*pVictim*/) override + { + // quest complete and cleanup + if (Player* pSummoner = m_creature->GetMap()->GetPlayer(m_summonerGuid)) + pSummoner->GroupEventHappens(QUEST_ID_TETHYR, m_creature); + + // ToDo: trigger some fireworks! + DoEncounterCleanup(); + } + + void MovementInform(uint32 uiMotionType, uint32 uiPointId) override + { + if (uiMotionType == WAYPOINT_MOTION_TYPE) + { + // start attacking + if (uiPointId == 12) + { + // make cannons usable + std::list lCannonsInRange; + GetGameObjectListWithEntryInGrid(lCannonsInRange, m_creature, GO_COVE_CANNON, 100.0f); + + for (std::list::const_iterator itr = lCannonsInRange.begin(); itr != lCannonsInRange.end(); ++itr) + (*itr)->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NO_INTERACT); + + // attack all marksmen + std::list lMarksmenInRange; + GetCreatureListWithEntryInGrid(lMarksmenInRange, m_creature, NPC_THERAMORE_MARKSMAN, 100.0f); + + for (std::list::const_iterator itr = lMarksmenInRange.begin(); itr != lMarksmenInRange.end(); ++itr) + { + (*itr)->AI()->AttackStart(m_creature); + AttackStart(*itr); + } + } + } + else if (uiMotionType == POINT_MOTION_TYPE) + { + // Spout on cannon point reach + if (uiPointId) + { + if (DoCastSpellIfCan(m_creature, urand(0, 1) ? SPELL_SPOUT_LEFT : SPELL_SPOUT_RIGHT, CAST_INTERRUPT_PREVIOUS) == CAST_OK) + { + // Remove the target focus + m_creature->SetTargetGuid(ObjectGuid()); + m_uiPhase = PHASE_SPOUT; + } + } + } + } + + void KilledUnit(Unit* pVictim) override + { + // count the marksmen + if (pVictim->GetEntry() != NPC_THERAMORE_MARKSMAN) + return; + + ++m_uiMarksmenKilled; + + // update world state + if (Player* pSummoner = m_creature->GetMap()->GetPlayer(m_summonerGuid)) + { + pSummoner->SendUpdateWorldState(WORLD_STATE_TETHYR_COUNT, MAX_MARKSMEN - m_uiMarksmenKilled); + + // fail quest if all marksmen are killed + if (m_uiMarksmenKilled == MAX_MARKSMEN) + { + pSummoner->FailQuest(QUEST_ID_TETHYR); + EnterEvadeMode(); + } + } + } + + void SpellHit(Unit* pCaster, const SpellEntry* pSpell) override + { + // spout on cannon + if (pCaster->GetEntry() == NPC_THERAMORE_CANNON && pSpell->Id == SPELL_CANNON_BLAST_DMG) + { + if (m_uiPhase == PHASE_SPOUT) + return; + + // not all cannons have same distance range + uint8 uiDistMod = pCaster->GetPositionY() > -4650.0f ? 6 : 5; + + float fX, fY, fZ; + pCaster->GetContactPoint(m_creature, fX, fY, fZ, uiDistMod * ATTACK_DISTANCE); + m_creature->GetMotionMaster()->MovePoint(1, fX, fY, m_creature->GetPositionZ()); + + m_uiWaterBoltTimer = 10000; + } + } + + // function to cleanup the world states and GO flags + void DoEncounterCleanup() + { + // remove world state + if (Player* pSummoner = m_creature->GetMap()->GetPlayer(m_summonerGuid)) + pSummoner->SendUpdateWorldState(WORLD_STATE_TETHYR_SHOW, 0); + + // reset all cannons + std::list lCannonsInRange; + GetGameObjectListWithEntryInGrid(lCannonsInRange, m_creature, GO_COVE_CANNON, 100.0f); + + for (std::list::const_iterator itr = lCannonsInRange.begin(); itr != lCannonsInRange.end(); ++itr) + (*itr)->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NO_INTERACT); + + // despawn all marksmen + std::list lMarksmenInRange; + GetCreatureListWithEntryInGrid(lMarksmenInRange, m_creature, NPC_THERAMORE_MARKSMAN, 100.0f); + + for (std::list::const_iterator itr = lMarksmenInRange.begin(); itr != lMarksmenInRange.end(); ++itr) + (*itr)->ForcedDespawn(30000); + } + + // Custom threat management + bool SelectCustomHostileTarget() + { + // Not started combat or evading prevented + if (!m_creature->isInCombat() || m_creature->HasAuraType(SPELL_AURA_MOD_TAUNT)) + return false; + + // Check if there are still enemies (marksmen) in the threatList + ThreatList const& threatList = m_creature->getThreatManager().getThreatList(); + for (ThreatList::const_iterator itr = threatList.begin(); itr != threatList.end(); ++itr) + { + if ((*itr)->getUnitGuid().IsCreature()) + return true; + } + + EnterEvadeMode(); + return false; + } + + void UpdateAI(const uint32 uiDiff) override + { + if (!SelectCustomHostileTarget()) + return; + + if (m_uiPhase == PHASE_SPOUT) + { + if (m_uiSpoutEndTimer < uiDiff) + { + // Remove rotation auras + m_creature->RemoveAurasDueToSpell(SPELL_SPOUT_LEFT); + m_creature->RemoveAurasDueToSpell(SPELL_SPOUT_RIGHT); + + m_uiPhase = PHASE_NORMAL; + m_uiSpoutEndTimer = 7000; + m_uiWaterBoltTimer = urand(0, 1000); + } + else + m_uiSpoutEndTimer -= uiDiff; + } + else if (m_uiPhase == PHASE_NORMAL) + { + if (m_uiWaterBoltTimer < uiDiff) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, SPELL_WATER_BOLT) == CAST_OK) + { + // mimic boss turning because of the missing threat system + m_creature->SetTargetGuid(pTarget->GetObjectGuid()); + m_creature->SetInFront(pTarget); + + m_uiWaterBoltTimer = urand(0, 1000); + } + } + } + else + m_uiWaterBoltTimer -= uiDiff; + } + } +}; + +CreatureAI* GetAI_boss_tethyr(Creature* pCreature) +{ + return new boss_tethyrAI(pCreature); +} + void AddSC_dustwallow_marsh() { Script* pNewScript; @@ -829,4 +1077,9 @@ void AddSC_dustwallow_marsh() pNewScript->Name = "at_nats_landing"; pNewScript->pAreaTrigger = &AreaTrigger_at_nats_landing; pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "boss_tethyr"; + pNewScript->GetAI = &GetAI_boss_tethyr; + pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 00ded30b0..f4768dcaa 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3010" + #define SD2_REVISION_NR "3011" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 9a0915e16..7da7b5609 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -539,6 +539,7 @@ UPDATE creature_template SET ScriptName='npc_morokk' WHERE entry=4500; UPDATE creature_template SET ScriptName='npc_restless_apparition' WHERE entry=23861; UPDATE creature_template SET ScriptName='npc_private_hendel' WHERE entry=4966; UPDATE creature_template SET ScriptName='npc_stinky_ignatz' WHERE entry=4880; +UPDATE creature_template SET ScriptName='boss_tethyr' WHERE entry=23899; DELETE FROM scripted_areatrigger WHERE entry=4752; INSERT INTO scripted_areatrigger VALUES (4752,'at_nats_landing'); diff --git a/sql/updates/r3011_mangos.sql b/sql/updates/r3011_mangos.sql new file mode 100644 index 000000000..82d573c56 --- /dev/null +++ b/sql/updates/r3011_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='boss_tethyr' WHERE entry=23899; From 2def1cfaee5d2d188354647d6948a2c29ac4a838 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Fri, 6 Jun 2014 00:13:58 +0200 Subject: [PATCH 1023/1172] [3012] Implement script support for quest 2845 Thanks to @grz3s for providing the data --- scripts/kalimdor/feralas.cpp | 174 ++++++++++++++++++++++++++++++- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 + sql/scriptdev2_script_full.sql | 14 ++- sql/updates/r3012_mangos.sql | 1 + sql/updates/r3012_scriptdev2.sql | 13 +++ 6 files changed, 201 insertions(+), 4 deletions(-) create mode 100644 sql/updates/r3012_mangos.sql create mode 100644 sql/updates/r3012_scriptdev2.sql diff --git a/scripts/kalimdor/feralas.cpp b/scripts/kalimdor/feralas.cpp index 5d472935e..8b146f2db 100644 --- a/scripts/kalimdor/feralas.cpp +++ b/scripts/kalimdor/feralas.cpp @@ -17,12 +17,18 @@ /* ScriptData SDName: Feralas SD%Complete: 100 -SDComment: Quest support: 2767. +SDComment: Quest support: 2767, 2845. SDCategory: Feralas EndScriptData */ +/* ContentData +npc_oox22fe +npc_shay_leafrunner +EndContentData */ + #include "precompiled.h" #include "escort_ai.h" +#include "follower_ai.h" /*###### ## npc_oox22fe @@ -133,9 +139,166 @@ bool QuestAccept_npc_oox22fe(Player* pPlayer, Creature* pCreature, const Quest* } /*###### -## AddSC +## npc_shay_leafrunner ######*/ +enum +{ + SAY_ESCORT_START = -1001106, + SAY_WANDER_1 = -1001107, + SAY_WANDER_2 = -1001108, + SAY_WANDER_3 = -1001109, + SAY_WANDER_4 = -1001110, + SAY_WANDER_DONE_1 = -1001111, + SAY_WANDER_DONE_2 = -1001112, + SAY_WANDER_DONE_3 = -1001113, + EMOTE_WANDER = -1001114, + SAY_EVENT_COMPLETE_1 = -1001115, + SAY_EVENT_COMPLETE_2 = -1001116, + + SPELL_SHAYS_BELL = 11402, + NPC_ROCKBITER = 7765, + QUEST_ID_WANDERING_SHAY = 2845, +}; + +struct MANGOS_DLL_DECL npc_shay_leafrunnerAI : public FollowerAI +{ + npc_shay_leafrunnerAI(Creature* pCreature) : FollowerAI(pCreature) + { + m_uiWanderTimer = 0; + Reset(); + } + + uint32 m_uiWanderTimer; + bool m_bIsRecalled; + bool m_bIsComplete; + + void Reset() override + { + m_bIsRecalled = false; + m_bIsComplete = false; + } + + void MoveInLineOfSight(Unit* pWho) override + { + FollowerAI::MoveInLineOfSight(pWho); + + if (!m_bIsComplete && pWho->GetEntry() == NPC_ROCKBITER && m_creature->IsWithinDistInMap(pWho, 20.0f)) + { + Player* pPlayer = GetLeaderForFollower(); + if (!pPlayer) + return; + + DoScriptText(SAY_EVENT_COMPLETE_1, m_creature); + DoScriptText(SAY_EVENT_COMPLETE_2, pWho); + + // complete quest + pPlayer->GroupEventHappens(QUEST_ID_WANDERING_SHAY, m_creature); + SetFollowComplete(true); + m_creature->ForcedDespawn(30000); + m_bIsComplete = true; + m_uiWanderTimer = 0; + + // move to Rockbiter + float fX, fY, fZ; + pWho->GetContactPoint(m_creature, fX, fY, fZ, INTERACTION_DISTANCE); + m_creature->GetMotionMaster()->MovePoint(0, fX, fY, fZ); + } + else if (m_bIsRecalled && pWho->GetTypeId() == TYPEID_PLAYER && pWho->IsWithinDistInMap(pWho, INTERACTION_DISTANCE)) + { + m_uiWanderTimer = 60000; + m_bIsRecalled = false; + + switch (urand(0, 2)) + { + case 0: DoScriptText(SAY_WANDER_DONE_1, m_creature); break; + case 1: DoScriptText(SAY_WANDER_DONE_2, m_creature); break; + case 2: DoScriptText(SAY_WANDER_DONE_3, m_creature); break; + } + } + } + + void ReceiveAIEvent(AIEventType eventType, Creature* /*pSender*/, Unit* pInvoker, uint32 uiMiscValue) override + { + // start following + if (eventType == AI_EVENT_START_EVENT && pInvoker->GetTypeId() == TYPEID_PLAYER) + { + StartFollow((Player*)pInvoker, 0, GetQuestTemplateStore(uiMiscValue)); + m_uiWanderTimer = 30000; + } + else if (eventType == AI_EVENT_CUSTOM_A) + { + // resume following + m_bIsRecalled = true; + SetFollowPaused(false); + } + } + + void UpdateFollowerAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + { + if (m_uiWanderTimer) + { + if (m_uiWanderTimer <= uiDiff) + { + // set follow paused and wander in a random point + SetFollowPaused(true); + DoScriptText(EMOTE_WANDER, m_creature); + m_uiWanderTimer = 0; + + switch (urand(0, 3)) + { + case 0: DoScriptText(SAY_WANDER_1, m_creature); break; + case 1: DoScriptText(SAY_WANDER_2, m_creature); break; + case 2: DoScriptText(SAY_WANDER_3, m_creature); break; + case 3: DoScriptText(SAY_WANDER_4, m_creature); break; + } + + float fX, fY, fZ; + m_creature->GetNearPoint(m_creature, fX, fY, fZ, 0, frand(25.0f, 40.0f), frand(0, 2 * M_PI_F)); + m_creature->GetMotionMaster()->MoveRandomAroundPoint(fX, fY, fZ, 20.0f); + } + else + m_uiWanderTimer -= uiDiff; + } + + return; + } + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_npc_shay_leafrunner(Creature* pCreature) +{ + return new npc_shay_leafrunnerAI(pCreature); +} + +bool QuestAccept_npc_shay_leafrunner(Player* pPlayer, Creature* pCreature, const Quest* pQuest) +{ + if (pQuest->GetQuestId() == QUEST_ID_WANDERING_SHAY) + { + DoScriptText(SAY_ESCORT_START, pCreature); + pCreature->AI()->SendAIEvent(AI_EVENT_START_EVENT, pPlayer, pCreature, pQuest->GetQuestId()); + } + return true; +} + +bool EffectDummyCreature_npc_shay_leafrunner(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget, ObjectGuid /*originalCasterGuid*/) +{ + if (uiSpellId == SPELL_SHAYS_BELL && uiEffIndex == EFFECT_INDEX_0) + { + if (pCaster->GetTypeId() != TYPEID_PLAYER) + return true; + + pCreatureTarget->AI()->SendAIEvent(AI_EVENT_CUSTOM_A, pCaster, pCreatureTarget); + return true; + } + + return false; +} + void AddSC_feralas() { Script* pNewScript; @@ -145,4 +308,11 @@ void AddSC_feralas() pNewScript->GetAI = &GetAI_npc_oox22fe; pNewScript->pQuestAcceptNPC = &QuestAccept_npc_oox22fe; pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_shay_leafrunner"; + pNewScript->GetAI = &GetAI_npc_shay_leafrunner; + pNewScript->pQuestAcceptNPC = &QuestAccept_npc_shay_leafrunner; + pNewScript->pEffectDummyNPC = &EffectDummyCreature_npc_shay_leafrunner; + pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index f4768dcaa..8fab8f08f 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3011" + #define SD2_REVISION_NR "3012" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 7da7b5609..e2fbbe824 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -581,6 +581,7 @@ UPDATE creature_template SET ScriptName='npc_kroshius' WHERE entry=14467; /* FERALAS */ UPDATE creature_template SET ScriptName='npc_oox22fe' WHERE entry=7807; +UPDATE creature_template SET ScriptName='npc_shay_leafrunner' WHERE entry=7774; /* GHOSTLANDS */ UPDATE creature_template SET ScriptName='npc_ranger_lilatha' WHERE entry=16295; diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index da4a7eee8..7e060e166 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -1196,7 +1196,19 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1001102,'%s holds the limp body of Taelan Fordring and softly sobs.',0,2,0,0,'tirion fordring EMOTE_HOLD_TAELAN'), (-1001103,'Too long have I sat idle, gripped in this haze... this malaise, lamenting what could have been... what should have been.',0,0,0,0,'tirion fordring SAY_EPILOG_3'), (-1001104,'Your death will not have been in vain, Taelan. A new Order is born on this day... an Order which will dedicate itself to extinguising the evil that plagues this world. An evil that cannot hide behind politics and pleasantries.',0,0,0,0,'tirion fordring SAY_EPILOG_4'), -(-1001105,'This I promise... This I vow...',0,0,0,0,'tirion fordring SAY_EPILOG_5'); +(-1001105,'This I promise... This I vow...',0,0,0,0,'tirion fordring SAY_EPILOG_5'), + +(-1001106,'Don\'t forget to get my bell out of the chest here. And remember, if do happen to wander off, just ring it and I\'ll find you again.',0,0,0,1,'shay leafrunner SAY_ESCORT_START'), +(-1001107,'Are we taking the scenic route?',0,0,0,0,'shay leafrunner SAY_WANDER_1'), +(-1001108,'Oh, what a beautiful flower over there...',0,0,0,0,'shay leafrunner SAY_WANDER_2'), +(-1001109,'Are you sure this is the right way? Maybe we should go this way instead...',0,0,0,0,'shay leafrunner SAY_WANDER_3'), +(-1001110,'Hmmm, I wonder what\'s over this way?',0,0,0,0,'shay leafrunner SAY_WANDER_4'), +(-1001111,'This is quite an adventure!',0,0,0,0,'shay leafrunner SAY_WANDER_DONE_1'), +(-1001112,'Oh, I wandered off again. I\'m sorry.',0,0,0,0,'shay leafrunner SAY_WANDER_DONE_2'), +(-1001113,'The bell again, such a sweet sound.',0,0,0,0,'shay leafrunner SAY_WANDER_DONE_3'), +(-1001114,'%s begins to wander off.',0,2,0,0,'shay leafrunner EMOTE_WANDER'), +(-1001115,'Oh, here you are, Rockbiter! I\'m sorry, I know I\'m not supposed to wander off.',0,0,0,1,'shay leafrunner SAY_EVENT_COMPLETE_1'), +(-1001116,'I\'m so glad yer back Shay. Please, don\'t ever run off like that again! What would I tell yer parents if I lost ya?',0,0,0,1,'rockbiter SAY_EVENT_COMPLETE_2'); -- -1 033 000 SHADOWFANG KEEP INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES diff --git a/sql/updates/r3012_mangos.sql b/sql/updates/r3012_mangos.sql new file mode 100644 index 000000000..488026be5 --- /dev/null +++ b/sql/updates/r3012_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_shay_leafrunner' WHERE entry=7774; diff --git a/sql/updates/r3012_scriptdev2.sql b/sql/updates/r3012_scriptdev2.sql new file mode 100644 index 000000000..52a221402 --- /dev/null +++ b/sql/updates/r3012_scriptdev2.sql @@ -0,0 +1,13 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1001116 AND -1001106; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1001106,'Don\'t forget to get my bell out of the chest here. And remember, if do happen to wander off, just ring it and I\'ll find you again.',0,0,0,1,'shay leafrunner SAY_ESCORT_START'), +(-1001107,'Are we taking the scenic route?',0,0,0,0,'shay leafrunner SAY_WANDER_1'), +(-1001108,'Oh, what a beautiful flower over there...',0,0,0,0,'shay leafrunner SAY_WANDER_2'), +(-1001109,'Are you sure this is the right way? Maybe we should go this way instead...',0,0,0,0,'shay leafrunner SAY_WANDER_3'), +(-1001110,'Hmmm, I wonder what\'s over this way?',0,0,0,0,'shay leafrunner SAY_WANDER_4'), +(-1001111,'This is quite an adventure!',0,0,0,0,'shay leafrunner SAY_WANDER_DONE_1'), +(-1001112,'Oh, I wandered off again. I\'m sorry.',0,0,0,0,'shay leafrunner SAY_WANDER_DONE_2'), +(-1001113,'The bell again, such a sweet sound.',0,0,0,0,'shay leafrunner SAY_WANDER_DONE_3'), +(-1001114,'%s begins to wander off.',0,2,0,0,'shay leafrunner EMOTE_WANDER'), +(-1001115,'Oh, here you are, Rockbiter! I\'m sorry, I know I\'m not supposed to wander off.',0,0,0,1,'shay leafrunner SAY_EVENT_COMPLETE_1'), +(-1001116,'I\'m so glad yer back Shay. Please, don\'t ever run off like that again! What would I tell yer parents if I lost ya?',0,0,0,1,'rockbiter SAY_EVENT_COMPLETE_2'); From c3b78e199a858281ad0f97d5d97ea3e33d62e16d Mon Sep 17 00:00:00 2001 From: virusav Date: Sat, 7 Jun 2014 00:12:01 +0200 Subject: [PATCH 1024/1172] [3013] Implement script support for quests 24849 and 24851 Please note that the spawn location and dialogue requires database support Close #105 Signed-off-by: Xfurry --- scripts/world/areatrigger_scripts.cpp | 48 ++++++++++++++++++++++++++- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 8 +++++ sql/updates/r3013_mangos.sql | 8 +++++ 4 files changed, 64 insertions(+), 2 deletions(-) create mode 100644 sql/updates/r3013_mangos.sql diff --git a/scripts/world/areatrigger_scripts.cpp b/scripts/world/areatrigger_scripts.cpp index 2906ef99f..d773ff0c9 100644 --- a/scripts/world/areatrigger_scripts.cpp +++ b/scripts/world/areatrigger_scripts.cpp @@ -17,7 +17,7 @@ /* ScriptData SDName: Areatrigger_Scripts SD%Complete: 100 -SDComment: Quest support: 4291, 6681, 11686, 10589/10604, 12741, 12548, 13315/13351, 12575 +SDComment: Quest support: 4291, 6681, 10589/10604, 11686, 12548, 12575, 12741, 13315/13351, 24849/24851. SDCategory: Areatrigger EndScriptData */ @@ -32,6 +32,7 @@ at_stormwright_shelf 5108 at_childrens_week_spot 3546,3547,3548,3552,3549,3550 at_scent_larkorwi 1726,1727,1728,1729,1730,1731,1732,1733,1734,1735,1736,1737,1738,1739,1740 at_murkdeep 1966 +at_hot_on_the_trail 5710, 5711, 5712, 5714, 5715, 5716 EndContentData */ #include "precompiled.h" @@ -323,6 +324,46 @@ bool AreaTrigger_at_murkdeep(Player* pPlayer, AreaTriggerEntry const* /*pAt*/) return false; } +/*###### +## at_hot_on_the_trail +######*/ + +struct HotOnTrailData +{ + uint32 uiAtEntry, uiQuestEntry, uiCreditEntry, uiSpellEntry; +}; + +static const HotOnTrailData aHotOnTrailValues[6] = +{ + {5710, 24849, 38340, 71713}, // Stormwind Bank + {5711, 24849, 38341, 71745}, // Stormwind Auction House + {5712, 24849, 38342, 71752}, // Stormwind Barber Shop + {5714, 24851, 38341, 71760}, // Orgrimmar Auction House + {5715, 24851, 38340, 71759}, // Orgrimmar Bank + {5716, 24851, 38342, 71758}, // Orgrimmar Barber Shop +}; + +bool AreaTrigger_at_hot_on_the_trail(Player* pPlayer, AreaTriggerEntry const* pAt) +{ + if (pPlayer->isGameMaster() || !pPlayer->isAlive()) + return false; + + for (uint8 i = 0; i < 6; ++i) + { + if (pAt->id == aHotOnTrailValues[i].uiAtEntry) + { + if (pPlayer->GetQuestStatus(aHotOnTrailValues[i].uiQuestEntry) == QUEST_STATUS_INCOMPLETE && + pPlayer->GetReqKillOrCastCurrentCount(aHotOnTrailValues[i].uiQuestEntry, aHotOnTrailValues[i].uiCreditEntry) == 0) + { + pPlayer->CastSpell(pPlayer, aHotOnTrailValues[i].uiSpellEntry, true); + return true; + } + } + } + + return false; +} + void AddSC_areatrigger_scripts() { Script* pNewScript; @@ -381,4 +422,9 @@ void AddSC_areatrigger_scripts() pNewScript->Name = "at_murkdeep"; pNewScript->pAreaTrigger = &AreaTrigger_at_murkdeep; pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "at_hot_on_the_trail"; + pNewScript->pAreaTrigger = &AreaTrigger_at_hot_on_the_trail; + pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 8fab8f08f..52cf4ceca 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3012" + #define SD2_REVISION_NR "3013" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index e2fbbe824..2edbe873e 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -84,6 +84,14 @@ DELETE FROM scripted_areatrigger WHERE entry IN (4047,4052); INSERT INTO scripted_areatrigger VALUES (4047,'at_temple_ahnqiraj'), (4052,'at_temple_ahnqiraj'); +DELETE FROM scripted_areatrigger WHERE entry IN (5710,5711,5712,5714,5715,5716); +INSERT INTO scripted_areatrigger VALUES +(5710, 'at_hot_on_the_trail'), +(5711, 'at_hot_on_the_trail'), +(5712, 'at_hot_on_the_trail'), +(5714, 'at_hot_on_the_trail'), +(5715, 'at_hot_on_the_trail'), +(5716, 'at_hot_on_the_trail'); /* BATTLEGROUNDS */ diff --git a/sql/updates/r3013_mangos.sql b/sql/updates/r3013_mangos.sql new file mode 100644 index 000000000..192c5418c --- /dev/null +++ b/sql/updates/r3013_mangos.sql @@ -0,0 +1,8 @@ +DELETE FROM scripted_areatrigger WHERE entry IN (5710,5711,5712,5714,5715,5716); +INSERT INTO scripted_areatrigger VALUES +(5710, 'at_hot_on_the_trail'), +(5711, 'at_hot_on_the_trail'), +(5712, 'at_hot_on_the_trail'), +(5714, 'at_hot_on_the_trail'), +(5715, 'at_hot_on_the_trail'), +(5716, 'at_hot_on_the_trail'); From 5087689a04af11a21455268c829a90688cc9804e Mon Sep 17 00:00:00 2001 From: virusav Date: Wed, 11 Jun 2014 23:48:52 +0200 Subject: [PATCH 1025/1172] [3014] Implement script support for quests 13300 and 13302 Close #107 Signed-off-by: Xfurry --- scripts/northrend/icecrown.cpp | 106 ++++++++++++++++++++++++++++++- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 + sql/scriptdev2_script_full.sql | 14 +++- sql/updates/r3014_mangos.sql | 1 + sql/updates/r3014_scriptdev2.sql | 13 ++++ 6 files changed, 133 insertions(+), 4 deletions(-) create mode 100644 sql/updates/r3014_mangos.sql create mode 100644 sql/updates/r3014_scriptdev2.sql diff --git a/scripts/northrend/icecrown.cpp b/scripts/northrend/icecrown.cpp index 98d4b3a31..441ab3e2d 100644 --- a/scripts/northrend/icecrown.cpp +++ b/scripts/northrend/icecrown.cpp @@ -17,7 +17,7 @@ /* ScriptData SDName: Icecrown SD%Complete: 100 -SDComment: Quest support: 13221, 13229, 13284, 13301, 13481, 13482. +SDComment: Quest support: 13221, 13229, 13284, 13300, 13301, 13302, 13481, 13482. SDCategory: Icecrown EndScriptData */ @@ -25,6 +25,7 @@ EndScriptData */ npc_squad_leader npc_infantry npc_father_kamaros +npc_saronite_mine_slave EndContentData */ #include "precompiled.h" @@ -556,6 +557,103 @@ bool QuestAccept_npc_father_kamaros(Player* pPlayer, Creature* pCreature, const return false; } +/*###### +## npc_saronite_mine_slave +######*/ + +enum +{ + SAY_MINER_SUICIDE_1 = -1001117, + SAY_MINER_SUICIDE_2 = -1001118, + SAY_MINER_SUICIDE_3 = -1001119, + SAY_MINER_SUICIDE_4 = -1001120, + SAY_MINER_SUICIDE_5 = -1001121, + SAY_MINER_SUICIDE_6 = -1001122, + SAY_MINER_SUICIDE_7 = -1001123, + SAY_MINER_SUICIDE_8 = -1001124, + + GOSSIP_ITEM_SLAVE_FREE = -3000113, + TEXT_ID = 14068, + + NPC_SARONITE_KILL_CREDIT_BUNNY = 31866, + + FACTION_HOSTILE = 14, + + QUEST_SLAVES_TO_SARONITE_A = 13300, + QUEST_SLAVES_TO_SARONITE_H = 13302, +}; + +static const float afPointSlaveSalvation[3] = {7030.59f, 1866.73f, 533.94f}; +static const float afPointSlaveSuicide1[3] = {6965.99f, 2051.44f, 519.49f}; +static const float afPointSlaveSuicide2[3] = {6920.47f, 1973.46f, 523.38f}; +static const float afPointSlaveSuicide3[3] = {6915.35f, 2026.35f, 518.53f}; + +bool GossipHello_npc_saronite_mine_slave(Player* pPlayer, Creature* pCreature) +{ + if (pPlayer->GetQuestStatus(QUEST_SLAVES_TO_SARONITE_A) == QUEST_STATUS_INCOMPLETE || pPlayer->GetQuestStatus(QUEST_SLAVES_TO_SARONITE_H) == QUEST_STATUS_INCOMPLETE) + pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_SLAVE_FREE, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); + + pPlayer->SEND_GOSSIP_MENU(TEXT_ID, pCreature->GetObjectGuid()); + return true; +} + +bool GossipSelect_npc_saronite_mine_slave(Player* pPlayer, Creature* pCreature, uint32 /*uiSender*/, uint32 uiAction) +{ + if (uiAction != GOSSIP_ACTION_INFO_DEF + 1) + return false; + + pPlayer->CLOSE_GOSSIP_MENU(); + + switch (urand(0, 5)) + { + case 0: + case 1: + case 2: + pCreature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); + pPlayer->KilledMonsterCredit(NPC_SARONITE_KILL_CREDIT_BUNNY); + + pCreature->SetWalk(false); + pCreature->GetMotionMaster()->MovePoint(0, afPointSlaveSalvation[0], afPointSlaveSalvation[1], afPointSlaveSalvation[2]); + pCreature->ForcedDespawn(20000); + break; + case 3: + case 4: + pCreature->SetFactionTemporary(FACTION_HOSTILE, TEMPFACTION_RESTORE_RESPAWN | TEMPFACTION_RESTORE_REACH_HOME); + pCreature->AI()->AttackStart(pPlayer); + break; + case 5: + switch (urand(0, 7)) + { + case 0: DoScriptText(SAY_MINER_SUICIDE_1, pCreature); break; + case 1: DoScriptText(SAY_MINER_SUICIDE_2, pCreature); break; + case 2: DoScriptText(SAY_MINER_SUICIDE_3, pCreature); break; + case 3: DoScriptText(SAY_MINER_SUICIDE_4, pCreature); break; + case 4: DoScriptText(SAY_MINER_SUICIDE_5, pCreature); break; + case 5: DoScriptText(SAY_MINER_SUICIDE_6, pCreature); break; + case 6: DoScriptText(SAY_MINER_SUICIDE_7, pCreature); break; + case 7: DoScriptText(SAY_MINER_SUICIDE_8, pCreature); break; + } + + pCreature->SetWalk(false); + switch (urand(0, 2)) + { + case 0: + pCreature->GetMotionMaster()->MovePoint(0, afPointSlaveSuicide1[0], afPointSlaveSuicide1[1], afPointSlaveSuicide1[2]); + break; + case 1: + pCreature->GetMotionMaster()->MovePoint(0, afPointSlaveSuicide2[0], afPointSlaveSuicide2[1], afPointSlaveSuicide2[2]); + break; + case 2: + pCreature->GetMotionMaster()->MovePoint(0, afPointSlaveSuicide3[0], afPointSlaveSuicide3[1], afPointSlaveSuicide3[2]); + break; + } + pCreature->ForcedDespawn(20000); + break; + } + + return true; +} + void AddSC_icecrown() { Script* pNewScript; @@ -576,4 +674,10 @@ void AddSC_icecrown() pNewScript->GetAI = &GetAI_npc_father_kamaros; pNewScript->pQuestAcceptNPC = &QuestAccept_npc_father_kamaros; pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_saronite_mine_slave"; + pNewScript->pGossipHello = &GossipHello_npc_saronite_mine_slave; + pNewScript->pGossipSelect = &GossipSelect_npc_saronite_mine_slave; + pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 52cf4ceca..5cf0c439e 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3013" + #define SD2_REVISION_NR "3014" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 2edbe873e..1f1d466ab 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -756,6 +756,7 @@ INSERT INTO scripted_areatrigger VALUES UPDATE creature_template SET ScriptName='npc_squad_leader' WHERE entry IN (31737,31833); UPDATE creature_template SET ScriptName='npc_infantry' WHERE entry IN (31701,31832); UPDATE creature_template SET ScriptName='npc_father_kamaros' WHERE entry IN (31279,32800); +UPDATE creature_template SET ScriptName='npc_saronite_mine_slave' WHERE entry=31397; /* IRONFORGE */ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 7e060e166..91f9866f5 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -1208,7 +1208,16 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1001113,'The bell again, such a sweet sound.',0,0,0,0,'shay leafrunner SAY_WANDER_DONE_3'), (-1001114,'%s begins to wander off.',0,2,0,0,'shay leafrunner EMOTE_WANDER'), (-1001115,'Oh, here you are, Rockbiter! I\'m sorry, I know I\'m not supposed to wander off.',0,0,0,1,'shay leafrunner SAY_EVENT_COMPLETE_1'), -(-1001116,'I\'m so glad yer back Shay. Please, don\'t ever run off like that again! What would I tell yer parents if I lost ya?',0,0,0,1,'rockbiter SAY_EVENT_COMPLETE_2'); +(-1001116,'I\'m so glad yer back Shay. Please, don\'t ever run off like that again! What would I tell yer parents if I lost ya?',0,0,0,1,'rockbiter SAY_EVENT_COMPLETE_2'), + +(-1001117,'AHAHAHAHA... you\'ll join us soon enough!',0,1,0,0,'saronite mine slave SAY_MINER_SUICIDE_1'), +(-1001118,'I don\'t want to leave! I want to stay here!',0,1,0,0,'saronite mine slave SAY_MINER_SUICIDE_2'), +(-1001119,'I must get further underground to where he is. I must jump!',0,1,0,0,'saronite mine slave SAY_MINER_SUICIDE_3'), +(-1001120,'I won\'t leave!',0,1,0,0,'saronite mine slave SAY_MINER_SUICIDE_4'), +(-1001121,'I\'ll never return. The whole reason for my existence awaits below!',0,1,0,0,'saronite mine slave SAY_MINER_SUICIDE_5'), +(-1001122,'I\'m coming, master!',0,1,0,0,'saronite mine slave SAY_MINER_SUICIDE_6'), +(-1001123,'My life for you!',0,1,0,0,'saronite mine slave SAY_MINER_SUICIDE_7'), +(-1001124,'NO! You\'re wrong! The voices in my head are beautiful!',0,1,0,0,'saronite mine slave SAY_MINER_SUICIDE_8'); -- -1 033 000 SHADOWFANG KEEP INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES @@ -4779,7 +4788,8 @@ INSERT INTO gossip_texts (entry,content_default,comment) VALUES (-3000109,'I am ready, Oronok. Let us destroy Cyrukh and free the elements!','oronok torn-heart GOSSIP_ITEM_FIGHT'), (-3000110,'Why... yes, of course. I\'ve something to show you right inside this building, Mr. Anvilward.','prospector anvilward GOSSIP_ITEM_SHOW'), (-3000111,'I am ready, Anchorite. Let us begin the exorcism.','anchorite barada GOSSIP_ITEM_EXORCISM'), -(-3000112,'I\'m ready - let\'s get out of here.','injured goblin miner GOSSIP_ITEM_ESCORT_READY'); +(-3000112,'I\'m ready - let\'s get out of here.','injured goblin miner GOSSIP_ITEM_ESCORT_READY'), +(-3000113,'Go on, you\'re free. Get out of here!','saronite mine slave GOSSIP_ITEM_SLAVE_FREE'); -- -3 033 000 SHADOWFANG KEEP INSERT INTO gossip_texts (entry,content_default,comment) VALUES diff --git a/sql/updates/r3014_mangos.sql b/sql/updates/r3014_mangos.sql new file mode 100644 index 000000000..19489ecf7 --- /dev/null +++ b/sql/updates/r3014_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_saronite_mine_slave' WHERE entry=31397; diff --git a/sql/updates/r3014_scriptdev2.sql b/sql/updates/r3014_scriptdev2.sql new file mode 100644 index 000000000..69d115523 --- /dev/null +++ b/sql/updates/r3014_scriptdev2.sql @@ -0,0 +1,13 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1001124 AND -1001117; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1001117,'AHAHAHAHA... you\'ll join us soon enough!',0,1,0,0,'saronite mine slave SAY_MINER_SUICIDE_1'), +(-1001118,'I don\'t want to leave! I want to stay here!',0,1,0,0,'saronite mine slave SAY_MINER_SUICIDE_2'), +(-1001119,'I must get further underground to where he is. I must jump!',0,1,0,0,'saronite mine slave SAY_MINER_SUICIDE_3'), +(-1001120,'I won\'t leave!',0,1,0,0,'saronite mine slave SAY_MINER_SUICIDE_4'), +(-1001121,'I\'ll never return. The whole reason for my existence awaits below!',0,1,0,0,'saronite mine slave SAY_MINER_SUICIDE_5'), +(-1001122,'I\'m coming, master!',0,1,0,0,'saronite mine slave SAY_MINER_SUICIDE_6'), +(-1001123,'My life for you!',0,1,0,0,'saronite mine slave SAY_MINER_SUICIDE_7'), +(-1001124,'NO! You\'re wrong! The voices in my head are beautiful!',0,1,0,0,'saronite mine slave SAY_MINER_SUICIDE_8'); +DELETE FROM gossip_texts WHERE entry=-3000113; +INSERT INTO gossip_texts (entry,content_default,comment) VALUES +(-3000113,'Go on, you\'re free. Get out of here!','saronite mine slave GOSSIP_ITEM_SLAVE_FREE'); From d327433b9522c12074304514d5ce8edf77170301 Mon Sep 17 00:00:00 2001 From: virusav Date: Fri, 13 Jun 2014 00:34:31 +0200 Subject: [PATCH 1026/1172] [3015] Implement script support for quest 12644 Close #103 Signed-off-by: Xfurry --- scripts/northrend/sholazar_basin.cpp | 293 ++++++++++++++++++++++++++- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 3 + sql/scriptdev2_script_full.sql | 18 +- sql/updates/r3015_mangos.sql | 3 + sql/updates/r3015_scriptdev2.sql | 17 ++ 6 files changed, 332 insertions(+), 4 deletions(-) create mode 100644 sql/updates/r3015_mangos.sql create mode 100644 sql/updates/r3015_scriptdev2.sql diff --git a/scripts/northrend/sholazar_basin.cpp b/scripts/northrend/sholazar_basin.cpp index b11ec06fb..f8ca7d371 100644 --- a/scripts/northrend/sholazar_basin.cpp +++ b/scripts/northrend/sholazar_basin.cpp @@ -17,7 +17,7 @@ /* ScriptData SDName: Sholazar_Basin SD%Complete: 100 -SDComment: Quest support: 12570, 12580, 12688 +SDComment: Quest support: 12570, 12580, 12644, 12688 SDCategory: Sholazar Basin EndScriptData */ @@ -25,6 +25,9 @@ EndScriptData */ npc_helice npc_injured_rainspeaker npc_mosswalker_victim +npc_tipsy_mcmanus +npc_wants_fruit_credit +go_quest_still_at_it_credit EndContentData */ #include "precompiled.h" @@ -408,6 +411,277 @@ bool GossipSelect_npc_mosswalker_victim(Player* pPlayer, Creature* pCreature, ui return true; } +/*###### +## npc_tipsy_mcmanus +######*/ + +enum +{ + SAY_DISTILLATION_START = -1001125, + SAY_ADD_ORANGE = -1001126, + SAY_ADD_BANANAS = -1001127, + SAY_ADD_PAPAYA = -1001128, + SAY_LIGHT_BRAZIER = -1001129, + SAY_OPEN_VALVE = -1001130, + SAY_ACTION_COMPLETE_1 = -1001131, + SAY_ACTION_COMPLETE_2 = -1001132, + SAY_ACTION_COMPLETE_3 = -1001133, + SAY_ACTION_COMPLETE_4 = -1001134, + SAY_DISTILLATION_FAIL = -1001135, + SAY_DISTILLATION_COMPLETE = -1001136, + + GOSSIP_ITEM_TIPSY_MCMANUS = -3000114, + TEXT_ID_READY = 13288, + QUEST_ID_STILL_AT_IT = 12644, + + SPELL_TOSS_ORANGE = 51931, + SPELL_TOSS_BANANA = 51932, + SPELL_TOSS_PAPAYA = 51933, + + NPC_WANTS_ORANGE_TRIGGER = 28535, + NPC_WANTS_PAPAYA_TRIGGER = 28536, + NPC_WANTS_BANANA_TRIGGER = 28537, + // NPC_STEAMING_VALVE_TRIGGER = 28539, + // NPC_WANTS_FIRE_TRIGGER = 28540, + NPC_TIPSY_MCMANUS = 28566, + + GO_THUNDERBREW_JUNGLE_PUNCH = 190643, + GO_PRESSURE_VALVE = 190635, + GO_BRAZIER = 190636, +}; + +struct StillAtItData +{ + int32 iText; + uint32 uiOwnerEntry; +}; + +static const StillAtItData aStillAtItFruits[3] = +{ + {SAY_ADD_ORANGE, NPC_WANTS_ORANGE_TRIGGER}, + {SAY_ADD_BANANAS, NPC_WANTS_BANANA_TRIGGER}, + {SAY_ADD_PAPAYA, NPC_WANTS_PAPAYA_TRIGGER}, +}; + +static const StillAtItData aStillAtItMachines[2] = +{ + {SAY_LIGHT_BRAZIER, GO_BRAZIER}, + {SAY_OPEN_VALVE, GO_PRESSURE_VALVE}, +}; + +struct MANGOS_DLL_DECL npc_tipsy_mcmanusAI : public ScriptedAI +{ + npc_tipsy_mcmanusAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } + + uint8 m_uiTaskIndex; + uint32 m_uiTaskOwnerEntry; + uint32 m_uiTaskTimer; + uint32 m_uiActionTimer; + + void Reset() override + { + m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); + + m_uiTaskIndex = 0; + m_uiTaskOwnerEntry = 0; + m_uiTaskTimer = 0; + m_uiActionTimer = 0; + } + + void ReceiveAIEvent(AIEventType eventType, Creature* /*pSender*/, Unit* pInvoker, uint32 uiMiscValue) override + { + if (pInvoker->GetTypeId() != TYPEID_PLAYER) + return; + + // start event + if (eventType == AI_EVENT_START_EVENT) + { + m_creature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); + DoScriptText(SAY_DISTILLATION_START, m_creature); + m_uiTaskTimer = 5000; + } + // check fruit tasks + else if (eventType == AI_EVENT_CUSTOM_A) + { + for (uint8 i = 0; i < 3; ++i) + { + if (aStillAtItFruits[i].uiOwnerEntry == uiMiscValue) + DoCheckDistillationTask(uiMiscValue); + } + } + // check machine tasks + else if (eventType == AI_EVENT_CUSTOM_B) + { + for (uint8 i = 0; i < 2; ++i) + { + if (aStillAtItMachines[i].uiOwnerEntry == uiMiscValue) + DoCheckDistillationTask(uiMiscValue); + } + } + } + + // wrapper to complete a distillation task + void DoCheckDistillationTask(uint32 uiOwnerEntry) + { + // check if the given entry matches the expected one + if (uiOwnerEntry == m_uiTaskOwnerEntry) + { + switch (urand(0, 3)) + { + case 0: DoScriptText(SAY_ACTION_COMPLETE_1, m_creature); break; + case 1: DoScriptText(SAY_ACTION_COMPLETE_2, m_creature); break; + case 2: DoScriptText(SAY_ACTION_COMPLETE_3, m_creature); break; + case 3: DoScriptText(SAY_ACTION_COMPLETE_4, m_creature); break; + } + + m_uiTaskTimer = 6000; + m_uiActionTimer = 0; + } + // reset if failed + else + { + DoScriptText(SAY_DISTILLATION_FAIL, m_creature); + EnterEvadeMode(); + } + } + + void UpdateAI(const uint32 uiDiff) override + { + if (m_uiTaskTimer) + { + if (m_uiTaskTimer <= uiDiff) + { + switch (m_uiTaskIndex) + { + // fruit tasks + case 0: + case 1: + case 3: + case 6: + case 7: + { + uint8 uiIndex = urand(0, 2); + DoScriptText(aStillAtItFruits[uiIndex].iText, m_creature); + m_uiTaskOwnerEntry = aStillAtItFruits[uiIndex].uiOwnerEntry; + + m_uiTaskTimer = 0; + m_uiActionTimer = 5000; + break; + } + // valve or fire task + case 2: + case 4: + case 5: + case 8: + { + uint8 uiIndex = urand(0, 1); + DoScriptText(aStillAtItMachines[uiIndex].iText, m_creature); + m_uiTaskOwnerEntry = aStillAtItMachines[uiIndex].uiOwnerEntry; + + m_uiTaskTimer = 0; + m_uiActionTimer = 5000; + break; + } + // complete event + case 9: + DoScriptText(SAY_DISTILLATION_COMPLETE, m_creature); + if (GameObject* pPunch = GetClosestGameObjectWithEntry(m_creature, GO_THUNDERBREW_JUNGLE_PUNCH, 10.0f)) + { + pPunch->SetRespawnTime(30); + pPunch->Refresh(); + } + m_uiTaskTimer = 20000; + break; + case 10: + EnterEvadeMode(); + m_uiTaskTimer = 0; + break; + } + ++m_uiTaskIndex; + } + else + m_uiTaskTimer -= uiDiff; + } + + // timer delay to allow player to complete the task + if (m_uiActionTimer) + { + if (m_uiActionTimer <= uiDiff) + { + DoScriptText(SAY_DISTILLATION_FAIL, m_creature); + EnterEvadeMode(); + m_uiActionTimer = 0; + } + else + m_uiActionTimer -= uiDiff; + } + + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_npc_tipsy_mcmanus(Creature* pCreature) +{ + return new npc_tipsy_mcmanusAI(pCreature); +} + +bool GossipHello_npc_tipsy_mcmanus(Player* pPlayer, Creature* pCreature) +{ + if (pPlayer->GetQuestStatus(QUEST_ID_STILL_AT_IT) == QUEST_STATUS_INCOMPLETE) + pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_TIPSY_MCMANUS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); + + pPlayer->SEND_GOSSIP_MENU(TEXT_ID_READY, pCreature->GetObjectGuid()); + return true; +} + +bool GossipSelect_npc_tipsy_mcmanus(Player* pPlayer, Creature* pCreature, uint32 /*uiSender*/, uint32 uiAction) +{ + if (uiAction != GOSSIP_ACTION_INFO_DEF + 1) + return false; + + pPlayer->CLOSE_GOSSIP_MENU(); + pCreature->AI()->SendAIEvent(AI_EVENT_START_EVENT, pPlayer, pCreature); + return true; +} + +/*###### +## npc_wants_fruit_credit +######*/ + +bool EffectDummyCreature_npc_wants_fruit_credit(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget, ObjectGuid /*originalCasterGuid*/) +{ + if ((uiSpellId == SPELL_TOSS_ORANGE || uiSpellId == SPELL_TOSS_BANANA || uiSpellId == SPELL_TOSS_PAPAYA) && uiEffIndex == EFFECT_INDEX_0) + { + if (pCaster->GetTypeId() == TYPEID_PLAYER && ((Player*)pCaster)->GetQuestStatus(QUEST_ID_STILL_AT_IT) == QUEST_STATUS_INCOMPLETE) + { + if (Creature* pTipsyMcmanus = GetClosestCreatureWithEntry(pCaster, NPC_TIPSY_MCMANUS, 2 * INTERACTION_DISTANCE)) + { + pCreatureTarget->AI()->SendAIEvent(AI_EVENT_CUSTOM_A, pCaster, pTipsyMcmanus, pCreatureTarget->GetEntry()); + return true; + } + } + } + return false; +} + +/*###### +## go_quest_still_at_it_credit +######*/ + +bool GOUse_go_quest_still_at_it_credit(Player* pPlayer, GameObject* pGo) +{ + if (pPlayer->GetQuestStatus(QUEST_ID_STILL_AT_IT) != QUEST_STATUS_INCOMPLETE) + return true; + + if (Creature* pTipsyMcmanus = GetClosestCreatureWithEntry(pPlayer, NPC_TIPSY_MCMANUS, 2 * INTERACTION_DISTANCE)) + pTipsyMcmanus->AI()->SendAIEvent(AI_EVENT_CUSTOM_B, pPlayer, pTipsyMcmanus, pGo->GetEntry()); + + return false; +} + void AddSC_sholazar_basin() { Script* pNewScript; @@ -431,4 +705,21 @@ void AddSC_sholazar_basin() pNewScript->pGossipHello = &GossipHello_npc_mosswalker_victim; pNewScript->pGossipSelect = &GossipSelect_npc_mosswalker_victim; pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_tipsy_mcmanus"; + pNewScript->GetAI = &GetAI_npc_tipsy_mcmanus; + pNewScript->pGossipHello = &GossipHello_npc_tipsy_mcmanus; + pNewScript->pGossipSelect = &GossipSelect_npc_tipsy_mcmanus; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_wants_fruit_credit"; + pNewScript->pEffectDummyNPC = &EffectDummyCreature_npc_wants_fruit_credit; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "go_quest_still_at_it_credit"; + pNewScript->pGOUse = &GOUse_go_quest_still_at_it_credit; + pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 5cf0c439e..0dc938028 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3014" + #define SD2_REVISION_NR "3015" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 1f1d466ab..a89a2ce55 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -1072,6 +1072,9 @@ UPDATE creature_template SET ScriptName='npc_salsalabim' WHERE entry=18584; UPDATE creature_template SET ScriptName='npc_helice' WHERE entry=28787; UPDATE creature_template SET ScriptName='npc_injured_rainspeaker' WHERE entry=28217; UPDATE creature_template SET ScriptName='npc_mosswalker_victim' WHERE entry=28113; +UPDATE creature_template SET ScriptName='npc_tipsy_mcmanus' WHERE entry=28566; +UPDATE creature_template SET ScriptName='npc_wants_fruit_credit' WHERE entry IN (28535,28536,28537); +UPDATE gameobject_template SET ScriptName='go_quest_still_at_it_credit' WHERE entry IN (190635,190636); /* SILITHUS */ UPDATE creature_template SET ScriptName='npc_anachronos_the_ancient' WHERE entry=15381; diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 91f9866f5..f4528f38c 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -1217,7 +1217,20 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1001121,'I\'ll never return. The whole reason for my existence awaits below!',0,1,0,0,'saronite mine slave SAY_MINER_SUICIDE_5'), (-1001122,'I\'m coming, master!',0,1,0,0,'saronite mine slave SAY_MINER_SUICIDE_6'), (-1001123,'My life for you!',0,1,0,0,'saronite mine slave SAY_MINER_SUICIDE_7'), -(-1001124,'NO! You\'re wrong! The voices in my head are beautiful!',0,1,0,0,'saronite mine slave SAY_MINER_SUICIDE_8'); +(-1001124,'NO! You\'re wrong! The voices in my head are beautiful!',0,1,0,0,'saronite mine slave SAY_MINER_SUICIDE_8'), + +(-1001125,'Beginning the distillation in 5 seconds.',0,0,0,0,'tipsy mcmanus SAY_DISTILLATION_START'), +(-1001126,'Add another orange! Quickly!',0,0,0,25,'tipsy mcmanus SAY_ADD_ORANGE'), +(-1001127,'Add bananas!',0,0,0,25,'tipsy mcmanus SAY_ADD_BANANAS'), +(-1001128,'Put a papaya in the still!',0,0,0,25,'tipsy mcmanus SAY_ADD_PAPAYA'), +(-1001129,'The still needs heat! Light the brazier!',0,0,0,5,'tipsy mcmanus SAY_LIGHT_BRAZIER'), +(-1001130,'Pressure\'s too high! Open the pressure valve!',0,0,0,5,'tipsy mcmanus SAY_OPEN_VALVE'), +(-1001131,'Good job! Keep your eyes open, now.',0,0,0,4,'tipsy mcmanus SAY_ACTION_COMPLETE_1'), +(-1001132,'Nicely handled! Stay on your toes!',0,0,0,4,'tipsy mcmanus SAY_ACTION_COMPLETE_2'), +(-1001133,'Well done! Be ready for anything!',0,0,0,4,'tipsy mcmanus SAY_ACTION_COMPLETE_3'), +(-1001134,'That\'ll do. Never know what it\'ll need next...',0,0,0,4,'tipsy mcmanus SAY_ACTION_COMPLETE_4'), +(-1001135,'It\'s no good! I\'m shutting it down...',0,0,0,0,'tipsy mcmanus SAY_DISTILLATION_FAIL'), +(-1001136,'We\'ve done it! Come get the cask.',0,0,0,0,'tipsy mcmanus SAY_DISTILLATION_COMPLETE'); -- -1 033 000 SHADOWFANG KEEP INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES @@ -4789,7 +4802,8 @@ INSERT INTO gossip_texts (entry,content_default,comment) VALUES (-3000110,'Why... yes, of course. I\'ve something to show you right inside this building, Mr. Anvilward.','prospector anvilward GOSSIP_ITEM_SHOW'), (-3000111,'I am ready, Anchorite. Let us begin the exorcism.','anchorite barada GOSSIP_ITEM_EXORCISM'), (-3000112,'I\'m ready - let\'s get out of here.','injured goblin miner GOSSIP_ITEM_ESCORT_READY'), -(-3000113,'Go on, you\'re free. Get out of here!','saronite mine slave GOSSIP_ITEM_SLAVE_FREE'); +(-3000113,'Go on, you\'re free. Get out of here!','saronite mine slave GOSSIP_ITEM_SLAVE_FREE'), +(-3000114,'I\'m ready to start the distillation, uh, Tipsy.','tipsy mcmanus GOSSIP_ITEM_START_DISTILLATION'); -- -3 033 000 SHADOWFANG KEEP INSERT INTO gossip_texts (entry,content_default,comment) VALUES diff --git a/sql/updates/r3015_mangos.sql b/sql/updates/r3015_mangos.sql new file mode 100644 index 000000000..d9b1a966f --- /dev/null +++ b/sql/updates/r3015_mangos.sql @@ -0,0 +1,3 @@ +UPDATE creature_template SET ScriptName='npc_tipsy_mcmanus' WHERE entry=28566; +UPDATE creature_template SET ScriptName='npc_wants_fruit_credit' WHERE entry IN (28535,28536,28537); +UPDATE gameobject_template SET ScriptName='go_quest_still_at_it_credit' WHERE entry IN (190635,190636); diff --git a/sql/updates/r3015_scriptdev2.sql b/sql/updates/r3015_scriptdev2.sql new file mode 100644 index 000000000..db8316050 --- /dev/null +++ b/sql/updates/r3015_scriptdev2.sql @@ -0,0 +1,17 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1001136 AND -1001125; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1001125,'Beginning the distillation in 5 seconds.',0,0,0,0,'tipsy mcmanus SAY_DISTILLATION_START'), +(-1001126,'Add another orange! Quickly!',0,0,0,25,'tipsy mcmanus SAY_ADD_ORANGE'), +(-1001127,'Add bananas!',0,0,0,25,'tipsy mcmanus SAY_ADD_BANANAS'), +(-1001128,'Put a papaya in the still!',0,0,0,25,'tipsy mcmanus SAY_ADD_PAPAYA'), +(-1001129,'The still needs heat! Light the brazier!',0,0,0,5,'tipsy mcmanus SAY_LIGHT_BRAZIER'), +(-1001130,'Pressure\'s too high! Open the pressure valve!',0,0,0,5,'tipsy mcmanus SAY_OPEN_VALVE'), +(-1001131,'Good job! Keep your eyes open, now.',0,0,0,4,'tipsy mcmanus SAY_ACTION_COMPLETE_1'), +(-1001132,'Nicely handled! Stay on your toes!',0,0,0,4,'tipsy mcmanus SAY_ACTION_COMPLETE_2'), +(-1001133,'Well done! Be ready for anything!',0,0,0,4,'tipsy mcmanus SAY_ACTION_COMPLETE_3'), +(-1001134,'That\'ll do. Never know what it\'ll need next...',0,0,0,4,'tipsy mcmanus SAY_ACTION_COMPLETE_4'), +(-1001135,'It\'s no good! I\'m shutting it down...',0,0,0,0,'tipsy mcmanus SAY_DISTILLATION_FAIL'), +(-1001136,'We\'ve done it! Come get the cask.',0,0,0,0,'tipsy mcmanus SAY_DISTILLATION_COMPLETE'); +DELETE FROM gossip_texts WHERE entry=-3000114; +INSERT INTO gossip_texts (entry,content_default,comment) VALUES +(-3000114,'I\'m ready to start the distillation, uh, Tipsy.','tipsy mcmanus GOSSIP_ITEM_START_DISTILLATION'); From 0f1c48c0a8cfa7685a6d333c09828b7e2957b41c Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sun, 15 Jun 2014 18:15:28 +0200 Subject: [PATCH 1027/1172] [3016] Improve quest 12733 Close #108 --- .../scarlet_enclave/ebon_hold.cpp | 185 ++++++++++++++---- sd2_revision_nr.h | 2 +- sql/scriptdev2_script_full.sql | 7 +- sql/updates/r3016_scriptdev2.sql | 6 + 4 files changed, 155 insertions(+), 45 deletions(-) create mode 100644 sql/updates/r3016_scriptdev2.sql diff --git a/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp b/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp index 9fe70644e..ed4d3968b 100644 --- a/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp +++ b/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp @@ -510,13 +510,26 @@ enum SAY_DUEL_H = -1609023, SAY_DUEL_I = -1609024, + EMOTE_DUEL_BEGIN = -1001137, + EMOTE_DUEL_BEGIN_3 = -1001138, + EMOTE_DUEL_BEGIN_2 = -1001139, + EMOTE_DUEL_BEGIN_1 = -1001140, + + GOSSIP_ITEM_ACCEPT_DUEL = -3609000, + GOSSIP_TEXT_ID_DUEL = 13433, + SPELL_DUEL = 52996, SPELL_DUEL_TRIGGERED = 52990, SPELL_DUEL_VICTORY = 52994, SPELL_DUEL_FLAG = 52991, - GOSSIP_ITEM_ACCEPT_DUEL = -3609000, - GOSSIP_TEXT_ID_DUEL = 13433, + // generic DK spells. used in many scripts here + SPELL_BLOOD_STRIKE = 52374, + SPELL_DEATH_COIL = 52375, + SPELL_ICY_TOUCH = 52372, + SPELL_PLAGUE_STRIKE = 52373, + + GO_DUEL_FLAG = 191126, QUEST_DEATH_CHALLENGE = 12733, FACTION_HOSTILE = 2068 @@ -532,72 +545,155 @@ struct MANGOS_DLL_DECL npc_death_knight_initiateAI : public ScriptedAI npc_death_knight_initiateAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } ObjectGuid m_duelerGuid; + uint8 m_uiDuelStartStage; uint32 m_uiDuelTimer; - bool m_bIsDuelInProgress; + uint32 m_uiBloodStrikeTimer; + uint32 m_uiDeathCoilTimer; + uint32 m_uiIcyTouchTimer; + uint32 m_uiPlagueStrikeTimer; + + bool m_bIsDuelComplete; void Reset() override { m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_UNK_15); - m_duelerGuid.Clear(); - m_uiDuelTimer = 5000; - m_bIsDuelInProgress = false; + + m_uiDuelStartStage = 0; + m_uiDuelTimer = 0; + m_bIsDuelComplete = false; + + m_uiBloodStrikeTimer = 4000; + m_uiDeathCoilTimer = 6000; + m_uiIcyTouchTimer = 2000; + m_uiPlagueStrikeTimer = 5000; } - void AttackedBy(Unit* pAttacker) override + void JustReachedHome() override { - if (m_creature->getVictim()) - return; - - if (m_creature->IsFriendlyTo(pAttacker)) - return; + // reset encounter + if (GameObject* pFlag = GetClosestGameObjectWithEntry(m_creature, GO_DUEL_FLAG, 30.0f)) + pFlag->SetLootState(GO_JUST_DEACTIVATED); - AttackStart(pAttacker); + m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); } - void SpellHit(Unit* pCaster, const SpellEntry* pSpell) override + void ReceiveAIEvent(AIEventType eventType, Creature* /*pSender*/, Unit* pInvoker, uint32 /*uiMiscValue*/) override { - if (!m_bIsDuelInProgress && pSpell->Id == SPELL_DUEL_TRIGGERED && pCaster->GetTypeId() == TYPEID_PLAYER) + // start duel + if (eventType == AI_EVENT_START_EVENT && pInvoker->GetTypeId() == TYPEID_PLAYER) { - m_duelerGuid = pCaster->GetObjectGuid(); - m_bIsDuelInProgress = true; + m_duelerGuid = pInvoker->GetObjectGuid(); + m_uiDuelStartStage = 0; + m_uiDuelTimer = 5000; } } void DamageTaken(Unit* /*pDoneBy*/, uint32& uiDamage) override { - if (m_bIsDuelInProgress && uiDamage > m_creature->GetHealth()) + if (uiDamage >= m_creature->GetHealth()) { uiDamage = 0; - if (Player* pPlayer = m_creature->GetMap()->GetPlayer(m_duelerGuid)) - m_creature->CastSpell(pPlayer, SPELL_DUEL_VICTORY, true); + if (!m_bIsDuelComplete) + { + if (Player* pPlayer = m_creature->GetMap()->GetPlayer(m_duelerGuid)) + { + m_creature->CastSpell(pPlayer, SPELL_DUEL_VICTORY, true); + m_creature->SetFacingToObject(pPlayer); + } + + // complete duel and evade (without home movemnet) + m_bIsDuelComplete = true; + m_creature->RemoveAllAurasOnEvade(); + m_creature->DeleteThreatList(); + m_creature->CombatStop(true); + m_creature->SetLootRecipient(NULL); - // possibly not evade, but instead have end sequenze - EnterEvadeMode(); + // remove duel flag + if (GameObject* pFlag = GetClosestGameObjectWithEntry(m_creature, GO_DUEL_FLAG, 30.0f)) + pFlag->SetLootState(GO_JUST_DEACTIVATED); + + m_creature->HandleEmoteCommand(EMOTE_ONESHOT_BEG); + m_creature->ForcedDespawn(10000); + } } } void UpdateAI(const uint32 uiDiff) override { - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + if (m_uiDuelTimer) { - if (m_bIsDuelInProgress) + if (m_uiDuelTimer <= uiDiff) { - if (m_uiDuelTimer < uiDiff) - { - m_creature->SetFactionTemporary(FACTION_HOSTILE, TEMPFACTION_RESTORE_COMBAT_STOP | TEMPFACTION_RESTORE_RESPAWN); + Player* pPlayer = m_creature->GetMap()->GetPlayer(m_duelerGuid); + if (!pPlayer) + return; - if (Player* pPlayer = m_creature->GetMap()->GetPlayer(m_duelerGuid)) + switch (m_uiDuelStartStage) + { + case 0: + DoScriptText(EMOTE_DUEL_BEGIN, m_creature, pPlayer); + m_uiDuelTimer = 1000; + break; + case 1: + DoScriptText(EMOTE_DUEL_BEGIN_3, m_creature, pPlayer); + m_uiDuelTimer = 1000; + break; + case 2: + DoScriptText(EMOTE_DUEL_BEGIN_2, m_creature, pPlayer); + m_uiDuelTimer = 1000; + break; + case 3: + DoScriptText(EMOTE_DUEL_BEGIN_1, m_creature, pPlayer); + m_uiDuelTimer = 1000; + break; + case 4: + m_creature->SetFactionTemporary(FACTION_HOSTILE, TEMPFACTION_RESTORE_COMBAT_STOP | TEMPFACTION_RESTORE_RESPAWN); AttackStart(pPlayer); + m_uiDuelTimer = 0; + break; } - else - m_uiDuelTimer -= uiDiff; + ++m_uiDuelStartStage; } + else + m_uiDuelTimer -= uiDiff; + } + + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; + + if (m_uiBloodStrikeTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_BLOOD_STRIKE) == CAST_OK) + m_uiBloodStrikeTimer = 9000; } + else + m_uiBloodStrikeTimer -= uiDiff; - // TODO: spells + if (m_uiDeathCoilTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_DEATH_COIL) == CAST_OK) + m_uiDeathCoilTimer = 8000; + } + else + m_uiDeathCoilTimer -= uiDiff; + + if (m_uiIcyTouchTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_ICY_TOUCH) == CAST_OK) + m_uiIcyTouchTimer = 8000; + } + else + m_uiIcyTouchTimer -= uiDiff; + + if (m_uiPlagueStrikeTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_PLAGUE_STRIKE) == CAST_OK) + m_uiPlagueStrikeTimer = 8000; + } + else + m_uiPlagueStrikeTimer -= uiDiff; DoMeleeAttackIfReady(); } @@ -625,22 +721,29 @@ bool GossipSelect_npc_death_knight_initiate(Player* pPlayer, Creature* pCreature { pPlayer->CLOSE_GOSSIP_MENU(); - if (npc_death_knight_initiateAI* pInitiateAI = dynamic_cast(pCreature->AI())) - { - if (pInitiateAI->m_bIsDuelInProgress) - return true; - } - + pCreature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); pCreature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_UNK_15); + pCreature->SetFacingToObject(pPlayer); DoScriptText(m_auiRandomSay[urand(0, countof(m_auiRandomSay) - 1)], pCreature, pPlayer); - pCreature->CastSpell(pPlayer, SPELL_DUEL, false); + pCreature->CastSpell(pPlayer, SPELL_DUEL, true); pCreature->CastSpell(pPlayer, SPELL_DUEL_FLAG, true); } return true; } +bool EffectDummyCreature_npc_death_knight_initiate(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget, ObjectGuid /*originalCasterGuid*/) +{ + if (uiSpellId == SPELL_DUEL_TRIGGERED && uiEffIndex == EFFECT_INDEX_0) + { + pCreatureTarget->AI()->SendAIEvent(AI_EVENT_START_EVENT, pCaster, pCreatureTarget); + return true; + } + + return false; +} + /*###### ## npc_koltira_deathweaver ######*/ @@ -838,11 +941,6 @@ enum SPELL_CHAINED_PESANT_BREATH = 54613, SPELL_INITIATE_VISUAL = 51519, - SPELL_BLOOD_STRIKE = 52374, - SPELL_DEATH_COIL = 52375, - SPELL_ICY_TOUCH = 52372, - SPELL_PLAGUE_STRIKE = 52373, - NPC_ANCHOR = 29521, FACTION_MONSTER = 16, @@ -2919,6 +3017,7 @@ void AddSC_ebon_hold() pNewScript->GetAI = &GetAI_npc_death_knight_initiate; pNewScript->pGossipHello = &GossipHello_npc_death_knight_initiate; pNewScript->pGossipSelect = &GossipSelect_npc_death_knight_initiate; + pNewScript->pEffectDummyNPC = &EffectDummyCreature_npc_death_knight_initiate; pNewScript->RegisterSelf(); pNewScript = new Script; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 0dc938028..845661152 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3015" + #define SD2_REVISION_NR "3016" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index f4528f38c..f00f98751 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -1230,7 +1230,12 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1001133,'Well done! Be ready for anything!',0,0,0,4,'tipsy mcmanus SAY_ACTION_COMPLETE_3'), (-1001134,'That\'ll do. Never know what it\'ll need next...',0,0,0,4,'tipsy mcmanus SAY_ACTION_COMPLETE_4'), (-1001135,'It\'s no good! I\'m shutting it down...',0,0,0,0,'tipsy mcmanus SAY_DISTILLATION_FAIL'), -(-1001136,'We\'ve done it! Come get the cask.',0,0,0,0,'tipsy mcmanus SAY_DISTILLATION_COMPLETE'); +(-1001136,'We\'ve done it! Come get the cask.',0,0,0,0,'tipsy mcmanus SAY_DISTILLATION_COMPLETE'), + +(-1001137,'The duel will begin in...',0,5,0,0,'death knight initiate EMOTE_DUEL_BEGIN'), +(-1001138,'3...',0,5,0,0,'death knight initiate EMOTE_DUEL_BEGIN_3'), +(-1001139,'2...',0,5,0,0,'death knight initiate EMOTE_DUEL_BEGIN_2'), +(-1001140,'1...',0,5,0,0,'death knight initiate EMOTE_DUEL_BEGIN_1'); -- -1 033 000 SHADOWFANG KEEP INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES diff --git a/sql/updates/r3016_scriptdev2.sql b/sql/updates/r3016_scriptdev2.sql new file mode 100644 index 000000000..dd04e9c1d --- /dev/null +++ b/sql/updates/r3016_scriptdev2.sql @@ -0,0 +1,6 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1001140 AND -1001137; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1001137,'The duel will begin in...',0,5,0,0,'death knight initiate EMOTE_DUEL_BEGIN'), +(-1001138,'3...',0,5,0,0,'death knight initiate EMOTE_DUEL_BEGIN_3'), +(-1001139,'2...',0,5,0,0,'death knight initiate EMOTE_DUEL_BEGIN_2'), +(-1001140,'1...',0,5,0,0,'death knight initiate EMOTE_DUEL_BEGIN_1'); From b75eeb15e1472b15341167295d22b1635d1999cf Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sun, 22 Jun 2014 22:19:57 +0200 Subject: [PATCH 1028/1172] [3017] Implement script support for the Headless Horseman - Hallow's End boss --- .../boss_headless_horseman.cpp | 442 +++++++++++++++++- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 + sql/updates/r3017_mangos.sql | 1 + 4 files changed, 421 insertions(+), 25 deletions(-) create mode 100644 sql/updates/r3017_mangos.sql diff --git a/scripts/eastern_kingdoms/scarlet_monastery/boss_headless_horseman.cpp b/scripts/eastern_kingdoms/scarlet_monastery/boss_headless_horseman.cpp index 22b9b816e..db0bd1f7f 100644 --- a/scripts/eastern_kingdoms/scarlet_monastery/boss_headless_horseman.cpp +++ b/scripts/eastern_kingdoms/scarlet_monastery/boss_headless_horseman.cpp @@ -16,48 +16,175 @@ /* ScriptData SDName: boss_headless_horseman -SD%Complete: 0 -SDComment: Place Holder +SD%Complete: 90 +SDComment: Intro and epilog are handled by DB. Script might require some fine-tune. SDCategory: Scarlet Monastery EndScriptData */ #include "precompiled.h" +#include "TemporarySummon.h" enum { - SAY_ENTRANCE = -1189022, - SAY_REJOINED = -1189023, - SAY_BODY_DEFEAT = -1189024, - SAY_LOST_HEAD = -1189025, - SAY_CONFLAGRATION = -1189026, - SAY_SPROUTING_PUMPKINS = -1189027, - SAY_SLAY = -1189028, - SAY_DEATH = -1189029, - - EMOTE_LAUGH = -1189030, - - SAY_PLAYER1 = -1189031, - SAY_PLAYER2 = -1189032, - SAY_PLAYER3 = -1189033, - SAY_PLAYER4 = -1189034 + // horseman yells + SAY_REJOINED = -1189023, + SAY_BODY_DEFEAT = -1189024, + SAY_LOST_HEAD = -1189025, + SAY_CONFLAGRATION = -1189026, + SAY_SPROUTING_PUMPKINS = -1189027, + SAY_SLAY = -1189028, + SAY_DEATH = -1189029, + + // event start yells - handled by dbscripts + // SAY_ENTRANCE = -1189022, + // EMOTE_LAUGH = -1189030, + // SAY_PLAYER1 = -1189031, + // SAY_PLAYER2 = -1189032, + // SAY_PLAYER3 = -1189033, + // SAY_PLAYER4 = -1189034, + + // normal phase spells + SPELL_BODY_HEAD_VISUAL = 42413, // head visual + SPELL_JACK_LANTERNED = 44185, // on killed player + SPELL_HORSEMAN_CLEAVE = 42587, + SPELL_CONFLAGRATION = 42380, // triggers 42381 + SPELL_SUMMON_PUMPKIN = 52236, // triggers 42394 + SPELL_HORSEMAN_SUMMON = 42394, // triggered spell - used to do the text + SPELL_CONFLAGRATION_SOUND = 48149, + SPELL_BODY_STAGE_1 = 42547, // phase control spells + SPELL_BODY_STAGE_2 = 42548, + SPELL_BODY_STAGE_3 = 42549, + + // headless body spells + SPELL_SEND_HEAD = 42399, // send event 15394 - toss head + SPELL_WHIRLWIND = 43116, // triggers 43118 + SPELL_BODY_REGEN_PROC = 42556, // procs 42587; also adds immunity + SPELL_BODY_REGEN = 42403, // change model to headless + SPELL_BODY_REGEN_CONFUSE = 43105, // confuse spell + + // head spells + SPELL_HEAD_VISUAL = 44241, + SPELL_HEAL_BODY = 43306, // heal body to 100% on rejoin + SPELL_REQUEST_BODY = 43101, + SPELL_HORSEMAN_HEAD_LANDS = 42400, // head land visual + // SPELL_HEAD_INVISIBLE = 44312, // purpose unk + // SPELL_HEADS_BREATH = 43207, // purpose unk + + // pumpkin spells + SPELL_PUMPKIN_LIFE_CYCLE = 42280, // visual root aura + SPELL_PUMPKIN_AURA = 42294, // visual green aura + SPELL_SPROUTING = 42281, // sprout delay + SPELL_PUMPKIN_DEATH = 42291, // visual on sprout + SPELL_SPROUT_BODY = 42285, // visual moving aura + SPELL_SQUASH_SOUL = 42514, + + // event end spells + SPELL_HEAD_IS_DEAD = 42428, // send event 15407; triggers 42566 + SPELL_BODY_DEAD = 42429, // send event 15331 + SPELL_BODY_LEAVE_COMBAT = 43805, // send event 15407; trigger spell 42556 + + // spells used for the intro or epilog (handled by DB) + // SPELL_LAUGH = 43881, // play sound 11965 + // SPELL_LAUGH_MANIACAL = 43885, // play sound 11975 + // SPELL_LAUGH_LOW = 43894, // play sound 11976 + // SPELL_RHYME_SHAKE_MEDIUM = 42909, // shake effect on event start + // SPELL_RHYME_SHAKE_SMALL = 42910, + // SPELL_WISP_ESCAPE_MISSILE = 43034, + // SPELL_WISP_FLIGHT_MISSILE = 42821, // triggers 42818 + // SPELL_WISP_INVISIBLE = 42823, + // SPELL_ON_KILL_PROC = 43877, // procs 13567 - use unk + // SPELL_ENRAGE_VISUAL = 42438, // use unk + + // creatures + NPC_HEADLESS_HORSEMAN = 23682, + NPC_HEAD_OF_HORSEMAN = 23775, + NPC_PULSING_PUMPKIN = 23694, // summoned by spell 42277 + // NPC_HORSEMAN_WISP_INV = 24034, // probably used for the epilog +}; + +enum HorsemanPhase +{ + PHASE_HORSEMAN = 1, + PHASE_CONFLAGRATION = 2, + PHASE_PUMPKINS = 3, + PHASE_HEAD_TOSS = 4, }; struct MANGOS_DLL_DECL boss_headless_horsemanAI : public ScriptedAI { - boss_headless_horsemanAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + boss_headless_horsemanAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_creature->SetWalk(false); + m_creature->SetLevitate(true); + + m_bHorsemanLanded = false; + Reset(); + } + + bool m_bHorsemanLanded; + bool m_bHeadRequested; + + HorsemanPhase m_fightPhase; + + ObjectGuid m_headGuid; + + uint32 m_uiCleaveTimer; + uint32 m_uiConflagrationTimer; + uint32 m_uiPumpkinTimer; void Reset() override { + DoCastSpellIfCan(m_creature, SPELL_BODY_STAGE_1, CAST_TRIGGERED | CAST_AURA_NOT_PRESENT); + DoCastSpellIfCan(m_creature, SPELL_BODY_HEAD_VISUAL, CAST_TRIGGERED | CAST_AURA_NOT_PRESENT); + + m_fightPhase = PHASE_HORSEMAN; + m_uiCleaveTimer = 3000; + m_uiConflagrationTimer = urand(20000, 25000); + m_uiPumpkinTimer = urand(35000, 40000); + m_bHeadRequested = false; + } + + void MoveInLineOfSight(Unit* pWho) override + { + if (m_bHorsemanLanded) + ScriptedAI::MoveInLineOfSight(pWho); + } + + void KilledUnit(Unit* pVictim) override + { + if (pVictim->GetTypeId() == TYPEID_PLAYER) + { + DoCastSpellIfCan(pVictim, SPELL_JACK_LANTERNED, CAST_TRIGGERED); + DoScriptText(SAY_SLAY, m_creature); + } + } + + void JustSummoned(Creature* pSummoned) override + { + if (pSummoned->GetEntry() == NPC_HEAD_OF_HORSEMAN) + m_headGuid = pSummoned->GetObjectGuid(); + else if (pSummoned->GetEntry() == NPC_PULSING_PUMPKIN) + { + pSummoned->CastSpell(pSummoned, SPELL_SPROUTING, false); + pSummoned->CastSpell(pSummoned, SPELL_PUMPKIN_AURA, true); + pSummoned->CastSpell(pSummoned, SPELL_PUMPKIN_LIFE_CYCLE, true); + pSummoned->AI()->AttackStart(m_creature->getVictim()); + } } - void Aggro(Unit* /*pWho*/) override + void DamageTaken(Unit* /*pDealer*/, uint32& uiDamage) override { - m_creature->SetInCombatWithZone(); + if (m_fightPhase != PHASE_HEAD_TOSS && uiDamage >= m_creature->GetHealth()) + { + uiDamage = 0; + DoTossHead(); + } } - void KilledUnit(Unit* /*pVictim*/) override + void SpellHit(Unit* /*pCaster*/, const SpellEntry* pSpell) override { - DoScriptText(SAY_SLAY, m_creature); + if (pSpell->Id == SPELL_HORSEMAN_SUMMON) + DoScriptText(SAY_SPROUTING_PUMPKINS, m_creature); } void JustDied(Unit* /*pKiller*/) override @@ -65,12 +192,153 @@ struct MANGOS_DLL_DECL boss_headless_horsemanAI : public ScriptedAI DoScriptText(SAY_DEATH, m_creature); } - void UpdateAI(const uint32 /*uiDiff*/) override + void JustReachedHome() override + { + // cleanup + m_creature->ForcedDespawn(); + } + + void MovementInform(uint32 uiType, uint32 uiPointId) override + { + // allow attacking + if (uiType == WAYPOINT_MOTION_TYPE && uiPointId == 15) + { + m_bHorsemanLanded = true; + m_creature->SetLevitate(false); + } + } + + void ReceiveAIEvent(AIEventType eventType, Creature* /*pSender*/, Unit* pInvoker, uint32 /*uiMiscValue*/) override + { + // rejoin head on request + if (eventType == AI_EVENT_CUSTOM_A && pInvoker->GetEntry() == NPC_HEAD_OF_HORSEMAN) + { + DoRejoinHead(); + pInvoker->CastSpell(m_creature, SPELL_SEND_HEAD, true); + } + } + + // function to handle toss head phase + void DoTossHead() + { + // in the first transition; spawn the head + if (m_creature->HasAura(SPELL_BODY_STAGE_1)) + { + float fX, fY, fZ; + m_creature->GetRandomPoint(m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), 15.0f, fX, fY, fZ); + m_creature->SummonCreature(NPC_HEAD_OF_HORSEMAN, fX, fY, fZ, 0, TEMPSUMMON_DEAD_DESPAWN, 0); + } + + // make head available + if (Creature* pHead = m_creature->GetMap()->GetCreature(m_headGuid)) + DoCastSpellIfCan(pHead, SPELL_SEND_HEAD, CAST_TRIGGERED); + + // only from second transition we start whirlwind + if (m_creature->HasAura(SPELL_BODY_STAGE_2) || m_creature->HasAura(SPELL_BODY_STAGE_3)) + DoCastSpellIfCan(m_creature, SPELL_WHIRLWIND, CAST_TRIGGERED); + + // remove head visual and set transition phase auras + m_creature->RemoveAurasDueToSpell(SPELL_HEAD_VISUAL); + DoCastSpellIfCan(m_creature, SPELL_BODY_REGEN_PROC, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_BODY_REGEN, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_BODY_REGEN_CONFUSE, CAST_TRIGGERED); + + m_fightPhase = PHASE_HEAD_TOSS; + m_bHeadRequested = false; + } + + // function to handle the head rejoin + void DoRejoinHead() + { + // remove transition auras and set the head visual + m_creature->RemoveAurasDueToSpell(SPELL_BODY_REGEN_CONFUSE); + m_creature->RemoveAurasDueToSpell(SPELL_BODY_REGEN); + m_creature->RemoveAurasDueToSpell(SPELL_BODY_REGEN_PROC); + m_creature->RemoveAurasDueToSpell(SPELL_WHIRLWIND); + + DoScriptText(SAY_REJOINED, m_creature); + DoCastSpellIfCan(m_creature, SPELL_BODY_HEAD_VISUAL, CAST_TRIGGERED | CAST_AURA_NOT_PRESENT); + + // switch from phase 1 to phase 2 + if (m_creature->HasAura(SPELL_BODY_STAGE_1)) + { + m_fightPhase = PHASE_CONFLAGRATION; + m_creature->RemoveAurasDueToSpell(SPELL_BODY_STAGE_1); + DoCastSpellIfCan(m_creature, SPELL_BODY_STAGE_2, CAST_TRIGGERED | CAST_AURA_NOT_PRESENT); + } + // switch from phase 2 to phase 3 or repeat phase 3 + else if (m_creature->HasAura(SPELL_BODY_STAGE_2) || m_creature->HasAura(SPELL_BODY_STAGE_3)) + { + m_fightPhase = PHASE_PUMPKINS; + m_creature->RemoveAurasDueToSpell(SPELL_BODY_STAGE_2); + DoCastSpellIfCan(m_creature, SPELL_BODY_STAGE_3, CAST_TRIGGERED | CAST_AURA_NOT_PRESENT); + DoCastSpellIfCan(m_creature, SPELL_SUMMON_PUMPKIN, CAST_TRIGGERED); + } + } + + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - DoMeleeAttackIfReady(); + switch (m_fightPhase) + { + case PHASE_PUMPKINS: + + if (m_uiPumpkinTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_SUMMON_PUMPKIN) == CAST_OK) + m_uiPumpkinTimer = urand(35000, 40000); + } + else + m_uiPumpkinTimer -= uiDiff; + + // no break; + case PHASE_CONFLAGRATION: + + // conflagration not happening during pumpkin phase + if (m_fightPhase != PHASE_PUMPKINS) + { + if (m_uiConflagrationTimer < uiDiff) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1)) + { + if (DoCastSpellIfCan(pTarget, SPELL_CONFLAGRATION) == CAST_OK) + { + DoScriptText(SAY_CONFLAGRATION, m_creature); + m_uiConflagrationTimer = urand(15000, 20000); + } + } + } + else + m_uiConflagrationTimer -= uiDiff; + } + + // no break; + case PHASE_HORSEMAN: + + // cleave - all phases + if (m_uiCleaveTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_HORSEMAN_CLEAVE) == CAST_OK) + m_uiCleaveTimer = 5000; + } + else + m_uiCleaveTimer -= uiDiff; + + DoMeleeAttackIfReady(); + break; + case PHASE_HEAD_TOSS: + // rejoin head by force at 100% hp + if (!m_bHeadRequested && m_creature->GetHealthPercent() == 100.0f) + { + if (Creature* pHead = m_creature->GetMap()->GetCreature(m_headGuid)) + SendAIEvent(AI_EVENT_CUSTOM_B, m_creature, pHead); + + m_bHeadRequested = true; + } + break; + } } }; @@ -79,6 +347,125 @@ CreatureAI* GetAI_boss_headless_horseman(Creature* pCreature) return new boss_headless_horsemanAI(pCreature); } +bool EffectScriptEffectCreature_boss_headless_horseman(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget, ObjectGuid /*originalCasterGuid*/) +{ + if (uiSpellId == SPELL_REQUEST_BODY && uiEffIndex == EFFECT_INDEX_0) + { + if (pCreatureTarget->GetEntry() == NPC_HEADLESS_HORSEMAN) + pCreatureTarget->AI()->SendAIEvent(AI_EVENT_CUSTOM_A, pCaster, pCreatureTarget); + + return true; + } + + return false; +} + +struct MANGOS_DLL_DECL boss_head_of_horsemanAI : public ScriptedAI +{ + boss_head_of_horsemanAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_uiHeadPhase = 1; + Reset(); + } + + uint8 m_uiHeadPhase; + + void Reset() override { } + + void AttackStart(Unit* /*pWho*/) override { } + void MoveInLineOfSight(Unit* /*pWho*/) override { } + + void JustDied(Unit* /*pKiller*/) override + { + DoCastSpellIfCan(m_creature, SPELL_HEAD_IS_DEAD, CAST_TRIGGERED); + + // end the event + if (m_creature->IsTemporarySummon()) + { + TemporarySummon* pTemporary = (TemporarySummon*)m_creature; + + if (Unit* pHorseman = m_creature->GetMap()->GetUnit(pTemporary->GetSummonerGuid())) + { + pHorseman->CastSpell(pHorseman, SPELL_BODY_LEAVE_COMBAT, true); + pHorseman->CastSpell(pHorseman, SPELL_BODY_DEAD, true); + } + } + } + + void DamageTaken(Unit* /*pDealer*/, uint32& /*uiDamage*/) override + { + // allow him to die the last phase + if (m_uiHeadPhase >= 3) + return; + + // rejoin and switch to next phase + if (m_creature->GetHealthPercent() < float(100 - m_uiHeadPhase * 33.3f)) + { + DoRejoinHead(false); + ++m_uiHeadPhase; + } + } + + void ReceiveAIEvent(AIEventType eventType, Creature* /*pSender*/, Unit* pInvoker, uint32 /*uiMiscValue*/) override + { + if (pInvoker->GetEntry() != NPC_HEADLESS_HORSEMAN) + return; + + // toss head + if (eventType == AI_EVENT_CUSTOM_A) + { + // make visible + DoScriptText(SAY_LOST_HEAD, m_creature); + DoCastSpellIfCan(m_creature, SPELL_HORSEMAN_HEAD_LANDS, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_HEAD_VISUAL, CAST_TRIGGERED); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + + // run around the graveyard + m_creature->SetWalk(false); + m_creature->GetMotionMaster()->MoveRandomAroundPoint(pInvoker->GetPositionX(), pInvoker->GetPositionY(), pInvoker->GetPositionZ(), 40.0f); + } + // rejoin head by force - body healed + else if (eventType == AI_EVENT_CUSTOM_B) + DoRejoinHead(true); + } + + // rejoin the head with the body + void DoRejoinHead(bool bForced) + { + // script targets on body + m_creature->RemoveAllAurasOnEvade(); + m_creature->GetMotionMaster()->Clear(); + m_creature->GetMotionMaster()->MoveIdle(); + + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + DoCastSpellIfCan(m_creature, SPELL_REQUEST_BODY, CAST_TRIGGERED); + + // heal body only if head is not requested by force (Horseman healed) + if (!bForced) + DoCastSpellIfCan(m_creature, SPELL_HEAL_BODY, CAST_TRIGGERED); + } + + void UpdateAI(const uint32 uiDiff) override { } +}; + +CreatureAI* GetAI_boss_head_of_horseman(Creature* pCreature) +{ + return new boss_head_of_horsemanAI(pCreature); +} + +bool EffectScriptEffectCreature_boss_head_of_horseman(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget, ObjectGuid /*originalCasterGuid*/) +{ + if (uiSpellId == SPELL_SEND_HEAD && uiEffIndex == EFFECT_INDEX_0) + { + if (pCreatureTarget->GetEntry() == NPC_HEAD_OF_HORSEMAN) + pCreatureTarget->AI()->SendAIEvent(AI_EVENT_CUSTOM_A, pCaster, pCreatureTarget); + + return true; + } + + return false; +} + void AddSC_boss_headless_horseman() { Script* pNewScript; @@ -86,5 +473,12 @@ void AddSC_boss_headless_horseman() pNewScript = new Script; pNewScript->Name = "boss_headless_horseman"; pNewScript->GetAI = GetAI_boss_headless_horseman; + pNewScript->pEffectScriptEffectNPC = &EffectScriptEffectCreature_boss_headless_horseman; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "boss_head_of_horseman"; + pNewScript->GetAI = GetAI_boss_head_of_horseman; + pNewScript->pEffectScriptEffectNPC = &EffectScriptEffectCreature_boss_head_of_horseman; pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 845661152..c6060197d 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3016" + #define SD2_REVISION_NR "3017" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index a89a2ce55..dea984f75 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -1015,6 +1015,7 @@ UPDATE creature_template SET ScriptName='boss_high_inquisitor_whitemane' WHERE e UPDATE creature_template SET ScriptName='boss_scarlet_commander_mograine' WHERE entry=3976; UPDATE creature_template SET ScriptName='mob_scarlet_trainee' WHERE entry=6575; UPDATE creature_template SET ScriptName='boss_headless_horseman' WHERE entry=23682; +UPDATE creature_template SET ScriptName='boss_head_of_horseman' WHERE entry=23775; /* SCHOLOMANCE */ UPDATE instance_template SET ScriptName='instance_scholomance' WHERE map=289; diff --git a/sql/updates/r3017_mangos.sql b/sql/updates/r3017_mangos.sql new file mode 100644 index 000000000..f778d76cc --- /dev/null +++ b/sql/updates/r3017_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='boss_head_of_horseman' WHERE entry=23775; From 1ff9aea8211448ea6593e7d3bc25f0b567577bdd Mon Sep 17 00:00:00 2001 From: Xfurry Date: Mon, 23 Jun 2014 21:59:26 +0200 Subject: [PATCH 1029/1172] [3018] Implement NpcSpellClick script hook. Requires CMaNGOS 12674+ --- ScriptMgr.cpp | 11 +++++++++++ ScriptMgr.h | 3 ++- sd2_revision_nr.h | 2 +- sql/scriptdev2_script_full.sql | 2 +- sql/updates/r3018_scriptdev2.sql | 1 + 5 files changed, 16 insertions(+), 3 deletions(-) create mode 100644 sql/updates/r3018_scriptdev2.sql diff --git a/ScriptMgr.cpp b/ScriptMgr.cpp index b635596a5..8394822ae 100644 --- a/ScriptMgr.cpp +++ b/ScriptMgr.cpp @@ -446,6 +446,17 @@ bool AreaTrigger(Player* pPlayer, AreaTriggerEntry const* atEntry) return pTempScript->pAreaTrigger(pPlayer, atEntry); } +MANGOS_DLL_EXPORT +bool NpcSpellClick(Player* pPlayer, Creature* pClickedCreature, uint32 uiSpellId) +{ + Script* pTempScript = m_scripts[pClickedCreature->GetScriptId()]; + + if (!pTempScript || !pTempScript->pNpcSpellClick) + return false; + + return pTempScript->pNpcSpellClick(pPlayer, pClickedCreature, uiSpellId); +} + MANGOS_DLL_EXPORT bool ProcessEvent(uint32 uiEventId, Object* pSource, Object* pTarget, bool bIsStart) { diff --git a/ScriptMgr.h b/ScriptMgr.h index 2aefb623f..961958299 100644 --- a/ScriptMgr.h +++ b/ScriptMgr.h @@ -67,7 +67,7 @@ struct Script pDialogStatusNPC(NULL), pDialogStatusGO(NULL), pQuestAcceptNPC(NULL), pQuestAcceptGO(NULL), pQuestAcceptItem(NULL), pQuestRewardedNPC(NULL), pQuestRewardedGO(NULL), - pGOUse(NULL), pItemUse(NULL), pAreaTrigger(NULL), pProcessEventId(NULL), + pGOUse(NULL), pItemUse(NULL), pAreaTrigger(NULL), pNpcSpellClick(NULL), pProcessEventId(NULL), pEffectDummyNPC(NULL), pEffectDummyGO(NULL), pEffectDummyItem(NULL), pEffectScriptEffectNPC(NULL), pEffectAuraDummy(NULL), GetAI(NULL), GetInstanceData(NULL) {} @@ -90,6 +90,7 @@ struct Script bool (*pGOUse)(Player*, GameObject*); bool (*pItemUse)(Player*, Item*, SpellCastTargets const&); bool (*pAreaTrigger)(Player*, AreaTriggerEntry const*); + bool (*pNpcSpellClick)(Player*, Creature*, uint32); bool (*pProcessEventId)(uint32, Object*, Object*, bool); bool (*pEffectDummyNPC)(Unit*, uint32, SpellEffectIndex, Creature*, ObjectGuid); bool (*pEffectDummyGO)(Unit*, uint32, SpellEffectIndex, GameObject*, ObjectGuid); diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index c6060197d..f6ec1094b 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3017" + #define SD2_REVISION_NR "3018" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index f00f98751..dbc59d5c7 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -3,7 +3,7 @@ -- DELETE FROM sd2_db_version; -INSERT INTO sd2_db_version (version) VALUES ('ScriptDev2 (for CMaNGOS 12661+) '); +INSERT INTO sd2_db_version (version) VALUES ('ScriptDev2 (for CMaNGOS 12674+) '); -- -- Below contains data for table `script_texts` mainly used in C++ parts. diff --git a/sql/updates/r3018_scriptdev2.sql b/sql/updates/r3018_scriptdev2.sql new file mode 100644 index 000000000..ea50fe55c --- /dev/null +++ b/sql/updates/r3018_scriptdev2.sql @@ -0,0 +1 @@ +UPDATE sd2_db_version SET version='ScriptDev2 (for CMaNGOS 12674+) '; From 595212c3d603221805851bb496b2dac6d52bc371 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Mon, 23 Jun 2014 22:01:46 +0200 Subject: [PATCH 1030/1172] [3019] Implement script support for quests 11476 and 12075 Close #110 --- scripts/northrend/dragonblight.cpp | 36 ++++++++++++++++++++++++++++- scripts/northrend/howling_fjord.cpp | 36 ++++++++++++++++++++++++++++- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 2 ++ sql/updates/r3019_mangos.sql | 2 ++ 5 files changed, 75 insertions(+), 3 deletions(-) create mode 100644 sql/updates/r3019_mangos.sql diff --git a/scripts/northrend/dragonblight.cpp b/scripts/northrend/dragonblight.cpp index 6b999d09e..2c3ce1f50 100644 --- a/scripts/northrend/dragonblight.cpp +++ b/scripts/northrend/dragonblight.cpp @@ -17,12 +17,13 @@ /* ScriptData SDName: Dragonblight SD%Complete: 100 -SDComment: Quest support: 12166, 12261. +SDComment: Quest support: 12075, 12166, 12261. SDCategory: Dragonblight EndScriptData */ /* ContentData npc_destructive_ward +npc_crystalline_ice_giant EndContentData */ #include "precompiled.h" @@ -164,6 +165,34 @@ CreatureAI* GetAI_npc_destructive_ward(Creature* pCreature) return new npc_destructive_wardAI(pCreature); } +/*###### +## npc_crystalline_ice_giant +######*/ + +enum +{ + SPELL_FEIGN_DEATH_PERMANENT = 31261, + ITEM_ID_SAMPLE_ROCKFLESH = 36765, + NPC_CRYSTALLINE_GIANT = 26809, +}; + +bool NpcSpellClick_npc_crystalline_ice_giant(Player* pPlayer, Creature* pClickedCreature, uint32 /*uiSpellId*/) +{ + if (pClickedCreature->GetEntry() == NPC_CRYSTALLINE_GIANT && pClickedCreature->HasAura(SPELL_FEIGN_DEATH_PERMANENT)) + { + if (Item* pItem = pPlayer->StoreNewItemInInventorySlot(ITEM_ID_SAMPLE_ROCKFLESH, 1)) + { + pPlayer->SendNewItem(pItem, 1, true, false); + pClickedCreature->ForcedDespawn(); + + // always return true when handled special npc spell click + return true; + } + } + + return true; +} + void AddSC_dragonblight() { Script* pNewScript; @@ -172,4 +201,9 @@ void AddSC_dragonblight() pNewScript->Name = "npc_destructive_ward"; pNewScript->GetAI = &GetAI_npc_destructive_ward; pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_crystalline_ice_giant"; + pNewScript->pNpcSpellClick = &NpcSpellClick_npc_crystalline_ice_giant; + pNewScript->RegisterSelf(); } diff --git a/scripts/northrend/howling_fjord.cpp b/scripts/northrend/howling_fjord.cpp index 9a9ba3ece..86e97ce21 100644 --- a/scripts/northrend/howling_fjord.cpp +++ b/scripts/northrend/howling_fjord.cpp @@ -17,7 +17,7 @@ /* ScriptData SDName: Howling_Fjord SD%Complete: ? -SDComment: Quest support: 11154, 11241, 11300, 11343, 11344, 11464. +SDComment: Quest support: 11154, 11241, 11300, 11343, 11344, 11464, 11476. SDCategory: Howling Fjord EndScriptData */ @@ -30,6 +30,7 @@ npc_lich_king_village npc_king_ymiron npc_firecrackers_bunny npc_apothecary_hanes +npc_scalawag_frog EndContentData */ #include "precompiled.h" @@ -975,6 +976,34 @@ bool QuestAccept_npc_apothecary_hanes(Player* pPlayer, Creature* pCreature, cons return false; } +/*###### +## npc_scalawag_frog +######*/ + +enum +{ + ITEM_ID_SCALAWAG_FROG = 35803, + ITEM_ID_SHINY_KNIFE = 35813, + NPC_SCALAWAG_FROG = 26503, +}; + +bool NpcSpellClick_npc_scalawag_frog(Player* pPlayer, Creature* pClickedCreature, uint32 /*uiSpellId*/) +{ + if (pClickedCreature->GetEntry() == NPC_SCALAWAG_FROG && pPlayer->HasItemCount(ITEM_ID_SHINY_KNIFE, 1)) + { + if (Item* pItem = pPlayer->StoreNewItemInInventorySlot(ITEM_ID_SCALAWAG_FROG, 1)) + { + pPlayer->SendNewItem(pItem, 1, true, false); + pClickedCreature->ForcedDespawn(); + + // always return true when handled special npc spell click + return true; + } + } + + return true; +} + void AddSC_howling_fjord() { Script* pNewScript; @@ -1027,4 +1056,9 @@ void AddSC_howling_fjord() pNewScript->GetAI = &GetAI_npc_apothecary_hanes; pNewScript->pQuestAcceptNPC = &QuestAccept_npc_apothecary_hanes; pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_scalawag_frog"; + pNewScript->pNpcSpellClick = &NpcSpellClick_npc_scalawag_frog; + pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index f6ec1094b..74995257e 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3018" + #define SD2_REVISION_NR "3019" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index dea984f75..4aa6d3e28 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -525,6 +525,7 @@ UPDATE instance_template SET ScriptName='instance_dire_maul' WHERE map=429; /* DRAGONBLIGHT */ UPDATE creature_template SET ScriptName='npc_destructive_ward' WHERE entry=27430; +UPDATE creature_template SET ScriptName='npc_crystalline_ice_giant' WHERE entry=26809; /* DRAK'THARON KEEP */ UPDATE creature_template SET ScriptName='boss_novos' WHERE entry=26631; @@ -694,6 +695,7 @@ UPDATE creature_template SET ScriptName='npc_lich_king_village' WHERE entry=2424 UPDATE creature_template SET ScriptName='npc_king_ymiron' WHERE entry=24321; UPDATE creature_template SET ScriptName='npc_firecrackers_bunny' WHERE entry=24230; UPDATE creature_template SET ScriptName='npc_apothecary_hanes' WHERE entry=23784; +UPDATE creature_template SET ScriptName='npc_scalawag_frog' WHERE entry=26503; /* */ /* ICECROWN CITADEL */ diff --git a/sql/updates/r3019_mangos.sql b/sql/updates/r3019_mangos.sql new file mode 100644 index 000000000..f83fd315d --- /dev/null +++ b/sql/updates/r3019_mangos.sql @@ -0,0 +1,2 @@ +UPDATE creature_template SET ScriptName='npc_scalawag_frog' WHERE entry=26503; +UPDATE creature_template SET ScriptName='npc_crystalline_ice_giant' WHERE entry=26809; From d641957525e44e97996d14b774b6ef03930ad8f7 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Mon, 23 Jun 2014 22:10:24 +0200 Subject: [PATCH 1031/1172] [3020] Fix typo Close #109 --- scripts/northrend/ulduar/ulduar/instance_ulduar.cpp | 8 ++++---- scripts/northrend/ulduar/ulduar/ulduar.h | 2 +- sd2_revision_nr.h | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp index 838015e62..f289fa75b 100644 --- a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp +++ b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp @@ -343,7 +343,7 @@ void instance_ulduar::OnObjectCreate(GameObject* pGo) case GO_HODIR_ENTER: break; // Mimiron - case G0_MIMIRON_BUTTON: + case GO_MIMIRON_BUTTON: case GO_MIMIRON_DOOR_1: case GO_MIMIRON_DOOR_2: case GO_MIMIRON_DOOR_3: @@ -607,13 +607,13 @@ void instance_ulduar::SetData(uint32 uiType, uint32 uiData) DoOpenMadnessDoorIfCan(); } else if (uiData == IN_PROGRESS) - DoToggleGameObjectFlags(G0_MIMIRON_BUTTON, GO_FLAG_NO_INTERACT, true); + DoToggleGameObjectFlags(GO_MIMIRON_BUTTON, GO_FLAG_NO_INTERACT, true); else if (uiData == FAIL) { // reset objects - DoToggleGameObjectFlags(G0_MIMIRON_BUTTON, GO_FLAG_NO_INTERACT, false); + DoToggleGameObjectFlags(GO_MIMIRON_BUTTON, GO_FLAG_NO_INTERACT, false); - if (GameObject* pButton = GetSingleGameObjectFromStorage(G0_MIMIRON_BUTTON)) + if (GameObject* pButton = GetSingleGameObjectFromStorage(GO_MIMIRON_BUTTON)) pButton->ResetDoorOrButton(); if (GameObject* pElevator = GetSingleGameObjectFromStorage(GO_MIMIRON_ELEVATOR)) pElevator->SetGoState(GO_STATE_ACTIVE); diff --git a/scripts/northrend/ulduar/ulduar/ulduar.h b/scripts/northrend/ulduar/ulduar/ulduar.h index d50e54191..831d5c0f7 100644 --- a/scripts/northrend/ulduar/ulduar/ulduar.h +++ b/scripts/northrend/ulduar/ulduar/ulduar.h @@ -277,7 +277,7 @@ enum GO_HODIR_ICE_WALL = 194441, GO_HODIR_ENTER = 194442, // Mimiron - G0_MIMIRON_BUTTON = 194739, // Used to start hard mode + GO_MIMIRON_BUTTON = 194739, // Used to start hard mode GO_MIMIRON_DOOR_1 = 194774, GO_MIMIRON_DOOR_2 = 194775, GO_MIMIRON_DOOR_3 = 194776, diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 74995257e..f2bf1412a 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3019" + #define SD2_REVISION_NR "3020" #endif // __SD2_REVISION_NR_H__ From acb41a0302b980e49ae3e1c627f50e34ff4e4dd3 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Mon, 23 Jun 2014 23:41:07 +0200 Subject: [PATCH 1032/1172] [3021] Fix script for quests 1222 and 1270 Thanks to @grz3s for providing the proper data Close #86 --- scripts/kalimdor/dustwallow_marsh.cpp | 64 ++++++++++++++------ sd2_revision_nr.h | 2 +- sql/scriptdev2_script_full.sql | 86 +++++++++++++++++---------- sql/updates/r3021_scriptdev2.sql | 60 +++++++++++++++++++ 4 files changed, 161 insertions(+), 51 deletions(-) create mode 100644 sql/updates/r3021_scriptdev2.sql diff --git a/scripts/kalimdor/dustwallow_marsh.cpp b/scripts/kalimdor/dustwallow_marsh.cpp index 3bb6b0c79..443868daa 100644 --- a/scripts/kalimdor/dustwallow_marsh.cpp +++ b/scripts/kalimdor/dustwallow_marsh.cpp @@ -670,7 +670,7 @@ CreatureAI* GetAI_npc_private_hendel(Creature* pCreature) /*##### ## npc_stinky_ignatz -## TODO Note: Possible some dynamic behaviour is missing. Faction change is guessed +## TODO Note: Faction change is guessed #####*/ enum @@ -680,24 +680,39 @@ enum SAY_STINKY_BEGIN = -1000958, SAY_STINKY_FIRST_STOP = -1000959, - SAY_STINKY_2_MONSTERS = -1000960, - SAY_STINKY_GATHERING = -1000961, + SAY_STINKY_SECOND_STOP = -1001141, + SAY_STINKY_THIRD_STOP_1 = -1001142, + SAY_STINKY_THIRD_STOP_2 = -1001143, + SAY_STINKY_THIRD_STOP_3 = -1001144, + SAY_STINKY_PLANT_GATHERED = -1001145, SAY_STINKY_END = -1000962, + SAY_STINKY_AGGRO_1 = -1000960, + SAY_STINKY_AGGRO_2 = -1000961, + SAY_STINKY_AGGRO_3 = -1001146, + SAY_STINKY_AGGRO_4 = -1001147, GO_BOGBEAN_PLANT = 20939, }; struct MANGOS_DLL_DECL npc_stinky_ignatzAI : public npc_escortAI { - npc_stinky_ignatzAI(Creature* pCreature) : npc_escortAI(pCreature) - { - Reset(); - } + npc_stinky_ignatzAI(Creature* pCreature) : npc_escortAI(pCreature) { Reset(); } ObjectGuid m_bogbeanPlantGuid; void Reset() override {} + void Aggro(Unit* pWho) override + { + switch (urand(0, 3)) + { + case 0: DoScriptText(SAY_STINKY_AGGRO_1, m_creature); break; + case 1: DoScriptText(SAY_STINKY_AGGRO_2, m_creature); break; + case 2: DoScriptText(SAY_STINKY_AGGRO_3, m_creature); break; + case 3: DoScriptText(SAY_STINKY_AGGRO_4, m_creature, pWho); break; + } + } + void ReceiveAIEvent(AIEventType eventType, Creature* /*pSender*/, Unit* pInvoker, uint32 uiMiscValue) override { if (eventType == AI_EVENT_START_ESCORT && pInvoker->GetTypeId() == TYPEID_PLAYER) @@ -713,35 +728,46 @@ struct MANGOS_DLL_DECL npc_stinky_ignatzAI : public npc_escortAI { switch (uiPointId) { - case 11: + case 5: DoScriptText(SAY_STINKY_FIRST_STOP, m_creature); break; - case 17: - // TODO Note: This text would imply some waiting till two mobs are killed, such behaviour is neither confirmed nor implemented. Input welcome! - DoScriptText(SAY_STINKY_2_MONSTERS, m_creature); - + case 10: + DoScriptText(SAY_STINKY_SECOND_STOP, m_creature); + break; + case 24: + DoScriptText(SAY_STINKY_THIRD_STOP_1, m_creature); + break; + case 25: + DoScriptText(SAY_STINKY_THIRD_STOP_2, m_creature); if (GameObject* pBogbeanPlant = GetClosestGameObjectWithEntry(m_creature, GO_BOGBEAN_PLANT, DEFAULT_VISIBILITY_DISTANCE)) { m_bogbeanPlantGuid = pBogbeanPlant->GetObjectGuid(); m_creature->SetFacingToObject(pBogbeanPlant); } - break; - case 19: - DoScriptText(SAY_STINKY_GATHERING, m_creature); + case 26: + if (Player* pPlayer = GetPlayerForEscort()) + DoScriptText(SAY_STINKY_THIRD_STOP_3, m_creature, pPlayer); break; - case 24: + case 29: + m_creature->HandleEmote(EMOTE_STATE_USESTANDING); + break; + case 30: + DoScriptText(SAY_STINKY_PLANT_GATHERED, m_creature); + break; + case 39: if (Player* pPlayer = GetPlayerForEscort()) + { pPlayer->GroupEventHappens(pPlayer->GetTeam() == ALLIANCE ? QUEST_ID_STINKYS_ESCAPE_ALLIANCE : QUEST_ID_STINKYS_ESCAPE_HORDE, m_creature); - - DoScriptText(SAY_STINKY_END, m_creature); + DoScriptText(SAY_STINKY_END, m_creature, pPlayer); + } break; } } void WaypointStart(uint32 uiPointId) { - if (uiPointId == 20) + if (uiPointId == 30) { if (GameObject* pBogbeanPlant = m_creature->GetMap()->GetGameObject(m_bogbeanPlantGuid)) pBogbeanPlant->Use(m_creature); diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index f2bf1412a..822edff4a 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3020" + #define SD2_REVISION_NR "3021" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index dbc59d5c7..e55b7fd5b 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -1033,11 +1033,11 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1000956,'We made it! Quae, we made it!',0,0,0,0,'kinelory SAY_FINISH'), (-1000957,'%s hands her pack to Quae.',0,2,0,0,'kinelory EMOTE_HAND_PACK'), -(-1000958,'You must protect me from monsters, who are living in this forest!',0,0,0,0,'stinky ignatz SAY_STINKY_BEGIN'), -(-1000959,'This part of forest are very danger for us. We must be a careful!',0,0,0,0,'stinky ignatz SAY_STINKY_FIRST_STOP'), -(-1000960,'Kill two monsters, who stay near Bogbean plant and then I gather a bogbean.',0,0,0,0,'stinky ignatz SAY_STINKY_2_MONSTERS'), -(-1000961,'I am gathering a bogbean. It takes some time.',0,0,0,69,'stinky ignatz SAY_STINKY_GATHERING'), -(-1000962,'Thanks you for help.',0,0,0,0,'stinky ignatz SAY_STINKY_END'), +(-1000958,'Ok, let\'s get started.',0,0,0,0,'stinky ignatz SAY_STINKY_BEGIN'), +(-1000959,'Now let\'s look for the herb.',0,0,0,0,'stinky ignatz SAY_STINKY_FIRST_STOP'), +(-1000960,'Help! The beast is on me!',0,0,0,0,'stinky ignatz SAY_AGGRO_1'), +(-1000961,'Help! I\'m under attack!',0,0,0,0,'stinky ignatz SAY_AGGRO_2'), +(-1000962,'I can make it from here. Thanks, $N! And talk to my employer about a reward!',0,0,0,0,'stinky ignatz SAY_STINKY_END'), (-1000963,'%s looks at you for a moment, then motions for you to follow.',0,2,0,0,'cenarion sparrowhawk EMOTE_FOLLOW'), (-1000964,'%s surveys the ground for the buried raven stones.',0,2,0,0,'cenarion sparrowhawk EMOTE_SURVEY'), @@ -1235,7 +1235,15 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1001137,'The duel will begin in...',0,5,0,0,'death knight initiate EMOTE_DUEL_BEGIN'), (-1001138,'3...',0,5,0,0,'death knight initiate EMOTE_DUEL_BEGIN_3'), (-1001139,'2...',0,5,0,0,'death knight initiate EMOTE_DUEL_BEGIN_2'), -(-1001140,'1...',0,5,0,0,'death knight initiate EMOTE_DUEL_BEGIN_1'); +(-1001140,'1...',0,5,0,0,'death knight initiate EMOTE_DUEL_BEGIN_1'), + +(-1001141,'Nope, not here...',0,0,0,0,'stinky ignatz SAY_SECOND_STOP'), +(-1001142,'There must be one around here somewhere...',0,0,0,0,'stinky ignatz SAY_THIRD_STOP_1'), +(-1001143,'Ah, there\'s one!',0,0,0,0,'stinky ignatz SAY_THIRD_STOP_2'), +(-1001144,'Come, $N! Let\'s go over there and collect it!',0,0,0,0,'stinky ignatz SAY_THIRD_STOP_3'), +(-1001145,'Ok, let\'s get out of here!',0,0,0,0,'stinky ignatz SAY_PLANT_GATHERED'), +(-1001146,'I\'m glad you\'re here! Because I need your help!!',0,0,0,0,'stinky ignatz SAY_AGGRO_3'), +(-1001147,'Look out! The $N attacks!',0,0,0,0,'stinky ignatz SAY_AGGRO_4'); -- -1 033 000 SHADOWFANG KEEP INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES @@ -7700,31 +7708,47 @@ INSERT INTO script_waypoint VALUES DELETE FROM script_waypoint WHERE entry=4880; INSERT INTO script_waypoint VALUES -(4880, 0, -2674.53, -3440.48, 33.686, 0, ''), -(4880, 1, -2711.17, -3435.06, 33.1926, 0, ''), -(4880, 2, -2734.04, -3456.12, 33.2254, 0, ''), -(4880, 3, -2749.64, -3457.26, 32.8249, 0, ''), -(4880, 4, -2762.25, -3457.77, 30.6813, 0, ''), -(4880, 5, -2777.0, -3456.12, 30.2484, 0, ''), -(4880, 6, -2805.49, -3450.27, 29.0624, 0, ''), -(4880, 7, -2809.77, -3447.14, 30.0948, 0, ''), -(4880, 8, -2824, -3440.62, 33.405, 0, ''), -(4880, 9, -2840.2, -3439.02, 34.1008, 0, ''), -(4880, 10, -2878.49, -3482.81, 34.362, 0, ''), -(4880, 11, -2878.35, -3511.51, 34.4826, 0, 'SAY_STINKY_FIRST_STOP'), -(4880, 12, -2873.99, -3514.84, 34.5298, 0, ''), -(4880, 13, -2866.71, -3519.06, 36.3674, 0, ''), -(4880, 14, -2850.75, -3539.38, 36.4573, 0, ''), -(4880, 15, -2844.49, -3557.7, 35.5588, 0, ''), -(4880, 16, -2841.36, -3574.59, 35.5056, 0, ''), -(4880, 17, -2841.13, -3596.95, 36.7699, 30000, 'SAY_STINKY_2_MONSTERS'), -(4880, 18, -2828.83, -3597.3, 31.2891, 0, ''), -(4880, 19, -2822.13, -3596.33, 31.2684, 5000, 'SAY_STINKY_GATHERING'), -(4880, 20, -2829.08, -3597.82, 31.307, 0, ''), -(4880, 21, -2859.28, -3602.33, 42.298, 0, ''), -(4880, 22, -2881.64, -3601.28, 42.2111, 0, ''), -(4880, 23, -2904.04, -3601.35, 34.969, 0, ''), -(4880, 24, -2907.6, -3612.73, 34.2434, 10000, 'SAY_STINKY_END'); +(4880, 0, -2670.221, -3446.189, 34.085, 0, ''), +(4880, 1, -2683.958, -3451.094, 34.707, 0, ''), +(4880, 2, -2703.241, -3454.822, 33.395, 0, ''), +(4880, 3, -2721.615, -3457.408, 33.626, 0, ''), +(4880, 4, -2739.977, -3459.843, 33.329, 0, ''), +(4880, 5, -2756.240, -3460.516, 32.037, 5000, 'SAY_STINKY_FIRST_STOP'), +(4880, 6, -2764.517, -3472.714, 33.750, 0, ''), +(4880, 7, -2773.679, -3482.913, 32.840, 0, ''), +(4880, 8, -2781.394, -3490.613, 32.598, 0, ''), +(4880, 9, -2788.308, -3492.904, 30.761, 0, ''), +(4880, 10, -2794.578, -3489.185, 31.119, 5000, 'SAY_SECOND_STOP'), +(4880, 11, -2789.427, -3498.043, 31.050, 0, ''), +(4880, 12, -2786.968, -3508.168, 31.983, 0, ''), +(4880, 13, -2786.770, -3519.953, 31.079, 0, ''), +(4880, 14, -2789.359, -3525.025, 31.831, 0, ''), +(4880, 15, -2797.950, -3523.693, 31.697, 0, ''), +(4880, 16, -2812.971, -3519.838, 29.864, 0, ''), +(4880, 17, -2818.331, -3521.396, 30.563, 0, ''), +(4880, 18, -2824.771, -3528.728, 32.399, 0, ''), +(4880, 19, -2830.697, -3539.875, 32.505, 0, ''), +(4880, 20, -2836.235, -3549.962, 31.180, 0, ''), +(4880, 21, -2837.576, -3561.052, 30.740, 0, ''), +(4880, 22, -2834.445, -3568.264, 30.751, 0, ''), +(4880, 23, -2827.351, -3569.807, 31.316, 0, ''), +(4880, 24, -2817.380, -3566.961, 30.947, 5000, 'SAY_THIRD_STOP_1'), +(4880, 25, -2817.380, -3566.961, 30.947, 2000, 'SAY_THIRD_STOP_2'), +(4880, 26, -2817.380, -3566.961, 30.947, 0, 'SAY_THIRD_STOP_3'), +(4880, 27, -2818.815, -3579.415, 28.525, 0, ''), +(4880, 28, -2820.205, -3590.640, 30.269, 0, ''), +(4880, 29, -2820.849, -3593.938, 31.150, 3000, ''), +(4880, 30, -2820.849, -3593.938, 31.150, 3000, 'SAY_PLANT_GATHERED'), +(4880, 31, -2834.209, -3592.041, 33.790, 0, ''), +(4880, 32, -2840.306, -3586.207, 36.288, 0, ''), +(4880, 33, -2847.491, -3576.416, 37.660, 0, ''), +(4880, 34, -2855.718, -3565.184, 39.390, 0, ''), +(4880, 35, -2861.785, -3552.902, 41.243, 0, ''), +(4880, 36, -2869.542, -3545.579, 40.701, 0, ''), +(4880, 37, -2877.784, -3538.372, 37.274, 0, ''), +(4880, 38, -2882.677, -3534.165, 34.844, 0, ''), +(4880, 39, -2888.567, -3534.117, 34.298, 4000, 'SAY_STINKY_END'), +(4880, 40, -2888.567, -3534.117, 34.298, 0, ''); DELETE FROM script_waypoint WHERE entry=20281; INSERT INTO script_waypoint VALUES diff --git a/sql/updates/r3021_scriptdev2.sql b/sql/updates/r3021_scriptdev2.sql new file mode 100644 index 000000000..03e74caad --- /dev/null +++ b/sql/updates/r3021_scriptdev2.sql @@ -0,0 +1,60 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1001147 AND -1001141; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1001141,'Nope, not here...',0,0,0,0,'stinky ignatz SAY_SECOND_STOP'), +(-1001142,'There must be one around here somewhere...',0,0,0,0,'stinky ignatz SAY_THIRD_STOP_1'), +(-1001143,'Ah, there\'s one!',0,0,0,0,'stinky ignatz SAY_THIRD_STOP_2'), +(-1001144,'Come, $N! Let\'s go over there and collect it!',0,0,0,0,'stinky ignatz SAY_THIRD_STOP_3'), +(-1001145,'Ok, let\'s get out of here!',0,0,0,0,'stinky ignatz SAY_PLANT_GATHERED'), +(-1001146,'I\'m glad you\'re here! Because I need your help!!',0,0,0,0,'stinky ignatz SAY_AGGRO_3'), +(-1001147,'Look out! The $N attacks!',0,0,0,0,'stinky ignatz SAY_AGGRO_4'); +DELETE FROM script_texts WHERE entry BETWEEN -1000962 AND -1000958; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1000958,'Ok, let\'s get started.',0,0,0,0,'stinky ignatz SAY_STINKY_BEGIN'), +(-1000959,'Now let\'s look for the herb.',0,0,0,0,'stinky ignatz SAY_STINKY_FIRST_STOP'), +(-1000960,'Help! The beast is on me!',0,0,0,0,'stinky ignatz SAY_AGGRO_1'), +(-1000961,'Help! I\'m under attack!',0,0,0,0,'stinky ignatz SAY_AGGRO_2'), +(-1000962,'I can make it from here. Thanks, $N! And talk to my employer about a reward!',0,0,0,0,'stinky ignatz SAY_STINKY_END'); + +DELETE FROM script_waypoint WHERE entry=4880; +INSERT INTO script_waypoint VALUES +(4880, 0, -2670.221, -3446.189, 34.085, 0, ''), +(4880, 1, -2683.958, -3451.094, 34.707, 0, ''), +(4880, 2, -2703.241, -3454.822, 33.395, 0, ''), +(4880, 3, -2721.615, -3457.408, 33.626, 0, ''), +(4880, 4, -2739.977, -3459.843, 33.329, 0, ''), +(4880, 5, -2756.240, -3460.516, 32.037, 5000, 'SAY_STINKY_FIRST_STOP'), +(4880, 6, -2764.517, -3472.714, 33.750, 0, ''), +(4880, 7, -2773.679, -3482.913, 32.840, 0, ''), +(4880, 8, -2781.394, -3490.613, 32.598, 0, ''), +(4880, 9, -2788.308, -3492.904, 30.761, 0, ''), +(4880, 10, -2794.578, -3489.185, 31.119, 5000, 'SAY_SECOND_STOP'), +(4880, 11, -2789.427, -3498.043, 31.050, 0, ''), +(4880, 12, -2786.968, -3508.168, 31.983, 0, ''), +(4880, 13, -2786.770, -3519.953, 31.079, 0, ''), +(4880, 14, -2789.359, -3525.025, 31.831, 0, ''), +(4880, 15, -2797.950, -3523.693, 31.697, 0, ''), +(4880, 16, -2812.971, -3519.838, 29.864, 0, ''), +(4880, 17, -2818.331, -3521.396, 30.563, 0, ''), +(4880, 18, -2824.771, -3528.728, 32.399, 0, ''), +(4880, 19, -2830.697, -3539.875, 32.505, 0, ''), +(4880, 20, -2836.235, -3549.962, 31.180, 0, ''), +(4880, 21, -2837.576, -3561.052, 30.740, 0, ''), +(4880, 22, -2834.445, -3568.264, 30.751, 0, ''), +(4880, 23, -2827.351, -3569.807, 31.316, 0, ''), +(4880, 24, -2817.380, -3566.961, 30.947, 5000, 'SAY_THIRD_STOP_1'), +(4880, 25, -2817.380, -3566.961, 30.947, 2000, 'SAY_THIRD_STOP_2'), +(4880, 26, -2817.380, -3566.961, 30.947, 0, 'SAY_THIRD_STOP_3'), +(4880, 27, -2818.815, -3579.415, 28.525, 0, ''), +(4880, 28, -2820.205, -3590.640, 30.269, 0, ''), +(4880, 29, -2820.849, -3593.938, 31.150, 3000, ''), +(4880, 30, -2820.849, -3593.938, 31.150, 3000, 'SAY_PLANT_GATHERED'), +(4880, 31, -2834.209, -3592.041, 33.790, 0, ''), +(4880, 32, -2840.306, -3586.207, 36.288, 0, ''), +(4880, 33, -2847.491, -3576.416, 37.660, 0, ''), +(4880, 34, -2855.718, -3565.184, 39.390, 0, ''), +(4880, 35, -2861.785, -3552.902, 41.243, 0, ''), +(4880, 36, -2869.542, -3545.579, 40.701, 0, ''), +(4880, 37, -2877.784, -3538.372, 37.274, 0, ''), +(4880, 38, -2882.677, -3534.165, 34.844, 0, ''), +(4880, 39, -2888.567, -3534.117, 34.298, 4000, 'SAY_STINKY_END'), +(4880, 40, -2888.567, -3534.117, 34.298, 0, ''); From 0ea8612265c857107b44959da269082b167fe963 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Tue, 1 Jul 2014 00:11:01 +0200 Subject: [PATCH 1033/1172] [3022] Implement phase 2 transition for Yogg Saron - Ulduar Note: encounter is still WIP - not playable yet --- .../ulduar/ulduar/boss_yogg_saron.cpp | 267 ++++++++++++++++-- .../ulduar/ulduar/instance_ulduar.cpp | 49 +++- scripts/northrend/ulduar/ulduar/ulduar.h | 3 +- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 2 + sql/scriptdev2_script_full.sql | 8 +- sql/updates/r3022_mangos.sql | 2 + sql/updates/r3022_scriptdev2.sql | 9 + 8 files changed, 308 insertions(+), 34 deletions(-) create mode 100644 sql/updates/r3022_mangos.sql create mode 100644 sql/updates/r3022_scriptdev2.sql diff --git a/scripts/northrend/ulduar/ulduar/boss_yogg_saron.cpp b/scripts/northrend/ulduar/ulduar/boss_yogg_saron.cpp index a6a54c11a..d6fb429ee 100644 --- a/scripts/northrend/ulduar/ulduar/boss_yogg_saron.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_yogg_saron.cpp @@ -29,13 +29,17 @@ enum SAY_SARA_INTRO_1 = -1603197, SAY_SARA_INTRO_2 = -1603198, SAY_SARA_AGGRO = -1603199, - SAY_SARA_HELP_1 = -1603200, - SAY_SARA_HELP_2 = -1603201, - SAY_SARA_SLAY_1 = -1603202, - SAY_SARA_SLAY_2 = -1603203, - SAY_WIPE_PHASE_1 = -1603204, - - SAY_PHASE_2_INTRO = -1603205, + SAY_SARA_HELP_1 = -1603201, + SAY_SARA_HELP_2 = -1603202, + SAY_SARA_SLAY_1 = -1603203, + SAY_SARA_SLAY_2 = -1603204, + SAY_WIPE_PHASE_1 = -1603205, + + SAY_PHASE_2_INTRO_1 = -1603206, + SAY_PHASE_2_INTRO_2 = -1603262, + SAY_PHASE_2_INTRO_3 = -1603263, + SAY_PHASE_2_INTRO_4 = -1603264, + SAY_PHASE_2_INTRO_5 = -1603265, SAY_SARA_PHASE_2_INTRO_A = -1603206, SAY_SARA_PHASE_2_INTRO_B = -1603207, @@ -96,10 +100,18 @@ enum SPELL_CLEAR_INSANE = 63122, // clear all the sanity and insane on wipe / death SPELL_SUMMON_GUARDIAN_YOGG = 62978, // cast by npc 33280 on an Ominus cloud - // Vision phase spells - SPELL_SHADOWY_BARRIER = 64775, // damage immunity spells + // Yogg transition spells SPELL_SHADOWY_BARRIER_YOGG = 63894, + SPELL_KNOCK_AWAY = 64022, + SPELL_MATCH_HEALTH = 64066, // periodic aura on the Brain + + // Sara transition spells + SPELL_SHADOWY_BARRIER = 64775, // damage immunity spells + SPELL_FULL_HEAL = 43978, + SPELL_PHASE_2_TRANSFORM = 65157, + SPELL_RIDE_VEHICLE_YOGG = 61791, // mount vehicle Yogg + // Vision phase spells SPELL_PHYCHOSIS = 65301, // Sara combat spells SPELL_PHYCHOSIS_H = 63795, SPELL_MALADY_OF_THE_MIND = 63830, @@ -159,6 +171,9 @@ enum SPELL_FURY_OF_THE_STORM = 62702, SPELL_TITANIC_STORM = 64171, + // other + FACTION_SARA_HOSTILE = 16, + // encounter phases PHASE_INTRO = 0, PHASE_SARA = 1, @@ -166,24 +181,39 @@ enum PHASE_OLD_GOD = 3, }; -static const float afVoiceOfYoggSpawn[3] = {1980.137f, -25.74376f, 326.4671f}; +static const DialogueEntry aYoggSaronDialog[] = +{ + {SAY_PHASE_2_INTRO_1, NPC_SARA, 4000}, + {SAY_PHASE_2_INTRO_2, NPC_SARA, 5000}, + {SAY_PHASE_2_INTRO_3, NPC_SARA, 5000}, + {SAY_PHASE_2_INTRO_4, NPC_SARA, 2000}, + {SPELL_PHASE_2_TRANSFORM, 0, 4000}, + {SAY_PHASE_2_INTRO_5, NPC_YOGGSARON, 0}, + {0, 0, 0}, +}; + +static const float afYoggSaronSpawn[4] = {1980.43f, -25.7708f, 324.9724f, 3.141f}; /*###### ## boss_sara ######*/ -struct MANGOS_DLL_DECL boss_saraAI : public ScriptedAI +struct MANGOS_DLL_DECL boss_saraAI : public ScriptedAI, private DialogueHelper { - boss_saraAI(Creature* pCreature) : ScriptedAI(pCreature) + boss_saraAI(Creature* pCreature) : ScriptedAI(pCreature), + DialogueHelper(aYoggSaronDialog) { m_pInstance = (instance_ulduar*)pCreature->GetInstanceData(); m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); + InitializeDialogueHelper(m_pInstance); Reset(); } instance_ulduar* m_pInstance; bool m_bIsRegularMode; + bool m_bIsHostile; + uint8 m_uiPhase; uint32 m_uiSummonGuardianTimer; uint32 m_uiSarasSpellTimer; @@ -192,7 +222,10 @@ struct MANGOS_DLL_DECL boss_saraAI : public ScriptedAI { m_uiPhase = PHASE_INTRO; m_uiSummonGuardianTimer = 1000; - m_uiSarasSpellTimer = 5000; + m_uiSarasSpellTimer = 15000; + m_bIsHostile = false; + + SetCombatMovement(false); } void AttackStart(Unit* pWho) override @@ -203,6 +236,14 @@ struct MANGOS_DLL_DECL boss_saraAI : public ScriptedAI ScriptedAI::AttackStart(pWho); } + void EnterEvadeMode() override + { + if (!m_bIsHostile) + return; + + ScriptedAI::EnterEvadeMode(); + } + void MoveInLineOfSight(Unit* pWho) override { // start the encounter on range check @@ -214,8 +255,6 @@ struct MANGOS_DLL_DECL boss_saraAI : public ScriptedAI if (m_pInstance) m_pInstance->SetData(TYPE_YOGGSARON, IN_PROGRESS); - - m_creature->SummonCreature(NPC_VOICE_OF_YOGG, afVoiceOfYoggSpawn[0], afVoiceOfYoggSpawn[1], afVoiceOfYoggSpawn[2], 0, TEMPSUMMON_DEAD_DESPAWN, 0); } ScriptedAI::MoveInLineOfSight(pWho); @@ -229,9 +268,65 @@ struct MANGOS_DLL_DECL boss_saraAI : public ScriptedAI DoScriptText(urand(0, 1) ? SAY_SARA_SLAY_1 : SAY_SARA_SLAY_2, m_creature); } + void DamageTaken(Unit* /*pDealer*/, uint32& uiDamage) override + { + if (uiDamage >= m_creature->GetHealth()) + { + uiDamage = 0; + + if (m_uiPhase == PHASE_SARA) + { + m_uiPhase = PHASE_VISIONS; + StartNextDialogueText(SAY_PHASE_2_INTRO_1); + + // despawn all clouds for phase 2 + if (!m_pInstance) + return; + + GuidList m_lCloudGuids; + m_pInstance->GetOminousCloudGuids(m_lCloudGuids); + + for (GuidList::const_iterator itr = m_lCloudGuids.begin(); itr != m_lCloudGuids.end(); ++itr) + { + if (Creature* pCloud = m_creature->GetMap()->GetCreature(*itr)) + pCloud->ForcedDespawn(); + } + } + } + } + void JustSummoned(Creature* pSummoned) override { - // ToDo: make the voice of Yogg cast Sanity on spawn + if (pSummoned->GetEntry() == NPC_YOGGSARON) + { + pSummoned->CastSpell(pSummoned, SPELL_SHADOWY_BARRIER_YOGG, true); + pSummoned->CastSpell(pSummoned, SPELL_KNOCK_AWAY, true); + pSummoned->SetInCombatWithZone(); + } + } + + void JustDidDialogueStep(int32 iEntry) override + { + switch (iEntry) + { + case SAY_PHASE_2_INTRO_4: + DoCastSpellIfCan(m_creature, SPELL_FULL_HEAL, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_PHASE_2_TRANSFORM, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_SHADOWY_BARRIER, CAST_TRIGGERED); + + m_creature->SetFactionTemporary(FACTION_SARA_HOSTILE, TEMPFACTION_RESTORE_RESPAWN); + m_creature->SummonCreature(NPC_YOGGSARON, afYoggSaronSpawn[0], afYoggSaronSpawn[1], afYoggSaronSpawn[2], afYoggSaronSpawn[3], TEMPSUMMON_DEAD_DESPAWN, 0); + m_bIsHostile = true; + m_creature->SetInCombatWithZone(); + break; + case SPELL_PHASE_2_TRANSFORM: + if (m_pInstance) + { + if (Creature* pYogg = m_pInstance->GetSingleCreatureFromStorage(NPC_YOGGSARON)) + DoCastSpellIfCan(pYogg, SPELL_RIDE_VEHICLE_YOGG, CAST_TRIGGERED); + } + break; + } } void UpdateAI(const uint32 uiDiff) override @@ -242,6 +337,8 @@ struct MANGOS_DLL_DECL boss_saraAI : public ScriptedAI return; } + DialogueUpdate(uiDiff); + if (m_uiPhase == PHASE_SARA) { if (m_uiSummonGuardianTimer < uiDiff) @@ -286,6 +383,55 @@ CreatureAI* GetAI_boss_sara(Creature* pCreature) return new boss_saraAI(pCreature); } +/*###### +## boss_yogg_saron +######*/ + +struct MANGOS_DLL_DECL boss_yogg_saronAI : public Scripted_NoMovementAI +{ + boss_yogg_saronAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) + { + m_pInstance = (instance_ulduar*)pCreature->GetInstanceData(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); + Reset(); + } + + instance_ulduar* m_pInstance; + bool m_bIsRegularMode; + + uint8 m_uiPhase; + + void Reset() override + { + m_uiPhase = PHASE_VISIONS; + } + + void JustReachedHome() override + { + // unboard passengers first to avoid issues + m_creature->RemoveSpellsCausingAura(SPELL_AURA_CONTROL_VEHICLE); + + if (m_pInstance) + { + if (m_pInstance->GetData(TYPE_YOGGSARON) != FAIL) + m_pInstance->SetData(TYPE_YOGGSARON, FAIL); + } + + m_creature->ForcedDespawn(); + } + + void UpdateAI(const uint32 uiDiff) override + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + } +}; + +CreatureAI* GetAI_boss_yogg_saron(Creature* pCreature) +{ + return new boss_yogg_saronAI(pCreature); +} + /*###### ## npc_ominous_cloud ######*/ @@ -382,6 +528,85 @@ CreatureAI* GetAI_npc_voice_yogg_saron(Creature* pCreature) return new npc_voice_yogg_saronAI(pCreature); } +/*###### +## npc_guardian_of_yogg +######*/ + +struct MANGOS_DLL_DECL npc_guardian_of_yoggAI : public ScriptedAI +{ + npc_guardian_of_yoggAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (instance_ulduar*)pCreature->GetInstanceData(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); + Reset(); + } + + instance_ulduar* m_pInstance; + bool m_bIsRegularMode; + + uint32 m_uiDarkVolleyTimer; + uint32 m_uiDominateMindTimer; + + void Reset() override + { + m_uiDarkVolleyTimer = 10000; + m_uiDominateMindTimer = 25000; + } + + void AttackStart(Unit* pWho) override + { + if (pWho->GetEntry() == NPC_SARA) + return; + + ScriptedAI::AttackStart(pWho); + } + + void JustDied(Unit* /*pKiller*/) override + { + DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_SHADOW_NOVA : SPELL_SHADOW_NOVA_H, CAST_TRIGGERED); + } + + void JustReachedHome() override + { + if (m_pInstance) + { + if (m_pInstance->GetData(TYPE_YOGGSARON) != FAIL) + m_pInstance->SetData(TYPE_YOGGSARON, FAIL); + } + + m_creature->ForcedDespawn(); + } + + void UpdateAI(const uint32 uiDiff) override + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_uiDarkVolleyTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_DARK_VOLLEY) == CAST_OK) + m_uiDarkVolleyTimer = urand(10000, 25000); + } + else + m_uiDarkVolleyTimer -= uiDiff; + + if (m_uiDominateMindTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_DOMINATE_MIND) == CAST_OK) + m_uiDominateMindTimer = urand(30000, 40000); + } + else + m_uiDominateMindTimer -= uiDiff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_npc_guardian_of_yogg(Creature* pCreature) +{ + return new npc_guardian_of_yoggAI(pCreature); +} + void AddSC_boss_yogg_saron() { Script* pNewScript; @@ -391,6 +616,11 @@ void AddSC_boss_yogg_saron() pNewScript->GetAI = &GetAI_boss_sara; pNewScript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "boss_yogg_saron"; + pNewScript->GetAI = &GetAI_boss_yogg_saron; + pNewScript->RegisterSelf(); + pNewScript = new Script; pNewScript->Name = "npc_ominous_cloud"; pNewScript->GetAI = &GetAI_npc_ominous_cloud; @@ -400,4 +630,9 @@ void AddSC_boss_yogg_saron() pNewScript->Name = "npc_voice_yogg_saron"; pNewScript->GetAI = &GetAI_npc_voice_yogg_saron; pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_guardian_of_yogg"; + pNewScript->GetAI = &GetAI_npc_guardian_of_yogg; + pNewScript->RegisterSelf(); } diff --git a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp index f289fa75b..9d32ab378 100644 --- a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp +++ b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp @@ -71,6 +71,7 @@ static UlduarKeeperSpawns m_aKeeperHelperLocs[] = instance_ulduar::instance_ulduar(Map* pMap) : ScriptedInstance(pMap), DialogueHelper(aUlduarDialogue), m_bHelpersLoaded(false), m_uiAlgalonTimer(MINUTE* IN_MILLISECONDS), + m_uiYoggResetTimer(0), m_uiShatterAchievTimer(0), m_uiGauntletStatus(0), m_uiStairsSpawnTimer(0), @@ -754,19 +755,24 @@ void instance_ulduar::SetData(uint32 uiType, uint32 uiData) DoUseDoorOrButton(GO_YOGG_GATE); if (uiData == FAIL) { - // reset Ominous clouds + // reset encounter for (GuidList::const_iterator itr = m_lOminousCloudsGuids.begin(); itr != m_lOminousCloudsGuids.end(); ++itr) { if (Creature* pCloud = instance->GetCreature(*itr)) - pCloud->AI()->EnterEvadeMode(); + pCloud->ForcedDespawn(); } - // clear insane and despawn the voice if (Creature* pVoice = GetSingleCreatureFromStorage(NPC_VOICE_OF_YOGG)) + { + // ToDo: clear insane / sanity pVoice->ForcedDespawn(); - + } if (Creature* pSara = GetSingleCreatureFromStorage(NPC_SARA)) - pSara->AI()->EnterEvadeMode(); + pSara->ForcedDespawn(); + if (Creature* pBrain = GetSingleCreatureFromStorage(NPC_YOGG_BRAIN)) + pBrain->ForcedDespawn(); + + m_uiYoggResetTimer = 60000; } break; @@ -1159,15 +1165,6 @@ void instance_ulduar::OnCreatureDeath(Creature* pCreature) } } -void instance_ulduar::OnCreatureEvade(Creature* pCreature) -{ - if (pCreature->GetEntry() == NPC_GUARDIAN_OF_YOGG) - { - SetData(TYPE_YOGGSARON, FAIL); - pCreature->ForcedDespawn(); - } -} - void instance_ulduar::Load(const char* strIn) { if (!strIn) @@ -1420,6 +1417,30 @@ void instance_ulduar::Update(uint32 uiDiff) m_uiAlgalonTimer -= uiDiff; } + if (m_uiYoggResetTimer) + { + if (m_uiYoggResetTimer <= uiDiff) + { + // reset encounter + for (GuidList::const_iterator itr = m_lOminousCloudsGuids.begin(); itr != m_lOminousCloudsGuids.end(); ++itr) + { + if (Creature* pCloud = instance->GetCreature(*itr)) + pCloud->Respawn(); + } + + if (Creature* pVoice = GetSingleCreatureFromStorage(NPC_VOICE_OF_YOGG)) + pVoice->Respawn(); + if (Creature* pSara = GetSingleCreatureFromStorage(NPC_SARA)) + pSara->Respawn(); + if (Creature* pBrain = GetSingleCreatureFromStorage(NPC_YOGG_BRAIN)) + pBrain->Respawn(); + + m_uiYoggResetTimer = 0; + } + else + m_uiYoggResetTimer -= uiDiff; + } + if (m_uiStairsSpawnTimer) { if (m_uiStairsSpawnTimer <= uiDiff) diff --git a/scripts/northrend/ulduar/ulduar/ulduar.h b/scripts/northrend/ulduar/ulduar/ulduar.h index 831d5c0f7..fb6bf4d3f 100644 --- a/scripts/northrend/ulduar/ulduar/ulduar.h +++ b/scripts/northrend/ulduar/ulduar/ulduar.h @@ -482,7 +482,6 @@ class MANGOS_DLL_DECL instance_ulduar : public ScriptedInstance, private Dialogu void OnCreatureCreate(Creature* pCreature) override; void OnCreatureEnterCombat(Creature* pCreature) override; void OnCreatureDeath(Creature* pCreature) override; - void OnCreatureEvade(Creature* pCreature) override; void OnObjectCreate(GameObject* pGo) override; void SetData(uint32 uiType, uint32 uiData) override; @@ -508,6 +507,7 @@ class MANGOS_DLL_DECL instance_ulduar : public ScriptedInstance, private Dialogu void GetThorimBunniesGuids(GuidList& lBunnies, bool bUpper) { lBunnies = bUpper ? m_lUpperBunniesGuids : m_lThorimBunniesGuids; } void GetThunderOrbsGuids(GuidList& lOrbs) { lOrbs = m_lUpperThunderOrbsGuids; } void GetSmashTargetsGuids(GuidList& lTargets, bool bLeft) { lTargets = bLeft ? m_lLeftHandBunniesGuids : m_lRightHandBunniesGuids; } + void GetOminousCloudGuids(GuidList& lClouds) { lClouds = m_lOminousCloudsGuids; } void Update(uint32 uiDiff); @@ -529,6 +529,7 @@ class MANGOS_DLL_DECL instance_ulduar : public ScriptedInstance, private Dialogu bool m_bHelpersLoaded; uint32 m_uiAlgalonTimer; + uint32 m_uiYoggResetTimer; uint32 m_uiShatterAchievTimer; uint32 m_uiGauntletStatus; uint32 m_uiStairsSpawnTimer; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 822edff4a..bed4d8550 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3021" + #define SD2_REVISION_NR "3022" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 4aa6d3e28..e52e4d285 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -1370,8 +1370,10 @@ UPDATE creature_template SET ScriptName='npc_computer' WHERE entry=34143; UPDATE gameobject_template SET ScriptName='go_big_red_button' WHERE entry=194739; UPDATE creature_template SET ScriptName='npc_ulduar_keeper' WHERE entry IN (33241,33242,33244,33213); UPDATE creature_template SET ScriptName='boss_sara' WHERE entry=33134; +UPDATE creature_template SET ScriptName='boss_yogg_saron' WHERE entry=33288; UPDATE creature_template SET ScriptName='npc_ominous_cloud' WHERE entry=33292; UPDATE creature_template SET ScriptName='npc_voice_yogg_saron' WHERE entry=33280; +UPDATE creature_template SET ScriptName='npc_guardian_of_yogg' WHERE entry=33136; DELETE FROM scripted_event_id WHERE id IN (9735,20907,20964,21030,21031,21032,21033,21045,21605,21606,21620); INSERT INTO scripted_event_id VALUES (9735, 'event_spell_saronite_barrier'), -- Vezax saronite barrier event diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index e55b7fd5b..d4c1ceaca 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -3803,7 +3803,7 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1603205,'Weak-minded fools!',15780,4,0,0,'yogg SAY_WIPE_PHASE_1'), -(-1603206,'I am the lucid dream. The monster in your nightmares. The fiend of a thousand faces. Cower before my true form. BOW DOWN BEFORE THE GOD OF DEATH!',15754,1,0,0,'yogg SAY_PHASE_2_INTRO'), +(-1603206,'I am the lucid dream.',15754,1,0,457,'yogg SAY_PHASE_2_INTRO_1'), (-1603207,'Tremble, mortals, before the coming of the end!',15777,1,0,0,'yogg SAY_SARA_PHASE_2_INTRO_A'), (-1603208,'Suffocate upon your own hate!',15776,1,0,0,'yogg SAY_SARA_PHASE_2_INTRO_B'), @@ -3870,7 +3870,11 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1603259,'Self-destruct sequence finalized. Have a nice day.',15425,1,0,0,'mimiron SAY_DESTRUCT_0_MIN'), (-1603260,'Self-destruct sequence terminated. Overide code A905.',15414,1,0,0,'mimiron SAY_SELF_DESTRUCT_END'), -(-1603261,'%s begins to boil upon touching $n!',0,2,0,0,'ominous cloud EMOTE_CLOUD_BOIL'); +(-1603261,'%s begins to boil upon touching $n!',0,2,0,0,'ominous cloud EMOTE_CLOUD_BOIL'), +(-1603262,'The monster in your nightmares.',0,1,0,457,'yogg SAY_PHASE_2_INTRO_2'), +(-1603263,'The fiend of a thousand faces.',0,1,0,457,'yogg SAY_PHASE_2_INTRO_3'), +(-1603264,'Cower before my true form.',0,1,0,457,'yogg SAY_PHASE_2_INTRO_4'), +(-1603265,'BOW DOWN BEFORE THE GOD OF DEATH!',0,1,0,0,'yogg SAY_PHASE_2_INTRO_5'); -- -1 604 000 GUNDRAK INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES diff --git a/sql/updates/r3022_mangos.sql b/sql/updates/r3022_mangos.sql new file mode 100644 index 000000000..1dea888f5 --- /dev/null +++ b/sql/updates/r3022_mangos.sql @@ -0,0 +1,2 @@ +UPDATE creature_template SET ScriptName='npc_guardian_of_yogg' WHERE entry=33136; +UPDATE creature_template SET ScriptName='boss_yogg_saron' WHERE entry=33288; diff --git a/sql/updates/r3022_scriptdev2.sql b/sql/updates/r3022_scriptdev2.sql new file mode 100644 index 000000000..c6f8a3fc8 --- /dev/null +++ b/sql/updates/r3022_scriptdev2.sql @@ -0,0 +1,9 @@ +DELETE FROM script_texts WHERE entry=-1603206; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1603206,'I am the lucid dream.',15754,1,0,457,'yogg SAY_PHASE_2_INTRO_1'); +DELETE FROM script_texts WHERE entry BETWEEN -1603265 AND -1603262; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1603262,'The monster in your nightmares.',0,1,0,457,'yogg SAY_PHASE_2_INTRO_2'), +(-1603263,'The fiend of a thousand faces.',0,1,0,457,'yogg SAY_PHASE_2_INTRO_3'), +(-1603264,'Cower before my true form.',0,1,0,457,'yogg SAY_PHASE_2_INTRO_4'), +(-1603265,'BOW DOWN BEFORE THE GOD OF DEATH!',0,1,0,0,'yogg SAY_PHASE_2_INTRO_5'); From 54d55addeab6c5ba5ce64b82ee21e8acbda99913 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sat, 5 Jul 2014 23:37:50 +0200 Subject: [PATCH 1034/1172] [3023] Implement script support for quest 5203 Thanks to @grz3s for providing the data Part of #27 --- scripts/kalimdor/felwood.cpp | 197 ++++++++++++++++++++++++++++++- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 + sql/scriptdev2_script_full.sql | 129 +++++++++++++++++++- sql/updates/r3023_mangos.sql | 1 + sql/updates/r3023_scriptdev2.sql | 128 ++++++++++++++++++++ 6 files changed, 455 insertions(+), 3 deletions(-) create mode 100644 sql/updates/r3023_mangos.sql create mode 100644 sql/updates/r3023_scriptdev2.sql diff --git a/scripts/kalimdor/felwood.cpp b/scripts/kalimdor/felwood.cpp index b95d565c6..661a55cc6 100644 --- a/scripts/kalimdor/felwood.cpp +++ b/scripts/kalimdor/felwood.cpp @@ -17,7 +17,7 @@ /* ScriptData SDName: Felwood SD%Complete: 95 -SDComment: Quest support: 4506, 7603, 7603 (Summon Pollo Grande) +SDComment: Quest support: 4506, 5203, 7603, 7603 (Summon Pollo Grande) SDCategory: Felwood EndScriptData */ @@ -25,10 +25,12 @@ EndScriptData */ npc_kitten npc_niby_the_almighty npc_kroshius +npc_captured_arkonarin EndContentData */ #include "precompiled.h" #include "follower_ai.h" +#include "escort_ai.h" #include "ObjectMgr.h" /*#### @@ -401,6 +403,193 @@ bool ProcessEventId_npc_kroshius(uint32 uiEventId, Object* pSource, Object* /*pT return false; } +/*#### +# npc_captured_arkonarin +####*/ + +enum +{ + SAY_ESCORT_START = -1001148, + SAY_FIRST_STOP = -1001149, + SAY_SECOND_STOP = -1001150, + SAY_AGGRO = -1001151, + SAY_FOUND_EQUIPMENT = -1001152, + SAY_ESCAPE_DEMONS = -1001153, + SAY_FRESH_AIR = -1001154, + SAY_TREY_BETRAYER = -1001155, + SAY_TREY = -1001156, + SAY_TREY_ATTACK = -1001157, + SAY_ESCORT_COMPLETE = -1001158, + + SPELL_STRENGHT_ARKONARIN = 18163, + SPELL_MORTAL_STRIKE = 16856, + SPELL_CLEAVE = 15496, + + QUEST_ID_RESCUE_JAEDENAR = 5203, + NPC_JAEDENAR_LEGIONNAIRE = 9862, + NPC_SPIRT_TREY = 11141, + GO_ARKONARIN_CHEST = 176225, + GO_ARKONARIN_CAGE = 176306, +}; + +struct MANGOS_DLL_DECL npc_captured_arkonarinAI : public npc_escortAI +{ + npc_captured_arkonarinAI(Creature* pCreature) : npc_escortAI(pCreature) { Reset(); } + + ObjectGuid m_treyGuid; + + bool m_bCanAttack; + + uint32 m_uiMortalStrikeTimer; + uint32 m_uiCleaveTimer; + + void Reset() override + { + if (!HasEscortState(STATE_ESCORT_ESCORTING)) + m_bCanAttack = false; + + m_uiMortalStrikeTimer = urand(5000, 7000); + m_uiCleaveTimer = urand(1000, 4000); + } + + void Aggro(Unit* pWho) override + { + if (pWho->GetEntry() == NPC_SPIRT_TREY) + DoScriptText(SAY_TREY_ATTACK, m_creature); + else if (roll_chance_i(25)) + DoScriptText(SAY_AGGRO, m_creature, pWho); + } + + void JustSummoned(Creature* pSummoned) override + { + if (pSummoned->GetEntry() == NPC_JAEDENAR_LEGIONNAIRE) + pSummoned->AI()->AttackStart(m_creature); + else if (pSummoned->GetEntry() == NPC_SPIRT_TREY) + { + DoScriptText(SAY_TREY_BETRAYER, pSummoned); + m_treyGuid = pSummoned->GetObjectGuid(); + } + } + + void ReceiveAIEvent(AIEventType eventType, Creature* /*pSender*/, Unit* pInvoker, uint32 uiMiscValue) override + { + if (eventType == AI_EVENT_START_ESCORT && pInvoker->GetTypeId() == TYPEID_PLAYER) + { + m_creature->SetStandState(UNIT_STAND_STATE_STAND); + m_creature->SetFactionTemporary(FACTION_ESCORT_N_NEUTRAL_ACTIVE, TEMPFACTION_RESTORE_RESPAWN); + Start(false, (Player*)pInvoker, GetQuestTemplateStore(uiMiscValue)); + + if (GameObject* pCage = GetClosestGameObjectWithEntry(m_creature, GO_ARKONARIN_CAGE, 5.0f)) + pCage->Use(m_creature); + } + } + + void WaypointReached(uint32 uiPointId) override + { + switch (uiPointId) + { + case 0: + if (Player* pPlayer = GetPlayerForEscort()) + DoScriptText(SAY_ESCORT_START, m_creature, pPlayer); + break; + case 14: + DoScriptText(SAY_FIRST_STOP, m_creature); + break; + case 34: + DoScriptText(SAY_SECOND_STOP, m_creature); + SetRun(); + break; + case 38: + if (GameObject* pChest = GetClosestGameObjectWithEntry(m_creature, GO_ARKONARIN_CHEST, 5.0f)) + pChest->Use(m_creature); + m_creature->HandleEmote(EMOTE_ONESHOT_KNEEL); + break; + case 39: + DoCastSpellIfCan(m_creature, SPELL_STRENGHT_ARKONARIN); + break; + case 40: + if (Player* pPlayer = GetPlayerForEscort()) + m_creature->SetFacingToObject(pPlayer); + m_bCanAttack = true; + DoScriptText(SAY_FOUND_EQUIPMENT, m_creature); + // ToDo: change equipment! + break; + case 41: + DoScriptText(SAY_ESCAPE_DEMONS, m_creature); + m_creature->SummonCreature(NPC_JAEDENAR_LEGIONNAIRE, 5082.068f, -490.084f, 296.856f, 5.15f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 60000); + m_creature->SummonCreature(NPC_JAEDENAR_LEGIONNAIRE, 5084.135f, -489.187f, 296.832f, 5.15f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 60000); + m_creature->SummonCreature(NPC_JAEDENAR_LEGIONNAIRE, 5085.676f, -488.518f, 296.824f, 5.15f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 60000); + break; + case 43: + SetRun(false); + break; + case 104: + DoScriptText(SAY_FRESH_AIR, m_creature); + break; + case 105: + m_creature->SummonCreature(NPC_SPIRT_TREY, 4844.839f, -395.763f, 350.603f, 6.25f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 60000); + break; + case 106: + DoScriptText(SAY_TREY, m_creature); + break; + case 107: + if (Creature* pTrey = m_creature->GetMap()->GetCreature(m_treyGuid)) + AttackStart(pTrey); + break; + case 108: + if (Player* pPlayer = GetPlayerForEscort()) + m_creature->SetFacingToObject(pPlayer); + DoScriptText(SAY_ESCORT_COMPLETE, m_creature); + break; + case 109: + if (Player* pPlayer = GetPlayerForEscort()) + pPlayer->GroupEventHappens(QUEST_ID_RESCUE_JAEDENAR, m_creature); + SetRun(); + break; + } + } + + void UpdateEscortAI(const uint32 uiDiff) override + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_bCanAttack) + { + if (m_uiMortalStrikeTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_MORTAL_STRIKE) == CAST_OK) + m_uiMortalStrikeTimer = urand(7000, 10000); + } + else + m_uiMortalStrikeTimer -= uiDiff; + + if (m_uiCleaveTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_CLEAVE) == CAST_OK) + m_uiCleaveTimer = urand(3000, 6000); + } + else + m_uiCleaveTimer -= uiDiff; + } + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_npc_captured_arkonarin(Creature* pCreature) +{ + return new npc_captured_arkonarinAI(pCreature); +} + +bool QuestAccept_npc_captured_arkonarin(Player* pPlayer, Creature* pCreature, const Quest* pQuest) +{ + if (pQuest->GetQuestId() == QUEST_ID_RESCUE_JAEDENAR) + pCreature->AI()->SendAIEvent(AI_EVENT_START_ESCORT, pPlayer, pCreature, pQuest->GetQuestId()); + + return true; +} + void AddSC_felwood() { Script* pNewScript; @@ -428,4 +617,10 @@ void AddSC_felwood() pNewScript->GetAI = &GetAI_npc_kroshius; pNewScript->pProcessEventId = &ProcessEventId_npc_kroshius; pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_captured_arkonarin"; + pNewScript->GetAI = &GetAI_npc_captured_arkonarin; + pNewScript->pQuestAcceptNPC = &QuestAccept_npc_captured_arkonarin; + pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index bed4d8550..f447bb3de 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3022" + #define SD2_REVISION_NR "3023" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index e52e4d285..b3d33cdb7 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -587,6 +587,7 @@ UPDATE creature_template SET ScriptName='npc_kitten' WHERE entry=9937; UPDATE creature_template SET ScriptName='npc_corrupt_saber' WHERE entry=10042; UPDATE creature_template SET ScriptName='npc_niby_the_almighty' WHERE entry=14469; UPDATE creature_template SET ScriptName='npc_kroshius' WHERE entry=14467; +UPDATE creature_template SET ScriptName='npc_captured_arkonarin' WHERE entry=11016; /* FERALAS */ UPDATE creature_template SET ScriptName='npc_oox22fe' WHERE entry=7807; diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index d4c1ceaca..4ccae2ac2 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -1243,7 +1243,19 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1001144,'Come, $N! Let\'s go over there and collect it!',0,0,0,0,'stinky ignatz SAY_THIRD_STOP_3'), (-1001145,'Ok, let\'s get out of here!',0,0,0,0,'stinky ignatz SAY_PLANT_GATHERED'), (-1001146,'I\'m glad you\'re here! Because I need your help!!',0,0,0,0,'stinky ignatz SAY_AGGRO_3'), -(-1001147,'Look out! The $N attacks!',0,0,0,0,'stinky ignatz SAY_AGGRO_4'); +(-1001147,'Look out! The $N attacks!',0,0,0,0,'stinky ignatz SAY_AGGRO_4'), + +(-1001148,'I am ready, $N. Let\'s find my equipment and get out of here. I think I know where it is.',0,0,0,1,'captured arko\'narin SAY_ESCORT_START'), +(-1001149,'Oh my! Look at this... all these candles. I\'m sure they\'re used for some terrible ritual or dark summoning. We best make haste.',0,0,0,18,'captured arko\'narin SAY_FIRST_STOP'), +(-1001150,'There! Over there!',0,0,0,25,'captured arko\'narin SAY_SECOND_STOP'), +(-1001151,'You will not stop me from escaping here, $N!',0,0,0,0,'captured arko\'narin SAY_AGGRO'), +(-1001152,'All I need now is a golden lasso.',0,0,0,0,'captured arko\'narin SAY_EQUIPMENT'), +(-1001153,'DIE DEMON DOGS!',0,0,0,0,'captured arko\'narin SAY_ESCAPE'), +(-1001154,'Ah! Fresh air at last! I never thought I\'d see the day.',0,0,0,4,'captured arko\'narin SAY_FRESH_AIR'), +(-1001155,'BETRAYER!',0,1,0,0,'spirit of trey lightforge SAY_BETRAYER'), +(-1001156,'What was that?! Trey? TREY?',0,0,0,22,'captured arko\'narin SAY_TREY'), +(-1001157,'You kept me in the cell for too long, monster!',0,0,0,0,'captured arko\'narin SAY_ATTACK_TREY'), +(-1001158,'No! My friend... what\'s happened? This is all my fault...',0,0,0,18,'captured arko\'narin SAY_ESCORT_COMPLETE'); -- -1 033 000 SHADOWFANG KEEP INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES @@ -8327,4 +8339,119 @@ INSERT INTO script_waypoint VALUES (12126, 1, 2643.529, -1914.072, 71.00, 0, ''), (12126, 2, 2653.827, -1907.536, 69.34, 0, 'escort paused'); +DELETE FROM script_waypoint WHERE entry=11016; +INSERT INTO script_waypoint VALUES +(11016, 0, 5004.985, -440.237, 319.059, 4000, 'SAY_ESCORT_START'), +(11016, 1, 4992.224, -449.964, 317.057, 0, ''), +(11016, 2, 4988.549, -457.438, 316.289, 0, ''), +(11016, 3, 4989.978, -464.297, 316.846, 0, ''), +(11016, 4, 4994.038, -467.754, 318.055, 0, ''), +(11016, 5, 5002.307, -466.318, 319.965, 0, ''), +(11016, 6, 5011.801, -462.889, 321.501, 0, ''), +(11016, 7, 5020.533, -460.797, 321.970, 0, ''), +(11016, 8, 5026.836, -463.171, 321.345, 0, ''), +(11016, 9, 5028.663, -476.805, 318.726, 0, ''), +(11016, 10, 5029.503, -487.131, 318.179, 0, ''), +(11016, 11, 5031.178, -497.678, 316.533, 0, ''), +(11016, 12, 5032.720, -504.748, 314.744, 0, ''), +(11016, 13, 5034.997, -513.138, 314.372, 0, ''), +(11016, 14, 5037.493, -521.733, 313.221, 6000, 'SAY_FIRST_STOP'), +(11016, 15, 5049.055, -519.546, 313.221, 0, ''), +(11016, 16, 5059.170, -522.930, 313.221, 0, ''), +(11016, 17, 5062.755, -529.933, 313.221, 0, ''), +(11016, 18, 5063.896, -538.827, 313.221, 0, ''), +(11016, 19, 5062.223, -545.635, 313.221, 0, ''), +(11016, 20, 5061.690, -552.333, 313.101, 0, ''), +(11016, 21, 5060.333, -560.349, 310.873, 0, ''), +(11016, 22, 5055.621, -565.541, 308.737, 0, ''), +(11016, 23, 5049.803, -567.604, 306.537, 0, ''), +(11016, 24, 5043.011, -564.946, 303.682, 0, ''), +(11016, 25, 5038.221, -559.823, 301.463, 0, ''), +(11016, 26, 5039.456, -548.675, 297.824, 0, ''), +(11016, 27, 5043.437, -538.807, 297.801, 0, ''), +(11016, 28, 5056.397, -528.954, 297.801, 0, ''), +(11016, 29, 5064.397, -521.904, 297.801, 0, ''), +(11016, 30, 5067.616, -512.999, 297.196, 0, ''), +(11016, 31, 5065.990, -505.329, 297.214, 0, ''), +(11016, 32, 5062.238, -499.086, 297.448, 0, ''), +(11016, 33, 5065.087, -492.069, 298.054, 0, ''), +(11016, 34, 5071.195, -491.173, 297.666, 5000, 'SAY_SECOND_STOP'), +(11016, 35, 5087.474, -496.478, 296.677, 0, ''), +(11016, 36, 5095.552, -508.639, 296.677, 0, ''), +(11016, 37, 5104.300, -521.014, 296.677, 0, ''), +(11016, 38, 5110.132, -532.123, 296.677, 4000, 'open equipment chest'), +(11016, 39, 5110.132, -532.123, 296.677, 4000, 'cast SPELL_STRENGHT_ARKONARIN'), +(11016, 40, 5110.132, -532.123, 296.677, 4000, 'SAY_EQUIPMENT'), +(11016, 41, 5110.132, -532.123, 296.677, 0, 'SAY_ESCAPE'), +(11016, 42, 5099.748, -510.823, 296.677, 0, ''), +(11016, 43, 5091.944, -497.516, 296.677, 0, ''), +(11016, 44, 5079.375, -486.811, 297.638, 0, ''), +(11016, 45, 5069.212, -488.770, 298.082, 0, ''), +(11016, 46, 5064.242, -496.051, 297.275, 0, ''), +(11016, 47, 5065.084, -505.239, 297.361, 0, ''), +(11016, 48, 5067.818, -515.245, 297.125, 0, ''), +(11016, 49, 5064.617, -521.170, 297.801, 0, ''), +(11016, 50, 5053.221, -530.739, 297.801, 0, ''), +(11016, 51, 5045.725, -538.311, 297.801, 0, ''), +(11016, 52, 5039.695, -548.112, 297.801, 0, ''), +(11016, 53, 5038.778, -557.588, 300.787, 0, ''), +(11016, 54, 5042.014, -566.749, 303.838, 0, ''), +(11016, 55, 5050.555, -568.149, 306.782, 0, ''), +(11016, 56, 5056.979, -564.674, 309.342, 0, ''), +(11016, 57, 5060.791, -556.801, 311.936, 0, ''), +(11016, 58, 5059.581, -551.626, 313.221, 0, ''), +(11016, 59, 5062.826, -541.994, 313.221, 0, ''), +(11016, 60, 5063.554, -531.288, 313.221, 0, ''), +(11016, 61, 5057.934, -523.088, 313.221, 0, ''), +(11016, 62, 5049.471, -519.360, 313.221, 0, ''), +(11016, 63, 5040.789, -519.809, 313.221, 0, ''), +(11016, 64, 5034.299, -515.361, 313.948, 0, ''), +(11016, 65, 5032.001, -505.532, 314.663, 0, ''), +(11016, 66, 5029.915, -495.645, 316.821, 0, ''), +(11016, 67, 5028.871, -487.000, 318.179, 0, ''), +(11016, 68, 5028.109, -475.531, 318.839, 0, ''), +(11016, 69, 5027.759, -465.442, 320.643, 0, ''), +(11016, 70, 5019.955, -460.892, 321.969, 0, ''), +(11016, 71, 5009.426, -464.793, 321.248, 0, ''), +(11016, 72, 4999.567, -468.062, 319.426, 0, ''), +(11016, 73, 4992.034, -468.128, 317.894, 0, ''), +(11016, 74, 4988.168, -461.293, 316.369, 0, ''), +(11016, 75, 4990.624, -447.459, 317.104, 0, ''), +(11016, 76, 4993.475, -438.643, 318.272, 0, ''), +(11016, 77, 4995.451, -430.178, 318.462, 0, ''), +(11016, 78, 4993.564, -422.876, 318.864, 0, ''), +(11016, 79, 4985.401, -420.864, 320.205, 0, ''), +(11016, 80, 4976.515, -426.168, 323.112, 0, ''), +(11016, 81, 4969.832, -429.755, 325.029, 0, ''), +(11016, 82, 4960.702, -425.440, 325.834, 0, ''), +(11016, 83, 4955.447, -418.765, 327.433, 0, ''), +(11016, 84, 4949.702, -408.796, 328.004, 0, ''), +(11016, 85, 4940.017, -403.222, 329.956, 0, ''), +(11016, 86, 4934.982, -401.475, 330.898, 0, ''), +(11016, 87, 4928.693, -399.302, 331.744, 0, ''), +(11016, 88, 4926.935, -398.436, 333.079, 0, ''), +(11016, 89, 4916.163, -393.822, 333.729, 0, ''), +(11016, 90, 4908.393, -396.217, 333.217, 0, ''), +(11016, 91, 4905.610, -396.535, 335.050, 0, ''), +(11016, 92, 4897.876, -395.245, 337.346, 0, ''), +(11016, 93, 4895.206, -388.203, 339.295, 0, ''), +(11016, 94, 4896.945, -382.429, 341.040, 0, ''), +(11016, 95, 4901.885, -378.799, 342.771, 0, ''), +(11016, 96, 4908.087, -380.635, 344.597, 0, ''), +(11016, 97, 4911.910, -385.818, 346.491, 0, ''), +(11016, 98, 4910.104, -393.444, 348.798, 0, ''), +(11016, 99, 4903.500, -396.947, 350.812, 0, ''), +(11016, 100, 4898.083, -394.226, 351.821, 0, ''), +(11016, 101, 4891.333, -393.436, 351.801, 0, ''), +(11016, 102, 4881.203, -395.211, 351.590, 0, ''), +(11016, 103, 4877.843, -395.536, 349.713, 0, ''), +(11016, 104, 4873.972, -394.919, 349.844, 5000, 'SAY_FRESH_AIR'), +(11016, 105, 4873.972, -394.919, 349.844, 3000, 'SAY_BETRAYER'), +(11016, 106, 4873.972, -394.919, 349.844, 2000, 'SAY_TREY'), +(11016, 107, 4873.972, -394.919, 349.844, 0, 'SAY_ATTACK_TREY'), +(11016, 108, 4873.972, -394.919, 349.844, 5000, 'SAY_ESCORT_COMPLETE'), +(11016, 109, 4873.972, -394.919, 349.844, 1000, ''), +(11016, 110, 4863.016, -394.521, 350.650, 0, ''), +(11016, 111, 4848.696, -397.612, 351.215, 0, ''); + -- EOF diff --git a/sql/updates/r3023_mangos.sql b/sql/updates/r3023_mangos.sql new file mode 100644 index 000000000..892405819 --- /dev/null +++ b/sql/updates/r3023_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_captured_arkonarin' WHERE entry=11016; diff --git a/sql/updates/r3023_scriptdev2.sql b/sql/updates/r3023_scriptdev2.sql new file mode 100644 index 000000000..869977199 --- /dev/null +++ b/sql/updates/r3023_scriptdev2.sql @@ -0,0 +1,128 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1001158 AND -1001148; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1001148,'I am ready, $N. Let\'s find my equipment and get out of here. I think I know where it is.',0,0,0,1,'captured arko\'narin SAY_ESCORT_START'), +(-1001149,'Oh my! Look at this... all these candles. I\'m sure they\'re used for some terrible ritual or dark summoning. We best make haste.',0,0,0,18,'captured arko\'narin SAY_FIRST_STOP'), +(-1001150,'There! Over there!',0,0,0,25,'captured arko\'narin SAY_SECOND_STOP'), +(-1001151,'You will not stop me from escaping here, $N!',0,0,0,0,'captured arko\'narin SAY_AGGRO'), +(-1001152,'All I need now is a golden lasso.',0,0,0,0,'captured arko\'narin SAY_EQUIPMENT'), +(-1001153,'DIE DEMON DOGS!',0,0,0,0,'captured arko\'narin SAY_ESCAPE'), +(-1001154,'Ah! Fresh air at last! I never thought I\'d see the day.',0,0,0,4,'captured arko\'narin SAY_FRESH_AIR'), +(-1001155,'BETRAYER!',0,1,0,0,'spirit of trey lightforge SAY_BETRAYER'), +(-1001156,'What was that?! Trey? TREY?',0,0,0,22,'captured arko\'narin SAY_TREY'), +(-1001157,'You kept me in the cell for too long, monster!',0,0,0,0,'captured arko\'narin SAY_ATTACK_TREY'), +(-1001158,'No! My friend... what\'s happened? This is all my fault...',0,0,0,18,'captured arko\'narin SAY_ESCORT_COMPLETE'); + +DELETE FROM script_waypoint WHERE entry=11016; +INSERT INTO script_waypoint VALUES +(11016, 0, 5004.985, -440.237, 319.059, 4000, 'SAY_ESCORT_START'), +(11016, 1, 4992.224, -449.964, 317.057, 0, ''), +(11016, 2, 4988.549, -457.438, 316.289, 0, ''), +(11016, 3, 4989.978, -464.297, 316.846, 0, ''), +(11016, 4, 4994.038, -467.754, 318.055, 0, ''), +(11016, 5, 5002.307, -466.318, 319.965, 0, ''), +(11016, 6, 5011.801, -462.889, 321.501, 0, ''), +(11016, 7, 5020.533, -460.797, 321.970, 0, ''), +(11016, 8, 5026.836, -463.171, 321.345, 0, ''), +(11016, 9, 5028.663, -476.805, 318.726, 0, ''), +(11016, 10, 5029.503, -487.131, 318.179, 0, ''), +(11016, 11, 5031.178, -497.678, 316.533, 0, ''), +(11016, 12, 5032.720, -504.748, 314.744, 0, ''), +(11016, 13, 5034.997, -513.138, 314.372, 0, ''), +(11016, 14, 5037.493, -521.733, 313.221, 6000, 'SAY_FIRST_STOP'), +(11016, 15, 5049.055, -519.546, 313.221, 0, ''), +(11016, 16, 5059.170, -522.930, 313.221, 0, ''), +(11016, 17, 5062.755, -529.933, 313.221, 0, ''), +(11016, 18, 5063.896, -538.827, 313.221, 0, ''), +(11016, 19, 5062.223, -545.635, 313.221, 0, ''), +(11016, 20, 5061.690, -552.333, 313.101, 0, ''), +(11016, 21, 5060.333, -560.349, 310.873, 0, ''), +(11016, 22, 5055.621, -565.541, 308.737, 0, ''), +(11016, 23, 5049.803, -567.604, 306.537, 0, ''), +(11016, 24, 5043.011, -564.946, 303.682, 0, ''), +(11016, 25, 5038.221, -559.823, 301.463, 0, ''), +(11016, 26, 5039.456, -548.675, 297.824, 0, ''), +(11016, 27, 5043.437, -538.807, 297.801, 0, ''), +(11016, 28, 5056.397, -528.954, 297.801, 0, ''), +(11016, 29, 5064.397, -521.904, 297.801, 0, ''), +(11016, 30, 5067.616, -512.999, 297.196, 0, ''), +(11016, 31, 5065.990, -505.329, 297.214, 0, ''), +(11016, 32, 5062.238, -499.086, 297.448, 0, ''), +(11016, 33, 5065.087, -492.069, 298.054, 0, ''), +(11016, 34, 5071.195, -491.173, 297.666, 5000, 'SAY_SECOND_STOP'), +(11016, 35, 5087.474, -496.478, 296.677, 0, ''), +(11016, 36, 5095.552, -508.639, 296.677, 0, ''), +(11016, 37, 5104.300, -521.014, 296.677, 0, ''), +(11016, 38, 5110.132, -532.123, 296.677, 4000, 'open equipment chest'), +(11016, 39, 5110.132, -532.123, 296.677, 4000, 'cast SPELL_STRENGHT_ARKONARIN'), +(11016, 40, 5110.132, -532.123, 296.677, 4000, 'SAY_EQUIPMENT'), +(11016, 41, 5110.132, -532.123, 296.677, 0, 'SAY_ESCAPE'), +(11016, 42, 5099.748, -510.823, 296.677, 0, ''), +(11016, 43, 5091.944, -497.516, 296.677, 0, ''), +(11016, 44, 5079.375, -486.811, 297.638, 0, ''), +(11016, 45, 5069.212, -488.770, 298.082, 0, ''), +(11016, 46, 5064.242, -496.051, 297.275, 0, ''), +(11016, 47, 5065.084, -505.239, 297.361, 0, ''), +(11016, 48, 5067.818, -515.245, 297.125, 0, ''), +(11016, 49, 5064.617, -521.170, 297.801, 0, ''), +(11016, 50, 5053.221, -530.739, 297.801, 0, ''), +(11016, 51, 5045.725, -538.311, 297.801, 0, ''), +(11016, 52, 5039.695, -548.112, 297.801, 0, ''), +(11016, 53, 5038.778, -557.588, 300.787, 0, ''), +(11016, 54, 5042.014, -566.749, 303.838, 0, ''), +(11016, 55, 5050.555, -568.149, 306.782, 0, ''), +(11016, 56, 5056.979, -564.674, 309.342, 0, ''), +(11016, 57, 5060.791, -556.801, 311.936, 0, ''), +(11016, 58, 5059.581, -551.626, 313.221, 0, ''), +(11016, 59, 5062.826, -541.994, 313.221, 0, ''), +(11016, 60, 5063.554, -531.288, 313.221, 0, ''), +(11016, 61, 5057.934, -523.088, 313.221, 0, ''), +(11016, 62, 5049.471, -519.360, 313.221, 0, ''), +(11016, 63, 5040.789, -519.809, 313.221, 0, ''), +(11016, 64, 5034.299, -515.361, 313.948, 0, ''), +(11016, 65, 5032.001, -505.532, 314.663, 0, ''), +(11016, 66, 5029.915, -495.645, 316.821, 0, ''), +(11016, 67, 5028.871, -487.000, 318.179, 0, ''), +(11016, 68, 5028.109, -475.531, 318.839, 0, ''), +(11016, 69, 5027.759, -465.442, 320.643, 0, ''), +(11016, 70, 5019.955, -460.892, 321.969, 0, ''), +(11016, 71, 5009.426, -464.793, 321.248, 0, ''), +(11016, 72, 4999.567, -468.062, 319.426, 0, ''), +(11016, 73, 4992.034, -468.128, 317.894, 0, ''), +(11016, 74, 4988.168, -461.293, 316.369, 0, ''), +(11016, 75, 4990.624, -447.459, 317.104, 0, ''), +(11016, 76, 4993.475, -438.643, 318.272, 0, ''), +(11016, 77, 4995.451, -430.178, 318.462, 0, ''), +(11016, 78, 4993.564, -422.876, 318.864, 0, ''), +(11016, 79, 4985.401, -420.864, 320.205, 0, ''), +(11016, 80, 4976.515, -426.168, 323.112, 0, ''), +(11016, 81, 4969.832, -429.755, 325.029, 0, ''), +(11016, 82, 4960.702, -425.440, 325.834, 0, ''), +(11016, 83, 4955.447, -418.765, 327.433, 0, ''), +(11016, 84, 4949.702, -408.796, 328.004, 0, ''), +(11016, 85, 4940.017, -403.222, 329.956, 0, ''), +(11016, 86, 4934.982, -401.475, 330.898, 0, ''), +(11016, 87, 4928.693, -399.302, 331.744, 0, ''), +(11016, 88, 4926.935, -398.436, 333.079, 0, ''), +(11016, 89, 4916.163, -393.822, 333.729, 0, ''), +(11016, 90, 4908.393, -396.217, 333.217, 0, ''), +(11016, 91, 4905.610, -396.535, 335.050, 0, ''), +(11016, 92, 4897.876, -395.245, 337.346, 0, ''), +(11016, 93, 4895.206, -388.203, 339.295, 0, ''), +(11016, 94, 4896.945, -382.429, 341.040, 0, ''), +(11016, 95, 4901.885, -378.799, 342.771, 0, ''), +(11016, 96, 4908.087, -380.635, 344.597, 0, ''), +(11016, 97, 4911.910, -385.818, 346.491, 0, ''), +(11016, 98, 4910.104, -393.444, 348.798, 0, ''), +(11016, 99, 4903.500, -396.947, 350.812, 0, ''), +(11016, 100, 4898.083, -394.226, 351.821, 0, ''), +(11016, 101, 4891.333, -393.436, 351.801, 0, ''), +(11016, 102, 4881.203, -395.211, 351.590, 0, ''), +(11016, 103, 4877.843, -395.536, 349.713, 0, ''), +(11016, 104, 4873.972, -394.919, 349.844, 5000, 'SAY_FRESH_AIR'), +(11016, 105, 4873.972, -394.919, 349.844, 3000, 'SAY_BETRAYER'), +(11016, 106, 4873.972, -394.919, 349.844, 2000, 'SAY_TREY'), +(11016, 107, 4873.972, -394.919, 349.844, 0, 'SAY_ATTACK_TREY'), +(11016, 108, 4873.972, -394.919, 349.844, 5000, 'SAY_ESCORT_COMPLETE'), +(11016, 109, 4873.972, -394.919, 349.844, 1000, ''), +(11016, 110, 4863.016, -394.521, 350.650, 0, ''), +(11016, 111, 4848.696, -397.612, 351.215, 0, ''); From 92199ab1a64b0b5519734a3f477510be14eeb953 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Tue, 8 Jul 2014 00:03:37 +0200 Subject: [PATCH 1035/1172] [3024] Implement script support for quest 4261 Thanks to @grz3s for providing the data Part of #27 --- scripts/kalimdor/felwood.cpp | 194 ++++++++++++++++++++++++++++++- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 + sql/scriptdev2_script_full.sql | 52 ++++++++- sql/updates/r3024_mangos.sql | 1 + sql/updates/r3024_scriptdev2.sql | 51 ++++++++ 6 files changed, 298 insertions(+), 3 deletions(-) create mode 100644 sql/updates/r3024_mangos.sql create mode 100644 sql/updates/r3024_scriptdev2.sql diff --git a/scripts/kalimdor/felwood.cpp b/scripts/kalimdor/felwood.cpp index 661a55cc6..44bdc1545 100644 --- a/scripts/kalimdor/felwood.cpp +++ b/scripts/kalimdor/felwood.cpp @@ -17,7 +17,7 @@ /* ScriptData SDName: Felwood SD%Complete: 95 -SDComment: Quest support: 4506, 5203, 7603, 7603 (Summon Pollo Grande) +SDComment: Quest support: 4261, 4506, 5203, 7603, 7603 (Summon Pollo Grande) SDCategory: Felwood EndScriptData */ @@ -26,6 +26,7 @@ npc_kitten npc_niby_the_almighty npc_kroshius npc_captured_arkonarin +npc_arei EndContentData */ #include "precompiled.h" @@ -590,6 +591,191 @@ bool QuestAccept_npc_captured_arkonarin(Player* pPlayer, Creature* pCreature, co return true; } +/*#### +# npc_arei +####*/ + +enum +{ + SAY_AREI_ESCORT_START = -1001159, + SAY_ATTACK_IRONTREE = -1001160, + SAY_ATTACK_TOXIC_HORROR = -1001161, + SAY_EXIT_WOODS = -1001162, + SAY_CLEAR_PATH = -1001163, + SAY_ASHENVALE = -1001164, + SAY_TRANSFORM = -1001165, + SAY_LIFT_CURSE = -1001166, + SAY_AREI_ESCORT_COMPLETE = -1001167, + + SPELL_WITHER_STRIKE = 5337, + SPELL_AREI_TRANSFORM = 14888, + + NPC_AREI = 9598, + NPC_TOXIC_HORROR = 7132, + NPC_IRONTREE_WANDERER = 7138, + NPC_IRONTREE_STOMPER = 7139, + QUEST_ID_ANCIENT_SPIRIT = 4261, +}; + +static const DialogueEntry aEpilogDialogue[] = +{ + {SAY_CLEAR_PATH, NPC_AREI, 4000}, + {SPELL_WITHER_STRIKE, 0, 5000}, + {SAY_TRANSFORM, NPC_AREI, 3000}, + {SPELL_AREI_TRANSFORM, 0, 7000}, + {QUEST_ID_ANCIENT_SPIRIT, 0, 0}, + {0, 0, 0}, +}; + +struct MANGOS_DLL_DECL npc_areiAI : public npc_escortAI, private DialogueHelper +{ + npc_areiAI(Creature* pCreature) : npc_escortAI(pCreature), + DialogueHelper(aEpilogDialogue) + { + m_bAggroIrontree = false; + m_bAggroHorror = false; + Reset(); + } + + uint32 m_uiWitherStrikeTimer; + + bool m_bAggroIrontree; + bool m_bAggroHorror; + + GuidList m_lSummonsGuids; + + void Reset() override + { + m_uiWitherStrikeTimer = urand(1000, 4000); + } + + void Aggro(Unit* pWho) override + { + if ((pWho->GetEntry() == NPC_IRONTREE_WANDERER || pWho->GetEntry() == NPC_IRONTREE_STOMPER) && !m_bAggroIrontree) + { + DoScriptText(SAY_ATTACK_IRONTREE, m_creature); + m_bAggroIrontree = true; + } + else if (pWho->GetEntry() == NPC_TOXIC_HORROR && ! m_bAggroHorror) + { + if (Player* pPlayer = GetPlayerForEscort()) + DoScriptText(SAY_ATTACK_TOXIC_HORROR, m_creature, pPlayer); + m_bAggroHorror = true; + } + } + + void JustSummoned(Creature* pSummoned) override + { + switch (pSummoned->GetEntry()) + { + case NPC_IRONTREE_STOMPER: + DoScriptText(SAY_EXIT_WOODS, m_creature, pSummoned); + // no break; + case NPC_IRONTREE_WANDERER: + pSummoned->AI()->AttackStart(m_creature); + m_lSummonsGuids.push_back(pSummoned->GetObjectGuid()); + break; + } + } + + void SummonedCreatureJustDied(Creature* pSummoned) override + { + if (pSummoned->GetEntry() == NPC_IRONTREE_STOMPER || pSummoned->GetEntry() == NPC_IRONTREE_WANDERER) + { + m_lSummonsGuids.remove(pSummoned->GetObjectGuid()); + + if (m_lSummonsGuids.empty()) + StartNextDialogueText(SAY_CLEAR_PATH); + } + } + + void ReceiveAIEvent(AIEventType eventType, Creature* /*pSender*/, Unit* pInvoker, uint32 uiMiscValue) override + { + if (eventType == AI_EVENT_START_ESCORT && pInvoker->GetTypeId() == TYPEID_PLAYER) + { + DoScriptText(SAY_AREI_ESCORT_START, m_creature, pInvoker); + + m_creature->SetFactionTemporary(FACTION_ESCORT_N_NEUTRAL_PASSIVE, TEMPFACTION_RESTORE_RESPAWN); + Start(true, (Player*)pInvoker, GetQuestTemplateStore(uiMiscValue)); + } + } + + void WaypointReached(uint32 uiPointId) override + { + if (uiPointId == 36) + { + SetEscortPaused(true); + + m_creature->SummonCreature(NPC_IRONTREE_STOMPER, 6573.321f, -1195.213f, 442.489f, 0, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 60000); + m_creature->SummonCreature(NPC_IRONTREE_WANDERER, 6573.240f, -1213.475f, 443.643f, 0, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 60000); + m_creature->SummonCreature(NPC_IRONTREE_WANDERER, 6583.354f, -1209.811f, 444.769f, 0, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 60000); + } + } + + Creature* GetSpeakerByEntry(uint32 uiEntry) override + { + if (uiEntry == NPC_AREI) + return m_creature; + + return NULL; + } + + void JustDidDialogueStep(int32 iEntry) override + { + switch (iEntry) + { + case SPELL_WITHER_STRIKE: + if (Player* pPlayer = GetPlayerForEscort()) + DoScriptText(SAY_ASHENVALE, m_creature, pPlayer); + break; + case SPELL_AREI_TRANSFORM: + DoCastSpellIfCan(m_creature, SPELL_AREI_TRANSFORM); + if (Player* pPlayer = GetPlayerForEscort()) + DoScriptText(SAY_LIFT_CURSE, m_creature, pPlayer); + break; + case QUEST_ID_ANCIENT_SPIRIT: + if (Player* pPlayer = GetPlayerForEscort()) + { + DoScriptText(SAY_AREI_ESCORT_COMPLETE, m_creature, pPlayer); + pPlayer->GroupEventHappens(QUEST_ID_ANCIENT_SPIRIT, m_creature); + m_creature->ForcedDespawn(10000); + } + break; + } + } + + void UpdateEscortAI(const uint32 uiDiff) override + { + DialogueUpdate(uiDiff); + + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_uiWitherStrikeTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_WITHER_STRIKE) == CAST_OK) + m_uiWitherStrikeTimer = urand(3000, 6000); + } + else + m_uiWitherStrikeTimer -= uiDiff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_npc_arei(Creature* pCreature) +{ + return new npc_areiAI(pCreature); +} + +bool QuestAccept_npc_arei(Player* pPlayer, Creature* pCreature, const Quest* pQuest) +{ + if (pQuest->GetQuestId() == QUEST_ID_ANCIENT_SPIRIT) + pCreature->AI()->SendAIEvent(AI_EVENT_START_ESCORT, pPlayer, pCreature, pQuest->GetQuestId()); + + return true; +} + void AddSC_felwood() { Script* pNewScript; @@ -623,4 +809,10 @@ void AddSC_felwood() pNewScript->GetAI = &GetAI_npc_captured_arkonarin; pNewScript->pQuestAcceptNPC = &QuestAccept_npc_captured_arkonarin; pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_arei"; + pNewScript->GetAI = &GetAI_npc_arei; + pNewScript->pQuestAcceptNPC = &QuestAccept_npc_arei; + pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index f447bb3de..a6b979453 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3023" + #define SD2_REVISION_NR "3024" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index b3d33cdb7..d3de32d58 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -588,6 +588,7 @@ UPDATE creature_template SET ScriptName='npc_corrupt_saber' WHERE entry=10042; UPDATE creature_template SET ScriptName='npc_niby_the_almighty' WHERE entry=14469; UPDATE creature_template SET ScriptName='npc_kroshius' WHERE entry=14467; UPDATE creature_template SET ScriptName='npc_captured_arkonarin' WHERE entry=11016; +UPDATE creature_template SET ScriptName='npc_arei' WHERE entry=9598; /* FERALAS */ UPDATE creature_template SET ScriptName='npc_oox22fe' WHERE entry=7807; diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 4ccae2ac2..29cb82787 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -1255,7 +1255,17 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1001155,'BETRAYER!',0,1,0,0,'spirit of trey lightforge SAY_BETRAYER'), (-1001156,'What was that?! Trey? TREY?',0,0,0,22,'captured arko\'narin SAY_TREY'), (-1001157,'You kept me in the cell for too long, monster!',0,0,0,0,'captured arko\'narin SAY_ATTACK_TREY'), -(-1001158,'No! My friend... what\'s happened? This is all my fault...',0,0,0,18,'captured arko\'narin SAY_ESCORT_COMPLETE'); +(-1001158,'No! My friend... what\'s happened? This is all my fault...',0,0,0,18,'captured arko\'narin SAY_ESCORT_COMPLETE'), + +(-1001159,'Please, help me to get through this cursed forest, $r.',0,0,0,0,'arei SAY_ESCORT_START'), +(-1001160,'This creature suffers from the effect of the fel... We must end its misery.',0,0,0,0,'arei SAY_ATTACK_IRONTREE'), +(-1001161,'The corruption of the fel has not left any of the creatures of Felwood untouched, $N. Please, be on your guard.',0,0,0,0,'arei SAY_ATTACK_TOXIC_HORROR'), +(-1001162,'I sense the taint of corruption upon this $N. Help me detroy it.',0,0,0,0,'arei SAY_EXIT_WOODS'), +(-1001163,'That I must fight against my own kind deeply saddens me.',0,0,0,0,'arei SAY_CLEAR_PATH'), +(-1001164,'I can sens it now, $N. Ashenvale lies down this path.',0,0,0,0,'arei SAY_ASHENVALE'), +(-1001165,'I feel... something strange...',0,0,0,0,'arei SAY_TRANSFORM'), +(-1001166,'$N my form has now changed! The true strength of my spirit is returing to me now... The cursed grasp of the forest is leaving me.',0,0,0,0,'arei SAY_LIFT_CURSE'), +(-1001167,'Thank you, $N. Now my spirit will finally be at peace.',0,0,0,0,'arei SAY_ESCORT_COMPLETE'); -- -1 033 000 SHADOWFANG KEEP INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES @@ -8454,4 +8464,44 @@ INSERT INTO script_waypoint VALUES (11016, 110, 4863.016, -394.521, 350.650, 0, ''), (11016, 111, 4848.696, -397.612, 351.215, 0, ''); +DELETE FROM script_waypoint WHERE entry=9598; +INSERT INTO script_waypoint VALUES +(9598, 0, 6004.265, -1180.494, 376.377, 0, 'SAY_ESCORT_START'), +(9598, 1, 6002.512, -1157.294, 381.407, 0, ''), +(9598, 2, 6029.228, -1139.720, 383.127, 0, ''), +(9598, 3, 6042.479, -1128.963, 386.582, 0, ''), +(9598, 4, 6062.820, -1115.522, 386.850, 0, ''), +(9598, 5, 6089.188, -1111.907, 383.105, 0, ''), +(9598, 6, 6104.390, -1114.561, 380.490, 0, ''), +(9598, 7, 6115.080, -1128.572, 375.779, 0, ''), +(9598, 8, 6119.352, -1147.314, 372.518, 0, ''), +(9598, 9, 6119.003, -1176.082, 371.072, 0, ''), +(9598, 10, 6120.982, -1198.408, 373.432, 0, ''), +(9598, 11, 6123.521, -1226.636, 374.119, 0, ''), +(9598, 12, 6127.737, -1246.035, 373.574, 0, ''), +(9598, 13, 6133.433, -1253.642, 369.100, 0, ''), +(9598, 14, 6150.787, -1269.151, 369.240, 0, ''), +(9598, 15, 6155.805, -1275.029, 373.627, 0, ''), +(9598, 16, 6163.544, -1307.130, 376.234, 0, ''), +(9598, 17, 6174.800, -1340.885, 379.039, 0, ''), +(9598, 18, 6191.144, -1371.260, 378.453, 0, ''), +(9598, 19, 6215.652, -1397.517, 376.012, 0, ''), +(9598, 20, 6243.784, -1407.675, 371.594, 0, ''), +(9598, 21, 6280.775, -1408.259, 370.554, 0, ''), +(9598, 22, 6325.360, -1406.688, 370.082, 0, ''), +(9598, 23, 6355.000, -1404.337, 370.646, 0, ''), +(9598, 24, 6374.679, -1399.176, 372.105, 0, ''), +(9598, 25, 6395.803, -1367.057, 374.910, 0, ''), +(9598, 26, 6408.569, -1333.487, 376.616, 0, ''), +(9598, 27, 6409.075, -1312.168, 379.598, 0, ''), +(9598, 28, 6418.689, -1277.697, 381.638, 0, ''), +(9598, 29, 6441.689, -1247.316, 387.246, 0, ''), +(9598, 30, 6462.136, -1226.316, 397.610, 0, ''), +(9598, 31, 6478.021, -1216.260, 408.284, 0, ''), +(9598, 32, 6499.632, -1217.087, 419.461, 0, ''), +(9598, 33, 6523.165, -1220.780, 430.549, 0, ''), +(9598, 34, 6542.716, -1216.997, 437.788, 0, ''), +(9598, 35, 6557.279, -1211.125, 441.452, 0, ''), +(9598, 36, 6574.568, -1204.589, 443.216, 0, 'SAY_EXIT_IRONTREE'); + -- EOF diff --git a/sql/updates/r3024_mangos.sql b/sql/updates/r3024_mangos.sql new file mode 100644 index 000000000..fa66c0988 --- /dev/null +++ b/sql/updates/r3024_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_arei' WHERE entry=9598; diff --git a/sql/updates/r3024_scriptdev2.sql b/sql/updates/r3024_scriptdev2.sql new file mode 100644 index 000000000..dfe9c20d7 --- /dev/null +++ b/sql/updates/r3024_scriptdev2.sql @@ -0,0 +1,51 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1001167 AND -1001159; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1001159,'Please, help me to get through this cursed forest, $r.',0,0,0,0,'arei SAY_ESCORT_START'), +(-1001160,'This creature suffers from the effect of the fel... We must end its misery.',0,0,0,0,'arei SAY_ATTACK_IRONTREE'), +(-1001161,'The corruption of the fel has not left any of the creatures of Felwood untouched, $N. Please, be on your guard.',0,0,0,0,'arei SAY_ATTACK_TOXIC_HORROR'), +(-1001162,'I sense the taint of corruption upon this $N. Help me detroy it.',0,0,0,0,'arei SAY_EXIT_WOODS'), +(-1001163,'That I must fight against my own kind deeply saddens me.',0,0,0,0,'arei SAY_CLEAR_PATH'), +(-1001164,'I can sens it now, $N. Ashenvale lies down this path.',0,0,0,0,'arei SAY_ASHENVALE'), +(-1001165,'I feel... something strange...',0,0,0,0,'arei SAY_TRANSFORM'), +(-1001166,'$N my form has now changed! The true strength of my spirit is returing to me now... The cursed grasp of the forest is leaving me.',0,0,0,0,'arei SAY_LIFT_CURSE'), +(-1001167,'Thank you, $N. Now my spirit will finally be at peace.',0,0,0,0,'arei SAY_ESCORT_COMPLETE'); + +DELETE FROM script_waypoint WHERE entry=9598; +INSERT INTO script_waypoint VALUES +(9598, 0, 6004.265, -1180.494, 376.377, 0, 'SAY_ESCORT_START'), +(9598, 1, 6002.512, -1157.294, 381.407, 0, ''), +(9598, 2, 6029.228, -1139.720, 383.127, 0, ''), +(9598, 3, 6042.479, -1128.963, 386.582, 0, ''), +(9598, 4, 6062.820, -1115.522, 386.850, 0, ''), +(9598, 5, 6089.188, -1111.907, 383.105, 0, ''), +(9598, 6, 6104.390, -1114.561, 380.490, 0, ''), +(9598, 7, 6115.080, -1128.572, 375.779, 0, ''), +(9598, 8, 6119.352, -1147.314, 372.518, 0, ''), +(9598, 9, 6119.003, -1176.082, 371.072, 0, ''), +(9598, 10, 6120.982, -1198.408, 373.432, 0, ''), +(9598, 11, 6123.521, -1226.636, 374.119, 0, ''), +(9598, 12, 6127.737, -1246.035, 373.574, 0, ''), +(9598, 13, 6133.433, -1253.642, 369.100, 0, ''), +(9598, 14, 6150.787, -1269.151, 369.240, 0, ''), +(9598, 15, 6155.805, -1275.029, 373.627, 0, ''), +(9598, 16, 6163.544, -1307.130, 376.234, 0, ''), +(9598, 17, 6174.800, -1340.885, 379.039, 0, ''), +(9598, 18, 6191.144, -1371.260, 378.453, 0, ''), +(9598, 19, 6215.652, -1397.517, 376.012, 0, ''), +(9598, 20, 6243.784, -1407.675, 371.594, 0, ''), +(9598, 21, 6280.775, -1408.259, 370.554, 0, ''), +(9598, 22, 6325.360, -1406.688, 370.082, 0, ''), +(9598, 23, 6355.000, -1404.337, 370.646, 0, ''), +(9598, 24, 6374.679, -1399.176, 372.105, 0, ''), +(9598, 25, 6395.803, -1367.057, 374.910, 0, ''), +(9598, 26, 6408.569, -1333.487, 376.616, 0, ''), +(9598, 27, 6409.075, -1312.168, 379.598, 0, ''), +(9598, 28, 6418.689, -1277.697, 381.638, 0, ''), +(9598, 29, 6441.689, -1247.316, 387.246, 0, ''), +(9598, 30, 6462.136, -1226.316, 397.610, 0, ''), +(9598, 31, 6478.021, -1216.260, 408.284, 0, ''), +(9598, 32, 6499.632, -1217.087, 419.461, 0, ''), +(9598, 33, 6523.165, -1220.780, 430.549, 0, ''), +(9598, 34, 6542.716, -1216.997, 437.788, 0, ''), +(9598, 35, 6557.279, -1211.125, 441.452, 0, ''), +(9598, 36, 6574.568, -1204.589, 443.216, 0, 'SAY_EXIT_IRONTREE'); From 15a19b043cb2f1225c25ff062eaef4e8aeb04ceb Mon Sep 17 00:00:00 2001 From: Xfurry Date: Tue, 8 Jul 2014 23:34:29 +0200 Subject: [PATCH 1036/1172] [3025] Disable AI attack for controllable vehicles. Requires CMaNGOS 12682+ --- include/sc_creature.cpp | 3 +++ sd2_revision_nr.h | 2 +- sql/scriptdev2_script_full.sql | 2 +- sql/updates/r3025_scriptdev2.sql | 1 + 4 files changed, 6 insertions(+), 2 deletions(-) create mode 100644 sql/updates/r3025_scriptdev2.sql diff --git a/include/sc_creature.cpp b/include/sc_creature.cpp index 0a16c3003..793ca3927 100644 --- a/include/sc_creature.cpp +++ b/include/sc_creature.cpp @@ -77,6 +77,9 @@ void ScriptedAI::MoveInLineOfSight(Unit* pWho) */ void ScriptedAI::AttackStart(Unit* pWho) { + if (!pWho || !m_creature->CanAttackByItself()) + return; + if (pWho && m_creature->Attack(pWho, true)) // The Attack function also uses basic checks if pWho can be attacked { m_creature->AddThreat(pWho); diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index a6b979453..b62dd2293 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3024" + #define SD2_REVISION_NR "3025" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 29cb82787..827d11f2d 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -3,7 +3,7 @@ -- DELETE FROM sd2_db_version; -INSERT INTO sd2_db_version (version) VALUES ('ScriptDev2 (for CMaNGOS 12674+) '); +INSERT INTO sd2_db_version (version) VALUES ('ScriptDev2 (for CMaNGOS 12682+) '); -- -- Below contains data for table `script_texts` mainly used in C++ parts. diff --git a/sql/updates/r3025_scriptdev2.sql b/sql/updates/r3025_scriptdev2.sql new file mode 100644 index 000000000..1aa4d2fb1 --- /dev/null +++ b/sql/updates/r3025_scriptdev2.sql @@ -0,0 +1 @@ +UPDATE sd2_db_version SET version='ScriptDev2 (for CMaNGOS 12682+) '; From f6933a8e79ea437adb89431c5e98e48451e0ee78 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Wed, 9 Jul 2014 22:08:30 +0200 Subject: [PATCH 1037/1172] [3026] Improve previous commit --- include/sc_creature.cpp | 5 ++++- sd2_revision_nr.h | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/include/sc_creature.cpp b/include/sc_creature.cpp index 793ca3927..ea5d61296 100644 --- a/include/sc_creature.cpp +++ b/include/sc_creature.cpp @@ -77,7 +77,7 @@ void ScriptedAI::MoveInLineOfSight(Unit* pWho) */ void ScriptedAI::AttackStart(Unit* pWho) { - if (!pWho || !m_creature->CanAttackByItself()) + if (!m_creature->CanAttackByItself()) return; if (pWho && m_creature->Attack(pWho, true)) // The Attack function also uses basic checks if pWho can be attacked @@ -586,6 +586,9 @@ void Scripted_NoMovementAI::GetAIInformation(ChatHandler& reader) void Scripted_NoMovementAI::AttackStart(Unit* pWho) { + if (!m_creature->CanAttackByItself()) + return; + if (pWho && m_creature->Attack(pWho, true)) { m_creature->AddThreat(pWho); diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index b62dd2293..01eca65c7 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3025" + #define SD2_REVISION_NR "3026" #endif // __SD2_REVISION_NR_H__ From 1b5198593018dc7be6079d187f589199642c365f Mon Sep 17 00:00:00 2001 From: Xfurry Date: Thu, 10 Jul 2014 00:43:49 +0200 Subject: [PATCH 1038/1172] [3027] Implement combat abilities for Yogg Saron - Ulduar --- .../ulduar/ulduar/boss_yogg_saron.cpp | 411 ++++++++++++++---- sd2_revision_nr.h | 2 +- 2 files changed, 321 insertions(+), 92 deletions(-) diff --git a/scripts/northrend/ulduar/ulduar/boss_yogg_saron.cpp b/scripts/northrend/ulduar/ulduar/boss_yogg_saron.cpp index d6fb429ee..42bf2c21e 100644 --- a/scripts/northrend/ulduar/ulduar/boss_yogg_saron.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_yogg_saron.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: boss_yogg_saron -SD%Complete: 20% -SDComment: Encounter is incomplete; only phase 1 is partially implemented. +SD%Complete: 50% +SDComment: Partially implemented. Not fully playable yet. SDCategory: Ulduar EndScriptData */ @@ -112,22 +112,33 @@ enum SPELL_RIDE_VEHICLE_YOGG = 61791, // mount vehicle Yogg // Vision phase spells - SPELL_PHYCHOSIS = 65301, // Sara combat spells - SPELL_PHYCHOSIS_H = 63795, + SPELL_PHYCHOSIS = 63795, // Sara combat spells + SPELL_PHYCHOSIS_H = 65301, SPELL_MALADY_OF_THE_MIND = 63830, SPELL_BRAIN_LINK = 63802, SPELL_DEATH_RAY_SUMMON = 63891, - SPELL_CORRUPTOR_TENTACLE = 64143, // tentacle spawn spells + // Tentacle spawn spells + SPELL_CONSTRICTOR_TENTACLE = 64132, // triggers 64133 + SPELL_CORRUPTOR_TENTACLE = 64143, SPELL_CRUSHER_TENTACLE = 64139, - SPELL_CONSTRICTOR_TENTACLE = 64133, + + // Tentacle spells + SPELL_TENTACLE_VOID_ZONE = 64384, + SPELL_ERUPT = 64144, + SPELL_LUNGE = 64131, // triggers 64123 + SPELL_TENTACLE_VOID_ZONE_BIG = 64017, + SPELL_CRUSH = 64146, + SPELL_DIMINISH_POWER = 64148, + SPELL_FOCUSED_ANGER = 57688, // Old God phase spells SPELL_LUNATIC_GAZE_YOGG = 64163, - SPELL_SHADOW_BEACON = 64465, - SPELL_EMPOWERING_SHADOWS = 64468, - SPELL_EMPOWERING_SHADOWS_H = 64486, + SPELL_SHADOW_BEACON = 64465, // trigger 64468 + // SPELL_EMPOWERING_SHADOWS = 64468, + // SPELL_EMPOWERING_SHADOWS_H = 64486, SPELL_DEAFENING_ROAR = 64189, + SPELL_IMMORTAL_GUARDIAN = 64158, // death ray spells SPELL_DEATH_RAY_TRIGG = 63883, @@ -143,6 +154,7 @@ enum SPELL_TELEPORT_BACK_TO_MAIN_ROOM = 63992, // summoned creatures + NPC_DEATH_RAY = 33881, NPC_DEATH_ORB = 33882, NPC_CONSTRICTOR_TENTACLE = 33983, NPC_CRUSHER_TENTACLE = 33966, @@ -179,6 +191,7 @@ enum PHASE_SARA = 1, PHASE_VISIONS = 2, PHASE_OLD_GOD = 3, + PHASE_TRANSITION = 4, }; static const DialogueEntry aYoggSaronDialog[] = @@ -186,8 +199,8 @@ static const DialogueEntry aYoggSaronDialog[] = {SAY_PHASE_2_INTRO_1, NPC_SARA, 4000}, {SAY_PHASE_2_INTRO_2, NPC_SARA, 5000}, {SAY_PHASE_2_INTRO_3, NPC_SARA, 5000}, - {SAY_PHASE_2_INTRO_4, NPC_SARA, 2000}, - {SPELL_PHASE_2_TRANSFORM, 0, 4000}, + {SAY_PHASE_2_INTRO_4, NPC_SARA, 1000}, + {SPELL_PHASE_2_TRANSFORM, 0, 3000}, {SAY_PHASE_2_INTRO_5, NPC_YOGGSARON, 0}, {0, 0, 0}, }; @@ -198,9 +211,9 @@ static const float afYoggSaronSpawn[4] = {1980.43f, -25.7708f, 324.9724f, 3.141f ## boss_sara ######*/ -struct MANGOS_DLL_DECL boss_saraAI : public ScriptedAI, private DialogueHelper +struct MANGOS_DLL_DECL boss_saraAI : public Scripted_NoMovementAI, private DialogueHelper { - boss_saraAI(Creature* pCreature) : ScriptedAI(pCreature), + boss_saraAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature), DialogueHelper(aYoggSaronDialog) { m_pInstance = (instance_ulduar*)pCreature->GetInstanceData(); @@ -215,17 +228,23 @@ struct MANGOS_DLL_DECL boss_saraAI : public ScriptedAI, private DialogueHelper bool m_bIsHostile; uint8 m_uiPhase; - uint32 m_uiSummonGuardianTimer; uint32 m_uiSarasSpellTimer; + uint32 m_uiPsychosisTimer; + uint32 m_uiMaladyTimer; + uint32 m_uiBrainLinkTimer; + uint32 m_uiDeathRayTimer; + void Reset() override { m_uiPhase = PHASE_INTRO; - m_uiSummonGuardianTimer = 1000; m_uiSarasSpellTimer = 15000; m_bIsHostile = false; - SetCombatMovement(false); + m_uiPsychosisTimer = 2000; + m_uiMaladyTimer = 15000; + m_uiBrainLinkTimer = 25000; + m_uiDeathRayTimer = 20000; } void AttackStart(Unit* pWho) override @@ -254,7 +273,12 @@ struct MANGOS_DLL_DECL boss_saraAI : public ScriptedAI, private DialogueHelper DoScriptText(SAY_SARA_AGGRO, m_creature); if (m_pInstance) + { m_pInstance->SetData(TYPE_YOGGSARON, IN_PROGRESS); + + if (Creature* pVoice = m_pInstance->GetSingleCreatureFromStorage(NPC_VOICE_OF_YOGG)) + SendAIEvent(AI_EVENT_START_EVENT, m_creature, pVoice); + } } ScriptedAI::MoveInLineOfSight(pWho); @@ -276,7 +300,7 @@ struct MANGOS_DLL_DECL boss_saraAI : public ScriptedAI, private DialogueHelper if (m_uiPhase == PHASE_SARA) { - m_uiPhase = PHASE_VISIONS; + m_uiPhase = PHASE_TRANSITION; StartNextDialogueText(SAY_PHASE_2_INTRO_1); // despawn all clouds for phase 2 @@ -303,6 +327,11 @@ struct MANGOS_DLL_DECL boss_saraAI : public ScriptedAI, private DialogueHelper pSummoned->CastSpell(pSummoned, SPELL_KNOCK_AWAY, true); pSummoned->SetInCombatWithZone(); } + else if (pSummoned->GetEntry() == NPC_DEATH_ORB) + { + // ToDo: summon 2 death rays + pSummoned->CastSpell(pSummoned, SPELL_DEATH_RAY_VISUAL_ORIGIN, true); + } } void JustDidDialogueStep(int32 iEntry) override @@ -324,6 +353,9 @@ struct MANGOS_DLL_DECL boss_saraAI : public ScriptedAI, private DialogueHelper { if (Creature* pYogg = m_pInstance->GetSingleCreatureFromStorage(NPC_YOGGSARON)) DoCastSpellIfCan(pYogg, SPELL_RIDE_VEHICLE_YOGG, CAST_TRIGGERED); + if (Creature* pVoice = m_pInstance->GetSingleCreatureFromStorage(NPC_VOICE_OF_YOGG)) + SendAIEvent(AI_EVENT_START_EVENT_A, m_creature, pVoice); + m_uiPhase = PHASE_VISIONS; } break; } @@ -331,26 +363,10 @@ struct MANGOS_DLL_DECL boss_saraAI : public ScriptedAI, private DialogueHelper void UpdateAI(const uint32 uiDiff) override { - if (!m_pInstance) - { - script_error_log("Instance Ulduar: ERROR Failed to load instance data for this instace."); - return; - } - DialogueUpdate(uiDiff); if (m_uiPhase == PHASE_SARA) { - if (m_uiSummonGuardianTimer < uiDiff) - { - if (Creature* pVoice = m_pInstance->GetSingleCreatureFromStorage(NPC_VOICE_OF_YOGG)) - pVoice->CastSpell(pVoice, SPELL_SUMMON_GUARDIAN_YOGG, true); - - m_uiSummonGuardianTimer = 20000; - } - else - m_uiSummonGuardianTimer -= uiDiff; - if (m_uiSarasSpellTimer < uiDiff) { CanCastResult castResult; @@ -375,6 +391,42 @@ struct MANGOS_DLL_DECL boss_saraAI : public ScriptedAI, private DialogueHelper if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; + + if (m_uiPhase == PHASE_VISIONS) + { + if (m_uiPsychosisTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_PHYCHOSIS : SPELL_PHYCHOSIS_H) == CAST_OK) + m_uiPsychosisTimer = urand(3000, 4000); + } + else + m_uiPsychosisTimer -= uiDiff; + + if (m_uiMaladyTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_MALADY_OF_THE_MIND) == CAST_OK) + m_uiMaladyTimer = 15000; + } + else + m_uiMaladyTimer -= uiDiff; + + if (m_uiBrainLinkTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_BRAIN_LINK) == CAST_OK) + m_uiBrainLinkTimer = 25000; + } + else + m_uiBrainLinkTimer -= uiDiff; + + if (m_uiDeathRayTimer < uiDiff) + { + // spawn death orb at predefined location + m_creature->CastSpell(1980.43f, -25.7708f, 351.5418f, SPELL_DEATH_RAY_SUMMON, true); + m_uiDeathRayTimer = 20000; + } + else + m_uiDeathRayTimer -= uiDiff; + } } }; @@ -401,9 +453,16 @@ struct MANGOS_DLL_DECL boss_yogg_saronAI : public Scripted_NoMovementAI uint8 m_uiPhase; + uint32 m_uiLunaticGazeTimer; + uint32 m_uiDeafeningRoarTimer; + void Reset() override { m_uiPhase = PHASE_VISIONS; + m_uiLunaticGazeTimer = 15000; + + if (m_pInstance) + m_uiDeafeningRoarTimer = (!m_bIsRegularMode && m_pInstance->GetData(TYPE_YOGGSARON_HARD) >= 1) ? 20000 : 0; } void JustReachedHome() override @@ -424,70 +483,50 @@ struct MANGOS_DLL_DECL boss_yogg_saronAI : public Scripted_NoMovementAI { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - } -}; - -CreatureAI* GetAI_boss_yogg_saron(Creature* pCreature) -{ - return new boss_yogg_saronAI(pCreature); -} - -/*###### -## npc_ominous_cloud -######*/ - -struct MANGOS_DLL_DECL npc_ominous_cloudAI : public Scripted_NoMovementAI -{ - npc_ominous_cloudAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { Reset(); } - - uint32 m_uiDelayTimer; - - void Reset() override - { - m_uiDelayTimer = 0; - } - - void AttackStart(Unit* /*pWho*/) override { } - void MoveInLineOfSight(Unit* pWho) override - { - if (!m_uiDelayTimer && pWho->GetTypeId() == TYPEID_PLAYER && !((Player*)pWho)->isGameMaster() && m_creature->IsWithinDistInMap(pWho, 7.0f)) + // switch to last phase when HP is dropped to 30% + if (m_uiPhase == PHASE_VISIONS && m_creature->GetHealthPercent() < 30.0f) { - if (DoCastSpellIfCan(m_creature, SPELL_BOIL_OMNIOUSLY) == CAST_OK) + DoScriptText(SAY_PHASE_3, m_creature); + m_uiPhase = PHASE_OLD_GOD; + DoCastSpellIfCan(m_creature, SPELL_SHADOW_BEACON); + + if (m_pInstance) { - DoScriptText(EMOTE_CLOUD_BOIL, m_creature, pWho); - m_uiDelayTimer = 10000; + if (Creature* pSara = m_pInstance->GetSingleCreatureFromStorage(NPC_SARA)) + pSara->ForcedDespawn(); + if (Creature* pVoice = m_pInstance->GetSingleCreatureFromStorage(NPC_VOICE_OF_YOGG)) + SendAIEvent(AI_EVENT_START_EVENT_B, m_creature, pVoice); } } - } - - void SpellHit(Unit* /*pCaster*/, const SpellEntry* pSpell) override - { - if (pSpell->Id == SPELL_SUMMON_GUARDIAN_YOGG) - m_uiDelayTimer = 10000; - } - - void JustSummoned(Creature* pSummoned) override - { - if (pSummoned->GetEntry() == NPC_GUARDIAN_OF_YOGG) - pSummoned->SetInCombatWithZone(); - } - void UpdateAI(const uint32 uiDiff) override - { - if (m_uiDelayTimer) + if (m_uiPhase == PHASE_OLD_GOD) { - if (m_uiDelayTimer <= uiDiff) - m_uiDelayTimer = 0; + if (m_uiLunaticGazeTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_LUNATIC_GAZE_YOGG) == CAST_OK) + m_uiLunaticGazeTimer = 15000; + } else - m_uiDelayTimer -= uiDiff; + m_uiLunaticGazeTimer -= uiDiff; + + if (m_uiDeafeningRoarTimer) + { + if (m_uiDeafeningRoarTimer <= uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_DEAFENING_ROAR) == CAST_OK) + m_uiDeafeningRoarTimer = 20000; + } + else + m_uiDeafeningRoarTimer -= uiDiff; + } } } }; -CreatureAI* GetAI_npc_ominous_cloud(Creature* pCreature) +CreatureAI* GetAI_boss_yogg_saron(Creature* pCreature) { - return new npc_ominous_cloudAI(pCreature); + return new boss_yogg_saronAI(pCreature); } /*###### @@ -496,18 +535,89 @@ CreatureAI* GetAI_npc_ominous_cloud(Creature* pCreature) struct MANGOS_DLL_DECL npc_voice_yogg_saronAI : public Scripted_NoMovementAI { - npc_voice_yogg_saronAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { Reset(); } + npc_voice_yogg_saronAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) + { + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); + Reset(); + } + + bool m_bIsRegularMode; + + uint8 m_uiPhase; + uint8 m_uiMaxPortals; uint32 m_uiBerserkTimer; + uint32 m_uiSummonGuardianTimer; + uint32 m_uiCrusherTentacleTimer; + uint32 m_uiCorruptorTentacleTimer; + uint32 m_uiConstrictorTentacleTimer; + uint32 m_uiMadnessTimer; + uint32 m_uiGuardianTimer; void Reset() override { - m_uiBerserkTimer = 15 * MINUTE * IN_MILLISECONDS; + m_uiPhase = PHASE_INTRO; + m_uiBerserkTimer = 0; + m_uiSummonGuardianTimer = 1000; + m_uiCrusherTentacleTimer = 1000; + m_uiCorruptorTentacleTimer = 1000; + m_uiConstrictorTentacleTimer = 1000; + m_uiMadnessTimer = 60000; + m_uiGuardianTimer = 1000; + + m_uiMaxPortals = m_bIsRegularMode ? 4 : 10; } void AttackStart(Unit* /*pWho*/) override { } void MoveInLineOfSight(Unit* /*pWho*/) override { } + void ReceiveAIEvent(AIEventType eventType, Creature* /*pSender*/, Unit* pInvoker, uint32 uiMiscValue) override + { + switch (eventType) + { + case AI_EVENT_START_EVENT: + m_uiPhase = PHASE_SARA; + m_uiBerserkTimer = 15 * MINUTE * IN_MILLISECONDS; + break; + case AI_EVENT_START_EVENT_A: + m_uiPhase = PHASE_VISIONS; + break; + case AI_EVENT_START_EVENT_B: + m_uiPhase = PHASE_OLD_GOD; + break; + } + } + + void JustSummoned(Creature* pSummoned) override + { + switch (pSummoned->GetEntry()) + { + case NPC_DESCEND_INTO_MADNESS: + // ToDo: add the teleporting spells + pSummoned->CastSpell(pSummoned, SPELL_TELEPORT_PORTAL_VISUAL, true); + break; + case NPC_CONSTRICTOR_TENTACLE: + pSummoned->CastSpell(pSummoned, SPELL_TENTACLE_VOID_ZONE, true); + pSummoned->CastSpell(pSummoned, SPELL_ERUPT, true); + pSummoned->CastSpell(pSummoned, SPELL_LUNGE, true); + pSummoned->SetInCombatWithZone(); + break; + case NPC_CRUSHER_TENTACLE: + pSummoned->CastSpell(pSummoned, SPELL_TENTACLE_VOID_ZONE_BIG, true); + pSummoned->CastSpell(pSummoned, SPELL_CRUSH, true); + pSummoned->CastSpell(pSummoned, SPELL_DIMINISH_POWER, true); + pSummoned->CastSpell(pSummoned, SPELL_FOCUSED_ANGER, true); + pSummoned->CastSpell(pSummoned, SPELL_ERUPT, true); + pSummoned->SetInCombatWithZone(); + break; + case NPC_CORRUPTOR_TENTACLE: + pSummoned->CastSpell(pSummoned, SPELL_TENTACLE_VOID_ZONE_BIG, true); + pSummoned->CastSpell(pSummoned, SPELL_ERUPT, true); + pSummoned->SetInCombatWithZone(); + break; + } + } + void UpdateAI(const uint32 uiDiff) override { if (m_uiBerserkTimer) @@ -520,6 +630,67 @@ struct MANGOS_DLL_DECL npc_voice_yogg_saronAI : public Scripted_NoMovementAI else m_uiBerserkTimer -= uiDiff; } + + if (m_uiPhase == PHASE_SARA) + { + if (m_uiSummonGuardianTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_SUMMON_GUARDIAN_YOGG) == CAST_OK) + m_uiSummonGuardianTimer = 20000; + } + else + m_uiSummonGuardianTimer -= uiDiff; + } + else if (m_uiPhase == PHASE_VISIONS) + { + if (m_uiCorruptorTentacleTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_CORRUPTOR_TENTACLE) == CAST_OK) + m_uiCorruptorTentacleTimer = 30000; + } + else + m_uiCorruptorTentacleTimer -= uiDiff; + + if (m_uiCrusherTentacleTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_CRUSHER_TENTACLE) == CAST_OK) + m_uiCrusherTentacleTimer = 60000; + } + else + m_uiCrusherTentacleTimer -= uiDiff; + + if (m_uiConstrictorTentacleTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_CONSTRICTOR_TENTACLE) == CAST_OK) + m_uiConstrictorTentacleTimer = 25000; + } + else + m_uiConstrictorTentacleTimer -= uiDiff; + + if (m_uiMadnessTimer < uiDiff) + { + float fX, fY, fZ, fAng; + for (uint8 i = 0; i < m_uiMaxPortals; ++i) + { + fAng = (2 * M_PI_F / m_uiMaxPortals) * i; + m_creature->GetClosePoint(fX, fY, fZ, 0, 22.0f, fAng); + m_creature->SummonCreature(NPC_DESCEND_INTO_MADNESS, fX, fY, fZ, 0, TEMPSUMMON_DEAD_DESPAWN, 0); + } + m_uiMadnessTimer = 90000; + } + else + m_uiMadnessTimer -= uiDiff; + } + else if (m_uiPhase == PHASE_OLD_GOD) + { + if (m_uiGuardianTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_IMMORTAL_GUARDIAN) == CAST_OK) + m_uiGuardianTimer = 15000; + } + else + m_uiGuardianTimer -= uiDiff; + } } }; @@ -607,6 +778,64 @@ CreatureAI* GetAI_npc_guardian_of_yogg(Creature* pCreature) return new npc_guardian_of_yoggAI(pCreature); } +/*###### +## npc_ominous_cloud +######*/ + +struct MANGOS_DLL_DECL npc_ominous_cloudAI : public Scripted_NoMovementAI +{ + npc_ominous_cloudAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { Reset(); } + + uint32 m_uiDelayTimer; + + void Reset() override + { + m_uiDelayTimer = 0; + } + + void AttackStart(Unit* /*pWho*/) override { } + + void MoveInLineOfSight(Unit* pWho) override + { + if (!m_uiDelayTimer && pWho->GetTypeId() == TYPEID_PLAYER && !((Player*)pWho)->isGameMaster() && m_creature->IsWithinDistInMap(pWho, 7.0f)) + { + if (DoCastSpellIfCan(m_creature, SPELL_BOIL_OMNIOUSLY) == CAST_OK) + { + DoScriptText(EMOTE_CLOUD_BOIL, m_creature, pWho); + m_uiDelayTimer = 10000; + } + } + } + + void SpellHit(Unit* /*pCaster*/, const SpellEntry* pSpell) override + { + if (pSpell->Id == SPELL_SUMMON_GUARDIAN_YOGG) + m_uiDelayTimer = 10000; + } + + void JustSummoned(Creature* pSummoned) override + { + if (pSummoned->GetEntry() == NPC_GUARDIAN_OF_YOGG) + pSummoned->SetInCombatWithZone(); + } + + void UpdateAI(const uint32 uiDiff) override + { + if (m_uiDelayTimer) + { + if (m_uiDelayTimer <= uiDiff) + m_uiDelayTimer = 0; + else + m_uiDelayTimer -= uiDiff; + } + } +}; + +CreatureAI* GetAI_npc_ominous_cloud(Creature* pCreature) +{ + return new npc_ominous_cloudAI(pCreature); +} + void AddSC_boss_yogg_saron() { Script* pNewScript; @@ -621,11 +850,6 @@ void AddSC_boss_yogg_saron() pNewScript->GetAI = &GetAI_boss_yogg_saron; pNewScript->RegisterSelf(); - pNewScript = new Script; - pNewScript->Name = "npc_ominous_cloud"; - pNewScript->GetAI = &GetAI_npc_ominous_cloud; - pNewScript->RegisterSelf(); - pNewScript = new Script; pNewScript->Name = "npc_voice_yogg_saron"; pNewScript->GetAI = &GetAI_npc_voice_yogg_saron; @@ -635,4 +859,9 @@ void AddSC_boss_yogg_saron() pNewScript->Name = "npc_guardian_of_yogg"; pNewScript->GetAI = &GetAI_npc_guardian_of_yogg; pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_ominous_cloud"; + pNewScript->GetAI = &GetAI_npc_ominous_cloud; + pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 01eca65c7..1fcd34025 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3026" + #define SD2_REVISION_NR "3027" #endif // __SD2_REVISION_NR_H__ From 17ce41066c54870dc4a645f06d9fc2f5b2f2e58c Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sun, 27 Jul 2014 03:36:24 +0200 Subject: [PATCH 1039/1172] [3028] Implement more content for Yogg-Saron encounter --- .../ulduar/ulduar/boss_yogg_saron.cpp | 231 ++++++++++++++++-- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 3 + sql/scriptdev2_script_full.sql | 3 +- sql/updates/r3028_mangos.sql | 3 + sql/updates/r3028_scriptdev2.sql | 3 + 6 files changed, 229 insertions(+), 16 deletions(-) create mode 100644 sql/updates/r3028_mangos.sql create mode 100644 sql/updates/r3028_scriptdev2.sql diff --git a/scripts/northrend/ulduar/ulduar/boss_yogg_saron.cpp b/scripts/northrend/ulduar/ulduar/boss_yogg_saron.cpp index 42bf2c21e..13e0fa53a 100644 --- a/scripts/northrend/ulduar/ulduar/boss_yogg_saron.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_yogg_saron.cpp @@ -23,6 +23,7 @@ EndScriptData */ #include "precompiled.h" #include "ulduar.h" +#include "TemporarySummon.h" enum { @@ -40,8 +41,8 @@ enum SAY_PHASE_2_INTRO_3 = -1603263, SAY_PHASE_2_INTRO_4 = -1603264, SAY_PHASE_2_INTRO_5 = -1603265, - SAY_SARA_PHASE_2_INTRO_A = -1603206, - SAY_SARA_PHASE_2_INTRO_B = -1603207, + SAY_SARA_PHYCHOSIS = -1603207, + SAY_SARA_DEATH_RAY = -1603208, SAY_MADNESS = -1603209, SAY_PHASE_3 = -1603210, @@ -75,6 +76,7 @@ enum EMOTE_VISION_BLAST = -1603234, EMOTE_SHATTER_BLAST = -1603235, EMOTE_CLOUD_BOIL = -1603261, + EMOTE_DEAFENING_ROAR = -1603266, // generic spells SPELL_EXTINGUISH_LIFE = 64166, // berserk spell @@ -114,9 +116,9 @@ enum // Vision phase spells SPELL_PHYCHOSIS = 63795, // Sara combat spells SPELL_PHYCHOSIS_H = 65301, - SPELL_MALADY_OF_THE_MIND = 63830, - SPELL_BRAIN_LINK = 63802, - SPELL_DEATH_RAY_SUMMON = 63891, + SPELL_MALADY_OF_THE_MIND = 63830, // jumps to another target using 63881; requires additional research + SPELL_BRAIN_LINK = 63802, // triggers 63803 for damage or 63804 for visual depending on range + SPELL_DEATH_RAY_SUMMON = 63891, // summons npc 33882 // Tentacle spawn spells SPELL_CONSTRICTOR_TENTACLE = 64132, // triggers 64133 @@ -131,6 +133,8 @@ enum SPELL_CRUSH = 64146, SPELL_DIMINISH_POWER = 64148, SPELL_FOCUSED_ANGER = 57688, + SPELL_SQUEEZE = 64125, + SPELL_SQUEEZE_H = 64126, // Old God phase spells SPELL_LUNATIC_GAZE_YOGG = 64163, @@ -141,10 +145,10 @@ enum SPELL_IMMORTAL_GUARDIAN = 64158, // death ray spells - SPELL_DEATH_RAY_TRIGG = 63883, - SPELL_DEATH_RAY_VISUAL_WARN = 63882, - SPELL_DEATH_RAY_VISUAL_DAMAGE = 63886, - SPELL_DEATH_RAY_VISUAL_ORIGIN = 63893, + SPELL_DEATH_RAY_TRIGG = 63883, // damage spell + SPELL_DEATH_RAY_VISUAL_WARN = 63882, // channeled; target creature 33882 + SPELL_DEATH_RAY_VISUAL_DAMAGE = 63886, // channeled; target creature 33882 + SPELL_DEATH_RAY_VISUAL_ORIGIN = 63893, // visual for creature 33882 // descend into madness spells SPELL_TELEPORT_PORTAL_VISUAL = 64416, @@ -153,6 +157,15 @@ enum SPELL_TELEPORT_TO_ICEECROWN_ILLUSION = 63998, SPELL_TELEPORT_BACK_TO_MAIN_ROOM = 63992, + // immortal guardian spells + SPELL_EMPOWERED = 64161, + SPELL_EMPOWERED_MOD = 65294, + SPELL_RECENTLY_SPAWNED = 64497, + SPELL_SIMPLE_TELEPORT = 64195, + SPELL_DRAIN_LIFE = 64159, + SPELL_DRAIN_LIFE_H = 64160, + SPELL_WEAKENED = 64162, + // summoned creatures NPC_DEATH_RAY = 33881, NPC_DEATH_ORB = 33882, @@ -329,9 +342,19 @@ struct MANGOS_DLL_DECL boss_saraAI : public Scripted_NoMovementAI, private Dialo } else if (pSummoned->GetEntry() == NPC_DEATH_ORB) { - // ToDo: summon 2 death rays + float fX, fY, fZ; + for (uint8 i = 0; i < 4; ++i) + { + float fDist = frand(30.0f, 45.0f); + float fAng = frand(0, 2 * M_PI_F); + m_creature->GetNearPoint(m_creature, fX, fY, fZ, 0, fDist, fAng); + m_creature->SummonCreature(NPC_DEATH_RAY, fX, fY, fZ, 0, TEMPSUMMON_TIMED_DESPAWN, 20000); + } + pSummoned->CastSpell(pSummoned, SPELL_DEATH_RAY_VISUAL_ORIGIN, true); } + else if (pSummoned->GetEntry() == NPC_DEATH_RAY) + pSummoned->CastSpell(pSummoned, SPELL_DEATH_RAY_VISUAL_WARN, false); } void JustDidDialogueStep(int32 iEntry) override @@ -379,7 +402,7 @@ struct MANGOS_DLL_DECL boss_saraAI : public Scripted_NoMovementAI, private Dialo if (castResult == CAST_OK) { - if (urand(0, 1)) + if (roll_chance_i(30)) DoScriptText(urand(0, 1) ? SAY_SARA_HELP_1 : SAY_SARA_HELP_2, m_creature); m_uiSarasSpellTimer = 5000; @@ -397,7 +420,12 @@ struct MANGOS_DLL_DECL boss_saraAI : public Scripted_NoMovementAI, private Dialo if (m_uiPsychosisTimer < uiDiff) { if (DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_PHYCHOSIS : SPELL_PHYCHOSIS_H) == CAST_OK) + { + if (roll_chance_i(10)) + DoScriptText(SAY_SARA_PHYCHOSIS, m_creature); + m_uiPsychosisTimer = urand(3000, 4000); + } } else m_uiPsychosisTimer -= uiDiff; @@ -420,6 +448,9 @@ struct MANGOS_DLL_DECL boss_saraAI : public Scripted_NoMovementAI, private Dialo if (m_uiDeathRayTimer < uiDiff) { + if (urand(0, 1)) + DoScriptText(SAY_SARA_DEATH_RAY, m_creature); + // spawn death orb at predefined location m_creature->CastSpell(1980.43f, -25.7708f, 351.5418f, SPELL_DEATH_RAY_SUMMON, true); m_uiDeathRayTimer = 20000; @@ -455,11 +486,13 @@ struct MANGOS_DLL_DECL boss_yogg_saronAI : public Scripted_NoMovementAI uint32 m_uiLunaticGazeTimer; uint32 m_uiDeafeningRoarTimer; + uint32 m_uiShadowBeaconTimer; void Reset() override { m_uiPhase = PHASE_VISIONS; m_uiLunaticGazeTimer = 15000; + m_uiShadowBeaconTimer = 45000; if (m_pInstance) m_uiDeafeningRoarTimer = (!m_bIsRegularMode && m_pInstance->GetData(TYPE_YOGGSARON_HARD) >= 1) ? 20000 : 0; @@ -489,7 +522,8 @@ struct MANGOS_DLL_DECL boss_yogg_saronAI : public Scripted_NoMovementAI { DoScriptText(SAY_PHASE_3, m_creature); m_uiPhase = PHASE_OLD_GOD; - DoCastSpellIfCan(m_creature, SPELL_SHADOW_BEACON); + m_creature->RemoveAurasDueToSpell(SPELL_KNOCK_AWAY); + m_creature->RemoveAurasDueToSpell(SPELL_SHADOWY_BARRIER_YOGG); if (m_pInstance) { @@ -505,17 +539,28 @@ struct MANGOS_DLL_DECL boss_yogg_saronAI : public Scripted_NoMovementAI if (m_uiLunaticGazeTimer < uiDiff) { if (DoCastSpellIfCan(m_creature, SPELL_LUNATIC_GAZE_YOGG) == CAST_OK) - m_uiLunaticGazeTimer = 15000; + m_uiLunaticGazeTimer = 12000; } else m_uiLunaticGazeTimer -= uiDiff; + if (m_uiShadowBeaconTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_SHADOW_BEACON) == CAST_OK) + m_uiShadowBeaconTimer = 45000; + } + else + m_uiShadowBeaconTimer -= uiDiff; + if (m_uiDeafeningRoarTimer) { if (m_uiDeafeningRoarTimer <= uiDiff) { if (DoCastSpellIfCan(m_creature, SPELL_DEAFENING_ROAR) == CAST_OK) + { + DoScriptText(EMOTE_DEAFENING_ROAR, m_creature); m_uiDeafeningRoarTimer = 20000; + } } else m_uiDeafeningRoarTimer -= uiDiff; @@ -615,6 +660,13 @@ struct MANGOS_DLL_DECL npc_voice_yogg_saronAI : public Scripted_NoMovementAI pSummoned->CastSpell(pSummoned, SPELL_ERUPT, true); pSummoned->SetInCombatWithZone(); break; + case NPC_IMMORTAL_GUARDIAN: + pSummoned->CastSpell(pSummoned, SPELL_EMPOWERED, true); + pSummoned->CastSpell(pSummoned, SPELL_EMPOWERED_MOD, true); + pSummoned->CastSpell(pSummoned, SPELL_RECENTLY_SPAWNED, true); + pSummoned->CastSpell(pSummoned, SPELL_SIMPLE_TELEPORT, true); + pSummoned->SetInCombatWithZone(); + break; } } @@ -673,7 +725,7 @@ struct MANGOS_DLL_DECL npc_voice_yogg_saronAI : public Scripted_NoMovementAI for (uint8 i = 0; i < m_uiMaxPortals; ++i) { fAng = (2 * M_PI_F / m_uiMaxPortals) * i; - m_creature->GetClosePoint(fX, fY, fZ, 0, 22.0f, fAng); + m_creature->GetNearPoint(m_creature, fX, fY, fZ, 0, 22.0f, fAng); m_creature->SummonCreature(NPC_DESCEND_INTO_MADNESS, fX, fY, fZ, 0, TEMPSUMMON_DEAD_DESPAWN, 0); } m_uiMadnessTimer = 90000; @@ -778,6 +830,100 @@ CreatureAI* GetAI_npc_guardian_of_yogg(Creature* pCreature) return new npc_guardian_of_yoggAI(pCreature); } +/*###### +## npc_immortal_guardian +######*/ + +struct MANGOS_DLL_DECL npc_immortal_guardianAI : public ScriptedAI +{ + npc_immortal_guardianAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); + Reset(); + } + + bool m_bIsRegularMode; + bool m_bWeakened; + + uint32 m_uiDrainLifeTimer; + + void Reset() override + { + m_uiDrainLifeTimer = 10000; + m_bWeakened = false; + } + + void DamageTaken(Unit* pDealer, uint32& uiDamage) override + { + if (pDealer->GetEntry() == NPC_THORIM_HELPER) + return; + + if (uiDamage >= m_creature->GetHealth()) + { + uiDamage = 0; + + // mark as weakened for Thorim + if (!m_bWeakened) + { + if (DoCastSpellIfCan(m_creature, SPELL_WEAKENED) == CAST_OK) + m_bWeakened = true; + } + } + } + + void UpdateAI(const uint32 uiDiff) override + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_uiDrainLifeTimer < uiDiff) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, m_bIsRegularMode ? SPELL_DRAIN_LIFE : SPELL_DRAIN_LIFE_H) == CAST_OK) + m_uiDrainLifeTimer = urand(10000, 15000); + } + } + else + m_uiDrainLifeTimer -= uiDiff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_npc_immortal_guardian(Creature* pCreature) +{ + return new npc_immortal_guardianAI(pCreature); +} + +/*###### +## npc_constrictor_tentacle +######*/ + +struct MANGOS_DLL_DECL npc_constrictor_tentacleAI : public Scripted_NoMovementAI +{ + npc_constrictor_tentacleAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) + { + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); + Reset(); + } + + bool m_bIsRegularMode; + + void Reset() override { } + + void JustDied(Unit* /*pKiller*/) override + { + if (Player* pSummoner = m_creature->GetMap()->GetPlayer(((TemporarySummon*)m_creature)->GetSummonerGuid())) + pSummoner->RemoveAurasDueToSpell(m_bIsRegularMode ? SPELL_SQUEEZE : SPELL_SQUEEZE_H); + } +}; + +CreatureAI* GetAI_npc_constrictor_tentacle(Creature* pCreature) +{ + return new npc_constrictor_tentacleAI(pCreature); +} + /*###### ## npc_ominous_cloud ######*/ @@ -836,6 +982,48 @@ CreatureAI* GetAI_npc_ominous_cloud(Creature* pCreature) return new npc_ominous_cloudAI(pCreature); } +/*###### +## npc_death_ray +######*/ + +struct MANGOS_DLL_DECL npc_death_rayAI : public ScriptedAI +{ + npc_death_rayAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } + + uint32 m_uiDeathRayTimer; + + void Reset() override + { + m_uiDeathRayTimer = 5000; + } + + void AttackStart(Unit* /*pWho*/) override { } + void MoveInLineOfSight(Unit* pWho) override { } + + void UpdateAI(const uint32 uiDiff) override + { + if (m_uiDeathRayTimer) + { + if (m_uiDeathRayTimer <= uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_DEATH_RAY_VISUAL_DAMAGE, CAST_INTERRUPT_PREVIOUS) == CAST_OK) + { + DoCastSpellIfCan(m_creature, SPELL_DEATH_RAY_TRIGG, CAST_TRIGGERED); + m_creature->GetMotionMaster()->MoveRandomAroundPoint(m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), 10.0f); + m_uiDeathRayTimer = 0; + } + } + else + m_uiDeathRayTimer -= uiDiff; + } + } +}; + +CreatureAI* GetAI_npc_death_ray(Creature* pCreature) +{ + return new npc_death_rayAI(pCreature); +} + void AddSC_boss_yogg_saron() { Script* pNewScript; @@ -860,8 +1048,23 @@ void AddSC_boss_yogg_saron() pNewScript->GetAI = &GetAI_npc_guardian_of_yogg; pNewScript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "npc_immortal_guardian"; + pNewScript->GetAI = &GetAI_npc_immortal_guardian; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_constrictor_tentacle"; + pNewScript->GetAI = &GetAI_npc_constrictor_tentacle; + pNewScript->RegisterSelf(); + pNewScript = new Script; pNewScript->Name = "npc_ominous_cloud"; pNewScript->GetAI = &GetAI_npc_ominous_cloud; pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_death_ray"; + pNewScript->GetAI = &GetAI_npc_death_ray; + pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 1fcd34025..f77a5e5d3 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3027" + #define SD2_REVISION_NR "3028" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index d3de32d58..077250934 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -1374,8 +1374,11 @@ UPDATE creature_template SET ScriptName='npc_ulduar_keeper' WHERE entry IN (3324 UPDATE creature_template SET ScriptName='boss_sara' WHERE entry=33134; UPDATE creature_template SET ScriptName='boss_yogg_saron' WHERE entry=33288; UPDATE creature_template SET ScriptName='npc_ominous_cloud' WHERE entry=33292; +UPDATE creature_template SET ScriptName='npc_death_ray' WHERE entry=33881; UPDATE creature_template SET ScriptName='npc_voice_yogg_saron' WHERE entry=33280; UPDATE creature_template SET ScriptName='npc_guardian_of_yogg' WHERE entry=33136; +UPDATE creature_template SET ScriptName='npc_immortal_guardian' WHERE entry=33988; +UPDATE creature_template SET ScriptName='npc_constrictor_tentacle' WHERE entry=33983; DELETE FROM scripted_event_id WHERE id IN (9735,20907,20964,21030,21031,21032,21033,21045,21605,21606,21620); INSERT INTO scripted_event_id VALUES (9735, 'event_spell_saronite_barrier'), -- Vezax saronite barrier event diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 827d11f2d..a3b151385 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -3896,7 +3896,8 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1603262,'The monster in your nightmares.',0,1,0,457,'yogg SAY_PHASE_2_INTRO_2'), (-1603263,'The fiend of a thousand faces.',0,1,0,457,'yogg SAY_PHASE_2_INTRO_3'), (-1603264,'Cower before my true form.',0,1,0,457,'yogg SAY_PHASE_2_INTRO_4'), -(-1603265,'BOW DOWN BEFORE THE GOD OF DEATH!',0,1,0,0,'yogg SAY_PHASE_2_INTRO_5'); +(-1603265,'BOW DOWN BEFORE THE GOD OF DEATH!',0,1,0,0,'yogg SAY_PHASE_2_INTRO_5'), +(-1603266,'%s opens his mouth wide!',0,3,0,0,'yogg EMOTE_DEAFENING_ROAR'); -- -1 604 000 GUNDRAK INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES diff --git a/sql/updates/r3028_mangos.sql b/sql/updates/r3028_mangos.sql new file mode 100644 index 000000000..5c92ef815 --- /dev/null +++ b/sql/updates/r3028_mangos.sql @@ -0,0 +1,3 @@ +UPDATE creature_template SET ScriptName='npc_death_ray' WHERE entry=33881; +UPDATE creature_template SET ScriptName='npc_immortal_guardian' WHERE entry=33988; +UPDATE creature_template SET ScriptName='npc_constrictor_tentacle' WHERE entry=33983; diff --git a/sql/updates/r3028_scriptdev2.sql b/sql/updates/r3028_scriptdev2.sql new file mode 100644 index 000000000..6eb0469f2 --- /dev/null +++ b/sql/updates/r3028_scriptdev2.sql @@ -0,0 +1,3 @@ +DELETE FROM script_texts WHERE entry=-1603266; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1603266,'%s opens his mouth wide!',0,3,0,0,'yogg EMOTE_DEAFENING_ROAR'); From 310addc55f6e3366ab753e45f87f475fe130eeae Mon Sep 17 00:00:00 2001 From: Xfurry Date: Mon, 28 Jul 2014 01:17:37 +0200 Subject: [PATCH 1040/1172] [3029] Implement Yogg-Saron illusions --- .../ulduar/ulduar/boss_yogg_saron.cpp | 378 +++++++++++++++++- .../ulduar/ulduar/instance_ulduar.cpp | 14 +- scripts/northrend/ulduar/ulduar/ulduar.h | 7 +- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 3 + sql/updates/r3029_mangos.sql | 3 + 6 files changed, 393 insertions(+), 14 deletions(-) create mode 100644 sql/updates/r3029_mangos.sql diff --git a/scripts/northrend/ulduar/ulduar/boss_yogg_saron.cpp b/scripts/northrend/ulduar/ulduar/boss_yogg_saron.cpp index 13e0fa53a..23220a650 100644 --- a/scripts/northrend/ulduar/ulduar/boss_yogg_saron.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_yogg_saron.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: boss_yogg_saron -SD%Complete: 50% -SDComment: Partially implemented. Not fully playable yet. +SD%Complete: 70% +SDComment: There are still a few things left. Not fully playable yet. SDCategory: Ulduar EndScriptData */ @@ -136,9 +136,18 @@ enum SPELL_SQUEEZE = 64125, SPELL_SQUEEZE_H = 64126, + // Vision spells + SPELL_LUNATIC_GAZE_SKULL = 64167, + SPELL_NONDESCRIPT_ARMOR = 64013, // stun auras for illusions + SPELL_NONDESCRIPT_CREATURE = 64010, + SPELL_GRIM_REPRISAL = 63305, // procs 64039 on damage taken + SPELL_SHATTERED_ILLUSION = 64173, + SPELL_SHATTERED_ILLUSION_REMOVE = 65238, // remove aura 64173 + SPELL_INDUCE_MADNESS = 64059, // reduce sanity by 100% to all players with aura 63988 + // Old God phase spells SPELL_LUNATIC_GAZE_YOGG = 64163, - SPELL_SHADOW_BEACON = 64465, // trigger 64468 + SPELL_SHADOW_BEACON = 64465, // triggers 64468 // SPELL_EMPOWERING_SHADOWS = 64468, // SPELL_EMPOWERING_SHADOWS_H = 64486, SPELL_DEAFENING_ROAR = 64189, @@ -155,7 +164,7 @@ enum SPELL_TELEPORT_TO_STORMWIND_ILLUSION = 63989, SPELL_TELEPORT_TO_CHAMBER_ILLUSION = 63997, SPELL_TELEPORT_TO_ICEECROWN_ILLUSION = 63998, - SPELL_TELEPORT_BACK_TO_MAIN_ROOM = 63992, + // SPELL_TELEPORT_BACK_TO_MAIN_ROOM = 63992, // triggered by spell 63993 // immortal guardian spells SPELL_EMPOWERED = 64161, @@ -174,8 +183,35 @@ enum NPC_CORRUPTOR_TENTACLE = 33985, NPC_DESCEND_INTO_MADNESS = 34072, NPC_IMMORTAL_GUARDIAN = 33988, + // NPC_SANITY_WELL = 33991, // summoned by Freya + + // generic visions creatures + NPC_LAUGHING_SKULL = 33990, + NPC_INFLUENCE_TENTACLE = 33943, + + // dragon soul vision + NPC_RUBY_CONSORT = 33716, + NPC_AZURE_CONSORT = 33717, + // NPC_BRONZE_CONSORT = 33718, // Nozdormu is not part of the event for some reason + NPC_EMERALD_CONSORT = 33719, + NPC_OBSIDIAN_CONSORT = 33720, + NPC_YSERA = 33495, + NPC_NELTHARION = 33523, + NPC_MALYGOS = 33535, + NPC_ALEXSTRASZA = 33536, + + // stormwind vision + NPC_SUIT_OF_ARMOR = 33433, + NPC_GARONA = 33436, // cast spell 64063 on 33437 + NPC_KING_LLANE = 33437, + + // icecrown citadel vision + NPC_LICH_KING = 33441, // cast spell 63037 on 33442 + NPC_IMMOLATED_CHAMPION = 33442, + NPC_DEATHSWORM_ZEALOT = 33567, // keepers + SPELL_KEEPER_ACTIVE = 62647, // Freya spells SPELL_RESILIENCE_OF_NATURE = 62670, SPELL_SUMMON_SANITY_WELL = 64170, // sends event 21432; used to spawn npc 33991 @@ -198,6 +234,7 @@ enum // other FACTION_SARA_HOSTILE = 16, + MAX_ILLUSIONS = 3, // encounter phases PHASE_INTRO = 0, @@ -219,6 +256,8 @@ static const DialogueEntry aYoggSaronDialog[] = }; static const float afYoggSaronSpawn[4] = {1980.43f, -25.7708f, 324.9724f, 3.141f}; +static const uint32 aMadnessTeleportSpells[MAX_ILLUSIONS] = { SPELL_TELEPORT_TO_STORMWIND_ILLUSION, SPELL_TELEPORT_TO_CHAMBER_ILLUSION, SPELL_TELEPORT_TO_ICEECROWN_ILLUSION }; +static const uint32 aMadnessChamberDoors[MAX_ILLUSIONS] = { GO_BRAIN_DOOR_STORMWIND, GO_BRAIN_DOOR_CHAMBER, GO_BRAIN_DOOR_ICECROWN }; /*###### ## boss_sara @@ -280,7 +319,8 @@ struct MANGOS_DLL_DECL boss_saraAI : public Scripted_NoMovementAI, private Dialo { // start the encounter on range check // ToDo: research if there is any intro available before the actual encounter starts - if (m_uiPhase == PHASE_INTRO && pWho->GetTypeId() == TYPEID_PLAYER && pWho->isAlive() && !((Player*)pWho)->isGameMaster() && m_creature->IsWithinDistInMap(pWho, 70.0f)) + if (m_uiPhase == PHASE_INTRO && pWho->GetTypeId() == TYPEID_PLAYER && pWho->isAlive() && !((Player*)pWho)->isGameMaster() && + m_creature->IsWithinDistInMap(pWho, 70.0f) && pWho->IsWithinLOSInMap(m_creature)) { m_uiPhase = PHASE_SARA; DoScriptText(SAY_SARA_AGGRO, m_creature); @@ -582,14 +622,21 @@ struct MANGOS_DLL_DECL npc_voice_yogg_saronAI : public Scripted_NoMovementAI { npc_voice_yogg_saronAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { + m_pInstance = (instance_ulduar*)pCreature->GetInstanceData(); m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); + + for (uint8 i = 0; i < MAX_ILLUSIONS; ++i) + m_vuiMadnessPhases.push_back(i); + Reset(); } + instance_ulduar* m_pInstance; bool m_bIsRegularMode; uint8 m_uiPhase; uint8 m_uiMaxPortals; + uint8 m_uiPortalsCount; uint32 m_uiBerserkTimer; uint32 m_uiSummonGuardianTimer; @@ -599,6 +646,8 @@ struct MANGOS_DLL_DECL npc_voice_yogg_saronAI : public Scripted_NoMovementAI uint32 m_uiMadnessTimer; uint32 m_uiGuardianTimer; + std::vector m_vuiMadnessPhases; + void Reset() override { m_uiPhase = PHASE_INTRO; @@ -610,7 +659,10 @@ struct MANGOS_DLL_DECL npc_voice_yogg_saronAI : public Scripted_NoMovementAI m_uiMadnessTimer = 60000; m_uiGuardianTimer = 1000; + m_uiPortalsCount = 0; m_uiMaxPortals = m_bIsRegularMode ? 4 : 10; + + std::random_shuffle(m_vuiMadnessPhases.begin(), m_vuiMadnessPhases.end()); } void AttackStart(Unit* /*pWho*/) override { } @@ -638,7 +690,7 @@ struct MANGOS_DLL_DECL npc_voice_yogg_saronAI : public Scripted_NoMovementAI switch (pSummoned->GetEntry()) { case NPC_DESCEND_INTO_MADNESS: - // ToDo: add the teleporting spells + SendAIEvent(AI_EVENT_START_EVENT, m_creature, pSummoned, aMadnessTeleportSpells[m_uiPortalsCount]); pSummoned->CastSpell(pSummoned, SPELL_TELEPORT_PORTAL_VISUAL, true); break; case NPC_CONSTRICTOR_TENTACLE: @@ -721,13 +773,30 @@ struct MANGOS_DLL_DECL npc_voice_yogg_saronAI : public Scripted_NoMovementAI if (m_uiMadnessTimer < uiDiff) { + // no more portals if we already had 3 + if (m_uiPortalsCount == MAX_ILLUSIONS) + { + m_uiMadnessTimer = m_uiBerserkTimer * 2; + return; + } + + if (!m_pInstance) + return; + + // infor the brain about the current illusion + if (Creature* pBrain = m_pInstance->GetSingleCreatureFromStorage(NPC_YOGG_BRAIN)) + SendAIEvent(AI_EVENT_START_EVENT, m_creature, pBrain, m_uiPortalsCount); + float fX, fY, fZ, fAng; for (uint8 i = 0; i < m_uiMaxPortals; ++i) { fAng = (2 * M_PI_F / m_uiMaxPortals) * i; m_creature->GetNearPoint(m_creature, fX, fY, fZ, 0, 22.0f, fAng); - m_creature->SummonCreature(NPC_DESCEND_INTO_MADNESS, fX, fY, fZ, 0, TEMPSUMMON_DEAD_DESPAWN, 0); + m_creature->SummonCreature(NPC_DESCEND_INTO_MADNESS, fX, fY, fZ, 0, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 60000); } + + DoScriptText(EMOTE_VISION_BLAST, m_creature); + ++m_uiPortalsCount; m_uiMadnessTimer = 90000; } else @@ -751,6 +820,183 @@ CreatureAI* GetAI_npc_voice_yogg_saron(Creature* pCreature) return new npc_voice_yogg_saronAI(pCreature); } +/*###### +## npc_brain_yogg_saron +######*/ + +struct MANGOS_DLL_DECL npc_brain_yogg_saronAI : public Scripted_NoMovementAI +{ + npc_brain_yogg_saronAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) + { + m_pInstance = (instance_ulduar*)pCreature->GetInstanceData(); + Reset(); + } + + instance_ulduar* m_pInstance; + + uint8 m_uiIllusionIndex; + uint32 m_uiIllusionTimer; + + GuidList m_lTentaclesGuids; + + void Reset() override + { + m_uiIllusionTimer = 0; + m_uiIllusionIndex = 0; + + DoCastSpellIfCan(m_creature, SPELL_MATCH_HEALTH); + } + + void AttackStart(Unit* /*pWho*/) override { } + void MoveInLineOfSight(Unit* /*pWho*/) override { } + + void ReceiveAIEvent(AIEventType eventType, Creature* /*pSender*/, Unit* pInvoker, uint32 uiMiscValue) override + { + if (eventType == AI_EVENT_START_EVENT && pInvoker->GetEntry() == NPC_VOICE_OF_YOGG) + { + if (DoCastSpellIfCan(m_creature, SPELL_INDUCE_MADNESS) == CAST_OK) + { + m_lTentaclesGuids.clear(); + DoPrepareIllusion(uiMiscValue); + m_uiIllusionIndex = uiMiscValue; + } + } + } + + void JustSummoned(Creature* pSummoned) override + { + switch (pSummoned->GetEntry()) + { + case NPC_LAUGHING_SKULL: + pSummoned->CastSpell(pSummoned, SPELL_LUNATIC_GAZE_SKULL, false); + break; + case NPC_SUIT_OF_ARMOR: + pSummoned->CastSpell(pSummoned, SPELL_NONDESCRIPT_ARMOR, true); + pSummoned->CastSpell(pSummoned, SPELL_GRIM_REPRISAL, true); + m_lTentaclesGuids.push_back(pSummoned->GetObjectGuid()); + break; + case NPC_DEATHSWORM_ZEALOT: + case NPC_RUBY_CONSORT: + case NPC_OBSIDIAN_CONSORT: + case NPC_AZURE_CONSORT: + case NPC_EMERALD_CONSORT: + pSummoned->CastSpell(pSummoned, SPELL_NONDESCRIPT_CREATURE, true); + pSummoned->CastSpell(pSummoned, SPELL_GRIM_REPRISAL, true); + m_lTentaclesGuids.push_back(pSummoned->GetObjectGuid()); + break; + } + } + + void SummonedCreatureJustDied(Creature* pSummoned) override + { + if (pSummoned->GetEntry() == NPC_INFLUENCE_TENTACLE) + m_lTentaclesGuids.remove(pSummoned->GetObjectGuid()); + + // open door and start casting + if (m_lTentaclesGuids.empty()) + { + DoScriptText(EMOTE_SHATTER_BLAST, m_creature); + DoCastSpellIfCan(m_creature, SPELL_SHATTERED_ILLUSION, CAST_TRIGGERED); + m_uiIllusionTimer = 30000; + + if (!m_pInstance) + return; + + m_pInstance->DoUseDoorOrButton(aMadnessChamberDoors[m_uiIllusionIndex]); + + // respawn all nearby portals + std::list lFleePortals; + GetGameObjectListWithEntryInGrid(lFleePortals, m_creature, GO_FLEE_TO_SURFACE, 40.0f); + + for (std::list::const_iterator itr = lFleePortals.begin(); itr != lFleePortals.end(); ++itr) + m_pInstance->DoRespawnGameObject((*itr)->GetObjectGuid(), 30); + } + } + + // Wrapper that prepars the illusions + void DoPrepareIllusion(uint8 uiIndex) + { + switch (uiIndex) + { + // stormwind + case 0: + m_creature->SummonCreature(NPC_LAUGHING_SKULL, 1955.173f, 85.26153f, 239.7496f, 4.049f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 90000); + m_creature->SummonCreature(NPC_LAUGHING_SKULL, 1893.146f, 44.24343f, 239.7496f, 0, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 90000); + m_creature->SummonCreature(NPC_LAUGHING_SKULL, 1944.962f, 65.25938f, 240.4596f, 0, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 90000); + m_creature->SummonCreature(NPC_SUIT_OF_ARMOR, 1956.503f, 72.19462f, 239.7495f, 3.281f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 90000); + m_creature->SummonCreature(NPC_SUIT_OF_ARMOR, 1951.04f, 49.88875f, 239.7495f, 2.495f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 90000); + m_creature->SummonCreature(NPC_SUIT_OF_ARMOR, 1931.14f, 38.46949f, 239.7495f, 1.710f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 90000); + m_creature->SummonCreature(NPC_SUIT_OF_ARMOR, 1908.993f, 44.26659f, 239.7495f, 0.295f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 90000); + m_creature->SummonCreature(NPC_SUIT_OF_ARMOR, 1897.344f, 64.31419f, 239.7495f, 0.139f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 90000); + m_creature->SummonCreature(NPC_SUIT_OF_ARMOR, 1903.393f, 86.60285f, 239.7495f, 5.619f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 90000); + m_creature->SummonCreature(NPC_SUIT_OF_ARMOR, 1923.342f, 98.01228f, 239.7495f, 4.834f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 90000); + m_creature->SummonCreature(NPC_SUIT_OF_ARMOR, 1945.442f, 92.17952f, 239.7495f, 4.049f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 90000); + // the following are guesswork + m_creature->SummonCreature(NPC_GARONA, 1935.398f, 54.0177f, 240.3764f, 2.008f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 90000); + m_creature->SummonCreature(NPC_KING_LLANE, 1930.465f, 62.6740f, 242.3763f, 5.196f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 90000); + break; + // chamber + case 1: + m_creature->SummonCreature(NPC_LAUGHING_SKULL, 2063.156f, 27.95839f, 244.2707f, 5.288f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 90000); + m_creature->SummonCreature(NPC_LAUGHING_SKULL, 2061.257f, -53.8788f, 239.8633f, 2.478f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 90000); + m_creature->SummonCreature(NPC_RUBY_CONSORT, 2069.479f, -5.699653f, 239.8058f, 5.427f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 90000); + m_creature->SummonCreature(NPC_RUBY_CONSORT, 2069.298f, -43.53168f, 239.8006f, 0.471f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 90000); + // the following are guesswork + m_creature->SummonCreature(NPC_LAUGHING_SKULL, 2125.891f, -62.390f, 239.721f, 2.197f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 90000); + m_creature->SummonCreature(NPC_LAUGHING_SKULL, 2115.778f, 21.288f, 239.746f, 4.282f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 90000); + m_creature->SummonCreature(NPC_OBSIDIAN_CONSORT, 2144.349f, -36.108f, 239.719f, 3.116f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 90000); + m_creature->SummonCreature(NPC_OBSIDIAN_CONSORT, 2143.837f, -17.539f, 239.733f, 3.179f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 90000); + m_creature->SummonCreature(NPC_AZURE_CONSORT, 2139.173f, -51.239f, 239.747f, 2.413f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 90000); + m_creature->SummonCreature(NPC_AZURE_CONSORT, 2112.182f, -65.787f, 239.721f, 1.651f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 90000); + m_creature->SummonCreature(NPC_EMERALD_CONSORT, 2110.621f, 15.579f, 239.758f, 4.644f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 90000); + m_creature->SummonCreature(NPC_EMERALD_CONSORT, 2137.336f, 5.452f, 239.717f, 3.866f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 90000); + m_creature->SummonCreature(NPC_NELTHARION, 2117.588f, -25.318f, 242.646f, 3.15f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 90000); + m_creature->SummonCreature(NPC_ALEXSTRASZA, 2091.679f, -25.289f, 242.646f, 6.282f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 90000); + m_creature->SummonCreature(NPC_YSERA, 2114.504f, -16.118f, 242.646f, 3.91f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 90000); + m_creature->SummonCreature(NPC_MALYGOS, 2113.388f, -34.381f, 242.646f, 2.26f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 90000); + break; + // icecrown + case 2: + m_creature->SummonCreature(NPC_LAUGHING_SKULL, 1948.668f, -152.4481f, 240.073f, 1.919f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 90000); + m_creature->SummonCreature(NPC_LAUGHING_SKULL, 1879.845f, -72.91819f, 240.073f, 5.689f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 90000); + m_creature->SummonCreature(NPC_LAUGHING_SKULL, 1905.937f, -133.1651f, 240.073f, 5.777f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 90000); + m_creature->SummonCreature(NPC_LAUGHING_SKULL, 1935.621f, -121.0064f, 240.073f, 3.630f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 90000); + m_creature->SummonCreature(NPC_DEATHSWORM_ZEALOT, 1917.559f, -135.7448f, 240.073f, 4.188f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 90000); + m_creature->SummonCreature(NPC_DEATHSWORM_ZEALOT, 1919.125f, -140.9566f, 240.073f, 3.979f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 90000); + m_creature->SummonCreature(NPC_DEATHSWORM_ZEALOT, 1948.469f, -136.2951f, 240.0707f, 3.438f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 90000); + m_creature->SummonCreature(NPC_DEATHSWORM_ZEALOT, 1956.444f, -138.4028f, 240.1078f, 3.368f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 90000); + m_creature->SummonCreature(NPC_DEATHSWORM_ZEALOT, 1912.129f, -136.934f, 240.073f, 4.188f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 90000); + m_creature->SummonCreature(NPC_DEATHSWORM_ZEALOT, 1952.965f, -130.5295f, 240.1347f, 3.804f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 90000); + m_creature->SummonCreature(NPC_DEATHSWORM_ZEALOT, 1902.132f, -111.3594f, 240.0698f, 4.852f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 90000); + m_creature->SummonCreature(NPC_DEATHSWORM_ZEALOT, 1905.326f, -104.7865f, 240.0523f, 4.764f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 90000); + m_creature->SummonCreature(NPC_DEATHSWORM_ZEALOT, 1897.345f, -106.6076f, 240.1444f, 4.939f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 90000); + m_creature->SummonCreature(NPC_LICH_KING, 1908.557f, -152.4427f, 240.0719f, 4.238f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 90000); + // the following is guesswork + m_creature->SummonCreature(NPC_IMMOLATED_CHAMPION, 1915.371f,-139.9342f,239.9896f, 4.159f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 90000); + break; + } + } + + void UpdateAI(const uint32 uiDiff) override + { + if (m_uiIllusionTimer) + { + if (m_uiIllusionTimer <= uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_SHATTERED_ILLUSION_REMOVE) == CAST_OK) + m_uiIllusionTimer = 0; + } + else + m_uiIllusionTimer -= uiDiff; + } + } +}; + +CreatureAI* GetAI_npc_brain_yogg_saron(Creature* pCreature) +{ + return new npc_brain_yogg_saronAI(pCreature); +} + /*###### ## npc_guardian_of_yogg ######*/ @@ -896,6 +1142,38 @@ CreatureAI* GetAI_npc_immortal_guardian(Creature* pCreature) return new npc_immortal_guardianAI(pCreature); } +bool EffectDummyCreature_npc_immortal_guardian(Unit* /*pCaster*/, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget, ObjectGuid /*originalCasterGuid*/) +{ + // NOTE: this may not be 100% correct and may require additional research + if (uiSpellId == SPELL_EMPOWERED && uiEffIndex == EFFECT_INDEX_0 && pCreatureTarget->GetEntry() == NPC_IMMORTAL_GUARDIAN) + { + uint8 uiProjectedStacks = pCreatureTarget->GetHealthPercent() * 0.1 - 1; + uint8 uiCurrentStacks = 0; + + if (SpellAuraHolder* pEmpowerAura = pCreatureTarget->GetSpellAuraHolder(SPELL_EMPOWERED_MOD)) + uiCurrentStacks = pEmpowerAura->GetStackAmount(); + + // if creature already has the required stacks, ignore + if (uiProjectedStacks == uiCurrentStacks) + return true; + + if (uiCurrentStacks > uiProjectedStacks) + pCreatureTarget->RemoveAuraHolderFromStack(SPELL_EMPOWERED_MOD, uiCurrentStacks - uiProjectedStacks); + else + { + for (uint8 i = 0; i < uiProjectedStacks - uiCurrentStacks; ++i) + pCreatureTarget->CastSpell(pCreatureTarget, SPELL_EMPOWERED_MOD, true); + } + + if (uiCurrentStacks == 0 && uiCurrentStacks < uiProjectedStacks) + pCreatureTarget->RemoveAurasDueToSpell(SPELL_WEAKENED); + + return true; + } + + return false; +} + /*###### ## npc_constrictor_tentacle ######*/ @@ -1024,6 +1302,75 @@ CreatureAI* GetAI_npc_death_ray(Creature* pCreature) return new npc_death_rayAI(pCreature); } +/*###### +## npc_descent_madness +######*/ + +struct MANGOS_DLL_DECL npc_descent_madnessAI : public Scripted_NoMovementAI +{ + npc_descent_madnessAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) + { + m_uiCurentSpell = 0; + Reset(); + } + + uint32 m_uiCurentSpell; + + void Reset() override { } + + void ReceiveAIEvent(AIEventType eventType, Creature* /*pSender*/, Unit* /*pInvoker*/, uint32 uiMiscValue) override + { + if (eventType == AI_EVENT_START_EVENT) + m_uiCurentSpell = uiMiscValue; + } + + uint32 GetCurrentSpell() { return m_uiCurentSpell; } +}; + +CreatureAI* GetAI_npc_descent_madness(Creature* pCreature) +{ + return new npc_descent_madnessAI(pCreature); +} + +bool NpcSpellClick_npc_descent_madness(Player* pPlayer, Creature* pClickedCreature, uint32 /*uiSpellId*/) +{ + if (pClickedCreature->GetEntry() == NPC_DESCEND_INTO_MADNESS) + { + uint32 uiClickSpell = 0; + if (npc_descent_madnessAI* pDescentAI = dynamic_cast(pClickedCreature->AI())) + uiClickSpell = pDescentAI->GetCurrentSpell(); + + if (!uiClickSpell) + return true; + + pPlayer->CastSpell(pPlayer, uiClickSpell, true); + pClickedCreature->ForcedDespawn(); + return true; + } + + return true; +} + +/*###### +## npc_laughing_skull +######*/ + +// TODO Remove this 'script' when combat can be proper prevented from core-side +struct MANGOS_DLL_DECL npc_laughing_skullAI : public Scripted_NoMovementAI +{ + npc_laughing_skullAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { Reset(); } + + void Reset() override { } + void AttackStart(Unit* /*pWho*/) override { } + void MoveInLineOfSight(Unit* /*pWho*/) override { } + void UpdateAI(const uint32 /*uiDiff*/) override { } +}; + +CreatureAI* GetAI_npc_laughing_skull(Creature* pCreature) +{ + return new npc_laughing_skullAI(pCreature); +} + void AddSC_boss_yogg_saron() { Script* pNewScript; @@ -1043,6 +1390,11 @@ void AddSC_boss_yogg_saron() pNewScript->GetAI = &GetAI_npc_voice_yogg_saron; pNewScript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "npc_brain_yogg_saron"; + pNewScript->GetAI = &GetAI_npc_brain_yogg_saron; + pNewScript->RegisterSelf(); + pNewScript = new Script; pNewScript->Name = "npc_guardian_of_yogg"; pNewScript->GetAI = &GetAI_npc_guardian_of_yogg; @@ -1051,6 +1403,7 @@ void AddSC_boss_yogg_saron() pNewScript = new Script; pNewScript->Name = "npc_immortal_guardian"; pNewScript->GetAI = &GetAI_npc_immortal_guardian; + pNewScript->pEffectDummyNPC = &EffectDummyCreature_npc_immortal_guardian; pNewScript->RegisterSelf(); pNewScript = new Script; @@ -1067,4 +1420,15 @@ void AddSC_boss_yogg_saron() pNewScript->Name = "npc_death_ray"; pNewScript->GetAI = &GetAI_npc_death_ray; pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_descent_madness"; + pNewScript->GetAI = &GetAI_npc_descent_madness; + pNewScript->pNpcSpellClick = &NpcSpellClick_npc_descent_madness; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_laughing_skull"; + pNewScript->GetAI = &GetAI_npc_laughing_skull; + pNewScript->RegisterSelf(); } diff --git a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp index 9d32ab378..7a5d4f880 100644 --- a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp +++ b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp @@ -368,9 +368,9 @@ void instance_ulduar::OnObjectCreate(GameObject* pGo) pGo->SetGoState(GO_STATE_ACTIVE); break; case GO_YOGG_GATE: - case GO_BRAIN_DOOR1: - case GO_BRAIN_DOOR2: - case GO_BRAIN_DOOR3: + case GO_BRAIN_DOOR_CHAMBER: + case GO_BRAIN_DOOR_ICECROWN: + case GO_BRAIN_DOOR_STORMWIND: break; // ----------------- Chests ----------------- @@ -772,6 +772,14 @@ void instance_ulduar::SetData(uint32 uiType, uint32 uiData) if (Creature* pBrain = GetSingleCreatureFromStorage(NPC_YOGG_BRAIN)) pBrain->ForcedDespawn(); + // reset illusion doors + if (GameObject* pDoor = GetSingleGameObjectFromStorage(GO_BRAIN_DOOR_CHAMBER)) + pDoor->ResetDoorOrButton(); + if (GameObject* pDoor = GetSingleGameObjectFromStorage(GO_BRAIN_DOOR_ICECROWN)) + pDoor->ResetDoorOrButton(); + if (GameObject* pDoor = GetSingleGameObjectFromStorage(GO_BRAIN_DOOR_STORMWIND)) + pDoor->ResetDoorOrButton(); + m_uiYoggResetTimer = 60000; } break; diff --git a/scripts/northrend/ulduar/ulduar/ulduar.h b/scripts/northrend/ulduar/ulduar/ulduar.h index fb6bf4d3f..e1ad1b905 100644 --- a/scripts/northrend/ulduar/ulduar/ulduar.h +++ b/scripts/northrend/ulduar/ulduar/ulduar.h @@ -302,9 +302,10 @@ enum GO_ANCIENT_GATE = 194255, // Door upstairs before vezax, opens when all keepers are freed GO_VEZAX_GATE = 194750, // Door after vezax GO_YOGG_GATE = 194773, // Yogg-Saron chamber door - GO_BRAIN_DOOR1 = 194635, // Brain chamber doors - GO_BRAIN_DOOR2 = 194636, - GO_BRAIN_DOOR3 = 194637, + GO_BRAIN_DOOR_CHAMBER = 194635, // Brain chamber doors + GO_BRAIN_DOOR_ICECROWN = 194636, + GO_BRAIN_DOOR_STORMWIND = 194637, + GO_FLEE_TO_SURFACE = 194625, // Brain chamber portals // World state used for algalon timer WORLD_STATE_TIMER = 4132, diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index f77a5e5d3..fd38af107 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3028" + #define SD2_REVISION_NR "3029" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 077250934..54e9ed408 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -1376,9 +1376,12 @@ UPDATE creature_template SET ScriptName='boss_yogg_saron' WHERE entry=33288; UPDATE creature_template SET ScriptName='npc_ominous_cloud' WHERE entry=33292; UPDATE creature_template SET ScriptName='npc_death_ray' WHERE entry=33881; UPDATE creature_template SET ScriptName='npc_voice_yogg_saron' WHERE entry=33280; +UPDATE creature_template SET ScriptName='npc_brain_yogg_saron' WHERE entry=33890; UPDATE creature_template SET ScriptName='npc_guardian_of_yogg' WHERE entry=33136; UPDATE creature_template SET ScriptName='npc_immortal_guardian' WHERE entry=33988; UPDATE creature_template SET ScriptName='npc_constrictor_tentacle' WHERE entry=33983; +UPDATE creature_template SET ScriptName='npc_descent_madness' WHERE entry=34072; +UPDATE creature_template SET ScriptName='npc_laughing_skull' WHERE entry=33990; DELETE FROM scripted_event_id WHERE id IN (9735,20907,20964,21030,21031,21032,21033,21045,21605,21606,21620); INSERT INTO scripted_event_id VALUES (9735, 'event_spell_saronite_barrier'), -- Vezax saronite barrier event diff --git a/sql/updates/r3029_mangos.sql b/sql/updates/r3029_mangos.sql new file mode 100644 index 000000000..1b3c03c5a --- /dev/null +++ b/sql/updates/r3029_mangos.sql @@ -0,0 +1,3 @@ +UPDATE creature_template SET ScriptName='npc_brain_yogg_saron' WHERE entry=33890; +UPDATE creature_template SET ScriptName='npc_descent_madness' WHERE entry=34072; +UPDATE creature_template SET ScriptName='npc_laughing_skull' WHERE entry=33990; From 6c29ee8d3fd1abe3bdf2ea0665058d9a67c071f3 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Tue, 29 Jul 2014 00:22:41 +0200 Subject: [PATCH 1041/1172] [3030] Implement more details for Yogg-Saron and Ulduar * Hard mode achievements and loot * Proper phase 3 transition * Detailed comments * More achievement defines --- .../northrend/ulduar/ulduar/boss_freya.cpp | 1 + .../ulduar/ulduar/boss_yogg_saron.cpp | 99 ++++++++++++++++--- .../ulduar/ulduar/instance_ulduar.cpp | 33 +++++++ scripts/northrend/ulduar/ulduar/ulduar.h | 17 ++++ sd2_revision_nr.h | 2 +- 5 files changed, 140 insertions(+), 12 deletions(-) diff --git a/scripts/northrend/ulduar/ulduar/boss_freya.cpp b/scripts/northrend/ulduar/ulduar/boss_freya.cpp index 0b7cc0453..a029aaaf9 100644 --- a/scripts/northrend/ulduar/ulduar/boss_freya.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_freya.cpp @@ -56,6 +56,7 @@ enum // general spells SPELL_FREYA_CREDIT = 65074, // kill credit spell; added in spell_template + SPELL_DEFORESTATION_CREDIT = 65015, // used for achievs 2985 and 2984 SPELL_TELEPORT = 62940, // despawn on event end SPELL_BERSERK = 47008, // SPELL_FREYA_DUMMY_YELLOW = 63292, // dummy spells used to light up the crystals; used in dbscripts_on_creature_move diff --git a/scripts/northrend/ulduar/ulduar/boss_yogg_saron.cpp b/scripts/northrend/ulduar/ulduar/boss_yogg_saron.cpp index 23220a650..a4bfb8708 100644 --- a/scripts/northrend/ulduar/ulduar/boss_yogg_saron.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_yogg_saron.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: boss_yogg_saron -SD%Complete: 70% -SDComment: There are still a few things left. Not fully playable yet. +SD%Complete: 75% +SDComment: Keeper helpers NYI. Illusion cinematics NYI. Sanity support NYI. SDCategory: Ulduar EndScriptData */ @@ -106,6 +106,7 @@ enum SPELL_SHADOWY_BARRIER_YOGG = 63894, SPELL_KNOCK_AWAY = 64022, SPELL_MATCH_HEALTH = 64066, // periodic aura on the Brain + SPELL_BRAIN_HURT_VISUAL = 64361, // Sara transition spells SPELL_SHADOWY_BARRIER = 64775, // damage immunity spells @@ -183,6 +184,7 @@ enum NPC_CORRUPTOR_TENTACLE = 33985, NPC_DESCEND_INTO_MADNESS = 34072, NPC_IMMORTAL_GUARDIAN = 33988, + // NPC_MARKED_IMMORTAL_GUARDIAN = 36064, // purpose unk - maybe used for Shadow Beacon event // NPC_SANITY_WELL = 33991, // summoned by Freya // generic visions creatures @@ -204,14 +206,15 @@ enum NPC_SUIT_OF_ARMOR = 33433, NPC_GARONA = 33436, // cast spell 64063 on 33437 NPC_KING_LLANE = 33437, + SPELL_ASSASSINATE = 64063, // icecrown citadel vision NPC_LICH_KING = 33441, // cast spell 63037 on 33442 NPC_IMMOLATED_CHAMPION = 33442, NPC_DEATHSWORM_ZEALOT = 33567, + SPELL_DEATHGRASP = 63037, // keepers - SPELL_KEEPER_ACTIVE = 62647, // Freya spells SPELL_RESILIENCE_OF_NATURE = 62670, SPELL_SUMMON_SANITY_WELL = 64170, // sends event 21432; used to spawn npc 33991 @@ -329,9 +332,12 @@ struct MANGOS_DLL_DECL boss_saraAI : public Scripted_NoMovementAI, private Dialo { m_pInstance->SetData(TYPE_YOGGSARON, IN_PROGRESS); + // inform the voice controller over event start if (Creature* pVoice = m_pInstance->GetSingleCreatureFromStorage(NPC_VOICE_OF_YOGG)) SendAIEvent(AI_EVENT_START_EVENT, m_creature, pVoice); } + + DoInitialiseKeepers(); } ScriptedAI::MoveInLineOfSight(pWho); @@ -351,6 +357,7 @@ struct MANGOS_DLL_DECL boss_saraAI : public Scripted_NoMovementAI, private Dialo { uiDamage = 0; + // start transition to the secon phase when all the health has been drained if (m_uiPhase == PHASE_SARA) { m_uiPhase = PHASE_TRANSITION; @@ -382,6 +389,7 @@ struct MANGOS_DLL_DECL boss_saraAI : public Scripted_NoMovementAI, private Dialo } else if (pSummoned->GetEntry() == NPC_DEATH_ORB) { + // the death orb is linked to 4 death rays that are randomly moving on the ground float fX, fY, fZ; for (uint8 i = 0; i < 4; ++i) { @@ -402,6 +410,7 @@ struct MANGOS_DLL_DECL boss_saraAI : public Scripted_NoMovementAI, private Dialo switch (iEntry) { case SAY_PHASE_2_INTRO_4: + // make trasition - set hostile and summon Yogg DoCastSpellIfCan(m_creature, SPELL_FULL_HEAL, CAST_TRIGGERED); DoCastSpellIfCan(m_creature, SPELL_PHASE_2_TRANSFORM, CAST_TRIGGERED); DoCastSpellIfCan(m_creature, SPELL_SHADOWY_BARRIER, CAST_TRIGGERED); @@ -412,6 +421,7 @@ struct MANGOS_DLL_DECL boss_saraAI : public Scripted_NoMovementAI, private Dialo m_creature->SetInCombatWithZone(); break; case SPELL_PHASE_2_TRANSFORM: + // complete transition phase - board Yogg and infor the voice controller of phase switch if (m_pInstance) { if (Creature* pYogg = m_pInstance->GetSingleCreatureFromStorage(NPC_YOGGSARON)) @@ -424,6 +434,42 @@ struct MANGOS_DLL_DECL boss_saraAI : public Scripted_NoMovementAI, private Dialo } } + // wrapper to initialise keeper helpers + void DoInitialiseKeepers() + { + if (!m_pInstance) + return; + + uint8 uiKeeperCount = 0; + + if (Creature* pHelper = m_pInstance->GetSingleCreatureFromStorage(NPC_FREYA_HELPER, true)) + { + // ToDo: implement abilities + ++uiKeeperCount; + } + + if (Creature* pHelper = m_pInstance->GetSingleCreatureFromStorage(NPC_HODIR_HELPER, true)) + { + // ToDo: implement abilities + ++uiKeeperCount; + } + + if (Creature* pHelper = m_pInstance->GetSingleCreatureFromStorage(NPC_MIMIRON_HELPER, true)) + { + // ToDo: implement abilities + ++uiKeeperCount; + } + + if (Creature* pHelper = m_pInstance->GetSingleCreatureFromStorage(NPC_THORIM_HELPER, true)) + { + // ToDo: implement abilities + ++uiKeeperCount; + } + + // set hard mode data + m_pInstance->SetData(TYPE_YOGGSARON_HARD, uiKeeperCount); + } + void UpdateAI(const uint32 uiDiff) override { DialogueUpdate(uiDiff); @@ -534,8 +580,9 @@ struct MANGOS_DLL_DECL boss_yogg_saronAI : public Scripted_NoMovementAI m_uiLunaticGazeTimer = 15000; m_uiShadowBeaconTimer = 45000; + // deafening roar only available in 25man mode with 3 keepers or less active if (m_pInstance) - m_uiDeafeningRoarTimer = (!m_bIsRegularMode && m_pInstance->GetData(TYPE_YOGGSARON_HARD) >= 1) ? 20000 : 0; + m_uiDeafeningRoarTimer = (!m_bIsRegularMode && m_pInstance->GetData(TYPE_YOGGSARON_HARD) <= 3) ? 20000 : 0; } void JustReachedHome() override @@ -552,19 +599,17 @@ struct MANGOS_DLL_DECL boss_yogg_saronAI : public Scripted_NoMovementAI m_creature->ForcedDespawn(); } - void UpdateAI(const uint32 uiDiff) override + void ReceiveAIEvent(AIEventType eventType, Creature* /*pSender*/, Unit* pInvoker, uint32 uiMiscValue) override { - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - // switch to last phase when HP is dropped to 30% - if (m_uiPhase == PHASE_VISIONS && m_creature->GetHealthPercent() < 30.0f) + // AI event received at 30% health + if (eventType == AI_EVENT_START_EVENT && pInvoker->GetEntry() == NPC_YOGG_BRAIN && m_uiPhase == PHASE_VISIONS) { DoScriptText(SAY_PHASE_3, m_creature); m_uiPhase = PHASE_OLD_GOD; m_creature->RemoveAurasDueToSpell(SPELL_KNOCK_AWAY); m_creature->RemoveAurasDueToSpell(SPELL_SHADOWY_BARRIER_YOGG); + // despawn Sara and inform the voice controller of phase switch if (m_pInstance) { if (Creature* pSara = m_pInstance->GetSingleCreatureFromStorage(NPC_SARA)) @@ -573,7 +618,14 @@ struct MANGOS_DLL_DECL boss_yogg_saronAI : public Scripted_NoMovementAI SendAIEvent(AI_EVENT_START_EVENT_B, m_creature, pVoice); } } + } + + void UpdateAI(const uint32 uiDiff) override + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + // last phase spells if (m_uiPhase == PHASE_OLD_GOD) { if (m_uiLunaticGazeTimer < uiDiff) @@ -837,6 +889,8 @@ struct MANGOS_DLL_DECL npc_brain_yogg_saronAI : public Scripted_NoMovementAI uint8 m_uiIllusionIndex; uint32 m_uiIllusionTimer; + bool m_bBrainDefeated; + GuidList m_lTentaclesGuids; void Reset() override @@ -844,7 +898,11 @@ struct MANGOS_DLL_DECL npc_brain_yogg_saronAI : public Scripted_NoMovementAI m_uiIllusionTimer = 0; m_uiIllusionIndex = 0; + m_bBrainDefeated = false; + DoCastSpellIfCan(m_creature, SPELL_MATCH_HEALTH); + + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_OOC_NOT_ATTACKABLE); } void AttackStart(Unit* /*pWho*/) override { } @@ -852,6 +910,7 @@ struct MANGOS_DLL_DECL npc_brain_yogg_saronAI : public Scripted_NoMovementAI void ReceiveAIEvent(AIEventType eventType, Creature* /*pSender*/, Unit* pInvoker, uint32 uiMiscValue) override { + // start illusion when informed by the voice controller if (eventType == AI_EVENT_START_EVENT && pInvoker->GetEntry() == NPC_VOICE_OF_YOGG) { if (DoCastSpellIfCan(m_creature, SPELL_INDUCE_MADNESS) == CAST_OK) @@ -892,7 +951,7 @@ struct MANGOS_DLL_DECL npc_brain_yogg_saronAI : public Scripted_NoMovementAI if (pSummoned->GetEntry() == NPC_INFLUENCE_TENTACLE) m_lTentaclesGuids.remove(pSummoned->GetObjectGuid()); - // open door and start casting + // open door and stun all tentacles if (m_lTentaclesGuids.empty()) { DoScriptText(EMOTE_SHATTER_BLAST, m_creature); @@ -979,6 +1038,7 @@ struct MANGOS_DLL_DECL npc_brain_yogg_saronAI : public Scripted_NoMovementAI void UpdateAI(const uint32 uiDiff) override { + // remove stun from tentacles after 30 sec if (m_uiIllusionTimer) { if (m_uiIllusionTimer <= uiDiff) @@ -989,6 +1049,23 @@ struct MANGOS_DLL_DECL npc_brain_yogg_saronAI : public Scripted_NoMovementAI else m_uiIllusionTimer -= uiDiff; } + + // inform Yogg that health has dropped + if (!m_bBrainDefeated && m_creature->GetHealthPercent() < 30.0f) + { + m_uiIllusionTimer = 0; + m_bBrainDefeated = true; + DoCastSpellIfCan(m_creature, SPELL_BRAIN_HURT_VISUAL, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_SHATTERED_ILLUSION_REMOVE, CAST_TRIGGERED); + m_creature->RemoveAurasDueToSpell(SPELL_MATCH_HEALTH); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_OOC_NOT_ATTACKABLE); + + if (m_pInstance) + { + if (Creature* pYogg = m_pInstance->GetSingleCreatureFromStorage(NPC_YOGGSARON)) + SendAIEvent(AI_EVENT_START_EVENT, m_creature, pYogg); + } + } } }; diff --git a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp index 7a5d4f880..30d0dd344 100644 --- a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp +++ b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp @@ -34,6 +34,8 @@ enum SAY_HODIR_HELP = -1603093, SAY_THORIM_HELP = -1603155, SAY_MIMIRON_HELP = -1603195, + + SPELL_KEEPER_ACTIVE = 62647, }; static const DialogueEntry aUlduarDialogue[] = @@ -780,8 +782,12 @@ void instance_ulduar::SetData(uint32 uiType, uint32 uiData) if (GameObject* pDoor = GetSingleGameObjectFromStorage(GO_BRAIN_DOOR_STORMWIND)) pDoor->ResetDoorOrButton(); + // ToDo: reset keeper helpers + m_uiYoggResetTimer = 60000; } + else if (uiData == IN_PROGRESS) + DoStartTimedAchievement(ACHIEVEMENT_CRITERIA_TYPE_KILL_CREATURE, ACHIEV_START_YOGG_ID); break; // Celestial Planetarium @@ -953,6 +959,9 @@ bool instance_ulduar::CheckConditionCriteriaMeet(Player const* pPlayer, uint32 u if (GetData(TYPE_VEZAX_HARD) == DONE) uiCondId = 1; break; + case NPC_YOGGSARON: + uiCondId = 4 - GetData(TYPE_YOGGSARON_HARD); + break; } return uiCondId == uiInstanceConditionId; @@ -1079,19 +1088,31 @@ void instance_ulduar::SpawnKeeperHelper(uint32 uiWho) { case NPC_MIMIRON_HELPER: if (Creature* pKeeper = pPlayer->SummonCreature(uiWho, m_aKeeperHelperLocs[1].fX, m_aKeeperHelperLocs[1].fY, m_aKeeperHelperLocs[1].fZ, m_aKeeperHelperLocs[1].fO, TEMPSUMMON_CORPSE_DESPAWN, 0, true)) + { DoScriptText(m_aKeeperHelperLocs[1].iText, pKeeper); + pKeeper->CastSpell(pKeeper, SPELL_KEEPER_ACTIVE, false); + } break; case NPC_HODIR_HELPER: if (Creature* pKeeper = pPlayer->SummonCreature(uiWho, m_aKeeperHelperLocs[2].fX, m_aKeeperHelperLocs[2].fY, m_aKeeperHelperLocs[2].fZ, m_aKeeperHelperLocs[2].fO, TEMPSUMMON_CORPSE_DESPAWN, 0, true)) + { DoScriptText(m_aKeeperHelperLocs[2].iText, pKeeper); + pKeeper->CastSpell(pKeeper, SPELL_KEEPER_ACTIVE, false); + } break; case NPC_THORIM_HELPER: if (Creature* pKeeper = pPlayer->SummonCreature(uiWho, m_aKeeperHelperLocs[3].fX, m_aKeeperHelperLocs[3].fY, m_aKeeperHelperLocs[3].fZ, m_aKeeperHelperLocs[3].fO, TEMPSUMMON_CORPSE_DESPAWN, 0, true)) + { DoScriptText(m_aKeeperHelperLocs[3].iText, pKeeper); + pKeeper->CastSpell(pKeeper, SPELL_KEEPER_ACTIVE, false); + } break; case NPC_FREYA_HELPER: if (Creature* pKeeper = pPlayer->SummonCreature(uiWho, m_aKeeperHelperLocs[0].fX, m_aKeeperHelperLocs[0].fY, m_aKeeperHelperLocs[0].fZ, m_aKeeperHelperLocs[0].fO, TEMPSUMMON_CORPSE_DESPAWN, 0, true)) + { DoScriptText(m_aKeeperHelperLocs[0].iText, pKeeper); + pKeeper->CastSpell(pKeeper, SPELL_KEEPER_ACTIVE, false); + } break; } } @@ -1308,6 +1329,18 @@ bool instance_ulduar::CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player c case ACHIEV_CRIT_FIREFIGHTER_N: case ACHIEV_CRIT_FIREFIGHTER_H: return GetData(TYPE_MIMIRON_HARD) == DONE; + case ACHIEV_CRIT_THREE_LIGHTS_N: + case ACHIEV_CRIT_THREE_LIGHTS_H: + return GetData(TYPE_YOGGSARON_HARD) <= 3; + case ACHIEV_CRIT_TWO_LIGHTS_N: + case ACHIEV_CRIT_TWO_LIGHTS_H: + return GetData(TYPE_YOGGSARON_HARD) <= 2; + case ACHIEV_CRIT_ONE_LIGHT_N: + case ACHIEV_CRIT_ONE_LIGHT_H: + return GetData(TYPE_YOGGSARON_HARD) <= 1; + case ACHIEV_CRIT_ALONE_DARK_N: + case ACHIEV_CRIT_ALONE_DARK_H: + return GetData(TYPE_YOGGSARON_HARD) == 0; default: return false; diff --git a/scripts/northrend/ulduar/ulduar/ulduar.h b/scripts/northrend/ulduar/ulduar/ulduar.h index e1ad1b905..df1927f27 100644 --- a/scripts/northrend/ulduar/ulduar/ulduar.h +++ b/scripts/northrend/ulduar/ulduar/ulduar.h @@ -117,6 +117,7 @@ enum NPC_ELDER_BRIGHTLEAF = 32915, NPC_ELDER_IRONBRACH = 32913, NPC_ELDER_STONEBARK = 32914, + NPC_FREYA_ACHIEV_TRIGGER = 33406, // Cast spell 65015 for achievs 2985 and 2984 // Hodir helpers NPC_DRUID_HORDE_N = 32941, // Tor Greycloud @@ -329,6 +330,12 @@ enum ACHIEV_START_IGNIS_ID = 20951, // Ignis timed achievs 2930, 2929 ACHIEV_START_XT002_ID = 21027, // XT-002 timed achievs 2937, 2938 ACHIEV_START_FREYA_ID = 21597, // Freya timed achievs 2980, 2981 + ACHIEV_START_YOGG_ID = 21001, // Yogg timed achievs 3012, 3013 + ACHIEV_START_COMING_WALLS = 33136, // Guardian of Yogg timed achievs 3014, 3017 + ACHIEV_START_DWARFAGEDDON = 65387, // Ulduar gauntlet timed achievs 3097, 3098; triggered by missing spell 65387 + ACHIEV_START_LUMBERJACKED = 21686, // Ulduar elder kill timed achievs 2979, 3118; triggered by missing spell 65296 + ACHIEV_START_NERF_BOTS = 65037, // XT-002 gauntlet timed achievs 2933, 2935; triggered by missing spell 65037 + ACHIEV_START_SUPERMASSIVE = 21697, // Black hole timed achievs 3003, 3002 ACHIEV_CRIT_SARONITE_N = 10451, // General Vezax, achievs 3181, 3188 ACHIEV_CRIT_SARONITE_H = 10462, @@ -402,6 +409,16 @@ enum ACHIEV_CRIT_KNOCK_3_H = 10461, ACHIEV_CRIT_FIREFIGHTER_N = 10450, // Mimiron, achievs 3180, 3189 ACHIEV_CRIT_FIREFIGHTER_H = 10463, + ACHIEV_CRIT_THREE_LIGHTS_N = 10410, // Yogg-Saron, achievs 3157, 3161, + ACHIEV_CRIT_THREE_LIGHTS_H = 10414, + ACHIEV_CRIT_TWO_LIGHTS_N = 10338, // Yogg-Saron, achievs 3141, 3162 + ACHIEV_CRIT_TWO_LIGHTS_H = 10415, + ACHIEV_CRIT_ONE_LIGHT_N = 10409, // Yogg-Saron, achievs 3158, 3163 + ACHIEV_CRIT_ONE_LIGHT_H = 10416, + ACHIEV_CRIT_ALONE_DARK_N = 10412, // Yogg-Saron, achievs 3159, 3164 + ACHIEV_CRIT_ALONE_DARK_H = 10417, + ACHIEV_CRIT_DRIVE_CRAZY_N = 10185, // Yogg-Saron, achievs 3008, 3010 + ACHIEV_CRIT_DRIVE_CRAZY_H = 10296, }; struct UlduarSpawns diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index fd38af107..09fad8484 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3029" + #define SD2_REVISION_NR "3030" #endif // __SD2_REVISION_NR_H__ From fbcc450432f6b31cd2b60efcd247e193bd0b57a9 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Wed, 30 Jul 2014 01:17:32 +0200 Subject: [PATCH 1042/1172] [3031] Implement friendly keepers and sanity for Yogg-Saron encounter --- .../ulduar/ulduar/boss_yogg_saron.cpp | 212 ++++++++++++++++-- .../ulduar/ulduar/instance_ulduar.cpp | 28 ++- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 2 + sql/scriptdev2_script_full.sql | 2 +- sql/updates/r3031_mangos.sql | 2 + sql/updates/r3031_scriptdev2.sql | 3 + 7 files changed, 222 insertions(+), 29 deletions(-) create mode 100644 sql/updates/r3031_mangos.sql create mode 100644 sql/updates/r3031_scriptdev2.sql diff --git a/scripts/northrend/ulduar/ulduar/boss_yogg_saron.cpp b/scripts/northrend/ulduar/ulduar/boss_yogg_saron.cpp index a4bfb8708..6683a898a 100644 --- a/scripts/northrend/ulduar/ulduar/boss_yogg_saron.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_yogg_saron.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: boss_yogg_saron -SD%Complete: 75% -SDComment: Keeper helpers NYI. Illusion cinematics NYI. Sanity support NYI. +SD%Complete: 85% +SDComment: Illusion cinematics NYI. SDCategory: Ulduar EndScriptData */ @@ -27,6 +27,7 @@ EndScriptData */ enum { + // phase 1 yells SAY_SARA_INTRO_1 = -1603197, SAY_SARA_INTRO_2 = -1603198, SAY_SARA_AGGRO = -1603199, @@ -36,22 +37,25 @@ enum SAY_SARA_SLAY_2 = -1603204, SAY_WIPE_PHASE_1 = -1603205, + // phase 2 transition yells SAY_PHASE_2_INTRO_1 = -1603206, SAY_PHASE_2_INTRO_2 = -1603262, SAY_PHASE_2_INTRO_3 = -1603263, SAY_PHASE_2_INTRO_4 = -1603264, SAY_PHASE_2_INTRO_5 = -1603265, + + // phase 2 and 3 yells SAY_SARA_PHYCHOSIS = -1603207, SAY_SARA_DEATH_RAY = -1603208, - SAY_MADNESS = -1603209, SAY_PHASE_3 = -1603210, - SAY_SLAY_1 = -1603211, - SAY_SLAY_2 = -1603212, + SAY_SLAY = -1603212, SAY_DEATH = -1603213, SAY_TO_INSANE_1 = -1603214, SAY_TO_INSANE_2 = -1603215, + SOUND_ID_LUNATIC_GAZE = 15757, + // icecrown illusion yells SAY_LICH_KING_1 = -1603216, SAY_CHAMPION_1 = -1603217, SAY_CHAMPION_2 = -1603218, @@ -59,12 +63,14 @@ enum SAY_YOGG_V3_1 = -1603220, SAY_YOGG_V3_2 = -1603221, + // chamber illusion yells SAY_NELTHARION_1 = -1603222, SAY_YSERA = -1603223, SAY_NELTHARION_2 = -1603224, SAY_MALYGOS = -1603225, SAY_YOGG_V2 = -1603226, + // stormwind illusion yells SAY_GARONA_1 = -1603227, SAY_GARONA_2 = -1603228, SAY_YOGG_V1_1 = -1603229, @@ -73,10 +79,12 @@ enum SAY_GARONA_4 = -1603232, SAY_YOGG_V1_3 = -1603233, + // emotes EMOTE_VISION_BLAST = -1603234, EMOTE_SHATTER_BLAST = -1603235, EMOTE_CLOUD_BOIL = -1603261, EMOTE_DEAFENING_ROAR = -1603266, + EMOTE_EMPOWERING_SHADOWS = -1603211, // generic spells SPELL_EXTINGUISH_LIFE = 64166, // berserk spell @@ -98,8 +106,8 @@ enum // Voice of Yogg spells SPELL_SANITY = 63786, // add sanity when encounter starts + SPELL_INSANE = 63120, // charm effect on players SPELL_INSANE_PERIODIC = 64554, // decrease sanity - SPELL_CLEAR_INSANE = 63122, // clear all the sanity and insane on wipe / death SPELL_SUMMON_GUARDIAN_YOGG = 62978, // cast by npc 33280 on an Ominus cloud // Yogg transition spells @@ -142,8 +150,8 @@ enum SPELL_NONDESCRIPT_ARMOR = 64013, // stun auras for illusions SPELL_NONDESCRIPT_CREATURE = 64010, SPELL_GRIM_REPRISAL = 63305, // procs 64039 on damage taken - SPELL_SHATTERED_ILLUSION = 64173, - SPELL_SHATTERED_ILLUSION_REMOVE = 65238, // remove aura 64173 + SPELL_SHATTERED_ILLUSION = 64173, // send event 21669 + SPELL_SHATTERED_ILLUSION_REMOVE = 65238, // remove aura 64173; send event 21671 SPELL_INDUCE_MADNESS = 64059, // reduce sanity by 100% to all players with aura 63988 // Old God phase spells @@ -220,8 +228,8 @@ enum SPELL_SUMMON_SANITY_WELL = 64170, // sends event 21432; used to spawn npc 33991 // sanity well spells - SPELL_SANITY_WELL = 64169, - SPELL_SANITY_WELL_VISUAL = 63288, + // SPELL_SANITY_WELL = 64169, + // SPELL_SANITY_WELL_VISUAL = 63288, // Hodir spells SPELL_FORTITUDE_OF_FROST = 62650, @@ -442,28 +450,44 @@ struct MANGOS_DLL_DECL boss_saraAI : public Scripted_NoMovementAI, private Dialo uint8 uiKeeperCount = 0; - if (Creature* pHelper = m_pInstance->GetSingleCreatureFromStorage(NPC_FREYA_HELPER, true)) + if (m_pInstance->GetData(TYPE_KEEPER_FREYA) == DONE) { - // ToDo: implement abilities - ++uiKeeperCount; + if (Creature* pHelper = m_pInstance->GetSingleCreatureFromStorage(NPC_FREYA_HELPER)) + { + pHelper->CastSpell(pHelper, SPELL_SUMMON_SANITY_WELL, false); + pHelper->CastSpell(pHelper, SPELL_RESILIENCE_OF_NATURE, true); + ++uiKeeperCount; + } } - if (Creature* pHelper = m_pInstance->GetSingleCreatureFromStorage(NPC_HODIR_HELPER, true)) + if (m_pInstance->GetData(TYPE_KEEPER_HODIR) == DONE) { - // ToDo: implement abilities - ++uiKeeperCount; + if (Creature* pHelper = m_pInstance->GetSingleCreatureFromStorage(NPC_HODIR_HELPER)) + { + pHelper->CastSpell(pHelper, SPELL_HODIRS_PROTECTIVE_GAZE, false); + pHelper->CastSpell(pHelper, SPELL_FORTITUDE_OF_FROST, true); + ++uiKeeperCount; + } } - if (Creature* pHelper = m_pInstance->GetSingleCreatureFromStorage(NPC_MIMIRON_HELPER, true)) + if (m_pInstance->GetData(TYPE_KEEPER_MIMIRON) == DONE) { - // ToDo: implement abilities - ++uiKeeperCount; + if (Creature* pHelper = m_pInstance->GetSingleCreatureFromStorage(NPC_MIMIRON_HELPER)) + { + pHelper->CastSpell(pHelper, SPELL_SPEED_OF_INVENTION, true); + SendAIEvent(AI_EVENT_START_EVENT, m_creature, pHelper); + ++uiKeeperCount; + } } - if (Creature* pHelper = m_pInstance->GetSingleCreatureFromStorage(NPC_THORIM_HELPER, true)) + if (m_pInstance->GetData(TYPE_KEEPER_THORIM) == DONE) { - // ToDo: implement abilities - ++uiKeeperCount; + if (Creature* pHelper = m_pInstance->GetSingleCreatureFromStorage(NPC_THORIM_HELPER)) + { + pHelper->CastSpell(pHelper, SPELL_TITANIC_STORM, false); + pHelper->CastSpell(pHelper, SPELL_FURY_OF_THE_STORM, true); + ++uiKeeperCount; + } } // set hard mode data @@ -620,6 +644,22 @@ struct MANGOS_DLL_DECL boss_yogg_saronAI : public Scripted_NoMovementAI } } + void KilledUnit(Unit* pVictim) override + { + if (pVictim->GetTypeId() != TYPEID_PLAYER) + return; + + DoScriptText(SAY_SLAY, m_creature); + } + + void JustDied(Unit* /*pKiller*/) override + { + if (m_pInstance) + m_pInstance->SetData(TYPE_YOGGSARON, DONE); + + DoScriptText(SAY_DEATH, m_creature); + } + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) @@ -631,7 +671,12 @@ struct MANGOS_DLL_DECL boss_yogg_saronAI : public Scripted_NoMovementAI if (m_uiLunaticGazeTimer < uiDiff) { if (DoCastSpellIfCan(m_creature, SPELL_LUNATIC_GAZE_YOGG) == CAST_OK) + { + if (urand(0, 1)) + DoPlaySoundToSet(m_creature, SOUND_ID_LUNATIC_GAZE); + m_uiLunaticGazeTimer = 12000; + } } else m_uiLunaticGazeTimer -= uiDiff; @@ -639,7 +684,10 @@ struct MANGOS_DLL_DECL boss_yogg_saronAI : public Scripted_NoMovementAI if (m_uiShadowBeaconTimer < uiDiff) { if (DoCastSpellIfCan(m_creature, SPELL_SHADOW_BEACON) == CAST_OK) + { + DoScriptText(EMOTE_EMPOWERING_SHADOWS, m_creature); m_uiShadowBeaconTimer = 45000; + } } else m_uiShadowBeaconTimer -= uiDiff; @@ -691,6 +739,7 @@ struct MANGOS_DLL_DECL npc_voice_yogg_saronAI : public Scripted_NoMovementAI uint8 m_uiPortalsCount; uint32 m_uiBerserkTimer; + uint32 m_uiSanityCheckTimer; uint32 m_uiSummonGuardianTimer; uint32 m_uiCrusherTentacleTimer; uint32 m_uiCorruptorTentacleTimer; @@ -704,6 +753,7 @@ struct MANGOS_DLL_DECL npc_voice_yogg_saronAI : public Scripted_NoMovementAI { m_uiPhase = PHASE_INTRO; m_uiBerserkTimer = 0; + m_uiSanityCheckTimer = 0; m_uiSummonGuardianTimer = 1000; m_uiCrusherTentacleTimer = 1000; m_uiCorruptorTentacleTimer = 1000; @@ -727,6 +777,10 @@ struct MANGOS_DLL_DECL npc_voice_yogg_saronAI : public Scripted_NoMovementAI case AI_EVENT_START_EVENT: m_uiPhase = PHASE_SARA; m_uiBerserkTimer = 15 * MINUTE * IN_MILLISECONDS; + + // start sanity + m_uiSanityCheckTimer = 15000; + DoCastSpellIfCan(m_creature, SPELL_SANITY); break; case AI_EVENT_START_EVENT_A: m_uiPhase = PHASE_VISIONS; @@ -774,6 +828,15 @@ struct MANGOS_DLL_DECL npc_voice_yogg_saronAI : public Scripted_NoMovementAI } } + void SpellHitTarget(Unit* pTarget, const SpellEntry* pSpell) override + { + if (pSpell->Id == SPELL_INSANE && pTarget->GetTypeId() == TYPEID_PLAYER && m_pInstance) + { + if (Creature* pYogg = m_pInstance->GetSingleCreatureFromStorage(NPC_YOGGSARON)) + DoScriptText(urand(0, 1) ? SAY_TO_INSANE_1 : SAY_TO_INSANE_2, pYogg, pTarget); + } + } + void UpdateAI(const uint32 uiDiff) override { if (m_uiBerserkTimer) @@ -787,6 +850,17 @@ struct MANGOS_DLL_DECL npc_voice_yogg_saronAI : public Scripted_NoMovementAI m_uiBerserkTimer -= uiDiff; } + if (m_uiSanityCheckTimer) + { + if (m_uiSanityCheckTimer <= uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_INSANE_PERIODIC) == CAST_OK) + m_uiSanityCheckTimer = 0; + } + else + m_uiSanityCheckTimer -= uiDiff; + } + if (m_uiPhase == PHASE_SARA) { if (m_uiSummonGuardianTimer < uiDiff) @@ -839,6 +913,9 @@ struct MANGOS_DLL_DECL npc_voice_yogg_saronAI : public Scripted_NoMovementAI if (Creature* pBrain = m_pInstance->GetSingleCreatureFromStorage(NPC_YOGG_BRAIN)) SendAIEvent(AI_EVENT_START_EVENT, m_creature, pBrain, m_uiPortalsCount); + if (Creature* pYogg = m_pInstance->GetSingleCreatureFromStorage(NPC_YOGGSARON)) + DoScriptText(SAY_MADNESS, pYogg); + float fX, fY, fZ, fAng; for (uint8 i = 0; i < m_uiMaxPortals; ++i) { @@ -1117,7 +1194,24 @@ struct MANGOS_DLL_DECL npc_guardian_of_yoggAI : public ScriptedAI if (m_pInstance) { if (m_pInstance->GetData(TYPE_YOGGSARON) != FAIL) + { + if (Creature* pVoice = m_pInstance->GetSingleCreatureFromStorage(NPC_VOICE_OF_YOGG)) + { + Map::PlayerList const& lPlayers = m_pInstance->instance->GetPlayers(); + + if (lPlayers.isEmpty()) + return; + + // whisper to all players + for (Map::PlayerList::const_iterator itr = lPlayers.begin(); itr != lPlayers.end(); ++itr) + { + if (Player* pPlayer = itr->getSource()) + DoScriptText(SAY_WIPE_PHASE_1, pVoice, pPlayer); + } + } + m_pInstance->SetData(TYPE_YOGGSARON, FAIL); + } } m_creature->ForcedDespawn(); @@ -1448,6 +1542,70 @@ CreatureAI* GetAI_npc_laughing_skull(Creature* pCreature) return new npc_laughing_skullAI(pCreature); } +/*###### +## npc_keeper_mimiron +######*/ + +struct MANGOS_DLL_DECL npc_keeper_mimironAI : public Scripted_NoMovementAI +{ + npc_keeper_mimironAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { Reset(); } + + uint32 m_uiMatrixTimer; + + void Reset() override + { + m_uiMatrixTimer = 0; + } + + void AttackStart(Unit* /*pWho*/) override { } + void MoveInLineOfSight(Unit* /*pWho*/) override { } + + void ReceiveAIEvent(AIEventType eventType, Creature* /*pSender*/, Unit* pInvoker, uint32 /*uiMiscValue*/) override + { + if (eventType == AI_EVENT_START_EVENT && pInvoker->GetEntry() == NPC_SARA) + m_uiMatrixTimer = 30000; + } + + void UpdateAI(const uint32 uiDiff) override + { + if (m_uiMatrixTimer) + { + if (m_uiMatrixTimer <= uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_DESTABILIZATION_MATRIX) == CAST_OK) + m_uiMatrixTimer = 30000; + } + else + m_uiMatrixTimer -= uiDiff; + } + } +}; + +CreatureAI* GetAI_npc_keeper_mimiron(Creature* pCreature) +{ + return new npc_keeper_mimironAI(pCreature); +} + +/*###### +## npc_keeper_thorim +######*/ + +// TODO Remove this 'script' when combat can be proper prevented from core-side +struct MANGOS_DLL_DECL npc_keeper_thorimAI : public Scripted_NoMovementAI +{ + npc_keeper_thorimAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { Reset(); } + + void Reset() override { } + void AttackStart(Unit* /*pWho*/) override { } + void MoveInLineOfSight(Unit* /*pWho*/) override { } + void UpdateAI(const uint32 /*uiDiff*/) override { } +}; + +CreatureAI* GetAI_npc_keeper_thorim(Creature* pCreature) +{ + return new npc_keeper_thorimAI(pCreature); +} + void AddSC_boss_yogg_saron() { Script* pNewScript; @@ -1508,4 +1666,14 @@ void AddSC_boss_yogg_saron() pNewScript->Name = "npc_laughing_skull"; pNewScript->GetAI = &GetAI_npc_laughing_skull; pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_keeper_mimiron"; + pNewScript->GetAI = &GetAI_npc_keeper_mimiron; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_keeper_thorim"; + pNewScript->GetAI = &GetAI_npc_keeper_thorim; + pNewScript->RegisterSelf(); } diff --git a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp index 30d0dd344..9caf095a0 100644 --- a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp +++ b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp @@ -36,6 +36,7 @@ enum SAY_MIMIRON_HELP = -1603195, SPELL_KEEPER_ACTIVE = 62647, + SPELL_CLEAR_INSANE = 63122, // clear all the sanity and insane on wipe / death }; static const DialogueEntry aUlduarDialogue[] = @@ -207,6 +208,10 @@ void instance_ulduar::OnCreatureCreate(Creature* pCreature) case NPC_HODIR: case NPC_THORIM: case NPC_FREYA: + case NPC_THORIM_HELPER: + case NPC_MIMIRON_HELPER: + case NPC_HODIR_HELPER: + case NPC_FREYA_HELPER: break; case NPC_ULDUAR_COLOSSUS: @@ -755,9 +760,9 @@ void instance_ulduar::SetData(uint32 uiType, uint32 uiData) return; m_auiEncounter[uiType] = uiData; DoUseDoorOrButton(GO_YOGG_GATE); - if (uiData == FAIL) + if (uiData == FAIL || uiData == DONE) { - // reset encounter + // reset/cleanup encounter for (GuidList::const_iterator itr = m_lOminousCloudsGuids.begin(); itr != m_lOminousCloudsGuids.end(); ++itr) { if (Creature* pCloud = instance->GetCreature(*itr)) @@ -766,7 +771,7 @@ void instance_ulduar::SetData(uint32 uiType, uint32 uiData) if (Creature* pVoice = GetSingleCreatureFromStorage(NPC_VOICE_OF_YOGG)) { - // ToDo: clear insane / sanity + pVoice->CastSpell(pVoice, SPELL_CLEAR_INSANE, true); pVoice->ForcedDespawn(); } if (Creature* pSara = GetSingleCreatureFromStorage(NPC_SARA)) @@ -782,9 +787,22 @@ void instance_ulduar::SetData(uint32 uiType, uint32 uiData) if (GameObject* pDoor = GetSingleGameObjectFromStorage(GO_BRAIN_DOOR_STORMWIND)) pDoor->ResetDoorOrButton(); - // ToDo: reset keeper helpers + // reset all helpers + for (uint8 i = 0; i < countof(m_aKeeperHelperLocs); ++i) + { + if (GetData(m_aKeeperHelperLocs[i].uiType == DONE)) + { + if (Creature* pHelper = GetSingleCreatureFromStorage(m_aKeeperHelperLocs[i].uiEntry)) + { + pHelper->AI()->EnterEvadeMode(); + pHelper->CastSpell(pHelper, SPELL_KEEPER_ACTIVE, true); + } + } + } - m_uiYoggResetTimer = 60000; + // full reset only on fail + if (uiData == FAIL) + m_uiYoggResetTimer = 60000; } else if (uiData == IN_PROGRESS) DoStartTimedAchievement(ACHIEVEMENT_CRITERIA_TYPE_KILL_CREATURE, ACHIEV_START_YOGG_ID); diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 09fad8484..9beff9974 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3030" + #define SD2_REVISION_NR "3031" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 54e9ed408..3a6cb3954 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -1382,6 +1382,8 @@ UPDATE creature_template SET ScriptName='npc_immortal_guardian' WHERE entry=3398 UPDATE creature_template SET ScriptName='npc_constrictor_tentacle' WHERE entry=33983; UPDATE creature_template SET ScriptName='npc_descent_madness' WHERE entry=34072; UPDATE creature_template SET ScriptName='npc_laughing_skull' WHERE entry=33990; +UPDATE creature_template SET ScriptName='npc_keeper_mimiron' WHERE entry=33412; +UPDATE creature_template SET ScriptName='npc_keeper_thorim' WHERE entry=33413; DELETE FROM scripted_event_id WHERE id IN (9735,20907,20964,21030,21031,21032,21033,21045,21605,21606,21620); INSERT INTO scripted_event_id VALUES (9735, 'event_spell_saronite_barrier'), -- Vezax saronite barrier event diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index a3b151385..72e370325 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -3831,7 +3831,7 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1603209,'MADNESS WILL CONSUME YOU!',15756,1,0,0,'yogg SAY_MADNESS'), (-1603210,'Look upon the true face of death and know that your end comes soon!',15755,1,0,0,'yogg SAY_PHASE_3'), -(-1603211,'Hoohehehahahaha... AHAHAHAHAHAHA!',15757,1,0,0,'yogg SAY_SLAY_1'), +(-1603211,'%s prepares to unleash Empowering Shadows!',0,3,0,0,'yogg EMOTE_EMPOWERING_SHADOWS'), (-1603212,'Eternal suffering awaits!',15758,1,0,0,'yogg SAY_SLAY_2'), (-1603213,'Your fate is sealed. The end of days is finally upon you and ALL who inhabit this miserable little seedling. Uulwi ifis halahs gag erh\'ongg w\'ssh.',15761,1,0,0,'yogg SAY_DEATH'), (-1603214,'Your will is no longer you own...',15759,4,0,0,'yogg SAY_TO_INSANE_1'), diff --git a/sql/updates/r3031_mangos.sql b/sql/updates/r3031_mangos.sql new file mode 100644 index 000000000..7c8383710 --- /dev/null +++ b/sql/updates/r3031_mangos.sql @@ -0,0 +1,2 @@ +UPDATE creature_template SET ScriptName='npc_keeper_mimiron' WHERE entry=33412; +UPDATE creature_template SET ScriptName='npc_keeper_thorim' WHERE entry=33413; diff --git a/sql/updates/r3031_scriptdev2.sql b/sql/updates/r3031_scriptdev2.sql new file mode 100644 index 000000000..8a0344059 --- /dev/null +++ b/sql/updates/r3031_scriptdev2.sql @@ -0,0 +1,3 @@ +DELETE FROM script_texts WHERE entry=-1603211; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1603211,'%s prepares to unleash Empowering Shadows!',0,3,0,0,'yogg EMOTE_EMPOWERING_SHADOWS'); From fb7508277e7c1001583af213daf802517350a0ff Mon Sep 17 00:00:00 2001 From: Xfurry Date: Wed, 30 Jul 2014 22:03:11 +0200 Subject: [PATCH 1043/1172] [3032] Implement support for achievements 3008 and 3010 --- scripts/northrend/ulduar/ulduar/boss_yogg_saron.cpp | 2 ++ scripts/northrend/ulduar/ulduar/instance_ulduar.cpp | 6 ++++++ scripts/northrend/ulduar/ulduar/ulduar.h | 3 ++- sd2_revision_nr.h | 2 +- 4 files changed, 11 insertions(+), 2 deletions(-) diff --git a/scripts/northrend/ulduar/ulduar/boss_yogg_saron.cpp b/scripts/northrend/ulduar/ulduar/boss_yogg_saron.cpp index 6683a898a..e00ff514a 100644 --- a/scripts/northrend/ulduar/ulduar/boss_yogg_saron.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_yogg_saron.cpp @@ -834,6 +834,8 @@ struct MANGOS_DLL_DECL npc_voice_yogg_saronAI : public Scripted_NoMovementAI { if (Creature* pYogg = m_pInstance->GetSingleCreatureFromStorage(NPC_YOGGSARON)) DoScriptText(urand(0, 1) ? SAY_TO_INSANE_1 : SAY_TO_INSANE_2, pYogg, pTarget); + + m_pInstance->SetSpecialAchievementCriteria(TYPE_ACHIEV_DRIVE_CRAZY, false); } } diff --git a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp index 9caf095a0..6674f6737 100644 --- a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp +++ b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp @@ -805,7 +805,10 @@ void instance_ulduar::SetData(uint32 uiType, uint32 uiData) m_uiYoggResetTimer = 60000; } else if (uiData == IN_PROGRESS) + { DoStartTimedAchievement(ACHIEVEMENT_CRITERIA_TYPE_KILL_CREATURE, ACHIEV_START_YOGG_ID); + SetSpecialAchievementCriteria(TYPE_ACHIEV_DRIVE_CRAZY, true); + } break; // Celestial Planetarium @@ -1359,6 +1362,9 @@ bool instance_ulduar::CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player c case ACHIEV_CRIT_ALONE_DARK_N: case ACHIEV_CRIT_ALONE_DARK_H: return GetData(TYPE_YOGGSARON_HARD) == 0; + case ACHIEV_CRIT_DRIVE_CRAZY_N: + case ACHIEV_CRIT_DRIVE_CRAZY_H: + return m_abAchievCriteria[TYPE_ACHIEV_DRIVE_CRAZY]; default: return false; diff --git a/scripts/northrend/ulduar/ulduar/ulduar.h b/scripts/northrend/ulduar/ulduar/ulduar.h index df1927f27..c5abd4c17 100644 --- a/scripts/northrend/ulduar/ulduar/ulduar.h +++ b/scripts/northrend/ulduar/ulduar/ulduar.h @@ -190,7 +190,7 @@ enum NPC_KEEPER_MIMIRON = 33244, NPC_KEEPER_THORIM = 33242, - MAX_SPECIAL_ACHIEV_CRITS = 18, + MAX_SPECIAL_ACHIEV_CRITS = 19, TYPE_ACHIEV_CAT_LADY = 0, TYPE_ACHIEV_NINE_LIVES = 1, @@ -210,6 +210,7 @@ enum TYPE_ACHIEV_COOL_FRIENDS = 15, TYPE_ACHIEV_LIGHTNING = 16, TYPE_ACHIEV_BACK_NATURE = 17, + TYPE_ACHIEV_DRIVE_CRAZY = 18, // Loot chests // Kologarn diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 9beff9974..b24511095 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3031" + #define SD2_REVISION_NR "3032" #endif // __SD2_REVISION_NR_H__ From 269d765988d79b6b6c11708173711be37feeff3b Mon Sep 17 00:00:00 2001 From: Xfurry Date: Tue, 5 Aug 2014 23:30:16 +0200 Subject: [PATCH 1044/1172] [3033] Update VS2010, VS2012 and VS2013 projects to today's standard Add proper MP compiling support Remove useless Precompiled header memory limit --- VC100/100ScriptDev2.vcxproj | 6 ++++-- VC110/110ScriptDev2.vcxproj | 8 ++++---- VC120/120ScriptDev2.vcxproj | 8 ++++---- sd2_revision_nr.h | 2 +- 4 files changed, 13 insertions(+), 11 deletions(-) diff --git a/VC100/100ScriptDev2.vcxproj b/VC100/100ScriptDev2.vcxproj index a6acaa1e7..29cf8516a 100644 --- a/VC100/100ScriptDev2.vcxproj +++ b/VC100/100ScriptDev2.vcxproj @@ -107,6 +107,7 @@ true true true + true mangosd.lib;ACEd.lib;framework.lib;%(AdditionalDependencies) @@ -138,6 +139,7 @@ true true true + true mangosd.lib;ACEd.lib;framework.lib;%(AdditionalDependencies) @@ -153,7 +155,6 @@ - /MP %(AdditionalOptions) ..\..\..\..\dep\include\;..\..\..\shared\;..\..\..\framework\;..\..\..\game\;..\include\;..\base\;..\..\..\..\dep\ACE_wrappers\;%(AdditionalIncludeDirectories) WIN32;NDEBUG;_WINDOWS;_USRDLL;SCRIPT;_SECURE_SCL=0;%(PreprocessorDefinitions) false @@ -165,6 +166,7 @@ true true true + true mangosd.lib;ACE.lib;framework.lib;%(AdditionalDependencies) @@ -184,7 +186,6 @@ X64 - /MP %(AdditionalOptions) ..\..\..\..\dep\include\;..\..\..\shared\;..\..\..\framework\;..\..\..\game\;..\include\;..\base\;..\..\..\..\dep\ACE_wrappers\;%(AdditionalIncludeDirectories) WIN32;NDEBUG;_WINDOWS;_USRDLL;SCRIPT;_SECURE_SCL=0;%(PreprocessorDefinitions) MultiThreadedDLL @@ -195,6 +196,7 @@ true true true + true mangosd.lib;ACE.lib;framework.lib;%(AdditionalDependencies) diff --git a/VC110/110ScriptDev2.vcxproj b/VC110/110ScriptDev2.vcxproj index adbf2d729..713c9e418 100644 --- a/VC110/110ScriptDev2.vcxproj +++ b/VC110/110ScriptDev2.vcxproj @@ -110,7 +110,7 @@ true true true - /Zm200 %(AdditionalOptions) + true mangosd.lib;ACEd.lib;framework.lib;%(AdditionalDependencies) @@ -142,7 +142,7 @@ true true true - /Zm200 %(AdditionalOptions) + true mangosd.lib;ACEd.lib;framework.lib;%(AdditionalDependencies) @@ -158,7 +158,6 @@ - /Zm200 %(AdditionalOptions) ..\..\..\..\dep\include\;..\..\..\shared\;..\..\..\framework\;..\..\..\game\;..\include\;..\base\;..\..\..\..\dep\ACE_wrappers\;%(AdditionalIncludeDirectories) WIN32;NDEBUG;_WINDOWS;_USRDLL;SCRIPT;_SECURE_SCL=0;%(PreprocessorDefinitions) false @@ -170,6 +169,7 @@ true true true + true mangosd.lib;ACE.lib;framework.lib;%(AdditionalDependencies) @@ -189,7 +189,6 @@ X64 - /Zm200 %(AdditionalOptions) ..\..\..\..\dep\include\;..\..\..\shared\;..\..\..\framework\;..\..\..\game\;..\include\;..\base\;..\..\..\..\dep\ACE_wrappers\;%(AdditionalIncludeDirectories) WIN32;NDEBUG;_WINDOWS;_USRDLL;SCRIPT;_SECURE_SCL=0;%(PreprocessorDefinitions) MultiThreadedDLL @@ -200,6 +199,7 @@ true true true + true mangosd.lib;ACE.lib;framework.lib;%(AdditionalDependencies) diff --git a/VC120/120ScriptDev2.vcxproj b/VC120/120ScriptDev2.vcxproj index d460115e0..bf722456f 100644 --- a/VC120/120ScriptDev2.vcxproj +++ b/VC120/120ScriptDev2.vcxproj @@ -110,7 +110,7 @@ true true true - /Zm200 %(AdditionalOptions) + true mangosd.lib;ACEd.lib;framework.lib;%(AdditionalDependencies) @@ -142,7 +142,7 @@ true true true - /Zm200 %(AdditionalOptions) + true mangosd.lib;ACEd.lib;framework.lib;%(AdditionalDependencies) @@ -158,7 +158,6 @@ - /Zm200 %(AdditionalOptions) ..\..\..\..\dep\include\;..\..\..\shared\;..\..\..\framework\;..\..\..\game\;..\include\;..\base\;..\..\..\..\dep\ACE_wrappers\;%(AdditionalIncludeDirectories) WIN32;NDEBUG;_WINDOWS;_USRDLL;SCRIPT;_SECURE_SCL=0;%(PreprocessorDefinitions) false @@ -170,6 +169,7 @@ true true true + true mangosd.lib;ACE.lib;framework.lib;%(AdditionalDependencies) @@ -189,7 +189,6 @@ X64 - /Zm200 %(AdditionalOptions) ..\..\..\..\dep\include\;..\..\..\shared\;..\..\..\framework\;..\..\..\game\;..\include\;..\base\;..\..\..\..\dep\ACE_wrappers\;%(AdditionalIncludeDirectories) WIN32;NDEBUG;_WINDOWS;_USRDLL;SCRIPT;_SECURE_SCL=0;%(PreprocessorDefinitions) MultiThreadedDLL @@ -200,6 +199,7 @@ true true true + true mangosd.lib;ACE.lib;framework.lib;%(AdditionalDependencies) diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index b24511095..3d98ea8f9 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3032" + #define SD2_REVISION_NR "3033" #endif // __SD2_REVISION_NR_H__ From b24274e6e3cbfc4240ff56ecde786e3216c843ea Mon Sep 17 00:00:00 2001 From: Xfurry Date: Thu, 7 Aug 2014 00:07:33 +0200 Subject: [PATCH 1045/1172] [3034] Implement Yogg-Saron illusions dialogues Please note that this contains a lot of guesswork and it's based mostly on information from wowwiki and some video parts. However the event is pretty close to what it actually should be. --- .../ulduar/ulduar/boss_yogg_saron.cpp | 88 +++++++++++++++---- .../ulduar/ulduar/instance_ulduar.cpp | 10 +++ scripts/northrend/ulduar/ulduar/ulduar.h | 11 +++ sd2_revision_nr.h | 2 +- sql/scriptdev2_script_full.sql | 17 ++-- sql/updates/r3034_scriptdev2.sql | 7 ++ 6 files changed, 111 insertions(+), 24 deletions(-) create mode 100644 sql/updates/r3034_scriptdev2.sql diff --git a/scripts/northrend/ulduar/ulduar/boss_yogg_saron.cpp b/scripts/northrend/ulduar/ulduar/boss_yogg_saron.cpp index e00ff514a..496749718 100644 --- a/scripts/northrend/ulduar/ulduar/boss_yogg_saron.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_yogg_saron.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: boss_yogg_saron -SD%Complete: 85% -SDComment: Illusion cinematics NYI. +SD%Complete: 95% +SDComment: Illusion contain a lot of guesswork. SDCategory: Ulduar EndScriptData */ @@ -72,10 +72,11 @@ enum // stormwind illusion yells SAY_GARONA_1 = -1603227, - SAY_GARONA_2 = -1603228, + SAY_GARONA_2 = -1603267, + SAY_GARONA_3 = -1603228, SAY_YOGG_V1_1 = -1603229, SAY_YOGG_V1_2 = -1603230, - SAY_GARONA_3 = -1603231, + SAY_KING_LLANE = -1603231, SAY_GARONA_4 = -1603232, SAY_YOGG_V1_3 = -1603233, @@ -205,20 +206,12 @@ enum // NPC_BRONZE_CONSORT = 33718, // Nozdormu is not part of the event for some reason NPC_EMERALD_CONSORT = 33719, NPC_OBSIDIAN_CONSORT = 33720, - NPC_YSERA = 33495, - NPC_NELTHARION = 33523, - NPC_MALYGOS = 33535, - NPC_ALEXSTRASZA = 33536, // stormwind vision NPC_SUIT_OF_ARMOR = 33433, - NPC_GARONA = 33436, // cast spell 64063 on 33437 - NPC_KING_LLANE = 33437, SPELL_ASSASSINATE = 64063, // icecrown citadel vision - NPC_LICH_KING = 33441, // cast spell 63037 on 33442 - NPC_IMMOLATED_CHAMPION = 33442, NPC_DEATHSWORM_ZEALOT = 33567, SPELL_DEATHGRASP = 63037, @@ -266,6 +259,37 @@ static const DialogueEntry aYoggSaronDialog[] = {0, 0, 0}, }; +static const DialogueEntry aYoggIllusionsDialog[] = +{ + // stormwind + {NPC_KING_LLANE, 0, 10000}, + {SAY_GARONA_1, NPC_GARONA, 2000}, + {SAY_GARONA_2, NPC_GARONA, 8000}, + {SAY_GARONA_3, NPC_GARONA, 12000}, + {SAY_YOGG_V1_1, NPC_YOGGSARON_ILLUSION, 4000}, + {SAY_YOGG_V1_2, NPC_YOGGSARON_ILLUSION, 4000}, + {SAY_KING_LLANE, NPC_KING_LLANE, 12000}, + {SAY_GARONA_4, NPC_GARONA, 2000}, + {SPELL_ASSASSINATE, 0, 4000}, + {SAY_YOGG_V1_3, NPC_YOGGSARON_ILLUSION, 0}, + // chamber + {NPC_NELTHARION, 0, 10000}, + {SAY_NELTHARION_1, NPC_NELTHARION, 10000}, + {SAY_YSERA, NPC_YSERA, 7000}, + {SAY_NELTHARION_2, NPC_NELTHARION, 6000}, + {SAY_MALYGOS, NPC_MALYGOS, 9000}, + {SAY_YOGG_V2, NPC_YOGGSARON_ILLUSION, 0}, + // icecrown + {NPC_LICH_KING, 0, 10000}, + {SAY_LICH_KING_1, NPC_LICH_KING, 5000}, + {SAY_CHAMPION_1, NPC_IMMOLATED_CHAMPION, 8000}, + {SAY_CHAMPION_2, NPC_IMMOLATED_CHAMPION, 8000}, + {SAY_LICH_KING_2, NPC_LICH_KING, 7000}, + {SAY_YOGG_V3_1, NPC_YOGGSARON_ILLUSION, 5000}, + {SAY_YOGG_V3_2, NPC_YOGGSARON_ILLUSION, 0}, + {0, 0, 0}, +}; + static const float afYoggSaronSpawn[4] = {1980.43f, -25.7708f, 324.9724f, 3.141f}; static const uint32 aMadnessTeleportSpells[MAX_ILLUSIONS] = { SPELL_TELEPORT_TO_STORMWIND_ILLUSION, SPELL_TELEPORT_TO_CHAMBER_ILLUSION, SPELL_TELEPORT_TO_ICEECROWN_ILLUSION }; static const uint32 aMadnessChamberDoors[MAX_ILLUSIONS] = { GO_BRAIN_DOOR_STORMWIND, GO_BRAIN_DOOR_CHAMBER, GO_BRAIN_DOOR_ICECROWN }; @@ -955,11 +979,13 @@ CreatureAI* GetAI_npc_voice_yogg_saron(Creature* pCreature) ## npc_brain_yogg_saron ######*/ -struct MANGOS_DLL_DECL npc_brain_yogg_saronAI : public Scripted_NoMovementAI +struct MANGOS_DLL_DECL npc_brain_yogg_saronAI : public Scripted_NoMovementAI, private DialogueHelper { - npc_brain_yogg_saronAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) + npc_brain_yogg_saronAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature), + DialogueHelper(aYoggIllusionsDialog) { m_pInstance = (instance_ulduar*)pCreature->GetInstanceData(); + InitializeDialogueHelper(m_pInstance); Reset(); } @@ -1051,6 +1077,24 @@ struct MANGOS_DLL_DECL npc_brain_yogg_saronAI : public Scripted_NoMovementAI } } + void JustDidDialogueStep(int32 iEntry) override + { + if (!m_pInstance) + return; + + switch (iEntry) + { + case SPELL_ASSASSINATE: + if (Creature* pGarona = m_pInstance->GetSingleCreatureFromStorage(NPC_GARONA)) + pGarona->CastSpell(pGarona, SPELL_ASSASSINATE, true); + break; + case SAY_LICH_KING_1: + if (Creature* pLichKing = m_pInstance->GetSingleCreatureFromStorage(NPC_LICH_KING)) + pLichKing->CastSpell(pLichKing, SPELL_DEATHGRASP, false); + break; + } + } + // Wrapper that prepars the illusions void DoPrepareIllusion(uint8 uiIndex) { @@ -1070,8 +1114,12 @@ struct MANGOS_DLL_DECL npc_brain_yogg_saronAI : public Scripted_NoMovementAI m_creature->SummonCreature(NPC_SUIT_OF_ARMOR, 1923.342f, 98.01228f, 239.7495f, 4.834f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 90000); m_creature->SummonCreature(NPC_SUIT_OF_ARMOR, 1945.442f, 92.17952f, 239.7495f, 4.049f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 90000); // the following are guesswork - m_creature->SummonCreature(NPC_GARONA, 1935.398f, 54.0177f, 240.3764f, 2.008f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 90000); + m_creature->SummonCreature(NPC_GARONA, 1931.348f, 61.0330f, 241.7094f, 2.008f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 90000); m_creature->SummonCreature(NPC_KING_LLANE, 1930.465f, 62.6740f, 242.3763f, 5.196f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 90000); + m_creature->SummonCreature(NPC_YOGGSARON_ILLUSION, 1927.326f, 68.120f, 242.376f, 0.0f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 90000); + + // start dialogue + StartNextDialogueText(NPC_KING_LLANE); break; // chamber case 1: @@ -1092,6 +1140,10 @@ struct MANGOS_DLL_DECL npc_brain_yogg_saronAI : public Scripted_NoMovementAI m_creature->SummonCreature(NPC_ALEXSTRASZA, 2091.679f, -25.289f, 242.646f, 6.282f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 90000); m_creature->SummonCreature(NPC_YSERA, 2114.504f, -16.118f, 242.646f, 3.91f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 90000); m_creature->SummonCreature(NPC_MALYGOS, 2113.388f, -34.381f, 242.646f, 2.26f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 90000); + m_creature->SummonCreature(NPC_YOGGSARON_ILLUSION, 2104.555f, -25.635f, 242.646f, 0.0f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 90000); + + // start dialogue + StartNextDialogueText(NPC_NELTHARION); break; // icecrown case 2: @@ -1111,12 +1163,18 @@ struct MANGOS_DLL_DECL npc_brain_yogg_saronAI : public Scripted_NoMovementAI m_creature->SummonCreature(NPC_LICH_KING, 1908.557f, -152.4427f, 240.0719f, 4.238f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 90000); // the following is guesswork m_creature->SummonCreature(NPC_IMMOLATED_CHAMPION, 1915.371f,-139.9342f,239.9896f, 4.159f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 90000); + m_creature->SummonCreature(NPC_YOGGSARON_ILLUSION, 1915.371f,-139.9342f,239.9896f, 0.0f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 90000); + + // start dialogue + StartNextDialogueText(NPC_LICH_KING); break; } } void UpdateAI(const uint32 uiDiff) override { + DialogueUpdate(uiDiff); + // remove stun from tentacles after 30 sec if (m_uiIllusionTimer) { diff --git a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp index 6674f6737..dd517b1f8 100644 --- a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp +++ b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp @@ -212,6 +212,16 @@ void instance_ulduar::OnCreatureCreate(Creature* pCreature) case NPC_MIMIRON_HELPER: case NPC_HODIR_HELPER: case NPC_FREYA_HELPER: + + case NPC_YSERA: + case NPC_NELTHARION: + case NPC_MALYGOS: + case NPC_ALEXSTRASZA: + case NPC_GARONA: + case NPC_KING_LLANE: + case NPC_LICH_KING: + case NPC_IMMOLATED_CHAMPION: + case NPC_YOGGSARON_ILLUSION: break; case NPC_ULDUAR_COLOSSUS: diff --git a/scripts/northrend/ulduar/ulduar/ulduar.h b/scripts/northrend/ulduar/ulduar/ulduar.h index c5abd4c17..0651fb3d1 100644 --- a/scripts/northrend/ulduar/ulduar/ulduar.h +++ b/scripts/northrend/ulduar/ulduar/ulduar.h @@ -175,6 +175,17 @@ enum NPC_OMINOUS_CLOUD = 33292, NPC_GUARDIAN_OF_YOGG = 33136, + // Yogg Saron illusions actors + NPC_YSERA = 33495, + NPC_NELTHARION = 33523, + NPC_MALYGOS = 33535, + NPC_ALEXSTRASZA = 33536, + NPC_GARONA = 33436, // cast spell 64063 on 33437 + NPC_KING_LLANE = 33437, + NPC_LICH_KING = 33441, // cast spell 63037 on 33442 + NPC_IMMOLATED_CHAMPION = 33442, + NPC_YOGGSARON_ILLUSION = 33552, + // Celestial planetarium NPC_ALGALON = 32871, diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 3d98ea8f9..82bcfeea6 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3033" + #define SD2_REVISION_NR "3034" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 72e370325..4647f6954 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -3844,17 +3844,17 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1603220,'Yrr n\'lyeth... shuul anagg!',15766,0,0,0,'yogg SAY_YOGG_V3_1'), (-1603221,'He will learn... no king rules forever; only death is eternal!',15767,0,0,0,'yogg SAY_YOGG_V3_2'), -(-1603222,'It is done... All have been given that which must be given. I now seal the Dragon Soul forever...',15631,0,0,0,'yogg SAY_NELTHARION_1'), -(-1603223,'That terrible glow... should that be?',15784,0,0,0,'yogg SAY_YSERA'), -(-1603224,'For it to be as it must, yes.',15632,0,0,0,'yogg SAY_NELTHARION_2'), -(-1603225,'It is a weapon like no other. It must be like no other.',15610,0,0,0,'yogg SAY_MALYGOS'), +(-1603222,'It is done... All have been given that which must be given. I now seal the Dragon Soul forever...',15631,0,0,1,'yogg SAY_NELTHARION_1'), +(-1603223,'That terrible glow... should that be?',15784,0,0,1,'yogg SAY_YSERA'), +(-1603224,'For it to be as it must, yes.',15632,0,0,1,'yogg SAY_NELTHARION_2'), +(-1603225,'It is a weapon like no other. It must be like no other.',15610,0,0,1,'yogg SAY_MALYGOS'), (-1603226,'His brood learned their lesson before too long, you shall soon learn yours!',15765,0,0,0,'yogg SAY_YOGG_V2'), -(-1603227,'Bad news sire. The clans are united under Blackhand in this assault. They will stand together until Stormwind has fallen.',15538,0,0,0,'yogg SAY_GARONA_1'), -(-1603228,'Gul\'dan is bringing up his warlocks by nightfall. Until then, the Blackrock clan will be trying to take the Eastern Wall.',15539,0,0,0,'yogg SAY_GARONA_2'), +(-1603227,'Bad news sire.',15538,0,0,1,'yogg SAY_GARONA_1'), +(-1603228,'Gul\'dan is bringing up his warlocks by nightfall. Until then, the Blackrock clan will be trying to take the Eastern Wall.',15540,0,0,1,'yogg SAY_GARONA_3'), (-1603229,'A thousand deaths... ',15762,0,0,0,'yogg SAY_YOGG_V1_1'), (-1603230,'or one murder.',15763,0,0,0,'yogg SAY_YOGG_V1_2'), -(-1603231,'We will hold until the reinforcements come. As long as men with stout hearts are manning the walls and throne Stormwind will hold.',15540,0,0,0,'yogg SAY_GARONA_3'), +(-1603231,'We will hold until the reinforcements come. As long as men with stout hearts are manning the walls and throne Stormwind will hold.',15585,0,0,1,'yogg SAY_KING_LLANE'), (-1603232,'The orc leaders agree with your assessment.',15541,0,0,0,'yogg SAY_GARONA_4'), (-1603233,'Your petty quarrels only make me stronger!',15764,0,0,0,'yogg SAY_YOGG_V1_3'), @@ -3897,7 +3897,8 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1603263,'The fiend of a thousand faces.',0,1,0,457,'yogg SAY_PHASE_2_INTRO_3'), (-1603264,'Cower before my true form.',0,1,0,457,'yogg SAY_PHASE_2_INTRO_4'), (-1603265,'BOW DOWN BEFORE THE GOD OF DEATH!',0,1,0,0,'yogg SAY_PHASE_2_INTRO_5'), -(-1603266,'%s opens his mouth wide!',0,3,0,0,'yogg EMOTE_DEAFENING_ROAR'); +(-1603266,'%s opens his mouth wide!',0,3,0,0,'yogg EMOTE_DEAFENING_ROAR'), +(-1603267,'The clans are united under Blackhand in this assault. They will stand together until Stormwind has fallen.',15539,0,0,1,'yogg SAY_GARONA_2'); -- -1 604 000 GUNDRAK INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES diff --git a/sql/updates/r3034_scriptdev2.sql b/sql/updates/r3034_scriptdev2.sql new file mode 100644 index 000000000..3bd09be2d --- /dev/null +++ b/sql/updates/r3034_scriptdev2.sql @@ -0,0 +1,7 @@ +DELETE FROM script_texts WHERE entry IN (-1603227,-1603228,-1603231,-1603267); +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1603227,'Bad news sire.',15538,0,0,1,'yogg SAY_GARONA_1'), +(-1603228,'Gul\'dan is bringing up his warlocks by nightfall. Until then, the Blackrock clan will be trying to take the Eastern Wall.',15540,0,0,1,'yogg SAY_GARONA_3'), +(-1603231,'We will hold until the reinforcements come. As long as men with stout hearts are manning the walls and throne Stormwind will hold.',15585,0,0,1,'yogg SAY_KING_LLANE'), +(-1603267,'The clans are united under Blackhand in this assault. They will stand together until Stormwind has fallen.',15539,0,0,0,'yogg SAY_GARONA_2'); +UPDATE script_texts SET emote=1 WHERE entry IN (-1603222,-1603223,-1603224,-1603225); From 90a1e751d5cbad8290156e2305dbb49c520ff6e1 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Thu, 7 Aug 2014 01:02:56 +0200 Subject: [PATCH 1046/1172] [3035] Implement script support for achievements 2903 and 2904 --- .../ulduar/ulduar/instance_ulduar.cpp | 61 +++++++++++++++-- scripts/northrend/ulduar/ulduar/ulduar.h | 68 ++++++++++++++----- sd2_revision_nr.h | 2 +- 3 files changed, 105 insertions(+), 26 deletions(-) diff --git a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp index dd517b1f8..de69c7ef7 100644 --- a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp +++ b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp @@ -148,9 +148,15 @@ void instance_ulduar::OnPlayerEnter(Player* pPlayer) } } +void instance_ulduar::OnPlayerDeath(Player* /*pPlayer*/) +{ + if (IsEncounterInProgress()) + SetData(TYPE_CHAMPION_FAILED, DONE); +} + bool instance_ulduar::IsEncounterInProgress() const { - for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) + for (uint8 i = 0; i <= TYPE_ALGALON; ++i) { if (m_auiEncounter[i] == IN_PROGRESS) return true; @@ -852,6 +858,9 @@ void instance_ulduar::SetData(uint32 uiType, uint32 uiData) m_auiEncounter[uiType] = uiData; DoUpdateWorldState(WORLD_STATE_TIMER_COUNT, m_auiEncounter[uiType]); break; + case TYPE_CHAMPION_FAILED: + m_auiEncounter[uiType] = uiData; + break; // Hard modes (not saved) case TYPE_LEVIATHAN_HARD: @@ -952,9 +961,9 @@ void instance_ulduar::SetData(uint32 uiType, uint32 uiData) << m_auiEncounter[6] << " " << m_auiEncounter[7] << " " << m_auiEncounter[8] << " " << m_auiEncounter[9] << " " << m_auiEncounter[10] << " " << m_auiEncounter[11] << " " << m_auiEncounter[12] << " " << m_auiEncounter[13] << " " << m_auiEncounter[14] << " " - << m_auiUlduarKeepers[0] << " " << m_auiUlduarKeepers[1] << " " << m_auiUlduarKeepers[2] << " " - << m_auiUlduarKeepers[3] << " " << m_auiUlduarTowers[0] << " " << m_auiUlduarTowers[1] << " " - << m_auiUlduarTowers[2] << " " << m_auiUlduarTowers[3]; + << m_auiEncounter[15] << " " << m_auiUlduarKeepers[0] << " " << m_auiUlduarKeepers[1] << " " + << m_auiUlduarKeepers[2] << " " << m_auiUlduarKeepers[3] << " " << m_auiUlduarTowers[0] << " " + << m_auiUlduarTowers[1] << " " << m_auiUlduarTowers[2] << " " << m_auiUlduarTowers[3]; m_strInstData = saveStream.str(); @@ -1046,6 +1055,8 @@ uint32 instance_ulduar::GetData(uint32 uiType) const return m_auiEncounter[13]; case TYPE_ALGALON_TIMER: return m_auiEncounter[14]; + case TYPE_CHAMPION_FAILED: + return m_auiEncounter[15]; // Hard modes case TYPE_LEVIATHAN_HARD: @@ -1239,9 +1250,9 @@ void instance_ulduar::Load(const char* strIn) loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3] >> m_auiEncounter[4] >> m_auiEncounter[5] >> m_auiEncounter[6] >> m_auiEncounter[7] >> m_auiEncounter[8] >> m_auiEncounter[9] >> m_auiEncounter[10] >> m_auiEncounter[11] - >> m_auiEncounter[12] >> m_auiEncounter[13] >> m_auiEncounter[14] >> m_auiUlduarKeepers[0] - >> m_auiUlduarKeepers[1] >> m_auiUlduarKeepers[2] >> m_auiUlduarKeepers[3] >> m_auiUlduarTowers[0] - >> m_auiUlduarTowers[1] >> m_auiUlduarTowers[2] >> m_auiUlduarTowers[3]; + >> m_auiEncounter[12] >> m_auiEncounter[13] >> m_auiEncounter[14] >> m_auiEncounter[15] + >> m_auiUlduarKeepers[0] >> m_auiUlduarKeepers[1] >> m_auiUlduarKeepers[2] >> m_auiUlduarKeepers[3] + >> m_auiUlduarTowers[0] >> m_auiUlduarTowers[1] >> m_auiUlduarTowers[2] >> m_auiUlduarTowers[3]; for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) { @@ -1375,6 +1386,42 @@ bool instance_ulduar::CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player c case ACHIEV_CRIT_DRIVE_CRAZY_N: case ACHIEV_CRIT_DRIVE_CRAZY_H: return m_abAchievCriteria[TYPE_ACHIEV_DRIVE_CRAZY]; + // Champion / Conquerer of Ulduar + case ACHIEV_CRIT_CHAMP_LEVI: + case ACHIEV_CRIT_CHAMP_RAZOR: + case ACHIEV_CRIT_CHAMP_XT: + case ACHIEV_CRIT_CHAMP_IGNIS: + case ACHIEV_CRIT_CHAMP_MIMIRON: + case ACHIEV_CRIT_CHAMP_KOLO: + case ACHIEV_CRIT_CHAMP_VEZAX: + case ACHIEV_CRIT_CHAMP_YOGG: + case ACHIEV_CRIT_CHAMP_AURIAYA: + case ACHIEV_CRIT_CHAMP_THORIM: + case ACHIEV_CRIT_CHAMP_HODIR: + case ACHIEV_CRIT_CHAMP_FREYA: + case ACHIEV_CRIT_CHAMP_COUNCIL: + case ACHIEV_CRIT_CONQ_LEVI: + case ACHIEV_CRIT_CONQ_RAZOR: + case ACHIEV_CRIT_CONQ_XT: + case ACHIEV_CRIT_CONQ_IGNIS: + case ACHIEV_CRIT_CONQ_KOLO: + case ACHIEV_CRIT_CONQ_MIMIRON: + case ACHIEV_CRIT_CONQ_VEZAX: + case ACHIEV_CRIT_CONQ_AURIAYA: + case ACHIEV_CRIT_CONQ_YOGG: + case ACHIEV_CRIT_CONQ_THORIM: + case ACHIEV_CRIT_CONQ_FREYA: + case ACHIEV_CRIT_CONQ_COUNCIL: + case ACHIEV_CRIT_CONQ_HODIR: + { + // First, check if all bosses are killed (except the last encounter) + uint8 uiEncounterDone = 0; + for (uint8 i = 0; i < TYPE_YOGGSARON; ++i) + if (m_auiEncounter[i] == DONE) + ++uiEncounterDone; + + return uiEncounterDone >= 13 && GetData(TYPE_CHAMPION_FAILED) != DONE; + } default: return false; diff --git a/scripts/northrend/ulduar/ulduar/ulduar.h b/scripts/northrend/ulduar/ulduar/ulduar.h index 0651fb3d1..9d718337d 100644 --- a/scripts/northrend/ulduar/ulduar/ulduar.h +++ b/scripts/northrend/ulduar/ulduar/ulduar.h @@ -7,7 +7,7 @@ enum { - MAX_ENCOUNTER = 15, + MAX_ENCOUNTER = 16, HARD_MODE_ENCOUNTER = 8, KEEPER_ENCOUNTER = 4, @@ -27,34 +27,35 @@ enum TYPE_YOGGSARON = 12, TYPE_ALGALON = 13, TYPE_ALGALON_TIMER = 14, + TYPE_CHAMPION_FAILED = 15, // Achievements Champion / Conquerer of Ulduar, needs to be saved to database // Hard mode boss types // Used for hard mode bosses only - TYPE_LEVIATHAN_HARD = 15, - TYPE_XT002_HARD = 16, - TYPE_MIMIRON_HARD = 17, - TYPE_HODIR_HARD = 18, - TYPE_THORIM_HARD = 19, - TYPE_FREYA_HARD = 20, - TYPE_VEZAX_HARD = 21, - TYPE_YOGGSARON_HARD = 22, + TYPE_LEVIATHAN_HARD = 16, + TYPE_XT002_HARD = 17, + TYPE_MIMIRON_HARD = 18, + TYPE_HODIR_HARD = 19, + TYPE_THORIM_HARD = 20, + TYPE_FREYA_HARD = 21, + TYPE_VEZAX_HARD = 22, + TYPE_YOGGSARON_HARD = 23, // Keeper types // Used to store the keepers which will be used at yogg - TYPE_KEEPER_HODIR = 23, - TYPE_KEEPER_FREYA = 24, - TYPE_KEEPER_THORIM = 25, - TYPE_KEEPER_MIMIRON = 26, + TYPE_KEEPER_HODIR = 24, + TYPE_KEEPER_FREYA = 25, + TYPE_KEEPER_THORIM = 26, + TYPE_KEEPER_MIMIRON = 27, // Tower types // Used to store the towers which will be used at Leviathan encounter - TYPE_TOWER_HODIR = 27, - TYPE_TOWER_FREYA = 28, - TYPE_TOWER_THORIM = 29, - TYPE_TOWER_MIMIRON = 30, + TYPE_TOWER_HODIR = 28, + TYPE_TOWER_FREYA = 29, + TYPE_TOWER_THORIM = 30, + TYPE_TOWER_MIMIRON = 31, // Other types - not saved - TYPE_LEVIATHAN_GAUNTLET = 31, + TYPE_LEVIATHAN_GAUNTLET = 32, // The siege of ulduar NPC_LEVIATHAN = 33113, @@ -431,6 +432,35 @@ enum ACHIEV_CRIT_ALONE_DARK_H = 10417, ACHIEV_CRIT_DRIVE_CRAZY_N = 10185, // Yogg-Saron, achievs 3008, 3010 ACHIEV_CRIT_DRIVE_CRAZY_H = 10296, + + // Champion / Conquerer of Ulduar, achievs 2903, 2904 + ACHIEV_CRIT_CHAMP_LEVI = 10042, + ACHIEV_CRIT_CHAMP_RAZOR = 10340, + ACHIEV_CRIT_CHAMP_XT = 10341, + ACHIEV_CRIT_CHAMP_IGNIS = 10342, + ACHIEV_CRIT_CHAMP_MIMIRON = 10347, + ACHIEV_CRIT_CHAMP_KOLO = 10348, + ACHIEV_CRIT_CHAMP_VEZAX = 10349, + ACHIEV_CRIT_CHAMP_YOGG = 10350, + ACHIEV_CRIT_CHAMP_AURIAYA = 10351, + ACHIEV_CRIT_CHAMP_THORIM = 10403, + ACHIEV_CRIT_CHAMP_HODIR = 10439, + ACHIEV_CRIT_CHAMP_FREYA = 10582, + ACHIEV_CRIT_CHAMP_COUNCIL = 10598, + + ACHIEV_CRIT_CONQ_LEVI = 10352, + ACHIEV_CRIT_CONQ_RAZOR = 10353, + ACHIEV_CRIT_CONQ_XT = 10354, + ACHIEV_CRIT_CONQ_IGNIS = 10355, + ACHIEV_CRIT_CONQ_KOLO = 10357, + ACHIEV_CRIT_CONQ_MIMIRON = 10361, + ACHIEV_CRIT_CONQ_VEZAX = 10362, + ACHIEV_CRIT_CONQ_AURIAYA = 10363, + ACHIEV_CRIT_CONQ_YOGG = 10364, + ACHIEV_CRIT_CONQ_THORIM = 10404, + ACHIEV_CRIT_CONQ_FREYA = 10583, + ACHIEV_CRIT_CONQ_COUNCIL = 10599, + ACHIEV_CRIT_CONQ_HODIR = 10719, }; struct UlduarSpawns @@ -509,6 +539,8 @@ class MANGOS_DLL_DECL instance_ulduar : public ScriptedInstance, private Dialogu bool IsEncounterInProgress() const override; void OnPlayerEnter(Player* pPlayer) override; + void OnPlayerDeath(Player* pPlayer) override; + void OnCreatureCreate(Creature* pCreature) override; void OnCreatureEnterCombat(Creature* pCreature) override; void OnCreatureDeath(Creature* pCreature) override; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 82bcfeea6..b189c75f6 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3034" + #define SD2_REVISION_NR "3035" #endif // __SD2_REVISION_NR_H__ From aa12602d8e81e8ab46faa2c0109d8e3e2796af53 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Tue, 12 Aug 2014 23:39:28 +0200 Subject: [PATCH 1047/1172] [3036] Partially revert [3033] Thanks to @grz3s --- VC110/110ScriptDev2.vcxproj | 4 ++++ VC120/120ScriptDev2.vcxproj | 4 ++++ sd2_revision_nr.h | 2 +- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/VC110/110ScriptDev2.vcxproj b/VC110/110ScriptDev2.vcxproj index 713c9e418..2a9ba406d 100644 --- a/VC110/110ScriptDev2.vcxproj +++ b/VC110/110ScriptDev2.vcxproj @@ -110,6 +110,7 @@ true true true + /Zm200 %(AdditionalOptions) true @@ -142,6 +143,7 @@ true true true + /Zm200 %(AdditionalOptions) true @@ -158,6 +160,7 @@ + /Zm200 %(AdditionalOptions) ..\..\..\..\dep\include\;..\..\..\shared\;..\..\..\framework\;..\..\..\game\;..\include\;..\base\;..\..\..\..\dep\ACE_wrappers\;%(AdditionalIncludeDirectories) WIN32;NDEBUG;_WINDOWS;_USRDLL;SCRIPT;_SECURE_SCL=0;%(PreprocessorDefinitions) false @@ -189,6 +192,7 @@ X64 + /Zm200 %(AdditionalOptions) ..\..\..\..\dep\include\;..\..\..\shared\;..\..\..\framework\;..\..\..\game\;..\include\;..\base\;..\..\..\..\dep\ACE_wrappers\;%(AdditionalIncludeDirectories) WIN32;NDEBUG;_WINDOWS;_USRDLL;SCRIPT;_SECURE_SCL=0;%(PreprocessorDefinitions) MultiThreadedDLL diff --git a/VC120/120ScriptDev2.vcxproj b/VC120/120ScriptDev2.vcxproj index bf722456f..deabc9220 100644 --- a/VC120/120ScriptDev2.vcxproj +++ b/VC120/120ScriptDev2.vcxproj @@ -110,6 +110,7 @@ true true true + /Zm200 %(AdditionalOptions) true @@ -142,6 +143,7 @@ true true true + /Zm200 %(AdditionalOptions) true @@ -158,6 +160,7 @@ + /Zm200 %(AdditionalOptions) ..\..\..\..\dep\include\;..\..\..\shared\;..\..\..\framework\;..\..\..\game\;..\include\;..\base\;..\..\..\..\dep\ACE_wrappers\;%(AdditionalIncludeDirectories) WIN32;NDEBUG;_WINDOWS;_USRDLL;SCRIPT;_SECURE_SCL=0;%(PreprocessorDefinitions) false @@ -189,6 +192,7 @@ X64 + /Zm200 %(AdditionalOptions) ..\..\..\..\dep\include\;..\..\..\shared\;..\..\..\framework\;..\..\..\game\;..\include\;..\base\;..\..\..\..\dep\ACE_wrappers\;%(AdditionalIncludeDirectories) WIN32;NDEBUG;_WINDOWS;_USRDLL;SCRIPT;_SECURE_SCL=0;%(PreprocessorDefinitions) MultiThreadedDLL diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index b189c75f6..e2456f82d 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3035" + #define SD2_REVISION_NR "3036" #endif // __SD2_REVISION_NR_H__ From cb38e7a01dda0176d8c2251526df33e0c3d81516 Mon Sep 17 00:00:00 2001 From: boxa Date: Wed, 10 Sep 2014 20:53:06 +0200 Subject: [PATCH 1048/1172] [3037] Fix yell list from unsigned to signed Signed-off-by: Xfurry --- scripts/northrend/ulduar/ulduar/boss_flame_leviathan.cpp | 4 ++-- sd2_revision_nr.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/northrend/ulduar/ulduar/boss_flame_leviathan.cpp b/scripts/northrend/ulduar/ulduar/boss_flame_leviathan.cpp index 797e2966f..53fc9b2a9 100644 --- a/scripts/northrend/ulduar/ulduar/boss_flame_leviathan.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_flame_leviathan.cpp @@ -141,8 +141,8 @@ enum TOWER_ID_THORIM = 3, }; -static const uint32 aLeviathanTowerYell[KEEPER_ENCOUNTER] = { SAY_TOWER_FROST, SAY_TOWER_NATURE, SAY_TOWER_FIRE, SAY_TOWER_ENERGY }; -static const uint32 aLeviathanTowerEmote[KEEPER_ENCOUNTER] = { EMOTE_HODIR_FURY, EMOTE_FREYA_WARD, EMOTE_MIMIRON_INFERNO, EMOTE_THORIM_HAMMER }; +static const int32 aLeviathanTowerYell[KEEPER_ENCOUNTER] = { SAY_TOWER_FROST, SAY_TOWER_NATURE, SAY_TOWER_FIRE, SAY_TOWER_ENERGY }; +static const int32 aLeviathanTowerEmote[KEEPER_ENCOUNTER] = { EMOTE_HODIR_FURY, EMOTE_FREYA_WARD, EMOTE_MIMIRON_INFERNO, EMOTE_THORIM_HAMMER }; static const float afFreyaWard[MAX_FREYA_WARD][4] = { diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index e2456f82d..cfacdbecf 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3036" + #define SD2_REVISION_NR "3037" #endif // __SD2_REVISION_NR_H__ From 75016afb424bf11d8e27acaf0fb5fa40e1dd706e Mon Sep 17 00:00:00 2001 From: evil-at-wow Date: Sat, 13 Sep 2014 19:25:48 +0300 Subject: [PATCH 1049/1172] [3038] Remove all traces of MANGOS_DLL_DECL, which is a useless define these days. See cmangos/issues#402 for details. Signed-off-by: xfurry --- base/escort_ai.h | 2 +- base/follower_ai.h | 2 +- base/guard_ai.h | 6 ++-- base/pet_ai.h | 2 +- include/sc_creature.h | 4 +-- include/sc_instance.h | 4 +-- scripts/battlegrounds/battleground.cpp | 2 +- scripts/eastern_kingdoms/arathi_highlands.cpp | 4 +-- .../blackrock_depths/blackrock_depths.cpp | 6 ++-- .../blackrock_depths/blackrock_depths.h | 2 +- .../boss_ambassador_flamelash.cpp | 2 +- .../blackrock_depths/boss_coren_direbrew.cpp | 2 +- .../boss_emperor_dagran_thaurissan.cpp | 4 +-- .../boss_general_angerforge.cpp | 2 +- .../boss_high_interrogator_gerstahn.cpp | 2 +- .../blackrock_spire/blackrock_spire.h | 2 +- .../blackrock_spire/boss_gyth.cpp | 2 +- .../boss_overlord_wyrmthalak.cpp | 2 +- .../boss_pyroguard_emberseer.cpp | 2 +- .../blackwing_lair/blackwing_lair.h | 2 +- .../boss_broodlord_lashlayer.cpp | 2 +- .../blackwing_lair/boss_chromaggus.cpp | 2 +- .../blackwing_lair/boss_ebonroc.cpp | 2 +- .../blackwing_lair/boss_firemaw.cpp | 2 +- .../blackwing_lair/boss_flamegor.cpp | 2 +- .../blackwing_lair/boss_nefarian.cpp | 2 +- .../blackwing_lair/boss_razorgore.cpp | 2 +- .../blackwing_lair/boss_vaelastrasz.cpp | 2 +- .../blackwing_lair/boss_victor_nefarius.cpp | 2 +- scripts/eastern_kingdoms/burning_steppes.cpp | 4 +-- .../deadmines/boss_mr_smite.cpp | 2 +- .../eastern_kingdoms/deadmines/deadmines.h | 2 +- .../eastern_kingdoms/eastern_plaguelands.cpp | 2 +- scripts/eastern_kingdoms/eversong_woods.cpp | 8 +++--- scripts/eastern_kingdoms/ghostlands.cpp | 2 +- .../gnomeregan/boss_thermaplugg.cpp | 2 +- .../gnomeregan/gnomeregan.cpp | 4 +-- .../eastern_kingdoms/gnomeregan/gnomeregan.h | 2 +- scripts/eastern_kingdoms/hinterlands.cpp | 4 +-- .../eastern_kingdoms/isle_of_queldanas.cpp | 2 +- .../karazhan/boss_curator.cpp | 2 +- .../karazhan/boss_maiden_of_virtue.cpp | 2 +- .../karazhan/boss_midnight.cpp | 4 +-- .../eastern_kingdoms/karazhan/boss_moroes.cpp | 2 +- .../karazhan/boss_netherspite.cpp | 4 +-- .../karazhan/boss_nightbane.cpp | 2 +- .../karazhan/boss_prince_malchezaar.cpp | 4 +-- .../karazhan/boss_shade_of_aran.cpp | 4 +-- .../karazhan/boss_terestian_illhoof.cpp | 6 ++-- .../karazhan/bosses_opera.cpp | 16 +++++------ .../eastern_kingdoms/karazhan/chess_event.cpp | 28 +++++++++---------- .../eastern_kingdoms/karazhan/karazhan.cpp | 6 ++-- scripts/eastern_kingdoms/karazhan/karazhan.h | 2 +- scripts/eastern_kingdoms/loch_modan.cpp | 2 +- .../boss_felblood_kaelthas.cpp | 8 +++--- .../boss_priestess_delrissa.cpp | 20 ++++++------- .../boss_selin_fireheart.cpp | 4 +-- .../magisters_terrace/boss_vexallus.cpp | 4 +-- .../magisters_terrace/magisters_terrace.cpp | 2 +- .../magisters_terrace/magisters_terrace.h | 2 +- .../molten_core/boss_baron_geddon.cpp | 2 +- .../molten_core/boss_garr.cpp | 4 +-- .../molten_core/boss_gehennas.cpp | 2 +- .../molten_core/boss_golemagg.cpp | 4 +-- .../molten_core/boss_lucifron.cpp | 2 +- .../molten_core/boss_magmadar.cpp | 2 +- .../molten_core/boss_majordomo_executus.cpp | 2 +- .../molten_core/boss_ragnaros.cpp | 2 +- .../molten_core/boss_shazzrah.cpp | 2 +- .../molten_core/boss_sulfuron_harbinger.cpp | 4 +-- .../molten_core/molten_core.h | 2 +- .../eastern_kingdoms/redridge_mountains.cpp | 2 +- .../scarlet_enclave/ebon_hold.cpp | 22 +++++++-------- .../scarlet_enclave/world_map_ebon_hold.h | 2 +- .../scarlet_monastery/boss_arcanist_doan.cpp | 2 +- .../boss_headless_horseman.cpp | 4 +-- .../scarlet_monastery/boss_herod.cpp | 4 +-- .../boss_mograine_and_whitemane.cpp | 4 +-- .../scarlet_monastery/scarlet_monastery.h | 2 +- .../scholomance/boss_darkmaster_gandling.cpp | 2 +- .../scholomance/boss_jandice_barov.cpp | 2 +- .../scholomance/scholomance.h | 2 +- scripts/eastern_kingdoms/searing_gorge.cpp | 2 +- .../shadowfang_keep/boss_hummel.cpp | 2 +- .../shadowfang_keep/shadowfang_keep.cpp | 10 +++---- .../shadowfang_keep/shadowfang_keep.h | 2 +- .../eastern_kingdoms/silverpine_forest.cpp | 4 +-- scripts/eastern_kingdoms/stormwind_city.cpp | 8 +++--- .../eastern_kingdoms/stranglethorn_vale.cpp | 2 +- .../stratholme/boss_baroness_anastari.cpp | 2 +- .../stratholme/boss_cannon_master_willey.cpp | 2 +- .../stratholme/boss_dathrohan_balnazzar.cpp | 2 +- .../stratholme/boss_maleki_the_pallid.cpp | 2 +- .../stratholme/boss_order_of_silver_hand.cpp | 2 +- .../stratholme/stratholme.cpp | 4 +-- .../eastern_kingdoms/stratholme/stratholme.h | 2 +- .../sunken_temple/sunken_temple.cpp | 2 +- .../sunken_temple/sunken_temple.h | 2 +- .../sunwell_plateau/boss_brutallus.cpp | 2 +- .../sunwell_plateau/boss_eredar_twins.cpp | 6 ++-- .../sunwell_plateau/boss_felmyst.cpp | 4 +-- .../sunwell_plateau/boss_kalecgos.cpp | 6 ++-- .../sunwell_plateau/boss_kiljaeden.cpp | 8 +++--- .../sunwell_plateau/boss_muru.cpp | 8 +++--- .../sunwell_plateau/sunwell_plateau.h | 2 +- scripts/eastern_kingdoms/swamp_of_sorrows.cpp | 2 +- scripts/eastern_kingdoms/tirisfal_glades.cpp | 2 +- .../uldaman/boss_archaedas.cpp | 2 +- scripts/eastern_kingdoms/uldaman/uldaman.h | 2 +- scripts/eastern_kingdoms/undercity.cpp | 2 +- .../eastern_kingdoms/western_plaguelands.cpp | 10 +++---- scripts/eastern_kingdoms/westfall.cpp | 4 +-- scripts/eastern_kingdoms/wetlands.cpp | 2 +- .../eastern_kingdoms/zulaman/boss_akilzon.cpp | 4 +-- .../eastern_kingdoms/zulaman/boss_halazzi.cpp | 4 +-- .../eastern_kingdoms/zulaman/boss_janalai.cpp | 8 +++--- .../zulaman/boss_malacrass.cpp | 2 +- .../zulaman/boss_nalorakk.cpp | 2 +- .../eastern_kingdoms/zulaman/boss_zuljin.cpp | 4 +-- scripts/eastern_kingdoms/zulaman/zulaman.cpp | 4 +-- scripts/eastern_kingdoms/zulaman/zulaman.h | 2 +- .../eastern_kingdoms/zulgurub/boss_arlokk.cpp | 2 +- .../eastern_kingdoms/zulgurub/boss_hakkar.cpp | 2 +- .../zulgurub/boss_hazzarah.cpp | 2 +- .../eastern_kingdoms/zulgurub/boss_jeklik.cpp | 4 +-- .../eastern_kingdoms/zulgurub/boss_jindo.cpp | 4 +-- .../zulgurub/boss_mandokir.cpp | 4 +-- .../eastern_kingdoms/zulgurub/boss_marli.cpp | 2 +- .../zulgurub/boss_renataki.cpp | 2 +- .../eastern_kingdoms/zulgurub/boss_thekal.cpp | 8 +++--- .../zulgurub/boss_venoxis.cpp | 2 +- scripts/eastern_kingdoms/zulgurub/zulgurub.h | 2 +- scripts/examples/example_creature.cpp | 2 +- scripts/examples/example_escort.cpp | 2 +- scripts/kalimdor/ashenvale.cpp | 8 +++--- scripts/kalimdor/azshara.cpp | 6 ++-- scripts/kalimdor/azuremyst_isle.cpp | 8 +++--- .../blackfathom_deeps/blackfathom_deeps.h | 2 +- scripts/kalimdor/bloodmyst_isle.cpp | 2 +- scripts/kalimdor/boss_azuregos.cpp | 2 +- .../culling_of_stratholme.h | 2 +- .../dark_portal/boss_aeonus.cpp | 2 +- .../dark_portal/boss_chrono_lord_deja.cpp | 2 +- .../dark_portal/boss_temporus.cpp | 2 +- .../dark_portal/dark_portal.cpp | 4 +-- .../caverns_of_time/dark_portal/dark_portal.h | 2 +- .../caverns_of_time/hyjal/boss_archimonde.cpp | 4 +-- .../kalimdor/caverns_of_time/hyjal/hyjal.h | 2 +- .../kalimdor/caverns_of_time/hyjal/hyjalAI.h | 2 +- .../old_hillsbrad/old_hillsbrad.cpp | 4 +-- .../old_hillsbrad/old_hillsbrad.h | 2 +- scripts/kalimdor/darkshore.cpp | 12 ++++---- scripts/kalimdor/desolace.cpp | 6 ++-- scripts/kalimdor/dire_maul/dire_maul.h | 2 +- scripts/kalimdor/durotar.cpp | 2 +- scripts/kalimdor/dustwallow_marsh.cpp | 14 +++++----- scripts/kalimdor/felwood.cpp | 10 +++---- scripts/kalimdor/feralas.cpp | 4 +-- scripts/kalimdor/maraudon/boss_noxxion.cpp | 2 +- scripts/kalimdor/moonglade.cpp | 6 ++-- scripts/kalimdor/mulgore.cpp | 2 +- scripts/kalimdor/onyxias_lair/boss_onyxia.cpp | 2 +- scripts/kalimdor/onyxias_lair/onyxias_lair.h | 2 +- scripts/kalimdor/orgrimmar.cpp | 2 +- .../razorfen_downs/razorfen_downs.cpp | 2 +- .../razorfen_kraul/razorfen_kraul.cpp | 4 +-- .../kalimdor/razorfen_kraul/razorfen_kraul.h | 2 +- .../ruins_of_ahnqiraj/boss_ayamiss.cpp | 4 +-- .../kalimdor/ruins_of_ahnqiraj/boss_buru.cpp | 4 +-- .../ruins_of_ahnqiraj/boss_kurinnaxx.cpp | 2 +- .../kalimdor/ruins_of_ahnqiraj/boss_moam.cpp | 2 +- .../ruins_of_ahnqiraj/boss_ossirian.cpp | 2 +- .../ruins_of_ahnqiraj/boss_rajaxx.cpp | 4 +-- .../ruins_of_ahnqiraj/ruins_of_ahnqiraj.cpp | 2 +- .../ruins_of_ahnqiraj/ruins_of_ahnqiraj.h | 2 +- scripts/kalimdor/silithus.cpp | 2 +- scripts/kalimdor/stonetalon_mountains.cpp | 2 +- scripts/kalimdor/tanaris.cpp | 8 +++--- scripts/kalimdor/teldrassil.cpp | 2 +- .../temple_of_ahnqiraj/boss_bug_trio.cpp | 6 ++-- .../temple_of_ahnqiraj/boss_cthun.cpp | 6 ++-- .../temple_of_ahnqiraj/boss_fankriss.cpp | 2 +- .../temple_of_ahnqiraj/boss_huhuran.cpp | 2 +- .../kalimdor/temple_of_ahnqiraj/boss_ouro.cpp | 4 +-- .../temple_of_ahnqiraj/boss_sartura.cpp | 4 +-- .../temple_of_ahnqiraj/boss_skeram.cpp | 2 +- .../temple_of_ahnqiraj/boss_twinemperors.cpp | 6 ++-- .../temple_of_ahnqiraj/boss_viscidus.cpp | 2 +- .../mob_anubisath_sentinel.cpp | 2 +- .../temple_of_ahnqiraj/temple_of_ahnqiraj.h | 2 +- scripts/kalimdor/the_barrens.cpp | 8 +++--- scripts/kalimdor/thousand_needles.cpp | 8 +++--- scripts/kalimdor/ungoro_crater.cpp | 4 +-- .../wailing_caverns/wailing_caverns.cpp | 2 +- .../wailing_caverns/wailing_caverns.h | 2 +- scripts/kalimdor/winterspring.cpp | 2 +- scripts/kalimdor/zulfarrak/boss_zumrah.cpp | 2 +- scripts/kalimdor/zulfarrak/zulfarrak.h | 2 +- .../northrend/azjol-nerub/ahnkahet/ahnkahet.h | 2 +- .../azjol-nerub/ahnkahet/boss_amanitar.cpp | 4 +-- .../azjol-nerub/ahnkahet/boss_jedoga.cpp | 4 +-- .../azjol-nerub/ahnkahet/boss_nadox.cpp | 4 +-- .../azjol-nerub/ahnkahet/boss_taldaram.cpp | 2 +- .../azjol-nerub/ahnkahet/boss_volazj.cpp | 2 +- .../azjol-nerub/azjol-nerub/azjol-nerub.h | 2 +- .../azjol-nerub/azjol-nerub/boss_anubarak.cpp | 4 +-- .../azjol-nerub/azjol-nerub/boss_hadronox.cpp | 2 +- .../azjol-nerub/azjol-nerub/boss_krikthir.cpp | 2 +- scripts/northrend/borean_tundra.cpp | 14 +++++----- .../boss_anubarak_trial.cpp | 8 +++--- .../trial_of_the_crusader/boss_jaraxxus.cpp | 2 +- .../boss_northrend_beasts.cpp | 10 +++---- .../boss_twin_valkyr.cpp | 4 +-- .../trial_of_the_crusader.cpp | 2 +- .../trial_of_the_crusader.h | 2 +- scripts/northrend/dalaran.cpp | 2 +- scripts/northrend/dragonblight.cpp | 2 +- .../northrend/draktharon_keep/boss_novos.cpp | 4 +-- .../draktharon_keep/boss_tharonja.cpp | 2 +- .../draktharon_keep/boss_trollgore.cpp | 2 +- .../draktharon_keep/draktharon_keep.h | 2 +- scripts/northrend/grizzly_hills.cpp | 4 +-- scripts/northrend/gundrak/boss_colossus.cpp | 6 ++-- scripts/northrend/gundrak/boss_eck.cpp | 2 +- scripts/northrend/gundrak/boss_galdarah.cpp | 2 +- scripts/northrend/gundrak/boss_moorabi.cpp | 2 +- scripts/northrend/gundrak/boss_sladran.cpp | 2 +- scripts/northrend/gundrak/gundrak.h | 2 +- scripts/northrend/howling_fjord.cpp | 14 +++++----- scripts/northrend/icecrown.cpp | 6 ++-- .../forge_of_souls/boss_bronjahm.cpp | 4 +-- .../forge_of_souls/boss_devourer_of_souls.cpp | 2 +- .../forge_of_souls/forge_of_souls.h | 2 +- .../boss_forgemaster_garfrost.cpp | 2 +- .../pit_of_saron/boss_krick_and_ick.cpp | 6 ++-- .../boss_scourgelord_tyrannus.cpp | 4 +-- .../pit_of_saron/pit_of_saron.cpp | 4 +-- .../frozen_halls/pit_of_saron/pit_of_saron.h | 2 +- .../icecrown_citadel/blood_prince_council.cpp | 18 ++++++------ .../boss_blood_queen_lanathel.cpp | 2 +- .../boss_deathbringer_saurfang.cpp | 2 +- .../icecrown_citadel/boss_festergut.cpp | 2 +- .../boss_lady_deathwhisper.cpp | 2 +- .../icecrown_citadel/boss_lord_marrowgar.cpp | 2 +- .../boss_professor_putricide.cpp | 2 +- .../icecrown_citadel/boss_rotface.cpp | 6 ++-- .../icecrown_citadel/boss_sindragosa.cpp | 8 +++--- .../icecrown_citadel/boss_the_lich_king.cpp | 2 +- .../boss_valithria_dreamwalker.cpp | 2 +- .../icecrown_citadel/icecrown_citadel.h | 2 +- .../northrend/naxxramas/boss_anubrekhan.cpp | 2 +- scripts/northrend/naxxramas/boss_faerlina.cpp | 2 +- .../naxxramas/boss_four_horsemen.cpp | 8 +++--- scripts/northrend/naxxramas/boss_gluth.cpp | 2 +- scripts/northrend/naxxramas/boss_gothik.cpp | 2 +- .../northrend/naxxramas/boss_grobbulus.cpp | 2 +- scripts/northrend/naxxramas/boss_heigan.cpp | 2 +- .../northrend/naxxramas/boss_kelthuzad.cpp | 2 +- scripts/northrend/naxxramas/boss_loatheb.cpp | 2 +- scripts/northrend/naxxramas/boss_maexxna.cpp | 4 +-- scripts/northrend/naxxramas/boss_noth.cpp | 2 +- .../northrend/naxxramas/boss_patchwerk.cpp | 2 +- .../northrend/naxxramas/boss_razuvious.cpp | 2 +- .../northrend/naxxramas/boss_sapphiron.cpp | 2 +- scripts/northrend/naxxramas/boss_thaddius.cpp | 10 +++---- scripts/northrend/naxxramas/naxxramas.h | 2 +- .../nexus/eye_of_eternity/boss_malygos.cpp | 6 ++-- .../nexus/eye_of_eternity/eye_of_eternity.h | 2 +- .../northrend/nexus/nexus/boss_anomalus.cpp | 4 +-- .../nexus/nexus/boss_keristrasza.cpp | 2 +- .../northrend/nexus/nexus/boss_ormorok.cpp | 2 +- .../northrend/nexus/nexus/boss_telestra.cpp | 2 +- scripts/northrend/nexus/nexus/nexus.h | 2 +- .../northrend/nexus/oculus/boss_eregos.cpp | 4 +-- scripts/northrend/nexus/oculus/boss_urom.cpp | 2 +- scripts/northrend/nexus/oculus/boss_varos.cpp | 8 +++--- scripts/northrend/nexus/oculus/oculus.cpp | 2 +- scripts/northrend/nexus/oculus/oculus.h | 2 +- .../obsidian_sanctum/boss_sartharion.cpp | 18 ++++++------ .../obsidian_sanctum/obsidian_sanctum.h | 2 +- .../northrend/ruby_sanctum/boss_baltharus.cpp | 4 +-- .../northrend/ruby_sanctum/boss_halion.cpp | 4 +-- .../northrend/ruby_sanctum/boss_saviana.cpp | 2 +- .../ruby_sanctum/boss_zarithrian.cpp | 2 +- scripts/northrend/ruby_sanctum/ruby_sanctum.h | 2 +- scripts/northrend/sholazar_basin.cpp | 6 ++-- scripts/northrend/storm_peaks.cpp | 4 +-- .../halls_of_lightning/boss_bjarngrim.cpp | 4 +-- .../ulduar/halls_of_lightning/boss_ionar.cpp | 4 +-- .../ulduar/halls_of_lightning/boss_loken.cpp | 2 +- .../halls_of_lightning/boss_volkhan.cpp | 4 +-- .../halls_of_lightning/halls_of_lightning.h | 2 +- .../halls_of_stone/boss_maiden_of_grief.cpp | 2 +- .../ulduar/halls_of_stone/boss_sjonnir.cpp | 2 +- .../ulduar/halls_of_stone/halls_of_stone.cpp | 6 ++-- .../ulduar/halls_of_stone/halls_of_stone.h | 2 +- .../ulduar/ulduar/assembly_of_iron.cpp | 6 ++-- .../northrend/ulduar/ulduar/boss_algalon.cpp | 10 +++---- .../northrend/ulduar/ulduar/boss_auriaya.cpp | 4 +-- .../ulduar/ulduar/boss_flame_leviathan.cpp | 10 +++---- .../northrend/ulduar/ulduar/boss_freya.cpp | 18 ++++++------ .../ulduar/ulduar/boss_general_vezax.cpp | 2 +- .../northrend/ulduar/ulduar/boss_hodir.cpp | 6 ++-- .../northrend/ulduar/ulduar/boss_ignis.cpp | 6 ++-- .../northrend/ulduar/ulduar/boss_kologarn.cpp | 6 ++-- .../northrend/ulduar/ulduar/boss_mimiron.cpp | 22 +++++++-------- .../ulduar/ulduar/boss_razorscale.cpp | 8 +++--- .../northrend/ulduar/ulduar/boss_thorim.cpp | 8 +++--- .../northrend/ulduar/ulduar/boss_xt_002.cpp | 8 +++--- .../ulduar/ulduar/boss_yogg_saron.cpp | 26 ++++++++--------- scripts/northrend/ulduar/ulduar/ulduar.cpp | 4 +-- scripts/northrend/ulduar/ulduar/ulduar.h | 2 +- .../utgarde_keep/utgarde_keep/boss_ingvar.cpp | 4 +-- .../utgarde_keep/boss_keleseth.cpp | 4 +-- .../boss_skarvald_and_dalronn.cpp | 6 ++-- .../utgarde_keep/utgarde_keep.cpp | 2 +- .../utgarde_keep/utgarde_keep/utgarde_keep.h | 2 +- .../utgarde_pinnacle/boss_gortok.cpp | 2 +- .../utgarde_pinnacle/boss_skadi.cpp | 4 +-- .../utgarde_pinnacle/boss_svala.cpp | 2 +- .../utgarde_pinnacle/boss_ymiron.cpp | 2 +- .../utgarde_pinnacle/utgarde_pinnacle.h | 2 +- scripts/northrend/violet_hold/boss_erekem.cpp | 4 +-- .../northrend/violet_hold/boss_ichoron.cpp | 2 +- scripts/northrend/violet_hold/violet_hold.cpp | 6 ++-- scripts/northrend/violet_hold/violet_hold.h | 2 +- scripts/northrend/zuldrak.cpp | 6 ++-- .../auchenai_crypts/boss_exarch_maladaar.cpp | 4 +-- .../auchenai_crypts/boss_shirrak.cpp | 2 +- .../mana_tombs/boss_nexusprince_shaffar.cpp | 2 +- .../mana_tombs/boss_pandemonius.cpp | 2 +- .../auchindoun/sethekk_halls/boss_anzu.cpp | 2 +- .../sethekk_halls/boss_darkweaver_syth.cpp | 2 +- .../sethekk_halls/boss_talon_king_ikiss.cpp | 2 +- .../auchindoun/sethekk_halls/sethekk_halls.h | 2 +- .../boss_ambassador_hellmaw.cpp | 2 +- .../boss_blackheart_the_inciter.cpp | 2 +- .../boss_grandmaster_vorpil.cpp | 4 +-- .../shadow_labyrinth/boss_murmur.cpp | 2 +- .../shadow_labyrinth/shadow_labyrinth.h | 2 +- scripts/outland/black_temple/black_temple.h | 2 +- .../outland/black_temple/boss_bloodboil.cpp | 2 +- scripts/outland/black_temple/boss_illidan.cpp | 14 +++++----- .../black_temple/boss_mother_shahraz.cpp | 2 +- .../black_temple/boss_reliquary_of_souls.cpp | 12 ++++---- .../black_temple/boss_shade_of_akama.cpp | 8 +++--- .../outland/black_temple/boss_supremus.cpp | 6 ++-- .../black_temple/boss_teron_gorefiend.cpp | 2 +- .../black_temple/boss_warlord_najentus.cpp | 2 +- .../outland/black_temple/illidari_council.cpp | 14 +++++----- scripts/outland/blades_edge_mountains.cpp | 8 +++--- scripts/outland/boss_doomlord_kazzak.cpp | 2 +- scripts/outland/boss_doomwalker.cpp | 2 +- .../boss_fathomlord_karathress.cpp | 8 +++--- .../boss_hydross_the_unstable.cpp | 2 +- .../serpent_shrine/boss_lady_vashj.cpp | 4 +-- .../boss_leotheras_the_blind.cpp | 2 +- .../boss_morogrim_tidewalker.cpp | 4 +-- .../serpent_shrine/boss_the_lurker_below.cpp | 2 +- .../serpent_shrine/serpent_shrine.h | 2 +- .../slave_pens/boss_ahune.cpp | 6 ++-- .../steam_vault/boss_hydromancer_thespia.cpp | 2 +- .../boss_mekgineer_steamrigger.cpp | 4 +-- .../steam_vault/boss_warlord_kalithresh.cpp | 4 +-- .../steam_vault/steam_vault.h | 2 +- .../underbog/boss_hungarfen.cpp | 4 +-- scripts/outland/gruuls_lair/boss_gruul.cpp | 2 +- .../gruuls_lair/boss_high_king_maulgar.cpp | 12 ++++---- scripts/outland/gruuls_lair/gruuls_lair.h | 2 +- .../blood_furnace/blood_furnace.h | 2 +- .../blood_furnace/boss_broggok.cpp | 4 +-- .../boss_kelidan_the_breaker.cpp | 4 +-- .../blood_furnace/boss_the_maker.cpp | 2 +- .../boss_nazan_and_vazruden.cpp | 4 +-- .../boss_omor_the_unscarred.cpp | 2 +- .../boss_watchkeeper_gargolmar.cpp | 2 +- .../hellfire_ramparts/hellfire_ramparts.h | 2 +- .../magtheridons_lair/boss_magtheridon.cpp | 8 +++--- .../magtheridons_lair/magtheridons_lair.h | 2 +- .../shattered_halls/boss_nethekurse.cpp | 6 ++-- .../boss_warbringer_omrogg.cpp | 4 +-- .../boss_warchief_kargath_bladefist.cpp | 2 +- .../shattered_halls/shattered_halls.h | 2 +- scripts/outland/hellfire_peninsula.cpp | 12 ++++---- scripts/outland/nagrand.cpp | 8 +++--- scripts/outland/netherstorm.cpp | 16 +++++------ scripts/outland/shadowmoon_valley.cpp | 20 ++++++------- scripts/outland/shattrath_city.cpp | 6 ++-- .../tempest_keep/arcatraz/arcatraz.cpp | 4 +-- .../outland/tempest_keep/arcatraz/arcatraz.h | 2 +- .../tempest_keep/arcatraz/boss_dalliah.cpp | 2 +- .../arcatraz/boss_harbinger_skyriss.cpp | 2 +- .../arcatraz/boss_soccothrates.cpp | 2 +- .../botanica/boss_high_botanist_freywinn.cpp | 2 +- .../tempest_keep/botanica/boss_laj.cpp | 2 +- .../botanica/boss_warp_splinter.cpp | 4 +-- .../tempest_keep/the_eye/boss_alar.cpp | 2 +- .../tempest_keep/the_eye/boss_astromancer.cpp | 4 +-- .../tempest_keep/the_eye/boss_kaelthas.cpp | 16 +++++------ .../tempest_keep/the_eye/boss_void_reaver.cpp | 2 +- .../outland/tempest_keep/the_eye/the_eye.h | 2 +- .../boss_nethermancer_sepethrea.cpp | 2 +- .../boss_pathaleon_the_calculator.cpp | 4 +-- .../tempest_keep/the_mechanar/mechanar.h | 2 +- scripts/outland/terokkar_forest.cpp | 22 +++++++-------- scripts/outland/zangarmarsh.cpp | 6 ++-- scripts/world/bosses_emerald_dragons.cpp | 12 ++++---- scripts/world/guards.cpp | 4 +-- scripts/world/mob_generic_creature.cpp | 2 +- scripts/world/npcs_special.cpp | 18 ++++++------ scripts/world/world_map_scripts.cpp | 8 +++--- sd2_revision_nr.h | 2 +- 412 files changed, 840 insertions(+), 840 deletions(-) diff --git a/base/escort_ai.h b/base/escort_ai.h index 5442a0e55..8f346c7d1 100644 --- a/base/escort_ai.h +++ b/base/escort_ai.h @@ -33,7 +33,7 @@ enum EscortState STATE_ESCORT_PAUSED = 0x004 // will not proceed with waypoints before state is removed }; -struct MANGOS_DLL_DECL npc_escortAI : public ScriptedAI +struct npc_escortAI : public ScriptedAI { public: explicit npc_escortAI(Creature* pCreature); diff --git a/base/follower_ai.h b/base/follower_ai.h index e4c6b45f0..8133bf5a2 100644 --- a/base/follower_ai.h +++ b/base/follower_ai.h @@ -16,7 +16,7 @@ enum FollowState STATE_FOLLOW_POSTEVENT = 0x020 // can be set at complete and allow post event to run }; -class MANGOS_DLL_DECL FollowerAI : public ScriptedAI +class FollowerAI : public ScriptedAI { public: explicit FollowerAI(Creature* pCreature); diff --git a/base/guard_ai.h b/base/guard_ai.h index 4636bf634..7e3924c55 100644 --- a/base/guard_ai.h +++ b/base/guard_ai.h @@ -24,7 +24,7 @@ enum eShattrathGuard SPELL_EXILE = 39533 }; -struct MANGOS_DLL_DECL guardAI : public ScriptedAI +struct guardAI : public ScriptedAI { public: explicit guardAI(Creature* pCreature); @@ -45,14 +45,14 @@ struct MANGOS_DLL_DECL guardAI : public ScriptedAI void DoReplyToTextEmote(uint32 uiTextEmote); }; -struct MANGOS_DLL_DECL guardAI_orgrimmar : public guardAI +struct guardAI_orgrimmar : public guardAI { guardAI_orgrimmar(Creature* pCreature) : guardAI(pCreature) {} void ReceiveEmote(Player* pPlayer, uint32 uiTextEmote) override; }; -struct MANGOS_DLL_DECL guardAI_stormwind : public guardAI +struct guardAI_stormwind : public guardAI { guardAI_stormwind(Creature* pCreature) : guardAI(pCreature) {} diff --git a/base/pet_ai.h b/base/pet_ai.h index 17ae707bb..96802a671 100644 --- a/base/pet_ai.h +++ b/base/pet_ai.h @@ -6,7 +6,7 @@ #define SC_PET_H // Using CreatureAI for now. Might change later and use PetAI (need to export for dll first) -class MANGOS_DLL_DECL ScriptedPetAI : public CreatureAI +class ScriptedPetAI : public CreatureAI { public: explicit ScriptedPetAI(Creature* pCreature); diff --git a/include/sc_creature.h b/include/sc_creature.h index e5f412dce..b76b0ba98 100644 --- a/include/sc_creature.h +++ b/include/sc_creature.h @@ -41,7 +41,7 @@ enum SCEquip /// Documentation of CreatureAI functions can be found in MaNGOS source // Only list them here again to ensure that the interface between SD2 and the core is not changed unnoticed -struct MANGOS_DLL_DECL ScriptedAI : public CreatureAI +struct ScriptedAI : public CreatureAI { public: explicit ScriptedAI(Creature* pCreature); @@ -221,7 +221,7 @@ struct MANGOS_DLL_DECL ScriptedAI : public CreatureAI uint32 m_uiEvadeCheckCooldown; }; -struct MANGOS_DLL_DECL Scripted_NoMovementAI : public ScriptedAI +struct Scripted_NoMovementAI : public ScriptedAI { Scripted_NoMovementAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/include/sc_instance.h b/include/sc_instance.h index a43338285..2da2174c1 100644 --- a/include/sc_instance.h +++ b/include/sc_instance.h @@ -23,7 +23,7 @@ enum EncounterState #define OUT_LOAD_INST_DATA_COMPLETE debug_log("SD2: Instance Data Load for Instance %s (Map %d, Instance Id: %d) is complete.", instance->GetMapName(), instance->GetId(), instance->GetInstanceId()) #define OUT_LOAD_INST_DATA_FAIL script_error_log("Unable to load Instance Data for Instance %s (Map %d, Instance Id: %d).", instance->GetMapName(), instance->GetId(), instance->GetInstanceId()) -class MANGOS_DLL_DECL ScriptedInstance : public InstanceData +class ScriptedInstance : public InstanceData { public: ScriptedInstance(Map* pMap) : InstanceData(pMap) {} @@ -69,7 +69,7 @@ class MANGOS_DLL_DECL ScriptedInstance : public InstanceData }; // Class for world maps (May need additional zone-wide functions later on) -class MANGOS_DLL_DECL ScriptedMap : public ScriptedInstance +class ScriptedMap : public ScriptedInstance { public: ScriptedMap(Map* pMap) : ScriptedInstance(pMap) {} diff --git a/scripts/battlegrounds/battleground.cpp b/scripts/battlegrounds/battleground.cpp index fe80298af..146debd2b 100644 --- a/scripts/battlegrounds/battleground.cpp +++ b/scripts/battlegrounds/battleground.cpp @@ -45,7 +45,7 @@ enum SPELL_WAITING_TO_RESURRECT = 2584 // players who cancel this aura don't want a resurrection }; -struct MANGOS_DLL_DECL npc_spirit_guideAI : public ScriptedAI +struct npc_spirit_guideAI : public ScriptedAI { npc_spirit_guideAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/eastern_kingdoms/arathi_highlands.cpp b/scripts/eastern_kingdoms/arathi_highlands.cpp index 4dec08660..d1c9ef06a 100644 --- a/scripts/eastern_kingdoms/arathi_highlands.cpp +++ b/scripts/eastern_kingdoms/arathi_highlands.cpp @@ -50,7 +50,7 @@ enum ENTRY_VENGEFUL_SURGE = 2776 }; -struct MANGOS_DLL_DECL npc_professor_phizzlethorpeAI : public npc_escortAI +struct npc_professor_phizzlethorpeAI : public npc_escortAI { npc_professor_phizzlethorpeAI(Creature* pCreature) : npc_escortAI(pCreature) { Reset(); } @@ -141,7 +141,7 @@ enum QUEST_HINTS_NEW_PLAGUE = 660 }; -struct MANGOS_DLL_DECL npc_kineloryAI : public npc_escortAI +struct npc_kineloryAI : public npc_escortAI { npc_kineloryAI(Creature* pCreature) : npc_escortAI(pCreature) { Reset(); } diff --git a/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.cpp b/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.cpp index fb91838d1..291ca471a 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.cpp +++ b/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.cpp @@ -158,7 +158,7 @@ bool AreaTrigger_at_ring_of_law(Player* pPlayer, AreaTriggerEntry const* pAt) ## npc_grimstone ######*/ -struct MANGOS_DLL_DECL npc_grimstoneAI : public npc_escortAI +struct npc_grimstoneAI : public npc_escortAI { npc_grimstoneAI(Creature* pCreature) : npc_escortAI(pCreature) { @@ -550,7 +550,7 @@ enum QUEST_ALE = 4295 }; -struct MANGOS_DLL_DECL npc_rocknotAI : public npc_escortAI +struct npc_rocknotAI : public npc_escortAI { npc_rocknotAI(Creature* pCreature) : npc_escortAI(pCreature) { @@ -724,7 +724,7 @@ enum QUEST_JAIL_BREAK = 4322 }; -struct MANGOS_DLL_DECL npc_marshal_windsorAI : public npc_escortAI +struct npc_marshal_windsorAI : public npc_escortAI { npc_marshal_windsorAI(Creature* m_creature) : npc_escortAI(m_creature) { diff --git a/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.h b/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.h index b16bdb2b4..978879959 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.h +++ b/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.h @@ -118,7 +118,7 @@ static const float aVaultPositions[4] = {821.905f, -338.382f, -50.134f, 3.78736f // Tomb of the Seven dwarfs static const uint32 aTombDwarfes[MAX_DWARFS] = {NPC_ANGERREL, NPC_SEETHREL, NPC_DOPEREL, NPC_GLOOMREL, NPC_VILEREL, NPC_HATEREL, NPC_DOOMREL}; -class MANGOS_DLL_DECL instance_blackrock_depths : public ScriptedInstance +class instance_blackrock_depths : public ScriptedInstance { public: instance_blackrock_depths(Map* pMap); diff --git a/scripts/eastern_kingdoms/blackrock_depths/boss_ambassador_flamelash.cpp b/scripts/eastern_kingdoms/blackrock_depths/boss_ambassador_flamelash.cpp index 07fe6fa5a..b1c7f071f 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/boss_ambassador_flamelash.cpp +++ b/scripts/eastern_kingdoms/blackrock_depths/boss_ambassador_flamelash.cpp @@ -32,7 +32,7 @@ enum NPC_BURNING_SPIRIT = 9178, }; -struct MANGOS_DLL_DECL boss_ambassador_flamelashAI : public ScriptedAI +struct boss_ambassador_flamelashAI : public ScriptedAI { boss_ambassador_flamelashAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} diff --git a/scripts/eastern_kingdoms/blackrock_depths/boss_coren_direbrew.cpp b/scripts/eastern_kingdoms/blackrock_depths/boss_coren_direbrew.cpp index 68d5c5221..6031fe6fe 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/boss_coren_direbrew.cpp +++ b/scripts/eastern_kingdoms/blackrock_depths/boss_coren_direbrew.cpp @@ -57,7 +57,7 @@ enum MAX_DIREBREW_MINIONS = 3, }; -struct MANGOS_DLL_DECL boss_coren_direbrewAI : public ScriptedAI +struct boss_coren_direbrewAI : public ScriptedAI { boss_coren_direbrewAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } diff --git a/scripts/eastern_kingdoms/blackrock_depths/boss_emperor_dagran_thaurissan.cpp b/scripts/eastern_kingdoms/blackrock_depths/boss_emperor_dagran_thaurissan.cpp index f39580263..0b87eaf55 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/boss_emperor_dagran_thaurissan.cpp +++ b/scripts/eastern_kingdoms/blackrock_depths/boss_emperor_dagran_thaurissan.cpp @@ -34,7 +34,7 @@ enum eEmperor SPELL_AVATAROFFLAME = 15636 }; -struct MANGOS_DLL_DECL boss_emperor_dagran_thaurissanAI : public ScriptedAI +struct boss_emperor_dagran_thaurissanAI : public ScriptedAI { boss_emperor_dagran_thaurissanAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -140,7 +140,7 @@ enum ePrincess SPELL_OPEN_PORTAL = 13912 }; -struct MANGOS_DLL_DECL boss_moira_bronzebeardAI : public ScriptedAI +struct boss_moira_bronzebeardAI : public ScriptedAI { boss_moira_bronzebeardAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/eastern_kingdoms/blackrock_depths/boss_general_angerforge.cpp b/scripts/eastern_kingdoms/blackrock_depths/boss_general_angerforge.cpp index bbb3c32fa..e81f63ecb 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/boss_general_angerforge.cpp +++ b/scripts/eastern_kingdoms/blackrock_depths/boss_general_angerforge.cpp @@ -33,7 +33,7 @@ enum NPC_ANVILRAGE_MEDIC = 8894, }; -struct MANGOS_DLL_DECL boss_general_angerforgeAI : public ScriptedAI +struct boss_general_angerforgeAI : public ScriptedAI { boss_general_angerforgeAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } diff --git a/scripts/eastern_kingdoms/blackrock_depths/boss_high_interrogator_gerstahn.cpp b/scripts/eastern_kingdoms/blackrock_depths/boss_high_interrogator_gerstahn.cpp index aa1e97edb..8a261259e 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/boss_high_interrogator_gerstahn.cpp +++ b/scripts/eastern_kingdoms/blackrock_depths/boss_high_interrogator_gerstahn.cpp @@ -31,7 +31,7 @@ enum SPELL_SHADOWSHIELD = 12040 }; -struct MANGOS_DLL_DECL boss_high_interrogator_gerstahnAI : public ScriptedAI +struct boss_high_interrogator_gerstahnAI : public ScriptedAI { boss_high_interrogator_gerstahnAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} diff --git a/scripts/eastern_kingdoms/blackrock_spire/blackrock_spire.h b/scripts/eastern_kingdoms/blackrock_spire/blackrock_spire.h index 2a1d0bca9..1e7e95e09 100644 --- a/scripts/eastern_kingdoms/blackrock_spire/blackrock_spire.h +++ b/scripts/eastern_kingdoms/blackrock_spire/blackrock_spire.h @@ -94,7 +94,7 @@ static const uint32 aStadiumEventNpcs[MAX_STADIUM_WAVES][5] = {NPC_CHROMATIC_WHELP, NPC_CHROMATIC_WHELP, NPC_CHROMATIC_DRAGON, NPC_CHROMATIC_DRAGON, NPC_BLACKHAND_HANDLER}, }; -class MANGOS_DLL_DECL instance_blackrock_spire : public ScriptedInstance, private DialogueHelper +class instance_blackrock_spire : public ScriptedInstance, private DialogueHelper { public: instance_blackrock_spire(Map* pMap); diff --git a/scripts/eastern_kingdoms/blackrock_spire/boss_gyth.cpp b/scripts/eastern_kingdoms/blackrock_spire/boss_gyth.cpp index 9f2d3f61b..8d3415594 100644 --- a/scripts/eastern_kingdoms/blackrock_spire/boss_gyth.cpp +++ b/scripts/eastern_kingdoms/blackrock_spire/boss_gyth.cpp @@ -38,7 +38,7 @@ enum SPELL_KNOCK_AWAY = 10101, }; -struct MANGOS_DLL_DECL boss_gythAI : public ScriptedAI +struct boss_gythAI : public ScriptedAI { boss_gythAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/eastern_kingdoms/blackrock_spire/boss_overlord_wyrmthalak.cpp b/scripts/eastern_kingdoms/blackrock_spire/boss_overlord_wyrmthalak.cpp index 287c6b02d..92b0ace4c 100644 --- a/scripts/eastern_kingdoms/blackrock_spire/boss_overlord_wyrmthalak.cpp +++ b/scripts/eastern_kingdoms/blackrock_spire/boss_overlord_wyrmthalak.cpp @@ -40,7 +40,7 @@ const float afLocations[2][4] = { -49.875881f, -511.896942f, 88.195160f, 4.613114f} }; -struct MANGOS_DLL_DECL boss_overlordwyrmthalakAI : public ScriptedAI +struct boss_overlordwyrmthalakAI : public ScriptedAI { boss_overlordwyrmthalakAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} diff --git a/scripts/eastern_kingdoms/blackrock_spire/boss_pyroguard_emberseer.cpp b/scripts/eastern_kingdoms/blackrock_spire/boss_pyroguard_emberseer.cpp index fdba84c82..94853e071 100644 --- a/scripts/eastern_kingdoms/blackrock_spire/boss_pyroguard_emberseer.cpp +++ b/scripts/eastern_kingdoms/blackrock_spire/boss_pyroguard_emberseer.cpp @@ -50,7 +50,7 @@ enum SPELL_PYROBLAST = 20228 // guesswork, but best fitting in spells-area, was 17274 (has mana cost) }; -struct MANGOS_DLL_DECL boss_pyroguard_emberseerAI : public ScriptedAI +struct boss_pyroguard_emberseerAI : public ScriptedAI { boss_pyroguard_emberseerAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/eastern_kingdoms/blackwing_lair/blackwing_lair.h b/scripts/eastern_kingdoms/blackwing_lair/blackwing_lair.h index 6dc40b94c..695add9ff 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/blackwing_lair.h +++ b/scripts/eastern_kingdoms/blackwing_lair/blackwing_lair.h @@ -63,7 +63,7 @@ static const float aNefariusSpawnLoc[4] = { -7466.16f, -1040.80f, 412.053f, 2.14 static const uint32 aRazorgoreSpawns[MAX_EGGS_DEFENDERS] = {NPC_BLACKWING_LEGIONNAIRE, NPC_BLACKWING_MAGE, NPC_DRAGONSPAWN, NPC_DRAGONSPAWN}; -class MANGOS_DLL_DECL instance_blackwing_lair : public ScriptedInstance +class instance_blackwing_lair : public ScriptedInstance { public: instance_blackwing_lair(Map* pMap); diff --git a/scripts/eastern_kingdoms/blackwing_lair/boss_broodlord_lashlayer.cpp b/scripts/eastern_kingdoms/blackwing_lair/boss_broodlord_lashlayer.cpp index 4e47a7bb7..fa3ad707c 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/boss_broodlord_lashlayer.cpp +++ b/scripts/eastern_kingdoms/blackwing_lair/boss_broodlord_lashlayer.cpp @@ -35,7 +35,7 @@ enum SPELL_KNOCK_AWAY = 25778 }; -struct MANGOS_DLL_DECL boss_broodlordAI : public ScriptedAI +struct boss_broodlordAI : public ScriptedAI { boss_broodlordAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/eastern_kingdoms/blackwing_lair/boss_chromaggus.cpp b/scripts/eastern_kingdoms/blackwing_lair/boss_chromaggus.cpp index 8ee1760ef..4968a0242 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/boss_chromaggus.cpp +++ b/scripts/eastern_kingdoms/blackwing_lair/boss_chromaggus.cpp @@ -61,7 +61,7 @@ enum static const uint32 aPossibleBreaths[MAX_BREATHS] = {SPELL_INCINERATE, SPELL_TIME_LAPSE, SPELL_CORROSIVE_ACID, SPELL_IGNITE_FLESH, SPELL_FROST_BURN}; -struct MANGOS_DLL_DECL boss_chromaggusAI : public ScriptedAI +struct boss_chromaggusAI : public ScriptedAI { boss_chromaggusAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/eastern_kingdoms/blackwing_lair/boss_ebonroc.cpp b/scripts/eastern_kingdoms/blackwing_lair/boss_ebonroc.cpp index 5b2412392..7b0e0bd2c 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/boss_ebonroc.cpp +++ b/scripts/eastern_kingdoms/blackwing_lair/boss_ebonroc.cpp @@ -32,7 +32,7 @@ enum SPELL_THRASH = 3391, // TODO missing }; -struct MANGOS_DLL_DECL boss_ebonrocAI : public ScriptedAI +struct boss_ebonrocAI : public ScriptedAI { boss_ebonrocAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/eastern_kingdoms/blackwing_lair/boss_firemaw.cpp b/scripts/eastern_kingdoms/blackwing_lair/boss_firemaw.cpp index 7e33ec23f..50b4b390d 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/boss_firemaw.cpp +++ b/scripts/eastern_kingdoms/blackwing_lair/boss_firemaw.cpp @@ -32,7 +32,7 @@ enum SPELL_THRASH = 3391, // TODO, missing }; -struct MANGOS_DLL_DECL boss_firemawAI : public ScriptedAI +struct boss_firemawAI : public ScriptedAI { boss_firemawAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/eastern_kingdoms/blackwing_lair/boss_flamegor.cpp b/scripts/eastern_kingdoms/blackwing_lair/boss_flamegor.cpp index a5df58ce9..32b807a28 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/boss_flamegor.cpp +++ b/scripts/eastern_kingdoms/blackwing_lair/boss_flamegor.cpp @@ -34,7 +34,7 @@ enum SPELL_THRASH = 3391, // TODO missing }; -struct MANGOS_DLL_DECL boss_flamegorAI : public ScriptedAI +struct boss_flamegorAI : public ScriptedAI { boss_flamegorAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/eastern_kingdoms/blackwing_lair/boss_nefarian.cpp b/scripts/eastern_kingdoms/blackwing_lair/boss_nefarian.cpp index 227eb9bb1..ba1443739 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/boss_nefarian.cpp +++ b/scripts/eastern_kingdoms/blackwing_lair/boss_nefarian.cpp @@ -63,7 +63,7 @@ enum SPELL_ROGUE = 23414, // Paralise }; -struct MANGOS_DLL_DECL boss_nefarianAI : public ScriptedAI +struct boss_nefarianAI : public ScriptedAI { boss_nefarianAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/eastern_kingdoms/blackwing_lair/boss_razorgore.cpp b/scripts/eastern_kingdoms/blackwing_lair/boss_razorgore.cpp index afe7c7a31..0ba23a736 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/boss_razorgore.cpp +++ b/scripts/eastern_kingdoms/blackwing_lair/boss_razorgore.cpp @@ -41,7 +41,7 @@ enum SPELL_CONFLAGRATION = 23023, }; -struct MANGOS_DLL_DECL boss_razorgoreAI : public ScriptedAI +struct boss_razorgoreAI : public ScriptedAI { boss_razorgoreAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/eastern_kingdoms/blackwing_lair/boss_vaelastrasz.cpp b/scripts/eastern_kingdoms/blackwing_lair/boss_vaelastrasz.cpp index 07c5e54d8..177983df4 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/boss_vaelastrasz.cpp +++ b/scripts/eastern_kingdoms/blackwing_lair/boss_vaelastrasz.cpp @@ -56,7 +56,7 @@ enum AREATRIGGER_VAEL_INTRO = 3626, }; -struct MANGOS_DLL_DECL boss_vaelastraszAI : public ScriptedAI +struct boss_vaelastraszAI : public ScriptedAI { boss_vaelastraszAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/eastern_kingdoms/blackwing_lair/boss_victor_nefarius.cpp b/scripts/eastern_kingdoms/blackwing_lair/boss_victor_nefarius.cpp index 50b878505..c7dd37a7d 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/boss_victor_nefarius.cpp +++ b/scripts/eastern_kingdoms/blackwing_lair/boss_victor_nefarius.cpp @@ -96,7 +96,7 @@ static const uint32 aPossibleDrake[MAX_DRAKES] = {NPC_BRONZE_DRAKANOID, NPC_BLUE // Dev note: Lord Victor Nefarius should despawn completely, then ~5 seconds later Nefarian should appear. -struct MANGOS_DLL_DECL boss_victor_nefariusAI : public ScriptedAI, private DialogueHelper +struct boss_victor_nefariusAI : public ScriptedAI, private DialogueHelper { boss_victor_nefariusAI(Creature* pCreature) : ScriptedAI(pCreature), DialogueHelper(aIntroDialogue) diff --git a/scripts/eastern_kingdoms/burning_steppes.cpp b/scripts/eastern_kingdoms/burning_steppes.cpp index 879809efc..a04afa4e8 100644 --- a/scripts/eastern_kingdoms/burning_steppes.cpp +++ b/scripts/eastern_kingdoms/burning_steppes.cpp @@ -33,7 +33,7 @@ EndContentData */ ## npc_ragged_john ######*/ -struct MANGOS_DLL_DECL npc_ragged_johnAI : public ScriptedAI +struct npc_ragged_johnAI : public ScriptedAI { npc_ragged_johnAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } @@ -193,7 +193,7 @@ static const DialogueEntry aOutroDialogue[] = {0, 0, 0}, }; -struct MANGOS_DLL_DECL npc_grark_lorkrubAI : public npc_escortAI, private DialogueHelper +struct npc_grark_lorkrubAI : public npc_escortAI, private DialogueHelper { npc_grark_lorkrubAI(Creature* pCreature) : npc_escortAI(pCreature), DialogueHelper(aOutroDialogue) diff --git a/scripts/eastern_kingdoms/deadmines/boss_mr_smite.cpp b/scripts/eastern_kingdoms/deadmines/boss_mr_smite.cpp index 4f14c6df1..1d93a0af9 100644 --- a/scripts/eastern_kingdoms/deadmines/boss_mr_smite.cpp +++ b/scripts/eastern_kingdoms/deadmines/boss_mr_smite.cpp @@ -48,7 +48,7 @@ enum PHASE_EQUIP_END = 7, }; -struct MANGOS_DLL_DECL boss_mr_smiteAI : public ScriptedAI +struct boss_mr_smiteAI : public ScriptedAI { boss_mr_smiteAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } diff --git a/scripts/eastern_kingdoms/deadmines/deadmines.h b/scripts/eastern_kingdoms/deadmines/deadmines.h index 1c892f294..1e1e139b1 100644 --- a/scripts/eastern_kingdoms/deadmines/deadmines.h +++ b/scripts/eastern_kingdoms/deadmines/deadmines.h @@ -37,7 +37,7 @@ enum QUEST_FORTUNE_AWAITS = 7938, }; -class MANGOS_DLL_DECL instance_deadmines : public ScriptedInstance +class instance_deadmines : public ScriptedInstance { public: instance_deadmines(Map* pMap); diff --git a/scripts/eastern_kingdoms/eastern_plaguelands.cpp b/scripts/eastern_kingdoms/eastern_plaguelands.cpp index bc23cde22..162762ab6 100644 --- a/scripts/eastern_kingdoms/eastern_plaguelands.cpp +++ b/scripts/eastern_kingdoms/eastern_plaguelands.cpp @@ -75,7 +75,7 @@ static const float aPeasantMoveLoc[3] = {3335.0f, -2994.04f, 161.14f}; static const int32 aPeasantSpawnYells[3] = {SAY_PEASANT_APPEAR_1, SAY_PEASANT_APPEAR_2, SAY_PEASANT_APPEAR_3}; -struct MANGOS_DLL_DECL npc_eris_havenfireAI : public ScriptedAI +struct npc_eris_havenfireAI : public ScriptedAI { npc_eris_havenfireAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } diff --git a/scripts/eastern_kingdoms/eversong_woods.cpp b/scripts/eastern_kingdoms/eversong_woods.cpp index 16d4bdf99..75506eda4 100644 --- a/scripts/eastern_kingdoms/eversong_woods.cpp +++ b/scripts/eastern_kingdoms/eversong_woods.cpp @@ -68,7 +68,7 @@ float fChallengerLoc[4][4] = {10104.807f, -6611.145f, 4.101f, 4.265f} }; -struct MANGOS_DLL_DECL npc_kelerun_bloodmournAI : public ScriptedAI +struct npc_kelerun_bloodmournAI : public ScriptedAI { npc_kelerun_bloodmournAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -269,7 +269,7 @@ enum QUEST_THE_DWARVEN_SPY = 8483 }; -struct MANGOS_DLL_DECL npc_prospector_anvilwardAI : public npc_escortAI +struct npc_prospector_anvilwardAI : public npc_escortAI { // CreatureAI functions npc_prospector_anvilwardAI(Creature* pCreature) : npc_escortAI(pCreature) {Reset();} @@ -347,7 +347,7 @@ enum NPC_ANGERSHADE = 15656 }; -struct MANGOS_DLL_DECL npc_apprentice_mirvedaAI : public ScriptedAI +struct npc_apprentice_mirvedaAI : public ScriptedAI { npc_apprentice_mirvedaAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } @@ -454,7 +454,7 @@ static const float aSummonPos[6][4] = {8301.548f, -7247.548f, 139.974f, 1.828518f} }; -struct MANGOS_DLL_DECL npc_infused_crystalAI : public Scripted_NoMovementAI +struct npc_infused_crystalAI : public Scripted_NoMovementAI { npc_infused_crystalAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { diff --git a/scripts/eastern_kingdoms/ghostlands.cpp b/scripts/eastern_kingdoms/ghostlands.cpp index 9a123a4ec..d6cc15ee9 100644 --- a/scripts/eastern_kingdoms/ghostlands.cpp +++ b/scripts/eastern_kingdoms/ghostlands.cpp @@ -48,7 +48,7 @@ enum FACTION_SMOON_E = 1603, }; -struct MANGOS_DLL_DECL npc_ranger_lilathaAI : public npc_escortAI +struct npc_ranger_lilathaAI : public npc_escortAI { npc_ranger_lilathaAI(Creature* pCreature) : npc_escortAI(pCreature) { Reset(); } diff --git a/scripts/eastern_kingdoms/gnomeregan/boss_thermaplugg.cpp b/scripts/eastern_kingdoms/gnomeregan/boss_thermaplugg.cpp index 1aa35c4ab..537a6d7e9 100644 --- a/scripts/eastern_kingdoms/gnomeregan/boss_thermaplugg.cpp +++ b/scripts/eastern_kingdoms/gnomeregan/boss_thermaplugg.cpp @@ -42,7 +42,7 @@ enum static const float fBombSpawnZ = -316.2625f; -struct MANGOS_DLL_DECL boss_thermapluggAI : public ScriptedAI +struct boss_thermapluggAI : public ScriptedAI { boss_thermapluggAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/eastern_kingdoms/gnomeregan/gnomeregan.cpp b/scripts/eastern_kingdoms/gnomeregan/gnomeregan.cpp index dd2aa5d3c..221c4da32 100644 --- a/scripts/eastern_kingdoms/gnomeregan/gnomeregan.cpp +++ b/scripts/eastern_kingdoms/gnomeregan/gnomeregan.cpp @@ -128,7 +128,7 @@ static const sSummonInformation asSummonInfo[MAX_SUMMON_POSITIONS] = {7, NPC_CHOMPER, -473.1326f, -103.0901f, -146.1155f, 2.042035f} }; -struct MANGOS_DLL_DECL npc_blastmaster_emi_shortfuseAI : public npc_escortAI +struct npc_blastmaster_emi_shortfuseAI : public npc_escortAI { npc_blastmaster_emi_shortfuseAI(Creature* pCreature) : npc_escortAI(pCreature) { @@ -644,7 +644,7 @@ static const float aKernobeePositions[2][3] = { -297.32f, -7.32f, -152.85f} // Walk out of the door }; -struct MANGOS_DLL_DECL npc_kernobeeAI : public FollowerAI +struct npc_kernobeeAI : public FollowerAI { npc_kernobeeAI(Creature* pCreature) : FollowerAI(pCreature) { diff --git a/scripts/eastern_kingdoms/gnomeregan/gnomeregan.h b/scripts/eastern_kingdoms/gnomeregan/gnomeregan.h index 70d14178f..63b2bddd9 100644 --- a/scripts/eastern_kingdoms/gnomeregan/gnomeregan.h +++ b/scripts/eastern_kingdoms/gnomeregan/gnomeregan.h @@ -51,7 +51,7 @@ struct sBombFace uint32 m_uiBombTimer; }; -class MANGOS_DLL_DECL instance_gnomeregan : public ScriptedInstance +class instance_gnomeregan : public ScriptedInstance { public: instance_gnomeregan(Map* pMap); diff --git a/scripts/eastern_kingdoms/hinterlands.cpp b/scripts/eastern_kingdoms/hinterlands.cpp index 417ebfc4d..920a44d29 100644 --- a/scripts/eastern_kingdoms/hinterlands.cpp +++ b/scripts/eastern_kingdoms/hinterlands.cpp @@ -47,7 +47,7 @@ enum NPC_VILE_AMBUSHER = 7809 }; -struct MANGOS_DLL_DECL npc_00x09hlAI : public npc_escortAI +struct npc_00x09hlAI : public npc_escortAI { npc_00x09hlAI(Creature* pCreature) : npc_escortAI(pCreature) { Reset(); } @@ -167,7 +167,7 @@ Location m_afAmbushMoveTo[] = {70.886589f, -2874.335449f, 116.675f} }; -struct MANGOS_DLL_DECL npc_rinjiAI : public npc_escortAI +struct npc_rinjiAI : public npc_escortAI { npc_rinjiAI(Creature* pCreature) : npc_escortAI(pCreature) { diff --git a/scripts/eastern_kingdoms/isle_of_queldanas.cpp b/scripts/eastern_kingdoms/isle_of_queldanas.cpp index ad7eaf9c6..abc812dc2 100644 --- a/scripts/eastern_kingdoms/isle_of_queldanas.cpp +++ b/scripts/eastern_kingdoms/isle_of_queldanas.cpp @@ -40,7 +40,7 @@ enum TIME_PET_DURATION = 7500 }; -struct MANGOS_DLL_DECL npc_converted_sentryAI : public ScriptedAI +struct npc_converted_sentryAI : public ScriptedAI { npc_converted_sentryAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } diff --git a/scripts/eastern_kingdoms/karazhan/boss_curator.cpp b/scripts/eastern_kingdoms/karazhan/boss_curator.cpp index a8c14624a..9b7df8776 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_curator.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_curator.cpp @@ -47,7 +47,7 @@ enum SPELL_BERSERK = 26662 }; -struct MANGOS_DLL_DECL boss_curatorAI : public ScriptedAI +struct boss_curatorAI : public ScriptedAI { boss_curatorAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/eastern_kingdoms/karazhan/boss_maiden_of_virtue.cpp b/scripts/eastern_kingdoms/karazhan/boss_maiden_of_virtue.cpp index e5feacb00..44ac97350 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_maiden_of_virtue.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_maiden_of_virtue.cpp @@ -40,7 +40,7 @@ enum SPELL_HOLYGROUND = 29512 }; -struct MANGOS_DLL_DECL boss_maiden_of_virtueAI : public ScriptedAI +struct boss_maiden_of_virtueAI : public ScriptedAI { boss_maiden_of_virtueAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/eastern_kingdoms/karazhan/boss_midnight.cpp b/scripts/eastern_kingdoms/karazhan/boss_midnight.cpp index af465471a..98d5e24df 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_midnight.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_midnight.cpp @@ -53,7 +53,7 @@ enum NPC_ATTUMEN_MOUNTED = 16152, }; -struct MANGOS_DLL_DECL boss_midnightAI : public ScriptedAI +struct boss_midnightAI : public ScriptedAI { boss_midnightAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -190,7 +190,7 @@ CreatureAI* GetAI_boss_midnight(Creature* pCreature) return new boss_midnightAI(pCreature); } -struct MANGOS_DLL_DECL boss_attumenAI : public ScriptedAI +struct boss_attumenAI : public ScriptedAI { boss_attumenAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/eastern_kingdoms/karazhan/boss_moroes.cpp b/scripts/eastern_kingdoms/karazhan/boss_moroes.cpp index 0bfc2f4c9..7a36f6d5e 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_moroes.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_moroes.cpp @@ -62,7 +62,7 @@ static const uint32 auiGuests[MAX_GUESTS] = NPC_LORD_ROBIN_DARIS }; -struct MANGOS_DLL_DECL boss_moroesAI : public ScriptedAI +struct boss_moroesAI : public ScriptedAI { boss_moroesAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/eastern_kingdoms/karazhan/boss_netherspite.cpp b/scripts/eastern_kingdoms/karazhan/boss_netherspite.cpp index e27dd8464..4aa16bb41 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_netherspite.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_netherspite.cpp @@ -119,7 +119,7 @@ static const uint32 auiPortals[MAX_PORTALS] = ## boss_netherspite ######*/ -struct MANGOS_DLL_DECL boss_netherspiteAI : public ScriptedAI +struct boss_netherspiteAI : public ScriptedAI { boss_netherspiteAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -316,7 +316,7 @@ CreatureAI* GetAI_boss_netherspite(Creature* pCreature) ## npc_netherspite_portal ######*/ -struct MANGOS_DLL_DECL npc_netherspite_portalAI : public Scripted_NoMovementAI +struct npc_netherspite_portalAI : public Scripted_NoMovementAI { npc_netherspite_portalAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { diff --git a/scripts/eastern_kingdoms/karazhan/boss_nightbane.cpp b/scripts/eastern_kingdoms/karazhan/boss_nightbane.cpp index c5d0cd788..3f9ea630f 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_nightbane.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_nightbane.cpp @@ -56,7 +56,7 @@ enum POINT_ID_GROUND = 2, }; -struct MANGOS_DLL_DECL boss_nightbaneAI : public npc_escortAI +struct boss_nightbaneAI : public npc_escortAI { boss_nightbaneAI(Creature* pCreature) : npc_escortAI(pCreature) { diff --git a/scripts/eastern_kingdoms/karazhan/boss_prince_malchezaar.cpp b/scripts/eastern_kingdoms/karazhan/boss_prince_malchezaar.cpp index b57be70af..bc06a0898 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_prince_malchezaar.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_prince_malchezaar.cpp @@ -67,7 +67,7 @@ enum MAX_ENFEEBLE_TARGETS = 5, }; -struct MANGOS_DLL_DECL boss_malchezaarAI : public ScriptedAI +struct boss_malchezaarAI : public ScriptedAI { boss_malchezaarAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -333,7 +333,7 @@ CreatureAI* GetAI_boss_malchezaar(Creature* pCreature) } // TODO Remove this 'script' when combat can be proper prevented from core-side -struct MANGOS_DLL_DECL npc_infernal_targetAI : public Scripted_NoMovementAI +struct npc_infernal_targetAI : public Scripted_NoMovementAI { npc_infernal_targetAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { Reset(); } diff --git a/scripts/eastern_kingdoms/karazhan/boss_shade_of_aran.cpp b/scripts/eastern_kingdoms/karazhan/boss_shade_of_aran.cpp index 46d4566a2..898fa8eef 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_shade_of_aran.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_shade_of_aran.cpp @@ -89,7 +89,7 @@ enum SuperSpells SUPER_ARCANE_EXPL = 2, }; -struct MANGOS_DLL_DECL boss_aranAI : public ScriptedAI +struct boss_aranAI : public ScriptedAI { boss_aranAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -399,7 +399,7 @@ CreatureAI* GetAI_boss_aran(Creature* pCreature) } // TODO Remove this 'script' when combat can be proper prevented from core-side -struct MANGOS_DLL_DECL npc_shade_of_aran_blizzardAI : public ScriptedAI +struct npc_shade_of_aran_blizzardAI : public ScriptedAI { npc_shade_of_aran_blizzardAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } diff --git a/scripts/eastern_kingdoms/karazhan/boss_terestian_illhoof.cpp b/scripts/eastern_kingdoms/karazhan/boss_terestian_illhoof.cpp index 4a4fd3cd6..3d2f5212b 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_terestian_illhoof.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_terestian_illhoof.cpp @@ -60,7 +60,7 @@ enum NPC_KILREK = 17229 }; -struct MANGOS_DLL_DECL boss_terestianAI : public ScriptedAI +struct boss_terestianAI : public ScriptedAI { boss_terestianAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -227,7 +227,7 @@ struct MANGOS_DLL_DECL boss_terestianAI : public ScriptedAI } }; -struct MANGOS_DLL_DECL npc_fiendish_portalAI : public ScriptedAI +struct npc_fiendish_portalAI : public ScriptedAI { npc_fiendish_portalAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } @@ -257,7 +257,7 @@ struct MANGOS_DLL_DECL npc_fiendish_portalAI : public ScriptedAI }; // TODO Remove this 'script' when combat can be proper prevented from core-side -struct MANGOS_DLL_DECL mob_demon_chainAI : public Scripted_NoMovementAI +struct mob_demon_chainAI : public Scripted_NoMovementAI { mob_demon_chainAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { Reset(); } diff --git a/scripts/eastern_kingdoms/karazhan/bosses_opera.cpp b/scripts/eastern_kingdoms/karazhan/bosses_opera.cpp index 564173fbd..ebcb6db98 100644 --- a/scripts/eastern_kingdoms/karazhan/bosses_opera.cpp +++ b/scripts/eastern_kingdoms/karazhan/bosses_opera.cpp @@ -85,7 +85,7 @@ enum NPC_CYCLONE = 18412, }; -struct MANGOS_DLL_DECL boss_dorotheeAI : public ScriptedAI +struct boss_dorotheeAI : public ScriptedAI { boss_dorotheeAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -218,7 +218,7 @@ struct MANGOS_DLL_DECL boss_dorotheeAI : public ScriptedAI } }; -struct MANGOS_DLL_DECL boss_strawmanAI : public ScriptedAI +struct boss_strawmanAI : public ScriptedAI { boss_strawmanAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -319,7 +319,7 @@ struct MANGOS_DLL_DECL boss_strawmanAI : public ScriptedAI } }; -struct MANGOS_DLL_DECL boss_tinheadAI : public ScriptedAI +struct boss_tinheadAI : public ScriptedAI { boss_tinheadAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -419,7 +419,7 @@ struct MANGOS_DLL_DECL boss_tinheadAI : public ScriptedAI } }; -struct MANGOS_DLL_DECL boss_roarAI : public ScriptedAI +struct boss_roarAI : public ScriptedAI { boss_roarAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -528,7 +528,7 @@ struct MANGOS_DLL_DECL boss_roarAI : public ScriptedAI static const float afCycloneSpawnLoc[4] = { -10907.68f, -1778.651f, 90.56018f, 0.61f}; -struct MANGOS_DLL_DECL boss_croneAI : public ScriptedAI +struct boss_croneAI : public ScriptedAI { boss_croneAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -666,7 +666,7 @@ bool GossipSelect_npc_grandmother(Player* pPlayer, Creature* pCreature, uint32 / return true; } -struct MANGOS_DLL_DECL boss_bigbadwolfAI : public ScriptedAI +struct boss_bigbadwolfAI : public ScriptedAI { boss_bigbadwolfAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -796,7 +796,7 @@ enum OperaPhase static const float afRomuloSpawnLoc[4] = { -10893.62f, -1760.78f, 90.55f, 4.76f}; -struct MANGOS_DLL_DECL boss_julianneAI : public ScriptedAI +struct boss_julianneAI : public ScriptedAI { boss_julianneAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -1048,7 +1048,7 @@ bool EffectDummyCreature_spell_drink_poison(Unit* /*pCaster*/, uint32 uiSpellId, return false; } -struct MANGOS_DLL_DECL boss_romuloAI : public ScriptedAI +struct boss_romuloAI : public ScriptedAI { boss_romuloAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/eastern_kingdoms/karazhan/chess_event.cpp b/scripts/eastern_kingdoms/karazhan/chess_event.cpp index 06be61159..25d49f891 100644 --- a/scripts/eastern_kingdoms/karazhan/chess_event.cpp +++ b/scripts/eastern_kingdoms/karazhan/chess_event.cpp @@ -203,7 +203,7 @@ enum ## npc_echo_of_medivh ######*/ -struct MANGOS_DLL_DECL npc_echo_of_medivhAI : public ScriptedAI +struct npc_echo_of_medivhAI : public ScriptedAI { npc_echo_of_medivhAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -297,7 +297,7 @@ bool GossipSelect_npc_echo_of_medivh(Player* pPlayer, Creature* pCreature, uint3 ## npc_chess_piece_generic ######*/ -struct MANGOS_DLL_DECL npc_chess_piece_genericAI : public ScriptedAI +struct npc_chess_piece_genericAI : public ScriptedAI { npc_chess_piece_genericAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -650,7 +650,7 @@ bool EffectDummyCreature_npc_chess_generic(Unit* pCaster, uint32 uiSpellId, Spel ## npc_king_llane ######*/ -struct MANGOS_DLL_DECL npc_king_llaneAI : public npc_chess_piece_genericAI +struct npc_king_llaneAI : public npc_chess_piece_genericAI { npc_king_llaneAI(Creature* pCreature) : npc_chess_piece_genericAI(pCreature) { @@ -761,7 +761,7 @@ bool GossipHello_npc_king_llane(Player* pPlayer, Creature* pCreature) ## npc_warchief_blackhand ######*/ -struct MANGOS_DLL_DECL npc_warchief_blackhandAI : public npc_chess_piece_genericAI +struct npc_warchief_blackhandAI : public npc_chess_piece_genericAI { npc_warchief_blackhandAI(Creature* pCreature) : npc_chess_piece_genericAI(pCreature) { @@ -872,7 +872,7 @@ bool GossipHello_npc_warchief_blackhand(Player* pPlayer, Creature* pCreature) ## npc_human_conjurer ######*/ -struct MANGOS_DLL_DECL npc_human_conjurerAI : public npc_chess_piece_genericAI +struct npc_human_conjurerAI : public npc_chess_piece_genericAI { npc_human_conjurerAI(Creature* pCreature) : npc_chess_piece_genericAI(pCreature) { Reset(); } @@ -948,7 +948,7 @@ bool GossipHello_npc_human_conjurer(Player* pPlayer, Creature* pCreature) ## npc_orc_warlock ######*/ -struct MANGOS_DLL_DECL npc_orc_warlockAI : public npc_chess_piece_genericAI +struct npc_orc_warlockAI : public npc_chess_piece_genericAI { npc_orc_warlockAI(Creature* pCreature) : npc_chess_piece_genericAI(pCreature) { Reset(); } @@ -1024,7 +1024,7 @@ bool GossipHello_npc_orc_warlock(Player* pPlayer, Creature* pCreature) ## npc_human_footman ######*/ -struct MANGOS_DLL_DECL npc_human_footmanAI : public npc_chess_piece_genericAI +struct npc_human_footmanAI : public npc_chess_piece_genericAI { npc_human_footmanAI(Creature* pCreature) : npc_chess_piece_genericAI(pCreature) { Reset(); } @@ -1114,7 +1114,7 @@ bool GossipHello_npc_human_footman(Player* pPlayer, Creature* pCreature) ## npc_orc_grunt ######*/ -struct MANGOS_DLL_DECL npc_orc_gruntAI : public npc_chess_piece_genericAI +struct npc_orc_gruntAI : public npc_chess_piece_genericAI { npc_orc_gruntAI(Creature* pCreature) : npc_chess_piece_genericAI(pCreature) { Reset(); } @@ -1204,7 +1204,7 @@ bool GossipHello_npc_orc_grunt(Player* pPlayer, Creature* pCreature) ## npc_water_elemental ######*/ -struct MANGOS_DLL_DECL npc_water_elementalAI : public npc_chess_piece_genericAI +struct npc_water_elementalAI : public npc_chess_piece_genericAI { npc_water_elementalAI(Creature* pCreature) : npc_chess_piece_genericAI(pCreature) { Reset(); } @@ -1280,7 +1280,7 @@ bool GossipHello_npc_water_elemental(Player* pPlayer, Creature* pCreature) ## npc_summoned_daemon ######*/ -struct MANGOS_DLL_DECL npc_summoned_daemonAI : public npc_chess_piece_genericAI +struct npc_summoned_daemonAI : public npc_chess_piece_genericAI { npc_summoned_daemonAI(Creature* pCreature) : npc_chess_piece_genericAI(pCreature) { Reset(); } @@ -1356,7 +1356,7 @@ bool GossipHello_npc_summoned_daemon(Player* pPlayer, Creature* pCreature) ## npc_human_charger ######*/ -struct MANGOS_DLL_DECL npc_human_chargerAI : public npc_chess_piece_genericAI +struct npc_human_chargerAI : public npc_chess_piece_genericAI { npc_human_chargerAI(Creature* pCreature) : npc_chess_piece_genericAI(pCreature) { Reset(); } @@ -1432,7 +1432,7 @@ bool GossipHello_npc_human_charger(Player* pPlayer, Creature* pCreature) ## npc_orc_wolf ######*/ -struct MANGOS_DLL_DECL npc_orc_wolfAI : public npc_chess_piece_genericAI +struct npc_orc_wolfAI : public npc_chess_piece_genericAI { npc_orc_wolfAI(Creature* pCreature) : npc_chess_piece_genericAI(pCreature) { Reset(); } @@ -1508,7 +1508,7 @@ bool GossipHello_npc_orc_wolf(Player* pPlayer, Creature* pCreature) ## npc_human_cleric ######*/ -struct MANGOS_DLL_DECL npc_human_clericAI : public npc_chess_piece_genericAI +struct npc_human_clericAI : public npc_chess_piece_genericAI { npc_human_clericAI(Creature* pCreature) : npc_chess_piece_genericAI(pCreature) { Reset(); } @@ -1584,7 +1584,7 @@ bool GossipHello_npc_human_cleric(Player* pPlayer, Creature* pCreature) ## npc_orc_necrolyte ######*/ -struct MANGOS_DLL_DECL npc_orc_necrolyteAI : public npc_chess_piece_genericAI +struct npc_orc_necrolyteAI : public npc_chess_piece_genericAI { npc_orc_necrolyteAI(Creature* pCreature) : npc_chess_piece_genericAI(pCreature) { Reset(); } diff --git a/scripts/eastern_kingdoms/karazhan/karazhan.cpp b/scripts/eastern_kingdoms/karazhan/karazhan.cpp index c5c37fdad..fd1f62717 100644 --- a/scripts/eastern_kingdoms/karazhan/karazhan.cpp +++ b/scripts/eastern_kingdoms/karazhan/karazhan.cpp @@ -94,7 +94,7 @@ static const DialogueEntry aIntroDialogue[] = {0, 0, 0}, }; -struct MANGOS_DLL_DECL npc_barnesAI : public npc_escortAI, private DialogueHelper +struct npc_barnesAI : public npc_escortAI, private DialogueHelper { npc_barnesAI(Creature* pCreature) : npc_escortAI(pCreature), DialogueHelper(aIntroDialogue) @@ -356,7 +356,7 @@ static const DialogueEntry aMedivhDialogue[] = {0, 0, 0}, }; -struct MANGOS_DLL_DECL npc_image_of_medivhAI : public ScriptedAI, private DialogueHelper +struct npc_image_of_medivhAI : public ScriptedAI, private DialogueHelper { npc_image_of_medivhAI(Creature* pCreature) : ScriptedAI(pCreature), DialogueHelper(aMedivhDialogue) @@ -455,7 +455,7 @@ CreatureAI* GetAI_npc_image_of_medivhAI(Creature* pCreature) # npc_image_arcanagos ######*/ -struct MANGOS_DLL_DECL npc_image_arcanagosAI : public ScriptedAI +struct npc_image_arcanagosAI : public ScriptedAI { npc_image_arcanagosAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } diff --git a/scripts/eastern_kingdoms/karazhan/karazhan.h b/scripts/eastern_kingdoms/karazhan/karazhan.h index 23e9586e8..f2c381dcd 100644 --- a/scripts/eastern_kingdoms/karazhan/karazhan.h +++ b/scripts/eastern_kingdoms/karazhan/karazhan.h @@ -138,7 +138,7 @@ static const OperaSpawns aOperaLocJul = {NPC_JULIANNE, -10893.56f, -1760.43f static const float afChroneSpawnLoc[4] = { -10893.11f, -1757.85f, 90.55f, 4.60f}; -class MANGOS_DLL_DECL instance_karazhan : public ScriptedInstance +class instance_karazhan : public ScriptedInstance { public: instance_karazhan(Map* pMap); diff --git a/scripts/eastern_kingdoms/loch_modan.cpp b/scripts/eastern_kingdoms/loch_modan.cpp index b0636c520..54a453fd6 100644 --- a/scripts/eastern_kingdoms/loch_modan.cpp +++ b/scripts/eastern_kingdoms/loch_modan.cpp @@ -108,7 +108,7 @@ static const Location m_afAmbushSpawn[] = { -5706.98f, -3745.39f, 318.728f, 1.04f} }; -struct MANGOS_DLL_DECL npc_miranAI: public npc_escortAI +struct npc_miranAI: public npc_escortAI { npc_miranAI(Creature* pCreature): npc_escortAI(pCreature) { diff --git a/scripts/eastern_kingdoms/magisters_terrace/boss_felblood_kaelthas.cpp b/scripts/eastern_kingdoms/magisters_terrace/boss_felblood_kaelthas.cpp index 508d62d9e..40b42e78f 100644 --- a/scripts/eastern_kingdoms/magisters_terrace/boss_felblood_kaelthas.cpp +++ b/scripts/eastern_kingdoms/magisters_terrace/boss_felblood_kaelthas.cpp @@ -89,7 +89,7 @@ static const uint32 aGravityLapseSpells[] = {44219, 44220, 44221, 44222, 44223}; ## boss_felblood_kaelthas ######*/ -struct MANGOS_DLL_DECL boss_felblood_kaelthasAI : public ScriptedAI, private DialogueHelper +struct boss_felblood_kaelthasAI : public ScriptedAI, private DialogueHelper { boss_felblood_kaelthasAI(Creature* pCreature) : ScriptedAI(pCreature), DialogueHelper(aIntroDialogue) @@ -437,7 +437,7 @@ struct MANGOS_DLL_DECL boss_felblood_kaelthasAI : public ScriptedAI, private Dia ## mob_felkael_phoenix ######*/ -struct MANGOS_DLL_DECL mob_felkael_phoenixAI : public ScriptedAI +struct mob_felkael_phoenixAI : public ScriptedAI { mob_felkael_phoenixAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } @@ -562,7 +562,7 @@ struct MANGOS_DLL_DECL mob_felkael_phoenixAI : public ScriptedAI ######*/ // TODO Remove this 'script' when combat movement can be proper prevented from core-side -struct MANGOS_DLL_DECL mob_felkael_phoenix_eggAI : public Scripted_NoMovementAI +struct mob_felkael_phoenix_eggAI : public Scripted_NoMovementAI { mob_felkael_phoenix_eggAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { Reset(); } @@ -576,7 +576,7 @@ struct MANGOS_DLL_DECL mob_felkael_phoenix_eggAI : public Scripted_NoMovementAI ## mob_arcane_sphere ######*/ -struct MANGOS_DLL_DECL mob_arcane_sphereAI : public ScriptedAI +struct mob_arcane_sphereAI : public ScriptedAI { mob_arcane_sphereAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/eastern_kingdoms/magisters_terrace/boss_priestess_delrissa.cpp b/scripts/eastern_kingdoms/magisters_terrace/boss_priestess_delrissa.cpp index 67b3bf365..2329c8af7 100644 --- a/scripts/eastern_kingdoms/magisters_terrace/boss_priestess_delrissa.cpp +++ b/scripts/eastern_kingdoms/magisters_terrace/boss_priestess_delrissa.cpp @@ -59,7 +59,7 @@ static const float aLackeyLocations[MAX_DELRISSA_ADDS][4] = ## boss_priestess_delrissa ######*/ -struct MANGOS_DLL_DECL boss_priestess_delrissaAI : public ScriptedAI +struct boss_priestess_delrissaAI : public ScriptedAI { boss_priestess_delrissaAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -281,7 +281,7 @@ CreatureAI* GetAI_boss_priestess_delrissa(Creature* pCreature) ## priestess_companion_common ######*/ -struct MANGOS_DLL_DECL priestess_companion_commonAI : public ScriptedAI +struct priestess_companion_commonAI : public ScriptedAI { priestess_companion_commonAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -385,7 +385,7 @@ enum ## npc_kagani_nightstrike - Rogue ######*/ -struct MANGOS_DLL_DECL npc_kagani_nightstrikeAI : public priestess_companion_commonAI +struct npc_kagani_nightstrikeAI : public priestess_companion_commonAI { npc_kagani_nightstrikeAI(Creature* pCreature) : priestess_companion_commonAI(pCreature) { Reset(); } @@ -501,7 +501,7 @@ enum ## npc_ellris_duskhallow - Warlock ######*/ -struct MANGOS_DLL_DECL npc_ellris_duskhallowAI : public priestess_companion_commonAI +struct npc_ellris_duskhallowAI : public priestess_companion_commonAI { npc_ellris_duskhallowAI(Creature* pCreature) : priestess_companion_commonAI(pCreature) { Reset(); } @@ -627,7 +627,7 @@ enum ## npc_eramas_brightblaze - Monk ######*/ -struct MANGOS_DLL_DECL npc_eramas_brightblazeAI : public priestess_companion_commonAI +struct npc_eramas_brightblazeAI : public priestess_companion_commonAI { npc_eramas_brightblazeAI(Creature* pCreature) : priestess_companion_commonAI(pCreature) { Reset(); } @@ -688,7 +688,7 @@ enum ## npc_yazzai - Mage ######*/ -struct MANGOS_DLL_DECL npc_yazzaiAI : public priestess_companion_commonAI +struct npc_yazzaiAI : public priestess_companion_commonAI { npc_yazzaiAI(Creature* pCreature) : priestess_companion_commonAI(pCreature) { Reset(); } @@ -828,7 +828,7 @@ enum ## npc_warlord_salaris - Warrior ######*/ -struct MANGOS_DLL_DECL npc_warlord_salarisAI : public priestess_companion_commonAI +struct npc_warlord_salarisAI : public priestess_companion_commonAI { npc_warlord_salarisAI(Creature* pCreature) : priestess_companion_commonAI(pCreature) { Reset(); } @@ -942,7 +942,7 @@ enum ## npc_garaxxas - Hunter ######*/ -struct MANGOS_DLL_DECL npc_garaxxasAI : public priestess_companion_commonAI +struct npc_garaxxasAI : public priestess_companion_commonAI { npc_garaxxasAI(Creature* pCreature) : priestess_companion_commonAI(pCreature) { Reset(); } @@ -1073,7 +1073,7 @@ enum ## npc_apoko - Shaman ######*/ -struct MANGOS_DLL_DECL npc_apokoAI : public priestess_companion_commonAI +struct npc_apokoAI : public priestess_companion_commonAI { npc_apokoAI(Creature* pCreature) : priestess_companion_commonAI(pCreature) { Reset(); } @@ -1173,7 +1173,7 @@ enum ## npc_zelfan - Engineer ######*/ -struct MANGOS_DLL_DECL npc_zelfanAI : public priestess_companion_commonAI +struct npc_zelfanAI : public priestess_companion_commonAI { npc_zelfanAI(Creature* pCreature) : priestess_companion_commonAI(pCreature) { Reset(); } diff --git a/scripts/eastern_kingdoms/magisters_terrace/boss_selin_fireheart.cpp b/scripts/eastern_kingdoms/magisters_terrace/boss_selin_fireheart.cpp index e217d53c0..e1c00a20c 100644 --- a/scripts/eastern_kingdoms/magisters_terrace/boss_selin_fireheart.cpp +++ b/scripts/eastern_kingdoms/magisters_terrace/boss_selin_fireheart.cpp @@ -51,7 +51,7 @@ enum NPC_BRUISER = 24689, }; -struct MANGOS_DLL_DECL boss_selin_fireheartAI : public ScriptedAI +struct boss_selin_fireheartAI : public ScriptedAI { boss_selin_fireheartAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -251,7 +251,7 @@ CreatureAI* GetAI_boss_selin_fireheart(Creature* pCreature) return new boss_selin_fireheartAI(pCreature); }; -struct MANGOS_DLL_DECL mob_fel_crystalAI : public ScriptedAI +struct mob_fel_crystalAI : public ScriptedAI { mob_fel_crystalAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } diff --git a/scripts/eastern_kingdoms/magisters_terrace/boss_vexallus.cpp b/scripts/eastern_kingdoms/magisters_terrace/boss_vexallus.cpp index fcb90983e..0d3d0ac10 100644 --- a/scripts/eastern_kingdoms/magisters_terrace/boss_vexallus.cpp +++ b/scripts/eastern_kingdoms/magisters_terrace/boss_vexallus.cpp @@ -56,7 +56,7 @@ enum NPC_PURE_ENERGY = 24745, }; -struct MANGOS_DLL_DECL boss_vexallusAI : public ScriptedAI +struct boss_vexallusAI : public ScriptedAI { boss_vexallusAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -189,7 +189,7 @@ CreatureAI* GetAI_boss_vexallus(Creature* pCreature) return new boss_vexallusAI(pCreature); }; -struct MANGOS_DLL_DECL mob_pure_energyAI : public ScriptedAI +struct mob_pure_energyAI : public ScriptedAI { mob_pure_energyAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} diff --git a/scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.cpp b/scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.cpp index 52c6d7173..bc14bf5cb 100644 --- a/scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.cpp +++ b/scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.cpp @@ -45,7 +45,7 @@ static const float afKaelLandPoint[4] = {200.36f, -270.77f, -8.73f, 0.01f}; // This is friendly keal that appear after used Orb. // If we assume DB handle summon, summon appear somewhere outside the platform where Orb is -struct MANGOS_DLL_DECL npc_kalecgosAI : public ScriptedAI +struct npc_kalecgosAI : public ScriptedAI { npc_kalecgosAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } diff --git a/scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.h b/scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.h index 5853e5eb1..955e6dc31 100644 --- a/scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.h +++ b/scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.h @@ -44,7 +44,7 @@ enum static const int32 aDelrissaAddDeath[MAX_DELRISSA_ADDS] = { -1585013, -1585014, -1585015, -1585016}; -class MANGOS_DLL_DECL instance_magisters_terrace : public ScriptedInstance +class instance_magisters_terrace : public ScriptedInstance { public: instance_magisters_terrace(Map* pMap); diff --git a/scripts/eastern_kingdoms/molten_core/boss_baron_geddon.cpp b/scripts/eastern_kingdoms/molten_core/boss_baron_geddon.cpp index 935c6e08b..54d497cd8 100644 --- a/scripts/eastern_kingdoms/molten_core/boss_baron_geddon.cpp +++ b/scripts/eastern_kingdoms/molten_core/boss_baron_geddon.cpp @@ -34,7 +34,7 @@ enum SPELL_ARMAGEDDON = 20478 }; -struct MANGOS_DLL_DECL boss_baron_geddonAI : public ScriptedAI +struct boss_baron_geddonAI : public ScriptedAI { boss_baron_geddonAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/eastern_kingdoms/molten_core/boss_garr.cpp b/scripts/eastern_kingdoms/molten_core/boss_garr.cpp index 3f8feaf6f..8e77f1c79 100644 --- a/scripts/eastern_kingdoms/molten_core/boss_garr.cpp +++ b/scripts/eastern_kingdoms/molten_core/boss_garr.cpp @@ -38,7 +38,7 @@ enum SPELL_SEPARATION_ANXIETY = 23492, // Used if separated too far from Garr, 21095 use unknown. }; -struct MANGOS_DLL_DECL boss_garrAI : public ScriptedAI +struct boss_garrAI : public ScriptedAI { boss_garrAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -102,7 +102,7 @@ struct MANGOS_DLL_DECL boss_garrAI : public ScriptedAI } }; -struct MANGOS_DLL_DECL mob_fireswornAI : public ScriptedAI +struct mob_fireswornAI : public ScriptedAI { mob_fireswornAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/eastern_kingdoms/molten_core/boss_gehennas.cpp b/scripts/eastern_kingdoms/molten_core/boss_gehennas.cpp index a43eb1947..2409a2546 100644 --- a/scripts/eastern_kingdoms/molten_core/boss_gehennas.cpp +++ b/scripts/eastern_kingdoms/molten_core/boss_gehennas.cpp @@ -31,7 +31,7 @@ enum SPELL_GEHENNAS_CURSE = 19716 }; -struct MANGOS_DLL_DECL boss_gehennasAI : public ScriptedAI +struct boss_gehennasAI : public ScriptedAI { boss_gehennasAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/eastern_kingdoms/molten_core/boss_golemagg.cpp b/scripts/eastern_kingdoms/molten_core/boss_golemagg.cpp index b016022f0..3b01f8b97 100644 --- a/scripts/eastern_kingdoms/molten_core/boss_golemagg.cpp +++ b/scripts/eastern_kingdoms/molten_core/boss_golemagg.cpp @@ -37,7 +37,7 @@ enum SPELL_MANGLE = 19820 }; -struct MANGOS_DLL_DECL boss_golemaggAI : public ScriptedAI +struct boss_golemaggAI : public ScriptedAI { boss_golemaggAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -129,7 +129,7 @@ struct MANGOS_DLL_DECL boss_golemaggAI : public ScriptedAI } }; -struct MANGOS_DLL_DECL mob_core_ragerAI : public ScriptedAI +struct mob_core_ragerAI : public ScriptedAI { mob_core_ragerAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/eastern_kingdoms/molten_core/boss_lucifron.cpp b/scripts/eastern_kingdoms/molten_core/boss_lucifron.cpp index 4499d08cc..baa01ab71 100644 --- a/scripts/eastern_kingdoms/molten_core/boss_lucifron.cpp +++ b/scripts/eastern_kingdoms/molten_core/boss_lucifron.cpp @@ -31,7 +31,7 @@ enum SPELL_SHADOWSHOCK = 19460 }; -struct MANGOS_DLL_DECL boss_lucifronAI : public ScriptedAI +struct boss_lucifronAI : public ScriptedAI { boss_lucifronAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/eastern_kingdoms/molten_core/boss_magmadar.cpp b/scripts/eastern_kingdoms/molten_core/boss_magmadar.cpp index 7e43aadb2..69d8e5fda 100644 --- a/scripts/eastern_kingdoms/molten_core/boss_magmadar.cpp +++ b/scripts/eastern_kingdoms/molten_core/boss_magmadar.cpp @@ -35,7 +35,7 @@ enum SPELL_LAVABOMB_ALT = 19428 }; -struct MANGOS_DLL_DECL boss_magmadarAI : public ScriptedAI +struct boss_magmadarAI : public ScriptedAI { boss_magmadarAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/eastern_kingdoms/molten_core/boss_majordomo_executus.cpp b/scripts/eastern_kingdoms/molten_core/boss_majordomo_executus.cpp index 8c93092d5..7638cf72c 100644 --- a/scripts/eastern_kingdoms/molten_core/boss_majordomo_executus.cpp +++ b/scripts/eastern_kingdoms/molten_core/boss_majordomo_executus.cpp @@ -63,7 +63,7 @@ enum SPELL_RAGNA_EMERGE = 20568, }; -struct MANGOS_DLL_DECL boss_majordomoAI : public ScriptedAI +struct boss_majordomoAI : public ScriptedAI { boss_majordomoAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/eastern_kingdoms/molten_core/boss_ragnaros.cpp b/scripts/eastern_kingdoms/molten_core/boss_ragnaros.cpp index 6c7c7f95a..1998250b6 100644 --- a/scripts/eastern_kingdoms/molten_core/boss_ragnaros.cpp +++ b/scripts/eastern_kingdoms/molten_core/boss_ragnaros.cpp @@ -54,7 +54,7 @@ enum NPC_FLAME_OF_RAGNAROS = 13148, }; -struct MANGOS_DLL_DECL boss_ragnarosAI : public Scripted_NoMovementAI +struct boss_ragnarosAI : public Scripted_NoMovementAI { boss_ragnarosAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { diff --git a/scripts/eastern_kingdoms/molten_core/boss_shazzrah.cpp b/scripts/eastern_kingdoms/molten_core/boss_shazzrah.cpp index 3fa2aae50..b126805dc 100644 --- a/scripts/eastern_kingdoms/molten_core/boss_shazzrah.cpp +++ b/scripts/eastern_kingdoms/molten_core/boss_shazzrah.cpp @@ -33,7 +33,7 @@ enum SPELL_GATE_OF_SHAZZRAH = 23138 // effect spell: 23139 }; -struct MANGOS_DLL_DECL boss_shazzrahAI : public ScriptedAI +struct boss_shazzrahAI : public ScriptedAI { boss_shazzrahAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/eastern_kingdoms/molten_core/boss_sulfuron_harbinger.cpp b/scripts/eastern_kingdoms/molten_core/boss_sulfuron_harbinger.cpp index 84488c054..3301ed31b 100644 --- a/scripts/eastern_kingdoms/molten_core/boss_sulfuron_harbinger.cpp +++ b/scripts/eastern_kingdoms/molten_core/boss_sulfuron_harbinger.cpp @@ -38,7 +38,7 @@ enum SPELL_IMMOLATE = 20294 }; -struct MANGOS_DLL_DECL boss_sulfuronAI : public ScriptedAI +struct boss_sulfuronAI : public ScriptedAI { boss_sulfuronAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -150,7 +150,7 @@ struct MANGOS_DLL_DECL boss_sulfuronAI : public ScriptedAI } }; -struct MANGOS_DLL_DECL mob_flamewaker_priestAI : public ScriptedAI +struct mob_flamewaker_priestAI : public ScriptedAI { mob_flamewaker_priestAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/eastern_kingdoms/molten_core/molten_core.h b/scripts/eastern_kingdoms/molten_core/molten_core.h index 4ccf5ac29..ce47e02bb 100644 --- a/scripts/eastern_kingdoms/molten_core/molten_core.h +++ b/scripts/eastern_kingdoms/molten_core/molten_core.h @@ -69,7 +69,7 @@ static sSpawnLocation m_aMajordomoLocations[2] = {NPC_MAJORDOMO, 847.103f, -816.153f, -229.775f, 4.344f} // Summon and teleport location (near Ragnaros) }; -class MANGOS_DLL_DECL instance_molten_core : public ScriptedInstance +class instance_molten_core : public ScriptedInstance { public: instance_molten_core(Map* pMap); diff --git a/scripts/eastern_kingdoms/redridge_mountains.cpp b/scripts/eastern_kingdoms/redridge_mountains.cpp index 01c35b021..d35968dea 100644 --- a/scripts/eastern_kingdoms/redridge_mountains.cpp +++ b/scripts/eastern_kingdoms/redridge_mountains.cpp @@ -45,7 +45,7 @@ enum SAY_CORPORAL_KEESHAN_5 = -1000565, }; -struct MANGOS_DLL_DECL npc_corporal_keeshan_escortAI : public npc_escortAI +struct npc_corporal_keeshan_escortAI : public npc_escortAI { npc_corporal_keeshan_escortAI(Creature* pCreature) : npc_escortAI(pCreature) { Reset(); } diff --git a/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp b/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp index ed4d3968b..c95b8bb62 100644 --- a/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp +++ b/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp @@ -103,7 +103,7 @@ enum SpecialSurprise NPC_PLAGUEFIST = 29053 }; -struct MANGOS_DLL_DECL npc_a_special_surpriseAI : public ScriptedAI +struct npc_a_special_surpriseAI : public ScriptedAI { npc_a_special_surpriseAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } @@ -540,7 +540,7 @@ int32 m_auiRandomSay[] = SAY_DUEL_A, SAY_DUEL_B, SAY_DUEL_C, SAY_DUEL_D, SAY_DUEL_E, SAY_DUEL_F, SAY_DUEL_G, SAY_DUEL_H, SAY_DUEL_I }; -struct MANGOS_DLL_DECL npc_death_knight_initiateAI : public ScriptedAI +struct npc_death_knight_initiateAI : public ScriptedAI { npc_death_knight_initiateAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } @@ -775,7 +775,7 @@ enum eKoltira MODEL_DEATH_KNIGHT_MOUNT = 25278 }; -struct MANGOS_DLL_DECL npc_koltira_deathweaverAI : public npc_escortAI +struct npc_koltira_deathweaverAI : public npc_escortAI { npc_koltira_deathweaverAI(Creature* pCreature) : npc_escortAI(pCreature) { Reset(); } @@ -953,7 +953,7 @@ enum ## npc_unworthy_initiate_anchor ######*/ -struct MANGOS_DLL_DECL npc_unworthy_initiate_anchorAI : public ScriptedAI +struct npc_unworthy_initiate_anchorAI : public ScriptedAI { npc_unworthy_initiate_anchorAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } @@ -995,7 +995,7 @@ CreatureAI* GetAI_npc_unworthy_initiate_anchor(Creature* pCreature) ## npc_unworthy_initiate ######*/ -struct MANGOS_DLL_DECL npc_unworthy_initiateAI : public ScriptedAI +struct npc_unworthy_initiateAI : public ScriptedAI { npc_unworthy_initiateAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -1208,7 +1208,7 @@ enum // movement destination coords static const float aEyeDestination[3] = {1750.8276f, -5873.788f, 147.2266f}; -struct MANGOS_DLL_DECL npc_eye_of_acherusAI : public ScriptedAI +struct npc_eye_of_acherusAI : public ScriptedAI { npc_eye_of_acherusAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -1293,7 +1293,7 @@ enum static const float aPitPosition[3] = {2380.13f, -5783.06f, 151.367f}; -struct MANGOS_DLL_DECL npc_scarlet_ghoulAI : public ScriptedPetAI +struct npc_scarlet_ghoulAI : public ScriptedPetAI { npc_scarlet_ghoulAI(Creature* pCreature) : ScriptedPetAI(pCreature) { @@ -1542,7 +1542,7 @@ enum LightOfDawn GOSSIP_TEXT_ID_READY = 13485, }; -struct MANGOS_DLL_DECL npc_highlord_darion_mograineAI : public npc_escortAI +struct npc_highlord_darion_mograineAI : public npc_escortAI { npc_highlord_darion_mograineAI(Creature* pCreature) : npc_escortAI(pCreature) { @@ -2712,7 +2712,7 @@ CreatureAI* GetAI_npc_highlord_darion_mograine(Creature* pCreature) return new npc_highlord_darion_mograineAI(pCreature); } -struct MANGOS_DLL_DECL npc_fellow_death_knightAI : public ScriptedAI +struct npc_fellow_death_knightAI : public ScriptedAI { npc_fellow_death_knightAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -2847,7 +2847,7 @@ CreatureAI* GetAI_npc_fellow_death_knight(Creature* pCreature) } // TODO Remove this 'script' when combat can be proper prevented from core-side -struct MANGOS_DLL_DECL npc_lich_king_light_dawnAI : public ScriptedAI +struct npc_lich_king_light_dawnAI : public ScriptedAI { npc_lich_king_light_dawnAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } @@ -2880,7 +2880,7 @@ enum FACTION_FRIENDLY = 35, }; -struct MANGOS_DLL_DECL npc_acherus_deathchargerAI : public ScriptedAI +struct npc_acherus_deathchargerAI : public ScriptedAI { npc_acherus_deathchargerAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } diff --git a/scripts/eastern_kingdoms/scarlet_enclave/world_map_ebon_hold.h b/scripts/eastern_kingdoms/scarlet_enclave/world_map_ebon_hold.h index 7ff768145..261f4142c 100644 --- a/scripts/eastern_kingdoms/scarlet_enclave/world_map_ebon_hold.h +++ b/scripts/eastern_kingdoms/scarlet_enclave/world_map_ebon_hold.h @@ -113,7 +113,7 @@ static sSpawnLocation aEventLocations[] = {2273.071f, -5293.428f, 83.06f, 0.0f}, // 10 Tirion final point }; -class MANGOS_DLL_DECL world_map_ebon_hold : public ScriptedInstance +class world_map_ebon_hold : public ScriptedInstance { public: world_map_ebon_hold(Map* pMap); diff --git a/scripts/eastern_kingdoms/scarlet_monastery/boss_arcanist_doan.cpp b/scripts/eastern_kingdoms/scarlet_monastery/boss_arcanist_doan.cpp index 491959bf1..f1f725424 100644 --- a/scripts/eastern_kingdoms/scarlet_monastery/boss_arcanist_doan.cpp +++ b/scripts/eastern_kingdoms/scarlet_monastery/boss_arcanist_doan.cpp @@ -35,7 +35,7 @@ enum SPELL_ARCANE_BUBBLE = 9438, }; -struct MANGOS_DLL_DECL boss_arcanist_doanAI : public ScriptedAI +struct boss_arcanist_doanAI : public ScriptedAI { boss_arcanist_doanAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} diff --git a/scripts/eastern_kingdoms/scarlet_monastery/boss_headless_horseman.cpp b/scripts/eastern_kingdoms/scarlet_monastery/boss_headless_horseman.cpp index db0bd1f7f..0a1defd41 100644 --- a/scripts/eastern_kingdoms/scarlet_monastery/boss_headless_horseman.cpp +++ b/scripts/eastern_kingdoms/scarlet_monastery/boss_headless_horseman.cpp @@ -110,7 +110,7 @@ enum HorsemanPhase PHASE_HEAD_TOSS = 4, }; -struct MANGOS_DLL_DECL boss_headless_horsemanAI : public ScriptedAI +struct boss_headless_horsemanAI : public ScriptedAI { boss_headless_horsemanAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -360,7 +360,7 @@ bool EffectScriptEffectCreature_boss_headless_horseman(Unit* pCaster, uint32 uiS return false; } -struct MANGOS_DLL_DECL boss_head_of_horsemanAI : public ScriptedAI +struct boss_head_of_horsemanAI : public ScriptedAI { boss_head_of_horsemanAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/eastern_kingdoms/scarlet_monastery/boss_herod.cpp b/scripts/eastern_kingdoms/scarlet_monastery/boss_herod.cpp index 9733cb38c..e02d3afc3 100644 --- a/scripts/eastern_kingdoms/scarlet_monastery/boss_herod.cpp +++ b/scripts/eastern_kingdoms/scarlet_monastery/boss_herod.cpp @@ -42,7 +42,7 @@ enum NPC_SCARLET_TRAINEE = 6575 }; -struct MANGOS_DLL_DECL boss_herodAI : public ScriptedAI +struct boss_herodAI : public ScriptedAI { boss_herodAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} @@ -133,7 +133,7 @@ CreatureAI* GetAI_boss_herod(Creature* pCreature) return new boss_herodAI(pCreature); } -struct MANGOS_DLL_DECL mob_scarlet_traineeAI : public npc_escortAI +struct mob_scarlet_traineeAI : public npc_escortAI { mob_scarlet_traineeAI(Creature* pCreature) : npc_escortAI(pCreature) { diff --git a/scripts/eastern_kingdoms/scarlet_monastery/boss_mograine_and_whitemane.cpp b/scripts/eastern_kingdoms/scarlet_monastery/boss_mograine_and_whitemane.cpp index a8431d76c..187627bc0 100644 --- a/scripts/eastern_kingdoms/scarlet_monastery/boss_mograine_and_whitemane.cpp +++ b/scripts/eastern_kingdoms/scarlet_monastery/boss_mograine_and_whitemane.cpp @@ -51,7 +51,7 @@ enum SPELL_POWERWORDSHIELD = 22187 }; -struct MANGOS_DLL_DECL boss_scarlet_commander_mograineAI : public ScriptedAI +struct boss_scarlet_commander_mograineAI : public ScriptedAI { boss_scarlet_commander_mograineAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -204,7 +204,7 @@ struct MANGOS_DLL_DECL boss_scarlet_commander_mograineAI : public ScriptedAI } }; -struct MANGOS_DLL_DECL boss_high_inquisitor_whitemaneAI : public ScriptedAI +struct boss_high_inquisitor_whitemaneAI : public ScriptedAI { boss_high_inquisitor_whitemaneAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/eastern_kingdoms/scarlet_monastery/scarlet_monastery.h b/scripts/eastern_kingdoms/scarlet_monastery/scarlet_monastery.h index 3b3f9347b..2e1c41ad8 100644 --- a/scripts/eastern_kingdoms/scarlet_monastery/scarlet_monastery.h +++ b/scripts/eastern_kingdoms/scarlet_monastery/scarlet_monastery.h @@ -21,7 +21,7 @@ enum SAY_TRIGGER_VORREL = -1189015, }; -class MANGOS_DLL_DECL instance_scarlet_monastery : public ScriptedInstance +class instance_scarlet_monastery : public ScriptedInstance { public: instance_scarlet_monastery(Map* pMap); diff --git a/scripts/eastern_kingdoms/scholomance/boss_darkmaster_gandling.cpp b/scripts/eastern_kingdoms/scholomance/boss_darkmaster_gandling.cpp index b30a7de79..3d4a62ffb 100644 --- a/scripts/eastern_kingdoms/scholomance/boss_darkmaster_gandling.cpp +++ b/scripts/eastern_kingdoms/scholomance/boss_darkmaster_gandling.cpp @@ -32,7 +32,7 @@ enum SPELL_SHADOW_PORTAL = 17950 }; -struct MANGOS_DLL_DECL boss_darkmaster_gandlingAI : public ScriptedAI +struct boss_darkmaster_gandlingAI : public ScriptedAI { boss_darkmaster_gandlingAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/eastern_kingdoms/scholomance/boss_jandice_barov.cpp b/scripts/eastern_kingdoms/scholomance/boss_jandice_barov.cpp index 2c09156ce..742aa1f38 100644 --- a/scripts/eastern_kingdoms/scholomance/boss_jandice_barov.cpp +++ b/scripts/eastern_kingdoms/scholomance/boss_jandice_barov.cpp @@ -30,7 +30,7 @@ enum SPELL_BANISH = 8994, }; -struct MANGOS_DLL_DECL boss_jandicebarovAI : public ScriptedAI +struct boss_jandicebarovAI : public ScriptedAI { boss_jandicebarovAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} diff --git a/scripts/eastern_kingdoms/scholomance/scholomance.h b/scripts/eastern_kingdoms/scholomance/scholomance.h index db364d493..4637dd02b 100644 --- a/scripts/eastern_kingdoms/scholomance/scholomance.h +++ b/scripts/eastern_kingdoms/scholomance/scholomance.h @@ -78,7 +78,7 @@ static const uint32 aGandlingEvents[MAX_EVENTS] = {EVENT_ID_POLKELT, EVENT_ID_TH typedef std::map GandlingEventMap; -class MANGOS_DLL_DECL instance_scholomance : public ScriptedInstance +class instance_scholomance : public ScriptedInstance { public: instance_scholomance(Map* pMap); diff --git a/scripts/eastern_kingdoms/searing_gorge.cpp b/scripts/eastern_kingdoms/searing_gorge.cpp index d1b8b4e3d..c0dbe9139 100644 --- a/scripts/eastern_kingdoms/searing_gorge.cpp +++ b/scripts/eastern_kingdoms/searing_gorge.cpp @@ -43,7 +43,7 @@ enum QUEST_ID_SUNTARA_STONES = 3367, }; -struct MANGOS_DLL_DECL npc_dorius_stonetenderAI : public npc_escortAI +struct npc_dorius_stonetenderAI : public npc_escortAI { npc_dorius_stonetenderAI(Creature* pCreature) : npc_escortAI(pCreature) { Reset(); } diff --git a/scripts/eastern_kingdoms/shadowfang_keep/boss_hummel.cpp b/scripts/eastern_kingdoms/shadowfang_keep/boss_hummel.cpp index 7acb8ba31..265e7d19f 100644 --- a/scripts/eastern_kingdoms/shadowfang_keep/boss_hummel.cpp +++ b/scripts/eastern_kingdoms/shadowfang_keep/boss_hummel.cpp @@ -54,7 +54,7 @@ static const DialogueEntry aIntroDialogue[] = {0, 0, 0}, }; -struct MANGOS_DLL_DECL npc_valentine_boss_managerAI : public ScriptedAI, private DialogueHelper +struct npc_valentine_boss_managerAI : public ScriptedAI, private DialogueHelper { npc_valentine_boss_managerAI(Creature* pCreature) : ScriptedAI(pCreature), DialogueHelper(aIntroDialogue) diff --git a/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.cpp b/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.cpp index ecdae1cab..3c23e8b9e 100644 --- a/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.cpp +++ b/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.cpp @@ -55,7 +55,7 @@ enum GOSSIP_ITEM_DOOR = -3033000 }; -struct MANGOS_DLL_DECL npc_shadowfang_prisonerAI : public npc_escortAI +struct npc_shadowfang_prisonerAI : public npc_escortAI { npc_shadowfang_prisonerAI(Creature* pCreature) : npc_escortAI(pCreature) { @@ -198,7 +198,7 @@ enum SPELL_DARK_OFFERING = 7154 }; -struct MANGOS_DLL_DECL mob_arugal_voidwalkerAI : public ScriptedAI +struct mob_arugal_voidwalkerAI : public ScriptedAI { mob_arugal_voidwalkerAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -432,7 +432,7 @@ static const SpawnPoint VWSpawns[] = // Used to tell how he should behave const float HEIGHT_FENRUS_ROOM = 140.0f; -struct MANGOS_DLL_DECL boss_arugalAI : public ScriptedAI +struct boss_arugalAI : public ScriptedAI { boss_arugalAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -722,7 +722,7 @@ enum SPELL_SPAWN = 7741, }; -struct MANGOS_DLL_DECL npc_arugalAI : public ScriptedAI +struct npc_arugalAI : public ScriptedAI { npc_arugalAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -839,7 +839,7 @@ enum FACTION_FRIENDLY = 35 }; -struct MANGOS_DLL_DECL npc_deathstalker_vincentAI : public ScriptedAI +struct npc_deathstalker_vincentAI : public ScriptedAI { npc_deathstalker_vincentAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.h b/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.h index 4a7fc8881..bc39e8b90 100644 --- a/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.h +++ b/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.h @@ -46,7 +46,7 @@ enum MAX_APOTHECARY = 3, }; -class MANGOS_DLL_DECL instance_shadowfang_keep : public ScriptedInstance +class instance_shadowfang_keep : public ScriptedInstance { public: instance_shadowfang_keep(Map* pMap); diff --git a/scripts/eastern_kingdoms/silverpine_forest.cpp b/scripts/eastern_kingdoms/silverpine_forest.cpp index 61a1469e3..aa2783b4b 100644 --- a/scripts/eastern_kingdoms/silverpine_forest.cpp +++ b/scripts/eastern_kingdoms/silverpine_forest.cpp @@ -54,7 +54,7 @@ enum NPC_QUINN = 1951 }; -struct MANGOS_DLL_DECL npc_deathstalker_erlandAI : public npc_escortAI +struct npc_deathstalker_erlandAI : public npc_escortAI { npc_deathstalker_erlandAI(Creature* pCreature) : npc_escortAI(pCreature) { Reset(); } @@ -173,7 +173,7 @@ SpawnPoint SpawnPoints[] = static float m_afMoveCoords[] = { -410.69f, 1498.04f, 19.77f}; -struct MANGOS_DLL_DECL npc_deathstalker_faerleiaAI : public ScriptedAI +struct npc_deathstalker_faerleiaAI : public ScriptedAI { npc_deathstalker_faerleiaAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } diff --git a/scripts/eastern_kingdoms/stormwind_city.cpp b/scripts/eastern_kingdoms/stormwind_city.cpp index fb1a214c9..eb56c81e0 100644 --- a/scripts/eastern_kingdoms/stormwind_city.cpp +++ b/scripts/eastern_kingdoms/stormwind_city.cpp @@ -43,7 +43,7 @@ enum QUEST_BEAT = 1640 }; -struct MANGOS_DLL_DECL npc_bartlebyAI : public ScriptedAI +struct npc_bartlebyAI : public ScriptedAI { npc_bartlebyAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -102,7 +102,7 @@ enum FACTION_HOSTILE = 168 }; -struct MANGOS_DLL_DECL npc_dashel_stonefistAI : public ScriptedAI +struct npc_dashel_stonefistAI : public ScriptedAI { npc_dashel_stonefistAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -232,7 +232,7 @@ static const DialogueEntry aIntroDialogue[] = static const float aWindsorSpawnLoc[3] = { -9145.68f, 373.79f, 90.64f}; static const float aWindsorMoveLoc[3] = { -9050.39f, 443.55f, 93.05f}; -struct MANGOS_DLL_DECL npc_squire_roweAI : public npc_escortAI, private DialogueHelper +struct npc_squire_roweAI : public npc_escortAI, private DialogueHelper { npc_squire_roweAI(Creature* m_creature) : npc_escortAI(m_creature), DialogueHelper(aIntroDialogue) @@ -562,7 +562,7 @@ static const DialogueEntry aMasqueradeDialogue[] = static const int32 aGuardSalute[MAX_GUARD_SALUTES] = { -1000842, -1000843, -1000844, -1000845, -1000846, -1000847, -1000848}; -struct MANGOS_DLL_DECL npc_reginald_windsorAI : public npc_escortAI, private DialogueHelper +struct npc_reginald_windsorAI : public npc_escortAI, private DialogueHelper { npc_reginald_windsorAI(Creature* m_creature) : npc_escortAI(m_creature), DialogueHelper(aMasqueradeDialogue) diff --git a/scripts/eastern_kingdoms/stranglethorn_vale.cpp b/scripts/eastern_kingdoms/stranglethorn_vale.cpp index 3d0d9a9f2..cd48a1a4e 100644 --- a/scripts/eastern_kingdoms/stranglethorn_vale.cpp +++ b/scripts/eastern_kingdoms/stranglethorn_vale.cpp @@ -40,7 +40,7 @@ enum FACTION_ID_HORDE_GENERIC = 83, // Note: faction may not be correct! }; -struct MANGOS_DLL_DECL mob_yennikuAI : public ScriptedAI +struct mob_yennikuAI : public ScriptedAI { mob_yennikuAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } diff --git a/scripts/eastern_kingdoms/stratholme/boss_baroness_anastari.cpp b/scripts/eastern_kingdoms/stratholme/boss_baroness_anastari.cpp index 490f3e725..5690d5c4b 100644 --- a/scripts/eastern_kingdoms/stratholme/boss_baroness_anastari.cpp +++ b/scripts/eastern_kingdoms/stratholme/boss_baroness_anastari.cpp @@ -33,7 +33,7 @@ enum SPELL_POSSESS_INV = 17250, // baroness becomes invisible while possessing a target }; -struct MANGOS_DLL_DECL boss_baroness_anastariAI : public ScriptedAI +struct boss_baroness_anastariAI : public ScriptedAI { boss_baroness_anastariAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } diff --git a/scripts/eastern_kingdoms/stratholme/boss_cannon_master_willey.cpp b/scripts/eastern_kingdoms/stratholme/boss_cannon_master_willey.cpp index 38e397d41..07f08fe74 100644 --- a/scripts/eastern_kingdoms/stratholme/boss_cannon_master_willey.cpp +++ b/scripts/eastern_kingdoms/stratholme/boss_cannon_master_willey.cpp @@ -31,7 +31,7 @@ enum SPELL_SUMMON_RIFLEMAN = 17279, // spell needs script target }; -struct MANGOS_DLL_DECL boss_cannon_master_willeyAI : public ScriptedAI +struct boss_cannon_master_willeyAI : public ScriptedAI { boss_cannon_master_willeyAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } diff --git a/scripts/eastern_kingdoms/stratholme/boss_dathrohan_balnazzar.cpp b/scripts/eastern_kingdoms/stratholme/boss_dathrohan_balnazzar.cpp index 4a3b06bcc..960cb4e26 100644 --- a/scripts/eastern_kingdoms/stratholme/boss_dathrohan_balnazzar.cpp +++ b/scripts/eastern_kingdoms/stratholme/boss_dathrohan_balnazzar.cpp @@ -73,7 +73,7 @@ SummonDef m_aSummonPoint[] = {NPC_SKELETAL_GUARDIAN, 3518.825f, -3060.926f, 135.080f, 3.944f} }; -struct MANGOS_DLL_DECL boss_dathrohan_balnazzarAI : public ScriptedAI +struct boss_dathrohan_balnazzarAI : public ScriptedAI { boss_dathrohan_balnazzarAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} diff --git a/scripts/eastern_kingdoms/stratholme/boss_maleki_the_pallid.cpp b/scripts/eastern_kingdoms/stratholme/boss_maleki_the_pallid.cpp index 19fc3fd9a..ed2b6051c 100644 --- a/scripts/eastern_kingdoms/stratholme/boss_maleki_the_pallid.cpp +++ b/scripts/eastern_kingdoms/stratholme/boss_maleki_the_pallid.cpp @@ -31,7 +31,7 @@ enum SPELL_ICE_TOMB = 16869 }; -struct MANGOS_DLL_DECL boss_maleki_the_pallidAI : public ScriptedAI +struct boss_maleki_the_pallidAI : public ScriptedAI { boss_maleki_the_pallidAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } diff --git a/scripts/eastern_kingdoms/stratholme/boss_order_of_silver_hand.cpp b/scripts/eastern_kingdoms/stratholme/boss_order_of_silver_hand.cpp index c0e002a5f..227f772ab 100644 --- a/scripts/eastern_kingdoms/stratholme/boss_order_of_silver_hand.cpp +++ b/scripts/eastern_kingdoms/stratholme/boss_order_of_silver_hand.cpp @@ -70,7 +70,7 @@ static SilverHandAbilityStruct m_aSilverHandAbility[8] = {NPC_VICAR_HYERONIMUS, SPELL_BLESSING, TARGET_TYPE_FRIENDLY, 2000, 13000}, {NPC_VICAR_HYERONIMUS, SPELL_HOLY_LIGHT, TARGET_TYPE_FRIENDLY, 5000, 9000}, }; -struct MANGOS_DLL_DECL boss_silver_hand_bossesAI : public ScriptedAI +struct boss_silver_hand_bossesAI : public ScriptedAI { boss_silver_hand_bossesAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/eastern_kingdoms/stratholme/stratholme.cpp b/scripts/eastern_kingdoms/stratholme/stratholme.cpp index 6dfa66fc5..54ec3f428 100644 --- a/scripts/eastern_kingdoms/stratholme/stratholme.cpp +++ b/scripts/eastern_kingdoms/stratholme/stratholme.cpp @@ -143,7 +143,7 @@ enum }; // TODO - likely entirely not needed workaround -struct MANGOS_DLL_DECL mob_restless_soulAI : public ScriptedAI +struct mob_restless_soulAI : public ScriptedAI { mob_restless_soulAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } @@ -222,7 +222,7 @@ enum SPELL_SLAP = 6754 }; -struct MANGOS_DLL_DECL mobs_spectral_ghostly_citizenAI : public ScriptedAI +struct mobs_spectral_ghostly_citizenAI : public ScriptedAI { mobs_spectral_ghostly_citizenAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} diff --git a/scripts/eastern_kingdoms/stratholme/stratholme.h b/scripts/eastern_kingdoms/stratholme/stratholme.h index b91ac53c6..ccfe73351 100644 --- a/scripts/eastern_kingdoms/stratholme/stratholme.h +++ b/scripts/eastern_kingdoms/stratholme/stratholme.h @@ -111,7 +111,7 @@ struct ZigguratStore GuidList m_lZigguratAcolyteGuid; }; -class MANGOS_DLL_DECL instance_stratholme : public ScriptedInstance +class instance_stratholme : public ScriptedInstance { public: instance_stratholme(Map* pMap); diff --git a/scripts/eastern_kingdoms/sunken_temple/sunken_temple.cpp b/scripts/eastern_kingdoms/sunken_temple/sunken_temple.cpp index 9ee47a40e..1556cd6ee 100644 --- a/scripts/eastern_kingdoms/sunken_temple/sunken_temple.cpp +++ b/scripts/eastern_kingdoms/sunken_temple/sunken_temple.cpp @@ -73,7 +73,7 @@ enum MAX_MALFURION_TEMPLE_SPEECHES = 6 }; -struct MANGOS_DLL_DECL npc_malfurionAI : public ScriptedAI +struct npc_malfurionAI : public ScriptedAI { npc_malfurionAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/eastern_kingdoms/sunken_temple/sunken_temple.h b/scripts/eastern_kingdoms/sunken_temple/sunken_temple.h index a70f2a88e..4c01c0211 100644 --- a/scripts/eastern_kingdoms/sunken_temple/sunken_temple.h +++ b/scripts/eastern_kingdoms/sunken_temple/sunken_temple.h @@ -102,7 +102,7 @@ static const SummonLocations aHakkariDoorLocations[2] = { -512.015f, 276.134f, -90.827f} }; -class MANGOS_DLL_DECL instance_sunken_temple : public ScriptedInstance +class instance_sunken_temple : public ScriptedInstance { public: instance_sunken_temple(Map* pMap); diff --git a/scripts/eastern_kingdoms/sunwell_plateau/boss_brutallus.cpp b/scripts/eastern_kingdoms/sunwell_plateau/boss_brutallus.cpp index f397c6590..50f3f099f 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/boss_brutallus.cpp +++ b/scripts/eastern_kingdoms/sunwell_plateau/boss_brutallus.cpp @@ -101,7 +101,7 @@ static const DialogueEntry aIntroDialogue[] = ## boss_brutallus ######*/ -struct MANGOS_DLL_DECL boss_brutallusAI : public ScriptedAI, private DialogueHelper +struct boss_brutallusAI : public ScriptedAI, private DialogueHelper { boss_brutallusAI(Creature* pCreature) : ScriptedAI(pCreature), DialogueHelper(aIntroDialogue) diff --git a/scripts/eastern_kingdoms/sunwell_plateau/boss_eredar_twins.cpp b/scripts/eastern_kingdoms/sunwell_plateau/boss_eredar_twins.cpp index 12a11bb16..501ccda52 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/boss_eredar_twins.cpp +++ b/scripts/eastern_kingdoms/sunwell_plateau/boss_eredar_twins.cpp @@ -93,7 +93,7 @@ static const DialogueEntry aIntroDialogue[] = ## boss_alythess ######*/ -struct MANGOS_DLL_DECL boss_alythessAI : public ScriptedAI +struct boss_alythessAI : public ScriptedAI { boss_alythessAI(Creature* pCreature) : ScriptedAI(pCreature), m_introDialogue(aIntroDialogue) @@ -291,7 +291,7 @@ struct MANGOS_DLL_DECL boss_alythessAI : public ScriptedAI ## boss_sacrolash ######*/ -struct MANGOS_DLL_DECL boss_sacrolashAI : public ScriptedAI +struct boss_sacrolashAI : public ScriptedAI { boss_sacrolashAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -515,7 +515,7 @@ struct MANGOS_DLL_DECL boss_sacrolashAI : public ScriptedAI ## npc_shadow_image ######*/ -struct MANGOS_DLL_DECL npc_shadow_imageAI : public ScriptedAI +struct npc_shadow_imageAI : public ScriptedAI { npc_shadow_imageAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } diff --git a/scripts/eastern_kingdoms/sunwell_plateau/boss_felmyst.cpp b/scripts/eastern_kingdoms/sunwell_plateau/boss_felmyst.cpp index 5a43198a3..47ccc140c 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/boss_felmyst.cpp +++ b/scripts/eastern_kingdoms/sunwell_plateau/boss_felmyst.cpp @@ -79,7 +79,7 @@ enum ## boss_felmyst ######*/ -struct MANGOS_DLL_DECL boss_felmystAI : public ScriptedAI +struct boss_felmystAI : public ScriptedAI { boss_felmystAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -464,7 +464,7 @@ CreatureAI* GetAI_boss_felmyst(Creature* pCreature) ## npc_demonic_vapor ######*/ -struct MANGOS_DLL_DECL npc_demonic_vaporAI : public ScriptedAI +struct npc_demonic_vaporAI : public ScriptedAI { npc_demonic_vaporAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } diff --git a/scripts/eastern_kingdoms/sunwell_plateau/boss_kalecgos.cpp b/scripts/eastern_kingdoms/sunwell_plateau/boss_kalecgos.cpp index 70592abe6..eb4a19608 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/boss_kalecgos.cpp +++ b/scripts/eastern_kingdoms/sunwell_plateau/boss_kalecgos.cpp @@ -77,7 +77,7 @@ static const float aKalecHumanLoc[4] = {1709.094f, 927.5035f, -74.28364f, 2.9321 ## boss_kalecgos ######*/ -struct MANGOS_DLL_DECL boss_kalecgosAI : public ScriptedAI +struct boss_kalecgosAI : public ScriptedAI { boss_kalecgosAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -319,7 +319,7 @@ struct MANGOS_DLL_DECL boss_kalecgosAI : public ScriptedAI ## boss_sathrovarr ######*/ -struct MANGOS_DLL_DECL boss_sathrovarrAI : public ScriptedAI +struct boss_sathrovarrAI : public ScriptedAI { boss_sathrovarrAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -498,7 +498,7 @@ struct MANGOS_DLL_DECL boss_sathrovarrAI : public ScriptedAI ## boss_kalecgos_humanoid ######*/ -struct MANGOS_DLL_DECL boss_kalecgos_humanoidAI : public ScriptedAI +struct boss_kalecgos_humanoidAI : public ScriptedAI { boss_kalecgos_humanoidAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/eastern_kingdoms/sunwell_plateau/boss_kiljaeden.cpp b/scripts/eastern_kingdoms/sunwell_plateau/boss_kiljaeden.cpp index 1bc8fd9f8..c7d1241b4 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/boss_kiljaeden.cpp +++ b/scripts/eastern_kingdoms/sunwell_plateau/boss_kiljaeden.cpp @@ -209,7 +209,7 @@ static const float aKalegSpawnLoc[4] = {1734.431f, 593.1974f, 130.6977f, 4.55f}; ## npc_kiljaeden_controller ######*/ -struct MANGOS_DLL_DECL npc_kiljaeden_controllerAI : public Scripted_NoMovementAI, private DialogueHelper +struct npc_kiljaeden_controllerAI : public Scripted_NoMovementAI, private DialogueHelper { npc_kiljaeden_controllerAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature), DialogueHelper(aOutroDialogue) @@ -369,7 +369,7 @@ struct MANGOS_DLL_DECL npc_kiljaeden_controllerAI : public Scripted_NoMovementAI ## boss_kiljaeden ######*/ -struct MANGOS_DLL_DECL boss_kiljaedenAI : public Scripted_NoMovementAI, private DialogueHelper +struct boss_kiljaedenAI : public Scripted_NoMovementAI, private DialogueHelper { boss_kiljaedenAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature), DialogueHelper(aPhaseDialogue) @@ -735,7 +735,7 @@ bool EffectAuraDummy_spell_aura_dummy_darkness_of_souls(const Aura* pAura, bool ## npc_shield_orb ######*/ -struct MANGOS_DLL_DECL npc_shield_orbAI : public ScriptedAI +struct npc_shield_orbAI : public ScriptedAI { npc_shield_orbAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -779,7 +779,7 @@ struct MANGOS_DLL_DECL npc_shield_orbAI : public ScriptedAI ## npc_power_blue_flight ######*/ -struct MANGOS_DLL_DECL npc_power_blue_flightAI : public ScriptedAI +struct npc_power_blue_flightAI : public ScriptedAI { npc_power_blue_flightAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/eastern_kingdoms/sunwell_plateau/boss_muru.cpp b/scripts/eastern_kingdoms/sunwell_plateau/boss_muru.cpp index 73199aee5..f44a73879 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/boss_muru.cpp +++ b/scripts/eastern_kingdoms/sunwell_plateau/boss_muru.cpp @@ -72,7 +72,7 @@ enum ## boss_muru ######*/ -struct MANGOS_DLL_DECL boss_muruAI : public Scripted_NoMovementAI +struct boss_muruAI : public Scripted_NoMovementAI { boss_muruAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { @@ -217,7 +217,7 @@ struct MANGOS_DLL_DECL boss_muruAI : public Scripted_NoMovementAI ## boss_entropius ######*/ -struct MANGOS_DLL_DECL boss_entropiusAI : public ScriptedAI +struct boss_entropiusAI : public ScriptedAI { boss_entropiusAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -319,7 +319,7 @@ struct MANGOS_DLL_DECL boss_entropiusAI : public ScriptedAI ## npc_portal_target ######*/ -struct MANGOS_DLL_DECL npc_portal_targetAI : public Scripted_NoMovementAI +struct npc_portal_targetAI : public Scripted_NoMovementAI { npc_portal_targetAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { @@ -411,7 +411,7 @@ struct MANGOS_DLL_DECL npc_portal_targetAI : public Scripted_NoMovementAI ## npc_void_sentinel_summoner ######*/ -struct MANGOS_DLL_DECL npc_void_sentinel_summonerAI : public Scripted_NoMovementAI +struct npc_void_sentinel_summonerAI : public Scripted_NoMovementAI { npc_void_sentinel_summonerAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { diff --git a/scripts/eastern_kingdoms/sunwell_plateau/sunwell_plateau.h b/scripts/eastern_kingdoms/sunwell_plateau/sunwell_plateau.h index 4f0623160..06d375673 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/sunwell_plateau.h +++ b/scripts/eastern_kingdoms/sunwell_plateau/sunwell_plateau.h @@ -100,7 +100,7 @@ static const EventLocations aKalecLoc[] = {1648.255f, 519.377f, 165.848f}, // fly away }; -class MANGOS_DLL_DECL instance_sunwell_plateau : public ScriptedInstance, private DialogueHelper +class instance_sunwell_plateau : public ScriptedInstance, private DialogueHelper { public: instance_sunwell_plateau(Map* pMap); diff --git a/scripts/eastern_kingdoms/swamp_of_sorrows.cpp b/scripts/eastern_kingdoms/swamp_of_sorrows.cpp index 2aabe5a1e..95217731f 100644 --- a/scripts/eastern_kingdoms/swamp_of_sorrows.cpp +++ b/scripts/eastern_kingdoms/swamp_of_sorrows.cpp @@ -47,7 +47,7 @@ enum Galen EMOTE_DISAPPEAR = -1000588 }; -struct MANGOS_DLL_DECL npc_galen_goodwardAI : public npc_escortAI +struct npc_galen_goodwardAI : public npc_escortAI { npc_galen_goodwardAI(Creature* pCreature) : npc_escortAI(pCreature) { Reset(); } diff --git a/scripts/eastern_kingdoms/tirisfal_glades.cpp b/scripts/eastern_kingdoms/tirisfal_glades.cpp index ee88a9cdf..50c0c9e8d 100644 --- a/scripts/eastern_kingdoms/tirisfal_glades.cpp +++ b/scripts/eastern_kingdoms/tirisfal_glades.cpp @@ -84,7 +84,7 @@ enum FACTION_HOSTILE = 168 }; -struct MANGOS_DLL_DECL npc_calvin_montagueAI : public ScriptedAI +struct npc_calvin_montagueAI : public ScriptedAI { npc_calvin_montagueAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/eastern_kingdoms/uldaman/boss_archaedas.cpp b/scripts/eastern_kingdoms/uldaman/boss_archaedas.cpp index 40c05bd64..873995736 100644 --- a/scripts/eastern_kingdoms/uldaman/boss_archaedas.cpp +++ b/scripts/eastern_kingdoms/uldaman/boss_archaedas.cpp @@ -40,7 +40,7 @@ enum EMOTE_BREAKS_FREE = -1070005, }; -struct MANGOS_DLL_DECL boss_archaedasAI : public ScriptedAI +struct boss_archaedasAI : public ScriptedAI { boss_archaedasAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/eastern_kingdoms/uldaman/uldaman.h b/scripts/eastern_kingdoms/uldaman/uldaman.h index 8250fd1d8..425bcc2f2 100644 --- a/scripts/eastern_kingdoms/uldaman/uldaman.h +++ b/scripts/eastern_kingdoms/uldaman/uldaman.h @@ -32,7 +32,7 @@ enum EVENT_ID_ALTAR_ARCHAEDAS = 2268 // spell 10340 }; -class MANGOS_DLL_DECL instance_uldaman : public ScriptedInstance +class instance_uldaman : public ScriptedInstance { public: instance_uldaman(Map* pMap); diff --git a/scripts/eastern_kingdoms/undercity.cpp b/scripts/eastern_kingdoms/undercity.cpp index 1f469521b..729fe1cbb 100644 --- a/scripts/eastern_kingdoms/undercity.cpp +++ b/scripts/eastern_kingdoms/undercity.cpp @@ -57,7 +57,7 @@ static const float aHighborneLoc[MAX_LAMENTERS][4] = {1292.51f, 310.50f, -61.0f, 1.99f}, }; -struct MANGOS_DLL_DECL npc_lady_sylvanas_windrunnerAI : public ScriptedAI +struct npc_lady_sylvanas_windrunnerAI : public ScriptedAI { npc_lady_sylvanas_windrunnerAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } diff --git a/scripts/eastern_kingdoms/western_plaguelands.cpp b/scripts/eastern_kingdoms/western_plaguelands.cpp index 0d57a3e6f..8abd7b071 100644 --- a/scripts/eastern_kingdoms/western_plaguelands.cpp +++ b/scripts/eastern_kingdoms/western_plaguelands.cpp @@ -36,7 +36,7 @@ EndContentData */ ## npc_the_scourge_cauldron ######*/ -struct MANGOS_DLL_DECL npc_the_scourge_cauldronAI : public ScriptedAI +struct npc_the_scourge_cauldronAI : public ScriptedAI { npc_the_scourge_cauldronAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} @@ -129,7 +129,7 @@ enum QUEST_ID_TOMB_LIGHTBRINGER = 9446, }; -struct MANGOS_DLL_DECL npc_anchorite_truuenAI: public npc_escortAI +struct npc_anchorite_truuenAI: public npc_escortAI { npc_anchorite_truuenAI(Creature* pCreature): npc_escortAI(pCreature) { Reset(); } @@ -343,7 +343,7 @@ static const DialogueEntry aScarletDialogue[] = {0, 0, 0}, }; -struct MANGOS_DLL_DECL npc_taelan_fordringAI: public npc_escortAI, private DialogueHelper +struct npc_taelan_fordringAI: public npc_escortAI, private DialogueHelper { npc_taelan_fordringAI(Creature* pCreature): npc_escortAI(pCreature), DialogueHelper(aScarletDialogue) @@ -773,7 +773,7 @@ bool EffectDummyCreature_npc_taelan_fordring(Unit* pCaster, uint32 uiSpellId, Sp ## npc_isillien ######*/ -struct MANGOS_DLL_DECL npc_isillienAI: public npc_escortAI +struct npc_isillienAI: public npc_escortAI { npc_isillienAI(Creature* pCreature): npc_escortAI(pCreature) { @@ -939,7 +939,7 @@ CreatureAI* GetAI_npc_isillien(Creature* pCreature) ## npc_tirion_fordring ######*/ -struct MANGOS_DLL_DECL npc_tirion_fordringAI: public npc_escortAI +struct npc_tirion_fordringAI: public npc_escortAI { npc_tirion_fordringAI(Creature* pCreature): npc_escortAI(pCreature) { Reset(); } diff --git a/scripts/eastern_kingdoms/westfall.cpp b/scripts/eastern_kingdoms/westfall.cpp index c6ddba5d6..bb5bf2caf 100644 --- a/scripts/eastern_kingdoms/westfall.cpp +++ b/scripts/eastern_kingdoms/westfall.cpp @@ -47,7 +47,7 @@ enum EQUIP_ID_RIFLE = 2511 }; -struct MANGOS_DLL_DECL npc_daphne_stilwellAI : public npc_escortAI +struct npc_daphne_stilwellAI : public npc_escortAI { npc_daphne_stilwellAI(Creature* pCreature) : npc_escortAI(pCreature) { @@ -196,7 +196,7 @@ enum QUEST_DEFIAS_BROTHERHOOD = 155 }; -struct MANGOS_DLL_DECL npc_defias_traitorAI : public npc_escortAI +struct npc_defias_traitorAI : public npc_escortAI { npc_defias_traitorAI(Creature* pCreature) : npc_escortAI(pCreature) { Reset(); } diff --git a/scripts/eastern_kingdoms/wetlands.cpp b/scripts/eastern_kingdoms/wetlands.cpp index fc68394a2..a715c90ba 100644 --- a/scripts/eastern_kingdoms/wetlands.cpp +++ b/scripts/eastern_kingdoms/wetlands.cpp @@ -58,7 +58,7 @@ static const DialogueEntry aDiplomatDialogue[] = {0, 0, 0}, }; -struct MANGOS_DLL_DECL npc_tapoke_slim_jahnAI : public npc_escortAI, private DialogueHelper +struct npc_tapoke_slim_jahnAI : public npc_escortAI, private DialogueHelper { npc_tapoke_slim_jahnAI(Creature* pCreature) : npc_escortAI(pCreature), DialogueHelper(aDiplomatDialogue) diff --git a/scripts/eastern_kingdoms/zulaman/boss_akilzon.cpp b/scripts/eastern_kingdoms/zulaman/boss_akilzon.cpp index 31346bb17..1ca1a83e2 100644 --- a/scripts/eastern_kingdoms/zulaman/boss_akilzon.cpp +++ b/scripts/eastern_kingdoms/zulaman/boss_akilzon.cpp @@ -51,7 +51,7 @@ enum MAX_EAGLE_COUNT = 6, }; -struct MANGOS_DLL_DECL boss_akilzonAI : public ScriptedAI +struct boss_akilzonAI : public ScriptedAI { boss_akilzonAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -207,7 +207,7 @@ CreatureAI* GetAI_boss_akilzon(Creature* pCreature) return new boss_akilzonAI(pCreature); } -struct MANGOS_DLL_DECL mob_soaring_eagleAI : public ScriptedAI +struct mob_soaring_eagleAI : public ScriptedAI { mob_soaring_eagleAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/eastern_kingdoms/zulaman/boss_halazzi.cpp b/scripts/eastern_kingdoms/zulaman/boss_halazzi.cpp index 03f240119..2e0d1b3a0 100644 --- a/scripts/eastern_kingdoms/zulaman/boss_halazzi.cpp +++ b/scripts/eastern_kingdoms/zulaman/boss_halazzi.cpp @@ -75,7 +75,7 @@ enum HalazziPhase PHASE_FINAL = 2 }; -struct MANGOS_DLL_DECL boss_halazziAI : public ScriptedAI +struct boss_halazziAI : public ScriptedAI { boss_halazziAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -302,7 +302,7 @@ enum SPELL_SHRED_ARMOR = 43243 }; -struct MANGOS_DLL_DECL boss_spirit_lynxAI : public ScriptedAI +struct boss_spirit_lynxAI : public ScriptedAI { boss_spirit_lynxAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/eastern_kingdoms/zulaman/boss_janalai.cpp b/scripts/eastern_kingdoms/zulaman/boss_janalai.cpp index 614d38bc6..de3c79a6f 100644 --- a/scripts/eastern_kingdoms/zulaman/boss_janalai.cpp +++ b/scripts/eastern_kingdoms/zulaman/boss_janalai.cpp @@ -105,7 +105,7 @@ static const WaypointDef m_aHatcherLeft[] = { -33.097f, 1195.359f, 18.709f} }; -struct MANGOS_DLL_DECL boss_janalaiAI : public ScriptedAI +struct boss_janalaiAI : public ScriptedAI { boss_janalaiAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -374,7 +374,7 @@ CreatureAI* GetAI_boss_janalaiAI(Creature* pCreature) return new boss_janalaiAI(pCreature); } -struct MANGOS_DLL_DECL npc_amanishi_hatcherAI : public ScriptedAI +struct npc_amanishi_hatcherAI : public ScriptedAI { npc_amanishi_hatcherAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -484,7 +484,7 @@ CreatureAI* GetAI_npc_amanishi_hatcherAI(Creature* pCreature) } // TODO Remove this 'script' when combat can be proper prevented from core-side -struct MANGOS_DLL_DECL npc_dragonhawk_eggAI : public Scripted_NoMovementAI +struct npc_dragonhawk_eggAI : public Scripted_NoMovementAI { npc_dragonhawk_eggAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) {Reset();} @@ -501,7 +501,7 @@ CreatureAI* GetAI_npc_dragonhawk_eggAI(Creature* pCreature) } // TODO Remove this 'script' when combat can be proper prevented from core-side -struct MANGOS_DLL_DECL npc_janalai_firebombAI : public Scripted_NoMovementAI +struct npc_janalai_firebombAI : public Scripted_NoMovementAI { npc_janalai_firebombAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) {Reset();} diff --git a/scripts/eastern_kingdoms/zulaman/boss_malacrass.cpp b/scripts/eastern_kingdoms/zulaman/boss_malacrass.cpp index d47bf2ebc..418e57892 100644 --- a/scripts/eastern_kingdoms/zulaman/boss_malacrass.cpp +++ b/scripts/eastern_kingdoms/zulaman/boss_malacrass.cpp @@ -213,7 +213,7 @@ static PlayerAbilityStruct m_aMalacrassStolenAbility[][4] = } }; -struct MANGOS_DLL_DECL boss_malacrassAI : public ScriptedAI +struct boss_malacrassAI : public ScriptedAI { boss_malacrassAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/eastern_kingdoms/zulaman/boss_nalorakk.cpp b/scripts/eastern_kingdoms/zulaman/boss_nalorakk.cpp index c39834e33..8074cb4e6 100644 --- a/scripts/eastern_kingdoms/zulaman/boss_nalorakk.cpp +++ b/scripts/eastern_kingdoms/zulaman/boss_nalorakk.cpp @@ -52,7 +52,7 @@ enum SPELL_DEAFENING_ROAR = 42398 }; -struct MANGOS_DLL_DECL boss_nalorakkAI : public ScriptedAI +struct boss_nalorakkAI : public ScriptedAI { boss_nalorakkAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/eastern_kingdoms/zulaman/boss_zuljin.cpp b/scripts/eastern_kingdoms/zulaman/boss_zuljin.cpp index 423de997b..be3bc396f 100644 --- a/scripts/eastern_kingdoms/zulaman/boss_zuljin.cpp +++ b/scripts/eastern_kingdoms/zulaman/boss_zuljin.cpp @@ -118,7 +118,7 @@ static const float fZuljinMoveLoc[3] = {120.148811f, 703.713684f, 45.111477f}; ## boss_zuljin ######*/ -struct MANGOS_DLL_DECL boss_zuljinAI : public ScriptedAI +struct boss_zuljinAI : public ScriptedAI { boss_zuljinAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -482,7 +482,7 @@ CreatureAI* GetAI_boss_zuljin(Creature* pCreature) ## npc_feather_vortex ######*/ -struct MANGOS_DLL_DECL npc_feather_vortexAI : public ScriptedAI +struct npc_feather_vortexAI : public ScriptedAI { npc_feather_vortexAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/eastern_kingdoms/zulaman/zulaman.cpp b/scripts/eastern_kingdoms/zulaman/zulaman.cpp index 096edbce1..7efe5cc1b 100644 --- a/scripts/eastern_kingdoms/zulaman/zulaman.cpp +++ b/scripts/eastern_kingdoms/zulaman/zulaman.cpp @@ -40,7 +40,7 @@ enum NPC_FOREST_FROG = 24396 }; -struct MANGOS_DLL_DECL npc_forest_frogAI : public ScriptedAI +struct npc_forest_frogAI : public ScriptedAI { npc_forest_frogAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -123,7 +123,7 @@ enum SPELL_BANGING_THE_GONG = 45225 }; -struct MANGOS_DLL_DECL npc_harrison_jones_zaAI : public npc_escortAI +struct npc_harrison_jones_zaAI : public npc_escortAI { npc_harrison_jones_zaAI(Creature* pCreature) : npc_escortAI(pCreature) { diff --git a/scripts/eastern_kingdoms/zulaman/zulaman.h b/scripts/eastern_kingdoms/zulaman/zulaman.h index 8829959d1..512d919d2 100644 --- a/scripts/eastern_kingdoms/zulaman/zulaman.h +++ b/scripts/eastern_kingdoms/zulaman/zulaman.h @@ -147,7 +147,7 @@ struct NalorakkTrashInfo uint8 uiTrashKilled; }; -class MANGOS_DLL_DECL instance_zulaman : public ScriptedInstance +class instance_zulaman : public ScriptedInstance { public: instance_zulaman(Map* pMap); diff --git a/scripts/eastern_kingdoms/zulgurub/boss_arlokk.cpp b/scripts/eastern_kingdoms/zulgurub/boss_arlokk.cpp index 6e7b28391..d4873531e 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_arlokk.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_arlokk.cpp @@ -41,7 +41,7 @@ enum NPC_ZULIAN_PROWLER = 15101 }; -struct MANGOS_DLL_DECL boss_arlokkAI : public ScriptedAI +struct boss_arlokkAI : public ScriptedAI { boss_arlokkAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/eastern_kingdoms/zulgurub/boss_hakkar.cpp b/scripts/eastern_kingdoms/zulgurub/boss_hakkar.cpp index dbd7c06d4..530399cdf 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_hakkar.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_hakkar.cpp @@ -43,7 +43,7 @@ enum SPELL_ASPECT_OF_ARLOKK = 24690 }; -struct MANGOS_DLL_DECL boss_hakkarAI : public ScriptedAI +struct boss_hakkarAI : public ScriptedAI { boss_hakkarAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/eastern_kingdoms/zulgurub/boss_hazzarah.cpp b/scripts/eastern_kingdoms/zulgurub/boss_hazzarah.cpp index d14fbdebb..f103b11a0 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_hazzarah.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_hazzarah.cpp @@ -33,7 +33,7 @@ enum SPELL_SUMMON_ILLUSION_3 = 24729, }; -struct MANGOS_DLL_DECL boss_hazzarahAI : public ScriptedAI +struct boss_hazzarahAI : public ScriptedAI { boss_hazzarahAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } diff --git a/scripts/eastern_kingdoms/zulgurub/boss_jeklik.cpp b/scripts/eastern_kingdoms/zulgurub/boss_jeklik.cpp index 191b6036c..3d90380d7 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_jeklik.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_jeklik.cpp @@ -62,7 +62,7 @@ enum NPC_BAT_RIDER = 14750, }; -struct MANGOS_DLL_DECL boss_jeklikAI : public ScriptedAI +struct boss_jeklikAI : public ScriptedAI { boss_jeklikAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -303,7 +303,7 @@ struct MANGOS_DLL_DECL boss_jeklikAI : public ScriptedAI } }; -struct MANGOS_DLL_DECL npc_gurubashi_bat_riderAI : public ScriptedAI +struct npc_gurubashi_bat_riderAI : public ScriptedAI { npc_gurubashi_bat_riderAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/eastern_kingdoms/zulgurub/boss_jindo.cpp b/scripts/eastern_kingdoms/zulgurub/boss_jindo.cpp index c77a9ec29..f32d55439 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_jindo.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_jindo.cpp @@ -49,7 +49,7 @@ static const float aPitTeleportLocs[4] = -11583.7783f, -1249.4278f, 77.5471f, 4.745f }; -struct MANGOS_DLL_DECL boss_jindoAI : public ScriptedAI +struct boss_jindoAI : public ScriptedAI { boss_jindoAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -168,7 +168,7 @@ struct MANGOS_DLL_DECL boss_jindoAI : public ScriptedAI }; // HACK script! Should not need to have totems in sd2 -struct MANGOS_DLL_DECL mob_healing_wardAI : public ScriptedAI +struct mob_healing_wardAI : public ScriptedAI { mob_healing_wardAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } diff --git a/scripts/eastern_kingdoms/zulgurub/boss_mandokir.cpp b/scripts/eastern_kingdoms/zulgurub/boss_mandokir.cpp index ddd8dba4c..a5a4e736f 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_mandokir.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_mandokir.cpp @@ -84,7 +84,7 @@ static SpawnLocations aSpirits[] = { -12266.1f, -1940.72f, 132.606f, 0.70910f} }; -struct MANGOS_DLL_DECL boss_mandokirAI : public ScriptedAI +struct boss_mandokirAI : public ScriptedAI { boss_mandokirAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -340,7 +340,7 @@ struct MANGOS_DLL_DECL boss_mandokirAI : public ScriptedAI }; // Ohgan -struct MANGOS_DLL_DECL mob_ohganAI : public ScriptedAI +struct mob_ohganAI : public ScriptedAI { mob_ohganAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } diff --git a/scripts/eastern_kingdoms/zulgurub/boss_marli.cpp b/scripts/eastern_kingdoms/zulgurub/boss_marli.cpp index 4c972cf27..32e59d9fc 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_marli.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_marli.cpp @@ -51,7 +51,7 @@ enum SPELL_HATCH_EGGS = 24083, // note this should only target 4 eggs! }; -struct MANGOS_DLL_DECL boss_marliAI : public ScriptedAI +struct boss_marliAI : public ScriptedAI { boss_marliAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/eastern_kingdoms/zulgurub/boss_renataki.cpp b/scripts/eastern_kingdoms/zulgurub/boss_renataki.cpp index 215ded71a..fcc418da8 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_renataki.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_renataki.cpp @@ -31,7 +31,7 @@ enum SPELL_TRASH = 3391 }; -struct MANGOS_DLL_DECL boss_renatakiAI : public ScriptedAI +struct boss_renatakiAI : public ScriptedAI { boss_renatakiAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } diff --git a/scripts/eastern_kingdoms/zulgurub/boss_thekal.cpp b/scripts/eastern_kingdoms/zulgurub/boss_thekal.cpp index 55102e2d0..5efaf1d81 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_thekal.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_thekal.cpp @@ -59,7 +59,7 @@ enum }; // abstract base class for faking death -struct MANGOS_DLL_DECL boss_thekalBaseAI : public ScriptedAI +struct boss_thekalBaseAI : public ScriptedAI { boss_thekalBaseAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -137,7 +137,7 @@ struct MANGOS_DLL_DECL boss_thekalBaseAI : public ScriptedAI } }; -struct MANGOS_DLL_DECL boss_thekalAI : public boss_thekalBaseAI +struct boss_thekalAI : public boss_thekalBaseAI { boss_thekalAI(Creature* pCreature) : boss_thekalBaseAI(pCreature) { @@ -357,7 +357,7 @@ struct MANGOS_DLL_DECL boss_thekalAI : public boss_thekalBaseAI ## mob_zealot_lorkhan ######*/ -struct MANGOS_DLL_DECL mob_zealot_lorkhanAI : public boss_thekalBaseAI +struct mob_zealot_lorkhanAI : public boss_thekalBaseAI { mob_zealot_lorkhanAI(Creature* pCreature) : boss_thekalBaseAI(pCreature) { @@ -496,7 +496,7 @@ struct MANGOS_DLL_DECL mob_zealot_lorkhanAI : public boss_thekalBaseAI ## npc_zealot_zath ######*/ -struct MANGOS_DLL_DECL mob_zealot_zathAI : public boss_thekalBaseAI +struct mob_zealot_zathAI : public boss_thekalBaseAI { mob_zealot_zathAI(Creature* pCreature) : boss_thekalBaseAI(pCreature) { diff --git a/scripts/eastern_kingdoms/zulgurub/boss_venoxis.cpp b/scripts/eastern_kingdoms/zulgurub/boss_venoxis.cpp index 5c807aa9a..b8407e46b 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_venoxis.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_venoxis.cpp @@ -47,7 +47,7 @@ enum SPELL_TRASH = 3391 }; -struct MANGOS_DLL_DECL boss_venoxisAI : public ScriptedAI +struct boss_venoxisAI : public ScriptedAI { boss_venoxisAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/eastern_kingdoms/zulgurub/zulgurub.h b/scripts/eastern_kingdoms/zulgurub/zulgurub.h index 864b445a2..4d58001a3 100644 --- a/scripts/eastern_kingdoms/zulgurub/zulgurub.h +++ b/scripts/eastern_kingdoms/zulgurub/zulgurub.h @@ -43,7 +43,7 @@ enum static const float aMandokirDownstairsPos[3] = { -12196.30f, -1948.37f, 130.31f}; -class MANGOS_DLL_DECL instance_zulgurub : public ScriptedInstance +class instance_zulgurub : public ScriptedInstance { public: instance_zulgurub(Map* pMap); diff --git a/scripts/examples/example_creature.cpp b/scripts/examples/example_creature.cpp index 853e7a89a..9d1d41fa6 100644 --- a/scripts/examples/example_creature.cpp +++ b/scripts/examples/example_creature.cpp @@ -69,7 +69,7 @@ enum // If (and only if) a gossip must be handled within SD2, then it should be moved to SD2-database! #define GOSSIP_ITEM "I'm looking for a fight" -struct MANGOS_DLL_DECL example_creatureAI : public ScriptedAI +struct example_creatureAI : public ScriptedAI { // *** HANDLED FUNCTION *** // This is the constructor, called only once when the creature is first created diff --git a/scripts/examples/example_escort.cpp b/scripts/examples/example_escort.cpp index 35c509689..e77a291f4 100644 --- a/scripts/examples/example_escort.cpp +++ b/scripts/examples/example_escort.cpp @@ -50,7 +50,7 @@ enum #define GOSSIP_ITEM_2 "Click to Test Escort(NoAttack, Walk)" #define GOSSIP_ITEM_3 "Click to Test Escort(NoAttack, Run)" -struct MANGOS_DLL_DECL example_escortAI : public npc_escortAI +struct example_escortAI : public npc_escortAI { // CreatureAI functions example_escortAI(Creature* pCreature) : npc_escortAI(pCreature) { Reset(); } diff --git a/scripts/kalimdor/ashenvale.cpp b/scripts/kalimdor/ashenvale.cpp index 2c646c4a4..35cc4838a 100644 --- a/scripts/kalimdor/ashenvale.cpp +++ b/scripts/kalimdor/ashenvale.cpp @@ -80,7 +80,7 @@ static float m_afSecondNagaCoord[3][3] = static float m_fVorshaCoord[] = {3633.056885f, 1172.924072f, -5.388f}; -struct MANGOS_DLL_DECL npc_muglashAI : public npc_escortAI +struct npc_muglashAI : public npc_escortAI { npc_muglashAI(Creature* pCreature) : npc_escortAI(pCreature) { @@ -252,7 +252,7 @@ enum NPC_T_PATHFINDER = 3926 }; -struct MANGOS_DLL_DECL npc_ruul_snowhoofAI : public npc_escortAI +struct npc_ruul_snowhoofAI : public npc_escortAI { npc_ruul_snowhoofAI(Creature* pCreature) : npc_escortAI(pCreature) { Reset(); } @@ -326,7 +326,7 @@ enum NPC_SILVERWING_WARRIOR = 12897 }; -struct MANGOS_DLL_DECL npc_torekAI : public npc_escortAI +struct npc_torekAI : public npc_escortAI { npc_torekAI(Creature* pCreature) : npc_escortAI(pCreature) {Reset();} @@ -466,7 +466,7 @@ static const float aEliteSummonPositions[3][4] = {4235.78f, 118.09f, 38.08f, 4.12f} }; -struct MANGOS_DLL_DECL npc_feero_ironhandAI : public npc_escortAI +struct npc_feero_ironhandAI : public npc_escortAI { npc_feero_ironhandAI(Creature* pCreature) : npc_escortAI(pCreature) { diff --git a/scripts/kalimdor/azshara.cpp b/scripts/kalimdor/azshara.cpp index 7ac8113f9..778255659 100644 --- a/scripts/kalimdor/azshara.cpp +++ b/scripts/kalimdor/azshara.cpp @@ -69,7 +69,7 @@ enum #define GOSSIP_ITEM_MOONSTONE "Hand over the Southfury moonstone and I'll let you go." -struct MANGOS_DLL_DECL npc_rizzle_sprysprocketAI : public npc_escortAI +struct npc_rizzle_sprysprocketAI : public npc_escortAI { npc_rizzle_sprysprocketAI(Creature* pCreature) : npc_escortAI(pCreature) { @@ -205,7 +205,7 @@ bool GossipSelect_npc_rizzle_sprysprocket(Player* pPlayer, Creature* /*pCreature return true; } -struct MANGOS_DLL_DECL npc_depth_chargeAI : public ScriptedAI +struct npc_depth_chargeAI : public ScriptedAI { npc_depth_chargeAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } @@ -291,7 +291,7 @@ static SpitelashAbilityStruct m_aSpitelashAbility[8] = {NPC_SPITELASH_MYRMIDON, SPELL_STRIKE, TARGET_TYPE_VICTIM, 3000, 7000} }; -struct MANGOS_DLL_DECL mobs_spitelashesAI : public ScriptedAI +struct mobs_spitelashesAI : public ScriptedAI { mobs_spitelashesAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/kalimdor/azuremyst_isle.cpp b/scripts/kalimdor/azuremyst_isle.cpp index 36d3ba238..6fab7de04 100644 --- a/scripts/kalimdor/azuremyst_isle.cpp +++ b/scripts/kalimdor/azuremyst_isle.cpp @@ -51,7 +51,7 @@ enum SPELL_STUNNED = 28630 }; -struct MANGOS_DLL_DECL npc_draenei_survivorAI : public ScriptedAI +struct npc_draenei_survivorAI : public ScriptedAI { npc_draenei_survivorAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} @@ -193,7 +193,7 @@ enum #define GOSSIP_FIGHT "Traitor! You will be brought to justice!" -struct MANGOS_DLL_DECL npc_engineer_spark_overgrindAI : public ScriptedAI +struct npc_engineer_spark_overgrindAI : public ScriptedAI { npc_engineer_spark_overgrindAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -287,7 +287,7 @@ bool GossipSelect_npc_engineer_spark_overgrind(Player* pPlayer, Creature* pCreat ## npc_injured_draenei ######*/ -struct MANGOS_DLL_DECL npc_injured_draeneiAI : public ScriptedAI +struct npc_injured_draeneiAI : public ScriptedAI { npc_injured_draeneiAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} @@ -328,7 +328,7 @@ enum QUEST_A_CRY_FOR_HELP = 9528 }; -struct MANGOS_DLL_DECL npc_magwinAI : public npc_escortAI +struct npc_magwinAI : public npc_escortAI { npc_magwinAI(Creature* pCreature) : npc_escortAI(pCreature) { Reset(); } diff --git a/scripts/kalimdor/blackfathom_deeps/blackfathom_deeps.h b/scripts/kalimdor/blackfathom_deeps/blackfathom_deeps.h index 74d628bed..f7d1b72b3 100644 --- a/scripts/kalimdor/blackfathom_deeps/blackfathom_deeps.h +++ b/scripts/kalimdor/blackfathom_deeps/blackfathom_deeps.h @@ -85,7 +85,7 @@ static const SummonInformation aWaveSummonInformation[] = {3, NPC_MURKSHALLOW_SOFTSHELL, {{1, 3}, {2, 4}, {2, 5}}} }; -class MANGOS_DLL_DECL instance_blackfathom_deeps : public ScriptedInstance +class instance_blackfathom_deeps : public ScriptedInstance { public: instance_blackfathom_deeps(Map* pMap); diff --git a/scripts/kalimdor/bloodmyst_isle.cpp b/scripts/kalimdor/bloodmyst_isle.cpp index 87ae57809..949252ae0 100644 --- a/scripts/kalimdor/bloodmyst_isle.cpp +++ b/scripts/kalimdor/bloodmyst_isle.cpp @@ -39,7 +39,7 @@ enum // possible creatures to be spawned (too many to be added to enum) const uint32 possibleSpawns[31] = {17322, 17661, 17496, 17522, 17340, 17352, 17333, 17524, 17654, 17348, 17339, 17345, 17359, 17353, 17336, 17550, 17330, 17701, 17321, 17325, 17320, 17683, 17342, 17715, 17334, 17341, 17338, 17337, 17346, 17344, 17327}; -struct MANGOS_DLL_DECL mob_webbed_creatureAI : public Scripted_NoMovementAI +struct mob_webbed_creatureAI : public Scripted_NoMovementAI { mob_webbed_creatureAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { Reset(); } diff --git a/scripts/kalimdor/boss_azuregos.cpp b/scripts/kalimdor/boss_azuregos.cpp index 592746598..c2b5d5733 100644 --- a/scripts/kalimdor/boss_azuregos.cpp +++ b/scripts/kalimdor/boss_azuregos.cpp @@ -38,7 +38,7 @@ enum SPELL_ENRAGE = 23537, }; -struct MANGOS_DLL_DECL boss_azuregosAI : public ScriptedAI +struct boss_azuregosAI : public ScriptedAI { boss_azuregosAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} diff --git a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.h b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.h index 176e16ad4..9741ee5fc 100644 --- a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.h +++ b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.h @@ -114,7 +114,7 @@ enum eInstancePosition POS_INSTANCE_FINISHED = 6 }; -class MANGOS_DLL_DECL instance_culling_of_stratholme : public ScriptedInstance +class instance_culling_of_stratholme : public ScriptedInstance { public: instance_culling_of_stratholme(Map* pMap); diff --git a/scripts/kalimdor/caverns_of_time/dark_portal/boss_aeonus.cpp b/scripts/kalimdor/caverns_of_time/dark_portal/boss_aeonus.cpp index 32340f253..31be7cf67 100644 --- a/scripts/kalimdor/caverns_of_time/dark_portal/boss_aeonus.cpp +++ b/scripts/kalimdor/caverns_of_time/dark_portal/boss_aeonus.cpp @@ -40,7 +40,7 @@ enum SPELL_SAND_BREATH_H = 39049 }; -struct MANGOS_DLL_DECL boss_aeonusAI : public ScriptedAI +struct boss_aeonusAI : public ScriptedAI { boss_aeonusAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/kalimdor/caverns_of_time/dark_portal/boss_chrono_lord_deja.cpp b/scripts/kalimdor/caverns_of_time/dark_portal/boss_chrono_lord_deja.cpp index ccaf2247c..7cab5098c 100644 --- a/scripts/kalimdor/caverns_of_time/dark_portal/boss_chrono_lord_deja.cpp +++ b/scripts/kalimdor/caverns_of_time/dark_portal/boss_chrono_lord_deja.cpp @@ -40,7 +40,7 @@ enum SPELL_ATTRACTION = 38540 }; -struct MANGOS_DLL_DECL boss_chrono_lord_dejaAI : public ScriptedAI +struct boss_chrono_lord_dejaAI : public ScriptedAI { boss_chrono_lord_dejaAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/kalimdor/caverns_of_time/dark_portal/boss_temporus.cpp b/scripts/kalimdor/caverns_of_time/dark_portal/boss_temporus.cpp index 3c607cb2a..55275e981 100644 --- a/scripts/kalimdor/caverns_of_time/dark_portal/boss_temporus.cpp +++ b/scripts/kalimdor/caverns_of_time/dark_portal/boss_temporus.cpp @@ -39,7 +39,7 @@ enum SPELL_REFLECT = 38592 }; -struct MANGOS_DLL_DECL boss_temporusAI : public ScriptedAI +struct boss_temporusAI : public ScriptedAI { boss_temporusAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.cpp b/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.cpp index d71431793..52a7b8e96 100644 --- a/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.cpp +++ b/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.cpp @@ -40,7 +40,7 @@ enum SPELL_CORRUPT = 31326, }; -struct MANGOS_DLL_DECL npc_medivh_black_morassAI : public ScriptedAI +struct npc_medivh_black_morassAI : public ScriptedAI { npc_medivh_black_morassAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -131,7 +131,7 @@ static const RiftWaveData aPortalWaves[] = {{NPC_EXECUTIONER, NPC_VANQUISHER, NPC_CHRONOMANCER, NPC_ASSASSIN}} }; -struct MANGOS_DLL_DECL npc_time_riftAI : public ScriptedAI +struct npc_time_riftAI : public ScriptedAI { npc_time_riftAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.h b/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.h index 49e6d0099..474aa5c5d 100644 --- a/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.h +++ b/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.h @@ -98,7 +98,7 @@ static const float fDarkPortalCrystalLoc[3] = { -2024.31f, 7127.75f, 22.65419f}; static const int32 uiMedivhWeakYell[3] = {SAY_MEDIVH_WEAK75, SAY_MEDIVH_WEAK50, SAY_MEDIVH_WEAK25}; -class MANGOS_DLL_DECL instance_dark_portal : public ScriptedInstance +class instance_dark_portal : public ScriptedInstance { public: instance_dark_portal(Map* pMap); diff --git a/scripts/kalimdor/caverns_of_time/hyjal/boss_archimonde.cpp b/scripts/kalimdor/caverns_of_time/hyjal/boss_archimonde.cpp index 919b94d0a..66219d790 100644 --- a/scripts/kalimdor/caverns_of_time/hyjal/boss_archimonde.cpp +++ b/scripts/kalimdor/caverns_of_time/hyjal/boss_archimonde.cpp @@ -82,7 +82,7 @@ enum randomly select it's target to follow and then we create the random movement making it unpredictable. */ -struct MANGOS_DLL_DECL boss_archimondeAI : public ScriptedAI +struct boss_archimondeAI : public ScriptedAI { boss_archimondeAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -342,7 +342,7 @@ struct MANGOS_DLL_DECL boss_archimondeAI : public ScriptedAI }; /* This is the script for the Doomfire Spirit Mob. This mob controls the doomfire npc and allows it to move randomly around the map. */ -struct MANGOS_DLL_DECL npc_doomfire_spiritAI : public ScriptedAI +struct npc_doomfire_spiritAI : public ScriptedAI { npc_doomfire_spiritAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } diff --git a/scripts/kalimdor/caverns_of_time/hyjal/hyjal.h b/scripts/kalimdor/caverns_of_time/hyjal/hyjal.h index 7871d98d9..53f09edb3 100644 --- a/scripts/kalimdor/caverns_of_time/hyjal/hyjal.h +++ b/scripts/kalimdor/caverns_of_time/hyjal/hyjal.h @@ -52,7 +52,7 @@ enum static const float aArchimondeSpawnLoc[4] = {5581.49f, -3445.63f, 1575.1f, 3.905f}; -class MANGOS_DLL_DECL instance_mount_hyjal : public ScriptedInstance +class instance_mount_hyjal : public ScriptedInstance { public: instance_mount_hyjal(Map* pMap); diff --git a/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.h b/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.h index edfc6d173..c852dbedb 100644 --- a/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.h +++ b/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.h @@ -55,7 +55,7 @@ enum YellType DEATH = 6, // Used on death }; -struct MANGOS_DLL_DECL hyjalAI : public ScriptedAI +struct hyjalAI : public ScriptedAI { hyjalAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.cpp b/scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.cpp index 186d84b80..5dc5d915d 100644 --- a/scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.cpp +++ b/scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.cpp @@ -231,7 +231,7 @@ static const DialogueEntry aThrallDialogue[] = {0, 0, 0}, }; -struct MANGOS_DLL_DECL npc_thrall_old_hillsbradAI : public npc_escortAI, private DialogueHelper +struct npc_thrall_old_hillsbradAI : public npc_escortAI, private DialogueHelper { npc_thrall_old_hillsbradAI(Creature* pCreature) : npc_escortAI(pCreature), DialogueHelper(aThrallDialogue) @@ -1156,7 +1156,7 @@ static const DialogueEntry aTarethaDialogue[] = {0, 0, 0}, }; -struct MANGOS_DLL_DECL npc_tarethaAI : public npc_escortAI, private DialogueHelper +struct npc_tarethaAI : public npc_escortAI, private DialogueHelper { npc_tarethaAI(Creature* pCreature) : npc_escortAI(pCreature), DialogueHelper(aTarethaDialogue) diff --git a/scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.h b/scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.h index 36368beaa..74512c6fd 100644 --- a/scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.h +++ b/scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.h @@ -56,7 +56,7 @@ static const float afInstanceLoc[][4] = static const float aDrakeSummonLoc[4] = {2128.43f, 71.01f, 64.42f, 1.74f}; -class MANGOS_DLL_DECL instance_old_hillsbrad : public ScriptedInstance +class instance_old_hillsbrad : public ScriptedInstance { public: instance_old_hillsbrad(Map* pMap); diff --git a/scripts/kalimdor/darkshore.cpp b/scripts/kalimdor/darkshore.cpp index d2a72d956..d937805f7 100644 --- a/scripts/kalimdor/darkshore.cpp +++ b/scripts/kalimdor/darkshore.cpp @@ -65,7 +65,7 @@ enum }; // TODO: make concept similar as "ringo" -escort. Find a way to run the scripted attacks, _if_ player are choosing road. -struct MANGOS_DLL_DECL npc_kerlonianAI : public FollowerAI +struct npc_kerlonianAI : public FollowerAI { npc_kerlonianAI(Creature* pCreature) : FollowerAI(pCreature) { Reset(); } @@ -207,7 +207,7 @@ enum NPC_GRAVEL_GEO = 2160 }; -struct MANGOS_DLL_DECL npc_prospector_remtravelAI : public npc_escortAI +struct npc_prospector_remtravelAI : public npc_escortAI { npc_prospector_remtravelAI(Creature* pCreature) : npc_escortAI(pCreature) { Reset(); } @@ -322,7 +322,7 @@ enum #define GOSSIP_ITEM_INSERT_KEY "[PH] Insert key" -struct MANGOS_DLL_DECL npc_threshwackonatorAI : public FollowerAI +struct npc_threshwackonatorAI : public FollowerAI { npc_threshwackonatorAI(Creature* pCreature) : FollowerAI(pCreature) { Reset(); } @@ -426,7 +426,7 @@ static const SummonLocation aVolcorSpawnLocs[] = {4711.7f, 109.1f, 53.5f, 2.4f}, }; -struct MANGOS_DLL_DECL npc_volcorAI : public npc_escortAI +struct npc_volcorAI : public npc_escortAI { npc_volcorAI(Creature* pCreature) : npc_escortAI(pCreature) { Reset(); } @@ -561,7 +561,7 @@ enum QUEST_ID_THERYLUNE_ESCAPE = 945, }; -struct MANGOS_DLL_DECL npc_theryluneAI : public npc_escortAI +struct npc_theryluneAI : public npc_escortAI { npc_theryluneAI(Creature* pCreature) : npc_escortAI(pCreature) { Reset(); } @@ -619,7 +619,7 @@ enum SPELL_RABIES = 3150, // Spell used in comabt }; -struct MANGOS_DLL_DECL npc_rabid_bearAI : public ScriptedAI +struct npc_rabid_bearAI : public ScriptedAI { npc_rabid_bearAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/kalimdor/desolace.cpp b/scripts/kalimdor/desolace.cpp index e43c7ee7d..3c3f6f2ce 100644 --- a/scripts/kalimdor/desolace.cpp +++ b/scripts/kalimdor/desolace.cpp @@ -54,7 +54,7 @@ enum SPELL_KODO_KOMBO_GOSSIP = 18362 }; -struct MANGOS_DLL_DECL npc_aged_dying_ancient_kodoAI : public ScriptedAI +struct npc_aged_dying_ancient_kodoAI : public ScriptedAI { npc_aged_dying_ancient_kodoAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } @@ -177,7 +177,7 @@ enum QUEST_RETURN_TO_VAHLARRIEL = 1440, }; -struct MANGOS_DLL_DECL npc_dalinda_malemAI : public npc_escortAI +struct npc_dalinda_malemAI : public npc_escortAI { npc_dalinda_malemAI(Creature* m_creature) : npc_escortAI(m_creature) { Reset(); } @@ -271,7 +271,7 @@ static const SummonLocation aMarauderSpawn[] = static const SummonLocation wranglerSpawn = { -1393.194f, 2429.465f, 88.689f }; -struct MANGOS_DLL_DECL npc_melizza_brimbuzzleAI : public npc_escortAI, private DialogueHelper +struct npc_melizza_brimbuzzleAI : public npc_escortAI, private DialogueHelper { npc_melizza_brimbuzzleAI(Creature* m_creature) : npc_escortAI(m_creature), DialogueHelper(aIntroDialogue) diff --git a/scripts/kalimdor/dire_maul/dire_maul.h b/scripts/kalimdor/dire_maul/dire_maul.h index 967253355..696e61d26 100644 --- a/scripts/kalimdor/dire_maul/dire_maul.h +++ b/scripts/kalimdor/dire_maul/dire_maul.h @@ -84,7 +84,7 @@ enum SPELL_KING_OF_GORDOK = 22799, }; -class MANGOS_DLL_DECL instance_dire_maul : public ScriptedInstance +class instance_dire_maul : public ScriptedInstance { public: instance_dire_maul(Map* pMap); diff --git a/scripts/kalimdor/durotar.cpp b/scripts/kalimdor/durotar.cpp index 90c796ae5..d895b8a54 100644 --- a/scripts/kalimdor/durotar.cpp +++ b/scripts/kalimdor/durotar.cpp @@ -43,7 +43,7 @@ enum GO_LUMBERPILE = 175784, }; -struct MANGOS_DLL_DECL npc_lazy_peonAI : public ScriptedAI +struct npc_lazy_peonAI : public ScriptedAI { npc_lazy_peonAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/kalimdor/dustwallow_marsh.cpp b/scripts/kalimdor/dustwallow_marsh.cpp index 443868daa..889a352f7 100644 --- a/scripts/kalimdor/dustwallow_marsh.cpp +++ b/scripts/kalimdor/dustwallow_marsh.cpp @@ -50,7 +50,7 @@ enum NPC_RISEN_SPIRIT = 23554 }; -struct MANGOS_DLL_DECL mobs_risen_husk_spiritAI : public ScriptedAI +struct mobs_risen_husk_spiritAI : public ScriptedAI { mobs_risen_husk_spiritAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} @@ -138,7 +138,7 @@ enum SAY_RAND_8 = -1000550 }; -struct MANGOS_DLL_DECL npc_restless_apparitionAI : public ScriptedAI +struct npc_restless_apparitionAI : public ScriptedAI { npc_restless_apparitionAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} @@ -195,7 +195,7 @@ enum FACTION_MOR_RUNNING = 35 }; -struct MANGOS_DLL_DECL npc_morokkAI : public npc_escortAI +struct npc_morokkAI : public npc_escortAI { npc_morokkAI(Creature* pCreature) : npc_escortAI(pCreature) { @@ -346,7 +346,7 @@ enum static float m_afSpawn[] = { -3383.501953f, -3203.383301f, 36.149f}; static float m_afMoveTo[] = { -3371.414795f, -3212.179932f, 34.210f}; -struct MANGOS_DLL_DECL npc_ogronAI : public npc_escortAI +struct npc_ogronAI : public npc_escortAI { npc_ogronAI(Creature* pCreature) : npc_escortAI(pCreature) { @@ -623,7 +623,7 @@ enum }; // TODO: develop this further, end event not created -struct MANGOS_DLL_DECL npc_private_hendelAI : public ScriptedAI +struct npc_private_hendelAI : public ScriptedAI { npc_private_hendelAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } @@ -694,7 +694,7 @@ enum GO_BOGBEAN_PLANT = 20939, }; -struct MANGOS_DLL_DECL npc_stinky_ignatzAI : public npc_escortAI +struct npc_stinky_ignatzAI : public npc_escortAI { npc_stinky_ignatzAI(Creature* pCreature) : npc_escortAI(pCreature) { Reset(); } @@ -842,7 +842,7 @@ enum PHASE_SPOUT = 2, }; -struct MANGOS_DLL_DECL boss_tethyrAI : public Scripted_NoMovementAI +struct boss_tethyrAI : public Scripted_NoMovementAI { boss_tethyrAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { diff --git a/scripts/kalimdor/felwood.cpp b/scripts/kalimdor/felwood.cpp index 44bdc1545..568ad1a08 100644 --- a/scripts/kalimdor/felwood.cpp +++ b/scripts/kalimdor/felwood.cpp @@ -52,7 +52,7 @@ enum #define GOSSIP_ITEM_RELEASE "I want to release the corrupted saber to Winna." -struct MANGOS_DLL_DECL npc_kittenAI : public FollowerAI +struct npc_kittenAI : public FollowerAI { npc_kittenAI(Creature* pCreature) : FollowerAI(pCreature) { @@ -181,7 +181,7 @@ enum SAY_NIBY_3 = -1000570 }; -struct MANGOS_DLL_DECL npc_niby_the_almightyAI : public ScriptedAI +struct npc_niby_the_almightyAI : public ScriptedAI { npc_niby_the_almightyAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } @@ -290,7 +290,7 @@ enum FACTION_HOSTILE = 16, }; -struct MANGOS_DLL_DECL npc_kroshiusAI : public ScriptedAI +struct npc_kroshiusAI : public ScriptedAI { npc_kroshiusAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -433,7 +433,7 @@ enum GO_ARKONARIN_CAGE = 176306, }; -struct MANGOS_DLL_DECL npc_captured_arkonarinAI : public npc_escortAI +struct npc_captured_arkonarinAI : public npc_escortAI { npc_captured_arkonarinAI(Creature* pCreature) : npc_escortAI(pCreature) { Reset(); } @@ -627,7 +627,7 @@ static const DialogueEntry aEpilogDialogue[] = {0, 0, 0}, }; -struct MANGOS_DLL_DECL npc_areiAI : public npc_escortAI, private DialogueHelper +struct npc_areiAI : public npc_escortAI, private DialogueHelper { npc_areiAI(Creature* pCreature) : npc_escortAI(pCreature), DialogueHelper(aEpilogDialogue) diff --git a/scripts/kalimdor/feralas.cpp b/scripts/kalimdor/feralas.cpp index 8b146f2db..11b64d361 100644 --- a/scripts/kalimdor/feralas.cpp +++ b/scripts/kalimdor/feralas.cpp @@ -52,7 +52,7 @@ enum QUEST_RESCUE_OOX22FE = 2767 }; -struct MANGOS_DLL_DECL npc_oox22feAI : public npc_escortAI +struct npc_oox22feAI : public npc_escortAI { npc_oox22feAI(Creature* pCreature) : npc_escortAI(pCreature) { Reset(); } @@ -161,7 +161,7 @@ enum QUEST_ID_WANDERING_SHAY = 2845, }; -struct MANGOS_DLL_DECL npc_shay_leafrunnerAI : public FollowerAI +struct npc_shay_leafrunnerAI : public FollowerAI { npc_shay_leafrunnerAI(Creature* pCreature) : FollowerAI(pCreature) { diff --git a/scripts/kalimdor/maraudon/boss_noxxion.cpp b/scripts/kalimdor/maraudon/boss_noxxion.cpp index 37daa714b..3e4606523 100644 --- a/scripts/kalimdor/maraudon/boss_noxxion.cpp +++ b/scripts/kalimdor/maraudon/boss_noxxion.cpp @@ -31,7 +31,7 @@ enum SPELL_NOXXION_SPAWNS_SUMMON = 21707, }; -struct MANGOS_DLL_DECL boss_noxxionAI : public ScriptedAI +struct boss_noxxionAI : public ScriptedAI { boss_noxxionAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} diff --git a/scripts/kalimdor/moonglade.cpp b/scripts/kalimdor/moonglade.cpp index 6bf4a0619..2a9964eed 100644 --- a/scripts/kalimdor/moonglade.cpp +++ b/scripts/kalimdor/moonglade.cpp @@ -52,7 +52,7 @@ enum NPC_ASPECT_OF_RAVEN = 22915, }; -struct MANGOS_DLL_DECL npc_clintar_dw_spiritAI : public npc_escortAI +struct npc_clintar_dw_spiritAI : public npc_escortAI { npc_clintar_dw_spiritAI(Creature* pCreature) : npc_escortAI(pCreature) { Reset(); } @@ -298,7 +298,7 @@ static EventLocations aShadowsLocations[] = {7963.00f, -2492.03f, 487.84f} }; -struct MANGOS_DLL_DECL npc_keeper_remulosAI : public npc_escortAI, private DialogueHelper +struct npc_keeper_remulosAI : public npc_escortAI, private DialogueHelper { npc_keeper_remulosAI(Creature* pCreature) : npc_escortAI(pCreature), DialogueHelper(aIntroDialogue) @@ -635,7 +635,7 @@ enum POINT_ID_TYRANDE_ABSOLUTION = 1, }; -struct MANGOS_DLL_DECL boss_eranikusAI : public ScriptedAI +struct boss_eranikusAI : public ScriptedAI { boss_eranikusAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } diff --git a/scripts/kalimdor/mulgore.cpp b/scripts/kalimdor/mulgore.cpp index e8d881e15..cda59a27d 100644 --- a/scripts/kalimdor/mulgore.cpp +++ b/scripts/kalimdor/mulgore.cpp @@ -43,7 +43,7 @@ enum POINT_ID = 1 }; -struct MANGOS_DLL_DECL npc_kyle_the_frenziedAI : public ScriptedAI +struct npc_kyle_the_frenziedAI : public ScriptedAI { npc_kyle_the_frenziedAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} diff --git a/scripts/kalimdor/onyxias_lair/boss_onyxia.cpp b/scripts/kalimdor/onyxias_lair/boss_onyxia.cpp index b4308048e..4654815ef 100644 --- a/scripts/kalimdor/onyxias_lair/boss_onyxia.cpp +++ b/scripts/kalimdor/onyxias_lair/boss_onyxia.cpp @@ -110,7 +110,7 @@ static const float afSpawnLocations[3][3] = { -126.57f, -214.609f, -71.446f} // guardians }; -struct MANGOS_DLL_DECL boss_onyxiaAI : public ScriptedAI +struct boss_onyxiaAI : public ScriptedAI { boss_onyxiaAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/kalimdor/onyxias_lair/onyxias_lair.h b/scripts/kalimdor/onyxias_lair/onyxias_lair.h index a302abd92..31c4aaf87 100644 --- a/scripts/kalimdor/onyxias_lair/onyxias_lair.h +++ b/scripts/kalimdor/onyxias_lair/onyxias_lair.h @@ -28,7 +28,7 @@ enum ACHIEV_START_ONYXIA_ID = 6601, }; -class MANGOS_DLL_DECL instance_onyxias_lair : public ScriptedInstance +class instance_onyxias_lair : public ScriptedInstance { public: instance_onyxias_lair(Map* pMap); diff --git a/scripts/kalimdor/orgrimmar.cpp b/scripts/kalimdor/orgrimmar.cpp index 17a000a34..f58c44329 100644 --- a/scripts/kalimdor/orgrimmar.cpp +++ b/scripts/kalimdor/orgrimmar.cpp @@ -37,7 +37,7 @@ enum QUEST_SHATTERED_SALUTE = 2460 }; -struct MANGOS_DLL_DECL npc_shenthulAI : public ScriptedAI +struct npc_shenthulAI : public ScriptedAI { npc_shenthulAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } diff --git a/scripts/kalimdor/razorfen_downs/razorfen_downs.cpp b/scripts/kalimdor/razorfen_downs/razorfen_downs.cpp index 7175e0db2..da5f97003 100644 --- a/scripts/kalimdor/razorfen_downs/razorfen_downs.cpp +++ b/scripts/kalimdor/razorfen_downs/razorfen_downs.cpp @@ -72,7 +72,7 @@ static float m_fSpawnerCoord[3][4] = {2570.62f, 942.393f, 53.7433f, 0.71558f} }; -struct MANGOS_DLL_DECL npc_belnistraszAI : public npc_escortAI +struct npc_belnistraszAI : public npc_escortAI { npc_belnistraszAI(Creature* pCreature) : npc_escortAI(pCreature) { diff --git a/scripts/kalimdor/razorfen_kraul/razorfen_kraul.cpp b/scripts/kalimdor/razorfen_kraul/razorfen_kraul.cpp index 27fd62f79..735826bab 100644 --- a/scripts/kalimdor/razorfen_kraul/razorfen_kraul.cpp +++ b/scripts/kalimdor/razorfen_kraul/razorfen_kraul.cpp @@ -63,7 +63,7 @@ static const float aBoarSpawn[4][3] = {1958.971f, 1599.01f, 81.44f} }; -struct MANGOS_DLL_DECL npc_willix_the_importerAI : public npc_escortAI +struct npc_willix_the_importerAI : public npc_escortAI { npc_willix_the_importerAI(Creature* m_creature) : npc_escortAI(m_creature) { Reset(); } @@ -161,7 +161,7 @@ enum GO_BLUELEAF_TUBBER = 20920, }; -struct MANGOS_DLL_DECL npc_snufflenose_gopherAI : public ScriptedPetAI +struct npc_snufflenose_gopherAI : public ScriptedPetAI { npc_snufflenose_gopherAI(Creature* pCreature) : ScriptedPetAI(pCreature) { Reset(); } diff --git a/scripts/kalimdor/razorfen_kraul/razorfen_kraul.h b/scripts/kalimdor/razorfen_kraul/razorfen_kraul.h index 151a0d804..2aa4fca94 100644 --- a/scripts/kalimdor/razorfen_kraul/razorfen_kraul.h +++ b/scripts/kalimdor/razorfen_kraul/razorfen_kraul.h @@ -16,7 +16,7 @@ enum NPC_WARD_KEEPER = 4625 }; -class MANGOS_DLL_DECL instance_razorfen_kraul : public ScriptedInstance +class instance_razorfen_kraul : public ScriptedInstance { public: instance_razorfen_kraul(Map* pMap); diff --git a/scripts/kalimdor/ruins_of_ahnqiraj/boss_ayamiss.cpp b/scripts/kalimdor/ruins_of_ahnqiraj/boss_ayamiss.cpp index 01898bd5c..edfa81910 100644 --- a/scripts/kalimdor/ruins_of_ahnqiraj/boss_ayamiss.cpp +++ b/scripts/kalimdor/ruins_of_ahnqiraj/boss_ayamiss.cpp @@ -60,7 +60,7 @@ static const SummonLocation aAyamissSpawnLocs[] = { -9717.18f, 1517.72f, 27.4677f}, // teleport location - need to be hardcoded because the player is teleported after the larva is summoned }; -struct MANGOS_DLL_DECL boss_ayamissAI : public ScriptedAI +struct boss_ayamissAI : public ScriptedAI { boss_ayamissAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} @@ -256,7 +256,7 @@ CreatureAI* GetAI_boss_ayamiss(Creature* pCreature) return new boss_ayamissAI(pCreature); } -struct MANGOS_DLL_DECL npc_hive_zara_larvaAI : public ScriptedAI +struct npc_hive_zara_larvaAI : public ScriptedAI { npc_hive_zara_larvaAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/kalimdor/ruins_of_ahnqiraj/boss_buru.cpp b/scripts/kalimdor/ruins_of_ahnqiraj/boss_buru.cpp index 6224a0f01..d33089814 100644 --- a/scripts/kalimdor/ruins_of_ahnqiraj/boss_buru.cpp +++ b/scripts/kalimdor/ruins_of_ahnqiraj/boss_buru.cpp @@ -50,7 +50,7 @@ enum PHASE_TRANSFORM = 2, }; -struct MANGOS_DLL_DECL boss_buruAI : public ScriptedAI +struct boss_buruAI : public ScriptedAI { boss_buruAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } @@ -173,7 +173,7 @@ CreatureAI* GetAI_boss_buru(Creature* pCreature) return new boss_buruAI(pCreature); } -struct MANGOS_DLL_DECL npc_buru_eggAI : public Scripted_NoMovementAI +struct npc_buru_eggAI : public Scripted_NoMovementAI { npc_buru_eggAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { diff --git a/scripts/kalimdor/ruins_of_ahnqiraj/boss_kurinnaxx.cpp b/scripts/kalimdor/ruins_of_ahnqiraj/boss_kurinnaxx.cpp index 5ce4ff7cf..01f6ca780 100644 --- a/scripts/kalimdor/ruins_of_ahnqiraj/boss_kurinnaxx.cpp +++ b/scripts/kalimdor/ruins_of_ahnqiraj/boss_kurinnaxx.cpp @@ -35,7 +35,7 @@ enum GO_SAND_TRAP = 180647, }; -struct MANGOS_DLL_DECL boss_kurinnaxxAI : public ScriptedAI +struct boss_kurinnaxxAI : public ScriptedAI { boss_kurinnaxxAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} diff --git a/scripts/kalimdor/ruins_of_ahnqiraj/boss_moam.cpp b/scripts/kalimdor/ruins_of_ahnqiraj/boss_moam.cpp index 466979533..e21cd7b6b 100644 --- a/scripts/kalimdor/ruins_of_ahnqiraj/boss_moam.cpp +++ b/scripts/kalimdor/ruins_of_ahnqiraj/boss_moam.cpp @@ -41,7 +41,7 @@ enum PHASE_ENERGIZING = 1 }; -struct MANGOS_DLL_DECL boss_moamAI : public ScriptedAI +struct boss_moamAI : public ScriptedAI { boss_moamAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} diff --git a/scripts/kalimdor/ruins_of_ahnqiraj/boss_ossirian.cpp b/scripts/kalimdor/ruins_of_ahnqiraj/boss_ossirian.cpp index f09ec5db6..74ceb284e 100644 --- a/scripts/kalimdor/ruins_of_ahnqiraj/boss_ossirian.cpp +++ b/scripts/kalimdor/ruins_of_ahnqiraj/boss_ossirian.cpp @@ -64,7 +64,7 @@ static const float aSandVortexSpawnPos[2][4] = static const float aCrystalSpawnPos[3] = { -9355.75f, 1905.43f, 85.55f}; static const uint32 aWeaknessSpell[] = {SPELL_WEAKNESS_FIRE, SPELL_WEAKNESS_FROST, SPELL_WEAKNESS_NATURE, SPELL_WEAKNESS_ARCANE, SPELL_WEAKNESS_SHADOW}; -struct MANGOS_DLL_DECL boss_ossirianAI : public ScriptedAI +struct boss_ossirianAI : public ScriptedAI { boss_ossirianAI(Creature* pCreature) : ScriptedAI(pCreature) diff --git a/scripts/kalimdor/ruins_of_ahnqiraj/boss_rajaxx.cpp b/scripts/kalimdor/ruins_of_ahnqiraj/boss_rajaxx.cpp index 028dc4f7b..c0170685f 100644 --- a/scripts/kalimdor/ruins_of_ahnqiraj/boss_rajaxx.cpp +++ b/scripts/kalimdor/ruins_of_ahnqiraj/boss_rajaxx.cpp @@ -72,7 +72,7 @@ static const DialogueEntry aIntroDialogue[] = {0, 0, 0}, }; -struct MANGOS_DLL_DECL npc_general_andorovAI : public ScriptedAI, private DialogueHelper +struct npc_general_andorovAI : public ScriptedAI, private DialogueHelper { npc_general_andorovAI(Creature* pCreature) : ScriptedAI(pCreature), DialogueHelper(aIntroDialogue) @@ -296,7 +296,7 @@ bool GossipSelect_npc_general_andorov(Player* pPlayer, Creature* pCreature, uint return true; } -struct MANGOS_DLL_DECL npc_kaldorei_eliteAI : public ScriptedAI +struct npc_kaldorei_eliteAI : public ScriptedAI { npc_kaldorei_eliteAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/kalimdor/ruins_of_ahnqiraj/ruins_of_ahnqiraj.cpp b/scripts/kalimdor/ruins_of_ahnqiraj/ruins_of_ahnqiraj.cpp index 852768e69..654f064dc 100644 --- a/scripts/kalimdor/ruins_of_ahnqiraj/ruins_of_ahnqiraj.cpp +++ b/scripts/kalimdor/ruins_of_ahnqiraj/ruins_of_ahnqiraj.cpp @@ -50,7 +50,7 @@ enum NPC_ANUB_SWARM = 15538 }; -struct MANGOS_DLL_DECL mob_anubisath_guardianAI : public ScriptedAI +struct mob_anubisath_guardianAI : public ScriptedAI { mob_anubisath_guardianAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} diff --git a/scripts/kalimdor/ruins_of_ahnqiraj/ruins_of_ahnqiraj.h b/scripts/kalimdor/ruins_of_ahnqiraj/ruins_of_ahnqiraj.h index dd82d45ab..3bd3019f8 100644 --- a/scripts/kalimdor/ruins_of_ahnqiraj/ruins_of_ahnqiraj.h +++ b/scripts/kalimdor/ruins_of_ahnqiraj/ruins_of_ahnqiraj.h @@ -97,7 +97,7 @@ static const SortingParameters aArmySortingParameters[MAX_ARMY_WAVES] = {NPC_COLONEL_ZERRAN, SAY_WAVE7, 17.0f}, }; -class MANGOS_DLL_DECL instance_ruins_of_ahnqiraj : public ScriptedInstance +class instance_ruins_of_ahnqiraj : public ScriptedInstance { public: instance_ruins_of_ahnqiraj(Map* pMap); diff --git a/scripts/kalimdor/silithus.cpp b/scripts/kalimdor/silithus.cpp index e9b46a249..233572a93 100644 --- a/scripts/kalimdor/silithus.cpp +++ b/scripts/kalimdor/silithus.cpp @@ -215,7 +215,7 @@ static EventLocations aEternalBoardMovement[] = { -8085.748f, 1521.484f, 2.624f} // 10 Anchor point for the army summoning }; -struct MANGOS_DLL_DECL npc_anachronos_the_ancientAI : public ScriptedAI, private DialogueHelper +struct npc_anachronos_the_ancientAI : public ScriptedAI, private DialogueHelper { npc_anachronos_the_ancientAI(Creature* pCreature) : ScriptedAI(pCreature), DialogueHelper(aEventDialogue) diff --git a/scripts/kalimdor/stonetalon_mountains.cpp b/scripts/kalimdor/stonetalon_mountains.cpp index b04dec0c7..65a9bb6f1 100644 --- a/scripts/kalimdor/stonetalon_mountains.cpp +++ b/scripts/kalimdor/stonetalon_mountains.cpp @@ -41,7 +41,7 @@ enum QUEST_PROTECT_KAYA = 6523 }; -struct MANGOS_DLL_DECL npc_kayaAI : public npc_escortAI +struct npc_kayaAI : public npc_escortAI { npc_kayaAI(Creature* pCreature) : npc_escortAI(pCreature) { Reset(); } diff --git a/scripts/kalimdor/tanaris.cpp b/scripts/kalimdor/tanaris.cpp index fbc67df5b..aee49f5d6 100644 --- a/scripts/kalimdor/tanaris.cpp +++ b/scripts/kalimdor/tanaris.cpp @@ -53,7 +53,7 @@ enum FACTION_ELEMENTAL = 91, }; -struct MANGOS_DLL_DECL mob_aquementasAI : public ScriptedAI +struct mob_aquementasAI : public ScriptedAI { mob_aquementasAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } @@ -159,7 +159,7 @@ enum QUEST_ID_CAVERNS_OF_TIME = 10277, }; -struct MANGOS_DLL_DECL npc_custodian_of_timeAI : public npc_escortAI +struct npc_custodian_of_timeAI : public npc_escortAI { npc_custodian_of_timeAI(Creature* pCreature) : npc_escortAI(pCreature) { Reset(); } @@ -241,7 +241,7 @@ enum NPC_SHADOW_MAGE = 5617 }; -struct MANGOS_DLL_DECL npc_oox17tnAI : public npc_escortAI +struct npc_oox17tnAI : public npc_escortAI { npc_oox17tnAI(Creature* pCreature) : npc_escortAI(pCreature) { Reset(); } @@ -402,7 +402,7 @@ enum const float m_afToWaterLoc[] = { -7032.664551f, -4906.199219f, -1.606446f}; -struct MANGOS_DLL_DECL npc_toogaAI : public FollowerAI +struct npc_toogaAI : public FollowerAI { npc_toogaAI(Creature* pCreature) : FollowerAI(pCreature) { Reset(); } diff --git a/scripts/kalimdor/teldrassil.cpp b/scripts/kalimdor/teldrassil.cpp index d52b67481..8b5f9dc76 100644 --- a/scripts/kalimdor/teldrassil.cpp +++ b/scripts/kalimdor/teldrassil.cpp @@ -41,7 +41,7 @@ enum FACTION_DARNASSUS = 79 }; -struct MANGOS_DLL_DECL npc_mistAI : public FollowerAI +struct npc_mistAI : public FollowerAI { npc_mistAI(Creature* pCreature) : FollowerAI(pCreature) { Reset(); } diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_bug_trio.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_bug_trio.cpp index 20499a5e8..60048a8f9 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/boss_bug_trio.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_bug_trio.cpp @@ -43,7 +43,7 @@ enum NPC_YAUJ_BROOD = 15621 }; -struct MANGOS_DLL_DECL boss_kriAI : public ScriptedAI +struct boss_kriAI : public ScriptedAI { boss_kriAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -112,7 +112,7 @@ struct MANGOS_DLL_DECL boss_kriAI : public ScriptedAI } }; -struct MANGOS_DLL_DECL boss_vemAI : public ScriptedAI +struct boss_vemAI : public ScriptedAI { boss_vemAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -189,7 +189,7 @@ struct MANGOS_DLL_DECL boss_vemAI : public ScriptedAI } }; -struct MANGOS_DLL_DECL boss_yaujAI : public ScriptedAI +struct boss_yaujAI : public ScriptedAI { boss_yaujAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_cthun.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_cthun.cpp index 69f0cb916..97a16c7b9 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/boss_cthun.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_cthun.cpp @@ -99,7 +99,7 @@ enum CThunPhase ## boss_eye_of_cthun ######*/ -struct MANGOS_DLL_DECL boss_eye_of_cthunAI : public Scripted_NoMovementAI +struct boss_eye_of_cthunAI : public Scripted_NoMovementAI { boss_eye_of_cthunAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { @@ -327,7 +327,7 @@ struct MANGOS_DLL_DECL boss_eye_of_cthunAI : public Scripted_NoMovementAI ## boss_cthun ######*/ -struct MANGOS_DLL_DECL boss_cthunAI : public Scripted_NoMovementAI +struct boss_cthunAI : public Scripted_NoMovementAI { boss_cthunAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { @@ -674,7 +674,7 @@ struct MANGOS_DLL_DECL boss_cthunAI : public Scripted_NoMovementAI ## npc_giant_claw_tentacle ######*/ -struct MANGOS_DLL_DECL npc_giant_claw_tentacleAI : public Scripted_NoMovementAI +struct npc_giant_claw_tentacleAI : public Scripted_NoMovementAI { npc_giant_claw_tentacleAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_fankriss.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_fankriss.cpp index 3fb9eece4..5b8666eea 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/boss_fankriss.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_fankriss.cpp @@ -47,7 +47,7 @@ enum static const uint32 aSummonWormSpells[3] = {SPELL_SUMMON_WORM_1, SPELL_SUMMON_WORM_2, SPELL_SUMMON_WORM_3}; static const uint32 aEntangleSpells[3] = {SPELL_ENTANGLE_1, SPELL_ENTANGLE_2, SPELL_ENTANGLE_3}; -struct MANGOS_DLL_DECL boss_fankrissAI : public ScriptedAI +struct boss_fankrissAI : public ScriptedAI { boss_fankrissAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_huhuran.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_huhuran.cpp index 80a785268..417d0899b 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/boss_huhuran.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_huhuran.cpp @@ -36,7 +36,7 @@ enum SPELL_ACID_SPIT = 26050 }; -struct MANGOS_DLL_DECL boss_huhuranAI : public ScriptedAI +struct boss_huhuranAI : public ScriptedAI { boss_huhuranAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_ouro.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_ouro.cpp index ab523a7f0..b8bf1b31e 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/boss_ouro.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_ouro.cpp @@ -62,7 +62,7 @@ enum NPC_DIRT_MOUND = 15712, // summoned also by missing spell 26617 }; -struct MANGOS_DLL_DECL boss_ouroAI : public Scripted_NoMovementAI +struct boss_ouroAI : public Scripted_NoMovementAI { boss_ouroAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { @@ -253,7 +253,7 @@ CreatureAI* GetAI_boss_ouro(Creature* pCreature) return new boss_ouroAI(pCreature); } -struct MANGOS_DLL_DECL npc_ouro_spawnerAI : public Scripted_NoMovementAI +struct npc_ouro_spawnerAI : public Scripted_NoMovementAI { npc_ouro_spawnerAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) {Reset();} diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_sartura.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_sartura.cpp index 8f177660a..2a541492b 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/boss_sartura.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_sartura.cpp @@ -39,7 +39,7 @@ enum SPELL_KNOCKBACK = 26027, }; -struct MANGOS_DLL_DECL boss_sarturaAI : public ScriptedAI +struct boss_sarturaAI : public ScriptedAI { boss_sarturaAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -191,7 +191,7 @@ struct MANGOS_DLL_DECL boss_sarturaAI : public ScriptedAI } }; -struct MANGOS_DLL_DECL mob_sartura_royal_guardAI : public ScriptedAI +struct mob_sartura_royal_guardAI : public ScriptedAI { mob_sartura_royal_guardAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_skeram.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_skeram.cpp index 9e54b9d5a..f4aad7e70 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/boss_skeram.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_skeram.cpp @@ -45,7 +45,7 @@ enum SPELL_SUMMON_IMAGES = 747, }; -struct MANGOS_DLL_DECL boss_skeramAI : public ScriptedAI +struct boss_skeramAI : public ScriptedAI { boss_skeramAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_twinemperors.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_twinemperors.cpp index 128f16a0a..777a4266c 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/boss_twinemperors.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_twinemperors.cpp @@ -63,7 +63,7 @@ enum SPELL_BERSERK = 27680, }; -struct MANGOS_DLL_DECL boss_twin_emperorsAI : public ScriptedAI +struct boss_twin_emperorsAI : public ScriptedAI { boss_twin_emperorsAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -196,7 +196,7 @@ struct MANGOS_DLL_DECL boss_twin_emperorsAI : public ScriptedAI } }; -struct MANGOS_DLL_DECL boss_veknilashAI : public boss_twin_emperorsAI +struct boss_veknilashAI : public boss_twin_emperorsAI { boss_veknilashAI(Creature* pCreature) : boss_twin_emperorsAI(pCreature) { Reset(); } @@ -304,7 +304,7 @@ struct MANGOS_DLL_DECL boss_veknilashAI : public boss_twin_emperorsAI } }; -struct MANGOS_DLL_DECL boss_veklorAI : public boss_twin_emperorsAI +struct boss_veklorAI : public boss_twin_emperorsAI { boss_veklorAI(Creature* pCreature) : boss_twin_emperorsAI(pCreature) { Reset(); } diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_viscidus.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_viscidus.cpp index 4604961c9..a5be12399 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/boss_viscidus.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_viscidus.cpp @@ -53,7 +53,7 @@ enum NPC_GLOB_OF_VISCIDUS = 15667 }; -struct MANGOS_DLL_DECL boss_viscidusAI : public ScriptedAI +struct boss_viscidusAI : public ScriptedAI { boss_viscidusAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/kalimdor/temple_of_ahnqiraj/mob_anubisath_sentinel.cpp b/scripts/kalimdor/temple_of_ahnqiraj/mob_anubisath_sentinel.cpp index 3ab92c8bc..2f3578a7b 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/mob_anubisath_sentinel.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/mob_anubisath_sentinel.cpp @@ -42,7 +42,7 @@ enum MAX_BUDDY = 4 }; -struct MANGOS_DLL_DECL npc_anubisath_sentinelAI : public ScriptedAI +struct npc_anubisath_sentinelAI : public ScriptedAI { npc_anubisath_sentinelAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/kalimdor/temple_of_ahnqiraj/temple_of_ahnqiraj.h b/scripts/kalimdor/temple_of_ahnqiraj/temple_of_ahnqiraj.h index fcc4f7aa2..e47749db8 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/temple_of_ahnqiraj.h +++ b/scripts/kalimdor/temple_of_ahnqiraj/temple_of_ahnqiraj.h @@ -67,7 +67,7 @@ enum SPELL_WHISPERINGS_CTHUN_5 = 26259, }; -class MANGOS_DLL_DECL instance_temple_of_ahnqiraj : public ScriptedInstance +class instance_temple_of_ahnqiraj : public ScriptedInstance { public: instance_temple_of_ahnqiraj(Map* pMap); diff --git a/scripts/kalimdor/the_barrens.cpp b/scripts/kalimdor/the_barrens.cpp index b72328f1d..9376e3755 100644 --- a/scripts/kalimdor/the_barrens.cpp +++ b/scripts/kalimdor/the_barrens.cpp @@ -84,7 +84,7 @@ enum AREA_MERCHANT_COAST = 391 }; -struct MANGOS_DLL_DECL npc_giltharesAI : public npc_escortAI +struct npc_giltharesAI : public npc_escortAI { npc_giltharesAI(Creature* pCreature) : npc_escortAI(pCreature) { Reset(); } @@ -173,7 +173,7 @@ enum SPELL_FOLLY = 10137, }; -struct MANGOS_DLL_DECL npc_taskmaster_fizzuleAI : public ScriptedAI +struct npc_taskmaster_fizzuleAI : public ScriptedAI { npc_taskmaster_fizzuleAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } @@ -286,7 +286,7 @@ static const float aAffrayChallengerLoc[8][4] = { -1682.31f, -4329.68f, 2.78f, 0.0f}, // Big Will move loc }; -struct MANGOS_DLL_DECL npc_twiggy_flatheadAI : public ScriptedAI +struct npc_twiggy_flatheadAI : public ScriptedAI { npc_twiggy_flatheadAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } @@ -485,7 +485,7 @@ enum NPC_MERCENARY = 3282 }; -struct MANGOS_DLL_DECL npc_wizzlecranks_shredderAI : public npc_escortAI +struct npc_wizzlecranks_shredderAI : public npc_escortAI { npc_wizzlecranks_shredderAI(Creature* pCreature) : npc_escortAI(pCreature) { diff --git a/scripts/kalimdor/thousand_needles.cpp b/scripts/kalimdor/thousand_needles.cpp index 3ece79670..be8b2167a 100644 --- a/scripts/kalimdor/thousand_needles.cpp +++ b/scripts/kalimdor/thousand_needles.cpp @@ -46,7 +46,7 @@ enum const float m_afGalakLoc[] = { -4867.387695f, -1357.353760f, -48.226f}; -struct MANGOS_DLL_DECL npc_kanatiAI : public npc_escortAI +struct npc_kanatiAI : public npc_escortAI { npc_kanatiAI(Creature* pCreature) : npc_escortAI(pCreature) { Reset(); } @@ -126,7 +126,7 @@ float m_afBanditLoc[6][6] = { -4788.861328f, -1888.007813f, 89.888f} }; -struct MANGOS_DLL_DECL npc_lakota_windsongAI : public npc_escortAI +struct npc_lakota_windsongAI : public npc_escortAI { npc_lakota_windsongAI(Creature* pCreature) : npc_escortAI(pCreature) { Reset(); } @@ -203,7 +203,7 @@ float m_afWyvernLoc[3][3] = { -4985.364f, -952.528f, -5.199f} }; -struct MANGOS_DLL_DECL npc_paoka_swiftmountainAI : public npc_escortAI +struct npc_paoka_swiftmountainAI : public npc_escortAI { npc_paoka_swiftmountainAI(Creature* pCreature) : npc_escortAI(pCreature) { Reset(); } @@ -268,7 +268,7 @@ enum #define GOSSIP_ITEM_QUEST "Please tell me the Phrase.." -struct MANGOS_DLL_DECL npc_plucky_johnsonAI : public ScriptedAI +struct npc_plucky_johnsonAI : public ScriptedAI { npc_plucky_johnsonAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/kalimdor/ungoro_crater.cpp b/scripts/kalimdor/ungoro_crater.cpp index e1206ae37..724e4a5ee 100644 --- a/scripts/kalimdor/ungoro_crater.cpp +++ b/scripts/kalimdor/ungoro_crater.cpp @@ -46,7 +46,7 @@ enum QUEST_CHASING_AME = 4245 }; -struct MANGOS_DLL_DECL npc_ame01AI : public npc_escortAI +struct npc_ame01AI : public npc_escortAI { npc_ame01AI(Creature* pCreature) : npc_escortAI(pCreature) { Reset(); } @@ -147,7 +147,7 @@ enum NPC_SPRAGGLE = 9997 }; -struct MANGOS_DLL_DECL npc_ringoAI : public FollowerAI +struct npc_ringoAI : public FollowerAI { npc_ringoAI(Creature* pCreature) : FollowerAI(pCreature) { Reset(); } diff --git a/scripts/kalimdor/wailing_caverns/wailing_caverns.cpp b/scripts/kalimdor/wailing_caverns/wailing_caverns.cpp index 59211168f..bd505942e 100644 --- a/scripts/kalimdor/wailing_caverns/wailing_caverns.cpp +++ b/scripts/kalimdor/wailing_caverns/wailing_caverns.cpp @@ -75,7 +75,7 @@ static const float aSummonPositions[5][2] = {47.0f, 0.5901f} // Mutanus }; -struct MANGOS_DLL_DECL npc_disciple_of_naralexAI : public npc_escortAI +struct npc_disciple_of_naralexAI : public npc_escortAI { npc_disciple_of_naralexAI(Creature* pCreature) : npc_escortAI(pCreature) { diff --git a/scripts/kalimdor/wailing_caverns/wailing_caverns.h b/scripts/kalimdor/wailing_caverns/wailing_caverns.h index a9d043027..a4f052bd1 100644 --- a/scripts/kalimdor/wailing_caverns/wailing_caverns.h +++ b/scripts/kalimdor/wailing_caverns/wailing_caverns.h @@ -26,7 +26,7 @@ enum QUEST_FORTUNE_AWAITS = 7944, }; -class MANGOS_DLL_DECL instance_wailing_caverns : public ScriptedInstance +class instance_wailing_caverns : public ScriptedInstance { public: instance_wailing_caverns(Map* pMap); diff --git a/scripts/kalimdor/winterspring.cpp b/scripts/kalimdor/winterspring.cpp index 4bfe3ed00..6d16ca85f 100644 --- a/scripts/kalimdor/winterspring.cpp +++ b/scripts/kalimdor/winterspring.cpp @@ -143,7 +143,7 @@ static EventLocations aWingThicketLocations[] = {5514.40f, -4921.16f, 845.49f} // 7 left priestess second move loc }; -struct MANGOS_DLL_DECL npc_ranshallaAI : public npc_escortAI, private DialogueHelper +struct npc_ranshallaAI : public npc_escortAI, private DialogueHelper { npc_ranshallaAI(Creature* pCreature) : npc_escortAI(pCreature), DialogueHelper(aIntroDialogue) diff --git a/scripts/kalimdor/zulfarrak/boss_zumrah.cpp b/scripts/kalimdor/zulfarrak/boss_zumrah.cpp index c3dbda65c..eedb03f37 100644 --- a/scripts/kalimdor/zulfarrak/boss_zumrah.cpp +++ b/scripts/kalimdor/zulfarrak/boss_zumrah.cpp @@ -45,7 +45,7 @@ enum FACTION_HOSTILE = 14, }; -struct MANGOS_DLL_DECL boss_zumrahAI : public ScriptedAI +struct boss_zumrahAI : public ScriptedAI { boss_zumrahAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/kalimdor/zulfarrak/zulfarrak.h b/scripts/kalimdor/zulfarrak/zulfarrak.h index ba3e9bd2c..e017ed147 100644 --- a/scripts/kalimdor/zulfarrak/zulfarrak.h +++ b/scripts/kalimdor/zulfarrak/zulfarrak.h @@ -44,7 +44,7 @@ enum AREATRIGGER_ANTUSUL = 1447, }; -class MANGOS_DLL_DECL instance_zulfarrak : public ScriptedInstance +class instance_zulfarrak : public ScriptedInstance { public: instance_zulfarrak(Map* pMap); diff --git a/scripts/northrend/azjol-nerub/ahnkahet/ahnkahet.h b/scripts/northrend/azjol-nerub/ahnkahet/ahnkahet.h index 19b421363..2cb563e5b 100644 --- a/scripts/northrend/azjol-nerub/ahnkahet/ahnkahet.h +++ b/scripts/northrend/azjol-nerub/ahnkahet/ahnkahet.h @@ -63,7 +63,7 @@ enum static const float aTaldaramLandingLoc[4] = {528.734f, -845.998f, 11.54f, 0.68f}; static const float aJedogaLandingLoc[4] = {375.4977f, -707.3635f, -16.094f, 5.42f}; -class MANGOS_DLL_DECL instance_ahnkahet : public ScriptedInstance +class instance_ahnkahet : public ScriptedInstance { public: instance_ahnkahet(Map* pMap); diff --git a/scripts/northrend/azjol-nerub/ahnkahet/boss_amanitar.cpp b/scripts/northrend/azjol-nerub/ahnkahet/boss_amanitar.cpp index 2bf4be6b4..427b8f232 100644 --- a/scripts/northrend/azjol-nerub/ahnkahet/boss_amanitar.cpp +++ b/scripts/northrend/azjol-nerub/ahnkahet/boss_amanitar.cpp @@ -50,7 +50,7 @@ static const float aMushroomPos[3] = {362.8f, -869.16f, -75.03f}; ## boss_amanitar ######*/ -struct MANGOS_DLL_DECL boss_amanitarAI : public ScriptedAI +struct boss_amanitarAI : public ScriptedAI { boss_amanitarAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -195,7 +195,7 @@ CreatureAI* GetAI_boss_amanitar(Creature* pCreature) ## npc_amanitar_mushroom ######*/ -struct MANGOS_DLL_DECL npc_amanitar_mushroomAI : public Scripted_NoMovementAI +struct npc_amanitar_mushroomAI : public Scripted_NoMovementAI { npc_amanitar_mushroomAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { Reset(); } diff --git a/scripts/northrend/azjol-nerub/ahnkahet/boss_jedoga.cpp b/scripts/northrend/azjol-nerub/ahnkahet/boss_jedoga.cpp index 22fe404b2..5eeb62f4e 100644 --- a/scripts/northrend/azjol-nerub/ahnkahet/boss_jedoga.cpp +++ b/scripts/northrend/azjol-nerub/ahnkahet/boss_jedoga.cpp @@ -83,7 +83,7 @@ static const float aVolunteerPosition[2][3] = ## boss_jedoga ######*/ -struct MANGOS_DLL_DECL boss_jedogaAI : public ScriptedAI +struct boss_jedogaAI : public ScriptedAI { boss_jedogaAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -407,7 +407,7 @@ CreatureAI* GetAI_boss_jedoga(Creature* pCreature) ## npc_twilight_volunteer ######*/ -struct MANGOS_DLL_DECL npc_twilight_volunteerAI : public Scripted_NoMovementAI +struct npc_twilight_volunteerAI : public Scripted_NoMovementAI { npc_twilight_volunteerAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { diff --git a/scripts/northrend/azjol-nerub/ahnkahet/boss_nadox.cpp b/scripts/northrend/azjol-nerub/ahnkahet/boss_nadox.cpp index 1525698aa..d0d6b5d8e 100644 --- a/scripts/northrend/azjol-nerub/ahnkahet/boss_nadox.cpp +++ b/scripts/northrend/azjol-nerub/ahnkahet/boss_nadox.cpp @@ -53,7 +53,7 @@ enum /*###### ## mob_ahnkahat_egg ######*/ -struct MANGOS_DLL_DECL mob_ahnkahar_eggAI : public ScriptedAI +struct mob_ahnkahar_eggAI : public ScriptedAI { mob_ahnkahar_eggAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -107,7 +107,7 @@ CreatureAI* GetAI_mob_ahnkahar_egg(Creature* pCreature) ## boss_nadox ######*/ -struct MANGOS_DLL_DECL boss_nadoxAI : public ScriptedAI +struct boss_nadoxAI : public ScriptedAI { boss_nadoxAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/northrend/azjol-nerub/ahnkahet/boss_taldaram.cpp b/scripts/northrend/azjol-nerub/ahnkahet/boss_taldaram.cpp index 3987ec99a..a1fda47c8 100644 --- a/scripts/northrend/azjol-nerub/ahnkahet/boss_taldaram.cpp +++ b/scripts/northrend/azjol-nerub/ahnkahet/boss_taldaram.cpp @@ -58,7 +58,7 @@ enum ## boss_taldaram ######*/ -struct MANGOS_DLL_DECL boss_taldaramAI : public ScriptedAI +struct boss_taldaramAI : public ScriptedAI { boss_taldaramAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/northrend/azjol-nerub/ahnkahet/boss_volazj.cpp b/scripts/northrend/azjol-nerub/ahnkahet/boss_volazj.cpp index 3e22e5583..c825b7446 100644 --- a/scripts/northrend/azjol-nerub/ahnkahet/boss_volazj.cpp +++ b/scripts/northrend/azjol-nerub/ahnkahet/boss_volazj.cpp @@ -74,7 +74,7 @@ static const uint32 aSpawnVisageSpells[MAX_INSANITY_SPELLS] = {SPELL_SUMMON_VISA ## boss_volazj ######*/ -struct MANGOS_DLL_DECL boss_volazjAI : public ScriptedAI +struct boss_volazjAI : public ScriptedAI { boss_volazjAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/northrend/azjol-nerub/azjol-nerub/azjol-nerub.h b/scripts/northrend/azjol-nerub/azjol-nerub/azjol-nerub.h index 86371e458..96d10e26f 100644 --- a/scripts/northrend/azjol-nerub/azjol-nerub/azjol-nerub.h +++ b/scripts/northrend/azjol-nerub/azjol-nerub/azjol-nerub.h @@ -48,7 +48,7 @@ static const uint32 aWatchers[] = {NPC_GASHRA, NPC_NARJIL, NPC_SILTHIK}; // Used to sort the summont triggers static const int aSortDistance[4] = { -90, 10, 20, 30}; -class MANGOS_DLL_DECL instance_azjol_nerub : public ScriptedInstance +class instance_azjol_nerub : public ScriptedInstance { public: instance_azjol_nerub(Map* pMap); diff --git a/scripts/northrend/azjol-nerub/azjol-nerub/boss_anubarak.cpp b/scripts/northrend/azjol-nerub/azjol-nerub/boss_anubarak.cpp index 0cd8a27ed..44d0daa64 100644 --- a/scripts/northrend/azjol-nerub/azjol-nerub/boss_anubarak.cpp +++ b/scripts/northrend/azjol-nerub/azjol-nerub/boss_anubarak.cpp @@ -75,7 +75,7 @@ enum ## boss_anubarak ######*/ -struct MANGOS_DLL_DECL boss_anubarakAI : public ScriptedAI +struct boss_anubarakAI : public ScriptedAI { boss_anubarakAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -325,7 +325,7 @@ CreatureAI* GetAI_boss_anubarak(Creature* pCreature) ## npc_impale_target ######*/ -struct MANGOS_DLL_DECL npc_impale_targetAI : public Scripted_NoMovementAI +struct npc_impale_targetAI : public Scripted_NoMovementAI { npc_impale_targetAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { diff --git a/scripts/northrend/azjol-nerub/azjol-nerub/boss_hadronox.cpp b/scripts/northrend/azjol-nerub/azjol-nerub/boss_hadronox.cpp index e2ff10056..fa3d6f54a 100644 --- a/scripts/northrend/azjol-nerub/azjol-nerub/boss_hadronox.cpp +++ b/scripts/northrend/azjol-nerub/azjol-nerub/boss_hadronox.cpp @@ -59,7 +59,7 @@ static const uint32 aSpiderEntries[MAX_SPIDERS] = {28924, 28925, 29051, 29062, 2 ## boss_hadronox ######*/ -struct MANGOS_DLL_DECL boss_hadronoxAI : public ScriptedAI +struct boss_hadronoxAI : public ScriptedAI { boss_hadronoxAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/northrend/azjol-nerub/azjol-nerub/boss_krikthir.cpp b/scripts/northrend/azjol-nerub/azjol-nerub/boss_krikthir.cpp index fe2cca1f9..f931fee5c 100644 --- a/scripts/northrend/azjol-nerub/azjol-nerub/boss_krikthir.cpp +++ b/scripts/northrend/azjol-nerub/azjol-nerub/boss_krikthir.cpp @@ -53,7 +53,7 @@ enum ## boss_krikthir ######*/ -struct MANGOS_DLL_DECL boss_krikthirAI : public ScriptedAI +struct boss_krikthirAI : public ScriptedAI { boss_krikthirAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/northrend/borean_tundra.cpp b/scripts/northrend/borean_tundra.cpp index 490638143..f133c80ce 100644 --- a/scripts/northrend/borean_tundra.cpp +++ b/scripts/northrend/borean_tundra.cpp @@ -52,7 +52,7 @@ enum SAY_PHRASE_4 = -1000602 }; -struct MANGOS_DLL_DECL npc_nesingwary_trapperAI : public ScriptedAI +struct npc_nesingwary_trapperAI : public ScriptedAI { npc_nesingwary_trapperAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } @@ -182,7 +182,7 @@ enum POINT_DEST = 1 }; -struct MANGOS_DLL_DECL npc_oil_stained_wolfAI : public ScriptedAI +struct npc_oil_stained_wolfAI : public ScriptedAI { npc_oil_stained_wolfAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } @@ -300,7 +300,7 @@ enum SPELL_CANNON_FIRE = 42445, }; -struct MANGOS_DLL_DECL npc_sinkhole_kill_creditAI : public ScriptedAI +struct npc_sinkhole_kill_creditAI : public ScriptedAI { npc_sinkhole_kill_creditAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } @@ -398,7 +398,7 @@ enum SAY_END_2 = -1000578 }; -struct MANGOS_DLL_DECL npc_lurgglbrAI : public npc_escortAI +struct npc_lurgglbrAI : public npc_escortAI { npc_lurgglbrAI(Creature* pCreature) : npc_escortAI(pCreature) { @@ -625,7 +625,7 @@ enum FACTION_FRIENDLY = 35, }; -struct MANGOS_DLL_DECL npc_nexus_drake_hatchlingAI : public FollowerAI +struct npc_nexus_drake_hatchlingAI : public FollowerAI { npc_nexus_drake_hatchlingAI(Creature* pCreature) : FollowerAI(pCreature) { Reset(); } @@ -858,7 +858,7 @@ enum NPC_FLAMESPITTER = 25582, }; -struct MANGOS_DLL_DECL npc_scourged_flamespitterAI : public ScriptedAI +struct npc_scourged_flamespitterAI : public ScriptedAI { npc_scourged_flamespitterAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } @@ -977,7 +977,7 @@ enum QUEST_ID_GET_ME_OUTA_HERE = 11673, }; -struct MANGOS_DLL_DECL npc_bonker_togglevoltAI : public npc_escortAI +struct npc_bonker_togglevoltAI : public npc_escortAI { npc_bonker_togglevoltAI(Creature* pCreature) : npc_escortAI(pCreature) { Reset(); } diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp index 1d04ace66..038f283b9 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp @@ -120,7 +120,7 @@ static const float aBurrowSpawnPositions[MAX_BURROWS][4] = ## boss_anubarak_trial ######*/ -struct MANGOS_DLL_DECL boss_anubarak_trialAI : public ScriptedAI +struct boss_anubarak_trialAI : public ScriptedAI { boss_anubarak_trialAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -403,7 +403,7 @@ CreatureAI* GetAI_boss_anubarak_trial(Creature* pCreature) ## npc_anubarak_trial_spike ######*/ -struct MANGOS_DLL_DECL npc_anubarak_trial_spikeAI : public ScriptedAI +struct npc_anubarak_trial_spikeAI : public ScriptedAI { npc_anubarak_trial_spikeAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } @@ -531,7 +531,7 @@ bool EffectDummyCreature_spell_dummy_permafrost(Unit* pCaster, uint32 uiSpellId, ## npc_anubarak_trial_frostsphere ######*/ -struct MANGOS_DLL_DECL npc_anubarak_trial_frostsphereAI : public Scripted_NoMovementAI +struct npc_anubarak_trial_frostsphereAI : public Scripted_NoMovementAI { npc_anubarak_trial_frostsphereAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { Reset(); } @@ -601,7 +601,7 @@ CreatureAI* GetAI_npc_anubarak_trial_frostsphere(Creature* pCreature) ######*/ // TODO Remove this 'script' when combat movement can be proper prevented from core-side -struct MANGOS_DLL_DECL npc_nerubian_borrowAI : public Scripted_NoMovementAI +struct npc_nerubian_borrowAI : public Scripted_NoMovementAI { npc_nerubian_borrowAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { Reset(); } diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_jaraxxus.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_jaraxxus.cpp index c48cc5fe3..d57f92406 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_jaraxxus.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_jaraxxus.cpp @@ -57,7 +57,7 @@ enum NPC_NETHER_PORTAL = 34825 }; -struct MANGOS_DLL_DECL boss_jaraxxusAI : public ScriptedAI +struct boss_jaraxxusAI : public ScriptedAI { boss_jaraxxusAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp index 72e363300..1e4248043 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp @@ -40,7 +40,7 @@ enum PHASE_ICEHOWL = 2, }; -struct MANGOS_DLL_DECL npc_beast_combat_stalkerAI : public Scripted_NoMovementAI +struct npc_beast_combat_stalkerAI : public Scripted_NoMovementAI { npc_beast_combat_stalkerAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { @@ -229,7 +229,7 @@ CreatureAI* GetAI_npc_beast_combat_stalker(Creature* pCreature) ## boss_gormok, vehicle driven by 34800 (multiple times) ######*/ -struct MANGOS_DLL_DECL boss_gormokAI : public ScriptedAI +struct boss_gormokAI : public ScriptedAI { boss_gormokAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -267,7 +267,7 @@ CreatureAI* GetAI_boss_gormok(Creature* pCreature) ## boss_acidmaw ######*/ -struct MANGOS_DLL_DECL boss_acidmawAI : public ScriptedAI +struct boss_acidmawAI : public ScriptedAI { boss_acidmawAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -305,7 +305,7 @@ CreatureAI* GetAI_boss_acidmaw(Creature* pCreature) ## boss_dreadscale ######*/ -struct MANGOS_DLL_DECL boss_dreadscaleAI : public ScriptedAI +struct boss_dreadscaleAI : public ScriptedAI { boss_dreadscaleAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -348,7 +348,7 @@ enum EMOTE_MASSIVE_CRASH = -1649039, }; -struct MANGOS_DLL_DECL boss_icehowlAI : public ScriptedAI +struct boss_icehowlAI : public ScriptedAI { boss_icehowlAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp index 516e785d3..df5ab183a 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp @@ -40,7 +40,7 @@ enum ## boss_fjola ######*/ -struct MANGOS_DLL_DECL boss_fjolaAI : public ScriptedAI +struct boss_fjolaAI : public ScriptedAI { boss_fjolaAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} @@ -71,7 +71,7 @@ CreatureAI* GetAI_boss_fjola(Creature* pCreature) ## boss_eydis ######*/ -struct MANGOS_DLL_DECL boss_eydisAI : public ScriptedAI +struct boss_eydisAI : public ScriptedAI { boss_eydisAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp index c2ee85b87..5f66170ec 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp @@ -105,7 +105,7 @@ static const RamseyInfo aRamseyInfo[] = {NPC_RAMSEY_5, GOSSIP_TEXT_ANUB_START, GOSSIP_ITEM_ANUB_START, 0, 0, TYPE_ANUBARAK}, }; -struct MANGOS_DLL_DECL npc_barrett_ramseyAI : public ScriptedAI +struct npc_barrett_ramseyAI : public ScriptedAI { npc_barrett_ramseyAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h index 66244d528..f76f4b670 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h @@ -127,7 +127,7 @@ static const float aMovePositions[][3] = {563.7223f, 131.2344f, 393.9901f}, // Jaraxxus }; -class MANGOS_DLL_DECL instance_trial_of_the_crusader : public ScriptedInstance, private DialogueHelper +class instance_trial_of_the_crusader : public ScriptedInstance, private DialogueHelper { public: instance_trial_of_the_crusader(Map* pMap); diff --git a/scripts/northrend/dalaran.cpp b/scripts/northrend/dalaran.cpp index 269409d35..b9f72b2c1 100644 --- a/scripts/northrend/dalaran.cpp +++ b/scripts/northrend/dalaran.cpp @@ -42,7 +42,7 @@ enum AREA_ID_SILVER_ENCLAVE = 4740 }; -struct MANGOS_DLL_DECL npc_dalaran_guardian_mageAI : public ScriptedAI +struct npc_dalaran_guardian_mageAI : public ScriptedAI { npc_dalaran_guardian_mageAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } diff --git a/scripts/northrend/dragonblight.cpp b/scripts/northrend/dragonblight.cpp index 2c3ce1f50..4d75f0054 100644 --- a/scripts/northrend/dragonblight.cpp +++ b/scripts/northrend/dragonblight.cpp @@ -56,7 +56,7 @@ enum // Probably caused by either a change in a patch (bugfix?) or the powerup has a condition (some // sources suggest this, but without any explanation about what this might be) -struct MANGOS_DLL_DECL npc_destructive_wardAI : public Scripted_NoMovementAI +struct npc_destructive_wardAI : public Scripted_NoMovementAI { npc_destructive_wardAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { diff --git a/scripts/northrend/draktharon_keep/boss_novos.cpp b/scripts/northrend/draktharon_keep/boss_novos.cpp index f0581d31d..6f026118d 100644 --- a/scripts/northrend/draktharon_keep/boss_novos.cpp +++ b/scripts/northrend/draktharon_keep/boss_novos.cpp @@ -80,7 +80,7 @@ enum Phases PHASE_NORMAL = 2, }; -struct MANGOS_DLL_DECL boss_novosAI : public Scripted_NoMovementAI +struct boss_novosAI : public Scripted_NoMovementAI { boss_novosAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { @@ -320,7 +320,7 @@ CreatureAI* GetAI_boss_novos(Creature* pCreature) } // Small helper script to handle summoned adds for Novos -struct MANGOS_DLL_DECL npc_crystal_channel_targetAI : public ScriptedAI +struct npc_crystal_channel_targetAI : public ScriptedAI { npc_crystal_channel_targetAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/northrend/draktharon_keep/boss_tharonja.cpp b/scripts/northrend/draktharon_keep/boss_tharonja.cpp index b2cf4da90..d85fc2619 100644 --- a/scripts/northrend/draktharon_keep/boss_tharonja.cpp +++ b/scripts/northrend/draktharon_keep/boss_tharonja.cpp @@ -73,7 +73,7 @@ enum Phases ## boss_tharonja ######*/ -struct MANGOS_DLL_DECL boss_tharonjaAI : public ScriptedAI +struct boss_tharonjaAI : public ScriptedAI { boss_tharonjaAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/northrend/draktharon_keep/boss_trollgore.cpp b/scripts/northrend/draktharon_keep/boss_trollgore.cpp index df150c9a6..9936cd98f 100644 --- a/scripts/northrend/draktharon_keep/boss_trollgore.cpp +++ b/scripts/northrend/draktharon_keep/boss_trollgore.cpp @@ -53,7 +53,7 @@ enum ## boss_trollgore ######*/ -struct MANGOS_DLL_DECL boss_trollgoreAI : public ScriptedAI +struct boss_trollgoreAI : public ScriptedAI { boss_trollgoreAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/northrend/draktharon_keep/draktharon_keep.h b/scripts/northrend/draktharon_keep/draktharon_keep.h index f1f4ecfec..7a73a489e 100644 --- a/scripts/northrend/draktharon_keep/draktharon_keep.h +++ b/scripts/northrend/draktharon_keep/draktharon_keep.h @@ -52,7 +52,7 @@ struct NovosCrystalInfo bool m_bWasUsed; }; -class MANGOS_DLL_DECL instance_draktharon_keep : public ScriptedInstance +class instance_draktharon_keep : public ScriptedInstance { public: instance_draktharon_keep(Map* pMap); diff --git a/scripts/northrend/grizzly_hills.cpp b/scripts/northrend/grizzly_hills.cpp index 2fca5687d..5863735cb 100644 --- a/scripts/northrend/grizzly_hills.cpp +++ b/scripts/northrend/grizzly_hills.cpp @@ -45,7 +45,7 @@ enum SPELL_GOLEM_CHARGE_CREDIT = 47797, }; -struct MANGOS_DLL_DECL npc_depleted_war_golemAI : public ScriptedPetAI +struct npc_depleted_war_golemAI : public ScriptedPetAI { npc_depleted_war_golemAI(Creature* pCreature) : ScriptedPetAI(pCreature) { Reset(); } @@ -137,7 +137,7 @@ enum GO_FIRE_DOOR = 188480, }; -struct MANGOS_DLL_DECL npc_harrison_jonesAI : public npc_escortAI +struct npc_harrison_jonesAI : public npc_escortAI { npc_harrison_jonesAI(Creature* pCreature) : npc_escortAI(pCreature) { diff --git a/scripts/northrend/gundrak/boss_colossus.cpp b/scripts/northrend/gundrak/boss_colossus.cpp index c00e70ed9..cb7b67c29 100644 --- a/scripts/northrend/gundrak/boss_colossus.cpp +++ b/scripts/northrend/gundrak/boss_colossus.cpp @@ -56,7 +56,7 @@ enum ## boss_drakkari_elemental ######*/ -struct MANGOS_DLL_DECL boss_drakkari_elementalAI : public ScriptedAI +struct boss_drakkari_elementalAI : public ScriptedAI { boss_drakkari_elementalAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -151,7 +151,7 @@ CreatureAI* GetAI_boss_drakkari_elemental(Creature* pCreature) ## boss_drakkari_colossus ######*/ -struct MANGOS_DLL_DECL boss_drakkari_colossusAI : public ScriptedAI +struct boss_drakkari_colossusAI : public ScriptedAI { boss_drakkari_colossusAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -306,7 +306,7 @@ CreatureAI* GetAI_boss_drakkari_colossus(Creature* pCreature) ## npc_living_mojo ######*/ -struct MANGOS_DLL_DECL npc_living_mojoAI : public ScriptedAI +struct npc_living_mojoAI : public ScriptedAI { npc_living_mojoAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/northrend/gundrak/boss_eck.cpp b/scripts/northrend/gundrak/boss_eck.cpp index daa382107..b9b05fcea 100644 --- a/scripts/northrend/gundrak/boss_eck.cpp +++ b/scripts/northrend/gundrak/boss_eck.cpp @@ -38,7 +38,7 @@ enum ## boss_eck ######*/ -struct MANGOS_DLL_DECL boss_eckAI : public ScriptedAI +struct boss_eckAI : public ScriptedAI { boss_eckAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/northrend/gundrak/boss_galdarah.cpp b/scripts/northrend/gundrak/boss_galdarah.cpp index 0c30acf5f..e025a12ed 100644 --- a/scripts/northrend/gundrak/boss_galdarah.cpp +++ b/scripts/northrend/gundrak/boss_galdarah.cpp @@ -65,7 +65,7 @@ enum ## boss_galdarah ######*/ -struct MANGOS_DLL_DECL boss_galdarahAI : public ScriptedAI +struct boss_galdarahAI : public ScriptedAI { boss_galdarahAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/northrend/gundrak/boss_moorabi.cpp b/scripts/northrend/gundrak/boss_moorabi.cpp index 1759dc407..71da96ee5 100644 --- a/scripts/northrend/gundrak/boss_moorabi.cpp +++ b/scripts/northrend/gundrak/boss_moorabi.cpp @@ -54,7 +54,7 @@ enum ## boss_moorabi ######*/ -struct MANGOS_DLL_DECL boss_moorabiAI : public ScriptedAI +struct boss_moorabiAI : public ScriptedAI { boss_moorabiAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/northrend/gundrak/boss_sladran.cpp b/scripts/northrend/gundrak/boss_sladran.cpp index 6c564c9cd..974042415 100644 --- a/scripts/northrend/gundrak/boss_sladran.cpp +++ b/scripts/northrend/gundrak/boss_sladran.cpp @@ -68,7 +68,7 @@ enum ## boss_sladran ######*/ -struct MANGOS_DLL_DECL boss_sladranAI : public ScriptedAI +struct boss_sladranAI : public ScriptedAI { boss_sladranAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/northrend/gundrak/gundrak.h b/scripts/northrend/gundrak/gundrak.h index 48d6e477a..5591a5c8a 100644 --- a/scripts/northrend/gundrak/gundrak.h +++ b/scripts/northrend/gundrak/gundrak.h @@ -70,7 +70,7 @@ enum typedef std::map TypeTimerMap; typedef std::pair TypeTimerPair; -class MANGOS_DLL_DECL instance_gundrak : public ScriptedInstance +class instance_gundrak : public ScriptedInstance { public: instance_gundrak(Map* pMap); diff --git a/scripts/northrend/howling_fjord.cpp b/scripts/northrend/howling_fjord.cpp index 86e97ce21..adf91410b 100644 --- a/scripts/northrend/howling_fjord.cpp +++ b/scripts/northrend/howling_fjord.cpp @@ -53,7 +53,7 @@ enum SAY_VRYKUL_HIDE = -1000641, }; -struct MANGOS_DLL_DECL npc_ancient_male_vrykulAI : public ScriptedAI +struct npc_ancient_male_vrykulAI : public ScriptedAI { npc_ancient_male_vrykulAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } @@ -167,7 +167,7 @@ static float afSummon[] = {838.81f, -4678.06f, -94.182f}; static float afCenter[] = {801.88f, -4721.87f, -96.143f}; // TODO: make prisoners help (unclear if summoned or using npc's from surrounding cages (summon inside small cages?)) -struct MANGOS_DLL_DECL npc_daegarnAI : public ScriptedAI +struct npc_daegarnAI : public ScriptedAI { npc_daegarnAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } @@ -279,7 +279,7 @@ enum FACTION_HOSTILE_SH = 90, // guessed, possibly not correct }; -struct MANGOS_DLL_DECL npc_silvermoon_harryAI : public ScriptedAI +struct npc_silvermoon_harryAI : public ScriptedAI { npc_silvermoon_harryAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } @@ -472,7 +472,7 @@ static const DialogueEntry aLichDialogue[] = {0, 0, 0}, }; -struct MANGOS_DLL_DECL npc_lich_king_villageAI : public ScriptedAI, private DialogueHelper +struct npc_lich_king_villageAI : public ScriptedAI, private DialogueHelper { npc_lich_king_villageAI(Creature* pCreature) : ScriptedAI(pCreature), DialogueHelper(aLichDialogue) @@ -611,7 +611,7 @@ static const DialogueEntry aNifflevarDialogue[] = static const int32 aRandomTextEntries[MAX_CROWD_TEXT_ENTRIES] = { -1000941, -1000942, -1000943, -1000944, -1000945, -1000946, -1000947}; -struct MANGOS_DLL_DECL npc_king_ymironAI : public ScriptedAI, private DialogueHelper +struct npc_king_ymironAI : public ScriptedAI, private DialogueHelper { npc_king_ymironAI(Creature* pCreature) : ScriptedAI(pCreature), DialogueHelper(aNifflevarDialogue) @@ -753,7 +753,7 @@ enum NPC_DARKCLAW_BAT = 23959, }; -struct MANGOS_DLL_DECL npc_firecrackers_bunnyAI : public ScriptedAI +struct npc_firecrackers_bunnyAI : public ScriptedAI { npc_firecrackers_bunnyAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } @@ -866,7 +866,7 @@ enum QUEST_ID_TRIAL_OF_FIRE = 11241, }; -struct MANGOS_DLL_DECL npc_apothecary_hanesAI : public npc_escortAI +struct npc_apothecary_hanesAI : public npc_escortAI { npc_apothecary_hanesAI(Creature* pCreature) : npc_escortAI(pCreature) { Reset(); } diff --git a/scripts/northrend/icecrown.cpp b/scripts/northrend/icecrown.cpp index 441ab3e2d..3d8b1d481 100644 --- a/scripts/northrend/icecrown.cpp +++ b/scripts/northrend/icecrown.cpp @@ -82,7 +82,7 @@ enum QUEST_ID_ASSAULT_BY_GROUND_H = 13301, }; -struct MANGOS_DLL_DECL npc_squad_leaderAI : public npc_escortAI +struct npc_squad_leaderAI : public npc_escortAI { npc_squad_leaderAI(Creature* pCreature) : npc_escortAI(pCreature) { Reset(); } @@ -312,7 +312,7 @@ enum SPELL_HEROIC_STRIKE = 29426, }; -struct MANGOS_DLL_DECL npc_infantryAI : public ScriptedAI +struct npc_infantryAI : public ScriptedAI { npc_infantryAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -437,7 +437,7 @@ enum QUEST_ID_GET_OUT_OF_HERE_H = 13481, }; -struct MANGOS_DLL_DECL npc_father_kamarosAI : public npc_escortAI +struct npc_father_kamarosAI : public npc_escortAI { npc_father_kamarosAI(Creature* pCreature) : npc_escortAI(pCreature) { diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_bronjahm.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_bronjahm.cpp index 1026dd0fd..a7c80c308 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_bronjahm.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_bronjahm.cpp @@ -47,7 +47,7 @@ enum SPELL_FEAR = 68950, }; -struct MANGOS_DLL_DECL boss_bronjahmAI : public ScriptedAI +struct boss_bronjahmAI : public ScriptedAI { boss_bronjahmAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -211,7 +211,7 @@ CreatureAI* GetAI_boss_bronjahm(Creature* pCreature) return new boss_bronjahmAI(pCreature); } -struct MANGOS_DLL_DECL npc_corrupted_soul_fragmentAI : public ScriptedAI +struct npc_corrupted_soul_fragmentAI : public ScriptedAI { npc_corrupted_soul_fragmentAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_devourer_of_souls.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_devourer_of_souls.cpp index d3b30bdc2..a795b52f6 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_devourer_of_souls.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_devourer_of_souls.cpp @@ -82,7 +82,7 @@ static const int aTexts[6][3] = {SAY_MALE_1_DARK_GLARE, SAY_FEMALE_DARK_GLARE, 0} // 5 - glare }; -struct MANGOS_DLL_DECL boss_devourer_of_soulsAI : public ScriptedAI +struct boss_devourer_of_soulsAI : public ScriptedAI { boss_devourer_of_soulsAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/forge_of_souls.h b/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/forge_of_souls.h index 8c0efdd41..586f74ee2 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/forge_of_souls.h +++ b/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/forge_of_souls.h @@ -88,7 +88,7 @@ const sExtroEventNpcLocations aEventEndLocations[18] = {NPC_COLISEUM_CHAMPION_H_M, NPC_COLISEUM_CHAMPION_A_M, 0.8726646f, 0.977384f, 5593.93652f, 2410.875f, 705.9351f, 5642.629f, 2474.331f, 708.6959f} }; -class MANGOS_DLL_DECL instance_forge_of_souls : public ScriptedInstance +class instance_forge_of_souls : public ScriptedInstance { public: instance_forge_of_souls(Map* pMap); diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_forgemaster_garfrost.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_forgemaster_garfrost.cpp index b6e8f6ff3..ec5d89f0a 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_forgemaster_garfrost.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_forgemaster_garfrost.cpp @@ -61,7 +61,7 @@ static const float aGarfrostMoveLocs[2][3] = static const float afOutroNpcSpawnLoc[4] = {695.0146f, -123.7532f, 515.3067f, 4.59f}; -struct MANGOS_DLL_DECL boss_forgemaster_garfrostAI : public ScriptedAI +struct boss_forgemaster_garfrostAI : public ScriptedAI { boss_forgemaster_garfrostAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_krick_and_ick.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_krick_and_ick.cpp index 93aef1d76..e24223ddf 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_krick_and_ick.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_krick_and_ick.cpp @@ -70,7 +70,7 @@ static const float afTyrannusTeleLoc[4] = {841.01f, 196.245f, 573.964f, 4.46f}; ## boss_ick ######*/ -struct MANGOS_DLL_DECL boss_ickAI : public ScriptedAI +struct boss_ickAI : public ScriptedAI { boss_ickAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -289,7 +289,7 @@ CreatureAI* GetAI_boss_ick(Creature* pCreature) ## boss_krick ######*/ -struct MANGOS_DLL_DECL boss_krickAI : public ScriptedAI +struct boss_krickAI : public ScriptedAI { boss_krickAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -360,7 +360,7 @@ CreatureAI* GetAI_boss_krick(Creature* pCreature) ## npc_exploding_orb ######*/ -struct MANGOS_DLL_DECL npc_exploding_orbAI : public Scripted_NoMovementAI +struct npc_exploding_orbAI : public Scripted_NoMovementAI { npc_exploding_orbAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { Reset(); } diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_scourgelord_tyrannus.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_scourgelord_tyrannus.cpp index 6ca22d8df..07941a751 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_scourgelord_tyrannus.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_scourgelord_tyrannus.cpp @@ -58,7 +58,7 @@ static const float afRimefangExitPos[3] = {1248.29f, 145.924f, 733.914f}; ## boss_tyrannus ######*/ -struct MANGOS_DLL_DECL boss_tyrannusAI : public ScriptedAI +struct boss_tyrannusAI : public ScriptedAI { boss_tyrannusAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -207,7 +207,7 @@ CreatureAI* GetAI_boss_tyrannus(Creature* pCreature) ## boss_rimefang_pos ######*/ -struct MANGOS_DLL_DECL boss_rimefang_posAI : public ScriptedAI +struct boss_rimefang_posAI : public ScriptedAI { boss_rimefang_posAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/pit_of_saron.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/pit_of_saron.cpp index 720ecdba2..449e79e60 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/pit_of_saron.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/pit_of_saron.cpp @@ -43,7 +43,7 @@ enum ## npc_ymirjar_deathbringer ######*/ -struct MANGOS_DLL_DECL npc_ymirjar_deathbringerAI : public ScriptedAI +struct npc_ymirjar_deathbringerAI : public ScriptedAI { npc_ymirjar_deathbringerAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } @@ -113,7 +113,7 @@ bool EffectDummyCreature_spell_summon_undead(Unit* /*pCaster*/, uint32 uiSpellId ## npc_collapsing_icicle ######*/ -struct MANGOS_DLL_DECL npc_collapsing_icicleAI : public ScriptedAI +struct npc_collapsing_icicleAI : public ScriptedAI { npc_collapsing_icicleAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/pit_of_saron.h b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/pit_of_saron.h index 3cd959e6d..c0e6d2b67 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/pit_of_saron.h +++ b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/pit_of_saron.h @@ -130,7 +130,7 @@ const EventNpcLocations aEventOutroLocations[] = }; -class MANGOS_DLL_DECL instance_pit_of_saron : public ScriptedInstance, private DialogueHelper +class instance_pit_of_saron : public ScriptedInstance, private DialogueHelper { public: instance_pit_of_saron(Map* pMap); diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/blood_prince_council.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/blood_prince_council.cpp index 1437c8b22..2993ac400 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/blood_prince_council.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/blood_prince_council.cpp @@ -129,7 +129,7 @@ static const float aLanathelFlyPos[3] = {4660.49f, 2769.2f, 430.0f}; ## npc_queen_lanathel_intro ######*/ -struct MANGOS_DLL_DECL npc_queen_lanathel_introAI : public ScriptedAI, private DialogueHelper +struct npc_queen_lanathel_introAI : public ScriptedAI, private DialogueHelper { npc_queen_lanathel_introAI(Creature* pCreature) : ScriptedAI(pCreature), DialogueHelper(aIntroDialogue) @@ -229,7 +229,7 @@ CreatureAI* GetAI_npc_queen_lanathel_intro(Creature* pCreature) ## npc_ball_of_flame ######*/ -struct MANGOS_DLL_DECL npc_ball_of_flameAI : public ScriptedAI +struct npc_ball_of_flameAI : public ScriptedAI { npc_ball_of_flameAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } @@ -281,7 +281,7 @@ CreatureAI* GetAI_npc_ball_of_flame(Creature* pCreature) ## npc_kinetic_bomb ######*/ -struct MANGOS_DLL_DECL npc_kinetic_bombAI : public ScriptedAI +struct npc_kinetic_bombAI : public ScriptedAI { npc_kinetic_bombAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } @@ -322,7 +322,7 @@ CreatureAI* GetAI_npc_kinetic_bomb(Creature* pCreature) ## npc_dark_nucleus ######*/ -struct MANGOS_DLL_DECL npc_dark_nucleusAI : public ScriptedAI +struct npc_dark_nucleusAI : public ScriptedAI { npc_dark_nucleusAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } @@ -383,7 +383,7 @@ CreatureAI* GetAI_npc_dark_nucleus(Creature* pCreature) ## npc_blood_orb_control ######*/ -struct MANGOS_DLL_DECL npc_blood_orb_controlAI : public Scripted_NoMovementAI +struct npc_blood_orb_controlAI : public Scripted_NoMovementAI { npc_blood_orb_controlAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { @@ -475,7 +475,7 @@ CreatureAI* GetAI_npc_blood_orb_control(Creature* pCreature) ## blood_prince_council_base ######*/ -struct MANGOS_DLL_DECL blood_prince_council_baseAI : public ScriptedAI +struct blood_prince_council_baseAI : public ScriptedAI { blood_prince_council_baseAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -602,7 +602,7 @@ struct MANGOS_DLL_DECL blood_prince_council_baseAI : public ScriptedAI ## boss_valanar_icc ######*/ -struct MANGOS_DLL_DECL boss_valanar_iccAI : public blood_prince_council_baseAI +struct boss_valanar_iccAI : public blood_prince_council_baseAI { boss_valanar_iccAI(Creature* pCreature) : blood_prince_council_baseAI(pCreature) { @@ -694,7 +694,7 @@ CreatureAI* GetAI_boss_valanar_icc(Creature* pCreature) ## boss_keleseth_icc ######*/ -struct MANGOS_DLL_DECL boss_keleseth_iccAI : public blood_prince_council_baseAI +struct boss_keleseth_iccAI : public blood_prince_council_baseAI { boss_keleseth_iccAI(Creature* pCreature) : blood_prince_council_baseAI(pCreature) { @@ -783,7 +783,7 @@ CreatureAI* GetAI_boss_keleseth_icc(Creature* pCreature) ## boss_taldaram_icc ######*/ -struct MANGOS_DLL_DECL boss_taldaram_iccAI : public blood_prince_council_baseAI +struct boss_taldaram_iccAI : public blood_prince_council_baseAI { boss_taldaram_iccAI(Creature* pCreature) : blood_prince_council_baseAI(pCreature) { diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_blood_queen_lanathel.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_blood_queen_lanathel.cpp index 8e16a68e1..f22bb457a 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_blood_queen_lanathel.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_blood_queen_lanathel.cpp @@ -76,7 +76,7 @@ static const float aQueenPosition[2][3] = {4595.90f, 2769.31f, 421.83f}, }; -struct MANGOS_DLL_DECL boss_blood_queen_lanathelAI : public ScriptedAI +struct boss_blood_queen_lanathelAI : public ScriptedAI { boss_blood_queen_lanathelAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp index 7083650ad..90c548439 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp @@ -113,7 +113,7 @@ enum static const float fIntroPosition[4] = { -491.30f, 2211.35f, 541.11f, 3.16f}; -struct MANGOS_DLL_DECL boss_deathbringer_saurfangAI : public ScriptedAI +struct boss_deathbringer_saurfangAI : public ScriptedAI { boss_deathbringer_saurfangAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_festergut.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_festergut.cpp index e1cbe2049..db9054bc9 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_festergut.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_festergut.cpp @@ -76,7 +76,7 @@ enum SAY_FESTERGUT_DEATH = -1631091, }; -struct MANGOS_DLL_DECL boss_festergutAI : public ScriptedAI +struct boss_festergutAI : public ScriptedAI { boss_festergutAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lady_deathwhisper.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lady_deathwhisper.cpp index f36a280d5..41b692c36 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lady_deathwhisper.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lady_deathwhisper.cpp @@ -68,7 +68,7 @@ enum static const uint32 aLeftSummonedCultists[3] = {NPC_CULT_ADHERENT, NPC_CULT_FANATIC, NPC_CULT_ADHERENT}; static const uint32 aRightSummonedCultists[3] = {NPC_CULT_FANATIC, NPC_CULT_ADHERENT, NPC_CULT_FANATIC}; -struct MANGOS_DLL_DECL boss_lady_deathwhisperAI : public ScriptedAI +struct boss_lady_deathwhisperAI : public ScriptedAI { boss_lady_deathwhisperAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp index 2112bece9..bd803ea21 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp @@ -63,7 +63,7 @@ enum MAX_CHARGES_HEROIC = 5, }; -struct MANGOS_DLL_DECL boss_lord_marrowgarAI : public ScriptedAI +struct boss_lord_marrowgarAI : public ScriptedAI { boss_lord_marrowgarAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_professor_putricide.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_professor_putricide.cpp index 9777f51b4..40d1d3605 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_professor_putricide.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_professor_putricide.cpp @@ -124,7 +124,7 @@ static const float fPutricidePosition[1][3] = {4356.78f, 3263.51f, 389.40f} // 0 Putricide spawn point }; -struct MANGOS_DLL_DECL boss_professor_putricideAI : public ScriptedAI +struct boss_professor_putricideAI : public ScriptedAI { boss_professor_putricideAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_rotface.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_rotface.cpp index 9fc31bd4e..a3bcd5cd0 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_rotface.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_rotface.cpp @@ -81,7 +81,7 @@ static const uint32 uiMutatedInfections[MAX_MUTATE_INFACTION_STEPS] = SPELL_MUTATED_INFECTION_5 }; -struct MANGOS_DLL_DECL boss_rotfaceAI : public ScriptedAI +struct boss_rotfaceAI : public ScriptedAI { boss_rotfaceAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -192,7 +192,7 @@ CreatureAI* GetAI_boss_rotface(Creature* pCreature) return new boss_rotfaceAI(pCreature); } -struct MANGOS_DLL_DECL mob_little_oozeAI : public ScriptedAI +struct mob_little_oozeAI : public ScriptedAI { mob_little_oozeAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -242,7 +242,7 @@ CreatureAI* GetAI_mob_little_ooze(Creature* pCreature) return new mob_little_oozeAI(pCreature); } -struct MANGOS_DLL_DECL mob_big_oozeAI : public ScriptedAI +struct mob_big_oozeAI : public ScriptedAI { mob_big_oozeAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp index e2b2eef81..e8659d839 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp @@ -137,7 +137,7 @@ static const float SindragosaPosition[10][3] = {4505.00f, 2524.37f, 235.37f}, // 9 Sindragosa west flying point }; -struct MANGOS_DLL_DECL boss_sindragosaAI : public ScriptedAI +struct boss_sindragosaAI : public ScriptedAI { boss_sindragosaAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -461,7 +461,7 @@ CreatureAI* GetAI_boss_sindragosa(Creature* pCreature) return new boss_sindragosaAI(pCreature); } -struct MANGOS_DLL_DECL npc_rimefang_iccAI : public ScriptedAI +struct npc_rimefang_iccAI : public ScriptedAI { npc_rimefang_iccAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -657,7 +657,7 @@ CreatureAI* GetAI_npc_rimefang_icc(Creature* pCreature) } -struct MANGOS_DLL_DECL npc_spinestalker_iccAI : public ScriptedAI +struct npc_spinestalker_iccAI : public ScriptedAI { npc_spinestalker_iccAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -798,7 +798,7 @@ CreatureAI* GetAI_npc_spinestalker_icc(Creature* pCreature) /** * Frost Bomb - npc marking the target of Frost Bomb */ -struct MANGOS_DLL_DECL mob_frost_bombAI : public ScriptedAI +struct mob_frost_bombAI : public ScriptedAI { mob_frost_bombAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_the_lich_king.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_the_lich_king.cpp index 885321397..657b980a7 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_the_lich_king.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_the_lich_king.cpp @@ -235,7 +235,7 @@ static const float fLichKingPosition[11][3] = {494.31f, -2523.08f, 1249.87f}, // 10 center of platform inside Frostmourne }; -struct MANGOS_DLL_DECL boss_the_lich_king_iccAI : public ScriptedAI +struct boss_the_lich_king_iccAI : public ScriptedAI { boss_the_lich_king_iccAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_valithria_dreamwalker.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_valithria_dreamwalker.cpp index 8780c7148..ae6e10360 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_valithria_dreamwalker.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_valithria_dreamwalker.cpp @@ -102,7 +102,7 @@ enum SUMMON_TYPES_NUMBER = 4 }; -struct MANGOS_DLL_DECL boss_valithria_dreamwalkerAI : public ScriptedAI +struct boss_valithria_dreamwalkerAI : public ScriptedAI { boss_valithria_dreamwalkerAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_citadel.h b/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_citadel.h index 727fe4f37..a5037dff1 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_citadel.h +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_citadel.h @@ -202,7 +202,7 @@ enum ACHIEV_CRIT_WAITING_A_LONG_TIME_25H = 13245, }; -class MANGOS_DLL_DECL instance_icecrown_citadel : public ScriptedInstance, private DialogueHelper +class instance_icecrown_citadel : public ScriptedInstance, private DialogueHelper { public: instance_icecrown_citadel(Map* pMap); diff --git a/scripts/northrend/naxxramas/boss_anubrekhan.cpp b/scripts/northrend/naxxramas/boss_anubrekhan.cpp index 8b61168fa..b7ed1106e 100644 --- a/scripts/northrend/naxxramas/boss_anubrekhan.cpp +++ b/scripts/northrend/naxxramas/boss_anubrekhan.cpp @@ -66,7 +66,7 @@ static const DialogueEntry aIntroDialogue[] = static const float aCryptGuardLoc[4] = {3333.5f, -3475.9f, 287.1f, 3.17f}; -struct MANGOS_DLL_DECL boss_anubrekhanAI : public ScriptedAI +struct boss_anubrekhanAI : public ScriptedAI { boss_anubrekhanAI(Creature* pCreature) : ScriptedAI(pCreature), m_introDialogue(aIntroDialogue) diff --git a/scripts/northrend/naxxramas/boss_faerlina.cpp b/scripts/northrend/naxxramas/boss_faerlina.cpp index 658e08f67..c545882d4 100644 --- a/scripts/northrend/naxxramas/boss_faerlina.cpp +++ b/scripts/northrend/naxxramas/boss_faerlina.cpp @@ -49,7 +49,7 @@ enum SPELL_WIDOWS_EMBRACE_H = 54097, }; -struct MANGOS_DLL_DECL boss_faerlinaAI : public ScriptedAI +struct boss_faerlinaAI : public ScriptedAI { boss_faerlinaAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/northrend/naxxramas/boss_four_horsemen.cpp b/scripts/northrend/naxxramas/boss_four_horsemen.cpp index f81a28f23..506c00149 100644 --- a/scripts/northrend/naxxramas/boss_four_horsemen.cpp +++ b/scripts/northrend/naxxramas/boss_four_horsemen.cpp @@ -104,7 +104,7 @@ static const float aHorseMenMoveCoords[4][3] = {2517.8f, -2896.6f, 241.28f}, // sir zeliek }; -struct MANGOS_DLL_DECL boss_lady_blaumeuxAI : public ScriptedAI +struct boss_lady_blaumeuxAI : public ScriptedAI { boss_lady_blaumeuxAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -226,7 +226,7 @@ CreatureAI* GetAI_boss_lady_blaumeux(Creature* pCreature) return new boss_lady_blaumeuxAI(pCreature); } -struct MANGOS_DLL_DECL boss_rivendare_naxxAI : public ScriptedAI +struct boss_rivendare_naxxAI : public ScriptedAI { boss_rivendare_naxxAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -338,7 +338,7 @@ CreatureAI* GetAI_boss_rivendare_naxx(Creature* pCreature) return new boss_rivendare_naxxAI(pCreature); } -struct MANGOS_DLL_DECL boss_thane_korthazzAI : public ScriptedAI +struct boss_thane_korthazzAI : public ScriptedAI { boss_thane_korthazzAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -445,7 +445,7 @@ CreatureAI* GetAI_boss_thane_korthazz(Creature* pCreature) return new boss_thane_korthazzAI(pCreature); } -struct MANGOS_DLL_DECL boss_sir_zeliekAI : public ScriptedAI +struct boss_sir_zeliekAI : public ScriptedAI { boss_sir_zeliekAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/northrend/naxxramas/boss_gluth.cpp b/scripts/northrend/naxxramas/boss_gluth.cpp index ba6e0e86a..83abeacde 100644 --- a/scripts/northrend/naxxramas/boss_gluth.cpp +++ b/scripts/northrend/naxxramas/boss_gluth.cpp @@ -53,7 +53,7 @@ static const float aZombieSummonLoc[MAX_ZOMBIE_LOCATIONS][3] = {3308.3f, -3185.8f, 297.42f}, }; -struct MANGOS_DLL_DECL boss_gluthAI : public ScriptedAI +struct boss_gluthAI : public ScriptedAI { boss_gluthAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/northrend/naxxramas/boss_gothik.cpp b/scripts/northrend/naxxramas/boss_gothik.cpp index 55b6263ec..7bc7b632a 100644 --- a/scripts/northrend/naxxramas/boss_gothik.cpp +++ b/scripts/northrend/naxxramas/boss_gothik.cpp @@ -68,7 +68,7 @@ enum eSpellDummy SPELL_C_TO_SKULL = 27937 }; -struct MANGOS_DLL_DECL boss_gothikAI : public ScriptedAI +struct boss_gothikAI : public ScriptedAI { boss_gothikAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/northrend/naxxramas/boss_grobbulus.cpp b/scripts/northrend/naxxramas/boss_grobbulus.cpp index 9d34f490e..64014eae6 100644 --- a/scripts/northrend/naxxramas/boss_grobbulus.cpp +++ b/scripts/northrend/naxxramas/boss_grobbulus.cpp @@ -45,7 +45,7 @@ enum NPC_FALLOUT_SLIME = 16290 }; -struct MANGOS_DLL_DECL boss_grobbulusAI : public ScriptedAI +struct boss_grobbulusAI : public ScriptedAI { boss_grobbulusAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/northrend/naxxramas/boss_heigan.cpp b/scripts/northrend/naxxramas/boss_heigan.cpp index 43269820d..dfbaec161 100644 --- a/scripts/northrend/naxxramas/boss_heigan.cpp +++ b/scripts/northrend/naxxramas/boss_heigan.cpp @@ -50,7 +50,7 @@ enum SPELL_PLAGUE_CLOUD = 29350 }; -struct MANGOS_DLL_DECL boss_heiganAI : public ScriptedAI +struct boss_heiganAI : public ScriptedAI { boss_heiganAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/northrend/naxxramas/boss_kelthuzad.cpp b/scripts/northrend/naxxramas/boss_kelthuzad.cpp index 85b66d5ed..ba7e0cbee 100644 --- a/scripts/northrend/naxxramas/boss_kelthuzad.cpp +++ b/scripts/northrend/naxxramas/boss_kelthuzad.cpp @@ -88,7 +88,7 @@ enum Phase PHASE_GUARDIANS, }; -struct MANGOS_DLL_DECL boss_kelthuzadAI : public ScriptedAI +struct boss_kelthuzadAI : public ScriptedAI { boss_kelthuzadAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/northrend/naxxramas/boss_loatheb.cpp b/scripts/northrend/naxxramas/boss_loatheb.cpp index 7c8acc130..a4b178e07 100644 --- a/scripts/northrend/naxxramas/boss_loatheb.cpp +++ b/scripts/northrend/naxxramas/boss_loatheb.cpp @@ -41,7 +41,7 @@ enum NPC_SPORE = 16286 }; -struct MANGOS_DLL_DECL boss_loathebAI : public ScriptedAI +struct boss_loathebAI : public ScriptedAI { boss_loathebAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/northrend/naxxramas/boss_maexxna.cpp b/scripts/northrend/naxxramas/boss_maexxna.cpp index 8a78590ba..5f4d6ced2 100644 --- a/scripts/northrend/naxxramas/boss_maexxna.cpp +++ b/scripts/northrend/naxxramas/boss_maexxna.cpp @@ -64,7 +64,7 @@ static const float aWebWrapLoc[MAX_WEB_WRAP_POSITIONS][3] = {3497.067f, -3843.384f, 302.384f} }; -struct MANGOS_DLL_DECL npc_web_wrapAI : public ScriptedAI +struct npc_web_wrapAI : public ScriptedAI { npc_web_wrapAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } @@ -140,7 +140,7 @@ struct MANGOS_DLL_DECL npc_web_wrapAI : public ScriptedAI } }; -struct MANGOS_DLL_DECL boss_maexxnaAI : public ScriptedAI +struct boss_maexxnaAI : public ScriptedAI { boss_maexxnaAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/northrend/naxxramas/boss_noth.cpp b/scripts/northrend/naxxramas/boss_noth.cpp index f048c9e0c..ca76b9d1a 100644 --- a/scripts/northrend/naxxramas/boss_noth.cpp +++ b/scripts/northrend/naxxramas/boss_noth.cpp @@ -84,7 +84,7 @@ enum PHASE_SKELETON_3 = 3 }; -struct MANGOS_DLL_DECL boss_nothAI : public ScriptedAI +struct boss_nothAI : public ScriptedAI { boss_nothAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/northrend/naxxramas/boss_patchwerk.cpp b/scripts/northrend/naxxramas/boss_patchwerk.cpp index 04382e489..89a11dc5f 100644 --- a/scripts/northrend/naxxramas/boss_patchwerk.cpp +++ b/scripts/northrend/naxxramas/boss_patchwerk.cpp @@ -41,7 +41,7 @@ enum SPELL_SLIMEBOLT = 32309 }; -struct MANGOS_DLL_DECL boss_patchwerkAI : public ScriptedAI +struct boss_patchwerkAI : public ScriptedAI { boss_patchwerkAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/northrend/naxxramas/boss_razuvious.cpp b/scripts/northrend/naxxramas/boss_razuvious.cpp index 8cc2c7484..3cdb94ebf 100644 --- a/scripts/northrend/naxxramas/boss_razuvious.cpp +++ b/scripts/northrend/naxxramas/boss_razuvious.cpp @@ -44,7 +44,7 @@ enum SPELL_HOPELESS = 29125 }; -struct MANGOS_DLL_DECL boss_razuviousAI : public ScriptedAI +struct boss_razuviousAI : public ScriptedAI { boss_razuviousAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/northrend/naxxramas/boss_sapphiron.cpp b/scripts/northrend/naxxramas/boss_sapphiron.cpp index 2f53da49b..428cd0430 100644 --- a/scripts/northrend/naxxramas/boss_sapphiron.cpp +++ b/scripts/northrend/naxxramas/boss_sapphiron.cpp @@ -75,7 +75,7 @@ enum Phases PHASE_LANDING = 5, }; -struct MANGOS_DLL_DECL boss_sapphironAI : public ScriptedAI +struct boss_sapphironAI : public ScriptedAI { boss_sapphironAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/northrend/naxxramas/boss_thaddius.cpp b/scripts/northrend/naxxramas/boss_thaddius.cpp index d2604cdca..612bab2cd 100644 --- a/scripts/northrend/naxxramas/boss_thaddius.cpp +++ b/scripts/northrend/naxxramas/boss_thaddius.cpp @@ -94,7 +94,7 @@ enum ************/ // Actually this boss behaves like a NoMovement Boss (SPELL_BALL_LIGHTNING) - but there are some movement packages used, unknown what this means! -struct MANGOS_DLL_DECL boss_thaddiusAI : public Scripted_NoMovementAI +struct boss_thaddiusAI : public Scripted_NoMovementAI { boss_thaddiusAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { @@ -279,7 +279,7 @@ bool EffectDummyNPC_spell_thaddius_encounter(Unit* /*pCaster*/, uint32 uiSpellId ** npc_tesla_coil ************/ -struct MANGOS_DLL_DECL npc_tesla_coilAI : public Scripted_NoMovementAI +struct npc_tesla_coilAI : public Scripted_NoMovementAI { npc_tesla_coilAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { @@ -411,7 +411,7 @@ CreatureAI* GetAI_npc_tesla_coil(Creature* pCreature) ** boss_thaddiusAddsAI - Superclass for Feugen & Stalagg ************/ -struct MANGOS_DLL_DECL boss_thaddiusAddsAI : public ScriptedAI +struct boss_thaddiusAddsAI : public ScriptedAI { boss_thaddiusAddsAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -642,7 +642,7 @@ struct MANGOS_DLL_DECL boss_thaddiusAddsAI : public ScriptedAI ** boss_stalagg ************/ -struct MANGOS_DLL_DECL boss_stalaggAI : public boss_thaddiusAddsAI +struct boss_stalaggAI : public boss_thaddiusAddsAI { boss_stalaggAI(Creature* pCreature) : boss_thaddiusAddsAI(pCreature) { @@ -694,7 +694,7 @@ CreatureAI* GetAI_boss_stalagg(Creature* pCreature) ** boss_feugen ************/ -struct MANGOS_DLL_DECL boss_feugenAI : public boss_thaddiusAddsAI +struct boss_feugenAI : public boss_thaddiusAddsAI { boss_feugenAI(Creature* pCreature) : boss_thaddiusAddsAI(pCreature) { diff --git a/scripts/northrend/naxxramas/naxxramas.h b/scripts/northrend/naxxramas/naxxramas.h index 455e666ff..3567fe1ed 100644 --- a/scripts/northrend/naxxramas/naxxramas.h +++ b/scripts/northrend/naxxramas/naxxramas.h @@ -207,7 +207,7 @@ struct GothTrigger static const float aSapphPositions[4] = {3521.48f, -5234.87f, 137.626f, 4.53329f}; -class MANGOS_DLL_DECL instance_naxxramas : public ScriptedInstance +class instance_naxxramas : public ScriptedInstance { public: instance_naxxramas(Map* pMap); diff --git a/scripts/northrend/nexus/eye_of_eternity/boss_malygos.cpp b/scripts/northrend/nexus/eye_of_eternity/boss_malygos.cpp index 3124fe1e4..eeda9f14a 100644 --- a/scripts/northrend/nexus/eye_of_eternity/boss_malygos.cpp +++ b/scripts/northrend/nexus/eye_of_eternity/boss_malygos.cpp @@ -156,7 +156,7 @@ static const float aAlextraszaMovePos[3] = {726.754f, 1307.259f, 282.679f}; ## boss_malygos ######*/ -struct MANGOS_DLL_DECL boss_malygosAI : public ScriptedAI, private DialogueHelper +struct boss_malygosAI : public ScriptedAI, private DialogueHelper { boss_malygosAI(Creature* pCreature) : ScriptedAI(pCreature), DialogueHelper(aIntroDialogue) @@ -572,7 +572,7 @@ CreatureAI* GetAI_boss_malygos(Creature* pCreature) ## npc_power_spark ######*/ -struct MANGOS_DLL_DECL npc_power_sparkAI : public ScriptedAI +struct npc_power_sparkAI : public ScriptedAI { npc_power_sparkAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } @@ -609,7 +609,7 @@ CreatureAI* GetAI_npc_power_spark(Creature* pCreature) ## npc_wyrmrest_skytalon ######*/ -struct MANGOS_DLL_DECL npc_wyrmrest_skytalonAI : public ScriptedAI +struct npc_wyrmrest_skytalonAI : public ScriptedAI { npc_wyrmrest_skytalonAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/northrend/nexus/eye_of_eternity/eye_of_eternity.h b/scripts/northrend/nexus/eye_of_eternity/eye_of_eternity.h index 361045f59..9b1b012d1 100644 --- a/scripts/northrend/nexus/eye_of_eternity/eye_of_eternity.h +++ b/scripts/northrend/nexus/eye_of_eternity/eye_of_eternity.h @@ -36,7 +36,7 @@ enum SPELL_ALEXSTRASZAS_GIFT_VISUAL = 61023, }; -class MANGOS_DLL_DECL instance_eye_of_eternity : public ScriptedInstance, private DialogueHelper +class instance_eye_of_eternity : public ScriptedInstance, private DialogueHelper { public: instance_eye_of_eternity(Map* pMap); diff --git a/scripts/northrend/nexus/nexus/boss_anomalus.cpp b/scripts/northrend/nexus/nexus/boss_anomalus.cpp index bf762112c..281a61e78 100644 --- a/scripts/northrend/nexus/nexus/boss_anomalus.cpp +++ b/scripts/northrend/nexus/nexus/boss_anomalus.cpp @@ -58,7 +58,7 @@ enum ## boss_anomalus ######*/ -struct MANGOS_DLL_DECL boss_anomalusAI : public ScriptedAI +struct boss_anomalusAI : public ScriptedAI { boss_anomalusAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -190,7 +190,7 @@ CreatureAI* GetAI_boss_anomalus(Creature* pCreature) return new boss_anomalusAI(pCreature); } -struct MANGOS_DLL_DECL mob_chaotic_riftAI : public Scripted_NoMovementAI +struct mob_chaotic_riftAI : public Scripted_NoMovementAI { mob_chaotic_riftAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { Reset(); } diff --git a/scripts/northrend/nexus/nexus/boss_keristrasza.cpp b/scripts/northrend/nexus/nexus/boss_keristrasza.cpp index 0a1a55b67..f5e74655e 100644 --- a/scripts/northrend/nexus/nexus/boss_keristrasza.cpp +++ b/scripts/northrend/nexus/nexus/boss_keristrasza.cpp @@ -53,7 +53,7 @@ enum ## boss_keristrasza ######*/ -struct MANGOS_DLL_DECL boss_keristraszaAI : public ScriptedAI +struct boss_keristraszaAI : public ScriptedAI { boss_keristraszaAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/northrend/nexus/nexus/boss_ormorok.cpp b/scripts/northrend/nexus/nexus/boss_ormorok.cpp index 93284f619..091413fc9 100644 --- a/scripts/northrend/nexus/nexus/boss_ormorok.cpp +++ b/scripts/northrend/nexus/nexus/boss_ormorok.cpp @@ -68,7 +68,7 @@ enum ## boss_ormorok ######*/ -struct MANGOS_DLL_DECL boss_ormorokAI : public ScriptedAI +struct boss_ormorokAI : public ScriptedAI { boss_ormorokAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/northrend/nexus/nexus/boss_telestra.cpp b/scripts/northrend/nexus/nexus/boss_telestra.cpp index 9ec856a21..d891dc75f 100644 --- a/scripts/northrend/nexus/nexus/boss_telestra.cpp +++ b/scripts/northrend/nexus/nexus/boss_telestra.cpp @@ -71,7 +71,7 @@ enum ## boss_telestra ######*/ -struct MANGOS_DLL_DECL boss_telestraAI : public ScriptedAI +struct boss_telestraAI : public ScriptedAI { boss_telestraAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/northrend/nexus/nexus/nexus.h b/scripts/northrend/nexus/nexus/nexus.h index 4c24b4bdb..e2459f2a9 100644 --- a/scripts/northrend/nexus/nexus/nexus.h +++ b/scripts/northrend/nexus/nexus/nexus.h @@ -35,7 +35,7 @@ enum ACHIEV_CRIT_SPLIT_PERSONALITY = 7577, // Telestra, achiev 2150 }; -class MANGOS_DLL_DECL instance_nexus : public ScriptedInstance +class instance_nexus : public ScriptedInstance { public: instance_nexus(Map* pMap); diff --git a/scripts/northrend/nexus/oculus/boss_eregos.cpp b/scripts/northrend/nexus/oculus/boss_eregos.cpp index 4d3e84a46..503f8aa66 100644 --- a/scripts/northrend/nexus/oculus/boss_eregos.cpp +++ b/scripts/northrend/nexus/oculus/boss_eregos.cpp @@ -57,7 +57,7 @@ enum ## boss_eregos ######*/ -struct MANGOS_DLL_DECL boss_eregosAI : public ScriptedAI +struct boss_eregosAI : public ScriptedAI { boss_eregosAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -249,7 +249,7 @@ CreatureAI* GetAI_boss_eregos(Creature* pCreature) ## npc_planar_anomaly ######*/ -struct MANGOS_DLL_DECL npc_planar_anomalyAI : public ScriptedAI +struct npc_planar_anomalyAI : public ScriptedAI { npc_planar_anomalyAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } diff --git a/scripts/northrend/nexus/oculus/boss_urom.cpp b/scripts/northrend/nexus/oculus/boss_urom.cpp index 94784fd92..98ebe40f2 100644 --- a/scripts/northrend/nexus/oculus/boss_urom.cpp +++ b/scripts/northrend/nexus/oculus/boss_urom.cpp @@ -73,7 +73,7 @@ static uint32 uiTrashPacks[MAX_PLATFORMS][MAX_PLATFORMS] = {NPC_PHANTASMAL_MURLOC, NPC_PHANTASMAL_NAGAL, NPC_PHANTASMAL_OGRE}, }; -struct MANGOS_DLL_DECL boss_uromAI : public ScriptedAI +struct boss_uromAI : public ScriptedAI { boss_uromAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/northrend/nexus/oculus/boss_varos.cpp b/scripts/northrend/nexus/oculus/boss_varos.cpp index 36e13a00b..c8d304611 100644 --- a/scripts/northrend/nexus/oculus/boss_varos.cpp +++ b/scripts/northrend/nexus/oculus/boss_varos.cpp @@ -82,7 +82,7 @@ static const CaptainData aVarosCaptainData[4] = ## boss_varos ######*/ -struct MANGOS_DLL_DECL boss_varosAI : public ScriptedAI +struct boss_varosAI : public ScriptedAI { boss_varosAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -255,7 +255,7 @@ bool ProcessEventId_event_spell_call_captain(uint32 uiEventId, Object* pSource, ## npc_azure_ring_captain ######*/ -struct MANGOS_DLL_DECL npc_azure_ring_captainAI : public ScriptedAI +struct npc_azure_ring_captainAI : public ScriptedAI { npc_azure_ring_captainAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -308,7 +308,7 @@ CreatureAI* GetAI_npc_azure_ring_captain(Creature* pCreature) ## npc_arcane_beam ######*/ -struct MANGOS_DLL_DECL npc_arcane_beamAI : public ScriptedAI +struct npc_arcane_beamAI : public ScriptedAI { npc_arcane_beamAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } @@ -342,7 +342,7 @@ CreatureAI* GetAI_npc_arcane_beam(Creature* pCreature) ######*/ // TODO Remove this 'script' when combat can be proper prevented from core-side -struct MANGOS_DLL_DECL npc_centrifuge_coreAI : public Scripted_NoMovementAI +struct npc_centrifuge_coreAI : public Scripted_NoMovementAI { npc_centrifuge_coreAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { Reset(); } diff --git a/scripts/northrend/nexus/oculus/oculus.cpp b/scripts/northrend/nexus/oculus/oculus.cpp index c27ede2c0..352bfb2e1 100644 --- a/scripts/northrend/nexus/oculus/oculus.cpp +++ b/scripts/northrend/nexus/oculus/oculus.cpp @@ -44,7 +44,7 @@ enum ## npc_oculus_drake ######*/ -struct MANGOS_DLL_DECL npc_oculus_drakeAI : public ScriptedAI +struct npc_oculus_drakeAI : public ScriptedAI { npc_oculus_drakeAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/northrend/nexus/oculus/oculus.h b/scripts/northrend/nexus/oculus/oculus.h index d49bf209b..3440d4bf1 100644 --- a/scripts/northrend/nexus/oculus/oculus.h +++ b/scripts/northrend/nexus/oculus/oculus.h @@ -64,7 +64,7 @@ static const float aOculusBossSpawnLocs[2][4] = {1077.04f, 1086.21f, 655.497f, 4.18879f} // Eregos }; -class MANGOS_DLL_DECL instance_oculus : public ScriptedInstance +class instance_oculus : public ScriptedInstance { public: instance_oculus(Map* pMap); diff --git a/scripts/northrend/obsidian_sanctum/boss_sartharion.cpp b/scripts/northrend/obsidian_sanctum/boss_sartharion.cpp index a5a30ed5a..6f4a3b7f7 100644 --- a/scripts/northrend/obsidian_sanctum/boss_sartharion.cpp +++ b/scripts/northrend/obsidian_sanctum/boss_sartharion.cpp @@ -194,7 +194,7 @@ Waypoint m_aTsunamiLoc[] = ## Boss Sartharion ######*/ -struct MANGOS_DLL_DECL boss_sartharionAI : public ScriptedAI +struct boss_sartharionAI : public ScriptedAI { boss_sartharionAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -563,7 +563,7 @@ enum VespText }; // to control each dragons common abilities -struct MANGOS_DLL_DECL dummy_dragonAI : public ScriptedAI +struct dummy_dragonAI : public ScriptedAI { dummy_dragonAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -799,7 +799,7 @@ struct MANGOS_DLL_DECL dummy_dragonAI : public ScriptedAI ## Mob Tenebron ######*/ -struct MANGOS_DLL_DECL mob_tenebronAI : public dummy_dragonAI +struct mob_tenebronAI : public dummy_dragonAI { mob_tenebronAI(Creature* pCreature) : dummy_dragonAI(pCreature) { @@ -912,7 +912,7 @@ CreatureAI* GetAI_mob_tenebron(Creature* pCreature) ## Mob Shadron ######*/ -struct MANGOS_DLL_DECL mob_shadronAI : public dummy_dragonAI +struct mob_shadronAI : public dummy_dragonAI { mob_shadronAI(Creature* pCreature) : dummy_dragonAI(pCreature) { @@ -1030,7 +1030,7 @@ CreatureAI* GetAI_mob_shadron(Creature* pCreature) ## Mob Vesperon ######*/ -struct MANGOS_DLL_DECL mob_vesperonAI : public dummy_dragonAI +struct mob_vesperonAI : public dummy_dragonAI { mob_vesperonAI(Creature* pCreature) : dummy_dragonAI(pCreature) { @@ -1140,7 +1140,7 @@ CreatureAI* GetAI_mob_vesperon(Creature* pCreature) ## Mob Twilight Eggs ######*/ -struct MANGOS_DLL_DECL mob_twilight_eggsAI : public Scripted_NoMovementAI +struct mob_twilight_eggsAI : public Scripted_NoMovementAI { mob_twilight_eggsAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { Reset(); } @@ -1191,7 +1191,7 @@ CreatureAI* GetAI_mob_twilight_eggs(Creature* pCreature) ## npc_tenebron_egg_controller ######*/ -struct MANGOS_DLL_DECL npc_tenebron_egg_controllerAI : public Scripted_NoMovementAI +struct npc_tenebron_egg_controllerAI : public Scripted_NoMovementAI { npc_tenebron_egg_controllerAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { @@ -1241,7 +1241,7 @@ CreatureAI* GetAI_npc_tenebron_egg_controller(Creature* pCreature) ## npc_flame_tsunami ######*/ -struct MANGOS_DLL_DECL npc_flame_tsunamiAI : public ScriptedAI +struct npc_flame_tsunamiAI : public ScriptedAI { npc_flame_tsunamiAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } @@ -1294,7 +1294,7 @@ CreatureAI* GetAI_npc_flame_tsunami(Creature* pCreature) ## npc_fire_cyclone ######*/ -struct MANGOS_DLL_DECL npc_fire_cycloneAI : public ScriptedAI +struct npc_fire_cycloneAI : public ScriptedAI { npc_fire_cycloneAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/northrend/obsidian_sanctum/obsidian_sanctum.h b/scripts/northrend/obsidian_sanctum/obsidian_sanctum.h index d25635c4f..d7faa7ee8 100644 --- a/scripts/northrend/obsidian_sanctum/obsidian_sanctum.h +++ b/scripts/northrend/obsidian_sanctum/obsidian_sanctum.h @@ -40,7 +40,7 @@ enum ACHIEV_DRAGONS_ALIVE_3_H = 7333, }; -class MANGOS_DLL_DECL instance_obsidian_sanctum : public ScriptedInstance +class instance_obsidian_sanctum : public ScriptedInstance { public: instance_obsidian_sanctum(Map* pMap); diff --git a/scripts/northrend/ruby_sanctum/boss_baltharus.cpp b/scripts/northrend/ruby_sanctum/boss_baltharus.cpp index 20e6d3514..a652da65a 100644 --- a/scripts/northrend/ruby_sanctum/boss_baltharus.cpp +++ b/scripts/northrend/ruby_sanctum/boss_baltharus.cpp @@ -70,7 +70,7 @@ static const DialogueEntry aIntroDialogue[] = ## boss_baltharus ######*/ -struct MANGOS_DLL_DECL boss_baltharusAI : public ScriptedAI +struct boss_baltharusAI : public ScriptedAI { boss_baltharusAI(Creature* pCreature) : ScriptedAI(pCreature), m_introDialogue(aIntroDialogue) @@ -235,7 +235,7 @@ struct MANGOS_DLL_DECL boss_baltharusAI : public ScriptedAI ## npc_baltharus_clone ######*/ -struct MANGOS_DLL_DECL npc_baltharus_cloneAI : public ScriptedAI +struct npc_baltharus_cloneAI : public ScriptedAI { npc_baltharus_cloneAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } diff --git a/scripts/northrend/ruby_sanctum/boss_halion.cpp b/scripts/northrend/ruby_sanctum/boss_halion.cpp index d5df77877..0d4d1bec1 100644 --- a/scripts/northrend/ruby_sanctum/boss_halion.cpp +++ b/scripts/northrend/ruby_sanctum/boss_halion.cpp @@ -141,7 +141,7 @@ static const float aOrbCarrierPosition2[3] = {3153.75f, 487.1875f, 70.47f}; ## boss_halion_real ######*/ -struct MANGOS_DLL_DECL boss_halion_realAI : public ScriptedAI +struct boss_halion_realAI : public ScriptedAI { boss_halion_realAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -361,7 +361,7 @@ struct MANGOS_DLL_DECL boss_halion_realAI : public ScriptedAI ## boss_halion_twilight ######*/ -struct MANGOS_DLL_DECL boss_halion_twilightAI : public ScriptedAI +struct boss_halion_twilightAI : public ScriptedAI { boss_halion_twilightAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/northrend/ruby_sanctum/boss_saviana.cpp b/scripts/northrend/ruby_sanctum/boss_saviana.cpp index 1f1f601f8..94a1260a4 100644 --- a/scripts/northrend/ruby_sanctum/boss_saviana.cpp +++ b/scripts/northrend/ruby_sanctum/boss_saviana.cpp @@ -47,7 +47,7 @@ enum static const float aAirPositions[3] = {3155.51f, 683.844f, 90.50f}; -struct MANGOS_DLL_DECL boss_savianaAI : public ScriptedAI +struct boss_savianaAI : public ScriptedAI { boss_savianaAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/northrend/ruby_sanctum/boss_zarithrian.cpp b/scripts/northrend/ruby_sanctum/boss_zarithrian.cpp index 1608d6628..ee94b73af 100644 --- a/scripts/northrend/ruby_sanctum/boss_zarithrian.cpp +++ b/scripts/northrend/ruby_sanctum/boss_zarithrian.cpp @@ -39,7 +39,7 @@ enum NPC_ONYX_FLAMECALLER = 39814, // handled in ACID }; -struct MANGOS_DLL_DECL boss_zarithrianAI : public ScriptedAI +struct boss_zarithrianAI : public ScriptedAI { boss_zarithrianAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/northrend/ruby_sanctum/ruby_sanctum.h b/scripts/northrend/ruby_sanctum/ruby_sanctum.h index 03c7111c9..53e9f29e2 100644 --- a/scripts/northrend/ruby_sanctum/ruby_sanctum.h +++ b/scripts/northrend/ruby_sanctum/ruby_sanctum.h @@ -57,7 +57,7 @@ enum WORLD_STATE_CORPOREALITY = 5051, }; -class MANGOS_DLL_DECL instance_ruby_sanctum : public ScriptedInstance +class instance_ruby_sanctum : public ScriptedInstance { public: instance_ruby_sanctum(Map* pMap); diff --git a/scripts/northrend/sholazar_basin.cpp b/scripts/northrend/sholazar_basin.cpp index f8ca7d371..2db4e666f 100644 --- a/scripts/northrend/sholazar_basin.cpp +++ b/scripts/northrend/sholazar_basin.cpp @@ -53,7 +53,7 @@ enum SPELL_DETONATE_EXPLOSIVES_2 = 52371, // second "barrel" }; -struct MANGOS_DLL_DECL npc_heliceAI : public npc_escortAI +struct npc_heliceAI : public npc_escortAI { npc_heliceAI(Creature* pCreature) : npc_escortAI(pCreature) { @@ -221,7 +221,7 @@ enum SPELL_ORACLE_INTRO = 51448, }; -struct MANGOS_DLL_DECL npc_injured_rainspeakerAI : public npc_escortAI +struct npc_injured_rainspeakerAI : public npc_escortAI { npc_injured_rainspeakerAI(Creature* pCreature) : npc_escortAI(pCreature) { Reset(); } @@ -469,7 +469,7 @@ static const StillAtItData aStillAtItMachines[2] = {SAY_OPEN_VALVE, GO_PRESSURE_VALVE}, }; -struct MANGOS_DLL_DECL npc_tipsy_mcmanusAI : public ScriptedAI +struct npc_tipsy_mcmanusAI : public ScriptedAI { npc_tipsy_mcmanusAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } diff --git a/scripts/northrend/storm_peaks.cpp b/scripts/northrend/storm_peaks.cpp index 0e18f3efe..009598fa5 100644 --- a/scripts/northrend/storm_peaks.cpp +++ b/scripts/northrend/storm_peaks.cpp @@ -49,7 +49,7 @@ enum NPC_FROSTBORN_GHOST = 30144, }; -struct MANGOS_DLL_DECL npc_floating_spiritAI : public ScriptedAI +struct npc_floating_spiritAI : public ScriptedAI { npc_floating_spiritAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } @@ -123,7 +123,7 @@ enum QUEST_ID_BITTER_DEPARTURE = 12832, }; -struct MANGOS_DLL_DECL npc_injured_minerAI : public npc_escortAI +struct npc_injured_minerAI : public npc_escortAI { npc_injured_minerAI(Creature* pCreature) : npc_escortAI(pCreature) { Reset(); } diff --git a/scripts/northrend/ulduar/halls_of_lightning/boss_bjarngrim.cpp b/scripts/northrend/ulduar/halls_of_lightning/boss_bjarngrim.cpp index 06ecfe77a..82e8ce07e 100644 --- a/scripts/northrend/ulduar/halls_of_lightning/boss_bjarngrim.cpp +++ b/scripts/northrend/ulduar/halls_of_lightning/boss_bjarngrim.cpp @@ -72,7 +72,7 @@ enum ## boss_bjarngrim ######*/ -struct MANGOS_DLL_DECL boss_bjarngrimAI : public ScriptedAI +struct boss_bjarngrimAI : public ScriptedAI { boss_bjarngrimAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -313,7 +313,7 @@ struct MANGOS_DLL_DECL boss_bjarngrimAI : public ScriptedAI ## mob_stormforged_lieutenant ######*/ -struct MANGOS_DLL_DECL mob_stormforged_lieutenantAI : public ScriptedAI +struct mob_stormforged_lieutenantAI : public ScriptedAI { mob_stormforged_lieutenantAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/northrend/ulduar/halls_of_lightning/boss_ionar.cpp b/scripts/northrend/ulduar/halls_of_lightning/boss_ionar.cpp index 9d90d21d9..266e83a9e 100644 --- a/scripts/northrend/ulduar/halls_of_lightning/boss_ionar.cpp +++ b/scripts/northrend/ulduar/halls_of_lightning/boss_ionar.cpp @@ -57,7 +57,7 @@ enum ## Boss Ionar ######*/ -struct MANGOS_DLL_DECL boss_ionarAI : public ScriptedAI +struct boss_ionarAI : public ScriptedAI { boss_ionarAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -330,7 +330,7 @@ bool EffectDummyCreature_boss_ionar(Unit* /*pCaster*/, uint32 uiSpellId, SpellEf ## mob_spark_of_ionar ######*/ -struct MANGOS_DLL_DECL mob_spark_of_ionarAI : public ScriptedAI +struct mob_spark_of_ionarAI : public ScriptedAI { mob_spark_of_ionarAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/northrend/ulduar/halls_of_lightning/boss_loken.cpp b/scripts/northrend/ulduar/halls_of_lightning/boss_loken.cpp index bda8ad266..870d201d4 100644 --- a/scripts/northrend/ulduar/halls_of_lightning/boss_loken.cpp +++ b/scripts/northrend/ulduar/halls_of_lightning/boss_loken.cpp @@ -54,7 +54,7 @@ enum ## Boss Loken ######*/ -struct MANGOS_DLL_DECL boss_lokenAI : public ScriptedAI +struct boss_lokenAI : public ScriptedAI { boss_lokenAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/northrend/ulduar/halls_of_lightning/boss_volkhan.cpp b/scripts/northrend/ulduar/halls_of_lightning/boss_volkhan.cpp index e7beb22bd..6ea0a4b88 100644 --- a/scripts/northrend/ulduar/halls_of_lightning/boss_volkhan.cpp +++ b/scripts/northrend/ulduar/halls_of_lightning/boss_volkhan.cpp @@ -68,7 +68,7 @@ enum ## Boss Volkhan ######*/ -struct MANGOS_DLL_DECL boss_volkhanAI : public ScriptedAI +struct boss_volkhanAI : public ScriptedAI { boss_volkhanAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -319,7 +319,7 @@ bool EffectDummyCreature_npc_volkhan_anvil(Unit* pCaster, uint32 uiSpellId, Spel ## mob_molten_golem ######*/ -struct MANGOS_DLL_DECL mob_molten_golemAI : public ScriptedAI +struct mob_molten_golemAI : public ScriptedAI { mob_molten_golemAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/northrend/ulduar/halls_of_lightning/halls_of_lightning.h b/scripts/northrend/ulduar/halls_of_lightning/halls_of_lightning.h index d2286421e..39f73d3af 100644 --- a/scripts/northrend/ulduar/halls_of_lightning/halls_of_lightning.h +++ b/scripts/northrend/ulduar/halls_of_lightning/halls_of_lightning.h @@ -31,7 +31,7 @@ enum ACHIEV_CRIT_RESISTANT = 7321, // Volkhan, achiev 2042 }; -class MANGOS_DLL_DECL instance_halls_of_lightning : public ScriptedInstance +class instance_halls_of_lightning : public ScriptedInstance { public: instance_halls_of_lightning(Map* pMap); diff --git a/scripts/northrend/ulduar/halls_of_stone/boss_maiden_of_grief.cpp b/scripts/northrend/ulduar/halls_of_stone/boss_maiden_of_grief.cpp index 3f658af29..36dea1f77 100644 --- a/scripts/northrend/ulduar/halls_of_stone/boss_maiden_of_grief.cpp +++ b/scripts/northrend/ulduar/halls_of_stone/boss_maiden_of_grief.cpp @@ -50,7 +50,7 @@ enum ## boss_maiden_of_grief ######*/ -struct MANGOS_DLL_DECL boss_maiden_of_griefAI : public ScriptedAI +struct boss_maiden_of_griefAI : public ScriptedAI { boss_maiden_of_griefAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/northrend/ulduar/halls_of_stone/boss_sjonnir.cpp b/scripts/northrend/ulduar/halls_of_stone/boss_sjonnir.cpp index ca1cdc0d1..219ff9245 100644 --- a/scripts/northrend/ulduar/halls_of_stone/boss_sjonnir.cpp +++ b/scripts/northrend/ulduar/halls_of_stone/boss_sjonnir.cpp @@ -77,7 +77,7 @@ enum ## boss_sjonnir ######*/ -struct MANGOS_DLL_DECL boss_sjonnirAI : public ScriptedAI +struct boss_sjonnirAI : public ScriptedAI { boss_sjonnirAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.cpp b/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.cpp index 79eaaa5f8..baa75a3a2 100644 --- a/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.cpp +++ b/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.cpp @@ -118,7 +118,7 @@ enum ## npc_brann_hos ######*/ -struct MANGOS_DLL_DECL npc_brann_hosAI : public npc_escortAI +struct npc_brann_hosAI : public npc_escortAI { npc_brann_hosAI(Creature* pCreature) : npc_escortAI(pCreature) { @@ -682,7 +682,7 @@ enum ## npc_dark_matter ######*/ -struct MANGOS_DLL_DECL npc_dark_matterAI : public ScriptedAI +struct npc_dark_matterAI : public ScriptedAI { npc_dark_matterAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -752,7 +752,7 @@ CreatureAI* GetAI_npc_dark_matter(Creature* pCreature) ######*/ // TODO Move this 'script' to eventAI when combat can be proper prevented from core-side -struct MANGOS_DLL_DECL npc_searing_gazeAI : public Scripted_NoMovementAI +struct npc_searing_gazeAI : public Scripted_NoMovementAI { npc_searing_gazeAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { diff --git a/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.h b/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.h index ea254374d..90f2322c4 100644 --- a/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.h +++ b/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.h @@ -70,7 +70,7 @@ struct Face uint32 m_uiTimer; }; -class MANGOS_DLL_DECL instance_halls_of_stone : public ScriptedInstance +class instance_halls_of_stone : public ScriptedInstance { public: instance_halls_of_stone(Map* pMap); diff --git a/scripts/northrend/ulduar/ulduar/assembly_of_iron.cpp b/scripts/northrend/ulduar/ulduar/assembly_of_iron.cpp index abe413c3b..4f81f02a3 100644 --- a/scripts/northrend/ulduar/ulduar/assembly_of_iron.cpp +++ b/scripts/northrend/ulduar/ulduar/assembly_of_iron.cpp @@ -112,7 +112,7 @@ enum POINT_ID_LAND = 2, }; -struct MANGOS_DLL_DECL boss_brundirAI : public ScriptedAI +struct boss_brundirAI : public ScriptedAI { boss_brundirAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -422,7 +422,7 @@ CreatureAI* GetAI_boss_brundir(Creature* pCreature) return new boss_brundirAI(pCreature); } -struct MANGOS_DLL_DECL boss_molgeimAI : public ScriptedAI +struct boss_molgeimAI : public ScriptedAI { boss_molgeimAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -607,7 +607,7 @@ CreatureAI* GetAI_boss_molgeim(Creature* pCreature) return new boss_molgeimAI(pCreature); } -struct MANGOS_DLL_DECL boss_steelbreakerAI : public ScriptedAI +struct boss_steelbreakerAI : public ScriptedAI { boss_steelbreakerAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/northrend/ulduar/ulduar/boss_algalon.cpp b/scripts/northrend/ulduar/ulduar/boss_algalon.cpp index cd7747ac4..7d40b9ec2 100644 --- a/scripts/northrend/ulduar/ulduar/boss_algalon.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_algalon.cpp @@ -181,7 +181,7 @@ static const float afConstellations[MAX_CONSTELATIONS][4] = ## boss_algalon ######*/ -struct MANGOS_DLL_DECL boss_algalonAI : public ScriptedAI, private DialogueHelper +struct boss_algalonAI : public ScriptedAI, private DialogueHelper { boss_algalonAI(Creature* pCreature) : ScriptedAI(pCreature), DialogueHelper(aAlgalonDialogue) @@ -598,7 +598,7 @@ CreatureAI* GetAI_boss_algalon(Creature* pCreature) ## npc_living_constellation ######*/ -struct MANGOS_DLL_DECL npc_living_constellationAI : public ScriptedAI +struct npc_living_constellationAI : public ScriptedAI { npc_living_constellationAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -648,7 +648,7 @@ CreatureAI* GetAI_npc_living_constellation(Creature* pCreature) ## npc_worm_hole ######*/ -struct MANGOS_DLL_DECL npc_worm_holeAI : public Scripted_NoMovementAI +struct npc_worm_holeAI : public Scripted_NoMovementAI { npc_worm_holeAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { Reset(); } @@ -695,7 +695,7 @@ CreatureAI* GetAI_npc_worm_hole(Creature* pCreature) ## npc_black_hole ######*/ -struct MANGOS_DLL_DECL npc_black_holeAI : public Scripted_NoMovementAI +struct npc_black_holeAI : public Scripted_NoMovementAI { npc_black_holeAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { Reset(); } @@ -742,7 +742,7 @@ CreatureAI* GetAI_npc_black_hole(Creature* pCreature) ## npc_collapsing_star ######*/ -struct MANGOS_DLL_DECL npc_collapsing_starAI : public ScriptedAI +struct npc_collapsing_starAI : public ScriptedAI { npc_collapsing_starAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } diff --git a/scripts/northrend/ulduar/ulduar/boss_auriaya.cpp b/scripts/northrend/ulduar/ulduar/boss_auriaya.cpp index 4e92eae06..1dae25b47 100644 --- a/scripts/northrend/ulduar/ulduar/boss_auriaya.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_auriaya.cpp @@ -69,7 +69,7 @@ enum ## boss_auriaya ######*/ -struct MANGOS_DLL_DECL boss_auriayaAI : public ScriptedAI +struct boss_auriayaAI : public ScriptedAI { boss_auriayaAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -213,7 +213,7 @@ CreatureAI* GetAI_boss_auriaya(Creature* pCreature) ## boss_feral_defender ######*/ -struct MANGOS_DLL_DECL boss_feral_defenderAI : public ScriptedAI +struct boss_feral_defenderAI : public ScriptedAI { boss_feral_defenderAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/northrend/ulduar/ulduar/boss_flame_leviathan.cpp b/scripts/northrend/ulduar/ulduar/boss_flame_leviathan.cpp index 53fc9b2a9..feec1ae5c 100644 --- a/scripts/northrend/ulduar/ulduar/boss_flame_leviathan.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_flame_leviathan.cpp @@ -164,7 +164,7 @@ static const float afMimironInferno[3] = {329.1809f, 8.02577f, 409.887f}; ## boss_flame_leviathan ######*/ -struct MANGOS_DLL_DECL boss_flame_leviathanAI : public ScriptedAI +struct boss_flame_leviathanAI : public ScriptedAI { boss_flame_leviathanAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -564,7 +564,7 @@ CreatureAI* GetAI_boss_flame_leviathan(Creature* pCreature) ## npc_hodir_fury_reticle ######*/ -struct MANGOS_DLL_DECL npc_hodir_fury_reticleAI : public ScriptedAI +struct npc_hodir_fury_reticleAI : public ScriptedAI { npc_hodir_fury_reticleAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -636,7 +636,7 @@ CreatureAI* GetAI_npc_hodir_fury_reticle(Creature* pCreature) ######*/ // TODO Remove this 'script' when combat can be proper prevented from core-side -struct MANGOS_DLL_DECL npc_hodir_furyAI : public Scripted_NoMovementAI +struct npc_hodir_furyAI : public Scripted_NoMovementAI { npc_hodir_furyAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { Reset(); } @@ -656,7 +656,7 @@ CreatureAI* GetAI_npc_hodir_fury(Creature* pCreature) ######*/ // TODO Move this 'script' to eventAI when combat can be proper prevented from core-side -struct MANGOS_DLL_DECL npc_freya_wardAI : public Scripted_NoMovementAI +struct npc_freya_wardAI : public Scripted_NoMovementAI { npc_freya_wardAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { Reset();} @@ -698,7 +698,7 @@ CreatureAI* GetAI_npc_freya_ward(Creature* pCreature) ######*/ // TODO Move this 'script' to eventAI when combat can be proper prevented from core-side -struct MANGOS_DLL_DECL npc_mimiron_infernoAI : public Scripted_NoMovementAI +struct npc_mimiron_infernoAI : public Scripted_NoMovementAI { npc_mimiron_infernoAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { Reset(); } diff --git a/scripts/northrend/ulduar/ulduar/boss_freya.cpp b/scripts/northrend/ulduar/ulduar/boss_freya.cpp index a029aaaf9..e597a2ccf 100644 --- a/scripts/northrend/ulduar/ulduar/boss_freya.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_freya.cpp @@ -182,7 +182,7 @@ static const uint32 aAlliesSpawnSpells[MAX_ALLIES_SPELLS] = {SPELL_SUMMON_WAVE_1 ## boss_freya ######*/ -struct MANGOS_DLL_DECL boss_freyaAI : public ScriptedAI +struct boss_freyaAI : public ScriptedAI { boss_freyaAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -668,7 +668,7 @@ bool EffectScriptEffectCreature_boss_freya(Unit* pCaster, uint32 uiSpellId, Spel ## three_nature_allies ######*/ -struct MANGOS_DLL_DECL three_nature_alliesAI : public ScriptedAI +struct three_nature_alliesAI : public ScriptedAI { three_nature_alliesAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -740,7 +740,7 @@ struct MANGOS_DLL_DECL three_nature_alliesAI : public ScriptedAI ## npc_water_spirit ######*/ -struct MANGOS_DLL_DECL npc_water_spiritAI : public three_nature_alliesAI +struct npc_water_spiritAI : public three_nature_alliesAI { npc_water_spiritAI(Creature* pCreature) : three_nature_alliesAI(pCreature) { Reset(); } @@ -781,7 +781,7 @@ CreatureAI* GetAI_npc_water_spirit(Creature* pCreature) ## npc_snaplasher ######*/ -struct MANGOS_DLL_DECL npc_snaplasherAI : public three_nature_alliesAI +struct npc_snaplasherAI : public three_nature_alliesAI { npc_snaplasherAI(Creature* pCreature) : three_nature_alliesAI(pCreature) { Reset(); } @@ -805,7 +805,7 @@ CreatureAI* GetAI_npc_snaplasher(Creature* pCreature) ## npc_storm_lasher ######*/ -struct MANGOS_DLL_DECL npc_storm_lasherAI : public three_nature_alliesAI +struct npc_storm_lasherAI : public three_nature_alliesAI { npc_storm_lasherAI(Creature* pCreature) : three_nature_alliesAI(pCreature) { Reset(); } @@ -859,7 +859,7 @@ CreatureAI* GetAI_npc_storm_lasher(Creature* pCreature) ## npc_eonars_gift ######*/ -struct MANGOS_DLL_DECL npc_eonars_giftAI : public Scripted_NoMovementAI +struct npc_eonars_giftAI : public Scripted_NoMovementAI { npc_eonars_giftAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { @@ -899,7 +899,7 @@ CreatureAI* GetAI_npc_eonars_gift(Creature* pCreature) ## npc_nature_bomb ######*/ -struct MANGOS_DLL_DECL npc_nature_bombAI : public Scripted_NoMovementAI +struct npc_nature_bombAI : public Scripted_NoMovementAI { npc_nature_bombAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { @@ -949,7 +949,7 @@ CreatureAI* GetAI_npc_nature_bomb(Creature* pCreature) ## npc_iron_roots ######*/ -struct MANGOS_DLL_DECL npc_iron_rootsAI : public Scripted_NoMovementAI +struct npc_iron_rootsAI : public Scripted_NoMovementAI { npc_iron_rootsAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { @@ -987,7 +987,7 @@ CreatureAI* GetAI_npc_iron_roots(Creature* pCreature) ######*/ // TODO Remove this 'script' when combat can be proper prevented from core-side -struct MANGOS_DLL_DECL npc_healthy_sporeAI : public Scripted_NoMovementAI +struct npc_healthy_sporeAI : public Scripted_NoMovementAI { npc_healthy_sporeAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { Reset(); } diff --git a/scripts/northrend/ulduar/ulduar/boss_general_vezax.cpp b/scripts/northrend/ulduar/ulduar/boss_general_vezax.cpp index f9adc2875..154dbe725 100644 --- a/scripts/northrend/ulduar/ulduar/boss_general_vezax.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_general_vezax.cpp @@ -61,7 +61,7 @@ enum ## boss_general_vezax ######*/ -struct MANGOS_DLL_DECL boss_general_vezaxAI : public ScriptedAI +struct boss_general_vezaxAI : public ScriptedAI { boss_general_vezaxAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/northrend/ulduar/ulduar/boss_hodir.cpp b/scripts/northrend/ulduar/ulduar/boss_hodir.cpp index bb1ea4733..9d3b5d984 100644 --- a/scripts/northrend/ulduar/ulduar/boss_hodir.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_hodir.cpp @@ -94,7 +94,7 @@ enum ## boss_hodir ######*/ -struct MANGOS_DLL_DECL boss_hodirAI : public ScriptedAI +struct boss_hodirAI : public ScriptedAI { boss_hodirAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -301,7 +301,7 @@ CreatureAI* GetAI_boss_hodir(Creature* pCreature) ## npc_flash_freeze ######*/ -struct MANGOS_DLL_DECL npc_flash_freezeAI : public Scripted_NoMovementAI +struct npc_flash_freezeAI : public Scripted_NoMovementAI { npc_flash_freezeAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { @@ -412,7 +412,7 @@ bool ProcessEventId_event_boss_hodir(uint32 uiEventId, Object* pSource, Object* ######*/ // TODO Remove this 'script' when combat can be proper prevented from core-side -struct MANGOS_DLL_DECL npc_icicle_targetAI : public Scripted_NoMovementAI +struct npc_icicle_targetAI : public Scripted_NoMovementAI { npc_icicle_targetAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { Reset(); } diff --git a/scripts/northrend/ulduar/ulduar/boss_ignis.cpp b/scripts/northrend/ulduar/ulduar/boss_ignis.cpp index 494149110..f8036714a 100644 --- a/scripts/northrend/ulduar/ulduar/boss_ignis.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_ignis.cpp @@ -81,7 +81,7 @@ enum ## boss_ignis ######*/ -struct MANGOS_DLL_DECL boss_ignisAI : public ScriptedAI +struct boss_ignisAI : public ScriptedAI { boss_ignisAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -236,7 +236,7 @@ CreatureAI* GetAI_boss_ignis(Creature* pCreature) ## npc_iron_construct ######*/ -struct MANGOS_DLL_DECL npc_iron_constructAI : public ScriptedAI +struct npc_iron_constructAI : public ScriptedAI { npc_iron_constructAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -331,7 +331,7 @@ bool EffectScriptEffectCreature_npc_iron_construct(Unit* pCaster, uint32 uiSpell ######*/ // TODO Remove this 'script' when combat can be proper prevented from core-side -struct MANGOS_DLL_DECL npc_scorchAI : public Scripted_NoMovementAI +struct npc_scorchAI : public Scripted_NoMovementAI { npc_scorchAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { Reset(); } diff --git a/scripts/northrend/ulduar/ulduar/boss_kologarn.cpp b/scripts/northrend/ulduar/ulduar/boss_kologarn.cpp index 33606e301..af3994911 100644 --- a/scripts/northrend/ulduar/ulduar/boss_kologarn.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_kologarn.cpp @@ -100,7 +100,7 @@ static const float afKoloArmsLoc[4] = {1797.15f, -24.4027f, 448.741f, 3.1939f}; ## boss_kologarn ######*/ -struct MANGOS_DLL_DECL boss_kologarnAI : public Scripted_NoMovementAI +struct boss_kologarnAI : public Scripted_NoMovementAI { boss_kologarnAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { @@ -475,7 +475,7 @@ CreatureAI* GetAI_boss_kologarn(Creature* pCreature) ## npc_focused_eyebeam ######*/ -struct MANGOS_DLL_DECL npc_focused_eyebeamAI : public ScriptedAI +struct npc_focused_eyebeamAI : public ScriptedAI { npc_focused_eyebeamAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -507,7 +507,7 @@ CreatureAI* GetAI_npc_focused_eyebeam(Creature* pCreature) ## npc_rubble_stalker ######*/ -struct MANGOS_DLL_DECL npc_rubble_stalkerAI : public Scripted_NoMovementAI +struct npc_rubble_stalkerAI : public Scripted_NoMovementAI { npc_rubble_stalkerAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { diff --git a/scripts/northrend/ulduar/ulduar/boss_mimiron.cpp b/scripts/northrend/ulduar/ulduar/boss_mimiron.cpp index 2b8112f51..f35764424 100644 --- a/scripts/northrend/ulduar/ulduar/boss_mimiron.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_mimiron.cpp @@ -265,7 +265,7 @@ static const float afCenterMovePos[3] = {2744.61f, 2569.38f, 364.3136f}; ## boss_mimiron ######*/ -struct MANGOS_DLL_DECL boss_mimironAI : public ScriptedAI, private DialogueHelper +struct boss_mimironAI : public ScriptedAI, private DialogueHelper { boss_mimironAI(Creature* pCreature) : ScriptedAI(pCreature), DialogueHelper(aMimironDialogue) @@ -778,7 +778,7 @@ CreatureAI* GetAI_boss_mimiron(Creature* pCreature) ## boss_leviathan_mk2 ######*/ -struct MANGOS_DLL_DECL boss_leviathan_mk2AI : public ScriptedAI +struct boss_leviathan_mk2AI : public ScriptedAI { boss_leviathan_mk2AI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -1062,7 +1062,7 @@ CreatureAI* GetAI_boss_leviathan_mk2(Creature* pCreature) ## boss_vx001 ######*/ -struct MANGOS_DLL_DECL boss_vx001AI : public ScriptedAI +struct boss_vx001AI : public ScriptedAI { boss_vx001AI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -1362,7 +1362,7 @@ CreatureAI* GetAI_boss_vx001(Creature* pCreature) ## boss_aerial_unit ######*/ -struct MANGOS_DLL_DECL boss_aerial_unitAI : public ScriptedAI +struct boss_aerial_unitAI : public ScriptedAI { boss_aerial_unitAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -1616,7 +1616,7 @@ CreatureAI* GetAI_boss_aerial_unit(Creature* pCreature) ## npc_proximity_mine ######*/ -struct MANGOS_DLL_DECL npc_proximity_mineAI : public Scripted_NoMovementAI +struct npc_proximity_mineAI : public Scripted_NoMovementAI { npc_proximity_mineAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { Reset(); } @@ -1665,7 +1665,7 @@ CreatureAI* GetAI_npc_proximity_mine(Creature* pCreature) ## npc_bot_trigger ######*/ -struct MANGOS_DLL_DECL npc_bot_triggerAI : public Scripted_NoMovementAI +struct npc_bot_triggerAI : public Scripted_NoMovementAI { npc_bot_triggerAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { @@ -1780,7 +1780,7 @@ bool EffectDummyCreature_npc_bot_trigger(Unit* pCaster, uint32 uiSpellId, SpellE ## npc_mimiron_flames ######*/ -struct MANGOS_DLL_DECL npc_mimiron_flamesAI : public Scripted_NoMovementAI +struct npc_mimiron_flamesAI : public Scripted_NoMovementAI { npc_mimiron_flamesAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { @@ -1857,7 +1857,7 @@ CreatureAI* GetAI_npc_mimiron_flames(Creature* pCreature) ######*/ // TODO Move this 'script' to EventAI when combat can be proper prevented from core-side -struct MANGOS_DLL_DECL npc_frost_bombAI : public Scripted_NoMovementAI +struct npc_frost_bombAI : public Scripted_NoMovementAI { npc_frost_bombAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { Reset(); } @@ -1914,7 +1914,7 @@ CreatureAI* GetAI_npc_frost_bomb(Creature* pCreature) ## npc_rocket_strike ######*/ -struct MANGOS_DLL_DECL npc_rocket_strikeAI : public Scripted_NoMovementAI +struct npc_rocket_strikeAI : public Scripted_NoMovementAI { npc_rocket_strikeAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { Reset(); } @@ -1945,7 +1945,7 @@ CreatureAI* GetAI_npc_rocket_strike(Creature* pCreature) ######*/ // TODO Remove this 'script' when combat can be proper prevented from core-side -struct MANGOS_DLL_DECL boss_leviathan_mk2_turretAI : public Scripted_NoMovementAI +struct boss_leviathan_mk2_turretAI : public Scripted_NoMovementAI { boss_leviathan_mk2_turretAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { Reset(); } @@ -1965,7 +1965,7 @@ CreatureAI* GetAI_boss_leviathan_mk2_turret(Creature* pCreature) ######*/ // TODO Remove this 'script' when combat can be proper prevented from core-side -struct MANGOS_DLL_DECL npc_computerAI : public Scripted_NoMovementAI +struct npc_computerAI : public Scripted_NoMovementAI { npc_computerAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { Reset(); } diff --git a/scripts/northrend/ulduar/ulduar/boss_razorscale.cpp b/scripts/northrend/ulduar/ulduar/boss_razorscale.cpp index 54748a440..8e3516592 100644 --- a/scripts/northrend/ulduar/ulduar/boss_razorscale.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_razorscale.cpp @@ -120,7 +120,7 @@ static const float afRazorscaleSpawnersPos[3][3] = ## boss_razorscale ######*/ -struct MANGOS_DLL_DECL boss_razorscaleAI : public ScriptedAI +struct boss_razorscaleAI : public ScriptedAI { boss_razorscaleAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -649,7 +649,7 @@ CreatureAI* GetAI_boss_razorscale(Creature* pCreature) ## npc_expedition_commander ######*/ -struct MANGOS_DLL_DECL npc_expedition_commanderAI : public ScriptedAI, private DialogueHelper +struct npc_expedition_commanderAI : public ScriptedAI, private DialogueHelper { npc_expedition_commanderAI(Creature* pCreature) : ScriptedAI(pCreature), DialogueHelper(aIntroDialogue) @@ -777,7 +777,7 @@ bool GossipSelect_npc_expedition_commander(Player* pPlayer, Creature* pCreature, ## npc_razorscale_spawner ######*/ -struct MANGOS_DLL_DECL npc_razorscale_spawnerAI : public Scripted_NoMovementAI +struct npc_razorscale_spawnerAI : public Scripted_NoMovementAI { npc_razorscale_spawnerAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { Reset(); } @@ -838,7 +838,7 @@ CreatureAI* GetAI_npc_razorscale_spawner(Creature* pCreature) ######*/ // TODO Remove this 'script' when combat can be proper prevented from core-side -struct MANGOS_DLL_DECL npc_harpoon_fire_stateAI : public Scripted_NoMovementAI +struct npc_harpoon_fire_stateAI : public Scripted_NoMovementAI { npc_harpoon_fire_stateAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { Reset(); } diff --git a/scripts/northrend/ulduar/ulduar/boss_thorim.cpp b/scripts/northrend/ulduar/ulduar/boss_thorim.cpp index cd3f8507f..f22a609e5 100644 --- a/scripts/northrend/ulduar/ulduar/boss_thorim.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_thorim.cpp @@ -155,7 +155,7 @@ static const float afArenaCenterLoc[3] = {2134.8f, -263.056f, 419.983f}; ## boss_thorim ######*/ -struct MANGOS_DLL_DECL boss_thorimAI : public ScriptedAI, private DialogueHelper +struct boss_thorimAI : public ScriptedAI, private DialogueHelper { boss_thorimAI(Creature* pCreature) : ScriptedAI(pCreature), DialogueHelper(aThorimDialogue) @@ -672,7 +672,7 @@ CreatureAI* GetAI_boss_thorim(Creature* pCreature) ## boss_sif ######*/ -struct MANGOS_DLL_DECL boss_sifAI : public ScriptedAI +struct boss_sifAI : public ScriptedAI { boss_sifAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -821,7 +821,7 @@ CreatureAI* GetAI_boss_sif(Creature* pCreature) ## npc_runic_colossus ######*/ -struct MANGOS_DLL_DECL npc_runic_colossusAI : public ScriptedAI +struct npc_runic_colossusAI : public ScriptedAI { npc_runic_colossusAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -997,7 +997,7 @@ CreatureAI* GetAI_npc_runic_colossus(Creature* pCreature) ## npc_thunder_orb ######*/ -struct MANGOS_DLL_DECL npc_thunder_orbAI : public Scripted_NoMovementAI +struct npc_thunder_orbAI : public Scripted_NoMovementAI { npc_thunder_orbAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { Reset(); } diff --git a/scripts/northrend/ulduar/ulduar/boss_xt_002.cpp b/scripts/northrend/ulduar/ulduar/boss_xt_002.cpp index d64a75ded..44a3c93d4 100644 --- a/scripts/northrend/ulduar/ulduar/boss_xt_002.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_xt_002.cpp @@ -100,7 +100,7 @@ enum ## boss_xt_002 ######*/ -struct MANGOS_DLL_DECL boss_xt_002AI : public ScriptedAI +struct boss_xt_002AI : public ScriptedAI { boss_xt_002AI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -368,7 +368,7 @@ CreatureAI* GetAI_boss_xt_002(Creature* pCreature) ## boss_heart_deconstructor ######*/ -struct MANGOS_DLL_DECL boss_heart_deconstructorAI : public ScriptedAI +struct boss_heart_deconstructorAI : public ScriptedAI { boss_heart_deconstructorAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -483,7 +483,7 @@ CreatureAI* GetAI_boss_heart_deconstructor(Creature* pCreature) ## npc_scrapbot ######*/ -struct MANGOS_DLL_DECL npc_scrapbotAI : public ScriptedAI +struct npc_scrapbotAI : public ScriptedAI { npc_scrapbotAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } @@ -517,7 +517,7 @@ CreatureAI* GetAI_npc_scrapbot(Creature* pCreature) ######*/ // TODO Remove this 'script' when combat can be proper prevented from core-side -struct MANGOS_DLL_DECL npc_xt_toy_pileAI : public Scripted_NoMovementAI +struct npc_xt_toy_pileAI : public Scripted_NoMovementAI { npc_xt_toy_pileAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { Reset(); } diff --git a/scripts/northrend/ulduar/ulduar/boss_yogg_saron.cpp b/scripts/northrend/ulduar/ulduar/boss_yogg_saron.cpp index 496749718..0f048b809 100644 --- a/scripts/northrend/ulduar/ulduar/boss_yogg_saron.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_yogg_saron.cpp @@ -298,7 +298,7 @@ static const uint32 aMadnessChamberDoors[MAX_ILLUSIONS] = { GO_BRAIN_DOOR_STORMW ## boss_sara ######*/ -struct MANGOS_DLL_DECL boss_saraAI : public Scripted_NoMovementAI, private DialogueHelper +struct boss_saraAI : public Scripted_NoMovementAI, private DialogueHelper { boss_saraAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature), DialogueHelper(aYoggSaronDialog) @@ -604,7 +604,7 @@ CreatureAI* GetAI_boss_sara(Creature* pCreature) ## boss_yogg_saron ######*/ -struct MANGOS_DLL_DECL boss_yogg_saronAI : public Scripted_NoMovementAI +struct boss_yogg_saronAI : public Scripted_NoMovementAI { boss_yogg_saronAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { @@ -742,7 +742,7 @@ CreatureAI* GetAI_boss_yogg_saron(Creature* pCreature) ## npc_voice_yogg_saron ######*/ -struct MANGOS_DLL_DECL npc_voice_yogg_saronAI : public Scripted_NoMovementAI +struct npc_voice_yogg_saronAI : public Scripted_NoMovementAI { npc_voice_yogg_saronAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { @@ -979,7 +979,7 @@ CreatureAI* GetAI_npc_voice_yogg_saron(Creature* pCreature) ## npc_brain_yogg_saron ######*/ -struct MANGOS_DLL_DECL npc_brain_yogg_saronAI : public Scripted_NoMovementAI, private DialogueHelper +struct npc_brain_yogg_saronAI : public Scripted_NoMovementAI, private DialogueHelper { npc_brain_yogg_saronAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature), DialogueHelper(aYoggIllusionsDialog) @@ -1215,7 +1215,7 @@ CreatureAI* GetAI_npc_brain_yogg_saron(Creature* pCreature) ## npc_guardian_of_yogg ######*/ -struct MANGOS_DLL_DECL npc_guardian_of_yoggAI : public ScriptedAI +struct npc_guardian_of_yoggAI : public ScriptedAI { npc_guardian_of_yoggAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -1311,7 +1311,7 @@ CreatureAI* GetAI_npc_guardian_of_yogg(Creature* pCreature) ## npc_immortal_guardian ######*/ -struct MANGOS_DLL_DECL npc_immortal_guardianAI : public ScriptedAI +struct npc_immortal_guardianAI : public ScriptedAI { npc_immortal_guardianAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -1409,7 +1409,7 @@ bool EffectDummyCreature_npc_immortal_guardian(Unit* /*pCaster*/, uint32 uiSpell ## npc_constrictor_tentacle ######*/ -struct MANGOS_DLL_DECL npc_constrictor_tentacleAI : public Scripted_NoMovementAI +struct npc_constrictor_tentacleAI : public Scripted_NoMovementAI { npc_constrictor_tentacleAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { @@ -1437,7 +1437,7 @@ CreatureAI* GetAI_npc_constrictor_tentacle(Creature* pCreature) ## npc_ominous_cloud ######*/ -struct MANGOS_DLL_DECL npc_ominous_cloudAI : public Scripted_NoMovementAI +struct npc_ominous_cloudAI : public Scripted_NoMovementAI { npc_ominous_cloudAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { Reset(); } @@ -1495,7 +1495,7 @@ CreatureAI* GetAI_npc_ominous_cloud(Creature* pCreature) ## npc_death_ray ######*/ -struct MANGOS_DLL_DECL npc_death_rayAI : public ScriptedAI +struct npc_death_rayAI : public ScriptedAI { npc_death_rayAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } @@ -1537,7 +1537,7 @@ CreatureAI* GetAI_npc_death_ray(Creature* pCreature) ## npc_descent_madness ######*/ -struct MANGOS_DLL_DECL npc_descent_madnessAI : public Scripted_NoMovementAI +struct npc_descent_madnessAI : public Scripted_NoMovementAI { npc_descent_madnessAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { @@ -1587,7 +1587,7 @@ bool NpcSpellClick_npc_descent_madness(Player* pPlayer, Creature* pClickedCreatu ######*/ // TODO Remove this 'script' when combat can be proper prevented from core-side -struct MANGOS_DLL_DECL npc_laughing_skullAI : public Scripted_NoMovementAI +struct npc_laughing_skullAI : public Scripted_NoMovementAI { npc_laughing_skullAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { Reset(); } @@ -1606,7 +1606,7 @@ CreatureAI* GetAI_npc_laughing_skull(Creature* pCreature) ## npc_keeper_mimiron ######*/ -struct MANGOS_DLL_DECL npc_keeper_mimironAI : public Scripted_NoMovementAI +struct npc_keeper_mimironAI : public Scripted_NoMovementAI { npc_keeper_mimironAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { Reset(); } @@ -1651,7 +1651,7 @@ CreatureAI* GetAI_npc_keeper_mimiron(Creature* pCreature) ######*/ // TODO Remove this 'script' when combat can be proper prevented from core-side -struct MANGOS_DLL_DECL npc_keeper_thorimAI : public Scripted_NoMovementAI +struct npc_keeper_thorimAI : public Scripted_NoMovementAI { npc_keeper_thorimAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { Reset(); } diff --git a/scripts/northrend/ulduar/ulduar/ulduar.cpp b/scripts/northrend/ulduar/ulduar/ulduar.cpp index a04ad251d..cb9e6c6a0 100644 --- a/scripts/northrend/ulduar/ulduar/ulduar.cpp +++ b/scripts/northrend/ulduar/ulduar/ulduar.cpp @@ -360,7 +360,7 @@ enum MAX_KEEPER_DISTANCE = 70, }; -struct MANGOS_DLL_DECL npc_storm_tempered_keeperAI : public ScriptedAI +struct npc_storm_tempered_keeperAI : public ScriptedAI { npc_storm_tempered_keeperAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } @@ -464,7 +464,7 @@ CreatureAI* GetAI_npc_storm_tempered_keeper(Creature* pCreature) ## npc_charged_sphere ######*/ -struct MANGOS_DLL_DECL npc_charged_sphereAI : public ScriptedAI +struct npc_charged_sphereAI : public ScriptedAI { npc_charged_sphereAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } diff --git a/scripts/northrend/ulduar/ulduar/ulduar.h b/scripts/northrend/ulduar/ulduar/ulduar.h index 9d718337d..d1d72e70c 100644 --- a/scripts/northrend/ulduar/ulduar/ulduar.h +++ b/scripts/northrend/ulduar/ulduar/ulduar.h @@ -529,7 +529,7 @@ static const float afProspectorSpawnPos[4] = { 1556.469f, 143.5023f, 427.2918f, // spawn location for Algalon in reload case static const float afAlgalonMovePos[4] = {1632.668f, -302.7656f, 417.3211f, 1.53f}; -class MANGOS_DLL_DECL instance_ulduar : public ScriptedInstance, private DialogueHelper +class instance_ulduar : public ScriptedInstance, private DialogueHelper { public: instance_ulduar(Map* pMap); diff --git a/scripts/northrend/utgarde_keep/utgarde_keep/boss_ingvar.cpp b/scripts/northrend/utgarde_keep/utgarde_keep/boss_ingvar.cpp index d2fa63c4d..d8f0e5ae6 100644 --- a/scripts/northrend/utgarde_keep/utgarde_keep/boss_ingvar.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_keep/boss_ingvar.cpp @@ -82,7 +82,7 @@ enum ## boss_ingvar ######*/ -struct MANGOS_DLL_DECL boss_ingvarAI : public ScriptedAI +struct boss_ingvarAI : public ScriptedAI { boss_ingvarAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -302,7 +302,7 @@ CreatureAI* GetAI_boss_ingvar(Creature* pCreature) ## npc_annhylde ######*/ -struct MANGOS_DLL_DECL npc_annhyldeAI : public ScriptedAI +struct npc_annhyldeAI : public ScriptedAI { npc_annhyldeAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/northrend/utgarde_keep/utgarde_keep/boss_keleseth.cpp b/scripts/northrend/utgarde_keep/utgarde_keep/boss_keleseth.cpp index ec17515c8..3be86c04a 100644 --- a/scripts/northrend/utgarde_keep/utgarde_keep/boss_keleseth.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_keep/boss_keleseth.cpp @@ -56,7 +56,7 @@ static float fAddPosition[4] = {163.5727f, 252.1900f, 42.8684f, 5.57052f}; ## mob_vrykul_skeleton ######*/ -struct MANGOS_DLL_DECL mob_vrykul_skeletonAI : public ScriptedAI +struct mob_vrykul_skeletonAI : public ScriptedAI { mob_vrykul_skeletonAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -176,7 +176,7 @@ CreatureAI* GetAI_mob_vrykul_skeleton(Creature* pCreature) ## boss_keleseth ######*/ -struct MANGOS_DLL_DECL boss_kelesethAI : public ScriptedAI +struct boss_kelesethAI : public ScriptedAI { boss_kelesethAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/northrend/utgarde_keep/utgarde_keep/boss_skarvald_and_dalronn.cpp b/scripts/northrend/utgarde_keep/utgarde_keep/boss_skarvald_and_dalronn.cpp index d2cf56d65..fddc10025 100644 --- a/scripts/northrend/utgarde_keep/utgarde_keep/boss_skarvald_and_dalronn.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_keep/boss_skarvald_and_dalronn.cpp @@ -74,7 +74,7 @@ Yell m_aYell[] = {SAY_DAL_DEATH, SAY_SKA_DAL_DIES_REPLY} }; -struct MANGOS_DLL_DECL boss_s_and_d_dummyAI : public ScriptedAI +struct boss_s_and_d_dummyAI : public ScriptedAI { boss_s_and_d_dummyAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -166,7 +166,7 @@ struct MANGOS_DLL_DECL boss_s_and_d_dummyAI : public ScriptedAI ## boss_skarvald ######*/ -struct MANGOS_DLL_DECL boss_skarvaldAI : public boss_s_and_d_dummyAI +struct boss_skarvaldAI : public boss_s_and_d_dummyAI { boss_skarvaldAI(Creature* pCreature) : boss_s_and_d_dummyAI(pCreature) { Reset(); } @@ -251,7 +251,7 @@ CreatureAI* GetAI_boss_skarvald(Creature* pCreature) ## boss_dalronn ######*/ -struct MANGOS_DLL_DECL boss_dalronnAI : public boss_s_and_d_dummyAI +struct boss_dalronnAI : public boss_s_and_d_dummyAI { boss_dalronnAI(Creature* pCreature) : boss_s_and_d_dummyAI(pCreature) { Reset(); } diff --git a/scripts/northrend/utgarde_keep/utgarde_keep/utgarde_keep.cpp b/scripts/northrend/utgarde_keep/utgarde_keep/utgarde_keep.cpp index e1fc37755..8d3cf0c72 100644 --- a/scripts/northrend/utgarde_keep/utgarde_keep/utgarde_keep.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_keep/utgarde_keep.cpp @@ -41,7 +41,7 @@ enum MAX_FORGE = 3 }; -struct MANGOS_DLL_DECL mob_dragonflayer_forge_masterAI : public ScriptedAI +struct mob_dragonflayer_forge_masterAI : public ScriptedAI { mob_dragonflayer_forge_masterAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/northrend/utgarde_keep/utgarde_keep/utgarde_keep.h b/scripts/northrend/utgarde_keep/utgarde_keep/utgarde_keep.h index 52a67a15e..b89e9ee6a 100644 --- a/scripts/northrend/utgarde_keep/utgarde_keep/utgarde_keep.h +++ b/scripts/northrend/utgarde_keep/utgarde_keep/utgarde_keep.h @@ -36,7 +36,7 @@ enum ACHIEV_CRIT_ON_THE_ROCKS = 7231, }; -class MANGOS_DLL_DECL instance_utgarde_keep : public ScriptedInstance +class instance_utgarde_keep : public ScriptedInstance { public: instance_utgarde_keep(Map* pMap); diff --git a/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_gortok.cpp b/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_gortok.cpp index 970768402..126b59c4b 100644 --- a/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_gortok.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_gortok.cpp @@ -46,7 +46,7 @@ enum ## boss_gortok ######*/ -struct MANGOS_DLL_DECL boss_gortokAI : public ScriptedAI +struct boss_gortokAI : public ScriptedAI { boss_gortokAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_skadi.cpp b/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_skadi.cpp index 01979ea3f..760b9ceeb 100644 --- a/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_skadi.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_skadi.cpp @@ -91,7 +91,7 @@ static const GauntletIntroData aSkadiIntroData[MAX_INTRO_MOBS] = ## boss_skadi ######*/ -struct MANGOS_DLL_DECL boss_skadiAI : public ScriptedAI +struct boss_skadiAI : public ScriptedAI { boss_skadiAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -305,7 +305,7 @@ CreatureAI* GetAI_boss_skadi(Creature* pCreature) ## npc_grauf ######*/ -struct MANGOS_DLL_DECL npc_graufAI : public ScriptedAI +struct npc_graufAI : public ScriptedAI { npc_graufAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_svala.cpp b/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_svala.cpp index 18ff1c747..2e6d77b1a 100644 --- a/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_svala.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_svala.cpp @@ -74,7 +74,7 @@ enum ## boss_svala ######*/ -struct MANGOS_DLL_DECL boss_svalaAI : public ScriptedAI +struct boss_svalaAI : public ScriptedAI { boss_svalaAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_ymiron.cpp b/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_ymiron.cpp index a4751d8b7..936623db4 100644 --- a/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_ymiron.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_ymiron.cpp @@ -102,7 +102,7 @@ static const BoatSpirits aYmironBoatsSpirits[MAX_BOATS] = ## boss_ymiron ######*/ -struct MANGOS_DLL_DECL boss_ymironAI : public ScriptedAI +struct boss_ymironAI : public ScriptedAI { boss_ymironAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/northrend/utgarde_keep/utgarde_pinnacle/utgarde_pinnacle.h b/scripts/northrend/utgarde_keep/utgarde_pinnacle/utgarde_pinnacle.h index 1d6f7112c..2444aa1f1 100644 --- a/scripts/northrend/utgarde_keep/utgarde_pinnacle/utgarde_pinnacle.h +++ b/scripts/northrend/utgarde_keep/utgarde_pinnacle/utgarde_pinnacle.h @@ -69,7 +69,7 @@ static const float aOrbPositions[2][3] = static const uint32 aGortokMiniBosses[MAX_ENCOUNTER] = {NPC_WORGEN, NPC_FURBOLG, NPC_JORMUNGAR, NPC_RHINO}; -class MANGOS_DLL_DECL instance_pinnacle : public ScriptedInstance +class instance_pinnacle : public ScriptedInstance { public: instance_pinnacle(Map* pMap); diff --git a/scripts/northrend/violet_hold/boss_erekem.cpp b/scripts/northrend/violet_hold/boss_erekem.cpp index 90d2c6889..eb1ec4c86 100644 --- a/scripts/northrend/violet_hold/boss_erekem.cpp +++ b/scripts/northrend/violet_hold/boss_erekem.cpp @@ -51,7 +51,7 @@ enum SPELL_STRIKE = 14516 }; -struct MANGOS_DLL_DECL boss_erekemAI : public ScriptedAI +struct boss_erekemAI : public ScriptedAI { boss_erekemAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -173,7 +173,7 @@ CreatureAI* GetAI_boss_erekem(Creature* pCreature) return new boss_erekemAI(pCreature); } -struct MANGOS_DLL_DECL npc_erekem_guardAI : public ScriptedAI +struct npc_erekem_guardAI : public ScriptedAI { npc_erekem_guardAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/northrend/violet_hold/boss_ichoron.cpp b/scripts/northrend/violet_hold/boss_ichoron.cpp index 004eeef03..7183b336b 100644 --- a/scripts/northrend/violet_hold/boss_ichoron.cpp +++ b/scripts/northrend/violet_hold/boss_ichoron.cpp @@ -59,7 +59,7 @@ enum static const uint32 aWaterGlobuleSpells[5] = {SPELL_WATER_GLOBULE_SPAWN_1, SPELL_WATER_GLOBULE_SPAWN_2, SPELL_WATER_GLOBULE_SPAWN_3, SPELL_WATER_GLOBULE_SPAWN_4, SPELL_WATER_GLOBULE_SPAWN_5}; -struct MANGOS_DLL_DECL boss_ichoronAI : public ScriptedAI +struct boss_ichoronAI : public ScriptedAI { boss_ichoronAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/northrend/violet_hold/violet_hold.cpp b/scripts/northrend/violet_hold/violet_hold.cpp index 25e339983..2071874d6 100644 --- a/scripts/northrend/violet_hold/violet_hold.cpp +++ b/scripts/northrend/violet_hold/violet_hold.cpp @@ -84,7 +84,7 @@ enum SPELL_TELEPORT_INSIDE = 62138, // script effect - should trigger 62139 }; -struct MANGOS_DLL_DECL npc_sinclariAI : public npc_escortAI +struct npc_sinclariAI : public npc_escortAI { npc_sinclariAI(Creature* pCreature) : npc_escortAI(pCreature) { @@ -220,7 +220,7 @@ bool GossipSelect_npc_sinclari(Player* pPlayer, Creature* pCreature, uint32 /*ui ## npc_prison_event_controller ######*/ -struct MANGOS_DLL_DECL npc_prison_event_controllerAI : public ScriptedAI +struct npc_prison_event_controllerAI : public ScriptedAI { npc_prison_event_controllerAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -411,7 +411,7 @@ CreatureAI* GetAI_npc_prison_event_controller(Creature* pCreature) static const uint32 aTrashPortalNpcs[4] = {NPC_AZURE_CAPTAIN, NPC_AZURE_RAIDER, NPC_AZURE_SORCEROR, NPC_AZURE_STALKER}; -struct MANGOS_DLL_DECL npc_teleportation_portalAI : public ScriptedAI +struct npc_teleportation_portalAI : public ScriptedAI { npc_teleportation_portalAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/northrend/violet_hold/violet_hold.h b/scripts/northrend/violet_hold/violet_hold.h index 01466fdb6..6388081e1 100644 --- a/scripts/northrend/violet_hold/violet_hold.h +++ b/scripts/northrend/violet_hold/violet_hold.h @@ -189,7 +189,7 @@ static const BossInformation aBossInformation[] = {TYPE_MORAGG, NPC_MORAGG, NPC_WATCHER, 1, 1890.51f, 752.85f, 47.66f, 0} }; -class MANGOS_DLL_DECL instance_violet_hold : public ScriptedInstance +class instance_violet_hold : public ScriptedInstance { public: instance_violet_hold(Map* pMap); diff --git a/scripts/northrend/zuldrak.cpp b/scripts/northrend/zuldrak.cpp index 88134de10..6328b970c 100644 --- a/scripts/northrend/zuldrak.cpp +++ b/scripts/northrend/zuldrak.cpp @@ -47,7 +47,7 @@ enum static float m_afSpawnLocation[] = {5768.71f, -2969.29f, 273.816f}; static uint32 m_auiBosses[] = {NPC_AZBARIN, NPC_DUKE_SINGEN, NPC_ERATHIUS, NPC_GARGORAL}; -struct MANGOS_DLL_DECL npc_gurgthockAI : public ScriptedAI +struct npc_gurgthockAI : public ScriptedAI { npc_gurgthockAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } @@ -110,7 +110,7 @@ enum NPC_DECAYING_GHOUL = 28565, }; -struct MANGOS_DLL_DECL npc_ghoul_feeding_bunnyAI : public ScriptedAI +struct npc_ghoul_feeding_bunnyAI : public ScriptedAI { npc_ghoul_feeding_bunnyAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } @@ -171,7 +171,7 @@ enum NPC_GHOUL_FEEDING_BUNNY = 28591, }; -struct MANGOS_DLL_DECL npc_decaying_ghoulAI : public ScriptedAI +struct npc_decaying_ghoulAI : public ScriptedAI { npc_decaying_ghoulAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/outland/auchindoun/auchenai_crypts/boss_exarch_maladaar.cpp b/scripts/outland/auchindoun/auchenai_crypts/boss_exarch_maladaar.cpp index b6bd6f5e9..85d733734 100644 --- a/scripts/outland/auchindoun/auchenai_crypts/boss_exarch_maladaar.cpp +++ b/scripts/outland/auchindoun/auchenai_crypts/boss_exarch_maladaar.cpp @@ -45,7 +45,7 @@ enum SPELL_PLAGUE_STRIKE = 58339 }; -struct MANGOS_DLL_DECL mob_stolen_soulAI : public ScriptedAI +struct mob_stolen_soulAI : public ScriptedAI { mob_stolen_soulAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} @@ -158,7 +158,7 @@ enum NPC_DORE = 19412 }; -struct MANGOS_DLL_DECL boss_exarch_maladaarAI : public ScriptedAI +struct boss_exarch_maladaarAI : public ScriptedAI { boss_exarch_maladaarAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/outland/auchindoun/auchenai_crypts/boss_shirrak.cpp b/scripts/outland/auchindoun/auchenai_crypts/boss_shirrak.cpp index c4058cdd2..b8d5ed918 100644 --- a/scripts/outland/auchindoun/auchenai_crypts/boss_shirrak.cpp +++ b/scripts/outland/auchindoun/auchenai_crypts/boss_shirrak.cpp @@ -36,7 +36,7 @@ enum NPC_FOCUS_FIRE = 18374 }; -struct MANGOS_DLL_DECL boss_shirrakAI : public ScriptedAI +struct boss_shirrakAI : public ScriptedAI { boss_shirrakAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/outland/auchindoun/mana_tombs/boss_nexusprince_shaffar.cpp b/scripts/outland/auchindoun/mana_tombs/boss_nexusprince_shaffar.cpp index 151fc6d13..2eebfcfde 100644 --- a/scripts/outland/auchindoun/mana_tombs/boss_nexusprince_shaffar.cpp +++ b/scripts/outland/auchindoun/mana_tombs/boss_nexusprince_shaffar.cpp @@ -48,7 +48,7 @@ enum // SPELL_ETHEREAL_BEACON_VISUAL = 32368, // included in creature_template_addon }; -struct MANGOS_DLL_DECL boss_nexusprince_shaffarAI : public ScriptedAI +struct boss_nexusprince_shaffarAI : public ScriptedAI { boss_nexusprince_shaffarAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/outland/auchindoun/mana_tombs/boss_pandemonius.cpp b/scripts/outland/auchindoun/mana_tombs/boss_pandemonius.cpp index 97ec5b4f9..5e8a27471 100644 --- a/scripts/outland/auchindoun/mana_tombs/boss_pandemonius.cpp +++ b/scripts/outland/auchindoun/mana_tombs/boss_pandemonius.cpp @@ -41,7 +41,7 @@ enum MAX_VOID_BLASTS = 5, }; -struct MANGOS_DLL_DECL boss_pandemoniusAI : public ScriptedAI +struct boss_pandemoniusAI : public ScriptedAI { boss_pandemoniusAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/outland/auchindoun/sethekk_halls/boss_anzu.cpp b/scripts/outland/auchindoun/sethekk_halls/boss_anzu.cpp index 612c723aa..9c56767cc 100644 --- a/scripts/outland/auchindoun/sethekk_halls/boss_anzu.cpp +++ b/scripts/outland/auchindoun/sethekk_halls/boss_anzu.cpp @@ -50,7 +50,7 @@ enum static const uint32 aSpiritsEntries[3] = {NPC_FALCON_SPIRIT, NPC_HAWK_SPIRIT, NPC_EAGLE_SPIRIT}; -struct MANGOS_DLL_DECL boss_anzuAI : public ScriptedAI +struct boss_anzuAI : public ScriptedAI { boss_anzuAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/outland/auchindoun/sethekk_halls/boss_darkweaver_syth.cpp b/scripts/outland/auchindoun/sethekk_halls/boss_darkweaver_syth.cpp index 2d3fe2bcf..0569046c1 100644 --- a/scripts/outland/auchindoun/sethekk_halls/boss_darkweaver_syth.cpp +++ b/scripts/outland/auchindoun/sethekk_halls/boss_darkweaver_syth.cpp @@ -57,7 +57,7 @@ enum NPC_SHADOW_ELEMENTAL = 19206, }; -struct MANGOS_DLL_DECL boss_darkweaver_sythAI : public ScriptedAI +struct boss_darkweaver_sythAI : public ScriptedAI { boss_darkweaver_sythAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/outland/auchindoun/sethekk_halls/boss_talon_king_ikiss.cpp b/scripts/outland/auchindoun/sethekk_halls/boss_talon_king_ikiss.cpp index adc2ddaa9..649ecd8e0 100644 --- a/scripts/outland/auchindoun/sethekk_halls/boss_talon_king_ikiss.cpp +++ b/scripts/outland/auchindoun/sethekk_halls/boss_talon_king_ikiss.cpp @@ -50,7 +50,7 @@ enum SPELL_ARCANE_EXPLOSION_H = 40425, }; -struct MANGOS_DLL_DECL boss_talon_king_ikissAI : public ScriptedAI +struct boss_talon_king_ikissAI : public ScriptedAI { boss_talon_king_ikissAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/outland/auchindoun/sethekk_halls/sethekk_halls.h b/scripts/outland/auchindoun/sethekk_halls/sethekk_halls.h index 13242e5a8..33476f2c5 100644 --- a/scripts/outland/auchindoun/sethekk_halls/sethekk_halls.h +++ b/scripts/outland/auchindoun/sethekk_halls/sethekk_halls.h @@ -35,7 +35,7 @@ enum ITEM_PILGRIMS_ATTIRE = 46800, }; -class MANGOS_DLL_DECL instance_sethekk_halls : public ScriptedInstance +class instance_sethekk_halls : public ScriptedInstance { public: instance_sethekk_halls(Map* pMap); diff --git a/scripts/outland/auchindoun/shadow_labyrinth/boss_ambassador_hellmaw.cpp b/scripts/outland/auchindoun/shadow_labyrinth/boss_ambassador_hellmaw.cpp index 017001435..8f9fb2613 100644 --- a/scripts/outland/auchindoun/shadow_labyrinth/boss_ambassador_hellmaw.cpp +++ b/scripts/outland/auchindoun/shadow_labyrinth/boss_ambassador_hellmaw.cpp @@ -39,7 +39,7 @@ enum SPELL_ENRAGE = 34970 }; -struct MANGOS_DLL_DECL boss_ambassador_hellmawAI : public ScriptedAI +struct boss_ambassador_hellmawAI : public ScriptedAI { boss_ambassador_hellmawAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/outland/auchindoun/shadow_labyrinth/boss_blackheart_the_inciter.cpp b/scripts/outland/auchindoun/shadow_labyrinth/boss_blackheart_the_inciter.cpp index de46477a7..f4d78e231 100644 --- a/scripts/outland/auchindoun/shadow_labyrinth/boss_blackheart_the_inciter.cpp +++ b/scripts/outland/auchindoun/shadow_labyrinth/boss_blackheart_the_inciter.cpp @@ -53,7 +53,7 @@ enum SAY2_DEATH = -1555027, }; -struct MANGOS_DLL_DECL boss_blackheart_the_inciterAI : public ScriptedAI +struct boss_blackheart_the_inciterAI : public ScriptedAI { boss_blackheart_the_inciterAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/outland/auchindoun/shadow_labyrinth/boss_grandmaster_vorpil.cpp b/scripts/outland/auchindoun/shadow_labyrinth/boss_grandmaster_vorpil.cpp index 9d109bcc2..edf231953 100644 --- a/scripts/outland/auchindoun/shadow_labyrinth/boss_grandmaster_vorpil.cpp +++ b/scripts/outland/auchindoun/shadow_labyrinth/boss_grandmaster_vorpil.cpp @@ -77,7 +77,7 @@ static const float aVorpilTeleportLoc[3] = { -253.06f, -264.02f, 17.08f}; static const uint32 aTravelerSummonSpells[5] = {SPELL_SUMMON_VOIDWALKER_A, SPELL_SUMMON_VOIDWALKER_B, SPELL_SUMMON_VOIDWALKER_C, SPELL_SUMMON_VOIDWALKER_D, SPELL_SUMMON_VOIDWALKER_E}; -struct MANGOS_DLL_DECL boss_grandmaster_vorpilAI : public ScriptedAI +struct boss_grandmaster_vorpilAI : public ScriptedAI { boss_grandmaster_vorpilAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -263,7 +263,7 @@ CreatureAI* GetAI_boss_grandmaster_vorpil(Creature* pCreature) return new boss_grandmaster_vorpilAI(pCreature); } -struct MANGOS_DLL_DECL npc_void_travelerAI : public ScriptedAI +struct npc_void_travelerAI : public ScriptedAI { npc_void_travelerAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/outland/auchindoun/shadow_labyrinth/boss_murmur.cpp b/scripts/outland/auchindoun/shadow_labyrinth/boss_murmur.cpp index fed972ade..9b4117a86 100644 --- a/scripts/outland/auchindoun/shadow_labyrinth/boss_murmur.cpp +++ b/scripts/outland/auchindoun/shadow_labyrinth/boss_murmur.cpp @@ -44,7 +44,7 @@ enum SPELL_THUNDERING_STORM = 39365, // Heroic Spell }; -struct MANGOS_DLL_DECL boss_murmurAI : public Scripted_NoMovementAI +struct boss_murmurAI : public Scripted_NoMovementAI { boss_murmurAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { diff --git a/scripts/outland/auchindoun/shadow_labyrinth/shadow_labyrinth.h b/scripts/outland/auchindoun/shadow_labyrinth/shadow_labyrinth.h index f36404d39..c86e91fea 100644 --- a/scripts/outland/auchindoun/shadow_labyrinth/shadow_labyrinth.h +++ b/scripts/outland/auchindoun/shadow_labyrinth/shadow_labyrinth.h @@ -29,7 +29,7 @@ enum SPELL_BANISH = 30231, // spell is handled in creature_template_addon; }; -class MANGOS_DLL_DECL instance_shadow_labyrinth : public ScriptedInstance +class instance_shadow_labyrinth : public ScriptedInstance { public: instance_shadow_labyrinth(Map* pMap); diff --git a/scripts/outland/black_temple/black_temple.h b/scripts/outland/black_temple/black_temple.h index 840eec103..2ab6aecc0 100644 --- a/scripts/outland/black_temple/black_temple.h +++ b/scripts/outland/black_temple/black_temple.h @@ -55,7 +55,7 @@ enum GO_ILLIDAN_DOOR_L = 186262, }; -class MANGOS_DLL_DECL instance_black_temple : public ScriptedInstance +class instance_black_temple : public ScriptedInstance { public: instance_black_temple(Map* pMap); diff --git a/scripts/outland/black_temple/boss_bloodboil.cpp b/scripts/outland/black_temple/boss_bloodboil.cpp index c84cb2b5b..3b82d9d63 100644 --- a/scripts/outland/black_temple/boss_bloodboil.cpp +++ b/scripts/outland/black_temple/boss_bloodboil.cpp @@ -66,7 +66,7 @@ enum MAX_BLOODBOILS = 5, }; -struct MANGOS_DLL_DECL boss_gurtogg_bloodboilAI : public ScriptedAI +struct boss_gurtogg_bloodboilAI : public ScriptedAI { boss_gurtogg_bloodboilAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/outland/black_temple/boss_illidan.cpp b/scripts/outland/black_temple/boss_illidan.cpp index 58a3217ca..2a089460a 100644 --- a/scripts/outland/black_temple/boss_illidan.cpp +++ b/scripts/outland/black_temple/boss_illidan.cpp @@ -304,7 +304,7 @@ static const Locations aEyeBlastPos[] = ## boss_illidan_stormrage ######*/ -struct MANGOS_DLL_DECL boss_illidan_stormrageAI : public ScriptedAI, private DialogueHelper +struct boss_illidan_stormrageAI : public ScriptedAI, private DialogueHelper { boss_illidan_stormrageAI(Creature* pCreature) : ScriptedAI(pCreature), DialogueHelper(aEventDialogue) @@ -1002,7 +1002,7 @@ struct MANGOS_DLL_DECL boss_illidan_stormrageAI : public ScriptedAI, private Dia ## npc_akama_illidan ######*/ -struct MANGOS_DLL_DECL npc_akama_illidanAI : public npc_escortAI, private DialogueHelper +struct npc_akama_illidanAI : public npc_escortAI, private DialogueHelper { npc_akama_illidanAI(Creature* pCreature) : npc_escortAI(pCreature), DialogueHelper(aIntroDialogue) @@ -1285,7 +1285,7 @@ bool GossipSelect_npc_akama_illidan(Player* pPlayer, Creature* pCreature, uint32 ## boss_maiev ######*/ -struct MANGOS_DLL_DECL boss_maievAI : public ScriptedAI, private DialogueHelper +struct boss_maievAI : public ScriptedAI, private DialogueHelper { boss_maievAI(Creature* pCreature) : ScriptedAI(pCreature), DialogueHelper(aEpilogueDialogue) @@ -1413,7 +1413,7 @@ struct MANGOS_DLL_DECL boss_maievAI : public ScriptedAI, private DialogueHelper ## npc_cage_trap_trigger ######*/ -struct MANGOS_DLL_DECL npc_cage_trap_triggerAI : public ScriptedAI +struct npc_cage_trap_triggerAI : public ScriptedAI { npc_cage_trap_triggerAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } @@ -1454,7 +1454,7 @@ struct MANGOS_DLL_DECL npc_cage_trap_triggerAI : public ScriptedAI ## npc_flame_of_azzinoth ######*/ -struct MANGOS_DLL_DECL npc_flame_of_azzinothAI : public ScriptedAI +struct npc_flame_of_azzinothAI : public ScriptedAI { npc_flame_of_azzinothAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} @@ -1561,7 +1561,7 @@ struct MANGOS_DLL_DECL npc_flame_of_azzinothAI : public ScriptedAI ## npc_shadow_demon ######*/ -struct MANGOS_DLL_DECL npc_shadow_demonAI : public ScriptedAI +struct npc_shadow_demonAI : public ScriptedAI { npc_shadow_demonAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } @@ -1602,7 +1602,7 @@ struct MANGOS_DLL_DECL npc_shadow_demonAI : public ScriptedAI ## npc_blade_of_azzinoth ######*/ -struct MANGOS_DLL_DECL npc_blade_of_azzinothAI : public ScriptedAI +struct npc_blade_of_azzinothAI : public ScriptedAI { npc_blade_of_azzinothAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/outland/black_temple/boss_mother_shahraz.cpp b/scripts/outland/black_temple/boss_mother_shahraz.cpp index e3cb87bad..c5dd9ab98 100644 --- a/scripts/outland/black_temple/boss_mother_shahraz.cpp +++ b/scripts/outland/black_temple/boss_mother_shahraz.cpp @@ -63,7 +63,7 @@ static const uint32 aPrismaticAuras[] = static const uint32 aPeriodicBeams[] = {SPELL_SINFUL_PERIODIC, SPELL_SINISTER_PERIODIC, SPELL_VILE_PERIODIC, SPELL_WICKED_PERIODIC}; -struct MANGOS_DLL_DECL boss_shahrazAI : public ScriptedAI +struct boss_shahrazAI : public ScriptedAI { boss_shahrazAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/outland/black_temple/boss_reliquary_of_souls.cpp b/scripts/outland/black_temple/boss_reliquary_of_souls.cpp index beab1b69c..aabef147e 100644 --- a/scripts/outland/black_temple/boss_reliquary_of_souls.cpp +++ b/scripts/outland/black_temple/boss_reliquary_of_souls.cpp @@ -105,7 +105,7 @@ enum ## boss_reliquary_of_souls ######*/ -struct MANGOS_DLL_DECL boss_reliquary_of_soulsAI : public Scripted_NoMovementAI +struct boss_reliquary_of_soulsAI : public Scripted_NoMovementAI { boss_reliquary_of_soulsAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { @@ -321,7 +321,7 @@ struct MANGOS_DLL_DECL boss_reliquary_of_soulsAI : public Scripted_NoMovementAI ## essence_base_AI ######*/ -struct MANGOS_DLL_DECL essence_base_AI : public ScriptedAI +struct essence_base_AI : public ScriptedAI { essence_base_AI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -389,7 +389,7 @@ struct MANGOS_DLL_DECL essence_base_AI : public ScriptedAI ## boss_essence_of_suffering ######*/ -struct MANGOS_DLL_DECL boss_essence_of_sufferingAI : public essence_base_AI +struct boss_essence_of_sufferingAI : public essence_base_AI { boss_essence_of_sufferingAI(Creature* pCreature) : essence_base_AI(pCreature) { Reset(); } @@ -448,7 +448,7 @@ struct MANGOS_DLL_DECL boss_essence_of_sufferingAI : public essence_base_AI ## boss_essence_of_desire ######*/ -struct MANGOS_DLL_DECL boss_essence_of_desireAI : public essence_base_AI +struct boss_essence_of_desireAI : public essence_base_AI { boss_essence_of_desireAI(Creature* pCreature) : essence_base_AI(pCreature) { Reset(); } @@ -520,7 +520,7 @@ struct MANGOS_DLL_DECL boss_essence_of_desireAI : public essence_base_AI ## boss_essence_of_anger ######*/ -struct MANGOS_DLL_DECL boss_essence_of_angerAI : public ScriptedAI +struct boss_essence_of_angerAI : public ScriptedAI { boss_essence_of_angerAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -605,7 +605,7 @@ struct MANGOS_DLL_DECL boss_essence_of_angerAI : public ScriptedAI ## npc_enslaved_soul ######*/ -struct MANGOS_DLL_DECL npc_enslaved_soulAI : public ScriptedAI +struct npc_enslaved_soulAI : public ScriptedAI { npc_enslaved_soulAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/outland/black_temple/boss_shade_of_akama.cpp b/scripts/outland/black_temple/boss_shade_of_akama.cpp index ee80092e1..d3ade518a 100644 --- a/scripts/outland/black_temple/boss_shade_of_akama.cpp +++ b/scripts/outland/black_temple/boss_shade_of_akama.cpp @@ -109,7 +109,7 @@ static const Location afBrokenSpawnLoc[] = ## npc_akama ######*/ -struct MANGOS_DLL_DECL npc_akamaAI : public ScriptedAI, private DialogueHelper +struct npc_akamaAI : public ScriptedAI, private DialogueHelper { npc_akamaAI(Creature* pCreature) : ScriptedAI(pCreature), DialogueHelper(aOutroDialogue) @@ -515,7 +515,7 @@ bool GossipSelect_npc_akama(Player* pPlayer, Creature* pCreature, uint32 /*uiSen ## boss_shade_of_akama ######*/ -struct MANGOS_DLL_DECL boss_shade_of_akamaAI : public ScriptedAI +struct boss_shade_of_akamaAI : public ScriptedAI { boss_shade_of_akamaAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -589,7 +589,7 @@ struct MANGOS_DLL_DECL boss_shade_of_akamaAI : public ScriptedAI ## mob_ashtongue_channeler ######*/ -struct MANGOS_DLL_DECL mob_ashtongue_channelerAI : public ScriptedAI +struct mob_ashtongue_channelerAI : public ScriptedAI { mob_ashtongue_channelerAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -640,7 +640,7 @@ struct MANGOS_DLL_DECL mob_ashtongue_channelerAI : public ScriptedAI ## mob_ashtongue_sorcerer ######*/ -struct MANGOS_DLL_DECL mob_ashtongue_sorcererAI : public ScriptedAI +struct mob_ashtongue_sorcererAI : public ScriptedAI { mob_ashtongue_sorcererAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/outland/black_temple/boss_supremus.cpp b/scripts/outland/black_temple/boss_supremus.cpp index 3e99bdac6..daff991ca 100644 --- a/scripts/outland/black_temple/boss_supremus.cpp +++ b/scripts/outland/black_temple/boss_supremus.cpp @@ -60,7 +60,7 @@ const float RANGE_MOLTEN_PUNCH = 40.0; */ // TODO Remove this 'script' when combat movement can be proper prevented from core-side -struct MANGOS_DLL_DECL molten_flameAI : public Scripted_NoMovementAI +struct molten_flameAI : public Scripted_NoMovementAI { molten_flameAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { Reset(); } @@ -71,7 +71,7 @@ struct MANGOS_DLL_DECL molten_flameAI : public Scripted_NoMovementAI }; // TODO Remove this 'script' when combat movement can be proper prevented from core-side -struct MANGOS_DLL_DECL npc_volcanoAI : public Scripted_NoMovementAI +struct npc_volcanoAI : public Scripted_NoMovementAI { npc_volcanoAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { Reset(); } @@ -81,7 +81,7 @@ struct MANGOS_DLL_DECL npc_volcanoAI : public Scripted_NoMovementAI void UpdateAI(const uint32 /*uiDiff*/) override {} }; -struct MANGOS_DLL_DECL boss_supremusAI : public ScriptedAI +struct boss_supremusAI : public ScriptedAI { boss_supremusAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/outland/black_temple/boss_teron_gorefiend.cpp b/scripts/outland/black_temple/boss_teron_gorefiend.cpp index 15b681859..241b399ee 100644 --- a/scripts/outland/black_temple/boss_teron_gorefiend.cpp +++ b/scripts/outland/black_temple/boss_teron_gorefiend.cpp @@ -61,7 +61,7 @@ enum // NPC_VENGEFUL_SPIRIT = 23109, // npc controlled by the dead player }; -struct MANGOS_DLL_DECL boss_teron_gorefiendAI : public ScriptedAI +struct boss_teron_gorefiendAI : public ScriptedAI { boss_teron_gorefiendAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/outland/black_temple/boss_warlord_najentus.cpp b/scripts/outland/black_temple/boss_warlord_najentus.cpp index 2f6896db7..8beddbbed 100644 --- a/scripts/outland/black_temple/boss_warlord_najentus.cpp +++ b/scripts/outland/black_temple/boss_warlord_najentus.cpp @@ -47,7 +47,7 @@ enum SPELL_BERSERK = 26662 }; -struct MANGOS_DLL_DECL boss_najentusAI : public ScriptedAI +struct boss_najentusAI : public ScriptedAI { boss_najentusAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/outland/black_temple/illidari_council.cpp b/scripts/outland/black_temple/illidari_council.cpp index 998d26446..275d2bb68 100644 --- a/scripts/outland/black_temple/illidari_council.cpp +++ b/scripts/outland/black_temple/illidari_council.cpp @@ -116,7 +116,7 @@ static const uint32 aCouncilMember[] = {NPC_GATHIOS, NPC_VERAS, NPC_LADY_MALANDE ## mob_blood_elf_council_voice_trigger ######*/ -struct MANGOS_DLL_DECL mob_blood_elf_council_voice_triggerAI : public ScriptedAI +struct mob_blood_elf_council_voice_triggerAI : public ScriptedAI { mob_blood_elf_council_voice_triggerAI(Creature* pCreature) : ScriptedAI(pCreature), m_councilDialogue(aCouncilDialogue) @@ -184,7 +184,7 @@ struct MANGOS_DLL_DECL mob_blood_elf_council_voice_triggerAI : public ScriptedAI ## mob_illidari_council ######*/ -struct MANGOS_DLL_DECL mob_illidari_councilAI : public ScriptedAI +struct mob_illidari_councilAI : public ScriptedAI { mob_illidari_councilAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -279,7 +279,7 @@ struct MANGOS_DLL_DECL mob_illidari_councilAI : public ScriptedAI ## boss_illidari_council ######*/ -struct MANGOS_DLL_DECL boss_illidari_councilAI : public ScriptedAI +struct boss_illidari_councilAI : public ScriptedAI { boss_illidari_councilAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -351,7 +351,7 @@ struct MANGOS_DLL_DECL boss_illidari_councilAI : public ScriptedAI ## boss_gathios_the_shatterer ######*/ -struct MANGOS_DLL_DECL boss_gathios_the_shattererAI : public boss_illidari_councilAI +struct boss_gathios_the_shattererAI : public boss_illidari_councilAI { boss_gathios_the_shattererAI(Creature* pCreature) : boss_illidari_councilAI(pCreature) { Reset(); } @@ -459,7 +459,7 @@ struct MANGOS_DLL_DECL boss_gathios_the_shattererAI : public boss_illidari_counc ## boss_high_nethermancer_zerevor ######*/ -struct MANGOS_DLL_DECL boss_high_nethermancer_zerevorAI : public boss_illidari_councilAI +struct boss_high_nethermancer_zerevorAI : public boss_illidari_councilAI { boss_high_nethermancer_zerevorAI(Creature* pCreature) : boss_illidari_councilAI(pCreature) { Reset(); } @@ -564,7 +564,7 @@ struct MANGOS_DLL_DECL boss_high_nethermancer_zerevorAI : public boss_illidari_c ## boss_lady_malande ######*/ -struct MANGOS_DLL_DECL boss_lady_malandeAI : public boss_illidari_councilAI +struct boss_lady_malandeAI : public boss_illidari_councilAI { boss_lady_malandeAI(Creature* pCreature) : boss_illidari_councilAI(pCreature) { Reset(); } @@ -655,7 +655,7 @@ struct MANGOS_DLL_DECL boss_lady_malandeAI : public boss_illidari_councilAI ## boss_veras_darkshadow ######*/ -struct MANGOS_DLL_DECL boss_veras_darkshadowAI : public boss_illidari_councilAI +struct boss_veras_darkshadowAI : public boss_illidari_councilAI { boss_veras_darkshadowAI(Creature* pCreature) : boss_illidari_councilAI(pCreature) { Reset(); } diff --git a/scripts/outland/blades_edge_mountains.cpp b/scripts/outland/blades_edge_mountains.cpp index c828a6449..ee5cc4b7f 100644 --- a/scripts/outland/blades_edge_mountains.cpp +++ b/scripts/outland/blades_edge_mountains.cpp @@ -59,7 +59,7 @@ enum static const uint32 aNetherDrakeEntries[MAX_ENTRIES] = {NPC_PROTO, NPC_ADOLESCENT, NPC_MATURE, NPC_NIHIL}; -struct MANGOS_DLL_DECL mobs_nether_drakeAI : public ScriptedAI +struct mobs_nether_drakeAI : public ScriptedAI { mobs_nether_drakeAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } @@ -222,7 +222,7 @@ enum SPELL_LASHHAN_CHANNEL = 36904 }; -struct MANGOS_DLL_DECL npc_daranelleAI : public ScriptedAI +struct npc_daranelleAI : public ScriptedAI { npc_daranelleAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} @@ -267,7 +267,7 @@ enum static const uint32 aOgreEntries[] = {19995, 19998, 20334, 20723, 20726, 20730, 20731, 20732, 21296}; -struct MANGOS_DLL_DECL npc_bloodmaul_stout_triggerAI : public ScriptedAI +struct npc_bloodmaul_stout_triggerAI : public ScriptedAI { npc_bloodmaul_stout_triggerAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } @@ -490,7 +490,7 @@ static const SimonGame aApexisGameData[4] = {COLOR_IDX_YELLOW, SPELL_BUTTON_PUSH_YELLOW, SPELL_INTROSPECTION_YELLOW, SOUND_ID_YELLOW} }; -struct MANGOS_DLL_DECL npc_simon_game_bunnyAI : public ScriptedAI +struct npc_simon_game_bunnyAI : public ScriptedAI { npc_simon_game_bunnyAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } diff --git a/scripts/outland/boss_doomlord_kazzak.cpp b/scripts/outland/boss_doomlord_kazzak.cpp index ff52f5db7..cf2c13f10 100644 --- a/scripts/outland/boss_doomlord_kazzak.cpp +++ b/scripts/outland/boss_doomlord_kazzak.cpp @@ -49,7 +49,7 @@ enum SPELL_BERSERK = 32965, // triggers 32963 }; -struct MANGOS_DLL_DECL boss_doomlordkazzakAI : public ScriptedAI +struct boss_doomlordkazzakAI : public ScriptedAI { boss_doomlordkazzakAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } diff --git a/scripts/outland/boss_doomwalker.cpp b/scripts/outland/boss_doomwalker.cpp index 6f38106c0..50b15c95b 100644 --- a/scripts/outland/boss_doomwalker.cpp +++ b/scripts/outland/boss_doomwalker.cpp @@ -44,7 +44,7 @@ enum SPELL_MARK_OF_DEATH_AURA = 37125, // triggers 37131 on target if it has aura 37128 }; -struct MANGOS_DLL_DECL boss_doomwalkerAI : public ScriptedAI +struct boss_doomwalkerAI : public ScriptedAI { boss_doomwalkerAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } diff --git a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_fathomlord_karathress.cpp b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_fathomlord_karathress.cpp index 790955563..2ec63722e 100644 --- a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_fathomlord_karathress.cpp +++ b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_fathomlord_karathress.cpp @@ -83,7 +83,7 @@ static const uint32 aAdvisors[MAX_ADVISORS] = {NPC_SHARKKIS, NPC_TIDALVESS, NPC_ ## boss_fathomlord_karathress ######*/ -struct MANGOS_DLL_DECL boss_fathomlord_karathressAI : public ScriptedAI +struct boss_fathomlord_karathressAI : public ScriptedAI { boss_fathomlord_karathressAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -230,7 +230,7 @@ struct MANGOS_DLL_DECL boss_fathomlord_karathressAI : public ScriptedAI ## boss_fathomguard_sharkkis ######*/ -struct MANGOS_DLL_DECL boss_fathomguard_sharkkisAI : public ScriptedAI +struct boss_fathomguard_sharkkisAI : public ScriptedAI { boss_fathomguard_sharkkisAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } @@ -330,7 +330,7 @@ struct MANGOS_DLL_DECL boss_fathomguard_sharkkisAI : public ScriptedAI ## boss_fathomguard_tidalvess ######*/ -struct MANGOS_DLL_DECL boss_fathomguard_tidalvessAI : public ScriptedAI +struct boss_fathomguard_tidalvessAI : public ScriptedAI { boss_fathomguard_tidalvessAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } @@ -395,7 +395,7 @@ struct MANGOS_DLL_DECL boss_fathomguard_tidalvessAI : public ScriptedAI ## boss_fathomguard_caribdis ######*/ -struct MANGOS_DLL_DECL boss_fathomguard_caribdisAI : public ScriptedAI +struct boss_fathomguard_caribdisAI : public ScriptedAI { boss_fathomguard_caribdisAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } diff --git a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_hydross_the_unstable.cpp b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_hydross_the_unstable.cpp index b168f0137..a23f3ea56 100644 --- a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_hydross_the_unstable.cpp +++ b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_hydross_the_unstable.cpp @@ -64,7 +64,7 @@ static const uint32 aMarkCorruption[MAX_HYDROSS_MARKS] = {38219, 38220, 38221, 3 static const float aElementalCleanPoint[3] = { -231.48f, -343.05f, -1.58f}; static const float aElementalExitPoint[3] = { -177.41f, -395.72f, -1.60f}; -struct MANGOS_DLL_DECL boss_hydross_the_unstableAI : public ScriptedAI +struct boss_hydross_the_unstableAI : public ScriptedAI { boss_hydross_the_unstableAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_lady_vashj.cpp b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_lady_vashj.cpp index 0bd897da4..703f066eb 100644 --- a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_lady_vashj.cpp +++ b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_lady_vashj.cpp @@ -105,7 +105,7 @@ const float afCoilfangStriderPos[3][4] = { -12.843f, -907.798f, 41.239620f, 6.087f} }; -struct MANGOS_DLL_DECL boss_lady_vashjAI : public ScriptedAI +struct boss_lady_vashjAI : public ScriptedAI { boss_lady_vashjAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -446,7 +446,7 @@ struct MANGOS_DLL_DECL boss_lady_vashjAI : public ScriptedAI } }; -struct MANGOS_DLL_DECL mob_enchanted_elementalAI : public ScriptedAI +struct mob_enchanted_elementalAI : public ScriptedAI { mob_enchanted_elementalAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_leotheras_the_blind.cpp b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_leotheras_the_blind.cpp index 0dd1f0be2..62ca4603c 100644 --- a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_leotheras_the_blind.cpp +++ b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_leotheras_the_blind.cpp @@ -62,7 +62,7 @@ enum NPC_SHADOW_LEO = 21875 }; -struct MANGOS_DLL_DECL boss_leotheras_the_blindAI : public ScriptedAI +struct boss_leotheras_the_blindAI : public ScriptedAI { boss_leotheras_the_blindAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_morogrim_tidewalker.cpp b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_morogrim_tidewalker.cpp index 3e5e584ff..2990e972e 100644 --- a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_morogrim_tidewalker.cpp +++ b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_morogrim_tidewalker.cpp @@ -70,7 +70,7 @@ enum static const uint32 m_auiSpellWateryGraveTeleport[] = { 37850, 38023, 38024, 38025 }; -struct MANGOS_DLL_DECL boss_morogrim_tidewalkerAI : public ScriptedAI +struct boss_morogrim_tidewalkerAI : public ScriptedAI { boss_morogrim_tidewalkerAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -240,7 +240,7 @@ struct MANGOS_DLL_DECL boss_morogrim_tidewalkerAI : public ScriptedAI } }; -struct MANGOS_DLL_DECL mob_water_globuleAI : public ScriptedAI +struct mob_water_globuleAI : public ScriptedAI { mob_water_globuleAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } diff --git a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_the_lurker_below.cpp b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_the_lurker_below.cpp index ac579faf5..76bf50aaf 100644 --- a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_the_lurker_below.cpp +++ b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_the_lurker_below.cpp @@ -71,7 +71,7 @@ static const AddsLocations aLurkerLoc[MAX_SUBMERGE_ADDS] = {NPC_COILFANG_GUARDIAN, 42.471f, -445.115f, -19.76f}, }; -struct MANGOS_DLL_DECL boss_the_lurker_belowAI : public Scripted_NoMovementAI +struct boss_the_lurker_belowAI : public Scripted_NoMovementAI { boss_the_lurker_belowAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { diff --git a/scripts/outland/coilfang_reservoir/serpent_shrine/serpent_shrine.h b/scripts/outland/coilfang_reservoir/serpent_shrine/serpent_shrine.h index 1540dc01b..52b4ca42a 100644 --- a/scripts/outland/coilfang_reservoir/serpent_shrine/serpent_shrine.h +++ b/scripts/outland/coilfang_reservoir/serpent_shrine/serpent_shrine.h @@ -54,7 +54,7 @@ enum SPELL_LEOTHERAS_BANISH = 37546, }; -class MANGOS_DLL_DECL instance_serpentshrine_cavern : public ScriptedInstance +class instance_serpentshrine_cavern : public ScriptedInstance { public: instance_serpentshrine_cavern(Map* pMap); diff --git a/scripts/outland/coilfang_reservoir/slave_pens/boss_ahune.cpp b/scripts/outland/coilfang_reservoir/slave_pens/boss_ahune.cpp index 308eaa221..8a0eee304 100644 --- a/scripts/outland/coilfang_reservoir/slave_pens/boss_ahune.cpp +++ b/scripts/outland/coilfang_reservoir/slave_pens/boss_ahune.cpp @@ -78,7 +78,7 @@ enum ## boss_ahune ######*/ -struct MANGOS_DLL_DECL boss_ahuneAI : public Scripted_NoMovementAI +struct boss_ahuneAI : public Scripted_NoMovementAI { boss_ahuneAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { @@ -275,7 +275,7 @@ CreatureAI* GetAI_boss_ahune(Creature* pCreature) ## npc_frozen_core ######*/ -struct MANGOS_DLL_DECL npc_frozen_coreAI : public Scripted_NoMovementAI +struct npc_frozen_coreAI : public Scripted_NoMovementAI { npc_frozen_coreAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { Reset(); } @@ -321,7 +321,7 @@ CreatureAI* GetAI_npc_frozen_core(Creature* pCreature) ## npc_ice_spear_bunny ######*/ -struct MANGOS_DLL_DECL npc_ice_spear_bunnyAI : public Scripted_NoMovementAI +struct npc_ice_spear_bunnyAI : public Scripted_NoMovementAI { npc_ice_spear_bunnyAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { Reset(); } diff --git a/scripts/outland/coilfang_reservoir/steam_vault/boss_hydromancer_thespia.cpp b/scripts/outland/coilfang_reservoir/steam_vault/boss_hydromancer_thespia.cpp index f1335daad..109a6c06c 100644 --- a/scripts/outland/coilfang_reservoir/steam_vault/boss_hydromancer_thespia.cpp +++ b/scripts/outland/coilfang_reservoir/steam_vault/boss_hydromancer_thespia.cpp @@ -46,7 +46,7 @@ enum SPELL_SUMMON_ELEMENTALS = 31476, // not sure where to use this }; -struct MANGOS_DLL_DECL boss_thespiaAI : public ScriptedAI +struct boss_thespiaAI : public ScriptedAI { boss_thespiaAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/outland/coilfang_reservoir/steam_vault/boss_mekgineer_steamrigger.cpp b/scripts/outland/coilfang_reservoir/steam_vault/boss_mekgineer_steamrigger.cpp index 0608831ae..38a97d5c4 100644 --- a/scripts/outland/coilfang_reservoir/steam_vault/boss_mekgineer_steamrigger.cpp +++ b/scripts/outland/coilfang_reservoir/steam_vault/boss_mekgineer_steamrigger.cpp @@ -67,7 +67,7 @@ static const SummonLocation aSteamriggerSpawnLocs[] = { -331.161f, -112.212f, -7.66f}, }; -struct MANGOS_DLL_DECL boss_mekgineer_steamriggerAI : public ScriptedAI +struct boss_mekgineer_steamriggerAI : public ScriptedAI { boss_mekgineer_steamriggerAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -212,7 +212,7 @@ CreatureAI* GetAI_boss_mekgineer_steamrigger(Creature* pCreature) return new boss_mekgineer_steamriggerAI(pCreature); } -struct MANGOS_DLL_DECL mob_steamrigger_mechanicAI : public ScriptedAI +struct mob_steamrigger_mechanicAI : public ScriptedAI { mob_steamrigger_mechanicAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/outland/coilfang_reservoir/steam_vault/boss_warlord_kalithresh.cpp b/scripts/outland/coilfang_reservoir/steam_vault/boss_warlord_kalithresh.cpp index bc7c2bc22..3b60d5d9e 100644 --- a/scripts/outland/coilfang_reservoir/steam_vault/boss_warlord_kalithresh.cpp +++ b/scripts/outland/coilfang_reservoir/steam_vault/boss_warlord_kalithresh.cpp @@ -41,7 +41,7 @@ enum SPELL_WARLORDS_RAGE_NAGA = 31543, // triggers 37076 }; -struct MANGOS_DLL_DECL boss_warlord_kalithreshAI : public ScriptedAI +struct boss_warlord_kalithreshAI : public ScriptedAI { boss_warlord_kalithreshAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -211,7 +211,7 @@ bool EffectAuraDummy_spell_aura_dummy_warlord_rage(const Aura* pAura, bool bAppl return true; } -struct MANGOS_DLL_DECL mob_naga_distillerAI : public Scripted_NoMovementAI +struct mob_naga_distillerAI : public Scripted_NoMovementAI { mob_naga_distillerAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { Reset(); } diff --git a/scripts/outland/coilfang_reservoir/steam_vault/steam_vault.h b/scripts/outland/coilfang_reservoir/steam_vault/steam_vault.h index 9f6c1c32a..a8db93d76 100644 --- a/scripts/outland/coilfang_reservoir/steam_vault/steam_vault.h +++ b/scripts/outland/coilfang_reservoir/steam_vault/steam_vault.h @@ -23,7 +23,7 @@ enum GO_ACCESS_PANEL_MEK = 184126, }; -class MANGOS_DLL_DECL instance_steam_vault : public ScriptedInstance +class instance_steam_vault : public ScriptedInstance { public: instance_steam_vault(Map* pMap); diff --git a/scripts/outland/coilfang_reservoir/underbog/boss_hungarfen.cpp b/scripts/outland/coilfang_reservoir/underbog/boss_hungarfen.cpp index becdbd111..65b6bd443 100644 --- a/scripts/outland/coilfang_reservoir/underbog/boss_hungarfen.cpp +++ b/scripts/outland/coilfang_reservoir/underbog/boss_hungarfen.cpp @@ -37,7 +37,7 @@ enum NPC_UNDERBOG_MUSHROOM = 17990, }; -struct MANGOS_DLL_DECL boss_hungarfenAI : public ScriptedAI +struct boss_hungarfenAI : public ScriptedAI { boss_hungarfenAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -109,7 +109,7 @@ CreatureAI* GetAI_boss_hungarfen(Creature* pCreature) return new boss_hungarfenAI(pCreature); } -struct MANGOS_DLL_DECL mob_underbog_mushroomAI : public ScriptedAI +struct mob_underbog_mushroomAI : public ScriptedAI { mob_underbog_mushroomAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } diff --git a/scripts/outland/gruuls_lair/boss_gruul.cpp b/scripts/outland/gruuls_lair/boss_gruul.cpp index 716e6a2e4..aabf3ac66 100644 --- a/scripts/outland/gruuls_lair/boss_gruul.cpp +++ b/scripts/outland/gruuls_lair/boss_gruul.cpp @@ -52,7 +52,7 @@ enum SPELL_KNOCK_BACK = 24199 // Knockback spell until correct implementation is made }; -struct MANGOS_DLL_DECL boss_gruulAI : public ScriptedAI +struct boss_gruulAI : public ScriptedAI { boss_gruulAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/outland/gruuls_lair/boss_high_king_maulgar.cpp b/scripts/outland/gruuls_lair/boss_high_king_maulgar.cpp index 2c1a45455..84533e02e 100644 --- a/scripts/outland/gruuls_lair/boss_high_king_maulgar.cpp +++ b/scripts/outland/gruuls_lair/boss_high_king_maulgar.cpp @@ -68,7 +68,7 @@ enum }; // High King Maulgar AI -struct MANGOS_DLL_DECL boss_high_king_maulgarAI : public ScriptedAI +struct boss_high_king_maulgarAI : public ScriptedAI { boss_high_king_maulgarAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -207,7 +207,7 @@ struct MANGOS_DLL_DECL boss_high_king_maulgarAI : public ScriptedAI }; // Base AI for every council member -struct MANGOS_DLL_DECL Council_Base_AI : public ScriptedAI +struct Council_Base_AI : public ScriptedAI { Council_Base_AI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -234,7 +234,7 @@ struct MANGOS_DLL_DECL Council_Base_AI : public ScriptedAI }; // Olm The Summoner AI -struct MANGOS_DLL_DECL boss_olm_the_summonerAI : public Council_Base_AI +struct boss_olm_the_summonerAI : public Council_Base_AI { boss_olm_the_summonerAI(Creature* pCreature) : Council_Base_AI(pCreature) {Reset();} @@ -283,7 +283,7 @@ struct MANGOS_DLL_DECL boss_olm_the_summonerAI : public Council_Base_AI }; // Kiggler The Crazed AI -struct MANGOS_DLL_DECL boss_kiggler_the_crazedAI : public Council_Base_AI +struct boss_kiggler_the_crazedAI : public Council_Base_AI { boss_kiggler_the_crazedAI(Creature* pCreature) : Council_Base_AI(pCreature) {Reset();} @@ -373,7 +373,7 @@ struct MANGOS_DLL_DECL boss_kiggler_the_crazedAI : public Council_Base_AI }; // Blindeye The Seer AI -struct MANGOS_DLL_DECL boss_blindeye_the_seerAI : public Council_Base_AI +struct boss_blindeye_the_seerAI : public Council_Base_AI { boss_blindeye_the_seerAI(Creature* pCreature) : Council_Base_AI(pCreature) {Reset();} @@ -425,7 +425,7 @@ struct MANGOS_DLL_DECL boss_blindeye_the_seerAI : public Council_Base_AI }; // Krosh Firehand AI -struct MANGOS_DLL_DECL boss_krosh_firehandAI : public Council_Base_AI +struct boss_krosh_firehandAI : public Council_Base_AI { boss_krosh_firehandAI(Creature* pCreature) : Council_Base_AI(pCreature) {Reset();} diff --git a/scripts/outland/gruuls_lair/gruuls_lair.h b/scripts/outland/gruuls_lair/gruuls_lair.h index 64d66bcc0..d62ae5f7f 100644 --- a/scripts/outland/gruuls_lair/gruuls_lair.h +++ b/scripts/outland/gruuls_lair/gruuls_lair.h @@ -25,7 +25,7 @@ enum // NPC_OLM = 18834, }; -class MANGOS_DLL_DECL instance_gruuls_lair : public ScriptedInstance +class instance_gruuls_lair : public ScriptedInstance { public: instance_gruuls_lair(Map* pMap); diff --git a/scripts/outland/hellfire_citadel/blood_furnace/blood_furnace.h b/scripts/outland/hellfire_citadel/blood_furnace/blood_furnace.h index 487fcd3d0..2186059f5 100644 --- a/scripts/outland/hellfire_citadel/blood_furnace/blood_furnace.h +++ b/scripts/outland/hellfire_citadel/blood_furnace/blood_furnace.h @@ -54,7 +54,7 @@ struct BroggokEventInfo GuidSet m_sSortedOrcGuids; }; -class MANGOS_DLL_DECL instance_blood_furnace : public ScriptedInstance +class instance_blood_furnace : public ScriptedInstance { public: instance_blood_furnace(Map* pMap); diff --git a/scripts/outland/hellfire_citadel/blood_furnace/boss_broggok.cpp b/scripts/outland/hellfire_citadel/blood_furnace/boss_broggok.cpp index b0f804b22..43e4bca05 100644 --- a/scripts/outland/hellfire_citadel/blood_furnace/boss_broggok.cpp +++ b/scripts/outland/hellfire_citadel/blood_furnace/boss_broggok.cpp @@ -39,7 +39,7 @@ enum POINT_EVENT_COMBAT = 1, }; -struct MANGOS_DLL_DECL boss_broggokAI : public ScriptedAI +struct boss_broggokAI : public ScriptedAI { boss_broggokAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -154,7 +154,7 @@ struct MANGOS_DLL_DECL boss_broggokAI : public ScriptedAI } }; -struct MANGOS_DLL_DECL mob_broggok_poisoncloudAI : public ScriptedAI +struct mob_broggok_poisoncloudAI : public ScriptedAI { mob_broggok_poisoncloudAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} diff --git a/scripts/outland/hellfire_citadel/blood_furnace/boss_kelidan_the_breaker.cpp b/scripts/outland/hellfire_citadel/blood_furnace/boss_kelidan_the_breaker.cpp index 86bb8ba03..63308892d 100644 --- a/scripts/outland/hellfire_citadel/blood_furnace/boss_kelidan_the_breaker.cpp +++ b/scripts/outland/hellfire_citadel/blood_furnace/boss_kelidan_the_breaker.cpp @@ -68,7 +68,7 @@ struct SortByAngle WorldObject const* m_pRef; }; -struct MANGOS_DLL_DECL boss_kelidan_the_breakerAI : public ScriptedAI +struct boss_kelidan_the_breakerAI : public ScriptedAI { boss_kelidan_the_breakerAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -298,7 +298,7 @@ enum SPELL_MARK_OF_SHADOW = 30937, }; -struct MANGOS_DLL_DECL mob_shadowmoon_channelerAI : public ScriptedAI +struct mob_shadowmoon_channelerAI : public ScriptedAI { mob_shadowmoon_channelerAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/outland/hellfire_citadel/blood_furnace/boss_the_maker.cpp b/scripts/outland/hellfire_citadel/blood_furnace/boss_the_maker.cpp index 578e082f3..a912985a6 100644 --- a/scripts/outland/hellfire_citadel/blood_furnace/boss_the_maker.cpp +++ b/scripts/outland/hellfire_citadel/blood_furnace/boss_the_maker.cpp @@ -40,7 +40,7 @@ enum SPELL_DOMINATION = 30923 }; -struct MANGOS_DLL_DECL boss_the_makerAI : public ScriptedAI +struct boss_the_makerAI : public ScriptedAI { boss_the_makerAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_nazan_and_vazruden.cpp b/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_nazan_and_vazruden.cpp index 8f9c638a8..2bc218e77 100644 --- a/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_nazan_and_vazruden.cpp +++ b/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_nazan_and_vazruden.cpp @@ -69,7 +69,7 @@ const float afCombatPos[3] = { -1413.848f, 1754.019f, 83.146f}; // moves here wh // This is the flying mob ("mounted" on dragon) spawned initially // This npc will morph into the "unmounted" dragon (nazan) after vazruden is summoned and continue flying // Descent after Vazruden reach 30% HP -struct MANGOS_DLL_DECL boss_vazruden_heraldAI : public ScriptedAI +struct boss_vazruden_heraldAI : public ScriptedAI { boss_vazruden_heraldAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -357,7 +357,7 @@ CreatureAI* GetAI_boss_vazruden_herald(Creature* pCreature) } // This is the summoned boss ("dismounted") that starts attacking the players -struct MANGOS_DLL_DECL boss_vazrudenAI : public ScriptedAI +struct boss_vazrudenAI : public ScriptedAI { boss_vazrudenAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_omor_the_unscarred.cpp b/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_omor_the_unscarred.cpp index 325cff4cd..fad8b788b 100644 --- a/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_omor_the_unscarred.cpp +++ b/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_omor_the_unscarred.cpp @@ -44,7 +44,7 @@ enum SPELL_SUMMON_FIENDISH_HOUND = 30707, }; -struct MANGOS_DLL_DECL boss_omor_the_unscarredAI : public ScriptedAI +struct boss_omor_the_unscarredAI : public ScriptedAI { boss_omor_the_unscarredAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_watchkeeper_gargolmar.cpp b/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_watchkeeper_gargolmar.cpp index ef8d5b4f5..41533c454 100644 --- a/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_watchkeeper_gargolmar.cpp +++ b/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_watchkeeper_gargolmar.cpp @@ -42,7 +42,7 @@ enum SPELL_OVERPOWER = 32154, }; -struct MANGOS_DLL_DECL boss_watchkeeper_gargolmarAI : public ScriptedAI +struct boss_watchkeeper_gargolmarAI : public ScriptedAI { boss_watchkeeper_gargolmarAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/outland/hellfire_citadel/hellfire_ramparts/hellfire_ramparts.h b/scripts/outland/hellfire_citadel/hellfire_ramparts/hellfire_ramparts.h index c774c2335..6a254a431 100644 --- a/scripts/outland/hellfire_citadel/hellfire_ramparts/hellfire_ramparts.h +++ b/scripts/outland/hellfire_citadel/hellfire_ramparts/hellfire_ramparts.h @@ -20,7 +20,7 @@ enum GO_FEL_IRON_CHEST_H = 185169, }; -class MANGOS_DLL_DECL instance_ramparts : public ScriptedInstance +class instance_ramparts : public ScriptedInstance { public: instance_ramparts(Map* pMap); diff --git a/scripts/outland/hellfire_citadel/magtheridons_lair/boss_magtheridon.cpp b/scripts/outland/hellfire_citadel/magtheridons_lair/boss_magtheridon.cpp index 7fbe75be6..e42cd691c 100644 --- a/scripts/outland/hellfire_citadel/magtheridons_lair/boss_magtheridon.cpp +++ b/scripts/outland/hellfire_citadel/magtheridons_lair/boss_magtheridon.cpp @@ -84,7 +84,7 @@ enum ## boss_magtheridon ######*/ -struct MANGOS_DLL_DECL boss_magtheridonAI : public ScriptedAI +struct boss_magtheridonAI : public ScriptedAI { boss_magtheridonAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -302,7 +302,7 @@ struct MANGOS_DLL_DECL boss_magtheridonAI : public ScriptedAI ## mob_hellfire_channeler ######*/ -struct MANGOS_DLL_DECL mob_hellfire_channelerAI : public ScriptedAI +struct mob_hellfire_channelerAI : public ScriptedAI { mob_hellfire_channelerAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -459,7 +459,7 @@ bool GOUse_go_manticron_cube(Player* pPlayer, GameObject* pGo) } // TODO Remove this 'script' when combat and persistent area auras can be proper prevented from core-side -struct MANGOS_DLL_DECL npc_target_triggerAI : public Scripted_NoMovementAI +struct npc_target_triggerAI : public Scripted_NoMovementAI { npc_target_triggerAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) {Reset();} @@ -500,7 +500,7 @@ struct MANGOS_DLL_DECL npc_target_triggerAI : public Scripted_NoMovementAI }; // ToDo: move this script to eventAI -struct MANGOS_DLL_DECL mob_abyssalAI : public ScriptedAI +struct mob_abyssalAI : public ScriptedAI { mob_abyssalAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } diff --git a/scripts/outland/hellfire_citadel/magtheridons_lair/magtheridons_lair.h b/scripts/outland/hellfire_citadel/magtheridons_lair/magtheridons_lair.h index 3b1fd99b3..be77b8ab4 100644 --- a/scripts/outland/hellfire_citadel/magtheridons_lair/magtheridons_lair.h +++ b/scripts/outland/hellfire_citadel/magtheridons_lair/magtheridons_lair.h @@ -31,7 +31,7 @@ enum static const int32 aRandomTaunt[] = { -1544000, -1544001, -1544002, -1544003, -1544004, -1544005}; -class MANGOS_DLL_DECL instance_magtheridons_lair : public ScriptedInstance +class instance_magtheridons_lair : public ScriptedInstance { public: instance_magtheridons_lair(Map* pMap); diff --git a/scripts/outland/hellfire_citadel/shattered_halls/boss_nethekurse.cpp b/scripts/outland/hellfire_citadel/shattered_halls/boss_nethekurse.cpp index 180470ee0..e84619b0f 100644 --- a/scripts/outland/hellfire_citadel/shattered_halls/boss_nethekurse.cpp +++ b/scripts/outland/hellfire_citadel/shattered_halls/boss_nethekurse.cpp @@ -79,7 +79,7 @@ enum NPC_FEL_ORC_CONVERT = 17083, }; -struct MANGOS_DLL_DECL boss_grand_warlock_nethekurseAI : public ScriptedAI +struct boss_grand_warlock_nethekurseAI : public ScriptedAI { boss_grand_warlock_nethekurseAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -337,7 +337,7 @@ struct MANGOS_DLL_DECL boss_grand_warlock_nethekurseAI : public ScriptedAI } }; -struct MANGOS_DLL_DECL mob_fel_orc_convertAI : public ScriptedAI +struct mob_fel_orc_convertAI : public ScriptedAI { mob_fel_orc_convertAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -410,7 +410,7 @@ struct MANGOS_DLL_DECL mob_fel_orc_convertAI : public ScriptedAI }; // NOTE: this creature are also summoned by other spells, for different creatures -struct MANGOS_DLL_DECL mob_lesser_shadow_fissureAI : public Scripted_NoMovementAI +struct mob_lesser_shadow_fissureAI : public Scripted_NoMovementAI { mob_lesser_shadow_fissureAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { Reset(); } diff --git a/scripts/outland/hellfire_citadel/shattered_halls/boss_warbringer_omrogg.cpp b/scripts/outland/hellfire_citadel/shattered_halls/boss_warbringer_omrogg.cpp index 26675415b..dd86c3e26 100644 --- a/scripts/outland/hellfire_citadel/shattered_halls/boss_warbringer_omrogg.cpp +++ b/scripts/outland/hellfire_citadel/shattered_halls/boss_warbringer_omrogg.cpp @@ -98,7 +98,7 @@ static Yell KillingDelay[] = { -1000000, NPC_LEFT_HEAD}, }; -struct MANGOS_DLL_DECL mob_omrogg_headsAI : public ScriptedAI +struct mob_omrogg_headsAI : public ScriptedAI { mob_omrogg_headsAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } @@ -132,7 +132,7 @@ struct MANGOS_DLL_DECL mob_omrogg_headsAI : public ScriptedAI } }; -struct MANGOS_DLL_DECL boss_warbringer_omroggAI : public ScriptedAI +struct boss_warbringer_omroggAI : public ScriptedAI { boss_warbringer_omroggAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/outland/hellfire_citadel/shattered_halls/boss_warchief_kargath_bladefist.cpp b/scripts/outland/hellfire_citadel/shattered_halls/boss_warchief_kargath_bladefist.cpp index 71da4df5f..432cb74c1 100644 --- a/scripts/outland/hellfire_citadel/shattered_halls/boss_warchief_kargath_bladefist.cpp +++ b/scripts/outland/hellfire_citadel/shattered_halls/boss_warchief_kargath_bladefist.cpp @@ -53,7 +53,7 @@ float AssassEntrance[3] = {275.136f, -84.29f, 2.3f}; // y -8 float AssassExit[3] = {184.233f, -84.29f, 2.3f}; // y -8 float AddsEntrance[3] = {306.036f, -84.29f, 1.93f}; -struct MANGOS_DLL_DECL boss_warchief_kargath_bladefistAI : public ScriptedAI +struct boss_warchief_kargath_bladefistAI : public ScriptedAI { boss_warchief_kargath_bladefistAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/outland/hellfire_citadel/shattered_halls/shattered_halls.h b/scripts/outland/hellfire_citadel/shattered_halls/shattered_halls.h index 72b9e59ee..610711f4f 100644 --- a/scripts/outland/hellfire_citadel/shattered_halls/shattered_halls.h +++ b/scripts/outland/hellfire_citadel/shattered_halls/shattered_halls.h @@ -59,7 +59,7 @@ static SpawnLocation aSoldiersLocs[] = {NPC_OFFICER_ALLIANCE, NPC_OFFICER_HORDE, 138.241f, -84.198f, 1.907f, 0.055f} }; -class MANGOS_DLL_DECL instance_shattered_halls : public ScriptedInstance +class instance_shattered_halls : public ScriptedInstance { public: instance_shattered_halls(Map* pMap); diff --git a/scripts/outland/hellfire_peninsula.cpp b/scripts/outland/hellfire_peninsula.cpp index 34132f3cd..8d944df30 100644 --- a/scripts/outland/hellfire_peninsula.cpp +++ b/scripts/outland/hellfire_peninsula.cpp @@ -51,7 +51,7 @@ enum SPELL_SHOCK = 12553, }; -struct MANGOS_DLL_DECL npc_aeranasAI : public ScriptedAI +struct npc_aeranasAI : public ScriptedAI { npc_aeranasAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } @@ -136,7 +136,7 @@ enum NPC_RYGA = 17123 }; -struct MANGOS_DLL_DECL npc_ancestral_wolfAI : public npc_escortAI +struct npc_ancestral_wolfAI : public npc_escortAI { npc_ancestral_wolfAI(Creature* pCreature) : npc_escortAI(pCreature) { @@ -205,7 +205,7 @@ enum }; // script is basic support, details like end event are not implemented -struct MANGOS_DLL_DECL npc_demoniac_scryerAI : public ScriptedAI +struct npc_demoniac_scryerAI : public ScriptedAI { npc_demoniac_scryerAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -370,7 +370,7 @@ enum QUEST_ROAD_TO_FALCON_WATCH = 9375, }; -struct MANGOS_DLL_DECL npc_wounded_blood_elfAI : public npc_escortAI +struct npc_wounded_blood_elfAI : public npc_escortAI { npc_wounded_blood_elfAI(Creature* pCreature) : npc_escortAI(pCreature) {Reset();} @@ -455,7 +455,7 @@ enum NPC_DERANGED_HELBOAR = 16863, }; -struct MANGOS_DLL_DECL npc_fel_guard_houndAI : public ScriptedPetAI +struct npc_fel_guard_houndAI : public ScriptedPetAI { npc_fel_guard_houndAI(Creature* pCreature) : ScriptedPetAI(pCreature) { Reset(); } @@ -600,7 +600,7 @@ static const int32 aAnchoriteTexts[3] = { -1000987, -1000988, -1000989 }; static const int32 aColonelTexts[3] = { -1000990, -1000991, -1000992 }; // Note: script is highly dependent on DBscript implementation -struct MANGOS_DLL_DECL npc_anchorite_baradaAI : public ScriptedAI, private DialogueHelper +struct npc_anchorite_baradaAI : public ScriptedAI, private DialogueHelper { npc_anchorite_baradaAI(Creature* pCreature) : ScriptedAI(pCreature), DialogueHelper(aExorcismDialogue) diff --git a/scripts/outland/nagrand.cpp b/scripts/outland/nagrand.cpp index 776acd1ef..de3d6debf 100644 --- a/scripts/outland/nagrand.cpp +++ b/scripts/outland/nagrand.cpp @@ -47,7 +47,7 @@ enum FACTION_FRIENDLY = 35 }; -struct MANGOS_DLL_DECL mob_lumpAI : public ScriptedAI +struct mob_lumpAI : public ScriptedAI { mob_lumpAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -183,7 +183,7 @@ enum static float m_afAmbushA[] = { -1568.805786f, 8533.873047f, 1.958f}; static float m_afAmbushB[] = { -1491.554321f, 8506.483398f, 1.248f}; -struct MANGOS_DLL_DECL npc_nagrand_captiveAI : public npc_escortAI +struct npc_nagrand_captiveAI : public npc_escortAI { npc_nagrand_captiveAI(Creature* pCreature) : npc_escortAI(pCreature) { Reset(); } @@ -349,7 +349,7 @@ enum QUEST_VISIT_WITH_ANCESTORS = 10085 }; -struct MANGOS_DLL_DECL npc_creditmarker_visit_with_ancestorsAI : public ScriptedAI +struct npc_creditmarker_visit_with_ancestorsAI : public ScriptedAI { npc_creditmarker_visit_with_ancestorsAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } @@ -411,7 +411,7 @@ static const float afRethhedronPos[2][3] = { -1557.93f, 9834.34f, 200.949f} }; -struct MANGOS_DLL_DECL npc_rethhedronAI : public ScriptedAI +struct npc_rethhedronAI : public ScriptedAI { npc_rethhedronAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } diff --git a/scripts/outland/netherstorm.cpp b/scripts/outland/netherstorm.cpp index 930afa3d9..8dff596bb 100644 --- a/scripts/outland/netherstorm.cpp +++ b/scripts/outland/netherstorm.cpp @@ -80,7 +80,7 @@ enum SPELL_INTERRUPT_2 = 35176, // ACID mobs should cast this (Manaforge Ara-version) }; -struct MANGOS_DLL_DECL npc_manaforge_control_consoleAI : public ScriptedAI +struct npc_manaforge_control_consoleAI : public ScriptedAI { npc_manaforge_control_consoleAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} @@ -389,7 +389,7 @@ enum NPC_PATHALEON_THE_CALCULATOR_IMAGE = 21504 }; -struct MANGOS_DLL_DECL npc_commander_dawnforgeAI : public ScriptedAI +struct npc_commander_dawnforgeAI : public ScriptedAI { npc_commander_dawnforgeAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } @@ -634,7 +634,7 @@ enum NPC_SEVERED_SPIRIT = 19881 }; -struct MANGOS_DLL_DECL npc_bessyAI : public npc_escortAI +struct npc_bessyAI : public npc_escortAI { npc_bessyAI(Creature* pCreature) : npc_escortAI(pCreature) { Reset(); } @@ -699,7 +699,7 @@ enum SAY_ALLEY_FINISH = -1000624 }; -struct MANGOS_DLL_DECL npc_maxx_a_million_escortAI : public npc_escortAI +struct npc_maxx_a_million_escortAI : public npc_escortAI { npc_maxx_a_million_escortAI(Creature* pCreature) : npc_escortAI(pCreature) {Reset();} @@ -849,7 +849,7 @@ enum SPELL_GATHER_WARP_BLOOD = 39244, // for quest 10924 }; -struct MANGOS_DLL_DECL npc_zeppitAI : public ScriptedPetAI +struct npc_zeppitAI : public ScriptedPetAI { npc_zeppitAI(Creature* pCreature) : ScriptedPetAI(pCreature) { Reset(); } @@ -902,7 +902,7 @@ enum QUEST_ID_DELIVERING_MESSAGE = 10406, }; -struct MANGOS_DLL_DECL npc_protectorate_demolitionistAI : public npc_escortAI +struct npc_protectorate_demolitionistAI : public npc_escortAI { npc_protectorate_demolitionistAI(Creature* pCreature) : npc_escortAI(pCreature) { Reset(); } @@ -1052,7 +1052,7 @@ enum QUEST_ID_ESCAPE_STAGING_GROUNDS = 10425, }; -struct MANGOS_DLL_DECL npc_captured_vanguardAI : public npc_escortAI +struct npc_captured_vanguardAI : public npc_escortAI { npc_captured_vanguardAI(Creature* pCreature) : npc_escortAI(pCreature) { Reset(); } @@ -1172,7 +1172,7 @@ enum MAX_IMPS = 6, }; -struct MANGOS_DLL_DECL npc_drijyaAI : public npc_escortAI +struct npc_drijyaAI : public npc_escortAI { npc_drijyaAI(Creature* pCreature) : npc_escortAI(pCreature) { Reset(); } diff --git a/scripts/outland/shadowmoon_valley.cpp b/scripts/outland/shadowmoon_valley.cpp index f8b63627c..fa74ba884 100644 --- a/scripts/outland/shadowmoon_valley.cpp +++ b/scripts/outland/shadowmoon_valley.cpp @@ -58,7 +58,7 @@ enum GO_FLAYER_CARCASS = 185155, }; -struct MANGOS_DLL_DECL mob_mature_netherwing_drakeAI : public ScriptedAI +struct mob_mature_netherwing_drakeAI : public ScriptedAI { mob_mature_netherwing_drakeAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } @@ -187,7 +187,7 @@ enum NPC_ESCAPE_DUMMY = 21348 }; -struct MANGOS_DLL_DECL mob_enslaved_netherwing_drakeAI : public ScriptedAI +struct mob_enslaved_netherwing_drakeAI : public ScriptedAI { mob_enslaved_netherwing_drakeAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -291,7 +291,7 @@ enum POINT_DEST = 1 }; -struct MANGOS_DLL_DECL npc_dragonmaw_peonAI : public ScriptedAI +struct npc_dragonmaw_peonAI : public ScriptedAI { npc_dragonmaw_peonAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } @@ -460,7 +460,7 @@ enum }; // this script needs verification -struct MANGOS_DLL_DECL npc_wildaAI : public npc_escortAI +struct npc_wildaAI : public npc_escortAI { npc_wildaAI(Creature* pCreature) : npc_escortAI(pCreature) { Reset(); } @@ -730,7 +730,7 @@ enum SPELL_SPELL_REFLECTION = 33961 }; -struct MANGOS_DLL_DECL mob_torlothAI : public ScriptedAI +struct mob_torlothAI : public ScriptedAI { mob_torlothAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} @@ -883,7 +883,7 @@ CreatureAI* GetAI_mob_torloth(Creature* pCreature) # npc_lord_illidan_stormrage #####*/ -struct MANGOS_DLL_DECL npc_lord_illidan_stormrageAI : public Scripted_NoMovementAI +struct npc_lord_illidan_stormrageAI : public Scripted_NoMovementAI { npc_lord_illidan_stormrageAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) {Reset();} @@ -1161,7 +1161,7 @@ enum EVENT_AIR = 13516, }; -struct MANGOS_DLL_DECL npc_totem_of_spiritsAI : public ScriptedPetAI +struct npc_totem_of_spiritsAI : public ScriptedPetAI { npc_totem_of_spiritsAI(Creature* pCreature) : ScriptedPetAI(pCreature) { Reset(); } @@ -1412,7 +1412,7 @@ const static EventLocations aDamnationLocations[] = { -3599.71f, 1897.94f, 47.24f} // 6 epilogue move loc }; -struct MANGOS_DLL_DECL npc_spawned_oronok_tornheartAI : public ScriptedAI, private DialogueHelper +struct npc_spawned_oronok_tornheartAI : public ScriptedAI, private DialogueHelper { npc_spawned_oronok_tornheartAI(Creature* pCreature) : ScriptedAI(pCreature), DialogueHelper(aOutroDialogue) @@ -1689,7 +1689,7 @@ enum GO_SHADOWMOON_TUBER_MOUND = 184701, }; -struct MANGOS_DLL_DECL npc_domesticated_felboarAI : public ScriptedAI +struct npc_domesticated_felboarAI : public ScriptedAI { npc_domesticated_felboarAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } @@ -1809,7 +1809,7 @@ enum NPC_SPIRIT_HUNTER = 21332, }; -struct MANGOS_DLL_DECL npc_veneratus_spawn_nodeAI : public Scripted_NoMovementAI +struct npc_veneratus_spawn_nodeAI : public Scripted_NoMovementAI { npc_veneratus_spawn_nodeAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { Reset(); } diff --git a/scripts/outland/shattrath_city.cpp b/scripts/outland/shattrath_city.cpp index 489632dea..2fc668af5 100644 --- a/scripts/outland/shattrath_city.cpp +++ b/scripts/outland/shattrath_city.cpp @@ -45,7 +45,7 @@ enum GOSSIP_ITEM_BOOK = -3000105, }; -struct MANGOS_DLL_DECL npc_dirty_larryAI : public ScriptedAI +struct npc_dirty_larryAI : public ScriptedAI { npc_dirty_larryAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -308,7 +308,7 @@ enum QUEST_CITY_LIGHT = 10211 }; -struct MANGOS_DLL_DECL npc_khadgars_servantAI : public npc_escortAI +struct npc_khadgars_servantAI : public npc_escortAI { npc_khadgars_servantAI(Creature* pCreature) : npc_escortAI(pCreature) { @@ -557,7 +557,7 @@ enum SPELL_MAGNETIC_PULL = 31705, }; -struct MANGOS_DLL_DECL npc_salsalabimAI : public ScriptedAI +struct npc_salsalabimAI : public ScriptedAI { npc_salsalabimAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } diff --git a/scripts/outland/tempest_keep/arcatraz/arcatraz.cpp b/scripts/outland/tempest_keep/arcatraz/arcatraz.cpp index 7e8d02098..99bbbb9cb 100644 --- a/scripts/outland/tempest_keep/arcatraz/arcatraz.cpp +++ b/scripts/outland/tempest_keep/arcatraz/arcatraz.cpp @@ -82,7 +82,7 @@ static const DialogueEntry aIntroDialogue[] = static const float fRoomCenterCoords[3] = {445.8804f, -158.7055f, 43.06898f}; -struct MANGOS_DLL_DECL npc_millhouse_manastormAI : public ScriptedAI, private DialogueHelper +struct npc_millhouse_manastormAI : public ScriptedAI, private DialogueHelper { npc_millhouse_manastormAI(Creature* pCreature) : ScriptedAI(pCreature), DialogueHelper(aIntroDialogue) @@ -267,7 +267,7 @@ enum SPELL_SIMPLE_TELEPORT = 12980, }; -struct MANGOS_DLL_DECL npc_warden_mellicharAI : public ScriptedAI +struct npc_warden_mellicharAI : public ScriptedAI { npc_warden_mellicharAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/outland/tempest_keep/arcatraz/arcatraz.h b/scripts/outland/tempest_keep/arcatraz/arcatraz.h index 68df94fb1..1c80f6825 100644 --- a/scripts/outland/tempest_keep/arcatraz/arcatraz.h +++ b/scripts/outland/tempest_keep/arcatraz/arcatraz.h @@ -78,7 +78,7 @@ static const float aSoccotharesStartPos[4] = {122.1035f, 192.7203f, 22.44115f, 5 static const float aEntranceMoveLoc[3] = {82.020f, 0.306f, -11.026f}; static const float aEntranceSpawnLoc[4] = {173.471f, -0.138f, -10.101f, 3.123f}; -class MANGOS_DLL_DECL instance_arcatraz : public ScriptedInstance, private DialogueHelper +class instance_arcatraz : public ScriptedInstance, private DialogueHelper { public: instance_arcatraz(Map* pMap); diff --git a/scripts/outland/tempest_keep/arcatraz/boss_dalliah.cpp b/scripts/outland/tempest_keep/arcatraz/boss_dalliah.cpp index bdbda173c..16910ad0a 100644 --- a/scripts/outland/tempest_keep/arcatraz/boss_dalliah.cpp +++ b/scripts/outland/tempest_keep/arcatraz/boss_dalliah.cpp @@ -46,7 +46,7 @@ enum SPELL_SHADOW_WAVE = 39016, // heroic spell only }; -struct MANGOS_DLL_DECL boss_dalliahAI : public ScriptedAI +struct boss_dalliahAI : public ScriptedAI { boss_dalliahAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/outland/tempest_keep/arcatraz/boss_harbinger_skyriss.cpp b/scripts/outland/tempest_keep/arcatraz/boss_harbinger_skyriss.cpp index 0b39ebd60..861047e28 100644 --- a/scripts/outland/tempest_keep/arcatraz/boss_harbinger_skyriss.cpp +++ b/scripts/outland/tempest_keep/arcatraz/boss_harbinger_skyriss.cpp @@ -45,7 +45,7 @@ enum SPELL_33_ILLUSION = 36932, // Summons 21467 }; -struct MANGOS_DLL_DECL boss_harbinger_skyrissAI : public ScriptedAI +struct boss_harbinger_skyrissAI : public ScriptedAI { boss_harbinger_skyrissAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/outland/tempest_keep/arcatraz/boss_soccothrates.cpp b/scripts/outland/tempest_keep/arcatraz/boss_soccothrates.cpp index ef33e9953..1cd54e78c 100644 --- a/scripts/outland/tempest_keep/arcatraz/boss_soccothrates.cpp +++ b/scripts/outland/tempest_keep/arcatraz/boss_soccothrates.cpp @@ -63,7 +63,7 @@ static const DialogueEntry aIntroDialogue[] = {0, 0, 0}, }; -struct MANGOS_DLL_DECL boss_soccothratesAI : public ScriptedAI, private DialogueHelper +struct boss_soccothratesAI : public ScriptedAI, private DialogueHelper { boss_soccothratesAI(Creature* pCreature) : ScriptedAI(pCreature), DialogueHelper(aIntroDialogue) diff --git a/scripts/outland/tempest_keep/botanica/boss_high_botanist_freywinn.cpp b/scripts/outland/tempest_keep/botanica/boss_high_botanist_freywinn.cpp index 797c1f10b..3136c44e8 100644 --- a/scripts/outland/tempest_keep/botanica/boss_high_botanist_freywinn.cpp +++ b/scripts/outland/tempest_keep/botanica/boss_high_botanist_freywinn.cpp @@ -43,7 +43,7 @@ enum NPC_FRAYER_PROTECTOR = 19953, }; -struct MANGOS_DLL_DECL boss_high_botanist_freywinnAI : public ScriptedAI +struct boss_high_botanist_freywinnAI : public ScriptedAI { boss_high_botanist_freywinnAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } diff --git a/scripts/outland/tempest_keep/botanica/boss_laj.cpp b/scripts/outland/tempest_keep/botanica/boss_laj.cpp index 55362f1de..0a35dd542 100644 --- a/scripts/outland/tempest_keep/botanica/boss_laj.cpp +++ b/scripts/outland/tempest_keep/botanica/boss_laj.cpp @@ -47,7 +47,7 @@ enum MODEL_ID_NATURE = 14214, }; -struct MANGOS_DLL_DECL boss_lajAI : public ScriptedAI +struct boss_lajAI : public ScriptedAI { boss_lajAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } diff --git a/scripts/outland/tempest_keep/botanica/boss_warp_splinter.cpp b/scripts/outland/tempest_keep/botanica/boss_warp_splinter.cpp index 6283dc860..96be58896 100644 --- a/scripts/outland/tempest_keep/botanica/boss_warp_splinter.cpp +++ b/scripts/outland/tempest_keep/botanica/boss_warp_splinter.cpp @@ -47,7 +47,7 @@ enum // Summon Saplings spells (too many to declare them above) static const uint32 aSaplingsSummonSpells[10] = {34727, 34730, 34731, 34732, 34733, 34734, 34735, 34736, 34737, 34739}; -struct MANGOS_DLL_DECL boss_warp_splinterAI : public ScriptedAI +struct boss_warp_splinterAI : public ScriptedAI { boss_warp_splinterAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -146,7 +146,7 @@ struct MANGOS_DLL_DECL boss_warp_splinterAI : public ScriptedAI /*##### # mob_treant (Sapling) #####*/ -struct MANGOS_DLL_DECL npc_saplingAI : public ScriptedAI +struct npc_saplingAI : public ScriptedAI { npc_saplingAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } diff --git a/scripts/outland/tempest_keep/the_eye/boss_alar.cpp b/scripts/outland/tempest_keep/the_eye/boss_alar.cpp index d7360ae43..a0cd5e948 100644 --- a/scripts/outland/tempest_keep/the_eye/boss_alar.cpp +++ b/scripts/outland/tempest_keep/the_eye/boss_alar.cpp @@ -78,7 +78,7 @@ static const EventLocation aCenterLocation[] = {331.0, 0.01f, -2.39f}, }; -struct MANGOS_DLL_DECL boss_alarAI : public ScriptedAI +struct boss_alarAI : public ScriptedAI { boss_alarAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/outland/tempest_keep/the_eye/boss_astromancer.cpp b/scripts/outland/tempest_keep/the_eye/boss_astromancer.cpp index d4b9f668b..054b11d5e 100644 --- a/scripts/outland/tempest_keep/the_eye/boss_astromancer.cpp +++ b/scripts/outland/tempest_keep/the_eye/boss_astromancer.cpp @@ -79,7 +79,7 @@ enum Phases PHASE_VOID = 3, }; -struct MANGOS_DLL_DECL boss_high_astromancer_solarianAI : public ScriptedAI +struct boss_high_astromancer_solarianAI : public ScriptedAI { boss_high_astromancer_solarianAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -404,7 +404,7 @@ struct MANGOS_DLL_DECL boss_high_astromancer_solarianAI : public ScriptedAI } }; -struct MANGOS_DLL_DECL mob_solarium_priestAI : public ScriptedAI +struct mob_solarium_priestAI : public ScriptedAI { mob_solarium_priestAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } diff --git a/scripts/outland/tempest_keep/the_eye/boss_kaelthas.cpp b/scripts/outland/tempest_keep/the_eye/boss_kaelthas.cpp index 558bb4cd7..20be2ab7b 100644 --- a/scripts/outland/tempest_keep/the_eye/boss_kaelthas.cpp +++ b/scripts/outland/tempest_keep/the_eye/boss_kaelthas.cpp @@ -172,7 +172,7 @@ static const float aCenterPos[3] = {795.00f, -0.46f, 48.72f}; ## boss_kaelthas ######*/ -struct MANGOS_DLL_DECL boss_kaelthasAI : public ScriptedAI +struct boss_kaelthasAI : public ScriptedAI { boss_kaelthasAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -720,7 +720,7 @@ bool EffectDummyCreature_kael_phase_2(Unit* pCaster, uint32 uiSpellId, SpellEffe ## advisor_base_ai ######*/ -struct MANGOS_DLL_DECL advisor_base_ai : public ScriptedAI +struct advisor_base_ai : public ScriptedAI { advisor_base_ai(Creature* pCreature) : ScriptedAI(pCreature) { @@ -812,7 +812,7 @@ struct MANGOS_DLL_DECL advisor_base_ai : public ScriptedAI ## boss_thaladred_the_darkener ######*/ -struct MANGOS_DLL_DECL boss_thaladred_the_darkenerAI : public advisor_base_ai +struct boss_thaladred_the_darkenerAI : public advisor_base_ai { boss_thaladred_the_darkenerAI(Creature* pCreature) : advisor_base_ai(pCreature) { Reset(); } @@ -896,7 +896,7 @@ struct MANGOS_DLL_DECL boss_thaladred_the_darkenerAI : public advisor_base_ai ## boss_lord_sanguinar ######*/ -struct MANGOS_DLL_DECL boss_lord_sanguinarAI : public advisor_base_ai +struct boss_lord_sanguinarAI : public advisor_base_ai { boss_lord_sanguinarAI(Creature* pCreature) : advisor_base_ai(pCreature) { Reset(); } @@ -944,7 +944,7 @@ struct MANGOS_DLL_DECL boss_lord_sanguinarAI : public advisor_base_ai ## boss_grand_astromancer_capernian ######*/ -struct MANGOS_DLL_DECL boss_grand_astromancer_capernianAI : public advisor_base_ai +struct boss_grand_astromancer_capernianAI : public advisor_base_ai { boss_grand_astromancer_capernianAI(Creature* pCreature) : advisor_base_ai(pCreature) { Reset(); } @@ -1033,7 +1033,7 @@ struct MANGOS_DLL_DECL boss_grand_astromancer_capernianAI : public advisor_base_ ## boss_master_engineer_telonicus ######*/ -struct MANGOS_DLL_DECL boss_master_engineer_telonicusAI : public advisor_base_ai +struct boss_master_engineer_telonicusAI : public advisor_base_ai { boss_master_engineer_telonicusAI(Creature* pCreature) : advisor_base_ai(pCreature) { Reset(); } @@ -1094,7 +1094,7 @@ struct MANGOS_DLL_DECL boss_master_engineer_telonicusAI : public advisor_base_ai ## mob_phoenix_tk ######*/ -struct MANGOS_DLL_DECL mob_phoenix_tkAI : public ScriptedAI +struct mob_phoenix_tkAI : public ScriptedAI { mob_phoenix_tkAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} @@ -1219,7 +1219,7 @@ struct MANGOS_DLL_DECL mob_phoenix_tkAI : public ScriptedAI ######*/ // TODO Remove this 'script' when combat movement can be proper prevented from core-side -struct MANGOS_DLL_DECL mob_phoenix_egg_tkAI : public Scripted_NoMovementAI +struct mob_phoenix_egg_tkAI : public Scripted_NoMovementAI { mob_phoenix_egg_tkAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { Reset(); } diff --git a/scripts/outland/tempest_keep/the_eye/boss_void_reaver.cpp b/scripts/outland/tempest_keep/the_eye/boss_void_reaver.cpp index 95a9ca809..1e542b756 100644 --- a/scripts/outland/tempest_keep/the_eye/boss_void_reaver.cpp +++ b/scripts/outland/tempest_keep/the_eye/boss_void_reaver.cpp @@ -42,7 +42,7 @@ enum NPC_ARCANE_ORB_TARGET = 19577, }; -struct MANGOS_DLL_DECL boss_void_reaverAI : public ScriptedAI +struct boss_void_reaverAI : public ScriptedAI { boss_void_reaverAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/outland/tempest_keep/the_eye/the_eye.h b/scripts/outland/tempest_keep/the_eye/the_eye.h index d45dae974..5aa6e60aa 100644 --- a/scripts/outland/tempest_keep/the_eye/the_eye.h +++ b/scripts/outland/tempest_keep/the_eye/the_eye.h @@ -36,7 +36,7 @@ enum static const uint32 aAdvisors[MAX_ADVISORS] = {NPC_CAPERNIAN, NPC_SANGUINAR, NPC_TELONICUS, NPC_THALADRED}; -class MANGOS_DLL_DECL instance_the_eye : public ScriptedInstance +class instance_the_eye : public ScriptedInstance { public: instance_the_eye(Map* pMap); diff --git a/scripts/outland/tempest_keep/the_mechanar/boss_nethermancer_sepethrea.cpp b/scripts/outland/tempest_keep/the_mechanar/boss_nethermancer_sepethrea.cpp index e5dfab664..ba42e8da9 100644 --- a/scripts/outland/tempest_keep/the_mechanar/boss_nethermancer_sepethrea.cpp +++ b/scripts/outland/tempest_keep/the_mechanar/boss_nethermancer_sepethrea.cpp @@ -43,7 +43,7 @@ enum NPC_RAGING_FLAMES = 20481, }; -struct MANGOS_DLL_DECL boss_nethermancer_sepethreaAI : public ScriptedAI +struct boss_nethermancer_sepethreaAI : public ScriptedAI { boss_nethermancer_sepethreaAI(Creature* pCreature) : ScriptedAI(pCreature) { diff --git a/scripts/outland/tempest_keep/the_mechanar/boss_pathaleon_the_calculator.cpp b/scripts/outland/tempest_keep/the_mechanar/boss_pathaleon_the_calculator.cpp index 5864152d1..dcfc99a7f 100644 --- a/scripts/outland/tempest_keep/the_mechanar/boss_pathaleon_the_calculator.cpp +++ b/scripts/outland/tempest_keep/the_mechanar/boss_pathaleon_the_calculator.cpp @@ -56,7 +56,7 @@ enum static const uint32 aWraithSummonSpells[4] = {SPELL_SUMMON_NETHER_WRAITH_1, SPELL_SUMMON_NETHER_WRAITH_2, SPELL_SUMMON_NETHER_WRAITH_3, SPELL_SUMMON_NETHER_WRAITH_4}; -struct MANGOS_DLL_DECL boss_pathaleon_the_calculatorAI : public ScriptedAI +struct boss_pathaleon_the_calculatorAI : public ScriptedAI { boss_pathaleon_the_calculatorAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -199,7 +199,7 @@ struct MANGOS_DLL_DECL boss_pathaleon_the_calculatorAI : public ScriptedAI } }; -struct MANGOS_DLL_DECL mob_nether_wraithAI : public ScriptedAI +struct mob_nether_wraithAI : public ScriptedAI { mob_nether_wraithAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} diff --git a/scripts/outland/tempest_keep/the_mechanar/mechanar.h b/scripts/outland/tempest_keep/the_mechanar/mechanar.h index 09a65c49d..860a66dd9 100644 --- a/scripts/outland/tempest_keep/the_mechanar/mechanar.h +++ b/scripts/outland/tempest_keep/the_mechanar/mechanar.h @@ -84,7 +84,7 @@ static const SpawnLocation aBridgeEventLocs[MAX_BRIDGE_LOCATIONS][4] = }, }; -class MANGOS_DLL_DECL instance_mechanar : public ScriptedInstance +class instance_mechanar : public ScriptedInstance { public: instance_mechanar(Map* pMap); diff --git a/scripts/outland/terokkar_forest.cpp b/scripts/outland/terokkar_forest.cpp index a51052412..2463772ec 100644 --- a/scripts/outland/terokkar_forest.cpp +++ b/scripts/outland/terokkar_forest.cpp @@ -55,7 +55,7 @@ enum SPELL_QUID9889 = 32174, }; -struct MANGOS_DLL_DECL mob_unkor_the_ruthlessAI : public ScriptedAI +struct mob_unkor_the_ruthlessAI : public ScriptedAI { mob_unkor_the_ruthlessAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } @@ -151,7 +151,7 @@ const uint32 netherwebVictims[6] = 18470, 16805, 21242, 18452, 22482, 21285 }; -struct MANGOS_DLL_DECL mob_netherweb_victimAI : public ScriptedAI +struct mob_netherweb_victimAI : public ScriptedAI { mob_netherweb_victimAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -206,7 +206,7 @@ enum static float m_afAmbushB1[] = { -2895.525879f, 5336.431641f, -11.800f}; static float m_afAmbushB2[] = { -2890.604980f, 5331.938965f, -11.282f}; -struct MANGOS_DLL_DECL npc_akunoAI : public npc_escortAI +struct npc_akunoAI : public npc_escortAI { npc_akunoAI(Creature* pCreature) : npc_escortAI(pCreature) { Reset(); } @@ -300,7 +300,7 @@ enum SPELL_FEED_CREDIT = 41427, // credit for quest 11093 }; -struct MANGOS_DLL_DECL npc_hungry_nether_rayAI : public ScriptedPetAI +struct npc_hungry_nether_rayAI : public ScriptedPetAI { npc_hungry_nether_rayAI(Creature* pCreature) : ScriptedPetAI(pCreature) { Reset(); } @@ -362,7 +362,7 @@ enum }; // Some details still missing from here, and will also have issues if followers evade for any reason. -struct MANGOS_DLL_DECL npc_letollAI : public npc_escortAI +struct npc_letollAI : public npc_escortAI { npc_letollAI(Creature* pCreature) : npc_escortAI(pCreature) { @@ -594,7 +594,7 @@ enum NPC_MANA_BOMB_KILL_TRIGGER = 21039 }; -struct MANGOS_DLL_DECL npc_mana_bomb_exp_triggerAI : public ScriptedAI +struct npc_mana_bomb_exp_triggerAI : public ScriptedAI { npc_mana_bomb_exp_triggerAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } @@ -732,7 +732,7 @@ bool GOUse_go_veil_skith_cage(Player* pPlayer, GameObject* pGo) return false; }; -struct MANGOS_DLL_DECL npc_captive_child : public ScriptedAI +struct npc_captive_child : public ScriptedAI { npc_captive_child(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } @@ -776,7 +776,7 @@ enum SPELL_TRAVELFORM = 32447 // guesswork }; -struct MANGOS_DLL_DECL npc_isla_starmaneAI : public npc_escortAI +struct npc_isla_starmaneAI : public npc_escortAI { npc_isla_starmaneAI(Creature* pCreature) : npc_escortAI(pCreature) { @@ -925,7 +925,7 @@ enum static const float aLuangaSpawnCoords[3] = { -3507.203f, 4084.619f, 92.947f}; -struct MANGOS_DLL_DECL npc_skywingAI : public npc_escortAI +struct npc_skywingAI : public npc_escortAI { npc_skywingAI(Creature* pCreature) : npc_escortAI(pCreature) { Reset(); } @@ -1042,7 +1042,7 @@ enum GO_RAVEN_STONE = 185541, }; -struct MANGOS_DLL_DECL npc_cenarion_sparrowhawkAI : public ScriptedAI +struct npc_cenarion_sparrowhawkAI : public ScriptedAI { npc_cenarion_sparrowhawkAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } @@ -1139,7 +1139,7 @@ enum QUEST_ID_ESCAPE_SKETTIS = 11085, }; -struct MANGOS_DLL_DECL npc_skyguard_prisonerAI : public npc_escortAI +struct npc_skyguard_prisonerAI : public npc_escortAI { npc_skyguard_prisonerAI(Creature* pCreature) : npc_escortAI(pCreature) { Reset(); } diff --git a/scripts/outland/zangarmarsh.cpp b/scripts/outland/zangarmarsh.cpp index d2872cf7e..90347722d 100644 --- a/scripts/outland/zangarmarsh.cpp +++ b/scripts/outland/zangarmarsh.cpp @@ -40,7 +40,7 @@ enum SPELL_LIGHTNING_BOLT = 9532, }; -struct MANGOS_DLL_DECL npc_cooshcooshAI : public ScriptedAI +struct npc_cooshcooshAI : public ScriptedAI { npc_cooshcooshAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -96,7 +96,7 @@ enum NPC_SLAVEBINDER = 18042 }; -struct MANGOS_DLL_DECL npc_kayra_longmaneAI : public npc_escortAI +struct npc_kayra_longmaneAI : public npc_escortAI { npc_kayra_longmaneAI(Creature* pCreature) : npc_escortAI(pCreature) { Reset(); } @@ -198,7 +198,7 @@ enum QUEST_ID_FHWOOR_SMASH = 9729, }; -struct MANGOS_DLL_DECL npc_fhwoorAI : public npc_escortAI +struct npc_fhwoorAI : public npc_escortAI { npc_fhwoorAI(Creature* pCreature) : npc_escortAI(pCreature) { Reset(); } diff --git a/scripts/world/bosses_emerald_dragons.cpp b/scripts/world/bosses_emerald_dragons.cpp index c855d45ae..9345f9b3a 100644 --- a/scripts/world/bosses_emerald_dragons.cpp +++ b/scripts/world/bosses_emerald_dragons.cpp @@ -50,7 +50,7 @@ enum NPC_DREAM_FOG = 15224, }; -struct MANGOS_DLL_DECL boss_emerald_dragonAI : public ScriptedAI +struct boss_emerald_dragonAI : public ScriptedAI { boss_emerald_dragonAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } @@ -155,7 +155,7 @@ enum SPELL_PUTRID_MUSHROOM = 24904, // Summons a mushroom on killing a player }; -struct MANGOS_DLL_DECL boss_emerissAI : public boss_emerald_dragonAI +struct boss_emerissAI : public boss_emerald_dragonAI { boss_emerissAI(Creature* pCreature) : boss_emerald_dragonAI(pCreature) { Reset(); } @@ -236,7 +236,7 @@ enum SPELL_SPIRIT_SHAPE_VISUAL = 24809, }; -struct MANGOS_DLL_DECL boss_lethonAI : public boss_emerald_dragonAI +struct boss_lethonAI : public boss_emerald_dragonAI { boss_lethonAI(Creature* pCreature) : boss_emerald_dragonAI(pCreature) {} @@ -283,7 +283,7 @@ struct MANGOS_DLL_DECL boss_lethonAI : public boss_emerald_dragonAI } }; -struct MANGOS_DLL_DECL npc_spirit_shadeAI : public ScriptedAI +struct npc_spirit_shadeAI : public ScriptedAI { npc_spirit_shadeAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } @@ -343,7 +343,7 @@ enum SPELL_POSIONBREATH = 20667 }; -struct MANGOS_DLL_DECL boss_taerarAI : public boss_emerald_dragonAI +struct boss_taerarAI : public boss_emerald_dragonAI { boss_taerarAI(Creature* pCreature) : boss_emerald_dragonAI(pCreature) { Reset(); } @@ -473,7 +473,7 @@ enum }; // Ysondre script -struct MANGOS_DLL_DECL boss_ysondreAI : public boss_emerald_dragonAI +struct boss_ysondreAI : public boss_emerald_dragonAI { boss_ysondreAI(Creature* pCreature) : boss_emerald_dragonAI(pCreature) { Reset(); } diff --git a/scripts/world/guards.cpp b/scripts/world/guards.cpp index 9cb4edc9f..c7f57d654 100644 --- a/scripts/world/guards.cpp +++ b/scripts/world/guards.cpp @@ -116,7 +116,7 @@ CreatureAI* GetAI_guard_shattrath(Creature* pCreature) * guard_shattrath_aldor *******************************************************/ -struct MANGOS_DLL_DECL guard_shattrath_aldorAI : public guardAI +struct guard_shattrath_aldorAI : public guardAI { guard_shattrath_aldorAI(Creature* pCreature) : guardAI(pCreature) { Reset(); } @@ -183,7 +183,7 @@ CreatureAI* GetAI_guard_shattrath_aldor(Creature* pCreature) * guard_shattrath_scryer *******************************************************/ -struct MANGOS_DLL_DECL guard_shattrath_scryerAI : public guardAI +struct guard_shattrath_scryerAI : public guardAI { guard_shattrath_scryerAI(Creature* pCreature) : guardAI(pCreature) { Reset(); } diff --git a/scripts/world/mob_generic_creature.cpp b/scripts/world/mob_generic_creature.cpp index 96e624cb2..dbfa94d7e 100644 --- a/scripts/world/mob_generic_creature.cpp +++ b/scripts/world/mob_generic_creature.cpp @@ -25,7 +25,7 @@ EndScriptData */ #define GENERIC_CREATURE_COOLDOWN 5000 -struct MANGOS_DLL_DECL generic_creatureAI : public ScriptedAI +struct generic_creatureAI : public ScriptedAI { generic_creatureAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} diff --git a/scripts/world/npcs_special.cpp b/scripts/world/npcs_special.cpp index c1e25e73f..dc3a64d4b 100644 --- a/scripts/world/npcs_special.cpp +++ b/scripts/world/npcs_special.cpp @@ -98,7 +98,7 @@ SpawnAssociation m_aSpawnAssociations[] = {22126, 22122, SPAWNTYPE_ALARMBOT} // Air Force Trip Wire - Rooftop (Cenarion Expedition) }; -struct MANGOS_DLL_DECL npc_air_force_botsAI : public ScriptedAI +struct npc_air_force_botsAI : public ScriptedAI { npc_air_force_botsAI(Creature* pCreature) : ScriptedAI(pCreature) { @@ -259,7 +259,7 @@ enum FACTION_CHICKEN = 31 }; -struct MANGOS_DLL_DECL npc_chicken_cluckAI : public ScriptedAI +struct npc_chicken_cluckAI : public ScriptedAI { npc_chicken_cluckAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} @@ -359,7 +359,7 @@ enum SPELL_FIERY_SEDUCTION = 47057 }; -struct MANGOS_DLL_DECL npc_dancing_flamesAI : public ScriptedAI +struct npc_dancing_flamesAI : public ScriptedAI { npc_dancing_flamesAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} @@ -467,7 +467,7 @@ const uint32 HordeSoldierId[3] = ## npc_doctor (handles both Gustaf Vanhowzen and Gregory Victor) ######*/ -struct MANGOS_DLL_DECL npc_doctorAI : public ScriptedAI +struct npc_doctorAI : public ScriptedAI { npc_doctorAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} @@ -510,7 +510,7 @@ struct MANGOS_DLL_DECL npc_doctorAI : public ScriptedAI ## npc_injured_patient (handles all the patients, no matter Horde or Alliance) #####*/ -struct MANGOS_DLL_DECL npc_injured_patientAI : public ScriptedAI +struct npc_injured_patientAI : public ScriptedAI { npc_injured_patientAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} @@ -803,7 +803,7 @@ enum SAY_SHAYA_GOODBYE = -1000263, }; -struct MANGOS_DLL_DECL npc_garments_of_questsAI : public npc_escortAI +struct npc_garments_of_questsAI : public npc_escortAI { npc_garments_of_questsAI(Creature* pCreature) : npc_escortAI(pCreature) { Reset(); } @@ -986,7 +986,7 @@ CreatureAI* GetAI_npc_garments_of_quests(Creature* pCreature) #define SPELL_DEATHTOUCH 5 -struct MANGOS_DLL_DECL npc_guardianAI : public ScriptedAI +struct npc_guardianAI : public ScriptedAI { npc_guardianAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} @@ -1092,7 +1092,7 @@ enum static const float DIST_START_EVENT = 15.0f; // Guesswork -struct MANGOS_DLL_DECL npc_spring_rabbitAI : public ScriptedPetAI +struct npc_spring_rabbitAI : public ScriptedPetAI { npc_spring_rabbitAI(Creature* pCreature) : ScriptedPetAI(pCreature) { Reset(); } @@ -1270,7 +1270,7 @@ enum NPC_BLOOD_KNIGHT = 17768, // blood elf side }; -struct MANGOS_DLL_DECL npc_redemption_targetAI : public ScriptedAI +struct npc_redemption_targetAI : public ScriptedAI { npc_redemption_targetAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } diff --git a/scripts/world/world_map_scripts.cpp b/scripts/world/world_map_scripts.cpp index 6df8d8095..52ccf9ed3 100644 --- a/scripts/world/world_map_scripts.cpp +++ b/scripts/world/world_map_scripts.cpp @@ -27,7 +27,7 @@ EndScriptData */ /* ********************************************************* * EASTERN KINGDOMS */ -struct MANGOS_DLL_DECL world_map_eastern_kingdoms : public ScriptedMap +struct world_map_eastern_kingdoms : public ScriptedMap { world_map_eastern_kingdoms(Map* pMap) : ScriptedMap(pMap) {} @@ -55,7 +55,7 @@ InstanceData* GetInstanceData_world_map_eastern_kingdoms(Map* pMap) /* ********************************************************* * KALIMDOR */ -struct MANGOS_DLL_DECL world_map_kalimdor : public ScriptedMap +struct world_map_kalimdor : public ScriptedMap { world_map_kalimdor(Map* pMap) : ScriptedMap(pMap) { Initialize(); } @@ -140,7 +140,7 @@ InstanceData* GetInstanceData_world_map_kalimdor(Map* pMap) /* ********************************************************* * OUTLAND */ -struct MANGOS_DLL_DECL world_map_outland : public ScriptedMap +struct world_map_outland : public ScriptedMap { world_map_outland(Map* pMap) : ScriptedMap(pMap) { Initialize(); } @@ -187,7 +187,7 @@ InstanceData* GetInstanceData_world_map_outland(Map* pMap) /* ********************************************************* * NORTHREND */ -struct MANGOS_DLL_DECL world_map_northrend : public ScriptedMap +struct world_map_northrend : public ScriptedMap { world_map_northrend(Map* pMap) : ScriptedMap(pMap) {} diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index cfacdbecf..ea6dbc32a 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3037" + #define SD2_REVISION_NR "3038" #endif // __SD2_REVISION_NR_H__ From 71c65a5f37e47b494a2ba0f79a4ccff365d17144 Mon Sep 17 00:00:00 2001 From: evil-at-wow Date: Sat, 13 Sep 2014 19:30:10 +0300 Subject: [PATCH 1050/1172] [3039] Fix a GCC compiler warning. The type of the second argument of memset is int, not float. Signed-off-by: xfurry --- scripts/eastern_kingdoms/gnomeregan/boss_thermaplugg.cpp | 2 +- sd2_revision_nr.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/eastern_kingdoms/gnomeregan/boss_thermaplugg.cpp b/scripts/eastern_kingdoms/gnomeregan/boss_thermaplugg.cpp index 537a6d7e9..b334ecf13 100644 --- a/scripts/eastern_kingdoms/gnomeregan/boss_thermaplugg.cpp +++ b/scripts/eastern_kingdoms/gnomeregan/boss_thermaplugg.cpp @@ -69,7 +69,7 @@ struct boss_thermapluggAI : public ScriptedAI m_bIsPhaseTwo = false; m_asBombFaces = NULL; - memset(&m_afSpawnPos, 0.0f, sizeof(m_afSpawnPos)); + memset(&m_afSpawnPos, 0, sizeof(m_afSpawnPos)); m_lLandedBombGUIDs.clear(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index ea6dbc32a..9cd4191af 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3038" + #define SD2_REVISION_NR "3039" #endif // __SD2_REVISION_NR_H__ From d1886b7d457abda0e2e9972741bdfce759c66149 Mon Sep 17 00:00:00 2001 From: evil-at-wow Date: Sat, 13 Sep 2014 19:30:49 +0300 Subject: [PATCH 1051/1172] [3040] Fix code using 'false' as return value where type 'const SpellEntry*' is expected. Signed-off-by: xfurry --- include/sc_creature.cpp | 4 ++-- sd2_revision_nr.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/sc_creature.cpp b/include/sc_creature.cpp index ea5d61296..bd90191ac 100644 --- a/include/sc_creature.cpp +++ b/include/sc_creature.cpp @@ -204,11 +204,11 @@ SpellEntry const* ScriptedAI::SelectSpell(Unit* pTarget, int32 uiSchool, int32 i { // No target so we can't cast if (!pTarget) - return false; + return NULL; // Silenced so we can't cast if (m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_SILENCED)) - return false; + return NULL; // Using the extended script system we first create a list of viable spells SpellEntry const* apSpell[4]; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 9cd4191af..b39784507 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3039" + #define SD2_REVISION_NR "3040" #endif // __SD2_REVISION_NR_H__ From 22aa466ec0bfaf1181ad2b39b82a3ce83a25e885 Mon Sep 17 00:00:00 2001 From: evil-at-wow Date: Sat, 13 Sep 2014 19:31:45 +0300 Subject: [PATCH 1052/1172] [3041] Fix a bunch of GCC compiler warnings about missing field initializers [-Wmissing-field-initializers]. Close #114 Signed-off-by: xfurry --- .../sunken_temple/sunken_temple.h | 4 ++-- .../ulduar/ulduar/instance_ulduar.cpp | 12 ++++++------ scripts/northrend/ulduar/ulduar/ulduar.h | 18 ++++++++++++------ sd2_revision_nr.h | 2 +- 4 files changed, 21 insertions(+), 15 deletions(-) diff --git a/scripts/eastern_kingdoms/sunken_temple/sunken_temple.h b/scripts/eastern_kingdoms/sunken_temple/sunken_temple.h index 4c01c0211..9195b076c 100644 --- a/scripts/eastern_kingdoms/sunken_temple/sunken_temple.h +++ b/scripts/eastern_kingdoms/sunken_temple/sunken_temple.h @@ -98,8 +98,8 @@ static const SummonLocations aSunkenTempleLocation[] = // Summon location for the suppressors static const SummonLocations aHakkariDoorLocations[2] = { - { -420.629f, 276.682f, -90.827f}, - { -512.015f, 276.134f, -90.827f} + { -420.629f, 276.682f, -90.827f, 0.0f}, + { -512.015f, 276.134f, -90.827f, 0.0f} }; class instance_sunken_temple : public ScriptedInstance diff --git a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp index de69c7ef7..6b2d5e864 100644 --- a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp +++ b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp @@ -57,10 +57,10 @@ struct UlduarKeeperSpawns static UlduarKeeperSpawns m_aKeepersSpawnLocs[] = { - {1945.682f, 33.34201f, 411.4408f, 5.270f, NPC_KEEPER_FREYA, TYPE_FREYA}, - {2028.766f, 17.42014f, 411.4446f, 3.857f, NPC_KEEPER_MIMIRON, TYPE_MIMIRON}, - {1945.761f, -81.52171f, 411.4407f, 1.029f, NPC_KEEPER_HODIR, TYPE_HODIR}, - {2028.822f, -65.73573f, 411.4426f, 2.460f, NPC_KEEPER_THORIM, TYPE_THORIM}, + {1945.682f, 33.34201f, 411.4408f, 5.270f, NPC_KEEPER_FREYA, TYPE_FREYA, 0}, + {2028.766f, 17.42014f, 411.4446f, 3.857f, NPC_KEEPER_MIMIRON, TYPE_MIMIRON, 0}, + {1945.761f, -81.52171f, 411.4407f, 1.029f, NPC_KEEPER_HODIR, TYPE_HODIR, 0}, + {2028.822f, -65.73573f, 411.4426f, 2.460f, NPC_KEEPER_THORIM, TYPE_THORIM, 0}, }; static UlduarKeeperSpawns m_aKeeperHelperLocs[] = @@ -1436,12 +1436,12 @@ void instance_ulduar::DoCallLeviathanHelp() return; for (uint8 i = 0; i < countof(afReinforcementsNormal); ++i) - pLeviathan->SummonCreature(afReinforcementsNormal[i].uiAllyEntry, afReinforcementsNormal[i].fX, afReinforcementsNormal[i].fY, afReinforcementsNormal[i].fZ, afReinforcementsNormal[i].fO, TEMPSUMMON_DEAD_DESPAWN, 0, true); + pLeviathan->SummonCreature(afReinforcementsNormal[i].uiEntry, afReinforcementsNormal[i].fX, afReinforcementsNormal[i].fY, afReinforcementsNormal[i].fZ, afReinforcementsNormal[i].fO, TEMPSUMMON_DEAD_DESPAWN, 0, true); if (!instance->IsRegularDifficulty()) { for (uint8 i = 0; i < countof(afReinforcementsHeroic); ++i) - pLeviathan->SummonCreature(afReinforcementsHeroic[i].uiAllyEntry, afReinforcementsHeroic[i].fX, afReinforcementsHeroic[i].fY, afReinforcementsHeroic[i].fZ, afReinforcementsHeroic[i].fO, TEMPSUMMON_DEAD_DESPAWN, 0, true); + pLeviathan->SummonCreature(afReinforcementsHeroic[i].uiEntry, afReinforcementsHeroic[i].fX, afReinforcementsHeroic[i].fY, afReinforcementsHeroic[i].fZ, afReinforcementsHeroic[i].fO, TEMPSUMMON_DEAD_DESPAWN, 0, true); } } diff --git a/scripts/northrend/ulduar/ulduar/ulduar.h b/scripts/northrend/ulduar/ulduar/ulduar.h index d1d72e70c..4a58fd5b3 100644 --- a/scripts/northrend/ulduar/ulduar/ulduar.h +++ b/scripts/northrend/ulduar/ulduar/ulduar.h @@ -463,7 +463,13 @@ enum ACHIEV_CRIT_CONQ_HODIR = 10719, }; -struct UlduarSpawns +struct UlduarSpawn +{ + float fX, fY, fZ, fO; + uint32 uiEntry; +}; + +struct UlduarSpawnTwoSide { float fX, fY, fZ, fO; uint32 uiAllyEntry, uiHordeEntry; @@ -471,7 +477,7 @@ struct UlduarSpawns // Note: coordinates are guessed, but pretty close to what they should be // ToDo: spawn additional Engineers, Demolitionists, Mages and Liquid Pyrite near the columns -static const UlduarSpawns afReinforcementsNormal[] = +static const UlduarSpawn afReinforcementsNormal[] = { {118.797f, -26.9963f, 409.80f, 3.14f, NPC_SALVAGED_SIEGE_ENGINE}, {118.847f, -43.758f, 409.80f, 3.15f, NPC_SALVAGED_SIEGE_ENGINE}, @@ -481,7 +487,7 @@ static const UlduarSpawns afReinforcementsNormal[] = {123.022f, 39.671f, 409.80f, 3.10f, NPC_SALVAGED_DEMOLISHER}, }; -static const UlduarSpawns afReinforcementsHeroic[] = +static const UlduarSpawn afReinforcementsHeroic[] = { {106.359f, -35.269f, 409.80f, 3.12f, NPC_SALVAGED_SIEGE_ENGINE}, {135.351f, -20.767f, 409.80f, 3.15f, NPC_SALVAGED_SIEGE_ENGINE}, @@ -494,7 +500,7 @@ static const UlduarSpawns afReinforcementsHeroic[] = {112.700f, 47.884f, 409.79f, 3.10f, NPC_SALVAGED_DEMOLISHER}, }; -static const UlduarSpawns afHodirHelpersNormal[] = +static const UlduarSpawnTwoSide afHodirHelpersNormal[] = { {1999.903f, -230.4966f, 432.7581f, 1.53589f, NPC_DRUID_ALLIANCE_N, NPC_DRUID_HORDE_N}, {2010.058f, -243.4553f, 432.7672f, 1.361357f, NPC_SHAMAN_ALLIANCE_N, NPC_SHAMAN_HORDE_N}, @@ -502,7 +508,7 @@ static const UlduarSpawns afHodirHelpersNormal[] = {1983.751f, -243.3579f, 432.7672f, 1.570796f, NPC_PRIEST_ALLIANCE_N, NPC_PRIEST_HORDE_N}, }; -static const UlduarSpawns afHodirHelpersHeroic[] = +static const UlduarSpawnTwoSide afHodirHelpersHeroic[] = { {2013.37f, -240.331f, 432.687f, 1.80463f, NPC_DRUID_ALLIANCE_H, NPC_DRUID_HORDE_H}, {1983.89f, -240.369f, 432.687f, 1.37658f, NPC_SHAMAN_ALLIANCE_H, NPC_SHAMAN_HORDE_H}, @@ -510,7 +516,7 @@ static const UlduarSpawns afHodirHelpersHeroic[] = {1997.88f, -239.394f, 432.687f, 1.4237f, NPC_PRIEST_ALLIANCE_H, NPC_PRIEST_HORDE_H}, }; -static const UlduarSpawns afThorimSpawns[] = +static const UlduarSpawnTwoSide afThorimSpawns[] = { {2127.24f, -251.309f, 419.7935f, 5.899213f, NPC_SOLDIER_HORDE, NPC_SOLDIER_ALLIANCE}, {2123.316f, -254.7708f, 419.7886f, 6.178465f, NPC_SOLDIER_HORDE, NPC_SOLDIER_ALLIANCE}, diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index b39784507..3812531c6 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3040" + #define SD2_REVISION_NR "3041" #endif // __SD2_REVISION_NR_H__ From 236d5f691fc41fd01858da2dc7ef7f30ab318656 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Wed, 17 Sep 2014 20:56:29 +0200 Subject: [PATCH 1053/1172] [3042] Allow Shade of Jindo to use invisibility The creature will attack automatically. If set to attack by script, the invisibility aura won't be applied. --- scripts/eastern_kingdoms/zulgurub/boss_jindo.cpp | 3 ++- sd2_revision_nr.h | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/eastern_kingdoms/zulgurub/boss_jindo.cpp b/scripts/eastern_kingdoms/zulgurub/boss_jindo.cpp index f32d55439..d779e27d4 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_jindo.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_jindo.cpp @@ -35,6 +35,7 @@ enum SPELL_SHADE_OF_JINDO = 24308, // Spell was removed from DBC around TBC; will summon npcs manually! SPELL_HEALING_WARD_HEAL = 24311, + SPELL_SHADE_OF_JINDO_PASSIVE = 24307, // npcs NPC_SHADE_OF_JINDO = 14986, @@ -133,7 +134,7 @@ struct boss_jindoAI : public ScriptedAI float fX, fY, fZ; m_creature->GetRandomPoint(pTarget->GetPositionX(), pTarget->GetPositionY(), pTarget->GetPositionZ(), 5.0f, fX, fY, fZ); if (Creature* pSummoned = m_creature->SummonCreature(NPC_SHADE_OF_JINDO, fX, fY, fZ, 0, TEMPSUMMON_TIMED_OOC_DESPAWN, 15000)) - pSummoned->AI()->AttackStart(pTarget); + pSummoned->CastSpell(pSummoned, SPELL_SHADE_OF_JINDO_PASSIVE, true); m_uiDelusionsTimer = urand(4000, 12000); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 3812531c6..eb23ec044 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3041" + #define SD2_REVISION_NR "3042" #endif // __SD2_REVISION_NR_H__ From 95fed7b68f6eaeb0dc1181618c6760cc9850c7d3 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Wed, 17 Sep 2014 23:40:18 +0200 Subject: [PATCH 1054/1172] [3043] Fix Sunwell Plateau doors Thanks to @Ulduar for pointing --- .../instance_sunwell_plateau.cpp | 20 ------------------- .../sunwell_plateau/sunwell_plateau.h | 6 +++--- sd2_revision_nr.h | 2 +- 3 files changed, 4 insertions(+), 24 deletions(-) diff --git a/scripts/eastern_kingdoms/sunwell_plateau/instance_sunwell_plateau.cpp b/scripts/eastern_kingdoms/sunwell_plateau/instance_sunwell_plateau.cpp index 6062bf7d2..339942461 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/instance_sunwell_plateau.cpp +++ b/scripts/eastern_kingdoms/sunwell_plateau/instance_sunwell_plateau.cpp @@ -163,24 +163,12 @@ void instance_sunwell_plateau::OnObjectCreate(GameObject* pGo) if (m_auiEncounter[TYPE_KALECGOS] == DONE && m_auiEncounter[TYPE_BRUTALLUS] == DONE && m_auiEncounter[TYPE_FELMYST] == DONE) pGo->SetGoState(GO_STATE_ACTIVE); break; - case GO_FIRST_GATE: - break; - case GO_SECOND_GATE: - if (m_auiEncounter[TYPE_EREDAR_TWINS] == DONE) - pGo->SetGoState(GO_STATE_ACTIVE); - break; case GO_MURU_ENTER_GATE: - if (m_auiEncounter[TYPE_EREDAR_TWINS] == DONE) - pGo->SetGoState(GO_STATE_ACTIVE); break; case GO_MURU_EXIT_GATE: if (m_auiEncounter[TYPE_MURU] == DONE) pGo->SetGoState(GO_STATE_ACTIVE); break; - case GO_THIRD_GATE: - if (m_auiEncounter[TYPE_MURU] == DONE) - pGo->SetGoState(GO_STATE_ACTIVE); - break; case GO_ORB_BLUE_FLIGHT_1: case GO_ORB_BLUE_FLIGHT_2: case GO_ORB_BLUE_FLIGHT_3: @@ -227,21 +215,13 @@ void instance_sunwell_plateau::SetData(uint32 uiType, uint32 uiData) break; case TYPE_EREDAR_TWINS: m_auiEncounter[uiType] = uiData; - if (uiData == DONE) - { - DoUseDoorOrButton(GO_SECOND_GATE); - DoUseDoorOrButton(GO_MURU_ENTER_GATE); - } break; case TYPE_MURU: m_auiEncounter[uiType] = uiData; // combat door DoUseDoorOrButton(GO_MURU_ENTER_GATE); if (uiData == DONE) - { DoUseDoorOrButton(GO_MURU_EXIT_GATE); - DoUseDoorOrButton(GO_THIRD_GATE); - } else if (uiData == IN_PROGRESS) m_uiMuruBerserkTimer = 10 * MINUTE * IN_MILLISECONDS; break; diff --git a/scripts/eastern_kingdoms/sunwell_plateau/sunwell_plateau.h b/scripts/eastern_kingdoms/sunwell_plateau/sunwell_plateau.h index 06d375673..45db9630e 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/sunwell_plateau.h +++ b/scripts/eastern_kingdoms/sunwell_plateau/sunwell_plateau.h @@ -44,11 +44,11 @@ enum GO_BOSS_COLLISION_2 = 188524, GO_ICE_BARRIER = 188119, // used to block the players path during the Brutallus intro event GO_FIRE_BARRIER = 188075, // door after felmyst - GO_FIRST_GATE = 187766, // door between felmyst and eredar twins - GO_SECOND_GATE = 187764, // door after eredar twins + // GO_FIRST_GATE = 187766, // door between felmyst and eredar twins + // GO_SECOND_GATE = 187764, // door after eredar twins GO_MURU_ENTER_GATE = 187990, // muru gates GO_MURU_EXIT_GATE = 188118, - GO_THIRD_GATE = 187765, // door after muru; why another? + // GO_THIRD_GATE = 187765, // door after muru; why another? GO_ORB_BLUE_FLIGHT_1 = 188115, // orbs used in the Kil'jaeden fight GO_ORB_BLUE_FLIGHT_2 = 188116, diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index eb23ec044..f3eb230ff 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3042" + #define SD2_REVISION_NR "3043" #endif // __SD2_REVISION_NR_H__ From 12610915acf1e8d47f333104c8778eacd0cbd3f7 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Thu, 18 Sep 2014 21:47:16 +0200 Subject: [PATCH 1055/1172] [3044] Fix Golemagg aura Thanks @Tobschinski --- scripts/eastern_kingdoms/molten_core/boss_golemagg.cpp | 6 ++++-- sd2_revision_nr.h | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/scripts/eastern_kingdoms/molten_core/boss_golemagg.cpp b/scripts/eastern_kingdoms/molten_core/boss_golemagg.cpp index 3b01f8b97..1afe36037 100644 --- a/scripts/eastern_kingdoms/molten_core/boss_golemagg.cpp +++ b/scripts/eastern_kingdoms/molten_core/boss_golemagg.cpp @@ -43,6 +43,8 @@ struct boss_golemaggAI : public ScriptedAI { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); Reset(); + + DoCastSpellIfCan(m_creature, SPELL_MAGMA_SPLASH, CAST_TRIGGERED | CAST_AURA_NOT_PRESENT); } ScriptedInstance* m_pInstance; @@ -58,8 +60,6 @@ struct boss_golemaggAI : public ScriptedAI m_uiEarthquakeTimer = 3 * IN_MILLISECONDS; m_uiBuffTimer = 1.5 * IN_MILLISECONDS; m_bEnraged = false; - - m_creature->CastSpell(m_creature, SPELL_MAGMA_SPLASH, true); } void Aggro(Unit* /*pWho*/) override @@ -78,6 +78,8 @@ struct boss_golemaggAI : public ScriptedAI { if (m_pInstance) m_pInstance->SetData(TYPE_GOLEMAGG, FAIL); + + DoCastSpellIfCan(m_creature, SPELL_MAGMA_SPLASH, CAST_TRIGGERED | CAST_AURA_NOT_PRESENT); } void UpdateAI(const uint32 uiDiff) override diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index f3eb230ff..a018d9f32 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3043" + #define SD2_REVISION_NR "3044" #endif // __SD2_REVISION_NR_H__ From 00f4b687b53940a8d3a69f2521b546b7d6b898b8 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Thu, 18 Sep 2014 21:50:56 +0200 Subject: [PATCH 1056/1172] [3045] Allow M'uru to be summoned after SWP doors removal Thanks to @Ulduar --- .../instance_sunwell_plateau.cpp | 27 ++++++++++++------- .../sunwell_plateau/sunwell_plateau.h | 2 ++ sd2_revision_nr.h | 2 +- 3 files changed, 21 insertions(+), 10 deletions(-) diff --git a/scripts/eastern_kingdoms/sunwell_plateau/instance_sunwell_plateau.cpp b/scripts/eastern_kingdoms/sunwell_plateau/instance_sunwell_plateau.cpp index 339942461..d04cbbdd6 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/instance_sunwell_plateau.cpp +++ b/scripts/eastern_kingdoms/sunwell_plateau/instance_sunwell_plateau.cpp @@ -72,16 +72,20 @@ bool instance_sunwell_plateau::IsEncounterInProgress() const void instance_sunwell_plateau::OnPlayerEnter(Player* pPlayer) { - // Return if Felmyst already dead, or Brutallus alive - if (m_auiEncounter[TYPE_BRUTALLUS] != DONE || m_auiEncounter[TYPE_FELMYST] == DONE) - return; - - // Return if already summoned - if (GetSingleCreatureFromStorage(NPC_FELMYST, true)) - return; + // Spawn Felmyst if not already dead and Brutallus is complete + if (m_auiEncounter[TYPE_BRUTALLUS] == DONE && m_auiEncounter[TYPE_FELMYST] != DONE) + { + // Summon Felmyst in reload case if not already summoned + if (!GetSingleCreatureFromStorage(NPC_FELMYST, true)) + pPlayer->SummonCreature(NPC_FELMYST, aMadrigosaLoc[0].m_fX, aMadrigosaLoc[0].m_fY, aMadrigosaLoc[0].m_fZ, aMadrigosaLoc[0].m_fO, TEMPSUMMON_DEAD_DESPAWN, 0, true); + } - // Summon Felmyst in reload case - pPlayer->SummonCreature(NPC_FELMYST, aMadrigosaLoc[0].m_fX, aMadrigosaLoc[0].m_fY, aMadrigosaLoc[0].m_fZ, aMadrigosaLoc[0].m_fO, TEMPSUMMON_DEAD_DESPAWN, 0); + // Spawn M'uru after the Eredar Twins + if (m_auiEncounter[TYPE_EREDAR_TWINS] == DONE && m_auiEncounter[TYPE_MURU] != DONE) + { + if (!GetSingleCreatureFromStorage(NPC_MURU, true)) + pPlayer->SummonCreature(NPC_MURU, afMuruSpawnLoc[0], afMuruSpawnLoc[1], afMuruSpawnLoc[2], afMuruSpawnLoc[3], TEMPSUMMON_DEAD_DESPAWN, 0, true); + } } void instance_sunwell_plateau::OnCreatureCreate(Creature* pCreature) @@ -215,6 +219,11 @@ void instance_sunwell_plateau::SetData(uint32 uiType, uint32 uiData) break; case TYPE_EREDAR_TWINS: m_auiEncounter[uiType] = uiData; + if (uiData == DONE) + { + if (Player* pPlayer = GetPlayerInMap()) + pPlayer->SummonCreature(NPC_MURU, afMuruSpawnLoc[0], afMuruSpawnLoc[1], afMuruSpawnLoc[2], afMuruSpawnLoc[3], TEMPSUMMON_DEAD_DESPAWN, 0, true); + } break; case TYPE_MURU: m_auiEncounter[uiType] = uiData; diff --git a/scripts/eastern_kingdoms/sunwell_plateau/sunwell_plateau.h b/scripts/eastern_kingdoms/sunwell_plateau/sunwell_plateau.h index 45db9630e..6dc490f2f 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/sunwell_plateau.h +++ b/scripts/eastern_kingdoms/sunwell_plateau/sunwell_plateau.h @@ -100,6 +100,8 @@ static const EventLocations aKalecLoc[] = {1648.255f, 519.377f, 165.848f}, // fly away }; +static const float afMuruSpawnLoc[4] = { 1816.25f, 625.484f, 69.603f, 5.624f }; + class instance_sunwell_plateau : public ScriptedInstance, private DialogueHelper { public: diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index a018d9f32..56e56906d 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3044" + #define SD2_REVISION_NR "3045" #endif // __SD2_REVISION_NR_H__ From e4133c7a07e638935625d67501baa2d9eec2031e Mon Sep 17 00:00:00 2001 From: Xfurry Date: Thu, 18 Sep 2014 23:44:53 +0200 Subject: [PATCH 1057/1172] [3046] Update M'uru script * Implement Darkness and Singularity * Fix encounter reset after [3045] * Allow DB to handle summons cleanup on reset --- .../sunwell_plateau/boss_brutallus.cpp | 4 +- .../sunwell_plateau/boss_muru.cpp | 141 ++++++++++++------ sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 3 +- sql/updates/r3046_mangos.sql | 3 + 5 files changed, 106 insertions(+), 47 deletions(-) create mode 100644 sql/updates/r3046_mangos.sql diff --git a/scripts/eastern_kingdoms/sunwell_plateau/boss_brutallus.cpp b/scripts/eastern_kingdoms/sunwell_plateau/boss_brutallus.cpp index 50f3f099f..c626b6509 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/boss_brutallus.cpp +++ b/scripts/eastern_kingdoms/sunwell_plateau/boss_brutallus.cpp @@ -275,7 +275,7 @@ struct boss_brutallusAI : public ScriptedAI, private DialogueHelper break; case YELL_MADR_ICE_BARRIER: if (Creature* pMadrigosa = m_pInstance->GetSingleCreatureFromStorage(NPC_MADRIGOSA)) - pMadrigosa->CastSpell(pMadrigosa, SPELL_FREEZE, true); + pMadrigosa->CastSpell(pMadrigosa, SPELL_FREEZE, false); break; case YELL_MADR_INTRO: if (Creature* pMadrigosa = m_pInstance->GetSingleCreatureFromStorage(NPC_MADRIGOSA)) @@ -288,7 +288,7 @@ struct boss_brutallusAI : public ScriptedAI, private DialogueHelper case SPELL_FROST_BREATH: if (Creature* pMadrigosa = m_pInstance->GetSingleCreatureFromStorage(NPC_MADRIGOSA)) { - pMadrigosa->CastSpell(m_creature, SPELL_FROST_BREATH, true); + pMadrigosa->CastSpell(m_creature, SPELL_FROST_BREATH, false); pMadrigosa->GetMotionMaster()->MoveIdle(); } break; diff --git a/scripts/eastern_kingdoms/sunwell_plateau/boss_muru.cpp b/scripts/eastern_kingdoms/sunwell_plateau/boss_muru.cpp index f44a73879..b62011f5c 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/boss_muru.cpp +++ b/scripts/eastern_kingdoms/sunwell_plateau/boss_muru.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: boss_muru -SD%Complete: 80 -SDComment: Spell Negative Energy for Entropius needs core support; Summon humanoids spells have some core issues; Dark Fiend, Singularity and Darkness NPCs need eventAI support +SD%Complete: 90 +SDComment: Small adjustments required SDCategory: Sunwell Plateau EndScriptData */ @@ -56,7 +56,7 @@ enum SPELL_SUMMON_DARKNESS = 46269, // summons 25879 by missile // portal spells - SPELL_SENTINEL_SUMMONER_VISUAL = 45989, // hits the summoner, so it will summon the sentinel + SPELL_SENTINEL_SUMMONER_VISUAL = 45989, // hits the summoner, so it will summon the sentinel; triggers 45988 SPELL_SUMMON_SENTINEL_SUMMONER = 45978, SPELL_TRANSFORM_VISUAL_1 = 46178, // Visual - has Muru as script target SPELL_TRANSFORM_VISUAL_2 = 46208, // Visual - has Muru as script target @@ -64,6 +64,17 @@ enum // Muru npcs NPC_VOID_SENTINEL_SUMMONER = 25782, NPC_VOID_SENTINEL = 25772, // scripted in Acid + NPC_DARK_FIEND = 25744, + + // darkness spells + SPELL_VOID_ZONE_VISUAL = 46265, + SPELL_VOID_ZONE_PERIODIC = 46262, + SPELL_SUMMON_DARK_FIEND = 46263, + + // singularity spells + SPELL_BLACK_HOLE_VISUAL = 46242, + SPELL_BLACK_HOLE_VISUAL_2 = 46247, + SPELL_BLACK_HOLE_PASSIVE = 46228, MAX_TRANSFORM_CASTS = 10 }; @@ -247,25 +258,6 @@ struct boss_entropiusAI : public ScriptedAI { if (m_pInstance) m_pInstance->SetData(TYPE_MURU, DONE); - - // Despawn summoned creatures - DespawnSummonedCreatures(); - } - - void JustSummoned(Creature* pSummoned) override - { - // Add the Darkness and Singularity into the list - m_lSummonedCreaturesList.push_back(pSummoned->GetObjectGuid()); - } - - // Wrapper to despawn the Singularities and Darkness on death or on evade - void DespawnSummonedCreatures() - { - for (GuidList::const_iterator itr = m_lSummonedCreaturesList.begin(); itr != m_lSummonedCreaturesList.end(); ++itr) - { - if (Creature* pTemp = m_creature->GetMap()->GetCreature(*itr)) - pTemp->ForcedDespawn(); - } } void JustReachedHome() override @@ -275,12 +267,10 @@ struct boss_entropiusAI : public ScriptedAI m_pInstance->SetData(TYPE_MURU, FAIL); // respawn muru - if (Creature* pMuru = m_pInstance->GetSingleCreatureFromStorage(NPC_MURU)) - pMuru->Respawn(); + m_creature->SummonCreature(NPC_MURU, afMuruSpawnLoc[0], afMuruSpawnLoc[1], afMuruSpawnLoc[2], afMuruSpawnLoc[3], TEMPSUMMON_DEAD_DESPAWN, 0, true); } // despawn boss and summons for reset - DespawnSummonedCreatures(); m_creature->ForcedDespawn(); } @@ -408,35 +398,90 @@ struct npc_portal_targetAI : public Scripted_NoMovementAI }; /*###### -## npc_void_sentinel_summoner +## npc_darkness ######*/ -struct npc_void_sentinel_summonerAI : public Scripted_NoMovementAI +struct npc_darknessAI : public Scripted_NoMovementAI { - npc_void_sentinel_summonerAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) + npc_darknessAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { Reset(); } + + uint32 m_uiActiveTimer; + + void Reset() override { - m_pInstance = ((instance_sunwell_plateau*)pCreature->GetInstanceData()); - Reset(); + DoCastSpellIfCan(m_creature, SPELL_VOID_ZONE_VISUAL, CAST_TRIGGERED); + m_uiActiveTimer = 5000; } - instance_sunwell_plateau* m_pInstance; - - void Reset() override { } + void AttackStart(Unit* /*pWho*/) override { } + void MoveInLineOfSight(Unit* /*pWho*/) override { } void JustSummoned(Creature* pSummoned) override { - if (pSummoned->GetEntry() == NPC_VOID_SENTINEL) + if (pSummoned->GetEntry() == NPC_DARK_FIEND) + pSummoned->SetInCombatWithZone(); + } + + void UpdateAI(const uint32 uiDiff) override + { + if (m_uiActiveTimer) { - // Attack Muru's target - if (Creature* pMuru = m_pInstance->GetSingleCreatureFromStorage(NPC_MURU)) + if (m_uiActiveTimer <= uiDiff) { - if (Unit* pTarget = pMuru->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) - pSummoned->AI()->AttackStart(pTarget); + DoCastSpellIfCan(m_creature, SPELL_VOID_ZONE_PERIODIC, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_SUMMON_DARK_FIEND, CAST_TRIGGERED); + m_uiActiveTimer = 0; } + else + m_uiActiveTimer -= uiDiff; } } +}; + +/*###### +## npc_singularity +######*/ + +struct npc_singularityAI : public Scripted_NoMovementAI +{ + npc_singularityAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { Reset(); } + + uint32 m_uiActiveTimer; + uint8 m_uiActivateStage; + + void Reset() override + { + DoCastSpellIfCan(m_creature, SPELL_BLACK_HOLE_VISUAL, CAST_TRIGGERED); + m_uiActiveTimer = 1000; + m_uiActivateStage = 0; + } + + void AttackStart(Unit* /*pWho*/) override { } + void MoveInLineOfSight(Unit* /*pWho*/) override { } - void UpdateAI(const uint32 /*uiDiff*/) override { } + void UpdateAI(const uint32 uiDiff) override + { + if (m_uiActiveTimer) + { + if (m_uiActiveTimer <= uiDiff) + { + switch (m_uiActivateStage) + { + case 0: + if (DoCastSpellIfCan(m_creature, SPELL_BLACK_HOLE_VISUAL_2) == CAST_OK) + m_uiActiveTimer = 4000; + break; + case 1: + if (DoCastSpellIfCan(m_creature, SPELL_BLACK_HOLE_PASSIVE) == CAST_OK) + m_uiActiveTimer = 0; + break; + } + ++m_uiActivateStage; + } + else + m_uiActiveTimer -= uiDiff; + } + } }; CreatureAI* GetAI_boss_muru(Creature* pCreature) @@ -454,9 +499,14 @@ CreatureAI* GetAI_npc_portal_target(Creature* pCreature) return new npc_portal_targetAI(pCreature); } -CreatureAI* GetAI_npc_void_sentinel_summoner(Creature* pCreature) +CreatureAI* GetAI_npc_darkness(Creature* pCreature) { - return new npc_void_sentinel_summonerAI(pCreature); + return new npc_darknessAI(pCreature); +} + +CreatureAI* GetAI_npc_singularity(Creature* pCreature) +{ + return new npc_singularityAI(pCreature); } void AddSC_boss_muru() @@ -479,7 +529,12 @@ void AddSC_boss_muru() pNewScript->RegisterSelf(); pNewScript = new Script; - pNewScript->Name = "npc_void_sentinel_summoner"; - pNewScript->GetAI = &GetAI_npc_void_sentinel_summoner; + pNewScript->Name = "npc_darkness"; + pNewScript->GetAI = &GetAI_npc_darkness; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_singularity"; + pNewScript->GetAI = &GetAI_npc_singularity; pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 56e56906d..11ef42bda 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3045" + #define SD2_REVISION_NR "3046" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 3a6cb3954..7309c234e 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -1157,7 +1157,6 @@ UPDATE creature_template SET ScriptName='npc_shadow_image' WHERE entry=25214; UPDATE creature_template SET ScriptName='boss_muru' WHERE entry=25741; UPDATE creature_template SET ScriptName='boss_entropius' WHERE entry=25840; UPDATE creature_template SET ScriptName='npc_portal_target' WHERE entry=25770; -UPDATE creature_template SET ScriptName='npc_void_sentinel_summoner' WHERE entry=25782; UPDATE creature_template SET ScriptName='boss_kiljaeden' WHERE entry=25315; UPDATE creature_template SET ScriptName='npc_kiljaeden_controller' WHERE entry=25608; UPDATE creature_template SET ScriptName='spell_dummy_npc_brutallus_cloud' WHERE entry=25703; @@ -1165,6 +1164,8 @@ UPDATE creature_template SET ScriptName='boss_felmyst' WHERE entry=25038; UPDATE creature_template SET ScriptName='npc_shield_orb' WHERE entry=25502; UPDATE creature_template SET ScriptName='npc_power_blue_flight' WHERE entry=25653; UPDATE creature_template SET ScriptName='npc_demonic_vapor' WHERE entry=25265; +UPDATE creature_template SET ScriptName='npc_darkness' WHERE entry=25879; +UPDATE creature_template SET ScriptName='npc_singularity' WHERE entry=25855; /* SWAMP OF SORROWS */ UPDATE creature_template SET ScriptName='npc_galen_goodward' WHERE entry=5391; diff --git a/sql/updates/r3046_mangos.sql b/sql/updates/r3046_mangos.sql new file mode 100644 index 000000000..318276c2a --- /dev/null +++ b/sql/updates/r3046_mangos.sql @@ -0,0 +1,3 @@ +UPDATE creature_template SET ScriptName='npc_darkness' WHERE entry=25879; +UPDATE creature_template SET ScriptName='npc_singularity' WHERE entry=25855; +UPDATE creature_template SET ScriptName='' WHERE entry=25782; From 5d77c32c1d29d39f2d6fb44d848649335bb9f507 Mon Sep 17 00:00:00 2001 From: cala Date: Fri, 19 Sep 2014 00:17:52 +0200 Subject: [PATCH 1058/1172] [3047] Fix faction of escortee Corporal Keeshan Close #115 Signed-off-by: Xfurry --- scripts/eastern_kingdoms/redridge_mountains.cpp | 1 + sd2_revision_nr.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/eastern_kingdoms/redridge_mountains.cpp b/scripts/eastern_kingdoms/redridge_mountains.cpp index d35968dea..472063f77 100644 --- a/scripts/eastern_kingdoms/redridge_mountains.cpp +++ b/scripts/eastern_kingdoms/redridge_mountains.cpp @@ -63,6 +63,7 @@ struct npc_corporal_keeshan_escortAI : public npc_escortAI if (eventType == AI_EVENT_START_ESCORT && pInvoker->GetTypeId() == TYPEID_PLAYER) { DoScriptText(SAY_CORPORAL_KEESHAN_1, m_creature); + m_creature->SetFactionTemporary(FACTION_ESCORT_A_NEUTRAL_ACTIVE, TEMPFACTION_RESTORE_RESPAWN); Start(false, (Player*)pInvoker, GetQuestTemplateStore(uiMiscValue)); } } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 11ef42bda..a3cb0db48 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3046" + #define SD2_REVISION_NR "3047" #endif // __SD2_REVISION_NR_H__ From a2686712e377b62abbc7673909e19a4c114e6794 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sat, 20 Sep 2014 01:58:05 +0200 Subject: [PATCH 1059/1172] [3048] Allow Skadi to cast Freezing Cloud only on one side This will sort the flame triggers based on position and triggered aura --- .../utgarde_pinnacle/boss_skadi.cpp | 35 +++++++++++++++++++ sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 + sql/updates/r3048_mangos.sql | 1 + 4 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 sql/updates/r3048_mangos.sql diff --git a/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_skadi.cpp b/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_skadi.cpp index 760b9ceeb..55748a3c9 100644 --- a/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_skadi.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_skadi.cpp @@ -49,6 +49,9 @@ enum SPELL_SUMMON_GAUNTLET_MOBS = 48630, // tick every 30 sec SPELL_SUMMON_GAUNTLET_MOBS_H = 59275, // tick every 25 sec SPELL_LAUNCH_HARPOON = 48642, // this spell hit drake to reduce HP (force triggered from 48641) + SPELL_CLOUD_AURA_LEFT = 47574, + SPELL_CLOUD_AURA_RIGHT = 47594, + SPELL_CLOUD_AURA_DAMAGE = 47579, // phase 2 spells SPELL_CRUSH = 50234, @@ -469,6 +472,33 @@ CreatureAI* GetAI_npc_grauf(Creature* pCreature) return new npc_graufAI(pCreature); } +/*###### +## npc_flame_breath_trigger +######*/ + +bool EffectAuraDummy_npc_flame_breath_trigger(const Aura* pAura, bool bApply) +{ + if (pAura->GetEffIndex() != EFFECT_INDEX_0 || !bApply) + return true; + + Creature* pTarget = (Creature*)pAura->GetTarget(); + if (!pTarget) + return true; + + // apply auras based on creature position + if (pAura->GetId() == SPELL_CLOUD_AURA_LEFT) + { + if (pTarget->GetPositionY() > -511.0f) + pTarget->CastSpell(pTarget, SPELL_CLOUD_AURA_DAMAGE, true); + } + else if (pAura->GetId() == SPELL_CLOUD_AURA_RIGHT) + { + if (pTarget->GetPositionY() < -511.0f) + pTarget->CastSpell(pTarget, SPELL_CLOUD_AURA_DAMAGE, true); + } + return true; +} + /*###### ## at_skadi ######*/ @@ -510,6 +540,11 @@ void AddSC_boss_skadi() pNewScript->GetAI = &GetAI_npc_grauf; pNewScript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "npc_flame_breath_trigger"; + pNewScript->pEffectAuraDummy = &EffectAuraDummy_npc_flame_breath_trigger; + pNewScript->RegisterSelf(); + pNewScript = new Script; pNewScript->Name = "at_skadi"; pNewScript->pAreaTrigger = &AreaTrigger_at_skadi; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index a3cb0db48..fa756309c 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3047" + #define SD2_REVISION_NR "3048" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 7309c234e..384333da9 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -1425,6 +1425,7 @@ UPDATE creature_template SET ScriptName='boss_gortok' WHERE entry=26687; UPDATE creature_template SET ScriptName='npc_gortok_subboss' WHERE entry IN (26683,26684,26685,26686); UPDATE creature_template SET ScriptName='boss_skadi' WHERE entry=26693; UPDATE creature_template SET ScriptName='npc_grauf' WHERE entry=26893; +UPDATE creature_template SET ScriptName='npc_flame_breath_trigger' WHERE entry=28351; UPDATE creature_template SET ScriptName='boss_svala' WHERE entry=29281; UPDATE creature_template SET ScriptName='boss_ymiron' WHERE entry=26861; UPDATE instance_template SET ScriptName='instance_pinnacle' WHERE map=575; diff --git a/sql/updates/r3048_mangos.sql b/sql/updates/r3048_mangos.sql new file mode 100644 index 000000000..1acc2e7c5 --- /dev/null +++ b/sql/updates/r3048_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_flame_breath_trigger' WHERE entry=28351; From 4b7cd8d7671fcc2c85b7fef66f2b1d81d2bf8d06 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sun, 21 Sep 2014 00:34:39 +0200 Subject: [PATCH 1060/1172] [3049] Update script for quest 10451 Part of #27 Thanks @Grz3s for providing the data --- scripts/outland/shadowmoon_valley.cpp | 210 ++++++++++++++++---------- sd2_revision_nr.h | 2 +- sql/scriptdev2_script_full.sql | 89 +++++------ sql/updates/r3049_scriptdev2.sql | 62 ++++++++ 4 files changed, 241 insertions(+), 122 deletions(-) create mode 100644 sql/updates/r3049_scriptdev2.sql diff --git a/scripts/outland/shadowmoon_valley.cpp b/scripts/outland/shadowmoon_valley.cpp index fa74ba884..e1d33c22b 100644 --- a/scripts/outland/shadowmoon_valley.cpp +++ b/scripts/outland/shadowmoon_valley.cpp @@ -17,7 +17,7 @@ /* ScriptData SDName: Shadowmoon_Valley SD%Complete: 100 -SDComment: Quest support: 11020, 10458, 10480, 10481, 10514, 10540, 10588, 10781, 10804, 10854. +SDComment: Quest support: 10451, 10458, 10480, 10481, 10514, 10540, 10588, 10781, 10804, 10854, 11020. SDCategory: Shadowmoon Valley EndScriptData */ @@ -439,13 +439,15 @@ bool EffectDummyCreature_npc_dragonmaw_peon(Unit* pCaster, uint32 uiSpellId, Spe enum { SAY_WIL_START = -1000381, - SAY_WIL_AGGRO1 = -1000382, - SAY_WIL_AGGRO2 = -1000383, - SAY_WIL_PROGRESS1 = -1000384, - SAY_WIL_PROGRESS2 = -1000385, + SAY_WIL_AGGRO_1 = -1000382, + SAY_WIL_AGGRO_2 = -1000383, + SAY_WIL_FREE_SPIRITS = -1000384, SAY_WIL_FIND_EXIT = -1000386, - SAY_WIL_PROGRESS4 = -1000387, - SAY_WIL_PROGRESS5 = -1000388, + SAY_WIL_PROGRESS_1 = -1000385, + SAY_WIL_PROGRESS_2 = -1000387, + SAY_WIL_PROGRESS_3 = -1000388, + SAY_WIL_PROGRESS_4 = -1001168, + SAY_WIL_PROGRESS_5 = -1001169, SAY_WIL_JUST_AHEAD = -1000389, SAY_WIL_END = -1000390, @@ -453,79 +455,89 @@ enum SPELL_EARTHBING_TOTEM = 15786, SPELL_FROST_SHOCK = 12548, SPELL_HEALING_WAVE = 12491, + SPELL_WATER_BUBBLE = 35929, QUEST_ESCAPE_COILSCAR = 10451, NPC_COILSKAR_ASSASSIN = 21044, - FACTION_EARTHEN = 1726 // guessed + NPC_CAPTURED_WATER_SPIRIT = 21029, }; -// this script needs verification struct npc_wildaAI : public npc_escortAI { - npc_wildaAI(Creature* pCreature) : npc_escortAI(pCreature) { Reset(); } + npc_wildaAI(Creature* pCreature) : npc_escortAI(pCreature) + { + // the creature is floating in a prison; no quest available first; + // the floating prison setup and quest flag restore is handled by DB + m_creature->SetLevitate(true); + m_creature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER); + + Reset(); + } uint32 m_uiHealingTimer; + uint32 m_uiShockTimer; + uint32 m_uiLightningTimer; void Reset() override { m_uiHealingTimer = 0; + m_uiShockTimer = 1000; + m_uiLightningTimer = 2000; } - void WaypointReached(uint32 uiPointId) override + void Aggro(Unit* pWho) override { - Player* pPlayer = GetPlayerForEscort(); + if (roll_chance_i(30)) + DoCastSpellIfCan(m_creature, SPELL_EARTHBING_TOTEM); + } - if (!pPlayer) - return; + void AttackStart(Unit* pWho) override + { + if (m_creature->Attack(pWho, true)) + { + m_creature->AddThreat(pWho); + m_creature->SetInCombatWith(pWho); + pWho->SetInCombatWith(m_creature); + DoStartMovement(pWho, 10.0f); + } + } + void WaypointReached(uint32 uiPointId) override + { switch (uiPointId) { - case 13: - DoScriptText(SAY_WIL_PROGRESS1, m_creature, pPlayer); - DoSpawnAssassin(); - break; - case 14: - DoSpawnAssassin(); - break; - case 15: - DoScriptText(SAY_WIL_FIND_EXIT, m_creature, pPlayer); - break; - case 19: - DoRandomSay(); - break; - case 20: - DoSpawnAssassin(); - break; + case 8: case 26: - DoRandomSay(); - break; - case 27: - DoSpawnAssassin(); - break; - case 33: - DoRandomSay(); - break; - case 34: + case 30: + case 32: + case 39: + case 43: + case 51: DoSpawnAssassin(); break; - case 37: - DoRandomSay(); - break; - case 38: - DoSpawnAssassin(); + case 13: + if (Player* pPlayer = GetPlayerForEscort()) + DoScriptText(SAY_WIL_FREE_SPIRITS, m_creature, pPlayer); + DoFreeSpirits(); break; - case 39: - DoScriptText(SAY_WIL_JUST_AHEAD, m_creature, pPlayer); + case 14: + DoScriptText(SAY_WIL_FIND_EXIT, m_creature); break; - case 43: - DoRandomSay(); + case 15: + DoSpawnAssassin(2); break; - case 44: - DoSpawnAssassin(); + case 40: + if (Player* pPlayer = GetPlayerForEscort()) + DoScriptText(SAY_WIL_JUST_AHEAD, m_creature, pPlayer); break; - case 50: - DoScriptText(SAY_WIL_END, m_creature, pPlayer); - pPlayer->GroupEventHappens(QUEST_ESCAPE_COILSCAR, m_creature); + case 52: + if (Player* pPlayer = GetPlayerForEscort()) + { + DoDespawnSpirits(); + m_creature->SetFacingToObject(pPlayer); + DoScriptText(SAY_WIL_END, m_creature, pPlayer); + pPlayer->GroupEventHappens(QUEST_ESCAPE_COILSCAR, m_creature); + } break; } } @@ -533,53 +545,92 @@ struct npc_wildaAI : public npc_escortAI void JustSummoned(Creature* pSummoned) override { if (pSummoned->GetEntry() == NPC_COILSKAR_ASSASSIN) - pSummoned->AI()->AttackStart(m_creature); - } - - // this is very unclear, random say without no real relevance to script/event - void DoRandomSay() - { - switch (urand(0, 2)) { - case 0: DoScriptText(SAY_WIL_PROGRESS2, m_creature); break; - case 1: DoScriptText(SAY_WIL_PROGRESS4, m_creature); break; - case 2: DoScriptText(SAY_WIL_PROGRESS5, m_creature); break; + if (Player* pPlayer = GetPlayerForEscort()) + pSummoned->AI()->AttackStart(pPlayer); } } - void DoSpawnAssassin() + // wrapper to spawn assassin and do text + void DoSpawnAssassin(uint8 uiCount = 1) { // unknown where they actually appear float fX, fY, fZ; - m_creature->GetRandomPoint(m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), 15.0f, fX, fY, fZ); + for (uint8 i = 0; i < uiCount; ++i) + { + m_creature->GetRandomPoint(m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), 10.0f, fX, fY, fZ); + m_creature->SummonCreature(NPC_COILSKAR_ASSASSIN, fX, fY, fZ, 0.0f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 10000); + } - m_creature->SummonCreature(NPC_COILSKAR_ASSASSIN, fX, fY, fZ, 0.0f, TEMPSUMMON_TIMED_OOC_DESPAWN, 5000); + // random chance to yell + if (roll_chance_i(20)) + return; + + // random text when assassin is summoned + switch (urand(0, 6)) + { + case 0: DoScriptText(SAY_WIL_PROGRESS_1, m_creature); break; + case 1: DoScriptText(SAY_WIL_PROGRESS_2, m_creature); break; + case 2: DoScriptText(SAY_WIL_PROGRESS_3, m_creature); break; + case 3: DoScriptText(SAY_WIL_PROGRESS_4, m_creature); break; + case 4: DoScriptText(SAY_WIL_PROGRESS_5, m_creature); break; + case 5: DoScriptText(SAY_WIL_AGGRO_1, m_creature); break; + case 6: DoScriptText(SAY_WIL_AGGRO_2, m_creature); break; + } } - void Aggro(Unit* pWho) override + // free the water spirits + void DoFreeSpirits() { - // don't always use - if (urand(0, 4)) + std::list lSpiritsInRange; + GetCreatureListWithEntryInGrid(lSpiritsInRange, m_creature, NPC_CAPTURED_WATER_SPIRIT, 50.0f); + + if (lSpiritsInRange.empty()) return; - // only aggro text if not player - if (pWho->GetTypeId() != TYPEID_PLAYER) + // all spirits follow + for (std::list::const_iterator itr = lSpiritsInRange.begin(); itr != lSpiritsInRange.end(); ++itr) { - // appears to be random - switch (urand(0, 3)) - { - case 0: DoScriptText(SAY_WIL_AGGRO1, m_creature, pWho); break; - case 1: DoScriptText(SAY_WIL_AGGRO2, m_creature, pWho); break; - } + (*itr)->RemoveAurasDueToSpell(SPELL_WATER_BUBBLE); + (*itr)->GetMotionMaster()->MoveFollow(m_creature, m_creature->GetDistance(*itr) * 0.25f, M_PI_F/2 + m_creature->GetAngle(*itr)); + (*itr)->SetLevitate(false); } } + void DoDespawnSpirits() + { + std::list lSpiritsInRange; + GetCreatureListWithEntryInGrid(lSpiritsInRange, m_creature, NPC_CAPTURED_WATER_SPIRIT, 50.0f); + + if (lSpiritsInRange.empty()) + return; + + // all spirits follow + for (std::list::const_iterator itr = lSpiritsInRange.begin(); itr != lSpiritsInRange.end(); ++itr) + (*itr)->ForcedDespawn(6000); + } + void UpdateEscortAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - // TODO: add more abilities + if (m_uiLightningTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_CHAIN_LIGHTNING) == CAST_OK) + m_uiLightningTimer = 4000; + } + else + m_uiLightningTimer -= uiDiff; + + if (m_uiShockTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_FROST_SHOCK) == CAST_OK) + m_uiShockTimer = 10000; + } + else + m_uiShockTimer -= uiDiff; + if (m_creature->GetHealthPercent() <= 30.0f) { if (m_uiHealingTimer < uiDiff) @@ -605,7 +656,8 @@ bool QuestAccept_npc_wilda(Player* pPlayer, Creature* pCreature, const Quest* pQ if (pQuest->GetQuestId() == QUEST_ESCAPE_COILSCAR) { DoScriptText(SAY_WIL_START, pCreature, pPlayer); - pCreature->SetFactionTemporary(FACTION_EARTHEN, TEMPFACTION_RESTORE_RESPAWN); + pCreature->SetFactionTemporary(FACTION_ESCORT_A_NEUTRAL_ACTIVE, TEMPFACTION_RESTORE_RESPAWN); + pCreature->SetLevitate(false); if (npc_wildaAI* pEscortAI = dynamic_cast(pCreature->AI())) pEscortAI->Start(false, pPlayer, pQuest); diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index fa756309c..6caf5c4bb 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3048" + #define SD2_REVISION_NR "3049" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 4647f6954..8fcf5c06c 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -388,8 +388,8 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1000386,'Now we must find the exit.',0,0,0,0,'wilda SAY_WIL_FIND_EXIT'), (-1000387,'Lady Vashj must answer for these atrocities. She must be brought to justice!',0,0,0,0,'wilda SAY_WIL_PROGRESS4'), (-1000388,'The tumultuous nature of the great waterways of Azeroth and Draenor are a direct result of tormented water spirits.',0,0,0,0,'wilda SAY_WIL_PROGRESS5'), -(-1000389,'It shouldn\'t be much further, $n. The exit is just up ahead.',0,0,0,0,'wilda SAY_WIL_JUST_AHEAD'), -(-1000390,'Thank you, $n. Please return to my brethren at the Altar of Damnation, near the Hand of Gul\'dan, and tell them that Wilda is safe. May the Earthmother watch over you...',0,0,0,0,'wilda SAY_WIL_END'), +(-1000389,'It shouldn\'t be much further, $n. The exit is just up ahead.',0,0,0,1,'wilda SAY_WIL_JUST_AHEAD'), +(-1000390,'Thank you, $n. Please return to my brethren at the Altar of Damnation, near the Hand of Gul\'dan, and tell them that Wilda is safe. May the Earthmother watch over you...',0,0,0,3,'wilda SAY_WIL_END'), (-1000391,'I\'m Thirsty.',0,0,0,0,'tooga SAY_TOOG_THIRST'), (-1000392,'Torta must be so worried.',0,0,0,0,'tooga SAY_TOOG_WORRIED'), @@ -1265,7 +1265,10 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1001164,'I can sens it now, $N. Ashenvale lies down this path.',0,0,0,0,'arei SAY_ASHENVALE'), (-1001165,'I feel... something strange...',0,0,0,0,'arei SAY_TRANSFORM'), (-1001166,'$N my form has now changed! The true strength of my spirit is returing to me now... The cursed grasp of the forest is leaving me.',0,0,0,0,'arei SAY_LIFT_CURSE'), -(-1001167,'Thank you, $N. Now my spirit will finally be at peace.',0,0,0,0,'arei SAY_ESCORT_COMPLETE'); +(-1001167,'Thank you, $N. Now my spirit will finally be at peace.',0,0,0,0,'arei SAY_ESCORT_COMPLETE'), + +(-1001168,'The naga torture the spirits of water. They invoke chaos and destruction!',0,0,0,0,'wilda SAY_WIL_PROGRESS_4'), +(-1001169,'The naga do not respect nature. They twist and corrupt it to meet their needs. They live to agitate the spirits.',0,0,0,0,'wilda SAY_WIL_PROGRESS_5'); -- -1 033 000 SHADOWFANG KEEP INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES @@ -6433,49 +6436,51 @@ INSERT INTO script_waypoint VALUES (21027, 5, -2745.077148, 1311.108765, 33.630898, 0, ''), (21027, 6, -2749.855225, 1302.737915, 33.475632, 0, ''), (21027, 7, -2753.639648, 1294.059448, 33.314930, 0, ''), -(21027, 8, -2756.796387, 1285.122192, 33.391262, 0, ''), +(21027, 8, -2756.796387, 1285.122192, 33.391262, 0, 'spawn assassin'), (21027, 9, -2750.042969, 1273.661987, 33.188259, 0, ''), (21027, 10, -2740.378418, 1258.846680, 33.212521, 0, ''), (21027, 11, -2733.629395, 1248.259766, 33.640598, 0, ''), (21027, 12, -2727.212646, 1238.606445, 33.520847, 0, ''), -(21027, 13, -2726.377197, 1237.264526, 33.461823, 3000, 'SAY_WIL_PROGRESS1'), -(21027, 14, -2746.383301, 1266.390625, 33.191952, 2000, ''), -(21027, 15, -2746.383301, 1266.390625, 33.191952, 4000, 'SAY_WIL_FIND_EXIT'), -(21027, 16, -2758.927734, 1285.134155, 33.341728, 0, ''), -(21027, 17, -2761.845703, 1292.313599, 33.209042, 0, ''), -(21027, 18, -2758.871826, 1300.677612, 33.285332, 0, ''), -(21027, 19, -2753.928955, 1307.755859, 33.452457, 0, ''), -(21027, 20, -2738.612061, 1316.191284, 33.482975, 0, ''), -(21027, 21, -2727.897461, 1320.013916, 33.381111, 0, ''), -(21027, 22, -2709.458740, 1315.739990, 33.301838, 0, ''), -(21027, 23, -2704.658936, 1301.620361, 32.463303, 0, ''), -(21027, 24, -2704.120117, 1298.922607, 32.768162, 0, ''), -(21027, 25, -2691.798340, 1292.846436, 33.852642, 0, ''), -(21027, 26, -2682.879639, 1288.853882, 32.995399, 0, ''), -(21027, 27, -2661.869141, 1279.682495, 26.686783, 0, ''), -(21027, 28, -2648.943604, 1270.272827, 24.147522, 0, ''), -(21027, 29, -2642.506836, 1262.938721, 23.512444, 0, ''), -(21027, 30, -2636.984863, 1252.429077, 20.418257, 0, ''), -(21027, 31, -2648.113037, 1224.984863, 8.691818, 0, ''), -(21027, 32, -2658.393311, 1200.136719, 5.492243, 0, ''), -(21027, 33, -2668.504395, 1190.450562, 3.127407, 0, ''), -(21027, 34, -2685.930420, 1174.360840, 5.163924, 0, ''), -(21027, 35, -2701.613770, 1160.026367, 5.611311, 0, ''), -(21027, 36, -2714.659668, 1149.980347, 4.342373, 0, ''), -(21027, 37, -2721.443359, 1145.002808, 1.913474, 0, ''), -(21027, 38, -2733.962158, 1143.436279, 2.620415, 0, ''), -(21027, 39, -2757.876709, 1146.937500, 6.184002, 2000, 'SAY_WIL_JUST_AHEAD'), -(21027, 40, -2772.300537, 1166.052734, 6.331811, 0, ''), -(21027, 41, -2790.265381, 1189.941650, 5.207958, 0, ''), -(21027, 42, -2805.448975, 1208.663940, 5.557623, 0, ''), -(21027, 43, -2820.617676, 1225.870239, 6.266103, 0, ''), -(21027, 44, -2831.926758, 1237.725830, 5.808506, 0, ''), -(21027, 45, -2842.578369, 1252.869629, 6.807481, 0, ''), -(21027, 46, -2846.344971, 1258.727295, 7.386168, 0, ''), -(21027, 47, -2847.556396, 1266.771729, 8.208790, 0, ''), -(21027, 48, -2841.654541, 1285.809204, 7.933223, 0, ''), -(21027, 49, -2841.754883, 1289.832520, 6.990304, 0, ''), -(21027, 50, -2871.398438, 1302.348145, 6.807335, 7500, 'SAY_WIL_END'); +(21027, 13, -2726.377197, 1237.264526, 33.461823, 4000, 'SAY_WIL_PROGRESS1'), +(21027, 14, -2726.377197, 1237.264526, 33.461823, 4000, 'SAY_WIL_FIND_EXIT'), +(21027, 15, -2746.383301, 1266.390625, 33.191952, 0, 'spawn assassin'), +(21027, 16, -2746.383301, 1266.390625, 33.191952, 0, ''), +(21027, 17, -2758.927734, 1285.134155, 33.341728, 0, ''), +(21027, 18, -2761.845703, 1292.313599, 33.209042, 0, ''), +(21027, 19, -2758.871826, 1300.677612, 33.285332, 0, ''), +(21027, 20, -2753.928955, 1307.755859, 33.452457, 0, ''), +(21027, 21, -2738.612061, 1316.191284, 33.482975, 0, ''), +(21027, 22, -2727.897461, 1320.013916, 33.381111, 0, ''), +(21027, 23, -2709.458740, 1315.739990, 33.301838, 0, ''), +(21027, 24, -2704.658936, 1301.620361, 32.463303, 0, ''), +(21027, 25, -2704.120117, 1298.922607, 32.768162, 0, ''), +(21027, 26, -2691.798340, 1292.846436, 33.852642, 0, 'spawn assassin'), +(21027, 27, -2682.879639, 1288.853882, 32.995399, 0, ''), +(21027, 28, -2661.869141, 1279.682495, 26.686783, 0, ''), +(21027, 29, -2648.943604, 1270.272827, 24.147522, 0, ''), +(21027, 30, -2642.506836, 1262.938721, 23.512444, 0, 'spawn assassin'), +(21027, 31, -2636.984863, 1252.429077, 20.418257, 0, ''), +(21027, 32, -2648.113037, 1224.984863, 8.691818, 0, 'spawn assassin'), +(21027, 33, -2658.393311, 1200.136719, 5.492243, 0, ''), +(21027, 34, -2668.504395, 1190.450562, 3.127407, 0, ''), +(21027, 35, -2685.930420, 1174.360840, 5.163924, 0, ''), +(21027, 36, -2701.613770, 1160.026367, 5.611311, 0, ''), +(21027, 37, -2714.659668, 1149.980347, 4.342373, 0, ''), +(21027, 38, -2721.443359, 1145.002808, 1.913474, 0, ''), +(21027, 39, -2733.962158, 1143.436279, 2.620415, 0, 'spawn assassin'), +(21027, 40, -2757.876709, 1146.937500, 6.184002, 2000, 'SAY_WIL_JUST_AHEAD'), +(21027, 41, -2772.300537, 1166.052734, 6.331811, 0, ''), +(21027, 42, -2790.265381, 1189.941650, 5.207958, 0, ''), +(21027, 43, -2805.448975, 1208.663940, 5.557623, 0, 'spawn assassin'), +(21027, 44, -2820.617676, 1225.870239, 6.266103, 0, ''), +(21027, 45, -2831.926758, 1237.725830, 5.808506, 0, ''), +(21027, 46, -2842.578369, 1252.869629, 6.807481, 0, ''), +(21027, 47, -2846.344971, 1258.727295, 7.386168, 0, ''), +(21027, 48, -2847.556396, 1266.771729, 8.208790, 0, ''), +(21027, 49, -2841.654541, 1285.809204, 7.933223, 0, ''), +(21027, 50, -2841.754883, 1289.832520, 6.990304, 0, ''), +(21027, 51, -2861.973145, 1298.774536, 6.807335, 0, 'spawn assassin'), +(21027, 52, -2871.398438, 1302.348145, 6.807335, 7500, 'SAY_WIL_END'); DELETE FROM script_waypoint WHERE entry=22377; INSERT INTO script_waypoint VALUES diff --git a/sql/updates/r3049_scriptdev2.sql b/sql/updates/r3049_scriptdev2.sql new file mode 100644 index 000000000..909e87a0a --- /dev/null +++ b/sql/updates/r3049_scriptdev2.sql @@ -0,0 +1,62 @@ +DELETE FROM script_texts WHERE entry IN (-1001168,-1001169); +INSERT INTO script_texts (entry,content_default,sound,type,LANGUAGE,emote,comment) VALUES +(-1001168,'The naga torture the spirits of water. They invoke chaos and destruction!',0,0,0,0,'wilda SAY_WIL_PROGRESS_4'), +(-1001169,'The naga do not respect nature. They twist and corrupt it to meet their needs. They live to agitate the spirits.',0,0,0,0,'wilda SAY_WIL_PROGRESS_5'); +UPDATE script_texts SET emote=1 WHERE entry=-1000389; +UPDATE script_texts SET emote=3 WHERE entry=-1000390; + +DELETE FROM script_waypoint WHERE entry=21027; +INSERT INTO script_waypoint VALUES +(21027, 0, -2714.697266, 1326.879395, 34.306953, 0, ''), +(21027, 1, -2666.364990, 1348.222656, 34.445557, 0, ''), +(21027, 2, -2693.789307, 1336.964966, 34.445557, 0, ''), +(21027, 3, -2715.495361, 1328.054443, 34.106014, 0, ''), +(21027, 4, -2742.530762, 1314.138550, 33.606144, 0, ''), +(21027, 5, -2745.077148, 1311.108765, 33.630898, 0, ''), +(21027, 6, -2749.855225, 1302.737915, 33.475632, 0, ''), +(21027, 7, -2753.639648, 1294.059448, 33.314930, 0, ''), +(21027, 8, -2756.796387, 1285.122192, 33.391262, 0, 'spawn assassin'), +(21027, 9, -2750.042969, 1273.661987, 33.188259, 0, ''), +(21027, 10, -2740.378418, 1258.846680, 33.212521, 0, ''), +(21027, 11, -2733.629395, 1248.259766, 33.640598, 0, ''), +(21027, 12, -2727.212646, 1238.606445, 33.520847, 0, ''), +(21027, 13, -2726.377197, 1237.264526, 33.461823, 4000, 'SAY_WIL_PROGRESS1'), +(21027, 14, -2726.377197, 1237.264526, 33.461823, 4000, 'SAY_WIL_FIND_EXIT'), +(21027, 15, -2746.383301, 1266.390625, 33.191952, 0, 'spawn assassin'), +(21027, 16, -2746.383301, 1266.390625, 33.191952, 0, ''), +(21027, 17, -2758.927734, 1285.134155, 33.341728, 0, ''), +(21027, 18, -2761.845703, 1292.313599, 33.209042, 0, ''), +(21027, 19, -2758.871826, 1300.677612, 33.285332, 0, ''), +(21027, 20, -2753.928955, 1307.755859, 33.452457, 0, ''), +(21027, 21, -2738.612061, 1316.191284, 33.482975, 0, ''), +(21027, 22, -2727.897461, 1320.013916, 33.381111, 0, ''), +(21027, 23, -2709.458740, 1315.739990, 33.301838, 0, ''), +(21027, 24, -2704.658936, 1301.620361, 32.463303, 0, ''), +(21027, 25, -2704.120117, 1298.922607, 32.768162, 0, ''), +(21027, 26, -2691.798340, 1292.846436, 33.852642, 0, 'spawn assassin'), +(21027, 27, -2682.879639, 1288.853882, 32.995399, 0, ''), +(21027, 28, -2661.869141, 1279.682495, 26.686783, 0, ''), +(21027, 29, -2648.943604, 1270.272827, 24.147522, 0, ''), +(21027, 30, -2642.506836, 1262.938721, 23.512444, 0, 'spawn assassin'), +(21027, 31, -2636.984863, 1252.429077, 20.418257, 0, ''), +(21027, 32, -2648.113037, 1224.984863, 8.691818, 0, 'spawn assassin'), +(21027, 33, -2658.393311, 1200.136719, 5.492243, 0, ''), +(21027, 34, -2668.504395, 1190.450562, 3.127407, 0, ''), +(21027, 35, -2685.930420, 1174.360840, 5.163924, 0, ''), +(21027, 36, -2701.613770, 1160.026367, 5.611311, 0, ''), +(21027, 37, -2714.659668, 1149.980347, 4.342373, 0, ''), +(21027, 38, -2721.443359, 1145.002808, 1.913474, 0, ''), +(21027, 39, -2733.962158, 1143.436279, 2.620415, 0, 'spawn assassin'), +(21027, 40, -2757.876709, 1146.937500, 6.184002, 2000, 'SAY_WIL_JUST_AHEAD'), +(21027, 41, -2772.300537, 1166.052734, 6.331811, 0, ''), +(21027, 42, -2790.265381, 1189.941650, 5.207958, 0, ''), +(21027, 43, -2805.448975, 1208.663940, 5.557623, 0, 'spawn assassin'), +(21027, 44, -2820.617676, 1225.870239, 6.266103, 0, ''), +(21027, 45, -2831.926758, 1237.725830, 5.808506, 0, ''), +(21027, 46, -2842.578369, 1252.869629, 6.807481, 0, ''), +(21027, 47, -2846.344971, 1258.727295, 7.386168, 0, ''), +(21027, 48, -2847.556396, 1266.771729, 8.208790, 0, ''), +(21027, 49, -2841.654541, 1285.809204, 7.933223, 0, ''), +(21027, 50, -2841.754883, 1289.832520, 6.990304, 0, ''), +(21027, 51, -2861.973145, 1298.774536, 6.807335, 0, 'spawn assassin'), +(21027, 52, -2871.398438, 1302.348145, 6.807335, 7500, 'SAY_WIL_END'); From 616de2fdb64ad45ee13c9ba4d0bf4585f4e8871d Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sun, 21 Sep 2014 18:57:12 +0200 Subject: [PATCH 1061/1172] [3050] Implement script for npc 19554 Required for quest 10439. Also requires dbscript for proper functionality Close scriptdev2/scriptdev2-cata#5 --- scripts/outland/netherstorm.cpp | 152 +++++++++++++++++++++++++++++++ sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 + sql/scriptdev2_script_full.sql | 5 +- sql/updates/r3050_mangos.sql | 1 + sql/updates/r3050_scriptdev2.sql | 4 + 6 files changed, 163 insertions(+), 2 deletions(-) create mode 100644 sql/updates/r3050_mangos.sql create mode 100644 sql/updates/r3050_scriptdev2.sql diff --git a/scripts/outland/netherstorm.cpp b/scripts/outland/netherstorm.cpp index 8dff596bb..d4222a40c 100644 --- a/scripts/outland/netherstorm.cpp +++ b/scripts/outland/netherstorm.cpp @@ -31,6 +31,7 @@ npc_zeppit npc_protectorate_demolitionist npc_captured_vanguard npc_drijya +npc_dimensius EndContentData */ #include "precompiled.h" @@ -1398,6 +1399,152 @@ bool QuestAccept_npc_drijya(Player* pPlayer, Creature* pCreature, const Quest* p return false; } +/*###### +## npc_dimensius +######*/ + +enum +{ + SAY_AGGRO = -1001170, + SAY_SUMMON = -1001171, + + SPELL_DIMENSIUS_FEEDING = 37450, + SPELL_SHADOW_SPIRAL = 37500, + SPELL_SHADOW_VAULT = 37412, + + NPC_SPAWN_OF_DIMENSIUS = 21780, + NPC_CAPTAIN_SAEED = 20985, + MODEL_ID_DIMENSIUS_CLOUD = 20011, +}; + +// order based on the increasing range of damage +static const uint32 auiShadowRainSpells[5] = { 37399, 37405, 37397, 37396, 37409 }; + +struct npc_dimensiusAI : public Scripted_NoMovementAI +{ + npc_dimensiusAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { Reset(); } + + uint32 m_uiSpiralTimer; + uint32 m_uiVaultTimer; + uint32 m_uiRainTimer; + uint8 m_uiRainIndex; + uint8 m_uiSpawnsDead; + + bool m_bSpawnsFeeding; + + void Reset() override + { + m_uiSpiralTimer = 1000; + m_uiVaultTimer = urand(5000, 10000); + m_uiRainTimer = 0; + m_uiRainIndex = urand(0, 4); + m_uiSpawnsDead = 0; + + m_bSpawnsFeeding = false; + + m_creature->SetDisplayId(MODEL_ID_DIMENSIUS_CLOUD); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_PASSIVE); + } + + void Aggro(Unit* /*pWho*/) override + { + DoScriptText(SAY_AGGRO, m_creature); + } + + void JustSummoned(Creature* pSummoned) override + { + if (pSummoned->GetEntry() == NPC_SPAWN_OF_DIMENSIUS) + pSummoned->CastSpell(m_creature, SPELL_DIMENSIUS_FEEDING, true); + } + + void SummonedCreatureJustDied(Creature* pSummoned) override + { + if (pSummoned->GetEntry() == NPC_SPAWN_OF_DIMENSIUS) + { + // interrupt the shadow rain when all spawns are dead + ++m_uiSpawnsDead; + if (m_uiSpawnsDead == 4) + { + m_creature->InterruptNonMeleeSpells(false); + m_uiRainTimer = 0; + } + } + } + + void ReceiveAIEvent(AIEventType eventType, Creature* pSender, Unit* /*pInvoker*/, uint32 /*uiMiscValue*/) override + { + // event is sent by dbscript + if (eventType == AI_EVENT_CUSTOM_EVENTAI_B && pSender->GetEntry() == NPC_CAPTAIN_SAEED) + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_PASSIVE); + } + + void UpdateAI(const uint32 uiDiff) override + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (!m_bSpawnsFeeding && m_creature->GetHealthPercent() < 75.0f) + { + DoScriptText(SAY_SUMMON, m_creature); + + float fX, fY, fZ; + for (uint8 i = 0; i < 4; ++i) + { + m_creature->GetNearPoint(m_creature, fX, fY, fZ, 0, 30.0f, i * (M_PI_F / 2)); + m_creature->SummonCreature(NPC_SPAWN_OF_DIMENSIUS, fX, fY, fZ, 0, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 120000); + } + + m_uiRainTimer = 5000; + m_bSpawnsFeeding = true; + } + + if (m_uiRainTimer) + { + if (m_uiRainTimer <= uiDiff) + { + if (DoCastSpellIfCan(m_creature, auiShadowRainSpells[m_uiRainIndex], CAST_INTERRUPT_PREVIOUS) == CAST_OK) + { + m_uiRainIndex = urand(0, 4); + m_uiRainTimer = 5000; + } + } + else + m_uiRainTimer -= uiDiff; + + return; + } + + if (m_uiSpiralTimer < uiDiff) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, SPELL_SHADOW_SPIRAL) == CAST_OK) + m_uiSpiralTimer = urand(3000, 4000); + } + } + else + m_uiSpiralTimer -= uiDiff; + + if (m_uiVaultTimer < uiDiff) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, SPELL_SHADOW_VAULT) == CAST_OK) + m_uiVaultTimer = urand(20000, 30000); + } + } + else + m_uiVaultTimer -= uiDiff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_npc_dimensius(Creature* pCreature) +{ + return new npc_dimensiusAI(pCreature); +} + void AddSC_netherstorm() { Script* pNewScript; @@ -1455,4 +1602,9 @@ void AddSC_netherstorm() pNewScript->GetAI = &GetAI_npc_drijya; pNewScript->pQuestAcceptNPC = &QuestAccept_npc_drijya; pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_dimensius"; + pNewScript->GetAI = &GetAI_npc_dimensius; + pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 6caf5c4bb..35bea6694 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3049" + #define SD2_REVISION_NR "3050" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 384333da9..21e3fbba6 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -915,6 +915,7 @@ UPDATE creature_template SET ScriptName='npc_zeppit' WHERE entry=22484; UPDATE creature_template SET ScriptName='npc_protectorate_demolitionist' WHERE entry=20802; UPDATE creature_template SET ScriptName='npc_captured_vanguard' WHERE entry=20763; UPDATE creature_template SET ScriptName='npc_drijya' WHERE entry=20281; +UPDATE creature_template SET ScriptName='npc_dimensius' WHERE entry=19554; /* */ /* THE NEXUS */ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 8fcf5c06c..06fe2b854 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -1268,7 +1268,10 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1001167,'Thank you, $N. Now my spirit will finally be at peace.',0,0,0,0,'arei SAY_ESCORT_COMPLETE'), (-1001168,'The naga torture the spirits of water. They invoke chaos and destruction!',0,0,0,0,'wilda SAY_WIL_PROGRESS_4'), -(-1001169,'The naga do not respect nature. They twist and corrupt it to meet their needs. They live to agitate the spirits.',0,0,0,0,'wilda SAY_WIL_PROGRESS_5'); +(-1001169,'The naga do not respect nature. They twist and corrupt it to meet their needs. They live to agitate the spirits.',0,0,0,0,'wilda SAY_WIL_PROGRESS_5'), + +(-1001170,'Time only has meaning to mortals, insect. Dimensius is infinite!',0,1,0,0,'dimensius SAY_AGGRO'), +(-1001171,'I hunger! Feed me the power of this forge, my children!',0,1,0,0,'dimensius SAY_SUMMON'); -- -1 033 000 SHADOWFANG KEEP INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES diff --git a/sql/updates/r3050_mangos.sql b/sql/updates/r3050_mangos.sql new file mode 100644 index 000000000..5ba05a0a0 --- /dev/null +++ b/sql/updates/r3050_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_dimensius' WHERE entry=19554; diff --git a/sql/updates/r3050_scriptdev2.sql b/sql/updates/r3050_scriptdev2.sql new file mode 100644 index 000000000..910652720 --- /dev/null +++ b/sql/updates/r3050_scriptdev2.sql @@ -0,0 +1,4 @@ +DELETE FROM script_texts WHERE entry IN (-1001170,-1001171); +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1001170,'Time only has meaning to mortals, insect. Dimensius is infinite!',0,1,0,0,'dimensius SAY_AGGRO'), +(-1001171,'I hunger! Feed me the power of this forge, my children!',0,1,0,0,'dimensius SAY_SUMMON'); From 955141b8bdd608dc539f2b7e09284cdb8db6577e Mon Sep 17 00:00:00 2001 From: Xfurry Date: Mon, 29 Sep 2014 00:17:03 +0200 Subject: [PATCH 1062/1172] [3051] Complete script for Viscidus - AQ40 --- .../temple_of_ahnqiraj/boss_viscidus.cpp | 254 +++++++++++++++++- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 2 +- sql/scriptdev2_script_full.sql | 9 +- sql/updates/r3051_mangos.sql | 1 + sql/updates/r3051_scriptdev2.sql | 8 + 6 files changed, 270 insertions(+), 6 deletions(-) create mode 100644 sql/updates/r3051_mangos.sql create mode 100644 sql/updates/r3051_scriptdev2.sql diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_viscidus.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_viscidus.cpp index a5be12399..f5b6e1fd8 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/boss_viscidus.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_viscidus.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: Boss_Viscidus -SD%Complete: 40 -SDComment: Only basic spells - freeze and explode events require more research +SD%Complete: 90 +SDComment: Server side spells implementation need to be checked. SDCategory: Temple of Ahn'Qiraj EndScriptData */ @@ -26,6 +26,14 @@ EndScriptData */ enum { + // emotes + EMOTE_SLOW = -1531041, + EMOTE_FREEZE = -1531042, + EMOTE_FROZEN = -1531043, + EMOTE_CRACK = -1531044, + EMOTE_SHATTER = -1531045, + EMOTE_EXPLODE = -1531046, + // Timer spells SPELL_POISON_SHOCK = 25993, SPELL_POISONBOLT_VOLLEY = 25991, @@ -40,6 +48,7 @@ enum SPELL_REJOIN_VISCIDUS = 25896, SPELL_VISCIDUS_EXPLODE = 25938, SPELL_VISCIDUS_SUICIDE = 26003, // cast when boss explodes and is below 5% Hp - should trigger 26002 + SPELL_DESPAWN_GLOBS = 26608, // SPELL_MEMBRANE_VISCIDUS = 25994, // damage reduction spell - removed from DBC // SPELL_VISCIDUS_WEAKNESS = 25926, // aura which procs at damage - should trigger the slow spells - removed from DBC @@ -50,9 +59,27 @@ enum // SPELL_VISCIDUS_TELEPORT = 25904, // removed from DBC // SPELL_SUMMONT_TRIGGER = 26564, // summons 15992 - removed from DBC - NPC_GLOB_OF_VISCIDUS = 15667 + NPC_GLOB_OF_VISCIDUS = 15667, + // NPC_VISCIDUS_TRIGGER = 15922, // purpose unk + + MAX_VISCIDUS_GLOBS = 20, // there are 20 summoned globs; each glob = 5% hp + + // hitcounts + HITCOUNT_SLOW = 100, + HITCOUNT_SLOW_MORE = 150, + HITCOUNT_FREEZE = 200, + HITCOUNT_CRACK = 50, + HITCOUNT_SHATTER = 100, + HITCOUNT_EXPLODE = 150, + + // phases + PHASE_NORMAL = 1, + PHASE_FROZEN = 2, + PHASE_EXPLODED = 3, }; +static const uint32 auiGlobSummonSpells[MAX_VISCIDUS_GLOBS] = { 25865, 25866, 25867, 25868, 25869, 25870, 25871, 25872, 25873, 25874, 25875, 25876, 25877, 25878, 25879, 25880, 25881, 25882, 25883, 25884 }; + struct boss_viscidusAI : public ScriptedAI { boss_viscidusAI(Creature* pCreature) : ScriptedAI(pCreature) @@ -63,13 +90,28 @@ struct boss_viscidusAI : public ScriptedAI ScriptedInstance* m_pInstance; + uint8 m_uiPhase; + + uint32 m_uiHitCount; + uint32 m_uiExplodeDelayTimer; uint32 m_uiPoisonShockTimer; uint32 m_uiPoisonBoltVolleyTimer; + GuidList m_lGlobesGuidList; + void Reset() override { + m_uiPhase = PHASE_NORMAL; + m_uiHitCount = 0; + + m_uiExplodeDelayTimer = 0; m_uiPoisonShockTimer = urand(7000, 12000); m_uiPoisonBoltVolleyTimer = urand(10000, 15000); + + SetCombatMovement(true); + m_creature->SetVisibility(VISIBILITY_ON); + m_creature->SetStandState(UNIT_STAND_STATE_STAND); + m_creature->SetObjectScale(DEFAULT_OBJECT_SCALE); } void Aggro(Unit* /*pWho*/) override @@ -84,6 +126,8 @@ struct boss_viscidusAI : public ScriptedAI { if (m_pInstance) m_pInstance->SetData(TYPE_VISCIDUS, FAIL); + + DoCastSpellIfCan(m_creature, SPELL_DESPAWN_GLOBS, CAST_TRIGGERED); } void JustDied(Unit* /*pKiller*/) override @@ -92,11 +136,181 @@ struct boss_viscidusAI : public ScriptedAI m_pInstance->SetData(TYPE_VISCIDUS, DONE); } + void JustSummoned(Creature* pSummoned) override + { + if (pSummoned->GetEntry() == NPC_GLOB_OF_VISCIDUS) + { + float fX, fY, fZ; + m_creature->GetRespawnCoord(fX, fY, fZ); + pSummoned->GetMotionMaster()->MovePoint(1, fX, fY, fZ); + m_lGlobesGuidList.push_back(pSummoned->GetObjectGuid()); + } + } + + void SummonedCreatureJustDied(Creature* pSummoned) override + { + if (pSummoned->GetEntry() == NPC_GLOB_OF_VISCIDUS) + { + // shrink - modify scale + m_creature->ApplyPercentModFloatValue(OBJECT_FIELD_SCALE_X, float(-4), true); + m_creature->UpdateModelData(); + m_creature->SetHealth(m_creature->GetHealth() - (m_creature->GetMaxHealth() * 0.05f)); + m_lGlobesGuidList.remove(pSummoned->GetObjectGuid()); + + // suicide if required + if (m_creature->GetHealthPercent() < 5.0f) + { + m_creature->SetVisibility(VISIBILITY_ON); + + if (DoCastSpellIfCan(m_creature, SPELL_VISCIDUS_SUICIDE, CAST_TRIGGERED) == CAST_OK) + m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NONE, NULL, false); + } + else if (m_lGlobesGuidList.empty()) + { + m_creature->SetVisibility(VISIBILITY_ON); + m_creature->SetStandState(UNIT_STAND_STATE_STAND); + m_uiPhase = PHASE_NORMAL; + + SetCombatMovement(true); + DoStartMovement(m_creature->getVictim()); + } + } + } + + void SummonedMovementInform(Creature* pSummoned, uint32 uiType, uint32 uiPointId) override + { + if (pSummoned->GetEntry() != NPC_GLOB_OF_VISCIDUS || uiType != POINT_MOTION_TYPE || !uiPointId) + return; + + m_lGlobesGuidList.remove(pSummoned->GetObjectGuid()); + pSummoned->CastSpell(m_creature, SPELL_REJOIN_VISCIDUS, true); + pSummoned->ForcedDespawn(1000); + + if (m_lGlobesGuidList.empty()) + { + m_creature->SetVisibility(VISIBILITY_ON); + m_creature->SetStandState(UNIT_STAND_STATE_STAND); + m_uiPhase = PHASE_NORMAL; + + SetCombatMovement(true); + DoStartMovement(m_creature->getVictim()); + } + } + + void DamageTaken(Unit* pDealer, uint32& uiDamage) override + { + // apply missing aura: 50% damage reduction; + uiDamage = uiDamage * 0.5f; + + if (m_uiPhase != PHASE_FROZEN) + return; + + ++m_uiHitCount; + + // only count melee attacks + if (pDealer->hasUnitState(UNIT_STAT_MELEE_ATTACKING) && m_uiHitCount >= HITCOUNT_EXPLODE) + { + if (m_creature->GetHealthPercent() <= 5.0f) + { + if (DoCastSpellIfCan(m_creature, SPELL_VISCIDUS_SUICIDE, CAST_TRIGGERED) == CAST_OK) + m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NONE, NULL, false); + } + else if (DoCastSpellIfCan(m_creature, SPELL_VISCIDUS_EXPLODE, CAST_TRIGGERED | CAST_INTERRUPT_PREVIOUS) == CAST_OK) + { + DoScriptText(EMOTE_EXPLODE, m_creature); + m_uiPhase = PHASE_EXPLODED; + m_uiHitCount = 0; + m_lGlobesGuidList.clear(); + uint32 uiGlobeCount = m_creature->GetHealthPercent() / 5.0f; + + for (uint8 i = 0; i < uiGlobeCount; ++i) + DoCastSpellIfCan(m_creature, auiGlobSummonSpells[i], CAST_TRIGGERED); + + m_creature->RemoveAurasDueToSpell(SPELL_VISCIDUS_FREEZE); + m_uiExplodeDelayTimer = 2000; + + SetCombatMovement(false); + m_creature->GetMotionMaster()->MoveIdle(); + m_creature->SetStandState(UNIT_STAND_STATE_DEAD); + } + } + else if (m_uiHitCount == HITCOUNT_SHATTER) + DoScriptText(EMOTE_SHATTER, m_creature); + else if (m_uiHitCount == HITCOUNT_CRACK) + DoScriptText(EMOTE_CRACK, m_creature); + } + + void SpellHit(Unit* /*pCaster*/, const SpellEntry* pSpell) override + { + if (m_uiPhase != PHASE_NORMAL) + return; + + // only count frost damage + if (pSpell->SchoolMask == SPELL_SCHOOL_MASK_FROST) + { + ++m_uiHitCount; + + if (m_uiHitCount >= HITCOUNT_FREEZE) + { + m_uiPhase = PHASE_FROZEN; + m_uiHitCount = 0; + + DoScriptText(EMOTE_FROZEN, m_creature); + m_creature->RemoveAurasDueToSpell(SPELL_VISCIDUS_SLOWED_MORE); + DoCastSpellIfCan(m_creature, SPELL_VISCIDUS_FREEZE, CAST_TRIGGERED); + } + else if (m_uiHitCount >= HITCOUNT_SLOW_MORE) + { + DoScriptText(EMOTE_FREEZE, m_creature); + m_creature->RemoveAurasDueToSpell(SPELL_VISCIDUS_SLOWED); + DoCastSpellIfCan(m_creature, SPELL_VISCIDUS_SLOWED_MORE, CAST_TRIGGERED); + } + else if (m_uiHitCount >= HITCOUNT_SLOW) + { + DoScriptText(EMOTE_SLOW, m_creature); + DoCastSpellIfCan(m_creature, SPELL_VISCIDUS_SLOWED, CAST_TRIGGERED); + } + } + } + + void ReceiveAIEvent(AIEventType eventType, Creature* /*pSender*/, Unit* pInvoker, uint32 uiMiscValue) override + { + if (eventType == AI_EVENT_CUSTOM_A) + { + if (m_uiPhase == PHASE_EXPLODED) + return; + + // reset phase if not already exploded + m_uiPhase = PHASE_NORMAL; + m_uiHitCount = 0; + } + } + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; + if (m_uiExplodeDelayTimer) + { + if (m_uiExplodeDelayTimer <= uiDiff) + { + // Make invisible + m_creature->SetVisibility(VISIBILITY_OFF); + + // Teleport to room center + float fX, fY, fZ, fO; + m_creature->GetRespawnCoord(fX, fY, fZ, &fO); + m_creature->NearTeleportTo(fX, fY, fZ, fO); + m_uiExplodeDelayTimer = 0; + } + else + m_uiExplodeDelayTimer -= uiDiff; + } + + if (m_uiPhase != PHASE_NORMAL) + return; + if (m_uiPoisonShockTimer < uiDiff) { if (DoCastSpellIfCan(m_creature, SPELL_POISON_SHOCK) == CAST_OK) @@ -122,6 +336,34 @@ CreatureAI* GetAI_boss_viscidus(Creature* pCreature) return new boss_viscidusAI(pCreature); } +bool EffectAuraDummy_spell_aura_dummy_viscidus_freeze(const Aura* pAura, bool bApply) +{ + // On Aura removal inform the boss + if (pAura->GetId() == SPELL_VISCIDUS_FREEZE && pAura->GetEffIndex() == EFFECT_INDEX_1 && !bApply) + { + if (Creature* pTarget = (Creature*)pAura->GetTarget()) + pTarget->AI()->SendAIEvent(AI_EVENT_CUSTOM_A, pTarget, pTarget); + } + return true; +} + +// TODO Remove this 'script' when combat can be proper prevented from core-side +struct npc_glob_of_viscidusAI : public ScriptedAI +{ + npc_glob_of_viscidusAI(Creature* pCreature) : ScriptedAI(pCreature) { } + + void Reset() override { } + + void AttackStart(Unit* /*pWho*/) override { } + void MoveInLineOfSight(Unit* /*pWho*/) override { } + void UpdateAI(const uint32 /*uiDiff*/) override { } +}; + +CreatureAI* GetAI_npc_glob_of_viscidus(Creature* pCreature) +{ + return new npc_glob_of_viscidusAI(pCreature); +} + void AddSC_boss_viscidus() { Script* pNewScript; @@ -129,5 +371,11 @@ void AddSC_boss_viscidus() pNewScript = new Script; pNewScript->Name = "boss_viscidus"; pNewScript->GetAI = &GetAI_boss_viscidus; + pNewScript->pEffectAuraDummy = &EffectAuraDummy_spell_aura_dummy_viscidus_freeze; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_glob_of_viscidus"; + pNewScript->GetAI = &GetAI_npc_glob_of_viscidus; pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 35bea6694..519e0ff85 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3050" + #define SD2_REVISION_NR "3051" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 21e3fbba6..5cbab5257 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -1233,7 +1233,7 @@ UPDATE creature_template SET ScriptName='boss_kri' WHERE entry=15511; UPDATE creature_template SET ScriptName='boss_sartura' WHERE entry=15516; UPDATE creature_template SET ScriptName='boss_fankriss' WHERE entry=15510; UPDATE creature_template SET ScriptName='boss_viscidus' WHERE entry=15299; --- UPDATE creature_template SET ScriptName='boss_glob_of_viscidus' WHERE entry=15667; +UPDATE creature_template SET ScriptName='npc_glob_of_viscidus' WHERE entry=15667; UPDATE creature_template SET ScriptName='boss_huhuran' WHERE entry=15509; UPDATE creature_template SET ScriptName='boss_veklor' WHERE entry=15276; UPDATE creature_template SET ScriptName='boss_veknilash' WHERE entry=15275; diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 06fe2b854..4c5fa20d5 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -1851,7 +1851,14 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1531037,'You will betray your friends.',8584,4,0,0,'cthun SAY_WHISPER_5'), (-1531038,'You will die.',8585,4,0,0,'cthun SAY_WHISPER_6'), (-1531039,'You are weak.',8586,4,0,0,'cthun SAY_WHISPER_7'), -(-1531040,'Your heart will explode.',8587,4,0,0,'cthun SAY_WHISPER_8'); +(-1531040,'Your heart will explode.',8587,4,0,0,'cthun SAY_WHISPER_8'), + +(-1531041,'%s begins to slow!',0,2,0,0,'viscidus EMOTE_SLOW'), +(-1531042,'%s is freezing up!',0,2,0,0,'viscidus EMOTE_FREEZE'), +(-1531043,'%s is frozen solid!',0,2,0,0,'viscidus EMOTE_FROZEN'), +(-1531044,'%s begins to crack!',0,2,0,0,'viscidus EMOTE_CRACK'), +(-1531045,'%s looks ready to shatter!',0,2,0,0,'viscidus EMOTE_SHATTER'), +(-1531046,'%s explodes!',0,2,0,0,'viscidus EMOTE_EXPLODE'); -- -1 532 000 KARAZHAN INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES diff --git a/sql/updates/r3051_mangos.sql b/sql/updates/r3051_mangos.sql new file mode 100644 index 000000000..6377e017c --- /dev/null +++ b/sql/updates/r3051_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_glob_of_viscidus' WHERE entry=15667; diff --git a/sql/updates/r3051_scriptdev2.sql b/sql/updates/r3051_scriptdev2.sql new file mode 100644 index 000000000..e2f87fd31 --- /dev/null +++ b/sql/updates/r3051_scriptdev2.sql @@ -0,0 +1,8 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1531046 AND -1531041; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1531041,'%s begins to slow!',0,2,0,0,'viscidus EMOTE_SLOW'), +(-1531042,'%s is freezing up!',0,2,0,0,'viscidus EMOTE_FREEZE'), +(-1531043,'%s is frozen solid!',0,2,0,0,'viscidus EMOTE_FROZEN'), +(-1531044,'%s begins to crack!',0,2,0,0,'viscidus EMOTE_CRACK'), +(-1531045,'%s looks ready to shatter!',0,2,0,0,'viscidus EMOTE_SHATTER'), +(-1531046,'%s explodes!',0,2,0,0,'viscidus EMOTE_EXPLODE'); From 3a6e081a06f576a6fa04fcb78d001ba4f8cc2ef3 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Mon, 29 Sep 2014 00:49:02 +0200 Subject: [PATCH 1063/1172] [3052] Update previous commit with some missing spells --- .../kalimdor/temple_of_ahnqiraj/boss_viscidus.cpp | 15 ++++++++++++++- sd2_revision_nr.h | 2 +- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_viscidus.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_viscidus.cpp index f5b6e1fd8..ed86cfd62 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/boss_viscidus.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_viscidus.cpp @@ -60,7 +60,7 @@ enum // SPELL_SUMMONT_TRIGGER = 26564, // summons 15992 - removed from DBC NPC_GLOB_OF_VISCIDUS = 15667, - // NPC_VISCIDUS_TRIGGER = 15922, // purpose unk + NPC_VISCIDUS_TRIGGER = 15922, // handles aura 26575 MAX_VISCIDUS_GLOBS = 20, // there are 20 summoned globs; each glob = 5% hp @@ -93,6 +93,7 @@ struct boss_viscidusAI : public ScriptedAI uint8 m_uiPhase; uint32 m_uiHitCount; + uint32 m_uiToxinTimer; uint32 m_uiExplodeDelayTimer; uint32 m_uiPoisonShockTimer; uint32 m_uiPoisonBoltVolleyTimer; @@ -105,6 +106,7 @@ struct boss_viscidusAI : public ScriptedAI m_uiHitCount = 0; m_uiExplodeDelayTimer = 0; + m_uiToxinTimer = 30000; m_uiPoisonShockTimer = urand(7000, 12000); m_uiPoisonBoltVolleyTimer = urand(10000, 15000); @@ -145,6 +147,8 @@ struct boss_viscidusAI : public ScriptedAI pSummoned->GetMotionMaster()->MovePoint(1, fX, fY, fZ); m_lGlobesGuidList.push_back(pSummoned->GetObjectGuid()); } + else if (pSummoned->GetEntry() == NPC_VISCIDUS_TRIGGER) + pSummoned->CastSpell(pSummoned, SPELL_TOXIN, true); } void SummonedCreatureJustDied(Creature* pSummoned) override @@ -327,6 +331,15 @@ struct boss_viscidusAI : public ScriptedAI else m_uiPoisonBoltVolleyTimer -= uiDiff; + if (m_uiToxinTimer < uiDiff) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + m_creature->SummonCreature(NPC_VISCIDUS_TRIGGER, pTarget->GetPositionX(), pTarget->GetPositionY(), pTarget->GetPositionZ(), 0, TEMPSUMMON_DEAD_DESPAWN, 0); + m_uiToxinTimer = 30000; + } + else + m_uiToxinTimer -= uiDiff; + DoMeleeAttackIfReady(); } }; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 519e0ff85..9bc842a81 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3051" + #define SD2_REVISION_NR "3052" #endif // __SD2_REVISION_NR_H__ From 7b88cadd092a29ee478a7f043041ecc459d5b314 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sun, 5 Oct 2014 21:53:46 +0200 Subject: [PATCH 1064/1172] [3053] Fix broken script in Netherstorm Thanks to @boxa --- scripts/outland/netherstorm.cpp | 2 +- sd2_revision_nr.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/outland/netherstorm.cpp b/scripts/outland/netherstorm.cpp index d4222a40c..9d5a0ab6d 100644 --- a/scripts/outland/netherstorm.cpp +++ b/scripts/outland/netherstorm.cpp @@ -1561,7 +1561,7 @@ void AddSC_netherstorm() pNewScript = new Script; pNewScript->Name = "npc_commander_dawnforge"; - pNewScript->GetAI = GetAI_npc_commander_dawnforge; + pNewScript->GetAI = &GetAI_npc_commander_dawnforge; pNewScript->RegisterSelf(); pNewScript = new Script; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 9bc842a81..86917f119 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3052" + #define SD2_REVISION_NR "3053" #endif // __SD2_REVISION_NR_H__ From 892fdfea7520eb48e62e3fbc78a0fdd2ee191862 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Tue, 7 Oct 2014 22:17:12 +0200 Subject: [PATCH 1065/1172] [3054] Add script support for quest 10286 Thanks to @grz3s for providing the data --- scripts/outland/hellfire_peninsula.cpp | 130 ++++++++++++++++++++++++- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 + sql/scriptdev2_script_full.sql | 4 +- sql/updates/r3054_mangos.sql | 1 + sql/updates/r3054_scriptdev2.sql | 3 + 6 files changed, 138 insertions(+), 3 deletions(-) create mode 100644 sql/updates/r3054_mangos.sql create mode 100644 sql/updates/r3054_scriptdev2.sql diff --git a/scripts/outland/hellfire_peninsula.cpp b/scripts/outland/hellfire_peninsula.cpp index 8d944df30..f493c93b7 100644 --- a/scripts/outland/hellfire_peninsula.cpp +++ b/scripts/outland/hellfire_peninsula.cpp @@ -17,7 +17,7 @@ /* ScriptData SDName: Hellfire_Peninsula SD%Complete: 100 -SDComment: Quest support: 9375, 9410, 9418, 10629, 10838, 10935. +SDComment: Quest support: 9375, 9410, 9418, 10286, 10629, 10838, 10935. SDCategory: Hellfire Peninsula EndScriptData */ @@ -29,6 +29,7 @@ npc_wounded_blood_elf npc_fel_guard_hound npc_anchorite_barada npc_colonel_jules +npc_magister_aledis EndContentData */ #include "precompiled.h" @@ -873,6 +874,128 @@ bool EffectDummyCreature_npc_colonel_jules(Unit* pCaster, uint32 uiSpellId, Spel return false; } +/*###### +## npc_magister_aledis +######*/ + +enum +{ + SAY_ALEDIS_DEFEAT = -1001172, + + SPELL_PYROBLAST = 33975, + SPELL_FROST_NOVA = 11831, + SPELL_FIREBALL = 20823, +}; + +struct npc_magister_aledisAI : public ScriptedAI +{ + npc_magister_aledisAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_bIsDefeated = false; + Reset(); + } + + uint32 m_uiPyroblastTimer; + uint32 m_uiFrostNovaTimer; + uint32 m_uiFireballTimer; + + bool m_bIsDefeated; + + void Reset() override + { + m_creature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER); + + m_uiPyroblastTimer = urand(10000, 14000); + m_uiFrostNovaTimer = 0; + m_uiFireballTimer = 1000; + } + + void AttackStart(Unit* pWho) override + { + if (m_creature->Attack(pWho, false)) + { + m_creature->AddThreat(pWho); + m_creature->SetInCombatWith(pWho); + pWho->SetInCombatWith(m_creature); + DoStartMovement(pWho, 10.0f); + } + } + + void EnterEvadeMode() override + { + m_creature->RemoveAllAurasOnEvade(); + m_creature->DeleteThreatList(); + m_creature->CombatStop(true); + + if (!m_bIsDefeated) + m_creature->LoadCreatureAddon(true); + + if (m_creature->isAlive()) + { + if (!m_bIsDefeated) + { + m_creature->SetWalk(true); + m_creature->GetMotionMaster()->MoveWaypoint(); + } + else + m_creature->GetMotionMaster()->MoveIdle(); + } + + m_creature->SetLootRecipient(NULL); + + Reset(); + } + + void UpdateAI(const uint32 uiDiff) override + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (!m_bIsDefeated && m_creature->GetHealthPercent() < 25.0f) + { + // evade when defeated; faction is reset automatically + m_bIsDefeated = true; + EnterEvadeMode(); + + m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER); + DoScriptText(SAY_ALEDIS_DEFEAT, m_creature); + m_creature->ForcedDespawn(60000); + return; + } + + if (m_uiPyroblastTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_PYROBLAST) == CAST_OK) + m_uiPyroblastTimer = urand(18000, 21000); + } + else + m_uiPyroblastTimer -= uiDiff; + + if (m_uiFireballTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_FIREBALL) == CAST_OK) + m_uiFireballTimer = urand(3000, 4000); + } + else + m_uiFireballTimer -= uiDiff; + + if (m_uiFrostNovaTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_FROST_NOVA) == CAST_OK) + m_uiFrostNovaTimer = urand(12000, 16000); + } + else + m_uiFrostNovaTimer -= uiDiff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_npc_magister_aledis(Creature* pCreature) +{ + return new npc_magister_aledisAI(pCreature); +} + void AddSC_hellfire_peninsula() { Script* pNewScript; @@ -918,4 +1041,9 @@ void AddSC_hellfire_peninsula() pNewScript->pGossipHello = &GossipHello_npc_colonel_jules; pNewScript->pEffectDummyNPC = &EffectDummyCreature_npc_colonel_jules; pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_magister_aledis"; + pNewScript->GetAI = &GetAI_npc_magister_aledis; + pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 86917f119..eb77d4eee 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3053" + #define SD2_REVISION_NR "3054" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 5cbab5257..ef29aef85 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -678,6 +678,7 @@ UPDATE creature_template SET ScriptName='npc_wounded_blood_elf' WHERE entry=1699 UPDATE creature_template SET ScriptName='npc_fel_guard_hound' WHERE entry=21847; UPDATE creature_template SET ScriptName='npc_anchorite_barada' WHERE entry=22431; UPDATE creature_template SET ScriptName='npc_colonel_jules' WHERE entry=22432; +UPDATE creature_template SET ScriptName='npc_magister_aledis' WHERE entry=20159; /* HILLSBRAD FOOTHILLS */ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 4c5fa20d5..aec067779 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -1271,7 +1271,9 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1001169,'The naga do not respect nature. They twist and corrupt it to meet their needs. They live to agitate the spirits.',0,0,0,0,'wilda SAY_WIL_PROGRESS_5'), (-1001170,'Time only has meaning to mortals, insect. Dimensius is infinite!',0,1,0,0,'dimensius SAY_AGGRO'), -(-1001171,'I hunger! Feed me the power of this forge, my children!',0,1,0,0,'dimensius SAY_SUMMON'); +(-1001171,'I hunger! Feed me the power of this forge, my children!',0,1,0,0,'dimensius SAY_SUMMON'), + +(-1001172,'Spare my life! I will tell you about Arelion\'s secret.',0,0,0,0,'magister_aledis SAY_ALEDIS_DEFEAT'); -- -1 033 000 SHADOWFANG KEEP INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES diff --git a/sql/updates/r3054_mangos.sql b/sql/updates/r3054_mangos.sql new file mode 100644 index 000000000..bb762afe5 --- /dev/null +++ b/sql/updates/r3054_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_magister_aledis' WHERE entry=20159; diff --git a/sql/updates/r3054_scriptdev2.sql b/sql/updates/r3054_scriptdev2.sql new file mode 100644 index 000000000..2f7b0d2e6 --- /dev/null +++ b/sql/updates/r3054_scriptdev2.sql @@ -0,0 +1,3 @@ +DELETE FROM script_texts WHERE entry=-1001172; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1001172,'Spare my life! I will tell you about Arelion\'s secret.',0,0,0,0,'magister_aledis SAY_ALEDIS_DEFEAT'); From 501185d086ee5c1ee32b202e9038967f62ffc4aa Mon Sep 17 00:00:00 2001 From: Peter Camastral Date: Tue, 7 Oct 2014 23:02:15 +0200 Subject: [PATCH 1066/1172] Add enrage to Garr when a Firesworn dies Close scriptdev2/scriptdev2-classic#28 Signed-off-by: Xfurry --- .../molten_core/boss_garr.cpp | 20 +++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/scripts/eastern_kingdoms/molten_core/boss_garr.cpp b/scripts/eastern_kingdoms/molten_core/boss_garr.cpp index 8e77f1c79..0b98d9127 100644 --- a/scripts/eastern_kingdoms/molten_core/boss_garr.cpp +++ b/scripts/eastern_kingdoms/molten_core/boss_garr.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: Boss_Garr -SD%Complete: 50 -SDComment: Garr's enrage is missing +SD%Complete: 80 +SDComment: Firesworn erruption needs to be revisited SDCategory: Molten Core EndScriptData */ @@ -29,13 +29,13 @@ enum // Garr spells SPELL_ANTIMAGICPULSE = 19492, SPELL_MAGMASHACKLES = 19496, - SPELL_ENRAGE = 19516, // TODO Stacking enrage (stacks to 10 times) + SPELL_ENRAGE = 19516, // Add spells SPELL_ERUPTION = 19497, SPELL_MASSIVE_ERUPTION = 20483, // TODO possible on death SPELL_IMMOLATE = 20294, - SPELL_SEPARATION_ANXIETY = 23492, // Used if separated too far from Garr, 21095 use unknown. + SPELL_SEPARATION_ANXIETY = 23492, // Used if separated too far from Garr }; struct boss_garrAI : public ScriptedAI @@ -121,6 +121,15 @@ struct mob_fireswornAI : public ScriptedAI m_uiSeparationCheckTimer = 5000; } + void JustDied(Unit* /*pKiller*/) override + { + if (m_pInstance) + { + if (Creature* pGarr = m_pInstance->GetSingleCreatureFromStorage(NPC_GARR)) + pGarr->CastSpell(pGarr, SPELL_ENRAGE, true, NULL, NULL, m_creature->GetObjectGuid()); + } + } + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) @@ -139,6 +148,9 @@ struct mob_fireswornAI : public ScriptedAI if (m_uiSeparationCheckTimer < uiDiff) { + if (!m_pInstance) + return; + // Distance guesswork, but should be ok Creature* pGarr = m_pInstance->GetSingleCreatureFromStorage(NPC_GARR); if (pGarr && pGarr->isAlive() && !m_creature->IsWithinDist2d(pGarr->GetPositionX(), pGarr->GetPositionY(), 50.0f)) From 4d90d318d35cfc714a048d8f952e9da2fad02477 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Wed, 22 Oct 2014 23:00:35 +0200 Subject: [PATCH 1067/1172] [3055] Implement script support for quest 12027 Part of #27 Thanks to @grz3s for providing the data --- scripts/northrend/grizzly_hills.cpp | 170 +++++++++++++++++++++++++++- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 + sql/scriptdev2_script_full.sql | 45 +++++++- sql/updates/r3055_mangos.sql | 1 + sql/updates/r3055_scriptdev2.sql | 44 +++++++ 6 files changed, 260 insertions(+), 3 deletions(-) create mode 100644 sql/updates/r3055_mangos.sql create mode 100644 sql/updates/r3055_scriptdev2.sql diff --git a/scripts/northrend/grizzly_hills.cpp b/scripts/northrend/grizzly_hills.cpp index 5863735cb..75521a32d 100644 --- a/scripts/northrend/grizzly_hills.cpp +++ b/scripts/northrend/grizzly_hills.cpp @@ -17,7 +17,7 @@ /* ScriptData SDName: Grizzly_Hills SD%Complete: -SDComment: Quest support: 12082, 12138, 12198 +SDComment: Quest support: 12027, 12082, 12138, 12198 SDCategory: Grizzly Hills EndScriptData */ @@ -363,6 +363,168 @@ bool QuestAccept_npc_harrison_jones(Player* pPlayer, Creature* pCreature, const return false; } +/*###### +## npc_emily +######*/ + +enum +{ + SAY_ESCORT_START = -1001173, + SAY_FIRST_WOLF = -1001174, + SAY_FIRST_WOLF_ATTACK = -1001175, + SAY_HELP_FLOPPY_1 = -1001176, + SAY_FIRST_WOLF_DEFEAT = -1001177, + SAY_SECOND_WOLF = -1001178, + SAY_HELP_FLOPPY_2 = -1001179, + SAY_FLOPPY_ALMOST_DEAD = -1001180, + SAY_SECOND_WOLF_DEFEAT = -1001181, + SAY_RESUME_ESCORT = -1001182, + SAY_ESCORT_COMPLETE = -1001183, + + SPELL_FLOPPY_BECOMES_LUNCH = 47184, + + NPC_HUNGRY_WORG = 26586, + NPC_RAVENOUS_WORG = 26590, + NPC_MR_FLOPPY = 26589, + + QUEST_ID_MR_FLOPPY_ADVENTURE = 12027, +}; + +struct npc_emilyAI : public npc_escortAI +{ + npc_emilyAI(Creature* pCreature) : npc_escortAI(pCreature) { Reset(); } + + ObjectGuid m_floppyGuid; + + void Reset() override { } + + void ReceiveAIEvent(AIEventType eventType, Creature* pSender, Unit* pInvoker, uint32 uiMiscValue) override + { + if (eventType == AI_EVENT_START_ESCORT && pInvoker->GetTypeId() == TYPEID_PLAYER) + { + Start(false, (Player*)pInvoker, GetQuestTemplateStore(uiMiscValue)); + + if (Creature* pFloppy = GetClosestCreatureWithEntry(m_creature, NPC_MR_FLOPPY, 10.0f)) + m_floppyGuid = pFloppy->GetObjectGuid(); + } + else if (eventType == AI_EVENT_JUST_DIED && pSender->GetEntry() == NPC_MR_FLOPPY) + { + npc_escortAI::JustDied(m_creature); + m_creature->ForcedDespawn(); + } + else if (eventType == AI_EVENT_CRITICAL_HEALTH && pSender->GetEntry() == NPC_MR_FLOPPY) + DoScriptText(SAY_FLOPPY_ALMOST_DEAD, m_creature); + else if (eventType == AI_EVENT_LOST_SOME_HEALTH && pSender->GetEntry() == NPC_MR_FLOPPY) + DoScriptText(urand(0, 1) ? SAY_HELP_FLOPPY_1 : SAY_HELP_FLOPPY_2, m_creature); + } + + void JustSummoned(Creature* pSummoned) override + { + switch (pSummoned->GetEntry()) + { + case NPC_RAVENOUS_WORG: + case NPC_HUNGRY_WORG: + if (Creature* pFloppy = m_creature->GetMap()->GetCreature(m_floppyGuid)) + { + float fX, fY, fZ; + pFloppy->GetContactPoint(pSummoned, fX, fY, fZ); + pSummoned->SetWalk(false); + pSummoned->GetMotionMaster()->MovePoint(1, fX, fY, fZ); + } + break; + } + } + + void SummonedCreatureJustDied(Creature* pSummoned) override + { + switch (pSummoned->GetEntry()) + { + case NPC_RAVENOUS_WORG: + DoScriptText(SAY_SECOND_WOLF_DEFEAT, m_creature); + SetEscortPaused(false); + // resume follow after vehicle unboard + if (Creature* pFloppy = m_creature->GetMap()->GetCreature(m_floppyGuid)) + pFloppy->GetMotionMaster()->MoveFollow(m_creature, pFloppy->GetDistance(m_creature), M_PI_F - pFloppy->GetAngle(m_creature)); + break; + case NPC_HUNGRY_WORG: + DoScriptText(SAY_FIRST_WOLF_DEFEAT, m_creature); + SetEscortPaused(false); + break; + } + } + + void SummonedMovementInform(Creature* pSummoned, uint32 uiType, uint32 uiPointId) override + { + if (uiType != POINT_MOTION_TYPE || !uiPointId) + return; + + switch (pSummoned->GetEntry()) + { + case NPC_RAVENOUS_WORG: + // board the ravenous worg vehicle + if (Creature* pFloppy = m_creature->GetMap()->GetCreature(m_floppyGuid)) + pFloppy->CastSpell(pSummoned, SPELL_FLOPPY_BECOMES_LUNCH, true); + // no break; + case NPC_HUNGRY_WORG: + if (Creature* pFloppy = m_creature->GetMap()->GetCreature(m_floppyGuid)) + pSummoned->AI()->AttackStart(pFloppy); + break; + } + } + + void WaypointReached(uint32 uiPointId) override + { + switch (uiPointId) + { + case 0: + DoScriptText(SAY_ESCORT_START, m_creature); + break; + case 10: + DoScriptText(SAY_FIRST_WOLF, m_creature); + m_creature->SummonCreature(NPC_HUNGRY_WORG, 4305.514f, -3799.008f, 237.034f, 2.20f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 60000); + break; + case 11: + SetEscortPaused(true); + DoScriptText(SAY_FIRST_WOLF_ATTACK, m_creature); + break; + case 22: + SetEscortPaused(true); + DoScriptText(SAY_SECOND_WOLF, m_creature); + m_creature->SummonCreature(NPC_RAVENOUS_WORG, 4339.643f, -3948.972f, 194.904f, 0.90f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 60000); + break; + case 24: + DoScriptText(SAY_RESUME_ESCORT, m_creature); + SetRun(); + if (Player* pPlayer = GetPlayerForEscort()) + pPlayer->GroupEventHappens(QUEST_ID_MR_FLOPPY_ADVENTURE, m_creature); + break; + case 25: + DoScriptText(SAY_ESCORT_COMPLETE, m_creature); + break; + case 27: + if (Creature* pFloppy = m_creature->GetMap()->GetCreature(m_floppyGuid)) + pFloppy->ForcedDespawn(); + break; + } + } +}; + +CreatureAI* GetAI_npc_emily(Creature* pCreature) +{ + return new npc_emilyAI(pCreature); +} + +bool QuestAccept_npc_emily(Player* pPlayer, Creature* pCreature, const Quest* pQuest) +{ + if (pQuest->GetQuestId() == QUEST_ID_MR_FLOPPY_ADVENTURE) + { + pCreature->AI()->SendAIEvent(AI_EVENT_START_ESCORT, pPlayer, pCreature, pQuest->GetQuestId()); + return true; + } + + return false; +} + void AddSC_grizzly_hills() { Script* pNewScript; @@ -378,4 +540,10 @@ void AddSC_grizzly_hills() pNewScript->GetAI = &GetAI_npc_harrison_jones; pNewScript->pQuestAcceptNPC = &QuestAccept_npc_harrison_jones; pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_emily"; + pNewScript->GetAI = &GetAI_npc_emily; + pNewScript->pQuestAcceptNPC = &QuestAccept_npc_emily; + pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index eb77d4eee..70eeec613 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3054" + #define SD2_REVISION_NR "3055" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index ef29aef85..7c8168335 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -607,6 +607,7 @@ UPDATE instance_template SET ScriptName='instance_gnomeregan' WHERE map=90; /* GRIZZLY HILLS */ UPDATE creature_template SET ScriptName='npc_depleted_war_golem' WHERE entry=27017; UPDATE creature_template SET ScriptName='npc_harrison_jones' WHERE entry=26814; +UPDATE creature_template SET ScriptName='npc_emily' WHERE entry=26588; /* GRUUL'S LAIR */ UPDATE instance_template SET ScriptName='instance_gruuls_lair' WHERE map =565; diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index aec067779..70ad64ec8 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -1273,7 +1273,19 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1001170,'Time only has meaning to mortals, insect. Dimensius is infinite!',0,1,0,0,'dimensius SAY_AGGRO'), (-1001171,'I hunger! Feed me the power of this forge, my children!',0,1,0,0,'dimensius SAY_SUMMON'), -(-1001172,'Spare my life! I will tell you about Arelion\'s secret.',0,0,0,0,'magister_aledis SAY_ALEDIS_DEFEAT'); +(-1001172,'Spare my life! I will tell you about Arelion\'s secret.',0,0,0,0,'magister_aledis SAY_ALEDIS_DEFEAT'), + +(-1001173,'Are you ready, Mr. Floppy? Stay close to me and watch out for those wolves!',0,0,0,0,'emily SAY_ESCORT_START'), +(-1001174,'Um... I think one of those wolves is back...',0,0,0,0,'emily SAY_FIRST_WOLF'), +(-1001175,'He\'s going for Mr. Floppy!',0,0,0,0,'emily SAY_WOLF_ATTACK'), +(-1001176,'There\'s a big meanie attacking Mr. Floppy! Help!',0,0,0,0,'emily SAY_HELP_FLOPPY_1'), +(-1001177,'Let\'s get out of here before more wolves find us!',0,0,0,0,'emily SAY_FIRST_WOLF_DEFEAT'), +(-1001178,'Oh, no! Look, it\'s another wolf, and it\'s a biiiiiiig one!',0,0,0,0,'emily SAY_SECOND_WOLF'), +(-1001179,'He\'s gonna eat Mr. Floppy! You gotta help Mr. Floppy! You just gotta!',0,0,0,0,'emily SAY_HELP_FLOPPY_2'), +(-1001180,'Don\'t go toward the light, Mr. Floppy!',0,0,0,0,'emily SAY_FLOPPY_ALMOST_DEAD'), +(-1001181,'Mr. Floppy, you\'re ok! Thank you so much for saving Mr. Floppy!',0,0,0,0,'emily SAY_SECOND_WOLF_DEFEAT'), +(-1001182,'I think I see the camp! We\'re almost home, Mr. Floppy! Let\'s go!',0,0,0,0,'emily SAY_RESUME_ESCORT'), +(-1001183,'Thank you for helping me to get back to the camp. Go tell Walter that I\'m safe now!',0,0,0,0,'emily SAY_ESCORT_COMPLETE'); -- -1 033 000 SHADOWFANG KEEP INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES @@ -8523,4 +8535,35 @@ INSERT INTO script_waypoint VALUES (9598, 35, 6557.279, -1211.125, 441.452, 0, ''), (9598, 36, 6574.568, -1204.589, 443.216, 0, 'SAY_EXIT_IRONTREE'); +DELETE FROM script_waypoint WHERE entry=26588; +INSERT INTO script_waypoint VALUES +(26588, 0, 4322.890, -3693.610, 263.910, 4000, 'SAY_ESCORT_START'), +(26588, 1, 4330.509, -3689.442, 263.627, 0, ''), +(26588, 2, 4341.477, -3684.207, 257.441, 0, ''), +(26588, 3, 4346.749, -3685.898, 256.866, 0, ''), +(26588, 4, 4347.176, -3694.563, 256.560, 0, ''), +(26588, 5, 4335.924, -3704.452, 258.113, 0, ''), +(26588, 6, 4317.913, -3722.990, 256.835, 0, ''), +(26588, 7, 4309.215, -3736.347, 257.451, 0, ''), +(26588, 8, 4301.650, -3751.553, 257.810, 0, ''), +(26588, 9, 4296.501, -3769.056, 251.977, 0, ''), +(26588, 10, 4291.985, -3785.022, 245.880, 2000, 'SAY_FIRST_WOLF'), +(26588, 11, 4291.985, -3785.022, 245.880, 0, 'SAY_WOLF_ATTACK'), +(26588, 12, 4291.985, -3785.022, 245.880, 3000, ''), +(26588, 13, 4299.542, -3807.021, 237.238, 0, ''), +(26588, 14, 4308.171, -3835.070, 226.317, 0, ''), +(26588, 15, 4312.530, -3847.574, 222.333, 0, ''), +(26588, 16, 4317.506, -3861.733, 214.915, 0, ''), +(26588, 17, 4325.013, -3882.172, 208.888, 0, ''), +(26588, 18, 4332.627, -3893.466, 203.584, 0, ''), +(26588, 19, 4338.521, -3899.447, 199.843, 0, ''), +(26588, 20, 4344.693, -3911.864, 197.886, 0, ''), +(26588, 21, 4349.635, -3922.679, 195.293, 0, ''), +(26588, 22, 4351.970, -3934.677, 191.418, 0, 'SAY_SECOND_WOLF'), +(26588, 23, 4351.970, -3934.677, 191.418, 3000, ''), +(26588, 24, 4351.970, -3934.677, 191.418, 2000, 'SAY_RESUME_ESCORT'), +(26588, 25, 4350.807, -3944.965, 190.528, 0, 'SAY_ESCORT_COMPLETE'), +(26588, 26, 4347.947, -3958.875, 193.360, 0, ''), +(26588, 27, 4345.956, -3988.083, 187.320, 0, ''); + -- EOF diff --git a/sql/updates/r3055_mangos.sql b/sql/updates/r3055_mangos.sql new file mode 100644 index 000000000..48d810ba5 --- /dev/null +++ b/sql/updates/r3055_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_emily' WHERE entry=26588; diff --git a/sql/updates/r3055_scriptdev2.sql b/sql/updates/r3055_scriptdev2.sql new file mode 100644 index 000000000..fc6005b0d --- /dev/null +++ b/sql/updates/r3055_scriptdev2.sql @@ -0,0 +1,44 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1001183 AND -1001173; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1001173,'Are you ready, Mr. Floppy? Stay close to me and watch out for those wolves!',0,0,0,0,'emily SAY_ESCORT_START'), +(-1001174,'Um... I think one of those wolves is back...',0,0,0,0,'emily SAY_FIRST_WOLF'), +(-1001175,'He\'s going for Mr. Floppy!',0,0,0,0,'emily SAY_WOLF_ATTACK'), +(-1001176,'There\'s a big meanie attacking Mr. Floppy! Help!',0,0,0,0,'emily SAY_HELP_FLOPPY_1'), +(-1001177,'Let\'s get out of here before more wolves find us!',0,0,0,0,'emily SAY_FIRST_WOLF_DEFEAT'), +(-1001178,'Oh, no! Look, it\'s another wolf, and it\'s a biiiiiiig one!',0,0,0,0,'emily SAY_SECOND_WOLF'), +(-1001179,'He\'s gonna eat Mr. Floppy! You gotta help Mr. Floppy! You just gotta!',0,0,0,0,'emily SAY_HELP_FLOPPY_2'), +(-1001180,'Don\'t go toward the light, Mr. Floppy!',0,0,0,0,'emily SAY_FLOPPY_ALMOST_DEAD'), +(-1001181,'Mr. Floppy, you\'re ok! Thank you so much for saving Mr. Floppy!',0,0,0,0,'emily SAY_SECOND_WOLF_DEFEAT'), +(-1001182,'I think I see the camp! We\'re almost home, Mr. Floppy! Let\'s go!',0,0,0,0,'emily SAY_RESUME_ESCORT'), +(-1001183,'Thank you for helping me to get back to the camp. Go tell Walter that I\'m safe now!',0,0,0,0,'emily SAY_ESCORT_COMPLETE'); + +DELETE FROM script_waypoint WHERE entry=26588; +INSERT INTO script_waypoint VALUES +(26588, 0, 4322.890, -3693.610, 263.910, 4000, 'SAY_ESCORT_START'), +(26588, 1, 4330.509, -3689.442, 263.627, 0, ''), +(26588, 2, 4341.477, -3684.207, 257.441, 0, ''), +(26588, 3, 4346.749, -3685.898, 256.866, 0, ''), +(26588, 4, 4347.176, -3694.563, 256.560, 0, ''), +(26588, 5, 4335.924, -3704.452, 258.113, 0, ''), +(26588, 6, 4317.913, -3722.990, 256.835, 0, ''), +(26588, 7, 4309.215, -3736.347, 257.451, 0, ''), +(26588, 8, 4301.650, -3751.553, 257.810, 0, ''), +(26588, 9, 4296.501, -3769.056, 251.977, 0, ''), +(26588, 10, 4291.985, -3785.022, 245.880, 2000, 'SAY_FIRST_WOLF'), +(26588, 11, 4291.985, -3785.022, 245.880, 0, 'SAY_WOLF_ATTACK'), +(26588, 12, 4291.985, -3785.022, 245.880, 3000, ''), +(26588, 13, 4299.542, -3807.021, 237.238, 0, ''), +(26588, 14, 4308.171, -3835.070, 226.317, 0, ''), +(26588, 15, 4312.530, -3847.574, 222.333, 0, ''), +(26588, 16, 4317.506, -3861.733, 214.915, 0, ''), +(26588, 17, 4325.013, -3882.172, 208.888, 0, ''), +(26588, 18, 4332.627, -3893.466, 203.584, 0, ''), +(26588, 19, 4338.521, -3899.447, 199.843, 0, ''), +(26588, 20, 4344.693, -3911.864, 197.886, 0, ''), +(26588, 21, 4349.635, -3922.679, 195.293, 0, ''), +(26588, 22, 4351.970, -3934.677, 191.418, 0, 'SAY_SECOND_WOLF'), +(26588, 23, 4351.970, -3934.677, 191.418, 3000, ''), +(26588, 24, 4351.970, -3934.677, 191.418, 2000, 'SAY_RESUME_ESCORT'), +(26588, 25, 4350.807, -3944.965, 190.528, 0, 'SAY_ESCORT_COMPLETE'), +(26588, 26, 4347.947, -3958.875, 193.360, 0, ''), +(26588, 27, 4345.956, -3988.083, 187.320, 0, ''); From 72eae8bebe5f74485983e9988615def6f2c0cf0d Mon Sep 17 00:00:00 2001 From: Xfurry Date: Thu, 23 Oct 2014 20:27:07 +0200 Subject: [PATCH 1068/1172] [3056] Allow Ghost Saber chanced spawn See http://www.wowwiki.com/Cat_Figurine for details Thanks to @X-Savior for providing the data --- scripts/world/go_scripts.cpp | 27 +++++++++++++++++++++++++++ sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 + sql/updates/r3056_mangos.sql | 1 + 4 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 sql/updates/r3056_mangos.sql diff --git a/scripts/world/go_scripts.cpp b/scripts/world/go_scripts.cpp index 5fb8706d9..749f230da 100644 --- a/scripts/world/go_scripts.cpp +++ b/scripts/world/go_scripts.cpp @@ -31,6 +31,7 @@ go_tele_to_violet_stand go_andorhal_tower go_scourge_enclosure go_lab_work_reagents +go_cat_figurine EndContentData */ #include "precompiled.h" @@ -315,6 +316,27 @@ bool GOUse_go_lab_work_reagents(Player* pPlayer, GameObject* pGo) return false; } +/*###### +## go_cat_figurine +######*/ + +enum +{ + SPELL_SUMMON_GHOST_SABER = 5968, +}; + +bool GOUse_go_cat_figurine(Player* pPlayer, GameObject* pGo) +{ + if (roll_chance_i(5)) + { + pPlayer->CastSpell(pPlayer, SPELL_SUMMON_GHOST_SABER, true, NULL, NULL, pGo->GetObjectGuid()); + pGo->SetLootState(GO_JUST_DEACTIVATED); + return true; + } + + return false; +} + void AddSC_go_scripts() { Script* pNewScript; @@ -368,4 +390,9 @@ void AddSC_go_scripts() pNewScript->Name = "go_lab_work_reagents"; pNewScript->pGOUse = &GOUse_go_lab_work_reagents; pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "go_cat_figurine"; + pNewScript->pGOUse = &GOUse_go_cat_figurine; + pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 70eeec613..68bd3b8df 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3055" + #define SD2_REVISION_NR "3056" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 7c8168335..7b9c30f0c 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -119,6 +119,7 @@ UPDATE gameobject_template SET ScriptName='go_andorhal_tower' WHERE entry IN (17 UPDATE gameobject_template SET ScriptName='go_scourge_enclosure' WHERE entry=191548; UPDATE gameobject_template SET ScriptName='go_veil_skith_cage' WHERE entry IN (185202,185203,185204,185205); UPDATE gameobject_template SET ScriptName='go_lab_work_reagents' WHERE entry IN (190462, 190473, 190478, 190459); +UPDATE gameobject_template SET ScriptName='go_cat_figurine' WHERE entry=13359; /* GUARD */ UPDATE creature_template SET ScriptName='guard_azuremyst' WHERE entry=18038; diff --git a/sql/updates/r3056_mangos.sql b/sql/updates/r3056_mangos.sql new file mode 100644 index 000000000..6fa6ebd04 --- /dev/null +++ b/sql/updates/r3056_mangos.sql @@ -0,0 +1 @@ +UPDATE gameobject_template SET ScriptName='go_cat_figurine' WHERE entry=13359; From faddf521b1d69daa7941cc4f3f04e17ec0ef3d33 Mon Sep 17 00:00:00 2001 From: Ulduar Date: Thu, 23 Oct 2014 23:25:04 +0200 Subject: [PATCH 1069/1172] [3057] Fix some Ulduar issues and implement achievements 2996 and 2997 Signed-off-by: Xfurry --- scripts/northrend/ulduar/ulduar/boss_algalon.cpp | 14 +++++++++++++- .../northrend/ulduar/ulduar/boss_general_vezax.cpp | 11 +++++++++++ scripts/northrend/ulduar/ulduar/boss_hodir.cpp | 9 +++++++++ scripts/northrend/ulduar/ulduar/boss_thorim.cpp | 9 +++++++++ .../northrend/ulduar/ulduar/instance_ulduar.cpp | 5 +++++ scripts/northrend/ulduar/ulduar/ulduar.h | 5 ++++- sd2_revision_nr.h | 2 +- 7 files changed, 52 insertions(+), 3 deletions(-) diff --git a/scripts/northrend/ulduar/ulduar/boss_algalon.cpp b/scripts/northrend/ulduar/ulduar/boss_algalon.cpp index 7d40b9ec2..94d5a963f 100644 --- a/scripts/northrend/ulduar/ulduar/boss_algalon.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_algalon.cpp @@ -259,6 +259,15 @@ struct boss_algalonAI : public ScriptedAI, private DialogueHelper StartNextDialogueText(SAY_AGGRO); } + void AttackStart(Unit* pWho) override + { + // don't attack again after being defeated + if (m_bEventFinished) + return; + + ScriptedAI::AttackStart(pWho); + } + void DamageTaken(Unit* /*pDoneBy*/, uint32& uiDamage) override { if (uiDamage >= m_creature->GetHealth()) @@ -455,7 +464,7 @@ struct boss_algalonAI : public ScriptedAI, private DialogueHelper if (Creature* pConstellation = m_creature->GetMap()->GetCreature(*iter)) { // follow second top aggro player - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1, uint32(0), SELECT_FLAG_PLAYER)) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0, uint32(0), SELECT_FLAG_PLAYER)) { pConstellation->GetMotionMaster()->MoveFollow(pTarget, CONTACT_DISTANCE, 0); SendAIEvent(AI_EVENT_CUSTOM_A, m_creature, pConstellation); @@ -507,7 +516,10 @@ struct boss_algalonAI : public ScriptedAI, private DialogueHelper if (m_uiBigBangTimer < uiDiff) { if (DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_BIG_BANG : SPELL_BIG_BANG_H) == CAST_OK) + { + DoScriptText(urand(0, 1) ? SAY_BIG_BANG_1 : SAY_BIG_BANG_2, m_creature); m_uiBigBangTimer = 90000; + } } else m_uiBigBangTimer -= uiDiff; diff --git a/scripts/northrend/ulduar/ulduar/boss_general_vezax.cpp b/scripts/northrend/ulduar/ulduar/boss_general_vezax.cpp index 154dbe725..8a58d231f 100644 --- a/scripts/northrend/ulduar/ulduar/boss_general_vezax.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_general_vezax.cpp @@ -40,6 +40,7 @@ enum SPELL_AURA_OF_DESPAIR = 62692, SPELL_SHADOW_CRASH = 62660, + SPELL_SHADOW_CRASH_DAMAGE = 62659, SPELL_MARK_OF_FACELESS = 63276, // triggers 63278 SPELL_SEARING_FLAMES = 62661, SPELL_SURGE_OF_DARKNESS = 62662, @@ -183,6 +184,16 @@ struct boss_general_vezaxAI : public ScriptedAI } } + void SpellHitTarget(Unit* pTarget, const SpellEntry* pSpell) override + { + if (pTarget->GetTypeId() != TYPEID_PLAYER || !m_pInstance) + return; + + // Check achiev criterias + if (pSpell->Id == SPELL_SHADOW_CRASH_DAMAGE) + m_pInstance->SetSpecialAchievementCriteria(TYPE_ACHIEV_SHADOWDODGER, false); + } + // Merge vapors void DoPrepareAnimusIfCan() { diff --git a/scripts/northrend/ulduar/ulduar/boss_hodir.cpp b/scripts/northrend/ulduar/ulduar/boss_hodir.cpp index 9d3b5d984..989ae3283 100644 --- a/scripts/northrend/ulduar/ulduar/boss_hodir.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_hodir.cpp @@ -139,6 +139,15 @@ struct boss_hodirAI : public ScriptedAI DoCastSpellIfCan(m_creature, SPELL_SHATTER_CHEST, CAST_TRIGGERED | CAST_AURA_NOT_PRESENT); } + void AttackStart(Unit* pWho) override + { + // don't attack again after being defeated + if (m_bEventFinished) + return; + + ScriptedAI::AttackStart(pWho); + } + void JustReachedHome() override { if (m_pInstance) diff --git a/scripts/northrend/ulduar/ulduar/boss_thorim.cpp b/scripts/northrend/ulduar/ulduar/boss_thorim.cpp index f22a609e5..b4e082001 100644 --- a/scripts/northrend/ulduar/ulduar/boss_thorim.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_thorim.cpp @@ -287,6 +287,15 @@ struct boss_thorimAI : public ScriptedAI, private DialogueHelper StartNextDialogueText(SAY_AGGRO_1); } + void AttackStart(Unit* pWho) override + { + // don't attack again after being defeated + if (m_bEventFinished) + return; + + ScriptedAI::AttackStart(pWho); + } + void MoveInLineOfSight(Unit* pWho) override { // spawn the arena npcs only when players are close to Thorim in order to avoid the possible bugs diff --git a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp index 6b2d5e864..cd050576c 100644 --- a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp +++ b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp @@ -769,6 +769,8 @@ void instance_ulduar::SetData(uint32 uiType, uint32 uiData) m_auiEncounter[uiType] = uiData; if (uiData == DONE) DoUseDoorOrButton(GO_VEZAX_GATE); + else if (uiData == IN_PROGRESS) + SetSpecialAchievementCriteria(TYPE_ACHIEV_SHADOWDODGER, true); break; case TYPE_YOGGSARON: // Don't set the same encounter data twice @@ -1276,6 +1278,9 @@ bool instance_ulduar::CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player c case ACHIEV_CRIT_SARONITE_N: case ACHIEV_CRIT_SARONITE_H: return GetData(TYPE_VEZAX_HARD) == DONE; + case ACHIEV_CRIT_SHADOWDODGER_N: + case ACHIEV_CRIT_SHADOWDODGER_H: + return m_abAchievCriteria[TYPE_ACHIEV_SHADOWDODGER]; case ACHIEV_CRIT_CAT_LADY_N: case ACHIEV_CRIT_CAT_LADY_H: return m_abAchievCriteria[TYPE_ACHIEV_CAT_LADY]; diff --git a/scripts/northrend/ulduar/ulduar/ulduar.h b/scripts/northrend/ulduar/ulduar/ulduar.h index 4a58fd5b3..2c6a70893 100644 --- a/scripts/northrend/ulduar/ulduar/ulduar.h +++ b/scripts/northrend/ulduar/ulduar/ulduar.h @@ -202,7 +202,7 @@ enum NPC_KEEPER_MIMIRON = 33244, NPC_KEEPER_THORIM = 33242, - MAX_SPECIAL_ACHIEV_CRITS = 19, + MAX_SPECIAL_ACHIEV_CRITS = 20, TYPE_ACHIEV_CAT_LADY = 0, TYPE_ACHIEV_NINE_LIVES = 1, @@ -223,6 +223,7 @@ enum TYPE_ACHIEV_LIGHTNING = 16, TYPE_ACHIEV_BACK_NATURE = 17, TYPE_ACHIEV_DRIVE_CRAZY = 18, + TYPE_ACHIEV_SHADOWDODGER = 19, // Loot chests // Kologarn @@ -352,6 +353,8 @@ enum ACHIEV_CRIT_SARONITE_N = 10451, // General Vezax, achievs 3181, 3188 ACHIEV_CRIT_SARONITE_H = 10462, + ACHIEV_CRIT_SHADOWDODGER_N = 10173, // General Vezax, achievs 2996, 2997 + ACHIEV_CRIT_SHADOWDODGER_H = 10306, ACHIEV_CRIT_CAT_LADY_N = 10400, // Auriaya, achievs 3006, 3007 ACHIEV_CRIT_CAT_LADY_H = 10184, ACHIEV_CRIT_NINE_LIVES_N = 10399, // Auriaya, achievs 3076, 3077 diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 68bd3b8df..62d585da4 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3056" + #define SD2_REVISION_NR "3057" #endif // __SD2_REVISION_NR_H__ From 3af67a7b3b60dbc0d6be85aa195cc50201b41fc0 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Fri, 24 Oct 2014 00:06:13 +0200 Subject: [PATCH 1070/1172] [3058] Revert [3056]. It can be handled by DB Thanks to @Neatelves --- scripts/world/go_scripts.cpp | 27 --------------------------- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 - sql/updates/r3056_mangos.sql | 1 - 4 files changed, 1 insertion(+), 30 deletions(-) delete mode 100644 sql/updates/r3056_mangos.sql diff --git a/scripts/world/go_scripts.cpp b/scripts/world/go_scripts.cpp index 749f230da..5fb8706d9 100644 --- a/scripts/world/go_scripts.cpp +++ b/scripts/world/go_scripts.cpp @@ -31,7 +31,6 @@ go_tele_to_violet_stand go_andorhal_tower go_scourge_enclosure go_lab_work_reagents -go_cat_figurine EndContentData */ #include "precompiled.h" @@ -316,27 +315,6 @@ bool GOUse_go_lab_work_reagents(Player* pPlayer, GameObject* pGo) return false; } -/*###### -## go_cat_figurine -######*/ - -enum -{ - SPELL_SUMMON_GHOST_SABER = 5968, -}; - -bool GOUse_go_cat_figurine(Player* pPlayer, GameObject* pGo) -{ - if (roll_chance_i(5)) - { - pPlayer->CastSpell(pPlayer, SPELL_SUMMON_GHOST_SABER, true, NULL, NULL, pGo->GetObjectGuid()); - pGo->SetLootState(GO_JUST_DEACTIVATED); - return true; - } - - return false; -} - void AddSC_go_scripts() { Script* pNewScript; @@ -390,9 +368,4 @@ void AddSC_go_scripts() pNewScript->Name = "go_lab_work_reagents"; pNewScript->pGOUse = &GOUse_go_lab_work_reagents; pNewScript->RegisterSelf(); - - pNewScript = new Script; - pNewScript->Name = "go_cat_figurine"; - pNewScript->pGOUse = &GOUse_go_cat_figurine; - pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 62d585da4..c5fd7d755 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3057" + #define SD2_REVISION_NR "3058" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 7b9c30f0c..7c8168335 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -119,7 +119,6 @@ UPDATE gameobject_template SET ScriptName='go_andorhal_tower' WHERE entry IN (17 UPDATE gameobject_template SET ScriptName='go_scourge_enclosure' WHERE entry=191548; UPDATE gameobject_template SET ScriptName='go_veil_skith_cage' WHERE entry IN (185202,185203,185204,185205); UPDATE gameobject_template SET ScriptName='go_lab_work_reagents' WHERE entry IN (190462, 190473, 190478, 190459); -UPDATE gameobject_template SET ScriptName='go_cat_figurine' WHERE entry=13359; /* GUARD */ UPDATE creature_template SET ScriptName='guard_azuremyst' WHERE entry=18038; diff --git a/sql/updates/r3056_mangos.sql b/sql/updates/r3056_mangos.sql deleted file mode 100644 index 6fa6ebd04..000000000 --- a/sql/updates/r3056_mangos.sql +++ /dev/null @@ -1 +0,0 @@ -UPDATE gameobject_template SET ScriptName='go_cat_figurine' WHERE entry=13359; From 04516fa345e5f1bea7f2b5936d4dc8289f61950a Mon Sep 17 00:00:00 2001 From: Xfurry Date: Fri, 24 Oct 2014 23:33:16 +0200 Subject: [PATCH 1071/1172] [3059] Update script for General Vezax Thanks to @Ulduar for pointing the issues --- .../ulduar/ulduar/boss_general_vezax.cpp | 212 +++++++++++++----- .../ulduar/ulduar/instance_ulduar.cpp | 19 +- scripts/northrend/ulduar/ulduar/ulduar.h | 4 + sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 + sql/updates/r3059_mangos.sql | 1 + 6 files changed, 177 insertions(+), 62 deletions(-) create mode 100644 sql/updates/r3059_mangos.sql diff --git a/scripts/northrend/ulduar/ulduar/boss_general_vezax.cpp b/scripts/northrend/ulduar/ulduar/boss_general_vezax.cpp index 8a58d231f..6ce3e2a3e 100644 --- a/scripts/northrend/ulduar/ulduar/boss_general_vezax.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_general_vezax.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: boss_general_vezax -SD%Complete: 90% -SDComment: Some details may need some small adjustments +SD%Complete: 100% +SDComment: SDCategory: Ulduar EndScriptData */ @@ -38,20 +38,25 @@ enum EMOTE_SURGE = -1603104, EMOTE_ANIMUS = -1603105, + // normal spells SPELL_AURA_OF_DESPAIR = 62692, SPELL_SHADOW_CRASH = 62660, - SPELL_SHADOW_CRASH_DAMAGE = 62659, + SPELL_SHADOW_CRASH_DAMAGE = 62659, // used for achiev check SPELL_MARK_OF_FACELESS = 63276, // triggers 63278 SPELL_SEARING_FLAMES = 62661, SPELL_SURGE_OF_DARKNESS = 62662, + SPELL_SUMMON_VAPORS = 63081, // cast by Vezax bunny SPELL_BERSERK = 26662, + + // hard mode spells SPELL_SARONITE_BARRIER = 63364, // also sends event 9735 SPELL_SUMMON_ANIMUS = 63145, // the animus should spam 63420 on target - to be done in acid - SPELL_SUMMON_VAPORS = 63081, - SPELL_ANIMUS_FORMATION = 63319, // visual aura on the vapors + SPELL_ANIMUS_FORMATION = 63319, // visual aura on Saronite summoner bunny + + // other spells SPELL_SARONITE_VAPORS = 63323, // cast by vapor on death SPELL_CORRUPTED_RAGE = 68415, // Unused - SPELL_CORRUPTED_WISDOM = 64646, + SPELL_CORRUPTED_WISDOM = 64646, // Unused MAX_HARD_MODE_VAPORS = 6, @@ -67,10 +72,12 @@ struct boss_general_vezaxAI : public ScriptedAI boss_general_vezaxAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (instance_ulduar*)pCreature->GetInstanceData(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); Reset(); } instance_ulduar* m_pInstance; + bool m_bIsRegularMode; uint32 m_uiEnrageTimer; uint32 m_uiCrashTimer; @@ -78,7 +85,8 @@ struct boss_general_vezaxAI : public ScriptedAI uint32 m_uiFlamesTimer; uint32 m_uiSurgeTimer; uint32 m_uiSaroniteVaporTimer; - uint32 m_uiSaroniteBarrierTimer; + uint32 m_uiHardModeTimer; + uint8 m_uiHardModeStage; uint8 m_uiVaporsGathered; @@ -92,8 +100,11 @@ struct boss_general_vezaxAI : public ScriptedAI m_uiSurgeTimer = 60000; m_uiMarkTimer = 20000; m_uiCrashTimer = 15000; - m_uiSaroniteBarrierTimer = 0; + m_uiHardModeTimer = 0; + m_uiHardModeStage = 0; m_uiVaporsGathered = 0; + + m_lVaporsGuids.clear(); } void Aggro(Unit* /*pWho*/) override @@ -142,46 +153,42 @@ struct boss_general_vezaxAI : public ScriptedAI pSummoned->SetInCombatWithZone(); } - void SummonedCreatureJustDied(Creature* pSummoned) override - { - // decrease the number of vapors when they die - if (pSummoned->GetEntry() == NPC_SARONITE_VAPOR) - { - pSummoned->CastSpell(pSummoned, SPELL_SARONITE_VAPORS, true); - m_lVaporsGuids.remove(pSummoned->GetObjectGuid()); - } - // remove saronite barrier when animus dies - else if (pSummoned->GetEntry() == NPC_SARONITE_ANIMUS) - { - m_creature->RemoveAurasDueToSpell(SPELL_SARONITE_BARRIER); - - if (m_creature->isAlive() && m_pInstance) - m_pInstance->SetData(TYPE_VEZAX_HARD, DONE); - } - } - - void SummonedMovementInform(Creature* pSummoned, uint32 uiMoveType, uint32 uiPointId) override + void ReceiveAIEvent(AIEventType eventType, Creature* pSender, Unit* /*pInvoker*/, uint32 /*uiMiscValue*/) override { - if (uiMoveType != POINT_MOTION_TYPE || uiPointId != 0 || pSummoned->GetEntry() != NPC_SARONITE_VAPOR) - return; - - ++m_uiVaporsGathered; - - // Cast the saronite formation aura when all vapors arive - if (m_uiVaporsGathered == MAX_HARD_MODE_VAPORS) + if (pSender->GetEntry() == NPC_SARONITE_VAPOR) { - pSummoned->CastSpell(pSummoned, SPELL_ANIMUS_FORMATION, true); - - // Despawn the vapors - for (GuidList::const_iterator itr = m_lVaporsGuids.begin(); itr != m_lVaporsGuids.end(); ++itr) + // decrease the number of vapors when they die + if (eventType == AI_EVENT_CUSTOM_A) + m_lVaporsGuids.remove(pSender->GetObjectGuid()); + else if (eventType == AI_EVENT_CUSTOM_B) { - if (Creature* pVapor = m_creature->GetMap()->GetCreature(*itr)) - pVapor->ForcedDespawn(4000); - } + ++m_uiVaporsGathered; - DoScriptText(EMOTE_ANIMUS, m_creature); - m_uiSaroniteBarrierTimer = 4000; + // Cast the saronite formation aura when all vapors arive + if (m_uiVaporsGathered == MAX_HARD_MODE_VAPORS) + { + // visual on the summoning bunny + if (m_pInstance) + { + if (Creature* pBunny = m_creature->GetMap()->GetCreature(m_pInstance->GetVezaxBunnyGuid(true))) + pBunny->CastSpell(pBunny, SPELL_ANIMUS_FORMATION, true); + } + + // Despawn the vapors + for (GuidList::const_iterator itr = m_lVaporsGuids.begin(); itr != m_lVaporsGuids.end(); ++itr) + { + if (Creature* pVapor = m_creature->GetMap()->GetCreature(*itr)) + pVapor->ForcedDespawn(); + } + + DoScriptText(EMOTE_ANIMUS, m_creature); + m_uiHardModeTimer = 4000; + } + } } + // remove saronite barrier when animus dies + else if (pSender->GetEntry() == NPC_SARONITE_ANIMUS && eventType == AI_EVENT_CUSTOM_C) + m_creature->RemoveAurasDueToSpell(SPELL_SARONITE_BARRIER); } void SpellHitTarget(Unit* pTarget, const SpellEntry* pSpell) override @@ -197,12 +204,21 @@ struct boss_general_vezaxAI : public ScriptedAI // Merge vapors void DoPrepareAnimusIfCan() { - // Gather the vapors to the boss - NOTE: not sure if position is ok + if (!m_pInstance) + return; + + Creature* pBunny = m_creature->GetMap()->GetCreature(m_pInstance->GetVezaxBunnyGuid(true)); + if (!pBunny) + return; + + // Gather the vapors to the spawn point for (GuidList::const_iterator itr = m_lVaporsGuids.begin(); itr != m_lVaporsGuids.end(); ++itr) { - // Better place: near him or some fixed position? if (Creature* pVapor = m_creature->GetMap()->GetCreature(*itr)) - pVapor->GetMotionMaster()->MovePoint(0, m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ()); + { + pVapor->SetWalk(false); + pVapor->GetMotionMaster()->MovePoint(1, pBunny->GetPositionX(), pBunny->GetPositionY(), pBunny->GetPositionZ()); + } } } @@ -211,15 +227,39 @@ struct boss_general_vezaxAI : public ScriptedAI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - if (m_uiSaroniteBarrierTimer) + if (m_uiHardModeTimer) { - if (m_uiSaroniteBarrierTimer <= uiDiff) + if (m_uiHardModeTimer <= uiDiff) { - if (DoCastSpellIfCan(m_creature, SPELL_SARONITE_BARRIER) == CAST_OK) - m_uiSaroniteBarrierTimer = 0; + switch (m_uiHardModeStage) + { + case 0: + { + if (DoCastSpellIfCan(m_creature, SPELL_SARONITE_BARRIER, CAST_TRIGGERED | CAST_INTERRUPT_PREVIOUS) == CAST_OK) + { + DoScriptText(SAY_HARD_MODE, m_creature); + m_uiHardModeTimer = 2000; + } + break; + } + case 1: + { + if (m_pInstance) + { + if (Creature* pBunny = m_creature->GetMap()->GetCreature(m_pInstance->GetVezaxBunnyGuid(true))) + { + pBunny->RemoveAurasDueToSpell(SPELL_ANIMUS_FORMATION); + pBunny->CastSpell(pBunny, SPELL_SUMMON_ANIMUS, true, NULL, NULL, m_creature->GetObjectGuid()); + } + } + m_uiHardModeTimer = 0; + break; + } + } + ++m_uiHardModeStage; } else - m_uiSaroniteBarrierTimer -= uiDiff; + m_uiHardModeTimer -= uiDiff; } // summon saronite vapors before the hard mode @@ -227,10 +267,16 @@ struct boss_general_vezaxAI : public ScriptedAI { if (m_uiSaroniteVaporTimer < uiDiff) { - if (DoCastSpellIfCan(m_creature, SPELL_SUMMON_VAPORS) == CAST_OK) + // get a bunny that will summon the vapors + if (m_pInstance) { - DoScriptText(EMOTE_VAPOR, m_creature); - m_uiSaroniteVaporTimer = 30000; + if (Creature* pBunny = m_creature->GetMap()->GetCreature(m_pInstance->GetVezaxBunnyGuid(false))) + { + pBunny->CastSpell(pBunny, SPELL_SUMMON_VAPORS, true, NULL, NULL, m_creature->GetObjectGuid()); + DoScriptText(EMOTE_VAPOR, m_creature); + + m_uiSaroniteVaporTimer = 30000; + } } } else @@ -238,7 +284,7 @@ struct boss_general_vezaxAI : public ScriptedAI } // Searing flames only while animus is not around - if (m_pInstance && m_pInstance->GetData(TYPE_VEZAX_HARD) != IN_PROGRESS) + if (m_pInstance && (m_pInstance->GetData(TYPE_VEZAX_HARD) != IN_PROGRESS || !m_bIsRegularMode)) { if (m_uiFlamesTimer < uiDiff) { @@ -303,6 +349,53 @@ CreatureAI* GetAI_boss_general_vezax(Creature* pCreature) return new boss_general_vezaxAI(pCreature); } +/*###### +## npc_saronite_vapor +######*/ + +struct npc_saronite_vaporAI : public Scripted_NoMovementAI +{ + npc_saronite_vaporAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) + { + m_pInstance = (instance_ulduar*)pCreature->GetInstanceData(); + Reset(); + } + + instance_ulduar* m_pInstance; + + void Reset() override { } + + void JustDied(Unit* /*pKiller*/) override + { + // inform Vezax of death + if (m_pInstance) + { + if (Creature* pVezax = m_pInstance->GetSingleCreatureFromStorage(NPC_VEZAX)) + SendAIEvent(AI_EVENT_CUSTOM_A, m_creature, pVezax); + } + + DoCastSpellIfCan(m_creature, SPELL_SARONITE_VAPORS, CAST_TRIGGERED); + } + + void MovementInform(uint32 uiType, uint32 uiPointId) override + { + if (uiType != POINT_MOTION_TYPE || !uiPointId || !m_pInstance) + return; + + // inform vezax of point reached + if (Creature* pVezax = m_pInstance->GetSingleCreatureFromStorage(NPC_VEZAX)) + SendAIEvent(AI_EVENT_CUSTOM_B, m_creature, pVezax); + } + + void AttackStart(Unit* /*pWho*/) override { } + void MoveInLineOfSight(Unit* /*pWho*/) override { } +}; + +CreatureAI* GetAI_npc_saronite_vapor(Creature* pCreature) +{ + return new npc_saronite_vaporAI(pCreature); +} + bool ProcessEventId_event_spell_saronite_barrier(uint32 /*uiEventId*/, Object* pSource, Object* /*pTarget*/, bool /*bIsStart*/) { if (pSource->GetTypeId() == TYPEID_UNIT && ((Creature*)pSource)->GetEntry() == NPC_VEZAX) @@ -311,10 +404,6 @@ bool ProcessEventId_event_spell_saronite_barrier(uint32 /*uiEventId*/, Object* p { // Start hard mode for Vezax and summon the Animus pInstance->SetData(TYPE_VEZAX_HARD, IN_PROGRESS); - - ((Creature*)pSource)->CastSpell((Creature*)pSource, SPELL_SUMMON_ANIMUS, true); - DoScriptText(SAY_HARD_MODE, (Creature*)pSource); - return true; } } @@ -330,6 +419,11 @@ void AddSC_boss_general_vezax() pNewScript->GetAI = &GetAI_boss_general_vezax; pNewScript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "npc_saronite_vapor"; + pNewScript->GetAI = &GetAI_npc_saronite_vapor; + pNewScript->RegisterSelf(); + pNewScript = new Script; pNewScript->Name = "event_spell_saronite_barrier"; pNewScript->pProcessEventId = &ProcessEventId_event_spell_saronite_barrier; diff --git a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp index cd050576c..d27ab3d33 100644 --- a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp +++ b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp @@ -281,6 +281,12 @@ void instance_ulduar::OnCreatureCreate(Creature* pCreature) case NPC_OMINOUS_CLOUD: m_lOminousCloudsGuids.push_back(pCreature->GetObjectGuid()); return; + case NPC_VEZAX_BUNNY: + if (pCreature->GetPositionY() < 100.0f) + m_animusVezaxBunnyGuid = pCreature->GetObjectGuid(); + else + m_vaporVezaxBunnyGuid = pCreature->GetObjectGuid(); + return; default: return; @@ -386,8 +392,7 @@ void instance_ulduar::OnObjectCreate(GameObject* pGo) pGo->SetGoState(GO_STATE_ACTIVE); break; case GO_VEZAX_GATE: - pGo->SetGoState(GO_STATE_READY); - if (m_auiEncounter[TYPE_VEZAX]) + if (m_auiEncounter[TYPE_VEZAX] == DONE) pGo->SetGoState(GO_STATE_ACTIVE); break; case GO_YOGG_GATE: @@ -1235,6 +1240,16 @@ void instance_ulduar::OnCreatureDeath(Creature* pCreature) case NPC_RUNE_GIANT: DoUseDoorOrButton(GO_THORIM_STONE_DOOR); break; + case NPC_SARONITE_ANIMUS: + if (Creature* pVezax = GetSingleCreatureFromStorage(NPC_VEZAX)) + { + if (pVezax->isAlive()) + { + pCreature->AI()->SendAIEvent(AI_EVENT_CUSTOM_C, pCreature, pVezax); + SetData(TYPE_VEZAX_HARD, DONE); + } + } + break; } } diff --git a/scripts/northrend/ulduar/ulduar/ulduar.h b/scripts/northrend/ulduar/ulduar/ulduar.h index 2c6a70893..876d255b5 100644 --- a/scripts/northrend/ulduar/ulduar/ulduar.h +++ b/scripts/northrend/ulduar/ulduar/ulduar.h @@ -169,6 +169,7 @@ enum // The descent into madness NPC_VEZAX = 33271, NPC_SARONITE_ANIMUS = 33524, + NPC_VEZAX_BUNNY = 33500, NPC_YOGGSARON = 33288, NPC_SARA = 33134, NPC_YOGG_BRAIN = 33890, @@ -569,6 +570,7 @@ class instance_ulduar : public ScriptedInstance, private DialogueHelper void DoProcessShatteredEvent(); ObjectGuid GetKoloRubbleStalker(bool bRightSide) { return bRightSide ? m_rightKoloStalkerGuid : m_leftKoloStalkerGuid; } + ObjectGuid GetVezaxBunnyGuid(bool bAnimus) { return bAnimus ? m_animusVezaxBunnyGuid : m_vaporVezaxBunnyGuid; } void GetDefenderGuids(GuidList& lDefenders) { lDefenders = m_lDefendersGuids; } void GetEngineersGuids(GuidList& lEngineers) { lEngineers = m_lEngineersGuids; } @@ -608,6 +610,8 @@ class instance_ulduar : public ScriptedInstance, private DialogueHelper ObjectGuid m_leftKoloStalkerGuid; ObjectGuid m_rightKoloStalkerGuid; + ObjectGuid m_animusVezaxBunnyGuid; + ObjectGuid m_vaporVezaxBunnyGuid; GuidVector m_vToyPileGuidVector; GuidVector m_vBrokenHarpoonsGuids; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index c5fd7d755..5be92c4bc 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3058" + #define SD2_REVISION_NR "3059" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 7c8168335..d66e8e85c 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -1313,6 +1313,7 @@ UPDATE creature_template SET ScriptName='npc_searing_gaze' WHERE entry=28265; UPDATE instance_template SET ScriptName='instance_ulduar' WHERE map=603; UPDATE gameobject_template SET ScriptName='go_ulduar_teleporter' WHERE entry=194569; UPDATE creature_template SET ScriptName='boss_general_vezax' WHERE entry=33271; +UPDATE creature_template SET ScriptName='npc_saronite_vapor' WHERE entry=33488; UPDATE creature_template SET ScriptName='boss_auriaya' WHERE entry=33515; UPDATE creature_template SET ScriptName='boss_feral_defender' WHERE entry=34035; UPDATE creature_template SET ScriptName='boss_brundir' WHERE entry=32857; diff --git a/sql/updates/r3059_mangos.sql b/sql/updates/r3059_mangos.sql new file mode 100644 index 000000000..1950d7aae --- /dev/null +++ b/sql/updates/r3059_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_saronite_vapor' WHERE entry=33488; From 28b952902a05d66e7e88e9427359b4240fce6fda Mon Sep 17 00:00:00 2001 From: Xfurry Date: Mon, 27 Oct 2014 01:10:26 +0100 Subject: [PATCH 1072/1172] [3060] Implement basic support for Culling of Stratholme intro event The main part of the event will be handled by DB --- .../culling_of_stratholme.cpp | 119 ++++++++++++++++++ .../culling_of_stratholme.h | 5 +- .../instance_culling_of_stratholme.cpp | 64 ++++++++-- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 + sql/scriptdev2_script_full.sql | 5 +- sql/updates/r3060_mangos.sql | 1 + sql/updates/r3060_scriptdev2.sql | 4 + 8 files changed, 189 insertions(+), 12 deletions(-) create mode 100644 sql/updates/r3060_mangos.sql create mode 100644 sql/updates/r3060_scriptdev2.sql diff --git a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.cpp b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.cpp index 2bbb1d72a..545a6444b 100644 --- a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.cpp +++ b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.cpp @@ -23,6 +23,7 @@ EndScriptData */ #include "precompiled.h" #include "culling_of_stratholme.h" +#include "escort_ai.h" /* ************* ** npc_chromie (gossip, quest-accept) @@ -55,6 +56,8 @@ enum TEXT_ID_INN_3 = 12950, TEXT_ID_INN_4 = 12952, TEXT_ID_INN_TELEPORT = 13470, + + SPELL_TELEPORT_COT_P4 = 53435, // triggers 53436 }; bool GossipHello_npc_chromie(Player* pPlayer, Creature* pCreature) @@ -72,6 +75,8 @@ bool GossipHello_npc_chromie(Player* pPlayer, Creature* pCreature) if (pPlayer->GetQuestRewardStatus(QUEST_DISPELLING_ILLUSIONS) && !pPlayer->HasItemCount(ITEM_ARCANE_DISRUPTOR, 1)) pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_INN_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); } + // intro skip option is available since 3.3.x + pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_INN_SKIP, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4); pPlayer->SEND_GOSSIP_MENU(TEXT_ID_INN_1, pCreature->GetObjectGuid()); break; case NPC_CHROMIE_ENTRANCE: @@ -114,6 +119,20 @@ bool GossipSelect_npc_chromie(Player* pPlayer, Creature* pCreature, uint32 /*sen } } break; + case GOSSIP_ACTION_INFO_DEF+4: + pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_INN_TELEPORT, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 5); + pPlayer->SEND_GOSSIP_MENU(TEXT_ID_INN_TELEPORT, pCreature->GetObjectGuid()); + break; + case GOSSIP_ACTION_INFO_DEF+5: + pCreature->CastSpell(pPlayer, SPELL_TELEPORT_COT_P4, true); + if (instance_culling_of_stratholme* pInstance = (instance_culling_of_stratholme*)pCreature->GetInstanceData()) + { + // only skip intro if not already started; + if (pInstance->GetData(TYPE_ARTHAS_INTRO_EVENT) == NOT_STARTED && pInstance->GetData(TYPE_GRAIN_EVENT) == NOT_STARTED) + pInstance->SetData(TYPE_ARTHAS_INTRO_EVENT, DONE); + } + pPlayer->CLOSE_GOSSIP_MENU(); + break; } break; case NPC_CHROMIE_ENTRANCE: @@ -132,7 +151,10 @@ bool GossipSelect_npc_chromie(Player* pPlayer, Creature* pCreature, uint32 /*sen if (instance_culling_of_stratholme* pInstance = (instance_culling_of_stratholme*)pCreature->GetInstanceData()) { if (pInstance->GetData(TYPE_ARTHAS_INTRO_EVENT) == NOT_STARTED) + { + pInstance->SetData(TYPE_ARTHAS_INTRO_EVENT, IN_PROGRESS); pInstance->DoSpawnArthasIfNeeded(pPlayer); + } } break; } @@ -156,7 +178,10 @@ bool QuestAccept_npc_chromie(Player* pPlayer, Creature* pCreature, const Quest* if (instance_culling_of_stratholme* pInstance = (instance_culling_of_stratholme*)pCreature->GetInstanceData()) { if (pInstance->GetData(TYPE_ARTHAS_INTRO_EVENT) == NOT_STARTED) + { + pInstance->SetData(TYPE_ARTHAS_INTRO_EVENT, IN_PROGRESS); pInstance->DoSpawnArthasIfNeeded(pPlayer); + } } break; } @@ -256,6 +281,93 @@ bool EffectAuraDummy_spell_aura_dummy_npc_crates_dummy(const Aura* pAura, bool b return true; } +/* ************* +** npc_arthas +************* */ + +enum +{ + GOSSIP_ITEM_CITY_GATES = -3595008, + + TEXT_ID_CITY_GATES = 13076, + + SPELL_HOLY_LIGHT = 52444, + SPELL_EXORCISM = 52445, + SPELL_DEVOTION_AURA = 52442, +}; + +struct npc_arthasAI : public npc_escortAI +{ + npc_arthasAI(Creature* pCreature) : npc_escortAI(pCreature) + { + m_pInstance = (instance_culling_of_stratholme*)pCreature->GetInstanceData(); + Reset(); + } + + instance_culling_of_stratholme* m_pInstance; + + void Reset() override { } + + void MovementInform(uint32 uiType, uint32 uiPointId) override + { + if (uiType == WAYPOINT_MOTION_TYPE) + { + // set the intro event as done and start the undead waves + if (uiPointId == 31 && m_pInstance) + m_pInstance->SetData(TYPE_ARTHAS_INTRO_EVENT, DONE); + } + else + npc_escortAI::MovementInform(uiType, uiPointId); + } + + void WaypointReached(uint32 uiPointId) override + { + // ToDo: + } + + void UpdateEscortAI(const uint32 uiDiff) override + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + // ToDo: add spells + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_npc_arthas(Creature* pCreature) +{ + return new npc_arthasAI(pCreature); +} + +bool GossipHello_npc_arthas(Player* pPlayer, Creature* pCreature) +{ + if (instance_culling_of_stratholme* pInstance = (instance_culling_of_stratholme*)pCreature->GetInstanceData()) + { + if (pInstance->GetData(TYPE_ARTHAS_INTRO_EVENT) == IN_PROGRESS) + { + pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_CITY_GATES, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); + pPlayer->SEND_GOSSIP_MENU(TEXT_ID_CITY_GATES, pCreature->GetObjectGuid()); + } + } + return true; +} + +bool GossipSelect_npc_arthas(Player* pPlayer, Creature* pCreature, uint32 /*sender*/, uint32 uiAction) +{ + switch (uiAction) + { + case GOSSIP_ACTION_INFO_DEF+1: + // resume WP movement - rest is handled by DB + pCreature->clearUnitState(UNIT_STAT_WAYPOINT_PAUSED); + pCreature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); + pPlayer->CLOSE_GOSSIP_MENU(); + break; + } + return true; +} + void AddSC_culling_of_stratholme() { Script* pNewScript; @@ -271,4 +383,11 @@ void AddSC_culling_of_stratholme() pNewScript->Name = "spell_dummy_npc_crates_bunny"; pNewScript->pEffectAuraDummy = &EffectAuraDummy_spell_aura_dummy_npc_crates_dummy; pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_arthas"; + pNewScript->GetAI = &GetAI_npc_arthas; + pNewScript->pGossipHello = &GossipHello_npc_arthas; + pNewScript->pGossipSelect = &GossipSelect_npc_arthas; + pNewScript->RegisterSelf(); } diff --git a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.h b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.h index 9741ee5fc..953fd7a19 100644 --- a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.h +++ b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.h @@ -23,7 +23,7 @@ enum NPC_CHROMIE_INN = 26527, NPC_CHROMIE_ENTRANCE = 27915, NPC_CHROMIE_END = 30997, - // NPC_HOURGLASS = 28656, + NPC_HOURGLASS = 28656, NPC_ARTHAS = 26499, // NPC_MEATHOOK = 26529, // NPC_SALRAMM_THE_FLESHCRAFTER = 26530, @@ -51,6 +51,9 @@ enum // NPC_CRATES_BUNNY = 30996, // Intro Event NPCs + NPC_JAINA_PROUDMOORE = 26497, + NPC_UTHER_LIGHTBRINGER = 26528, + NPC_KNIGHT_SILVERHAND = 28612, NPC_LORDAERON_FOOTMAN = 27745, NPC_STRATHOLME_CITIZEN = 28167, NPC_STRATHOLME_RESIDENT = 28169, diff --git a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/instance_culling_of_stratholme.cpp b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/instance_culling_of_stratholme.cpp index 8f9cdf67b..4f5498beb 100644 --- a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/instance_culling_of_stratholme.cpp +++ b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/instance_culling_of_stratholme.cpp @@ -40,19 +40,27 @@ struct sSpawnLocation static sSpawnLocation m_aArthasSpawnLocs[] = // need tuning { - {1969.73f, 1287.12f, 145.48f, 3.14f}, - {2049.43f, 1287.43f, 142.75f, 0.06f}, + {1957.13f, 1287.43f, 145.65f, 2.96f}, // bridge + {2091.99f, 1277.25f, 140.47f, 0.43f}, // city entrance {2365.54f, 1194.85f, 131.98f, 0.47f}, {2534.46f, 1125.99f, 130.75f, 0.27f}, {2363.77f, 1406.31f, 128.64f, 3.23f} }; -static sSpawnLocation m_aChromieSpawnLocs[] = // need tuning, escpecially EndPositions! +static sSpawnLocation m_aIntroActorsSpawnLocs[] = { - {1814.46f, 1283.97f, 142.30f, 4.32f}, // near bridge + {1876.78f, 1305.72f, 146.24f, 6.07f}, // Jaina + {1786.18f, 1268.63f, 140.02f, 0.42f}, // Uther + {1780.26f, 1261.87f, 139.55f, 0.57f}, // Silverhand knights + {1778.59f, 1265.03f, 139.43f, 0.40f}, + {1777.04f, 1268.16f, 139.35f, 0.59f} +}; + +static sSpawnLocation m_aChromieSpawnLocs[] = +{ + {1813.298f, 1283.578f, 142.3258f, 3.96f}, // near bridge {2319.562f, 1506.409f, 152.0499f, 3.78f}, // End - {1811.52f, 1285.92f, 142.37f, 4.47f}, // Hourglass, near bridge - {2186.42f, 1323.77f, 129.91f, 0.0f}, // Hourglass, End + {1810.875f, 1285.035f, 142.4917f, 4.48f}, // Hourglass, near bridge }; instance_culling_of_stratholme::instance_culling_of_stratholme(Map* pMap) : ScriptedInstance(pMap), @@ -168,6 +176,10 @@ void instance_culling_of_stratholme::SetData(uint32 uiType, uint32 uiData) break; case TYPE_ARTHAS_INTRO_EVENT: m_auiEncounter[uiType] = uiData; + if (uiData == DONE) + { + // ToDo: start the wave event + } break; case TYPE_ARTHAS_ESCORT_EVENT: m_auiEncounter[uiType] = uiData; @@ -280,7 +292,9 @@ void instance_culling_of_stratholme::Load(const char* chrIn) void instance_culling_of_stratholme::OnPlayerEnter(Player* pPlayer) { // spawn Chromie and Arthas - DoSpawnArthasIfNeeded(pPlayer); + if (GetData(TYPE_ARTHAS_INTRO_EVENT) == DONE) + DoSpawnArthasIfNeeded(pPlayer); + DoSpawnChromieIfNeeded(pPlayer); // Show World States if needed @@ -405,7 +419,38 @@ void instance_culling_of_stratholme::DoSpawnArthasIfNeeded(Unit* pSummoner) uint8 uiPosition = GetInstancePosition(); if (uiPosition && uiPosition <= MAX_ARTHAS_SPAWN_POS) - pSummoner->SummonCreature(NPC_ARTHAS, m_aArthasSpawnLocs[uiPosition - 1].m_fX, m_aArthasSpawnLocs[uiPosition - 1].m_fY, m_aArthasSpawnLocs[uiPosition - 1].m_fZ, m_aArthasSpawnLocs[uiPosition - 1].m_fO, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10000); + pSummoner->SummonCreature(NPC_ARTHAS, m_aArthasSpawnLocs[uiPosition - 1].m_fX, m_aArthasSpawnLocs[uiPosition - 1].m_fY, m_aArthasSpawnLocs[uiPosition - 1].m_fZ, m_aArthasSpawnLocs[uiPosition - 1].m_fO, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10000, true); + + // no gossip flag by default - added on demand + if (Creature* pArthas = GetSingleCreatureFromStorage(NPC_ARTHAS)) + pArthas->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); + + // summon the other intro actors + if (uiPosition == POS_ARTHAS_INTRO) + { + // start intro event by dbscripts + if (Creature* pArthas = GetSingleCreatureFromStorage(NPC_ARTHAS)) + { + pArthas->SetWalk(false); + pArthas->GetMotionMaster()->MoveWaypoint(); + } + // spawn Jaina and Uther + if (Creature* pJaina = pSummoner->SummonCreature(NPC_JAINA_PROUDMOORE, m_aIntroActorsSpawnLocs[0].m_fX, m_aIntroActorsSpawnLocs[0].m_fY, m_aIntroActorsSpawnLocs[0].m_fZ, m_aIntroActorsSpawnLocs[0].m_fO, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10000)) + pJaina->GetMotionMaster()->MoveWaypoint(); + if (Creature* pUther = pSummoner->SummonCreature(NPC_UTHER_LIGHTBRINGER, m_aIntroActorsSpawnLocs[1].m_fX, m_aIntroActorsSpawnLocs[1].m_fY, m_aIntroActorsSpawnLocs[1].m_fZ, m_aIntroActorsSpawnLocs[1].m_fO, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10000)) + { + pUther->SetWalk(false); + pUther->GetMotionMaster()->MoveWaypoint(); + + // spawn the knights + if (Creature* pKnight = pSummoner->SummonCreature(NPC_KNIGHT_SILVERHAND, m_aIntroActorsSpawnLocs[2].m_fX, m_aIntroActorsSpawnLocs[2].m_fY, m_aIntroActorsSpawnLocs[2].m_fZ, m_aIntroActorsSpawnLocs[2].m_fO, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10000)) + pKnight->GetMotionMaster()->MoveFollow(pUther, pKnight->GetDistance(pUther), 2 * M_PI_F - pKnight->GetAngle(pUther)); + if (Creature* pKnight = pSummoner->SummonCreature(NPC_KNIGHT_SILVERHAND, m_aIntroActorsSpawnLocs[3].m_fX, m_aIntroActorsSpawnLocs[3].m_fY, m_aIntroActorsSpawnLocs[3].m_fZ, m_aIntroActorsSpawnLocs[3].m_fO, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10000)) + pKnight->GetMotionMaster()->MoveFollow(pUther, pKnight->GetDistance(pUther), 2 * M_PI_F - pKnight->GetAngle(pUther)); + if (Creature* pKnight = pSummoner->SummonCreature(NPC_KNIGHT_SILVERHAND, m_aIntroActorsSpawnLocs[4].m_fX, m_aIntroActorsSpawnLocs[4].m_fY, m_aIntroActorsSpawnLocs[4].m_fZ, m_aIntroActorsSpawnLocs[4].m_fO, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10000)) + pKnight->GetMotionMaster()->MoveFollow(pUther, pKnight->GetDistance(pUther), 2 * M_PI_F - pKnight->GetAngle(pUther)); + } + } } // Atm here only new Chromies are spawned - despawning depends on Mangos featuring such a thing @@ -425,7 +470,10 @@ void instance_culling_of_stratholme::DoSpawnChromieIfNeeded(Unit* pSummoner) { Creature* pChromie = GetSingleCreatureFromStorage(NPC_CHROMIE_ENTRANCE, true); if (!pChromie) + { pSummoner->SummonCreature(NPC_CHROMIE_ENTRANCE, m_aChromieSpawnLocs[0].m_fX, m_aChromieSpawnLocs[0].m_fY, m_aChromieSpawnLocs[0].m_fZ, m_aChromieSpawnLocs[0].m_fO, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10000); + pSummoner->SummonCreature(NPC_HOURGLASS, m_aChromieSpawnLocs[2].m_fX, m_aChromieSpawnLocs[2].m_fY, m_aChromieSpawnLocs[2].m_fZ, m_aChromieSpawnLocs[2].m_fO, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10000); + } } } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 5be92c4bc..0e13d2ce2 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3059" + #define SD2_REVISION_NR "3060" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index d66e8e85c..328c2a336 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -416,6 +416,7 @@ INSERT INTO scripted_event_id VALUES UPDATE instance_template SET ScriptName='instance_culling_of_stratholme' WHERE map=595; UPDATE creature_template SET ScriptName='npc_chromie' WHERE entry IN (26527, 27915); UPDATE creature_template SET ScriptName='spell_dummy_npc_crates_bunny' WHERE entry=27827; +UPDATE creature_template SET ScriptName='npc_arthas' WHERE entry=26499; DELETE FROM scripted_areatrigger WHERE entry=5291; INSERT INTO scripted_areatrigger VALUES (5291,'at_culling_of_stratholme'); diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 70ad64ec8..e08d4a1f5 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -4973,8 +4973,9 @@ INSERT INTO gossip_texts (entry,content_default,comment) VALUES (-3595003,'Why have I been sent back to this particular place and time?','chromie GOSSIP_ITEM_INN_1'), (-3595004,'What was this decision?','chromie GOSSIP_ITEM_INN_2'), (-3595005,'So how does the Infinite Dragonflight plan to interfere?','chromie GOSSIP_ITEM_INN_3'), -(-3595006,'Chromie, you and I both know what''s going to happen in this time stream. We''ve seen this all before.$B$BCan you just skip us ahead to all the real action?','chromie GOSSIP_ITEM_INN_SKIP'), -(-3595007,'Yes, please!','chromie GOSSIP_ITEM_INN_TELEPORT'); +(-3595006,'Chromie, you and I both know what\'s going to happen in this time stream. We\'ve seen this all before. Can you just skip us ahead to all the real action?','chromie GOSSIP_ITEM_INN_SKIP'), +(-3595007,'Yes, please!','chromie GOSSIP_ITEM_INN_TELEPORT'), +(-3595008,'Yes, my Prince. We are ready.','arthas GOSSIP_ITEM_CITY_GATES'); -- -3 599 000 HALLS OF STONE INSERT INTO gossip_texts (entry,content_default,comment) VALUES diff --git a/sql/updates/r3060_mangos.sql b/sql/updates/r3060_mangos.sql new file mode 100644 index 000000000..3a97730bd --- /dev/null +++ b/sql/updates/r3060_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_arthas' WHERE entry=26499; diff --git a/sql/updates/r3060_scriptdev2.sql b/sql/updates/r3060_scriptdev2.sql new file mode 100644 index 000000000..22b207f73 --- /dev/null +++ b/sql/updates/r3060_scriptdev2.sql @@ -0,0 +1,4 @@ +DELETE FROM gossip_texts WHERE entry IN (-3595006,-3595008); +INSERT INTO gossip_texts (entry,content_default,comment) VALUES +(-3595006,'Chromie, you and I both know what\'s going to happen in this time stream. We\'ve seen this all before. Can you just skip us ahead to all the real action?','chromie GOSSIP_ITEM_INN_SKIP'), +(-3595008,'Yes, my Prince. We are ready.','arthas GOSSIP_ITEM_CITY_GATES'); From e3e42bf2d1d2ae3eb692ab695edda637b78e080d Mon Sep 17 00:00:00 2001 From: Xfurry Date: Tue, 28 Oct 2014 00:35:43 +0100 Subject: [PATCH 1073/1172] [3061] Complete CoS intro and allow players to skip it and jump directly into action --- .../culling_of_stratholme.cpp | 8 +++ .../culling_of_stratholme.h | 6 +- .../instance_culling_of_stratholme.cpp | 58 ++++++++++++++++++- sd2_revision_nr.h | 2 +- sql/scriptdev2_script_full.sql | 3 +- sql/updates/r3061_scriptdev2.sql | 3 + 6 files changed, 74 insertions(+), 6 deletions(-) create mode 100644 sql/updates/r3061_scriptdev2.sql diff --git a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.cpp b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.cpp index 545a6444b..c6f605d06 100644 --- a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.cpp +++ b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.cpp @@ -129,7 +129,14 @@ bool GossipSelect_npc_chromie(Player* pPlayer, Creature* pCreature, uint32 /*sen { // only skip intro if not already started; if (pInstance->GetData(TYPE_ARTHAS_INTRO_EVENT) == NOT_STARTED && pInstance->GetData(TYPE_GRAIN_EVENT) == NOT_STARTED) + { pInstance->SetData(TYPE_ARTHAS_INTRO_EVENT, DONE); + pInstance->SetData(TYPE_GRAIN_EVENT, DONE); + + // spawn Arthas and Chromie + pInstance->DoSpawnChromieIfNeeded(pPlayer); + pInstance->DoSpawnArthasIfNeeded(pPlayer); + } } pPlayer->CLOSE_GOSSIP_MENU(); break; @@ -293,6 +300,7 @@ enum SPELL_HOLY_LIGHT = 52444, SPELL_EXORCISM = 52445, + SPELL_EXORCISM_H = 58822, SPELL_DEVOTION_AURA = 52442, }; diff --git a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.h b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.h index 953fd7a19..0ebdde864 100644 --- a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.h +++ b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.h @@ -55,6 +55,7 @@ enum NPC_UTHER_LIGHTBRINGER = 26528, NPC_KNIGHT_SILVERHAND = 28612, NPC_LORDAERON_FOOTMAN = 27745, + NPC_HIGH_ELF_MAGE_PRIEST = 27747, NPC_STRATHOLME_CITIZEN = 28167, NPC_STRATHOLME_RESIDENT = 28169, @@ -144,14 +145,16 @@ class instance_culling_of_stratholme : public ScriptedInstance Creature* GetStratIntroFootman(); void GetResidentOrderedList(std::list& lList); + void DoSpawnChromieIfNeeded(Unit* pSummoner); void DoSpawnArthasIfNeeded(Unit* pSummoner); bool CanGrainEventProgress(Creature* pCrate); void DoEventAtTriggerIfCan(uint32 uiTriggerId); protected: + void DoSetupEntranceSoldiers(Unit* pSummoner); void DoChromieWhisper(int32 iEntry); - void DoSpawnChromieIfNeeded(Unit* pSummoner); + void DoUpdateZombieResidents(); uint8 GetInstancePosition(); void ArthasJustDied(); @@ -167,6 +170,7 @@ class instance_culling_of_stratholme : public ScriptedInstance GuidList m_luiCratesBunnyGUIDs; GuidList m_luiFootmanGUIDs; GuidList m_luiResidentGUIDs; + GuidList m_luiGateSoldiersGUIDs; GuidList m_lAgiatedCitizenGUIDList; GuidList m_lAgiatedResidentGUIDList; diff --git a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/instance_culling_of_stratholme.cpp b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/instance_culling_of_stratholme.cpp index 4f5498beb..e26a619ab 100644 --- a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/instance_culling_of_stratholme.cpp +++ b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/instance_culling_of_stratholme.cpp @@ -31,6 +31,7 @@ enum SAY_CHROMIE_HURRY = -1000000, // TODO WHISPER_CHROMIE_CRATES = -1595001, + WHISPER_CHROMIE_GUARDIAN = -1595002, }; struct sSpawnLocation @@ -53,7 +54,13 @@ static sSpawnLocation m_aIntroActorsSpawnLocs[] = {1786.18f, 1268.63f, 140.02f, 0.42f}, // Uther {1780.26f, 1261.87f, 139.55f, 0.57f}, // Silverhand knights {1778.59f, 1265.03f, 139.43f, 0.40f}, - {1777.04f, 1268.16f, 139.35f, 0.59f} + {1777.04f, 1268.16f, 139.35f, 0.59f}, + {2091.47f, 1294.28f, 139.82f, 6.27f}, // High elf priests + {2091.26f, 1281.71f, 139.92f, 6.27f}, + {2096.12f, 1290.53f, 138.81f, 6.27f}, // Footman + {2096.41f, 1284.22f, 138.79f, 6.27f}, + {2096.93f, 1297.57f, 138.96f, 6.27f}, + {2096.32f, 1278.98f, 139.43f, 6.27f} }; static sSpawnLocation m_aChromieSpawnLocs[] = @@ -101,8 +108,16 @@ void instance_culling_of_stratholme::OnCreatureCreate(Creature* pCreature) m_mNpcEntryGuidStore[pCreature->GetEntry()] = pCreature->GetObjectGuid(); break; - case NPC_GRAIN_CRATE_HELPER: m_luiCratesBunnyGUIDs.push_back(pCreature->GetObjectGuid()); break; - case NPC_LORDAERON_FOOTMAN: m_luiFootmanGUIDs.push_back(pCreature->GetObjectGuid()); break; + case NPC_GRAIN_CRATE_HELPER: + m_luiCratesBunnyGUIDs.push_back(pCreature->GetObjectGuid()); + break; + case NPC_LORDAERON_FOOTMAN: + m_luiFootmanGUIDs.push_back(pCreature->GetObjectGuid()); + // no break; + case NPC_HIGH_ELF_MAGE_PRIEST: + if (pCreature->GetPositionX() > 2000.0f) + m_luiGateSoldiersGUIDs.push_back(pCreature->GetObjectGuid()); + break; case NPC_STRATHOLME_CITIZEN: case NPC_STRATHOLME_RESIDENT: @@ -179,6 +194,7 @@ void instance_culling_of_stratholme::SetData(uint32 uiType, uint32 uiData) if (uiData == DONE) { // ToDo: start the wave event + DoUpdateZombieResidents(); } break; case TYPE_ARTHAS_ESCORT_EVENT: @@ -451,6 +467,9 @@ void instance_culling_of_stratholme::DoSpawnArthasIfNeeded(Unit* pSummoner) pKnight->GetMotionMaster()->MoveFollow(pUther, pKnight->GetDistance(pUther), 2 * M_PI_F - pKnight->GetAngle(pUther)); } } + // setup the entrance soldiers in case of reload or intro skip + else if (uiPosition == POS_ARTHAS_WAVES) + DoSetupEntranceSoldiers(pSummoner); } // Atm here only new Chromies are spawned - despawning depends on Mangos featuring such a thing @@ -477,6 +496,39 @@ void instance_culling_of_stratholme::DoSpawnChromieIfNeeded(Unit* pSummoner) } } +// Function that sets up the city entrance soldiers in case of reload or if the intro is skipped +void instance_culling_of_stratholme::DoSetupEntranceSoldiers(Unit* pSummoner) +{ + if (!pSummoner) + return; + + // despawn the current set of soldiers + for (GuidList::const_iterator itr = m_luiGateSoldiersGUIDs.begin(); itr != m_luiGateSoldiersGUIDs.end(); ++itr) + { + if (Creature* pSoldier = instance->GetCreature(*itr)) + pSoldier->ForcedDespawn(); + } + + // spawn others in the right spot + pSummoner->SummonCreature(NPC_HIGH_ELF_MAGE_PRIEST, m_aIntroActorsSpawnLocs[5].m_fX, m_aIntroActorsSpawnLocs[5].m_fY, m_aIntroActorsSpawnLocs[5].m_fZ, m_aIntroActorsSpawnLocs[5].m_fO, TEMPSUMMON_CORPSE_DESPAWN, 10000); + pSummoner->SummonCreature(NPC_HIGH_ELF_MAGE_PRIEST, m_aIntroActorsSpawnLocs[6].m_fX, m_aIntroActorsSpawnLocs[6].m_fY, m_aIntroActorsSpawnLocs[6].m_fZ, m_aIntroActorsSpawnLocs[6].m_fO, TEMPSUMMON_CORPSE_DESPAWN, 10000); + pSummoner->SummonCreature(NPC_LORDAERON_FOOTMAN, m_aIntroActorsSpawnLocs[7].m_fX, m_aIntroActorsSpawnLocs[7].m_fY, m_aIntroActorsSpawnLocs[7].m_fZ, m_aIntroActorsSpawnLocs[7].m_fO, TEMPSUMMON_CORPSE_DESPAWN, 10000); + pSummoner->SummonCreature(NPC_LORDAERON_FOOTMAN, m_aIntroActorsSpawnLocs[8].m_fX, m_aIntroActorsSpawnLocs[8].m_fY, m_aIntroActorsSpawnLocs[8].m_fZ, m_aIntroActorsSpawnLocs[8].m_fO, TEMPSUMMON_CORPSE_DESPAWN, 10000); + pSummoner->SummonCreature(NPC_LORDAERON_FOOTMAN, m_aIntroActorsSpawnLocs[9].m_fX, m_aIntroActorsSpawnLocs[9].m_fY, m_aIntroActorsSpawnLocs[9].m_fZ, m_aIntroActorsSpawnLocs[9].m_fO, TEMPSUMMON_CORPSE_DESPAWN, 10000); + pSummoner->SummonCreature(NPC_LORDAERON_FOOTMAN, m_aIntroActorsSpawnLocs[10].m_fX, m_aIntroActorsSpawnLocs[10].m_fY, m_aIntroActorsSpawnLocs[10].m_fZ, m_aIntroActorsSpawnLocs[10].m_fO, TEMPSUMMON_CORPSE_DESPAWN, 10000); +} + +// Function that updates all the stratholme humans to zombies +void instance_culling_of_stratholme::DoUpdateZombieResidents() +{ + // update all residents + for (GuidList::const_iterator itr = m_luiResidentGUIDs.begin(); itr != m_luiResidentGUIDs.end(); ++itr) + { + if (Creature* pResident = instance->GetCreature(*itr)) + pResident->UpdateEntry(NPC_ZOMBIE); + } +} + // Function to check if the grain event can progress bool instance_culling_of_stratholme::CanGrainEventProgress(Creature* pCrate) { diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 0e13d2ce2..e8d2aa7cd 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3060" + #define SD2_REVISION_NR "3061" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index e08d4a1f5..7e79e78dc 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -3420,7 +3420,8 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen -- -1 595 000 CULLING OF STRATHOLME INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES (-1595000,'All soldiers of Lordaeron should immediately report to the entrance of Stratholme, and await further orders from Prince Arthas.',0,6,0,0,'lordaeron crier SAY_SOLDIERS_REPORT'), -(-1595001,'Good work with the crates! Come talk to me in front of Stratholme for your next assignment!',0,4,0,0,'chromie WHISPER_CHROMIE_CRATES'); +(-1595001,'Good work with the crates! Come talk to me in front of Stratholme for your next assignment!',0,4,0,0,'chromie WHISPER_CHROMIE_CRATES'), +(-1595002,'Oh, no! Adventurers, something awful has happened! A colleague of mine has been captured by the Infinite Dragonflight, and they\'re doing something horrible to him! Keeping Arthas is still your highest priority, but if you act fast you could help save a Guardian of Time!',0,4,0,0,'chromie WHISPER_CHROMIE_GUARDIAN'); -- -1 599 000 HALLS OF STONE INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES diff --git a/sql/updates/r3061_scriptdev2.sql b/sql/updates/r3061_scriptdev2.sql new file mode 100644 index 000000000..efc33caa5 --- /dev/null +++ b/sql/updates/r3061_scriptdev2.sql @@ -0,0 +1,3 @@ +DELETE FROM script_texts WHERE entry=-1595002; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1595002,'Oh, no! Adventurers, something awful has happened! A colleague of mine has been captured by the Infinite Dragonflight, and they\'re doing something horrible to him! Keeping Arthas is still your highest priority, but if you act fast you could help save a Guardian of Time!',0,4,0,0,'chromie WHISPER_CHROMIE_GUARDIAN'); From e6008c9b994a6afa8bf5fa66318c5bfbf0c2074f Mon Sep 17 00:00:00 2001 From: Xfurry Date: Fri, 31 Oct 2014 00:09:06 +0100 Subject: [PATCH 1074/1172] [3062] Implement support for scourge waves in Culling of Stratholme This enables the first two encounters in this instance Also enables the Infinite Corruptor, heroic only encounter --- .../culling_of_stratholme.cpp | 32 +- .../culling_of_stratholme.h | 91 +++- .../instance_culling_of_stratholme.cpp | 430 +++++++++++++----- sd2_revision_nr.h | 2 +- sql/scriptdev2_script_full.sql | 11 +- sql/updates/r3062_scriptdev2.sql | 11 + 6 files changed, 446 insertions(+), 131 deletions(-) create mode 100644 sql/updates/r3062_scriptdev2.sql diff --git a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.cpp b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.cpp index c6f605d06..7c34c5544 100644 --- a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.cpp +++ b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.cpp @@ -295,8 +295,10 @@ bool EffectAuraDummy_spell_aura_dummy_npc_crates_dummy(const Aura* pAura, bool b enum { GOSSIP_ITEM_CITY_GATES = -3595008, + GOSSIP_ITEM_TOWN_HALL = -3595009, TEXT_ID_CITY_GATES = 13076, + TEXT_ID_TOWN_HALL = 13125, SPELL_HOLY_LIGHT = 52444, SPELL_EXORCISM = 52445, @@ -316,6 +318,14 @@ struct npc_arthasAI : public npc_escortAI void Reset() override { } + void ReceiveAIEvent(AIEventType eventType, Creature* /*pSender*/, Unit* pInvoker, uint32 uiMiscValue) override + { + if (eventType == AI_EVENT_START_ESCORT && pInvoker->GetTypeId() == TYPEID_PLAYER) + { + // ToDo: start escort + } + } + void MovementInform(uint32 uiType, uint32 uiPointId) override { if (uiType == WAYPOINT_MOTION_TYPE) @@ -358,6 +368,11 @@ bool GossipHello_npc_arthas(Player* pPlayer, Creature* pCreature) pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_CITY_GATES, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); pPlayer->SEND_GOSSIP_MENU(TEXT_ID_CITY_GATES, pCreature->GetObjectGuid()); } + else if (pInstance->GetData(TYPE_SALRAMM_EVENT) == DONE && pInstance->GetData(TYPE_EPOCH_EVENT) != DONE) + { + pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_TOWN_HALL, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); + pPlayer->SEND_GOSSIP_MENU(TEXT_ID_TOWN_HALL, pCreature->GetObjectGuid()); + } } return true; } @@ -366,12 +381,17 @@ bool GossipSelect_npc_arthas(Player* pPlayer, Creature* pCreature, uint32 /*send { switch (uiAction) { - case GOSSIP_ACTION_INFO_DEF+1: - // resume WP movement - rest is handled by DB - pCreature->clearUnitState(UNIT_STAT_WAYPOINT_PAUSED); - pCreature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); - pPlayer->CLOSE_GOSSIP_MENU(); - break; + case GOSSIP_ACTION_INFO_DEF+1: + // resume WP movement - rest is handled by DB + pCreature->clearUnitState(UNIT_STAT_WAYPOINT_PAUSED); + pCreature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); + pPlayer->CLOSE_GOSSIP_MENU(); + break; + case GOSSIP_ACTION_INFO_DEF+2: + // start initial escort event + pCreature->AI()->SendAIEvent(AI_EVENT_START_ESCORT, pPlayer, pCreature); + pPlayer->CLOSE_GOSSIP_MENU(); + break; } return true; } diff --git a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.h b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.h index 0ebdde864..9894e50ef 100644 --- a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.h +++ b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.h @@ -8,6 +8,8 @@ enum { MAX_ENCOUNTER = 9, + MAX_SCOURGE_WAVES = 10, + MAX_SCOURGE_TYPE_PER_WAVE = 4, TYPE_GRAIN_EVENT = 0, // crates with plagued grain identified TYPE_ARTHAS_INTRO_EVENT = 1, // Arhas Speech and Walk to Gates and short intro with MalGanis @@ -24,14 +26,14 @@ enum NPC_CHROMIE_ENTRANCE = 27915, NPC_CHROMIE_END = 30997, NPC_HOURGLASS = 28656, + NPC_LORDAERON_CRIER = 27913, NPC_ARTHAS = 26499, - // NPC_MEATHOOK = 26529, - // NPC_SALRAMM_THE_FLESHCRAFTER = 26530, + + // Dungeon bosses + NPC_MEATHOOK = 26529, + NPC_SALRAMM_THE_FLESHCRAFTER = 26530, // NPC_CHRONO_LORD_EPOCH = 26532, // NPC_MALGANIS = 26533, - NPC_INFINITE_CORRUPTER = 32273, - NPC_LORDAERON_CRIER = 27913, - NPC_ZOMBIE = 27737, // Inn Event related NPC NPC_MICHAEL_BELFAST = 30571, @@ -77,6 +79,31 @@ enum NPC_AGIATED_STRATHOLME_RESIDENT = 31127, NPC_PATRICIA_O_REILLY = 31028, + // Scourge waves + NPC_ENRAGING_GHOUL = 27729, + NPC_ACOLYTE = 27731, + NPC_MASTER_NECROMANCER = 27732, + NPC_CRYPT_FIEND = 27734, + NPC_PATCHWORK_CONSTRUCT = 27736, + NPC_TOMB_STALKER = 28199, + NPC_DARK_NECROMANCER = 28200, + NPC_BILE_GOLEM = 28201, + NPC_DEVOURING_GHOUL = 28249, + NPC_ZOMBIE = 27737, + // NPC_INVISIBLE_STALKER = 20562, + + // Infinite dragons + NPC_TOWNHALL_CITIZEN = 28340, + NPC_TOWNHALL_RESIDENT = 28341, + NPC_INFINITE_ADVERSARY = 27742, + NPC_INFINITE_AGENT = 27744, + NPC_INFINITE_HUNTER = 27743, + + // Heroic event npcs + NPC_INFINITE_CORRUPTER = 32273, + NPC_TIME_RIFT = 28409, + NPC_GUARDIAN_OF_TIME = 32281, + // Gameobjects GO_DOOR_BOOKCASE = 188686, GO_DARK_RUNED_CHEST = 190663, @@ -118,6 +145,41 @@ enum eInstancePosition POS_INSTANCE_FINISHED = 6 }; +enum eScourgeLocation +{ + POS_FESTIVAL_LANE = 0, + POS_KINGS_SQUARE = 1, + POS_MARKET_ROW = 2, + POS_TOWN_HALL = 3, + POS_ELDERS_SQUARE = 4, +}; + +enum eScourgeType +{ + SCOURGE_TYPE_GHOUL = 1, + SCOURGE_TYPE_NECROMANCER = 2, + SCOURGE_TYPE_FIEND = 3, + SCOURGE_TYPE_GOLEM = 4, + SCOURGE_TYPE_ACOLYTES = 5, + SCOURGE_TYPE_BOSS = 6, +}; + +static const uint32 uiScourgeWaveDef[MAX_SCOURGE_WAVES][MAX_SCOURGE_TYPE_PER_WAVE] = +{ + // first half of scourge waves + {SCOURGE_TYPE_GHOUL, SCOURGE_TYPE_GHOUL, SCOURGE_TYPE_GHOUL, 0}, + {SCOURGE_TYPE_NECROMANCER, SCOURGE_TYPE_GHOUL, SCOURGE_TYPE_GHOUL, 0}, + {SCOURGE_TYPE_FIEND, SCOURGE_TYPE_NECROMANCER, SCOURGE_TYPE_GHOUL, SCOURGE_TYPE_GHOUL}, + {SCOURGE_TYPE_FIEND, SCOURGE_TYPE_NECROMANCER, SCOURGE_TYPE_ACOLYTES, 0}, + {SCOURGE_TYPE_BOSS, 0, 0, 0}, + // second half of scourge waves + {SCOURGE_TYPE_FIEND, SCOURGE_TYPE_FIEND, SCOURGE_TYPE_NECROMANCER, SCOURGE_TYPE_GHOUL}, + {SCOURGE_TYPE_GOLEM, SCOURGE_TYPE_GHOUL, SCOURGE_TYPE_GHOUL, SCOURGE_TYPE_GHOUL}, + {SCOURGE_TYPE_GOLEM, SCOURGE_TYPE_NECROMANCER, SCOURGE_TYPE_GHOUL, SCOURGE_TYPE_GHOUL}, + {SCOURGE_TYPE_GOLEM, SCOURGE_TYPE_FIEND, SCOURGE_TYPE_NECROMANCER, SCOURGE_TYPE_GHOUL}, + {SCOURGE_TYPE_BOSS, 0, 0, 0} +}; + class instance_culling_of_stratholme : public ScriptedInstance { public: @@ -129,6 +191,7 @@ class instance_culling_of_stratholme : public ScriptedInstance void OnPlayerEnter(Player* pPlayer) override; void OnCreatureCreate(Creature* pCreature) override; void OnObjectCreate(GameObject* pGo) override; + void OnCreatureDeath(Creature* pCreature) override; void SetData(uint32 uiType, uint32 uiData) override; uint32 GetData(uint32 uiType) const override; @@ -138,12 +201,7 @@ class instance_culling_of_stratholme : public ScriptedInstance void Update(uint32 uiDiff) override; - void GetStratAgiatedCitizenList(GuidList& lList) { lList = m_lAgiatedCitizenGUIDList; }; - void GetStratAgiatedResidentList(GuidList& lList) { lList = m_lAgiatedResidentGUIDList; }; - void GetCratesBunnyOrderedList(std::list& lList); - Creature* GetStratIntroFootman(); - void GetResidentOrderedList(std::list& lList); void DoSpawnChromieIfNeeded(Unit* pSummoner); void DoSpawnArthasIfNeeded(Unit* pSummoner); @@ -153,10 +211,12 @@ class instance_culling_of_stratholme : public ScriptedInstance protected: void DoSetupEntranceSoldiers(Unit* pSummoner); + void DoSpawnCorruptorIfNeeded(Unit* pSummoner); void DoChromieWhisper(int32 iEntry); void DoUpdateZombieResidents(); + void DoSpawnNextScourgeWave(); + uint32 GetRandomMobOfType(uint8 uiType); uint8 GetInstancePosition(); - void ArthasJustDied(); uint32 m_auiEncounter[MAX_ENCOUNTER]; std::string m_strInstData; @@ -167,13 +227,14 @@ class instance_culling_of_stratholme : public ScriptedInstance uint32 m_uiRemoveCrateStateTimer; uint32 m_uiArthasRespawnTimer; + uint32 m_uiScourgeWaveTimer; + uint32 m_uiScourgeWaveCount; + uint8 m_uiCurrentUndeadPos; + GuidList m_luiCratesBunnyGUIDs; - GuidList m_luiFootmanGUIDs; GuidList m_luiResidentGUIDs; GuidList m_luiGateSoldiersGUIDs; - - GuidList m_lAgiatedCitizenGUIDList; - GuidList m_lAgiatedResidentGUIDList; + GuidList m_luiCurrentScourgeWaveGUIDs; GuidSet m_sGrainCratesGuidSet; }; diff --git a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/instance_culling_of_stratholme.cpp b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/instance_culling_of_stratholme.cpp index e26a619ab..d6afbfaf2 100644 --- a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/instance_culling_of_stratholme.cpp +++ b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/instance_culling_of_stratholme.cpp @@ -28,10 +28,21 @@ enum { MAX_ARTHAS_SPAWN_POS = 5, MAX_GRAIN_CRATES = 5, + MAX_SCOURGE_SPAWN_POS = 5, + SAY_CHROMIE_HURRY = -1000000, // TODO + SAY_SCOURGE_FESTIVAL_LANE = -1595003, + SAY_SCOURGE_KINGS_SQUARE = -1595004, + SAY_SCOURGE_MARKET_ROW = -1595005, + SAY_SCOURGE_TOWN_HALL = -1595006, + SAY_SCOURGE_ELDERS_SQUARE = -1595007, + + SAY_MEET_TOWN_HALL = -1595008, WHISPER_CHROMIE_CRATES = -1595001, WHISPER_CHROMIE_GUARDIAN = -1595002, + + SPELL_CORRUPTION_OF_TIME = 60422, // triggers 60451 }; struct sSpawnLocation @@ -43,7 +54,7 @@ static sSpawnLocation m_aArthasSpawnLocs[] = // need tuning { {1957.13f, 1287.43f, 145.65f, 2.96f}, // bridge {2091.99f, 1277.25f, 140.47f, 0.43f}, // city entrance - {2365.54f, 1194.85f, 131.98f, 0.47f}, + {2366.24f, 1195.25f, 132.04f, 3.15f}, // town hall {2534.46f, 1125.99f, 130.75f, 0.27f}, {2363.77f, 1406.31f, 128.64f, 3.23f} }; @@ -70,11 +81,37 @@ static sSpawnLocation m_aChromieSpawnLocs[] = {1810.875f, 1285.035f, 142.4917f, 4.48f}, // Hourglass, near bridge }; +static sSpawnLocation m_aHeroicEventSpawnLocs[] = +{ + {2331.642f, 1273.273f, 132.954f, 3.71f}, // Infinite corruptor + {2334.626f, 1280.450f, 133.006f, 1.72f}, // Time rift + {2321.489f, 1268.383f, 132.850f, 0.41f}, // Guardian of time +}; + +struct sScourgeSpawnLoc +{ + uint8 m_uiId; + int32 m_iYellId; + float m_fX, m_fY, m_fZ, m_fO; +}; + +static sScourgeSpawnLoc m_aScourgeWavesLocs[] = +{ + {POS_FESTIVAL_LANE, SAY_SCOURGE_FESTIVAL_LANE, 2176.517f, 1244.970f, 136.021f, 1.86f}, + {POS_KINGS_SQUARE, SAY_SCOURGE_KINGS_SQUARE, 2130.760f, 1353.649f, 131.396f, 6.02f}, + {POS_MARKET_ROW, SAY_SCOURGE_MARKET_ROW, 2219.825f, 1331.119f, 127.978f, 3.08f}, + {POS_TOWN_HALL, SAY_SCOURGE_TOWN_HALL, 2351.475f, 1211.893f, 130.361f, 4.50f}, + {POS_ELDERS_SQUARE, SAY_SCOURGE_ELDERS_SQUARE, 2259.153f, 1153.199f, 138.431f, 2.39f}, +}; + instance_culling_of_stratholme::instance_culling_of_stratholme(Map* pMap) : ScriptedInstance(pMap), m_bStartedInnEvent(false), m_uiGrainCrateCount(0), m_uiRemoveCrateStateTimer(0), - m_uiArthasRespawnTimer(0) + m_uiArthasRespawnTimer(0), + m_uiScourgeWaveTimer(0), + m_uiScourgeWaveCount(0), + m_uiCurrentUndeadPos(POS_FESTIVAL_LANE) // always the first undead location is Festival Lane { Initialize(); } @@ -84,6 +121,65 @@ void instance_culling_of_stratholme::Initialize() memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); } +void instance_culling_of_stratholme::OnPlayerEnter(Player* pPlayer) +{ + // spawn Chromie + DoSpawnChromieIfNeeded(pPlayer); + + // spawn Arthas if intro is completed / passed + if (GetData(TYPE_ARTHAS_INTRO_EVENT) == DONE) + { + DoSpawnArthasIfNeeded(pPlayer); + + // resume scourge waves if required - this can only happen in case of server reload + if (GetData(TYPE_SALRAMM_EVENT) != DONE) + { + // this will restart the wave event with a delayed timer + if (GetData(TYPE_MEATHOOK_EVENT) == DONE) + { + if (GetData(TYPE_SALRAMM_EVENT) != IN_PROGRESS) + { + SetData(TYPE_SALRAMM_EVENT, IN_PROGRESS); + m_uiScourgeWaveTimer = 30000; + m_uiScourgeWaveCount = 5; + } + } + else + { + if (GetData(TYPE_MEATHOOK_EVENT) != IN_PROGRESS) + { + SetData(TYPE_MEATHOOK_EVENT, IN_PROGRESS); + m_uiScourgeWaveTimer = 30000; + } + } + } + } + + // Show World States if needed + // Grain event world states + if (GetData(TYPE_GRAIN_EVENT) == IN_PROGRESS || GetData(TYPE_GRAIN_EVENT) == SPECIAL) + pPlayer->SendUpdateWorldState(WORLD_STATE_CRATES, 1); // Show Crates Counter + else + pPlayer->SendUpdateWorldState(WORLD_STATE_CRATES, 0); // Remove Crates Counter + + // Scourge waves + if (GetData(TYPE_MEATHOOK_EVENT) == IN_PROGRESS || GetData(TYPE_SALRAMM_EVENT) == IN_PROGRESS) + pPlayer->SendUpdateWorldState(WORLD_STATE_WAVE, m_uiScourgeWaveCount); // Add WaveCounter + else + pPlayer->SendUpdateWorldState(WORLD_STATE_WAVE, 0); // Remove WaveCounter + + // Infinite corruptor + if (GetData(TYPE_INFINITE_CORRUPTER_TIME)) + { + DoSpawnCorruptorIfNeeded(pPlayer); + + pPlayer->SendUpdateWorldState(WORLD_STATE_TIME, 1); // Show Timer + pPlayer->SendUpdateWorldState(WORLD_STATE_TIME_COUNTER, GetData(TYPE_INFINITE_CORRUPTER_TIME) / (MINUTE * IN_MILLISECONDS)); + } + else + pPlayer->SendUpdateWorldState(WORLD_STATE_TIME, 0); // Remove Timer +} + void instance_culling_of_stratholme::OnCreatureCreate(Creature* pCreature) { switch (pCreature->GetEntry()) @@ -112,8 +208,6 @@ void instance_culling_of_stratholme::OnCreatureCreate(Creature* pCreature) m_luiCratesBunnyGUIDs.push_back(pCreature->GetObjectGuid()); break; case NPC_LORDAERON_FOOTMAN: - m_luiFootmanGUIDs.push_back(pCreature->GetObjectGuid()); - // no break; case NPC_HIGH_ELF_MAGE_PRIEST: if (pCreature->GetPositionX() > 2000.0f) m_luiGateSoldiersGUIDs.push_back(pCreature->GetObjectGuid()); @@ -121,13 +215,26 @@ void instance_culling_of_stratholme::OnCreatureCreate(Creature* pCreature) case NPC_STRATHOLME_CITIZEN: case NPC_STRATHOLME_RESIDENT: + case NPC_AGIATED_STRATHOLME_CITIZEN: + case NPC_AGIATED_STRATHOLME_RESIDENT: if (m_auiEncounter[TYPE_ARTHAS_INTRO_EVENT] == DONE) pCreature->UpdateEntry(NPC_ZOMBIE); else m_luiResidentGUIDs.push_back(pCreature->GetObjectGuid()); break; - case NPC_AGIATED_STRATHOLME_CITIZEN: m_lAgiatedCitizenGUIDList.push_back(pCreature->GetObjectGuid()); break; - case NPC_AGIATED_STRATHOLME_RESIDENT: m_lAgiatedResidentGUIDList.push_back(pCreature->GetObjectGuid()); break; + + case NPC_ENRAGING_GHOUL: + case NPC_ACOLYTE: + case NPC_MASTER_NECROMANCER: + case NPC_CRYPT_FIEND: + case NPC_PATCHWORK_CONSTRUCT: + case NPC_TOMB_STALKER: + case NPC_DARK_NECROMANCER: + case NPC_BILE_GOLEM: + case NPC_DEVOURING_GHOUL: + if (pCreature->IsTemporarySummon()) + m_luiCurrentScourgeWaveGUIDs.push_back(pCreature->GetObjectGuid()); + break; } } @@ -149,22 +256,6 @@ void instance_culling_of_stratholme::OnObjectCreate(GameObject* pGo) m_mGoEntryGuidStore[pGo->GetEntry()] = pGo->GetObjectGuid(); } -void instance_culling_of_stratholme::DoChromieWhisper(int32 iEntry) -{ - if (Creature* pChromie = GetSingleCreatureFromStorage(NPC_CHROMIE_ENTRANCE)) - { - Map::PlayerList const& players = instance->GetPlayers(); - if (!players.isEmpty()) - { - for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr) - { - if (Player* pPlayer = itr->getSource()) - DoScriptText(iEntry, pChromie, pPlayer); - } - } - } -} - void instance_culling_of_stratholme::SetData(uint32 uiType, uint32 uiData) { switch (uiType) @@ -193,22 +284,30 @@ void instance_culling_of_stratholme::SetData(uint32 uiType, uint32 uiData) m_auiEncounter[uiType] = uiData; if (uiData == DONE) { - // ToDo: start the wave event + m_uiScourgeWaveCount = 0; + m_uiScourgeWaveTimer = 1000; DoUpdateZombieResidents(); + + SetData(TYPE_MEATHOOK_EVENT, IN_PROGRESS); } break; case TYPE_ARTHAS_ESCORT_EVENT: m_auiEncounter[uiType] = uiData; + if (uiData == FAIL) + m_uiArthasRespawnTimer = 10000; break; case TYPE_MEATHOOK_EVENT: m_auiEncounter[uiType] = uiData; if (uiData == DONE) + { + m_uiScourgeWaveTimer = 20000; SetData(TYPE_SALRAMM_EVENT, IN_PROGRESS); + } break; case TYPE_SALRAMM_EVENT: m_auiEncounter[uiType] = uiData; if (uiData == DONE) - DoUpdateWorldState(WORLD_STATE_WAVE, 0); // Remove WaveCounter + m_uiScourgeWaveTimer = 5000; break; case TYPE_EPOCH_EVENT: m_auiEncounter[uiType] = uiData; @@ -239,27 +338,38 @@ void instance_culling_of_stratholme::SetData(uint32 uiType, uint32 uiData) switch (uiData) { case IN_PROGRESS: - if (!m_auiEncounter[TYPE_INFINITE_CORRUPTER_TIME]) + if (!GetData(TYPE_INFINITE_CORRUPTER_TIME)) + { SetData(TYPE_INFINITE_CORRUPTER_TIME, MINUTE * 25 * IN_MILLISECONDS); - DoUpdateWorldState(WORLD_STATE_TIME, 1);// Show Timer + DoUpdateWorldState(WORLD_STATE_TIME, 1); + DoChromieWhisper(WHISPER_CHROMIE_GUARDIAN); + + // spawn the corruptor for the first time + if (Creature* pArthas = GetSingleCreatureFromStorage(NPC_ARTHAS)) + DoSpawnCorruptorIfNeeded(pArthas); + } break; case DONE: + // event completed - epilog handled by dbscript SetData(TYPE_INFINITE_CORRUPTER_TIME, 0); break; case SPECIAL: DoChromieWhisper(SAY_CHROMIE_HURRY); break; case FAIL: + // event failed - despawn the corruptor SetData(TYPE_INFINITE_CORRUPTER_TIME, 0); if (Creature* pCorrupter = GetSingleCreatureFromStorage(NPC_INFINITE_CORRUPTER)) + { if (pCorrupter->isAlive()) pCorrupter->ForcedDespawn(); + } break; } break; } - if (uiData == DONE || (uiType == TYPE_INFINITE_CORRUPTER && uiData == FAIL)) + if (uiData == DONE || uiData == FAIL || uiType == TYPE_INFINITE_CORRUPTER_TIME) { OUT_SAVE_INST_DATA; @@ -275,6 +385,39 @@ void instance_culling_of_stratholme::SetData(uint32 uiType, uint32 uiData) } } +uint32 instance_culling_of_stratholme::GetData(uint32 uiType) const +{ + if (uiType < MAX_ENCOUNTER) + return m_auiEncounter[uiType]; + + return 0; +} + +void instance_culling_of_stratholme::OnCreatureDeath(Creature* pCreature) +{ + switch (pCreature->GetEntry()) + { + case NPC_ENRAGING_GHOUL: + case NPC_ACOLYTE: + case NPC_MASTER_NECROMANCER: + case NPC_CRYPT_FIEND: + case NPC_PATCHWORK_CONSTRUCT: + case NPC_TOMB_STALKER: + case NPC_DARK_NECROMANCER: + case NPC_BILE_GOLEM: + case NPC_DEVOURING_GHOUL: + if (pCreature->IsTemporarySummon()) + { + m_luiCurrentScourgeWaveGUIDs.remove(pCreature->GetObjectGuid()); + + // send next scourge wave + if (m_luiCurrentScourgeWaveGUIDs.empty()) + m_uiScourgeWaveTimer = 2000; + } + break; + } +} + void instance_culling_of_stratholme::Load(const char* chrIn) { if (!chrIn) @@ -305,41 +448,24 @@ void instance_culling_of_stratholme::Load(const char* chrIn) OUT_LOAD_INST_DATA_COMPLETE; } -void instance_culling_of_stratholme::OnPlayerEnter(Player* pPlayer) -{ - // spawn Chromie and Arthas - if (GetData(TYPE_ARTHAS_INTRO_EVENT) == DONE) - DoSpawnArthasIfNeeded(pPlayer); - - DoSpawnChromieIfNeeded(pPlayer); - - // Show World States if needed - if (m_auiEncounter[TYPE_GRAIN_EVENT] == IN_PROGRESS || m_auiEncounter[TYPE_GRAIN_EVENT] == SPECIAL) - pPlayer->SendUpdateWorldState(WORLD_STATE_CRATES, 1); // Show Crates Counter - else - pPlayer->SendUpdateWorldState(WORLD_STATE_CRATES, 0); // Remove Crates Counter - - if (m_auiEncounter[TYPE_MEATHOOK_EVENT] == IN_PROGRESS) - pPlayer->SendUpdateWorldState(WORLD_STATE_WAVE, 1); // Add WaveCounter - else if (m_auiEncounter[TYPE_SALRAMM_EVENT] == IN_PROGRESS) - pPlayer->SendUpdateWorldState(WORLD_STATE_WAVE, 6); // Add WaveCounter - else - pPlayer->SendUpdateWorldState(WORLD_STATE_WAVE, 0); // Remove WaveCounter - - if (m_auiEncounter[TYPE_INFINITE_CORRUPTER_TIME]) - pPlayer->SendUpdateWorldState(WORLD_STATE_TIME, 1); // Show Timer - else - pPlayer->SendUpdateWorldState(WORLD_STATE_TIME, 0); // Remove Timer -} - -uint32 instance_culling_of_stratholme::GetData(uint32 uiType) const +// Function that will make Chromie to send a whisper to all players in map +void instance_culling_of_stratholme::DoChromieWhisper(int32 iEntry) { - if (uiType < MAX_ENCOUNTER) - return m_auiEncounter[uiType]; - - return 0; + if (Creature* pChromie = GetSingleCreatureFromStorage(NPC_CHROMIE_ENTRANCE)) + { + Map::PlayerList const& players = instance->GetPlayers(); + if (!players.isEmpty()) + { + for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr) + { + if (Player* pPlayer = itr->getSource()) + DoScriptText(iEntry, pChromie, pPlayer); + } + } + } } +// Function that returns the current position for Arthas event uint8 instance_culling_of_stratholme::GetInstancePosition() { if (m_auiEncounter[TYPE_MALGANIS_EVENT] == DONE) @@ -360,16 +486,12 @@ uint8 instance_culling_of_stratholme::GetInstancePosition() return 0; } +// Sorting function static bool sortFromEastToWest(Creature* pFirst, Creature* pSecond) { return pFirst && pSecond && pFirst->GetPositionY() < pSecond->GetPositionY(); } -static bool sortFromSouthToNorth(Creature* pFirst, Creature* pSecond) -{ - return pFirst && pSecond && pFirst->GetPositionX() < pSecond->GetPositionX(); -} - // return the ordered list of Grain Crate Helpers void instance_culling_of_stratholme::GetCratesBunnyOrderedList(std::list& lList) { @@ -386,44 +508,7 @@ void instance_culling_of_stratholme::GetCratesBunnyOrderedList(std::list lFootmanList; - for (GuidList::const_iterator itr = m_luiFootmanGUIDs.begin(); itr != m_luiFootmanGUIDs.end(); ++itr) - { - if (Creature* pFootman = instance->GetCreature(*itr)) - lFootmanList.push_back(pFootman); - } - - if (lFootmanList.empty()) - return NULL; - else - { - lFootmanList.sort(sortFromSouthToNorth); - return *lFootmanList.begin(); - } -} - -void instance_culling_of_stratholme::GetResidentOrderedList(std::list& lList) -{ - std::list lResidentList; - for (GuidList::const_iterator itr = m_luiResidentGUIDs.begin(); itr != m_luiResidentGUIDs.end(); ++itr) - { - if (Creature* pResident = instance->GetCreature(*itr)) - lResidentList.push_back(pResident); - } - if (lResidentList.empty()) - return; - - lResidentList.sort(sortFromSouthToNorth); - lList = lResidentList; -} - -void instance_culling_of_stratholme::ArthasJustDied() -{ - m_uiArthasRespawnTimer = 10000; // TODO, could be instant -} - +// Function that spawns Arthas on demand void instance_culling_of_stratholme::DoSpawnArthasIfNeeded(Unit* pSummoner) { if (!pSummoner) @@ -437,9 +522,12 @@ void instance_culling_of_stratholme::DoSpawnArthasIfNeeded(Unit* pSummoner) if (uiPosition && uiPosition <= MAX_ARTHAS_SPAWN_POS) pSummoner->SummonCreature(NPC_ARTHAS, m_aArthasSpawnLocs[uiPosition - 1].m_fX, m_aArthasSpawnLocs[uiPosition - 1].m_fY, m_aArthasSpawnLocs[uiPosition - 1].m_fZ, m_aArthasSpawnLocs[uiPosition - 1].m_fO, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10000, true); - // no gossip flag by default - added on demand - if (Creature* pArthas = GetSingleCreatureFromStorage(NPC_ARTHAS)) - pArthas->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); + // no gossip flag in the following positions + if (uiPosition == POS_ARTHAS_INTRO || uiPosition == POS_ARTHAS_WAVES) + { + if (Creature* pArthas = GetSingleCreatureFromStorage(NPC_ARTHAS)) + pArthas->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); + } // summon the other intro actors if (uiPosition == POS_ARTHAS_INTRO) @@ -472,8 +560,7 @@ void instance_culling_of_stratholme::DoSpawnArthasIfNeeded(Unit* pSummoner) DoSetupEntranceSoldiers(pSummoner); } -// Atm here only new Chromies are spawned - despawning depends on Mangos featuring such a thing -// The hourglass also is not yet spawned/ relocated. +// Atm here only new Chromies are spawned void instance_culling_of_stratholme::DoSpawnChromieIfNeeded(Unit* pSummoner) { if (!pSummoner) @@ -518,6 +605,23 @@ void instance_culling_of_stratholme::DoSetupEntranceSoldiers(Unit* pSummoner) pSummoner->SummonCreature(NPC_LORDAERON_FOOTMAN, m_aIntroActorsSpawnLocs[10].m_fX, m_aIntroActorsSpawnLocs[10].m_fY, m_aIntroActorsSpawnLocs[10].m_fZ, m_aIntroActorsSpawnLocs[10].m_fO, TEMPSUMMON_CORPSE_DESPAWN, 10000); } +// Function that will spawn the infinite corruptor if requires +void instance_culling_of_stratholme::DoSpawnCorruptorIfNeeded(Unit* pSummoner) +{ + if (!pSummoner) + return; + + Creature* pCorruptor = GetSingleCreatureFromStorage(NPC_INFINITE_CORRUPTER, true); + if (pCorruptor) + return; + + pSummoner->SummonCreature(NPC_TIME_RIFT, m_aHeroicEventSpawnLocs[1].m_fX, m_aHeroicEventSpawnLocs[1].m_fY, m_aHeroicEventSpawnLocs[1].m_fZ, m_aHeroicEventSpawnLocs[1].m_fO, TEMPSUMMON_DEAD_DESPAWN, 0); + pSummoner->SummonCreature(NPC_GUARDIAN_OF_TIME, m_aHeroicEventSpawnLocs[2].m_fX, m_aHeroicEventSpawnLocs[2].m_fY, m_aHeroicEventSpawnLocs[2].m_fZ, m_aHeroicEventSpawnLocs[2].m_fO, TEMPSUMMON_DEAD_DESPAWN, 0); + + if (Creature* pCorruptor = pSummoner->SummonCreature(NPC_INFINITE_CORRUPTER, m_aHeroicEventSpawnLocs[0].m_fX, m_aHeroicEventSpawnLocs[0].m_fY, m_aHeroicEventSpawnLocs[0].m_fZ, m_aHeroicEventSpawnLocs[0].m_fO, TEMPSUMMON_DEAD_DESPAWN, 0)) + pCorruptor->CastSpell(pCorruptor, SPELL_CORRUPTION_OF_TIME, false); +} + // Function that updates all the stratholme humans to zombies void instance_culling_of_stratholme::DoUpdateZombieResidents() { @@ -545,6 +649,7 @@ bool instance_culling_of_stratholme::CanGrainEventProgress(Creature* pCrate) return true; } +// Function that handles instance area trigger scripts void instance_culling_of_stratholme::DoEventAtTriggerIfCan(uint32 uiTriggerId) { switch (uiTriggerId) @@ -564,6 +669,88 @@ void instance_culling_of_stratholme::DoEventAtTriggerIfCan(uint32 uiTriggerId) } } +// Function that spawns next scourge wave +void instance_culling_of_stratholme::DoSpawnNextScourgeWave() +{ + Creature* pSummoner = GetSingleCreatureFromStorage(NPC_ARTHAS); + if (!pSummoner) + return; + + DoOrSimulateScriptTextForThisInstance(m_aScourgeWavesLocs[m_uiCurrentUndeadPos].m_iYellId, NPC_LORDAERON_CRIER); + + for (uint8 i = 0; i < MAX_SCOURGE_TYPE_PER_WAVE; ++i) + { + // get the mob entry + uint32 uiEntry = GetRandomMobOfType(uiScourgeWaveDef[m_uiScourgeWaveCount - 1][i]); + if (!uiEntry) + continue; + + float fX, fY, fZ, fO; + fO = m_aScourgeWavesLocs[m_uiCurrentUndeadPos].m_fO; + + // bosses get exact location + if (uiScourgeWaveDef[m_uiScourgeWaveCount - 1][i] == SCOURGE_TYPE_BOSS || uiScourgeWaveDef[m_uiScourgeWaveCount - 1][i] == SCOURGE_TYPE_ACOLYTES) + { + fX = m_aScourgeWavesLocs[m_uiCurrentUndeadPos].m_fX; + fY = m_aScourgeWavesLocs[m_uiCurrentUndeadPos].m_fY; + fZ = m_aScourgeWavesLocs[m_uiCurrentUndeadPos].m_fZ; + } + // random position around point + else + pSummoner->GetRandomPoint(m_aScourgeWavesLocs[m_uiCurrentUndeadPos].m_fX, m_aScourgeWavesLocs[m_uiCurrentUndeadPos].m_fY, m_aScourgeWavesLocs[m_uiCurrentUndeadPos].m_fZ, 5.0f, fX, fY, fZ); + + // special requirement for acolytes - spawn a pack of 4 + if (uiScourgeWaveDef[m_uiScourgeWaveCount - 1][i] == SCOURGE_TYPE_ACOLYTES) + { + for (uint8 j = 0; j < 4; ++j) + { + pSummoner->GetRandomPoint(m_aScourgeWavesLocs[m_uiCurrentUndeadPos].m_fX, m_aScourgeWavesLocs[m_uiCurrentUndeadPos].m_fY, m_aScourgeWavesLocs[m_uiCurrentUndeadPos].m_fZ, 5.0f, fX, fY, fZ); + pSummoner->SummonCreature(uiEntry, fX, fY, fZ, fO, TEMPSUMMON_DEAD_DESPAWN, 0); + } + } + // spawn the selected mob + else + pSummoner->SummonCreature(uiEntry, fX, fY, fZ, fO, TEMPSUMMON_DEAD_DESPAWN, 0); + } + + // start infinite curruptor event on the first wave + if (m_uiScourgeWaveCount == 1 && !instance->IsRegularDifficulty()) + SetData(TYPE_INFINITE_CORRUPTER, IN_PROGRESS); + + // get a random position that is different from the previous one for the next round + uint8 uiCurrentPos = urand(POS_FESTIVAL_LANE, POS_ELDERS_SQUARE); + + while (uiCurrentPos == m_uiCurrentUndeadPos) + uiCurrentPos = urand(POS_FESTIVAL_LANE, POS_ELDERS_SQUARE); + + m_uiCurrentUndeadPos = uiCurrentPos; +} + +// function that returns a random scourge mob of a specified type +uint32 instance_culling_of_stratholme::GetRandomMobOfType(uint8 uiType) +{ + switch (uiType) + { + case SCOURGE_TYPE_ACOLYTES: + return NPC_ACOLYTE; + case SCOURGE_TYPE_GHOUL: + return urand(0, 1) ? NPC_DEVOURING_GHOUL : NPC_ENRAGING_GHOUL; + case SCOURGE_TYPE_NECROMANCER: + return urand(0, 1) ? NPC_MASTER_NECROMANCER : NPC_DARK_NECROMANCER; + case SCOURGE_TYPE_FIEND: + return urand(0, 1) ? NPC_CRYPT_FIEND : NPC_TOMB_STALKER; + case SCOURGE_TYPE_GOLEM: + return urand(0, 1) ? NPC_BILE_GOLEM : NPC_PATCHWORK_CONSTRUCT; + case SCOURGE_TYPE_BOSS: + if (GetData(TYPE_MEATHOOK_EVENT) == IN_PROGRESS) + return NPC_MEATHOOK; + else if (GetData(TYPE_SALRAMM_EVENT) == IN_PROGRESS) + return NPC_SALRAMM_THE_FLESHCRAFTER; + } + + return 0; +} + void instance_culling_of_stratholme::Update(uint32 uiDiff) { // 25min Run - decrease time, update worldstate every ~20s @@ -613,6 +800,35 @@ void instance_culling_of_stratholme::Update(uint32 uiDiff) else m_uiArthasRespawnTimer -= uiDiff; } + + // Handle undead waves + if (m_uiScourgeWaveTimer) + { + if (m_uiScourgeWaveTimer <= uiDiff) + { + if (GetData(TYPE_SALRAMM_EVENT) == DONE) + { + DoOrSimulateScriptTextForThisInstance(SAY_MEET_TOWN_HALL, NPC_ARTHAS); + DoUpdateWorldState(WORLD_STATE_WAVE, 0); // Remove WaveCounter + + // despawn and respawn Arthas in the new location + if (Creature* pArthas = GetSingleCreatureFromStorage(NPC_ARTHAS)) + pArthas->ForcedDespawn(); + if (Player* pPlayer = GetPlayerInMap()) + DoSpawnArthasIfNeeded(pPlayer); + } + else + { + ++m_uiScourgeWaveCount; + DoUpdateWorldState(WORLD_STATE_WAVE, m_uiScourgeWaveCount); + DoSpawnNextScourgeWave(); + } + + m_uiScourgeWaveTimer = 0; + } + else + m_uiScourgeWaveTimer -= uiDiff; + } } InstanceData* GetInstanceData_instance_culling_of_stratholme(Map* pMap) diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index e8d2aa7cd..d76bed9ab 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3061" + #define SD2_REVISION_NR "3062" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 7e79e78dc..a558e2bd2 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -3421,7 +3421,13 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES (-1595000,'All soldiers of Lordaeron should immediately report to the entrance of Stratholme, and await further orders from Prince Arthas.',0,6,0,0,'lordaeron crier SAY_SOLDIERS_REPORT'), (-1595001,'Good work with the crates! Come talk to me in front of Stratholme for your next assignment!',0,4,0,0,'chromie WHISPER_CHROMIE_CRATES'), -(-1595002,'Oh, no! Adventurers, something awful has happened! A colleague of mine has been captured by the Infinite Dragonflight, and they\'re doing something horrible to him! Keeping Arthas is still your highest priority, but if you act fast you could help save a Guardian of Time!',0,4,0,0,'chromie WHISPER_CHROMIE_GUARDIAN'); +(-1595002,'Oh, no! Adventurers, something awful has happened! A colleague of mine has been captured by the Infinite Dragonflight, and they\'re doing something horrible to him! Keeping Arthas is still your highest priority, but if you act fast you could help save a Guardian of Time!',0,4,0,0,'chromie WHISPER_CHROMIE_GUARDIAN'), +(-1595003,'Scourge forces have been spotted near the Festival Lane Gate!',0,6,0,0,'lordaeron crier SAY_SCOURGE_FESTIVAL_LANE'), +(-1595004,'Scourge forces have been spotted near the King\'s Square fountain!',0,6,0,0,'lordaeron crier SAY_SCOURGE_KINGS_SQUARE'), +(-1595005,'Scourge forces have been spotted near the Market Row Gate!',0,6,0,0,'lordaeron crier SAY_SCOURGE_MARKET_ROW'), +(-1595006,'Scourge forces have been spotted near the Town Hall!',0,6,0,0,'lordaeron crier SAY_SCOURGE_TOWN_HALL'), +(-1595007,'Scourge forces have been spotted near the Elder\'s Square Gate!',0,6,0,0,'lordaeron crier SAY_SCOURGE_ELDERS_SQUARE'), +(-1595008,'Champions, meet me at the Town Hall at once. We must take the fight to Mal\'Ganis.',14297,6,0,0,'arthas SAY_MEET_TOWN_HALL'); -- -1 599 000 HALLS OF STONE INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES @@ -4976,7 +4982,8 @@ INSERT INTO gossip_texts (entry,content_default,comment) VALUES (-3595005,'So how does the Infinite Dragonflight plan to interfere?','chromie GOSSIP_ITEM_INN_3'), (-3595006,'Chromie, you and I both know what\'s going to happen in this time stream. We\'ve seen this all before. Can you just skip us ahead to all the real action?','chromie GOSSIP_ITEM_INN_SKIP'), (-3595007,'Yes, please!','chromie GOSSIP_ITEM_INN_TELEPORT'), -(-3595008,'Yes, my Prince. We are ready.','arthas GOSSIP_ITEM_CITY_GATES'); +(-3595008,'Yes, my Prince. We are ready.','arthas GOSSIP_ITEM_CITY_GATES'), +(-3595009,'We\'re only doing what is best for Lordaeron, your Highness.','arthas GOSSIP_ITEM_TOWN_HALL'); -- -3 599 000 HALLS OF STONE INSERT INTO gossip_texts (entry,content_default,comment) VALUES diff --git a/sql/updates/r3062_scriptdev2.sql b/sql/updates/r3062_scriptdev2.sql new file mode 100644 index 000000000..9c5a5170e --- /dev/null +++ b/sql/updates/r3062_scriptdev2.sql @@ -0,0 +1,11 @@ +DELETE FROM script_texts WHERE entry IN (-1595003,-1595004,-1595005,-1595006,-1595007,-1595008); +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1595003,'Scourge forces have been spotted near the Festival Lane Gate!',0,6,0,0,'lordaeron crier SAY_SCOURGE_FESTIVAL_LANE'), +(-1595004,'Scourge forces have been spotted near the King\'s Square fountain!',0,6,0,0,'lordaeron crier SAY_SCOURGE_KINGS_SQUARE'), +(-1595005,'Scourge forces have been spotted near the Market Row Gate!',0,6,0,0,'lordaeron crier SAY_SCOURGE_MARKET_ROW'), +(-1595006,'Scourge forces have been spotted near the Town Hall!',0,6,0,0,'lordaeron crier SAY_SCOURGE_TOWN_HALL'), +(-1595007,'Scourge forces have been spotted near the Elder\'s Square Gate!',0,6,0,0,'lordaeron crier SAY_SCOURGE_ELDERS_SQUARE'), +(-1595008,'Champions, meet me at the Town Hall at once. We must take the fight to Mal\'Ganis.',14297,6,0,0,'arthas SAY_MEET_TOWN_HALL'); +DELETE FROM gossip_texts WHERE entry=-3595009; +INSERT INTO gossip_texts (entry,content_default,comment) VALUES +(-3595009,'We\'re only doing what is best for Lordaeron, your Highness.','arthas GOSSIP_ITEM_TOWN_HALL'); From e564f89bd6fa4e903f8b017bd1083a8adae80b83 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sun, 2 Nov 2014 14:58:16 +0100 Subject: [PATCH 1075/1172] [3063] Remove support for deprecated VC90 [ci skip] --- VC90/90ScriptDev2.vcproj | 3015 -------------------------------------- scriptVC90.sln | 25 - sd2_revision_nr.h | 2 +- 3 files changed, 1 insertion(+), 3041 deletions(-) delete mode 100644 VC90/90ScriptDev2.vcproj delete mode 100644 scriptVC90.sln diff --git a/VC90/90ScriptDev2.vcproj b/VC90/90ScriptDev2.vcproj deleted file mode 100644 index e4eb5b32e..000000000 --- a/VC90/90ScriptDev2.vcproj +++ /dev/null @@ -1,3015 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/scriptVC90.sln b/scriptVC90.sln deleted file mode 100644 index 9507f49df..000000000 --- a/scriptVC90.sln +++ /dev/null @@ -1,25 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 10.00 -# Visual Studio 2008 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ScriptDev2", "VC90\90ScriptDev2.vcproj", "{4295C8A9-79B7-4354-8064-F05FB9CA0C96}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Debug|x64 = Debug|x64 - Release|Win32 = Release|Win32 - Release|x64 = Release|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {4295C8A9-79B7-4354-8064-F05FB9CA0C96}.Debug|Win32.ActiveCfg = Debug|Win32 - {4295C8A9-79B7-4354-8064-F05FB9CA0C96}.Debug|Win32.Build.0 = Debug|Win32 - {4295C8A9-79B7-4354-8064-F05FB9CA0C96}.Debug|x64.ActiveCfg = Debug|x64 - {4295C8A9-79B7-4354-8064-F05FB9CA0C96}.Debug|x64.Build.0 = Debug|x64 - {4295C8A9-79B7-4354-8064-F05FB9CA0C96}.Release|Win32.ActiveCfg = Release|Win32 - {4295C8A9-79B7-4354-8064-F05FB9CA0C96}.Release|Win32.Build.0 = Release|Win32 - {4295C8A9-79B7-4354-8064-F05FB9CA0C96}.Release|x64.ActiveCfg = Release|x64 - {4295C8A9-79B7-4354-8064-F05FB9CA0C96}.Release|x64.Build.0 = Release|x64 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index d76bed9ab..065a4e0c0 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3062" + #define SD2_REVISION_NR "3063" #endif // __SD2_REVISION_NR_H__ From f3dcce464927d710ce999b0473547fd64852aaa0 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Thu, 6 Nov 2014 02:40:23 +0100 Subject: [PATCH 1076/1172] [3064] Culling of Stratholme - second half of the instance implementation * Allows a complete event run and grant access to all encounters * Complete cinematics and events * Achievement and quest support included ToDo: burning city undead spawn - not yet implemented zombies spawn and zombie achievement - not yet implemented Please make sure that you update to the latest ACID and DB in order to enjoy the full experience! --- .../culling_of_stratholme.cpp | 614 +++++++++++++++++- .../culling_of_stratholme.h | 24 +- .../instance_culling_of_stratholme.cpp | 59 +- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 + sql/scriptdev2_script_full.sql | 124 +++- sql/updates/r3064_mangos.sql | 1 + sql/updates/r3064_scriptdev2.sql | 125 ++++ 8 files changed, 908 insertions(+), 42 deletions(-) create mode 100644 sql/updates/r3064_mangos.sql create mode 100644 sql/updates/r3064_scriptdev2.sql diff --git a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.cpp b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.cpp index 7c34c5544..ec11e1f5f 100644 --- a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.cpp +++ b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: culling_of_stratholme -SD%Complete: 20% -SDComment: Only intro events are supported. +SD%Complete: 70% +SDComment: Burning city undead and zombies NYI SDCategory: Culling of Stratholme EndScriptData */ @@ -294,35 +294,231 @@ bool EffectAuraDummy_spell_aura_dummy_npc_crates_dummy(const Aura* pAura, bool b enum { + // texts + SAY_ARTHAS_FOLLOW = -1595009, + SAY_CITIZEN_ARRIVED = -1595010, + SAY_ARTHAS_BEFORE_PLAGUE = -1595011, + SAY_ARTHAS_SORCERY = -1595012, + SAY_CITIZEN_NO_UNDERSTAD = -1595013, + SAY_ARTHAS_MORE_SCOURGE = -1595014, + SAY_ARTHAS_MORE_SORCERY = -1595015, + SAY_ARTHAS_MOVE_ON = -1595016, + SAY_ARTHAS_WATCH_BACK = -1595017, + SAY_ARTHAS_NOT_EASY = -1595018, + SAY_ARTHAS_PERSISTENT = -1595019, + SAY_ARTHAS_WHAT_ELSE = -1595020, + SAY_EPOCH_DARKNESS = -1595021, + SAY_ARTHAS_DO_WHAT_MUST = -1595022, + + SAY_ARTHAS_QUICK_PATH = -1595023, + SAY_ARTHAS_TAKE_A_MOMENT = -1595024, + SAY_ARTHAS_PASSAGE = -1595025, + + SAY_ARTHAS_MOVE_QUICKLY = -1595026, + SAY_ARTHAS_REST = -1595027, + SAY_ARTHAS_REST_COMPLETE = -1595028, + SAY_ARTHAS_CRUSADER_SQUARE = -1595029, + + SAY_ARTHAS_JUSTICE_DONE = -1595030, + SAY_ARTHAS_MALGANIS = -1595031, + SAY_MALGANIS_JOURNEY = -1595032, + SAY_ARTHAS_HUNT_MALGANIS = -1595033, // play music 14951 + SAY_ARTHAS_EVENT_COMPLETE = -1595034, + + SAY_ARTHAS_HALF_HP = -1595035, + SAY_ARTHAS_LOW_HP = -1595036, + SAY_ARTHAS_SLAY_1 = -1595037, + SAY_ARTHAS_SLAY_2 = -1595038, + SAY_ARTHAS_SLAY_3 = -1595039, + SAY_ARTHAS_DEATH = -1595040, + + MUSIC_ID_EVENT_COMPLETE = 14951, + + // gossips GOSSIP_ITEM_CITY_GATES = -3595008, - GOSSIP_ITEM_TOWN_HALL = -3595009, + GOSSIP_ITEM_TOWN_HALL_1 = -3595009, + GOSSIP_ITEM_TOWN_HALL_2 = -3595010, + GOSSIP_ITEM_EPOCH = -3595011, + GOSSIP_ITEM_ESCORT = -3595012, + GOSSIP_ITEM_DREADLORD = -3595013, TEXT_ID_CITY_GATES = 13076, - TEXT_ID_TOWN_HALL = 13125, + TEXT_ID_TOWN_HALL_1 = 13125, + TEXT_ID_TOWN_HALL_2 = 13126, + TEXT_ID_EPOCH = 13177, + TEXT_ID_ESCORT = 13179, + TEXT_ID_DREADLORD = 13287, + // spells SPELL_HOLY_LIGHT = 52444, SPELL_EXORCISM = 52445, SPELL_EXORCISM_H = 58822, SPELL_DEVOTION_AURA = 52442, + SPELL_CRUSADER_STRIKE = 50773, // dummy used on citizens + + SPELL_MALGANIS_KILL_CREDIT = 58124, + SPELL_MALGANIS_ACHIEVEMENT = 58630, // server side spell + + SPELL_TRANSFORM = 33133, + SPELL_SHADOWSTEP_COSMETIC = 51908, + + // FACTION_ARTHAS_1 = 2076, // default faction + FACTION_ARTHAS_2 = 2077, // burning city + // FACTION_ARTHAS_3 = 2079, // use unk + + POINT_ID_INTRO_COMPLETE = 31, // intro completion WP - handled by dbscript + POINT_ID_ESCORT_CITY = 47, // escort point before burning city + POINT_ID_MARKET_ROW = 70, // escort point before Malganis +}; + +static const DialogueEntry aArthasDialogue[] = +{ + {NPC_TOWNHALL_CITIZEN, 0, 2000}, + {TEXT_ID_TOWN_HALL_1, 0, 0}, + // transform citizens + {SPELL_CRUSADER_STRIKE, 0, 2000}, + {NPC_TOWNHALL_RESIDENT, 0, 1000}, + {SAY_ARTHAS_SORCERY, NPC_ARTHAS, 3000}, + {TEXT_ID_TOWN_HALL_2, 0, 1000}, + {NPC_INFINITE_HUNTER, 0, 1000}, + {NPC_INFINITE_AGENT, 0, 1000}, + {NPC_INFINITE_ADVERSARY, 0, 0}, + // start Epoch fight + {SAY_ARTHAS_WHAT_ELSE, NPC_ARTHAS, 5000}, + {SAY_EPOCH_DARKNESS, NPC_LORD_EPOCH, 13000}, + {SAY_ARTHAS_DO_WHAT_MUST, NPC_ARTHAS, 5000}, + {NPC_ARTHAS, 0, 2000}, + {NPC_LORD_EPOCH, 0, 0}, + // open bookcase door + {SAY_ARTHAS_TAKE_A_MOMENT, NPC_ARTHAS, 2000}, + {GO_DOOR_BOOKCASE, 0, 0}, + // reach crusader square + {SAY_ARTHAS_CRUSADER_SQUARE, NPC_ARTHAS, 10000}, + {SPELL_TRANSFORM, 0, 0}, + // start Malganis fight + {SAY_ARTHAS_MALGANIS, NPC_ARTHAS, 5000}, + {NPC_MALGANIS, 0, 0}, + // Malganis epilog + {SAY_MALGANIS_JOURNEY, NPC_MALGANIS, 18000}, + {SAY_ARTHAS_HUNT_MALGANIS, NPC_ARTHAS, 5000}, + {TEXT_ID_DREADLORD, 0, 2000}, + {SAY_ARTHAS_EVENT_COMPLETE, NPC_ARTHAS, 0}, + {0, 0, 0}, }; -struct npc_arthasAI : public npc_escortAI +struct npc_arthasAI : public npc_escortAI, private DialogueHelper { - npc_arthasAI(Creature* pCreature) : npc_escortAI(pCreature) + npc_arthasAI(Creature* pCreature) : npc_escortAI(pCreature), + DialogueHelper(aArthasDialogue) { m_pInstance = (instance_culling_of_stratholme*)pCreature->GetInstanceData(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); + InitializeDialogueHelper(m_pInstance); Reset(); } instance_culling_of_stratholme* m_pInstance; - void Reset() override { } + bool m_bIsRegularMode; + + bool m_bYell50Pct; + bool m_bYell20Pct; + + uint32 m_uiHolyLightTimer; + uint32 m_uiExorcismTimer; + + ObjectGuid m_firstCitizenGuid; + ObjectGuid m_secondCitizenGuid; + ObjectGuid m_thirdCitizenGuid; + + GuidList m_lSummonedGuidsList; + + void Reset() override + { + m_uiExorcismTimer = urand(5000, 10000); + m_uiHolyLightTimer = urand(5000, 10000); + m_bYell50Pct = false; + m_bYell20Pct = false; + } + + void Aggro(Unit* /*pWho*/) override + { + DoCastSpellIfCan(m_creature, SPELL_DEVOTION_AURA); + } + + void KilledUnit(Unit* /*pVictim*/) override + { + switch (urand(0, 2)) + { + case 0: DoScriptText(SAY_ARTHAS_SLAY_1, m_creature); break; + case 1: DoScriptText(SAY_ARTHAS_SLAY_2, m_creature); break; + case 2: DoScriptText(SAY_ARTHAS_SLAY_3, m_creature); break; + } + } + + void JustDied(Unit* /*pKiller*/) override + { + DoScriptText(SAY_ARTHAS_DEATH, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_ARTHAS_ESCORT_EVENT, FAIL); + } - void ReceiveAIEvent(AIEventType eventType, Creature* /*pSender*/, Unit* pInvoker, uint32 uiMiscValue) override + void ReceiveAIEvent(AIEventType eventType, Creature* pSender, Unit* pInvoker, uint32 uiMiscValue) override { - if (eventType == AI_EVENT_START_ESCORT && pInvoker->GetTypeId() == TYPEID_PLAYER) + // on Malganis encounter finished -> evade + if (pSender->GetEntry() == NPC_MALGANIS && eventType == AI_EVENT_CUSTOM_EVENTAI_B) + { + EnterEvadeMode(); + SetEscortPaused(false); + return; + } + + if (pInvoker->GetTypeId() != TYPEID_PLAYER) + return; + + if (eventType == AI_EVENT_START_ESCORT) { - // ToDo: start escort + DoScriptText(SAY_ARTHAS_FOLLOW, m_creature); + Start(true, (Player*)pInvoker); + } + else if (eventType == AI_EVENT_CUSTOM_A) + { + DoScriptText(SAY_ARTHAS_QUICK_PATH, m_creature); + SetEscortPaused(false); + } + else if (eventType == AI_EVENT_START_ESCORT_B) + { + // start and set WP + Start(true, (Player*)pInvoker); + SetEscortPaused(true); + SetCurrentWaypoint(POINT_ID_ESCORT_CITY); + SetEscortPaused(false); + + DoScriptText(SAY_ARTHAS_MOVE_QUICKLY, m_creature); + m_creature->SetFactionTemporary(FACTION_ARTHAS_2, TEMPFACTION_RESTORE_REACH_HOME); + + // ToDo: spawn scourge mobs in the burning stratholme + } + else if (eventType == AI_EVENT_CUSTOM_B) + { + // resume escort or start on point if start from reset + if (HasEscortState(STATE_ESCORT_PAUSED)) + SetEscortPaused(false); + else + { + Start(true, (Player*)pInvoker); + SetEscortPaused(true); + SetCurrentWaypoint(POINT_ID_MARKET_ROW); + SetEscortPaused(false); + } + + DoScriptText(SAY_ARTHAS_JUSTICE_DONE, m_creature); + m_creature->SetFactionTemporary(FACTION_ARTHAS_2, TEMPFACTION_RESTORE_REACH_HOME); + + // spawn Malganis if required + if (m_pInstance && !m_pInstance->GetSingleCreatureFromStorage(NPC_MALGANIS, true)) + m_creature->SummonCreature(NPC_MALGANIS, 2296.862F, 1501.015F, 128.445F, 5.13f, TEMPSUMMON_DEAD_DESPAWN, 0); } } @@ -331,24 +527,344 @@ struct npc_arthasAI : public npc_escortAI if (uiType == WAYPOINT_MOTION_TYPE) { // set the intro event as done and start the undead waves - if (uiPointId == 31 && m_pInstance) + if (uiPointId == POINT_ID_INTRO_COMPLETE && m_pInstance) m_pInstance->SetData(TYPE_ARTHAS_INTRO_EVENT, DONE); } else npc_escortAI::MovementInform(uiType, uiPointId); } + void JustSummoned(Creature* pSummoned) override + { + switch (pSummoned->GetEntry()) + { + case NPC_INFINITE_ADVERSARY: + case NPC_INFINITE_AGENT: + case NPC_INFINITE_HUNTER: + pSummoned->AI()->AttackStart(m_creature); + // no break; + case NPC_TOWNHALL_CITIZEN: + case NPC_TOWNHALL_RESIDENT: + m_lSummonedGuidsList.push_back(pSummoned->GetObjectGuid()); + break; + case NPC_LORD_EPOCH: + pSummoned->GetMotionMaster()->MovePoint(0, 2450.874f, 1113.122f, 149.008f); + break; + } + } + + void SummonedCreatureJustDied(Creature* pSummoned) override + { + switch (pSummoned->GetEntry()) + { + case NPC_INFINITE_ADVERSARY: + case NPC_INFINITE_AGENT: + case NPC_INFINITE_HUNTER: + m_lSummonedGuidsList.remove(pSummoned->GetObjectGuid()); + + if (m_lSummonedGuidsList.empty()) + SetEscortPaused(false); + break; + case NPC_LORD_EPOCH: + m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); + break; + } + } + void WaypointReached(uint32 uiPointId) override { - // ToDo: + switch (uiPointId) + { + // spawn citizens - ground floor + case 1: + if (Creature* pCitizen = m_creature->SummonCreature(NPC_TOWNHALL_CITIZEN, 2401.265f, 1202.789f, 134.103f, 1.466f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 60000)) + m_firstCitizenGuid = pCitizen->GetObjectGuid(); + if (Creature* pCitizen = m_creature->SummonCreature(NPC_TOWNHALL_RESIDENT, 2402.654f, 1205.786f, 134.122f, 2.89f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 60000)) + m_secondCitizenGuid = pCitizen->GetObjectGuid(); + if (Creature* pCitizen = m_creature->SummonCreature(NPC_TOWNHALL_CITIZEN, 2398.715f, 1207.334f, 134.122f, 5.27f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 60000)) + m_thirdCitizenGuid = pCitizen->GetObjectGuid(); + break; + case 3: + StartNextDialogueText(NPC_TOWNHALL_CITIZEN); + break; + case 4: + DoScriptText(SAY_ARTHAS_BEFORE_PLAGUE, m_creature); + SetRun(false); + break; + case 5: + SetEscortPaused(true); + StartNextDialogueText(SPELL_CRUSADER_STRIKE); + break; + case 6: + m_creature->SetFacingTo(0.30f); + break; + case 7: + DoScriptText(SAY_ARTHAS_MORE_SCOURGE, m_creature); + SetRun(); + break; + + // spawn second wave - on the first floor + case 13: + DoScriptText(SAY_ARTHAS_MORE_SORCERY, m_creature); + SetRun(false); + m_creature->SummonCreature(NPC_TIME_RIFT, 2433.357f, 1192.168f, 148.159f, 3.00f, TEMPSUMMON_TIMED_DESPAWN, 5000); + break; + case 14: + m_creature->SummonCreature(NPC_INFINITE_AGENT, 2433.041f, 1191.158f, 148.128f, 4.99f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 60000); + m_creature->SummonCreature(NPC_INFINITE_HUNTER, 2433.176f, 1193.429f, 148.114f, 1.21f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 60000); + m_creature->SummonCreature(NPC_INFINITE_AGENT, 2433.396f, 1192.912f, 148.123f, 0.04f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 60000); + m_creature->SummonCreature(NPC_INFINITE_ADVERSARY, 2433.626f, 1192.069f, 148.117f, 5.48f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 60000); + SetEscortPaused(true); + break; + case 15: + m_creature->SetFacingTo(2.94f); + break; + case 16: + DoScriptText(SAY_ARTHAS_MOVE_ON, m_creature); + SetRun(); + break; + + // spawn third wave - ambush + case 21: + DoScriptText(SAY_ARTHAS_WATCH_BACK, m_creature); + + m_creature->SummonCreature(NPC_INFINITE_HUNTER, 2404.375f, 1179.395f, 148.138f, 5.14f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 60000); + m_creature->SummonCreature(NPC_INFINITE_AGENT, 2403.785f, 1179.004f, 148.138f, 4.58f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 60000); + m_creature->SummonCreature(NPC_INFINITE_HUNTER, 2413.933f, 1136.93f, 148.111f, 2.40f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 60000); + m_creature->SummonCreature(NPC_INFINITE_ADVERSARY, 2414.964f, 1136.857f, 148.088f, 0.90f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 60000); + m_creature->SummonCreature(NPC_TIME_RIFT, 2404.311f, 1178.306f, 148.158f, 1.60f, TEMPSUMMON_TIMED_DESPAWN, 5000); + m_creature->SummonCreature(NPC_TIME_RIFT, 2414.041f, 1136.068f, 148.159f, 2.23f, TEMPSUMMON_TIMED_DESPAWN, 5000); + SetEscortPaused(true); + break; + case 22: + m_creature->SetFacingTo(1.85f); + break; + case 23: + DoScriptText(SAY_ARTHAS_NOT_EASY, m_creature); + break; + + // spawn forth wave - main hall + case 26: + DoScriptText(SAY_ARTHAS_PERSISTENT, m_creature); + + m_creature->SummonCreature(NPC_INFINITE_HUNTER, 2431.417f, 1105.167f, 148.075f, 1.26f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 60000); + m_creature->SummonCreature(NPC_INFINITE_AGENT, 2438.808f, 1113.769f, 148.075f, 3.11f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 60000); + m_creature->SummonCreature(NPC_INFINITE_ADVERSARY, 2440.917f, 1116.085f, 148.080f, 2.18f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 60000); + m_creature->SummonCreature(NPC_INFINITE_ADVERSARY, 2428.905f, 1102.929f, 148.125f, 1.97f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 60000); + m_creature->SummonCreature(NPC_TIME_RIFT, 2429.296f, 1102.007f, 148.159f, 6.21f, TEMPSUMMON_TIMED_DESPAWN, 5000); + m_creature->SummonCreature(NPC_TIME_RIFT, 2440.057f, 1114.226f, 148.159f, 6.10f, TEMPSUMMON_TIMED_DESPAWN, 5000); + SetEscortPaused(true); + break; + case 27: + m_creature->SetFacingTo(5.98f); + break; + case 28: + StartNextDialogueText(SAY_ARTHAS_WHAT_ELSE); + SetEscortPaused(true); + break; + + // open passage + case 32: + StartNextDialogueText(SAY_ARTHAS_TAKE_A_MOMENT); + break; + case 33: + DoScriptText(SAY_ARTHAS_PASSAGE, m_creature); + break; + + // townhall escort complete + case 46: + if (m_pInstance) + m_pInstance->SetData(TYPE_ARTHAS_TOWNHALL_EVENT, DONE); + break; + + // burning stratholme + case 57: + DoScriptText(SAY_ARTHAS_REST, m_creature); + m_creature->SetFacingTo(5.04f); + break; + case 58: + DoScriptText(SAY_ARTHAS_REST_COMPLETE, m_creature); + break; + case 69: + StartNextDialogueText(SAY_ARTHAS_CRUSADER_SQUARE); + SetEscortPaused(true); + if (m_pInstance) + m_pInstance->SetData(TYPE_ARTHAS_ESCORT_EVENT, DONE); + break; + + // malganis fight + case 74: + StartNextDialogueText(SAY_ARTHAS_MALGANIS); + SetEscortPaused(true); + break; + + // event epilog + case 75: + StartNextDialogueText(SAY_MALGANIS_JOURNEY); + break; + case 76: + SetRun(false); + break; + } + } + + void JustDidDialogueStep(int32 iEntry) override + { + switch (iEntry) + { + // townhall entrance dialogue + case NPC_TOWNHALL_CITIZEN: + if (Creature* pCitizen = m_creature->GetMap()->GetCreature(m_firstCitizenGuid)) + pCitizen->SetFacingToObject(m_creature); + if (Creature* pCitizen = m_creature->GetMap()->GetCreature(m_secondCitizenGuid)) + pCitizen->SetFacingToObject(m_creature); + if (Creature* pCitizen = m_creature->GetMap()->GetCreature(m_thirdCitizenGuid)) + pCitizen->SetFacingToObject(m_creature); + break; + case TEXT_ID_TOWN_HALL_1: + if (Creature* pCitizen = m_creature->GetMap()->GetCreature(m_thirdCitizenGuid)) + DoScriptText(SAY_CITIZEN_ARRIVED, pCitizen); + break; + case SPELL_CRUSADER_STRIKE: + if (Creature* pCitizen = m_creature->GetMap()->GetCreature(m_thirdCitizenGuid)) + DoCastSpellIfCan(pCitizen, SPELL_CRUSADER_STRIKE); + break; + case NPC_TOWNHALL_RESIDENT: + if (Creature* pCitizen = m_creature->GetMap()->GetCreature(m_thirdCitizenGuid)) + pCitizen->HandleEmote(EMOTE_ONESHOT_LAUGH); + break; + case TEXT_ID_TOWN_HALL_2: + if (Creature* pCitizen = m_creature->GetMap()->GetCreature(m_thirdCitizenGuid)) + DoScriptText(SAY_CITIZEN_NO_UNDERSTAD, pCitizen); + break; + case NPC_INFINITE_HUNTER: + if (Creature* pCitizen = m_creature->GetMap()->GetCreature(m_firstCitizenGuid)) + { + pCitizen->CastSpell(pCitizen, SPELL_TRANSFORM, true); + pCitizen->UpdateEntry(NPC_INFINITE_HUNTER); + } + break; + case NPC_INFINITE_AGENT: + if (Creature* pCitizen = m_creature->GetMap()->GetCreature(m_secondCitizenGuid)) + { + pCitizen->CastSpell(pCitizen, SPELL_TRANSFORM, true); + pCitizen->UpdateEntry(NPC_INFINITE_AGENT); + } + break; + case NPC_INFINITE_ADVERSARY: + if (Creature* pCitizen = m_creature->GetMap()->GetCreature(m_thirdCitizenGuid)) + { + pCitizen->CastSpell(pCitizen, SPELL_TRANSFORM, true); + pCitizen->UpdateEntry(NPC_INFINITE_ADVERSARY); + } + break; + + // epoch event dialogue + case SAY_ARTHAS_WHAT_ELSE: + m_creature->SummonCreature(NPC_LORD_EPOCH, 2456.396f, 1113.969f, 150.032f, 3.15f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 60000); + m_creature->SummonCreature(NPC_TIME_RIFT_BIG, 2456.058f, 1113.838f, 150.091f, 1.74f, TEMPSUMMON_TIMED_DESPAWN, 5000); + break; + case NPC_ARTHAS: + m_creature->HandleEmote(EMOTE_ONESHOT_POINT_NOSHEATHE); + break; + case NPC_LORD_EPOCH: + if (!m_pInstance) + return; + + if (Creature* pEpoch = m_pInstance->GetSingleCreatureFromStorage(NPC_LORD_EPOCH)) + { + pEpoch->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PASSIVE | UNIT_FLAG_OOC_NOT_ATTACKABLE); + pEpoch->AI()->AttackStart(m_creature); + } + break; + + // bookcase passage delay + case GO_DOOR_BOOKCASE: + if (m_pInstance) + m_pInstance->DoUseDoorOrButton(GO_DOOR_BOOKCASE); + break; + + // burning city complete delay + case SPELL_TRANSFORM: + m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); + break; + + // malganis attack + case NPC_MALGANIS: + if (!m_pInstance) + return; + + if (Creature* pMalganis = m_pInstance->GetSingleCreatureFromStorage(NPC_MALGANIS)) + { + pMalganis->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PASSIVE | UNIT_FLAG_OOC_NOT_ATTACKABLE); + pMalganis->AI()->AttackStart(m_creature); + } + break; + + // malganis event complete + case SAY_ARTHAS_HUNT_MALGANIS: + m_creature->PlayMusic(MUSIC_ID_EVENT_COMPLETE); + + if (!m_pInstance) + return; + + if (Creature* pMalganis = m_pInstance->GetSingleCreatureFromStorage(NPC_MALGANIS)) + { + pMalganis->CastSpell(pMalganis, SPELL_SHADOWSTEP_COSMETIC, true); + pMalganis->CastSpell(pMalganis, SPELL_MALGANIS_ACHIEVEMENT, true); + pMalganis->ForcedDespawn(1000); + } + break; + case TEXT_ID_DREADLORD: + m_creature->HandleEmote(EMOTE_ONESHOT_EXCLAMATION); + break; + case SAY_ARTHAS_EVENT_COMPLETE: + m_creature->SetFacingTo(5.13f); + DoCastSpellIfCan(m_creature, SPELL_MALGANIS_KILL_CREDIT, CAST_TRIGGERED); + + if (m_pInstance) + m_pInstance->SetData(TYPE_MALGANIS_EVENT, DONE); + break; + } } void UpdateEscortAI(const uint32 uiDiff) override { + DialogueUpdate(uiDiff); + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - // ToDo: add spells + if (m_uiExorcismTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), m_bIsRegularMode ? SPELL_EXORCISM : SPELL_EXORCISM_H) == CAST_OK) + m_uiExorcismTimer = urand(9000, 13000); + } + else + m_uiExorcismTimer -= uiDiff; + + if (m_uiHolyLightTimer < uiDiff) + { + if (Unit* pTarget = DoSelectLowestHpFriendly(40.0f)) + { + if (DoCastSpellIfCan(pTarget, SPELL_HOLY_LIGHT) == CAST_OK) + m_uiHolyLightTimer = urand(18000, 25000); + } + } + else + m_uiHolyLightTimer -= uiDiff; + + if (!m_bYell50Pct && m_creature->GetHealthPercent() < 50.0f) + { + DoScriptText(SAY_ARTHAS_HALF_HP, m_creature); + m_bYell50Pct = true; + } + + if (!m_bYell20Pct && m_creature->GetHealthPercent() < 20.0f) + { + DoScriptText(SAY_ARTHAS_LOW_HP, m_creature); + m_bYell20Pct = true; + } DoMeleeAttackIfReady(); } @@ -363,15 +879,35 @@ bool GossipHello_npc_arthas(Player* pPlayer, Creature* pCreature) { if (instance_culling_of_stratholme* pInstance = (instance_culling_of_stratholme*)pCreature->GetInstanceData()) { + // city gate gossip if (pInstance->GetData(TYPE_ARTHAS_INTRO_EVENT) == IN_PROGRESS) { pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_CITY_GATES, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); pPlayer->SEND_GOSSIP_MENU(TEXT_ID_CITY_GATES, pCreature->GetObjectGuid()); } + // town hall entrance gossip else if (pInstance->GetData(TYPE_SALRAMM_EVENT) == DONE && pInstance->GetData(TYPE_EPOCH_EVENT) != DONE) { - pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_TOWN_HALL, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); - pPlayer->SEND_GOSSIP_MENU(TEXT_ID_TOWN_HALL, pCreature->GetObjectGuid()); + pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_TOWN_HALL_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); + pPlayer->SEND_GOSSIP_MENU(TEXT_ID_TOWN_HALL_1, pCreature->GetObjectGuid()); + } + // town hall epoch gossip + else if (pInstance->GetData(TYPE_EPOCH_EVENT) == DONE && pInstance->GetData(TYPE_ARTHAS_TOWNHALL_EVENT) != DONE) + { + pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_EPOCH, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4); + pPlayer->SEND_GOSSIP_MENU(TEXT_ID_EPOCH, pCreature->GetObjectGuid()); + } + // burning city gossip + else if (pInstance->GetData(TYPE_ARTHAS_TOWNHALL_EVENT) == DONE && pInstance->GetData(TYPE_ARTHAS_ESCORT_EVENT) != DONE) + { + pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_ESCORT, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 5); + pPlayer->SEND_GOSSIP_MENU(TEXT_ID_ESCORT, pCreature->GetObjectGuid()); + } + // crusader square gossip + else if (pInstance->GetData(TYPE_ARTHAS_ESCORT_EVENT) == DONE && pInstance->GetData(TYPE_MALGANIS_EVENT) != DONE) + { + pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_DREADLORD, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 6); + pPlayer->SEND_GOSSIP_MENU(TEXT_ID_DREADLORD, pCreature->GetObjectGuid()); } } return true; @@ -381,21 +917,58 @@ bool GossipSelect_npc_arthas(Player* pPlayer, Creature* pCreature, uint32 /*send { switch (uiAction) { - case GOSSIP_ACTION_INFO_DEF+1: - // resume WP movement - rest is handled by DB + case GOSSIP_ACTION_INFO_DEF+1: // resume WP movement - rest is handled by DB pCreature->clearUnitState(UNIT_STAT_WAYPOINT_PAUSED); pCreature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); pPlayer->CLOSE_GOSSIP_MENU(); break; case GOSSIP_ACTION_INFO_DEF+2: - // start initial escort event + pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_TOWN_HALL_2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); + pPlayer->SEND_GOSSIP_MENU(TEXT_ID_TOWN_HALL_2, pCreature->GetObjectGuid()); + break; + case GOSSIP_ACTION_INFO_DEF+3: // start initial town hall escort event pCreature->AI()->SendAIEvent(AI_EVENT_START_ESCORT, pPlayer, pCreature); + pCreature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); + pPlayer->CLOSE_GOSSIP_MENU(); + break; + case GOSSIP_ACTION_INFO_DEF+4: // continue escort after Epoch + pCreature->AI()->SendAIEvent(AI_EVENT_CUSTOM_A, pPlayer, pCreature); + pCreature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); + pPlayer->CLOSE_GOSSIP_MENU(); + break; + case GOSSIP_ACTION_INFO_DEF+5: // start burning city event + pCreature->AI()->SendAIEvent(AI_EVENT_START_ESCORT_B, pPlayer, pCreature); + pCreature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); + pPlayer->CLOSE_GOSSIP_MENU(); + break; + case GOSSIP_ACTION_INFO_DEF+6: // start Malganis event + pCreature->AI()->SendAIEvent(AI_EVENT_CUSTOM_B, pPlayer, pCreature); + pCreature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); pPlayer->CLOSE_GOSSIP_MENU(); break; } return true; } +/* ************* +** npc_spell_dummy_crusader_strike +************* */ + +bool EffectDummyCreature_npc_spell_dummy_crusader_strike(Unit* /*pCaster*/, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget, ObjectGuid /*originalCasterGuid*/) +{ + // always check spellid and effectindex + if (uiSpellId == SPELL_CRUSADER_STRIKE && uiEffIndex == EFFECT_INDEX_0) + { + // only apply this for certain citizens + if (pCreatureTarget->GetEntry() == NPC_STRATHOLME_RESIDENT || pCreatureTarget->GetEntry() == NPC_STRATHOLME_CITIZEN) + pCreatureTarget->DealDamage(pCreatureTarget, pCreatureTarget->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NONE, NULL, false); + // always return true when we are handling this spell and effect + return true; + } + + return false; +} + void AddSC_culling_of_stratholme() { Script* pNewScript; @@ -418,4 +991,9 @@ void AddSC_culling_of_stratholme() pNewScript->pGossipHello = &GossipHello_npc_arthas; pNewScript->pGossipSelect = &GossipSelect_npc_arthas; pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_spell_dummy_crusader_strike"; + pNewScript->pEffectDummyNPC = &EffectDummyCreature_npc_spell_dummy_crusader_strike; + pNewScript->RegisterSelf(); } diff --git a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.h b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.h index 9894e50ef..2a410ea2a 100644 --- a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.h +++ b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.h @@ -7,7 +7,7 @@ enum { - MAX_ENCOUNTER = 9, + MAX_ENCOUNTER = 10, MAX_SCOURGE_WAVES = 10, MAX_SCOURGE_TYPE_PER_WAVE = 4, @@ -15,11 +15,12 @@ enum TYPE_ARTHAS_INTRO_EVENT = 1, // Arhas Speech and Walk to Gates and short intro with MalGanis TYPE_MEATHOOK_EVENT = 2, // Waves 1-5 TYPE_SALRAMM_EVENT = 3, // Waves 6-10 - TYPE_EPOCH_EVENT = 4, // Townhall Event, Boss Killed - TYPE_ARTHAS_ESCORT_EVENT = 5, // Townhall to Malganis - TYPE_MALGANIS_EVENT = 6, // Malganis - TYPE_INFINITE_CORRUPTER_TIME = 7, // Time for 25min Timer - TYPE_INFINITE_CORRUPTER = 8, + TYPE_ARTHAS_TOWNHALL_EVENT = 4, // Townhall escort event + TYPE_EPOCH_EVENT = 5, // Townhall Event, Boss Killed + TYPE_ARTHAS_ESCORT_EVENT = 6, // Burning city escort event + TYPE_MALGANIS_EVENT = 7, // Malganis + TYPE_INFINITE_CORRUPTER_TIME = 8, // Time for 25min Timer + TYPE_INFINITE_CORRUPTER = 9, // Infinite corruptor event // Main Encounter NPCs NPC_CHROMIE_INN = 26527, @@ -32,8 +33,8 @@ enum // Dungeon bosses NPC_MEATHOOK = 26529, NPC_SALRAMM_THE_FLESHCRAFTER = 26530, - // NPC_CHRONO_LORD_EPOCH = 26532, - // NPC_MALGANIS = 26533, + NPC_LORD_EPOCH = 26532, + NPC_MALGANIS = 26533, // Inn Event related NPC NPC_MICHAEL_BELFAST = 30571, @@ -98,14 +99,16 @@ enum NPC_INFINITE_ADVERSARY = 27742, NPC_INFINITE_AGENT = 27744, NPC_INFINITE_HUNTER = 27743, + NPC_TIME_RIFT = 28409, + NPC_TIME_RIFT_BIG = 28439, // Heroic event npcs NPC_INFINITE_CORRUPTER = 32273, - NPC_TIME_RIFT = 28409, NPC_GUARDIAN_OF_TIME = 32281, // Gameobjects GO_DOOR_BOOKCASE = 188686, + GO_CITY_ENTRANCE_GATE = 191788, GO_DARK_RUNED_CHEST = 190663, GO_DARK_RUNED_CHEST_H = 193597, @@ -133,6 +136,9 @@ enum 5253 Angelicas boutique 5256 townhall 5291 Inn */ + + // Achievements + ACHIEV_CRIT_ZOMBIEFEST = 7180, // achiev 1872 }; enum eInstancePosition diff --git a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/instance_culling_of_stratholme.cpp b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/instance_culling_of_stratholme.cpp index d6afbfaf2..ef92e18cd 100644 --- a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/instance_culling_of_stratholme.cpp +++ b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/instance_culling_of_stratholme.cpp @@ -30,7 +30,6 @@ enum MAX_GRAIN_CRATES = 5, MAX_SCOURGE_SPAWN_POS = 5, - SAY_CHROMIE_HURRY = -1000000, // TODO SAY_SCOURGE_FESTIVAL_LANE = -1595003, SAY_SCOURGE_KINGS_SQUARE = -1595004, SAY_SCOURGE_MARKET_ROW = -1595005, @@ -38,9 +37,11 @@ enum SAY_SCOURGE_ELDERS_SQUARE = -1595007, SAY_MEET_TOWN_HALL = -1595008, + SAY_CORRUPTOR_DESPAWN = -1595041, WHISPER_CHROMIE_CRATES = -1595001, WHISPER_CHROMIE_GUARDIAN = -1595002, + WHISPER_CHROMIE_HURRY = -1000000, // TODO SPELL_CORRUPTION_OF_TIME = 60422, // triggers 60451 }; @@ -55,8 +56,8 @@ static sSpawnLocation m_aArthasSpawnLocs[] = // need tuning {1957.13f, 1287.43f, 145.65f, 2.96f}, // bridge {2091.99f, 1277.25f, 140.47f, 0.43f}, // city entrance {2366.24f, 1195.25f, 132.04f, 3.15f}, // town hall - {2534.46f, 1125.99f, 130.75f, 0.27f}, - {2363.77f, 1406.31f, 128.64f, 3.23f} + {2534.98f, 1126.16f, 130.86f, 2.84f}, // burning stratholme + {2363.44f, 1404.90f, 128.64f, 2.77f}, // crusader square gate }; static sSpawnLocation m_aIntroActorsSpawnLocs[] = @@ -201,6 +202,8 @@ void instance_culling_of_stratholme::OnCreatureCreate(Creature* pCreature) case NPC_PATRICIA_O_REILLY: case NPC_LORDAERON_CRIER: case NPC_INFINITE_CORRUPTER: + case NPC_LORD_EPOCH: + case NPC_MALGANIS: m_mNpcEntryGuidStore[pCreature->GetEntry()] = pCreature->GetObjectGuid(); break; @@ -248,6 +251,7 @@ void instance_culling_of_stratholme::OnObjectCreate(GameObject* pGo) break; case GO_DARK_RUNED_CHEST: case GO_DARK_RUNED_CHEST_H: + case GO_CITY_ENTRANCE_GATE: break; default: @@ -291,11 +295,6 @@ void instance_culling_of_stratholme::SetData(uint32 uiType, uint32 uiData) SetData(TYPE_MEATHOOK_EVENT, IN_PROGRESS); } break; - case TYPE_ARTHAS_ESCORT_EVENT: - m_auiEncounter[uiType] = uiData; - if (uiData == FAIL) - m_uiArthasRespawnTimer = 10000; - break; case TYPE_MEATHOOK_EVENT: m_auiEncounter[uiType] = uiData; if (uiData == DONE) @@ -309,13 +308,41 @@ void instance_culling_of_stratholme::SetData(uint32 uiType, uint32 uiData) if (uiData == DONE) m_uiScourgeWaveTimer = 5000; break; + case TYPE_ARTHAS_TOWNHALL_EVENT: + m_auiEncounter[uiType] = uiData; + if (uiData == DONE) + { + // despawn arthas and spawn him in the next point + if (Creature* pArthas = GetSingleCreatureFromStorage(NPC_ARTHAS)) + pArthas->ForcedDespawn(); + + if (Player* pPlayer = GetPlayerInMap()) + DoSpawnArthasIfNeeded(pPlayer); + } + break; case TYPE_EPOCH_EVENT: m_auiEncounter[uiType] = uiData; break; + case TYPE_ARTHAS_ESCORT_EVENT: + // use fail in order to respawn Arthas + if (uiData == FAIL) + { + m_uiArthasRespawnTimer = 10000; + + // despawn the bosses if Arthas dies in order to avoid exploits + if (Creature* pEpoch = GetSingleCreatureFromStorage(NPC_LORD_EPOCH, true)) + pEpoch->ForcedDespawn(); + if (Creature* pMalganis = GetSingleCreatureFromStorage(NPC_MALGANIS, true)) + pMalganis->ForcedDespawn(); + } + else + m_auiEncounter[uiType] = uiData; + break; case TYPE_MALGANIS_EVENT: m_auiEncounter[uiType] = uiData; if (uiData == DONE) { + DoUseDoorOrButton(GO_CITY_ENTRANCE_GATE); DoToggleGameObjectFlags(instance->IsRegularDifficulty() ? GO_DARK_RUNED_CHEST : GO_DARK_RUNED_CHEST_H, GO_FLAG_NO_INTERACT, false); DoRespawnGameObject(instance->IsRegularDifficulty() ? GO_DARK_RUNED_CHEST : GO_DARK_RUNED_CHEST_H, 30 * MINUTE); @@ -354,13 +381,15 @@ void instance_culling_of_stratholme::SetData(uint32 uiType, uint32 uiData) SetData(TYPE_INFINITE_CORRUPTER_TIME, 0); break; case SPECIAL: - DoChromieWhisper(SAY_CHROMIE_HURRY); + DoChromieWhisper(WHISPER_CHROMIE_HURRY); break; case FAIL: // event failed - despawn the corruptor SetData(TYPE_INFINITE_CORRUPTER_TIME, 0); if (Creature* pCorrupter = GetSingleCreatureFromStorage(NPC_INFINITE_CORRUPTER)) { + DoOrSimulateScriptTextForThisInstance(SAY_CORRUPTOR_DESPAWN, NPC_INFINITE_CORRUPTER); + if (pCorrupter->isAlive()) pCorrupter->ForcedDespawn(); } @@ -369,14 +398,15 @@ void instance_culling_of_stratholme::SetData(uint32 uiType, uint32 uiData) break; } - if (uiData == DONE || uiData == FAIL || uiType == TYPE_INFINITE_CORRUPTER_TIME) + if (uiData == DONE || uiType == TYPE_INFINITE_CORRUPTER_TIME) { OUT_SAVE_INST_DATA; std::ostringstream saveStream; saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2] << " " << m_auiEncounter[3] << " " << m_auiEncounter[4] << " " << m_auiEncounter[5] << " " - << m_auiEncounter[6] << " " << m_auiEncounter[7] << " " << m_auiEncounter[8]; + << m_auiEncounter[6] << " " << m_auiEncounter[7] << " " << m_auiEncounter[8] << " " + << m_auiEncounter[9]; m_strInstData = saveStream.str(); @@ -397,6 +427,10 @@ void instance_culling_of_stratholme::OnCreatureDeath(Creature* pCreature) { switch (pCreature->GetEntry()) { + case NPC_MEATHOOK: SetData(TYPE_MEATHOOK_EVENT, DONE); break; + case NPC_SALRAMM_THE_FLESHCRAFTER: SetData(TYPE_SALRAMM_EVENT, DONE); break; + case NPC_LORD_EPOCH: SetData(TYPE_EPOCH_EVENT, DONE); break; + case NPC_ENRAGING_GHOUL: case NPC_ACOLYTE: case NPC_MASTER_NECROMANCER: @@ -430,7 +464,8 @@ void instance_culling_of_stratholme::Load(const char* chrIn) std::istringstream loadStream(chrIn); loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3] - >> m_auiEncounter[4] >> m_auiEncounter[5] >> m_auiEncounter[6] >> m_auiEncounter[7] >> m_auiEncounter[8]; + >> m_auiEncounter[4] >> m_auiEncounter[5] >> m_auiEncounter[6] >> m_auiEncounter[7] + >> m_auiEncounter[8] >> m_auiEncounter[9]; for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) { diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 065a4e0c0..c8141fef1 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3063" + #define SD2_REVISION_NR "3064" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 328c2a336..6a4efb309 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -416,6 +416,7 @@ INSERT INTO scripted_event_id VALUES UPDATE instance_template SET ScriptName='instance_culling_of_stratholme' WHERE map=595; UPDATE creature_template SET ScriptName='npc_chromie' WHERE entry IN (26527, 27915); UPDATE creature_template SET ScriptName='spell_dummy_npc_crates_bunny' WHERE entry=27827; +UPDATE creature_template SET ScriptName='npc_spell_dummy_crusader_strike' WHERE entry IN (28167,28169); UPDATE creature_template SET ScriptName='npc_arthas' WHERE entry=26499; DELETE FROM scripted_areatrigger WHERE entry=5291; INSERT INTO scripted_areatrigger VALUES diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index a558e2bd2..990c47bc7 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -3427,7 +3427,40 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1595005,'Scourge forces have been spotted near the Market Row Gate!',0,6,0,0,'lordaeron crier SAY_SCOURGE_MARKET_ROW'), (-1595006,'Scourge forces have been spotted near the Town Hall!',0,6,0,0,'lordaeron crier SAY_SCOURGE_TOWN_HALL'), (-1595007,'Scourge forces have been spotted near the Elder\'s Square Gate!',0,6,0,0,'lordaeron crier SAY_SCOURGE_ELDERS_SQUARE'), -(-1595008,'Champions, meet me at the Town Hall at once. We must take the fight to Mal\'Ganis.',14297,6,0,0,'arthas SAY_MEET_TOWN_HALL'); +(-1595008,'Champions, meet me at the Town Hall at once. We must take the fight to Mal\'Ganis.',14297,6,0,0,'arthas SAY_MEET_TOWN_HALL'), +(-1595009,'Follow me, I know the way through.',14298,0,0,1,'arthas SAY_FOLLOW'), +(-1595010,'Ah, you\'ve finally arrived Prince Arthas. You\'re here just in the nick of time.',0,0,0,1,'citizen SAY_ARRIVED'), +(-1595011,'Yes, I\'m glad I could get to you before the plague.',14299,0,0,0,'arthas SAY_GET_BEFORE_PLAGUE'), +(-1595012,'What is this sorcery?',14300,0,0,0,'arthas SAY_SORCERY'), +(-1595013,'There\'s no need for you to understand, Arthas. All you need to do is die.',0,0,0,1,'citizen SAY_NO_UNDERSTAND'), +(-1595014,'Mal\'Ganis appears to have more than Scourge in his arsenal. We should make haste.',14301,0,0,1,'arthas SAY_MORE_THAN_SCOURGE'), +(-1595015,'More vile sorcery! Be ready for anything!',14302,0,0,0,'arthas SAY_MORE_SORCERY'), +(-1595016,'Let\'s move on.',14303,0,0,396,'arthas SAY_MOVE_ON'), +(-1595017,'Watch your backs: they have us surrounded in this hall.',14304,0,0,1,'arthas SAY_WATCH_BACKS'), +(-1595018,'Mal\'Ganis is not making this easy.',14305,0,0,396,'arthas SAY_NOT_EASY'), +(-1595019,'They\'re very persistent.',14306,0,0,396,'arthas SAY_PERSISTENT'), +(-1595020,'What else can he put in my way?',14307,0,0,396,'arthas SAY_ELSE'), +(-1595021,'Prince Arthas Menethil, on this day, a powerful darkness has taken hold of your soul. The death you are destined to visit upon others will this day be your own.',13408,1,0,0,'chrono-lord SAY_DARKNESS'), +(-1595022,'I do what I must for Lordaeron, and neither your words nor your actions will stop me.',14309,0,0,396,'arthas SAY_DO_WHAT_MUST'), +(-1595023,'The quickest path to Mal\'Ganis lies behind that bookshelf ahead.',14308,0,0,0,'arthas SAY_QUICK_PATH'), +(-1595024,'This will only take a moment.',14310,0,0,432,'arthas SAY_TAKE_A_MOMENT'), +(-1595025,'I\'m relieved this secret passage still works.',14311,0,0,0,'arthas SAY_PASSAGE'), +(-1595026,'Let\'s move through here as quickly as possible. If the undead don\'t kill us, the fires might.',14312,0,0,396,'arthas SAY_MOVE_QUICKLY'), +(-1595027,'Rest a moment and clear your lungs, but we must move again soon.',14313,0,0,396,'arthas SAY_REST'), +(-1595028,'That\'s enough; we must move again. Mal\'Ganis awaits.',14314,0,0,396,'arthas SAY_REST_COMPLETE'), +(-1595029,'At last some good luck. Market Row has not caught fire yet. Mal\'Ganis is supposed to be in Crusaders\' Square, which is just ahead. Tell me when you\'re ready to move forward.',14315,0,0,396,'arthas SAY_CRUSADER_SQUARE'), +(-1595030,'Justice will be done.',14316,0,0,0,'arthas SAY_JUSTICE'), +(-1595031,'We\'re going to finish this right now, Mal\'Ganis. Just you... and me.',14317,0,0,5,'arthas SAY_FINISH_MALGANIS'), +(-1595032,'Your journey has just begun, young prince. Gather your forces and meet me in the arctic land of Northrend. It is there that we shall settle the score between us. It is there that your true destiny will unfold.',14412,1,0,378,'malganis SAY_JOURNEY_BEGUN'), +(-1595033,'I\'ll hunt you to the ends of the earth if I have to! Do you hear me? To the ends of the earth!',14318,0,0,0,'arthas SAY_HUNT_MALGANIS'), +(-1595034,'You performed well this day. Anything that Mal\'Ganis has left behind is yours. Take it as your reward. I must now begin plans for an expedition to Northrend.',14319,0,0,1,'arthas SAY_ESCORT_COMPLETE'), +(-1595035,'Protect your prince, soldiers of Lordaeron! I am in need of aid!',14320,0,0,0,'arthas SAY_HALF_HP'), +(-1595036,'I am being overwhelmed, assist me!',14321,0,0,0,'arthas SAY_LOW_HP'), +(-1595037,'Mal\'Ganis will pay for this.',14322,0,0,0,'arthas SAY_SLAY_1'), +(-1595038,'I can\'t afford to spare you.',14323,0,0,0,'arthas SAY_SLAY_2'), +(-1595039,'One less obstacle to deal with.',14324,0,0,0,'arthas SAY_SLAY_3'), +(-1595040,'Agh! Damn you, Mal\'Ganis! Father...Jaina...I have failed Lordaeron...',14325,0,0,0,'arthas SAY_DEATH'), +(-1595041,'My work here is finished!',0,6,0,0,'infinite corruptor SAY_CORRUPTOR_DESPAWN'); -- -1 599 000 HALLS OF STONE INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES @@ -4983,7 +5016,11 @@ INSERT INTO gossip_texts (entry,content_default,comment) VALUES (-3595006,'Chromie, you and I both know what\'s going to happen in this time stream. We\'ve seen this all before. Can you just skip us ahead to all the real action?','chromie GOSSIP_ITEM_INN_SKIP'), (-3595007,'Yes, please!','chromie GOSSIP_ITEM_INN_TELEPORT'), (-3595008,'Yes, my Prince. We are ready.','arthas GOSSIP_ITEM_CITY_GATES'), -(-3595009,'We\'re only doing what is best for Lordaeron, your Highness.','arthas GOSSIP_ITEM_TOWN_HALL'); +(-3595009,'We\'re only doing what is best for Lordaeron, your Highness.','arthas GOSSIP_ITEM_TOWN_HALL'), +(-3595010,'Lead the way, Prince Arthas','arthas GOSSIP_ITEM_TOWN_HALL_2'), +(-3595011,'I\'m ready.','arthas GOSSIP_ITEM_EPOCH'), +(-3595012,'For Lordaeron!','arthas GOSSIP_ITEM_ESCORT'), +(-3595013,'I\'m ready to battle the dreadlord, sire.','arthas GOSSIP_ITEM_DREADLORD'); -- -3 599 000 HALLS OF STONE INSERT INTO gossip_texts (entry,content_default,comment) VALUES @@ -8575,4 +8612,87 @@ INSERT INTO script_waypoint VALUES (26588, 26, 4347.947, -3958.875, 193.360, 0, ''), (26588, 27, 4345.956, -3988.083, 187.320, 0, ''); +DELETE FROM script_waypoint WHERE entry=26499; +INSERT INTO script_waypoint VALUES +(26499, 0, 2366.184, 1197.285, 132.150, 0, ''), +(26499, 1, 2371.608, 1199.006, 134.727, 0, ''), +(26499, 2, 2376.157, 1200.552, 134.042, 0, ''), +(26499, 3, 2391.321, 1203.153, 134.125, 10000, 'SAY_ARRIVED'), +(26499, 4, 2391.321, 1203.153, 134.125, 0, 'SAY_GET_BEFORE_PLAGUE'), +(26499, 5, 2396.739, 1205.993, 134.125, 0, 'escort paused'), +(26499, 6, 2396.739, 1205.993, 134.125, 8000, ''), +(26499, 7, 2396.739, 1205.993, 134.125, 5000, 'SAY_MORE_THAN_SCOURGE'), +(26499, 8, 2412.033, 1207.823, 134.034, 0, ''), +(26499, 9, 2426.958, 1212.363, 134.000, 0, ''), +(26499, 10, 2438.589, 1217.005, 133.957, 0, ''), +(26499, 11, 2441.247, 1215.506, 133.951, 0, ''), +(26499, 12, 2446.155, 1197.135, 148.064, 0, ''), +(26499, 13, 2446.861, 1193.559, 148.076, 0, 'SAY_MORE_SORCERY'), +(26499, 14, 2443.582, 1189.773, 148.076, 0, 'escort paused'), +(26499, 15, 2443.582, 1189.773, 148.076, 8000, ''), +(26499, 16, 2443.582, 1189.773, 148.076, 5000, 'SAY_MOVE_ON'), +(26499, 17, 2430.986, 1193.844, 148.076, 0, ''), +(26499, 18, 2418.701, 1195.074, 148.076, 0, ''), +(26499, 19, 2410.825, 1193.033, 148.076, 0, ''), +(26499, 20, 2405.178, 1177.300, 148.076, 0, ''), +(26499, 21, 2409.676, 1155.144, 148.187, 0, 'SAY_WATCH_BACKS - escort paused'), +(26499, 22, 2409.676, 1155.144, 148.187, 8000, ''), +(26499, 23, 2409.676, 1155.144, 148.187, 3000, 'SAY_NOT_EASY'), +(26499, 24, 2413.030, 1138.769, 148.075, 0, ''), +(26499, 25, 2421.589, 1122.539, 148.125, 0, ''), +(26499, 26, 2425.375, 1119.325, 148.075, 0, 'SAY_PERSISTENT'), +(26499, 27, 2425.375, 1119.325, 148.075, 8000, ''), +(26499, 28, 2425.375, 1119.325, 148.075, 0, 'SAY_ELSE - escort paused'), +(26499, 29, 2447.376, 1114.935, 148.075, 0, ''), +(26499, 30, 2454.853, 1117.053, 150.007, 0, ''), +(26499, 31, 2459.909, 1125.710, 150.007, 0, ''), +(26499, 32, 2468.208, 1124.426, 150.027, 5000, 'SAY_TAKE_A_MOMENT'), +(26499, 33, 2468.208, 1124.426, 150.027, 0, 'SAY_PASSAGE'), +(26499, 34, 2482.697, 1122.354, 149.905, 0, ''), +(26499, 35, 2485.536, 1111.682, 149.907, 0, ''), +(26499, 36, 2486.997, 1103.307, 145.335, 0, ''), +(26499, 37, 2490.222, 1100.452, 144.860, 0, ''), +(26499, 38, 2496.676, 1102.510, 144.474, 0, ''), +(26499, 39, 2495.006, 1115.535, 143.825, 0, ''), +(26499, 40, 2493.206, 1123.732, 140.302, 0, ''), +(26499, 41, 2496.522, 1128.798, 140.010, 0, ''), +(26499, 42, 2500.956, 1127.101, 139.982, 0, ''), +(26499, 43, 2504.459, 1120.400, 139.976, 0, ''), +(26499, 44, 2506.478, 1120.344, 139.970, 0, ''), +(26499, 45, 2517.028, 1122.504, 132.064, 0, ''), +(26499, 46, 2523.487, 1124.808, 132.080, 0, 'encounter complete - despawn'), +(26499, 47, 2551.116, 1135.607, 129.797, 0, ''), +(26499, 48, 2562.692, 1147.900, 128.003, 0, ''), +(26499, 49, 2565.026, 1168.818, 127.007, 0, ''), +(26499, 50, 2562.405, 1189.934, 126.189, 0, ''), +(26499, 51, 2558.311, 1212.633, 125.739, 0, ''), +(26499, 52, 2551.082, 1231.603, 125.554, 0, ''), +(26499, 53, 2543.631, 1250.385, 126.103, 0, ''), +(26499, 54, 2534.270, 1272.281, 126.993, 0, ''), +(26499, 55, 2521.446, 1290.463, 130.194, 0, ''), +(26499, 56, 2517.060, 1312.327, 130.156, 0, ''), +(26499, 57, 2513.198, 1324.149, 131.843, 20000, 'SAY_REST'), +(26499, 58, 2513.198, 1324.149, 131.843, 0, 'SAY_REST_COMPLETE'), +(26499, 59, 2503.484, 1347.347, 132.952, 0, ''), +(26499, 60, 2491.935, 1367.205, 130.717, 0, ''), +(26499, 61, 2482.922, 1386.118, 130.029, 0, ''), +(26499, 62, 2471.576, 1404.726, 130.681, 0, ''), +(26499, 63, 2459.646, 1418.801, 130.662, 0, ''), +(26499, 64, 2440.002, 1423.901, 130.632, 0, ''), +(26499, 65, 2416.750, 1419.929, 130.669, 0, ''), +(26499, 66, 2401.423, 1415.888, 130.840, 0, ''), +(26499, 67, 2381.814, 1410.022, 128.147, 0, ''), +(26499, 68, 2367.663, 1406.689, 128.529, 0, ''), +(26499, 69, 2361.863, 1405.020, 128.714, 0, 'SAY_CRUSADER_SQUARE - escort paused'), +(26499, 70, 2341.932, 1406.359, 128.268, 0, ''), +(26499, 71, 2328.375, 1413.144, 127.687, 0, ''), +(26499, 72, 2319.288, 1435.609, 127.887, 0, ''), +(26499, 73, 2308.846, 1460.503, 127.840, 0, ''), +(26499, 74, 2301.277, 1487.081, 128.361, 0, 'SAY_FINISH_MALGANIS - escort paused'), +(26499, 75, 2301.277, 1487.081, 128.361, 18000, 'SAY_JOURNEY_BEGUN'), +(26499, 76, 2293.693, 1506.805, 128.737, 18000, 'SAY_HUNT_MALGANIS'), +(26499, 77, 2300.743, 1487.231, 128.362, 0, ''), +(26499, 78, 2308.582, 1460.863, 127.839, 0, ''), +(26499, 79, 2326.608, 1420.555, 127.780, 0, ''); + -- EOF diff --git a/sql/updates/r3064_mangos.sql b/sql/updates/r3064_mangos.sql new file mode 100644 index 000000000..2363b8f6d --- /dev/null +++ b/sql/updates/r3064_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_spell_dummy_crusader_strike' WHERE entry IN (28167,28169); diff --git a/sql/updates/r3064_scriptdev2.sql b/sql/updates/r3064_scriptdev2.sql new file mode 100644 index 000000000..feab65637 --- /dev/null +++ b/sql/updates/r3064_scriptdev2.sql @@ -0,0 +1,125 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1595041 AND -1595009; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1595009,'Follow me, I know the way through.',14298,0,0,1,'arthas SAY_FOLLOW'), +(-1595010,'Ah, you\'ve finally arrived Prince Arthas. You\'re here just in the nick of time.',0,0,0,1,'citizen SAY_ARRIVED'), +(-1595011,'Yes, I\'m glad I could get to you before the plague.',14299,0,0,0,'arthas SAY_GET_BEFORE_PLAGUE'), +(-1595012,'What is this sorcery?',14300,0,0,0,'arthas SAY_SORCERY'), +(-1595013,'There\'s no need for you to understand, Arthas. All you need to do is die.',0,0,0,1,'citizen SAY_NO_UNDERSTAND'), +(-1595014,'Mal\'Ganis appears to have more than Scourge in his arsenal. We should make haste.',14301,0,0,1,'arthas SAY_MORE_THAN_SCOURGE'), +(-1595015,'More vile sorcery! Be ready for anything!',14302,0,0,0,'arthas SAY_MORE_SORCERY'), +(-1595016,'Let\'s move on.',14303,0,0,396,'arthas SAY_MOVE_ON'), +(-1595017,'Watch your backs: they have us surrounded in this hall.',14304,0,0,1,'arthas SAY_WATCH_BACKS'), +(-1595018,'Mal\'Ganis is not making this easy.',14305,0,0,396,'arthas SAY_NOT_EASY'), +(-1595019,'They\'re very persistent.',14306,0,0,396,'arthas SAY_PERSISTENT'), +(-1595020,'What else can he put in my way?',14307,0,0,396,'arthas SAY_ELSE'), +(-1595021,'Prince Arthas Menethil, on this day, a powerful darkness has taken hold of your soul. The death you are destined to visit upon others will this day be your own.',13408,1,0,0,'chrono-lord SAY_DARKNESS'), +(-1595022,'I do what I must for Lordaeron, and neither your words nor your actions will stop me.',14309,0,0,396,'arthas SAY_DO_WHAT_MUST'), +(-1595023,'The quickest path to Mal\'Ganis lies behind that bookshelf ahead.',14308,0,0,0,'arthas SAY_QUICK_PATH'), +(-1595024,'This will only take a moment.',14310,0,0,432,'arthas SAY_TAKE_A_MOMENT'), +(-1595025,'I\'m relieved this secret passage still works.',14311,0,0,0,'arthas SAY_PASSAGE'), +(-1595026,'Let\'s move through here as quickly as possible. If the undead don\'t kill us, the fires might.',14312,0,0,396,'arthas SAY_MOVE_QUICKLY'), +(-1595027,'Rest a moment and clear your lungs, but we must move again soon.',14313,0,0,396,'arthas SAY_REST'), +(-1595028,'That\'s enough; we must move again. Mal\'Ganis awaits.',14314,0,0,396,'arthas SAY_REST_COMPLETE'), +(-1595029,'At last some good luck. Market Row has not caught fire yet. Mal\'Ganis is supposed to be in Crusaders\' Square, which is just ahead. Tell me when you\'re ready to move forward.',14315,0,0,396,'arthas SAY_CRUSADER_SQUARE'), +(-1595030,'Justice will be done.',14316,0,0,0,'arthas SAY_JUSTICE'), +(-1595031,'We\'re going to finish this right now, Mal\'Ganis. Just you... and me.',14317,0,0,5,'arthas SAY_FINISH_MALGANIS'), +(-1595032,'Your journey has just begun, young prince. Gather your forces and meet me in the arctic land of Northrend. It is there that we shall settle the score between us. It is there that your true destiny will unfold.',14412,1,0,378,'malganis SAY_JOURNEY_BEGUN'), +(-1595033,'I\'ll hunt you to the ends of the earth if I have to! Do you hear me? To the ends of the earth!',14318,0,0,0,'arthas SAY_HUNT_MALGANIS'), +(-1595034,'You performed well this day. Anything that Mal\'Ganis has left behind is yours. Take it as your reward. I must now begin plans for an expedition to Northrend.',14319,0,0,1,'arthas SAY_ESCORT_COMPLETE'), +(-1595035,'Protect your prince, soldiers of Lordaeron! I am in need of aid!',14320,0,0,0,'arthas SAY_HALF_HP'), +(-1595036,'I am being overwhelmed, assist me!',14321,0,0,0,'arthas SAY_LOW_HP'), +(-1595037,'Mal\'Ganis will pay for this.',14322,0,0,0,'arthas SAY_SLAY_1'), +(-1595038,'I can\'t afford to spare you.',14323,0,0,0,'arthas SAY_SLAY_2'), +(-1595039,'One less obstacle to deal with.',14324,0,0,0,'arthas SAY_SLAY_3'), +(-1595040,'Agh! Damn you, Mal\'Ganis! Father...Jaina...I have failed Lordaeron...',14325,0,0,0,'arthas SAY_DEATH'), +(-1595041,'My work here is finished!',0,6,0,0,'infinite corruptor SAY_CORRUPTOR_DESPAWN'); + +DELETE FROM gossip_texts WHERE entry IN (-3595010,-3595011,-3595012,-3595013); +INSERT INTO gossip_texts (entry,content_default,comment) VALUES +(-3595010,'Lead the way, Prince Arthas','arthas GOSSIP_ITEM_TOWN_HALL_2'), +(-3595011,'I\'m ready.','arthas GOSSIP_ITEM_EPOCH'), +(-3595012,'For Lordaeron!','arthas GOSSIP_ITEM_ESCORT'), +(-3595013,'I\'m ready to battle the dreadlord, sire.','arthas GOSSIP_ITEM_DREADLORD'); + +DELETE FROM script_waypoint WHERE entry=26499; +INSERT INTO script_waypoint VALUES +(26499, 0, 2366.184, 1197.285, 132.150, 0, ''), +(26499, 1, 2371.608, 1199.006, 134.727, 0, ''), +(26499, 2, 2376.157, 1200.552, 134.042, 0, ''), +(26499, 3, 2391.321, 1203.153, 134.125, 10000, 'SAY_ARRIVED'), +(26499, 4, 2391.321, 1203.153, 134.125, 0, 'SAY_GET_BEFORE_PLAGUE'), +(26499, 5, 2396.739, 1205.993, 134.125, 0, 'escort paused'), +(26499, 6, 2396.739, 1205.993, 134.125, 8000, ''), +(26499, 7, 2396.739, 1205.993, 134.125, 5000, 'SAY_MORE_THAN_SCOURGE'), +(26499, 8, 2412.033, 1207.823, 134.034, 0, ''), +(26499, 9, 2426.958, 1212.363, 134.000, 0, ''), +(26499, 10, 2438.589, 1217.005, 133.957, 0, ''), +(26499, 11, 2441.247, 1215.506, 133.951, 0, ''), +(26499, 12, 2446.155, 1197.135, 148.064, 0, ''), +(26499, 13, 2446.861, 1193.559, 148.076, 0, 'SAY_MORE_SORCERY'), +(26499, 14, 2443.582, 1189.773, 148.076, 0, 'escort paused'), +(26499, 15, 2443.582, 1189.773, 148.076, 8000, ''), +(26499, 16, 2443.582, 1189.773, 148.076, 5000, 'SAY_MOVE_ON'), +(26499, 17, 2430.986, 1193.844, 148.076, 0, ''), +(26499, 18, 2418.701, 1195.074, 148.076, 0, ''), +(26499, 19, 2410.825, 1193.033, 148.076, 0, ''), +(26499, 20, 2405.178, 1177.300, 148.076, 0, ''), +(26499, 21, 2409.676, 1155.144, 148.187, 0, 'SAY_WATCH_BACKS - escort paused'), +(26499, 22, 2409.676, 1155.144, 148.187, 8000, ''), +(26499, 23, 2409.676, 1155.144, 148.187, 3000, 'SAY_NOT_EASY'), +(26499, 24, 2413.030, 1138.769, 148.075, 0, ''), +(26499, 25, 2421.589, 1122.539, 148.125, 0, ''), +(26499, 26, 2425.375, 1119.325, 148.075, 0, 'SAY_PERSISTENT'), +(26499, 27, 2425.375, 1119.325, 148.075, 8000, ''), +(26499, 28, 2425.375, 1119.325, 148.075, 0, 'SAY_ELSE - escort paused'), +(26499, 29, 2447.376, 1114.935, 148.075, 0, ''), +(26499, 30, 2454.853, 1117.053, 150.007, 0, ''), +(26499, 31, 2459.909, 1125.710, 150.007, 0, ''), +(26499, 32, 2468.208, 1124.426, 150.027, 5000, 'SAY_TAKE_A_MOMENT'), +(26499, 33, 2468.208, 1124.426, 150.027, 0, 'SAY_PASSAGE'), +(26499, 34, 2482.697, 1122.354, 149.905, 0, ''), +(26499, 35, 2485.536, 1111.682, 149.907, 0, ''), +(26499, 36, 2486.997, 1103.307, 145.335, 0, ''), +(26499, 37, 2490.222, 1100.452, 144.860, 0, ''), +(26499, 38, 2496.676, 1102.510, 144.474, 0, ''), +(26499, 39, 2495.006, 1115.535, 143.825, 0, ''), +(26499, 40, 2493.206, 1123.732, 140.302, 0, ''), +(26499, 41, 2496.522, 1128.798, 140.010, 0, ''), +(26499, 42, 2500.956, 1127.101, 139.982, 0, ''), +(26499, 43, 2504.459, 1120.400, 139.976, 0, ''), +(26499, 44, 2506.478, 1120.344, 139.970, 0, ''), +(26499, 45, 2517.028, 1122.504, 132.064, 0, ''), +(26499, 46, 2523.487, 1124.808, 132.080, 0, 'encounter complete - despawn'), +(26499, 47, 2551.116, 1135.607, 129.797, 0, ''), +(26499, 48, 2562.692, 1147.900, 128.003, 0, ''), +(26499, 49, 2565.026, 1168.818, 127.007, 0, ''), +(26499, 50, 2562.405, 1189.934, 126.189, 0, ''), +(26499, 51, 2558.311, 1212.633, 125.739, 0, ''), +(26499, 52, 2551.082, 1231.603, 125.554, 0, ''), +(26499, 53, 2543.631, 1250.385, 126.103, 0, ''), +(26499, 54, 2534.270, 1272.281, 126.993, 0, ''), +(26499, 55, 2521.446, 1290.463, 130.194, 0, ''), +(26499, 56, 2517.060, 1312.327, 130.156, 0, ''), +(26499, 57, 2513.198, 1324.149, 131.843, 20000, 'SAY_REST'), +(26499, 58, 2513.198, 1324.149, 131.843, 0, 'SAY_REST_COMPLETE'), +(26499, 59, 2503.484, 1347.347, 132.952, 0, ''), +(26499, 60, 2491.935, 1367.205, 130.717, 0, ''), +(26499, 61, 2482.922, 1386.118, 130.029, 0, ''), +(26499, 62, 2471.576, 1404.726, 130.681, 0, ''), +(26499, 63, 2459.646, 1418.801, 130.662, 0, ''), +(26499, 64, 2440.002, 1423.901, 130.632, 0, ''), +(26499, 65, 2416.750, 1419.929, 130.669, 0, ''), +(26499, 66, 2401.423, 1415.888, 130.840, 0, ''), +(26499, 67, 2381.814, 1410.022, 128.147, 0, ''), +(26499, 68, 2367.663, 1406.689, 128.529, 0, ''), +(26499, 69, 2361.863, 1405.020, 128.714, 0, 'SAY_CRUSADER_SQUARE - escort paused'), +(26499, 70, 2341.932, 1406.359, 128.268, 0, ''), +(26499, 71, 2328.375, 1413.144, 127.687, 0, ''), +(26499, 72, 2319.288, 1435.609, 127.887, 0, ''), +(26499, 73, 2308.846, 1460.503, 127.840, 0, ''), +(26499, 74, 2301.277, 1487.081, 128.361, 0, 'SAY_FINISH_MALGANIS - escort paused'), +(26499, 75, 2301.277, 1487.081, 128.361, 18000, 'SAY_JOURNEY_BEGUN'), +(26499, 76, 2293.693, 1506.805, 128.737, 18000, 'SAY_HUNT_MALGANIS'), +(26499, 77, 2300.743, 1487.231, 128.362, 0, ''), +(26499, 78, 2308.582, 1460.863, 127.839, 0, ''), +(26499, 79, 2326.608, 1420.555, 127.780, 0, ''); From 546f4f611ec004b829199f108bfe887e894534c9 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Wed, 2 Oct 2013 18:33:37 +0200 Subject: [PATCH 1077/1172] [3065] Adapt to changeset of 12563 This had been a forgotten commit in my history... The other uses of GetNearPoint apepar to be fine (huge distance, usually normal mobs) Also fix a tiny warning in yogg-saron script. --- scripts/northrend/ulduar/ulduar/boss_yogg_saron.cpp | 2 +- scripts/world/npcs_special.cpp | 2 +- sd2_revision_nr.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/northrend/ulduar/ulduar/boss_yogg_saron.cpp b/scripts/northrend/ulduar/ulduar/boss_yogg_saron.cpp index 0f048b809..f6aefbab4 100644 --- a/scripts/northrend/ulduar/ulduar/boss_yogg_saron.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_yogg_saron.cpp @@ -526,7 +526,7 @@ struct boss_saraAI : public Scripted_NoMovementAI, private DialogueHelper { if (m_uiSarasSpellTimer < uiDiff) { - CanCastResult castResult; + CanCastResult castResult = CAST_OK; switch (urand(0, 2)) { case 0: castResult = DoCastSpellIfCan(m_creature, SPELL_SARAS_FERVOR); break; diff --git a/scripts/world/npcs_special.cpp b/scripts/world/npcs_special.cpp index dc3a64d4b..2bf7580d2 100644 --- a/scripts/world/npcs_special.cpp +++ b/scripts/world/npcs_special.cpp @@ -1120,7 +1120,7 @@ struct npc_spring_rabbitAI : public ScriptedPetAI float m_fMoveAngle = m_creature->GetAngle(pPartner); float fDist = m_creature->GetDistance(pPartner); float fX, fY, fZ; - m_creature->GetNearPoint(m_creature, fX, fY, fZ, m_creature->GetObjectBoundingRadius(), fDist * 0.5f - m_creature->GetObjectBoundingRadius(), m_fMoveAngle); + m_creature->GetNearPoint(m_creature, fX, fY, fZ, m_creature->GetObjectBoundingRadius(), fDist * 0.5f, m_fMoveAngle); m_creature->GetMotionMaster()->Clear(); m_creature->GetMotionMaster()->MovePoint(1, fX, fY, fZ); diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index c8141fef1..010013117 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3064" + #define SD2_REVISION_NR "3065" #endif // __SD2_REVISION_NR_H__ From 4c7a11896efd686499248c236a46fc1741aff334 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Fri, 7 Nov 2014 00:40:06 +0100 Subject: [PATCH 1078/1172] [3066] Spawn scourge waves in the burning part of Stratholme --- .../culling_of_stratholme.cpp | 7 +- .../culling_of_stratholme.h | 1 + .../instance_culling_of_stratholme.cpp | 79 +++++++++++++++++-- sd2_revision_nr.h | 2 +- 4 files changed, 79 insertions(+), 10 deletions(-) diff --git a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.cpp b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.cpp index ec11e1f5f..11e32f1cd 100644 --- a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.cpp +++ b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: culling_of_stratholme -SD%Complete: 70% -SDComment: Burning city undead and zombies NYI +SD%Complete: 80% +SDComment: Zombies spawns partially implemented SDCategory: Culling of Stratholme EndScriptData */ @@ -498,7 +498,8 @@ struct npc_arthasAI : public npc_escortAI, private DialogueHelper DoScriptText(SAY_ARTHAS_MOVE_QUICKLY, m_creature); m_creature->SetFactionTemporary(FACTION_ARTHAS_2, TEMPFACTION_RESTORE_REACH_HOME); - // ToDo: spawn scourge mobs in the burning stratholme + if (m_pInstance) + m_pInstance->DoSpawnBurningCityUndead(m_creature); } else if (eventType == AI_EVENT_CUSTOM_B) { diff --git a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.h b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.h index 2a410ea2a..49ed7e6b1 100644 --- a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.h +++ b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.h @@ -212,6 +212,7 @@ class instance_culling_of_stratholme : public ScriptedInstance void DoSpawnChromieIfNeeded(Unit* pSummoner); void DoSpawnArthasIfNeeded(Unit* pSummoner); bool CanGrainEventProgress(Creature* pCrate); + void DoSpawnBurningCityUndead(Unit* pSummoner); void DoEventAtTriggerIfCan(uint32 uiTriggerId); diff --git a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/instance_culling_of_stratholme.cpp b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/instance_culling_of_stratholme.cpp index ef92e18cd..b015c19a3 100644 --- a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/instance_culling_of_stratholme.cpp +++ b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/instance_culling_of_stratholme.cpp @@ -29,6 +29,7 @@ enum MAX_ARTHAS_SPAWN_POS = 5, MAX_GRAIN_CRATES = 5, MAX_SCOURGE_SPAWN_POS = 5, + MAX_BURNING_SCOURGE_POS = 15, SAY_SCOURGE_FESTIVAL_LANE = -1595003, SAY_SCOURGE_KINGS_SQUARE = -1595004, @@ -105,6 +106,31 @@ static sScourgeSpawnLoc m_aScourgeWavesLocs[] = {POS_ELDERS_SQUARE, SAY_SCOURGE_ELDERS_SQUARE, 2259.153f, 1153.199f, 138.431f, 2.39f}, }; +struct sBurningScourgeSpawnLoc +{ + uint8 m_uiType; + float m_fX, m_fY, m_fZ; +}; + +static sBurningScourgeSpawnLoc m_aBurningScourgeLocs[MAX_BURNING_SCOURGE_POS] = +{ + {SCOURGE_TYPE_GHOUL, 2571.570f, 1169.945f, 126.191f}, + {SCOURGE_TYPE_GOLEM, 2560.524f, 1208.296f, 125.613f}, + {SCOURGE_TYPE_GHOUL, 2562.075f, 1182.137f, 126.499f}, + {SCOURGE_TYPE_FIEND, 2552.720f, 1227.233f, 125.620f}, + {SCOURGE_TYPE_GHOUL, 2545.070f, 1245.650f, 125.991f}, + {SCOURGE_TYPE_GHOUL, 2534.250f, 1258.379f, 127.030f}, + {SCOURGE_TYPE_ACOLYTES, 2532.075f, 1271.579f, 127.243f}, + {SCOURGE_TYPE_GHOUL, 2529.144f, 1281.680f, 128.429f}, + {SCOURGE_TYPE_GHOUL, 2491.742f, 1365.169f, 130.827f}, + {SCOURGE_TYPE_FIEND, 2490.869f, 1366.189f, 130.678f}, + {SCOURGE_TYPE_GHOUL, 2479.944f, 1393.666f, 129.975f}, + {SCOURGE_TYPE_GOLEM, 2484.858f, 1380.665f, 130.075f}, + {SCOURGE_TYPE_GHOUL, 2474.965f, 1399.063f, 130.317f}, + {SCOURGE_TYPE_ACOLYTES, 2461.411f, 1416.090f, 130.663f}, + {SCOURGE_TYPE_GHOUL, 2448.391f, 1426.428f, 130.853f}, +}; + instance_culling_of_stratholme::instance_culling_of_stratholme(Map* pMap) : ScriptedInstance(pMap), m_bStartedInnEvent(false), m_uiGrainCrateCount(0), @@ -235,7 +261,7 @@ void instance_culling_of_stratholme::OnCreatureCreate(Creature* pCreature) case NPC_DARK_NECROMANCER: case NPC_BILE_GOLEM: case NPC_DEVOURING_GHOUL: - if (pCreature->IsTemporarySummon()) + if (pCreature->IsTemporarySummon() && GetData(TYPE_SALRAMM_EVENT) != DONE) m_luiCurrentScourgeWaveGUIDs.push_back(pCreature->GetObjectGuid()); break; } @@ -427,9 +453,10 @@ void instance_culling_of_stratholme::OnCreatureDeath(Creature* pCreature) { switch (pCreature->GetEntry()) { - case NPC_MEATHOOK: SetData(TYPE_MEATHOOK_EVENT, DONE); break; - case NPC_SALRAMM_THE_FLESHCRAFTER: SetData(TYPE_SALRAMM_EVENT, DONE); break; - case NPC_LORD_EPOCH: SetData(TYPE_EPOCH_EVENT, DONE); break; + case NPC_MEATHOOK: SetData(TYPE_MEATHOOK_EVENT, DONE); break; + case NPC_SALRAMM_THE_FLESHCRAFTER: SetData(TYPE_SALRAMM_EVENT, DONE); break; + case NPC_LORD_EPOCH: SetData(TYPE_EPOCH_EVENT, DONE); break; + case NPC_INFINITE_CORRUPTER: SetData(TYPE_INFINITE_CORRUPTER, DONE); break; case NPC_ENRAGING_GHOUL: case NPC_ACOLYTE: @@ -440,7 +467,7 @@ void instance_culling_of_stratholme::OnCreatureDeath(Creature* pCreature) case NPC_DARK_NECROMANCER: case NPC_BILE_GOLEM: case NPC_DEVOURING_GHOUL: - if (pCreature->IsTemporarySummon()) + if (pCreature->IsTemporarySummon() && GetData(TYPE_SALRAMM_EVENT) != DONE) { m_luiCurrentScourgeWaveGUIDs.remove(pCreature->GetObjectGuid()); @@ -749,7 +776,7 @@ void instance_culling_of_stratholme::DoSpawnNextScourgeWave() } // start infinite curruptor event on the first wave - if (m_uiScourgeWaveCount == 1 && !instance->IsRegularDifficulty()) + if (m_uiScourgeWaveCount == 1 && !instance->IsRegularDifficulty() && GetData(TYPE_INFINITE_CORRUPTER) != DONE) SetData(TYPE_INFINITE_CORRUPTER, IN_PROGRESS); // get a random position that is different from the previous one for the next round @@ -761,6 +788,46 @@ void instance_culling_of_stratholme::DoSpawnNextScourgeWave() m_uiCurrentUndeadPos = uiCurrentPos; } +// function that spawns all the scourge elites in burning stratholme +void instance_culling_of_stratholme::DoSpawnBurningCityUndead(Unit* pSummoner) +{ + for (uint8 i = 0; i < MAX_BURNING_SCOURGE_POS; ++i) + { + uint32 uiEntry = GetRandomMobOfType(m_aBurningScourgeLocs[i].m_uiType); + if (!uiEntry) + continue; + + float fX, fY, fZ; + + // special requirement for acolytes - spawn a pack of 3 + if (m_aBurningScourgeLocs[i].m_uiType == SCOURGE_TYPE_ACOLYTES) + { + for (uint8 j = 0; j < 3; ++j) + { + pSummoner->GetRandomPoint(m_aBurningScourgeLocs[i].m_fX, m_aBurningScourgeLocs[i].m_fY, m_aBurningScourgeLocs[i].m_fZ, 5.0f, fX, fY, fZ); + + if (Creature* pUndead = pSummoner->SummonCreature(uiEntry, fX, fY, fZ, 0, TEMPSUMMON_DEAD_DESPAWN, 0)) + pUndead->GetMotionMaster()->MoveRandomAroundPoint(pUndead->GetPositionX(), pUndead->GetPositionY(), pUndead->GetPositionZ(), 10.0f); + } + } + // spawn the selected mob + else + { + if (Creature* pUndead = pSummoner->SummonCreature(uiEntry, m_aBurningScourgeLocs[i].m_fX, m_aBurningScourgeLocs[i].m_fY, m_aBurningScourgeLocs[i].m_fZ, 0, TEMPSUMMON_DEAD_DESPAWN, 0)) + pUndead->GetMotionMaster()->MoveRandomAroundPoint(pUndead->GetPositionX(), pUndead->GetPositionY(), pUndead->GetPositionZ(), 10.0f); + } + + // spawn a few random zombies + for (uint8 j = 0; j < 5; ++j) + { + pSummoner->GetRandomPoint(m_aBurningScourgeLocs[i].m_fX, m_aBurningScourgeLocs[i].m_fY, m_aBurningScourgeLocs[i].m_fZ, 20.0f, fX, fY, fZ); + + if (Creature* pUndead = pSummoner->SummonCreature(NPC_ZOMBIE, fX, fY, fZ, 0, TEMPSUMMON_DEAD_DESPAWN, 0)) + pUndead->GetMotionMaster()->MoveRandomAroundPoint(pUndead->GetPositionX(), pUndead->GetPositionY(), pUndead->GetPositionZ(), 10.0f); + } + } +} + // function that returns a random scourge mob of a specified type uint32 instance_culling_of_stratholme::GetRandomMobOfType(uint8 uiType) { diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 010013117..8e82de524 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3065" + #define SD2_REVISION_NR "3066" #endif // __SD2_REVISION_NR_H__ From f8a3e8c8bbec670bdde9fec392e63576f0df670e Mon Sep 17 00:00:00 2001 From: Xfurry Date: Mon, 17 Nov 2014 23:21:56 +0100 Subject: [PATCH 1079/1172] [3067] ScriptDev2 Milestone 0.8 Requires CMaNGOS 12682, Expects CMaNGOS v17.0 [12788] Thanks to all who contributed! --- docs/ChangeLog.html | 106 ++++++++++++++++++--- docs/ChangeLog.txt | 25 ++++- docs/ToDo.html | 20 +--- docs/ToDo.txt | 10 +- sd2_revision_nr.h | 2 +- sql/updates/{ => 0.8}/r2923_mangos.sql | 0 sql/updates/{ => 0.8}/r2925_mangos.sql | 0 sql/updates/{ => 0.8}/r2926_mangos.sql | 0 sql/updates/{ => 0.8}/r2926_scriptdev2.sql | 0 sql/updates/{ => 0.8}/r2927_mangos.sql | 0 sql/updates/{ => 0.8}/r2927_scriptdev2.sql | 0 sql/updates/{ => 0.8}/r2929_mangos.sql | 0 sql/updates/{ => 0.8}/r2930_mangos.sql | 0 sql/updates/{ => 0.8}/r2930_scriptdev2.sql | 0 sql/updates/{ => 0.8}/r2932_mangos.sql | 0 sql/updates/{ => 0.8}/r2933_mangos.sql | 0 sql/updates/{ => 0.8}/r2933_scriptdev2.sql | 0 sql/updates/{ => 0.8}/r2935_mangos.sql | 0 sql/updates/{ => 0.8}/r2935_scriptdev2.sql | 0 sql/updates/{ => 0.8}/r2936_scriptdev2.sql | 0 sql/updates/{ => 0.8}/r2938_mangos.sql | 0 sql/updates/{ => 0.8}/r2939_mangos.sql | 0 sql/updates/{ => 0.8}/r2940_mangos.sql | 0 sql/updates/{ => 0.8}/r2942_mangos.sql | 0 sql/updates/{ => 0.8}/r2944_mangos.sql | 0 sql/updates/{ => 0.8}/r2946_mangos.sql | 0 sql/updates/{ => 0.8}/r2946_scriptdev2.sql | 0 sql/updates/{ => 0.8}/r2947_mangos.sql | 0 sql/updates/{ => 0.8}/r2948_mangos.sql | 0 sql/updates/{ => 0.8}/r2951_mangos.sql | 0 sql/updates/{ => 0.8}/r2954_mangos.sql | 0 sql/updates/{ => 0.8}/r2955_mangos.sql | 0 sql/updates/{ => 0.8}/r2955_scriptdev2.sql | 0 sql/updates/{ => 0.8}/r2958_mangos.sql | 0 sql/updates/{ => 0.8}/r2959_mangos.sql | 0 sql/updates/{ => 0.8}/r2959_scriptdev2.sql | 0 sql/updates/{ => 0.8}/r2962_mangos.sql | 0 sql/updates/{ => 0.8}/r2963_mangos.sql | 0 sql/updates/{ => 0.8}/r2964_mangos.sql | 0 sql/updates/{ => 0.8}/r2965_mangos.sql | 0 sql/updates/{ => 0.8}/r2965_scriptdev2.sql | 0 sql/updates/{ => 0.8}/r2967_mangos.sql | 0 sql/updates/{ => 0.8}/r2969_mangos.sql | 0 sql/updates/{ => 0.8}/r2970_mangos.sql | 0 sql/updates/{ => 0.8}/r2970_scriptdev2.sql | 0 sql/updates/{ => 0.8}/r2971_mangos.sql | 0 sql/updates/{ => 0.8}/r2971_scriptdev2.sql | 0 sql/updates/{ => 0.8}/r2972_mangos.sql | 0 sql/updates/{ => 0.8}/r2973_mangos.sql | 0 sql/updates/{ => 0.8}/r2973_scriptdev2.sql | 0 sql/updates/{ => 0.8}/r2974_mangos.sql | 0 sql/updates/{ => 0.8}/r2977_mangos.sql | 0 sql/updates/{ => 0.8}/r2977_scriptdev2.sql | 0 sql/updates/{ => 0.8}/r2978_mangos.sql | 0 sql/updates/{ => 0.8}/r2978_scriptdev2.sql | 0 sql/updates/{ => 0.8}/r2980_mangos.sql | 0 sql/updates/{ => 0.8}/r2981_mangos.sql | 0 sql/updates/{ => 0.8}/r2982_mangos.sql | 0 sql/updates/{ => 0.8}/r2983_scriptdev2.sql | 0 sql/updates/{ => 0.8}/r2984_mangos.sql | 0 sql/updates/{ => 0.8}/r2985_mangos.sql | 0 sql/updates/{ => 0.8}/r2985_scriptdev2.sql | 0 sql/updates/{ => 0.8}/r2987_mangos.sql | 0 sql/updates/{ => 0.8}/r2987_scriptdev2.sql | 0 sql/updates/{ => 0.8}/r2988_mangos.sql | 0 sql/updates/{ => 0.8}/r2989_mangos.sql | 0 sql/updates/{ => 0.8}/r2991_scriptdev2.sql | 0 sql/updates/{ => 0.8}/r2992_mangos.sql | 0 sql/updates/{ => 0.8}/r2993_scriptdev2.sql | 0 sql/updates/{ => 0.8}/r2994_mangos.sql | 0 sql/updates/{ => 0.8}/r2994_scriptdev2.sql | 0 sql/updates/{ => 0.8}/r2995_mangos.sql | 0 sql/updates/{ => 0.8}/r2995_scriptdev2.sql | 0 sql/updates/{ => 0.8}/r2996_mangos.sql | 0 sql/updates/{ => 0.8}/r2996_scriptdev2.sql | 0 sql/updates/{ => 0.8}/r2997_mangos.sql | 0 sql/updates/{ => 0.8}/r2997_scriptdev2.sql | 0 sql/updates/{ => 0.8}/r2998_mangos.sql | 0 sql/updates/{ => 0.8}/r2998_scriptdev2.sql | 0 sql/updates/{ => 0.8}/r2999_mangos.sql | 0 sql/updates/{ => 0.8}/r2999_scriptdev2.sql | 0 sql/updates/{ => 0.8}/r3001_scriptdev2.sql | 0 sql/updates/{ => 0.8}/r3002_mangos.sql | 0 sql/updates/{ => 0.8}/r3002_scriptdev2.sql | 0 sql/updates/{ => 0.8}/r3004_mangos.sql | 0 sql/updates/{ => 0.8}/r3004_scriptdev2.sql | 0 sql/updates/{ => 0.8}/r3005_mangos.sql | 0 sql/updates/{ => 0.8}/r3005_scriptdev2.sql | 0 sql/updates/{ => 0.8}/r3006_mangos.sql | 0 sql/updates/{ => 0.8}/r3006_scriptdev2.sql | 0 sql/updates/{ => 0.8}/r3007_mangos.sql | 0 sql/updates/{ => 0.8}/r3007_scriptdev2.sql | 0 sql/updates/{ => 0.8}/r3008_mangos.sql | 0 sql/updates/{ => 0.8}/r3008_scriptdev2.sql | 0 sql/updates/{ => 0.8}/r3010_mangos.sql | 0 sql/updates/{ => 0.8}/r3011_mangos.sql | 0 sql/updates/{ => 0.8}/r3012_mangos.sql | 0 sql/updates/{ => 0.8}/r3012_scriptdev2.sql | 0 sql/updates/{ => 0.8}/r3013_mangos.sql | 0 sql/updates/{ => 0.8}/r3014_mangos.sql | 0 sql/updates/{ => 0.8}/r3014_scriptdev2.sql | 0 sql/updates/{ => 0.8}/r3015_mangos.sql | 0 sql/updates/{ => 0.8}/r3015_scriptdev2.sql | 0 sql/updates/{ => 0.8}/r3016_scriptdev2.sql | 0 sql/updates/{ => 0.8}/r3017_mangos.sql | 0 sql/updates/{ => 0.8}/r3018_scriptdev2.sql | 0 sql/updates/{ => 0.8}/r3019_mangos.sql | 0 sql/updates/{ => 0.8}/r3021_scriptdev2.sql | 0 sql/updates/{ => 0.8}/r3022_mangos.sql | 0 sql/updates/{ => 0.8}/r3022_scriptdev2.sql | 0 sql/updates/{ => 0.8}/r3023_mangos.sql | 0 sql/updates/{ => 0.8}/r3023_scriptdev2.sql | 0 sql/updates/{ => 0.8}/r3024_mangos.sql | 0 sql/updates/{ => 0.8}/r3024_scriptdev2.sql | 0 sql/updates/{ => 0.8}/r3025_scriptdev2.sql | 0 sql/updates/{ => 0.8}/r3028_mangos.sql | 0 sql/updates/{ => 0.8}/r3028_scriptdev2.sql | 0 sql/updates/{ => 0.8}/r3029_mangos.sql | 0 sql/updates/{ => 0.8}/r3031_mangos.sql | 0 sql/updates/{ => 0.8}/r3031_scriptdev2.sql | 0 sql/updates/{ => 0.8}/r3034_scriptdev2.sql | 0 sql/updates/{ => 0.8}/r3046_mangos.sql | 0 sql/updates/{ => 0.8}/r3048_mangos.sql | 0 sql/updates/{ => 0.8}/r3049_scriptdev2.sql | 0 sql/updates/{ => 0.8}/r3050_mangos.sql | 0 sql/updates/{ => 0.8}/r3050_scriptdev2.sql | 0 sql/updates/{ => 0.8}/r3051_mangos.sql | 0 sql/updates/{ => 0.8}/r3051_scriptdev2.sql | 0 sql/updates/{ => 0.8}/r3054_mangos.sql | 0 sql/updates/{ => 0.8}/r3054_scriptdev2.sql | 0 sql/updates/{ => 0.8}/r3055_mangos.sql | 0 sql/updates/{ => 0.8}/r3055_scriptdev2.sql | 0 sql/updates/{ => 0.8}/r3059_mangos.sql | 0 sql/updates/{ => 0.8}/r3060_mangos.sql | 0 sql/updates/{ => 0.8}/r3060_scriptdev2.sql | 0 sql/updates/{ => 0.8}/r3061_scriptdev2.sql | 0 sql/updates/{ => 0.8}/r3062_scriptdev2.sql | 0 sql/updates/{ => 0.8}/r3064_mangos.sql | 0 sql/updates/{ => 0.8}/r3064_scriptdev2.sql | 0 139 files changed, 127 insertions(+), 36 deletions(-) rename sql/updates/{ => 0.8}/r2923_mangos.sql (100%) rename sql/updates/{ => 0.8}/r2925_mangos.sql (100%) rename sql/updates/{ => 0.8}/r2926_mangos.sql (100%) rename sql/updates/{ => 0.8}/r2926_scriptdev2.sql (100%) rename sql/updates/{ => 0.8}/r2927_mangos.sql (100%) rename sql/updates/{ => 0.8}/r2927_scriptdev2.sql (100%) rename sql/updates/{ => 0.8}/r2929_mangos.sql (100%) rename sql/updates/{ => 0.8}/r2930_mangos.sql (100%) rename sql/updates/{ => 0.8}/r2930_scriptdev2.sql (100%) rename sql/updates/{ => 0.8}/r2932_mangos.sql (100%) rename sql/updates/{ => 0.8}/r2933_mangos.sql (100%) rename sql/updates/{ => 0.8}/r2933_scriptdev2.sql (100%) rename sql/updates/{ => 0.8}/r2935_mangos.sql (100%) rename sql/updates/{ => 0.8}/r2935_scriptdev2.sql (100%) rename sql/updates/{ => 0.8}/r2936_scriptdev2.sql (100%) rename sql/updates/{ => 0.8}/r2938_mangos.sql (100%) rename sql/updates/{ => 0.8}/r2939_mangos.sql (100%) rename sql/updates/{ => 0.8}/r2940_mangos.sql (100%) rename sql/updates/{ => 0.8}/r2942_mangos.sql (100%) rename sql/updates/{ => 0.8}/r2944_mangos.sql (100%) rename sql/updates/{ => 0.8}/r2946_mangos.sql (100%) rename sql/updates/{ => 0.8}/r2946_scriptdev2.sql (100%) rename sql/updates/{ => 0.8}/r2947_mangos.sql (100%) rename sql/updates/{ => 0.8}/r2948_mangos.sql (100%) rename sql/updates/{ => 0.8}/r2951_mangos.sql (100%) rename sql/updates/{ => 0.8}/r2954_mangos.sql (100%) rename sql/updates/{ => 0.8}/r2955_mangos.sql (100%) rename sql/updates/{ => 0.8}/r2955_scriptdev2.sql (100%) rename sql/updates/{ => 0.8}/r2958_mangos.sql (100%) rename sql/updates/{ => 0.8}/r2959_mangos.sql (100%) rename sql/updates/{ => 0.8}/r2959_scriptdev2.sql (100%) rename sql/updates/{ => 0.8}/r2962_mangos.sql (100%) rename sql/updates/{ => 0.8}/r2963_mangos.sql (100%) rename sql/updates/{ => 0.8}/r2964_mangos.sql (100%) rename sql/updates/{ => 0.8}/r2965_mangos.sql (100%) rename sql/updates/{ => 0.8}/r2965_scriptdev2.sql (100%) rename sql/updates/{ => 0.8}/r2967_mangos.sql (100%) rename sql/updates/{ => 0.8}/r2969_mangos.sql (100%) rename sql/updates/{ => 0.8}/r2970_mangos.sql (100%) rename sql/updates/{ => 0.8}/r2970_scriptdev2.sql (100%) rename sql/updates/{ => 0.8}/r2971_mangos.sql (100%) rename sql/updates/{ => 0.8}/r2971_scriptdev2.sql (100%) rename sql/updates/{ => 0.8}/r2972_mangos.sql (100%) rename sql/updates/{ => 0.8}/r2973_mangos.sql (100%) rename sql/updates/{ => 0.8}/r2973_scriptdev2.sql (100%) rename sql/updates/{ => 0.8}/r2974_mangos.sql (100%) rename sql/updates/{ => 0.8}/r2977_mangos.sql (100%) rename sql/updates/{ => 0.8}/r2977_scriptdev2.sql (100%) rename sql/updates/{ => 0.8}/r2978_mangos.sql (100%) rename sql/updates/{ => 0.8}/r2978_scriptdev2.sql (100%) rename sql/updates/{ => 0.8}/r2980_mangos.sql (100%) rename sql/updates/{ => 0.8}/r2981_mangos.sql (100%) rename sql/updates/{ => 0.8}/r2982_mangos.sql (100%) rename sql/updates/{ => 0.8}/r2983_scriptdev2.sql (100%) rename sql/updates/{ => 0.8}/r2984_mangos.sql (100%) rename sql/updates/{ => 0.8}/r2985_mangos.sql (100%) rename sql/updates/{ => 0.8}/r2985_scriptdev2.sql (100%) rename sql/updates/{ => 0.8}/r2987_mangos.sql (100%) rename sql/updates/{ => 0.8}/r2987_scriptdev2.sql (100%) rename sql/updates/{ => 0.8}/r2988_mangos.sql (100%) rename sql/updates/{ => 0.8}/r2989_mangos.sql (100%) rename sql/updates/{ => 0.8}/r2991_scriptdev2.sql (100%) rename sql/updates/{ => 0.8}/r2992_mangos.sql (100%) rename sql/updates/{ => 0.8}/r2993_scriptdev2.sql (100%) rename sql/updates/{ => 0.8}/r2994_mangos.sql (100%) rename sql/updates/{ => 0.8}/r2994_scriptdev2.sql (100%) rename sql/updates/{ => 0.8}/r2995_mangos.sql (100%) rename sql/updates/{ => 0.8}/r2995_scriptdev2.sql (100%) rename sql/updates/{ => 0.8}/r2996_mangos.sql (100%) rename sql/updates/{ => 0.8}/r2996_scriptdev2.sql (100%) rename sql/updates/{ => 0.8}/r2997_mangos.sql (100%) rename sql/updates/{ => 0.8}/r2997_scriptdev2.sql (100%) rename sql/updates/{ => 0.8}/r2998_mangos.sql (100%) rename sql/updates/{ => 0.8}/r2998_scriptdev2.sql (100%) rename sql/updates/{ => 0.8}/r2999_mangos.sql (100%) rename sql/updates/{ => 0.8}/r2999_scriptdev2.sql (100%) rename sql/updates/{ => 0.8}/r3001_scriptdev2.sql (100%) rename sql/updates/{ => 0.8}/r3002_mangos.sql (100%) rename sql/updates/{ => 0.8}/r3002_scriptdev2.sql (100%) rename sql/updates/{ => 0.8}/r3004_mangos.sql (100%) rename sql/updates/{ => 0.8}/r3004_scriptdev2.sql (100%) rename sql/updates/{ => 0.8}/r3005_mangos.sql (100%) rename sql/updates/{ => 0.8}/r3005_scriptdev2.sql (100%) rename sql/updates/{ => 0.8}/r3006_mangos.sql (100%) rename sql/updates/{ => 0.8}/r3006_scriptdev2.sql (100%) rename sql/updates/{ => 0.8}/r3007_mangos.sql (100%) rename sql/updates/{ => 0.8}/r3007_scriptdev2.sql (100%) rename sql/updates/{ => 0.8}/r3008_mangos.sql (100%) rename sql/updates/{ => 0.8}/r3008_scriptdev2.sql (100%) rename sql/updates/{ => 0.8}/r3010_mangos.sql (100%) rename sql/updates/{ => 0.8}/r3011_mangos.sql (100%) rename sql/updates/{ => 0.8}/r3012_mangos.sql (100%) rename sql/updates/{ => 0.8}/r3012_scriptdev2.sql (100%) rename sql/updates/{ => 0.8}/r3013_mangos.sql (100%) rename sql/updates/{ => 0.8}/r3014_mangos.sql (100%) rename sql/updates/{ => 0.8}/r3014_scriptdev2.sql (100%) rename sql/updates/{ => 0.8}/r3015_mangos.sql (100%) rename sql/updates/{ => 0.8}/r3015_scriptdev2.sql (100%) rename sql/updates/{ => 0.8}/r3016_scriptdev2.sql (100%) rename sql/updates/{ => 0.8}/r3017_mangos.sql (100%) rename sql/updates/{ => 0.8}/r3018_scriptdev2.sql (100%) rename sql/updates/{ => 0.8}/r3019_mangos.sql (100%) rename sql/updates/{ => 0.8}/r3021_scriptdev2.sql (100%) rename sql/updates/{ => 0.8}/r3022_mangos.sql (100%) rename sql/updates/{ => 0.8}/r3022_scriptdev2.sql (100%) rename sql/updates/{ => 0.8}/r3023_mangos.sql (100%) rename sql/updates/{ => 0.8}/r3023_scriptdev2.sql (100%) rename sql/updates/{ => 0.8}/r3024_mangos.sql (100%) rename sql/updates/{ => 0.8}/r3024_scriptdev2.sql (100%) rename sql/updates/{ => 0.8}/r3025_scriptdev2.sql (100%) rename sql/updates/{ => 0.8}/r3028_mangos.sql (100%) rename sql/updates/{ => 0.8}/r3028_scriptdev2.sql (100%) rename sql/updates/{ => 0.8}/r3029_mangos.sql (100%) rename sql/updates/{ => 0.8}/r3031_mangos.sql (100%) rename sql/updates/{ => 0.8}/r3031_scriptdev2.sql (100%) rename sql/updates/{ => 0.8}/r3034_scriptdev2.sql (100%) rename sql/updates/{ => 0.8}/r3046_mangos.sql (100%) rename sql/updates/{ => 0.8}/r3048_mangos.sql (100%) rename sql/updates/{ => 0.8}/r3049_scriptdev2.sql (100%) rename sql/updates/{ => 0.8}/r3050_mangos.sql (100%) rename sql/updates/{ => 0.8}/r3050_scriptdev2.sql (100%) rename sql/updates/{ => 0.8}/r3051_mangos.sql (100%) rename sql/updates/{ => 0.8}/r3051_scriptdev2.sql (100%) rename sql/updates/{ => 0.8}/r3054_mangos.sql (100%) rename sql/updates/{ => 0.8}/r3054_scriptdev2.sql (100%) rename sql/updates/{ => 0.8}/r3055_mangos.sql (100%) rename sql/updates/{ => 0.8}/r3055_scriptdev2.sql (100%) rename sql/updates/{ => 0.8}/r3059_mangos.sql (100%) rename sql/updates/{ => 0.8}/r3060_mangos.sql (100%) rename sql/updates/{ => 0.8}/r3060_scriptdev2.sql (100%) rename sql/updates/{ => 0.8}/r3061_scriptdev2.sql (100%) rename sql/updates/{ => 0.8}/r3062_scriptdev2.sql (100%) rename sql/updates/{ => 0.8}/r3064_mangos.sql (100%) rename sql/updates/{ => 0.8}/r3064_scriptdev2.sql (100%) diff --git a/docs/ChangeLog.html b/docs/ChangeLog.html index ad32c980a..94eacfd9a 100644 --- a/docs/ChangeLog.html +++ b/docs/ChangeLog.html @@ -740,7 +740,7 @@

    ScriptDev2 Milestones

    - +

    Supports:

    • @@ -767,13 +767,93 @@

      ScriptDev2 Milestones

    -

    1. Milestone ScriptDev2 - 0.7

    +

    1. Milestone ScriptDev2 - 0.8

    1.1. General

    • +Implemented various missing quest scripts and similar events +

      +
    • +
    • +

      +Implemented many missing escort quests +

      +
    • +
    +
    +
    +

    1.2. WotLK content

    +
      +
    • +

      +Implemented full script for Ulduar +

      +
    • +
    • +

      +Implemented full script for Culling of Stratholme +

      +
    • +
    +
    +
    +

    1.3. TBC content

    +
      +
    • +

      +Implemented script for event boss Headless Horseman +

      +
    • +
    • +

      +Various improvements and bug fixes +

      +
    • +
    +
    +
    +

    1.4. Classic content

    +
      +
    • +

      +Implemented script for boss Viscidus in AQ40 +

      +
    • +
    • +

      +Various improvements and bug fixes +

      +
    • +
    +
    +

    1.4.1. Statistics

    +
      +
    • +

      +Total number of changes: over 144 revisions +

      +
    • +
    • +

      +Fixed many bugs from forum and issues from github +

      +
    • +
    +
    +
    +
    +
    +
    +

    2. Milestone ScriptDev2 - 0.7

    +
    +
    +

    2.1. General

    +
      +
    • +

      Unify texts loading with the core

    • @@ -790,7 +870,7 @@

      1.1. General

    -

    1.2. WotLK content

    +

    2.2. WotLK content

    • @@ -815,7 +895,7 @@

      1.2. WotLK content

    -

    1.3. TBC content

    +

    2.3. TBC content

    • @@ -840,7 +920,7 @@

      1.3. TBC content

    -

    1.4. Classic content

    +

    2.4. Classic content

    • @@ -854,7 +934,7 @@

      1.4. Classic content

    -

    1.4.1. Statistics

    +

    2.4.1. Statistics

    • @@ -872,10 +952,10 @@

      1.4.1. Statistics

    -

    2. Milestone ScriptDev2 - 0.6

    +

    3. Milestone ScriptDev2 - 0.6

    -

    2.1. General

    +

    3.1. General

    • @@ -925,7 +1005,7 @@

      2.1. General

    -

    2.2. WotLK content

    +

    3.2. WotLK content

    • @@ -955,7 +1035,7 @@

      2.2. WotLK content

    -

    2.3. TBC content

    +

    3.3. TBC content

    • @@ -985,7 +1065,7 @@

      2.3. TBC content

    -

    2.4. Classic content

    +

    3.4. Classic content

    • @@ -1014,7 +1094,7 @@

      2.4. Classic content

    -

    2.4.1. Statistics

    +

    3.4.1. Statistics

    • @@ -1035,7 +1115,7 @@

      2.4.1. Statistics


      diff --git a/docs/ChangeLog.txt b/docs/ChangeLog.txt index 74e5332d0..6c0eaef8c 100644 --- a/docs/ChangeLog.txt +++ b/docs/ChangeLog.txt @@ -1,6 +1,6 @@ = ScriptDev2 Milestones = -*Current Version: <>* +*Current Version: <>* *Supports:* @@ -10,6 +10,29 @@ * Cata (4.3.4), see https://github.com/scriptdev2/scriptdev2-cata [[currentMS]] +== Milestone ScriptDev2 - 0.8 == + +=== General === +* Implemented various missing quest scripts and similar events +* Implemented many missing escort quests + +=== WotLK content === +* Implemented full script for Ulduar +* Implemented full script for Culling of Stratholme + +=== TBC content === +* Implemented script for event boss Headless Horseman +* Various improvements and bug fixes + +=== Classic content === +* Implemented script for boss Viscidus in AQ40 +* Various improvements and bug fixes + +==== Statistics ==== +* Total number of changes: over 144 revisions +* Fixed many bugs from forum and issues from github + + == Milestone ScriptDev2 - 0.7 == === General === diff --git a/docs/ToDo.html b/docs/ToDo.html index 1974083bf..2c47a6819 100644 --- a/docs/ToDo.html +++ b/docs/ToDo.html @@ -756,17 +756,12 @@

      2. WotLK content

      • -Finish script for Ulduar, Trial of the Crusader, Icecrown Citadel, Eye of Eternity and Ruby Sanctum +Finish script for Trial of the Crusader, Icecrown Citadel, Eye of Eternity and Ruby Sanctum

      • -Implement dungeon scripts for Halls of Reflection, Trial of the Champion and Culling of Stratholme (requires core proper waipoint movement support) -

        -
      • -
      • -

        -Implement Year event boss - Headless Horseman +Implement dungeon scripts for Halls of Reflection and Trial of the Champion

      • @@ -783,7 +778,7 @@

        3. TBC content

        • -Various quests which still require script (examples: 5821, 5943, 9729, 9879, 10310, 11085, 10985) +Various quests which still require script (examples: 5821, 5943, 10985)

        • @@ -805,12 +800,7 @@

          4. Classic content

          • -Various quests which still require script (examples: 667, 3367, 5721) -

            -
          • -
          • -

            -Temple of AQ - Add missing script part for Viscidus +Various quests which still require script (examples: 5721)

          @@ -820,7 +810,7 @@

          4. Classic content


          diff --git a/docs/ToDo.txt b/docs/ToDo.txt index b25eef7dc..7ccd350b2 100644 --- a/docs/ToDo.txt +++ b/docs/ToDo.txt @@ -4,16 +4,14 @@ * Start implementing 4.x scripts for dungeons and quests == WotLK content == -* Finish script for Ulduar, Trial of the Crusader, Icecrown Citadel, Eye of Eternity and Ruby Sanctum -* Implement dungeon scripts for Halls of Reflection, Trial of the Champion and Culling of Stratholme (requires core proper waipoint movement support) -* Implement Year event boss - Headless Horseman +* Finish script for Trial of the Crusader, Icecrown Citadel, Eye of Eternity and Ruby Sanctum +* Implement dungeon scripts for Halls of Reflection and Trial of the Champion * Implement various missing quest scripts == TBC content == -* Various quests which still require script (examples: 5821, 5943, 9729, 9879, 10310, 11085, 10985) +* Various quests which still require script (examples: 5821, 5943, 10985) * Hyjal Summit - Optimize game event. * Black Temple - Teron Gorefiend script improvement (requires core proper mind control support) == Classic content == -* Various quests which still require script (examples: 667, 3367, 5721) -* Temple of AQ - Add missing script part for Viscidus +* Various quests which still require script (examples: 5721) diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 8e82de524..aed44f4fd 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3066" + #define SD2_REVISION_NR "3067" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/updates/r2923_mangos.sql b/sql/updates/0.8/r2923_mangos.sql similarity index 100% rename from sql/updates/r2923_mangos.sql rename to sql/updates/0.8/r2923_mangos.sql diff --git a/sql/updates/r2925_mangos.sql b/sql/updates/0.8/r2925_mangos.sql similarity index 100% rename from sql/updates/r2925_mangos.sql rename to sql/updates/0.8/r2925_mangos.sql diff --git a/sql/updates/r2926_mangos.sql b/sql/updates/0.8/r2926_mangos.sql similarity index 100% rename from sql/updates/r2926_mangos.sql rename to sql/updates/0.8/r2926_mangos.sql diff --git a/sql/updates/r2926_scriptdev2.sql b/sql/updates/0.8/r2926_scriptdev2.sql similarity index 100% rename from sql/updates/r2926_scriptdev2.sql rename to sql/updates/0.8/r2926_scriptdev2.sql diff --git a/sql/updates/r2927_mangos.sql b/sql/updates/0.8/r2927_mangos.sql similarity index 100% rename from sql/updates/r2927_mangos.sql rename to sql/updates/0.8/r2927_mangos.sql diff --git a/sql/updates/r2927_scriptdev2.sql b/sql/updates/0.8/r2927_scriptdev2.sql similarity index 100% rename from sql/updates/r2927_scriptdev2.sql rename to sql/updates/0.8/r2927_scriptdev2.sql diff --git a/sql/updates/r2929_mangos.sql b/sql/updates/0.8/r2929_mangos.sql similarity index 100% rename from sql/updates/r2929_mangos.sql rename to sql/updates/0.8/r2929_mangos.sql diff --git a/sql/updates/r2930_mangos.sql b/sql/updates/0.8/r2930_mangos.sql similarity index 100% rename from sql/updates/r2930_mangos.sql rename to sql/updates/0.8/r2930_mangos.sql diff --git a/sql/updates/r2930_scriptdev2.sql b/sql/updates/0.8/r2930_scriptdev2.sql similarity index 100% rename from sql/updates/r2930_scriptdev2.sql rename to sql/updates/0.8/r2930_scriptdev2.sql diff --git a/sql/updates/r2932_mangos.sql b/sql/updates/0.8/r2932_mangos.sql similarity index 100% rename from sql/updates/r2932_mangos.sql rename to sql/updates/0.8/r2932_mangos.sql diff --git a/sql/updates/r2933_mangos.sql b/sql/updates/0.8/r2933_mangos.sql similarity index 100% rename from sql/updates/r2933_mangos.sql rename to sql/updates/0.8/r2933_mangos.sql diff --git a/sql/updates/r2933_scriptdev2.sql b/sql/updates/0.8/r2933_scriptdev2.sql similarity index 100% rename from sql/updates/r2933_scriptdev2.sql rename to sql/updates/0.8/r2933_scriptdev2.sql diff --git a/sql/updates/r2935_mangos.sql b/sql/updates/0.8/r2935_mangos.sql similarity index 100% rename from sql/updates/r2935_mangos.sql rename to sql/updates/0.8/r2935_mangos.sql diff --git a/sql/updates/r2935_scriptdev2.sql b/sql/updates/0.8/r2935_scriptdev2.sql similarity index 100% rename from sql/updates/r2935_scriptdev2.sql rename to sql/updates/0.8/r2935_scriptdev2.sql diff --git a/sql/updates/r2936_scriptdev2.sql b/sql/updates/0.8/r2936_scriptdev2.sql similarity index 100% rename from sql/updates/r2936_scriptdev2.sql rename to sql/updates/0.8/r2936_scriptdev2.sql diff --git a/sql/updates/r2938_mangos.sql b/sql/updates/0.8/r2938_mangos.sql similarity index 100% rename from sql/updates/r2938_mangos.sql rename to sql/updates/0.8/r2938_mangos.sql diff --git a/sql/updates/r2939_mangos.sql b/sql/updates/0.8/r2939_mangos.sql similarity index 100% rename from sql/updates/r2939_mangos.sql rename to sql/updates/0.8/r2939_mangos.sql diff --git a/sql/updates/r2940_mangos.sql b/sql/updates/0.8/r2940_mangos.sql similarity index 100% rename from sql/updates/r2940_mangos.sql rename to sql/updates/0.8/r2940_mangos.sql diff --git a/sql/updates/r2942_mangos.sql b/sql/updates/0.8/r2942_mangos.sql similarity index 100% rename from sql/updates/r2942_mangos.sql rename to sql/updates/0.8/r2942_mangos.sql diff --git a/sql/updates/r2944_mangos.sql b/sql/updates/0.8/r2944_mangos.sql similarity index 100% rename from sql/updates/r2944_mangos.sql rename to sql/updates/0.8/r2944_mangos.sql diff --git a/sql/updates/r2946_mangos.sql b/sql/updates/0.8/r2946_mangos.sql similarity index 100% rename from sql/updates/r2946_mangos.sql rename to sql/updates/0.8/r2946_mangos.sql diff --git a/sql/updates/r2946_scriptdev2.sql b/sql/updates/0.8/r2946_scriptdev2.sql similarity index 100% rename from sql/updates/r2946_scriptdev2.sql rename to sql/updates/0.8/r2946_scriptdev2.sql diff --git a/sql/updates/r2947_mangos.sql b/sql/updates/0.8/r2947_mangos.sql similarity index 100% rename from sql/updates/r2947_mangos.sql rename to sql/updates/0.8/r2947_mangos.sql diff --git a/sql/updates/r2948_mangos.sql b/sql/updates/0.8/r2948_mangos.sql similarity index 100% rename from sql/updates/r2948_mangos.sql rename to sql/updates/0.8/r2948_mangos.sql diff --git a/sql/updates/r2951_mangos.sql b/sql/updates/0.8/r2951_mangos.sql similarity index 100% rename from sql/updates/r2951_mangos.sql rename to sql/updates/0.8/r2951_mangos.sql diff --git a/sql/updates/r2954_mangos.sql b/sql/updates/0.8/r2954_mangos.sql similarity index 100% rename from sql/updates/r2954_mangos.sql rename to sql/updates/0.8/r2954_mangos.sql diff --git a/sql/updates/r2955_mangos.sql b/sql/updates/0.8/r2955_mangos.sql similarity index 100% rename from sql/updates/r2955_mangos.sql rename to sql/updates/0.8/r2955_mangos.sql diff --git a/sql/updates/r2955_scriptdev2.sql b/sql/updates/0.8/r2955_scriptdev2.sql similarity index 100% rename from sql/updates/r2955_scriptdev2.sql rename to sql/updates/0.8/r2955_scriptdev2.sql diff --git a/sql/updates/r2958_mangos.sql b/sql/updates/0.8/r2958_mangos.sql similarity index 100% rename from sql/updates/r2958_mangos.sql rename to sql/updates/0.8/r2958_mangos.sql diff --git a/sql/updates/r2959_mangos.sql b/sql/updates/0.8/r2959_mangos.sql similarity index 100% rename from sql/updates/r2959_mangos.sql rename to sql/updates/0.8/r2959_mangos.sql diff --git a/sql/updates/r2959_scriptdev2.sql b/sql/updates/0.8/r2959_scriptdev2.sql similarity index 100% rename from sql/updates/r2959_scriptdev2.sql rename to sql/updates/0.8/r2959_scriptdev2.sql diff --git a/sql/updates/r2962_mangos.sql b/sql/updates/0.8/r2962_mangos.sql similarity index 100% rename from sql/updates/r2962_mangos.sql rename to sql/updates/0.8/r2962_mangos.sql diff --git a/sql/updates/r2963_mangos.sql b/sql/updates/0.8/r2963_mangos.sql similarity index 100% rename from sql/updates/r2963_mangos.sql rename to sql/updates/0.8/r2963_mangos.sql diff --git a/sql/updates/r2964_mangos.sql b/sql/updates/0.8/r2964_mangos.sql similarity index 100% rename from sql/updates/r2964_mangos.sql rename to sql/updates/0.8/r2964_mangos.sql diff --git a/sql/updates/r2965_mangos.sql b/sql/updates/0.8/r2965_mangos.sql similarity index 100% rename from sql/updates/r2965_mangos.sql rename to sql/updates/0.8/r2965_mangos.sql diff --git a/sql/updates/r2965_scriptdev2.sql b/sql/updates/0.8/r2965_scriptdev2.sql similarity index 100% rename from sql/updates/r2965_scriptdev2.sql rename to sql/updates/0.8/r2965_scriptdev2.sql diff --git a/sql/updates/r2967_mangos.sql b/sql/updates/0.8/r2967_mangos.sql similarity index 100% rename from sql/updates/r2967_mangos.sql rename to sql/updates/0.8/r2967_mangos.sql diff --git a/sql/updates/r2969_mangos.sql b/sql/updates/0.8/r2969_mangos.sql similarity index 100% rename from sql/updates/r2969_mangos.sql rename to sql/updates/0.8/r2969_mangos.sql diff --git a/sql/updates/r2970_mangos.sql b/sql/updates/0.8/r2970_mangos.sql similarity index 100% rename from sql/updates/r2970_mangos.sql rename to sql/updates/0.8/r2970_mangos.sql diff --git a/sql/updates/r2970_scriptdev2.sql b/sql/updates/0.8/r2970_scriptdev2.sql similarity index 100% rename from sql/updates/r2970_scriptdev2.sql rename to sql/updates/0.8/r2970_scriptdev2.sql diff --git a/sql/updates/r2971_mangos.sql b/sql/updates/0.8/r2971_mangos.sql similarity index 100% rename from sql/updates/r2971_mangos.sql rename to sql/updates/0.8/r2971_mangos.sql diff --git a/sql/updates/r2971_scriptdev2.sql b/sql/updates/0.8/r2971_scriptdev2.sql similarity index 100% rename from sql/updates/r2971_scriptdev2.sql rename to sql/updates/0.8/r2971_scriptdev2.sql diff --git a/sql/updates/r2972_mangos.sql b/sql/updates/0.8/r2972_mangos.sql similarity index 100% rename from sql/updates/r2972_mangos.sql rename to sql/updates/0.8/r2972_mangos.sql diff --git a/sql/updates/r2973_mangos.sql b/sql/updates/0.8/r2973_mangos.sql similarity index 100% rename from sql/updates/r2973_mangos.sql rename to sql/updates/0.8/r2973_mangos.sql diff --git a/sql/updates/r2973_scriptdev2.sql b/sql/updates/0.8/r2973_scriptdev2.sql similarity index 100% rename from sql/updates/r2973_scriptdev2.sql rename to sql/updates/0.8/r2973_scriptdev2.sql diff --git a/sql/updates/r2974_mangos.sql b/sql/updates/0.8/r2974_mangos.sql similarity index 100% rename from sql/updates/r2974_mangos.sql rename to sql/updates/0.8/r2974_mangos.sql diff --git a/sql/updates/r2977_mangos.sql b/sql/updates/0.8/r2977_mangos.sql similarity index 100% rename from sql/updates/r2977_mangos.sql rename to sql/updates/0.8/r2977_mangos.sql diff --git a/sql/updates/r2977_scriptdev2.sql b/sql/updates/0.8/r2977_scriptdev2.sql similarity index 100% rename from sql/updates/r2977_scriptdev2.sql rename to sql/updates/0.8/r2977_scriptdev2.sql diff --git a/sql/updates/r2978_mangos.sql b/sql/updates/0.8/r2978_mangos.sql similarity index 100% rename from sql/updates/r2978_mangos.sql rename to sql/updates/0.8/r2978_mangos.sql diff --git a/sql/updates/r2978_scriptdev2.sql b/sql/updates/0.8/r2978_scriptdev2.sql similarity index 100% rename from sql/updates/r2978_scriptdev2.sql rename to sql/updates/0.8/r2978_scriptdev2.sql diff --git a/sql/updates/r2980_mangos.sql b/sql/updates/0.8/r2980_mangos.sql similarity index 100% rename from sql/updates/r2980_mangos.sql rename to sql/updates/0.8/r2980_mangos.sql diff --git a/sql/updates/r2981_mangos.sql b/sql/updates/0.8/r2981_mangos.sql similarity index 100% rename from sql/updates/r2981_mangos.sql rename to sql/updates/0.8/r2981_mangos.sql diff --git a/sql/updates/r2982_mangos.sql b/sql/updates/0.8/r2982_mangos.sql similarity index 100% rename from sql/updates/r2982_mangos.sql rename to sql/updates/0.8/r2982_mangos.sql diff --git a/sql/updates/r2983_scriptdev2.sql b/sql/updates/0.8/r2983_scriptdev2.sql similarity index 100% rename from sql/updates/r2983_scriptdev2.sql rename to sql/updates/0.8/r2983_scriptdev2.sql diff --git a/sql/updates/r2984_mangos.sql b/sql/updates/0.8/r2984_mangos.sql similarity index 100% rename from sql/updates/r2984_mangos.sql rename to sql/updates/0.8/r2984_mangos.sql diff --git a/sql/updates/r2985_mangos.sql b/sql/updates/0.8/r2985_mangos.sql similarity index 100% rename from sql/updates/r2985_mangos.sql rename to sql/updates/0.8/r2985_mangos.sql diff --git a/sql/updates/r2985_scriptdev2.sql b/sql/updates/0.8/r2985_scriptdev2.sql similarity index 100% rename from sql/updates/r2985_scriptdev2.sql rename to sql/updates/0.8/r2985_scriptdev2.sql diff --git a/sql/updates/r2987_mangos.sql b/sql/updates/0.8/r2987_mangos.sql similarity index 100% rename from sql/updates/r2987_mangos.sql rename to sql/updates/0.8/r2987_mangos.sql diff --git a/sql/updates/r2987_scriptdev2.sql b/sql/updates/0.8/r2987_scriptdev2.sql similarity index 100% rename from sql/updates/r2987_scriptdev2.sql rename to sql/updates/0.8/r2987_scriptdev2.sql diff --git a/sql/updates/r2988_mangos.sql b/sql/updates/0.8/r2988_mangos.sql similarity index 100% rename from sql/updates/r2988_mangos.sql rename to sql/updates/0.8/r2988_mangos.sql diff --git a/sql/updates/r2989_mangos.sql b/sql/updates/0.8/r2989_mangos.sql similarity index 100% rename from sql/updates/r2989_mangos.sql rename to sql/updates/0.8/r2989_mangos.sql diff --git a/sql/updates/r2991_scriptdev2.sql b/sql/updates/0.8/r2991_scriptdev2.sql similarity index 100% rename from sql/updates/r2991_scriptdev2.sql rename to sql/updates/0.8/r2991_scriptdev2.sql diff --git a/sql/updates/r2992_mangos.sql b/sql/updates/0.8/r2992_mangos.sql similarity index 100% rename from sql/updates/r2992_mangos.sql rename to sql/updates/0.8/r2992_mangos.sql diff --git a/sql/updates/r2993_scriptdev2.sql b/sql/updates/0.8/r2993_scriptdev2.sql similarity index 100% rename from sql/updates/r2993_scriptdev2.sql rename to sql/updates/0.8/r2993_scriptdev2.sql diff --git a/sql/updates/r2994_mangos.sql b/sql/updates/0.8/r2994_mangos.sql similarity index 100% rename from sql/updates/r2994_mangos.sql rename to sql/updates/0.8/r2994_mangos.sql diff --git a/sql/updates/r2994_scriptdev2.sql b/sql/updates/0.8/r2994_scriptdev2.sql similarity index 100% rename from sql/updates/r2994_scriptdev2.sql rename to sql/updates/0.8/r2994_scriptdev2.sql diff --git a/sql/updates/r2995_mangos.sql b/sql/updates/0.8/r2995_mangos.sql similarity index 100% rename from sql/updates/r2995_mangos.sql rename to sql/updates/0.8/r2995_mangos.sql diff --git a/sql/updates/r2995_scriptdev2.sql b/sql/updates/0.8/r2995_scriptdev2.sql similarity index 100% rename from sql/updates/r2995_scriptdev2.sql rename to sql/updates/0.8/r2995_scriptdev2.sql diff --git a/sql/updates/r2996_mangos.sql b/sql/updates/0.8/r2996_mangos.sql similarity index 100% rename from sql/updates/r2996_mangos.sql rename to sql/updates/0.8/r2996_mangos.sql diff --git a/sql/updates/r2996_scriptdev2.sql b/sql/updates/0.8/r2996_scriptdev2.sql similarity index 100% rename from sql/updates/r2996_scriptdev2.sql rename to sql/updates/0.8/r2996_scriptdev2.sql diff --git a/sql/updates/r2997_mangos.sql b/sql/updates/0.8/r2997_mangos.sql similarity index 100% rename from sql/updates/r2997_mangos.sql rename to sql/updates/0.8/r2997_mangos.sql diff --git a/sql/updates/r2997_scriptdev2.sql b/sql/updates/0.8/r2997_scriptdev2.sql similarity index 100% rename from sql/updates/r2997_scriptdev2.sql rename to sql/updates/0.8/r2997_scriptdev2.sql diff --git a/sql/updates/r2998_mangos.sql b/sql/updates/0.8/r2998_mangos.sql similarity index 100% rename from sql/updates/r2998_mangos.sql rename to sql/updates/0.8/r2998_mangos.sql diff --git a/sql/updates/r2998_scriptdev2.sql b/sql/updates/0.8/r2998_scriptdev2.sql similarity index 100% rename from sql/updates/r2998_scriptdev2.sql rename to sql/updates/0.8/r2998_scriptdev2.sql diff --git a/sql/updates/r2999_mangos.sql b/sql/updates/0.8/r2999_mangos.sql similarity index 100% rename from sql/updates/r2999_mangos.sql rename to sql/updates/0.8/r2999_mangos.sql diff --git a/sql/updates/r2999_scriptdev2.sql b/sql/updates/0.8/r2999_scriptdev2.sql similarity index 100% rename from sql/updates/r2999_scriptdev2.sql rename to sql/updates/0.8/r2999_scriptdev2.sql diff --git a/sql/updates/r3001_scriptdev2.sql b/sql/updates/0.8/r3001_scriptdev2.sql similarity index 100% rename from sql/updates/r3001_scriptdev2.sql rename to sql/updates/0.8/r3001_scriptdev2.sql diff --git a/sql/updates/r3002_mangos.sql b/sql/updates/0.8/r3002_mangos.sql similarity index 100% rename from sql/updates/r3002_mangos.sql rename to sql/updates/0.8/r3002_mangos.sql diff --git a/sql/updates/r3002_scriptdev2.sql b/sql/updates/0.8/r3002_scriptdev2.sql similarity index 100% rename from sql/updates/r3002_scriptdev2.sql rename to sql/updates/0.8/r3002_scriptdev2.sql diff --git a/sql/updates/r3004_mangos.sql b/sql/updates/0.8/r3004_mangos.sql similarity index 100% rename from sql/updates/r3004_mangos.sql rename to sql/updates/0.8/r3004_mangos.sql diff --git a/sql/updates/r3004_scriptdev2.sql b/sql/updates/0.8/r3004_scriptdev2.sql similarity index 100% rename from sql/updates/r3004_scriptdev2.sql rename to sql/updates/0.8/r3004_scriptdev2.sql diff --git a/sql/updates/r3005_mangos.sql b/sql/updates/0.8/r3005_mangos.sql similarity index 100% rename from sql/updates/r3005_mangos.sql rename to sql/updates/0.8/r3005_mangos.sql diff --git a/sql/updates/r3005_scriptdev2.sql b/sql/updates/0.8/r3005_scriptdev2.sql similarity index 100% rename from sql/updates/r3005_scriptdev2.sql rename to sql/updates/0.8/r3005_scriptdev2.sql diff --git a/sql/updates/r3006_mangos.sql b/sql/updates/0.8/r3006_mangos.sql similarity index 100% rename from sql/updates/r3006_mangos.sql rename to sql/updates/0.8/r3006_mangos.sql diff --git a/sql/updates/r3006_scriptdev2.sql b/sql/updates/0.8/r3006_scriptdev2.sql similarity index 100% rename from sql/updates/r3006_scriptdev2.sql rename to sql/updates/0.8/r3006_scriptdev2.sql diff --git a/sql/updates/r3007_mangos.sql b/sql/updates/0.8/r3007_mangos.sql similarity index 100% rename from sql/updates/r3007_mangos.sql rename to sql/updates/0.8/r3007_mangos.sql diff --git a/sql/updates/r3007_scriptdev2.sql b/sql/updates/0.8/r3007_scriptdev2.sql similarity index 100% rename from sql/updates/r3007_scriptdev2.sql rename to sql/updates/0.8/r3007_scriptdev2.sql diff --git a/sql/updates/r3008_mangos.sql b/sql/updates/0.8/r3008_mangos.sql similarity index 100% rename from sql/updates/r3008_mangos.sql rename to sql/updates/0.8/r3008_mangos.sql diff --git a/sql/updates/r3008_scriptdev2.sql b/sql/updates/0.8/r3008_scriptdev2.sql similarity index 100% rename from sql/updates/r3008_scriptdev2.sql rename to sql/updates/0.8/r3008_scriptdev2.sql diff --git a/sql/updates/r3010_mangos.sql b/sql/updates/0.8/r3010_mangos.sql similarity index 100% rename from sql/updates/r3010_mangos.sql rename to sql/updates/0.8/r3010_mangos.sql diff --git a/sql/updates/r3011_mangos.sql b/sql/updates/0.8/r3011_mangos.sql similarity index 100% rename from sql/updates/r3011_mangos.sql rename to sql/updates/0.8/r3011_mangos.sql diff --git a/sql/updates/r3012_mangos.sql b/sql/updates/0.8/r3012_mangos.sql similarity index 100% rename from sql/updates/r3012_mangos.sql rename to sql/updates/0.8/r3012_mangos.sql diff --git a/sql/updates/r3012_scriptdev2.sql b/sql/updates/0.8/r3012_scriptdev2.sql similarity index 100% rename from sql/updates/r3012_scriptdev2.sql rename to sql/updates/0.8/r3012_scriptdev2.sql diff --git a/sql/updates/r3013_mangos.sql b/sql/updates/0.8/r3013_mangos.sql similarity index 100% rename from sql/updates/r3013_mangos.sql rename to sql/updates/0.8/r3013_mangos.sql diff --git a/sql/updates/r3014_mangos.sql b/sql/updates/0.8/r3014_mangos.sql similarity index 100% rename from sql/updates/r3014_mangos.sql rename to sql/updates/0.8/r3014_mangos.sql diff --git a/sql/updates/r3014_scriptdev2.sql b/sql/updates/0.8/r3014_scriptdev2.sql similarity index 100% rename from sql/updates/r3014_scriptdev2.sql rename to sql/updates/0.8/r3014_scriptdev2.sql diff --git a/sql/updates/r3015_mangos.sql b/sql/updates/0.8/r3015_mangos.sql similarity index 100% rename from sql/updates/r3015_mangos.sql rename to sql/updates/0.8/r3015_mangos.sql diff --git a/sql/updates/r3015_scriptdev2.sql b/sql/updates/0.8/r3015_scriptdev2.sql similarity index 100% rename from sql/updates/r3015_scriptdev2.sql rename to sql/updates/0.8/r3015_scriptdev2.sql diff --git a/sql/updates/r3016_scriptdev2.sql b/sql/updates/0.8/r3016_scriptdev2.sql similarity index 100% rename from sql/updates/r3016_scriptdev2.sql rename to sql/updates/0.8/r3016_scriptdev2.sql diff --git a/sql/updates/r3017_mangos.sql b/sql/updates/0.8/r3017_mangos.sql similarity index 100% rename from sql/updates/r3017_mangos.sql rename to sql/updates/0.8/r3017_mangos.sql diff --git a/sql/updates/r3018_scriptdev2.sql b/sql/updates/0.8/r3018_scriptdev2.sql similarity index 100% rename from sql/updates/r3018_scriptdev2.sql rename to sql/updates/0.8/r3018_scriptdev2.sql diff --git a/sql/updates/r3019_mangos.sql b/sql/updates/0.8/r3019_mangos.sql similarity index 100% rename from sql/updates/r3019_mangos.sql rename to sql/updates/0.8/r3019_mangos.sql diff --git a/sql/updates/r3021_scriptdev2.sql b/sql/updates/0.8/r3021_scriptdev2.sql similarity index 100% rename from sql/updates/r3021_scriptdev2.sql rename to sql/updates/0.8/r3021_scriptdev2.sql diff --git a/sql/updates/r3022_mangos.sql b/sql/updates/0.8/r3022_mangos.sql similarity index 100% rename from sql/updates/r3022_mangos.sql rename to sql/updates/0.8/r3022_mangos.sql diff --git a/sql/updates/r3022_scriptdev2.sql b/sql/updates/0.8/r3022_scriptdev2.sql similarity index 100% rename from sql/updates/r3022_scriptdev2.sql rename to sql/updates/0.8/r3022_scriptdev2.sql diff --git a/sql/updates/r3023_mangos.sql b/sql/updates/0.8/r3023_mangos.sql similarity index 100% rename from sql/updates/r3023_mangos.sql rename to sql/updates/0.8/r3023_mangos.sql diff --git a/sql/updates/r3023_scriptdev2.sql b/sql/updates/0.8/r3023_scriptdev2.sql similarity index 100% rename from sql/updates/r3023_scriptdev2.sql rename to sql/updates/0.8/r3023_scriptdev2.sql diff --git a/sql/updates/r3024_mangos.sql b/sql/updates/0.8/r3024_mangos.sql similarity index 100% rename from sql/updates/r3024_mangos.sql rename to sql/updates/0.8/r3024_mangos.sql diff --git a/sql/updates/r3024_scriptdev2.sql b/sql/updates/0.8/r3024_scriptdev2.sql similarity index 100% rename from sql/updates/r3024_scriptdev2.sql rename to sql/updates/0.8/r3024_scriptdev2.sql diff --git a/sql/updates/r3025_scriptdev2.sql b/sql/updates/0.8/r3025_scriptdev2.sql similarity index 100% rename from sql/updates/r3025_scriptdev2.sql rename to sql/updates/0.8/r3025_scriptdev2.sql diff --git a/sql/updates/r3028_mangos.sql b/sql/updates/0.8/r3028_mangos.sql similarity index 100% rename from sql/updates/r3028_mangos.sql rename to sql/updates/0.8/r3028_mangos.sql diff --git a/sql/updates/r3028_scriptdev2.sql b/sql/updates/0.8/r3028_scriptdev2.sql similarity index 100% rename from sql/updates/r3028_scriptdev2.sql rename to sql/updates/0.8/r3028_scriptdev2.sql diff --git a/sql/updates/r3029_mangos.sql b/sql/updates/0.8/r3029_mangos.sql similarity index 100% rename from sql/updates/r3029_mangos.sql rename to sql/updates/0.8/r3029_mangos.sql diff --git a/sql/updates/r3031_mangos.sql b/sql/updates/0.8/r3031_mangos.sql similarity index 100% rename from sql/updates/r3031_mangos.sql rename to sql/updates/0.8/r3031_mangos.sql diff --git a/sql/updates/r3031_scriptdev2.sql b/sql/updates/0.8/r3031_scriptdev2.sql similarity index 100% rename from sql/updates/r3031_scriptdev2.sql rename to sql/updates/0.8/r3031_scriptdev2.sql diff --git a/sql/updates/r3034_scriptdev2.sql b/sql/updates/0.8/r3034_scriptdev2.sql similarity index 100% rename from sql/updates/r3034_scriptdev2.sql rename to sql/updates/0.8/r3034_scriptdev2.sql diff --git a/sql/updates/r3046_mangos.sql b/sql/updates/0.8/r3046_mangos.sql similarity index 100% rename from sql/updates/r3046_mangos.sql rename to sql/updates/0.8/r3046_mangos.sql diff --git a/sql/updates/r3048_mangos.sql b/sql/updates/0.8/r3048_mangos.sql similarity index 100% rename from sql/updates/r3048_mangos.sql rename to sql/updates/0.8/r3048_mangos.sql diff --git a/sql/updates/r3049_scriptdev2.sql b/sql/updates/0.8/r3049_scriptdev2.sql similarity index 100% rename from sql/updates/r3049_scriptdev2.sql rename to sql/updates/0.8/r3049_scriptdev2.sql diff --git a/sql/updates/r3050_mangos.sql b/sql/updates/0.8/r3050_mangos.sql similarity index 100% rename from sql/updates/r3050_mangos.sql rename to sql/updates/0.8/r3050_mangos.sql diff --git a/sql/updates/r3050_scriptdev2.sql b/sql/updates/0.8/r3050_scriptdev2.sql similarity index 100% rename from sql/updates/r3050_scriptdev2.sql rename to sql/updates/0.8/r3050_scriptdev2.sql diff --git a/sql/updates/r3051_mangos.sql b/sql/updates/0.8/r3051_mangos.sql similarity index 100% rename from sql/updates/r3051_mangos.sql rename to sql/updates/0.8/r3051_mangos.sql diff --git a/sql/updates/r3051_scriptdev2.sql b/sql/updates/0.8/r3051_scriptdev2.sql similarity index 100% rename from sql/updates/r3051_scriptdev2.sql rename to sql/updates/0.8/r3051_scriptdev2.sql diff --git a/sql/updates/r3054_mangos.sql b/sql/updates/0.8/r3054_mangos.sql similarity index 100% rename from sql/updates/r3054_mangos.sql rename to sql/updates/0.8/r3054_mangos.sql diff --git a/sql/updates/r3054_scriptdev2.sql b/sql/updates/0.8/r3054_scriptdev2.sql similarity index 100% rename from sql/updates/r3054_scriptdev2.sql rename to sql/updates/0.8/r3054_scriptdev2.sql diff --git a/sql/updates/r3055_mangos.sql b/sql/updates/0.8/r3055_mangos.sql similarity index 100% rename from sql/updates/r3055_mangos.sql rename to sql/updates/0.8/r3055_mangos.sql diff --git a/sql/updates/r3055_scriptdev2.sql b/sql/updates/0.8/r3055_scriptdev2.sql similarity index 100% rename from sql/updates/r3055_scriptdev2.sql rename to sql/updates/0.8/r3055_scriptdev2.sql diff --git a/sql/updates/r3059_mangos.sql b/sql/updates/0.8/r3059_mangos.sql similarity index 100% rename from sql/updates/r3059_mangos.sql rename to sql/updates/0.8/r3059_mangos.sql diff --git a/sql/updates/r3060_mangos.sql b/sql/updates/0.8/r3060_mangos.sql similarity index 100% rename from sql/updates/r3060_mangos.sql rename to sql/updates/0.8/r3060_mangos.sql diff --git a/sql/updates/r3060_scriptdev2.sql b/sql/updates/0.8/r3060_scriptdev2.sql similarity index 100% rename from sql/updates/r3060_scriptdev2.sql rename to sql/updates/0.8/r3060_scriptdev2.sql diff --git a/sql/updates/r3061_scriptdev2.sql b/sql/updates/0.8/r3061_scriptdev2.sql similarity index 100% rename from sql/updates/r3061_scriptdev2.sql rename to sql/updates/0.8/r3061_scriptdev2.sql diff --git a/sql/updates/r3062_scriptdev2.sql b/sql/updates/0.8/r3062_scriptdev2.sql similarity index 100% rename from sql/updates/r3062_scriptdev2.sql rename to sql/updates/0.8/r3062_scriptdev2.sql diff --git a/sql/updates/r3064_mangos.sql b/sql/updates/0.8/r3064_mangos.sql similarity index 100% rename from sql/updates/r3064_mangos.sql rename to sql/updates/0.8/r3064_mangos.sql diff --git a/sql/updates/r3064_scriptdev2.sql b/sql/updates/0.8/r3064_scriptdev2.sql similarity index 100% rename from sql/updates/r3064_scriptdev2.sql rename to sql/updates/0.8/r3064_scriptdev2.sql From d315f75469047eaae4dce76fcbb97ef81e714b4a Mon Sep 17 00:00:00 2001 From: Xfurry Date: Tue, 18 Nov 2014 23:23:36 +0100 Subject: [PATCH 1080/1172] [3068] Add basic script for Trial of the Champion --- .../instance_trial_of_the_champion.cpp | 200 +++++++++++++++++- .../trial_of_the_champion.cpp | 80 ++++++- .../trial_of_the_champion.h | 109 ++++++++++ sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 2 + sql/scriptdev2_script_full.sql | 5 + sql/updates/3068_mangos.sql | 2 + sql/updates/3068_scriptdev2.sql | 5 + 8 files changed, 400 insertions(+), 5 deletions(-) create mode 100644 sql/updates/3068_mangos.sql create mode 100644 sql/updates/3068_scriptdev2.sql diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/instance_trial_of_the_champion.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/instance_trial_of_the_champion.cpp index c3e705c50..a62da26e4 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/instance_trial_of_the_champion.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/instance_trial_of_the_champion.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: instance_trial_of_the_champion -SD%Complete: 0 -SDComment: +SD%Complete: 20 +SDComment: Basic support SDCategory: Crusader Coliseum, Trial of the Champion EndScriptData */ @@ -30,6 +30,202 @@ EndScriptData */ 2 - Black Knight */ +static const DialogueEntryTwoSide aTocDialogues[] = +{ + // ToDo: + {0, 0, 0, 0 , 0} +}; + +instance_trial_of_the_champion::instance_trial_of_the_champion(Map* pMap) : ScriptedInstance(pMap), DialogueHelper(aTocDialogues), + m_uiTeam(TEAM_NONE), + m_uiHeraldEntry(0), + m_uiGrandChampionEntry(0) +{ + Initialize(); +} + +void instance_trial_of_the_champion::Initialize() +{ + memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); + InitializeDialogueHelper(this); +} + +void instance_trial_of_the_champion::OnPlayerEnter(Player* pPlayer) +{ + if (!m_uiTeam) + { + m_uiTeam = pPlayer->GetTeam(); + SetDialogueSide(m_uiTeam == ALLIANCE); + + m_uiHeraldEntry = m_uiTeam == ALLIANCE ? NPC_ARELAS_BRIGHTSTAR : NPC_JAEREN_SUNSWORN; + + // set a random grand champion + m_uiGrandChampionEntry = urand(0, 1) ? NPC_EADRIC : NPC_PALETRESS; + + if (m_vChampionsEntries.empty()) + { + m_vChampionsEntries.resize(MAX_CHAMPIONS_AVAILABLE); + + // fill vector array with entries from creature array + for (uint8 i = 0; i < MAX_CHAMPIONS_AVAILABLE; ++i) + m_vChampionsEntries[i] = m_uiTeam == ALLIANCE ? aHordeChampions[i] : aAllianceChampions[i]; + + // set a random champion list + std::random_shuffle(m_vChampionsEntries.begin(), m_vChampionsEntries.end()); + } + } + + DoSummonHeraldIfNeeded(); +} + +void instance_trial_of_the_champion::OnCreatureCreate(Creature* pCreature) +{ + switch (pCreature->GetEntry()) + { + case NPC_JAEREN_SUNSWORN: + case NPC_ARELAS_BRIGHTSTAR: + case NPC_TIRION_FORDRING: + case NPC_VARIAN_WRYNN: + case NPC_THRALL: + case NPC_JACOB_ALERIUS: + case NPC_AMBROSE_BOLTSPARK: + case NPC_COLOSOS: + case NPC_JAELYNE_EVENSONG: + case NPC_LANA_STOUTHAMMER: + case NPC_MOKRA_SKULLCRUSHER: + case NPC_ERESSEA_DAWNSINGER: + case NPC_RUNOK_WILDMANE: + case NPC_ZULTORE: + case NPC_DEATHSTALKER_VISCERI: + case NPC_EADRIC: + case NPC_PALETRESS: + break; + default: + return; + } + + m_mNpcEntryGuidStore[pCreature->GetEntry()] = pCreature->GetObjectGuid(); +} + +void instance_trial_of_the_champion::OnObjectCreate(GameObject* pGo) +{ + switch (pGo->GetEntry()) + { + case GO_MAIN_GATE: + case GO_NORTH_GATE: + case GO_CHAMPIONS_LOOT: + case GO_CHAMPIONS_LOOT_H: + case GO_EADRIC_LOOT: + case GO_EADRIC_LOOT_H: + case GO_PALETRESS_LOOT: + case GO_PALETRESS_LOOT_H: + break; + default: + return; + } + + m_mGoEntryGuidStore[pGo->GetEntry()] = pGo->GetObjectGuid(); +} + +void instance_trial_of_the_champion::SetData(uint32 uiType, uint32 uiData) +{ + switch (uiType) + { + case TYPE_GRAND_CHAMPIONS: + m_auiEncounter[uiType] = uiData; + if (uiData == DONE) + DoRespawnGameObject(instance->IsRegularDifficulty() ? GO_CHAMPIONS_LOOT : GO_CHAMPIONS_LOOT_H, 30 * MINUTE); + break; + case TYPE_ARGENT_CHAMPION: + m_auiEncounter[uiType] = uiData; + if (uiData == DONE) + { + if (m_uiGrandChampionEntry == NPC_EADRIC) + DoRespawnGameObject(instance->IsRegularDifficulty() ? GO_EADRIC_LOOT : GO_EADRIC_LOOT_H, 30 * MINUTE); + else if (m_uiGrandChampionEntry == NPC_PALETRESS) + DoRespawnGameObject(instance->IsRegularDifficulty() ? GO_PALETRESS_LOOT : GO_PALETRESS_LOOT_H, 30 * MINUTE); + } + break; + case TYPE_BLACK_KNIGHT: + m_auiEncounter[uiType] = uiData; + break; + default: + script_error_log("Instance Trial of The Champion: ERROR SetData = %u for type %u does not exist/not implemented.", uiType, uiData); + return; + } + + if (uiData == DONE) + { + OUT_SAVE_INST_DATA; + + std::ostringstream saveStream; + saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2]; + + m_strInstData = saveStream.str(); + + SaveToDB(); + OUT_SAVE_INST_DATA_COMPLETE; + } +} + +uint32 instance_trial_of_the_champion::GetData(uint32 uiType) const +{ + if (uiType < MAX_ENCOUNTER) + return m_auiEncounter[uiType]; + + return 0; +} + +void instance_trial_of_the_champion::Load(const char* chrIn) +{ + if (!chrIn) + { + OUT_LOAD_INST_DATA_FAIL; + return; + } + + OUT_LOAD_INST_DATA(chrIn); + + std::istringstream loadStream(chrIn); + loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2]; + + for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) + { + if (m_auiEncounter[i] == IN_PROGRESS) + m_auiEncounter[i] = NOT_STARTED; + } + + OUT_LOAD_INST_DATA_COMPLETE; +} + +void instance_trial_of_the_champion::DoSummonHeraldIfNeeded() +{ + Player* pPlayer = GetPlayerInMap(); + if (!pPlayer) + return; + + if (GetSingleCreatureFromStorage(m_uiHeraldEntry, true)) + return; + + pPlayer->SummonCreature(m_uiHeraldEntry, aHeraldPositions[0][0], aHeraldPositions[0][1], aHeraldPositions[0][2], aHeraldPositions[0][3], TEMPSUMMON_DEAD_DESPAWN, 0); +} + +void instance_trial_of_the_champion::JustDidDialogueStep(int32 iEntry) +{ + // ToDo: +} + +InstanceData* GetInstanceData_instance_trial_of_the_champion(Map* pMap) +{ + return new instance_trial_of_the_champion(pMap); +} + void AddSC_instance_trial_of_the_champion() { + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "instance_trial_of_the_champion"; + pNewScript->GetInstanceData = &GetInstanceData_instance_trial_of_the_champion; + pNewScript->RegisterSelf(); } diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.cpp index 9f847a53f..f51501cbc 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.cpp @@ -16,14 +16,90 @@ /* ScriptData SDName: trial_of_the_champion -SD%Complete: 0 -SDComment: +SD%Complete: 20 +SDComment: Gossip SDCategory: Crusader Coliseum, Trial of the Champion EndScriptData */ #include "precompiled.h" #include "trial_of_the_champion.h" +/*###### +## npc_toc_herald +######*/ + +enum +{ + GOSSIP_ITEM_READY = -3650000, + GOSSIP_ITEM_READY_SKIP_INTRO = -3650001, + GOSSIP_ITEM_READY_NEXT_CHALLENGE = -3650002, + + TEXT_ID_READY_FIRST_CHALLENGE = 14688, + TEXT_ID_READY_NEXT_CHALLENGE = 14737, + TEXT_ID_READY_FINAL_CHALLENGE = 14738, +}; + +bool GossipHello_npc_toc_herald(Player* pPlayer, Creature* pCreature) +{ + instance_trial_of_the_champion* pInstance = (instance_trial_of_the_champion*)pCreature->GetInstanceData(); + if (!pInstance) + return true; + + if (pInstance->GetData(TYPE_GRAND_CHAMPIONS) == NOT_STARTED) + { + pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_READY, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); + pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_READY_SKIP_INTRO, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); + pPlayer->SEND_GOSSIP_MENU(TEXT_ID_READY_FIRST_CHALLENGE, pCreature->GetObjectGuid()); + } + else if (pInstance->GetData(TYPE_GRAND_CHAMPIONS) == DONE && pInstance->GetData(TYPE_ARGENT_CHAMPION) == NOT_STARTED) + { + pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_READY_NEXT_CHALLENGE, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); + pPlayer->SEND_GOSSIP_MENU(TEXT_ID_READY_NEXT_CHALLENGE, pCreature->GetObjectGuid()); + } + else if (pInstance->GetData(TYPE_ARGENT_CHAMPION) == DONE && pInstance->GetData(TYPE_BLACK_KNIGHT) == NOT_STARTED) + { + pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_READY, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4); + pPlayer->SEND_GOSSIP_MENU(TEXT_ID_READY_FINAL_CHALLENGE, pCreature->GetObjectGuid()); + } + + return true; +} + +bool GossipSelect_npc_toc_herald(Player* pPlayer, Creature* pCreature, uint32 /*sender*/, uint32 uiAction) +{ + instance_trial_of_the_champion* pInstance = (instance_trial_of_the_champion*)pCreature->GetInstanceData(); + if (!pInstance) + return true; + + switch (uiAction) + { + case GOSSIP_ACTION_INFO_DEF+1: + pInstance->SetData(TYPE_GRAND_CHAMPIONS, SPECIAL); + break; + case GOSSIP_ACTION_INFO_DEF+2: + pInstance->SetData(TYPE_GRAND_CHAMPIONS, IN_PROGRESS); + break; + case GOSSIP_ACTION_INFO_DEF+3: + pInstance->SetData(TYPE_ARGENT_CHAMPION, SPECIAL); + break; + case GOSSIP_ACTION_INFO_DEF+4: + pInstance->SetData(TYPE_BLACK_KNIGHT, SPECIAL); + break; + } + + pCreature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); + pPlayer->CLOSE_GOSSIP_MENU(); + + return true; +} + void AddSC_trial_of_the_champion() { + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "npc_toc_herald"; + pNewScript->pGossipHello = &GossipHello_npc_toc_herald; + pNewScript->pGossipSelect = &GossipSelect_npc_toc_herald; + pNewScript->RegisterSelf(); } diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.h b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.h index 3e3fabac2..5acf57a23 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.h +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.h @@ -8,10 +8,119 @@ enum { MAX_ENCOUNTER = 3, + MAX_CHAMPIONS_AVAILABLE = 5, + MAX_CHAMPIONS_ARENA = 3, TYPE_GRAND_CHAMPIONS = 0, TYPE_ARGENT_CHAMPION = 1, TYPE_BLACK_KNIGHT = 2, + + // event handler + NPC_ARELAS_BRIGHTSTAR = 35005, // alliance + NPC_JAEREN_SUNSWORN = 35004, // horde + NPC_TIRION_FORDRING = 34996, + NPC_VARIAN_WRYNN = 34990, + NPC_THRALL = 34994, + + // champions alliance + NPC_JACOB_ALERIUS = 34705, // warrior + NPC_AMBROSE_BOLTSPARK = 34702, // mage + NPC_COLOSOS = 34701, // shaman + NPC_JAELYNE_EVENSONG = 34657, // hunter + NPC_LANA_STOUTHAMMER = 34703, // rogue + + // champions horde + NPC_MOKRA_SKULLCRUSHER = 35572, // warrior + NPC_ERESSEA_DAWNSINGER = 35569, // mage + NPC_RUNOK_WILDMANE = 35571, // shaman + NPC_ZULTORE = 35570, // hunter + NPC_DEATHSTALKER_VISCERI = 35617, // rogue + + // argent challegers + NPC_EADRIC = 35119, + NPC_PALETRESS = 34928, + // trash mobs + NPC_ARGENT_LIGHTWIELDER = 35309, + NPC_ARGENT_MONK = 35305, + NPC_ARGENT_PRIESTESS = 35307, + + // black knight + NPC_BLACK_KNIGHT = 35451, + // risen zombies + NPC_RISEN_JAEREN = 35545, + NPC_RISEN_ARELAS = 35564, + NPC_RISEN_CHAMPION = 35590, + + // doors + GO_MAIN_GATE = 195647, + GO_NORTH_GATE = 195650, // combat door + + // chests + GO_CHAMPIONS_LOOT = 195709, + GO_CHAMPIONS_LOOT_H = 195710, + GO_EADRIC_LOOT = 195374, + GO_EADRIC_LOOT_H = 195375, + GO_PALETRESS_LOOT = 195323, + GO_PALETRESS_LOOT_H = 195324, + + // area triggers - purpose unk + // AREATRIGGER_ID_TOC_1 = 5491, + // AREATRIGGER_ID_TOC_2 = 5492, + + // spells + SPELL_ARGENT_GET_PLAYER_COUNT = 66986, + SPELL_ARGENT_SUMMON_CHAMPION_1 = 66654, + SPELL_ARGENT_SUMMON_CHAMPION_2 = 66671, + SPELL_ARGENT_SUMMON_CHAMPION_3 = 66673, + SPELL_ARGENT_SUMMON_CHAMPION_WAVE = 67295, + SPELL_ARGENT_SUMMON_BOSS_4 = 67396, + SPELL_ARGENT_HERALD_FEIGN_DEATH = 66804, +}; + +static const float aHeraldPositions[3][4] = +{ + {745.606f, 619.705f, 411.172f, 4.66003f}, // Spawn position + {732.524f, 663.007f, 412.393f, 0.0f}, // Gate movement position + {743.377f, 630.240f, 411.073f, 0.0f}, // Near center position +}; + +static const uint32 aAllianceChampions[MAX_CHAMPIONS_AVAILABLE] = { NPC_JACOB_ALERIUS, NPC_AMBROSE_BOLTSPARK, NPC_COLOSOS, NPC_JAELYNE_EVENSONG, NPC_LANA_STOUTHAMMER }; +static const uint32 aHordeChampions[MAX_CHAMPIONS_AVAILABLE] = { NPC_MOKRA_SKULLCRUSHER, NPC_ERESSEA_DAWNSINGER, NPC_RUNOK_WILDMANE, NPC_ZULTORE, NPC_DEATHSTALKER_VISCERI }; + +class instance_trial_of_the_champion : public ScriptedInstance, private DialogueHelper +{ + public: + instance_trial_of_the_champion(Map* pMap); + + void Initialize() override; + + void OnPlayerEnter(Player* pPlayer) override; + + void OnCreatureCreate(Creature* pCreature) override; + void OnObjectCreate(GameObject* pGo) override; + + void SetData(uint32 uiType, uint32 uiData) override; + uint32 GetData(uint32 uiType) const override; + + const char* Save() const override { return m_strInstData.c_str(); } + void Load(const char* chrIn) override; + + void Update(uint32 uiDiff) override { DialogueUpdate(uiDiff); } + + private: + void JustDidDialogueStep(int32 iEntry) override; + + void DoSummonHeraldIfNeeded(); + + uint32 m_auiEncounter[MAX_ENCOUNTER]; + std::string m_strInstData; + + Team m_uiTeam; + + uint32 m_uiHeraldEntry; + uint32 m_uiGrandChampionEntry; + + std::vector m_vChampionsEntries; }; #endif diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index aed44f4fd..bd335efcb 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3067" + #define SD2_REVISION_NR "3068" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 6a4efb309..90fb58e51 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -480,6 +480,8 @@ UPDATE creature_template SET ScriptName='boss_the_lurker_below' WHERE entry=2121 /* */ /* TRAIL OF THE CHAMPION */ +UPDATE instance_template SET ScriptName='instance_trial_of_the_champion' WHERE map=650; +UPDATE creature_template SET ScriptName='npc_toc_herald' WHERE entry IN (35004, 35005); /* TRIAL OF THE CRUSADER */ UPDATE instance_template SET ScriptName='instance_trial_of_the_crusader' WHERE map=649; diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 990c47bc7..7ef2bc3f2 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -5072,6 +5072,11 @@ INSERT INTO gossip_texts (entry,content_default,comment) VALUES (-3649009,'Your words of praise are appreciated, Coliseum Master.','barrett GOSSIP_ITEM_ANUB_INIT'), (-3649010,'That is strange...','barrett GOSSIP_ITEM_ANUB_START'); +-- -3 650 000 TRIAL OF THE CHAMPION +INSERT INTO gossip_texts (entry,content_default,comment) VALUES +(-3650000,'I am ready.','herald GOSSIP_ITEM_READY'), +(-3650001,'I am ready. However, I\'d like to skip the pageantry.','herald GOSSIP_ITEM_READY_SKIP_INTRO'), +(-3650002,'I am ready for the next challenge.','herald GOSSIP_ITEM_READY_NEXT_CHALLENGE'); -- -- Below just for beautiful view in table, run at own desire diff --git a/sql/updates/3068_mangos.sql b/sql/updates/3068_mangos.sql new file mode 100644 index 000000000..4644052f1 --- /dev/null +++ b/sql/updates/3068_mangos.sql @@ -0,0 +1,2 @@ +UPDATE instance_template SET ScriptName='instance_trial_of_the_champion' WHERE map=650; +UPDATE creature_template SET ScriptName='npc_toc_herald' WHERE entry IN (35004, 35005); diff --git a/sql/updates/3068_scriptdev2.sql b/sql/updates/3068_scriptdev2.sql new file mode 100644 index 000000000..f85a6db1f --- /dev/null +++ b/sql/updates/3068_scriptdev2.sql @@ -0,0 +1,5 @@ +DELETE FROM gossip_texts WHERE entry IN (-3650000, -3650001, -3650002); +INSERT INTO gossip_texts (entry,content_default,comment) VALUES +(-3650000,'I am ready.','herald GOSSIP_ITEM_READY'), +(-3650001,'I am ready. However, I\'d like to skip the pageantry.','herald GOSSIP_ITEM_READY_SKIP_INTRO'), +(-3650002,'I am ready for the next challenge.','herald GOSSIP_ITEM_READY_NEXT_CHALLENGE'); From 4144ce25e7a731dba9949c6a106dfa5d8f8350b2 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Fri, 21 Nov 2014 23:17:31 +0100 Subject: [PATCH 1081/1172] [3069] Add more script details for Trial of the Champion * Texts and emotes * Npc and Go defines --- .../instance_trial_of_the_champion.cpp | 118 ++++++++++--- .../trial_of_the_champion.cpp | 4 +- .../trial_of_the_champion.h | 164 +++++++++++++++--- sd2_revision_nr.h | 2 +- sql/scriptdev2_script_full.sql | 59 +++++++ .../{3068_mangos.sql => r3068_mangos.sql} | 0 ...68_scriptdev2.sql => r3068_scriptdev2.sql} | 0 sql/updates/r3069_scriptdev2.sql | 60 +++++++ 8 files changed, 362 insertions(+), 45 deletions(-) rename sql/updates/{3068_mangos.sql => r3068_mangos.sql} (100%) rename sql/updates/{3068_scriptdev2.sql => r3068_scriptdev2.sql} (100%) create mode 100644 sql/updates/r3069_scriptdev2.sql diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/instance_trial_of_the_champion.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/instance_trial_of_the_champion.cpp index a62da26e4..27de0e33b 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/instance_trial_of_the_champion.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/instance_trial_of_the_champion.cpp @@ -30,6 +30,72 @@ EndScriptData */ 2 - Black Knight */ +enum +{ + // grand champions + SAY_HERALD_HORDE_CHALLENGE = -1650000, + SAY_HERALD_HORDE_WARRIOR = -1650001, + SAY_HERALD_HORDE_MAGE = -1650002, + SAY_HERALD_HORDE_SHAMAN = -1650003, + SAY_HERALD_HORDE_HUNTER = -1650004, + SAY_HERALD_HORDE_ROGUE = -1650005, + + SAY_HERALD_ALLIANCE_CHALLENGE = -1650006, + SAY_HERALD_ALLIANCE_WARRIOR = -1650007, + SAY_HERALD_ALLIANCE_MAGE = -1650008, + SAY_HERALD_ALLIANCE_SHAMAN = -1650009, + SAY_HERALD_ALLIANCE_HUNTER = -1650010, + SAY_HERALD_ALLIANCE_ROGUE = -1650011, + + SAY_TIRION_CHALLENGE_WELCOME = -1650012, + SAY_TIRION_FIRST_CHALLENGE = -1650013, + SAY_THRALL_ALLIANCE_CHALLENGE = -1650014, + SAY_GARROSH_ALLIANCE_CHALLENGE = -1650015, + SAY_VARIAN_HORDE_CHALLENGE = -1650016, + SAY_TIRION_CHALLENGE_BEGIN = -1650017, + + // argent champion + SAY_TIRION_ARGENT_CHAMPION = -1650028, + SAY_TIRION_ARGENT_CHAMPION_BEGIN = -1650029, + SAY_HERALD_EADRIC = -1650030, + SAY_HERALD_PALETRESS = -1650031, + EMOTE_HORDE_ARGENT_CHAMPION = -1650032, + EMOTE_ALLIANCE_ARGENT_CHAMPION = -1650033, + SAY_EADRIC_INTRO = -1650034, + SAY_PALETRESS_INTRO_1 = -1650035, + SAY_PALETRESS_INTRO_2 = -1650036, + + // black knight + SAY_TIRION_ARGENT_CHAMPION_COMPLETE = -1650037, + SAY_HERALD_BLACK_KNIGHT_SPAWN = -1650038, + SAY_BLACK_KNIGHT_INTRO_1 = -1650039, + SAY_TIRION_BLACK_KNIGHT_INTRO_2 = -1650040, + SAY_BLACK_KNIGHT_INTRO_3 = -1650041, + SAY_BLACK_KNIGHT_INTRO_4 = -1650042, + + // event complete + SAY_TIRION_EPILOG_1 = -1650043, + SAY_TIRION_EPILOG_2 = -1650044, + SAY_VARIAN_ALLIANCE_EPILOG_3 = -1650045, + SAY_THRALL_HORDE_EPILOG_3 = -1650046, + + // other texts + SAY_GARROSH_OTHER_1 = -1650047, + SAY_THRALL_OTHER_2 = -1650048, + SAY_GARROSH_OTHER_3 = -1650049, + SAY_VARIAN_OTHER_4 = -1650050, + SAY_VARIAN_OTHER_5 = -1650051, + + // spells + SPELL_ARGENT_GET_PLAYER_COUNT = 66986, + SPELL_ARGENT_SUMMON_CHAMPION_1 = 66654, + SPELL_ARGENT_SUMMON_CHAMPION_2 = 66671, + SPELL_ARGENT_SUMMON_CHAMPION_3 = 66673, + SPELL_ARGENT_SUMMON_CHAMPION_WAVE = 67295, + SPELL_ARGENT_SUMMON_BOSS_4 = 67396, + SPELL_ARGENT_HERALD_FEIGN_DEATH = 66804, +}; + static const DialogueEntryTwoSide aTocDialogues[] = { // ToDo: @@ -62,20 +128,20 @@ void instance_trial_of_the_champion::OnPlayerEnter(Player* pPlayer) // set a random grand champion m_uiGrandChampionEntry = urand(0, 1) ? NPC_EADRIC : NPC_PALETRESS; - if (m_vChampionsEntries.empty()) + if (m_vChampionsIndex.empty()) { - m_vChampionsEntries.resize(MAX_CHAMPIONS_AVAILABLE); + m_vChampionsIndex.resize(MAX_CHAMPIONS_AVAILABLE); - // fill vector array with entries from creature array + // fill vector array with indexes from creature array for (uint8 i = 0; i < MAX_CHAMPIONS_AVAILABLE; ++i) - m_vChampionsEntries[i] = m_uiTeam == ALLIANCE ? aHordeChampions[i] : aAllianceChampions[i]; + m_vChampionsIndex[i] = i; // set a random champion list - std::random_shuffle(m_vChampionsEntries.begin(), m_vChampionsEntries.end()); + std::random_shuffle(m_vChampionsIndex.begin(), m_vChampionsIndex.end()); } } - DoSummonHeraldIfNeeded(); + DoSummonHeraldIfNeeded(pPlayer); } void instance_trial_of_the_champion::OnCreatureCreate(Creature* pCreature) @@ -87,16 +153,17 @@ void instance_trial_of_the_champion::OnCreatureCreate(Creature* pCreature) case NPC_TIRION_FORDRING: case NPC_VARIAN_WRYNN: case NPC_THRALL: - case NPC_JACOB_ALERIUS: - case NPC_AMBROSE_BOLTSPARK: - case NPC_COLOSOS: - case NPC_JAELYNE_EVENSONG: - case NPC_LANA_STOUTHAMMER: - case NPC_MOKRA_SKULLCRUSHER: - case NPC_ERESSEA_DAWNSINGER: - case NPC_RUNOK_WILDMANE: - case NPC_ZULTORE: - case NPC_DEATHSTALKER_VISCERI: + case NPC_GARROSH: + case NPC_ALLIANCE_WARRIOR: + case NPC_ALLIANCE_MAGE: + case NPC_ALLIANCE_SHAMAN: + case NPC_ALLIANCE_HUNTER: + case NPC_ALLIANCE_ROGUE: + case NPC_HORDE_WARRIOR: + case NPC_HORDE_MAGE: + case NPC_HORDE_SHAMAN: + case NPC_HORDE_HUNTER: + case NPC_HORDE_ROGUE: case NPC_EADRIC: case NPC_PALETRESS: break; @@ -198,16 +265,22 @@ void instance_trial_of_the_champion::Load(const char* chrIn) OUT_LOAD_INST_DATA_COMPLETE; } -void instance_trial_of_the_champion::DoSummonHeraldIfNeeded() +void instance_trial_of_the_champion::DoSummonHeraldIfNeeded(Unit* pSummoner) { - Player* pPlayer = GetPlayerInMap(); - if (!pPlayer) + if (!pSummoner) return; if (GetSingleCreatureFromStorage(m_uiHeraldEntry, true)) return; - pPlayer->SummonCreature(m_uiHeraldEntry, aHeraldPositions[0][0], aHeraldPositions[0][1], aHeraldPositions[0][2], aHeraldPositions[0][3], TEMPSUMMON_DEAD_DESPAWN, 0); + pSummoner->SummonCreature(m_uiHeraldEntry, aHeraldPositions[0][0], aHeraldPositions[0][1], aHeraldPositions[0][2], aHeraldPositions[0][3], TEMPSUMMON_DEAD_DESPAWN, 0); + + // summon champion mounts if required + if (GetData(TYPE_GRAND_CHAMPIONS) != DONE) + { + for (uint8 i = 0; i < MAX_CHAMPIONS_MOUNTS; ++i) + pSummoner->SummonCreature(m_uiTeam == ALLIANCE ? aTrialChampionsMounts[i].uiEntryAlliance : aTrialChampionsMounts[i].uiEntryHorde, aTrialChampionsMounts[i].fX, aTrialChampionsMounts[i].fY, aTrialChampionsMounts[i].fZ, aTrialChampionsMounts[i].fO, TEMPSUMMON_DEAD_DESPAWN, 0); + } } void instance_trial_of_the_champion::JustDidDialogueStep(int32 iEntry) @@ -215,6 +288,11 @@ void instance_trial_of_the_champion::JustDidDialogueStep(int32 iEntry) // ToDo: } +void instance_trial_of_the_champion::DoPrepareChampions(bool bSkipIntro) +{ + // ToDo: +} + InstanceData* GetInstanceData_instance_trial_of_the_champion(Map* pMap) { return new instance_trial_of_the_champion(pMap); diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.cpp index f51501cbc..bf5385dcb 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.cpp @@ -74,10 +74,10 @@ bool GossipSelect_npc_toc_herald(Player* pPlayer, Creature* pCreature, uint32 /* switch (uiAction) { case GOSSIP_ACTION_INFO_DEF+1: - pInstance->SetData(TYPE_GRAND_CHAMPIONS, SPECIAL); + pInstance->DoPrepareChampions(false); break; case GOSSIP_ACTION_INFO_DEF+2: - pInstance->SetData(TYPE_GRAND_CHAMPIONS, IN_PROGRESS); + pInstance->DoPrepareChampions(true); break; case GOSSIP_ACTION_INFO_DEF+3: pInstance->SetData(TYPE_ARGENT_CHAMPION, SPECIAL); diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.h b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.h index 5acf57a23..09e56aef5 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.h +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.h @@ -10,6 +10,7 @@ enum MAX_ENCOUNTER = 3, MAX_CHAMPIONS_AVAILABLE = 5, MAX_CHAMPIONS_ARENA = 3, + MAX_CHAMPIONS_MOUNTS = 24, TYPE_GRAND_CHAMPIONS = 0, TYPE_ARGENT_CHAMPION = 1, @@ -21,20 +22,63 @@ enum NPC_TIRION_FORDRING = 34996, NPC_VARIAN_WRYNN = 34990, NPC_THRALL = 34994, + NPC_GARROSH = 34995, // champions alliance - NPC_JACOB_ALERIUS = 34705, // warrior - NPC_AMBROSE_BOLTSPARK = 34702, // mage - NPC_COLOSOS = 34701, // shaman - NPC_JAELYNE_EVENSONG = 34657, // hunter - NPC_LANA_STOUTHAMMER = 34703, // rogue + NPC_ALLIANCE_WARRIOR = 34705, // Jacob Alerius + NPC_ALLIANCE_WARRIOR_MOUNT = 35637, // Jacob vehicle mount + NPC_ALLIANCE_WARRIOR_CHAMPION = 35328, // Stormwind Champion + NPC_ALLIANCE_MAGE = 34702, // Ambrose Boltspark + NPC_ALLIANCE_MAGE_MOUNT = 35633, // Ambrose vehicle mount + NPC_ALLIANCE_MAGE_CHAMPION = 35331, // Gnomeregan Champion + NPC_ALLIANCE_SHAMAN = 34701, // Colosos + NPC_ALLIANCE_SHAMAN_MOUNT = 35768, // Colosos vehicle mount + NPC_ALLIANCE_SHAMAN_CHAMPION = 35330, // Exodar Champion + NPC_ALLIANCE_HUNTER = 34657, // Jaelyne Evensong + NPC_ALLIANCE_HUNTER_MOUNT = 34658, // Jaelyne vehicle mount + NPC_ALLIANCE_HUNTER_CHAMPION = 35332, // Darnassus Champion + NPC_ALLIANCE_ROGUE = 34703, // Lana Stouthammer + NPC_ALLIANCE_ROGUE_MOUNT = 35636, // Lana vehicle mount + NPC_ALLIANCE_ROGUE_CHAMPION = 35329, // Ironforge Champion // champions horde - NPC_MOKRA_SKULLCRUSHER = 35572, // warrior - NPC_ERESSEA_DAWNSINGER = 35569, // mage - NPC_RUNOK_WILDMANE = 35571, // shaman - NPC_ZULTORE = 35570, // hunter - NPC_DEATHSTALKER_VISCERI = 35617, // rogue + NPC_HORDE_WARRIOR = 35572, // Mokra Skullcrusher + NPC_HORDE_WARRIOR_MOUNT = 35638, // Mokra vehicle mount + NPC_HORDE_WARRIOR_CHAMPION = 35314, // Orgrimmar Champion + NPC_HORDE_MAGE = 35569, // Eressea Dawnsinger + NPC_HORDE_MAGE_MOUNT = 35635, // Eressea vehicle mount + NPC_HORDE_MAGE_CHAMPION = 35326, // Silvermoon Champion + NPC_HORDE_SHAMAN = 35571, // Runok Wildmane + NPC_HORDE_SHAMAN_MOUNT = 35640, // Runok vehicle mount + NPC_HORDE_SHAMAN_CHAMPION = 35325, // Thunder Bluff Champion + NPC_HORDE_HUNTER = 35570, // Zul'tore + NPC_HORDE_HUNTER_MOUNT = 35641, // Zul'tore vehicle mount + NPC_HORDE_HUNTER_CHAMPION = 35323, // Sen'jin Champion + NPC_HORDE_ROGUE = 35617, // Deathstalker Visceri + NPC_HORDE_ROGUE_MOUNT = 35634, // Visceri vehicle mount + NPC_HORDE_ROGUE_CHAMPION = 35327, // Undercity Champion + + // spectators triggers + NPC_WORLD_TRIGGER = 22515, + NPC_SPECTATOR_GENERIC = 35016, + NPC_SPECTATOR_HORDE = 34883, + NPC_SPECTATOR_ALLIANCE = 34887, + NPC_SPECTATOR_HUMAN = 34900, + NPC_SPECTATOR_ORC = 34901, + NPC_SPECTATOR_TROLL = 34902, + NPC_SPECTATOR_TAUREN = 34903, + NPC_SPECTATOR_BLOOD_ELF = 34904, + NPC_SPECTATOR_UNDEAD = 34905, + NPC_SPECTATOR_DWARF = 34906, + NPC_SPECTATOR_DRAENEI = 34908, + NPC_SPECTATOR_NIGHT_ELF = 34909, + NPC_SPECTATOR_GNOME = 34910, + + // mounts + NPC_WARHORSE_ALLIANCE = 36557, // alliance mount vehicle + NPC_WARHORSE_HORDE = 35644, // dummy - part of the decorations + NPC_BATTLEWORG_ALLIANCE = 36559, // dummy - part of the decorations + NPC_BATTLEWORG_HORDE = 36558, // horde mount vehicle // argent challegers NPC_EADRIC = 35119, @@ -46,6 +90,7 @@ enum // black knight NPC_BLACK_KNIGHT = 35451, + NPC_BLACK_KNIGHT_GRYPHON = 35491, // risen zombies NPC_RISEN_JAEREN = 35545, NPC_RISEN_ARELAS = 35564, @@ -63,18 +108,31 @@ enum GO_PALETRESS_LOOT = 195323, GO_PALETRESS_LOOT_H = 195324, + // fireworks + GO_FIREWORKS_RED_1 = 180703, + GO_FIREWORKS_RED_2 = 180708, + GO_FIREWORKS_BLUE_1 = 180720, + GO_FIREWORKS_BLUE_2 = 180723, + GO_FIREWORKS_WHITE_1 = 180728, + GO_FIREWORKS_WHITE_2 = 180730, + GO_FIREWORKS_YELLOW_1 = 180736, + GO_FIREWORKS_YELLOW_2 = 180738, + // area triggers - purpose unk // AREATRIGGER_ID_TOC_1 = 5491, // AREATRIGGER_ID_TOC_2 = 5492, - // spells - SPELL_ARGENT_GET_PLAYER_COUNT = 66986, - SPELL_ARGENT_SUMMON_CHAMPION_1 = 66654, - SPELL_ARGENT_SUMMON_CHAMPION_2 = 66671, - SPELL_ARGENT_SUMMON_CHAMPION_3 = 66673, - SPELL_ARGENT_SUMMON_CHAMPION_WAVE = 67295, - SPELL_ARGENT_SUMMON_BOSS_4 = 67396, - SPELL_ARGENT_HERALD_FEIGN_DEATH = 66804, + // emotes + EMOTE_BLOOD_ELVES = -1650018, + EMOTE_TROLLS = -1650019, + EMOTE_TAUREN = -1650020, + EMOTE_UNDEAD = -1650021, + EMOTE_ORCS = -1650022, + EMOTE_DWARVES = -1650023, + EMOTE_GNOMES = -1650024, + EMOTE_NIGHT_ELVES = -1650025, + EMOTE_HUMANS = -1650026, + EMOTE_DRAENEI = -1650027, }; static const float aHeraldPositions[3][4] = @@ -84,8 +142,68 @@ static const float aHeraldPositions[3][4] = {743.377f, 630.240f, 411.073f, 0.0f}, // Near center position }; -static const uint32 aAllianceChampions[MAX_CHAMPIONS_AVAILABLE] = { NPC_JACOB_ALERIUS, NPC_AMBROSE_BOLTSPARK, NPC_COLOSOS, NPC_JAELYNE_EVENSONG, NPC_LANA_STOUTHAMMER }; -static const uint32 aHordeChampions[MAX_CHAMPIONS_AVAILABLE] = { NPC_MOKRA_SKULLCRUSHER, NPC_ERESSEA_DAWNSINGER, NPC_RUNOK_WILDMANE, NPC_ZULTORE, NPC_DEATHSTALKER_VISCERI }; +// data that provides grand champion entry, vehicle mount, trash champions with the spawn locations as well as crowd stalker and emote entry +struct ChampionsData +{ + uint32 uiEntry, uiMount, uiChampion, uiCrowdStalker; + int32 iEmoteEntry; + float fX, fY, fZ, fO; +}; + +// ToDo: add coords +static const ChampionsData aAllianceChampions[MAX_CHAMPIONS_AVAILABLE] = +{ + { NPC_ALLIANCE_WARRIOR, NPC_ALLIANCE_WARRIOR_MOUNT, NPC_ALLIANCE_WARRIOR_CHAMPION, NPC_SPECTATOR_HUMAN, EMOTE_HUMANS }, + { NPC_ALLIANCE_MAGE, NPC_ALLIANCE_MAGE_MOUNT, NPC_ALLIANCE_MAGE_CHAMPION, NPC_SPECTATOR_GNOME, EMOTE_GNOMES }, + { NPC_ALLIANCE_SHAMAN, NPC_ALLIANCE_SHAMAN_MOUNT, NPC_ALLIANCE_SHAMAN_CHAMPION, NPC_SPECTATOR_DRAENEI, EMOTE_DRAENEI }, + { NPC_ALLIANCE_HUNTER, NPC_ALLIANCE_HUNTER_MOUNT, NPC_ALLIANCE_HUNTER_CHAMPION, NPC_SPECTATOR_NIGHT_ELF, EMOTE_NIGHT_ELVES }, + { NPC_ALLIANCE_ROGUE, NPC_ALLIANCE_ROGUE_MOUNT, NPC_ALLIANCE_ROGUE_CHAMPION, NPC_SPECTATOR_DWARF, EMOTE_DWARVES } +}; + +// ToDo: add coords +static const ChampionsData aHordeChampions[MAX_CHAMPIONS_AVAILABLE] = +{ + { NPC_HORDE_WARRIOR, NPC_HORDE_WARRIOR_MOUNT, NPC_HORDE_WARRIOR_CHAMPION, NPC_SPECTATOR_ORC, EMOTE_ORCS }, + { NPC_HORDE_MAGE, NPC_HORDE_MAGE_MOUNT, NPC_HORDE_MAGE_CHAMPION, NPC_SPECTATOR_BLOOD_ELF, EMOTE_BLOOD_ELVES }, + { NPC_HORDE_SHAMAN, NPC_HORDE_SHAMAN_MOUNT, NPC_HORDE_SHAMAN_CHAMPION, NPC_SPECTATOR_TAUREN, EMOTE_TAUREN }, + { NPC_HORDE_HUNTER, NPC_HORDE_HUNTER_MOUNT, NPC_HORDE_HUNTER_CHAMPION, NPC_SPECTATOR_TROLL, EMOTE_TROLLS }, + { NPC_HORDE_ROGUE, NPC_HORDE_ROGUE_MOUNT, NPC_HORDE_ROGUE_CHAMPION, NPC_SPECTATOR_UNDEAD, EMOTE_UNDEAD } +}; + +// data that provides spawn coordinates and entry for the player mounts +struct ChampionsMountsData +{ + uint32 uiEntryAlliance, uiEntryHorde; + float fX, fY, fZ, fO; +}; + +static const ChampionsMountsData aTrialChampionsMounts[MAX_CHAMPIONS_MOUNTS] = +{ + {NPC_WARHORSE_ALLIANCE, NPC_WARHORSE_HORDE, 720.569f, 571.285f, 412.475f, 1.064f}, + {NPC_WARHORSE_ALLIANCE, NPC_WARHORSE_HORDE, 722.363f, 660.745f, 412.468f, 4.834f}, + {NPC_WARHORSE_ALLIANCE, NPC_WARHORSE_HORDE, 699.943f, 643.370f, 412.474f, 5.777f}, + {NPC_WARHORSE_ALLIANCE, NPC_WARHORSE_HORDE, 768.255f, 661.606f, 412.470f, 4.555f}, + {NPC_WARHORSE_ALLIANCE, NPC_WARHORSE_HORDE, 787.439f, 584.969f, 412.476f, 2.478f}, + {NPC_WARHORSE_ALLIANCE, NPC_WARHORSE_HORDE, 793.009f, 592.667f, 412.475f, 2.652f}, + {NPC_WARHORSE_ALLIANCE, NPC_WARHORSE_HORDE, 704.943f, 651.330f, 412.475f, 5.602f}, + {NPC_WARHORSE_ALLIANCE, NPC_WARHORSE_HORDE, 702.967f, 587.649f, 412.475f, 0.610f}, + {NPC_WARHORSE_ALLIANCE, NPC_WARHORSE_HORDE, 712.594f, 576.260f, 412.476f, 0.890f}, + {NPC_WARHORSE_ALLIANCE, NPC_WARHORSE_HORDE, 774.898f, 573.736f, 412.475f, 2.146f}, + {NPC_WARHORSE_ALLIANCE, NPC_WARHORSE_HORDE, 790.490f, 646.533f, 412.474f, 3.717f}, + {NPC_WARHORSE_ALLIANCE, NPC_WARHORSE_HORDE, 777.564f, 660.300f, 412.467f, 4.345f}, + {NPC_BATTLEWORG_ALLIANCE, NPC_BATTLEWORG_HORDE, 705.497f, 583.944f, 412.476f, 0.698f}, + {NPC_BATTLEWORG_ALLIANCE, NPC_BATTLEWORG_HORDE, 790.177f, 589.059f, 412.475f, 2.565f}, + {NPC_BATTLEWORG_ALLIANCE, NPC_BATTLEWORG_HORDE, 702.165f, 647.267f, 412.475f, 5.689f}, + {NPC_BATTLEWORG_ALLIANCE, NPC_BATTLEWORG_HORDE, 717.443f, 660.646f, 412.467f, 4.921f}, + {NPC_BATTLEWORG_ALLIANCE, NPC_BATTLEWORG_HORDE, 716.665f, 573.495f, 412.475f, 0.977f}, + {NPC_BATTLEWORG_ALLIANCE, NPC_BATTLEWORG_HORDE, 793.052f, 642.851f, 412.474f, 3.630f}, + {NPC_BATTLEWORG_ALLIANCE, NPC_BATTLEWORG_HORDE, 726.826f, 661.201f, 412.472f, 4.660f}, + {NPC_BATTLEWORG_ALLIANCE, NPC_BATTLEWORG_HORDE, 773.097f, 660.733f, 412.467f, 4.450f}, + {NPC_BATTLEWORG_ALLIANCE, NPC_BATTLEWORG_HORDE, 788.016f, 650.788f, 412.475f, 3.804f}, + {NPC_BATTLEWORG_ALLIANCE, NPC_BATTLEWORG_HORDE, 700.531f, 591.927f, 412.475f, 0.523f}, + {NPC_BATTLEWORG_ALLIANCE, NPC_BATTLEWORG_HORDE, 770.486f, 571.552f, 412.475f, 2.059f}, + {NPC_BATTLEWORG_ALLIANCE, NPC_BATTLEWORG_HORDE, 778.741f, 576.049f, 412.476f, 2.234f}, +}; class instance_trial_of_the_champion : public ScriptedInstance, private DialogueHelper { @@ -105,12 +223,14 @@ class instance_trial_of_the_champion : public ScriptedInstance, private Dialogue const char* Save() const override { return m_strInstData.c_str(); } void Load(const char* chrIn) override; + void DoPrepareChampions(bool bSkipIntro); + void Update(uint32 uiDiff) override { DialogueUpdate(uiDiff); } private: void JustDidDialogueStep(int32 iEntry) override; - void DoSummonHeraldIfNeeded(); + void DoSummonHeraldIfNeeded(Unit* pSummoner); uint32 m_auiEncounter[MAX_ENCOUNTER]; std::string m_strInstData; @@ -120,7 +240,7 @@ class instance_trial_of_the_champion : public ScriptedInstance, private Dialogue uint32 m_uiHeraldEntry; uint32 m_uiGrandChampionEntry; - std::vector m_vChampionsEntries; + std::vector m_vChampionsIndex; }; #endif diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index bd335efcb..ccab1ba7a 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3068" + #define SD2_REVISION_NR "3069" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 7ef2bc3f2..60aa215ef 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -4721,6 +4721,65 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1649075,'Champions, you\'re alive! Not only have you defeated every challenge of the Trial of the Crusader, but also thwarted Arthas\' plans! Your skill and cunning will prove to be a powerful weapon against the Scourge. Well done! Allow one of the Crusade\'s mages to transport you to the surface!',0,0,0,1,'tirion SAY_EPILOGUE'); -- -1 650 000 TRIAL OF THE CHAMPION +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1650000,'The Silver Covenant is pleased to present their contenders for this event, Highlord.',0,1,0,396,'toc herald SAY_HORDE_CHALLENGE'), +(-1650001,'Presenting the fierce Grand Champion of Orgrimmar, Mokra the Skullcrusher!',0,0,0,0,'toc herald SAY_HORDE_WARRIOR'), +(-1650002,'Coming out of the gate is Eressea Dawnsinger, skilled mage and Grand Champion of Silvermoon!',0,0,0,0,'toc herald SAY_HORDE_MAGE'), +(-1650003,'Tall in the saddle of his kodo, here is the venerable Runok Wildmane, Grand Champion of Thunder Bluff!',0,0,0,0,'toc herald SAY_HORDE_SHAMAN'), +(-1650004,'Entering the arena is the lean and dangerous Zul\'tore, Grand Champion of Sen\'jin!',0,0,0,0,'toc herald SAY_HORDE_HUNTER'), +(-1650005,'Representing the tenacity of the Forsaken, here is the Grand Champion of the Undercity, Deathstalker Visceri!',0,0,0,0,'toc herald SAY_HORDE_ROGUE'), + +(-1650006,'The Sunreavers are proud to present their representatives in this trial by combat.',0,1,0,396,'toc herald SAY_ALLIANCE_CHALLENGE'), +(-1650007,'Proud and strong, give a cheer for Marshal Jacob Alerius, the Grand Champion of Stormwind!',0,0,0,0,'toc herald SAY_ALLIANCE_WARRIOR'), +(-1650008,'Here comes the small but deadly Ambrose Boltspark, Grand Champion of Gnomeregan!',0,0,0,0,'toc herald SAY_ALLIANCE_MAGE'), +(-1650009,'Coming out of the gate is Colosos, the towering Grand Champion of the Exodar!',0,0,0,0,'toc herald SAY_ALLIANCE_SHAMAN'), +(-1650010,'Entering the arena is the Grand Champion of Darnassus, the skilled sentinel Jaelyne Evensong!',0,0,0,0,'toc herald SAY_ALLIANCE_HUNTER'), +(-1650011,'The might of the dwarves is represented today by the Grand Champion of Ironforge, Lana Stouthammer!',0,0,0,0,'toc herald SAY_ALLIANCE_ROGUE'), + +(-1650012,'Welcome, champions. Today, before the eyes of your leaders and peers, you will prove yourselves worthy combatants.',0,1,0,1,'tirion SAY_TIRION_WELCOME'), +(-1650013,'You will first be facing three of the Grand Champions of the Tournament! These fierce contenders have beaten out all others to reach the pinnacle of skill in the joust.',0,1,0,1,'tirion SAY_TIRION_FIRST_CHALLENGE'), +(-1650014,'Fight well, Horde! Lok\'tar Ogar!',0,1,0,22,'thrall SAY_THRALL_ALLIANCE_CHALLENGE'), +(-1650015,'Finally, a fight worth watching.',0,1,0,396,'garrosh SAY_GARROSH_ALLIANCE_CHALLENGE'), +(-1650016,'I have no taste for these games, Tirion. Still... I trust they will perform admirably.',0,1,0,1,'king varian SAY_VARIAN_HORDE_CHALLENGE'), +(-1650017,'Begin!',0,1,0,0,'tirion SAY_TIRION_CHAMPIONS_BEGIN'), +(-1650018,'The blood elves of Silvermoon cheer for $n.',0,2,0,0,'raid spectator EMOTE_BLOOD_ELVES'), +(-1650019,'The trolls of the Sen\'jin Village begin a chant to celebrate $n.',0,2,0,0,'raid spectator EMOTE_TROLLS'), +(-1650020,'The tauren of Thunder Bluff cheer for $n.',0,2,0,0,'raid spectator EMOTE_TAUREN'), +(-1650021,'The forsaken of the Undercity cheer for $n.',0,2,0,0,'raid spectator EMOTE_UNDEAD'), +(-1650022,'The orcs of Orgrimmar cheer for $n.',0,2,0,0,'raid spectator EMOTE_ORCS'), +(-1650023,'The dwarves of Ironforge begin a cheer for $n.',0,2,0,0,'raid spectator EMOTE_BLOOD_DWARVES'), +(-1650024,'The gnomes of Gnomeregan cheer for $n.',0,2,0,0,'raid spectator EMOTE_GNOMES'), +(-1650025,'The night elves of Darnassus cheer for $n.',0,2,0,0,'raid spectator EMOTE_NIGHT_ELVES'), +(-1650026,'The humans of Stormwind cheer for $n.',0,2,0,0,'raid spectator EMOTE_HUMANS'), +(-1650027,'The draenei of the Exodar cheer for $n.',0,2,0,0,'raid spectator EMOTE_DRAENEI'), + +(-1650028,'Well fought! Your next challenge comes from the Crusade\'s own ranks. You will be tested against their considerable prowess.',0,1,0,0,'tirion SAY_TIRION_ARGENT_CHAMPION'), +(-1650029,'You may begin!',0,1,0,22,'tirion SAY_TIRION_ARGENT_CHAMPION_BEGIN'), +(-1650030,'Entering the arena, a paladin who is no stranger to the battlefield or tournament ground, the Grand Champion of the Argent Crusade, Eadric the Pure!',0,1,0,0,'toc herald SAY_EADRIC'), +(-1650031,'The next combatant is second to none in her passion for upholding the Light. I give you Argent Confessor Paletress!',0,1,0,0,'toc herald SAY_PALETRESS'), +(-1650032,'The Horde spectators cheer for $n.',0,2,0,0,'raid spectator EMOTE_HORDE_ARGENT_CHAMPION'), +(-1650033,'The Alliance spectators cheer for $n.',0,2,0,0,'raid spectator EMOTE_ALLIANCE_ARGENT_CHAMPION'), +(-1650034,'Are you up to the challenge? I will not hold back.',16134,0,0,397,'eadric SAY_EADRIC_INTRO'), +(-1650035,'Thank you, good herald. Your words are too kind.',16245,0,0,2,'paletress SAY_PALETRESS_INTRO_1'), +(-1650036,'May the Light give me strength to provide a worthy challenge.',16246,0,0,16,'paletress SAY_PALETRESS_INTRO_2'), + +(-1650037,'Well done. You have proven yourself today-',0,1,0,0,'tirion SAY_ARGENT_CHAMPION_COMPLETE'), +(-1650038,'What\'s that, up near the rafters?',0,0,0,25,'toc herald SAY_BLACK_KNIGHT_SPAWN'), +(-1650039,'You spoiled my grand entrance, rat.',16256,0,0,0,'black knight SAY_BLACK_KNIGHT_INTRO_1'), +(-1650040,'What is the meaning of this?',0,1,0,0,'tirion SAY_TIRION_BLACK_KNIGHT_INTRO_2'), +(-1650041,'Did you honestly think an agent of the Lich King would be bested on the field of your pathetic little tournament?',16257,0,0,396,'black knight SAY_BLACK_KNIGHT_INTRO_3'), +(-1650042,'I\'ve come to finish my task.',16258,0,0,396,'black knight SAY_BLACK_KNIGHT_INTRO_4'), + +(-1650043,'My congratulations, champions. Through trials both planned and unexpected, you have triumphed.',0,1,0,0,'tirion SAY_EPILOG_1'), +(-1650044,'Go now and rest; you\'ve earned it.',0,1,0,0,'tirion SAY_EPILOG_2'), +(-1650045,'You fought well.',0,1,0,66,'king varian SAY_VARIAN_EPILOG_3'), +(-1650046,'Well done, Horde!',0,1,0,66,'thrall SAY_THRALL_HORDE_EPILOG_3'), + +(-1650047,'Tear him apart!',0,1,0,22,'garrosh SAY_GARROSH_OTHER_1'), +(-1650048,'Garrosh, enough.',0,1,0,396,'thrall SAY_THRALL_OTHER_2'), +(-1650049,'Admirably? Hah! I will enjoy watching your weak little champions fail, human.',0,1,0,22,'garrosh SAY_GARROSH_OTHER_3'), +(-1650050,'Don\'t just stand there; kill him!',0,1,0,22,'king varian SAY_VARIAN_OTHER_4'), +(-1650051,'I did not come here to watch animals tear at each other senselessly, Tirion.',0,1,0,1,'king varian SAY_VARIAN_OTHER_5'); -- -1 658 000 ICC: PIT OF SARON INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES diff --git a/sql/updates/3068_mangos.sql b/sql/updates/r3068_mangos.sql similarity index 100% rename from sql/updates/3068_mangos.sql rename to sql/updates/r3068_mangos.sql diff --git a/sql/updates/3068_scriptdev2.sql b/sql/updates/r3068_scriptdev2.sql similarity index 100% rename from sql/updates/3068_scriptdev2.sql rename to sql/updates/r3068_scriptdev2.sql diff --git a/sql/updates/r3069_scriptdev2.sql b/sql/updates/r3069_scriptdev2.sql new file mode 100644 index 000000000..0538ab3c7 --- /dev/null +++ b/sql/updates/r3069_scriptdev2.sql @@ -0,0 +1,60 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1650051 AND -1650000; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1650000,'The Silver Covenant is pleased to present their contenders for this event, Highlord.',0,1,0,396,'toc herald SAY_HORDE_CHALLENGE'), +(-1650001,'Presenting the fierce Grand Champion of Orgrimmar, Mokra the Skullcrusher!',0,0,0,0,'toc herald SAY_HORDE_WARRIOR'), +(-1650002,'Coming out of the gate is Eressea Dawnsinger, skilled mage and Grand Champion of Silvermoon!',0,0,0,0,'toc herald SAY_HORDE_MAGE'), +(-1650003,'Tall in the saddle of his kodo, here is the venerable Runok Wildmane, Grand Champion of Thunder Bluff!',0,0,0,0,'toc herald SAY_HORDE_SHAMAN'), +(-1650004,'Entering the arena is the lean and dangerous Zul\'tore, Grand Champion of Sen\'jin!',0,0,0,0,'toc herald SAY_HORDE_HUNTER'), +(-1650005,'Representing the tenacity of the Forsaken, here is the Grand Champion of the Undercity, Deathstalker Visceri!',0,0,0,0,'toc herald SAY_HORDE_ROGUE'), + +(-1650006,'The Sunreavers are proud to present their representatives in this trial by combat.',0,1,0,396,'toc herald SAY_ALLIANCE_CHALLENGE'), +(-1650007,'Proud and strong, give a cheer for Marshal Jacob Alerius, the Grand Champion of Stormwind!',0,0,0,0,'toc herald SAY_ALLIANCE_WARRIOR'), +(-1650008,'Here comes the small but deadly Ambrose Boltspark, Grand Champion of Gnomeregan!',0,0,0,0,'toc herald SAY_ALLIANCE_MAGE'), +(-1650009,'Coming out of the gate is Colosos, the towering Grand Champion of the Exodar!',0,0,0,0,'toc herald SAY_ALLIANCE_SHAMAN'), +(-1650010,'Entering the arena is the Grand Champion of Darnassus, the skilled sentinel Jaelyne Evensong!',0,0,0,0,'toc herald SAY_ALLIANCE_HUNTER'), +(-1650011,'The might of the dwarves is represented today by the Grand Champion of Ironforge, Lana Stouthammer!',0,0,0,0,'toc herald SAY_ALLIANCE_ROGUE'), + +(-1650012,'Welcome, champions. Today, before the eyes of your leaders and peers, you will prove yourselves worthy combatants.',0,1,0,1,'tirion SAY_TIRION_WELCOME'), +(-1650013,'You will first be facing three of the Grand Champions of the Tournament! These fierce contenders have beaten out all others to reach the pinnacle of skill in the joust.',0,1,0,1,'tirion SAY_TIRION_FIRST_CHALLENGE'), +(-1650014,'Fight well, Horde! Lok\'tar Ogar!',0,1,0,22,'thrall SAY_THRALL_ALLIANCE_CHALLENGE'), +(-1650015,'Finally, a fight worth watching.',0,1,0,396,'garrosh SAY_GARROSH_ALLIANCE_CHALLENGE'), +(-1650016,'I have no taste for these games, Tirion. Still... I trust they will perform admirably.',0,1,0,1,'king varian SAY_VARIAN_HORDE_CHALLENGE'), +(-1650017,'Begin!',0,1,0,0,'tirion SAY_TIRION_CHAMPIONS_BEGIN'), +(-1650018,'The blood elves of Silvermoon cheer for $n.',0,2,0,0,'raid spectator EMOTE_BLOOD_ELVES'), +(-1650019,'The trolls of the Sen\'jin Village begin a chant to celebrate $n.',0,2,0,0,'raid spectator EMOTE_TROLLS'), +(-1650020,'The tauren of Thunder Bluff cheer for $n.',0,2,0,0,'raid spectator EMOTE_TAUREN'), +(-1650021,'The forsaken of the Undercity cheer for $n.',0,2,0,0,'raid spectator EMOTE_UNDEAD'), +(-1650022,'The orcs of Orgrimmar cheer for $n.',0,2,0,0,'raid spectator EMOTE_ORCS'), +(-1650023,'The dwarves of Ironforge begin a cheer for $n.',0,2,0,0,'raid spectator EMOTE_BLOOD_DWARVES'), +(-1650024,'The gnomes of Gnomeregan cheer for $n.',0,2,0,0,'raid spectator EMOTE_GNOMES'), +(-1650025,'The night elves of Darnassus cheer for $n.',0,2,0,0,'raid spectator EMOTE_NIGHT_ELVES'), +(-1650026,'The humans of Stormwind cheer for $n.',0,2,0,0,'raid spectator EMOTE_HUMANS'), +(-1650027,'The draenei of the Exodar cheer for $n.',0,2,0,0,'raid spectator EMOTE_DRAENEI'), + +(-1650028,'Well fought! Your next challenge comes from the Crusade\'s own ranks. You will be tested against their considerable prowess.',0,1,0,0,'tirion SAY_TIRION_ARGENT_CHAMPION'), +(-1650029,'You may begin!',0,1,0,22,'tirion SAY_TIRION_ARGENT_CHAMPION_BEGIN'), +(-1650030,'Entering the arena, a paladin who is no stranger to the battlefield or tournament ground, the Grand Champion of the Argent Crusade, Eadric the Pure!',0,1,0,0,'toc herald SAY_EADRIC'), +(-1650031,'The next combatant is second to none in her passion for upholding the Light. I give you Argent Confessor Paletress!',0,1,0,0,'toc herald SAY_PALETRESS'), +(-1650032,'The Horde spectators cheer for $n.',0,2,0,0,'raid spectator EMOTE_HORDE_ARGENT_CHAMPION'), +(-1650033,'The Alliance spectators cheer for $n.',0,2,0,0,'raid spectator EMOTE_ALLIANCE_ARGENT_CHAMPION'), +(-1650034,'Are you up to the challenge? I will not hold back.',16134,0,0,397,'eadric SAY_EADRIC_INTRO'), +(-1650035,'Thank you, good herald. Your words are too kind.',16245,0,0,2,'paletress SAY_PALETRESS_INTRO_1'), +(-1650036,'May the Light give me strength to provide a worthy challenge.',16246,0,0,16,'paletress SAY_PALETRESS_INTRO_2'), + +(-1650037,'Well done. You have proven yourself today-',0,1,0,0,'tirion SAY_ARGENT_CHAMPION_COMPLETE'), +(-1650038,'What\'s that, up near the rafters?',0,0,0,25,'toc herald SAY_BLACK_KNIGHT_SPAWN'), +(-1650039,'You spoiled my grand entrance, rat.',16256,0,0,0,'black knight SAY_BLACK_KNIGHT_INTRO_1'), +(-1650040,'What is the meaning of this?',0,1,0,0,'tirion SAY_TIRION_BLACK_KNIGHT_INTRO_2'), +(-1650041,'Did you honestly think an agent of the Lich King would be bested on the field of your pathetic little tournament?',16257,0,0,396,'black knight SAY_BLACK_KNIGHT_INTRO_3'), +(-1650042,'I\'ve come to finish my task.',16258,0,0,396,'black knight SAY_BLACK_KNIGHT_INTRO_4'), + +(-1650043,'My congratulations, champions. Through trials both planned and unexpected, you have triumphed.',0,1,0,0,'tirion SAY_EPILOG_1'), +(-1650044,'Go now and rest; you\'ve earned it.',0,1,0,0,'tirion SAY_EPILOG_2'), +(-1650045,'You fought well.',0,1,0,66,'king varian SAY_VARIAN_EPILOG_3'), +(-1650046,'Well done, Horde!',0,1,0,66,'thrall SAY_THRALL_HORDE_EPILOG_3'), + +(-1650047,'Tear him apart!',0,1,0,22,'garrosh SAY_GARROSH_OTHER_1'), +(-1650048,'Garrosh, enough.',0,1,0,396,'thrall SAY_THRALL_OTHER_2'), +(-1650049,'Admirably? Hah! I will enjoy watching your weak little champions fail, human.',0,1,0,22,'garrosh SAY_GARROSH_OTHER_3'), +(-1650050,'Don\'t just stand there; kill him!',0,1,0,22,'king varian SAY_VARIAN_OTHER_4'), +(-1650051,'I did not come here to watch animals tear at each other senselessly, Tirion.',0,1,0,1,'king varian SAY_VARIAN_OTHER_5'); From 69d70e51b42b5dafd3c4cc4e3df36ef9932c2c9d Mon Sep 17 00:00:00 2001 From: y1x2 Date: Wed, 26 Nov 2014 22:20:32 +0100 Subject: [PATCH 1082/1172] [3070] Implement script support for quest 7632 Close scriptdev2/scriptdev2-classic#33 Signed-off-by: Xfurry --- scripts/world/areatrigger_scripts.cpp | 55 ++++++++++++++++++++++++++- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 2 + sql/updates/r3070_mangos.sql | 3 ++ 4 files changed, 60 insertions(+), 2 deletions(-) create mode 100644 sql/updates/r3070_mangos.sql diff --git a/scripts/world/areatrigger_scripts.cpp b/scripts/world/areatrigger_scripts.cpp index d773ff0c9..b6d729266 100644 --- a/scripts/world/areatrigger_scripts.cpp +++ b/scripts/world/areatrigger_scripts.cpp @@ -17,7 +17,7 @@ /* ScriptData SDName: Areatrigger_Scripts SD%Complete: 100 -SDComment: Quest support: 4291, 6681, 10589/10604, 11686, 12548, 12575, 12741, 13315/13351, 24849/24851. +SDComment: Quest support: 4291, 6681, 7632, 10589/10604, 11686, 12548, 12575, 12741, 13315/13351, 24849/24851. SDCategory: Areatrigger EndScriptData */ @@ -33,6 +33,7 @@ at_childrens_week_spot 3546,3547,3548,3552,3549,3550 at_scent_larkorwi 1726,1727,1728,1729,1730,1731,1732,1733,1734,1735,1736,1737,1738,1739,1740 at_murkdeep 1966 at_hot_on_the_trail 5710, 5711, 5712, 5714, 5715, 5716 +at_ancient_leaf 3587 EndContentData */ #include "precompiled.h" @@ -364,6 +365,53 @@ bool AreaTrigger_at_hot_on_the_trail(Player* pPlayer, AreaTriggerEntry const* pA return false; } +/*###### +## at_ancient_leaf +######*/ + +enum +{ + QUEST_ANCIENT_LEAF = 7632, + + NPC_VARTRUS = 14524, + NPC_STOMA = 14525, + NPC_HASTAT = 14526, + + MAX_ANCIENTS = 3, +}; + +struct AncientSpawn +{ + uint32 uiEntry; + float fX, fY, fZ, fO; +}; + +static const AncientSpawn afSpawnLocations[MAX_ANCIENTS] = +{ + { NPC_VARTRUS, 6204.051758f, -1172.575684f, 370.079224f, 0.86052f }, // Vartus the Ancient + { NPC_STOMA, 6246.953613f, -1155.985718f, 366.182953f, 2.90269f }, // Stoma the Ancient + { NPC_HASTAT, 6193.449219f, -1137.834106f, 366.260529f, 5.77332f }, // Hastat the Ancient +}; + +bool AreaTrigger_at_ancient_leaf(Player* pPlayer, AreaTriggerEntry const* pAt) +{ + if (pPlayer->isGameMaster() || !pPlayer->isAlive()) + return false; + + // Handle Call Ancients event start - The area trigger summons 3 ancients + if (pPlayer->GetQuestStatus(QUEST_ANCIENT_LEAF) == QUEST_STATUS_COMPLETE) + { + // If ancients are already spawned, skip the rest + if (GetClosestCreatureWithEntry(pPlayer, NPC_VARTRUS, 50.0f) || GetClosestCreatureWithEntry(pPlayer, NPC_STOMA, 50.0f) || GetClosestCreatureWithEntry(pPlayer, NPC_HASTAT, 50.0f)) + return true; + + for (uint8 i = 0; i < MAX_ANCIENTS; ++i) + pPlayer->SummonCreature(afSpawnLocations[i].uiEntry, afSpawnLocations[i].fX, afSpawnLocations[i].fY, afSpawnLocations[i].fZ, afSpawnLocations[i].fO, TEMPSUMMON_TIMED_DESPAWN, 5 * MINUTE * IN_MILLISECONDS); + } + + return false; +} + void AddSC_areatrigger_scripts() { Script* pNewScript; @@ -427,4 +475,9 @@ void AddSC_areatrigger_scripts() pNewScript->Name = "at_hot_on_the_trail"; pNewScript->pAreaTrigger = &AreaTrigger_at_hot_on_the_trail; pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "at_ancient_leaf"; + pNewScript->pAreaTrigger = &AreaTrigger_at_ancient_leaf; + pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index ccab1ba7a..8641db0cd 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3069" + #define SD2_REVISION_NR "3070" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 90fb58e51..39ba70482 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -92,6 +92,8 @@ INSERT INTO scripted_areatrigger VALUES (5714, 'at_hot_on_the_trail'), (5715, 'at_hot_on_the_trail'), (5716, 'at_hot_on_the_trail'); +DELETE FROM scripted_areatrigger WHERE entry=3587; +INSERT INTO scripted_areatrigger VALUES (3587,'at_ancient_leaf'); /* BATTLEGROUNDS */ diff --git a/sql/updates/r3070_mangos.sql b/sql/updates/r3070_mangos.sql new file mode 100644 index 000000000..4a82a582b --- /dev/null +++ b/sql/updates/r3070_mangos.sql @@ -0,0 +1,3 @@ +DELETE FROM scripted_areatrigger WHERE entry=3587; +INSERT INTO scripted_areatrigger VALUES +(3587,'at_ancient_leaf'); From 0f76bcd9c163399a5cd73cc27c16c26451b31099 Mon Sep 17 00:00:00 2001 From: cala Date: Thu, 27 Nov 2014 00:22:57 +0100 Subject: [PATCH 1083/1172] [3071] Implement script support for quest 6921 Close #119 Signed-off-by: Xfurry --- .../blackfathom_deeps/blackfathom_deeps.h | 7 +++- .../instance_blackfathom_deeps.cpp | 34 +++++++++++++++++-- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 + sql/updates/r3071_mangos.sql | 1 + 5 files changed, 40 insertions(+), 5 deletions(-) create mode 100644 sql/updates/r3071_mangos.sql diff --git a/scripts/kalimdor/blackfathom_deeps/blackfathom_deeps.h b/scripts/kalimdor/blackfathom_deeps/blackfathom_deeps.h index f7d1b72b3..063d8d558 100644 --- a/scripts/kalimdor/blackfathom_deeps/blackfathom_deeps.h +++ b/scripts/kalimdor/blackfathom_deeps/blackfathom_deeps.h @@ -7,14 +7,16 @@ enum { - MAX_ENCOUNTER = 2, + MAX_ENCOUNTER = 3, MAX_FIRES = 4, MAX_COUNT_POS = 3, TYPE_KELRIS = 1, TYPE_SHRINE = 2, + TYPE_AQUANIS = 3, NPC_KELRIS = 4832, + NPC_BARON_AQUANIS = 12876, // Shrine event NPC_AKUMAI_SERVANT = 4978, @@ -27,6 +29,7 @@ enum GO_SHRINE_2 = 21119, GO_SHRINE_3 = 21120, GO_SHRINE_4 = 21121, + GO_FATHOM_STONE = 177964, }; /* This is the spawn pattern for the event mobs @@ -85,6 +88,8 @@ static const SummonInformation aWaveSummonInformation[] = {3, NPC_MURKSHALLOW_SOFTSHELL, {{1, 3}, {2, 4}, {2, 5}}} }; +static const float afAquanisPos[4] = { -782.21f, -63.26f, -42.43f, 2.36f }; + class instance_blackfathom_deeps : public ScriptedInstance { public: diff --git a/scripts/kalimdor/blackfathom_deeps/instance_blackfathom_deeps.cpp b/scripts/kalimdor/blackfathom_deeps/instance_blackfathom_deeps.cpp index ed5c56edf..d2d25e135 100644 --- a/scripts/kalimdor/blackfathom_deeps/instance_blackfathom_deeps.cpp +++ b/scripts/kalimdor/blackfathom_deeps/instance_blackfathom_deeps.cpp @@ -17,7 +17,7 @@ /* ScriptData SDName: Instance_Blackfathom_Deeps SD%Complete: 50 -SDComment: +SDComment: Quest support: 6921 SDCategory: Blackfathom Deeps EndScriptData */ @@ -27,6 +27,7 @@ EndScriptData */ /* Encounter 0 = Twilight Lord Kelris Encounter 1 = Shrine event Must kill twilight lord for shrine event to be possible + Encounter 2 = Baron Aquanis (spawned by GO use but should only spawn once per instance) */ instance_blackfathom_deeps::instance_blackfathom_deeps(Map* pMap) : ScriptedInstance(pMap), @@ -125,6 +126,9 @@ void instance_blackfathom_deeps::SetData(uint32 uiType, uint32 uiData) else if (uiData == DONE) DoUseDoorOrButton(GO_PORTAL_DOOR); break; + case TYPE_AQUANIS: + m_auiEncounter[2] = uiData; + break; } if (uiData == DONE) @@ -133,7 +137,7 @@ void instance_blackfathom_deeps::SetData(uint32 uiType, uint32 uiData) std::ostringstream saveStream; - saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1]; + saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2]; m_strInstData = saveStream.str(); SaveToDB(); @@ -147,6 +151,7 @@ uint32 instance_blackfathom_deeps::GetData(uint32 uiType) const { case TYPE_KELRIS: return m_auiEncounter[0]; case TYPE_SHRINE: return m_auiEncounter[1]; + case TYPE_AQUANIS: return m_auiEncounter[2]; default: return 0; } @@ -163,7 +168,7 @@ void instance_blackfathom_deeps::Load(const char* chrIn) OUT_LOAD_INST_DATA(chrIn); std::istringstream loadStream(chrIn); - loadStream >> m_auiEncounter[0] >> m_auiEncounter[1]; + loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2]; for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) { @@ -176,6 +181,9 @@ void instance_blackfathom_deeps::Load(const char* chrIn) void instance_blackfathom_deeps::OnCreatureDeath(Creature* pCreature) { + if (pCreature->GetEntry() == NPC_BARON_AQUANIS) + SetData(TYPE_AQUANIS, DONE); + // Only use this function if shrine event is in progress if (m_auiEncounter[1] != IN_PROGRESS) return; @@ -262,6 +270,21 @@ bool GOUse_go_fire_of_akumai(Player* /*pPlayer*/, GameObject* pGo) return true; } +bool GOUse_go_fathom_stone(Player* pPlayer, GameObject* pGo) +{ + instance_blackfathom_deeps* pInstance = (instance_blackfathom_deeps*)pGo->GetInstanceData(); + if (!pInstance) + return true; + + if (pInstance->GetData(TYPE_AQUANIS) == NOT_STARTED) + { + pPlayer->SummonCreature(NPC_BARON_AQUANIS, afAquanisPos[0], afAquanisPos[1], afAquanisPos[2], afAquanisPos[3], TEMPSUMMON_DEAD_DESPAWN, 0); + pInstance->SetData(TYPE_AQUANIS, IN_PROGRESS); + } + + return false; +} + void AddSC_instance_blackfathom_deeps() { Script* pNewScript; @@ -275,4 +298,9 @@ void AddSC_instance_blackfathom_deeps() pNewScript->Name = "go_fire_of_akumai"; pNewScript->pGOUse = &GOUse_go_fire_of_akumai; pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "go_fathom_stone"; + pNewScript->pGOUse = &GOUse_go_fathom_stone; + pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 8641db0cd..af2f9c49a 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3070" + #define SD2_REVISION_NR "3071" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 39ba70482..09b7b40ad 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -321,6 +321,7 @@ UPDATE creature_template SET ScriptName='npc_enslaved_soul' WHERE entry=23469; /* BLACKFATHOM DEPTHS */ UPDATE instance_template SET ScriptName='instance_blackfathom_deeps' WHERE map=48; UPDATE gameobject_template SET ScriptName='go_fire_of_akumai' WHERE entry IN (21118,21119,21120,21121); +UPDATE gameobject_template SET ScriptName='go_fathom_stone' WHERE entry=177964; /* BLACKROCK DEPTHS */ DELETE FROM scripted_areatrigger WHERE entry=1526; diff --git a/sql/updates/r3071_mangos.sql b/sql/updates/r3071_mangos.sql new file mode 100644 index 000000000..3cc689c21 --- /dev/null +++ b/sql/updates/r3071_mangos.sql @@ -0,0 +1 @@ +UPDATE gameobject_template SET ScriptName='go_fathom_stone' WHERE entry=177964; From de1a0b62fddaf038324a66e1c89f06f06173f34c Mon Sep 17 00:00:00 2001 From: Xfurry Date: Thu, 18 Dec 2014 01:11:15 +0100 Subject: [PATCH 1084/1172] [3072] Rename UNIT_BYTE1_FLAG_UNK_2 to UNIT_BYTE1_FLAG_FLY_ANIM Requires CMaNGOS 12799+ --- .../blackwing_lair/boss_victor_nefarius.cpp | 2 +- scripts/eastern_kingdoms/karazhan/boss_nightbane.cpp | 8 ++++---- scripts/eastern_kingdoms/karazhan/karazhan.cpp | 2 +- .../sunwell_plateau/boss_kalecgos.cpp | 2 +- scripts/kalimdor/onyxias_lair/boss_onyxia.cpp | 2 +- scripts/kalimdor/silithus.cpp | 8 ++++---- scripts/kalimdor/wailing_caverns/wailing_caverns.cpp | 2 +- .../icecrown_citadel/blood_prince_council.cpp | 2 +- .../icecrown_citadel/boss_blood_queen_lanathel.cpp | 6 +++--- .../icecrown_citadel/boss_sindragosa.cpp | 12 ++++++------ .../northrend/nexus/eye_of_eternity/boss_malygos.cpp | 8 ++++---- scripts/northrend/ruby_sanctum/boss_saviana.cpp | 2 +- scripts/northrend/ulduar/ulduar/boss_razorscale.cpp | 6 +++--- .../utgarde_keep/utgarde_pinnacle/boss_skadi.cpp | 2 +- scripts/outland/blades_edge_mountains.cpp | 2 +- .../hellfire_ramparts/boss_nazan_and_vazruden.cpp | 2 +- scripts/outland/shadowmoon_valley.cpp | 4 ++-- sd2_revision_nr.h | 2 +- sql/scriptdev2_script_full.sql | 2 +- sql/updates/r3072_scriptdev2.sql | 1 + 20 files changed, 39 insertions(+), 38 deletions(-) create mode 100644 sql/updates/r3072_scriptdev2.sql diff --git a/scripts/eastern_kingdoms/blackwing_lair/boss_victor_nefarius.cpp b/scripts/eastern_kingdoms/blackwing_lair/boss_victor_nefarius.cpp index c7dd37a7d..393cffcad 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/boss_victor_nefarius.cpp +++ b/scripts/eastern_kingdoms/blackwing_lair/boss_victor_nefarius.cpp @@ -187,7 +187,7 @@ struct boss_victor_nefariusAI : public ScriptedAI, private DialogueHelper pSummoned->SetWalk(false); // see boss_onyxia (also note the removal of this in boss_nefarian) - pSummoned->SetByteValue(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_UNK_2); + pSummoned->SetByteValue(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_FLY_ANIM); pSummoned->SetLevitate(true); // Let Nefarian fly towards combat area diff --git a/scripts/eastern_kingdoms/karazhan/boss_nightbane.cpp b/scripts/eastern_kingdoms/karazhan/boss_nightbane.cpp index 3f9ea630f..b62e91493 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_nightbane.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_nightbane.cpp @@ -139,7 +139,7 @@ struct boss_nightbaneAI : public npc_escortAI SetEscortPaused(true); m_creature->SetLevitate(false); m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - m_creature->RemoveByteFlag(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_UNK_2); + m_creature->RemoveByteFlag(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_FLY_ANIM); m_creature->SetInCombatWithZone(); } @@ -161,7 +161,7 @@ struct boss_nightbaneAI : public npc_escortAI break; case POINT_ID_GROUND: m_creature->SetLevitate(false); - m_creature->RemoveByteFlag(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_UNK_2); + m_creature->RemoveByteFlag(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_FLY_ANIM); m_uiPhase = PHASE_GROUND; SetCombatMovement(true); @@ -264,7 +264,7 @@ struct boss_nightbaneAI : public npc_escortAI { // Start air phase movement (handled by creature_movement_template) SetCombatMovement(false); - m_creature->SetByteValue(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_UNK_2); + m_creature->SetByteValue(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_FLY_ANIM); m_creature->SetLevitate(true); DoMoveToClosestTrigger(false); @@ -371,7 +371,7 @@ bool ProcessEventId_event_spell_summon_nightbane(uint32 /*uiEventId*/, Object* p // Sort of a hack, it is unclear how this really work but the values appear to be valid (see Onyxia, too) pNightbane->SetStandState(UNIT_STAND_STATE_STAND); - pNightbane->SetByteValue(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_UNK_2); + pNightbane->SetByteValue(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_FLY_ANIM); pNightbane->SetLevitate(true); // Switch to waypoint movement diff --git a/scripts/eastern_kingdoms/karazhan/karazhan.cpp b/scripts/eastern_kingdoms/karazhan/karazhan.cpp index fd1f62717..3d91c2682 100644 --- a/scripts/eastern_kingdoms/karazhan/karazhan.cpp +++ b/scripts/eastern_kingdoms/karazhan/karazhan.cpp @@ -382,7 +382,7 @@ struct npc_image_of_medivhAI : public ScriptedAI, private DialogueHelper pSummoned->SetLevitate(true); pSummoned->SetWalk(false); pSummoned->GetMotionMaster()->MovePoint(POINT_ID_INTRO, afArcanagosMoveLoc[0], afArcanagosMoveLoc[1], afArcanagosMoveLoc[2]); - pSummoned->SetByteFlag(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_UNK_2); + pSummoned->SetByteFlag(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_FLY_ANIM); } } diff --git a/scripts/eastern_kingdoms/sunwell_plateau/boss_kalecgos.cpp b/scripts/eastern_kingdoms/sunwell_plateau/boss_kalecgos.cpp index eb4a19608..df3aa2818 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/boss_kalecgos.cpp +++ b/scripts/eastern_kingdoms/sunwell_plateau/boss_kalecgos.cpp @@ -223,7 +223,7 @@ struct boss_kalecgosAI : public ScriptedAI m_creature->GetRandomPoint(m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), 30.0f, fX, fY, fZ); fZ = 70.0f; - m_creature->SetByteValue(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_UNK_2); + m_creature->SetByteValue(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_FLY_ANIM); m_creature->SetLevitate(true); m_creature->GetMotionMaster()->MovePoint(1, fX, fY, fZ); m_uiExitTimer = 0; diff --git a/scripts/kalimdor/onyxias_lair/boss_onyxia.cpp b/scripts/kalimdor/onyxias_lair/boss_onyxia.cpp index 4654815ef..8007d278a 100644 --- a/scripts/kalimdor/onyxias_lair/boss_onyxia.cpp +++ b/scripts/kalimdor/onyxias_lair/boss_onyxia.cpp @@ -256,7 +256,7 @@ struct boss_onyxiaAI : public ScriptedAI { case POINT_ID_IN_AIR: // sort of a hack, it is unclear how this really work but the values are valid - m_creature->SetByteValue(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_UNK_2); + m_creature->SetByteValue(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_FLY_ANIM); m_creature->SetLevitate(true); m_uiPhaseTimer = 1000; // Movement to Initial North Position is delayed return; diff --git a/scripts/kalimdor/silithus.cpp b/scripts/kalimdor/silithus.cpp index 233572a93..77c89b4fc 100644 --- a/scripts/kalimdor/silithus.cpp +++ b/scripts/kalimdor/silithus.cpp @@ -302,7 +302,7 @@ struct npc_anachronos_the_ancientAI : public ScriptedAI, private DialogueHelper // Move Merithra to the exit point if (Creature* pMerithra = m_creature->GetMap()->GetCreature(m_merithraGuid)) { - pMerithra->SetByteValue(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_UNK_2); + pMerithra->SetByteValue(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_FLY_ANIM); pMerithra->SetLevitate(true); pMerithra->GetMotionMaster()->MovePoint(POINT_ID_EXIT, aEternalBoardMovement[0].m_fX, aEternalBoardMovement[0].m_fY, aEternalBoardMovement[0].m_fZ); pMerithra->ForcedDespawn(9000); @@ -320,7 +320,7 @@ struct npc_anachronos_the_ancientAI : public ScriptedAI, private DialogueHelper // Move Arygos to the exit point if (Creature* pArygos = m_creature->GetMap()->GetCreature(m_arygosGuid)) { - pArygos->SetByteValue(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_UNK_2); + pArygos->SetByteValue(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_FLY_ANIM); pArygos->SetLevitate(true); pArygos->GetMotionMaster()->MovePoint(POINT_ID_EXIT, aEternalBoardMovement[0].m_fX, aEternalBoardMovement[0].m_fY, aEternalBoardMovement[0].m_fZ); pArygos->ForcedDespawn(9000); @@ -349,7 +349,7 @@ struct npc_anachronos_the_ancientAI : public ScriptedAI, private DialogueHelper // Send Caelestrasz on flight if (Creature* pCaelestrasz = m_creature->GetMap()->GetCreature(m_CaelestraszGuid)) { - pCaelestrasz->SetByteValue(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_UNK_2); + pCaelestrasz->SetByteValue(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_FLY_ANIM); pCaelestrasz->SetLevitate(true); pCaelestrasz->GetMotionMaster()->MovePoint(POINT_ID_EXIT, aEternalBoardMovement[0].m_fX, aEternalBoardMovement[0].m_fY, aEternalBoardMovement[0].m_fZ); pCaelestrasz->ForcedDespawn(9000); @@ -628,7 +628,7 @@ struct npc_anachronos_the_ancientAI : public ScriptedAI, private DialogueHelper break; case 4: // Take off and fly - m_creature->SetByteValue(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_UNK_2); + m_creature->SetByteValue(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_FLY_ANIM); m_creature->SetLevitate(true); m_creature->GetMotionMaster()->MovePoint(0, aEternalBoardMovement[9].m_fX, aEternalBoardMovement[9].m_fY, aEternalBoardMovement[9].m_fZ); m_creature->ForcedDespawn(10000); diff --git a/scripts/kalimdor/wailing_caverns/wailing_caverns.cpp b/scripts/kalimdor/wailing_caverns/wailing_caverns.cpp index bd505942e..ead04aecb 100644 --- a/scripts/kalimdor/wailing_caverns/wailing_caverns.cpp +++ b/scripts/kalimdor/wailing_caverns/wailing_caverns.cpp @@ -387,7 +387,7 @@ struct npc_disciple_of_naralexAI : public npc_escortAI { // ToDo: Make Naralex fly // sort of a hack, compare to boss_onyxia - pNaralex->SetByteValue(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_UNK_2); + pNaralex->SetByteValue(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_FLY_ANIM); // Set to flying pNaralex->SetLevitate(true); diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/blood_prince_council.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/blood_prince_council.cpp index 2993ac400..7dbeee3dd 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/blood_prince_council.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/blood_prince_council.cpp @@ -147,7 +147,7 @@ struct npc_queen_lanathel_introAI : public ScriptedAI, private DialogueHelper void Reset() override { // Flying animation - m_creature->SetByteFlag(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_UNK_2); + m_creature->SetByteFlag(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_FLY_ANIM); } void MoveInLineOfSight(Unit* pWho) override diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_blood_queen_lanathel.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_blood_queen_lanathel.cpp index f22bb457a..5a33ce963 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_blood_queen_lanathel.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_blood_queen_lanathel.cpp @@ -110,7 +110,7 @@ struct boss_blood_queen_lanathelAI : public ScriptedAI m_uiPactDarkfallenTimer = 15000; m_uiSwarmingShadowsTimer = 30000; - m_creature->RemoveByteFlag(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_UNK_2); + m_creature->RemoveByteFlag(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_FLY_ANIM); } void JustReachedHome() override @@ -160,7 +160,7 @@ struct boss_blood_queen_lanathelAI : public ScriptedAI m_uiPhase = PHASE_FLYING; m_creature->SetLevitate(true); - m_creature->SetByteFlag(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_UNK_2); + m_creature->SetByteFlag(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_FLY_ANIM); m_creature->GetMotionMaster()->Clear(); m_creature->GetMotionMaster()->MovePoint(POINT_CENTER_AIR, aQueenPosition[1][0], aQueenPosition[1][1], aQueenPosition[1][2], false); @@ -173,7 +173,7 @@ struct boss_blood_queen_lanathelAI : public ScriptedAI SetCombatMovement(true); m_creature->SetLevitate(false); - m_creature->RemoveByteFlag(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_UNK_2); + m_creature->RemoveByteFlag(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_FLY_ANIM); m_creature->GetMotionMaster()->Clear(); if (m_creature->getVictim()) diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp index e8659d839..25077d8bf 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp @@ -174,9 +174,9 @@ struct boss_sindragosaAI : public ScriptedAI void SetFlying(bool bIsFlying) { if (bIsFlying) - m_creature->SetByteFlag(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_UNK_2); + m_creature->SetByteFlag(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_FLY_ANIM); else - m_creature->RemoveByteFlag(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_UNK_2); + m_creature->RemoveByteFlag(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_FLY_ANIM); m_creature->SetLevitate(bIsFlying); m_creature->SetWalk(bIsFlying); @@ -503,9 +503,9 @@ struct npc_rimefang_iccAI : public ScriptedAI void SetFlying(bool bIsFlying) { if (bIsFlying) - m_creature->SetByteFlag(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_UNK_2); + m_creature->SetByteFlag(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_FLY_ANIM); else - m_creature->RemoveByteFlag(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_UNK_2); + m_creature->RemoveByteFlag(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_FLY_ANIM); m_creature->SetLevitate(bIsFlying); m_creature->SetWalk(bIsFlying); @@ -685,9 +685,9 @@ struct npc_spinestalker_iccAI : public ScriptedAI void SetFlying(bool bIsFlying) { if (bIsFlying) - m_creature->SetByteFlag(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_UNK_2); + m_creature->SetByteFlag(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_FLY_ANIM); else - m_creature->RemoveByteFlag(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_UNK_2); + m_creature->RemoveByteFlag(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_FLY_ANIM); m_creature->SetLevitate(bIsFlying); m_creature->SetWalk(bIsFlying); diff --git a/scripts/northrend/nexus/eye_of_eternity/boss_malygos.cpp b/scripts/northrend/nexus/eye_of_eternity/boss_malygos.cpp index eeda9f14a..a6f1e82d6 100644 --- a/scripts/northrend/nexus/eye_of_eternity/boss_malygos.cpp +++ b/scripts/northrend/nexus/eye_of_eternity/boss_malygos.cpp @@ -215,7 +215,7 @@ struct boss_malygosAI : public ScriptedAI, private DialogueHelper // reset flags m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - m_creature->SetByteFlag(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_UNK_2); + m_creature->SetByteFlag(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_FLY_ANIM); SetCombatMovement(false); } @@ -290,7 +290,7 @@ struct boss_malygosAI : public ScriptedAI, private DialogueHelper m_creature->SetLevitate(false); SetCombatMovement(true); DoStartMovement(m_creature->getVictim()); - m_creature->RemoveByteFlag(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_UNK_2); + m_creature->RemoveByteFlag(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_FLY_ANIM); } } @@ -299,7 +299,7 @@ struct boss_malygosAI : public ScriptedAI, private DialogueHelper switch (pSummoned->GetEntry()) { case NPC_ALEXSTRASZA: - pSummoned->SetByteFlag(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_UNK_2); + pSummoned->SetByteFlag(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_FLY_ANIM); pSummoned->GetMotionMaster()->MovePoint(0, aAlextraszaMovePos[0], aAlextraszaMovePos[1], aAlextraszaMovePos[2]); break; case NPC_POWER_SPARK: @@ -464,7 +464,7 @@ struct boss_malygosAI : public ScriptedAI, private DialogueHelper { SetCombatMovement(false); m_creature->SetLevitate(true); - m_creature->SetByteFlag(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_UNK_2); + m_creature->SetByteFlag(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_FLY_ANIM); // Move idle first, so we can avoid evading, because of the waypoint movement m_creature->GetMotionMaster()->MoveIdle(); m_creature->GetMotionMaster()->MovePoint(0, aCenterMovePos[0], aCenterMovePos[1], aCenterMovePos[2] + 30.0f); diff --git a/scripts/northrend/ruby_sanctum/boss_saviana.cpp b/scripts/northrend/ruby_sanctum/boss_saviana.cpp index 94a1260a4..0efca0949 100644 --- a/scripts/northrend/ruby_sanctum/boss_saviana.cpp +++ b/scripts/northrend/ruby_sanctum/boss_saviana.cpp @@ -170,7 +170,7 @@ struct boss_savianaAI : public ScriptedAI m_uiPhase = PHASE_TRANSITION; SetCombatMovement(false); - m_creature->SetByteValue(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_UNK_2); + m_creature->SetByteValue(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_FLY_ANIM); m_creature->SetLevitate(true); m_creature->GetMotionMaster()->Clear(); diff --git a/scripts/northrend/ulduar/ulduar/boss_razorscale.cpp b/scripts/northrend/ulduar/ulduar/boss_razorscale.cpp index 8e3516592..e3caa2c56 100644 --- a/scripts/northrend/ulduar/ulduar/boss_razorscale.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_razorscale.cpp @@ -189,7 +189,7 @@ struct boss_razorscaleAI : public ScriptedAI SetCombatMovement(false); m_creature->SetLevitate(true); - m_creature->SetByteFlag(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_UNK_2); + m_creature->SetByteFlag(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_FLY_ANIM); } void JustDied(Unit* /*pKiller*/) override @@ -498,7 +498,7 @@ struct boss_razorscaleAI : public ScriptedAI if (DoCastSpellIfCan(m_creature, SPELL_STUN) == CAST_OK) { m_creature->SetLevitate(false); - m_creature->RemoveByteFlag(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_UNK_2); + m_creature->RemoveByteFlag(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_FLY_ANIM); m_uiPhase = PHASE_GROUNDED; m_uiGroundedTimer = 30000; @@ -545,7 +545,7 @@ struct boss_razorscaleAI : public ScriptedAI else { m_creature->SetLevitate(true); - m_creature->SetByteFlag(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_UNK_2); + m_creature->SetByteFlag(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_FLY_ANIM); float fX, fY, fZ; m_creature->GetRespawnCoord(fX, fY, fZ); diff --git a/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_skadi.cpp b/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_skadi.cpp index 55748a3c9..1a7b7fca6 100644 --- a/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_skadi.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_skadi.cpp @@ -457,7 +457,7 @@ struct npc_graufAI : public ScriptedAI { m_creature->SetLevitate(true); m_creature->SetWalk(false); - m_creature->SetByteValue(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_UNK_2); + m_creature->SetByteValue(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_FLY_ANIM); m_creature->GetMotionMaster()->MoveWaypoint(); m_uiFlightDelayTimer = 0; } diff --git a/scripts/outland/blades_edge_mountains.cpp b/scripts/outland/blades_edge_mountains.cpp index ee5cc4b7f..2981d6c46 100644 --- a/scripts/outland/blades_edge_mountains.cpp +++ b/scripts/outland/blades_edge_mountains.cpp @@ -158,7 +158,7 @@ struct mobs_nether_drakeAI : public ScriptedAI m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); // take off to location above m_creature->SetLevitate(true); - m_creature->SetByteFlag(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_UNK_2); + m_creature->SetByteFlag(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_FLY_ANIM); m_creature->GetMotionMaster()->MovePoint(1, m_creature->GetPositionX() + 50.0f, m_creature->GetPositionY(), m_creature->GetPositionZ() + 50.0f); break; } diff --git a/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_nazan_and_vazruden.cpp b/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_nazan_and_vazruden.cpp index 2bc218e77..e1700985d 100644 --- a/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_nazan_and_vazruden.cpp +++ b/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_nazan_and_vazruden.cpp @@ -112,7 +112,7 @@ struct boss_vazruden_heraldAI : public ScriptedAI // see boss_onyxia // sort of a hack, it is unclear how this really work but the values appear to be valid - m_creature->SetByteValue(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_UNK_2); + m_creature->SetByteValue(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_FLY_ANIM); m_creature->SetLevitate(true); } diff --git a/scripts/outland/shadowmoon_valley.cpp b/scripts/outland/shadowmoon_valley.cpp index e1d33c22b..f7b79c593 100644 --- a/scripts/outland/shadowmoon_valley.cpp +++ b/scripts/outland/shadowmoon_valley.cpp @@ -99,7 +99,7 @@ struct mob_mature_netherwing_drakeAI : public ScriptedAI m_uiCreditTimer = 7000; m_creature->SetLevitate(false); m_creature->HandleEmote(EMOTE_ONESHOT_ATTACKUNARMED); - m_creature->RemoveByteFlag(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_UNK_2); + m_creature->RemoveByteFlag(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_FLY_ANIM); } } @@ -141,7 +141,7 @@ struct mob_mature_netherwing_drakeAI : public ScriptedAI Reset(); m_creature->SetLevitate(true); - m_creature->SetByteFlag(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_UNK_2); + m_creature->SetByteFlag(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_FLY_ANIM); m_creature->GetMotionMaster()->Clear(); m_uiCreditTimer = 0; } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index af2f9c49a..8b4d263fa 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3071" + #define SD2_REVISION_NR "3072" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 60aa215ef..9cdee2ad3 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -3,7 +3,7 @@ -- DELETE FROM sd2_db_version; -INSERT INTO sd2_db_version (version) VALUES ('ScriptDev2 (for CMaNGOS 12682+) '); +INSERT INTO sd2_db_version (version) VALUES ('ScriptDev2 (for CMaNGOS 12799+) '); -- -- Below contains data for table `script_texts` mainly used in C++ parts. diff --git a/sql/updates/r3072_scriptdev2.sql b/sql/updates/r3072_scriptdev2.sql new file mode 100644 index 000000000..6d12c0b2d --- /dev/null +++ b/sql/updates/r3072_scriptdev2.sql @@ -0,0 +1 @@ +UPDATE sd2_db_version SET version='ScriptDev2 (for CMaNGOS 12799+) '; From cf35b6166dd234f26f2d26cfeb7f7895bcc30649 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Thu, 18 Dec 2014 01:54:59 +0100 Subject: [PATCH 1085/1172] [3073] Use the encounter frames in Ruby Sanctum and Icecrown Citadel Note: Encounter frames need to be implemented for Gunship battle when available Moreover ENCOUNTER_FRAME_UNK7 need to be send for Halion on player realm shift (real to twilight and reverse) Expects Cmangos 12668+ --- .../instance_icecrown_citadel.cpp | 32 +++++++++++++++++++ .../northrend/ruby_sanctum/boss_halion.cpp | 6 ++++ .../ruby_sanctum/instance_ruby_sanctum.cpp | 12 +++++++ sd2_revision_nr.h | 2 +- 4 files changed, 51 insertions(+), 1 deletion(-) diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_citadel.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_citadel.cpp index 83f5de335..e94f144d9 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_citadel.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_citadel.cpp @@ -356,6 +356,26 @@ void instance_icecrown_citadel::SetData(uint32 uiType, uint32 uiData) DoUseDoorOrButton(GO_COUNCIL_DOOR_1); DoUseDoorOrButton(GO_COUNCIL_DOOR_2); } + if (uiData == DONE || uiData == FAIL) + { + // remove encounter frames + if (Creature* pPrince = GetSingleCreatureFromStorage(NPC_VALANAR)) + SendEncounterFrame(ENCOUNTER_FRAME_DISENGAGE, pPrince->GetObjectGuid()); + if (Creature* pPrince = GetSingleCreatureFromStorage(NPC_KELESETH)) + SendEncounterFrame(ENCOUNTER_FRAME_DISENGAGE, pPrince->GetObjectGuid()); + if (Creature* pPrince = GetSingleCreatureFromStorage(NPC_TALDARAM)) + SendEncounterFrame(ENCOUNTER_FRAME_DISENGAGE, pPrince->GetObjectGuid()); + } + else if (uiData == IN_PROGRESS) + { + // add encounter frames + if (Creature* pPrince = GetSingleCreatureFromStorage(NPC_VALANAR)) + SendEncounterFrame(ENCOUNTER_FRAME_ENGAGE, pPrince->GetObjectGuid()); + if (Creature* pPrince = GetSingleCreatureFromStorage(NPC_KELESETH)) + SendEncounterFrame(ENCOUNTER_FRAME_ENGAGE, pPrince->GetObjectGuid()); + if (Creature* pPrince = GetSingleCreatureFromStorage(NPC_TALDARAM)) + SendEncounterFrame(ENCOUNTER_FRAME_ENGAGE, pPrince->GetObjectGuid()); + } break; case TYPE_QUEEN_LANATHEL: m_auiEncounter[uiType] = uiData; @@ -381,6 +401,18 @@ void instance_icecrown_citadel::SetData(uint32 uiType, uint32 uiData) DoUseDoorOrButton(GO_SINDRAGOSA_ENTRANCE); DoRespawnGameObject(GO_DREAMWALKER_CACHE, 60 * MINUTE); } + if (uiData == DONE || uiData == FAIL) + { + // remove encounter frames + if (Creature* pDragon = GetSingleCreatureFromStorage(NPC_VALITHRIA)) + SendEncounterFrame(ENCOUNTER_FRAME_DISENGAGE, pDragon->GetObjectGuid()); + } + else if (uiData == IN_PROGRESS) + { + // add encounter frames + if (Creature* pDragon = GetSingleCreatureFromStorage(NPC_VALITHRIA)) + SendEncounterFrame(ENCOUNTER_FRAME_ENGAGE, pDragon->GetObjectGuid()); + } break; case TYPE_SINDRAGOSA: m_auiEncounter[uiType] = uiData; diff --git a/scripts/northrend/ruby_sanctum/boss_halion.cpp b/scripts/northrend/ruby_sanctum/boss_halion.cpp index 0d4d1bec1..4967b0a61 100644 --- a/scripts/northrend/ruby_sanctum/boss_halion.cpp +++ b/scripts/northrend/ruby_sanctum/boss_halion.cpp @@ -174,7 +174,10 @@ struct boss_halion_realAI : public ScriptedAI void Aggro(Unit* /*pWho*/) override { if (m_pInstance) + { m_pInstance->SetData(TYPE_HALION, IN_PROGRESS); + m_pInstance->SendEncounterFrame(ENCOUNTER_FRAME_ENGAGE, m_creature->GetObjectGuid(), 1); + } DoScriptText(SAY_AGGRO, m_creature); DoCastSpellIfCan(m_creature, SPELL_TWILIGHT_PRECISION, CAST_TRIGGERED); @@ -388,6 +391,9 @@ struct boss_halion_twilightAI : public ScriptedAI void Aggro(Unit* /*pWho*/) override { + if (m_pInstance) + m_pInstance->SendEncounterFrame(ENCOUNTER_FRAME_ENGAGE, m_creature->GetObjectGuid(), 2); + DoCastSpellIfCan(m_creature, SPELL_DUSK_SHROUD, CAST_TRIGGERED); DoCastSpellIfCan(m_creature, SPELL_TWILIGHT_PRECISION, CAST_TRIGGERED); } diff --git a/scripts/northrend/ruby_sanctum/instance_ruby_sanctum.cpp b/scripts/northrend/ruby_sanctum/instance_ruby_sanctum.cpp index 466f3fd15..204ed268c 100644 --- a/scripts/northrend/ruby_sanctum/instance_ruby_sanctum.cpp +++ b/scripts/northrend/ruby_sanctum/instance_ruby_sanctum.cpp @@ -172,6 +172,18 @@ void instance_ruby_sanctum::SetData(uint32 uiType, uint32 uiData) return; m_auiEncounter[uiType] = uiData; DoUseDoorOrButton(GO_FLAME_RING); + + // encounter unit frame + if (uiData == DONE || uiData == FAIL) + { + // remove encounter frames + if (Creature* pDragon = GetSingleCreatureFromStorage(NPC_HALION_REAL)) + SendEncounterFrame(ENCOUNTER_FRAME_DISENGAGE, pDragon->GetObjectGuid()); + if (Creature* pDragon = GetSingleCreatureFromStorage(NPC_HALION_TWILIGHT)) + SendEncounterFrame(ENCOUNTER_FRAME_DISENGAGE, pDragon->GetObjectGuid()); + } + + // cleanup switch (uiData) { case FAIL: diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 8b4d263fa..df30bab5c 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3072" + #define SD2_REVISION_NR "3073" #endif // __SD2_REVISION_NR_H__ From 2f784ad463ffdd609a4e3a4b6b8805012ecd7e72 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Fri, 19 Dec 2014 22:17:54 +0100 Subject: [PATCH 1086/1172] [3074] Make use of the new swim movement wrapper --- scripts/kalimdor/dustwallow_marsh.cpp | 2 +- .../coilfang_reservoir/serpent_shrine/boss_the_lurker_below.cpp | 1 + sd2_revision_nr.h | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/kalimdor/dustwallow_marsh.cpp b/scripts/kalimdor/dustwallow_marsh.cpp index 889a352f7..b1292ab7b 100644 --- a/scripts/kalimdor/dustwallow_marsh.cpp +++ b/scripts/kalimdor/dustwallow_marsh.cpp @@ -856,7 +856,7 @@ struct boss_tethyrAI : public Scripted_NoMovementAI pPlayer->SendUpdateWorldState(WORLD_STATE_TETHYR_COUNT, MAX_MARKSMEN); } - m_creature->SetLevitate(true); + m_creature->SetSwim(true); Reset(); } diff --git a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_the_lurker_below.cpp b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_the_lurker_below.cpp index 76bf50aaf..fcf25cbff 100644 --- a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_the_lurker_below.cpp +++ b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_the_lurker_below.cpp @@ -76,6 +76,7 @@ struct boss_the_lurker_belowAI : public Scripted_NoMovementAI boss_the_lurker_belowAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_creature->SetSwim(true); Reset(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index df30bab5c..b47b9ba81 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3073" + #define SD2_REVISION_NR "3074" #endif // __SD2_REVISION_NR_H__ From 07c3cf60fcc174bb8c3d905e0b59894fb9bc32d1 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Tue, 23 Dec 2014 01:00:54 +0100 Subject: [PATCH 1087/1172] [3075] Setup for the Grand Champions event in ToC5 This implements the following: * long and short intro for the encounter * summon of all champions and trash mobs on the right sport * summon and movement of the champions across the arena * send the trash mobs waves and champion to the fight * encounter reset Note: combat behavior not yet defined and implemented --- .../boss_grand_champions.cpp | 323 ++++++++++- .../instance_trial_of_the_champion.cpp | 513 +++++++++++++++++- .../trial_of_the_champion.h | 91 +++- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 6 + sql/updates/r3075_mangos.sql | 6 + 6 files changed, 900 insertions(+), 41 deletions(-) create mode 100644 sql/updates/r3075_mangos.sql diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_grand_champions.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_grand_champions.cpp index fbc2cb1d4..e5f117bfa 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_grand_champions.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_grand_champions.cpp @@ -16,14 +16,333 @@ /* ScriptData SDName: grand_champions -SD%Complete: 0 -SDComment: +SD%Complete: 20 +SDComment: Only basics support SDCategory: Crusader Coliseum, Trial of the Champion EndScriptData */ #include "precompiled.h" #include "trial_of_the_champion.h" +#include "TransportSystem.h" + +enum +{ + // common spells + SPELL_DEFEND_DUMMY = 64101, // triggers 63130, 63131 and 63132 + SPELL_DEFEND = 62719, +}; + +/*###### +## trial_companion_common +######*/ + +struct trial_companion_commonAI : public ScriptedAI +{ + trial_companion_commonAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (instance_trial_of_the_champion*)pCreature->GetInstanceData(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); + Reset(); + } + + instance_trial_of_the_champion* m_pInstance; + bool m_bIsRegularMode; + + void Reset() override + { + DoCastSpellIfCan(m_creature, SPELL_DEFEND, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_DEFEND_DUMMY, CAST_TRIGGERED); + } + + void AttackStart(Unit* pWho) override + { + ScriptedAI::AttackStart(pWho); + + // Set Mount control + if (Creature* pMount = (Creature*)m_creature->GetTransportInfo()->GetTransport()) + pMount->AI()->AttackStart(pWho); + } + + void MoveInLineOfSight(Unit* pWho) override + { + // no aggro during the intro + if (m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE)) + return; + + ScriptedAI::MoveInLineOfSight(pWho); + } + + void SummonedMovementInform(Creature* pSummoned, uint32 uiMotionType, uint32 uiPointId) override + { + if (uiMotionType != POINT_MOTION_TYPE || uiPointId != POINT_ID_HOME || !m_pInstance) + return; + + if (Creature* pCenterTrigger = m_pInstance->GetSingleCreatureFromStorage(NPC_WORLD_TRIGGER)) + { + pSummoned->SetRespawnCoord(pSummoned->GetPositionX(), pSummoned->GetPositionY(), pSummoned->GetPositionZ(), pSummoned->GetAngle(pCenterTrigger)); + pSummoned->SetFacingToObject(pCenterTrigger); + } + } + + // Return true to handle shared timers and MeleeAttack + virtual bool UpdateChampionAI(const uint32 /*uiDiff*/) { return true; } + + void UpdateAI(const uint32 uiDiff) override + { + // Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + // Call specific virtual function + if (!UpdateChampionAI(uiDiff)) + return; + + DoMeleeAttackIfReady(); + } +}; + +enum +{ + // warrior spells +}; + +/*###### +## boss_champion_warrior +######*/ + +struct boss_champion_warriorAI : public trial_companion_commonAI +{ + boss_champion_warriorAI(Creature* pCreature) : trial_companion_commonAI(pCreature) { Reset(); } + + void Reset() override + { + trial_companion_commonAI::Reset(); + } + + bool UpdateChampionAI(const uint32 uiDiff) + { + // ToDo: + + return true; + } +}; + +CreatureAI* GetAI_boss_champion_warrior(Creature* pCreature) +{ + return new boss_champion_warriorAI(pCreature); +} + +enum +{ + // mage spells +}; + +/*###### +## boss_champion_mage +######*/ + +struct boss_champion_mageAI : public trial_companion_commonAI +{ + boss_champion_mageAI(Creature* pCreature) : trial_companion_commonAI(pCreature) { Reset(); } + + void Reset() override + { + trial_companion_commonAI::Reset(); + } + + bool UpdateChampionAI(const uint32 uiDiff) + { + // ToDo: + + return true; + } +}; + +CreatureAI* GetAI_boss_champion_mage(Creature* pCreature) +{ + return new boss_champion_mageAI(pCreature); +} + +enum +{ + // shaman spells +}; + +/*###### +## boss_champion_shaman +######*/ + +struct boss_champion_shamanAI : public trial_companion_commonAI +{ + boss_champion_shamanAI(Creature* pCreature) : trial_companion_commonAI(pCreature) { Reset(); } + + void Reset() override + { + trial_companion_commonAI::Reset(); + } + + bool UpdateChampionAI(const uint32 uiDiff) + { + // ToDo: + + return true; + } +}; + +CreatureAI* GetAI_boss_champion_shaman(Creature* pCreature) +{ + return new boss_champion_shamanAI(pCreature); +} + +enum +{ + // hunter spells +}; + +/*###### +## boss_champion_hunter +######*/ + +struct boss_champion_hunterAI : public trial_companion_commonAI +{ + boss_champion_hunterAI(Creature* pCreature) : trial_companion_commonAI(pCreature) { Reset(); } + + void Reset() override + { + trial_companion_commonAI::Reset(); + } + + bool UpdateChampionAI(const uint32 uiDiff) + { + // ToDo: + + return true; + } +}; + +CreatureAI* GetAI_boss_champion_hunter(Creature* pCreature) +{ + return new boss_champion_hunterAI(pCreature); +} + +enum +{ + // rogue spells +}; + +/*###### +## boss_champion_rogue +######*/ + +struct boss_champion_rogueAI : public trial_companion_commonAI +{ + boss_champion_rogueAI(Creature* pCreature) : trial_companion_commonAI(pCreature) { Reset(); } + + void Reset() override + { + trial_companion_commonAI::Reset(); + } + + bool UpdateCompanionAI(const uint32 uiDiff) + { + // ToDo: + + return true; + } +}; + +CreatureAI* GetAI_boss_champion_rogue(Creature* pCreature) +{ + return new boss_champion_rogueAI(pCreature); +} + +/*###### +## npc_champion_mount +######*/ + +enum +{ + +}; + +struct npc_champion_mountAI : public ScriptedAI +{ + npc_champion_mountAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (instance_trial_of_the_champion*)pCreature->GetInstanceData(); + Reset(); + } + + instance_trial_of_the_champion* m_pInstance; + + void Reset() override { } + + void MovementInform(uint32 uiMotionType, uint32 uiPointId) override + { + if (uiMotionType != POINT_MOTION_TYPE || !m_pInstance) + return; + + switch (uiPointId) + { + case POINT_ID_CENTER: + m_pInstance->MoveChampionToHome(m_creature); + break; + case POINT_ID_HOME: + if (Creature* pCenterTrigger = m_pInstance->GetSingleCreatureFromStorage(NPC_WORLD_TRIGGER)) + { + m_creature->SetRespawnCoord(m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), m_creature->GetAngle(pCenterTrigger)); + m_creature->SetFacingToObject(pCenterTrigger); + } + m_pInstance->InformChampionReachHome(); + break; + } + } + + void MoveInLineOfSight(Unit* /*pWho*/) override { } + + void UpdateAI(const uint32 uiDiff) override + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + } +}; + +CreatureAI* GetAI_npc_champion_mount(Creature* pCreature) +{ + return new npc_champion_mountAI(pCreature); +} void AddSC_boss_grand_champions() { + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_champion_warrior"; + pNewScript->GetAI = &GetAI_boss_champion_warrior; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "boss_champion_mage"; + pNewScript->GetAI = &GetAI_boss_champion_mage; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "boss_champion_shaman"; + pNewScript->GetAI = &GetAI_boss_champion_shaman; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "boss_champion_hunter"; + pNewScript->GetAI = &GetAI_boss_champion_hunter; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "boss_champion_rogue"; + pNewScript->GetAI = &GetAI_boss_champion_rogue; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_champion_mount"; + pNewScript->GetAI = &GetAI_npc_champion_mount; + pNewScript->RegisterSelf(); } diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/instance_trial_of_the_champion.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/instance_trial_of_the_champion.cpp index 27de0e33b..dffee4e1c 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/instance_trial_of_the_champion.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/instance_trial_of_the_champion.cpp @@ -34,18 +34,7 @@ enum { // grand champions SAY_HERALD_HORDE_CHALLENGE = -1650000, - SAY_HERALD_HORDE_WARRIOR = -1650001, - SAY_HERALD_HORDE_MAGE = -1650002, - SAY_HERALD_HORDE_SHAMAN = -1650003, - SAY_HERALD_HORDE_HUNTER = -1650004, - SAY_HERALD_HORDE_ROGUE = -1650005, - SAY_HERALD_ALLIANCE_CHALLENGE = -1650006, - SAY_HERALD_ALLIANCE_WARRIOR = -1650007, - SAY_HERALD_ALLIANCE_MAGE = -1650008, - SAY_HERALD_ALLIANCE_SHAMAN = -1650009, - SAY_HERALD_ALLIANCE_HUNTER = -1650010, - SAY_HERALD_ALLIANCE_ROGUE = -1650011, SAY_TIRION_CHALLENGE_WELCOME = -1650012, SAY_TIRION_FIRST_CHALLENGE = -1650013, @@ -94,18 +83,31 @@ enum SPELL_ARGENT_SUMMON_CHAMPION_WAVE = 67295, SPELL_ARGENT_SUMMON_BOSS_4 = 67396, SPELL_ARGENT_HERALD_FEIGN_DEATH = 66804, + + // Arena event spells - not used for the moment + // SPELL_SPECTATOR_FORCE_CHANT = 66354, + // SPELL_SPECTATOR_FX_CHANT = 66677, }; static const DialogueEntryTwoSide aTocDialogues[] = { - // ToDo: - {0, 0, 0, 0 , 0} + {TYPE_ARENA_CHALLENGE, 0, 0, 0, 1000}, + {SAY_HERALD_HORDE_CHALLENGE, NPC_ARELAS_BRIGHTSTAR, SAY_HERALD_ALLIANCE_CHALLENGE, NPC_JAEREN_SUNSWORN, 5000}, + {SAY_TIRION_CHALLENGE_WELCOME, NPC_TIRION_FORDRING, 0, 0, 6000}, + {SAY_TIRION_FIRST_CHALLENGE, NPC_TIRION_FORDRING, 0, 0, 3000}, + {NPC_TIRION_FORDRING, 0, 0, 0, 0}, + {0, 0, 0, 0, 0} }; instance_trial_of_the_champion::instance_trial_of_the_champion(Map* pMap) : ScriptedInstance(pMap), DialogueHelper(aTocDialogues), m_uiTeam(TEAM_NONE), m_uiHeraldEntry(0), - m_uiGrandChampionEntry(0) + m_uiGrandChampionEntry(0), + m_uiIntroTimer(0), + m_uiIntroStage(0), + m_uiArenaStage(0), + m_uiGateResetTimer(0), + m_bSkipIntro(false) { Initialize(); } @@ -114,6 +116,9 @@ void instance_trial_of_the_champion::Initialize() { memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); InitializeDialogueHelper(this); + + m_vAllianceTriggersGuids.resize(MAX_CHAMPIONS_AVAILABLE); + m_vHordeTriggersGuids.resize(MAX_CHAMPIONS_AVAILABLE); } void instance_trial_of_the_champion::OnPlayerEnter(Player* pPlayer) @@ -166,7 +171,64 @@ void instance_trial_of_the_champion::OnCreatureCreate(Creature* pCreature) case NPC_HORDE_ROGUE: case NPC_EADRIC: case NPC_PALETRESS: + case NPC_WORLD_TRIGGER: + case NPC_SPECTATOR_HUMAN: + case NPC_SPECTATOR_ORC: + case NPC_SPECTATOR_TROLL: + case NPC_SPECTATOR_TAUREN: + case NPC_SPECTATOR_BLOOD_ELF: + case NPC_SPECTATOR_UNDEAD: + case NPC_SPECTATOR_DWARF: + case NPC_SPECTATOR_DRAENEI: + case NPC_SPECTATOR_NIGHT_ELF: + case NPC_SPECTATOR_GNOME: break; + case NPC_SPECTATOR_GENERIC: + // alliance side + if (pCreature->GetPositionX() > 775.0f) + { + // night elf + if (pCreature->GetPositionY() > 650.0f) + m_vAllianceTriggersGuids[3] = pCreature->GetObjectGuid(); + // gnome + else if (pCreature->GetPositionY() > 630.0f) + m_vAllianceTriggersGuids[1] = pCreature->GetObjectGuid(); + // human + else if (pCreature->GetPositionY() > 615.0f) + m_vAllianceTriggersGuids[0] = pCreature->GetObjectGuid(); + // dwarf + else if (pCreature->GetPositionY() > 595.0f) + m_vAllianceTriggersGuids[4] = pCreature->GetObjectGuid(); + // draenei + else if (pCreature->GetPositionY() > 580.0f) + m_vAllianceTriggersGuids[2] = pCreature->GetObjectGuid(); + } + // horde side + else if (pCreature->GetPositionX() < 715.0f) + { + // undead + if (pCreature->GetPositionY() > 650.0f) + m_vHordeTriggersGuids[4] = pCreature->GetObjectGuid(); + // blood elf + else if (pCreature->GetPositionY() > 630.0f) + m_vHordeTriggersGuids[1] = pCreature->GetObjectGuid(); + // orc + else if (pCreature->GetPositionY() > 615.0f) + m_vHordeTriggersGuids[0] = pCreature->GetObjectGuid(); + // troll + else if (pCreature->GetPositionY() > 595.0f) + m_vHordeTriggersGuids[3] = pCreature->GetObjectGuid(); + // tauren + else if (pCreature->GetPositionY() > 580.0f) + m_vHordeTriggersGuids[2] = pCreature->GetObjectGuid(); + } + return; + case NPC_WARHORSE_ALLIANCE: + case NPC_WARHORSE_HORDE: + case NPC_BATTLEWORG_ALLIANCE: + case NPC_BATTLEWORG_HORDE: + m_lArenaMountsGuids.push_back(pCreature->GetObjectGuid()); + return; default: return; } @@ -200,6 +262,7 @@ void instance_trial_of_the_champion::SetData(uint32 uiType, uint32 uiData) { case TYPE_GRAND_CHAMPIONS: m_auiEncounter[uiType] = uiData; + DoUseDoorOrButton(GO_NORTH_GATE); if (uiData == DONE) DoRespawnGameObject(instance->IsRegularDifficulty() ? GO_CHAMPIONS_LOOT : GO_CHAMPIONS_LOOT_H, 30 * MINUTE); break; @@ -216,6 +279,33 @@ void instance_trial_of_the_champion::SetData(uint32 uiType, uint32 uiData) case TYPE_BLACK_KNIGHT: m_auiEncounter[uiType] = uiData; break; + case TYPE_ARENA_CHALLENGE: + m_auiEncounter[uiType] = uiData; + if (uiData == IN_PROGRESS) + { + // start arena challenge + m_uiArenaStage = 0; + DoSendNextArenaWave(); + } + else if (uiData == DONE) + { + // start grand champions challenge (without mount) + // ToDo! + + // despawn vehicle mounts + for (GuidList::const_iterator itr = m_lArenaMountsGuids.begin(); itr != m_lArenaMountsGuids.end(); ++itr) + { + if (Creature* pMount = instance->GetCreature(*itr)) + pMount->ForcedDespawn(); + } + m_lArenaMountsGuids.clear(); + } + else if (uiData == FAIL) + { + DoCleanupArenaOnWipe(); + SetData(TYPE_ARENA_CHALLENGE, NOT_STARTED); + } + return; default: script_error_log("Instance Trial of The Champion: ERROR SetData = %u for type %u does not exist/not implemented.", uiType, uiData); return; @@ -265,6 +355,67 @@ void instance_trial_of_the_champion::Load(const char* chrIn) OUT_LOAD_INST_DATA_COMPLETE; } +void instance_trial_of_the_champion::OnCreatureDeath(Creature* pCreature) +{ + switch (pCreature->GetEntry()) + { + case NPC_ALLIANCE_WARRIOR_CHAMPION: + case NPC_ALLIANCE_MAGE_CHAMPION: + case NPC_ALLIANCE_SHAMAN_CHAMPION: + case NPC_ALLIANCE_HUNTER_CHAMPION: + case NPC_ALLIANCE_ROGUE_CHAMPION: + case NPC_HORDE_WARRIOR_CHAMPION: + case NPC_HORDE_MAGE_CHAMPION: + case NPC_HORDE_SHAMAN_CHAMPION: + case NPC_HORDE_HUNTER_CHAMPION: + case NPC_HORDE_ROGUE_CHAMPION: + // handle champion trash mob kill + if (m_sArenaHelpersGuids[m_uiArenaStage].find(pCreature->GetObjectGuid()) != m_sArenaHelpersGuids[m_uiArenaStage].end()) + { + m_sArenaHelpersGuids[m_uiArenaStage].erase(pCreature->GetObjectGuid()); + + // send next arena wave if cleared + if (m_sArenaHelpersGuids[m_uiArenaStage].empty()) + { + ++m_uiArenaStage; + DoSendNextArenaWave(); + } + } + break; + } +} + +void instance_trial_of_the_champion::OnCreatureEvade(Creature* pCreature) +{ + switch (pCreature->GetEntry()) + { + case NPC_ALLIANCE_WARRIOR_CHAMPION: + case NPC_ALLIANCE_MAGE_CHAMPION: + case NPC_ALLIANCE_SHAMAN_CHAMPION: + case NPC_ALLIANCE_HUNTER_CHAMPION: + case NPC_ALLIANCE_ROGUE_CHAMPION: + case NPC_HORDE_WARRIOR_CHAMPION: + case NPC_HORDE_MAGE_CHAMPION: + case NPC_HORDE_SHAMAN_CHAMPION: + case NPC_HORDE_HUNTER_CHAMPION: + case NPC_HORDE_ROGUE_CHAMPION: + case NPC_ALLIANCE_WARRIOR: + case NPC_ALLIANCE_MAGE: + case NPC_ALLIANCE_SHAMAN: + case NPC_ALLIANCE_HUNTER: + case NPC_ALLIANCE_ROGUE: + case NPC_HORDE_WARRIOR: + case NPC_HORDE_MAGE: + case NPC_HORDE_SHAMAN: + case NPC_HORDE_HUNTER: + case NPC_HORDE_ROGUE: + if (GetData(TYPE_ARENA_CHALLENGE) == IN_PROGRESS) + SetData(TYPE_ARENA_CHALLENGE, FAIL); + break; + } +} + +// Function that summons herald and vehicle mounts if required void instance_trial_of_the_champion::DoSummonHeraldIfNeeded(Unit* pSummoner) { if (!pSummoner) @@ -283,14 +434,342 @@ void instance_trial_of_the_champion::DoSummonHeraldIfNeeded(Unit* pSummoner) } } -void instance_trial_of_the_champion::JustDidDialogueStep(int32 iEntry) +// Function that sends the champions and trash mobs into to fight in the arena +void instance_trial_of_the_champion::DoSendNextArenaWave() +{ + // center trigger for reference + Creature* pCenterTrigger = GetSingleCreatureFromStorage(NPC_WORLD_TRIGGER); + if (!pCenterTrigger) + return; + + float fX, fY, fZ; + + // trash waves cleaned - send the summoned champions to the center + if (m_uiArenaStage == MAX_CHAMPIONS_ARENA) + { + for (uint8 i = 0; i < MAX_CHAMPIONS_ARENA; ++i) + { + // move mounts to center + if (Creature* pMount = instance->GetCreature(m_ArenaMountsGuids[i])) + { + pMount->SetWalk(false); + pCenterTrigger->GetContactPoint(pMount, fX, fY, fZ, 2 * INTERACTION_DISTANCE); + pMount->GetMotionMaster()->MovePoint(POINT_ID_COMBAT, fX, fY, fZ); + } + + // set champions to attack + if (Creature* pChampion = instance->GetCreature(m_ArenaChampionsGuids[i])) + pChampion->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE); + } + } + // send trash waves of champions in the arena + else + { + for (GuidSet::const_iterator itr = m_sArenaHelpersGuids[m_uiArenaStage].begin(); itr != m_sArenaHelpersGuids[m_uiArenaStage].end(); ++itr) + { + if (Creature* pHelper = instance->GetCreature(*itr)) + { + pHelper->SetWalk(false); + pCenterTrigger->GetContactPoint(pHelper, fX, fY, fZ, 2 * INTERACTION_DISTANCE); + pHelper->GetMotionMaster()->MovePoint(POINT_ID_COMBAT, fX, fY, fZ); + pHelper->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE | UNIT_FLAG_PASSIVE); + } + } + } +} + +// Function that cleans the arena on wipe +void instance_trial_of_the_champion::DoCleanupArenaOnWipe() { - // ToDo: + // cleanup arena encounter + for (uint8 i = 0; i < MAX_CHAMPIONS_ARENA; ++i) + { + if (Creature* pMount = instance->GetCreature(m_ArenaMountsGuids[i])) + pMount->ForcedDespawn(); + + if (Creature* pChampion = instance->GetCreature(m_ArenaChampionsGuids[i])) + pChampion->ForcedDespawn(); + + for (GuidSet::const_iterator itr = m_sArenaHelpersGuids[i].begin(); itr != m_sArenaHelpersGuids[i].end(); ++itr) + { + if (Creature* pHelper = instance->GetCreature(*itr)) + pHelper->ForcedDespawn(); + } + + m_sArenaHelpersGuids[i].clear(); + } + + // reset herald + if (Creature* pHerald = GetSingleCreatureFromStorage(m_uiHeraldEntry)) + { + pHerald->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); + pHerald->GetMotionMaster()->MoveTargetedHome(); + } } +// Function that prepares the Grand Champions encounter (long and short intro) void instance_trial_of_the_champion::DoPrepareChampions(bool bSkipIntro) { - // ToDo: + m_bSkipIntro = bSkipIntro; + + // long intro + if (!bSkipIntro) + StartNextDialogueText(TYPE_ARENA_CHALLENGE); + // short intro + else + { + StartNextDialogueText(SAY_TIRION_CHALLENGE_WELCOME); + + // move the herald to the gate + if (Creature* pHerald = GetSingleCreatureFromStorage(m_uiHeraldEntry)) + pHerald->GetMotionMaster()->MovePoint(0, aHeraldPositions[1][0], aHeraldPositions[1][1], aHeraldPositions[1][2]); + } +} + +// Function that sends the champion to intro home location +void instance_trial_of_the_champion::MoveChampionToHome(Creature* pChampion) +{ + uint8 uiIndex = m_vChampionsIndex[m_uiIntroStage - 1]; + + // get the corresponding trigger + Creature* pTrigger = instance->GetCreature(m_uiTeam == ALLIANCE ? m_vHordeTriggersGuids[uiIndex] : m_vAllianceTriggersGuids[uiIndex]); + if (!pTrigger) + return; + + // move to the right position + pChampion->SetWalk(true); + pChampion->GetMotionMaster()->MovePoint(POINT_ID_HOME, pTrigger->GetPositionX(), pTrigger->GetPositionY(), pTrigger->GetPositionZ()); + + if (m_uiIntroStage == MAX_CHAMPIONS_ARENA) + { + // move the herald to the gate + if (Creature* pHerald = GetSingleCreatureFromStorage(m_uiHeraldEntry)) + pHerald->GetMotionMaster()->MovePoint(0, aHeraldPositions[1][0], aHeraldPositions[1][1], aHeraldPositions[1][2]); + } +} + +// Function that handles instance behavior when champion reaches intro home position +// This sets the trash mobs to the right points and sends the next champion for intro +void instance_trial_of_the_champion::InformChampionReachHome() +{ + uint8 uiIndex = m_vChampionsIndex[m_uiIntroStage - 1]; + + // get the corresponding trigger + Creature* pTrigger = instance->GetCreature(m_uiTeam == ALLIANCE ? m_vHordeTriggersGuids[uiIndex] : m_vAllianceTriggersGuids[uiIndex]); + if (!pTrigger) + return; + + // center trigger for reference + Creature* pCenterTrigger = GetSingleCreatureFromStorage(NPC_WORLD_TRIGGER); + if (!pCenterTrigger) + return; + + float fX, fY, fZ; + uint8 j = 0; + + // move helpers to the right point + for (GuidSet::const_iterator itr = m_sArenaHelpersGuids[m_uiIntroStage - 1].begin(); itr != m_sArenaHelpersGuids[m_uiIntroStage - 1].end(); ++itr) + { + if (Creature* pHelper = instance->GetCreature(*itr)) + { + pTrigger->GetNearPoint(pTrigger, fX, fY, fZ, 0, 5.0f, pTrigger->GetAngle(pCenterTrigger) - (M_PI_F * 0.25f) + j * (M_PI_F * 0.25f)); + pHelper->GetMotionMaster()->Clear(); + pHelper->GetMotionMaster()->MovePoint(POINT_ID_HOME, fX, fY, fZ); + ++j; + } + } + + // set timer + if (m_uiIntroStage == MAX_CHAMPIONS_ARENA) + m_uiIntroTimer = 5000; + else + m_uiIntroTimer = 2000; +} + +void instance_trial_of_the_champion::JustDidDialogueStep(int32 iEntry) +{ + switch (iEntry) + { + // start arena long intro + case TYPE_ARENA_CHALLENGE: + if (Creature* pHerald = GetSingleCreatureFromStorage(m_uiHeraldEntry)) + { + if (Creature* pTrigger = GetSingleCreatureFromStorage(NPC_WORLD_TRIGGER)) + pHerald->GetMotionMaster()->MovePoint(0, pTrigger->GetPositionX(), pTrigger->GetPositionY(), pTrigger->GetPositionZ()); + } + break; + case SAY_HERALD_ALLIANCE_CHALLENGE: + case SAY_HERALD_HORDE_CHALLENGE: + if (Creature* pHerald = GetSingleCreatureFromStorage(m_uiHeraldEntry)) + { + if (Creature* pTirion = GetSingleCreatureFromStorage(NPC_TIRION_FORDRING)) + pHerald->SetFacingToObject(pTirion); + + // ToDo: play intro music + } + break; + // complete intro - start arena event + case NPC_TIRION_FORDRING: + m_uiIntroStage = 0; + m_uiIntroTimer = 1000; + break; + } +} + +void instance_trial_of_the_champion::Update(uint32 uiDiff) +{ + DialogueUpdate(uiDiff); + + if (m_uiIntroTimer) + { + if (m_uiIntroTimer <= uiDiff) + { + switch (m_uiIntroStage) + { + // spawn champions + case 0: + case 1: + case 2: + { + uint8 uiIndex = m_vChampionsIndex[m_uiIntroStage]; + + // summoner (herald) + Creature* pHerald = GetSingleCreatureFromStorage(m_uiHeraldEntry); + if (!pHerald) + return; + + // center trigger for reference + Creature* pCenterTrigger = GetSingleCreatureFromStorage(NPC_WORLD_TRIGGER); + if (!pCenterTrigger) + return; + + // short intro + if (m_bSkipIntro) + { + // get the summoning trigger + Creature* pTrigger = instance->GetCreature(m_uiTeam == ALLIANCE ? m_vHordeTriggersGuids[uiIndex] : m_vAllianceTriggersGuids[uiIndex]); + if (!pTrigger) + return; + + // summon grand champion, mount and emote + if (Creature* pChampion = pHerald->SummonCreature(m_uiTeam == ALLIANCE ? aHordeChampions[uiIndex].uiEntry : aAllianceChampions[uiIndex].uiEntry, + pTrigger->GetPositionX(), pTrigger->GetPositionY(), pTrigger->GetPositionZ(), pTrigger->GetAngle(pCenterTrigger), TEMPSUMMON_DEAD_DESPAWN, 0)) + { + // handle emote + if (Creature* pStalker = GetSingleCreatureFromStorage(m_uiTeam == ALLIANCE ? aHordeChampions[uiIndex].uiCrowdStalker : aAllianceChampions[uiIndex].uiCrowdStalker)) + DoScriptText(m_uiTeam == ALLIANCE ? aHordeChampions[uiIndex].iEmoteEntry : aAllianceChampions[uiIndex].iEmoteEntry, pStalker, pChampion); + + // summon champion mount + if (Creature* pMount = pChampion->SummonCreature(m_uiTeam == ALLIANCE ? aHordeChampions[uiIndex].uiMount : aAllianceChampions[uiIndex].uiMount, + pTrigger->GetPositionX(), pTrigger->GetPositionY(), pTrigger->GetPositionZ(), pTrigger->GetAngle(pCenterTrigger), TEMPSUMMON_DEAD_DESPAWN, 0)) + { + pChampion->CastSpell(pMount, SPELL_RIDE_VEHICLE_HARDCODED, true); + + // set guid + m_ArenaChampionsGuids[m_uiIntroStage] = pChampion->GetObjectGuid(); + m_ArenaMountsGuids[m_uiIntroStage] = pMount->GetObjectGuid(); + } + } + + // summon helper champions + float fX, fY, fZ; + for (uint8 j = 0; j < 3; ++j) + { + pTrigger->GetNearPoint(pTrigger, fX, fY, fZ, 0, 5.0f, pTrigger->GetAngle(pCenterTrigger) - (M_PI_F * 0.25f) + j * (M_PI_F * 0.25f)); + if (Creature* pHelper = pHerald->SummonCreature(m_uiTeam == ALLIANCE ? aHordeChampions[uiIndex].uiChampion : aAllianceChampions[uiIndex].uiChampion, + fX, fY, fZ, pTrigger->GetAngle(pCenterTrigger), TEMPSUMMON_DEAD_DESPAWN, 0)) + m_sArenaHelpersGuids[m_uiIntroStage].insert(pHelper->GetObjectGuid()); + } + + if (m_uiIntroStage == MAX_CHAMPIONS_ARENA - 1) + m_uiIntroTimer = 5000; + else + m_uiIntroTimer = 2000; + } + // long intro + else + { + float fX, fY, fZ; + DoUseDoorOrButton(GO_MAIN_GATE); + m_uiGateResetTimer = 10000; // ToDo: set this as door reset timer when fixed in core + + // summon grand champion, mount and emote + if (Creature* pChampion = pHerald->SummonCreature(m_uiTeam == ALLIANCE ? aHordeChampions[uiIndex].uiEntry : aAllianceChampions[uiIndex].uiEntry, + aIntroPositions[0][0], aIntroPositions[0][1], aIntroPositions[0][2], aIntroPositions[0][3], TEMPSUMMON_DEAD_DESPAWN, 0)) + { + // text + DoScriptText(m_uiTeam == ALLIANCE ? aHordeChampions[uiIndex].iYellEntry : aAllianceChampions[uiIndex].iYellEntry, pHerald); + pHerald->SetFacingToObject(pChampion); + + // handle emote + if (Creature* pStalker = GetSingleCreatureFromStorage(m_uiTeam == ALLIANCE ? aHordeChampions[uiIndex].uiCrowdStalker : aAllianceChampions[uiIndex].uiCrowdStalker)) + DoScriptText(m_uiTeam == ALLIANCE ? aHordeChampions[uiIndex].iEmoteEntry : aAllianceChampions[uiIndex].iEmoteEntry, pStalker, pChampion); + + // summon champion mount + if (Creature* pMount = pChampion->SummonCreature(m_uiTeam == ALLIANCE ? aHordeChampions[uiIndex].uiMount : aAllianceChampions[uiIndex].uiMount, + aIntroPositions[0][0], aIntroPositions[0][1], aIntroPositions[0][2], aIntroPositions[0][3], TEMPSUMMON_DEAD_DESPAWN, 0)) + { + pChampion->CastSpell(pMount, SPELL_RIDE_VEHICLE_HARDCODED, true); + + pMount->SetWalk(false); + pCenterTrigger->GetContactPoint(pChampion, fX, fY, fZ, 2 * INTERACTION_DISTANCE); + pMount->GetMotionMaster()->MovePoint(POINT_ID_CENTER, fX, fY, fZ); + + // set guid + m_ArenaChampionsGuids[m_uiIntroStage] = pChampion->GetObjectGuid(); + m_ArenaMountsGuids[m_uiIntroStage] = pMount->GetObjectGuid(); + + // summon helper champions + for (uint8 j = 0; j < 3; ++j) + { + if (Creature* pHelper = pChampion->SummonCreature(m_uiTeam == ALLIANCE ? aHordeChampions[uiIndex].uiChampion : aAllianceChampions[uiIndex].uiChampion, + aIntroPositions[j + 1][0], aIntroPositions[j + 1][1], aIntroPositions[j + 1][2], aIntroPositions[j + 1][3], TEMPSUMMON_DEAD_DESPAWN, 0)) + { + pHelper->GetMotionMaster()->MoveFollow(pMount, pHelper->GetDistance(pMount), M_PI_F/2 + pHelper->GetAngle(pMount)); + m_sArenaHelpersGuids[m_uiIntroStage].insert(pHelper->GetObjectGuid()); + } + } + } + } + + // stop event; timer in InformChampionReachHome() + m_uiIntroTimer = 0; + } + break; + } + // complete intro - start arena challenge + case 3: + if (Creature* pTirion = GetSingleCreatureFromStorage(NPC_TIRION_FORDRING)) + DoScriptText(SAY_TIRION_CHALLENGE_BEGIN, pTirion); + + if (Creature* pHerald = GetSingleCreatureFromStorage(m_uiHeraldEntry)) + { + if (Creature* pCenterTrigger = GetSingleCreatureFromStorage(NPC_WORLD_TRIGGER)) + pHerald->SetFacingToObject(pCenterTrigger); + } + + // start first half of the encounter + SetData(TYPE_ARENA_CHALLENGE, IN_PROGRESS); + m_uiIntroTimer = 0; + break; + } + ++m_uiIntroStage; + } + else + m_uiIntroTimer -= uiDiff; + } + + // ToDo: set this as door reset timer when fixed in core + if (m_uiGateResetTimer) + { + if (m_uiGateResetTimer <= uiDiff) + { + DoUseDoorOrButton(GO_MAIN_GATE); + m_uiGateResetTimer = 0; + } + else + m_uiGateResetTimer -= uiDiff; + } } InstanceData* GetInstanceData_instance_trial_of_the_champion(Map* pMap) diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.h b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.h index 09e56aef5..a6cf993ce 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.h +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.h @@ -7,7 +7,7 @@ enum { - MAX_ENCOUNTER = 3, + MAX_ENCOUNTER = 4, MAX_CHAMPIONS_AVAILABLE = 5, MAX_CHAMPIONS_ARENA = 3, MAX_CHAMPIONS_MOUNTS = 24, @@ -15,6 +15,7 @@ enum TYPE_GRAND_CHAMPIONS = 0, TYPE_ARGENT_CHAMPION = 1, TYPE_BLACK_KNIGHT = 2, + TYPE_ARENA_CHALLENGE = 3, // used to handle first challenge data; not saved // event handler NPC_ARELAS_BRIGHTSTAR = 35005, // alliance @@ -59,10 +60,12 @@ enum NPC_HORDE_ROGUE_CHAMPION = 35327, // Undercity Champion // spectators triggers - NPC_WORLD_TRIGGER = 22515, - NPC_SPECTATOR_GENERIC = 35016, - NPC_SPECTATOR_HORDE = 34883, + NPC_WORLD_TRIGGER = 22515, // arena center trigger + NPC_SPECTATOR_GENERIC = 35016, // generic trigger that marks the home location for champions + + NPC_SPECTATOR_HORDE = 34883, // creatures that handle emote and crowd NPC_SPECTATOR_ALLIANCE = 34887, + NPC_SPECTATOR_HUMAN = 34900, NPC_SPECTATOR_ORC = 34901, NPC_SPECTATOR_TROLL = 34902, @@ -76,8 +79,8 @@ enum // mounts NPC_WARHORSE_ALLIANCE = 36557, // alliance mount vehicle - NPC_WARHORSE_HORDE = 35644, // dummy - part of the decorations - NPC_BATTLEWORG_ALLIANCE = 36559, // dummy - part of the decorations + NPC_WARHORSE_HORDE = 35644, // hostile - used by the champions + NPC_BATTLEWORG_ALLIANCE = 36559, // hostile - used by the champions NPC_BATTLEWORG_HORDE = 36558, // horde mount vehicle // argent challegers @@ -133,6 +136,24 @@ enum EMOTE_NIGHT_ELVES = -1650025, EMOTE_HUMANS = -1650026, EMOTE_DRAENEI = -1650027, + + // yells + SAY_HERALD_HORDE_WARRIOR = -1650001, + SAY_HERALD_HORDE_MAGE = -1650002, + SAY_HERALD_HORDE_SHAMAN = -1650003, + SAY_HERALD_HORDE_HUNTER = -1650004, + SAY_HERALD_HORDE_ROGUE = -1650005, + + SAY_HERALD_ALLIANCE_WARRIOR = -1650007, + SAY_HERALD_ALLIANCE_MAGE = -1650008, + SAY_HERALD_ALLIANCE_SHAMAN = -1650009, + SAY_HERALD_ALLIANCE_HUNTER = -1650010, + SAY_HERALD_ALLIANCE_ROGUE = -1650011, + + // other + POINT_ID_CENTER = 1, + POINT_ID_HOME = 2, + POINT_ID_COMBAT = 3, }; static const float aHeraldPositions[3][4] = @@ -142,32 +163,37 @@ static const float aHeraldPositions[3][4] = {743.377f, 630.240f, 411.073f, 0.0f}, // Near center position }; +static const float aIntroPositions[4][4] = +{ + {746.683f, 685.050f, 412.384f, 4.744f}, // Champion gate spawn loc + {746.425f, 688.927f, 412.365f, 4.744f}, // Helpers gate spawn locs + {750.531f, 688.431f, 412.369f, 4.744f}, + {742.245f, 688.254f, 412.370f, 4.744f}, +}; + // data that provides grand champion entry, vehicle mount, trash champions with the spawn locations as well as crowd stalker and emote entry struct ChampionsData { uint32 uiEntry, uiMount, uiChampion, uiCrowdStalker; - int32 iEmoteEntry; - float fX, fY, fZ, fO; + int32 iEmoteEntry, iYellEntry; }; -// ToDo: add coords static const ChampionsData aAllianceChampions[MAX_CHAMPIONS_AVAILABLE] = { - { NPC_ALLIANCE_WARRIOR, NPC_ALLIANCE_WARRIOR_MOUNT, NPC_ALLIANCE_WARRIOR_CHAMPION, NPC_SPECTATOR_HUMAN, EMOTE_HUMANS }, - { NPC_ALLIANCE_MAGE, NPC_ALLIANCE_MAGE_MOUNT, NPC_ALLIANCE_MAGE_CHAMPION, NPC_SPECTATOR_GNOME, EMOTE_GNOMES }, - { NPC_ALLIANCE_SHAMAN, NPC_ALLIANCE_SHAMAN_MOUNT, NPC_ALLIANCE_SHAMAN_CHAMPION, NPC_SPECTATOR_DRAENEI, EMOTE_DRAENEI }, - { NPC_ALLIANCE_HUNTER, NPC_ALLIANCE_HUNTER_MOUNT, NPC_ALLIANCE_HUNTER_CHAMPION, NPC_SPECTATOR_NIGHT_ELF, EMOTE_NIGHT_ELVES }, - { NPC_ALLIANCE_ROGUE, NPC_ALLIANCE_ROGUE_MOUNT, NPC_ALLIANCE_ROGUE_CHAMPION, NPC_SPECTATOR_DWARF, EMOTE_DWARVES } + { NPC_ALLIANCE_WARRIOR, NPC_ALLIANCE_WARRIOR_MOUNT, NPC_ALLIANCE_WARRIOR_CHAMPION, NPC_SPECTATOR_HUMAN, EMOTE_HUMANS, SAY_HERALD_ALLIANCE_WARRIOR }, + { NPC_ALLIANCE_MAGE, NPC_ALLIANCE_MAGE_MOUNT, NPC_ALLIANCE_MAGE_CHAMPION, NPC_SPECTATOR_GNOME, EMOTE_GNOMES, SAY_HERALD_ALLIANCE_MAGE }, + { NPC_ALLIANCE_SHAMAN, NPC_ALLIANCE_SHAMAN_MOUNT, NPC_ALLIANCE_SHAMAN_CHAMPION, NPC_SPECTATOR_DRAENEI, EMOTE_DRAENEI, SAY_HERALD_ALLIANCE_SHAMAN }, + { NPC_ALLIANCE_HUNTER, NPC_ALLIANCE_HUNTER_MOUNT, NPC_ALLIANCE_HUNTER_CHAMPION, NPC_SPECTATOR_NIGHT_ELF, EMOTE_NIGHT_ELVES, SAY_HERALD_ALLIANCE_HUNTER }, + { NPC_ALLIANCE_ROGUE, NPC_ALLIANCE_ROGUE_MOUNT, NPC_ALLIANCE_ROGUE_CHAMPION, NPC_SPECTATOR_DWARF, EMOTE_DWARVES, SAY_HERALD_ALLIANCE_ROGUE } }; -// ToDo: add coords static const ChampionsData aHordeChampions[MAX_CHAMPIONS_AVAILABLE] = { - { NPC_HORDE_WARRIOR, NPC_HORDE_WARRIOR_MOUNT, NPC_HORDE_WARRIOR_CHAMPION, NPC_SPECTATOR_ORC, EMOTE_ORCS }, - { NPC_HORDE_MAGE, NPC_HORDE_MAGE_MOUNT, NPC_HORDE_MAGE_CHAMPION, NPC_SPECTATOR_BLOOD_ELF, EMOTE_BLOOD_ELVES }, - { NPC_HORDE_SHAMAN, NPC_HORDE_SHAMAN_MOUNT, NPC_HORDE_SHAMAN_CHAMPION, NPC_SPECTATOR_TAUREN, EMOTE_TAUREN }, - { NPC_HORDE_HUNTER, NPC_HORDE_HUNTER_MOUNT, NPC_HORDE_HUNTER_CHAMPION, NPC_SPECTATOR_TROLL, EMOTE_TROLLS }, - { NPC_HORDE_ROGUE, NPC_HORDE_ROGUE_MOUNT, NPC_HORDE_ROGUE_CHAMPION, NPC_SPECTATOR_UNDEAD, EMOTE_UNDEAD } + { NPC_HORDE_WARRIOR, NPC_HORDE_WARRIOR_MOUNT, NPC_HORDE_WARRIOR_CHAMPION, NPC_SPECTATOR_ORC, EMOTE_ORCS, SAY_HERALD_HORDE_WARRIOR }, + { NPC_HORDE_MAGE, NPC_HORDE_MAGE_MOUNT, NPC_HORDE_MAGE_CHAMPION, NPC_SPECTATOR_BLOOD_ELF, EMOTE_BLOOD_ELVES, SAY_HERALD_HORDE_MAGE }, + { NPC_HORDE_SHAMAN, NPC_HORDE_SHAMAN_MOUNT, NPC_HORDE_SHAMAN_CHAMPION, NPC_SPECTATOR_TAUREN, EMOTE_TAUREN, SAY_HERALD_HORDE_SHAMAN }, + { NPC_HORDE_HUNTER, NPC_HORDE_HUNTER_MOUNT, NPC_HORDE_HUNTER_CHAMPION, NPC_SPECTATOR_TROLL, EMOTE_TROLLS, SAY_HERALD_HORDE_HUNTER }, + { NPC_HORDE_ROGUE, NPC_HORDE_ROGUE_MOUNT, NPC_HORDE_ROGUE_CHAMPION, NPC_SPECTATOR_UNDEAD, EMOTE_UNDEAD, SAY_HERALD_HORDE_ROGUE } }; // data that provides spawn coordinates and entry for the player mounts @@ -217,6 +243,9 @@ class instance_trial_of_the_champion : public ScriptedInstance, private Dialogue void OnCreatureCreate(Creature* pCreature) override; void OnObjectCreate(GameObject* pGo) override; + void OnCreatureDeath(Creature* pCreature) override; + void OnCreatureEvade(Creature* pCreature) override; + void SetData(uint32 uiType, uint32 uiData) override; uint32 GetData(uint32 uiType) const override; @@ -224,13 +253,17 @@ class instance_trial_of_the_champion : public ScriptedInstance, private Dialogue void Load(const char* chrIn) override; void DoPrepareChampions(bool bSkipIntro); + void MoveChampionToHome(Creature* pChampion); + void InformChampionReachHome(); - void Update(uint32 uiDiff) override { DialogueUpdate(uiDiff); } + void Update(uint32 uiDiff) override; private: void JustDidDialogueStep(int32 iEntry) override; void DoSummonHeraldIfNeeded(Unit* pSummoner); + void DoSendNextArenaWave(); + void DoCleanupArenaOnWipe(); uint32 m_auiEncounter[MAX_ENCOUNTER]; std::string m_strInstData; @@ -240,7 +273,23 @@ class instance_trial_of_the_champion : public ScriptedInstance, private Dialogue uint32 m_uiHeraldEntry; uint32 m_uiGrandChampionEntry; + uint32 m_uiIntroTimer; + uint32 m_uiIntroStage; + uint32 m_uiArenaStage; + uint32 m_uiGateResetTimer; + + bool m_bSkipIntro; + + ObjectGuid m_ArenaChampionsGuids[MAX_CHAMPIONS_ARENA]; + ObjectGuid m_ArenaMountsGuids[MAX_CHAMPIONS_ARENA]; + std::vector m_vChampionsIndex; + + GuidVector m_vAllianceTriggersGuids; + GuidVector m_vHordeTriggersGuids; + + GuidList m_lArenaMountsGuids; + GuidSet m_sArenaHelpersGuids[MAX_CHAMPIONS_ARENA]; }; #endif diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index b47b9ba81..83afa1b0f 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3074" + #define SD2_REVISION_NR "3075" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 09b7b40ad..4a9826138 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -485,6 +485,12 @@ UPDATE creature_template SET ScriptName='boss_the_lurker_below' WHERE entry=2121 /* TRAIL OF THE CHAMPION */ UPDATE instance_template SET ScriptName='instance_trial_of_the_champion' WHERE map=650; UPDATE creature_template SET ScriptName='npc_toc_herald' WHERE entry IN (35004, 35005); +UPDATE creature_template SET ScriptName='boss_champion_warrior' WHERE entry IN (34705,35572); +UPDATE creature_template SET ScriptName='boss_champion_mage' WHERE entry IN (34702,35569); +UPDATE creature_template SET ScriptName='boss_champion_shaman' WHERE entry IN (34701,35571); +UPDATE creature_template SET ScriptName='boss_champion_hunter' WHERE entry IN (34657,35570); +UPDATE creature_template SET ScriptName='boss_champion_rogue' WHERE entry IN (34703,35617); +UPDATE creature_template SET ScriptName='npc_champion_mount' WHERE entry IN (35644,36559,35637,35633,35768,34658,35636,35638,35635,35640,35641,35634); /* TRIAL OF THE CRUSADER */ UPDATE instance_template SET ScriptName='instance_trial_of_the_crusader' WHERE map=649; diff --git a/sql/updates/r3075_mangos.sql b/sql/updates/r3075_mangos.sql new file mode 100644 index 000000000..b3e214516 --- /dev/null +++ b/sql/updates/r3075_mangos.sql @@ -0,0 +1,6 @@ +UPDATE creature_template SET ScriptName='boss_champion_warrior' WHERE entry IN (34705,35572); +UPDATE creature_template SET ScriptName='boss_champion_mage' WHERE entry IN (34702,35569); +UPDATE creature_template SET ScriptName='boss_champion_shaman' WHERE entry IN (34701,35571); +UPDATE creature_template SET ScriptName='boss_champion_hunter' WHERE entry IN (34657,35570); +UPDATE creature_template SET ScriptName='boss_champion_rogue' WHERE entry IN (34703,35617); +UPDATE creature_template SET ScriptName='npc_champion_mount' WHERE entry IN (35644,36559,35637,35633,35768,34658,35636,35638,35635,35640,35641,35634); From 979f36b7bbe8f69ee8414c98b381d3cefbaab29f Mon Sep 17 00:00:00 2001 From: Xfurry Date: Wed, 24 Dec 2014 02:09:47 +0100 Subject: [PATCH 1088/1172] [3076] Complete setup for the first encounter in ToC5 This implements the following: * transition between first arena challenge (with mounts) and second challenge (normal combat) * mount change for the champions * grand champions encounter completion - this allows players to move to the second encounter (To be implemented) * basic spells for first arena challenge (not completed yet) Note: complete combat support not yet implemented --- .../boss_grand_champions.cpp | 230 +++++++++++++++++- .../instance_trial_of_the_champion.cpp | 122 +++++++++- .../trial_of_the_champion.h | 15 ++ sd2_revision_nr.h | 2 +- 4 files changed, 350 insertions(+), 19 deletions(-) diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_grand_champions.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_grand_champions.cpp index e5f117bfa..a362aee58 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_grand_champions.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_grand_champions.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: grand_champions -SD%Complete: 20 -SDComment: Only basics support +SD%Complete: 40 +SDComment: No Combat support; only basic encounter setup SDCategory: Crusader Coliseum, Trial of the Champion EndScriptData */ @@ -30,6 +30,11 @@ enum // common spells SPELL_DEFEND_DUMMY = 64101, // triggers 63130, 63131 and 63132 SPELL_DEFEND = 62719, + + SPELL_SHIELD_BREAKER = 68504, + SPELL_CHARGE = 68301, // triggers 68321 - unk mechanics + SPELL_FULL_HEAL = 43979, + SPELL_RIDE_ARGENT_VEHICLE = 69692, }; /*###### @@ -48,10 +53,50 @@ struct trial_companion_commonAI : public ScriptedAI instance_trial_of_the_champion* m_pInstance; bool m_bIsRegularMode; + uint32 m_uiShieldBreakerTimer; + uint32 m_uiChargeTimer; + uint32 m_uiDefeatedTimer; + + bool m_bDefeated; + + ObjectGuid m_newMountGuid; + void Reset() override { - DoCastSpellIfCan(m_creature, SPELL_DEFEND, CAST_TRIGGERED); - DoCastSpellIfCan(m_creature, SPELL_DEFEND_DUMMY, CAST_TRIGGERED); + if (m_pInstance) + { + if (m_pInstance->GetData(TYPE_ARENA_CHALLENGE) == DONE) + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE); + else + { + DoCastSpellIfCan(m_creature, SPELL_DEFEND, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_DEFEND_DUMMY, CAST_TRIGGERED); + } + } + + m_uiShieldBreakerTimer = urand(3000, 5000); + m_uiChargeTimer = urand(1000, 3000); + m_uiDefeatedTimer = 0; + + m_bDefeated = false; + } + + void Aggro(Unit* /*pWho*/) override + { + if (m_pInstance) + { + if (m_pInstance->GetData(TYPE_ARENA_CHALLENGE) == DONE) + m_pInstance->SetData(TYPE_GRAND_CHAMPIONS, IN_PROGRESS); + } + } + + void JustReachedHome() override + { + if (m_pInstance) + { + if (m_pInstance->GetData(TYPE_ARENA_CHALLENGE) == DONE) + m_pInstance->SetData(TYPE_GRAND_CHAMPIONS, FAIL); + } } void AttackStart(Unit* pWho) override @@ -59,8 +104,11 @@ struct trial_companion_commonAI : public ScriptedAI ScriptedAI::AttackStart(pWho); // Set Mount control - if (Creature* pMount = (Creature*)m_creature->GetTransportInfo()->GetTransport()) - pMount->AI()->AttackStart(pWho); + if (m_creature->GetTransportInfo() && m_creature->GetTransportInfo()->IsOnVehicle()) + { + if (Creature* pMount = (Creature*)m_creature->GetTransportInfo()->GetTransport()) + pMount->AI()->AttackStart(pWho); + } } void MoveInLineOfSight(Unit* pWho) override @@ -72,6 +120,100 @@ struct trial_companion_commonAI : public ScriptedAI ScriptedAI::MoveInLineOfSight(pWho); } + void DamageTaken(Unit* /*pDealer*/, uint32& uiDamage) override + { + if (uiDamage >= m_creature->GetHealth()) + { + uiDamage = 0; + + if (m_bDefeated) + return; + + if (m_pInstance) + { + // second part of the champions challenge + if (m_pInstance->GetData(TYPE_ARENA_CHALLENGE) == DONE) + { + m_creature->SetStandState(UNIT_STAND_STATE_KNEEL); + m_creature->SetHealth(1); + + // no movement + SetCombatMovement(false); + m_creature->GetMotionMaster()->Clear(); + m_creature->GetMotionMaster()->MoveIdle(); + + // check if the other champions are wounded and set instance data + if (m_pInstance->IsArenaChallengeComplete(TYPE_GRAND_CHAMPIONS)) + m_pInstance->SetData(TYPE_GRAND_CHAMPIONS, DONE); + } + // first part of the champions challenge (arena encounter) + else + { + // unmount + if (Creature* pMount = (Creature*)m_creature->GetTransportInfo()->GetTransport()) + { + pMount->RemoveSpellsCausingAura(SPELL_AURA_CONTROL_VEHICLE); + pMount->ForcedDespawn(); + } + + m_creature->SetStandState(UNIT_STAND_STATE_DEAD); + m_creature->SetHealth(1); + + // no movement + SetCombatMovement(false); + m_creature->GetMotionMaster()->Clear(); + m_creature->GetMotionMaster()->MoveIdle(); + + m_uiDefeatedTimer = 15000; + } + } + + m_bDefeated = true; + } + } + + void MovementInform(uint32 uiMotionType, uint32 uiPointId) override + { + if (uiMotionType != POINT_MOTION_TYPE || !m_pInstance) + return; + + switch (uiPointId) + { + case POINT_ID_MOUNT: + { + // mount the closest vehicle and start attacking + uint32 uiMountEntry = m_pInstance->GetMountEntryForChampion(); + + // search for the vehicle again, just in case the previous one was taken + Creature* pMount = m_creature->GetMap()->GetCreature(m_newMountGuid); + if (pMount->HasAura(SPELL_RIDE_ARGENT_VEHICLE)) + pMount = GetClosestCreatureWithEntry(m_creature, uiMountEntry, 60.0f); + + // if we don't have any mount send an error + if (!pMount) + { + script_error_log("Instance Trial of the Champion: ERROR Failed to get a mount replacement for champion %u.", m_creature->GetEntry()); + return; + } + + DoCastSpellIfCan(pMount, SPELL_RIDE_ARGENT_VEHICLE, CAST_TRIGGERED); + + if (m_creature->getVictim()) + pMount->AI()->AttackStart(m_creature->getVictim()); + + m_bDefeated = false; + break; + } + case POINT_ID_EXIT: + // mark the first part as complete if required + if (m_pInstance->GetData(TYPE_GRAND_CHAMPIONS) != DONE) + m_pInstance->SetData(TYPE_ARENA_CHALLENGE, DONE); + + m_creature->ForcedDespawn(); + break; + } + } + void SummonedMovementInform(Creature* pSummoned, uint32 uiMotionType, uint32 uiPointId) override { if (uiMotionType != POINT_MOTION_TYPE || uiPointId != POINT_ID_HOME || !m_pInstance) @@ -84,6 +226,34 @@ struct trial_companion_commonAI : public ScriptedAI } } + // function that will make the champion to use the nearby available mount + void DoUseNearbyMountIfCan() + { + if (!m_pInstance) + return; + + // set instance data as special if first part is completed + if (m_pInstance->IsArenaChallengeComplete(TYPE_ARENA_CHALLENGE)) + m_pInstance->SetData(TYPE_ARENA_CHALLENGE, SPECIAL); + else + { + m_creature->SetStandState(UNIT_STAND_STATE_STAND); + + float fX, fY, fZ; + uint32 uiMountEntry = m_pInstance->GetMountEntryForChampion(); + + if (Creature* pMount = GetClosestCreatureWithEntry(m_creature, uiMountEntry, 60.0f)) + { + pMount->GetContactPoint(m_creature, fX, fY, fZ); + m_creature->SetWalk(true); + m_creature->GetMotionMaster()->Clear(); + m_creature->GetMotionMaster()->MovePoint(POINT_ID_MOUNT, fX, fY, fZ); + + m_newMountGuid = pMount->GetObjectGuid(); + } + } + } + // Return true to handle shared timers and MeleeAttack virtual bool UpdateChampionAI(const uint32 /*uiDiff*/) { return true; } @@ -93,11 +263,53 @@ struct trial_companion_commonAI : public ScriptedAI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - // Call specific virtual function - if (!UpdateChampionAI(uiDiff)) + // timer for other champions check + if (m_uiDefeatedTimer) + { + if (m_uiDefeatedTimer <= uiDiff) + { + DoUseNearbyMountIfCan(); + m_uiDefeatedTimer = 0; + } + else + m_uiDefeatedTimer -= uiDiff; + } + + // no combat after defeated + if (m_bDefeated) + return; + + if (!m_pInstance) return; - DoMeleeAttackIfReady(); + // arena battle - on vehicles + if (m_pInstance->GetData(TYPE_ARENA_CHALLENGE) == IN_PROGRESS) + { + if (m_uiShieldBreakerTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_SHIELD_BREAKER) == CAST_OK) + m_uiShieldBreakerTimer = urand(2000, 8000); + } + else + m_uiShieldBreakerTimer -= uiDiff; + + if (m_uiChargeTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_CHARGE) == CAST_OK) + m_uiChargeTimer = urand(4000, 10000); + } + else + m_uiChargeTimer -= uiDiff; + } + // arena challenge complete - start normal battle + else if (m_pInstance->GetData(TYPE_ARENA_CHALLENGE) == DONE) + { + // Call specific virtual function + if (!UpdateChampionAI(uiDiff)) + return; + + DoMeleeAttackIfReady(); + } } }; diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/instance_trial_of_the_champion.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/instance_trial_of_the_champion.cpp index dffee4e1c..a46092c46 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/instance_trial_of_the_champion.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/instance_trial_of_the_champion.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: instance_trial_of_the_champion -SD%Complete: 20 -SDComment: Basic support +SD%Complete: 30 +SDComment: First encounter only SDCategory: Crusader Coliseum, Trial of the Champion EndScriptData */ @@ -91,11 +91,15 @@ enum static const DialogueEntryTwoSide aTocDialogues[] = { + // Grand Champions intro {TYPE_ARENA_CHALLENGE, 0, 0, 0, 1000}, {SAY_HERALD_HORDE_CHALLENGE, NPC_ARELAS_BRIGHTSTAR, SAY_HERALD_ALLIANCE_CHALLENGE, NPC_JAEREN_SUNSWORN, 5000}, {SAY_TIRION_CHALLENGE_WELCOME, NPC_TIRION_FORDRING, 0, 0, 6000}, {SAY_TIRION_FIRST_CHALLENGE, NPC_TIRION_FORDRING, 0, 0, 3000}, {NPC_TIRION_FORDRING, 0, 0, 0, 0}, + // Grand Champions complete + {NPC_ARELAS_BRIGHTSTAR, 0, 0, 0, 7000}, + {SAY_TIRION_ARGENT_CHAMPION, NPC_TIRION_FORDRING, 0, 0, 0}, {0, 0, 0, 0, 0} }; @@ -107,6 +111,8 @@ instance_trial_of_the_champion::instance_trial_of_the_champion(Map* pMap) : Scri m_uiIntroStage(0), m_uiArenaStage(0), m_uiGateResetTimer(0), + m_uiChampionsCount(0), + m_uiChampionsTimer(0), m_bSkipIntro(false) { Initialize(); @@ -261,10 +267,29 @@ void instance_trial_of_the_champion::SetData(uint32 uiType, uint32 uiData) switch (uiType) { case TYPE_GRAND_CHAMPIONS: + // no double count + if (m_auiEncounter[uiType] == uiData) + return; + m_auiEncounter[uiType] = uiData; DoUseDoorOrButton(GO_NORTH_GATE); if (uiData == DONE) + { DoRespawnGameObject(instance->IsRegularDifficulty() ? GO_CHAMPIONS_LOOT : GO_CHAMPIONS_LOOT_H, 30 * MINUTE); + + // start delayed dialogue + StartNextDialogueText(NPC_ARELAS_BRIGHTSTAR); + + // move the herald back to center + if (Creature* pHerald = GetSingleCreatureFromStorage(m_uiHeraldEntry)) + { + pHerald->GetMotionMaster()->Clear(); + pHerald->GetMotionMaster()->MovePoint(0, aHeraldPositions[2][0], aHeraldPositions[2][1], aHeraldPositions[2][2]); + pHerald->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); + } + + DoSendChampionsToExit(); + } break; case TYPE_ARGENT_CHAMPION: m_auiEncounter[uiType] = uiData; @@ -289,22 +314,31 @@ void instance_trial_of_the_champion::SetData(uint32 uiType, uint32 uiData) } else if (uiData == DONE) { - // start grand champions challenge (without mount) - // ToDo! + // count the champions that reach the exit + ++m_uiChampionsCount; - // despawn vehicle mounts - for (GuidList::const_iterator itr = m_lArenaMountsGuids.begin(); itr != m_lArenaMountsGuids.end(); ++itr) + if (m_uiChampionsCount == MAX_CHAMPIONS_ARENA) { - if (Creature* pMount = instance->GetCreature(*itr)) - pMount->ForcedDespawn(); + // start grand champions challenge (without mount) + m_uiChampionsCount = 0; + m_uiChampionsTimer = 5000; + + // despawn vehicle mounts + for (GuidList::const_iterator itr = m_lArenaMountsGuids.begin(); itr != m_lArenaMountsGuids.end(); ++itr) + { + if (Creature* pMount = instance->GetCreature(*itr)) + pMount->ForcedDespawn(); + } + m_lArenaMountsGuids.clear(); } - m_lArenaMountsGuids.clear(); } else if (uiData == FAIL) { DoCleanupArenaOnWipe(); SetData(TYPE_ARENA_CHALLENGE, NOT_STARTED); } + else if (uiData == SPECIAL) + DoSendChampionsToExit(); return; default: script_error_log("Instance Trial of The Champion: ERROR SetData = %u for type %u does not exist/not implemented.", uiType, uiData); @@ -415,6 +449,36 @@ void instance_trial_of_the_champion::OnCreatureEvade(Creature* pCreature) } } +// Function that returns the arena challenge status +bool instance_trial_of_the_champion::IsArenaChallengeComplete(uint32 uiType) +{ + // check stand state of each champion based on the type of the encounter + uint8 uiStandState = 0; + + if (uiType == TYPE_ARENA_CHALLENGE) + { + // if this was already marked as complete return true + if (GetData(TYPE_ARENA_CHALLENGE) == SPECIAL || GetData(TYPE_ARENA_CHALLENGE) == DONE) + return true; + + uiStandState = UNIT_STAND_STATE_DEAD; + } + else if (uiType == TYPE_GRAND_CHAMPIONS) + uiStandState = UNIT_STAND_STATE_KNEEL; + + // check if all champions are defeated + for (uint8 i = 0; i < MAX_CHAMPIONS_ARENA; ++i) + { + if (Creature* pChampion = instance->GetCreature(m_ArenaChampionsGuids[i])) + { + if (pChampion->getStandState() != uiStandState) + return false; + } + } + + return true; +} + // Function that summons herald and vehicle mounts if required void instance_trial_of_the_champion::DoSummonHeraldIfNeeded(Unit* pSummoner) { @@ -586,6 +650,21 @@ void instance_trial_of_the_champion::InformChampionReachHome() m_uiIntroTimer = 2000; } +// Function that will send all the champions to the get for exit +void instance_trial_of_the_champion::DoSendChampionsToExit() +{ + // move the champions to the gate + for (uint8 i = 0; i < MAX_CHAMPIONS_ARENA; ++i) + { + if (Creature* pChampion = instance->GetCreature(m_ArenaChampionsGuids[i])) + { + pChampion->SetWalk(true); + pChampion->SetStandState(UNIT_STAND_STATE_STAND); + pChampion->GetMotionMaster()->MovePoint(POINT_ID_EXIT, aChampsPositions[0][0], aChampsPositions[0][1], aChampsPositions[0][2]); + } + } +} + void instance_trial_of_the_champion::JustDidDialogueStep(int32 iEntry) { switch (iEntry) @@ -770,6 +849,31 @@ void instance_trial_of_the_champion::Update(uint32 uiDiff) else m_uiGateResetTimer -= uiDiff; } + + // summon champions for the second part of the encounter + if (m_uiChampionsTimer) + { + if (m_uiChampionsTimer <= uiDiff) + { + Creature* pHerald = GetSingleCreatureFromStorage(m_uiHeraldEntry); + if (!pHerald) + return; + + uint8 uiIndex = 0; + + for (uint8 i = 0; i < MAX_CHAMPIONS_ARENA; ++i) + { + uiIndex = m_vChampionsIndex[i]; + + if (Creature* pChampion = pHerald->SummonCreature(m_uiTeam == ALLIANCE ? aHordeChampions[uiIndex].uiEntry : aAllianceChampions[uiIndex].uiEntry, + aChampsPositions[i][0], aChampsPositions[i][1], aChampsPositions[i][2], aChampsPositions[i][3], TEMPSUMMON_DEAD_DESPAWN, 0)) + m_ArenaChampionsGuids[i] = pChampion->GetObjectGuid(); + } + m_uiChampionsTimer = 0; + } + else + m_uiChampionsTimer -= uiDiff; + } } InstanceData* GetInstanceData_instance_trial_of_the_champion(Map* pMap) diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.h b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.h index a6cf993ce..c408835c0 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.h +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.h @@ -154,6 +154,8 @@ enum POINT_ID_CENTER = 1, POINT_ID_HOME = 2, POINT_ID_COMBAT = 3, + POINT_ID_MOUNT = 4, + POINT_ID_EXIT = 5, }; static const float aHeraldPositions[3][4] = @@ -171,6 +173,13 @@ static const float aIntroPositions[4][4] = {742.245f, 688.254f, 412.370f, 4.744f}, }; +static const float aChampsPositions[3][4] = // Champions spawn positions inside the arena +{ + {746.600f, 660.116f, 411.772f, 4.729f}, + {737.701f, 660.689f, 412.477f, 4.729f}, + {755.232f, 660.352f, 412.477f, 4.729f}, +}; + // data that provides grand champion entry, vehicle mount, trash champions with the spawn locations as well as crowd stalker and emote entry struct ChampionsData { @@ -255,6 +264,10 @@ class instance_trial_of_the_champion : public ScriptedInstance, private Dialogue void DoPrepareChampions(bool bSkipIntro); void MoveChampionToHome(Creature* pChampion); void InformChampionReachHome(); + void DoSendChampionsToExit(); + + uint32 GetMountEntryForChampion() { return m_uiTeam == ALLIANCE ? NPC_BATTLEWORG_ALLIANCE : NPC_WARHORSE_HORDE; } + bool IsArenaChallengeComplete(uint32 uiType); void Update(uint32 uiDiff) override; @@ -277,6 +290,8 @@ class instance_trial_of_the_champion : public ScriptedInstance, private Dialogue uint32 m_uiIntroStage; uint32 m_uiArenaStage; uint32 m_uiGateResetTimer; + uint32 m_uiChampionsCount; + uint32 m_uiChampionsTimer; bool m_bSkipIntro; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 83afa1b0f..a90024048 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3075" + #define SD2_REVISION_NR "3076" #endif // __SD2_REVISION_NR_H__ From f1d83628b97e5e5efe62bde00fff12d3267c1e0d Mon Sep 17 00:00:00 2001 From: Xfurry Date: Wed, 24 Dec 2014 19:49:06 +0100 Subject: [PATCH 1089/1172] [3077] Make use of the new OnCreatureDespawn feature in ToC5 This allows vehicle mounts to respawn on passenger eject Requires Cmangos 12803+ --- .../instance_trial_of_the_champion.cpp | 22 +++++++++++++++++++ .../trial_of_the_champion.h | 1 + sd2_revision_nr.h | 2 +- sql/scriptdev2_script_full.sql | 2 +- sql/updates/r3077_scriptdev2.sql | 1 + 5 files changed, 26 insertions(+), 2 deletions(-) create mode 100644 sql/updates/r3077_scriptdev2.sql diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/instance_trial_of_the_champion.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/instance_trial_of_the_champion.cpp index a46092c46..a424e3654 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/instance_trial_of_the_champion.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/instance_trial_of_the_champion.cpp @@ -449,6 +449,28 @@ void instance_trial_of_the_champion::OnCreatureEvade(Creature* pCreature) } } +void instance_trial_of_the_champion::OnCreatureDespawn(Creature* pCreature) +{ + switch (pCreature->GetEntry()) + { + case NPC_WARHORSE_ALLIANCE: + case NPC_WARHORSE_HORDE: + case NPC_BATTLEWORG_ALLIANCE: + case NPC_BATTLEWORG_HORDE: + { + if (GetData(TYPE_ARENA_CHALLENGE) == DONE) + return; + + // respawn the vehicle mount + float fX, fY, fZ, fO; + pCreature->GetRespawnCoord(fX, fY, fZ, &fO); + if (Creature* pHerald = GetSingleCreatureFromStorage(m_uiHeraldEntry)) + pHerald->SummonCreature(pCreature->GetEntry(), fX, fY, fZ, fO, TEMPSUMMON_DEAD_DESPAWN, 0); + break; + } + } +} + // Function that returns the arena challenge status bool instance_trial_of_the_champion::IsArenaChallengeComplete(uint32 uiType) { diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.h b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.h index c408835c0..9d626be49 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.h +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.h @@ -254,6 +254,7 @@ class instance_trial_of_the_champion : public ScriptedInstance, private Dialogue void OnCreatureDeath(Creature* pCreature) override; void OnCreatureEvade(Creature* pCreature) override; + void OnCreatureDespawn(Creature* pCreature) override; void SetData(uint32 uiType, uint32 uiData) override; uint32 GetData(uint32 uiType) const override; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index a90024048..224710ef0 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3076" + #define SD2_REVISION_NR "3077" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 9cdee2ad3..e6b956c69 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -3,7 +3,7 @@ -- DELETE FROM sd2_db_version; -INSERT INTO sd2_db_version (version) VALUES ('ScriptDev2 (for CMaNGOS 12799+) '); +INSERT INTO sd2_db_version (version) VALUES ('ScriptDev2 (for CMaNGOS 12803+) '); -- -- Below contains data for table `script_texts` mainly used in C++ parts. diff --git a/sql/updates/r3077_scriptdev2.sql b/sql/updates/r3077_scriptdev2.sql new file mode 100644 index 000000000..a924a454f --- /dev/null +++ b/sql/updates/r3077_scriptdev2.sql @@ -0,0 +1 @@ +UPDATE sd2_db_version SET version='ScriptDev2 (for CMaNGOS 12803+) '; From 01fb50b9a92e3ba7fe7d25fd717e7592a692f35a Mon Sep 17 00:00:00 2001 From: Xfurry Date: Wed, 14 Jan 2015 00:37:26 +0100 Subject: [PATCH 1090/1172] [3078] Update Dire Maul Tribute Run event The other part of the event is handled by DB-Scripts Based on the work of @Tobschinski Close scriptdev2/scriptdev2-classic#34 --- scripts/kalimdor/dire_maul/dire_maul.h | 5 +++- .../kalimdor/dire_maul/instance_dire_maul.cpp | 26 ++++++++++++++----- sd2_revision_nr.h | 2 +- sql/scriptdev2_script_full.sql | 4 ++- sql/updates/r3078_scriptdev2.sql | 3 +++ 5 files changed, 31 insertions(+), 9 deletions(-) create mode 100644 sql/updates/r3078_scriptdev2.sql diff --git a/scripts/kalimdor/dire_maul/dire_maul.h b/scripts/kalimdor/dire_maul/dire_maul.h index 696e61d26..fc3706619 100644 --- a/scripts/kalimdor/dire_maul/dire_maul.h +++ b/scripts/kalimdor/dire_maul/dire_maul.h @@ -79,11 +79,14 @@ enum SAY_FREE_IMMOLTHAR = -1429000, SAY_KILL_IMMOLTHAR = -1429001, SAY_IRONBARK_REDEEM = -1429002, + SAY_CHORUSH_KING_DEAD = -1429003, FACTION_HOSTILE = 14, - SPELL_KING_OF_GORDOK = 22799, + FACTION_FRIENDLY = 35, }; +static const float afMizzleSpawnLoc[4] = {683.296f, 484.384f, 29.544f, 0.0174f}; + class instance_dire_maul : public ScriptedInstance { public: diff --git a/scripts/kalimdor/dire_maul/instance_dire_maul.cpp b/scripts/kalimdor/dire_maul/instance_dire_maul.cpp index 5f66bc318..bc8941691 100644 --- a/scripts/kalimdor/dire_maul/instance_dire_maul.cpp +++ b/scripts/kalimdor/dire_maul/instance_dire_maul.cpp @@ -75,7 +75,7 @@ void instance_dire_maul::OnCreatureCreate(Creature* pCreature) // North case NPC_CHORUSH: case NPC_KING_GORDOK: - case NPC_MIZZLE_THE_CRAFTY: + case NPC_CAPTAIN_KROMCRUSH: break; default: @@ -243,12 +243,26 @@ void instance_dire_maul::SetData(uint32 uiType, uint32 uiData) m_auiEncounter[uiType] = uiData; if (uiData == DONE) { - // Apply Aura to players in the map - Map::PlayerList const& players = instance->GetPlayers(); - for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr) + // change faction to certian ogres + if (Creature* pOgre = GetSingleCreatureFromStorage(NPC_CAPTAIN_KROMCRUSH)) + pOgre->SetFactionTemporary(FACTION_FRIENDLY, TEMPFACTION_RESTORE_RESPAWN); + + if (Creature* pOgre = GetSingleCreatureFromStorage(NPC_CHORUSH)) { - if (Player* pPlayer = itr->getSource()) - pPlayer->CastSpell(pPlayer, SPELL_KING_OF_GORDOK, true); + // Chorush evades and yells on king death (if alive) + if (pOgre->isAlive()) + { + DoScriptText(SAY_CHORUSH_KING_DEAD, pOgre); + pOgre->SetFactionTemporary(FACTION_FRIENDLY, TEMPFACTION_RESTORE_RESPAWN); + pOgre->AI()->EnterEvadeMode(); + } + + // start WP movement for Mizzle; event handled by movement and gossip dbscripts + if (Creature* pMizzle = pOgre->SummonCreature(NPC_MIZZLE_THE_CRAFTY, afMizzleSpawnLoc[0], afMizzleSpawnLoc[1], afMizzleSpawnLoc[2], afMizzleSpawnLoc[3], TEMPSUMMON_DEAD_DESPAWN, 0, true)) + { + pMizzle->SetWalk(false); + pMizzle->GetMotionMaster()->MoveWaypoint(); + } } } break; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 224710ef0..c3e85b31c 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3077" + #define SD2_REVISION_NR "3078" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index e6b956c69..37b63c0e5 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -1726,7 +1726,9 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1429000,'The demon is loose! Quickly we must restrain him!',0,6,0,0,'highborne summoner SAY_FREE_IMMOLTHAR'), (-1429001,'Who dares disrupt the sanctity of Eldre\'Thalas? Face me, cowards!',0,6,0,0,'prince tortheldrin SAY_KILL_IMMOLTHAR'), -(-1429002,'At last... Freed from his cursed grasp!',0,6,0,0,'old ironbark SAY_IRONBARK_REDEEM'); +(-1429002,'At last... Freed from his cursed grasp!',0,6,0,0,'old ironbark SAY_IRONBARK_REDEEM'), + +(-1429003,'The king is dead - OH NOES! Summon Mizzle da Crafty! He knows what to do next!',0,1,0,0,'cho\'rush SAY_KING_DEAD'); -- -1 469 000 BLACKWING LAIR INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES diff --git a/sql/updates/r3078_scriptdev2.sql b/sql/updates/r3078_scriptdev2.sql new file mode 100644 index 000000000..9aeec68dc --- /dev/null +++ b/sql/updates/r3078_scriptdev2.sql @@ -0,0 +1,3 @@ +DELETE FROM script_texts WHERE entry=-1429003; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1429003,'The king is dead - OH NOES! Summon Mizzle da Crafty! He knows what to do next!',0,1,0,0,'cho\'rush SAY_KING_DEAD'); From 848f3543cf3cf4cebc80eea53dc1dc0326b1ab10 Mon Sep 17 00:00:00 2001 From: Tobschinski Date: Wed, 14 Jan 2015 22:53:11 +0100 Subject: [PATCH 1091/1172] [3079] Improve Ambassador Flamelash Fix Burning Spirits spawn locations and add support for runes Also fix previous commit Close scriptdev2/scriptdev2-classic#35 Signed-off-by: Xfurry --- .../blackrock_depths/blackrock_depths.h | 12 ++- .../boss_ambassador_flamelash.cpp | 74 +++++++++++++------ .../instance_blackrock_depths.cpp | 18 ++++- .../kalimdor/dire_maul/instance_dire_maul.cpp | 11 ++- sd2_revision_nr.h | 2 +- 5 files changed, 90 insertions(+), 27 deletions(-) diff --git a/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.h b/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.h index 978879959..e4c438716 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.h +++ b/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.h @@ -7,9 +7,10 @@ enum { - MAX_ENCOUNTER = 7, + MAX_ENCOUNTER = 8, MAX_RELIC_DOORS = 12, MAX_DWARFS = 7, + MAX_DWARF_RUNES = 7, TYPE_RING_OF_LAW = 1, TYPE_VAULT = 2, @@ -18,6 +19,7 @@ enum TYPE_LYCEUM = 5, TYPE_IRON_HALL = 6, TYPE_QUEST_JAIL_BREAK = 7, + TYPE_FLAMELASH = 8, NPC_EMPEROR = 9019, NPC_PRINCESS = 8929, @@ -69,6 +71,14 @@ enum GO_JAIL_DOOR_SUPPLY = 170561, GO_JAIL_SUPPLY_CRATE = 166872, + GO_DWARFRUNE_A01 = 170578, + GO_DWARFRUNE_B01 = 170579, + GO_DWARFRUNE_C01 = 170580, + GO_DWARFRUNE_D01 = 170581, + GO_DWARFRUNE_E01 = 170582, + GO_DWARFRUNE_F01 = 170583, + GO_DWARFRUNE_G01 = 170584, + SPELL_STONED = 10255, // Aura of Warbringer Constructs in Relict Vault FACTION_DWARF_HOSTILE = 754, // Hostile faction for the Tomb of the Seven dwarfs diff --git a/scripts/eastern_kingdoms/blackrock_depths/boss_ambassador_flamelash.cpp b/scripts/eastern_kingdoms/blackrock_depths/boss_ambassador_flamelash.cpp index b1c7f071f..9ca710c4f 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/boss_ambassador_flamelash.cpp +++ b/scripts/eastern_kingdoms/blackrock_depths/boss_ambassador_flamelash.cpp @@ -16,12 +16,13 @@ /* ScriptData SDName: Boss_Ambassador_Flamelash -SD%Complete: 80 -SDComment: Texts missing, Add handling rather guesswork, Add spell Burning Spirit likely won't work +SD%Complete: 90 +SDComment: Texts probably missing; Spirits handling could be improved. SDCategory: Blackrock Depths EndScriptData */ #include "precompiled.h" +#include "blackrock_depths.h" enum { @@ -34,41 +35,74 @@ enum struct boss_ambassador_flamelashAI : public ScriptedAI { - boss_ambassador_flamelashAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + boss_ambassador_flamelashAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; uint32 m_uiSpiritTimer; - int Rand; - int RandX; - int RandY; + + GuidSet m_sSpiritsGuidsSet; void Reset() override { - m_uiSpiritTimer = 12000; + m_uiSpiritTimer = urand(0, 1000); + + m_sSpiritsGuidsSet.clear(); + } + + // function that will summon spirits periodically + void DoSummonSpirits() + { + if (!m_pInstance) + return; + + for (int i = 0; i < MAX_DWARF_RUNES; ++i) + { + if (GameObject* pRune = m_pInstance->GetSingleGameObjectFromStorage(GO_DWARFRUNE_A01 + i)) + m_creature->SummonCreature(NPC_BURNING_SPIRIT, pRune->GetPositionX(), pRune->GetPositionY(), pRune->GetPositionZ(), m_creature->GetAngle(m_creature), TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 60000); + } } - void SummonSpirits() + void MoveInLineOfSight(Unit* pWho) override { - float fX, fY, fZ; - m_creature->GetRandomPoint(m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), 30.0f, fX, fY, fZ); - m_creature->SummonCreature(NPC_BURNING_SPIRIT, fX, fY, fZ, m_creature->GetAngle(fX, fY) + M_PI_F, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 60000); + ScriptedAI::MoveInLineOfSight(pWho); + + if (pWho->GetEntry() == NPC_BURNING_SPIRIT && pWho->isAlive() && m_sSpiritsGuidsSet.find(pWho->GetObjectGuid()) != m_sSpiritsGuidsSet.end() && + pWho->IsWithinDistInMap(m_creature, 2 * CONTACT_DISTANCE)) + { + pWho->CastSpell(m_creature, SPELL_BURNING_SPIRIT, true); + m_sSpiritsGuidsSet.erase(pWho->GetObjectGuid()); + } } void Aggro(Unit* /*pWho*/) override { DoCastSpellIfCan(m_creature, SPELL_FIREBLAST); + + if (m_pInstance) + m_pInstance->SetData(TYPE_FLAMELASH, IN_PROGRESS); } - void JustSummoned(Creature* pSummoned) override + void JustDied(Unit* /*pKiller*/) override { - pSummoned->GetMotionMaster()->MovePoint(1, m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ()); + if (m_pInstance) + m_pInstance->SetData(TYPE_FLAMELASH, DONE); } - void SummonedMovementInform(Creature* pSummoned, uint32 /*uiMotionType*/, uint32 uiPointId) override + void JustReachedHome() override { - if (uiPointId != 1) - return; + if (m_pInstance) + m_pInstance->SetData(TYPE_FLAMELASH, FAIL); + } - pSummoned->CastSpell(m_creature, SPELL_BURNING_SPIRIT, true); + void JustSummoned(Creature* pSummoned) override + { + pSummoned->GetMotionMaster()->MoveFollow(m_creature, 0, 0); + m_sSpiritsGuidsSet.insert(pSummoned->GetObjectGuid()); } void UpdateAI(const uint32 uiDiff) override @@ -80,11 +114,7 @@ struct boss_ambassador_flamelashAI : public ScriptedAI // m_uiSpiritTimer if (m_uiSpiritTimer < uiDiff) { - SummonSpirits(); - SummonSpirits(); - SummonSpirits(); - SummonSpirits(); - + DoSummonSpirits(); m_uiSpiritTimer = 20000; } else diff --git a/scripts/eastern_kingdoms/blackrock_depths/instance_blackrock_depths.cpp b/scripts/eastern_kingdoms/blackrock_depths/instance_blackrock_depths.cpp index fee440282..8301f4f97 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/instance_blackrock_depths.cpp +++ b/scripts/eastern_kingdoms/blackrock_depths/instance_blackrock_depths.cpp @@ -104,6 +104,13 @@ void instance_blackrock_depths::OnObjectCreate(GameObject* pGo) case GO_SECRET_DOOR: case GO_JAIL_DOOR_SUPPLY: case GO_JAIL_SUPPLY_CRATE: + case GO_DWARFRUNE_A01: + case GO_DWARFRUNE_B01: + case GO_DWARFRUNE_C01: + case GO_DWARFRUNE_D01: + case GO_DWARFRUNE_E01: + case GO_DWARFRUNE_F01: + case GO_DWARFRUNE_G01: break; default: @@ -221,6 +228,10 @@ void instance_blackrock_depths::SetData(uint32 uiType, uint32 uiData) case TYPE_QUEST_JAIL_BREAK: m_auiEncounter[6] = uiData; return; + case TYPE_FLAMELASH: + for (int i = 0; i < MAX_DWARF_RUNES; ++i) + DoUseDoorOrButton(GO_DWARFRUNE_A01 + i); + return; } if (uiData == DONE) @@ -229,7 +240,8 @@ void instance_blackrock_depths::SetData(uint32 uiType, uint32 uiData) std::ostringstream saveStream; saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2] << " " - << m_auiEncounter[3] << " " << m_auiEncounter[4] << " " << m_auiEncounter[5] << " " << m_auiEncounter[6]; + << m_auiEncounter[3] << " " << m_auiEncounter[4] << " " << m_auiEncounter[5] << " " + << m_auiEncounter[6] << " " << m_auiEncounter[7]; m_strInstData = saveStream.str(); @@ -259,6 +271,8 @@ uint32 instance_blackrock_depths::GetData(uint32 uiType) const return m_auiEncounter[5]; case TYPE_QUEST_JAIL_BREAK: return m_auiEncounter[6]; + case TYPE_FLAMELASH: + return m_auiEncounter[7]; default: return 0; } @@ -276,7 +290,7 @@ void instance_blackrock_depths::Load(const char* chrIn) std::istringstream loadStream(chrIn); loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3] - >> m_auiEncounter[4] >> m_auiEncounter[5] >> m_auiEncounter[6]; + >> m_auiEncounter[4] >> m_auiEncounter[5] >> m_auiEncounter[6] >> m_auiEncounter[7]; for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) if (m_auiEncounter[i] == IN_PROGRESS) diff --git a/scripts/kalimdor/dire_maul/instance_dire_maul.cpp b/scripts/kalimdor/dire_maul/instance_dire_maul.cpp index bc8941691..3d140d63a 100644 --- a/scripts/kalimdor/dire_maul/instance_dire_maul.cpp +++ b/scripts/kalimdor/dire_maul/instance_dire_maul.cpp @@ -245,7 +245,16 @@ void instance_dire_maul::SetData(uint32 uiType, uint32 uiData) { // change faction to certian ogres if (Creature* pOgre = GetSingleCreatureFromStorage(NPC_CAPTAIN_KROMCRUSH)) - pOgre->SetFactionTemporary(FACTION_FRIENDLY, TEMPFACTION_RESTORE_RESPAWN); + { + if (pOgre->isAlive()) + { + pOgre->SetFactionTemporary(FACTION_FRIENDLY, TEMPFACTION_RESTORE_RESPAWN); + + // only evade if required + if (pOgre->getVictim()) + pOgre->AI()->EnterEvadeMode(); + } + } if (Creature* pOgre = GetSingleCreatureFromStorage(NPC_CHORUSH)) { diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index c3e85b31c..0f8b73192 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3078" + #define SD2_REVISION_NR "3079" #endif // __SD2_REVISION_NR_H__ From d122f8e86b419dc7ac5dbdc655e4b60e228235b5 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Wed, 14 Jan 2015 23:43:48 +0100 Subject: [PATCH 1092/1172] [3080] Use all spells for Gyth Close #127 --- scripts/eastern_kingdoms/blackrock_spire/boss_gyth.cpp | 10 ++++++++++ sd2_revision_nr.h | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/scripts/eastern_kingdoms/blackrock_spire/boss_gyth.cpp b/scripts/eastern_kingdoms/blackrock_spire/boss_gyth.cpp index 8d3415594..5d8f86726 100644 --- a/scripts/eastern_kingdoms/blackrock_spire/boss_gyth.cpp +++ b/scripts/eastern_kingdoms/blackrock_spire/boss_gyth.cpp @@ -51,6 +51,7 @@ struct boss_gythAI : public ScriptedAI uint32 uiCorrosiveAcidTimer; uint32 uiFreezeTimer; uint32 uiFlamebreathTimer; + uint32 uiKnockAwayTimer; bool m_bSummonedRend; bool m_bHasChromaticChaos; @@ -60,6 +61,7 @@ struct boss_gythAI : public ScriptedAI uiCorrosiveAcidTimer = 8000; uiFreezeTimer = 11000; uiFlamebreathTimer = 4000; + uiKnockAwayTimer = 23000; m_bSummonedRend = false; m_bHasChromaticChaos = false; @@ -118,6 +120,14 @@ struct boss_gythAI : public ScriptedAI else uiFlamebreathTimer -= uiDiff; + if (uiKnockAwayTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_KNOCK_AWAY) == CAST_OK) + uiKnockAwayTimer = 23000; + } + else + uiKnockAwayTimer -= uiDiff; + // Summon Rend if (!m_bSummonedRend && m_creature->GetHealthPercent() < 11.0f) { diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 0f8b73192..76656cca2 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3079" + #define SD2_REVISION_NR "3080" #endif // __SD2_REVISION_NR_H__ From 5d792df06f9d1fb0dc0de6c5613aa1ebc50b190c Mon Sep 17 00:00:00 2001 From: Xfurry Date: Wed, 14 Jan 2015 23:50:14 +0100 Subject: [PATCH 1093/1172] [3081] Fix quest 11180 group credit Close #120 --- scripts/kalimdor/dustwallow_marsh.cpp | 2 +- sd2_revision_nr.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/kalimdor/dustwallow_marsh.cpp b/scripts/kalimdor/dustwallow_marsh.cpp index b1292ab7b..0eef7ff52 100644 --- a/scripts/kalimdor/dustwallow_marsh.cpp +++ b/scripts/kalimdor/dustwallow_marsh.cpp @@ -70,7 +70,7 @@ struct mobs_risen_husk_spiritAI : public ScriptedAI void JustSummoned(Creature* pSummoned) override { if (m_pCreditPlayer) - m_pCreditPlayer->KilledMonsterCredit(pSummoned->GetEntry(), pSummoned->GetObjectGuid()); + m_pCreditPlayer->RewardPlayerAndGroupAtEvent(pSummoned->GetEntry(), pSummoned); } void DamageTaken(Unit* pDoneBy, uint32& uiDamage) override diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 76656cca2..65edcf38d 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3080" + #define SD2_REVISION_NR "3081" #endif // __SD2_REVISION_NR_H__ From b1396b203392d512ebe71d831d6b419cdd2aec5a Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Thu, 15 Jan 2015 00:06:20 +0100 Subject: [PATCH 1094/1172] [3082] Fix possible crash Close scriptdev2/scriptdev2-classic#31 Signed-off-by: Xfurry --- .../ruins_of_ahnqiraj/instance_ruins_of_ahnqiraj.cpp | 8 +++++++- sd2_revision_nr.h | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/scripts/kalimdor/ruins_of_ahnqiraj/instance_ruins_of_ahnqiraj.cpp b/scripts/kalimdor/ruins_of_ahnqiraj/instance_ruins_of_ahnqiraj.cpp index 04bdfa687..2ef042dd0 100644 --- a/scripts/kalimdor/ruins_of_ahnqiraj/instance_ruins_of_ahnqiraj.cpp +++ b/scripts/kalimdor/ruins_of_ahnqiraj/instance_ruins_of_ahnqiraj.cpp @@ -308,9 +308,15 @@ void instance_ruins_of_ahnqiraj::DoSendNextArmyWave() else { // Increase the wave id if some are already dead - while (m_sArmyWavesGuids[m_uiCurrentArmyWave].empty()) + while (m_sArmyWavesGuids[m_uiCurrentArmyWave].empty() && m_uiCurrentArmyWave < MAX_ARMY_WAVES) ++m_uiCurrentArmyWave; + if (m_uiCurrentArmyWave == MAX_ARMY_WAVES) + { + script_error_log("Instance Ruins of Ahn'Qiraj: ERROR Something unexpected happened. Please report to SD2 team."); + return; + } + float fX, fY, fZ; for (GuidSet::const_iterator itr = m_sArmyWavesGuids[m_uiCurrentArmyWave].begin(); itr != m_sArmyWavesGuids[m_uiCurrentArmyWave].end(); ++itr) { diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 65edcf38d..31cc1c3af 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3081" + #define SD2_REVISION_NR "3082" #endif // __SD2_REVISION_NR_H__ From 152bcd34d0270296a0a956ff8f4f4109f0fa9f2d Mon Sep 17 00:00:00 2001 From: Tobschinski Date: Thu, 15 Jan 2015 02:55:59 +0100 Subject: [PATCH 1095/1172] BRD - Vault Improvements * Locked GOs in the vault are not selectable by default, to prevent abuse. This flag is removed as soon as they should become accessible. --- scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.h | 1 + .../blackrock_depths/instance_blackrock_depths.cpp | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.h b/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.h index e4c438716..8d6920059 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.h +++ b/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.h @@ -66,6 +66,7 @@ enum GO_CHEST_SEVEN = 169243, GO_ARENA_SPOILS = 181074, GO_SECRET_DOOR = 174553, + GO_SECRET_SAFE = 161495, // Jail break event related GO_JAIL_DOOR_SUPPLY = 170561, diff --git a/scripts/eastern_kingdoms/blackrock_depths/instance_blackrock_depths.cpp b/scripts/eastern_kingdoms/blackrock_depths/instance_blackrock_depths.cpp index 8301f4f97..984a5ea37 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/instance_blackrock_depths.cpp +++ b/scripts/eastern_kingdoms/blackrock_depths/instance_blackrock_depths.cpp @@ -102,6 +102,7 @@ void instance_blackrock_depths::OnObjectCreate(GameObject* pGo) case GO_CHEST_SEVEN: case GO_ARENA_SPOILS: case GO_SECRET_DOOR: + case GO_SECRET_SAFE: case GO_JAIL_DOOR_SUPPLY: case GO_JAIL_SUPPLY_CRATE: case GO_DWARFRUNE_A01: @@ -158,7 +159,10 @@ void instance_blackrock_depths::SetData(uint32 uiType, uint32 uiData) return; } if (uiData == DONE) + { DoUseDoorOrButton(GO_SECRET_DOOR); + DoToggleGameObjectFlags(GO_SECRET_SAFE, GO_FLAG_NO_INTERACT, false); + } m_auiEncounter[1] = uiData; break; case TYPE_BAR: From a8dc9231f07fe59384514bc19939e2f5645613de Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sun, 18 Jan 2015 22:24:48 +0100 Subject: [PATCH 1096/1172] [3083] Fix bug in Mograine and Whitemand (Scarlet Monastery) Thanks to @X-Savior for reporting --- .../scarlet_monastery/boss_mograine_and_whitemane.cpp | 2 ++ sd2_revision_nr.h | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/eastern_kingdoms/scarlet_monastery/boss_mograine_and_whitemane.cpp b/scripts/eastern_kingdoms/scarlet_monastery/boss_mograine_and_whitemane.cpp index 187627bc0..8281d88bc 100644 --- a/scripts/eastern_kingdoms/scarlet_monastery/boss_mograine_and_whitemane.cpp +++ b/scripts/eastern_kingdoms/scarlet_monastery/boss_mograine_and_whitemane.cpp @@ -134,6 +134,7 @@ struct boss_scarlet_commander_mograineAI : public ScriptedAI m_creature->ClearAllReactives(); m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); m_creature->SetStandState(UNIT_STAND_STATE_DEAD); m_bHasDied = true; @@ -265,6 +266,7 @@ struct boss_high_inquisitor_whitemaneAI : public ScriptedAI { // prevent killing blow before rezzing commander m_creature->SetHealth(uiDamage + 1); + uiDamage = 0; } } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 31cc1c3af..6c95c4362 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3082" + #define SD2_REVISION_NR "3083" #endif // __SD2_REVISION_NR_H__ From 419bfa7c040139a16b173b0141df4c3627ae6b86 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sun, 18 Jan 2015 22:39:29 +0100 Subject: [PATCH 1097/1172] [3084] Update [3079] as per the details provided --- .../boss_ambassador_flamelash.cpp | 27 ++++++++++--------- sd2_revision_nr.h | 2 +- 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/scripts/eastern_kingdoms/blackrock_depths/boss_ambassador_flamelash.cpp b/scripts/eastern_kingdoms/blackrock_depths/boss_ambassador_flamelash.cpp index 9ca710c4f..5ae6ab557 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/boss_ambassador_flamelash.cpp +++ b/scripts/eastern_kingdoms/blackrock_depths/boss_ambassador_flamelash.cpp @@ -43,28 +43,26 @@ struct boss_ambassador_flamelashAI : public ScriptedAI ScriptedInstance* m_pInstance; - uint32 m_uiSpiritTimer; + uint32 m_uiSpiritTimer[MAX_DWARF_RUNES]; GuidSet m_sSpiritsGuidsSet; void Reset() override { - m_uiSpiritTimer = urand(0, 1000); + for (uint8 i = 0; i < MAX_DWARF_RUNES; ++i) + m_uiSpiritTimer[i] = urand(0, 1000); m_sSpiritsGuidsSet.clear(); } // function that will summon spirits periodically - void DoSummonSpirits() + void DoSummonSpirit(uint8 uiIndex) { if (!m_pInstance) return; - for (int i = 0; i < MAX_DWARF_RUNES; ++i) - { - if (GameObject* pRune = m_pInstance->GetSingleGameObjectFromStorage(GO_DWARFRUNE_A01 + i)) - m_creature->SummonCreature(NPC_BURNING_SPIRIT, pRune->GetPositionX(), pRune->GetPositionY(), pRune->GetPositionZ(), m_creature->GetAngle(m_creature), TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 60000); - } + if (GameObject* pRune = m_pInstance->GetSingleGameObjectFromStorage(GO_DWARFRUNE_A01 + uiIndex)) + m_creature->SummonCreature(NPC_BURNING_SPIRIT, pRune->GetPositionX(), pRune->GetPositionY(), pRune->GetPositionZ(), m_creature->GetAngle(m_creature), TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 60000); } void MoveInLineOfSight(Unit* pWho) override @@ -112,13 +110,16 @@ struct boss_ambassador_flamelashAI : public ScriptedAI return; // m_uiSpiritTimer - if (m_uiSpiritTimer < uiDiff) + for (uint8 i = 0; i < MAX_DWARF_RUNES; ++i) { - DoSummonSpirits(); - m_uiSpiritTimer = 20000; + if (m_uiSpiritTimer[i] < uiDiff) + { + DoSummonSpirit(i); + m_uiSpiritTimer[i] = urand(15000, 30000); + } + else + m_uiSpiritTimer[i] -= uiDiff; } - else - m_uiSpiritTimer -= uiDiff; DoMeleeAttackIfReady(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 6c95c4362..1d98a8bac 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3083" + #define SD2_REVISION_NR "3084" #endif // __SD2_REVISION_NR_H__ From e9c9847844cc1028d2410cfb18a01a45420ef20a Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sun, 18 Jan 2015 22:56:23 +0100 Subject: [PATCH 1098/1172] [3085] Update [3083] --- .../scarlet_monastery/boss_mograine_and_whitemane.cpp | 1 + sd2_revision_nr.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/eastern_kingdoms/scarlet_monastery/boss_mograine_and_whitemane.cpp b/scripts/eastern_kingdoms/scarlet_monastery/boss_mograine_and_whitemane.cpp index 8281d88bc..a6d79f7b8 100644 --- a/scripts/eastern_kingdoms/scarlet_monastery/boss_mograine_and_whitemane.cpp +++ b/scripts/eastern_kingdoms/scarlet_monastery/boss_mograine_and_whitemane.cpp @@ -166,6 +166,7 @@ struct boss_scarlet_commander_mograineAI : public ScriptedAI { // On ressurection, stop fake death and heal whitemane and resume fight m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); m_creature->SetStandState(UNIT_STAND_STATE_STAND); // spell has script target on Whitemane DoCastSpellIfCan(m_creature, SPELL_LAYONHANDS); diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 1d98a8bac..f5335bb67 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3084" + #define SD2_REVISION_NR "3085" #endif // __SD2_REVISION_NR_H__ From 03473495954ed51c8228fb360a1ae42db414008c Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sat, 24 Jan 2015 22:22:26 +0100 Subject: [PATCH 1099/1172] [3086] Fix some minor issues for Yogg Saron Thanks to @Ulduar --- .../northrend/ulduar/ulduar/boss_algalon.cpp | 1 - .../northrend/ulduar/ulduar/boss_freya.cpp | 1 - .../northrend/ulduar/ulduar/boss_hodir.cpp | 1 - .../northrend/ulduar/ulduar/boss_thorim.cpp | 1 - .../ulduar/ulduar/instance_ulduar.cpp | 23 ++++++++++++++----- scripts/northrend/ulduar/ulduar/ulduar.h | 3 +++ sd2_revision_nr.h | 2 +- 7 files changed, 21 insertions(+), 11 deletions(-) diff --git a/scripts/northrend/ulduar/ulduar/boss_algalon.cpp b/scripts/northrend/ulduar/ulduar/boss_algalon.cpp index 94d5a963f..838ba848f 100644 --- a/scripts/northrend/ulduar/ulduar/boss_algalon.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_algalon.cpp @@ -64,7 +64,6 @@ enum SPELL_SUPERMASSIVE_FAIL = 65311, // related to the Supermassive achievements SPELL_BERSERK = 47008, SPELL_ASCEND_HEAVENS = 64487, // cast when time's up - SPELL_TELEPORT = 62940, // combat spells SPELL_QUANTUM_STRIKE = 64395, diff --git a/scripts/northrend/ulduar/ulduar/boss_freya.cpp b/scripts/northrend/ulduar/ulduar/boss_freya.cpp index e597a2ccf..a13d3e49e 100644 --- a/scripts/northrend/ulduar/ulduar/boss_freya.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_freya.cpp @@ -57,7 +57,6 @@ enum // general spells SPELL_FREYA_CREDIT = 65074, // kill credit spell; added in spell_template SPELL_DEFORESTATION_CREDIT = 65015, // used for achievs 2985 and 2984 - SPELL_TELEPORT = 62940, // despawn on event end SPELL_BERSERK = 47008, // SPELL_FREYA_DUMMY_YELLOW = 63292, // dummy spells used to light up the crystals; used in dbscripts_on_creature_move // SPELL_FREYA_DUMMY_BLUE = 63294, diff --git a/scripts/northrend/ulduar/ulduar/boss_hodir.cpp b/scripts/northrend/ulduar/ulduar/boss_hodir.cpp index 989ae3283..07a65892b 100644 --- a/scripts/northrend/ulduar/ulduar/boss_hodir.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_hodir.cpp @@ -50,7 +50,6 @@ enum SPELL_ICICLE_SNOWPACK = 62476, // cast right before Flash Freeze; triggers the spell which summons npc 33173 SPELL_ICICLE_SNOWPACK_H = 62477, SPELL_FLASH_FREEZE = 61968, // main spell; sends event 20896 - SPELL_TELEPORT = 62940, // despawn on event end // icicle spells SPELL_ICICLE = 62236, diff --git a/scripts/northrend/ulduar/ulduar/boss_thorim.cpp b/scripts/northrend/ulduar/ulduar/boss_thorim.cpp index b4e082001..050252a68 100644 --- a/scripts/northrend/ulduar/ulduar/boss_thorim.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_thorim.cpp @@ -72,7 +72,6 @@ enum SPELL_BERSERK_2 = 62555, SPELL_THORIM_CREDIT = 64985, // kill credit spell; added in spell_template SPELL_STORMHAMMER_OUTRO = 64767, // target npc 33196 and trigger spells 62470, 64909 and 64778 and despawn target in 10 sec - SPELL_TELEPORT = 62940, // Lightning charge related spells SPELL_LIGHTNING_PILLAR_ORB = 63238, // cast on spell 62016 hit; cast by the lower Orb diff --git a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp index d27ab3d33..53e02fcf9 100644 --- a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp +++ b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp @@ -137,10 +137,13 @@ void instance_ulduar::OnPlayerEnter(Player* pPlayer) pPlayer->SummonCreature(m_aKeepersSpawnLocs[i].uiEntry, m_aKeepersSpawnLocs[i].fX, m_aKeepersSpawnLocs[i].fY, m_aKeepersSpawnLocs[i].fZ, m_aKeepersSpawnLocs[i].fO, TEMPSUMMON_CORPSE_DESPAWN, 0, true); } - for (uint8 i = 0; i < countof(m_aKeeperHelperLocs); ++i) + if (GetData(TYPE_YOGGSARON) != DONE) { - if (GetData(m_aKeeperHelperLocs[i].uiType) == DONE) - pPlayer->SummonCreature(m_aKeeperHelperLocs[i].uiEntry, m_aKeeperHelperLocs[i].fX, m_aKeeperHelperLocs[i].fY, m_aKeeperHelperLocs[i].fZ, m_aKeeperHelperLocs[i].fO, TEMPSUMMON_CORPSE_DESPAWN, 0, true); + for (uint8 i = 0; i < countof(m_aKeeperHelperLocs); ++i) + { + if (GetData(m_aKeeperHelperLocs[i].uiType) == DONE) + pPlayer->SummonCreature(m_aKeeperHelperLocs[i].uiEntry, m_aKeeperHelperLocs[i].fX, m_aKeeperHelperLocs[i].fY, m_aKeeperHelperLocs[i].fZ, m_aKeeperHelperLocs[i].fO, TEMPSUMMON_CORPSE_DESPAWN, 0, true); + } } DoSpawnHodirNpcs(pPlayer); @@ -813,12 +816,20 @@ void instance_ulduar::SetData(uint32 uiType, uint32 uiData) // reset all helpers for (uint8 i = 0; i < countof(m_aKeeperHelperLocs); ++i) { - if (GetData(m_aKeeperHelperLocs[i].uiType == DONE)) + if (GetData(m_aKeeperHelperLocs[i].uiType) == DONE) { if (Creature* pHelper = GetSingleCreatureFromStorage(m_aKeeperHelperLocs[i].uiEntry)) { - pHelper->AI()->EnterEvadeMode(); - pHelper->CastSpell(pHelper, SPELL_KEEPER_ACTIVE, true); + if (uiData == FAIL) + { + pHelper->AI()->EnterEvadeMode(); + pHelper->CastSpell(pHelper, SPELL_KEEPER_ACTIVE, true); + } + else if (uiData == DONE) + { + pHelper->CastSpell(pHelper, SPELL_TELEPORT, true); + pHelper->ForcedDespawn(1000); + } } } } diff --git a/scripts/northrend/ulduar/ulduar/ulduar.h b/scripts/northrend/ulduar/ulduar/ulduar.h index 876d255b5..1d6f7891c 100644 --- a/scripts/northrend/ulduar/ulduar/ulduar.h +++ b/scripts/northrend/ulduar/ulduar/ulduar.h @@ -327,6 +327,9 @@ enum WORLD_STATE_TIMER = 4132, WORLD_STATE_TIMER_COUNT = 4131, + // common spells + SPELL_TELEPORT = 62940, + // events EVENT_ID_SHUTDOWN = 21605, EVENT_ID_SCRAP_REPAIR = 21606, diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index f5335bb67..6d19c291b 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3085" + #define SD2_REVISION_NR "3086" #endif // __SD2_REVISION_NR_H__ From ad3a1eec840dd32a543ba6dac2f1894a282fea42 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sun, 25 Jan 2015 14:21:47 +0100 Subject: [PATCH 1100/1172] [3087] Fix Scarlet Ghoul behavior Thanks to @grz3s Close #130 --- scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp | 4 ++++ sd2_revision_nr.h | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp b/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp index c95b8bb62..9bcbe82ed 100644 --- a/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp +++ b/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp @@ -1302,6 +1302,10 @@ struct npc_scarlet_ghoulAI : public ScriptedPetAI m_bDidInitText = false; m_uiUnsummonTimer = 0; DoCastSpellIfCan(m_creature, SPELL_GHOUL_SUMMONED); + + if (m_creature->GetCharmInfo()) + m_creature->GetCharmInfo()->SetReactState(REACT_DEFENSIVE); + Reset(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 6d19c291b..994e17b78 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3086" + #define SD2_REVISION_NR "3087" #endif // __SD2_REVISION_NR_H__ From 25db5ddae2130c257454d6ce5aae50b34c7dd02d Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sun, 25 Jan 2015 14:42:48 +0100 Subject: [PATCH 1101/1172] [3088] Add combat abilities for Reginald Windsor Thanks to @X-Savior --- scripts/eastern_kingdoms/stormwind_city.cpp | 37 +++++++++++++++++++++ sd2_revision_nr.h | 2 +- 2 files changed, 38 insertions(+), 1 deletion(-) diff --git a/scripts/eastern_kingdoms/stormwind_city.cpp b/scripts/eastern_kingdoms/stormwind_city.cpp index eb56c81e0..662600d17 100644 --- a/scripts/eastern_kingdoms/stormwind_city.cpp +++ b/scripts/eastern_kingdoms/stormwind_city.cpp @@ -468,6 +468,11 @@ enum SPELL_WINDSOR_DEATH = 20465, SPELL_ONYXIA_DESPAWN = 20466, + // combat spells + SPELL_HAMMER_OF_JUSTICE = 10308, + SPELL_SHIELD_WALL = 871, + SPELL_STRONG_CLEAVE = 8255, + NPC_GUARD_ROYAL = 1756, NPC_GUARD_CITY = 68, NPC_GUARD_PATROLLER = 1976, @@ -579,6 +584,9 @@ struct npc_reginald_windsorAI : public npc_escortAI, private DialogueHelper uint32 m_uiGuardCheckTimer; uint8 m_uiOnyxiaGuardCount; + uint32 m_uiHammerTimer; + uint32 m_uiCleaveTimer; + bool m_bIsKeepReady; bool m_bCanGuardSalute; @@ -593,6 +601,14 @@ struct npc_reginald_windsorAI : public npc_escortAI, private DialogueHelper m_uiGuardCheckTimer = 0; m_bIsKeepReady = false; m_bCanGuardSalute = false; + + m_uiHammerTimer = urand(0, 1000); + m_uiCleaveTimer = urand(1000, 3000); + } + + void Aggro(Unit* /*pWho*/) override + { + DoCastSpellIfCan(m_creature, SPELL_SHIELD_WALL); } void MoveInLineOfSight(Unit* pWho) override @@ -957,6 +973,27 @@ struct npc_reginald_windsorAI : public npc_escortAI, private DialogueHelper else m_uiGuardCheckTimer -= uiDiff; } + + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_uiHammerTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_HAMMER_OF_JUSTICE) == CAST_OK) + m_uiHammerTimer = 60000; + } + else + m_uiHammerTimer -= uiDiff; + + if (m_uiCleaveTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_STRONG_CLEAVE) == CAST_OK) + m_uiCleaveTimer = urand(1000, 5000); + } + else + m_uiCleaveTimer -= uiDiff; + + DoMeleeAttackIfReady(); } }; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 994e17b78..ab4ece0f2 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3087" + #define SD2_REVISION_NR "3088" #endif // __SD2_REVISION_NR_H__ From 8be7248db71886c8ce9f30b25c38388430034172 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sun, 25 Jan 2015 15:10:41 +0100 Subject: [PATCH 1102/1172] [3089] Use weather system in AQ20 Requires CMaNGOS 12807+ --- scripts/kalimdor/ruins_of_ahnqiraj/boss_ossirian.cpp | 9 +++++++-- sd2_revision_nr.h | 2 +- sql/scriptdev2_script_full.sql | 2 +- sql/updates/r3089_scriptdev2.sql | 1 + 4 files changed, 10 insertions(+), 4 deletions(-) create mode 100644 sql/updates/r3089_scriptdev2.sql diff --git a/scripts/kalimdor/ruins_of_ahnqiraj/boss_ossirian.cpp b/scripts/kalimdor/ruins_of_ahnqiraj/boss_ossirian.cpp index 74ceb284e..3b8cba0ef 100644 --- a/scripts/kalimdor/ruins_of_ahnqiraj/boss_ossirian.cpp +++ b/scripts/kalimdor/ruins_of_ahnqiraj/boss_ossirian.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: Boss_Ossirian -SD%Complete: 80% -SDComment: Weather missing +SD%Complete: 100% +SDComment: SDCategory: Ruins of Ahn'Qiraj EndScriptData */ @@ -53,6 +53,8 @@ enum SPELL_WEAKNESS_SHADOW = 25183, NPC_SAND_VORTEX = 15428, // tornado npc + + ZONE_ID_RUINS_AQ = 3429, }; static const float aSandVortexSpawnPos[2][4] = @@ -101,6 +103,9 @@ struct boss_ossirianAI : public ScriptedAI for (uint8 i = 0; i < countof(aSandVortexSpawnPos); ++i) m_creature->SummonCreature(NPC_SAND_VORTEX, aSandVortexSpawnPos[i][0], aSandVortexSpawnPos[i][1], aSandVortexSpawnPos[i][2], aSandVortexSpawnPos[i][3], TEMPSUMMON_CORPSE_DESPAWN, 0); + + if (m_pInstance) + m_pInstance->instance->SetWeather(ZONE_ID_RUINS_AQ, WEATHER_TYPE_STORM, 1.0f, true); } void JustDied(Unit* /*pKiller*/) override diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index ab4ece0f2..71c4a9d5b 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3088" + #define SD2_REVISION_NR "3089" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 37b63c0e5..95e6b4043 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -3,7 +3,7 @@ -- DELETE FROM sd2_db_version; -INSERT INTO sd2_db_version (version) VALUES ('ScriptDev2 (for CMaNGOS 12803+) '); +INSERT INTO sd2_db_version (version) VALUES ('ScriptDev2 (for CMaNGOS 12807+) '); -- -- Below contains data for table `script_texts` mainly used in C++ parts. diff --git a/sql/updates/r3089_scriptdev2.sql b/sql/updates/r3089_scriptdev2.sql new file mode 100644 index 000000000..0524ad742 --- /dev/null +++ b/sql/updates/r3089_scriptdev2.sql @@ -0,0 +1 @@ +UPDATE sd2_db_version SET version='ScriptDev2 (for CMaNGOS 12807+) '; From 3e116eb9eb316d6f68f8ffe3199d1199b716cbc1 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sun, 25 Jan 2015 21:29:21 +0100 Subject: [PATCH 1103/1172] [3090] Add combat abilities for the Grand Champions - ToC5 --- .../boss_grand_champions.cpp | 334 +++++++++++++++++- .../instance_trial_of_the_champion.cpp | 10 + .../trial_of_the_champion.h | 1 + sd2_revision_nr.h | 2 +- 4 files changed, 338 insertions(+), 9 deletions(-) diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_grand_champions.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_grand_champions.cpp index a362aee58..364823be0 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_grand_champions.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_grand_champions.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: grand_champions -SD%Complete: 40 -SDComment: No Combat support; only basic encounter setup +SD%Complete: 70 +SDComment: No Vehicle Combat support SDCategory: Crusader Coliseum, Trial of the Champion EndScriptData */ @@ -56,6 +56,7 @@ struct trial_companion_commonAI : public ScriptedAI uint32 m_uiShieldBreakerTimer; uint32 m_uiChargeTimer; uint32 m_uiDefeatedTimer; + uint32 m_uiResetThreatTimer; bool m_bDefeated; @@ -77,16 +78,19 @@ struct trial_companion_commonAI : public ScriptedAI m_uiShieldBreakerTimer = urand(3000, 5000); m_uiChargeTimer = urand(1000, 3000); m_uiDefeatedTimer = 0; + m_uiResetThreatTimer = urand(5000, 15000); m_bDefeated = false; } - void Aggro(Unit* /*pWho*/) override + void Aggro(Unit* pWho) override { if (m_pInstance) { if (m_pInstance->GetData(TYPE_ARENA_CHALLENGE) == DONE) m_pInstance->SetData(TYPE_GRAND_CHAMPIONS, IN_PROGRESS); + + m_pInstance->DoSetChamptionsInCombat(pWho); } } @@ -308,6 +312,19 @@ struct trial_companion_commonAI : public ScriptedAI if (!UpdateChampionAI(uiDiff)) return; + // Change target + if (m_uiResetThreatTimer < uiDiff) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1)) + { + DoResetThreat(); + AttackStart(pTarget); + m_uiResetThreatTimer = urand(5000, 15000); + } + } + else + m_uiResetThreatTimer -= uiDiff; + DoMeleeAttackIfReady(); } } @@ -316,6 +333,10 @@ struct trial_companion_commonAI : public ScriptedAI enum { // warrior spells + SPELL_INTERCEPT = 67540, + SPELL_BLADESTORM = 67541, + SPELL_MORTAL_STRIKE = 67542, + SPELL_ROLLING_THROW = 67546, }; /*###### @@ -326,14 +347,62 @@ struct boss_champion_warriorAI : public trial_companion_commonAI { boss_champion_warriorAI(Creature* pCreature) : trial_companion_commonAI(pCreature) { Reset(); } + uint32 m_uiStrikeTimer; + uint32 m_uiBladeStormTimer; + uint32 m_uiInterceptTimer; + uint32 m_uiThrowTimer; + void Reset() override { + m_uiInterceptTimer = 0; + m_uiStrikeTimer = urand(5000, 8000); + m_uiBladeStormTimer = urand(10000, 20000); + m_uiThrowTimer = 30000; + trial_companion_commonAI::Reset(); } bool UpdateChampionAI(const uint32 uiDiff) { - // ToDo: + if (m_uiInterceptTimer < uiDiff) + { + if (!m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0, uint32(0), SELECT_FLAG_IN_MELEE_RANGE)) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0, SPELL_INTERCEPT, SELECT_FLAG_NOT_IN_MELEE_RANGE | SELECT_FLAG_IN_LOS)) + { + if (DoCastSpellIfCan(pTarget, SPELL_INTERCEPT) == CAST_OK) + m_uiInterceptTimer = 10000; + } + } + else + m_uiInterceptTimer = 2000; + } + else + m_uiInterceptTimer -= uiDiff; + + if (m_uiBladeStormTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_BLADESTORM) == CAST_OK) + m_uiBladeStormTimer = urand(15000, 20000); + } + else + m_uiBladeStormTimer -= uiDiff; + + if (m_uiThrowTimer < uiDiff) + { + m_creature->getVictim()->CastSpell(m_creature->getVictim(), SPELL_ROLLING_THROW, true); + m_uiThrowTimer = urand(20000, 30000); + } + else + m_uiThrowTimer -= uiDiff; + + if (m_uiStrikeTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_MORTAL_STRIKE) == CAST_OK) + m_uiStrikeTimer = urand(8000, 12000); + } + else + m_uiStrikeTimer -= uiDiff; return true; } @@ -347,6 +416,10 @@ CreatureAI* GetAI_boss_champion_warrior(Creature* pCreature) enum { // mage spells + SPELL_FIREBALL = 66042, + SPELL_POLYMORPH = 66043, + SPELL_BLAST_WAVE = 66044, + SPELL_HASTE = 66045, }; /*###### @@ -357,14 +430,81 @@ struct boss_champion_mageAI : public trial_companion_commonAI { boss_champion_mageAI(Creature* pCreature) : trial_companion_commonAI(pCreature) { Reset(); } + uint32 m_uiFireballTimer; + uint32 m_uiBlastWaveTimer; + uint32 m_uiHasteTimer; + uint32 m_uiPolymorphTimer; + void Reset() override { + m_uiFireballTimer = 0; + m_uiBlastWaveTimer = urand(10000, 20000); + m_uiHasteTimer = 10000; + m_uiPolymorphTimer = urand(5000, 10000); + trial_companion_commonAI::Reset(); } + void AttackStart(Unit* pWho) override + { + if (!m_pInstance) + return; + + if (m_pInstance->GetData(TYPE_ARENA_CHALLENGE) == DONE) + { + if (m_creature->Attack(pWho, true)) + { + m_creature->AddThreat(pWho); + m_creature->SetInCombatWith(pWho); + pWho->SetInCombatWith(m_creature); + DoStartMovement(pWho, 20.0f); + } + } + else + trial_companion_commonAI::AttackStart(pWho); + } + bool UpdateChampionAI(const uint32 uiDiff) { - // ToDo: + if (m_uiFireballTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_FIREBALL) == CAST_OK) + m_uiFireballTimer = urand(2000, 4000); + } + else + m_uiFireballTimer -= uiDiff; + + if (m_uiBlastWaveTimer < uiDiff) + { + if (m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0, SPELL_BLAST_WAVE, SELECT_FLAG_IN_MELEE_RANGE)) + { + if (DoCastSpellIfCan(m_creature, SPELL_BLAST_WAVE) == CAST_OK) + m_uiBlastWaveTimer = urand(10000, 20000); + } + else + m_uiBlastWaveTimer = 5000; + } + else + m_uiBlastWaveTimer -= uiDiff; + + if (m_uiHasteTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_HASTE) == CAST_OK) + m_uiHasteTimer = 20000; + } + else + m_uiHasteTimer -= uiDiff; + + if (m_uiPolymorphTimer < uiDiff) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, SPELL_POLYMORPH) == CAST_OK) + m_uiPolymorphTimer = urand(5000, 10000); + } + } + else + m_uiPolymorphTimer -= uiDiff; return true; } @@ -378,6 +518,10 @@ CreatureAI* GetAI_boss_champion_mage(Creature* pCreature) enum { // shaman spells + SPELL_HEALING_WAVE = 67528, + SPELL_CHAIN_LIGHTNING = 67529, + SPELL_EARTH_SHIELD = 67530, + SPELL_HEX_OF_MENDING = 67534, }; /*###### @@ -388,14 +532,59 @@ struct boss_champion_shamanAI : public trial_companion_commonAI { boss_champion_shamanAI(Creature* pCreature) : trial_companion_commonAI(pCreature) { Reset(); } + uint32 m_uiHealingWaveTimer; + uint32 m_uiLightningTimer; + uint32 m_uiEarthShieldTimer; + uint32 m_uiHexTimer; + void Reset() override { + m_uiLightningTimer = 1000; + m_uiHealingWaveTimer = 13000; + m_uiHexTimer = 10000; + m_uiEarthShieldTimer = 0; + trial_companion_commonAI::Reset(); } bool UpdateChampionAI(const uint32 uiDiff) { - // ToDo: + if (m_uiLightningTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_CHAIN_LIGHTNING) == CAST_OK) + m_uiLightningTimer = urand(1000, 3000); + } + else + m_uiLightningTimer -= uiDiff; + + if (m_uiHealingWaveTimer < uiDiff) + { + if (Unit* pTarget = DoSelectLowestHpFriendly(40.0f)) + { + if (DoCastSpellIfCan(pTarget, SPELL_HEALING_WAVE) == CAST_OK) + m_uiHealingWaveTimer = urand(8000, 13000); + } + } + else + m_uiHealingWaveTimer -= uiDiff; + + if (m_uiEarthShieldTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_EARTH_SHIELD, CAST_AURA_NOT_PRESENT) == CAST_OK) + m_uiEarthShieldTimer = 30000; + else + m_uiEarthShieldTimer = 5000; + } + else + m_uiEarthShieldTimer -= uiDiff; + + if (m_uiHexTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_HEX_OF_MENDING) == CAST_OK) + m_uiHexTimer = urand(17000, 25000); + } + else + m_uiHexTimer -= uiDiff; return true; } @@ -409,6 +598,11 @@ CreatureAI* GetAI_boss_champion_shaman(Creature* pCreature) enum { // hunter spells + SPELL_DISENGAGE = 68340, // trigger 68340 + SPELL_LIGHTNING_ARROWS = 66083, + SPELL_LIGHTNING_ARROWS_PROC = 66085, + SPELL_MULTI_SHOT = 66081, + SPELL_SHOOT = 65868, }; /*###### @@ -419,14 +613,94 @@ struct boss_champion_hunterAI : public trial_companion_commonAI { boss_champion_hunterAI(Creature* pCreature) : trial_companion_commonAI(pCreature) { Reset(); } + uint32 m_uiDisengageTimer; + uint32 m_uiArrowsTimer; + uint32 m_uiArrowsProcTimer; + uint32 m_uiMultiShotTimer; + uint32 m_uiShootTimer; + void Reset() override { + m_uiShootTimer = 1000; + m_uiArrowsTimer = urand(10000, 15000); + m_uiArrowsProcTimer = 0; + m_uiMultiShotTimer = urand(6000, 12000); + m_uiDisengageTimer = 5000; + trial_companion_commonAI::Reset(); } + void AttackStart(Unit* pWho) override + { + if (!m_pInstance) + return; + + if (m_pInstance->GetData(TYPE_ARENA_CHALLENGE) == DONE) + { + if (m_creature->Attack(pWho, true)) + { + m_creature->AddThreat(pWho); + m_creature->SetInCombatWith(pWho); + pWho->SetInCombatWith(m_creature); + DoStartMovement(pWho, 20.0f); + } + } + else + trial_companion_commonAI::AttackStart(pWho); + } + bool UpdateChampionAI(const uint32 uiDiff) { - // ToDo: + if (m_uiShootTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_SHOOT) == CAST_OK) + m_uiShootTimer = urand(1000, 3000); + } + else + m_uiShootTimer -= uiDiff; + + if (m_uiMultiShotTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_MULTI_SHOT) == CAST_OK) + m_uiMultiShotTimer = urand(5000, 10000); + } + else + m_uiMultiShotTimer -= uiDiff; + + if (m_uiDisengageTimer < uiDiff) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0, SPELL_DISENGAGE, SELECT_FLAG_IN_MELEE_RANGE)) + { + if (DoCastSpellIfCan(pTarget, SPELL_DISENGAGE) == CAST_OK) + m_uiDisengageTimer = urand(13000, 18000); + } + else + m_uiDisengageTimer = 5000; + } + else + m_uiDisengageTimer -= uiDiff; + + if (m_uiArrowsTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_LIGHTNING_ARROWS) == CAST_OK) + { + m_uiArrowsTimer = urand(23000, 27000); + m_uiArrowsProcTimer = 3000; + } + } + else + m_uiArrowsTimer -= uiDiff; + + if (m_uiArrowsProcTimer) + { + if (m_uiArrowsProcTimer <= uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_LIGHTNING_ARROWS_PROC) == CAST_OK) + m_uiArrowsProcTimer = 0; + } + else + m_uiArrowsProcTimer -= uiDiff; + } return true; } @@ -440,6 +714,10 @@ CreatureAI* GetAI_boss_champion_hunter(Creature* pCreature) enum { // rogue spells + SPELL_POISON_BOTTLE = 67701, + SPELL_FAN_OF_KNIVES = 67706, + SPELL_EVISCERATE = 67709, + SPELL_DEADLY_POISON = 67710, }; /*###### @@ -450,14 +728,54 @@ struct boss_champion_rogueAI : public trial_companion_commonAI { boss_champion_rogueAI(Creature* pCreature) : trial_companion_commonAI(pCreature) { Reset(); } + uint32 m_uiPoisonBottleTimer; + uint32 m_uiFanKnivesTimer; + uint32 m_uiEviscerateTimer; + uint32 m_uiDeadlyPoisonTimer; + void Reset() override { + m_uiDeadlyPoisonTimer = 12000; + m_uiEviscerateTimer = 7000; + m_uiFanKnivesTimer = 10000; + m_uiPoisonBottleTimer = 5000; + trial_companion_commonAI::Reset(); } bool UpdateCompanionAI(const uint32 uiDiff) { - // ToDo: + if (m_uiPoisonBottleTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_POISON_BOTTLE) == CAST_OK) + m_uiPoisonBottleTimer = urand(15000, 20000); + } + else + m_uiPoisonBottleTimer -= uiDiff; + + if (m_uiDeadlyPoisonTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_DEADLY_POISON) == CAST_OK) + m_uiDeadlyPoisonTimer = urand(9000, 15000); + } + else + m_uiDeadlyPoisonTimer -= uiDiff; + + if (m_uiEviscerateTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_EVISCERATE) == CAST_OK) + m_uiEviscerateTimer = 8000; + } + else + m_uiEviscerateTimer -= uiDiff; + + if (m_uiFanKnivesTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_FAN_OF_KNIVES) == CAST_OK) + m_uiFanKnivesTimer = urand(10000, 15000); + } + else + m_uiFanKnivesTimer -= uiDiff; return true; } diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/instance_trial_of_the_champion.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/instance_trial_of_the_champion.cpp index a424e3654..66089106e 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/instance_trial_of_the_champion.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/instance_trial_of_the_champion.cpp @@ -687,6 +687,16 @@ void instance_trial_of_the_champion::DoSendChampionsToExit() } } +// Function that will set all the champions in combat with the target +void instance_trial_of_the_champion::DoSetChamptionsInCombat(Unit* pTarget) +{ + for (uint8 i = 0; i < MAX_CHAMPIONS_ARENA; ++i) + { + if (Creature* pChampion = instance->GetCreature(m_ArenaChampionsGuids[i])) + pChampion->AI()->AttackStart(pTarget); + } +} + void instance_trial_of_the_champion::JustDidDialogueStep(int32 iEntry) { switch (iEntry) diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.h b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.h index 9d626be49..f995bd707 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.h +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.h @@ -266,6 +266,7 @@ class instance_trial_of_the_champion : public ScriptedInstance, private Dialogue void MoveChampionToHome(Creature* pChampion); void InformChampionReachHome(); void DoSendChampionsToExit(); + void DoSetChamptionsInCombat(Unit* pTarget); uint32 GetMountEntryForChampion() { return m_uiTeam == ALLIANCE ? NPC_BATTLEWORG_ALLIANCE : NPC_WARHORSE_HORDE; } bool IsArenaChallengeComplete(uint32 uiType); diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 71c4a9d5b..afb94239b 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3089" + #define SD2_REVISION_NR "3090" #endif // __SD2_REVISION_NR_H__ From ae2543085c39a57cd036dc59542641e0064d2de5 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Wed, 28 Jan 2015 00:46:13 +0100 Subject: [PATCH 1104/1172] [3091] Complete the Grand Champions encounter - ToC5 --- .../boss_grand_champions.cpp | 189 ++++++++++++++++-- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 + sql/updates/r3091_mangos.sql | 1 + 4 files changed, 175 insertions(+), 18 deletions(-) create mode 100644 sql/updates/r3091_mangos.sql diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_grand_champions.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_grand_champions.cpp index 364823be0..0ee8ec388 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_grand_champions.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_grand_champions.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: grand_champions -SD%Complete: 70 -SDComment: No Vehicle Combat support +SD%Complete: 90 +SDComment: Encounter might require additional improvements. SDCategory: Crusader Coliseum, Trial of the Champion EndScriptData */ @@ -28,11 +28,11 @@ EndScriptData */ enum { // common spells - SPELL_DEFEND_DUMMY = 64101, // triggers 63130, 63131 and 63132 - SPELL_DEFEND = 62719, + SPELL_DEFEND_DUMMY = 64101, // triggers 62719, 64192 SPELL_SHIELD_BREAKER = 68504, - SPELL_CHARGE = 68301, // triggers 68321 - unk mechanics + SPELL_CHARGE = 68301, // triggers 68307 + SPELL_CHARGE_VEHICLE = 68307, SPELL_FULL_HEAL = 43979, SPELL_RIDE_ARGENT_VEHICLE = 69692, }; @@ -69,10 +69,7 @@ struct trial_companion_commonAI : public ScriptedAI if (m_pInstance->GetData(TYPE_ARENA_CHALLENGE) == DONE) m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE); else - { - DoCastSpellIfCan(m_creature, SPELL_DEFEND, CAST_TRIGGERED); DoCastSpellIfCan(m_creature, SPELL_DEFEND_DUMMY, CAST_TRIGGERED); - } } m_uiShieldBreakerTimer = urand(3000, 5000); @@ -230,6 +227,15 @@ struct trial_companion_commonAI : public ScriptedAI } } + void ReceiveAIEvent(AIEventType eventType, Creature* pSender, Unit* pInvoker, uint32 /*uiMiscValue*/) override + { + if (eventType == AI_EVENT_CUSTOM_B) + { + m_uiShieldBreakerTimer = urand(1000, 2000); + m_uiChargeTimer = urand(2000, 4000); + } + } + // function that will make the champion to use the nearby available mount void DoUseNearbyMountIfCan() { @@ -292,18 +298,28 @@ struct trial_companion_commonAI : public ScriptedAI if (m_uiShieldBreakerTimer < uiDiff) { if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_SHIELD_BREAKER) == CAST_OK) - m_uiShieldBreakerTimer = urand(2000, 8000); + m_uiShieldBreakerTimer = urand(2000, 4000); } else m_uiShieldBreakerTimer -= uiDiff; - if (m_uiChargeTimer < uiDiff) + if (m_uiChargeTimer) { - if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_CHARGE) == CAST_OK) - m_uiChargeTimer = urand(4000, 10000); + if (m_uiChargeTimer <= uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_CHARGE) == CAST_OK) + { + if (m_creature->GetTransportInfo() && m_creature->GetTransportInfo()->IsOnVehicle()) + { + if (Creature* pMount = (Creature*)m_creature->GetTransportInfo()->GetTransport()) + SendAIEvent(AI_EVENT_CUSTOM_A, m_creature->getVictim(), pMount); + } + m_uiChargeTimer = 0; + } + } + else + m_uiChargeTimer -= uiDiff; } - else - m_uiChargeTimer -= uiDiff; } // arena challenge complete - start normal battle else if (m_pInstance->GetData(TYPE_ARENA_CHALLENGE) == DONE) @@ -787,14 +803,105 @@ CreatureAI* GetAI_boss_champion_rogue(Creature* pCreature) } /*###### -## npc_champion_mount +## npc_trial_grand_champion ######*/ enum { + SPELL_CHAMPION_CHARGE = 63010, + SPELL_CHAMPION_DEFEND = 64100, +}; + +struct npc_trial_grand_championAI : public ScriptedAI +{ + npc_trial_grand_championAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (instance_trial_of_the_champion*)pCreature->GetInstanceData(); + Reset(); + } + + instance_trial_of_the_champion* m_pInstance; + + uint32 m_uiChargeTimer; + uint32 m_uiBlockTimer; + uint32 m_uiChargeResetTimer; + void Reset() override + { + m_uiChargeTimer = 1000; + m_uiBlockTimer = 0; + m_uiChargeResetTimer = 0; + } + + void AttackStart(Unit* pWho) override + { + if (m_creature->Attack(pWho, true)) + { + m_creature->AddThreat(pWho); + m_creature->SetInCombatWith(pWho); + pWho->SetInCombatWith(m_creature); + DoStartMovement(pWho, frand(10.0f, 20.0f)); + } + } + + void UpdateAI(const uint32 uiDiff) override + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_uiBlockTimer < uiDiff) + { + if (!m_creature->HasAura(SPELL_CHAMPION_DEFEND)) + { + if (DoCastSpellIfCan(m_creature, SPELL_CHAMPION_DEFEND) == CAST_OK) + m_uiBlockTimer = 7000; + } + else + m_uiBlockTimer = 2000; + } + else + m_uiBlockTimer -= uiDiff; + + if (m_uiChargeTimer) + { + if (m_uiChargeTimer <= uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_CHAMPION_CHARGE) == CAST_OK) + { + DoStartMovement(m_creature->getVictim()); + m_uiChargeResetTimer = urand(5000, 10000); + m_uiChargeTimer = 0; + } + } + else + m_uiChargeTimer -= uiDiff; + } + + if (m_uiChargeResetTimer) + { + if (m_uiChargeResetTimer <= uiDiff) + { + DoStartMovement(m_creature->getVictim(), frand(10.0f, 20.0f)); + m_uiChargeResetTimer = 0; + m_uiChargeTimer = urand(2000, 4000); + } + else + m_uiChargeResetTimer -= uiDiff; + } + + DoMeleeAttackIfReady(); + } }; +CreatureAI* GetAI_npc_trial_grand_champion(Creature* pCreature) +{ + return new npc_trial_grand_championAI(pCreature); +} + +/*###### +## npc_champion_mount +######*/ + struct npc_champion_mountAI : public ScriptedAI { npc_champion_mountAI(Creature* pCreature) : ScriptedAI(pCreature) @@ -805,7 +912,27 @@ struct npc_champion_mountAI : public ScriptedAI instance_trial_of_the_champion* m_pInstance; - void Reset() override { } + uint32 m_uiChargeResetTimer; + + ObjectGuid m_ownerGuid; + + void Reset() override + { + m_uiChargeResetTimer = 0; + } + + void AttackStart(Unit* pWho) override + { + if (m_creature->Attack(pWho, true)) + { + m_creature->AddThreat(pWho); + m_creature->SetInCombatWith(pWho); + pWho->SetInCombatWith(m_creature); + DoStartMovement(pWho, frand(10.0f, 20.0f)); + } + } + + void MoveInLineOfSight(Unit* /*pWho*/) override { } void MovementInform(uint32 uiMotionType, uint32 uiPointId) override { @@ -828,12 +955,35 @@ struct npc_champion_mountAI : public ScriptedAI } } - void MoveInLineOfSight(Unit* /*pWho*/) override { } + void ReceiveAIEvent(AIEventType eventType, Creature* pSender, Unit* pInvoker, uint32 /*uiMiscValue*/) override + { + if (eventType == AI_EVENT_CUSTOM_A) + { + DoCastSpellIfCan(pInvoker, SPELL_CHARGE_VEHICLE, CAST_TRIGGERED, pSender->GetObjectGuid()); + DoStartMovement(pInvoker); + m_ownerGuid = pSender->GetObjectGuid(); + m_uiChargeResetTimer = urand(5000, 10000); + } + } void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; + + if (m_uiChargeResetTimer) + { + if (m_uiChargeResetTimer <= uiDiff) + { + if (Creature* pOwner = m_creature->GetMap()->GetCreature(m_ownerGuid)) + SendAIEvent(AI_EVENT_CUSTOM_B, m_creature, pOwner); + + DoStartMovement(m_creature->getVictim(), frand(10.0f, 20.0f)); + m_uiChargeResetTimer = 0; + } + else + m_uiChargeResetTimer -= uiDiff; + } } }; @@ -871,6 +1021,11 @@ void AddSC_boss_grand_champions() pNewScript->GetAI = &GetAI_boss_champion_rogue; pNewScript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "npc_trial_grand_champion"; + pNewScript->GetAI = &GetAI_npc_trial_grand_champion; + pNewScript->RegisterSelf(); + pNewScript = new Script; pNewScript->Name = "npc_champion_mount"; pNewScript->GetAI = &GetAI_npc_champion_mount; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index afb94239b..36ab321c7 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3090" + #define SD2_REVISION_NR "3091" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 4a9826138..70d4a5974 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -491,6 +491,7 @@ UPDATE creature_template SET ScriptName='boss_champion_shaman' WHERE entry IN (3 UPDATE creature_template SET ScriptName='boss_champion_hunter' WHERE entry IN (34657,35570); UPDATE creature_template SET ScriptName='boss_champion_rogue' WHERE entry IN (34703,35617); UPDATE creature_template SET ScriptName='npc_champion_mount' WHERE entry IN (35644,36559,35637,35633,35768,34658,35636,35638,35635,35640,35641,35634); +UPDATE creature_template SET ScriptName='npc_trial_grand_champion' WHERE entry IN (35328,35331,35330,35332,35329,35314,35326,35325,35323,35327); /* TRIAL OF THE CRUSADER */ UPDATE instance_template SET ScriptName='instance_trial_of_the_crusader' WHERE map=649; diff --git a/sql/updates/r3091_mangos.sql b/sql/updates/r3091_mangos.sql new file mode 100644 index 000000000..bd4c2673a --- /dev/null +++ b/sql/updates/r3091_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_trial_grand_champion' WHERE entry IN (35328,35331,35330,35332,35329,35314,35326,35325,35323,35327); From 960433a84a64229619ce51d675e580e8f4ef6bcb Mon Sep 17 00:00:00 2001 From: Ulduar Date: Mon, 2 Feb 2015 21:54:45 +0100 Subject: [PATCH 1105/1172] [3092] Fix missing sounds Close scriptdev2/scriptdev2-cata#15 Signed-off-by: Xfurry --- sd2_revision_nr.h | 2 +- sql/scriptdev2_script_full.sql | 4 ++-- sql/updates/r3092_scriptdev2.sql | 2 ++ 3 files changed, 5 insertions(+), 3 deletions(-) create mode 100644 sql/updates/r3092_scriptdev2.sql diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 36ab321c7..b51e0585a 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3091" + #define SD2_REVISION_NR "3092" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 95e6b4043..8554ab7b1 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -3598,8 +3598,8 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1601023,'Uunak-hissss tik-k-k-k-k!',14067,1,0,0,'anubarak SAY_LOCUST_3'), (-1601024,'Ahhh... RAAAAAGH! Never thought... I would be free of him...',14069,1,0,0,'anubarak SAY_DEATH'), -(-1601025,'The gate has been breached! Quickly, divert forces to deal with these invaders!',0,1,0,0,'anub\'ar crusher SAY_AGGRO'), -(-1601026,'There\'s no time left! All remaining forces, attack the invaders!',0,1,0,0,'anub\'ar crusher SAY_SPECIAL'); +(-1601025,'The gate has been breached! Quickly, divert forces to deal with these invaders!',13941,1,0,0,'anub\'ar crusher SAY_AGGRO'), +(-1601026,'There\'s no time left! All remaining forces, attack the invaders!',13942,1,0,0,'anub\'ar crusher SAY_SPECIAL'); -- -1 602 000 HALLS OF LIGHTNING INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES diff --git a/sql/updates/r3092_scriptdev2.sql b/sql/updates/r3092_scriptdev2.sql new file mode 100644 index 000000000..e03e69b77 --- /dev/null +++ b/sql/updates/r3092_scriptdev2.sql @@ -0,0 +1,2 @@ +UPDATE script_texts SET sound=13941 WHERE entry=-1601025; +UPDATE script_texts SET sound=13942 WHERE entry=-1601026; From 9ef9b5fd378ccc724ac28c42d8d9f9fafa9c2b32 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Mon, 2 Feb 2015 22:06:43 +0100 Subject: [PATCH 1106/1172] [3093] Fix Skeram infinite loot Close #131 --- scripts/kalimdor/temple_of_ahnqiraj/boss_skeram.cpp | 2 +- sd2_revision_nr.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_skeram.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_skeram.cpp index f4aad7e70..10517ae16 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/boss_skeram.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_skeram.cpp @@ -102,7 +102,7 @@ struct boss_skeramAI : public ScriptedAI } // Else despawn to avoid looting else - m_creature->ForcedDespawn(); + m_creature->ForcedDespawn(1); } void Aggro(Unit* /*pWho*/) override diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index b51e0585a..6ba12136b 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3092" + #define SD2_REVISION_NR "3093" #endif // __SD2_REVISION_NR_H__ From b14a7598f896b690944612d33790a6bce7aeff02 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Mon, 2 Feb 2015 22:41:15 +0100 Subject: [PATCH 1107/1172] [3094] Add missing placeholders for ToC5 --- VC100/100ScriptDev2.vcxproj | 2 ++ VC100/100ScriptDev2.vcxproj.filters | 6 ++++ VC110/110ScriptDev2.vcxproj | 2 ++ VC110/110ScriptDev2.vcxproj.filters | 6 ++++ VC120/120ScriptDev2.vcxproj | 2 ++ VC120/120ScriptDev2.vcxproj.filters | 6 ++++ .../boss_argent_challenge.cpp | 29 +++++++++++++++++++ .../boss_black_knight.cpp | 29 +++++++++++++++++++ sd2_revision_nr.h | 2 +- system/ScriptLoader.cpp | 8 +++-- 10 files changed, 89 insertions(+), 3 deletions(-) create mode 100644 scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_argent_challenge.cpp create mode 100644 scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_black_knight.cpp diff --git a/VC100/100ScriptDev2.vcxproj b/VC100/100ScriptDev2.vcxproj index 29cf8516a..2b5a29499 100644 --- a/VC100/100ScriptDev2.vcxproj +++ b/VC100/100ScriptDev2.vcxproj @@ -443,6 +443,8 @@ + + diff --git a/VC100/100ScriptDev2.vcxproj.filters b/VC100/100ScriptDev2.vcxproj.filters index c3ad245ee..3506fb5ac 100644 --- a/VC100/100ScriptDev2.vcxproj.filters +++ b/VC100/100ScriptDev2.vcxproj.filters @@ -993,6 +993,12 @@ scripts\northrend\azjol-nerub\azjol-nerub + + scripts\northrend\crusaders_coliseum\trial_of_the_champion + + + scripts\northrend\crusaders_coliseum\trial_of_the_champion + scripts\northrend\crusaders_coliseum\trial_of_the_champion diff --git a/VC110/110ScriptDev2.vcxproj b/VC110/110ScriptDev2.vcxproj index 2a9ba406d..899a70545 100644 --- a/VC110/110ScriptDev2.vcxproj +++ b/VC110/110ScriptDev2.vcxproj @@ -450,6 +450,8 @@ + + diff --git a/VC110/110ScriptDev2.vcxproj.filters b/VC110/110ScriptDev2.vcxproj.filters index c3ad245ee..3506fb5ac 100644 --- a/VC110/110ScriptDev2.vcxproj.filters +++ b/VC110/110ScriptDev2.vcxproj.filters @@ -993,6 +993,12 @@ scripts\northrend\azjol-nerub\azjol-nerub + + scripts\northrend\crusaders_coliseum\trial_of_the_champion + + + scripts\northrend\crusaders_coliseum\trial_of_the_champion + scripts\northrend\crusaders_coliseum\trial_of_the_champion diff --git a/VC120/120ScriptDev2.vcxproj b/VC120/120ScriptDev2.vcxproj index deabc9220..a5a16c002 100644 --- a/VC120/120ScriptDev2.vcxproj +++ b/VC120/120ScriptDev2.vcxproj @@ -450,6 +450,8 @@ + + diff --git a/VC120/120ScriptDev2.vcxproj.filters b/VC120/120ScriptDev2.vcxproj.filters index 284085ff8..1a5e0df37 100644 --- a/VC120/120ScriptDev2.vcxproj.filters +++ b/VC120/120ScriptDev2.vcxproj.filters @@ -993,6 +993,12 @@ scripts\northrend\azjol-nerub\azjol-nerub + + scripts\northrend\crusaders_coliseum\trial_of_the_champion + + + scripts\northrend\crusaders_coliseum\trial_of_the_champion + scripts\northrend\crusaders_coliseum\trial_of_the_champion diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_argent_challenge.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_argent_challenge.cpp new file mode 100644 index 000000000..0522bdc02 --- /dev/null +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_argent_challenge.cpp @@ -0,0 +1,29 @@ +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information + * 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: argent_challenge +SD%Complete: 0 +SDComment: Placeholder +SDCategory: Crusader Coliseum, Trial of the Champion +EndScriptData */ + +#include "precompiled.h" +#include "trial_of_the_champion.h" + +void AddSC_boss_argent_challenge() +{ +} diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_black_knight.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_black_knight.cpp new file mode 100644 index 000000000..ae173794f --- /dev/null +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_black_knight.cpp @@ -0,0 +1,29 @@ +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information + * 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_black_knight +SD%Complete: 0 +SDComment: Placeholder +SDCategory: Crusader Coliseum, Trial of the Champion +EndScriptData */ + +#include "precompiled.h" +#include "trial_of_the_champion.h" + +void AddSC_boss_black_knight() +{ +} diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 6ba12136b..fbe1c3c1e 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3093" + #define SD2_REVISION_NR "3094" #endif // __SD2_REVISION_NR_H__ diff --git a/system/ScriptLoader.cpp b/system/ScriptLoader.cpp index bc46c1217..a6d38134e 100644 --- a/system/ScriptLoader.cpp +++ b/system/ScriptLoader.cpp @@ -246,9 +246,11 @@ extern void AddSC_boss_anubarak(); // azjol-nerub, azjo extern void AddSC_boss_hadronox(); extern void AddSC_boss_krikthir(); extern void AddSC_instance_azjol_nerub(); -extern void AddSC_trial_of_the_champion(); // CC, trial_of_the_champion +extern void AddSC_boss_argent_challenge(); // CC, trial_of_the_champion +extern void AddSC_boss_black_knight(); extern void AddSC_boss_grand_champions(); extern void AddSC_instance_trial_of_the_champion(); +extern void AddSC_trial_of_the_champion(); extern void AddSC_boss_anubarak_trial(); // CC, trial_of_the_crusader extern void AddSC_boss_faction_champions(); extern void AddSC_boss_jaraxxus(); @@ -709,7 +711,9 @@ void AddScripts() AddSC_boss_hadronox(); AddSC_boss_krikthir(); AddSC_instance_azjol_nerub(); - AddSC_boss_grand_champions(); // CC, trial_of_the_champion + AddSC_boss_argent_challenge(); // CC, trial_of_the_champion + AddSC_boss_black_knight(); + AddSC_boss_grand_champions(); AddSC_instance_trial_of_the_champion(); AddSC_trial_of_the_champion(); AddSC_boss_anubarak_trial(); // CC, trial_of_the_crusader From 86d08b9a0f41f9dba6cbef68ff48dc19f395745d Mon Sep 17 00:00:00 2001 From: cala Date: Mon, 2 Feb 2015 23:12:07 +0100 Subject: [PATCH 1108/1172] [3095] Add placeholder for Razorfen Downs instance Signed-off-by: Xfurry --- VC100/100ScriptDev2.vcxproj | 2 ++ VC100/100ScriptDev2.vcxproj.filters | 6 ++++ VC110/110ScriptDev2.vcxproj | 2 ++ VC110/110ScriptDev2.vcxproj.filters | 6 ++++ VC120/120ScriptDev2.vcxproj | 2 ++ VC120/120ScriptDev2.vcxproj.filters | 6 ++++ .../instance_razorfen_downs.cpp | 29 +++++++++++++++++++ .../kalimdor/razorfen_downs/razorfen_downs.h | 10 +++++++ sd2_revision_nr.h | 2 +- system/ScriptLoader.cpp | 6 ++-- 10 files changed, 68 insertions(+), 3 deletions(-) create mode 100644 scripts/kalimdor/razorfen_downs/instance_razorfen_downs.cpp create mode 100644 scripts/kalimdor/razorfen_downs/razorfen_downs.h diff --git a/VC100/100ScriptDev2.vcxproj b/VC100/100ScriptDev2.vcxproj index 2b5a29499..06854befb 100644 --- a/VC100/100ScriptDev2.vcxproj +++ b/VC100/100ScriptDev2.vcxproj @@ -397,6 +397,7 @@ + @@ -707,6 +708,7 @@ + diff --git a/VC100/100ScriptDev2.vcxproj.filters b/VC100/100ScriptDev2.vcxproj.filters index 3506fb5ac..325c42fc5 100644 --- a/VC100/100ScriptDev2.vcxproj.filters +++ b/VC100/100ScriptDev2.vcxproj.filters @@ -855,6 +855,9 @@ scripts\kalimdor\onyxias_lair + + scripts\kalimdor\razorfen_downs + scripts\kalimdor\razorfen_downs @@ -1758,6 +1761,9 @@ scripts\kalimdor\onyxias_lair + + scripts\kalimdor\razorfen_downs + scripts\kalimdor\razorfen_kraul diff --git a/VC110/110ScriptDev2.vcxproj b/VC110/110ScriptDev2.vcxproj index 899a70545..e463c02e2 100644 --- a/VC110/110ScriptDev2.vcxproj +++ b/VC110/110ScriptDev2.vcxproj @@ -404,6 +404,7 @@ + @@ -714,6 +715,7 @@ + diff --git a/VC110/110ScriptDev2.vcxproj.filters b/VC110/110ScriptDev2.vcxproj.filters index 3506fb5ac..325c42fc5 100644 --- a/VC110/110ScriptDev2.vcxproj.filters +++ b/VC110/110ScriptDev2.vcxproj.filters @@ -855,6 +855,9 @@ scripts\kalimdor\onyxias_lair + + scripts\kalimdor\razorfen_downs + scripts\kalimdor\razorfen_downs @@ -1758,6 +1761,9 @@ scripts\kalimdor\onyxias_lair + + scripts\kalimdor\razorfen_downs + scripts\kalimdor\razorfen_kraul diff --git a/VC120/120ScriptDev2.vcxproj b/VC120/120ScriptDev2.vcxproj index a5a16c002..843d5e86e 100644 --- a/VC120/120ScriptDev2.vcxproj +++ b/VC120/120ScriptDev2.vcxproj @@ -404,6 +404,7 @@ + @@ -714,6 +715,7 @@ + diff --git a/VC120/120ScriptDev2.vcxproj.filters b/VC120/120ScriptDev2.vcxproj.filters index 1a5e0df37..f4e19f89e 100644 --- a/VC120/120ScriptDev2.vcxproj.filters +++ b/VC120/120ScriptDev2.vcxproj.filters @@ -855,6 +855,9 @@ scripts\kalimdor\onyxias_lair + + scripts\kalimdor\razorfen_downs + scripts\kalimdor\razorfen_downs @@ -1758,6 +1761,9 @@ scripts\kalimdor\onyxias_lair + + scripts\kalimdor\razorfen_downs + scripts\kalimdor\razorfen_kraul diff --git a/scripts/kalimdor/razorfen_downs/instance_razorfen_downs.cpp b/scripts/kalimdor/razorfen_downs/instance_razorfen_downs.cpp new file mode 100644 index 000000000..6ea6b6591 --- /dev/null +++ b/scripts/kalimdor/razorfen_downs/instance_razorfen_downs.cpp @@ -0,0 +1,29 @@ +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information + * 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: instance_razorfen_downs +SD%Complete: 0 +SDComment: Placeholder +SDCategory: Razorfen Downs +EndScriptData */ + +#include "precompiled.h" +#include "razorfen_downs.h" + +void AddSC_instance_razorfen_downs() +{ +} diff --git a/scripts/kalimdor/razorfen_downs/razorfen_downs.h b/scripts/kalimdor/razorfen_downs/razorfen_downs.h new file mode 100644 index 000000000..c4a823978 --- /dev/null +++ b/scripts/kalimdor/razorfen_downs/razorfen_downs.h @@ -0,0 +1,10 @@ +/* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information + * This program is free software licensed under GPL version 2 + * Please see the included DOCS/LICENSE.TXT for more information */ + +#ifndef DEF_RD_H +#define DEF_RD_H + + + +#endif diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index fbe1c3c1e..a2ad11a69 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3094" + #define SD2_REVISION_NR "3095" #endif // __SD2_REVISION_NR_H__ diff --git a/system/ScriptLoader.cpp b/system/ScriptLoader.cpp index a6d38134e..881688966 100644 --- a/system/ScriptLoader.cpp +++ b/system/ScriptLoader.cpp @@ -184,7 +184,8 @@ extern void AddSC_instance_dire_maul(); extern void AddSC_boss_noxxion(); // maraudon extern void AddSC_boss_onyxia(); // onyxias_lair extern void AddSC_instance_onyxias_lair(); -extern void AddSC_razorfen_downs(); // razorfen_downs +extern void AddSC_instance_razorfen_downs(); // razorfen_downs +extern void AddSC_razorfen_downs(); extern void AddSC_instance_razorfen_kraul(); // razorfen_kraul extern void AddSC_razorfen_kraul(); extern void AddSC_boss_ayamiss(); // ruins_of_ahnqiraj @@ -649,7 +650,8 @@ void AddScripts() AddSC_boss_noxxion(); // maraudon AddSC_boss_onyxia(); // onyxias_lair AddSC_instance_onyxias_lair(); - AddSC_razorfen_downs(); // razorfen_downs + AddSC_instance_razorfen_downs(); // razorfen_downs + AddSC_razorfen_downs(); AddSC_instance_razorfen_kraul(); // razorfen_kraul AddSC_razorfen_kraul(); AddSC_boss_ayamiss(); // ruins_of_ahnqiraj From 60d25551fa0320f18a6485c1211428cfeb4e6e7e Mon Sep 17 00:00:00 2001 From: cala Date: Tue, 3 Feb 2015 00:22:50 +0100 Subject: [PATCH 1109/1172] [3096] Implement summon event for Tuten'kash in Razorfen Downs Signed-off-by: Xfurry --- .../instance_razorfen_downs.cpp | 182 +++++++++++++++++- .../kalimdor/razorfen_downs/razorfen_downs.h | 70 ++++++- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 3 + sql/updates/r3096_mangos.sql | 3 + 5 files changed, 255 insertions(+), 5 deletions(-) create mode 100644 sql/updates/r3096_mangos.sql diff --git a/scripts/kalimdor/razorfen_downs/instance_razorfen_downs.cpp b/scripts/kalimdor/razorfen_downs/instance_razorfen_downs.cpp index 6ea6b6591..5dbca9e22 100644 --- a/scripts/kalimdor/razorfen_downs/instance_razorfen_downs.cpp +++ b/scripts/kalimdor/razorfen_downs/instance_razorfen_downs.cpp @@ -16,14 +16,192 @@ /* ScriptData SDName: instance_razorfen_downs -SD%Complete: 0 -SDComment: Placeholder +SD%Complete: 90% +SDComment: Spawns coords can be improved SDCategory: Razorfen Downs EndScriptData */ #include "precompiled.h" #include "razorfen_downs.h" +instance_razorfen_downs::instance_razorfen_downs(Map* pMap) : ScriptedInstance(pMap), + m_uiWaveCounter(0) +{ + Initialize(); +} + +void instance_razorfen_downs::Initialize() +{ + memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); +} + +void instance_razorfen_downs::OnCreatureCreate(Creature* pCreature) +{ + switch(pCreature->GetEntry()) + { + case NPC_TOMB_FIEND: + case NPC_TOMB_REAVER: + m_lSpawnedMobsList.push_back(pCreature->GetObjectGuid()); + return; + } +} + +void instance_razorfen_downs::OnObjectCreate(GameObject* pGo) +{ + if (pGo->GetEntry() == GO_GONG) + m_mGoEntryGuidStore[GO_GONG] = pGo->GetObjectGuid(); +} + +void instance_razorfen_downs::SetData(uint32 uiType, uint32 uiData) +{ + switch (uiType) + { + case TYPE_TUTEN_KASH: + m_auiEncounter[uiType] = uiData; + if (uiData == IN_PROGRESS) + ++m_uiWaveCounter; + break; + } + + if (uiData == DONE) + { + OUT_SAVE_INST_DATA; + + std::ostringstream saveStream; + + saveStream << m_auiEncounter[0]; + + m_strInstData = saveStream.str(); + SaveToDB(); + OUT_SAVE_INST_DATA_COMPLETE; + } +} + +uint32 instance_razorfen_downs::GetData(uint32 uiType) const +{ + if (uiType < MAX_ENCOUNTER) + return m_auiEncounter[uiType]; + + return 0; +} + +void instance_razorfen_downs::Load(const char* chrIn) +{ + if (!chrIn) + { + OUT_LOAD_INST_DATA_FAIL; + return; + } + + OUT_LOAD_INST_DATA(chrIn); + + std::istringstream loadStream(chrIn); + loadStream >> m_auiEncounter[0]; + + for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) + { + if (m_auiEncounter[i] == IN_PROGRESS) + m_auiEncounter[i] = NOT_STARTED; + } + + OUT_LOAD_INST_DATA_COMPLETE; +} + +void instance_razorfen_downs::OnCreatureDeath(Creature* pCreature) +{ + // Only use this function if gong event is in progress + if (GetData(TYPE_TUTEN_KASH) != IN_PROGRESS) + return; + + switch (pCreature->GetEntry()) + { + case NPC_TOMB_FIEND: + case NPC_TOMB_REAVER: + m_lSpawnedMobsList.remove(pCreature->GetObjectGuid()); + + // No more wave-mobs around, enable the gong for the next wave + if (m_lSpawnedMobsList.empty()) + { + if (GameObject* pGo = GetSingleGameObjectFromStorage(GO_GONG)) + { + pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NO_INTERACT); + + // Workaround - GO need to be respawned - requires core fix, GO shouldn't despawn in the first place + pGo->Respawn(); + } + } + break; + case NPC_TUTEN_KASH: + SetData(TYPE_TUTEN_KASH, DONE); + break; + } +} + +void instance_razorfen_downs::DoSpawnWaveIfCan(GameObject* pGo) +{ + // safety checks + if (GetData(TYPE_TUTEN_KASH) == DONE) + return; + + if (!m_lSpawnedMobsList.empty()) + return; + + if (m_uiWaveCounter >= MAX_WAVES) + return; + + for (uint8 i = 0; i < aWaveSummonInformation[m_uiWaveCounter].m_uiNPCperWave; ++i) + { + uint8 uiPos = i % 2; // alternate spawn between the left and right corridor + float fPosX, fPosY, fPosZ; + float fTargetPosX, fTargetPosY, fTargetPosZ; + + pGo->GetRandomPoint(aSpawnLocations[uiPos].m_fX, aSpawnLocations[uiPos].m_fY, aSpawnLocations[uiPos].m_fZ, 5.0f, fPosX, fPosY, fPosZ); + + // move the summoned NPC toward the gong + if (Creature* pSummoned = pGo->SummonCreature(aWaveSummonInformation[m_uiWaveCounter].m_uiNpcEntry, fPosX, fPosY, fPosZ, aSpawnLocations[uiPos].m_fO, TEMPSUMMON_DEAD_DESPAWN, 0)) + { + pSummoned->SetWalk(false); + pGo->GetContactPoint(pSummoned, fTargetPosX, fTargetPosY, fTargetPosZ); + pSummoned->GetMotionMaster()->MovePoint(0, fTargetPosX, fTargetPosY, fTargetPosZ); + } + } + + // Will increase m_uiWaveCounter, hence after the wave is summoned + SetData(TYPE_TUTEN_KASH, IN_PROGRESS); + pGo->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NO_INTERACT); +} + +InstanceData* GetInstanceData_instance_razorfen_downs(Map* pMap) +{ + return new instance_razorfen_downs(pMap); +} + +bool ProcessEventId_event_go_tutenkash_gong(uint32 /*uiEventId*/, Object* pSource, Object* pTarget, bool /*bIsStart*/) +{ + if (pSource->GetTypeId() == TYPEID_PLAYER && pTarget->GetTypeId() == TYPEID_GAMEOBJECT) + { + instance_razorfen_downs* pInstance = (instance_razorfen_downs*)((Player*)pSource)->GetInstanceData(); + if (!pInstance) + return true; + + pInstance->DoSpawnWaveIfCan((GameObject*)pTarget); + return true; + } + + return false; +} + void AddSC_instance_razorfen_downs() { + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "instance_razorfen_downs"; + pNewScript->GetInstanceData = &GetInstanceData_instance_razorfen_downs; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "event_go_tutenkash_gong"; + pNewScript->pProcessEventId = &ProcessEventId_event_go_tutenkash_gong; + pNewScript->RegisterSelf(); } diff --git a/scripts/kalimdor/razorfen_downs/razorfen_downs.h b/scripts/kalimdor/razorfen_downs/razorfen_downs.h index c4a823978..77fe4731e 100644 --- a/scripts/kalimdor/razorfen_downs/razorfen_downs.h +++ b/scripts/kalimdor/razorfen_downs/razorfen_downs.h @@ -2,9 +2,75 @@ * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ -#ifndef DEF_RD_H -#define DEF_RD_H +#ifndef DEF_RFD_H +#define DEF_RFD_H +enum +{ + MAX_ENCOUNTER = 1, + MAX_WAVES = 3, + MAX_COUNT_POS = 2, + TYPE_TUTEN_KASH = 0, + + NPC_TOMB_FIEND = 7349, + NPC_TOMB_REAVER = 7351, + NPC_TUTEN_KASH = 7355, + + GO_GONG = 148917, +}; + +struct Locations +{ + float m_fX, m_fY, m_fZ, m_fO; +}; + +static const Locations aSpawnLocations[MAX_COUNT_POS] = +{ + {2484.83f, 811.11f, 43.40f, 1.67f}, // Right corridor + {2546.03f, 902.77f, 47.16f, 5.04f}, // Left corridor +}; + +struct SummonInformation +{ + uint32 m_uiNpcEntry; + uint8 m_uiNPCperWave; +}; + +static const SummonInformation aWaveSummonInformation[] = +{ + {NPC_TOMB_FIEND, 8}, + {NPC_TOMB_REAVER, 4}, + {NPC_TUTEN_KASH, 1} +}; + +class instance_razorfen_downs : public ScriptedInstance +{ + public: + instance_razorfen_downs(Map* pMap); + ~instance_razorfen_downs() {} + + void Initialize() override; + + void OnCreatureCreate(Creature* pCreature) override; + void OnObjectCreate(GameObject* pGo) override; + void OnCreatureDeath(Creature* pCreature) override; + + void SetData(uint32 uiType, uint32 uiData) override; + uint32 GetData(uint32 uiType) const override; + + const char* Save() const override { return m_strInstData.c_str(); } + void Load(const char* chrIn) override; + + void DoSpawnWaveIfCan(GameObject* pGo); + + protected: + uint32 m_auiEncounter[MAX_ENCOUNTER]; + std::string m_strInstData; + + uint8 m_uiWaveCounter; + + GuidList m_lSpawnedMobsList; +}; #endif diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index a2ad11a69..814fa8734 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3095" + #define SD2_REVISION_NR "3096" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 70d4a5974..a8cd47964 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -995,7 +995,10 @@ UPDATE creature_template SET ScriptName='npc_thrall_warchief' WHERE entry=4949; /* RAGEFIRE CHASM */ /* RAZORFEN DOWNS */ +UPDATE instance_template SET ScriptName='instance_razorfen_downs' WHERE map=129; UPDATE creature_template SET ScriptName='npc_belnistrasz' WHERE entry=8516; +DELETE FROM scripted_event_id WHERE id=3130; +INSERT INTO scripted_event_id VALUES (3130, 'event_go_tutenkash_gong'); /* RAZORFEN KRAUL */ UPDATE instance_template SET ScriptName='instance_razorfen_kraul' WHERE map=47; diff --git a/sql/updates/r3096_mangos.sql b/sql/updates/r3096_mangos.sql new file mode 100644 index 000000000..ca2063e11 --- /dev/null +++ b/sql/updates/r3096_mangos.sql @@ -0,0 +1,3 @@ +UPDATE instance_template SET ScriptName='instance_razorfen_downs' WHERE map=129; +DELETE FROM scripted_event_id WHERE id=3130; +INSERT INTO scripted_event_id VALUES (3130, 'event_go_tutenkash_gong'); From 3a8d8e13d9d80c6be632ca08c1a78221251c513a Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Sat, 24 Jan 2015 14:40:16 +0100 Subject: [PATCH 1110/1172] [3097] Use WaypointMovement for Escort-Scripting. Requires CMaNGOS [12839] --- ScriptMgr.cpp | 11 ++ base/escort_ai.cpp | 260 ++++--------------------------- base/escort_ai.h | 33 +--- sd2_revision_nr.h | 2 +- sql/scriptdev2_script_full.sql | 2 +- sql/updates/r3097_scriptdev2.sql | 1 + system/system.cpp | 28 ++-- system/system.h | 37 ++--- 8 files changed, 72 insertions(+), 302 deletions(-) create mode 100644 sql/updates/r3097_scriptdev2.sql diff --git a/ScriptMgr.cpp b/ScriptMgr.cpp index 8394822ae..b6282dda9 100644 --- a/ScriptMgr.cpp +++ b/ScriptMgr.cpp @@ -37,6 +37,17 @@ void LoadDatabase() outstring_log("SD2: ScriptDev2 database initialized."); outstring_log(""); + // Extract DB-Name + std::string::size_type n = strSD2DBinfo.rfind(';'); + std::string dbname; + if (n != std::string::npos && n + 1 != std::string::npos) + dbname = strSD2DBinfo.substr(n + 1); + else + dbname = "SD2_Database"; + dbname.append(".script_waypoint"); + SetExternalWaypointTable(dbname.c_str()); + + // Load content pSystemMgr.LoadVersion(); pSystemMgr.LoadScriptTexts(); pSystemMgr.LoadScriptTextsCustom(); diff --git a/base/escort_ai.cpp b/base/escort_ai.cpp index cbd83604b..d34a3c57b 100644 --- a/base/escort_ai.cpp +++ b/base/escort_ai.cpp @@ -15,14 +15,7 @@ EndScriptData */ const float MAX_PLAYER_DISTANCE = 66.0f; -enum -{ - POINT_LAST_POINT = 0xFFFFFF, - POINT_HOME = 0xFFFFFE -}; - npc_escortAI::npc_escortAI(Creature* pCreature) : ScriptedAI(pCreature), - m_uiWPWaitTimer(2500), m_uiPlayerCheckTimer(1000), m_uiEscortState(STATE_ESCORT_NONE), m_pQuestForEscort(NULL), @@ -43,10 +36,8 @@ void npc_escortAI::GetAIInformation(ChatHandler& reader) if (HasEscortState(STATE_ESCORT_ESCORTING)) { - oss << "\nEscortFlags: Escorting" << (HasEscortState(STATE_ESCORT_RETURNING) ? ", Returning" : "") << (HasEscortState(STATE_ESCORT_PAUSED) ? ", Paused" : ""); - - if (CurrentWP != WaypointList.end()) - oss << "\nNext Waypoint Id = " << CurrentWP->uiId << " Position: " << CurrentWP->fX << " " << CurrentWP->fY << " " << CurrentWP->fZ; + oss << "\nEscortFlags: Escorting" << (HasEscortState(STATE_ESCORT_RETURNING) ? ", Returning" : "") << (HasEscortState(STATE_ESCORT_PAUSED) ? ", Paused" : "") << "\n"; + m_creature->GetMotionMaster()->GetWaypointPathInformation(oss); } reader.PSendSysMessage(oss.str().c_str()); @@ -60,36 +51,6 @@ bool npc_escortAI::IsVisible(Unit* pWho) const return m_creature->IsWithinDist(pWho, VISIBLE_RANGE) && pWho->isVisibleForOrDetect(m_creature, m_creature, true); } -void npc_escortAI::AttackStart(Unit* pWho) -{ - if (!pWho) - return; - - if (m_creature->Attack(pWho, true)) - { - m_creature->AddThreat(pWho); - m_creature->SetInCombatWith(pWho); - pWho->SetInCombatWith(m_creature); - - if (m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() == POINT_MOTION_TYPE) - m_creature->GetMotionMaster()->MovementExpired(); - - if (IsCombatMovement()) - m_creature->GetMotionMaster()->MoveChase(pWho); - } -} - -void npc_escortAI::EnterCombat(Unit* pEnemy) -{ - // Store combat start position - m_creature->SetCombatStartPosition(m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ()); - - if (!pEnemy) - return; - - Aggro(pEnemy); -} - void npc_escortAI::Aggro(Unit* /*pEnemy*/) {} // see followerAI @@ -201,36 +162,6 @@ void npc_escortAI::JustRespawned() if (!IsCombatMovement()) SetCombatMovement(true); - // add a small delay before going to first waypoint, normal in near all cases - m_uiWPWaitTimer = 2500; - - Reset(); -} - -void npc_escortAI::EnterEvadeMode() -{ - m_creature->RemoveAllAurasOnEvade(); - m_creature->DeleteThreatList(); - m_creature->CombatStop(true); - m_creature->SetLootRecipient(NULL); - - if (HasEscortState(STATE_ESCORT_ESCORTING)) - { - // We have left our path - if (m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() != POINT_MOTION_TYPE) - { - debug_log("SD2: EscortAI has left combat and is now returning to CombatStartPosition."); - - AddEscortState(STATE_ESCORT_RETURNING); - - float fPosX, fPosY, fPosZ; - m_creature->GetCombatStartPosition(fPosX, fPosY, fPosZ); - m_creature->GetMotionMaster()->MovePoint(POINT_LAST_POINT, fPosX, fPosY, fPosZ); - } - } - else - m_creature->GetMotionMaster()->MoveTargetedHome(); - Reset(); } @@ -256,66 +187,8 @@ bool npc_escortAI::IsPlayerOrGroupInRange() return false; } -// Returns false, if npc is despawned -bool npc_escortAI::MoveToNextWaypoint() -{ - // Do nothing if escorting is paused - if (HasEscortState(STATE_ESCORT_PAUSED)) - return true; - - // Final Waypoint reached (and final wait time waited) - if (CurrentWP == WaypointList.end()) - { - debug_log("SD2: EscortAI reached end of waypoints"); - - if (m_bCanReturnToStart) - { - float fRetX, fRetY, fRetZ; - m_creature->GetRespawnCoord(fRetX, fRetY, fRetZ); - - m_creature->GetMotionMaster()->MovePoint(POINT_HOME, fRetX, fRetY, fRetZ); - - m_uiWPWaitTimer = 0; - - debug_log("SD2: EscortAI are returning home to spawn location: %u, %f, %f, %f", POINT_HOME, fRetX, fRetY, fRetZ); - return true; - } - - if (m_bCanInstantRespawn) - { - m_creature->SetDeathState(JUST_DIED); - m_creature->Respawn(); - } - else - m_creature->ForcedDespawn(); - - return false; - } - - m_creature->GetMotionMaster()->MovePoint(CurrentWP->uiId, CurrentWP->fX, CurrentWP->fY, CurrentWP->fZ); - debug_log("SD2: EscortAI start waypoint %u (%f, %f, %f).", CurrentWP->uiId, CurrentWP->fX, CurrentWP->fY, CurrentWP->fZ); - - WaypointStart(CurrentWP->uiId); - - m_uiWPWaitTimer = 0; - - return true; -} - void npc_escortAI::UpdateAI(const uint32 uiDiff) { - // Waypoint Updating - if (HasEscortState(STATE_ESCORT_ESCORTING) && !m_creature->getVictim() && m_uiWPWaitTimer && !HasEscortState(STATE_ESCORT_RETURNING)) - { - if (m_uiWPWaitTimer <= uiDiff) - { - if (!MoveToNextWaypoint()) - return; - } - else - m_uiWPWaitTimer -= uiDiff; - } - // Check if player or any member of his group is within range if (HasEscortState(STATE_ESCORT_ESCORTING) && m_playerGuid && !m_creature->getVictim() && !HasEscortState(STATE_ESCORT_RETURNING)) { @@ -356,107 +229,40 @@ void npc_escortAI::UpdateEscortAI(const uint32 /*uiDiff*/) void npc_escortAI::MovementInform(uint32 uiMoveType, uint32 uiPointId) { - if (uiMoveType != POINT_MOTION_TYPE || !HasEscortState(STATE_ESCORT_ESCORTING)) + if (uiMoveType < EXTERNAL_WAYPOINT_MOVE || !HasEscortState(STATE_ESCORT_ESCORTING)) return; - // Combat start position reached, continue waypoint movement - if (uiPointId == POINT_LAST_POINT) - { - debug_log("SD2: EscortAI has returned to original position before combat"); + //uint32 pathId = uiMoveType & 0xFF; - m_creature->SetWalk(!m_bIsRunning); - RemoveEscortState(STATE_ESCORT_RETURNING); - } - else if (uiPointId == POINT_HOME) + if (uiMoveType < EXTERNAL_WAYPOINT_MOVE_START) + WaypointReached(uiPointId); + else if (uiMoveType < EXTERNAL_WAYPOINT_FINISHED_LAST) + WaypointStart(uiPointId); + else // Last WP Reached { - debug_log("SD2: EscortAI has returned to original home location and will continue from beginning of waypoint list."); - - CurrentWP = WaypointList.begin(); - m_uiWPWaitTimer = 0; - } - else - { - // Make sure that we are still on the right waypoint - if (CurrentWP->uiId != uiPointId) + if (m_bCanInstantRespawn) { - script_error_log("EscortAI for Npc %u reached waypoint out of order %u, expected %u.", m_creature->GetEntry(), uiPointId, CurrentWP->uiId); - return; + m_creature->SetDeathState(JUST_DIED); + m_creature->Respawn(); } - - debug_log("SD2: EscortAI waypoint %u reached.", CurrentWP->uiId); - - // In case we were moving while in combat, we should evade back to this position - m_creature->SetCombatStartPosition(m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ()); - - // Call WP function - WaypointReached(CurrentWP->uiId); - - m_uiWPWaitTimer = CurrentWP->uiWaitTime; - - ++CurrentWP; - } - - if (!m_uiWPWaitTimer) - { - // Continue WP Movement if Can - if (HasEscortState(STATE_ESCORT_ESCORTING) && !HasEscortState(STATE_ESCORT_PAUSED | STATE_ESCORT_RETURNING) && !m_creature->getVictim()) - MoveToNextWaypoint(); else - m_uiWPWaitTimer = 1; - } -} - -/*void npc_escortAI::AddWaypoint(uint32 id, float x, float y, float z, uint32 WaitTimeMs) -{ - Escort_Waypoint t(id, x, y, z, WaitTimeMs); - - WaypointList.push_back(t); -}*/ - -void npc_escortAI::FillPointMovementListForCreature() -{ - std::vector const& pPointsEntries = pSystemMgr.GetPointMoveList(m_creature->GetEntry()); - - if (pPointsEntries.empty()) - return; - - std::vector::const_iterator itr; - - for (itr = pPointsEntries.begin(); itr != pPointsEntries.end(); ++itr) - { - Escort_Waypoint pPoint(itr->uiPointId, itr->fX, itr->fY, itr->fZ, itr->uiWaitTime); - WaypointList.push_back(pPoint); + m_creature->ForcedDespawn(); } } void npc_escortAI::SetCurrentWaypoint(uint32 uiPointId) { if (!(HasEscortState(STATE_ESCORT_PAUSED))) // Only when paused - return; - - if (uiPointId == CurrentWP->uiId) // Already here - return; - - bool bFoundWaypoint = false; - for (std::list::iterator itr = WaypointList.begin(); itr != WaypointList.end(); ++itr) { - if (itr->uiId == uiPointId) - { - CurrentWP = itr; // Set to found itr - bFoundWaypoint = true; - break; - } + script_error_log("EscortAI for %s tried to set new waypoint %u, but not paused", m_creature->GetGuidStr().c_str(), uiPointId); + return; } - if (!bFoundWaypoint) + if (!m_creature->GetMotionMaster()->SetNextWaypoint(uiPointId)) { - debug_log("SD2: EscortAI current waypoint tried to set to id %u, but doesn't exist in WaypointList", uiPointId); + script_error_log("EscortAI for %s current waypoint tried to set to id %u, but doesn't exist in this path", m_creature->GetGuidStr().c_str(), uiPointId); return; } - - m_uiWPWaitTimer = 1; - - debug_log("SD2: EscortAI current waypoint set to id %u", CurrentWP->uiId); } void npc_escortAI::SetRun(bool bRun) @@ -493,14 +299,9 @@ void npc_escortAI::Start(bool bRun, const Player* pPlayer, const Quest* pQuest, return; } - if (!WaypointList.empty()) - WaypointList.clear(); - - FillPointMovementListForCreature(); - - if (WaypointList.empty()) + if (!pSystemMgr.GetPathInfo(m_creature->GetEntry(), 1)) { - error_db_log("SD2: EscortAI Start with 0 waypoints (possible missing entry in script_waypoint)."); + script_error_log("EscortAI attempt to start escorting for %s, but has no waypints loaded", m_creature->GetGuidStr().c_str()); return; } @@ -516,24 +317,19 @@ void npc_escortAI::Start(bool bRun, const Player* pPlayer, const Quest* pQuest, if (m_bCanReturnToStart && m_bCanInstantRespawn) debug_log("SD2: EscortAI is set to return home after waypoint end and instant respawn at waypoint end. Creature will never despawn."); - if (m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() == WAYPOINT_MOTION_TYPE) - { - m_creature->GetMotionMaster()->MovementExpired(); - m_creature->GetMotionMaster()->MoveIdle(); - debug_log("SD2: EscortAI start with WAYPOINT_MOTION_TYPE, changed to MoveIdle."); - } - // disable npcflags m_creature->SetUInt32Value(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_NONE); - debug_log("SD2: EscortAI started with " SIZEFMTD " waypoints. Run = %d, PlayerGuid = %s", WaypointList.size(), m_bIsRunning, m_playerGuid.GetString().c_str()); - - CurrentWP = WaypointList.begin(); + AddEscortState(STATE_ESCORT_ESCORTING); // Set initial speed m_creature->SetWalk(!m_bIsRunning); - AddEscortState(STATE_ESCORT_ESCORTING); + m_creature->StopMoving(); + + // Start moving along the path with 2500ms delay + m_creature->GetMotionMaster()->Clear(false, true); + m_creature->GetMotionMaster()->MoveWaypoint(1, 3, 2500); JustStartedEscort(); } @@ -544,7 +340,13 @@ void npc_escortAI::SetEscortPaused(bool bPaused) return; if (bPaused) + { AddEscortState(STATE_ESCORT_PAUSED); + m_creature->addUnitState(UNIT_STAT_WAYPOINT_PAUSED); + } else + { RemoveEscortState(STATE_ESCORT_PAUSED); + m_creature->clearUnitState(UNIT_STAT_WAYPOINT_PAUSED); + } } diff --git a/base/escort_ai.h b/base/escort_ai.h index 8f346c7d1..a06b4e22f 100644 --- a/base/escort_ai.h +++ b/base/escort_ai.h @@ -8,23 +8,6 @@ // Remove this include, when EscortAI stores uint32 quest-id instead of Quest* #include "ObjectMgr.h" -struct Escort_Waypoint -{ - Escort_Waypoint(uint32 uiId, float fX, float fY, float fZ, uint32 uiWaitTime) : - uiId(uiId), - fX(fX), - fY(fY), - fZ(fZ), - uiWaitTime(uiWaitTime) - {} - - uint32 uiId; - float fX; - float fY; - float fZ; - uint32 uiWaitTime; -}; - enum EscortState { STATE_ESCORT_NONE = 0x000, // nothing in progress @@ -48,26 +31,17 @@ struct npc_escortAI : public ScriptedAI // CreatureAI functions bool IsVisible(Unit*) const override; - void AttackStart(Unit*) override; - - void EnterCombat(Unit*) override; - void MoveInLineOfSight(Unit*) override; void JustDied(Unit*) override; void JustRespawned() override; - void EnterEvadeMode() override; - void UpdateAI(const uint32) override; // the "internal" update, calls UpdateEscortAI() virtual void UpdateEscortAI(const uint32); // used when it's needed to add code in update (abilities, scripted events, etc) void MovementInform(uint32, uint32) override; - // EscortAI functions - // void AddWaypoint(uint32 id, float x, float y, float z, uint32 WaitTimeMs = 0); - virtual void WaypointReached(uint32 uiPointId) = 0; virtual void WaypointStart(uint32 /*uiPointId*/) {} @@ -88,24 +62,19 @@ struct npc_escortAI : public ScriptedAI private: bool AssistPlayerInCombat(Unit* pWho); bool IsPlayerOrGroupInRange(); - bool MoveToNextWaypoint(); - void FillPointMovementListForCreature(); void AddEscortState(uint32 uiEscortState) { m_uiEscortState |= uiEscortState; } void RemoveEscortState(uint32 uiEscortState) { m_uiEscortState &= ~uiEscortState; } ObjectGuid m_playerGuid; - uint32 m_uiWPWaitTimer; uint32 m_uiPlayerCheckTimer; uint32 m_uiEscortState; const Quest* m_pQuestForEscort; // generally passed in Start() when regular escort script. - std::list WaypointList; - std::list::iterator CurrentWP; - bool m_bIsRunning; // all creatures are walking by default (has flag SPLINEFLAG_WALKMODE) bool m_bCanInstantRespawn; // if creature should respawn instantly after escort over (if not, database respawntime are used) bool m_bCanReturnToStart; // if creature can walk same path (loop) without despawn. Not for regular escort quests. }; + #endif diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 814fa8734..85d4e3586 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3096" + #define SD2_REVISION_NR "3097" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 8554ab7b1..8f9855632 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -3,7 +3,7 @@ -- DELETE FROM sd2_db_version; -INSERT INTO sd2_db_version (version) VALUES ('ScriptDev2 (for CMaNGOS 12807+) '); +INSERT INTO sd2_db_version (version) VALUES ('ScriptDev2 (for CMaNGOS 12839+) '); -- -- Below contains data for table `script_texts` mainly used in C++ parts. diff --git a/sql/updates/r3097_scriptdev2.sql b/sql/updates/r3097_scriptdev2.sql new file mode 100644 index 000000000..543f094d8 --- /dev/null +++ b/sql/updates/r3097_scriptdev2.sql @@ -0,0 +1 @@ +UPDATE sd2_db_version SET version='ScriptDev2 (for CMaNGOS 12839+) '; diff --git a/system/system.cpp b/system/system.cpp index 9e81af7fa..8ee414648 100644 --- a/system/system.cpp +++ b/system/system.cpp @@ -68,9 +68,6 @@ void SystemMgr::LoadScriptGossipTexts() void SystemMgr::LoadScriptWaypoints() { - // Drop Existing Waypoint list - m_mPointMoveMap.clear(); - uint64 uiCreatureCount = 0; // Load Waypoints @@ -83,7 +80,7 @@ void SystemMgr::LoadScriptWaypoints() outstring_log("SD2: Loading Script Waypoints for " UI64FMTD " creature(s)...", uiCreatureCount); - pResult = SD2Database.PQuery("SELECT entry, pointid, location_x, location_y, location_z, waittime FROM script_waypoint ORDER BY pointid"); + pResult = SD2Database.PQuery("SELECT entry, pointid, location_x, location_y, location_z, waittime FROM script_waypoint ORDER BY entry, pointid"); if (pResult) { @@ -94,28 +91,23 @@ void SystemMgr::LoadScriptWaypoints() { bar.step(); Field* pFields = pResult->Fetch(); - ScriptPointMove pTemp; - - pTemp.uiCreatureEntry = pFields[0].GetUInt32(); - uint32 uiEntry = pTemp.uiCreatureEntry; - pTemp.uiPointId = pFields[1].GetUInt32(); - pTemp.fX = pFields[2].GetFloat(); - pTemp.fY = pFields[3].GetFloat(); - pTemp.fZ = pFields[4].GetFloat(); - pTemp.uiWaitTime = pFields[5].GetUInt32(); - CreatureInfo const* pCInfo = GetCreatureTemplateStore(pTemp.uiCreatureEntry); + uint32 uiEntry = pFields[0].GetUInt32(); + int32 pathId = 1; // pFields[X].GetInt32(); + uint32 pointId = pFields[1].GetUInt32(); + uint32 delay = pFields[5].GetUInt32(); + CreatureInfo const* pCInfo = GetCreatureTemplateStore(uiEntry); if (!pCInfo) { - error_db_log("SD2: DB table script_waypoint has waypoint for nonexistent creature entry %u", pTemp.uiCreatureEntry); + error_db_log("SD2: DB table script_waypoint has waypoint for nonexistent creature entry %u", uiEntry); continue; } - if (!pCInfo->ScriptID) - error_db_log("SD2: DB table script_waypoint has waypoint for creature entry %u, but creature does not have ScriptName defined and then useless.", pTemp.uiCreatureEntry); - m_mPointMoveMap[uiEntry].push_back(pTemp); + if (AddWaypointFromExternal(uiEntry, pathId, pointId, pFields[2].GetFloat(), pFields[3].GetFloat(), pFields[4].GetFloat(), 100, delay)) + m_pathInfo[uiEntry][pathId].lastWaypoint = pointId; + ++uiNodeCount; } while (pResult->NextRow()); diff --git a/system/system.h b/system/system.h index f1eac0f5b..6cd1ea57b 100644 --- a/system/system.h +++ b/system/system.h @@ -19,18 +19,13 @@ extern std::string strSD2Version; // version info: dat #define TEXT_SOURCE_GOSSIP_START TEXT_SOURCE_RANGE*3 #define TEXT_SOURCE_GOSSIP_END TEXT_SOURCE_RANGE*4 + 1 -struct ScriptPointMove +#define pSystemMgr SystemMgr::Instance() + +struct PathInformation { - uint32 uiCreatureEntry; - uint32 uiPointId; - float fX; - float fY; - float fZ; - uint32 uiWaitTime; + uint32 lastWaypoint; }; -#define pSystemMgr SystemMgr::Instance() - class SystemMgr { public: @@ -39,7 +34,7 @@ class SystemMgr static SystemMgr& Instance(); - typedef UNORDERED_MAP > PointMoveMap; + typedef std::map > EntryPathInfo; // Database void LoadVersion(); @@ -48,20 +43,20 @@ class SystemMgr void LoadScriptGossipTexts(); void LoadScriptWaypoints(); - std::vector const& GetPointMoveList(uint32 uiCreatureEntry) const + PathInformation const* GetPathInfo(uint32 entry, int32 pathId) const { - static std::vector vEmpty; - - PointMoveMap::const_iterator itr = m_mPointMoveMap.find(uiCreatureEntry); - - if (itr == m_mPointMoveMap.end()) - return vEmpty; - - return itr->second; + EntryPathInfo::const_iterator findEntry = m_pathInfo.find(entry); + if (findEntry == m_pathInfo.end()) + return NULL; + std::map::const_iterator findPath = findEntry->second.find(pathId); + if (findPath == findEntry->second.end()) + return NULL; + + return &(findPath->second); } - protected: - PointMoveMap m_mPointMoveMap; // coordinates for waypoints + private: + EntryPathInfo m_pathInfo; }; #endif From 4d59c3fc2a6cf8e89f2cea66ab547777f94ed0c2 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Wed, 4 Feb 2015 23:51:54 +0100 Subject: [PATCH 1111/1172] [3098] Implement spawn support for the Argent Champions - ToC5 --- .../boss_argent_challenge.cpp | 167 +++++++++++++++++- .../boss_grand_champions.cpp | 2 + .../instance_trial_of_the_champion.cpp | 84 +++++++++ .../trial_of_the_champion.cpp | 2 +- .../trial_of_the_champion.h | 25 +++ sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 2 + sql/updates/r3098_mangos.sql | 2 + 8 files changed, 282 insertions(+), 4 deletions(-) create mode 100644 sql/updates/r3098_mangos.sql diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_argent_challenge.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_argent_challenge.cpp index 0522bdc02..5118ae23c 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_argent_challenge.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_argent_challenge.cpp @@ -16,14 +16,177 @@ /* ScriptData SDName: argent_challenge -SD%Complete: 0 -SDComment: Placeholder +SD%Complete: 20 +SDComment: Basic support SDCategory: Crusader Coliseum, Trial of the Champion EndScriptData */ #include "precompiled.h" #include "trial_of_the_champion.h" +enum +{ + FACTION_CHAMPION_FRIENDLY = 35, +}; + +/*###### +## argent_companion_common +######*/ + +struct argent_champion_commonAI : public ScriptedAI +{ + argent_champion_commonAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (instance_trial_of_the_champion*)pCreature->GetInstanceData(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); + Reset(); + } + + instance_trial_of_the_champion* m_pInstance; + bool m_bIsRegularMode; + + bool m_bDefeated; + + void Reset() override + { + m_bDefeated = false; + } + + void Aggro(Unit* /*pWho*/) override + { + if (m_pInstance) + m_pInstance->SetData(TYPE_ARGENT_CHAMPION, IN_PROGRESS); + } + + void JustReachedHome() override + { + if (m_pInstance) + m_pInstance->SetData(TYPE_ARGENT_CHAMPION, FAIL); + } + + void DamageTaken(Unit* /*pDealer*/, uint32& uiDamage) override + { + if (uiDamage >= m_creature->GetHealth()) + { + uiDamage = 0; + + if (m_bDefeated) + return; + + m_creature->SetFactionTemporary(FACTION_CHAMPION_FRIENDLY, TEMPFACTION_NONE); + EnterEvadeMode(); + + // ToDo: start the encounter complete event + + if (m_pInstance) + m_pInstance->SetData(TYPE_ARGENT_CHAMPION, DONE); + + m_bDefeated = true; + } + } + + void MovementInform(uint32 uiMotionType, uint32 uiPointId) override + { + if (uiMotionType != POINT_MOTION_TYPE || uiPointId != POINT_ID_CENTER) + return; + + m_creature->SetRespawnCoord(m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), m_creature->GetOrientation()); + } + + void SummonedMovementInform(Creature* pSummoned, uint32 uiMotionType, uint32 uiPointId) override + { + if (uiMotionType != POINT_MOTION_TYPE || uiPointId != POINT_ID_CENTER) + return; + + pSummoned->SetRespawnCoord(pSummoned->GetPositionX(), pSummoned->GetPositionY(), pSummoned->GetPositionZ(), pSummoned->GetOrientation()); + } + + // Return true to handle shared timers and MeleeAttack + virtual bool UpdateChampionAI(const uint32 /*uiDiff*/) { return true; } + + void UpdateAI(const uint32 uiDiff) override + { + // Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + // Call specific virtual function + if (!UpdateChampionAI(uiDiff)) + return; + + DoMeleeAttackIfReady(); + } +}; + +enum +{ + SPELL_KILL_CREDIT_EADRIC = 68575, +}; + +/*###### +## boss_eadric +######*/ + +struct boss_eadricAI : public argent_champion_commonAI +{ + boss_eadricAI(Creature* pCreature) : argent_champion_commonAI(pCreature) { Reset(); } + + void Reset() override + { + argent_champion_commonAI::Reset(); + } + + bool UpdateCompanionAI(const uint32 uiDiff) + { + return true; + } +}; + +CreatureAI* GetAI_boss_eadric(Creature* pCreature) +{ + return new boss_eadricAI(pCreature); +} + +enum +{ + SPELL_KILL_CREDIT_PALETRESS = 68574, +}; + +/*###### +## boss_paletress +######*/ + +struct boss_paletressAI : public argent_champion_commonAI +{ + boss_paletressAI(Creature* pCreature) : argent_champion_commonAI(pCreature) { Reset(); } + + void Reset() override + { + argent_champion_commonAI::Reset(); + } + + bool UpdateCompanionAI(const uint32 uiDiff) + { + return true; + } +}; + +CreatureAI* GetAI_boss_paletress(Creature* pCreature) +{ + return new boss_paletressAI(pCreature); +} + void AddSC_boss_argent_challenge() { + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_eadric"; + pNewScript->GetAI = &GetAI_boss_eadric; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "boss_paletress"; + pNewScript->GetAI = &GetAI_boss_paletress; + pNewScript->RegisterSelf(); } diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_grand_champions.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_grand_champions.cpp index 0ee8ec388..664b11fed 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_grand_champions.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_grand_champions.cpp @@ -29,6 +29,7 @@ enum { // common spells SPELL_DEFEND_DUMMY = 64101, // triggers 62719, 64192 + SPELL_KILL_CREDIT = 68572, // achiev check spell SPELL_SHIELD_BREAKER = 68504, SPELL_CHARGE = 68301, // triggers 68307 @@ -135,6 +136,7 @@ struct trial_companion_commonAI : public ScriptedAI // second part of the champions challenge if (m_pInstance->GetData(TYPE_ARENA_CHALLENGE) == DONE) { + m_creature->InterruptNonMeleeSpells(false); m_creature->SetStandState(UNIT_STAND_STATE_KNEEL); m_creature->SetHealth(1); diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/instance_trial_of_the_champion.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/instance_trial_of_the_champion.cpp index 66089106e..b41ce5f60 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/instance_trial_of_the_champion.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/instance_trial_of_the_champion.cpp @@ -87,6 +87,10 @@ enum // Arena event spells - not used for the moment // SPELL_SPECTATOR_FORCE_CHANT = 66354, // SPELL_SPECTATOR_FX_CHANT = 66677, + SPELL_SPECTATOR_FORCE_CHEER = 66384, + SPELL_SPECTATOR_FORCE_CHEER_2 = 66385, + + FACTION_CHAMPION_HOSTILE = 16, }; static const DialogueEntryTwoSide aTocDialogues[] = @@ -100,6 +104,12 @@ static const DialogueEntryTwoSide aTocDialogues[] = // Grand Champions complete {NPC_ARELAS_BRIGHTSTAR, 0, 0, 0, 7000}, {SAY_TIRION_ARGENT_CHAMPION, NPC_TIRION_FORDRING, 0, 0, 0}, + // Argent challenge intro + {TYPE_ARGENT_CHAMPION, 0, 0, 0, 6000}, + {NPC_JAEREN_SUNSWORN, 0, 0, 0, 4000}, + {NPC_EADRIC, 0, 0, 0, 6000}, + {NPC_PALETRESS, 0, 0, 0, 17000}, + {SAY_TIRION_ARGENT_CHAMPION_BEGIN, NPC_TIRION_FORDRING, 0, 0, 0}, {0, 0, 0, 0, 0} }; @@ -235,6 +245,11 @@ void instance_trial_of_the_champion::OnCreatureCreate(Creature* pCreature) case NPC_BATTLEWORG_HORDE: m_lArenaMountsGuids.push_back(pCreature->GetObjectGuid()); return; + case NPC_ARGENT_LIGHTWIELDER: + case NPC_ARGENT_MONK: + case NPC_ARGENT_PRIESTESS: + m_lArgentTrashGuids.push_back(pCreature->GetObjectGuid()); + return; default: return; } @@ -293,6 +308,7 @@ void instance_trial_of_the_champion::SetData(uint32 uiType, uint32 uiData) break; case TYPE_ARGENT_CHAMPION: m_auiEncounter[uiType] = uiData; + DoUseDoorOrButton(GO_NORTH_GATE); if (uiData == DONE) { if (m_uiGrandChampionEntry == NPC_EADRIC) @@ -416,6 +432,21 @@ void instance_trial_of_the_champion::OnCreatureDeath(Creature* pCreature) } } break; + case NPC_ARGENT_LIGHTWIELDER: + case NPC_ARGENT_MONK: + case NPC_ARGENT_PRIESTESS: + m_lArgentTrashGuids.remove(pCreature->GetObjectGuid()); + + // when trash is cleaned, make the champion hostile + if (m_lArgentTrashGuids.empty()) + { + if (Creature* pChampion = GetSingleCreatureFromStorage(m_uiGrandChampionEntry)) + { + pChampion->SetFactionTemporary(FACTION_CHAMPION_HOSTILE, TEMPFACTION_NONE); + pChampion->GetMotionMaster()->MovePoint(0, 746.630f, 636.570f, 411.572f); + } + } + break; } } @@ -724,6 +755,59 @@ void instance_trial_of_the_champion::JustDidDialogueStep(int32 iEntry) m_uiIntroStage = 0; m_uiIntroTimer = 1000; break; + + // start argent challenge + case TYPE_ARGENT_CHAMPION: + if (Creature* pHerald = GetSingleCreatureFromStorage(m_uiHeraldEntry)) + { + if (Creature* pTirion = GetSingleCreatureFromStorage(NPC_TIRION_FORDRING)) + pHerald->SetFacingToObject(pTirion); + + DoScriptText(m_uiGrandChampionEntry == NPC_EADRIC ? SAY_HERALD_EADRIC : SAY_HERALD_PALETRESS, pHerald); + + DoUseDoorOrButton(GO_MAIN_GATE); + m_uiGateResetTimer = 10000; // ToDo: set this as door reset timer when fixed in core + + // summon the selected champion + if (Creature* pChampion = pHerald->SummonCreature(m_uiGrandChampionEntry, aArgentChallengeHelpers[9].fX, aArgentChallengeHelpers[9].fY, aArgentChallengeHelpers[9].fZ, aArgentChallengeHelpers[9].fO, TEMPSUMMON_DEAD_DESPAWN, 0)) + { + for (uint8 i = 0; i < MAX_ARGENT_TRASH; ++i) + { + if (Creature* pHelper = pChampion->SummonCreature(aArgentChallengeHelpers[i].uiEntry, aArgentChallengeHelpers[i].fX, aArgentChallengeHelpers[i].fY, aArgentChallengeHelpers[i].fZ, aArgentChallengeHelpers[i].fO, TEMPSUMMON_DEAD_DESPAWN, 0)) + pHelper->GetMotionMaster()->MovePoint(POINT_ID_CENTER, aArgentChallengeHelpers[i].fTargetX, aArgentChallengeHelpers[i].fTargetY, aArgentChallengeHelpers[i].fTargetZ); + } + + pChampion->CastSpell(pChampion, SPELL_SPECTATOR_FORCE_CHEER, true); + pChampion->CastSpell(pChampion, SPELL_SPECTATOR_FORCE_CHEER_2, true); + } + } + break; + case NPC_JAEREN_SUNSWORN: + if (Creature* pChampion = GetSingleCreatureFromStorage(m_uiGrandChampionEntry)) + pChampion->GetMotionMaster()->MovePoint(POINT_ID_CENTER, aArgentChallengeHelpers[9].fTargetX, aArgentChallengeHelpers[9].fTargetY, aArgentChallengeHelpers[9].fTargetZ); + break; + case NPC_EADRIC: + if (Creature* pChampion = GetSingleCreatureFromStorage(m_uiGrandChampionEntry)) + DoScriptText(m_uiGrandChampionEntry == NPC_EADRIC ? SAY_EADRIC_INTRO : SAY_PALETRESS_INTRO_1, pChampion); + + // move the herald to the gate + if (Creature* pHerald = GetSingleCreatureFromStorage(m_uiHeraldEntry)) + pHerald->GetMotionMaster()->MovePoint(0, aHeraldPositions[1][0], aHeraldPositions[1][1], aHeraldPositions[1][2]); + break; + case NPC_PALETRESS: + if (m_uiGrandChampionEntry == NPC_PALETRESS) + { + if (Creature* pChampion = GetSingleCreatureFromStorage(m_uiGrandChampionEntry)) + DoScriptText(SAY_PALETRESS_INTRO_2, pChampion); + } + break; + case SAY_TIRION_ARGENT_CHAMPION_BEGIN: + if (Creature* pHerald = GetSingleCreatureFromStorage(m_uiHeraldEntry)) + { + if (Creature* pTirion = GetSingleCreatureFromStorage(NPC_TIRION_FORDRING)) + pHerald->SetFacingToObject(pTirion); + } + break; } } diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.cpp index bf5385dcb..92f01ea51 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.cpp @@ -80,7 +80,7 @@ bool GossipSelect_npc_toc_herald(Player* pPlayer, Creature* pCreature, uint32 /* pInstance->DoPrepareChampions(true); break; case GOSSIP_ACTION_INFO_DEF+3: - pInstance->SetData(TYPE_ARGENT_CHAMPION, SPECIAL); + pInstance->DoPrepareArgentChallenge(); break; case GOSSIP_ACTION_INFO_DEF+4: pInstance->SetData(TYPE_BLACK_KNIGHT, SPECIAL); diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.h b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.h index f995bd707..1efbb27a6 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.h +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.h @@ -11,6 +11,7 @@ enum MAX_CHAMPIONS_AVAILABLE = 5, MAX_CHAMPIONS_ARENA = 3, MAX_CHAMPIONS_MOUNTS = 24, + MAX_ARGENT_TRASH = 9, TYPE_GRAND_CHAMPIONS = 0, TYPE_ARGENT_CHAMPION = 1, @@ -240,6 +241,27 @@ static const ChampionsMountsData aTrialChampionsMounts[MAX_CHAMPIONS_MOUNTS] = {NPC_BATTLEWORG_ALLIANCE, NPC_BATTLEWORG_HORDE, 778.741f, 576.049f, 412.476f, 2.234f}, }; +struct ArgentChallengeData +{ + uint32 uiEntry; + float fX, fY, fZ, fO; + float fTargetX, fTargetY, fTargetZ; +}; + +static const ArgentChallengeData aArgentChallengeHelpers[MAX_ARGENT_TRASH + 1] = +{ + { NPC_ARGENT_LIGHTWIELDER, 747.043f, 686.513f, 412.459f, 4.694f, 746.685f, 653.093f, 411.604f }, + { NPC_ARGENT_LIGHTWIELDER, 755.377f, 685.247f, 412.445f, 4.683f, 777.107f, 649.010f, 411.930f }, + { NPC_ARGENT_LIGHTWIELDER, 738.848f, 686.317f, 412.454f, 4.664f, 717.998f, 649.100f, 411.924f }, + { NPC_ARGENT_MONK, 749.762f, 686.441f, 412.460f, 4.712f, 751.685f, 653.040f, 411.917f }, + { NPC_ARGENT_MONK, 758.222f, 679.841f, 412.366f, 4.698f, 780.140f, 645.455f, 411.932f }, + { NPC_ARGENT_MONK, 744.207f, 680.438f, 412.372f, 4.668f, 721.592f, 652.499f, 411.965f }, + { NPC_ARGENT_PRIESTESS, 744.604f, 686.418f, 412.460f, 4.677f, 741.686f, 653.147f, 411.910f }, + { NPC_ARGENT_PRIESTESS, 755.309f, 682.928f, 412.381f, 4.668f, 773.451f, 652.419f, 411.935f }, + { NPC_ARGENT_PRIESTESS, 738.919f, 685.132f, 412.379f, 4.694f, 715.080f, 645.947f, 411.957f }, + { TYPE_ARGENT_CHAMPION, 746.758f, 687.635f, 412.467f, 4.695f, 746.816f, 661.640f, 411.702f }, +}; + class instance_trial_of_the_champion : public ScriptedInstance, private DialogueHelper { public: @@ -268,6 +290,8 @@ class instance_trial_of_the_champion : public ScriptedInstance, private Dialogue void DoSendChampionsToExit(); void DoSetChamptionsInCombat(Unit* pTarget); + void DoPrepareArgentChallenge() { StartNextDialogueText(TYPE_ARGENT_CHAMPION); } + uint32 GetMountEntryForChampion() { return m_uiTeam == ALLIANCE ? NPC_BATTLEWORG_ALLIANCE : NPC_WARHORSE_HORDE; } bool IsArenaChallengeComplete(uint32 uiType); @@ -306,6 +330,7 @@ class instance_trial_of_the_champion : public ScriptedInstance, private Dialogue GuidVector m_vHordeTriggersGuids; GuidList m_lArenaMountsGuids; + GuidList m_lArgentTrashGuids; GuidSet m_sArenaHelpersGuids[MAX_CHAMPIONS_ARENA]; }; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 85d4e3586..db6045db6 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3097" + #define SD2_REVISION_NR "3098" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index a8cd47964..55c3d8933 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -492,6 +492,8 @@ UPDATE creature_template SET ScriptName='boss_champion_hunter' WHERE entry IN (3 UPDATE creature_template SET ScriptName='boss_champion_rogue' WHERE entry IN (34703,35617); UPDATE creature_template SET ScriptName='npc_champion_mount' WHERE entry IN (35644,36559,35637,35633,35768,34658,35636,35638,35635,35640,35641,35634); UPDATE creature_template SET ScriptName='npc_trial_grand_champion' WHERE entry IN (35328,35331,35330,35332,35329,35314,35326,35325,35323,35327); +UPDATE creature_template SET ScriptName='boss_eadric' WHERE entry=35119; +UPDATE creature_template SET ScriptName='boss_paletress' WHERE entry=34928; /* TRIAL OF THE CRUSADER */ UPDATE instance_template SET ScriptName='instance_trial_of_the_crusader' WHERE map=649; diff --git a/sql/updates/r3098_mangos.sql b/sql/updates/r3098_mangos.sql new file mode 100644 index 000000000..9edf536b8 --- /dev/null +++ b/sql/updates/r3098_mangos.sql @@ -0,0 +1,2 @@ +UPDATE creature_template SET ScriptName='boss_eadric' WHERE entry=35119; +UPDATE creature_template SET ScriptName='boss_paletress' WHERE entry=34928; From df365c157979437e318e38cf2561f46b68ba5cee Mon Sep 17 00:00:00 2001 From: Xfurry Date: Fri, 6 Feb 2015 01:49:52 +0100 Subject: [PATCH 1112/1172] [3099] Finalize the Argent Challenge encounter - ToC5 --- .../boss_argent_challenge.cpp | 253 ++++++++++++++---- .../instance_trial_of_the_champion.cpp | 81 +++++- .../trial_of_the_champion.h | 6 +- sd2_revision_nr.h | 2 +- sql/scriptdev2_script_full.sql | 17 +- sql/updates/r3099_scriptdev2.sql | 16 ++ 6 files changed, 318 insertions(+), 57 deletions(-) create mode 100644 sql/updates/r3099_scriptdev2.sql diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_argent_challenge.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_argent_challenge.cpp index 5118ae23c..100b413a3 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_argent_challenge.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_argent_challenge.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: argent_challenge -SD%Complete: 20 -SDComment: Basic support +SD%Complete: 90 +SDComment: Achievement NYI. SDCategory: Crusader Coliseum, Trial of the Champion EndScriptData */ @@ -39,6 +39,7 @@ struct argent_champion_commonAI : public ScriptedAI { m_pInstance = (instance_trial_of_the_champion*)pCreature->GetInstanceData(); m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); + m_bDefeated = false; Reset(); } @@ -47,10 +48,7 @@ struct argent_champion_commonAI : public ScriptedAI bool m_bDefeated; - void Reset() override - { - m_bDefeated = false; - } + void Reset() override { } void Aggro(Unit* /*pWho*/) override { @@ -60,7 +58,7 @@ struct argent_champion_commonAI : public ScriptedAI void JustReachedHome() override { - if (m_pInstance) + if (m_pInstance && m_pInstance->GetData(TYPE_ARGENT_CHAMPION) != DONE) m_pInstance->SetData(TYPE_ARGENT_CHAMPION, FAIL); } @@ -73,54 +71,40 @@ struct argent_champion_commonAI : public ScriptedAI if (m_bDefeated) return; + if (m_pInstance) + m_pInstance->SetData(TYPE_ARGENT_CHAMPION, DONE); + m_creature->SetFactionTemporary(FACTION_CHAMPION_FRIENDLY, TEMPFACTION_NONE); EnterEvadeMode(); - // ToDo: start the encounter complete event - - if (m_pInstance) - m_pInstance->SetData(TYPE_ARGENT_CHAMPION, DONE); + // Handle event completion + DoHandleEventEnd(); m_bDefeated = true; } } - void MovementInform(uint32 uiMotionType, uint32 uiPointId) override - { - if (uiMotionType != POINT_MOTION_TYPE || uiPointId != POINT_ID_CENTER) - return; - - m_creature->SetRespawnCoord(m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), m_creature->GetOrientation()); - } - - void SummonedMovementInform(Creature* pSummoned, uint32 uiMotionType, uint32 uiPointId) override - { - if (uiMotionType != POINT_MOTION_TYPE || uiPointId != POINT_ID_CENTER) - return; - - pSummoned->SetRespawnCoord(pSummoned->GetPositionX(), pSummoned->GetPositionY(), pSummoned->GetPositionZ(), pSummoned->GetOrientation()); - } - - // Return true to handle shared timers and MeleeAttack - virtual bool UpdateChampionAI(const uint32 /*uiDiff*/) { return true; } - - void UpdateAI(const uint32 uiDiff) override - { - // Return since we have no target - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - // Call specific virtual function - if (!UpdateChampionAI(uiDiff)) - return; - - DoMeleeAttackIfReady(); - } + // Function that handles personalized event completion + virtual void DoHandleEventEnd() {} }; enum { + SAY_EADRIC_AGGRO = -1650052, + SAY_EADRIC_HAMMER = -1650053, + SAY_EADRIC_KILL_1 = -1650054, + SAY_EADRIC_KILL_2 = -1650055, + SAY_EADRIC_DEFEAT = -1650056, + EMOTE_EADRIC_RADIANCE = -1650057, + EMOTE_EADRIC_HAMMER = -1650058, + SPELL_KILL_CREDIT_EADRIC = 68575, + SPELL_EADRIC_ACHIEVEMENT = 68197, + + SPELL_HAMMER_OF_JUSTICE = 66863, + SPELL_HAMMER_OF_RIGHTEOUS = 66867, + SPELL_RADIANCE = 66935, + SPELL_VENGEANCE = 66865, }; /*###### @@ -131,14 +115,71 @@ struct boss_eadricAI : public argent_champion_commonAI { boss_eadricAI(Creature* pCreature) : argent_champion_commonAI(pCreature) { Reset(); } + uint32 m_uiHammerTimer; + uint32 m_uiRadianceTimer; + void Reset() override { argent_champion_commonAI::Reset(); + + m_uiHammerTimer = urand(30000, 35000); + m_uiRadianceTimer = urand(10000, 15000); + } + + void Aggro(Unit* pWho) override + { + DoScriptText(SAY_EADRIC_AGGRO, m_creature); + DoCastSpellIfCan(m_creature, SPELL_VENGEANCE, CAST_TRIGGERED); + + argent_champion_commonAI::Aggro(pWho); + } + + void KilledUnit(Unit* /*pVictim*/) override + { + DoScriptText(urand(0, 1) ? SAY_EADRIC_KILL_1 : SAY_EADRIC_KILL_2, m_creature); } - bool UpdateCompanionAI(const uint32 uiDiff) + void DoHandleEventEnd() { - return true; + DoScriptText(SAY_EADRIC_DEFEAT, m_creature); + + DoCastSpellIfCan(m_creature, SPELL_EADRIC_ACHIEVEMENT, CAST_TRIGGERED); + m_creature->CastSpell(m_creature, SPELL_KILL_CREDIT_EADRIC, true); + } + + void UpdateAI(const uint32 uiDiff) override + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_uiHammerTimer < uiDiff) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, SPELL_HAMMER_OF_RIGHTEOUS) == CAST_OK) + { + DoCastSpellIfCan(m_creature, SPELL_HAMMER_OF_JUSTICE, CAST_TRIGGERED); + + DoScriptText(EMOTE_EADRIC_HAMMER, m_creature, pTarget); + m_uiHammerTimer = 35000; + } + } + } + else + m_uiHammerTimer -= uiDiff; + + if (m_uiRadianceTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_RADIANCE) == CAST_OK) + { + DoScriptText(EMOTE_EADRIC_RADIANCE, m_creature); + m_uiRadianceTimer = urand(30000, 35000); + } + } + else + m_uiRadianceTimer -= uiDiff; + + DoMeleeAttackIfReady(); } }; @@ -149,7 +190,27 @@ CreatureAI* GetAI_boss_eadric(Creature* pCreature) enum { + SAY_PALETRESS_AGGRO = -1650059, + SAY_PALETRESS_MEMORY = -1650060, + SAY_PALETRESS_MEMORY_DIES = -1650061, + SAY_PALETRESS_KILL_1 = -1650062, + SAY_PALETRESS_KILL_2 = -1650063, + SAY_PALETRESS_DEFEAT = -1650064, + SPELL_KILL_CREDIT_PALETRESS = 68574, + SPELL_CONFESSOR_ACHIEVEMENT = 68206, + + SPELL_CONFESS = 66547, + SPELL_CONFESS_AURA = 66680, + SPELL_SUMMON_MEMORY = 66545, + SPELL_REFLECTIVE_SHIELD = 66515, + + SPELL_HOLY_FIRE = 66538, + SPELL_HOLY_NOVA = 66546, + SPELL_HOLY_SMITE = 66536, + SPELL_RENEW = 66537, + + SPELL_MEMORY_SPAWN_EFFECT = 66675, }; /*###### @@ -160,14 +221,114 @@ struct boss_paletressAI : public argent_champion_commonAI { boss_paletressAI(Creature* pCreature) : argent_champion_commonAI(pCreature) { Reset(); } + uint32 m_uiHolySmiteTimer; + uint32 m_uiHolyFireTimer; + uint32 m_uiHolyNovaTimer; + uint32 m_uiRenewTimer; + + bool m_bSummonedMemory; + void Reset() override { argent_champion_commonAI::Reset(); + + m_uiHolySmiteTimer = 0; + m_uiHolyFireTimer = urand(7000, 12000); + m_uiHolyNovaTimer = urand(20000, 25000); + m_uiRenewTimer = urand(5000, 9000); + + m_bSummonedMemory = false; + } + + void Aggro(Unit* pWho) override + { + DoScriptText(SAY_PALETRESS_AGGRO, m_creature); + + argent_champion_commonAI::Aggro(pWho); + } + + void KilledUnit(Unit* /*pVictim*/) override + { + DoScriptText(urand(0, 1) ? SAY_PALETRESS_KILL_1 : SAY_PALETRESS_KILL_2, m_creature); + } + + void DoHandleEventEnd() + { + DoScriptText(SAY_PALETRESS_DEFEAT, m_creature); + + DoCastSpellIfCan(m_creature, SPELL_CONFESSOR_ACHIEVEMENT, CAST_TRIGGERED); + m_creature->CastSpell(m_creature, SPELL_KILL_CREDIT_PALETRESS, true); + } + + void JustSummoned(Creature* pSummoned) override + { + pSummoned->CastSpell(pSummoned, SPELL_MEMORY_SPAWN_EFFECT, true); } - bool UpdateCompanionAI(const uint32 uiDiff) + void SummonedCreatureJustDied(Creature* /*pSummoned*/) override { - return true; + DoScriptText(SAY_PALETRESS_MEMORY_DIES, m_creature); + m_creature->RemoveAurasDueToSpell(SPELL_REFLECTIVE_SHIELD); + } + + void UpdateAI(const uint32 uiDiff) override + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (!m_bSummonedMemory && m_creature->GetHealthPercent() <= 25.0f) + { + DoScriptText(SAY_PALETRESS_MEMORY, m_creature); + + DoCastSpellIfCan(m_creature, SPELL_CONFESS, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_CONFESS_AURA, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_SUMMON_MEMORY, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_REFLECTIVE_SHIELD, CAST_TRIGGERED); + m_bSummonedMemory = true; + } + + if (m_uiHolySmiteTimer < uiDiff) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, SPELL_HOLY_SMITE)) + m_uiHolySmiteTimer = urand(1000, 2000); + } + } + else + m_uiHolySmiteTimer -= uiDiff; + + if (m_uiHolyFireTimer < uiDiff) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, SPELL_HOLY_FIRE)) + m_uiHolyFireTimer = 25000; + } + } + else + m_uiHolyFireTimer -= uiDiff; + + if (m_uiHolyNovaTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_HOLY_NOVA)) + m_uiHolyNovaTimer = urand(30000, 40000); + } + else + m_uiHolyNovaTimer -= uiDiff; + + if (m_uiRenewTimer < uiDiff) + { + if (Unit* pTarget = DoSelectLowestHpFriendly(60.0f)) + { + if (DoCastSpellIfCan(pTarget, SPELL_RENEW) == CAST_OK) + m_uiRenewTimer = 20000; + } + } + else + m_uiRenewTimer -= uiDiff; + + DoMeleeAttackIfReady(); } }; diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/instance_trial_of_the_champion.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/instance_trial_of_the_champion.cpp index b41ce5f60..36f0164b1 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/instance_trial_of_the_champion.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/instance_trial_of_the_champion.cpp @@ -75,18 +75,26 @@ enum SAY_VARIAN_OTHER_4 = -1650050, SAY_VARIAN_OTHER_5 = -1650051, + // sounds + SOUND_ID_CHALLENGE = 15852, + // spells SPELL_ARGENT_GET_PLAYER_COUNT = 66986, SPELL_ARGENT_SUMMON_CHAMPION_1 = 66654, SPELL_ARGENT_SUMMON_CHAMPION_2 = 66671, SPELL_ARGENT_SUMMON_CHAMPION_3 = 66673, - SPELL_ARGENT_SUMMON_CHAMPION_WAVE = 67295, SPELL_ARGENT_SUMMON_BOSS_4 = 67396, + + SPELL_HERALD_FACE_DARK_KNIGHT = 67482, + SPELL_DEATHS_RESPITE = 66798, + SPELL_DEATHS_PUSH = 66797, SPELL_ARGENT_HERALD_FEIGN_DEATH = 66804, // Arena event spells - not used for the moment // SPELL_SPECTATOR_FORCE_CHANT = 66354, // SPELL_SPECTATOR_FX_CHANT = 66677, + // SPELL_ARGENT_SUMMON_CHAMPION_WAVE = 67295, // cast by center npc 35016; play sound 8574 + // SPELL_SPECTATOR_BUNNY_AURA = 66812, // play sound 15882 SPELL_SPECTATOR_FORCE_CHEER = 66384, SPELL_SPECTATOR_FORCE_CHEER_2 = 66385, @@ -105,11 +113,16 @@ static const DialogueEntryTwoSide aTocDialogues[] = {NPC_ARELAS_BRIGHTSTAR, 0, 0, 0, 7000}, {SAY_TIRION_ARGENT_CHAMPION, NPC_TIRION_FORDRING, 0, 0, 0}, // Argent challenge intro + {NPC_ARGENT_MONK, 0, 0, 0, 5000}, + {SOUND_ID_CHALLENGE, 0, 0, 0, 5000}, {TYPE_ARGENT_CHAMPION, 0, 0, 0, 6000}, {NPC_JAEREN_SUNSWORN, 0, 0, 0, 4000}, {NPC_EADRIC, 0, 0, 0, 6000}, {NPC_PALETRESS, 0, 0, 0, 17000}, {SAY_TIRION_ARGENT_CHAMPION_BEGIN, NPC_TIRION_FORDRING, 0, 0, 0}, + // Argetn challenge complete + {POINT_ID_MOUNT, 0, 0, 0, 5000}, + {POINT_ID_EXIT, 0, 0, 0, 0}, {0, 0, 0, 0, 0} }; @@ -198,6 +211,8 @@ void instance_trial_of_the_champion::OnCreatureCreate(Creature* pCreature) case NPC_SPECTATOR_DRAENEI: case NPC_SPECTATOR_NIGHT_ELF: case NPC_SPECTATOR_GNOME: + case NPC_SPECTATOR_HORDE: + case NPC_SPECTATOR_ALLIANCE: break; case NPC_SPECTATOR_GENERIC: // alliance side @@ -315,6 +330,17 @@ void instance_trial_of_the_champion::SetData(uint32 uiType, uint32 uiData) DoRespawnGameObject(instance->IsRegularDifficulty() ? GO_EADRIC_LOOT : GO_EADRIC_LOOT_H, 30 * MINUTE); else if (m_uiGrandChampionEntry == NPC_PALETRESS) DoRespawnGameObject(instance->IsRegularDifficulty() ? GO_PALETRESS_LOOT : GO_PALETRESS_LOOT_H, 30 * MINUTE); + + // start event epilog + StartNextDialogueText(POINT_ID_MOUNT); + + // move the herald back to center + if (Creature* pHerald = GetSingleCreatureFromStorage(m_uiHeraldEntry)) + { + pHerald->GetMotionMaster()->Clear(); + pHerald->GetMotionMaster()->MovePoint(0, aHeraldPositions[2][0], aHeraldPositions[2][1], aHeraldPositions[2][2]); + pHerald->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); + } } break; case TYPE_BLACK_KNIGHT: @@ -443,7 +469,8 @@ void instance_trial_of_the_champion::OnCreatureDeath(Creature* pCreature) if (Creature* pChampion = GetSingleCreatureFromStorage(m_uiGrandChampionEntry)) { pChampion->SetFactionTemporary(FACTION_CHAMPION_HOSTILE, TEMPFACTION_NONE); - pChampion->GetMotionMaster()->MovePoint(0, 746.630f, 636.570f, 411.572f); + pChampion->GetMotionMaster()->MovePoint(POINT_ID_CENTER, 746.630f, 636.570f, 411.572f); + pChampion->SetRespawnCoord(746.630f, 636.570f, 411.572f, pChampion->GetOrientation()); } } break; @@ -738,6 +765,9 @@ void instance_trial_of_the_champion::JustDidDialogueStep(int32 iEntry) { if (Creature* pTrigger = GetSingleCreatureFromStorage(NPC_WORLD_TRIGGER)) pHerald->GetMotionMaster()->MovePoint(0, pTrigger->GetPositionX(), pTrigger->GetPositionY(), pTrigger->GetPositionZ()); + + pHerald->CastSpell(pHerald, SPELL_ARGENT_GET_PLAYER_COUNT, true); + pHerald->PlayDirectSound(SOUND_ID_CHALLENGE); } break; case SAY_HERALD_ALLIANCE_CHALLENGE: @@ -757,12 +787,21 @@ void instance_trial_of_the_champion::JustDidDialogueStep(int32 iEntry) break; // start argent challenge + case NPC_ARGENT_MONK: + if (Creature* pHerald = GetSingleCreatureFromStorage(m_uiHeraldEntry)) + pHerald->GetMotionMaster()->MovePoint(0, aHeraldPositions[0][0], aHeraldPositions[0][1], aHeraldPositions[0][2]); + break; + case SOUND_ID_CHALLENGE: + if (Creature* pHerald = GetSingleCreatureFromStorage(m_uiHeraldEntry)) + pHerald->PlayDirectSound(SOUND_ID_CHALLENGE); + break; case TYPE_ARGENT_CHAMPION: if (Creature* pHerald = GetSingleCreatureFromStorage(m_uiHeraldEntry)) { if (Creature* pTirion = GetSingleCreatureFromStorage(NPC_TIRION_FORDRING)) pHerald->SetFacingToObject(pTirion); + pHerald->CastSpell(pHerald, SPELL_ARGENT_SUMMON_BOSS_4, true); DoScriptText(m_uiGrandChampionEntry == NPC_EADRIC ? SAY_HERALD_EADRIC : SAY_HERALD_PALETRESS, pHerald); DoUseDoorOrButton(GO_MAIN_GATE); @@ -771,20 +810,31 @@ void instance_trial_of_the_champion::JustDidDialogueStep(int32 iEntry) // summon the selected champion if (Creature* pChampion = pHerald->SummonCreature(m_uiGrandChampionEntry, aArgentChallengeHelpers[9].fX, aArgentChallengeHelpers[9].fY, aArgentChallengeHelpers[9].fZ, aArgentChallengeHelpers[9].fO, TEMPSUMMON_DEAD_DESPAWN, 0)) { - for (uint8 i = 0; i < MAX_ARGENT_TRASH; ++i) - { - if (Creature* pHelper = pChampion->SummonCreature(aArgentChallengeHelpers[i].uiEntry, aArgentChallengeHelpers[i].fX, aArgentChallengeHelpers[i].fY, aArgentChallengeHelpers[i].fZ, aArgentChallengeHelpers[i].fO, TEMPSUMMON_DEAD_DESPAWN, 0)) - pHelper->GetMotionMaster()->MovePoint(POINT_ID_CENTER, aArgentChallengeHelpers[i].fTargetX, aArgentChallengeHelpers[i].fTargetY, aArgentChallengeHelpers[i].fTargetZ); - } - pChampion->CastSpell(pChampion, SPELL_SPECTATOR_FORCE_CHEER, true); pChampion->CastSpell(pChampion, SPELL_SPECTATOR_FORCE_CHEER_2, true); + + if (Creature* pSpectator = GetSingleCreatureFromStorage(NPC_SPECTATOR_HORDE)) + DoScriptText(EMOTE_HORDE_ARGENT_CHAMPION, pSpectator, pChampion); + if (Creature* pSpectator = GetSingleCreatureFromStorage(NPC_SPECTATOR_ALLIANCE)) + DoScriptText(EMOTE_ALLIANCE_ARGENT_CHAMPION, pSpectator, pChampion); + } + + for (uint8 i = 0; i < MAX_ARGENT_TRASH; ++i) + { + if (Creature* pHelper = pHerald->SummonCreature(aArgentChallengeHelpers[i].uiEntry, aArgentChallengeHelpers[i].fX, aArgentChallengeHelpers[i].fY, aArgentChallengeHelpers[i].fZ, aArgentChallengeHelpers[i].fO, TEMPSUMMON_DEAD_DESPAWN, 0)) + { + pHelper->GetMotionMaster()->MovePoint(POINT_ID_CENTER, aArgentChallengeHelpers[i].fTargetX, aArgentChallengeHelpers[i].fTargetY, aArgentChallengeHelpers[i].fTargetZ); + pHelper->SetRespawnCoord(aArgentChallengeHelpers[i].fTargetX, aArgentChallengeHelpers[i].fTargetY, aArgentChallengeHelpers[i].fTargetZ, pHelper->GetOrientation()); + } } } break; case NPC_JAEREN_SUNSWORN: if (Creature* pChampion = GetSingleCreatureFromStorage(m_uiGrandChampionEntry)) + { pChampion->GetMotionMaster()->MovePoint(POINT_ID_CENTER, aArgentChallengeHelpers[9].fTargetX, aArgentChallengeHelpers[9].fTargetY, aArgentChallengeHelpers[9].fTargetZ); + pChampion->SetRespawnCoord(aArgentChallengeHelpers[9].fTargetX, aArgentChallengeHelpers[9].fTargetY, aArgentChallengeHelpers[9].fTargetZ, pChampion->GetOrientation()); + } break; case NPC_EADRIC: if (Creature* pChampion = GetSingleCreatureFromStorage(m_uiGrandChampionEntry)) @@ -808,6 +858,14 @@ void instance_trial_of_the_champion::JustDidDialogueStep(int32 iEntry) pHerald->SetFacingToObject(pTirion); } break; + // argent challenge completed + case POINT_ID_EXIT: + if (Creature* pChampion = GetSingleCreatureFromStorage(m_uiGrandChampionEntry)) + { + pChampion->GetMotionMaster()->MovePoint(0, aArgentChallengeHelpers[9].fTargetX, aArgentChallengeHelpers[9].fTargetY, aArgentChallengeHelpers[9].fTargetZ); + pChampion->ForcedDespawn(8000); + } + break; } } @@ -896,6 +954,13 @@ void instance_trial_of_the_champion::Update(uint32 uiDiff) DoScriptText(m_uiTeam == ALLIANCE ? aHordeChampions[uiIndex].iYellEntry : aAllianceChampions[uiIndex].iYellEntry, pHerald); pHerald->SetFacingToObject(pChampion); + switch (m_uiIntroStage) + { + case 0: pHerald->CastSpell(pHerald, SPELL_ARGENT_SUMMON_CHAMPION_1, true); break; + case 1: pHerald->CastSpell(pHerald, SPELL_ARGENT_SUMMON_CHAMPION_2, true); break; + case 2: pHerald->CastSpell(pHerald, SPELL_ARGENT_SUMMON_CHAMPION_3, true); break; + } + // handle emote if (Creature* pStalker = GetSingleCreatureFromStorage(m_uiTeam == ALLIANCE ? aHordeChampions[uiIndex].uiCrowdStalker : aAllianceChampions[uiIndex].uiCrowdStalker)) DoScriptText(m_uiTeam == ALLIANCE ? aHordeChampions[uiIndex].iEmoteEntry : aAllianceChampions[uiIndex].iEmoteEntry, pStalker, pChampion); diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.h b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.h index 1efbb27a6..5cb95d416 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.h +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.h @@ -157,6 +157,10 @@ enum POINT_ID_COMBAT = 3, POINT_ID_MOUNT = 4, POINT_ID_EXIT = 5, + + // achievements + ACHIEV_CRIT_FACEROLLER = 11858, // Eadric achiev 3803 + ACHIEV_CRIT_HAD_WORSE = 11789, // Black Knight achiev 3804 }; static const float aHeraldPositions[3][4] = @@ -290,7 +294,7 @@ class instance_trial_of_the_champion : public ScriptedInstance, private Dialogue void DoSendChampionsToExit(); void DoSetChamptionsInCombat(Unit* pTarget); - void DoPrepareArgentChallenge() { StartNextDialogueText(TYPE_ARGENT_CHAMPION); } + void DoPrepareArgentChallenge() { StartNextDialogueText(NPC_ARGENT_MONK); } uint32 GetMountEntryForChampion() { return m_uiTeam == ALLIANCE ? NPC_BATTLEWORG_ALLIANCE : NPC_WARHORSE_HORDE; } bool IsArenaChallengeComplete(uint32 uiType); diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index db6045db6..bc8dfba48 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3098" + #define SD2_REVISION_NR "3099" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 8f9855632..f11695188 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -4781,7 +4781,22 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1650048,'Garrosh, enough.',0,1,0,396,'thrall SAY_THRALL_OTHER_2'), (-1650049,'Admirably? Hah! I will enjoy watching your weak little champions fail, human.',0,1,0,22,'garrosh SAY_GARROSH_OTHER_3'), (-1650050,'Don\'t just stand there; kill him!',0,1,0,22,'king varian SAY_VARIAN_OTHER_4'), -(-1650051,'I did not come here to watch animals tear at each other senselessly, Tirion.',0,1,0,1,'king varian SAY_VARIAN_OTHER_5'); +(-1650051,'I did not come here to watch animals tear at each other senselessly, Tirion.',0,1,0,1,'king varian SAY_VARIAN_OTHER_5'), + +(-1650052,'Prepare yourselves!',16135,1,0,0,'eadric SAY_AGGRO'), +(-1650053,'Hammer of the Righteous!',16136,1,0,0,'eadric SAY_HAMMER'), +(-1650054,'You... You need more practice.',16137,1,0,0,'eadric SAY_KILL_1'), +(-1650055,'Nay! Nay! And I say yet again nay! Not good enough!',16138,1,0,0,'eadric SAY_KILL_2'), +(-1650056,'I yield! I submit. Excellent work. May I run away now?',16139,1,0,0,'eadric SAY_DEFEAT'), +(-1650057,'%s begins to radiate light. Shield your eyes!',0,3,0,0,'eadric EMOTE_RADIATE'), +(-1650058,'%s targets $N with the Hammer of the Righteous!',0,3,0,0,'eadric EMOTE_HAMMER'), + +(-1650059,'Well then, let us begin.',16247,1,0,0,'paletress SAY_AGGRO'), +(-1650060,'Take this time to consider your past deeds.',16248,1,0,0,'paletress SAY_MEMORY'), +(-1650061,'Even the darkest memory fades when confronted.',16249,1,0,0,'paletress SAY_MEMORY_DIES'), +(-1650062,'Take your rest.',16250,1,0,0,'paletress SAY_KILL_1'), +(-1650063,'Be at ease.',16251,1,0,0,'paletress SAY_KILL_2'), +(-1650064,'Excellent work!',16252,1,0,0,'paletress SAY_DEFEAT'); -- -1 658 000 ICC: PIT OF SARON INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES diff --git a/sql/updates/r3099_scriptdev2.sql b/sql/updates/r3099_scriptdev2.sql new file mode 100644 index 000000000..9e0f3d0e7 --- /dev/null +++ b/sql/updates/r3099_scriptdev2.sql @@ -0,0 +1,16 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1650064 AND -1650052; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1650052,'Prepare yourselves!',16135,1,0,0,'eadric SAY_AGGRO'), +(-1650053,'Hammer of the Righteous!',16136,1,0,0,'eadric SAY_HAMMER'), +(-1650054,'You... You need more practice.',16137,1,0,0,'eadric SAY_KILL_1'), +(-1650055,'Nay! Nay! And I say yet again nay! Not good enough!',16138,1,0,0,'eadric SAY_KILL_2'), +(-1650056,'I yield! I submit. Excellent work. May I run away now?',16139,1,0,0,'eadric SAY_DEFEAT'), +(-1650057,'%s begins to radiate light. Shield your eyes!',0,3,0,0,'eadric EMOTE_RADIATE'), +(-1650058,'%s targets $N with the Hammer of the Righteous!',0,3,0,0,'eadric EMOTE_HAMMER'), + +(-1650059,'Well then, let us begin.',16247,1,0,0,'paletress SAY_AGGRO'), +(-1650060,'Take this time to consider your past deeds.',16248,1,0,0,'paletress SAY_MEMORY'), +(-1650061,'Even the darkest memory fades when confronted.',16249,1,0,0,'paletress SAY_MEMORY_DIES'), +(-1650062,'Take your rest.',16250,1,0,0,'paletress SAY_KILL_1'), +(-1650063,'Be at ease.',16251,1,0,0,'paletress SAY_KILL_2'), +(-1650064,'Excellent work!',16252,1,0,0,'paletress SAY_DEFEAT'); From a29e48d8cb41fe4eb08f0e522f02856800771093 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Fri, 6 Feb 2015 21:48:55 +0100 Subject: [PATCH 1113/1172] [3100] Cleanup whitespaces --- .../boss_ambassador_flamelash.cpp | 2 +- .../eastern_kingdoms/western_plaguelands.cpp | 18 ++++++------- .../culling_of_stratholme.cpp | 2 +- .../instance_razorfen_downs.cpp | 2 +- .../instance_trial_of_the_champion.cpp | 26 +++++++++---------- scripts/northrend/icecrown.cpp | 8 +++--- scripts/northrend/sholazar_basin.cpp | 2 +- .../ulduar/ulduar/boss_yogg_saron.cpp | 10 +++---- scripts/outland/shadowmoon_valley.cpp | 2 +- sd2_revision_nr.h | 2 +- sd2_revision_sql.h | 4 +-- system/system.h | 2 +- 12 files changed, 40 insertions(+), 40 deletions(-) diff --git a/scripts/eastern_kingdoms/blackrock_depths/boss_ambassador_flamelash.cpp b/scripts/eastern_kingdoms/blackrock_depths/boss_ambassador_flamelash.cpp index 5ae6ab557..47e1e614f 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/boss_ambassador_flamelash.cpp +++ b/scripts/eastern_kingdoms/blackrock_depths/boss_ambassador_flamelash.cpp @@ -70,7 +70,7 @@ struct boss_ambassador_flamelashAI : public ScriptedAI ScriptedAI::MoveInLineOfSight(pWho); if (pWho->GetEntry() == NPC_BURNING_SPIRIT && pWho->isAlive() && m_sSpiritsGuidsSet.find(pWho->GetObjectGuid()) != m_sSpiritsGuidsSet.end() && - pWho->IsWithinDistInMap(m_creature, 2 * CONTACT_DISTANCE)) + pWho->IsWithinDistInMap(m_creature, 2 * CONTACT_DISTANCE)) { pWho->CastSpell(m_creature, SPELL_BURNING_SPIRIT, true); m_sSpiritsGuidsSet.erase(pWho->GetObjectGuid()); diff --git a/scripts/eastern_kingdoms/western_plaguelands.cpp b/scripts/eastern_kingdoms/western_plaguelands.cpp index 8abd7b071..fa6181a32 100644 --- a/scripts/eastern_kingdoms/western_plaguelands.cpp +++ b/scripts/eastern_kingdoms/western_plaguelands.cpp @@ -450,7 +450,7 @@ struct npc_taelan_fordringAI: public npc_escortAI, private DialogueHelper else if (eventType == AI_EVENT_CUSTOM_B && pInvoker->GetEntry() == NPC_ISILLIEN) { StartNextDialogueText(NPC_TIRION_FORDRING); - m_creature->SummonCreature(NPC_TIRION_FORDRING, 2620.273f, -1920.917f, 74.25f, 0, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 15*MINUTE*IN_MILLISECONDS); + m_creature->SummonCreature(NPC_TIRION_FORDRING, 2620.273f, -1920.917f, 74.25f, 0, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 15 * MINUTE * IN_MILLISECONDS); } } @@ -480,9 +480,9 @@ struct npc_taelan_fordringAI: public npc_escortAI, private DialogueHelper // summon additional crimson elites float fX, fY, fZ; pSummoned->GetNearPoint(pSummoned, fX, fY, fZ, 0, 5.0f, M_PI_F * 1.25f); - pSummoned->SummonCreature(NPC_CRIMSON_ELITE, fX, fY, fZ, pSummoned->GetOrientation(), TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 15*MINUTE*IN_MILLISECONDS); + pSummoned->SummonCreature(NPC_CRIMSON_ELITE, fX, fY, fZ, pSummoned->GetOrientation(), TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 15 * MINUTE * IN_MILLISECONDS); pSummoned->GetNearPoint(pSummoned, fX, fY, fZ, 0, 5.0f, 0); - pSummoned->SummonCreature(NPC_CRIMSON_ELITE, fX, fY, fZ, pSummoned->GetOrientation(), TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 15*MINUTE*IN_MILLISECONDS); + pSummoned->SummonCreature(NPC_CRIMSON_ELITE, fX, fY, fZ, pSummoned->GetOrientation(), TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 15 * MINUTE * IN_MILLISECONDS); break; case NPC_TIRION_FORDRING: m_tirionGuid = pSummoned->GetObjectGuid(); @@ -576,7 +576,7 @@ struct npc_taelan_fordringAI: public npc_escortAI, private DialogueHelper break; case SAY_REACH_TOWER: // start fight event - m_creature->SummonCreature(NPC_ISILLIEN, 2693.12f, -1943.04f, 72.04f, 2.11f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 15*MINUTE*IN_MILLISECONDS); + m_creature->SummonCreature(NPC_ISILLIEN, 2693.12f, -1943.04f, 72.04f, 2.11f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 15 * MINUTE * IN_MILLISECONDS); break; case SAY_ISILLIEN_2: if (Creature* pIsillien = m_creature->GetMap()->GetCreature(m_isillenGuid)) @@ -585,9 +585,9 @@ struct npc_taelan_fordringAI: public npc_escortAI, private DialogueHelper case SPELL_CRUSADER_STRIKE: { // spawn additioinal elites - m_creature->SummonCreature(NPC_CRIMSON_ELITE, 2711.32f, -1882.67f, 67.89f, 3.2f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 15*MINUTE*IN_MILLISECONDS); - m_creature->SummonCreature(NPC_CRIMSON_ELITE, 2710.93f, -1878.90f, 67.97f, 3.2f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 15*MINUTE*IN_MILLISECONDS); - m_creature->SummonCreature(NPC_CRIMSON_ELITE, 2710.53f, -1875.28f, 67.90f, 3.2f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 15*MINUTE*IN_MILLISECONDS); + m_creature->SummonCreature(NPC_CRIMSON_ELITE, 2711.32f, -1882.67f, 67.89f, 3.2f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 15 * MINUTE * IN_MILLISECONDS); + m_creature->SummonCreature(NPC_CRIMSON_ELITE, 2710.93f, -1878.90f, 67.97f, 3.2f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 15 * MINUTE * IN_MILLISECONDS); + m_creature->SummonCreature(NPC_CRIMSON_ELITE, 2710.53f, -1875.28f, 67.90f, 3.2f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 15 * MINUTE * IN_MILLISECONDS); std::list lElitesInRange; Player* pPlayer = GetPlayerForEscort(); @@ -651,10 +651,10 @@ struct npc_taelan_fordringAI: public npc_escortAI, private DialogueHelper pTirion->SetFacingToObject(pPlayer); } - pTirion->ForcedDespawn(3*MINUTE*IN_MILLISECONDS); + pTirion->ForcedDespawn(3 * MINUTE * IN_MILLISECONDS); pTirion->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER); } - m_creature->ForcedDespawn(3*MINUTE*IN_MILLISECONDS); + m_creature->ForcedDespawn(3 * MINUTE * IN_MILLISECONDS); break; } } diff --git a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.cpp b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.cpp index 11e32f1cd..36f2b456d 100644 --- a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.cpp +++ b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.cpp @@ -733,7 +733,7 @@ struct npc_arthasAI : public npc_escortAI, private DialogueHelper case NPC_TOWNHALL_RESIDENT: if (Creature* pCitizen = m_creature->GetMap()->GetCreature(m_thirdCitizenGuid)) pCitizen->HandleEmote(EMOTE_ONESHOT_LAUGH); - break; + break; case TEXT_ID_TOWN_HALL_2: if (Creature* pCitizen = m_creature->GetMap()->GetCreature(m_thirdCitizenGuid)) DoScriptText(SAY_CITIZEN_NO_UNDERSTAD, pCitizen); diff --git a/scripts/kalimdor/razorfen_downs/instance_razorfen_downs.cpp b/scripts/kalimdor/razorfen_downs/instance_razorfen_downs.cpp index 5dbca9e22..04d3453eb 100644 --- a/scripts/kalimdor/razorfen_downs/instance_razorfen_downs.cpp +++ b/scripts/kalimdor/razorfen_downs/instance_razorfen_downs.cpp @@ -37,7 +37,7 @@ void instance_razorfen_downs::Initialize() void instance_razorfen_downs::OnCreatureCreate(Creature* pCreature) { - switch(pCreature->GetEntry()) + switch (pCreature->GetEntry()) { case NPC_TOMB_FIEND: case NPC_TOMB_REAVER: diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/instance_trial_of_the_champion.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/instance_trial_of_the_champion.cpp index 36f0164b1..303aaf089 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/instance_trial_of_the_champion.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/instance_trial_of_the_champion.cpp @@ -759,7 +759,7 @@ void instance_trial_of_the_champion::JustDidDialogueStep(int32 iEntry) { switch (iEntry) { - // start arena long intro + // start arena long intro case TYPE_ARENA_CHALLENGE: if (Creature* pHerald = GetSingleCreatureFromStorage(m_uiHeraldEntry)) { @@ -780,13 +780,13 @@ void instance_trial_of_the_champion::JustDidDialogueStep(int32 iEntry) // ToDo: play intro music } break; - // complete intro - start arena event + // complete intro - start arena event case NPC_TIRION_FORDRING: m_uiIntroStage = 0; m_uiIntroTimer = 1000; break; - // start argent challenge + // start argent challenge case NPC_ARGENT_MONK: if (Creature* pHerald = GetSingleCreatureFromStorage(m_uiHeraldEntry)) pHerald->GetMotionMaster()->MovePoint(0, aHeraldPositions[0][0], aHeraldPositions[0][1], aHeraldPositions[0][2]); @@ -858,7 +858,7 @@ void instance_trial_of_the_champion::JustDidDialogueStep(int32 iEntry) pHerald->SetFacingToObject(pTirion); } break; - // argent challenge completed + // argent challenge completed case POINT_ID_EXIT: if (Creature* pChampion = GetSingleCreatureFromStorage(m_uiGrandChampionEntry)) { @@ -879,7 +879,7 @@ void instance_trial_of_the_champion::Update(uint32 uiDiff) { switch (m_uiIntroStage) { - // spawn champions + // spawn champions case 0: case 1: case 2: @@ -906,7 +906,7 @@ void instance_trial_of_the_champion::Update(uint32 uiDiff) // summon grand champion, mount and emote if (Creature* pChampion = pHerald->SummonCreature(m_uiTeam == ALLIANCE ? aHordeChampions[uiIndex].uiEntry : aAllianceChampions[uiIndex].uiEntry, - pTrigger->GetPositionX(), pTrigger->GetPositionY(), pTrigger->GetPositionZ(), pTrigger->GetAngle(pCenterTrigger), TEMPSUMMON_DEAD_DESPAWN, 0)) + pTrigger->GetPositionX(), pTrigger->GetPositionY(), pTrigger->GetPositionZ(), pTrigger->GetAngle(pCenterTrigger), TEMPSUMMON_DEAD_DESPAWN, 0)) { // handle emote if (Creature* pStalker = GetSingleCreatureFromStorage(m_uiTeam == ALLIANCE ? aHordeChampions[uiIndex].uiCrowdStalker : aAllianceChampions[uiIndex].uiCrowdStalker)) @@ -914,7 +914,7 @@ void instance_trial_of_the_champion::Update(uint32 uiDiff) // summon champion mount if (Creature* pMount = pChampion->SummonCreature(m_uiTeam == ALLIANCE ? aHordeChampions[uiIndex].uiMount : aAllianceChampions[uiIndex].uiMount, - pTrigger->GetPositionX(), pTrigger->GetPositionY(), pTrigger->GetPositionZ(), pTrigger->GetAngle(pCenterTrigger), TEMPSUMMON_DEAD_DESPAWN, 0)) + pTrigger->GetPositionX(), pTrigger->GetPositionY(), pTrigger->GetPositionZ(), pTrigger->GetAngle(pCenterTrigger), TEMPSUMMON_DEAD_DESPAWN, 0)) { pChampion->CastSpell(pMount, SPELL_RIDE_VEHICLE_HARDCODED, true); @@ -930,7 +930,7 @@ void instance_trial_of_the_champion::Update(uint32 uiDiff) { pTrigger->GetNearPoint(pTrigger, fX, fY, fZ, 0, 5.0f, pTrigger->GetAngle(pCenterTrigger) - (M_PI_F * 0.25f) + j * (M_PI_F * 0.25f)); if (Creature* pHelper = pHerald->SummonCreature(m_uiTeam == ALLIANCE ? aHordeChampions[uiIndex].uiChampion : aAllianceChampions[uiIndex].uiChampion, - fX, fY, fZ, pTrigger->GetAngle(pCenterTrigger), TEMPSUMMON_DEAD_DESPAWN, 0)) + fX, fY, fZ, pTrigger->GetAngle(pCenterTrigger), TEMPSUMMON_DEAD_DESPAWN, 0)) m_sArenaHelpersGuids[m_uiIntroStage].insert(pHelper->GetObjectGuid()); } @@ -948,7 +948,7 @@ void instance_trial_of_the_champion::Update(uint32 uiDiff) // summon grand champion, mount and emote if (Creature* pChampion = pHerald->SummonCreature(m_uiTeam == ALLIANCE ? aHordeChampions[uiIndex].uiEntry : aAllianceChampions[uiIndex].uiEntry, - aIntroPositions[0][0], aIntroPositions[0][1], aIntroPositions[0][2], aIntroPositions[0][3], TEMPSUMMON_DEAD_DESPAWN, 0)) + aIntroPositions[0][0], aIntroPositions[0][1], aIntroPositions[0][2], aIntroPositions[0][3], TEMPSUMMON_DEAD_DESPAWN, 0)) { // text DoScriptText(m_uiTeam == ALLIANCE ? aHordeChampions[uiIndex].iYellEntry : aAllianceChampions[uiIndex].iYellEntry, pHerald); @@ -967,7 +967,7 @@ void instance_trial_of_the_champion::Update(uint32 uiDiff) // summon champion mount if (Creature* pMount = pChampion->SummonCreature(m_uiTeam == ALLIANCE ? aHordeChampions[uiIndex].uiMount : aAllianceChampions[uiIndex].uiMount, - aIntroPositions[0][0], aIntroPositions[0][1], aIntroPositions[0][2], aIntroPositions[0][3], TEMPSUMMON_DEAD_DESPAWN, 0)) + aIntroPositions[0][0], aIntroPositions[0][1], aIntroPositions[0][2], aIntroPositions[0][3], TEMPSUMMON_DEAD_DESPAWN, 0)) { pChampion->CastSpell(pMount, SPELL_RIDE_VEHICLE_HARDCODED, true); @@ -983,9 +983,9 @@ void instance_trial_of_the_champion::Update(uint32 uiDiff) for (uint8 j = 0; j < 3; ++j) { if (Creature* pHelper = pChampion->SummonCreature(m_uiTeam == ALLIANCE ? aHordeChampions[uiIndex].uiChampion : aAllianceChampions[uiIndex].uiChampion, - aIntroPositions[j + 1][0], aIntroPositions[j + 1][1], aIntroPositions[j + 1][2], aIntroPositions[j + 1][3], TEMPSUMMON_DEAD_DESPAWN, 0)) + aIntroPositions[j + 1][0], aIntroPositions[j + 1][1], aIntroPositions[j + 1][2], aIntroPositions[j + 1][3], TEMPSUMMON_DEAD_DESPAWN, 0)) { - pHelper->GetMotionMaster()->MoveFollow(pMount, pHelper->GetDistance(pMount), M_PI_F/2 + pHelper->GetAngle(pMount)); + pHelper->GetMotionMaster()->MoveFollow(pMount, pHelper->GetDistance(pMount), M_PI_F / 2 + pHelper->GetAngle(pMount)); m_sArenaHelpersGuids[m_uiIntroStage].insert(pHelper->GetObjectGuid()); } } @@ -1047,7 +1047,7 @@ void instance_trial_of_the_champion::Update(uint32 uiDiff) uiIndex = m_vChampionsIndex[i]; if (Creature* pChampion = pHerald->SummonCreature(m_uiTeam == ALLIANCE ? aHordeChampions[uiIndex].uiEntry : aAllianceChampions[uiIndex].uiEntry, - aChampsPositions[i][0], aChampsPositions[i][1], aChampsPositions[i][2], aChampsPositions[i][3], TEMPSUMMON_DEAD_DESPAWN, 0)) + aChampsPositions[i][0], aChampsPositions[i][1], aChampsPositions[i][2], aChampsPositions[i][3], TEMPSUMMON_DEAD_DESPAWN, 0)) m_ArenaChampionsGuids[i] = pChampion->GetObjectGuid(); } m_uiChampionsTimer = 0; diff --git a/scripts/northrend/icecrown.cpp b/scripts/northrend/icecrown.cpp index 3d8b1d481..2711a6f8c 100644 --- a/scripts/northrend/icecrown.cpp +++ b/scripts/northrend/icecrown.cpp @@ -350,7 +350,7 @@ struct npc_infantryAI : public ScriptedAI if (m_bEscortActive) { if (Creature* pLeader = m_creature->GetMap()->GetCreature(m_squadLeaderGuid)) - m_creature->GetMotionMaster()->MoveFollow(pLeader, m_creature->GetDistance(pLeader), M_PI_F/2 + m_creature->GetAngle(pLeader)); + m_creature->GetMotionMaster()->MoveFollow(pLeader, m_creature->GetDistance(pLeader), M_PI_F / 2 + m_creature->GetAngle(pLeader)); } else m_creature->GetMotionMaster()->MoveTargetedHome(); @@ -367,7 +367,7 @@ struct npc_infantryAI : public ScriptedAI if (eventType == AI_EVENT_CUSTOM_A && (pSender->GetEntry() == NPC_SKYBREAKER_SQUAD_LEADER || pSender->GetEntry() == NPC_KORKRON_SQUAD_LEADER)) { m_creature->SetStandState(UNIT_STAND_STATE_STAND); - m_creature->GetMotionMaster()->MoveFollow(pSender, m_creature->GetDistance(pSender), M_PI_F/2 + m_creature->GetAngle(pSender)); + m_creature->GetMotionMaster()->MoveFollow(pSender, m_creature->GetDistance(pSender), M_PI_F / 2 + m_creature->GetAngle(pSender)); m_squadLeaderGuid = pSender->GetObjectGuid(); m_bEscortActive = true; } @@ -548,7 +548,7 @@ CreatureAI* GetAI_npc_father_kamaros(Creature* pCreature) bool QuestAccept_npc_father_kamaros(Player* pPlayer, Creature* pCreature, const Quest* pQuest) { if (pQuest->GetQuestId() == QUEST_ID_NOT_DEAD_YET_A || pQuest->GetQuestId() == QUEST_ID_NOT_DEAD_YET_H || - pQuest->GetQuestId() == QUEST_ID_GET_OUT_OF_HERE_A || pQuest->GetQuestId() == QUEST_ID_GET_OUT_OF_HERE_H) + pQuest->GetQuestId() == QUEST_ID_GET_OUT_OF_HERE_A || pQuest->GetQuestId() == QUEST_ID_GET_OUT_OF_HERE_H) { pCreature->AI()->SendAIEvent(AI_EVENT_START_ESCORT, pPlayer, pCreature, pQuest->GetQuestId()); return true; @@ -643,7 +643,7 @@ bool GossipSelect_npc_saronite_mine_slave(Player* pPlayer, Creature* pCreature, case 1: pCreature->GetMotionMaster()->MovePoint(0, afPointSlaveSuicide2[0], afPointSlaveSuicide2[1], afPointSlaveSuicide2[2]); break; - case 2: + case 2: pCreature->GetMotionMaster()->MovePoint(0, afPointSlaveSuicide3[0], afPointSlaveSuicide3[1], afPointSlaveSuicide3[2]); break; } diff --git a/scripts/northrend/sholazar_basin.cpp b/scripts/northrend/sholazar_basin.cpp index 2db4e666f..532670976 100644 --- a/scripts/northrend/sholazar_basin.cpp +++ b/scripts/northrend/sholazar_basin.cpp @@ -553,7 +553,7 @@ struct npc_tipsy_mcmanusAI : public ScriptedAI { switch (m_uiTaskIndex) { - // fruit tasks + // fruit tasks case 0: case 1: case 3: diff --git a/scripts/northrend/ulduar/ulduar/boss_yogg_saron.cpp b/scripts/northrend/ulduar/ulduar/boss_yogg_saron.cpp index f6aefbab4..44d0c1ea5 100644 --- a/scripts/northrend/ulduar/ulduar/boss_yogg_saron.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_yogg_saron.cpp @@ -1100,7 +1100,7 @@ struct npc_brain_yogg_saronAI : public Scripted_NoMovementAI, private DialogueHe { switch (uiIndex) { - // stormwind + // stormwind case 0: m_creature->SummonCreature(NPC_LAUGHING_SKULL, 1955.173f, 85.26153f, 239.7496f, 4.049f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 90000); m_creature->SummonCreature(NPC_LAUGHING_SKULL, 1893.146f, 44.24343f, 239.7496f, 0, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 90000); @@ -1121,7 +1121,7 @@ struct npc_brain_yogg_saronAI : public Scripted_NoMovementAI, private DialogueHe // start dialogue StartNextDialogueText(NPC_KING_LLANE); break; - // chamber + // chamber case 1: m_creature->SummonCreature(NPC_LAUGHING_SKULL, 2063.156f, 27.95839f, 244.2707f, 5.288f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 90000); m_creature->SummonCreature(NPC_LAUGHING_SKULL, 2061.257f, -53.8788f, 239.8633f, 2.478f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 90000); @@ -1145,7 +1145,7 @@ struct npc_brain_yogg_saronAI : public Scripted_NoMovementAI, private DialogueHe // start dialogue StartNextDialogueText(NPC_NELTHARION); break; - // icecrown + // icecrown case 2: m_creature->SummonCreature(NPC_LAUGHING_SKULL, 1948.668f, -152.4481f, 240.073f, 1.919f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 90000); m_creature->SummonCreature(NPC_LAUGHING_SKULL, 1879.845f, -72.91819f, 240.073f, 5.689f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 90000); @@ -1162,8 +1162,8 @@ struct npc_brain_yogg_saronAI : public Scripted_NoMovementAI, private DialogueHe m_creature->SummonCreature(NPC_DEATHSWORM_ZEALOT, 1897.345f, -106.6076f, 240.1444f, 4.939f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 90000); m_creature->SummonCreature(NPC_LICH_KING, 1908.557f, -152.4427f, 240.0719f, 4.238f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 90000); // the following is guesswork - m_creature->SummonCreature(NPC_IMMOLATED_CHAMPION, 1915.371f,-139.9342f,239.9896f, 4.159f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 90000); - m_creature->SummonCreature(NPC_YOGGSARON_ILLUSION, 1915.371f,-139.9342f,239.9896f, 0.0f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 90000); + m_creature->SummonCreature(NPC_IMMOLATED_CHAMPION, 1915.371f, -139.9342f, 239.9896f, 4.159f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 90000); + m_creature->SummonCreature(NPC_YOGGSARON_ILLUSION, 1915.371f, -139.9342f, 239.9896f, 0.0f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 90000); // start dialogue StartNextDialogueText(NPC_LICH_KING); diff --git a/scripts/outland/shadowmoon_valley.cpp b/scripts/outland/shadowmoon_valley.cpp index f7b79c593..bbb090784 100644 --- a/scripts/outland/shadowmoon_valley.cpp +++ b/scripts/outland/shadowmoon_valley.cpp @@ -592,7 +592,7 @@ struct npc_wildaAI : public npc_escortAI for (std::list::const_iterator itr = lSpiritsInRange.begin(); itr != lSpiritsInRange.end(); ++itr) { (*itr)->RemoveAurasDueToSpell(SPELL_WATER_BUBBLE); - (*itr)->GetMotionMaster()->MoveFollow(m_creature, m_creature->GetDistance(*itr) * 0.25f, M_PI_F/2 + m_creature->GetAngle(*itr)); + (*itr)->GetMotionMaster()->MoveFollow(m_creature, m_creature->GetDistance(*itr) * 0.25f, M_PI_F / 2 + m_creature->GetAngle(*itr)); (*itr)->SetLevitate(false); } } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index bc8dfba48..437003c74 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3099" + #define SD2_REVISION_NR "3100" #endif // __SD2_REVISION_NR_H__ diff --git a/sd2_revision_sql.h b/sd2_revision_sql.h index 997c33355..f47a90c17 100644 --- a/sd2_revision_sql.h +++ b/sd2_revision_sql.h @@ -1,5 +1,5 @@ #ifndef __SD2_REVISION_SQL_H__ #define __SD2_REVISION_SQL_H__ - #define REVISION_DB_SCRIPTDEV2 "required__scriptdev2" - #define REVISION_DB_SD2_MANGOS "required__mangos" +#define REVISION_DB_SCRIPTDEV2 "required__scriptdev2" +#define REVISION_DB_SD2_MANGOS "required__mangos" #endif // __SD2_REVISION_SQL_H__ diff --git a/system/system.h b/system/system.h index 6cd1ea57b..abaa9fcd5 100644 --- a/system/system.h +++ b/system/system.h @@ -34,7 +34,7 @@ class SystemMgr static SystemMgr& Instance(); - typedef std::map > EntryPathInfo; + typedef std::map < uint32 /*entry*/, std::map < int32 /*pathId*/, PathInformation > > EntryPathInfo; // Database void LoadVersion(); From 4559b638316321f79eba399e62622b264b6d1f14 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sat, 7 Feb 2015 02:25:44 +0100 Subject: [PATCH 1114/1172] [3101] Implement spawn support for the Black Knight - ToC5 --- .../boss_argent_challenge.cpp | 2 + .../boss_black_knight.cpp | 103 +++++++++++++++++- .../instance_trial_of_the_champion.cpp | 87 ++++++++++++++- .../trial_of_the_champion.cpp | 2 +- .../trial_of_the_champion.h | 11 +- sd2_revision_nr.h | 2 +- sd2_revision_sql.h | 4 +- sql/mangos_scriptname_full.sql | 2 + sql/updates/r3101_mangos.sql | 2 + 9 files changed, 204 insertions(+), 11 deletions(-) create mode 100644 sql/updates/r3101_mangos.sql diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_argent_challenge.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_argent_challenge.cpp index 100b413a3..1171c8ea9 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_argent_challenge.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_argent_challenge.cpp @@ -211,6 +211,7 @@ enum SPELL_RENEW = 66537, SPELL_MEMORY_SPAWN_EFFECT = 66675, + SPELL_SHADOWFORM = 41408, }; /*###### @@ -262,6 +263,7 @@ struct boss_paletressAI : public argent_champion_commonAI void JustSummoned(Creature* pSummoned) override { + pSummoned->CastSpell(pSummoned, SPELL_SHADOWFORM, true); pSummoned->CastSpell(pSummoned, SPELL_MEMORY_SPAWN_EFFECT, true); } diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_black_knight.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_black_knight.cpp index ae173794f..e2551b2fc 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_black_knight.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_black_knight.cpp @@ -16,14 +16,113 @@ /* ScriptData SDName: boss_black_knight -SD%Complete: 0 -SDComment: Placeholder +SD%Complete: 20 +SDComment: Basic script only SDCategory: Crusader Coliseum, Trial of the Champion EndScriptData */ #include "precompiled.h" #include "trial_of_the_champion.h" +enum +{ + SPELL_KILL_CREDIT = 68663, +}; + +/*###### +## boss_black_knight +######*/ + +struct boss_black_knightAI : public ScriptedAI +{ + boss_black_knightAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (instance_trial_of_the_champion*)pCreature->GetInstanceData(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); + Reset(); + } + + instance_trial_of_the_champion* m_pInstance; + bool m_bIsRegularMode; + + void Reset() override + { + } + + void Aggro(Unit* /*pWho*/) override + { + if (m_pInstance) + m_pInstance->SetData(TYPE_BLACK_KNIGHT, IN_PROGRESS); + } + + void JustReachedHome() override + { + if (m_pInstance) + m_pInstance->SetData(TYPE_BLACK_KNIGHT, FAIL); + } + + void JustDied(Unit* /*pKiller*/) override + { + if (m_pInstance) + m_pInstance->SetData(TYPE_BLACK_KNIGHT, DONE); + + DoCastSpellIfCan(m_creature, SPELL_KILL_CREDIT, CAST_TRIGGERED); + } + + void MoveInLineOfSight(Unit* pWho) override + { + // no aggro during the intro + if (m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE)) + return; + + ScriptedAI::MoveInLineOfSight(pWho); + } + + void UpdateAI(const uint32 uiDiff) override + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_black_knight(Creature* pCreature) +{ + return new boss_black_knightAI(pCreature); +} + +/*###### +## npc_black_knight_gryphon +######*/ + +// TODO Remove this 'script' when combat can be proper prevented from core-side +struct npc_black_knight_gryphonAI : public ScriptedAI +{ + npc_black_knight_gryphonAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } + + void Reset() override { } + void AttackStart(Unit* /*pWho*/) override { } + void MoveInLineOfSight(Unit* /*pWho*/) override { } + void UpdateAI(const uint32 /*uiDiff*/) override { } +}; + +CreatureAI* GetAI_npc_black_knight_gryphon(Creature* pCreature) +{ + return new npc_black_knight_gryphonAI(pCreature); +} + void AddSC_boss_black_knight() { + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_black_knight"; + pNewScript->GetAI = &GetAI_boss_black_knight; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_black_knight_gryphon"; + pNewScript->GetAI = &GetAI_npc_black_knight_gryphon; + pNewScript->RegisterSelf(); } diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/instance_trial_of_the_champion.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/instance_trial_of_the_champion.cpp index 303aaf089..ef00345d6 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/instance_trial_of_the_champion.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/instance_trial_of_the_champion.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: instance_trial_of_the_champion -SD%Complete: 30 -SDComment: First encounter only +SD%Complete: 90 +SDComment: Fireworks and various other fine details are not yet implemented. SDCategory: Crusader Coliseum, Trial of the Champion EndScriptData */ @@ -86,8 +86,7 @@ enum SPELL_ARGENT_SUMMON_BOSS_4 = 67396, SPELL_HERALD_FACE_DARK_KNIGHT = 67482, - SPELL_DEATHS_RESPITE = 66798, - SPELL_DEATHS_PUSH = 66797, + SPELL_DEATHS_RESPITE = 66798, // triggers 66797 SPELL_ARGENT_HERALD_FEIGN_DEATH = 66804, // Arena event spells - not used for the moment @@ -123,6 +122,23 @@ static const DialogueEntryTwoSide aTocDialogues[] = // Argetn challenge complete {POINT_ID_MOUNT, 0, 0, 0, 5000}, {POINT_ID_EXIT, 0, 0, 0, 0}, + // Black knight intro + {TYPE_BLACK_KNIGHT, 0, 0, 0, 4000}, + {SAY_TIRION_ARGENT_CHAMPION_COMPLETE, NPC_TIRION_FORDRING, 0, 0, 4000}, + {SAY_HERALD_BLACK_KNIGHT_SPAWN, NPC_ARELAS_BRIGHTSTAR, SAY_HERALD_BLACK_KNIGHT_SPAWN, NPC_JAEREN_SUNSWORN, 21000}, + {NPC_BLACK_KNIGHT, 0, 0, 0, 1000}, + {SAY_BLACK_KNIGHT_INTRO_1, NPC_BLACK_KNIGHT, 0, 0, 4000}, + {SPELL_DEATHS_RESPITE, 0, 0, 0, 3000}, + {SAY_TIRION_BLACK_KNIGHT_INTRO_2, NPC_TIRION_FORDRING, 0, 0, 1000}, + {NPC_BLACK_KNIGHT_GRYPHON, 0, 0, 0, 2000}, + {SAY_BLACK_KNIGHT_INTRO_3, NPC_BLACK_KNIGHT, 0, 0, 15000}, + {SAY_BLACK_KNIGHT_INTRO_4, NPC_BLACK_KNIGHT, 0, 0, 4000}, + {SPELL_ARGENT_HERALD_FEIGN_DEATH, 0, 0, 0, 0}, + // Black knight epilog + {SPELL_SPECTATOR_FORCE_CHEER, 0, 0, 0, 5000}, + {SAY_TIRION_EPILOG_1, NPC_TIRION_FORDRING, 0, 0, 7000}, + {SAY_TIRION_EPILOG_2, NPC_TIRION_FORDRING, 0, 0, 6000}, + {SAY_VARIAN_ALLIANCE_EPILOG_3, NPC_VARIAN_WRYNN, SAY_THRALL_HORDE_EPILOG_3, NPC_THRALL, 0}, {0, 0, 0, 0, 0} }; @@ -213,6 +229,8 @@ void instance_trial_of_the_champion::OnCreatureCreate(Creature* pCreature) case NPC_SPECTATOR_GNOME: case NPC_SPECTATOR_HORDE: case NPC_SPECTATOR_ALLIANCE: + case NPC_BLACK_KNIGHT: + case NPC_BLACK_KNIGHT_GRYPHON: break; case NPC_SPECTATOR_GENERIC: // alliance side @@ -344,6 +362,9 @@ void instance_trial_of_the_champion::SetData(uint32 uiType, uint32 uiData) } break; case TYPE_BLACK_KNIGHT: + DoUseDoorOrButton(GO_NORTH_GATE); + if (uiData == DONE) + StartNextDialogueText(SPELL_SPECTATOR_FORCE_CHEER); m_auiEncounter[uiType] = uiData; break; case TYPE_ARENA_CHALLENGE: @@ -866,6 +887,64 @@ void instance_trial_of_the_champion::JustDidDialogueStep(int32 iEntry) pChampion->ForcedDespawn(8000); } break; + + // start black knight intro + case TYPE_BLACK_KNIGHT: + if (Creature* pHerald = GetSingleCreatureFromStorage(m_uiHeraldEntry)) + pHerald->GetMotionMaster()->MovePoint(0, aHeraldPositions[3][0], aHeraldPositions[3][1], aHeraldPositions[3][2]); + break; + case SAY_TIRION_ARGENT_CHAMPION_COMPLETE: + if (Creature* pHerald = GetSingleCreatureFromStorage(m_uiHeraldEntry)) + { + if (Creature* pKnight = pHerald->SummonCreature(NPC_BLACK_KNIGHT, aKnightPositions[0][0], aKnightPositions[0][1], aKnightPositions[0][2], aKnightPositions[0][3], TEMPSUMMON_DEAD_DESPAWN, 0)) + { + if (Creature* pGryphon = pHerald->SummonCreature(NPC_BLACK_KNIGHT_GRYPHON, aKnightPositions[1][0], aKnightPositions[1][1], aKnightPositions[1][2], aKnightPositions[1][3], TEMPSUMMON_TIMED_DESPAWN, 75000)) + { + pKnight->CastSpell(pGryphon, SPELL_RIDE_VEHICLE_HARDCODED, true); + pGryphon->SetWalk(false); + pGryphon->SetLevitate(true); + } + } + + if (Creature* pTirion = GetSingleCreatureFromStorage(NPC_TIRION_FORDRING)) + pHerald->SetFacingToObject(pTirion); + } + break; + case SAY_HERALD_BLACK_KNIGHT_SPAWN: + if (Creature* pHerald = GetSingleCreatureFromStorage(m_uiHeraldEntry)) + pHerald->CastSpell(pHerald, SPELL_HERALD_FACE_DARK_KNIGHT, false); + if (Creature* pGryphon = GetSingleCreatureFromStorage(NPC_BLACK_KNIGHT_GRYPHON)) + pGryphon->GetMotionMaster()->MoveWaypoint(); + break; + case NPC_BLACK_KNIGHT: + if (Creature* pGryphon = GetSingleCreatureFromStorage(NPC_BLACK_KNIGHT_GRYPHON)) + pGryphon->RemoveAurasDueToSpell(SPELL_RIDE_VEHICLE_HARDCODED); + break; + case SAY_BLACK_KNIGHT_INTRO_1: + if (Creature* pKnight = GetSingleCreatureFromStorage(NPC_BLACK_KNIGHT)) + { + if (Creature* pHerald = GetSingleCreatureFromStorage(m_uiHeraldEntry)) + { + pHerald->SetFacingToObject(pKnight); + pKnight->SetFacingToObject(pHerald); + } + } + break; + case SPELL_DEATHS_RESPITE: + if (Creature* pKnight = GetSingleCreatureFromStorage(NPC_BLACK_KNIGHT)) + pKnight->CastSpell(pKnight, SPELL_DEATHS_RESPITE, false); + break; + case NPC_BLACK_KNIGHT_GRYPHON: + if (Creature* pHerald = GetSingleCreatureFromStorage(m_uiHeraldEntry)) + pHerald->CastSpell(pHerald, SPELL_ARGENT_HERALD_FEIGN_DEATH, true); + break; + case SPELL_ARGENT_HERALD_FEIGN_DEATH: + if (Creature* pKnight = GetSingleCreatureFromStorage(NPC_BLACK_KNIGHT)) + { + pKnight->SetRespawnCoord(aKnightPositions[2][0], aKnightPositions[2][1], aKnightPositions[2][2], aKnightPositions[2][3]); + pKnight->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE); + } + break; } } diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.cpp index 92f01ea51..ec59514c7 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.cpp @@ -83,7 +83,7 @@ bool GossipSelect_npc_toc_herald(Player* pPlayer, Creature* pCreature, uint32 /* pInstance->DoPrepareArgentChallenge(); break; case GOSSIP_ACTION_INFO_DEF+4: - pInstance->SetData(TYPE_BLACK_KNIGHT, SPECIAL); + pInstance->DoPrepareBlackKnight(); break; } diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.h b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.h index 5cb95d416..68b055498 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.h +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.h @@ -163,11 +163,12 @@ enum ACHIEV_CRIT_HAD_WORSE = 11789, // Black Knight achiev 3804 }; -static const float aHeraldPositions[3][4] = +static const float aHeraldPositions[4][4] = { {745.606f, 619.705f, 411.172f, 4.66003f}, // Spawn position {732.524f, 663.007f, 412.393f, 0.0f}, // Gate movement position {743.377f, 630.240f, 411.073f, 0.0f}, // Near center position + {744.764f, 628.512f, 411.172f, 0.0f}, // Black knight intro position }; static const float aIntroPositions[4][4] = @@ -185,6 +186,13 @@ static const float aChampsPositions[3][4] = // Champ {755.232f, 660.352f, 412.477f, 4.729f}, }; +static const float aKnightPositions[3][4] = +{ + {774.283f, 665.505f, 463.484f, 4.310f}, // Black Knight spawn position + {780.694f, 669.611f, 463.662f, 3.769f}, // Gryphon spawn position + {747.788f, 632.487f, 411.414f, 4.744f}, // Center position +}; + // data that provides grand champion entry, vehicle mount, trash champions with the spawn locations as well as crowd stalker and emote entry struct ChampionsData { @@ -295,6 +303,7 @@ class instance_trial_of_the_champion : public ScriptedInstance, private Dialogue void DoSetChamptionsInCombat(Unit* pTarget); void DoPrepareArgentChallenge() { StartNextDialogueText(NPC_ARGENT_MONK); } + void DoPrepareBlackKnight() { StartNextDialogueText(TYPE_BLACK_KNIGHT); } uint32 GetMountEntryForChampion() { return m_uiTeam == ALLIANCE ? NPC_BATTLEWORG_ALLIANCE : NPC_WARHORSE_HORDE; } bool IsArenaChallengeComplete(uint32 uiType); diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 437003c74..721ff76ce 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3100" + #define SD2_REVISION_NR "3101" #endif // __SD2_REVISION_NR_H__ diff --git a/sd2_revision_sql.h b/sd2_revision_sql.h index f47a90c17..997c33355 100644 --- a/sd2_revision_sql.h +++ b/sd2_revision_sql.h @@ -1,5 +1,5 @@ #ifndef __SD2_REVISION_SQL_H__ #define __SD2_REVISION_SQL_H__ -#define REVISION_DB_SCRIPTDEV2 "required__scriptdev2" -#define REVISION_DB_SD2_MANGOS "required__mangos" + #define REVISION_DB_SCRIPTDEV2 "required__scriptdev2" + #define REVISION_DB_SD2_MANGOS "required__mangos" #endif // __SD2_REVISION_SQL_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 55c3d8933..598022d04 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -494,6 +494,8 @@ UPDATE creature_template SET ScriptName='npc_champion_mount' WHERE entry IN (356 UPDATE creature_template SET ScriptName='npc_trial_grand_champion' WHERE entry IN (35328,35331,35330,35332,35329,35314,35326,35325,35323,35327); UPDATE creature_template SET ScriptName='boss_eadric' WHERE entry=35119; UPDATE creature_template SET ScriptName='boss_paletress' WHERE entry=34928; +UPDATE creature_template SET ScriptName='boss_black_knight' WHERE entry=35451; +UPDATE creature_template SET ScriptName='npc_black_knight_gryphon' WHERE entry=35491; /* TRIAL OF THE CRUSADER */ UPDATE instance_template SET ScriptName='instance_trial_of_the_crusader' WHERE map=649; diff --git a/sql/updates/r3101_mangos.sql b/sql/updates/r3101_mangos.sql new file mode 100644 index 000000000..85bd02292 --- /dev/null +++ b/sql/updates/r3101_mangos.sql @@ -0,0 +1,2 @@ +UPDATE creature_template SET ScriptName='boss_black_knight' WHERE entry=35451; +UPDATE creature_template SET ScriptName='npc_black_knight_gryphon' WHERE entry=35491; From 947799f8bdbd19451d1e3ad68f0c9e1e83ec6420 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sun, 8 Feb 2015 18:29:57 +0100 Subject: [PATCH 1115/1172] [3102] Implement script for The Black Knight - ToC5 --- .../boss_black_knight.cpp | 259 +++++++++++++++++- .../instance_trial_of_the_champion.cpp | 26 +- .../trial_of_the_champion.h | 3 + sd2_revision_nr.h | 2 +- sql/scriptdev2_script_full.sql | 9 +- sql/updates/r3102_scriptdev2.sql | 8 + 6 files changed, 298 insertions(+), 9 deletions(-) create mode 100644 sql/updates/r3102_scriptdev2.sql diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_black_knight.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_black_knight.cpp index e2551b2fc..e2169e739 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_black_knight.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_black_knight.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: boss_black_knight -SD%Complete: 20 -SDComment: Basic script only +SD%Complete: 90 +SDComment: Achievement NYI SDCategory: Crusader Coliseum, Trial of the Champion EndScriptData */ @@ -26,7 +26,48 @@ EndScriptData */ enum { + SAY_PHASE_2 = -1650066, + SAY_PHASE_3 = -1650067, + SAY_KILL_1 = -1650068, + SAY_KILL_2 = -1650069, + SAY_DEATH = -1650070, + + // generic spells SPELL_KILL_CREDIT = 68663, + SPELL_FEIGN_DEATH = 67691, // triggers 67693 + SPELL_CLEAR_ALL_DEBUFFS = 34098, + SPELL_FULL_HEAL = 17683, + SPELL_BLACK_KNIGHT_RES = 67693, + SPELL_RAISE_DEAD_ARELAS = 67705, + SPELL_RAISE_DEAD_JAEREN = 67715, + + // phase 1 + SPELL_DEATHS_RESPITE = 67745, + SPELL_ICY_TOUCH = 67718, + SPELL_OBLITERATE = 67725, + SPELL_PLAGUE_STRIKE = 67724, + + // phase 2 + SPELL_ARMY_OF_THE_DEAD = 67761, + SPELL_DESECRATION = 67778, + SPELL_GHOUL_EXPLODE = 67751, // triggers 67729 + + // phase 3 + SPELL_DEATHS_BITE = 67808, + SPELL_MARKED_FOR_DEATH = 67823, + + // transform models + MODEL_ID_SKELETON = 29846, + MODEL_ID_GHOST = 21300, + + // equipment id + EQUIP_ID_SWORD = 40343, + + // phases + PHASE_DEATH_KNIGHT = 1, + PHASE_SKELETON = 2, + PHASE_GHOST = 3, + PHASE_TRANSITION = 4, }; /*###### @@ -38,27 +79,63 @@ struct boss_black_knightAI : public ScriptedAI boss_black_knightAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (instance_trial_of_the_champion*)pCreature->GetInstanceData(); - m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); Reset(); } instance_trial_of_the_champion* m_pInstance; - bool m_bIsRegularMode; + + uint8 m_uiPhase; + uint8 m_uiNextPhase; + + uint32 m_uiDeathsRespiteTimer; + uint32 m_uiIcyTouchTimer; + uint32 m_uiObliterateTimer; + uint32 m_uiPlagueStrikeTimer; + + uint32 m_uiDesecrationTimer; + uint32 m_uiGhoulExplodeTimer; + + uint32 m_uiDeathsBiteTimer; + uint32 m_uiMarkedDeathTimer; void Reset() override { + m_uiPhase = PHASE_DEATH_KNIGHT; + + m_uiDeathsRespiteTimer = 10000; + m_uiIcyTouchTimer = urand(5000, 10000); + m_uiObliterateTimer = urand(10000, 15000); + m_uiPlagueStrikeTimer = 5000; + + m_uiDesecrationTimer = 6000; + m_uiGhoulExplodeTimer = 10000; + + m_uiMarkedDeathTimer = 0; + m_uiDeathsBiteTimer = 7000; + + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + m_creature->SetStandState(UNIT_STAND_STATE_STAND); + m_creature->SetDisplayId(m_creature->GetNativeDisplayId()); + SetEquipmentSlots(false, EQUIP_ID_SWORD, EQUIP_NO_CHANGE, EQUIP_NO_CHANGE); } void Aggro(Unit* /*pWho*/) override { if (m_pInstance) - m_pInstance->SetData(TYPE_BLACK_KNIGHT, IN_PROGRESS); + DoCastSpellIfCan(m_creature, m_pInstance->GetPlayerTeam() == ALLIANCE ? SPELL_RAISE_DEAD_ARELAS : SPELL_RAISE_DEAD_JAEREN); + } + + void KilledUnit(Unit* /*pVictim*/) override + { + DoScriptText(urand(0, 1) ? SAY_KILL_1 : SAY_KILL_2, m_creature); } void JustReachedHome() override { if (m_pInstance) m_pInstance->SetData(TYPE_BLACK_KNIGHT, FAIL); + + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE); } void JustDied(Unit* /*pKiller*/) override @@ -66,6 +143,7 @@ struct boss_black_knightAI : public ScriptedAI if (m_pInstance) m_pInstance->SetData(TYPE_BLACK_KNIGHT, DONE); + DoScriptText(SAY_DEATH, m_creature); DoCastSpellIfCan(m_creature, SPELL_KILL_CREDIT, CAST_TRIGGERED); } @@ -78,11 +156,169 @@ struct boss_black_knightAI : public ScriptedAI ScriptedAI::MoveInLineOfSight(pWho); } + void JustSummoned(Creature* pSummoned) override + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + pSummoned->AI()->AttackStart(pTarget); + } + + void DamageTaken(Unit* /*pDealer*/, uint32& uiDamage) override + { + if (m_uiPhase == PHASE_GHOST) + return; + + if (uiDamage >= m_creature->GetHealth()) + { + uiDamage = 0; + + if (m_uiPhase == PHASE_TRANSITION) + return; + + // start transition phase + if (m_uiPhase == PHASE_DEATH_KNIGHT) + m_uiNextPhase = PHASE_SKELETON; + else if (m_uiPhase == PHASE_SKELETON) + m_uiNextPhase = PHASE_GHOST; + + m_creature->InterruptNonMeleeSpells(true); + m_creature->SetHealth(0); + m_creature->StopMoving(); + m_creature->ClearComboPointHolders(); + m_creature->RemoveAllAurasOnDeath(); + m_creature->ModifyAuraState(AURA_STATE_HEALTHLESS_20_PERCENT, false); + m_creature->ModifyAuraState(AURA_STATE_HEALTHLESS_35_PERCENT, false); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + m_creature->ClearAllReactives(); + m_creature->GetMotionMaster()->Clear(); + m_creature->GetMotionMaster()->MoveIdle(); + m_creature->SetStandState(UNIT_STAND_STATE_DEAD); + + DoCastSpellIfCan(m_creature, SPELL_FEIGN_DEATH, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_CLEAR_ALL_DEBUFFS, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_FULL_HEAL, CAST_TRIGGERED); + m_uiPhase = PHASE_TRANSITION; + } + } + + void ReceiveAIEvent(AIEventType eventType, Creature* /*pSender*/, Unit* pInvoker, uint32 /*uiMiscValue*/) override + { + // finish transition + if (eventType == AI_EVENT_CUSTOM_A) + { + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + m_creature->SetStandState(UNIT_STAND_STATE_STAND); + m_creature->GetMotionMaster()->Clear(); + m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); + + m_uiPhase = m_uiNextPhase; + + if (m_uiPhase == PHASE_SKELETON) + { + DoScriptText(SAY_PHASE_2, m_creature); + m_creature->SetDisplayId(MODEL_ID_SKELETON); + + DoCastSpellIfCan(m_creature, SPELL_ARMY_OF_THE_DEAD); + } + else if (m_uiPhase == PHASE_GHOST) + { + DoScriptText(SAY_PHASE_3, m_creature); + m_creature->SetDisplayId(MODEL_ID_GHOST); + + SetEquipmentSlots(false, EQUIP_UNEQUIP, EQUIP_NO_CHANGE, EQUIP_NO_CHANGE); + } + } + } + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; + switch (m_uiPhase) + { + case PHASE_DEATH_KNIGHT: + + if (m_uiDeathsRespiteTimer < uiDiff) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, SPELL_DEATHS_RESPITE) == CAST_OK) + m_uiDeathsRespiteTimer = 20000; + } + } + else + m_uiDeathsRespiteTimer -= uiDiff; + + if (m_uiIcyTouchTimer < uiDiff) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0, SPELL_ICY_TOUCH, SELECT_FLAG_IN_MELEE_RANGE | SELECT_FLAG_IN_LOS)) + { + if (DoCastSpellIfCan(pTarget, SPELL_ICY_TOUCH) == CAST_OK) + m_uiIcyTouchTimer = urand(10000, 15000); + } + } + else + m_uiIcyTouchTimer -= uiDiff; + + if (m_uiObliterateTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_OBLITERATE) == CAST_OK) + m_uiObliterateTimer = urand(18000, 25000); + } + else + m_uiObliterateTimer -= uiDiff; + + if (m_uiPlagueStrikeTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_PLAGUE_STRIKE) == CAST_OK) + m_uiPlagueStrikeTimer = 10000; + } + else + m_uiPlagueStrikeTimer -= uiDiff; + + break; + case PHASE_SKELETON: + + if (m_uiDesecrationTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_DESECRATION) == CAST_OK) + m_uiDesecrationTimer = 6000; + } + else + m_uiDesecrationTimer -= uiDiff; + + if (m_uiGhoulExplodeTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_GHOUL_EXPLODE) == CAST_OK) + m_uiGhoulExplodeTimer = 12000; + } + else + m_uiGhoulExplodeTimer -= uiDiff; + + break; + case PHASE_GHOST: + + if (m_uiDeathsBiteTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_DEATHS_BITE) == CAST_OK) + m_uiDeathsBiteTimer = 2000; + } + else + m_uiDeathsBiteTimer -= uiDiff; + + if (m_uiMarkedDeathTimer < uiDiff) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, SPELL_MARKED_FOR_DEATH) == CAST_OK) + m_uiMarkedDeathTimer = urand(10000, 15000); + } + } + else + m_uiMarkedDeathTimer -= uiDiff; + break; + } + DoMeleeAttackIfReady(); } }; @@ -92,6 +328,18 @@ CreatureAI* GetAI_boss_black_knight(Creature* pCreature) return new boss_black_knightAI(pCreature); } +bool EffectDummyCreature_black_knight_res(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget, ObjectGuid /*originalCasterGuid*/) +{ + // always check spellid and effectindex + if (uiSpellId == SPELL_BLACK_KNIGHT_RES && uiEffIndex == EFFECT_INDEX_0) + { + pCreatureTarget->AI()->SendAIEvent(AI_EVENT_CUSTOM_A, pCaster, pCreatureTarget); + return true; + } + + return false; +} + /*###### ## npc_black_knight_gryphon ######*/ @@ -119,6 +367,7 @@ void AddSC_boss_black_knight() pNewScript = new Script; pNewScript->Name = "boss_black_knight"; pNewScript->GetAI = &GetAI_boss_black_knight; + pNewScript->pEffectDummyNPC = &EffectDummyCreature_black_knight_res; pNewScript->RegisterSelf(); pNewScript = new Script; diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/instance_trial_of_the_champion.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/instance_trial_of_the_champion.cpp index ef00345d6..9152d6fba 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/instance_trial_of_the_champion.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/instance_trial_of_the_champion.cpp @@ -62,6 +62,11 @@ enum SAY_BLACK_KNIGHT_INTRO_3 = -1650041, SAY_BLACK_KNIGHT_INTRO_4 = -1650042, + // black knight aggro + SAY_BLACK_KNIGHT_AGGRO = -1650065, + SAY_GARROSH_BLACK_KNIGHT = -1650047, + SAY_VARIAN_BLACK_KNIGHT = -1650050, + // event complete SAY_TIRION_EPILOG_1 = -1650043, SAY_TIRION_EPILOG_2 = -1650044, @@ -69,10 +74,8 @@ enum SAY_THRALL_HORDE_EPILOG_3 = -1650046, // other texts - SAY_GARROSH_OTHER_1 = -1650047, SAY_THRALL_OTHER_2 = -1650048, SAY_GARROSH_OTHER_3 = -1650049, - SAY_VARIAN_OTHER_4 = -1650050, SAY_VARIAN_OTHER_5 = -1650051, // sounds @@ -139,6 +142,9 @@ static const DialogueEntryTwoSide aTocDialogues[] = {SAY_TIRION_EPILOG_1, NPC_TIRION_FORDRING, 0, 0, 7000}, {SAY_TIRION_EPILOG_2, NPC_TIRION_FORDRING, 0, 0, 6000}, {SAY_VARIAN_ALLIANCE_EPILOG_3, NPC_VARIAN_WRYNN, SAY_THRALL_HORDE_EPILOG_3, NPC_THRALL, 0}, + // Black knight aggro + {SAY_BLACK_KNIGHT_AGGRO, NPC_BLACK_KNIGHT, 0, 0, 5000}, + {SAY_VARIAN_BLACK_KNIGHT, NPC_VARIAN_WRYNN, SAY_GARROSH_BLACK_KNIGHT, NPC_GARROSH, 0}, {0, 0, 0, 0, 0} }; @@ -550,6 +556,15 @@ void instance_trial_of_the_champion::OnCreatureDespawn(Creature* pCreature) } } +void instance_trial_of_the_champion::OnCreatureEnterCombat(Creature* pCreature) +{ + if (pCreature->GetEntry() == NPC_BLACK_KNIGHT) + { + SetData(TYPE_BLACK_KNIGHT, IN_PROGRESS); + StartNextDialogueText(SAY_BLACK_KNIGHT_AGGRO); + } +} + // Function that returns the arena challenge status bool instance_trial_of_the_champion::IsArenaChallengeComplete(uint32 uiType) { @@ -938,6 +953,13 @@ void instance_trial_of_the_champion::JustDidDialogueStep(int32 iEntry) if (Creature* pHerald = GetSingleCreatureFromStorage(m_uiHeraldEntry)) pHerald->CastSpell(pHerald, SPELL_ARGENT_HERALD_FEIGN_DEATH, true); break; + case SAY_BLACK_KNIGHT_INTRO_3: + if (Creature* pKnight = GetSingleCreatureFromStorage(NPC_BLACK_KNIGHT)) + { + if (Creature* pTirion = GetSingleCreatureFromStorage(NPC_TIRION_FORDRING)) + pKnight->SetFacingToObject(pTirion); + } + break; case SPELL_ARGENT_HERALD_FEIGN_DEATH: if (Creature* pKnight = GetSingleCreatureFromStorage(NPC_BLACK_KNIGHT)) { diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.h b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.h index 68b055498..a6dcd2126 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.h +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.h @@ -289,10 +289,13 @@ class instance_trial_of_the_champion : public ScriptedInstance, private Dialogue void OnCreatureDeath(Creature* pCreature) override; void OnCreatureEvade(Creature* pCreature) override; void OnCreatureDespawn(Creature* pCreature) override; + void OnCreatureEnterCombat(Creature* pCreature) override; void SetData(uint32 uiType, uint32 uiData) override; uint32 GetData(uint32 uiType) const override; + uint32 GetPlayerTeam() { return m_uiTeam; } + const char* Save() const override { return m_strInstData.c_str(); } void Load(const char* chrIn) override; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 721ff76ce..4a8f967ba 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3101" + #define SD2_REVISION_NR "3102" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index f11695188..e49d3e7a9 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -4796,7 +4796,14 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1650061,'Even the darkest memory fades when confronted.',16249,1,0,0,'paletress SAY_MEMORY_DIES'), (-1650062,'Take your rest.',16250,1,0,0,'paletress SAY_KILL_1'), (-1650063,'Be at ease.',16251,1,0,0,'paletress SAY_KILL_2'), -(-1650064,'Excellent work!',16252,1,0,0,'paletress SAY_DEFEAT'); +(-1650064,'Excellent work!',16252,1,0,0,'paletress SAY_DEFEAT'), + +(-1650065,'This farce ends here!',16259,1,0,0,'black knight SAY_AGGRO'), +(-1650066,'My rotting flesh was just getting in the way!',16262,1,0,0,'black knight SAY_PHASE_2'), +(-1650067,'I have no need for bones to best you!',16263,1,0,0,'black knight SAY_PHASE_3'), +(-1650068,'A waste of flesh.',16260,1,0,0,'black knight SAY_KILL_1'), +(-1650069,'Pathetic.',16261,1,0,0,'black knight SAY_KILL_2'), +(-1650070,'No! I must not fail... again...',16264,1,0,0,'black knight SAY_DEATH'); -- -1 658 000 ICC: PIT OF SARON INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES diff --git a/sql/updates/r3102_scriptdev2.sql b/sql/updates/r3102_scriptdev2.sql new file mode 100644 index 000000000..83ba22bd4 --- /dev/null +++ b/sql/updates/r3102_scriptdev2.sql @@ -0,0 +1,8 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1650070 AND -1650065; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1650065,'This farce ends here!',16259,1,0,0,'black knight SAY_AGGRO'), +(-1650066,'My rotting flesh was just getting in the way!',16262,1,0,0,'black knight SAY_PHASE_2'), +(-1650067,'I have no need for bones to best you!',16263,1,0,0,'black knight SAY_PHASE_3'), +(-1650068,'A waste of flesh.',16260,1,0,0,'black knight SAY_KILL_1'), +(-1650069,'Pathetic.',16261,1,0,0,'black knight SAY_KILL_2'), +(-1650070,'No! I must not fail... again...',16264,1,0,0,'black knight SAY_DEATH'); From 9231b312f28dd30c272b8e9889fc874523c62612 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sun, 8 Feb 2015 20:02:34 +0100 Subject: [PATCH 1116/1172] [3103] Add script support for Black Knight ghouls - ToC5 Also add support for achievement 3804 --- .../boss_black_knight.cpp | 104 +++++++++++++++++- .../instance_trial_of_the_champion.cpp | 19 +++- .../trial_of_the_champion.h | 9 +- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 + sql/updates/r3103_mangos.sql | 1 + 6 files changed, 128 insertions(+), 8 deletions(-) create mode 100644 sql/updates/r3103_mangos.sql diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_black_knight.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_black_knight.cpp index e2169e739..b87893931 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_black_knight.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_black_knight.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: boss_black_knight -SD%Complete: 90 -SDComment: Achievement NYI +SD%Complete: 100 +SDComment: SDCategory: Crusader Coliseum, Trial of the Champion EndScriptData */ @@ -56,6 +56,16 @@ enum SPELL_DEATHS_BITE = 67808, SPELL_MARKED_FOR_DEATH = 67823, + // ghoul spells + SPELL_CLAW = 67774, + SPELL_EXPLODE = 67729, + SPELL_LEAP = 67749, + + // risen zombies + NPC_RISEN_JAEREN = 35545, + NPC_RISEN_ARELAS = 35564, + NPC_RISEN_CHAMPION = 35590, + // transform models MODEL_ID_SKELETON = 29846, MODEL_ID_GHOST = 21300, @@ -98,6 +108,8 @@ struct boss_black_knightAI : public ScriptedAI uint32 m_uiDeathsBiteTimer; uint32 m_uiMarkedDeathTimer; + ObjectGuid m_ghoulGuid; + void Reset() override { m_uiPhase = PHASE_DEATH_KNIGHT; @@ -160,6 +172,9 @@ struct boss_black_knightAI : public ScriptedAI { if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) pSummoned->AI()->AttackStart(pTarget); + + if (pSummoned->GetEntry() == NPC_RISEN_JAEREN || pSummoned->GetEntry() == NPC_RISEN_ARELAS) + m_ghoulGuid = pSummoned->GetObjectGuid(); } void DamageTaken(Unit* /*pDealer*/, uint32& uiDamage) override @@ -176,7 +191,16 @@ struct boss_black_knightAI : public ScriptedAI // start transition phase if (m_uiPhase == PHASE_DEATH_KNIGHT) + { m_uiNextPhase = PHASE_SKELETON; + + // ghould explodes at the end of the round + if (Creature* pGhoul = m_creature->GetMap()->GetCreature(m_ghoulGuid)) + { + pGhoul->InterruptNonMeleeSpells(true); + pGhoul->CastSpell(pGhoul, SPELL_EXPLODE, false); + } + } else if (m_uiPhase == PHASE_SKELETON) m_uiNextPhase = PHASE_GHOST; @@ -209,6 +233,7 @@ struct boss_black_knightAI : public ScriptedAI m_creature->SetStandState(UNIT_STAND_STATE_STAND); m_creature->GetMotionMaster()->Clear(); m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); + DoResetThreat(); m_uiPhase = m_uiNextPhase; @@ -340,6 +365,76 @@ bool EffectDummyCreature_black_knight_res(Unit* pCaster, uint32 uiSpellId, Spell return false; } +/*###### +## npc_black_knight_ghoul +######*/ + +struct npc_black_knight_ghoulAI : public ScriptedAI +{ + npc_black_knight_ghoulAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (instance_trial_of_the_champion*)pCreature->GetInstanceData(); + Reset(); + } + + instance_trial_of_the_champion* m_pInstance; + + uint32 m_uiClawTimer; + + bool m_bExploded; + + void Reset() override + { + m_uiClawTimer = urand(3000, 6000); + + m_bExploded = false; + } + + void Aggro(Unit* pWho) override + { + if (m_creature->GetEntry() == NPC_RISEN_ARELAS || m_creature->GetEntry() == NPC_RISEN_JAEREN) + DoCastSpellIfCan(pWho, SPELL_LEAP); + } + + void SpellHitTarget(Unit* pUnit, const SpellEntry* pSpellEntry) override + { + if (pUnit->GetTypeId() != TYPEID_PLAYER) + return; + + // set achiev failed + if (pSpellEntry->Id == SPELL_EXPLODE && m_pInstance) + m_pInstance->SetHadWorseAchievFailed(); + } + + void UpdateAI(const uint32 uiDiff) override + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + // explode on low health + if (!m_bExploded && m_creature->GetHealthPercent() < 15.0f) + { + if (DoCastSpellIfCan(m_creature, SPELL_EXPLODE, CAST_INTERRUPT_PREVIOUS) == CAST_OK) + m_bExploded = true; + } + + if (m_uiClawTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_CLAW) == CAST_OK) + m_uiClawTimer = urand(7000, 14000); + } + else + m_uiClawTimer -= uiDiff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_npc_black_knight_ghoul(Creature* pCreature) +{ + return new npc_black_knight_ghoulAI(pCreature); +} + /*###### ## npc_black_knight_gryphon ######*/ @@ -370,6 +465,11 @@ void AddSC_boss_black_knight() pNewScript->pEffectDummyNPC = &EffectDummyCreature_black_knight_res; pNewScript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "npc_black_knight_ghoul"; + pNewScript->GetAI = &GetAI_npc_black_knight_ghoul; + pNewScript->RegisterSelf(); + pNewScript = new Script; pNewScript->Name = "npc_black_knight_gryphon"; pNewScript->GetAI = &GetAI_npc_black_knight_gryphon; diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/instance_trial_of_the_champion.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/instance_trial_of_the_champion.cpp index 9152d6fba..72a9800f8 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/instance_trial_of_the_champion.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/instance_trial_of_the_champion.cpp @@ -158,7 +158,8 @@ instance_trial_of_the_champion::instance_trial_of_the_champion(Map* pMap) : Scri m_uiGateResetTimer(0), m_uiChampionsCount(0), m_uiChampionsTimer(0), - m_bSkipIntro(false) + m_bSkipIntro(false), + m_bHadWorseAchiev(false) { Initialize(); } @@ -371,6 +372,8 @@ void instance_trial_of_the_champion::SetData(uint32 uiType, uint32 uiData) DoUseDoorOrButton(GO_NORTH_GATE); if (uiData == DONE) StartNextDialogueText(SPELL_SPECTATOR_FORCE_CHEER); + else if (uiData == IN_PROGRESS) + m_bHadWorseAchiev = true; m_auiEncounter[uiType] = uiData; break; case TYPE_ARENA_CHALLENGE: @@ -458,6 +461,20 @@ void instance_trial_of_the_champion::Load(const char* chrIn) OUT_LOAD_INST_DATA_COMPLETE; } +bool instance_trial_of_the_champion::CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* /*pSource*/, Unit const* /*pTarget*/, uint32 /*uiMiscValue1 = 0*/) const +{ + switch (uiCriteriaId) + { + case ACHIEV_CRIT_HAD_WORSE: + return m_bHadWorseAchiev; + //case ACHIEV_CRIT_FACEROLLER: + // return m_bFacerollerAchiev; + + default: + return false; + } +} + void instance_trial_of_the_champion::OnCreatureDeath(Creature* pCreature) { switch (pCreature->GetEntry()) diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.h b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.h index a6dcd2126..3b539afa4 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.h +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.h @@ -95,10 +95,6 @@ enum // black knight NPC_BLACK_KNIGHT = 35451, NPC_BLACK_KNIGHT_GRYPHON = 35491, - // risen zombies - NPC_RISEN_JAEREN = 35545, - NPC_RISEN_ARELAS = 35564, - NPC_RISEN_CHAMPION = 35590, // doors GO_MAIN_GATE = 195647, @@ -305,9 +301,13 @@ class instance_trial_of_the_champion : public ScriptedInstance, private Dialogue void DoSendChampionsToExit(); void DoSetChamptionsInCombat(Unit* pTarget); + void SetHadWorseAchievFailed() { m_bHadWorseAchiev = false; } + void DoPrepareArgentChallenge() { StartNextDialogueText(NPC_ARGENT_MONK); } void DoPrepareBlackKnight() { StartNextDialogueText(TYPE_BLACK_KNIGHT); } + bool CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/) const override; + uint32 GetMountEntryForChampion() { return m_uiTeam == ALLIANCE ? NPC_BATTLEWORG_ALLIANCE : NPC_WARHORSE_HORDE; } bool IsArenaChallengeComplete(uint32 uiType); @@ -336,6 +336,7 @@ class instance_trial_of_the_champion : public ScriptedInstance, private Dialogue uint32 m_uiChampionsTimer; bool m_bSkipIntro; + bool m_bHadWorseAchiev; ObjectGuid m_ArenaChampionsGuids[MAX_CHAMPIONS_ARENA]; ObjectGuid m_ArenaMountsGuids[MAX_CHAMPIONS_ARENA]; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 4a8f967ba..c07810fcf 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3102" + #define SD2_REVISION_NR "3103" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 598022d04..155cb3c21 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -496,6 +496,7 @@ UPDATE creature_template SET ScriptName='boss_eadric' WHERE entry=35119; UPDATE creature_template SET ScriptName='boss_paletress' WHERE entry=34928; UPDATE creature_template SET ScriptName='boss_black_knight' WHERE entry=35451; UPDATE creature_template SET ScriptName='npc_black_knight_gryphon' WHERE entry=35491; +UPDATE creature_template SET ScriptName='npc_black_knight_ghoul' WHERE entry IN (35545,35564,35590); /* TRIAL OF THE CRUSADER */ UPDATE instance_template SET ScriptName='instance_trial_of_the_crusader' WHERE map=649; diff --git a/sql/updates/r3103_mangos.sql b/sql/updates/r3103_mangos.sql new file mode 100644 index 000000000..212d67349 --- /dev/null +++ b/sql/updates/r3103_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_black_knight_ghoul' WHERE entry IN (35545,35564,35590); From 0ac342f6a6722f9c9c526b85f8058fa7d9078fc4 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sun, 8 Feb 2015 21:07:46 +0100 Subject: [PATCH 1117/1172] [3104] Improve Grand Champions handling - ToC5 --- .../boss_grand_champions.cpp | 67 ++++++++++--------- sd2_revision_nr.h | 2 +- 2 files changed, 36 insertions(+), 33 deletions(-) diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_grand_champions.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_grand_champions.cpp index 664b11fed..a8d7d6432 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_grand_champions.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_grand_champions.cpp @@ -79,6 +79,8 @@ struct trial_companion_commonAI : public ScriptedAI m_uiResetThreatTimer = urand(5000, 15000); m_bDefeated = false; + + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); } void Aggro(Unit* pWho) override @@ -131,44 +133,45 @@ struct trial_companion_commonAI : public ScriptedAI if (m_bDefeated) return; - if (m_pInstance) + if (!m_pInstance) + return; + + // second part of the champions challenge + if (m_pInstance->GetData(TYPE_ARENA_CHALLENGE) == DONE) + { + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + m_creature->InterruptNonMeleeSpells(false); + m_creature->SetStandState(UNIT_STAND_STATE_KNEEL); + m_creature->SetHealth(1); + + // no movement + SetCombatMovement(false); + m_creature->GetMotionMaster()->Clear(); + m_creature->GetMotionMaster()->MoveIdle(); + + // check if the other champions are wounded and set instance data + if (m_pInstance->IsArenaChallengeComplete(TYPE_GRAND_CHAMPIONS)) + m_pInstance->SetData(TYPE_GRAND_CHAMPIONS, DONE); + } + // first part of the champions challenge (arena encounter) + else { - // second part of the champions challenge - if (m_pInstance->GetData(TYPE_ARENA_CHALLENGE) == DONE) + // unmount + if (Creature* pMount = (Creature*)m_creature->GetTransportInfo()->GetTransport()) { - m_creature->InterruptNonMeleeSpells(false); - m_creature->SetStandState(UNIT_STAND_STATE_KNEEL); - m_creature->SetHealth(1); - - // no movement - SetCombatMovement(false); - m_creature->GetMotionMaster()->Clear(); - m_creature->GetMotionMaster()->MoveIdle(); - - // check if the other champions are wounded and set instance data - if (m_pInstance->IsArenaChallengeComplete(TYPE_GRAND_CHAMPIONS)) - m_pInstance->SetData(TYPE_GRAND_CHAMPIONS, DONE); + pMount->RemoveSpellsCausingAura(SPELL_AURA_CONTROL_VEHICLE); + pMount->ForcedDespawn(); } - // first part of the champions challenge (arena encounter) - else - { - // unmount - if (Creature* pMount = (Creature*)m_creature->GetTransportInfo()->GetTransport()) - { - pMount->RemoveSpellsCausingAura(SPELL_AURA_CONTROL_VEHICLE); - pMount->ForcedDespawn(); - } - m_creature->SetStandState(UNIT_STAND_STATE_DEAD); - m_creature->SetHealth(1); + m_creature->SetStandState(UNIT_STAND_STATE_DEAD); + m_creature->SetHealth(1); - // no movement - SetCombatMovement(false); - m_creature->GetMotionMaster()->Clear(); - m_creature->GetMotionMaster()->MoveIdle(); + // no movement + SetCombatMovement(false); + m_creature->GetMotionMaster()->Clear(); + m_creature->GetMotionMaster()->MoveIdle(); - m_uiDefeatedTimer = 15000; - } + m_uiDefeatedTimer = 15000; } m_bDefeated = true; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index c07810fcf..cc0da27ea 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3103" + #define SD2_REVISION_NR "3104" #endif // __SD2_REVISION_NR_H__ From cc358f62f4e9b716f626977d8ab71953a0d0eaf7 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sun, 8 Feb 2015 21:37:19 +0100 Subject: [PATCH 1118/1172] [3105] Cost kill credit spells for the Grand Champions - ToC5 --- .../trial_of_the_champion/boss_grand_champions.cpp | 1 - .../trial_of_the_champion/instance_trial_of_the_champion.cpp | 5 +++++ sd2_revision_nr.h | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_grand_champions.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_grand_champions.cpp index a8d7d6432..3ec1cbfd2 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_grand_champions.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_grand_champions.cpp @@ -29,7 +29,6 @@ enum { // common spells SPELL_DEFEND_DUMMY = 64101, // triggers 62719, 64192 - SPELL_KILL_CREDIT = 68572, // achiev check spell SPELL_SHIELD_BREAKER = 68504, SPELL_CHARGE = 68301, // triggers 68307 diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/instance_trial_of_the_champion.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/instance_trial_of_the_champion.cpp index 72a9800f8..11e2a1c5b 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/instance_trial_of_the_champion.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/instance_trial_of_the_champion.cpp @@ -87,6 +87,7 @@ enum SPELL_ARGENT_SUMMON_CHAMPION_2 = 66671, SPELL_ARGENT_SUMMON_CHAMPION_3 = 66673, SPELL_ARGENT_SUMMON_BOSS_4 = 67396, + SPELL_CHAMPION_KILL_CREDIT = 68572, // achiev check spell SPELL_HERALD_FACE_DARK_KNIGHT = 67482, SPELL_DEATHS_RESPITE = 66798, // triggers 66797 @@ -791,6 +792,10 @@ void instance_trial_of_the_champion::DoSendChampionsToExit() { if (Creature* pChampion = instance->GetCreature(m_ArenaChampionsGuids[i])) { + // kill credit spell on completion + if (GetData(TYPE_GRAND_CHAMPIONS) == DONE) + pChampion->CastSpell(pChampion, SPELL_CHAMPION_KILL_CREDIT, true); + pChampion->SetWalk(true); pChampion->SetStandState(UNIT_STAND_STATE_STAND); pChampion->GetMotionMaster()->MovePoint(POINT_ID_EXIT, aChampsPositions[0][0], aChampsPositions[0][1], aChampsPositions[0][2]); diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index cc0da27ea..1d2b5ce32 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3104" + #define SD2_REVISION_NR "3105" #endif // __SD2_REVISION_NR_H__ From 0a2b3c8717dcea19348befd84f7a45bdc8701074 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sun, 8 Feb 2015 22:04:36 +0100 Subject: [PATCH 1119/1172] [3106] Add a few random fixes Close #45 Also improve one of the previous commits --- scripts/eastern_kingdoms/deadmines/boss_mr_smite.cpp | 5 +++++ .../trial_of_the_champion/boss_black_knight.cpp | 2 +- sd2_revision_nr.h | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/scripts/eastern_kingdoms/deadmines/boss_mr_smite.cpp b/scripts/eastern_kingdoms/deadmines/boss_mr_smite.cpp index 1d93a0af9..91064adae 100644 --- a/scripts/eastern_kingdoms/deadmines/boss_mr_smite.cpp +++ b/scripts/eastern_kingdoms/deadmines/boss_mr_smite.cpp @@ -94,6 +94,11 @@ struct boss_mr_smiteAI : public ScriptedAI } } + void JustReachedHome() override + { + DoCastSpellIfCan(m_creature, SPELL_NIBLE_REFLEXES, CAST_TRIGGERED | CAST_AURA_NOT_PRESENT); + } + void MovementInform(uint32 uiMotionType, uint32 /*uiPointId*/) override { if (uiMotionType != POINT_MOTION_TYPE) diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_black_knight.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_black_knight.cpp index b87893931..d961266f7 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_black_knight.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_black_knight.cpp @@ -128,7 +128,7 @@ struct boss_black_knightAI : public ScriptedAI m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); m_creature->SetStandState(UNIT_STAND_STATE_STAND); m_creature->SetDisplayId(m_creature->GetNativeDisplayId()); - SetEquipmentSlots(false, EQUIP_ID_SWORD, EQUIP_NO_CHANGE, EQUIP_NO_CHANGE); + SetEquipmentSlots(true); } void Aggro(Unit* /*pWho*/) override diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 1d2b5ce32..23b2d165e 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3105" + #define SD2_REVISION_NR "3106" #endif // __SD2_REVISION_NR_H__ From f575439a377cd7511e70cd8eb3019d47bb894936 Mon Sep 17 00:00:00 2001 From: Ulduar Date: Sun, 8 Feb 2015 23:15:02 +0100 Subject: [PATCH 1120/1172] [3107] Add some fixes for Auriaya and Algalon Close #136 Close #134 Signed-off-by: Xfurry --- scripts/northrend/ulduar/ulduar/boss_algalon.cpp | 8 ++++++-- scripts/northrend/ulduar/ulduar/boss_auriaya.cpp | 2 +- sd2_revision_nr.h | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/scripts/northrend/ulduar/ulduar/boss_algalon.cpp b/scripts/northrend/ulduar/ulduar/boss_algalon.cpp index 838ba848f..e54cf3579 100644 --- a/scripts/northrend/ulduar/ulduar/boss_algalon.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_algalon.cpp @@ -149,7 +149,8 @@ static const DialogueEntry aAlgalonDialogue[] = {SAY_OUTRO_3, NPC_ALGALON, 12000}, {SAY_OUTRO_4, NPC_ALGALON, 12000}, {SAY_BRANN_OUTRO, NPC_BRANN_ALGALON, 11000}, - {SAY_OUTRO_5, NPC_ALGALON, 0}, + {SAY_OUTRO_5, NPC_ALGALON, 15000}, + {SPELL_TELEPORT, 0, 0}, {0, 0, 0}, }; @@ -434,7 +435,7 @@ struct boss_algalonAI : public ScriptedAI, private DialogueHelper void DoStartIntroEvent() { m_creature->SetLevitate(true); - DoCastSpellIfCan(m_creature, SPELL_ARRIVAL, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_ARRIVAL); DoCastSpellIfCan(m_creature, SPELL_RIDE_LIGHTNING, CAST_TRIGGERED); m_creature->GetMotionMaster()->MovePoint(1, afAlgalonMovePos[0], afAlgalonMovePos[1], afAlgalonMovePos[2]); } @@ -632,7 +633,10 @@ struct npc_living_constellationAI : public ScriptedAI { // start casting Arcane Barrage if (eventType == AI_EVENT_CUSTOM_A) + { m_uiArcaneBarrageTimer = urand(5000, 7000); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + } } void UpdateAI(const uint32 uiDiff) override diff --git a/scripts/northrend/ulduar/ulduar/boss_auriaya.cpp b/scripts/northrend/ulduar/ulduar/boss_auriaya.cpp index 1dae25b47..18cd17ebf 100644 --- a/scripts/northrend/ulduar/ulduar/boss_auriaya.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_auriaya.cpp @@ -265,7 +265,7 @@ struct boss_feral_defenderAI : public ScriptedAI return; } - if (uiDamage > m_creature->GetHealth()) + if (uiDamage >= m_creature->GetHealth()) { uiDamage = 0; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 23b2d165e..195e29616 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3106" + #define SD2_REVISION_NR "3107" #endif // __SD2_REVISION_NR_H__ From db23c6e41d84b0f4a51bda1ddc59efd483935fe3 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Mon, 9 Feb 2015 21:09:33 +0100 Subject: [PATCH 1121/1172] [3108] Add some various fixes Fix Algalon and Hodir aggro before and after the encounter. Thanks to @Ulduar Also fix some various mistakes for Thorim and Grand Champions --- .../trial_of_the_champion/boss_grand_champions.cpp | 1 + scripts/northrend/ulduar/ulduar/boss_algalon.cpp | 9 ++++++++- scripts/northrend/ulduar/ulduar/boss_hodir.cpp | 12 +++++++++++- scripts/northrend/ulduar/ulduar/boss_thorim.cpp | 2 +- sd2_revision_nr.h | 2 +- 5 files changed, 22 insertions(+), 4 deletions(-) diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_grand_champions.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_grand_champions.cpp index 3ec1cbfd2..390d7f662 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_grand_champions.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_grand_champions.cpp @@ -79,6 +79,7 @@ struct trial_companion_commonAI : public ScriptedAI m_bDefeated = false; + m_creature->SetStandState(UNIT_STAND_STATE_STAND); m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); } diff --git a/scripts/northrend/ulduar/ulduar/boss_algalon.cpp b/scripts/northrend/ulduar/ulduar/boss_algalon.cpp index e54cf3579..3995ef153 100644 --- a/scripts/northrend/ulduar/ulduar/boss_algalon.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_algalon.cpp @@ -134,7 +134,8 @@ static const DialogueEntry aAlgalonDialogue[] = {SAY_INTRO_1, NPC_ALGALON, 6000}, {SPELL_SUMMON_AZEROTH, 0, 5000}, {SAY_INTRO_2, NPC_ALGALON, 8000}, - {SAY_INTRO_3, NPC_ALGALON, 0}, + {SAY_INTRO_3, NPC_ALGALON, 12000}, + {SPELL_SUPERMASSIVE_FAIL, 0, 0}, {SAY_AGGRO, NPC_ALGALON, 14000}, {SAY_ENGAGE, NPC_ALGALON, 0}, {SPELL_ASCEND_HEAVENS, 0, 3000}, @@ -302,6 +303,8 @@ struct boss_algalonAI : public ScriptedAI, private DialogueHelper } else StartNextDialogueText(SAY_DESPAWN_1); + + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); } else m_pInstance->SetData(TYPE_ALGALON, FAIL); @@ -397,6 +400,9 @@ struct boss_algalonAI : public ScriptedAI, private DialogueHelper case SAY_INTRO_2: DoCastSpellIfCan(m_creature, SPELL_REORIGINATION); break; + case SPELL_SUPERMASSIVE_FAIL: + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE); + break; case SAY_ENGAGE: // summon Living Constellations at this point DoSpawnConstellations(); @@ -406,6 +412,7 @@ struct boss_algalonAI : public ScriptedAI, private DialogueHelper break; case SPELL_TELEPORT: // despawn when time has run out + m_creature->SetStandState(UNIT_STAND_STATE_STAND); DoCastSpellIfCan(m_creature, SPELL_TELEPORT, CAST_TRIGGERED); m_creature->ForcedDespawn(2000); break; diff --git a/scripts/northrend/ulduar/ulduar/boss_hodir.cpp b/scripts/northrend/ulduar/ulduar/boss_hodir.cpp index 07a65892b..4b21e00ef 100644 --- a/scripts/northrend/ulduar/ulduar/boss_hodir.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_hodir.cpp @@ -188,7 +188,7 @@ struct boss_hodirAI : public ScriptedAI } m_uiEpilogueTimer = 10000; - m_creature->setFaction(FACTION_ID_FRIENDLY); + m_creature->SetFactionTemporary(FACTION_ID_FRIENDLY, TEMPFACTION_NONE); m_bEventFinished = true; EnterEvadeMode(); } @@ -336,6 +336,10 @@ struct npc_flash_freezeAI : public Scripted_NoMovementAI { if (Creature* pHodir = m_pInstance->GetSingleCreatureFromStorage(NPC_HODIR)) { + // ignore if event already completed + if (pHodir->getFaction() == FACTION_ID_FRIENDLY) + return; + if (Creature* pSummoner = m_creature->GetMap()->GetCreature(((TemporarySummon*)m_creature)->GetSummonerGuid())) pSummoner->AI()->AttackStart(pHodir); } @@ -406,7 +410,13 @@ bool ProcessEventId_event_boss_hodir(uint32 uiEventId, Object* pSource, Object* { // Start encounter if (Creature* pHodir = pInstance->GetSingleCreatureFromStorage(NPC_HODIR)) + { + // ignore if event already completed + if (pHodir->getFaction() == FACTION_ID_FRIENDLY) + return true; + pHodir->SetInCombatWithZone(); + } } return true; diff --git a/scripts/northrend/ulduar/ulduar/boss_thorim.cpp b/scripts/northrend/ulduar/ulduar/boss_thorim.cpp index 050252a68..244702f9f 100644 --- a/scripts/northrend/ulduar/ulduar/boss_thorim.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_thorim.cpp @@ -264,7 +264,7 @@ struct boss_thorimAI : public ScriptedAI, private DialogueHelper } m_creature->CastSpell(m_creature, SPELL_THORIM_CREDIT, true); - m_creature->setFaction(FACTION_ID_FRIENDLY); + m_creature->SetFactionTemporary(FACTION_ID_FRIENDLY, TEMPFACTION_NONE); m_bEventFinished = true; EnterEvadeMode(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 195e29616..5f9ee0d85 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3107" + #define SD2_REVISION_NR "3108" #endif // __SD2_REVISION_NR_H__ From f828f733b84e9bf39e59ce9d6fd3a9265a5316a9 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Mon, 9 Feb 2015 21:29:31 +0100 Subject: [PATCH 1122/1172] [3109] Spawn Finkle Einhorn Close #128 --- .../eastern_kingdoms/blackrock_spire/blackrock_spire.h | 4 +++- .../blackrock_spire/instance_blackrock_spire.cpp | 9 +++++++++ sd2_revision_nr.h | 2 +- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/scripts/eastern_kingdoms/blackrock_spire/blackrock_spire.h b/scripts/eastern_kingdoms/blackrock_spire/blackrock_spire.h index 1e7e95e09..f5195869d 100644 --- a/scripts/eastern_kingdoms/blackrock_spire/blackrock_spire.h +++ b/scripts/eastern_kingdoms/blackrock_spire/blackrock_spire.h @@ -26,6 +26,7 @@ enum NPC_LORD_VICTOR_NEFARIUS = 10162, NPC_REND_BLACKHAND = 10429, NPC_GYTH = 10339, + NPC_THE_BEAST = 10430, NPC_DRAKKISATH = 10363, NPC_CHROMATIC_WHELP = 10442, // related to Gyth arena event NPC_CHROMATIC_DRAGON = 10447, @@ -106,8 +107,9 @@ class instance_blackrock_spire : public ScriptedInstance, private DialogueHelper void OnCreatureCreate(Creature* pCreature) override; void OnCreatureDeath(Creature* pCreature) override; - void OnCreatureEvade(Creature* pCreature); + void OnCreatureEvade(Creature* pCreature) override; void OnCreatureEnterCombat(Creature* pCreature) override; + void OnCreatureDespawn(Creature* pCreature) override; void SetData(uint32 uiType, uint32 uiData) override; uint32 GetData(uint32 uiType) const override; diff --git a/scripts/eastern_kingdoms/blackrock_spire/instance_blackrock_spire.cpp b/scripts/eastern_kingdoms/blackrock_spire/instance_blackrock_spire.cpp index 0078c2bc1..01cec4892 100644 --- a/scripts/eastern_kingdoms/blackrock_spire/instance_blackrock_spire.cpp +++ b/scripts/eastern_kingdoms/blackrock_spire/instance_blackrock_spire.cpp @@ -53,6 +53,9 @@ enum SAY_ROOKERY_EVENT_START = -1229020, NPC_ROOKERY_GUARDIAN = 10258, NPC_ROOKERY_HATCHER = 10683, + + // Spells + SPELL_FINKLE_IS_EINHORN = 16710, }; /* Areatrigger @@ -407,6 +410,12 @@ void instance_blackrock_spire::OnCreatureEnterCombat(Creature* pCreature) } } +void instance_blackrock_spire::OnCreatureDespawn(Creature* pCreature) +{ + if (pCreature->GetEntry() == NPC_THE_BEAST) + pCreature->CastSpell(pCreature, SPELL_FINKLE_IS_EINHORN, true); +} + void instance_blackrock_spire::DoProcessEmberseerEvent() { if (GetData(TYPE_EMBERSEER) == DONE || GetData(TYPE_EMBERSEER) == IN_PROGRESS) diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 5f9ee0d85..cd975c640 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3108" + #define SD2_REVISION_NR "3109" #endif // __SD2_REVISION_NR_H__ From 9593341bef8d26bfc154f10739ebab04ea06b40b Mon Sep 17 00:00:00 2001 From: Ulduar Date: Mon, 9 Feb 2015 22:02:52 +0100 Subject: [PATCH 1123/1172] [3110] Fix trash mobs cleaning for M'uru on encounter fail or complete Close scriptdev2/scriptdev2-cata#16 Signed-off-by: Xfurry --- .../sunwell_plateau/boss_muru.cpp | 2 -- .../instance_sunwell_plateau.cpp | 17 +++++++++++++++++ .../sunwell_plateau/sunwell_plateau.h | 5 +++++ sd2_revision_nr.h | 2 +- 4 files changed, 23 insertions(+), 3 deletions(-) diff --git a/scripts/eastern_kingdoms/sunwell_plateau/boss_muru.cpp b/scripts/eastern_kingdoms/sunwell_plateau/boss_muru.cpp index b62011f5c..dd2739f79 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/boss_muru.cpp +++ b/scripts/eastern_kingdoms/sunwell_plateau/boss_muru.cpp @@ -63,8 +63,6 @@ enum // Muru npcs NPC_VOID_SENTINEL_SUMMONER = 25782, - NPC_VOID_SENTINEL = 25772, // scripted in Acid - NPC_DARK_FIEND = 25744, // darkness spells SPELL_VOID_ZONE_VISUAL = 46265, diff --git a/scripts/eastern_kingdoms/sunwell_plateau/instance_sunwell_plateau.cpp b/scripts/eastern_kingdoms/sunwell_plateau/instance_sunwell_plateau.cpp index d04cbbdd6..a89f9961a 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/instance_sunwell_plateau.cpp +++ b/scripts/eastern_kingdoms/sunwell_plateau/instance_sunwell_plateau.cpp @@ -125,6 +125,12 @@ void instance_sunwell_plateau::OnCreatureCreate(Creature* pCreature) if (pCreature->GetPositionY() < 523.0f) m_lBackdoorTriggersList.push_back(pCreature->GetObjectGuid()); break; + case NPC_BERSERKER: + case NPC_FURY_MAGE: + case NPC_DARK_FIEND: + case NPC_VOID_SENTINEL: + m_lMuruTrashGuidList.push_back(pCreature->GetObjectGuid()); + return; } } @@ -233,6 +239,17 @@ void instance_sunwell_plateau::SetData(uint32 uiType, uint32 uiData) DoUseDoorOrButton(GO_MURU_EXIT_GATE); else if (uiData == IN_PROGRESS) m_uiMuruBerserkTimer = 10 * MINUTE * IN_MILLISECONDS; + if (uiData == FAIL || uiData == DONE) + { + // clear all the trash mobs + for (GuidList::const_iterator itr = m_lMuruTrashGuidList.begin(); itr != m_lMuruTrashGuidList.end(); ++itr) + { + if (Creature* pTrash = instance->GetCreature(*itr)) + pTrash->ForcedDespawn(); + } + + m_lMuruTrashGuidList.clear(); + } break; case TYPE_KILJAEDEN: m_auiEncounter[uiType] = uiData; diff --git a/scripts/eastern_kingdoms/sunwell_plateau/sunwell_plateau.h b/scripts/eastern_kingdoms/sunwell_plateau/sunwell_plateau.h index 6dc490f2f..ba514b3cc 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/sunwell_plateau.h +++ b/scripts/eastern_kingdoms/sunwell_plateau/sunwell_plateau.h @@ -31,6 +31,10 @@ enum NPC_SACROLASH = 25165, NPC_MURU = 25741, NPC_ENTROPIUS = 25840, + NPC_BERSERKER = 25798, // muru trash mobs - scripted in Acid + NPC_FURY_MAGE = 25799, + NPC_DARK_FIEND = 25744, + NPC_VOID_SENTINEL = 25772, NPC_DECEIVER = 25588, NPC_KILJAEDEN = 25315, NPC_KILJAEDEN_CONTROLLER = 25608, // kiljaeden event controller @@ -151,5 +155,6 @@ class instance_sunwell_plateau : public ScriptedInstance, private DialogueHelper GuidList m_lAllFlightTriggersList; GuidList m_lBackdoorTriggersList; GuidList m_lDeceiversGuidList; + GuidList m_lMuruTrashGuidList; }; #endif diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index cd975c640..6638c3e86 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3109" + #define SD2_REVISION_NR "3110" #endif // __SD2_REVISION_NR_H__ From 6f5b58c563e85394a90e192967501c78fba1239c Mon Sep 17 00:00:00 2001 From: Xfurry Date: Mon, 16 Feb 2015 20:30:23 +0100 Subject: [PATCH 1124/1172] [3111] Fix text id for Disciple of Naralex - Wailing Caverns Thanks to @grz3s Close #137 --- scripts/kalimdor/wailing_caverns/wailing_caverns.cpp | 5 +++-- sd2_revision_nr.h | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/kalimdor/wailing_caverns/wailing_caverns.cpp b/scripts/kalimdor/wailing_caverns/wailing_caverns.cpp index ead04aecb..a6fb9a17c 100644 --- a/scripts/kalimdor/wailing_caverns/wailing_caverns.cpp +++ b/scripts/kalimdor/wailing_caverns/wailing_caverns.cpp @@ -49,6 +49,7 @@ enum EMOTE_VISION = -1043011, GOSSIP_ITEM_BEGIN = -3043000, + TEXT_ID_BEGIN = 699, TEXT_ID_DISCIPLE = 698, SPELL_MARK = 5232, // Buff before the fight. To be removed after 4.0.3 @@ -453,10 +454,10 @@ bool GossipHello_npc_disciple_of_naralex(Player* pPlayer, Creature* pCreature) if (m_pInstance && m_pInstance->GetData(TYPE_DISCIPLE) == SPECIAL) { pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_BEGIN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); - pPlayer->SEND_GOSSIP_MENU(TEXT_ID_DISCIPLE, pCreature->GetObjectGuid()); + pPlayer->SEND_GOSSIP_MENU(TEXT_ID_BEGIN, pCreature->GetObjectGuid()); } else - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid()); + pPlayer->SEND_GOSSIP_MENU(TEXT_ID_DISCIPLE, pCreature->GetObjectGuid()); return true; } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 6638c3e86..ecc766324 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3110" + #define SD2_REVISION_NR "3111" #endif // __SD2_REVISION_NR_H__ From f8025008db5200fcee5e507b28811fc2974f2a62 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Mon, 16 Feb 2015 22:30:29 +0100 Subject: [PATCH 1125/1172] [3112] Add combat abilities for Gormok the Impaler - ToC25 --- .../boss_northrend_beasts.cpp | 140 ++++++++++++++++-- .../instance_trial_of_the_crusader.cpp | 41 ++++- .../trial_of_the_crusader.h | 8 +- sd2_revision_nr.h | 2 +- 4 files changed, 174 insertions(+), 17 deletions(-) diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp index 1e4248043..4fe499599 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp @@ -15,10 +15,10 @@ */ /* ScriptData -SDName: -SD%Complete: 0 -SDComment: -SDCategory: +SDName: trial_of_the_crusader +SD%Complete: 40 +SDComment: Icehowl and twin worms combat abilities NYI +SDCategory: Crusader Coliseum EndScriptData */ #include "precompiled.h" @@ -44,12 +44,13 @@ struct npc_beast_combat_stalkerAI : public Scripted_NoMovementAI { npc_beast_combat_stalkerAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { - m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_pInstance = (instance_trial_of_the_crusader*)pCreature->GetInstanceData(); Reset(); m_creature->SetInCombatWithZone(); } - ScriptedInstance* m_pInstance; + instance_trial_of_the_crusader* m_pInstance; + ObjectGuid m_aSummonedBossGuid[4]; bool m_bFirstWormDied; uint32 m_uiBerserkTimer; @@ -119,7 +120,10 @@ struct npc_beast_combat_stalkerAI : public Scripted_NoMovementAI if (m_creature->GetMap()->GetDifficulty() == RAID_DIFFICULTY_10MAN_HEROIC || m_creature->GetMap()->GetDifficulty() == RAID_DIFFICULTY_25MAN_HEROIC) m_uiNextBeastTimer = 150 * IN_MILLISECONDS; // 2 min 30 - m_uiAttackDelayTimer = 15000; // TODO, must be checked. + m_uiAttackDelayTimer = 10000; + + if (m_pInstance) + m_pInstance->DoOpenMainGate(); } // Only for Dreadscale and Icehowl @@ -229,31 +233,141 @@ CreatureAI* GetAI_npc_beast_combat_stalker(Creature* pCreature) ## boss_gormok, vehicle driven by 34800 (multiple times) ######*/ +enum +{ + // gormok spells + SPELL_IMPALE = 66331, + SPELL_STOMP = 66330, + + // snobold spells + SPELL_JUMP_TO_HAND = 66342, // prepare snobold to jump + SPELL_RISING_ANGER = 66636, + SPELL_SNOBOLLED = 66406, // throw snobold on players head +}; + struct boss_gormokAI : public ScriptedAI { boss_gormokAI(Creature* pCreature) : ScriptedAI(pCreature) { - m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_pInstance = (instance_trial_of_the_crusader*)pCreature->GetInstanceData(); Reset(); } - ScriptedInstance* m_pInstance; + instance_trial_of_the_crusader* m_pInstance; - void Reset() override {} + uint32 m_uiStompTimer; + uint32 m_uiImpaleTimer; + uint32 m_uiJumpTimer; + uint32 m_uiSnoboldTimer; - void JustReachedHome() override + uint8 m_uiSnoboldsBoarded; + + GuidVector m_vSnoboldGuidsVector; + + void Reset() override { + m_uiStompTimer = urand(20000, 25000); + m_uiImpaleTimer = 10000; + m_uiJumpTimer = 20000; + m_uiSnoboldTimer = 0; + + m_uiSnoboldsBoarded = 0; } - void Aggro(Unit* /*pWho*/) override + void JustDied(Unit* /*pKiller*/) override { + for (GuidVector::const_iterator itr = m_vSnoboldGuidsVector.begin(); itr != m_vSnoboldGuidsVector.end(); ++itr) + { + if (Creature* pSnobold = m_creature->GetMap()->GetCreature(*itr)) + { + if (!pSnobold->isAlive()) + continue; + + // ToDo: check if there is any player vehicle mounting involved + SendAIEvent(AI_EVENT_CUSTOM_EVENTAI_A, m_creature, pSnobold); + } + } } - void UpdateAI(const uint32 /*uiDiff*/) override + void JustSummoned(Creature* pSummoned) override + { + if (pSummoned->GetEntry() == NPC_SNOBOLD_VASSAL) + { + m_vSnoboldGuidsVector.push_back(pSummoned->GetObjectGuid()); + ++m_uiSnoboldsBoarded; + } + } + + // get the current active snobold + Creature* GetActiveSnobold() { return m_creature->GetMap()->GetCreature(m_vSnoboldGuidsVector[m_uiSnoboldsBoarded - 1]); } + + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; + // snobold related spells + if (m_uiSnoboldsBoarded) + { + // snobold jumps from boss' back to boss' hand + if (m_uiJumpTimer < uiDiff) + { + if (Creature* pSnobold = GetActiveSnobold()) + { + m_creature->RemoveAurasByCasterSpell(SPELL_RIDE_VEHICLE_HARDCODED, pSnobold->GetObjectGuid()); + pSnobold->CastSpell(m_creature, SPELL_JUMP_TO_HAND, true); + + m_uiSnoboldTimer = 3000; + m_uiJumpTimer = 20000; + } + } + else + m_uiJumpTimer -= uiDiff; + } + + if (m_uiSnoboldTimer) + { + // snobold jumps from boss' hand to player's back + if (m_uiSnoboldTimer <= uiDiff) + { + if (Creature* pSnobold = GetActiveSnobold()) + { + pSnobold->CastSpell(m_creature, SPELL_RISING_ANGER, true); + + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0, SPELL_SNOBOLLED, SELECT_FLAG_PLAYER)) + { + // ToDo: change this to setup the player vehicle for the snobold. It seems that the spell that will handle this is missing + pSnobold->FixateTarget(pTarget); + // pTarget->SetVehicleId(pSnobold->GetCreatureInfo()->VehicleTemplateId, pSnobold->GetEntry()); + // pTarget->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_PLAYER_VEHICLE); + + pSnobold->CastSpell(pTarget, SPELL_SNOBOLLED, true); + SendAIEvent(AI_EVENT_CUSTOM_EVENTAI_A, m_creature, pSnobold); + --m_uiSnoboldsBoarded; + } + } + m_uiSnoboldTimer = 0; + } + else + m_uiSnoboldTimer -= uiDiff; + } + + if (m_uiStompTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_STOMP) == CAST_OK) + m_uiStompTimer = 20000; + } + else + m_uiStompTimer -= uiDiff; + + if (m_uiImpaleTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_IMPALE) == CAST_OK) + m_uiImpaleTimer = 10000; + } + else + m_uiImpaleTimer -= uiDiff; + DoMeleeAttackIfReady(); } }; diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp index 53eef207a..feec0d415 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp @@ -146,7 +146,8 @@ static const DialogueEntryTwoSide aTocDialogues[] = }; instance_trial_of_the_crusader::instance_trial_of_the_crusader(Map* pMap) : ScriptedInstance(pMap), DialogueHelper(aTocDialogues), - m_uiTeam(TEAM_NONE) + m_uiTeam(TEAM_NONE), + m_uiGateResetTimer(0) { Initialize(); } @@ -428,6 +429,13 @@ void instance_trial_of_the_crusader::DoHandleEventEpilogue() } } +// Function that will open and close the main gate +void instance_trial_of_the_crusader::DoOpenMainGate() +{ + DoUseDoorOrButton(GO_MAIN_GATE); + m_uiGateResetTimer = 10000; +} + void instance_trial_of_the_crusader::JustDidDialogueStep(int32 iEntry) { switch (iEntry) @@ -443,7 +451,19 @@ void instance_trial_of_the_crusader::JustDidDialogueStep(int32 iEntry) if (Player* pPlayer = GetPlayerInMap()) { if (Creature* pBeasts = pPlayer->SummonCreature(NPC_BEAST_COMBAT_STALKER, aSpawnPositions[0][0], aSpawnPositions[0][1], aSpawnPositions[0][2], aSpawnPositions[0][3], TEMPSUMMON_DEAD_DESPAWN, 0)) - pBeasts->SummonCreature(NPC_GORMOK, aSpawnPositions[1][0], aSpawnPositions[1][1], aSpawnPositions[1][2], aSpawnPositions[1][3], TEMPSUMMON_DEAD_DESPAWN, 0); + { + Creature* pGormok = pBeasts->SummonCreature(NPC_GORMOK, aSpawnPositions[1][0], aSpawnPositions[1][1], aSpawnPositions[1][2], aSpawnPositions[1][3], TEMPSUMMON_DEAD_DESPAWN, 0); + if (!pGormok) + return; + + // spawn the snobolds on his back + uint8 uiMaxSnobolds = Is25ManDifficulty() ? 5 : 4; + for (uint8 i = 0; i < uiMaxSnobolds; ++i) + { + if (Creature* pSnobold = pGormok->SummonCreature(NPC_SNOBOLD_VASSAL, pGormok->GetPositionX(), pGormok->GetPositionY(), pGormok->GetPositionZ(), 0, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 30000)) + pSnobold->CastSpell(pGormok, SPELL_RIDE_VEHICLE_HARDCODED, true); + } + } } break; case NPC_FIZZLEBANG: @@ -523,6 +543,23 @@ void instance_trial_of_the_crusader::JustDidDialogueStep(int32 iEntry) } } +void instance_trial_of_the_crusader::Update(uint32 uiDiff) +{ + DialogueUpdate(uiDiff); + + // ToDo: set this as door reset timer when fixed in core + if (m_uiGateResetTimer) + { + if (m_uiGateResetTimer <= uiDiff) + { + DoUseDoorOrButton(GO_MAIN_GATE); + m_uiGateResetTimer = 0; + } + else + m_uiGateResetTimer -= uiDiff; + } +} + InstanceData* GetInstanceData_instance_trial_of_the_crusader(Map* pMap) { return new instance_trial_of_the_crusader(pMap); diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h index f76f4b670..5b5330bcb 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h @@ -36,6 +36,8 @@ enum NPC_EYDIS = 34496, NPC_ANUBARAK = 34564, + NPC_SNOBOLD_VASSAL = 34800, // used in Gormok encounter + NPC_TIRION_A = 34996, NPC_TIRION_B = 36095, // Summoned after his text (Champions, you're alive! Not only have you defeated every challenge of the Trial of the Crusader, but also thwarted Arthas' plans! Your skill and cunning will prove to be a powerful weapon against the Scourge. Well done! Allow one of the Crusade's mages to transport you to the surface!) is said.. NPC_ARGENT_MAGE = 36097, // Summoned along with Tirion B @@ -150,7 +152,9 @@ class instance_trial_of_the_crusader : public ScriptedInstance, private Dialogue const char* Save() const override { return m_strInstData.c_str(); } void Load(const char* chrIn) override; - void Update(uint32 uiDiff) { DialogueUpdate(uiDiff); } + void DoOpenMainGate(); + + void Update(uint32 uiDiff) override; private: void DoSummonRamsey(uint32 uiEntry); @@ -161,6 +165,8 @@ class instance_trial_of_the_crusader : public ScriptedInstance, private Dialogue std::string m_strInstData; Team m_uiTeam; + + uint32 m_uiGateResetTimer; }; #endif diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index ecc766324..3e9afddec 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3111" + #define SD2_REVISION_NR "3112" #endif // __SD2_REVISION_NR_H__ From 4f97660e76ea40bd7bed5cfd11c0dc79aaf4085b Mon Sep 17 00:00:00 2001 From: Xfurry Date: Wed, 18 Feb 2015 22:23:45 +0100 Subject: [PATCH 1126/1172] [3113] Add combat abilities for Twin Jormungars - ToC25 --- .../boss_northrend_beasts.cpp | 462 ++++++++++++++++-- .../instance_trial_of_the_crusader.cpp | 2 + sd2_revision_nr.h | 2 +- sql/scriptdev2_script_full.sql | 4 +- sql/updates/r3113_scriptdev2.sql | 3 + 5 files changed, 437 insertions(+), 36 deletions(-) create mode 100644 sql/updates/r3113_scriptdev2.sql diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp index 4fe499599..eee2e2b06 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: trial_of_the_crusader -SD%Complete: 40 -SDComment: Icehowl and twin worms combat abilities NYI +SD%Complete: 70 +SDComment: Icehowl combat abilities NYI SDCategory: Crusader Coliseum EndScriptData */ @@ -33,7 +33,10 @@ enum SAY_TIRION_BEAST_2 = -1649005, SAY_TIRION_BEAST_3 = -1649006, + EMOTE_JORMUNGAR_ENRAGE = -1649076, + SPELL_BERSERK = 26662, + SPELL_JORMUNGAR_ENRAGE = 68335, PHASE_GORMOK = 0, PHASE_WORMS = 1, @@ -58,12 +61,17 @@ struct npc_beast_combat_stalkerAI : public Scripted_NoMovementAI uint32 m_uiNextBeastTimer; uint32 m_uiPhase; + uint32 m_uiWormPhaseTimer; + uint8 m_uiWormPhaseStage; + void Reset() override { + m_uiWormPhaseTimer = 0; + m_uiWormPhaseStage = 0; m_uiAttackDelayTimer = 0; - m_uiNextBeastTimer = 0; - m_bFirstWormDied = false; - m_uiPhase = PHASE_GORMOK; + m_uiNextBeastTimer = 0; + m_bFirstWormDied = false; + m_uiPhase = PHASE_GORMOK; if (m_creature->GetMap()->GetDifficulty() == RAID_DIFFICULTY_10MAN_NORMAL || m_creature->GetMap()->GetDifficulty() == RAID_DIFFICULTY_25MAN_NORMAL) m_uiBerserkTimer = 15 * MINUTE * IN_MILLISECONDS; @@ -71,13 +79,6 @@ struct npc_beast_combat_stalkerAI : public Scripted_NoMovementAI m_uiBerserkTimer = 9 * MINUTE * IN_MILLISECONDS; } - void MoveInLineOfSight(Unit* /*pWho*/) override {} - - void DamageTaken(Unit* /*pDealer*/, uint32& uiDamage) override - { - uiDamage = 0; - } - void EnterEvadeMode() override { if (m_pInstance) @@ -114,6 +115,7 @@ struct npc_beast_combat_stalkerAI : public Scripted_NoMovementAI m_aSummonedBossGuid[m_uiPhase] = pSummoned->GetObjectGuid(); + pSummoned->SetWalk(false); pSummoned->GetMotionMaster()->MovePoint(m_uiPhase, aMovePositions[m_uiPhase][0], aMovePositions[m_uiPhase][1], aMovePositions[m_uiPhase][2]); // Next beasts are summoned only for heroic modes @@ -162,7 +164,16 @@ struct npc_beast_combat_stalkerAI : public Scripted_NoMovementAI if (m_bFirstWormDied && m_uiPhase == PHASE_WORMS) DoSummonNextBeast(NPC_ICEHOWL); else + { m_bFirstWormDied = true; + + // jormungar brother enrages + if (Creature* pWorm = m_pInstance->GetSingleCreatureFromStorage(pSummoned->GetEntry() == NPC_ACIDMAW ? NPC_DREADSCALE : NPC_ACIDMAW)) + { + pWorm->CastSpell(pWorm, SPELL_JORMUNGAR_ENRAGE, true); + DoScriptText(EMOTE_JORMUNGAR_ENRAGE, pWorm); + } + } break; case NPC_ICEHOWL: @@ -193,11 +204,19 @@ struct npc_beast_combat_stalkerAI : public Scripted_NoMovementAI { if (m_uiAttackDelayTimer <= uiDiff) { + // for worm phase, summon brother on aggro if (m_uiPhase == PHASE_WORMS) + { m_creature->SummonCreature(NPC_ACIDMAW, aSpawnPositions[3][0], aSpawnPositions[3][1], aSpawnPositions[3][2], aSpawnPositions[3][3], TEMPSUMMON_DEAD_DESPAWN, 0); + m_uiWormPhaseTimer = 45000; + } + // start combat if (Creature* pBeast = m_creature->GetMap()->GetCreature(m_aSummonedBossGuid[m_uiPhase])) + { + pBeast->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE); pBeast->SetInCombatWithZone(); + } m_uiAttackDelayTimer = 0; } @@ -220,6 +239,79 @@ struct npc_beast_combat_stalkerAI : public Scripted_NoMovementAI m_uiBerserkTimer -= uiDiff; } + // jormungars phase switch control + if (m_uiWormPhaseTimer) + { + if (m_uiWormPhaseTimer <= uiDiff) + { + if (!m_pInstance) + return; + + ++m_uiWormPhaseStage; + + switch (m_uiWormPhaseStage) + { + // submerge worms + case 1: + if (Creature* pWorm = m_pInstance->GetSingleCreatureFromStorage(NPC_ACIDMAW)) + { + if (pWorm->isAlive()) + SendAIEvent(AI_EVENT_CUSTOM_A, m_creature, pWorm); + } + if (Creature* pWorm = m_pInstance->GetSingleCreatureFromStorage(NPC_DREADSCALE)) + { + if (pWorm->isAlive()) + SendAIEvent(AI_EVENT_CUSTOM_A, m_creature, pWorm); + } + + m_uiWormPhaseTimer = 4000; + break; + + // change places + case 2: + float fX, fY, fZ; + if (Creature* pWorm = m_pInstance->GetSingleCreatureFromStorage(NPC_ACIDMAW)) + { + if (pWorm->isAlive()) + { + m_creature->GetRandomPoint(m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), 45.0f, fX, fY, fZ); + pWorm->MonsterMoveWithSpeed(fX, fY, fZ, 7.7f); + } + } + if (Creature* pWorm = m_pInstance->GetSingleCreatureFromStorage(NPC_DREADSCALE)) + { + if (pWorm->isAlive()) + { + m_creature->GetRandomPoint(m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), 45.0f, fX, fY, fZ); + pWorm->MonsterMoveWithSpeed(fX, fY, fZ, 7.7f); + } + } + + m_uiWormPhaseTimer = 6000; + break; + + // emerge and change phase + case 3: + if (Creature* pWorm = m_pInstance->GetSingleCreatureFromStorage(NPC_ACIDMAW)) + { + if (pWorm->isAlive()) + SendAIEvent(AI_EVENT_CUSTOM_B, m_creature, pWorm); + } + if (Creature* pWorm = m_pInstance->GetSingleCreatureFromStorage(NPC_DREADSCALE)) + { + if (pWorm->isAlive()) + SendAIEvent(AI_EVENT_CUSTOM_B, m_creature, pWorm); + } + + m_uiWormPhaseStage = 0; + m_uiWormPhaseTimer = 45000; + break; + } + } + else + m_uiWormPhaseTimer -= uiDiff; + } + m_creature->SelectHostileTarget(); } }; @@ -289,6 +381,14 @@ struct boss_gormokAI : public ScriptedAI } } + void MoveInLineOfSight(Unit* pWho) override + { + if (m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE)) + return; + + ScriptedAI::MoveInLineOfSight(pWho); + } + void JustSummoned(Creature* pSummoned) override { if (pSummoned->GetEntry() == NPC_SNOBOLD_VASSAL) @@ -378,38 +478,285 @@ CreatureAI* GetAI_boss_gormok(Creature* pCreature) } /*###### -## boss_acidmaw +## twin_jormungars_common ######*/ -struct boss_acidmawAI : public ScriptedAI +enum { - boss_acidmawAI(Creature* pCreature) : ScriptedAI(pCreature) + // common spells + SPELL_SLIME_POOL = 66883, + SPELL_SWEEP = 66794, + SPELL_SPAWN_GROUND_VISUAL = 68302, // visual for stationary worm + + // transition spells + SPELL_STATIC_WORM_SUBMERGE = 66936, // triggers 66969; long cast + SPELL_MOBILE_WORM_SUBMERGE = 66948, // triggers 66969; short cast + SPELL_MOBILE_WORM_EMERGE = 66949, // triggers 63984; short cast + SPELL_STATIC_WORM_EMERGE = 66947, // triggers 63984; long cast + SPELL_HATE_TO_ZERO = 63984, + + // debuffs + SPELL_PARALYTIC_TOXIN = 66823, + SPELL_BURNING_BILE = 66869, + + // slime pool + SPELL_SLIME_POOL_AURA = 66882, + NPC_SLIME_POOL = 35176, + + // phases + PHASE_STATIONARY = 0, + PHASE_SUBMERGED = 1, + PHASE_MOBILE = 2, +}; + +struct twin_jormungars_commonAI : public ScriptedAI +{ + twin_jormungars_commonAI(Creature* pCreature) : ScriptedAI(pCreature) { - m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_pInstance = (instance_trial_of_the_crusader*)pCreature->GetInstanceData(); Reset(); } - ScriptedInstance* m_pInstance; + instance_trial_of_the_crusader* m_pInstance; - void Reset() override {} + uint8 m_uiPhase; + uint8 m_uiPrevPhase; + uint8 m_uiNextPhase; - void JustReachedHome() override + // mobile + uint32 m_uiSpewTimer; + uint32 m_uiBiteTimer; + uint32 m_uiSlimePoolTimer; + + // stationary + uint32 m_uiSpitTimer; + uint32 m_uiSprayTimer; + uint32 m_uiSweepTimer; + + void Reset() override { + m_uiSpewTimer = 5000; + m_uiBiteTimer = urand(5000, 10000); + m_uiSlimePoolTimer = urand(12000, 15000); + + m_uiSpitTimer = 3000; + m_uiSprayTimer = urand(7000, 13000); + m_uiSweepTimer = urand(12000, 15000); } - void Aggro(Unit* /*pWho*/) override + void JustSummoned(Creature* pSummned) override { + if (pSummned->GetEntry() == NPC_SLIME_POOL) + pSummned->CastSpell(pSummned, SPELL_SLIME_POOL_AURA, false); } - void UpdateAI(const uint32 /*uiDiff*/) override + void ReceiveAIEvent(AIEventType eventType, Creature* /*pSender*/, Unit* /*pInvoker*/, uint32 /*uiMiscValue*/) override + { + // inform when submerged + if (eventType == AI_EVENT_CUSTOM_A) + { + // cast submerge spells + if (m_uiPhase == PHASE_MOBILE) + DoCastSpellIfCan(m_creature, SPELL_MOBILE_WORM_SUBMERGE, CAST_INTERRUPT_PREVIOUS); + else if (m_uiPhase == PHASE_STATIONARY) + DoCastSpellIfCan(m_creature, SPELL_STATIC_WORM_SUBMERGE, CAST_INTERRUPT_PREVIOUS); + + // stop movement + SetCombatMovement(false); + m_creature->GetMotionMaster()->Clear(); + m_creature->GetMotionMaster()->MoveIdle(); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + + m_uiPrevPhase = m_uiPhase; + m_uiPhase = PHASE_SUBMERGED; + } + // inform when emerge start + else if (eventType == AI_EVENT_CUSTOM_B) + { + // prepare emerge + if (m_uiPrevPhase == PHASE_MOBILE) + { + DoCastSpellIfCan(m_creature, SPELL_STATIC_WORM_EMERGE, CAST_INTERRUPT_PREVIOUS); + m_creature->RemoveAurasDueToSpell(SPELL_MOBILE_WORM_SUBMERGE); + m_uiNextPhase = PHASE_STATIONARY; + } + else if (m_uiPrevPhase == PHASE_STATIONARY) + { + DoCastSpellIfCan(m_creature, SPELL_MOBILE_WORM_EMERGE, CAST_INTERRUPT_PREVIOUS); + m_creature->RemoveAurasDueToSpell(SPELL_STATIC_WORM_SUBMERGE); + m_uiNextPhase = PHASE_MOBILE; + } + + // inform the worm to change display id + OnJormungarPhaseChanged(m_uiNextPhase); + } + // inform when emerge complete + else if (eventType == AI_EVENT_CUSTOM_C) + { + DoCastSpellIfCan(m_creature, SPELL_HATE_TO_ZERO, CAST_TRIGGERED); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + m_uiPhase = m_uiNextPhase; + + // for mobile worm follow target + if (m_uiPhase == PHASE_MOBILE) + { + SetCombatMovement(true); + m_creature->GetMotionMaster()->Clear(); + m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); + } + // for stationary set visual + else if (m_uiPhase == PHASE_STATIONARY) + DoCastSpellIfCan(m_creature, SPELL_SPAWN_GROUND_VISUAL, CAST_TRIGGERED); + } + } + + // Handle phase changed display id + virtual void OnJormungarPhaseChanged(uint8 uiPhase) { } + + // Return the specific spell + virtual uint32 GetSplitSpell() { return 0; } + virtual uint32 GetSpraySpell() { return 0; } + virtual uint32 GetSpewSpell() { return 0; } + virtual uint32 GetBiteSpell() { return 0; } + + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; + switch (m_uiPhase) + { + // abilities for stationary phase + case PHASE_STATIONARY: + + if (m_uiSpitTimer < uiDiff) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, GetSplitSpell()) == CAST_OK) + m_uiSpitTimer = 3000; + } + } + else + m_uiSpitTimer -= uiDiff; + + if (m_uiSprayTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), GetSpraySpell()) == CAST_OK) + m_uiSprayTimer = 21000; + } + else + m_uiSprayTimer -= uiDiff; + + if (m_uiSweepTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_SWEEP) == CAST_OK) + m_uiSweepTimer = urand(10000, 15000); + } + else + m_uiSweepTimer -= uiDiff; + + break; + + // abilities for mobile phase + case PHASE_MOBILE: + + if (m_uiBiteTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), GetBiteSpell()) == CAST_OK) + m_uiBiteTimer = urand(5000, 7000); + } + else + m_uiBiteTimer -= uiDiff; + + if (m_uiSpewTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, GetSpewSpell()) == CAST_OK) + m_uiSpewTimer = 21000; + } + else + m_uiSpewTimer -= uiDiff; + + if (m_uiSlimePoolTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_SLIME_POOL) == CAST_OK) + m_uiSlimePoolTimer = urand(17000, 23000); + } + else + m_uiSlimePoolTimer -= uiDiff; + + break; + + // combat break + case PHASE_SUBMERGED: + return; + } + DoMeleeAttackIfReady(); } }; +/*###### +## boss_acidmaw +######*/ + +enum +{ + // mobile + SPELL_ACID_SPEW = 66818, + SPELL_PARALYTIC_BITE = 66824, + + // stationary + SPELL_ACID_SPIT = 66880, + SPELL_PARALYTIC_SPRAY = 66901, + + // display ids + DISPLAY_ID_ACIDMAW_FIXED = 29815, + DISPLAY_ID_ACIDMWA_MOBILE = 29816, +}; + +struct boss_acidmawAI : public twin_jormungars_commonAI +{ + boss_acidmawAI(Creature* pCreature) : twin_jormungars_commonAI(pCreature) { Reset(); } + + void Reset() override + { + m_uiPhase = PHASE_STATIONARY; + SetCombatMovement(false); + + twin_jormungars_commonAI::Reset(); + + // ToDo: research if there is a spawn animation involved + DoCastSpellIfCan(m_creature, SPELL_SPAWN_GROUND_VISUAL); + } + + void SpellHitTarget(Unit* pTarget, const SpellEntry* pSpellEntry) override + { + if (pTarget->GetTypeId() != TYPEID_PLAYER) + return; + + // remove burning bile and add paralytic toxin + if (pSpellEntry->Id == SPELL_PARALYTIC_BITE || pSpellEntry->Id == SPELL_PARALYTIC_SPRAY) + { + pTarget->RemoveAurasDueToSpell(SPELL_BURNING_BILE); + pTarget->CastSpell(pTarget, SPELL_PARALYTIC_TOXIN, true); + } + } + + void OnJormungarPhaseChanged(uint8 uiPhase) + { + if (uiPhase == PHASE_STATIONARY) + m_creature->SetDisplayId(DISPLAY_ID_ACIDMAW_FIXED); + else if (uiPhase == PHASE_MOBILE) + m_creature->SetDisplayId(DISPLAY_ID_ACIDMWA_MOBILE); + } + + uint32 GetSplitSpell() { return SPELL_ACID_SPIT; } + uint32 GetSpewSpell() { return SPELL_ACID_SPEW; } + uint32 GetSpraySpell() { return SPELL_PARALYTIC_SPRAY; } + uint32 GetBiteSpell() { return SPELL_PARALYTIC_BITE; } +}; + CreatureAI* GetAI_boss_acidmaw(Creature* pCreature) { return new boss_acidmawAI(pCreature); @@ -419,33 +766,66 @@ CreatureAI* GetAI_boss_acidmaw(Creature* pCreature) ## boss_dreadscale ######*/ -struct boss_dreadscaleAI : public ScriptedAI +enum { - boss_dreadscaleAI(Creature* pCreature) : ScriptedAI(pCreature) - { - m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - Reset(); - } + // mobile + SPELL_MOLTEN_SPEW = 66821, + SPELL_BURNING_BITE = 66879, - ScriptedInstance* m_pInstance; + // stationary + SPELL_FIRE_SPIT = 66796, + SPELL_BURNING_SPRAY = 66902, - void Reset() override {} + // display ids + DISPLAY_ID_DREADSCALE_FIXED = 26935, + DISPLAY_ID_DREADSCALE_MOBILE = 24564, +}; - void JustReachedHome() override +struct boss_dreadscaleAI : public twin_jormungars_commonAI +{ + boss_dreadscaleAI(Creature* pCreature) : twin_jormungars_commonAI(pCreature) { Reset(); } + + void Reset() override { + m_uiPhase = PHASE_MOBILE; + + twin_jormungars_commonAI::Reset(); } - void Aggro(Unit* /*pWho*/) override + void MoveInLineOfSight(Unit* pWho) override { + // don't attack during intro + if (m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE)) + return; + + twin_jormungars_commonAI::MoveInLineOfSight(pWho); } - void UpdateAI(const uint32 /*uiDiff*/) override + void SpellHitTarget(Unit* pTarget, const SpellEntry* pSpellEntry) override { - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + if (pTarget->GetTypeId() != TYPEID_PLAYER) return; - DoMeleeAttackIfReady(); + // remove paralytic toxin and add burning bile + if (pSpellEntry->Id == SPELL_BURNING_BITE || pSpellEntry->Id == SPELL_BURNING_SPRAY) + { + pTarget->RemoveAurasDueToSpell(SPELL_PARALYTIC_TOXIN); + pTarget->CastSpell(pTarget, SPELL_BURNING_BILE, true); + } } + + void OnJormungarPhaseChanged(uint8 uiPhase) + { + if (uiPhase == PHASE_STATIONARY) + m_creature->SetDisplayId(DISPLAY_ID_DREADSCALE_FIXED); + else if (uiPhase == PHASE_MOBILE) + m_creature->SetDisplayId(DISPLAY_ID_DREADSCALE_MOBILE); + } + + uint32 GetSplitSpell() { return SPELL_FIRE_SPIT; } + uint32 GetSpewSpell() { return SPELL_MOLTEN_SPEW; } + uint32 GetSpraySpell() { return SPELL_BURNING_SPRAY; } + uint32 GetBiteSpell() { return SPELL_BURNING_BITE; } }; CreatureAI* GetAI_boss_dreadscale(Creature* pCreature) @@ -453,6 +833,18 @@ CreatureAI* GetAI_boss_dreadscale(Creature* pCreature) return new boss_dreadscaleAI(pCreature); } +bool EffectDummyCreature_worm_emerge(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget, ObjectGuid /*originalCasterGuid*/) +{ + // always check spellid and effectindex + if ((uiSpellId == SPELL_STATIC_WORM_EMERGE || uiSpellId == SPELL_MOBILE_WORM_EMERGE) && uiEffIndex == EFFECT_INDEX_0) + { + pCreatureTarget->AI()->SendAIEvent(AI_EVENT_CUSTOM_C, pCaster, pCreatureTarget); + return true; + } + + return false; +} + /*###### ## boss_icehowl ######*/ @@ -513,11 +905,13 @@ void AddSC_northrend_beasts() pNewScript = new Script; pNewScript->Name = "boss_acidmaw"; pNewScript->GetAI = &GetAI_boss_acidmaw; + pNewScript->pEffectDummyNPC = &EffectDummyCreature_worm_emerge; pNewScript->RegisterSelf(); pNewScript = new Script; pNewScript->Name = "boss_dreadscale"; pNewScript->GetAI = &GetAI_boss_dreadscale; + pNewScript->pEffectDummyNPC = &EffectDummyCreature_worm_emerge; pNewScript->RegisterSelf(); pNewScript = new Script; diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp index feec0d415..e42b31269 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp @@ -185,6 +185,8 @@ void instance_trial_of_the_crusader::OnCreatureCreate(Creature* pCreature) case NPC_WORLD_TRIGGER_LARGE: case NPC_THE_LICHKING: case NPC_THE_LICHKING_VISUAL: + case NPC_ACIDMAW: + case NPC_DREADSCALE: break; default: return; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 3e9afddec..43a37343a 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3112" + #define SD2_REVISION_NR "3113" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index e49d3e7a9..69bed4e95 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -4720,7 +4720,9 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1649073,'%s emerges from the ground!',0,3,0,0,'anubarak EMOTE_EMERGE'), (-1649074,'%s unleashes a Leeching Swarm to heal himself!',0,3,0,0,'anubarak EMOTE_SWARM'), -(-1649075,'Champions, you\'re alive! Not only have you defeated every challenge of the Trial of the Crusader, but also thwarted Arthas\' plans! Your skill and cunning will prove to be a powerful weapon against the Scourge. Well done! Allow one of the Crusade\'s mages to transport you to the surface!',0,0,0,1,'tirion SAY_EPILOGUE'); +(-1649075,'Champions, you\'re alive! Not only have you defeated every challenge of the Trial of the Crusader, but also thwarted Arthas\' plans! Your skill and cunning will prove to be a powerful weapon against the Scourge. Well done! Allow one of the Crusade\'s mages to transport you to the surface!',0,0,0,1,'tirion SAY_EPILOGUE'), + +(-1649076,'As its companion perishes, %s becomes enraged!',0,3,0,0,'twin jormungars EMOTE_JORMUNGAR_ENRAGE'); -- -1 650 000 TRIAL OF THE CHAMPION INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES diff --git a/sql/updates/r3113_scriptdev2.sql b/sql/updates/r3113_scriptdev2.sql new file mode 100644 index 000000000..eb97dfab7 --- /dev/null +++ b/sql/updates/r3113_scriptdev2.sql @@ -0,0 +1,3 @@ +DELETE FROM script_texts WHERE entry=-1649076; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1649076,'As its companion perishes, %s becomes enraged!',0,3,0,0,'twin jormungars EMOTE_JORMUNGAR_ENRAGE'); From fea9123a2efece61cb4d732b7b80d722dd99a4cb Mon Sep 17 00:00:00 2001 From: Xfurry Date: Thu, 19 Feb 2015 22:30:58 +0100 Subject: [PATCH 1127/1172] [3114] Add combat abilities for Icehowl - ToC25 This will complete the first encounter in ToC25 --- .../boss_northrend_beasts.cpp | 217 +++++++++++++++++- sd2_revision_nr.h | 2 +- sql/scriptdev2_script_full.sql | 3 +- sql/updates/r3114_scriptdev2.sql | 3 + 4 files changed, 215 insertions(+), 10 deletions(-) create mode 100644 sql/updates/r3114_scriptdev2.sql diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp index eee2e2b06..88a77bcf8 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: trial_of_the_crusader -SD%Complete: 70 -SDComment: Icehowl combat abilities NYI +SD%Complete: 90 +SDComment: Snobolds behavior can be improved SDCategory: Crusader Coliseum EndScriptData */ @@ -852,33 +852,234 @@ bool EffectDummyCreature_worm_emerge(Unit* pCaster, uint32 uiSpellId, SpellEffec enum { EMOTE_MASSIVE_CRASH = -1649039, + EMOTE_WALL_CRASH = -1649077, + + // standard combat spells + SPELL_ARCTIC_BREATH = 66689, + SPELL_WHIRL = 67345, + SPELL_FEROCIOUS_BUTT = 66770, + + // trample spells + SPELL_MASSIVE_CRASH = 66683, + SPELL_SURGE_OF_ADRENALINE = 68667, // buff for players - used only in non heroic + SPELL_ROAR = 66736, // turn to npc 35062 + SPELL_JUMP_BACK = 66733, // jump back; dummy effect on npc 35062 + SPELL_TRAMPLE = 66734, // cast when reached target 35062 + SPELL_STAGGERED_DAZE = 66758, // debuff on player miss during trample + SPELL_FROTHING_RAGE = 66759, // buff gained on player hit + + NPC_FURIOUS_CHARGE_STALKER = 35062, // summoned by missing spell 66729 + + POINT_ID_CHARGE_BEGIN = 101, + POINT_ID_CHARGE_END = 102, }; struct boss_icehowlAI : public ScriptedAI { boss_icehowlAI(Creature* pCreature) : ScriptedAI(pCreature) { - m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_pInstance = (instance_trial_of_the_crusader*)pCreature->GetInstanceData(); + m_fSpeedRate = m_creature->GetSpeedRate(MOVE_RUN); Reset(); } - ScriptedInstance* m_pInstance; + instance_trial_of_the_crusader* m_pInstance; + + uint32 m_uiFerociousButtTimer; + uint32 m_uiArticBreathTimer; + uint32 m_uiWhirlTimer; + uint32 m_uiMassiveCrashTimer; + + uint32 m_uiFuriosChargeTimer; + uint8 m_uiFuriousChargeStage; - void Reset() override {} + bool m_bIsFuriousCharge; - void JustReachedHome() override + float m_fSpeedRate; + + ObjectGuid m_chargeStalkerGuid; + + void Reset() override { + m_uiFerociousButtTimer = 30000; + m_uiArticBreathTimer = 20000; + m_uiWhirlTimer = 15000; + m_uiMassiveCrashTimer = 45000; + + m_uiFuriosChargeTimer = 0; + m_uiFuriousChargeStage = 0; + m_bIsFuriousCharge = false; + + m_creature->SetSpeedRate(MOVE_RUN, m_fSpeedRate); } - void Aggro(Unit* /*pWho*/) override + void MoveInLineOfSight(Unit* pWho) override { + if (m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE)) + return; + + ScriptedAI::MoveInLineOfSight(pWho); + } + + void JustSummoned(Creature* pSummoned) override + { + if (pSummoned->GetEntry() == NPC_FURIOUS_CHARGE_STALKER) + m_chargeStalkerGuid = pSummoned->GetObjectGuid(); } - void UpdateAI(const uint32 /*uiDiff*/) override + void MovementInform(uint32 uiType, uint32 uiPointId) override + { + if (uiType == EFFECT_MOTION_TYPE && uiPointId == POINT_ID_CHARGE_BEGIN) + { + if (DoCastSpellIfCan(m_creature, SPELL_MASSIVE_CRASH) == CAST_OK) + m_uiFuriosChargeTimer = 4000; + } + else if (uiType == POINT_MOTION_TYPE && uiPointId == POINT_ID_CHARGE_END) + { + // cast trample and try to hit a player + if (DoCastSpellIfCan(m_creature, SPELL_TRAMPLE, CAST_TRIGGERED) == CAST_OK) + { + SetCombatMovement(true); + m_creature->GetMotionMaster()->Clear(); + m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); + + m_bIsFuriousCharge = false; + m_creature->SetSpeedRate(MOVE_RUN, m_fSpeedRate); + } + + // if player is missed then get the debuff + if (!m_creature->HasAura(SPELL_FROTHING_RAGE)) + { + DoScriptText(EMOTE_WALL_CRASH, m_creature); + DoCastSpellIfCan(m_creature, SPELL_STAGGERED_DAZE, CAST_TRIGGERED); + } + } + } + + void SpellHitTarget(Unit* pTarget, const SpellEntry* pSpellEntry) override + { + if (pTarget->GetTypeId() != TYPEID_PLAYER) + return; + + // cast frothing rage on player hit + if (pSpellEntry->Id == SPELL_TRAMPLE) + DoCastSpellIfCan(m_creature, SPELL_FROTHING_RAGE, CAST_TRIGGERED); + } + + // function that will apply the Surge of Adrenaline to all players + void DoApplySurgeOfAdrenaline() + { + Map::PlayerList const& PlayerList = m_creature->GetMap()->GetPlayers(); + + if (PlayerList.isEmpty()) + return; + + for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i) + { + if (i->getSource()->isAlive()) + i->getSource()->CastSpell(i->getSource(), SPELL_SURGE_OF_ADRENALINE, true); + } + } + + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; + if (m_bIsFuriousCharge) + { + if (m_uiFuriosChargeTimer < uiDiff) + { + switch (m_uiFuriousChargeStage) + { + case 0: + // pick a target + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0, uint32(0), SELECT_FLAG_PLAYER | SELECT_FLAG_IN_LOS)) + { + DoScriptText(EMOTE_MASSIVE_CRASH, m_creature, pTarget); + m_creature->SummonCreature(NPC_FURIOUS_CHARGE_STALKER, pTarget->GetPositionX(), pTarget->GetPositionY(), pTarget->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN, 35000); + } + + // apply surge of adrenaline + if (m_pInstance && !m_pInstance->IsHeroicDifficulty()) + DoApplySurgeOfAdrenaline(); + + m_uiFuriosChargeTimer = 1000; + break; + + case 1: + // roar at target + if (Creature* pTarget = m_creature->GetMap()->GetCreature(m_chargeStalkerGuid)) + DoCastSpellIfCan(pTarget, SPELL_ROAR); + + m_uiFuriosChargeTimer = 2000; + break; + + case 2: + // jump back and prepare to charge + if (Creature* pTarget = m_creature->GetMap()->GetCreature(m_chargeStalkerGuid)) + DoCastSpellIfCan(pTarget, SPELL_JUMP_BACK); + + m_uiFuriosChargeTimer = 2000; + break; + + case 3: + // charge to the target + m_creature->SetSpeedRate(MOVE_RUN, m_fSpeedRate * 4); + if (Creature* pTarget = m_creature->GetMap()->GetCreature(m_chargeStalkerGuid)) + m_creature->GetMotionMaster()->MovePoint(POINT_ID_CHARGE_END, pTarget->GetPositionX(), pTarget->GetPositionY(), pTarget->GetPositionZ()); + + m_uiFuriosChargeTimer = 99999; + break; + } + ++m_uiFuriousChargeStage; + } + else + m_uiFuriosChargeTimer -= uiDiff; + + // no other actions during charge + return; + } + + if (m_uiMassiveCrashTimer < uiDiff) + { + SetCombatMovement(false); + m_creature->InterruptNonMeleeSpells(false); + m_creature->GetMotionMaster()->Clear(); + m_creature->GetMotionMaster()->MoveJump(aSpawnPositions[0][0], aSpawnPositions[0][1], aSpawnPositions[1][2], 2 * m_creature->GetSpeed(MOVE_RUN), 10.0f, POINT_ID_CHARGE_BEGIN); + + m_bIsFuriousCharge = true; + m_uiFuriousChargeStage = 0; + m_uiFuriosChargeTimer = 99999; + m_uiMassiveCrashTimer = urand(40000, 45000); + } + else + m_uiMassiveCrashTimer -= uiDiff; + + if (m_uiWhirlTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_WHIRL) == CAST_OK) + m_uiWhirlTimer = urand(15000, 20000); + } + else + m_uiWhirlTimer -= uiDiff; + + if (m_uiArticBreathTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_ARCTIC_BREATH) == CAST_OK) + m_uiArticBreathTimer = urand(25000, 30000); + } + else + m_uiArticBreathTimer -= uiDiff; + + if (m_uiFerociousButtTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_FEROCIOUS_BUTT) == CAST_OK) + m_uiFerociousButtTimer = 15000; + } + else + m_uiFerociousButtTimer -= uiDiff; + DoMeleeAttackIfReady(); } }; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 43a37343a..99a7df065 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3113" + #define SD2_REVISION_NR "3114" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 69bed4e95..903b7918f 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -4722,7 +4722,8 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1649075,'Champions, you\'re alive! Not only have you defeated every challenge of the Trial of the Crusader, but also thwarted Arthas\' plans! Your skill and cunning will prove to be a powerful weapon against the Scourge. Well done! Allow one of the Crusade\'s mages to transport you to the surface!',0,0,0,1,'tirion SAY_EPILOGUE'), -(-1649076,'As its companion perishes, %s becomes enraged!',0,3,0,0,'twin jormungars EMOTE_JORMUNGAR_ENRAGE'); +(-1649076,'As its companion perishes, %s becomes enraged!',0,3,0,0,'twin jormungars EMOTE_JORMUNGAR_ENRAGE'), +(-1649077,'%s crashes into the Coliseum wall and is stunned!',0,3,0,0,'icehowl EMOTE_WALL_CRASH'); -- -1 650 000 TRIAL OF THE CHAMPION INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES diff --git a/sql/updates/r3114_scriptdev2.sql b/sql/updates/r3114_scriptdev2.sql new file mode 100644 index 000000000..d183d8ccb --- /dev/null +++ b/sql/updates/r3114_scriptdev2.sql @@ -0,0 +1,3 @@ +DELETE FROM script_texts WHERE entry=-1649077; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1649077,'%s crashes into the Coliseum wall and is stunned!',0,3,0,0,'icehowl EMOTE_WALL_CRASH'); From 2e37e334bf36d3de7fd30578f81e0a0443b8031d Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sun, 1 Mar 2015 01:50:22 +0100 Subject: [PATCH 1128/1172] [3115] Fix encounter reset for Jaraxxus - ToC25 ToDo: confirm whether all the details in the reset mechanics are covered Also add missing gossip text --- .../trial_of_the_crusader/boss_jaraxxus.cpp | 27 ++++++++++++++----- .../instance_trial_of_the_crusader.cpp | 6 +++-- .../trial_of_the_crusader.cpp | 2 +- .../trial_of_the_crusader.h | 1 + sd2_revision_nr.h | 2 +- sql/scriptdev2_script_full.sql | 3 ++- sql/updates/r3115_scriptdev2.sql | 3 +++ 7 files changed, 33 insertions(+), 11 deletions(-) create mode 100644 sql/updates/r3115_scriptdev2.sql diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_jaraxxus.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_jaraxxus.cpp index d57f92406..06512f8ac 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_jaraxxus.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_jaraxxus.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: trial_of_the_crusader -SD%Complete: 75 -SDComment: Evade handling must be fixed, this is currently totally wrong. Some issues with emotes and texts, generic improvements related to spells can be missing +SD%Complete: 90 +SDComment: Some issues with emotes and texts, generic improvements related to spells can be missing SDCategory: Crusader Coliseum EndScriptData */ @@ -52,6 +52,8 @@ enum SPELL_NETHER_POWER = 67009, SPELL_BERSERK = 26662, + SPELL_ENSLAVE_JARAXXUS = 67924, // dummy aura that will hold the boss after evade + // npcs NPC_INFERNAL_VOLCANO = 34813, NPC_NETHER_PORTAL = 34825 @@ -90,6 +92,8 @@ struct boss_jaraxxusAI : public ScriptedAI m_bVolcanoSummon = true; DoCastSpellIfCan(m_creature, SPELL_JARAXXUS_HITTIN_YA); + + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PASSIVE | UNIT_FLAG_OOC_NOT_ATTACKABLE); } void JustReachedHome() override @@ -97,7 +101,8 @@ struct boss_jaraxxusAI : public ScriptedAI if (m_pInstance) m_pInstance->SetData(TYPE_JARAXXUS, FAIL); - m_creature->ForcedDespawn(); + // ToDo: confirm if this is correct and if we are not missing something! + DoCastSpellIfCan(m_creature, SPELL_ENSLAVE_JARAXXUS); } void JustDied(Unit* /*pKiller*/) override @@ -114,16 +119,26 @@ struct boss_jaraxxusAI : public ScriptedAI if (m_pInstance) m_pInstance->SetData(TYPE_JARAXXUS, IN_PROGRESS); + m_creature->RemoveAurasDueToSpell(SPELL_ENSLAVE_JARAXXUS); DoCastSpellIfCan(m_creature, SPELL_NETHER_POWER); - m_creature->SetInCombatWithZone(); } void EnterEvadeMode() override { - if (m_pInstance && m_pInstance->GetData(TYPE_JARAXXUS) != IN_PROGRESS) + if (!m_pInstance) return; - ScriptedAI::EnterEvadeMode(); + // special evade mechanics when attacking Wilfred + if (m_pInstance->GetData(TYPE_JARAXXUS) != IN_PROGRESS) + { + m_creature->RemoveAllAurasOnEvade(); + m_creature->DeleteThreatList(); + m_creature->CombatStop(true); + m_creature->SetLootRecipient(NULL); + Reset(); + } + else + ScriptedAI::EnterEvadeMode(); } void KilledUnit(Unit* pVictim) override diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp index e42b31269..a8431c6da 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp @@ -110,6 +110,8 @@ static const DialogueEntryTwoSide aTocDialogues[] = {EVENT_KILL_FIZZLEBANG, 0, 0, 0, 5000}, // Kill Fizzlebang {SAY_TIRION_JARAXXUS_INTRO_2, NPC_TIRION_A, 0, 0, 6000}, {EVENT_JARAXXUS_START_ATTACK, 0, 0, 0, 0}, + {EVENT_JARAXXUS_RESET_DELAY, 0, 0, 0, 8000}, + {EVENT_JARAXXUS_START_ATTACK, 0, 0, 0, 0}, // Jaruxxus (Outro) {SAY_JARAXXUS_DEATH, NPC_JARAXXUS, 0, 0, 6000}, // Jaraxxus Death {SAY_TIRION_JARAXXUS_EXIT_1, NPC_TIRION_A, 0, 0, 5000}, @@ -277,8 +279,8 @@ void instance_trial_of_the_crusader::SetData(uint32 uiType, uint32 uiData) break; case TYPE_JARAXXUS: if (uiData == SPECIAL) - // TODO - What happen in wipe case? - StartNextDialogueText(TYPE_JARAXXUS); + // TODO - Confirm if we are not missing something + StartNextDialogueText(m_auiEncounter[uiType] != FAIL ? TYPE_JARAXXUS : EVENT_JARAXXUS_RESET_DELAY); else if (uiData == FAIL) { SetData(TYPE_WIPE_COUNT, m_auiEncounter[TYPE_WIPE_COUNT] + 1); diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp index 5f66170ec..19ae93ea1 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp @@ -55,7 +55,7 @@ enum GOSSIP_ITEM_BEAST_WIPE_START = -3000000, GOSSIP_ITEM_JARAXXUS_INIT = -3649003, - GOSSIP_ITEM_JARAXXUS_START = -3000000, + GOSSIP_ITEM_JARAXXUS_START = -3649011, GOSSIP_ITEM_JARAXXUS_WIPE_INIT = -3649004, GOSSIP_ITEM_JARAXXUS_WIPE_START = -3000000, diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h index 5b5330bcb..07594ec2b 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h @@ -25,6 +25,7 @@ enum EVENT_ARTHAS_PORTAL = 11, EVENT_SUMMON_THE_LICHKING = 12, EVENT_DESTROY_FLOOR = 13, + EVENT_JARAXXUS_RESET_DELAY = 14, NPC_BEAST_COMBAT_STALKER = 36549, NPC_GORMOK = 34796, diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 99a7df065..9aa30230f 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3114" + #define SD2_REVISION_NR "3115" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 903b7918f..033b2add3 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -5156,7 +5156,8 @@ INSERT INTO gossip_texts (entry,content_default,comment) VALUES (-3649007,'That tough, huh?','barrett GOSSIP_ITEM_TWINS_INIT'), (-3649008,'Val\'kyr? We\'re ready for them','barrett GOSSIP_ITEM_TWINS_START'), (-3649009,'Your words of praise are appreciated, Coliseum Master.','barrett GOSSIP_ITEM_ANUB_INIT'), -(-3649010,'That is strange...','barrett GOSSIP_ITEM_ANUB_START'); +(-3649010,'That is strange...','barrett GOSSIP_ITEM_ANUB_START'), +(-3649011,'We\'re ready for the next challenge.','barrett GOSSIP_ITEM_JARAXXUS_START'); -- -3 650 000 TRIAL OF THE CHAMPION INSERT INTO gossip_texts (entry,content_default,comment) VALUES diff --git a/sql/updates/r3115_scriptdev2.sql b/sql/updates/r3115_scriptdev2.sql new file mode 100644 index 000000000..238136cec --- /dev/null +++ b/sql/updates/r3115_scriptdev2.sql @@ -0,0 +1,3 @@ +DELETE FROM gossip_texts WHERE entry=-3649011; +INSERT INTO gossip_texts (entry,content_default,comment) VALUES +(-3649011,'We\'re ready for the next challenge.','barrett GOSSIP_ITEM_JARAXXUS_START'); From df6b1fb51d77ce582c8b41f51227c8f6c258069a Mon Sep 17 00:00:00 2001 From: Xfurry Date: Thu, 5 Mar 2015 23:17:11 +0100 Subject: [PATCH 1129/1172] [3116] Add spawn support for the Faction Champions - ToC25 This will allow the instance to proper select the champions entries in order to include both healers and dps Also fix the missing text emotes --- .../boss_faction_champions.cpp | 550 +++++++++++++++++- .../trial_of_the_crusader/boss_jaraxxus.cpp | 2 + .../boss_northrend_beasts.cpp | 3 + .../instance_trial_of_the_crusader.cpp | 124 +++- .../trial_of_the_crusader.h | 96 ++- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 14 + sql/scriptdev2_script_full.sql | 52 +- sql/updates/r3116_mangos.sql | 14 + sql/updates/r3116_scriptdev2.sql | 6 + 10 files changed, 824 insertions(+), 39 deletions(-) create mode 100644 sql/updates/r3116_mangos.sql create mode 100644 sql/updates/r3116_scriptdev2.sql diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_faction_champions.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_faction_champions.cpp index 79819da38..9c8d164ad 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_faction_champions.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_faction_champions.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: faction_champions -SD%Complete: 0 -SDComment: +SD%Complete: 30 +SDComment: Basic script only SDCategory: Crusader Coliseum EndScriptData */ @@ -35,8 +35,554 @@ enum SAY_VARIAN_PVP_H_SLAY_2 = -1649053, SAY_VARIAN_PVP_H_SLAY_3 = -1649054, SAY_VARIAN_PVP_H_SLAY_4 = -1649055, + + SPELL_PVP_TRINKET = 65547, + SPELL_ENCOUNTER_KILL_CREDIT = 68184, +}; + +/*###### +## trial_crusader_common +######*/ + +struct trial_crusader_commonAI : public ScriptedAI +{ + trial_crusader_commonAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (instance_trial_of_the_crusader*)pCreature->GetInstanceData(); + Reset(); + } + + instance_trial_of_the_crusader* m_pInstance; + + void Reset() override + { + } + + void MoveInLineOfSight(Unit* pWho) override + { + if (m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE)) + return; + + ScriptedAI::MoveInLineOfSight(pWho); + } + + void Aggro(Unit* pWho) override + { + if (m_pInstance) + { + if (m_pInstance->GetData(TYPE_FACTION_CHAMPIONS) != IN_PROGRESS) + m_pInstance->SetData(TYPE_FACTION_CHAMPIONS, IN_PROGRESS); + } + } + + void KilledUnit(Unit* pVictim) override + { + if (!m_pInstance) + return; + + Creature* pSpeaker = m_pInstance->GetSingleCreatureFromStorage(m_pInstance->GetPlayerTeam() == ALLIANCE ? NPC_GARROSH : NPC_VARIAN); + if (!pSpeaker) + return; + + switch (urand(0, 3)) + { + case 0: DoScriptText(m_pInstance->GetPlayerTeam() == ALLIANCE ? SAY_GARROSH_PVP_A_SLAY_1 : SAY_VARIAN_PVP_H_SLAY_1, pSpeaker); break; + case 1: DoScriptText(m_pInstance->GetPlayerTeam() == ALLIANCE ? SAY_GARROSH_PVP_A_SLAY_2 : SAY_VARIAN_PVP_H_SLAY_2, pSpeaker); break; + case 2: DoScriptText(m_pInstance->GetPlayerTeam() == ALLIANCE ? SAY_GARROSH_PVP_A_SLAY_3 : SAY_VARIAN_PVP_H_SLAY_3, pSpeaker); break; + case 3: DoScriptText(m_pInstance->GetPlayerTeam() == ALLIANCE ? SAY_GARROSH_PVP_A_SLAY_4 : SAY_VARIAN_PVP_H_SLAY_4, pSpeaker); break; + } + } + + void JustReachedHome() override + { + if (m_pInstance) + { + if (m_pInstance->GetData(TYPE_FACTION_CHAMPIONS) != FAIL) + m_pInstance->SetData(TYPE_FACTION_CHAMPIONS, FAIL); + } + } + + // Return true to handle shared timers and MeleeAttack + virtual bool UpdateCrusaderAI(const uint32 /*uiDiff*/) { return true; } + + void UpdateAI(const uint32 uiDiff) override + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + // Call specific virtual function + if (!UpdateCrusaderAI(uiDiff)) + return; + + DoMeleeAttackIfReady(); + } +}; + +enum +{ + // death knight spells +}; + +/*###### +## boss_crusader_death_knight +######*/ + +struct boss_crusader_death_knightAI : public trial_crusader_commonAI +{ + boss_crusader_death_knightAI(Creature* pCreature) : trial_crusader_commonAI(pCreature) { Reset(); } + + void Reset() override + { + trial_crusader_commonAI::Reset(); + } + + bool UpdateChampionAI(const uint32 uiDiff) + { + } +}; + +CreatureAI* GetAI_boss_crusader_death_knight(Creature* pCreature) +{ + return new boss_crusader_death_knightAI(pCreature); +} + +enum +{ + // druid balance spells +}; + +/*###### +## boss_crusader_druid_balance +######*/ + +struct boss_crusader_druid_balanceAI : public trial_crusader_commonAI +{ + boss_crusader_druid_balanceAI(Creature* pCreature) : trial_crusader_commonAI(pCreature) { Reset(); } + + void Reset() override + { + trial_crusader_commonAI::Reset(); + } + + bool UpdateChampionAI(const uint32 uiDiff) + { + } +}; + +CreatureAI* GetAI_boss_crusader_druid_balance(Creature* pCreature) +{ + return new boss_crusader_druid_balanceAI(pCreature); +} + +enum +{ + // druid restoration spells +}; + +/*###### +## boss_crusader_druid_resto +######*/ + +struct boss_crusader_druid_restoAI : public trial_crusader_commonAI +{ + boss_crusader_druid_restoAI(Creature* pCreature) : trial_crusader_commonAI(pCreature) { Reset(); } + + void Reset() override + { + trial_crusader_commonAI::Reset(); + } + + bool UpdateChampionAI(const uint32 uiDiff) + { + } +}; + +CreatureAI* GetAI_boss_crusader_druid_resto(Creature* pCreature) +{ + return new boss_crusader_druid_restoAI(pCreature); +} + +enum +{ + // hunter spells + SPELL_CALL_PET = 67777, +}; + +/*###### +## boss_crusader_hunter +######*/ + +struct boss_crusader_hunterAI : public trial_crusader_commonAI +{ + boss_crusader_hunterAI(Creature* pCreature) : trial_crusader_commonAI(pCreature) { Reset(); } + + void Reset() override + { + trial_crusader_commonAI::Reset(); + } + + bool UpdateChampionAI(const uint32 uiDiff) + { + } +}; + +CreatureAI* GetAI_boss_crusader_hunter(Creature* pCreature) +{ + return new boss_crusader_hunterAI(pCreature); +} + +enum +{ + // mage spells +}; + +/*###### +## boss_crusader_mage +######*/ + +struct boss_crusader_mageAI : public trial_crusader_commonAI +{ + boss_crusader_mageAI(Creature* pCreature) : trial_crusader_commonAI(pCreature) { Reset(); } + + void Reset() override + { + trial_crusader_commonAI::Reset(); + } + + bool UpdateChampionAI(const uint32 uiDiff) + { + } +}; + +CreatureAI* GetAI_boss_crusader_mage(Creature* pCreature) +{ + return new boss_crusader_mageAI(pCreature); +} + +enum +{ + // paladin holy spells +}; + +/*###### +## boss_crusader_paladin_holy +######*/ + +struct boss_crusader_paladin_holyAI : public trial_crusader_commonAI +{ + boss_crusader_paladin_holyAI(Creature* pCreature) : trial_crusader_commonAI(pCreature) { Reset(); } + + void Reset() override + { + trial_crusader_commonAI::Reset(); + } + + bool UpdateChampionAI(const uint32 uiDiff) + { + } +}; + +CreatureAI* GetAI_boss_crusader_paladin_holy(Creature* pCreature) +{ + return new boss_crusader_paladin_holyAI(pCreature); +} + +enum +{ + // paladin retribution spells +}; + +/*###### +## boss_crusader_paladin_retri +######*/ + +struct boss_crusader_paladin_retriAI : public trial_crusader_commonAI +{ + boss_crusader_paladin_retriAI(Creature* pCreature) : trial_crusader_commonAI(pCreature) { Reset(); } + + void Reset() override + { + trial_crusader_commonAI::Reset(); + } + + bool UpdateChampionAI(const uint32 uiDiff) + { + } +}; + +CreatureAI* GetAI_boss_crusader_paladin_retri(Creature* pCreature) +{ + return new boss_crusader_paladin_retriAI(pCreature); +} + +enum +{ + // priest discipline spells +}; + +/*###### +## boss_crusader_priest_disc +######*/ + +struct boss_crusader_priest_discAI : public trial_crusader_commonAI +{ + boss_crusader_priest_discAI(Creature* pCreature) : trial_crusader_commonAI(pCreature) { Reset(); } + + void Reset() override + { + trial_crusader_commonAI::Reset(); + } + + bool UpdateChampionAI(const uint32 uiDiff) + { + } +}; + +CreatureAI* GetAI_boss_crusader_priest_disc(Creature* pCreature) +{ + return new boss_crusader_priest_discAI(pCreature); +} + +enum +{ + // priest shadow spells +}; + +/*###### +## boss_crusader_priest_shadow +######*/ + +struct boss_crusader_priest_shadowAI : public trial_crusader_commonAI +{ + boss_crusader_priest_shadowAI(Creature* pCreature) : trial_crusader_commonAI(pCreature) { Reset(); } + + void Reset() override + { + trial_crusader_commonAI::Reset(); + } + + bool UpdateChampionAI(const uint32 uiDiff) + { + } +}; + +CreatureAI* GetAI_boss_crusader_priest_shadow(Creature* pCreature) +{ + return new boss_crusader_priest_shadowAI(pCreature); +} + +enum +{ + // rogue spells +}; + +/*###### +## boss_crusader_rogue +######*/ + +struct boss_crusader_rogueAI : public trial_crusader_commonAI +{ + boss_crusader_rogueAI(Creature* pCreature) : trial_crusader_commonAI(pCreature) { Reset(); } + + void Reset() override + { + trial_crusader_commonAI::Reset(); + } + + bool UpdateChampionAI(const uint32 uiDiff) + { + } }; +CreatureAI* GetAI_boss_crusader_rogue(Creature* pCreature) +{ + return new boss_crusader_rogueAI(pCreature); +} + +enum +{ + // shaman enhancement spells +}; + +/*###### +## boss_crusader_shaman_enha +######*/ + +struct boss_crusader_shaman_enhaAI : public trial_crusader_commonAI +{ + boss_crusader_shaman_enhaAI(Creature* pCreature) : trial_crusader_commonAI(pCreature) { Reset(); } + + void Reset() override + { + trial_crusader_commonAI::Reset(); + } + + bool UpdateChampionAI(const uint32 uiDiff) + { + } +}; + +CreatureAI* GetAI_boss_crusader_shaman_enha(Creature* pCreature) +{ + return new boss_crusader_shaman_enhaAI(pCreature); +} + +enum +{ + // shaman restoration spells +}; + +/*###### +## boss_crusader_shaman_resto +######*/ + +struct boss_crusader_shaman_restoAI : public trial_crusader_commonAI +{ + boss_crusader_shaman_restoAI(Creature* pCreature) : trial_crusader_commonAI(pCreature) { Reset(); } + + void Reset() override + { + trial_crusader_commonAI::Reset(); + } + + bool UpdateChampionAI(const uint32 uiDiff) + { + } +}; + +CreatureAI* GetAI_boss_crusader_shaman_resto(Creature* pCreature) +{ + return new boss_crusader_shaman_restoAI(pCreature); +} + +enum +{ + // warlock spells + SPELL_SUMMON_FELHUNTER = 67514, +}; + +/*###### +## boss_crusader_warlock +######*/ + +struct boss_crusader_warlockAI : public trial_crusader_commonAI +{ + boss_crusader_warlockAI(Creature* pCreature) : trial_crusader_commonAI(pCreature) { Reset(); } + + void Reset() override + { + trial_crusader_commonAI::Reset(); + } + + bool UpdateChampionAI(const uint32 uiDiff) + { + } +}; + +CreatureAI* GetAI_boss_crusader_warlock(Creature* pCreature) +{ + return new boss_crusader_warlockAI(pCreature); +} + +enum +{ + // warrior spells +}; + +/*###### +## boss_crusader_warrior +######*/ + +struct boss_crusader_warriorAI : public trial_crusader_commonAI +{ + boss_crusader_warriorAI(Creature* pCreature) : trial_crusader_commonAI(pCreature) { Reset(); } + + void Reset() override + { + trial_crusader_commonAI::Reset(); + } + + bool UpdateChampionAI(const uint32 uiDiff) + { + } +}; + +CreatureAI* GetAI_boss_crusader_warrior(Creature* pCreature) +{ + return new boss_crusader_warriorAI(pCreature); +} + void AddSC_boss_faction_champions() { + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_crusader_death_knight"; + pNewScript->GetAI = &GetAI_boss_crusader_death_knight; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "boss_crusader_druid_balance"; + pNewScript->GetAI = &GetAI_boss_crusader_druid_balance; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "boss_crusader_druid_resto"; + pNewScript->GetAI = &GetAI_boss_crusader_druid_resto; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "boss_crusader_hunter"; + pNewScript->GetAI = &GetAI_boss_crusader_hunter; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "boss_crusader_mage"; + pNewScript->GetAI = &GetAI_boss_crusader_mage; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "boss_crusader_paladin_holy"; + pNewScript->GetAI = &GetAI_boss_crusader_paladin_holy; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "boss_crusader_paladin_retri"; + pNewScript->GetAI = &GetAI_boss_crusader_paladin_retri; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "boss_crusader_priest_disc"; + pNewScript->GetAI = &GetAI_boss_crusader_priest_disc; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "boss_crusader_priest_shadow"; + pNewScript->GetAI = &GetAI_boss_crusader_priest_shadow; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "boss_crusader_rogue"; + pNewScript->GetAI = &GetAI_boss_crusader_rogue; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "boss_crusader_shaman_enha"; + pNewScript->GetAI = &GetAI_boss_crusader_shaman_enha; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "boss_crusader_shaman_resto"; + pNewScript->GetAI = &GetAI_boss_crusader_shaman_resto; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "boss_crusader_warlock"; + pNewScript->GetAI = &GetAI_boss_crusader_warlock; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "boss_crusader_warrior"; + pNewScript->GetAI = &GetAI_boss_crusader_warrior; + pNewScript->RegisterSelf(); } diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_jaraxxus.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_jaraxxus.cpp index 06512f8ac..17f807284 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_jaraxxus.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_jaraxxus.cpp @@ -116,6 +116,8 @@ struct boss_jaraxxusAI : public ScriptedAI if (pWho->GetEntry() == NPC_FIZZLEBANG) return; + DoScriptText(SAY_AGGRO, m_creature); + if (m_pInstance) m_pInstance->SetData(TYPE_JARAXXUS, IN_PROGRESS); diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp index 88a77bcf8..bc6d3d9bc 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp @@ -38,6 +38,9 @@ enum SPELL_BERSERK = 26662, SPELL_JORMUNGAR_ENRAGE = 68335, + // NPC_MOBILE_BURROW_TARGET = 35226, // summoned by missing spell 66980 - purpose unk, related to jormungars event + // NPC_SESSILE_BURROW_TARGET = 35227, // summoned by missing spell 66981 - purpose unk, related to jormungars event + PHASE_GORMOK = 0, PHASE_WORMS = 1, PHASE_ICEHOWL = 2, diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp index a8431c6da..8a077e1a5 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp @@ -124,7 +124,8 @@ static const DialogueEntryTwoSide aTocDialogues[] = {SAY_GARROSH_PVP_A_INTRO_1, NPC_GARROSH, SAY_VARIAN_PVP_H_INTRO_1, NPC_VARIAN, 14000}, {SAY_TIRION_PVP_INTRO_2, NPC_TIRION_A, 0, 0, 1000}, {TYPE_FACTION_CHAMPIONS, 0, 0, 0, 5000}, - {SAY_GARROSH_PVP_A_INTRO_2, NPC_GARROSH, SAY_VARIAN_PVP_H_INTRO_2, NPC_VARIAN, 0}, + {SAY_GARROSH_PVP_A_INTRO_2, NPC_GARROSH, SAY_VARIAN_PVP_H_INTRO_2, NPC_VARIAN, 4000}, + {EVENT_CHAMPIONS_ATTACK, 0, 0, 0, 0}, {SAY_VARIAN_PVP_A_WIN, NPC_VARIAN, SAY_GARROSH_PVP_H_WIN, NPC_GARROSH, 4000}, {SAY_TIRION_PVP_WIN, NPC_TIRION_A, 0, 0, 27000}, {NPC_RAMSEY_4, 0, 0, 0, 0}, @@ -235,6 +236,13 @@ void instance_trial_of_the_crusader::OnObjectCreate(GameObject* pGo) void instance_trial_of_the_crusader::OnPlayerEnter(Player* pPlayer) { + // Show wipe world state on heroic difficulty + if (IsHeroicDifficulty()) + { + pPlayer->SendUpdateWorldState(WORLD_STATE_WIPES, 1); + pPlayer->SendUpdateWorldState(WORLD_STATE_WIPES_COUNT, MAX_WIPES_ALLOWED >= GetData(TYPE_WIPE_COUNT) ? MAX_WIPES_ALLOWED - GetData(TYPE_WIPE_COUNT) : 0); + } + if (m_uiTeam) return; @@ -242,13 +250,7 @@ void instance_trial_of_the_crusader::OnPlayerEnter(Player* pPlayer) SetDialogueSide(m_uiTeam == ALLIANCE); DoSummonRamsey(0); - - // Show wipe world state on heroic difficulty - if (IsHeroicDifficulty()) - { - pPlayer->SendUpdateWorldState(WORLD_STATE_WIPES, 1); - pPlayer->SendUpdateWorldState(WORLD_STATE_WIPES_COUNT, MAX_WIPES_ALLOWED >= GetData(TYPE_WIPE_COUNT) ? MAX_WIPES_ALLOWED - GetData(TYPE_WIPE_COUNT) : 0); - } + DoSelectCrusaders(); } void instance_trial_of_the_crusader::SetData(uint32 uiType, uint32 uiData) @@ -440,6 +442,51 @@ void instance_trial_of_the_crusader::DoOpenMainGate() m_uiGateResetTimer = 10000; } +// Function that will select the faction champions entries +void instance_trial_of_the_crusader::DoSelectCrusaders() +{ + std::vector vCrusaderHealers; + std::vector vCrusaderOthers; + + // add all the healers and dps crusaders to vector + for (uint8 i = 0; i < MAX_CRUSADERS_HEALERS; ++i) + vCrusaderHealers.push_back(m_uiTeam == ALLIANCE ? aHordeHealerCrusaders[i] : aAllyHealerCrusaders[i]); + for (uint8 i = 0; i < MAX_CRUSADERS_OTHER; ++i) + vCrusaderOthers.push_back(m_uiTeam == ALLIANCE ? aHordeOtherCrusaders[i] : aAllyOtherCrusaders[i]); + + // replace random healers with corresponding dps + uint8 uiIndex = urand(0, vCrusaderHealers.size() - 1); + vCrusaderOthers.push_back(m_uiTeam == ALLIANCE ? aHordeReplacementCrusaders[uiIndex] : aAllyReplacementCrusaders[uiIndex]); + vCrusaderHealers.erase(vCrusaderHealers.begin() + uiIndex); + + if (!Is25ManDifficulty()) + { + // on 10 man we replace a second healer + uiIndex = urand(0, vCrusaderHealers.size() - 1); + + uint32 uiCrusaderEntry = vCrusaderHealers[uiIndex]; + for (uint8 i = 0; i < MAX_CRUSADERS_HEALERS; ++i) + { + if (uiCrusaderEntry == (m_uiTeam == ALLIANCE ? aHordeHealerCrusaders[i] : aAllyHealerCrusaders[i])) + { + vCrusaderOthers.push_back(m_uiTeam == ALLIANCE ? aHordeReplacementCrusaders[i] : aAllyReplacementCrusaders[i]); + break; + } + } + vCrusaderHealers.erase(vCrusaderHealers.begin() + uiIndex); + + // remove 4 random dps crusaders + for (uint8 i = 0; i < MAX_CRUSADERS_HEALERS; ++i) + vCrusaderOthers.erase(vCrusaderOthers.begin() + urand(0, vCrusaderOthers.size() - 1)); + } + + // set the final list of crusaders + for (uint8 i = 0; i < vCrusaderHealers.size(); ++i) + m_vCrusadersEntries.push_back(vCrusaderHealers[i]); + for (uint8 i = 0; i < vCrusaderOthers.size(); ++i) + m_vCrusadersEntries.push_back(vCrusaderOthers[i]); +} + void instance_trial_of_the_crusader::JustDidDialogueStep(int32 iEntry) { switch (iEntry) @@ -454,7 +501,7 @@ void instance_trial_of_the_crusader::JustDidDialogueStep(int32 iEntry) case SAY_VARIAN_BEAST_1: if (Player* pPlayer = GetPlayerInMap()) { - if (Creature* pBeasts = pPlayer->SummonCreature(NPC_BEAST_COMBAT_STALKER, aSpawnPositions[0][0], aSpawnPositions[0][1], aSpawnPositions[0][2], aSpawnPositions[0][3], TEMPSUMMON_DEAD_DESPAWN, 0)) + if (Creature* pBeasts = pPlayer->SummonCreature(NPC_BEASTS_COMBAT_STALKER, aSpawnPositions[0][0], aSpawnPositions[0][1], aSpawnPositions[0][2], aSpawnPositions[0][3], TEMPSUMMON_DEAD_DESPAWN, 0)) { Creature* pGormok = pBeasts->SummonCreature(NPC_GORMOK, aSpawnPositions[1][0], aSpawnPositions[1][1], aSpawnPositions[1][2], aSpawnPositions[1][3], TEMPSUMMON_DEAD_DESPAWN, 0); if (!pGormok) @@ -504,6 +551,65 @@ void instance_trial_of_the_crusader::JustDidDialogueStep(int32 iEntry) if (Creature* pJaraxxus = GetSingleCreatureFromStorage(NPC_JARAXXUS)) pJaraxxus->SetInCombatWithZone(); break; + case SAY_TIRION_PVP_INTRO_1: + if (Player* pPlayer = GetPlayerInMap()) + { + // safety check + uint8 uiMaxCrusaders = Is25ManDifficulty() ? MAX_CRUSADERS_25MAN : MAX_CRUSADERS_10MAN; + if (m_vCrusadersEntries.empty() || m_vCrusadersEntries.size() < uiMaxCrusaders) + { + script_error_log("Instance Trial of The Crusader: ERROR Crusaders entries are not properly selected. Please report this to the dev team!"); + return; + } + + // summon the crusaders + m_vCrusadersGuidsVector.clear(); + float fX, fY, fZ, fO; + for (uint8 i = 0; i < uiMaxCrusaders; ++i) + { + fX = m_uiTeam == ALLIANCE ? aHordeCrusadersLoc[i].fSourceX : aAllyCrusadersLoc[i].fSourceX; + fY = m_uiTeam == ALLIANCE ? aHordeCrusadersLoc[i].fSourceY : aAllyCrusadersLoc[i].fSourceY; + fZ = m_uiTeam == ALLIANCE ? aHordeCrusadersLoc[i].fSourceZ : aAllyCrusadersLoc[i].fSourceZ; + fO = m_uiTeam == ALLIANCE ? aHordeCrusadersLoc[i].fSourceO : aAllyCrusadersLoc[i].fSourceO; + + if (Creature* pCrusader = pPlayer->SummonCreature(m_vCrusadersEntries[i], fX, fY, fZ, fO, TEMPSUMMON_DEAD_DESPAWN, 0)) + m_vCrusadersGuidsVector.push_back(pCrusader->GetObjectGuid()); + } + } + break; + case SAY_GARROSH_PVP_A_INTRO_2: + { + // make the champions jump + uint8 uiMaxCrusaders = Is25ManDifficulty() ? MAX_CRUSADERS_25MAN : MAX_CRUSADERS_10MAN; + + float fX, fY, fZ; + for (uint8 i = 0; i < uiMaxCrusaders; ++i) + { + fX = m_uiTeam == ALLIANCE ? aHordeCrusadersLoc[i].fTargetX : aAllyCrusadersLoc[i].fTargetX; + fY = m_uiTeam == ALLIANCE ? aHordeCrusadersLoc[i].fTargetY : aAllyCrusadersLoc[i].fTargetY; + fZ = m_uiTeam == ALLIANCE ? aHordeCrusadersLoc[i].fTargetZ : aAllyCrusadersLoc[i].fTargetZ; + + // ToDo: use spell 67382 when proper implemented in the core + if (Creature* pCrusader = instance->GetCreature(m_vCrusadersGuidsVector[i])) + pCrusader->GetMotionMaster()->MoveJump(fX, fY, fZ, pCrusader->GetDistance2d(fX, fY) * 10.0f / 15.0f, 15.0f); + } + break; + } + case EVENT_CHAMPIONS_ATTACK: + { + // start champions combat + uint8 uiMaxCrusaders = Is25ManDifficulty() ? MAX_CRUSADERS_25MAN : MAX_CRUSADERS_10MAN; + for (uint8 i = 0; i < uiMaxCrusaders; ++i) + { + if (Creature* pCrusader = instance->GetCreature(m_vCrusadersGuidsVector[i])) + { + pCrusader->CastSpell(pCrusader, SPELL_ANCHOR_HERE, true); + pCrusader->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE); + pCrusader->SetInCombatWithZone(); + } + } + break; + } case EVENT_SUMMON_TWINS: if (Player* pPlayer = GetPlayerInMap()) { diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h index 07594ec2b..e532abce3 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h @@ -9,6 +9,10 @@ enum { MAX_ENCOUNTER = 6, MAX_WIPES_ALLOWED = 50, + MAX_CRUSADERS_10MAN = 6, + MAX_CRUSADERS_25MAN = 10, + MAX_CRUSADERS_HEALERS = 4, + MAX_CRUSADERS_OTHER = 6, TYPE_WIPE_COUNT = 0, TYPE_NORTHREND_BEASTS = 1, @@ -26,8 +30,13 @@ enum EVENT_SUMMON_THE_LICHKING = 12, EVENT_DESTROY_FLOOR = 13, EVENT_JARAXXUS_RESET_DELAY = 14, + EVENT_CHAMPIONS_ATTACK = 15, + + NPC_BEASTS_COMBAT_STALKER = 36549, + NPC_BEASTS_CONTROLLER = 35014, + NPC_CHAMPIONS_CONTROLLER = 34781, + NPC_VALKYR_TWINS_CONTROLLER = 34743, - NPC_BEAST_COMBAT_STALKER = 36549, NPC_GORMOK = 34796, NPC_ACIDMAW = 35144, NPC_DREADSCALE = 34799, @@ -38,6 +47,41 @@ enum NPC_ANUBARAK = 34564, NPC_SNOBOLD_VASSAL = 34800, // used in Gormok encounter + // NPC_JUMP_TARGET = 35376, // used to mark the jump spot for the crusaders; currently not used + + // NPC_BEASTS_TAPLIST = 35820, + // NPC_CHAMPION_TAPLIST = 35821, + // NPC_ANUBARAK_TAPLIST = 36099, + + NPC_ALLY_DEATH_KNIGHT = 34461, // Tyrius Duskblade + NPC_ALLY_DRUID_BALANCE = 34460, // Kavina Grovesong + NPC_ALLY_DRUID_RESTO = 34469, // Melador Valestrider + NPC_ALLY_HUNTER = 34467, // Alyssia Moonstalker + NPC_ALLY_MAGE = 34468, // Noozle Whizzlestick + NPC_ALLY_PALADIN_HOLY = 34465, // Velanaa + NPC_ALLY_PALADIN_RETRI = 34471, // Baelnor Lightbearer + NPC_ALLY_PRIEST_DISC = 34466, // Anthar Forgemender + NPC_ALLY_PRIEST_SHADOW = 34473, // Brienna Nightfell + NPC_ALLY_ROGUE = 34472, // Irieth Shadowstep + NPC_ALLY_SHAMAN_ENHA = 34463, // Shaabad + NPC_ALLY_SHAMAN_RESTO = 34470, // Saamul + NPC_ALLY_WARLOCK = 34474, // Serissa Grimdabbler + NPC_ALLY_WARRIOR = 34475, // Shocuul + + NPC_HORDE_DEATH_KNIGHT = 34458, // Gorgrim Shadowcleave + NPC_HORDE_DRUID_BALANCE = 34451, // Birana Stormhoof + NPC_HORDE_DRUID_RESTO = 34459, // Erin Misthoof + NPC_HORDE_HUNTER = 34448, // Ruj'kah + NPC_HORDE_MAGE = 34449, // Ginselle Blightslinger + NPC_HORDE_PALADIN_HOLY = 34445, // Liandra Suncaller + NPC_HORDE_PALADIN_RETRI = 34456, // Malithas Brightblade + NPC_HORDE_PRIEST_DISC = 34447, // Caiphus the Stern + NPC_HORDE_PRIEST_SHADOW = 34441, // Vivienne Blackwhisper + NPC_HORDE_ROGUE = 34454, // Maz'dinah + NPC_HORDE_SHAMAN_ENHA = 34455, // Broln Stouthorn + NPC_HORDE_SHAMAN_RESTO = 34444, // Thrakgar + NPC_HORDE_WARLOCK = 34450, // Harkzog + NPC_HORDE_WARRIOR = 34453, // Narrhok Steelbreaker NPC_TIRION_A = 34996, NPC_TIRION_B = 36095, // Summoned after his text (Champions, you're alive! Not only have you defeated every challenge of the Trial of the Crusader, but also thwarted Arthas' plans! Your skill and cunning will prove to be a powerful weapon against the Scourge. Well done! Allow one of the Crusade's mages to transport you to the surface!) is said.. @@ -86,6 +130,8 @@ enum SPELL_OPEN_PORTAL = 67864, SPELL_FEL_LIGHTNING_KILL = 67888, SPELL_WILFRED_PORTAL = 68424, + // SPELL_LEAP = 67382, // crusader jump inside the arena to the provided coords + SPELL_ANCHOR_HERE = 45313, // change respawn coords to the current position SPELL_ARTHAS_PORTAL = 51807, SPELL_FROSTNOVA = 68198, SPELL_CORPSE_TELEPORT = 69016, // NYI @@ -98,6 +144,47 @@ enum WORLD_STATE_WIPES_COUNT = 4389, }; +static const uint32 aAllyHealerCrusaders[MAX_CRUSADERS_HEALERS] = { NPC_ALLY_DRUID_RESTO, NPC_ALLY_PALADIN_HOLY, NPC_ALLY_PRIEST_DISC, NPC_ALLY_SHAMAN_RESTO }; +static const uint32 aAllyReplacementCrusaders[MAX_CRUSADERS_HEALERS] = { NPC_ALLY_DRUID_BALANCE, NPC_ALLY_PALADIN_RETRI, NPC_ALLY_PRIEST_SHADOW, NPC_ALLY_SHAMAN_ENHA }; +static const uint32 aAllyOtherCrusaders[MAX_CRUSADERS_OTHER] = { NPC_ALLY_DEATH_KNIGHT, NPC_ALLY_HUNTER, NPC_ALLY_MAGE, NPC_ALLY_ROGUE, NPC_ALLY_WARLOCK, NPC_ALLY_WARRIOR }; + +static const uint32 aHordeHealerCrusaders[MAX_CRUSADERS_HEALERS] = { NPC_HORDE_DRUID_RESTO, NPC_HORDE_PALADIN_HOLY, NPC_HORDE_PRIEST_DISC, NPC_HORDE_SHAMAN_RESTO }; +static const uint32 aHordeReplacementCrusaders[MAX_CRUSADERS_HEALERS] = { NPC_HORDE_DRUID_BALANCE, NPC_HORDE_PALADIN_RETRI, NPC_HORDE_PRIEST_SHADOW, NPC_HORDE_SHAMAN_ENHA }; +static const uint32 aHordeOtherCrusaders[MAX_CRUSADERS_OTHER] = { NPC_HORDE_DEATH_KNIGHT, NPC_HORDE_HUNTER, NPC_HORDE_MAGE, NPC_HORDE_ROGUE, NPC_HORDE_WARLOCK, NPC_HORDE_WARRIOR }; + +struct CrusadersLocation +{ + float fSourceX, fSourceY, fSourceZ, fSourceO, fTargetX, fTargetY, fTargetZ; +}; + +static const CrusadersLocation aAllyCrusadersLoc[MAX_CRUSADERS_25MAN] = +{ + {615.649f, 108.371f, 418.317f, 2.617f, 597.998f, 130.116f, 394.729f}, + {622.361f, 111.691f, 419.785f, 2.705f, 596.189f, 123.862f, 394.710f}, + {619.104f, 101.331f, 421.621f, 2.548f, 594.369f, 118.033f, 394.677f}, + {618.138f, 105.381f, 419.786f, 2.600f, 605.423f, 128.229f, 395.288f}, + {622.956f, 107.000f, 421.619f, 2.652f, 603.840f, 122.100f, 394.832f}, + {621.258f, 117.725f, 418.317f, 2.972f, 601.717f, 115.576f, 395.287f}, + {628.161f, 117.369f, 421.607f, 2.809f, 599.921f, 135.934f, 394.742f}, + {629.005f, 124.168f, 421.627f, 2.914f, 592.413f, 112.477f, 394.684f}, + {622.175f, 123.810f, 418.315f, 2.879f, 607.020f, 134.541f, 394.836f}, + {615.322f, 95.750f, 421.623f, 2.460f, 599.461f, 109.588f, 395.288f}, +}; + +static const CrusadersLocation aHordeCrusadersLoc[MAX_CRUSADERS_25MAN] = +{ + {510.069f, 111.784f, 418.317f, 0.488f, 528.958f, 131.470f, 394.729f}, + {510.208f, 103.791f, 419.787f, 0.593f, 531.399f, 125.630f, 394.708f}, + {505.691f, 124.593f, 418.315f, 0.279f, 533.647f, 119.147f, 394.646f}, + {501.770f, 121.961f, 419.778f, 0.296f, 521.901f, 128.487f, 394.832f}, + {508.244f, 98.039f, 421.546f, 0.645f, 524.237f, 122.411f, 394.819f}, + {497.338f, 124.774f, 421.595f, 0.244f, 526.309f, 116.666f, 394.833f}, + {500.499f, 113.415f, 421.552f, 0.304f, 529.479f, 112.130f, 394.742f}, // the last 4 are guesswork, but they are pretty close + {504.869f, 112.231f, 419.710f, 0.426f, 536.588f, 114.176f, 394.533f}, + {515.173f, 102.482f, 418.234f, 0.670f, 520.921f, 134.698f, 394.747f}, + {513.624f, 98.620f, 419.703f, 0.642f, 527.289f, 136.818f, 394.654f}, +}; + static const float aRamsayPositions[2][4] = { {559.1528f, 90.55729f, 395.2734f, 5.078908f}, // Summon Position @@ -150,6 +237,8 @@ class instance_trial_of_the_crusader : public ScriptedInstance, private Dialogue bool IsHeroicDifficulty() { return instance->GetDifficulty() == RAID_DIFFICULTY_10MAN_HEROIC || instance->GetDifficulty() == RAID_DIFFICULTY_25MAN_HEROIC; } bool Is25ManDifficulty() { return instance->GetDifficulty() == RAID_DIFFICULTY_25MAN_NORMAL || instance->GetDifficulty() == RAID_DIFFICULTY_25MAN_HEROIC; } + uint32 GetPlayerTeam() { return m_uiTeam; } + const char* Save() const override { return m_strInstData.c_str(); } void Load(const char* chrIn) override; @@ -161,10 +250,15 @@ class instance_trial_of_the_crusader : public ScriptedInstance, private Dialogue void DoSummonRamsey(uint32 uiEntry); void JustDidDialogueStep(int32 iEntry) override; void DoHandleEventEpilogue(); + void DoSelectCrusaders(); uint32 m_auiEncounter[MAX_ENCOUNTER]; std::string m_strInstData; + std::vector m_vCrusadersEntries; + + GuidVector m_vCrusadersGuidsVector; + Team m_uiTeam; uint32 m_uiGateResetTimer; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 9aa30230f..500eea6e9 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3115" + #define SD2_REVISION_NR "3116" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 155cb3c21..efac3657a 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -513,6 +513,20 @@ UPDATE creature_template SET ScriptName='boss_eydis' WHERE entry=34496; UPDATE creature_template SET ScriptName='npc_anubarak_spike' WHERE entry=34660; UPDATE creature_template SET ScriptName='npc_frost_sphere' WHERE entry=34606; UPDATE creature_template SET ScriptName='npc_nerubian_borrow' WHERE entry=34862; +UPDATE creature_template SET ScriptName='boss_crusader_death_knight' WHERE entry IN (34461,34458); +UPDATE creature_template SET ScriptName='boss_crusader_druid_balance' WHERE entry IN (34460,34451); +UPDATE creature_template SET ScriptName='boss_crusader_druid_resto' WHERE entry IN (34469,34459); +UPDATE creature_template SET ScriptName='boss_crusader_hunter' WHERE entry IN (34467,34448); +UPDATE creature_template SET ScriptName='boss_crusader_mage' WHERE entry IN (34468,34449); +UPDATE creature_template SET ScriptName='boss_crusader_paladin_holy' WHERE entry IN (34465,34445); +UPDATE creature_template SET ScriptName='boss_crusader_paladin_retri' WHERE entry IN (34471,34456); +UPDATE creature_template SET ScriptName='boss_crusader_priest_disc' WHERE entry IN (34466,34447); +UPDATE creature_template SET ScriptName='boss_crusader_priest_shadow' WHERE entry IN (34473,34441); +UPDATE creature_template SET ScriptName='boss_crusader_rogue' WHERE entry IN (34472,34454); +UPDATE creature_template SET ScriptName='boss_crusader_shaman_enha' WHERE entry IN (34463,34455); +UPDATE creature_template SET ScriptName='boss_crusader_shaman_resto' WHERE entry IN (34470,34444); +UPDATE creature_template SET ScriptName='boss_crusader_warlock' WHERE entry IN (34474,34450); +UPDATE creature_template SET ScriptName='boss_crusader_warrior' WHERE entry IN (34475,34453); /* DALARAN */ UPDATE creature_template SET ScriptName='npc_dalaran_guardian_mage' WHERE entry IN (29255, 29254); diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 033b2add3..a54458338 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -4637,8 +4637,8 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1649001,'Welcome to the trials of the crusader. Only the most powerful combatants of azeroth are allowed to undergo these trials. You are among the worthy few.',16053,1,0,0,'tirion SAY_RAID_TRIALS_INTRO'), (-1649002,'Hailing from the deepest, darkest carverns of the storm peaks, Gormok the Impaler! Battle on, heroes!',16038,1,0,0,'tirion SAY_TIRION_BEAST_1'), -(-1649003,'Your beast will be no match for my champions Tirion.',16069,1,0,0,'varian SAY_VARIAN_BEAST_1'), -(-1649004,'I have seen more worthy challenges in the ring of blood, you waste our time paladin.',16026,1,0,0,'garrosh SAY_GARROSH_BEAST_1'), +(-1649003,'Your beast will be no match for my champions Tirion.',16069,1,0,1,'varian SAY_VARIAN_BEAST_1'), +(-1649004,'I have seen more worthy challenges in the ring of blood, you waste our time paladin.',16026,1,0,1,'garrosh SAY_GARROSH_BEAST_1'), (-1649005,'Steel yourselves, heroes, for the twin terrors Acidmaw and Dreadscale. Enter the arena!',16039,1,0,0,'tirion SAY_TIRION_BEAST_2'), (-1649006,'The air freezes with the introduction of our next combatant, Icehowl! Kill or be killed, champions!',16040,1,0,0,'tirion SAY_TIRION_BEAST_3'), (-1649007,'The monstrous menagerie has been vanquished!',16041,1,0,0,'tirion SAY_TIRION_BEAST_SLAY'), @@ -4647,33 +4647,33 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1649009,'Grand Warlock Wilfred Fizzlebang will summon forth your next challenge. Stand by for his entry!',16043,1,0,0,'tirion SAY_TIRION_JARAXXUS_INTRO_1'), (-1649010,'Thank you, Highlord. Now, challengers, I will begin the ritual of summoning. When I am done a fearsome doomguard will appear!',16268,1,0,2,'wilfred SAY_WILFRED_JARAXXUS_INTRO_1'), (-1649011,'Prepare for oblivion!',16269,1,0,0,'wilfred SAY_WILFRED_JARAXXUS_INTRO_2'), -(-1649012,'Ah ha! Behold the absolute power of Wilfred Fizzlebang, master summoner! You are bound to ME, demon!',16270,1,0,0,'wilfred SAY_WILFRED_JARAXXUS_INTRO_3'), -(-1649013,'Trifling gnome, your arrogance will be your undoing!',16143,1,0,0,'jaraxxus SAY_JARAXXUS_JARAXXAS_INTRO_1'), -(-1649014,'But I\'m in charge her-',16271,1,0,0,'wilfred SAY_WILFRED_DEATH'), -(-1649015,'Quickly, heroes! Destroy the demon lord before it can open a portal to its twisted demonic realm!',16044,1,0,0,'tirion SAY_TIRION_JARAXXUS_INTRO_2'), +(-1649012,'Ah ha! Behold the absolute power of Wilfred Fizzlebang, master summoner! You are bound to ME, demon!',16270,1,0,5,'wilfred SAY_WILFRED_JARAXXUS_INTRO_3'), +(-1649013,'Trifling gnome, your arrogance will be your undoing!',16143,1,0,397,'jaraxxus SAY_JARAXXUS_JARAXXAS_INTRO_1'), +(-1649014,'But I\'m in charge her-',16271,1,0,5,'wilfred SAY_WILFRED_DEATH'), +(-1649015,'Quickly, heroes! Destroy the demon lord before it can open a portal to its twisted demonic realm!',16044,1,0,5,'tirion SAY_TIRION_JARAXXUS_INTRO_2'), (-1649016,'The loss of Wilfred Fizzlebang, while unfortunate, should be a lesson to those that dare dabble in dark magic. Alas, you are victorious and must now face the next challenge.',16045,1,0,0,'tirion SAY_TIRION_JARAXXUS_EXIT_1'), -(-1649017,'Treacherous Alliance dogs! You summon a demon lord against warriors of the Horde!? Your deaths will be swift!',16021,1,0,0,'garrosh SAY_GARROSH_JARAXXUS_EXIT_1'), -(-1649018,'The Alliance doesn\'t need the help of a demon lord to deal with Horde filth. Come, pig!',16064,1,0,0,'varian SAY_VARIAN_JARAXXUS_SLAY'), -(-1649019,'Everyone, calm down! Compose yourselves! There is no conspiracy at play here. The warlock acted on his own volition - outside of influences from the Alliance. The tournament must go on!',16046,1,0,0,'tirion SAY_TIRION_JARAXXUS_EXIT_2'), +(-1649017,'Treacherous Alliance dogs! You summon a demon lord against warriors of the Horde!? Your deaths will be swift!',16021,1,0,5,'garrosh SAY_GARROSH_JARAXXUS_EXIT_1'), +(-1649018,'The Alliance doesn\'t need the help of a demon lord to deal with Horde filth. Come, pig!',16064,1,0,5,'varian SAY_VARIAN_JARAXXUS_SLAY'), +(-1649019,'Everyone, calm down! Compose yourselves! There is no conspiracy at play here. The warlock acted on his own volition - outside of influences from the Alliance. The tournament must go on!',16046,1,0,5,'tirion SAY_TIRION_JARAXXUS_EXIT_2'), (-1649020,'The next battle will be against the Argent Crusade\'s most powerful knights! Only by defeating them will you be deemed worthy...',16047,1,0,0,'tirion SAY_TIRION_PVP_INTRO_1'), -(-1649021,'The Horde demands justice! We challenge the Alliance. Allow us to battle in place of your knights, paladin. We will show these dogs what it means to insult the Horde!',16023,1,0,0,'garrosh SAY_GARROSH_PVP_A_INTRO_1'), -(-1649022,'Our honor has been besmirched! They make wild claims and false accusations against us. I demand justice! Allow my champions to fight in place of your knights, Tirion. We challenge the Horde!',16066,1,0,0,'varian SAY_VARIAN_PVP_H_INTRO_1'), -(-1649023,'Very well, I will allow it. Fight with honor!',16048,1,0,0,'tirion SAY_TIRION_PVP_INTRO_2'), -(-1649024,'Fight for the glory of the Alliance, heroes! Honor your king and your people!',16065,1,0,0,'varian SAY_VARIAN_PVP_H_INTRO_2'), -(-1649025,'Show them no mercy, Horde champions! LOK\'TAR OGAR!',16022,1,0,0,'garrosh SAY_GARROSH_PVP_A_INTRO_2'), -(-1649026,'GLORY TO THE ALLIANCE!',16067,1,0,0,'varian SAY_VARIAN_PVP_A_WIN'), -(-1649027,'That was just a taste of what the future brings. FOR THE HORDE!',16024,1,0,0,'garrosh SAY_GARROSH_PVP_H_WIN'), +(-1649021,'The Horde demands justice! We challenge the Alliance. Allow us to battle in place of your knights, paladin. We will show these dogs what it means to insult the Horde!',16023,1,0,5,'garrosh SAY_GARROSH_PVP_A_INTRO_1'), +(-1649022,'Our honor has been besmirched! They make wild claims and false accusations against us. I demand justice! Allow my champions to fight in place of your knights, Tirion. We challenge the Horde!',16066,1,0,5,'varian SAY_VARIAN_PVP_H_INTRO_1'), +(-1649023,'Very well, I will allow it. Fight with honor!',16048,1,0,1,'tirion SAY_TIRION_PVP_INTRO_2'), +(-1649024,'Fight for the glory of the Alliance, heroes! Honor your king and your people!',16065,1,0,5,'varian SAY_VARIAN_PVP_H_INTRO_2'), +(-1649025,'Show them no mercy, Horde champions! LOK\'TAR OGAR!',16022,1,0,1,'garrosh SAY_GARROSH_PVP_A_INTRO_2'), +(-1649026,'GLORY TO THE ALLIANCE!',16067,1,0,5,'varian SAY_VARIAN_PVP_A_WIN'), +(-1649027,'That was just a taste of what the future brings. FOR THE HORDE!',16024,1,0,1,'garrosh SAY_GARROSH_PVP_H_WIN'), (-1649028,'A shallow and tragic victory. We are weaker as a whole from the losses suffered today. Who but the Lich King could benefit from such foolishness? Great warriors have lost their lives. And for what? The true threat looms ahead - the Lich King awaits us all in death.',16049,1,0,0,'tirion SAY_TIRION_PVP_WIN'), (-1649029,'Only by working together will you overcome the final challenge. From the depths of Icecrown come two of the Scourge\'s most powerful lieutenants: fearsome val\'kyr, winged harbingers of the Lich King!',16050,1,0,0,'tirion SAY_TIRION_TWINS_INTRO'), (-1649030,'Let the games begin!',16037,1,0,0,'tirion SAY_RAID_INTRO_SHORT'), -(-1649031,'Not even the lich king\'s most powerful minions could stand against the alliance. All hail our victors.',16068,1,0,0,'varian SAY_VARIAN_TWINS_A_WIN'), +(-1649031,'Not even the lich king\'s most powerful minions could stand against the alliance. All hail our victors.',16068,1,0,1,'varian SAY_VARIAN_TWINS_A_WIN'), (-1649032,'Do you still question the might of the Horde, paladin? We will take on all comers!',16025,1,0,0,'garrosh SAY_GARROSH_TWINS_H_WIN'), -(-1649033,'A mighty blow has been dealt to the Lich King! You have proven yourselves able bodied champions of the Argent Crusade. Together we will strike at Icecrown Citadel and destroy what remains of the Scourge! There is no challenge that we cannot face united!',16051,1,0,0,'tirion SAY_TIRION_TWINS_WIN'), +(-1649033,'A mighty blow has been dealt to the Lich King! You have proven yourselves able bodied champions of the Argent Crusade. Together we will strike at Icecrown Citadel and destroy what remains of the Scourge! There is no challenge that we cannot face united!',16051,1,0,5,'tirion SAY_TIRION_TWINS_WIN'), (-1649034,'You will have your challenge, Fordring.',16321,1,0,0,'lich_king SAY_LKING_ANUB_INTRO_1'), -(-1649035,'Arthas! You are hopelessly outnumbered! Lay down Frostmourne and I will grant you a just death.',16052,1,0,0,'tirion SAY_TIRION_ABUN_INTRO_1'), +(-1649035,'Arthas! You are hopelessly outnumbered! Lay down Frostmourne and I will grant you a just death.',16052,1,0,25,'tirion SAY_TIRION_ABUN_INTRO_1'), (-1649036,'The Nerubians built an empire beneath the frozen wastes of Northrend. An empire that you so foolishly built your structures upon. MY EMPIRE.',16322,1,0,11,'lich_king SAY_LKING_ANUB_INTRO_2'), (-1649037,'The souls of your fallen champions will be mine, Fordring.',16323,1,0,0,'lich_king SAY_LKING_ANUB_INTRO_3'), (-1649038,'Ahhh, our guests have arrived, just as the master promised.',16235,1,0,0,'anubarak SAY_ANUB_ANUB_INTRO_1'), @@ -4690,13 +4690,13 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1649047,'Inferno!',16151,1,0,0,'jaraxxus SAY_INFERNO'), (-1649048,'Weakling!',16017,1,0,0,'garrosh SAY_GARROSH_PVP_A_SLAY_1'), -(-1649049,'Pathetic!',16018,1,0,0,'garrosh SAY_GARROSH_PVP_A_SLAY_2'), -(-1649050,'Overpowered.',16019,1,0,0,'garrosh SAY_GARROSH_PVP_A_SLAY_3'), -(-1649051,'Lok\'tar!',16020,1,0,0,'garrosh SAY_GARROSH_PVP_A_SLAY_4'), -(-1649052,'Hah!',16060,1,0,0,'varian SAY_VARIAN_PVP_H_SLAY_1'), -(-1649053,'Hardly a challenge!',16061,1,0,0,'varian SAY_VARIAN_PVP_H_SLAY_2'), -(-1649054,'Worthless scrub.',16062,1,0,0,'varian SAY_VARIAN_PVP_H_SLAY_3'), -(-1649055,'Is this the best the Horde has to offer?',16063,1,0,0,'varian SAY_VARIAN_PVP_H_SLAY_4'), +(-1649049,'Pathetic!',16018,1,0,274,'garrosh SAY_GARROSH_PVP_A_SLAY_2'), +(-1649050,'Overpowered.',16019,1,0,25,'garrosh SAY_GARROSH_PVP_A_SLAY_3'), +(-1649051,'Lok\'tar!',16020,1,0,5,'garrosh SAY_GARROSH_PVP_A_SLAY_4'), +(-1649052,'Hah!',16060,1,0,5,'varian SAY_VARIAN_PVP_H_SLAY_1'), +(-1649053,'Hardly a challenge!',16061,1,0,274,'varian SAY_VARIAN_PVP_H_SLAY_2'), +(-1649054,'Worthless scrub.',16062,1,0,25,'varian SAY_VARIAN_PVP_H_SLAY_3'), +(-1649055,'Is this the best the Horde has to offer?',16063,1,0,6,'varian SAY_VARIAN_PVP_H_SLAY_4'), (-1649056,'In the name of our dark master. For the Lich King. You. Will. Die.',16272,1,0,0,'twin_valkyr SAY_AGGRO'), (-1649057,'You are finished!',16273,1,0,0,'twin_valkyr SAY_BERSERK'), diff --git a/sql/updates/r3116_mangos.sql b/sql/updates/r3116_mangos.sql new file mode 100644 index 000000000..810a3e058 --- /dev/null +++ b/sql/updates/r3116_mangos.sql @@ -0,0 +1,14 @@ +UPDATE creature_template SET ScriptName='boss_crusader_death_knight' WHERE entry IN (34461,34458); +UPDATE creature_template SET ScriptName='boss_crusader_druid_balance' WHERE entry IN (34460,34451); +UPDATE creature_template SET ScriptName='boss_crusader_druid_resto' WHERE entry IN (34469,34459); +UPDATE creature_template SET ScriptName='boss_crusader_hunter' WHERE entry IN (34467,34448); +UPDATE creature_template SET ScriptName='boss_crusader_mage' WHERE entry IN (34468,34449); +UPDATE creature_template SET ScriptName='boss_crusader_paladin_holy' WHERE entry IN (34465,34445); +UPDATE creature_template SET ScriptName='boss_crusader_paladin_retri' WHERE entry IN (34471,34456); +UPDATE creature_template SET ScriptName='boss_crusader_priest_disc' WHERE entry IN (34466,34447); +UPDATE creature_template SET ScriptName='boss_crusader_priest_shadow' WHERE entry IN (34473,34441); +UPDATE creature_template SET ScriptName='boss_crusader_rogue' WHERE entry IN (34472,34454); +UPDATE creature_template SET ScriptName='boss_crusader_shaman_enha' WHERE entry IN (34463,34455); +UPDATE creature_template SET ScriptName='boss_crusader_shaman_resto' WHERE entry IN (34470,34444); +UPDATE creature_template SET ScriptName='boss_crusader_warlock' WHERE entry IN (34474,34450); +UPDATE creature_template SET ScriptName='boss_crusader_warrior' WHERE entry IN (34475,34453); diff --git a/sql/updates/r3116_scriptdev2.sql b/sql/updates/r3116_scriptdev2.sql new file mode 100644 index 000000000..b983d77e7 --- /dev/null +++ b/sql/updates/r3116_scriptdev2.sql @@ -0,0 +1,6 @@ +UPDATE script_texts SET emote=5 WHERE entry IN (-1649012,-1649014,-1649017,-1649021,-1649051,-1649015,-1649019,-1649033,-1649018,-1649026,-1649022,-1649024,-1649052); +UPDATE script_texts SET emote=1 WHERE entry IN (-1649025,-1649023,-1649003,-1649031,-1649004,-1649027); +UPDATE script_texts SET emote=274 WHERE entry IN (-1649049,-1649053); +UPDATE script_texts SET emote=6 WHERE entry IN (-1649055); +UPDATE script_texts SET emote=25 WHERE entry IN (-1649050,-1649035,-1649054); +UPDATE script_texts SET emote=397 WHERE entry IN (-1649013); From 5e094686525d05564af2b2114ba0dfd2042f61b6 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Tue, 10 Mar 2015 00:28:39 +0100 Subject: [PATCH 1130/1172] [3117] Add completion and reset parts for Faction Champions - ToC25 Also * Add missing gossips, thanks to @Laizerox * Fix combat behaviors, thanks to @Ulduar and @evil@wow --- .../boss_faction_champions.cpp | 17 +++- .../boss_northrend_beasts.cpp | 5 +- .../instance_trial_of_the_crusader.cpp | 88 ++++++++++++++++++- .../trial_of_the_crusader.cpp | 4 +- .../trial_of_the_crusader.h | 11 +++ sd2_revision_nr.h | 2 +- sql/scriptdev2_script_full.sql | 4 +- sql/updates/r3117_scriptdev2.sql | 4 + 8 files changed, 123 insertions(+), 12 deletions(-) create mode 100644 sql/updates/r3117_scriptdev2.sql diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_faction_champions.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_faction_champions.cpp index 9c8d164ad..e9abe9e8d 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_faction_champions.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_faction_champions.cpp @@ -37,7 +37,6 @@ enum SAY_VARIAN_PVP_H_SLAY_4 = -1649055, SPELL_PVP_TRINKET = 65547, - SPELL_ENCOUNTER_KILL_CREDIT = 68184, }; /*###### @@ -205,7 +204,7 @@ CreatureAI* GetAI_boss_crusader_druid_resto(Creature* pCreature) enum { // hunter spells - SPELL_CALL_PET = 67777, + SPELL_CALL_PET = 67777, }; /*###### @@ -221,6 +220,12 @@ struct boss_crusader_hunterAI : public trial_crusader_commonAI trial_crusader_commonAI::Reset(); } + void ReceiveAIEvent(AIEventType eventType, Creature* /*pSender*/, Unit* /*pInvoker*/, uint32 /*uiMiscValue*/) override + { + if (eventType == AI_EVENT_CUSTOM_A) + DoCastSpellIfCan(m_creature, SPELL_CALL_PET); + } + bool UpdateChampionAI(const uint32 uiDiff) { } @@ -458,7 +463,7 @@ CreatureAI* GetAI_boss_crusader_shaman_resto(Creature* pCreature) enum { // warlock spells - SPELL_SUMMON_FELHUNTER = 67514, + SPELL_SUMMON_FELHUNTER = 67514, }; /*###### @@ -474,6 +479,12 @@ struct boss_crusader_warlockAI : public trial_crusader_commonAI trial_crusader_commonAI::Reset(); } + void ReceiveAIEvent(AIEventType eventType, Creature* /*pSender*/, Unit* /*pInvoker*/, uint32 /*uiMiscValue*/) override + { + if (eventType == AI_EVENT_CUSTOM_A) + DoCastSpellIfCan(m_creature, SPELL_SUMMON_FELHUNTER); + } + bool UpdateChampionAI(const uint32 uiDiff) { } diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp index bc6d3d9bc..4bf20839a 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp @@ -218,7 +218,10 @@ struct npc_beast_combat_stalkerAI : public Scripted_NoMovementAI if (Creature* pBeast = m_creature->GetMap()->GetCreature(m_aSummonedBossGuid[m_uiPhase])) { pBeast->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE); - pBeast->SetInCombatWithZone(); + + // first boss doesn't automatically attack + if (pBeast->GetEntry() != NPC_GORMOK) + pBeast->SetInCombatWithZone(); } m_uiAttackDelayTimer = 0; diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp index 8a077e1a5..c6306892a 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp @@ -150,7 +150,9 @@ static const DialogueEntryTwoSide aTocDialogues[] = instance_trial_of_the_crusader::instance_trial_of_the_crusader(Map* pMap) : ScriptedInstance(pMap), DialogueHelper(aTocDialogues), m_uiTeam(TEAM_NONE), - m_uiGateResetTimer(0) + m_uiGateResetTimer(0), + m_uiKilledCrusaders(0), + m_bCrusadersSummoned(false) { Initialize(); } @@ -190,6 +192,9 @@ void instance_trial_of_the_crusader::OnCreatureCreate(Creature* pCreature) case NPC_THE_LICHKING_VISUAL: case NPC_ACIDMAW: case NPC_DREADSCALE: + case NPC_ZHAAGRYM: + case NPC_CAT: + case NPC_CHAMPIONS_CONTROLLER: break; default: return; @@ -299,11 +304,20 @@ void instance_trial_of_the_crusader::SetData(uint32 uiType, uint32 uiData) { SetData(TYPE_WIPE_COUNT, m_auiEncounter[TYPE_WIPE_COUNT] + 1); StartNextDialogueText(NPC_RAMSEY_3); + + // cleanup and reset crusaders + DoCleanupCrusaders(); + m_uiKilledCrusaders = 0; + m_bCrusadersSummoned = false; } else if (uiData == DONE) { DoRespawnGameObject(GO_CRUSADERS_CACHE, 60 * MINUTE); StartNextDialogueText(SAY_VARIAN_PVP_A_WIN); + + // kill credit + if (Creature* pController = GetSingleCreatureFromStorage(NPC_CHAMPIONS_CONTROLLER)) + pController->CastSpell(pController, SPELL_ENCOUNTER_KILL_CREDIT, true); } m_auiEncounter[uiType] = uiData; break; @@ -384,6 +398,47 @@ void instance_trial_of_the_crusader::Load(const char* chrIn) OUT_LOAD_INST_DATA_COMPLETE; } +void instance_trial_of_the_crusader::OnCreatureDeath(Creature* pCreature) +{ + switch (pCreature->GetEntry()) + { + case NPC_ALLY_DEATH_KNIGHT: + case NPC_ALLY_DRUID_BALANCE: + case NPC_ALLY_DRUID_RESTO: + case NPC_ALLY_HUNTER: + case NPC_ALLY_MAGE: + case NPC_ALLY_PALADIN_HOLY: + case NPC_ALLY_PALADIN_RETRI: + case NPC_ALLY_PRIEST_DISC: + case NPC_ALLY_PRIEST_SHADOW: + case NPC_ALLY_ROGUE: + case NPC_ALLY_SHAMAN_ENHA: + case NPC_ALLY_SHAMAN_RESTO: + case NPC_ALLY_WARLOCK: + case NPC_ALLY_WARRIOR: + case NPC_HORDE_DEATH_KNIGHT: + case NPC_HORDE_DRUID_BALANCE: + case NPC_HORDE_DRUID_RESTO: + case NPC_HORDE_HUNTER: + case NPC_HORDE_MAGE: + case NPC_HORDE_PALADIN_HOLY: + case NPC_HORDE_PALADIN_RETRI: + case NPC_HORDE_PRIEST_DISC: + case NPC_HORDE_PRIEST_SHADOW: + case NPC_HORDE_ROGUE: + case NPC_HORDE_SHAMAN_ENHA: + case NPC_HORDE_SHAMAN_RESTO: + case NPC_HORDE_WARLOCK: + case NPC_HORDE_WARRIOR: + ++m_uiKilledCrusaders; + + // all crusaders are killed + if (m_uiKilledCrusaders == (Is25ManDifficulty() ? MAX_CRUSADERS_25MAN : MAX_CRUSADERS_10MAN)) + SetData(TYPE_FACTION_CHAMPIONS, DONE); + break; + } +} + void instance_trial_of_the_crusader::DoSummonRamsey(uint32 uiEntry) { Player* pPlayer = GetPlayerInMap(); @@ -487,6 +542,22 @@ void instance_trial_of_the_crusader::DoSelectCrusaders() m_vCrusadersEntries.push_back(vCrusaderOthers[i]); } +// Function that will cleanup the crusaders +void instance_trial_of_the_crusader::DoCleanupCrusaders() +{ + for (GuidVector::const_iterator itr = m_vCrusadersGuidsVector.begin(); itr != m_vCrusadersGuidsVector.end(); ++itr) + { + if (Creature* pCrusader = instance->GetCreature(*itr)) + pCrusader->ForcedDespawn(); + } + + // despawn pets as well + if (Creature* pPet = GetSingleCreatureFromStorage(NPC_ZHAAGRYM, true)) + pPet->ForcedDespawn(); + if (Creature* pPet = GetSingleCreatureFromStorage(NPC_CAT, true)) + pPet->ForcedDespawn(); +} + void instance_trial_of_the_crusader::JustDidDialogueStep(int32 iEntry) { switch (iEntry) @@ -549,9 +620,14 @@ void instance_trial_of_the_crusader::JustDidDialogueStep(int32 iEntry) break; case EVENT_JARAXXUS_START_ATTACK: if (Creature* pJaraxxus = GetSingleCreatureFromStorage(NPC_JARAXXUS)) - pJaraxxus->SetInCombatWithZone(); + pJaraxxus->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE | UNIT_FLAG_PASSIVE); break; case SAY_TIRION_PVP_INTRO_1: + case TYPE_FACTION_CHAMPIONS: + // skip if already summoned + if (m_bCrusadersSummoned) + break; + if (Player* pPlayer = GetPlayerInMap()) { // safety check @@ -575,6 +651,8 @@ void instance_trial_of_the_crusader::JustDidDialogueStep(int32 iEntry) if (Creature* pCrusader = pPlayer->SummonCreature(m_vCrusadersEntries[i], fX, fY, fZ, fO, TEMPSUMMON_DEAD_DESPAWN, 0)) m_vCrusadersGuidsVector.push_back(pCrusader->GetObjectGuid()); } + + m_bCrusadersSummoned = true; } break; case SAY_GARROSH_PVP_A_INTRO_2: @@ -597,7 +675,7 @@ void instance_trial_of_the_crusader::JustDidDialogueStep(int32 iEntry) } case EVENT_CHAMPIONS_ATTACK: { - // start champions combat + // prepare champions combat uint8 uiMaxCrusaders = Is25ManDifficulty() ? MAX_CRUSADERS_25MAN : MAX_CRUSADERS_10MAN; for (uint8 i = 0; i < uiMaxCrusaders; ++i) { @@ -605,7 +683,9 @@ void instance_trial_of_the_crusader::JustDidDialogueStep(int32 iEntry) { pCrusader->CastSpell(pCrusader, SPELL_ANCHOR_HERE, true); pCrusader->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE); - pCrusader->SetInCombatWithZone(); + + // some crusaders have to summon their pet + pCrusader->AI()->SendAIEvent(AI_EVENT_CUSTOM_A, pCrusader, pCrusader); } } break; diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp index 19ae93ea1..77a84cf25 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp @@ -61,8 +61,8 @@ enum GOSSIP_ITEM_PVP_INIT = -3649005, GOSSIP_ITEM_PVP_START = -3649006, - GOSSIP_ITEM_PVP_WIPE_INIT = -3000000, - GOSSIP_ITEM_PVP_WIPE_START = -3000000, + GOSSIP_ITEM_PVP_WIPE_INIT = -3649012, + GOSSIP_ITEM_PVP_WIPE_START = -3649013, GOSSIP_ITEM_TWINS_INIT = -3649007, GOSSIP_ITEM_TWINS_START = -3649008, diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h index e532abce3..8b4c20768 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h @@ -83,6 +83,9 @@ enum NPC_HORDE_WARLOCK = 34450, // Harkzog NPC_HORDE_WARRIOR = 34453, // Narrhok Steelbreaker + NPC_ZHAAGRYM = 35465, + NPC_CAT = 35610, + NPC_TIRION_A = 34996, NPC_TIRION_B = 36095, // Summoned after his text (Champions, you're alive! Not only have you defeated every challenge of the Trial of the Crusader, but also thwarted Arthas' plans! Your skill and cunning will prove to be a powerful weapon against the Scourge. Well done! Allow one of the Crusade's mages to transport you to the surface!) is said.. NPC_ARGENT_MAGE = 36097, // Summoned along with Tirion B @@ -132,6 +135,7 @@ enum SPELL_WILFRED_PORTAL = 68424, // SPELL_LEAP = 67382, // crusader jump inside the arena to the provided coords SPELL_ANCHOR_HERE = 45313, // change respawn coords to the current position + SPELL_ENCOUNTER_KILL_CREDIT = 68184, // kill credit for faction champions SPELL_ARTHAS_PORTAL = 51807, SPELL_FROSTNOVA = 68198, SPELL_CORPSE_TELEPORT = 69016, // NYI @@ -228,6 +232,8 @@ class instance_trial_of_the_crusader : public ScriptedInstance, private Dialogue void OnCreatureCreate(Creature* pCreature) override; void OnObjectCreate(GameObject* pGo) override; + void OnCreatureDeath(Creature* pCreature) override; + void OnPlayerEnter(Player* pPlayer) override; void SetData(uint32 uiType, uint32 uiData) override; @@ -250,7 +256,9 @@ class instance_trial_of_the_crusader : public ScriptedInstance, private Dialogue void DoSummonRamsey(uint32 uiEntry); void JustDidDialogueStep(int32 iEntry) override; void DoHandleEventEpilogue(); + void DoSelectCrusaders(); + void DoCleanupCrusaders(); uint32 m_auiEncounter[MAX_ENCOUNTER]; std::string m_strInstData; @@ -262,6 +270,9 @@ class instance_trial_of_the_crusader : public ScriptedInstance, private Dialogue Team m_uiTeam; uint32 m_uiGateResetTimer; + uint32 m_uiKilledCrusaders; + + bool m_bCrusadersSummoned; }; #endif diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 500eea6e9..cd8ba712f 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3116" + #define SD2_REVISION_NR "3117" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index a54458338..d91e0ec81 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -5157,7 +5157,9 @@ INSERT INTO gossip_texts (entry,content_default,comment) VALUES (-3649008,'Val\'kyr? We\'re ready for them','barrett GOSSIP_ITEM_TWINS_START'), (-3649009,'Your words of praise are appreciated, Coliseum Master.','barrett GOSSIP_ITEM_ANUB_INIT'), (-3649010,'That is strange...','barrett GOSSIP_ITEM_ANUB_START'), -(-3649011,'We\'re ready for the next challenge.','barrett GOSSIP_ITEM_JARAXXUS_START'); +(-3649011,'We\'re ready for the next challenge.','barrett GOSSIP_ITEM_JARAXXUS_START'), +(-3649012,'You\'ll be even more amazed after we take them out!','barrett GOSSIP_ITEM_PVP_WIPE_INIT'), +(-3649013,'We\'re ready for anything!','barrett GOSSIP_ITEM_PVP_WIPE_START'); -- -3 650 000 TRIAL OF THE CHAMPION INSERT INTO gossip_texts (entry,content_default,comment) VALUES diff --git a/sql/updates/r3117_scriptdev2.sql b/sql/updates/r3117_scriptdev2.sql new file mode 100644 index 000000000..e2554b5b0 --- /dev/null +++ b/sql/updates/r3117_scriptdev2.sql @@ -0,0 +1,4 @@ +DELETE FROM gossip_texts WHERE entry IN (-3649012,-3649013); +INSERT INTO gossip_texts (entry,content_default,comment) VALUES +(-3649012,'You\'ll be even more amazed after we take them out!','barrett GOSSIP_ITEM_PVP_WIPE_INIT'), +(-3649013,'We\'re ready for anything!','barrett GOSSIP_ITEM_PVP_WIPE_START'); From fa6d70d29ffbcd120bbd7ee76b1aaaccaa1b0ce1 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Thu, 12 Mar 2015 22:25:59 +0100 Subject: [PATCH 1131/1172] [3118] Complete spawn event for Twin Valkyrs - ToC25 Also add missing achiev criterias and achiev spells Note: this requires DB support for the Valkyrs movement and additional spawns --- .../boss_anubarak_trial.cpp | 3 ++ .../boss_northrend_beasts.cpp | 3 +- .../boss_twin_valkyr.cpp | 43 ++++++++++++++++--- .../instance_trial_of_the_crusader.cpp | 17 ++++++-- .../trial_of_the_crusader.h | 25 ++++++++++- sd2_revision_nr.h | 2 +- 6 files changed, 82 insertions(+), 11 deletions(-) diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp index 038f283b9..e1804d39c 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp @@ -53,6 +53,9 @@ enum SPELL_LEECHING_SWARM = 66118, SPELL_BERSERK = 26662, + SPELL_SCARAB_ACHIEV_10 = 68186, // used for achiev 3800 + SPELL_SCARAB_ACHIEV_25 = 68515, // used for achiev 3816 + // Pursuing Spikes SPELL_PURSUING_SPIKES_FAIL = 66181, SPELL_PURSUING_SPIKES_DUMMY = 67470, // target selection spell diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp index 4bf20839a..57aaa9e0b 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp @@ -37,6 +37,7 @@ enum SPELL_BERSERK = 26662, SPELL_JORMUNGAR_ENRAGE = 68335, + SPELL_JORMUNGAR_ACHIEV_CREDIT = 68523, // server side spell for achievs 3936, 3937 // NPC_MOBILE_BURROW_TARGET = 35226, // summoned by missing spell 66980 - purpose unk, related to jormungars event // NPC_SESSILE_BURROW_TARGET = 35227, // summoned by missing spell 66981 - purpose unk, related to jormungars event @@ -128,7 +129,7 @@ struct npc_beast_combat_stalkerAI : public Scripted_NoMovementAI m_uiAttackDelayTimer = 10000; if (m_pInstance) - m_pInstance->DoOpenMainGate(); + m_pInstance->DoOpenMainGate(10000); } // Only for Dreadscale and Icehowl diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp index df5ab183a..959700c04 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp @@ -34,6 +34,9 @@ enum SAY_SLAY_2 = -1649061, SAY_TO_BLACK = -1649062, SAY_TO_WHITE = -1649063, + + SPELL_VALKYR_TWINS_HITTING_YA = 66073, + SPELL_TWIN_EMPATHY = 66133, }; /*###### @@ -42,15 +45,42 @@ enum struct boss_fjolaAI : public ScriptedAI { - boss_fjolaAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + boss_fjolaAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } ScriptedInstance* m_pInstance; - void Reset() override {} + void Reset() override + { + DoCastSpellIfCan(m_creature, SPELL_VALKYR_TWINS_HITTING_YA); + } void Aggro(Unit* /*pWho*/) override { - m_creature->SetInCombatWithZone(); + DoScriptText(SAY_AGGRO, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_TWIN_VALKYR, IN_PROGRESS); + } + + void JustDied(Unit* /*pKiller*/) override + { + DoScriptText(SAY_DEATH, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_TWIN_VALKYR, DONE); + } + + void EnterEvadeMode() override + { + if (m_pInstance) + m_pInstance->SetData(TYPE_TWIN_VALKYR, FAIL); + + // cleanup handled by creature linking + m_creature->ForcedDespawn(); } void UpdateAI(const uint32 /*uiDiff*/) override @@ -75,11 +105,14 @@ struct boss_eydisAI : public ScriptedAI { boss_eydisAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} - void Reset() override {} + void Reset() override + { + DoCastSpellIfCan(m_creature, SPELL_VALKYR_TWINS_HITTING_YA); + } void Aggro(Unit* /*pWho*/) override { - m_creature->SetInCombatWithZone(); + DoScriptText(SAY_AGGRO, m_creature); } void UpdateAI(const uint32 /*uiDiff*/) override diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp index c6306892a..b324836ee 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp @@ -131,7 +131,8 @@ static const DialogueEntryTwoSide aTocDialogues[] = {NPC_RAMSEY_4, 0, 0, 0, 0}, // Twin Valkyrs {TYPE_TWIN_VALKYR, 0, 0, 0, 17000}, - {EVENT_SUMMON_TWINS, 0, 0, 0, 0}, + {EVENT_SUMMON_TWINS, 0, 0, 0, 18000}, + {EVENT_TWINS_ATTACK, 0, 0, 0, 0}, {EVENT_TWINS_KILLED, 0, 0, 0, 2000}, {NPC_RAMSEY_5, 0, 0, 0, 4000}, {SAY_VARIAN_TWINS_A_WIN, NPC_VARIAN, SAY_GARROSH_TWINS_H_WIN, NPC_GARROSH, 1000}, @@ -186,6 +187,7 @@ void instance_trial_of_the_crusader::OnCreatureCreate(Creature* pCreature) case NPC_GARROSH: case NPC_JARAXXUS: case NPC_OPEN_PORTAL_TARGET: + case NPC_FJOLA: case NPC_EYDIS: case NPC_WORLD_TRIGGER_LARGE: case NPC_THE_LICHKING: @@ -491,10 +493,10 @@ void instance_trial_of_the_crusader::DoHandleEventEpilogue() } // Function that will open and close the main gate -void instance_trial_of_the_crusader::DoOpenMainGate() +void instance_trial_of_the_crusader::DoOpenMainGate(uint32 uiResetTimer) { DoUseDoorOrButton(GO_MAIN_GATE); - m_uiGateResetTimer = 10000; + m_uiGateResetTimer = uiResetTimer; } // Function that will select the faction champions entries @@ -693,10 +695,19 @@ void instance_trial_of_the_crusader::JustDidDialogueStep(int32 iEntry) case EVENT_SUMMON_TWINS: if (Player* pPlayer = GetPlayerInMap()) { + // spawn the twin valkyrs; movement and the rest of spawns are handled in DB + DoOpenMainGate(15000); + pPlayer->SummonCreature(NPC_FJOLA, aSpawnPositions[7][0], aSpawnPositions[7][1], aSpawnPositions[7][2], aSpawnPositions[7][3], TEMPSUMMON_DEAD_DESPAWN, 0); pPlayer->SummonCreature(NPC_EYDIS, aSpawnPositions[8][0], aSpawnPositions[8][1], aSpawnPositions[8][2], aSpawnPositions[8][3], TEMPSUMMON_DEAD_DESPAWN, 0); } break; + case EVENT_TWINS_ATTACK: + if (Creature* pTwin = GetSingleCreatureFromStorage(NPC_FJOLA)) + pTwin->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE | UNIT_FLAG_PASSIVE); + if (Creature* pTwin = GetSingleCreatureFromStorage(NPC_EYDIS)) + pTwin->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE | UNIT_FLAG_PASSIVE); + break; case SAY_LKING_ANUB_INTRO_1: if (Player* pPlayer = GetPlayerInMap()) pPlayer->SummonCreature(NPC_WORLD_TRIGGER_LARGE, aSpawnPositions[9][0], aSpawnPositions[9][1], aSpawnPositions[9][2], aSpawnPositions[9][3], TEMPSUMMON_DEAD_DESPAWN, 0); diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h index 8b4c20768..fb4244b3d 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h @@ -31,11 +31,14 @@ enum EVENT_DESTROY_FLOOR = 13, EVENT_JARAXXUS_RESET_DELAY = 14, EVENT_CHAMPIONS_ATTACK = 15, + EVENT_TWINS_ATTACK = 16, NPC_BEASTS_COMBAT_STALKER = 36549, NPC_BEASTS_CONTROLLER = 35014, NPC_CHAMPIONS_CONTROLLER = 34781, NPC_VALKYR_TWINS_CONTROLLER = 34743, + // NPC_VALKYR_STALKER_DARK = 34704, // summons 34628 using 66107 + // NPC_VALKYR_STALKER_LIGHT = 34720, // summons 34630 using 66078 NPC_GORMOK = 34796, NPC_ACIDMAW = 35144, @@ -48,6 +51,8 @@ enum NPC_SNOBOLD_VASSAL = 34800, // used in Gormok encounter // NPC_JUMP_TARGET = 35376, // used to mark the jump spot for the crusaders; currently not used + // NPC_DARK_ESSENCE = 34567, // npc spell click for spell 65684 + // NPC_LIGHT_ESSENCE = 34568, // npc spell click for spell 65686 // NPC_BEASTS_TAPLIST = 35820, // NPC_CHAMPION_TAPLIST = 35821, @@ -146,6 +151,24 @@ enum WORLD_STATE_WIPES = 4390, WORLD_STATE_WIPES_COUNT = 4389, + + ACHIEV_CRIT_UPPER_BACK_PAIN_10 = 11779, // Icehowl achievs 3797, 3813 + ACHIEV_CRIT_UPPER_BACK_PAIN_25 = 11780, + ACHIEV_CRIT_PAIN_SPIKE_10 = 11838, // Jaraxxus achievs 3996, 3997 + ACHIEV_CRIT_PAIN_SPIKE_25 = 11839, + ACHIEV_CRIT_SALT_PEPER_10 = 11778, // Twin Valkyers achievs 3799, 3815 + ACHIEV_CRIT_SALT_PEPER_25 = 11818, + ACHIEV_CRIT_RESILIENCE_FIX_10_1 = 11803, // Faction Champions achievs 3798, 3814 + ACHIEV_CRIT_RESILIENCE_FIX_10_2 = 11804, + // ToDo: missing achiev criterias for 25 men? + ACHIEV_CRIT_TWO_JORMUNGARS_10_1 = 12280, // Twin Jormungars achievs 3936, 3937 + ACHIEV_CRIT_TWO_JORMUNGARS_10_2 = 12281, + ACHIEV_CRIT_TWO_JORMUNGARS_25_1 = 12278, + ACHIEV_CRIT_TWO_JORMUNGARS_25_2 = 12279, + ACHIEV_CRIT_TRIBUTE_IMMORTALITY_H = 12358, // Overall 25 men achievs 4079, 4156 + ACHIEV_CRIT_TRIBUTE_IMMORTALITY_A = 12359, + // ToDo: missing achiev criterias for the rest of the achievs? + }; static const uint32 aAllyHealerCrusaders[MAX_CRUSADERS_HEALERS] = { NPC_ALLY_DRUID_RESTO, NPC_ALLY_PALADIN_HOLY, NPC_ALLY_PRIEST_DISC, NPC_ALLY_SHAMAN_RESTO }; @@ -248,7 +271,7 @@ class instance_trial_of_the_crusader : public ScriptedInstance, private Dialogue const char* Save() const override { return m_strInstData.c_str(); } void Load(const char* chrIn) override; - void DoOpenMainGate(); + void DoOpenMainGate(uint32 uiResetTimer); void Update(uint32 uiDiff) override; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index cd8ba712f..4a9d43cb0 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3117" + #define SD2_REVISION_NR "3118" #endif // __SD2_REVISION_NR_H__ From 7eedc08814e23d93cd2460ebd240b8a9737eb2ee Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sat, 14 Mar 2015 11:09:40 +0100 Subject: [PATCH 1132/1172] [3119] Add door support in The Mechanar Thanks to @Ulduar for providing the data --- .../boss_nethermancer_sepethrea.cpp | 9 ++++++ .../the_mechanar/instance_mechanar.cpp | 28 ++++++++++++++++--- .../tempest_keep/the_mechanar/mechanar.h | 5 +++- sd2_revision_nr.h | 2 +- 4 files changed, 38 insertions(+), 6 deletions(-) diff --git a/scripts/outland/tempest_keep/the_mechanar/boss_nethermancer_sepethrea.cpp b/scripts/outland/tempest_keep/the_mechanar/boss_nethermancer_sepethrea.cpp index ba42e8da9..a75697a71 100644 --- a/scripts/outland/tempest_keep/the_mechanar/boss_nethermancer_sepethrea.cpp +++ b/scripts/outland/tempest_keep/the_mechanar/boss_nethermancer_sepethrea.cpp @@ -70,6 +70,9 @@ struct boss_nethermancer_sepethreaAI : public ScriptedAI { DoScriptText(SAY_AGGRO, m_creature); DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_SUMMON_RAGING_FLAMES : SPELL_SUMMON_RAGING_FLAMES_H); + + if (m_pInstance) + m_pInstance->SetData(TYPE_SEPETHREA, IN_PROGRESS); } void KilledUnit(Unit* /*pVictim*/) override @@ -85,6 +88,12 @@ struct boss_nethermancer_sepethreaAI : public ScriptedAI m_pInstance->SetData(TYPE_SEPETHREA, DONE); } + void JustReachedHome() override + { + if (m_pInstance) + m_pInstance->SetData(TYPE_SEPETHREA, FAIL); + } + void JustSummoned(Creature* pSummoned) override { if (pSummoned->GetEntry() == NPC_RAGING_FLAMES) diff --git a/scripts/outland/tempest_keep/the_mechanar/instance_mechanar.cpp b/scripts/outland/tempest_keep/the_mechanar/instance_mechanar.cpp index 46c372b52..f0574a4ab 100644 --- a/scripts/outland/tempest_keep/the_mechanar/instance_mechanar.cpp +++ b/scripts/outland/tempest_keep/the_mechanar/instance_mechanar.cpp @@ -70,11 +70,23 @@ void instance_mechanar::OnCreatureCreate(Creature* pCreature) void instance_mechanar::OnObjectCreate(GameObject* pGo) { - if (pGo->GetEntry() == GO_FACTORY_ELEVATOR) + switch (pGo->GetEntry()) { - // ToDo: activate elevator if TYPE_GYRO_KILL && TYPE_IRON_HAND && TYPE_CAPACITUS are DONE - m_mGoEntryGuidStore[GO_FACTORY_ELEVATOR] = pGo->GetObjectGuid(); + case GO_MOARG_DOOR_1: + if (m_auiEncounter[TYPE_GYRO_KILL] == DONE) + pGo->SetGoState(GO_STATE_ACTIVE); + break; + case GO_MOARG_DOOR_2: + if (m_auiEncounter[TYPE_IRON_HAND] == DONE) + pGo->SetGoState(GO_STATE_ACTIVE); + break; + case GO_NETHERMANCER_DOOR: + break; + + default: + return; } + m_mGoEntryGuidStore[pGo->GetEntry()] = pGo->GetObjectGuid(); } void instance_mechanar::SetData(uint32 uiType, uint32 uiData) @@ -82,15 +94,23 @@ void instance_mechanar::SetData(uint32 uiType, uint32 uiData) switch (uiType) { case TYPE_GYRO_KILL: + if (uiData == DONE) + DoUseDoorOrButton(GO_MOARG_DOOR_1); + m_auiEncounter[uiType] = uiData; + break; case TYPE_IRON_HAND: + if (uiData == DONE) + DoUseDoorOrButton(GO_MOARG_DOOR_2); + m_auiEncounter[uiType] = uiData; + break; case TYPE_CAPACITUS: m_auiEncounter[uiType] = uiData; - // ToDo: Activate the Elevator when all these 3 are done break; case TYPE_SEPETHREA: m_auiEncounter[uiType] = uiData; if (uiData == DONE) m_uiBridgeEventTimer = 10000; + DoUseDoorOrButton(GO_NETHERMANCER_DOOR); break; case TYPE_PATHALEON: m_auiEncounter[uiType] = uiData; diff --git a/scripts/outland/tempest_keep/the_mechanar/mechanar.h b/scripts/outland/tempest_keep/the_mechanar/mechanar.h index 860a66dd9..c1d6e5279 100644 --- a/scripts/outland/tempest_keep/the_mechanar/mechanar.h +++ b/scripts/outland/tempest_keep/the_mechanar/mechanar.h @@ -31,7 +31,10 @@ enum NPC_NETHERBINDER = 20059, NPC_FORGE_DESTROYER = 19735, - GO_FACTORY_ELEVATOR = 183788, + GO_MOARG_DOOR_1 = 184632, + GO_MOARG_DOOR_2 = 184322, + // GO_FACTORY_ELEVATOR = 183788, + GO_NETHERMANCER_DOOR = 184449, SPELL_ETHEREAL_TELEPORT = 34427, diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 4a9d43cb0..5794b7a51 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3118" + #define SD2_REVISION_NR "3119" #endif // __SD2_REVISION_NR_H__ From 857ae2d0697f9fe530a24b99cc6c5ef6dbfa788d Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sun, 15 Mar 2015 15:50:39 +0100 Subject: [PATCH 1133/1172] [3120] Implement achievements for ToC25 Also fix a few movement issues and achiev issues in ToC5 --- .../boss_argent_challenge.cpp | 17 +-- .../instance_trial_of_the_champion.cpp | 6 +- .../boss_northrend_beasts.cpp | 36 ++++- .../boss_twin_valkyr.cpp | 6 +- .../instance_trial_of_the_crusader.cpp | 127 ++++++++++++++++-- .../trial_of_the_crusader.h | 68 +++++++--- sd2_revision_nr.h | 2 +- 7 files changed, 220 insertions(+), 42 deletions(-) diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_argent_challenge.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_argent_challenge.cpp index 1171c8ea9..5b14e9d2d 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_argent_challenge.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_argent_challenge.cpp @@ -74,12 +74,12 @@ struct argent_champion_commonAI : public ScriptedAI if (m_pInstance) m_pInstance->SetData(TYPE_ARGENT_CHAMPION, DONE); - m_creature->SetFactionTemporary(FACTION_CHAMPION_FRIENDLY, TEMPFACTION_NONE); - EnterEvadeMode(); - // Handle event completion DoHandleEventEnd(); + m_creature->SetFactionTemporary(FACTION_CHAMPION_FRIENDLY, TEMPFACTION_NONE); + EnterEvadeMode(); + m_bDefeated = true; } } @@ -99,7 +99,7 @@ enum EMOTE_EADRIC_HAMMER = -1650058, SPELL_KILL_CREDIT_EADRIC = 68575, - SPELL_EADRIC_ACHIEVEMENT = 68197, + SPELL_EADRIC_ACHIEVEMENT = 68197, // required for achiev 3803 SPELL_HAMMER_OF_JUSTICE = 66863, SPELL_HAMMER_OF_RIGHTEOUS = 66867, @@ -143,7 +143,8 @@ struct boss_eadricAI : public argent_champion_commonAI { DoScriptText(SAY_EADRIC_DEFEAT, m_creature); - DoCastSpellIfCan(m_creature, SPELL_EADRIC_ACHIEVEMENT, CAST_TRIGGERED); + // ToDo: implement the mechanics for this achiev + //DoCastSpellIfCan(m_creature, SPELL_EADRIC_ACHIEVEMENT, CAST_TRIGGERED); m_creature->CastSpell(m_creature, SPELL_KILL_CREDIT_EADRIC, true); } @@ -198,7 +199,7 @@ enum SAY_PALETRESS_DEFEAT = -1650064, SPELL_KILL_CREDIT_PALETRESS = 68574, - SPELL_CONFESSOR_ACHIEVEMENT = 68206, + SPELL_CONFESSOR_ACHIEVEMENT = 68206, // required for achiev 3802 SPELL_CONFESS = 66547, SPELL_CONFESS_AURA = 66680, @@ -257,7 +258,6 @@ struct boss_paletressAI : public argent_champion_commonAI { DoScriptText(SAY_PALETRESS_DEFEAT, m_creature); - DoCastSpellIfCan(m_creature, SPELL_CONFESSOR_ACHIEVEMENT, CAST_TRIGGERED); m_creature->CastSpell(m_creature, SPELL_KILL_CREDIT_PALETRESS, true); } @@ -267,9 +267,10 @@ struct boss_paletressAI : public argent_champion_commonAI pSummoned->CastSpell(pSummoned, SPELL_MEMORY_SPAWN_EFFECT, true); } - void SummonedCreatureJustDied(Creature* /*pSummoned*/) override + void SummonedCreatureJustDied(Creature* pSummoned) override { DoScriptText(SAY_PALETRESS_MEMORY_DIES, m_creature); + pSummoned->CastSpell(pSummoned, SPELL_CONFESSOR_ACHIEVEMENT, true); m_creature->RemoveAurasDueToSpell(SPELL_REFLECTIVE_SHIELD); } diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/instance_trial_of_the_champion.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/instance_trial_of_the_champion.cpp index 11e2a1c5b..9d5cceca3 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/instance_trial_of_the_champion.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/instance_trial_of_the_champion.cpp @@ -881,7 +881,7 @@ void instance_trial_of_the_champion::JustDidDialogueStep(int32 iEntry) { if (Creature* pHelper = pHerald->SummonCreature(aArgentChallengeHelpers[i].uiEntry, aArgentChallengeHelpers[i].fX, aArgentChallengeHelpers[i].fY, aArgentChallengeHelpers[i].fZ, aArgentChallengeHelpers[i].fO, TEMPSUMMON_DEAD_DESPAWN, 0)) { - pHelper->GetMotionMaster()->MovePoint(POINT_ID_CENTER, aArgentChallengeHelpers[i].fTargetX, aArgentChallengeHelpers[i].fTargetY, aArgentChallengeHelpers[i].fTargetZ); + pHelper->GetMotionMaster()->MovePoint(POINT_ID_CENTER, aArgentChallengeHelpers[i].fTargetX, aArgentChallengeHelpers[i].fTargetY, aArgentChallengeHelpers[i].fTargetZ, false); pHelper->SetRespawnCoord(aArgentChallengeHelpers[i].fTargetX, aArgentChallengeHelpers[i].fTargetY, aArgentChallengeHelpers[i].fTargetZ, pHelper->GetOrientation()); } } @@ -890,7 +890,7 @@ void instance_trial_of_the_champion::JustDidDialogueStep(int32 iEntry) case NPC_JAEREN_SUNSWORN: if (Creature* pChampion = GetSingleCreatureFromStorage(m_uiGrandChampionEntry)) { - pChampion->GetMotionMaster()->MovePoint(POINT_ID_CENTER, aArgentChallengeHelpers[9].fTargetX, aArgentChallengeHelpers[9].fTargetY, aArgentChallengeHelpers[9].fTargetZ); + pChampion->GetMotionMaster()->MovePoint(POINT_ID_CENTER, aArgentChallengeHelpers[9].fTargetX, aArgentChallengeHelpers[9].fTargetY, aArgentChallengeHelpers[9].fTargetZ, false); pChampion->SetRespawnCoord(aArgentChallengeHelpers[9].fTargetX, aArgentChallengeHelpers[9].fTargetY, aArgentChallengeHelpers[9].fTargetZ, pChampion->GetOrientation()); } break; @@ -1096,7 +1096,7 @@ void instance_trial_of_the_champion::Update(uint32 uiDiff) pMount->SetWalk(false); pCenterTrigger->GetContactPoint(pChampion, fX, fY, fZ, 2 * INTERACTION_DISTANCE); - pMount->GetMotionMaster()->MovePoint(POINT_ID_CENTER, fX, fY, fZ); + pMount->GetMotionMaster()->MovePoint(POINT_ID_CENTER, fX, fY, fZ, false); // set guid m_ArenaChampionsGuids[m_uiIntroStage] = pChampion->GetObjectGuid(); diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp index 57aaa9e0b..5daf937ea 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp @@ -53,7 +53,6 @@ struct npc_beast_combat_stalkerAI : public Scripted_NoMovementAI { m_pInstance = (instance_trial_of_the_crusader*)pCreature->GetInstanceData(); Reset(); - m_creature->SetInCombatWithZone(); } instance_trial_of_the_crusader* m_pInstance; @@ -67,6 +66,7 @@ struct npc_beast_combat_stalkerAI : public Scripted_NoMovementAI uint32 m_uiWormPhaseTimer; uint8 m_uiWormPhaseStage; + uint32 m_uiWormAchievTimer; void Reset() override { @@ -74,6 +74,7 @@ struct npc_beast_combat_stalkerAI : public Scripted_NoMovementAI m_uiWormPhaseStage = 0; m_uiAttackDelayTimer = 0; m_uiNextBeastTimer = 0; + m_uiWormAchievTimer = 0; m_bFirstWormDied = false; m_uiPhase = PHASE_GORMOK; @@ -103,6 +104,8 @@ struct npc_beast_combat_stalkerAI : public Scripted_NoMovementAI m_pInstance->SetData(TYPE_NORTHREND_BEASTS, IN_PROGRESS); } + void AttackStart(Unit* /*pWho*/) override { } + void JustSummoned(Creature* pSummoned) override { switch (pSummoned->GetEntry()) @@ -120,7 +123,7 @@ struct npc_beast_combat_stalkerAI : public Scripted_NoMovementAI m_aSummonedBossGuid[m_uiPhase] = pSummoned->GetObjectGuid(); pSummoned->SetWalk(false); - pSummoned->GetMotionMaster()->MovePoint(m_uiPhase, aMovePositions[m_uiPhase][0], aMovePositions[m_uiPhase][1], aMovePositions[m_uiPhase][2]); + pSummoned->GetMotionMaster()->MovePoint(m_uiPhase, aMovePositions[m_uiPhase][0], aMovePositions[m_uiPhase][1], aMovePositions[m_uiPhase][2], false); // Next beasts are summoned only for heroic modes if (m_creature->GetMap()->GetDifficulty() == RAID_DIFFICULTY_10MAN_HEROIC || m_creature->GetMap()->GetDifficulty() == RAID_DIFFICULTY_25MAN_HEROIC) @@ -166,7 +169,16 @@ struct npc_beast_combat_stalkerAI : public Scripted_NoMovementAI case NPC_DREADSCALE: case NPC_ACIDMAW: if (m_bFirstWormDied && m_uiPhase == PHASE_WORMS) + { DoSummonNextBeast(NPC_ICEHOWL); + + // cast achiev spell if timer is still running + if (m_uiWormAchievTimer) + { + m_creature->CastSpell(m_creature, SPELL_JORMUNGAR_ACHIEV_CREDIT, true); + m_uiWormAchievTimer = 0; + } + } else { m_bFirstWormDied = true; @@ -176,6 +188,7 @@ struct npc_beast_combat_stalkerAI : public Scripted_NoMovementAI { pWorm->CastSpell(pWorm, SPELL_JORMUNGAR_ENRAGE, true); DoScriptText(EMOTE_JORMUNGAR_ENRAGE, pWorm); + m_uiWormAchievTimer = 10000; } } break; @@ -319,6 +332,15 @@ struct npc_beast_combat_stalkerAI : public Scripted_NoMovementAI m_uiWormPhaseTimer -= uiDiff; } + // jormungars achiev timer + if (m_uiWormAchievTimer) + { + if (m_uiWormAchievTimer <= uiDiff) + m_uiWormAchievTimer = 0; + else + m_uiWormAchievTimer -= uiDiff; + } + m_creature->SelectHostileTarget(); } }; @@ -373,6 +395,16 @@ struct boss_gormokAI : public ScriptedAI m_uiSnoboldsBoarded = 0; } + void Aggro(Unit* /*pWho*/) override + { + // trigger the controller combat + if (m_pInstance) + { + if (Creature* pStalker = m_pInstance->GetSingleCreatureFromStorage(NPC_BEASTS_COMBAT_STALKER)) + pStalker->SetInCombatWithZone(); + } + } + void JustDied(Unit* /*pKiller*/) override { for (GuidVector::const_iterator itr = m_vSnoboldGuidsVector.begin(); itr != m_vSnoboldGuidsVector.end(); ++itr) diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp index 959700c04..d4d11fa02 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp @@ -62,7 +62,7 @@ struct boss_fjolaAI : public ScriptedAI { DoScriptText(SAY_AGGRO, m_creature); - if (m_pInstance) + if (m_pInstance && m_pInstance->GetData(TYPE_TWIN_VALKYR) != IN_PROGRESS) m_pInstance->SetData(TYPE_TWIN_VALKYR, IN_PROGRESS); } @@ -70,13 +70,13 @@ struct boss_fjolaAI : public ScriptedAI { DoScriptText(SAY_DEATH, m_creature); - if (m_pInstance) + if (m_pInstance && m_pInstance->GetData(TYPE_TWIN_VALKYR) != DONE) m_pInstance->SetData(TYPE_TWIN_VALKYR, DONE); } void EnterEvadeMode() override { - if (m_pInstance) + if (m_pInstance && m_pInstance->GetData(TYPE_TWIN_VALKYR) != FAIL) m_pInstance->SetData(TYPE_TWIN_VALKYR, FAIL); // cleanup handled by creature linking diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp index b324836ee..b6a40dd6a 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp @@ -153,7 +153,9 @@ instance_trial_of_the_crusader::instance_trial_of_the_crusader(Map* pMap) : Scri m_uiTeam(TEAM_NONE), m_uiGateResetTimer(0), m_uiKilledCrusaders(0), - m_bCrusadersSummoned(false) + m_uiCrusadersAchievTimer(0), + m_bCrusadersSummoned(false), + m_bCrusadersAchievCheck(false) { Initialize(); } @@ -192,12 +194,16 @@ void instance_trial_of_the_crusader::OnCreatureCreate(Creature* pCreature) case NPC_WORLD_TRIGGER_LARGE: case NPC_THE_LICHKING: case NPC_THE_LICHKING_VISUAL: + case NPC_BEASTS_COMBAT_STALKER: case NPC_ACIDMAW: case NPC_DREADSCALE: case NPC_ZHAAGRYM: case NPC_CAT: - case NPC_CHAMPIONS_CONTROLLER: break; + case NPC_SNOBOLD_VASSAL: + case NPC_MISTRESS_OF_PAIN: + m_lSummonedGuidsList.push_back(pCreature->GetObjectGuid()); + return; default: return; } @@ -227,6 +233,8 @@ void instance_trial_of_the_crusader::OnObjectCreate(GameObject* pGo) case GO_TRIBUTE_CHEST_25H_50: case GO_MAIN_GATE: case GO_WEB_DOOR: + case GO_WEST_GATE: + case GO_NORTH_GATE: case GO_PORTAL_DALARAN: break; case GO_CRUSADERS_CACHE: @@ -260,6 +268,12 @@ void instance_trial_of_the_crusader::OnPlayerEnter(Player* pPlayer) DoSelectCrusaders(); } +void instance_trial_of_the_crusader::OnPlayerDeath(Player* /*pPlayer*/) +{ + if (IsEncounterInProgress()) + SetData(TYPE_IMMORTALITY_FAILED, DONE); +} + void instance_trial_of_the_crusader::SetData(uint32 uiType, uint32 uiData) { switch (uiType) @@ -281,9 +295,16 @@ void instance_trial_of_the_crusader::SetData(uint32 uiType, uint32 uiData) { SetData(TYPE_WIPE_COUNT, m_auiEncounter[TYPE_WIPE_COUNT] + 1); StartNextDialogueText(SAY_TIRION_BEAST_WIPE); + m_lSummonedGuidsList.clear(); } else if (uiData == DONE) StartNextDialogueText(SAY_TIRION_BEAST_SLAY); + // combat doors + if (uiData != SPECIAL) + { + DoUseDoorOrButton(GO_WEST_GATE); + DoUseDoorOrButton(GO_NORTH_GATE); + } m_auiEncounter[uiType] = uiData; break; case TYPE_JARAXXUS: @@ -297,6 +318,14 @@ void instance_trial_of_the_crusader::SetData(uint32 uiType, uint32 uiData) } else if (uiData == DONE) StartNextDialogueText(SAY_JARAXXUS_DEATH); + else if (uiData == IN_PROGRESS) + m_lSummonedGuidsList.clear(); + // combat doors + if (uiData != SPECIAL) + { + DoUseDoorOrButton(GO_WEST_GATE); + DoUseDoorOrButton(GO_NORTH_GATE); + } m_auiEncounter[uiType] = uiData; break; case TYPE_FACTION_CHAMPIONS: @@ -310,16 +339,20 @@ void instance_trial_of_the_crusader::SetData(uint32 uiType, uint32 uiData) // cleanup and reset crusaders DoCleanupCrusaders(); m_uiKilledCrusaders = 0; + m_uiCrusadersAchievTimer = 0; m_bCrusadersSummoned = false; + m_bCrusadersAchievCheck = false; } else if (uiData == DONE) { DoRespawnGameObject(GO_CRUSADERS_CACHE, 60 * MINUTE); StartNextDialogueText(SAY_VARIAN_PVP_A_WIN); - - // kill credit - if (Creature* pController = GetSingleCreatureFromStorage(NPC_CHAMPIONS_CONTROLLER)) - pController->CastSpell(pController, SPELL_ENCOUNTER_KILL_CREDIT, true); + } + // combat doors + if (uiData != SPECIAL) + { + DoUseDoorOrButton(GO_WEST_GATE); + DoUseDoorOrButton(GO_NORTH_GATE); } m_auiEncounter[uiType] = uiData; break; @@ -337,6 +370,14 @@ void instance_trial_of_the_crusader::SetData(uint32 uiType, uint32 uiData) } else if (uiData == DONE) StartNextDialogueText(EVENT_TWINS_KILLED); + else if (uiData == IN_PROGRESS) + DoStartTimedAchievement(ACHIEVEMENT_CRITERIA_TYPE_KILL_CREATURE, ACHIEV_START_VALKYRS_ID); + // combat doors + if (uiData != SPECIAL) + { + DoUseDoorOrButton(GO_WEST_GATE); + DoUseDoorOrButton(GO_NORTH_GATE); + } m_auiEncounter[uiType] = uiData; break; case TYPE_ANUBARAK: @@ -351,6 +392,9 @@ void instance_trial_of_the_crusader::SetData(uint32 uiType, uint32 uiData) DoUseDoorOrButton(GO_WEB_DOOR); m_auiEncounter[uiType] = uiData; break; + case TYPE_IMMORTALITY_FAILED: + m_auiEncounter[uiType] = uiData; + break; default: script_error_log("Instance Trial of The Crusader: ERROR SetData = %u for type %u does not exist/not implemented.", uiType, uiData); return; @@ -362,7 +406,8 @@ void instance_trial_of_the_crusader::SetData(uint32 uiType, uint32 uiData) std::ostringstream saveStream; saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2] << " " - << m_auiEncounter[3] << " " << m_auiEncounter[4] << " " << m_auiEncounter[5]; + << m_auiEncounter[3] << " " << m_auiEncounter[4] << " " << m_auiEncounter[5] << " " + << m_auiEncounter[6]; m_strInstData = saveStream.str(); @@ -391,7 +436,7 @@ void instance_trial_of_the_crusader::Load(const char* chrIn) std::istringstream loadStream(chrIn); loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3] - >> m_auiEncounter[4] >> m_auiEncounter[5]; + >> m_auiEncounter[4] >> m_auiEncounter[5] >> m_auiEncounter[6]; for (uint8 i = TYPE_NORTHREND_BEASTS; i < MAX_ENCOUNTER; ++i) if (m_auiEncounter[i] == IN_PROGRESS) // Do not load an encounter as "In Progress" - reset it instead. @@ -434,13 +479,71 @@ void instance_trial_of_the_crusader::OnCreatureDeath(Creature* pCreature) case NPC_HORDE_WARRIOR: ++m_uiKilledCrusaders; + // start the Resilience will fix! it achiev + if (!m_bCrusadersAchievCheck) + { + m_uiCrusadersAchievTimer = 60000; + m_bCrusadersAchievCheck = true; + } + // all crusaders are killed if (m_uiKilledCrusaders == (Is25ManDifficulty() ? MAX_CRUSADERS_25MAN : MAX_CRUSADERS_10MAN)) + { SetData(TYPE_FACTION_CHAMPIONS, DONE); + + // kill credit + pCreature->CastSpell(pCreature, SPELL_ENCOUNTER_KILL_CREDIT, true); + + // cast the resilience fix credit + if (m_uiCrusadersAchievTimer) + pCreature->CastSpell(pCreature, SPELL_RESILIENCE_FIX_CREDIT, true); + } break; + case NPC_SNOBOLD_VASSAL: + case NPC_MISTRESS_OF_PAIN: + m_lSummonedGuidsList.remove(pCreature->GetObjectGuid()); + break;; } } +bool instance_trial_of_the_crusader::CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* /*pSource*/, Unit const* /*pTarget*/, uint32 /*uiMiscvalue1*/) const +{ + switch (uiCriteriaId) + { + case ACHIEV_CRIT_UPPER_BACK_PAIN_10_N: + case ACHIEV_CRIT_UPPER_BACK_PAIN_10_H: + return m_lSummonedGuidsList.size() >= MIN_ACHIEV_SNOBOLDS_10; + case ACHIEV_CRIT_UPPER_BACK_PAIN_25_N: + case ACHIEV_CRIT_UPPER_BACK_PAIN_25_H: + return m_lSummonedGuidsList.size() >= MIN_ACHIEV_SNOBOLDS_25; + case ACHIEV_CRIT_PAIN_SPIKE_10_N: + case ACHIEV_CRIT_PAIN_SPIKE_10_H: + case ACHIEV_CRIT_PAIN_SPIKE_25_N: + case ACHIEV_CRIT_PAIN_SPIKE_25_H: + return m_lSummonedGuidsList.size() >= MIN_ACHIEV_MISTRESSES; + case ACHIEV_CRIT_TRIBUTE_IMMORTALITY_H: + case ACHIEV_CRIT_TRIBUTE_IMMORTALITY_A: + return GetData(TYPE_IMMORTALITY_FAILED) != DONE; + case ACHIEV_CRIT_TRIBUTE_INSANITY_10: + case ACHIEV_CRIT_TRIBUTE_INSANITY_25: + return GetData(TYPE_WIPE_COUNT) == 0; + case ACHIEV_CRIT_TRIBUTE_MAD_SKILL_10_1: + case ACHIEV_CRIT_TRIBUTE_MAD_SKILL_10_2: + case ACHIEV_CRIT_TRIBUTE_MAD_SKILL_25_1: + case ACHIEV_CRIT_TRIBUTE_MAD_SKILL_25_2: + return GetData(TYPE_WIPE_COUNT) <= 5; + case ACHIEV_CRIT_TRIBUTE_SKILL_10_1: + case ACHIEV_CRIT_TRIBUTE_SKILL_10_2: + case ACHIEV_CRIT_TRIBUTE_SKILL_10_3: + case ACHIEV_CRIT_TRIBUTE_SKILL_25_1: + case ACHIEV_CRIT_TRIBUTE_SKILL_25_2: + case ACHIEV_CRIT_TRIBUTE_SKILL_25_3: + return GetData(TYPE_WIPE_COUNT) <= 25; + } + + return false; +} + void instance_trial_of_the_crusader::DoSummonRamsey(uint32 uiEntry) { Player* pPlayer = GetPlayerInMap(); @@ -748,6 +851,14 @@ void instance_trial_of_the_crusader::Update(uint32 uiDiff) { DialogueUpdate(uiDiff); + if (m_uiCrusadersAchievTimer) + { + if (m_uiCrusadersAchievTimer <= uiDiff) + m_uiCrusadersAchievTimer = 0; + else + m_uiCrusadersAchievTimer -= uiDiff; + } + // ToDo: set this as door reset timer when fixed in core if (m_uiGateResetTimer) { diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h index fb4244b3d..448dc5d6e 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h @@ -7,19 +7,24 @@ enum { - MAX_ENCOUNTER = 6, + MAX_ENCOUNTER = 7, MAX_WIPES_ALLOWED = 50, MAX_CRUSADERS_10MAN = 6, MAX_CRUSADERS_25MAN = 10, MAX_CRUSADERS_HEALERS = 4, MAX_CRUSADERS_OTHER = 6, + MIN_ACHIEV_MISTRESSES = 2, + MIN_ACHIEV_SNOBOLDS_10 = 2, + MIN_ACHIEV_SNOBOLDS_25 = 4, + TYPE_WIPE_COUNT = 0, TYPE_NORTHREND_BEASTS = 1, TYPE_JARAXXUS = 2, TYPE_FACTION_CHAMPIONS = 3, TYPE_TWIN_VALKYR = 4, TYPE_ANUBARAK = 5, + TYPE_IMMORTALITY_FAILED = 6, // Achievements A Tribute to Immortality, needs to be saved to database EVENT_OPEN_PORTAL = 6, EVENT_KILL_FIZZLEBANG = 7, @@ -50,6 +55,7 @@ enum NPC_ANUBARAK = 34564, NPC_SNOBOLD_VASSAL = 34800, // used in Gormok encounter + NPC_MISTRESS_OF_PAIN = 34826, // used in Jaraxxus encounter // NPC_JUMP_TARGET = 35376, // used to mark the jump spot for the crusaders; currently not used // NPC_DARK_ESSENCE = 34567, // npc spell click for spell 65684 // NPC_LIGHT_ESSENCE = 34568, // npc spell click for spell 65686 @@ -114,8 +120,8 @@ enum GO_MAIN_GATE = 195647, GO_WEST_GATE = 195648, // entrance gate - GO_SOUTH_GATE = 195649, // south and north doors are used to allow the Champions to enter the arena - GO_NORTH_GATE = 195650, + // GO_SOUTH_GATE = 195649, // not used + GO_NORTH_GATE = 195650, // dummy entrance; used in Trial of the Champion GO_COLISEUM_FLOOR = 195527, GO_WEB_DOOR = 195485, GO_PORTAL_DALARAN = 195682, @@ -141,6 +147,7 @@ enum // SPELL_LEAP = 67382, // crusader jump inside the arena to the provided coords SPELL_ANCHOR_HERE = 45313, // change respawn coords to the current position SPELL_ENCOUNTER_KILL_CREDIT = 68184, // kill credit for faction champions + SPELL_RESILIENCE_FIX_CREDIT = 68620, // server side spell for achievs 3798, 3814 SPELL_ARTHAS_PORTAL = 51807, SPELL_FROSTNOVA = 68198, SPELL_CORPSE_TELEPORT = 69016, // NYI @@ -152,20 +159,41 @@ enum WORLD_STATE_WIPES = 4390, WORLD_STATE_WIPES_COUNT = 4389, - ACHIEV_CRIT_UPPER_BACK_PAIN_10 = 11779, // Icehowl achievs 3797, 3813 - ACHIEV_CRIT_UPPER_BACK_PAIN_25 = 11780, - ACHIEV_CRIT_PAIN_SPIKE_10 = 11838, // Jaraxxus achievs 3996, 3997 - ACHIEV_CRIT_PAIN_SPIKE_25 = 11839, - ACHIEV_CRIT_SALT_PEPER_10 = 11778, // Twin Valkyers achievs 3799, 3815 - ACHIEV_CRIT_SALT_PEPER_25 = 11818, - ACHIEV_CRIT_RESILIENCE_FIX_10_1 = 11803, // Faction Champions achievs 3798, 3814 - ACHIEV_CRIT_RESILIENCE_FIX_10_2 = 11804, - // ToDo: missing achiev criterias for 25 men? - ACHIEV_CRIT_TWO_JORMUNGARS_10_1 = 12280, // Twin Jormungars achievs 3936, 3937 - ACHIEV_CRIT_TWO_JORMUNGARS_10_2 = 12281, - ACHIEV_CRIT_TWO_JORMUNGARS_25_1 = 12278, - ACHIEV_CRIT_TWO_JORMUNGARS_25_2 = 12279, - ACHIEV_CRIT_TRIBUTE_IMMORTALITY_H = 12358, // Overall 25 men achievs 4079, 4156 + ACHIEV_START_VALKYRS_ID = 21853, // Twin Valkyers achievs 3799, 3815 + ACHIEV_START_ANUBARAK_10_ID = 68186, // Anub timed achievs 3800, 3816 + ACHIEV_START_ANUBARAK_25_ID = 68515, + + ACHIEV_CRIT_UPPER_BACK_PAIN_10_N = 11779, // Icehowl achievs 3797, 3813 + ACHIEV_CRIT_UPPER_BACK_PAIN_10_H = 11802, + ACHIEV_CRIT_UPPER_BACK_PAIN_25_N = 11780, + ACHIEV_CRIT_UPPER_BACK_PAIN_25_H = 11801, + ACHIEV_CRIT_PAIN_SPIKE_10_N = 11838, // Jaraxxus achievs 3996, 3997 + ACHIEV_CRIT_PAIN_SPIKE_10_H = 11861, + ACHIEV_CRIT_PAIN_SPIKE_25_N = 11839, + ACHIEV_CRIT_PAIN_SPIKE_25_H = 11862, + // ACHIEV_CRIT_RESILIENCE_FIX_10_N = 11803, // Faction Champions achievs 3798, 3814 + // ACHIEV_CRIT_RESILIENCE_FIX_10_H = 11804, + // ACHIEV_CRIT_RESILIENCE_FIX_25_N = 11799, + // ACHIEV_CRIT_RESILIENCE_FIX_25_H = 11800, + // ACHIEV_CRIT_TWO_JORMUNGARS_10_N = 12280, // Twin Jormungars achievs 3936, 3937 + // ACHIEV_CRIT_TWO_JORMUNGARS_10_H = 12281, + // ACHIEV_CRIT_TWO_JORMUNGARS_25_N = 12278, + // ACHIEV_CRIT_TWO_JORMUNGARS_25_H = 12279, + + ACHIEV_CRIT_TRIBUTE_SKILL_10_1 = 12344, // Tribute chest achievs 3808, 3817 + ACHIEV_CRIT_TRIBUTE_SKILL_10_2 = 12345, + ACHIEV_CRIT_TRIBUTE_SKILL_10_3 = 12346, + ACHIEV_CRIT_TRIBUTE_SKILL_25_1 = 12338, + ACHIEV_CRIT_TRIBUTE_SKILL_25_2 = 12339, + ACHIEV_CRIT_TRIBUTE_SKILL_25_3 = 12340, + ACHIEV_CRIT_TRIBUTE_MAD_SKILL_10_1 = 12347, // Tribute chest achievs 3809, 3818 + ACHIEV_CRIT_TRIBUTE_MAD_SKILL_10_2 = 12348, + ACHIEV_CRIT_TRIBUTE_MAD_SKILL_25_1 = 12341, + ACHIEV_CRIT_TRIBUTE_MAD_SKILL_25_2 = 12342, + ACHIEV_CRIT_TRIBUTE_INSANITY_10 = 12349, // Tribute chest achievs 3810, 3819 + ACHIEV_CRIT_TRIBUTE_INSANITY_25 = 12343, + ACHIEV_CRIT_TRUBUTE_INSANITY_D = 12360, // Tribute chest achiev 4080 + ACHIEV_CRIT_TRIBUTE_IMMORTALITY_H = 12358, // Overall 25 heroic achievs 4079, 4156 ACHIEV_CRIT_TRIBUTE_IMMORTALITY_A = 12359, // ToDo: missing achiev criterias for the rest of the achievs? @@ -258,6 +286,7 @@ class instance_trial_of_the_crusader : public ScriptedInstance, private Dialogue void OnCreatureDeath(Creature* pCreature) override; void OnPlayerEnter(Player* pPlayer) override; + void OnPlayerDeath(Player* pPlayer) override; void SetData(uint32 uiType, uint32 uiData) override; uint32 GetData(uint32 uiType) const override; @@ -271,6 +300,8 @@ class instance_trial_of_the_crusader : public ScriptedInstance, private Dialogue const char* Save() const override { return m_strInstData.c_str(); } void Load(const char* chrIn) override; + bool CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget = NULL, uint32 uiMiscvalue1 = 0) const override; + void DoOpenMainGate(uint32 uiResetTimer); void Update(uint32 uiDiff) override; @@ -289,13 +320,16 @@ class instance_trial_of_the_crusader : public ScriptedInstance, private Dialogue std::vector m_vCrusadersEntries; GuidVector m_vCrusadersGuidsVector; + GuidList m_lSummonedGuidsList; Team m_uiTeam; uint32 m_uiGateResetTimer; uint32 m_uiKilledCrusaders; + uint32 m_uiCrusadersAchievTimer; bool m_bCrusadersSummoned; + bool m_bCrusadersAchievCheck; }; #endif diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 5794b7a51..f4dcb0e30 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3119" + #define SD2_REVISION_NR "3120" #endif // __SD2_REVISION_NR_H__ From ee974f79da116473fabde5b5cc64f7cd5fab5bd2 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sun, 15 Mar 2015 22:30:17 +0100 Subject: [PATCH 1134/1172] [3121] Add missing gossips in ToC25 Thanks to @krullgor for the data --- .../trial_of_the_crusader/trial_of_the_crusader.cpp | 8 ++++---- sd2_revision_nr.h | 2 +- sql/scriptdev2_script_full.sql | 6 +++++- sql/updates/r3121_scriptdev2.sql | 6 ++++++ 4 files changed, 16 insertions(+), 6 deletions(-) create mode 100644 sql/updates/r3121_scriptdev2.sql diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp index 77a84cf25..c168c1b7b 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp @@ -52,12 +52,12 @@ enum GOSSIP_ITEM_BEAST_INIT = -3649000, GOSSIP_ITEM_BEAST_START = -3649001, GOSSIP_ITEM_BEAST_WIPE_INIT = -3649002, - GOSSIP_ITEM_BEAST_WIPE_START = -3000000, + GOSSIP_ITEM_BEAST_WIPE_START = -3649014, GOSSIP_ITEM_JARAXXUS_INIT = -3649003, GOSSIP_ITEM_JARAXXUS_START = -3649011, GOSSIP_ITEM_JARAXXUS_WIPE_INIT = -3649004, - GOSSIP_ITEM_JARAXXUS_WIPE_START = -3000000, + GOSSIP_ITEM_JARAXXUS_WIPE_START = -3649015, GOSSIP_ITEM_PVP_INIT = -3649005, GOSSIP_ITEM_PVP_START = -3649006, @@ -66,8 +66,8 @@ enum GOSSIP_ITEM_TWINS_INIT = -3649007, GOSSIP_ITEM_TWINS_START = -3649008, - GOSSIP_ITEM_TWINS_WIPE_INIT = -3000000, - GOSSIP_ITEM_TWINS_WIPE_START = -3000000, + GOSSIP_ITEM_TWINS_WIPE_INIT = -3649016, + GOSSIP_ITEM_TWINS_WIPE_START = -3649017, GOSSIP_ITEM_ANUB_INIT = -3649009, GOSSIP_ITEM_ANUB_START = -3649010, diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index f4dcb0e30..82e21b4ae 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3120" + #define SD2_REVISION_NR "3121" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index d91e0ec81..14818076e 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -5159,7 +5159,11 @@ INSERT INTO gossip_texts (entry,content_default,comment) VALUES (-3649010,'That is strange...','barrett GOSSIP_ITEM_ANUB_START'), (-3649011,'We\'re ready for the next challenge.','barrett GOSSIP_ITEM_JARAXXUS_START'), (-3649012,'You\'ll be even more amazed after we take them out!','barrett GOSSIP_ITEM_PVP_WIPE_INIT'), -(-3649013,'We\'re ready for anything!','barrett GOSSIP_ITEM_PVP_WIPE_START'); +(-3649013,'We\'re ready for anything!','barrett GOSSIP_ITEM_PVP_WIPE_START'), +(-3649014,'We\'re ready. This time things will be different.','barrett GOSSIP_ITEM_BEAST_WIPE_START'), +(-3649015,'Now.','barrett GOSSIP_ITEM_JARAXXUS_WIPE_START'), +(-3649016,'We\'ll just have to improve our teamwork to match the two of them.','barrett GOSSIP_ITEM_TWINS_WIPE_INIT'), +(-3649017,'Just bring them out again, then watch.','barrett GOSSIP_ITEM_TWINS_WIPE_START'); -- -3 650 000 TRIAL OF THE CHAMPION INSERT INTO gossip_texts (entry,content_default,comment) VALUES diff --git a/sql/updates/r3121_scriptdev2.sql b/sql/updates/r3121_scriptdev2.sql new file mode 100644 index 000000000..dd93b6f68 --- /dev/null +++ b/sql/updates/r3121_scriptdev2.sql @@ -0,0 +1,6 @@ +DELETE FROM gossip-texts WHERE entry IN (-3649014,-3649015,-3649016,-3649017); +INSERT INTO gossip_texts (entry,content_default,comment) VALUES +(-3649014,'We\'re ready. This time things will be different.','barrett GOSSIP_ITEM_BEAST_WIPE_START'), +(-3649015,'Now.','barrett GOSSIP_ITEM_JARAXXUS_WIPE_START'), +(-3649016,'We\'ll just have to improve our teamwork to match the two of them.','barrett GOSSIP_ITEM_TWINS_WIPE_INIT'), +(-3649017,'Just bring them out again, then watch.','barrett GOSSIP_ITEM_TWINS_WIPE_START'); From 293a42ee40dcd2a46fccf12d1fa838d357aafb26 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Mon, 16 Mar 2015 21:23:23 +0100 Subject: [PATCH 1135/1172] Fix typo in previous commit --- sql/updates/r3121_scriptdev2.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql/updates/r3121_scriptdev2.sql b/sql/updates/r3121_scriptdev2.sql index dd93b6f68..f8eac5a4f 100644 --- a/sql/updates/r3121_scriptdev2.sql +++ b/sql/updates/r3121_scriptdev2.sql @@ -1,4 +1,4 @@ -DELETE FROM gossip-texts WHERE entry IN (-3649014,-3649015,-3649016,-3649017); +DELETE FROM gossip_texts WHERE entry IN (-3649014,-3649015,-3649016,-3649017); INSERT INTO gossip_texts (entry,content_default,comment) VALUES (-3649014,'We\'re ready. This time things will be different.','barrett GOSSIP_ITEM_BEAST_WIPE_START'), (-3649015,'Now.','barrett GOSSIP_ITEM_JARAXXUS_WIPE_START'), From 16f1ae12579549c541e2436013be8ea240543400 Mon Sep 17 00:00:00 2001 From: horstche Date: Sun, 19 Apr 2015 21:56:02 +0200 Subject: [PATCH 1136/1172] [3122] Implement script support for quests 10674 and 10859 Close scriptdev2/scriptdev2-tbc#19 Signed-off-by: Xfurry --- scripts/outland/blades_edge_mountains.cpp | 102 +++++++++++++++++++++- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 + sql/updates/r3122_mangos.sql | 1 + 4 files changed, 104 insertions(+), 2 deletions(-) create mode 100644 sql/updates/r3122_mangos.sql diff --git a/scripts/outland/blades_edge_mountains.cpp b/scripts/outland/blades_edge_mountains.cpp index 2981d6c46..3df4c2c9a 100644 --- a/scripts/outland/blades_edge_mountains.cpp +++ b/scripts/outland/blades_edge_mountains.cpp @@ -17,7 +17,7 @@ /* ScriptData SDName: Blades_Edge_Mountains SD%Complete: 90 -SDComment: Quest support: 10503, 10504, 10512, 10545, 10556, 10609, 11058, 11080. (npc_daranelle needs bit more work before consider complete) +SDComment: Quest support: 10503, 10504, 10512, 10545, 10556, 10609, 10674, 10859, 11058, 11080. (npc_daranelle needs bit more work before consider complete) SDCategory: Blade's Edge Mountains EndScriptData */ @@ -26,6 +26,7 @@ mobs_nether_drake npc_daranelle npc_bloodmaul_stout_trigger npc_simon_game_bunny +npc_light_orb_collector EndContentData */ #include "precompiled.h" @@ -794,6 +795,100 @@ bool EffectScriptEffectCreature_npc_simon_game_bunny(Unit* pCaster, uint32 uiSpe return false; } +/*###### +## npc_light_orb_collector +######*/ + +enum +{ + NPC_LIGHT_ORB_MINI = 20771, + NPC_KILL_CREDIT_TRIGGER = 21929, + + MAX_PULL_DISTANCE = 20, +}; + +struct npc_light_orb_collectorAI : public ScriptedAI +{ + npc_light_orb_collectorAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } + + ObjectGuid m_selectedOrbGuid; + bool m_bOrbPulled; + + uint32 m_uiStartTimer; + + void Reset() override + { + m_bOrbPulled = false; + m_uiStartTimer = 0; + } + + void MoveInLineOfSight(Unit* pWho) override + { + if (pWho->GetTypeId() != TYPEID_UNIT || pWho->GetEntry() != NPC_LIGHT_ORB_MINI) + return; + + // Select an nearby orb to collect + if (!m_uiStartTimer && !m_bOrbPulled) + { + if (m_creature->GetDistance(pWho) <= MAX_PULL_DISTANCE) + { + m_selectedOrbGuid = pWho->GetObjectGuid(); + m_uiStartTimer = 2000; + } + } + else if (m_bOrbPulled && pWho->GetObjectGuid() == m_selectedOrbGuid && m_creature->IsWithinDistInMap(pWho, 3.5f)) + { + // Despawn the collected orb if close enough + ((Creature*)pWho)->ForcedDespawn(); + + // Give kill credit to the player + if (m_creature->IsTemporarySummon()) + { + TemporarySummon* pTemporary = (TemporarySummon*)m_creature; + + if (Player* pSummoner = m_creature->GetMap()->GetPlayer(pTemporary->GetSummonerGuid())) + pSummoner->KilledMonsterCredit(NPC_KILL_CREDIT_TRIGGER, m_creature->GetObjectGuid()); + } + + // Despawn collector + m_creature->ForcedDespawn(); + } + } + + void UpdateAI(const uint32 uiDiff) override + { + if (m_uiStartTimer) + { + // Start collecting after some delay + if (m_uiStartTimer <= uiDiff) + { + Creature* pSelectedOrb = m_creature->GetMap()->GetCreature(m_selectedOrbGuid); + if (!pSelectedOrb) + return; + + // Orb is pulled fast + pSelectedOrb->SetWalk(false); + + // Move orb to the collector + float fX, fY, fZ;; + pSelectedOrb->GetMotionMaster()->MoveIdle(); + m_creature->GetContactPoint(pSelectedOrb, fX, fY, fZ); + pSelectedOrb->GetMotionMaster()->MovePoint(0, fX, fY, fZ); + + m_bOrbPulled = true; + m_uiStartTimer = 0; + } + else + m_uiStartTimer -= uiDiff; + } + } +}; + +CreatureAI* GetAI_npc_light_orb_collector(Creature* pCreature) +{ + return new npc_light_orb_collectorAI(pCreature); +} + void AddSC_blades_edge_mountains() { Script* pNewScript; @@ -819,4 +914,9 @@ void AddSC_blades_edge_mountains() pNewScript->pEffectDummyNPC = &EffectDummyCreature_npc_simon_game_bunny; pNewScript->pEffectScriptEffectNPC = &EffectScriptEffectCreature_npc_simon_game_bunny; pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_light_orb_collector"; + pNewScript->GetAI = &GetAI_npc_light_orb_collector; + pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 82e21b4ae..0ba639dfb 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3121" + #define SD2_REVISION_NR "3122" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index efac3657a..5241a2df0 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -372,6 +372,7 @@ UPDATE creature_template SET ScriptName='mobs_nether_drake' WHERE entry IN (2002 UPDATE creature_template SET ScriptName='npc_daranelle' WHERE entry=21469; UPDATE creature_template SET ScriptName='npc_bloodmaul_stout_trigger' WHERE entry=21241; UPDATE creature_template SET ScriptName='npc_simon_game_bunny' WHERE entry=22923; +UPDATE creature_template SET ScriptName='npc_light_orb_collector' WHERE entry IN (21926,22333); /* BLASTED LANDS */ UPDATE creature_template SET ScriptName='npc_fallen_hero_of_horde' WHERE entry=7572; diff --git a/sql/updates/r3122_mangos.sql b/sql/updates/r3122_mangos.sql new file mode 100644 index 000000000..dfc66b228 --- /dev/null +++ b/sql/updates/r3122_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_light_orb_collector' WHERE entry IN (21926,22333); From f34bb556f7326bc7e74f03fd3b2a5da8a554f25b Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sun, 19 Apr 2015 23:19:01 +0200 Subject: [PATCH 1137/1172] [3123] Fix Vazruden movement Close #150 --- .../hellfire_ramparts/boss_nazan_and_vazruden.cpp | 6 +++--- sd2_revision_nr.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_nazan_and_vazruden.cpp b/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_nazan_and_vazruden.cpp index e1700985d..689128cc2 100644 --- a/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_nazan_and_vazruden.cpp +++ b/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_nazan_and_vazruden.cpp @@ -193,7 +193,7 @@ struct boss_vazruden_heraldAI : public ScriptedAI void DoMoveToCenter() { DoScriptText(SAY_INTRO, m_creature); - m_creature->GetMotionMaster()->MovePoint(POINT_ID_CENTER, afCenterPos[0], afCenterPos[1], afCenterPos[2]); + m_creature->GetMotionMaster()->MovePoint(POINT_ID_CENTER, afCenterPos[0], afCenterPos[1], afCenterPos[2], false); } void DoSplit() @@ -217,7 +217,7 @@ struct boss_vazruden_heraldAI : public ScriptedAI if (m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() == IDLE_MOTION_TYPE) m_creature->GetMotionMaster()->MovementExpired(false); - m_creature->GetMotionMaster()->MovePoint(POINT_ID_FLYING, fX, fY, fZ); + m_creature->GetMotionMaster()->MovePoint(POINT_ID_FLYING, fX, fY, fZ, false); } void DoMoveToCombat() @@ -228,7 +228,7 @@ struct boss_vazruden_heraldAI : public ScriptedAI m_bIsDescending = true; m_creature->SetWalk(false); - m_creature->GetMotionMaster()->MovePoint(POINT_ID_COMBAT, afCombatPos[0], afCombatPos[1], afCombatPos[2]); + m_creature->GetMotionMaster()->MovePoint(POINT_ID_COMBAT, afCombatPos[0], afCombatPos[1], afCombatPos[2], false); DoScriptText(EMOTE_DESCEND, m_creature); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 0ba639dfb..555bcc4ed 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3122" + #define SD2_REVISION_NR "3123" #endif // __SD2_REVISION_NR_H__ From b788229974caddb8e589ec4533f8655e9554eb61 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sun, 19 Apr 2015 23:31:59 +0200 Subject: [PATCH 1138/1172] [3124] Temporary workaround for the Eye of Acherus model id Thanks to @grz3s More details at #149 Close #149 --- scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp | 1 + sd2_revision_nr.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp b/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp index 9bcbe82ed..b1fb4ac5f 100644 --- a/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp +++ b/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp @@ -1246,6 +1246,7 @@ struct npc_eye_of_acherusAI : public ScriptedAI if (Player* pPlayer = m_creature->GetCharmerOrOwnerPlayerOrPlayerItself()) { + m_creature->SetDisplayId(26320); // HACK remove when correct modelid will be taken by core m_creature->SetPhaseMask(2, true); // HACK remove when summon spells and auras are implemented properly in mangos DoScriptText(EMOTE_DESTIANTION, m_creature, pPlayer); diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 555bcc4ed..f98f1ae4d 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3123" + #define SD2_REVISION_NR "3124" #endif // __SD2_REVISION_NR_H__ From 6970346bd305eb9164853de777a05db0d4c5493d Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sun, 19 Apr 2015 23:48:08 +0200 Subject: [PATCH 1139/1172] [3125] Remove script for quest 12727 Currently handled in DB Please update to UDB 408 with hotfix [119] or YTDB 650. Credit to @grz3s --- .../scarlet_enclave/ebon_hold.cpp | 196 +----------------- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 - sql/scriptdev2_script_full.sql | 25 +-- sql/updates/r3125_mangos.sql | 1 + sql/updates/r3125_scriptdev2.sql | 2 + 6 files changed, 7 insertions(+), 220 deletions(-) create mode 100644 sql/updates/r3125_mangos.sql create mode 100644 sql/updates/r3125_scriptdev2.sql diff --git a/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp b/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp index b1fb4ac5f..61d9b7db5 100644 --- a/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp +++ b/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp @@ -17,7 +17,7 @@ /* ScriptData SDName: Ebon_Hold SD%Complete: 95 -SDComment: Quest support: 12641, 12687, 12698, 12727, 12733, 12739(and 12742 to 12750), 12801, 12848 +SDComment: Quest support: 12641, 12687, 12698, 12733, 12739(and 12742 to 12750), 12801, 12848 SDCategory: Ebon Hold EndScriptData */ @@ -745,189 +745,7 @@ bool EffectDummyCreature_npc_death_knight_initiate(Unit* pCaster, uint32 uiSpell } /*###### -## npc_koltira_deathweaver -######*/ - -enum eKoltira -{ - SAY_BREAKOUT1 = -1609079, - SAY_BREAKOUT2 = -1609080, - SAY_BREAKOUT3 = -1609081, - SAY_BREAKOUT4 = -1609082, - SAY_BREAKOUT5 = -1609083, - SAY_BREAKOUT6 = -1609084, - SAY_BREAKOUT7 = -1609085, - SAY_BREAKOUT8 = -1609086, - SAY_BREAKOUT9 = -1609087, - SAY_BREAKOUT10 = -1609088, - - SPELL_KOLTIRA_TRANSFORM = 52899, - SPELL_ANTI_MAGIC_ZONE = 52894, - - QUEST_BREAKOUT = 12727, - - NPC_CRIMSON_ACOLYTE = 29007, - NPC_HIGH_INQUISITOR_VALROTH = 29001, - NPC_KOLTIRA_ALT = 28447, - - // not sure about this id - // NPC_DEATH_KNIGHT_MOUNT = 29201, - MODEL_DEATH_KNIGHT_MOUNT = 25278 -}; - -struct npc_koltira_deathweaverAI : public npc_escortAI -{ - npc_koltira_deathweaverAI(Creature* pCreature) : npc_escortAI(pCreature) { Reset(); } - - uint32 m_uiWave; - uint32 m_uiWave_Timer; - ObjectGuid m_valrothGuid; - - void Reset() override - { - if (!HasEscortState(STATE_ESCORT_ESCORTING)) - { - m_uiWave = 0; - m_uiWave_Timer = 3000; - m_valrothGuid.Clear(); - } - } - - void WaypointReached(uint32 uiPointId) override - { - switch (uiPointId) - { - case 0: - DoScriptText(SAY_BREAKOUT1, m_creature); - break; - case 1: - m_creature->SetStandState(UNIT_STAND_STATE_KNEEL); - break; - case 2: - m_creature->SetStandState(UNIT_STAND_STATE_STAND); - // m_creature->UpdateEntry(NPC_KOLTIRA_ALT);// unclear if we must update or not - DoCastSpellIfCan(m_creature, SPELL_KOLTIRA_TRANSFORM); - break; - case 3: - SetEscortPaused(true); - m_creature->SetStandState(UNIT_STAND_STATE_KNEEL); - DoScriptText(SAY_BREAKOUT2, m_creature); - DoCastSpellIfCan(m_creature, SPELL_ANTI_MAGIC_ZONE); // cast again that makes bubble up - break; - case 4: - SetRun(true); - break; - case 9: - m_creature->Mount(MODEL_DEATH_KNIGHT_MOUNT); - break; - case 10: - m_creature->Unmount(); - break; - } - } - - void JustSummoned(Creature* pSummoned) override - { - if (Player* pPlayer = GetPlayerForEscort()) - pSummoned->AI()->AttackStart(pPlayer); - - if (pSummoned->GetEntry() == NPC_HIGH_INQUISITOR_VALROTH) - m_valrothGuid = pSummoned->GetObjectGuid(); - } - - void SummonAcolyte(uint32 uiAmount) - { - for (uint32 i = 0; i < uiAmount; ++i) - m_creature->SummonCreature(NPC_CRIMSON_ACOLYTE, 1642.329f, -6045.818f, 127.583f, 0.0f, TEMPSUMMON_TIMED_OOC_DESPAWN, 5000); - } - - void UpdateEscortAI(const uint32 uiDiff) override - { - if (HasEscortState(STATE_ESCORT_PAUSED)) - { - if (m_uiWave_Timer < uiDiff) - { - switch (m_uiWave) - { - case 0: - DoScriptText(SAY_BREAKOUT3, m_creature); - SummonAcolyte(3); - m_uiWave_Timer = 20000; - break; - case 1: - DoScriptText(SAY_BREAKOUT4, m_creature); - SummonAcolyte(3); - m_uiWave_Timer = 20000; - break; - case 2: - DoScriptText(SAY_BREAKOUT5, m_creature); - SummonAcolyte(4); - m_uiWave_Timer = 20000; - break; - case 3: - DoScriptText(SAY_BREAKOUT6, m_creature); - m_creature->SummonCreature(NPC_HIGH_INQUISITOR_VALROTH, 1642.329f, -6045.818f, 127.583f, 0.0f, TEMPSUMMON_TIMED_OOC_DESPAWN, 1000); - m_uiWave_Timer = 1000; - break; - case 4: - { - Creature* pTemp = m_creature->GetMap()->GetCreature(m_valrothGuid); - - if (!pTemp || !pTemp->isAlive()) - { - DoScriptText(SAY_BREAKOUT8, m_creature); - m_uiWave_Timer = 5000; - } - else - { - m_uiWave_Timer = 2500; - return; // return, we don't want m_uiWave to increment now - } - break; - } - case 5: - DoScriptText(SAY_BREAKOUT9, m_creature); - m_creature->RemoveAurasDueToSpell(SPELL_ANTI_MAGIC_ZONE); - m_uiWave_Timer = 2500; - break; - case 6: - DoScriptText(SAY_BREAKOUT10, m_creature); - SetEscortPaused(false); - break; - } - - ++m_uiWave; - } - else - m_uiWave_Timer -= uiDiff; - } - - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - DoMeleeAttackIfReady(); - } -}; - -CreatureAI* GetAI_npc_koltira_deathweaver(Creature* pCreature) -{ - return new npc_koltira_deathweaverAI(pCreature); -} - -bool QuestAccept_npc_koltira_deathweaver(Player* pPlayer, Creature* pCreature, const Quest* pQuest) -{ - if (pQuest->GetQuestId() == QUEST_BREAKOUT) - { - pCreature->SetStandState(UNIT_STAND_STATE_STAND); - - if (npc_koltira_deathweaverAI* pEscortAI = dynamic_cast(pCreature->AI())) - pEscortAI->Start(false, pPlayer, pQuest); - } - return true; -} - -/*###### -## +## npc_unworthy_initiate_anchor ######*/ enum @@ -949,10 +767,6 @@ enum PHASE_ACTIVATE = 2 }; -/*###### -## npc_unworthy_initiate_anchor -######*/ - struct npc_unworthy_initiate_anchorAI : public ScriptedAI { npc_unworthy_initiate_anchorAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } @@ -3025,12 +2839,6 @@ void AddSC_ebon_hold() pNewScript->pEffectDummyNPC = &EffectDummyCreature_npc_death_knight_initiate; pNewScript->RegisterSelf(); - pNewScript = new Script; - pNewScript->Name = "npc_koltira_deathweaver"; - pNewScript->GetAI = &GetAI_npc_koltira_deathweaver; - pNewScript->pQuestAcceptNPC = &QuestAccept_npc_koltira_deathweaver; - pNewScript->RegisterSelf(); - pNewScript = new Script; pNewScript->Name = "npc_unworthy_initiate"; pNewScript->GetAI = &GetAI_npc_unworthy_initiate; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index f98f1ae4d..fab961af2 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3124" + #define SD2_REVISION_NR "3125" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 5241a2df0..932546126 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -596,7 +596,6 @@ UPDATE creature_template SET ScriptName='npc_unworthy_initiate_anchor' WHERE ent UPDATE creature_template SET ScriptName='npc_unworthy_initiate' WHERE entry IN (29519,29520,29565,29566,29567); UPDATE gameobject_template SET ScriptName='go_acherus_soul_prison' WHERE entry IN (191577,191580,191581,191582,191583,191584,191585,191586,191587,191588,191589,191590); UPDATE creature_template SET ScriptName='npc_a_special_surprise' WHERE entry IN (29032,29061,29065,29067,29068,29070,29074,29072,29073,29071); -UPDATE creature_template SET ScriptName='npc_koltira_deathweaver' WHERE entry=28912; UPDATE creature_template SET ScriptName='npc_eye_of_acherus' WHERE entry=28511; UPDATE creature_template SET ScriptName='npc_scarlet_ghoul' WHERE entry=28845; UPDATE creature_template SET ScriptName='npc_highlord_darion_mograine' WHERE entry=29173; diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 14818076e..dd155f9b5 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -4138,16 +4138,7 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1609077,'Do it, $N! Put me out of my misery!',0,0,0,1,'special_surprise SAY_EXEC_WAITING'), (-1609078,'%s dies from his wounds.',0,2,0,0,'special_surprise EMOTE_DIES'), -(-1609079,'I\'ll need to get my runeblade and armor... Just need a little more time.',0,0,0,399,'koltira SAY_BREAKOUT1'), -(-1609080,'I\'m still weak, but I think I can get an anti-magic barrier up. Stay inside it or you\'ll be destroyed by their spells.',0,0,0,0,'koltira SAY_BREAKOUT2'), -(-1609081,'Maintaining this barrier will require all of my concentration. Kill them all!',0,0,0,16,'koltira SAY_BREAKOUT3'), -(-1609082,'There are more coming. Defend yourself! Don\'t fall out of the anti-magic field! They\'ll tear you apart without its protection!',0,0,0,0,'koltira SAY_BREAKOUT4'), -(-1609083,'I can\'t keep barrier up much longer... Where is that coward?',0,0,0,0,'koltira SAY_BREAKOUT5'), -(-1609084,'The High Inquisitor comes! Be ready, death knight! Do not let him draw you out of the protective bounds of my anti-magic field! Kill him and take his head!',0,0,0,0,'koltira SAY_BREAKOUT6'), -(-1609085,'Stay in the anti-magic field! Make them come to you!',0,0,0,0,'koltira SAY_BREAKOUT7'), -(-1609086,'The death of the High Inquisitor of New Avalon will not go unnoticed. You need to get out of here at once! Go, before more of them show up. I\'ll be fine on my own.',0,0,0,0,'koltira SAY_BREAKOUT8'), -(-1609087,'I\'ll draw their fire, you make your escape behind me.',0,0,0,0,'koltira SAY_BREAKOUT9'), -(-1609088,'Your High Inquisitor is nothing more than a pile of meat, Crusaders! There are none beyond the grasp of the Scourge!',0,1,0,0,'koltira SAY_BREAKOUT10'), +-- PLEASE RE-USE -1609079 to -1609088 (-1609089,'The Eye of Acherus launches towards its destination',0,3,0,0,'eye of acherus EMOTE_DESTIANTION'), (-1609090,'The Eye of Acherus is in your control',0,3,0,0,'eye of acherus EMOTE_CONTROL'), @@ -6916,20 +6907,6 @@ INSERT INTO script_waypoint (entry, pointid, location_x, location_y, location_z, (28787, 21, 5824.738770, 5315.712891, -97.758018, 0, ''), (28787, 22, 5819.650879, 5305.409668, -97.481796, 10000, 'SAY_HELICE_COMPLETE'); -DELETE FROM script_waypoint WHERE entry=28912; -INSERT INTO script_waypoint VALUES -(28912, 0, 1653.518, -6038.374, 127.585, 0, 'Jump off'), -(28912, 1, 1653.978, -6034.614, 127.585, 5000, 'To Box'), -(28912, 2, 1653.854, -6034.726, 127.585, 500, 'Equip'), -(28912, 3, 1652.297, -6035.671, 127.585, 3000, 'Recover'), -(28912, 4, 1639.762, -6046.343, 127.948, 0, 'Escape'), -(28912, 5, 1640.963, -6028.119, 134.740, 0, ''), -(28912, 6, 1625.805, -6029.197, 134.740, 0, ''), -(28912, 7, 1626.845, -6015.085, 134.740, 0, ''), -(28912, 8, 1649.150, -6016.975, 133.240, 0, ''), -(28912, 9, 1653.063, -5974.844, 132.652, 5000, 'Mount'), -(28912, 10, 1654.747, -5926.424, 121.191, 0, 'Disappear'); - DELETE FROM script_waypoint WHERE entry=30658; INSERT INTO script_waypoint VALUES (30658, 0, 1830.504517, 799.356506, 44.341801, 5000, 'use activation'), diff --git a/sql/updates/r3125_mangos.sql b/sql/updates/r3125_mangos.sql new file mode 100644 index 000000000..f3997130d --- /dev/null +++ b/sql/updates/r3125_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='' WHERE entry=28912; diff --git a/sql/updates/r3125_scriptdev2.sql b/sql/updates/r3125_scriptdev2.sql new file mode 100644 index 000000000..83e92b62a --- /dev/null +++ b/sql/updates/r3125_scriptdev2.sql @@ -0,0 +1,2 @@ +DELETE FROM script_waypoint WHERE entry=28912; +DELETE FROM script_texts WHERE entry BETWEEN -1609088 AND -1609079; From 327097b2f415b18ea695852321ba60fd75a83f2f Mon Sep 17 00:00:00 2001 From: Xfurry Date: Mon, 20 Apr 2015 01:04:21 +0200 Subject: [PATCH 1140/1172] [3126] Improve quest 12754 Thanks to @grz3s for providing the data Close #146 --- .../scarlet_enclave/ebon_hold.cpp | 133 +++++++++++++++++- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 + sql/scriptdev2_script_full.sql | 5 +- sql/updates/r3126_mangos.sql | 1 + sql/updates/r3126_scriptdev2.sql | 4 + 6 files changed, 143 insertions(+), 3 deletions(-) create mode 100644 sql/updates/r3126_mangos.sql create mode 100644 sql/updates/r3126_scriptdev2.sql diff --git a/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp b/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp index 61d9b7db5..8e02df738 100644 --- a/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp +++ b/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp @@ -17,7 +17,7 @@ /* ScriptData SDName: Ebon_Hold SD%Complete: 95 -SDComment: Quest support: 12641, 12687, 12698, 12733, 12739(and 12742 to 12750), 12801, 12848 +SDComment: Quest support: 12641, 12687, 12698, 12733, 12739(and 12742 to 12750), 12754, 12801, 12848 SDCategory: Ebon Hold EndScriptData */ @@ -32,12 +32,14 @@ npc_scarlet_ghoul npc_highlord_darion_mograine npc_fellow_death_knight npc_acherus_deathcharger +npc_scarlet_courier EndContentData */ #include "precompiled.h" #include "escort_ai.h" #include "world_map_ebon_hold.h" #include "pet_ai.h" +#include "TemporarySummon.h" /*###### ## npc_a_special_surprise @@ -2822,6 +2824,130 @@ bool EffectDummyCreature_npc_acherus_deathcharger(Unit* /*pCaster*/, uint32 uiSp return false; } +/*###### +## npc_scarlet_courier +######*/ + +enum +{ + SAY_TREE_1 = -1609079, + SAY_TREE_2 = -1609080, + + GO_TREE = 191144, +}; + +struct npc_scarlet_courierAI : public ScriptedAI +{ + npc_scarlet_courierAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } + + uint32 m_uiInitTimer; + uint32 m_uiCombatTimer; + uint8 m_uiCombatStage; + + void Reset() override + { + m_uiInitTimer = 2000; + m_uiCombatTimer = 0; + m_uiCombatStage = 0; + } + + void AttackedBy(Unit* /*pAttacker*/) override + { + m_creature->Unmount(); + } + + void JustReachedHome() override + { + m_creature->ForcedDespawn(); + DoDespawnTree(); + } + + void JustDied(Unit* /*pKiller*/) override + { + DoDespawnTree(); + } + + void MovementInform(uint32 uiType, uint32 uiPointId) override + { + if (uiType != POINT_MOTION_TYPE || !uiPointId) + return; + + m_uiCombatTimer = 5000; + } + + // Wrapper function that despawns the tree + void DoDespawnTree() + { + if (GameObject* pTree = GetClosestGameObjectWithEntry(m_creature, GO_TREE, 30.0f)) + pTree->SetLootState(GO_JUST_DEACTIVATED); + } + + void UpdateAI(const uint32 uiDiff) override + { + // walk to the tree + if (m_uiInitTimer) + { + if (m_uiInitTimer <= uiDiff) + { + DoScriptText(SAY_TREE_1, m_creature); + + float fX, fY, fZ; + if (GameObject* pTree = GetClosestGameObjectWithEntry(m_creature, GO_TREE, 30.0f)) + { + pTree->GetContactPoint(m_creature, fX, fY, fZ); + m_creature->GetMotionMaster()->MovePoint(1, fX, fY, fZ); + } + + m_uiInitTimer = 0; + } + else + m_uiInitTimer -= uiDiff; + } + + // despawn tree and start combat + if (m_uiCombatTimer) + { + if (m_uiCombatTimer <= uiDiff) + { + switch (m_uiCombatStage) + { + case 0: + DoScriptText(SAY_TREE_2, m_creature); + m_creature->Unmount(); + DoDespawnTree(); + + m_uiCombatTimer = 3000; + break; + case 1: + if (m_creature->IsTemporarySummon()) + { + TemporarySummon* pTemporary = (TemporarySummon*)m_creature; + + if (Player* pSummoner = m_creature->GetMap()->GetPlayer(pTemporary->GetSummonerGuid())) + m_creature->AI()->AttackStart(pSummoner); + } + + m_uiCombatTimer = 0; + break; + } + ++m_uiCombatStage; + } + else + m_uiCombatTimer -= uiDiff; + } + + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_npc_scarlet_courier(Creature* pCreature) +{ + return new npc_scarlet_courierAI(pCreature); +} + void AddSC_ebon_hold() { Script* pNewScript; @@ -2887,4 +3013,9 @@ void AddSC_ebon_hold() pNewScript->GetAI = &GetAI_npc_acherus_deathcharger; pNewScript->pEffectDummyNPC = &EffectDummyCreature_npc_acherus_deathcharger; pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_scarlet_courier"; + pNewScript->GetAI = &GetAI_npc_scarlet_courier; + pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index fab961af2..6dc9f0ea4 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3125" + #define SD2_REVISION_NR "3126" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 932546126..28b9c8b0f 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -602,6 +602,7 @@ UPDATE creature_template SET ScriptName='npc_highlord_darion_mograine' WHERE ent UPDATE creature_template SET ScriptName='npc_fellow_death_knight' WHERE entry IN (29199, 29204, 29200); UPDATE creature_template SET ScriptName='npc_lich_king_light_dawn' WHERE entry=29183; UPDATE creature_template SET ScriptName='npc_acherus_deathcharger' WHERE entry=28782; +UPDATE creature_template SET ScriptName='npc_scarlet_courier' WHERE entry=29076; /* ELWYNN FOREST */ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index dd155f9b5..0a32594e9 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -4138,7 +4138,10 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1609077,'Do it, $N! Put me out of my misery!',0,0,0,1,'special_surprise SAY_EXEC_WAITING'), (-1609078,'%s dies from his wounds.',0,2,0,0,'special_surprise EMOTE_DIES'), --- PLEASE RE-USE -1609079 to -1609088 +(-1609079,'Hrm, what a strange tree. I must investigate.',0,0,0,1,'scarlet courier SAY_TREE_1'), +(-1609080,'What\'s this!? This isn\'t a tree at all! Guards! Guards!',0,0,0,5,'scarlet courier SAY_TREE_2'), + +-- PLEASE RE-USE -1609081 to -1609088 (-1609089,'The Eye of Acherus launches towards its destination',0,3,0,0,'eye of acherus EMOTE_DESTIANTION'), (-1609090,'The Eye of Acherus is in your control',0,3,0,0,'eye of acherus EMOTE_CONTROL'), diff --git a/sql/updates/r3126_mangos.sql b/sql/updates/r3126_mangos.sql new file mode 100644 index 000000000..8973f6f32 --- /dev/null +++ b/sql/updates/r3126_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_scarlet_courier' WHERE entry=29076; diff --git a/sql/updates/r3126_scriptdev2.sql b/sql/updates/r3126_scriptdev2.sql new file mode 100644 index 000000000..08c8fddf6 --- /dev/null +++ b/sql/updates/r3126_scriptdev2.sql @@ -0,0 +1,4 @@ +DELETE FROM script_texts WHERE entry IN (-1609079,-1609080); +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1609079,'Hrm, what a strange tree. I must investigate.',0,0,0,1,'scarlet courier SAY_TREE_1'), +(-1609080,'What\'s this!? This isn\'t a tree at all! Guards! Guards!',0,0,0,5,'scarlet courier SAY_TREE_2'); From c3af18311cd015e89a18b02227e45576e7e0891f Mon Sep 17 00:00:00 2001 From: Xfurry Date: Mon, 20 Apr 2015 22:15:55 +0200 Subject: [PATCH 1141/1172] [3127] Replace Princess Moria with Priestess of Thaurissan if required - BRD Also cleanup script for Emperor Dagran Thaurissan Close #138 --- .../blackrock_depths/blackrock_depths.h | 5 + .../boss_emperor_dagran_thaurissan.cpp | 96 +++++++++---------- .../instance_blackrock_depths.cpp | 27 +++++- sd2_revision_nr.h | 2 +- 4 files changed, 77 insertions(+), 53 deletions(-) diff --git a/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.h b/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.h index 8d6920059..f9fea794c 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.h +++ b/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.h @@ -23,6 +23,7 @@ enum NPC_EMPEROR = 9019, NPC_PRINCESS = 8929, + NPC_PRIESTESS = 10076, NPC_PHALANX = 9502, NPC_HATEREL = 9034, NPC_ANGERREL = 9035, @@ -80,6 +81,9 @@ enum GO_DWARFRUNE_F01 = 170583, GO_DWARFRUNE_G01 = 170584, + QUEST_ROYAL_RESCUE = 4003, // horde quest + QUEST_FATE_KINGDOM = 4362, // alliance quest + SPELL_STONED = 10255, // Aura of Warbringer Constructs in Relict Vault FACTION_DWARF_HOSTILE = 754, // Hostile faction for the Tomb of the Seven dwarfs @@ -157,6 +161,7 @@ class instance_blackrock_depths : public ScriptedInstance private: void DoCallNextDwarf(); + bool CanReplacePrincess(); uint32 m_auiEncounter[MAX_ENCOUNTER]; std::string m_strInstData; diff --git a/scripts/eastern_kingdoms/blackrock_depths/boss_emperor_dagran_thaurissan.cpp b/scripts/eastern_kingdoms/blackrock_depths/boss_emperor_dagran_thaurissan.cpp index 0b87eaf55..57ed0ecb3 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/boss_emperor_dagran_thaurissan.cpp +++ b/scripts/eastern_kingdoms/blackrock_depths/boss_emperor_dagran_thaurissan.cpp @@ -44,15 +44,13 @@ struct boss_emperor_dagran_thaurissanAI : public ScriptedAI ScriptedInstance* m_pInstance; - uint32 m_uiHandOfThaurissan_Timer; - uint32 m_uiAvatarOfFlame_Timer; - // uint32 m_uiCounter; + uint32 m_uiHandOfThaurissanTimer; + uint32 m_uiAvatarOfFlameTimer; void Reset() override { - m_uiHandOfThaurissan_Timer = 4000; - m_uiAvatarOfFlame_Timer = 25000; - // m_uiCounter = 0; + m_uiHandOfThaurissanTimer = 4000; + m_uiAvatarOfFlameTimer = 25000; } void Aggro(Unit* /*pWho*/) override @@ -68,6 +66,10 @@ struct boss_emperor_dagran_thaurissanAI : public ScriptedAI if (Creature* pPrincess = m_pInstance->GetSingleCreatureFromStorage(NPC_PRINCESS)) { + // check if we didn't update the entry + if (pPrincess->GetEntry() != NPC_PRINCESS) + return; + if (pPrincess->isAlive()) { pPrincess->SetFactionTemporary(FACTION_NEUTRAL, TEMPFACTION_NONE); @@ -86,34 +88,25 @@ struct boss_emperor_dagran_thaurissanAI : public ScriptedAI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - if (m_uiHandOfThaurissan_Timer < uiDiff) + if (m_uiHandOfThaurissanTimer < uiDiff) { if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) - DoCastSpellIfCan(pTarget, SPELL_HANDOFTHAURISSAN); - - // 3 Hands of Thaurissan will be casted - // if (m_uiCounter < 3) - //{ - // m_uiHandOfThaurissan_Timer = 1000; - // ++m_uiCounter; - //} - // else - //{ - m_uiHandOfThaurissan_Timer = 5000; - // m_uiCounter = 0; - //} + { + if (DoCastSpellIfCan(pTarget, SPELL_HANDOFTHAURISSAN) == CAST_OK) + m_uiHandOfThaurissanTimer = 5000; + } } else - m_uiHandOfThaurissan_Timer -= uiDiff; + m_uiHandOfThaurissanTimer -= uiDiff; // AvatarOfFlame_Timer - if (m_uiAvatarOfFlame_Timer < uiDiff) + if (m_uiAvatarOfFlameTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_AVATAROFFLAME); - m_uiAvatarOfFlame_Timer = 18000; + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_AVATAROFFLAME) == CAST_OK) + m_uiAvatarOfFlameTimer = 18000; } else - m_uiAvatarOfFlame_Timer -= uiDiff; + m_uiAvatarOfFlameTimer -= uiDiff; DoMeleeAttackIfReady(); } @@ -150,17 +143,17 @@ struct boss_moira_bronzebeardAI : public ScriptedAI ScriptedInstance* m_pInstance; - uint32 m_uiHeal_Timer; - uint32 m_uiMindBlast_Timer; - uint32 m_uiShadowWordPain_Timer; - uint32 m_uiSmite_Timer; + uint32 m_uiHealTimer; + uint32 m_uiMindBlastTimer; + uint32 m_uiShadowWordPainTimer; + uint32 m_uiSmiteTimer; void Reset() override { - m_uiHeal_Timer = 12000; // These times are probably wrong - m_uiMindBlast_Timer = 16000; - m_uiShadowWordPain_Timer = 2000; - m_uiSmite_Timer = 8000; + m_uiHealTimer = 12000; // These times are probably wrong + m_uiMindBlastTimer = 16000; + m_uiShadowWordPainTimer = 2000; + m_uiSmiteTimer = 8000; } void AttackStart(Unit* pWho) override @@ -183,7 +176,7 @@ struct boss_moira_bronzebeardAI : public ScriptedAI { // if evade, then check if he is alive. If not, start make portal if (!pEmperor->isAlive()) - m_creature->CastSpell(m_creature, SPELL_OPEN_PORTAL, false); + DoCastSpellIfCan(m_creature, SPELL_OPEN_PORTAL); } } } @@ -195,45 +188,46 @@ struct boss_moira_bronzebeardAI : public ScriptedAI return; // MindBlast_Timer - if (m_uiMindBlast_Timer < uiDiff) + if (m_uiMindBlastTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_MINDBLAST); - m_uiMindBlast_Timer = 14000; + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_MINDBLAST) == CAST_OK) + m_uiMindBlastTimer = 14000; } else - m_uiMindBlast_Timer -= uiDiff; + m_uiMindBlastTimer -= uiDiff; // ShadowWordPain_Timer - if (m_uiShadowWordPain_Timer < uiDiff) + if (m_uiShadowWordPainTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_SHADOWWORDPAIN); - m_uiShadowWordPain_Timer = 18000; + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_SHADOWWORDPAIN) == CAST_OK) + m_uiShadowWordPainTimer = 18000; } else - m_uiShadowWordPain_Timer -= uiDiff; + m_uiShadowWordPainTimer -= uiDiff; // Smite_Timer - if (m_uiSmite_Timer < uiDiff) + if (m_uiSmiteTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_SMITE); - m_uiSmite_Timer = 10000; + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_SMITE) == CAST_OK) + m_uiSmiteTimer = 10000; } else - m_uiSmite_Timer -= uiDiff; + m_uiSmiteTimer -= uiDiff; // Heal_Timer - if (m_uiHeal_Timer < uiDiff) + if (m_uiHealTimer < uiDiff) { if (Creature* pEmperor = m_pInstance->GetSingleCreatureFromStorage(NPC_EMPEROR)) { if (pEmperor->isAlive() && pEmperor->GetHealthPercent() != 100.0f) - DoCastSpellIfCan(pEmperor, SPELL_HEAL); + { + if (DoCastSpellIfCan(pEmperor, SPELL_HEAL) == CAST_OK) + m_uiHealTimer = 10000; + } } - - m_uiHeal_Timer = 10000; } else - m_uiHeal_Timer -= uiDiff; + m_uiHealTimer -= uiDiff; // No meele? } diff --git a/scripts/eastern_kingdoms/blackrock_depths/instance_blackrock_depths.cpp b/scripts/eastern_kingdoms/blackrock_depths/instance_blackrock_depths.cpp index 984a5ea37..ee87d339a 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/instance_blackrock_depths.cpp +++ b/scripts/eastern_kingdoms/blackrock_depths/instance_blackrock_depths.cpp @@ -46,8 +46,12 @@ void instance_blackrock_depths::OnCreatureCreate(Creature* pCreature) { switch (pCreature->GetEntry()) { - case NPC_EMPEROR: case NPC_PRINCESS: + // replace the princess if required + if (CanReplacePrincess()) + pCreature->UpdateEntry(NPC_PRIESTESS); + // no break; + case NPC_EMPEROR: case NPC_PHALANX: case NPC_HATEREL: case NPC_ANGERREL: @@ -400,6 +404,27 @@ void instance_blackrock_depths::DoCallNextDwarf() ++m_uiDwarfRound; } +// function that replaces the princess if requirements are met +bool instance_blackrock_depths::CanReplacePrincess() +{ + Map::PlayerList const& players = instance->GetPlayers(); + if (players.isEmpty()) + return false; + + for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr) + { + if (Player* pPlayer = itr->getSource()) + { + // if at least one player didn't complete the quest, return false + if ((pPlayer->GetTeam() == ALLIANCE && !pPlayer->GetQuestRewardStatus(QUEST_FATE_KINGDOM)) + || (pPlayer->GetTeam() == HORDE && !pPlayer->GetQuestRewardStatus(QUEST_ROYAL_RESCUE))) + return false; + } + } + + return true; +} + void instance_blackrock_depths::Update(uint32 uiDiff) { if (m_uiDwarfFightTimer) diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 6dc9f0ea4..26b823742 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3126" + #define SD2_REVISION_NR "3127" #endif // __SD2_REVISION_NR_H__ From 00d5fcf80e0a5c20b0736011784b05124c8c6a8e Mon Sep 17 00:00:00 2001 From: Xfurry Date: Mon, 20 Apr 2015 22:57:02 +0200 Subject: [PATCH 1142/1172] [3128] Fix some small details on quest 836 Close #140 --- scripts/eastern_kingdoms/hinterlands.cpp | 19 ++++++++++++++++++- sd2_revision_nr.h | 2 +- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/scripts/eastern_kingdoms/hinterlands.cpp b/scripts/eastern_kingdoms/hinterlands.cpp index 920a44d29..ce9560ea5 100644 --- a/scripts/eastern_kingdoms/hinterlands.cpp +++ b/scripts/eastern_kingdoms/hinterlands.cpp @@ -51,7 +51,13 @@ struct npc_00x09hlAI : public npc_escortAI { npc_00x09hlAI(Creature* pCreature) : npc_escortAI(pCreature) { Reset(); } - void Reset() override { } + uint8 m_uiSummonCount; + + void Reset() override + { + if (!HasEscortState(STATE_ESCORT_ESCORTING)) + m_uiSummonCount = 0; + } void WaypointReached(uint32 uiPointId) override { @@ -76,24 +82,35 @@ struct npc_00x09hlAI : public npc_escortAI switch (uiPointId) { case 27: + if (m_uiSummonCount >= 3) + break; + for (uint8 i = 0; i < 3; ++i) { float fX, fY, fZ; m_creature->GetRandomPoint(147.927444f, -3851.513428f, 130.893f, 7.0f, fX, fY, fZ); m_creature->SummonCreature(NPC_MARAUDING_OWL, fX, fY, fZ, 0.0f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 25000); + ++m_uiSummonCount; } break; case 44: + if (m_uiSummonCount >= 6) + break; + for (uint8 i = 0; i < 3; ++i) { float fX, fY, fZ; m_creature->GetRandomPoint(-141.151581f, -4291.213867f, 120.130f, 7.0f, fX, fY, fZ); m_creature->SummonCreature(NPC_VILE_AMBUSHER, fX, fY, fZ, 0.0f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 25000); + ++m_uiSummonCount; } break; } + + // make sure we always have the right stand state + m_creature->SetStandState(UNIT_STAND_STATE_STAND); } void Aggro(Unit* pWho) override diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 26b823742..e1b27b24c 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3127" + #define SD2_REVISION_NR "3128" #endif // __SD2_REVISION_NR_H__ From 84bc311f24bf4826b3acabeb0a393bc2f29afef2 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Fri, 1 May 2015 19:14:23 +0200 Subject: [PATCH 1143/1172] [3129] Implement combat abilities for the Faction Champions - ToC25 --- .../boss_faction_champions.cpp | 1225 ++++++++++++++--- .../trial_of_the_crusader/boss_jaraxxus.cpp | 3 - .../instance_trial_of_the_crusader.cpp | 14 + .../trial_of_the_crusader.h | 2 + sd2_revision_nr.h | 2 +- 5 files changed, 1060 insertions(+), 186 deletions(-) diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_faction_champions.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_faction_champions.cpp index e9abe9e8d..a2256d7c8 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_faction_champions.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_faction_champions.cpp @@ -37,6 +37,213 @@ enum SAY_VARIAN_PVP_H_SLAY_4 = -1649055, SPELL_PVP_TRINKET = 65547, + + // AI type defines + AI_TYPE_MELEE = 1, + AI_TYPE_RANGED = 2, + AI_TYPE_HEALER = 3, + + // misc + TARGET_TYPE_RANDOM = 0, + TARGET_TYPE_VICTIM = 1, + TARGET_TYPE_SELF = 2, + TARGET_TYPE_FRIENDLY = 3, + + CRUSADER_AIEVENT_THROW_RADIUS = 30, + CRUSADER_HEALTH_STEPS = 3, + + + // druid restoration spells + SPELL_THORNS = 66068, // aggro spell + SPELL_BARKSKIN = 65860, + SPELL_NATURES_GRASP = 66071, + SPELL_TRANQUILITY = 66086, + SPELL_LIFEBLOOM = 66093, + SPELL_NOURISH = 66066, + SPELL_REGROWTH = 66067, + SPELL_REJUVENATION = 66065, + + MAX_DRUID_RESTO_SPELLS = 7, + + + // paladin holy spells + SPELL_CLEANSE = 66116, // event spell + SPELL_DIVINE_SHIELD = 66010, + SPELL_FLASH_OF_LIGHT = 66113, + SPELL_FLASH_HEAL = 66104, + SPELL_HOLY_LIGHT = 66112, + SPELL_HAND_OF_PROTECTION = 66009, + SPELL_HAND_OF_FREEDOM = 68757, + SPELL_HOLY_SHOCK = 66114, + SPELL_HAMMER_OF_JUSTICE = 66613, + + MAX_PALADIN_HOLY_SPELLS = 8, + + + // priest discipline spells + SPELL_DISPEL_MAGIC = 65546, + // SPELL_FLASH_HEAL = 66104, // already defined + SPELL_PENANCE = 66097, // triggers 66098 + SPELL_POWER_WORD_SHIELD = 66099, + SPELL_RENEW = 66177, + SPELL_MANA_BURN = 66100, + SPELL_PSYCHIC_SCREAM = 65543, + + MAX_PRIEST_DISC_SPELLS = 7, + + + // shaman restoration spells + SPELL_CLEANSE_SPIRIT = 66056, + SPELL_EARTH_SHIELD = 66063, // triggers 66064 + SPELL_HEX = 66054, + SPELL_LESSER_HEALING_WAVE = 66055, + SPELL_RIPTIDE = 66053, + SPELL_HEROISM = 65983, + SPELL_BLOODLUST = 65980, // replace heroism for horde crusaders + SPELL_EARTH_SHOCK = 65973, + + MAX_SHAMAN_RESTO_SPELLS = 7, + + + // druid balance spells + // SPELL_BARKSKIN = 65860, // already defined + SPELL_CYCLONE = 65859, + SPELL_ENTANGLING_ROOTS = 65857, + SPELL_FAERIE_FIRE = 65863, + SPELL_FORCE_OF_NATURE = 65861, + SPELL_INSECT_SWARM = 65855, + SPELL_MOONFIRE = 65856, + SPELL_STARFIRE = 65854, + SPELL_WRATH = 65862, + + MAX_DRUID_BALANCE_SPELLS = 9, + + + // hunter spells + SPELL_CALL_PET = 67777, // aggro spell + SPELL_AIMED_SHOT = 65883, + SPELL_DETERRENCE = 65871, + SPELL_DISENGAGE = 65869, // triggers 65870 + SPELL_EXPLOSIVE_SHOT = 65866, + SPELL_FROST_TRAP = 65880, + SPELL_SHOOT = 65868, + SPELL_STEADY_SHOT = 65867, + SPELL_WING_CLIP = 66207, + SPELL_WYVERN_STING = 65877, // triggers 65878 on remove + + MAX_HUNTER_SPELLS = 9, + + + // mage spells + SPELL_ARCANE_BARRAGE = 65799, + SPELL_ARCANE_BLAST = 65791, + SPELL_ARCANE_EXPLOSION = 65800, + SPELL_BLINK = 65793, + SPELL_COUNTERSPELL = 65790, + SPELL_FROST_NOVA = 65792, + SPELL_FROSTBOLT = 65807, + SPELL_ICE_BLOCK = 65802, + SPELL_POLYMORPH = 65801, + + MAX_MAGE_SPELLS = 9, + + + // priest shadow spells + SPELL_DISPERSION = 65544, + SPELL_MIND_BLAST = 65492, + SPELL_MIND_FLAY = 65488, + SPELL_PSYCHIC_HORROR = 65545, + // SPELL_PSYCHIC_SCREAM = 65543, // already defined + SPELL_SHADOW_WORD_PAIN = 65541, + SPELL_SILENCE = 65542, + SPELL_VAMPIRIC_TOUCH = 65490, + SPELL_DISPEL = 65546, // event spell + + MAX_PRIEST_DAMAGE_SPELLS = 8, + + + // warlock spells + SPELL_SUMMON_FELHUNTER = 67514, // aggro spell + SPELL_CORRUPTION = 65810, + SPELL_CURSE_OF_AGONY = 65814, + SPELL_CURSE_OF_EXHAUSTION = 65815, + SPELL_DEATH_COIL_WARLOCK = 65820, + SPELL_FEAR = 65809, + SPELL_HELLFIRE = 65816, + SPELL_SEARING_PAIN = 65819, + SPELL_SHADOW_BOLT = 65821, + SPELL_UNSTABLE_AFFLICTION = 65812, + + MAX_WARLOCK_SPELLS = 9, + + + // death knight spells + SPELL_CHAINS_OF_ICE = 66020, + SPELL_DEATH_COIL = 66019, + SPELL_DEATH_GRIP = 66017, + SPELL_FROST_STRIKE = 66047, + SPELL_ICEBOUND_FORTITUDE = 66023, + SPELL_ICY_TOUCH = 66021, // triggers 67767 + SPELL_STRANGULATE = 66018, + + MAX_DEATH_KNIGHT_SPELLS = 7, + + + // warrior spells + SPELL_BLADESTORM = 65947, + SPELL_CHARGE = 65927, + SPELL_DISARM = 65935, + SPELL_INTIMIDATING_SHOUT = 65931, + SPELL_MORTAL_STRIKE = 65926, + SPELL_OVERPOWER = 65924, + SPELL_RETALIATION = 65932, + SPELL_SHATTERING_THROW = 65940, + SPELL_SUNDER_ARMOR = 65936, + + MAX_WARRIOR_SPELLS = 9, + + + // paladin retribution spells + SPELL_SEAL_OF_COMMAND = 66004, // aggro spell + SPELL_AVENGING_WRATH = 66011, + SPELL_CRUSADER_STRIKE = 66003, + SPELL_DIVINE_STORM = 66006, + SPELL_HAMMER_OF_JUSTICE_RETRI = 66007, + SPELL_JUDGEMENT_OF_COMMAND = 66005, + SPELL_REPENTANCE = 66008, + + MAX_PALADIN_DAMAGE_SPELLS = 6, + + + // shaman enhancement spells + //SPELL_EARTH_SHOCK = 65973, // already defined + //SPELL_HEROISM = 65983, // already defined + SPELL_LAVA_LASH = 65974, + SPELL_MAELSTROM_WEAPON = 65986, + SPELL_STORMSTRIKE = 65970, + SPELL_WINDFURY = 65976, + + MAX_SHAMAN_DAMAGE_SPELLS = 6, + + + // rogue spells + SPELL_BLADE_FURRY = 65956, + SPELL_BLIND = 65960, + SPELL_CLOAK_OF_SHADOWS = 65961, + SPELL_EVISCERATE = 65957, + SPELL_FAN_OF_KNIVES = 65955, + SPELL_HEMORRHAGE = 65954, + SPELL_SHADOWSTEP = 66178, + SPELL_WOUND_POISON = 65962, + + MAX_ROGUE_SPELLS = 8, +}; + +struct CrusaderAbilityStruct +{ + uint32 m_uiSpellId, m_uiTargetType; + uint32 m_uiInitialTimer, m_uiCooldown, m_uiMinHealth; + SelectFlags m_selectFlag; }; /*###### @@ -45,16 +252,48 @@ enum struct trial_crusader_commonAI : public ScriptedAI { - trial_crusader_commonAI(Creature* pCreature) : ScriptedAI(pCreature) + trial_crusader_commonAI(Creature* pCreature, CrusaderAbilityStruct const* pAbilityArray, uint32 uiMaxAbilities) : ScriptedAI(pCreature), + m_pAbilityArray(pAbilityArray), + m_uiMaxAbilities(uiMaxAbilities) { m_pInstance = (instance_trial_of_the_crusader*)pCreature->GetInstanceData(); + m_uiSpellTimer.resize(m_uiMaxAbilities); Reset(); } instance_trial_of_the_crusader* m_pInstance; + CrusaderAbilityStruct const* m_pAbilityArray; + + uint32 m_uiResetThreatTimer; + uint32 m_uiIsCCTimer; + uint32 m_uiTrinketTimer; + uint32 m_uiTrinketCooldownTimer; + + uint32 m_uiThrowAIEventStep; + + uint8 m_uiAIType; + + uint32 m_uiAbilityTimer; + uint32 m_uiMaxAbilities; + std::vector m_uiSpellTimer; void Reset() override { + // NOTE: + // These guys does not follow normal threat system rules + // For later development, some alternative threat system should be made + // We do not know what this system is based upon, but one theory is class (healers=high threat, dps=medium, etc) + // We reset their threat frequently as an alternative until such a system exist + m_uiResetThreatTimer = urand(5000, 15000); + m_uiIsCCTimer = 2000; + m_uiTrinketCooldownTimer = 0; + + m_uiThrowAIEventStep = 0; + + m_uiAbilityTimer = 2000; + + for (uint8 i = 0; i < m_uiMaxAbilities; ++i) + m_uiSpellTimer[i] = m_pAbilityArray[i].m_uiInitialTimer; } void MoveInLineOfSight(Unit* pWho) override @@ -70,10 +309,30 @@ struct trial_crusader_commonAI : public ScriptedAI if (m_pInstance) { if (m_pInstance->GetData(TYPE_FACTION_CHAMPIONS) != IN_PROGRESS) + { m_pInstance->SetData(TYPE_FACTION_CHAMPIONS, IN_PROGRESS); + m_pInstance->DoSetCrusadersInCombat(pWho); + } } } + void AttackStart(Unit* pWho) override + { + // ranged and healer AI have ranged attack + if (m_uiAIType == AI_TYPE_HEALER || m_uiAIType == AI_TYPE_RANGED) + { + if (m_creature->Attack(pWho, true)) + { + m_creature->AddThreat(pWho); + m_creature->SetInCombatWith(pWho); + pWho->SetInCombatWith(m_creature); + DoStartMovement(pWho, 15.0f); + } + } + else + ScriptedAI::AttackStart(pWho); + } + void KilledUnit(Unit* pVictim) override { if (!m_pInstance) @@ -101,6 +360,83 @@ struct trial_crusader_commonAI : public ScriptedAI } } + void DamageTaken(Unit* pDealer, uint32& uiDamage) override + { + uint32 uiStep = m_uiThrowAIEventStep != 100 ? m_uiThrowAIEventStep : 0; + if (uiStep < CRUSADER_HEALTH_STEPS) + { + // Throw at 90%, 50% and 10% health + float fHealthSteps[CRUSADER_HEALTH_STEPS] = { 90.0f, 50.0f, 10.0f }; + float fNewHealthPercent = (m_creature->GetHealth() - uiDamage) * 100.0f / m_creature->GetMaxHealth(); + AIEventType sendEvent[CRUSADER_HEALTH_STEPS] = { AI_EVENT_LOST_SOME_HEALTH, AI_EVENT_LOST_HEALTH, AI_EVENT_CRITICAL_HEALTH }; + + if (fNewHealthPercent > fHealthSteps[uiStep]) + return; // Not reached the next mark + + // search for highest reached mark (with actual event attached) + for (uint32 i = CRUSADER_HEALTH_STEPS - 1; i > uiStep; --i) + { + if (fNewHealthPercent < fHealthSteps[i]) + { + uiStep = i; + break; + } + } + + // send event around and to self + SendAIEventAround(sendEvent[uiStep], pDealer, 0, CRUSADER_AIEVENT_THROW_RADIUS); + SendAIEvent(sendEvent[uiStep], pDealer, m_creature); + m_uiThrowAIEventStep = uiStep + 1; + } + } + + void HealedBy(Unit* pHealer, uint32& uiHealedAmount) override + { + if (m_uiThrowAIEventStep == 100) + return; + + if (m_creature->GetHealth() + uiHealedAmount >= m_creature->GetMaxHealth()) + { + SendAIEventAround(AI_EVENT_GOT_FULL_HEALTH, pHealer, 0, CRUSADER_AIEVENT_THROW_RADIUS); + m_uiThrowAIEventStep = 100; + } + } + + void JustDied(Unit* pKiller) override + { + SendAIEventAround(AI_EVENT_JUST_DIED, pKiller, 0, CRUSADER_AIEVENT_THROW_RADIUS); + } + + bool CanUseSpecialAbility(uint32 uiSpellId, uint32 uiTargetType, SelectFlags selectFlag, uint32 uiMaxHpPct) + { + Unit* pTarget = NULL; + + switch (uiTargetType) + { + case TARGET_TYPE_SELF: + pTarget = m_creature; + break; + case TARGET_TYPE_VICTIM: + pTarget = m_creature->getVictim(); + break; + case TARGET_TYPE_RANDOM: + pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0, uint32(uiSpellId), selectFlag); + break; + case TARGET_TYPE_FRIENDLY: + // calculate HP deficit compared to caster health; this might not give very accurate results + pTarget = DoSelectLowestHpFriendly(40.0f, uint32(m_creature->GetMaxHealth() * (100 - uiMaxHpPct) * 0.01f)); + break; + } + + if (pTarget) + { + if (DoCastSpellIfCan(pTarget, uiSpellId) == CAST_OK) + return true; + } + + return false; + } + // Return true to handle shared timers and MeleeAttack virtual bool UpdateCrusaderAI(const uint32 /*uiDiff*/) { return true; } @@ -113,261 +449,639 @@ struct trial_crusader_commonAI : public ScriptedAI if (!UpdateCrusaderAI(uiDiff)) return; - DoMeleeAttackIfReady(); - } -}; + if (m_uiAbilityTimer < uiDiff) + { + uint8 uiIndex = urand(0, m_uiMaxAbilities - 1); + uint32 uiMinHealth = m_pAbilityArray[uiIndex].m_uiMinHealth; + uint8 uiTargetType = m_pAbilityArray[uiIndex].m_uiTargetType; + + SelectFlags spellSelectFlag = m_pAbilityArray[uiIndex].m_selectFlag; + + // check timers and health condition + // only cast spells that have timers expired + // also check for health percentage for self cast spells + if (m_uiSpellTimer[uiIndex] || (uiTargetType == TARGET_TYPE_SELF && uiMinHealth && m_creature->GetHealthPercent() > uiMinHealth)) + { + m_uiAbilityTimer = 2000; + return; + } + else + { + uint32 uiSpellId = m_pAbilityArray[uiIndex].m_uiSpellId; + + // special case for heroism / bloodlust + if (uiSpellId == SPELL_HEROISM && m_pInstance && m_pInstance->GetPlayerTeam() == ALLIANCE) + uiSpellId = SPELL_BLOODLUST; + + if (CanUseSpecialAbility(uiSpellId, uiTargetType, spellSelectFlag, uiMinHealth)) + { + m_uiSpellTimer[uiIndex] = m_pAbilityArray[uiIndex].m_uiCooldown; + m_uiAbilityTimer = urand(2000, 6000); + } + else + m_uiAbilityTimer = 2000; + } + } + else + m_uiAbilityTimer -= uiDiff; -enum -{ - // death knight spells -}; + // spell cooldown + for (uint8 i = 0; i < m_uiMaxAbilities; ++i) + { + if (m_uiSpellTimer[i]) + { + if (m_uiSpellTimer[i] <= uiDiff) + m_uiSpellTimer[i] = 0; + else + m_uiSpellTimer[i] -= uiDiff; + } + } -/*###### -## boss_crusader_death_knight -######*/ + // Change target + if (m_uiResetThreatTimer < uiDiff) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1)) + { + DoResetThreat(); + AttackStart(pTarget); + m_uiResetThreatTimer = urand(5000, 15000); + } + } + else + m_uiResetThreatTimer -= uiDiff; -struct boss_crusader_death_knightAI : public trial_crusader_commonAI -{ - boss_crusader_death_knightAI(Creature* pCreature) : trial_crusader_commonAI(pCreature) { Reset(); } + // CC check for PVP trinket + if (m_uiIsCCTimer < uiDiff) + { + if (m_creature->isFrozen() || m_creature->hasUnitState(UNIT_STAT_CAN_NOT_REACT)) + { + // Pvp trinket only in heroic mode + if (m_pInstance && m_pInstance->IsHeroicDifficulty() && !m_uiTrinketCooldownTimer) + { + if (DoCastSpellIfCan(m_creature, SPELL_PVP_TRINKET, CAST_TRIGGERED) == CAST_OK) + m_uiTrinketCooldownTimer = 120000; + } + + SendAIEventAround(AI_EVENT_GOT_CCED, NULL, 0, CRUSADER_AIEVENT_THROW_RADIUS); + SendAIEvent(AI_EVENT_GOT_CCED, NULL, m_creature); + m_uiIsCCTimer = 5000; + } + else + m_uiIsCCTimer = 2000; + } + else + m_uiIsCCTimer -= uiDiff; - void Reset() override - { - trial_crusader_commonAI::Reset(); - } + // trinket cooldown + if (m_uiTrinketCooldownTimer) + { + if (m_uiTrinketCooldownTimer <= uiDiff) + m_uiTrinketCooldownTimer = 0; + else + m_uiTrinketCooldownTimer -= uiDiff; + } - bool UpdateChampionAI(const uint32 uiDiff) - { + DoMeleeAttackIfReady(); } }; -CreatureAI* GetAI_boss_crusader_death_knight(Creature* pCreature) -{ - return new boss_crusader_death_knightAI(pCreature); -} - -enum -{ - // druid balance spells -}; +/*###### +## CRUSADER HEALERS +######*/ /*###### -## boss_crusader_druid_balance +## boss_crusader_druid_resto ######*/ -struct boss_crusader_druid_balanceAI : public trial_crusader_commonAI +static const CrusaderAbilityStruct m_aDruidHealerAbilities[MAX_DRUID_RESTO_SPELLS] = { - boss_crusader_druid_balanceAI(Creature* pCreature) : trial_crusader_commonAI(pCreature) { Reset(); } + {SPELL_BARKSKIN, TARGET_TYPE_SELF, 5000, 60000, 50}, + {SPELL_NATURES_GRASP, TARGET_TYPE_SELF, 2000, 60000, 0}, + {SPELL_TRANQUILITY, TARGET_TYPE_SELF, 2000, 600000, 30}, + {SPELL_LIFEBLOOM, TARGET_TYPE_FRIENDLY, 2000, 2000, 0}, + {SPELL_NOURISH, TARGET_TYPE_FRIENDLY, 1500, 1500, 0}, + {SPELL_REGROWTH, TARGET_TYPE_FRIENDLY, 2000, 2000, 0}, + {SPELL_REJUVENATION, TARGET_TYPE_FRIENDLY, 2000, 2000, 0}, +}; + +struct boss_crusader_druid_restoAI : public trial_crusader_commonAI +{ + boss_crusader_druid_restoAI(Creature* pCreature) : trial_crusader_commonAI(pCreature, m_aDruidHealerAbilities, MAX_DRUID_RESTO_SPELLS) { Reset(); } void Reset() override { + m_uiAIType = AI_TYPE_HEALER; + trial_crusader_commonAI::Reset(); } - bool UpdateChampionAI(const uint32 uiDiff) + void Aggro(Unit* pWho) override { + DoCastSpellIfCan(m_creature, SPELL_THORNS); + + trial_crusader_commonAI::Aggro(pWho); + } + + void ReceiveAIEvent(AIEventType eventType, Creature* pSender, Unit* /*pInvoker*/, uint32 /*uiMiscValue*/) override + { + uint8 uiIndex = 99; + switch (eventType) + { + case AI_EVENT_CRITICAL_HEALTH: + uiIndex = urand(0, 1) ? 5 : 6; + break; + case AI_EVENT_LOST_HEALTH: + uiIndex = urand(0, 1) ? 4 : 5; + break; + case AI_EVENT_LOST_SOME_HEALTH: + uiIndex = urand(0, 1) ? 3 : 4; + break; + } + + if (uiIndex > MAX_DRUID_RESTO_SPELLS - 1) + return; + + if (!m_uiSpellTimer[uiIndex]) + { + if (DoCastSpellIfCan(pSender, m_aDruidHealerAbilities[uiIndex].m_uiSpellId) == CAST_OK) + m_uiSpellTimer[uiIndex] = m_aDruidHealerAbilities[uiIndex].m_uiCooldown; + } } }; -CreatureAI* GetAI_boss_crusader_druid_balance(Creature* pCreature) +CreatureAI* GetAI_boss_crusader_druid_resto(Creature* pCreature) { - return new boss_crusader_druid_balanceAI(pCreature); + return new boss_crusader_druid_restoAI(pCreature); } -enum -{ - // druid restoration spells -}; - /*###### -## boss_crusader_druid_resto +## boss_crusader_paladin_holy ######*/ -struct boss_crusader_druid_restoAI : public trial_crusader_commonAI +static const CrusaderAbilityStruct m_aPaladinHealerAbilities[MAX_PALADIN_HOLY_SPELLS] = { - boss_crusader_druid_restoAI(Creature* pCreature) : trial_crusader_commonAI(pCreature) { Reset(); } + {SPELL_DIVINE_SHIELD, TARGET_TYPE_SELF, 0, 300000, 25}, + {SPELL_FLASH_OF_LIGHT, TARGET_TYPE_FRIENDLY, 2000, 2000, 0}, + {SPELL_HOLY_SHOCK, TARGET_TYPE_FRIENDLY, 2000, 6000, 0}, + {SPELL_FLASH_HEAL, TARGET_TYPE_FRIENDLY, 2000, 2000, 0}, + {SPELL_HOLY_LIGHT, TARGET_TYPE_FRIENDLY, 1500, 1500, 0}, + {SPELL_HAND_OF_FREEDOM, TARGET_TYPE_FRIENDLY, 2000, 25000, 30}, + {SPELL_HAND_OF_PROTECTION, TARGET_TYPE_FRIENDLY, 0, 300000, 10}, + {SPELL_HAMMER_OF_JUSTICE, TARGET_TYPE_RANDOM, 15000, 40000, 0}, +}; + +struct boss_crusader_paladin_holyAI : public trial_crusader_commonAI +{ + boss_crusader_paladin_holyAI(Creature* pCreature) : trial_crusader_commonAI(pCreature, m_aPaladinHealerAbilities, MAX_PALADIN_HOLY_SPELLS) { Reset(); } void Reset() override { + m_uiAIType = AI_TYPE_HEALER; + trial_crusader_commonAI::Reset(); } - bool UpdateChampionAI(const uint32 uiDiff) + void ReceiveAIEvent(AIEventType eventType, Creature* pSender, Unit* /*pInvoker*/, uint32 /*uiMiscValue*/) override { + uint8 uiIndex = 99; + uint32 uiSpellEntry = 0; + uint32 uiSpellTimer = 0; + + switch (eventType) + { + case AI_EVENT_CRITICAL_HEALTH: + uiIndex = urand(0, 1) ? 3 : 4; + break; + case AI_EVENT_LOST_HEALTH: + uiIndex = urand(0, 1) ? 2 : 3; + break; + case AI_EVENT_LOST_SOME_HEALTH: + uiIndex = urand(0, 1) ? 1 : 2; + break; + case AI_EVENT_GOT_CCED: + uiSpellEntry = SPELL_CLEANSE; + break; + } + + if (!uiSpellEntry) + { + if (uiIndex > MAX_PALADIN_HOLY_SPELLS - 1) + return; + else + { + uiSpellEntry = m_aPaladinHealerAbilities[uiIndex].m_uiSpellId; + uiSpellTimer = m_aPaladinHealerAbilities[uiIndex].m_uiCooldown; + } + } + + if (!m_uiSpellTimer[uiIndex]) + { + if (DoCastSpellIfCan(pSender, uiSpellEntry) == CAST_OK) + { + if (uiSpellTimer) + m_uiSpellTimer[uiIndex] = uiSpellTimer; + } + } } }; -CreatureAI* GetAI_boss_crusader_druid_resto(Creature* pCreature) +CreatureAI* GetAI_boss_crusader_paladin_holy(Creature* pCreature) { - return new boss_crusader_druid_restoAI(pCreature); + return new boss_crusader_paladin_holyAI(pCreature); } -enum -{ - // hunter spells - SPELL_CALL_PET = 67777, -}; - /*###### -## boss_crusader_hunter +## boss_crusader_priest_disc ######*/ -struct boss_crusader_hunterAI : public trial_crusader_commonAI +static const CrusaderAbilityStruct m_aPriestHealerAbilities[MAX_PRIEST_DISC_SPELLS] = +{ + {SPELL_PSYCHIC_SCREAM, TARGET_TYPE_SELF, 10000, 30000, 0}, + {SPELL_PENANCE, TARGET_TYPE_SELF, 2000, 10000, 0}, + {SPELL_RENEW, TARGET_TYPE_FRIENDLY, 1500, 1500, 0}, + {SPELL_FLASH_HEAL, TARGET_TYPE_FRIENDLY, 1500, 1500, 0}, + {SPELL_DISPEL_MAGIC, TARGET_TYPE_FRIENDLY, 2000, 2000, 0}, + {SPELL_POWER_WORD_SHIELD, TARGET_TYPE_FRIENDLY, 1500, 15000, 70}, + {SPELL_MANA_BURN, TARGET_TYPE_RANDOM, 2000, 7000, 0, SELECT_FLAG_POWER_MANA}, +}; + +struct boss_crusader_priest_discAI : public trial_crusader_commonAI { - boss_crusader_hunterAI(Creature* pCreature) : trial_crusader_commonAI(pCreature) { Reset(); } + boss_crusader_priest_discAI(Creature* pCreature) : trial_crusader_commonAI(pCreature, m_aPriestHealerAbilities, MAX_PRIEST_DISC_SPELLS) { Reset(); } void Reset() override { + m_uiAIType = AI_TYPE_HEALER; + trial_crusader_commonAI::Reset(); } - void ReceiveAIEvent(AIEventType eventType, Creature* /*pSender*/, Unit* /*pInvoker*/, uint32 /*uiMiscValue*/) override + void ReceiveAIEvent(AIEventType eventType, Creature* pSender, Unit* /*pInvoker*/, uint32 /*uiMiscValue*/) override { - if (eventType == AI_EVENT_CUSTOM_A) - DoCastSpellIfCan(m_creature, SPELL_CALL_PET); - } + uint8 uiIndex = 99; + uint32 uiSpellEntry = 0; + uint32 uiSpellTimer = 0; - bool UpdateChampionAI(const uint32 uiDiff) - { + switch (eventType) + { + case AI_EVENT_CRITICAL_HEALTH: + uiIndex = urand(0, 1) ? 2 : 3; + break; + case AI_EVENT_LOST_HEALTH: + uiIndex = 2; + break; + case AI_EVENT_LOST_SOME_HEALTH: + uiIndex = 1; + break; + case AI_EVENT_GOT_CCED: + uiSpellEntry = SPELL_DISPEL_MAGIC; + break; + } + + if (!uiSpellEntry) + { + if (uiIndex > MAX_PRIEST_DISC_SPELLS - 1) + return; + else + { + uiSpellEntry = m_aPriestHealerAbilities[uiIndex].m_uiSpellId; + uiSpellTimer = m_aPriestHealerAbilities[uiIndex].m_uiCooldown; + } + } + + if (!m_uiSpellTimer[uiIndex]) + { + if (DoCastSpellIfCan(pSender, uiSpellEntry) == CAST_OK) + { + if (uiSpellTimer) + m_uiSpellTimer[uiIndex] = uiSpellTimer; + } + } } }; -CreatureAI* GetAI_boss_crusader_hunter(Creature* pCreature) +CreatureAI* GetAI_boss_crusader_priest_disc(Creature* pCreature) { - return new boss_crusader_hunterAI(pCreature); + return new boss_crusader_priest_discAI(pCreature); } -enum -{ - // mage spells -}; - /*###### -## boss_crusader_mage +## boss_crusader_shaman_resto ######*/ -struct boss_crusader_mageAI : public trial_crusader_commonAI +static const CrusaderAbilityStruct m_aShamanHealerAbilities[MAX_SHAMAN_RESTO_SPELLS] = +{ + {SPELL_HEROISM, TARGET_TYPE_SELF, 60000, 300000, 0}, + {SPELL_LESSER_HEALING_WAVE, TARGET_TYPE_FRIENDLY, 1500, 1500, 0}, + {SPELL_RIPTIDE, TARGET_TYPE_FRIENDLY, 1500, 6000, 0}, + {SPELL_EARTH_SHIELD, TARGET_TYPE_FRIENDLY, 1500, 1500, 0}, + {SPELL_CLEANSE_SPIRIT, TARGET_TYPE_FRIENDLY, 1500, 1500, 0}, + {SPELL_HEX, TARGET_TYPE_RANDOM, 2000, 45000, 0}, + {SPELL_EARTH_SHOCK, TARGET_TYPE_RANDOM, 2000, 6000, 0}, +}; + +struct boss_crusader_shaman_restoAI : public trial_crusader_commonAI { - boss_crusader_mageAI(Creature* pCreature) : trial_crusader_commonAI(pCreature) { Reset(); } + boss_crusader_shaman_restoAI(Creature* pCreature) : trial_crusader_commonAI(pCreature, m_aShamanHealerAbilities, MAX_SHAMAN_RESTO_SPELLS) { Reset(); } void Reset() override { + m_uiAIType = AI_TYPE_HEALER; + trial_crusader_commonAI::Reset(); } - bool UpdateChampionAI(const uint32 uiDiff) + void ReceiveAIEvent(AIEventType eventType, Creature* pSender, Unit* /*pInvoker*/, uint32 /*uiMiscValue*/) override { + uint8 uiIndex = 99; + uint32 uiSpellEntry = 0; + uint32 uiSpellTimer = 0; + + switch (eventType) + { + case AI_EVENT_CRITICAL_HEALTH: + uiIndex = 1; + break; + case AI_EVENT_LOST_HEALTH: + uiIndex = 2; + break; + case AI_EVENT_LOST_SOME_HEALTH: + uiIndex = 3; + break; + case AI_EVENT_GOT_CCED: + uiSpellEntry = SPELL_CLEANSE_SPIRIT; + break; + } + + if (!uiSpellEntry) + { + if (uiIndex > MAX_SHAMAN_RESTO_SPELLS - 1) + return; + else + { + uiSpellEntry = m_aShamanHealerAbilities[uiIndex].m_uiSpellId; + uiSpellTimer = m_aShamanHealerAbilities[uiIndex].m_uiCooldown; + } + } + + if (!m_uiSpellTimer[uiIndex]) + { + if (DoCastSpellIfCan(pSender, uiSpellEntry) == CAST_OK) + { + if (uiSpellTimer) + m_uiSpellTimer[uiIndex] = uiSpellTimer; + } + } } }; -CreatureAI* GetAI_boss_crusader_mage(Creature* pCreature) +CreatureAI* GetAI_boss_crusader_shaman_resto(Creature* pCreature) { - return new boss_crusader_mageAI(pCreature); + return new boss_crusader_shaman_restoAI(pCreature); } -enum -{ - // paladin holy spells -}; +/*###### +## CRUSADERS RANGED +######*/ /*###### -## boss_crusader_paladin_holy +## boss_crusader_druid_balance ######*/ -struct boss_crusader_paladin_holyAI : public trial_crusader_commonAI +static const CrusaderAbilityStruct m_aDruidDamageAbilities[MAX_DRUID_BALANCE_SPELLS] = +{ + {SPELL_BARKSKIN, TARGET_TYPE_SELF, 5000, 60000, 50}, + {SPELL_MOONFIRE, TARGET_TYPE_VICTIM, 2000, 30000, 0}, + {SPELL_STARFIRE, TARGET_TYPE_VICTIM, 2000, 20000, 0}, + {SPELL_FAERIE_FIRE, TARGET_TYPE_VICTIM, 2000, 40000, 0}, + {SPELL_INSECT_SWARM, TARGET_TYPE_VICTIM, 2000, 15000, 0}, + {SPELL_WRATH, TARGET_TYPE_VICTIM, 2000, 5000, 0}, + {SPELL_FORCE_OF_NATURE, TARGET_TYPE_RANDOM, 1500, 180000, 0}, + {SPELL_CYCLONE, TARGET_TYPE_RANDOM, 5000, 6000, 0}, + {SPELL_ENTANGLING_ROOTS, TARGET_TYPE_RANDOM, 5000, 10000, 0}, +}; + +struct boss_crusader_druid_balanceAI : public trial_crusader_commonAI { - boss_crusader_paladin_holyAI(Creature* pCreature) : trial_crusader_commonAI(pCreature) { Reset(); } + boss_crusader_druid_balanceAI(Creature* pCreature) : trial_crusader_commonAI(pCreature, m_aDruidDamageAbilities, MAX_DRUID_BALANCE_SPELLS) { Reset(); } void Reset() override { + m_uiAIType = AI_TYPE_RANGED; + trial_crusader_commonAI::Reset(); } - bool UpdateChampionAI(const uint32 uiDiff) + void ReceiveAIEvent(AIEventType eventType, Creature* /*pSender*/, Unit* pInvoker, uint32 /*uiMiscValue*/) override { + uint8 uiIndex = 99; + switch (eventType) + { + case AI_EVENT_JUST_DIED: + case AI_EVENT_CRITICAL_HEALTH: + uiIndex = urand(0, 1) ? 7 : 8; + break; + } + + if (uiIndex > MAX_DRUID_BALANCE_SPELLS - 1) + return; + + if (!m_uiSpellTimer[uiIndex]) + { + if (DoCastSpellIfCan(pInvoker, m_aDruidDamageAbilities[uiIndex].m_uiSpellId) == CAST_OK) + m_uiSpellTimer[uiIndex] = m_aDruidDamageAbilities[uiIndex].m_uiCooldown; + } } }; -CreatureAI* GetAI_boss_crusader_paladin_holy(Creature* pCreature) +CreatureAI* GetAI_boss_crusader_druid_balance(Creature* pCreature) { - return new boss_crusader_paladin_holyAI(pCreature); + return new boss_crusader_druid_balanceAI(pCreature); } -enum -{ - // paladin retribution spells -}; - /*###### -## boss_crusader_paladin_retri +## boss_crusader_hunter ######*/ -struct boss_crusader_paladin_retriAI : public trial_crusader_commonAI +static const CrusaderAbilityStruct m_aHunterAbilities[MAX_HUNTER_SPELLS] = +{ + {SPELL_DETERRENCE, TARGET_TYPE_SELF, 2000, 90000, 30}, + {SPELL_DISENGAGE, TARGET_TYPE_SELF, 1000, 30000, 50}, + {SPELL_FROST_TRAP, TARGET_TYPE_SELF, 1500, 30000, 0}, + {SPELL_SHOOT, TARGET_TYPE_VICTIM, 2000, 3000, 0}, + {SPELL_STEADY_SHOT, TARGET_TYPE_VICTIM, 1500, 5000, 0}, + {SPELL_EXPLOSIVE_SHOT, TARGET_TYPE_VICTIM, 1500, 6000, 0}, + {SPELL_AIMED_SHOT, TARGET_TYPE_VICTIM, 1000, 10000, 0}, + {SPELL_WYVERN_STING, TARGET_TYPE_RANDOM, 1500, 60000, 0}, + {SPELL_WING_CLIP, TARGET_TYPE_RANDOM, 1500, 6000, 0, SELECT_FLAG_IN_MELEE_RANGE}, +}; + +struct boss_crusader_hunterAI : public trial_crusader_commonAI { - boss_crusader_paladin_retriAI(Creature* pCreature) : trial_crusader_commonAI(pCreature) { Reset(); } + boss_crusader_hunterAI(Creature* pCreature) : trial_crusader_commonAI(pCreature, m_aHunterAbilities, MAX_HUNTER_SPELLS) { Reset(); } void Reset() override { + m_uiAIType = AI_TYPE_RANGED; + trial_crusader_commonAI::Reset(); } - bool UpdateChampionAI(const uint32 uiDiff) + void ReceiveAIEvent(AIEventType eventType, Creature* /*pSender*/, Unit* pInvoker, uint32 /*uiMiscValue*/) override { + if (eventType == AI_EVENT_CUSTOM_A) + DoCastSpellIfCan(m_creature, SPELL_CALL_PET); + else + { + uint8 uiIndex = 99; + switch (eventType) + { + case AI_EVENT_CRITICAL_HEALTH: + switch (urand(0, 2)) + { + case 0: uiIndex = 1; break; + case 1: uiIndex = 2; break; + case 2: uiIndex = 7; break; + } + break; + } + + if (uiIndex > MAX_HUNTER_SPELLS - 1) + return; + + if (!m_uiSpellTimer[uiIndex]) + { + if (DoCastSpellIfCan(pInvoker, m_aHunterAbilities[uiIndex].m_uiSpellId) == CAST_OK) + m_uiSpellTimer[uiIndex] = m_aHunterAbilities[uiIndex].m_uiCooldown; + } + } } }; -CreatureAI* GetAI_boss_crusader_paladin_retri(Creature* pCreature) +CreatureAI* GetAI_boss_crusader_hunter(Creature* pCreature) { - return new boss_crusader_paladin_retriAI(pCreature); + return new boss_crusader_hunterAI(pCreature); } -enum -{ - // priest discipline spells -}; - /*###### -## boss_crusader_priest_disc +## boss_crusader_mage ######*/ -struct boss_crusader_priest_discAI : public trial_crusader_commonAI +static const CrusaderAbilityStruct m_aMageAbilities[MAX_MAGE_SPELLS] = +{ + {SPELL_ARCANE_EXPLOSION, TARGET_TYPE_SELF, 2000, 20000, 0}, + {SPELL_BLINK, TARGET_TYPE_SELF, 1000, 15000, 0}, + {SPELL_FROST_NOVA, TARGET_TYPE_SELF, 2000, 25000, 0}, + {SPELL_ICE_BLOCK, TARGET_TYPE_SELF, 2000, 300000, 20}, + {SPELL_ARCANE_BARRAGE, TARGET_TYPE_VICTIM, 2000, 30000, 0}, + {SPELL_ARCANE_BLAST, TARGET_TYPE_VICTIM, 2500, 20000, 0}, + {SPELL_FROSTBOLT, TARGET_TYPE_VICTIM, 2000, 15000, 0}, + {SPELL_COUNTERSPELL, TARGET_TYPE_RANDOM, 1000, 24000, 0, SELECT_FLAG_POWER_MANA}, + {SPELL_POLYMORPH, TARGET_TYPE_RANDOM, 2000, 15000, 0}, +}; + +struct boss_crusader_mageAI : public trial_crusader_commonAI { - boss_crusader_priest_discAI(Creature* pCreature) : trial_crusader_commonAI(pCreature) { Reset(); } + boss_crusader_mageAI(Creature* pCreature) : trial_crusader_commonAI(pCreature, m_aMageAbilities, MAX_MAGE_SPELLS) { Reset(); } void Reset() override { + m_uiAIType = AI_TYPE_RANGED; + trial_crusader_commonAI::Reset(); } - bool UpdateChampionAI(const uint32 uiDiff) + void ReceiveAIEvent(AIEventType eventType, Creature* /*pSender*/, Unit* pInvoker, uint32 /*uiMiscValue*/) override { + uint8 uiIndex = 99; + switch (eventType) + { + case AI_EVENT_CRITICAL_HEALTH: + uiIndex = 7; + break; + case AI_EVENT_GOT_CCED: + uiIndex = 1; + break; + } + + if (uiIndex > MAX_HUNTER_SPELLS - 1) + return; + + if (!m_uiSpellTimer[uiIndex]) + { + if (DoCastSpellIfCan(pInvoker, m_aMageAbilities[uiIndex].m_uiSpellId) == CAST_OK) + m_uiSpellTimer[uiIndex] = m_aMageAbilities[uiIndex].m_uiCooldown; + } } }; -CreatureAI* GetAI_boss_crusader_priest_disc(Creature* pCreature) +CreatureAI* GetAI_boss_crusader_mage(Creature* pCreature) { - return new boss_crusader_priest_discAI(pCreature); + return new boss_crusader_mageAI(pCreature); } -enum -{ - // priest shadow spells -}; - /*###### ## boss_crusader_priest_shadow ######*/ +static const CrusaderAbilityStruct m_aPriestDamageAbilities[MAX_PRIEST_DAMAGE_SPELLS] = +{ + {SPELL_DISPERSION, TARGET_TYPE_SELF, 6000, 180000, 50}, + {SPELL_PSYCHIC_SCREAM, TARGET_TYPE_SELF, 1500, 30000, 0}, + {SPELL_MIND_BLAST, TARGET_TYPE_VICTIM, 1500, 8000, 0}, + {SPELL_MIND_FLAY, TARGET_TYPE_VICTIM, 2000, 15000, 0}, + {SPELL_PSYCHIC_HORROR, TARGET_TYPE_VICTIM, 2000, 120000, 30}, + {SPELL_SHADOW_WORD_PAIN, TARGET_TYPE_VICTIM, 2000, 20000, 0}, + {SPELL_VAMPIRIC_TOUCH, TARGET_TYPE_VICTIM, 2000, 2000, 0}, + {SPELL_SILENCE, TARGET_TYPE_RANDOM, 2000, 45000, 0, SELECT_FLAG_POWER_MANA}, +}; + struct boss_crusader_priest_shadowAI : public trial_crusader_commonAI { - boss_crusader_priest_shadowAI(Creature* pCreature) : trial_crusader_commonAI(pCreature) { Reset(); } + boss_crusader_priest_shadowAI(Creature* pCreature) : trial_crusader_commonAI(pCreature, m_aPriestDamageAbilities, MAX_PRIEST_DAMAGE_SPELLS) { Reset(); } void Reset() override { + m_uiAIType = AI_TYPE_RANGED; + trial_crusader_commonAI::Reset(); } - bool UpdateChampionAI(const uint32 uiDiff) + void ReceiveAIEvent(AIEventType eventType, Creature* pSender, Unit* /*pInvoker*/, uint32 /*uiMiscValue*/) override { + uint8 uiIndex = 99; + uint32 uiSpellEntry = 0; + uint32 uiSpellTimer = 0; + + switch (eventType) + { + case AI_EVENT_CRITICAL_HEALTH: + uiIndex = 1; + break; + case AI_EVENT_GOT_CCED: + uiSpellEntry = SPELL_DISPEL; + break; + } + + if (!uiSpellEntry) + { + if (uiIndex > MAX_PRIEST_DAMAGE_SPELLS - 1) + return; + else + { + uiSpellEntry = m_aPriestDamageAbilities[uiIndex].m_uiSpellId; + uiSpellTimer = m_aPriestDamageAbilities[uiIndex].m_uiCooldown; + } + } + + if (!m_uiSpellTimer[uiIndex]) + { + if (DoCastSpellIfCan(pSender, uiSpellEntry) == CAST_OK) + { + if (uiSpellTimer) + m_uiSpellTimer[uiIndex] = uiSpellTimer; + } + } } }; @@ -376,151 +1090,298 @@ CreatureAI* GetAI_boss_crusader_priest_shadow(Creature* pCreature) return new boss_crusader_priest_shadowAI(pCreature); } -enum -{ - // rogue spells -}; - /*###### -## boss_crusader_rogue +## boss_crusader_warlock ######*/ -struct boss_crusader_rogueAI : public trial_crusader_commonAI +static const CrusaderAbilityStruct m_aWarlockAbilities[MAX_WARLOCK_SPELLS] = { - boss_crusader_rogueAI(Creature* pCreature) : trial_crusader_commonAI(pCreature) { Reset(); } + {SPELL_HELLFIRE, TARGET_TYPE_SELF, 1500, 30000, 0}, + {SPELL_SHADOW_BOLT, TARGET_TYPE_VICTIM, 2000, 15000, 0}, + {SPELL_UNSTABLE_AFFLICTION, TARGET_TYPE_VICTIM, 2000, 20000, 0}, + {SPELL_CORRUPTION, TARGET_TYPE_VICTIM, 2000, 20000, 0}, + {SPELL_CURSE_OF_AGONY, TARGET_TYPE_VICTIM, 2000, 30000, 0}, + {SPELL_CURSE_OF_EXHAUSTION, TARGET_TYPE_VICTIM, 2000, 20000, 0}, + {SPELL_SEARING_PAIN, TARGET_TYPE_VICTIM, 2000, 15000, 0}, + {SPELL_DEATH_COIL_WARLOCK, TARGET_TYPE_VICTIM, 2000, 120000, 50}, + {SPELL_FEAR, TARGET_TYPE_RANDOM, 2000, 30000, 0}, +}; + +struct boss_crusader_warlockAI : public trial_crusader_commonAI +{ + boss_crusader_warlockAI(Creature* pCreature) : trial_crusader_commonAI(pCreature, m_aWarlockAbilities, MAX_WARLOCK_SPELLS) { Reset(); } void Reset() override { + m_uiAIType = AI_TYPE_RANGED; + trial_crusader_commonAI::Reset(); } - bool UpdateChampionAI(const uint32 uiDiff) + void ReceiveAIEvent(AIEventType eventType, Creature* pSender, Unit* /*pInvoker*/, uint32 /*uiMiscValue*/) override { + if (eventType == AI_EVENT_CUSTOM_A) + DoCastSpellIfCan(m_creature, SPELL_SUMMON_FELHUNTER); + else + { + uint8 uiIndex = 99; + switch (eventType) + { + case AI_EVENT_JUST_DIED: + case AI_EVENT_CRITICAL_HEALTH: + uiIndex = 8; + break; + } + + if (uiIndex > MAX_WARLOCK_SPELLS - 1) + return; + + if (!m_uiSpellTimer[uiIndex]) + { + if (DoCastSpellIfCan(pSender, m_aWarlockAbilities[uiIndex].m_uiSpellId) == CAST_OK) + m_uiSpellTimer[uiIndex] = m_aWarlockAbilities[uiIndex].m_uiCooldown; + } + } } }; -CreatureAI* GetAI_boss_crusader_rogue(Creature* pCreature) +CreatureAI* GetAI_boss_crusader_warlock(Creature* pCreature) { - return new boss_crusader_rogueAI(pCreature); + return new boss_crusader_warlockAI(pCreature); } -enum -{ - // shaman enhancement spells -}; +/*###### +## MELEE CRUSADERS +######*/ /*###### -## boss_crusader_shaman_enha +## boss_crusader_death_knight ######*/ -struct boss_crusader_shaman_enhaAI : public trial_crusader_commonAI +static const CrusaderAbilityStruct m_aDeathKnightAbilities[MAX_DEATH_KNIGHT_SPELLS] = { - boss_crusader_shaman_enhaAI(Creature* pCreature) : trial_crusader_commonAI(pCreature) { Reset(); } + {SPELL_ICEBOUND_FORTITUDE, TARGET_TYPE_SELF, 10000, 60000, 0}, + {SPELL_CHAINS_OF_ICE, TARGET_TYPE_VICTIM, 1500, 20000, 0}, + {SPELL_FROST_STRIKE, TARGET_TYPE_VICTIM, 1500, 6000, 0}, + {SPELL_ICY_TOUCH, TARGET_TYPE_RANDOM, 2000, 8000, 0}, + {SPELL_DEATH_COIL, TARGET_TYPE_RANDOM, 2000, 8000, 0}, + {SPELL_DEATH_GRIP, TARGET_TYPE_RANDOM, 1000, 35000, 0}, + {SPELL_STRANGULATE, TARGET_TYPE_RANDOM, 40000, 120000, 0}, +}; + +struct boss_crusader_death_knightAI : public trial_crusader_commonAI +{ + boss_crusader_death_knightAI(Creature* pCreature) : trial_crusader_commonAI(pCreature, m_aDeathKnightAbilities, MAX_DEATH_KNIGHT_SPELLS) { Reset(); } void Reset() override { trial_crusader_commonAI::Reset(); } - bool UpdateChampionAI(const uint32 uiDiff) + void ReceiveAIEvent(AIEventType eventType, Creature* /*pSender*/, Unit* pInvoker, uint32 /*uiMiscValue*/) override { + uint8 uiIndex = 99; + uint32 uiSpellEntry = 0; + uint32 uiSpellTimer = 0; + + switch (eventType) + { + case AI_EVENT_CRITICAL_HEALTH: + uiIndex = urand(0, 1) ? 5 : 6; + break; + } + + if (uiIndex > MAX_DEATH_KNIGHT_SPELLS - 1) + return; + + if (!m_uiSpellTimer[uiIndex]) + { + if (DoCastSpellIfCan(pInvoker, m_aDeathKnightAbilities[uiIndex].m_uiSpellId) == CAST_OK) + m_uiSpellTimer[uiIndex] = m_aDeathKnightAbilities[uiIndex].m_uiCooldown; + } } }; -CreatureAI* GetAI_boss_crusader_shaman_enha(Creature* pCreature) +CreatureAI* GetAI_boss_crusader_death_knight(Creature* pCreature) { - return new boss_crusader_shaman_enhaAI(pCreature); + return new boss_crusader_death_knightAI(pCreature); } -enum -{ - // shaman restoration spells -}; - /*###### -## boss_crusader_shaman_resto +## boss_crusader_warrior ######*/ -struct boss_crusader_shaman_restoAI : public trial_crusader_commonAI +static const CrusaderAbilityStruct m_aWarriorAbilities[MAX_WARRIOR_SPELLS] = { - boss_crusader_shaman_restoAI(Creature* pCreature) : trial_crusader_commonAI(pCreature) { Reset(); } + {SPELL_BLADESTORM, TARGET_TYPE_SELF, 10000, 90000, 0}, + {SPELL_RETALIATION, TARGET_TYPE_SELF, 30000, 300000, 0}, + {SPELL_SUNDER_ARMOR, TARGET_TYPE_VICTIM, 1500, 5000, 0}, + {SPELL_DISARM, TARGET_TYPE_VICTIM, 20000, 60000, 0}, + {SPELL_INTIMIDATING_SHOUT, TARGET_TYPE_VICTIM, 10000, 30000, 0}, + {SPELL_MORTAL_STRIKE, TARGET_TYPE_VICTIM, 2000, 10000, 0}, + {SPELL_OVERPOWER, TARGET_TYPE_VICTIM, 2000, 6000, 0}, + {SPELL_SHATTERING_THROW, TARGET_TYPE_RANDOM, 40000, 300000, 0}, + {SPELL_CHARGE, TARGET_TYPE_RANDOM, 1000, 15000, 0, SELECT_FLAG_NOT_IN_MELEE_RANGE}, +}; - void Reset() override - { - trial_crusader_commonAI::Reset(); - } +struct boss_crusader_warriorAI : public trial_crusader_commonAI +{ + boss_crusader_warriorAI(Creature* pCreature) : trial_crusader_commonAI(pCreature, m_aWarriorAbilities, MAX_WARRIOR_SPELLS) { Reset(); } + + void Reset() override { trial_crusader_commonAI::Reset(); } - bool UpdateChampionAI(const uint32 uiDiff) + void ReceiveAIEvent(AIEventType eventType, Creature* /*pSender*/, Unit* pInvoker, uint32 /*uiMiscValue*/) override { + uint8 uiIndex = 99; + switch (eventType) + { + case AI_EVENT_CRITICAL_HEALTH: + case AI_EVENT_LOST_HEALTH: + uiIndex = 8; + break; + } + + if (uiIndex > MAX_WARRIOR_SPELLS - 1) + return; + + if (!m_uiSpellTimer[uiIndex]) + { + if (DoCastSpellIfCan(pInvoker, m_aWarriorAbilities[uiIndex].m_uiSpellId) == CAST_OK) + m_uiSpellTimer[uiIndex] = m_aWarriorAbilities[uiIndex].m_uiCooldown; + } } }; -CreatureAI* GetAI_boss_crusader_shaman_resto(Creature* pCreature) +CreatureAI* GetAI_boss_crusader_warrior(Creature* pCreature) { - return new boss_crusader_shaman_restoAI(pCreature); + return new boss_crusader_warriorAI(pCreature); } -enum -{ - // warlock spells - SPELL_SUMMON_FELHUNTER = 67514, -}; - /*###### -## boss_crusader_warlock +## boss_crusader_paladin_retri ######*/ -struct boss_crusader_warlockAI : public trial_crusader_commonAI +static const CrusaderAbilityStruct m_aPaladinDamageAbilities[MAX_PALADIN_DAMAGE_SPELLS] = { - boss_crusader_warlockAI(Creature* pCreature) : trial_crusader_commonAI(pCreature) { Reset(); } + {SPELL_AVENGING_WRATH, TARGET_TYPE_SELF, 2000, 180000, 50}, + {SPELL_DIVINE_STORM, TARGET_TYPE_SELF, 10000, 20000, 0}, + {SPELL_CRUSADER_STRIKE, TARGET_TYPE_VICTIM, 2000, 15000, 0}, + {SPELL_HAMMER_OF_JUSTICE_RETRI, TARGET_TYPE_RANDOM, 10000, 40000, 0}, + {SPELL_JUDGEMENT_OF_COMMAND, TARGET_TYPE_RANDOM, 5000, 20000, 0}, + {SPELL_REPENTANCE, TARGET_TYPE_RANDOM, 30000, 60000, 0}, +}; - void Reset() override - { - trial_crusader_commonAI::Reset(); - } +struct boss_crusader_paladin_retriAI : public trial_crusader_commonAI +{ + boss_crusader_paladin_retriAI(Creature* pCreature) : trial_crusader_commonAI(pCreature, m_aPaladinDamageAbilities, MAX_PALADIN_DAMAGE_SPELLS) { Reset(); } - void ReceiveAIEvent(AIEventType eventType, Creature* /*pSender*/, Unit* /*pInvoker*/, uint32 /*uiMiscValue*/) override - { - if (eventType == AI_EVENT_CUSTOM_A) - DoCastSpellIfCan(m_creature, SPELL_SUMMON_FELHUNTER); - } + void Reset() override { trial_crusader_commonAI::Reset(); } - bool UpdateChampionAI(const uint32 uiDiff) + void ReceiveAIEvent(AIEventType eventType, Creature* /*pSender*/, Unit* pInvoker, uint32 /*uiMiscValue*/) override { + if (eventType == AI_EVENT_CUSTOM_A) + DoCastSpellIfCan(m_creature, SPELL_SEAL_OF_COMMAND); + else + { + uint8 uiIndex = 99; + switch (eventType) + { + case AI_EVENT_CRITICAL_HEALTH: + case AI_EVENT_LOST_HEALTH: + uiIndex = urand(0, 1) ? 3 : 5; + break; + } + + if (uiIndex > MAX_PALADIN_DAMAGE_SPELLS - 1) + return; + + if (!m_uiSpellTimer[uiIndex]) + { + if (DoCastSpellIfCan(pInvoker, m_aPaladinDamageAbilities[uiIndex].m_uiSpellId) == CAST_OK) + m_uiSpellTimer[uiIndex] = m_aPaladinDamageAbilities[uiIndex].m_uiCooldown; + } + } } }; -CreatureAI* GetAI_boss_crusader_warlock(Creature* pCreature) +CreatureAI* GetAI_boss_crusader_paladin_retri(Creature* pCreature) { - return new boss_crusader_warlockAI(pCreature); + return new boss_crusader_paladin_retriAI(pCreature); } -enum +/*###### +## boss_crusader_shaman_enha +######*/ + +static const CrusaderAbilityStruct m_aShamanDamageAbilities[MAX_SHAMAN_DAMAGE_SPELLS] = { - // warrior spells + {SPELL_HEROISM, TARGET_TYPE_SELF, 60000, 300000, 0}, + {SPELL_MAELSTROM_WEAPON, TARGET_TYPE_SELF, 30000, 40000, 0}, + {SPELL_WINDFURY, TARGET_TYPE_SELF, 10000, 10000, 0}, + {SPELL_EARTH_SHOCK, TARGET_TYPE_VICTIM, 2000, 8000, 0}, + {SPELL_LAVA_LASH, TARGET_TYPE_VICTIM, 2000, 10000, 0}, + {SPELL_STORMSTRIKE, TARGET_TYPE_VICTIM, 7000, 15000, 0}, +}; + +struct boss_crusader_shaman_enhaAI : public trial_crusader_commonAI +{ + boss_crusader_shaman_enhaAI(Creature* pCreature) : trial_crusader_commonAI(pCreature, m_aShamanDamageAbilities, MAX_SHAMAN_DAMAGE_SPELLS) { Reset(); } + + void Reset() override { trial_crusader_commonAI::Reset(); } }; +CreatureAI* GetAI_boss_crusader_shaman_enha(Creature* pCreature) +{ + return new boss_crusader_shaman_enhaAI(pCreature); +} + /*###### -## boss_crusader_warrior +## boss_crusader_rogue ######*/ -struct boss_crusader_warriorAI : public trial_crusader_commonAI +static const CrusaderAbilityStruct m_aRogueAbilities[MAX_ROGUE_SPELLS] = { - boss_crusader_warriorAI(Creature* pCreature) : trial_crusader_commonAI(pCreature) { Reset(); } + {SPELL_BLADE_FURRY, TARGET_TYPE_SELF, 40000, 120000, 0}, + {SPELL_CLOAK_OF_SHADOWS, TARGET_TYPE_SELF, 2000, 90000, 50}, + {SPELL_FAN_OF_KNIVES, TARGET_TYPE_SELF, 1500, 15000, 0}, + {SPELL_SHADOWSTEP, TARGET_TYPE_SELF, 8000, 30000, 0}, + {SPELL_EVISCERATE, TARGET_TYPE_VICTIM, 3000, 20000, 0}, + {SPELL_HEMORRHAGE, TARGET_TYPE_VICTIM, 2000, 15000, 0}, + {SPELL_WOUND_POISON, TARGET_TYPE_VICTIM, 5000, 18000, 0}, + {SPELL_BLIND, TARGET_TYPE_RANDOM, 8000, 120000, 30}, +}; - void Reset() override - { - trial_crusader_commonAI::Reset(); - } +struct boss_crusader_rogueAI : public trial_crusader_commonAI +{ + boss_crusader_rogueAI(Creature* pCreature) : trial_crusader_commonAI(pCreature, m_aRogueAbilities, MAX_ROGUE_SPELLS) { Reset(); } - bool UpdateChampionAI(const uint32 uiDiff) + void Reset() override { trial_crusader_commonAI::Reset(); } + + void ReceiveAIEvent(AIEventType eventType, Creature* /*pSender*/, Unit* pInvoker, uint32 /*uiMiscValue*/) override { + uint8 uiIndex = 99; + switch (eventType) + { + case AI_EVENT_CRITICAL_HEALTH: + case AI_EVENT_LOST_HEALTH: + uiIndex = 7; + break; + } + + if (uiIndex > MAX_ROGUE_SPELLS - 1) + return; + + if (!m_uiSpellTimer[uiIndex]) + { + if (DoCastSpellIfCan(pInvoker, m_aRogueAbilities[uiIndex].m_uiSpellId) == CAST_OK) + m_uiSpellTimer[uiIndex] = m_aRogueAbilities[uiIndex].m_uiCooldown; + } } }; -CreatureAI* GetAI_boss_crusader_warrior(Creature* pCreature) +CreatureAI* GetAI_boss_crusader_rogue(Creature* pCreature) { - return new boss_crusader_warriorAI(pCreature); + return new boss_crusader_rogueAI(pCreature); } void AddSC_boss_faction_champions() diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_jaraxxus.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_jaraxxus.cpp index 17f807284..c51bd10b9 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_jaraxxus.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_jaraxxus.cpp @@ -52,8 +52,6 @@ enum SPELL_NETHER_POWER = 67009, SPELL_BERSERK = 26662, - SPELL_ENSLAVE_JARAXXUS = 67924, // dummy aura that will hold the boss after evade - // npcs NPC_INFERNAL_VOLCANO = 34813, NPC_NETHER_PORTAL = 34825 @@ -121,7 +119,6 @@ struct boss_jaraxxusAI : public ScriptedAI if (m_pInstance) m_pInstance->SetData(TYPE_JARAXXUS, IN_PROGRESS); - m_creature->RemoveAurasDueToSpell(SPELL_ENSLAVE_JARAXXUS); DoCastSpellIfCan(m_creature, SPELL_NETHER_POWER); } diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp index b6a40dd6a..6c61d8757 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp @@ -595,6 +595,17 @@ void instance_trial_of_the_crusader::DoHandleEventEpilogue() } } +// Function that will set all the crusaders in combat with the target +void instance_trial_of_the_crusader::DoSetCrusadersInCombat(Unit* pTarget) +{ + uint8 uiMaxCrusaders = Is25ManDifficulty() ? MAX_CRUSADERS_25MAN : MAX_CRUSADERS_10MAN; + for (uint8 i = 0; i < uiMaxCrusaders; ++i) + { + if (Creature* pCrusader = instance->GetCreature(m_vCrusadersGuidsVector[i])) + pCrusader->AI()->AttackStart(pTarget); + } +} + // Function that will open and close the main gate void instance_trial_of_the_crusader::DoOpenMainGate(uint32 uiResetTimer) { @@ -725,7 +736,10 @@ void instance_trial_of_the_crusader::JustDidDialogueStep(int32 iEntry) break; case EVENT_JARAXXUS_START_ATTACK: if (Creature* pJaraxxus = GetSingleCreatureFromStorage(NPC_JARAXXUS)) + { pJaraxxus->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE | UNIT_FLAG_PASSIVE); + pJaraxxus->RemoveAurasDueToSpell(SPELL_ENSLAVE_JARAXXUS); + } break; case SAY_TIRION_PVP_INTRO_1: case TYPE_FACTION_CHAMPIONS: diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h index 448dc5d6e..e29608a43 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h @@ -144,6 +144,7 @@ enum SPELL_OPEN_PORTAL = 67864, SPELL_FEL_LIGHTNING_KILL = 67888, SPELL_WILFRED_PORTAL = 68424, + SPELL_ENSLAVE_JARAXXUS = 67924, // dummy aura that will hold the boss after evade // SPELL_LEAP = 67382, // crusader jump inside the arena to the provided coords SPELL_ANCHOR_HERE = 45313, // change respawn coords to the current position SPELL_ENCOUNTER_KILL_CREDIT = 68184, // kill credit for faction champions @@ -302,6 +303,7 @@ class instance_trial_of_the_crusader : public ScriptedInstance, private Dialogue bool CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget = NULL, uint32 uiMiscvalue1 = 0) const override; + void DoSetCrusadersInCombat(Unit* pTarget); void DoOpenMainGate(uint32 uiResetTimer); void Update(uint32 uiDiff) override; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index e1b27b24c..6e3663fb4 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3128" + #define SD2_REVISION_NR "3129" #endif // __SD2_REVISION_NR_H__ From 69c6d5ff9927a065d91fc9c346d0ce94ecfcdd30 Mon Sep 17 00:00:00 2001 From: Ulduar Date: Sat, 2 May 2015 01:18:42 +0200 Subject: [PATCH 1144/1172] [3130] Implement script support for quest 12852 Close #152 Please note that there are some core issues here regarding casting dummy spells while the target is immune Signed-off-by: Xfurry --- scripts/northrend/icecrown.cpp | 289 ++++++++++++++++++++++++++++++- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 + sql/scriptdev2_script_full.sql | 10 +- sql/updates/r3130_mangos.sql | 1 + sql/updates/r3130_scriptdev2.sql | 9 + 6 files changed, 309 insertions(+), 3 deletions(-) create mode 100644 sql/updates/r3130_mangos.sql create mode 100644 sql/updates/r3130_scriptdev2.sql diff --git a/scripts/northrend/icecrown.cpp b/scripts/northrend/icecrown.cpp index 2711a6f8c..0526a4da1 100644 --- a/scripts/northrend/icecrown.cpp +++ b/scripts/northrend/icecrown.cpp @@ -17,7 +17,7 @@ /* ScriptData SDName: Icecrown SD%Complete: 100 -SDComment: Quest support: 13221, 13229, 13284, 13300, 13301, 13302, 13481, 13482. +SDComment: Quest support: 12852, 13221, 13229, 13284, 13300, 13301, 13302, 13481, 13482. SDCategory: Icecrown EndScriptData */ @@ -26,6 +26,7 @@ npc_squad_leader npc_infantry npc_father_kamaros npc_saronite_mine_slave +npc_grand_admiral_westwind EndContentData */ #include "precompiled.h" @@ -654,6 +655,286 @@ bool GossipSelect_npc_saronite_mine_slave(Player* pPlayer, Creature* pCreature, return true; } +/*###### +## npc_grand_admiral_westwind +######*/ + +enum +{ + SAY_AGGRO = -1001184, + SAY_SPHERE = -1001185, + SAY_NO_MATTER = -1001186, + SAY_TRANSFORM = -1001187, + SAY_20_HP = -1001188, + SAY_DEFEATED = -1001189, + SAY_ESCAPE = -1001190, + + // admiral spells + SPELL_WHIRLWIND = 49807, + SPELL_HEROIC_STRIKE_ADMIRAL = 57846, + SPELL_CLEAVE_ADMIRAL = 15284, + SPELL_PROTECTION_SPHERE = 50161, + SPELL_NULLIFIER = 31699, + + // malganis spells + SPELL_SLEEP = 53045, + SPELL_MIND_BLAST = 60500, + SPELL_VAMPIRIC_TOUCH = 60501, + SPELL_CARRION_SWARM = 60502, + + SPELL_ADMIRAL_PORTAL = 27731, + SPELL_TELEPORT = 35502, + + MODEL_ID_MALGANIS = 26582, + NPC_WESTWIND_CREDIT_BUNNY = 29627, +}; + +static const float afPortalSpawnLoc[4] = {7494.89f, 4871.53f, -12.65f, 1.37f}; +static const float afExitLocation[3] = {7494.78f, 4872.56f, -12.72f}; + +struct npc_grand_admiral_westwindAI : public ScriptedAI +{ + npc_grand_admiral_westwindAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } + + uint32 m_uiWhirlwindTimer; + uint32 m_uiHeroicStrikeTimer; + uint32 m_uiCleaveTimer; + bool m_bIsShield; + bool m_bIsTransform; + + uint32 m_uiSleepTimer; + uint32 m_uiBlastTimer; + uint32 m_uiCarrionTimer; + uint32 m_uiEscapeTimer; + + bool m_bIsYell; + bool m_bIsDefeated; + + ObjectGuid m_playerGuid; + + void Reset() override + { + m_uiWhirlwindTimer = 15000; + m_uiHeroicStrikeTimer = 6000; + m_uiCleaveTimer = 13000; + + m_uiSleepTimer = 15000; + m_uiBlastTimer = 6000; + m_uiCarrionTimer = 13000; + m_uiEscapeTimer = 0; + + m_bIsYell = false; + m_bIsShield = false; + m_bIsTransform = false; + m_bIsDefeated = false; + + m_creature->SetDisplayId(m_creature->GetNativeDisplayId()); + SetEquipmentSlots(true); + } + + void Aggro(Unit* /*pWho*/) override + { + DoScriptText(SAY_AGGRO, m_creature); + } + + void ReceiveAIEvent(AIEventType eventType, Creature* /*pSender*/, Unit* pInvoker, uint32 uiMiscValue) override + { + if (eventType == AI_EVENT_CUSTOM_A && pInvoker->GetTypeId() == TYPEID_PLAYER) + { + DoScriptText(SAY_NO_MATTER, m_creature); + m_playerGuid = pInvoker->GetObjectGuid(); + m_creature->RemoveAurasDueToSpell(SPELL_PROTECTION_SPHERE); + } + } + + void EnterEvadeMode() override + { + m_creature->RemoveAllAurasOnEvade(); + m_creature->DeleteThreatList(); + m_creature->CombatStop(true); + + if (m_bIsDefeated) + m_creature->GetMotionMaster()->MoveIdle(); + else + { + if (m_creature->isAlive()) + m_creature->GetMotionMaster()->MoveTargetedHome(); + + m_creature->SetLootRecipient(NULL); + + Reset(); + } + } + + void DamageTaken(Unit* /*pDoneBy*/, uint32& uiDamage) override + { + if (uiDamage >= m_creature->GetHealth()) + { + uiDamage = 0; + + if (!m_bIsDefeated) + { + m_bIsDefeated = true; + m_uiEscapeTimer = 5000; + + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_NON_ATTACKABLE); + EnterEvadeMode(); + + // Note: the portal entry is guesswork! + m_creature->SummonCreature(NPC_WESTWIND_CREDIT_BUNNY, afPortalSpawnLoc[0], afPortalSpawnLoc[1], afPortalSpawnLoc[2], afPortalSpawnLoc[3], TEMPSUMMON_TIMED_DESPAWN, 20000); + DoScriptText(SAY_DEFEATED, m_creature); + + // kill credit + if (Player* pPlayer = m_creature->GetMap()->GetPlayer(m_playerGuid)) + pPlayer->RewardPlayerAndGroupAtEvent(NPC_WESTWIND_CREDIT_BUNNY, m_creature); + } + } + } + + void MovementInform(uint32 uiType, uint32 uiPointId) override + { + if (uiType != POINT_MOTION_TYPE || !uiPointId) + return; + + DoScriptText(SAY_ESCAPE, m_creature); + DoCastSpellIfCan(m_creature, SPELL_TELEPORT); + m_creature->ForcedDespawn(10000); + + if (Player* pPlayer = m_creature->GetMap()->GetPlayer(m_playerGuid)) + m_creature->SetFacingToObject(pPlayer); + } + + void JustSummoned(Creature* pSummoned) override + { + if (pSummoned->GetEntry() == NPC_WESTWIND_CREDIT_BUNNY) + pSummoned->CastSpell(pSummoned, SPELL_ADMIRAL_PORTAL, true); + } + + void UpdateAI(const uint32 uiDiff) override + { + if (m_uiEscapeTimer) + { + if (m_uiEscapeTimer <= uiDiff) + { + m_creature->SetWalk(true); + m_creature->GetMotionMaster()->MovePoint(1, afExitLocation[0], afExitLocation[1], afExitLocation[2]); + m_uiEscapeTimer = 0; + } + else + m_uiEscapeTimer -= uiDiff; + } + + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (!m_bIsTransform) + { + if (m_uiWhirlwindTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_WHIRLWIND) == CAST_OK) + m_uiWhirlwindTimer = urand(15000, 16000); + } + else + m_uiWhirlwindTimer -= uiDiff; + + if (m_uiHeroicStrikeTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_HEROIC_STRIKE_ADMIRAL) == CAST_OK) + m_uiHeroicStrikeTimer = urand(6000, 7000); + } + else + m_uiHeroicStrikeTimer -= uiDiff; + + if (m_uiCleaveTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_CLEAVE_ADMIRAL) == CAST_OK) + m_uiCleaveTimer = urand(6000, 7000); + } + else + m_uiCleaveTimer -= uiDiff; + + if (!m_bIsShield && m_creature->GetHealthPercent() <= 50.0f) + { + if (DoCastSpellIfCan(m_creature, SPELL_PROTECTION_SPHERE) == CAST_OK) + { + DoScriptText(SAY_SPHERE, m_creature); + m_bIsShield = true; + } + } + + if (m_creature->GetHealthPercent() <= 30.0f) + { + DoScriptText(SAY_TRANSFORM, m_creature); + m_creature->SetDisplayId(MODEL_ID_MALGANIS); + SetEquipmentSlots(false, EQUIP_UNEQUIP, EQUIP_NO_CHANGE, EQUIP_NO_CHANGE); + m_bIsTransform = true; + } + } + else + { + if (m_uiSleepTimer < uiDiff) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, SPELL_SLEEP) == CAST_OK) + m_uiSleepTimer = urand(15000, 16000); + } + } + else + m_uiSleepTimer -= uiDiff; + + if (m_uiBlastTimer < uiDiff) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, SPELL_MIND_BLAST) == CAST_OK) + m_uiBlastTimer = urand(8000, 9000); + } + } + else + m_uiBlastTimer -= uiDiff; + + if (m_uiCarrionTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_CARRION_SWARM) == CAST_OK) + m_uiCarrionTimer = urand(6000, 7000); + } + else + m_uiCarrionTimer -= uiDiff; + + if (!m_bIsYell && m_creature->GetHealthPercent() <= 20.0f) + { + if (DoCastSpellIfCan(m_creature, SPELL_VAMPIRIC_TOUCH) == CAST_OK) + { + DoScriptText(SAY_20_HP, m_creature); + m_bIsYell = true; + } + } + } + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_npc_grand_admiral_westwind(Creature* pCreature) +{ + return new npc_grand_admiral_westwindAI(pCreature); +} + +bool EffectDummyCreature_npc_grand_admiral_westwind(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget, ObjectGuid /*originalCasterGuid*/) +{ + if (uiSpellId == SPELL_NULLIFIER && uiEffIndex == EFFECT_INDEX_0 && pCaster->GetTypeId() == TYPEID_PLAYER) + { + if (!pCreatureTarget->HasAura(SPELL_PROTECTION_SPHERE)) + return true; + + pCreatureTarget->AI()->SendAIEvent(AI_EVENT_CUSTOM_A, pCaster, pCreatureTarget); + return true; + } + + return false; +} + void AddSC_icecrown() { Script* pNewScript; @@ -680,4 +961,10 @@ void AddSC_icecrown() pNewScript->pGossipHello = &GossipHello_npc_saronite_mine_slave; pNewScript->pGossipSelect = &GossipSelect_npc_saronite_mine_slave; pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_grand_admiral_westwind"; + pNewScript->GetAI = &GetAI_npc_grand_admiral_westwind; + pNewScript->pEffectDummyNPC = &EffectDummyCreature_npc_grand_admiral_westwind; + pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 6e3663fb4..d66a17fd4 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3129" + #define SD2_REVISION_NR "3130" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 28b9c8b0f..fe18cffc2 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -797,6 +797,7 @@ UPDATE creature_template SET ScriptName='npc_squad_leader' WHERE entry IN (31737 UPDATE creature_template SET ScriptName='npc_infantry' WHERE entry IN (31701,31832); UPDATE creature_template SET ScriptName='npc_father_kamaros' WHERE entry IN (31279,32800); UPDATE creature_template SET ScriptName='npc_saronite_mine_slave' WHERE entry=31397; +UPDATE creature_template SET ScriptName='npc_grand_admiral_westwind' WHERE entry=29621; /* IRONFORGE */ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 0a32594e9..d889af0e0 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -1285,7 +1285,15 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1001180,'Don\'t go toward the light, Mr. Floppy!',0,0,0,0,'emily SAY_FLOPPY_ALMOST_DEAD'), (-1001181,'Mr. Floppy, you\'re ok! Thank you so much for saving Mr. Floppy!',0,0,0,0,'emily SAY_SECOND_WOLF_DEFEAT'), (-1001182,'I think I see the camp! We\'re almost home, Mr. Floppy! Let\'s go!',0,0,0,0,'emily SAY_RESUME_ESCORT'), -(-1001183,'Thank you for helping me to get back to the camp. Go tell Walter that I\'m safe now!',0,0,0,0,'emily SAY_ESCORT_COMPLETE'); +(-1001183,'Thank you for helping me to get back to the camp. Go tell Walter that I\'m safe now!',0,0,0,0,'emily SAY_ESCORT_COMPLETE'), + +(-1001184,'How did you find me? Did Landgren tell?',14201,0,0,0,'admiral_westwind SAY_AGGRO'), +(-1001185,'You thought I would just let you kill me?',14205,0,0,0,'admiral_westwind SAY_SPHERE'), +(-1001186,'WHAT?! No matter. Even without my sphere, I will crush you! Behold my true identity and despair!',14207,1,0,0,'admiral_westwind SAY_NO_MATTER'), +(-1001187,'Gah! I spent too much time in that weak little shell.',14426,1,0,0,'malganis_icecrown SAY_TRANSFORM'), +(-1001188,'Kirel narak! I am Mal\'Ganis. I AM ETERNAL!',14427,1,0,0,'malganis_icecrown SAY_20_HP'), +(-1001189,'ENOUGH! I waste my time here. I must gather my strength on the homeworld.',14428,1,0,0,'malganis_icecrown SAY_DEFEATED'), +(-1001190,'You\'ll never defeat the Lich King without my forces. I\'ll have my revenge... on him AND you!',14429,1,0,0,'malganis_icecrown SAY_ESCAPE'); -- -1 033 000 SHADOWFANG KEEP INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES diff --git a/sql/updates/r3130_mangos.sql b/sql/updates/r3130_mangos.sql new file mode 100644 index 000000000..684053fd4 --- /dev/null +++ b/sql/updates/r3130_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_grand_admiral_westwind' WHERE entry=29621; diff --git a/sql/updates/r3130_scriptdev2.sql b/sql/updates/r3130_scriptdev2.sql new file mode 100644 index 000000000..fe4f3070e --- /dev/null +++ b/sql/updates/r3130_scriptdev2.sql @@ -0,0 +1,9 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1001190 AND -1001184; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1001184,'How did you find me? Did Landgren tell?',14201,0,0,0,'admiral_westwind SAY_AGGRO'), +(-1001185,'You thought I would just let you kill me?',14205,0,0,0,'admiral_westwind SAY_SPHERE'), +(-1001186,'WHAT?! No matter. Even without my sphere, I will crush you! Behold my true identity and despair!',14207,1,0,0,'admiral_westwind SAY_NO_MATTER'), +(-1001187,'Gah! I spent too much time in that weak little shell.',14426,1,0,0,'malganis_icecrown SAY_TRANSFORM'), +(-1001188,'Kirel narak! I am Mal\'Ganis. I AM ETERNAL!',14427,1,0,0,'malganis_icecrown SAY_20_HP'), +(-1001189,'ENOUGH! I waste my time here. I must gather my strength on the homeworld.',14428,1,0,0,'malganis_icecrown SAY_DEFEATED'), +(-1001190,'You\'ll never defeat the Lich King without my forces. I\'ll have my revenge... on him AND you!',14429,1,0,0,'malganis_icecrown SAY_ESCAPE'); From 137a3d95f324c03568918f5f9fab9dd74c6e8b42 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sun, 3 May 2015 01:26:16 +0200 Subject: [PATCH 1145/1172] [3131] Implement combat abilities for the Twin Val'kyrs - ToC25 This will complete the implementation of the Trial of the Crusader encounters --- .../boss_faction_champions.cpp | 4 +- .../boss_twin_valkyr.cpp | 312 +++++++++++++++++- .../instance_trial_of_the_crusader.cpp | 15 + .../trial_of_the_crusader.h | 8 +- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 2 + sql/updates/r3131_mangos.sql | 2 + 7 files changed, 332 insertions(+), 13 deletions(-) create mode 100644 sql/updates/r3131_mangos.sql diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_faction_champions.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_faction_champions.cpp index a2256d7c8..ac5564acd 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_faction_champions.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_faction_champions.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: faction_champions -SD%Complete: 30 -SDComment: Basic script only +SD%Complete: 90 +SDComment: AI might require some tweaks and improvements SDCategory: Crusader Coliseum EndScriptData */ diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp index d4d11fa02..9bb28c0f2 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp @@ -16,7 +16,7 @@ /* ScriptData SDName: trial_of_the_crusader -SD%Complete: 0 +SD%Complete: 100 SDComment: SDCategory: Crusader Coliseum EndScriptData */ @@ -35,8 +35,37 @@ enum SAY_TO_BLACK = -1649062, SAY_TO_WHITE = -1649063, + // generic spells SPELL_VALKYR_TWINS_HITTING_YA = 66073, - SPELL_TWIN_EMPATHY = 66133, + SPELL_POWER_OF_TWINS = 65916, // cast by the opposite twin during the Pact casting + SPELL_BERSERK = 64238, + SPELL_CLEAR_VALKYR_ESSENCE = 67547, + SPELL_CLEAR_VALKYR_TOUCH = 68084, + + // Fjola + SPELL_SURGE_OF_LIGHT = 65766, // aggro spell + SPELL_TWIN_SPIKE_LIGHT = 66075, + SPELL_LIGHT_TOUCH = 65950, + SPELL_SHIELD_OF_LIGHTS = 65858, // special abilities + SPELL_TWINS_PACT_LIGHT = 65876, + SPELL_LIGHT_VORTEX = 66046, + SPELL_LIGHT_BULLET_SUMMON_TRIGGER = 66140, // bullet summon spells (both cast by Fjola) + SPELL_DARK_BULLET_SUMMON_TRIGGER = 66141, + + // Eydis + SPELL_SURGE_OF_DARKNESS = 65768, // aggro spell + SPELL_TWIN_SPIKE_DARK = 66069, + SPELL_DARK_TOUCH = 66001, + SPELL_SHIELD_OF_DARKNESS = 65874, // special abilities + SPELL_TWINS_PACT_DARK = 65875, + SPELL_DARK_VORTEX = 66058, + + // Concentrated bullets + SPELL_LIGHT_BALL_PASSIVE = 65794, + SPELL_DARK_BALL_PASSIVE = 65796, + + NPC_CONCENTRATED_DARKNESS = 34628, + NPC_CONCENTRATED_LIGHT = 34630, }; /*###### @@ -47,31 +76,62 @@ struct boss_fjolaAI : public ScriptedAI { boss_fjolaAI(Creature* pCreature) : ScriptedAI(pCreature) { - m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_pInstance = (instance_trial_of_the_crusader*)pCreature->GetInstanceData(); Reset(); } - ScriptedInstance* m_pInstance; + instance_trial_of_the_crusader* m_pInstance; + + uint32 m_uiTwinSpikeTimer; + uint32 m_uiTouchTimer; + uint32 m_uiBerserkTimer; + uint32 m_uiSpecialAbilityTimer; + uint32 m_uiSummonTimer; + + bool m_bIsVortex; + bool m_bIsLightTwin; void Reset() override { DoCastSpellIfCan(m_creature, SPELL_VALKYR_TWINS_HITTING_YA); + + m_uiTwinSpikeTimer = 7000; + m_uiTouchTimer = 10000; + m_uiSpecialAbilityTimer = 45000; + m_uiSummonTimer = 25000; + m_uiBerserkTimer = 8 * MINUTE * IN_MILLISECONDS; + + // always start with light twin pact + m_bIsLightTwin = true; + m_bIsVortex = false; + + if (m_pInstance && m_pInstance->IsHeroicDifficulty()) + m_uiBerserkTimer = 6 * MINUTE * IN_MILLISECONDS; } void Aggro(Unit* /*pWho*/) override { DoScriptText(SAY_AGGRO, m_creature); + DoCastSpellIfCan(m_creature, SPELL_SURGE_OF_LIGHT); if (m_pInstance && m_pInstance->GetData(TYPE_TWIN_VALKYR) != IN_PROGRESS) m_pInstance->SetData(TYPE_TWIN_VALKYR, IN_PROGRESS); } + void KilledUnit(Unit* pVictim) override + { + DoScriptText(urand(0, 1) ? SAY_SLAY_1 : SAY_SLAY_2, m_creature); + } + void JustDied(Unit* /*pKiller*/) override { DoScriptText(SAY_DEATH, m_creature); if (m_pInstance && m_pInstance->GetData(TYPE_TWIN_VALKYR) != DONE) m_pInstance->SetData(TYPE_TWIN_VALKYR, DONE); + + DoCastSpellIfCan(m_creature, SPELL_CLEAR_VALKYR_ESSENCE, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_CLEAR_VALKYR_TOUCH, CAST_TRIGGERED); } void EnterEvadeMode() override @@ -79,15 +139,128 @@ struct boss_fjolaAI : public ScriptedAI if (m_pInstance && m_pInstance->GetData(TYPE_TWIN_VALKYR) != FAIL) m_pInstance->SetData(TYPE_TWIN_VALKYR, FAIL); + DoCastSpellIfCan(m_creature, SPELL_CLEAR_VALKYR_ESSENCE, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_CLEAR_VALKYR_TOUCH, CAST_TRIGGERED); + // cleanup handled by creature linking m_creature->ForcedDespawn(); } - void UpdateAI(const uint32 /*uiDiff*/) override + void JustSummoned(Creature* pSummoned) override + { + if (pSummoned->GetEntry() == NPC_CONCENTRATED_LIGHT) + pSummoned->CastSpell(pSummoned, SPELL_LIGHT_BALL_PASSIVE, true); + else if (pSummoned->GetEntry() == NPC_CONCENTRATED_DARKNESS) + pSummoned->CastSpell(pSummoned, SPELL_DARK_BALL_PASSIVE, true); + } + + // function that handles the special ability for both twins + bool DoCastSpecialAbility() + { + if (!m_pInstance) + return false; + + // choose the caster; it always alternates + Unit* pCaster = NULL; + uint32 uiSpell = 0; + uint32 uiShieldSpell = 0; + + if (m_bIsLightTwin) + pCaster = m_creature; + else + { + Creature* pEydis = m_pInstance->GetSingleCreatureFromStorage(NPC_EYDIS); + if (!pEydis) + return false; + + pCaster = pEydis; + } + + if (!pCaster) + return false; + + // select and cast ability + if (m_bIsVortex) + { + uiSpell = m_bIsLightTwin ? SPELL_LIGHT_VORTEX : SPELL_DARK_VORTEX; + pCaster->CastSpell(pCaster, uiSpell, false); + } + else + { + uiSpell = m_bIsLightTwin ? SPELL_TWINS_PACT_LIGHT : SPELL_TWINS_PACT_DARK; + uiShieldSpell = m_bIsLightTwin ? SPELL_SHIELD_OF_LIGHTS : SPELL_SHIELD_OF_DARKNESS; + pCaster->CastSpell(pCaster, uiSpell, false); + pCaster->CastSpell(pCaster, uiShieldSpell, true); + } + + m_bIsVortex = urand(0, 1) ? true : false; + m_bIsLightTwin = !m_bIsLightTwin; + return true; + } + + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; + // special ability spell + if (m_uiSpecialAbilityTimer < uiDiff) + { + if (DoCastSpecialAbility()) + m_uiSpecialAbilityTimer = 45000; + } + else + m_uiSpecialAbilityTimer -= uiDiff; + + if (m_uiSummonTimer < uiDiff) + { + DoCastSpellIfCan(m_creature, SPELL_LIGHT_BULLET_SUMMON_TRIGGER, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_DARK_BULLET_SUMMON_TRIGGER, CAST_TRIGGERED); + m_uiSummonTimer = 30000; + } + else + m_uiSummonTimer -= uiDiff; + + // berserk spell + if (m_uiBerserkTimer) + { + if (m_uiBerserkTimer <= uiDiff) + { + // handle berserk for both twins + if (DoCastSpellIfCan(m_creature, SPELL_BERSERK) == CAST_OK) + { + if (m_pInstance) + { + if (Creature* pEydis = m_pInstance->GetSingleCreatureFromStorage(NPC_EYDIS)) + pEydis->CastSpell(pEydis, SPELL_BERSERK, true); + } + m_uiBerserkTimer = 0; + } + } + else + m_uiBerserkTimer -= uiDiff; + } + + if (m_uiTwinSpikeTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_TWIN_SPIKE_LIGHT) == CAST_OK) + m_uiTwinSpikeTimer = 10000; + } + else + m_uiTwinSpikeTimer -= uiDiff; + + // heroic abilities + if (m_pInstance && m_pInstance->IsHeroicDifficulty()) + { + if (m_uiTouchTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_LIGHT_TOUCH) == CAST_OK) + m_uiTouchTimer = 20000; + } + else + m_uiTouchTimer -= uiDiff; + } + DoMeleeAttackIfReady(); } }; @@ -103,23 +276,66 @@ CreatureAI* GetAI_boss_fjola(Creature* pCreature) struct boss_eydisAI : public ScriptedAI { - boss_eydisAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + boss_eydisAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (instance_trial_of_the_crusader*)pCreature->GetInstanceData(); + Reset(); + } + + instance_trial_of_the_crusader* m_pInstance; + + uint32 m_uiTwinSpikeTimer; + uint32 m_uiTouchTimer; void Reset() override { DoCastSpellIfCan(m_creature, SPELL_VALKYR_TWINS_HITTING_YA); + + m_uiTwinSpikeTimer = 7000; + m_uiTouchTimer = 10000; } void Aggro(Unit* /*pWho*/) override { DoScriptText(SAY_AGGRO, m_creature); + DoCastSpellIfCan(m_creature, SPELL_SURGE_OF_DARKNESS); + } + + void KilledUnit(Unit* pVictim) override + { + DoScriptText(urand(0, 1) ? SAY_SLAY_1 : SAY_SLAY_2, m_creature); } - void UpdateAI(const uint32 /*uiDiff*/) override + void JustDied(Unit* /*pKiller*/) override + { + DoScriptText(SAY_DEATH, m_creature); + } + + void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; + if (m_uiTwinSpikeTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_TWIN_SPIKE_DARK) == CAST_OK) + m_uiTwinSpikeTimer = 10000; + } + else + m_uiTwinSpikeTimer -= uiDiff; + + // heroic abilities + if (m_pInstance && m_pInstance->IsHeroicDifficulty()) + { + if (m_uiTouchTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_DARK_TOUCH) == CAST_OK) + m_uiTouchTimer = 20000; + } + else + m_uiTouchTimer -= uiDiff; + } + DoMeleeAttackIfReady(); } }; @@ -129,6 +345,76 @@ CreatureAI* GetAI_boss_eydis(Creature* pCreature) return new boss_eydisAI(pCreature); } +/*###### +## npc_concentrated_bullet +######*/ + +struct npc_concentrated_bulletAI : public ScriptedAI +{ + npc_concentrated_bulletAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (instance_trial_of_the_crusader*)pCreature->GetInstanceData(); + Reset(); + } + + instance_trial_of_the_crusader* m_pInstance; + + GuidVector m_vStalkersGuids; + + void Reset() override + { + // get the list of summoned stalkers and move to a randome one + if (m_pInstance) + m_pInstance->GetStalkersGUIDVector(m_vStalkersGuids); + + if (m_vStalkersGuids.empty()) + return; + + m_creature->SetWalk(false); + if (Creature* pStalker = m_creature->GetMap()->GetCreature(m_vStalkersGuids[urand(0, m_vStalkersGuids.size() - 1)])) + m_creature->GetMotionMaster()->MovePoint(1, pStalker->GetPositionX(), pStalker->GetPositionY(), pStalker->GetPositionZ()); + } + + void MovementInform(uint32 uiMotionType, uint32 uiPointId) override + { + if (uiMotionType != POINT_MOTION_TYPE || !uiPointId) + return; + + // move to another random stalker + if (Creature* pStalker = m_creature->GetMap()->GetCreature(m_vStalkersGuids[urand(0, m_vStalkersGuids.size() - 1)])) + m_creature->GetMotionMaster()->MovePoint(1, pStalker->GetPositionX(), pStalker->GetPositionY(), pStalker->GetPositionZ()); + } + + void AttackStart(Unit* /*pWho*/) override { } + void MoveInLineOfSight(Unit* /*pWho*/) override { } + void UpdateAI(const uint32 /*uiDiff*/) override { } +}; + +CreatureAI* GetAI_npc_concentrated_bullet(Creature* pCreature) +{ + return new npc_concentrated_bulletAI(pCreature); +} + +/*###### +## npc_valkyr_stalker +######*/ + +// TODO Remove this 'script' when combat can be proper prevented from core-side +struct npc_valkyr_stalkerAI : public Scripted_NoMovementAI +{ + npc_valkyr_stalkerAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { Reset(); } + + void Reset() override { } + void AttackStart(Unit* /*pWho*/) override { } + void MoveInLineOfSight(Unit* /*pWho*/) override { } + void UpdateAI(const uint32 /*uiDiff*/) override { } +}; + +CreatureAI* GetAI_npc_valkyr_stalker(Creature* pCreature) +{ + return new npc_valkyr_stalkerAI(pCreature); +} + void AddSC_twin_valkyr() { Script* pNewScript; @@ -140,6 +426,16 @@ void AddSC_twin_valkyr() pNewScript = new Script; pNewScript->Name = "boss_eydis"; - pNewScript->GetAI = &GetAI_boss_fjola; + pNewScript->GetAI = &GetAI_boss_eydis; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_concentrated_bullet"; + pNewScript->GetAI = &GetAI_npc_concentrated_bullet; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_valkyr_stalker"; + pNewScript->GetAI = &GetAI_npc_valkyr_stalker; pNewScript->RegisterSelf(); } diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp index 6c61d8757..1f24cbedb 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp @@ -204,6 +204,10 @@ void instance_trial_of_the_crusader::OnCreatureCreate(Creature* pCreature) case NPC_MISTRESS_OF_PAIN: m_lSummonedGuidsList.push_back(pCreature->GetObjectGuid()); return; + case NPC_VALKYR_STALKER_DARK: + case NPC_VALKYR_STALKER_LIGHT: + m_vStalkersGuidsVector.push_back(pCreature->GetObjectGuid()); + return; default: return; } @@ -604,6 +608,11 @@ void instance_trial_of_the_crusader::DoSetCrusadersInCombat(Unit* pTarget) if (Creature* pCrusader = instance->GetCreature(m_vCrusadersGuidsVector[i])) pCrusader->AI()->AttackStart(pTarget); } + + if (Creature* pPet = GetSingleCreatureFromStorage(NPC_ZHAAGRYM, true)) + pPet->AI()->AttackStart(pTarget); + if (Creature* pPet = GetSingleCreatureFromStorage(NPC_CAT, true)) + pPet->AI()->AttackStart(pTarget); } // Function that will open and close the main gate @@ -821,9 +830,15 @@ void instance_trial_of_the_crusader::JustDidDialogueStep(int32 iEntry) break; case EVENT_TWINS_ATTACK: if (Creature* pTwin = GetSingleCreatureFromStorage(NPC_FJOLA)) + { pTwin->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE | UNIT_FLAG_PASSIVE); + pTwin->CastSpell(pTwin, SPELL_TWIN_EMPATHY_LIGHT, true); + } if (Creature* pTwin = GetSingleCreatureFromStorage(NPC_EYDIS)) + { pTwin->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE | UNIT_FLAG_PASSIVE); + pTwin->CastSpell(pTwin, SPELL_TWIN_EMPATHY_DARK, true); + } break; case SAY_LKING_ANUB_INTRO_1: if (Player* pPlayer = GetPlayerInMap()) diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h index e29608a43..7cb06bc73 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h @@ -42,8 +42,8 @@ enum NPC_BEASTS_CONTROLLER = 35014, NPC_CHAMPIONS_CONTROLLER = 34781, NPC_VALKYR_TWINS_CONTROLLER = 34743, - // NPC_VALKYR_STALKER_DARK = 34704, // summons 34628 using 66107 - // NPC_VALKYR_STALKER_LIGHT = 34720, // summons 34630 using 66078 + NPC_VALKYR_STALKER_DARK = 34704, // summons 34628 using 66107 + NPC_VALKYR_STALKER_LIGHT = 34720, // summons 34630 using 66078 NPC_GORMOK = 34796, NPC_ACIDMAW = 35144, @@ -149,6 +149,8 @@ enum SPELL_ANCHOR_HERE = 45313, // change respawn coords to the current position SPELL_ENCOUNTER_KILL_CREDIT = 68184, // kill credit for faction champions SPELL_RESILIENCE_FIX_CREDIT = 68620, // server side spell for achievs 3798, 3814 + SPELL_TWIN_EMPATHY_LIGHT = 66132, // damage share aura; targets dark twin (Eydis) + SPELL_TWIN_EMPATHY_DARK = 66133, // damage share aura; targets light twin (Fjola) SPELL_ARTHAS_PORTAL = 51807, SPELL_FROSTNOVA = 68198, SPELL_CORPSE_TELEPORT = 69016, // NYI @@ -297,6 +299,7 @@ class instance_trial_of_the_crusader : public ScriptedInstance, private Dialogue bool Is25ManDifficulty() { return instance->GetDifficulty() == RAID_DIFFICULTY_25MAN_NORMAL || instance->GetDifficulty() == RAID_DIFFICULTY_25MAN_HEROIC; } uint32 GetPlayerTeam() { return m_uiTeam; } + void GetStalkersGUIDVector(GuidVector& vVector) { vVector = m_vStalkersGuidsVector; } const char* Save() const override { return m_strInstData.c_str(); } void Load(const char* chrIn) override; @@ -322,6 +325,7 @@ class instance_trial_of_the_crusader : public ScriptedInstance, private Dialogue std::vector m_vCrusadersEntries; GuidVector m_vCrusadersGuidsVector; + GuidVector m_vStalkersGuidsVector; GuidList m_lSummonedGuidsList; Team m_uiTeam; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index d66a17fd4..7b56cd4ed 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3130" + #define SD2_REVISION_NR "3131" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index fe18cffc2..5ceec5119 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -511,6 +511,8 @@ UPDATE creature_template SET ScriptName='boss_jaraxxus' WHERE entry=34780; UPDATE creature_template SET ScriptName='boss_anubarak_trial' WHERE entry=34564; UPDATE creature_template SET ScriptName='boss_fjola' WHERE entry=34497; UPDATE creature_template SET ScriptName='boss_eydis' WHERE entry=34496; +UPDATE creature_template SET ScriptName='npc_concentrated_bullet' WHERE entry IN (34628,34630); +UPDATE creature_template SET ScriptName='npc_valkyr_stalker' WHERE entry IN (34628,34630); UPDATE creature_template SET ScriptName='npc_anubarak_spike' WHERE entry=34660; UPDATE creature_template SET ScriptName='npc_frost_sphere' WHERE entry=34606; UPDATE creature_template SET ScriptName='npc_nerubian_borrow' WHERE entry=34862; diff --git a/sql/updates/r3131_mangos.sql b/sql/updates/r3131_mangos.sql new file mode 100644 index 000000000..e739a2893 --- /dev/null +++ b/sql/updates/r3131_mangos.sql @@ -0,0 +1,2 @@ +UPDATE creature_template SET ScriptName='npc_concentrated_bullet' WHERE entry IN (34628,34630); +UPDATE creature_template SET ScriptName='npc_valkyr_stalker' WHERE entry IN (34704,34720); From 76d8264bb6ceaf7ae1f2347a764c885c4411adfb Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sun, 3 May 2015 01:27:53 +0200 Subject: [PATCH 1146/1172] [3132] Remove workaround for the Blood Prince Council - ICC This is no longer required after Cmangos [12870] --- .../icecrown_citadel/blood_prince_council.cpp | 8 -------- sd2_revision_nr.h | 2 +- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/blood_prince_council.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/blood_prince_council.cpp index 7dbeee3dd..83ed63f8d 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/blood_prince_council.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/blood_prince_council.cpp @@ -523,14 +523,6 @@ struct blood_prince_council_baseAI : public ScriptedAI // Damage is shared by the Blood Orb Control npc if (!m_uiEmpowermentTimer) uiDamage = 0; - - // ##### Workaround for missing aura 300 - Remove when this is implemented in core ##### - if (!m_pInstance || !uiDamage) - return; - - if (Creature* pOrb = m_pInstance->GetSingleCreatureFromStorage(NPC_BLOOD_ORB_CONTROL)) - pOrb->DealDamage(pOrb, uiDamage, NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); - // ##### End of workaround ##### } void SpellHit(Unit* pCaster, const SpellEntry* pSpell) override diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 7b56cd4ed..4185831e8 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3131" + #define SD2_REVISION_NR "3132" #endif // __SD2_REVISION_NR_H__ From fce8d293c258c8f1598ec79ccde4cd6a643f0403 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sun, 3 May 2015 13:46:50 +0200 Subject: [PATCH 1147/1172] [3133] Fix Nightbane intro behavior - Karazhan Thanks to @Tafuna --- .../karazhan/boss_nightbane.cpp | 25 +++++++++---------- .../karazhan/instance_karazhan.cpp | 23 +++++++++++++++++ scripts/eastern_kingdoms/karazhan/karazhan.h | 2 ++ sd2_revision_nr.h | 2 +- 4 files changed, 38 insertions(+), 14 deletions(-) diff --git a/scripts/eastern_kingdoms/karazhan/boss_nightbane.cpp b/scripts/eastern_kingdoms/karazhan/boss_nightbane.cpp index b62e91493..f425b59e4 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_nightbane.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_nightbane.cpp @@ -81,10 +81,13 @@ struct boss_nightbaneAI : public npc_escortAI uint32 m_uiSmokingBlastTimer; uint32 m_uiFireballBarrageTimer; + bool m_bCombatStarted; + void Reset() override { m_uiPhase = PHASE_GROUND; m_uiFlightPhase = 1; + m_bCombatStarted = false; m_uiBellowingRoarTimer = urand(20000, 30000); m_uiCharredEarthTimer = urand(10000, 15000); @@ -116,19 +119,13 @@ struct boss_nightbaneAI : public npc_escortAI m_pInstance->SetData(TYPE_NIGHTBANE, DONE); } - void JustReachedHome() override + void EnterEvadeMode() override { if (m_pInstance) m_pInstance->SetData(TYPE_NIGHTBANE, FAIL); - // Reset escort waypoints - npc_escortAI::JustRespawned(); - } - - void EnterEvadeMode() override - { - // Use standard AI evade, in order to reset position - ScriptedAI::EnterEvadeMode(); + // reset boss on evade + m_creature->ForcedDespawn(); } void WaypointReached(uint32 uiPointId) override @@ -141,19 +138,21 @@ struct boss_nightbaneAI : public npc_escortAI m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); m_creature->RemoveByteFlag(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_FLY_ANIM); + m_bCombatStarted = true; m_creature->SetInCombatWithZone(); } } void MovementInform(uint32 uiMotionType, uint32 uiPointId) override { - if (uiMotionType != POINT_MOTION_TYPE) - return; - - if (!m_creature->getVictim()) + // avoid overlapping of escort and combat movement + if (!m_bCombatStarted) npc_escortAI::MovementInform(uiMotionType, uiPointId); else { + if (uiMotionType != POINT_MOTION_TYPE) + return; + switch (uiPointId) { case POINT_ID_AIR: diff --git a/scripts/eastern_kingdoms/karazhan/instance_karazhan.cpp b/scripts/eastern_kingdoms/karazhan/instance_karazhan.cpp index ca055e035..6f5fefc4d 100644 --- a/scripts/eastern_kingdoms/karazhan/instance_karazhan.cpp +++ b/scripts/eastern_kingdoms/karazhan/instance_karazhan.cpp @@ -43,6 +43,7 @@ instance_karazhan::instance_karazhan(Map* pMap) : ScriptedInstance(pMap), m_uiOzDeathCount(0), m_uiTeam(0), m_uiChessResetTimer(0), + m_uiNightbaneResetTimer(0), m_uiAllianceStalkerCount(0), m_uiHordeStalkerCount(0), m_bFriendlyGame(false) @@ -165,6 +166,7 @@ void instance_karazhan::OnObjectCreate(GameObject* pGo) case GO_DUST_COVERED_CHEST: case GO_MASTERS_TERRACE_DOOR_1: case GO_MASTERS_TERRACE_DOOR_2: + case GO_BLACKENED_URN: break; // Opera event backgrounds @@ -303,6 +305,10 @@ void instance_karazhan::SetData(uint32 uiType, uint32 uiData) m_auiEncounter[uiType] = uiData; DoUseDoorOrButton(GO_MASTERS_TERRACE_DOOR_1); DoUseDoorOrButton(GO_MASTERS_TERRACE_DOOR_2); + + // reset event on timer + if (uiData == FAIL) + m_uiNightbaneResetTimer = 30000; break; // Store the event type for the Opera case TYPE_OPERA_PERFORMANCE: @@ -601,6 +607,23 @@ void instance_karazhan::Update(uint32 uiDiff) else m_uiChessResetTimer -= uiDiff; } + + // reset Nightbane encounter + if (m_uiNightbaneResetTimer) + { + if (m_uiNightbaneResetTimer <= uiDiff) + { + if (Creature* pNightbane = GetSingleCreatureFromStorage(NPC_NIGHTBANE)) + pNightbane->Respawn(); + + if (GameObject* pUrn = GetSingleGameObjectFromStorage(GO_BLACKENED_URN)) + pUrn->ResetDoorOrButton(); + + m_uiNightbaneResetTimer = 0; + } + else + m_uiNightbaneResetTimer -= uiDiff; + } } InstanceData* GetInstanceData_instance_karazhan(Map* pMap) diff --git a/scripts/eastern_kingdoms/karazhan/karazhan.h b/scripts/eastern_kingdoms/karazhan/karazhan.h index f2c381dcd..08c5806bb 100644 --- a/scripts/eastern_kingdoms/karazhan/karazhan.h +++ b/scripts/eastern_kingdoms/karazhan/karazhan.h @@ -90,6 +90,7 @@ enum GO_DUST_COVERED_CHEST = 185119, GO_MASTERS_TERRACE_DOOR_1 = 184274, GO_MASTERS_TERRACE_DOOR_2 = 184280, + GO_BLACKENED_URN = 194092, // Opera event stage decoration GO_OZ_BACKDROP = 183442, @@ -180,6 +181,7 @@ class instance_karazhan : public ScriptedInstance uint32 m_uiOzDeathCount; uint32 m_uiTeam; // Team of first entered player, used for the Chess event uint32 m_uiChessResetTimer; + uint32 m_uiNightbaneResetTimer; uint8 m_uiAllianceStalkerCount; uint8 m_uiHordeStalkerCount; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 4185831e8..9817918fe 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3132" + #define SD2_REVISION_NR "3133" #endif // __SD2_REVISION_NR_H__ From 1e36357c2a95b3c7958f3be3619ba377ede152c7 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sun, 3 May 2015 15:21:12 +0200 Subject: [PATCH 1148/1172] [3134] Update Nazan - Hellfire Ramparts This will fix the fireball behavior --- .../boss_nazan_and_vazruden.cpp | 31 +++++-------------- sd2_revision_nr.h | 2 +- 2 files changed, 8 insertions(+), 25 deletions(-) diff --git a/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_nazan_and_vazruden.cpp b/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_nazan_and_vazruden.cpp index 689128cc2..dbb56148d 100644 --- a/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_nazan_and_vazruden.cpp +++ b/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_nazan_and_vazruden.cpp @@ -43,13 +43,12 @@ enum SPELL_REVENGE_H = 40392, // nazan - SPELL_FIREBALL = 30691, // This and the next while flying (dmg values will change in cata) - SPELL_FIREBALL_B = 33793, - SPELL_FIREBALL_H = 32491, - SPELL_FIREBALL_B_H = 33794, - SPELL_FIREBALL_LAND = 34653, // While landed - SPELL_FIREBALL_LAND_H = 36920, - + //SPELL_FIREBALL_H = 32491, // purpose unk; not sure if they are related to this encounter + //SPELL_FIREBALL_B_H = 33794, + SPELL_FIREBALL = 34653, + SPELL_FIREBALL_H = 36920, + //SPELL_FIREBALL_LAND = 30691, // cast while on land? + //SPELL_FIREBALL_LAND_H = 33793, SPELL_CONE_OF_FIRE = 30926, SPELL_CONE_OF_FIRE_H = 36921, @@ -86,7 +85,6 @@ struct boss_vazruden_heraldAI : public ScriptedAI bool m_bIsDescending; uint32 m_uiMovementTimer; uint32 m_uiFireballTimer; - uint32 m_uiFireballBTimer; uint32 m_uiConeOfFireTimer; uint32 m_uiBellowingRoarTimer; @@ -106,7 +104,6 @@ struct boss_vazruden_heraldAI : public ScriptedAI m_lastSeenPlayerGuid.Clear(); m_vazrudenGuid.Clear(); m_uiFireballTimer = 0; - m_uiFireballBTimer = 2100; m_uiConeOfFireTimer = urand(8100, 19700); m_uiBellowingRoarTimer = 100; // TODO Guesswork, though such an AoE fear soon after landing seems fitting @@ -294,20 +291,6 @@ struct boss_vazruden_heraldAI : public ScriptedAI } else m_uiFireballTimer -= uiDiff; - - if (m_uiFireballBTimer < uiDiff) - { - if (Creature* pVazruden = m_creature->GetMap()->GetCreature(m_vazrudenGuid)) - { - if (Unit* pEnemy = pVazruden->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) - { - if (DoCastSpellIfCan(pEnemy, m_bIsRegularMode ? SPELL_FIREBALL_B : SPELL_FIREBALL_B_H, 0, pVazruden->GetObjectGuid()) == CAST_OK) - m_uiFireballBTimer = 15700; - } - } - } - else - m_uiFireballBTimer -= uiDiff; } if (m_creature->GetHealthPercent() < 20.0f) @@ -321,7 +304,7 @@ struct boss_vazruden_heraldAI : public ScriptedAI { if (Unit* pEnemy = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) { - if (DoCastSpellIfCan(pEnemy, m_bIsRegularMode ? SPELL_FIREBALL_LAND : SPELL_FIREBALL_LAND_H) == CAST_OK) + if (DoCastSpellIfCan(pEnemy, m_bIsRegularMode ? SPELL_FIREBALL : SPELL_FIREBALL_H) == CAST_OK) m_uiFireballTimer = urand(7300, 13200); } } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 9817918fe..c25110f51 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3133" + #define SD2_REVISION_NR "3134" #endif // __SD2_REVISION_NR_H__ From 3d0ddd37da0aa9acc525a9fc7897822ba4dfdce0 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sun, 3 May 2015 20:31:07 +0200 Subject: [PATCH 1149/1172] [3135] Implement very basic script for Halls of Reflection instance --- .../halls_of_reflection/halls_of_reflection.h | 110 +++++++++++++ .../instance_halls_of_reflection.cpp | 152 +++++++++++++++++- .../frozen_halls/pit_of_saron/pit_of_saron.h | 9 +- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 1 + sql/updates/r3135_mangos.sql | 1 + 6 files changed, 270 insertions(+), 5 deletions(-) create mode 100644 sql/updates/r3135_mangos.sql diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/halls_of_reflection.h b/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/halls_of_reflection.h index 1fc83fe24..42b190f3c 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/halls_of_reflection.h +++ b/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/halls_of_reflection.h @@ -1,3 +1,113 @@ /* This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ + +#ifndef DEF_ICECROWN_HOR_H +#define DEF_ICECROWN_HOR_H + +enum +{ + MAX_ENCOUNTER = 3, + + TYPE_FALRIC = 0, + TYPE_MARWYN = 1, + TYPE_LICH_KING = 2, + + NPC_FALRIC = 38112, + NPC_MARWYN = 38113, + NPC_LICH_KING = 37226, + + NPC_JAINA_PART1 = 37221, + NPC_JAINA_PART2 = 36955, + NPC_SYLVANAS_PART1 = 37223, + NPC_SYLVANAS_PART2 = 37554, + NPC_KILARA = 37583, + NPC_ELANDRA = 37774, + NPC_LORALEN = 37779, + NPC_KORELN = 37582, + + // intro related npcs + NPC_UTHER = 37225, + NPC_LICH_KING_INTRO = 36954, + NPC_FROSTMOURNE_ALTER_BUNNY = 37704, // dummy trigger for Quel'Delar + NPC_QUEL_DELAR = 37158, + + // spirit event creatures + NPC_SPECTRAL_FOOTMAN = 38173, + NPC_SHADOWY_MERCENARY = 38177, + NPC_PHANTOM_MAGE = 38172, + NPC_GHOSTLY_PRIEST = 38175, + NPC_TORTURED_RIFLEMAN = 38176, + + // escape event creatures + NPC_RAGING_GHOUL = 36940, + NPC_RISEN_WHITCH_DOCTOR = 36941, + NPC_LUMBERING_ABONIMATION = 37069, + NPC_ICE_WALL_TARGET = 37014, // dummy ice wall target + + // objects + GO_ICECROWN_DOOR_ENTRANCE = 201976, // entrance door; used in combat during the spirit event + GO_IMPENETRABLE_DOOR = 197341, // door after the spirit event + GO_ICECROWN_DOOR_LK_ENTRANCE = 197342, // door before the Lich King + GO_ICECROWN_DOOR_LK_EXIT = 197343, // door after the Lich King + GO_FROSTMOURNE_ALTAR = 202236, + GO_FROSTMOURNE = 202302, + + GO_ICE_WALL = 201385, // summoned during the Lich King escape + GO_CAVE_IN = 201596, // door after the final encounter + GO_PORTAL_DALARAN = 202079, + GO_THE_SKYBREAKER = 201598, + GO_OGRIMS_HAMMER = 201581, + + GO_CAPTAIN_CHEST_HORDE = 202212, + GO_CAPTAIN_CHEST_HORDE_H = 202337, + GO_CAPTAIN_CHEST_ALLIANCE = 201710, + GO_CAPTAIN_CHEST_ALLIANCE_H = 202336, + + // world states + WORLD_STATE_SPIRIT_WAVES = 4884, + WORLD_STATE_SPIRIT_WAVES_COUNT = 4882, +}; + +struct EventNpcLocations +{ + uint32 uiEntryHorde, uiEntryAlliance; + float fX, fY, fZ, fO; + float fMoveX, fMoveY, fMoveZ; +}; + +const EventNpcLocations aEventBeginLocations[2] = +{ + {NPC_SYLVANAS_PART1, NPC_JAINA_PART1, 5236.659f, 1929.894f, 707.7781f, 0.87f}, + {NPC_LORALEN, NPC_KORELN, 5232.680f, 1931.460f, 707.7781f, 0.83f}, +}; + +class instance_halls_of_reflection : public ScriptedInstance +{ + public: + instance_halls_of_reflection(Map* pMap); + ~instance_halls_of_reflection() {} + + void Initialize() override; + + void OnCreatureCreate(Creature* pCreature) override; + void OnObjectCreate(GameObject* pGo) override; + + void OnPlayerEnter(Player* pPlayer) override; + + void SetData(uint32 uiType, uint32 uiData) override; + uint32 GetData(uint32 uiType) const override; + + uint32 GetPlayerTeam() { return m_uiTeam; } + + const char* Save() const override { return m_strInstData.c_str(); } + void Load(const char* chrIn) override; + + protected: + uint32 m_auiEncounter[MAX_ENCOUNTER]; + std::string m_strInstData; + + uint32 m_uiTeam; // Team of first entered player, used to set if Jaina or Silvana to spawn +}; + +#endif diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/instance_halls_of_reflection.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/instance_halls_of_reflection.cpp index d954bfedb..aa0bdae39 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/instance_halls_of_reflection.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/instance_halls_of_reflection.cpp @@ -16,13 +16,161 @@ /* ScriptData SDName: instance_halls_of_reflection -SD%Complete: 0 -SDComment: Placeholder +SD%Complete: 10 +SDComment: Basic support SDCategory: Halls of Reflection EndScriptData */ #include "precompiled.h" +#include "halls_of_reflection.h" + +instance_halls_of_reflection::instance_halls_of_reflection(Map* pMap) : ScriptedInstance(pMap), + m_uiTeam(TEAM_NONE) +{ + Initialize(); +} + +void instance_halls_of_reflection::Initialize() +{ + memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); +} + +void instance_halls_of_reflection::OnPlayerEnter(Player* pPlayer) +{ + if (!m_uiTeam) // very first player to enter + { + m_uiTeam = pPlayer->GetTeam(); + + // Spawn intro npcs + for (uint8 i = 0; i < countof(aEventBeginLocations); ++i) + { + pPlayer->SummonCreature(m_uiTeam == HORDE ? aEventBeginLocations[i].uiEntryHorde : aEventBeginLocations[i].uiEntryAlliance, + aEventBeginLocations[i].fX, aEventBeginLocations[i].fY, aEventBeginLocations[i].fZ, aEventBeginLocations[i].fO, TEMPSUMMON_DEAD_DESPAWN, 0); + } + } +} + +void instance_halls_of_reflection::OnCreatureCreate(Creature* pCreature) +{ + switch (pCreature->GetEntry()) + { + case NPC_JAINA_PART1: + case NPC_JAINA_PART2: + case NPC_SYLVANAS_PART1: + case NPC_SYLVANAS_PART2: + case NPC_FALRIC: + case NPC_MARWYN: + case NPC_LICH_KING: + break; + default: + return; + } + m_mNpcEntryGuidStore[pCreature->GetEntry()] = pCreature->GetObjectGuid(); +} + +void instance_halls_of_reflection::OnObjectCreate(GameObject* pGo) +{ + switch (pGo->GetEntry()) + { + case GO_FROSTMOURNE: + case GO_FROSTMOURNE_ALTAR: + case GO_ICECROWN_DOOR_ENTRANCE: + case GO_IMPENETRABLE_DOOR: + case GO_ICECROWN_DOOR_LK_ENTRANCE: + case GO_ICECROWN_DOOR_LK_EXIT: + case GO_CAVE_IN: + + case GO_CAPTAIN_CHEST_HORDE: + case GO_CAPTAIN_CHEST_HORDE_H: + case GO_CAPTAIN_CHEST_ALLIANCE: + case GO_CAPTAIN_CHEST_ALLIANCE_H: + break; + default: + return; + } + m_mGoEntryGuidStore[pGo->GetEntry()] = pGo->GetObjectGuid(); +} + +void instance_halls_of_reflection::SetData(uint32 uiType, uint32 uiData) +{ + switch (uiType) + { + case TYPE_FALRIC: + m_auiEncounter[uiType] = uiData; + break; + case TYPE_MARWYN: + if (uiData == DONE) + DoUseDoorOrButton(GO_IMPENETRABLE_DOOR); + m_auiEncounter[uiType] = uiData; + break; + case TYPE_LICH_KING: + if (uiData == DONE) + { + uint32 uiChestEntry = m_uiTeam == ALLIANCE ? (instance->IsRegularDifficulty() ? GO_CAPTAIN_CHEST_ALLIANCE : GO_CAPTAIN_CHEST_ALLIANCE_H) : + (instance->IsRegularDifficulty() ? GO_CAPTAIN_CHEST_HORDE : GO_CAPTAIN_CHEST_HORDE_H); + DoToggleGameObjectFlags(uiChestEntry, GO_FLAG_NO_INTERACT, false); + } + m_auiEncounter[uiType] = uiData; + break; + default: + return; + } + + if (uiData == DONE) + { + OUT_SAVE_INST_DATA; + + std::ostringstream saveStream; + saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2]; + + m_strInstData = saveStream.str(); + + SaveToDB(); + OUT_SAVE_INST_DATA_COMPLETE; + } +} + +void instance_halls_of_reflection::Load(const char* chrIn) +{ + if (!chrIn) + { + OUT_LOAD_INST_DATA_FAIL; + return; + } + + OUT_LOAD_INST_DATA(chrIn); + + std::istringstream loadStream(chrIn); + loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2]; + + for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) + { + if (m_auiEncounter[i] == IN_PROGRESS) + m_auiEncounter[i] = NOT_STARTED; + } + + OUT_LOAD_INST_DATA_COMPLETE; +} + +uint32 instance_halls_of_reflection::GetData(uint32 uiType) const +{ + if (uiType < MAX_ENCOUNTER) + return m_auiEncounter[uiType]; + + return 0; +} + +InstanceData* GetInstanceData_instance_halls_of_reflection(Map* pMap) +{ + return new instance_halls_of_reflection(pMap); +} void AddSC_instance_halls_of_reflection() { + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "instance_halls_of_reflection"; + pNewScript->GetInstanceData = &GetInstanceData_instance_halls_of_reflection; + pNewScript->RegisterSelf(); } diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/pit_of_saron.h b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/pit_of_saron.h index c0e6d2b67..ed6982a55 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/pit_of_saron.h +++ b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/pit_of_saron.h @@ -62,8 +62,13 @@ enum NPC_YMIRJAR_FLAMEBEARER = 36893, NPC_FALLEN_WARRIOR = 36841, NPC_COLDWRAITH = 36842, - NPC_STALKER = 32780, - NPC_GENERAL_BUNNY = 24110, + NPC_STALKER = 32780, // used to handle icicles during the tunnel event + NPC_GENERAL_BUNNY = 24110, // used to handle visuals for the last encounter + + // epilog npcs - used during the Tyrannus encounter + NPC_WRATHBONE_SORCERER = 37728, + NPC_WRATHBONE_REAVER = 37729, + NPC_FALLEN_WARRIOR_EPILOG = 38487, GO_ICEWALL = 201885, // open after gafrost/krick GO_HALLS_OF_REFLECT_PORT = 201848, // unlocked by jaina/sylvanas at last outro diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index c25110f51..f835467ed 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3134" + #define SD2_REVISION_NR "3135" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 5ceec5119..22c34621d 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -778,6 +778,7 @@ UPDATE creature_template SET ScriptName='boss_devourer_of_souls' WHERE entry=365 UPDATE instance_template SET ScriptName='instance_forge_of_souls' WHERE map=632; /* HALLS OF REFLECTION */ +UPDATE instance_template SET ScriptName='instance_halls_of_reflection' WHERE map=668; /* PIT OF SARON */ UPDATE instance_template SET ScriptName='instance_pit_of_saron' WHERE map=658; diff --git a/sql/updates/r3135_mangos.sql b/sql/updates/r3135_mangos.sql new file mode 100644 index 000000000..fa63be971 --- /dev/null +++ b/sql/updates/r3135_mangos.sql @@ -0,0 +1 @@ +UPDATE instance_template SET ScriptName='instance_halls_of_reflection' WHERE map=668; From 8f336bf200baf8a7d54b2927907499f00b80de86 Mon Sep 17 00:00:00 2001 From: Ulduar Date: Tue, 5 May 2015 03:38:12 +0600 Subject: [PATCH 1150/1172] Fix typo in previous commit --- sql/mangos_scriptname_full.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 22c34621d..fb8eaf382 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -512,7 +512,7 @@ UPDATE creature_template SET ScriptName='boss_anubarak_trial' WHERE entry=34564; UPDATE creature_template SET ScriptName='boss_fjola' WHERE entry=34497; UPDATE creature_template SET ScriptName='boss_eydis' WHERE entry=34496; UPDATE creature_template SET ScriptName='npc_concentrated_bullet' WHERE entry IN (34628,34630); -UPDATE creature_template SET ScriptName='npc_valkyr_stalker' WHERE entry IN (34628,34630); +UPDATE creature_template SET ScriptName='npc_valkyr_stalker' WHERE entry IN (34704,34720); UPDATE creature_template SET ScriptName='npc_anubarak_spike' WHERE entry=34660; UPDATE creature_template SET ScriptName='npc_frost_sphere' WHERE entry=34606; UPDATE creature_template SET ScriptName='npc_nerubian_borrow' WHERE entry=34862; From 1b5360eec40807b6a931fec67b434c14dead0eca Mon Sep 17 00:00:00 2001 From: Xfurry Date: Thu, 7 May 2015 21:32:47 +0200 Subject: [PATCH 1151/1172] [3136] Various small updates on the previous commits --- .../trial_of_the_crusader/boss_twin_valkyr.cpp | 7 +++++++ .../halls_of_reflection/halls_of_reflection.h | 13 +++++++++---- .../instance_halls_of_reflection.cpp | 5 ++++- sd2_revision_nr.h | 2 +- 4 files changed, 21 insertions(+), 6 deletions(-) diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp index 9bb28c0f2..0ef6d3eff 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp @@ -184,6 +184,7 @@ struct boss_fjolaAI : public ScriptedAI { uiSpell = m_bIsLightTwin ? SPELL_LIGHT_VORTEX : SPELL_DARK_VORTEX; pCaster->CastSpell(pCaster, uiSpell, false); + DoScriptText(m_bIsLightTwin ? SAY_TO_WHITE : SAY_TO_BLACK, pCaster); } else { @@ -191,6 +192,7 @@ struct boss_fjolaAI : public ScriptedAI uiShieldSpell = m_bIsLightTwin ? SPELL_SHIELD_OF_LIGHTS : SPELL_SHIELD_OF_DARKNESS; pCaster->CastSpell(pCaster, uiSpell, false); pCaster->CastSpell(pCaster, uiShieldSpell, true); + DoScriptText(SAY_COLORSWITCH, pCaster); } m_bIsVortex = urand(0, 1) ? true : false; @@ -232,8 +234,13 @@ struct boss_fjolaAI : public ScriptedAI if (m_pInstance) { if (Creature* pEydis = m_pInstance->GetSingleCreatureFromStorage(NPC_EYDIS)) + { pEydis->CastSpell(pEydis, SPELL_BERSERK, true); + DoScriptText(SAY_BERSERK, pEydis); + } } + + DoScriptText(SAY_BERSERK, m_creature); m_uiBerserkTimer = 0; } } diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/halls_of_reflection.h b/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/halls_of_reflection.h index 42b190f3c..6d929a93d 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/halls_of_reflection.h +++ b/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/halls_of_reflection.h @@ -15,7 +15,8 @@ enum NPC_FALRIC = 38112, NPC_MARWYN = 38113, - NPC_LICH_KING = 37226, + NPC_LICH_KING = 36954, + NPC_FROSTSWORN_GENERAL = 36723, // miniboss between Marwyn and Lich King NPC_JAINA_PART1 = 37221, NPC_JAINA_PART2 = 36955, @@ -28,16 +29,16 @@ enum // intro related npcs NPC_UTHER = 37225, - NPC_LICH_KING_INTRO = 36954, + NPC_LICH_KING_INTRO = 37226, NPC_FROSTMOURNE_ALTER_BUNNY = 37704, // dummy trigger for Quel'Delar NPC_QUEL_DELAR = 37158, // spirit event creatures - NPC_SPECTRAL_FOOTMAN = 38173, - NPC_SHADOWY_MERCENARY = 38177, NPC_PHANTOM_MAGE = 38172, + NPC_SPECTRAL_FOOTMAN = 38173, NPC_GHOSTLY_PRIEST = 38175, NPC_TORTURED_RIFLEMAN = 38176, + NPC_SHADOWY_MERCENARY = 38177, // escape event creatures NPC_RAGING_GHOUL = 36940, @@ -67,6 +68,10 @@ enum // world states WORLD_STATE_SPIRIT_WAVES = 4884, WORLD_STATE_SPIRIT_WAVES_COUNT = 4882, + + // area triggers + AREATRIGGER_FROSTMOURNE_ALTAR = 5697, + AREATRIGGER_LICH_KING_ROOM = 5605, }; struct EventNpcLocations diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/instance_halls_of_reflection.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/instance_halls_of_reflection.cpp index aa0bdae39..9c8b11283 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/instance_halls_of_reflection.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/instance_halls_of_reflection.cpp @@ -72,10 +72,13 @@ void instance_halls_of_reflection::OnObjectCreate(GameObject* pGo) { switch (pGo->GetEntry()) { + case GO_IMPENETRABLE_DOOR: + if (m_auiEncounter[TYPE_MARWYN] == DONE) + pGo->SetGoState(GO_STATE_ACTIVE); + break; case GO_FROSTMOURNE: case GO_FROSTMOURNE_ALTAR: case GO_ICECROWN_DOOR_ENTRANCE: - case GO_IMPENETRABLE_DOOR: case GO_ICECROWN_DOOR_LK_ENTRANCE: case GO_ICECROWN_DOOR_LK_EXIT: case GO_CAVE_IN: diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index f835467ed..bb40286f8 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3135" + #define SD2_REVISION_NR "3136" #endif // __SD2_REVISION_NR_H__ From d3987b4ebb9d4719d30194767291be8d77b1833e Mon Sep 17 00:00:00 2001 From: cala Date: Thu, 7 May 2015 21:48:06 +0200 Subject: [PATCH 1152/1172] [3137] Small improvement in Sunken Temple This will only make the Shade of Eranikus boss available after Jammal'an encounter is complete Close #153 Signed-off-by: Xfurry --- .../sunken_temple/instance_sunken_temple.cpp | 10 ++++++++++ sd2_revision_nr.h | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/scripts/eastern_kingdoms/sunken_temple/instance_sunken_temple.cpp b/scripts/eastern_kingdoms/sunken_temple/instance_sunken_temple.cpp index 3e9bfd5bb..a0541e1f8 100644 --- a/scripts/eastern_kingdoms/sunken_temple/instance_sunken_temple.cpp +++ b/scripts/eastern_kingdoms/sunken_temple/instance_sunken_temple.cpp @@ -87,6 +87,7 @@ void instance_sunken_temple::OnCreatureCreate(Creature* pCreature) break; case NPC_JAMMALAN: case NPC_ATALARION: + case NPC_SHADE_OF_ERANIKUS: m_mNpcEntryGuidStore[pCreature->GetEntry()] = pCreature->GetObjectGuid(); break; } @@ -103,6 +104,10 @@ void instance_sunken_temple::OnCreatureEvade(Creature* pCreature) case NPC_AVATAR_OF_HAKKAR: SetData(TYPE_AVATAR, FAIL); break; + // Shade of Eranikus: prevent it to become unattackable after a wipe + case NPC_SHADE_OF_ERANIKUS: + pCreature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE); + break; } } @@ -153,6 +158,11 @@ void instance_sunken_temple::SetData(uint32 uiType, uint32 uiData) } break; case TYPE_JAMMALAN: + if (uiData == DONE) + { + if (Creature* pEranikus = GetSingleCreatureFromStorage(NPC_SHADE_OF_ERANIKUS)) + pEranikus->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE); + } m_auiEncounter[uiType] = uiData; break; case TYPE_AVATAR: diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index bb40286f8..45366684a 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3136" + #define SD2_REVISION_NR "3137" #endif // __SD2_REVISION_NR_H__ From 136e323c606e686bf7c666265d6861079d9d2cea Mon Sep 17 00:00:00 2001 From: Xfurry Date: Fri, 8 May 2015 00:16:42 +0200 Subject: [PATCH 1153/1172] [3138] Fix bug for Algalon for the case when the grid unloads Thanks to @Ulduar Close #158 --- scripts/northrend/ulduar/ulduar/boss_algalon.cpp | 4 ++++ sd2_revision_nr.h | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/northrend/ulduar/ulduar/boss_algalon.cpp b/scripts/northrend/ulduar/ulduar/boss_algalon.cpp index 3995ef153..2aed14fc6 100644 --- a/scripts/northrend/ulduar/ulduar/boss_algalon.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_algalon.cpp @@ -190,6 +190,7 @@ struct boss_algalonAI : public ScriptedAI, private DialogueHelper m_pInstance = (instance_ulduar*)pCreature->GetInstanceData(); m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); InitializeDialogueHelper(m_pInstance); + m_creature->SetActiveObjectState(true); m_bEventFinished = false; Reset(); @@ -307,7 +308,10 @@ struct boss_algalonAI : public ScriptedAI, private DialogueHelper m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); } else + { m_pInstance->SetData(TYPE_ALGALON, FAIL); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE); + } // despawn everything for (GuidList::const_iterator itr = m_lSummonedGuids.begin(); itr != m_lSummonedGuids.end(); ++itr) diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 45366684a..3ae8c0d90 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3137" + #define SD2_REVISION_NR "3138" #endif // __SD2_REVISION_NR_H__ From 2ce6b60fb2d024665059fb0f44a1e537c4fb80f5 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Fri, 8 May 2015 00:19:56 +0200 Subject: [PATCH 1154/1172] [3139] Improve script for Deathbringer Saurfang - ICC Notes: Intro event still not implemented The regeneration of power might require some core fixes Close scriptdev2/scriptdev2-cata#28 --- .../boss_deathbringer_saurfang.cpp | 112 ++++++------------ .../icecrown_citadel/icecrown_citadel.h | 2 +- .../instance_icecrown_citadel.cpp | 5 + sd2_revision_nr.h | 2 +- 4 files changed, 42 insertions(+), 79 deletions(-) diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp index 90c548439..925dd50e1 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: boss_deathbringer_saurfang -SD%Complete: 60% -SDComment: Blood Power and all the related spells require core support; Intro and Outro event NYI. +SD%Complete: 80% +SDComment: Intro and Outro event NYI. SDCategory: Icecrown Citadel EndScriptData */ @@ -73,21 +73,21 @@ enum SAY_OUTRO_HORDE_4 = -1631069, // intro event related - // SPELL_GRIP_OF_AGONY = 70572, - // SPELL_VEHICLE_HARDCODED = 46598, + SPELL_GRIP_OF_AGONY = 70572, + SPELL_VEHICLE_HARDCODED = 46598, - // combat spells - SPELL_BLOOD_POWER = 72371, - // SPELL_BLOOD_POWER_SCALE = 72370, // included in creature_template_addon - // SPELL_ZERO_POWER = 72242, // included in creature_template_addon + // aggro spells + SPELL_BLOOD_LINK = 72178, + SPELL_MARK_FALLEN_DAMAGE = 72256, // procs 72255 on Saurfang melee attack + SPELL_RUNE_OF_BLOOD_PROC = 72408, // procs 72409 on Saurfang melee attack - // SPELL_MARK_FALLEN_DAMAGE = 72256, // procs on Saurfang melee attack - 72255 - included in creature_template_addon - SPELL_MARK_FALLEN_CHAMPION = 72293, // procs on target death - 72260 - SPELL_REMOVE_MARKS = 72257, + // combat spells + SPELL_BLOOD_POWER = 72371, // triggered by 72195 + // SPELL_BLOOD_POWER_SCALE = 72370, // purpose unk + // SPELL_ZERO_POWER = 72242, // included in creature_template_addon - // SPELL_RUNE_OF_BLOOD_PROC = 72408, // procs on Saurfang mele attack - 72409 - included in creature_template_addon + SPELL_MARK_FALLEN_CHAMPION = 72254, // triggers 72293 which procs 72260 on target death SPELL_RUNE_OF_BLOOD = 72410, - SPELL_BLOOD_NOVA = 72378, SPELL_BOILING_BLOOD = 72385, @@ -101,6 +101,10 @@ enum SPELL_BERSERK = 26662, SPELL_FRENZY = 72737, + // evade / death spells + SPELL_REMOVE_MARKS = 72257, + SPELL_ACHIEVEMENT = 72928, + // Summoned spells SPELL_RESISTANT_SKIN = 72723, SPELL_BLOOD_LINK_BEAST = 72176, @@ -108,7 +112,6 @@ enum FACTION_ID_UNDEAD = 974, POINT_ID_INTRO = 1, - POINT_ID_EVADE = 2, }; static const float fIntroPosition[4] = { -491.30f, 2211.35f, 541.11f, 3.16f}; @@ -118,7 +121,6 @@ struct boss_deathbringer_saurfangAI : public ScriptedAI boss_deathbringer_saurfangAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (instance_icecrown_citadel*)pCreature->GetInstanceData(); - m_powerBloodPower = m_creature->GetPowerType(); m_bIsIntroDone = false; Reset(); } @@ -135,8 +137,6 @@ struct boss_deathbringer_saurfangAI : public ScriptedAI bool m_bIsFrenzied; bool m_bIsIntroDone; - Powers m_powerBloodPower; - void Reset() override { m_uiRuneOfBloodTimer = 25000; @@ -150,14 +150,15 @@ struct boss_deathbringer_saurfangAI : public ScriptedAI m_uiBerserkTimer = 6 * MINUTE * IN_MILLISECONDS; m_bIsFrenzied = false; - - m_creature->SetPower(m_powerBloodPower, 0); } void Aggro(Unit* /*pWho*/) override { DoScriptText(SAY_AGGRO, m_creature); - DoCastSpellIfCan(m_creature, SPELL_BLOOD_POWER, CAST_TRIGGERED); + + DoCastSpellIfCan(m_creature, SPELL_BLOOD_LINK, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_MARK_FALLEN_DAMAGE, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_RUNE_OF_BLOOD_PROC, CAST_TRIGGERED); if (m_pInstance) m_pInstance->SetData(TYPE_DEATHBRINGER_SAURFANG, IN_PROGRESS); @@ -189,6 +190,7 @@ struct boss_deathbringer_saurfangAI : public ScriptedAI { DoScriptText(SAY_DEATH, m_creature); DoCastSpellIfCan(m_creature, SPELL_REMOVE_MARKS, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_ACHIEVEMENT, CAST_TRIGGERED); if (m_pInstance) m_pInstance->SetData(TYPE_DEATHBRINGER_SAURFANG, DONE); @@ -198,21 +200,9 @@ struct boss_deathbringer_saurfangAI : public ScriptedAI { if (m_pInstance) m_pInstance->SetData(TYPE_DEATHBRINGER_SAURFANG, FAIL); - } - - void EnterEvadeMode() override - { - m_creature->RemoveAllAurasOnEvade(); - m_creature->DeleteThreatList(); - m_creature->CombatStop(true); - - // Boss needs to evade to the point in front of the door - if (m_creature->isAlive()) - m_creature->GetMotionMaster()->MovePoint(POINT_ID_EVADE, fIntroPosition[0], fIntroPosition[1], fIntroPosition[2]); - m_creature->SetLootRecipient(NULL); - - Reset(); + DoCastSpellIfCan(m_creature, SPELL_REMOVE_MARKS, CAST_TRIGGERED); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE); } void MovementInform(uint32 uiMoveType, uint32 uiPointId) override @@ -220,14 +210,7 @@ struct boss_deathbringer_saurfangAI : public ScriptedAI if (uiMoveType != POINT_MOTION_TYPE) return; - if (uiPointId == POINT_ID_EVADE) - { - m_creature->SetFacingTo(fIntroPosition[3]); - - if (m_pInstance) - m_pInstance->SetData(TYPE_DEATHBRINGER_SAURFANG, FAIL); - } - else if (uiPointId == POINT_ID_INTRO) + if (uiPointId == POINT_ID_INTRO) { if (m_pInstance) m_pInstance->DoUseDoorOrButton(GO_SAURFANG_DOOR); @@ -235,9 +218,9 @@ struct boss_deathbringer_saurfangAI : public ScriptedAI // Note: this should be done only after the intro event is finished // ToDo: move this to the proper place after the intro will be implemented // Also the faction needs to be checked if it should be handled in database - m_creature->setFaction(FACTION_ID_UNDEAD); - m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_PASSIVE); - m_creature->SetInCombatWithZone(); + m_creature->SetFactionTemporary(FACTION_ID_UNDEAD, TEMPFACTION_NONE); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_PASSIVE | UNIT_FLAG_OOC_NOT_ATTACKABLE); + m_creature->SetRespawnCoord(m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), m_creature->GetOrientation()); } } @@ -251,46 +234,21 @@ struct boss_deathbringer_saurfangAI : public ScriptedAI pSummoned->AI()->AttackStart(pTarget); } - // Wrapper to help get a random player for the Mark of the Fallen Champion - Unit* SelectRandomPlayerForMark() - { - // Search only for players which are not within 18 yards of the boss - std::vector suitableTargets; - ThreatList const& threatList = m_creature->getThreatManager().getThreatList(); - - for (ThreatList::const_iterator itr = threatList.begin(); itr != threatList.end(); ++itr) - { - if (Unit* pTarget = m_creature->GetMap()->GetUnit((*itr)->getUnitGuid())) - { - if (pTarget->GetTypeId() == TYPEID_PLAYER && pTarget != m_creature->getVictim() && !pTarget->HasAura(SPELL_MARK_FALLEN_CHAMPION)) - suitableTargets.push_back(pTarget); - } - } - - if (suitableTargets.empty()) - return m_creature->getVictim(); - else - return suitableTargets[urand(0, suitableTargets.size() - 1)]; - } - void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; // Mark of the Fallen Champion - // ToDo: enable this when blood power is fully supported by the core - /*if (m_creature->GetPower(m_powerBloodPower) >= 100) + if (m_creature->GetPower(m_creature->GetPowerType()) == 100) { - if (Unit* pTarget = SelectRandomPlayerForMark()) + if (DoCastSpellIfCan(m_creature, SPELL_MARK_FALLEN_CHAMPION) == CAST_OK) { - if (DoCastSpellIfCan(pTarget, SPELL_MARK_FALLEN_CHAMPION) == CAST_OK) - { - DoScriptText(SAY_FALLENCHAMPION, m_creature); - m_creature->SetPower(m_powerBloodPower, 0); - } + DoScriptText(SAY_FALLENCHAMPION, m_creature); + m_creature->RemoveAurasDueToSpell(SPELL_BLOOD_POWER); + m_creature->SetPower(m_creature->GetPowerType(), 0); } - }*/ + } // Frenzy (soft enrage) if (!m_bIsFrenzied) @@ -308,7 +266,7 @@ struct boss_deathbringer_saurfangAI : public ScriptedAI // Berserk (hard enrage) if (m_uiBerserkTimer) { - if (m_uiBerserkTimer < uiDiff) + if (m_uiBerserkTimer <= uiDiff) { if (DoCastSpellIfCan(m_creature, SPELL_BERSERK) == CAST_OK) { diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_citadel.h b/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_citadel.h index a5037dff1..834faa37e 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_citadel.h +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_citadel.h @@ -43,7 +43,7 @@ enum NPC_OVERLORD_SAURFANG = 37187, NPC_KORKRON_REAVER = 37920, NPC_MURADIN_BRONZEBEARD = 37200, // Saurfang's encounter and at the instance entrance - NPC_SKYBREAKER_MARINE = 37380, + NPC_SKYBREAKER_MARINE = 37830, NPC_ALLIANCE_MARINE = 37830, NPC_BLOOD_ORB_CONTROL = 38008, NPC_LANATHEL_INTRO = 38004, diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_citadel.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_citadel.cpp index e94f144d9..b50fb6125 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_citadel.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_citadel.cpp @@ -317,7 +317,10 @@ void instance_icecrown_citadel::SetData(uint32 uiType, uint32 uiData) case TYPE_GUNSHIP_BATTLE: m_auiEncounter[uiType] = uiData; if (uiData == DONE) + { DoRespawnGameObject(m_uiTeam == ALLIANCE ? GO_GUNSHIP_ARMORY_A : GO_GUNSHIP_ARMORY_H, 60 * MINUTE); + DoToggleGameObjectFlags(m_uiTeam == ALLIANCE ? GO_GUNSHIP_ARMORY_A : GO_GUNSHIP_ARMORY_H, GO_FLAG_NO_INTERACT, false); + } break; case TYPE_DEATHBRINGER_SAURFANG: m_auiEncounter[uiType] = uiData; @@ -325,6 +328,7 @@ void instance_icecrown_citadel::SetData(uint32 uiType, uint32 uiData) { DoUseDoorOrButton(GO_SAURFANG_DOOR); DoRespawnGameObject(GO_SAURFANG_CACHE, 60 * MINUTE); + DoToggleGameObjectFlags(GO_SAURFANG_CACHE, GO_FLAG_NO_INTERACT, false); // Note: these doors may not be correct. In theory the doors should be already opened DoUseDoorOrButton(GO_SCIENTIST_DOOR); @@ -400,6 +404,7 @@ void instance_icecrown_citadel::SetData(uint32 uiType, uint32 uiData) DoUseDoorOrButton(GO_GREEN_DRAGON_EXIT); DoUseDoorOrButton(GO_SINDRAGOSA_ENTRANCE); DoRespawnGameObject(GO_DREAMWALKER_CACHE, 60 * MINUTE); + DoToggleGameObjectFlags(GO_DREAMWALKER_CACHE, GO_FLAG_NO_INTERACT, false); } if (uiData == DONE || uiData == FAIL) { diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 3ae8c0d90..5c5cb8ffb 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3138" + #define SD2_REVISION_NR "3139" #endif // __SD2_REVISION_NR_H__ From 23ba9447278fecf889d12f234f4bebb4400729da Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sun, 10 May 2015 00:29:08 +0200 Subject: [PATCH 1155/1172] [3140] Update Lord Marrowgar - ICC This implements the Bone Spike event and updates the Cold Flame behavior Also set power to 0 for Saurfang on Reset() --- .../boss_deathbringer_saurfang.cpp | 2 + .../icecrown_citadel/boss_lord_marrowgar.cpp | 109 ++++++++++++++++-- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 2 + sql/updates/r3140_mangos.sql | 2 + 5 files changed, 108 insertions(+), 9 deletions(-) create mode 100644 sql/updates/r3140_mangos.sql diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp index 925dd50e1..34378f940 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp @@ -150,6 +150,8 @@ struct boss_deathbringer_saurfangAI : public ScriptedAI m_uiBerserkTimer = 6 * MINUTE * IN_MILLISECONDS; m_bIsFrenzied = false; + + m_creature->SetPower(m_creature->GetPowerType(), 0); } void Aggro(Unit* /*pWho*/) override diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp index bd803ea21..17998bdef 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp @@ -16,13 +16,14 @@ /* ScriptData SDName: boss_lord_marrowgar -SD%Complete: 75% -SDComment: Bone Spike Spell requires vehicle support +SD%Complete: 90% +SDComment: Achiev NYI. SDCategory: Icecrown Citadel EndScriptData */ #include "precompiled.h" #include "icecrown_citadel.h" +#include "TemporarySummon.h" enum { @@ -42,15 +43,17 @@ enum SPELL_BONE_STORM = 69076, SPELL_COLDFLAME = 69140, SPELL_COLDFLAME_STORM = 72705, - SPELL_BONE_SPIKE = 69057, - SPELL_BONE_SPIKE_STORM = 73142, + SPELL_BONE_SPIKE = 69057, // triggers spell 69062 + SPELL_BONE_SPIKE_STORM = 73142, // triggers spell 69062 / 72669 / 72670 // summoned spells SPELL_COLDFLAME_AURA = 69145, SPELL_IMPALED = 69065, // npcs - NPC_BONE_SPIKE = 38711, + NPC_BONE_SPIKE_1 = 36619, // summoned by spell 69062 + NPC_BONE_SPIKE_2 = 38711, // summoned by spell 72670 + NPC_BONE_SPIKE_3 = 38712, // summoned by spell 72669 NPC_COLDFLAME = 36672, // phases and max cold flame charges @@ -256,8 +259,7 @@ struct boss_lord_marrowgarAI : public ScriptedAI } // Bone spike - different spells for the normal phase or storm phase - // ToDo: uncommnet this when vehicles and the Bone spike spells are properly supported by core - /*if (m_pInstance && (m_pInstance->IsHeroicDifficulty() || m_uiPhase == PHASE_NORMAL)) + if (m_pInstance && (m_pInstance->IsHeroicDifficulty() || m_uiPhase == PHASE_NORMAL)) { if (m_uiBoneSpikeTimer < uiDiff) { @@ -274,7 +276,7 @@ struct boss_lord_marrowgarAI : public ScriptedAI } else m_uiBoneSpikeTimer -= uiDiff; - }*/ + } // Berserk if (m_uiBerserkTimer) @@ -298,6 +300,87 @@ CreatureAI* GetAI_boss_lord_marrowgar(Creature* pCreature) return new boss_lord_marrowgarAI(pCreature); } +/*###### +## npc_bone_spike +######*/ + +struct npc_bone_spikeAI : public Scripted_NoMovementAI +{ + npc_bone_spikeAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) + { + m_bHasImpaled = false; + Reset(); + } + + bool m_bHasImpaled; + + void Reset() override { } + + void AttackStart(Unit* /*pWho*/) override { } + void MoveInLineOfSight(Unit* /*pWho*/) override { } + + void KilledUnit(Unit* pVictim) override + { + // remove the aura as it's death persistent (I wonder why...) + pVictim->RemoveAurasDueToSpell(SPELL_IMPALED); + m_creature->ForcedDespawn(); + } + + void JustDied(Unit* /*pKiller*/) override + { + if (m_creature->IsTemporarySummon()) + { + TemporarySummon* pTemporary = (TemporarySummon*)m_creature; + + // remove impale on death + if (Player* pSummoner = m_creature->GetMap()->GetPlayer(pTemporary->GetSummonerGuid())) + pSummoner->RemoveAurasDueToSpell(SPELL_IMPALED); + } + } + + void UpdateAI(const uint32 /*uiDiff*/) override + { + if (!m_bHasImpaled) + { + if (m_creature->IsTemporarySummon()) + { + TemporarySummon* pTemporary = (TemporarySummon*)m_creature; + + // Impale player + if (Player* pSummoner = m_creature->GetMap()->GetPlayer(pTemporary->GetSummonerGuid())) + DoCastSpellIfCan(pSummoner, SPELL_IMPALED); + } + + m_bHasImpaled = true; + } + } +}; + +CreatureAI* GetAI_npc_bone_spike(Creature* pCreature) +{ + return new npc_bone_spikeAI(pCreature); +} + +/*###### +## npc_coldflame +######*/ + +// TODO Remove this 'script' when combat can be proper prevented from core-side +struct npc_coldflameAI : public ScriptedAI +{ + npc_coldflameAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } + + void Reset() override { } + void AttackStart(Unit* /*pWho*/) override { } + void MoveInLineOfSight(Unit* /*pWho*/) override { } + void UpdateAI(const uint32 /*uiDiff*/) override { } +}; + +CreatureAI* GetAI_npc_coldflame(Creature* pCreature) +{ + return new npc_coldflameAI(pCreature); +} + void AddSC_boss_lord_marrowgar() { Script* pNewScript; @@ -306,4 +389,14 @@ void AddSC_boss_lord_marrowgar() pNewScript->Name = "boss_lord_marrowgar"; pNewScript->GetAI = &GetAI_boss_lord_marrowgar; pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_bone_spike"; + pNewScript->GetAI = &GetAI_npc_bone_spike; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_coldflame"; + pNewScript->GetAI = &GetAI_npc_coldflame; + pNewScript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 5c5cb8ffb..ceebb93ac 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3139" + #define SD2_REVISION_NR "3140" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index fb8eaf382..e8a49f296 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -744,6 +744,8 @@ UPDATE creature_template SET ScriptName='npc_scalawag_frog' WHERE entry=26503; /* ICECROWN CITADEL */ UPDATE instance_template SET ScriptName='instance_icecrown_citadel' WHERE map=631; UPDATE creature_template SET ScriptName='boss_lord_marrowgar' WHERE entry=36612; +UPDATE creature_template SET ScriptName='npc_bone_spike' WHERE entry IN (36619,38711,38712); +UPDATE creature_template SET ScriptName='npc_coldflame' WHERE entry=36672; UPDATE creature_template SET ScriptName='boss_lady_deathwhisper' WHERE entry=36855; UPDATE creature_template SET ScriptName='boss_deathbringer_saurfang' WHERE entry=37813; UPDATE creature_template SET ScriptName='npc_queen_lanathel_intro' WHERE entry=38004; diff --git a/sql/updates/r3140_mangos.sql b/sql/updates/r3140_mangos.sql new file mode 100644 index 000000000..0e03f08d9 --- /dev/null +++ b/sql/updates/r3140_mangos.sql @@ -0,0 +1,2 @@ +UPDATE creature_template SET ScriptName='npc_bone_spike' WHERE entry IN (36619,38711,38712); +UPDATE creature_template SET ScriptName='npc_coldflame' WHERE entry=36672; From db925be9853d8b734e3924c9fb0a81653eca6a3b Mon Sep 17 00:00:00 2001 From: Xfurry Date: Sun, 10 May 2015 01:42:14 +0200 Subject: [PATCH 1156/1172] [3141] Fix Hodir achiev spell --- scripts/northrend/ulduar/ulduar/boss_hodir.cpp | 2 +- sd2_revision_nr.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/northrend/ulduar/ulduar/boss_hodir.cpp b/scripts/northrend/ulduar/ulduar/boss_hodir.cpp index 4b21e00ef..e9658877d 100644 --- a/scripts/northrend/ulduar/ulduar/boss_hodir.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_hodir.cpp @@ -188,6 +188,7 @@ struct boss_hodirAI : public ScriptedAI } m_uiEpilogueTimer = 10000; + m_creature->CastSpell(m_creature, SPELL_HODIR_CREDIT, true); m_creature->SetFactionTemporary(FACTION_ID_FRIENDLY, TEMPFACTION_NONE); m_bEventFinished = true; EnterEvadeMode(); @@ -226,7 +227,6 @@ struct boss_hodirAI : public ScriptedAI m_pInstance->SetData(TYPE_HODIR, DONE); DoScriptText(SAY_EPILOGUE, m_creature); - m_creature->CastSpell(m_creature, SPELL_HODIR_CREDIT, true); m_uiEpilogueTimer = 10000; break; case 1: diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index ceebb93ac..5994f3c46 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3140" + #define SD2_REVISION_NR "3141" #endif // __SD2_REVISION_NR_H__ From d2ffa69ebd7d654255c81c86b546fc8cb794d641 Mon Sep 17 00:00:00 2001 From: Cala Date: Mon, 25 May 2015 10:57:39 +0200 Subject: [PATCH 1157/1172] Improve escort quest 5203 in Felwood NPC Arko'narin will now use its equipment after retrieving it. Also fix a typo in NPC 9563 gossip (quest 4224) --- scripts/eastern_kingdoms/burning_steppes.cpp | 2 +- scripts/kalimdor/felwood.cpp | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/scripts/eastern_kingdoms/burning_steppes.cpp b/scripts/eastern_kingdoms/burning_steppes.cpp index a04afa4e8..374872dce 100644 --- a/scripts/eastern_kingdoms/burning_steppes.cpp +++ b/scripts/eastern_kingdoms/burning_steppes.cpp @@ -76,7 +76,7 @@ bool GossipHello_npc_ragged_john(Player* pPlayer, Creature* pCreature) pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid()); if (pPlayer->GetQuestStatus(4224) == QUEST_STATUS_INCOMPLETE) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Official business, John. I need some information about Marshal Windsor. Tell me about he last time you saw him.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Official business, John. I need some information about Marshal Windsor. Tell me about the last time you saw him.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF); pPlayer->SEND_GOSSIP_MENU(2713, pCreature->GetObjectGuid()); return true; diff --git a/scripts/kalimdor/felwood.cpp b/scripts/kalimdor/felwood.cpp index 568ad1a08..daeca821a 100644 --- a/scripts/kalimdor/felwood.cpp +++ b/scripts/kalimdor/felwood.cpp @@ -422,13 +422,14 @@ enum SAY_TREY_ATTACK = -1001157, SAY_ESCORT_COMPLETE = -1001158, - SPELL_STRENGHT_ARKONARIN = 18163, + SPELL_STRENGTH_ARKONARIN = 18163, SPELL_MORTAL_STRIKE = 16856, SPELL_CLEAVE = 15496, QUEST_ID_RESCUE_JAEDENAR = 5203, NPC_JAEDENAR_LEGIONNAIRE = 9862, NPC_SPIRT_TREY = 11141, + NPC_ARKONARIN = 11018, GO_ARKONARIN_CHEST = 176225, GO_ARKONARIN_CAGE = 176306, }; @@ -506,14 +507,14 @@ struct npc_captured_arkonarinAI : public npc_escortAI m_creature->HandleEmote(EMOTE_ONESHOT_KNEEL); break; case 39: - DoCastSpellIfCan(m_creature, SPELL_STRENGHT_ARKONARIN); + DoCastSpellIfCan(m_creature, SPELL_STRENGTH_ARKONARIN); break; case 40: + m_creature->UpdateEntry(NPC_ARKONARIN); if (Player* pPlayer = GetPlayerForEscort()) m_creature->SetFacingToObject(pPlayer); m_bCanAttack = true; DoScriptText(SAY_FOUND_EQUIPMENT, m_creature); - // ToDo: change equipment! break; case 41: DoScriptText(SAY_ESCAPE_DEMONS, m_creature); From 301b4f01306672f5b6fed5e182bf2c3b506fed31 Mon Sep 17 00:00:00 2001 From: Cala Date: Thu, 28 May 2015 13:43:34 +0200 Subject: [PATCH 1158/1172] Small cosmetic improvement to quest 4901 The visual effect associated to the gem GO now also respawns with the gem GO --- scripts/kalimdor/winterspring.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/scripts/kalimdor/winterspring.cpp b/scripts/kalimdor/winterspring.cpp index 6d16ca85f..10f93dc3f 100644 --- a/scripts/kalimdor/winterspring.cpp +++ b/scripts/kalimdor/winterspring.cpp @@ -88,6 +88,7 @@ enum GO_ELUNE_FIRE = 177417, GO_ELUNE_GEM = 177414, // is respawned in script GO_ELUNE_LIGHT = 177415, // are respawned in script + GO_ELUNE_AURA = 177416, // is respawned in script QUEST_GUARDIANS_ALTAR = 4901, }; @@ -301,7 +302,7 @@ struct npc_ranshallaAI : public npc_escortAI, private DialogueHelper SetEscortPaused(false); break; case SAY_PRIESTESS_ALTAR_8: - // make the gem respawn + // make the gem and its aura respawn if (GameObject* pGem = GetClosestGameObjectWithEntry(m_creature, GO_ELUNE_GEM, 10.0f)) { if (pGem->isSpawned()) @@ -310,6 +311,14 @@ struct npc_ranshallaAI : public npc_escortAI, private DialogueHelper pGem->SetRespawnTime(90); pGem->Refresh(); } + if (GameObject* pAura = GetClosestGameObjectWithEntry(m_creature, GO_ELUNE_AURA, 10.0f)) + { + if (pAura->isSpawned()) + break; + + pAura->SetRespawnTime(90); + pAura->Refresh(); + } break; case SAY_PRIESTESS_ALTAR_9: // move near the escort npc From 7624584660798961de5eb726f9e18495f5e75a08 Mon Sep 17 00:00:00 2001 From: Cala Date: Wed, 24 Jun 2015 00:01:19 +0200 Subject: [PATCH 1159/1172] [3142] Improve BRD arena event Close #171 Signed-off-by: Xfurry --- .../blackrock_depths/blackrock_depths.h | 22 ++++++++++++++++++ .../instance_blackrock_depths.cpp | 23 +++++++++++++++++++ sd2_revision_nr.h | 2 +- 3 files changed, 46 insertions(+), 1 deletion(-) diff --git a/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.h b/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.h index f9fea794c..8d70bcb67 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.h +++ b/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.h @@ -44,6 +44,15 @@ enum NPC_TOBIAS = 9679, NPC_DUGHAL = 9022, + // Arena crowd + NPC_ARENA_SPECTATOR = 8916, + NPC_SHADOWFORGE_PEASANT = 8896, + NPC_SHADOWFORGE_CITIZEN = 8902, + NPC_SHADOWFORGE_SENATOR = 8904, + NPC_ANVILRAGE_SOLDIER = 8893, + NPC_ANVILRAGE_MEDIC = 8894, + NPC_ANVILRAGE_OFFICER = 8895, + GO_ARENA_1 = 161525, GO_ARENA_2 = 161522, GO_ARENA_3 = 161524, @@ -87,8 +96,20 @@ enum SPELL_STONED = 10255, // Aura of Warbringer Constructs in Relict Vault FACTION_DWARF_HOSTILE = 754, // Hostile faction for the Tomb of the Seven dwarfs + FACTION_ARENA_NEUTRAL = 674, // Neutral faction for NPC in top of Arena after event complete }; +struct ArenaCylinder +{ + float m_fCenterX; + float m_fCenterY; + float m_fCenterZ; + uint32 m_uiRadius; + uint32 m_uiHeight; +}; + +static const ArenaCylinder aArenaCrowdVolume[] = {595.78f, -188.65f, -38.63f, 69, 10}; + enum ArenaNPCs { // Gladiators @@ -175,6 +196,7 @@ class instance_blackrock_depths : public ScriptedInstance float m_fArenaCenterX, m_fArenaCenterY, m_fArenaCenterZ; GuidSet m_sVaultNpcGuids; + GuidSet m_sArenaCrowdNpcGuids; }; #endif diff --git a/scripts/eastern_kingdoms/blackrock_depths/instance_blackrock_depths.cpp b/scripts/eastern_kingdoms/blackrock_depths/instance_blackrock_depths.cpp index ee87d339a..5334bec27 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/instance_blackrock_depths.cpp +++ b/scripts/eastern_kingdoms/blackrock_depths/instance_blackrock_depths.cpp @@ -78,6 +78,21 @@ void instance_blackrock_depths::OnCreatureCreate(Creature* pCreature) case NPC_WATCHER_DOOMGRIP: m_sVaultNpcGuids.insert(pCreature->GetObjectGuid()); break; + // Arena crowd + case NPC_ARENA_SPECTATOR: + case NPC_SHADOWFORGE_PEASANT: + case NPC_SHADOWFORGE_CITIZEN: + case NPC_SHADOWFORGE_SENATOR: + case NPC_ANVILRAGE_SOLDIER: + case NPC_ANVILRAGE_MEDIC: + case NPC_ANVILRAGE_OFFICER: + if (pCreature->GetPositionZ() < aArenaCrowdVolume->m_fCenterZ || pCreature->GetPositionZ() > aArenaCrowdVolume->m_fCenterZ + aArenaCrowdVolume->m_uiHeight || + !pCreature->IsWithinDist2d(aArenaCrowdVolume->m_fCenterX, aArenaCrowdVolume->m_fCenterY, aArenaCrowdVolume->m_uiRadius)) + break; + m_sArenaCrowdNpcGuids.insert(pCreature->GetObjectGuid()); + if (m_auiEncounter[0] == DONE) + pCreature->SetFactionTemporary(FACTION_ARENA_NEUTRAL, TEMPFACTION_RESTORE_RESPAWN); + break; } } @@ -132,6 +147,14 @@ void instance_blackrock_depths::SetData(uint32 uiType, uint32 uiData) // If finished the arena event after theldren fight if (uiData == DONE && m_auiEncounter[0] == SPECIAL) DoRespawnGameObject(GO_ARENA_SPOILS, HOUR); + else if (uiData == DONE) + { + for (GuidSet::const_iterator itr = m_sArenaCrowdNpcGuids.begin(); itr != m_sArenaCrowdNpcGuids.end(); ++itr) + { + if (Creature* pSpectator = instance->GetCreature(*itr)) + pSpectator->SetFactionTemporary(FACTION_ARENA_NEUTRAL, TEMPFACTION_RESTORE_RESPAWN); + } + } m_auiEncounter[0] = uiData; break; case TYPE_VAULT: diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 5994f3c46..a8768fd21 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3141" + #define SD2_REVISION_NR "3142" #endif // __SD2_REVISION_NR_H__ From 4c83ba93b1ae8af393b4a4ba45d2c9b3fa140bca Mon Sep 17 00:00:00 2001 From: Cala Date: Mon, 29 Jun 2015 21:44:04 +0200 Subject: [PATCH 1160/1172] [3143] Improve BRD Arena event (last part) * Cosmetic changes in BRD Arena event: - All texts for High Justice Grimstone are now in and in the right order - Emotes for High Justice Grimstone are now in - High Justice Grimstone will now cast his visual spell when spawning/despawning - Gate opening visual spells are now in - Some of the arena spectators now cheers at event start * Fixes temporary faction ID for arena spectators from previous commit Data come from official data. Results are close to what is visible in: https://www.youtube.com/watch?v=w965TeVu56w (based on commit 2aaf76e) Close #172 Signed-off-by: Xfurry --- .../blackrock_depths/blackrock_depths.cpp | 61 ++++++++++++++----- .../blackrock_depths/blackrock_depths.h | 3 +- sd2_revision_nr.h | 2 +- sql/scriptdev2_script_full.sql | 12 ++-- sql/updates/r3143_scriptdev2.sql | 6 ++ 5 files changed, 60 insertions(+), 24 deletions(-) create mode 100644 sql/updates/r3143_scriptdev2.sql diff --git a/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.cpp b/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.cpp index 291ca471a..50777921d 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.cpp +++ b/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.cpp @@ -98,13 +98,14 @@ enum MAX_POSSIBLE_THELDREN_ADDS = 8, SPELL_SUMMON_THELRIN_DND = 27517, - /* Other spells used by Grimstone - SPELL_ASHCROMBES_TELEPORT_A = 15742 + // Other spells used by Grimstone + SPELL_ASHCROMBES_TELEPORT_A = 15742, SPELL_ASHCROMBES_TELEPORT_B = 6422, SPELL_ARENA_FLASH_A = 15737, SPELL_ARENA_FLASH_B = 15739, - */ - + SPELL_ARENA_FLASH_C = 15740, + SPELL_ARENA_FLASH_D = 15741, + QUEST_THE_CHALLENGE = 9015, NPC_THELDREN_QUEST_CREDIT = 16166, }; @@ -191,6 +192,7 @@ struct npc_grimstoneAI : public npc_escortAI uint32 m_uiGladiatorId[MAX_THELDREN_ADDS]; GuidList m_lSummonedGUIDList; + GuidSet m_lArenaCrowd; void Reset() override { @@ -275,7 +277,7 @@ struct npc_grimstoneAI : public npc_escortAI switch (uiPointId) { case 0: // Middle reached first time - DoScriptText(urand(0, 1) ? SAY_START_1 : SAY_START_2, m_creature); + DoScriptText(SAY_START_1, m_creature); SetEscortPaused(true); m_uiEventTimer = 5000; break; @@ -288,7 +290,7 @@ struct npc_grimstoneAI : public npc_escortAI SetEscortPaused(true); break; case 3: // Middle reached second time - DoScriptText(urand(0, 1) ? SAY_SUMMON_BOSS_1 : SAY_SUMMON_BOSS_2, m_creature); + DoScriptText(SAY_SUMMON_BOSS_1, m_creature); break; case 4: // Reached North Gate DoScriptText(SAY_OPEN_NORTH_GATE, m_creature); @@ -313,7 +315,7 @@ struct npc_grimstoneAI : public npc_escortAI if (m_pInstance->GetData(TYPE_RING_OF_LAW) == FAIL) { // Reset Doors - if (m_uiEventPhase >= 9) // North Gate is opened + if (m_uiEventPhase >= 10) // North Gate is opened { m_pInstance->DoUseDoorOrButton(GO_ARENA_2); m_pInstance->DoUseDoorOrButton(GO_ARENA_4); @@ -345,8 +347,20 @@ struct npc_grimstoneAI : public npc_escortAI { case 0: // Shortly after spawn, start walking - // DoScriptText(-1000000, m_creature); // no more text on spawn + m_creature->CastSpell(m_creature, SPELL_ASHCROMBES_TELEPORT_A, true); + DoScriptText(SAY_START_2, m_creature); m_pInstance->DoUseDoorOrButton(GO_ARENA_4); + // Some of the NPCs in the crowd do cheer emote at event start + // we randomly select 25% of the NPCs to do this + m_lArenaCrowd = m_pInstance->GetArenaCrowdGuid(); + for (GuidSet::const_iterator itr = m_lArenaCrowd.begin(); itr != m_lArenaCrowd.end(); ++itr) + { + if (Creature* pSpectator = m_creature->GetMap()->GetCreature(*itr)) + { + if (urand(0, 1) < 0.25) + pSpectator->HandleEmote(EMOTE_ONESHOT_CHEER); + } + } Start(false); SetEscortPaused(false); m_uiEventTimer = 0; @@ -361,41 +375,56 @@ struct npc_grimstoneAI : public npc_escortAI break; case 3: // Open East Gate + m_creature->CastSpell(m_creature, SPELL_ARENA_FLASH_A, true); + m_creature->CastSpell(m_creature, SPELL_ARENA_FLASH_B, true); m_pInstance->DoUseDoorOrButton(GO_ARENA_1); m_uiEventTimer = 3000; break; case 4: - SetEscortPaused(false); + // timer for teleport out spell which has 2000 ms cast time + m_creature->CastSpell(m_creature, SPELL_ASHCROMBES_TELEPORT_B, true); + m_uiEventTimer = 2500; + break; + case 5: m_creature->SetVisibility(VISIBILITY_OFF); + SetEscortPaused(false); // Summon Ring Mob(s) SummonRingMob(aRingMob[m_uiMobSpawnId], POS_EAST); m_uiEventTimer = 8000; break; - case 5: + case 6: // Summon Ring Mob(s) SummonRingMob(aRingMob[m_uiMobSpawnId], POS_EAST); SummonRingMob(aRingMob[m_uiMobSpawnId], POS_EAST); m_uiEventTimer = 8000; break; - case 6: + case 7: // Summon Ring Mob(s) SummonRingMob(aRingMob[m_uiMobSpawnId], POS_EAST); m_uiEventTimer = 0; break; - case 7: + case 8: // Summoned Mobs are dead, continue event + DoScriptText(SAY_SUMMON_BOSS_2, m_creature); m_creature->SetVisibility(VISIBILITY_ON); + m_creature->CastSpell(m_creature, SPELL_ASHCROMBES_TELEPORT_A, true); m_pInstance->DoUseDoorOrButton(GO_ARENA_1); - // DoScriptText(-1000000, m_creature); // after killed the mobs, no say here SetEscortPaused(false); m_uiEventTimer = 0; break; - case 8: + case 9: // Open North Gate + m_creature->CastSpell(m_creature, SPELL_ARENA_FLASH_C, true); + m_creature->CastSpell(m_creature, SPELL_ARENA_FLASH_D, true); m_pInstance->DoUseDoorOrButton(GO_ARENA_2); m_uiEventTimer = 5000; break; - case 9: + case 10: + // timer for teleport out spell which has 2000 ms cast time + m_creature->CastSpell(m_creature, SPELL_ASHCROMBES_TELEPORT_B, true); + m_uiEventTimer = 2500; + break; + case 11: // Summon Boss m_creature->SetVisibility(VISIBILITY_OFF); // If banner summoned after start, then summon Thelden after the creatures are dead @@ -413,7 +442,7 @@ struct npc_grimstoneAI : public npc_escortAI } m_uiEventTimer = 0; break; - case 10: + case 12: // Boss dead m_lSummonedGUIDList.clear(); m_pInstance->DoUseDoorOrButton(GO_ARENA_2); diff --git a/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.h b/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.h index 8d70bcb67..742e83dd7 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.h +++ b/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.h @@ -96,7 +96,7 @@ enum SPELL_STONED = 10255, // Aura of Warbringer Constructs in Relict Vault FACTION_DWARF_HOSTILE = 754, // Hostile faction for the Tomb of the Seven dwarfs - FACTION_ARENA_NEUTRAL = 674, // Neutral faction for NPC in top of Arena after event complete + FACTION_ARENA_NEUTRAL = 15, // Neutral faction for NPC in top of Arena after event complete }; struct ArenaCylinder @@ -179,6 +179,7 @@ class instance_blackrock_depths : public ScriptedInstance // Arena Event void SetArenaCenterCoords(float fX, float fY, float fZ) { m_fArenaCenterX = fX; m_fArenaCenterY = fY; m_fArenaCenterZ = fZ; } void GetArenaCenterCoords(float& fX, float& fY, float& fZ) { fX = m_fArenaCenterX; fY = m_fArenaCenterY; fZ = m_fArenaCenterZ; } + GuidSet GetArenaCrowdGuid() { return m_sArenaCrowdNpcGuids; } private: void DoCallNextDwarf(); diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index a8768fd21..8947ee348 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3142" + #define SD2_REVISION_NR "3143" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index d889af0e0..46c0cc16b 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -1545,12 +1545,12 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1230002,'Hail to the king, baby!',0,1,0,0,'dagran SAY_SLAY'), (-1230003,'You have challenged the Seven, and now you will die!',0,0,0,0,'doomrel SAY_DOOMREL_START_EVENT'), -(-1230004,'The Sons of Thaurissan shall watch you perish in the Ring of the Law!',0,1,0,0,'grimstone SAY_START_1'), -(-1230005,'You have been sentenced to death for crimes against the Dark Iron Nation!',0,1,0,0,'grimstone SAY_START_2'), -(-1230006,'Unleash the fury and let it be done!',0,1,0,0,'grimstone SAY_OPEN_EAST_GATE'), -(-1230007,'But your real punishment lies ahead.',0,1,0,0,'grimstone SAY_SUMMON_BOSS_1'), -(-1230008,'Haha! I bet you thought you were done!',0,1,0,0,'grimstone SAY_SUMMON_BOSS_2'), -(-1230009,'Good Riddance!',0,1,0,0,'grimstone SAY_OPEN_NORTH_GATE'), +(-1230004,'The Sons of Thaurissan shall watch you perish in the Ring of the Law!',0,1,0,5,'grimstone SAY_START_1'), +(-1230005,'You have been sentenced to death for crimes against the Dark Iron Nation!',0,1,0,25,'grimstone SAY_START_2'), +(-1230006,'Unleash the fury and let it be done!',0,1,0,15,'grimstone SAY_OPEN_EAST_GATE'), +(-1230007,'But your real punishment lies ahead.',0,1,0,1,'grimstone SAY_SUMMON_BOSS_1'), +(-1230008,'Haha! I bet you thought you were done!',0,1,0,153,'grimstone SAY_SUMMON_BOSS_2'), +(-1230009,'Good Riddance!',0,1,0,5,'grimstone SAY_OPEN_NORTH_GATE'), (-1230010,'Thank you, $N! I\'m free!!!',0,0,0,0,'dughal SAY_FREE'), (-1230011,'You locked up the wrong Marshal, $N. Prepare to be destroyed!',0,0,0,0,'windsor SAY_AGGRO_1'), diff --git a/sql/updates/r3143_scriptdev2.sql b/sql/updates/r3143_scriptdev2.sql new file mode 100644 index 000000000..ae3b739b5 --- /dev/null +++ b/sql/updates/r3143_scriptdev2.sql @@ -0,0 +1,6 @@ +UPDATE script_texts SET emote=25 WHERE entry=-1230005; +UPDATE script_texts SET emote=5 WHERE entry=-1230004; +UPDATE script_texts SET emote=15 WHERE entry=-1230006; +UPDATE script_texts SET emote=153 WHERE entry=-1230008; +UPDATE script_texts SET emote=1 WHERE entry=-1230007; +UPDATE script_texts SET emote=5 WHERE entry=-1230009; From 43fb004c167d62ba12cb5ed65f7c55d2a75a8421 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Mon, 29 Jun 2015 21:58:21 +0200 Subject: [PATCH 1161/1172] [3144] Update previous commit --- scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.cpp | 2 +- scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.h | 2 +- sd2_revision_nr.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.cpp b/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.cpp index 50777921d..eb2373590 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.cpp +++ b/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.cpp @@ -352,7 +352,7 @@ struct npc_grimstoneAI : public npc_escortAI m_pInstance->DoUseDoorOrButton(GO_ARENA_4); // Some of the NPCs in the crowd do cheer emote at event start // we randomly select 25% of the NPCs to do this - m_lArenaCrowd = m_pInstance->GetArenaCrowdGuid(); + m_pInstance->GetArenaCrowdGuid(m_lArenaCrowd); for (GuidSet::const_iterator itr = m_lArenaCrowd.begin(); itr != m_lArenaCrowd.end(); ++itr) { if (Creature* pSpectator = m_creature->GetMap()->GetCreature(*itr)) diff --git a/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.h b/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.h index 742e83dd7..dbea998cb 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.h +++ b/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.h @@ -179,7 +179,7 @@ class instance_blackrock_depths : public ScriptedInstance // Arena Event void SetArenaCenterCoords(float fX, float fY, float fZ) { m_fArenaCenterX = fX; m_fArenaCenterY = fY; m_fArenaCenterZ = fZ; } void GetArenaCenterCoords(float& fX, float& fY, float& fZ) { fX = m_fArenaCenterX; fY = m_fArenaCenterY; fZ = m_fArenaCenterZ; } - GuidSet GetArenaCrowdGuid() { return m_sArenaCrowdNpcGuids; } + void GetArenaCrowdGuid(GuidSet& sCrowdSet) { sCrowdSet = m_sArenaCrowdNpcGuids; } private: void DoCallNextDwarf(); diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 8947ee348..ad2a59080 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3143" + #define SD2_REVISION_NR "3144" #endif // __SD2_REVISION_NR_H__ From 501223981b195bb99345f86614a16d8af8732b0b Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Sat, 8 Aug 2015 18:30:12 +0200 Subject: [PATCH 1162/1172] [3145] Fix some warnings, improve AQ40 code Possibly related to cmangos/issues#719 --- .../temple_of_ahnqiraj/instance_temple_of_ahnqiraj.cpp | 4 ++-- scripts/kalimdor/temple_of_ahnqiraj/temple_of_ahnqiraj.h | 1 + .../trial_of_the_crusader/boss_faction_champions.cpp | 2 -- .../trial_of_the_crusader/instance_trial_of_the_crusader.cpp | 2 +- sd2_revision_nr.h | 2 +- 5 files changed, 5 insertions(+), 6 deletions(-) diff --git a/scripts/kalimdor/temple_of_ahnqiraj/instance_temple_of_ahnqiraj.cpp b/scripts/kalimdor/temple_of_ahnqiraj/instance_temple_of_ahnqiraj.cpp index 3b294007d..2301d21b5 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/instance_temple_of_ahnqiraj.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/instance_temple_of_ahnqiraj.cpp @@ -193,7 +193,7 @@ void instance_temple_of_ahnqiraj::SetData(uint32 uiType, uint32 uiData) std::ostringstream saveStream; saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2] << " " << m_auiEncounter[3] << " " << m_auiEncounter[4] << " " << m_auiEncounter[5] << " " << m_auiEncounter[6] << " " << m_auiEncounter[7] << " " - << m_auiEncounter[8] << " " << m_auiEncounter[9]; + << m_auiEncounter[8]; m_strInstData = saveStream.str(); @@ -215,7 +215,7 @@ void instance_temple_of_ahnqiraj::Load(const char* chrIn) std::istringstream loadStream(chrIn); loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3] >> m_auiEncounter[4] >> m_auiEncounter[5] >> m_auiEncounter[6] >> m_auiEncounter[7] - >> m_auiEncounter[8] >> m_auiEncounter[9]; + >> m_auiEncounter[8]; for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) { diff --git a/scripts/kalimdor/temple_of_ahnqiraj/temple_of_ahnqiraj.h b/scripts/kalimdor/temple_of_ahnqiraj/temple_of_ahnqiraj.h index e47749db8..090041f7a 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/temple_of_ahnqiraj.h +++ b/scripts/kalimdor/temple_of_ahnqiraj/temple_of_ahnqiraj.h @@ -71,6 +71,7 @@ class instance_temple_of_ahnqiraj : public ScriptedInstance { public: instance_temple_of_ahnqiraj(Map* pMap); + ~instance_temple_of_ahnqiraj() {} void Initialize() override; diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_faction_champions.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_faction_champions.cpp index ac5564acd..f94e039c7 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_faction_champions.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_faction_champions.cpp @@ -1181,8 +1181,6 @@ struct boss_crusader_death_knightAI : public trial_crusader_commonAI void ReceiveAIEvent(AIEventType eventType, Creature* /*pSender*/, Unit* pInvoker, uint32 /*uiMiscValue*/) override { uint8 uiIndex = 99; - uint32 uiSpellEntry = 0; - uint32 uiSpellTimer = 0; switch (eventType) { diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp index 1f24cbedb..ac0a414fd 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp @@ -491,7 +491,7 @@ void instance_trial_of_the_crusader::OnCreatureDeath(Creature* pCreature) } // all crusaders are killed - if (m_uiKilledCrusaders == (Is25ManDifficulty() ? MAX_CRUSADERS_25MAN : MAX_CRUSADERS_10MAN)) + if (m_uiKilledCrusaders == uint32(Is25ManDifficulty() ? MAX_CRUSADERS_25MAN : MAX_CRUSADERS_10MAN)) { SetData(TYPE_FACTION_CHAMPIONS, DONE); diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index ad2a59080..da2cfba0e 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3144" + #define SD2_REVISION_NR "3145" #endif // __SD2_REVISION_NR_H__ From 05ddea01a7661e392211248d77f884c4eb190b17 Mon Sep 17 00:00:00 2001 From: Tobschinski Date: Mon, 10 Aug 2015 23:59:10 +0200 Subject: [PATCH 1163/1172] [3146] Molten Core - Gehennas Improved AI Close #174 (based on commit a2246d6) Signed-off-by: Xfurry --- .../molten_core/boss_gehennas.cpp | 66 ++++++++++--------- sd2_revision_nr.h | 2 +- 2 files changed, 36 insertions(+), 32 deletions(-) diff --git a/scripts/eastern_kingdoms/molten_core/boss_gehennas.cpp b/scripts/eastern_kingdoms/molten_core/boss_gehennas.cpp index 2409a2546..30aea5438 100644 --- a/scripts/eastern_kingdoms/molten_core/boss_gehennas.cpp +++ b/scripts/eastern_kingdoms/molten_core/boss_gehennas.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: Boss_Gehennas -SD%Complete: 90 -SDComment: +SD%Complete: 100 +SDComment: - SDCategory: Molten Core EndScriptData */ @@ -26,9 +26,10 @@ EndScriptData */ enum { - SPELL_SHADOW_BOLT = 19728, // 19729 exists too, but can be reflected + SPELL_GEHENNAS_CURSE = 19716, SPELL_RAIN_OF_FIRE = 19717, - SPELL_GEHENNAS_CURSE = 19716 + SPELL_SHADOW_BOLT_RANDOM = 19728, + SPELL_SHADOW_BOLT_TARGET = 19729, }; struct boss_gehennasAI : public ScriptedAI @@ -41,15 +42,17 @@ struct boss_gehennasAI : public ScriptedAI ScriptedInstance* m_pInstance; - uint32 m_uiShadowBoltTimer; - uint32 m_uiRainOfFireTimer; uint32 m_uiGehennasCurseTimer; + uint32 m_uiRainOfFireTimer; + uint32 m_uiShadowBoltRandomTimer; + uint32 m_uiShadowBoltTargetTimer; void Reset() override { - m_uiShadowBoltTimer = 6000; - m_uiRainOfFireTimer = 10000; - m_uiGehennasCurseTimer = 12000; + m_uiGehennasCurseTimer = urand(5 * IN_MILLISECONDS, 10 * IN_MILLISECONDS); + m_uiRainOfFireTimer = urand(6 * IN_MILLISECONDS, 12 * IN_MILLISECONDS); + m_uiShadowBoltRandomTimer = urand(3 * IN_MILLISECONDS, 6 * IN_MILLISECONDS); + m_uiShadowBoltTargetTimer = urand(3 * IN_MILLISECONDS, 6 * IN_MILLISECONDS); } void Aggro(Unit* /*pwho*/) override @@ -75,41 +78,42 @@ struct boss_gehennasAI : public ScriptedAI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - // ShadowBolt Timer - if (m_uiShadowBoltTimer < uiDiff) - { - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1)) - { - if (DoCastSpellIfCan(pTarget, SPELL_SHADOW_BOLT) == CAST_OK) - m_uiShadowBoltTimer = 7000; - } - else // In case someone attempts soloing, we don't need to scan for targets every tick - m_uiShadowBoltTimer = 7000; - } - else - m_uiShadowBoltTimer -= uiDiff; - - // Rain of Fire Timer + // Rain_of_Fire-Timer if (m_uiRainOfFireTimer < uiDiff) { - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) - { - if (DoCastSpellIfCan(pTarget, SPELL_RAIN_OF_FIRE) == CAST_OK) - m_uiRainOfFireTimer = urand(4000, 12000); - } + if (DoCastSpellIfCan(m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0), SPELL_RAIN_OF_FIRE) == CAST_OK) + m_uiRainOfFireTimer = urand(6 * IN_MILLISECONDS, 12 * IN_MILLISECONDS); } else m_uiRainOfFireTimer -= uiDiff; - // GehennasCurse Timer + // Gehennas_Curse-Timer if (m_uiGehennasCurseTimer < uiDiff) { if (DoCastSpellIfCan(m_creature, SPELL_GEHENNAS_CURSE) == CAST_OK) - m_uiGehennasCurseTimer = 30000; + m_uiGehennasCurseTimer = urand(25 * IN_MILLISECONDS, 30 * IN_MILLISECONDS); } else m_uiGehennasCurseTimer -= uiDiff; + // Shadow_Bolt_Random-Timer + if (m_uiShadowBoltRandomTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0), SPELL_SHADOW_BOLT_RANDOM) == CAST_OK) + m_uiShadowBoltRandomTimer = urand(3 * IN_MILLISECONDS, 6 * IN_MILLISECONDS); + } + else + m_uiShadowBoltRandomTimer -= uiDiff; + + // Shadow_Bolt_Target-Timer + if (m_uiShadowBoltTargetTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_SHADOW_BOLT_TARGET) == CAST_OK) + m_uiShadowBoltTargetTimer = urand(3 * IN_MILLISECONDS, 6 * IN_MILLISECONDS); + } + else + m_uiShadowBoltTargetTimer -= uiDiff; + DoMeleeAttackIfReady(); } }; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index da2cfba0e..64905b195 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3145" + #define SD2_REVISION_NR "3146" #endif // __SD2_REVISION_NR_H__ From 4ec687c47f5a6ad4f2ca3a82fb0133ee662bc813 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Tue, 11 Aug 2015 00:12:30 +0200 Subject: [PATCH 1164/1172] [3147] Scripted creatures which are on transport shouldn't move to home position --- include/sc_creature.cpp | 3 ++- sd2_revision_nr.h | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/include/sc_creature.cpp b/include/sc_creature.cpp index bd90191ac..59aadb7cf 100644 --- a/include/sc_creature.cpp +++ b/include/sc_creature.cpp @@ -130,7 +130,8 @@ void ScriptedAI::EnterEvadeMode() m_creature->DeleteThreatList(); m_creature->CombatStop(true); - if (m_creature->isAlive()) + // only alive creatures that are not on transport can return to home position + if (m_creature->isAlive() && !m_creature->IsBoarded()) m_creature->GetMotionMaster()->MoveTargetedHome(); m_creature->SetLootRecipient(NULL); diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 64905b195..d05a625e3 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3146" + #define SD2_REVISION_NR "3147" #endif // __SD2_REVISION_NR_H__ From 03c27aefe5efbac38f0f8f8a390c88215a08fbb5 Mon Sep 17 00:00:00 2001 From: Tobschinski Date: Tue, 11 Aug 2015 22:12:15 +0200 Subject: [PATCH 1165/1172] [3148] BRD - General Angerforge Close scriptdev2/scriptdev2-classic#45 (based on commit 7722c86) Signed-off-by: Xfurry --- .../boss_general_angerforge.cpp | 99 ++++++++----------- sd2_revision_nr.h | 2 +- sql/scriptdev2_script_full.sql | 4 +- sql/updates/r3148_scriptdev2.sql | 3 + 4 files changed, 48 insertions(+), 60 deletions(-) create mode 100644 sql/updates/r3148_scriptdev2.sql diff --git a/scripts/eastern_kingdoms/blackrock_depths/boss_general_angerforge.cpp b/scripts/eastern_kingdoms/blackrock_depths/boss_general_angerforge.cpp index e81f63ecb..d682565ec 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/boss_general_angerforge.cpp +++ b/scripts/eastern_kingdoms/blackrock_depths/boss_general_angerforge.cpp @@ -25,44 +25,51 @@ EndScriptData */ enum { - SPELL_MIGHTYBLOW = 14099, - SPELL_HAMSTRING = 9080, - SPELL_CLEAVE = 20691, + EMOTE_ALARM = -1230035, + + SPELL_FLURRY = 15088, + SPELL_ENRAGE = 15097, + SPELL_SUNDER_ARMOR = 15572, - NPC_ANVILRAGE_RESERVIST = 8901, NPC_ANVILRAGE_MEDIC = 8894, + NPC_ANVILRAGE_RESERVIST = 8901, + + NPC_ELITE_AMOUNT = 2, + NPC_NORMAL_AMOUNT = 8, }; +static const float aAlarmPoint[4] = {717.343f, 22.116f, -45.4321f, 3.1415f}; + struct boss_general_angerforgeAI : public ScriptedAI { boss_general_angerforgeAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } - uint32 m_uiMightyBlowTimer; - uint32 m_uiHamStringTimer; - uint32 m_uiCleaveTimer; - uint32 m_uiAddsTimer; - bool m_bSummonedMedics; + uint32 m_uiSunderArmorTimer; + uint32 m_uiAlarmTimer; void Reset() override { - m_uiMightyBlowTimer = 8000; - m_uiHamStringTimer = 12000; - m_uiCleaveTimer = 16000; - m_uiAddsTimer = 0; - m_bSummonedMedics = false; + m_uiSunderArmorTimer = urand(5 * IN_MILLISECONDS, 10 * IN_MILLISECONDS); + m_uiAlarmTimer = 0; + } + + void Aggro(Unit* /*pWho*/) override + { + DoCastSpellIfCan(m_creature, SPELL_FLURRY, CAST_AURA_NOT_PRESENT | CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_ENRAGE, CAST_AURA_NOT_PRESENT | CAST_TRIGGERED); } void SummonAdd(uint32 uiEntry) { float fX, fY, fZ; - m_creature->GetRandomPoint(m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), 20.0f, fX, fY, fZ); - m_creature->SummonCreature(uiEntry, fX, fY, fZ, 0.0f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 60000); + m_creature->GetRandomPoint(aAlarmPoint[0], aAlarmPoint[1], aAlarmPoint[2], 1.0f, fX, fY, fZ); + m_creature->SummonCreature(uiEntry, fX, fY, fZ, aAlarmPoint[3], TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 30 * IN_MILLISECONDS); } void JustSummoned(Creature* pSummoned) override { - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) - pSummoned->AI()->AttackStart(pTarget); + if (m_creature->getVictim()) + pSummoned->AI()->AttackStart(m_creature->getVictim()); } void UpdateAI(const uint32 uiDiff) override @@ -71,55 +78,31 @@ struct boss_general_angerforgeAI : public ScriptedAI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - // MightyBlow_Timer - if (m_uiMightyBlowTimer < uiDiff) - { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_MIGHTYBLOW); - m_uiMightyBlowTimer = 18000; - } - else - m_uiMightyBlowTimer -= uiDiff; - - // HamString_Timer - if (m_uiHamStringTimer < uiDiff) - { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_HAMSTRING); - m_uiHamStringTimer = 15000; - } - else - m_uiHamStringTimer -= uiDiff; - - // Cleave_Timer - if (m_uiCleaveTimer < uiDiff) + // Sunder_Armor-Timer + if (m_uiSunderArmorTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_CLEAVE); - m_uiCleaveTimer = 9000; + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_SUNDER_ARMOR) == CAST_OK) + m_uiSunderArmorTimer = urand(5 * IN_MILLISECONDS, 15 * IN_MILLISECONDS); } else - m_uiCleaveTimer -= uiDiff; + m_uiSunderArmorTimer -= uiDiff; - // Adds_Timer - if (m_creature->GetHealthPercent() < 21.0f) + // Alarm-Timer + if (m_creature->GetHealthPercent() < 40.0f) { - if (m_uiAddsTimer < uiDiff) + if (m_uiAlarmTimer < uiDiff) { - // summon 3 Adds every 25s - SummonAdd(NPC_ANVILRAGE_RESERVIST); - SummonAdd(NPC_ANVILRAGE_RESERVIST); - SummonAdd(NPC_ANVILRAGE_RESERVIST); + DoScriptText(EMOTE_ALARM, m_creature); + + for (int i = 0; i < NPC_NORMAL_AMOUNT; i++) + SummonAdd(NPC_ANVILRAGE_RESERVIST); + for (int i = 0; i < NPC_ELITE_AMOUNT; i++) + SummonAdd(NPC_ANVILRAGE_MEDIC); - m_uiAddsTimer = 25000; + m_uiAlarmTimer = 3 * MINUTE * IN_MILLISECONDS; } else - m_uiAddsTimer -= uiDiff; - } - - // Summon Medics - if (!m_bSummonedMedics && m_creature->GetHealthPercent() < 21.0f) - { - SummonAdd(NPC_ANVILRAGE_MEDIC); - SummonAdd(NPC_ANVILRAGE_MEDIC); - m_bSummonedMedics = true; + m_uiAlarmTimer -= uiDiff; } DoMeleeAttackIfReady(); diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index d05a625e3..5ec4547df 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3147" + #define SD2_REVISION_NR "3148" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 46c0cc16b..946814836 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -1577,7 +1577,9 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1230032,'Thank you! I will run for safety immediately!',0,0,0,0,'tobias SAY_TOBIAS_FREE_1'), (-1230033,'Finally!! I can leave this dump.',0,0,0,0,'tobias SAY_TOBIAS_FREE_2'), -(-1230034,'You\'ll pay for this insult, $c!',0,0,0,15,'coren direbrew SAY_AGGRO'); +(-1230034,'You\'ll pay for this insult, $c!',0,0,0,15,'coren direbrew SAY_AGGRO'), + +(-1230035,'%s cries out an alarm!',0,2,0,0,'general_angerforge EMOTE_ALARM'); -- -1 249 000 ONYXIA'S LAIR INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES diff --git a/sql/updates/r3148_scriptdev2.sql b/sql/updates/r3148_scriptdev2.sql new file mode 100644 index 000000000..e15344214 --- /dev/null +++ b/sql/updates/r3148_scriptdev2.sql @@ -0,0 +1,3 @@ +DELETE FROM script_texts WHERE entry=1230035; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1230035,'%s cries out an alarm!',0,2,0,0,'general_angerforge EMOTE_ALARM'); From e73cd175f2e6e1e4078bf86bdd268e4152047632 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Tue, 11 Aug 2015 23:31:01 +0200 Subject: [PATCH 1166/1172] [3149] Fix summoning event for Ouro - AQ40 Thanks to @Tobschinski for providing the data Close scriptdev2/scriptdev2-classic#46 --- .../kalimdor/temple_of_ahnqiraj/boss_ouro.cpp | 28 ++++++++----------- sd2_revision_nr.h | 2 +- 2 files changed, 13 insertions(+), 17 deletions(-) diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_ouro.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_ouro.cpp index b8bf1b31e..cdb8987d1 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/boss_ouro.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_ouro.cpp @@ -42,7 +42,8 @@ enum SPELL_SUMMON_OURO_MOUND = 26058, // summons 5 dirt mounds SPELL_SUMMON_TRIGGER = 26284, - SPELL_SUMMON_OURO = 26642, + // SPELL_SUMMON_OURO_TRIGG = 26642, + SPELL_SUMMON_OURO = 26061, // used by the script to summon the boss directly SPELL_QUAKE = 26093, // other spells - not used @@ -266,16 +267,13 @@ struct npc_ouro_spawnerAI : public Scripted_NoMovementAI m_bHasSummoned = false; } - void MoveInLineOfSight(Unit* pWho) override + void Aggro(Unit* /*pWho*/) override { - // Spawn Ouro on LoS check - if (!m_bHasSummoned && pWho->GetTypeId() == TYPEID_PLAYER && !((Player*)pWho)->isGameMaster() && m_creature->IsWithinDistInMap(pWho, 50.0f)) + if (!m_bHasSummoned) { - if (DoCastSpellIfCan(m_creature, SPELL_SUMMON_OURO) == CAST_OK) - m_bHasSummoned = true; + DoCastSpellIfCan(m_creature, SPELL_SUMMON_OURO, CAST_TRIGGERED); + m_bHasSummoned = true; } - - ScriptedAI::MoveInLineOfSight(pWho); } void JustSummoned(Creature* pSummoned) override @@ -291,16 +289,14 @@ struct npc_ouro_spawnerAI : public Scripted_NoMovementAI void UpdateAI(const uint32 uiDiff) override { - if (m_bHasSummoned) + // triggered by missing spell 26092 + if (m_uiQuakeTimer < uiDiff) { - if (m_uiQuakeTimer < uiDiff) - { - if (DoCastSpellIfCan(m_creature, SPELL_QUAKE) == CAST_OK) - m_uiQuakeTimer = 1000; - } - else - m_uiQuakeTimer -= uiDiff; + if (DoCastSpellIfCan(m_creature, SPELL_QUAKE) == CAST_OK) + m_uiQuakeTimer = 1000; } + else + m_uiQuakeTimer -= uiDiff; } }; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 5ec4547df..e0c80851c 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3148" + #define SD2_REVISION_NR "3149" #endif // __SD2_REVISION_NR_H__ From fcdfa6d5c5ee339323f70cd7df09855fc5c4adbb Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Wed, 12 Aug 2015 21:05:43 +0200 Subject: [PATCH 1167/1172] [3150] Fix quest 1249, the missing diplo_pt11 Sidenote: Due to changes in escortAI, checking for motion-tpye in MovementInform must be checked in every case. Added wrapper for this to be prepared for easier transition Also note that when Reaching the COMBAT_START point for escortAI will no more trigger MovementInform. Thanks to xfurry for researching, as well as zimms in unified-db/Database~74 for reporting and all others who contributed to the problem research! --- base/escort_ai.cpp | 8 +++++- base/escort_ai.h | 1 + scripts/eastern_kingdoms/wetlands.cpp | 39 ++++++++++++--------------- sd2_revision_nr.h | 2 +- 4 files changed, 26 insertions(+), 24 deletions(-) diff --git a/base/escort_ai.cpp b/base/escort_ai.cpp index d34a3c57b..eec66678b 100644 --- a/base/escort_ai.cpp +++ b/base/escort_ai.cpp @@ -227,9 +227,15 @@ void npc_escortAI::UpdateEscortAI(const uint32 /*uiDiff*/) DoMeleeAttackIfReady(); } +/// Helper function for transition between old Escort Movment and using WaypointMMGen +bool npc_escortAI::IsSD2EscortMovement(uint32 uiMoveType) const +{ + return uiMoveType >= EXTERNAL_WAYPOINT_MOVE; +} + void npc_escortAI::MovementInform(uint32 uiMoveType, uint32 uiPointId) { - if (uiMoveType < EXTERNAL_WAYPOINT_MOVE || !HasEscortState(STATE_ESCORT_ESCORTING)) + if (!IsSD2EscortMovement(uiMoveType) || !HasEscortState(STATE_ESCORT_ESCORTING)) return; //uint32 pathId = uiMoveType & 0xFF; diff --git a/base/escort_ai.h b/base/escort_ai.h index a06b4e22f..282aaa525 100644 --- a/base/escort_ai.h +++ b/base/escort_ai.h @@ -57,6 +57,7 @@ struct npc_escortAI : public ScriptedAI protected: Player* GetPlayerForEscort() { return m_creature->GetMap()->GetPlayer(m_playerGuid); } + bool IsSD2EscortMovement(uint32 uiMoveType) const; virtual void JustStartedEscort() {} private: diff --git a/scripts/eastern_kingdoms/wetlands.cpp b/scripts/eastern_kingdoms/wetlands.cpp index a715c90ba..6967bbefa 100644 --- a/scripts/eastern_kingdoms/wetlands.cpp +++ b/scripts/eastern_kingdoms/wetlands.cpp @@ -40,7 +40,7 @@ enum SAY_FRIEND_DEFEAT = -1000979, SAY_SLIM_NOTES = -1000980, - QUEST_MISSING_DIPLO_PT11 = 1249, + QUEST_MISSING_DIPLOMAT11 = 1249, FACTION_ENEMY = 168, // ToDo: faction needs to be confirmed! SPELL_STEALTH = 1785, @@ -54,7 +54,7 @@ static const DialogueEntry aDiplomatDialogue[] = { {SAY_SLIM_DEFEAT, NPC_TAPOKE_SLIM_JAHN, 4000}, {SAY_SLIM_NOTES, NPC_TAPOKE_SLIM_JAHN, 7000}, - {QUEST_MISSING_DIPLO_PT11, 0, 0}, + {QUEST_MISSING_DIPLOMAT11, 0, 0}, {0, 0, 0}, }; @@ -78,6 +78,18 @@ struct npc_tapoke_slim_jahnAI : public npc_escortAI, private DialogueHelper } } + void JustReachedHome() override + { + // after the npc is defeated, start the dialog right after it reaches the evade point + if (m_bEventComplete) + { + if (Player* pPlayer = GetPlayerForEscort()) + m_creature->SetFacingToObject(pPlayer); + + StartNextDialogueText(SAY_SLIM_DEFEAT); + } + } + void WaypointReached(uint32 uiPointId) override { switch (uiPointId) @@ -137,23 +149,6 @@ struct npc_tapoke_slim_jahnAI : public npc_escortAI, private DialogueHelper } } - void MovementInform(uint32 uiMoveType, uint32 uiPointId) override - { - if (uiMoveType != POINT_MOTION_TYPE || !HasEscortState(STATE_ESCORT_ESCORTING)) - return; - - npc_escortAI::MovementInform(uiMoveType, uiPointId); - - // after the npc is defeated, start the dialog right after it reaches the evade point - if (m_bEventComplete) - { - if (Player* pPlayer = GetPlayerForEscort()) - m_creature->SetFacingToObject(pPlayer); - - StartNextDialogueText(SAY_SLIM_DEFEAT); - } - } - void ReceiveAIEvent(AIEventType eventType, Creature* /*pSender*/, Unit* pInvoker, uint32 uiMiscValue) override { // start escort @@ -163,11 +158,11 @@ struct npc_tapoke_slim_jahnAI : public npc_escortAI, private DialogueHelper void JustDidDialogueStep(int32 iEntry) override { - if (iEntry == QUEST_MISSING_DIPLO_PT11) + if (iEntry == QUEST_MISSING_DIPLOMAT11) { // complete quest if (Player* pPlayer = GetPlayerForEscort()) - pPlayer->GroupEventHappens(QUEST_MISSING_DIPLO_PT11, m_creature); + pPlayer->GroupEventHappens(QUEST_MISSING_DIPLOMAT11, m_creature); // despawn and respawn at inn m_creature->ForcedDespawn(1000); @@ -205,7 +200,7 @@ CreatureAI* GetAI_npc_tapoke_slim_jahn(Creature* pCreature) bool QuestAccept_npc_mikhail(Player* pPlayer, Creature* pCreature, const Quest* pQuest) { - if (pQuest->GetQuestId() == QUEST_MISSING_DIPLO_PT11) + if (pQuest->GetQuestId() == QUEST_MISSING_DIPLOMAT11) { Creature* pSlim = GetClosestCreatureWithEntry(pCreature, NPC_TAPOKE_SLIM_JAHN, 25.0f); if (!pSlim) diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index e0c80851c..5f17ecef6 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3149" + #define SD2_REVISION_NR "3150" #endif // __SD2_REVISION_NR_H__ From 4f915b353c1469d8a89ca57a4eea517623654657 Mon Sep 17 00:00:00 2001 From: xfurry Date: Sun, 16 Aug 2015 11:23:53 +0300 Subject: [PATCH 1168/1172] [3151] Update [3148] Thanks to @evil-at-wow and @Tobschinski --- .../blackrock_depths/boss_general_angerforge.cpp | 2 +- sd2_revision_nr.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/eastern_kingdoms/blackrock_depths/boss_general_angerforge.cpp b/scripts/eastern_kingdoms/blackrock_depths/boss_general_angerforge.cpp index d682565ec..85d83a2b6 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/boss_general_angerforge.cpp +++ b/scripts/eastern_kingdoms/blackrock_depths/boss_general_angerforge.cpp @@ -88,7 +88,7 @@ struct boss_general_angerforgeAI : public ScriptedAI m_uiSunderArmorTimer -= uiDiff; // Alarm-Timer - if (m_creature->GetHealthPercent() < 40.0f) + if (m_creature->GetHealthPercent() < 30.0f) { if (m_uiAlarmTimer < uiDiff) { diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 5f17ecef6..dc2016de3 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3150" + #define SD2_REVISION_NR "3151" #endif // __SD2_REVISION_NR_H__ From 161da42d8eae23fd2019c8d72a2c8af5a1a48e72 Mon Sep 17 00:00:00 2001 From: xfurry Date: Sun, 16 Aug 2015 11:25:19 +0300 Subject: [PATCH 1169/1172] [3152] Drop some obsolete files --- sd2_revision_nr.h | 2 +- tool/git_id/git_id_vc80.sln | 20 ---- tool/git_id/git_id_vc80.vcproj | 195 --------------------------------- tool/git_id/git_id_vc90.sln | 20 ---- tool/git_id/git_id_vc90.vcproj | 194 -------------------------------- 5 files changed, 1 insertion(+), 430 deletions(-) delete mode 100644 tool/git_id/git_id_vc80.sln delete mode 100644 tool/git_id/git_id_vc80.vcproj delete mode 100644 tool/git_id/git_id_vc90.sln delete mode 100644 tool/git_id/git_id_vc90.vcproj diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index dc2016de3..6a3b8d73b 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3151" + #define SD2_REVISION_NR "3152" #endif // __SD2_REVISION_NR_H__ diff --git a/tool/git_id/git_id_vc80.sln b/tool/git_id/git_id_vc80.sln deleted file mode 100644 index f1a9d8be7..000000000 --- a/tool/git_id/git_id_vc80.sln +++ /dev/null @@ -1,20 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 9.00 -# Visual Studio 2005 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "git_id", "git_id_vc80.vcproj", "{AD81BF86-050B-4605-8AF2-03C01967D784}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Release|Win32 = Release|Win32 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {AD81BF86-050B-4605-8AF2-03C01967D784}.Debug|Win32.ActiveCfg = Debug|Win32 - {AD81BF86-050B-4605-8AF2-03C01967D784}.Debug|Win32.Build.0 = Debug|Win32 - {AD81BF86-050B-4605-8AF2-03C01967D784}.Release|Win32.ActiveCfg = Release|Win32 - {AD81BF86-050B-4605-8AF2-03C01967D784}.Release|Win32.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/tool/git_id/git_id_vc80.vcproj b/tool/git_id/git_id_vc80.vcproj deleted file mode 100644 index 401c329af..000000000 --- a/tool/git_id/git_id_vc80.vcproj +++ /dev/null @@ -1,195 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tool/git_id/git_id_vc90.sln b/tool/git_id/git_id_vc90.sln deleted file mode 100644 index 254218893..000000000 --- a/tool/git_id/git_id_vc90.sln +++ /dev/null @@ -1,20 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 10.00 -# Visual Studio 2008 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "git_id", "git_id_vc90.vcproj", "{AD81BF86-050B-4605-8AF2-03C01967D784}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Release|Win32 = Release|Win32 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {AD81BF86-050B-4605-8AF2-03C01967D784}.Debug|Win32.ActiveCfg = Debug|Win32 - {AD81BF86-050B-4605-8AF2-03C01967D784}.Debug|Win32.Build.0 = Debug|Win32 - {AD81BF86-050B-4605-8AF2-03C01967D784}.Release|Win32.ActiveCfg = Release|Win32 - {AD81BF86-050B-4605-8AF2-03C01967D784}.Release|Win32.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/tool/git_id/git_id_vc90.vcproj b/tool/git_id/git_id_vc90.vcproj deleted file mode 100644 index 67cff60ca..000000000 --- a/tool/git_id/git_id_vc90.vcproj +++ /dev/null @@ -1,194 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - From 42c495f0c31db520d04818b39503117cfb80fe38 Mon Sep 17 00:00:00 2001 From: xfurry Date: Sun, 16 Aug 2015 16:04:03 +0300 Subject: [PATCH 1170/1172] [3153] Quest support for DK quest 13188 and 13189 Thanks to @Grz3s for providing the information Close unified-db/Database#76 --- scripts/world/guards.cpp | 67 +++++++++++++++++++++++++++++++- sd2_revision_nr.h | 2 +- sql/mangos_scriptname_full.sql | 4 +- sql/scriptdev2_script_full.sql | 15 ++++++- sql/updates/r3153_mangos.sql | 2 + sql/updates/r3153_scriptdev2.sql | 13 +++++++ 6 files changed, 97 insertions(+), 6 deletions(-) create mode 100644 sql/updates/r3153_mangos.sql create mode 100644 sql/updates/r3153_scriptdev2.sql diff --git a/scripts/world/guards.cpp b/scripts/world/guards.cpp index c7f57d654..c0557234a 100644 --- a/scripts/world/guards.cpp +++ b/scripts/world/guards.cpp @@ -17,7 +17,7 @@ /* ScriptData SDName: Guards SD%Complete: 100 -SDComment: CombatAI should be organized better for future. +SDComment: CombatAI should be organized better for future. Quest support 13188 / 13189. SDCategory: Guards EndScriptData */ @@ -271,6 +271,69 @@ CreatureAI* GetAI_guard_undercity(Creature* pCreature) return new guardAI(pCreature); } +/******************************************************* + * quests 13188 / 13189 + *******************************************************/ + +enum +{ + SPELL_RETURN_ORGRIMMAR = 58552, + SPELL_RETURN_STORMWIND = 58533, + + SPELL_TOSS_APPLE = 58509, + SPELL_TOSS_BANANA = 58513, + SPELL_SPIT = 58520, + + EMOTE_APPLE = -1609081, + EMOTE_BANANA = -1609082, + EMOTE_SPIT = -1609083, + SAY_RANDOM_1 = -1609084, + SAY_RANDOM_2 = -1609085, + SAY_RANDOM_3 = -1609086, + SAY_RANDOM_4 = -1609087, + SAY_RANDOM_5 = -1609088, + SAY_RANDOM_6 = -1609287, + SAY_RANDOM_7 = -1609288, + SAY_RANDOM_8 = -1609289, +}; + +bool EffectDummyCreature_npc_city_guard(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget, ObjectGuid /*originalCasterGuid*/) +{ + // check spell ids; creature ids are defined in script target + if ((uiSpellId == SPELL_RETURN_ORGRIMMAR || uiSpellId == SPELL_RETURN_STORMWIND) && uiEffIndex == EFFECT_INDEX_0) + { + // random action + switch (urand(0, 10)) + { + case 0: + pCreatureTarget->CastSpell(pCaster, SPELL_TOSS_APPLE, true); + DoScriptText(EMOTE_APPLE, pCreatureTarget, pCaster); + break; + case 1: + pCreatureTarget->CastSpell(pCaster, SPELL_TOSS_BANANA, true); + DoScriptText(EMOTE_BANANA, pCreatureTarget, pCaster); + break; + case 2: + pCreatureTarget->CastSpell(pCaster, SPELL_SPIT, true); + DoScriptText(EMOTE_SPIT, pCreatureTarget, pCaster); + break; + case 3: DoScriptText(SAY_RANDOM_1, pCreatureTarget, pCaster); break; + case 4: DoScriptText(SAY_RANDOM_2, pCreatureTarget, pCaster); break; + case 5: DoScriptText(SAY_RANDOM_3, pCreatureTarget, pCaster); break; + case 6: DoScriptText(SAY_RANDOM_4, pCreatureTarget, pCaster); break; + case 7: DoScriptText(SAY_RANDOM_5, pCreatureTarget, pCaster); break; + case 8: DoScriptText(SAY_RANDOM_6, pCreatureTarget, pCaster); break; + case 9: DoScriptText(SAY_RANDOM_7, pCreatureTarget, pCaster); break; + case 10: DoScriptText(SAY_RANDOM_8, pCreatureTarget, pCaster); break; + } + + // return true as we don't need further script handling in DB + return true; + } + + return false; +} + void AddSC_guards() { Script* pNewScript; @@ -333,6 +396,7 @@ void AddSC_guards() pNewScript = new Script; pNewScript->Name = "guard_orgrimmar"; pNewScript->GetAI = &GetAI_guard_orgrimmar; + pNewScript->pEffectDummyNPC = &EffectDummyCreature_npc_city_guard; pNewScript->RegisterSelf(); pNewScript = new Script; @@ -358,6 +422,7 @@ void AddSC_guards() pNewScript = new Script; pNewScript->Name = "guard_stormwind"; pNewScript->GetAI = &GetAI_guard_stormwind; + pNewScript->pEffectDummyNPC = &EffectDummyCreature_npc_city_guard; pNewScript->RegisterSelf(); pNewScript = new Script; diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index 6a3b8d73b..bf60725a9 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3152" + #define SD2_REVISION_NR "3153" #endif // __SD2_REVISION_NR_H__ diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index e8a49f296..4fbce35d2 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -124,8 +124,8 @@ UPDATE gameobject_template SET ScriptName='go_lab_work_reagents' WHERE entry IN /* GUARD */ UPDATE creature_template SET ScriptName='guard_azuremyst' WHERE entry=18038; -UPDATE creature_template SET ScriptName='guard_orgrimmar' WHERE entry=3296; -UPDATE creature_template SET ScriptName='guard_stormwind' WHERE entry IN (68,1976); +UPDATE creature_template SET ScriptName='guard_orgrimmar' WHERE entry IN (3296,14304); +UPDATE creature_template SET ScriptName='guard_stormwind' WHERE entry IN (68,1756,1976); UPDATE creature_template SET ScriptName='guard_contested' WHERE entry IN (9460,4624,3502,11190,15184); UPDATE creature_template SET ScriptName='guard_elwynnforest' WHERE entry=1423; UPDATE creature_template SET ScriptName='guard_eversong' WHERE entry=16221; diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 946814836..faa752f43 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -4151,7 +4151,14 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1609079,'Hrm, what a strange tree. I must investigate.',0,0,0,1,'scarlet courier SAY_TREE_1'), (-1609080,'What\'s this!? This isn\'t a tree at all! Guards! Guards!',0,0,0,5,'scarlet courier SAY_TREE_2'), --- PLEASE RE-USE -1609081 to -1609088 +(-1609081,'%s throws rotten apple on $N.',0,2,0,0,'city guard EMOTE_APPLE'), +(-1609082,'%s throws rotten banana on $N.',0,2,0,0,'city guard EMOTE_BANANA'), +(-1609083,'%s spits on $N.',0,2,0,0,'city guard EMOTE_SPIT'), +(-1609084,'Monster!',0,0,0,14,'city guard SAY_RANDOM_1'), +(-1609085,'Murderer!',0,0,0,14,'city guard SAY_RANDOM_2'), +(-1609086,'GET A ROPE!',0,0,0,25,'city guard SAY_RANDOM_3'), +(-1609087,'How dare you set foot in our city!',0,0,0,25,'city guard SAY_RANDOM_4'), +(-1609088,'You disgust me.',0,0,0,14,'city guard SAY_RANDOM_5'), (-1609089,'The Eye of Acherus launches towards its destination',0,3,0,0,'eye of acherus EMOTE_DESTIANTION'), (-1609090,'The Eye of Acherus is in your control',0,3,0,0,'eye of acherus EMOTE_CONTROL'), @@ -4251,7 +4258,11 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1609283,'%s collapses.',0,2,0,0,'Highlord Darion Mograine'), (-1609284,'%s charges towards the Lich King, Ashbringer in hand and strikes the Lich King.',0,2,0,0,'Highlord Tirion Fordring'), (-1609285,'%s disappears. Tirion walks over to where Darion lay',0,2,0,0,'The Lich King'), -(-1609286,'Light washes over the chapel -- the Light of Dawn is uncovered.',0,2,0,0,''); +(-1609286,'Light washes over the chapel -- the Light of Dawn is uncovered.',0,2,0,0,''), + +(-1609287,'Looks like we\'re going to have ourselves an execution.',0,0,0,25,'city guard SAY_RANDOM_6'), +(-1609288,'Traitorous dog.',0,0,0,14,'city guard SAY_RANDOM_7'), +(-1609289,'My family was wiped out by the Scourge! MONSTER!',0,0,0,25,'city guard SAY_RANDOM_8'); -- -1 615 000 OBSIDIAN SANCTUM INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES diff --git a/sql/updates/r3153_mangos.sql b/sql/updates/r3153_mangos.sql new file mode 100644 index 000000000..7cf5dae33 --- /dev/null +++ b/sql/updates/r3153_mangos.sql @@ -0,0 +1,2 @@ +UPDATE creature_template SET ScriptName='guard_orgrimmar' WHERE entry=14304; +UPDATE creature_template SET ScriptName='guard_stormwind' WHERE entry IN (68,1756,1976); diff --git a/sql/updates/r3153_scriptdev2.sql b/sql/updates/r3153_scriptdev2.sql new file mode 100644 index 000000000..641c7976c --- /dev/null +++ b/sql/updates/r3153_scriptdev2.sql @@ -0,0 +1,13 @@ +DELETE FROM script_texts WHERE entry IN (-1609081,-1609082,-1609083,-1609084,-1609085,-1609086,-1609087,-1609088,-1609287,-1609288,-1609289); +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1609081,'%s throws rotten apple on $N.',0,2,0,0,'city guard EMOTE_APPLE'), +(-1609082,'%s throws rotten banana on $N.',0,2,0,0,'city guard EMOTE_BANANA'), +(-1609083,'%s spits on $N.',0,2,0,0,'city guard EMOTE_SPIT'), +(-1609084,'Monster!',0,0,0,14,'city guard SAY_RANDOM_1'), +(-1609085,'Murderer!',0,0,0,14,'city guard SAY_RANDOM_2'), +(-1609086,'GET A ROPE!',0,0,0,25,'city guard SAY_RANDOM_3'), +(-1609087,'How dare you set foot in our city!',0,0,0,25,'city guard SAY_RANDOM_4'), +(-1609088,'You disgust me.',0,0,0,14,'city guard SAY_RANDOM_5'), +(-1609287,'Looks like we\'re going to have ourselves an execution.',0,0,0,25,'city guard SAY_RANDOM_6'), +(-1609288,'Traitorous dog.',0,0,0,14,'city guard SAY_RANDOM_7'), +(-1609289,'My family was wiped out by the Scourge! MONSTER!',0,0,0,25,'city guard SAY_RANDOM_8'); From 4f12a4c3e307ddb4133bf24f8786dc25c05e35a2 Mon Sep 17 00:00:00 2001 From: xfurry Date: Sun, 16 Aug 2015 17:00:10 +0300 Subject: [PATCH 1171/1172] [3154] Fix Mature Netherwing Drake flight behavior Close #178 --- scripts/outland/shadowmoon_valley.cpp | 8 +++++++- sd2_revision_nr.h | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/scripts/outland/shadowmoon_valley.cpp b/scripts/outland/shadowmoon_valley.cpp index bbb090784..a5ee9668c 100644 --- a/scripts/outland/shadowmoon_valley.cpp +++ b/scripts/outland/shadowmoon_valley.cpp @@ -103,6 +103,11 @@ struct mob_mature_netherwing_drakeAI : public ScriptedAI } } + void JustReachedHome() override + { + m_creature->GetMotionMaster()->Clear(); + } + void UpdateAI(const uint32 uiDiff) override { if (m_uiEatTimer) @@ -119,6 +124,7 @@ struct mob_mature_netherwing_drakeAI : public ScriptedAI float fX, fY, fZ; pGo->GetContactPoint(m_creature, fX, fY, fZ, CONTACT_DISTANCE); + m_creature->SetWalk(false); m_creature->GetMotionMaster()->MovePoint(1, fX, fY, fZ); } m_uiEatTimer = 0; @@ -142,7 +148,7 @@ struct mob_mature_netherwing_drakeAI : public ScriptedAI Reset(); m_creature->SetLevitate(true); m_creature->SetByteFlag(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_FLY_ANIM); - m_creature->GetMotionMaster()->Clear(); + m_creature->GetMotionMaster()->MoveTargetedHome(); m_uiCreditTimer = 0; } else diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h index bf60725a9..1cf4b9139 100644 --- a/sd2_revision_nr.h +++ b/sd2_revision_nr.h @@ -1,4 +1,4 @@ #ifndef __SD2_REVISION_NR_H__ #define __SD2_REVISION_NR_H__ - #define SD2_REVISION_NR "3153" + #define SD2_REVISION_NR "3154" #endif // __SD2_REVISION_NR_H__ From 083521b9de1dad79a56e40ebac841919939091a0 Mon Sep 17 00:00:00 2001 From: stfx Date: Thu, 3 Sep 2015 01:19:14 +0200 Subject: [PATCH 1172/1172] Fix compile after recent core git_id changes --- ScriptMgr.cpp | 6 ------ system/MangosdRev.cpp | 8 -------- 2 files changed, 14 deletions(-) diff --git a/ScriptMgr.cpp b/ScriptMgr.cpp index b6282dda9..71c274b0e 100644 --- a/ScriptMgr.cpp +++ b/ScriptMgr.cpp @@ -252,12 +252,6 @@ void Script::RegisterSelf(bool bReportError) //******************************** //*** Functions to be Exported *** -MANGOS_DLL_EXPORT -char const* GetScriptLibraryVersion() -{ - return strSD2Version.c_str(); -} - MANGOS_DLL_EXPORT bool GossipHello(Player* pPlayer, Creature* pCreature) { diff --git a/system/MangosdRev.cpp b/system/MangosdRev.cpp index a9dcbf232..5888ba623 100644 --- a/system/MangosdRev.cpp +++ b/system/MangosdRev.cpp @@ -2,8 +2,6 @@ * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ -#include "../../../shared/revision_nr.h" - #ifdef WIN32 # define MANGOS_DLL_EXPORT extern "C" __declspec(dllexport) #elif defined( __GNUC__ ) @@ -11,9 +9,3 @@ #else # define MANGOS_DLL_EXPORT extern "C" export #endif - -MANGOS_DLL_EXPORT -char const* GetMangosRevStr() -{ - return REVISION_NR; -}